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

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 (230) 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/arcade/arcadeAsyncRuntime.js +1 -1
  6. package/arcade/arcadeCompiler.js +1 -1
  7. package/arcade/featureSetUtils.js +1 -1
  8. package/arcade/featureset/actions/Adapted.js +1 -1
  9. package/arcade/featureset/actions/AttributeFilter.js +1 -1
  10. package/arcade/featureset/actions/GroupBy.js +1 -1
  11. package/arcade/featureset/actions/SpatialFilter.js +1 -1
  12. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  13. package/arcade/featureset/sources/FeatureLayerMemory.js +1 -1
  14. package/arcade/featureset/sources/FeatureLayerOGC.js +1 -1
  15. package/arcade/featureset/sources/FeatureLayerRelated.js +1 -1
  16. package/arcade/featureset/support/FeatureSet.js +1 -1
  17. package/arcade/featureset/support/FeatureSetIterator.js +1 -1
  18. package/assets/esri/core/workers/RemoteClient.js +1 -1
  19. package/assets/esri/core/workers/chunks/014dbe6fa93a277b08f7.js +1 -0
  20. package/assets/esri/core/workers/chunks/{51355866a0dcf41cfded.js → 0a5427127634738aa239.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{c7c721de93bc8688e13c.js → 1d4ea8db272655c0608c.js} +1 -1
  22. package/assets/esri/core/workers/chunks/1d566539ff6fb6ac798c.js +1 -0
  23. package/assets/esri/core/workers/chunks/1de216d9850c39c1735d.js +1 -0
  24. package/assets/esri/core/workers/chunks/262232437d37a7460b11.js +1 -0
  25. package/assets/esri/core/workers/chunks/{1817cf11e85afca947d3.js → 328106e181e5957ceaa5.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{d3db7244fac7398cc700.js → 4b6a44c6265c8959abd8.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{f1ac1c8b1331ec79e898.js → 59ce992d3a5e7c32b9fb.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{8a946cbc816f373c136b.js → 5e30acfda04f7fc2b676.js} +1 -1
  29. package/assets/esri/core/workers/chunks/6330d8767ba1d5329daa.js +1 -0
  30. package/assets/esri/core/workers/chunks/{3f03165487c1c2340fff.js → 690a40d2eef52bfc149f.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{dd34d56caafa38d4b8e4.js → 7aa730e5ac7b268e3c98.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{1fa55d4c4b092a98bdd7.js → b56c07c0b43cb1999070.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{24a3c6f0154787968724.js → c5967133f3ba34a883f8.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{bfb9cbe59d36d18f9157.js → cda5c95fd49b8901f7d4.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{b451dc416eebd0931ef8.js → ce8fc1ca229d53a4b68d.js} +6 -6
  36. package/assets/esri/core/workers/chunks/{c9e7cc5d853908ab5b2f.js → ce99abfdcd71ff9e4e36.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{726a797f5df7eeee0b3d.js → d786b17cc9062b1450ac.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{2e76fbd3c874300fc4a7.js → de3da4d31a7529761565.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{eb6218634a492667506a.js → e501d68a1464805c4b4e.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{33431e8131f6017de2f9.js → e7f4d135ef9665de1468.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{d8623f5f13a084e439c2.js → e9bc3c6482ba778c9349.js} +37 -37
  42. package/assets/esri/core/workers/chunks/{7420fa18ba12014b22ea.js → ee67c8a7c1f8b482cd99.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{abb05a903440d97a6a74.js → f441fc74451330384fb0.js} +1 -1
  44. package/assets/esri/core/workers/chunks/f609b256df9eb3803464.js +1 -0
  45. package/assets/esri/core/workers/chunks/f97a7cb367634353177d.js +1 -0
  46. package/chunks/CloudsComposition.glsl.js +1 -1
  47. package/chunks/ComponentShader.glsl.js +2 -2
  48. package/chunks/DefaultMaterial.glsl.js +1 -1
  49. package/chunks/GaussianSplat.glsl.js +2 -2
  50. package/chunks/Laserlines.glsl.js +1 -1
  51. package/chunks/Path.glsl.js +1 -1
  52. package/chunks/RealisticTree.glsl.js +1 -1
  53. package/chunks/Terrain.glsl.js +34 -36
  54. package/chunks/WaterSurface.glsl.js +1 -1
  55. package/chunks/boundedPlane.js +1 -1
  56. package/chunks/cameraUtilsSpherical.js +1 -1
  57. package/chunks/vec32.js +1 -1
  58. package/config.js +1 -1
  59. package/core/has.js +1 -1
  60. package/core/iteratorUtils.js +1 -1
  61. package/core/libs/gl-matrix-2/math/quat.js +1 -1
  62. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  63. package/geometry/support/lineSegment.js +1 -1
  64. package/geometry/support/meshUtils/merge.js +1 -1
  65. package/geometry/support/sphere.js +1 -1
  66. package/interfaces.d.ts +35 -5
  67. package/kernel.js +1 -1
  68. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  69. package/layers/VoxelWasmPerSceneView.js +1 -1
  70. package/layers/knowledgeGraph/layerUtils.js +1 -1
  71. package/layers/orientedImagery/transformations/worldToImage.js +1 -1
  72. package/layers/support/csvUtils.js +1 -1
  73. package/layers/video/VideoController.js +1 -1
  74. package/layers/voxel/VoxelVolume.js +1 -1
  75. package/package.json +5 -5
  76. package/support/revision.js +1 -1
  77. package/views/2d/analysis/ElevationProfile/ElevationProfileLineVisualization2D.js +1 -1
  78. package/views/2d/interactive/SegmentLabels2D.js +1 -1
  79. package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
  80. package/views/3d/FocusAreasView.js +1 -1
  81. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  82. package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
  83. package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
  84. package/views/3d/analysis/ElevationProfile/ElevationProfileLineVisualization3D.js +1 -1
  85. package/views/3d/analysis/ElevationProfile/ElevationProfileVisualization3D.js +1 -1
  86. package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
  87. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  88. package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
  89. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  90. package/views/3d/analysis/Viewshed/ViewshedScaleOrientManipulation.js +1 -1
  91. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  92. package/views/3d/analysis/Viewshed/ViewshedSubVisualization.js +1 -1
  93. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  94. package/views/3d/animation/pointToPoint/Camera.js +1 -1
  95. package/views/3d/camera/constraintUtils/distance.js +1 -1
  96. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  97. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  98. package/views/3d/environment/CloudsParameters.js +1 -1
  99. package/views/3d/environment/EnvironmentManager.js +1 -1
  100. package/views/3d/environment/MarsAtmosphere.js +1 -1
  101. package/views/3d/interactive/SegmentLabels3D.js +1 -1
  102. package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
  103. package/views/3d/interactive/editingTools/media/MediaElementManipulator3D.js +1 -1
  104. package/views/3d/interactive/editingTools/reshape/edgeOffsetUtils.js +1 -1
  105. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
  106. package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
  107. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  108. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  109. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  110. package/views/3d/layers/I3SMeshView3D.js +1 -1
  111. package/views/3d/layers/ImagerySubView3D.js +1 -1
  112. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  113. package/views/3d/layers/RouteLayerView3D.js +1 -1
  114. package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
  115. package/views/3d/layers/graphics/Graphics3DScaleVisibility.js +1 -1
  116. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  117. package/views/3d/layers/graphics/pipeline/rendering/DirectRenderer.js +1 -1
  118. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  119. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  120. package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
  121. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  122. package/views/3d/state/Frustum.js +1 -1
  123. package/views/3d/state/ViewStateManager.js +1 -1
  124. package/views/3d/state/controllers/FovController.js +1 -1
  125. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  126. package/views/3d/state/controllers/momentum/ZoomPlanarMomentumController.js +1 -1
  127. package/views/3d/support/FrustumExtentIntersection.js +1 -1
  128. package/views/3d/support/cameraUtils.js +1 -1
  129. package/views/3d/support/intersectionUtils.js +1 -1
  130. package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
  131. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  132. package/views/3d/support/pointsOfInterest/Focus.js +1 -1
  133. package/views/3d/support/viewpointUtils.js +1 -1
  134. package/views/3d/terrain/OverlayManager.js +1 -1
  135. package/views/3d/terrain/OverlayRenderer.js +1 -1
  136. package/views/3d/terrain/PatchRenderData.js +1 -1
  137. package/views/3d/terrain/SphericalPatch.js +1 -1
  138. package/views/3d/terrain/TerrainRenderer.js +1 -1
  139. package/views/3d/terrain/Tile.js +1 -1
  140. package/views/3d/terrain/TileCompositor.js +1 -1
  141. package/views/3d/webgl/RenderCamera.js +1 -1
  142. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  143. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  144. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  145. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  146. package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +4 -7
  147. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +6 -6
  148. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js +4 -4
  149. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +19 -15
  150. package/views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js +2 -2
  151. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +1 -1
  152. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +5 -5
  153. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js +14 -14
  154. package/views/3d/webgl-engine/core/shaderLibrary/util/BlendModes.glsl.js +16 -37
  155. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  156. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  157. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  158. package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
  159. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  160. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  161. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  162. package/views/3d/webgl-engine/lib/Normals.js +1 -1
  163. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  164. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  165. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  166. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  167. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  168. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  169. package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
  170. package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
  171. package/views/3d/webgl-engine/lib/triangleIntersectionUtils.js +1 -1
  172. package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
  173. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  174. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  175. package/views/3d/webgl-engine/materials/DefaultTechniqueConfiguration.js +1 -1
  176. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  177. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  178. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  179. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  180. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  181. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  182. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  183. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  184. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  185. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  186. package/views/3d/webgl-engine/materials/SlicePlaneMaterial.js +1 -1
  187. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  188. package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
  189. package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
  190. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  191. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  192. package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
  193. package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
  194. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  195. package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
  196. package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
  197. package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +9 -10
  198. package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
  199. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  200. package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +1 -1
  201. package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
  202. package/views/3d/webgl-engine/shaders/TerrainTechnique.js +1 -1
  203. package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
  204. package/views/GroundView.js +1 -1
  205. package/views/SceneView.js +1 -1
  206. package/views/analysis/ElevationProfile/elevationProfileVisualizationUtils.js +1 -1
  207. package/views/interactive/GraphicManipulator.js +1 -1
  208. package/views/interactive/coordinateHelper.js +1 -1
  209. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  210. package/views/interactive/sketch/constraints.js +1 -1
  211. package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
  212. package/views/interactive/snapping/featureSources/sceneLayerSource/sceneLayerSnappingUtils.js +1 -1
  213. package/views/interactive/snapping/hints/LineSnappingHint.js +1 -1
  214. package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
  215. package/views/layers/LayerView.js +1 -1
  216. package/views/navigation/PanSphericalMomentumEstimator.js +1 -1
  217. package/views/support/LayerViewManager.js +1 -1
  218. package/views/support/euclideanAreaMeasurementUtils.js +1 -1
  219. package/views/support/euclideanLengthMeasurementUtils.js +1 -1
  220. package/views/support/geodesicLengthMeasurementUtils.js +1 -1
  221. package/views/support/geometry3dUtils.js +1 -1
  222. package/webmap/utils.js +1 -1
  223. package/widgets/Sketch/SketchViewModel.js +1 -1
  224. package/assets/esri/core/workers/chunks/11687718c8635eb7bf37.js +0 -1
  225. package/assets/esri/core/workers/chunks/15c1a48e8cd2a8882d85.js +0 -1
  226. package/assets/esri/core/workers/chunks/1b9e7d416c9f00e020bb.js +0 -1
  227. package/assets/esri/core/workers/chunks/5000a37fba27464d10ca.js +0 -1
  228. package/assets/esri/core/workers/chunks/b075d3714fab0591d67c.js +0 -1
  229. package/assets/esri/core/workers/chunks/d8975dd7b85b5d065ee4.js +0 -1
  230. package/assets/esri/core/workers/chunks/f43e1e1a1b2eb737e00c.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1312],{38954:(t,e,n)=>{n.d(e,{A:()=>h,B:()=>Z,C:()=>c,D:()=>M,E:()=>P,F:()=>_,G:()=>q,H:()=>O,a:()=>U,b:()=>o,c:()=>y,d:()=>s,e:()=>u,f:()=>w,g:()=>S,h:()=>a,i:()=>l,j:()=>g,l:()=>R,m:()=>L,n:()=>v,o:()=>b,p:()=>E,q:()=>x,r:()=>I,s:()=>A,t:()=>T,u:()=>d,v:()=>G,w:()=>j,x:()=>p,y:()=>m,z:()=>f});var i=n(51850),r=n(34304);function o(t){const e=t[0],n=t[1],i=t[2];return Math.sqrt(e*e+n*n+i*i)}function s(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function a(t,e,n,i){return t[0]=e,t[1]=n,t[2]=i,t}function l(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function u(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function h(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function c(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function d(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t}function f(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function m(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}function p(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}function g(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function y(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t[2]=e[2]+n[2]*i,t}function M(t,e){const n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2];return Math.sqrt(n*n+i*i+r*r)}function A(t,e){const n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2];return n*n+i*i+r*r}function _(t){const e=t[0],n=t[1],i=t[2];return e*e+n*n+i*i}function x(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function b(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function v(t,e){const n=e[0],i=e[1],r=e[2];let o=n*n+i*i+r*r;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t}function S(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function w(t,e,n){const i=e[0],r=e[1],o=e[2],s=n[0],a=n[1],l=n[2];return t[0]=r*l-o*a,t[1]=o*s-i*l,t[2]=i*a-r*s,t}function R(t,e,n,i){const r=e[0],o=e[1],s=e[2];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t[2]=s+i*(n[2]-s),t}function E(t,e,n){const i=e[0],r=e[1],o=e[2];return t[0]=n[0]*i+n[4]*r+n[8]*o+n[12],t[1]=n[1]*i+n[5]*r+n[9]*o+n[13],t[2]=n[2]*i+n[6]*r+n[10]*o+n[14],t}function T(t,e,n){const i=e[0],r=e[1],o=e[2];return t[0]=i*n[0]+r*n[3]+o*n[6],t[1]=i*n[1]+r*n[4]+o*n[7],t[2]=i*n[2]+r*n[5]+o*n[8],t}function I(t,e,n){const i=n[0],r=n[1],o=n[2],s=n[3],a=e[0],l=e[1],u=e[2],h=r*u-o*l,c=o*a-i*u,d=i*l-r*a,f=r*d-o*c,m=o*h-i*d,p=i*c-r*h,g=2*s;return t[0]=a+h*g+2*f,t[1]=l+c*g+2*m,t[2]=u+d*g+2*p,t}const k=(0,i.vt)(),C=(0,i.vt)();function L(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function q(t,e){if(t===e)return!0;const n=t[0],i=t[1],o=t[2],s=e[0],a=e[1],l=e[2],u=(0,r.FD)();return Math.abs(n-s)<=u*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(i-a)<=u*Math.max(1,Math.abs(i),Math.abs(a))&&Math.abs(o-l)<=u*Math.max(1,Math.abs(o),Math.abs(l))}function P(t,e,n){const i=n[0]-e[0],r=n[1]-e[1],o=n[2]-e[2];let s=i*i+r*r+o*o;return s>0?(s=1/Math.sqrt(s),t[0]=i*s,t[1]=r*s,t[2]=o*s,t):(t[0]=0,t[1]=0,t[2]=0,t)}const U=u,D=h,N=c,O=M,G=A,Z=o,j=_;Object.freeze(Object.defineProperty({__proto__:null,abs:d,add:l,angle:function(t,e){v(k,t),v(C,e);const n=S(k,C);return n>1?0:n<-1?Math.PI:Math.acos(n)},bezier:function(t,e,n,i,r,o){const s=1-o,a=s*s,l=o*o,u=a*s,h=3*o*a,c=3*l*s,d=l*o;return t[0]=e[0]*u+n[0]*h+i[0]*c+r[0]*d,t[1]=e[1]*u+n[1]*h+i[1]*c+r[1]*d,t[2]=e[2]*u+n[2]*h+i[2]*c+r[2]*d,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},clamp:function(t,e=0,n=1){return t[0]=Math.min(Math.max(t[0],e),n),t[1]=Math.min(Math.max(t[1],e),n),t[2]=Math.min(Math.max(t[2],e),n),t},copy:s,cross:w,crossAndNormalize:function(t,e,n){const i=e[0],r=e[1],o=e[2],s=n[0],a=n[1],l=n[2],u=r*l-o*a,h=o*s-i*l,c=i*a-r*s,d=Math.sqrt(u*u+h*h+c*c);return t[0]=u/d,t[1]=h/d,t[2]=c/d,t},direction:P,dist:O,distance:M,div:N,divide:c,dot:S,equals:q,exactEquals:L,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,n,i,r,o){const s=o*o,a=s*(2*o-3)+1,l=s*(o-2)+o,u=s*(o-1),h=s*(3-2*o);return t[0]=e[0]*a+n[0]*l+i[0]*u+r[0]*h,t[1]=e[1]*a+n[1]*l+i[1]*u+r[1]*h,t[2]=e[2]*a+n[2]*l+i[2]*u+r[2]*h,t},inverse:b,len:Z,length:o,lerp:R,max:p,min:m,mul:D,multiply:h,negate:x,normalize:v,random:function(t,e=1){const n=r.Ov,i=2*n()*Math.PI,o=2*n()-1,s=Math.sqrt(1-o*o)*e;return t[0]=Math.cos(i)*s,t[1]=Math.sin(i)*s,t[2]=o*e,t},rotateX:function(t,e,n,i){const r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[0],o[1]=r[1]*Math.cos(i)-r[2]*Math.sin(i),o[2]=r[1]*Math.sin(i)+r[2]*Math.cos(i),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},rotateY:function(t,e,n,i){const r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[2]*Math.sin(i)+r[0]*Math.cos(i),o[1]=r[1],o[2]=r[2]*Math.cos(i)-r[0]*Math.sin(i),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},rotateZ:function(t,e,n,i){const r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[0]*Math.cos(i)-r[1]*Math.sin(i),o[1]=r[0]*Math.sin(i)+r[1]*Math.cos(i),o[2]=r[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:g,scaleAndAdd:y,set:a,sign:f,sqrDist:G,sqrLen:j,squaredDistance:A,squaredLength:_,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:U,subtract:u,transformMat3:T,transformMat4:E,transformQuat:I},Symbol.toStringTag,{value:"Module"}))},61528:(t,e,n)=>{n.r(e),n.d(e,{default:()=>C});var i=n(31635),r=n(11254),o=n(49186),s=n(44208),a=n(53966),l=n(25728),u=n(74887),h=n(36708),c=n(91429),d=n(87024),f=n(5443),m=n(16930),p=n(4146),g=n(52136),y=n(18768),M=n(69208),A=n(16131),_=n(8303),x=n(25036),b=n(10873),v=n(58325),S=n(88546),w=n(20655),R=n(56776),E=n(97159),T=n(16215),I=n(36005);let k=class extends((0,y.b)((0,A.q)((0,_.A)((0,x.j)((0,l.P)((0,M.d)((0,g.p)(p.A)))))))){readModifications(t,e,n){this._modificationsSource={url:(0,E.f)(t,n),context:n}}initialize(){this.addHandles((0,h.on)(()=>this.modifications,"after-changes",()=>this.modifications=this.modifications,h.OH))}constructor(t){super(t),this.operationalLayerType="IntegratedMesh3DTilesLayer",this.modifications=null,this._modificationsSource=null,this.spatialReference=new m.A({wkid:4326,vcsWkid:115700}),this.fullExtent=new f.A(-180,-90,180,90,this.spatialReference),this.url=null,this.type="integrated-mesh-3dtiles",this.path=null,this.minScale=0,this.maxScale=0,this._rootTilesetJSON=null,this._rootTileset=null,this._key=null,this._session=null,this._rootRequestPromise=null}set elevationInfo(t){null!=t&&"absolute-height"!==t.mode||this._set("elevationInfo",t),this._validateElevationInfo(t)}async load(t){return this.addResolvingPromise(this._doLoad(t)),this}get rootTilesetJSON(){return this._rootTilesetJSON}get rootTileset(){return this._rootTileset}get key(){return this._key}get session(){return this._session}_findSessionParameter(t){const e=[t];for(;e?.length>0;){const t=e.pop();if(!t)return;for(const[n,i]of Object.entries(t)){if("uri"===n)try{const t=new URL("https://tmp"+i).searchParams.get("session");if(t)return t}catch(t){}"object"==typeof i&&null!==i&&e.push(i)}}return null}async requestRootAndSession(t){const e=(t,e)=>new o.A("3dtiles-init:"+t,e);return this._rootRequestPromise||(this._rootRequestPromise=new Promise((n,i)=>{this.url||i(e("url-missing","Layer url missing")),this._key=this.customParameters?this.customParameters.key:null,new Promise((t,n)=>{if(this.replacesTerrain&&!this._key){const i=this.portalItem?.portal||this.parent?.portalItem?.portal||w.A.getDefault();i.signIn().then(()=>{i.g3dTilesEnabled?(0,r.A)(i.restUrl+"/portals/self/modules/g3dtiles",{responseType:"json",query:{f:"json"}}).then(e=>{this._key=e.data.keyString,t()},()=>n(e("g3dtiles-key-error","Error fetching Google 3D Tiles key from portal"))):n(e("g3dTilesEnabled-false","Google 3D Tiles are not enabled on Portal "+i.url))},()=>n(e("sign-in-failed","Error signing in to Portal")))}else t()}).then(()=>{(0,r.A)(this.url,{query:this._key?{key:this._key,token:this.apiKey}:{token:this.apiKey},responseType:"array-buffer",signal:t}).then(t=>{try{this._rootTilesetJSON=JSON.parse((new TextDecoder).decode(t.data))}catch(t){return void i(e("root-parse-failed","Error parsing root tile, details: "+t))}this._rootTilesetJSON?(this._session=this._findSessionParameter(this._rootTilesetJSON),this._rootTileset=t.data,this.fullExtent=(0,S.uB)(this._rootTilesetJSON),n(),this._rootRequestPromise=null):i(e("root-is-null","Root tile is null."))},t=>{(0,u.QP)(t),i(e("root-load-failed","Error loading root tile")),this._rootRequestPromise=null,a.A.getLogger("IntegratedMesh3DTilesLayer").error("Layer loading failed",t)})},t=>i(t))})),this._rootRequestPromise}async _doLoad(t){const e=null!=t?t.signal:null;if(this.isUsedAsGroundLayer&&!(0,s.A)("enable-feature:basemap-groundlayers"))throw new o.A("3dtiles-init:not-supported-in-groundlayers","Layer is not supported in basemap.");try{await this.loadFromPortal({supportedTypes:["3DTiles Service"],validateItem:t=>{if(t.typeKeywords?.includes("IntegratedMesh"))return!0;throw new o.A("portal:invalid-layer-item-type","Invalid layer item, expected '${expectedType}' ",{expectedType:"3DTiles Service containing IntegratedMesh"})}},t)}catch(t){(0,u.QP)(t)}if(null!=this._modificationsSource){const e=await v.A.fromUrl(this._modificationsSource.url,this.spatialReference,t);this.setAtOrigin("modifications",e,this._modificationsSource.context.origin),this._modificationsSource=null}await this.requestRootAndSession(e)}beforeSave(){if(null!=this._modificationsSource)return this.load().then(()=>{},()=>{})}get hasAttributionData(){return!1}_validateElevationInfo(t){const e="Integrated mesh 3d tiles layers";(0,R.XF)(a.A.getLogger(this),(0,R.B)(e,"absolute-height",t)),(0,R.XF)(a.A.getLogger(this),(0,R.tW)(e,t))}get replacesTerrain(){return!!(0,s.A)("enable-feature:basemap-groundlayers")&&this.hasGoogleUrl&&this.isUsedAsGroundLayer}get isUsedAsGroundLayer(){return(0,T.S)(this.parent)}get hasGoogleUrl(){return!!this.url?.match(/.+\.googleapis.com/)}};(0,i.Cg)([(0,c.MZ)({type:["IntegratedMesh3DTilesLayer"]})],k.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,c.MZ)({type:v.A,clonable:t=>t.clone()}),(0,d.P)({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],k.prototype,"modifications",void 0),(0,i.Cg)([(0,I.w)(["web-scene","portal-item"],"modifications")],k.prototype,"readModifications",null),(0,i.Cg)([(0,c.MZ)({type:m.A})],k.prototype,"spatialReference",void 0),(0,i.Cg)([(0,c.MZ)({type:f.A})],k.prototype,"fullExtent",void 0),(0,i.Cg)([(0,c.MZ)(b.Yj)],k.prototype,"elevationInfo",null),(0,i.Cg)([(0,c.MZ)({type:["show","hide"]})],k.prototype,"listMode",void 0),(0,i.Cg)([(0,c.MZ)(b.OZ)],k.prototype,"url",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],k.prototype,"type",void 0),(0,i.Cg)([(0,c.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],k.prototype,"path",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],k.prototype,"minScale",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],k.prototype,"maxScale",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],k.prototype,"hasAttributionData",null),(0,i.Cg)([(0,c.MZ)()],k.prototype,"replacesTerrain",null),(0,i.Cg)([(0,c.MZ)()],k.prototype,"isUsedAsGroundLayer",null),(0,i.Cg)([(0,c.MZ)()],k.prototype,"hasGoogleUrl",null),k=(0,i.Cg)([(0,c.$K)("esri.layers.IntegratedMesh3DTilesLayer")],k);const C=k},76553:(t,e,n)=>{function i(t){return t&&"getAtOrigin"in t&&"originOf"in t}n.d(e,{H:()=>i})},88546:(t,e,n)=>{n.d(e,{_8:()=>m,uB:()=>p});var i=n(34727),r=n(38954),o=n(51850),s=n(73941),a=n(5443),l=n(54239),u=n(16930),h=n(9762);function c(t,e){if(!Array.isArray(t)||t.length<e)return!1;for(const e of t)if("number"!=typeof e)return!1;return!0}const d=7645211,f={xmin:-180,ymin:-90,zmin:-450,xmax:180,ymax:90,zmax:8850};function m(t){return!(!(t.extensions?.ESRI_crs?.wkid||t.extensions?.ESRI_crs?.latestWkid||t.extensions?.ESRI_crs?.wkt)||!t.root?.extensions?.ESRI_crs?.boundingVolume?.box&&!t.root?.extensions?.ESRI_crs?.boundingVolume?.sphere)}function p(t,e=!1){let n=new u.A({wkid:4326,vcsWkid:115700}),l=t.root?.boundingVolume,m=!1,p=t?.root?.transform;if(e&&(t.extensions?.ESRI_crs?.wkid||t.extensions?.ESRI_crs?.latestWkid||t.extensions?.ESRI_crs?.wkt)&&(t.root?.extensions?.ESRI_crs?.boundingVolume?.box||t.root?.extensions?.ESRI_crs?.boundingVolume?.sphere))n=new u.A(t.extensions?.ESRI_crs),l=t.root?.extensions?.ESRI_crs?.boundingVolume,p=t.root?.transform,m=!0;else if(!l)return new a.A(-180,-90,180,90,n);if(l.box){const t=l?.box;if(t[3]>d&&t[7]>d&&t[11]>d)return new a.A({...f,spatialReference:n})}const g=(0,o.vt)();if(!m&&l.region&&c(l.region,6)){const t=l.region,e=(0,i.KJ)(t[0]),r=(0,i.KJ)(t[1]),o=t[4],s=(0,i.KJ)(t[2]),u=(0,i.KJ)(t[3]),h=t[5];return new a.A({xmin:e,ymin:r,zmin:o,xmax:s,ymax:u,zmax:h,spatialReference:n})}if(l.sphere&&c(l.sphere,4)){const t=l.sphere,e=(0,o.fA)(t[0],t[1],t[2]),i=t[3]/Math.sqrt(3),d=(0,o.vt)();(0,r.e)(d,e,(0,o.fA)(i,i,i));const f=(0,o.vt)();if((0,r.i)(f,e,(0,o.fA)(i,i,i)),p&&c(p,16)){const t=p;(0,r.p)(g,d,t),(0,r.d)(d,g),(0,r.p)(g,f,t),(0,r.d)(f,g)}m||((0,h.projectBuffer)(d,s.Ro,0,d,u.A.WGS84,0),(0,h.projectBuffer)(f,s.Ro,0,f,u.A.WGS84,0));const y=(0,o.vt)(),M=(0,o.vt)();return(0,r.y)(y,d,f),(0,r.x)(M,d,f),new a.A({xmin:y[0],ymin:y[1],zmin:y[2],xmax:M[0],ymax:M[1],zmax:M[2],spatialReference:n})}if(l.box&&c(l.box,12)){const t=l.box,e=(0,o.fA)(t[0],t[1],t[2]),i=(0,o.fA)(t[3],t[4],t[5]),d=(0,o.fA)(t[6],t[7],t[8]),f=(0,o.fA)(t[9],t[10],t[11]),g=[];for(let t=0;t<8;++t)g.push((0,o.vt)());if((0,r.i)(g[0],e,i),(0,r.i)(g[0],g[0],d),(0,r.i)(g[0],g[0],f),(0,r.a)(g[1],e,i),(0,r.i)(g[1],g[1],d),(0,r.i)(g[1],g[1],f),(0,r.i)(g[2],e,i),(0,r.a)(g[2],g[2],d),(0,r.i)(g[2],g[2],f),(0,r.a)(g[3],e,i),(0,r.a)(g[3],g[3],d),(0,r.i)(g[3],g[3],f),(0,r.i)(g[4],e,i),(0,r.i)(g[4],g[4],d),(0,r.a)(g[4],g[4],f),(0,r.a)(g[5],e,i),(0,r.i)(g[5],g[5],d),(0,r.a)(g[5],g[5],f),(0,r.i)(g[6],e,i),(0,r.a)(g[6],g[6],d),(0,r.a)(g[6],g[6],f),(0,r.a)(g[7],e,i),(0,r.a)(g[7],g[7],d),(0,r.a)(g[7],g[7],f),p&&c(p,16)){const t=p;for(let e=0;e<8;++e)(0,r.p)(g[e],g[e],t)}const y=(0,o.fA)(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),M=(0,o.fA)(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE);for(let t=0;t<8;++t)m||(0,h.projectBuffer)(g[t],s.Ro,0,g[t],u.A.WGS84,0),(0,r.y)(M,M,g[t]),(0,r.x)(y,y,g[t]);return new a.A({xmin:M[0],ymin:M[1],zmin:M[2],xmax:y[0],ymax:y[1],zmax:y[2],spatialReference:n})}return new a.A(-180,-90,180,90,n)}new Map([[5773,new l.A({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"EGM96_Geoid"})],[3855,new l.A({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"EGM2008_Geoid"})],[115700,new l.A({heightModel:"ellipsoidal",heightUnit:"meters",vertCRS:"WGS_1984"})],[115701,new l.A({heightModel:"ellipsoidal",heightUnit:"meters",vertCRS:"ETRS_1989"})],[6360,new l.A({heightModel:"gravity-related-height",heightUnit:"us-feet",vertCRS:"NAVD88_height_(ftUS)"})],[7837,new l.A({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"DHHN2016_(height) "})]])}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1312],{38954:(t,e,n)=>{n.d(e,{A:()=>h,B:()=>c,C:()=>M,D:()=>P,E:()=>_,F:()=>q,G:()=>O,H:()=>Z,a:()=>U,b:()=>o,c:()=>y,d:()=>s,e:()=>u,f:()=>w,g:()=>S,h:()=>a,i:()=>l,j:()=>g,l:()=>R,m:()=>L,n:()=>v,o:()=>b,p:()=>E,q:()=>x,r:()=>I,s:()=>A,t:()=>T,u:()=>d,v:()=>G,w:()=>j,x:()=>p,y:()=>m,z:()=>f});var i=n(51850),r=n(34304);function o(t){const e=t[0],n=t[1],i=t[2];return Math.sqrt(e*e+n*n+i*i)}function s(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function a(t,e,n,i){return t[0]=e,t[1]=n,t[2]=i,t}function l(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function u(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function h(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function c(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function d(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t}function f(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function m(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}function p(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}function g(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function y(t,e,n,i){return t[0]=e[0]+n[0]*i,t[1]=e[1]+n[1]*i,t[2]=e[2]+n[2]*i,t}function M(t,e){const n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2];return Math.sqrt(n*n+i*i+r*r)}function A(t,e){const n=e[0]-t[0],i=e[1]-t[1],r=e[2]-t[2];return n*n+i*i+r*r}function _(t){const e=t[0],n=t[1],i=t[2];return e*e+n*n+i*i}function x(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function b(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function v(t,e){const n=e[0],i=e[1],r=e[2];let o=n*n+i*i+r*r;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t}function S(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function w(t,e,n){const i=e[0],r=e[1],o=e[2],s=n[0],a=n[1],l=n[2];return t[0]=r*l-o*a,t[1]=o*s-i*l,t[2]=i*a-r*s,t}function R(t,e,n,i){const r=e[0],o=e[1],s=e[2];return t[0]=r+i*(n[0]-r),t[1]=o+i*(n[1]-o),t[2]=s+i*(n[2]-s),t}function E(t,e,n){const i=e[0],r=e[1],o=e[2];return t[0]=n[0]*i+n[4]*r+n[8]*o+n[12],t[1]=n[1]*i+n[5]*r+n[9]*o+n[13],t[2]=n[2]*i+n[6]*r+n[10]*o+n[14],t}function T(t,e,n){const i=e[0],r=e[1],o=e[2];return t[0]=i*n[0]+r*n[3]+o*n[6],t[1]=i*n[1]+r*n[4]+o*n[7],t[2]=i*n[2]+r*n[5]+o*n[8],t}function I(t,e,n){const i=n[0],r=n[1],o=n[2],s=n[3],a=e[0],l=e[1],u=e[2],h=r*u-o*l,c=o*a-i*u,d=i*l-r*a,f=r*d-o*c,m=o*h-i*d,p=i*c-r*h,g=2*s;return t[0]=a+h*g+2*f,t[1]=l+c*g+2*m,t[2]=u+d*g+2*p,t}const k=(0,i.vt)(),C=(0,i.vt)();function L(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function q(t,e){if(t===e)return!0;const n=t[0],i=t[1],o=t[2],s=e[0],a=e[1],l=e[2],u=(0,r.FD)();return Math.abs(n-s)<=u*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(i-a)<=u*Math.max(1,Math.abs(i),Math.abs(a))&&Math.abs(o-l)<=u*Math.max(1,Math.abs(o),Math.abs(l))}function P(t,e,n){const i=n[0]-e[0],r=n[1]-e[1],o=n[2]-e[2];let s=i*i+r*r+o*o;return s>0?(s=1/Math.sqrt(s),t[0]=i*s,t[1]=r*s,t[2]=o*s,t):(t[0]=0,t[1]=0,t[2]=0,t)}const U=u,D=h,N=c,O=M,G=A,Z=o,j=_;Object.freeze(Object.defineProperty({__proto__:null,abs:d,add:l,angle:function(t,e){v(k,t),v(C,e);const n=S(k,C);return n>1?0:n<-1?Math.PI:Math.acos(n)},bezier:function(t,e,n,i,r,o){const s=1-o,a=s*s,l=o*o,u=a*s,h=3*o*a,c=3*l*s,d=l*o;return t[0]=e[0]*u+n[0]*h+i[0]*c+r[0]*d,t[1]=e[1]*u+n[1]*h+i[1]*c+r[1]*d,t[2]=e[2]*u+n[2]*h+i[2]*c+r[2]*d,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},clamp:function(t,e=0,n=1){return t[0]=Math.min(Math.max(t[0],e),n),t[1]=Math.min(Math.max(t[1],e),n),t[2]=Math.min(Math.max(t[2],e),n),t},copy:s,cross:w,crossAndNormalize:function(t,e,n){const i=e[0],r=e[1],o=e[2],s=n[0],a=n[1],l=n[2],u=r*l-o*a,h=o*s-i*l,c=i*a-r*s,d=Math.sqrt(u*u+h*h+c*c);return t[0]=u/d,t[1]=h/d,t[2]=c/d,t},direction:P,dist:O,distance:M,div:N,divide:c,dot:S,equals:q,exactEquals:L,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,n,i,r,o){const s=o*o,a=s*(2*o-3)+1,l=s*(o-2)+o,u=s*(o-1),h=s*(3-2*o);return t[0]=e[0]*a+n[0]*l+i[0]*u+r[0]*h,t[1]=e[1]*a+n[1]*l+i[1]*u+r[1]*h,t[2]=e[2]*a+n[2]*l+i[2]*u+r[2]*h,t},inverse:b,len:Z,length:o,lerp:R,max:p,min:m,mul:D,multiply:h,negate:x,normalize:v,random:function(t,e=1){const n=r.Ov,i=2*n()*Math.PI,o=2*n()-1,s=Math.sqrt(1-o*o)*e;return t[0]=Math.cos(i)*s,t[1]=Math.sin(i)*s,t[2]=o*e,t},rotateX:function(t,e,n,i){const r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[0],o[1]=r[1]*Math.cos(i)-r[2]*Math.sin(i),o[2]=r[1]*Math.sin(i)+r[2]*Math.cos(i),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},rotateY:function(t,e,n,i){const r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[2]*Math.sin(i)+r[0]*Math.cos(i),o[1]=r[1],o[2]=r[2]*Math.cos(i)-r[0]*Math.sin(i),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},rotateZ:function(t,e,n,i){const r=[],o=[];return r[0]=e[0]-n[0],r[1]=e[1]-n[1],r[2]=e[2]-n[2],o[0]=r[0]*Math.cos(i)-r[1]*Math.sin(i),o[1]=r[0]*Math.sin(i)+r[1]*Math.cos(i),o[2]=r[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:g,scaleAndAdd:y,set:a,sign:f,sqrDist:G,sqrLen:j,squaredDistance:A,squaredLength:_,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:U,subtract:u,transformMat3:T,transformMat4:E,transformQuat:I},Symbol.toStringTag,{value:"Module"}))},61528:(t,e,n)=>{n.r(e),n.d(e,{default:()=>C});var i=n(31635),r=n(11254),o=n(49186),s=n(44208),a=n(53966),l=n(25728),u=n(74887),h=n(36708),c=n(91429),d=n(87024),f=n(5443),m=n(16930),p=n(4146),g=n(52136),y=n(18768),M=n(69208),A=n(16131),_=n(8303),x=n(25036),b=n(10873),v=n(58325),S=n(88546),w=n(20655),R=n(56776),E=n(97159),T=n(16215),I=n(36005);let k=class extends((0,y.b)((0,A.q)((0,_.A)((0,x.j)((0,l.P)((0,M.d)((0,g.p)(p.A)))))))){readModifications(t,e,n){this._modificationsSource={url:(0,E.f)(t,n),context:n}}initialize(){this.addHandles((0,h.on)(()=>this.modifications,"after-changes",()=>this.modifications=this.modifications,h.OH))}constructor(t){super(t),this.operationalLayerType="IntegratedMesh3DTilesLayer",this.modifications=null,this._modificationsSource=null,this.spatialReference=new m.A({wkid:4326,vcsWkid:115700}),this.fullExtent=new f.A(-180,-90,180,90,this.spatialReference),this.url=null,this.type="integrated-mesh-3dtiles",this.path=null,this.minScale=0,this.maxScale=0,this._rootTilesetJSON=null,this._rootTileset=null,this._key=null,this._session=null,this._rootRequestPromise=null}set elevationInfo(t){null!=t&&"absolute-height"!==t.mode||this._set("elevationInfo",t),this._validateElevationInfo(t)}async load(t){return this.addResolvingPromise(this._doLoad(t)),this}get rootTilesetJSON(){return this._rootTilesetJSON}get rootTileset(){return this._rootTileset}get key(){return this._key}get session(){return this._session}_findSessionParameter(t){const e=[t];for(;e?.length>0;){const t=e.pop();if(!t)return;for(const[n,i]of Object.entries(t)){if("uri"===n)try{const t=new URL("https://tmp"+i).searchParams.get("session");if(t)return t}catch(t){}"object"==typeof i&&null!==i&&e.push(i)}}return null}async requestRootAndSession(t){const e=(t,e)=>new o.A("3dtiles-init:"+t,e);return this._rootRequestPromise||(this._rootRequestPromise=new Promise((n,i)=>{this.url||i(e("url-missing","Layer url missing")),this._key=this.customParameters?this.customParameters.key:null,new Promise((t,n)=>{if(this.replacesTerrain&&!this._key){const i=this.portalItem?.portal||this.parent?.portalItem?.portal||w.A.getDefault();i.signIn().then(()=>{i.g3dTilesEnabled?(0,r.A)(i.restUrl+"/portals/self/modules/g3dtiles",{responseType:"json",query:{f:"json"}}).then(e=>{this._key=e.data.keyString,t()},()=>n(e("g3dtiles-key-error","Error fetching Google 3D Tiles key from portal"))):n(e("g3dTilesEnabled-false","Google 3D Tiles are not enabled on Portal "+i.url))},()=>n(e("sign-in-failed","Error signing in to Portal")))}else t()}).then(()=>{(0,r.A)(this.url,{query:this._key?{key:this._key,token:this.apiKey}:{token:this.apiKey},responseType:"array-buffer",signal:t}).then(t=>{try{this._rootTilesetJSON=JSON.parse((new TextDecoder).decode(t.data))}catch(t){return void i(e("root-parse-failed","Error parsing root tile, details: "+t))}this._rootTilesetJSON?(this._session=this._findSessionParameter(this._rootTilesetJSON),this._rootTileset=t.data,this.fullExtent=(0,S.uB)(this._rootTilesetJSON),n(),this._rootRequestPromise=null):i(e("root-is-null","Root tile is null."))},t=>{(0,u.QP)(t),i(e("root-load-failed","Error loading root tile")),this._rootRequestPromise=null,a.A.getLogger("IntegratedMesh3DTilesLayer").error("Layer loading failed",t)})},t=>i(t))})),this._rootRequestPromise}async _doLoad(t){const e=null!=t?t.signal:null;if(this.isUsedAsGroundLayer&&!(0,s.A)("enable-feature:basemap-groundlayers"))throw new o.A("3dtiles-init:not-supported-in-groundlayers","Layer is not supported in basemap.");try{await this.loadFromPortal({supportedTypes:["3DTiles Service"],validateItem:t=>{if(t.typeKeywords?.includes("IntegratedMesh"))return!0;throw new o.A("portal:invalid-layer-item-type","Invalid layer item, expected '${expectedType}' ",{expectedType:"3DTiles Service containing IntegratedMesh"})}},t)}catch(t){(0,u.QP)(t)}if(null!=this._modificationsSource){const e=await v.A.fromUrl(this._modificationsSource.url,this.spatialReference,t);this.setAtOrigin("modifications",e,this._modificationsSource.context.origin),this._modificationsSource=null}await this.requestRootAndSession(e)}beforeSave(){if(null!=this._modificationsSource)return this.load().then(()=>{},()=>{})}get hasAttributionData(){return!1}_validateElevationInfo(t){const e="Integrated mesh 3d tiles layers";(0,R.XF)(a.A.getLogger(this),(0,R.B)(e,"absolute-height",t)),(0,R.XF)(a.A.getLogger(this),(0,R.tW)(e,t))}get replacesTerrain(){return!!(0,s.A)("enable-feature:basemap-groundlayers")&&this.hasGoogleUrl&&this.isUsedAsGroundLayer}get isUsedAsGroundLayer(){return(0,T.S)(this.parent)}get hasGoogleUrl(){return!!this.url?.match(/.+\.googleapis.com/)}};(0,i.Cg)([(0,c.MZ)({type:["IntegratedMesh3DTilesLayer"]})],k.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,c.MZ)({type:v.A,clonable:t=>t.clone()}),(0,d.P)({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],k.prototype,"modifications",void 0),(0,i.Cg)([(0,I.w)(["web-scene","portal-item"],"modifications")],k.prototype,"readModifications",null),(0,i.Cg)([(0,c.MZ)({type:m.A})],k.prototype,"spatialReference",void 0),(0,i.Cg)([(0,c.MZ)({type:f.A})],k.prototype,"fullExtent",void 0),(0,i.Cg)([(0,c.MZ)(b.Yj)],k.prototype,"elevationInfo",null),(0,i.Cg)([(0,c.MZ)({type:["show","hide"]})],k.prototype,"listMode",void 0),(0,i.Cg)([(0,c.MZ)(b.OZ)],k.prototype,"url",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],k.prototype,"type",void 0),(0,i.Cg)([(0,c.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],k.prototype,"path",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],k.prototype,"minScale",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],k.prototype,"maxScale",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],k.prototype,"hasAttributionData",null),(0,i.Cg)([(0,c.MZ)()],k.prototype,"replacesTerrain",null),(0,i.Cg)([(0,c.MZ)()],k.prototype,"isUsedAsGroundLayer",null),(0,i.Cg)([(0,c.MZ)()],k.prototype,"hasGoogleUrl",null),k=(0,i.Cg)([(0,c.$K)("esri.layers.IntegratedMesh3DTilesLayer")],k);const C=k},76553:(t,e,n)=>{function i(t){return t&&"getAtOrigin"in t&&"originOf"in t}n.d(e,{H:()=>i})},88546:(t,e,n)=>{n.d(e,{_8:()=>m,uB:()=>p});var i=n(34727),r=n(38954),o=n(51850),s=n(73941),a=n(5443),l=n(54239),u=n(16930),h=n(9762);function c(t,e){if(!Array.isArray(t)||t.length<e)return!1;for(const e of t)if("number"!=typeof e)return!1;return!0}const d=7645211,f={xmin:-180,ymin:-90,zmin:-450,xmax:180,ymax:90,zmax:8850};function m(t){return!(!(t.extensions?.ESRI_crs?.wkid||t.extensions?.ESRI_crs?.latestWkid||t.extensions?.ESRI_crs?.wkt)||!t.root?.extensions?.ESRI_crs?.boundingVolume?.box&&!t.root?.extensions?.ESRI_crs?.boundingVolume?.sphere)}function p(t,e=!1){let n=new u.A({wkid:4326,vcsWkid:115700}),l=t.root?.boundingVolume,m=!1,p=t?.root?.transform;if(e&&(t.extensions?.ESRI_crs?.wkid||t.extensions?.ESRI_crs?.latestWkid||t.extensions?.ESRI_crs?.wkt)&&(t.root?.extensions?.ESRI_crs?.boundingVolume?.box||t.root?.extensions?.ESRI_crs?.boundingVolume?.sphere))n=new u.A(t.extensions?.ESRI_crs),l=t.root?.extensions?.ESRI_crs?.boundingVolume,p=t.root?.transform,m=!0;else if(!l)return new a.A(-180,-90,180,90,n);if(l.box){const t=l?.box;if(t[3]>d&&t[7]>d&&t[11]>d)return new a.A({...f,spatialReference:n})}const g=(0,o.vt)();if(!m&&l.region&&c(l.region,6)){const t=l.region,e=(0,i.KJ)(t[0]),r=(0,i.KJ)(t[1]),o=t[4],s=(0,i.KJ)(t[2]),u=(0,i.KJ)(t[3]),h=t[5];return new a.A({xmin:e,ymin:r,zmin:o,xmax:s,ymax:u,zmax:h,spatialReference:n})}if(l.sphere&&c(l.sphere,4)){const t=l.sphere,e=(0,o.fA)(t[0],t[1],t[2]),i=t[3]/Math.sqrt(3),d=(0,o.vt)();(0,r.e)(d,e,(0,o.fA)(i,i,i));const f=(0,o.vt)();if((0,r.i)(f,e,(0,o.fA)(i,i,i)),p&&c(p,16)){const t=p;(0,r.p)(g,d,t),(0,r.d)(d,g),(0,r.p)(g,f,t),(0,r.d)(f,g)}m||((0,h.projectBuffer)(d,s.Ro,0,d,u.A.WGS84,0),(0,h.projectBuffer)(f,s.Ro,0,f,u.A.WGS84,0));const y=(0,o.vt)(),M=(0,o.vt)();return(0,r.y)(y,d,f),(0,r.x)(M,d,f),new a.A({xmin:y[0],ymin:y[1],zmin:y[2],xmax:M[0],ymax:M[1],zmax:M[2],spatialReference:n})}if(l.box&&c(l.box,12)){const t=l.box,e=(0,o.fA)(t[0],t[1],t[2]),i=(0,o.fA)(t[3],t[4],t[5]),d=(0,o.fA)(t[6],t[7],t[8]),f=(0,o.fA)(t[9],t[10],t[11]),g=[];for(let t=0;t<8;++t)g.push((0,o.vt)());if((0,r.i)(g[0],e,i),(0,r.i)(g[0],g[0],d),(0,r.i)(g[0],g[0],f),(0,r.a)(g[1],e,i),(0,r.i)(g[1],g[1],d),(0,r.i)(g[1],g[1],f),(0,r.i)(g[2],e,i),(0,r.a)(g[2],g[2],d),(0,r.i)(g[2],g[2],f),(0,r.a)(g[3],e,i),(0,r.a)(g[3],g[3],d),(0,r.i)(g[3],g[3],f),(0,r.i)(g[4],e,i),(0,r.i)(g[4],g[4],d),(0,r.a)(g[4],g[4],f),(0,r.a)(g[5],e,i),(0,r.i)(g[5],g[5],d),(0,r.a)(g[5],g[5],f),(0,r.i)(g[6],e,i),(0,r.a)(g[6],g[6],d),(0,r.a)(g[6],g[6],f),(0,r.a)(g[7],e,i),(0,r.a)(g[7],g[7],d),(0,r.a)(g[7],g[7],f),p&&c(p,16)){const t=p;for(let e=0;e<8;++e)(0,r.p)(g[e],g[e],t)}const y=(0,o.fA)(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),M=(0,o.fA)(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE);for(let t=0;t<8;++t)m||(0,h.projectBuffer)(g[t],s.Ro,0,g[t],u.A.WGS84,0),(0,r.y)(M,M,g[t]),(0,r.x)(y,y,g[t]);return new a.A({xmin:M[0],ymin:M[1],zmin:M[2],xmax:y[0],ymax:y[1],zmax:y[2],spatialReference:n})}return new a.A(-180,-90,180,90,n)}new Map([[5773,new l.A({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"EGM96_Geoid"})],[3855,new l.A({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"EGM2008_Geoid"})],[115700,new l.A({heightModel:"ellipsoidal",heightUnit:"meters",vertCRS:"WGS_1984"})],[115701,new l.A({heightModel:"ellipsoidal",heightUnit:"meters",vertCRS:"ETRS_1989"})],[6360,new l.A({heightModel:"gravity-related-height",heightUnit:"us-feet",vertCRS:"NAVD88_height_(ftUS)"})],[7837,new l.A({heightModel:"gravity-related-height",heightUnit:"meters",vertCRS:"DHHN2016_(height) "})]])}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5845],{159:(n,t,e)=>{e.d(t,{A:()=>s});var r,o=e(31635),i=e(69622),l=e(91429),a=e(99157);let s=r=class extends i.A{constructor(n){super(n),this.steps=[]}getInverse(){const n=new r;for(let t=this.steps.length-1;t>=0;t--){const e=this.steps[t];n.steps.push(e.getInverse())}return n}};(0,o.Cg)([(0,l.MZ)({type:[a.A],nonNullable:!0})],s.prototype,"steps",void 0),s=r=(0,o.Cg)([(0,l.$K)("esri.geometry.operators.support.GeographicTransformation")],s)},9093:(n,t,e)=>{function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function o(n){return[n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15]]}e.d(t,{o8:()=>o,vt:()=>r,zK:()=>i});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:o,create:r,fromValues:function(n,t,e,r,o,i,l,a,s,u,c,f,h,p,d,m){return[n,t,e,r,o,i,l,a,s,u,c,f,h,p,d,m]}},Symbol.toStringTag,{value:"Module"}))},9762:(n,t,e)=>{e.r(t),e.d(t,{projectBuffer:()=>o});var r=e(37539);function o(n,t,e,o,i,l,a=Math.floor(n.length/3)){const s=(0,r.jd)(t,i);if(null==s)return!1;if(s===r.pO){if(n===o&&e===l)return!0;const t=e+3*a;for(let r=e,i=l;r<t;r++,i++)o[i]=n[r]??0;return!0}const u=e+3*a;for(let t=e,r=l;t<u;t+=3,r+=3)s(n,t,o,r);return!0}},11006:(n,t,e)=>{function r(n,t,e,r,i){o(n,t,e||0,r||n.length-1,i||l)}function o(n,t,e,r,l){for(;r>e;){if(r-e>600){var a=r-e+1,s=t-e+1,u=Math.log(a),c=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*c*(a-c)/a)*(s-a/2<0?-1:1);o(n,t,Math.max(e,Math.floor(t-s*c/a+f)),Math.min(r,Math.floor(t+(a-s)*c/a+f)),l)}var h=n[t],p=e,d=r;for(i(n,e,t),l(n[r],h)>0&&i(n,e,r);p<d;){for(i(n,p,d),p++,d--;l(n[p],h)<0;)p++;for(;l(n[d],h)>0;)d--}0===l(n[e],h)?i(n,e,d):i(n,++d,r),d<=t&&(e=d+1),t<=d&&(r=d-1)}}function i(n,t,e){var r=n[t];n[t]=n[e],n[e]=r}function l(n,t){return n<t?-1:n>t?1:0}e.d(t,{q:()=>r})},18251:(n,t,e)=>{e.d(t,{A:()=>u});var r=e(31635),o=e(69540),i=e(25482),l=e(91429),a=e(51850),s=e(93223);let u=class extends((0,o.OU)(i.o)){constructor(n){super(n),this.type="local",this.origin=(0,a.vt)()}};(0,r.Cg)([(0,s.e)({local:"local"},{readOnly:!0})],u.prototype,"type",void 0),(0,r.Cg)([(0,l.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],u.prototype,"origin",void 0),u=(0,r.Cg)([(0,l.$K)("esri.geometry.support.MeshLocalVertexSpace")],u)},22141:(n,t,e)=>{e.d(t,{$5:()=>b,CN:()=>M,JP:()=>y,KM:()=>A,Mv:()=>S,X4:()=>x,gr:()=>v,qs:()=>_,si:()=>w,xA:()=>R});var r=e(34727),o=e(77690),i=e(29242),l=e(58083),a=e(9093),s=e(38954),u=e(51850),c=e(48353),f=e(9762),h=(e(79258),e(21325)),p=e(28735),d=e(13030),m=e(73354),g=e(65686);const y="Projection may be possible after calling projection.load().";function M(n,t,e,r){n.error(`Failed to project from (wkid:${t.wkid}) to (wkid:${e.wkid}).${r?" ":""}${r}`)}function x(n,t,e,r,o,i){return B(0,d.xs.fromTypedArray(n),0,d.Xm.fromTypedArray(t),e,d.Xm.fromTypedArray(r),o,d.xs.fromTypedArray(i))?i:null}function w(n,t,e,r,o,i){return B(1,d.xs.fromTypedArray(n),0,d.Xm.fromTypedArray(t),e,d.Xm.fromTypedArray(r),o,d.xs.fromTypedArray(i))?i:null}function v(n,t,e,r){return(0,f.projectBuffer)(n,t,0,e,r,0)?e:null}function b(n,t,e,r){return(0,f.projectBuffer)(n,t,0,e,r,0)?e:null}function _(n,t,e){return(0,o.Ge)(O,e),(0,m.b)(t,n,O),(0,r.or)(O)&&(0,m.n)(t,t),t}function A(n,t,e){return(0,o.z0)(O,e),(0,g.t)(t,n,O),(0,r.or)(O)&&(0,m.n)(t,t,4),t}function R(n,t,e,r,o,i){if(!B(0,d.xs.fromTypedArray(n,4*Float32Array.BYTES_PER_ELEMENT),1,d.Xm.fromTypedArray(t),e,d.Xm.fromTypedArray(r),o,d.xs.fromTypedArray(i,4*Float32Array.BYTES_PER_ELEMENT)))return null;for(let t=3;t<n.length;t+=4)i[t]=n[t];return i}function S(n,t,e,r,o,i){if(!B(1,d.xs.fromTypedArray(n,16),1,d.Xm.fromTypedArray(t),e,d.Xm.fromTypedArray(r),o,d.xs.fromTypedArray(i,16)))return null;for(let t=3;t<n.length;t+=4)i[t]=n[t];return i}function k(n,t,e,r,i){switch((0,c.l)(r,e,T,r),1===n&&(0,l.B8)(T,T),t){case 0:return(0,o.Ge)(i,T);case 1:return(0,o.z0)(i,T)}}function B(n,t,e,r,o,i,l,a){if(!t)return;const u=r.count;if(function(n){return n.isWGS84||(0,h.x1)(n)||(0,h.q8)(n)||(0,h.KQ)(n)}(o))for(let r=0;r<u;r++)i.getVec(r,j),t.getVec(r,I),(0,s.t)(I,I,k(n,e,j,l,O)),a.setVec(r,I);else for(let o=0;o<u;o++){i.getVec(o,j),t.getVec(o,I);const u=(0,p.jg)(r.get(o,1));let c=Math.cos(u);1===e!=(0===n)&&(c=1/c),k(n,e,j,l,O),0===n?(O[0]*=c,O[1]*=c,O[2]*=c,O[3]*=c,O[4]*=c,O[5]*=c):(O[0]*=c,O[3]*=c,O[6]*=c,O[1]*=c,O[4]*=c,O[7]*=c),(0,s.t)(I,I,O),(0,s.n)(I,I),a.setVec(o,I)}return a}const j=(0,u.vt)(),I=(0,u.vt)(),T=(0,a.vt)(),O=(0,i.vt)()},27615:(n,t,e)=>{e.d(t,{CK:()=>s,Hq:()=>a,MW:()=>u,TE:()=>c,yJ:()=>f});var r=e(38954),o=e(86738),i=e(95696),l=e(18251);function a(n){return null!=n.origin}function s(n){return a(n.vertexSpace)}function u(n,t){if(!a(n))return null;const[e,r,i]=n.origin;return new o.A({x:e,y:r,z:i,spatialReference:t})}function c(n,t){const{x:e,y:r,z:o,spatialReference:a}=n,s=[e,r,o??0];return"local"===(t?.vertexSpace??function(n){return n.isGeographic||n.isWebMercator?"local":"georeferenced"}(a))?new l.A({origin:s}):new i.A({origin:s})}function f(n,t){return n.type===t.type&&(n.origin===t.origin||null!=n.origin&&null!=t.origin&&(0,r.m)(n.origin,t.origin))}},31635:(n,t,e)=>{function r(n,t,e,r){var o,i=arguments.length,l=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,e):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(l=(i<3?o(l):i>3?o(t,e,l):o(t,e))||l);return i>3&&l&&Object.defineProperty(t,e,l),l}function o(n,t,e){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var r,o;if(e){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],e&&(o=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");o&&(r=function(){try{o.call(this)}catch(n){return Promise.reject(n)}}),n.stack.push({value:t,dispose:r,async:e})}else e&&n.stack.push({async:!0});return t}e.d(t,{Cg:()=>r,hk:()=>l,mS:()=>o}),Object.create,Object.create;var i="function"==typeof SuppressedError?SuppressedError:function(n,t,e){var r=new Error(e);return r.name="SuppressedError",r.error=n,r.suppressed=t,r};function l(n){function t(t){n.error=n.hasError?new i(t,n.error,"An error was suppressed during disposal."):t,n.hasError=!0}var e,r=0;return function o(){for(;e=n.stack.pop();)try{if(!e.async&&1===r)return r=0,n.stack.push(e),Promise.resolve().then(o);if(e.dispose){var i=e.dispose.call(e.value);if(e.async)return r|=2,Promise.resolve(i).then(o,function(n){return t(n),o()})}else r|=1}catch(n){t(n)}if(1===r)return n.hasError?Promise.reject(n.error):Promise.resolve();if(n.hasError)throw n.error}()}},37539:(n,t,e)=>{e.d(t,{pO:()=>m,jd:()=>h,Tp:()=>p,w5:()=>f});var r=e(34727),o=e(86211),i=e(73941),l=e(79258);Math.PI;const a=l.$O.radius,s=l.$O.eccentricitySquared,u={a1:a*s,a2:a*s*a*s,a3:a*s*s/2,a4:a*s*a*s*2.5,a5:a*s+a*s*s/2,a6:1-s};l.$O.radius,l.$O.flattening,l.Sw.radius,l.Sw.flattening,l.sH.radius,l.sH.flattening,l.sH.radius;var c=e(21325);const f={2:{5:m,7:null,9:null,10:m,1:_,6:null,8:null,0:null,3:y,11:M,2:m,4:B},5:{5:m,7:null,9:null,10:m,1:_,6:null,8:null,0:null,3:y,11:M,2:m,4:B},7:{5:null,7:m,9:null,10:m,1:null,6:b,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:m,10:m,1:null,6:null,8:v,0:null,3:null,11:null,2:null,4:null},3:{5:g,7:null,9:null,10:g,1:function(n,t,e,r){const o=n[t]/Y,i=X-2*Math.atan(Math.exp(-n[t+1]/Y)),l=Y+(n[t+2]??0),a=Math.cos(i)*l;e[r]=Math.cos(o)*a,e[r+1]=Math.sin(o)*a,e[r+2]=Math.sin(i)*l},6:null,8:null,0:null,3:m,11:function(n,t,e,r){g(n,t,e,r),M(e,r,e,r)},2:g,4:function(n,t,e,r){g(n,t,e,r),B(e,r,e,r)}},4:{5:j,7:null,9:null,10:j,1:function(n,t,e,r){j(n,t,e,r),_(e,r,e,r)},6:null,8:null,0:null,3:function(n,t,e,r){j(n,t,e,r),y(e,r,e,r)},11:function(n,t,e,r){j(n,t,e,r),M(e,r,e,r)},2:j,4:m},1:{5:k,7:null,9:null,10:k,1:m,6:null,8:null,0:null,3:function(n,t,e,r){k(n,t,e,r),y(e,r,e,r)},11:function(n,t,e,r){k(n,t,e,r),M(e,r,e,r)},2:k,4:function(n,t,e,r){k(n,t,e,r),B(e,r,e,r)}},6:{5:null,7:S,9:null,10:S,1:null,6:m,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:R,10:R,1:null,6:null,8:m,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:m,3:null,11:null,2:null,4:null},10:{5:m,7:m,9:m,10:m,1:_,6:b,8:v,0:null,3:y,11:M,2:m,4:B},11:{5:x,7:null,9:null,10:x,1:function(n,t,e,r){x(n,t,e,r),_(e,r,e,r)},6:null,8:null,0:null,3:function(n,t,e,r){x(n,t,e,r),y(e,r,e,r)},11:m,2:x,4:function(n,t,e,r){x(n,t,e,r),B(e,r,e,r)}}};function h(n,t){return p(n,t)?.projector}function p(n,t){if(null==n||null==t)return null;if(I.source.spatialReference===n&&I.dest.spatialReference===t)return I;const e=d(n,I.source),r=d(t,I.dest);return 0===e&&0===r?(0,c.aI)(n,t)?I.projector=m:I.projector=null:I.projector=f[e][r],I}function d(n,t){return n?t.spatialReference===n?t.spatialReferenceId:(t.spatialReference=n,"metersPerUnit"in t&&(t.metersPerUnit=(0,o.GA)(n,1)),(0,i.jA)(n)?t.spatialReferenceId=1:(0,c.oT)(n)?t.spatialReferenceId=2:(0,c.K8)(n)?t.spatialReferenceId=3:(0,c.r1)(n)?t.spatialReferenceId=11:n.wkt===i.Ro.wkt?t.spatialReferenceId=4:4490===n.wkid?t.spatialReferenceId=5:n.wkt===i.FY.wkt?t.spatialReferenceId=6:n.wkt===i.LJ.wkt?t.spatialReferenceId=8:(0,c.q8)(n)?t.spatialReferenceId=7:(0,c.KQ)(n)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function m(n,t,e,r){n!==e&&(e[r++]=n[t++],e[r++]=n[t++],e[r]=n[t]??0)}function g(n,t,e,r){e[r]=O*(n[t]/Y),e[r+1]=O*(X-2*Math.atan(Math.exp(-n[t+1]/Y))),e[r+2]=n[t+2]??0}function y(n,t,e,o){!function(n,t,e,o,i){const l=.4999999*Math.PI,a=(0,r.qE)(T*n[t+1],-l,l),s=Math.sin(a);e[o++]=T*n[t]*i.radius,e[o++]=i.halfSemiMajorAxis*Math.log((1+s)/(1-s)),e[o]=n[t+2]??0}(n,t,e,o,l.$O)}function M(n,t,e,r){e[r]=n[t]*q,e[r+1]=n[t+1]*q,e[r+2]=n[t+2]??0}function x(n,t,e,r){e[r]=n[t]*P,e[r+1]=n[t+1]*P,e[r+2]=n[t+2]??0}function w(n,t,e,r,o){const i=o+(n[t+2]??0),l=T*n[t],a=T*n[t+1],s=Math.cos(a)*i;e[r]=Math.cos(l)*s,e[r+1]=Math.sin(l)*s,e[r+2]=Math.sin(a)*i}function v(n,t,e,r){w(n,t,e,r,l.Sw.radius)}function b(n,t,e,r){w(n,t,e,r,l.sH.radius)}function _(n,t,e,r){w(n,t,e,r,l.$O.radius)}function A(n,t,e,o,i){const l=n[t],a=n[t+1],s=n[t+2]??0,u=Math.sqrt(l*l+a*a+s*s),c=(0,r.YN)(s/(0===u?1:u)),f=Math.atan2(a,l);e[o++]=O*f,e[o++]=O*c,e[o]=u-i}function R(n,t,e,r){A(n,t,e,r,l.Sw.radius)}function S(n,t,e,r){A(n,t,e,r,l.sH.radius)}function k(n,t,e,r){A(n,t,e,r,l.$O.radius)}function B(n,t,e,r){!function(n,t,e,r,o){const i=T*n[t],l=T*n[t+1],a=n[t+2]??0,s=Math.sin(l),u=Math.cos(l),c=o.radius/Math.sqrt(1-o.eccentricitySquared*s*s);e[r++]=(c+a)*u*Math.cos(i),e[r++]=(c+a)*u*Math.sin(i),e[r++]=(c*(1-o.eccentricitySquared)+a)*s}(n,t,e,r,l.$O)}function j(n,t,e,r){const o=u,i=n[t],a=n[t+1],s=n[t+2]??0;let c,f,h,p,d,m,g,y,M,x,w,v,b,_,A,R,S,k,B,j,I;c=Math.abs(s),f=i*i+a*a,h=Math.sqrt(f),p=f+s*s,d=Math.sqrt(p),j=Math.atan2(a,i),m=s*s/p,g=f/p,_=o.a2/d,A=o.a3-o.a4/d,g>.3?(y=c/d*(1+g*(o.a1+_+m*A)/d),B=Math.asin(y),x=y*y,M=Math.sqrt(1-x)):(M=h/d*(1-m*(o.a5-_-g*A)/d),B=Math.acos(M),x=1-M*M,y=Math.sqrt(x)),w=1-l.$O.eccentricitySquared*x,v=l.$O.radius/Math.sqrt(w),b=o.a6*v,_=h-v*M,A=c-b*y,S=M*_+y*A,R=M*A-y*_,k=R/(b/w+S),B+=k,I=S+R*k/2,s<0&&(B=-B),e[r++]=O*j,e[r++]=O*B,e[r]=I}const I={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:m},T=(0,r.kU)(1),O=(0,r.KJ)(1),X=.5*Math.PI,Y=l.$O.radius,q=Y*Math.PI/180,P=180/(Y*Math.PI)},38419:(n,t,e)=>{e.r(t),e.d(t,{default:()=>a});var r=e(44208),o=e(75503),i=e(95696),l=e(72258);class a{async createIndex(n,t){const e=new Array;if(!n.vertexAttributes?.position)return new o.wq;const r=function(n){const{vertexAttributes:{position:t},vertexSpace:e,spatialReference:r,transform:o}=n,a=(0,l.UR)({vertexAttributes:{position:t},vertexSpace:e,spatialReference:r,transform:o},i.A.absolute,{allowBufferReuse:!0})?.position;return a?!n.components||n.components.some(n=>!n.faces)?{position:a.buffer}:{position:a.buffer,components:n.components.map(n=>n.faces)}:null}(n),a=null!=t?await t.invoke("createIndexThread",r,{transferList:e}):this.createIndexThread(r).result;return s().fromJSON(a)}createIndexThread(n){const t=s();if(!n)return{result:t.toJSON()};const e=new Float64Array(n.position);return n.components?function(n,t,e){let r=0;for(const n of e)r+=n.length/3;const o=new Array(r);let i=0;for(const n of e)for(let e=0;e<n.length;e+=3)o[i++]=u(t,3*n[e],3*n[e+1],3*n[e+2]);return n.load(o),{result:n.toJSON()}}(t,e,n.components.map(n=>new Uint32Array(n))):function(n,t){const e=new Array(t.length/9);let r=0;for(let n=0;n<t.length;n+=9)e[r++]=u(t,n,n+3,n+6);return n.load(e),{result:n.toJSON()}}(t,e)}}function s(){return new o.wq(9,(0,r.A)("esri-csp-restrictions")?n=>n:[".minX",".minY",".maxX",".maxY"])}function u(n,t,e,r){return{minX:Math.min(n[t],n[e],n[r]),maxX:Math.max(n[t],n[e],n[r]),minY:Math.min(n[t+1],n[e+1],n[r+1]),maxY:Math.max(n[t+1],n[e+1],n[r+1]),p0:[n[t],n[t+1],n[t+2]],p1:[n[e],n[e+1],n[e+2]],p2:[n[r],n[r+1],n[r+2]]}}},38954:(n,t,e)=>{e.d(t,{A:()=>c,B:()=>z,C:()=>f,D:()=>M,E:()=>Y,F:()=>w,G:()=>X,H:()=>E,a:()=>q,b:()=>i,c:()=>y,d:()=>l,e:()=>u,f:()=>R,g:()=>A,h:()=>a,i:()=>s,j:()=>g,l:()=>S,m:()=>O,n:()=>_,o:()=>b,p:()=>k,q:()=>v,r:()=>j,s:()=>x,t:()=>B,u:()=>h,v:()=>N,w:()=>F,x:()=>m,y:()=>d,z:()=>p});var r=e(51850),o=e(34304);function i(n){const t=n[0],e=n[1],r=n[2];return Math.sqrt(t*t+e*e+r*r)}function l(n,t){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n}function a(n,t,e,r){return n[0]=t,n[1]=e,n[2]=r,n}function s(n,t,e){return n[0]=t[0]+e[0],n[1]=t[1]+e[1],n[2]=t[2]+e[2],n}function u(n,t,e){return n[0]=t[0]-e[0],n[1]=t[1]-e[1],n[2]=t[2]-e[2],n}function c(n,t,e){return n[0]=t[0]*e[0],n[1]=t[1]*e[1],n[2]=t[2]*e[2],n}function f(n,t,e){return n[0]=t[0]/e[0],n[1]=t[1]/e[1],n[2]=t[2]/e[2],n}function h(n,t){return n[0]=Math.abs(t[0]),n[1]=Math.abs(t[1]),n[2]=Math.abs(t[2]),n}function p(n,t){return n[0]=Math.sign(t[0]),n[1]=Math.sign(t[1]),n[2]=Math.sign(t[2]),n}function d(n,t,e){return n[0]=Math.min(t[0],e[0]),n[1]=Math.min(t[1],e[1]),n[2]=Math.min(t[2],e[2]),n}function m(n,t,e){return n[0]=Math.max(t[0],e[0]),n[1]=Math.max(t[1],e[1]),n[2]=Math.max(t[2],e[2]),n}function g(n,t,e){return n[0]=t[0]*e,n[1]=t[1]*e,n[2]=t[2]*e,n}function y(n,t,e,r){return n[0]=t[0]+e[0]*r,n[1]=t[1]+e[1]*r,n[2]=t[2]+e[2]*r,n}function M(n,t){const e=t[0]-n[0],r=t[1]-n[1],o=t[2]-n[2];return Math.sqrt(e*e+r*r+o*o)}function x(n,t){const e=t[0]-n[0],r=t[1]-n[1],o=t[2]-n[2];return e*e+r*r+o*o}function w(n){const t=n[0],e=n[1],r=n[2];return t*t+e*e+r*r}function v(n,t){return n[0]=-t[0],n[1]=-t[1],n[2]=-t[2],n}function b(n,t){return n[0]=1/t[0],n[1]=1/t[1],n[2]=1/t[2],n}function _(n,t){const e=t[0],r=t[1],o=t[2];let i=e*e+r*r+o*o;return i>0&&(i=1/Math.sqrt(i),n[0]=t[0]*i,n[1]=t[1]*i,n[2]=t[2]*i),n}function A(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function R(n,t,e){const r=t[0],o=t[1],i=t[2],l=e[0],a=e[1],s=e[2];return n[0]=o*s-i*a,n[1]=i*l-r*s,n[2]=r*a-o*l,n}function S(n,t,e,r){const o=t[0],i=t[1],l=t[2];return n[0]=o+r*(e[0]-o),n[1]=i+r*(e[1]-i),n[2]=l+r*(e[2]-l),n}function k(n,t,e){const r=t[0],o=t[1],i=t[2];return n[0]=e[0]*r+e[4]*o+e[8]*i+e[12],n[1]=e[1]*r+e[5]*o+e[9]*i+e[13],n[2]=e[2]*r+e[6]*o+e[10]*i+e[14],n}function B(n,t,e){const r=t[0],o=t[1],i=t[2];return n[0]=r*e[0]+o*e[3]+i*e[6],n[1]=r*e[1]+o*e[4]+i*e[7],n[2]=r*e[2]+o*e[5]+i*e[8],n}function j(n,t,e){const r=e[0],o=e[1],i=e[2],l=e[3],a=t[0],s=t[1],u=t[2],c=o*u-i*s,f=i*a-r*u,h=r*s-o*a,p=o*h-i*f,d=i*c-r*h,m=r*f-o*c,g=2*l;return n[0]=a+c*g+2*p,n[1]=s+f*g+2*d,n[2]=u+h*g+2*m,n}const I=(0,r.vt)(),T=(0,r.vt)();function O(n,t){return n[0]===t[0]&&n[1]===t[1]&&n[2]===t[2]}function X(n,t){if(n===t)return!0;const e=n[0],r=n[1],i=n[2],l=t[0],a=t[1],s=t[2],u=(0,o.FD)();return Math.abs(e-l)<=u*Math.max(1,Math.abs(e),Math.abs(l))&&Math.abs(r-a)<=u*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-s)<=u*Math.max(1,Math.abs(i),Math.abs(s))}function Y(n,t,e){const r=e[0]-t[0],o=e[1]-t[1],i=e[2]-t[2];let l=r*r+o*o+i*i;return l>0?(l=1/Math.sqrt(l),n[0]=r*l,n[1]=o*l,n[2]=i*l,n):(n[0]=0,n[1]=0,n[2]=0,n)}const q=u,P=c,C=f,E=M,N=x,z=i,F=w;Object.freeze(Object.defineProperty({__proto__:null,abs:h,add:s,angle:function(n,t){_(I,n),_(T,t);const e=A(I,T);return e>1?0:e<-1?Math.PI:Math.acos(e)},bezier:function(n,t,e,r,o,i){const l=1-i,a=l*l,s=i*i,u=a*l,c=3*i*a,f=3*s*l,h=s*i;return n[0]=t[0]*u+e[0]*c+r[0]*f+o[0]*h,n[1]=t[1]*u+e[1]*c+r[1]*f+o[1]*h,n[2]=t[2]*u+e[2]*c+r[2]*f+o[2]*h,n},ceil:function(n,t){return n[0]=Math.ceil(t[0]),n[1]=Math.ceil(t[1]),n[2]=Math.ceil(t[2]),n},clamp:function(n,t=0,e=1){return n[0]=Math.min(Math.max(n[0],t),e),n[1]=Math.min(Math.max(n[1],t),e),n[2]=Math.min(Math.max(n[2],t),e),n},copy:l,cross:R,crossAndNormalize:function(n,t,e){const r=t[0],o=t[1],i=t[2],l=e[0],a=e[1],s=e[2],u=o*s-i*a,c=i*l-r*s,f=r*a-o*l,h=Math.sqrt(u*u+c*c+f*f);return n[0]=u/h,n[1]=c/h,n[2]=f/h,n},direction:Y,dist:E,distance:M,div:C,divide:f,dot:A,equals:X,exactEquals:O,floor:function(n,t){return n[0]=Math.floor(t[0]),n[1]=Math.floor(t[1]),n[2]=Math.floor(t[2]),n},hermite:function(n,t,e,r,o,i){const l=i*i,a=l*(2*i-3)+1,s=l*(i-2)+i,u=l*(i-1),c=l*(3-2*i);return n[0]=t[0]*a+e[0]*s+r[0]*u+o[0]*c,n[1]=t[1]*a+e[1]*s+r[1]*u+o[1]*c,n[2]=t[2]*a+e[2]*s+r[2]*u+o[2]*c,n},inverse:b,len:z,length:i,lerp:S,max:m,min:d,mul:P,multiply:c,negate:v,normalize:_,random:function(n,t=1){const e=o.Ov,r=2*e()*Math.PI,i=2*e()-1,l=Math.sqrt(1-i*i)*t;return n[0]=Math.cos(r)*l,n[1]=Math.sin(r)*l,n[2]=i*t,n},rotateX:function(n,t,e,r){const o=[],i=[];return o[0]=t[0]-e[0],o[1]=t[1]-e[1],o[2]=t[2]-e[2],i[0]=o[0],i[1]=o[1]*Math.cos(r)-o[2]*Math.sin(r),i[2]=o[1]*Math.sin(r)+o[2]*Math.cos(r),n[0]=i[0]+e[0],n[1]=i[1]+e[1],n[2]=i[2]+e[2],n},rotateY:function(n,t,e,r){const o=[],i=[];return o[0]=t[0]-e[0],o[1]=t[1]-e[1],o[2]=t[2]-e[2],i[0]=o[2]*Math.sin(r)+o[0]*Math.cos(r),i[1]=o[1],i[2]=o[2]*Math.cos(r)-o[0]*Math.sin(r),n[0]=i[0]+e[0],n[1]=i[1]+e[1],n[2]=i[2]+e[2],n},rotateZ:function(n,t,e,r){const o=[],i=[];return o[0]=t[0]-e[0],o[1]=t[1]-e[1],o[2]=t[2]-e[2],i[0]=o[0]*Math.cos(r)-o[1]*Math.sin(r),i[1]=o[0]*Math.sin(r)+o[1]*Math.cos(r),i[2]=o[2],n[0]=i[0]+e[0],n[1]=i[1]+e[1],n[2]=i[2]+e[2],n},round:function(n,t){return n[0]=Math.round(t[0]),n[1]=Math.round(t[1]),n[2]=Math.round(t[2]),n},scale:g,scaleAndAdd:y,set:a,sign:p,sqrDist:N,sqrLen:F,squaredDistance:x,squaredLength:w,str:function(n){return"vec3("+n[0]+", "+n[1]+", "+n[2]+")"},sub:q,subtract:u,transformMat3:B,transformMat4:k,transformQuat:j},Symbol.toStringTag,{value:"Module"}))},40876:(n,t,e)=>{e.d(t,{Eq:()=>p,G1:()=>m,TS:()=>i,Tf:()=>M,V6:()=>o,Vm:()=>d,ay:()=>s,c1:()=>g,c4:()=>l,j5:()=>u,lT:()=>f,oW:()=>c,xV:()=>w});const r={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function o(n){return!!r[n]||!!r[n.toLowerCase()]}function i(n){return r[n]??r[n.toLowerCase()]}function l(n){return[...i(n)]}function a(n,t,e){e<0&&++e,e>1&&--e;const r=6*e;return r<1?n+(t-n)*r:2*e<1?t:3*e<2?n+(t-n)*(2/3-e)*6:n}function s(n,t,e,r=1){const o=(n%360+360)%360/360,i=e<=.5?e*(t+1):e+t-e*t,l=2*e-i;return[Math.round(255*a(l,i,o+1/3)),Math.round(255*a(l,i,o)),Math.round(255*a(l,i,o-1/3)),r]}function u(n){const t=n.length>5,e=t?8:4,r=(1<<e)-1,o=t?1:17,i=t?9===n.length:5===n.length;let l=Number("0x"+n.slice(1));if(isNaN(l))return null;const a=[0,0,0,1];let s;return i&&(s=l&r,l>>=e,a[3]=o*s/255),s=l&r,l>>=e,a[2]=o*s,s=l&r,l>>=e,a[1]=o*s,s=l&r,l>>=e,a[0]=o*s,a}function c(n){if(!n.startsWith("#")||isNaN(Number(`0x${n.slice(1)}`)))return null;switch(n.length){case 4:case 5:{const t=parseInt(n.slice(1,2),16),e=parseInt(n.slice(2,3),16),r=parseInt(n.slice(3,4),16),o=4===n.length?15:parseInt(n.slice(4),16);return[t+16*t,e+16*e,r+16*r,(o+16*o)/255]}case 7:case 9:return[parseInt(n.slice(1,3),16),parseInt(n.slice(3,5),16),parseInt(n.slice(5,7),16),(7===n.length?255:parseInt(n.slice(7),16))/255];default:return null}}function f(n){const t=n.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(t){const n=t[2].split(/\s*,\s*/),e=t[1];if("rgb"===e&&3===n.length||"rgba"===e&&4===n.length){if(n[0].endsWith("%")){const t=n.map(n=>2.56*parseFloat(n));return 4===n.length&&(t[3]=parseFloat(n[3])),h(t)}return h(n.map(n=>parseFloat(n)))}if("hsl"===e&&3===n.length||"hsla"===e&&4===n.length)return s(parseFloat(n[0]),parseFloat(n[1])/100,parseFloat(n[2])/100,parseFloat(n[3]??"1"))}return null}function h(n){return n[0]=g(n[0]),n[1]=g(n[1]),n[2]=g(n[2]),n[3]=4===n.length?m(n[3]):1,n}function p(n){let t=o(n)?i(n):null;return t??=f(n),t??=c(n),t}function d(n){const t=p(n);return null!=t?[t[0]/255,t[1]/255,t[2]/255,t[3]]:null}function m(n){return y(n,0,1)}function g(n){return Math.round(y(n,0,255))}function y(n,t,e){return n=Number(n),isNaN(n)?e:n<t?t:n>e?e:n}const M=2.2,x=1/M;function w(n){return n**x}},48163:(n,t,e)=>{function r(){return[0,0]}function o(n){return[n[0],n[1]]}function i(n,t){return[n,t]}function l(){return i(1,1)}function a(){return i(1,0)}function s(){return i(0,1)}e.d(t,{Un:()=>u,fA:()=>i,o8:()=>o,vt:()=>r});const u=l(),c=a(),f=s();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:c,UNIT_Y:f,ZEROS:[0,0],clone:o,create:r,freeze:function(n,t){return[n,t]},fromArray:function(n,t=[0,0]){const e=Math.min(2,n.length);for(let r=0;r<e;++r)t[r]=n[r];return t},fromValues:i,ones:l,unitX:a,unitY:s,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},48353:(n,t,e)=>{e.d(t,{l:()=>u});var r=e(34727),o=e(58083),i=e(51850);function l(n,t,e){const r=Math.sin(n),o=Math.cos(n),i=Math.sin(t),l=Math.cos(t),a=e;return a[0]=-r,a[4]=-i*o,a[8]=l*o,a[12]=0,a[1]=o,a[5]=-i*r,a[9]=l*r,a[13]=0,a[2]=0,a[6]=l,a[10]=i,a[14]=0,a[3]=0,a[7]=0,a[11]=0,a[15]=1,a}var a=e(37539),s=e(21325);function u(n,t,e,r){const i=(0,a.Tp)(n,r);if(null==i)return!1;const u=i.source.spatialReferenceId,d=i.dest.spatialReferenceId;if(u===d&&!c(d)&&(0!==u||(0,s.aI)(n,r)))return(0,o.kN)(e,t),!0;if(c(d)){const n=a.w5[u][10],r=a.w5[10][d];return null!=n&&null!=r&&(n(t,0,h,0),r(h,0,p,0),l(f*h[0],f*h[1],e),e[12]=p[0],e[13]=p[1],e[14]=p[2],!0)}const m=c(u);if((3===d||11===d||2===d||5===d)&&(2===u||m||3===u||5===u)){const n=a.w5[u][10],r=a.w5[10][d];return null!=n&&null!=r&&(n(t,0,h,0),r(h,0,p,0),m?function(n,t,e){l(n,t,e),(0,o.mg)(e,e)}(f*h[0],f*h[1],e):(0,o.D_)(e),e[12]=p[0],e[13]=p[1],e[14]=p[2],!0)}return!1}function c(n){return 1===n||6===n||8===n||4===n}const f=(0,r.kU)(1),h=(0,i.vt)(),p=(0,i.vt)()},51850:(n,t,e)=>{function r(){return[0,0,0]}function o(n){return[n[0],n[1],n[2]]}function i(n,t,e){return[n,t,e]}function l(n,t,e){return[n,t,e]}function a(n,t=[0,0,0]){const e=Math.min(3,n.length);for(let r=0;r<e;++r)t[r]=n[r];return t}function s(){return i(1,1,1)}function u(){return i(1,0,0)}function c(){return i(0,1,0)}function f(){return i(0,0,1)}e.d(t,{CN:()=>l,Cb:()=>g,Cw:()=>d,JP:()=>m,Un:()=>p,ci:()=>a,fA:()=>i,o8:()=>o,uY:()=>h,vt:()=>r});const h=[0,0,0],p=s(),d=u(),m=c(),g=f();Object.freeze(Object.defineProperty({__proto__:null,ONES:p,UNIT_X:d,UNIT_Y:m,UNIT_Z:g,ZEROS:h,clone:o,create:r,freeze:l,fromArray:a,fromValues:i,ones:s,unitX:u,unitY:c,unitZ:f,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"}))},62815:(n,t,e)=>{e.d(t,{N:()=>l});var r=e(86211),o=e(73941),i=e(21325);function l(n,t,e){if(null==t||null==e||e.vcsWkid||(0,i.aI)(t,e)||(0,o.xP)(t)||(0,o.xP)(e))return null;const l=(0,r.G9)(t)/(0,r.G9)(e);if(1===l)return null;switch(n){case"point":case"esriGeometryPoint":return n=>function(n,t){null!=n?.z&&(n.z*=t)}(n,l);case"polyline":case"esriGeometryPolyline":return n=>function(n,t){if(n)for(const e of n.paths)for(const n of e)n.length>2&&(n[2]*=t)}(n,l);case"polygon":case"esriGeometryPolygon":return n=>function(n,t){if(n)for(const e of n.rings)for(const n of e)n.length>2&&(n[2]*=t)}(n,l);case"multipoint":case"esriGeometryMultipoint":return n=>function(n,t){if(n)for(const e of n.points)e.length>2&&(e[2]*=t)}(n,l);case"extent":case"esriGeometryEnvelope":return n=>function(n,t){n&&null!=n.zmin&&null!=n.zmax&&(n.zmin*=t,n.zmax*=t)}(n,l);default:return null}}},65806:(n,t,e)=>{e.d(t,{g:()=>l});var r=e(51850),o=e(91218),i=e(9762);function l(n,t,e){if((0,o.canProjectWithoutEngine)(n.spatialReference,e))return a[0]=n.x,a[1]=n.y,a[2]=n.z??0,(0,i.projectBuffer)(a,n.spatialReference,0,t,e,0);const r=(0,o.tryProjectWithZConversion)(n,e);return!!r&&(t[0]=r.x,t[1]=r.y,t[2]=r.z??0,!0)}const a=(0,r.vt)()},69540:(n,t,e)=>{e.d(t,{OU:()=>c,Pw:()=>f});var r=e(31635),o=e(69622),i=(e(44208),e(4718)),l=(e(53966),e(97768)),a=e(88620),s=e(64108);const u=Symbol("ClonableMixin"),c=n=>{var t;const e=n;let o=class extends e{constructor(){super(...arguments),this[t]=!0}static{t=u}clone(n){const t=(0,a.oY)(this);(0,l.Lw)(t,"unable to clone instance of non-accessor class");const e=t.metadata,r=t.store,o={},s=new Map;for(const t in e){const l=e[t],a=r?.originOf(t),u=l.clonable;if(l.readOnly||!1===u||7!==a&&0!==a&&5!==a&&4!==a)continue;const c=this[t];let f=null;if("function"==typeof u)f=u(c,n);else if("reference"===u)f=c;else if(f=(0,i.TU)(c,n),null!=c&&null==f)continue;0===a?s.set(t,f):o[t]=f}const u=new(0,Object.getPrototypeOf(this).constructor)(o);if(s.size){const n=(0,a.oY)(u)?.store;if(n)for(const[t,e]of s)n.set(t,e,0)}return u}};return o=(0,r.Cg)([(0,s.$)("esri.core.Clonable")],o),o},f=c(o.A)},72258:(n,t,e)=>{e.d(t,{UR:()=>v,p5:()=>w,xK:()=>k});var r=e(53966),o=e(34727),i=e(86211),l=e(77690),a=e(29242),s=e(58083),u=e(9093),c=e(38954),f=e(51850),h=e(98764),p=e(48353),d=e(65806),m=e(27615),g=e(21325),y=e(73354),M=e(22141);const x=()=>r.A.getLogger("esri.geometry.support.meshUtils.vertexSpaceConversion");function w(n,t,{vertexSpace:e,spatialReference:r}){if("georeferenced"===e.type){const o=n;if(!(0,d.g)(t,o,r))return!1;const{origin:i}=e;return(0,c.e)(n,o,i),!0}const o=(0,h.lO)(r),i=n;if(!(0,d.g)(t,i,o))return!1;const{origin:l}=e,a=O;if(!(0,p.l)(r,l,a,o))return!1;const u=(0,s.B8)(O,a);return null!=u&&((0,c.p)(n,i,u),!0)}function v(n,t,e){const{vertexSpace:r,transform:o,vertexAttributes:i}=n,a=(0,m.Hq)(r)?o:null,f=R(n.spatialReference,e,3);if((0,m.yJ)(r,t)&&(!a||(0,s.t2)(a.localMatrix,u.zK))&&S(f)){const{position:n,normal:t,tangent:r}=i,o=e?.allowBufferReuse;return{position:o?n:n.slice(),normal:o?t:t?.slice(),tangent:o?r:r?.slice()}}switch(n.vertexSpace.type){case"local":return"local"===t.type?function({vertexAttributes:n,spatialReference:t,transform:e},{origin:r},o,i){const l=b(t,i);if(!(0,p.l)(t,r,B,l))return(0,M.CN)(x(),t,l),null;if(e&&(0,s.lw)(B,B,e.localMatrix),!(0,p.l)(t,o,j,l))return(0,M.CN)(x(),l,t),null;(0,s.B8)(j,j);const a=(0,s.lw)(B,j,B);return A(a,t,i,3),_(n,a)}(n,n.vertexSpace,t.origin,e):function({spatialReference:n,vertexAttributes:t,transform:e},{origin:r},o,i){const l=b(n,i);if(!(0,p.l)(n,r,B,l))return(0,M.CN)(x(),n,l),null;e&&(0,s.lw)(B,B,e.localMatrix),A(B,n,i,1);const a=new Float64Array(t.position.length),u=function(n,t,e,r,o){(0,y.t)(r,n,t);const i=new Float64Array(n.length);return(0,M.$5)(r,o,i,e)?i:((0,M.CN)(x(),o,e),null)}(t.position,B,n,a,l);if(!u)return null;const f=function(n,t,e,r,o,i){if(null==o)return null;const l=new Float32Array(o.length);return(0,M.qs)(o,l,i),(0,M.si)(l,n,t,e,r,l)?l:((0,M.CN)(x(),r,t),null)}(u,n,a,l,t.normal,B);if(t.normal&&!f)return null;const h=function(n,t,e,r,o,i){if(null==o)return null;const l=new Float32Array(o.length);return(0,M.KM)(o,l,i),(0,M.Mv)(l,n,t,e,r,l)?l:((0,M.CN)(x(),r,t),null)}(u,n,a,l,t.tangent,B);if(t.tangent&&!h)return null;if(o){const n=(0,c.q)(T,o);(0,y.a)(u,u,n)}return{position:u,normal:f,tangent:h}}(n,n.vertexSpace,t.origin,e);case"georeferenced":return"local"===t.type?function({vertexAttributes:n,spatialReference:t,transform:e},{origin:r},o,i){const a=b(t,i);if(!(0,p.l)(t,o,B,a))return(0,M.CN)(x(),t,a),null;const u=1/R(t,i,2);(0,s.hs)(B,B,[u,u,u]);const c=(0,s.B8)(j,B),{position:f,normal:h,tangent:d}=function(n,t,e){if(!t)return n;if(!e){const{position:e,normal:r,tangent:o}=n;return{position:(0,y.a)(new Float64Array(e.length),e,t),tangent:o,normal:r}}const r=_(n,e.localMatrix);return(0,y.a)(r.position,r.position,t),r}(n,r,e),m=new Float64Array(f.length),g=function(n,t,e,r,o){const i=(0,M.gr)(n,t,r,o);if(!i)return(0,M.CN)(x(),t,o),null;const l=new Float64Array(i.length);return(0,y.t)(l,i,e),l}(f,t,c,m,a);if(!g)return null;const w=(0,l.Ge)(I,c),v=function(n,t,e,r,o,i,l){if(null==n)return null;const a=l??new Float32Array(n.length);return(0,M.X4)(n,t,e,r,o,a)?((0,y.b)(a,a,i),a):((0,M.CN)(x(),e,o),null)}(h,f,t,m,a,w,h!==n.normal?h:void 0);if(!v&&h)return null;const A=function(n,t,e,r,o,i,l){if(null==n)return null;const a=l??new Float32Array(n.length);return(0,M.xA)(n,t,e,r,o,a)?((0,y.b)(a,a,i,4),a):((0,M.CN)(x(),e,o),null)}(d,f,t,m,a,w,d!==n.tangent?d:void 0);return!A&&d?null:{position:g,normal:v,tangent:A}}(n,n.vertexSpace,t.origin,e):function({vertexAttributes:n,transform:t,spatialReference:e},{origin:r},o,i){const l=R(e,i,3),a=r||!S(l)?(0,s.C)(B,t?.localMatrix??u.zK):null;a&&A(a,e,i,3);const{position:f,normal:h,tangent:p}=a?_(n,a):n,d=i?.allowBufferReuse,m=d?f:new Float64Array(f.length);let g=f;if(r&&(g=(0,y.a)(m,g,r)),o){const n=(0,c.q)(T,o);g=(0,y.a)(m,g,n)}return{position:g!==n.position||d?g:g.slice(),normal:h!==n.normal||d?h:h?.slice(),tangent:p!==n.tangent||d?p:p?.slice()}}(n,n.vertexSpace,t.origin,e)}}function b(n,t){return t?.useEllipsoid&&(0,g.B3)(n)?h.Y0:(0,h.lO)(n)}function _(n,t){const e=new Float64Array(n.position.length);(0,y.t)(e,n.position,t);const r=n.normal?new Float32Array(n.normal.length):null,o=n.tangent?new Float32Array(n.tangent.length):null;return r&&n.normal&&(0,M.qs)(n.normal,r,t),o&&n.tangent&&(0,M.KM)(n.tangent,o,t),{position:e,normal:r,tangent:o}}function A(n,t,e,r){const o=R(t,e,r);S(o)||(0,s.hs)(n,n,[o,o,o])}function R(n,t,e){const r=!!(1&e),o=!!(2&e),i=t?.sourceUnit,l=t?.targetUnit;if(!i&&!l)return 1;let a=k(i,n);r||!i||S(a)||(x().warn("source unit conversion not supported"),a=1);let s=1/k(l,n);return o||!l||S(s)||(x().warn("target unit conversion not supported"),s=1),a*s}function S(n){return(0,o.Io)(n,1)}function k(n,t){if(null==n)return 1;const e=(0,i.KX)(t);return 1/(0,i.oU)(e,"meters",n)}const B=(0,u.vt)(),j=(0,u.vt)(),I=(0,a.vt)(),T=(0,f.vt)(),O=(0,u.vt)()},73354:(n,t,e)=>{e.d(t,{a:()=>f,b:()=>a,c:()=>l,d:()=>o,e:()=>h,f:()=>c,l:()=>u,n:()=>p,t:()=>i});var r=e(40876);function o(n,t,e){i(n.typedBuffer,t.typedBuffer,e,n.typedBufferStride,t.typedBufferStride)}function i(n,t,e,r=3,o=r){if(n.length/r!==Math.ceil(t.length/o))return n;const i=n.length/r,l=e[0],a=e[1],s=e[2],u=e[4],c=e[5],f=e[6],h=e[8],p=e[9],d=e[10],m=e[12],g=e[13],y=e[14];let M=0,x=0;for(let e=0;e<i;e++){const e=t[M],i=t[M+1],w=t[M+2];n[x]=l*e+u*i+h*w+m,n[x+1]=a*e+c*i+p*w+g,n[x+2]=s*e+f*i+d*w+y,M+=o,x+=r}return n}function l(n,t,e){a(n.typedBuffer,t.typedBuffer,e,n.typedBufferStride,t.typedBufferStride)}function a(n,t,e,r=3,o=r){if(n.length/r!==Math.ceil(t.length/o))return;const i=n.length/r,l=e[0],a=e[1],s=e[2],u=e[3],c=e[4],f=e[5],h=e[6],p=e[7],d=e[8];let m=0,g=0;for(let e=0;e<i;e++){const e=t[m],i=t[m+1],y=t[m+2];n[g]=l*e+u*i+h*y,n[g+1]=a*e+c*i+p*y,n[g+2]=s*e+f*i+d*y,m+=o,g+=r}}function s(n,t,e,r=3,o=r){const i=Math.min(n.length/r,t.length/o);let l=0,a=0;for(let s=0;s<i;s++)n[a]=e*t[l],n[a+1]=e*t[l+1],n[a+2]=e*t[l+2],l+=o,a+=r;return n}function u(n,t,e,r){c(n.typedBuffer,t.typedBuffer,e,r,n.typedBufferStride,t.typedBufferStride)}function c(n,t,e,o,i=3,l=i){const a=Math.min(n.length/i,t.length/l);let s=0,u=0;const c=1/r.Tf;for(let r=0;r<a;r++)n[u]=o*(e*t[s])**c,n[u+1]=o*(e*t[s+1])**c,n[u+2]=o*(e*t[s+2])**c,s+=l,u+=i}function f(n,t,e,r=3,o=r){const i=n.length/r;if(i!==Math.ceil(t.length/o))return n;let l=0,a=0;for(let s=0;s<i;s++)n[a]=t[l]+e[0],n[a+1]=t[l+1]+e[1],n[a+2]=t[l+2]+e[2],l+=o,a+=r;return n}function h(n,t){p(n.typedBuffer,t.typedBuffer,n.typedBufferStride,t.typedBufferStride)}function p(n,t,e=3,r=e){const o=Math.min(n.length/e,t.length/r);let i=0,l=0;for(let a=0;a<o;a++){const o=t[i],a=t[i+1],s=t[i+2],u=o*o+a*a+s*s;if(u>0){const t=1/Math.sqrt(u);n[l]=t*o,n[l+1]=t*a,n[l+2]=t*s}i+=r,l+=e}}e(44208),e(53966),Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:c,linearToSRGBView:u,normalize:p,normalizeView:h,scale:s,scaleView:function(n,t,e){s(n.typedBuffer,t.typedBuffer,e,n.typedBufferStride,t.typedBufferStride)},shiftRight:function(n,t,e){const r=Math.min(n.count,t.count),o=n.typedBuffer,i=n.typedBufferStride,l=t.typedBuffer,a=t.typedBufferStride;let s=0,u=0;for(let n=0;n<r;n++)o[u]=l[s]>>e,o[u+1]=l[s+1]>>e,o[u+2]=l[s+2]>>e,s+=a,u+=i},transformMat3:a,transformMat3View:l,transformMat4:i,transformMat4View:o,translate:f},Symbol.toStringTag,{value:"Module"}))},75503:(n,t,e)=>{e.d(t,{EC:()=>R,wq:()=>a});var r=e(4576),o=e(21818),i=(e(44208),e(15142)),l=e(11006);class a{constructor(n=9,t){this._compareMinX=h,this._compareMinY=p,this._toBBox=n=>n,this._maxEntries=Math.max(4,n||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(),v.prune(),b.prune(),_.prune(),A.prune()}all(n){s(this._data,n)}search(n,t){let e=this._data;const r=this._toBBox;if(x(n,e))for(v.clear();e;){for(let o=0,i=e.children.length;o<i;o++){const i=e.children[o],l=e.leaf?r(i):i;x(n,l)&&(e.leaf?t(i):M(n,l)?s(i,t):v.push(i))}e=v.pop()}}collides(n){let t=this._data;const e=this._toBBox;if(!x(n,t))return!1;for(v.clear();t;){for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],i=t.leaf?e(o):o;if(x(n,i)){if(t.leaf||M(n,i))return!0;v.push(o)}}t=v.pop()}return!1}load(n){if(!n.length)return this;if(n.length<this._minEntries){for(let t=0,e=n.length;t<e;t++)this.insert(n[t]);return this}let t=this._build(n.slice(),0,n.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 n=this._data;this._data=t,t=n}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(n){return n&&this._insert(n,this._data.height-1),this}clear(){return this._data=new k([]),this}remove(n){if(!n)return this;let t,e=this._data,i=null,l=0,a=!1;const s=this._toBBox(n);for(_.clear(),A.clear();e||_.length>0;){if(e||(e=_.pop(),i=_.data[_.length-1],l=A.pop()??0,a=!0),e.leaf&&(t=(0,r.qh)(e.children,(0,o.zI)(n),e.children.length,e.indexHint),-1!==t))return e.children.splice(t,1),_.push(e),this._condense(_),this;a||e.leaf||!M(e,s)?i?(l++,e=i.children[l],a=!1):e=null:(_.push(e),A.push(l),l=0,i=e,e=e.children[0])}return this}toJSON(){return this._data}fromJSON(n){return this._data=n,this}_build(n,t,e,r){const o=e-t+1;let i=this._maxEntries;if(o<=i){const r=new k(n.slice(t,e+1));return u(r,this._toBBox),r}r||(r=Math.ceil(Math.log(o)/Math.log(i)),i=Math.ceil(o/i**(r-1)));const l=new B([]);l.height=r;const a=Math.ceil(o/i),s=a*Math.ceil(Math.sqrt(i));w(n,t,e,s,this._compareMinX);for(let o=t;o<=e;o+=s){const t=Math.min(o+s-1,e);w(n,o,t,a,this._compareMinY);for(let e=o;e<=t;e+=a){const o=Math.min(e+a-1,t);l.children.push(this._build(n,e,o,r-1))}}return u(l,this._toBBox),l}_insert(n,t,e){const r=this._toBBox,o=e?n:r(n);_.clear();const i=function(n,t,e,r){for(;r.push(t),!0!==t.leaf&&r.length-1!==e;){let e,r=1/0,o=1/0;for(let i=0,l=t.children.length;i<l;i++){const l=t.children[i],a=d(l),s=g(n,l)-a;s<o?(o=s,r=a<r?a:r,e=l):s===o&&a<r&&(r=a,e=l)}t=e||t.children[0]}return t}(o,this._data,t,_);for(i.children.push(n),f(i,o);t>=0&&_.data[t].children.length>this._maxEntries;)this._split(_,t),t--;!function(n,t,e){for(let r=e;r>=0;r--)f(t.data[r],n)}(o,_,t)}_split(n,t){const e=n.data[t],r=e.children.length,o=this._minEntries;this._chooseSplitAxis(e,o,r);const i=this._chooseSplitIndex(e,o,r);if(!i)return;const l=e.children.splice(i,e.children.length-i),a=e.leaf?new k(l):new B(l);a.height=e.height,u(e,this._toBBox),u(a,this._toBBox),t?n.data[t-1].children.push(a):this._splitRoot(e,a)}_splitRoot(n,t){this._data=new B([n,t]),this._data.height=n.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(n,t,e){let r,o,i;r=o=1/0;for(let l=t;l<=e-t;l++){const t=c(n,0,l,this._toBBox),a=c(n,l,e,this._toBBox),s=y(t,a),u=d(t)+d(a);s<r?(r=s,i=l,o=u<o?u:o):s===r&&u<o&&(o=u,i=l)}return i}_chooseSplitAxis(n,t,e){const r=n.leaf?this._compareMinX:h,o=n.leaf?this._compareMinY:p;this._allDistMargin(n,t,e,r)<this._allDistMargin(n,t,e,o)&&n.children.sort(r)}_allDistMargin(n,t,e,r){n.children.sort(r);const o=this._toBBox,i=c(n,0,t,o),l=c(n,e-t,e,o);let a=m(i)+m(l);for(let r=t;r<e-t;r++){const t=n.children[r];f(i,n.leaf?o(t):t),a+=m(i)}for(let r=e-t-1;r>=t;r--){const t=n.children[r];f(l,n.leaf?o(t):t),a+=m(l)}return a}_condense(n){for(let t=n.length-1;t>=0;t--){const e=n.data[t];if(0===e.children.length)if(t>0){const o=n.data[t-1],i=o.children;i.splice((0,r.qh)(i,e,i.length,o.indexHint),1)}else this.clear();else u(e,this._toBBox)}}_initFormat(n){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(n[0])),this._compareMinY=new Function("a","b",t.join(n[1])),this._toBBox=new Function("a","return {minX: a"+n[0]+", minY: a"+n[1]+", maxX: a"+n[2]+", maxY: a"+n[3]+"};")}}function s(n,t){let e=n;for(b.clear();e;){if(!0===e.leaf)for(const n of e.children)t((0,o.zI)(n));else b.pushArray(e.children);e=b.pop()??null}}function u(n,t){c(n,0,n.children.length,t,n)}function c(n,t,e,r,o){o||(o=new k([])),o.minX=1/0,o.minY=1/0,o.maxX=-1/0,o.maxY=-1/0;for(let i,l=t;l<e;l++)i=n.children[l],f(o,n.leaf?r(i):i);return o}function f(n,t){n.minX=Math.min(n.minX,t.minX),n.minY=Math.min(n.minY,t.minY),n.maxX=Math.max(n.maxX,t.maxX),n.maxY=Math.max(n.maxY,t.maxY)}function h(n,t){return n.minX-t.minX}function p(n,t){return n.minY-t.minY}function d(n){return(n.maxX-n.minX)*(n.maxY-n.minY)}function m(n){return n.maxX-n.minX+(n.maxY-n.minY)}function g(n,t){return(Math.max(t.maxX,n.maxX)-Math.min(t.minX,n.minX))*(Math.max(t.maxY,n.maxY)-Math.min(t.minY,n.minY))}function y(n,t){const e=Math.max(n.minX,t.minX),r=Math.max(n.minY,t.minY),o=Math.min(n.maxX,t.maxX),i=Math.min(n.maxY,t.maxY);return Math.max(0,o-e)*Math.max(0,i-r)}function M(n,t){return n.minX<=t.minX&&n.minY<=t.minY&&t.maxX<=n.maxX&&t.maxY<=n.maxY}function x(n,t){return t.minX<=n.maxX&&t.minY<=n.maxY&&t.maxX>=n.minX&&t.maxY>=n.minY}function w(n,t,e,r,o){const i=[t,e];for(;i.length;){const t=i.pop(),e=i.pop();if(t-e<=r)continue;const a=e+Math.ceil((t-e)/r/2)*r;(0,l.q)(n,a,e,t,o),i.push(e,a,a,t)}}const v=new i.A,b=new i.A,_=new i.A,A=new i.A({deallocator:void 0});class R{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class S extends R{constructor(){super(...arguments),this.height=1,this.indexHint=new r.vW}}class k extends S{constructor(n){super(),this.children=n,this.leaf=!0}}class B extends S{constructor(n){super(),this.children=n,this.leaf=!1}}},91218:(n,t,e)=>{e.r(t),e.d(t,{canProjectWithoutEngine:()=>Z,initializeProjection:()=>$,isEqualBaseGCS:()=>G,isLoaded:()=>I,isLoadedOrLoad:()=>T,isLoadedOrLoadFor:()=>O,load:()=>Y,project:()=>q,projectExtent:()=>en,projectMany:()=>P,projectMultipoint:()=>D,projectOrLoad:()=>C,projectOrLoadMany:()=>E,projectPoint:()=>V,projectPolygon:()=>nn,projectPolyline:()=>H,projectWithZConversion:()=>L,projectWithoutEngine:()=>K,requiresLoad:()=>X,test:()=>F,tryProjectWithZConversion:()=>U,unload:()=>z});var r=e(49186),o=e(74887),i=e(62788),l=e(95488),a=e(51850),s=e(21276),u=e(73941),c=e(5443),f=e(91075),h=e(48526),p=e(86738),d=e(39829),m=e(82799),g=e(16930),y=e(159),M=e(9762),x=e(37539);function w(n,t,e,r,o,i){return v[0]=n,v[1]=t,v[2]=e,(0,M.projectBuffer)(v,r,0,o,i,0)}const v=(0,a.vt)();var b=e(21325),_=e(62815);let A=null,R=null,S=null,k=null,B={};const j=new l.I;function I(){return!!(R?.isLoaded()&&S?.isLoaded()&&k?.isLoaded())}function T(){return!!I()||((0,i.gc)(j),Y(),!1)}function O(n,t){return!n||!t||Z(n,t)||T()}function X(n,t){return!Z(n,t)&&!I()}async function Y(n){null==A&&(A=Promise.all([e.e(3276).then(e.bind(e,83276)).then(n=>(R=n,R.load())),e.e(8377).then(e.bind(e,8377)).then(n=>(S=n,S.load())),e.e(2158).then(e.bind(e,12158)).then(n=>(k=n,k.load()))])),await A,(0,o.Te)(n),j.notify()}function q(n,t,e){return Array.isArray(n)?0===n.length?[]:((0,s.H)(n),P(n,n[0].spatialReference,t,e)):((0,s.f)(n),P([n],n.spatialReference,t,e)[0])}function P(n,t,e,r){if(null==t||null==e)return n;if(Z(t,e,r))return n.map(n=>K(n,t,e));if(null==r?.geographicTransformation&&(0,u.jA)(t))return n.map(n=>K(n,t,g.A.WGS84)).map(n=>U(n,e));if(null==r?.geographicTransformation&&(0,u.jA)(e))return n.map(n=>U(n,g.A.WGS84)).map(n=>K(n,g.A.WGS84,e));if(!I())throw new N;if(!r?.geographicTransformation)if(r?.extendedParams)r={...r,geographicTransformation:k.getTransformation(t,e,r.areaOfInterestExtent)||new y.A};else if(!r?.areaOfInterestExtent){const n=function(n,t){return[n.wkid?.toString()??"-1",n.wkt?.toString()??"",n.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}(t,e);let o=B[n];o||(o=k.getTransformation(t,e)||new y.A,B[n]=o),r={geographicTransformation:o}}return n[0].spatialReference||(n[0].spatialReference=t),n[0]instanceof f.A?R.executeMany(n,e,r):S.executeMany(n,e,r)}function C(n,t){const e=E([n],t);return null!=e.pending?{pending:e.pending,geometry:null}:null!=e.geometries?{pending:null,geometry:e.geometries[0]}:{pending:null,geometry:null}}function E(n,t){if(!I())for(const e of n)if(null!=e&&!(0,b.aI)(e.spatialReference,t)&&(0,b.fn)(e.spatialReference)&&(0,b.fn)(t)&&!Z(e.spatialReference,t))return(0,i.gc)(j),{pending:Y(),geometries:null};return{pending:null,geometries:n.map(n=>null==n?null:(0,b.aI)(n.spatialReference,t)?n:(0,b.fn)(n.spatialReference)&&(0,b.fn)(t)?U(n,t):null)}}class N extends r.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function z(){A=null,R=null,S=null,k=null,B={}}const F={get loadPromise(){return A}};function U(n,t){try{const e=q(n,t);if(null==e)return null;"xmin"in n&&"xmin"in e&&(e.zmin=n.zmin,e.zmax=n.zmax);const r=(0,_.N)(e.type,n.spatialReference,t);return null!=r&&r(e),e}catch(n){if(!(n instanceof N))throw n;return null}}async function L(n,t,e){const r=n.spatialReference;return null!=r&&null!=t&&await $(r,t,null,e),U(n,t)}function Z(n,t,e){return!(e?.areaOfInterestExtent||e?.extendedParams||e?.geographicTransformation)&&(!!(0,b.aI)(n,t)||(0,b.fn)(n)&&(0,b.fn)(t)&&!!(0,x.jd)(n,t))}function G(n,t){if((0,b.aI)(n,t))return!0;if(!(0,b.fn)(n)||!(0,b.fn)(t))return!1;const e=(0,b.oT)(n)||(0,b.K8)(n)||(0,b.x1)(n),r=(0,b.oT)(t)||(0,b.K8)(t)||(0,b.x1)(t);return e&&r}async function $(n,t,e,r){if(I())return(0,o.NO)(r);if(Array.isArray(n)){for(const{source:t,dest:e,options:o}of n)if(t&&e&&!Z(t,e,o))return Y(r)}else if(n&&t&&!Z(n,t,e))return Y(r);return(0,o.NO)(r)}function K(n,t,e){return n?"x"in n?W(n,t,new p.A,e,0):"xmin"in n?rn(n,t,new c.A,e,0):"rings"in n?tn(n,t,new d.A,e,0):"paths"in n?Q(n,t,new m.A,e,0):"points"in n?J(n,t,new h.A,e,0):null:null}function V(n,t,e=t.spatialReference,r=0){return null!=e&&null!=n.spatialReference&&null!=W(n,n.spatialReference,t,e,r)}function W(n,t,e,r,o){ln[0]=n.x,ln[1]=n.y;const i=n.z;return ln[2]=void 0!==i?i:o,(0,M.projectBuffer)(ln,t,0,ln,r,0)?(e.x=ln[0],e.y=ln[1],e.spatialReference=r,void 0!==i||(0,u.xP)(r)?(e.z=ln[2],e.hasZ=!0):(e.z=void 0,e.hasZ=!1),void 0===n.m?(e.m=void 0,e.hasM=!1):(e.m=n.m,e.hasM=!0),e):null}function D(n,t,e=t.spatialReference,r=0){return null!=n.spatialReference&&null!=e&&null!=J(n,n.spatialReference,t,e,r)}function J(n,t,e,r,o){const{points:i,hasZ:l,hasM:a}=n,s=[],c=i.length,f=[];for(const n of i)f.push(n[0],n[1],l?n[2]:o);if(!(0,M.projectBuffer)(f,t,0,f,r,0,c))return null;const h=l||(0,u.xP)(r);for(let n=0;n<c;++n){const t=3*n,e=f[t],r=f[t+1];h&&a?s.push([e,r,f[t+2],i[n][3]]):h?s.push([e,r,f[t+2]]):a?s.push([e,r,i[n][2]]):s.push([e,r])}return e.points=s,e.spatialReference=r,e.hasZ=l,e.hasM=a,e}function H(n,t,e=t.spatialReference,r=0){return null!=n.spatialReference&&null!=e&&null!=Q(n,n.spatialReference,t,e,r)}function Q(n,t,e,r,o){const{paths:i,hasZ:l,hasM:a}=n,s=[];if(!on(i,l??!1,a??!1,t,s,r,o))return null;const c=l||(0,u.xP)(r);return e.paths=s,e.spatialReference=r,e.hasZ=c,e.hasM=a,e}function nn(n,t,e=t.spatialReference,r=0){return null!=n.spatialReference&&null!=e&&null!=tn(n,n.spatialReference,t,e,r)}function tn(n,t,e,r,o){const{rings:i,hasZ:l,hasM:a}=n,s=[];if(!on(i,l??!1,a??!1,t,s,r,o))return null;const c=l||(0,u.xP)(r);return e.rings=s,e.spatialReference=r,e.hasZ=c,e.hasM=a,e}function en(n,t,e=t.spatialReference,r=0){return null!=n.spatialReference&&null!=e&&null!=rn(n,n.spatialReference,t,e,r)}function rn(n,t,e,r,o){const{xmin:i,ymin:l,xmax:a,ymax:s,hasZ:c,hasM:f}=n;if(!w(i,l,c?n.zmin:o,t,ln,r))return null;const h=c||(0,u.xP)(r);return e.xmin=ln[0],e.ymin=ln[1],h&&(e.zmin=ln[2]),w(a,s,c?n.zmax:o,t,ln,r)?(e.xmax=ln[0],e.ymax=ln[1],h&&(e.zmax=ln[2]),f&&(e.mmin=n.mmin,e.mmax=n.mmax),e.spatialReference=r,e):null}function on(n,t,e,r,o,i,l=0){const a=new Array;for(const e of n)for(const n of e)a.push(n[0],n[1],t?n[2]:l);if(!(0,M.projectBuffer)(a,r,0,a,i,0))return!1;let s=0;o.length=0;const c=t||(0,u.xP)(i);for(const t of n){const n=new Array;for(const r of t)c&&e?n.push([a[s++],a[s++],a[s++],r[3]]):c?n.push([a[s++],a[s++],a[s++]]):e?(n.push([a[s++],a[s++],r[2]]),s++):(n.push([a[s++],a[s++]]),s++);o.push(n)}return!0}const ln=(0,a.vt)()},95488:(n,t,e)=>{e.d(t,{I:()=>o});var r=e(11406);class o extends r.T{notify(){const n=this._observers;if(n&&n.length>0){const t=n.slice();for(const n of t)n.onInvalidated(),n.onCommitted()}}}},95696:(n,t,e)=>{e.d(t,{A:()=>u});var r,o=e(31635),i=e(69540),l=e(25482),a=e(91429),s=e(93223);let u=class extends((0,i.OU)(l.o)){static{r=this}constructor(n){super(n),this.type="georeferenced",this.origin=null}static{this.absolute=new r}};(0,o.Cg)([(0,s.e)({georeferenced:"georeferenced"},{readOnly:!0})],u.prototype,"type",void 0),(0,o.Cg)([(0,a.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],u.prototype,"origin",void 0),u=r=(0,o.Cg)([(0,a.$K)("esri.geometry.support.MeshGeoreferencedVertexSpace")],u)},98764:(n,t,e)=>{e.d(t,{Y0:()=>u,lO:()=>c});var r=e(73941),o=e(16930),i=e(21325);const l=new o.A(r.fv),a=new o.A(r.FY),s=new o.A(r.LJ),u=new o.A(r.Ro);function c(n){const t=f.get(n);if(t)return t;let e=l;if(n)if(n===a)e=a;else if(n===s)e=s;else{const t=n.wkid,r=n.latestWkid;if(null!=t||null!=r)(0,i.tl)(t)||(0,i.tl)(r)?e=a:((0,i.ZL)(t)||(0,i.ZL)(r))&&(e=s);else{const t=n.wkt2??n.wkt;if(t){const n=t.toUpperCase();n===h?e=a:n===p&&(e=s)}}}return f.set(n,e),e}const f=new Map,h=a.wkt.toUpperCase(),p=s.wkt.toUpperCase()},99157:(n,t,e)=>{e.d(t,{A:()=>a});var r,o=e(31635),i=e(69622),l=e(91429);let a=r=class extends i.A{constructor(n){super(n),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new r({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,o.Cg)([(0,l.MZ)()],a.prototype,"isInverse",void 0),(0,o.Cg)([(0,l.MZ)()],a.prototype,"wkt",void 0),(0,o.Cg)([(0,l.MZ)()],a.prototype,"wkid",void 0),a=r=(0,o.Cg)([(0,l.$K)("esri.geometry.operators.support.GeographicTransformationStep")],a)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5845],{159:(n,t,e)=>{e.d(t,{A:()=>s});var r,o=e(31635),i=e(69622),l=e(91429),a=e(99157);let s=r=class extends i.A{constructor(n){super(n),this.steps=[]}getInverse(){const n=new r;for(let t=this.steps.length-1;t>=0;t--){const e=this.steps[t];n.steps.push(e.getInverse())}return n}};(0,o.Cg)([(0,l.MZ)({type:[a.A],nonNullable:!0})],s.prototype,"steps",void 0),s=r=(0,o.Cg)([(0,l.$K)("esri.geometry.operators.support.GeographicTransformation")],s)},9093:(n,t,e)=>{function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function o(n){return[n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15]]}e.d(t,{o8:()=>o,vt:()=>r,zK:()=>i});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:o,create:r,fromValues:function(n,t,e,r,o,i,l,a,s,u,c,f,h,p,d,m){return[n,t,e,r,o,i,l,a,s,u,c,f,h,p,d,m]}},Symbol.toStringTag,{value:"Module"}))},9762:(n,t,e)=>{e.r(t),e.d(t,{projectBuffer:()=>o});var r=e(37539);function o(n,t,e,o,i,l,a=Math.floor(n.length/3)){const s=(0,r.jd)(t,i);if(null==s)return!1;if(s===r.pO){if(n===o&&e===l)return!0;const t=e+3*a;for(let r=e,i=l;r<t;r++,i++)o[i]=n[r]??0;return!0}const u=e+3*a;for(let t=e,r=l;t<u;t+=3,r+=3)s(n,t,o,r);return!0}},11006:(n,t,e)=>{function r(n,t,e,r,i){o(n,t,e||0,r||n.length-1,i||l)}function o(n,t,e,r,l){for(;r>e;){if(r-e>600){var a=r-e+1,s=t-e+1,u=Math.log(a),c=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*c*(a-c)/a)*(s-a/2<0?-1:1);o(n,t,Math.max(e,Math.floor(t-s*c/a+f)),Math.min(r,Math.floor(t+(a-s)*c/a+f)),l)}var h=n[t],p=e,d=r;for(i(n,e,t),l(n[r],h)>0&&i(n,e,r);p<d;){for(i(n,p,d),p++,d--;l(n[p],h)<0;)p++;for(;l(n[d],h)>0;)d--}0===l(n[e],h)?i(n,e,d):i(n,++d,r),d<=t&&(e=d+1),t<=d&&(r=d-1)}}function i(n,t,e){var r=n[t];n[t]=n[e],n[e]=r}function l(n,t){return n<t?-1:n>t?1:0}e.d(t,{q:()=>r})},18251:(n,t,e)=>{e.d(t,{A:()=>u});var r=e(31635),o=e(69540),i=e(25482),l=e(91429),a=e(51850),s=e(93223);let u=class extends((0,o.OU)(i.o)){constructor(n){super(n),this.type="local",this.origin=(0,a.vt)()}};(0,r.Cg)([(0,s.e)({local:"local"},{readOnly:!0})],u.prototype,"type",void 0),(0,r.Cg)([(0,l.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],u.prototype,"origin",void 0),u=(0,r.Cg)([(0,l.$K)("esri.geometry.support.MeshLocalVertexSpace")],u)},22141:(n,t,e)=>{e.d(t,{$5:()=>b,CN:()=>M,JP:()=>y,KM:()=>A,Mv:()=>S,X4:()=>x,gr:()=>v,qs:()=>_,si:()=>w,xA:()=>R});var r=e(34727),o=e(77690),i=e(29242),l=e(58083),a=e(9093),s=e(38954),u=e(51850),c=e(48353),f=e(9762),h=(e(79258),e(21325)),p=e(28735),d=e(13030),m=e(73354),g=e(65686);const y="Projection may be possible after calling projection.load().";function M(n,t,e,r){n.error(`Failed to project from (wkid:${t.wkid}) to (wkid:${e.wkid}).${r?" ":""}${r}`)}function x(n,t,e,r,o,i){return B(0,d.xs.fromTypedArray(n),0,d.Xm.fromTypedArray(t),e,d.Xm.fromTypedArray(r),o,d.xs.fromTypedArray(i))?i:null}function w(n,t,e,r,o,i){return B(1,d.xs.fromTypedArray(n),0,d.Xm.fromTypedArray(t),e,d.Xm.fromTypedArray(r),o,d.xs.fromTypedArray(i))?i:null}function v(n,t,e,r){return(0,f.projectBuffer)(n,t,0,e,r,0)?e:null}function b(n,t,e,r){return(0,f.projectBuffer)(n,t,0,e,r,0)?e:null}function _(n,t,e){return(0,o.Ge)(O,e),(0,m.b)(t,n,O),(0,r.or)(O)&&(0,m.n)(t,t),t}function A(n,t,e){return(0,o.z0)(O,e),(0,g.t)(t,n,O),(0,r.or)(O)&&(0,m.n)(t,t,4),t}function R(n,t,e,r,o,i){if(!B(0,d.xs.fromTypedArray(n,4*Float32Array.BYTES_PER_ELEMENT),1,d.Xm.fromTypedArray(t),e,d.Xm.fromTypedArray(r),o,d.xs.fromTypedArray(i,4*Float32Array.BYTES_PER_ELEMENT)))return null;for(let t=3;t<n.length;t+=4)i[t]=n[t];return i}function S(n,t,e,r,o,i){if(!B(1,d.xs.fromTypedArray(n,16),1,d.Xm.fromTypedArray(t),e,d.Xm.fromTypedArray(r),o,d.xs.fromTypedArray(i,16)))return null;for(let t=3;t<n.length;t+=4)i[t]=n[t];return i}function k(n,t,e,r,i){switch((0,c.l)(r,e,T,r),1===n&&(0,l.B8)(T,T),t){case 0:return(0,o.Ge)(i,T);case 1:return(0,o.z0)(i,T)}}function B(n,t,e,r,o,i,l,a){if(!t)return;const u=r.count;if(function(n){return n.isWGS84||(0,h.x1)(n)||(0,h.q8)(n)||(0,h.KQ)(n)}(o))for(let r=0;r<u;r++)i.getVec(r,j),t.getVec(r,I),(0,s.t)(I,I,k(n,e,j,l,O)),a.setVec(r,I);else for(let o=0;o<u;o++){i.getVec(o,j),t.getVec(o,I);const u=(0,p.jg)(r.get(o,1));let c=Math.cos(u);1===e!=(0===n)&&(c=1/c),k(n,e,j,l,O),0===n?(O[0]*=c,O[1]*=c,O[2]*=c,O[3]*=c,O[4]*=c,O[5]*=c):(O[0]*=c,O[3]*=c,O[6]*=c,O[1]*=c,O[4]*=c,O[7]*=c),(0,s.t)(I,I,O),(0,s.n)(I,I),a.setVec(o,I)}return a}const j=(0,u.vt)(),I=(0,u.vt)(),T=(0,a.vt)(),O=(0,i.vt)()},27615:(n,t,e)=>{e.d(t,{CK:()=>s,Hq:()=>a,MW:()=>u,TE:()=>c,yJ:()=>f});var r=e(38954),o=e(86738),i=e(95696),l=e(18251);function a(n){return null!=n.origin}function s(n){return a(n.vertexSpace)}function u(n,t){if(!a(n))return null;const[e,r,i]=n.origin;return new o.A({x:e,y:r,z:i,spatialReference:t})}function c(n,t){const{x:e,y:r,z:o,spatialReference:a}=n,s=[e,r,o??0];return"local"===(t?.vertexSpace??function(n){return n.isGeographic||n.isWebMercator?"local":"georeferenced"}(a))?new l.A({origin:s}):new i.A({origin:s})}function f(n,t){return n.type===t.type&&(n.origin===t.origin||null!=n.origin&&null!=t.origin&&(0,r.m)(n.origin,t.origin))}},31635:(n,t,e)=>{function r(n,t,e,r){var o,i=arguments.length,l=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,e):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(n,t,e,r);else for(var a=n.length-1;a>=0;a--)(o=n[a])&&(l=(i<3?o(l):i>3?o(t,e,l):o(t,e))||l);return i>3&&l&&Object.defineProperty(t,e,l),l}function o(n,t,e){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var r,o;if(e){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],e&&(o=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");o&&(r=function(){try{o.call(this)}catch(n){return Promise.reject(n)}}),n.stack.push({value:t,dispose:r,async:e})}else e&&n.stack.push({async:!0});return t}e.d(t,{Cg:()=>r,hk:()=>l,mS:()=>o}),Object.create,Object.create;var i="function"==typeof SuppressedError?SuppressedError:function(n,t,e){var r=new Error(e);return r.name="SuppressedError",r.error=n,r.suppressed=t,r};function l(n){function t(t){n.error=n.hasError?new i(t,n.error,"An error was suppressed during disposal."):t,n.hasError=!0}var e,r=0;return function o(){for(;e=n.stack.pop();)try{if(!e.async&&1===r)return r=0,n.stack.push(e),Promise.resolve().then(o);if(e.dispose){var i=e.dispose.call(e.value);if(e.async)return r|=2,Promise.resolve(i).then(o,function(n){return t(n),o()})}else r|=1}catch(n){t(n)}if(1===r)return n.hasError?Promise.reject(n.error):Promise.resolve();if(n.hasError)throw n.error}()}},37539:(n,t,e)=>{e.d(t,{pO:()=>m,jd:()=>h,Tp:()=>p,w5:()=>f});var r=e(34727),o=e(86211),i=e(73941),l=e(79258);Math.PI;const a=l.$O.radius,s=l.$O.eccentricitySquared,u={a1:a*s,a2:a*s*a*s,a3:a*s*s/2,a4:a*s*a*s*2.5,a5:a*s+a*s*s/2,a6:1-s};l.$O.radius,l.$O.flattening,l.Sw.radius,l.Sw.flattening,l.sH.radius,l.sH.flattening,l.sH.radius;var c=e(21325);const f={2:{5:m,7:null,9:null,10:m,1:_,6:null,8:null,0:null,3:y,11:M,2:m,4:B},5:{5:m,7:null,9:null,10:m,1:_,6:null,8:null,0:null,3:y,11:M,2:m,4:B},7:{5:null,7:m,9:null,10:m,1:null,6:b,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:m,10:m,1:null,6:null,8:v,0:null,3:null,11:null,2:null,4:null},3:{5:g,7:null,9:null,10:g,1:function(n,t,e,r){const o=n[t]/Y,i=X-2*Math.atan(Math.exp(-n[t+1]/Y)),l=Y+(n[t+2]??0),a=Math.cos(i)*l;e[r]=Math.cos(o)*a,e[r+1]=Math.sin(o)*a,e[r+2]=Math.sin(i)*l},6:null,8:null,0:null,3:m,11:function(n,t,e,r){g(n,t,e,r),M(e,r,e,r)},2:g,4:function(n,t,e,r){g(n,t,e,r),B(e,r,e,r)}},4:{5:j,7:null,9:null,10:j,1:function(n,t,e,r){j(n,t,e,r),_(e,r,e,r)},6:null,8:null,0:null,3:function(n,t,e,r){j(n,t,e,r),y(e,r,e,r)},11:function(n,t,e,r){j(n,t,e,r),M(e,r,e,r)},2:j,4:m},1:{5:k,7:null,9:null,10:k,1:m,6:null,8:null,0:null,3:function(n,t,e,r){k(n,t,e,r),y(e,r,e,r)},11:function(n,t,e,r){k(n,t,e,r),M(e,r,e,r)},2:k,4:function(n,t,e,r){k(n,t,e,r),B(e,r,e,r)}},6:{5:null,7:S,9:null,10:S,1:null,6:m,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:R,10:R,1:null,6:null,8:m,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:m,3:null,11:null,2:null,4:null},10:{5:m,7:m,9:m,10:m,1:_,6:b,8:v,0:null,3:y,11:M,2:m,4:B},11:{5:x,7:null,9:null,10:x,1:function(n,t,e,r){x(n,t,e,r),_(e,r,e,r)},6:null,8:null,0:null,3:function(n,t,e,r){x(n,t,e,r),y(e,r,e,r)},11:m,2:x,4:function(n,t,e,r){x(n,t,e,r),B(e,r,e,r)}}};function h(n,t){return p(n,t)?.projector}function p(n,t){if(null==n||null==t)return null;if(I.source.spatialReference===n&&I.dest.spatialReference===t)return I;const e=d(n,I.source),r=d(t,I.dest);return 0===e&&0===r?(0,c.aI)(n,t)?I.projector=m:I.projector=null:I.projector=f[e][r],I}function d(n,t){return n?t.spatialReference===n?t.spatialReferenceId:(t.spatialReference=n,"metersPerUnit"in t&&(t.metersPerUnit=(0,o.GA)(n,1)),(0,i.jA)(n)?t.spatialReferenceId=1:(0,c.oT)(n)?t.spatialReferenceId=2:(0,c.K8)(n)?t.spatialReferenceId=3:(0,c.r1)(n)?t.spatialReferenceId=11:n.wkt===i.Ro.wkt?t.spatialReferenceId=4:4490===n.wkid?t.spatialReferenceId=5:n.wkt===i.FY.wkt?t.spatialReferenceId=6:n.wkt===i.LJ.wkt?t.spatialReferenceId=8:(0,c.q8)(n)?t.spatialReferenceId=7:(0,c.KQ)(n)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function m(n,t,e,r){n!==e&&(e[r++]=n[t++],e[r++]=n[t++],e[r]=n[t]??0)}function g(n,t,e,r){e[r]=O*(n[t]/Y),e[r+1]=O*(X-2*Math.atan(Math.exp(-n[t+1]/Y))),e[r+2]=n[t+2]??0}function y(n,t,e,o){!function(n,t,e,o,i){const l=.4999999*Math.PI,a=(0,r.qE)(T*n[t+1],-l,l),s=Math.sin(a);e[o++]=T*n[t]*i.radius,e[o++]=i.halfSemiMajorAxis*Math.log((1+s)/(1-s)),e[o]=n[t+2]??0}(n,t,e,o,l.$O)}function M(n,t,e,r){e[r]=n[t]*q,e[r+1]=n[t+1]*q,e[r+2]=n[t+2]??0}function x(n,t,e,r){e[r]=n[t]*P,e[r+1]=n[t+1]*P,e[r+2]=n[t+2]??0}function w(n,t,e,r,o){const i=o+(n[t+2]??0),l=T*n[t],a=T*n[t+1],s=Math.cos(a)*i;e[r]=Math.cos(l)*s,e[r+1]=Math.sin(l)*s,e[r+2]=Math.sin(a)*i}function v(n,t,e,r){w(n,t,e,r,l.Sw.radius)}function b(n,t,e,r){w(n,t,e,r,l.sH.radius)}function _(n,t,e,r){w(n,t,e,r,l.$O.radius)}function A(n,t,e,o,i){const l=n[t],a=n[t+1],s=n[t+2]??0,u=Math.sqrt(l*l+a*a+s*s),c=(0,r.YN)(s/(0===u?1:u)),f=Math.atan2(a,l);e[o++]=O*f,e[o++]=O*c,e[o]=u-i}function R(n,t,e,r){A(n,t,e,r,l.Sw.radius)}function S(n,t,e,r){A(n,t,e,r,l.sH.radius)}function k(n,t,e,r){A(n,t,e,r,l.$O.radius)}function B(n,t,e,r){!function(n,t,e,r,o){const i=T*n[t],l=T*n[t+1],a=n[t+2]??0,s=Math.sin(l),u=Math.cos(l),c=o.radius/Math.sqrt(1-o.eccentricitySquared*s*s);e[r++]=(c+a)*u*Math.cos(i),e[r++]=(c+a)*u*Math.sin(i),e[r++]=(c*(1-o.eccentricitySquared)+a)*s}(n,t,e,r,l.$O)}function j(n,t,e,r){const o=u,i=n[t],a=n[t+1],s=n[t+2]??0;let c,f,h,p,d,m,g,y,M,x,w,v,b,_,A,R,S,k,B,j,I;c=Math.abs(s),f=i*i+a*a,h=Math.sqrt(f),p=f+s*s,d=Math.sqrt(p),j=Math.atan2(a,i),m=s*s/p,g=f/p,_=o.a2/d,A=o.a3-o.a4/d,g>.3?(y=c/d*(1+g*(o.a1+_+m*A)/d),B=Math.asin(y),x=y*y,M=Math.sqrt(1-x)):(M=h/d*(1-m*(o.a5-_-g*A)/d),B=Math.acos(M),x=1-M*M,y=Math.sqrt(x)),w=1-l.$O.eccentricitySquared*x,v=l.$O.radius/Math.sqrt(w),b=o.a6*v,_=h-v*M,A=c-b*y,S=M*_+y*A,R=M*A-y*_,k=R/(b/w+S),B+=k,I=S+R*k/2,s<0&&(B=-B),e[r++]=O*j,e[r++]=O*B,e[r]=I}const I={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:m},T=(0,r.kU)(1),O=(0,r.KJ)(1),X=.5*Math.PI,Y=l.$O.radius,q=Y*Math.PI/180,P=180/(Y*Math.PI)},38419:(n,t,e)=>{e.r(t),e.d(t,{default:()=>a});var r=e(44208),o=e(75503),i=e(95696),l=e(72258);class a{async createIndex(n,t){const e=new Array;if(!n.vertexAttributes?.position)return new o.wq;const r=function(n){const{vertexAttributes:{position:t},vertexSpace:e,spatialReference:r,transform:o}=n,a=(0,l.UR)({vertexAttributes:{position:t},vertexSpace:e,spatialReference:r,transform:o},i.A.absolute,{allowBufferReuse:!0})?.position;return a?!n.components||n.components.some(n=>!n.faces)?{position:a.buffer}:{position:a.buffer,components:n.components.map(n=>n.faces)}:null}(n),a=null!=t?await t.invoke("createIndexThread",r,{transferList:e}):this.createIndexThread(r).result;return s().fromJSON(a)}createIndexThread(n){const t=s();if(!n)return{result:t.toJSON()};const e=new Float64Array(n.position);return n.components?function(n,t,e){let r=0;for(const n of e)r+=n.length/3;const o=new Array(r);let i=0;for(const n of e)for(let e=0;e<n.length;e+=3)o[i++]=u(t,3*n[e],3*n[e+1],3*n[e+2]);return n.load(o),{result:n.toJSON()}}(t,e,n.components.map(n=>new Uint32Array(n))):function(n,t){const e=new Array(t.length/9);let r=0;for(let n=0;n<t.length;n+=9)e[r++]=u(t,n,n+3,n+6);return n.load(e),{result:n.toJSON()}}(t,e)}}function s(){return new o.wq(9,(0,r.A)("esri-csp-restrictions")?n=>n:[".minX",".minY",".maxX",".maxY"])}function u(n,t,e,r){return{minX:Math.min(n[t],n[e],n[r]),maxX:Math.max(n[t],n[e],n[r]),minY:Math.min(n[t+1],n[e+1],n[r+1]),maxY:Math.max(n[t+1],n[e+1],n[r+1]),p0:[n[t],n[t+1],n[t+2]],p1:[n[e],n[e+1],n[e+2]],p2:[n[r],n[r+1],n[r+2]]}}},38954:(n,t,e)=>{e.d(t,{A:()=>c,B:()=>f,C:()=>M,D:()=>Y,E:()=>w,F:()=>X,G:()=>E,H:()=>z,a:()=>q,b:()=>i,c:()=>y,d:()=>l,e:()=>u,f:()=>R,g:()=>A,h:()=>a,i:()=>s,j:()=>g,l:()=>S,m:()=>O,n:()=>_,o:()=>b,p:()=>k,q:()=>v,r:()=>j,s:()=>x,t:()=>B,u:()=>h,v:()=>N,w:()=>F,x:()=>m,y:()=>d,z:()=>p});var r=e(51850),o=e(34304);function i(n){const t=n[0],e=n[1],r=n[2];return Math.sqrt(t*t+e*e+r*r)}function l(n,t){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n}function a(n,t,e,r){return n[0]=t,n[1]=e,n[2]=r,n}function s(n,t,e){return n[0]=t[0]+e[0],n[1]=t[1]+e[1],n[2]=t[2]+e[2],n}function u(n,t,e){return n[0]=t[0]-e[0],n[1]=t[1]-e[1],n[2]=t[2]-e[2],n}function c(n,t,e){return n[0]=t[0]*e[0],n[1]=t[1]*e[1],n[2]=t[2]*e[2],n}function f(n,t,e){return n[0]=t[0]/e[0],n[1]=t[1]/e[1],n[2]=t[2]/e[2],n}function h(n,t){return n[0]=Math.abs(t[0]),n[1]=Math.abs(t[1]),n[2]=Math.abs(t[2]),n}function p(n,t){return n[0]=Math.sign(t[0]),n[1]=Math.sign(t[1]),n[2]=Math.sign(t[2]),n}function d(n,t,e){return n[0]=Math.min(t[0],e[0]),n[1]=Math.min(t[1],e[1]),n[2]=Math.min(t[2],e[2]),n}function m(n,t,e){return n[0]=Math.max(t[0],e[0]),n[1]=Math.max(t[1],e[1]),n[2]=Math.max(t[2],e[2]),n}function g(n,t,e){return n[0]=t[0]*e,n[1]=t[1]*e,n[2]=t[2]*e,n}function y(n,t,e,r){return n[0]=t[0]+e[0]*r,n[1]=t[1]+e[1]*r,n[2]=t[2]+e[2]*r,n}function M(n,t){const e=t[0]-n[0],r=t[1]-n[1],o=t[2]-n[2];return Math.sqrt(e*e+r*r+o*o)}function x(n,t){const e=t[0]-n[0],r=t[1]-n[1],o=t[2]-n[2];return e*e+r*r+o*o}function w(n){const t=n[0],e=n[1],r=n[2];return t*t+e*e+r*r}function v(n,t){return n[0]=-t[0],n[1]=-t[1],n[2]=-t[2],n}function b(n,t){return n[0]=1/t[0],n[1]=1/t[1],n[2]=1/t[2],n}function _(n,t){const e=t[0],r=t[1],o=t[2];let i=e*e+r*r+o*o;return i>0&&(i=1/Math.sqrt(i),n[0]=t[0]*i,n[1]=t[1]*i,n[2]=t[2]*i),n}function A(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function R(n,t,e){const r=t[0],o=t[1],i=t[2],l=e[0],a=e[1],s=e[2];return n[0]=o*s-i*a,n[1]=i*l-r*s,n[2]=r*a-o*l,n}function S(n,t,e,r){const o=t[0],i=t[1],l=t[2];return n[0]=o+r*(e[0]-o),n[1]=i+r*(e[1]-i),n[2]=l+r*(e[2]-l),n}function k(n,t,e){const r=t[0],o=t[1],i=t[2];return n[0]=e[0]*r+e[4]*o+e[8]*i+e[12],n[1]=e[1]*r+e[5]*o+e[9]*i+e[13],n[2]=e[2]*r+e[6]*o+e[10]*i+e[14],n}function B(n,t,e){const r=t[0],o=t[1],i=t[2];return n[0]=r*e[0]+o*e[3]+i*e[6],n[1]=r*e[1]+o*e[4]+i*e[7],n[2]=r*e[2]+o*e[5]+i*e[8],n}function j(n,t,e){const r=e[0],o=e[1],i=e[2],l=e[3],a=t[0],s=t[1],u=t[2],c=o*u-i*s,f=i*a-r*u,h=r*s-o*a,p=o*h-i*f,d=i*c-r*h,m=r*f-o*c,g=2*l;return n[0]=a+c*g+2*p,n[1]=s+f*g+2*d,n[2]=u+h*g+2*m,n}const I=(0,r.vt)(),T=(0,r.vt)();function O(n,t){return n[0]===t[0]&&n[1]===t[1]&&n[2]===t[2]}function X(n,t){if(n===t)return!0;const e=n[0],r=n[1],i=n[2],l=t[0],a=t[1],s=t[2],u=(0,o.FD)();return Math.abs(e-l)<=u*Math.max(1,Math.abs(e),Math.abs(l))&&Math.abs(r-a)<=u*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-s)<=u*Math.max(1,Math.abs(i),Math.abs(s))}function Y(n,t,e){const r=e[0]-t[0],o=e[1]-t[1],i=e[2]-t[2];let l=r*r+o*o+i*i;return l>0?(l=1/Math.sqrt(l),n[0]=r*l,n[1]=o*l,n[2]=i*l,n):(n[0]=0,n[1]=0,n[2]=0,n)}const q=u,P=c,C=f,E=M,N=x,z=i,F=w;Object.freeze(Object.defineProperty({__proto__:null,abs:h,add:s,angle:function(n,t){_(I,n),_(T,t);const e=A(I,T);return e>1?0:e<-1?Math.PI:Math.acos(e)},bezier:function(n,t,e,r,o,i){const l=1-i,a=l*l,s=i*i,u=a*l,c=3*i*a,f=3*s*l,h=s*i;return n[0]=t[0]*u+e[0]*c+r[0]*f+o[0]*h,n[1]=t[1]*u+e[1]*c+r[1]*f+o[1]*h,n[2]=t[2]*u+e[2]*c+r[2]*f+o[2]*h,n},ceil:function(n,t){return n[0]=Math.ceil(t[0]),n[1]=Math.ceil(t[1]),n[2]=Math.ceil(t[2]),n},clamp:function(n,t=0,e=1){return n[0]=Math.min(Math.max(n[0],t),e),n[1]=Math.min(Math.max(n[1],t),e),n[2]=Math.min(Math.max(n[2],t),e),n},copy:l,cross:R,crossAndNormalize:function(n,t,e){const r=t[0],o=t[1],i=t[2],l=e[0],a=e[1],s=e[2],u=o*s-i*a,c=i*l-r*s,f=r*a-o*l,h=Math.sqrt(u*u+c*c+f*f);return n[0]=u/h,n[1]=c/h,n[2]=f/h,n},direction:Y,dist:E,distance:M,div:C,divide:f,dot:A,equals:X,exactEquals:O,floor:function(n,t){return n[0]=Math.floor(t[0]),n[1]=Math.floor(t[1]),n[2]=Math.floor(t[2]),n},hermite:function(n,t,e,r,o,i){const l=i*i,a=l*(2*i-3)+1,s=l*(i-2)+i,u=l*(i-1),c=l*(3-2*i);return n[0]=t[0]*a+e[0]*s+r[0]*u+o[0]*c,n[1]=t[1]*a+e[1]*s+r[1]*u+o[1]*c,n[2]=t[2]*a+e[2]*s+r[2]*u+o[2]*c,n},inverse:b,len:z,length:i,lerp:S,max:m,min:d,mul:P,multiply:c,negate:v,normalize:_,random:function(n,t=1){const e=o.Ov,r=2*e()*Math.PI,i=2*e()-1,l=Math.sqrt(1-i*i)*t;return n[0]=Math.cos(r)*l,n[1]=Math.sin(r)*l,n[2]=i*t,n},rotateX:function(n,t,e,r){const o=[],i=[];return o[0]=t[0]-e[0],o[1]=t[1]-e[1],o[2]=t[2]-e[2],i[0]=o[0],i[1]=o[1]*Math.cos(r)-o[2]*Math.sin(r),i[2]=o[1]*Math.sin(r)+o[2]*Math.cos(r),n[0]=i[0]+e[0],n[1]=i[1]+e[1],n[2]=i[2]+e[2],n},rotateY:function(n,t,e,r){const o=[],i=[];return o[0]=t[0]-e[0],o[1]=t[1]-e[1],o[2]=t[2]-e[2],i[0]=o[2]*Math.sin(r)+o[0]*Math.cos(r),i[1]=o[1],i[2]=o[2]*Math.cos(r)-o[0]*Math.sin(r),n[0]=i[0]+e[0],n[1]=i[1]+e[1],n[2]=i[2]+e[2],n},rotateZ:function(n,t,e,r){const o=[],i=[];return o[0]=t[0]-e[0],o[1]=t[1]-e[1],o[2]=t[2]-e[2],i[0]=o[0]*Math.cos(r)-o[1]*Math.sin(r),i[1]=o[0]*Math.sin(r)+o[1]*Math.cos(r),i[2]=o[2],n[0]=i[0]+e[0],n[1]=i[1]+e[1],n[2]=i[2]+e[2],n},round:function(n,t){return n[0]=Math.round(t[0]),n[1]=Math.round(t[1]),n[2]=Math.round(t[2]),n},scale:g,scaleAndAdd:y,set:a,sign:p,sqrDist:N,sqrLen:F,squaredDistance:x,squaredLength:w,str:function(n){return"vec3("+n[0]+", "+n[1]+", "+n[2]+")"},sub:q,subtract:u,transformMat3:B,transformMat4:k,transformQuat:j},Symbol.toStringTag,{value:"Module"}))},40876:(n,t,e)=>{e.d(t,{Eq:()=>p,G1:()=>m,TS:()=>i,Tf:()=>M,V6:()=>o,Vm:()=>d,ay:()=>s,c1:()=>g,c4:()=>l,j5:()=>u,lT:()=>f,oW:()=>c,xV:()=>w});const r={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function o(n){return!!r[n]||!!r[n.toLowerCase()]}function i(n){return r[n]??r[n.toLowerCase()]}function l(n){return[...i(n)]}function a(n,t,e){e<0&&++e,e>1&&--e;const r=6*e;return r<1?n+(t-n)*r:2*e<1?t:3*e<2?n+(t-n)*(2/3-e)*6:n}function s(n,t,e,r=1){const o=(n%360+360)%360/360,i=e<=.5?e*(t+1):e+t-e*t,l=2*e-i;return[Math.round(255*a(l,i,o+1/3)),Math.round(255*a(l,i,o)),Math.round(255*a(l,i,o-1/3)),r]}function u(n){const t=n.length>5,e=t?8:4,r=(1<<e)-1,o=t?1:17,i=t?9===n.length:5===n.length;let l=Number("0x"+n.slice(1));if(isNaN(l))return null;const a=[0,0,0,1];let s;return i&&(s=l&r,l>>=e,a[3]=o*s/255),s=l&r,l>>=e,a[2]=o*s,s=l&r,l>>=e,a[1]=o*s,s=l&r,l>>=e,a[0]=o*s,a}function c(n){if(!n.startsWith("#")||isNaN(Number(`0x${n.slice(1)}`)))return null;switch(n.length){case 4:case 5:{const t=parseInt(n.slice(1,2),16),e=parseInt(n.slice(2,3),16),r=parseInt(n.slice(3,4),16),o=4===n.length?15:parseInt(n.slice(4),16);return[t+16*t,e+16*e,r+16*r,(o+16*o)/255]}case 7:case 9:return[parseInt(n.slice(1,3),16),parseInt(n.slice(3,5),16),parseInt(n.slice(5,7),16),(7===n.length?255:parseInt(n.slice(7),16))/255];default:return null}}function f(n){const t=n.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(t){const n=t[2].split(/\s*,\s*/),e=t[1];if("rgb"===e&&3===n.length||"rgba"===e&&4===n.length){if(n[0].endsWith("%")){const t=n.map(n=>2.56*parseFloat(n));return 4===n.length&&(t[3]=parseFloat(n[3])),h(t)}return h(n.map(n=>parseFloat(n)))}if("hsl"===e&&3===n.length||"hsla"===e&&4===n.length)return s(parseFloat(n[0]),parseFloat(n[1])/100,parseFloat(n[2])/100,parseFloat(n[3]??"1"))}return null}function h(n){return n[0]=g(n[0]),n[1]=g(n[1]),n[2]=g(n[2]),n[3]=4===n.length?m(n[3]):1,n}function p(n){let t=o(n)?i(n):null;return t??=f(n),t??=c(n),t}function d(n){const t=p(n);return null!=t?[t[0]/255,t[1]/255,t[2]/255,t[3]]:null}function m(n){return y(n,0,1)}function g(n){return Math.round(y(n,0,255))}function y(n,t,e){return n=Number(n),isNaN(n)?e:n<t?t:n>e?e:n}const M=2.2,x=1/M;function w(n){return n**x}},48163:(n,t,e)=>{function r(){return[0,0]}function o(n){return[n[0],n[1]]}function i(n,t){return[n,t]}function l(){return i(1,1)}function a(){return i(1,0)}function s(){return i(0,1)}e.d(t,{Un:()=>u,fA:()=>i,o8:()=>o,vt:()=>r});const u=l(),c=a(),f=s();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:c,UNIT_Y:f,ZEROS:[0,0],clone:o,create:r,freeze:function(n,t){return[n,t]},fromArray:function(n,t=[0,0]){const e=Math.min(2,n.length);for(let r=0;r<e;++r)t[r]=n[r];return t},fromValues:i,ones:l,unitX:a,unitY:s,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},48353:(n,t,e)=>{e.d(t,{l:()=>u});var r=e(34727),o=e(58083),i=e(51850);function l(n,t,e){const r=Math.sin(n),o=Math.cos(n),i=Math.sin(t),l=Math.cos(t),a=e;return a[0]=-r,a[4]=-i*o,a[8]=l*o,a[12]=0,a[1]=o,a[5]=-i*r,a[9]=l*r,a[13]=0,a[2]=0,a[6]=l,a[10]=i,a[14]=0,a[3]=0,a[7]=0,a[11]=0,a[15]=1,a}var a=e(37539),s=e(21325);function u(n,t,e,r){const i=(0,a.Tp)(n,r);if(null==i)return!1;const u=i.source.spatialReferenceId,d=i.dest.spatialReferenceId;if(u===d&&!c(d)&&(0!==u||(0,s.aI)(n,r)))return(0,o.kN)(e,t),!0;if(c(d)){const n=a.w5[u][10],r=a.w5[10][d];return null!=n&&null!=r&&(n(t,0,h,0),r(h,0,p,0),l(f*h[0],f*h[1],e),e[12]=p[0],e[13]=p[1],e[14]=p[2],!0)}const m=c(u);if((3===d||11===d||2===d||5===d)&&(2===u||m||3===u||5===u)){const n=a.w5[u][10],r=a.w5[10][d];return null!=n&&null!=r&&(n(t,0,h,0),r(h,0,p,0),m?function(n,t,e){l(n,t,e),(0,o.mg)(e,e)}(f*h[0],f*h[1],e):(0,o.D_)(e),e[12]=p[0],e[13]=p[1],e[14]=p[2],!0)}return!1}function c(n){return 1===n||6===n||8===n||4===n}const f=(0,r.kU)(1),h=(0,i.vt)(),p=(0,i.vt)()},51850:(n,t,e)=>{function r(){return[0,0,0]}function o(n){return[n[0],n[1],n[2]]}function i(n,t,e){return[n,t,e]}function l(n,t,e){return[n,t,e]}function a(n,t=[0,0,0]){const e=Math.min(3,n.length);for(let r=0;r<e;++r)t[r]=n[r];return t}function s(){return i(1,1,1)}function u(){return i(1,0,0)}function c(){return i(0,1,0)}function f(){return i(0,0,1)}e.d(t,{CN:()=>l,Cb:()=>g,Cw:()=>d,JP:()=>m,Un:()=>p,ci:()=>a,fA:()=>i,o8:()=>o,uY:()=>h,vt:()=>r});const h=[0,0,0],p=s(),d=u(),m=c(),g=f();Object.freeze(Object.defineProperty({__proto__:null,ONES:p,UNIT_X:d,UNIT_Y:m,UNIT_Z:g,ZEROS:h,clone:o,create:r,freeze:l,fromArray:a,fromValues:i,ones:s,unitX:u,unitY:c,unitZ:f,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"}))},62815:(n,t,e)=>{e.d(t,{N:()=>l});var r=e(86211),o=e(73941),i=e(21325);function l(n,t,e){if(null==t||null==e||e.vcsWkid||(0,i.aI)(t,e)||(0,o.xP)(t)||(0,o.xP)(e))return null;const l=(0,r.G9)(t)/(0,r.G9)(e);if(1===l)return null;switch(n){case"point":case"esriGeometryPoint":return n=>function(n,t){null!=n?.z&&(n.z*=t)}(n,l);case"polyline":case"esriGeometryPolyline":return n=>function(n,t){if(n)for(const e of n.paths)for(const n of e)n.length>2&&(n[2]*=t)}(n,l);case"polygon":case"esriGeometryPolygon":return n=>function(n,t){if(n)for(const e of n.rings)for(const n of e)n.length>2&&(n[2]*=t)}(n,l);case"multipoint":case"esriGeometryMultipoint":return n=>function(n,t){if(n)for(const e of n.points)e.length>2&&(e[2]*=t)}(n,l);case"extent":case"esriGeometryEnvelope":return n=>function(n,t){n&&null!=n.zmin&&null!=n.zmax&&(n.zmin*=t,n.zmax*=t)}(n,l);default:return null}}},65806:(n,t,e)=>{e.d(t,{g:()=>l});var r=e(51850),o=e(91218),i=e(9762);function l(n,t,e){if((0,o.canProjectWithoutEngine)(n.spatialReference,e))return a[0]=n.x,a[1]=n.y,a[2]=n.z??0,(0,i.projectBuffer)(a,n.spatialReference,0,t,e,0);const r=(0,o.tryProjectWithZConversion)(n,e);return!!r&&(t[0]=r.x,t[1]=r.y,t[2]=r.z??0,!0)}const a=(0,r.vt)()},69540:(n,t,e)=>{e.d(t,{OU:()=>c,Pw:()=>f});var r=e(31635),o=e(69622),i=(e(44208),e(4718)),l=(e(53966),e(97768)),a=e(88620),s=e(64108);const u=Symbol("ClonableMixin"),c=n=>{var t;const e=n;let o=class extends e{constructor(){super(...arguments),this[t]=!0}static{t=u}clone(n){const t=(0,a.oY)(this);(0,l.Lw)(t,"unable to clone instance of non-accessor class");const e=t.metadata,r=t.store,o={},s=new Map;for(const t in e){const l=e[t],a=r?.originOf(t),u=l.clonable;if(l.readOnly||!1===u||7!==a&&0!==a&&5!==a&&4!==a)continue;const c=this[t];let f=null;if("function"==typeof u)f=u(c,n);else if("reference"===u)f=c;else if(f=(0,i.TU)(c,n),null!=c&&null==f)continue;0===a?s.set(t,f):o[t]=f}const u=new(0,Object.getPrototypeOf(this).constructor)(o);if(s.size){const n=(0,a.oY)(u)?.store;if(n)for(const[t,e]of s)n.set(t,e,0)}return u}};return o=(0,r.Cg)([(0,s.$)("esri.core.Clonable")],o),o},f=c(o.A)},72258:(n,t,e)=>{e.d(t,{UR:()=>v,p5:()=>w,xK:()=>k});var r=e(53966),o=e(34727),i=e(86211),l=e(77690),a=e(29242),s=e(58083),u=e(9093),c=e(38954),f=e(51850),h=e(98764),p=e(48353),d=e(65806),m=e(27615),g=e(21325),y=e(73354),M=e(22141);const x=()=>r.A.getLogger("esri.geometry.support.meshUtils.vertexSpaceConversion");function w(n,t,{vertexSpace:e,spatialReference:r}){if("georeferenced"===e.type){const o=n;if(!(0,d.g)(t,o,r))return!1;const{origin:i}=e;return(0,c.e)(n,o,i),!0}const o=(0,h.lO)(r),i=n;if(!(0,d.g)(t,i,o))return!1;const{origin:l}=e,a=O;if(!(0,p.l)(r,l,a,o))return!1;const u=(0,s.B8)(O,a);return null!=u&&((0,c.p)(n,i,u),!0)}function v(n,t,e){const{vertexSpace:r,transform:o,vertexAttributes:i}=n,a=(0,m.Hq)(r)?o:null,f=R(n.spatialReference,e,3);if((0,m.yJ)(r,t)&&(!a||(0,s.t2)(a.localMatrix,u.zK))&&S(f)){const{position:n,normal:t,tangent:r}=i,o=e?.allowBufferReuse;return{position:o?n:n.slice(),normal:o?t:t?.slice(),tangent:o?r:r?.slice()}}switch(n.vertexSpace.type){case"local":return"local"===t.type?function({vertexAttributes:n,spatialReference:t,transform:e},{origin:r},o,i){const l=b(t,i);if(!(0,p.l)(t,r,B,l))return(0,M.CN)(x(),t,l),null;if(e&&(0,s.lw)(B,B,e.localMatrix),!(0,p.l)(t,o,j,l))return(0,M.CN)(x(),l,t),null;(0,s.B8)(j,j);const a=(0,s.lw)(B,j,B);return A(a,t,i,3),_(n,a)}(n,n.vertexSpace,t.origin,e):function({spatialReference:n,vertexAttributes:t,transform:e},{origin:r},o,i){const l=b(n,i);if(!(0,p.l)(n,r,B,l))return(0,M.CN)(x(),n,l),null;e&&(0,s.lw)(B,B,e.localMatrix),A(B,n,i,1);const a=new Float64Array(t.position.length),u=function(n,t,e,r,o){(0,y.t)(r,n,t);const i=new Float64Array(n.length);return(0,M.$5)(r,o,i,e)?i:((0,M.CN)(x(),o,e),null)}(t.position,B,n,a,l);if(!u)return null;const f=function(n,t,e,r,o,i){if(null==o)return null;const l=new Float32Array(o.length);return(0,M.qs)(o,l,i),(0,M.si)(l,n,t,e,r,l)?l:((0,M.CN)(x(),r,t),null)}(u,n,a,l,t.normal,B);if(t.normal&&!f)return null;const h=function(n,t,e,r,o,i){if(null==o)return null;const l=new Float32Array(o.length);return(0,M.KM)(o,l,i),(0,M.Mv)(l,n,t,e,r,l)?l:((0,M.CN)(x(),r,t),null)}(u,n,a,l,t.tangent,B);if(t.tangent&&!h)return null;if(o){const n=(0,c.q)(T,o);(0,y.a)(u,u,n)}return{position:u,normal:f,tangent:h}}(n,n.vertexSpace,t.origin,e);case"georeferenced":return"local"===t.type?function({vertexAttributes:n,spatialReference:t,transform:e},{origin:r},o,i){const a=b(t,i);if(!(0,p.l)(t,o,B,a))return(0,M.CN)(x(),t,a),null;const u=1/R(t,i,2);(0,s.hs)(B,B,[u,u,u]);const c=(0,s.B8)(j,B),{position:f,normal:h,tangent:d}=function(n,t,e){if(!t)return n;if(!e){const{position:e,normal:r,tangent:o}=n;return{position:(0,y.a)(new Float64Array(e.length),e,t),tangent:o,normal:r}}const r=_(n,e.localMatrix);return(0,y.a)(r.position,r.position,t),r}(n,r,e),m=new Float64Array(f.length),g=function(n,t,e,r,o){const i=(0,M.gr)(n,t,r,o);if(!i)return(0,M.CN)(x(),t,o),null;const l=new Float64Array(i.length);return(0,y.t)(l,i,e),l}(f,t,c,m,a);if(!g)return null;const w=(0,l.Ge)(I,c),v=function(n,t,e,r,o,i,l){if(null==n)return null;const a=l??new Float32Array(n.length);return(0,M.X4)(n,t,e,r,o,a)?((0,y.b)(a,a,i),a):((0,M.CN)(x(),e,o),null)}(h,f,t,m,a,w,h!==n.normal?h:void 0);if(!v&&h)return null;const A=function(n,t,e,r,o,i,l){if(null==n)return null;const a=l??new Float32Array(n.length);return(0,M.xA)(n,t,e,r,o,a)?((0,y.b)(a,a,i,4),a):((0,M.CN)(x(),e,o),null)}(d,f,t,m,a,w,d!==n.tangent?d:void 0);return!A&&d?null:{position:g,normal:v,tangent:A}}(n,n.vertexSpace,t.origin,e):function({vertexAttributes:n,transform:t,spatialReference:e},{origin:r},o,i){const l=R(e,i,3),a=r||!S(l)?(0,s.C)(B,t?.localMatrix??u.zK):null;a&&A(a,e,i,3);const{position:f,normal:h,tangent:p}=a?_(n,a):n,d=i?.allowBufferReuse,m=d?f:new Float64Array(f.length);let g=f;if(r&&(g=(0,y.a)(m,g,r)),o){const n=(0,c.q)(T,o);g=(0,y.a)(m,g,n)}return{position:g!==n.position||d?g:g.slice(),normal:h!==n.normal||d?h:h?.slice(),tangent:p!==n.tangent||d?p:p?.slice()}}(n,n.vertexSpace,t.origin,e)}}function b(n,t){return t?.useEllipsoid&&(0,g.B3)(n)?h.Y0:(0,h.lO)(n)}function _(n,t){const e=new Float64Array(n.position.length);(0,y.t)(e,n.position,t);const r=n.normal?new Float32Array(n.normal.length):null,o=n.tangent?new Float32Array(n.tangent.length):null;return r&&n.normal&&(0,M.qs)(n.normal,r,t),o&&n.tangent&&(0,M.KM)(n.tangent,o,t),{position:e,normal:r,tangent:o}}function A(n,t,e,r){const o=R(t,e,r);S(o)||(0,s.hs)(n,n,[o,o,o])}function R(n,t,e){const r=!!(1&e),o=!!(2&e),i=t?.sourceUnit,l=t?.targetUnit;if(!i&&!l)return 1;let a=k(i,n);r||!i||S(a)||(x().warn("source unit conversion not supported"),a=1);let s=1/k(l,n);return o||!l||S(s)||(x().warn("target unit conversion not supported"),s=1),a*s}function S(n){return(0,o.Io)(n,1)}function k(n,t){if(null==n)return 1;const e=(0,i.KX)(t);return 1/(0,i.oU)(e,"meters",n)}const B=(0,u.vt)(),j=(0,u.vt)(),I=(0,a.vt)(),T=(0,f.vt)(),O=(0,u.vt)()},73354:(n,t,e)=>{e.d(t,{a:()=>f,b:()=>a,c:()=>l,d:()=>o,e:()=>h,f:()=>c,l:()=>u,n:()=>p,t:()=>i});var r=e(40876);function o(n,t,e){i(n.typedBuffer,t.typedBuffer,e,n.typedBufferStride,t.typedBufferStride)}function i(n,t,e,r=3,o=r){if(n.length/r!==Math.ceil(t.length/o))return n;const i=n.length/r,l=e[0],a=e[1],s=e[2],u=e[4],c=e[5],f=e[6],h=e[8],p=e[9],d=e[10],m=e[12],g=e[13],y=e[14];let M=0,x=0;for(let e=0;e<i;e++){const e=t[M],i=t[M+1],w=t[M+2];n[x]=l*e+u*i+h*w+m,n[x+1]=a*e+c*i+p*w+g,n[x+2]=s*e+f*i+d*w+y,M+=o,x+=r}return n}function l(n,t,e){a(n.typedBuffer,t.typedBuffer,e,n.typedBufferStride,t.typedBufferStride)}function a(n,t,e,r=3,o=r){if(n.length/r!==Math.ceil(t.length/o))return;const i=n.length/r,l=e[0],a=e[1],s=e[2],u=e[3],c=e[4],f=e[5],h=e[6],p=e[7],d=e[8];let m=0,g=0;for(let e=0;e<i;e++){const e=t[m],i=t[m+1],y=t[m+2];n[g]=l*e+u*i+h*y,n[g+1]=a*e+c*i+p*y,n[g+2]=s*e+f*i+d*y,m+=o,g+=r}}function s(n,t,e,r=3,o=r){const i=Math.min(n.length/r,t.length/o);let l=0,a=0;for(let s=0;s<i;s++)n[a]=e*t[l],n[a+1]=e*t[l+1],n[a+2]=e*t[l+2],l+=o,a+=r;return n}function u(n,t,e,r){c(n.typedBuffer,t.typedBuffer,e,r,n.typedBufferStride,t.typedBufferStride)}function c(n,t,e,o,i=3,l=i){const a=Math.min(n.length/i,t.length/l);let s=0,u=0;const c=1/r.Tf;for(let r=0;r<a;r++)n[u]=o*(e*t[s])**c,n[u+1]=o*(e*t[s+1])**c,n[u+2]=o*(e*t[s+2])**c,s+=l,u+=i}function f(n,t,e,r=3,o=r){const i=n.length/r;if(i!==Math.ceil(t.length/o))return n;let l=0,a=0;for(let s=0;s<i;s++)n[a]=t[l]+e[0],n[a+1]=t[l+1]+e[1],n[a+2]=t[l+2]+e[2],l+=o,a+=r;return n}function h(n,t){p(n.typedBuffer,t.typedBuffer,n.typedBufferStride,t.typedBufferStride)}function p(n,t,e=3,r=e){const o=Math.min(n.length/e,t.length/r);let i=0,l=0;for(let a=0;a<o;a++){const o=t[i],a=t[i+1],s=t[i+2],u=o*o+a*a+s*s;if(u>0){const t=1/Math.sqrt(u);n[l]=t*o,n[l+1]=t*a,n[l+2]=t*s}i+=r,l+=e}}e(44208),e(53966),Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:c,linearToSRGBView:u,normalize:p,normalizeView:h,scale:s,scaleView:function(n,t,e){s(n.typedBuffer,t.typedBuffer,e,n.typedBufferStride,t.typedBufferStride)},shiftRight:function(n,t,e){const r=Math.min(n.count,t.count),o=n.typedBuffer,i=n.typedBufferStride,l=t.typedBuffer,a=t.typedBufferStride;let s=0,u=0;for(let n=0;n<r;n++)o[u]=l[s]>>e,o[u+1]=l[s+1]>>e,o[u+2]=l[s+2]>>e,s+=a,u+=i},transformMat3:a,transformMat3View:l,transformMat4:i,transformMat4View:o,translate:f},Symbol.toStringTag,{value:"Module"}))},75503:(n,t,e)=>{e.d(t,{EC:()=>R,wq:()=>a});var r=e(4576),o=e(21818),i=(e(44208),e(15142)),l=e(11006);class a{constructor(n=9,t){this._compareMinX=h,this._compareMinY=p,this._toBBox=n=>n,this._maxEntries=Math.max(4,n||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(),v.prune(),b.prune(),_.prune(),A.prune()}all(n){s(this._data,n)}search(n,t){let e=this._data;const r=this._toBBox;if(x(n,e))for(v.clear();e;){for(let o=0,i=e.children.length;o<i;o++){const i=e.children[o],l=e.leaf?r(i):i;x(n,l)&&(e.leaf?t(i):M(n,l)?s(i,t):v.push(i))}e=v.pop()}}collides(n){let t=this._data;const e=this._toBBox;if(!x(n,t))return!1;for(v.clear();t;){for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],i=t.leaf?e(o):o;if(x(n,i)){if(t.leaf||M(n,i))return!0;v.push(o)}}t=v.pop()}return!1}load(n){if(!n.length)return this;if(n.length<this._minEntries){for(let t=0,e=n.length;t<e;t++)this.insert(n[t]);return this}let t=this._build(n.slice(),0,n.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 n=this._data;this._data=t,t=n}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(n){return n&&this._insert(n,this._data.height-1),this}clear(){return this._data=new k([]),this}remove(n){if(!n)return this;let t,e=this._data,i=null,l=0,a=!1;const s=this._toBBox(n);for(_.clear(),A.clear();e||_.length>0;){if(e||(e=_.pop(),i=_.data[_.length-1],l=A.pop()??0,a=!0),e.leaf&&(t=(0,r.qh)(e.children,(0,o.zI)(n),e.children.length,e.indexHint),-1!==t))return e.children.splice(t,1),_.push(e),this._condense(_),this;a||e.leaf||!M(e,s)?i?(l++,e=i.children[l],a=!1):e=null:(_.push(e),A.push(l),l=0,i=e,e=e.children[0])}return this}toJSON(){return this._data}fromJSON(n){return this._data=n,this}_build(n,t,e,r){const o=e-t+1;let i=this._maxEntries;if(o<=i){const r=new k(n.slice(t,e+1));return u(r,this._toBBox),r}r||(r=Math.ceil(Math.log(o)/Math.log(i)),i=Math.ceil(o/i**(r-1)));const l=new B([]);l.height=r;const a=Math.ceil(o/i),s=a*Math.ceil(Math.sqrt(i));w(n,t,e,s,this._compareMinX);for(let o=t;o<=e;o+=s){const t=Math.min(o+s-1,e);w(n,o,t,a,this._compareMinY);for(let e=o;e<=t;e+=a){const o=Math.min(e+a-1,t);l.children.push(this._build(n,e,o,r-1))}}return u(l,this._toBBox),l}_insert(n,t,e){const r=this._toBBox,o=e?n:r(n);_.clear();const i=function(n,t,e,r){for(;r.push(t),!0!==t.leaf&&r.length-1!==e;){let e,r=1/0,o=1/0;for(let i=0,l=t.children.length;i<l;i++){const l=t.children[i],a=d(l),s=g(n,l)-a;s<o?(o=s,r=a<r?a:r,e=l):s===o&&a<r&&(r=a,e=l)}t=e||t.children[0]}return t}(o,this._data,t,_);for(i.children.push(n),f(i,o);t>=0&&_.data[t].children.length>this._maxEntries;)this._split(_,t),t--;!function(n,t,e){for(let r=e;r>=0;r--)f(t.data[r],n)}(o,_,t)}_split(n,t){const e=n.data[t],r=e.children.length,o=this._minEntries;this._chooseSplitAxis(e,o,r);const i=this._chooseSplitIndex(e,o,r);if(!i)return;const l=e.children.splice(i,e.children.length-i),a=e.leaf?new k(l):new B(l);a.height=e.height,u(e,this._toBBox),u(a,this._toBBox),t?n.data[t-1].children.push(a):this._splitRoot(e,a)}_splitRoot(n,t){this._data=new B([n,t]),this._data.height=n.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(n,t,e){let r,o,i;r=o=1/0;for(let l=t;l<=e-t;l++){const t=c(n,0,l,this._toBBox),a=c(n,l,e,this._toBBox),s=y(t,a),u=d(t)+d(a);s<r?(r=s,i=l,o=u<o?u:o):s===r&&u<o&&(o=u,i=l)}return i}_chooseSplitAxis(n,t,e){const r=n.leaf?this._compareMinX:h,o=n.leaf?this._compareMinY:p;this._allDistMargin(n,t,e,r)<this._allDistMargin(n,t,e,o)&&n.children.sort(r)}_allDistMargin(n,t,e,r){n.children.sort(r);const o=this._toBBox,i=c(n,0,t,o),l=c(n,e-t,e,o);let a=m(i)+m(l);for(let r=t;r<e-t;r++){const t=n.children[r];f(i,n.leaf?o(t):t),a+=m(i)}for(let r=e-t-1;r>=t;r--){const t=n.children[r];f(l,n.leaf?o(t):t),a+=m(l)}return a}_condense(n){for(let t=n.length-1;t>=0;t--){const e=n.data[t];if(0===e.children.length)if(t>0){const o=n.data[t-1],i=o.children;i.splice((0,r.qh)(i,e,i.length,o.indexHint),1)}else this.clear();else u(e,this._toBBox)}}_initFormat(n){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(n[0])),this._compareMinY=new Function("a","b",t.join(n[1])),this._toBBox=new Function("a","return {minX: a"+n[0]+", minY: a"+n[1]+", maxX: a"+n[2]+", maxY: a"+n[3]+"};")}}function s(n,t){let e=n;for(b.clear();e;){if(!0===e.leaf)for(const n of e.children)t((0,o.zI)(n));else b.pushArray(e.children);e=b.pop()??null}}function u(n,t){c(n,0,n.children.length,t,n)}function c(n,t,e,r,o){o||(o=new k([])),o.minX=1/0,o.minY=1/0,o.maxX=-1/0,o.maxY=-1/0;for(let i,l=t;l<e;l++)i=n.children[l],f(o,n.leaf?r(i):i);return o}function f(n,t){n.minX=Math.min(n.minX,t.minX),n.minY=Math.min(n.minY,t.minY),n.maxX=Math.max(n.maxX,t.maxX),n.maxY=Math.max(n.maxY,t.maxY)}function h(n,t){return n.minX-t.minX}function p(n,t){return n.minY-t.minY}function d(n){return(n.maxX-n.minX)*(n.maxY-n.minY)}function m(n){return n.maxX-n.minX+(n.maxY-n.minY)}function g(n,t){return(Math.max(t.maxX,n.maxX)-Math.min(t.minX,n.minX))*(Math.max(t.maxY,n.maxY)-Math.min(t.minY,n.minY))}function y(n,t){const e=Math.max(n.minX,t.minX),r=Math.max(n.minY,t.minY),o=Math.min(n.maxX,t.maxX),i=Math.min(n.maxY,t.maxY);return Math.max(0,o-e)*Math.max(0,i-r)}function M(n,t){return n.minX<=t.minX&&n.minY<=t.minY&&t.maxX<=n.maxX&&t.maxY<=n.maxY}function x(n,t){return t.minX<=n.maxX&&t.minY<=n.maxY&&t.maxX>=n.minX&&t.maxY>=n.minY}function w(n,t,e,r,o){const i=[t,e];for(;i.length;){const t=i.pop(),e=i.pop();if(t-e<=r)continue;const a=e+Math.ceil((t-e)/r/2)*r;(0,l.q)(n,a,e,t,o),i.push(e,a,a,t)}}const v=new i.A,b=new i.A,_=new i.A,A=new i.A({deallocator:void 0});class R{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class S extends R{constructor(){super(...arguments),this.height=1,this.indexHint=new r.vW}}class k extends S{constructor(n){super(),this.children=n,this.leaf=!0}}class B extends S{constructor(n){super(),this.children=n,this.leaf=!1}}},91218:(n,t,e)=>{e.r(t),e.d(t,{canProjectWithoutEngine:()=>Z,initializeProjection:()=>$,isEqualBaseGCS:()=>G,isLoaded:()=>I,isLoadedOrLoad:()=>T,isLoadedOrLoadFor:()=>O,load:()=>Y,project:()=>q,projectExtent:()=>en,projectMany:()=>P,projectMultipoint:()=>D,projectOrLoad:()=>C,projectOrLoadMany:()=>E,projectPoint:()=>V,projectPolygon:()=>nn,projectPolyline:()=>H,projectWithZConversion:()=>L,projectWithoutEngine:()=>K,requiresLoad:()=>X,test:()=>F,tryProjectWithZConversion:()=>U,unload:()=>z});var r=e(49186),o=e(74887),i=e(62788),l=e(95488),a=e(51850),s=e(21276),u=e(73941),c=e(5443),f=e(91075),h=e(48526),p=e(86738),d=e(39829),m=e(82799),g=e(16930),y=e(159),M=e(9762),x=e(37539);function w(n,t,e,r,o,i){return v[0]=n,v[1]=t,v[2]=e,(0,M.projectBuffer)(v,r,0,o,i,0)}const v=(0,a.vt)();var b=e(21325),_=e(62815);let A=null,R=null,S=null,k=null,B={};const j=new l.I;function I(){return!!(R?.isLoaded()&&S?.isLoaded()&&k?.isLoaded())}function T(){return!!I()||((0,i.gc)(j),Y(),!1)}function O(n,t){return!n||!t||Z(n,t)||T()}function X(n,t){return!Z(n,t)&&!I()}async function Y(n){null==A&&(A=Promise.all([e.e(3276).then(e.bind(e,83276)).then(n=>(R=n,R.load())),e.e(8377).then(e.bind(e,8377)).then(n=>(S=n,S.load())),e.e(2158).then(e.bind(e,12158)).then(n=>(k=n,k.load()))])),await A,(0,o.Te)(n),j.notify()}function q(n,t,e){return Array.isArray(n)?0===n.length?[]:((0,s.H)(n),P(n,n[0].spatialReference,t,e)):((0,s.f)(n),P([n],n.spatialReference,t,e)[0])}function P(n,t,e,r){if(null==t||null==e)return n;if(Z(t,e,r))return n.map(n=>K(n,t,e));if(null==r?.geographicTransformation&&(0,u.jA)(t))return n.map(n=>K(n,t,g.A.WGS84)).map(n=>U(n,e));if(null==r?.geographicTransformation&&(0,u.jA)(e))return n.map(n=>U(n,g.A.WGS84)).map(n=>K(n,g.A.WGS84,e));if(!I())throw new N;if(!r?.geographicTransformation)if(r?.extendedParams)r={...r,geographicTransformation:k.getTransformation(t,e,r.areaOfInterestExtent)||new y.A};else if(!r?.areaOfInterestExtent){const n=function(n,t){return[n.wkid?.toString()??"-1",n.wkt?.toString()??"",n.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}(t,e);let o=B[n];o||(o=k.getTransformation(t,e)||new y.A,B[n]=o),r={geographicTransformation:o}}return n[0].spatialReference||(n[0].spatialReference=t),n[0]instanceof f.A?R.executeMany(n,e,r):S.executeMany(n,e,r)}function C(n,t){const e=E([n],t);return null!=e.pending?{pending:e.pending,geometry:null}:null!=e.geometries?{pending:null,geometry:e.geometries[0]}:{pending:null,geometry:null}}function E(n,t){if(!I())for(const e of n)if(null!=e&&!(0,b.aI)(e.spatialReference,t)&&(0,b.fn)(e.spatialReference)&&(0,b.fn)(t)&&!Z(e.spatialReference,t))return(0,i.gc)(j),{pending:Y(),geometries:null};return{pending:null,geometries:n.map(n=>null==n?null:(0,b.aI)(n.spatialReference,t)?n:(0,b.fn)(n.spatialReference)&&(0,b.fn)(t)?U(n,t):null)}}class N extends r.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function z(){A=null,R=null,S=null,k=null,B={}}const F={get loadPromise(){return A}};function U(n,t){try{const e=q(n,t);if(null==e)return null;"xmin"in n&&"xmin"in e&&(e.zmin=n.zmin,e.zmax=n.zmax);const r=(0,_.N)(e.type,n.spatialReference,t);return null!=r&&r(e),e}catch(n){if(!(n instanceof N))throw n;return null}}async function L(n,t,e){const r=n.spatialReference;return null!=r&&null!=t&&await $(r,t,null,e),U(n,t)}function Z(n,t,e){return!(e?.areaOfInterestExtent||e?.extendedParams||e?.geographicTransformation)&&(!!(0,b.aI)(n,t)||(0,b.fn)(n)&&(0,b.fn)(t)&&!!(0,x.jd)(n,t))}function G(n,t){if((0,b.aI)(n,t))return!0;if(!(0,b.fn)(n)||!(0,b.fn)(t))return!1;const e=(0,b.oT)(n)||(0,b.K8)(n)||(0,b.x1)(n),r=(0,b.oT)(t)||(0,b.K8)(t)||(0,b.x1)(t);return e&&r}async function $(n,t,e,r){if(I())return(0,o.NO)(r);if(Array.isArray(n)){for(const{source:t,dest:e,options:o}of n)if(t&&e&&!Z(t,e,o))return Y(r)}else if(n&&t&&!Z(n,t,e))return Y(r);return(0,o.NO)(r)}function K(n,t,e){return n?"x"in n?W(n,t,new p.A,e,0):"xmin"in n?rn(n,t,new c.A,e,0):"rings"in n?tn(n,t,new d.A,e,0):"paths"in n?Q(n,t,new m.A,e,0):"points"in n?J(n,t,new h.A,e,0):null:null}function V(n,t,e=t.spatialReference,r=0){return null!=e&&null!=n.spatialReference&&null!=W(n,n.spatialReference,t,e,r)}function W(n,t,e,r,o){ln[0]=n.x,ln[1]=n.y;const i=n.z;return ln[2]=void 0!==i?i:o,(0,M.projectBuffer)(ln,t,0,ln,r,0)?(e.x=ln[0],e.y=ln[1],e.spatialReference=r,void 0!==i||(0,u.xP)(r)?(e.z=ln[2],e.hasZ=!0):(e.z=void 0,e.hasZ=!1),void 0===n.m?(e.m=void 0,e.hasM=!1):(e.m=n.m,e.hasM=!0),e):null}function D(n,t,e=t.spatialReference,r=0){return null!=n.spatialReference&&null!=e&&null!=J(n,n.spatialReference,t,e,r)}function J(n,t,e,r,o){const{points:i,hasZ:l,hasM:a}=n,s=[],c=i.length,f=[];for(const n of i)f.push(n[0],n[1],l?n[2]:o);if(!(0,M.projectBuffer)(f,t,0,f,r,0,c))return null;const h=l||(0,u.xP)(r);for(let n=0;n<c;++n){const t=3*n,e=f[t],r=f[t+1];h&&a?s.push([e,r,f[t+2],i[n][3]]):h?s.push([e,r,f[t+2]]):a?s.push([e,r,i[n][2]]):s.push([e,r])}return e.points=s,e.spatialReference=r,e.hasZ=l,e.hasM=a,e}function H(n,t,e=t.spatialReference,r=0){return null!=n.spatialReference&&null!=e&&null!=Q(n,n.spatialReference,t,e,r)}function Q(n,t,e,r,o){const{paths:i,hasZ:l,hasM:a}=n,s=[];if(!on(i,l??!1,a??!1,t,s,r,o))return null;const c=l||(0,u.xP)(r);return e.paths=s,e.spatialReference=r,e.hasZ=c,e.hasM=a,e}function nn(n,t,e=t.spatialReference,r=0){return null!=n.spatialReference&&null!=e&&null!=tn(n,n.spatialReference,t,e,r)}function tn(n,t,e,r,o){const{rings:i,hasZ:l,hasM:a}=n,s=[];if(!on(i,l??!1,a??!1,t,s,r,o))return null;const c=l||(0,u.xP)(r);return e.rings=s,e.spatialReference=r,e.hasZ=c,e.hasM=a,e}function en(n,t,e=t.spatialReference,r=0){return null!=n.spatialReference&&null!=e&&null!=rn(n,n.spatialReference,t,e,r)}function rn(n,t,e,r,o){const{xmin:i,ymin:l,xmax:a,ymax:s,hasZ:c,hasM:f}=n;if(!w(i,l,c?n.zmin:o,t,ln,r))return null;const h=c||(0,u.xP)(r);return e.xmin=ln[0],e.ymin=ln[1],h&&(e.zmin=ln[2]),w(a,s,c?n.zmax:o,t,ln,r)?(e.xmax=ln[0],e.ymax=ln[1],h&&(e.zmax=ln[2]),f&&(e.mmin=n.mmin,e.mmax=n.mmax),e.spatialReference=r,e):null}function on(n,t,e,r,o,i,l=0){const a=new Array;for(const e of n)for(const n of e)a.push(n[0],n[1],t?n[2]:l);if(!(0,M.projectBuffer)(a,r,0,a,i,0))return!1;let s=0;o.length=0;const c=t||(0,u.xP)(i);for(const t of n){const n=new Array;for(const r of t)c&&e?n.push([a[s++],a[s++],a[s++],r[3]]):c?n.push([a[s++],a[s++],a[s++]]):e?(n.push([a[s++],a[s++],r[2]]),s++):(n.push([a[s++],a[s++]]),s++);o.push(n)}return!0}const ln=(0,a.vt)()},95488:(n,t,e)=>{e.d(t,{I:()=>o});var r=e(11406);class o extends r.T{notify(){const n=this._observers;if(n&&n.length>0){const t=n.slice();for(const n of t)n.onInvalidated(),n.onCommitted()}}}},95696:(n,t,e)=>{e.d(t,{A:()=>u});var r,o=e(31635),i=e(69540),l=e(25482),a=e(91429),s=e(93223);let u=class extends((0,i.OU)(l.o)){static{r=this}constructor(n){super(n),this.type="georeferenced",this.origin=null}static{this.absolute=new r}};(0,o.Cg)([(0,s.e)({georeferenced:"georeferenced"},{readOnly:!0})],u.prototype,"type",void 0),(0,o.Cg)([(0,a.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],u.prototype,"origin",void 0),u=r=(0,o.Cg)([(0,a.$K)("esri.geometry.support.MeshGeoreferencedVertexSpace")],u)},98764:(n,t,e)=>{e.d(t,{Y0:()=>u,lO:()=>c});var r=e(73941),o=e(16930),i=e(21325);const l=new o.A(r.fv),a=new o.A(r.FY),s=new o.A(r.LJ),u=new o.A(r.Ro);function c(n){const t=f.get(n);if(t)return t;let e=l;if(n)if(n===a)e=a;else if(n===s)e=s;else{const t=n.wkid,r=n.latestWkid;if(null!=t||null!=r)(0,i.tl)(t)||(0,i.tl)(r)?e=a:((0,i.ZL)(t)||(0,i.ZL)(r))&&(e=s);else{const t=n.wkt2??n.wkt;if(t){const n=t.toUpperCase();n===h?e=a:n===p&&(e=s)}}}return f.set(n,e),e}const f=new Map,h=a.wkt.toUpperCase(),p=s.wkt.toUpperCase()},99157:(n,t,e)=>{e.d(t,{A:()=>a});var r,o=e(31635),i=e(69622),l=e(91429);let a=r=class extends i.A{constructor(n){super(n),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new r({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,o.Cg)([(0,l.MZ)()],a.prototype,"isInverse",void 0),(0,o.Cg)([(0,l.MZ)()],a.prototype,"wkt",void 0),(0,o.Cg)([(0,l.MZ)()],a.prototype,"wkid",void 0),a=r=(0,o.Cg)([(0,l.$K)("esri.geometry.operators.support.GeographicTransformationStep")],a)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1279],{60999:(t,e,r)=>{r.d(e,{DZ:()=>y,Ke:()=>f,Tj:()=>c,UT:()=>S,aD:()=>_,jJ:()=>u});var n=r(31635),a=r(69622),i=r(97768),s=r(74887),l=r(10107),o=r(64108);function u(t,e,r){return(0,s.Lx)(t.map((t,n)=>e.apply(r,[t,n])))}async function c(t,e,r){return(await(0,s.Lx)(t.map((t,n)=>e.apply(r,[t,n])))).map(t=>t.value)}function h(t){return{ok:!0,value:t}}function p(t){return{ok:!1,error:t}}async function f(t){if(null==t)return{ok:!1,error:new Error("no promise provided")};try{return h(await t)}catch(t){return p(t)}}async function y(t){try{return h(await t)}catch(t){return(0,s.QP)(t),p(t)}}function S(t,e){return new d(t,e)}let d=class extends a.A{get value(){return null!=(t=this._result)&&!0===t.ok?t.value:null;var t}get error(){return null!=(t=this._result)&&!1===t.ok?t.error:null;var t}get finished(){return null!=this._result}constructor(t,e){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,i.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:r}=this._abortController;this.promise=t(r),this.promise.then(t=>{this._result=h(t),this._cleanup()},t=>{this._result=p(t),this._cleanup()}),this._abortHandle=(0,s.u7)(e,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,i.xt)(this._abortHandle),this._abortController=null}};(0,n.Cg)([(0,l.MZ)()],d.prototype,"value",null),(0,n.Cg)([(0,l.MZ)()],d.prototype,"error",null),(0,n.Cg)([(0,l.MZ)()],d.prototype,"finished",null),(0,n.Cg)([(0,l.MZ)()],d.prototype,"promise",void 0),(0,n.Cg)([(0,l.MZ)()],d.prototype,"_result",void 0),d=(0,n.Cg)([(0,o.$)("esri.core.asyncUtils.ReactiveTask")],d);class _{constructor(){this._sequence=Promise.resolve()}async acquire(){let t;this._sequence=new Promise(e=>{t=this._sequence.then(()=>e,()=>e)});const e=await t;return{[Symbol.dispose]:e}}async run(t){const e={stack:[],error:void 0,hasError:!1};try{return(0,n.mS)(e,await this.acquire(),!1),await t()}catch(t){e.error=t,e.hasError=!0}finally{(0,n.hk)(e)}}}},85978:(t,e,r)=>{r.d(e,{A:()=>s});var n=r(87449),a=r(11221),i=r(33325);class s extends a.t1{constructor(t){super(),this.declaredClass="esri.layers.featureset.sources.Empty",this._maxProcessing=1e3,this._parent=t.parentfeatureset,this._databaseType=0}async _queryAll(){return a.An.features}async query(t){return a.An}async queryStat(t){return await this._manualStat(t.stat,t.field,t.limit??i.gO,t.abortSignal)}async canQueryAggregate(t){return!1}async queryAggregate(t){throw new n.dr("NeverReach")}async queryAttachments(){return[]}}},87817:(t,e,r)=>{r.r(e),r.d(e,{registerFunctions:()=>d});var n=r(85935),a=r(78502),i=r(78878),s=r(48938),l=r(87449),o=r(11221),u=r(33325),c=r(71163),h=r(21818),p=r(90634);class f extends o.t1{constructor(t){super(),this.declaredClass="esri.arcade.featureset.actions.SpatialFilter",this._maxProcessing=40,this._parent=t.parentfeatureset,this._relation=t.relation,this._relationString=t.relationString??"",this._relationGeom=t.relationGeom}get _spatialFilter(){return{relation:"esriSpatialRelRelation"!==this._relation?this._relation:`esriSpatialRelRelation:${this._relationString}`,geometry:this._relationGeom}}async _queryAll(){return(await this.query({abortSignal:s._})).features}async query(t){await this._ensureLoaded();const e=await this._parent.query({...t,spatialFilter:this._spatialFilter});return(0,l.dZ)(t.abortSignal),{...e,spatialFilterApplied:null==t.spatialFilter,features:e.spatialFilterApplied?e.features:this._applySpatialFilter(e.features,t.abortSignal)}}async*_applySpatialFilter(t,e){for await(const r of t){(0,l.dZ)(e);const t=[];for(const e of r)await this._executeSpatialRelationTest(e)&&t.push(e);t.length>0&&(yield t)}}async queryStat(t){if(null!=t.spatialFilter)return{calculated:!1};const e=await this._parent.queryStat({...t,spatialFilter:this._spatialFilter});return e.calculated?e:null==t.where&&null==t.spatialFilter?this._manualStat(t.stat,t.field,t.limit??u.gO,t.abortSignal):{calculated:!1}}async canQueryAggregate(t){return null==t.spatialFilter&&this._parent.canQueryAggregate({...t,spatialFilter:this._spatialFilter})}async queryAggregate(t){if(null!=t.spatialFilter)throw new l.dr("NeverReach");return this._parent.queryAggregate({...t,spatialFilter:this._spatialFilter})}async _executeSpatialRelationTest(t){if(null==t.geometry)return!1;switch(this._relation){case"esriSpatialRelEnvelopeIntersects":{const e=(0,a.Yc)(this._relationGeom),r=(0,p.HA)(t.geometry);return null!=e&&null!=r&&(0,c.C)("intersects",[e.toJSON(),r])}case"esriSpatialRelIntersects":return(0,c.C)("intersects",[this._relationGeom.toJSON(),t.geometry]);case"esriSpatialRelContains":return(0,c.C)("contains",[this._relationGeom.toJSON(),t.geometry]);case"esriSpatialRelOverlaps":return(0,c.C)("overlaps",[this._relationGeom.toJSON(),t.geometry]);case"esriSpatialRelWithin":return(0,c.C)("within",[this._relationGeom.toJSON(),t.geometry]);case"esriSpatialRelTouches":return(0,c.C)("touches",[this._relationGeom.toJSON(),t.geometry]);case"esriSpatialRelCrosses":return(0,c.C)("crosses",[this._relationGeom.toJSON(),t.geometry]);case"esriSpatialRelRelation":return(0,c.C)("relate",[this._relationGeom.toJSON(),t.geometry,this._relationString]);default:return(0,h.Ur)(this._relation),!1}}getFieldsIndex(){return this._parent.getFieldsIndex()}}var y=r(85978);function S(t){return async(e,r,s)=>{if((0,i.B)(s,2,2,e,r),null===(s=(0,i.C)(s))[0]&&null===s[1])return!1;if((0,i.m)(s[0])){if((0,i.h)(s[1]))return new f({parentfeatureset:s[0],relation:t,relationGeom:s[1]});if(null===s[1])return new y.A({parentfeatureset:s[0]});throw new n.D$(e,"InvalidParameter",r)}if((0,i.h)(s[0])){if((0,i.h)(s[1])){switch(t){case"esriSpatialRelEnvelopeIntersects":{const t=(0,a.Yc)(s[0]),e=(0,a.Yc)(s[1]);return null!=t&&null!=e&&(0,c.C)("intersects",[t.toJSON(),e.toJSON()])}case"esriSpatialRelIntersects":return(0,c.C)("intersects",[s[0].toJSON(),s[1].toJSON()]);case"esriSpatialRelContains":return(0,c.C)("contains",[s[0].toJSON(),s[1].toJSON()]);case"esriSpatialRelOverlaps":return(0,c.C)("overlaps",[s[0].toJSON(),s[1].toJSON()]);case"esriSpatialRelWithin":return(0,c.C)("within",[s[0].toJSON(),s[1].toJSON()]);case"esriSpatialRelTouches":return(0,c.C)("touches",[s[0].toJSON(),s[1].toJSON()]);case"esriSpatialRelCrosses":return(0,c.C)("crosses",[s[0].toJSON(),s[1].toJSON()])}throw new n.D$(e,"InvalidParameter",r)}if((0,i.m)(s[1]))return new f({parentfeatureset:s[1],relation:t,relationGeom:s[0]});if(null===s[1])return!1;throw new n.D$(e,"InvalidParameter",r)}if(null===s[0]){if((0,i.m)(s[1]))return new y.A({parentfeatureset:s[1]});if((0,i.h)(s[1])||null===s[1])return!1}throw new n.D$(e,"InvalidParameter",r)}}function d(t){"async"===t.mode&&(t.functions.intersects=function(e,r){return t.standardFunctionAsync(e,r,S("esriSpatialRelIntersects"))},t.functions.envelopeintersects=function(e,r){return t.standardFunctionAsync(e,r,S("esriSpatialRelEnvelopeIntersects"))},t.signatures.push({name:"envelopeintersects",min:2,max:2}),t.functions.contains=function(e,r){return t.standardFunctionAsync(e,r,S("esriSpatialRelContains"))},t.functions.overlaps=function(e,r){return t.standardFunctionAsync(e,r,S("esriSpatialRelOverlaps"))},t.functions.within=function(e,r){return t.standardFunctionAsync(e,r,S("esriSpatialRelWithin"))},t.functions.touches=function(e,r){return t.standardFunctionAsync(e,r,S("esriSpatialRelTouches"))},t.functions.crosses=function(e,r){return t.standardFunctionAsync(e,r,S("esriSpatialRelCrosses"))},t.functions.relate=function(e,r){return t.standardFunctionAsync(e,r,async(t,a,s)=>{if(s=(0,i.C)(s),(0,i.B)(s,3,3,e,r),(0,i.h)(s[0])&&(0,i.h)(s[1]))return(0,c.C)("relate",[s[0].toJSON(),s[1].toJSON(),(0,i.u)(s[2])]);if((0,i.h)(s[0])&&null===s[1])return!1;if((0,i.h)(s[1])&&null===s[0])return!1;if((0,i.m)(s[0])&&null===s[1])return new y.A({parentfeatureset:s[0]});if((0,i.m)(s[1])&&null===s[0])return new y.A({parentfeatureset:s[1]});if((0,i.m)(s[0])&&(0,i.h)(s[1]))return new f({parentfeatureset:s[0],relation:"esriSpatialRelRelation",relationGeom:s[1],relationString:(0,i.u)(s[2])});if((0,i.m)(s[1])&&(0,i.h)(s[0]))return new f({parentfeatureset:s[1],relation:"esriSpatialRelRelation",relationGeom:s[0],relationString:(0,i.u)(s[2])});if(null===s[0]&&null===s[1])return!1;throw new n.D$(e,"InvalidParameter",r)})})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3693],{3693:(e,t,n)=>{n.r(t),n.d(t,{registerFunctions:()=>Ne});var r=n(52106),i=n(66131),a=n(47609),s=n(66395),o=n(59534),l=n(85935),u=n(93833),d=n(30445),c=n(93818),f=n(78878),p=n(80672),h=n(48938),m=n(87449),y=n(11221),g=n(33325),w=n(80609),I=n(1262),F=n(88368);class A{constructor(e){this.field=e,this.sqlRewritable=!1}postInitialization(e,t){}}class b extends A{constructor(e){super(e),this.sqlRewritable=!0}extractValue(e){return e.attributes[this.field.name]}rewriteSql(e){return{rewritten:this.sqlRewritable,where:e}}}class N extends A{constructor(e,t,n){super((0,g.ke)(e)),this.originalField=e,this.sqlRewritable=!0,this.field.name=t,this.field.alias=n}rewriteSql(e,t){return{rewritten:this.sqlRewritable,where:(0,w.bD)(e,this.field.name,this.originalField.name,t.getFieldsIndex())}}extractValue(e){return e.attributes[this.originalField.name]}}class S extends A{constructor(e,t,n){super(e),this.codefield=t,this._stringToCode=n,this._codeToString={};for(const e in n)this._codeToString[n[e]]=e;this.sqlRewritable=!0}static{this.BADNESS="_!!!_BAD_LKP_!!!!"}rewriteSql(e,t){const n=this.evaluateNodeToWhereClause(e.parseTree,0,this.field.name,this.codefield instanceof F.A?(0,w.YY)(this.codefield,0):this.codefield,e.parameters);return n.includes(S.BADNESS)?{rewritten:!1,where:e}:{rewritten:this.sqlRewritable,where:F.A.create(n,{fieldsIndex:t._parent.getFieldsIndex(),timeZone:t.dateFieldsTimeZoneDefaultUTC})}}evaluateNodeToWhereClause(e,t,n=null,r=null,i){switch(e.type){case"interval":return(0,w.oj)(this.evaluateNodeToWhereClause(e.value,t,n,r,i),e.qualifier,e.op);case"case-expression":{let r=" CASE ";"simple"===e.format&&(r+=this.evaluateNodeToWhereClause(e.operand,t,n,S.BADNESS,i));for(const a of e.clauses)r+=" WHEN "+this.evaluateNodeToWhereClause(a.operand,t,n,S.BADNESS,i)+" THEN "+this.evaluateNodeToWhereClause(a.value,t,n,S.BADNESS,i);return null!==e.else&&(r+=" ELSE "+this.evaluateNodeToWhereClause(e.else,t,n,S.BADNESS,i)),r+=" END ",r}case"parameter":{const n=i[e.value.toLowerCase()];return"string"==typeof n?"'"+n.toString().replaceAll("'","''")+"'":(0,g.$P)(n)||(0,g.Lk)(n)?(0,w.bm)(n,t):(0,g.eg)(n)?(0,w.F1)(n,t):(0,g.rX)(n)?(0,w.R8)(n,t):(0,g.f0)(n)?(0,w.Nf)(n,t):Array.isArray(n)?n.map(e=>"string"==typeof e?"'"+e.toString().replaceAll("'","''")+"'":(0,g.$P)(e)||(0,g.Lk)(e)?(0,w.bm)(e,t):(0,g.eg)(e)?(0,w.F1)(e,t):(0,g.rX)(e)?(0,w.R8)(e,t):(0,g.f0)(e)?(0,w.Nf)(e,t):e.toString()):n.toString()}case"expression-list":{const a=[];for(const s of e.value)a.push(this.evaluateNodeToWhereClause(s,t,n,r,i));return a}case"unary-expression":return" ( NOT "+this.evaluateNodeToWhereClause(e.expr,t,n,S.BADNESS,i)+" ) ";case"binary-expression":switch(e.operator){case"AND":return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" AND "+this.evaluateNodeToWhereClause(e.right,t,n,r,i)+") ";case"OR":return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" OR "+this.evaluateNodeToWhereClause(e.right,t,n,r,i)+") ";case"IS":if("null"!==e.right.type)throw new I.L("UnsupportedIsRhs");return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" IS NULL )";case"ISNOT":if("null"!==e.right.type)throw new I.L("UnsupportedIsRhs");return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" IS NOT NULL )";case"IN":{if("expression-list"===e.right.type){if("column-reference"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const a=[];let s=!0;for(const t of e.right.value){if("string"!==t.type){s=!1;break}if(void 0===this._stringToCode[t.value]){s=!1;break}a.push(this._stringToCode[t.value].toString())}if(s)return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" IN ("+a.join(",")+")) "}const a=this.evaluateNodeToWhereClause(e.right,t,n,r,i);return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" IN ("+a.join(",")+")) "}const a=this.evaluateNodeToWhereClause(e.right,t,n,r,i);return Array.isArray(a)?" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" IN ("+a.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" IN ("+a+")) "}case"NOT IN":{if("expression-list"===e.right.type){if("column-reference"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const a=[];let s=!0;for(const t of e.right.value){if("string"!==t.type){s=!1;break}if(void 0===this._stringToCode[t.value]){s=!1;break}a.push(this._stringToCode[t.value].toString())}if(s)return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" NOT IN ("+a.join(",")+")) "}const a=this.evaluateNodeToWhereClause(e.right,t,n,r,i);return" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" NOT IN ("+a.join(",")+")) "}const a=this.evaluateNodeToWhereClause(e.right,t,n,r,i);return Array.isArray(a)?" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" NOT IN ("+a.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,n,r,i)+" NOT IN ("+a+")) "}case"BETWEEN":{const r=this.evaluateNodeToWhereClause(e.right,t,n,S.BADNESS,i);return" ("+this.evaluateNodeToWhereClause(e.left,t,n,S.BADNESS,i)+" BETWEEN "+r[0]+" AND "+r[1]+" ) "}case"NOTBETWEEN":{const r=this.evaluateNodeToWhereClause(e.right,t,n,S.BADNESS,i);return" ("+this.evaluateNodeToWhereClause(e.left,t,n,S.BADNESS,i)+" NOT BETWEEN "+r[0]+" AND "+r[1]+" ) "}case"LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,n,S.BADNESS,i)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,n,S.BADNESS,i)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,n,S.BADNESS,i)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,n,S.BADNESS,i)+") ";case"NOT LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,n,S.BADNESS,i)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,n,S.BADNESS,i)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,n,S.BADNESS,i)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,n,S.BADNESS,i)+") ";case"<>":case"=":if("column-reference"===e.left.type&&"string"===e.right.type){if(e.left.column.toUpperCase()===this.field.name.toUpperCase()&&void 0!==this._stringToCode[e.right.value.toString()])return" ("+r+" "+e.operator+" "+this._stringToCode[e.right.value.toString()].toString()+") "}else if("column-reference"===e.right.type&&"string"===e.left.type&&e.right.column.toUpperCase()===this.field.name.toUpperCase())return" ("+this._stringToCode[e.left.value.toString()].toString()+" "+e.operator+" "+r+") ";return" ("+this.evaluateNodeToWhereClause(e.left,t,n,S.BADNESS,i)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,n,S.BADNESS,i)+") ";case"<":case">":case">=":case"<=":case"*":case"-":case"+":case"/":case"||":return" ("+this.evaluateNodeToWhereClause(e.left,t,n,S.BADNESS,i)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,n,S.BADNESS,i)+") "}case"null":return"null";case"boolean":return!0===e.value?"1":"0";case"string":return"'"+e.value.toString().replaceAll("'","''")+"'";case"timestamp":return`timestamp '${e.value}'`;case"date":return`date '${e.value}'`;case"time":return`time '${e.value}'`;case"number":return e.value.toString();case"current-time":return(0,w.C6)(e.mode,t);case"current-user":return"CURRENT_USER";case"column-reference":return n&&n.toLowerCase()===e.column.toLowerCase()?"("+r+")":(0,w.Kb)(e);case"data-type":return e.value;case"function":{const r=this.evaluateNodeToWhereClause(e.args,t,n,S.BADNESS,i);return(0,w.F6)(e.name,r,t)}}throw new I.L("UnsupportedSyntax",{node:e.type})}extractValue(e){if(this.codefield instanceof F.A){const t=this.codefield.calculateValueCompiled(e);return this._codeToString[F.A.convertValueToStorageFormat(t)]}return this._codeToString[e.attributes[this.codefield]]}}class T extends A{constructor(e,t){super(e),this._sql=t}rewriteSql(e,t){return{rewritten:!0,where:(0,w.bD)(e,this.field.name,(0,w.YY)(this._sql,0),t.getFieldsIndex())}}extractValue(e){return F.A.convertValueToStorageFormat(this._sql.calculateValueCompiled(e),this.field.type)}}class _ extends y.t1{static findField(e,t){for(const n of e)if(n.name.toLowerCase()===t.toString().toLowerCase())return n;return null}constructor(e){super(),this.declaredClass="esri.arcade.featureset.actions.Adapted",this._maxProcessing=30,this._parent=e.parentfeatureset,this._adaptedFields=e.adaptedFields,this._extraFilter=e.extraFilter}_initialiseFeatureSet(){this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types,this.fields=[];for(const e of this._adaptedFields)e.postInitialization(this,this._parent),this.fields.push(e.field)}async _queryAll(){return await this._ensureLoaded(),this._extraFilter?(await this.query({abortSignal:h._})).features:this._calculateFields(await this._parent.queryAll(h._))}async query(e){let t=e.where??null;const n=this._reformulateWithoutAdaptions(t),r=n.cannot;t=n.where;let i=!1,a=e.orderBy;if(null!=a){i=!0;const e=[];for(const t of this._adaptedFields)if(!(t instanceof b)&&!0===a.scanForField(t.field.name)){if(!(t instanceof N)){a=null,i=!1;break}e.push({field:t.field.name,newfield:t.originalField.name})}a&&e.length>0&&(a=a.replaceFields(e))}null!=t?null!=this._extraFilter&&(t=(0,w.kg)(this._extraFilter,t)):t=this._extraFilter,await this._ensureLoaded();const s=await this._parent.query({...e,where:t,orderBy:a});return(0,m.dZ)(e.abortSignal),r?{...s,filterApplied:!1,ordered:!!i&&s.ordered,features:this._calculateFields(s.features)}:{...s,ordered:!!i&&s.ordered,features:this._calculateFields(s.features)}}async*_calculateFields(e){for await(const t of e)yield t.map(e=>{const t={};for(const n of this._adaptedFields)t[n.field.name]=n.extractValue(e);return{attributes:t,geometry:e.geometry}})}async queryStat(e){let t=!1,n=e.field,r=this._reformulateWithoutAdaptions(n);t=r.cannot,n=r.where;let i=e.where??null;if(r=this._reformulateWithoutAdaptions(i),t=t||r.cannot,i=r.where,null!=i?null!==this._extraFilter&&(i=(0,w.kg)(this._extraFilter,i)):i=this._extraFilter,t)return null==i&&null==e.spatialFilter?this._manualStat(e.stat,n,e.limit??g.gO,e.abortSignal):{calculated:!1};const a=await this._parent.queryStat({...e,field:n,where:i});return a.calculated?a:null==i&&null==e.spatialFilter?this._manualStat(e.stat,n,e.limit??g.gO,e.abortSignal):{calculated:!1}}async canQueryAggregate(e){for(const t of e.groupBy)for(const e of this._adaptedFields)if(t.toLowerCase()===e.field.name.toLowerCase()&&!(e instanceof b))return!1;const t=[];for(const n of e.statistics)if(null!==n.workingexpr){const e=this._reformulateWithoutAdaptions(n.workingexpr);if(e.cannot)return!1;const r=n.clone();r.workingexpr=e.where,t.push(r)}else t.push(n);let n=e.where??null;const r=this._reformulateWithoutAdaptions(n);return!r.cannot&&(n=r.where,null!==n?null!==this._extraFilter&&(n=(0,w.kg)(this._extraFilter,n)):n=this._extraFilter,this._parent.canQueryAggregate({...e,statistics:t,where:n}))}async queryAggregate(e){const t=[];for(const n of e.statistics)if(null!==n.workingexpr){const e=this._reformulateWithoutAdaptions(n.workingexpr);if(e.cannot)throw new m.dr("NeverReach");const r=n.clone();r.workingexpr=e.where,t.push(r)}else t.push(n);let n=e.where??null;const r=this._reformulateWithoutAdaptions(n);if(r.cannot)throw new m.dr("NeverReach");return n=r.where,null!==n?null!==this._extraFilter&&(n=(0,w.kg)(this._extraFilter,n)):n=this._extraFilter,this._parent.queryAggregate({...e,statistics:t,where:n})}_reformulateWithoutAdaptions(e){const t={cannot:!1,where:e};if(null!==e)for(const n of this._adaptedFields)if(!0===(0,w.Ju)(e,n.field.name)){const r=n.rewriteSql(e,this);if(!0!==r.rewritten){t.cannot=!0,t.where=null;break}t.where=r.where}return t}}var C=n(35704),v=n(4576);class x extends y.t1{constructor(e){super(),this.declaredClass="esri.arcade.featureset.actions.OrderBy",this._maxProcessing=100,this._parent=e.parentfeatureset,this._orderByClause=e.orderbyclause}async _queryAll(){return(await this.query({abortSignal:h._})).features}async query(e){await this._ensureLoaded();const t=await this._parent.query({...e,orderBy:null==e.orderBy?this._orderByClause:e.orderBy});return(0,m.dZ)(e.abortSignal),!1===t.ordered?{...t,ordered:!0,features:this._sortFeatures(t.features,e.abortSignal)}:t}async*_sortFeatures(e,t){const n=[];for await(const r of e)n.push(r),await(0,f.a2)(),(0,m.dZ)(t);const r=n.flat();this._orderByClause.order(r);for(const e of(0,v.Ho)(r,this._maxQueryRate()))yield e}async queryStat(e){const t=await this._parent.queryStat(e);return t.calculated?t:null==e.where&&null==e.spatialFilter?this._manualStat(e.stat,e.field,e.limit??g.gO,e.abortSignal):{calculated:!1}}async canQueryAggregate(e){return this._parent.canQueryAggregate(e)}async queryAggregate(e){return this._parent.queryAggregate(e)}getFieldsIndex(){return this._parent.getFieldsIndex()}}function D(e,t){return e===t?0:null===e?-1:null===t?1:e<t?-1:1}class E{constructor(e){const t=e.split(",");this._fields=[],this._directions=[];for(let e=0;e<t.length;e++){const n=t[e].match(/\S+/g);this._fields.push(n[0]),2===n.length?"asc"===n[1].toLowerCase()?this._directions.push(1):this._directions.push(0):this._directions.push(1)}}constructClause(){let e="";for(let t=0;t<this._fields.length;t++)0!==t&&(e+=","),e+=this._fields[t],1===this._directions[t]?e+=" ASC":e+=" DESC";return e}order(e){e.sort((e,t)=>{for(let n=0;n<this._fields.length;n++){const r=this.featureValue(e,this._fields[n],n),i=this.featureValue(t,this._fields[n],n);let a=0;if(a=1===this._directions[n]?D(r,i):-1*D(r,i),0!==a)return a}return 0})}scanForField(e){for(let t=0;t<this._fields.length;t++)if(this._fields[t].toLowerCase().trim()===e.toLowerCase().trim())return!0;return!1}replaceFields(e){let t="";for(let n=0;n<this._fields.length;n++){0!==n&&(t+=",");let r=this._fields[n];for(const t of e)if(r.toLowerCase()===t.field.toLowerCase()){r=t.newfield;break}t+=r,1===this._directions[n]?t+=" ASC":t+=" DESC"}return new E(t)}featureValue(e,t,n){const r=e.attributes[t];if(void 0!==r)return r;for(const r in e.attributes)if(t.toLowerCase()===r.toLowerCase())return this._fields[n]=r,e.attributes[r];return null}}class k{constructor(){this.field="",this.tofieldname="",this.typeofstat="MIN",this.workingexpr=null}clone(){const e=new k;return e.field=this.field,e.tofieldname=this.tofieldname,e.typeofstat=this.typeofstat,e.workingexpr=this.workingexpr,e}static parseStatField(e,t,n,r){const i=new k;i.field=e;const a=F.A.create(t,{fieldsIndex:n,timeZone:r}),s=function(e){if("function"===e.parseTree.type){if(0===e.parseTree.args.value.length)return{name:e.parseTree.name,expr:null};if(e.parseTree.args.value.length>1)throw new I.L("MissingStatisticParameters");const t=F.A.create((0,w.Mi)(e.parseTree.args.value[0],0,e.parameters),{fieldsIndex:e.fieldsIndex,timeZone:e.timeZone,currentUser:e.currentUser});return{name:e.parseTree.name,expr:t}}return null}(a);if(null===s)throw new I.L("UnsupportedSqlFunction",{function:""});const o=s.name.toUpperCase().trim();if("MIN"===o){if(i.typeofstat="MIN",i.workingexpr=s.expr,null===a)throw new I.L("InvalidFunctionParameters",{function:"min"})}else if("MAX"===o){if(i.typeofstat="MAX",i.workingexpr=s.expr,null===a)throw new I.L("InvalidFunctionParameters",{function:"max"})}else if("COUNT"===o)i.typeofstat="COUNT",i.workingexpr=s.expr;else if("STDEV"===o){if(i.typeofstat="STDDEV",i.workingexpr=s.expr,null===a)throw new I.L("InvalidFunctionParameters",{function:"stdev"})}else if("SUM"===o){if(i.typeofstat="SUM",i.workingexpr=s.expr,null===a)throw new I.L("InvalidFunctionParameters",{function:"sum"})}else if("MEAN"===o){if(i.typeofstat="AVG",i.workingexpr=s.expr,null===a)throw new I.L("InvalidFunctionParameters",{function:o})}else if("AVG"===o){if(i.typeofstat="AVG",i.workingexpr=s.expr,null===a)throw new I.L("InvalidFunctionParameters",{function:"avg"})}else{if("VAR"!==o)throw new I.L("UnsupportedSqlFunction",{function:o});if(i.typeofstat="VAR",i.workingexpr=s.expr,null===a)throw new I.L("InvalidFunctionParameters",{function:"var"})}return i}toStatisticsName(){switch(this.typeofstat.toUpperCase()){case"MIN":return"min";case"MAX":return"max";case"SUM":return"sum";case"COUNT":default:return"count";case"VAR":return"var";case"STDDEV":return"stddev";case"AVG":return"avg"}}}var L=n(80200),U=n(74639),$=n(44729),j=n(55612),Z=n(15032),B=n(20437);const M=new o.b(["MIN","MAX","VAR","STDDEV","COUNT","SUM","AVG"],[["VARIANCE","VAR"],["AVERAGE","AVG"],["MEAN","AVG"],["STDEV","STDDEV"]]);class W extends y.t1{constructor(e){super(),this.declaredClass="esri.arcade.featureset.actions.Aggregate",this._decodedStatsFields=[],this._decodedGroupByFields=[],this._canDoSimpleGroupBy=!0,this._physicalGroupByFields=[],this.objectIdField="ROW__ID",this._adaptedFields=[],this._uniqueIds=1,this._maxQuery=10,this._maxProcessing=10,this._parent=e.parentfeatureset,this._config=e}isTable(){return!0}_nextUniqueName(e){for(;1===e["T"+this._uniqueIds.toString()];)this._uniqueIds++;const t="T"+this._uniqueIds.toString();return e[t]=1,t}_convertToEsriFieldType(e){return e}_initialiseFeatureSet(){const e=this._parent.getFieldsIndex();this.objectIdField="ROW__ID",this.globalIdField="";let t=!1,n=1;for(;!1===t;){let e=!1;for(const t of this._config.groupbyfields)if(t.name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}if(!1===e)for(const t of this._config.statsfields)if(t.name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}!1===e?t=!0:(this.objectIdField="ROW__ID"+n.toString(),n++)}for(const t of this._config.statsfields){const n=new k;n.field=t.name,n.tofieldname=t.name,n.workingexpr=t.expression instanceof F.A?t.expression:F.A.create(t.expression,{fieldsIndex:e,timeZone:this.dateFieldsTimeZoneDefaultUTC}),n.typeofstat=M.lookup(t.statistic)??"COUNT",this._decodedStatsFields.push(n)}this._decodedGroupByFields=[];for(const t of this._config.groupbyfields){const n={name:t.name,singlefield:null,tofieldname:t.name,expression:t.expression instanceof F.A?t.expression:F.A.create(t.expression,{fieldsIndex:e,timeZone:this.dateFieldsTimeZoneDefaultUTC}),sqlType:null};this._decodedGroupByFields.push(n)}const r={};this.geometryType=this._parent.geometryType,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField="";for(const e of this._parent.fields)r[e.name.toUpperCase()]=1;this.types=null,this.subtypes=null,this.subtypeField="",this.fields=[];const i=new k;i.field=this._nextUniqueName(r),i.tofieldname=this.objectIdField,i.workingexpr=F.A.create(this._parent.objectIdField,{fieldsIndex:this._parent.getFieldsIndex(),timeZone:this.dateFieldsTimeZoneDefaultUTC}),i.typeofstat="MIN",this._decodedStatsFields.push(i);for(const e of this._decodedGroupByFields){const t=new B.A;if(e.name=this._nextUniqueName(r),t.name=e.tofieldname,t.alias=t.name,(0,w.DA)(e.expression)){const n=this._parent.getField((0,w.YY)(e.expression,0));if(!n)throw new m.dr("AggregationFieldNotFound");e.name=n.name,e.singlefield=n.name,this._physicalGroupByFields.push(n.name),t.type=n.type,e.sqlType=n.type}else{t.type=this._convertToEsriFieldType((0,w.IY)(e.expression,this._parent.fields));const n=new B.A;n.name=e.name,n.alias=n.name,this._physicalGroupByFields.push(e.name),this._adaptedFields.push(new T(n,e.expression)),this._canDoSimpleGroupBy=!1,e.sqlType=t.type}this.fields.push(t)}if(this._adaptedFields.length>0)for(const e of this._parent.fields)this._adaptedFields.push(new b(e));for(const e of this._decodedStatsFields){const t=new B.A;let n=null;e.field=this._nextUniqueName(r),t.name=e.tofieldname,t.alias=t.name;const i=null!==e.workingexpr&&(0,w.DA)(e.workingexpr)?(0,w.YY)(e.workingexpr,0):"";switch(e.typeofstat){case"SUM":if(""!==i){if(n=this._parent.getField(i),!n)throw new m.dr("AggregationFieldNotFound");t.type=n.type}else t.type="double";break;case"MIN":case"MAX":if(""!==i){if(n=this._parent.getField(i),!n)throw new m.dr("AggregationFieldNotFound");t.type=n.type}else t.type="double";break;case"COUNT":t.type="integer";break;case"STDDEV":case"VAR":case"AVG":if(""!==i&&(n=this._parent.getField(i),!n))throw new m.dr("AggregationFieldNotFound");t.type="double"}this.fields.push(t)}}async _queryAll(){return(await this.query({abortSignal:h._})).features}async query(e){if(null!=e.spatialFilter)return y.An;const t={ordered:!1,nowhereclause:!1};await this._ensureLoaded();let n=e.where;if(null!=n)for(const e of this._decodedStatsFields)if(!0===(0,w.Ju)(n,e.tofieldname)){t.nowhereclause=!0,n=null;break}let r=e.orderBy;if(null!=r){t.ordered=!0;for(const e of this._decodedStatsFields)if(!0===r.scanForField(e.tofieldname)){r=null,t.ordered=!1;break}if(null!==r)for(const e of this._decodedGroupByFields)if(null===e.singlefield&&!0===r.scanForField(e.tofieldname)){r=null,t.ordered=!1;break}}if(!1!==this._canDoSimpleGroupBy&&await this._parent.canQueryAggregate({groupBy:this._physicalGroupByFields,statistics:this._decodedStatsFields,where:null,spatialFilter:null,abortSignal:e.abortSignal})){const i=await this._parent.queryAggregate({groupBy:this._physicalGroupByFields,statistics:this._decodedStatsFields,where:n?this._reformulateWhereClauseWithoutGroupByFields(n):null,spatialFilter:null,orderBy:r?this._reformulateOrderClauseWithoutGroupByFields(r):null,abortSignal:e.abortSignal});return(0,m.dZ)(e.abortSignal),{...i,filterApplied:!t.nowhereclause&&i.filterApplied,ordered:!0===t.ordered&&i.ordered,features:this._fixAggregateAttributeNames(i.features)}}const i=this._adaptedFields.length>0?new _({parentfeatureset:this._parent,adaptedFields:this._adaptedFields,extraFilter:null}):this._parent;if(!0===t.nowhereclause){const t=new x({parentfeatureset:i,orderbyclause:new E(this._physicalGroupByFields.join(",")+","+this._parent.objectIdField+" ASC")});return{filterApplied:!1,spatialFilterApplied:!1,ordered:!1,features:this._aggregateSortedFeatureGroups((await t.query({abortSignal:e.abortSignal})).features,this._maxQuery,e.abortSignal)}}let a=i;null!=n&&(a=new C.A({parentfeatureset:a,whereclause:this._reformulateWhereClauseWithoutGroupByFields(n)}));const s=new x({parentfeatureset:a,orderbyclause:new E(this._physicalGroupByFields.join(",")+","+this._parent.objectIdField+" ASC")});return{filterApplied:!1,spatialFilterApplied:!1,ordered:!1,features:this._aggregateSortedFeatureGroups((await s.query({abortSignal:e.abortSignal})).features,this._maxQuery,e.abortSignal)}}async*_fixAggregateAttributeNames(e){for await(const t of e)yield t.map(e=>{const t={geometry:e.geometry,attributes:{}},n={};for(const t in e.attributes)n[t.toLowerCase()]=e.attributes[t];for(const e of this._decodedGroupByFields)t.attributes[e.tofieldname]=n[e.name.toLowerCase()];for(const e of this._decodedStatsFields)t.attributes[e.tofieldname]=n[e.field.toLowerCase()];return t})}async*_aggregateSortedFeatureGroups(e,t,n){let r=null,i=[];for await(const a of e){await(0,f.a2)(),(0,m.dZ)(n);for(const e of a){const t=this._generateAggregateHash(e);null==r?r={features:[e],id:t}:t!==r.id?(i.push(this._calculateAndAppendAggregateItem(r)),r={features:[e],id:t}):r.features.push(e)}i.length>=t&&(yield i,i=[])}null!=r&&(i.push(this._calculateAndAppendAggregateItem(r)),yield i)}async queryStat(e){return{calculated:!1}}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new m.dr("NeverReach")}_reformulateWhereClauseWithoutStatsFields(e){for(const t of this._decodedStatsFields)e=(0,w.bD)(e,t.tofieldname,(0,w.YY)(t.workingexpr,0),this._parent.getFieldsIndex());return e}_reformulateWhereClauseWithoutGroupByFields(e){for(const t of this._decodedGroupByFields)t.tofieldname!==t.name&&(e=(0,w.bD)(e,t.tofieldname,(0,w.YY)(t.expression,0),this._parent.getFieldsIndex()));return e}_reformulateOrderClauseWithoutGroupByFields(e){const t=[];for(const e of this._decodedGroupByFields)e.tofieldname!==e.name&&t.push({field:e.tofieldname,newfield:e.name});return t.length>0?e.replaceFields(t):e}_calculateFieldStat(e,t,n){const r=[];for(const n of e.features)if(null!==t.workingexpr){const e=t.workingexpr.calculateValue(n);null!==e&&(e instanceof $.n||e instanceof Z.k?r.push(e.toNumber()):e instanceof j.g?r.push(e.toMilliseconds()):r.push(e))}else r.push(null);n.attributes[t.tofieldname]=(0,U.s)(t.typeofstat,[r])}_calculateAndAppendAggregateItem(e){const t={attributes:{}};for(const n of this._decodedGroupByFields){const r=n.singlefield?e.features[0].attributes[n.singlefield]:F.A.convertValueToStorageFormat(n.expression.calculateValue(e.features[0]),n.sqlType);t.attributes[n.tofieldname]=r}for(const n of this._decodedStatsFields)this._calculateFieldStat(e,n,t);return t}_generateAggregateHash(e){let t="";for(const n of this._decodedGroupByFields){const r=n.singlefield?e.attributes[n.singlefield]:n.expression.calculateValue(e);t+=null==r?":":":"+r.toString()}return(0,L.d)(t,L.T.String)}async getFeatureByObjectId(){throw new m.dr("NotImplemented")}}async function*R(e,t){let n=t;for await(const t of e)if(n>=t.length?(n-=t.length,yield t):(yield t.slice(0,n),n=0),n<=0)break}class q extends y.t1{constructor(e){super(),this.declaredClass="esri.arcade.featureset.actions.Top",this._maxProcessing=100,this._parent=e.parentfeatureset,this._limit=e.topnum}async _queryAll(){return(await this.query({abortSignal:h._})).features}async query(e){await this._ensureLoaded();const t=await this._parent.queryAll(e.abortSignal);return{filterApplied:null==e.where,spatialFilterApplied:null==e.spatialFilter,ordered:!1,features:R(t,this._limit)}}async queryStat(e){return{calculated:!1}}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new m.dr("NeverReach")}getFieldsIndex(){return this._parent.getFieldsIndex()}}var P=n(85978),O=n(30235),V=n(334),G=n(74887),K=n(68654),J=n(20655),H=n(11254),z=n(51447),Q=n(53966),Y=n(66552);new Y.J({Clean:"clean",Dirty:"dirty"}),new Y.J({Physical:"physical",Virtual:"virtual"}),new Y.J({"Start and end":"start-and-end",Start:"start",Midspan:"midspan",End:"end"}),new Y.J({startingPoint:"starting-point",barrier:"barrier",stoppingPoint:"stopping-point"}),new Y.J({connected:"connected",upstream:"upstream",downstream:"downstream",shortestPath:"shortest-path",subnetwork:"subnetwork",subnetworkController:"subnetwork-controller",loops:"loops",isolation:"isolation",path:"path",circuit:"circuit"});const X="{00000000-0000-0000-0000-000000000000}",ee=new Y.J({junctionJunctionConnectivity:"junction-junction-connectivity",connectivity:"connectivity",attachment:"attachment",containment:"containment",junctionEdgeFromConnectivity:"junction-edge-from-connectivity",junctionEdgeMidspanConnectivity:"junction-edge-midspan-connectivity",junctionEdgeToConnectivity:"junction-edge-to-connectivity"});new Y.J({normal:"normal",rebuild:"rebuild",forceRebuild:"force-rebuild"});var te=n(2272),ne=n(31635),re=n(25482),ie=n(91429),ae=n(82799);let se=class extends re.o{constructor(e){super(e),this.type="networkElement",this.assetGroupCode=null,this.assetTypeCode=null,this.globalId=null,this.networkSourceId=null,this.objectId=null,this.positionFrom=null,this.positionTo=null,this.terminalId=null}};(0,ne.Cg)([(0,ie.MZ)({json:{write:!1}})],se.prototype,"type",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],se.prototype,"assetGroupCode",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],se.prototype,"assetTypeCode",void 0),(0,ne.Cg)([(0,ie.MZ)({type:String,json:{write:!0}})],se.prototype,"globalId",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],se.prototype,"networkSourceId",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],se.prototype,"objectId",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],se.prototype,"positionFrom",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],se.prototype,"positionTo",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],se.prototype,"terminalId",void 0),se=(0,ne.Cg)([(0,ie.$K)("esri.rest.networks.support.NetworkElement")],se);let oe=class extends se{constructor(e){super(e),this.type="telecomNetworkElement",this.firstUnit=null,this.numUnits=null}};(0,ne.Cg)([(0,ie.MZ)({json:{write:!1}})],oe.prototype,"type",void 0),(0,ne.Cg)([(0,ie.MZ)({json:{write:!0}})],oe.prototype,"firstUnit",void 0),(0,ne.Cg)([(0,ie.MZ)({json:{write:!0}})],oe.prototype,"numUnits",void 0),oe=(0,ne.Cg)([(0,ie.$K)("esri.rest.networks.support.TelecomNetworkElement")],oe);var le=n(36005),ue=n(43937);let de=class extends re.o{constructor(e){super(e),this.globalId=null,this.associationType=null,this.fromNetworkElement=null,this.toNetworkElement=null,this.geometry=null,this.errorMessage=null,this.percentAlong=null,this.errorCode=null,this.isContentVisible=null,this.status=null}readFromNetworkElement(e,t){return t.fromFirstUnit||t.fromNumUnits?new oe({globalId:t.fromGlobalId,networkSourceId:t.fromNetworkSourceId,terminalId:t.fromTerminalId,firstUnit:t.fromFirstUnit,numUnits:t.fromNumUnits}):new se({globalId:t.fromGlobalId,networkSourceId:t.fromNetworkSourceId,terminalId:t.fromTerminalId})}writeFromNetworkElement(e,t){if(e&&(t.fromGlobalId=e.globalId,t.fromNetworkSourceId=e.networkSourceId,t.fromTerminalId=e.terminalId,"telecomNetworkElement"===e.type)){const n=e;t.fromFirstUnit=n.firstUnit,t.fromNumUnits=n.numUnits}}readToNetworkElement(e,t){return t.toFirstUnit||t.toNumUnits?new oe({globalId:t.toGlobalId,networkSourceId:t.toNetworkSourceId,terminalId:t.toTerminalId,firstUnit:t.toFirstUnit,numUnits:t.toNumUnits}):new se({globalId:t.toGlobalId,networkSourceId:t.toNetworkSourceId,terminalId:t.toTerminalId})}writeToNetworkElement(e,t){if(e&&(t.toGlobalId=e.globalId,t.toNetworkSourceId=e.networkSourceId,t.toTerminalId=e.terminalId,"telecomNetworkElement"===e.type)){const n=e;t.toFirstUnit=n.firstUnit,t.toNumUnits=n.numUnits}}equals(e){if(this.globalId===X&&e.globalId===X){function t(e,t){return e.networkSourceId===t.networkSourceId&&e.globalId===t.globalId&&e.terminalId===t.terminalId&&e.firstUnit===t.firstUnit&&e.numUnits===t.numUnits}const n=this.fromNetworkElement,r=this.toNetworkElement,i=e.fromNetworkElement,a=e.toNetworkElement,s=t(n,i),o=t(r,a);return s&&o&&this.associationType===e.associationType}return null!=this.globalId&&null!=e.globalId&&this.globalId===e.globalId}};(0,ne.Cg)([(0,ie.MZ)({type:String,json:{write:!0}})],de.prototype,"globalId",void 0),(0,ne.Cg)([(0,ie.MZ)({type:ee.apiValues,json:{type:ee.jsonValues,read:ee.read,write:ee.write}})],de.prototype,"associationType",void 0),(0,ne.Cg)([(0,ie.MZ)({type:se,json:{write:{target:{fromGlobalId:{type:String},fromNetworkSourceId:{type:Number},fromTerminalId:{type:Number},fromFirstUnit:{type:Number},fromNumUnits:{type:Number}}},read:{source:["fromGlobalId","fromNetworkSourceId","fromTerminalId","fromFirstUnit","fromNumUnits"]}}})],de.prototype,"fromNetworkElement",void 0),(0,ne.Cg)([(0,le.w)("fromNetworkElement")],de.prototype,"readFromNetworkElement",null),(0,ne.Cg)([(0,ue.K)("fromNetworkElement")],de.prototype,"writeFromNetworkElement",null),(0,ne.Cg)([(0,ie.MZ)({type:se,json:{write:{target:{toGlobalId:{type:String},toNetworkSourceId:{type:Number},toTerminalId:{type:Number},toFirstUnit:{type:Number},toNumUnits:{type:Number}}},read:{source:["toGlobalId","toNetworkSourceId","toTerminalId","toFirstUnit","toNumUnits"]}}})],de.prototype,"toNetworkElement",void 0),(0,ne.Cg)([(0,le.w)("toNetworkElement")],de.prototype,"readToNetworkElement",null),(0,ne.Cg)([(0,ue.K)("toNetworkElement")],de.prototype,"writeToNetworkElement",null),(0,ne.Cg)([(0,ie.MZ)({type:ae.A,json:{write:!0}})],de.prototype,"geometry",void 0),(0,ne.Cg)([(0,ie.MZ)({type:String,json:{write:!0}})],de.prototype,"errorMessage",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],de.prototype,"percentAlong",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],de.prototype,"errorCode",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Boolean,json:{write:!0}})],de.prototype,"isContentVisible",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Number,json:{write:!0}})],de.prototype,"status",void 0),de=(0,ne.Cg)([(0,ie.$K)("esri.rest.networks.support.Association")],de);let ce=class extends re.o{constructor(e){super(e),this.associations=[]}};function fe(e){const{returnDeletes:t,elements:n,gdbVersion:r,moment:i}=e.toJSON();return{returnDeletes:t,elements:JSON.stringify(n.map(e=>({globalId:e.globalId,networkSourceId:e.networkSourceId,terminalId:e.terminalId}))),types:JSON.stringify(e.types.map(e=>ee.toJSON(e))).replaceAll('"connectivity"','"junctionJunctionConnectivity"'),gdbVersion:r,moment:i??Date.now()}}(0,ne.Cg)([(0,ie.MZ)({type:[de],json:{write:!0}})],ce.prototype,"associations",void 0),ce=(0,ne.Cg)([(0,ie.$K)("esri.rest.networks.support.QueryAssociationsResult")],ce);var pe,he=n(56507);let me=pe=class extends re.o{static from(e){return(0,he.PZ)(pe,e)}constructor(e){super(e),this.returnDeletes=!1,this.elements=[],this.types=[],this.gdbVersion=null,this.moment=null}};(0,ne.Cg)([(0,ie.MZ)({type:Boolean,json:{write:!0}})],me.prototype,"returnDeletes",void 0),(0,ne.Cg)([(0,ie.MZ)({type:[se],json:{write:!0}})],me.prototype,"elements",void 0),(0,ne.Cg)([(0,ie.MZ)({type:[ee.apiValues],json:{type:ee.jsonValues,read:ee.read,write:ee.write}})],me.prototype,"types",void 0),(0,ne.Cg)([(0,ie.MZ)({type:String,json:{write:!0}})],me.prototype,"gdbVersion",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.moment=e?.getTime()}}}})],me.prototype,"moment",void 0),me=pe=(0,ne.Cg)([(0,ie.$K)("esri.rest.networks.support.QueryAssociationsParameters")],me);var ye=n(54218);function ge(e,t,n){const r=e.getVariables();if(r.length>0){const i={};for(const e of r)i[e]=t.evaluateIdentifier(n,{name:e});e.parameters=i}return e}function we(e,t,n=null){for(const n in e)if(n.toLowerCase()===t.toLowerCase())return e[n];return n}function Ie(e){if(null===e)return null;const t={type:we(e,"type",""),name:we(e,"name","")};if("range"===t.type)t.range=we(e,"range",[]);else{t.codedValues=[];for(const n of we(e,"codedValues",[]))t.codedValues.push({name:we(n,"name",""),code:we(n,"code",null)})}return t}function Fe(e){if(null===e)return null;const t={},n=we(e,"wkt");null!==n&&(t.wkt=n);const r=we(e,"wkid");return null!==r&&(t.wkid=r),t}function Ae(e){if(null===e)return null;const t={hasZ:we(e,"hasz",!1),hasM:we(e,"hasm",!1)},n=we(e,"spatialreference");null!=n&&(t.spatialReference=Fe(n));const r=we(e,"x",null);if(null!==r)return t.x=r,t.y=we(e,"y",null),t.hasZ&&(t.z=we(e,"z",null)),t.hasM&&(t.m=we(e,"m",null)),t;const i=we(e,"rings",null);if(null!==i)return t.rings=i,t;const a=we(e,"paths",null);if(null!==a)return t.paths=a,t;const s=we(e,"points",null);if(null!==s)return t.points=s,t;for(const n of["xmin","xmax","ymin","ymax","zmin","zmax","mmin","mmax"]){const r=we(e,n,null);null!==r&&(t[n]=r)}return t}function be(e){return"utc"===e?.toLowerCase()?"UTC":"unknown"===e?.toLowerCase()?"Unknown":e}function Ne(e){if("async"===e.mode){e.functions.timezone=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,a)=>{if((0,f.B)(a,1,2,t,n),(0,f.g)(a[0]))return"Unknown";if((0,f.f)(a[0]))return"Unknown";if((0,f.m)(a[0])){if(await a[0].load(),1===a.length||null===a[1])return a[0].datesInUnknownTimezone?be("unknown"):be(a[0].dateFieldsTimeZone);if(!(a[1]instanceof s.A)||!1===a[1].hasField("type"))throw new l.D$(t,"InvalidParameter",n);const e=a[1].field("type");if(!1===(0,ye.Kg)(e))throw new l.D$(t,"InvalidParameter",n);switch((0,f.u)(e).toLowerCase()){case"preferredtimezone":return be(a[0].preferredTimeZone);case"editfieldsinfo":return be(a[0].editFieldsInfo?.timeZone??null);case"timeinfo":return be(a[0].timeInfo?.timeZone??null);case"field":if(a[1].hasField("fieldname")&&(0,ye.Kg)(a[1].field("fieldname")))return be(a[0].fieldTimeZone((0,f.u)(a[1].field("fieldname"))))}throw new l.D$(t,"InvalidParameter",n)}const o=(0,f.O)(a[0],(0,f.K)(t));if(null===o)return null;const u=o.timeZone;return"system"===u?i.lY.systemTimeZoneCanonicalName:"utc"===u.toLowerCase()?"UTC":"unknown"===u.toLowerCase()?"Unknown":u})},e.functions.sqltimestamp=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{(0,f.B)(i,1,3,t,n);const a=i[0];if((0,f.e)(a)){if(1===i.length)return a.toSQLWithKeyword();if(2===i.length)return a.changeTimeZone((0,f.u)(i[1])).toSQLWithKeyword();throw new l.D$(t,"InvalidParameter",n)}if((0,f.f)(a))return a.toSQLWithKeyword();if((0,f.m)(a)){if(3!==i.length)throw new l.D$(t,"InvalidParameter",n);await a.load();const e=(0,f.u)(i[1]);if((0,f.f)(i[2]))return i[2].toSQLWithKeyword();if(!1===(0,f.e)(i[2]))throw new l.D$(t,"InvalidParameter",n);const r=a.fieldTimeZone(e);return null==r?i[2].toSQLWithKeyword():i[2].changeTimeZone(r).toSQLWithKeyword()}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"sqltimestamp",min:2,max:4}),e.functions.featuresetbyid=function(t,n){return e.standardFunctionAsync(t,n,(e,r,i)=>{if((0,f.B)(i,2,4,t,n),(0,f.l)(i[0])){const e=(0,f.u)(i[1]);let r=(0,f.J)(i[2],null);const a=(0,f.H)((0,f.J)(i[3],!0));if(null===r&&(r=["*"]),!1===(0,ye.cy)(r))throw new l.D$(t,"InvalidParameter",n);return i[0].featureSetById(e,a,r)}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"featuresetbyid",min:2,max:4});const t=new o.b(["datasource","parent","root"]);e.functions.getfeatureset=function(n,r){return e.standardFunctionAsync(n,r,async(e,i,a)=>{if((0,f.B)(a,1,2,n,r),(0,f.k)(a[0])){const e=null==a[1]?"datasource":t.lookup((0,f.u)(a[1]));return(0,d.convertToFeatureSet)(a[0].fullSchema(),e,n.lrucache,n.interceptor,n.spatialReference)}throw new l.D$(n,"InvalidParameter",r)})},e.signatures.push({name:"getfeatureset",min:1,max:2}),e.functions.featuresetbyportalitem=function(t,n){return e.standardFunctionAsync(t,n,(e,r,i)=>{if((0,f.B)(i,2,5,t,n),null===i[0])throw new l.D$(t,"PortalRequired",n);if(i[0]instanceof a.A){const e=(0,f.u)(i[1]),r=(0,f.u)(i[2]);let a=(0,f.J)(i[3],null);const s=(0,f.H)((0,f.J)(i[4],!0));if(null===a&&(a=["*"]),!1===(0,ye.cy)(a))throw new l.D$(t,"InvalidParameter",n);let o;return o=t.services?.portal?t.services.portal:J.A.getDefault(),o=(0,p.R)(i[0],o),(0,d.constructFeatureSetFromPortalItem)(e,r,t.spatialReference,a,s,o,t.lrucache,t.interceptor)}if(!1===(0,ye.Kg)(i[0]))throw new l.D$(t,"PortalRequired",n);const s=(0,f.u)(i[0]),o=(0,f.u)(i[1]);let u=(0,f.J)(i[2],null);const c=(0,f.H)((0,f.J)(i[3],!0));if(null===u&&(u=["*"]),!1===(0,ye.cy)(u))throw new l.D$(t,"InvalidParameter",n);return(0,d.constructFeatureSetFromPortalItem)(s,o,t.spatialReference,u,c,t.services?.portal??J.A.getDefault(),t.lrucache,t.interceptor)})},e.signatures.push({name:"featuresetbyportalitem",min:2,max:5}),e.functions.featuresetbyname=function(t,n){return e.standardFunctionAsync(t,n,(e,r,i)=>{if((0,f.B)(i,2,4,t,n),(0,f.l)(i[0])){const e=(0,f.u)(i[1]);let r=(0,f.J)(i[2],null);const a=(0,f.H)((0,f.J)(i[3],!0));if(null===r&&(r=["*"]),!1===(0,ye.cy)(r))throw new l.D$(t,"InvalidParameter",n);return i[0].featureSetByName(e,a,r)}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"featuresetbyname",min:2,max:4}),e.functions.featureset=function(t,n){return e.standardFunction(t,n,(e,r,i)=>{(0,f.B)(i,1,1,t,n);const a={layerDefinition:{geometryType:"",objectIdField:"",globalIdField:"",typeIdField:"",hasM:!1,hasZ:!1,fields:[]},featureSet:{geometryType:"",features:[]}};if((0,ye.Kg)(i[0])){const e=JSON.parse(i[0]);void 0!==e.layerDefinition?(a.layerDefinition=e.layerDefinition,a.featureSet=e.featureSet,e.layerDefinition.spatialReference&&(a.layerDefinition.spatialReference=e.layerDefinition.spatialReference)):(a.featureSet.features=e.features,a.featureSet.geometryType=e.geometryType,a.layerDefinition.geometryType=a.featureSet.geometryType,a.layerDefinition.objectIdField=e.objectIdFieldName??"",a.layerDefinition.typeIdField=e.typeIdFieldName,a.layerDefinition.globalIdField=e.globalIdFieldName,a.layerDefinition.fields=e.fields,e.spatialReference&&(a.layerDefinition.spatialReference=e.spatialReference))}else{if(!(i[0]instanceof s.A))throw new l.D$(t,"InvalidParameter",n);{const e=JSON.parse(i[0].castToText(!0)),r=we(e,"layerdefinition");if(null!==r){a.layerDefinition.geometryType=we(r,"geometrytype",""),a.featureSet.geometryType=a.layerDefinition.geometryType,a.layerDefinition.globalIdField=we(r,"globalidfield",""),a.layerDefinition.objectIdField=we(r,"objectidfield",""),a.layerDefinition.typeIdField=we(r,"typeidfield",""),a.layerDefinition.hasZ=!0===we(r,"hasz",!1),a.layerDefinition.hasM=!0===we(r,"hasm",!1);const t=we(r,"spatialreference");t&&(a.layerDefinition.spatialReference=Fe(t));const n=[];for(const e of we(r,"fields",[])){const t={name:we(e,"name",""),alias:we(e,"alias",""),type:we(e,"type",""),nullable:we(e,"nullable",!0),editable:we(e,"editable",!0),length:we(e,"length",null),domain:Ie(we(e,"domain"))};n.push(t)}a.layerDefinition.fields=n;const i=we(e,"featureset");if(i){const e={};for(const t of n)e[t.name.toLowerCase()]=t.name;for(const t of we(i,"features",[])){const n={},r=we(t,"attributes",{});for(const t in r)n[e[t.toLowerCase()]]=r[t];a.featureSet.features.push({attributes:n,geometry:Ae(we(t,"geometry"))})}}}else{a.layerDefinition.hasZ=!0===we(e,"hasz",!1),a.layerDefinition.hasM=!0===we(e,"hasm",!1),a.layerDefinition.geometryType=we(e,"geometrytype",""),a.featureSet.geometryType=a.layerDefinition.geometryType,a.layerDefinition.objectIdField=we(e,"objectidfieldname",""),a.layerDefinition.typeIdField=we(e,"typeidfieldname","");const r=we(e,"spatialreference");r&&(a.layerDefinition.spatialReference=Fe(r));const i=[],s=we(e,"fields",null);if(!(0,ye.cy)(s))throw new l.D$(t,"InvalidParameter",n);for(const e of s){const t={name:we(e,"name",""),alias:we(e,"alias",""),type:we(e,"type",""),nullable:we(e,"nullable",!0),editable:we(e,"editable",!0),length:we(e,"length",null),domain:Ie(we(e,"domain"))};i.push(t)}a.layerDefinition.fields=i;const o={};for(const e of i)o[e.name.toLowerCase()]=e.name;let u=we(e,"features",null);if((0,ye.cy)(u))for(const e of u){const t={},n=we(e,"attributes",{});for(const e in n)t[o[e.toLowerCase()]]=n[e];a.featureSet.features.push({attributes:t,geometry:Ae(we(e,"geometry",null))})}else u=null,a.featureSet.features=u}}}if(!1===function(e){return!!e.layerDefinition&&!!e.featureSet&&!1!==function(e){for(const t of["",null,"esriGeometryNull","esriGeometryPoint","esriGeometryPolyline","esriGeometryPolygon","esriGeometryMultipoint","esriGeometryEnvelope"])if(t===e)return!0;return!1}(e.layerDefinition.geometryType)&&!1!==(0,ye.cy)(e.layerDefinition.fields)&&!1!==(0,ye.cy)(e.featureSet.features)}(a))throw new l.D$(t,"InvalidParameter",n);return a.layerDefinition.geometryType||(a.layerDefinition.geometryType="esriGeometryNull"),O.A.create(a,t.spatialReference)})},e.signatures.push({name:"featureset",min:1,max:1}),e.functions.filter=function(t,n){return e.standardFunctionAsync(t,n,async(r,i,a)=>{if((0,f.B)(a,2,2,t,n),(0,ye.cy)(a[0])||(0,f.j)(a[0])){const e=[];let r,i=a[0];if(i instanceof c.A&&(i=i.toArray()),!(0,f.i)(a[1]))throw new l.D$(t,"InvalidParameter",n);r=a[1].createFunction(t);for(const t of i){const n=r(t);(0,G.$X)(n)?!0===await n&&e.push(t):!0===n&&e.push(t)}return e}if((0,f.m)(a[0])){const n=await a[0].load(),r=F.A.create(a[1],{fieldsIndex:n.getFieldsIndex(),timeZone:n.dateFieldsTimeZoneDefaultUTC}),i=r.getVariables();if(i.length>0){const n={};for(const r of i)n[r]=e.evaluateIdentifier(t,{name:r});r.parameters=n}return new C.A({parentfeatureset:a[0],whereclause:r})}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"filter",min:2,max:2}),e.functions.orderby=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{if((0,f.B)(i,2,2,t,n),(0,f.m)(i[0])){const e=new E(i[1]);return new x({parentfeatureset:i[0],orderbyclause:e})}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"orderby",min:2,max:2}),e.functions.top=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{if((0,f.B)(i,2,2,t,n),(0,f.m)(i[0]))return new q({parentfeatureset:i[0],topnum:i[1]});if((0,ye.cy)(i[0]))return(0,f.s)(i[1])>=i[0].length?i[0].slice():i[0].slice(0,(0,f.s)(i[1]));if((0,f.j)(i[0]))return(0,f.s)(i[1])>=i[0].length()?i[0].slice():i[0].slice(0,(0,f.s)(i[1]));throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"top",min:2,max:2}),e.functions.first=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{if((0,f.B)(i,1,1,t,n),(0,f.m)(i[0])){const n=await i[0].first(e.abortSignal);if(null!==n){const e=u.Xj.createFromGraphicLikeObject(n.geometry,n.attributes,i[0],t.timeZone);return e._underlyingGraphic=n,e}return n}return(0,ye.cy)(i[0])?0===i[0].length?null:i[0][0]:(0,f.j)(i[0])?0===i[0].length()?null:i[0].get(0):null})},e.signatures.push({name:"first",min:1,max:1}),e.functions.attachments=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{(0,f.B)(i,1,2,t,n);const a={minsize:-1,maxsize:-1,types:null,returnMetadata:!1};if(i.length>1)if(i[1]instanceof s.A){if(i[1].hasField("minsize")&&(a.minsize=(0,f.s)(i[1].field("minsize"))),i[1].hasField("metadata")&&(a.returnMetadata=(0,f.H)(i[1].field("metadata"))),i[1].hasField("maxsize")&&(a.maxsize=(0,f.s)(i[1].field("maxsize"))),i[1].hasField("types")){const e=(0,f.M)(i[1].field("types"),!1);e.length>0&&(a.types=e)}}else if(null!==i[1])throw new l.D$(t,"InvalidParameter",n);if((0,f.k)(i[0])){const e=i[0]._layer;let n;if((0,f.m)(e))n=e;else{if(null==e||!(0,g.eB)(e))return[];n=(0,d.constructFeatureSet)(e,t.spatialReference,["*"],!0,t.lrucache,t.interceptor)}return await n.load(),n.queryAttachments(i[0].field(n.objectIdField),a.minsize,a.maxsize,a.types,a.returnMetadata)}if(null===i[0])return[];throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"attachments",min:1,max:2}),e.functions.featuresetbyrelationshipname=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{(0,f.B)(i,2,4,t,n);const a=i[0],s=(0,f.u)(i[1]);let o=(0,f.J)(i[2],null);const u=(0,f.H)((0,f.J)(i[3],!0));if(null===o&&(o=["*"]),!1===(0,ye.cy)(o))throw new l.D$(t,"InvalidParameter",n);if(null===i[0])return null;if(!(0,f.k)(i[0]))throw new l.D$(t,"InvalidParameter",n);const c=a._layer;let p;if((0,f.m)(c))p=c;else{if(null==c||!(0,g.eB)(c))return null;p=(0,d.constructFeatureSet)(c,t.spatialReference,["*"],!0,t.lrucache,t.interceptor)}p=await p.load();const h=p.relationshipMetadata().filter(e=>e.name===s);if(0===h.length)return null;if(void 0!==h[0].relationshipTableId&&null!==h[0].relationshipTableId&&h[0].relationshipTableId>-1)return(0,d.constructFeatureSetFromRelationship)(p,h[0],a.field(p.objectIdField),p.spatialReference,o,u,t.lrucache,t.interceptor);let m=p.serviceUrl();if(!m)return null;m=m.endsWith("/")?m+h[0].relatedTableId.toString():m+"/"+h[0].relatedTableId.toString();const y=await(0,d.constructFeatureSetFromUrl)(m,p.spatialReference,o,u,t.lrucache,t.interceptor);await y.load();let w=y.relationshipMetadata();if(w=w.filter(e=>e.id===h[0].id),!1===a.hasField(h[0].keyField)||null===a.field(h[0].keyField)){const e=await p.getFeatureByObjectId(a.field(p.objectIdField),[h[0].keyField]);if(e){const t=F.A.create(w[0].keyField+"= @id",{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC});return t.parameters={id:e.attributes[h[0].keyField]},new C.A({parentfeatureset:y,whereclause:t})}return new P.A({parentfeatureset:y})}const I=F.A.create(w[0].keyField+"= @id",{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC});return I.parameters={id:a.field(h[0].keyField)},new C.A({parentfeatureset:y,whereclause:I})})},e.signatures.push({name:"featuresetbyrelationshipname",min:2,max:4}),e.functions.featuresetbyassociation=function(t,n){return e.standardFunctionAsync(t,n,async(e,i,a)=>{(0,f.B)(a,2,3,t,n);const s=a[0],u=(0,o.B)((0,f.u)((0,f.J)(a[1],""))),c=(0,ye.Kg)(a[2])?(0,f.u)(a[2]):null;if(null===a[0])return null;if(!(0,f.k)(a[0]))throw new l.D$(t,"InvalidParameter",n);let p=s._layer;if(p instanceof K.default&&(p=(0,d.constructFeatureSet)(p,t.spatialReference,["*"],!0,t.lrucache,t.interceptor)),null===p)return null;if(!1===(0,f.m)(p))return null;await p.load();const h=p.serviceUrl(),m=await(0,d.constructAssociationMetaDataFeatureSetFromUrl)(h,t.spatialReference,!0);if(m.unVersion>=8)return await async function(e,t,n,i,a,s,o){const u=await e.getFeatureSetInfo();if(null===(u?.layerId??null))return null;if(!a.layerIdLookup.get(u.layerId))return null;const c=e.serviceUrl().replace(/\/FeatureServer/i,"/UtilityNetworkServer"),f=[];switch(n){case"connected":f.push("connectivity"),f.push("junction-edge-from-connectivity"),f.push("junction-edge-to-connectivity"),f.push("junction-edge-midspan-connectivity"),f.push("junction-junction-connectivity");break;case"container":case"content":f.push("containment");break;case"structure":case"attached":f.push("attachment");break;case"junctionedge":f.push("junction-edge-from-connectivity"),f.push("junction-edge-to-connectivity");break;case"midspan":f.push("junction-edge-midspan-connectivity");break;default:throw new l.D$(s,"InvalidParameter",o)}let p=null,h=!1;if(null!==i&&""!==i&&void 0!==i){for(const e of a.terminals)e.terminalName===i&&(p=e.terminalId);null===p&&(h=!0)}const m=[];if(!h){const i=new se({globalId:t.field(e.globalIdField),networkSourceId:a.layerIdLookup.get(u.layerId).sourceId,...p?{terminalId:p}:""}),s=await async function(e,t){const n=(0,te.Dl)(e),r={...fe(t),f:"json"},i=(0,te.lF)({...n.query,...r}),a=(0,te.jV)(i,{method:"post"}),s=`${n.path}/associations/query`,{data:o}=await(0,H.A)(s,a),l=ce.fromJSON(o);return t.types.includes("connectivity")&&(0,z.Lx)(Q.A.getLogger("esri/rest/networks/support/QueryAssociationsParameters"),"types",{replacement:"Please use 'junction-junction-connectivity' instead of 'connectivity'.",see:"https://arcg.is/11Tr8a#types",version:"4.29",warnOnce:!0}),l}(c,new me({types:f,elements:[i]}));let o=0;for(const e of s.associations){let t=null,s="",l="";if(e.fromNetworkElement?.globalId===i.globalId?(t=e.toNetworkElement,l="to"):e.toNetworkElement?.globalId===i.globalId&&(t=e.fromNetworkElement,l="from"),!t)continue;switch(n){case"attached":if("attachment"!==e.associationType)continue;if("to"!==l)continue;break;case"structure":if("attachment"!==e.associationType)continue;if("from"!==l)continue;break;case"container":if("containment"!==e.associationType)continue;if("from"!==l)continue;break;case"content":if("containment"!==e.associationType)continue;if("to"!==l)continue;break;case"connected":break;case"junctionedge":"junction-edge-to-connectivity"===e.associationType?s="to":"junction-edge-from-connectivity"===e.associationType&&(s="from");break;case"midspan":if("junction-edge-midspan-connectivity"!==e.associationType)continue}const u=a.sourceIdLookup.get(t.networkSourceId)?.className??"";m.push(new r.A({geometry:null,attributes:{objectId:o++,globalId:t.globalId,percentAlong:e.percentAlong??0,isContentVisible:e.isContentVisible?0:1,className:u,side:s}}))}}const y=new K.default({source:m,geometryType:null,objectIdField:"objectId",globalIdField:"globalId",fields:[new B.A({name:"objectId",alias:"objectId",type:"oid"}),new B.A({name:"globalId",alias:"globalId",type:"global-id"}),new B.A({name:"percentAlong",alias:"percentAlong",type:"double"}),new B.A({name:"side",alias:"side",type:"string"}),new B.A({name:"isContentVisible",alias:"isContentVisible",type:"integer"}),new B.A({name:"className",alias:"className",type:"string"})]});return(0,d.constructFeatureSet)(y)}(p,s,u,c,m,t,n);const y=m.associations;let w=null,I=null,A=!1;if(null!==c&&""!==c&&void 0!==c){for(const e of m.terminals)e.terminalName===c&&(I=e.terminalId);null===I&&(A=!0)}const C=y.getFieldsIndex(),v=C.get("TOGLOBALID").name,x=C.get("FROMGLOBALID").name,D=C.get("TOTERMINALID").name,E=C.get("FROMTERMINALID").name,k=C.get("FROMNETWORKSOURCEID").name,L=C.get("TONETWORKSOURCEID").name,U=C.get("ASSOCIATIONTYPE").name,$=C.get("ISCONTENTVISIBLE").name,j=C.get("OBJECTID").name;for(const e of p.fields)if("global-id"===e.type){w=s.field(e.name);break}let Z=null,M=new T(new B.A({name:"percentalong",alias:"percentalong",type:"double"}),F.A.create("0",{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC})),W=new T(new B.A({name:"side",alias:"side",type:"string"}),F.A.create("''",{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC}));const R="globalid",q="globalId",P={};for(const e in m.lkp)P[e]=m.lkp[e].sourceId;const O=new S(new B.A({name:"classname",alias:"classname",type:"string"}),null,P);let V="";switch(u){case"midspan":{V=`((${v}='${w}') OR ( ${x}='${w}')) AND (${U} IN (5))`,O.codefield=F.A.create(`CASE WHEN (${v}='${w}') THEN ${k} ELSE ${L} END`,{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC});const e=(0,g.ke)(_.findField(y.fields,x));e.name=R,e.alias=R,Z=new T(e,F.A.create(`CASE WHEN (${x}='${w}') THEN ${v} ELSE ${x} END`,{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC})),M=m.unVersion>=4?new b(_.findField(y.fields,C.get("PERCENTALONG").name)):new T(new B.A({name:"percentalong",alias:"percentalong",type:"double"}),F.A.create("0",{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC}));break}case"junctionedge":{V=`((${v}='${w}') OR ( ${x}='${w}')) AND (${U} IN (4,6))`,O.codefield=F.A.create(`CASE WHEN (${v}='${w}') THEN ${k} ELSE ${L} END`,{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC});const e=(0,g.ke)(_.findField(y.fields,x));e.name=R,e.alias=R,Z=new T(e,F.A.create(`CASE WHEN (${x}='${w}') THEN ${v} ELSE ${x} END`,{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC})),W=new T(new B.A({name:"side",alias:"side",type:"string"}),F.A.create(`CASE WHEN (${U}=4) THEN 'from' ELSE 'to' END`,{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC}));break}case"connected":{let e=`${v}='@T'`,t=`${x}='@T'`;null!==I&&(e+=` AND ${D}=@A`,t+=` AND ${E}=@A`),V="(("+e+") OR ("+t+"))",V=(0,f._)(V,"@T",w??""),e=(0,f._)(e,"@T",w??""),null!==I&&(e=(0,f._)(e,"@A",I.toString()),V=(0,f._)(V,"@A",I.toString())),O.codefield=F.A.create("CASE WHEN "+e+` THEN ${k} ELSE ${L} END`,{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC});const n=(0,g.ke)(_.findField(y.fields,x));n.name=R,n.alias=R,Z=new T(n,F.A.create("CASE WHEN "+e+` THEN ${x} ELSE ${v} END`,{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC}));break}case"container":V=`${v}='${w}' AND ${U} = 2`,null!==I&&(V+=` AND ${D} = `+I.toString()),O.codefield=k,V="( "+V+" )",Z=new N(_.findField(y.fields,x),R,R);break;case"content":V=`(${x}='${w}' AND ${U} = 2)`,null!==I&&(V+=` AND ${E} = `+I.toString()),O.codefield=L,V="( "+V+" )",Z=new N(_.findField(y.fields,v),R,R);break;case"structure":V=`(${v}='${w}' AND ${U} = 3)`,null!==I&&(V+=` AND ${D} = `+I.toString()),O.codefield=k,V="( "+V+" )",Z=new N(_.findField(y.fields,x),R,q);break;case"attached":V=`(${x}='${w}' AND ${U} = 3)`,null!==I&&(V+=` AND ${E} = `+I.toString()),O.codefield=L,V="( "+V+" )",Z=new N(_.findField(y.fields,v),R,q);break;default:throw new l.D$(t,"InvalidParameter",n)}return A&&(V="1 <> 1"),new _({parentfeatureset:y,adaptedFields:[new b(_.findField(y.fields,j)),new b(_.findField(y.fields,$)),Z,W,O,M],extraFilter:V?F.A.create(V,{fieldsIndex:y.getFieldsIndex(),timeZone:y.dateFieldsTimeZoneDefaultUTC}):null})})},e.signatures.push({name:"featuresetbyassociation",min:2,max:6}),e.functions.groupby=function(t,n){return e.standardFunctionAsync(t,n,async(r,i,a)=>{if((0,f.B)(a,3,3,t,n),!(0,f.m)(a[0]))throw new l.D$(t,"InvalidParameter",n);const o=await a[0].load(),u=[],d=[];let c=!1,p=[];if((0,ye.Kg)(a[1]))p.push(a[1]);else if(a[1]instanceof s.A)p.push(a[1]);else if((0,ye.cy)(a[1]))p=a[1];else{if(!(0,f.j)(a[1]))throw new l.D$(t,"InvalidParameter",n);p=a[1].toArray()}for(const e of p)if((0,ye.Kg)(e)){const t=F.A.create((0,f.u)(e),{fieldsIndex:o.getFieldsIndex(),timeZone:o.dateFieldsTimeZoneDefaultUTC}),n=!0===(0,w.DA)(t)?(0,f.u)(e):"%%%%FIELDNAME";u.push({name:n,expression:t}),"%%%%FIELDNAME"===n&&(c=!0)}else{if(!(e instanceof s.A))throw new l.D$(t,"InvalidParameter",n);{const r=e.hasField("name")?e.field("name"):"%%%%FIELDNAME",i=e.hasField("expression")?e.field("expression"):"";if("%%%%FIELDNAME"===r&&(c=!0),!r)throw new l.D$(t,"InvalidParameter",n);u.push({name:r,expression:F.A.create(i||r,{fieldsIndex:o.getFieldsIndex(),timeZone:o.dateFieldsTimeZoneDefaultUTC})})}}if(p=[],(0,ye.Kg)(a[2]))p.push(a[2]);else if((0,ye.cy)(a[2]))p=a[2];else if((0,f.j)(a[2]))p=a[2].toArray();else{if(!(a[2]instanceof s.A))throw new l.D$(t,"InvalidParameter",n);p.push(a[2])}for(const e of p){if(!(e instanceof s.A))throw new l.D$(t,"InvalidParameter",n);{const r=e.hasField("name")?e.field("name"):"",i=e.hasField("statistic")?e.field("statistic"):"",a=e.hasField("expression")?e.field("expression"):"";if(!(r&&i&&(0,ye.Kg)(i)&&a))throw new l.D$(t,"InvalidParameter",n);d.push({name:r,statistic:i,expression:F.A.create(a,{fieldsIndex:o.getFieldsIndex(),timeZone:o.dateFieldsTimeZoneDefaultUTC})})}}if(c){const e={};for(const t of o.fields)e[t.name.toLowerCase()]=1;for(const t of u)"%%%%FIELDNAME"!==t.name&&(e[t.name.toLowerCase()]=1);for(const t of d)"%%%%FIELDNAME"!==t.name&&(e[t.name.toLowerCase()]=1);let t=0;for(const n of u)if("%%%%FIELDNAME"===n.name){for(;1===e["field_"+t.toString()];)t++;e["field_"+t.toString()]=1,n.name="FIELD_"+t.toString()}}for(const n of u)ge(n.expression,e,t);for(const n of d)ge(n.expression,e,t);return new W({parentfeatureset:a[0],groupbyfields:u,statsfields:d})})},e.signatures.push({name:"groupby",min:3,max:3}),e.functions.distinct=function(t,n){return e.standardFunctionAsync(t,n,async(r,i,a)=>{if((0,f.m)(a[0])){(0,f.B)(a,2,2,t,n);const r=await a[0].load(),i=[];let o=[];if((0,ye.Kg)(a[1]))o.push(a[1]);else if(a[1]instanceof s.A)o.push(a[1]);else if((0,ye.cy)(a[1]))o=a[1];else{if(!(0,f.j)(a[1]))throw new l.D$(t,"InvalidParameter",n);o=a[1].toArray()}let u=!1;for(const e of o)if((0,ye.Kg)(e)){const t=F.A.create((0,f.u)(e),{fieldsIndex:r.getFieldsIndex(),timeZone:r.dateFieldsTimeZoneDefaultUTC}),n=!0===(0,w.DA)(t)?(0,f.u)(e):"%%%%FIELDNAME";i.push({name:n,expression:t}),"%%%%FIELDNAME"===n&&(u=!0)}else{if(!(e instanceof s.A))throw new l.D$(t,"InvalidParameter",n);{const a=e.hasField("name")?e.field("name"):"%%%%FIELDNAME",s=e.hasField("expression")?e.field("expression"):"";if("%%%%FIELDNAME"===a&&(u=!0),!a)throw new l.D$(t,"InvalidParameter",n);i.push({name:a,expression:F.A.create(s||a,{fieldsIndex:r.getFieldsIndex(),timeZone:r.dateFieldsTimeZoneDefaultUTC})})}}if(u){const e={};for(const t of r.fields)e[t.name.toLowerCase()]=1;for(const t of i)"%%%%FIELDNAME"!==t.name&&(e[t.name.toLowerCase()]=1);let t=0;for(const n of i)if("%%%%FIELDNAME"===n.name){for(;1===e["field_"+t.toString()];)t++;e["field_"+t.toString()]=1,n.name="FIELD_"+t.toString()}}for(const n of i)ge(n.expression,e,t);return new W({parentfeatureset:a[0],groupbyfields:i,statsfields:[]})}return function(e){if(1===e.length){if((0,ye.cy)(e[0]))return(0,V.t)("distinct",e[0],-1);if((0,f.j)(e[0]))return(0,V.t)("distinct",e[0].toArray(),-1)}return(0,V.t)("distinct",e,-1)}(a)})},e.functions.getfeaturesetinfo=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{if((0,f.B)(i,1,1,t,n),!(0,f.m)(i[0]))return null;const a=await i[0].getFeatureSetInfo();return a?s.A.convertObjectToArcadeDictionary({layerId:a.layerId,layerName:a.layerName,itemId:a.itemId,serviceLayerUrl:a.serviceLayerUrl,webMapLayerId:a.webMapLayerId??null,webMapLayerTitle:a.webMapLayerTitle??null,className:null,objectClassId:null},(0,f.K)(t),!1,!1):null})},e.signatures.push({name:"getfeaturesetinfo",min:1,max:1}),e.functions.filterbysubtypecode=function(t,n){return e.standardFunctionAsync(t,n,async(e,r,i)=>{if((0,f.B)(i,2,2,t,n),(0,f.m)(i[0])){const e=await i[0].load(),r=i[1];if(!(0,ye.Fq)(r))throw new l.D$(t,"InvalidParameter",n);if(e.subtypeField){const t=F.A.create(`${e.subtypeField}= ${i[1]}`,{fieldsIndex:e.getFieldsIndex(),timeZone:e.dateFieldsTimeZoneDefaultUTC});return new C.A({parentfeatureset:i[0],whereclause:t})}if(null===e.typeIdField||""===e.typeIdField)throw new l.D$(t,"FeatureSetDoesNotHaveSubtypes",n);const a=F.A.create(`${e.typeIdField}= ${i[1]}`,{fieldsIndex:e.getFieldsIndex(),timeZone:e.dateFieldsTimeZoneDefaultUTC});return new C.A({parentfeatureset:i[0],whereclause:a})}throw new l.D$(t,"InvalidParameter",n)})},e.signatures.push({name:"filterbysubtypecode",min:2,max:2})}}},80672:(e,t,n)=>{n.d(t,{R:()=>i});var r=n(20655);function i(e,t){return null===e?t:new r.A({url:e.field("url")})}},85978:(e,t,n)=>{n.d(t,{A:()=>s});var r=n(87449),i=n(11221),a=n(33325);class s extends i.t1{constructor(e){super(),this.declaredClass="esri.layers.featureset.sources.Empty",this._maxProcessing=1e3,this._parent=e.parentfeatureset,this._databaseType=0}async _queryAll(){return i.An.features}async query(e){return i.An}async queryStat(e){return await this._manualStat(e.stat,e.field,e.limit??a.gO,e.abortSignal)}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new r.dr("NeverReach")}async queryAttachments(){return[]}}}}]);
@@ -2,5 +2,5 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{EvaluateAmbientLighting as e}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js";import{Gamma as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{PiUtils as i}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import{CloudsParallaxShading as o}from"../views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js";import{ColorConversion as l}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{Float3BindUniform as s}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{FloatBindUniform as n}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{glsl as d}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{ScreenSpacePassAtmosphere as a}from"../views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js";import{ShaderBuilder as g}from"../views/webgl/ShaderBuilder.js";function c(){const c=new g,{fragment:t}=c;return c.include(a,{needUVs:!1,needEyeDirection:!1}),t.include(l),c.include(e,{pbrMode:0,lightingSphericalHarmonicsOrder:2}),t.include(i),t.include(r),c.include(o),t.uniforms.add(new s("cameraPosition",e=>e.camera.eye),new n("cloudsOpacity",e=>e.clouds.opacity)).main.add(d`vec4 cloudsColor = renderClouds(normalize(worldRay), cameraPosition);
5
+ import{EvaluateAmbientLighting as e}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js";import{Gamma as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{PiUtils as i}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import{CloudsParallaxShading as o}from"../views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js";import{ColorConversion as l}from"../views/3d/webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import{Float3BindUniform as s}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{FloatBindUniform as n}from"../views/3d/webgl-engine/core/shaderModules/FloatBindUniform.js";import{glsl as d}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{ScreenSpacePassAtmosphere as a}from"../views/3d/webgl-engine/shaders/ScreenSpacePassAtmosphere.glsl.js";import{ShaderBuilder as g}from"../views/webgl/ShaderBuilder.js";function c(){const c=new g,{fragment:t}=c;return c.include(a,{needUVs:!1,needEyeDirection:!1}),t.include(l),t.include(e,{pbrMode:0,lightingSphericalHarmonicsOrder:2}),t.include(i),t.include(r),c.include(o),t.uniforms.add(new s("cameraPosition",e=>e.camera.eye),new n("cloudsOpacity",e=>e.clouds.opacity)).main.add(d`vec4 cloudsColor = renderClouds(normalize(worldRay), cameraPosition);
6
6
  fragColor = vec4(cloudsOpacity * cloudsColor.rgb, cloudsColor.a);`),c}const t=Object.freeze(Object.defineProperty({__proto__:null,build:c},Symbol.toStringTag,{value:"Module"}));export{t as C,c as b};
@@ -2,7 +2,7 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{radiusModifier as e}from"../geometry/ellipsoidUtils.js";import{earth as o,mars as r,moon as a}from"../geometry/support/Ellipsoid.js";import{ComponentData as i}from"../views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js";import{ForwardLinearDepthToWriteShadowMap as l}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js";import{isColor as t}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SlicePass as n}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{TextureCoordinateAttribute as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VertexNormal as g}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js";import{VertexPosition as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js";import{OutputDepth as m}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as v}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{OutputHighlightOverlay as u}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlightOverlay.js";import{ReadDepth as h}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{computeFragmentNormals as w}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeFragmentNormals.glsl.js";import{ComputeMaterialColor as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeMaterialColor.glsl.js";import{ComputeNormalTexture as f}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import{EvaluateSceneLighting as b,addLightingGlobalFactor as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightIntensity as C,addMainLightDirection as x}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{PhysicallyBasedRenderingParameters as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{PiUtils as j}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import{ReadBaseColorTexture as O}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js";import{ReadShadowMapPass as S}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{terrainDepthTest as $}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{OverlayIM as N}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{DiscardOrAdjustAlphaDraw as T}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{BooleanDrawUniform as D}from"../views/3d/webgl-engine/core/shaderModules/BooleanDrawUniform.js";import{If as M,glsl as R}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DBindUniform as P}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{SnowCover as W}from"../views/3d/webgl-engine/effects/weather/SnowCover.glsl.js";import{outputColorHighlightOLID as A}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{sphereDepthInterpolate as F}from"../views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js";import{ShaderBuilder as U}from"../views/webgl/ShaderBuilder.js";import{alphaCutoff as V}from"../webscene/support/AlphaCutoff.js";function z(z){const B=new U,{vertex:E,fragment:_}=B;B.include(c,z),B.include(g,z),B.include(d,z),B.include(s,z),B.include(i,z),B.include(T,z),_.include(n,z),B.include(O,z),B.include($,z);const{output:I,pbrMode:G,hasNormalTexture:H,snowCover:k,receiveShadows:q,shadeNormals:J,spherical:K,sphericalSR:Q,ellipsoidMode:X,overlayEnabled:Y,componentData:Z,vertexDiscardMode:ee,renderOccluded:oe,isGroundSlice:re}=z,ae=1===G||2===G;ae&&(B.include(L,z),H&&B.include(f,z));const ie=3===I||4===I||5===I,le=ie&&1===Z,te=1===X,ne=1===X?o.radius:te?r.radius:a.radius;Y&&(B.include(b,z),B.include(N,z),E.include(j),E.uniforms.add(new D("useENUForGlobalOverlayUV",e=>e.useENUForGlobalOverlayUV)),_.uniforms.add(new D("useENUForGlobalOverlayUV",e=>e.useENUForGlobalOverlayUV)),E.code.add(`\n ${M(K,`const float invRadius = ${R.float(1/ne)};`)}\n vec2 projectOverlay(vec3 pos) { return pos.xy ${M(K,"/ (1.0 + invRadius * pos.z);")}; }\n `));const se=Y&&t(I)&&4===G;se&&(B.varyings.add("tbnTangent","vec3"),B.varyings.add("tbnBiTangent","vec3"),B.varyings.add("groundNormal","vec3"));const de=0===ee,ge=2===ee,ce=1-1/255;if(B.include(S,z),B.include(l,z),E.main.add(R`
5
+ import{radiusModifier as e}from"../geometry/ellipsoidUtils.js";import{earth as o,mars as r,moon as a}from"../geometry/support/Ellipsoid.js";import{ComponentData as i}from"../views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js";import{ForwardLinearDepthToWriteShadowMap as l}from"../views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js";import{isColor as t}from"../views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js";import{SlicePass as n}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{TextureCoordinateAttribute as s}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js";import{VertexColor as d}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js";import{VertexNormal as g}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js";import{VertexPosition as c}from"../views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js";import{OutputDepth as m}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js";import{OutputHighlight as v}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js";import{OutputHighlightOverlay as u}from"../views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlightOverlay.js";import{ReadDepth as h}from"../views/3d/webgl-engine/core/shaderLibrary/output/ReadDepth.glsl.js";import{computeFragmentNormals as w}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeFragmentNormals.glsl.js";import{ComputeMaterialColor as p}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeMaterialColor.glsl.js";import{ComputeNormalTexture as f}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js";import{EvaluateSceneLighting as b,addLightingGlobalFactor as y}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{addMainLightIntensity as C,addMainLightDirection as x}from"../views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js";import{PhysicallyBasedRenderingParameters as L}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{PiUtils as j}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import{ReadBaseColorTexture as O}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js";import{ReadShadowMapPass as S}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{terrainDepthTest as $}from"../views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js";import{OverlayIM as N}from"../views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js";import{DiscardOrAdjustAlphaDraw as T}from"../views/3d/webgl-engine/core/shaderLibrary/util/DiscardOrAdjustAlpha.glsl.js";import{BooleanDrawUniform as D}from"../views/3d/webgl-engine/core/shaderModules/BooleanDrawUniform.js";import{If as M,glsl as R}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Texture2DBindUniform as P}from"../views/3d/webgl-engine/core/shaderModules/Texture2DBindUniform.js";import{SnowCover as W}from"../views/3d/webgl-engine/effects/weather/SnowCover.glsl.js";import{outputColorHighlightOLID as A}from"../views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js";import{sphereDepthInterpolate as F}from"../views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js";import{ShaderBuilder as U}from"../views/webgl/ShaderBuilder.js";import{alphaCutoff as V}from"../webscene/support/AlphaCutoff.js";function z(z){const B=new U,{vertex:E,fragment:_}=B;B.include(c,z),B.include(g,z),B.include(d,z),B.include(s,z),B.include(i,z),B.include(T,z),_.include(n,z),B.include(O,z),B.include($,z);const{output:I,pbrMode:G,hasNormalTexture:H,snowCover:k,receiveShadows:q,shadeNormals:J,spherical:K,sphericalSR:Q,ellipsoidMode:X,overlayEnabled:Y,componentData:Z,vertexDiscardMode:ee,renderOccluded:oe,isGroundSlice:re}=z,ae=1===G||2===G;ae&&(B.include(L,z),H&&B.include(f,z));const ie=3===I||4===I||5===I,le=ie&&1===Z,te=1===X,ne=1===X?o.radius:te?r.radius:a.radius;Y&&(_.include(b,z),B.include(N,z),E.include(j),E.uniforms.add(new D("useENUForGlobalOverlayUV",e=>e.useENUForGlobalOverlayUV)),_.uniforms.add(new D("useENUForGlobalOverlayUV",e=>e.useENUForGlobalOverlayUV)),E.code.add(`\n ${M(K,`const float invRadius = ${R.float(1/ne)};`)}\n vec2 projectOverlay(vec3 pos) { return pos.xy ${M(K,"/ (1.0 + invRadius * pos.z);")}; }\n `));const se=Y&&t(I)&&4===G;se&&(B.varyings.add("tbnTangent","vec3"),B.varyings.add("tbnBiTangent","vec3"),B.varyings.add("groundNormal","vec3"));const de=0===ee,ge=2===ee,ce=1-1/255;if(B.include(S,z),B.include(l,z),E.main.add(R`
6
6
  bool castShadows;
7
7
  vec4 externalColor = forwardExternalColor(castShadows);
8
8
  ${M(le,"if(!castShadows) { gl_Position = vec4(vec3(1e38), 1.0); return; }")}
@@ -32,7 +32,7 @@ import{radiusModifier as e}from"../geometry/ellipsoidUtils.js";import{earth as o
32
32
  gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
33
33
  return;
34
34
  }
35
- `),t(I))return B.include(p,z),B.include(w,z),B.include(b,z),B.include(A,z),_.include(W,z),_.code.add(R`
35
+ `),t(I))return B.include(p,z),B.include(w,z),_.include(b,z),B.include(A,z),_.include(W,z),_.code.add(R`
36
36
  float evaluateShadow() {
37
37
  return ${q?"readShadowMap(vPositionWorldCameraRelative, linearDepth)":"0.0"};
38
38
  }`),_.main.add(R`
@@ -32,7 +32,7 @@ import{Offset as e}from"../views/3d/webgl-engine/core/shaderLibrary/Offset.glsl.
32
32
  gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
33
33
  }
34
34
  forwardLinearDepthToReadShadowMap();
35
- `),K.include(b,J),Y.include(p,J),K.include(A,J),Y.include(o,J),K.include(G,J),I(Y,J),Y.uniforms.add(X.uniforms.get("localOrigin"),new B("ambient",e=>e.ambient),new B("diffuse",e=>e.diffuse),new k("opacity",e=>e.opacity),new k("layerOpacity",e=>e.layerOpacity)),ce&&Y.uniforms.add(new F("tex",e=>e.texture)),K.include(L,J),Y.include(C,J),Y.include(D),K.include(x,J),Y.include(z,J),f(Y),h(Y),y(Y),Y.main.add(R`
35
+ `),Y.include(b,J),Y.include(p,J),K.include(A,J),Y.include(o,J),K.include(G,J),I(Y,J),Y.uniforms.add(X.uniforms.get("localOrigin"),new B("ambient",e=>e.ambient),new B("diffuse",e=>e.diffuse),new k("opacity",e=>e.opacity),new k("layerOpacity",e=>e.layerOpacity)),ce&&Y.uniforms.add(new F("tex",e=>e.texture)),K.include(L,J),Y.include(C,J),Y.include(D),K.include(x,J),Y.include(z,J),f(Y),h(Y),y(Y),Y.main.add(R`
36
36
  discardBySlice(vpos);
37
37
  discardByTerrainDepth();
38
38
  ${ce?R`