@arcgis/core 5.0.0-next.69 → 5.0.0-next.70

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 (310) hide show
  1. package/Map.d.ts +3 -1
  2. package/analysis/Analysis.d.ts +1 -0
  3. package/analysis/Dimension/types.d.ts +1 -0
  4. package/analysis/DimensionAnalysis.d.ts +10 -10
  5. package/analysis/DimensionSimpleStyle.d.ts +14 -13
  6. package/analysis/DirectLineMeasurementAnalysis.d.ts +1 -1
  7. package/analysis/DistanceMeasurementAnalysis.d.ts +2 -1
  8. package/analysis/ElevationProfile/ElevationProfileLineScene.d.ts +3 -3
  9. package/analysis/ElevationProfile/ElevationProfileLineViewOptions.d.ts +1 -1
  10. package/analysis/ElevationProfile/types.d.ts +2 -0
  11. package/analysis/LengthDimension.d.ts +22 -21
  12. package/analysis/LineOfSightAnalysis.d.ts +2 -2
  13. package/analysis/ShadowCast/MinDurationOptions.d.ts +2 -2
  14. package/analysis/ShadowCast/types.d.ts +6 -2
  15. package/analysis/Slice/types.d.ts +1 -0
  16. package/analysis/Viewshed.d.ts +22 -20
  17. package/analysis/ViewshedAnalysis.d.ts +13 -13
  18. package/analysis/VolumeMeasurement/VolumeMeasurementDisplayUnits.d.ts +1 -2
  19. package/analysis/VolumeMeasurement/VolumeMeasurementInputUnits.d.ts +2 -2
  20. package/analysis/VolumeMeasurement/types.d.ts +1 -0
  21. package/analysis/VolumeMeasurementAnalysis.d.ts +1 -0
  22. package/analysis/types.d.ts +5 -0
  23. package/arcade.d.ts +2 -2
  24. package/assets/esri/core/workers/RemoteClient.js +1 -1
  25. package/assets/esri/core/workers/chunks/04364f3dd7578c2acb71.js +1 -0
  26. package/assets/esri/core/workers/chunks/18ed69d563986dc2eb21.js +1 -0
  27. package/assets/esri/core/workers/chunks/{4c04c54330b693892cfc.js → 1a45b4b4803337f4b99f.js} +2 -2
  28. package/assets/esri/core/workers/chunks/{60c7f896f2246a8aa6d7.js → 244006d4b0547d574401.js} +53 -53
  29. package/assets/esri/core/workers/chunks/329b10897c6965948b84.js +1 -0
  30. package/assets/esri/core/workers/chunks/4387aaf9d5e8f6d1833d.js +1 -0
  31. package/assets/esri/core/workers/chunks/{944dfa9309da8f49a616.js → 6a3d66d7c92f90cc2a17.js} +1 -1
  32. package/assets/esri/core/workers/chunks/760a759f9697adde6dd4.js +1 -0
  33. package/assets/esri/core/workers/chunks/798d227205bd958de6a7.js +1 -0
  34. package/assets/esri/core/workers/chunks/{9d88b4ba8e511da64583.js → 98d68b145226e7527c84.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{8ad6595ad44c2d60c1ce.js → a79fad422d41019c8232.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{10e474d664b20adcd917.js → db4661fd82dc61162115.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{1d1e25bb61eeeee8ee94.js → df2ba5f9d57080fca183.js} +1 -1
  38. package/assets/esri/themes/base/widgets/_UtilityNetworkAssociations.scss +5 -3
  39. package/assets/esri/themes/base/widgets/_UtilityNetworkValidateTopology.scss +15 -11
  40. package/assets/esri/themes/dark/main.css +1 -1
  41. package/assets/esri/themes/light/main.css +1 -1
  42. package/assets/esri/themes/light/view.css +1 -1
  43. package/chunks/ComponentShader.glsl.js +43 -43
  44. package/chunks/DefaultMaterial.glsl.js +1 -1
  45. package/config.js +1 -1
  46. package/form/elements/inputs/attachments/Input.d.ts +6 -6
  47. package/geometry/Mesh.d.ts +20 -21
  48. package/geometry/Polygon.d.ts +1 -8
  49. package/geometry/Polygon.js +1 -1
  50. package/geometry/geometryEngine.d.ts +19 -19
  51. package/geometry/support/MeshComponent.d.ts +3 -3
  52. package/geometry/support/MeshGeoreferencedVertexSpace.d.ts +2 -2
  53. package/geometry/support/MeshLocalVertexSpace.d.ts +2 -2
  54. package/geometry/support/MeshMaterial.d.ts +8 -8
  55. package/geometry/support/MeshMaterialMetallicRoughness.d.ts +1 -1
  56. package/geometry/support/MeshTexture.d.ts +3 -3
  57. package/geometry/support/MeshTextureTransform.d.ts +3 -3
  58. package/geometry/support/MeshTransform.d.ts +1 -1
  59. package/geometry/support/MeshVertexAttributes.d.ts +13 -5
  60. package/geometry/support/intersects.js +1 -1
  61. package/geometry/support/intersectsBase.js +1 -1
  62. package/geometry/support/meshUtils/centerAt.js +1 -1
  63. package/geometry/support/meshUtils/geographicUtils.js +1 -1
  64. package/geometry/support/meshUtils/georeference.js +1 -1
  65. package/geometry/support/meshUtils/rotate.js +1 -1
  66. package/geometry/support/meshUtils/scale.js +1 -1
  67. package/geometry/support/meshUtils/types.d.ts +44 -52
  68. package/geometry/support/meshUtils.d.ts +6 -50
  69. package/geometry/support/meshUtils.js +1 -1
  70. package/interfaces.d.ts +5 -151
  71. package/kernel.js +1 -1
  72. package/layers/BaseDynamicLayer.d.ts +2 -2
  73. package/layers/BaseElevationLayer.d.ts +2 -2
  74. package/layers/BuildingSceneLayer.d.ts +2 -2
  75. package/layers/CSVLayer.d.ts +2 -2
  76. package/layers/CatalogLayer.d.ts +2 -2
  77. package/layers/DimensionLayer.d.ts +2 -2
  78. package/layers/ElevationLayer.d.ts +2 -2
  79. package/layers/FeatureLayer.d.ts +2 -2
  80. package/layers/GeoJSONLayer.d.ts +2 -2
  81. package/layers/GeoRSSLayer.d.ts +2 -2
  82. package/layers/GraphicsLayer.d.ts +2 -2
  83. package/layers/GroupLayer.d.ts +2 -2
  84. package/layers/ImageryLayer.d.ts +2 -2
  85. package/layers/ImageryTileLayer.d.ts +2 -2
  86. package/layers/IntegratedMesh3DTilesLayer.d.ts +2 -2
  87. package/layers/IntegratedMeshLayer.d.ts +2 -2
  88. package/layers/KMLLayer.d.ts +2 -2
  89. package/layers/Layer.d.ts +9 -7
  90. package/layers/LineOfSightLayer.d.ts +3 -3
  91. package/layers/MapImageLayer.d.ts +2 -2
  92. package/layers/MapNotesLayer.d.ts +2 -2
  93. package/layers/MediaLayer.d.ts +2 -2
  94. package/layers/OGCFeatureLayer.d.ts +2 -2
  95. package/layers/OrientedImageryLayer.d.ts +2 -2
  96. package/layers/ParquetLayer.d.ts +2 -2
  97. package/layers/PointCloudLayer.d.ts +2 -2
  98. package/layers/RouteLayer.d.ts +2 -2
  99. package/layers/SceneLayer.d.ts +2 -2
  100. package/layers/SubtypeGroupLayer.d.ts +2 -2
  101. package/layers/TileLayer.d.ts +2 -2
  102. package/layers/UnknownLayer.d.ts +2 -2
  103. package/layers/UnsupportedLayer.d.ts +2 -2
  104. package/layers/VectorTileLayer.d.ts +2 -2
  105. package/layers/VideoLayer.d.ts +2 -2
  106. package/layers/ViewshedLayer.d.ts +2 -2
  107. package/layers/VoxelLayer.d.ts +2 -2
  108. package/layers/WCSLayer.d.ts +2 -2
  109. package/layers/WFSLayer.d.ts +2 -2
  110. package/layers/WMSLayer.d.ts +2 -2
  111. package/layers/WMTSLayer.d.ts +2 -2
  112. package/layers/catalog/CatalogDynamicGroupLayer.d.ts +2 -2
  113. package/layers/catalog/CatalogFootprintLayer.d.ts +2 -2
  114. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +2 -2
  115. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  116. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  117. package/layers/orientedImagery/transformations/utils.js +1 -1
  118. package/layers/raster/types.d.ts +8 -1
  119. package/layers/support/PixelBlock.d.ts +7 -7
  120. package/layers/support/RasterInfo.d.ts +2 -9
  121. package/layers/types.d.ts +77 -2
  122. package/networks/support/CircuitSection.d.ts +20 -2
  123. package/networks/support/CircuitSection.js +1 -1
  124. package/networks/support/Subcircuit.d.ts +12 -10
  125. package/networks/support/Subcircuit.js +1 -1
  126. package/networks/support/typeUtils.d.ts +2 -0
  127. package/networks/support/typeUtils.js +1 -1
  128. package/package.json +2 -2
  129. package/rest/support/AttributeBinsQuery.d.ts +7 -1
  130. package/rest/support/NormalizationBinParametersMixin.d.ts +29 -9
  131. package/support/revision.js +1 -1
  132. package/symbols/patterns/LinePattern3D.d.ts +3 -3
  133. package/symbols/patterns/Pattern3D.d.ts +3 -3
  134. package/unionTypes.d.ts +17 -17
  135. package/views/2d/analysis/AreaMeasurementAnalysisView2D.d.ts +6 -5
  136. package/views/2d/analysis/DistanceMeasurementAnalysisView2D.d.ts +7 -6
  137. package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
  138. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  139. package/views/2d/types.d.ts +1 -1
  140. package/views/3d/analysis/AreaMeasurementAnalysisView3D.d.ts +2 -2
  141. package/views/3d/analysis/DirectLineMeasurement/types.d.ts +1 -0
  142. package/views/3d/analysis/ElevationProfile/ElevationProfileLineSceneComputation.js +1 -1
  143. package/views/3d/analysis/VolumeMeasurement/types.d.ts +1 -0
  144. package/views/3d/analysis/types.d.ts +2 -0
  145. package/views/3d/constraints/Constraints.d.ts +2 -2
  146. package/views/3d/environment/ChapmanApproximation.glsl.js +1 -1
  147. package/views/3d/environment/CloudsComposition.js +1 -1
  148. package/views/3d/environment/Fog.js +1 -1
  149. package/views/3d/layers/DimensionLayerView3D.js +1 -1
  150. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  151. package/views/3d/layers/I3SMeshView3D.js +1 -1
  152. package/views/3d/layers/ImageryLayerView3D.js +1 -1
  153. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  154. package/views/3d/layers/LineOfSightLayerView3D.js +1 -1
  155. package/views/3d/layers/ViewshedLayerView3D.js +1 -1
  156. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  157. package/views/3d/support/LayerPerformanceInfo.d.ts +1 -1
  158. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  159. package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
  160. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  161. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  162. package/views/3d/webgl-engine/collections/Component/Material/ComponentShader.glsl.js +1 -1
  163. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  164. package/views/3d/webgl-engine/collections/Component/SourceGeometry.js +1 -1
  165. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  166. package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepthToWriteShadowMap.glsl.js +1 -1
  167. package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +1 -1
  168. package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +3 -3
  169. package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js +7 -7
  170. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
  171. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  172. package/views/3d/webgl-engine/materials/DefaultTechniqueConfiguration.js +1 -1
  173. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  174. package/views/3d/webgl-engine/materials/ViewingModeConfiguration.js +5 -0
  175. package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +2 -2
  176. package/views/BreakpointsOwner.d.ts +9 -10
  177. package/views/MapView.d.ts +18 -17
  178. package/views/SceneView.d.ts +30 -89
  179. package/views/SceneView.js +1 -1
  180. package/views/View2D.d.ts +0 -37
  181. package/views/View2D.js +1 -1
  182. package/views/ViewAnimation.d.ts +2 -3
  183. package/views/analysis/ElevationProfile/types.d.ts +7 -6
  184. package/views/analysis/types.d.ts +1 -0
  185. package/views/animation/types.d.ts +3 -1
  186. package/views/layers/DimensionLayerView.d.ts +97 -4
  187. package/views/layers/DimensionLayerView.js +1 -1
  188. package/views/layers/HighlightLayerViewMixin.d.ts +1 -59
  189. package/views/layers/HighlightLayerViewMixin.js +1 -1
  190. package/views/layers/ImageryLayerViewMixin.d.ts +1 -55
  191. package/views/layers/LineOfSightLayerView.d.ts +77 -4
  192. package/views/layers/LineOfSightLayerView.js +1 -1
  193. package/views/layers/ViewshedLayerView.d.ts +96 -5
  194. package/views/layers/ViewshedLayerView.js +1 -1
  195. package/views/navigation/Navigation.d.ts +1 -22
  196. package/views/navigation/Navigation.js +1 -1
  197. package/views/support/Scheduler.js +1 -1
  198. package/views/types.d.ts +75 -5
  199. package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.d.ts +4 -4
  200. package/widgets/AreaMeasurement3D.d.ts +2 -2
  201. package/widgets/BasemapGallery.d.ts +1 -1
  202. package/widgets/BasemapToggle.d.ts +1 -1
  203. package/widgets/Bookmarks.d.ts +1 -1
  204. package/widgets/BuildingExplorer/BuildingExplorerViewModel.d.ts +2 -2
  205. package/widgets/BuildingExplorer/BuildingLevel.d.ts +2 -2
  206. package/widgets/BuildingExplorer/BuildingNumericFilterViewModel.d.ts +2 -2
  207. package/widgets/BuildingExplorer/BuildingPhase.d.ts +2 -2
  208. package/widgets/BuildingExplorer.d.ts +3 -3
  209. package/widgets/Compass.d.ts +1 -1
  210. package/widgets/CoordinateConversion.d.ts +1 -1
  211. package/widgets/Daylight/DaylightViewModel.d.ts +3 -3
  212. package/widgets/Daylight/VisibleElements.d.ts +2 -2
  213. package/widgets/Daylight/types.d.ts +2 -2
  214. package/widgets/Daylight.d.ts +3 -3
  215. package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.d.ts +4 -4
  216. package/widgets/DirectLineMeasurement3D.d.ts +2 -2
  217. package/widgets/DirectionalPad.d.ts +1 -1
  218. package/widgets/ElevationProfile/ElevationProfileLine.d.ts +2 -2
  219. package/widgets/ElevationProfile/ElevationProfileLineGround.d.ts +2 -2
  220. package/widgets/ElevationProfile/ElevationProfileLineInput.d.ts +2 -2
  221. package/widgets/ElevationProfile/ElevationProfileLineQuery.d.ts +2 -2
  222. package/widgets/ElevationProfile/ElevationProfileLineView.d.ts +3 -3
  223. package/widgets/ElevationProfile/ElevationProfileViewModel.d.ts +2 -2
  224. package/widgets/ElevationProfile/ElevationProfileVisibleElements.d.ts +2 -2
  225. package/widgets/ElevationProfile/types.d.ts +9 -9
  226. package/widgets/ElevationProfile.d.ts +2 -2
  227. package/widgets/Expand/ExpandViewModel.d.ts +1 -1
  228. package/widgets/Expand.d.ts +1 -1
  229. package/widgets/Feature.d.ts +1 -1
  230. package/widgets/FeatureTable/FeatureTableViewModel.d.ts +1 -1
  231. package/widgets/Features.d.ts +1 -1
  232. package/widgets/Fullscreen/FullscreenViewModel.d.ts +1 -1
  233. package/widgets/Fullscreen.d.ts +1 -1
  234. package/widgets/Home.d.ts +1 -1
  235. package/widgets/LayerList.d.ts +12 -0
  236. package/widgets/Legend.d.ts +1 -1
  237. package/widgets/LineOfSight/LineOfSightTarget.d.ts +2 -2
  238. package/widgets/LineOfSight/LineOfSightViewModel.d.ts +2 -2
  239. package/widgets/LineOfSight.d.ts +2 -2
  240. package/widgets/Locate/LocateViewModel.d.ts +1 -1
  241. package/widgets/Locate.d.ts +1 -1
  242. package/widgets/NavigationToggle/NavigationToggleViewModel.d.ts +1 -1
  243. package/widgets/NavigationToggle.d.ts +1 -1
  244. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  245. package/widgets/OrientedImageryViewer/components/Arrow.js +1 -1
  246. package/widgets/OrientedImageryViewer/components/ImageViewer.js +1 -1
  247. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  248. package/widgets/OrientedImageryViewer/components/NavigationNode.js +1 -1
  249. package/widgets/OrientedImageryViewer/components/NavigationUI360.js +1 -1
  250. package/widgets/OrientedImageryViewer/components/NavigationUIPanoramicViewModel.js +1 -1
  251. package/widgets/OrientedImageryViewer/components/NavigationUIViewModel.js +1 -1
  252. package/widgets/OrientedImageryViewer/components/SequentialNavigationUI.js +1 -1
  253. package/widgets/OrientedImageryViewer/constants.js +1 -1
  254. package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +1 -1
  255. package/widgets/OrientedImageryViewer/navigation/NavigationManagerPanoramic.js +1 -1
  256. package/widgets/OrientedImageryViewer/navigation/utils.js +1 -1
  257. package/widgets/OrientedImageryViewer/support/MediaPrefetcher.js +5 -0
  258. package/widgets/OrientedImageryViewer/support/NonPanoramicMedia.js +1 -1
  259. package/widgets/OrientedImageryViewer/support/NonPanoramicMediaCollection.js +1 -1
  260. package/widgets/OrientedImageryViewer/support/resolveMediaProps.js +5 -0
  261. package/widgets/OrientedImageryViewer/utils.js +1 -1
  262. package/widgets/OrientedImageryViewer.js +1 -1
  263. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  264. package/widgets/PanoramicViewer.js +1 -1
  265. package/widgets/Print/CustomTemplate.d.ts +1 -1
  266. package/widgets/Print/PrintViewModel.d.ts +1 -1
  267. package/widgets/Print.d.ts +1 -1
  268. package/widgets/ScaleBar.d.ts +1 -1
  269. package/widgets/Search.d.ts +1 -1
  270. package/widgets/ShadowCast/DiscreteOptions.d.ts +2 -2
  271. package/widgets/ShadowCast/DurationOptions.d.ts +2 -2
  272. package/widgets/ShadowCast/ShadowCastViewModel.d.ts +3 -3
  273. package/widgets/ShadowCast/ShadowCastVisibleElements.d.ts +2 -2
  274. package/widgets/ShadowCast/ThresholdOptions.d.ts +2 -2
  275. package/widgets/ShadowCast/types.d.ts +2 -2
  276. package/widgets/ShadowCast.d.ts +1 -1
  277. package/widgets/Slice/SliceViewModel.d.ts +2 -2
  278. package/widgets/Slice.d.ts +2 -2
  279. package/widgets/Swipe.d.ts +1 -1
  280. package/widgets/TimeZoneLabel.d.ts +1 -1
  281. package/widgets/Track.d.ts +1 -1
  282. package/widgets/UtilityNetworkValidateTopology.js +1 -1
  283. package/widgets/VideoPlayer.d.ts +1 -1
  284. package/widgets/VideoPlayer.js +1 -1
  285. package/widgets/Weather/VisibleElements.d.ts +2 -2
  286. package/widgets/Weather/WeatherViewModel.d.ts +2 -2
  287. package/widgets/Weather/types.d.ts +1 -1
  288. package/widgets/Weather.d.ts +2 -2
  289. package/widgets/Zoom.d.ts +1 -1
  290. package/widgets/support/GridControls.d.ts +1 -1
  291. package/assets/esri/core/workers/chunks/35961e71f69ae1d24b9e.js +0 -1
  292. package/assets/esri/core/workers/chunks/3cce8e894bf37c3e598e.js +0 -1
  293. package/assets/esri/core/workers/chunks/7ee68f67f9cc48a328f0.js +0 -1
  294. package/assets/esri/core/workers/chunks/a931515a2569713e743b.js +0 -1
  295. package/assets/esri/core/workers/chunks/bb4574a87ca21e719f0d.js +0 -1
  296. package/assets/esri/core/workers/chunks/c9f868f85d740ee32715.js +0 -1
  297. package/geometry.d.ts +0 -136
  298. package/geometry.js +0 -5
  299. package/pointCloudRenderers.d.ts +0 -112
  300. package/pointCloudRenderers.js +0 -5
  301. package/rasterRenderers.d.ts +0 -151
  302. package/rasterRenderers.js +0 -5
  303. package/renderers.d.ts +0 -166
  304. package/renderers.js +0 -5
  305. package/views/layers/DimensionLayerViewMixin.d.ts +0 -1
  306. package/views/layers/DimensionLayerViewMixin.js +0 -5
  307. package/views/layers/LineOfSightLayerViewMixin.d.ts +0 -1
  308. package/views/layers/LineOfSightLayerViewMixin.js +0 -5
  309. package/views/layers/ViewshedLayerViewMixin.d.ts +0 -98
  310. package/views/layers/ViewshedLayerViewMixin.js +0 -5
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3693],{3693:(e,t,n)=>{n.r(t),n.d(t,{registerFunctions:()=>Se});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.a3)(),(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.a3)(),(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 P 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 q=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.lastUnit=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,"lastUnit",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.fromLastUnit?new oe({globalId:t.fromGlobalId,networkSourceId:t.fromNetworkSourceId,terminalId:t.fromTerminalId,firstUnit:t.fromFirstUnit,lastUnit:t.fromLastUnit}):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.fromLastUnit=n.lastUnit}}readToNetworkElement(e,t){return t.toFirstUnit||t.toLastUnit?new oe({globalId:t.toGlobalId,networkSourceId:t.toNetworkSourceId,terminalId:t.toTerminalId,firstUnit:t.toFirstUnit,lastUnit:t.toLastUnit}):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.toLastUnit=n.lastUnit}}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.lastUnit===t.lastUnit}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},fromLastUnit:{type:Number}}},read:{source:["fromGlobalId","fromNetworkSourceId","fromTerminalId","fromFirstUnit","fromLastUnit"]}}})],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},toLastUnit:{type:Number}}},read:{source:["toGlobalId","toNetworkSourceId","toTerminalId","toFirstUnit","toLastUnit"]}}})],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);const ce=de;let fe=class extends re.o{constructor(e){super(e),this.associations=[]}};function pe(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:[ce],json:{write:!0}})],fe.prototype,"associations",void 0),fe=(0,ne.Cg)([(0,ie.$K)("esri.rest.networks.support.QueryAssociationsResult")],fe);var he,me=n(56507);let ye=he=class extends re.o{static from(e){return(0,me.PZ)(he,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}})],ye.prototype,"returnDeletes",void 0),(0,ne.Cg)([(0,ie.MZ)({type:[se],json:{write:!0}})],ye.prototype,"elements",void 0),(0,ne.Cg)([(0,ie.MZ)({type:[ee.apiValues],json:{type:ee.jsonValues,read:ee.read,write:ee.write}})],ye.prototype,"types",void 0),(0,ne.Cg)([(0,ie.MZ)({type:String,json:{write:!0}})],ye.prototype,"gdbVersion",void 0),(0,ne.Cg)([(0,ie.MZ)({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.moment=e?.getTime()}}}})],ye.prototype,"moment",void 0),ye=he=(0,ne.Cg)([(0,ie.$K)("esri.rest.networks.support.QueryAssociationsParameters")],ye);var ge=n(54218);function we(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 Ie(e,t,n=null){for(const n in e)if(n.toLowerCase()===t.toLowerCase())return e[n];return n}function Fe(e){if(null===e)return null;const t={type:Ie(e,"type",""),name:Ie(e,"name","")};if("range"===t.type)t.range=Ie(e,"range",[]);else{t.codedValues=[];for(const n of Ie(e,"codedValues",[]))t.codedValues.push({name:Ie(n,"name",""),code:Ie(n,"code",null)})}return t}function Ae(e){if(null===e)return null;const t={},n=Ie(e,"wkt");null!==n&&(t.wkt=n);const r=Ie(e,"wkid");return null!==r&&(t.wkid=r),t}function be(e){if(null===e)return null;const t={hasZ:Ie(e,"hasz",!1),hasM:Ie(e,"hasm",!1)},n=Ie(e,"spatialreference");null!=n&&(t.spatialReference=Ae(n));const r=Ie(e,"x",null);if(null!==r)return t.x=r,t.y=Ie(e,"y",null),t.hasZ&&(t.z=Ie(e,"z",null)),t.hasM&&(t.m=Ie(e,"m",null)),t;const i=Ie(e,"rings",null);if(null!==i)return t.rings=i,t;const a=Ie(e,"paths",null);if(null!==a)return t.paths=a,t;const s=Ie(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=Ie(e,n,null);null!==r&&(t[n]=r)}return t}function Ne(e){return"utc"===e?.toLowerCase()?"UTC":"unknown"===e?.toLowerCase()?"Unknown":e}function Se(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?Ne("unknown"):Ne(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,ge.Kg)(e))throw new l.D$(t,"InvalidParameter",n);switch((0,f.s)(e).toLowerCase()){case"preferredtimezone":return Ne(a[0].preferredTimeZone);case"editfieldsinfo":return Ne(a[0].editFieldsInfo?.timeZone??null);case"timeinfo":return Ne(a[0].timeInfo?.timeZone??null);case"field":if(a[1].hasField("fieldname")&&(0,ge.Kg)(a[1].field("fieldname")))return Ne(a[0].fieldTimeZone((0,f.s)(a[1].field("fieldname"))))}throw new l.D$(t,"InvalidParameter",n)}const o=(0,f.P)(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.s)(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.s)(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.s)(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,ge.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.s)(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.s)(i[1]),r=(0,f.s)(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,ge.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,ge.Kg)(i[0]))throw new l.D$(t,"PortalRequired",n);const s=(0,f.s)(i[0]),o=(0,f.s)(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,ge.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.s)(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,ge.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,ge.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=Ie(e,"layerdefinition");if(null!==r){a.layerDefinition.geometryType=Ie(r,"geometrytype",""),a.featureSet.geometryType=a.layerDefinition.geometryType,a.layerDefinition.globalIdField=Ie(r,"globalidfield",""),a.layerDefinition.objectIdField=Ie(r,"objectidfield",""),a.layerDefinition.typeIdField=Ie(r,"typeidfield",""),a.layerDefinition.hasZ=!0===Ie(r,"hasz",!1),a.layerDefinition.hasM=!0===Ie(r,"hasm",!1);const t=Ie(r,"spatialreference");t&&(a.layerDefinition.spatialReference=Ae(t));const n=[];for(const e of Ie(r,"fields",[])){const t={name:Ie(e,"name",""),alias:Ie(e,"alias",""),type:Ie(e,"type",""),nullable:Ie(e,"nullable",!0),editable:Ie(e,"editable",!0),length:Ie(e,"length",null),domain:Fe(Ie(e,"domain"))};n.push(t)}a.layerDefinition.fields=n;const i=Ie(e,"featureset");if(i){const e={};for(const t of n)e[t.name.toLowerCase()]=t.name;for(const t of Ie(i,"features",[])){const n={},r=Ie(t,"attributes",{});for(const t in r)n[e[t.toLowerCase()]]=r[t];a.featureSet.features.push({attributes:n,geometry:be(Ie(t,"geometry"))})}}}else{a.layerDefinition.hasZ=!0===Ie(e,"hasz",!1),a.layerDefinition.hasM=!0===Ie(e,"hasm",!1),a.layerDefinition.geometryType=Ie(e,"geometrytype",""),a.featureSet.geometryType=a.layerDefinition.geometryType,a.layerDefinition.objectIdField=Ie(e,"objectidfieldname",""),a.layerDefinition.typeIdField=Ie(e,"typeidfieldname","");const r=Ie(e,"spatialreference");r&&(a.layerDefinition.spatialReference=Ae(r));const i=[],s=Ie(e,"fields",null);if(!(0,ge.cy)(s))throw new l.D$(t,"InvalidParameter",n);for(const e of s){const t={name:Ie(e,"name",""),alias:Ie(e,"alias",""),type:Ie(e,"type",""),nullable:Ie(e,"nullable",!0),editable:Ie(e,"editable",!0),length:Ie(e,"length",null),domain:Fe(Ie(e,"domain"))};i.push(t)}a.layerDefinition.fields=i;const o={};for(const e of i)o[e.name.toLowerCase()]=e.name;let u=Ie(e,"features",null);if((0,ge.cy)(u))for(const e of u){const t={},n=Ie(e,"attributes",{});for(const e in n)t[o[e.toLowerCase()]]=n[e];a.featureSet.features.push({attributes:t,geometry:be(Ie(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,ge.cy)(e.layerDefinition.fields)&&!1!==(0,ge.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,ge.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 P({parentfeatureset:i[0],topnum:i[1]});if((0,ge.cy)(i[0]))return(0,f.r)(i[1])>=i[0].length?i[0].slice():i[0].slice(0,(0,f.r)(i[1]));if((0,f.j)(i[0]))return(0,f.r)(i[1])>=i[0].length()?i[0].slice():i[0].slice(0,(0,f.r)(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,ge.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.r)(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.r)(i[1].field("maxsize"))),i[1].hasField("types")){const e=(0,f.N)(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.s)(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,ge.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 q.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.s)((0,f.J)(a[1],""))),c=(0,ge.Kg)(a[2])?(0,f.s)(a[2]):null;if(null===a[0])return null;if(!(0,f.k)(a[0]))throw new l.D$(t,"InvalidParameter",n);const p=s._layer;let h;if((0,f.m)(p))h=p;else{if(null==p||!(0,g.eB)(p))return null;h=(0,d.constructFeatureSet)(p,t.spatialReference,["*"],!0,t.lrucache,t.interceptor)}await h.load();const m=h.serviceUrl(),y=await(0,d.constructAssociationMetaDataFeatureSetFromUrl)(m,t.spatialReference,!0);if(y.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={...pe(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=fe.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 ye({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)}(h,s,u,c,y,t,n);const w=y.associations;if(null==w)return null;let I=null,A=null,C=!1;if(null!==c&&""!==c&&void 0!==c){for(const e of y.terminals)e.terminalName===c&&(A=e.terminalId);null===A&&(C=!0)}const v=w.getFieldsIndex(),x=v.get("TOGLOBALID").name,D=v.get("FROMGLOBALID").name,E=v.get("TOTERMINALID").name,k=v.get("FROMTERMINALID").name,L=v.get("FROMNETWORKSOURCEID").name,U=v.get("TONETWORKSOURCEID").name,$=v.get("ASSOCIATIONTYPE").name,j=v.get("ISCONTENTVISIBLE").name,Z=v.get("OBJECTID").name;for(const e of h.fields)if("global-id"===e.type){I=s.field(e.name);break}let M=null,W=new T(new B.A({name:"percentalong",alias:"percentalong",type:"double"}),F.A.create("0",{fieldsIndex:w.getFieldsIndex(),timeZone:w.dateFieldsTimeZoneDefaultUTC})),R=new T(new B.A({name:"side",alias:"side",type:"string"}),F.A.create("''",{fieldsIndex:w.getFieldsIndex(),timeZone:w.dateFieldsTimeZoneDefaultUTC}));const P="globalid",q="globalId",O={};for(const e in y.lkp)O[e]=y.lkp[e].sourceId;const V=new S(new B.A({name:"classname",alias:"classname",type:"string"}),null,O);let G="";switch(u){case"midspan":{G=`((${x}='${I}') OR ( ${D}='${I}')) AND (${$} IN (5))`,V.codefield=F.A.create(`CASE WHEN (${x}='${I}') THEN ${L} ELSE ${U} END`,{fieldsIndex:w.getFieldsIndex(),timeZone:w.dateFieldsTimeZoneDefaultUTC});const e=(0,g.ke)(_.findField(w.fields,D));e.name=P,e.alias=P,M=new T(e,F.A.create(`CASE WHEN (${D}='${I}') THEN ${x} ELSE ${D} END`,{fieldsIndex:w.getFieldsIndex(),timeZone:w.dateFieldsTimeZoneDefaultUTC})),W=y.unVersion>=4?new b(_.findField(w.fields,v.get("PERCENTALONG").name)):new T(new B.A({name:"percentalong",alias:"percentalong",type:"double"}),F.A.create("0",{fieldsIndex:w.getFieldsIndex(),timeZone:w.dateFieldsTimeZoneDefaultUTC}));break}case"junctionedge":{G=`((${x}='${I}') OR ( ${D}='${I}')) AND (${$} IN (4,6))`,V.codefield=F.A.create(`CASE WHEN (${x}='${I}') THEN ${L} ELSE ${U} END`,{fieldsIndex:w.getFieldsIndex(),timeZone:w.dateFieldsTimeZoneDefaultUTC});const e=(0,g.ke)(_.findField(w.fields,D));e.name=P,e.alias=P,M=new T(e,F.A.create(`CASE WHEN (${D}='${I}') THEN ${x} ELSE ${D} END`,{fieldsIndex:w.getFieldsIndex(),timeZone:w.dateFieldsTimeZoneDefaultUTC})),R=new T(new B.A({name:"side",alias:"side",type:"string"}),F.A.create(`CASE WHEN (${$}=4) THEN 'from' ELSE 'to' END`,{fieldsIndex:w.getFieldsIndex(),timeZone:w.dateFieldsTimeZoneDefaultUTC}));break}case"connected":{let e=`${x}='@T'`,t=`${D}='@T'`;null!==A&&(e+=` AND ${E}=@A`,t+=` AND ${k}=@A`),G="(("+e+") OR ("+t+"))",G=(0,f.$)(G,"@T",I??""),e=(0,f.$)(e,"@T",I??""),null!==A&&(e=(0,f.$)(e,"@A",A.toString()),G=(0,f.$)(G,"@A",A.toString())),V.codefield=F.A.create("CASE WHEN "+e+` THEN ${L} ELSE ${U} END`,{fieldsIndex:w.getFieldsIndex(),timeZone:w.dateFieldsTimeZoneDefaultUTC});const n=(0,g.ke)(_.findField(w.fields,D));n.name=P,n.alias=P,M=new T(n,F.A.create("CASE WHEN "+e+` THEN ${D} ELSE ${x} END`,{fieldsIndex:w.getFieldsIndex(),timeZone:w.dateFieldsTimeZoneDefaultUTC}));break}case"container":G=`${x}='${I}' AND ${$} = 2`,null!==A&&(G+=` AND ${E} = `+A.toString()),V.codefield=L,G="( "+G+" )",M=new N(_.findField(w.fields,D),P,P);break;case"content":G=`(${D}='${I}' AND ${$} = 2)`,null!==A&&(G+=` AND ${k} = `+A.toString()),V.codefield=U,G="( "+G+" )",M=new N(_.findField(w.fields,x),P,P);break;case"structure":G=`(${x}='${I}' AND ${$} = 3)`,null!==A&&(G+=` AND ${E} = `+A.toString()),V.codefield=L,G="( "+G+" )",M=new N(_.findField(w.fields,D),P,q);break;case"attached":G=`(${D}='${I}' AND ${$} = 3)`,null!==A&&(G+=` AND ${k} = `+A.toString()),V.codefield=U,G="( "+G+" )",M=new N(_.findField(w.fields,x),P,q);break;default:throw new l.D$(t,"InvalidParameter",n)}return C&&(G="1 <> 1"),new _({parentfeatureset:w,adaptedFields:[new b(_.findField(w.fields,Z)),new b(_.findField(w.fields,j)),M,R,V,W],extraFilter:G?F.A.create(G,{fieldsIndex:w.getFieldsIndex(),timeZone:w.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,ge.Kg)(a[1]))p.push(a[1]);else if(a[1]instanceof s.A)p.push(a[1]);else if((0,ge.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,ge.Kg)(e)){const t=F.A.create((0,f.s)(e),{fieldsIndex:o.getFieldsIndex(),timeZone:o.dateFieldsTimeZoneDefaultUTC}),n=!0===(0,w.DA)(t)?(0,f.s)(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,ge.Kg)(a[2]))p.push(a[2]);else if((0,ge.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,ge.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)we(n.expression,e,t);for(const n of d)we(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,ge.Kg)(a[1]))o.push(a[1]);else if(a[1]instanceof s.A)o.push(a[1]);else if((0,ge.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,ge.Kg)(e)){const t=F.A.create((0,f.s)(e),{fieldsIndex:r.getFieldsIndex(),timeZone:r.dateFieldsTimeZoneDefaultUTC}),n=!0===(0,w.DA)(t)?(0,f.s)(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)we(n.expression,e,t);return new W({parentfeatureset:a[0],groupbyfields:i,statsfields:[]})}return function(e){if(1===e.length){if((0,ge.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,ge.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[]}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8902],{5443:(t,n,i)=>{i.d(n,{A:()=>y});var e,r=i(31635),s=i(799),m=i(91429),a=i(91075),h=i(86738),o=i(16930),x=i(94078),u=i(12176),l=i(21325),c=i(28735);function f(t,n,i){return null==n?i:null==i?n:t(n,i)}let y=e=class extends a.A{constructor(...t){super(...t),this.type="extent",this.xmin=0,this.ymin=0,this.mmin=void 0,this.zmin=void 0,this.xmax=0,this.ymax=0,this.mmax=void 0,this.zmax=void 0}normalizeCtorArgs(t,n,i,e,r){return function(t){return t&&("esri.geometry.SpatialReference"===t.declaredClass||null!=t.wkid)}(t)?{spatialReference:t,xmin:0,ymin:0,xmax:0,ymax:0}:"object"==typeof t?(t.spatialReference=null==t.spatialReference?o.A.WGS84:t.spatialReference,t):{xmin:t,ymin:n,xmax:i,ymax:e,spatialReference:r??o.A.WGS84}}static fromPoint(t){return new e({xmin:t.x,ymin:t.y,zmin:t.z,xmax:t.x,ymax:t.y,zmax:t.z,spatialReference:t.spatialReference})}get cache(){return this.commitProperty("xmin"),this.commitProperty("ymin"),this.commitProperty("zmin"),this.commitProperty("mmin"),this.commitProperty("xmax"),this.commitProperty("ymax"),this.commitProperty("zmax"),this.commitProperty("mmax"),this.commitProperty("spatialReference"),{}}get center(){const t=new h.A({x:.5*(this.xmin+this.xmax),y:.5*(this.ymin+this.ymax),spatialReference:this.spatialReference});return this.hasZ&&(t.z=.5*(this.zmin+this.zmax)),this.hasM&&(t.m=.5*(this.mmin+this.mmax)),t}get extent(){return this.clone()}get hasM(){return null!=this.mmin&&null!=this.mmax}get hasZ(){return null!=this.zmin&&null!=this.zmax}get height(){return Math.abs(this.ymax-this.ymin)}get width(){return Math.abs(this.xmax-this.xmin)}centerAt(t){const n=this.center;return null!=t.z&&this.hasZ?this.offset(t.x-n.x,t.y-n.y,t.z-n.z):this.offset(t.x-n.x,t.y-n.y)}clone(){const t=new e;return t.xmin=this.xmin,t.ymin=this.ymin,t.xmax=this.xmax,t.ymax=this.ymax,t.spatialReference=this.spatialReference,null!=this.zmin&&(t.zmin=this.zmin,t.zmax=this.zmax),null!=this.mmin&&(t.mmin=this.mmin,t.mmax=this.mmax),t}contains(t){if(!t)return!1;const n=this.spatialReference,i=t.spatialReference;return n&&i&&!n.equals(i)&&(0,c.y7)(n,i)&&(t=n.isWebMercator?(0,c.Gh)(t):(0,c.ci)(t,!0)),"point"===t.type?(0,x.qz)(this,t):"extent"===t.type&&(0,x.gH)(this,t)}equals(t){if(this===t)return!0;if(null==t)return!1;const n=this.spatialReference,i=t.spatialReference;return n&&i&&!n.equals(i)&&(0,c.y7)(n,i)&&(t=n.isWebMercator?(0,c.Gh)(t):(0,c.ci)(t,!0)),this.xmin===t.xmin&&this.ymin===t.ymin&&this.zmin===t.zmin&&this.mmin===t.mmin&&this.xmax===t.xmax&&this.ymax===t.ymax&&this.zmax===t.zmax&&this.mmax===t.mmax}expand(t){const n=.5*(1-t),i=this.width*n,e=this.height*n;if(this.xmin+=i,this.ymin+=e,this.xmax-=i,this.ymax-=e,this.hasZ){const t=(this.zmax-this.zmin)*n;this.zmin+=t,this.zmax-=t}if(this.hasM){const t=(this.mmax-this.mmin)*n;this.mmin+=t,this.mmax-=t}return this}intersects(t){if(null==t)return!1;"mesh"===t.type&&(t=t.extent);const n=this.spatialReference,i=t.spatialReference;return n&&i&&!(0,l.aI)(n,i)&&(0,c.y7)(n,i)&&(t=n.isWebMercator?(0,c.Gh)(t):(0,c.ci)(t,!0)),(0,u.xK)(t.type)(this,t)}normalize(){const t=this._normalize(!1,!0);return Array.isArray(t)?t:[t]}offset(t,n,i){return this.xmin+=t,this.ymin+=n,this.xmax+=t,this.ymax+=n,null!=i&&(this.zmin+=i,this.zmax+=i),this}shiftCentralMeridian(){return this._normalize(!0)}union(t){return this===t||(this.xmin=Math.min(this.xmin,t.xmin),this.ymin=Math.min(this.ymin,t.ymin),this.xmax=Math.max(this.xmax,t.xmax),this.ymax=Math.max(this.ymax,t.ymax),(this.hasZ||t.hasZ)&&(this.zmin=f(Math.min,this.zmin,t.zmin),this.zmax=f(Math.max,this.zmax,t.zmax)),(this.hasM||t.hasM)&&(this.mmin=f(Math.min,this.mmin,t.mmin),this.mmax=f(Math.max,this.mmax,t.mmax))),this}intersection(t){return this===t?this:null!=t&&this.intersects(t)?(this.xmin=Math.max(this.xmin,t.xmin),this.ymin=Math.max(this.ymin,t.ymin),this.xmax=Math.min(this.xmax,t.xmax),this.ymax=Math.min(this.ymax,t.ymax),(this.hasZ||t.hasZ)&&(this.zmin=f(Math.max,this.zmin,t.zmin),this.zmax=f(Math.min,this.zmax,t.zmax)),(this.hasM||t.hasM)&&(this.mmin=f(Math.max,this.mmin,t.mmin),this.mmax=f(Math.min,this.mmax,t.mmax)),this):null}toJSON(t){return this.write({},t)}_shiftCM(t=(0,l.Vp)(this.spatialReference)){if(!t||!this.spatialReference)return this;const n=this.spatialReference,i=this._getCM(t);if(i){const e=n.isWebMercator?(0,c.ci)(i):i;this.xmin-=i.x,this.xmax-=i.x,n.isWebMercator||(e.x=p(e.x,t).x),this.spatialReference=new o.A((0,s.HC)((n.isWGS84?t.altTemplate:null)??t.wkTemplate,{Central_Meridian:e.x}))}return this}_getCM(t){let n=null;const[i,e]=t.valid,r=this.xmin,s=this.xmax;return r>=i&&r<=e&&s>=i&&s<=e||(n=this.center),n}_normalize(t,n,i){const e=this.spatialReference;if(!e)return this;const r=i??(0,l.Vp)(e);if(null==r)return this;const s=this._getParts(r).map(t=>t.extent);if(s.length<2)return s[0]||this;if(s.length>2)return t?this._shiftCM(r):this.set({xmin:r.valid[0],xmax:r.valid[1]});if(t)return this._shiftCM(r);if(n)return s;let m=!0,a=!0;return s.forEach(t=>{t.hasZ||(m=!1),t.hasM||(a=!1)}),{rings:s.map(t=>{const n=[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]];if(m){const i=(t.zmax-t.zmin)/2;for(let t=0;t<n.length;t++)n[t].push(i)}if(a){const i=(t.mmax-t.mmin)/2;for(let t=0;t<n.length;t++)n[t].push(i)}return n}),hasZ:m,hasM:a,spatialReference:e}}_getParts(t){let n=this.cache._parts;if(!n){n=[];const{ymin:i,ymax:r,spatialReference:s}=this,m=this.width,a=this.xmin,h=this.xmax;let o;t=t||(0,l.Vp)(s);const[x,u]=t.valid;o=p(this.xmin,t);const c=o.x,f=o.frameId;o=p(this.xmax,t);const y=o.x,M=o.frameId,g=c===y&&m>0;if(m>2*u){const t=new e(a<h?c:y,i,u,r,s),m=new e(x,i,a<h?y:c,r,s),o=new e(0,i,u,r,s),l=new e(x,i,0,r,s),p=[],g=[];t.contains(o)&&p.push(f),t.contains(l)&&g.push(f),m.contains(o)&&p.push(M),m.contains(l)&&g.push(M);for(let t=f+1;t<M;t++)p.push(t),g.push(t);n.push({extent:t,frameIds:[f]},{extent:m,frameIds:[M]},{extent:o,frameIds:p},{extent:l,frameIds:g})}else c>y||g?n.push({extent:new e(c,i,u,r,s),frameIds:[f]},{extent:new e(x,i,y,r,s),frameIds:[M]}):n.push({extent:new e(c,i,y,r,s),frameIds:[f]});this.cache._parts=n}const i=this.hasZ,r=this.hasM;if(i||r){const t={};i&&(t.zmin=this.zmin,t.zmax=this.zmax),r&&(t.mmin=this.mmin,t.mmax=this.mmax);for(let i=0;i<n.length;i++)n[i].extent.set(t)}return n}};function p(t,n){const[i,e]=n.valid,r=2*e;let s,m=0;return t>e?(s=Math.ceil(Math.abs(t-e)/r),t-=s*r,m=s):t<i&&(s=Math.ceil(Math.abs(t-i)/r),t+=s*r,m=-s),{x:t,frameId:m}}(0,r.Cg)([(0,m.MZ)({readOnly:!0})],y.prototype,"cache",null),(0,r.Cg)([(0,m.MZ)({readOnly:!0})],y.prototype,"center",null),(0,r.Cg)([(0,m.MZ)({readOnly:!0})],y.prototype,"extent",null),(0,r.Cg)([(0,m.MZ)({readOnly:!0,json:{write:{enabled:!1,overridePolicy:null}}})],y.prototype,"hasM",null),(0,r.Cg)([(0,m.MZ)({readOnly:!0,json:{write:{enabled:!1,overridePolicy:null}}})],y.prototype,"hasZ",null),(0,r.Cg)([(0,m.MZ)({readOnly:!0})],y.prototype,"height",null),(0,r.Cg)([(0,m.MZ)({type:o.A,json:{write:!0},value:o.A.WGS84})],y.prototype,"spatialReference",void 0),(0,r.Cg)([(0,m.MZ)({readOnly:!0})],y.prototype,"width",null),(0,r.Cg)([(0,m.MZ)({type:Number,json:{type:[Number,String],write:{enabled:!0,allowNull:!0}}})],y.prototype,"xmin",void 0),(0,r.Cg)([(0,m.MZ)({type:Number,json:{write:!0}})],y.prototype,"ymin",void 0),(0,r.Cg)([(0,m.MZ)({type:Number,json:{origins:{"web-scene":{write:!1}},read:t=>t??void 0,write:{overridePolicy(){return{enabled:this.hasM}}}}})],y.prototype,"mmin",void 0),(0,r.Cg)([(0,m.MZ)({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasZ}}}}})],y.prototype,"zmin",void 0),(0,r.Cg)([(0,m.MZ)({type:Number,json:{write:!0}})],y.prototype,"xmax",void 0),(0,r.Cg)([(0,m.MZ)({type:Number,json:{write:!0}})],y.prototype,"ymax",void 0),(0,r.Cg)([(0,m.MZ)({type:Number,json:{origins:{"web-scene":{write:!1}},read:t=>t??void 0,write:{overridePolicy(){return{enabled:this.hasM}}}}})],y.prototype,"mmax",void 0),(0,r.Cg)([(0,m.MZ)({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasZ}}}}})],y.prototype,"zmax",void 0),y=e=(0,r.Cg)([(0,m.$K)("esri.geometry.Extent")],y),y.prototype.toJSON.isDefaultToJSON=!0},12176:(t,n,i)=>{i.d(n,{A3:()=>p,Ql:()=>g,fA:()=>c,xB:()=>s,xK:()=>z});var e=i(94078);function r(t,n){return(0,e.qz)(t,n)}function s(t,n){const i=t.hasZ&&n.hasZ;let e,r,s;if(t.xmin<=n.xmin){if(e=n.xmin,t.xmax<e)return!1}else if(e=t.xmin,n.xmax<e)return!1;if(t.ymin<=n.ymin){if(r=n.ymin,t.ymax<r)return!1}else if(r=t.ymin,n.ymax<r)return!1;if(i&&n.hasZ)if(t.zmin<=n.zmin){if(s=n.zmin,t.zmax<s)return!1}else if(s=t.zmin,n.zmax<s)return!1;return!0}function m(t,n){const{points:i,hasZ:r}=n,s=r?e.F8:e.CW;for(const n of i)if(s(t,n))return!0;return!1}const a=[0,0],h=[0,0],o=[0,0],x=[0,0],u=[a,h,o,x],l=[[o,a],[a,h],[h,x],[x,o]];function c(t,n){return function(t,n){a[0]=t.xmin,a[1]=t.ymax,h[0]=t.xmax,h[1]=t.ymax,o[0]=t.xmin,o[1]=t.ymin,x[0]=t.xmax,x[1]=t.ymin;for(const t of u)if((0,e.t1)(n,t))return!0;for(const i of n){if(!i.length)continue;let n=i[0];if((0,e.CW)(t,n))return!0;for(let r=1;r<i.length;r++){const s=i[r];if((0,e.CW)(t,s)||M(n,s,l))return!0;n=s}}return!1}(t,n.rings)}function f(t,n){a[0]=t.xmin,a[1]=t.ymax,h[0]=t.xmax,h[1]=t.ymax,o[0]=t.xmin,o[1]=t.ymin,x[0]=t.xmax,x[1]=t.ymin;const i=n.paths;for(const n of i){if(!i.length)continue;let r=n[0];if((0,e.CW)(t,r))return!0;for(let i=1;i<n.length;i++){const s=n[i];if((0,e.CW)(t,s)||M(r,s,l))return!0;r=s}}return!1}const y=[0,0];function p(t){for(let n=0;n<t.length;n++){const i=t[n];for(let e=0;e<i.length-1;e++){const r=i[e],s=i[e+1];for(let i=n+1;i<t.length;i++)for(let n=0;n<t[i].length-1;n++){const e=t[i][n],m=t[i][n+1];if(g(r,s,e,m,y)&&!(y[0]===r[0]&&y[1]===r[1]||y[0]===e[0]&&y[1]===e[1]||y[0]===s[0]&&y[1]===s[1]||y[0]===m[0]&&y[1]===m[1]))return!0}}const e=i.length;if(!(e<=4))for(let t=0;t<e-3;t++){let n=e-1;0===t&&(n=e-2);const r=i[t],s=i[t+1];for(let e=t+2;e<n;e++){const t=i[e],n=i[e+1];if(g(r,s,t,n,y)&&!(y[0]===r[0]&&y[1]===r[1]||y[0]===t[0]&&y[1]===t[1]||y[0]===s[0]&&y[1]===s[1]||y[0]===n[0]&&y[1]===n[1]))return!0}}}return!1}function M(t,n,i){for(let e=0;e<i.length;e++)if(g(t,n,i[e][0],i[e][1]))return!0;return!1}function g(t,n,i,e,r){const[s,m]=t,[a,h]=n,[o,x]=i,[u,l]=e,c=u-o,f=s-o,y=a-s,p=l-x,M=m-x,g=h-m,z=p*y-c*g;if(0===z)return!1;const d=(c*M-p*f)/z,w=(y*M-g*f)/z;return d>=0&&d<=1&&w>=0&&w<=1&&(r&&(r[0]=s+d*(a-s),r[1]=m+d*(h-m)),!0)}function z(t){switch(t){case"esriGeometryEnvelope":case"extent":return s;case"esriGeometryMultipoint":case"multipoint":return m;case"esriGeometryPoint":case"point":return r;case"esriGeometryMultiPatch":case"multipatch":case"esriGeometryPolygon":case"polygon":return c;case"esriGeometryPolyline":case"polyline":return f}}},19419:(t,n,i)=>{i.d(n,{$9:()=>w,HY:()=>d,IO:()=>u,Ie:()=>Z,Rj:()=>z,VL:()=>f,VY:()=>a,Wc:()=>p,aI:()=>v,bx:()=>l,fA:()=>m,fT:()=>c,gR:()=>C,gX:()=>M,ib:()=>g,nw:()=>x,qv:()=>R,tK:()=>o,uJ:()=>y,vt:()=>r,w1:()=>h}),i(34727);var e=i(5443);function r(t=P){return[t[0],t[1],t[2],t[3]]}function s(t,n){return t!==n&&(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3]),t}function m(t,n,i,e,s=r()){return s[0]=t,s[1]=n,s[2]=i,s[3]=e,s}function a(t,n=r()){return n[0]=t.xmin,n[1]=t.ymin,n[2]=t.xmax,n[3]=t.ymax,n}function h(t,n,i=new e.A){return i.xmin=t[0],i.ymin=t[1],i.xmax=t[2],i.ymax=t[3],i.spatialReference=n,i}function o(t,n){n[0]<t[0]&&(t[0]=n[0]),n[0]>t[2]&&(t[2]=n[0]),n[1]<t[1]&&(t[1]=n[1]),n[1]>t[3]&&(t[3]=n[1])}function x(t,n){n<t[0]&&(t[0]=n),n>t[2]&&(t[2]=n)}function u(t,n){n<t[1]&&(t[1]=n),n>t[3]&&(t[3]=n)}function l(t,{xmin:n,ymin:i,xmax:e,ymax:r}){t[0]=Math.min(t[0],n),t[1]=Math.min(t[1],i),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],r)}function c(t,n,i){if(null!=n)if("length"in n)b(n)?(i[0]=Math.min(t[0],n[0]),i[1]=Math.min(t[1],n[1]),i[2]=Math.max(t[2],n[2]),i[3]=Math.max(t[3],n[3])):2!==n.length&&3!==n.length||(i[0]=Math.min(t[0],n[0]),i[1]=Math.min(t[1],n[1]),i[2]=Math.max(t[2],n[0]),i[3]=Math.max(t[3],n[1]));else switch(n.type){case"extent":i[0]=Math.min(t[0],n.xmin),i[1]=Math.min(t[1],n.ymin),i[2]=Math.max(t[2],n.xmax),i[3]=Math.max(t[3],n.ymax);break;case"point":i[0]=Math.min(t[0],n.x),i[1]=Math.min(t[1],n.y),i[2]=Math.max(t[2],n.x),i[3]=Math.max(t[3],n.y)}else s(i,t)}function f(t){return null==t||t[0]>=t[2]?0:t[2]-t[0]}function y(t){return null==t||t[1]>=t[3]?0:t[3]-t[1]}function p(t){return f(t)*y(t)}function M(t,n=[0,0]){return n[0]=(t[0]+t[2])/2,n[1]=(t[1]+t[3])/2,n}function g(t){const n=f(t),i=y(t);return Math.sqrt(n*n+i*i)}function z(t,n,i){return n>=t[0]&&i>=t[1]&&n<=t[2]&&i<=t[3]}function d(t,n){return Math.max(n[0],t[0])<=Math.min(n[2],t[2])&&Math.max(n[1],t[1])<=Math.min(n[3],t[3])}function w(t,n,i){return Math.max(n[0],t[0])-i<=Math.min(n[2],t[2])&&Math.max(n[1],t[1])-i<=Math.min(n[3],t[3])}function C(t,n){return n[0]>=t[0]&&n[2]<=t[2]&&n[1]>=t[1]&&n[3]<=t[3]}function Z(t){return t?s(t,R):r(R)}function b(t){return null!=t&&4===t.length}function v(t,n){return b(t)&&b(n)?t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]:t===n}const R=[1/0,1/0,-1/0,-1/0],P=[0,0,0,0]},94078:(t,n,i)=>{i.d(n,{CW:()=>a,F8:()=>h,gH:()=>m,m3:()=>x,qz:()=>r,rL:()=>s,t1:()=>u});const e=[0,0];function r(t,n){return null!=n&&o(t,n.x,n.y,n.z)}function s(t,n){if(!n.points?.length)return!1;for(const i of n.points)if(!a(t,i))return!1;return!0}function m(t,n){const{xmin:i,ymin:e,zmin:r,xmax:s,ymax:m,zmax:a}=n;return t.hasZ&&n.hasZ?o(t,i,e,r)&&o(t,i,m,r)&&o(t,s,m,r)&&o(t,s,e,r)&&o(t,i,e,a)&&o(t,i,m,a)&&o(t,s,m,a)&&o(t,s,e,a):o(t,i,e)&&o(t,i,m)&&o(t,s,m)&&o(t,s,e)}function a(t,n){return o(t,n[0],n[1])}function h(t,n){return o(t,n[0],n[1],n[2])}function o(t,n,i,e){return n>=t.xmin&&n<=t.xmax&&i>=t.ymin&&i<=t.ymax&&(null==e||!t.hasZ||e>=t.zmin&&e<=t.zmax)}function x(t,n){return e[1]=n.y,e[0]=n.x,function(t,n){return u(t.rings,n)}(t,e)}function u(t,n){if(!t||t.length<1)return!1;if(function(t){return!Array.isArray(t[0][0])}(t))return l(!1,t,n);let i=!1;for(let e=0,r=t.length;e<r;e++)i=l(i,t[e],n);return i}function l(t,n,i){const[e,r]=i;let s=t,m=0;for(let t=0,i=n.length;t<i;t++){m++,m===i&&(m=0);const[a,h]=n[t],[o,x]=n[m];(h<r&&x>=r||x<r&&h>=r)&&a+(r-h)/(x-h)*(o-a)<e&&(s=!s)}return s}},95108:(t,n,i)=>{i.d(n,{$3:()=>o,Ng:()=>m,R3:()=>r,Yl:()=>h,gR:()=>s,m3:()=>u,t9:()=>a});var e=i(4576);function r(t,n){const i=n[0]-t[0],e=n[1]-t[1];if(t.length>2&&n.length>2){const r=t[2]-n[2];return Math.sqrt(i*i+e*e+r*r)}return Math.sqrt(i*i+e*e)}function s(t,n,i,e){const[r,s]=n,[m,a]=i,[h,o]=e,x=h-m,u=o-a,l=x*x+u*u,c=(r-m)*x+(s-a)*u,f=Math.min(1,Math.max(0,c/l));return t[0]=m+x*f,t[1]=a+u*f,t}function m(t,n,i,e,r,s){let m=i,a=e,h=r-m,o=s-a;if(0!==h||0!==o){const i=((t-m)*h+(n-a)*o)/(h*h+o*o);i>1?(m=r,a=s):i>0&&(m+=h*i,a+=o*i)}return h=t-m,o=n-a,h*h+o*o}function a(t,n){return function(t,n,i){const e=t[0]+i*(n[0]-t[0]),r=t[1]+i*(n[1]-t[1]);return t.length>2&&n.length>2?[e,r,t[2]+i*(n[2]-t[2])]:[e,r]}(t,n,.5)}function h(t){const n=t.length;let i=0;for(let e=0;e<n-1;++e)i+=r(t[e],t[e+1]);return i}function o(t,n=0,i=1){let e=0;const r=t.length;let s=t[0];for(let m=1;m<r;m++){const r=t[m];e+=(r[n]-s[n])*(r[i]+s[i]),s=r}if(x(t)){const r=t[0];e+=(r[n]-s[n])*(r[i]+s[i])}return e>=0}function x(t){const n=t.length;return n>0&&!(0,e.aI)(t[0],t[n-1])}function u(t){if("rings"in t)for(const n of t.rings)x(n)&&n.push(n[0].slice())}i(21325)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9616],{4095:(t,e,n)=>{n.d(e,{CW:()=>c,DE:()=>m,S1:()=>p});var i=n(44208),r=n(53966),s=n(34727),o=n(74887),a=n(87811),l=n(78659);n(5443),n(21325);const h=()=>r.A.getLogger("esri.views.2d.engine.flow.dataUtils"),u=10;async function c(t,e,n,r){const s=performance.now(),l=m(e,n),c=performance.now(),f=p(e,l,n.width,n.height),x=performance.now(),y=function(t){const e=new a.A,n=t.reduce((t,e)=>t+e.vertices.length,0),i=new Float32Array(4*n),r=new Array(t.length);let s=0,o=0;for(const{vertices:n}of t){const t=s;for(const t of n)i[4*s]=t.x,i[4*s+1]=t.y,i[4*s+2]=t.time,i[4*s+3]=t.speed,s++;r[o++]={startVertex:t,numberOfVertices:n.length,totalTime:n[n.length-1].time,timeSeed:e.getFloat()}}return{lineVertices:i,lineDescriptors:r}}(f),d=performance.now(),g="Streamlines"===t?function(t,e){const{lineVertices:n,lineDescriptors:i}=t;let r=0,s=0;for(const t of i)r+=2*t.numberOfVertices,s+=6*(t.numberOfVertices-1);const o=new Float32Array(9*r),a=new Uint32Array(s);let l=0,h=0;function u(){a[h++]=l-2,a[h++]=l,a[h++]=l-1,a[h++]=l,a[h++]=l+1,a[h++]=l-1}function c(t,e,n,i,r,s,a,h){const u=9*l;let c=0;o[u+c++]=t,o[u+c++]=e,o[u+c++]=1,o[u+c++]=n,o[u+c++]=s,o[u+c++]=a,o[u+c++]=i/2,o[u+c++]=r/2,o[u+c++]=h,l++,o[u+c++]=t,o[u+c++]=e,o[u+c++]=-1,o[u+c++]=n,o[u+c++]=s,o[u+c++]=a,o[u+c++]=-i/2,o[u+c++]=-r/2,o[u+c++]=h,l++}for(const t of i){const{totalTime:i,timeSeed:r}=t;let s=null,o=null,a=null,l=null,h=null,m=null;for(let f=0;f<t.numberOfVertices;f++){const x=n[4*(t.startVertex+f)],p=n[4*(t.startVertex+f)+1],y=n[4*(t.startVertex+f)+2],d=n[4*(t.startVertex+f)+3];let g=null,M=null,w=null,v=null;if(f>0){g=x-s,M=p-o;const t=Math.sqrt(g*g+M*M);if(g/=t,M/=t,f>1){let t=g+h,n=M+m;const i=Math.sqrt(t*t+n*n);t/=i,n/=i;const r=Math.min(1/(t*g+n*M),e);t*=r,n*=r,w=-n,v=t}else w=-M,v=g;null!==w&&null!==v&&(c(s,o,a,w,v,i,r,d),u())}s=x,o=p,a=y,h=g,m=M,l=d}c(s,o,a,-m,h,i,r,l)}return{vertexData:o,indexData:a}}(y,u):function(t){const{lineVertices:e,lineDescriptors:n}=t;let i=0,r=0;for(const t of n){const e=t.numberOfVertices-1;i+=4*e*2,r+=6*e*2}const s=new Float32Array(16*i),o=new Uint32Array(r);let a,l,h,u,c,m,f,x,p,y,d,g,M,w,v=0,z=0;function b(){o[z++]=v-8,o[z++]=v-7,o[z++]=v-6,o[z++]=v-7,o[z++]=v-5,o[z++]=v-6,o[z++]=v-4,o[z++]=v-3,o[z++]=v-2,o[z++]=v-3,o[z++]=v-1,o[z++]=v-2}function C(t,e,n,i,r,o,a,l,h,u,c,m,f,x){const p=16*v;let y=0;for(const d of[1,2])for(const g of[1,2,3,4])s[p+y++]=t,s[p+y++]=e,s[p+y++]=n,s[p+y++]=i,s[p+y++]=a,s[p+y++]=l,s[p+y++]=h,s[p+y++]=u,s[p+y++]=d,s[p+y++]=g,s[p+y++]=f,s[p+y++]=x,s[p+y++]=r/2,s[p+y++]=o/2,s[p+y++]=c/2,s[p+y++]=m/2,v++}function A(t,e){let n=p+d,i=y+g;const r=Math.sqrt(n*n+i*i);n/=r,i/=r;const s=p*n+y*i;n/=s,i/=s;let o=d+M,v=g+w;const z=Math.sqrt(o*o+v*v);o/=z,v/=z;const A=d*o+g*v;o/=A,v/=A,C(a,l,h,u,-i,n,c,m,f,x,-v,o,t,e),b()}function R(t,e,n,i,r,s){if(p=d,y=g,d=M,g=w,null==p&&null==y&&(p=d,y=g),null!=c&&null!=m){M=t-c,w=e-m;const n=Math.sqrt(M*M+w*w);M/=n,w/=n}null!=p&&null!=y&&A(r,s),a=c,l=m,h=f,u=x,c=t,m=e,f=n,x=i}function Z(t,e){p=d,y=g,d=M,g=w,null==p&&null==y&&(p=d,y=g),null!=p&&null!=y&&A(t,e)}for(const t of n){a=null,l=null,h=null,u=null,c=null,m=null,f=null,x=null,p=null,y=null,d=null,g=null,M=null,w=null;const{totalTime:n,timeSeed:i}=t;for(let r=0;r<t.numberOfVertices;r++)R(e[4*(t.startVertex+r)],e[4*(t.startVertex+r)+1],e[4*(t.startVertex+r)+2],e[4*(t.startVertex+r)+3],n,i);Z(n,i)}return{vertexData:s,indexData:o}}(y),M=performance.now();return(0,i.A)("esri-2d-profiler")&&(h().info("I.1","_createFlowFieldFromData (ms)",Math.round(c-s)),h().info("I.2","_getStreamlines (ms)",Math.round(x-c)),h().info("I.3","createAnimatedLinesData (ms)",Math.round(d-x)),h().info("I.4","create{Streamlines|Particles}Mesh (ms)",Math.round(M-d)),h().info("I.5","createFlowMesh (ms)",Math.round(M-s)),h().info("I.6","Mesh size (bytes)",g.vertexData.buffer.byteLength+g.indexData.buffer.byteLength)),await Promise.resolve(),(0,o.Te)(r),g}function m(t,e){const n=function(t,e,n,i){if(0===i)return t;const r=Math.round(3*i),s=new Array(2*r+1);let o=0;for(let t=-r;t<=r;t++){const e=Math.exp(-t*t/(i*i));s[t+r]=e,o+=e}for(let t=-r;t<=r;t++)s[t+r]/=o;const a=new Float32Array(t.length);for(let i=0;i<n;i++)for(let n=0;n<e;n++){let o=0,l=0;for(let a=-r;a<=r;a++){if(n+a<0||n+a>=e)continue;const h=s[a+r];o+=h*t[2*(i*e+(n+a))],l+=h*t[2*(i*e+(n+a))+1]}a[2*(i*e+n)]=o,a[2*(i*e+n)+1]=l}const l=new Float32Array(t.length);for(let t=0;t<e;t++)for(let i=0;i<n;i++){let o=0,h=0;for(let l=-r;l<=r;l++){if(i+l<0||i+l>=n)continue;const u=s[l+r];o+=u*a[2*((i+l)*e+t)],h+=u*a[2*((i+l)*e+t)+1]}l[2*(i*e+t)]=o,l[2*(i*e+t)+1]=h}return l}(e.data,e.width,e.height,t.smoothing);return t.interpolate?(t,i)=>{const r=Math.floor(t),s=Math.floor(i);if(r<0||r>=e.width)return[0,0];if(s<0||s>=e.height)return[0,0];const o=t-r,a=i-s,l=r,h=s,u=r<e.width-1?r+1:r,c=s<e.height-1?s+1:s,m=n[2*(h*e.width+l)],f=n[2*(h*e.width+u)],x=n[2*(c*e.width+l)],p=n[2*(c*e.width+u)],y=n[2*(h*e.width+l)+1],d=n[2*(h*e.width+u)+1];return[(m*(1-a)+x*a)*(1-o)+(f*(1-a)+p*a)*o,(y*(1-a)+n[2*(c*e.width+l)+1]*a)*(1-o)+(d*(1-a)+n[2*(c*e.width+u)+1]*a)*o]}:(t,i)=>{const r=Math.round(t),s=Math.round(i);return r<0||r>=e.width||s<0||s>=e.height?[0,0]:[n[2*(s*e.width+r)],n[2*(s*e.width+r)+1]]}}function f(t,e,n,i,r,o,a,h){const u=[],{raster:c,width:m,height:f,resolutionFactor:x}=h;let p=i,y=r,d=(0,l.Kp)(0),[g,M]=n(p,y);g*=e.velocityScale,M*=e.velocityScale;const w=Math.sqrt(g*g+M*M);let v,z;u.push({x:p,y,time:d,speed:w});for(let i=0;i<e.verticesPerLine;i++){let[i,r]=n(p,y);i*=e.velocityScale,r*=e.velocityScale;const h=Math.sqrt(i*i+r*r);if(h<e.minSpeedThreshold)return u;const g=t*i/h,M=t*r/h;p+=g*e.segmentLength,y+=M*e.segmentLength,e.wrapAround&&(p=(0,s.OS)(p,o[0]));const w=t*e.segmentLength/h;if(d=(0,l.Kp)(d+w),Math.acos(g*v+M*z)>e.maxTurnAngle)return u;if(e.collisions){let t=Math.round(p*x);const n=Math.round(y*x);if(e.wrapAround&&(t=(0,s.OS)(t,m)),t<0||t>m-1||n<0||n>f-1)return u;const i=c[n*m+t];if(-1!==i&&i!==a)return u;c[n*m+t]=a}u.push({x:p,y,time:d,speed:h}),v=g,z=M}return u}function x(t,e,n,i,r,s,o,a){const l=Math.round((.2+.6*o.getFloat())*t.verticesPerLine),h=t.verticesPerLine-l,u=f(-1,{...t,verticesPerLine:h},e,n,i,r,s,a),c=f(1,{...t,verticesPerLine:l},e,n,i,r,s,a),m=u.reverse();return m.splice(-1,1),m.concat(c)}function p(t,e,n,i,r={positions:[]}){if(t.density<=0)return[];const{positions:s}=r,o=[],l=new a.A,h=1/Math.max(t.lineCollisionWidth,1),u=Math.round(n*h),c=Math.round(i*h),m=new Int32Array(u*c);for(let t=0;t<m.length;t++)m[t]=-1;const p={raster:m,width:u,height:c,resolutionFactor:h},y={},d=t.lineSpacing/Math.sqrt(t.density),g=Math.floor(i/d),M=Math.floor(n/d);for(let t=0;t<g;t++){const e=t*d;for(let n=0;n<M;n++){const i=n*d;y[`${n}-${t}`]={x:i,y:e,positions:[]}}}for(const{x:t,y:e}of s){const n=y[`${Math.floor(t/d)}-${Math.floor(e/d)}`];n&&n.positions.push([t,e])}const w=[];for(const t in y){const e=y[t];if(0===e.positions.length)w.push({x:e.x+d/2,y:e.y+d/2,sort:.66+.33*l.getFloat(),stage:0});else{const[t]=e.positions.splice(0,1);w.push({x:t[0],y:t[1],sort:.33*l.getFloat(),stage:1});for(const[t,n]of e.positions)w.push({x:t,y:n,sort:.33+.33*l.getFloat(),stage:2})}}w.sort((t,e)=>t.sort-e.sort);for(const{x:r,y:s,stage:a}of w){const h=t.onlyForwardTracing?f(1,t,e,r,s,[n,i],o.length,p):x(t,e,r,s,[n,i],o.length,l,p);h.length<2||o.push({stage:a,vertices:h})}return o}},5443:(t,e,n)=>{n.d(e,{A:()=>p});var i,r=n(31635),s=n(799),o=n(91429),a=n(91075),l=n(86738),h=n(16930),u=n(94078),c=n(12176),m=n(21325),f=n(28735);function x(t,e,n){return null==e?n:null==n?e:t(e,n)}let p=i=class extends a.A{constructor(...t){super(...t),this.type="extent",this.xmin=0,this.ymin=0,this.mmin=void 0,this.zmin=void 0,this.xmax=0,this.ymax=0,this.mmax=void 0,this.zmax=void 0}normalizeCtorArgs(t,e,n,i,r){return function(t){return t&&("esri.geometry.SpatialReference"===t.declaredClass||null!=t.wkid)}(t)?{spatialReference:t,xmin:0,ymin:0,xmax:0,ymax:0}:"object"==typeof t?(t.spatialReference=null==t.spatialReference?h.A.WGS84:t.spatialReference,t):{xmin:t,ymin:e,xmax:n,ymax:i,spatialReference:r??h.A.WGS84}}static fromPoint(t){return new i({xmin:t.x,ymin:t.y,zmin:t.z,xmax:t.x,ymax:t.y,zmax:t.z,spatialReference:t.spatialReference})}get cache(){return this.commitProperty("xmin"),this.commitProperty("ymin"),this.commitProperty("zmin"),this.commitProperty("mmin"),this.commitProperty("xmax"),this.commitProperty("ymax"),this.commitProperty("zmax"),this.commitProperty("mmax"),this.commitProperty("spatialReference"),{}}get center(){const t=new l.A({x:.5*(this.xmin+this.xmax),y:.5*(this.ymin+this.ymax),spatialReference:this.spatialReference});return this.hasZ&&(t.z=.5*(this.zmin+this.zmax)),this.hasM&&(t.m=.5*(this.mmin+this.mmax)),t}get extent(){return this.clone()}get hasM(){return null!=this.mmin&&null!=this.mmax}get hasZ(){return null!=this.zmin&&null!=this.zmax}get height(){return Math.abs(this.ymax-this.ymin)}get width(){return Math.abs(this.xmax-this.xmin)}centerAt(t){const e=this.center;return null!=t.z&&this.hasZ?this.offset(t.x-e.x,t.y-e.y,t.z-e.z):this.offset(t.x-e.x,t.y-e.y)}clone(){const t=new i;return t.xmin=this.xmin,t.ymin=this.ymin,t.xmax=this.xmax,t.ymax=this.ymax,t.spatialReference=this.spatialReference,null!=this.zmin&&(t.zmin=this.zmin,t.zmax=this.zmax),null!=this.mmin&&(t.mmin=this.mmin,t.mmax=this.mmax),t}contains(t){if(!t)return!1;const e=this.spatialReference,n=t.spatialReference;return e&&n&&!e.equals(n)&&(0,f.y7)(e,n)&&(t=e.isWebMercator?(0,f.Gh)(t):(0,f.ci)(t,!0)),"point"===t.type?(0,u.qz)(this,t):"extent"===t.type&&(0,u.gH)(this,t)}equals(t){if(this===t)return!0;if(null==t)return!1;const e=this.spatialReference,n=t.spatialReference;return e&&n&&!e.equals(n)&&(0,f.y7)(e,n)&&(t=e.isWebMercator?(0,f.Gh)(t):(0,f.ci)(t,!0)),this.xmin===t.xmin&&this.ymin===t.ymin&&this.zmin===t.zmin&&this.mmin===t.mmin&&this.xmax===t.xmax&&this.ymax===t.ymax&&this.zmax===t.zmax&&this.mmax===t.mmax}expand(t){const e=.5*(1-t),n=this.width*e,i=this.height*e;if(this.xmin+=n,this.ymin+=i,this.xmax-=n,this.ymax-=i,this.hasZ){const t=(this.zmax-this.zmin)*e;this.zmin+=t,this.zmax-=t}if(this.hasM){const t=(this.mmax-this.mmin)*e;this.mmin+=t,this.mmax-=t}return this}intersects(t){if(null==t)return!1;"mesh"===t.type&&(t=t.extent);const e=this.spatialReference,n=t.spatialReference;return e&&n&&!(0,m.aI)(e,n)&&(0,f.y7)(e,n)&&(t=e.isWebMercator?(0,f.Gh)(t):(0,f.ci)(t,!0)),(0,c.xK)(t.type)(this,t)}normalize(){const t=this._normalize(!1,!0);return Array.isArray(t)?t:[t]}offset(t,e,n){return this.xmin+=t,this.ymin+=e,this.xmax+=t,this.ymax+=e,null!=n&&(this.zmin+=n,this.zmax+=n),this}shiftCentralMeridian(){return this._normalize(!0)}union(t){return this===t||(this.xmin=Math.min(this.xmin,t.xmin),this.ymin=Math.min(this.ymin,t.ymin),this.xmax=Math.max(this.xmax,t.xmax),this.ymax=Math.max(this.ymax,t.ymax),(this.hasZ||t.hasZ)&&(this.zmin=x(Math.min,this.zmin,t.zmin),this.zmax=x(Math.max,this.zmax,t.zmax)),(this.hasM||t.hasM)&&(this.mmin=x(Math.min,this.mmin,t.mmin),this.mmax=x(Math.max,this.mmax,t.mmax))),this}intersection(t){return this===t?this:null!=t&&this.intersects(t)?(this.xmin=Math.max(this.xmin,t.xmin),this.ymin=Math.max(this.ymin,t.ymin),this.xmax=Math.min(this.xmax,t.xmax),this.ymax=Math.min(this.ymax,t.ymax),(this.hasZ||t.hasZ)&&(this.zmin=x(Math.max,this.zmin,t.zmin),this.zmax=x(Math.min,this.zmax,t.zmax)),(this.hasM||t.hasM)&&(this.mmin=x(Math.max,this.mmin,t.mmin),this.mmax=x(Math.min,this.mmax,t.mmax)),this):null}toJSON(t){return this.write({},t)}_shiftCM(t=(0,m.Vp)(this.spatialReference)){if(!t||!this.spatialReference)return this;const e=this.spatialReference,n=this._getCM(t);if(n){const i=e.isWebMercator?(0,f.ci)(n):n;this.xmin-=n.x,this.xmax-=n.x,e.isWebMercator||(i.x=y(i.x,t).x),this.spatialReference=new h.A((0,s.HC)((e.isWGS84?t.altTemplate:null)??t.wkTemplate,{Central_Meridian:i.x}))}return this}_getCM(t){let e=null;const[n,i]=t.valid,r=this.xmin,s=this.xmax;return r>=n&&r<=i&&s>=n&&s<=i||(e=this.center),e}_normalize(t,e,n){const i=this.spatialReference;if(!i)return this;const r=n??(0,m.Vp)(i);if(null==r)return this;const s=this._getParts(r).map(t=>t.extent);if(s.length<2)return s[0]||this;if(s.length>2)return t?this._shiftCM(r):this.set({xmin:r.valid[0],xmax:r.valid[1]});if(t)return this._shiftCM(r);if(e)return s;let o=!0,a=!0;return s.forEach(t=>{t.hasZ||(o=!1),t.hasM||(a=!1)}),{rings:s.map(t=>{const e=[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]];if(o){const n=(t.zmax-t.zmin)/2;for(let t=0;t<e.length;t++)e[t].push(n)}if(a){const n=(t.mmax-t.mmin)/2;for(let t=0;t<e.length;t++)e[t].push(n)}return e}),hasZ:o,hasM:a,spatialReference:i}}_getParts(t){let e=this.cache._parts;if(!e){e=[];const{ymin:n,ymax:r,spatialReference:s}=this,o=this.width,a=this.xmin,l=this.xmax;let h;t=t||(0,m.Vp)(s);const[u,c]=t.valid;h=y(this.xmin,t);const f=h.x,x=h.frameId;h=y(this.xmax,t);const p=h.x,d=h.frameId,g=f===p&&o>0;if(o>2*c){const t=new i(a<l?f:p,n,c,r,s),o=new i(u,n,a<l?p:f,r,s),h=new i(0,n,c,r,s),m=new i(u,n,0,r,s),y=[],g=[];t.contains(h)&&y.push(x),t.contains(m)&&g.push(x),o.contains(h)&&y.push(d),o.contains(m)&&g.push(d);for(let t=x+1;t<d;t++)y.push(t),g.push(t);e.push({extent:t,frameIds:[x]},{extent:o,frameIds:[d]},{extent:h,frameIds:y},{extent:m,frameIds:g})}else f>p||g?e.push({extent:new i(f,n,c,r,s),frameIds:[x]},{extent:new i(u,n,p,r,s),frameIds:[d]}):e.push({extent:new i(f,n,p,r,s),frameIds:[x]});this.cache._parts=e}const n=this.hasZ,r=this.hasM;if(n||r){const t={};n&&(t.zmin=this.zmin,t.zmax=this.zmax),r&&(t.mmin=this.mmin,t.mmax=this.mmax);for(let n=0;n<e.length;n++)e[n].extent.set(t)}return e}};function y(t,e){const[n,i]=e.valid,r=2*i;let s,o=0;return t>i?(s=Math.ceil(Math.abs(t-i)/r),t-=s*r,o=s):t<n&&(s=Math.ceil(Math.abs(t-n)/r),t+=s*r,o=-s),{x:t,frameId:o}}(0,r.Cg)([(0,o.MZ)({readOnly:!0})],p.prototype,"cache",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0})],p.prototype,"center",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0})],p.prototype,"extent",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0,json:{write:{enabled:!1,overridePolicy:null}}})],p.prototype,"hasM",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0,json:{write:{enabled:!1,overridePolicy:null}}})],p.prototype,"hasZ",null),(0,r.Cg)([(0,o.MZ)({readOnly:!0})],p.prototype,"height",null),(0,r.Cg)([(0,o.MZ)({type:h.A,json:{write:!0},value:h.A.WGS84})],p.prototype,"spatialReference",void 0),(0,r.Cg)([(0,o.MZ)({readOnly:!0})],p.prototype,"width",null),(0,r.Cg)([(0,o.MZ)({type:Number,json:{type:[Number,String],write:{enabled:!0,allowNull:!0}}})],p.prototype,"xmin",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],p.prototype,"ymin",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{origins:{"web-scene":{write:!1}},read:t=>t??void 0,write:{overridePolicy(){return{enabled:this.hasM}}}}})],p.prototype,"mmin",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasZ}}}}})],p.prototype,"zmin",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],p.prototype,"xmax",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],p.prototype,"ymax",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{origins:{"web-scene":{write:!1}},read:t=>t??void 0,write:{overridePolicy(){return{enabled:this.hasM}}}}})],p.prototype,"mmax",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{origins:{"web-scene":{write:!1}},write:{overridePolicy(){return{enabled:this.hasZ}}}}})],p.prototype,"zmax",void 0),p=i=(0,r.Cg)([(0,o.$K)("esri.geometry.Extent")],p),p.prototype.toJSON.isDefaultToJSON=!0},12176:(t,e,n)=>{n.d(e,{A3:()=>y,Ql:()=>g,fA:()=>f,xB:()=>s,xK:()=>M});var i=n(94078);function r(t,e){return(0,i.qz)(t,e)}function s(t,e){const n=t.hasZ&&e.hasZ;let i,r,s;if(t.xmin<=e.xmin){if(i=e.xmin,t.xmax<i)return!1}else if(i=t.xmin,e.xmax<i)return!1;if(t.ymin<=e.ymin){if(r=e.ymin,t.ymax<r)return!1}else if(r=t.ymin,e.ymax<r)return!1;if(n&&e.hasZ)if(t.zmin<=e.zmin){if(s=e.zmin,t.zmax<s)return!1}else if(s=t.zmin,e.zmax<s)return!1;return!0}function o(t,e){const{points:n,hasZ:r}=e,s=r?i.F8:i.CW;for(const e of n)if(s(t,e))return!0;return!1}const a=[0,0],l=[0,0],h=[0,0],u=[0,0],c=[a,l,h,u],m=[[h,a],[a,l],[l,u],[u,h]];function f(t,e){return function(t,e){a[0]=t.xmin,a[1]=t.ymax,l[0]=t.xmax,l[1]=t.ymax,h[0]=t.xmin,h[1]=t.ymin,u[0]=t.xmax,u[1]=t.ymin;for(const t of c)if((0,i.t1)(e,t))return!0;for(const n of e){if(!n.length)continue;let e=n[0];if((0,i.CW)(t,e))return!0;for(let r=1;r<n.length;r++){const s=n[r];if((0,i.CW)(t,s)||d(e,s,m))return!0;e=s}}return!1}(t,e.rings)}function x(t,e){a[0]=t.xmin,a[1]=t.ymax,l[0]=t.xmax,l[1]=t.ymax,h[0]=t.xmin,h[1]=t.ymin,u[0]=t.xmax,u[1]=t.ymin;const n=e.paths;for(const e of n){if(!n.length)continue;let r=e[0];if((0,i.CW)(t,r))return!0;for(let n=1;n<e.length;n++){const s=e[n];if((0,i.CW)(t,s)||d(r,s,m))return!0;r=s}}return!1}const p=[0,0];function y(t){for(let e=0;e<t.length;e++){const n=t[e];for(let i=0;i<n.length-1;i++){const r=n[i],s=n[i+1];for(let n=e+1;n<t.length;n++)for(let e=0;e<t[n].length-1;e++){const i=t[n][e],o=t[n][e+1];if(g(r,s,i,o,p)&&!(p[0]===r[0]&&p[1]===r[1]||p[0]===i[0]&&p[1]===i[1]||p[0]===s[0]&&p[1]===s[1]||p[0]===o[0]&&p[1]===o[1]))return!0}}const i=n.length;if(!(i<=4))for(let t=0;t<i-3;t++){let e=i-1;0===t&&(e=i-2);const r=n[t],s=n[t+1];for(let i=t+2;i<e;i++){const t=n[i],e=n[i+1];if(g(r,s,t,e,p)&&!(p[0]===r[0]&&p[1]===r[1]||p[0]===t[0]&&p[1]===t[1]||p[0]===s[0]&&p[1]===s[1]||p[0]===e[0]&&p[1]===e[1]))return!0}}}return!1}function d(t,e,n){for(let i=0;i<n.length;i++)if(g(t,e,n[i][0],n[i][1]))return!0;return!1}function g(t,e,n,i,r){const[s,o]=t,[a,l]=e,[h,u]=n,[c,m]=i,f=c-h,x=s-h,p=a-s,y=m-u,d=o-u,g=l-o,M=y*p-f*g;if(0===M)return!1;const w=(f*d-y*x)/M,v=(p*d-g*x)/M;return w>=0&&w<=1&&v>=0&&v<=1&&(r&&(r[0]=s+w*(a-s),r[1]=o+w*(l-o)),!0)}function M(t){switch(t){case"esriGeometryEnvelope":case"extent":return s;case"esriGeometryMultipoint":case"multipoint":return o;case"esriGeometryPoint":case"point":return r;case"esriGeometryMultiPatch":case"multipatch":case"esriGeometryPolygon":case"polygon":return f;case"esriGeometryPolyline":case"polyline":return x}}},19419:(t,e,n)=>{n.d(e,{$9:()=>v,HY:()=>w,IO:()=>c,Ie:()=>b,Rj:()=>M,VL:()=>x,VY:()=>a,Wc:()=>y,aI:()=>A,bx:()=>m,fA:()=>o,fT:()=>f,gR:()=>z,gX:()=>d,ib:()=>g,nw:()=>u,qv:()=>R,tK:()=>h,uJ:()=>p,vt:()=>r,w1:()=>l}),n(34727);var i=n(5443);function r(t=Z){return[t[0],t[1],t[2],t[3]]}function s(t,e){return t!==e&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3]),t}function o(t,e,n,i,s=r()){return s[0]=t,s[1]=e,s[2]=n,s[3]=i,s}function a(t,e=r()){return e[0]=t.xmin,e[1]=t.ymin,e[2]=t.xmax,e[3]=t.ymax,e}function l(t,e,n=new i.A){return n.xmin=t[0],n.ymin=t[1],n.xmax=t[2],n.ymax=t[3],n.spatialReference=e,n}function h(t,e){e[0]<t[0]&&(t[0]=e[0]),e[0]>t[2]&&(t[2]=e[0]),e[1]<t[1]&&(t[1]=e[1]),e[1]>t[3]&&(t[3]=e[1])}function u(t,e){e<t[0]&&(t[0]=e),e>t[2]&&(t[2]=e)}function c(t,e){e<t[1]&&(t[1]=e),e>t[3]&&(t[3]=e)}function m(t,{xmin:e,ymin:n,xmax:i,ymax:r}){t[0]=Math.min(t[0],e),t[1]=Math.min(t[1],n),t[2]=Math.max(t[2],i),t[3]=Math.max(t[3],r)}function f(t,e,n){if(null!=e)if("length"in e)C(e)?(n[0]=Math.min(t[0],e[0]),n[1]=Math.min(t[1],e[1]),n[2]=Math.max(t[2],e[2]),n[3]=Math.max(t[3],e[3])):2!==e.length&&3!==e.length||(n[0]=Math.min(t[0],e[0]),n[1]=Math.min(t[1],e[1]),n[2]=Math.max(t[2],e[0]),n[3]=Math.max(t[3],e[1]));else switch(e.type){case"extent":n[0]=Math.min(t[0],e.xmin),n[1]=Math.min(t[1],e.ymin),n[2]=Math.max(t[2],e.xmax),n[3]=Math.max(t[3],e.ymax);break;case"point":n[0]=Math.min(t[0],e.x),n[1]=Math.min(t[1],e.y),n[2]=Math.max(t[2],e.x),n[3]=Math.max(t[3],e.y)}else s(n,t)}function x(t){return null==t||t[0]>=t[2]?0:t[2]-t[0]}function p(t){return null==t||t[1]>=t[3]?0:t[3]-t[1]}function y(t){return x(t)*p(t)}function d(t,e=[0,0]){return e[0]=(t[0]+t[2])/2,e[1]=(t[1]+t[3])/2,e}function g(t){const e=x(t),n=p(t);return Math.sqrt(e*e+n*n)}function M(t,e,n){return e>=t[0]&&n>=t[1]&&e<=t[2]&&n<=t[3]}function w(t,e){return Math.max(e[0],t[0])<=Math.min(e[2],t[2])&&Math.max(e[1],t[1])<=Math.min(e[3],t[3])}function v(t,e,n){return Math.max(e[0],t[0])-n<=Math.min(e[2],t[2])&&Math.max(e[1],t[1])-n<=Math.min(e[3],t[3])}function z(t,e){return e[0]>=t[0]&&e[2]<=t[2]&&e[1]>=t[1]&&e[3]<=t[3]}function b(t){return t?s(t,R):r(R)}function C(t){return null!=t&&4===t.length}function A(t,e){return C(t)&&C(e)?t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]:t===e}const R=[1/0,1/0,-1/0,-1/0],Z=[0,0,0,0]},21276:(t,e,n)=>{n.d(e,{H:()=>s,f:()=>r});var i=n(49186);function r(t){if(t&&"object"==typeof t&&"type"in t&&"mesh"===t.type)throw new i.A("internal:mesh","Mesh geometries are not supported for this operation")}function s(t){t.forEach(r)}},28735:(t,e,n)=>{n.d(e,{Cv:()=>d,Gh:()=>w,ci:()=>v,je:()=>g,jg:()=>m,tD:()=>M,y7:()=>y});var i=n(4718),r=n(21276),s=n(16930),o=n(79258),a=n(21325);const l=57.29577951308232,h=.017453292519943;function u(t){return t*l}function c(t){return t*h}function m(t){return Math.PI/2-2*Math.atan(Math.exp(-t/o.$O.radius))}function f(t){return null!=t.wkid||null!=t.wkt}const x=[0,0];function p(t,e,n,i,r){const s=t,o=r;if(o.spatialReference=n,"x"in s&&"x"in o)[o.x,o.y]=e(s.x,s.y,x,i);else if("xmin"in s&&"xmin"in o)[o.xmin,o.ymin]=e(s.xmin,s.ymin,x,i),[o.xmax,o.ymax]=e(s.xmax,s.ymax,x,i);else if("paths"in s&&"paths"in o||"rings"in s&&"rings"in o){const t="paths"in s?s.paths:s.rings,n=[];let r;for(let s=0;s<t.length;s++){const o=t[s];r=[],n.push(r);for(let t=0;t<o.length;t++)r.push(e(o[t][0],o[t][1],[0,0],i)),o[t].length>2&&r[t].push(o[t][2]),o[t].length>3&&r[t].push(o[t][3])}"paths"in o?o.paths=n:o.rings=n}else if("points"in s&&"points"in o){const t=s.points,n=[];for(let r=0;r<t.length;r++)n[r]=e(t[r][0],t[r][1],[0,0],i),t[r].length>2&&n[r].push(t[r][2]),t[r].length>3&&n[r].push(t[r][3]);o.points=n}return r}function y(t,e){const n=t&&(f(t)?t:t.spatialReference),i=e&&(f(e)?e:e.spatialReference);return!(t&&"type"in t&&"mesh"===t.type||e&&"type"in e&&"mesh"===e.type||!n||!i)&&(!!(0,a.aI)(i,n)||(0,a.K8)(i)&&(0,a.oT)(n)||(0,a.K8)(n)&&(0,a.oT)(i))}function d(t,e){if(null==t)return null;const n=t.spatialReference,r=e&&(f(e)?e:e.spatialReference);return y(n,r)?(0,a.aI)(n,r)?(0,i.o8)(t):(0,a.K8)(r)?p(t,g,s.A.WebMercator,!1,(0,i.o8)(t)):(0,a.oT)(r)?p(t,M,s.A.WGS84,!1,(0,i.o8)(t)):null:null}function g(t,e,n=[0,0]){e>89.99999?e=89.99999:e<-89.99999&&(e=-89.99999);const i=c(e);return n[0]=c(t)*o.$O.radius,n[1]=o.$O.halfSemiMajorAxis*Math.log((1+Math.sin(i))/(1-Math.sin(i))),n}function M(t,e,n=[0,0],i=!1){if(t===a.Mc[0])n[0]=-180;else if(t===a.Mc[1])n[0]=180;else{const e=u(t/o.$O.radius);n[0]=i?e:e-360*Math.floor((e+180)/360)}return n[1]=u(Math.PI/2-2*Math.atan(Math.exp(-e/o.$O.radius))),n}function w(t,e=!1,n=(0,i.o8)(t)){return(0,r.f)(t),(0,r.f)(n),p(t,g,s.A.WebMercator,e,n)}function v(t,e=!1,n=(0,i.o8)(t)){return(0,r.f)(t),(0,r.f)(n),p(t,M,s.A.WGS84,e,n)}},31635:(t,e,n)=>{function i(t,e,n,i){var r,s=arguments.length,o=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,n,o):r(e,n))||o);return s>3&&o&&Object.defineProperty(e,n,o),o}function r(t,e,n){if(null!=e){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object expected.");var i,r;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");i=e[Symbol.asyncDispose]}if(void 0===i){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");i=e[Symbol.dispose],n&&(r=i)}if("function"!=typeof i)throw new TypeError("Object not disposable.");r&&(i=function(){try{r.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:i,async:n})}else n&&t.stack.push({async:!0});return e}n.d(e,{Cg:()=>i,hk:()=>o,mS:()=>r}),Object.create,Object.create;var s="function"==typeof SuppressedError?SuppressedError:function(t,e,n){var i=new Error(n);return i.name="SuppressedError",i.error=t,i.suppressed=e,i};function o(t){function e(e){t.error=t.hasError?new s(e,t.error,"An error was suppressed during disposal."):e,t.hasError=!0}var n,i=0;return function r(){for(;n=t.stack.pop();)try{if(!n.async&&1===i)return i=0,t.stack.push(n),Promise.resolve().then(r);if(n.dispose){var s=n.dispose.call(n.value);if(n.async)return i|=2,Promise.resolve(s).then(r,function(t){return e(t),r()})}else i|=1}catch(t){e(t)}if(1===i)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}()}},49616:(t,e,n)=>{n.r(e),n.d(e,{default:()=>h});var i=n(31635),r=n(91429),s=n(4095),o=n(19419),a=n(69052);n(21325);let l=class{constructor(){this._tileData=new Map}async generateStreamlines(t){const{flowData:e,flowExtentInfo:n,needsMagnitude:i,simulationSettings:r,startPositions:o}=t,a=u((0,s.DE)(r,e),r,n.modelSize,i,o);return{result:{streamlines:a},transferList:a?.map(t=>t.vertices.buffer)}}async generateTiledStreamlines(t){const{flowDataTiles:e,flowExtentInfo:n,needsMagnitude:i,reset:r,simulationSettings:l,startPositions:h}=t;this._updateTileData(e,r);const c=u(function(t,e,n){const[i,r]=n.modelSize;let l=null;const h=new Map;e.forEach(e=>{h.set(e.lij,(0,s.DE)(t,e))});const u=(t,e,n)=>(0,o.Rj)(t.extent,e,n);return(s,c)=>{const m=Math.round(s),f=Math.round(c);if(!t.wrapAround&&(m<0||m>=i||f<0||f>=r))return[0,0];const[x,p]=function(t,e,n,i){const{extent:r,modelSize:s,valid:l}=t,[h,u,c]=r,m=function(t,e,n){if(null!=n&&t>e){const[i,r]=n;return r-t+(e-i)}return e-t}(h,c,l);let f=e/s[0]*m+h;return null!=l&&i&&(f=new a.hr(l[0],l[1]).normalize(f)),[f,(s[1]-n)/s[1]*(0,o.uJ)(r)+u]}(n,s,c,!0);if(!function(t,e,n){const{extent:i,valid:r}=t,[s,o,a,l]=i;return!(n<o||n>l)&&(null!=r&&s>a?e>=a||e<=s:e>=s&&e<=a)}(n,x,p))return[0,0];if(null==l||!u(l,x,p)){l=null;for(const[t,n]of e)if(u(n,x,p)){l=n;break}}if(null==l?.data)return[0,0];const y=h.get(l.lij);if(null==y)return[0,0];const{width:d,height:g,extent:M}=l;return y((x-M[0])/(0,o.VL)(M)*d,g-(p-M[1])/(0,o.uJ)(M)*g)}}(l,this._tileData,n),l,n.modelSize,i,h);return{result:{streamlines:c},transferList:c?.map(t=>t.vertices.buffer)??[]}}_updateTileData(t,e){if(e)for(const e of this._tileData.keys())t.has(e)||this._tileData.delete(e);t.forEach((t,e)=>{"delete"===t.type?this._tileData.delete(e):"on-worker"!==t.type&&"invalid"!==t.type&&this._tileData.set(e,t.data)})}};l=(0,i.Cg)([(0,r.$K)("esri.views.3d.support.flow.FlowWorker")],l);const h=l;function u(t,e,n,i,r){if(null==t)return;const o=(0,s.S1)(e,t,n[0],n[1],{positions:r}),a=[],l=function(t){return t?4:3}(i);for(const{vertices:t,stage:e}of o){const n=new Float32Array(t.length*l);for(let e=0;e<t.length;e++)n[e*l]=t[e].x,n[e*l+1]=t[e].y,n[e*l+2]=t[e].time,i&&(n[e*l+3]=t[e].speed);a.push({vertices:n,stage:e,hasMagnitude:i})}return a}},69052:(t,e,n)=>{n.d(e,{hr:()=>r,ie:()=>l,uC:()=>a});var i=n(34727);class r{constructor(t,e){this.min=t,this.max=e,this.range=e-t}normalize(t,e=0,n=!1){return s(this.range,this.min,this.max,t,e,n)}clamp(t,e=0){return(0,i.qE)(t-e,this.min,this.max)+e}monotonic(t,e,n){return t<e?e:e+o(this.range,t-e,n)}minimalMonotonic(t,e,n){return s(this.range,t,t+this.range,e,n)}center(t,e,n){return e=this.monotonic(t,e,n),this.normalize((t+e)/2,n)}diff(t,e,n){return this.monotonic(t,e,n)-t}shortestSignedDiff(t,e){t=this.normalize(t);const n=(e=this.normalize(e))-t,i=e<t?this.minimalMonotonic(t,e)-t:e-this.minimalMonotonic(e,t);return Math.abs(n)<Math.abs(i)?n:i}contains(t,e,n){return e=this.minimalMonotonic(t,e),(n=this.minimalMonotonic(t,n))>t&&n<e}}function s(t,e,n,i,r=0,s=!1){return(i-=r)<e?i+=o(t,e-i):i>n&&(i-=o(t,i-n)),s&&i===n&&(i=e),i+r}function o(t,e,n=0){return Math.ceil((e-n)/t)*t+n}const a=new r(0,2*Math.PI),l=(new r(-Math.PI,Math.PI),new r(0,360))},86738:(t,e,n)=>{n.d(e,{A:()=>M});var i=n(31635),r=n(69622),s=n(53966),o=n(91429),a=n(56507),l=n(91075),h=n(16930),u=n(21325),c=n(28735);function m({x:t,y:e,spatialReference:n},i=[0,0]){if(n){if((0,u.K8)(n))return(0,c.tD)(t,e,i);if((0,u.EA)(n))return i[0]=t,i[1]=e,i}return null}const f=[0,0];var x,p=n(43937),y=n(36005);const d=[0,0];function g(t){return t&&("esri.geometry.SpatialReference"===t.declaredClass||null!=t.wkid)}let M=x=class extends l.A{static copy(t,e){e._set("x",t._get("x")),e._set("y",t._get("y")),e._set("z",t._get("z")),e._set("m",t._get("m"));const n=t._get("spatialReference");e._set("spatialReference",r.A.isFrozen(n)?n:n.clone())}constructor(...t){super(...t),this.x=0,this.y=0,this.z=void 0,this.m=void 0,this.type="point"}normalizeCtorArgs(t,e,n,i,r){let o;if(Array.isArray(t))o=t,r=e,t=o[0],e=o[1],n=o[2],i=o[3];else if(t&&"object"==typeof t){if(o=t,t=null!=o.x?o.x:o.longitude,e=null!=o.y?o.y:o.latitude,n=o.z,i=o.m,(r=o.spatialReference)&&"esri.geometry.SpatialReference"!==r.declaredClass&&(r=new h.A(r)),null!=o.longitude||null!=o.latitude)if(null==o.longitude)s.A.getLogger(this).warn(".longitude=","Latitude was defined without longitude");else if(null==o.latitude)s.A.getLogger(this).warn(".latitude=","Longitude was defined without latitude");else if(!o.declaredClass&&r?.isWebMercator){const n=(0,c.je)(o.longitude,o.latitude,d);t=n[0],e=n[1]}}else g(n)?(r=n,n=null):g(i)&&(r=i,i=null);const a={x:t,y:e};return null==a.x&&null!=a.y?s.A.getLogger(this).warn(".y=","Y coordinate was defined without an X coordinate"):null==a.y&&null!=a.x&&s.A.getLogger(this).warn(".x=","X coordinate was defined without a Y coordinate"),null!=r&&(a.spatialReference=r),null!=n&&(a.z=n),null!=i&&(a.m=i),a}get cache(){return this.commitProperty("x"),this.commitProperty("y"),this.commitProperty("z"),this.commitProperty("m"),this.commitProperty("spatialReference"),{}}get hasM(){return void 0!==this.m}set hasM(t){t!==(void 0!==this._get("m"))&&(this._set("m",t?0:void 0),this._set("hasM",t))}get hasZ(){return void 0!==this.z}set hasZ(t){t!==(void 0!==this._get("z"))&&(this._set("z",t?0:void 0),this._set("hasZ",t))}get latitude(){return t=this,m(t,f)?.[1]??null;var t}set latitude(t){const{spatialReference:e,x:n}=this;null!=t&&e&&(e.isWebMercator?this._set("y",(0,c.je)(n,t,d)[1]):e.isGeographic&&this._set("y",t),this._set("latitude",t))}get longitude(){return t=this,m(t,f)?.[0]??null;var t}set longitude(t){const{y:e,spatialReference:n}=this;null!=t&&n&&(n.isWebMercator?this._set("x",(0,c.je)(t,e,d)[0]):n.isGeographic&&this._set("x",t),this._set("longitude",t))}writeX(t,e,n){e[n]=isNaN(t)?"NaN":t}readX(t){return"string"==typeof t?NaN:t}clone(){const t=new x;return t.x=this.x,t.y=this.y,t.z=this.z,t.m=this.m,t.spatialReference=this.spatialReference,t}copy(t){return x.copy(t,this),this}equals(t){if(null==t)return!1;const{x:e,y:n,z:i,m:r,spatialReference:s}=this,{z:o,m:a}=t;let{x:l,y:h,spatialReference:u}=t;if(!s.equals(u))if(s.isWebMercator&&u.isWGS84)[l,h]=(0,c.je)(l,h),u=s;else{if(!s.isWGS84||!u.isWebMercator)return!1;[l,h]=(0,c.tD)(l,h),u=s}return e===l&&n===h&&i===o&&r===a&&s.wkid===u.wkid}offset(t,e,n){return this.x+=t,this.y+=e,null!=n&&(this.z=(this.z??0)+n),this}normalize(){if(!this.spatialReference)return this;const t=(0,u.Vp)(this.spatialReference);if(!t)return this;let e=this.x;const[n,i]=t.valid,r=2*i;let s;return e>i?(s=Math.ceil(Math.abs(e-i)/r),e-=s*r):e<n&&(s=Math.ceil(Math.abs(e-n)/r),e+=s*r),this._set("x",e),this}distance(t){return function(t,e){const n=t.x-e.x,i=t.y-e.y,r=null!=t.z&&null!=e.z?t.z-e.z:0;return Math.sqrt(n*n+i*i+r*r)}(this,t)}toArray(){const t=this.hasZ,e=this.hasM;return t&&e?[this.x,this.y,this.z,this.m]:t?[this.x,this.y,this.z]:e?[this.x,this.y,this.m]:[this.x,this.y]}toJSON(t){return this.write({},t)}};(0,i.Cg)([(0,o.MZ)({readOnly:!0})],M.prototype,"cache",null),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],M.prototype,"hasM",null),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],M.prototype,"hasZ",null),(0,i.Cg)([(0,o.MZ)({type:Number})],M.prototype,"latitude",null),(0,i.Cg)([(0,o.MZ)({type:Number})],M.prototype,"longitude",null),(0,i.Cg)([(0,o.MZ)({type:Number,json:{type:[Number,String],write:{isRequired:!0,allowNull:!0}}}),(0,o.wg)(t=>isNaN(t)?t:(0,a.GB)(t))],M.prototype,"x",void 0),(0,i.Cg)([(0,p.K)("x")],M.prototype,"writeX",null),(0,i.Cg)([(0,y.w)("x")],M.prototype,"readX",null),(0,i.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],M.prototype,"y",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasZ}}}}})],M.prototype,"z",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasM}}}}})],M.prototype,"m",void 0),M=x=(0,i.Cg)([(0,o.$K)("esri.geometry.Point")],M),M.prototype.toJSON.isDefaultToJSON=!0},91075:(t,e,n)=>{n.d(e,{A:()=>l});var i=n(31635),r=n(25482),s=n(91429),o=n(16930),a=n(36005);let l=class extends r.o{constructor(...t){super(...t),this.type=null,this.hasM=!1,this.hasZ=!1,this.spatialReference=o.A.WGS84}get cache(){return this.commitProperty("spatialReference"),{}}get extent(){return null}readSpatialReference(t,e){if(t instanceof o.A)return t;if(null!=t){const n=new o.A;return n.read(t,e),n}return t}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}clearCache(){this.notifyChange("cache")}getCacheValue(t){return this.cache[t]}setCacheValue(t,e){this.cache[t]=e}};(0,i.Cg)([(0,s.MZ)()],l.prototype,"type",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],l.prototype,"cache",null),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],l.prototype,"extent",null),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],l.prototype,"hasM",void 0),(0,i.Cg)([(0,s.MZ)({type:Boolean,json:{write:{overridePolicy:t=>({enabled:t})}}})],l.prototype,"hasZ",void 0),(0,i.Cg)([(0,s.MZ)({type:o.A,json:{write:!0},value:o.A.WGS84})],l.prototype,"spatialReference",void 0),(0,i.Cg)([(0,a.w)("spatialReference")],l.prototype,"readSpatialReference",null),l=(0,i.Cg)([(0,s.$K)("esri.geometry.Geometry")],l)},94078:(t,e,n)=>{n.d(e,{CW:()=>a,F8:()=>l,gH:()=>o,m3:()=>u,qz:()=>r,rL:()=>s,t1:()=>c});const i=[0,0];function r(t,e){return null!=e&&h(t,e.x,e.y,e.z)}function s(t,e){if(!e.points?.length)return!1;for(const n of e.points)if(!a(t,n))return!1;return!0}function o(t,e){const{xmin:n,ymin:i,zmin:r,xmax:s,ymax:o,zmax:a}=e;return t.hasZ&&e.hasZ?h(t,n,i,r)&&h(t,n,o,r)&&h(t,s,o,r)&&h(t,s,i,r)&&h(t,n,i,a)&&h(t,n,o,a)&&h(t,s,o,a)&&h(t,s,i,a):h(t,n,i)&&h(t,n,o)&&h(t,s,o)&&h(t,s,i)}function a(t,e){return h(t,e[0],e[1])}function l(t,e){return h(t,e[0],e[1],e[2])}function h(t,e,n,i){return e>=t.xmin&&e<=t.xmax&&n>=t.ymin&&n<=t.ymax&&(null==i||!t.hasZ||i>=t.zmin&&i<=t.zmax)}function u(t,e){return i[1]=e.y,i[0]=e.x,function(t,e){return c(t.rings,e)}(t,i)}function c(t,e){if(!t||t.length<1)return!1;if(function(t){return!Array.isArray(t[0][0])}(t))return m(!1,t,e);let n=!1;for(let i=0,r=t.length;i<r;i++)n=m(n,t[i],e);return n}function m(t,e,n){const[i,r]=n;let s=t,o=0;for(let t=0,n=e.length;t<n;t++){o++,o===n&&(o=0);const[a,l]=e[t],[h,u]=e[o];(l<r&&u>=r||u<r&&l>=r)&&a+(r-l)/(u-l)*(h-a)<i&&(s=!s)}return s}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[36],{1193:(e,t,n)=>{n.d(t,{A:()=>f});var r,o=n(31635),i=n(69540),s=n(25482),a=n(4718),l=n(53966),u=n(91429),c=n(31199);let f=r=class extends((0,i.OU)(s.o)){constructor(e){super(e),this.color=null,this.position=new Float64Array(0),this.uv=null,this.normal=null,this.tangent=null}castColor(e){return(0,c.b)(e,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},l.A.getLogger(this))}castPosition(e){return e&&e instanceof Float32Array&&l.A.getLogger(this).warn(".position=","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array"),(0,c.b)(e,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},l.A.getLogger(this))}castUv(e){return(0,c.b)(e,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},l.A.getLogger(this))}castNormal(e){return(0,c.b)(e,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},l.A.getLogger(this))}castTangent(e){return(0,c.b)(e,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},l.A.getLogger(this))}clonePositional(){const e={position:(0,a.o8)(this.position),normal:(0,a.o8)(this.normal),tangent:(0,a.o8)(this.tangent),uv:this.uv,color:this.color};return new r(e)}get usedMemory(){return this.position.byteLength+(this.uv?.byteLength??0)+(this.normal?.byteLength??0)+(this.tangent?.byteLength??0)+(this.color?.byteLength??0)}};(0,o.Cg)([(0,u.MZ)({json:{write:c.B}})],f.prototype,"color",void 0),(0,o.Cg)([(0,u.wg)("color")],f.prototype,"castColor",null),(0,o.Cg)([(0,u.MZ)({nonNullable:!0,json:{write:c.B}})],f.prototype,"position",void 0),(0,o.Cg)([(0,u.wg)("position")],f.prototype,"castPosition",null),(0,o.Cg)([(0,u.MZ)({json:{write:c.B}})],f.prototype,"uv",void 0),(0,o.Cg)([(0,u.wg)("uv")],f.prototype,"castUv",null),(0,o.Cg)([(0,u.MZ)({json:{write:c.B}})],f.prototype,"normal",void 0),(0,o.Cg)([(0,u.wg)("normal")],f.prototype,"castNormal",null),(0,o.Cg)([(0,u.MZ)({json:{write:c.B}})],f.prototype,"tangent",void 0),(0,o.Cg)([(0,u.wg)("tangent")],f.prototype,"castTangent",null),f=r=(0,o.Cg)([(0,u.$K)("esri.geometry.support.MeshVertexAttributes")],f)},9318:(e,t,n)=>{n.d(t,{b:()=>i});var r=n(34727),o=n(97146);function i(e,t,n){const i=Array.isArray(e),c=i?e.length/t:e.byteLength/(4*t),f=i?e:new Uint32Array(e,0,c*t),p=n?.minReduction??0,h=n?.originalIndices||null,g=h?h.length:0,y=n?.componentOffsets||null;let m=0;if(y)for(let e=0;e<y.length-1;e++){const t=y[e+1]-y[e];t>m&&(m=t)}else m=c;const d=Math.floor(1.1*m)+1;(null==u||u.length<2*d)&&(u=new Uint32Array((0,r.cU)(2*d)));for(let e=0;e<2*d;e++)u[e]=0;let x=0;const v=!!y&&!!h,w=v?g:c;let A=(0,o.my)(c);const b=new Uint32Array(g),M=1.96;let C=0!==p?Math.ceil(4*M*M/(p*p)*p*(1-p)):w,T=1,S=y?y[1]:w;for(let e=0;e<w;e++){if(e===C){const t=1-x/e;if(t+M*Math.sqrt(t*(1-t)/e)<p)return null;C*=2}if(e===S){for(let e=0;e<2*d;e++)u[e]=0;if(h)for(let e=y[T-1];e<y[T];e++)b[e]=A[h[e]];S=y[++T]}const n=v?h[e]:e,r=n*t,o=l(f,r,t);let i=o%d,a=x;for(;0!==u[2*i+1];){if(u[2*i]===o){const e=u[2*i+1]-1;if(s(f,r,e*t,t)){a=A[e];break}}i++,i>=d&&(i-=d)}a===x&&(u[2*i]=o,u[2*i+1]=n+1,x++),A[n]=a}if(0!==p&&1-x/c<p)return null;if(v){for(let e=y[T-1];e<b.length;e++)b[e]=A[h[e]];A=(0,o.uW)(b)}const R=i?new Array(x):new Uint32Array(x*t);x=0;for(let e=0;e<w;e++)A[e]===x&&(a(f,(v?h[e]:e)*t,R,x*t,t),x++);if(h&&!v){const e=new Uint32Array(g);for(let t=0;t<e.length;t++)e[t]=A[h[t]];A=(0,o.uW)(e)}return{buffer:Array.isArray(R)?R:R.buffer,indices:A,uniqueCount:x}}function s(e,t,n,r){for(let o=0;o<r;o++)if(e[t+o]!==e[n+o])return!1;return!0}function a(e,t,n,r,o){for(let i=0;i<o;i++)n[r+i]=e[t+i]}function l(e,t,n){let r=0;for(let o=0;o<n;o++)r=e[t+o]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let u=null},16939:(e,t,n)=>{n.d(t,{A:()=>h});var r,o=n(31635),i=n(69540),s=n(25482),a=n(53966),l=n(91429),u=n(56507),c=n(19211),f=n(80882),p=n(31199);let h=r=class extends((0,i.OU)(s.o)){static from(e){return(0,u.PZ)(r,e)}constructor(e){super(e),this.faces=null,this.material=null,this.name=void 0,this.shading="source",this.trustSourceNormals=!1}castFaces(e){return(0,p.b)(e,Uint32Array,[Uint16Array],{loggerTag:".faces=",stride:3},a.A.getLogger(this))}castMaterial(e){return(0,u.PZ)(e&&"object"==typeof e&&("metallic"in e||"roughness"in e||"metallicRoughnessTexture"in e)?f.A:c.A,e)}get memoryUsage(){let e=0;return null!=this.faces&&(e+=this.faces.byteLength),null!=this.material&&(e+=this.material.memoryUsage),e}};(0,o.Cg)([(0,l.MZ)({json:{write:p.B}})],h.prototype,"faces",void 0),(0,o.Cg)([(0,l.wg)("faces")],h.prototype,"castFaces",null),(0,o.Cg)([(0,l.MZ)({type:c.A,json:{write:!0}})],h.prototype,"material",void 0),(0,o.Cg)([(0,l.wg)("material")],h.prototype,"castMaterial",null),(0,o.Cg)([(0,l.MZ)({json:{write:!0}})],h.prototype,"name",void 0),(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],h.prototype,"shading",void 0),(0,o.Cg)([(0,l.MZ)({type:Boolean})],h.prototype,"trustSourceNormals",void 0),h=r=(0,o.Cg)([(0,l.$K)("esri.geometry.support.MeshComponent")],h)},18251:(e,t,n)=>{n.d(t,{A:()=>u});var r=n(31635),o=n(69540),i=n(25482),s=n(91429),a=n(51850),l=n(93223);let u=class extends((0,o.OU)(i.o)){constructor(e){super(e),this.type="local",this.origin=(0,a.vt)()}};(0,r.Cg)([(0,l.e)({local:"local"},{readOnly:!0})],u.prototype,"type",void 0),(0,r.Cg)([(0,s.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],u.prototype,"origin",void 0),u=(0,r.Cg)([(0,s.$K)("esri.geometry.support.MeshLocalVertexSpace")],u)},19211:(e,t,n)=>{n.d(t,{A:()=>f});var r=n(31635),o=n(68197),i=n(69540),s=n(25482),a=n(91429),l=n(35063),u=n(51147),c=n(66895);let f=class extends((0,i.OU)(s.o)){constructor(e){super(e),this.color=null,this.colorTextureTransform=null,this.normalTextureTransform=void 0,this.alphaMode="auto",this.alphaCutoff=.5,this.doubleSided=!0}get colorTexture(){return this._get("colorTexture")}set colorTexture(e){this._set("colorTexture",null==e?null:l.A.from(e))}get normalTexture(){return this._get("normalTexture")}set normalTexture(e){this._set("normalTexture",null==e?null:l.A.from(e))}clone(e){const t=(0,c.hz)(e),n=t?.materialMap?.get(this);if(n)return n;const r=super.clone((0,c.QN)(e));return t?.materialMap?.set(this,r),r}get memoryUsage(){return this.getMemoryUsage()}getMemoryUsage(){let e=0;return e+=null!=this.color?16:0,null!=this.colorTexture&&(e+=this.colorTexture.memoryUsage),e+=null!=this.colorTextureTransform?20:0,null!=this.normalTexture&&(e+=this.normalTexture.memoryUsage),e+=null!=this.normalTextureTransform?20:0,e}};(0,r.Cg)([(0,a.MZ)({type:o.A,json:{write:!0}})],f.prototype,"color",void 0),(0,r.Cg)([(0,a.MZ)({type:l.A,json:{write:!0},value:null})],f.prototype,"colorTexture",null),(0,r.Cg)([(0,a.MZ)({type:u.A,json:{write:!0}})],f.prototype,"colorTextureTransform",void 0),(0,r.Cg)([(0,a.MZ)({type:l.A,json:{write:!0},value:null})],f.prototype,"normalTexture",null),(0,r.Cg)([(0,a.MZ)({type:u.A,json:{write:!0}})],f.prototype,"normalTextureTransform",void 0),(0,r.Cg)([(0,a.MZ)({nonNullable:!0,json:{write:!0}})],f.prototype,"alphaMode",void 0),(0,r.Cg)([(0,a.MZ)({nonNullable:!0,json:{write:!0}})],f.prototype,"alphaCutoff",void 0),(0,r.Cg)([(0,a.MZ)({nonNullable:!0,json:{write:!0}})],f.prototype,"doubleSided",void 0),f=(0,r.Cg)([(0,a.$K)("esri.geometry.support.MeshMaterial")],f)},21287:(e,t,n)=>{n.d(t,{M5:()=>f,eV:()=>c});var r=n(11254),o=n(49186),i=n(74887),s=n(84952),a=n(26306);let l=null,u=!0;function c(e,t,n,r){if(!t||!n)throw new Error("Cannot construct image data without dimensions");if(u)try{return new ImageData(e,t,n)}catch(e){u=!1}const o=function(e,t,n){return n||(l||(l=document.createElement("canvas"),l.width=1,l.height=1),n=l),n.getContext("2d").createImageData(e,t)}(t,n,r);return o.data.set(e,0),o}async function f(e,t){const{arrayBuffer:l,mediaType:u}=await async function(e,t){const n=(0,s.r$)(e);if(n?.isBase64)return{arrayBuffer:(0,a.M)(n.data),mediaType:n.mediaType};const o=await(0,r.A)(e,{responseType:"array-buffer",...t});return{arrayBuffer:o.data,mediaType:o.getHeader?.("Content-Type")??""}}(e,t),c="image/png"===u;if("image/gif"===u){const{isAnimatedGIF:e,parseGif:r}=await n.e(820).then(n.bind(n,10820));if(e(l))return r(l,t)}if(c){const{isAnimatedPNG:e,parseApng:r}=await n.e(2390).then(n.bind(n,22390));if(e(l))return r(l,t)}return async function(e,t){const n=window.URL.createObjectURL(e);try{const{data:e}=await(0,r.A)(n,{...t,responseType:"image"});return e}catch(e){if(!(0,i.zf)(e))throw new o.A("invalid-image",`Could not fetch requested image at ${n}`);throw e}finally{window.URL.revokeObjectURL(n)}}(new Blob([l],{type:u}),t)}},22141:(e,t,n)=>{n.d(t,{$5:()=>b,CN:()=>x,JP:()=>d,KM:()=>C,Mv:()=>S,X4:()=>v,gr:()=>A,qs:()=>M,si:()=>w,xA:()=>T});var r=n(34727),o=n(77690),i=n(29242),s=n(58083),a=n(9093),l=n(38954),u=n(51850),c=n(48353),f=n(9762),p=(n(79258),n(21325)),h=n(28735),g=n(13030),y=n(73354),m=n(65686);const d="Projection may be possible after calling projection.load().";function x(e,t,n,r){e.error(`Failed to project from (wkid:${t.wkid}) to (wkid:${n.wkid}).${r?" ":""}${r}`)}function v(e,t,n,r,o,i){return Z(0,g.xs.fromTypedArray(e),0,g.Xm.fromTypedArray(t),n,g.Xm.fromTypedArray(r),o,g.xs.fromTypedArray(i))?i:null}function w(e,t,n,r,o,i){return Z(1,g.xs.fromTypedArray(e),0,g.Xm.fromTypedArray(t),n,g.Xm.fromTypedArray(r),o,g.xs.fromTypedArray(i))?i:null}function A(e,t,n,r){return(0,f.projectBuffer)(e,t,0,n,r,0)?n:null}function b(e,t,n,r){return(0,f.projectBuffer)(e,t,0,n,r,0)?n:null}function M(e,t,n){return(0,o.Ge)(L,n),(0,y.b)(t,e,L),(0,r.or)(L)&&(0,y.n)(t,t),t}function C(e,t,n){return(0,o.z0)(L,n),(0,m.t)(t,e,L),(0,r.or)(L)&&(0,y.n)(t,t,4),t}function T(e,t,n,r,o,i){if(!Z(0,g.xs.fromTypedArray(e,4*Float32Array.BYTES_PER_ELEMENT),1,g.Xm.fromTypedArray(t),n,g.Xm.fromTypedArray(r),o,g.xs.fromTypedArray(i,4*Float32Array.BYTES_PER_ELEMENT)))return null;for(let t=3;t<e.length;t+=4)i[t]=e[t];return i}function S(e,t,n,r,o,i){if(!Z(1,g.xs.fromTypedArray(e,16),1,g.Xm.fromTypedArray(t),n,g.Xm.fromTypedArray(r),o,g.xs.fromTypedArray(i,16)))return null;for(let t=3;t<e.length;t+=4)i[t]=e[t];return i}function R(e,t,n,r,i){switch((0,c.l)(r,n,B,r),1===e&&(0,s.B8)(B,B),t){case 0:return(0,o.Ge)(i,B);case 1:return(0,o.z0)(i,B)}}function Z(e,t,n,r,o,i,s,a){if(!t)return;const u=r.count;if(function(e){return e.isWGS84||(0,p.x1)(e)||(0,p.q8)(e)||(0,p.KQ)(e)}(o))for(let r=0;r<u;r++)i.getVec(r,U),t.getVec(r,N),(0,l.t)(N,N,R(e,n,U,s,L)),a.setVec(r,N);else for(let o=0;o<u;o++){i.getVec(o,U),t.getVec(o,N);const u=(0,h.jg)(r.get(o,1));let c=Math.cos(u);1===n!=(0===e)&&(c=1/c),R(e,n,U,s,L),0===e?(L[0]*=c,L[1]*=c,L[2]*=c,L[3]*=c,L[4]*=c,L[5]*=c):(L[0]*=c,L[3]*=c,L[6]*=c,L[1]*=c,L[4]*=c,L[7]*=c),(0,l.t)(N,N,L),(0,l.n)(N,N),a.setVec(o,N)}return a}const U=(0,u.vt)(),N=(0,u.vt)(),B=(0,a.vt)(),L=(0,i.vt)()},27615:(e,t,n)=>{n.d(t,{CK:()=>l,Hq:()=>a,MW:()=>u,TE:()=>c,yJ:()=>f});var r=n(38954),o=n(86738),i=n(95696),s=n(18251);function a(e){return null!=e.origin}function l(e){return a(e.vertexSpace)}function u(e,t){if(!a(e))return null;const[n,r,i]=e.origin;return new o.A({x:n,y:r,z:i,spatialReference:t})}function c(e,t){const{x:n,y:r,z:o,spatialReference:a}=e,l=[n,r,o??0];return"local"===(t?.vertexSpace??function(e){return e.isGeographic||e.isWebMercator?"local":"georeferenced"}(a))?new s.A({origin:l}):new i.A({origin:l})}function f(e,t){return e.type===t.type&&(e.origin===t.origin||null!=e.origin&&null!=t.origin&&(0,r.m)(e.origin,t.origin))}},31199:(e,t,n)=>{function r(e,t,n,r){const{loggerTag:o,stride:i}=t;return e.length%i!==0?(r.error(o,`Invalid array length, expected a multiple of ${i}`),new n([])):e}function o(e,t,n,o,i){if(!e)return e;if(e instanceof t)return r(e,o,t,i);for(const s of n)if(e instanceof s)return r(new t(e),o,t,i);if(Array.isArray(e))return r(new t(e),o,t,i);{const r=n.map(e=>`'${e.name}'`);return i.error(`Failed to set property, expected one of ${r}, but got ${e.constructor.name}`),new t([])}}function i(e,t,n){t[n]=function(e){const t=new Array(e.length);for(let n=0;n<e.length;n++)t[n]=e[n];return t}(e)}n.d(t,{B:()=>i,b:()=>o})},35063:(e,t,n)=>{n.d(t,{A:()=>m});var r,o=n(31635),i=n(69540),s=n(21287),a=n(25482),l=n(91429),u=n(56507),c=n(66895),f=n(97159),p=n(43937),h=n(36005);const g=new WeakMap;let y=0,m=class extends((0,i.OU)(a.o)){static{r=this}constructor(e){super(e),this.wrap="repeat"}get url(){return this._get("url")||null}set url(e){this._set("url",e),e&&this._set("data",null)}get data(){return this._get("data")||null}set data(e){this._set("data",e),e&&this._set("url",null)}writeData(e,t,n,r){if(e instanceof HTMLImageElement){const o={type:"image-element",src:(0,f.t)(e.src,r),crossOrigin:e.crossOrigin};t[n]=o}else if(e instanceof HTMLCanvasElement){const r={type:"canvas-element",imageData:d(e.getContext("2d").getImageData(0,0,e.width,e.height))};t[n]=r}else if(e instanceof HTMLVideoElement){const o={type:"video-element",src:(0,f.t)(e.src,r),autoplay:e.autoplay,loop:e.loop,muted:e.muted,crossOrigin:e.crossOrigin,preload:e.preload};t[n]=o}else if(e instanceof ImageData){const r={type:"image-data",imageData:d(e)};t[n]=r}}readData(e){switch(e.type){case"image-element":{const t=new Image;return t.src=e.src,t.crossOrigin=e.crossOrigin,t}case"canvas-element":{const t=x(e.imageData),n=document.createElement("canvas");return n.width=t.width,n.height=t.height,n.getContext("2d").putImageData(t,0,0),n}case"image-data":return x(e.imageData);case"video-element":{const t=document.createElement("video");return t.src=e.src,t.crossOrigin=e.crossOrigin,t.autoplay=e.autoplay,t.loop=e.loop,t.muted=e.muted,t.preload=e.preload,t}default:return}}get transparent(){const{data:e,url:t}=this,n=e=>e?.toLowerCase().endsWith(".png")||e?.toLocaleLowerCase().startsWith("data:image/png;");return e instanceof HTMLCanvasElement?v(e.getContext("2d").getImageData(0,0,e.width,e.height)):e instanceof ImageData?v(e):!(!t||!n(t))||!!(e instanceof HTMLImageElement&&n(e.src))}set transparent(e){this._overrideIfSome("transparent",e)}get contentHash(){const e="string"==typeof this.wrap?this.wrap:"object"==typeof this.wrap?`${this.wrap.horizontal}/${this.wrap.vertical}`:"",t=(t="")=>`d:${t},t:${this.transparent},w:${e}`;return null!=this.url?t(this.url):null!=this.data?this.data instanceof HTMLImageElement||this.data instanceof HTMLVideoElement?t(this.data.src):(g.has(this.data)||g.set(this.data,++y),t(g.get(this.data))):t()}get memoryUsage(){let e=0;if(e+=null!=this.url?this.url.length:0,null!=this.data){const t=this.data;"data"in t?e+=t.data.byteLength:t instanceof HTMLImageElement?e+=t.naturalWidth*t.naturalHeight*3:t instanceof HTMLCanvasElement&&(e+=t.width*t.height*3)}return e}clone(e){const t=(0,c.$N)(e),n=t?.textureMap?.get(this);if(n)return n;const r=super.clone(e);return t?.textureMap?.set(this,r),r}static from(e){return"string"==typeof e?new r({url:e}):e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof ImageData||e instanceof HTMLVideoElement?new r({data:e}):(0,u.PZ)(r,e)}};function d(e){let t="";for(let n=0;n<e.data.length;n++)t+=String.fromCharCode(e.data[n]);return{data:btoa(t),width:e.width,height:e.height}}function x(e){const t=atob(e.data),n=new Uint8ClampedArray(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return(0,s.eV)(n,e.width,e.height)}function v(e){for(let t=3;t<e.data.length;t+=4)if(255!==e.data[t])return!0;return!1}(0,o.Cg)([(0,l.MZ)({type:String,json:{write:f.w}})],m.prototype,"url",null),(0,o.Cg)([(0,l.MZ)({clonable:"reference",json:{write:{overridePolicy(){return{enabled:!this.url}}}}})],m.prototype,"data",null),(0,o.Cg)([(0,p.K)("data")],m.prototype,"writeData",null),(0,o.Cg)([(0,h.w)("data")],m.prototype,"readData",null),(0,o.Cg)([(0,l.MZ)({type:Boolean,json:{write:{overridePolicy(){return{enabled:this._isOverridden("transparent")}}}}})],m.prototype,"transparent",null),(0,o.Cg)([(0,l.MZ)({json:{write:!0}})],m.prototype,"wrap",void 0),(0,o.Cg)([(0,l.MZ)({readOnly:!0})],m.prototype,"contentHash",null),m=r=(0,o.Cg)([(0,l.$K)("esri.geometry.support.MeshTexture")],m)},40036:(e,t,n)=>{n.d(t,{default:()=>Ve});var r=n(31635),o=n(69540),i=n(49186),s=n(92474),a=n(53966),l=n(61893),u=n(74887),c=n(36708),f=n(91429),p=n(51850),h=n(91075),g=n(86738),y=n(39829),m=n(70328),d=n(24770),x=n(16939);const v="Expected location to be a Point instance";class w extends i.A{constructor(){super("invalid-input:location",v)}}var A=n(95696),b=n(18251),M=n(73836),C=n(1193),T=n(27615),S=n(83349),R=n(95108),Z=n(4197),U=n(97146),N=n(34727),B=n(86211),L=n(38954),F=n(27921);function j(e,t,n){const r=function(e,t,n,r){const o=(e=>!Array.isArray(e[0]))(t)?(e,n)=>t[3*e+n]:(e,n)=>t[e][n],i=r?(0,B.GA)(r)/(0,B.G9)(r):1;return(0,F.lU)(e,(e,t)=>(0,L.h)(e,o(t,0)*i,o(t,1)*i,o(t,2)),n)}(O,e,t,n)?(0,F.Qj)(O):[0,0,1];return Math.abs(r[2])>Math.cos((0,N.kU)(80))?2:Math.abs(r[1])>Math.abs(r[0])?1:0}const O=(0,F.vt)();var E=n(9318);function _(e,t,n,r){const o=e.length,i=new Array(o),s=new Array(o),a=new Array(o),l=e.reduce((e,t)=>e+t.length,0);let u=0,c=0,f=0;const p=(0,Z.jh)(3*l);let h=0;for(let l=o-1;l>=0;l--){const g=e[l],y=1===n&&P(g,t,r);if(y&&1!==o)i[u++]=g;else{let e=g.length;for(let t=0;t<u;++t)e+=i[t].length;const n={index:h,pathLengths:new Array(u+1),count:e,holeIndices:new Array(u)};n.pathLengths[0]=g.length,g.length>0&&(a[f++]={index:h,count:g.length}),h=y?$(g,g.length-1,-1,p,h,g.length,t):$(g,0,1,p,h,g.length,t);for(let e=0;e<u;++e){const r=i[e];n.holeIndices[e]=h,n.pathLengths[e+1]=r.length,r.length>0&&(a[f++]={index:h,count:r.length}),h=$(r,0,1,p,h,r.length,t)}u=0,n.count>0&&(s[c++]=n)}}for(let e=0;e<u;++e){const n=i[e];n.length>0&&(a[f++]={index:h,count:n.length}),h=$(n,0,1,p,h,n.length,t)}return s.length=c,a.length=f,{position:p,polygons:s,outlines:a}}function $(e,t,n,r,o,i,s){o*=3;for(let a=0;a<i;++a){const i=e[t];r[o++]=i[0],r[o++]=i[1],r[o++]=s&&i[2]?i[2]:0,t+=n}return o/3}function P(e,t,n){if(!t)return!(0,R.$3)(e);switch(j(e,e.length-1,n)){case 0:return!(0,R.$3)(e,1,2);case 1:return!(0,R.$3)(e,0,2);case 2:return!(0,R.$3)(e,0,1)}}var z=n(65806),I=n(51447);function D(e,t,n,r){if(void 0!==r){(0,I.io)(e(),"option: geographic",{replacement:"Use mesh `vertexSpace` and spatial reference to control how operations are performed instead.",version:"4.30",warnOnce:!0});const o="local"===t.type;if(!(0,T.Hq)(t)||r===o)return n.isGeographic||n.isWebMercator&&r;e().warnOnce(`Specifying the 'geographic' parameter (${r}) for a Mesh vertex space of type "${t.type}" is not supported. This parameter will be ignored.`)}switch(t.type){case"georeferenced":return n.isGeographic;case"local":return n.isGeographic||n.isWebMercator}}var H=n(22141),q=n(72258);const K=()=>a.A.getLogger("esri.geometry.support.meshUtils.centerAt");const k=(0,p.vt)(),G=(0,p.vt)(),V=(0,p.vt)();var W=n(9093),X=n(5443),Y=n(91218),J=n(98764),Q=n(48353),ee=n(9762),te=n(73354);const ne=(0,W.vt)(),re=(0,Z.jh)(24);var oe=n(84952);function ie(e){const t=(0,oe.nM)(e.url);return n=>{const r=(0,oe.V1)(n,t,t),o=r?r.replace(/^ *\.\//,""):null;return(o?e.files.get(o):null)??n}}async function se(e,t){switch(e.type){case"client":return Array.isArray(e.files)?function(e){if(!e.length)throw new i.A("mesh-load-external:missing-assets","There must be at least one file to load");return he(e.map(e=>({name:e.name,mimeType:e.type,source:ae(e)})))}(e.files):ae(e.files);case"service":return async function(e,t){if(!e.length)throw new i.A("mesh-load-external:missing-assets","There must be at least one file to load");const n=await(0,u.nA)(e.map(async e=>{const n=await async function(e,t){const{parts:n,assetMimeType:r,assetName:o}=e;if(1===n.length)return new ge(n[0].partUrl);const i=await e.toBlob(t);return(0,u.Te)(t),ge.fromBlob(i,ye(o,r))}(e);return(0,u.Te)(t),{name:e.assetName,mimeType:e.assetMimeType,source:n}}));if((0,u.G4)(t))throw n.forEach(e=>e.source.dispose()),(0,u.NK)();return he(n)}(e.assets,t);default:throw new i.A("mesh-load-external:invalid-source","Invalid source type")}}function ae(e){return ge.fromBlob(e,ye(e.name,e.type))}const le=/^model\/gltf\+json$/,ue=/^model\/gltf-binary$/,ce=/\.gltf$/i,fe=/\.glb$/i;function pe({mimeType:e,source:t,name:n}){return le.test(e)||ce.test(n)?{url:t.url,type:"gltf"}:ue.test(e)||fe.test(n)?{url:t.url,type:"glb"}:null}function he(e){const t=new Map;let n=null,r=null;for(const o of e){const{source:e,name:i}=o;n??=pe(o),"ESRI3DO_NORM.glb"===i&&(r=pe(o)),t.set(i,e.url),e.files.forEach((e,n)=>t.set(n,e))}const o=r??n;if(null==o)throw new i.A("mesh-load-external:missing-files","Missing files to load external mesh source");return new ge(o.url,()=>e.forEach(({source:e})=>e.dispose()),t,o.type)}class ge{constructor(e,t=()=>{},n=new Map,r){this.url=e,this.dispose=t,this.files=n,this.type=r}static fromBlob(e,t){const n=URL.createObjectURL(e);return new ge(n,()=>URL.revokeObjectURL(n),void 0,t)}}function ye(e,t){return le.test(t)||ce.test(e)?"gltf":ue.test(t)||ce.test(e)?"glb":void 0}var me=n(66895),de=n(7762),xe=n(63579);let ve=class extends o.Pw{constructor(e){super(e),this.externalSources=new de.A,this._explicitDisplaySource=null,this.addHandles((0,c.on)(()=>this.externalSources,"after-remove",({item:e})=>{e===this._explicitDisplaySource&&(this._explicitDisplaySource=null)},{sync:!0,onListenerRemove:()=>this._explicitDisplaySource=null}))}get displaySource(){return this._explicitDisplaySource??this._implicitDisplaySource}set displaySource(e){if(null!=e&&!(0,xe.yr)(e))throw new Error("Cannot use this source for display: it is not in a supported format.");this._explicitDisplaySource=e,e&&this.externalSources.every(t=>!(0,xe.in)(t,e))&&this.externalSources.add(e)}clearSources(){this.externalSources.removeAll()}getExternalSourcesOnService(e){return this.externalSources.items.filter(t=>(0,xe.eN)(t,e))}get _implicitDisplaySource(){return this.externalSources.find(xe.yr)}};(0,r.Cg)([(0,f.MZ)()],ve.prototype,"externalSources",void 0),(0,r.Cg)([(0,f.MZ)()],ve.prototype,"displaySource",null),(0,r.Cg)([(0,f.MZ)()],ve.prototype,"_implicitDisplaySource",null),(0,r.Cg)([(0,f.MZ)()],ve.prototype,"_explicitDisplaySource",void 0),ve=(0,r.Cg)([(0,f.$K)("esri.geometry.support.meshUtils.Metadata")],ve);var we=n(29242);const Ae={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[3,1,2],west:[-3,-1,2],north:[-1,3,2],south:[1,-3,2],up:[1,2,3],down:[1,-2,-3]}};function be(e,t,n){e.isPlane||function(e){for(let t=0;t<e.position.length;t+=3)e.position[t+2]+=.5}(e),function(e,t){if(null!=t){Se[0]=t[0],Se[4]=t[1],Se[8]=t[2];for(let t=0;t<e.position.length;t+=3){for(let n=0;n<3;n++)Te[n]=e.position[t+n];(0,L.t)(Te,Te,Se);for(let n=0;n<3;n++)e.position[t+n]=Te[n]}if(t[0]!==t[1]||t[1]!==t[2]){Se[0]=1/t[0],Se[4]=1/t[1],Se[8]=1/t[2];for(let t=0;t<e.normal.length;t+=3){for(let n=0;n<3;n++)Te[n]=e.normal[t+n];(0,L.t)(Te,Te,Se),(0,L.n)(Te,Te);for(let n=0;n<3;n++)e.normal[t+n]=Te[n]}}}}(e,function(e,t,n){const r=(0,q.xK)(t,n);if(null==e&&1===r)return null;if(null==e)return[r,r,r];if("number"==typeof e){const t=e*r;return[t,t,t]}return[null!=e.width?e.width*r:r,null!=e.depth?e.depth*r:r,null!=e.height?e.height*r:r]}(n?.size,n?.unit,t.spatialReference));const r=(0,T.TE)(t,n),o=t.spatialReference.isGeographic?(0,T.TE)(t):r,i=(0,q.UR)({vertexAttributes:e,vertexSpace:o,spatialReference:t.spatialReference},r,{allowBufferReuse:!0});return{vertexAttributes:new C.A({...i,uv:e.uv}),vertexSpace:r,components:[new x.A({faces:e.faces,material:n?.material||null})],spatialReference:t.spatialReference}}const Me={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0,1,2,0,2,3]},Ce={south:0,east:1,north:2,west:3,up:4,down:5},Te=(0,p.vt)(),Se=(0,we.vt)();var Re=n(77690),Ze=n(58083),Ue=n(67026),Ne=n(82534);const Be=()=>a.A.getLogger("esri.geometry.support.meshUtils.rotate");function Le(e,t,n,r=p.uY){if(null!=e){(0,Ze.$0)(Ee,(0,d.$I)(t),(0,d.yo)(t));for(let t=0;t<e.length;t+=n){for(let n=0;n<3;n++)Fe[n]=e[t+n]-r[n];(0,L.p)(Fe,Fe,Ee);for(let n=0;n<3;n++)e[t+n]=Fe[n]+r[n]}}}const Fe=(0,p.vt)(),je=(0,W.vt)(),Oe=(0,d.vt)(),Ee=(0,W.vt)(),_e=(0,we.vt)(),$e=(0,p.vt)(),Pe=(0,Ne.vt)(),ze=()=>a.A.getLogger("esri.geometry.support.meshUtils.scale");function Ie(e,t,n=p.uY){if(e)for(let r=0;r<e.length;r+=3){for(let t=0;t<3;t++)De[t]=e[r+t]-n[t];(0,L.j)(De,De,t);for(let t=0;t<3;t++)e[r+t]=De[t]+n[t]}}const De=(0,p.vt)(),He=(0,p.vt)(),qe=(0,W.vt)(),Ke=(0,p.vt)();var ke;const Ge={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:A.A,local:b.A}};let Ve=ke=class extends((0,o.OU)((0,s.WV)((0,l.g)(h.A)))){constructor(e){super(e),this.components=null,this.vertexSpace=new A.A,this.transform=null,this.metadata=new ve,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new C.A,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when(()=>{this.addHandles((0,c.wB)(()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map(e=>e.clone())}),()=>this._clearSources(),{once:!0,sync:!0}))})}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _transformedExtent(){const{spatialReference:e,vertexSpace:t}=this,n=this;return function(e){const{spatialReference:t,vertexSpace:n,untransformedBounds:r}=e,o=(0,m.gE)(r,re);if((0,T.Hq)(n)&&e.transform&&(0,te.t)(o,o,e.transform.localMatrix),"georeferenced"===n.type){const e=n.origin;return e&&(0,te.a)(o,o,e),(0,m.w1)((0,m.vY)(o),t)}const i=(0,J.lO)(t),s=n.origin;if(!(0,Y.canProjectWithoutEngine)(i,t)){const[e,n,r]=s;return new X.A({xmin:e,ymin:n,zmin:r,xmax:e,ymax:n,zmax:r,spatialReference:t})}return(0,Q.l)(t,s,ne,i),(0,te.t)(o,o,ne),(0,ee.projectBuffer)(o,i,0,o,t,0),(0,m.w1)((0,m.vY)(o),t)}({get transform(){return n.transform},vertexSpace:t,spatialReference:e,untransformedBounds:this._untransformedBounds})}get _untransformedBounds(){const{vertexAttributes:{position:e},components:t}=this;return 0===e.length||0===t?.length?(0,m.vt)(m.v_):(0,m.vY)(e)}get origin(){const e=(0,T.MW)(this.vertexSpace,this.spatialReference);if(null!=e)return e;const{center:t,zmin:n}=this._transformedExtent;return new g.A({x:t.x,y:t.y,z:n,spatialReference:this.spatialReference})}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._transformedExtent:this.metadata.displaySource.extent.clone()}addComponent(e){this._checkIfLoaded("addComponent()")&&(this.components||(this.components=[]),this.components.push(x.A.from(e)),this.notifyChange("components"))}removeComponent(e){if(this._checkIfLoaded("removeComponent()")){if(this.components){const t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}a.A.getLogger(this).error("removeComponent()","Provided component is not part of the list of components")}}rotate(e,t,n,r){return(0,d.AU)(e,t,n,We),function(e,t,n){if(!e.vertexAttributes?.position||0===t[3])return;const{spatialReference:r,vertexSpace:o}=e,i=n?.origin??e.origin,s=n?.geographic,a=D(Be,o,r,s);(0,T.CK)(e)?function(e,t,n){e.transform??=new M.A;const{vertexSpace:r,transform:o,spatialReference:i}=e,[s,a,l]=r.origin,u=new g.A({x:s,y:a,z:l,spatialReference:i}),c=Fe;if(u.equals(n))(0,L.h)(c,0,0,0);else if(!(0,q.p5)(c,n,e))return void(0,H.CN)(Be(),n.spatialReference,i,H.JP);(0,Ue.x8)(Pe,(0,d.yo)(t),(0,d.$I)(t));const f=(0,Ze.O7)(je,Pe,p.uY,p.Un,c),{localMatrix:h}=o,y=(0,Ze.lw)(je,f,h);o.scale=(0,Ze.X_)((0,p.vt)(),y),(0,Ze.hs)(y,y,(0,L.o)(Fe,o.scale));const m=o.rotationAxis;o.rotation=(0,d.ui)(y),0===o.rotationAngle&&(o.rotationAxis=m),o.translation=(0,Ze.sC)((0,p.vt)(),y)}(e,t,i):a?function(e,t,n){const r=e.spatialReference,o=(0,J.lO)(r),i=$e;if(!(0,z.g)(n,i,o)&&((0,H.CN)(Be(),n.spatialReference,o,"Falling back to mesh origin"),!(0,z.g)(e.origin,i,o)))return void(0,H.CN)(Be(),e.origin.spatialReference,o);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,u=new Float64Array(s.length),c=null!=a?new Float32Array(a.length):null,f=null!=l?new Float32Array(l.length):null;(0,Q.l)(o,i,Ee,o),(0,Re.z0)(_e,Ee);const p=Oe;(0,L.t)((0,d.yo)(Oe),(0,d.yo)(t),_e),p[3]=t[3],!(0,H.gr)(s,r,u,o)||null!=a&&null!=c&&!(0,H.X4)(a,s,r,u,o,c)||null!=l&&null!=f&&!(0,H.xA)(l,s,r,u,o,f)?(0,H.CN)(Be(),r,o):(Le(u,p,3,i),!(0,H.$5)(u,o,s,r)||null!=a&&null!=c&&(Le(c,p,3),!(0,H.si)(c,s,r,u,o,a))||null!=l&&null!=f&&(Le(f,p,4),!(0,H.Mv)(f,s,r,u,o,l))?(0,H.CN)(Be(),o,r):e.vertexAttributesChanged())}(e,t,i):function(e,t,n){const r=$e;if(!(0,z.g)(n,r,e.spatialReference)){const t=e.origin;return r[0]=t.x,r[1]=t.y,r[2]=t.z,void(0,H.CN)(Be(),n.spatialReference,e.spatialReference,H.JP)}Le(e.vertexAttributes.position,t,3,r),Le(e.vertexAttributes.normal,t,3),Le(e.vertexAttributes.tangent,t,4),e.vertexAttributesChanged()}(e,t,i)}(this,We,r),this}offset(e,t,n){if(!this._checkIfLoaded("offset()"))return this;const{vertexSpace:r,vertexAttributes:o}=this,i=o?.position;if(!i)return this;if((0,T.Hq)(r)){const[o,i,s]=r.origin;r.origin=(0,p.fA)(o+e,i+t,s+n)}else{for(let r=0;r<i.length;r+=3)i[r]+=e,i[r+1]+=t,i[r+2]+=n;this.vertexAttributesChanged()}return this}scale(e,t){return this._checkIfLoaded("scale()")?(function(e,t,n){if(!e.vertexAttributes?.position)return;const{vertexSpace:r,spatialReference:o}=e,i=n?.origin??e.origin,s=n?.geographic,a=D(ze,r,o,s);(0,T.CK)(e)?function(e,t,n){e.transform??=new M.A;const{vertexSpace:r,transform:o,spatialReference:i}=e,[s,a,l]=r.origin,u=new g.A({x:s,y:a,z:l,spatialReference:i}),c=De;if(u.equals(n))(0,L.h)(c,0,0,0);else if(!(0,q.p5)(c,n,e))return void(0,H.CN)(ze(),n.spatialReference,i,H.JP);const f=(0,L.h)(He,t,t,t),h=(0,Ze.O7)(qe,Ne.zK,p.uY,f,c),{localMatrix:y}=o,m=(0,Ze.lw)(qe,h,y);o.scale=(0,Ze.X_)((0,p.vt)(),m),(0,Ze.hs)(m,m,(0,L.o)(De,o.scale));const x=o.rotationAxis;o.rotation=(0,d.ui)(m),0===o.rotationAngle&&(o.rotationAxis=x),o.translation=(0,Ze.sC)((0,p.vt)(),m)}(e,t,i):a?function(e,t,n){const r=e.spatialReference,o=(0,J.lO)(r),i=Ke;if(!(0,z.g)(n,i,o)&&((0,H.CN)(ze(),n.spatialReference,o,"Falling back to mesh origin"),!(0,z.g)(e.origin,i,o)))return void(0,H.CN)(ze(),e.origin.spatialReference,o);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,u=new Float64Array(s.length),c=null!=a?new Float32Array(a.length):null,f=null!=l?new Float32Array(l.length):null;!(0,H.gr)(s,r,u,o)||null!=a&&null!=c&&!(0,H.X4)(a,s,r,u,o,c)||null!=l&&null!=f&&!(0,H.xA)(l,s,r,u,o,f)?(0,H.CN)(ze(),r,o):(Ie(u,t,i),!(0,H.$5)(u,o,s,r)||null!=a&&null!=c&&!(0,H.si)(c,s,r,u,o,a)||null!=l&&null!=f&&!(0,H.Mv)(f,s,r,u,o,l)?(0,H.CN)(ze(),o,r):e.vertexAttributesChanged())}(e,t,i):function(e,t,n){const r=Ke;if(!(0,z.g)(n,r,e.spatialReference)){const t=e.origin;return r[0]=t.x,r[1]=t.y,r[2]=t.z,void(0,H.CN)(ze(),n.spatialReference,e.spatialReference,H.JP)}Ie(e.vertexAttributes.position,t,r),e.vertexAttributesChanged()}(e,t,i)}(this,e,t),this):this}centerAt(e,t){return this._checkIfLoaded("centerAt()")?(function(e,t,n){if(!e.vertexAttributes?.position)return;const{vertexSpace:r}=e,o=n?.origin??e.origin,i=D(K,r,o.spatialReference,n?.geographic);(0,T.Hq)(r)?function(e,t,n){const{vertexSpace:r}=e;if(!(0,T.Hq)(r))return;const o=G,i=k;if(!(0,z.g)(t,i,e.spatialReference))return void(0,H.CN)(K(),t.spatialReference,e.spatialReference,H.JP);if(!(0,z.g)(n,o,e.spatialReference)){const t=e.origin;return o[0]=t.x,o[1]=t.y,o[2]=t.z,void(0,H.CN)(K(),n.spatialReference,e.spatialReference,H.JP)}const s=(0,L.e)(V,i,o);r.origin=(0,L.i)((0,p.vt)(),r.origin,s)}(e,t,o):i?function(e,t,n){const r=(0,p.fA)(n.x,n.y,n.z??0),o=(0,q.UR)(e,new b.A({origin:r}));if(!o)return;const i=(0,p.fA)(t.x,t.y,t.z??0),s=(0,q.UR)({vertexAttributes:o,spatialReference:e.spatialReference,vertexSpace:new b.A({origin:i})},A.A.absolute);if(!s)return;const{position:a,normal:l,tangent:u}=s;e.vertexAttributes.position=a,e.vertexAttributes.normal=l,e.vertexAttributes.tangent=u,e.vertexAttributesChanged()}(e,t,o):function(e,t,n){const r=G,o=k;if((0,z.g)(t,o,e.spatialReference)){if(!(0,z.g)(n,r,e.spatialReference)){const t=e.origin;return r[0]=t.x,r[1]=t.y,r[2]=t.z,void(0,H.CN)(K(),n.spatialReference,e.spatialReference,H.JP)}(function(e,t,n){if(e)for(let r=0;r<e.length;r+=3)for(let o=0;o<3;o++)e[r+o]+=t[o]-n[o]})(e.vertexAttributes.position,o,r),e.vertexAttributesChanged()}else(0,H.CN)(K(),t.spatialReference,e.spatialReference,H.JP)}(e,t,o)}(this,e,t),this):this}load(e){const{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(async function(e,t,r){switch(t.source.type){case"client":case"service":return async function(e,t,r){const{source:o}=t,{loadGLTFMesh:s}=await(0,u.qr)(n.e(7375).then(n.bind(n,97375)),r),a=await se(o,r);(0,u.Te)(r);const l=s(new g.A({x:0,y:0,z:0,spatialReference:e.spatialReference}),a.url,{resolveFile:ie(a),signal:r?.signal,expectedType:a.type,unitConversionDisabled:t.unitConversionDisabled});l.then(()=>a.dispose(),()=>a.dispose());const{mesh:{vertexAttributes:c,components:f},meta:{isDracoDecompressed:p}}=await l;if(p)throw new i.A("mesh-load-external:draco-not-supported","The provided mesh uses Draco compression which is not supported.");e.vertexAttributes=c,e.components=f}(e,t,r);case"loadable":return t.source.load(e,r);default:t.source}}(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(e){return super.clone((0,me.WO)((0,me.QN)(e)))}cloneShallow(){return new ke({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){const[{toBinaryGLTF:t}]=await Promise.all([n.e(4038).then(n.bind(n,84038)),this.load(e)]);return(0,u.Te)(e),await t(this,e)}get usedMemory(){return this.components?this.components.reduce((e,t)=>e+t.memoryUsage,this.vertexAttributes.usedMemory):this.vertexAttributes.usedMemory}_clearSources(){this.metadata.clearSources()}_checkIfLoaded(e){return!!this.loaded||(a.A.getLogger(this).error(e,"Mesh must be loaded before applying operations"),!1)}static createBox(e,t){if(!(e instanceof g.A))return a.A.getLogger(this.prototype).error(".createBox()",v),null;const n=new ke(be(function(){const{faceDescriptions:e,faceVertexOffsets:t,uvScales:n}=Me,r=4*e.length,o=new Float64Array(3*r),i=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array(2*e.length*3);let l=0,u=0,c=0,f=0;for(let r=0;r<e.length;r++){const p=e[r],h=l/3;for(const e of t)a[f++]=h+e;const g=p.corners;for(let e=0;e<4;e++){const t=g[e];let r=0;s[c++]=.25*n[e][0]+p.uvOrigin[0],s[c++]=p.uvOrigin[1]-.25*n[e][1];for(let e=0;e<3;e++)0!==p.axis[e]?(o[l++]=.5*p.axis[e],i[u++]=p.axis[e]):(o[l++]=.5*t[r++],i[u++]=0)}}return{position:o,normal:i,uv:s,faces:a}}(),e,t));return t?.imageFace&&"all"!==t.imageFace?function(e,t){const n=e.components[0],r=n.faces,o=Ce[t],i=6*o,s=new Array(6),a=new Array(r.length-6);let l=0,u=0;for(let e=0;e<r.length;e++)e>=i&&e<i+6?s[l++]=r[e]:a[u++]=r[e];if(null!=e.vertexAttributes.uv){const t=new Float32Array(e.vertexAttributes.uv),n=4*o*2,r=[0,1,1,1,1,0,0,0];for(let e=0;e<r.length;e++)t[n+e]=r[e];e.vertexAttributes.uv=t}return e.components=[new x.A({faces:s,material:n.material}),new x.A({faces:a})],e}(n,t.imageFace):n}static createSphere(e,t){return e instanceof g.A?new ke(be(function(e=0){const t=Math.round(8*2**e),n=2*t,r=(t-1)*(n+1)+2*n,o=new Float64Array(3*r),i=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array((t-1)*n*2*3);let l=0,u=0,c=0,f=0;for(let e=0;e<=t;e++){const r=e/t*Math.PI+.5*Math.PI,p=Math.cos(r),h=Math.sin(r);Te[2]=h;const g=0===e||e===t,y=g?n-1:n;for(let r=0;r<=y;r++){const h=r/y*2*Math.PI;Te[0]=-Math.sin(h)*p,Te[1]=Math.cos(h)*p;for(let e=0;e<3;e++)o[l]=.5*Te[e],i[l]=Te[e],++l;s[u++]=(r+(g?.5:0))/n,s[u++]=e/t,0!==e&&r!==n&&(e!==t&&(a[c++]=f,a[c++]=f+1,a[c++]=f-n),1!==e&&(a[c++]=f,a[c++]=f-n,a[c++]=f-n-1)),f++}}return{position:o,normal:i,uv:s,faces:a}}(t?.densificationFactor||0),e,t)):(a.A.getLogger(this.prototype).error(".createSphere()",v),null)}static createCylinder(e,t){return e instanceof g.A?new ke(be(function(e=0){const t=Math.round(16*2**e),n=4*(t+1)+2*t,r=new Float64Array(3*n),o=new Float32Array(3*n),i=new Float32Array(2*n),s=new Uint32Array(4*t*3);let a=0,l=0,u=0,c=0,f=0;for(let e=0;e<=5;e++){const n=0===e||5===e,p=e<=1||e>=4,h=2===e||4===e,g=n?t-1:t;for(let y=0;y<=g;y++){const m=y/g*2*Math.PI,d=n?0:.5;Te[0]=d*Math.sin(m),Te[1]=d*-Math.cos(m),Te[2]=e<=2?.5:-.5;for(let t=0;t<3;t++)r[a++]=Te[t],o[l++]=p?2===t?e<=1?1:-1:0:2===t?0:Te[t]/d;i[u++]=(y+(n?.5:0))/t,i[u++]=e<=1?1*e/3:e<=3?1*(e-2)/3+1/3:1*(e-4)/3+2/3,h||0===e||y===t||(5!==e&&(s[c++]=f,s[c++]=f+1,s[c++]=f-t),1!==e&&(s[c++]=f,s[c++]=f-t,s[c++]=f-t-1)),f++}}return{position:r,normal:o,uv:i,faces:s}}(t?.densificationFactor||0),e,t)):(a.A.getLogger(this.prototype).error(".createCylinder()",v),null)}static createPlane(e,t){if(!(e instanceof g.A))return a.A.getLogger(this.prototype).error(".createPlane()",v),null;const n=t?.facing??"up",r=function(e,t){const n="number"==typeof t?t:null!=t?t.width:1,r="number"==typeof t?t:null!=t?t.height:1;switch(e){case"up":case"down":return{width:n,depth:r};case"north":case"south":return{width:n,height:r};case"east":case"west":return{depth:n,height:r}}}(n,t?.size);return new ke(be(function(e){const t=Ae.facingAxisOrderSwap[e],n=Ae.position,r=Ae.normal,o=new Float64Array(n.length),i=new Float32Array(r.length);let s=0;for(let e=0;e<4;e++){const e=s;for(let a=0;a<3;a++){const l=t[a],u=Math.abs(l)-1,c=l>=0?1:-1;o[s]=n[e+u]*c,i[s]=r[e+u]*c,s++}}return{position:o,normal:i,uv:new Float32Array(Ae.uv),faces:new Uint32Array(Ae.faces),isPlane:!0}}(n),e,{...t,size:r}))}static createFromPolygon(e,t){if(!(e instanceof y.A))return a.A.getLogger(this.prototype).error(".createFromPolygon()","Expected polygon to be a Polygon instance"),null;const n=function(e){const t=_(e.rings,e.hasZ,1,e.spatialReference),n=new Array;let r=0,o=0;for(const e of t.polygons){const i=e.count,s=e.index,a=(0,Z.l5)(t.position,3*s,3*i),l=e.holeIndices.map(e=>e-s),u=(0,U.uW)((0,S.e)(a,l,3));n.push({position:a,faces:u}),r+=a.length,o+=u.length}const i=function(e,t,n){if(1===e.length)return e[0];const r=(0,Z.jh)(t),o=new Array(n);let i=0,s=0,a=0;for(const t of e){for(let e=0;e<t.position.length;e++)r[i++]=t.position[e];for(const e of t.faces)o[s++]=e+a;a=i/3}return{position:r,faces:(0,U.uW)(o)}}(n,r,o),s=Array.isArray(i.position)?(0,E.b)(i.position,3,{originalIndices:i.faces}):(0,E.b)(i.position.buffer,6,{originalIndices:i.faces});return i.position=(0,Z.xm)(new Float64Array(s.buffer)),i.faces=s.indices,i}(e);return new ke({vertexAttributes:new C.A({position:n.position}),components:[new x.A({faces:n.faces,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference,vertexSpace:new A.A})}static async createFromGLTF(e,t,r){if(!(e instanceof g.A)){const e=new w;throw a.A.getLogger(this.prototype).error(".createfromGLTF()",e.message),e}const{loadGLTFMesh:o}=await(0,u.qr)(n.e(7375).then(n.bind(n,97375)),r);return new ke((await o(e,t,r)).mesh)}static createWithExternalSource(e,t,n){const r=n?.extent??null,{spatialReference:o}=e,i=n?.transform?.clone()??new M.A,s=(0,T.TE)(e,n),a=n?.unitConversionDisabled,l={source:t,extent:r,unitConversionDisabled:a},u=new ve;return u.externalSources.push(l),new ke({metadata:u,transform:i,vertexSpace:s,spatialReference:o})}static createIncomplete(e,t){const{spatialReference:n}=e,r=t?.transform?.clone()??new M.A,o=(0,T.TE)(e,t),s=new ke({transform:r,vertexSpace:o,spatialReference:n});return s.addResolvingPromise(Promise.reject(new i.A("mesh-incomplete","Mesh resources are not complete"))),s}};(0,r.Cg)([(0,f.MZ)({type:[x.A],json:{write:!0}})],Ve.prototype,"components",void 0),(0,r.Cg)([(0,f.MZ)({nonNullable:!0,types:Ge,constructOnly:!0,json:{write:!0},clonable:(e,t)=>(0,me.o2)(t)?.vertexSpace??e.clone(t)})],Ve.prototype,"vertexSpace",void 0),(0,r.Cg)([(0,f.MZ)({type:M.A,clonable:(e,t)=>{const n=(0,me.o2)(t);return n&&"transform"in n?n.transform:e?.clone()??e},json:{write:!0}})],Ve.prototype,"transform",void 0),(0,r.Cg)([(0,f.MZ)({constructOnly:!0,type:ve,clonable:(e,t)=>(0,me.o2)(t)?.metadata??e.clone()})],Ve.prototype,"metadata",void 0),(0,r.Cg)([(0,f.MZ)()],Ve.prototype,"hasExtent",null),(0,r.Cg)([(0,f.MZ)()],Ve.prototype,"_transformedExtent",null),(0,r.Cg)([(0,f.MZ)()],Ve.prototype,"_untransformedBounds",null),(0,r.Cg)([(0,f.MZ)()],Ve.prototype,"origin",null),(0,r.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Ve.prototype,"extent",null),(0,r.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1,write:!0,default:!0}})],Ve.prototype,"hasZ",void 0),(0,r.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1,write:!0,default:!1}})],Ve.prototype,"hasM",void 0),(0,r.Cg)([(0,f.MZ)({type:C.A,nonNullable:!0,json:{write:!0},clonable:(e,t)=>(0,me.o2)(t)?.vertexAttributes??e.clone(t)})],Ve.prototype,"vertexAttributes",void 0),Ve=ke=(0,r.Cg)([(0,f.$K)("esri.geometry.Mesh")],Ve);const We=(0,d.vt)()},51147:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(31635),o=n(69540),i=n(25482),s=n(91429);let a=class extends((0,o.OU)(i.o)){constructor(e){super(e),this.offset=[0,0],this.rotation=0,this.scale=[1,1]}};(0,r.Cg)([(0,s.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],a.prototype,"offset",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],a.prototype,"rotation",void 0),(0,r.Cg)([(0,s.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],a.prototype,"scale",void 0),a=(0,r.Cg)([(0,s.$K)("esri.geometry.support.MeshTextureTransform")],a)},63579:(e,t,n)=>{n.d(t,{Bq:()=>l,Qp:()=>a,WN:()=>m,dK:()=>d,eN:()=>h,fH:()=>y,in:()=>g,yr:()=>u});var r=n(11254),o=n(4576),i=n(74887),s=n(20557);class a{constructor(e,t,n){this.assetName=e,this.assetMimeType=t,this.parts=n}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,o.aI)(this.parts,e.parts,(e,t)=>e.equals(t))}isOnService(e){return this.parts.every(t=>t.isOnService(e))}makeHash(){let e="";for(const t of this.parts)e+=t.partHash;return e}async toBlob(e){const{parts:t}=this;if(1===t.length)return t[0].toBlob(e);const n=await Promise.all(t.map(t=>t.toBlob(e)));return(0,i.Te)(e),new Blob(n)}}class l{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){const{data:t}=await(0,r.A)(this.partUrl,{responseType:"blob"});return(0,i.Te)(e),t}}function u(e){return function(e){switch(e?.type){case"client":return Array.isArray(e.files)?e.files.some(p):p(e.files);case"service":return e.assets.some(p);case"loadable":return!0;default:return!1}}(e?.source)}const c=/^(model\/gltf\+json)|(model\/gltf-binary)$/,f=/\.(gltf|glb)/i;function p(e){if(e instanceof File){const{type:t,name:n}=e;return c.test(t)||f.test(n)}return c.test(e.assetMimeType)||f.test(e.assetName)}function h(e,t){if(!e)return!1;const{source:n}=e;return function(e,t){return"service"===e.type&&e.assets.every(e=>e.isOnService(t))}(n,t)}function g(e,t){if(e===t)return!0;const{source:n}=e,{source:r}=t;if(n===r)return!0;if("service"===n.type&&"service"===r.type){if(n.assets.length!==r.assets.length)return!1;const e=(e,t)=>e.assetName<t.assetName?-1:e.assetName>t.assetName?1:0,t=[...n.assets].sort(e),o=[...r.assets].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(o[e]))return!1;return!0}return!1}function y(e,t){return e instanceof File?(0,s.rq)(e,t):(0,s.z$)(e.assetMimeType,e.assetName,t)}function m(e){switch(e.type){case"client":return Array.isArray(e.files)?e.files:[e.files];case"service":return e.assets;case"loadable":return}}function d(e){return!!e.original}},66895:(e,t,n)=>{n.d(t,{$N:()=>c,Lz:()=>i,QN:()=>f,WO:()=>l,hz:()=>a,o2:()=>o});const r=Symbol("meshContext");function o(e){return e&&"object"==typeof e&&r in e?e[r]:void 0}function i(e,t){const n=o(e);return{...e,[r]:{...n,...t}}}const s=Symbol("meshMaterialContext");function a(e){return e&&"object"==typeof e&&s in e?e[s]:void 0}function l(e){const t=a(e);if(t?.materialMap)return e;const n={materialMap:new Map};return{...e,[s]:n}}const u=Symbol("meshTextureContext");function c(e){return e&&"object"==typeof e&&u in e?e[u]:void 0}function f(e){const t=c(e);if(t?.textureMap)return e;const n={textureMap:new Map};return{...e,[u]:n}}},72258:(e,t,n)=>{n.d(t,{UR:()=>A,p5:()=>w,xK:()=>R});var r=n(53966),o=n(34727),i=n(86211),s=n(77690),a=n(29242),l=n(58083),u=n(9093),c=n(38954),f=n(51850),p=n(98764),h=n(48353),g=n(65806),y=n(27615),m=n(21325),d=n(73354),x=n(22141);const v=()=>r.A.getLogger("esri.geometry.support.meshUtils.vertexSpaceConversion");function w(e,t,{vertexSpace:n,spatialReference:r}){if("georeferenced"===n.type){const o=e;if(!(0,g.g)(t,o,r))return!1;const{origin:i}=n;return(0,c.e)(e,o,i),!0}const o=(0,p.lO)(r),i=e;if(!(0,g.g)(t,i,o))return!1;const{origin:s}=n,a=L;if(!(0,h.l)(r,s,a,o))return!1;const u=(0,l.B8)(L,a);return null!=u&&((0,c.p)(e,i,u),!0)}function A(e,t,n){const{vertexSpace:r,transform:o,vertexAttributes:i}=e,a=(0,y.Hq)(r)?o:null,f=T(e.spatialReference,n,3);if((0,y.yJ)(r,t)&&(!a||(0,l.t2)(a.localMatrix,u.zK))&&S(f)){const{position:e,normal:t,tangent:r}=i,o=n?.allowBufferReuse;return{position:o?e:e.slice(),normal:o?t:t?.slice(),tangent:o?r:r?.slice()}}switch(e.vertexSpace.type){case"local":return"local"===t.type?function({vertexAttributes:e,spatialReference:t,transform:n},{origin:r},o,i){const s=b(t,i);if(!(0,h.l)(t,r,Z,s))return(0,x.CN)(v(),t,s),null;if(n&&(0,l.lw)(Z,Z,n.localMatrix),!(0,h.l)(t,o,U,s))return(0,x.CN)(v(),s,t),null;(0,l.B8)(U,U);const a=(0,l.lw)(Z,U,Z);return C(a,t,i,3),M(e,a)}(e,e.vertexSpace,t.origin,n):function({spatialReference:e,vertexAttributes:t,transform:n},{origin:r},o,i){const s=b(e,i);if(!(0,h.l)(e,r,Z,s))return(0,x.CN)(v(),e,s),null;n&&(0,l.lw)(Z,Z,n.localMatrix),C(Z,e,i,1);const a=new Float64Array(t.position.length),u=function(e,t,n,r,o){(0,d.t)(r,e,t);const i=new Float64Array(e.length);return(0,x.$5)(r,o,i,n)?i:((0,x.CN)(v(),o,n),null)}(t.position,Z,e,a,s);if(!u)return null;const f=function(e,t,n,r,o,i){if(null==o)return null;const s=new Float32Array(o.length);return(0,x.qs)(o,s,i),(0,x.si)(s,e,t,n,r,s)?s:((0,x.CN)(v(),r,t),null)}(u,e,a,s,t.normal,Z);if(t.normal&&!f)return null;const p=function(e,t,n,r,o,i){if(null==o)return null;const s=new Float32Array(o.length);return(0,x.KM)(o,s,i),(0,x.Mv)(s,e,t,n,r,s)?s:((0,x.CN)(v(),r,t),null)}(u,e,a,s,t.tangent,Z);if(t.tangent&&!p)return null;if(o){const e=(0,c.q)(B,o);(0,d.a)(u,u,e)}return{position:u,normal:f,tangent:p}}(e,e.vertexSpace,t.origin,n);case"georeferenced":return"local"===t.type?function({vertexAttributes:e,spatialReference:t,transform:n},{origin:r},o,i){const a=b(t,i);if(!(0,h.l)(t,o,Z,a))return(0,x.CN)(v(),t,a),null;const u=1/T(t,i,2);(0,l.hs)(Z,Z,[u,u,u]);const c=(0,l.B8)(U,Z),{position:f,normal:p,tangent:g}=function(e,t,n){if(!t)return e;if(!n){const{position:n,normal:r,tangent:o}=e;return{position:(0,d.a)(new Float64Array(n.length),n,t),tangent:o,normal:r}}const r=M(e,n.localMatrix);return(0,d.a)(r.position,r.position,t),r}(e,r,n),y=new Float64Array(f.length),m=function(e,t,n,r,o){const i=(0,x.gr)(e,t,r,o);if(!i)return(0,x.CN)(v(),t,o),null;const s=new Float64Array(i.length);return(0,d.t)(s,i,n),s}(f,t,c,y,a);if(!m)return null;const w=(0,s.Ge)(N,c),A=function(e,t,n,r,o,i,s){if(null==e)return null;const a=s??new Float32Array(e.length);return(0,x.X4)(e,t,n,r,o,a)?((0,d.b)(a,a,i),a):((0,x.CN)(v(),n,o),null)}(p,f,t,y,a,w,p!==e.normal?p:void 0);if(!A&&p)return null;const C=function(e,t,n,r,o,i,s){if(null==e)return null;const a=s??new Float32Array(e.length);return(0,x.xA)(e,t,n,r,o,a)?((0,d.b)(a,a,i,4),a):((0,x.CN)(v(),n,o),null)}(g,f,t,y,a,w,g!==e.tangent?g:void 0);return!C&&g?null:{position:m,normal:A,tangent:C}}(e,e.vertexSpace,t.origin,n):function({vertexAttributes:e,transform:t,spatialReference:n},{origin:r},o,i){const s=T(n,i,3),a=r||!S(s)?(0,l.C)(Z,t?.localMatrix??u.zK):null;a&&C(a,n,i,3);const{position:f,normal:p,tangent:h}=a?M(e,a):e,g=i?.allowBufferReuse,y=g?f:new Float64Array(f.length);let m=f;if(r&&(m=(0,d.a)(y,m,r)),o){const e=(0,c.q)(B,o);m=(0,d.a)(y,m,e)}return{position:m!==e.position||g?m:m.slice(),normal:p!==e.normal||g?p:p?.slice(),tangent:h!==e.tangent||g?h:h?.slice()}}(e,e.vertexSpace,t.origin,n)}}function b(e,t){return t?.useEllipsoid&&(0,m.B3)(e)?p.Y0:(0,p.lO)(e)}function M(e,t){const n=new Float64Array(e.position.length);(0,d.t)(n,e.position,t);const r=e.normal?new Float32Array(e.normal.length):null,o=e.tangent?new Float32Array(e.tangent.length):null;return r&&e.normal&&(0,x.qs)(e.normal,r,t),o&&e.tangent&&(0,x.KM)(e.tangent,o,t),{position:n,normal:r,tangent:o}}function C(e,t,n,r){const o=T(t,n,r);S(o)||(0,l.hs)(e,e,[o,o,o])}function T(e,t,n){const r=!!(1&n),o=!!(2&n),i=t?.sourceUnit,s=t?.targetUnit;if(!i&&!s)return 1;let a=R(i,e);r||!i||S(a)||(v().warn("source unit conversion not supported"),a=1);let l=1/R(s,e);return o||!s||S(l)||(v().warn("target unit conversion not supported"),l=1),a*l}function S(e){return(0,o.Io)(e,1)}function R(e,t){if(null==e)return 1;const n=(0,i.KX)(t);return 1/(0,i.oU)(n,"meters",e)}const Z=(0,u.vt)(),U=(0,u.vt)(),N=(0,a.vt)(),B=(0,f.vt)(),L=(0,u.vt)()},73354:(e,t,n)=>{n.d(t,{a:()=>f,b:()=>a,c:()=>s,d:()=>o,e:()=>p,f:()=>c,l:()=>u,n:()=>h,t:()=>i});var r=n(40876);function o(e,t,n){i(e.typedBuffer,t.typedBuffer,n,e.typedBufferStride,t.typedBufferStride)}function i(e,t,n,r=3,o=r){if(e.length/r!==Math.ceil(t.length/o))return e;const i=e.length/r,s=n[0],a=n[1],l=n[2],u=n[4],c=n[5],f=n[6],p=n[8],h=n[9],g=n[10],y=n[12],m=n[13],d=n[14];let x=0,v=0;for(let n=0;n<i;n++){const n=t[x],i=t[x+1],w=t[x+2];e[v]=s*n+u*i+p*w+y,e[v+1]=a*n+c*i+h*w+m,e[v+2]=l*n+f*i+g*w+d,x+=o,v+=r}return e}function s(e,t,n){a(e.typedBuffer,t.typedBuffer,n,e.typedBufferStride,t.typedBufferStride)}function a(e,t,n,r=3,o=r){if(e.length/r!==Math.ceil(t.length/o))return;const i=e.length/r,s=n[0],a=n[1],l=n[2],u=n[3],c=n[4],f=n[5],p=n[6],h=n[7],g=n[8];let y=0,m=0;for(let n=0;n<i;n++){const n=t[y],i=t[y+1],d=t[y+2];e[m]=s*n+u*i+p*d,e[m+1]=a*n+c*i+h*d,e[m+2]=l*n+f*i+g*d,y+=o,m+=r}}function l(e,t,n,r=3,o=r){const i=Math.min(e.length/r,t.length/o);let s=0,a=0;for(let l=0;l<i;l++)e[a]=n*t[s],e[a+1]=n*t[s+1],e[a+2]=n*t[s+2],s+=o,a+=r;return e}function u(e,t,n,r){c(e.typedBuffer,t.typedBuffer,n,r,e.typedBufferStride,t.typedBufferStride)}function c(e,t,n,o,i=3,s=i){const a=Math.min(e.length/i,t.length/s);let l=0,u=0;const c=1/r.Tf;for(let r=0;r<a;r++)e[u]=o*(n*t[l])**c,e[u+1]=o*(n*t[l+1])**c,e[u+2]=o*(n*t[l+2])**c,l+=s,u+=i}function f(e,t,n,r=3,o=r){const i=e.length/r;if(i!==Math.ceil(t.length/o))return e;let s=0,a=0;for(let l=0;l<i;l++)e[a]=t[s]+n[0],e[a+1]=t[s+1]+n[1],e[a+2]=t[s+2]+n[2],s+=o,a+=r;return e}function p(e,t){h(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function h(e,t,n=3,r=n){const o=Math.min(e.length/n,t.length/r);let i=0,s=0;for(let a=0;a<o;a++){const o=t[i],a=t[i+1],l=t[i+2],u=o*o+a*a+l*l;if(u>0){const t=1/Math.sqrt(u);e[s]=t*o,e[s+1]=t*a,e[s+2]=t*l}i+=r,s+=n}}n(44208),n(53966),Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:c,linearToSRGBView:u,normalize:h,normalizeView:p,scale:l,scaleView:function(e,t,n){l(e.typedBuffer,t.typedBuffer,n,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,n){const r=Math.min(e.count,t.count),o=e.typedBuffer,i=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride;let l=0,u=0;for(let e=0;e<r;e++)o[u]=s[l]>>n,o[u+1]=s[l+1]>>n,o[u+2]=s[l+2]>>n,l+=a,u+=i},transformMat3:a,transformMat3View:s,transformMat4:i,transformMat4View:o,translate:f},Symbol.toStringTag,{value:"Module"}))},80882:(e,t,n)=>{n.d(t,{A:()=>u});var r=n(31635),o=n(68197),i=n(91429),s=n(19211),a=n(35063),l=n(51147);let u=class extends s.A{constructor(e){super(e),this.emissiveColor=null,this.emissiveStrength=null,this.emissiveTextureTransform=void 0,this.occlusionTextureTransform=void 0,this.metallic=1,this.roughness=1,this.metallicRoughnessTextureTransform=void 0}get emissiveTexture(){return this._get("emissiveTexture")}set emissiveTexture(e){this._set("emissiveTexture",null==e?null:a.A.from(e))}get occlusionTexture(){return this._get("occlusionTexture")}set occlusionTexture(e){this._set("occlusionTexture",null==e?null:a.A.from(e))}get metallicRoughnessTexture(){return this._get("metallicRoughnessTexture")}set metallicRoughnessTexture(e){this._set("metallicRoughnessTexture",null==e?null:a.A.from(e))}getMemoryUsage(){let e=super.getMemoryUsage();return e+=null!=this.emissiveColor?16:0,null!=this.emissiveTexture&&(e+=this.emissiveTexture.memoryUsage),e+=null!=this.emissiveTextureTransform?20:0,null!=this.occlusionTexture&&(e+=this.occlusionTexture.memoryUsage),e+=null!=this.occlusionTextureTransform?20:0,null!=this.metallicRoughnessTexture&&(e+=this.metallicRoughnessTexture.memoryUsage),e+=null!=this.metallicRoughnessTextureTransform?20:0,e}};(0,r.Cg)([(0,i.MZ)({type:o.A,json:{write:!0}})],u.prototype,"emissiveColor",void 0),(0,r.Cg)([(0,i.MZ)({json:{write:!0}})],u.prototype,"emissiveStrength",void 0),(0,r.Cg)([(0,i.MZ)({type:a.A,json:{write:!0},value:null})],u.prototype,"emissiveTexture",null),(0,r.Cg)([(0,i.MZ)({type:l.A,json:{write:!0}})],u.prototype,"emissiveTextureTransform",void 0),(0,r.Cg)([(0,i.MZ)({type:a.A,json:{write:!0},value:null})],u.prototype,"occlusionTexture",null),(0,r.Cg)([(0,i.MZ)({type:l.A,json:{write:!0}})],u.prototype,"occlusionTextureTransform",void 0),(0,r.Cg)([(0,i.MZ)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],u.prototype,"metallic",void 0),(0,r.Cg)([(0,i.MZ)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],u.prototype,"roughness",void 0),(0,r.Cg)([(0,i.MZ)({type:a.A,json:{write:!0},value:null})],u.prototype,"metallicRoughnessTexture",null),(0,r.Cg)([(0,i.MZ)({type:l.A,json:{write:!0}})],u.prototype,"metallicRoughnessTextureTransform",void 0),u=(0,r.Cg)([(0,i.$K)("esri.geometry.support.MeshMaterialMetallicRoughness")],u)},83349:(e,t,n)=>{function r(e,t,n){n=n||2;var r,i,a,l,u,c,p,h=t&&t.length,g=h?t[0]*n:e.length,y=o(e,0,g,n,!0),m=[];if(!y||y.next===y.prev)return m;if(h&&(y=f(e,t,y,n)),e.length>80*n){r=a=e[0],i=l=e[1];for(var d=n;d<g;d+=n)(u=e[d])<r&&(r=u),(c=e[d+1])<i&&(i=c),u>a&&(a=u),c>l&&(l=c);p=0!==(p=Math.max(a-r,l-i))?1/p:0}return s(y,m,n,r,i,p),m}function o(e,t,n,r,o){var i,s;if(o===B(e,t,n,r)>0)for(i=t;i<n;i+=r)s=Z(i,e[i],e[i+1],s);else for(i=n-r;i>=t;i-=r)s=Z(i,e[i],e[i+1],s);if(s&&b(s,s.next)){var a=s.next;U(s),s=a}return s}function i(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!b(r,r.next)&&0!==A(r.prev,r,r.next))r=r.next;else{var o=r.prev;if(U(r),(r=t=o)===r.next)break;n=!0}}while(n||r!==t);return t}function s(e,t,n,r,o,f,p){if(e){!p&&f&&m(e,r,o,f);for(var h,g,y=e;e.prev!==e.next;)if(h=e.prev,g=e.next,f?l(e,r,o,f):a(e))t.push(h.i/n),t.push(e.i/n),t.push(g.i/n),U(e),e=g.next,y=g.next;else if((e=g)===y){p?1===p?s(e=u(i(e),t,n),t,n,r,o,f,2):2===p&&c(e,t,n,r,o,f):s(i(e),t,n,r,o,f,1);break}}}function a(e){var t=e.prev,n=e,r=e.next;if(A(t,n,r)>=0)return!1;for(var o=e.next.next;o!==e.prev;){if(v(t.x,t.y,n.x,n.y,r.x,r.y,o.x,o.y)&&A(o.prev,o,o.next)>=0)return!1;o=o.next}return!0}function l(e,t,n,r){var o=e.prev,i=e,s=e.next;if(A(o,i,s)>=0)return!1;for(var a=o.x<i.x?o.x<s.x?o.x:s.x:i.x<s.x?i.x:s.x,l=o.y<i.y?o.y<s.y?o.y:s.y:i.y<s.y?i.y:s.y,u=o.x>i.x?o.x>s.x?o.x:s.x:i.x>s.x?i.x:s.x,c=o.y>i.y?o.y>s.y?o.y:s.y:i.y>s.y?i.y:s.y,f=d(a,l,t,n,r),p=d(u,c,t,n,r),h=e.prevZ,g=e.nextZ;h&&h.z>=f&&g&&g.z<=p;){if(h!==e.prev&&h!==e.next&&v(o.x,o.y,i.x,i.y,s.x,s.y,h.x,h.y)&&A(h.prev,h,h.next)>=0)return!1;if(h=h.prevZ,g!==e.prev&&g!==e.next&&v(o.x,o.y,i.x,i.y,s.x,s.y,g.x,g.y)&&A(g.prev,g,g.next)>=0)return!1;g=g.nextZ}for(;h&&h.z>=f;){if(h!==e.prev&&h!==e.next&&v(o.x,o.y,i.x,i.y,s.x,s.y,h.x,h.y)&&A(h.prev,h,h.next)>=0)return!1;h=h.prevZ}for(;g&&g.z<=p;){if(g!==e.prev&&g!==e.next&&v(o.x,o.y,i.x,i.y,s.x,s.y,g.x,g.y)&&A(g.prev,g,g.next)>=0)return!1;g=g.nextZ}return!0}function u(e,t,n){var r=e;do{var o=r.prev,s=r.next.next;!b(o,s)&&M(o,r,r.next,s)&&S(o,s)&&S(s,o)&&(t.push(o.i/n),t.push(r.i/n),t.push(s.i/n),U(r),U(r.next),r=e=s),r=r.next}while(r!==e);return i(r)}function c(e,t,n,r,o,a){var l=e;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&w(l,u)){var c=R(l,u);return l=i(l,l.next),c=i(c,c.next),s(l,t,n,r,o,a),void s(c,t,n,r,o,a)}u=u.next}l=l.next}while(l!==e)}function f(e,t,n,r){var s,a,l,u=[];for(s=0,a=t.length;s<a;s++)(l=o(e,t[s]*r,s<a-1?t[s+1]*r:e.length,r,!1))===l.next&&(l.steiner=!0),u.push(x(l));for(u.sort(p),s=0;s<u.length;s++)n=i(n=g(u[s],n),n.next);return n}function p(e,t){return e.x-t.x}function h(e){if(e.next.prev===e)return e;let t=e;for(;;){const n=t.next;if(n.prev===t||n===t||n===e)break;t=n}return t}function g(e,t){var n=function(e,t){var n,r=t,o=e.x,i=e.y,s=-1/0;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var a=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(a<=o&&a>s){if(s=a,a===o){if(i===r.y)return r;if(i===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!n)return null;if(o===s)return n;var l,u=n,c=n.x,f=n.y,p=1/0;r=n;do{o>=r.x&&r.x>=c&&o!==r.x&&v(i<f?o:s,i,c,f,i<f?s:o,i,r.x,r.y)&&(l=Math.abs(i-r.y)/(o-r.x),S(r,e)&&(l<p||l===p&&(r.x>n.x||r.x===n.x&&y(n,r)))&&(n=r,p=l)),r=r.next}while(r!==u);return n}(e,t);if(!n)return t;var r=R(n,e),o=i(n,n.next);let s=h(r);return i(s,s.next),o=h(o),h(t===n?o:t)}function y(e,t){return A(e.prev,e,t.prev)<0&&A(t.next,e,e.next)<0}function m(e,t,n,r){var o=e;do{null===o.z&&(o.z=d(o.x,o.y,t,n,r)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==e);o.prevZ.nextZ=null,o.prevZ=null,function(e){var t,n,r,o,i,s,a,l,u=1;do{for(n=e,e=null,i=null,s=0;n;){for(s++,r=n,a=0,t=0;t<u&&(a++,r=r.nextZ);t++);for(l=u;a>0||l>0&&r;)0!==a&&(0===l||!r||n.z<=r.z)?(o=n,n=n.nextZ,a--):(o=r,r=r.nextZ,l--),i?i.nextZ=o:e=o,o.prevZ=i,i=o;n=r}i.nextZ=null,u*=2}while(s>1)}(o)}function d(e,t,n,r,o){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*o)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*o)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function x(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function v(e,t,n,r,o,i,s,a){return(o-s)*(t-a)-(e-s)*(i-a)>=0&&(e-s)*(r-a)-(n-s)*(t-a)>=0&&(n-s)*(i-a)-(o-s)*(r-a)>=0}function w(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&M(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(S(e,t)&&S(t,e)&&function(e,t){var n=e,r=!1,o=(e.x+t.x)/2,i=(e.y+t.y)/2;do{n.y>i!=n.next.y>i&&n.next.y!==n.y&&o<(n.next.x-n.x)*(i-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(A(e.prev,e,t.prev)||A(e,t.prev,t))||b(e,t)&&A(e.prev,e,e.next)>0&&A(t.prev,t,t.next)>0)}function A(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function b(e,t){return e.x===t.x&&e.y===t.y}function M(e,t,n,r){var o=T(A(e,t,n)),i=T(A(e,t,r)),s=T(A(n,r,e)),a=T(A(n,r,t));return o!==i&&s!==a||!(0!==o||!C(e,n,t))||!(0!==i||!C(e,r,t))||!(0!==s||!C(n,e,r))||!(0!==a||!C(n,t,r))}function C(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function T(e){return e>0?1:e<0?-1:0}function S(e,t){return A(e.prev,e,e.next)<0?A(e,t,e.next)>=0&&A(e,e.prev,t)>=0:A(e,t,e.prev)<0||A(e,e.next,t)<0}function R(e,t){var n=new N(e.i,e.x,e.y),r=new N(t.i,t.x,t.y),o=e.next,i=t.prev;return e.next=t,t.prev=e,n.next=o,o.prev=n,r.next=n,n.prev=r,i.next=r,r.prev=i,r}function Z(e,t,n,r){var o=new N(e,t,n);return r?(o.next=r.next,o.prev=r,r.next.prev=o,r.next=o):(o.prev=o,o.next=o),o}function U(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function N(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function B(e,t,n,r){for(var o=0,i=t,s=n-r;i<n;i+=r)o+=(e[s]-e[i])*(e[i+1]+e[s+1]),s=i;return o}n.d(t,{e:()=>r}),r.deviation=function(e,t,n,r){var o=t&&t.length,i=o?t[0]*n:e.length,s=Math.abs(B(e,0,i,n));if(o)for(var a=0,l=t.length;a<l;a++){var u=t[a]*n,c=a<l-1?t[a+1]*n:e.length;s-=Math.abs(B(e,u,c,n))}var f=0;for(a=0;a<r.length;a+=3){var p=r[a]*n,h=r[a+1]*n,g=r[a+2]*n;f+=Math.abs((e[p]-e[g])*(e[h+1]-e[p+1])-(e[p]-e[h])*(e[g+1]-e[p+1]))}return 0===s&&0===f?0:Math.abs((f-s)/s)},r.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,o=0;o<e.length;o++){for(var i=0;i<e[o].length;i++)for(var s=0;s<t;s++)n.vertices.push(e[o][i][s]);o>0&&(r+=e[o-1].length,n.holes.push(r))}return n}},95696:(e,t,n)=>{n.d(t,{A:()=>u});var r,o=n(31635),i=n(69540),s=n(25482),a=n(91429),l=n(93223);let u=class extends((0,i.OU)(s.o)){static{r=this}constructor(e){super(e),this.type="georeferenced",this.origin=null}static{this.absolute=new r}};(0,o.Cg)([(0,l.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)},97146:(e,t,n)=>{n.d(t,{Dg:()=>i,my:()=>s,tM:()=>c,uW:()=>o});var r=n(34275);function o(e){return i(e,!0)}function i(e,t){if(Array.isArray(e)){if(e.length<r.y9)return e}else if(e.length<r.y9)return Array.from(e);let n=!0,o=!0;return e.some((e,t)=>(n=n&&0===e,o=o&&e===t,!n&&!o)),n?function(e){if(1===e)return l;if(e<r.y9)return new Array(e).fill(0);if(e>p.length){const t=Math.max(2*p.length,e);p=new Uint8Array(t)}return new Uint8Array(p.buffer,0,e)}(e.length):o?c(e.length):(0,r.iu)(e)&&e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:function(e,t){for(const n of e){if(n>=65536)return(0,r.iu)(e)?e:new Uint32Array(e);n>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}(e,!t)}function s(e){return e<=r.y9?new Array(e):e<=65536?new Uint16Array(e):new Uint32Array(e)}let a=f(131072);const l=[0],u=(()=>{const e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function c(e){return 1===e?l:e<r.y9?Array.from(new Uint16Array(u.buffer,0,e)):e<u.length?new Uint16Array(u.buffer,0,e):(e>a.length&&(a=f(Math.max(2*a.length,e))),new Uint32Array(a.buffer,0,e))}function f(e){const t=new Uint32Array(e);for(let e=0;e<t.length;e++)t[e]=e;return t}let p=new Uint8Array(65536)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9829],{513:(t,n,r)=>{r.d(n,{KP:()=>a,X0:()=>h,fM:()=>c,mq:()=>u,zW:()=>l});var e=r(19419),i=r(59803),s=r(15507);class a{constructor(t,n,r,e,i,s){this.cx=t,this.cy=n,this.radius=r,this.thetaStart=e,this.thetaEnd=i,this.isInvalid=s}get startPoint(){const{cx:t,cy:n,radius:r,thetaStart:e}=this;return[t+r*Math.cos(e),n+r*Math.sin(e)]}get endPoint(){const{cx:t,cy:n,radius:r,thetaEnd:e}=this;return[t+r*Math.cos(e),n+r*Math.sin(e)]}}function o(t,n){const{cx:r,cy:e,radius:i}=t;return[r+i*Math.cos(n),e+i*Math.sin(n)]}function u(t,n){if(t.isInvalid)return(0,s.RS)([0,0],t.startPoint,t.endPoint,n);const{thetaStart:r,thetaEnd:e}=t;return o(t,r*(1-n)+e*n)}function c(t,n){if(t.isInvalid)return(0,i.T)(t.startPoint,t.endPoint,n);const{cx:r,cy:e,thetaStart:a,thetaEnd:u}=t,[c,h]=n,l=(0,s.Pf)((0,s.yN)(a,u),Math.atan2(h-e,c-r)),f=o(t,l);return{t:(l-a)/(u-a),curvePoint:f,distance:Math.sqrt((0,s.kb)(n,f))}}function h(t,n){if(n.isInvalid)return(0,e.tK)(t,n.startPoint),(0,e.tK)(t,n.endPoint),t;const{cx:r,cy:i,radius:a,thetaStart:u,thetaEnd:c}=n;(0,e.tK)(t,o(n,u)),(0,e.tK)(t,o(n,c));const h=(0,s.yN)(u,c),l=Math.PI/2;let f=0;for(const n of[[r+a,i],[r,i+a],[r-a,i],[r,i-a]])f=(0,s.Cp)(h,f),f>h.min&&f<h.max&&(0,e.tK)(t,n),f+=l;return t}function l(t){if(t.isInvalid)return 2*t.radius;const{radius:n,thetaStart:r,thetaEnd:e}=t;return n*Math.abs(e-r)}},537:(t,n,r)=>{r.d(n,{B$:()=>x,LJ:()=>d,Pj:()=>b,Rg:()=>M,Yz:()=>p,z8:()=>g});var e=r(19419),i=r(79567),s=r(52006);function a(t){return void 0!==t.xmin&&void 0!==t.ymin&&void 0!==t.xmax&&void 0!==t.ymax}function o(t){return void 0!==t.points}function u(t){return void 0!==t.x&&void 0!==t.y}function c(t){return void 0!==t.paths}function h(t){return void 0!==t.rings}function l(t){return function(n,r){return null==n?r:null==r?n:t(n,r)}}const f=l(Math.min),m=l(Math.max);function M(t,n){return c(n)?p(t,n.curvePaths??n.paths,!1,!1)??t:h(n)?p(t,n.curveRings??n.rings,!1,!1)??t:o(n)?b(t,n.points,!1,!1,!1,!1):a(n)?y(t,n):(u(n)&&(t[0]=n.x,t[1]=n.y,t[2]=n.x,t[3]=n.y),t)}function g(t){let n,r,i,s;for(t.reset(),n=i=1/0,r=s=-1/0;t.nextPath();){const e=x(t);n=Math.min(e[0],n),i=Math.min(e[1],i),r=Math.max(e[2],r),s=Math.max(e[3],s)}return(0,e.vt)([n,i,r,s])}function x(t){let n,r,i,s;for(n=i=1/0,r=s=-1/0;t.nextPoint();)n=Math.min(t.x,n),i=Math.min(t.y,i),r=Math.max(t.x,r),s=Math.max(t.y,s);return(0,e.vt)([n,i,r,s])}function d(t,n){return c(n)?p(t,n.curvePaths??n.paths,!0,!1)??t:h(n)?p(t,n.curveRings??n.rings,!0,!1)??t:o(n)?b(t,n.points,!0,!1,!0,!1):a(n)?y(t,n,0,0,!0,!1):(u(n)&&(t[0]=n.x,t[1]=n.y,t[2]=n.z,t[3]=n.x,t[4]=n.y,t[5]=n.z),t)}function p(t,n,r,a){const o=r?3:2;if(!n.length||!n[0].length)return null;let u,c,h,l,[M,g]=(0,s.yP)(n[0][0]),x=M,d=g;for(let t=0;t<n.length;t++){const p=n[t];for(let t=0;t<p.length;t++){const n=(0,s.yP)(p[t]),[y,b]=n;if(M=f(M,y),g=f(g,b),x=m(x,y),d=m(d,b),r&&n.length>2){const t=n[2];u=f(u,t),c=m(c,t)}if(a&&n.length>o){const t=n[o];h=f(h,t),l=m(l,t)}const v=p[t];if((0,s.Xq)(v)||t<1)continue;const I=(0,s.yP)(p[t-1]),P=(0,e.fA)(M,g,x,d);[M,g,x,d]=(0,i.e)(P,I,v)}}return r?a?(t[0]=M,t[1]=g,t[2]=u,t[3]=h,t[4]=x,t[5]=d,t[6]=c,t[7]=l,t.length=8,t):(t[0]=M,t[1]=g,t[2]=u,t[3]=x,t[4]=d,t[5]=c,t.length=6,t):a?(t[0]=M,t[1]=g,t[2]=h,t[3]=x,t[4]=d,t[5]=l,t.length=6,t):(t[0]=M,t[1]=g,t[2]=x,t[3]=d,t.length=4,t)}function y(t,n,r,e,i,s){const a=n.xmin,o=n.xmax,u=n.ymin,c=n.ymax;let h=n.zmin,l=n.zmax,f=n.mmin,m=n.mmax;return i?(h=h||0,l=l||0,s?(f=f||0,m=m||0,t[0]=a,t[1]=u,t[2]=h,t[3]=f,t[4]=o,t[5]=c,t[6]=l,t[7]=m,t):(t[0]=a,t[1]=u,t[2]=h,t[3]=o,t[4]=c,t[5]=l,t)):s?(f=f||0,m=m||0,t[0]=a,t[1]=u,t[2]=f,t[3]=o,t[4]=c,t[5]=m,t):(t[0]=a,t[1]=u,t[2]=o,t[3]=c,t)}function b(t,n,r,e,i,s){const a=r?3:2,o=e&&s,u=r&&i;if(!n.length||!n[0].length)return null;let c,h,l,M,[g,x]=n[0],[d,p]=n[0];for(let t=0;t<n.length;t++){const r=n[t],[e,i]=r;if(g=f(g,e),x=f(x,i),d=m(d,e),p=m(p,i),u&&r.length>2){const t=r[2];c=f(c,t),h=m(h,t)}if(o&&r.length>a){const t=r[a];l=f(c,t),M=m(h,t)}}return i?(c=c||0,h=h||0,s?(l=l||0,M=M||0,t[0]=g,t[1]=x,t[2]=c,t[3]=l,t[4]=d,t[5]=p,t[6]=h,t[7]=M,t):(t[0]=g,t[1]=x,t[2]=c,t[3]=d,t[4]=p,t[5]=h,t)):s?(l=l||0,M=M||0,t[0]=g,t[1]=x,t[2]=l,t[3]=d,t[4]=p,t[5]=M,t):(t[0]=g,t[1]=x,t[2]=d,t[3]=p,t)}},4305:(t,n,r)=>{r.d(n,{jK:()=>h,lM:()=>f,m_:()=>l,ty:()=>M});var e=r(34727),i=r(19419),s=r(15507);const a=[0,0];function o(t){const n=1-t,r=n*n,e=t*t;return[r*n,3*t*r,3*e*n,e*t]}function u(t,n,r,e,i){const[s,a,u,c]=o(i);return[t[0]*s+n[0]*a+r[0]*u+e[0]*c,t[1]*s+n[1]*a+r[1]*u+e[1]*c]}function c(t,n,r,e,i){const[s,a,u,c]=o(i);return t*s+n*a+r*u+e*c}function h(t,n,r){const e=t,[i,o,u]=n.b,c=(0,s.RS)([0,0],e,o,r),h=(0,s.RS)(a,o,u,r),l=(0,s.RS)([0,0],u,i,r),f=(0,s.RS)([0,0],c,h,r),m=(0,s.RS)([0,0],h,l,r);return[{b:[(0,s.RS)([],f,m,r),c,f]},{b:[[...i],m,l]}]}function l(t,n,r){const i=t,[a,o,c]=n.b,h=(0,s.R)(r,[.1,.5,.9],t=>{const n=1-t,[r,e]=u(i,o,c,a,t);return[r,e,3*n*n*(o[0]-i[0])+6*n*t*(c[0]-o[0])+3*t*t*(a[0]-c[0]),3*n*n*(o[1]-i[1])+6*n*t*(c[1]-o[1])+3*t*t*(a[1]-c[1]),6*n*(c[0]-2*o[0]+i[0])+6*t*(a[0]-2*c[0]+o[0]),6*n*(c[1]-2*o[1]+i[1])+6*t*(a[1]-2*c[1]+o[1])]}).map(t=>Math.min(1,Math.max(0,t)));h.push(0,1);let l=1/0;const f=h.map(t=>{const n=u(i,o,c,a,t),[e,s]=n,h=r[0]-e,f=r[1]-s,m=Math.sqrt(h*h+f*f);return l=Math.min(m,l),{t,curvePoint:n,distance:m}}),m=[];for(const t of f){const{t:n,distance:r}=t;(0,e.b6)(r,l)&&!m.some(({t})=>(0,e.Sp)(t,n))&&m.push(t)}return m}function f(t,n,r){const e=n,[s,a,o]=r.b;if((0,i.tK)(t,e),(0,i.tK)(t,s),(0,i.Rj)(t,a[0],a[1])&&(0,i.Rj)(t,o[0],o[1]))return t;for(const n of m(e[0],a[0],o[0],s[0]))n>0&&n<1&&(0,i.nw)(t,c(e[0],a[0],o[0],s[0],n));for(const n of m(e[1],a[1],o[1],s[1]))n>0&&n<1&&(0,i.IO)(t,c(e[1],a[1],o[1],s[1],n));return t}function m(t,n,r,e){const i=3*(3*(n-r)-t+e),s=6*(t-2*n+r),a=3*(n-t);if(0===i)return 0!==s?[-a/s]:[];const o=Math.sqrt(s*s-4*i*a);return[(-s+o)/(2*i),(-s-o)/(2*i)]}function M(t,n,r){let e=0,i=[n];for(let n=0;n<16;n++){let n=t;const a=[];for(const t of i)a.push(...h(n,t,.5)),n=t.b[0];i=a,n=t,e=0;let o=0;for(const t of i){const[r,i,a]=t.b,u=Math.sqrt((0,s.kb)(n,r));e+=(u+(Math.sqrt((0,s.kb)(n,i))+Math.sqrt((0,s.kb)(i,a))+Math.sqrt((0,s.kb)(a,r))))/2,o+=u,n=r}if(e-o<r)return e}return e}},12359:(t,n,r)=>{r.d(n,{IK:()=>h,TP:()=>f,Ve:()=>o,Z4:()=>s,l8:()=>a,w2:()=>c});var e=r(51118),i=r(95108);function s(t){return t?t.hasZ?[t.xmax-t.xmin/2,t.ymax-t.ymin/2,t.zmax-t.zmin/2]:[t.xmax-t.xmin/2,t.ymax-t.ymin/2]:null}function a(t){return function(t,n){if(!t?.length)return null;const r=[],e=[],s=n?[1/0,-1/0,1/0,-1/0,1/0,-1/0]:[1/0,-1/0,1/0,-1/0];for(let r=0,i=t.length;r<i;r++){const i=u(t[r],n,s);i&&e.push(i)}if(e.sort((t,r)=>{let e=t[2]-r[2];return 0===e&&n&&(e=t[4]-r[4]),e}),e.length&&(r[0]=e[0][0],r[1]=e[0][1],n&&(r[2]=e[0][3]),(r[0]<s[0]||r[0]>s[1]||r[1]<s[2]||r[1]>s[3]||n&&(r[2]<s[4]||r[2]>s[5]))&&(r.length=0)),!r.length){const e=t[0]&&t[0].length?function(t,n){const r=n?[0,0,0]:[0,0],e=n?[0,0,0]:[0,0];let s=0,a=0,o=0,u=0;for(let c=0,h=t.length;c<h-1;c++){const h=t[c],l=t[c+1];if(h&&l){r[0]=h[0],r[1]=h[1],e[0]=l[0],e[1]=l[1],n&&h.length>2&&l.length>2&&(r[2]=h[2],e[2]=l[2]);const t=(0,i.R3)(r,e);if(t){s+=t;const r=(0,i.t9)(h,l);a+=t*r[0],o+=t*r[1],n&&r.length>2&&(u+=t*r[2])}}}return s>0?n?[a/s,o/s,u/s]:[a/s,o/s]:t.length?t[0]:null}(t[0],n):null;if(!e)return null;r[0]=e[0],r[1]=e[1],n&&e.length>2&&(r[2]=e[2])}return r}(t.rings,t.hasZ??!1)}function o(t){const n=a(t);if(!n)return null;const{hasZ:r,spatialReference:e}=t,[i,s,o]=n;return isNaN(i)||isNaN(s)||r&&isNaN(o)?null:{x:i,y:s,z:r?o:void 0,spatialReference:e}}function u(t,n,r){let e=0,i=0,s=0,a=0,o=0;const u=t.length?t[0][0]:0,c=t.length?t[0][1]:0,h=t.length&&n?t[0][2]:0;for(let l=0;l<t.length;l++){const f=t[l],m=t[(l+1)%t.length],[M,g,x]=f,d=M-u,p=g-c,[y,b,v]=m,I=y-u,P=b-c,R=d*P-I*p;if(a+=R,e+=(d+I)*R,i+=(p+P)*R,n&&f.length>2&&m.length>2){const t=x-h,n=v-h,r=d*n-I*t;s+=(t+n)*r,o+=r}M<r[0]&&(r[0]=M),M>r[1]&&(r[1]=M),g<r[2]&&(r[2]=g),g>r[3]&&(r[3]=g),n&&(x<r[4]&&(r[4]=x),x>r[5]&&(r[5]=x))}if(a>0&&(a*=-1),o>0&&(o*=-1),!a)return null;a*=.5,o*=.5;const l=[e/(6*a)+u,i/(6*a)+c,a];return n&&(r[4]===r[5]||0===o?(l[3]=(r[4]+r[5])/2,l[4]=0):(l[3]=s/(6*o)+h,l[4]=o)),l}function c(t,n){let r=0,e=0,i=0;t.nextPoint();const s=t.pathSize?t.x:0,a=t.pathSize?t.y:0;for(let o=0;o<t.pathSize;o++){t.seekInPath(o);const u=[t.x,t.y];t.seekInPath((o+1)%t.pathSize);const c=[t.x,t.y],[h,l]=u,f=h-s,m=l-a,[M,g]=c,x=M-s,d=g-a,p=f*d-x*m;i+=p,r+=(f+x)*p,e+=(m+d)*p,h<n[0]&&(n[0]=h),h>n[1]&&(n[1]=h),l<n[2]&&(n[2]=l),l>n[3]&&(n[3]=l)}return i>0&&(i*=-1),i?(i*=.5,[r/(6*i)+s,e/(6*i)+a,i]):null}function h(t){const{hasZ:n,totalSize:r}=t;if(0===r)return null;const s=[],a=[],o=n?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY];for(t.reset();t.nextPath();){const n=u((0,e.A)(t),t.hasZ,o);n&&a.push(n)}if(a.sort((t,r)=>{let e=t[2]-r[2];return 0===e&&n&&(e=t[4]-r[4]),e}),a.length&&(s[0]=a[0][0],s[1]=a[0][1],n&&(s[2]=a[0][3]),(s[0]<o[0]||s[0]>o[1]||s[1]<o[2]||s[1]>o[3]||n&&(s[2]<o[4]||s[2]>o[5]))&&(s.length=0)),!s.length){t.reset(),t.nextPath();const r=t.pathSize?function(t){const{hasZ:n}=t,r=n?[0,0,0]:[0,0],e=n?[0,0,0]:[0,0];let s=0,a=0,o=0,u=0;if(t.nextPoint()){let c=t.x,h=t.y,l=t.z;for(;t.nextPoint();){const f=t.x,m=t.y,M=t.z;r[0]=c,r[1]=h,e[0]=f,e[1]=m,n&&(r[2]=l,e[2]=M);const g=(0,i.R3)(r,e);if(g){s+=g;const t=(0,i.t9)(r,e);a+=g*t[0],o+=g*t[1],n&&t.length>2&&(u+=g*t[2])}c=f,h=m,l=M}}return s>0?n?[a/s,o/s,u/s]:[a/s,o/s]:t.pathSize?(t.seekPathStart(),t.nextPoint(),[t.x,t.y]):null}(t):null;if(!r)return null;s[0]=r[0],s[1]=r[1],n&&r.length>2&&(s[2]=r[2])}return s}const l=1e-6;function f(t){let n=0;for(t.reset();t.nextPath();)n+=t.getCurrentRingArea();if(n<l){const n=h(t);return n?[n[0],n[1]]:null}const r=[0,0];if(t.reset(),!t.nextPath()||!t.nextPoint())return null;const e=[t.x,t.y];for(t.reset();t.nextPath();)M(r,e,t);return r[0]*=1/n,r[1]*=1/n,r[0]+=e[0],r[1]+=e[1],r}const m=1/3;function M(t,n,r){if(!t||!r||r.pathSize<3)return null;r.nextPoint();const e=r.x,i=r.y;r.nextPoint();let s,a=r.x-e,o=r.y-i,u=0,c=0;for(;r.nextPoint();)u=r.x-e,c=r.y-i,s=.5*m*(u*o-c*a),t[0]+=s*(a+u),t[1]+=s*(o+c),a=u,o=c;const h=r.getCurrentRingArea(),l=[e,i];return l[0]-=n[0],l[1]-=n[1],l[0]*=h,l[1]*=h,t[0]+=l[0],t[1]+=l[1],t}},15507:(t,n,r)=>{r.d(n,{Cp:()=>M,Gz:()=>m,M_:()=>o,Pf:()=>g,R:()=>x,RS:()=>s,kb:()=>a,t7:()=>c,yN:()=>f});var e=r(34727),i=r(37585);function s(t,n,r,e){return t[0]=n[0]*(1-e)+r[0]*e,t[1]=n[1]*(1-e)+r[1]*e,t}function a(t,n){return(0,i.hG)(t,n)}function o(t,n,r,e,i){const[s,a]=n,[o,u]=r,[c,h]=e,[l,f]=i,m=(s-o)*(h-f)-(a-u)*(c-l);if(0===m)return null;const M=(s*u-a*o)*(c-l)-(s-o)*(c*f-h*l),g=(s*u-a*o)*(h-f)-(a-u)*(c*f-h*l);return t[0]=M/m,t[1]=g/m,t}const u=2*Math.PI;function c(t,n){const r=Math.atan2(t,n);return r<0?r+u:r}function h(t){return Math.abs(t)%u}function l(t){const n=h(t);return n<Math.PI?n:u-n}function f(t,n){return{min:Math.min(t,n),max:Math.max(t,n)}}function m(t,n,r,i){if((0,e.Sp)(h(t-n),0))return r?[t,t]:[t,i?t-u:t+u];const[s,a]=i?[t-u,t]:[t,t+u];return[t,M({min:s,max:a},n)]}function M({min:t,max:n},r){let e;return e=n-r,e>=u?(e-=e%u,r+e):(e=r-t,e>=u?(e-=e%u,r-e):r)}function g(t,n){const r=M(t,n);return r>t.min&&r<t.max?r:l(r-t.min)<l(r-t.max)?t.min:t.max}function x(t,n,r,e=10){return n.map(n=>{let i=n;for(let n=0;n<e;n++){const[n,e,s,a,o,u]=r(i),c=t[0]-n,h=t[1]-e,l=-s,f=-a;i+=-(2*c*l+2*h*f)/(2*l*l+2*c*-o+2*f*f+2*h*-u||1e-6)}return i})}},29242:(t,n,r)=>{function e(){return[1,0,0,0,1,0,0,0,1]}function i(t,n,r,e,i,s,a,o,u){return[t,n,r,e,i,s,a,o,u]}r.d(n,{fA:()=>i,vt:()=>e,zK:()=>s});const s=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:e,fromValues:i},Symbol.toStringTag,{value:"Module"}))},37585:(t,n,r)=>{r.d(n,{C:()=>i,Cc:()=>x,Io:()=>l,S8:()=>g,WQ:()=>a,aI:()=>b,e$:()=>p,hG:()=>f,hZ:()=>s,hs:()=>h,jb:()=>I,l0:()=>d,t2:()=>y});var e=r(34304);function i(t,n){return t[0]=n[0],t[1]=n[1],t}function s(t,n,r){return t[0]=n,t[1]=r,t}function a(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t}function o(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t}function u(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t}function c(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t}function h(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t}function l(t,n){const r=n[0]-t[0],e=n[1]-t[1];return Math.sqrt(r*r+e*e)}function f(t,n){const r=n[0]-t[0],e=n[1]-t[1];return r*r+e*e}function m(t){const n=t[0],r=t[1];return Math.sqrt(n*n+r*r)}function M(t){const n=t[0],r=t[1];return n*n+r*r}function g(t,n){const r=n[0],e=n[1];let i=r*r+e*e;return i>0&&(i=1/Math.sqrt(i),t[0]=n[0]*i,t[1]=n[1]*i),t}function x(t,n,r,e){const i=n[0],s=n[1];return t[0]=i+e*(r[0]-i),t[1]=s+e*(r[1]-s),t}function d(t,n,r){const e=n[0],i=n[1];return t[0]=r[0]*e+r[2]*i+r[4],t[1]=r[1]*e+r[3]*i+r[5],t}function p(t,n,r,e){const i=n[0]-r[0],s=n[1]-r[1],a=Math.sin(e),o=Math.cos(e);return t[0]=i*o-s*a+r[0],t[1]=i*a+s*o+r[1],t}function y(t,n){return t[0]===n[0]&&t[1]===n[1]}function b(t,n){const r=t[0],i=t[1],s=n[0],a=n[1],o=(0,e.FD)();return Math.abs(r-s)<=o*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-a)<=o*Math.max(1,Math.abs(i),Math.abs(a))}const v=m,I=o,P=u,R=c,S=l,N=f,A=M;Object.freeze(Object.defineProperty({__proto__:null,add:a,angle:function(t,n){const r=t[0],e=t[1],i=n[0],s=n[1];let a=r*r+e*e;a>0&&(a=1/Math.sqrt(a));let o=i*i+s*s;o>0&&(o=1/Math.sqrt(o));const u=(r*i+e*s)*a*o;return u>1?0:u<-1?Math.PI:Math.acos(u)},ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t},copy:i,cross:function(t,n,r){const e=n[0]*r[1]-n[1]*r[0];return t[0]=t[1]=0,t[2]=e,t},dist:S,distance:l,div:R,divide:c,dot:function(t,n){return t[0]*n[0]+t[1]*n[1]},equals:b,exactEquals:y,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t},inverse:function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t},len:v,length:m,lerp:x,max:function(t,n,r){return t[0]=Math.max(n[0],r[0]),t[1]=Math.max(n[1],r[1]),t},min:function(t,n,r){return t[0]=Math.min(n[0],r[0]),t[1]=Math.min(n[1],r[1]),t},mul:P,multiply:u,negate:function(t,n){return t[0]=-n[0],t[1]=-n[1],t},normalize:g,projectAndScale:function(t,n,r,e,i){let s=n[0]-r[0],a=n[1]-r[1];const o=(e[0]*s+e[1]*a)*(i-1);return s=e[0]*o,a=e[1]*o,t[0]=n[0]+s,t[1]=n[1]+a,t},random:function(t,n=1){const r=2*(0,e.Ov)()*Math.PI;return t[0]=Math.cos(r)*n,t[1]=Math.sin(r)*n,t},rotate:p,round:function(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t},scale:h,scaleAndAdd:function(t,n,r,e){return t[0]=n[0]+r[0]*e,t[1]=n[1]+r[1]*e,t},set:s,sqrDist:N,sqrLen:A,squaredDistance:f,squaredLength:M,str:function(t){return"vec2("+t[0]+", "+t[1]+")"},sub:I,subtract:o,transformMat2:function(t,n,r){const e=n[0],i=n[1];return t[0]=r[0]*e+r[2]*i,t[1]=r[1]*e+r[3]*i,t},transformMat2d:d,transformMat3:function(t,n,r){const e=n[0],i=n[1];return t[0]=r[0]*e+r[3]*i+r[6],t[1]=r[1]*e+r[4]*i+r[7],t},transformMat4:function(t,n,r){const e=n[0],i=n[1];return t[0]=r[0]*e+r[4]*i+r[12],t[1]=r[1]*e+r[5]*i+r[13],t}},Symbol.toStringTag,{value:"Module"}))},39829:(t,n,r)=>{r.d(n,{A:()=>P});var e,i=r(31635),s=r(4576),a=r(51447),o=r(4718),u=r(53966),c=r(91429),h=r(5443),l=r(91075),f=r(86738),m=r(16930),M=r(12359),g=r(94078),x=r(95108),d=r(90634),p=r(12176),y=r(28735),b=r(56993),v=r(43937);function I(t){return!Array.isArray(t[0])}let P=e=class extends l.A{static fromExtent(t){const n=t.clone().normalize(),{spatialReference:r}=t;let i=!1,s=!1;for(const t of n)t.hasZ&&(i=!0),t.hasM&&(s=!0);const a={rings:n.map(t=>{const n=[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]];if(i&&t.hasZ){const r=t.zmin+.5*(t.zmax-t.zmin);for(let t=0;t<n.length;t++)n[t].push(r)}if(s&&t.hasM){const r=t.mmin+.5*(t.mmax-t.mmin);for(let t=0;t<n.length;t++)n[t].push(r)}return n}),spatialReference:r};return i&&(a.hasZ=!0),s&&(a.hasM=!0),new e(a)}constructor(t){super(function(t){if(!t)return;let{rings:n,hasM:r,hasZ:e,spatialReference:i}=t;switch(n??=[],function(t){return"number"==typeof t[0]?.[0]}(n)&&(n=[n]),n[0]?.[0]?.length){case 4:e??=!0,r??=!0;break;case 3:e??=!0!==r,r??=!e;break;default:e??=!1,r??=!1}return i??=m.A.WGS84,{...t,hasM:r,hasZ:e,rings:n,spatialReference:i}}(t)),this.curveRings=void 0,this.rings=[],this.type="polygon"}get cache(){return this.commitProperty("curveRings"),this.commitProperty("hasM"),this.commitProperty("hasZ"),this.commitProperty("rings"),this.commitProperty("spatialReference"),{}}get centroid(){(0,a.Lx)(u.A.getLogger(this),"centroid",{replacement:"Please use centroidOperator.execute() instead.",version:"4.34",warnOnce:!0});const t=(0,M.Ve)(this);return t?f.A.fromJSON(t):null}writeCurveRings(t,n){n.curveRings=(0,o.o8)(t)}get extent(){const t=(0,d.v)(this),{spatialReference:n}=this;return t?new h.A({...t,spatialReference:n}):null}get isSelfIntersecting(){return(0,a.Lx)(u.A.getLogger(this),"isSelfIntersecting",{replacement:"Please use simplifyOperator.isSimple() instead.",version:"4.33",warnOnce:!0}),(0,p.A3)(this.rings)}writeRings(t,n){n.rings=(0,o.o8)(this.rings)}addRing(t){if(!t)return;const n=this.rings,r=n.length;if(I(t)){const e=[];for(let n=0,r=t.length;n<r;n++)e[n]=t[n].toArray();n[r]=e}else n[r]=t.slice();return this.notifyChange("rings"),this}clone(){const t=new e;return t.spatialReference=this.spatialReference,t.rings=(0,o.o8)(this.rings),t.curveRings=(0,o.o8)(this.curveRings),t.hasZ=this.hasZ,t.hasM=this.hasM,t}equals(t){if(this===t)return!0;if(null==t)return!1;const n=this.spatialReference,r=t.spatialReference;if(null!=n!=(null!=r))return!1;if(null!=n&&null!=r&&!n.equals(r))return!1;if(this.rings.length!==t.rings.length)return!1;const e=([t,n,r,e],[i,s,a,o])=>t===i&&n===s&&(null==r&&null==a||r===a)&&(null==e&&null==o||e===o);for(let n=0;n<this.rings.length;n++){const r=this.rings[n],i=t.rings[n];if(!(0,s.aI)(r,i,e))return!1}return!0}contains(t){if(!t)return!1;const n=(0,y.Cv)(t,this.spatialReference);return(0,g.m3)(this,null!=n?n:t)}isClockwise(t){const n=I(t)?t.map(t=>this.hasZ?this.hasM?[t.x,t.y,t.z,t.m]:[t.x,t.y,t.z]:[t.x,t.y]):t;return(0,x.$3)(n)}getPoint(t,n){if(!this._validateInputs(t,n))return null;const r=this.rings[t][n],e=this.hasZ,i=this.hasM;return e&&!i?new f.A(r[0],r[1],r[2],void 0,this.spatialReference):i&&!e?new f.A(r[0],r[1],void 0,r[2],this.spatialReference):e&&i?new f.A(r[0],r[1],r[2],r[3],this.spatialReference):new f.A(r[0],r[1],this.spatialReference)}insertPoint(t,n,r){return this._validateInputs(t,n,!0)?((0,b.h)(this,r),Array.isArray(r)||(r=r.toArray()),this.rings[t].splice(n,0,r),this.notifyChange("rings"),this):this}removePoint(t,n){if(!this._validateInputs(t,n))return null;const r=new f.A(this.rings[t].splice(n,1)[0],this.spatialReference);return this.notifyChange("rings"),r}removeRing(t){if(!this._validateInputs(t,null))return null;const n=this.rings.splice(t,1)[0],r=this.spatialReference,e=n.map(t=>new f.A(t,r));return this.notifyChange("rings"),e}setPoint(t,n,r){return this._validateInputs(t,n)?((0,b.h)(this,r),Array.isArray(r)||(r=r.toArray()),this.rings[t][n]=r,this.notifyChange("rings"),this):this}_validateInputs(t,n,r=!1){if(null==t||t<0||t>=this.rings.length)return!1;if(null!=n){const e=this.rings[t];if(r&&(n<0||n>e.length))return!1;if(!r&&(n<0||n>=e.length))return!1}return!0}toJSON(t){return this.write({},t)}};(0,i.Cg)([(0,c.MZ)({readOnly:!0})],P.prototype,"cache",null),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],P.prototype,"centroid",null),(0,i.Cg)([(0,c.MZ)({json:{write:!0,origins:{"portal-item":{write:!1},"web-map":{write:!1},"web-scene":{write:!1}}}})],P.prototype,"curveRings",void 0),(0,i.Cg)([(0,v.K)("curveRings")],P.prototype,"writeCurveRings",null),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],P.prototype,"extent",null),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],P.prototype,"isSelfIntersecting",null),(0,i.Cg)([(0,c.MZ)({type:[[[Number]]],json:{write:{isRequired:!0}}})],P.prototype,"rings",void 0),(0,i.Cg)([(0,v.K)("rings")],P.prototype,"writeRings",null),P=e=(0,i.Cg)([(0,c.$K)("esri.geometry.Polygon")],P),P.prototype.toJSON.isDefaultToJSON=!0},46068:(t,n,r)=>{r.d(n,{DL:()=>m,ED:()=>l,SW:()=>u,Uk:()=>h,pb:()=>f,xm:()=>M}),r(77690);var e=r(29242),i=(r(37585),r(19419)),s=r(52006),a=r(15507);class o{constructor(t,n,r,e,i,s,a,o,u){this.cx=t,this.cy=n,this.a=r,this.b=e,this.cosR=i,this.sinR=s,this.u1=a,this.u2=o,this.isInvalid=u}}function u(t,n){const[r,e,i,s,u,c,h]=n.a,[l,f]=t,[m,M]=r,[g,x]=e,d=c*h,p=Math.cos(u),y=Math.sin(u),[b,v]=(0,a.Gz)((0,a.t7)(1/d*(f-x)*p-1/d*(l-g)*y,1/c*(f-x)*y+1/c*(l-g)*p),Math.atan2(1/d*(M-x)*p-1/d*(m-g)*y,1/c*(M-x)*y+1/c*(m-g)*p),i,s);return new o(g,x,c,d,p,y,b,v,0===c||0===d)}function c(t,n){const{a:r,b:e,cosR:i,sinR:s,cx:a,cy:o}=t,u=Math.cos(n),c=Math.sin(n);return[r*u*i-e*c*s+a,r*u*s+e*c*i+o]}function h(t,n){const{u1:r,u2:e}=t;return c(t,r*(1-n)+e*n)}function l(t,n,r){if(r<0||r>1)return[];if(0===r||1===r)return[(0,s.tk)(n)];const[e,[i,a],o,u,c,l,f]=n.a,{u1:m,u2:M}=t,g=m*(1-r)+M*r;return[{a:[[...h(t,r)],[i,a],Math.abs(g-m)<Math.PI?1:0,u,c,l,f]},{a:[[...e],[i,a],Math.abs(M-g)<Math.PI?1:0,u,c,l,f]}]}function f(t,n){const{a:r,b:e,cosR:i,sinR:s,u1:o,u2:u}=t,h=Math.PI/6,l=(0,a.R)(n,[1*h,2*h,4*h,5*h,7*h,8*h,10*h,11*h],n=>{const a=Math.cos(n),o=Math.sin(n),[u,h]=c(t,n);return[u,h,-r*i*o-e*s*a,-r*s*o+e*i*a,-r*i*a+e*s*o,-r*s*a-e*i*o]}),f=(0,a.yN)(o,u),m=new Set(l.map(t=>(0,a.Cp)(f,t)).filter(t=>t>f.min&&t<f.max));m.add(o),m.add(u);let M,g,x=1/0;for(const r of m){const e=c(t,r),[i,s]=e,a=n[0]-i,h=n[1]-s,l=a*a+h*h;l<x&&(M=(r-o)/(u-o),g=e,x=l)}return{t:M,curvePoint:g,distance:Math.sqrt(x)}}function m(t,n,r){const e=u(n,r),{a:s,b:o,u1:h,u2:l,cosR:f,sinR:m,isInvalid:M}=e,g=r.a[0];if((0,i.tK)(t,n),(0,i.tK)(t,g),M)return t;const x=Math.atan2(-o*m,s*f),d=x+Math.PI,p=Math.atan2(o*f,s*m),y=p+Math.PI,b=(0,a.yN)(h,l);for(const n of[x,d,p,y].map(t=>(0,a.Cp)(b,t)))n>b.min&&n<b.max&&(0,i.tK)(t,c(e,n));return t}function M(t,n,r){const[e,i,s,o,l,f,m]=n.a,M=u(t,n),{u1:g,u2:x,isInvalid:d}=M,p=x-g;if(d)return Math.sqrt((0,a.kb)(t,e));const y=[0,0];let b=0,v=[h(M,0),h(M,.25),h(M,.5),h(M,.75),h(M,1)];for(let t=0;t<14;t++){const t=v.length-1,n=p/(2*t),e=[];for(let r=0;r<t;r++)e.push(v[r]),e.push(c(M,g+(2*r+1)*n));e.push(v[v.length-1]),v=e,b=0;let s=0;for(let t=1;t<v.length;t++){const n=v[t-1],r=v[t];if(b+=Math.sqrt((0,a.kb)(n,r)),t>1){const e=v[t-2],o=(0,a.M_)(y,e,n,i,r);s+=o?Math.sqrt((0,a.kb)(n,o)):Math.abs(r[0]-n[0])+Math.abs(r[1]-n[1])}else s+=b}if(s-b<r)return b}return b}(0,e.vt)(),(0,e.vt)(),(0,e.vt)(),(0,e.vt)()},49663:(t,n,r)=>{r.d(n,{i:()=>a,x:()=>o});var e=r(34727),i=r(513),s=r(15507);function a(t,n){const[r,a,o,u]=n.a,[c,h]=t,[l,f]=r,[m,M]=a,g=c-m,x=h-M,d=Math.sqrt(g*g+x*x),p=l-m,y=f-M,b=Math.sqrt(p*p+y*y),v=0===d||0===b||!(0,e.b6)(d,b),I=d,[P,R]=(0,s.Gz)((0,s.t7)(h-M,c-m),Math.atan2(f-M,l-m),o,u);return new i.KP(m,M,I,P,R,v)}function o(t,n,r){const{cx:e,cy:s,thetaStart:a,thetaEnd:o}=t,[u,c,h,l]=n.a,f=a*(1-r)+o*r;return[{a:[(0,i.mq)(t,r),[e,s],Math.abs(f-a)<Math.PI?1:0,l]},{a:[[...u],[e,s],Math.abs(o-f)<Math.PI?1:0,l]}]}},50954:(t,n,r)=>{r.d(n,{GX:()=>h,pM:()=>c});var e=r(77690),i=r(29242),s=r(513),a=r(15507);const o=(0,i.vt)();function u(t,n,r){const[i,s]=t,[u,c]=n,[h,l]=r;(0,e.hZ)(o,i,u,h,s,c,l,1,1,1);const f=(0,e.a4)(o),m=4*f/((0,a.kb)(t,n)+(0,a.kb)(n,r)+(0,a.kb)(r,t));if(!isFinite(m)||Math.abs(m)<1e-8)return null;const M=i**2+s**2,g=u**2+c**2,x=h**2+l**2;(0,e.hZ)(o,M,g,x,s,c,l,1,1,1);const d=(0,e.a4)(o);return(0,e.hZ)(o,M,g,x,i,u,h,1,1,1),[d/f*.5,(0,e.a4)(o)/f*-.5]}function c(t,n){const[r,e]=n.c,i=u(t,e,r),o=null==i,c=i??(0,a.RS)([],t,r,.5),[h,l]=t,[f,m]=e,[M,g]=r,[x,d]=c,p=h-x,y=l-d,b=Math.sqrt(p*p+y*y),v=(0,a.t7)(l-d,h-x),I=(0,a.t7)(m-d,f-x);let P=(0,a.t7)(g-d,M-x);return(I-v)*(P-I)<0&&(P+=2*Math.sign(v-P)*Math.PI),new s.KP(x,d,b,v,P,o)}function h(t,n,r){const e=(0,s.mq)(t,r/2),i=(0,s.mq)(t,r),a=(0,s.mq)(t,(r+1)/2);return[{c:[i,e]},{c:[[...n.c[0]],a]}]}},51118:(t,n,r)=>{function e(t){const n=[];for(t.reset();t.nextPath();){const r=[];for(;t.nextPoint();){const n=[t.x,t.y];t.hasZ&&n.push(t.z),t.hasM&&n.push(t.m),r.push(n)}n.push(r)}return t.reset(),n}function i(t){const n=[];for(;t.nextPoint();)n.push([t.x,t.y]);return t.seekPathStart(),n}r.d(n,{A:()=>i,x:()=>e})},52006:(t,n,r)=>{function e(t){return"curveRings"in t&&!!t.curveRings?.length||"curvePaths"in t&&!!t.curvePaths?.length}function i(t){return"b"in t}function s(t){return"c"in t}function a(t){return Array.isArray(t)}function o(t){return"a"in t&&4===t.a.length}function u(t){return"a"in t&&7===t.a.length}function c(t){return a(t)?t:i(t)?t.b[0]:s(t)?t.c[0]:t.a[0]}function h(t){if(i(t)){const[n,r,e]=t.b;return{b:[[...n],[...r],[...e]]}}if(s(t)){const[n,r]=t.c;return{c:[[...n],[...r]]}}if(a(t))return[...t];if(o(t)){const[n,r,e,i]=t.a;return{a:[[...n],[...r],e,i]}}if(u(t)){const[n,r,e,i,s,a,o]=t.a;return{a:[[...n],[...r],e,i,s,a,o]}}return t}r.d(n,{DA:()=>o,Ed:()=>e,Xq:()=>a,aO:()=>s,n1:()=>i,tk:()=>h,wY:()=>u,yP:()=>c})},56993:(t,n,r)=>{function e(t,n,r=!1){let{hasM:e,hasZ:i}=t;Array.isArray(n)?4!==n.length||e||i?3===n.length&&r&&!e?(i=!0,e=!1):3===n.length&&e&&i&&(e=!1,i=!1):(e=!0,i=!0):(i=!i&&n.hasZ&&(!e||n.hasM),e=!e&&n.hasM&&(!i||n.hasZ)),t.hasZ=i,t.hasM=e}r.d(n,{h:()=>e})},59803:(t,n,r)=>{r.d(n,{T:()=>s});var e=r(34727),i=r(15507);function s(t,n,r){const[s,a]=t,[o,u]=n,[c,h]=r,[l,f]=[o-s,u-a];let m=l*(c-s)+f*(h-a);m/=l**2+f**2,m=(0,e.qE)(m,0,1);const M=(0,i.RS)([0,0],t,n,m);return{t:m,curvePoint:M,distance:Math.sqrt((0,i.kb)(M,r))}}},77690:(t,n,r)=>{r.d(n,{B8:()=>o,Ge:()=>m,I0:()=>f,KC:()=>u,a4:()=>c,hZ:()=>s,hs:()=>l,lw:()=>h,mg:()=>a,z0:()=>i});var e=r(34304);function i(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t}function s(t,n,r,e,i,s,a,o,u,c){return t[0]=n,t[1]=r,t[2]=e,t[3]=i,t[4]=s,t[5]=a,t[6]=o,t[7]=u,t[8]=c,t}function a(t,n){if(t===n){const r=n[1],e=n[2],i=n[5];t[1]=n[3],t[2]=n[6],t[3]=r,t[5]=n[7],t[6]=e,t[7]=i}else t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8];return t}function o(t,n){const r=n[0],e=n[1],i=n[2],s=n[3],a=n[4],o=n[5],u=n[6],c=n[7],h=n[8],l=h*a-o*c,f=-h*s+o*u,m=c*s-a*u;let M=r*l+e*f+i*m;return M?(M=1/M,t[0]=l*M,t[1]=(-h*e+i*c)*M,t[2]=(o*e-i*a)*M,t[3]=f*M,t[4]=(h*r-i*u)*M,t[5]=(-o*r+i*s)*M,t[6]=m*M,t[7]=(-c*r+e*u)*M,t[8]=(a*r-e*s)*M,t):null}function u(t,n){const r=n[0],e=n[1],i=n[2],s=n[3],a=n[4],o=n[5],u=n[6],c=n[7],h=n[8];return t[0]=a*h-o*c,t[1]=i*c-e*h,t[2]=e*o-i*a,t[3]=o*u-s*h,t[4]=r*h-i*u,t[5]=i*s-r*o,t[6]=s*c-a*u,t[7]=e*u-r*c,t[8]=r*a-e*s,t}function c(t){const n=t[0],r=t[1],e=t[2],i=t[3],s=t[4],a=t[5],o=t[6],u=t[7],c=t[8];return n*(c*s-a*u)+r*(-c*i+a*o)+e*(u*i-s*o)}function h(t,n,r){const e=n[0],i=n[1],s=n[2],a=n[3],o=n[4],u=n[5],c=n[6],h=n[7],l=n[8],f=r[0],m=r[1],M=r[2],g=r[3],x=r[4],d=r[5],p=r[6],y=r[7],b=r[8];return t[0]=f*e+m*a+M*c,t[1]=f*i+m*o+M*h,t[2]=f*s+m*u+M*l,t[3]=g*e+x*a+d*c,t[4]=g*i+x*o+d*h,t[5]=g*s+x*u+d*l,t[6]=p*e+y*a+b*c,t[7]=p*i+y*o+b*h,t[8]=p*s+y*u+b*l,t}function l(t,n,r){const e=r[0],i=r[1],s=r[2];return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=i*n[3],t[4]=i*n[4],t[5]=i*n[5],t[6]=s*n[6],t[7]=s*n[7],t[8]=s*n[8],t}function f(t,n){const r=n[0],e=n[1],i=n[2],s=n[3],a=r+r,o=e+e,u=i+i,c=r*a,h=e*a,l=e*o,f=i*a,m=i*o,M=i*u,g=s*a,x=s*o,d=s*u;return t[0]=1-l-M,t[3]=h-d,t[6]=f+x,t[1]=h+d,t[4]=1-c-M,t[7]=m-g,t[2]=f-x,t[5]=m+g,t[8]=1-c-l,t}function m(t,n){const r=n[0],e=n[1],i=n[2],s=n[3],a=n[4],o=n[5],u=n[6],c=n[7],h=n[8],l=n[9],f=n[10],m=n[11],M=n[12],g=n[13],x=n[14],d=n[15],p=r*o-e*a,y=r*u-i*a,b=r*c-s*a,v=e*u-i*o,I=e*c-s*o,P=i*c-s*u,R=h*g-l*M,S=h*x-f*M,N=h*d-m*M,A=l*x-f*g,z=l*d-m*g,q=f*d-m*x;let Z=p*q-y*z+b*A+v*N-I*S+P*R;return Z?(Z=1/Z,t[0]=(o*q-u*z+c*A)*Z,t[1]=(u*N-a*q-c*S)*Z,t[2]=(a*z-o*N+c*R)*Z,t[3]=(i*z-e*q-s*A)*Z,t[4]=(r*q-i*N+s*S)*Z,t[5]=(e*N-r*z-s*R)*Z,t[6]=(g*P-x*I+d*v)*Z,t[7]=(x*b-M*P-d*y)*Z,t[8]=(M*I-g*b+d*p)*Z,t):null}function M(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t[3]=n[3]-r[3],t[4]=n[4]-r[4],t[5]=n[5]-r[5],t[6]=n[6]-r[6],t[7]=n[7]-r[7],t[8]=n[8]-r[8],t}const g=h,x=M;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t[3]=n[3]+r[3],t[4]=n[4]+r[4],t[5]=n[5]+r[5],t[6]=n[6]+r[6],t[7]=n[7]+r[7],t[8]=n[8]+r[8],t},adjoint:u,copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},determinant:c,equals:function(t,n){const r=t[0],i=t[1],s=t[2],a=t[3],o=t[4],u=t[5],c=t[6],h=t[7],l=t[8],f=n[0],m=n[1],M=n[2],g=n[3],x=n[4],d=n[5],p=n[6],y=n[7],b=n[8],v=(0,e.FD)();return Math.abs(r-f)<=v*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(i-m)<=v*Math.max(1,Math.abs(i),Math.abs(m))&&Math.abs(s-M)<=v*Math.max(1,Math.abs(s),Math.abs(M))&&Math.abs(a-g)<=v*Math.max(1,Math.abs(a),Math.abs(g))&&Math.abs(o-x)<=v*Math.max(1,Math.abs(o),Math.abs(x))&&Math.abs(u-d)<=v*Math.max(1,Math.abs(u),Math.abs(d))&&Math.abs(c-p)<=v*Math.max(1,Math.abs(c),Math.abs(p))&&Math.abs(h-y)<=v*Math.max(1,Math.abs(h),Math.abs(y))&&Math.abs(l-b)<=v*Math.max(1,Math.abs(l),Math.abs(b))},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=0,t[3]=n[2],t[4]=n[3],t[5]=0,t[6]=n[4],t[7]=n[5],t[8]=1,t},fromMat4:i,fromQuat:f,fromRotation:function(t,n){const r=Math.sin(n),e=Math.cos(n);return t[0]=e,t[1]=r,t[2]=0,t[3]=-r,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:o,isOrthoNormal:function(t){const n=(0,e.FD)(),r=t[0],i=t[1],s=t[2],a=t[3],o=t[4],u=t[5],c=t[6],h=t[7],l=t[8];return Math.abs(1-(r*r+a*a+c*c))<=n&&Math.abs(1-(i*i+o*o+h*h))<=n&&Math.abs(1-(s*s+u*u+l*l))<=n},mul:g,multiply:h,multiplyScalar:function(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t[4]=n[4]*r,t[5]=n[5]*r,t[6]=n[6]*r,t[7]=n[7]*r,t[8]=n[8]*r,t},multiplyScalarAndAdd:function(t,n,r,e){return t[0]=n[0]+r[0]*e,t[1]=n[1]+r[1]*e,t[2]=n[2]+r[2]*e,t[3]=n[3]+r[3]*e,t[4]=n[4]+r[4]*e,t[5]=n[5]+r[5]*e,t[6]=n[6]+r[6]*e,t[7]=n[7]+r[7]*e,t[8]=n[8]+r[8]*e,t},normalFromMat4:m,normalFromMat4Legacy:function(t,n){const r=n[0],e=n[1],i=n[2],s=n[4],a=n[5],o=n[6],u=n[8],c=n[9],h=n[10],l=h*a-o*c,f=-h*s+o*u,m=c*s-a*u,M=r*l+e*f+i*m;if(!M)return null;const g=1/M;return t[0]=l*g,t[1]=(-h*e+i*c)*g,t[2]=(o*e-i*a)*g,t[3]=f*g,t[4]=(h*r-i*u)*g,t[5]=(-o*r+i*s)*g,t[6]=m*g,t[7]=(-c*r+e*u)*g,t[8]=(a*r-e*s)*g,t},projection:function(t,n,r){return t[0]=2/n,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/r,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,n,r){const e=n[0],i=n[1],s=n[2],a=n[3],o=n[4],u=n[5],c=n[6],h=n[7],l=n[8],f=Math.sin(r),m=Math.cos(r);return t[0]=m*e+f*a,t[1]=m*i+f*o,t[2]=m*s+f*u,t[3]=m*a-f*e,t[4]=m*o-f*i,t[5]=m*u-f*s,t[6]=c,t[7]=h,t[8]=l,t},scale:l,scaleByVec2:function(t,n,r){const e=r[0],i=r[1];return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=i*n[3],t[4]=i*n[4],t[5]=i*n[5],t},set:s,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:x,subtract:M,translate:function(t,n,r){const e=n[0],i=n[1],s=n[2],a=n[3],o=n[4],u=n[5],c=n[6],h=n[7],l=n[8],f=r[0],m=r[1];return t[0]=e,t[1]=i,t[2]=s,t[3]=a,t[4]=o,t[5]=u,t[6]=f*e+m*a+c,t[7]=f*i+m*o+h,t[8]=f*s+m*u+l,t},transpose:a},Symbol.toStringTag,{value:"Module"}))},79567:(t,n,r)=>{r.d(n,{e:()=>h});var e=r(19419),i=r(4305),s=r(513),a=r(50954),o=r(52006),u=r(49663),c=r(46068);function h(t,n,r){if((0,o.Xq)(r))return(0,e.tK)(t,n),(0,e.tK)(t,r),t;if((0,o.n1)(r))return(0,i.lM)(t,n,r);if((0,o.aO)(r)){const e=(0,a.pM)(n,r);return(0,s.X0)(t,e)}if((0,o.DA)(r)){const e=(0,u.i)(n,r);return(0,s.X0)(t,e)}return(0,c.DL)(t,n,r)}},90634:(t,n,r)=>{r.d(n,{HA:()=>h,Z3:()=>m,ge:()=>l,v:()=>f});var e=r(537);const i=[];function s(t,n,r,e){return{xmin:t,ymin:n,xmax:r,ymax:e}}function a(t,n,r,e,i,s){return{xmin:t,ymin:n,zmin:r,xmax:e,ymax:i,zmax:s}}function o(t,n,r,e,i,s){return{xmin:t,ymin:n,mmin:r,xmax:e,ymax:i,mmax:s}}function u(t,n,r,e,i,s,a,o){return{xmin:t,ymin:n,zmin:r,mmin:e,xmax:i,ymax:s,zmax:a,mmax:o}}function c(t,n=!1,r=!1){return n?r?u(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]):a(t[0],t[1],t[2],t[3],t[4],t[5]):r?o(t[0],t[1],t[2],t[3],t[4],t[5]):s(t[0],t[1],t[2],t[3])}function h(t){return t?function(t){return void 0!==t.xmin&&void 0!==t.ymin&&void 0!==t.xmax&&void 0!==t.ymax}(t)?t:function(t){return void 0!==t.x&&void 0!==t.y}(t)?function(t){const{x:n,y:r,z:e,m:i}=t,c=null!=i;return null!=e?c?u(n,r,e,i,n,r,e,i):a(n,r,e,n,r,e):c?o(n,r,i,n,r,i):s(n,r,n,r)}(t):function(t){return void 0!==t.rings}(t)?f(t):function(t){return void 0!==t.paths}(t)?m(t):function(t){return void 0!==t.points}(t)?l(t):null:null}function l(t){const{hasZ:n,hasM:r,points:s}=t,a=(0,e.Pj)(i,s,n??!1,r??!1,n??!1,r??!1);return a?c(a,n,r):null}function f(t){const{hasZ:n,hasM:r,rings:s,curveRings:a}=t,o=(0,e.Yz)(i,a??s,n??!1,r??!1);return o?c(o,n,r):null}function m(t){const{hasZ:n,hasM:r,paths:s,curvePaths:a}=t,o=(0,e.Yz)(i,a??s,n??!1,r??!1);return o?c(o,n,r):null}}}]);