@arcgis/core 5.0.0-next.36 → 5.0.0-next.38

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 (270) hide show
  1. package/WebLinkChart.js +1 -1
  2. package/analysis/ShadowCast/types.d.ts +2 -0
  3. package/applications/Components/analysisUtils.d.ts +1 -0
  4. package/applications/Components/analysisUtils.js +1 -1
  5. package/applications/Components/testUtils.d.ts +4 -0
  6. package/applications/Components/testUtils.js +5 -0
  7. package/arcade/arcadeAsyncRuntime.js +1 -1
  8. package/arcade/arcadeCompiler.js +1 -1
  9. package/arcade/featureSetUtils.js +1 -1
  10. package/arcade/featureset/actions/Adapted.js +1 -1
  11. package/arcade/featureset/actions/AttributeFilter.js +1 -1
  12. package/arcade/featureset/actions/GroupBy.js +1 -1
  13. package/arcade/featureset/actions/SpatialFilter.js +1 -1
  14. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  15. package/arcade/featureset/sources/FeatureLayerMemory.js +1 -1
  16. package/arcade/featureset/sources/FeatureLayerOGC.js +1 -1
  17. package/arcade/featureset/sources/FeatureLayerRelated.js +1 -1
  18. package/arcade/featureset/support/FeatureSet.js +1 -1
  19. package/arcade/featureset/support/FeatureSetIterator.js +1 -1
  20. package/assets/esri/core/workers/RemoteClient.js +1 -1
  21. package/assets/esri/core/workers/chunks/014dbe6fa93a277b08f7.js +1 -0
  22. package/assets/esri/core/workers/chunks/{51355866a0dcf41cfded.js → 0a5427127634738aa239.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{c7c721de93bc8688e13c.js → 1d4ea8db272655c0608c.js} +1 -1
  24. package/assets/esri/core/workers/chunks/1d566539ff6fb6ac798c.js +1 -0
  25. package/assets/esri/core/workers/chunks/1de216d9850c39c1735d.js +1 -0
  26. package/assets/esri/core/workers/chunks/262232437d37a7460b11.js +1 -0
  27. package/assets/esri/core/workers/chunks/2795e491f803654413d2.js +1 -0
  28. package/assets/esri/core/workers/chunks/2f9129003f77bfeab2f9.js +1 -0
  29. package/assets/esri/core/workers/chunks/{1817cf11e85afca947d3.js → 328106e181e5957ceaa5.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{d3db7244fac7398cc700.js → 4b6a44c6265c8959abd8.js} +1 -1
  31. package/assets/esri/core/workers/chunks/50ffb22c48fadd36c748.js +1 -0
  32. package/assets/esri/core/workers/chunks/{f1ac1c8b1331ec79e898.js → 59ce992d3a5e7c32b9fb.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{8a946cbc816f373c136b.js → 5e30acfda04f7fc2b676.js} +1 -1
  34. package/assets/esri/core/workers/chunks/6330d8767ba1d5329daa.js +1 -0
  35. package/assets/esri/core/workers/chunks/{3f03165487c1c2340fff.js → 690a40d2eef52bfc149f.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{dd34d56caafa38d4b8e4.js → 7aa730e5ac7b268e3c98.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{b451dc416eebd0931ef8.js → 7ab237d19b84d89ff483.js} +7 -7
  38. package/assets/esri/core/workers/chunks/{1fa55d4c4b092a98bdd7.js → b56c07c0b43cb1999070.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{bfb9cbe59d36d18f9157.js → cda5c95fd49b8901f7d4.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{c9e7cc5d853908ab5b2f.js → ce99abfdcd71ff9e4e36.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{726a797f5df7eeee0b3d.js → d786b17cc9062b1450ac.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{52c8687b473c9953c2f2.js → d9958654c6438f28237b.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{2e76fbd3c874300fc4a7.js → de3da4d31a7529761565.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{eb6218634a492667506a.js → e501d68a1464805c4b4e.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{33431e8131f6017de2f9.js → e7f4d135ef9665de1468.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{d8623f5f13a084e439c2.js → e9bc3c6482ba778c9349.js} +37 -37
  47. package/assets/esri/core/workers/chunks/{7420fa18ba12014b22ea.js → ee67c8a7c1f8b482cd99.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{abb05a903440d97a6a74.js → f441fc74451330384fb0.js} +1 -1
  49. package/assets/esri/core/workers/chunks/f609b256df9eb3803464.js +1 -0
  50. package/assets/esri/core/workers/chunks/f97a7cb367634353177d.js +1 -0
  51. package/chunks/CloudsComposition.glsl.js +1 -1
  52. package/chunks/ComponentShader.glsl.js +2 -2
  53. package/chunks/DefaultMaterial.glsl.js +1 -1
  54. package/chunks/GaussianSplat.glsl.js +2 -2
  55. package/chunks/Laserlines.glsl.js +1 -1
  56. package/chunks/Path.glsl.js +1 -1
  57. package/chunks/RealisticTree.glsl.js +1 -1
  58. package/chunks/Terrain.glsl.js +34 -36
  59. package/chunks/WaterSurface.glsl.js +1 -1
  60. package/chunks/boundedPlane.js +1 -1
  61. package/chunks/cameraUtilsSpherical.js +1 -1
  62. package/chunks/vec32.js +1 -1
  63. package/config.js +1 -1
  64. package/core/has.js +1 -1
  65. package/core/iteratorUtils.js +1 -1
  66. package/core/libs/gl-matrix-2/math/quat.js +1 -1
  67. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  68. package/geometry/support/buffer/BufferView.js +1 -1
  69. package/geometry/support/curves/densifyCurvedGeometry.js +1 -1
  70. package/geometry/support/lineSegment.js +1 -1
  71. package/geometry/support/meshUtils/merge.js +1 -1
  72. package/geometry/support/sphere.js +1 -1
  73. package/interfaces.d.ts +59 -5
  74. package/kernel.js +1 -1
  75. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  76. package/layers/VoxelWasmPerSceneView.js +1 -1
  77. package/layers/knowledgeGraph/layerUtils.js +1 -1
  78. package/layers/orientedImagery/transformations/worldToImage.js +1 -1
  79. package/layers/support/csvUtils.js +1 -1
  80. package/layers/video/VideoController.js +1 -1
  81. package/layers/voxel/VoxelVolume.js +1 -1
  82. package/package.json +5 -5
  83. package/support/revision.js +1 -1
  84. package/support/tests/meshUtils.js +5 -0
  85. package/support/tests/serviceMockDependencies.js +5 -0
  86. package/support/tests/setupServiceMocksMesh.js +5 -0
  87. package/views/2d/analysis/ElevationProfile/ElevationProfileLineVisualization2D.js +1 -1
  88. package/views/2d/interactive/SegmentLabels2D.js +1 -1
  89. package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
  90. package/views/3d/FocusAreasView.js +1 -1
  91. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  92. package/views/3d/analysis/Dimension/DimensionTool.js +1 -1
  93. package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
  94. package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
  95. package/views/3d/analysis/ElevationProfile/ElevationProfileLineVisualization3D.js +1 -1
  96. package/views/3d/analysis/ElevationProfile/ElevationProfileVisualization3D.js +1 -1
  97. package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
  98. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  99. package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
  100. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  101. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  102. package/views/3d/analysis/Viewshed/ViewshedScaleOrientManipulation.js +1 -1
  103. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  104. package/views/3d/analysis/Viewshed/ViewshedSubVisualization.js +1 -1
  105. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  106. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  107. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
  108. package/views/3d/animation/pointToPoint/Camera.js +1 -1
  109. package/views/3d/camera/constraintUtils/distance.js +1 -1
  110. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  111. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  112. package/views/3d/environment/CloudsParameters.js +1 -1
  113. package/views/3d/environment/EnvironmentManager.js +1 -1
  114. package/views/3d/environment/MarsAtmosphere.js +1 -1
  115. package/views/3d/interactive/SegmentLabels3D.js +1 -1
  116. package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
  117. package/views/3d/interactive/editingTools/media/MediaElementManipulator3D.js +1 -1
  118. package/views/3d/interactive/editingTools/reshape/edgeOffsetUtils.js +1 -1
  119. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
  120. package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
  121. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  122. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  123. package/views/3d/layers/FlowSubView3D.js +1 -1
  124. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  125. package/views/3d/layers/I3SMeshView3D.js +1 -1
  126. package/views/3d/layers/ImagerySubView3D.js +1 -1
  127. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  128. package/views/3d/layers/PointCloudWorker.js +1 -1
  129. package/views/3d/layers/RouteLayerView3D.js +1 -1
  130. package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
  131. package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
  132. package/views/3d/layers/graphics/Graphics3DScaleVisibility.js +1 -1
  133. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  134. package/views/3d/layers/graphics/pipeline/rendering/DirectRenderer.js +1 -1
  135. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  136. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  137. package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
  138. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  139. package/views/3d/state/Frustum.js +1 -1
  140. package/views/3d/state/ViewStateManager.js +1 -1
  141. package/views/3d/state/controllers/FovController.js +1 -1
  142. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  143. package/views/3d/state/controllers/momentum/ZoomPlanarMomentumController.js +1 -1
  144. package/views/3d/support/FrustumExtentIntersection.js +1 -1
  145. package/views/3d/support/cameraUtils.js +1 -1
  146. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  147. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  148. package/views/3d/support/gaussianSplatting/GaussianSplatFadeHelper.js +1 -1
  149. package/views/3d/support/intersectionUtils.js +1 -1
  150. package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
  151. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  152. package/views/3d/support/pointsOfInterest/Focus.js +1 -1
  153. package/views/3d/support/viewpointUtils.js +1 -1
  154. package/views/3d/terrain/OverlayManager.js +1 -1
  155. package/views/3d/terrain/OverlayRenderer.js +1 -1
  156. package/views/3d/terrain/PatchRenderData.js +1 -1
  157. package/views/3d/terrain/SphericalPatch.js +1 -1
  158. package/views/3d/terrain/TerrainRenderer.js +1 -1
  159. package/views/3d/terrain/TerrainSurface.js +1 -1
  160. package/views/3d/terrain/Tile.js +1 -1
  161. package/views/3d/terrain/TileCompositor.js +1 -1
  162. package/views/3d/webgl/RenderCamera.js +1 -1
  163. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  164. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  165. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  166. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  167. package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +4 -7
  168. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBuffer.glsl.js +4 -4
  169. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +1 -1
  170. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +6 -6
  171. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js +4 -4
  172. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +19 -15
  173. package/views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js +2 -2
  174. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +1 -1
  175. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +5 -5
  176. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js +14 -14
  177. package/views/3d/webgl-engine/core/shaderLibrary/util/BlendModes.glsl.js +16 -37
  178. package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js +8 -8
  179. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  180. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  181. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  182. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  183. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  184. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  185. package/views/3d/webgl-engine/lib/CutFillColor.js +1 -1
  186. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  187. package/views/3d/webgl-engine/lib/Normals.js +1 -1
  188. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  189. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  190. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  191. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  192. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  193. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBuffer.js +1 -1
  194. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFieldCreation.js +5 -0
  195. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFields.js +1 -1
  196. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferLayout.js +1 -1
  197. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferLayoutField.js +5 -0
  198. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBufferView.js +5 -0
  199. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  200. package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
  201. package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
  202. package/views/3d/webgl-engine/lib/triangleIntersectionUtils.js +1 -1
  203. package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
  204. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  205. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  206. package/views/3d/webgl-engine/materials/DefaultTechniqueConfiguration.js +1 -1
  207. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  208. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  209. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  210. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  211. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  212. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  213. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  214. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  215. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  216. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  217. package/views/3d/webgl-engine/materials/SlicePlaneMaterial.js +1 -1
  218. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  219. package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
  220. package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
  221. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  222. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  223. package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
  224. package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
  225. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  226. package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
  227. package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
  228. package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +9 -10
  229. package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
  230. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  231. package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +1 -1
  232. package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
  233. package/views/3d/webgl-engine/shaders/TerrainTechnique.js +1 -1
  234. package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
  235. package/views/BreakpointsOwner.js +1 -1
  236. package/views/GroundView.js +1 -1
  237. package/views/SceneView.js +1 -1
  238. package/views/ToolViewManager.js +1 -1
  239. package/views/analysis/ElevationProfile/elevationProfileVisualizationUtils.js +1 -1
  240. package/views/interactive/GraphicManipulator.js +1 -1
  241. package/views/interactive/InteractiveToolBase.js +1 -1
  242. package/views/interactive/ToolViewManagerManipulatorState.js +1 -1
  243. package/views/interactive/coordinateHelper.js +1 -1
  244. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  245. package/views/interactive/sketch/constraints.js +1 -1
  246. package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
  247. package/views/interactive/snapping/featureSources/sceneLayerSource/sceneLayerSnappingUtils.js +1 -1
  248. package/views/interactive/snapping/hints/LineSnappingHint.js +1 -1
  249. package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
  250. package/views/layers/LayerView.js +1 -1
  251. package/views/navigation/PanSphericalMomentumEstimator.js +1 -1
  252. package/views/support/LayerViewManager.js +1 -1
  253. package/views/support/euclideanAreaMeasurementUtils.js +1 -1
  254. package/views/support/euclideanLengthMeasurementUtils.js +1 -1
  255. package/views/support/geodesicLengthMeasurementUtils.js +1 -1
  256. package/views/support/geometry3dUtils.js +1 -1
  257. package/webmap/utils.js +1 -1
  258. package/widgets/Sketch/SketchViewModel.js +1 -1
  259. package/widgets/Slider.js +1 -1
  260. package/assets/esri/core/workers/chunks/11687718c8635eb7bf37.js +0 -1
  261. package/assets/esri/core/workers/chunks/15c1a48e8cd2a8882d85.js +0 -1
  262. package/assets/esri/core/workers/chunks/1b9e7d416c9f00e020bb.js +0 -1
  263. package/assets/esri/core/workers/chunks/24a3c6f0154787968724.js +0 -1
  264. package/assets/esri/core/workers/chunks/5000a37fba27464d10ca.js +0 -1
  265. package/assets/esri/core/workers/chunks/951a3442d4342539f2ea.js +0 -1
  266. package/assets/esri/core/workers/chunks/b075d3714fab0591d67c.js +0 -1
  267. package/assets/esri/core/workers/chunks/d8975dd7b85b5d065ee4.js +0 -1
  268. package/assets/esri/core/workers/chunks/e0a74250d22fa1d7dc18.js +0 -1
  269. package/assets/esri/core/workers/chunks/f43e1e1a1b2eb737e00c.js +0 -1
  270. package/views/3d/webgl-engine/core/shaderLibrary/util/FastApproximateTrigonometry.glsl.js +0 -26
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[431],{431:(t,e,r)=>{r.d(e,{o6:()=>_,HY:()=>N,hx:()=>A,Jb:()=>C});var n=r(9318);function s(t,e,r){const n=e/3,s=new Uint32Array(r+1),i=new Uint32Array(r+1),u=(t,e)=>{t<e?s[t+1]++:i[e+1]++};for(let e=0;e<n;e++){const r=t[3*e],n=t[3*e+1],s=t[3*e+2];u(r,n),u(n,s),u(s,r)}let o=0,f=0;for(let t=0;t<r;t++){const e=s[t+1],r=i[t+1];s[t+1]=o,i[t+1]=f,o+=e,f+=r}const c=new Uint32Array(6*n),a=s[r],h=(t,e,r)=>{if(t<e){const n=s[t+1]++;c[2*n]=e,c[2*n+1]=r}else{const n=i[e+1]++;c[2*a+2*n]=t,c[2*a+2*n+1]=r}};for(let e=0;e<n;e++){const r=t[3*e],n=t[3*e+1],s=t[3*e+2];h(r,n,e),h(n,s,e),h(s,r,e)}const l=(t,e)=>{const r=2*t,n=e-t;for(let t=1;t<n;t++){const e=c[r+2*t],n=c[r+2*t+1];let s=t-1;for(;s>=0&&c[r+2*s]>e;s--)c[r+2*s+2]=c[r+2*s],c[r+2*s+3]=c[r+2*s+1];c[r+2*s+2]=e,c[r+2*s+3]=n}};for(let t=0;t<r;t++)l(s[t],s[t+1]),l(a+i[t],a+i[t+1]);const d=new Int32Array(3*n),y=(e,r)=>e===t[3*r]?0:e===t[3*r+1]?1:e===t[3*r+2]?2:-1,p=(t,e)=>{const r=y(t,e);d[3*e+r]=-1},m=(t,e,r,n)=>{const s=y(t,e);d[3*e+s]=n;const i=y(r,n);d[3*n+i]=e};for(let t=0;t<r;t++){let e=s[t];const r=s[t+1];let n=i[t];const u=i[t+1];for(;e<r&&n<u;){const r=c[2*e],s=c[2*a+2*n];r===s?(m(t,c[2*e+1],s,c[2*a+2*n+1]),e++,n++):r<s?(p(t,c[2*e+1]),e++):(p(s,c[2*a+2*n+1]),n++)}for(;e<r;)p(t,c[2*e+1]),e++;for(;n<u;)p(c[2*a+2*n],c[2*a+2*n+1]),n++}return d}var i=r(1843),u=r(13182),o=r(87811),f=r(38954),c=r(51850),a=r(34727);function h(t,e,r,n,s,i=2){const u=1/(Math.abs(r)+Math.abs(n)+Math.abs(s)),o=r*u,f=n*u,c=s<=0?(o>=0?1:-1)*(1-Math.abs(f)):o,a=s<=0?(f>=0?1:-1)*(1-Math.abs(o)):f,h=e*i;t[h]=l(c),t[h+1]=l(a)}function l(t){return(0,a.qE)(Math.round(32767*t),-32767,32767)}r(11868),r(34275);class d{updateSettings(t){this.settings=t,this._edgeHashFunction=t.reducedPrecision?E:B}write(t,e,r){g.seed=this._edgeHashFunction(r);const n=g.getIntRange(0,255),s=g.getIntRange(0,this.settings.variants-1),i=g.getFloat(),u=255*(.5*function(t){return Math.abs(t)**1.2*Math.sign(t)}(-(1-Math.min(i/.7,1))+Math.max(0,i-.7)/(1-.7))+.5);t.position0.setVec(e,r.position0),t.position1.setVec(e,r.position1),t.componentIndex.set(e,r.componentIndex),t.variantOffset.set(e,n),t.variantStroke.set(e,s),t.variantExtension.set(e,u)}}const y=new Float32Array(6),p=new Uint32Array(y.buffer),m=new Uint32Array(1);function B(t){return y[0]=t.position0[0],y[1]=t.position0[1],y[2]=t.position0[2],y[3]=t.position1[0],y[4]=t.position1[1],y[5]=t.position1[2],m[0]=31*(31*(31*(31*(31*(166811+p[0])+p[1])+p[2])+p[3])+p[4])+p[5],m[0]}function E(t){const e=y;e[0]=b(t.position0[0]),e[1]=b(t.position0[1]),e[2]=b(t.position0[2]),e[3]=b(t.position1[0]),e[4]=b(t.position1[1]),e[5]=b(t.position1[2]),m[0]=5381;for(let t=0;t<p.length;t++)m[0]=31*m[0]+p[t];return m[0]}const M=1e4;function b(t){return Math.round(t*M)/M}const T=(0,c.vt)(),g=new o.A;var S=r(93406);function _(t){const e=A(t.data,t.skipDeduplicate,t.indices,t.indicesLength);return x.updateSettings(t.writerSettings),v.updateSettings(t.writerSettings),(0,S.K)(e,x,v)}function A(t,e,r,i){if(e){const e=s(r,i,t.count);return new w(r,i,e,t)}const o=(0,n.b)(t.buffer,t.stride/4,{originalIndices:r}),f=s(o.indices,i,o.uniqueCount);return{faces:o.indices,facesLength:o.indices.length,neighbors:f,vertices:u.I$.createView(o.buffer)}}class w{constructor(t,e,r,n){this.faces=t,this.facesLength=e,this.neighbors=r,this.vertices=n}}const x=new class{constructor(){this._commonWriter=new d}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return u.gr.createBuffer(t)}write(t,e,r){this._commonWriter.write(t,e,r),(0,f.i)(T,r.faceNormal0,r.faceNormal1),(0,f.n)(T,T);const{typedBuffer:n,typedBufferStride:s}=t.normalCompressed;h(n,e,T[0],T[1],T[2],s)}},v=new class{constructor(){this._commonWriter=new d}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return u.In.createBuffer(t)}write(t,e,r){this._commonWriter.write(t,e,r);{const{typedBuffer:n,typedBufferStride:s}=t.normalCompressed;h(n,e,r.faceNormal0[0],r.faceNormal0[1],r.faceNormal0[2],s)}{const{typedBuffer:n,typedBufferStride:s}=t.normal2Compressed;h(n,e,r.faceNormal1[0],r.faceNormal1[1],r.faceNormal1[2],s)}}},C=(0,i.BP)().vec3f("position0").vec3f("position1"),N=(0,i.BP)().vec3f("position0").vec3f("position1").u16("componentIndex")},620:(t,e,r)=>{r.d(e,{O_:()=>i,vA:()=>s}),r(48163),r(87317),(0,r(91829).vt)();class n{constructor(t){this.message=t}toString(){return`AssertException: ${this.message}`}}function s(t,e="Assertion"){if(!t){const t=new Error(e).stack;throw new n(`${e} at ${t}`)}}function i(t,e,r,n){let s,i=(r[0]-t[0])/e[0],u=(n[0]-t[0])/e[0];i>u&&(s=i,i=u,u=s);let o=(r[1]-t[1])/e[1],f=(n[1]-t[1])/e[1];if(o>f&&(s=o,o=f,f=s),i>f||o>u)return!1;o>i&&(i=o),f<u&&(u=f);let c=(r[2]-t[2])/e[2],a=(n[2]-t[2])/e[2];return c>a&&(s=c,c=a,a=s),!(i>a||c>u||(a<u&&(u=a),u<0))}},9318:(t,e,r)=>{r.d(e,{b:()=>i});var n=r(34727),s=r(97146);function i(t,e,r){const i=Array.isArray(t),a=i?t.length/e:t.byteLength/(4*e),h=i?t:new Uint32Array(t,0,a*e),l=r?.minReduction??0,d=r?.originalIndices||null,y=d?d.length:0,p=r?.componentOffsets||null;let m=0;if(p)for(let t=0;t<p.length-1;t++){const e=p[t+1]-p[t];e>m&&(m=e)}else m=a;const B=Math.floor(1.1*m)+1;(null==c||c.length<2*B)&&(c=new Uint32Array((0,n.cU)(2*B)));for(let t=0;t<2*B;t++)c[t]=0;let E=0;const M=!!p&&!!d,b=M?y:a;let T=(0,s.my)(a);const g=new Uint32Array(y),S=1.96;let _=0!==l?Math.ceil(4*S*S/(l*l)*l*(1-l)):b,A=1,w=p?p[1]:b;for(let t=0;t<b;t++){if(t===_){const e=1-E/t;if(e+S*Math.sqrt(e*(1-e)/t)<l)return null;_*=2}if(t===w){for(let t=0;t<2*B;t++)c[t]=0;if(d)for(let t=p[A-1];t<p[A];t++)g[t]=T[d[t]];w=p[++A]}const r=M?d[t]:t,n=r*e,s=f(h,n,e);let i=s%B,o=E;for(;0!==c[2*i+1];){if(c[2*i]===s){const t=c[2*i+1]-1;if(u(h,n,t*e,e)){o=T[t];break}}i++,i>=B&&(i-=B)}o===E&&(c[2*i]=s,c[2*i+1]=r+1,E++),T[r]=o}if(0!==l&&1-E/a<l)return null;if(M){for(let t=p[A-1];t<g.length;t++)g[t]=T[d[t]];T=(0,s.uW)(g)}const x=i?new Array(E):new Uint32Array(E*e);E=0;for(let t=0;t<b;t++)T[t]===E&&(o(h,(M?d[t]:t)*e,x,E*e,e),E++);if(d&&!M){const t=new Uint32Array(y);for(let e=0;e<t.length;e++)t[e]=T[d[e]];T=(0,s.uW)(t)}return{buffer:Array.isArray(x)?x:x.buffer,indices:T,uniqueCount:E}}function u(t,e,r,n){for(let s=0;s<n;s++)if(t[e+s]!==t[r+s])return!1;return!0}function o(t,e,r,n,s){for(let i=0;i<s;i++)r[n+i]=t[e+i]}function f(t,e,r){let n=0;for(let s=0;s<r;s++)n=t[e+s]+n|0,n=n+(n<<11)+(n>>>2)|0;return n>>>0}let c=null},13030:(t,e,r)=>{r.d(e,{Y$:()=>m,XW:()=>p,qB:()=>x,Qt:()=>W,My:()=>G,bf:()=>X,jZ:()=>S,j0:()=>_,Sx:()=>A,E$:()=>w,h:()=>L,P:()=>z,SL:()=>I,gH:()=>E,ZD:()=>B,si:()=>v,mJ:()=>Z,UL:()=>K,D6:()=>k,Yi:()=>O,An:()=>q,LC:()=>V,xs:()=>b,EC:()=>M,Xm:()=>C,Vp:()=>H,zD:()=>Q,m8:()=>j,nS:()=>U,H$:()=>D,eI:()=>P,Eq:()=>g,jz:()=>T,Aj:()=>N,E7:()=>J,Y4:()=>tt,TX:()=>$,Uz:()=>Y,ml:()=>R,XP:()=>F}),r(34727);var n=r(87317),s=r(91829),i=r(20498);class u{static{this.ElementCount=9}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.elementCount=9;const i=this.TypedArrayConstructor;void 0===n&&(n=9*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}getMat(t,e){let r=t*this.typedBufferStride;for(let t=0;t<9;t++)e[t]=this.typedBuffer[r++];return e}setMat(t,e){let r=t*this.typedBufferStride;for(let t=0;t<9;t++)this.typedBuffer[r++]=e[t]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,r){this.typedBuffer[t*this.typedBufferStride+e]=r}copyFrom(t,e,r){const n=this.typedBuffer,s=e.typedBuffer;let i=t*this.typedBufferStride,u=r*e.typedBufferStride;for(let t=0;t<9;++t)n[i++]=s[u++]}get buffer(){return this.typedBuffer.buffer}}class o{static{this.ElementCount=16}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.elementCount=16;const i=this.TypedArrayConstructor;void 0===n&&(n=16*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}getMat(t,e){let r=t*this.typedBufferStride;for(let t=0;t<16;t++)e[t]=this.typedBuffer[r++];return e}setMat(t,e){let r=t*this.typedBufferStride;for(let t=0;t<16;t++)this.typedBuffer[r++]=e[t]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,r){this.typedBuffer[t*this.typedBufferStride+e]=r}copyFrom(t,e,r){this.copyFromTypedBuffer(t,e.typedBuffer,r*e.typedBufferStride)}copyFromTypedBuffer(t,e,r){const n=this.typedBuffer;let s=t*this.typedBufferStride;for(let t=0;t<16;++t)n[s++]=e[r++]}get buffer(){return this.typedBuffer.buffer}}class f{static{this.ElementCount=1}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.elementCount=1;const i=this.TypedArrayConstructor;void 0===n&&(n=i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.stride=n,this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride)}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}get(t){return this.typedBuffer[t*this.typedBufferStride]}set(t,e){this.typedBuffer[t*this.typedBufferStride]=e}get buffer(){return this.typedBuffer.buffer}}var c=r(37585);class a{static{this.ElementCount=2}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.start=r,this.elementCount=2;const i=this.TypedArrayConstructor;void 0===n&&(n=2*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}getVec(t,e){return t*=this.typedBufferStride,(0,c.hZ)(e,this.typedBuffer[t],this.typedBuffer[t+1])}setVec(t,e){t*=this.typedBufferStride,this.typedBuffer[t++]=e[0],this.typedBuffer[t]=e[1]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,r){this.typedBuffer[t*this.typedBufferStride+e]=r}setValues(t,e,r){t*=this.typedBufferStride,this.typedBuffer[t++]=e,this.typedBuffer[t]=r}copyFrom(t,e,r){const n=this.typedBuffer,s=e.typedBuffer;let i=t*this.typedBufferStride,u=r*e.typedBufferStride;n[i++]=s[u++],n[i]=s[u]}get buffer(){return this.typedBuffer.buffer}}var h=r(38954);class l{static{this.ElementCount=3}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.elementCount=3;const i=this.TypedArrayConstructor;void 0===n&&(n=3*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}getVec(t,e){return t*=this.typedBufferStride,(0,h.h)(e,this.typedBuffer[t],this.typedBuffer[t+1],this.typedBuffer[t+2])}setVec(t,e){t*=this.typedBufferStride,this.typedBuffer[t++]=e[0],this.typedBuffer[t++]=e[1],this.typedBuffer[t]=e[2]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,r){this.typedBuffer[t*this.typedBufferStride+e]=r}setValues(t,e,r,n){t*=this.typedBufferStride,this.typedBuffer[t++]=e,this.typedBuffer[t++]=r,this.typedBuffer[t]=n}copyFrom(t,e,r){const n=this.typedBuffer,s=e.typedBuffer;let i=t*this.typedBufferStride,u=r*e.typedBufferStride;n[i++]=s[u++],n[i++]=s[u++],n[i]=s[u]}get buffer(){return this.typedBuffer.buffer}}class d{static{this.ElementCount=4}constructor(t,e,r=0,n,s){this.TypedArrayConstructor=t,this.start=r,this.elementCount=4;const i=this.TypedArrayConstructor;void 0===n&&(n=4*i.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:r;this.typedBuffer=null==s?new i(e,u):new i(e,u,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,r=this.count-e){const n=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,n,this.stride,n+r*this.stride)}getVec(t,e){return t*=this.typedBufferStride,(0,n.c)(e,this.typedBuffer[t++],this.typedBuffer[t++],this.typedBuffer[t++],this.typedBuffer[t])}setVec(t,e){t*=this.typedBufferStride,this.typedBuffer[t++]=e[0],this.typedBuffer[t++]=e[1],this.typedBuffer[t++]=e[2],this.typedBuffer[t]=e[3]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,r){this.typedBuffer[t*this.typedBufferStride+e]=r}setValues(t,e,r,n,s){t*=this.typedBufferStride,this.typedBuffer[t++]=e,this.typedBuffer[t++]=r,this.typedBuffer[t++]=n,this.typedBuffer[t]=s}copyFrom(t,e,r){const n=this.typedBuffer,s=e.typedBuffer;let i=t*this.typedBufferStride,u=r*e.typedBufferStride;n[i++]=s[u++],n[i++]=s[u++],n[i++]=s[u++],n[i]=s[u]}get buffer(){return this.typedBuffer.buffer}}var y=r(620);class p extends f{constructor(t,e=0,r,n){(0,y.vA)(i.SX),super((0,i.pX)(),t,e,r,n),this.elementType="f16"}static{this.ElementType="f16"}}class m extends f{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}static{this.ElementType="f32"}}class B extends a{constructor(t,e=0,r,n){(0,y.vA)(i.SX),super((0,i.pX)(),t,e,r,n),this.elementType="f16"}slice(t,e){return this.sliceBuffer(B,t,e)}static{this.ElementType="f16"}}class E extends a{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}slice(t,e){return this.sliceBuffer(E,t,e)}static{this.ElementType="f32"}}class M extends l{constructor(t,e=0,r,n){(0,y.vA)(i.SX),super((0,i.pX)(),t,e,r,n),this.elementType="f16"}slice(t,e){return this.sliceBuffer(M,t,e)}static{this.ElementType="f16"}}class b extends l{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}slice(t,e){return this.sliceBuffer(b,t,e)}static fromTypedArray(t,e){return new b(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}static{this.ElementType="f32"}}class T extends d{constructor(t,e=0,r,n){(0,y.vA)(i.SX),super((0,i.pX)(),t,e,r,n),this.elementType="f16"}slice(t,e){return this.sliceBuffer(T,t,e)}static{this.ElementType="f16"}}class g extends d{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}slice(t,e){return this.sliceBuffer(g,t,e)}static{this.ElementType="f32"}}class S extends u{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}slice(t,e){return this.sliceBuffer(S,t,e)}static{this.ElementType="f32"}}class _ extends u{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(_,t,e)}static{this.ElementType="f64"}}class A extends o{constructor(t,e=0,r,n){super(Float32Array,t,e,r,n),this.elementType="f32"}slice(t,e){return this.sliceBuffer(A,t,e)}static{this.ElementType="f32"}}class w extends o{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(w,t,e)}static{this.ElementType="f64"}}class x extends f{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(x,t,e)}static{this.ElementType="f64"}}class v extends a{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(v,t,e)}static{this.ElementType="f64"}}class C extends l{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(C,t,e)}static fromTypedArray(t,e){return new C(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}static{this.ElementType="f64"}}class N extends d{constructor(t,e=0,r,n){super(Float64Array,t,e,r,n),this.elementType="f64"}slice(t,e){return this.sliceBuffer(N,t,e)}static{this.ElementType="f64"}}class I extends f{constructor(t,e=0,r,n){super(Uint8Array,t,e,r,n),this.elementType="u8"}slice(t,e){return this.sliceBuffer(I,t,e)}static{this.ElementType="u8"}}class V extends a{constructor(t,e=0,r,n){super(Uint8Array,t,e,r,n),this.elementType="u8"}slice(t,e){return this.sliceBuffer(V,t,e)}static{this.ElementType="u8"}}class P extends l{constructor(t,e=0,r,n){super(Uint8Array,t,e,r,n),this.elementType="u8"}slice(t,e){return this.sliceBuffer(P,t,e)}static fromTypedArray(t,e){return new P(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}static{this.ElementType="u8"}}class F extends d{constructor(t,e=0,r,n){super(Uint8Array,t,e,r,n),this.elementType="u8"}slice(t,e){return this.sliceBuffer(F,t,e)}static{this.ElementType="u8"}}class L extends f{constructor(t,e=0,r,n){super(Uint16Array,t,e,r,n),this.elementType="u16"}slice(t,e){return this.sliceBuffer(L,t,e)}static{this.ElementType="u16"}}class O extends a{constructor(t,e=0,r,n){super(Uint16Array,t,e,r,n),this.elementType="u16"}slice(t,e){return this.sliceBuffer(O,t,e)}static{this.ElementType="u16"}}class U extends l{constructor(t,e=0,r,n){super(Uint16Array,t,e,r,n),this.elementType="u16"}slice(t,e){return this.sliceBuffer(U,t,e)}static{this.ElementType="u16"}}class Y extends d{constructor(t,e=0,r,n){super(Uint16Array,t,e,r,n),this.elementType="u16"}slice(t,e){return this.sliceBuffer(Y,t,e)}static{this.ElementType="u16"}}class z extends f{constructor(t,e=0,r,n){super(Uint32Array,t,e,r,n),this.elementType="u32"}slice(t,e){return this.sliceBuffer(z,t,e)}static{this.ElementType="u32"}}class q extends a{constructor(t,e=0,r,n){super(Uint32Array,t,e,r,n),this.elementType="u32"}slice(t,e){return this.sliceBuffer(q,t,e)}static{this.ElementType="u32"}}class D extends l{constructor(t,e=0,r,n){super(Uint32Array,t,e,r,n),this.elementType="u32"}slice(t,e){return this.sliceBuffer(D,t,e)}static{this.ElementType="u32"}}class R extends d{constructor(t,e=0,r,n){super(Uint32Array,t,e,r,n),this.elementType="u32"}slice(t,e){return this.sliceBuffer(R,t,e)}static{this.ElementType="u32"}}class X extends f{constructor(t,e=0,r,n){super(Int8Array,t,e,r,n),this.elementType="i8"}slice(t,e){return this.sliceBuffer(X,t,e)}static{this.ElementType="i8"}}class k extends a{constructor(t,e=0,r,n){super(Int8Array,t,e,r,n),this.elementType="i8"}slice(t,e){return this.sliceBuffer(k,t,e)}static{this.ElementType="i8"}}class j extends l{constructor(t,e=0,r,n){super(Int8Array,t,e,r,n),this.elementType="i8"}slice(t,e){return this.sliceBuffer(j,t,e)}static{this.ElementType="i8"}}class $ extends d{constructor(t,e=0,r,n){super(Int8Array,t,e,r,n),this.elementType="i8"}slice(t,e){return this.sliceBuffer($,t,e)}static{this.ElementType="i8"}}class W extends f{constructor(t,e=0,r,n){super(Int16Array,t,e,r,n),this.elementType="i16"}slice(t,e){return this.sliceBuffer(W,t,e)}static{this.ElementType="i16"}}class Z extends a{constructor(t,e=0,r,n){super(Int16Array,t,e,r,n),this.elementType="i16"}slice(t,e){return this.sliceBuffer(Z,t,e)}static{this.ElementType="i16"}}class H extends l{constructor(t,e=0,r,n){super(Int16Array,t,e,r,n),this.elementType="i16"}slice(t,e){return this.sliceBuffer(H,t,e)}static{this.ElementType="i16"}}class J extends d{constructor(t,e=0,r,n){super(Int16Array,t,e,r,n),this.elementType="i16"}slice(t,e){return this.sliceBuffer(J,t,e)}static{this.ElementType="i16"}}class G extends f{constructor(t,e=0,r,n){super(Int32Array,t,e,r,n),this.elementType="i32"}slice(t,e){return this.sliceBuffer(G,t,e)}static{this.ElementType="i32"}}class K extends a{constructor(t,e=0,r,n){super(Int32Array,t,e,r,n),this.elementType="i32"}slice(t,e){return this.sliceBuffer(K,t,e)}static{this.ElementType="i32"}}class Q extends l{constructor(t,e=0,r,n){super(Int32Array,t,e,r,n),this.elementType="i32"}slice(t,e){return this.sliceBuffer(Q,t,e)}static{this.ElementType="i32"}}class tt extends d{constructor(t,e=0,r,n){super(Int32Array,t,e,r,n),this.elementType="i32"}slice(t,e){return this.sliceBuffer(tt,t,e)}static{this.ElementType="i32"}}(0,s.vt)()},13182:(t,e,r)=>{r.d(e,{I$:()=>M,gr:()=>g,In:()=>S});var n=r(4431),s=r(1843),i=r(20498),u=r(13030),o=r(90239);class f{constructor(t,e,r,n){this.name=t,this.byteOffset=e,this.byteStride=r,this.makeDirty=n}}class c extends f{constructor(t,e,r,n){super(t,e,r,n),this.elementCount=1}}class a extends c{constructor(t,e,r,n,s){super(t,r,n,s),this._bufferViewConstructor=e}updateBuffer(t){const{byteOffset:e,byteStride:r,_bufferViewConstructor:n}=this;this._bufferView=new n(t,e,r),this.makeDirty()}set(t,e){this._bufferView.set(t,e),this.makeDirty()}}class h extends c{constructor(t,e,r,n,s){super(t,r,n,s),this._bufferViewConstructor=e}updateBuffer(t){const{byteOffset:e,byteStride:r,_bufferViewConstructor:n}=this;this._bufferView=new n(t,e,r),this.makeDirty()}set(t,e){this._bufferView.set(t,255*e),this.makeDirty()}}class l extends f{constructor(t,e,r,n){super(t,e,r,n),this.elementCount=4}}class d extends l{constructor(t,e,r,n,s){super(t,r,n,s),this._bufferViewConstructor=e}updateBuffer(t){const{byteOffset:e,byteStride:r,_bufferViewConstructor:n}=this;this._bufferView=new n(t,e,r),this.makeDirty()}setValues(t,e,r,n,s){this._bufferView.set(t,0,e),this._bufferView.set(t,1,r),this._bufferView.set(t,2,n),this._bufferView.set(t,3,s),this.makeDirty()}setElement(t,e,r){this._bufferView.set(t,e,r),this.makeDirty()}getElement(t,e){return this._bufferView.get(t,e)}setArray(t,e){this.setValues(t,e[0],e[1],e[2],e[3])}}class y extends l{constructor(t,e,r,n,s){super(t,r,n,s),this._bufferViewConstructor=e}updateBuffer(t){const{byteOffset:e,byteStride:r,_bufferViewConstructor:n}=this;this._bufferView=new n(t,e,r),this.makeDirty()}setValues(t,e,r,n,s){this._bufferView.set(t,0,255*e),this._bufferView.set(t,1,255*r),this._bufferView.set(t,2,255*n),this._bufferView.set(t,3,255*s),this.makeDirty()}setElement(t,e,r){this._bufferView.set(t,e,255*r),this.makeDirty()}getElement(t,e){return this._bufferView.get(t,e)/255}setArray(t,e){this.setValues(t,e[0],e[1],e[2],e[3])}}function p(t){return(0,o.GJ)(t.ElementType)*t.ElementCount}const m={u8:{elementCount:1,elementType:"uint",byteSize:p(u.SL),createField:(t,e,r,n)=>new a(t.name,u.SL,e,r,n)},vec4u8:{elementCount:4,elementType:"uint",byteSize:p(u.XP),createField:(t,e,r,n)=>new d(t.name,u.XP,e,r,n)},unorm8:{elementCount:1,elementType:"float",byteSize:p(u.SL),createField:(t,e,r,n)=>new h(t.name,u.SL,e,r,n)},vec4unorm8:{elementCount:4,elementType:"float",byteSize:p(u.XP),createField:(t,e,r,n)=>new y(t.name,u.XP,e,r,n)},f16:{elementCount:1,elementType:"float",byteSize:p(i.SX?u.XW:u.Y$),createField:(t,e,r,n)=>new a(t.name,i.SX?u.XW:u.Y$,e,r,n)},f32:{elementCount:1,elementType:"float",byteSize:p(u.Y$),createField:(t,e,r,n)=>new a(t.name,u.Y$,e,r,n)}};class B{constructor(t,e,r,n){this._declaration=t,this._byteOffset=e,this._byteStride=r,this._creationInfo=n,this._startTexel=Math.floor(e/4);const s=this.byteSize;this._numTexels=Math.ceil((e+s)/4)-this._startTexel;let i=this._startTexel,u=e%4;const o=[],f=["x","y","z","w"];for(let t=0;t<s;++t){const t=`texel${i}.${f[u]}`;o.push(t),++u,u>=4&&(u=0,++i)}this._glslDecodeArgumentString=o.join(", ")}get name(){return this._declaration.name}get declaration(){return this._declaration}get byteOffset(){return this._byteOffset}get byteSize(){return this._creationInfo.byteSize}get startTexel(){return this._startTexel}get numTexels(){return this._numTexels}get elementType(){return this._creationInfo.elementType}get elementCount(){return this._creationInfo.elementCount}get glslDecodeArgumentString(){return this._glslDecodeArgumentString}createField(t){const{_declaration:e,_byteOffset:r,_byteStride:n,_creationInfo:s}=this;return s.createField(e,r,n,t)}}var E=r(85079);const M=(0,s.BP)().vec3f("position").u16("componentIndex").freeze(),b=(0,s.BP)().vec2u8("sideness").freeze(),T=(0,n.U)(b),g=(0,s.BP)().vec3f("position0").vec3f("position1").vec2i16("normalCompressed").u16("componentIndex").u8("variantOffset",{glNormalized:!0}).u8("variantStroke").u8("variantExtension",{glNormalized:!0}).freeze(),S=(0,s.BP)().vec3f("position0").vec3f("position1").vec2i16("normalCompressed").vec2i16("normal2Compressed").u16("componentIndex").u8("variantOffset",{glNormalized:!0}).u8("variantStroke").u8("variantExtension",{glNormalized:!0}).freeze(),_=(0,n.U)(g,1),A=(0,n.U)(S,1);(0,E._u)([T,_]),(0,E._u)([T,A]),new class{constructor(t){this.byteStride=0,this.numTexels=0;let e=0;const r=[];for(let n=0;n<t.length;++n){const s=t[n],{type:i}=s,u=m[i];r.push({declaration:s,byteOffset:e,creationInfo:u}),e+=u.byteSize}e=e+3&-4;const n=e,s=r.map(({declaration:t,byteOffset:e,creationInfo:r})=>new B(t,e,n,r));this.fields=s,this.byteStride=n,this.numTexels=Math.ceil(n/4)}}([{name:"color",type:"vec4unorm8"},{name:"lineWidth",type:"u8"},{name:"extensionLength",type:"u8"},{name:"materialType",type:"u8"},{name:"opacity",type:"unorm8"},{name:"elevationOffset",type:"f32"}])},20498:(t,e,r)=>{r.d(e,{SX:()=>i,pX:()=>s});let n=globalThis.Float16Array;function s(){return n}let i=!!n},34304:(t,e,r)=>{r.d(e,{DF:()=>f,FD:()=>s,Ov:()=>i,ct:()=>c});let n=1e-6;function s(){return n}const i=Math.random,u=Math.PI/180,o=180/Math.PI;function f(t){return t*u}function c(t){return t*o}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:i,equals:function(t,e){return Math.abs(t-e)<=n*Math.max(1,Math.abs(t),Math.abs(e))},getEpsilon:s,setEpsilon:function(t){n=t},toDegree:c,toRadian:f},Symbol.toStringTag,{value:"Module"}))},34727:(t,e,r)=>{r.d(e,{$8:()=>S,Cc:()=>u,Hx:()=>p,Io:()=>T,KJ:()=>c,OS:()=>w,Sp:()=>l,XM:()=>a,YN:()=>h,ZH:()=>y,b6:()=>g,cU:()=>s,gg:()=>d,hs:()=>o,kU:()=>f,or:()=>A,pF:()=>v,pq:()=>x,qE:()=>i});const n=new Float32Array(1);function s(t){--t;for(let e=1;e<32;e<<=1)t|=t>>e;return t+1}function i(t,e,r){return Math.min(Math.max(t,e),r)}function u(t,e,r){return t+(e-t)*r}function o(t,e,r,n,s){return u(n,s,(t-e)/(r-e))}function f(t){return t*Math.PI/180}function c(t){return 180*t/Math.PI}function a(t){return Math.acos(i(t,-1,1))}function h(t){return Math.asin(i(t,-1,1))}function l(t,e,r=1e-6){return t===e||!(!Number.isFinite(t)||!Number.isFinite(e))&&(t>e?t-e:e-t)<=r}function d(t,e,r=1e-6){return!l(t,e,r)&&t>e}function y(t,e,r=1e-6){return!l(t,e,r)&&t<e}function p(t,e,r=1e-6){return l(t,e,r)||t>e}const m=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function B(t){return m.setFloat64(0,t),m.getBigInt64(0)}const E=1000000n,M=b(1);function b(t){const e=B(t=Math.abs(t)),r=function(t){return m.setBigInt64(0,t),m.getFloat64(0)}(e<=E?E:e-E);return Math.abs(t-r)}function T(t,e,r=M){if(t===e)return!0;if(!Number.isFinite(t)||!Number.isFinite(e))return!1;if(null!=r&&b(Math.min(Math.abs(t),Math.abs(e)))<r)return Math.abs(t-e)<=r;const n=B(t),s=B(e);return n<0==s<0&&!((n<s?s-n:n-s)>E)}function g(t,e,r=1e-6){if(t===e)return!0;if(!Number.isFinite(t)||!Number.isFinite(e))return!1;const n=Math.abs(t-e),s=Math.abs(t),i=Math.abs(e);if(0===t||0===e||s<1e-12&&i<1e-12){if(n>.01*r)return!1}else if(n/(s+i)>r)return!1;return!0}function S(t){return _(Math.max(-x,Math.min(t,x)))}function _(t){return n[0]=t,n[0]}function A(t){const e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],r=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],n=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(l(e,1)&&l(r,1)&&l(n,1))}function w(t,e){return(t%e+e)%e}const x=_(34028234663852886e22);function v(t,e,r){if(void 0===r||0===+r)return Math[t](e);if(e=+e,r=+r,isNaN(e)||"number"!=typeof r||r%1!=0)return NaN;let n=e.toString().split("e");return n=(e=Math[t](+(n[0]+"e"+(n[1]?+n[1]-r:-r)))).toString().split("e"),+(n[0]+"e"+(n[1]?+n[1]+r:r))}},37585:(t,e,r)=>{r.d(e,{C:()=>s,Cc:()=>m,Io:()=>h,S8:()=>p,WQ:()=>u,aI:()=>b,e$:()=>E,hG:()=>l,hZ:()=>i,hs:()=>a,jb:()=>g,l0:()=>B,t2:()=>M});var n=r(34304);function s(t,e){return t[0]=e[0],t[1]=e[1],t}function i(t,e,r){return t[0]=e,t[1]=r,t}function u(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t}function o(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t}function f(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t}function c(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t}function a(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t}function h(t,e){const r=e[0]-t[0],n=e[1]-t[1];return Math.sqrt(r*r+n*n)}function l(t,e){const r=e[0]-t[0],n=e[1]-t[1];return r*r+n*n}function d(t){const e=t[0],r=t[1];return Math.sqrt(e*e+r*r)}function y(t){const e=t[0],r=t[1];return e*e+r*r}function p(t,e){const r=e[0],n=e[1];let s=r*r+n*n;return s>0&&(s=1/Math.sqrt(s),t[0]=e[0]*s,t[1]=e[1]*s),t}function m(t,e,r,n){const s=e[0],i=e[1];return t[0]=s+n*(r[0]-s),t[1]=i+n*(r[1]-i),t}function B(t,e,r){const n=e[0],s=e[1];return t[0]=r[0]*n+r[2]*s+r[4],t[1]=r[1]*n+r[3]*s+r[5],t}function E(t,e,r,n){const s=e[0]-r[0],i=e[1]-r[1],u=Math.sin(n),o=Math.cos(n);return t[0]=s*o-i*u+r[0],t[1]=s*u+i*o+r[1],t}function M(t,e){return t[0]===e[0]&&t[1]===e[1]}function b(t,e){const r=t[0],s=t[1],i=e[0],u=e[1],o=(0,n.FD)();return Math.abs(r-i)<=o*Math.max(1,Math.abs(r),Math.abs(i))&&Math.abs(s-u)<=o*Math.max(1,Math.abs(s),Math.abs(u))}const T=d,g=o,S=f,_=c,A=h,w=l,x=y;Object.freeze(Object.defineProperty({__proto__:null,add:u,angle:function(t,e){const r=t[0],n=t[1],s=e[0],i=e[1];let u=r*r+n*n;u>0&&(u=1/Math.sqrt(u));let o=s*s+i*i;o>0&&(o=1/Math.sqrt(o));const f=(r*s+n*i)*u*o;return f>1?0:f<-1?Math.PI:Math.acos(f)},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},copy:s,cross:function(t,e,r){const n=e[0]*r[1]-e[1]*r[0];return t[0]=t[1]=0,t[2]=n,t},dist:A,distance:h,div:_,divide:c,dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},equals:b,exactEquals:M,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},len:T,length:d,lerp:m,max:function(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t},min:function(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t},mul:S,multiply:f,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},normalize:p,projectAndScale:function(t,e,r,n,s){let i=e[0]-r[0],u=e[1]-r[1];const o=(n[0]*i+n[1]*u)*(s-1);return i=n[0]*o,u=n[1]*o,t[0]=e[0]+i,t[1]=e[1]+u,t},random:function(t,e=1){const r=2*(0,n.Ov)()*Math.PI;return t[0]=Math.cos(r)*e,t[1]=Math.sin(r)*e,t},rotate:E,round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},scale:a,scaleAndAdd:function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t},set:i,sqrDist:w,sqrLen:x,squaredDistance:l,squaredLength:y,str:function(t){return"vec2("+t[0]+", "+t[1]+")"},sub:g,subtract:o,transformMat2:function(t,e,r){const n=e[0],s=e[1];return t[0]=r[0]*n+r[2]*s,t[1]=r[1]*n+r[3]*s,t},transformMat2d:B,transformMat3:function(t,e,r){const n=e[0],s=e[1];return t[0]=r[0]*n+r[3]*s+r[6],t[1]=r[1]*n+r[4]*s+r[7],t},transformMat4:function(t,e,r){const n=e[0],s=e[1];return t[0]=r[0]*n+r[4]*s+r[12],t[1]=r[1]*n+r[5]*s+r[13],t}},Symbol.toStringTag,{value:"Module"}))},38954:(t,e,r)=>{r.d(e,{A:()=>a,B:()=>q,C:()=>h,D:()=>E,E:()=>F,F:()=>b,G:()=>P,H:()=>Y,a:()=>L,b:()=>i,c:()=>B,d:()=>u,e:()=>c,f:()=>A,g:()=>_,h:()=>o,i:()=>f,j:()=>m,l:()=>w,m:()=>V,n:()=>S,o:()=>g,p:()=>x,q:()=>T,r:()=>C,s:()=>M,t:()=>v,u:()=>l,v:()=>z,w:()=>D,x:()=>p,y:()=>y,z:()=>d});var n=r(51850),s=r(34304);function i(t){const e=t[0],r=t[1],n=t[2];return Math.sqrt(e*e+r*r+n*n)}function u(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function o(t,e,r,n){return t[0]=e,t[1]=r,t[2]=n,t}function f(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t}function c(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t}function a(t,e,r){return t[0]=e[0]*r[0],t[1]=e[1]*r[1],t[2]=e[2]*r[2],t}function h(t,e,r){return t[0]=e[0]/r[0],t[1]=e[1]/r[1],t[2]=e[2]/r[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 d(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function y(t,e,r){return t[0]=Math.min(e[0],r[0]),t[1]=Math.min(e[1],r[1]),t[2]=Math.min(e[2],r[2]),t}function p(t,e,r){return t[0]=Math.max(e[0],r[0]),t[1]=Math.max(e[1],r[1]),t[2]=Math.max(e[2],r[2]),t}function m(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t}function B(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t}function E(t,e){const r=e[0]-t[0],n=e[1]-t[1],s=e[2]-t[2];return Math.sqrt(r*r+n*n+s*s)}function M(t,e){const r=e[0]-t[0],n=e[1]-t[1],s=e[2]-t[2];return r*r+n*n+s*s}function b(t){const e=t[0],r=t[1],n=t[2];return e*e+r*r+n*n}function T(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function g(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function S(t,e){const r=e[0],n=e[1],s=e[2];let i=r*r+n*n+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 A(t,e,r){const n=e[0],s=e[1],i=e[2],u=r[0],o=r[1],f=r[2];return t[0]=s*f-i*o,t[1]=i*u-n*f,t[2]=n*o-s*u,t}function w(t,e,r,n){const s=e[0],i=e[1],u=e[2];return t[0]=s+n*(r[0]-s),t[1]=i+n*(r[1]-i),t[2]=u+n*(r[2]-u),t}function x(t,e,r){const n=e[0],s=e[1],i=e[2];return t[0]=r[0]*n+r[4]*s+r[8]*i+r[12],t[1]=r[1]*n+r[5]*s+r[9]*i+r[13],t[2]=r[2]*n+r[6]*s+r[10]*i+r[14],t}function v(t,e,r){const n=e[0],s=e[1],i=e[2];return t[0]=n*r[0]+s*r[3]+i*r[6],t[1]=n*r[1]+s*r[4]+i*r[7],t[2]=n*r[2]+s*r[5]+i*r[8],t}function C(t,e,r){const n=r[0],s=r[1],i=r[2],u=r[3],o=e[0],f=e[1],c=e[2],a=s*c-i*f,h=i*o-n*c,l=n*f-s*o,d=s*l-i*h,y=i*a-n*l,p=n*h-s*a,m=2*u;return t[0]=o+a*m+2*d,t[1]=f+h*m+2*y,t[2]=c+l*m+2*p,t}const N=(0,n.vt)(),I=(0,n.vt)();function V(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function P(t,e){if(t===e)return!0;const r=t[0],n=t[1],i=t[2],u=e[0],o=e[1],f=e[2],c=(0,s.FD)();return Math.abs(r-u)<=c*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(n-o)<=c*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-f)<=c*Math.max(1,Math.abs(i),Math.abs(f))}function F(t,e,r){const n=r[0]-e[0],s=r[1]-e[1],i=r[2]-e[2];let u=n*n+s*s+i*i;return u>0?(u=1/Math.sqrt(u),t[0]=n*u,t[1]=s*u,t[2]=i*u,t):(t[0]=0,t[1]=0,t[2]=0,t)}const L=c,O=a,U=h,Y=E,z=M,q=i,D=b;Object.freeze(Object.defineProperty({__proto__:null,abs:l,add:f,angle:function(t,e){S(N,t),S(I,e);const r=_(N,I);return r>1?0:r<-1?Math.PI:Math.acos(r)},bezier:function(t,e,r,n,s,i){const u=1-i,o=u*u,f=i*i,c=o*u,a=3*i*o,h=3*f*u,l=f*i;return t[0]=e[0]*c+r[0]*a+n[0]*h+s[0]*l,t[1]=e[1]*c+r[1]*a+n[1]*h+s[1]*l,t[2]=e[2]*c+r[2]*a+n[2]*h+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,r=1){return t[0]=Math.min(Math.max(t[0],e),r),t[1]=Math.min(Math.max(t[1],e),r),t[2]=Math.min(Math.max(t[2],e),r),t},copy:u,cross:A,crossAndNormalize:function(t,e,r){const n=e[0],s=e[1],i=e[2],u=r[0],o=r[1],f=r[2],c=s*f-i*o,a=i*u-n*f,h=n*o-s*u,l=Math.sqrt(c*c+a*a+h*h);return t[0]=c/l,t[1]=a/l,t[2]=h/l,t},direction:F,dist:Y,distance:E,div:U,divide:h,dot:_,equals:P,exactEquals:V,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,r,n,s,i){const u=i*i,o=u*(2*i-3)+1,f=u*(i-2)+i,c=u*(i-1),a=u*(3-2*i);return t[0]=e[0]*o+r[0]*f+n[0]*c+s[0]*a,t[1]=e[1]*o+r[1]*f+n[1]*c+s[1]*a,t[2]=e[2]*o+r[2]*f+n[2]*c+s[2]*a,t},inverse:g,len:q,length:i,lerp:w,max:p,min:y,mul:O,multiply:a,negate:T,normalize:S,random:function(t,e=1){const r=s.Ov,n=2*r()*Math.PI,i=2*r()-1,u=Math.sqrt(1-i*i)*e;return t[0]=Math.cos(n)*u,t[1]=Math.sin(n)*u,t[2]=i*e,t},rotateX:function(t,e,r,n){const s=[],i=[];return s[0]=e[0]-r[0],s[1]=e[1]-r[1],s[2]=e[2]-r[2],i[0]=s[0],i[1]=s[1]*Math.cos(n)-s[2]*Math.sin(n),i[2]=s[1]*Math.sin(n)+s[2]*Math.cos(n),t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t},rotateY:function(t,e,r,n){const s=[],i=[];return s[0]=e[0]-r[0],s[1]=e[1]-r[1],s[2]=e[2]-r[2],i[0]=s[2]*Math.sin(n)+s[0]*Math.cos(n),i[1]=s[1],i[2]=s[2]*Math.cos(n)-s[0]*Math.sin(n),t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[2],t},rotateZ:function(t,e,r,n){const s=[],i=[];return s[0]=e[0]-r[0],s[1]=e[1]-r[1],s[2]=e[2]-r[2],i[0]=s[0]*Math.cos(n)-s[1]*Math.sin(n),i[1]=s[0]*Math.sin(n)+s[1]*Math.cos(n),i[2]=s[2],t[0]=i[0]+r[0],t[1]=i[1]+r[1],t[2]=i[2]+r[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:m,scaleAndAdd:B,set:o,sign:d,sqrDist:z,sqrLen:D,squaredDistance:M,squaredLength:b,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:L,subtract:c,transformMat3:v,transformMat4:x,transformQuat:C},Symbol.toStringTag,{value:"Module"}))},48163:(t,e,r)=>{function n(){return[0,0]}function s(t){return[t[0],t[1]]}function i(t,e){return[t,e]}function u(){return i(1,1)}function o(){return i(1,0)}function f(){return i(0,1)}r.d(e,{Un:()=>c,fA:()=>i,o8:()=>s,vt:()=>n});const c=u(),a=o(),h=f();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:a,UNIT_Y:h,ZEROS:[0,0],clone:s,create:n,freeze:function(t,e){return[t,e]},fromArray:function(t,e=[0,0]){const r=Math.min(2,t.length);for(let n=0;n<r;++n)e[n]=t[n];return e},fromValues:i,ones:u,unitX:o,unitY:f,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},51850:(t,e,r)=>{function n(){return[0,0,0]}function s(t){return[t[0],t[1],t[2]]}function i(t,e,r){return[t,e,r]}function u(t,e,r){return[t,e,r]}function o(t,e=[0,0,0]){const r=Math.min(3,t.length);for(let n=0;n<r;++n)e[n]=t[n];return e}function f(){return i(1,1,1)}function c(){return i(1,0,0)}function a(){return i(0,1,0)}function h(){return i(0,0,1)}r.d(e,{CN:()=>u,Cb:()=>m,Cw:()=>y,JP:()=>p,Un:()=>d,ci:()=>o,fA:()=>i,o8:()=>s,uY:()=>l,vt:()=>n});const l=[0,0,0],d=f(),y=c(),p=a(),m=h();Object.freeze(Object.defineProperty({__proto__:null,ONES:d,UNIT_X:y,UNIT_Y:p,UNIT_Z:m,ZEROS:l,clone:s,create:n,freeze:u,fromArray:o,fromValues:i,ones:f,unitX:c,unitY:a,unitZ:h,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"}))},93406:(t,e,r)=>{r.d(e,{K:()=>f});var n=r(34727),s=r(15142),i=r(38954),u=r(51850);const o=-1;function f(t,e,r){const n=t.vertices.position,s=t.vertices.componentIndex,u=p.position0,f=p.position1,h=p.faceNormal0,d=p.faceNormal1,{edges:y,normals:m}=a(t),B=y.length/4,E=e.allocate(B);let M=0;const b=B,S=r?.allocate(b);let A=0,w=0,x=0;l.length=0;for(let t=0;t<B;++t){const e=4*t;n.getVec(y.data[e],u),n.getVec(y.data[e+1],f);const r=l.pushNew();r.index=4*t,r.length=(0,i.D)(u,f)}l.sort((t,e)=>e.length-t.length);const v=new Array,C=new Array;l.forAll(({length:t,index:a})=>{const l=y.data[a],B=y.data[a+1],b=y.data[a+2],N=y.data[a+3],I=N===o;if(n.getVec(l,u),n.getVec(B,f),I){const t=3*b;(0,i.h)(h,m.data[t],m.data[t+1],m.data[t+2]),(0,i.d)(d,h),p.componentIndex=s.get(l),p.cosAngle=(0,i.g)(h,d)}else{let t=3*b;if((0,i.h)(h,m.data[t],m.data[t+1],m.data[t+2]),t=3*N,(0,i.h)(d,m.data[t],m.data[t+1],m.data[t+2]),p.componentIndex=s.get(l),p.cosAngle=(0,i.g)(h,d),function(t,e){return t.cosAngle>e}(p,g))return;p.cosAngle<-.9999&&(0,i.d)(d,h)}w+=t,x++,I||function(t,e){return t.cosAngle<e}(p,_)?(e.write(E,M++,p),v.push(t)):c(p,T)&&(S&&r&&r.write(S,A++,p),C.push(t))});const N=new Float32Array(v.reverse()),I=new Float32Array(C.reverse()),V=S&&r?{instancesData:S.slice(0,A),lodInfo:{lengths:I}}:void 0;return{regular:{instancesData:E.slice(0,M),lodInfo:{lengths:N}},silhouette:V,averageEdgeLength:w/x}}function c(t,e){const r=(0,n.XM)(t.cosAngle);return(0,i.E)(B,t.position1,t.position0),r*((0,i.g)((0,i.f)(m,t.faceNormal0,t.faceNormal1),B)>0?-1:1)>e}function a(t){const e=t.faces.length/3,r=t.faces,n=t.neighbors,s=t.vertices.position;d.length=y.length=0;for(let t=0;t<e;t++){const e=3*t,u=n[e],f=n[e+1],c=n[e+2],a=r[e],h=r[e+1],l=r[e+2];s.getVec(a,E),s.getVec(h,M),s.getVec(l,b),(0,i.e)(M,M,E),(0,i.e)(b,b,E),(0,i.f)(E,M,b),(0,i.n)(E,E),y.pushArray(E),(u===o||a<h)&&(d.push(a),d.push(h),d.push(t),d.push(u)),(f===o||h<l)&&(d.push(h),d.push(l),d.push(t),d.push(f)),(c===o||l<a)&&(d.push(l),d.push(a),d.push(t),d.push(c))}return{edges:d,normals:y}}class h{constructor(){this.index=0,this.length=0}}const l=new s.A({allocator:t=>t||new h,deallocator:null}),d=new s.A({deallocator:null}),y=new s.A({deallocator:null}),p=new class{constructor(){this.position0=(0,u.vt)(),this.position1=(0,u.vt)(),this.faceNormal0=(0,u.vt)(),this.faceNormal1=(0,u.vt)(),this.componentIndex=0,this.cosAngle=0}},m=(0,u.vt)(),B=(0,u.vt)(),E=(0,u.vt)(),M=(0,u.vt)(),b=(0,u.vt)(),T=(0,n.kU)(4),g=Math.cos(T),S=(0,n.kU)(35),_=Math.cos(S)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8948],{6518:(e,t,n)=>{n.d(t,{F:()=>a});var i=n(44208),r=n(75503),s=n(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new r.wq(9,(0,i.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach((n,i)=>{e[t++]=i}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,s.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,n){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,n)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},8460:(e,t,n)=>{n.d(t,{$C:()=>y,Hh:()=>o,Tu:()=>c,Wg:()=>h,Xq:()=>g,i6:()=>f,pM:()=>u,vJ:()=>m});var i=n(2741);let r,s=null;function o(){return r||(r=n.e(3666).then(n.bind(n,3666)).then(e=>e.l).then(({default:e})=>e({locateFile:e=>(0,i.s)(`esri/libs/linkchartlayout/${e}`)})).then(e=>{!function(e){s=e}(e)}),r)}const a={right:0,left:1,top:2,bottom:3},l={none:0,"start-only":1,"start-and-end":2};function p(e){const t={timeDirection:"right",timeBannerUTCOffsetInMinutes:0,eventsTicksVisualization:"start-and-end",showDurationLineForNonZeroDurationEntityEvents:!0,durationLineWidth:5,entityPositionAtDurationRatio:1,showNonZeroDurationIntervalBounds:!1,separateTimeOverlaps:!0,separateTimelineOverlaps:!0,moveFirstBends:!0,secondBendRatio:.3,lineSeparationMultiplier:1,spaceSeparatedLinesEvenly:!1,useBezierCurves:!1,separatedLineShapeRatio:0,...e?.toJSON(),eventsTicksVisualization:e?.eventsTicksVisualization??"start-and-end"};return{...t,timeDirection:{value:a[t.timeDirection]??a.right},eventsTicksVisualization:{value:l[t.eventsTicksVisualization]??l["start-and-end"]}}}function d(e,t,n,i,r,o){const a=n.length,l=r.length,p=Float64Array.BYTES_PER_ELEMENT,d=Uint32Array.BYTES_PER_ELEMENT,u=Uint8Array.BYTES_PER_ELEMENT,c=16+a*(u+2*p)+l*(2*d),h=s._malloc(c);try{const u=h+16-h%16,c=u+a*p,y=c+a*p,m=y+l*d,g=m+l*d,f=()=>[s.HEAPF64.subarray(u>>3,(u>>3)+a),s.HEAPF64.subarray(c>>3,(c>>3)+a),s.HEAPU32.subarray(y>>2,(y>>2)+l),s.HEAPU32.subarray(m>>2,(m>>2)+l),s.HEAPU8.subarray(g,g+a)],[b,w,_,M,I]=f();b.set(n),w.set(i),_.set(r),M.set(o),I.set(t);const T=e(a,g,u,c,l,y,m);let C=null,v=null;if(0===T.value){const e=s.getLayoutLinksTypes(),t=s.getLayoutLinksVerticesEndIndices(),n=s.getLayoutLinksVertices(),i=s.countLayoutLinksVertices();!l||e&&t?i&&!n?T.value=1:(C={types:new Uint8Array(s.HEAPU8.subarray(e,e+l)),vertexEndIndex:new Uint32Array(s.HEAPU32.subarray(t>>2,(t>>2)+l)),vertices:new Float64Array(s.HEAPF64.subarray(n>>3,(n>>3)+2*i))},v=s.getAuxiliaryGraphicElements()):T.value=1}const[A,x,E,S,k]=f();return n.set(A),i.set(x),r.set(E),o.set(S),t.set(k),{status:T.value,links:C,graphics:v}}finally{s._free(h),s.cleanupLayout()}}var u,c,h,y,m,g,f,b;(b=u||(u={})).getMinIdealEdgeLength=function(){return s.getMinIdealEdgeLength()},b.apply=function(e,t,n,i,r,o,a=2,l=1,p=-1){return d((t,n,i,r,o,d,u)=>s.applyForceDirectedLayout(e,t,n,i,r,o,d,u,a,l,p),t,n,i,r,o)},function(e){e.apply=function(e,t,n,i,r,o,a=2,l=1,p=-1){return d((t,n,i,r,o,d,u)=>s.applyCommunityLayout(e,t,n,i,r,o,d,u,a,l,p),t,n,i,r,o)}}(c||(c={})),function(e){e.apply=function(e,t,n,i,r,o){return d((t,n,i,r,o,a,l)=>s.applySimpleLayout(e,t,n,i,r,o,a,l),t,n,i,r,o)}}(h||(h={})),function(e){e.apply=function(e,t,n,i,r,o){return d((t,n,i,r,o,a,l)=>s.applyHierarchicalLayout(e,t,n,i,r,o,a,l),t,n,i,r,o)}}(y||(y={})),function(e){e.apply=function(e,t,n,i,r,o){return d((t,n,i,r,o,a,l)=>s.applyRadialTreeLayout(e,t,n,i,r,o,a,l),t,n,i,r,o)}}(m||(m={})),function(e){e.apply=function(e,t,n,i,r,o){return d((t,n,i,r,o,a,l)=>s.applySmartTreeLayout(e,t,n,i,r,o,a,l),t,n,i,r,o)}}(g||(g={})),function(e){e.apply=function(e,t,n,i,r,o,a,l,u,c,h,y){return d((t,n,i,a,l,d,m)=>{if(r.length!==t)return{value:1};if(o.length!==t)return{value:1};if(u.length!==l)return{value:1};if(c.length!==l)return{value:1};const g=Float64Array.BYTES_PER_ELEMENT,f=16,b=s._malloc(f+t*g),w=s._malloc(f+t*g),_=s._malloc(f+l*g),M=s._malloc(f+l*g),I=b+f-b%f,T=w+f-w%f,C=_+f-_%f,v=M+f-M%f;try{return s.HEAPF64.subarray(I>>3,(I>>3)+t).set(r),s.HEAPF64.subarray(T>>3,(T>>3)+t).set(o),s.HEAPF64.subarray(C>>3,(C>>3)+l).set(u),s.HEAPF64.subarray(v>>3,(v>>3)+l).set(c),s.applyChronologicalLayout(e,t,n,i,a,I,T,l,d,m,C,v,h,p(y))}finally{s._free(b),s._free(w),s._free(_),s._free(M)}},t,n,i,a,l)}}(f||(f={}))},15375:(e,t,n)=>{n.d(t,{BL:()=>l,Cz:()=>r,KQ:()=>s,M1:()=>a,T1:()=>o,dr:()=>i});const i="ESRI__ID",r="ESRI__OriginID",s="ESRI__DestID",o="ESRI__LayoutGeometry",a="ESRI__AggregationCount",l="LC.ESRI__IsSpatial"},23150:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(31635),r=n(91429),s=n(82799),o=n(54238);let a=class extends o.A{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,i.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],a.prototype,"originId",void 0),(0,i.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],a.prototype,"destinationId",void 0),(0,i.Cg)([(0,r.MZ)({type:s.A,json:{write:!0}})],a.prototype,"layoutGeometry",void 0),a=(0,i.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.Relationship")],a)},24137:(e,t,n)=>{n.d(t,{P:()=>I});var i=n(31635),r=n(69622),s=n(49186),o=n(53966),a=n(91869),l=n(74887),p=n(39516),d=n(91429),u=n(5443),c=n(39829),h=n(91218),y=n(21325),m=n(15375);const g=(e,t)=>{if("column-reference"===e.type)return e.column===t.systemOidFieldName?"ID(n)":`n.${e.column}`;if("string"===e.type)return`'${e.value}'`;if("number"===e.type)return`${e.value}`;if("binary-expression"===e.type&&t.supportedSqlTypes.has(e.left.type)&&t.supportedSqlTypes.has(e.right.type)&&t.supportedSqlOperators.has(e.operator))return`${g(e.left,t)} ${e.operator} ${g(e.right,t)}`;if("binary-expression"===e.type&&"LIKE"===e.operator){let n="";if("function"===e.left.type&&"column-reference"===e.left.args.value[0].type)n+=`lower(n.${e.left.args.value[0].column})`;else{if("column-reference"!==e.left.type)return t.unsupportedOperationFound=!0,"";n+=`lower(n.${e.left.column})`}if(n+=" CONTAINS (","string"!==e.right.type)return t.unsupportedOperationFound=!0,"";{let t=e.right.value;t.startsWith("%")&&(t=t.slice(1)),t.endsWith("%")&&(t=t.slice(0,-1)),n+=`'${t.toLowerCase()}')`}return n}return t.unsupportedOperationFound=!0,""};var f=n(69860),b=n(30504),w=n(48441),_=n(42538),M=n(61956);let I=class extends r.A{constructor(e){super(e),this._processingCacheUpdatesLookup=new Map,this.knowledgeGraph=null,this.inclusionModeDefinition={generateAllSublayers:!0,namedTypeDefinitions:new Map},this.entityTypeNames=new Set,this.relationshipTypeNames=new Set,this.geographicLookup=new Map,this.sublayerCaches=new Map,this.nodeConnectionsLookup=new Map,this.relationshipConnectionsLookup=new Map,this.memberIdTypeLookup=new Map;const t=new Map;e.knowledgeGraph.dataModel.entityTypes?.forEach(n=>{n.name&&(t.set(n.name,"entity"),this._processingCacheUpdatesLookup.set(n.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.entityTypeNames.add(n.name),n.properties?.forEach(e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(n.name,{name:e.name??"",geometryType:e.geometryType})}))}),e.knowledgeGraph.dataModel.relationshipTypes?.forEach(n=>{n.name&&(t.set(n.name,"relationship"),this._processingCacheUpdatesLookup.set(n.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.relationshipTypeNames.add(n.name),n.properties?.forEach(e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(n.name,{name:e.name??"",geometryType:e.geometryType})}))}),e.inclusionModeDefinition?.namedTypeDefinitions.forEach((n,i)=>{if("entity"===t.get(i))this.entityTypeNames.add(i);else{if("relationship"!==t.get(i))return o.A.getLogger(this).warn(`A named type, ${i}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(i);this.relationshipTypeNames.add(i)}const r=new Map;n.members?.forEach(e=>{(0,a.tE)(this.memberIdTypeLookup,e.id,()=>new Set).add(i)}),this.sublayerCaches.set(i,r)})}addToLayer(e){e.forEach(({typeName:e,id:t})=>{if(!this.inclusionModeDefinition)throw new s.A("knowledge-graph:layer-data-manager","You cannot add to a layer's exclusion list if it was not created with an exclusion list originally");if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){const n=this.inclusionModeDefinition.namedTypeDefinitions.get(e);n.members||(n.members=new Map),n.members.set(t,{id:t}),(0,a.tE)(this.memberIdTypeLookup,t,()=>new Set).add(e)}}else{const n=new Map;n.set(t,{id:t}),this.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:n}),(0,a.tE)(this.memberIdTypeLookup,t,()=>new Set).add(e)}})}getById(e){return f.A.getInstance().readFromStoreById(e)}async getData(e,t,n){if(t.objectType.name&&this.inclusionModeDefinition?.namedTypeDefinitions&&this.inclusionModeDefinition.namedTypeDefinitions.size>0&&!this.inclusionModeDefinition.namedTypeDefinitions.has(t.objectType.name))return[];let i;if(i=e||new M.A({where:"1=1",outFields:["*"]}),"link-chart"===t.parentCompositeLayer.type){const e=t.parentCompositeLayer,n=this._processingCacheUpdatesLookup.get(t.objectType.name??""),r=i.outFields;r&&1===r.length&&r[0]===m.dr&&"1=1"===i.where||await Promise.all(n??[]);const s=this.sublayerCaches.has(t.objectType.name??"")?Array.from(this.sublayerCaches.get(t.objectType.name)?.values()):[],o=[];return s.forEach(n=>{if(this.relationshipTypeNames.has(t.objectType.name)){n.geometry=e.relationshipLinkChartDiagramLookup.get(n.attributes[t.objectIdField]);const i=this.memberIdTypeLookup.get(n.attributes[m.Cz]),r=this.memberIdTypeLookup.get(n.attributes[m.KQ]),s=this._isEndEntitySpatial(i,n,m.Cz),o=this._isEndEntitySpatial(r,n,m.KQ);n.attributes[m.BL]=Number(s&&o)}else{n.geometry=e.entityLinkChartDiagramLookup.get(n.attributes[t.objectIdField]);const i=this.geographicLookup.get(t.objectType.name);i&&n.attributes[i.name]?n.attributes[m.BL]=1:n.attributes[m.BL]=0}n.attributes[m.T1]=n.geometry,o.push(n)}),o}return this.retrieveDataFromService(i,t,n)}async getConnectedRecordIds(e,t,n){const i=[];let r="";const s=this._getNamedTypeIdMapFromNodeIds(e);if(t&&0!==t?.length){for(const e of t)r=r+e+"|";r=r.slice(0,-1)}const o={},a=[];for(const[e,n]of s){const i=`${e}_ids`;o[i]=n,t&&0!==t?.length?a.push(`MATCH (n:${e}) WHERE id(n) IN $${i} WITH n MATCH (n)-[r:${r}]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`):a.push(`MATCH (n:${e}) WHERE id(n) IN $${i} WITH n MATCH (n)-[r]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`)}if(!a.length)return i;const l=a.join(" UNION "),p=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new _.A({openCypherQuery:l,bindParameters:o}),{signal:n?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await p.read();if(e)break;for(let e=0;e<t.length;e++){const n=t[e];i.push({id:n[0],typeName:n[1]}),i.push({id:n[2],typeName:n[3]})}}return i}async getRelationshipsBetweenNodes(e,t,n){const i=this._getNamedTypeIdMapFromNodeIds(e);if(0===i.size)return[];const r={relationshipExclusionIds:t,possibleConnectionEntityIds:e},s=[];for(const[e,t]of i.entries()){const n=`${e}_ids`;r[n]=t,s.push(`MATCH (n:${e}) WHERE id(n) IN $${n} WITH n MATCH (n)-[r]->(m) WHERE id(m) IN $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds RETURN id(r), type(r)`)}const o=s.join(" UNION "),a=[],l=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new _.A({openCypherQuery:o,bindParameters:r}),{signal:n?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await l.read();if(e)break;for(let e=0;e<t.length;e++){const n=t[e];a.push({id:n[0],typeName:n[1]})}}return a}async getRelationshipsFromNodes(e,t,n,i){const r=this._getNamedTypeIdMapFromNodeIds(e);if(0===r.size||0===t.length)return[];const s={relationshipExclusionIds:n,possibleConnectionEntityIds:t},o=[];for(const[e,t]of r.entries()){const n=`${e}_ids`;s[n]=t,o.push(`MATCH (n:${e}) WHERE id(n) IN $${n} WITH n MATCH (n)-[r]-(m) WHERE id(m) IN $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds RETURN id(r), type(r)`)}const a=o.join(" UNION "),l=new Map,p=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new _.A({openCypherQuery:a,bindParameters:s}),{signal:i?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await p.read();if(e)break;for(let e=0;e<t.length;e++){const n=t[e];let i=l.get(n[1]);i||(i=new Set,l.set(n[1],i)),i.add(n[0])}}const d=[];for(const[e,t]of l)for(const n of t)d.push({id:n,typeName:e});return d}async refreshCacheContent(e,t,n,i=!0,r){const o=f.A.getInstance(),p=[],d=new Map,u=new Map;this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&u.set(e.name,e)}),this.knowledgeGraph.dataModel.relationshipTypes?.forEach(e=>{e.name&&u.set(e.name,e)}),e||this.inclusionModeDefinition?e?e.forEach(e=>{if(this.memberIdTypeLookup.has(e))for(const t of this.memberIdTypeLookup.get(e))d.has(t)?d.get(t)?.push(e):d.set(t,[e])}):this.inclusionModeDefinition?.namedTypeDefinitions?.forEach((e,t)=>{e.useAllData?d.set(t,null):e.members&&e.members.forEach(e=>{d.has(t)&&null!==d.get(t)?d.get(t)?.push(e.id):d.set(t,[e.id])})}):(this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&d.set(e.name,null)}),this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&d.set(e.name,null)}));for(const[e,l]of d){const d=new Set(l),c=new Promise((p,c)=>{(async()=>{const p=new Set,c=[];let h,y="",g=!1;if(t||u.get(e)?.properties?.forEach(e=>{e.name&&p.add(e.name)}),n&&this.geographicLookup.has(e)){const t=this.geographicLookup.get(e)?.name;t&&p.add(t)}if(this.entityTypeNames.has(e))y=`MATCH (n:${e}) ${l?"WHERE id(n) IN $ids ":""}return ID(n)`,p.forEach(e=>{y+=`, n.${e}`,c.push(e)});else{if(!this.relationshipTypeNames.has(e))throw new s.A("knowledge-graph:layer-data-manager",`The graph type of ${e} could not be determined. Was this type set in the KG data model and inclusion definition?`);g=!0,y=`MATCH ()-[n:${e}]->() ${l?"WHERE id(n) IN $ids ":""}return ID(n), id(startNode(n)), id(endNode(n))`,p.forEach(e=>{y+=`, n.${e}`,c.push(e)})}h=new _.A(l?{openCypherQuery:y,bindParameters:{ids:l}}:{openCypherQuery:y});const f=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,h,{signal:r?.signal})).resultRowsStream.getReader();for(;;){const{done:t,value:n}=await f.read();if(t)break;const r=[];for(let e=0;e<n.length;e++){const t=n[e];let i=0,s=0;const o={properties:{}};for(o.id=t[i],i++,s++,g&&(o.originId=t[i],i++,s++,o.destinationId=t[i],i++,s++,(0,a.tE)(this.nodeConnectionsLookup,o.originId,()=>new Set).add(o.id),(0,a.tE)(this.nodeConnectionsLookup,o.destinationId,()=>new Set).add(o.id),(0,a.tE)(this.relationshipConnectionsLookup,o.id,()=>[o.originId,o.destinationId]));i<t.length;i++)o.properties[c[i-s]]=t[i];d.delete(o.id),r.push(o)}const s=o.writeToStore(r,m.dr,this.geographicLookup.get(e)?.name);this.sublayerCaches.has(e)||this.sublayerCaches.set(e,new Map),i&&!this.inclusionModeDefinition?.namedTypeDefinitions.has(e)&&this.inclusionModeDefinition?.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),i&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members&&(this.inclusionModeDefinition.namedTypeDefinitions.get(e).members=new Map);const l=this.sublayerCaches.get(e);s.forEach(t=>{l?.set(t.attributes[m.dr],t),i&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.has(t.attributes[m.dr])&&(this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.set(t.attributes[m.dr],{id:t.attributes[m.dr]}),(0,a.tE)(this.memberIdTypeLookup,t.attributes[m.dr],()=>new Set).add(e))})}const b=this.inclusionModeDefinition?.namedTypeDefinitions.get(e);if(b)for(const e of d)b.members?.delete(e)})().then(()=>{p(null)}).catch(e=>{"AbortError"===e.name?p(null):c(e)})});p.push(c),this._processingCacheUpdatesLookup.get(e)?.push(c)}if(await Promise.all(p),r?.signal?.aborted)throw(0,l.NK)()}removeFromLayer(e){const t=new Set,n=new Set(e.map(e=>e.id));for(const n of e)t.add(n.typeName),1===this.memberIdTypeLookup.get(n.id)?.size?this.memberIdTypeLookup.delete(n.id):this.memberIdTypeLookup.get(n.id)?.delete(n.typeName),this.inclusionModeDefinition?.namedTypeDefinitions.forEach((e,t)=>{t===n.typeName&&e.members?.has(n.id)&&e.members.delete(n.id)});t.forEach(e=>{this.sublayerCaches.get(e)?.forEach((t,i)=>{n.has(i)&&this.sublayerCaches.get(e)?.delete(i)})})}async retrieveDataFromService(e,t,n){const i=f.A.getInstance(),r=new Set,o=[];let a,l="",d=[];const M="relationship"===t.graphType,I=this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData,T=t.parentCompositeLayer.sublayerIdsCache.get(t.objectType.name);let C=!I&&T?Array.from(T).sort():null;if(this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData)this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData&&null!=e.objectIds&&(C=e.objectIds);else if(null!=e.objectIds&&C&&C.length>0){const t=e.objectIds;e.objectIds=C.filter(e=>t.includes(e))}else if(null!=e.objectIds)C=e.objectIds;else{if(this.inclusionModeDefinition?.namedTypeDefinitions.has(t.objectType.name)&&(!this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members||this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members?.size<1))return e.objectIds=[],[];e.objectIds=C}if(null!=e.outFields){const n=e.outFields;n.includes("*")?t.fields.forEach(e=>{r.add(e.name)}):n.forEach(e=>{e!==m.dr&&e!==t.geometryFieldName&&r.add(e)})}if(null!=e.geometry){const n=e.geometry;let i;const d=t.parentCompositeLayer.dataManager.knowledgeGraph.serviceDefinition,m=d?.spatialReference,g=d?.serviceCapabilities?.geometryCapabilities;let f=g?.geometryMaxBoundingRectangleSizeX,w=g?.geometryMaxBoundingRectangleSizeY;if("point"===n.type){let e=n;e.spatialReference?.isWGS84||(await(0,h.initializeProjection)(e.spatialReference,y.KK),e=(0,h.project)(e,y.KK)),i=new u.A({spatialReference:y.KK,xmin:e.x-1e-4,ymin:e.y-1e-4,xmax:e.x+1e-4,ymax:e.y+1e-4})}else n?.extent?.spatialReference&&!n.spatialReference?.isWGS84?(await(0,h.initializeProjection)(n.extent.spatialReference,y.KK),i=(0,h.project)(n.extent,y.KK)):i=n.extent;if(f&&w&&m){if(4326!==m.wkid){const e=new u.A({spatialReference:m,xmax:f,ymax:w}),t=(0,h.project)(e,y.KK);f=t.xmax,w=t.ymax}if(i.xmax-i.xmin>f)throw new s.A("knowledge-graph:layer-data-manager",`Extent x bounds should be within ${f}° latitude, limit exceeded`);if(i.ymax-i.ymin>w)throw new s.A("knowledge-graph:layer-data-manager",`Extent y bounds should be within ${w}° longitude, limit exceeded`)}if(null!=e.where&&"1=1"!==e.where){const n=await(0,p.GP)(e.where.toUpperCase(),t.fieldsIndex);t.fields.forEach(e=>{n.fieldNames.includes(e.name)&&r.add(e.name)})}l=M?`Match ()-[n:${t.objectType.name}]->() WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n), id(startNode(r)), id(endNode(r))`:`Match (n:${t.objectType.name}) WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n)`,t.geometryFieldName&&r.add(t.geometryFieldName),r.forEach(e=>{l+=`, n.${e}`,o.push(e)}),a=new _.A({openCypherQuery:l,bindParameters:{param_filter_geom:new c.A({rings:(0,b.Wq)(i)})}})}else{let n="";if(null!=e.where&&"1=1"!==e.where){const i=await(0,p.GP)(e.where,t.fieldsIndex);t.fields.forEach(e=>{i.fieldNames.includes(e.name)&&r.add(e.name)});const s={systemOidFieldName:m.dr,supportedSqlTypes:new Set(["column-reference","string","number","binary-expression"]),supportedSqlOperators:new Set(["=","<","<=","<>",">",">=","AND","OR","LIKE"]),unsupportedOperationFound:!1};n=g(i.parseTree,s),s.unsupportedOperationFound&&(n="")}let i="";i=M?`Match ()-[n:${t.objectType.name}]->()`:`Match (n:${t.objectType.name})`;let s=!1;C&&(s=!0,i+=" WHERE ID(n) IN $ids"),n&&(i+=s?" AND":" WHERE",i+=` ${n}`),i+=" return ID(n)",M&&(i+=", id(startNode(n)), id(endNode(n))"),e.returnGeometry&&t.geometryFieldName&&r.add(t.geometryFieldName),r.forEach(e=>{i+=`, n.${e}`,o.push(e)}),a=new _.A(C?{openCypherQuery:i,bindParameters:{ids:C}}:{openCypherQuery:i})}const v=(await(0,w.executeQueryStreaming)(t.parentCompositeLayer.dataManager.knowledgeGraph,a,n)).resultRowsStream.getReader();for(;;){const{done:e,value:n}=await v.read();if(e)break;const r=[];for(let e=0;e<n.length;e++){const t=n[e];let i=0,s=0;const a={properties:{}};for(a.id=t[i],i++,s++,M&&(a.originId=t[i],i++,s++,a.destinationId=t[i],i++,s++);i<t.length;i++)a.properties[o[i-s]]=t[i];r.push(a)}d=d.concat(i.writeToStore(r,m.dr,t.parentCompositeLayer.dataManager.geographicLookup.get(t.objectType.name)?.name))}return d}_isEndEntitySpatial(e,t,n){for(const i of e??[])if(this.entityTypeNames.has(i)){const e=this.geographicLookup.get(i),r=e&&this.sublayerCaches.get(i)?.get(t.attributes[n]);if(e&&r?.attributes[e.name])return!0}return!1}_getNamedTypeIdMapFromNodeIds(e){const t=new Map;return e.forEach(e=>{if(this.memberIdTypeLookup.has(e))for(const n of this.memberIdTypeLookup.get(e)){if(!this.entityTypeNames.has(n))return;t.has(n)?t.get(n)?.push(e):t.set(n,[e])}}),t}};(0,i.Cg)([(0,d.MZ)()],I.prototype,"knowledgeGraph",void 0),(0,i.Cg)([(0,d.MZ)()],I.prototype,"inclusionModeDefinition",void 0),(0,i.Cg)([(0,d.MZ)()],I.prototype,"entityTypeNames",void 0),(0,i.Cg)([(0,d.MZ)()],I.prototype,"relationshipTypeNames",void 0),(0,i.Cg)([(0,d.MZ)()],I.prototype,"geographicLookup",void 0),(0,i.Cg)([(0,d.MZ)()],I.prototype,"sublayerCaches",void 0),(0,i.Cg)([(0,d.MZ)()],I.prototype,"nodeConnectionsLookup",void 0),(0,i.Cg)([(0,d.MZ)()],I.prototype,"relationshipConnectionsLookup",void 0),(0,i.Cg)([(0,d.MZ)()],I.prototype,"memberIdTypeLookup",void 0),I=(0,i.Cg)([(0,d.$K)("esri.layers.knowledgeGraph.KnowledgeGraphLayerDataManager")],I)},25927:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(31635),r=n(91429),s=n(86738),o=n(54238);let a=class extends o.A{constructor(e){super(e),this.layoutGeometry=null}};(0,i.Cg)([(0,r.MZ)({type:s.A,json:{write:!0}})],a.prototype,"layoutGeometry",void 0),a=(0,i.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.Entity")],a)},30504:(e,t,n)=>{n.d(t,{k5:()=>p,aq:()=>l,Wq:()=>d}),n(52106);var i=n(49186),r=(n(86738),n(39829),n(82799),n(94194),n(69860),n(8460),n(66552));(0,r.O)()({none:"none",startAndEnd:"start-and-end",startOnly:"start-only"}),(0,r.O)()({absoluteValue:"absolute-value",multiplier:"multiplier"});const s=new Map([["basic-grid","basic-grid"],["geographic-organic-standard","geographic-organic-standard"],["hierarchical-bottom-to-top","hierarchical-bottom-to-top"],["hierarchical-top-to-bottom","hierarchical-bottom-to-top"],["organic-community","organic-community"],["organic-fusiform","organic-standard"],["organic-leaf-circle","organic-standard"],["organic-standard","organic-standard"],["radial-node-centric","radial-root-centric"],["radial-root-centric","radial-root-centric"],["tree-bottom-to-top","tree-left-to-right"],["tree-left-to-right","tree-left-to-right"],["tree-right-to-left","tree-left-to-right"],["tree-top-to-bottom","tree-left-to-right"],["chronological-mono-timeline","chronological-mono-timeline"],["chronological-multi-timeline","chronological-multi-timeline"]]);var o=n(48441),a=n(42538);async function l(e,t,n){const i=[],r=function(e,t){const n=new Map;if(t.dataModel?.relationshipTypes)for(const e of t.dataModel.relationshipTypes)e.name&&n.set(e.name,[]);for(const t of e)n.has(t.typeName)&&n.get(t.typeName)?.push(t.id);return n}(e,t),s={},l=[];for(const[e,t]of r){if(t.length<1)continue;const n=`${e}_ids`;s[n]=t,l.push(`MATCH (n)-[r:${e}]->(m) WHERE id(r) in $${n} RETURN id(n), labels(n)[0], id(m), labels(m)[0]`)}if(0===l.length)return[];const p=l.join(" UNION "),d=new a.A({openCypherQuery:p,bindParameters:s}),u=(await(0,o.executeQueryStreaming)(t,d,n?.requestOptions)).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await u.read();if(e)break;for(const e of t)i.push({id:e[0],typeName:e[1]}),i.push({id:e[2],typeName:e[3]})}return i}n(40863),n(94985),n(68249);const p=e=>s.get(e)??"radial-root-centric";function d(e){if(!e.spatialReference.isWGS84)throw new i.A("knowledge-graph:layer-support-utils","The utilsExtentToInBoundsRings function only supports WGS84 spatial references.");return e.clone().normalize().map(e=>[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]])}},37531:(e,t,n)=>{n.d(t,{dt:()=>c,GG:()=>f,UQ:()=>g,Sx:()=>d});var i=n(68197),r=n(60999),s=(n(44208),n(51850)),o=(n(76369),n(62046)),a=(n(2741),n(11254),n(66344));new Map([["dash",[4,3]],["dashdot",[4,3,1,3]],["dot",[1,3]],["longdash",[8,3]],["longdashdot",[8,3,1,3]],["longdashdotdot",[8,3,1,3,1,3]],["shortdash",[4,1]],["shortdashdot",[4,1,1,1]],["shortdashdotdot",[4,1,1,1,1,1]],["shortdot",[1,1]],["solid",[]]]),new a.q(1e3),new i.A([128,128,128]);var l=n(28975),p=n(33910);function d(e,t){if(!e)return null;let n=null;return(0,p.wk)(e)?n=function(e){const t=e.symbolLayers;if(!t)return null;let n=null;return t.forEach(e=>{"object"===e.type&&e.resource?.href||(n="water"===e.type?e.color:e.material?e.material.color:null)}),n?new i.A(n):null}(e):(0,p.$y)(e)&&(n="cim"===e.type?(0,o.Nk)(e):e.color?new i.A(e.color):null),n?u(n,t):null}function u(e,t){if(null==t||null==e)return e;const n=e.toRgba();return n[3]=n[3]*t,new i.A(n)}function c(e,t,n){e&&(t||null!=n)&&(t&&(t=new i.A(t)),(0,p.wk)(e)?function(e,t,n){const r=e.symbolLayers;if(!r)return;const s=(e,r=!1)=>{let s=t??e??null;return null!=n?.override&&(!s&&r&&(s=new i.A([255,255,255])),s&&(s.a=n.override)),u(s,n?.add)};r.forEach(e=>{if("water"===e.type)return void(e.color=u(e.color,n?.add));const t=null!=e.material?e.material.color:null,i=s(t,"icon"===e.type&&null!=e.resource?.href);null==e.material?e.material=new l.N({color:i}):e.material.color=i,"outline"in e&&e.outline?.color&&null!=n?.add&&(e.outline.color=u(e.outline.color,n.add)),"marker"in e&&null!=e.marker&&(e.marker.color=s(e.marker.color))})}(e,t,n):(0,p.$y)(e)&&function(e,t,n){t=t??e.color,null!=n?.override&&t&&(t.a=n.override),t&&(e.color=u(t,n?.add)),"outline"in e&&e.outline?.color&&(e.outline.color=u(e.outline.color,n?.add))}(e,t,n))}function h(e){for(const t of e)if("number"==typeof t)return t;return null}function y(e,t,n){for(let i=0;i<3;i++){const r=e[i];switch(r){case"symbol-value":{const e=n[i];return null!=e?e/t[i]:1}case"proportional":break;default:if(r&&t[i])return r/t[i]}}return null}function m(e,t,n,i){switch(e){case"proportional":return n*i;case"symbol-value":return null!=t?t:n;default:return e}}async function g(e,t){if(e&&t)return(0,p.wk)(e)?async function(e,t){const i=e.symbolLayers;i&&await(0,r.jJ)(i,async e=>async function(e,t){switch(e.type){case"extrude":!function(e,t){const n=t[2];"number"==typeof n&&(e.size=n)}(e,t);break;case"icon":case"line":case"text":!function(e,t){const n=h(t);null!=n&&(e.size=n)}(e,t);break;case"path":!function(e,t){const n=y(t,s.Un,[e.width,void 0,e.height]);null!=n&&(e.width=m(t[0],e.width,1,n),e.height=m(t[2],e.height,1,n))}(e,t);break;case"object":await async function(e,t){const{resourceSize:i,symbolSize:r}=await async function(e){const{computeObjectLayerResourceSize:t}=await n.e(5404).then(n.bind(n,95404)),i=await t(e,10),{width:r,height:s,depth:o}=e,a=[r,o,s];let l=1;for(let e=0;e<3;e++){const t=a[e];if(null!=t){l=t/i[e];break}}for(let e=0;e<3;e++)null==a[e]&&(a[e]=i[e]*l);return{resourceSize:i,symbolSize:a}}(e),s=y(t,i,r);null!=s&&(e.width=m(t[0],r[0],i[0],s),e.depth=m(t[1],r[1],i[1],s),e.height=m(t[2],r[2],i[2],s))}(e,t)}}(e,t))}(e,t):void((0,p.$y)(e)&&function(e,t){const n=h(t);if(null!=n)switch(e.type){case"simple-marker":e.size=n;break;case"picture-marker":{const t=e.width/e.height;t>1?(e.width=n,e.height=n*t):(e.width=n*t,e.height=n);break}case"simple-line":e.width=n;break;case"text":e.font.size=n}}(e,t))}function f(e,t,n){if(e&&null!=t)if((0,p.wk)(e)){const i=e.symbolLayers;i&&i.forEach(e=>{if("object"===e.type)switch(n){case"tilt":e.tilt=(e.tilt??0)+t;break;case"roll":e.roll=(e.roll??0)+t;break;default:e.heading=(e.heading??0)+t}"icon"===e.type&&(e.angle+=t)})}else if((0,p.$y)(e))switch(e.type){case"simple-marker":case"picture-marker":case"text":e.angle+=t;break;case"cim":(0,o.KU)(e,t,!0)}}},37730:(e,t,n)=>{n.d(t,{T:()=>r});var i=n(43334);const r={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new i.Om(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)}},40662:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(31635),r=n(91429),s=n(77901);let o=class extends s.A{constructor(e){super(e)}};o=(0,i.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.ObjectValue")],o)},42095:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(31635),r=n(25482),s=n(91429),o=n(77901);let a=class extends r.o{constructor(e){super(e),this.path=[]}};(0,i.Cg)([(0,s.MZ)({type:[o.A],json:{write:!0}})],a.prototype,"path",void 0),a=(0,i.Cg)([(0,s.$K)("esri.rest.knowledgeGraph.Path")],a)},42538:(e,t,n)=>{n.d(t,{A:()=>l});var i=n(31635),r=n(91429),s=n(16930),o=n(69622);let a=class extends o.A{constructor(e){super(e),this.openCypherQuery=""}};(0,i.Cg)([(0,r.MZ)()],a.prototype,"openCypherQuery",void 0),a=(0,i.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.GraphQuery")],a);let l=class extends a{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null,this.outputSpatialReference=null,this.provenanceBehavior=null}};(0,i.Cg)([(0,r.MZ)()],l.prototype,"bindParameters",void 0),(0,i.Cg)([(0,r.MZ)()],l.prototype,"bindGeometryQuantizationParameters",void 0),(0,i.Cg)([(0,r.MZ)()],l.prototype,"outputQuantizationParameters",void 0),(0,i.Cg)([(0,r.MZ)({type:s.A})],l.prototype,"outputSpatialReference",void 0),(0,i.Cg)([(0,r.MZ)()],l.prototype,"provenanceBehavior",void 0),l=(0,i.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.GraphQueryStreaming")],l)},54238:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(31635),r=n(91429),s=n(77901);let o=class extends s.A{constructor(e){super(e),this.typeName=null,this.id=null}};(0,i.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],o.prototype,"typeName",void 0),(0,i.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],o.prototype,"id",void 0),o=(0,i.Cg)([(0,r.$K)("esri.rest.knowledgeGraph.GraphNamedObject")],o)},54898:(e,t,n)=>{n.d(t,{Gz:()=>G,O9:()=>P,hZ:()=>O,CP:()=>Z,dD:()=>$,UT:()=>R,MY:()=>F,Td:()=>L,iW:()=>D,e$:()=>j,qN:()=>S});var i=n(68197),r=n(91869),s=(n(85105),n(58769));n(39410),n(33421),n(21774),n(93885);const o=s.A;var a=n(965),l=n(91218),p=n(16930),d=n(17136),u=n(99352),c=n(15375),h=n(29005),y=n(46499),m=n(73913),g=n(77548),f=n(48441),b=n(25927),w=n(31635),_=n(69622),M=n(91429);let I=class extends _.A{constructor(e){super(e),this.entityAdds=void 0,this.entityUpdates=void 0,this.entityDeletes=void 0,this.relationshipAdds=void 0,this.relationshipUpdates=void 0,this.relationshipDeletes=void 0,this.options=void 0}};(0,w.Cg)([(0,M.MZ)()],I.prototype,"entityAdds",void 0),(0,w.Cg)([(0,M.MZ)()],I.prototype,"entityUpdates",void 0),(0,w.Cg)([(0,M.MZ)()],I.prototype,"entityDeletes",void 0),(0,w.Cg)([(0,M.MZ)()],I.prototype,"relationshipAdds",void 0),(0,w.Cg)([(0,M.MZ)()],I.prototype,"relationshipUpdates",void 0),(0,w.Cg)([(0,M.MZ)()],I.prototype,"relationshipDeletes",void 0),(0,w.Cg)([(0,M.MZ)()],I.prototype,"options",void 0),I=(0,w.Cg)([(0,M.$K)("esri.rest.knowledgeGraph.GraphApplyEdits")],I);var T=n(23150),C=n(54218),v=n(40863),A=n(68249);const x={initializeLayersFromClientData:async(e,t,n)=>{if(t||(t=[...e.layers,...e.tables].map(e=>e.graphTypeName)),0===t?.length)return;const i=new Map;for(const n of t)i.set(n,E(e,n));const r=await(0,f.fetchClientDataAtKeys)(e.dataManager.knowledgeGraph,Array.from(i.values()),{requestOptions:{signal:n?.signal}});for(const t of[...e.layers,...e.tables]){const n=t.objectType.name;if(null==n)continue;const i=r.get(E(e,n));if(i){const e=JSON.parse(i);null===e||"object"!=typeof e||e.hasOwnProperty("showLabels")||(e.showLabels=!1),t.read(e,{origin:"service"})}}}},E=(e,t)=>"knowledge-graph"===e.type?`${t}/Map`:`${t}/LinkChart/LinkChartSubLayer`;async function S(e,t,n){return x.initializeLayersFromClientData(e,t,n)}const k=["#4a0932","#b31515","#18382e","#a64f1b","#102432","#8c213f","#ed9310","#2c6954","#144d59","#ffc730","#75351e","#454f4b","#78b1c2","#191921","#8f8f82","#9be0c0","#dbb658","#87b051","#11495c","#c43541","#9c5596","#44498b","#ad9d63","#86afb3","#5c98ca","#b0bfa2","#73241f","#b86b53","#d9d78c","#3e756d","#f260a1","#a0d17d","#c27c30","#eb82eb","#ffdf3c","#ffb259","#ab52b3","#3cccb4","#0095ba","#d92b30"],N="#8f8f82";function L(e){return e<0||e>=k.length?new i.A(N):new i.A(k[e])}function R(e){const t=e.toArray();return new v.A({data:{type:"CIMSymbolReference",symbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,style:"solid",width:.75,color:t},{type:"CIMVectorMarker",enable:!0,size:6,markerPlacement:{type:"CIMMarkerPlacementOnLine",angleToLine:!0,relativeTo:"LineMiddle"},frame:{xmin:-10,ymin:-5,xmax:0,ymax:5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[-12,-3.47],[-12,3.6],[1.96,-.03],[-12,-3.47]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:t}]}}]}]}}})}function F(e){let t="ESRI__ID",n=4;for(const i of e)if(i.name){if("name"===i.name.toLowerCase()){t=i.name;break}i.name.toLowerCase().includes("name")?(t=i.name,n=2):"esriFieldTypeString"===i.fieldType&&n>3&&(t=i.name,n=3)}return t}function D(e,t,n){const i={color:[80,80,80],haloColor:[255,255,255],haloSize:.7,font:{size:10,weight:"normal"}},r=new y.A({labelExpressionInfo:new m.A({expression:"ESRI__ID"===n?`${t}`:`$feature.${n}`}),labelPlacement:"above-center",symbol:new A.A(i)}),s=new y.A({labelExpressionInfo:new m.A({expression:`'${t}' + IIf($feature.ESRI__AggregationCount>1, ' (' + $feature.ESRI__AggregationCount + ')', '')`}),labelPlacement:"center-along",labelPosition:"parallel",repeatLabel:!1,symbol:new A.A({...i,yoffset:"12px"})});return"entity"===e?[r]:[s]}function j(e,t,n){const i={color:[255,255,255],haloColor:[0,0,0],haloSize:.7,font:{size:10,weight:"bold"}},r="ESRI__ID"===n?`${e}`:`$feature.${n}`;return"point"===t?[new y.A({labelExpressionInfo:new m.A({expression:r}),labelPlacement:"above-center",symbol:new A.A(i)})]:"polyline"===t?[new y.A({labelExpressionInfo:new m.A({expression:r}),labelPlacement:"center-along",repeatLabel:!0,symbol:new A.A(i)})]:"polygon"===t?[new y.A({labelExpressionInfo:new m.A({expression:r}),labelPlacement:"always-horizontal",symbol:new A.A(i)})]:null}const B={capabilities:[],allowGeometryUpdates:!1,serviceCapabilities:{geometryCapabilities:{supportsZValues:!1,supportsMValues:!1}}};function O(e){const{capabilities:t,allowGeometryUpdates:n,serviceCapabilities:{geometryCapabilities:{supportsZValues:i,supportsMValues:r}}}=e?.serviceDefinition||B,s=e?.dataModel.arcgisManaged?t:t.filter(e=>"Query"===e),o=new Set(s);return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:r,supportsZ:i},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:o.has("Create"),supportsDelete:o.has("Delete"),supportsEditing:o.has("Editing"),supportsChangeTracking:!1,supportsQuery:o.has("Query"),supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:o.has("Update"),supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:u.F,queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:u.P,editing:{supportsGeometryUpdate:!!e?.dataModel.arcgisManaged&&n,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:o.has("Delete"),supportsUpdateByAnonymous:!1,supportsUpdateByOthers:o.has("Update"),supportsAsyncApplyEdits:!1,zDefault:void 0}}}async function P(e,t){const n=new I,i=t.graphTypeName,s=t.graphType,o="knowledge-graph"===t.parentCompositeLayer.type?t.geometryFieldName:null,a=!!t.fieldsIndex.get(o)?.editable,u=e=>{const n={...e};for(const e of t.fields)e.editable||delete n[e.name];for(const t of Object.keys(e))t.includes("ESRI__")&&delete n[t];return n},h=async e=>{await(0,l.initializeProjection)(e.spatialReference,p.A.WGS84);const t=(0,l.project)(e,p.A.WGS84);return"point"===t.type?t.normalize():(await(0,d.el)(t))[0]};for(const t of e.addFeatures??[]){const e=u(t.attributes);(0,g.UC)(t.sourceLayer)&&t.sourceLayer.graphTypeName===i&&("entity"===s?(n.entityAdds||(n.entityAdds=[]),o&&t.geometry&&(e[o]=await h(t.geometry)),n.entityAdds.push(new b.A({properties:e,typeName:i}))):(n.relationshipAdds||(n.relationshipAdds=[]),n.relationshipAdds.push(new T.A({properties:e,typeName:i}))))}for(const t of e.updateFeatures??[]){const e=t.attributes[c.dr],r=u(t.attributes);(0,g.UC)(t.sourceLayer)&&t.sourceLayer.graphTypeName===i&&("entity"===s?(n.entityUpdates||(n.entityUpdates=[]),o&&a&&t.geometry&&(r[o]=await h(t.geometry)),n.entityUpdates.push(new b.A({id:e,properties:r,typeName:i}))):(n.relationshipUpdates||(n.relationshipUpdates=[]),n.relationshipUpdates.push(new T.A({id:e,properties:r,typeName:i}))))}const y=new Map;for(const t of e.deleteFeatures??[])if((0,C.DU)(t)){const e=t,n=(0,r.tE)(y,e.sourceLayer.graphTypeName,()=>({typeName:e.sourceLayer.graphTypeName,ids:[]}));e.sourceLayer.graphTypeName===i&&n.ids.push(e.attributes[c.dr])}else t.objectId&&"string"==typeof t.objectId&&(0,r.tE)(y,i,()=>({typeName:i,ids:[]})).ids.push(t.objectId);for(const e of y.values())e.ids.length>0&&("entity"===s?(n.entityDeletes||(n.entityDeletes=[]),n.entityDeletes.push({typeName:e.typeName,ids:e.ids})):(n.relationshipDeletes||(n.relationshipDeletes=[]),n.relationshipDeletes.push({typeName:e.typeName,ids:e.ids})));return n}function G(e,t){const n={addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]};for(const i of e.editResults)if(i.typeName===t){for(const e of i.adds)n.addFeatureResults.push({objectId:e.id,globalId:e.id});for(const e of i.updates)n.updateFeatureResults.push({objectId:e.id,globalId:e.id});for(const e of i.deletes)n.deleteFeatureResults.push({objectId:e.id,globalId:e.id})}return n}function $(e){if(!e.objectType)return null;const t=[];for(const n of e.fields)!n.name.includes("ESRI__")&&n.editable&&"geometry"!==n.type&&t.push(new o({fieldName:n.name}));return new a.A({elements:t})}function Z(e){if(!e.objectType)return null;let t=null;switch(e.geometryType){case"point":case"multipoint":t="point";break;case"polyline":t="line";break;case"polygon":t="polygon";break;default:t=null}return[new h.A({name:e.graphTypeName,drawingTool:t,prototype:{}})]}},62046:(e,t,n)=>{n.d(t,{Fe:()=>d,KU:()=>y,Nk:()=>s});var i=n(68197),r=n(93397);function s(e){const t=[];return o((0,r.lW)(e),t),t.length?new i.A((0,r.e6)(t[0])):null}function o(e,t){if(!e)return;let n;n="CIMTextSymbol"===e.type?e.symbol:e;const i="CIMPolygonSymbol"===e.type;if(n?.symbolLayers)for(const e of n.symbolLayers)if(!(e.colorLocked||i&&((0,r.mA)(e)||(0,r.MM)(e)&&e.markerPlacement&&(0,r.zr)(e.markerPlacement))))switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor&&a(t,e.tintColor);break;case"CIMVectorMarker":e.markerGraphics?.forEach(e=>{o(e.symbol,t)});break;case"CIMSolidStroke":case"CIMSolidFill":a(t,e.color);break;case"CIMGradientFill":l(t,e);break;case"CIMHatchFill":o(e.lineSymbol,t)}}function a(e,t){for(const n of e)if(n.join(".")===t.join("."))return;e.push(t)}function l(e,t){const n=t.colorRamp?.type;switch(n){case"CIMMultipartColorRamp":t.colorRamp.colorRamps?.forEach(t=>{"CIMLinearContinuousColorRamp"===t.type&&p(e,t)});break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":p(e,t.colorRamp)}}function p(e,t){t&&(t.fromColor&&a(e,t.fromColor),t.toColor&&a(e,t.toColor))}function d(e,t,n){t instanceof i.A||(t=new i.A(t));const s=(0,r.lW)(e);s&&u(s,t,n)}function u(e,t,n){if(!e)return;let i;i="CIMTextSymbol"===e.type?e.symbol:e;const s="CIMPolygonSymbol"===i?.type;if(i?.symbolLayers)for(const e of i.symbolLayers){if(e.colorLocked)continue;if(s)if(n){const{layersToColor:t}=n;if(((0,r.mA)(e)||(0,r.MM)(e)&&e.markerPlacement&&(0,r.zr)(e.markerPlacement))&&"fill"===t||(0,r.jn)(e)&&"outline"===t)continue}else if((0,r.mA)(e)||(0,r.MM)(e)&&e.markerPlacement&&(0,r.zr)(e.markerPlacement))continue;const i=t.toArray();switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor=i;break;case"CIMVectorMarker":e.markerGraphics?.forEach(e=>{u(e.symbol,t,n)});break;case"CIMSolidStroke":case"CIMSolidFill":e.color=i;break;case"CIMGradientFill":c(e,t);break;case"CIMHatchFill":u(e.lineSymbol,t,n)}}}function c(e,t){const n=e.colorRamp?.type;switch(n){case"CIMMultipartColorRamp":e.colorRamp.colorRamps?.forEach(e=>{"CIMLinearContinuousColorRamp"===e.type&&h(e,t)});break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":h(e.colorRamp,t)}}function h(e,t){if(e&&(e.fromColor&&(e.fromColor=t.toArray()),e.toColor)){const n=t.clone();n.a=0,e.toColor=n.toArray()}}function y(e,t,n=!1){const i=(0,r.lW)(e);if(n&&(t=360-t),"CIMTextSymbol"!==i?.type){if("CIMPointSymbol"===i?.type&&i.symbolLayers){const e=t-(i.angle||0);for(const t of i.symbolLayers)if((0,r.MM)(t)){let n=t.rotation||0;t.rotateClockwise?n-=e:n+=e,t.rotation=n}i.angle=t}}else i.angle=t}},62796:(e,t,n)=>{n.d(t,{A:()=>ce});var i=n(31635),r=n(37838),s=n(49186),o=n(4718),a=n(53966),l=n(25728),p=n(91429),d=(n(29953),n(5443)),u=n(86738),c=n(39829),h=n(82799),y=n(91218),m=n(16930),g=n(21325),f=n(50498),b=n(55156),w=n(60950),_=n(89808),M=n(99959);const I=Symbol("isKnowledgeGraphGraphicOriginSymbol");var T;class C extends M.A{get[(T=I,w.ym)](){return this.sublayer}get[b.e](){return this.sublayer}get[_.Q](){return this.sublayer}constructor(e,t){super(),this[T]=!0,this.type="knowledge-graph",this.layer=e,this.sublayer=t}get id(){return this.layer.id}}const v=Symbol("isLinkChartGraphicOriginSymbol");var A;class x extends M.A{get[(A=v,_.Q)](){return this.layer}constructor(e,t){super(),this[A]=!0,this.type="link-chart",this.layer=e,this.sublayer=t}get id(){return`${this.layer.id}:__${this.sublayer.id}__`}}var E=n(4146),S=n(83221),k=n(56390),N=n(64714),L=n(15375);const R=(0,n(17036).p)(),F=e=>{const t=e;let n=class extends t{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return(0,i.Cg)([(0,p.MZ)(R.fields)],n.prototype,"fields",void 0),(0,i.Cg)([(0,p.MZ)(R.fieldsIndex)],n.prototype,"fieldsIndex",void 0),n=(0,i.Cg)([(0,p.$K)("esri.layers.knowledgeGraph.KnowledgeGraphSublayerBase")],n),n};var D=n(54898),j=n(63074),B=n(6455),O=n(87718),P=n(56658),G=n(32756),$=n(54310),Z=n(25036),q=n(82935),U=n(10873),z=n(13213),Q=n(20437),Y=n(30524),H=n(46499),W=n(39383),K=n(96184),X=n(96576),V=n(65494),J=n(41214),ee=n(48441),te=n(22671),ne=n(61956),ie=n(30291),re=n(37531),se=n(61322),oe=n(43937);function ae(e){if(!e.json)return e;e.json.write=le(e.json.write);const t=e.json.origins;if(!t)return e;let n;for(n in t){const e=t[n];e&&(e.write=le(e.write))}return e}function le(e){return"object"==typeof e&&e?(!1!==e.enabled&&(e.overridePolicy=function(e){const{target:t,writer:n,overridePolicy:i,...r}=e;return function(e,t){const n=de.call(this,e,t);return n.enabled?{...r,...n}:n}}(e)),e):!0===e?pe():e}function pe(){return{overridePolicy:de}}function de(e,t){const n=!!this.geometryType;let i={enabled:n};return n&&(i={...i,...ue.call(this,e,t)}),i}function ue(e,t){return{ignoreOrigin:this.originIdOf(t)>0}}let ce=class extends(F((0,B.FJ)((0,P.J)((0,O.F)((0,j.dM)((0,G.fY)((0,q.e)((0,Z.j)((0,$.J)((0,l.P)(E.A))))))))))){constructor(e){super(e),this.blendMode="normal",this.charts=null,this.definitionExpression=null,this.displayFilterEnabled=!0,this.displayFilterInfo=null,this.effect=null,this.elevationInfo=null,this.featureEffect=null,this.graphType=null,this.labelsVisible=!0,this.layerType=null,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.objectIdField=L.dr,this.objectType=null,this.opacity=1,this.orderBy=null,this.parent=null,this.parentCompositeLayer=null,this.persistenceEnabled=!0,this.popupEnabled=!0,this.popupTemplate=null,this.refreshInterval=0,this.source={openPorts:()=>this.load().then(()=>{const e=new MessageChannel;return new se.default(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const n=ne.A.fromJSON(e);return this.queryFeaturesJSON(n,t)}}}),[e.port2]})},this.type="knowledge-graph-sublayer",this.useViewTime=!0,this.visible=!0}get capabilities(){return this.parent?this.parent.sublayerCapabilities:(0,D.hZ)(null)}get userHasUpdateItemPrivileges(){return!!this.parent?.userHasUpdateItemPrivileges}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.capabilities.operations.supportsEditing}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get isTable(){return"link-chart"!==this.parentCompositeLayer?.type&&null==this.geometryFieldName}get defaultPopupTemplate(){return this.createPopupTemplate()}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}get fields(){const e=[];return this.objectType?.properties?.forEach(t=>{const n="esriFieldTypeOID"===t.fieldType?"esriFieldTypeInteger":t.fieldType;e.push(Q.A.fromJSON({name:t.name,type:n,alias:t.alias,defaultValue:t.defaultValue,editable:t.editable,nullable:t.nullable}))}),e.push(Q.A.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1}),Q.A.fromJSON({name:L.M1,type:"esriFieldTypeInteger",alias:L.M1,editable:!1}),Q.A.fromJSON({name:L.BL,type:"esriFieldTypeInteger",alias:L.BL,editable:!1})),e}get formTemplate(){return this._isOverridden("formTemplate")?this._get("formTemplate"):(0,D.dD)(this)}set formTemplate(e){this._overrideIfSome("formTemplate",e)}get geometryType(){if("link-chart"===this.parentCompositeLayer?.type)return"relationship"===this.graphType?"polyline":"point";const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.geometryType;return t&&"esriGeometryNull"!==t?f.gy.fromJSON(t):null}get geometryFieldName(){if("link-chart"===this.parentCompositeLayer?.type)return L.T1;const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name);return e?.name??null}get graphicOrigin(){if(!this.parent)return null;switch(this.parent.type){case"knowledge-graph":return new C(this.parent,this);case"link-chart":return new x(this.parent,this)}}get graphTypeName(){return this.objectType?.name}set graphTypeName(e){this._set("graphTypeName",e)}get hasM(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,n=t?this.objectType?.properties?.[t]:null;return n?.hasM??!1}get hasZ(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,n=t?this.objectType?.properties?.[t]:null;return n?.hasZ??!1}set labelingInfo(e){this._set("labelingInfo",e)}get labelingInfo(){if(this._isOverridden("labelingInfo"))return this._get("labelingInfo");if(!this.objectType||!this.parentCompositeLayer||!this.graphTypeName)return null;const e=this.objectType.properties?(0,D.MY)(this.objectType.properties):"ESRI__ID";return"link-chart"===this.parentCompositeLayer.type?(0,D.iW)(this.graphType,this.graphTypeName,e):(0,D.e$)(this.graphTypeName,this.geometryType,e)}set renderer(e){(0,Y.yp)(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const e=this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel,t=[...e?.entityTypes??[],...e?.relationshipTypes??[]].map(e=>e.name).indexOf(this.graphTypeName),n=(0,D.Td)(t);if("link-chart"===this.parentCompositeLayer?.type){if("relationship"===this.graphType)return new X.A({type:"simple",symbol:(0,D.UT)(n)});const e=(0,V.r)((0,N.F0)(f.gy.toJSON("point")).renderer);return(0,re.dt)(e.symbol,n),e}const i=(0,V.r)((0,N.F0)(f.gy.toJSON(this.geometryType)).renderer);return(0,re.dt)(i.symbol,n),i}get spatialReference(){return this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel?.spatialReference??m.A.WGS84}get templates(){return this._isOverridden("templates")?this._get("templates"):(0,D.CP)(this)}set templates(e){this._overrideIfSome("templates",e)}set timeInfo(e){this._set("timeInfo",e)}get title(){return this._isOverridden("title")?this._get("title"):this.graphTypeName}set title(e){this._set("title",e)}writeTitle(e,t){t.title=e??"Layer"}createPopupTemplate(e){return(0,ie.tn)(this,e)}createQuery(){return new ne.A({where:"1=1",outFields:["*"]})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){return null}async queryFeatures(e,t){await this.load();const{resolvedQuery:n,queryEngine:i}=await this._setupQueryObjects(e),r=this.graphicOrigin,s=te.A.fromJSON(await i.executeQuery(n.toJSON(),t?.signal));return s.features.forEach(e=>{e.sourceLayer=this,e.origin=r}),s}async queryFeaturesJSON(e,t){await this.load();const{resolvedQuery:n,queryEngine:i}=await this._setupQueryObjects(e);return await i.executeQuery(n.toJSON(),t?.signal)}async queryFeatureCount(e,t){await this.load();const{resolvedQuery:n,queryEngine:i}=await this._setupQueryObjects(e);return i.executeQueryForCount(n.toJSON(),t?.signal)}async queryExtent(e={},t){await this.load();const n={...e,returnGeometry:!0},{resolvedQuery:i,queryEngine:r}=await this._setupQueryObjects(n),s=await r.executeQueryForExtent(i.toJSON(),t?.signal);let o;return o=null!=s.extent?.xmin&&null!=s.extent?.xmax&&null!=s.extent?.ymin&&null!=s.extent?.ymax?new d.A(s.extent):new d.A,{count:s.count,extent:o}}async queryObjectIds(e,t){await this.load();const n=ne.A.from(e);let i;if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)i=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(n,this,t);i=this.loadQueryEngine(e)}return await i.executeQueryForIds(n.toJSON(),t?.signal)}async applyEdits(e){if(!this.parentCompositeLayer.dataManager.knowledgeGraph)throw new s.A("knowledge-graph-sublayer:no-knowledge-graph","ApplyEdits cannot be executed because the parent does not have a Knowledge Graph model. This is usually caused by the layer not yet being loaded");const t=await(0,D.O9)(e,this);t.options={cascadeDelete:!0,cascadeProvenanceDelete:!!this.parent?.knowledgeGraph.serviceDefinition.supportsProvenance||void 0};const n=await(0,ee.executeApplyEdits)(this.parentCompositeLayer.dataManager.knowledgeGraph,t),i=(0,D.Gz)(n,this.graphTypeName),r={addedFeatures:i.addFeatureResults,updatedFeatures:i.updateFeatureResults,deletedFeatures:i.deleteFeatureResults,addedAttachments:i.addAttachmentResults,deletedAttachments:i.deleteAttachmentResults,updatedAttachments:i.updateAttachmentResults,exceededTransferLimit:!1,historicMoment:new Date,edits:void 0};return this.emit("edits",r),this.emit("apply-edits",{result:Promise.resolve(r)}),"link-chart"===this.parentCompositeLayer.type&&await this.parentCompositeLayer.refreshLinkChartCache([...r.addedFeatures.map(e=>e.globalId),...r.updatedFeatures.map(e=>e.globalId),...r.deletedFeatures.map(e=>e.globalId)]),i}loadQueryEngine(e){const t=new S.A({geometryType:f.gy.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),n=new k.do({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:f.gy.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,featureIdInfo:{type:"object-id",fieldName:this.objectIdField},spatialReference:this.spatialReference.toJSON(),timeInfo:this.timeInfo?.toJSON(),featureStore:t});return n.featureStore.addMany(e),n}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new ne.A({where:"1=1",outFields:[L.dr]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}load(e){return this.addResolvingPromise(this.parent.load(e).then(()=>(0,Y.sv)(this.timeInfo,this.fieldsIndex))),Promise.resolve(this)}async _setupQueryObjects(e,t){const n=ne.A.from(e),i=n.geometry;if(i&&!i.spatialReference?.isWGS84&&(await(0,y.initializeProjection)(i.spatialReference,g.KK),n.geometry=(0,y.project)(i instanceof c.A||i instanceof h.A||i instanceof u.A?i:i.extent,g.KK)),"link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)return{resolvedQuery:n,queryEngine:this._cachedQueryEngine};const r=await this.parentCompositeLayer.dataManager.getData(n,this,t);return{resolvedQuery:n,queryEngine:this.loadQueryEngine(r)}}};(0,i.Cg)([(0,p.MZ)(ae((0,o.o8)(j.sU)))],ce.prototype,"blendMode",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],ce.prototype,"capabilities",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],ce.prototype,"userHasUpdateItemPrivileges",null),(0,i.Cg)([(0,p.MZ)({type:Boolean})],ce.prototype,"editingEnabled",null),(0,i.Cg)([(0,p.MZ)()],ce.prototype,"isTable",null),(0,i.Cg)([(0,p.MZ)({json:{origins:{"web-scene":{write:!1}},write:pe()}})],ce.prototype,"charts",void 0),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],ce.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,p.MZ)({type:String,json:{origins:{service:{read:!1}},name:"layerDefinition.definitionExpression",write:{ignoreOrigin:!0}}})],ce.prototype,"definitionExpression",void 0),(0,i.Cg)([(0,p.MZ)(ae((0,o.o8)(B.Dp)))],ce.prototype,"displayFilterEnabled",void 0),(0,i.Cg)([(0,p.MZ)(ae((0,o.o8)(B.KV)))],ce.prototype,"displayFilterInfo",void 0),(0,i.Cg)([(0,p.MZ)(ae((0,o.o8)(j.LF)))],ce.prototype,"effect",void 0),(0,i.Cg)([(0,p.MZ)()],ce.prototype,"elevationInfo",void 0),(0,i.Cg)([(0,p.MZ)(ae((0,o.o8)(O.Y)))],ce.prototype,"featureEffect",void 0),(0,i.Cg)([(0,p.MZ)(ae((0,o.o8)(z.d)))],ce.prototype,"featureReduction",null),(0,i.Cg)([(0,p.MZ)()],ce.prototype,"fields",null),(0,i.Cg)([(0,p.MZ)()],ce.prototype,"formTemplate",null),(0,i.Cg)([(0,p.MZ)()],ce.prototype,"geometryType",null),(0,i.Cg)([(0,p.MZ)()],ce.prototype,"geometryFieldName",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0})],ce.prototype,"graphicOrigin",null),(0,i.Cg)([(0,p.MZ)({type:["entity","relationship"],nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],ce.prototype,"graphType",void 0),(0,i.Cg)([(0,p.MZ)({type:String,nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],ce.prototype,"graphTypeName",null),(0,i.Cg)([(0,p.MZ)()],ce.prototype,"hasM",null),(0,i.Cg)([(0,p.MZ)()],ce.prototype,"hasZ",null),(0,i.Cg)([(0,p.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],ce.prototype,"id",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,value:!0,nonNullable:!0,json:{name:"showLabels",default:!1,write:{overridePolicy(){return{enabled:!!this.geometryType,alwaysWriteDefaults:!0,ignoreOrigin:!0}}}}})],ce.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,p.MZ)({type:[H.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:function(e,t,n){const i=[["ESRI__AGGREGATION_COUNT",L.M1],["ESRI__ORIGIN_ID",L.Cz],["ESRI__DESTINATION_ID",L.KQ],["ESRI__LAYOUT_GEOMETRY",L.T1]];try{for(const t of e)for(const[e,n]of i)t.labelExpression=t.labelExpression?.replaceAll(e,n),t.labelExpressionInfo?.expression&&(t.labelExpressionInfo.expression=t.labelExpressionInfo.expression.replaceAll(e,n))}catch(e){a.A.getLogger(this).warn("Error updating labelingInfo",e)}return(0,W.w)(e,t,n)},write:pe()}})],ce.prototype,"labelingInfo",null),(0,i.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1,write:{writer(e,t){switch(this.parentCompositeLayer?.type){case"link-chart":t.layerType="LinkChartSubLayer";break;case"knowledge-graph":t.layerType=this.geometryType?"KnowledgeGraphSubLayer":"KnowledgeGraphSubTable"}},isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],ce.prototype,"layerType",void 0),(0,i.Cg)([(0,p.MZ)(ae((0,o.o8)(U.fV)))],ce.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,p.MZ)(ae((0,o.o8)(U.hG)))],ce.prototype,"maxScale",void 0),(0,i.Cg)([(0,p.MZ)(ae((0,o.o8)(U.hn)))],ce.prototype,"minScale",void 0),(0,i.Cg)([(0,p.MZ)()],ce.prototype,"objectIdField",void 0),(0,i.Cg)([(0,p.MZ)()],ce.prototype,"objectType",void 0),(0,i.Cg)([(0,p.MZ)(ae((0,o.o8)(U.ke)))],ce.prototype,"opacity",void 0),(0,i.Cg)([(0,p.MZ)(ae((0,o.o8)(G.ne)))],ce.prototype,"orderBy",void 0),(0,i.Cg)([(0,p.MZ)({clonable:!1})],ce.prototype,"parent",void 0),(0,i.Cg)([(0,p.MZ)()],ce.prototype,"parentCompositeLayer",void 0),(0,i.Cg)([(0,p.MZ)(ae((0,o.o8)(U.M6)))],ce.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,p.MZ)({type:r.A,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],ce.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,p.MZ)({type:Number,json:{write:{overridePolicy:ue}}})],ce.prototype,"refreshInterval",void 0),(0,i.Cg)([(0,p.MZ)({types:J.Hg,json:{name:"layerDefinition.drawingInfo.renderer",write:pe()}})],ce.prototype,"renderer",null),(0,i.Cg)([(0,p.MZ)()],ce.prototype,"source",void 0),(0,i.Cg)([(0,p.MZ)()],ce.prototype,"spatialReference",null),(0,i.Cg)([(0,p.MZ)()],ce.prototype,"templates",null),(0,i.Cg)([(0,p.MZ)({type:K.A,json:{name:"layerDefinition.timeInfo",write:{overridePolicy:ue},origins:{"web-document":{name:"layerDefinition.timeInfo",read:!0,write:{overridePolicy:ue}},"portal-item":{name:"layerDefinition.timeInfo",read:!0,write:{overridePolicy:ue}}}}})],ce.prototype,"timeInfo",null),(0,i.Cg)([(0,p.MZ)({type:String,json:{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],ce.prototype,"title",null),(0,i.Cg)([(0,oe.K)("title")],ce.prototype,"writeTitle",null),(0,i.Cg)([(0,p.MZ)({json:{read:!1}})],ce.prototype,"type",void 0),(0,i.Cg)([(0,p.MZ)(ae((0,o.o8)(q.B)))],ce.prototype,"useViewTime",void 0),(0,i.Cg)([(0,p.MZ)({type:Boolean,json:{name:"visibility",write:pe()}})],ce.prototype,"visible",void 0),ce=(0,i.Cg)([(0,p.$K)("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],ce)},64714:(e,t,n)=>{n.d(t,{F0:()=>a,Vx:()=>d,e2:()=>c,f:()=>h});var i=n(44208),r=n(4718),s=n(99352),o=n(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let p=1;function d(e,t){if((0,i.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let n=`this${u(t)} = null;`;for(const t in e)n+=`this${u(t)} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${p++} {\n constructor() {\n ${n};\n }\n }\n `)();return()=>new i}catch(n){return()=>({[t]:null,...e})}}function u(e){return l.test(e)?`.${e}`:`["${e}"]`}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,r.o8)(e)}}]}function h(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:s.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:s.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},67996:(e,t,n)=>{n.d(t,{cZ:()=>S,XW:()=>R,fe:()=>k});var i=n(11254),r=n(49186),s=n(91869),o=(n(90708),n(92722)),a=n(16930);class l{constructor(){this.version="",this.queryResult=new p}}class p{constructor(){this.featureResult=new d}}class d{constructor(){this.objectIdFieldName="",this.uniqueIdField=new u,this.globalIdFieldName="",this.geohashFieldName="",this.geometryProperties=new c,this.geometryType=null,this.spatialReference=new a.A,this.exceededTransferLimit=!1,this.hasZ=!1,this.hasM=!1,this.transform=new h,this.fields=[],this.fieldNameToAttributeIndexMap={},this.values=[],this.features=[],this.geometryFields=[]}}class u{constructor(){this.name="",this.isSystemMaintained=!1}}class c{constructor(){this.shapeAreaFieldName="",this.shapeLengthFieldName="",this.units=""}}class h{constructor(){this.quantizeOriginPosition="upperLeft",this.scale=new y,this.translate=new m}}class y{constructor(){this.xScale=0,this.yScale=0,this.mScale=0,this.zScale=0}}class m{constructor(){this.xTranslate=0,this.yTranslate=0,this.mTranslate=0,this.zTranslate=0}}class g{constructor(){this.name="",this.fieldType="esriFieldTypeString",this.alias="",this.sqlType="sqlTypeVarchar",this.domain="",this.defaultValue=""}}class f{constructor(){this.attributes=[],this.compressedGeometry=new b,this.centroid=new b,this.aggregateGeometries=[]}}class b{constructor(){this.geometryType=null,this.lengths=[],this.coords=[]}}const w=["ELEMENTUID","TYPENAME"];var _=n(45724),M=n(35448);const I={upperLeft:0,lowerLeft:1},T={sqlTypeBigInt:0,sqlTypeBinary:1,sqlTypeBit:2,sqlTypeChar:3,sqlTypeDate:4,sqlTypeDecimal:5,sqlTypeDouble:6,sqlTypeFloat:7,sqlTypeGeometry:8,sqlTypeGUID:9,sqlTypeInteger:10,sqlTypeLongNVarchar:11,sqlTypeLongVarbinary:12,sqlTypeLongVarchar:13,sqlTypeNChar:14,sqlTypeNVarChar:15,sqlTypeOther:16,sqlTypeReal:17,sqlTypeSmallInt:18,sqlTypeSqlXml:19,sqlTypeTime:20,sqlTypeTimestamp:21,sqlTypeTimestamp2:22,sqlTypeTinyInt:23,sqlTypeVarbinary:24,sqlTypeVarchar:25};var C=n(93637);function v(e){const t=new b;t.geometryType=(0,C.i7)(M.bV,e.geometry_type.value);const n=[],i=[];for(let t=0;t<e.lengths.length;t++)n.push(e.lengths[t]);for(let t=0;t<e.coords.length;t++)i.push(e.coords[t]);return t.lengths=n,t.coords=i,t}function A(e){const t=new g;return t.name=e.name,t.alias=e.alias,t.fieldType=(0,C.i7)(M.r5,e.field_type.value),t.sqlType=(0,C.i7)(T,e.sql_type.value),t.domain=e.domain,t.defaultValue=e.default_value,t}function x(e){const t=A(e);return t.geometryType=(0,C.i7)(M.bV,e.geometry_type.value),t}function E(e){const t=new h;t.quantizeOriginPosition=(0,C.i7)(I,e.quantizeOriginPosition.value);const n=t.scale,i=e.scale;n.xScale=i.xScale,n.yScale=i.yScale,n.mScale=i.mScale,n.zScale=i.zScale;const r=t.translate,s=e.translate;return r.xTranslate=s.xTranslate,r.yTranslate=s.yTranslate,r.mTranslate=s.mTranslate,r.zTranslate=s.zTranslate,t}async function S(e,t,n){t??=!1;const o={generateAllSublayers:t,namedTypeDefinitions:new Map};return await async function(e,t){const n=await(0,i.A)(e,{responseType:"array-buffer",signal:t?.signal}),s=await n.data;return async function(e){const t=new((await(0,_.I)()).MapOfObjectIdentifierSetsDecoder),n=t.decode(new Uint8Array(e)),i=new Map;if(0!==n.error_code)throw new r.A("knowledge-graph:layer-support-utils",n.error_message);const s=t.get_map_of_identifier_sets(),o=s.keys,a=o.size();for(let e=0;e<a;e++){const t=o.get(e),n=s.query_identifier_set(t),a=[];if(1===n.id_array_type.value){const e=n.get_globalid_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_globalid_at(n))}else if(3===n.id_array_type.value){const e=n.get_identifier_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_identifier_at(n).toString())}else if(2===n.id_array_type.value){const e=n.get_string_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_string_at(n))}else{if(0!==n.id_array_type.value)throw new r.A("knowledge-graph:layer-support-utils","Tried to encode an unexpected ID Array type.");{const e=n.get_oid_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_objectid_at(n).toString())}}i.set(t,a)}return t.delete(),i}(new Uint8Array(s))}(e,n).then(e=>{!function(e,t){for(const[n,i]of e){const e=(0,s.tE)(t.namedTypeDefinitions,n,()=>({useAllData:!1,members:new Map}));for(const t of i)e.members.has(t)||e.members.set(t,{id:t})}}(e,o)}),o}async function k(e){const t=await(0,_.I)(),n=new t.MapOfObjectIdentifierSets;!function(e,t,n){for(const[i,r]of n.namedTypeDefinitions){if(!r.members||r.useAllData)continue;const n=r.members.keys();let s=!1,o=!0;const a=new t.ObjectIdArray,l=new t.StringArray,p=new t.GlobalIdArray,d=new t.IdentifierArray,u=new t.ObjectIdentifierSet;for(const e of n)o&&(s=!isNaN(Number(e)),o=!1),s?a.add_objectid(Number(e)):(l.add_string(e),p.add_globalid(e)),d.add_identifier(e);u.set_oid_array(a),u.set_string_array(l),u.set_globalid_array(p),u.set_identifier_array(d),a.delete(),l.delete(),p.delete(),d.delete(),e.put_identifier_set(i,u),u.delete()}}(n,t,e);const i=new t.MapOfObjectIdentifierSetsEncoder;try{i.set_map_of_identifier_sets(n),i.encode();const e=i.get_encoding_result();if(0!==e.error.error_code)throw new r.A("knowledge-graph:layer-support-utils",e.error.error_message);const t=structuredClone(e.get_byte_buffer());return i.delete(),t}finally{n.delete()}}async function N(e,t){const n=await(0,i.A)(e,{responseType:"array-buffer",signal:t?.signal});return async function(e){const t=new((await(0,_.I)()).FeatureCollectionDecoder),n=t.decode(new Uint8Array(e));if(0!==n.error_code)throw new r.A("knowledge-graph:layer-support-utils",n.error_message);const i=function(e){const t=new l;t.version=e.version;const n=e.get_query_result();if(0!==n.results_type.value)throw new Error("Got a non-feature collection type");const i=n.get_feature_result(),r=t.queryResult.featureResult;r.objectIdFieldName=i.objectid_field_name,r.exceededTransferLimit=i.exceeded_transfer_limit,r.hasM=i.has_m,r.hasZ=i.has_z,r.geometryType=(0,C.i7)(M.bV,i.geometry_type.value),r.globalIdFieldName=i.globalid_field_name,r.geohashFieldName=i.geohash_field_name;const s=r.uniqueIdField,o=i.unique_id_field;s.name=o.name,s.isSystemMaintained=o.isSystemMaintained;const a=r.geometryProperties,p=i.geometry_properties;a.shapeAreaFieldName=p.shapeAreaFieldName,a.shapeLengthFieldName=p.shapeLengthFieldName,a.units=p.units;const d=r.spatialReference,u=i.spatial_reference;d.wkid=u.wkid,d.latestWkid=u.latestWkid,d.vcsWkid=u.vcsWkid,d.latestVcsWkid=u.latestVcsWkid,d.wkt=u.wkt,r.transform=E(i.transform);const c=r.fields,h=r.fieldNameToAttributeIndexMap,y=i.fields,m=y.size();for(let e=0;e<m;e++){const t=y.get(e),n=A(t);c.push(n),h[n.name]=e,t.delete()}y.delete();const g=r.values,b=i.values_count();for(let e=0;e<b;e++)g.push(i.get_value_at(e));const _=r.features,I=i.features,T=I.size();if(T>0)for(const e of w)if(void 0===h[e])throw new Error(`Feature collection missing required attribute: ${e}`);for(let e=0;e<T;e++){const t=new f,n=I.get(e),i=t.attributes,r=n.attributes_count();for(let e=0;e<r;e++)i.push(n.get_attribute_at(e));const s=n.get_compressed_geometry();s&&(t.compressedGeometry=v(s),t.centroid=v(n.get_centroid()));const o=t.aggregateGeometries,a=n.aggregate_geometries,l=a.size();for(let e=0;e<l;e++){const t=a.get(e),n=v(t);o.push(n),t.delete()}a.delete(),_.push(t),n.delete()}I.delete();const S=r.geometryFields,k=i.geometry_fields,N=k.size();for(let e=0;e<N;e++){const t=k.get(e),n=x(t);S.push(n),t.delete()}return k.delete(),t}(t.get_feature_collection());return t.delete(),i}(await n.data)}function L(e,t){if(!e?.queryResult?.featureResult)return t;const{hasZ:n,hasM:i}=e.queryResult.featureResult,r=e.queryResult.featureResult.fieldNameToAttributeIndexMap;for(const a of e.queryResult.featureResult.features){const e=a.attributes[r.TYPENAME],l=(0,s.tE)(t.namedTypeDefinitions,e,()=>({useAllData:!1,members:new Map})),p=a.attributes[r.ELEMENTUID];if(a.compressedGeometry?.coords?.length>0){let e=a.compressedGeometry.lengths;"esriGeometryPoint"===a.compressedGeometry.geometryType&&(e=[]),l.members.set(p,{id:p,linkChartLocation:new o.A(e,a.compressedGeometry.coords,n,i)})}else l.members.set(p,{id:p})}return t}const R={fetchAndConvertSerializedLinkChart:(e,t)=>async function(e,t){const n=[],i={generateAllSublayers:!1,namedTypeDefinitions:new Map};return e.entitiesUrl&&n.push(N(e.entitiesUrl,t).then(e=>{L(e,i)})),e.relationshipsUrl&&n.push(N(e.relationshipsUrl,t).then(e=>{L(e,i)})),await Promise.all(n),i}(e,t)}},69860:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(65864),r=n(90708),s=n(43334),o=n(15375);class a{constructor(){this._featureLookup=new Map}static getInstance(){return a.instance||(a.instance=new a),a.instance}static resetInstance(){a.instance&&(a.instance=null)}deleteFromStore(e){e.forEach(e=>{this._featureLookup.delete(e)})}readFromStoreByList(e){const t=[];return e.forEach(e=>{const n=this.readFromStoreById(e);n&&t.push(n)}),t}readFromStoreById(e){return this._featureLookup.get(e)??null}writeToStore(e,t,n){const a=[];return e.forEach(e=>{if(!e?.id)return;e.properties||(e.properties=[]);let l=null;n&&e.properties[n]&&(l=(0,r.Ux)(e.properties[n])),"originId"in e&&"destinationId"in e&&(e.properties[o.Cz]=e.originId,e.properties[o.KQ]=e.destinationId),e.properties[t]=e.id;let p=e.properties;if(e.id){const t=this._featureLookup.get(e.id);if(t?.attributes){p={...t.attributes,...p};const e=n&&p[n];null!=e&&(p[n]=(0,i.rS)(e)),l=l??t.geometry}}const d=new s.Om(l?.clone(),p,null,e.id);this._featureLookup.set(`${e.typeName?`${e.typeName}__${e.id}`:e.id}`,d),a.push(d)}),a}}},75503:(e,t,n)=>{n.d(t,{EC:()=>v,wq:()=>a});var i=n(4576),r=n(21818),s=(n(44208),n(15142)),o=n(11006);class a{constructor(e=9,t){this._compareMinX=c,this._compareMinY=h,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),M.prune(),I.prune(),T.prune(),C.prune()}all(e){l(this._data,e)}search(e,t){let n=this._data;const i=this._toBBox;if(w(e,n))for(M.clear();n;){for(let r=0,s=n.children.length;r<s;r++){const s=n.children[r],o=n.leaf?i(s):s;w(e,o)&&(n.leaf?t(s):b(e,o)?l(s,t):M.push(s))}n=M.pop()}}collides(e){let t=this._data;const n=this._toBBox;if(!w(e,t))return!1;for(M.clear();t;){for(let i=0,r=t.children.length;i<r;i++){const r=t.children[i],s=t.leaf?n(r):r;if(w(e,s)){if(t.leaf||b(e,s))return!0;M.push(r)}}t=M.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,n=e.length;t<n;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new x([]),this}remove(e){if(!e)return this;let t,n=this._data,s=null,o=0,a=!1;const l=this._toBBox(e);for(T.clear(),C.clear();n||T.length>0;){if(n||(n=T.pop(),s=T.data[T.length-1],o=C.pop()??0,a=!0),n.leaf&&(t=(0,i.qh)(n.children,(0,r.zI)(e),n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),T.push(n),this._condense(T),this;a||n.leaf||!b(n,l)?s?(o++,n=s.children[o],a=!1):n=null:(T.push(n),C.push(o),o=0,s=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,n,i){const r=n-t+1;let s=this._maxEntries;if(r<=s){const i=new x(e.slice(t,n+1));return p(i,this._toBBox),i}i||(i=Math.ceil(Math.log(r)/Math.log(s)),s=Math.ceil(r/s**(i-1)));const o=new E([]);o.height=i;const a=Math.ceil(r/s),l=a*Math.ceil(Math.sqrt(s));_(e,t,n,l,this._compareMinX);for(let r=t;r<=n;r+=l){const t=Math.min(r+l-1,n);_(e,r,t,a,this._compareMinY);for(let n=r;n<=t;n+=a){const r=Math.min(n+a-1,t);o.children.push(this._build(e,n,r,i-1))}}return p(o,this._toBBox),o}_insert(e,t,n){const i=this._toBBox,r=n?e:i(e);T.clear();const s=function(e,t,n,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==n;){let n,i=1/0,r=1/0;for(let s=0,o=t.children.length;s<o;s++){const o=t.children[s],a=y(o),l=g(e,o)-a;l<r?(r=l,i=a<i?a:i,n=o):l===r&&a<i&&(i=a,n=o)}t=n||t.children[0]}return t}(r,this._data,t,T);for(s.children.push(e),u(s,r);t>=0&&T.data[t].children.length>this._maxEntries;)this._split(T,t),t--;!function(e,t,n){for(let i=n;i>=0;i--)u(t.data[i],e)}(r,T,t)}_split(e,t){const n=e.data[t],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);const s=this._chooseSplitIndex(n,r,i);if(!s)return;const o=n.children.splice(s,n.children.length-s),a=n.leaf?new x(o):new E(o);a.height=n.height,p(n,this._toBBox),p(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(n,a)}_splitRoot(e,t){this._data=new E([e,t]),this._data.height=e.height+1,p(this._data,this._toBBox)}_chooseSplitIndex(e,t,n){let i,r,s;i=r=1/0;for(let o=t;o<=n-t;o++){const t=d(e,0,o,this._toBBox),a=d(e,o,n,this._toBBox),l=f(t,a),p=y(t)+y(a);l<i?(i=l,s=o,r=p<r?p:r):l===i&&p<r&&(r=p,s=o)}return s}_chooseSplitAxis(e,t,n){const i=e.leaf?this._compareMinX:c,r=e.leaf?this._compareMinY:h;this._allDistMargin(e,t,n,i)<this._allDistMargin(e,t,n,r)&&e.children.sort(i)}_allDistMargin(e,t,n,i){e.children.sort(i);const r=this._toBBox,s=d(e,0,t,r),o=d(e,n-t,n,r);let a=m(s)+m(o);for(let i=t;i<n-t;i++){const t=e.children[i];u(s,e.leaf?r(t):t),a+=m(s)}for(let i=n-t-1;i>=t;i--){const t=e.children[i];u(o,e.leaf?r(t):t),a+=m(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const n=e.data[t];if(0===n.children.length)if(t>0){const r=e.data[t-1],s=r.children;s.splice((0,i.qh)(s,n,s.length,r.indexHint),1)}else this.clear();else p(n,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let n=e;for(I.clear();n;){if(!0===n.leaf)for(const e of n.children)t((0,r.zI)(e));else I.pushArray(n.children);n=I.pop()??null}}function p(e,t){d(e,0,e.children.length,t,e)}function d(e,t,n,i,r){r||(r=new x([])),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let s,o=t;o<n;o++)s=e.children[o],u(r,e.leaf?i(s):s);return r}function u(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function c(e,t){return e.minX-t.minX}function h(e,t){return e.minY-t.minY}function y(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function g(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function f(e,t){const n=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),s=Math.min(e.maxY,t.maxY);return Math.max(0,r-n)*Math.max(0,s-i)}function b(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function w(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function _(e,t,n,i,r){const s=[t,n];for(;s.length;){const t=s.pop(),n=s.pop();if(t-n<=i)continue;const a=n+Math.ceil((t-n)/i/2)*i;(0,o.q)(e,a,n,t,r),s.push(n,a,a,t)}}const M=new s.A,I=new s.A,T=new s.A,C=new s.A({deallocator:void 0});class v{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class A extends v{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class x extends A{constructor(e){super(),this.children=e,this.leaf=!0}}class E extends A{constructor(e){super(),this.children=e,this.leaf=!1}}},77901:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(31635),r=n(25482),s=n(91429);let o=class extends r.o{constructor(e){super(e),this.properties=null}};(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],o.prototype,"properties",void 0),o=(0,i.Cg)([(0,s.$K)("esri.rest.knowledgeGraph.GraphObject")],o)},83221:(e,t,n)=>{n.d(t,{A:()=>y});var i=n(4576),r=n(49186),s=n(65529),o=n(53966),a=n(70328),l=n(19419),p=n(90708),d=n(6518),u=n(51441),c=n(37730);const h=(0,a.vt)();class y{constructor(e){this.geometryInfo=e,this._boundsStore=new d.F,this._featuresById=new Map,this._usedMemory=0,this.events=new s.bk,this.featureAdapter=c.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach(t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,n,i,r]=this.fullBounds;return{xmin:t,ymin:n,xmax:i,ymax:r,spatialReference:(0,u.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map(e=>this._upsert(e));return this._emitChanged(),t.filter(i.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const n of e){const e=this._boundsStore.get(n.objectId);e&&t((0,a.Jt)(h,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const n=this._featuresById.get(t);let i;if(n?(e.displayId=n.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(n)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,p.jQ)(null!=i?i:(0,l.vt)(),e.geometry),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const n=this._featuresById.get(t);if(!n)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(n)??0;const{geometry:i,attributes:s}=e;for(const e in s)n.attributes[e]=s[e];return i&&(n.geometry=i,this._boundsStore.set(t,(0,p.jQ)((0,l.vt)(),i)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(n)??0,n}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8487],{620:(t,e,s)=>{s.d(e,{O_:()=>f,vA:()=>i}),s(48163),s(87317),(0,s(91829).vt)();class r{constructor(t){this.message=t}toString(){return`AssertException: ${this.message}`}}function i(t,e="Assertion"){if(!t){const t=new Error(e).stack;throw new r(`${e} at ${t}`)}}function f(t,e,s,r){let i,f=(s[0]-t[0])/e[0],u=(r[0]-t[0])/e[0];f>u&&(i=f,f=u,u=i);let n=(s[1]-t[1])/e[1],c=(r[1]-t[1])/e[1];if(n>c&&(i=n,n=c,c=i),f>c||n>u)return!1;n>f&&(f=n),c<u&&(u=c);let h=(s[2]-t[2])/e[2],y=(r[2]-t[2])/e[2];return h>y&&(i=h,h=y,y=i),!(f>y||h>u||(y<u&&(u=y),u<0))}},13030:(t,e,s)=>{s.d(e,{Y$:()=>a,XW:()=>B,qB:()=>L,Qt:()=>Z,My:()=>Q,bf:()=>k,jZ:()=>_,j0:()=>g,Sx:()=>x,E$:()=>M,h:()=>F,P:()=>X,SL:()=>P,gH:()=>T,ZD:()=>E,si:()=>C,mJ:()=>G,UL:()=>W,D6:()=>z,Yi:()=>O,An:()=>I,LC:()=>Y,xs:()=>S,EC:()=>m,Xm:()=>w,Vp:()=>H,zD:()=>K,m8:()=>q,nS:()=>U,H$:()=>j,eI:()=>N,Eq:()=>b,jz:()=>A,Aj:()=>R,E7:()=>J,Y4:()=>tt,TX:()=>D,Uz:()=>V,ml:()=>$,XP:()=>v}),s(34727);var r=s(87317),i=s(91829),f=s(20498);class u{static{this.ElementCount=9}constructor(t,e,s=0,r,i){this.TypedArrayConstructor=t,this.elementCount=9;const f=this.TypedArrayConstructor;void 0===r&&(r=9*f.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:s;this.typedBuffer=null==i?new f(e,u):new f(e,u,(i-s)/f.BYTES_PER_ELEMENT),this.typedBufferStride=r/f.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,s=this.count-e){const r=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,r,this.stride,r+s*this.stride)}getMat(t,e){let s=t*this.typedBufferStride;for(let t=0;t<9;t++)e[t]=this.typedBuffer[s++];return e}setMat(t,e){let s=t*this.typedBufferStride;for(let t=0;t<9;t++)this.typedBuffer[s++]=e[t]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,s){this.typedBuffer[t*this.typedBufferStride+e]=s}copyFrom(t,e,s){const r=this.typedBuffer,i=e.typedBuffer;let f=t*this.typedBufferStride,u=s*e.typedBufferStride;for(let t=0;t<9;++t)r[f++]=i[u++]}get buffer(){return this.typedBuffer.buffer}}class n{static{this.ElementCount=16}constructor(t,e,s=0,r,i){this.TypedArrayConstructor=t,this.elementCount=16;const f=this.TypedArrayConstructor;void 0===r&&(r=16*f.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:s;this.typedBuffer=null==i?new f(e,u):new f(e,u,(i-s)/f.BYTES_PER_ELEMENT),this.typedBufferStride=r/f.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,s=this.count-e){const r=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,r,this.stride,r+s*this.stride)}getMat(t,e){let s=t*this.typedBufferStride;for(let t=0;t<16;t++)e[t]=this.typedBuffer[s++];return e}setMat(t,e){let s=t*this.typedBufferStride;for(let t=0;t<16;t++)this.typedBuffer[s++]=e[t]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,s){this.typedBuffer[t*this.typedBufferStride+e]=s}copyFrom(t,e,s){this.copyFromTypedBuffer(t,e.typedBuffer,s*e.typedBufferStride)}copyFromTypedBuffer(t,e,s){const r=this.typedBuffer;let i=t*this.typedBufferStride;for(let t=0;t<16;++t)r[i++]=e[s++]}get buffer(){return this.typedBuffer.buffer}}class c{static{this.ElementCount=1}constructor(t,e,s=0,r,i){this.TypedArrayConstructor=t,this.elementCount=1;const f=this.TypedArrayConstructor;void 0===r&&(r=f.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:s;this.typedBuffer=null==i?new f(e,u):new f(e,u,(i-s)/f.BYTES_PER_ELEMENT),this.stride=r,this.typedBufferStride=r/f.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride)}sliceBuffer(t,e,s=this.count-e){const r=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,r,this.stride,r+s*this.stride)}get(t){return this.typedBuffer[t*this.typedBufferStride]}set(t,e){this.typedBuffer[t*this.typedBufferStride]=e}get buffer(){return this.typedBuffer.buffer}}var h=s(37585);class y{static{this.ElementCount=2}constructor(t,e,s=0,r,i){this.TypedArrayConstructor=t,this.start=s,this.elementCount=2;const f=this.TypedArrayConstructor;void 0===r&&(r=2*f.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:s;this.typedBuffer=null==i?new f(e,u):new f(e,u,(i-s)/f.BYTES_PER_ELEMENT),this.typedBufferStride=r/f.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,s=this.count-e){const r=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,r,this.stride,r+s*this.stride)}getVec(t,e){return t*=this.typedBufferStride,(0,h.hZ)(e,this.typedBuffer[t],this.typedBuffer[t+1])}setVec(t,e){t*=this.typedBufferStride,this.typedBuffer[t++]=e[0],this.typedBuffer[t]=e[1]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,s){this.typedBuffer[t*this.typedBufferStride+e]=s}setValues(t,e,s){t*=this.typedBufferStride,this.typedBuffer[t++]=e,this.typedBuffer[t]=s}copyFrom(t,e,s){const r=this.typedBuffer,i=e.typedBuffer;let f=t*this.typedBufferStride,u=s*e.typedBufferStride;r[f++]=i[u++],r[f]=i[u]}get buffer(){return this.typedBuffer.buffer}}var l=s(38954);class d{static{this.ElementCount=3}constructor(t,e,s=0,r,i){this.TypedArrayConstructor=t,this.elementCount=3;const f=this.TypedArrayConstructor;void 0===r&&(r=3*f.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:s;this.typedBuffer=null==i?new f(e,u):new f(e,u,(i-s)/f.BYTES_PER_ELEMENT),this.typedBufferStride=r/f.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,s=this.count-e){const r=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,r,this.stride,r+s*this.stride)}getVec(t,e){return t*=this.typedBufferStride,(0,l.h)(e,this.typedBuffer[t],this.typedBuffer[t+1],this.typedBuffer[t+2])}setVec(t,e){t*=this.typedBufferStride,this.typedBuffer[t++]=e[0],this.typedBuffer[t++]=e[1],this.typedBuffer[t]=e[2]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,s){this.typedBuffer[t*this.typedBufferStride+e]=s}setValues(t,e,s,r){t*=this.typedBufferStride,this.typedBuffer[t++]=e,this.typedBuffer[t++]=s,this.typedBuffer[t]=r}copyFrom(t,e,s){const r=this.typedBuffer,i=e.typedBuffer;let f=t*this.typedBufferStride,u=s*e.typedBufferStride;r[f++]=i[u++],r[f++]=i[u++],r[f]=i[u]}get buffer(){return this.typedBuffer.buffer}}class p{static{this.ElementCount=4}constructor(t,e,s=0,r,i){this.TypedArrayConstructor=t,this.start=s,this.elementCount=4;const f=this.TypedArrayConstructor;void 0===r&&(r=4*f.BYTES_PER_ELEMENT);const u=0===e.byteLength?0:s;this.typedBuffer=null==i?new f(e,u):new f(e,u,(i-s)/f.BYTES_PER_ELEMENT),this.typedBufferStride=r/f.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(t,e,s=this.count-e){const r=this.typedBuffer.byteOffset+e*this.stride;return new t(this.buffer,r,this.stride,r+s*this.stride)}getVec(t,e){return t*=this.typedBufferStride,(0,r.c)(e,this.typedBuffer[t++],this.typedBuffer[t++],this.typedBuffer[t++],this.typedBuffer[t])}setVec(t,e){t*=this.typedBufferStride,this.typedBuffer[t++]=e[0],this.typedBuffer[t++]=e[1],this.typedBuffer[t++]=e[2],this.typedBuffer[t]=e[3]}get(t,e){return this.typedBuffer[t*this.typedBufferStride+e]}set(t,e,s){this.typedBuffer[t*this.typedBufferStride+e]=s}setValues(t,e,s,r,i){t*=this.typedBufferStride,this.typedBuffer[t++]=e,this.typedBuffer[t++]=s,this.typedBuffer[t++]=r,this.typedBuffer[t]=i}copyFrom(t,e,s){const r=this.typedBuffer,i=e.typedBuffer;let f=t*this.typedBufferStride,u=s*e.typedBufferStride;r[f++]=i[u++],r[f++]=i[u++],r[f++]=i[u++],r[f]=i[u]}get buffer(){return this.typedBuffer.buffer}}var o=s(620);class B extends c{constructor(t,e=0,s,r){(0,o.vA)(f.SX),super((0,f.pX)(),t,e,s,r),this.elementType="f16"}static{this.ElementType="f16"}}class a extends c{constructor(t,e=0,s,r){super(Float32Array,t,e,s,r),this.elementType="f32"}static{this.ElementType="f32"}}class E extends y{constructor(t,e=0,s,r){(0,o.vA)(f.SX),super((0,f.pX)(),t,e,s,r),this.elementType="f16"}slice(t,e){return this.sliceBuffer(E,t,e)}static{this.ElementType="f16"}}class T extends y{constructor(t,e=0,s,r){super(Float32Array,t,e,s,r),this.elementType="f32"}slice(t,e){return this.sliceBuffer(T,t,e)}static{this.ElementType="f32"}}class m extends d{constructor(t,e=0,s,r){(0,o.vA)(f.SX),super((0,f.pX)(),t,e,s,r),this.elementType="f16"}slice(t,e){return this.sliceBuffer(m,t,e)}static{this.ElementType="f16"}}class S extends d{constructor(t,e=0,s,r){super(Float32Array,t,e,s,r),this.elementType="f32"}slice(t,e){return this.sliceBuffer(S,t,e)}static fromTypedArray(t,e){return new S(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}static{this.ElementType="f32"}}class A extends p{constructor(t,e=0,s,r){(0,o.vA)(f.SX),super((0,f.pX)(),t,e,s,r),this.elementType="f16"}slice(t,e){return this.sliceBuffer(A,t,e)}static{this.ElementType="f16"}}class b extends p{constructor(t,e=0,s,r){super(Float32Array,t,e,s,r),this.elementType="f32"}slice(t,e){return this.sliceBuffer(b,t,e)}static{this.ElementType="f32"}}class _ extends u{constructor(t,e=0,s,r){super(Float32Array,t,e,s,r),this.elementType="f32"}slice(t,e){return this.sliceBuffer(_,t,e)}static{this.ElementType="f32"}}class g extends u{constructor(t,e=0,s,r){super(Float64Array,t,e,s,r),this.elementType="f64"}slice(t,e){return this.sliceBuffer(g,t,e)}static{this.ElementType="f64"}}class x extends n{constructor(t,e=0,s,r){super(Float32Array,t,e,s,r),this.elementType="f32"}slice(t,e){return this.sliceBuffer(x,t,e)}static{this.ElementType="f32"}}class M extends n{constructor(t,e=0,s,r){super(Float64Array,t,e,s,r),this.elementType="f64"}slice(t,e){return this.sliceBuffer(M,t,e)}static{this.ElementType="f64"}}class L extends c{constructor(t,e=0,s,r){super(Float64Array,t,e,s,r),this.elementType="f64"}slice(t,e){return this.sliceBuffer(L,t,e)}static{this.ElementType="f64"}}class C extends y{constructor(t,e=0,s,r){super(Float64Array,t,e,s,r),this.elementType="f64"}slice(t,e){return this.sliceBuffer(C,t,e)}static{this.ElementType="f64"}}class w extends d{constructor(t,e=0,s,r){super(Float64Array,t,e,s,r),this.elementType="f64"}slice(t,e){return this.sliceBuffer(w,t,e)}static fromTypedArray(t,e){return new w(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}static{this.ElementType="f64"}}class R extends p{constructor(t,e=0,s,r){super(Float64Array,t,e,s,r),this.elementType="f64"}slice(t,e){return this.sliceBuffer(R,t,e)}static{this.ElementType="f64"}}class P extends c{constructor(t,e=0,s,r){super(Uint8Array,t,e,s,r),this.elementType="u8"}slice(t,e){return this.sliceBuffer(P,t,e)}static{this.ElementType="u8"}}class Y extends y{constructor(t,e=0,s,r){super(Uint8Array,t,e,s,r),this.elementType="u8"}slice(t,e){return this.sliceBuffer(Y,t,e)}static{this.ElementType="u8"}}class N extends d{constructor(t,e=0,s,r){super(Uint8Array,t,e,s,r),this.elementType="u8"}slice(t,e){return this.sliceBuffer(N,t,e)}static fromTypedArray(t,e){return new N(t.buffer,t.byteOffset,e,t.byteOffset+t.byteLength)}static{this.ElementType="u8"}}class v extends p{constructor(t,e=0,s,r){super(Uint8Array,t,e,s,r),this.elementType="u8"}slice(t,e){return this.sliceBuffer(v,t,e)}static{this.ElementType="u8"}}class F extends c{constructor(t,e=0,s,r){super(Uint16Array,t,e,s,r),this.elementType="u16"}slice(t,e){return this.sliceBuffer(F,t,e)}static{this.ElementType="u16"}}class O extends y{constructor(t,e=0,s,r){super(Uint16Array,t,e,s,r),this.elementType="u16"}slice(t,e){return this.sliceBuffer(O,t,e)}static{this.ElementType="u16"}}class U extends d{constructor(t,e=0,s,r){super(Uint16Array,t,e,s,r),this.elementType="u16"}slice(t,e){return this.sliceBuffer(U,t,e)}static{this.ElementType="u16"}}class V extends p{constructor(t,e=0,s,r){super(Uint16Array,t,e,s,r),this.elementType="u16"}slice(t,e){return this.sliceBuffer(V,t,e)}static{this.ElementType="u16"}}class X extends c{constructor(t,e=0,s,r){super(Uint32Array,t,e,s,r),this.elementType="u32"}slice(t,e){return this.sliceBuffer(X,t,e)}static{this.ElementType="u32"}}class I extends y{constructor(t,e=0,s,r){super(Uint32Array,t,e,s,r),this.elementType="u32"}slice(t,e){return this.sliceBuffer(I,t,e)}static{this.ElementType="u32"}}class j extends d{constructor(t,e=0,s,r){super(Uint32Array,t,e,s,r),this.elementType="u32"}slice(t,e){return this.sliceBuffer(j,t,e)}static{this.ElementType="u32"}}class $ extends p{constructor(t,e=0,s,r){super(Uint32Array,t,e,s,r),this.elementType="u32"}slice(t,e){return this.sliceBuffer($,t,e)}static{this.ElementType="u32"}}class k extends c{constructor(t,e=0,s,r){super(Int8Array,t,e,s,r),this.elementType="i8"}slice(t,e){return this.sliceBuffer(k,t,e)}static{this.ElementType="i8"}}class z extends y{constructor(t,e=0,s,r){super(Int8Array,t,e,s,r),this.elementType="i8"}slice(t,e){return this.sliceBuffer(z,t,e)}static{this.ElementType="i8"}}class q extends d{constructor(t,e=0,s,r){super(Int8Array,t,e,s,r),this.elementType="i8"}slice(t,e){return this.sliceBuffer(q,t,e)}static{this.ElementType="i8"}}class D extends p{constructor(t,e=0,s,r){super(Int8Array,t,e,s,r),this.elementType="i8"}slice(t,e){return this.sliceBuffer(D,t,e)}static{this.ElementType="i8"}}class Z extends c{constructor(t,e=0,s,r){super(Int16Array,t,e,s,r),this.elementType="i16"}slice(t,e){return this.sliceBuffer(Z,t,e)}static{this.ElementType="i16"}}class G extends y{constructor(t,e=0,s,r){super(Int16Array,t,e,s,r),this.elementType="i16"}slice(t,e){return this.sliceBuffer(G,t,e)}static{this.ElementType="i16"}}class H extends d{constructor(t,e=0,s,r){super(Int16Array,t,e,s,r),this.elementType="i16"}slice(t,e){return this.sliceBuffer(H,t,e)}static{this.ElementType="i16"}}class J extends p{constructor(t,e=0,s,r){super(Int16Array,t,e,s,r),this.elementType="i16"}slice(t,e){return this.sliceBuffer(J,t,e)}static{this.ElementType="i16"}}class Q extends c{constructor(t,e=0,s,r){super(Int32Array,t,e,s,r),this.elementType="i32"}slice(t,e){return this.sliceBuffer(Q,t,e)}static{this.ElementType="i32"}}class W extends y{constructor(t,e=0,s,r){super(Int32Array,t,e,s,r),this.elementType="i32"}slice(t,e){return this.sliceBuffer(W,t,e)}static{this.ElementType="i32"}}class K extends d{constructor(t,e=0,s,r){super(Int32Array,t,e,s,r),this.elementType="i32"}slice(t,e){return this.sliceBuffer(K,t,e)}static{this.ElementType="i32"}}class tt extends p{constructor(t,e=0,s,r){super(Int32Array,t,e,s,r),this.elementType="i32"}slice(t,e){return this.sliceBuffer(tt,t,e)}static{this.ElementType="i32"}}(0,i.vt)()},20498:(t,e,s)=>{s.d(e,{SX:()=>f,pX:()=>i});let r=globalThis.Float16Array;function i(){return r}let f=!!r},65686:(t,e,s)=>{s.d(e,{a:()=>f,b:()=>y,l:()=>h,n:()=>n,t:()=>u});var r=s(40876),i=(s(44208),s(53966));function f(t,e,s){u(t.typedBuffer,e.typedBuffer,s,t.typedBufferStride,e.typedBufferStride)}function u(t,e,s,r=4,i=r){if(t.length/r!==e.length/i)return;const f=t.length/r,u=s[0],n=s[1],c=s[2],h=s[3],y=s[4],l=s[5],d=s[6],p=s[7],o=s[8];let B=0,a=0;for(let s=0;s<f;s++){const s=e[B],f=e[B+1],E=e[B+2],T=e[B+3];t[a]=u*s+h*f+d*E,t[a+1]=n*s+y*f+p*E,t[a+2]=c*s+l*f+o*E,t[a+3]=T,B+=i,a+=r}}function n(t,e){const s=Math.min(t.count,e.count),r=t.typedBuffer,i=t.typedBufferStride,f=e.typedBuffer,u=e.typedBufferStride;for(let t=0;t<s;t++){const e=t*i,s=t*u,n=f[s],c=f[s+1],h=f[s+2],y=n*n+c*c+h*h;if(y>0){const t=1/Math.sqrt(y);r[e]=t*n,r[e+1]=t*c,r[e+2]=t*h}}}function c(t,e,s,r=4){const i=Math.min(t.length/r,e.count),f=e.typedBuffer,u=e.typedBufferStride;let n=0,c=0;for(let e=0;e<i;e++)t[c]=s*f[n],t[c+1]=s*f[n+1],t[c+2]=s*f[n+2],t[c+3]=s*f[n+3],n+=u,c+=r}function h(t,e,s,r){y(t.typedBuffer,e,s,r,t.typedBufferStride)}function y(t,e,s,i,f=4){const u=Math.min(t.length/f,e.count),n=e.typedBuffer,c=e.typedBufferStride;let h=0,y=0;const l=1/r.Tf;for(let e=0;e<u;e++)t[y]=i*(s*n[h])**l,t[y+1]=i*(s*n[h+1])**l,t[y+2]=i*(s*n[h+2])**l,t[y+3]=i*s*n[h+3],h+=c,y+=f}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:y,linearToSRGBView:h,normalize:n,scale:c,scaleView:function(t,e,s){c(t.typedBuffer,e,s,t.typedBufferStride)},transformMat3:u,transformMat3View:f,transformMat4:function(t,e,s,r=4,f=r){if(t.length/r!==e.length/f)return void i.A.getLogger("esri.views.3d.support.buffer.math").error("source and destination buffers need to have the same number of elements");const u=t.length/r,n=s[0],c=s[1],h=s[2],y=s[3],l=s[4],d=s[5],p=s[6],o=s[7],B=s[8],a=s[9],E=s[10],T=s[11],m=s[12],S=s[13],A=s[14],b=s[15];let _=0,g=0;for(let s=0;s<u;s++){const s=e[_],i=e[_+1],u=e[_+2],x=e[_+3];t[g]=n*s+l*i+B*u+m*x,t[g+1]=c*s+d*i+a*u+S*x,t[g+2]=h*s+p*i+E*u+A*x,t[g+3]=y*s+o*i+T*u+b*x,_+=f,g+=r}},transformMat4View:function(t,e,s){if(t.count!==e.count)return;const r=t.count,i=s[0],f=s[1],u=s[2],n=s[3],c=s[4],h=s[5],y=s[6],l=s[7],d=s[8],p=s[9],o=s[10],B=s[11],a=s[12],E=s[13],T=s[14],m=s[15],S=t.typedBuffer,A=t.typedBufferStride,b=e.typedBuffer,_=e.typedBufferStride;for(let t=0;t<r;t++){const e=t*A,s=t*_,r=b[s],g=b[s+1],x=b[s+2],M=b[s+3];S[e]=i*r+c*g+d*x+a*M,S[e+1]=f*r+h*g+p*x+E*M,S[e+2]=u*r+y*g+o*x+T*M,S[e+3]=n*r+l*g+B*x+m*M}}},Symbol.toStringTag,{value:"Module"}))}}]);