@arcgis/core 6.0.0-next.27 → 6.0.0-next.29

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 (421) hide show
  1. package/Map.d.ts +6 -0
  2. package/analysis/AreaMeasurementAnalysis.d.ts +4 -2
  3. package/analysis/DirectLineMeasurementAnalysis.d.ts +8 -4
  4. package/arcgisGlobal.d.ts +0 -2
  5. package/assets/esri/core/workers/RemoteClient.js +1 -1
  6. package/assets/esri/core/workers/chunks/131185d26343a997495e.js +1 -0
  7. package/assets/esri/core/workers/chunks/144bad0c2415c345736a.js +1 -0
  8. package/assets/esri/core/workers/chunks/176d0a06ebff5a29dedf.js +1 -0
  9. package/assets/esri/core/workers/chunks/{b0ca81a07cff25df19d2.js → 176d75e76318bfc25a53.js} +1 -1
  10. package/assets/esri/core/workers/chunks/18776a130d96879a68b1.js +1 -0
  11. package/assets/esri/core/workers/chunks/{e35641a3a4da8cfbcf54.js → 189321d88026bd7e6d3e.js} +1 -1
  12. package/assets/esri/core/workers/chunks/18e7fa4d3e0b1a084cc6.js +1 -0
  13. package/assets/esri/core/workers/chunks/{1168bc5c9f0a7e1f63a2.js → 1989410a618865f02dec.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{2c0cb214fedb29487eef.js → 199a7f97916679e0257c.js} +1 -1
  15. package/assets/esri/core/workers/chunks/1c406ab2bf99ac563316.js +1 -0
  16. package/assets/esri/core/workers/chunks/1d96fbad881a7d14a950.js +1 -0
  17. package/assets/esri/core/workers/chunks/{42d44c7d532df5ee70e9.js → 1deca3de77b1a9a07da4.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{45f826554499c38968c6.js → 1ee4df0fd61440cb5f02.js} +1 -1
  19. package/assets/esri/core/workers/chunks/22e73501e1435a896826.js +1 -0
  20. package/assets/esri/core/workers/chunks/25657f70c5f04a4ed978.js +1 -0
  21. package/assets/esri/core/workers/chunks/276a0b549acf048e8673.js +1 -0
  22. package/assets/esri/core/workers/chunks/{56e903ccef66cbe18f92.js → 2cd60fd062d954322c1f.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{ad96132bc89671e595f3.js → 2d3e0e4442dbc6ec6def.js} +1 -1
  24. package/assets/esri/core/workers/chunks/2de4296590bf9f9e9add.js +1 -0
  25. package/assets/esri/core/workers/chunks/2f5d014d6a72108b0b3a.js +1 -0
  26. package/assets/esri/core/workers/chunks/{0363d29fc665d169ebc4.js → 3105336a05f38a95ebea.js} +1 -1
  27. package/assets/esri/core/workers/chunks/379ef56f6b32494832a6.js +1 -0
  28. package/assets/esri/core/workers/chunks/3aafdb905c697bc9b1ad.js +1 -0
  29. package/assets/esri/core/workers/chunks/40c2674dae73f0942751.js +1 -0
  30. package/assets/esri/core/workers/chunks/418addce122dbb8897b4.js +1 -0
  31. package/assets/esri/core/workers/chunks/4419732baf3459a80e6d.js +1 -0
  32. package/assets/esri/core/workers/chunks/4976f5567fc7f1b63d10.js +1 -0
  33. package/assets/esri/core/workers/chunks/4e17665dd9048c300d87.js +1 -0
  34. package/assets/esri/core/workers/chunks/5396b6e99a0546a25d19.js +1 -0
  35. package/assets/esri/core/workers/chunks/53c7510df09b71ab5646.js +1 -0
  36. package/assets/esri/core/workers/chunks/561c48cb4d49b150765b.js +1 -0
  37. package/assets/esri/core/workers/chunks/{d90a3bfd45b5ed4092e0.js → 590fe0f56bc4c33a50e7.js} +1 -1
  38. package/assets/esri/core/workers/chunks/5bb6c255bdc8aa9ba23e.js +1 -0
  39. package/assets/esri/core/workers/chunks/5f1cb79aec9c4a9b7ddc.js +29 -0
  40. package/assets/esri/core/workers/chunks/{23a4806b4cdf7cc32e4d.js → 5f787809b74eed7b9a91.js} +1 -1
  41. package/assets/esri/core/workers/chunks/636e9c4ac1f9ae98f9d1.js +1 -0
  42. package/assets/esri/core/workers/chunks/654f5441227579d2b6b4.js +1 -0
  43. package/assets/esri/core/workers/chunks/692f0093c444fcc752b5.js +1 -0
  44. package/assets/esri/core/workers/chunks/69627b2634da64dd885f.js +1 -0
  45. package/assets/esri/core/workers/chunks/6a7de221cea4426cb490.js +1 -0
  46. package/assets/esri/core/workers/chunks/7030a4d0714a35995a58.js +1 -0
  47. package/assets/esri/core/workers/chunks/72d20d3957d612f86431.js +1 -0
  48. package/assets/esri/core/workers/chunks/7862abd24fb5c3b12e6b.js +1 -0
  49. package/assets/esri/core/workers/chunks/7a0b4dc0cda190367a39.js +1 -0
  50. package/assets/esri/core/workers/chunks/{ab1660f5f8a5268c2fac.js → 84038dd85005fea413eb.js} +1 -1
  51. package/assets/esri/core/workers/chunks/849f446c718e892f39ce.js +1 -0
  52. package/assets/esri/core/workers/chunks/{8ac2098ecdc40ad41055.js → 8502274806ea52308822.js} +1 -1
  53. package/assets/esri/core/workers/chunks/865cebc5c982c040ab6f.js +1 -0
  54. package/assets/esri/core/workers/chunks/{76196c414e48834f7b92.js → 8f008eedb11685ee2048.js} +1 -1
  55. package/assets/esri/core/workers/chunks/90d797ab82d4a68ba32f.js +1 -0
  56. package/assets/esri/core/workers/chunks/9184c947cdefe06bf551.js +1 -0
  57. package/assets/esri/core/workers/chunks/9976eaa81085c0d17e14.js +1 -0
  58. package/assets/esri/core/workers/chunks/{177f353ce72133e2eeed.js → 9c2436464b7dfd666678.js} +1 -1
  59. package/assets/esri/core/workers/chunks/a125650edbed802e419a.js +1 -0
  60. package/assets/esri/core/workers/chunks/{23fd4de56de352f63e2d.js → a2196a49f89d57a0a1c7.js} +1 -1
  61. package/assets/esri/core/workers/chunks/ad21757d78e372fa2ed6.js +1 -0
  62. package/assets/esri/core/workers/chunks/b01688ccc29d33bfc82d.js +1 -0
  63. package/assets/esri/core/workers/chunks/b5eff28cf482d920b9ea.js +1 -0
  64. package/assets/esri/core/workers/chunks/{04ecf15524ff3838c01c.js → ba4520ddcb6a49988da6.js} +1 -1
  65. package/assets/esri/core/workers/chunks/be55771758e4bcef0976.js +1 -0
  66. package/assets/esri/core/workers/chunks/bead830a677690eeb6fb.js +1 -0
  67. package/assets/esri/core/workers/chunks/c131e0dd180a4c10e12e.js +1 -0
  68. package/assets/esri/core/workers/chunks/c1cf3edce15f09648eb4.js +1 -0
  69. package/assets/esri/core/workers/chunks/c4f78a481f43cfae7b63.js +1 -0
  70. package/assets/esri/core/workers/chunks/c570b90995c65bbb2e14.js +1 -0
  71. package/assets/esri/core/workers/chunks/c576bef77e34920af188.js +1 -0
  72. package/assets/esri/core/workers/chunks/c9feffb9884cfed52c4b.js +1 -0
  73. package/assets/esri/core/workers/chunks/cc97e4fd0dacad970a23.js +1 -0
  74. package/assets/esri/core/workers/chunks/ce324dde6d7daea33638.js +1 -0
  75. package/assets/esri/core/workers/chunks/d1d6154b4af1c9cc497b.js +1 -0
  76. package/assets/esri/core/workers/chunks/d3c3fb079ad97970f834.js +1 -0
  77. package/assets/esri/core/workers/chunks/daae21cf77864f3293ef.js +1 -0
  78. package/assets/esri/core/workers/chunks/dc2f93453dfa40f623ab.js +1 -0
  79. package/assets/esri/core/workers/chunks/dcf6024dc19428ff2b9d.js +1 -0
  80. package/assets/esri/core/workers/chunks/dd30b02c5978c1c5f511.js +1 -0
  81. package/assets/esri/core/workers/chunks/de3f140058aa0b907b65.js +1 -0
  82. package/assets/esri/core/workers/chunks/df375d1b0dab5ecbd1be.js +1 -0
  83. package/assets/esri/core/workers/chunks/{ef2c3febcceedc44b3ac.js → dfd4782b11d6fdca0492.js} +1 -1
  84. package/assets/esri/core/workers/chunks/{48cc58890fddbcf69cef.js → e121d15b883184ee83e7.js} +1 -1
  85. package/assets/esri/core/workers/chunks/{67e06d606c7fd2064adf.js → e2c6cd8dac01e129ccfe.js} +1 -1
  86. package/assets/esri/core/workers/chunks/e3b212f8af448ec29eef.js +1 -0
  87. package/assets/esri/core/workers/chunks/e4042e43f0081fe49f7b.js +1 -0
  88. package/assets/esri/core/workers/chunks/e480e7d5f40049a2053b.js +1 -0
  89. package/assets/esri/core/workers/chunks/eaab787a5f2445be5e5a.js +1 -0
  90. package/assets/esri/core/workers/chunks/edd36a1fc80b1d29907e.js +1 -0
  91. package/assets/esri/core/workers/chunks/ee0dc906cc7979080329.js +1 -0
  92. package/assets/esri/core/workers/chunks/f07fb9b3fa30d7ee1681.js +1 -0
  93. package/assets/esri/core/workers/chunks/f09bc86cd52224febfcb.js +1 -0
  94. package/assets/esri/core/workers/chunks/{037c67ef5c4398d5954d.js → f2dab9fcd90ce38ae3d1.js} +1 -1
  95. package/assets/esri/core/workers/chunks/f39c700f3db7db52b522.js +1 -0
  96. package/assets/esri/core/workers/chunks/f3b4159c0722df8ffe13.js +1 -0
  97. package/assets/esri/core/workers/chunks/f3dc0bc0e00635855a7a.js +1 -0
  98. package/assets/esri/core/workers/chunks/f45064066e1ab041a0b2.js +1 -0
  99. package/assets/esri/core/workers/chunks/f7398cfd8bbd041bd635.js +1 -0
  100. package/assets/esri/core/workers/chunks/f9dc38761b314d33890f.js +1 -0
  101. package/assets/esri/core/workers/chunks/fe6dcb21570395e46ce8.js +1 -0
  102. package/assets/esri/core/workers/chunks/{00580a68835aac653038.js → fefdd10bdd5a4c8d8ed0.js} +45 -48
  103. package/assets/esri/core/workers/chunks/ffe49d9e7df081bef4a5.js +1 -0
  104. package/assets/esri/themes/base/_core.scss +0 -2
  105. package/assets/esri/themes/dark/main.css +1 -1
  106. package/assets/esri/themes/light/main.css +1 -1
  107. package/assets/esri/themes/light/view.css +1 -1
  108. package/chunks/BlendLayers.glsl.js +1 -1
  109. package/chunks/Component.glsl.js +51 -54
  110. package/chunks/EmissionComposite.glsl.js +1 -1
  111. package/chunks/Fog.glsl.js +1 -1
  112. package/chunks/GaussianSplat.glsl.js +65 -21
  113. package/chunks/GaussianSplatDepth.glsl.js +53 -4
  114. package/chunks/GaussianSplatShadow.glsl.js +83 -19
  115. package/chunks/GlobalIllumination.glsl.js +2 -17
  116. package/chunks/LineMarker.glsl.js +32 -31
  117. package/chunks/OITAddEmission.glsl.js +1 -1
  118. package/chunks/RasterColorizer.glsl.js +1 -1
  119. package/chunks/RibbonLine.glsl.js +34 -34
  120. package/chunks/Terrain.glsl.js +3 -4
  121. package/chunks/Water.glsl.js +22 -23
  122. package/config.d.ts +12 -9
  123. package/config.js +1 -1
  124. package/form/FormTemplate.d.ts +1 -1
  125. package/form/elements/AttachmentElement.d.ts +2 -0
  126. package/form/elements/FieldElement.d.ts +2 -2
  127. package/form/elements/FieldElement.js +1 -1
  128. package/form/elements/RelationshipElement.d.ts +1 -1
  129. package/form/elements/TextElement.d.ts +2 -2
  130. package/form/elements/UtilityNetworkAssociationsElement.d.ts +1 -1
  131. package/form/elements/inputs/DynamicChoiceInput.d.ts +2 -2
  132. package/form/elements/inputs/inputUtils.js +1 -1
  133. package/form/elements/inputs/types.d.ts +19 -0
  134. package/form/elements/inputs.d.ts +3 -2
  135. package/form/elements/inputs.js +1 -1
  136. package/geometry/operators/containsOperator.d.ts +1 -1
  137. package/geometry/operators/densifyOperator.d.ts +1 -1
  138. package/geometry/operators/differenceOperator.d.ts +6 -4
  139. package/geometry/operators/distanceOperator.d.ts +1 -1
  140. package/geometry/operators/geodesicProximityOperator.d.ts +8 -8
  141. package/geometry/operators/graphicBufferOperator.d.ts +6 -6
  142. package/geometry/operators/integrateOperator.d.ts +2 -2
  143. package/geometry/operators/intersectsOperator.d.ts +3 -3
  144. package/geometry/operators/linesToPolygonsOperator.d.ts +2 -2
  145. package/geometry/operators/locateBetweenOperator.d.ts +2 -2
  146. package/geometry/operators/minimumBoundingCircleOperator.d.ts +1 -1
  147. package/geometry/operators/multiPartToSinglePartOperator.d.ts +2 -2
  148. package/geometry/operators/polygonSlicerOperator.d.ts +2 -2
  149. package/geometry/operators/projectOperator.d.ts +2 -2
  150. package/geometry/operators/proximityOperator.d.ts +15 -15
  151. package/geometry/operators/shapePreservingProjectOperator.d.ts +2 -2
  152. package/geometry/operators/simplifyOperator.d.ts +2 -2
  153. package/geometry/operators/support/GeographicTransformationStep.d.ts +3 -3
  154. package/geometry/operators/support/Transformation.d.ts +8 -8
  155. package/geometry/operators/support/geographicTransformationUtils.d.ts +3 -3
  156. package/geometry/operators/symmetricDifferenceOperator.d.ts +2 -2
  157. package/geometry/operators/withinOperator.d.ts +3 -3
  158. package/interfaces.d.ts +0 -14
  159. package/kernel.js +1 -1
  160. package/layers/GeospatialPDFLayer.d.ts +2 -2
  161. package/layers/ParquetLayer.d.ts +1 -1
  162. package/layers/VideoLayer.d.ts +5 -5
  163. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  164. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  165. package/layers/orientedImagery/transformations/rotationUtils.js +2 -0
  166. package/layers/orientedImagery/transformations/utils.js +1 -1
  167. package/layers/save/parquetLayerUtils.js +1 -1
  168. package/layers/support/vectorTileLayerLoader.js +1 -1
  169. package/package.json +2 -2
  170. package/popup/FeaturesModel.js +1 -1
  171. package/popup/support/featureUtils.js +1 -1
  172. package/rest/featureService/FeatureService.d.ts +0 -5
  173. package/rest/networks/support/TraceLocation.d.ts +2 -1
  174. package/rest/networks/support/TraceResult.d.ts +0 -4
  175. package/rest/support/OutDistance.d.ts +0 -1
  176. package/smartMapping/statistics/histogramForTimeSeries.js +1 -1
  177. package/smartMapping/statistics/summaryStatisticsForTimeSeries.js +1 -1
  178. package/smartMapping/support/adapters/support/histogramUtils.js +1 -1
  179. package/support/BasemapStyle.d.ts +2 -2
  180. package/symbols/cim/types.d.ts +7 -9
  181. package/views/2d/engine/vectorTiles/TileHandler.js +1 -1
  182. package/views/2d/engine/vectorTiles/style/GeoJSONVectorTileSource.js +1 -1
  183. package/views/2d/engine/vectorTiles/style/GeoJSONVectorTileSourceWorker.js +1 -1
  184. package/views/2d/engine/vectorTiles/style/geoJSONVectorTileUtils.js +2 -0
  185. package/views/2d/engine/webgl/animations/instructions.js +1 -1
  186. package/views/2d/engine/webgl/collisions/LabelMetric.js +1 -1
  187. package/views/2d/engine/webgl/collisions/LabelStore.js +1 -1
  188. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  189. package/views/2d/layers/features/FeatureContainer.js +1 -1
  190. package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
  191. package/views/2d/layers/support/visualVariableSimpleUtils.js +1 -1
  192. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementPathHelper.js +1 -1
  193. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  194. package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementController.js +1 -1
  195. package/views/3d/analysis/support/projectionUtils.js +1 -1
  196. package/views/3d/environment/SunLighting.d.ts +15 -2
  197. package/views/3d/environment/VirtualLighting.d.ts +15 -2
  198. package/views/3d/input/SceneInputManager.js +1 -1
  199. package/views/3d/input/handlers/ground/GroundMouseWheelMove.js +2 -0
  200. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  201. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
  202. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
  203. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  204. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  205. package/views/3d/navigation/Navigation3D.js +1 -1
  206. package/views/3d/state/controllers/GroundMouseWheelController.js +2 -0
  207. package/views/3d/state/controllers/PointToPointAnimationController.js +1 -1
  208. package/views/3d/state/utils/OffsetCorrectionController.js +1 -1
  209. package/views/3d/state/utils/groundNavigationUtils.js +1 -1
  210. package/views/3d/support/ResourceController.js +1 -1
  211. package/views/3d/terrain/BlendLayers.glsl.js +1 -1
  212. package/views/3d/terrain/RasterColorizer.glsl.js +1 -1
  213. package/views/3d/terrain/TerrainRenderer.js +1 -1
  214. package/views/3d/terrain/TerrainSurface.js +1 -1
  215. package/views/3d/terrain/TileAgent.js +1 -1
  216. package/views/3d/terrain/TileCompositor.js +1 -1
  217. package/views/3d/terrain/TileRenderer.js +1 -1
  218. package/views/3d/webgl-engine/Stage.js +1 -1
  219. package/views/3d/webgl-engine/collections/Component/Material/Component.glsl.js +1 -1
  220. package/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js +23 -26
  221. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +18 -21
  222. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexTangent.glsl.js +7 -8
  223. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js +5 -5
  224. package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeFragmentNormals.glsl.js +10 -12
  225. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +22 -25
  226. package/views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js +3 -5
  227. package/views/3d/webgl-engine/core/shaderLibrary/shading/forwardLocalUp.glsl.js +6 -0
  228. package/views/3d/webgl-engine/core/shaderLibrary/shading/getLocalUp.glsl.js +4 -0
  229. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +1 -1
  230. package/views/3d/webgl-engine/core/shaderLibrary/terrain/{TileBackground.glsl.js → blendLayers.glsl.js} +10 -11
  231. package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatEvaluation.glsl.js +8 -2
  232. package/views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js +1 -1
  233. package/views/3d/webgl-engine/effects/RenderPluginContext.js +2 -0
  234. package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
  235. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  236. package/views/3d/webgl-engine/effects/glow/applyEmissiveGlow.glsl.js +3 -3
  237. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  238. package/views/3d/webgl-engine/lib/GaussianSplatDepthRenderer.js +1 -1
  239. package/views/3d/webgl-engine/lib/GaussianSplatRenderer.js +1 -1
  240. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  241. package/views/3d/webgl-engine/lib/edgeRendering/EdgeUtil.glsl.js +30 -35
  242. package/views/3d/webgl-engine/materials/Water.glsl.js +1 -1
  243. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  244. package/views/3d/webgl-engine/shaders/EmissiveTechniqueConfiguration.js +1 -1
  245. package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
  246. package/views/3d/webgl-engine/shaders/GaussianSplatDepth.glsl.js +1 -1
  247. package/views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js +70 -108
  248. package/views/3d/webgl-engine/shaders/GaussianSplatShadow.glsl.js +1 -1
  249. package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
  250. package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
  251. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  252. package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
  253. package/views/VideoView.d.ts +10 -0
  254. package/views/VideoView.js +1 -1
  255. package/views/draw/DrawOperation.js +1 -1
  256. package/views/draw/DrawScreenTool.js +1 -1
  257. package/views/input/types.d.ts +2 -4
  258. package/views/interactive/options/LabelOptions.d.ts +5 -5
  259. package/views/interactive/options/SnappingOptions.d.ts +2 -2
  260. package/views/layers/LayerView.d.ts +10 -2
  261. package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +2 -3
  262. package/widgets/Editor/EditorViewModel.d.ts +10 -12
  263. package/widgets/Editor/VisibleElements.d.ts +4 -0
  264. package/widgets/Editor.d.ts +2 -0
  265. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  266. package/widgets/FeatureTable/support/EditableColumnTemplateMixin.js +1 -1
  267. package/widgets/FeatureTable.js +1 -1
  268. package/widgets/Features/FeaturesViewModel.js +1 -1
  269. package/widgets/OrientedImageryViewer/ImageMeasurementWorker.js +1 -1
  270. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  271. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  272. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  273. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  274. package/widgets/OrientedImageryViewer/imageMeasurementWorkerUtils.js +2 -0
  275. package/widgets/OrientedImageryViewer/services/ImageMeasurementService.js +1 -1
  276. package/widgets/OrientedImageryViewer/support/NonPanoramicMedia.js +1 -1
  277. package/widgets/OrientedImageryViewer/support/dataCaptureUtils.js +1 -1
  278. package/widgets/OrientedImageryViewer/support/superimposeUtils.js +1 -1
  279. package/widgets/PanoramicViewer/utils.js +1 -1
  280. package/widgets/Search/LayerSearchSource.d.ts +1 -1
  281. package/widgets/Sketch/VisibleElements.d.ts +4 -0
  282. package/widgets/Sketch.d.ts +2 -0
  283. package/widgets/support/iconUtils.js +1 -1
  284. package/assets/esri/core/workers/chunks/010f57ec7fdbedf78d02.js +0 -1
  285. package/assets/esri/core/workers/chunks/0487e1d7a7cecf7c1c25.js +0 -1
  286. package/assets/esri/core/workers/chunks/09300e74e5b014ce6269.js +0 -1
  287. package/assets/esri/core/workers/chunks/0bd04bcd4b2710838d48.js +0 -1
  288. package/assets/esri/core/workers/chunks/0d9c4c6c571ce26d356b.js +0 -1
  289. package/assets/esri/core/workers/chunks/112ed86f812e4400a7e0.js +0 -1
  290. package/assets/esri/core/workers/chunks/151e5799ede763a03ee2.js +0 -1
  291. package/assets/esri/core/workers/chunks/173f89c55a5c79ff065b.js +0 -1
  292. package/assets/esri/core/workers/chunks/2447d2e2a4a3ab8fcf94.js +0 -1
  293. package/assets/esri/core/workers/chunks/2a36fe3f3f257a779a1b.js +0 -1
  294. package/assets/esri/core/workers/chunks/2a97268000c6d03ef720.js +0 -1
  295. package/assets/esri/core/workers/chunks/2cf8172be83b10b11bdc.js +0 -1
  296. package/assets/esri/core/workers/chunks/2df37a9a95ceebb87a5f.js +0 -1
  297. package/assets/esri/core/workers/chunks/2e00c155e447e4930442.js +0 -1
  298. package/assets/esri/core/workers/chunks/2f91fd61019d2a37476d.js +0 -1
  299. package/assets/esri/core/workers/chunks/30af63b3b750142faadb.js +0 -1
  300. package/assets/esri/core/workers/chunks/3a47fc97c400fca2c736.js +0 -1
  301. package/assets/esri/core/workers/chunks/3cd04d23b73beaf79650.js +0 -1
  302. package/assets/esri/core/workers/chunks/426b4eb500fdfe9df325.js +0 -1
  303. package/assets/esri/core/workers/chunks/45367aa8e5c5d574de94.js +0 -1
  304. package/assets/esri/core/workers/chunks/47c97640ec525676918b.js +0 -1
  305. package/assets/esri/core/workers/chunks/47d074136a7f8e551a9a.js +0 -1
  306. package/assets/esri/core/workers/chunks/4a6b92ecbb1f1c55cc43.js +0 -1
  307. package/assets/esri/core/workers/chunks/4cb751dc8d00bdaeb04c.js +0 -1
  308. package/assets/esri/core/workers/chunks/518ab22f80c3300bcfff.js +0 -1
  309. package/assets/esri/core/workers/chunks/53ff68d4f9e365fc15cd.js +0 -1
  310. package/assets/esri/core/workers/chunks/58609bf94f72bc4f1952.js +0 -1
  311. package/assets/esri/core/workers/chunks/586a929bc037e23857af.js +0 -1
  312. package/assets/esri/core/workers/chunks/5c7780f804d789cb37f5.js +0 -1
  313. package/assets/esri/core/workers/chunks/5d76f4d97beee494bbbf.js +0 -1
  314. package/assets/esri/core/workers/chunks/603fdbbe9534c614928f.js +0 -1
  315. package/assets/esri/core/workers/chunks/611e3cdf67283c11576f.js +0 -1
  316. package/assets/esri/core/workers/chunks/6431480ba0fa8c8d487f.js +0 -1
  317. package/assets/esri/core/workers/chunks/652faf4359ac072c5dde.js +0 -1
  318. package/assets/esri/core/workers/chunks/65c98f3449044fa4fd79.js +0 -1
  319. package/assets/esri/core/workers/chunks/6b9961261241fdce0e94.js +0 -1
  320. package/assets/esri/core/workers/chunks/6dfe96b056bec30068df.js +0 -1
  321. package/assets/esri/core/workers/chunks/6f897b4e7ddd1dd1672b.js +0 -1
  322. package/assets/esri/core/workers/chunks/70cc2d79653d66e85b58.js +0 -1
  323. package/assets/esri/core/workers/chunks/7159d9c36869cd82599e.js +0 -29
  324. package/assets/esri/core/workers/chunks/7393f63043a1da3d05a6.js +0 -1
  325. package/assets/esri/core/workers/chunks/7449568eb2305bf2d650.js +0 -1
  326. package/assets/esri/core/workers/chunks/75d551a449bba61ce238.js +0 -1
  327. package/assets/esri/core/workers/chunks/7748c2886d0122b40eeb.js +0 -1
  328. package/assets/esri/core/workers/chunks/78643f116677950ea29a.js +0 -1
  329. package/assets/esri/core/workers/chunks/78fbe330f16bdbdb886e.js +0 -1
  330. package/assets/esri/core/workers/chunks/7e0f04a5038e2a4f6e4b.js +0 -1
  331. package/assets/esri/core/workers/chunks/7f16ae01ccd9b6114d1c.js +0 -1
  332. package/assets/esri/core/workers/chunks/90153b5230b3a4985c14.js +0 -1
  333. package/assets/esri/core/workers/chunks/9189dfe19a2a2ccd5173.js +0 -1
  334. package/assets/esri/core/workers/chunks/943a0f140813ee4ab04a.js +0 -1
  335. package/assets/esri/core/workers/chunks/98be2f621801e230aa01.js +0 -1
  336. package/assets/esri/core/workers/chunks/99f51d5d9da6e9bfc430.js +0 -1
  337. package/assets/esri/core/workers/chunks/9aebe876b1a2fb075f9c.js +0 -1
  338. package/assets/esri/core/workers/chunks/9b6929faf649e81265fb.js +0 -1
  339. package/assets/esri/core/workers/chunks/9dd1fc56eb1ea6eb705e.js +0 -1
  340. package/assets/esri/core/workers/chunks/9dd48e75b4e8d9811d81.js +0 -1
  341. package/assets/esri/core/workers/chunks/a163c6005aba3378edaa.js +0 -1
  342. package/assets/esri/core/workers/chunks/a8286febe371dc186aaa.js +0 -1
  343. package/assets/esri/core/workers/chunks/acb265a22be5e12f38e5.js +0 -1
  344. package/assets/esri/core/workers/chunks/b12acf1f694f82e00df9.js +0 -1
  345. package/assets/esri/core/workers/chunks/b83cef2d3f528726d492.js +0 -1
  346. package/assets/esri/core/workers/chunks/b9596d862da1ec342cd3.js +0 -1
  347. package/assets/esri/core/workers/chunks/bc1fcc9c897461e68e29.js +0 -1
  348. package/assets/esri/core/workers/chunks/bdc221d94300c225665a.js +0 -1
  349. package/assets/esri/core/workers/chunks/be97a629e2ae4d13ceb3.js +0 -1
  350. package/assets/esri/core/workers/chunks/bfb39590c548188f5052.js +0 -1
  351. package/assets/esri/core/workers/chunks/c2318c014e97ba519be8.js +0 -1
  352. package/assets/esri/core/workers/chunks/c29091fe157564cffcf7.js +0 -1
  353. package/assets/esri/core/workers/chunks/c62237c344e341619341.js +0 -1
  354. package/assets/esri/core/workers/chunks/c8eae00b0ec87d8b2ff3.js +0 -1
  355. package/assets/esri/core/workers/chunks/cdb5c26fed7d9a97db49.js +0 -1
  356. package/assets/esri/core/workers/chunks/cdf0c7706d3e1221f49b.js +0 -1
  357. package/assets/esri/core/workers/chunks/cea0db3ee326f60610eb.js +0 -1
  358. package/assets/esri/core/workers/chunks/d7f2f1708d2a2668676c.js +0 -1
  359. package/assets/esri/core/workers/chunks/daf9b691817e83a11f3c.js +0 -1
  360. package/assets/esri/core/workers/chunks/db41490bd39d863305bf.js +0 -1
  361. package/assets/esri/core/workers/chunks/ddc95cdac6c06fc4794c.js +0 -1
  362. package/assets/esri/core/workers/chunks/df26ec0b508cf4716e0a.js +0 -1
  363. package/assets/esri/core/workers/chunks/e11159e3dc3353b27c57.js +0 -1
  364. package/assets/esri/core/workers/chunks/e4a57a0a9629faafd6c6.js +0 -1
  365. package/assets/esri/core/workers/chunks/ebc1a2ef3aed8aa29424.js +0 -1
  366. package/assets/esri/core/workers/chunks/ec1c4d66142b6efb0e8b.js +0 -1
  367. package/assets/esri/core/workers/chunks/ef12fa3574d4cbf8b084.js +0 -1
  368. package/assets/esri/core/workers/chunks/f2d56f5c15d5977e1d19.js +0 -1
  369. package/assets/esri/core/workers/chunks/f7bfa3d33b05b250ce33.js +0 -1
  370. package/assets/esri/core/workers/chunks/f905f1a1aa4c123cbe83.js +0 -1
  371. package/assets/esri/core/workers/chunks/fc139f251dc0523074e7.js +0 -1
  372. package/assets/esri/themes/base/widgets/_VideoPlayer.scss +0 -129
  373. package/assets/esri/widgets/VideoPlayer/t9n/messages.ar.json +0 -1
  374. package/assets/esri/widgets/VideoPlayer/t9n/messages.bg.json +0 -1
  375. package/assets/esri/widgets/VideoPlayer/t9n/messages.bs.json +0 -1
  376. package/assets/esri/widgets/VideoPlayer/t9n/messages.ca.json +0 -1
  377. package/assets/esri/widgets/VideoPlayer/t9n/messages.cs.json +0 -1
  378. package/assets/esri/widgets/VideoPlayer/t9n/messages.da.json +0 -1
  379. package/assets/esri/widgets/VideoPlayer/t9n/messages.de.json +0 -1
  380. package/assets/esri/widgets/VideoPlayer/t9n/messages.el.json +0 -1
  381. package/assets/esri/widgets/VideoPlayer/t9n/messages.en.json +0 -1
  382. package/assets/esri/widgets/VideoPlayer/t9n/messages.es.json +0 -1
  383. package/assets/esri/widgets/VideoPlayer/t9n/messages.et.json +0 -1
  384. package/assets/esri/widgets/VideoPlayer/t9n/messages.fi.json +0 -1
  385. package/assets/esri/widgets/VideoPlayer/t9n/messages.fr.json +0 -1
  386. package/assets/esri/widgets/VideoPlayer/t9n/messages.he.json +0 -1
  387. package/assets/esri/widgets/VideoPlayer/t9n/messages.hr.json +0 -1
  388. package/assets/esri/widgets/VideoPlayer/t9n/messages.hu.json +0 -1
  389. package/assets/esri/widgets/VideoPlayer/t9n/messages.id.json +0 -1
  390. package/assets/esri/widgets/VideoPlayer/t9n/messages.it.json +0 -1
  391. package/assets/esri/widgets/VideoPlayer/t9n/messages.ja.json +0 -1
  392. package/assets/esri/widgets/VideoPlayer/t9n/messages.ko.json +0 -1
  393. package/assets/esri/widgets/VideoPlayer/t9n/messages.lt.json +0 -1
  394. package/assets/esri/widgets/VideoPlayer/t9n/messages.lv.json +0 -1
  395. package/assets/esri/widgets/VideoPlayer/t9n/messages.nl.json +0 -1
  396. package/assets/esri/widgets/VideoPlayer/t9n/messages.no.json +0 -1
  397. package/assets/esri/widgets/VideoPlayer/t9n/messages.pl.json +0 -1
  398. package/assets/esri/widgets/VideoPlayer/t9n/messages.pt-BR.json +0 -1
  399. package/assets/esri/widgets/VideoPlayer/t9n/messages.pt-PT.json +0 -1
  400. package/assets/esri/widgets/VideoPlayer/t9n/messages.ro.json +0 -1
  401. package/assets/esri/widgets/VideoPlayer/t9n/messages.ru.json +0 -1
  402. package/assets/esri/widgets/VideoPlayer/t9n/messages.sk.json +0 -1
  403. package/assets/esri/widgets/VideoPlayer/t9n/messages.sl.json +0 -1
  404. package/assets/esri/widgets/VideoPlayer/t9n/messages.sr.json +0 -1
  405. package/assets/esri/widgets/VideoPlayer/t9n/messages.sv.json +0 -1
  406. package/assets/esri/widgets/VideoPlayer/t9n/messages.th.json +0 -1
  407. package/assets/esri/widgets/VideoPlayer/t9n/messages.tr.json +0 -1
  408. package/assets/esri/widgets/VideoPlayer/t9n/messages.uk.json +0 -1
  409. package/assets/esri/widgets/VideoPlayer/t9n/messages.vi.json +0 -1
  410. package/assets/esri/widgets/VideoPlayer/t9n/messages.zh-CN.json +0 -1
  411. package/assets/esri/widgets/VideoPlayer/t9n/messages.zh-HK.json +0 -1
  412. package/assets/esri/widgets/VideoPlayer/t9n/messages.zh-TW.json +0 -1
  413. package/widgets/VideoPlayer/VideoPlayerViewModel.d.ts +0 -232
  414. package/widgets/VideoPlayer/VideoPlayerViewModel.js +0 -2
  415. package/widgets/VideoPlayer/components/MetadataSection.js +0 -2
  416. package/widgets/VideoPlayer/components/PlayerActionsGroup.js +0 -2
  417. package/widgets/VideoPlayer/components/PlayerControlsGroup.js +0 -2
  418. package/widgets/VideoPlayer/components/SettingsButton.js +0 -2
  419. package/widgets/VideoPlayer/css.js +0 -2
  420. package/widgets/VideoPlayer.d.ts +0 -119
  421. package/widgets/VideoPlayer.js +0 -2
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9235],{34930(e,t,r){r.d(t,{$Q:()=>l,Sd:()=>c,T5:()=>a,b7:()=>h});var n=r(86211),s=r(5443),i=r(86738),o=r(14140);function a(e,t){if(e.spatialReference.equals(t))return e;let r=(0,n.GA)(e.spatialReference),s=(0,n.GA)(t);if(r===s)return e;let i=r/s;return{x:e.x*i,y:e.y*i}}async function l(e,t,n,s){if("extent"===n.type)return function(e,t,r){let{width:n,height:s}=e,i=new Uint8Array(n*s),a=t.width/n,l=t.height/s;if(r.width/a<.5||r.height/l<.5)return new o.A({pixelType:e.pixelType,width:n,height:s,mask:i,pixels:[...e.pixels]});let{xmin:u,xmax:p,ymin:c,ymax:h}=t,{xmin:m,xmax:f,ymin:g,ymax:d}=r,y=Math.max(u,m),x=Math.min(p,f),w=Math.max(c,g),A=Math.min(h,d),v=.5*a,b=.5*l;if(x-y<v||A-w<b||x<u+v||y>p-v||w>h-b||A<c+b)return new o.A({pixelType:e.pixelType,width:n,height:s,mask:i,pixels:[...e.pixels]});let C=Math.max(0,(y-u)/a),M=Math.min(n,Math.max(0,(x-u)/a)),P=Math.max(0,(h-A)/l),T=Math.min(s,Math.max(0,(h-w)/l)),R=Math.round(C),N=Math.round(M)-1,k=Math.round(P),I=Math.round(T)-1;if(R===N&&C%1>.5&&M%1<.5||k===I&&P%1>.5&&T%1<.5)return new o.A({pixelType:e.pixelType,width:n,height:s,mask:i,pixels:[...e.pixels]});if(0===R&&0===k&&N===n&&I===s)return e;let S=e.mask;for(let e=k;e<=I;e++)for(let t=R;t<=N;t++){let r=e*n+t;i[r]=S?S[r]:255}return new o.A({pixelType:e.pixelType,width:n,height:s,mask:i,pixels:[...e.pixels]})}(e,t,n);let{width:i,height:a}=e,l=new Uint8Array(i*a),{intersectsExecute:u}=await Promise.all([r.e(9187),r.e(8885),r.e(9117),r.e(3299),r.e(1132)]).then(()=>r(25275));if(!u(t,n))return new o.A({pixelType:e.pixelType,width:i,height:a,mask:l,maskIsAlpha:!1,pixels:[...e.pixels]});if("polyline"===n.type)return s?.thinPolyline?p(e,t,n):function(e,t,r){let{width:n,height:s}=e,i=new Uint8Array(n*s),a=t.width/n,l=t.height/s,{xmin:u,ymax:p}=t,{paths:c}=r,h=e.mask;for(let e=0;e<c.length;e++){let t=c[e];for(let e=0;e<t.length-1;e++){let[r,o]=t[e],[c,m]=t[e+1],f=Math.min(o,m),g=Math.max(o,m),d=Math.max(0,Math.floor((p-g)/l)),y=Math.min(s-1,Math.floor((p-f)/l));if(!(y<d))if(o===m){let e=Math.min(r,c),t=Math.max(r,c),s=Math.max(0,Math.floor((e-u)/a)),o=Math.min(n-1,Math.floor((t-u)/a));if(o<s)continue;let l=d*n;for(let e=l+s;e<=l+o;e++)i[e]=h?h[e]:255}else{let e=(r-u)/a,t=(c-r)/(m-o)/a;for(let r=d;r<=y;r++){let s=t*(Math.min(g,p-r*l)-o)+e,a=t*(Math.max(f,p-(r+1)*l)-o)+e,u=Math.max(0,Math.floor(Math.min(s,a))),c=Math.min(n-1,Math.floor(Math.max(s,a)));if(c<u)continue;let m=r*n;for(let e=m+u;e<=m+c;e++)i[e]=h?h[e]:255}}}}return new o.A({pixelType:e.pixelType,width:n,height:s,mask:i,maskIsAlpha:e.maskIsAlpha,pixels:[...e.pixels]})}(e,t,n);let{containsExecute:c}=await Promise.all([r.e(9187),r.e(8885),r.e(9117),r.e(3299),r.e(6671)]).then(()=>r(30912));return c(n,t)?e:function(e,t,r){if(!e)return e;let{width:n,height:s}=e,i=function(e){let t,{geometry:r,size:n,srcExtent:s,srcMask:i}=e,[o,a]=n,l=s.width/o,u=s.height/a,{xmin:p,ymax:c}=s;if("extent"===r.type){let e=(r.xmin-p)/l,n=(r.xmax-p)/l,s=(c-r.ymax)/u,i=(c-r.ymin)/u;t=[[[e,s],[e,i],[n,i],[n,s],[e,s]]]}else t=r.rings.map(e=>e.map(([e,t])=>[(e-p)/l,(c-t)/u]));return function(e,t,r){let[n,s]=t,i=new OffscreenCanvas(n,s).getContext("2d");i.fillStyle="#f00",i.beginPath(),e.forEach(e=>{i.moveTo(e[0][0],e[0][1]);for(let t=0;t<e.length;t++)i.lineTo(e[t][0],e[t][1]);i.closePath()}),i.fill();let o=i.getImageData(0,0,n,s).data,a=n*s,l=new Uint8Array(a),u=!1;for(let e=0;e<a;e++)(!r||r[e])&&(o[4*e+3]>127?l[e]=255:u=!0);return u||r?l:void 0}(t,n,i)}({geometry:r,size:[n,s],srcExtent:t,srcMask:e.mask});return new o.A({pixelType:e.pixelType,width:n,height:s,mask:i,maskIsAlpha:!1,pixels:[...e.pixels]})}(e,t,n)}function u(e){let{size:t,start:r,end:n,outMask:s,srcMask:i}=e,[o,a]=t,[l,u]=r,[p,c]=n;if(Math.max(l,p)<=0||Math.min(l,p)>=o||Math.max(u,c)<=0||Math.min(u,c)>=a)return;let h=Math.abs(p-l),m=Math.abs(c-u);if(0===h&&0===m){let e=Math.floor(l),t=Math.floor(u)*o+e;return void(s[t]=i?i[t]:255)}let f=m>h;f&&([l,u]=[u,l],[p,c]=[c,p],[h,m]=[m,h],[o,a]=[a,o]),l>p&&([l,p]=[p,l],[u,c]=[c,u]);let g=Math.max(0,Math.floor(l)),d=Math.min(o-1,Math.floor(p)),y=u<=c?1:-1,x=Math.floor(Math.min(u,c)),w=Math.floor(Math.max(u,c)),A=m/h,v=u+(g+.5-l)*y*A,b=y>0?Math.floor(v):Math.ceil(v)-1,C=y>0?v-b:b+1-v;for(let e=g;e<=d;e++){let t=Math.max(x,Math.min(w,b));if(t>=0&&t<a){let r=f?e*a+t:t*o+e;s[r]=i?i[r]:255}C+=A,C>=1&&(b+=y,--C)}}function p(e,t,r){let{width:n,height:s,mask:i}=e,a=new Uint8Array(n*s),l=t.width/n,p=t.height/s,{xmin:c,ymax:h}=t,m=[n,s];for(let e of r.paths)for(let t=0;t<e.length-1;t++){let[r,n]=e[t],[s,o]=e[t+1];u({size:m,start:[(r-c)/l,(h-n)/p],end:[(s-c)/l,(h-o)/p],srcMask:i,outMask:a})}return new o.A({pixelType:e.pixelType,width:n,height:s,mask:a,maskIsAlpha:e.maskIsAlpha,pixels:[...e.pixels]})}function c(e,t){let{extent:r}=h(e,t,new i.A({x:e.pixelSize.x,y:e.pixelSize.y,spatialReference:e.spatialReference})),{extent:n}=e.extent;if(r.xmax=Math.min(r.xmax,n.xmax),r.ymax=Math.min(r.ymax,n.ymax),r.xmin<r.xmax&&r.ymin<r.ymax){let{x:t,y:n}=e.pixelSize,s=Math.round(r.width/t),i=Math.round(r.height/n);e.extent=r,e.width=s,e.height=i}}function h(e,t,r,n=!0){let i,o,l,{spatialReference:u}=e,{x:p,y:c}=a(r,u),{xmin:h,xmax:m,ymax:f,ymin:g}="extent"===t.type?t:t.extent,{xmin:d,ymax:y}=e.extent;return n?(h=d+(h>d?p*Math.round((h-d)/p):0),f=y-(f<y?c*Math.round((y-f)/c):0),m=d+(m>d?p*Math.round((m-d)/p):0),g=y-(g<y?c*Math.round((y-g)/c):0),i=new s.A({xmin:h,ymax:f,xmax:m,ymin:g,spatialReference:u}),o=Math.round(i.width/p),l=Math.round(i.height/c)):(o=Math.floor((m-h)/p+.8),l=Math.floor((f-g)/c+.8),h=d+(h>d?p*Math.floor((h-d)/p+.1):0),f=y-(f<y?c*Math.floor((y-f)/c+.1):0),m=h+o*p,g=f-l*c,i=new s.A({xmin:h,ymax:f,xmax:m,ymin:g,spatialReference:u})),{extent:i,width:o,height:l}}},99235(e,t,r){r.d(t,{vt:()=>Un,UD:()=>Vn});var n=r(85334),s=r(49186),i=r(4718),o=r(32198),a=r(91429),l=r(94778),u=r(25482);let p=class extends u.o{constructor(){super(...arguments),this.raster=void 0}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],p.prototype,"raster",void 0),p=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.BaseFunctionArguments")],p);const c=p;var h;let m=h=class extends c{constructor(){super(...arguments),this.raster2=void 0}get rasters(){return[this.raster,this.raster2]}clone(){return new h({raster:this.raster,raster2:this.raster2,operation:this.operation})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],m.prototype,"operation",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],m.prototype,"raster2",void 0),(0,o.Cg)([(0,a.MZ)({readOnly:!0})],m.prototype,"rasters",null),m=h=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ArithmeticFunctionArguments")],m);const f=m;var g=r(14140),d=r(87186);const y=new Set(["slope","aspect","curvature","hillshade","shadedrelief","statistics"]);let x=class extends u.o{constructor(){super(...arguments),this.functionArguments=null,this.readingBufferSize=0,this.id=-1,this.isNoopProcess=!1,this.rawInputBandIds=[],this.rawSourceRasterInfos=null,this.isInputBandIdsSwizzled=!1,this.swizzledBandSelection=[],this.isBranch=!1,this.isRoot=!1,this._bindingResult=null}get supportsGPU(){return this._bindingResult.supportsGPU}get flatWebGLFunctionChain(){let e=this.getWebGLProcessorDefinition();if(!e)return null;let t=[e],{parameters:r}=e,n=r.rasters||r.raster&&[r.raster];for(;n?.length;){t.unshift(...n);let e=[];for(let t=0;t<n.length;t++){let{parameters:r}=n[t],s=r.rasters||r.raster&&[r.raster];s?.length&&e.push(...s)}n=e}for(let e=t.length-1;e>=0;e--)t[e].isNoopProcess&&t.splice(e,1);let s=!1;for(let e=0;e<t.length;e++){let r=t[e];r.id=t.length-e-1;let{rasters:n}=r.parameters;s||=null!=n&&n.length>1}let i=t.some(({name:e})=>y.has(e.toLowerCase())),{rawSourceRasterInfos:o}=this;return{functions:t,hasBranches:s,hasFocalFunction:i,isSourceSingleBand:1===o?.[0]?.bandCount}}get neighborhoodSize(){let{rows:e,cols:t}=this._getNeighborhoodSize(),r=this.getImmediateChildFunctions();for(let n of r){let r=n.neighborhoodSize;e=Math.max(e,r.rows),t=Math.max(t,r.cols)}return{rows:e,cols:t}}bind(e,t=!1,r=-1){this.id=r+1;let n=this._getRasterValues(),s=!0;for(let r=0;r<n.length;r++){let i=n[r];if(null!=i&&this._isRasterFunctionValue(i)){let n=i.bind(e,t,this.id+r);if(!n.success)return this._bindingResult=n,n;s&&=n.supportsGPU}}return!this.rasterInfo||t?(this.sourceRasterInfos=this._getSourceRasterInfos(e),this._bindingResult=this._bindSourceRasters(),s&&=this._bindingResult.supportsGPU,this._bindingResult.success&&(this._patchRasterInfo(),s&&this.isRoot&&(this.processInputBandIds(),this.swizzleInputBandIds(this.rawInputBandIds)||(s=this.rawInputBandIds.length<=3))),this._bindingResult.supportsGPU=s,this._bindingResult):(this._bindingResult={success:!0,supportsGPU:!0},this._bindingResult)}queryRasterFunction(e){let t=[this];for(;t.length;){let r=t.pop();if(e(r))return r;let n=r.getImmediateChildFunctions();t.push(...n)}}getImmediateChildFunctions(){return this._getRasterValues().filter(e=>e&&"object"==typeof e&&"bind"in e)}process(e,t){let r=this._getRasterValues(),n=0===r.length?e.pixelBlocks??e.primaryPixelBlocks:r.map(r=>this._readRasterValue(r,e,t));return this._processPixels({...e,pixelBlocks:n},t)}processInputBandIds(){let e=this._getRasterValues().filter(this._isRasterFunctionValue);if(e.length>1){let t=e.map(e=>e.processInputBandIds());return this.rawInputBandIds=[...new Set(t.flat())],this.rawInputBandIds}let t=e[0];if(t)return this.rawInputBandIds=t.processInputBandIds(),this.rawInputBandIds;let{bandCount:r}=this.sourceRasterInfos[0],n=Array.from({length:r},(e,t)=>t);return this.rawInputBandIds=this._getInputBandIds(n),this.rawInputBandIds}swizzleInputBandIds(e){let t=this._getRasterValues().filter(this._isRasterFunctionValue),r=!0;for(let n of t)r=n.swizzleInputBandIds(e)&&r;return!!r&&this._swizzleBandIds(e)}getPrimaryRasters(){let e=[],t=[];return this._getPrimaryRasters(this,e,t),{rasters:e,rasterIds:t}}getWebGLProcessorDefinition(){let e=this._getWebGLParameters(),{raster:t,rasters:r}=this.functionArguments;return r&&Array.isArray(r)&&r.length?(e.rasters=r.map(e=>this._isRasterFunctionValue(e)?e.getWebGLProcessorDefinition():"number"==typeof e?{name:"Constant",parameters:{value:e},pixelType:"f32",id:-1,isNoopProcess:!1}:{name:"Identity",parameters:{value:e},pixelType:"f32",id:-1,isNoopProcess:!1}),e.rasters.some(e=>null!=e)||(e.rasters=null)):this._isRasterFunctionValue(t)&&(e.raster=t.getWebGLProcessorDefinition()),{name:this.functionName,parameters:e,pixelType:this.outputPixelType,id:this.id,isNoopProcess:this.isNoopProcess}}getClippingGeometries(){let e=[];"Clip"===this.functionName&&e.push(this.functionArguments);let{raster:t,rasters:r}=this.functionArguments;if(r&&Array.isArray(r)&&r.length)r.forEach(t=>{if(this._isRasterFunctionValue(t)){let r=t.getClippingGeometries();e.push(...r)}});else if(this._isRasterFunctionValue(t)){let r=t.getClippingGeometries();e.push(...r)}return e}_getOutputPixelType(e){return"unknown"===this.outputPixelType?e:this.outputPixelType??e}_getWebGLParameters(){return{}}_getInputBandIds(e){return e}_swizzleBandIds(e){return!0}_isInputRasterPrimaryOrConstant(){return!this._getRasterValues().some(e=>e&&"object"==typeof e&&"rasterFunction"in e&&e.rasterFunction)}_getNeighborhoodSize(){return{rows:1,cols:1}}_removeStatsHistColormapVAT(e){e.statistics=null,e.histograms=null,e.colormap=null,e.attributeTable=null,e.multidimensionalInfo?.variables.forEach(e=>{e.statistics=void 0,e.histograms=void 0})}_getRasterValues(){let{rasterArgumentNames:e}=this;return"rasters"===e[0]?this.functionArguments.rasters??[]:e.flatMap(e=>this.functionArguments[e])}_getSourceRasterInfos(e){let t=this._getRasterValues(),{rasterInfos:r,rasterIds:n}=e;if(0===t.length)return r;let s=t.map(e=>e&&"object"==typeof e&&"bind"in e&&e.rasterInfo?e.rasterInfo:"string"==typeof e&&n.includes(e)?r[n.indexOf(e)]:"number"!=typeof e?r[0]:void 0),i=s.find(e=>e)??r[0];return s.forEach((e,t)=>{void 0===e&&(s[t]=i)}),s}_getPrimaryRasterId(e){return e?.rasterId}_getPrimaryRasters(e,t=[],r=[]){for(let n=0;n<e.sourceRasters.length;n++){let s=e.sourceRasters[n];if("number"!=typeof s)if("bind"in s)this._getPrimaryRasters(s,t,r);else{let e=s,n=this._getPrimaryRasterId(e);if(null==n)continue;r.includes(n)||(this.mainPrimaryRasterId===n?(t.unshift(e),r.unshift(n)):(t.push(e),r.push(n)))}}}_isRasterFunctionValue(e){return"object"==typeof e&&!!e&&"getWebGLProcessorDefinition"in e}_readRasterValue(e,t,r){let{primaryPixelBlocks:n}=t;if(null==e||"$$"===e){let e=n[0];return null==e?null:e.clone()}if("string"==typeof e){let r=t.primaryRasterIds.indexOf(e);return-1===r?null:n[r]}if("number"==typeof e){let t=n[0];if(null==t)return null;let{width:r,height:s,pixelType:i}=t,o=new Float32Array(r*s);o.fill(e);let a=this.sourceRasterInfos[0].bandCount,l=Array(a).fill(o);return new g.A({width:r,height:s,pixelType:i,pixels:l})}return e.process(t,r)}_patchRasterInfo(){let{rasterInfo:e}=this;if(!e?.keyProperties)return;let{bandCount:t,keyProperties:r,statistics:n,histograms:s}=e,i=r.BandProperties;i&&i.length!==t&&(e.keyProperties={...r,BandProperties:void 0}),n&&n.length!==t&&(e.statistics=n.length>t?n.slice(0,t):null),s&&s.length!==t&&(e.histograms=s.length>t?s.slice(0,t):null),r.BAND_COUNT&&Number(r.BAND_COUNT)!==t&&(e.keyProperties={...r,BAND_COUNT:"string"==typeof r.BAND_COUNT?String(t):t})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],x.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}}),(0,a.wg)(e=>e?.toLowerCase())],x.prototype,"outputPixelType",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"mainPrimaryRasterId",void 0),(0,o.Cg)([(0,a.MZ)()],x.prototype,"sourceRasters",void 0),(0,o.Cg)([(0,a.MZ)({type:[d.A],json:{write:!0}})],x.prototype,"sourceRasterInfos",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"rasterInfo",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"readingBufferSize",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"id",void 0),(0,o.Cg)([(0,a.MZ)()],x.prototype,"isNoopProcess",void 0),(0,o.Cg)([(0,a.MZ)()],x.prototype,"supportsGPU",null),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"rawInputBandIds",void 0),(0,o.Cg)([(0,a.MZ)()],x.prototype,"rawSourceRasterInfos",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"isInputBandIdsSwizzled",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],x.prototype,"swizzledBandSelection",void 0),(0,o.Cg)([(0,a.MZ)()],x.prototype,"isBranch",void 0),(0,o.Cg)([(0,a.MZ)()],x.prototype,"isRoot",void 0),(0,o.Cg)([(0,a.MZ)({readOnly:!0})],x.prototype,"flatWebGLFunctionChain",null),(0,o.Cg)([(0,a.MZ)({readOnly:!0})],x.prototype,"neighborhoodSize",null),(0,o.Cg)([(0,a.MZ)()],x.prototype,"_bindingResult",void 0),x=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.BaseRasterFunction")],x);const w=x,A={userDefined:-1,lineDetectionHorizontal:0,lineDetectionVertical:1,lineDetectionLeftDiagonal:2,lineDetectionRightDiagonal:3,gradientNorth:4,gradientWest:5,gradientEast:6,gradientSouth:7,gradientNorthEast:8,gradientNorthWest:9,smoothArithmeticMean:10,smoothing3x3:11,smoothing5x5:12,sharpening3x3:13,sharpening5x5:14,laplacian3x3:15,laplacian5x5:16,sobelHorizontal:17,sobelVertical:18,sharpen:19,sharpen2:20,pointSpread:21,none:255},v={bitwiseAnd:11,bitwiseLeftShift:12,bitwiseNot:13,bitwiseOr:14,bitwiseRightShift:15,bitwiseXOr:16,booleanAnd:17,booleanNot:18,booleanOr:19,booleanXOr:20,equalTo:24,greaterThan:28,greaterThanEqual:29,lessThan:33,lessThanEqual:34,isNull:31,notEqual:46},b={acos:6,asin:7,atan:8,atanh:9,cos:21,cosh:22,sin:51,sinh:52,tan:56,tanh:57,acosh:59,asinh:60,atan2:61},C={setNull:50,conditional:78},M={plus:1,minus:2,times:3,sqrt:4,power:5,abs:10,divide:23,exp:25,exp10:26,exp2:27,int:30,float:32,ln:35,log10:36,log2:37,mod:44,negate:45,roundDown:48,roundUp:49,square:53,floatDivide:64,floorDivide:65,...v,...b,majority:38,max:39,mean:40,med:41,min:42,minority:43,range:47,stddev:54,sum:55,variety:58,majorityIgnoreNoData:66,maxIgnoreNoData:67,meanIgnoreNoData:68,medIgnoreNoData:69,minIgnoreNoData:70,minorityIgnoreNoData:71,rangeIgnoreNoData:72,stddevIgnoreNoData:73,sumIgnoreNoData:74,varietyIgnoreNoData:75,...C},P=new Map([[b.acos,{domain:[0,Math.PI],isInteger:!1}],[b.asin,{domain:[-Math.PI/2,Math.PI/2],isInteger:!1}],[b.atan,{domain:[-Math.PI/2,Math.PI/2],isInteger:!1}],[b.cos,{domain:[-1,1],isInteger:!1}],[b.sin,{domain:[-1,1],isInteger:!1}],[v.booleanAnd,{domain:[0,1],isInteger:!0}],[v.booleanNot,{domain:[0,1],isInteger:!0}],[v.booleanOr,{domain:[0,1],isInteger:!0}],[v.booleanXOr,{domain:[0,1],isInteger:!0}],[v.equalTo,{domain:[0,1],isInteger:!0}],[v.notEqual,{domain:[0,1],isInteger:!0}],[v.greaterThan,{domain:[0,1],isInteger:!0}],[v.greaterThanEqual,{domain:[0,1],isInteger:!0}],[v.lessThan,{domain:[0,1],isInteger:!0}],[v.lessThanEqual,{domain:[0,1],isInteger:!0}],[v.isNull,{domain:[0,1],isInteger:!0}]]);function T(e){return P.get(e)}const R=[0,2,2,2,1,2,1,1,1,1,1,2,2,1,2,2,2,2,1,2,2,1,1,2,2,1,1,1,2,2,1,1,1,2,2,1,1,1,999,999,999,999,999,999,2,1,2,999,1,1,2,1,1,1,999,999,1,1,999,1,1,2,999,999,2,2,999,999,999,999,999,999,999,999,999,999,3,999,3];function N(e,t,r){let[n,s]=e,i=n.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=n[e]+s[e]);return o}function k(e,t,r){let[n]=e,s=n.length,i=g.A.createEmptyBand("f32",s);return i.set(n),i}function I(e,t,r){let[n]=e,s=n.length,i=g.A.createEmptyBand(r,s);for(let e=0;e<s;e++)(!t||t[e])&&(i[e]=n[e]*n[e]);return i}function S(e,t,r){let[n,s]=e,i=n.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=n[e]-s[e]);return o}function _(e,t,r){let[n,s]=e,i=n.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=n[e]*s[e]);return o}function F(e,t,r){let[n]=e,s=n.length,i=g.A.createEmptyBand(r,s);for(let e=0;e<s;e++)(!t||t[e])&&(i[e]=Math.sign(n[e])*Math.floor(Math.abs(n[e])));return i}function B(e,t,r){let[n,s]=e,i=n.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=n[e]/s[e]);return o}function j(e,t,r){return B(e,t,"f32")}function Z(e,t,r){let[n,s]=e,i=n.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=Math.floor(n[e]/s[e]));return o}function z(e,t,r,n){let s=e[0],i=s.length,o=g.A.createEmptyBand(r,i);if(n===b.atanh){for(let e=0;e<i;e++)if(t[e]){let r=s[e];Math.abs(r)>=1?t[e]=0:o[e]=Math.atanh(r)}return o}let a=n===b.asin?Math.asin:Math.acos;for(let e=0;e<i;e++)if(t[e]){let r=s[e];Math.abs(r)>1?t[e]=0:o[e]=a(r)}return o}function G(e,t,r,n){let[s]=e,i=s.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=n(s[e]));return o}function E(e,t,r,n){let[s,i]=e,o=s.length,a=g.A.createEmptyBand(r,o);for(let e=0;e<o;e++)(!t||t[e])&&(a[e]=n(s[e],i[e]));return a}function O(e,t,r){let[n,s]=e,i=n.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=n[e]&s[e]);return o}function D(e,t,r){let[n,s]=e,i=n.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=n[e]<<s[e]);return o}function V(e,t,r){let[n]=e,s=n.length,i=g.A.createEmptyBand(r,s);for(let e=0;e<s;e++)(!t||t[e])&&(i[e]=~n[e]);return i}function U(e,t,r){let[n,s]=e,i=n.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=n[e]|s[e]);return o}function L(e,t,r){let[n,s]=e,i=n.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=n[e]>>s[e]);return o}function W(e,t,r){let[n,s]=e,i=n.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=n[e]^s[e]);return o}function $(e,t,r){let[n,s]=e,i=n.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=n[e]&&s[e]?1:0);return o}function K(e,t,r){let[n]=e,s=n.length,i=g.A.createEmptyBand(r,s);for(let e=0;e<s;e++)(!t||t[e])&&(i[e]=+!n[e]);return i}function H(e,t,r){let[n,s]=e,i=n.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=n[e]||s[e]?1:0);return o}function q(e,t,r){let[n,s]=e,i=n.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=+!!n[e]^!!s[e]);return o}function J(e,t,r){let[n,s]=e,i=n.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=+(n[e]===s[e]));return o}function X(e,t,r,n){let[s]=e,i=s.length,o=g.A.createEmptyBand(r,i),a=n===Math.E;for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=a?Math.exp(s[e]):n**s[e]);return o}function Y(e,t,r){return X(e,t,r,10)}function Q(e,t,r){return X(e,t,r,2)}function ee(e,t,r){return X(e,t,r,Math.E)}function te(e,t,r,n){let[s]=e,i=s.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(s[e]<=0?t[e]=0:o[e]=n(s[e]));return o}function re(e,t,r){return te(e,t,r,Math.log10)}function ne(e,t,r){return te(e,t,r,Math.log2)}function se(e,t,r){return te(e,t,r,Math.log)}function ie(e,t,r){let[n,s]=e,i=n.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=+(n[e]>s[e]));return o}function oe(e,t,r){let[n,s]=e,i=n.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=+(n[e]>=s[e]));return o}function ae(e,t,r){let[n,s]=e,i=n.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=+(n[e]<s[e]));return o}function le(e,t,r){let[n,s]=e,i=n.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=+(n[e]<=s[e]));return o}function ue(e,t,r){let[n]=e,s=n.length,i=g.A.createEmptyBand(r,s);if(!t)return i;for(let e=0;e<s;e++)i[e]=+!t[e];return i}function pe(e,t,r){let[n,s]=e,i=n.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=n[e]%s[e]);return o}function ce(e,t,r){let[n]=e,s=n.length,i=g.A.createEmptyBand(r,s);for(let e=0;e<s;e++)(!t||t[e])&&(i[e]=-n[e]);return i}function he(e,t,r){let[n,s]=e,i=n.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=n[e]===s[e]?0:1);return o}function me(e,t,r){let[n,s]=e,i=n.length,o=g.A.createEmptyBand(r,i),a=new Uint8Array(i);for(let e=0;e<i;e++)(null==t||t[e])&&0===n[e]&&(o[e]=s[e],a[e]=255);return{band:o,mask:a}}function fe(e,t,r){let[n,s,i]=e,o=n.length,a=g.A.createEmptyBand(r,o);for(let e=0;e<o;e++)(!t||t[e])&&(a[e]=n[e]?s[e]:i[e]);return a}function ge(e,t,r){let n=e.length;if(n<2)return e[0];let[s]=e,i=s.length,o=g.A.createEmptyBand(r,i);for(let r=0;r<i;r++)if(!t||t[r]){let t=s[r];for(let s=1;s<n;s++){let n=e[s][r];t<n&&(t=n)}o[r]=t}return o}function de(e,t,r){let n=e.length;if(n<2)return e[0];let[s]=e,i=s.length,o=g.A.createEmptyBand(r,i);for(let r=0;r<i;r++)if(!t||t[r]){let t=s[r];for(let s=1;s<n;s++){let n=e[s][r];t>n&&(t=n)}o[r]=t}return o}function ye(e,t,r){let n=e.length;if(n<2)return e[0];let[s]=e,i=s.length,o=g.A.createEmptyBand(r,i);for(let r=0;r<i;r++)if(!t||t[r]){let t=s[r],i=t;for(let s=1;s<n;s++){let n=e[s][r];i<n?i=n:t>n&&(t=n)}o[r]=i-t}return o}function xe(e,t,r){let n=e.length;if(n<2)return e[0];let[s]=e,i=s.length,o=g.A.createEmptyBand(r,i);for(let r=0;r<i;r++)if(!t||t[r]){let t=0;for(let s=0;s<n;s++)t+=e[s][r];o[r]=t/n}return o}function we(e,t,r){let n=e.length;if(n<2)return e[0];let[s]=e,i=s.length,o=g.A.createEmptyBand(r,i);for(let r=0;r<i;r++)if(!t||t[r])for(let t=0;t<n;t++){let n=e[t];o[r]+=n[r]}return o}function Ae(e,t,r){let n=e.length;if(n<2)return e[0];let[s]=e,i=s.length,o=g.A.createEmptyBand(r,i);for(let r=0;r<i;r++)if(!t||t[r]){let t=new Float32Array(n),s=0;for(let i=0;i<n;i++){let n=e[i];s+=n[r],t[i]=n[r]}s/=n;let i=0;for(let e=0;e<n;e++)i+=(t[e]-s)**2;o[r]=Math.sqrt(i/n)}return o}function ve(e,t,r){let n=e.length;if(n<2)return e[0];let s=Math.floor(n/2),[i]=e,o=i.length,a=g.A.createEmptyBand(r,o),l=new Float32Array(n),u=n%2==1;for(let r=0;r<o;r++)if(!t||t[r]){for(let t=0;t<n;t++)l[t]=e[t][r];l.sort(),a[r]=u?l[s]:(l[s]+l[s-1])/2}return a}function be(e,t,r){let[n,s]=e;if(null==s)return n;let i=n.length,o=g.A.createEmptyBand(r,i);for(let e=0;e<i;e++)(!t||t[e])&&(o[e]=n[e]<s[e]?n[e]:s[e]);return o}function Ce(e,t,r){let n=e.length;if(n<=2)return be(e,t,r);let s=e[0].length,i=g.A.createEmptyBand(r,s),o=new Map;for(let r=0;r<s;r++)if(!t||t[r]){o.clear();for(let t=0;t<n;t++){let n=e[t][r];o.set(n,o.has(n)?o.get(n)+1:1)}let t=0,s=0,a=[];for(let e of o.keys())t=o.get(e),t>s?(s=t,a.length=0,a.push(e)):t===s&&a.push(e);a.length>1&&a.sort((e,t)=>e-t),i[r]=a[0]}return i}function Me(e,t,r){let n=e.length;if(n<=2)return be(e,t,r);let s=e[0].length,i=g.A.createEmptyBand(r,s),o=new Map;for(let r=0;r<s;r++)if(!t||t[r]){o.clear();for(let t=0;t<n;t++){let n=e[t][r];o.set(n,o.has(n)?o.get(n)+1:1)}let t=0,s=e.length,a=[];for(let e of o.keys())t=o.get(e),t<s?(s=t,a.length=0,a.push(e)):t===s&&a.push(e);a.length>1&&a.sort((e,t)=>e-t),i[r]=a[0]}return i}function Pe(e,t,r){let n=e.length;if(n<2)return e[0];let[s]=e,i=s.length,o=g.A.createEmptyBand(r,i),a=new Set;for(let r=0;r<i;r++)if(!t||t[r]){let t;a.clear();for(let s=0;s<n;s++)t=e[s][r],a.add(t);o[r]=a.size}return o}const Te=new Map,Re=new Map,Ne=new Map,ke=new Map;function Ie(){Te.size||(Te.set(4,Math.sqrt),Te.set(6,Math.acos),Te.set(7,Math.asin),Te.set(8,Math.atan),Te.set(9,Math.atanh),Te.set(10,Math.abs),Te.set(21,Math.cos),Te.set(22,Math.cosh),Te.set(48,Math.floor),Te.set(49,Math.ceil),Te.set(51,Math.sin),Te.set(52,Math.sinh),Te.set(56,Math.tan),Te.set(57,Math.tanh),Te.set(59,Math.acosh),Te.set(60,Math.asinh),Te.set(65,Math.floor),Re.set(5,Math.pow),Re.set(61,Math.atan2),Ne.set(1,N),Ne.set(2,S),Ne.set(3,_),Ne.set(11,O),Ne.set(12,D),Ne.set(13,V),Ne.set(14,U),Ne.set(15,L),Ne.set(16,W),Ne.set(17,$),Ne.set(18,K),Ne.set(19,H),Ne.set(20,q),Ne.set(23,B),Ne.set(24,J),Ne.set(25,ee),Ne.set(26,Y),Ne.set(27,Q),Ne.set(28,ie),Ne.set(29,oe),Ne.set(30,F),Ne.set(31,ue),Ne.set(32,k),Ne.set(33,ae),Ne.set(34,le),Ne.set(35,se),Ne.set(36,re),Ne.set(37,ne),Ne.set(44,pe),Ne.set(45,ce),Ne.set(46,he),Ne.set(53,I),Ne.set(64,j),Ne.set(65,Z),Ne.set(76,fe),Ne.set(78,fe),ke.set(38,Ce),ke.set(39,ge),ke.set(40,xe),ke.set(41,ve),ke.set(42,de),ke.set(43,Me),ke.set(47,ye),ke.set(54,Ae),ke.set(55,we),ke.set(58,Pe),ke.set(66,Ce),ke.set(67,ge),ke.set(68,xe),ke.set(69,ve),ke.set(70,de),ke.set(71,Me),ke.set(72,ye),ke.set(73,Ae),ke.set(74,we),ke.set(75,Pe))}function Se(e,t,r={}){Ie();let n=function(e,t=!1){let r=e.map(e=>e.mask),n=r.filter(e=>null!=e),s=e[0].pixels[0].length;if(0===n.length||t&&n.length!==r.length)return new Uint8Array(s).fill(255);let i=n[0],o=new Uint8Array(i);if(1===n.length)return o;if(!t){for(let e=1;e<n.length;e++){let t=n[e];for(let e=0;e<o.length;e++)o[e]&&(o[e]=t[e]?255:0)}return o}for(let e=1;e<n.length;e++){let t=n[e];for(let e=0;e<o.length;e++)0===o[e]&&(o[e]=t[e]?255:0)}return o}(e,t>=66&&t<=75),{outputPixelType:s="f32"}=r,i=!ke.has(t)||r.processAsMultiband,o=i?e[0].pixels.length:1,a=[];for(let r=0;r<o;r++){let o,u=ke.has(t)&&!i?e.flatMap(e=>e.pixels):e.map(e=>e.pixels[r]),p=!0;if(t===C.setNull){let e=me(u,n,s);o=e.band,n=e.mask,p=!1}else Ne.has(t)?o=Ne.get(t)(u,n,"f64"):Te.has(t)?o=t===b.asin||t===b.acos||t===b.atanh?z(u,n,"f64",t):G(u,n,"f64",Te.get(t)):Re.has(t)?o=E(u,n,"f64",Re.get(t)):ke.has(t)?o=ke.get(t)(u,n,"f64"):(o=u[0],p=!1);if(p&&t!==v.isNull&&!P.has(t)){let e=g.A.createEmptyBand(s,o.length);n||=new Uint8Array(o.length).fill(255),(0,l.$p)(o,n),(0,l.yM)(o,n,s,e),o=e}a.push(o)}let u=e[0];return new g.A({width:u.width,height:u.height,pixelType:s,mask:t===v.isNull?null:n,pixels:a})}let _e=class extends w{constructor(){super(...arguments),this.functionName="Arithmetic",this.functionArguments=null,this.rasterArgumentNames=["raster","raster2"]}_bindSourceRasters(){let{operation:e}=this.functionArguments;if(e<1||e>6)return{success:!1,supportsGPU:!1,error:"unsupported operation"};let t=this.sourceRasterInfos[0].clone();return this.outputPixelType=this._getOutputPixelType(t.pixelType),t.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(t),this.rasterInfo=t,{success:!0,supportsGPU:t.bandCount<=3}}_processPixels(e){let{pixelBlocks:t}=e;return null==t?.[0]||null==t?.[1]?null:function(e,t,r){return Se(e,t=[null,1,2,3,23,5,44][t]??1,{outputPixelType:r})}(t,this.functionArguments.operation,this.outputPixelType)}_getWebGLParameters(){let{operation:e}=this.functionArguments,t=["","plus","minus","times","divide","power","mod"][e],r=this.outputPixelType??"f32",[n,s]=(0,l.hP)(r),i=(0,l.zw)(r);return i&&(n-=1e-4,s+=1e-4),{imageCount:2,operationName:t,domainRange:[n,s],isOutputRounded:i}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],_e.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:f,json:{write:!0,name:"rasterFunctionArguments"}})],_e.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],_e.prototype,"rasterArgumentNames",void 0),_e=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ArithmeticFunction")],_e);const Fe=_e;var Be;let je=Be=class extends c{clone(){return new Be({raster:this.raster})}};je=Be=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.AspectFunctionArguments")],je);const Ze=je;var ze=r(51181);let Ge=class extends w{constructor(){super(...arguments),this.functionName="Aspect",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){let e=this.sourceRasterInfos[0];this.isGCS=e.spatialReference?.isGeographic??!1,this.outputPixelType=this._getOutputPixelType("f32");let t=e.clone();return t.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(t),t.statistics=[{min:-1,max:360,avg:180,stddev:30}],t.bandCount=1,this.rasterInfo=t,{success:!0,supportsGPU:!0}}_processPixels(e){let t=e.pixelBlocks?.[0];if(null==t)return null;let{extent:r,primaryPixelSizes:n}=e,s=n?.[0]??(r?{x:r.width/t.width,y:r.height/t.height}:{x:1,y:1});return(0,ze.di)(t,{resolution:s})}_getNeighborhoodSize(){return{rows:3,cols:3}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Ge.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Ze,json:{write:!0,name:"rasterFunctionArguments"}})],Ge.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Ge.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Ge.prototype,"isGCS",void 0),Ge=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.AspectFunction")],Ge);const Ee=Ge;var Oe=r(66552);const De=new Set(["+","-","*","/","(",")"]);function Ve(e,t){return e.toLowerCase().startsWith("b")?t[parseInt(e.slice(1),10)-1]:parseFloat(e)}function Ue(e,t,r,n){if("number"==typeof r&&"number"==typeof n)return r+n;let s,i,o;"number"==typeof r?(o=n,s=o.length,i=new Float32Array(s),i.fill(r)):(s=r.length,i=r,n.constructor===Number?(o=new Float32Array(s),o.fill(n)):o=n);let a=new Float32Array(s);switch(t){case"+":for(let t=0;t<s;t++)(null==e||e[t])&&(a[t]=i[t]+o[t]);break;case"-":for(let t=0;t<s;t++)(null==e||e[t])&&(a[t]=i[t]-o[t]);break;case"*":for(let t=0;t<s;t++)(null==e||e[t])&&(a[t]=i[t]*o[t]);break;case"/":for(let t=0;t<s;t++)(null==e||e[t])&&o[t]&&(a[t]=i[t]/o[t]);break;case"(":case")":throw Error("encountered error with custom band index equation")}return a}function Le(e,t){e.splice(t,1);let r=0,n=0;do{r=0,n=0;for(let t=0;t<e.length;t++)if("("===e[t])r=t;else if(")"===e[t]){n=t;break}n===r+1&&e.splice(r,2)}while(n===r+1);return e}function We(e){if(1===e.length)return{opIndex:0,numIndex:0};let t=0,r=0;for(let n=0;n<e.length;n++)if("("===e[n])t=n;else if(")"===e[n]){r=n;break}let n=0===r?e:e.slice(t+1,r),s=-1;for(let e=0;e<n.length;e++)if("*"===n[e]||"/"===n[e]){s=e;break}if(s>-1)r>0&&(s+=t+1);else{for(let e=0;e<n.length;e++)if("+"===n[e]||"-"===n[e]){s=e;break}r>0&&(s+=t+1)}let i=0;for(let t=0;t<s;t++)"("===e[t]&&i++;return{opIndex:s,numIndex:s-i}}var $e=r(47520);const Ke=new Oe.J({0:"custom",1:"ndvi",2:"savi",3:"tsavi",4:"msavi",5:"gemi",6:"pvi",7:"gvitm",8:"sultan",9:"vari",10:"gndvi",11:"sr",12:"ndvi-re",13:"sr-re",14:"mtvi2",15:"rtvi-core",16:"ci-re",17:"ci-g",18:"ndwi",19:"evi",20:"iron-oxide",21:"ferrous-minerals",22:"clay-minerals",23:"wndwi",24:"bai",25:"nbr",26:"ndbi",27:"ndmi",28:"ndsi",29:"mndwi"},{useNumericKeys:!0});function He(e,t){if(!(0,$e.AB)(e))return e;let r,{equation:n,method:s}=t,i=t.bandIndexes.map(e=>e-1),{pixels:o,mask:a}=e;switch(s){case"gndvi":case"nbr":case"ndbi":case"ndvi":case"ndvi-re":case"ndsi":case"ndmi":case"mndwi":r=Je(a,o[i[0]],o[i[1]]);break;case"ndwi":r=Je(a,o[i[1]],o[i[0]]);break;case"sr":case"sr-re":case"iron-oxide":case"ferrous-minerals":case"clay-minerals":r=function(e,t,r){let n=r.length,s=new Float32Array(n);for(let i=0;i<n;i++)if(null==e||e[i]){let e=t[i],n=r[i];n&&(s[i]=e/n)}return[s]}(a,o[i[0]],o[i[1]]);break;case"ci-g":case"ci-re":r=function(e,t,r){let n=t.length,s=new Float32Array(n);for(let i=0;i<n;i++)if(null==e||e[i]){let e=t[i],n=r[i];n&&(s[i]=e/n-1)}return[s]}(a,o[i[0]],o[i[1]]);break;case"savi":r=function(e,t,r,n){let s=r.length,i=new Float32Array(s);for(let o=0;o<s;o++)if(null==e||e[o]){let e=r[o],s=t[o],a=s+e+n;a&&(i[o]=(s-e)/a*(1+n))}return[i]}(a,o[i[0]],o[i[1]],i[2]+1);break;case"tsavi":r=function(e,t,r,n,s,i){let o=r.length,a=new Float32Array(o),l=-s*n+i*(1+n*n);for(let i=0;i<o;i++)if(null==e||e[i]){let e=r[i],o=t[i],u=s*o+e+l;u&&(a[i]=n*(o-n*e-s)/u)}return[a]}(a,o[i[0]],o[i[1]],i[2]+1,i[3]+1,i[4]+1);break;case"msavi":r=function(e,t,r){let n=r.length,s=new Float32Array(n);for(let i=0;i<n;i++)if(null==e||e[i]){let e=r[i],n=t[i],o=2*n+1;s[i]=.5*(o-Math.sqrt(o*o-8*(n-e)))}return[s]}(a,o[i[0]],o[i[1]]);break;case"gemi":r=function(e,t,r){let n=r.length,s=new Float32Array(n);for(let i=0;i<n;i++)if(null==e||e[i]){let e=r[i],n=t[i];if(1!==e&&n+e+.5!==0){let t=(2*(n*n-e*e)+1.5*n+.5*e)/(n+e+.5);s[i]=t*(1-.25*t)-(e-.125)/(1-e)}}return[s]}(a,o[i[0]],o[i[1]]);break;case"pvi":r=function(e,t,r,n,s){let i=r.length,o=new Float32Array(i),a=1/Math.sqrt(1+n*n);for(let l=0;l<i;l++)if(null==e||e[l]){let e=r[l],i=t[l];o[l]=(i-n*e-s)*a}return[o]}(a,o[i[0]],o[i[1]],i[2]+1,i[3]+1);break;case"gvitm":r=function(e,t){let[r,n,s,i,o,a]=t,l=r.length,u=new Float32Array(l);for(let t=0;t<l;t++)(null==e||e[t])&&(u[t]=-.2848*r[t]-.2435*n[t]-.5436*s[t]+.7243*i[t]+.084*o[t]-.18*a[t]);return[u]}(a,[o[i[0]],o[i[1]],o[i[2]],o[i[3]],o[i[4]],o[i[5]]]);break;case"sultan":r=function(e,t){let[r,n,s,i,o]=t,a=r.length,l=new Float32Array(a),u=new Float32Array(a),p=new Float32Array(a);for(let t=0;t<a;t++)(null==e||e[t])&&(l[t]=o[t]?i[t]/o[t]*100:0,u[t]=r[t]?i[t]/r[t]*100:0,p[t]=s[t]?n[t]/s[t]*(i[t]/s[t])*100:0);return[l,u,p]}(a,[o[i[0]],o[i[1]],o[i[2]],o[i[3]],o[i[4]]]);break;case"vari":r=function(e,t){let[r,n,s]=t,i=r.length,o=new Float32Array(i);for(let t=0;t<i;t++)if(null==e||e[t])for(t=0;t<i;t++){let e=r[t],i=n[t],a=i+e-s[t];a&&(o[t]=(i-e)/a)}return[o]}(a,[o[i[0]],o[i[1]],o[i[2]]]);break;case"mtvi2":r=function(e,t){let[r,n,s]=t,i=r.length,o=new Float32Array(i);for(let t=0;t<i;t++)if(null==e||e[t])for(t=0;t<i;t++){let e=r[t],i=n[t],a=s[t],l=Math.sqrt((2*e+1)**2-(6*e-5*Math.sqrt(i))-.5);if(l){let r=1.5*(1.2*(e-a)-2.5*(i-a));o[t]=r/l}}return[o]}(a,[o[i[0]],o[i[1]],o[i[2]]]);break;case"rtvi-core":r=function(e,t){let[r,n,s]=t,i=r.length,o=new Float32Array(i);for(let t=0;t<i;t++)if(null==e||e[t])for(t=0;t<i;t++){let e=r[t],i=n[t],a=s[t];o[t]=100*(e-i)-10*(e-a)}return[o]}(a,[o[i[0]],o[i[1]],o[i[2]]]);break;case"evi":r=function(e,t){let[r,n,s]=t,i=r.length,o=new Float32Array(i);for(let t=0;t<i;t++)if(null==e||e[t])for(t=0;t<i;t++){let e=r[t],i=n[t],a=e+6*i-7.5*s[t]+1;a&&(o[t]=2.5*(e-i)/a)}return[o]}(a,[o[i[0]],o[i[1]],o[i[2]]]);break;case"wndwi":r=function(e,t,r=.5){let[n,s,i]=t,o=s.length,a=new Float32Array(o);for(let t=0;t<o;t++)if(null==e||e[t])for(t=0;t<o;t++){let e=n[t],o=s[t],l=i[t],u=e+r*o+(1-r)*l;u&&(a[t]=(e-r*o-(1-r)*l)/u)}return[a]}(a,[o[i[0]],o[i[1]],o[i[2]]],i[3]?i[3]+1:.5);break;case"bai":r=function(e,t,r){let n=r.length,s=new Float32Array(n);for(let i=0;i<n;i++)if(null==e||e[i])for(i=0;i<n;i++){let e=(.1-t[i])**2+(.06-r[i])**2;e&&(s[i]=1/e)}return[s]}(a,o[i[0]],o[i[1]]);break;case"custom":r=function(e,t,r){let n,{ops:s,nums:i}=function(e,t){(e=e.replaceAll(" ","")).startsWith("-")&&(e="0"+e),e.startsWith("+")&&(e=e.slice(1));let r=e.split(""),n=[],s=[],i="";for(let e=0;e<r.length;e++){let o=r[e];De.has(o)?(i.length&&s.push(Ve(i,t)),n.push(o),i=""):i=i.concat(o)}return i.length&&s.push(Ve(i,t)),{ops:n,nums:s}}(r,t);if(0===s.length){let e=1===i.length?i[0]:t[0];if(e instanceof Float32Array)return[e];let r=new Float32Array(t[0].length);return"number"==typeof e?r.fill(e):r.set(e),[r]}for(;s.length>0;){let{numIndex:t,opIndex:r}=We(s);if(n=Ue(e,s[r],i[t],i[t+1]),1===s.length)break;s=Le(s,r),i.splice(t,2,n)}return[n]}(a,o,n);break;default:return e}let u,{outputPixelType:p="f32"}=t,c=null!=p&&(0,l.zw)(p);a?(u=new Uint8Array(e.width*e.height),u.set(a)):c&&(u=new Uint8Array(e.width*e.height).fill(255)),c&&(r=r.map(e=>{let t=g.A.createEmptyBand(p,e.length);return(0,l.yM)(e,u,p,t),t}));let h=new g.A({width:e.width,height:e.height,pixelType:p,pixels:r,mask:u});return h.updateStatistics(),h}function qe(e){let t=new Float32Array(9);return t[3*e[0]]=1,t[3*e[1]+1]=1,t[3*e[2]+2]=1,t}function Je(e,t,r){let n=r.length,s=new Float32Array(n);for(let i=0;i<n;i++)if(null==e||e[i]){let e=t[i],n=r[i],o=e+n;o&&(s[i]=(e-n)/o)}return[s]}var Xe,Ye=r(93223);let Qe=Xe=class extends c{constructor(){super(...arguments),this.method="custom"}clone(){return new Xe({method:this.method,bandIndexes:this.bandIndexes,raster:(0,i.o8)(this.raster)})}};(0,o.Cg)([(0,a.MZ)({json:{type:String,write:!0}})],Qe.prototype,"bandIndexes",void 0),(0,o.Cg)([(0,Ye.e)(Ke)],Qe.prototype,"method",void 0),Qe=Xe=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.BandArithmeticFunctionArguments")],Qe);const et=Qe,tt=new Set(["vari","mtvi2","rtvi-core","evi"]);let rt=class extends w{constructor(){super(...arguments),this.functionName="BandArithmetic",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){this.outputPixelType=this._getOutputPixelType("f32");let e=this.sourceRasterInfos[0];if(e.bandCount<2)return{success:!1,supportsGPU:!1,error:"band-arithmetic-function: source raster has insufficient amount of raster bands"};let t=e.clone();return t.pixelType=this.outputPixelType,t.bandCount="sultan"===this.functionArguments.method?3:1,this._removeStatsHistColormapVAT(t),t.keyProperties={...t.keyProperties,BandProperties:void 0},this.rasterInfo=t,{success:!0,supportsGPU:!["custom","gvitm","sultan"].includes(this.functionArguments.method)}}_processPixels(e){let t=e.pixelBlocks?.[0];if(null==t)return t;let{method:r,bandIndexes:n}=this.functionArguments,s=n.split(" ").map(e=>parseFloat(e));if(this.rasterInfo.storageInfo.isBsqTile){let{rawInputBandIds:e}=this,t=tt.has(this.functionArguments.method)?3:2,r=s.slice(0,t).map(t=>e.indexOf(t-1));s.splice(0,t,...r)}return He(t,{method:r,bandIndexes:s,equation:n,outputPixelType:this.outputPixelType})}_getWebGLParameters(){let e=this.functionArguments.bandIndexes.split(" ").map(e=>parseFloat(e)-1);2===e.length&&e.push(0);let t,r,n=this.isInputBandIdsSwizzled?[0,1,2]:e,s=new Float32Array(3),{method:i}=this.functionArguments;switch(i){case"gndvi":case"nbr":case"ndbi":case"ndvi":case"ndvi-re":case"ndsi":case"ndmi":case"mndwi":t=qe([n[0],n[1],0]),r="ndxi";break;case"ndwi":t=qe([n[1],n[0],0]),r="ndxi";break;case"sr":case"sr-re":case"iron-oxide":case"ferrous-minerals":case"clay-minerals":t=qe([n[0],n[1],0]),r="sr";break;case"ci-g":case"ci-re":t=qe([n[0],n[1],0]),r="ci";break;case"savi":t=qe([n[0],n[1],0]),r="savi",s[0]=e[2]+1;break;case"tsavi":t=qe([n[0],n[1],0]),r="tsavi",s[0]=e[2]+1,s[1]=e[3]+1,s[2]=e[4]+1;break;case"msavi":t=qe([n[0],n[1],0]),r="msavi";break;case"gemi":t=qe([n[0],n[1],0]),r="gemi";break;case"pvi":t=qe([n[0],n[1],0]),r="tsavi",s[0]=e[2]+1,s[1]=e[3]+1;break;case"vari":t=qe([n[0],n[1],n[2]]),r="vari";break;case"mtvi2":t=qe([n[0],n[1],n[2]]),r="mtvi";break;case"rtvi-core":t=qe([n[0],n[1],n[2]]),r="rtvicore";break;case"evi":t=qe([n[0],n[1],n[2]]),r="evi";break;case"wndwi":t=qe([n[0],n[1],0]),r="wndwi",s[0]=e[3]?e[3]+1:.5;break;case"bai":t=qe([n[1],n[0],0]),r="bai";break;default:t=qe([0,1,2]),r="custom"}return{bandIndexMat3:t,indexType:r,adjustments:s,isOutputRounded:(0,l.zw)(this.outputPixelType)}}_getInputBandIds(e){if("custom"===this.functionArguments.method)return e;let t=this.functionArguments.bandIndexes.split(" ").map(e=>parseFloat(e)-1),r=e.length,n=t.map(e=>e>=r?r-1:e),s=tt.has(this.functionArguments.method)?3:2,i=n.slice(0,s).map(t=>e[t]);return 2===i.length&&i.push(0),i}_swizzleBandIds(e){let t=this.functionArguments.bandIndexes.split(" ").map(e=>parseFloat(e)-1);2===t.length&&t.push(0);let{method:r}=this.functionArguments,n=(["vari","mtvi2","rtvi-core","evi"].includes(r)?t.slice(0,3):"bai"===r||"ndwi"===r?[t[1],t[0]]:t.slice(0,2)).map(t=>e.indexOf(t));return n[2]??=n[1],this.isInputBandIdsSwizzled=!0,this.swizzledBandSelection=n,!1}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],rt.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:et,json:{write:!0,name:"rasterFunctionArguments"}})],rt.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],rt.prototype,"rasterArgumentNames",void 0),rt=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.BandArithmeticFunction")],rt);const nt=rt;var st,it=r(65864),ot=r(50498);const at=new Oe.J({1:"outside",2:"inside"},{useNumericKeys:!0});let lt=st=class extends c{constructor(){super(...arguments),this.clippingType="outside"}clone(){return new st({clippingGeometry:this.clippingGeometry.clone(),clippingType:this.clippingType})}};(0,o.Cg)([(0,a.MZ)({types:ot.yR,json:{read:it.rS,write:!0}})],lt.prototype,"clippingGeometry",void 0),(0,o.Cg)([(0,a.MZ)({json:{read:at.read,write:at.write}})],lt.prototype,"clippingType",void 0),lt=st=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ClipFunctionArguments")],lt);const ut=lt;var pt=r(34930),ct=r(37373);let ht=class extends w{constructor(){super(...arguments),this.functionName="Clip",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){let e=this.sourceRasterInfos[0].clone();this.outputPixelType=this._getOutputPixelType(e.pixelType),e.pixelType=this.outputPixelType,this.rasterInfo=e;let{functionArguments:t}=this,{clippingGeometry:r,clippingType:n}=t;if(!r)return{success:!1,supportsGPU:!1,error:"missing clipping geometry"};if("outside"===n)try{let{spatialReference:t}=e,n="extent"===r.type?(0,ct._l)(r,t):(0,ct.uk)(r,t).extent;n&&(0,pt.Sd)(e,n)}catch{}return{success:!0,supportsGPU:!0}}_processPixels(e){return e.pixelBlocks?.[0]}_getWebGLParameters(){let{clippingGeometry:e,clippingType:t}=this.functionArguments;return{clippingGeometry:e.toJSON(),clippingType:t}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],ht.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:ut,json:{write:!0,name:"rasterFunctionArguments"}})],ht.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],ht.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)()],ht.prototype,"isNoopProcess",void 0),ht=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ClipFunction")],ht);const mt=ht;var ft,gt=r(67369),dt=r(95349),yt=r(36005);let xt=ft=class extends c{castColormapName(e){if(!e)return null;let t=e.toLowerCase();return gt.L7.includes(t)?t:null}readColorRamp(e){return(0,dt.r)(e)}readColorRampName(e,t){if(!e)return null;let r=gt.kH.jsonValues.find(t=>t.toLowerCase()===e.toLowerCase());return r?gt.kH.fromJSON(r):null}clone(){return new ft({colormap:(0,i.o8)(this.colormap),colormapName:this.colormapName,colorRamp:this.colorRamp?.clone(),colorRampName:this.colorRampName})}};(0,o.Cg)([(0,a.MZ)({type:[[Number]],json:{write:!0}})],xt.prototype,"colormap",void 0),(0,o.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],xt.prototype,"colormapName",void 0),(0,o.Cg)([(0,a.wg)("colormapName")],xt.prototype,"castColormapName",null),(0,o.Cg)([(0,a.MZ)({types:dt.g,json:{write:!0}})],xt.prototype,"colorRamp",void 0),(0,o.Cg)([(0,yt.w)("colorRamp")],xt.prototype,"readColorRamp",null),(0,o.Cg)([(0,a.MZ)({type:gt.kH.apiValues,json:{type:gt.kH.jsonValues,write:gt.kH.write}})],xt.prototype,"colorRampName",void 0),(0,o.Cg)([(0,yt.w)("colorRampName")],xt.prototype,"readColorRampName",null),xt=ft=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ColormapFunctionArguments")],xt);const wt=xt,At=[[36,0,255],[36,0,255],[36,0,255],[36,0,255],[112,75,3],[113,76,3],[114,77,3],[115,77,3],[116,78,3],[117,79,3],[118,79,3],[119,80,3],[121,81,4],[122,82,4],[123,82,4],[124,83,4],[125,84,4],[126,84,4],[127,85,4],[128,86,4],[129,86,4],[130,87,4],[131,88,4],[132,89,4],[133,89,4],[134,90,4],[135,91,4],[136,91,4],[137,92,4],[138,93,4],[139,94,4],[140,94,4],[142,95,5],[143,96,5],[144,96,5],[145,97,5],[146,98,5],[147,99,5],[148,99,5],[149,100,5],[150,101,5],[151,101,5],[152,102,5],[153,103,5],[154,104,5],[155,104,5],[156,105,5],[157,106,5],[158,106,5],[159,107,5],[160,108,5],[161,108,5],[162,109,5],[164,110,6],[165,111,6],[166,111,6],[167,112,6],[168,113,6],[169,113,6],[170,114,6],[171,115,6],[172,116,6],[173,116,6],[174,117,6],[245,0,0],[245,5,0],[245,10,0],[246,15,0],[246,20,0],[246,25,0],[246,30,0],[247,35,0],[247,40,0],[247,45,0],[247,50,0],[247,55,0],[248,60,0],[248,65,0],[248,70,0],[248,75,0],[249,81,0],[249,86,0],[249,91,0],[249,96,0],[250,101,0],[250,106,0],[250,111,0],[250,116,0],[250,121,0],[251,126,0],[251,131,0],[251,136,0],[251,141,0],[252,146,0],[252,151,0],[252,156,0],[252,156,0],[251,159,0],[250,162,0],[249,165,0],[248,168,0],[247,171,0],[246,174,0],[245,177,0],[245,179,0],[244,182,0],[243,185,0],[242,188,0],[241,191,0],[240,194,0],[239,197,0],[238,200,0],[237,203,0],[236,206,0],[235,209,0],[234,212,0],[233,215,0],[232,218,0],[231,221,0],[230,224,0],[230,226,0],[229,229,0],[228,232,0],[227,235,0],[226,238,0],[225,241,0],[224,244,0],[223,247,0],[165,247,0],[163,244,0],[161,240,0],[158,237,0],[156,233,1],[154,230,1],[152,227,1],[149,223,1],[147,220,1],[145,216,1],[143,213,1],[140,210,2],[138,206,2],[136,203,2],[134,200,2],[132,196,2],[129,193,2],[127,189,2],[125,186,3],[123,183,3],[120,179,3],[118,176,3],[116,172,3],[114,169,3],[111,166,3],[109,162,4],[107,159,4],[105,155,4],[103,152,4],[100,149,4],[98,145,4],[96,142,4],[94,138,5],[91,135,5],[89,132,5],[87,128,5],[85,125,5],[82,121,5],[80,118,5],[78,115,6],[76,111,6],[73,108,6],[71,105,6],[69,101,6],[67,98,6],[65,94,6],[62,91,7],[60,88,7],[58,84,7],[56,81,7],[53,77,7],[51,74,7],[49,71,7],[47,67,8],[44,64,8],[42,60,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8]],vt=[[36,0,255],[36,0,255],[36,0,255],[36,0,255],[245,20,0],[245,24,0],[245,29,0],[245,31,0],[247,33,0],[247,33,0],[247,37,0],[247,41,0],[247,41,0],[247,41,0],[247,45,0],[247,45,0],[247,47,0],[247,49,0],[247,49,0],[247,54,0],[247,54,0],[247,56,0],[247,58,0],[247,58,0],[250,62,0],[250,62,0],[250,62,0],[250,67,0],[250,67,0],[250,67,0],[250,69,0],[250,71,0],[250,71,0],[250,75,0],[250,75,0],[250,78,0],[250,79,0],[250,79,0],[250,79,0],[250,81,0],[250,83,0],[250,83,0],[250,87,0],[250,87,0],[250,90,0],[250,92,0],[252,93,0],[252,93,0],[252,97,0],[252,97,0],[252,97,0],[252,97,0],[252,101,0],[252,101,0],[252,101,0],[252,101,0],[252,105,0],[252,105,0],[252,107,0],[252,109,0],[252,109,0],[252,113,13],[255,118,20],[255,119,23],[255,121,25],[255,126,33],[255,132,38],[255,133,40],[255,135,43],[255,141,48],[255,144,54],[255,150,59],[255,152,61],[255,153,64],[255,159,69],[255,163,77],[255,165,79],[255,168,82],[255,174,87],[255,176,92],[255,181,97],[255,183,99],[255,186,102],[255,191,107],[255,197,115],[255,201,120],[255,203,123],[255,205,125],[255,209,130],[255,214,138],[255,216,141],[255,218,143],[255,224,150],[255,228,156],[255,234,163],[255,236,165],[255,238,168],[255,243,173],[255,248,181],[255,252,186],[253,252,186],[250,252,187],[244,250,180],[238,247,176],[234,246,173],[231,245,169],[223,240,163],[217,237,157],[211,235,150],[205,233,146],[200,230,142],[195,227,136],[189,224,132],[184,222,126],[180,220,123],[174,217,119],[169,214,114],[163,212,108],[160,210,105],[154,207,101],[148,204,96],[143,201,93],[138,199,88],[134,197,84],[130,194,81],[126,191,77],[117,189,70],[115,186,68],[112,184,64],[106,181,60],[100,179,55],[94,176,49],[92,174,47],[90,173,45],[81,168,37],[75,166,33],[71,163,28],[66,160,24],[62,158,21],[56,156,14],[51,153,0],[51,153,0],[51,153,0],[50,150,0],[50,150,0],[50,150,0],[50,150,0],[49,148,0],[49,148,0],[49,148,0],[48,145,0],[48,145,0],[48,145,0],[48,145,0],[48,143,0],[48,143,0],[48,143,0],[48,143,0],[47,140,0],[47,140,0],[47,140,0],[47,140,0],[46,138,0],[46,138,0],[46,138,0],[46,138,0],[45,135,0],[45,135,0],[45,135,0],[45,135,0],[44,133,0],[44,133,0],[44,133,0],[43,130,0],[43,130,0],[43,130,0],[43,130,0],[43,130,0],[43,130,0],[42,128,0],[42,128,0],[42,128,0],[42,125,0],[42,125,0],[42,125,0],[42,125,0],[41,122,0],[41,122,0],[41,122,0],[41,122,0],[40,120,0],[40,120,0],[40,120,0],[40,120,0],[40,120,0],[39,117,0],[39,117,0],[39,117,0],[39,117,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0]];function bt(e,t){let r=[],n=[];for(let t=0;t<e.length-1;t++)r.push({type:"algorithmic",algorithm:"esriHSVAlgorithm",fromColor:e[t].slice(1),toColor:e[t+1].slice(1)}),n.push(e[t+1][0]-e[t][0]);let s=e[e.length-1][0];return t??=n,(0,gt.iv)({type:"multipart",colorRamps:r},{numColors:s,weights:t})}let Ct=class extends w{constructor(){super(...arguments),this.functionName="Colormap",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){let e=this.sourceRasterInfos[0];if(e.bandCount>1)return{success:!1,supportsGPU:!1,error:"colormap-function: source data must be single band"};let{colormap:t,colormapName:r,colorRamp:n,colorRampName:s}=this.functionArguments;if(!t?.length)if(n)this.colorRamp=n,t=(0,gt.R8)(n,{interpolateAlpha:!0});else if(s){let e=(0,gt.M5)(s);e&&(t=(0,gt.R8)(e),this.colorRamp=(0,dt.r)(e))}else r&&(t=function(e){let t;switch(e){case"elevation":t=bt([[0,0,191,191],[51,0,0,255],[102,255,0,255],[153,255,0,127],[204,191,63,127],[256,20,20,20]]);break;case"gray":t=(0,gt.iv)({type:"algorithmic",algorithm:"esriHSVAlgorithm",fromColor:[0,0,0],toColor:[255,255,255]});break;case"hillshade":t=bt([[0,38,41,54],[69,79,82,90],[131,156,156,156],[256,253,253,241]],[.268,.238,.495]);break;case"ndvi":t=At;break;case"ndvi2":t=function(){let e=bt([[0,255,255,255],[70,0,255,0],[80,205,173,193],[100,150,150,150],[110,120,51,100],[130,120,100,200],[140,28,3,144],[160,6,0,55],[180,10,25,30],[201,6,7,27]]);for(let t=e.length;t<256;t++)e.push([6,27,7]);return e}();break;case"ndvi3":t=vt;break;case"random":t=function(){let e=[];for(let t=0;t<256;t++){let t=[];for(let e=0;e<3;e++)t.push(Math.round(255*Math.random()));e.push(t)}return e}()}return t?(t=t.map((e,t)=>[t,...e]),t):null}(r));if(!t?.length)return{success:!1,supportsGPU:!1,error:"colormap-function: missing colormap argument"};let i=this._getOutputPixelType(e.pixelType);this.outputPixelType=i.startsWith("f")?"s32":i;let o=e.clone();return o.pixelType=this.outputPixelType,o.colormap=t,o.bandCount=1,this.rasterInfo=o,{success:!0,supportsGPU:!0}}_processPixels(e){let t=e.pixelBlocks?.[0];return!t||(0,l.zw)(t.pixelType)||(t=t.clone(),t.clamp(this.outputPixelType)),t}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Ct.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:wt,json:{write:!0,name:"rasterFunctionArguments"}})],Ct.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Ct.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)()],Ct.prototype,"isNoopProcess",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Ct.prototype,"indexedColormap",void 0),(0,o.Cg)([(0,a.MZ)()],Ct.prototype,"colorRamp",void 0),Ct=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ColormapFunction")],Ct);const Mt=Ct;var Pt;let Tt=Pt=class extends c{clone(){return new Pt({raster:this.raster})}};Tt=Pt=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ColormapToRGBFunctionArguments")],Tt);const Rt=Tt;var Nt=r(4151),kt=r(88178);let It=class extends w{constructor(){super(...arguments),this.functionName="ColormapToRGB",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){let e=this.sourceRasterInfos[0];if(e.bandCount>1||!e.colormap?.length)return{success:!1,supportsGPU:!1,error:"colormap-to-rgb-function: source data must be single band with a colormap"};let t=e.clone();t.pixelType=this.outputPixelType=this._getOutputPixelType("u8"),this._removeStatsHistColormapVAT(t),t.bandCount=3,t.statistics=[{min:0,max:255,avg:100,stddev:20},{min:0,max:255,avg:100,stddev:20},{min:0,max:255,avg:100,stddev:20}],this.rasterInfo=t;let r=[...e.colormap].sort((e,t)=>e[0]-t[0]),{indexedColormap:n,offset:s}=(0,$e.zg)({colormap:r});return n?(this.lookup={indexedColormap:n,offset:s},{success:!0,supportsGPU:(0,kt.WN)(n)}):{success:!1,supportsGPU:!1,error:"colormap-to-rgb-function: the colormap is not supported"}}_processPixels(e){let t=e.pixelBlocks?.[0];if(!t||!this.lookup)return t;t=t.clone();let r=t.pixels[0],n=t.mask??new Uint8Array(r.length).fill(255),s=new Uint8Array(r.length),i=new Uint8Array(r.length),o=new Uint8Array(r.length),{indexedColormap:a,offset:l}=this.lookup,u=a.length;for(let e=0;e<r.length;e++)if(n[e]){let t=4*(r[e]-l);t<0||t>u-4?n[e]=0:(s[e]=a[t++],i[e]=a[t++],o[e]=a[t++])}return t.pixels=[s,i,o],t.statistics=[new Nt.A(0,255),new Nt.A(0,255),new Nt.A(0,255)],t.pixelType=this.outputPixelType,t}_getWebGLParameters(){return this.lookup}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],It.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Rt,json:{write:!0,name:"rasterFunctionArguments"}})],It.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],It.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],It.prototype,"lookup",void 0),It=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ColormapToRGBFunction")],It);const St=It;var _t,Ft=r(43937);let Bt=_t=class extends c{constructor(){super(...arguments),this.rasters=[]}writeRasters(e,t){t.rasters=e.map(e=>"number"==typeof e||"string"==typeof e?e:e.toJSON())}clone(){return new _t({rasters:(0,i.o8)(this.rasters)})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Bt.prototype,"rasters",void 0),(0,o.Cg)([(0,Ft.K)("rasters")],Bt.prototype,"writeRasters",null),Bt=_t=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.CompositeBandFunctionArguments")],Bt);const jt=Bt;let Zt=class extends w{constructor(){super(...arguments),this.functionName="CompositeBand",this.functionArguments=null,this.rasterArgumentNames=["rasters"]}_bindSourceRasters(){let{sourceRasterInfos:e}=this,t=e[0];this.outputPixelType=this._getOutputPixelType(t.pixelType);let r=t.clone();if(r.attributeTable=null,r.colormap=null,r.pixelType=this.outputPixelType,r.bandCount=e.map(({bandCount:e})=>e).reduce((e,t)=>e+t),e.every(({statistics:e})=>null!=e&&e.length)){let t=[];e.forEach(({statistics:e})=>null!=e&&t.push(...e)),r.statistics=t}if(e.every(({histograms:e})=>null!=e&&e.length)){let t=[];e.forEach(({histograms:e})=>null!=e&&t.push(...e)),r.histograms=t}r.multidimensionalInfo&&r.multidimensionalInfo.variables.forEach(t=>{let r=e.map(e=>e.multidimensionalInfo?.variables.find(({name:e})=>e===t.name)),n=r.map(e=>e?.statistics?.length?e.statistics:null),s=r.map(e=>e?.histograms?.length?e.histograms:null);t.statistics=n.every(e=>null!=e)?n.flat():null,t.histograms=s.every(e=>null!=e)?s.flat():null}),r.bandCount>1&&(r.colormap=null,r.attributeTable=null);let n=e.every(e=>e.keyProperties.BandProperties?.length)?e.flatMap(e=>e.keyProperties.BandProperties):void 0;return r.keyProperties={...r.keyProperties,BandProperties:n},this.rasterInfo=r,{success:!0,supportsGPU:r.bandCount<=3}}_processPixels(e){let{pixelBlocks:t}=e;return t&&null!=t?.[0]?(0,$e.Wy)(t):null}_getWebGLParameters(){return{bandCount:this.rasterInfo.bandCount}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Zt.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:jt,json:{write:!0,name:"rasterFunctionArguments"}})],Zt.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Zt.prototype,"rasterArgumentNames",void 0),Zt=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.CompositeBandFunction")],Zt);const zt=Zt,Gt=new Oe.J({0:"difference",1:"relative-difference",2:"categorical",3:"euclidean-distance",4:"angle-difference",5:"band-with-most-change"},{useNumericKeys:!0}),Et=new Oe.J({0:"all",1:"changed",2:"unchanged"},{useNumericKeys:!0});var Ot;let Dt=Ot=class extends c{constructor(){super(...arguments),this.method="difference",this.keepMethod="all",this.raster2=void 0}get rasters(){return[this.raster,this.raster2]}clone(){return new Ot({raster:this.raster,raster2:this.raster2,method:this.method,keepMethod:this.keepMethod})}};(0,o.Cg)([(0,Ye.e)(Gt)],Dt.prototype,"method",void 0),(0,o.Cg)([(0,Ye.e)(Et)],Dt.prototype,"keepMethod",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Dt.prototype,"raster2",void 0),(0,o.Cg)([(0,a.MZ)({readOnly:!0})],Dt.prototype,"rasters",null),Dt=Ot=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ComputeChangeFunctionArguments")],Dt);const Vt=Dt;var Ut=r(20437);let Lt=class extends w{constructor(){super(...arguments),this.functionName="ComputeChange",this.functionArguments=null,this.rasterArgumentNames=["raster","raster2"]}_bindSourceRasters(){let{method:e}=this.functionArguments,t=this.sourceRasterInfos[0].clone();if(this.outputPixelType=this._getOutputPixelType(t.pixelType),t.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(t),"categorical"===e){let e=this.sourceRasterInfos.map(e=>e.attributeTable),r=this._getFieldNames(e,"value"),n=e.map(e=>this._getClassFieldName(e));if(null==r[0]||null==r[1]||null==n[0]||null==n[1])return{success:!1,supportsGPU:!1,error:"both inputs must have proper attribute table with value and class fields"};this._updateAttributeTable(t,r,n)}return t.bandCount=1,this.rasterInfo=t,{success:!0,supportsGPU:"difference"===e||"relative-difference"===e}}_processPixels(e){let{pixelBlocks:t}=e;if(null==t?.[0]||null==t?.[1])return null;let{method:r}=this.functionArguments;return function(e,t,r,n){let[s,i]=e,o=(0,l.zw)(r)&&!(0,l.zw)(s.pixelType)&&!(0,l.zw)(i.pixelType),a=[s.mask,i.mask].filter(e=>e),u=g.A.combineBandMasks(a),p=e.map(e=>e.pixels[0]),{width:c,height:h}=s,m=g.A.createEmptyBand(r,c*h);switch(t){case"difference":case"relative-difference":!function(e){let{bands:[t,r],mask:n,isRelative:s,isRoundingNeeded:i,outBand:o}=e,a=t.length;for(let e=0;e<a;e++)if(!n||n[e]){let n=t[e]-r[e];if(s){let s=Math.max(Math.abs(t[e]),Math.abs(r[e]));n=0===s?0:n/s}o[e]=i?Math.round(n):n}}({bands:p,mask:u,outBand:m,isRoundingNeeded:o,isRelative:"relative-difference"===t});break;case"categorical":!function(e){let{bands:[t,r],categoryIndexLookups:[n,s],classNames:[i,o],mask:a,keepMethod:l,outBand:u}=e,p=t.length,c=i.length,h=o.length,m=c*h,f=m+1,g=m+2;for(let e=0;e<p;e++)if(!a||a[e]){let a=t[e],p=r[e],c=n[a],d=s[p],y=i[c],x=o[d];u[e]=null==c||null==d?m:"changed"===l&&y===x?f:"unchanged"===l&&y!==x?g:c*h+d}}({bands:p,mask:u,outBand:m,...n});break;case"euclidean-distance":!function(e){let{pixels:[t,r],mask:n,outBand:s}=e,i=t[0].length,o=t.length;for(let e=0;e<i;e++)if(!n||n[e]){let n=0;for(let s=0;s<o;s++){let i=t[s][e]-r[s][e];n+=i*i}s[e]=Math.sqrt(n)}}({pixels:e.map(e=>e.pixels),mask:u,outBand:m});break;case"angle-difference":!function(e){let{pixels:[t,r],mask:n,outBand:s}=e,i=t[0].length,o=t.length;for(let e=0;e<i;e++)if(!n||n[e]){let n=0,i=0,a=0;for(let s=0;s<o;s++){let o=t[s][e],l=r[s][e];n+=o*l,i+=o*o,a+=l*l}let l=Math.sqrt(i*a);s[e]=l?Math.acos(n/l):1.5707963267948966}}({pixels:e.map(e=>e.pixels),mask:u,outBand:m});break;case"band-with-most-change":!function(e){let{pixels:[t,r],mask:n,outBand:s}=e,i=t[0].length,o=t.length;for(let e=0;e<i;e++)if(!n||n[e]){let n=0,i=0;for(let s=0;s<o;s++){let o=Math.abs(t[s][e]-r[s][e]);o>n&&(n=o,i=s)}s[e]=i}}({pixels:e.map(e=>e.pixels),mask:u,outBand:m})}let f=new g.A({width:c,height:h,pixels:[m],pixelType:r,mask:u});return f.updateStatistics(),f}(t,r,this.outputPixelType,this._categoryConfig)}_getWebGLParameters(){let e=this.outputPixelType??"f32",[t,r]=(0,l.hP)(e),n=(0,l.zw)(e);return n&&(t-=1e-4,r+=1e-4),{method:this.functionArguments.method,domainRange:[t,r],isOutputRounded:n}}_updateAttributeTable(e,t,r){let n=this.sourceRasterInfos.map(e=>e.attributeTable),s=n.map((e,r)=>e.features.map(e=>e.attributes[t[r]])),i=n.map((e,t)=>e.features.map(e=>e.attributes[r[t]])),o=s.map(e=>{let t=[];return e.forEach((e,r)=>t[e]=r),t}),{keepMethod:a}=this.functionArguments;this._categoryConfig={categoryIndexLookups:o,classNames:i,keepMethod:a};let l=n[0].clone();l.fields=[new Ut.A({name:"OID",type:"oid"}),new Ut.A({name:"Value",type:"integer"}),new Ut.A({name:"ClassName",type:"string"}),new Ut.A({name:"Class_From",type:"string"}),new Ut.A({name:"Class_To",type:"string"})];let u=this._getFieldNames(n,"red"),p=this._getFieldNames(n,"green"),c=this._getFieldNames(n,"blue"),h=[],m=2===u.length&&2===p.length&&2===c.length;m&&(h.push(...n.map((e,t)=>e.features.map(e=>[e.attributes[u[t]],e.attributes[p[t]],e.attributes[c[t]]]))),l.fields.push(new Ut.A({name:"Red",type:"integer"}),new Ut.A({name:"Green",type:"integer"}),new Ut.A({name:"Blue",type:"integer"})));let f=l.features[0].clone();f.geometry=null;let g=[],[d,y]=s.map(e=>e.length),x=1;for(let e=0;e<d;e++){let t=i[0][e];for(let r=0;r<y;r++){let n=i[1][r];if("changed"===a&&t===n||"unchanged"===a&&t!==n)continue;let s=f.clone();s.attributes={OID:x++,Value:e*y+r,ClassName:t===n?t:`${t} -> ${n}`,Class_From:t,Class_To:n},m&&(s.attributes.Red=h[0][e][0]+h[1][r][0]>>1,s.attributes.Green=h[0][e][1]+h[1][r][1]>>1,s.attributes.Blue=h[0][e][2]+h[1][r][2]>>1),g.push(s)}}if("changed"===a){let e=f.clone();e.attributes={OID:x++,Value:d*y+1,ClassName:"No Change",Class_From:"Same",Class_To:"Same"},g.push(e)}else if("unchanged"===a){let e=f.clone();e.attributes={OID:x++,Value:d*y+2,ClassName:"Changed",Class_From:"Any",Class_To:"Any"},g.push(e)}l.features=g,e.attributeTable=l}_getFieldNames(e,t){return e.map(({fields:e})=>e.find(e=>e.name.toLowerCase()===t)?.name).filter(e=>e)}_getClassFieldName(e){return(e.fields.find(e=>"string"===e.type&&e.name.toLowerCase().startsWith("class"))??e.fields.find(e=>"string"===e.type&&e.name.toLowerCase().includes("class")||e.name.toLowerCase().includes("type")||e.name.toLowerCase().includes("name"))??e.fields.find(e=>"string"===e.type))?.name}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Lt.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Vt,json:{write:!0,name:"rasterFunctionArguments"}})],Lt.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Lt.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Lt.prototype,"_categoryConfig",void 0),Lt=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ComputeChangeFunction")],Lt);const Wt=Lt;var $t;let Kt=$t=class extends c{constructor(){super(...arguments),this.contrastOffset=0,this.brightnessOffset=0}clone(){return new $t({contrastOffset:this.contrastOffset,brightnessOffset:this.brightnessOffset,raster:this.raster})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Kt.prototype,"contrastOffset",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Kt.prototype,"brightnessOffset",void 0),Kt=$t=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ContrastBrightnessFunctionArguments")],Kt);const Ht=Kt;var qt=r(51927);let Jt=class extends w{constructor(){super(...arguments),this.functionName="ContrastBrightness",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null}_bindSourceRasters(){let{sourceRasterInfos:e}=this,t=e[0];if("u8"!==t.pixelType)return{success:!1,supportsGPU:!1,error:"Only unsigned 8 bit raster is supported by ContrastBrightness function."};this.outputPixelType=this._getOutputPixelType("u8");let r=t.clone();this._removeStatsHistColormapVAT(r),this.rasterInfo=r;let{contrastOffset:n,brightnessOffset:s}=this.functionArguments;return this.lookup=(0,qt.zj)(n,s),{success:!0,supportsGPU:!0}}_processPixels(e){let t=e.pixelBlocks?.[0];return null==t?null:(0,$e.eH)(t,{lut:t.pixels.map(()=>this.lookup),offset:0,outputPixelType:"u8"})}_getWebGLParameters(){let{contrastOffset:e,brightnessOffset:t}=this.functionArguments;return{contrastOffset:e,brightnessOffset:t}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Jt.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Ht,json:{write:!0,name:"rasterFunctionArguments"}})],Jt.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Jt.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Jt.prototype,"lookup",void 0),Jt=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ContrastBrightnessFunction")],Jt);const Xt=Jt;function Yt(e,t,r,n,s){let i=Math.floor(n/2);for(let n=0;n<i;n++)for(let i=0;i<t;i++)e[n*t+i]=e[(s-1-n)*t+i],e[(r-1-n)*t+i]=e[(r-s+n)*t+i];let o=Math.floor(s/2);for(let n=0;n<r;n++){let r=n*t;for(let n=0;n<o;n++)e[r+n]=e[r+s-1-n],e[r+t-n-1]=e[r+t+n-s]}}const Qt=new Map;function er(e,t,r,n,s,i,o){let a=new Float32Array(t*r),l=i.length,u=o?0:n,p=o?n:0,c=o?1:t;for(let o=u;o<r-u;o++){let r=o*t;for(let o=p;o<t-p;o++){if(s&&!s[r+o])continue;let t=0;for(let s=0;s<l;s++)t+=e[r+o+(s-n)*c]*i[s];a[r+o]=t}}return a}function tr(e,t,r,n,s,i,o){let a=new Float32Array(t*r),l=Math.floor(n/2),u=Math.floor(s/2);for(let p=l;p<r-l;p++){let r=p*t;for(let p=u;p<t-u;p++){if(i&&!i[r+p])continue;let c=0;for(let i=0;i<n;i++)for(let n=0;n<s;n++)c+=e[r+p+(i-l)*t+n-u]*o[i*s+n];a[r+p]=c}}return a}var rr;Qt.set(A.none,[0,0,0,0,1,0,0,0,0]),Qt.set(A.lineDetectionHorizontal,[-1,-1,-1,2,2,2,-1,-1,-1]),Qt.set(A.lineDetectionVertical,[-1,2,-1,-1,2,-1,-1,2,-1]),Qt.set(A.lineDetectionLeftDiagonal,[2,-1,-1,-1,2,-1,-1,-1,2]),Qt.set(A.lineDetectionRightDiagonal,[-1,-1,2,-1,2,-1,2,-1,-1]),Qt.set(A.gradientNorth,[-1,-2,-1,0,0,0,1,2,1]),Qt.set(A.gradientWest,[-1,0,1,-2,0,2,-1,0,1]),Qt.set(A.gradientEast,[1,0,-1,2,0,-2,1,0,-1]),Qt.set(A.gradientSouth,[1,2,1,0,0,0,-1,-2,-1]),Qt.set(A.gradientNorthEast,[0,-1,-2,1,0,-1,2,1,0]),Qt.set(A.gradientNorthWest,[-2,-1,0,-1,0,1,0,1,2]),Qt.set(A.smoothArithmeticMean,[.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111]),Qt.set(A.smoothing3x3,[.0625,.125,.0625,.125,.25,.125,.0625,.125,.0625]),Qt.set(A.smoothing5x5,[1,1,1,1,1,1,4,4,4,1,1,4,12,4,1,1,4,4,4,1,1,1,1,1,1]),Qt.set(A.sharpening3x3,[-1,-1,-1,-1,9,-1,-1,-1,-1]),Qt.set(A.sharpening5x5,[-1,-3,-4,-3,-1,-3,0,6,0,-3,-4,6,21,6,-4,-3,0,6,0,-3,-1,-3,-4,-3,-1]),Qt.set(A.laplacian3x3,[0,-1,0,-1,4,-1,0,-1,0]),Qt.set(A.laplacian5x5,[0,0,-1,0,0,0,-1,-2,-1,0,-1,-2,17,-2,-1,0,-1,-2,-1,0,0,0,-1,0,0]),Qt.set(A.sobelHorizontal,[-1,-2,-1,0,0,0,1,2,1]),Qt.set(A.sobelVertical,[-1,0,1,-2,0,2,-1,0,1]),Qt.set(A.sharpen,[0,-.25,0,-.25,2,-.25,0,-.25,0]),Qt.set(A.sharpen2,[-.25,-.25,-.25,-.25,3,-.25,-.25,-.25,-.25]),Qt.set(A.pointSpread,[-.627,.352,-.627,.352,2.923,.352,-.627,.352,-.627]);let nr=rr=class extends c{constructor(){super(...arguments),this.rows=3,this.cols=3,this.kernel=[0,0,0,0,1,0,0,0,0]}set convolutionType(e){this._set("convolutionType",e);let t=Qt.get(e);if(!t||e===A.userDefined||e===A.none)return;let r=Math.round(Math.sqrt(t.length));this._set("kernel",t),this._set("cols",r),this._set("rows",r)}clone(){return new rr({cols:this.cols,rows:this.rows,kernel:[...this.kernel],convolutionType:this.convolutionType,raster:(0,i.o8)(this.raster)})}};(0,o.Cg)([(0,a.MZ)({json:{type:Number,write:!0}})],nr.prototype,"rows",void 0),(0,o.Cg)([(0,a.MZ)({json:{type:Number,write:!0,name:"columns"}})],nr.prototype,"cols",void 0),(0,o.Cg)([(0,a.MZ)({json:{name:"type",type:Number,write:!0}})],nr.prototype,"convolutionType",null),(0,o.Cg)([(0,a.MZ)({json:{type:[Number],write:!0}})],nr.prototype,"kernel",void 0),nr=rr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ConvolutionFunctionArguments")],nr);const sr=nr;let ir=class extends w{constructor(){super(...arguments),this.functionName="Convolution",this.rasterArgumentNames=["raster"]}get _normalizedKernel(){let{kernel:e,convolutionType:t}=this.functionArguments,r=e.reduce((e,t)=>e+t);return-1===t||0===r||1===r?e:e.map(e=>e/r)}_bindSourceRasters(){let{convolutionType:e,rows:t,cols:r,kernel:n}=this.functionArguments;if(!Object.values(A).includes(e))return{success:!1,supportsGPU:!1,error:`convolution-function: the specified kernel type is not supported ${e}`};if(e!==A.none&&t*r!==n.length)return{success:!1,supportsGPU:!1,error:"convolution-function: the specified rows and cols do not match the length of the kernel"};let s=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType(s.pixelType);let i=s.clone();i.pixelType=this.outputPixelType;let o=[A.none,A.sharpen,A.sharpen2,A.sharpening3x3,A.sharpening5x5];return(-1===e||"u8"!==this.outputPixelType&&!o.includes(e))&&(i.statistics=null,i.histograms=null),i.colormap=null,i.attributeTable=null,this.rasterInfo=i,{success:!0,supportsGPU:n.length<=25}}_processPixels(e){let t=e.pixelBlocks?.[0];if(null==t||this.functionArguments.convolutionType===A.none)return t;let{rows:r,cols:n}=this.functionArguments,{_normalizedKernel:s}=this;return function(e,t){let r=function(e){let t=Math.sqrt(e.length),r=e.slice(0,t),n=[1];for(let r=1;r<t;r++){let s=null;for(let n=0;n<t;n++){let i=e[n+r*t],o=e[n];if(null==s)if(0===o){if(i)return{separable:!1,row:null,col:null}}else s=i/o;else if(i/o!==s)return{separable:!1,row:null,col:null}}if(null==s)return{separable:!1,row:null,col:null};n.push(s)}return{separable:!0,row:r,col:n}}(t.kernel),n=!1!==t.mirrorEdges,s=r.separable?function(e,t,r,n=!0){let{pixels:s,width:i,height:o,pixelType:a,mask:l}=e,u=s.length,p=[],c=t.length,h=r.length,m=Math.floor(c/2),f=Math.floor(h/2);for(let e=0;e<u;e++){let a=er(s[e],i,o,m,l,t,!0);a=er(a,i,o,f,l,r,!1),n&&Yt(a,i,o,c,h),p.push(a)}return new g.A({width:i,height:o,pixelType:a,pixels:p,mask:l})}(e,r.row,r.col,n):function(e,t,r=!0){let{pixels:n,width:s,height:i,pixelType:o,mask:a}=e,l=n.length,u=[],{kernel:p,rows:c,cols:h}=t;for(let e=0;e<l;e++){let t=tr(n[e],s,i,c,h,a,p);r&&Yt(t,s,i,c,h),u.push(t)}return new g.A({width:s,height:i,pixelType:o,pixels:u,mask:a})}(e,t,n),{outputPixelType:i}=t;return i&&s.clamp(i),s}(t,{kernel:s,rows:r,cols:n,outputPixelType:this.outputPixelType})}_getWebGLParameters(){let e=new Float32Array(25),{rows:t,cols:r}=this.functionArguments,{_normalizedKernel:n}=this;for(let s=0;s<t;s++)for(let t=0;t<r;t++)e[5*s+t]=n[s*r+t];return{kernelRows:t,kernelCols:r,kernel:e,clampRange:(0,l.hP)(this.outputPixelType)}}_getNeighborhoodSize(){let{rows:e,cols:t}=this.functionArguments;return{rows:e,cols:t}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],ir.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:sr,json:{write:!0,name:"rasterFunctionArguments"}})],ir.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],ir.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)()],ir.prototype,"_normalizedKernel",null),ir=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ConvolutionFunction")],ir);const or=ir;var ar;const lr=new Oe.J({0:"standard",1:"planform",2:"profile"},{useNumericKeys:!0});let ur=ar=class extends c{constructor(){super(...arguments),this.curvatureType="standard",this.zFactor=1}readCurvatureType(e,t){return lr.fromJSON(t.type??t.curvatureType??0)}clone(){return new ar({curvatureType:this.curvatureType,zFactor:this.zFactor,raster:this.raster})}};(0,o.Cg)([(0,a.MZ)({json:{write:{target:"type"}}}),(0,Ye.e)(lr)],ur.prototype,"curvatureType",void 0),(0,o.Cg)([(0,yt.w)("curvatureType",["type","curvatureType"])],ur.prototype,"readCurvatureType",null),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],ur.prototype,"zFactor",void 0),ur=ar=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.CurvatureFunctionArguments")],ur);const pr=ur;let cr=class extends w{constructor(){super(...arguments),this.functionName="Curvature",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){this.outputPixelType=this._getOutputPixelType("f32");let e=this.sourceRasterInfos[0].clone();return e.pixelType=this.outputPixelType,e.bandCount=1,this._removeStatsHistColormapVAT(e),this.rasterInfo=e,this.isGCS=e.spatialReference?.isGeographic??!1,{success:!0,supportsGPU:!0}}_processPixels(e){let t=e.pixelBlocks?.[0];if(null==t)return null;let{zFactor:r,curvatureType:n}=this.functionArguments,{extent:s,primaryPixelSizes:i}=e,o=i?.[0]??(s?{x:s.width/t.width,y:s.height/t.height}:{x:1,y:1}),a=this.isGCS&&r>=1?r*ze.rk:r;return(0,ze.E0)(t,{zFactor:a,curvatureType:n,resolution:o})}_getWebGLParameters(){let{zFactor:e,curvatureType:t}=this.functionArguments;return{curvatureType:t,zFactor:this.isGCS&&e>=1?e*ze.rk:e}}_getNeighborhoodSize(){return{rows:3,cols:3}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],cr.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:pr,json:{write:!0,name:"rasterFunctionArguments"}})],cr.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],cr.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],cr.prototype,"isGCS",void 0),cr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.CurvatureFunction")],cr);const hr=cr;var mr;let fr=mr=class extends c{constructor(){super(...arguments),this.bandIds=[],this.bandNames=[],this.bandWavelengths=[],this.missingBandAction=0}clone(){return new mr({bandIds:this.bandIds?.slice(),bandNames:this.bandNames?.slice(),bandWavelengths:this.bandWavelengths?.slice(),missingBandAction:this.missingBandAction,method:this.method,wavelengthMatchTolerance:this.wavelengthMatchTolerance})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],fr.prototype,"bandIds",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],fr.prototype,"bandNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],fr.prototype,"bandWavelengths",void 0),(0,o.Cg)([(0,Ye.e)({0:"name",1:"wavelength",2:"id"})],fr.prototype,"method",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],fr.prototype,"missingBandAction",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],fr.prototype,"wavelengthMatchTolerance",void 0),fr=mr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ExtractBandFunctionArguments")],fr);const gr=fr;let dr=class extends w{constructor(){super(...arguments),this.functionName="ExtractBand",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){let{functionArguments:e,sourceRasterInfos:t}=this,r=t[0],{method:n,bandNames:s,bandWavelengths:i,bandIds:o,missingBandAction:a}=e,l=s?.length&&("name"===n||"id"!==n&&!o?.length),u=i?.length&&("wavelength"===n||"id"!==n&&!o?.length),p=1===a,c=l?function(e,t){let r=e.bandInfos.map(({name:e})=>e.toLowerCase()),n=[];for(let e=0;e<t.length;e++){let s=t[e].toLowerCase(),i=r.indexOf(s);if(-1===i&&"nearinfrared"===s&&(i=r.findIndex(e=>e.startsWith("nearinfrared_1")),-1===i&&(i=r.findIndex(e=>e.startsWith("nearinfrared")))),-1===i)return null;n.push(i)}return n}(r,s):u?function(e,t,{wavelengthMatchTolerance:r},n){let{bandInfos:s}=e,i=[];for(let e=0;e<s.length;e++){let{minWavelength:t,maxWavelength:r}=s[e];if(!t||!r)return null;i.push({minWavelength:t,maxWavelength:r})}let o=[];for(let e=0;e<t.length;e++){let s=t[e],a=!1,l=-1,u=Number.MAX_VALUE;for(let e=0;e<i.length;e++){let t=i[e],r=s>=t.minWavelength&&s<=t.maxWavelength,n=Math.abs(s-(t.minWavelength+t.maxWavelength)/2);r?n<u&&(a=!0,l=e,u=n):!a&&n<u&&(l=e,u=n)}if(!a&&r&&u<r&&(a=!0),!a&&n)return null;o.push(l)}return o}(r,i,this.functionArguments,p):function(e,t,r){let{bandCount:n}=e;return!t?.length||r&&t.some(e=>e<0||e>=n)?null:t}(r,o,p);if(null==c)return{success:!1,supportsGPU:!1,error:`extract-band-function: Invalid ${l?"band names":u?"band wavelengths":"band ids"} for the imagery data source`};this.functionArguments.bandIds=c,this.functionArguments.method="id",this.outputPixelType=this._getOutputPixelType(r.pixelType);let h=r.clone();h.pixelType=this.outputPixelType,h.bandCount=c.length;let{statistics:m,histograms:f}=h;null!=m&&m.length&&(h.statistics=c.map(e=>m[e]||m[m.length-1])),null!=f&&f.length&&(h.histograms=c.map(e=>f[e]||f[f.length-1])),h.multidimensionalInfo&&h.multidimensionalInfo.variables.forEach(e=>{let{statistics:t,histograms:r}=e;null!=t&&t.length&&(e.statistics=c.map(e=>t[e]||t[t.length-1])),null!=r&&r.length&&(e.histograms=c.map(e=>r[e]||r[r.length-1]))});let g=h.keyProperties?.BandProperties;return g?.length&&(g=c.map(e=>e>=g.length?g[g.length-1]:g[e]),h.keyProperties={...h.keyProperties,BandProperties:g}),this.rasterInfo=h,{success:!0,supportsGPU:h.bandCount<=3}}_processPixels(e){let t=e.pixelBlocks?.[0];if(null==t)return null;let{bandIds:r}=this.functionArguments;if(this.rasterInfo.storageInfo.isBsqTile){let{rawInputBandIds:e}=this;r=r.map(t=>e.indexOf(t))}else{let e=t.pixels.length;r=r.map(t=>t>=e?e-1:t)}return t.extractBands(r)}_getWebGLParameters(){let e;if(this.isInputBandIdsSwizzled)e=this.swizzledBandSelection.length?this.swizzledBandSelection:[0,1,2];else{e=[...this.functionArguments.bandIds],0===e.length?e=[0,1,2]:e.length<3&&(e[1]=e[1]??e[0],e[2]=e[2]??e[1]);for(let t=0;t<3;t++)e[t]=Math.min(e[t],2)}return{bandIndexMat3:qe(e)}}_getInputBandIds(e){let t=e.length;return this.functionArguments.bandIds.map(e=>e>=t?t-1:e).map(t=>e[t])}_swizzleBandIds(e){let t=this.functionArguments.bandIds.map(t=>e.indexOf(t));return this.isInputBandIdsSwizzled=!0,t[1]??=t[0],t[2]??=t[1],this.swizzledBandSelection=t,!1}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],dr.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:gr,json:{write:!0,name:"rasterFunctionArguments"}})],dr.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],dr.prototype,"rasterArgumentNames",void 0),dr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ExtractBandFunction")],dr);const yr=dr;function xr(e,t,r,n){let{pixels:s,width:i,height:o}=e,a=s.length,u=r.startsWith("f"),p=!u,[c,h]=(0,l.hP)(r),m=i*o,f=g.A.createEmptyBand(r,m);for(let e=0;e<o;e++){let r=e*i;for(let e=0;e<i;e++,r++)if(!n||n[r]){let e=0;for(let n=0;n<a;n++)e+=t[n]*s[n][r];u||(e=Math.round(e),p&&(e=e>h?h:e<c?c:e)),f[r]=e}}return f}var wr;let Ar=wr=class extends c{clone(){return new wr({conversionParameters:[...this.conversionParameters],raster:this.raster})}};(0,o.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],Ar.prototype,"conversionParameters",void 0),Ar=wr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.GrayscaleFunctionArguments")],Ar);const vr=Ar;let br=class extends w{constructor(){super(...arguments),this.functionName="Grayscale",this.functionArguments=null,this.rasterArgumentNames=["raster"]}get _normalizedWeights(){let{conversionParameters:e}=this.functionArguments,t=e.reduce((e,t)=>e+t);return e.map(e=>e/t)}_bindSourceRasters(){let{conversionParameters:e}=this.functionArguments;if(!e?.length)return{success:!1,supportsGPU:!1,error:"missing valid conversion parameters."};let t=this.sourceRasterInfos[0].clone();this.outputPixelType=this._getOutputPixelType(t.pixelType),t.pixelType=this.outputPixelType;let r=3===e.length||3===t.bandCount&&e.length>3;return t.bandCount=1,this._removeStatsHistColormapVAT(t),this.rasterInfo=t,{success:!0,supportsGPU:r}}_processPixels(e){let t=e.pixelBlocks?.[0];return null==t?null:function(e,t,r){let{width:n,height:s,mask:i,bandMasks:o}=e,a=o?.length?g.A.combineBandMasks(o):i,l=xr(e,t,r,a),u=new g.A({width:n,height:s,pixels:[l],pixelType:r,mask:a});return u.updateStatistics(),u}(t,this._normalizedWeights,this.outputPixelType)}_getWebGLParameters(){return{weights:this._normalizedWeights}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],br.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:vr,json:{write:!0,name:"rasterFunctionArguments"}})],br.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],br.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)()],br.prototype,"_normalizedWeights",null),br=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.GrayscaleFunction")],br);const Cr=br;var Mr;const Pr=new Oe.J({0:"traditional",1:"multi-directional"},{useNumericKeys:!0}),Tr=new Oe.J({1:"degree",2:"percent-rise",3:"scaled"},{useNumericKeys:!0});let Rr=Mr=class extends c{constructor(){super(...arguments),this.altitude=45,this.azimuth=315,this.hillshadeType="traditional",this.pixelSizePower=.664,this.pixelSizeFactor=.024,this.slopeType="degree",this.zFactor=1,this.removeEdgeEffect=!1}clone(){return new Mr({hillshadeType:this.hillshadeType,altitude:this.altitude,azimuth:this.azimuth,zFactor:this.zFactor,slopeType:this.slopeType,pixelSizeFactor:this.pixelSizeFactor,pixelSizePower:this.pixelSizePower,removeEdgeEffect:this.removeEdgeEffect,raster:this.raster})}};(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Rr.prototype,"altitude",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Rr.prototype,"azimuth",void 0),(0,o.Cg)([(0,a.MZ)(),(0,Ye.e)(Pr)],Rr.prototype,"hillshadeType",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0,name:"psPower"}})],Rr.prototype,"pixelSizePower",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0,name:"psZFactor"}})],Rr.prototype,"pixelSizeFactor",void 0),(0,o.Cg)([(0,a.MZ)(),(0,Ye.e)(Tr)],Rr.prototype,"slopeType",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Rr.prototype,"zFactor",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],Rr.prototype,"removeEdgeEffect",void 0),Rr=Mr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.HillshadeFunctionArguments")],Rr);const Nr=Rr;let kr=class extends w{constructor(){super(...arguments),this.functionName="Hillshade",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){let e=this.sourceRasterInfos[0];if(e.bandCount>1)return{success:!1,supportsGPU:!1,error:"hillshade-function: source data must be single band"};this.outputPixelType=this._getOutputPixelType("u8");let t=e.clone();return this._removeStatsHistColormapVAT(t),t.pixelType=this.outputPixelType,t.bandCount=1,t.statistics=[{min:0,max:255,avg:60,stddev:10}],this.rasterInfo=t,this.isGCS=t.spatialReference?.isGeographic??!1,{success:!0,supportsGPU:!0}}_processPixels(e){let t=e.pixelBlocks?.[0];if(!t)return null;let{extent:r,primaryPixelSizes:n}=e,s=n?.[0]??(r?{x:r.width/t.width,y:r.height/t.height}:{x:1,y:1}),i=(0,ze.PP)(this.functionArguments,s,this.isGCS),o=(0,ze.fw)(t,i);return o.pixelType=this.outputPixelType,o}_getWebGLParameters(){let e=(0,ze.PP)(this.functionArguments,{x:1,y:1},this.isGCS),t=(0,ze.ng)(e),{slopeType:r,zFactor:n,pixelSizeFactor:s,pixelSizePower:i}=this.functionArguments,o="scaled"===r,a=(0,l.zw)(this.outputPixelType);return{...t,zFactor:n,gcsFactor:this.isGCS?ze.rk:1,pixelSizeFactor:o?s:0,pixelSizePower:o?i:0,isOutputRounded:a}}_getNeighborhoodSize(){return{rows:3,cols:3}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],kr.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Nr,json:{write:!0,name:"rasterFunctionArguments"}})],kr.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],kr.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],kr.prototype,"isGCS",void 0),kr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.HillshadeFunction")],kr);const Ir=kr;var Sr;let _r=Sr=class extends c{constructor(){super(...arguments),this.rasters=[],this.processAsMultiband=!0}writeRasters(e,t){t.rasters=e.map(e=>"number"==typeof e||"string"==typeof e?e:e.toJSON())}clone(){return new Sr({operation:this.operation,processAsMultiband:this.processAsMultiband,rasters:(0,i.o8)(this.rasters)})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],_r.prototype,"operation",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],_r.prototype,"rasters",void 0),(0,o.Cg)([(0,Ft.K)("rasters")],_r.prototype,"writeRasters",null),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],_r.prototype,"processAsMultiband",void 0),_r=Sr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.LocalFunctionArguments")],_r);const Fr=_r;let Br=class extends w{constructor(){super(...arguments),this.functionName="Local",this.functionArguments=null,this.rasterArgumentNames=["rasters"]}_bindSourceRasters(){let{sourceRasterInfos:e}=this,t=e[0],{bandCount:r}=t,{processAsMultiband:n}=this.functionArguments;if(e.some(e=>e.bandCount!==r))return{success:!1,supportsGPU:!1,error:"local-function: input rasters do not have same band count"};let{operation:s,rasters:i}=this.functionArguments,o=R[s];if(!(999===o||i.length===o||i.length<=1&&1===o))return{success:!1,supportsGPU:!1,error:`local-function: the length of functionArguments.rasters does not match operation's requirement: ${o}`};let a=t.clone();return a.bandCount=999!==o||n?r:1,this._removeStatsHistColormapVAT(a),this._updateStatistics(a),this._updatePixelType(a),this.rasterInfo=a,{success:!0,supportsGPU:1===a.bandCount&&o<=3}}_processPixels(e){let{pixelBlocks:t}=e;return null==t||t.some(e=>null==e)?null:Se(t,this.functionArguments.operation,{processAsMultiband:this.functionArguments.processAsMultiband,outputPixelType:this.outputPixelType??void 0})}_getWebGLParameters(){let{operation:e}=this.functionArguments,t=R[e],r=Object.keys(M).find(t=>M[t]===e)?.toLowerCase()??"undefined",n=this.outputPixelType??"f32",[s,i]=(0,l.hP)(n),o=(0,l.zw)(n);return o&&(s-=1e-4,i+=1e-4),{imageCount:t,operationName:r,domainRange:[s,i],isOutputRounded:o}}_updateStatistics(e){let t=this.sourceRasterInfos[0],{operation:r}=this.functionArguments,n=T(r)?.domain;if(n){e.statistics=[];for(let t=0;t<e.bandCount;t++)e.statistics[t]={min:n[0],max:n[1],avg:(n[0]+n[1])/2,stddev:(n[0]+n[1])/10}}else 45===r&&t.statistics?.length&&(e.statistics=t.statistics.map(e=>({min:-e.max,max:-e.min,avg:null==e.avg?void 0:-e.avg,stddev:null==e.stddev?void 0:-e.stddev})))}_updatePixelType(e){let{statistics:t,pixelType:r}=this.sourceRasterInfos[0],{operation:n}=this.functionArguments,{domain:s,isInteger:i}=T(n)??{domain:null,isInteger:!1},o="f32";if(s&&i)o=(0,l.X1)(s[0],s[1]);else if(30===n){let e=t?.[0];o=e?(0,l.X1)(e.min,e.max):(0,l.zw)(r)?r:"s32"}else if(45===n&&(0,l.zw)(r)){let e=t?.map(({max:e})=>-e),n=t?.map(({min:e})=>-e),s=e?.length?Math.min(...e):null,i=n?.length?Math.min(...n):null;o=null!=s&&null!=i?(0,l.X1)(s,i):r.startsWith("s")?r.replace("s","u"):"u1"===r||"u2"===r||"u4"===r?"s8":"u8"===r?"s16":"s32"}e.pixelType=this.outputPixelType=this._getOutputPixelType(o)}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Br.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Fr,json:{write:!0,name:"rasterFunctionArguments"}})],Br.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Br.prototype,"rasterArgumentNames",void 0),Br=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.LocalFunction")],Br);const jr=Br;var Zr,zr=r(34727);let Gr=Zr=class extends c{constructor(){super(...arguments),this.includedRanges=null,this.noDataValues=null,this.noDataInterpretation=0}get normalizedNoDataValues(){let{noDataValues:e}=this;if(!e?.length)return null;let t=!1,r=e.map(e=>{if("number"==typeof e)return t=!0,[e];if("string"==typeof e){let r=e.trim().split(" ").filter(e=>""!==e.trim()).map(e=>Number(e));return t||=r.length>0,0===r.length?null:r}return null});return t?r:null}clone(){return new Zr({includedRanges:this.includedRanges?.slice()??[],noDataValues:this.noDataValues?.slice()??[],noDataInterpretation:this.noDataInterpretation})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Gr.prototype,"includedRanges",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Gr.prototype,"noDataValues",void 0),(0,o.Cg)([(0,a.MZ)()],Gr.prototype,"normalizedNoDataValues",null),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Gr.prototype,"noDataInterpretation",void 0),Gr=Zr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.MaskFunctionArguments")],Gr);const Er=Gr;let Or=class extends w{constructor(){super(...arguments),this.functionName="Mask",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){let e=this.sourceRasterInfos[0].clone(),{pixelType:t}=e;this.outputPixelType=this._getOutputPixelType(t),e.pixelType=this.outputPixelType,this.rasterInfo=e;let{includedRanges:r,normalizedNoDataValues:n}=this.functionArguments;if(!r?.length&&!n?.length)return{success:!1,supportsGPU:!1,error:"missing includedRanges or noDataValues argument"};let s=[];for(let i=0;i<e.bandCount;i++){let e=(0,$e.Wt)(t,r?.slice(2*i,2*i+2),n?.[i]);if(null==e){s=null;break}s.push(e)}this.lookups=s;let i=null!=n&&n.every(e=>e?.length===n[0]?.length);return{success:!0,supportsGPU:(!r||r.length<=18)&&(!n||i&&n[0].length<=9)}}_processPixels(e){let t=e.pixelBlocks?.[0];if(null==t)return null;let{outputPixelType:r,lookups:n}=this,{includedRanges:s,noDataInterpretation:i,normalizedNoDataValues:o}=this.functionArguments;return(0,$e.dK)(t,{includedRanges:s,noDataValues:o,outputPixelType:r,matchAll:1===i,lookups:n})}_getWebGLParameters(){let{includedRanges:e,normalizedNoDataValues:t}=this.functionArguments,r=new Float32Array(9);r.fill(zr.pq),t?.[0]?.length&&r.set(t[0]);let n=new Float32Array(6);for(let t=0;t<n.length;t+=2)n[t]=e?.[t]??-zr.pq,n[t+1]=e?.[t+1]??zr.pq;return e?.length&&n.set(e),{bandCount:this.sourceRasterInfos[0].bandCount,noDataValues:r,includedRanges:n}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Or.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Er,json:{write:!0,name:"rasterFunctionArguments"}})],Or.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Or.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Or.prototype,"lookups",void 0),Or=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.MaskFunction")],Or);const Dr=Or;var Vr;let Ur=Vr=class extends c{constructor(){super(...arguments),this.visibleBandID=0,this.infraredBandID=1,this.scientificOutput=!1}clone(){let{visibleBandID:e,infraredBandID:t,scientificOutput:r}=this;return new Vr({visibleBandID:e,infraredBandID:t,scientificOutput:r})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Ur.prototype,"visibleBandID",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Ur.prototype,"infraredBandID",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Ur.prototype,"scientificOutput",void 0),Ur=Vr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.NDVIFunctionArguments")],Ur);const Lr=Ur;let Wr=class extends w{constructor(){super(...arguments),this.functionName="NDVI",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){let{scientificOutput:e,visibleBandID:t,infraredBandID:r}=this.functionArguments;this.outputPixelType=this._getOutputPixelType(e?"f32":"u8");let n=this.sourceRasterInfos[0],s=Math.max(t,r);if(n.bandCount<2||s>=n.bandCount)return{success:!1,supportsGPU:!1,error:"ndvi-function: source raster has insufficient amount of raster bands"};if(t<0||r<0)return{success:!1,supportsGPU:!1,error:"ndvi-function: invalid visible or infrared band id"};let i=n.clone();i.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(i),i.bandCount=1,i.keyProperties={...i.keyProperties,BandProperties:void 0};let[o,a,l,u]=e?[-1,1,0,.1]:[0,200,100,10];return i.statistics=[{min:o,max:a,avg:l,stddev:u}],this.rasterInfo=i,{success:!0,supportsGPU:!0}}_processPixels(e){let t=e.pixelBlocks?.[0];if(null==t)return null;let{visibleBandID:r,infraredBandID:n,scientificOutput:s}=this.functionArguments;if(this.rasterInfo.storageInfo.isBsqTile){let{rawInputBandIds:e}=this;n=e.indexOf(n),r=e.indexOf(r)}return function(e,t,r,n){let{mask:s,pixels:i,width:o,height:a}=e,l=i[r],u=i[t],p=u.length,c=n?new Uint8Array(p):new Float32Array(p),h=n?100:1,m=n?100.5:0;for(let e=0;e<p;e++)if(null==s||s[e]){let t=l[e],r=u[e],n=t+r;n&&(c[e]=(t-r)/n*h+m)}let f=new g.A({width:o,height:a,mask:s,pixelType:n?"u8":"f32",pixels:[c]});return f.updateStatistics(),f}(t,r,n,!s)}_getWebGLParameters(){let{visibleBandID:e,infraredBandID:t,scientificOutput:r}=this.functionArguments;return{bandIndexMat3:qe(this.isInputBandIdsSwizzled?[0,1,2]:[t,e,0]),scaled:!r}}_getInputBandIds(e){let{visibleBandID:t,infraredBandID:r}=this.functionArguments;return[r,t,0].map(t=>e[t])}_swizzleBandIds(e){let{visibleBandID:t,infraredBandID:r}=this.functionArguments,n=[t,r].map(t=>e.indexOf(t));return n[2]=n[1],this.isInputBandIdsSwizzled=!0,this.swizzledBandSelection=n,!1}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Wr.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Lr,json:{write:!0,name:"rasterFunctionArguments"}})],Wr.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Wr.prototype,"rasterArgumentNames",void 0),Wr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.NDVIFunction")],Wr);const $r=Wr;var Kr;let Hr=Kr=class extends c{constructor(){super(...arguments),this.inputRanges=null,this.outputValues=null,this.noDataRanges=null,this.allowUnmatched=!1,this.isLastInputRangeInclusive=!1}clone(){return new Kr({inputRanges:[...this.inputRanges],outputValues:[...this.outputValues],noDataRanges:[...this.noDataRanges],allowUnmatched:this.allowUnmatched,isLastInputRangeInclusive:this.isLastInputRangeInclusive})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Hr.prototype,"inputRanges",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Hr.prototype,"outputValues",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Hr.prototype,"noDataRanges",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Hr.prototype,"allowUnmatched",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Hr.prototype,"replacementValue",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Hr.prototype,"isLastInputRangeInclusive",void 0),Hr=Kr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.RemapFunctionArguments")],Hr);const qr=Hr;let Jr=class extends w{constructor(){super(...arguments),this.functionName="Remap",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null}_bindSourceRasters(){let e=this.sourceRasterInfos[0].clone(),{pixelType:t}=e;e.bandCount=1;let{statistics:r}=e;this._removeStatsHistColormapVAT(e);let{allowUnmatched:n,replacementValue:s,outputValues:i,inputRanges:o,noDataRanges:a,isLastInputRangeInclusive:u}=this.functionArguments,p="unknown"===this.outputPixelType||null==this.outputPixelType;if(this.outputPixelType=this._getOutputPixelType(t),i?.length){let o=r?.[0];if(n&&null==s){let t=o?.min??i[0],r=o?.max??i[0];t=Math.min.apply(null,[...i,t]),r=Math.max.apply(null,[...i,r]),e.statistics=[{min:t,max:r,avg:o?.avg??0,stddev:o?.stddev??-1}]}else{let t=i[0],r=t;for(let e=0;e<i.length;e++)t=t>i[e]?i[e]:t,r=r>i[e]?r:i[e];n&&null!=s&&(t=Math.min(t,s),r=Math.max(r,s)),e.statistics=[{min:t,max:r,avg:o?.avg??0,stddev:o?.stddev??-1}]}if(p){let{min:r,max:o}=e.statistics[0],a=["u8","s8","u16","s16","u32","s32","f32"],u=a.find(e=>{let[t,n]=(0,l.hP)(e);return r>=t&&o<=n})??"f64";this.outputPixelType=i.some(e=>Math.floor(e)!==e)?"f64"===u?"f64":"f32":n&&null==s&&a.indexOf(t)>a.indexOf(u)?t:u}}return e.pixelType=this.outputPixelType,this.rasterInfo=e,this.lookup=n?null:(0,$e.XU)({srcPixelType:t,inputRanges:o,outputValues:i,noDataRanges:a,allowUnmatched:n,isLastInputRangeInclusive:u,outputPixelType:this.outputPixelType}),{success:!0,supportsGPU:(!i||i.length<=9)&&(!a||a.length<=9)}}_processPixels(e){let t=e.pixelBlocks?.[0];if(null==t)return null;let{lookup:r,outputPixelType:n}=this;if(r){let e=(0,$e.eH)(t,{lut:[r.lut],offset:r.offset,outputPixelType:n});return null!=e&&r.mask&&(e.mask=(0,$e.UK)(t.pixels[0],t.mask,r.mask,r.offset,"u8")),e}let{inputRanges:s,outputValues:i,noDataRanges:o,allowUnmatched:a,isLastInputRangeInclusive:l,replacementValue:u}=this.functionArguments;return(0,$e.Ew)(t,{inputRanges:s,outputValues:i,noDataRanges:o,outputPixelType:n,allowUnmatched:a,isLastInputRangeInclusive:l,replacementValue:u})}_getWebGLParameters(){let{allowUnmatched:e,noDataRanges:t,isLastInputRangeInclusive:r}=this.functionArguments,n=this.functionArguments.inputRanges??[],s=this.functionArguments.outputValues??[],i=(0,$e.bL)(n,s,r),o=new Float32Array(18);return o.fill(zr.pq),t?.length&&o.set(t),{allowUnmatched:e,rangeMaps:i,noDataRanges:o,clampRange:(0,l.hP)(this.outputPixelType),replacementValue:this.functionArguments.replacementValue}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Jr.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:qr,json:{write:!0,name:"rasterFunctionArguments"}})],Jr.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Jr.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Jr.prototype,"lookup",void 0),Jr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.RemapFunction")],Jr);const Xr=Jr;var Yr;let Qr=Yr=class extends Nr{readColorRamp(e){if("string"==typeof e){let t=gt.kH.jsonValues.find(t=>t.toLowerCase()===e.toLowerCase());return t?(0,gt.M5)(gt.kH.fromJSON(t)):null}return"toJSON"in e?e.toJSON():e}clone(){return new Yr({hillshadeType:this.hillshadeType,altitude:this.altitude,azimuth:this.azimuth,zFactor:this.zFactor,slopeType:this.slopeType,pixelSizeFactor:this.pixelSizeFactor,pixelSizePower:this.pixelSizePower,removeEdgeEffect:this.removeEdgeEffect,colorRamp:this.colorRamp,colormap:this.colormap,raster:this.raster})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Qr.prototype,"colorRamp",void 0),(0,o.Cg)([(0,yt.w)("colorRamp")],Qr.prototype,"readColorRamp",null),(0,o.Cg)([(0,a.MZ)({type:[[Number]],json:{write:!0}})],Qr.prototype,"colormap",void 0),Qr=Yr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ShadedReliefFunctionArguments")],Qr);const en=Qr;let tn=class extends w{constructor(){super(...arguments),this.functionName="ShadedRelief",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){let e=this.sourceRasterInfos[0];if(e.bandCount>1)return{success:!1,supportsGPU:!1,error:"shadedrelief-function: source data must be single band"};let{colorRamp:t,colormap:r}=this.functionArguments;if(!t&&!r?.length)return{success:!1,supportsGPU:!1,error:"shadedrelief-function: a color ramp argument must be specified"};this.outputPixelType=this._getOutputPixelType("u8");let n=e.clone();this._removeStatsHistColormapVAT(n),n.pixelType=this.outputPixelType,n.bandCount=3,n.statistics=[{min:0,max:255,avg:60,stddev:10},{min:0,max:255,avg:60,stddev:10},{min:0,max:255,avg:60,stddev:10}],this.rasterInfo=n,this.isGCS=n.spatialReference?.isGeographic??!1,r?.length||(r=(0,gt.R8)(t,{interpolateAlpha:!0}));let{indexedColormap:s,offset:i}=(0,$e.zg)({colormap:r});if(!s?.length)return{success:!1,supportsGPU:!1,error:"shadedrelief-function: a valid colorramp is required"};let o=(0,gt.S2)(s);return this.lookup={indexedColormap:s,offset:i,hsvMap:o},{success:!0,supportsGPU:(0,kt.WN)(s)}}_processPixels(e){let t=e.pixelBlocks?.[0];if(!t||!this.lookup)return null;let r=e.primaryPixelSizes?.[0];if(null==r){let{extent:n}=e;r=n?{x:n.width/t.width,y:n.height/t.height}:{x:1,y:1}}let n=(0,ze.PP)(this.functionArguments,r,this.isGCS),s=(0,ze.fw)(t,n),i=this.sourceRasterInfos[0].statistics?.[0]??{min:0,max:8e3};return(0,ze.SC)(s,t,this.lookup.hsvMap,i),s.pixelType=this.outputPixelType,s}_getWebGLParameters(){let e=(0,ze.PP)(this.functionArguments,{x:1,y:1},this.isGCS),t=(0,ze.ng)(e),{slopeType:r,zFactor:n,pixelSizeFactor:s,pixelSizePower:i}=this.functionArguments,o="scaled"===r,{indexedColormap:a,offset:u}=this.lookup,p=this.sourceRasterInfos[0].statistics?.[0],c=(0,l.zw)(this.outputPixelType);return{...t,indexedColormap:a,offset:u,zFactor:n,gcsFactor:this.isGCS?ze.rk:1,pixelSizeFactor:o?s:0,pixelSizePower:o?i:0,minValue:p?.min??0,maxValue:p?.max??8e3,isOutputRounded:c}}_getNeighborhoodSize(){return{rows:3,cols:3}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],tn.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:en,json:{write:!0,name:"rasterFunctionArguments"}})],tn.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],tn.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],tn.prototype,"isGCS",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],tn.prototype,"lookup",void 0),tn=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ShadedReliefFunction")],tn);const rn=tn;var nn;const sn=new Oe.J({1:"degree",2:"percent-rise",3:"adjusted"},{useNumericKeys:!0});let on=nn=class extends c{constructor(){super(...arguments),this.slopeType="degree",this.zFactor=1,this.pixelSizePower=.664,this.pixelSizeFactor=.024,this.removeEdgeEffect=!1}clone(){return new nn({slopeType:this.slopeType,zFactor:this.zFactor,pixelSizePower:this.pixelSizePower,pixelSizeFactor:this.pixelSizeFactor,removeEdgeEffect:this.removeEdgeEffect,raster:this.raster})}};(0,o.Cg)([(0,Ye.e)(sn)],on.prototype,"slopeType",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],on.prototype,"zFactor",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{name:"psPower",write:!0}})],on.prototype,"pixelSizePower",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{name:"psZFactor",write:!0}})],on.prototype,"pixelSizeFactor",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],on.prototype,"removeEdgeEffect",void 0),on=nn=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.SlopeFunctionArguments")],on);const an=on;let ln=class extends w{constructor(){super(...arguments),this.functionName="Slope",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){this.outputPixelType=this._getOutputPixelType("f32");let e=this.sourceRasterInfos[0].clone();return e.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(e),e.statistics="percent-rise"===this.functionArguments.slopeType?null:[{min:0,max:90,avg:1,stddev:1}],e.bandCount=1,this.rasterInfo=e,this.isGCS=e.spatialReference?.isGeographic??!1,{success:!0,supportsGPU:!0}}_processPixels(e){let t=e.pixelBlocks?.[0];if(null==t)return null;let{zFactor:r,slopeType:n,pixelSizePower:s,pixelSizeFactor:i}=this.functionArguments,{isGCS:o}=this,{extent:a,primaryPixelSizes:l}=e,u=l?.[0]??(a?{x:a.width/t.width,y:a.height/t.height}:{x:1,y:1});return(0,ze.yy)(t,{zFactor:r,slopeType:n,pixelSizePower:s,pixelSizeFactor:i,isGCS:o,resolution:u})}_getWebGLParameters(){let{zFactor:e,slopeType:t,pixelSizeFactor:r,pixelSizePower:n}=this.functionArguments;return{zFactor:this.isGCS&&e>=1?e*ze.rk:e,slopeType:t,pixelSizeFactor:r??0,pixelSizePower:n??0,isOutputRounded:(0,l.zw)(this.outputPixelType)}}_getNeighborhoodSize(){return{rows:3,cols:3}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],ln.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:an,json:{write:!0,name:"rasterFunctionArguments"}})],ln.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],ln.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],ln.prototype,"isGCS",void 0),ln=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.SlopeFunction")],ln);const un=ln;var pn;let cn=pn=class extends c{clone(){return new pn({conversionMatrix:[...this.conversionMatrix],raster:this.raster})}};(0,o.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],cn.prototype,"conversionMatrix",void 0),cn=pn=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.SpectralConversionFunctionArguments")],cn);const hn=cn;let mn=class extends w{constructor(){super(...arguments),this.functionName="SpectralConversion",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){let e=this.sourceRasterInfos[0].clone();return this.outputPixelType=this._getOutputPixelType(e.pixelType),e.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(e),this.rasterInfo=e,{success:!0,supportsGPU:3===e.bandCount&&9===this.functionArguments.conversionMatrix.length}}_processPixels(e){let t=e.pixelBlocks?.[0];return null==t?null:function(e,t,r){let{width:n,height:s,mask:i,bandMasks:o}=e,a=o?.length?g.A.combineBandMasks(o):i,l=[],u=e.pixels.length;for(let n=0;n<t.length/u;n++){let s=xr(e,t.slice(n*u,(n+1)*u),r,a);l.push(s)}let p=new g.A({width:n,height:s,pixels:l,pixelType:r,mask:a});return p.updateStatistics(),p}(t,this.functionArguments.conversionMatrix,this.outputPixelType)}_getWebGLParameters(){let e=(0,l.hP)(this.outputPixelType),[t,r,n,s,i,o,a,u,p]=this.functionArguments.conversionMatrix;return{weights:[t,s,a,r,i,u,n,o,p],clampRange:e}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],mn.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:hn,json:{write:!0,name:"rasterFunctionArguments"}})],mn.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],mn.prototype,"rasterArgumentNames",void 0),mn=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.SpectralConversionFunction")],mn);const fn=mn,gn=new Oe.J({1:"min",2:"max",3:"mean",4:"stddev",5:"median",6:"majority",7:"minority"},{useNumericKeys:!0});function dn(e,t){let{fillNoDataOnly:r}=t,{band:n,width:s,height:i,mask:o,outBand:a}=e;if(r&&!o)return void a.set(n);let{statisticsType:l,kernelRows:u,kernelCols:p}=t,c="stddev"===l,h=s*i,m=new Float64Array(h),f=new Float64Array(h),g=new Uint32Array(h);for(let e=0;e<i;e++){let t=e*s,r=0,i=0,a=0;for(let e=0;e<p;e++)(!o||o[t+e])&&(r+=n[t+e],c&&(i+=n[t+e]**2),a++);m[t]=r,f[t]=i,g[t]=a;for(let e=1;e<=s-p;e++){let s=t+e-1,l=s+p;o?(o[s]&&(a--,r-=n[s],c&&(i-=n[s]**2)),o[l]&&(a++,r+=n[l],c&&(i+=n[l]**2))):(r-=n[s],r+=n[l],c&&(i-=n[s]**2,i+=n[l]**2)),m[t+e]=r,g[t+e]=a,c&&(f[t+e]=i)}}let d=new Float64Array(h),y=new Float64Array(h),x=new Uint32Array(h),w=u*s;for(let e=0;e<=s-p;e++){let t=0,r=0,n=0;for(let i=0;i<u;i++){let o=i*s+e;t+=m[o],n+=g[o],c&&(r+=f[o])}d[e]=t,y[e]=r,x[e]=n;for(let o=1;o<=i-u;o++){let i=(o-1)*s+e,a=i+w;t-=m[i],t+=m[a],n-=g[i],n+=g[a],c&&(r-=f[i],r+=f[a]),d[o*s+e]=t,y[o*s+e]=r,x[o*s+e]=n}}let A=Math.floor(u/2),v=Math.floor(p/2);for(let e=A;e<i-A;e++){let t=e*s;for(let n=v;n<s-v;n++){let i=(e-A)*s+n-v,l=x[i];if(0===l||r&&(!o||o[t+n]))continue;let u=d[i]/l,p=c?Math.sqrt((y[i]-d[i]*u)/l):u;a[t+n]=p,o&&(o[t+n]=255)}}}function yn(e,t){let{fillNoDataOnly:r}=t,{band:n,width:s,height:i,mask:o,outBand:a}=e;if(r&&!o)return void a.set(n);let{kernelRows:l,kernelCols:u,statisticsType:p}=t,c=Math.floor(l/2),h=Math.floor(u/2),m="min"===p,f=a.slice(),g=new Uint32Array(s*i);for(let e=c;e<i-c;e++){let t=e*s;for(let e=h;e<s-h;e++){let r=m?Number.MAX_VALUE:-Number.MAX_VALUE,i=0;for(let a=0;a<l;a++)for(let l=0;l<u;l++){let u=t+e+(a-c)*s+l-h;(!o||o[u])&&(r=m?Math.min(r,n[u]):Math.max(r,n[u]),i++)}o?(f[t+e]=0===i?0:r,g[t+e]=i):a[t+e]=0===i?0:r}}if(o)for(let e=c;e<i-c;e++){let t=e*s;for(let e=h;e<s-h;e++)if(g[t+e]){if(r&&o[t+e])continue;a[t+e]=f[t+e],o[t+e]=255}}}function xn(e,t){let{fillNoDataOnly:r}=t,{band:n,width:s,height:i,mask:o,outBand:a}=e;if(r&&!o)return void a.set(n);let{kernelRows:l,kernelCols:u}=t,p=Math.floor(l/2),c=Math.floor(u/2),h=a.slice(),m=new Uint32Array(s*i);for(let e=p;e<i-p;e++){let t=e*s;for(let e=c;e<s-c;e++){if(r&&o?.[t+e])continue;let i=[];for(let r=0;r<l;r++)for(let a=0;a<u;a++){let l=t+e+(r-p)*s+a-c;(!o||o[l])&&i.push(n[l])}i.length&&(i.sort((e,t)=>e-t),o?(h[t+e]=i[Math.floor((i.length-1)/2)],m[t+e]=i.length):a[t+e]=i[Math.floor((i.length-1)/2)])}}if(o)for(let e=p;e<i-p;e++){let t=e*s;for(let e=c;e<s-c;e++)if(m[t+e]){if(r&&o[t+e])continue;a[t+e]=h[t+e],o[t+e]=255}}}function wn(e,t){let{fillNoDataOnly:r}=t,{band:n,width:s,height:i,mask:o,outBand:a}=e;if(r&&!o)return void a.set(n);let{kernelRows:l,kernelCols:u}=t,p=Math.floor(l/2),c=Math.floor(u/2),h="majority"===t.statisticsType,m=l*u,f=a.slice(),g=new Uint32Array(s*i);for(let e=p;e<i-p;e++){let t=e*s;for(let e=c;e<s-c;e++){if(r&&o?.[t+e])continue;let i=new Map;for(let r=0;r<l;r++)for(let a=0;a<u;a++){let l=t+e+(r-p)*s+a-c;if(o&&!o[l])continue;let u=n[l];i.set(u,i.has(u)?i.get(u)+1:1)}if(0===i.size)continue;let d=0,y=0,x=h?0:m+1;for(let e of i.keys())y=i.get(e),h===y>x&&(x=y,d=e);o?(f[t+e]=d,g[t+e]=i.size):a[t+e]=d}}if(o)for(let e=p;e<i-p;e++){let t=e*s;for(let e=c;e<s-c;e++)if(g[t+e]){if(r&&o[t+e])continue;a[t+e]=f[t+e],o[t+e]=255}}}var An;let vn=An=class extends c{constructor(){super(...arguments),this.rows=3,this.cols=3,this.fillNoDataOnly=!1,this.statisticsType="min"}clone(){return new An({rows:this.rows,cols:this.cols,fillNoDataOnly:this.fillNoDataOnly,statisticsType:this.statisticsType,raster:(0,i.o8)(this.raster)})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,read:{source:["kernelRows","rows"],reader:(e,t)=>Number(e??t?.kernelRows??3)}}})],vn.prototype,"rows",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0,read:{source:["kernelCols","cols"],reader:(e,t)=>Number(e??t?.kernelCols??3)}}})],vn.prototype,"cols",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],vn.prototype,"fillNoDataOnly",void 0),(0,o.Cg)([(0,a.MZ)({json:{read:{source:["statisticsType","type"],reader:(e,t)=>gn.fromJSON(t?.statisticsType??t?.type)??"min"},write:{target:"type"}}}),(0,Ye.e)(gn)],vn.prototype,"statisticsType",void 0),vn=An=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.StatisticsFunctionArguments")],vn);const bn=vn;let Cn=class extends w{constructor(){super(...arguments),this.functionName="Statistics",this.rasterArgumentNames=["raster"]}_bindSourceRasters(){let{type:e}=this.functionArguments.toJSON();if(e<1||e>7)return{success:!1,supportsGPU:!1,error:`statistics-function: the given statistics type is not supported ${e}`};let t=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType(t.pixelType);let r=t.clone();r.pixelType=this.outputPixelType;let{statisticsType:n}=this.functionArguments;return"stddev"===n&&this._removeStatsHistColormapVAT(r),this.rasterInfo=r,{success:!0,supportsGPU:r.bandCount<=3&&e<5}}_processPixels(e){let t=e.pixelBlocks?.[0];if(null==t)return t;let{statisticsType:r,rows:n,cols:s,fillNoDataOnly:i}=this.functionArguments;return function(e,t){let{mask:r}=e,{fillNoDataOnly:n}=t;if(n&&!r)return e;let{pixels:s,width:i,height:o,bandMasks:a,pixelType:l}=e,u=s.length,p=i*o,c=[],{kernelRows:h,kernelCols:m,statisticsType:f,mirrorEdges:d}=t;if(n&&!r)return e;let y=t.outputPixelType??l,x=[];for(let e=0;e<u;e++){let l=s[e],u=g.A.createEmptyBand(y,p);n&&u.set(l);let w=(a?.[e]??r)?.slice()??null,A={band:l,width:i,height:o,mask:w,outBand:u};switch(f){case"min":case"max":yn(A,t);break;case"mean":case"stddev":dn(A,t);break;case"median":xn(A,t);break;case"majority":case"minority":wn(A,t)}d&&!n&&Yt(u,i,o,h,m),c.push(u),w&&x.push(w)}let w=x[0]??r;x.length!==u&&(x.length=0),u>1&&a?.length&&(w=g.A.combineBandMasks(a));let A=new g.A({pixelType:y,width:i,height:o,pixels:c,bandMasks:a&&x.length?x:null,mask:w});return A.updateStatistics(),A}(t,{kernelRows:n,kernelCols:s,fillNoDataOnly:i,outputPixelType:this.outputPixelType,statisticsType:r,mirrorEdges:!0})}_getWebGLParameters(){let{rows:e,cols:t,statisticsType:r,fillNoDataOnly:n}=this.functionArguments;return{fillNoDataOnly:n,kernelRows:e,kernelCols:t,statisticsType:r,clampRange:(0,l.hP)(this.outputPixelType)}}_getNeighborhoodSize(){let{rows:e,cols:t}=this.functionArguments;return{rows:e,cols:t}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Cn.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:bn,json:{write:!0,name:"rasterFunctionArguments"}})],Cn.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Cn.prototype,"rasterArgumentNames",void 0),Cn=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.StatisticsFunction")],Cn);const Mn=Cn;var Pn;let Tn=Pn=class extends c{constructor(){super(...arguments),this.statistics=null,this.histograms=null}readStatistics(e,t){if(!e?.length)return null;let r=[];return e.forEach(e=>{let t={min:e.min,max:e.max,avg:e.avg??e.mean,stddev:e.stddev??e.standardDeviation};r.push(t)}),r}writeStatistics(e,t,r){if(!e?.length)return;let n=[];e.forEach(e=>{let t={...e,mean:e.avg,standardDeviation:e.stddev};delete t.avg,delete t.stddev,n.push(t)}),t[r]=n}clone(){return new Pn({statistics:(0,i.o8)(this.statistics),histograms:(0,i.o8)(this.histograms)})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Tn.prototype,"statistics",void 0),(0,o.Cg)([(0,yt.w)("statistics")],Tn.prototype,"readStatistics",null),(0,o.Cg)([(0,Ft.K)("statistics")],Tn.prototype,"writeStatistics",null),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Tn.prototype,"histograms",void 0),Tn=Pn=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.StatisticsHistogramFunctionArguments")],Tn);const Rn=Tn;let Nn=class extends w{constructor(){super(...arguments),this.functionName="StatisticsHistogram",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){let e=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType("u8");let t=e.clone(),{statistics:r,histograms:n}=this.functionArguments;return n&&(t.histograms=n),r&&(t.statistics=r),this.rasterInfo=t,{success:!0,supportsGPU:!0}}_processPixels(e){return e.pixelBlocks?.[0]}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Nn.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Rn,json:{write:!0,name:"rasterFunctionArguments"}})],Nn.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Nn.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Nn.prototype,"indexedColormap",void 0),(0,o.Cg)([(0,a.MZ)()],Nn.prototype,"isNoopProcess",void 0),Nn=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.StatisticsHistogramFunction")],Nn);const kn=Nn;var In;const Sn=new Oe.J({0:"none",3:"standard-deviation",4:"histogram-equalization",5:"min-max",6:"percent-clip",9:"sigmoid"},{useNumericKeys:!0});let _n=In=class extends c{constructor(){super(...arguments),this.computeGamma=!1,this.dynamicRangeAdjustment=!1,this.gamma=[],this.histograms=null,this.statistics=null,this.stretchType="none",this.useGamma=!1}writeStatistics(e,t,r){e?.length&&(Array.isArray(e[0])||(e=e.map(e=>[e.min,e.max,e.avg,e.stddev])),t[r]=e)}clone(){return new In({stretchType:this.stretchType,outputMin:this.outputMin,outputMax:this.outputMax,useGamma:this.useGamma,computeGamma:this.computeGamma,statistics:(0,i.o8)(this.statistics),gamma:(0,i.o8)(this.gamma),sigmoidStrengthLevel:this.sigmoidStrengthLevel,numberOfStandardDeviations:this.numberOfStandardDeviations,minPercent:this.minPercent,maxPercent:this.maxPercent,histograms:(0,i.o8)(this.histograms),dynamicRangeAdjustment:this.dynamicRangeAdjustment,raster:this.raster})}};(0,o.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],_n.prototype,"computeGamma",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean,json:{name:"dra",write:!0}})],_n.prototype,"dynamicRangeAdjustment",void 0),(0,o.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],_n.prototype,"gamma",void 0),(0,o.Cg)([(0,a.MZ)()],_n.prototype,"histograms",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],_n.prototype,"maxPercent",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],_n.prototype,"minPercent",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],_n.prototype,"numberOfStandardDeviations",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{name:"max",write:!0}})],_n.prototype,"outputMax",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{name:"min",write:!0}})],_n.prototype,"outputMin",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],_n.prototype,"sigmoidStrengthLevel",void 0),(0,o.Cg)([(0,a.MZ)({json:{type:[[Number]],write:!0}})],_n.prototype,"statistics",void 0),(0,o.Cg)([(0,Ft.K)("statistics")],_n.prototype,"writeStatistics",null),(0,o.Cg)([(0,Ye.e)(Sn)],_n.prototype,"stretchType",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],_n.prototype,"useGamma",void 0),_n=In=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.StretchFunctionArguments")],_n);const Fn=_n;let Bn=class extends w{constructor(){super(...arguments),this.functionName="Stretch",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null,this.cutOffs=null}_bindSourceRasters(){this.lookup=null,this.cutOffs=null;let e=this.sourceRasterInfos[0],{pixelType:t}=e,{functionArguments:r}=this,{dynamicRangeAdjustment:n,gamma:s,useGamma:i}=r;if(!n&&["u8","u16","s8","s16"].includes(t)){let n=(0,qt.DP)(r.toJSON(),{rasterInfo:e}),o=(0,l.zw)(this.outputPixelType)?"round":"float";this.lookup=(0,qt.RP)({pixelType:t,...n,gamma:i?s:null,rounding:o}),this.cutOffs=n}else n||(this.cutOffs=(0,qt.DP)(r.toJSON(),{rasterInfo:e}));this.outputPixelType=this._getOutputPixelType(t);let o=e.clone();o.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(o),"u8"===this.outputPixelType&&(o.keyProperties.DataType="processed");let{outputMin:a=0,outputMax:u=255}=this.functionArguments;o.statistics=[];for(let e=0;e<o.bandCount;e++)o.statistics[e]={min:a,max:u};return this.rasterInfo=o,{success:!0,supportsGPU:!n}}_processPixels(e,t){let r=e.pixelBlocks?.[0];if(null==r)return r;let{lookup:n}=this;if(n)return(0,$e.eH)(r,{...n,outputPixelType:this.rasterInfo.pixelType});let{functionArguments:s}=this,i=t?.stretchCutoff??this.cutOffs??(0,qt.DP)(s.toJSON(),{rasterInfo:this.sourceRasterInfos[0],pixelBlock:r}),o=s.useGamma?s.gamma:null;return(0,qt._N)(r,{...i,gamma:o,outputPixelType:this.outputPixelType})}_getWebGLParameters(){let{outputMin:e=0,outputMax:t=255,gamma:r,useGamma:n}=this.functionArguments,s=this.rasterInfo.bandCount>=2?3:1,i=n&&r?.length?(0,qt.Nh)(s,r):[1,1,1],{minCutOff:o,maxCutOff:a}=this.cutOffs??{minCutOff:[0,0,0],maxCutOff:[255,255,255]};1===o.length&&(o[1]=o[2]=o[0],a[1]=a[2]=a[0]);let u=a.map((r,n)=>(t-e)/(a[n]-o[n])),p=(0,l.zw)(this.outputPixelType);return{bandCount:s,minOutput:e,maxOutput:t,minCutOff:o,maxCutOff:a,factor:u,useGamma:n,gamma:n&&r?[r[0],r[1]??r[0],r[2]??r[0]]:[1,1,1],gammaCorrection:n?[i[0],i[1]??i[0],i[2]??i[0]]:[1,1,1],stretchType:this.functionArguments.stretchType,isOutputRounded:p,type:"stretch"}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Bn.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Fn,json:{write:!0,name:"rasterFunctionArguments"}})],Bn.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Bn.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Bn.prototype,"lookup",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Bn.prototype,"cutOffs",void 0),Bn=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.StretchFunction")],Bn);const jn=Bn;var Zn;let zn=Zn=class extends c{constructor(){super(...arguments),this.attributeTableAsRecordSet=null}clone(){return new Zn({attributeTableAsRecordSet:(0,i.o8)(this.attributeTableAsRecordSet)})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],zn.prototype,"attributeTableAsRecordSet",void 0),zn=Zn=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.TableFunctionArguments")],zn);const Gn=zn;let En=class extends w{constructor(){super(...arguments),this.functionName="Table",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){let e=this.sourceRasterInfos[0];if(e.bandCount>1||e.pixelType.startsWith("f"))return{success:!1,supportsGPU:!1,error:"table-function: Source data must be single band and integer pixel type."};let{attributeTableAsRecordSet:t}=this.functionArguments;if(!t)return{success:!1,supportsGPU:!1,error:"table-function: Missing attributeTableAsRecordSet argument."};this.outputPixelType=this._getOutputPixelType(e.pixelType);let r=e.clone();return r.pixelType=this.outputPixelType,r.bandCount=1,"thematic"!==r.dataType&&(r.keyProperties=r.keyProperties?{...r.keyProperties,DataType:"thematic"}:{DataType:"thematic"}),this.rasterInfo=r,{success:!0,supportsGPU:!0}}_processPixels(e){return e.pixelBlocks?.[0]}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],En.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Gn,json:{write:!0,name:"rasterFunctionArguments"}})],En.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],En.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)()],En.prototype,"isNoopProcess",void 0),En=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.TableFunction")],En);const On=En,Dn=new Map;function Vn(e,t){let{rasterFunctionArguments:r}=e;r&&(r.rasters||[r.raster,r.raster2]).forEach(e=>{e&&"number"!=typeof e&&("string"==typeof e?e.startsWith("http")&&(t.includes(e)||t.push(e)):"rasterFunctionArguments"in e&&Vn(e,t))})}function Un(e,t){t??={};try{if("function"in(e=(0,i.o8)(e))&&"arguments"in e&&e.arguments){let r=Jn(e,new Map,t);if(Yn(r),!r.renderingRule)throw new s.A("raster-function-helper","Unsupported raster function json.");e=r.renderingRule}if("rasterFunction"in e){let r=$n(e=Wn(e),t);return r.isRoot=!0,r}}catch{}throw new s.A("raster-function-helper","unsupported raster function json.")}function Ln(e){return!!(e&&"object"==typeof e&&e.rasterFunction&&e.rasterFunctionArguments)}function Wn(e){let{rasterFunction:t,rasterFunctionArguments:r}=e,n={};for(let e in r){let t=r[e],s=e.toLowerCase();if("rasters"===s&&Array.isArray(t))n.rasters=t.map(e=>Ln(e)?Wn(e):e);else switch(Ln(t)&&(t=Wn(t)),s){case"dra":n.dra=t;break;case"pspower":n.psPower=t;break;case"pszfactor":n.psZFactor=t;break;case"bandids":n.bandIds=t;break;default:n[e[0].toLowerCase()+e.slice(1)]=t}}return"Local"===t&&!n.rasters?.length&&(n.rasters=["$$"]),{...e,rasterFunctionArguments:n}}function $n(e,t){let{rasterFunction:r,rasterFunctionArguments:n}=e,i=e.outputPixelType?.toLowerCase();if(null==r||!Dn.has(r))throw new s.A("raster-function-helper",`unsupported raster function: ${r}`);let o=Dn.get(r),a=("function"==typeof o.ctor?o.ctor:o.ctor.default).fromJSON({...e,outputPixelType:i}),{rasterArgumentNames:l}=a,u=[],p=function(e,t){return"rasters"===t[0]&&Array.isArray(e.rasters)?e.rasters:t.map(t=>e[t])}(n,l),c="rasters"===l[0]||l.length>1,h=[];for(let e=0;e<p.length;e++){let r,n=p[e];null==n||"string"==typeof n&&n.startsWith("$")?u.push(t?.raster):"string"==typeof n?t[n]&&u.push(t[n]):"number"!=typeof n&&"rasterFunction"in n&&(r=$n(n,t),c||(a.functionArguments[l[e]]=r),u.push(r)),c&&h.push(r??n)}if(c&&("rasters"===l[0]?a.functionArguments.rasters=h:l.forEach((e,t)=>{a.functionArguments[e]=h[t]})),t){a.sourceRasters=u;let e=t.raster?.url;e&&(a.mainPrimaryRasterId=e)}return a}function Kn(e,t){if(e&&t)for(let r in e){let n=e[r];n&&"object"==typeof n&&"type"in n&&("RasterFunctionTemplate"===n.type?Kn(n.arguments,t):"RasterFunctionVariable"===n.type&&null!=t[n.name]&&(n.value=t[n.name]))}}function Hn(e,t){if(!e||"object"!=typeof e)return e;let{value:r}=e;if(!r||"object"!=typeof r)return e.isDataset?"$$":r;if(Array.isArray(r))return 0===r.length?[]:r.map(e=>e&&"object"==typeof e&&"RasterFunctionVariable"===e.type?Hn(e,t):e);if("value"in r&&["number","string","boolean"].includes(typeof r.value))return r.value;if(e.isDataset&&"Scalar"!==r.type)return"$$";if(!("type"in r))return r;let n=r;switch(r.type){case"Scalar":n=r.value;break;case"AlgorithmicColorRamp":n=qn(r);break;case"MultiPartColorRamp":n={type:"multipart",colorRamps:r.ArrayOfColorRamp.map(qn)};break;case"ArgumentArray":if(r.elements?.length&&"RasterStatistics"!==r.elements[0].type){let e=[];for(let n=0;n<r.elements.length;n++){let i=r.elements[n],{type:o}=i;if(o)if("RasterFunctionTemplate"===o){let{renderingRule:r}=Jn(i,t);e.push(r),null!=i._object_id&&t.set(i._object_id,r)}else{if("RasterFunctionVariable"!==o)throw new s.A("raster-function-helper","unsupported raster function json.");{let r=Hn(i,t);e.push(r),null!=i._object_id&&t.set(i._object_id,r)}}else e.push(i)}n=e}else n=r.elements}return null!=r._object_id&&t.set(r._object_id,n),n}function qn(e){let t=e.algorithm??"esriHSVAlgorithm",{FromColor:r,ToColor:s}=e;if(!Array.isArray(r)){let{r:e,g:t,b:s}=(0,n.$)({h:r.Hue,s:r.Saturation,v:r.Value});r=[e,t,s,r.AlphaValue]}if(!Array.isArray(s)){let{r:e,g:t,b:r}=(0,n.$)({h:s.Hue,s:s.Saturation,v:s.Value});s=[e,t,r,s.AlphaValue]}return{type:"algorithmic",algorithm:t,fromColor:r,toColor:s}}function Jn(e,t,r){r&&Kn(e,r);let n={renderingRule:{},templates:t};return Xn(e,n),n}function Xn(e,t){if(!e||!t.renderingRule)return;let{renderingRule:r,templates:n}=t,{function:s,arguments:i,_object_id:o}=e;if(!s||!i)return;null!=o&&n.set(o,r),r.rasterFunction=s.type.replace("Function",""),r.outputPixelType=s.pixelType;let a={};r.rasterFunctionArguments=a;for(let e in i){if("type"===e||"object_id"===e||"_object_ref_id"===e)continue;let t=i[e];!t||"object"!=typeof t||!("type"in t)||"RasterFunctionTemplate"!==t.type&&"RasterFunctionVariable"!==t.type?a[e]=t:("RasterFunctionVariable"===t.type?a[e]=Hn(t,n):(r.rasterFunctionArguments[e]={},Xn(t,{renderingRule:r.rasterFunctionArguments[e],templates:n})),null!=t._object_id&&n.set(t._object_id,a[e]))}switch(a.DEM&&!a.Raster&&(a.Raster=a.DEM,delete a.DEM),r.rasterFunction){case"Stretch":!function(e){e.Statistics?.length&&"object"==typeof e.Statistics&&(e.Statistics=e.Statistics.map(e=>[e.min,e.max,e.mean,e.standardDeviation])),null!=e.NumberOfStandardDeviation&&(e.NumberOfStandardDeviations=e.NumberOfStandardDeviation,delete e.NumberOfStandardDeviation)}(a);break;case"Colormap":!function(e){"randomcolorramp"===e.ColorRamp?.type?.toLowerCase()&&(delete e.ColorRamp,e.ColormapName="Random"),0===e.ColorSchemeType&&delete e.ColorRamp}(a);break;case"Convolution":!function(e){null!=e.ConvolutionType&&(e.Type=e.ConvolutionType,delete e.ConvolutionType)}(a);break;case"Mask":!function(e){e.NoDataValues?.length&&"string"==typeof e.NoDataValues[0]&&(e.NoDataValues=e.NoDataValues.filter(e=>""!==e).map(e=>Number(e)))}(a)}}function Yn(e){let{renderingRule:t,templates:r}=e;if("object"!=typeof t||!t?.rasterFunctionArguments||!r.size)return;let{rasterFunctionArguments:n}=t;for(let e in n){let t=n[e],i="_object_ref_id"===e?t:t&&"object"==typeof t&&"_object_ref_id"in t?t._object_ref_id:null;if(null!=i){if(!r.has(i))throw new s.A("raster-function-helper",`unsupported raster function json. _object_ref_id: ${i} does not exist`);let t=r.get(i);"_object_ref_id"===e?t&&"object"==typeof t&&Object.assign(n,t):n[e]=t}else t&&"object"==typeof t&&(t.rasterFunctionArguments&&Yn({renderingRule:t,templates:r}),Array.isArray(t)&&t.forEach((e,n)=>{if(e&&"object"==typeof e)if(null!=e._object_ref_id){if(!r.has(e._object_ref_id))throw new s.A("raster-function-helper",`unsupported raster function json. _object_ref_id: ${t} does not exist`);let o=r.get(i);o&&"object"==typeof o?Object.assign(e,o):t[n]=o}else Yn({renderingRule:e,templates:r})}))}}Dn.set("Arithmetic",{desc:"Arithmetic Function",ctor:Fe,rasterArgumentNames:["rasters"]}),Dn.set("Aspect",{desc:"Aspect Function",ctor:Ee,rasterArgumentNames:["raster"]}),Dn.set("BandArithmetic",{desc:"Band Arithmetic Function",ctor:nt,rasterArgumentNames:["raster"]}),Dn.set("Colormap",{desc:"Colormap Function",ctor:Mt,rasterArgumentNames:["raster"]}),Dn.set("ColormapToRGB",{desc:"ColormapToRGB Function",ctor:St,rasterArgumentNames:["raster"]}),Dn.set("CompositeBand",{desc:"CompositeBand Function",ctor:zt,rasterArgumentNames:["rasters"]}),Dn.set("ComputeChange",{desc:"ComputeChange Function",ctor:Wt,rasterArgumentNames:["rasters"]}),Dn.set("Convolution",{desc:"Convolution Function",ctor:or,rasterArgumentNames:["raster"]}),Dn.set("ContrastBrightness",{desc:"Contrast Brightness Function",ctor:Xt,rasterArgumentNames:["raster"]}),Dn.set("ExtractBand",{desc:"ExtractBand Function",ctor:yr,rasterArgumentNames:["raster"]}),Dn.set("Curvature",{desc:"Curvature Function",ctor:hr,rasterArgumentNames:["raster"]}),Dn.set("Hillshade",{desc:"Hillshade Function",ctor:Ir,rasterArgumentNames:["raster"]}),Dn.set("ShadedRelief",{desc:"ShadedRelief Function",ctor:rn,rasterArgumentNames:["raster"]}),Dn.set("Grayscale",{desc:"Grayscale Function",ctor:Cr,rasterArgumentNames:["raster"]}),Dn.set("Clip",{desc:"Clip Function",ctor:mt,rasterArgumentNames:["raster"]}),Dn.set("Local",{desc:"Local Function",ctor:jr,rasterArgumentNames:["rasters"]}),Dn.set("Mask",{desc:"Mask Function",ctor:Dr,rasterArgumentNames:["raster"]}),Dn.set("NDVI",{desc:"NDVI Function",ctor:$r,rasterArgumentNames:["raster"]}),Dn.set("Remap",{desc:"Remap Function",ctor:Xr,rasterArgumentNames:["raster"]}),Dn.set("Slope",{desc:"Slope Function",ctor:un,rasterArgumentNames:["raster"]}),Dn.set("SpectralConversion",{desc:"Spectral Conversion",ctor:fn,rasterArgumentNames:["raster"]}),Dn.set("Statistics",{desc:"Focal Statistics Function",ctor:Mn,rasterArgumentNames:["raster"]}),Dn.set("StatisticsHistogram",{desc:"Statistics Histogram Function",ctor:kn,rasterArgumentNames:["raster"]}),Dn.set("Stretch",{desc:"Stretch Function",ctor:jn,rasterArgumentNames:["raster"]}),Dn.set("Table",{desc:"Attribute Table Function",ctor:On,rasterArgumentNames:["raster"]})},37373(e,t,r){r.d(t,{DO:()=>G,FT:()=>B,Hh:()=>b,OM:()=>z,Ps:()=>V,Wo:()=>C,_I:()=>P,_l:()=>S,l0:()=>E,t$:()=>U,uk:()=>_});var n=r(4576),s=r(49186),i=r(86211),o=r(5443),a=r(83290),l=r(86738),u=r(39829),p=r(99917),c=r(16930),h=r(21325);function m(){if(!v)throw new s.A("rasterprojectionhelper-project","projection operator is not loaded")}const f=(e,t,r,n=0)=>{if(1===r[0])return[0,0];let s=1,i=-1,o=1,a=-1;for(let t=0;t<e.length;t+=2)isNaN(e[t])||(s=s>e[t]?e[t]:s,i=i>e[t]?i:e[t],o=o>e[t+1]?e[t+1]:o,a=a>e[t+1]?a:e[t+1]);let{cols:l,rows:u}=t,p=(i-s)/l/r[0],c=(a-o)/u/r[1],h=2*n,m=0,f=!1,g=[0,0];for(let t=0;t<l-3;t++){for(let r=0;r<u-3;r++){let n=t*u*2+2*r,s=(e[n]+e[n+4]+e[n+4*u]+e[n+4*u+4])/4,i=(e[n+1]+e[n+5]+e[n+4*u+1]+e[n+4*u+5])/4,o=Math.abs((s-e[n+2*u+2])/p),a=Math.abs((i-e[n+2*u+3])/c);if(o+a>m&&(m=o+a,g=[o,a]),h&&m>h){f=!0;break}}if(f)break}return g},g={3395:20037508.342789244,3410:17334193.943686873,3857:20037508.342788905,3975:17367530.445161372,4087:20037508.342789244,4088:20015108.787169147,6933:17367530.445161372,32662:20037508.342789244,53001:20015086.79602057,53002:10007543.39801029,53003:20015086.79602057,53004:20015086.79602057,53016:14152803.599503474,53017:17333573.624304302,53034:20015086.79602057,53079:20015114.352186374,53080:20015114.352186374,54001:20037508.342789244,54002:10018754.171394624,54003:20037508.342789244,54004:20037508.342789244,54016:14168658.027268292,54017:17367530.44516137,54034:20037508.342789244,54079:20037508.342789244,54080:20037508.342789244,54100:20037508.342789244,54101:20037508.342789244},d=new Map,y=new Map;let x,w,A,v=!1;async function b(){return x||(x=Promise.withResolvers(),w=await r.e(3276).then(()=>r(83276)),A=await r.e(2158).then(()=>r(12158)),w.projectIsLoaded()||await w.projectLoad(),A.isLoaded()||await A.load(),v=!0,x.resolve()),x.promise}function C(e,t,r,n){let s=e.spatialReference;if(!s||!t||s.equals(t))return e;m();let a=r.center,l=new o.A({xmin:a.x-e.x/2,xmax:a.x+e.x/2,ymin:a.y-e.y/2,ymax:a.y+e.y/2,spatialReference:s}),u=w.projectExecute(l,t,{geographicTransformation:n}),p=B(t);return null==u||null!=p&&u.width>=p?function(e,t,r){let n=(0,i.GA)(t)/(0,i.GA)(r);return{x:e.x*n,y:e.y*n}}(e,s,t):{x:u.width,y:u.height}}function M(e,t=.01){return(0,i.GA)(e)?t/(0,i.GA)(e):0}function P(e,t,r,n=!0){let s=e.spatialReference;if(s.equals(t))return e;m();let i=w.projectExecute(e,t,{geographicTransformation:r});return!n||!i||T([e],[i],s,t),i}function T(e,t,r,n){let s=j(r,!0),i=j(n,!0),o=M(r,500),a=M(n,500);if(o&&null!=s&&null!=i)for(let r=0;r<e.length;r++){let n=t[r];if(!n)continue;let{x:l}=e[r],{x:u}=n;u>=i[1]-a&&Math.abs(l-s[0])<o?n.x-=i[1]-i[0]:u<=i[0]+a&&Math.abs(l-s[1])<o&&(n.x+=i[1]-i[0])}}function R(e){let{inSR:t,outSR:r,preferPE:n}=e;if(t.equals(r)){let{points:t}=I(e,null);return t}return t.isWebMercator&&r.isWGS84||t.isWGS84&&r.isWebMercator?function(e){let{cols:t,rows:r,xres:n,yres:s,usePixelCenter:i,inSR:o,outSR:a}=e,{xmin:u,ymax:c}=e;i&&(u+=n/2,c-=s/2);let h=[],m=[],f=Math.max(t,r);for(let e=0;e<f;e++){let i=u+n*Math.min(t,e),f=c-s*Math.min(r,e),g=(0,p.projectWithoutEngine)(new l.A({x:i,y:f,spatialReference:o}),o,a);e<=t&&h.push(g.x),e<=r&&m.push(g.y)}let g=[];for(let e=0;e<t;e++)for(let t=0;t<r;t++)g.push([h[e],m[t]]);return g}(e):n&&(t.isGeographic||null!=N(t))?function(e){let{inSR:t,outSR:r,datumTransformation:n}=e,{points:s,mask:i}=I(e,N(t));if(!t.isGeographic){let e=t.wkid?a.P.coordsys(t.wkid):a.P.fromString(t.isGeographic?a.a.PE_TYPE_GEOGCS:a.a.PE_TYPE_PROJCS,t.wkt2||t.wkt);a.c.projToGeog(e,s.length,s)}if(null!=n&&n.steps.length){let e,t=179.9955;if(r.isGeographic&&(e=s.map(([e])=>e>t?1:e<-179.9955?-1:0)),n.steps.forEach(e=>{let t=e.wkid?a.P.geogtran(e.wkid):a.P.fromString(a.a.PE_TYPE_GEOGTRAN,e.wkt);a.d.geogToGeog(t,s.length,s,null,e.isInverse?a.a.PE_TRANSFORM_2_TO_1:a.a.PE_TRANSFORM_1_TO_2)}),e)for(let r=0;r<s.length;r++){let n=e[r],i=s[r][0],o=i>t?1:i<-179.9955?-1:0;n&&o&&n!==o&&(s[r][0]=n>0?i+360:i-360)}}if(!r.isGeographic){let e=N(r,!0);!function(e,t){let[r,n]=t;for(let t=0;t<e.length;t++){let s=e[t][1];(s<r||s>n)&&(e[t]=[NaN,NaN])}}(s,null!=e&&e.isEnvelope?[e.bbox[1],e.bbox[3]]:[-90,90]);let t=r.wkid?a.P.coordsys(r.wkid):a.P.fromString(r.isGeographic?a.a.PE_TYPE_GEOGCS:a.a.PE_TYPE_PROJCS,r.wkt2||r.wkt);a.c.geogToProj(t,s.length,s)}let o=s;if(i&&s.length!==i.length){o=[];for(let e=0,t=0;e<i.length;e++)i[e]?o.push(s[t++]):o.push([NaN,NaN])}return o}(e):function(e){let{points:t}=I(e,null),{inSR:r,outSR:n,datumTransformation:s}=e,i=t.map(e=>new l.A(e[0],e[1],r)),o=w.projectExecuteMany(i,n,{geographicTransformation:s});return s&&T(i,o,r,n),o.map(e=>e?[e.x,e.y]:[NaN,NaN])}(e)}function N(e,t=!1){let r=e.wkid||e.wkt2||e.wkt;if(!r||e.isGeographic)return null;if(r=String(r),d.has(r)){let e=d.get(r);return t?e?.gcs:e?.pcs}let n=e.wkid?a.P.coordsys(e.wkid):a.P.fromString(e.isGeographic?a.a.PE_TYPE_GEOGCS:a.a.PE_TYPE_PROJCS,e.wkt2||e.wkt),s=k(n,M(e,1e-4)),i=k(n,0,!0);return d.set(r,{pcs:s,gcs:i}),t?i:s}function k(e,t=0,r=!1){let n=a.b.generate(e),s=r?e.horizonGcsGenerate():e.horizonPcsGenerate();if(!n||!s?.length)return null;let i=!1,o=s.find(e=>1===e.getInclusive()&&1===e.getKind());if(!o){if(o=s.find(e=>1===e.getInclusive()&&0===e.getKind()),!o)return null;i=!0}let l=r?0:+(2===n.getNorthPoleLocation())|(2===n.getSouthPoleLocation()?2:0),u=n.isPannableRectangle(),p=o.getCoord();if(i)return{isEnvelope:i,isPannable:u,vertices:p,coef:null,bbox:[p[0][0]-t,p[0][1]-t,p[1][0]+t,p[1][1]+t],poleLocation:l};let c=0,h=[],[m,f]=p[0],[g,d]=p[0];for(let e=0,t=p.length;e<t;e++){c++,c===t&&(c=0);let[r,n]=p[e],[s,i]=p[c];if(i===n)h.push([r,s,n,i,2]);else{let e=(s-r)/(i-n||1e-4),t=r-e*n;n<i?h.push([e,t,n,i,0]):h.push([e,t,i,n,1])}m=m<r?m:r,f=f<n?f:n,g=g>r?g:r,d=d>n?d:n}return{isEnvelope:!1,isPannable:u,vertices:p,coef:h,bbox:[m,f,g,d],poleLocation:l}}function I(e,t){let r=[],{cols:n,rows:s,xres:i,yres:o,usePixelCenter:a}=e,{xmin:l,ymax:u}=e;if(a&&(l+=i/2,u-=o/2),null==t){for(let e=0;e<n;e++)for(let t=0;t<s;t++)r.push([l+i*e,u-o*t]);return{points:r}}let p=new Uint8Array(n*s);if(t.isEnvelope){let{isPannable:e,bbox:[a,c,h,m]}=t;for(let t=0,f=0;t<n;t++){let n=l+i*t,g=e||n>=a&&n<=h;for(let e=0;e<s;e++,f++){let t=u-o*e;g&&t>=c&&t<=m&&(r.push([n,t]),p[f]=1)}}return{points:r,mask:p}}let c=t.coef,h=[];for(let e=0;e<s;e++){let t=u-o*e,r=[],n=[];for(let e=0;e<c.length;e++){let[s,i,o,a,l]=c[e];if(t===o&&o===a)r.push(s),r.push(i),n.push(2),n.push(2);else if(t>=o&&t<=a){let e=s*t+i;r.push(e),n.push(l)}}let s=r;if(r.length>2){let e=2===n[0]?0:n[0],t=r[0];s=[];for(let i=1;i<n.length;i++)(2!==n[i]||i===n.length-1)&&(n[i]!==e&&(s.push(0===e?Math.min(t,r[i-1]):Math.max(t,r[i-1])),e=n[i],t=r[i]),i===n.length-1&&s.push(0===n[i]?Math.min(t,r[i]):Math.max(t,r[i])));s.sort((e,t)=>e-t)}else r[0]>r[1]&&(s=[r[1],r[0]]);h.push(s)}for(let e=0,t=0;e<n;e++){let n=l+i*e;for(let e=0;e<s;e++,t++){let s=u-o*e,i=h[e];if(2===i.length)n>=i[0]&&n<=i[1]&&(r.push([n,s]),p[t]=1);else if(i.length>2){let e=!1;for(let t=0;t<i.length;t+=2)if(n>=i[t]&&n<=i[t+1]){e=!0;break}e&&(r.push([n,s]),p[t]=1)}}}return{points:r,mask:p}}function S(e,t,r=null,s=!0){let i=e.spatialReference;if(i.equals(t)||!t)return e;let a=z(e),l=B(i,!0),p=B(t);if(0===a||null==l||null==p){let n=F(e,t,r,s);if(n&&null==l&&null!=p&&Math.abs(n.width-p)<M(t)&&w.projectIsLoaded()){let r=N(i);if(null!=r&&0===r.poleLocation&&e.width<(r.bbox[2]-r.bbox[0])/2)return function(e,t){let r=B(t);if(null==r)return null;let{xmin:n,ymin:s,xmax:i,ymax:a}=e,l=e.spatialReference,p=new u.A({spatialReference:l,rings:[[[n,s],[i,s],[i,a],[n,a],[n,s]]]}),c=w.projectExecute(p,t);if(2!==c.rings.length||!c.rings[0].length||!c.rings[1].length)return null;let{rings:h}=c,m=M(l),f=new o.A({spatialReference:t});for(let e=0;e<2;e++){n=i=h[e][0][0],s=a=h[e][0][1];for(let t=0;t<h[e].length;t++)n=n>h[e][t][0]?h[e][t][0]:n,i=i<h[e][t][0]?h[e][t][0]:i,s=s>h[e][t][1]?h[e][t][1]:s,a=a<h[e][t][1]?h[e][t][1]:a;if(0===e)f.ymin=s,f.ymax=a,f.xmin=n,f.xmax=i;else if(f.ymin=Math.min(f.ymin,s),f.ymax=Math.max(f.ymax,a),Math.abs(i-r/2)<m)f.xmin=n,f.xmax+=r;else{if(!(Math.abs(n+r/2)<m))return null;f.xmax=i+r}}return f}(e,t)||n}return n}let c=e.clone().normalize();if(1===c.length&&e.xmax<l&&e.xmax-l/2>M(i)){let{xmin:t,xmax:r}=e;for(let n=0;n<=a;n++){let s=0===n?t:-l/2,u=n===a?r-l*n:l/2;c[n]=new o.A({xmin:s,xmax:u,ymin:e.ymin,ymax:e.ymax,spatialReference:i})}}let h=c.map(e=>F(e,t,r,s)).filter(n.Ru);return 0===h.length?null:function(e,t){let r=B(e[0].spatialReference);if(e.length<2||null==r||(t??=M(e[0].spatialReference),1===(e=e.filter(e=>e.width>t)).length))return e[0];let{xmin:n,xmax:s,ymin:i,ymax:a}=e[0];for(let t=1;t<e.length;t++){let n=e[t];s=n.xmax+r*t,i=Math.min(i,n.ymin),a=Math.max(a,n.ymax)}return new o.A({xmin:n,xmax:s,ymin:i,ymax:a,spatialReference:e[0].spatialReference})}(h)}function _(e,t,r){if("extent"===e.type){let{xmin:t,ymin:r,xmax:n,ymax:s,spatialReference:i}=e;e=new u.A({rings:[[[t,s],[n,s],[n,r],[t,r],[t,s]]],spatialReference:i})}return e.spatialReference.equals(t)?e:(m(),w.projectExecute(e,t,{geographicTransformation:r}))}function F(e,t,r,n=!0,s=!0){let i=e.spatialReference;if(i.equals(t)||!t)return e;m();let o=w.projectExecute(e,t,{geographicTransformation:r});if(s&&t.isWebMercator&&o&&(o.ymax=Math.min(20037508.342787,o.ymax),o.ymin=Math.max(-20037508.342787,o.ymin),o.ymin>=o.ymax))return null;if(!n||!o)return o;let a=j(i,!0),u=j(t,!0);if(null==a||null==u)return o;let p=M(i,.001),c=M(i,500),h=M(t,.001);if(Math.abs(o.xmin-u[0])<h&&Math.abs(o.xmax-u[1])<h){let n=Math.abs(e.xmin-a[0]),s=Math.abs(a[1]-e.xmax);if(n<p&&s>c){o.xmin=u[0];let n=[];n.push(new l.A(e.xmax,e.ymin,i)),n.push(new l.A(e.xmax,(e.ymin+e.ymax)/2,i)),n.push(new l.A(e.xmax,e.ymax,i));let s=n.map(e=>P(e,t,r)).filter(e=>!isNaN(e?.x)).map(e=>e.x);o.xmax=Math.max.apply(null,s)}if(s<p&&n>c){o.xmax=u[1];let n=[];n.push(new l.A(e.xmin,e.ymin,i)),n.push(new l.A(e.xmin,(e.ymin+e.ymax)/2,i)),n.push(new l.A(e.xmin,e.ymax,i));let s=n.map(e=>P(e,t,r)).filter(e=>!isNaN(e?.x)).map(e=>e.x);o.xmin=Math.min.apply(null,s)}}else{let e=M(t,.001);Math.abs(o.xmin-u[0])<e&&(o.xmin=u[0]),Math.abs(o.xmax-u[1])<e&&(o.xmax=u[1])}return o}function B(e,t=!1){if(!e)return null;let r=t?20037508.342787:20037508.342788905;return e.isWebMercator?2*r:e.wkid&&e.isGeographic?360:2*g[e.wkid]||null}function j(e,t=!1){if(e.isGeographic)return[-180,180];let r=B(e,t);return r?[-r/2,r/2]:null}function Z(e,t,r,n){let s=(e-t)/r;return s-Math.floor(s)===0?n&&--s:s=Math.floor(s),s}function z(e,t=!1){let r=B(e.spatialReference);if(null==r)return 0;let n=t?0:-r/2,s=M(e.spatialReference),i=!t&&Math.abs(e.xmax-r/2)<s?r/2:e.xmax,o=!t&&Math.abs(e.xmin+r/2)<s?-r/2:e.xmin;return Z(i,n,r,!0)-Z(o,n,r,!1)}function G(e){let t=e.storageInfo.origin.x,r=B(e.spatialReference,!0);if(null==r)return{originX:t,halfWorldWidth:null,pyramidsInfo:null};let n=r/2,{nativePixelSize:s,storageInfo:i,extent:o}=e,{maximumPyramidLevel:a,blockWidth:l,pyramidScalingFactor:u}=i,p=s.x,c=[],h=null!=e.transform&&"gcs-shift"===e.transform.type,m=t+(h?0:n),f=h?r-t:n-t;for(let e=0;e<=a;e++){let e=(o.xmax-t)/p/l,r=e-Math.floor(e)===0?e:Math.ceil(e),n=f/p/l,s=n-Math.floor(n)===0?n:Math.ceil(n),i=Math.floor(m/p/l),a=Math.round(m/p)%l,h=(l-Math.round(f/p)%l)%l;c.push({resolutionX:p,blockWidth:l,datasetColumnCount:r,worldColumnCountFromOrigin:s,leftMargin:a,rightPadding:h,originColumnOffset:i}),p*=u}return{originX:t,halfWorldWidth:n,pyramidsInfo:c,hasGCSSShiftTransform:h}}function E(e){let t=e.isAdaptive&&null==e.spacing,r=e.spacing||[32,32],n=O(e),s={cols:n.size[0]+1,rows:n.size[1]+1},i=n.outofBoundPointCount>0&&n.outofBoundPointCount<n.offsets.length/2,o=n.outofBoundPointCount===n.offsets.length/2||t&&i?[0,0]:f(n.offsets,s,r,4),l=(o[0]+o[1])/2,u=e.projectedExtent.spatialReference,p=e.srcBufferExtent.spatialReference;if(t&&(i||l>4)&&(u.isGeographic||N(u),r=[4,4],n=O({...e,spacing:r}),s={cols:n.size[0]+1,rows:n.size[1]+1},o=f(n.offsets,s,r,4)),n.error=o,r[0]>1&&(n.coefficients=D(n.offsets,s,i)),e.includeGCSGrid&&!u.isGeographic&&!u.isWebMercator)if(p.isGeographic)n.gcsGrid={offsets:n.offsets,coefficients:n.coefficients,spacing:r};else{let t=N(u);if(null!=t&&!t.isEnvelope){let t=function(e){if(!e||e.isGeographic)return e;let t,r=String(e.wkid||e.wkt2||e.wkt);return y.has(r)?t=y.get(r):(t=(e.wkid?a.P.coordsys(e.wkid):a.P.fromString(a.a.PE_TYPE_PROJCS,e.wkt2||e.wkt)).getGeogcs().getCode(),y.set(r,t)),new c.A({wkid:t})}(u),o=S(e.projectedExtent,t),{offsets:l}=O({...e,srcBufferExtent:o,spacing:r}),p=D(l,s,i);n.gcsGrid={offsets:l,coefficients:p,spacing:r}}}return n}function O(e){let{projectedExtent:t,srcBufferExtent:r,pixelSize:n,datumTransformation:s,rasterTransform:i}=e,o=t.spatialReference,a=r.spatialReference;m();let u,{xmin:p,ymin:c,xmax:h,ymax:f}=t,g=B(a),d=null!=g&&(e.hasWrapAround||"gcs-shift"===i?.type),y=e.spacing||[32,32],x=y[0]*n.x,w=y[1]*n.y,A=1===y[0],v=Math.ceil((h-p)/x-.1/y[0])+ +!A,b=Math.ceil((f-c)/w-.1/y[1])+ +!A,C=R({cols:v,rows:b,xmin:p,ymax:f,xres:x,yres:w,inSR:o,outSR:a,datumTransformation:s,preferPE:y[0]<=4,usePixelCenter:A}),P=[],T=0,k=A?-1:NaN,{xmin:I,xmax:S,ymax:_,width:F,height:j}=r,Z=M(a,500),z=null!=g&&I>0&&S>g/2,G=N(o),E=null!=G&&G.poleLocation>0;for(let e=0;e<v;e++){let t=[];for(let r=0;r<b;r++){let n=C[e*b+r];if(d&&n[0]>S&&n[0]>g/2-Z?n[0]-=g:d&&0===e&&n[0]<0&&z&&!i&&(n[0]+=g),!n||isNaN(n[0])||isNaN(n[1]))P.push(k),P.push(k),t.push(null),T++;else{if(i){let e=i.inverseTransform(new l.A({x:n[0],y:n[1],spatialReference:a}));n=[e.x,e.y]}t.push(n),e>0&&d&&u[r]&&n[0]<u[r][0]&&(n[0]+=g,E&&n[0]>S&&n[0]>g&&(n[0]-=g)),P.push((n[0]-I)/F),P.push((_-n[1])/j)}}u=t}return{offsets:P,error:null,coefficients:null,outofBoundPointCount:T,spacing:y,size:A?[v,b]:[v-1,b-1]}}function D(e,t,r){let{cols:n,rows:s}=t,i=new Float32Array((n-1)*(s-1)*2*6),o=new Float32Array([-0,-1,1,-1,1,-0,1,-0,-0]),a=new Float32Array([-1,1,0,0,-1,1,1,0,0]);for(let t=0;t<n-1;t++){for(let r=0;r<s-1;r++){let l=t*s*2+2*r,u=e[l],p=e[l+1],c=e[l+2],h=e[l+3];l+=2*s;let m=e[l],f=e[l+1],g=e[l+2],d=e[l+3],y=0,x=12*(r*(n-1)+t);for(let e=0;e<3;e++)i[x++]=o[y++]*u+o[y++]*c+o[y++]*g;y=0;for(let e=0;e<3;e++)i[x++]=o[y++]*p+o[y++]*h+o[y++]*d;y=0;for(let e=0;e<3;e++)i[x++]=a[y++]*u+a[y++]*m+a[y++]*g;y=0;for(let e=0;e<3;e++)i[x++]=a[y++]*p+a[y++]*f+a[y++]*d}if(r)for(let e=0;e<i.length;e++)isNaN(i[e])&&(i[e]=-1)}return i}function V(e){let{spatialReference:t}=e,r=(0,h.Vp)(t);if(!r)return e;let[n,s]=r.valid,i=s-n,a=0;if(e.xmin<n){let t=n-e.xmin;a=Math.ceil(t/i)}else if(e.xmin>s){let t=e.xmin-s;a=-Math.ceil(t/i)}return new o.A({spatialReference:e.spatialReference,xmin:e.xmin+a*i,ymin:e.ymin,xmax:e.xmax+a*i,ymax:e.ymax})}function U(e,t,r){let{storageInfo:n,pixelSize:s}=t,o=0,a=!1,{pyramidResolutions:u}=n,p="mixed"===n.tileInfo.format?.toLowerCase()?Math.max(1,Math.min(3,n.tileInfo.dpi/96)):1,c=(e.x+e.y)/2/p;if(null!=u&&u.length){let e=u[u.length-1],n=(e.x+e.y)/2,p=(s.x+s.y)/2;if(c<=p)o=0;else if(c>=n)o=u.length,a=c/n>8;else{let e,t=p;for(let n=1;n<=u.length;n++){if(e=(u[n-1].x+u[n-1].y)/2,c<=e){c===e?o=n:"down"===r?(o=n-1,a=c/t>8):o="up"===r||c-t>e-c||c/t>2?n:n-1;break}t=e}}let h=0===o?s:u[o-1];return a&&Math.min(h.x,h.y)*(0,i.GA)(t.spatialReference)>19567&&(a=!1),{pyramidLevel:o,pyramidResolution:new l.A({x:h.x,y:h.y,spatialReference:t.spatialReference}),excessiveReading:a}}let h=Math.log(e.x/s.x)/Math.LN2,m=Math.log(e.y/s.y)/Math.LN2,f=t.storageInfo.maximumPyramidLevel||0;o="down"===r?Math.floor(Math.min(h,m)):"up"===r?Math.ceil(Math.max(h,m)):Math.round((h+m)/2),o<0?o=0:o>f&&(a=o>f+3,o=f);let g=2**o;return{pyramidLevel:o,pyramidResolution:new l.A({x:g*t.nativePixelSize.x,y:g*t.nativePixelSize.y,spatialReference:t.spatialReference}),excessiveReading:a}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6553,8305],{52106(e,t,i){i.d(t,{A:()=>w});var r,o,l=i(32198),s=i(40124),n=i(69540),a=i(51447),u=i(25482),p=i(53966),d=i(36708),g=i(24326),y=i(91429),h=i(12195),c=i(65864),m=i(50498),f=i(55156),b=i(60950),v=i(54339),M=i(94128),S=i(33910);const C=Symbol("meshGeometryHandles");function T(e){if(null==e)return null;let t={};for(let i in e){let r=e[i];r&&(t[i]=r.toJSON())}return 0===Object.keys(t).length?null:t}let w=class extends((0,n.OU)(u.o)){static{r=M.Z}static{o=this}constructor(e){super(e),this[r]=!0,this.distance=null,this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this.statisticsAggregatedIds=void 0,this._version=0,Object.defineProperty(this,"uid",{value:(0,g.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,a.eF)(p.A.getLogger(this),"Graphic",{version:"4.30"})}set aggregateGeometries(e){let t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){let t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){let t=this._get("geometry");t!==e&&(this._set("geometry",e),this._watchMeshGeometryChanges(),this._notifyLayer("geometry",t,e))}set popupTemplate(e){let t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){let t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){let t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new o({aggregateGeometries:this.aggregateGeometries,statisticsAggregatedIds:this.statisticsAggregatedIds,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;let t=(0,b.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;let i=this.origin&&"layer"in this.origin?this.origin.layer:null;for(let t of[i,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){let i=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",i,t,e)}else this.attributes={[e]:t}}getObjectId(){let e=(0,f.I)(this.origin);if(e)return(0,v.r)(this,e);let t=this.sourceLayer??this.layer;return t?(0,v.r)(this,t):null}getGlobalId(){let e=(0,f.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);let t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){let e={aggregateGeometries:T(this.aggregateGeometries),geometry:this.geometry?.toJSON()??null,symbol:this.symbol?.toJSON()??null,attributes:(0,h.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null};return this.statisticsAggregatedIds?.length&&(e.aggregateIds=[...this.statisticsAggregatedIds]),null!=this.distance&&(e.distance=this.distance),e}notifyMeshTransformChanged(e={}){let{geometry:t}=this;if("mesh"===t?.type){let i={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",i,i,e.action)}}_notifyLayer(e,t,i,r){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;let o={graphic:this,property:e,oldValue:t,newValue:i};"origin-transform"===e&&(o.action=r),"attributes"===e&&(o.attributeName=r),this.layer.graphicChanged(o)}_watchMeshGeometryChanges(){this.removeHandles(C);let e=this.geometry;"mesh"===e?.type&&this.addHandles([(0,d.z7)(()=>e.vertexSpace.origin?{localMatrix:e.transform?.localMatrix,origin:e.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{(this._lastMeshTransform.localMatrix!==e||this._lastMeshTransform.origin!==t)&&(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,d.z7)(()=>({vertexAttributes:e.vertexAttributes}),()=>{e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",e,e)},{equals:(e,t)=>e===t,sync:!0})],C)}};(0,l.Cg)([(0,y.MZ)({value:null,json:{read:function(e){if(!e)return null;let t={};for(let i in e){let r=(0,c.rS)(e[i]);r&&(t[i]=r)}return 0===Object.keys(t).length?null:t}}})],w.prototype,"aggregateGeometries",null),(0,l.Cg)([(0,y.MZ)({value:null})],w.prototype,"attributes",null),(0,l.Cg)([(0,y.MZ)({value:null,types:m.yR,json:{read:c.rS}})],w.prototype,"geometry",null),(0,l.Cg)([(0,y.MZ)()],w.prototype,"distance",void 0),(0,l.Cg)([(0,y.MZ)({type:Boolean})],w.prototype,"isAggregate",void 0),(0,l.Cg)([(0,y.MZ)({clonable:!1})],w.prototype,"layer",void 0),(0,l.Cg)([(0,y.MZ)({clonable:"reference"})],w.prototype,"origin",void 0),(0,l.Cg)([(0,y.MZ)({type:s.A,value:null})],w.prototype,"popupTemplate",null),(0,l.Cg)([(0,y.MZ)({clonable:"reference"})],w.prototype,"sourceLayer",void 0),(0,l.Cg)([(0,y.MZ)({json:{name:"aggregateIds",read:e=>e?.map(e=>Array.isArray(e)?JSON.stringify(e):e)}})],w.prototype,"statisticsAggregatedIds",void 0),(0,l.Cg)([(0,y.MZ)({value:null,types:S.Es})],w.prototype,"symbol",null),(0,l.Cg)([(0,y.MZ)({clonable:!1,json:{read:!1,write:!1}})],w.prototype,"_version",void 0),(0,l.Cg)([(0,y.MZ)({type:Boolean,value:!0})],w.prototype,"visible",null),w=o=(0,l.Cg)([(0,y.$K)("esri.Graphic")],w)},6797(e,t,i){i.d(t,{Ui:()=>g});var r=i(69622),o=i(7762),l=i(88620);const s=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function n(e){return e instanceof r.A}function a(e){return e instanceof o.A?Object.keys(e.items):n(e)?(0,l.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof o.A?e.items[t]:e[t]}function p(e){return e?e.declaredClass:null}function d(e,t){let i=e.diff;if(i&&"function"==typeof i)return i(e,t);let r=a(e),o=a(t);if(0===r.length&&0===o.length)return;if(!r.length||!o.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};let l=o.filter(e=>!r.includes(e)),g=r.filter(e=>!o.includes(e)),y=r.filter(i=>o.includes(i)&&u(e,i)!==u(t,i)).concat(l,g).sort(),h=p(e);if(h&&s.has(h)&&y.length)return{type:"complete",oldValue:e,newValue:t};let c,m=n(e)&&n(t);for(let r of y){let o,l=u(e,r),s=u(t,r);if((m||"function"!=typeof l&&"function"!=typeof s)&&l!==s&&(null!=l||null!=s)){if(i&&i[r]&&"function"==typeof i[r])o=i[r]?.(l,s);else if(l instanceof Date&&s instanceof Date){if(l.getTime()===s.getTime())continue;o={type:"complete",oldValue:l,newValue:s}}else o="object"==typeof l&&"object"==typeof s&&p(l)===p(s)?d(l,s):{type:"complete",oldValue:l,newValue:s};null!=o&&(null==c?c={type:"partial",diff:{[r]:o}}:c.diff[r]=o)}}return c}function g(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&p(e)!==p(t)?{type:"complete",oldValue:e,newValue:t}:d(e,t)}},76553(e,t,i){function r(e){return e&&"getAtOrigin"in e&&"originOf"in e}i.d(t,{H:()=>r})},55156(e,t,i){i.d(t,{I:()=>o});const r=Symbol("idFieldsProviderSymbol");function o(e){return(t=e)&&r in t?e[r]:void 0;var t}i.d(t,["e",0,r])},54339(e,t,i){function r(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{let i=[];for(let r of t.fieldNames)i.push(e.attributes[r]??null);return JSON.stringify(i)}}}function o(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];let i=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(i)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}i.d(t,{W:()=>r,r:()=>o})},52136(e,t,i){var r=i(32198),o=i(91429);i.d(t,["p",0,e=>{let t=e,i=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null==e?(this._clearOverride("apiKey"),this.clear("apiKey","user")):this._override("apiKey",e)}};return(0,r.Cg)([(0,o.MZ)({type:String})],i.prototype,"apiKey",null),i=(0,r.Cg)([(0,o.$K)("esri.layers.mixins.APIKeyMixin")],i),i}])},28032(e,t,i){i.d(t,{A:()=>a});var r=i(32198),o=i(69540),l=i(25482),s=i(91429),n=i(56400);let a=class extends((0,o.OU)(l.o)){constructor(e){super(e),this.creatorField=null,this.creationDateField=null,this.editorField=null,this.editDateField=null,this.realm=null,this.timeZone=null}};(0,r.Cg)([(0,s.MZ)()],a.prototype,"creatorField",void 0),(0,r.Cg)([(0,s.MZ)()],a.prototype,"creationDateField",void 0),(0,r.Cg)([(0,s.MZ)()],a.prototype,"editorField",void 0),(0,r.Cg)([(0,s.MZ)()],a.prototype,"editDateField",void 0),(0,r.Cg)([(0,s.MZ)()],a.prototype,"realm",void 0),(0,r.Cg)([(0,s.MZ)((0,n.P6)("dateFieldsTimeReference",!0))],a.prototype,"timeZone",void 0),a=(0,r.Cg)([(0,s.$K)("esri.layers.support.EditFieldsInfo")],a)},37352(e,t,i){i.d(t,{A:()=>a});var r,o=i(32198),l=i(7762),s=i(25482),n=i(91429);let a=r=class extends s.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new l.A}clone(){return new r({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,o.Cg)([(0,n.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"floorField",void 0),(0,o.Cg)([(0,n.MZ)({json:{read:!1,write:!1}})],a.prototype,"viewAllMode",void 0),(0,o.Cg)([(0,n.MZ)({json:{read:!1,write:!1}})],a.prototype,"viewAllLevelIds",void 0),a=r=(0,o.Cg)([(0,n.$K)("esri.layers.support.LayerFloorInfo")],a)},45067(e,t,i){i.d(t,{A:()=>p});var r=i(32198),o=i(69540),l=i(66552),s=i(25482),n=i(91429);const a=new l.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),u=new l.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let p=class extends((0,o.OU)(s.o)){constructor(e){super(e),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,r.Cg)([(0,n.MZ)({json:{read:a.read,write:a.write}})],p.prototype,"cardinality",void 0),(0,r.Cg)([(0,n.MZ)({json:{name:"catalogID"}})],p.prototype,"catalogId",void 0),(0,r.Cg)([(0,n.MZ)({json:{read:!0,write:!0}})],p.prototype,"composite",void 0),(0,r.Cg)([(0,n.MZ)({json:{read:!0,write:!0}})],p.prototype,"id",void 0),(0,r.Cg)([(0,n.MZ)({json:{read:!0,write:!0}})],p.prototype,"keyField",void 0),(0,r.Cg)([(0,n.MZ)({json:{read:!0,write:!0}})],p.prototype,"keyFieldInRelationshipTable",void 0),(0,r.Cg)([(0,n.MZ)({json:{read:!0,write:!0}})],p.prototype,"name",void 0),(0,r.Cg)([(0,n.MZ)({json:{read:!0,write:!0}})],p.prototype,"relatedTableId",void 0),(0,r.Cg)([(0,n.MZ)({json:{read:!0,write:!0}})],p.prototype,"relationshipTableId",void 0),(0,r.Cg)([(0,n.MZ)({json:{read:u.read,write:u.write}})],p.prototype,"role",void 0),p=(0,r.Cg)([(0,n.$K)("esri.layers.support.Relationship")],p)},41366(e,t,i){var r=i(32198),o=i(66552),l=i(53966),s=i(91429),n=i(93223);const a=(0,o.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",p="field";i.d(t,["K",0,e=>{let t=e,i=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType"),t=!!this.normalizationField,i=null!=this.normalizationTotal;return t||i?(e=t&&p||i&&u||null,t&&i&&l.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):(e===p||e===u)&&(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,r.Cg)([(0,s.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],i.prototype,"normalizationField",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],i.prototype,"normalizationMaxValue",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],i.prototype,"normalizationMinValue",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],i.prototype,"normalizationTotal",void 0),(0,r.Cg)([(0,n.e)(a,{name:"parameters.normalizationType"})],i.prototype,"normalizationType",null),i=(0,r.Cg)([(0,s.$K)("esri.rest.support.NormalizationBinParametersMixin")],i),i},"Q",0,a])},93470(e,t,i){const r=[252,146,31,255],o={type:"esriSMS",style:"esriSMSCircle",size:6,color:r,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},l={type:"esriSLS",style:"esriSLSSolid",width:.75,color:r};i.d(t,["Cb",0,o,"HW",0,{type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},"JR",0,[153,153,153,255],"JZ",0,{type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},"WR",0,{type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},"b6",0,{type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null},"fT",0,r,"nC",0,{type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},"yM",0,l])}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1348,1560,4549],{52106(e,t,r){r.d(t,{A:()=>M});var i,o,l=r(32198),n=r(40124),s=r(69540),a=r(51447),p=r(25482),u=r(53966),d=r(36708),c=r(24326),y=r(91429),g=r(12195),h=r(65864),m=r(50498),f=r(55156),v=r(60950),b=r(54339),w=r(94128),S=r(33910);const C=Symbol("meshGeometryHandles");function x(e){if(null==e)return null;let t={};for(let r in e){let i=e[r];i&&(t[r]=i.toJSON())}return 0===Object.keys(t).length?null:t}let M=class extends((0,s.OU)(p.o)){static{i=w.Z}static{o=this}constructor(e){super(e),this[i]=!0,this.distance=null,this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this.statisticsAggregatedIds=void 0,this._version=0,Object.defineProperty(this,"uid",{value:(0,c.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,a.eF)(u.A.getLogger(this),"Graphic",{version:"4.30"})}set aggregateGeometries(e){let t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){let t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){let t=this._get("geometry");t!==e&&(this._set("geometry",e),this._watchMeshGeometryChanges(),this._notifyLayer("geometry",t,e))}set popupTemplate(e){let t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){let t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){let t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new o({aggregateGeometries:this.aggregateGeometries,statisticsAggregatedIds:this.statisticsAggregatedIds,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;let t=(0,v.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;let r=this.origin&&"layer"in this.origin?this.origin.layer:null;for(let t of[r,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){let r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t}}getObjectId(){let e=(0,f.I)(this.origin);if(e)return(0,b.r)(this,e);let t=this.sourceLayer??this.layer;return t?(0,b.r)(this,t):null}getGlobalId(){let e=(0,f.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);let t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){let e={aggregateGeometries:x(this.aggregateGeometries),geometry:this.geometry?.toJSON()??null,symbol:this.symbol?.toJSON()??null,attributes:(0,g.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null};return this.statisticsAggregatedIds?.length&&(e.aggregateIds=[...this.statisticsAggregatedIds]),null!=this.distance&&(e.distance=this.distance),e}notifyMeshTransformChanged(e={}){let{geometry:t}=this;if("mesh"===t?.type){let r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,i){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;let o={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(o.action=i),"attributes"===e&&(o.attributeName=i),this.layer.graphicChanged(o)}_watchMeshGeometryChanges(){this.removeHandles(C);let e=this.geometry;"mesh"===e?.type&&this.addHandles([(0,d.z7)(()=>e.vertexSpace.origin?{localMatrix:e.transform?.localMatrix,origin:e.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{(this._lastMeshTransform.localMatrix!==e||this._lastMeshTransform.origin!==t)&&(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,d.z7)(()=>({vertexAttributes:e.vertexAttributes}),()=>{e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",e,e)},{equals:(e,t)=>e===t,sync:!0})],C)}};(0,l.Cg)([(0,y.MZ)({value:null,json:{read:function(e){if(!e)return null;let t={};for(let r in e){let i=(0,h.rS)(e[r]);i&&(t[r]=i)}return 0===Object.keys(t).length?null:t}}})],M.prototype,"aggregateGeometries",null),(0,l.Cg)([(0,y.MZ)({value:null})],M.prototype,"attributes",null),(0,l.Cg)([(0,y.MZ)({value:null,types:m.yR,json:{read:h.rS}})],M.prototype,"geometry",null),(0,l.Cg)([(0,y.MZ)()],M.prototype,"distance",void 0),(0,l.Cg)([(0,y.MZ)({type:Boolean})],M.prototype,"isAggregate",void 0),(0,l.Cg)([(0,y.MZ)({clonable:!1})],M.prototype,"layer",void 0),(0,l.Cg)([(0,y.MZ)({clonable:"reference"})],M.prototype,"origin",void 0),(0,l.Cg)([(0,y.MZ)({type:n.A,value:null})],M.prototype,"popupTemplate",null),(0,l.Cg)([(0,y.MZ)({clonable:"reference"})],M.prototype,"sourceLayer",void 0),(0,l.Cg)([(0,y.MZ)({json:{name:"aggregateIds",read:e=>e?.map(e=>Array.isArray(e)?JSON.stringify(e):e)}})],M.prototype,"statisticsAggregatedIds",void 0),(0,l.Cg)([(0,y.MZ)({value:null,types:S.Es})],M.prototype,"symbol",null),(0,l.Cg)([(0,y.MZ)({clonable:!1,json:{read:!1,write:!1}})],M.prototype,"_version",void 0),(0,l.Cg)([(0,y.MZ)({type:Boolean,value:!0})],M.prototype,"visible",null),M=o=(0,l.Cg)([(0,y.$K)("esri.Graphic")],M)},46140(e,t,r){r.d(t,{A:()=>o});var i=r(49186);class o{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){let t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new o(this.major,this.minor,this._context)}static parse(e,t=""){let[r,l]=e.split("."),n=/^\s*\d+\s*$/;if(!r?.match||!n.test(r)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e})}if(!l?.match||!n.test(l)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e})}return new o(parseInt(r,10),parseInt(l,10),t)}}},6797(e,t,r){r.d(t,{Ui:()=>c});var i=r(69622),o=r(7762),l=r(88620);const n=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function s(e){return e instanceof i.A}function a(e){return e instanceof o.A?Object.keys(e.items):s(e)?(0,l.oY)(e).keys():e?Object.keys(e):[]}function p(e,t){return e instanceof o.A?e.items[t]:e[t]}function u(e){return e?e.declaredClass:null}function d(e,t){let r=e.diff;if(r&&"function"==typeof r)return r(e,t);let i=a(e),o=a(t);if(0===i.length&&0===o.length)return;if(!i.length||!o.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};let l=o.filter(e=>!i.includes(e)),c=i.filter(e=>!o.includes(e)),y=i.filter(r=>o.includes(r)&&p(e,r)!==p(t,r)).concat(l,c).sort(),g=u(e);if(g&&n.has(g)&&y.length)return{type:"complete",oldValue:e,newValue:t};let h,m=s(e)&&s(t);for(let i of y){let o,l=p(e,i),n=p(t,i);if((m||"function"!=typeof l&&"function"!=typeof n)&&l!==n&&(null!=l||null!=n)){if(r&&r[i]&&"function"==typeof r[i])o=r[i]?.(l,n);else if(l instanceof Date&&n instanceof Date){if(l.getTime()===n.getTime())continue;o={type:"complete",oldValue:l,newValue:n}}else o="object"==typeof l&&"object"==typeof n&&u(l)===u(n)?d(l,n):{type:"complete",oldValue:l,newValue:n};null!=o&&(null==h?h={type:"partial",diff:{[i]:o}}:h.diff[i]=o)}}return h}function c(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&u(e)!==u(t)?{type:"complete",oldValue:e,newValue:t}:d(e,t)}},55156(e,t,r){r.d(t,{I:()=>o});const i=Symbol("idFieldsProviderSymbol");function o(e){return(t=e)&&i in t?e[i]:void 0;var t}r.d(t,["e",0,i])},54339(e,t,r){function i(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{let r=[];for(let i of t.fieldNames)r.push(e.attributes[i]??null);return JSON.stringify(r)}}}function o(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];let r=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(r)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}r.d(t,{W:()=>i,r:()=>o})},52136(e,t,r){var i=r(32198),o=r(91429);r.d(t,["p",0,e=>{let t=e,r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null==e?(this._clearOverride("apiKey"),this.clear("apiKey","user")):this._override("apiKey",e)}};return(0,i.Cg)([(0,o.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,i.Cg)([(0,o.$K)("esri.layers.mixins.APIKeyMixin")],r),r}])},32756(e,t,r){r.d(t,{Rr:()=>s});var i=r(32198),o=r(93637),l=r(91429),n=r(91880);function s(e,t,r){if(!e)return null;let i=e.find(e=>!!e.field);if(!i)return null;let o=new n.A;return o.read(i,r),[o]}const a={type:[n.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:s},write:{writer:function(e,t,r,i){let l=e.find(e=>!!e.field);l&&(0,o.sM)(r,[l.toJSON()],t)}}}};r.d(t,["fY",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,l.MZ)(a)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,l.$K)("esri.layers.mixins.OrderedLayer")],r),r},"ne",0,a])},28032(e,t,r){r.d(t,{A:()=>a});var i=r(32198),o=r(69540),l=r(25482),n=r(91429),s=r(56400);let a=class extends((0,o.OU)(l.o)){constructor(e){super(e),this.creatorField=null,this.creationDateField=null,this.editorField=null,this.editDateField=null,this.realm=null,this.timeZone=null}};(0,i.Cg)([(0,n.MZ)()],a.prototype,"creatorField",void 0),(0,i.Cg)([(0,n.MZ)()],a.prototype,"creationDateField",void 0),(0,i.Cg)([(0,n.MZ)()],a.prototype,"editorField",void 0),(0,i.Cg)([(0,n.MZ)()],a.prototype,"editDateField",void 0),(0,i.Cg)([(0,n.MZ)()],a.prototype,"realm",void 0),(0,i.Cg)([(0,n.MZ)((0,s.P6)("dateFieldsTimeReference",!0))],a.prototype,"timeZone",void 0),a=(0,i.Cg)([(0,n.$K)("esri.layers.support.EditFieldsInfo")],a)},29005(e,t,r){r.d(t,{A:()=>p});var i=r(32198),o=r(69540),l=r(66552),n=r(25482),s=r(91429);const a=new l.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let p=class extends((0,o.OU)(n.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],p.prototype,"description",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:a.read,write:a.write}})],p.prototype,"drawingTool",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],p.prototype,"prototype",void 0),(0,i.Cg)([(0,s.MZ)({json:{write:!0}})],p.prototype,"thumbnail",void 0),p=(0,i.Cg)([(0,s.$K)("esri.layers.support.FeatureTemplate")],p)},33143(e,t,r){r.d(t,{A:()=>d});var i=r(32198),o=r(69540),l=r(25482),n=r(91429),s=r(8631),a=r(29005),p=r(36005),u=r(43937);let d=class extends((0,o.OU)(l.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){let t={};for(let r of Object.keys(e))t[r]=(0,s.r)(e[r]);return t}writeDomains(e,t){let r={};for(let t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i.Cg)([(0,n.MZ)({json:{write:!0}})],d.prototype,"id",void 0),(0,i.Cg)([(0,n.MZ)({json:{write:!0}})],d.prototype,"name",void 0),(0,i.Cg)([(0,n.MZ)({json:{write:!0}})],d.prototype,"domains",void 0),(0,i.Cg)([(0,p.w)("domains")],d.prototype,"readDomains",null),(0,i.Cg)([(0,u.K)("domains")],d.prototype,"writeDomains",null),(0,i.Cg)([(0,n.MZ)({type:[a.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,i.Cg)([(0,n.$K)("esri.layers.support.FeatureType")],d)},46499(e,t,r){r.d(t,{A:()=>M});var i,o,l=r(32198),n=(r(44208),r(66552)),s=r(25482),a=r(4718),p=r(90629),u=r(91429),d=r(90360),c=r(73913),y=r(32730),g=r(77548),h=r(59868),m=r(73838),f=r(33910),v=r(36005),b=r(43937);const w=new n.J({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"},{ignoreUnknown:!0});function S(e,t,r){return{enabled:!(0,g.TU)(r?.layer)}}function C(e){return!e||"service"!==e.origin&&"map-image"!==e.layer?.type}function x(e){return!!function(e){return"map-image"===e?.type}(e)&&!!e.capabilities?.exportMap?.supportsArcadeExpressionForLabeling}let M=class extends s.o{static{i=y.vK}static{o=this}static evaluateWhere(e,t){let r=(e,t,r)=>{switch(t){case"=":return e==r;case"<>":return e!=r;case">":return e>r;case">=":return e>=r;case"<":return e<r;case"<=":return e<=r}return!1};try{if(null==e)return!0;let i=e.split(" ");if(3===i.length)return r(t[i[0]],i[1],i[2]);if(7===i.length){let e=r(t[i[0]],i[1],i[2]),o=i[3],l=r(t[i[4]],i[5],i[6]);switch(o){case"AND":return e&&l;case"OR":return e||l}}return!1}catch{}}constructor(e){super(e),this[i]=!0,this.type="label",this.name=null,this.allowOverrun=!1,this.deconflictionStrategy="static",this.labelExpression=null,this.labelExpressionInfo=null,this.labelPlacement=null,this.offsetDistance=0,this.labelPosition="curved",this.maxScale=0,this.minScale=0,this.repeatLabel=!0,this.symbol=h.Hk,this.useCodedValues=void 0,this.where=null}readLabelExpression(e,t){let r=t.labelExpressionInfo;if(!r||!r.value&&!r.expression)return e}writeLabelExpression(e,t,r){if(this.labelExpressionInfo)if(null!=this.labelExpressionInfo.value)e=(0,y.D3)(this.labelExpressionInfo.value);else if(null!=this.labelExpressionInfo.expression){let t=(0,y.tH)(this.labelExpressionInfo.expression);t&&(e="["+t+"]")}null!=e&&(t[r]=e)}writeLabelExpressionInfo(e,t,r,i){if(null==e&&null!=this.labelExpression&&C(i))e=new c.A({expression:this.getLabelExpressionArcade()});else if(!e)return;let o=e.toJSON(i);o.expression&&(t[r]=o)}writeMaxScale(e,t){(e||this.minScale)&&(t.maxScale=e)}writeMinScale(e,t){(e||this.maxScale)&&(t.minScale=e)}get repeatLabelDistance(){return this._get("repeatLabelDistance")}set repeatLabelDistance(e){this._set("repeatLabelDistance",e)}getLabelExpression(){return(0,y.XJ)(this)}getLabelExpressionArcade(){return(0,y.BI)(this)}getLabelExpressionSingleField(){return(0,y.rU)(this)}hash(){return JSON.stringify(this)}clone(){return new o({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:(0,a.o8)(this.labelExpressionInfo),labelPosition:this.labelPosition,labelPlacement:this.labelPlacement,offsetDistance:this.offsetDistance,maxScale:this.maxScale,minScale:this.minScale,name:this.name,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,symbol:(0,a.o8)(this.symbol),where:this.where,useCodedValues:this.useCodedValues})}};(0,l.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],M.prototype,"name",void 0),(0,l.Cg)([(0,u.MZ)({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1},"portal-item":{default:!1,write:{overridePolicy:S}}}}})],M.prototype,"allowOverrun",void 0),(0,l.Cg)([(0,u.MZ)({type:String,json:{write:!0,default:"static",origins:{"web-scene":{write:!1},"portal-item":{default:"static",write:{overridePolicy:S}}}}})],M.prototype,"deconflictionStrategy",void 0),(0,l.Cg)([(0,u.MZ)({type:String,json:{write:{overridePolicy(e,t,r){return this.labelExpressionInfo&&"service"===r?.origin&&x(r.layer)?{enabled:!1}:{allowNull:!0}}}}})],M.prototype,"labelExpression",void 0),(0,l.Cg)([(0,v.w)("labelExpression")],M.prototype,"readLabelExpression",null),(0,l.Cg)([(0,b.K)("labelExpression")],M.prototype,"writeLabelExpression",null),(0,l.Cg)([(0,u.MZ)({type:c.A,json:{write:{overridePolicy:(e,t,r)=>function(e){return C(e)||x(e?.layer)}(r)?{allowNull:!0}:{enabled:!1}}}})],M.prototype,"labelExpressionInfo",void 0),(0,l.Cg)([(0,b.K)("labelExpressionInfo")],M.prototype,"writeLabelExpressionInfo",null),(0,l.Cg)([(0,u.MZ)({type:w.apiValues,json:{type:w.jsonValues,read:w.read,write:w.write}})],M.prototype,"labelPlacement",void 0),(0,l.Cg)([(0,u.MZ)({type:Number,json:{read:!0,write:!0,default:0,origins:{"web-scene":{write:!1}}}})],M.prototype,"offsetDistance",void 0),(0,l.Cg)([(0,u.MZ)({type:["curved","parallel"],json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],M.prototype,"labelPosition",void 0),(0,l.Cg)([(0,u.MZ)({type:Number})],M.prototype,"maxScale",void 0),(0,l.Cg)([(0,b.K)("maxScale")],M.prototype,"writeMaxScale",null),(0,l.Cg)([(0,u.MZ)({type:Number})],M.prototype,"minScale",void 0),(0,l.Cg)([(0,b.K)("minScale")],M.prototype,"writeMinScale",null),(0,l.Cg)([(0,u.MZ)({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:S}}}}})],M.prototype,"repeatLabel",void 0),(0,l.Cg)([(0,u.MZ)({type:Number,cast:p.cr,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:S}}}}})],M.prototype,"repeatLabelDistance",null),(0,l.Cg)([(0,u.MZ)({types:f.em,json:{types:f.em,origins:{"portal-item":{types:f.em,read:{reader:(0,d.C)({types:f.em})},default:null},"web-scene":{types:f.Rv,read:{reader:(0,d.C)({types:f.Rv})},write:m.oO,default:null}},write:m.oO,default:null}})],M.prototype,"symbol",void 0),(0,l.Cg)([(0,u.MZ)({type:Boolean,json:{write:!0}})],M.prototype,"useCodedValues",void 0),(0,l.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],M.prototype,"where",void 0),M=o=(0,l.Cg)([(0,u.$K)("esri.layers.support.LabelClass")],M)},73913(e,t,r){r.d(t,{A:()=>u});var i,o=r(32198),l=r(25482),n=r(91429),s=r(32730),a=r(36005),p=r(43937);let u=class extends l.o{static{i=this}constructor(e){super(e),this.name=null,this.expression=null,this.title=null,this.value=null}readExpression(e,t){return t.value?(0,s.mX)(t.value):e}writeExpression(e,t,r){null!=this.value&&(e=(0,s.mX)(this.value)),null!=e&&(t[r]=e)}clone(){return new i({name:this.name,expression:this.expression,title:this.title,value:this.value})}};(0,o.Cg)([(0,n.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],u.prototype,"name",void 0),(0,o.Cg)([(0,n.MZ)({type:String,json:{write:{writerEnsuresNonNull:!0}}})],u.prototype,"expression",void 0),(0,o.Cg)([(0,a.w)("expression",["expression","value"])],u.prototype,"readExpression",null),(0,o.Cg)([(0,p.K)("expression")],u.prototype,"writeExpression",null),(0,o.Cg)([(0,n.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],u.prototype,"title",void 0),(0,o.Cg)([(0,n.MZ)({json:{read:!1,write:!1}})],u.prototype,"value",void 0),u=i=(0,o.Cg)([(0,n.$K)("esri.layers.support.LabelExpressionInfo")],u)},37352(e,t,r){r.d(t,{A:()=>a});var i,o=r(32198),l=r(7762),n=r(25482),s=r(91429);let a=i=class extends n.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new l.A}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,o.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"floorField",void 0),(0,o.Cg)([(0,s.MZ)({json:{read:!1,write:!1}})],a.prototype,"viewAllMode",void 0),(0,o.Cg)([(0,s.MZ)({json:{read:!1,write:!1}})],a.prototype,"viewAllLevelIds",void 0),a=i=(0,o.Cg)([(0,s.$K)("esri.layers.support.LayerFloorInfo")],a)},91880(e,t,r){r.d(t,{A:()=>p});var i,o=r(32198),l=r(66552),n=r(25482),s=r(91429);const a=new l.J({asc:"ascending",desc:"descending"});let p=class extends n.o{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,o.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,o.Cg)([(0,s.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],p.prototype,"valueExpression",void 0),(0,o.Cg)([(0,s.MZ)({type:a.apiValues,json:{type:a.jsonValues,read:a.read,write:a.write}})],p.prototype,"order",void 0),p=i=(0,o.Cg)([(0,s.$K)("esri.layers.support.OrderByInfo")],p)},45067(e,t,r){r.d(t,{A:()=>u});var i=r(32198),o=r(69540),l=r(66552),n=r(25482),s=r(91429);const a=new l.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),p=new l.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let u=class extends((0,o.OU)(n.o)){constructor(e){super(e),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,i.Cg)([(0,s.MZ)({json:{read:a.read,write:a.write}})],u.prototype,"cardinality",void 0),(0,i.Cg)([(0,s.MZ)({json:{name:"catalogID"}})],u.prototype,"catalogId",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],u.prototype,"composite",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],u.prototype,"id",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],u.prototype,"keyField",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],u.prototype,"keyFieldInRelationshipTable",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],u.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],u.prototype,"relatedTableId",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:!0,write:!0}})],u.prototype,"relationshipTableId",void 0),(0,i.Cg)([(0,s.MZ)({json:{read:p.read,write:p.write}})],u.prototype,"role",void 0),u=(0,i.Cg)([(0,s.$K)("esri.layers.support.Relationship")],u)},41560(e,t,r){r.d(t,{Ch:()=>n,mW:()=>l});var i=r(34727),o=r(39516);function l(e,t){return{...t,filterMode:e.mode}}function n(e,t,r){let l=function(e){if("manual"===p(e))return null;let t=[-1/0,1/0];for(let{minScale:r,maxScale:i}of e.filters)t[0]=Math.max(t[0],u(r)),t[1]=Math.min(t[1],d(i));return t}(e);if(l&&((0,i.gg)(t,l[0])||(0,i.ZH)(r,l[1])))return"";let n=Array.from(s(e,t,r)),a=function(e,t,r){if(0===e.length)return!0;let o=u(e.at(0)?.minScale),l=d(e.at(-1)?.maxScale);if((0,i.ZH)(o,t)||(0,i.gg)(l,r))return!0;for(let t=0;t<e.length-1;t++){let r=e[t],o=e[t+1];if((0,i.ZH)(u(o.minScale),d(r.maxScale)))return!0}return!1}(n,t,r)?"1=1":n.map(e=>e.where||"1=1").reduce((e,t)=>(0,o.IW)(e,t),"");return a&&"1=1"!==a?a:""}function*s(e,t,r){if("manual"===p(e)){let t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(let i of e.filters)a(i.minScale,i.maxScale,t,r)&&(yield i)}}function a(e,t,r,o){return e=u(e),r=u(r),t=d(t),!(!(0,i.Sp)(r,e)&&(o??r)>e||(0,i.Hx)(t,r)||void 0!==o&&(0,i.Sp)(o,e))}function p(e){return"mode"in e?e.mode:e.filterMode}function u(e){return e||1/0}function d(e){return e||0}},39383(e,t,r){r.d(t,{w:()=>a,z:()=>d});var i=r(49186),o=r(53966),l=r(46499);const n=()=>o.A.getLogger("esri.layers.support.labelingInfo"),s=/\[([^[\]]+)\]/gi;function a(e,t,r){return e?e.map(e=>{let i=new l.A;if(i.read(e,r),i.labelExpression){let e=t.fields||t.layerDefinition?.fields||this.fields;i.labelExpression=i.labelExpression.replaceAll(s,(t,r)=>`[${function(e,t){if(!t)return e;let r=e.toLowerCase();for(let e=0;e<t.length;e++){let i=t[e].name;if(i.toLowerCase()===r)return i}return e}(r,e)}]`)}return i}):null}const p=["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],u={esriGeometryPoint:p,esriGeometryMultiPatch:["always-horizontal"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along","above-along","below-along"],esriGeometryMultipoint:p,esriGeometryEnvelope:null};function d(e,t){let r=[];for(let o of e){let e=o.labelPlacement,l=u[t];if(!o.symbol)return n().warn("No ILabelClass symbol specified."),[];if(!l)return n().error(new i.A("labeling:unsupported-geometry-type",`Unable to create labels for layer, geometry type '${t}' is not supported`)),[];if(l.includes(e))r.push(o);else{let i=l[0];e&&n().warn(`Found invalid label placement type ${e} for ${t}. Defaulting to ${i}`);let s=o.clone();s.labelPlacement=i,r.push(s)}}return r}},73681(e,t,r){r.d(t,{n:()=>a});var i=r(49186),o=r(53966),l=r(46140),n=r(95466),s=r(55674);class a{static async from(e,t,r){let n=e.dictionary_version?l.A.parse(e.dictionary_version):null,u=new Set(e.itemsNames),d={};if(t)for(let e in t)d[e]=t[e];if(e.authoringInfo.configuration)for(let t of e.authoringInfo.configuration)d.hasOwnProperty(t.name)||(d[t.name]=t.value);let c=new Set(e.authoringInfo.symbol);for(let e of Object.keys(r))c.delete(e);c.size&&o.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:c});let y=await(0,s.xR)(e.expression,null,d);if(!y)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");let g=!n||!n.greaterEqual(4,0);g&&o.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:n});let h=new p(r,g);return new a(g,u,y,h)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){o.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new n.A(e);let t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new n.A(t)}}class p extends s.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){let t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);let t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},22671(e,t,r){r.d(t,{A:()=>v});var i,o=r(32198),l=r(52106),n=r(66552),s=r(25482),a=r(4718),p=r(91429),u=r(16930),d=r(60408),c=r(65864),y=r(50498),g=r(20437),h=r(36005),m=r(43937);const f=new n.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=i=class extends s.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,l.A)}writeGeometryType(e,t,r,i){if(e)return void f.write(e,t,r,i);let{features:o}=this;if(o)for(let e of o)if(null!=e?.geometry)return void f.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;let r=!!e.spatialReference,i=(0,c.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=u.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());let{features:r}=this;if(r)for(let e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,a.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){let t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){let i=t.features[r];i.geometry&&=(e?.[r])?.toJSON()||i.geometry}return t}quantize(e){let{scale:[t,r],translate:[i,o]}=e,l=this.features,n=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((o-e)/r));for(let e=0,t=l.length;e<t;e++)n?.(l[e].geometry)||(l.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){let{geometryType:e,features:t,transform:r}=this;if(!r)return this;let{translate:[i,o],scale:[l,n]}=r,s=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){let{translate:[,,e],scale:[,,t]}=r;s=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){let{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}let p=this._getHydrationFunction(e,e=>e*l+i,e=>o-e*n,s,a);for(let{geometry:e}of t)null!=e&&p&&p(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){let i=u.A.fromJSON(t.spatialReference),o=[];for(let t=0;t<e.length;t++){let l=e[t],n=r.fromJSON(l),s=l.geometry?.spatialReference;null!=n.geometry&&!s&&(n.geometry.spatialReference=i);let a=l.aggregateGeometries,p=n.aggregateGeometries;if(a&&null!=p)for(let e in p){let t=p[e],r=a[e]?.spatialReference;null!=t&&!r&&(t.spatialReference=i)}o.push(n)}return o}_quantizePoints(e,t,r){let i,o,l=[];for(let n=0,s=e.length;n<s;n++){let s=e[n];if(n>0){let e=t(s[0]),n=r(s[1]);(e!==i||n!==o)&&(l.push([e-i,n-o]),i=e,o=n)}else i=t(s[0]),o=r(s[1]),l.push([i,o])}return l.length>0?l:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{let i=(0,d.Bi)(e)?e.rings:e.paths,o=[];for(let e=0,l=i.length;e<l;e++){let l=i[e],n=this._quantizePoints(l,t,r);n&&o.push(n)}return o.length>0?((0,d.Bi)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{let i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,o){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{let l,n,s=(0,d.Bi)(e)?e.rings:e.paths;for(let e=0,i=s.length;e<i;e++){let i=s[e];for(let e=0,o=i.length;e<o;e++){let o=i[e];e>0?(l+=o[0],n+=o[1]):(l=o[0],n=o[1]),o[0]=t(l),o[1]=r(n)}}if(i&&o)for(let e=0,t=s.length;e<t;e++){let t=s[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(r[2]),r[3]=o(r[3])}}else if(i)for(let e=0,t=s.length;e<t;e++){let t=s[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(r[2])}}else if(o)for(let e=0,t=s.length;e<t;e++){let t=s[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=o(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{let l,n,s=e.points;for(let e=0,i=s.length;e<i;e++){let i=s[e];e>0?(l+=i[0],n+=i[1]):(l=i[0],n=i[1]),i[0]=t(l),i[1]=r(n)}if(i&&o)for(let e=0,t=s.length;e<t;e++){let t=s[e];t[2]=i(t[2]),t[3]=o(t[3])}else if(i)for(let e=0,t=s.length;e<t;e++){let t=s[e];t[2]=i(t[2])}else if(o)for(let e=0,t=s.length;e<t;e++){let t=s[e];t[2]=o(t[2])}}:null}};(0,o.Cg)([(0,p.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,o.Cg)([(0,p.MZ)({type:[l.A],json:{write:!0}})],v.prototype,"features",void 0),(0,o.Cg)([(0,h.w)("features")],v.prototype,"readFeatures",null),(0,o.Cg)([(0,p.MZ)({type:[g.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,o.Cg)([(0,p.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:f.read}}})],v.prototype,"geometryType",void 0),(0,o.Cg)([(0,m.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,o.Cg)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,o.Cg)([(0,p.MZ)({types:y.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,o.Cg)([(0,h.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,o.Cg)([(0,p.MZ)({type:u.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,o.Cg)([(0,m.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,o.Cg)([(0,p.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=i=(0,o.Cg)([(0,p.$K)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0},41366(e,t,r){var i=r(32198),o=r(66552),l=r(53966),n=r(91429),s=r(93223);const a=(0,o.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),p="percent-of-total",u="field";r.d(t,["K",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType"),t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&u||r&&p||null,t&&r&&l.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):(e===u||e===p)&&(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i.Cg)([(0,n.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],r.prototype,"normalizationField",void 0),(0,i.Cg)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],r.prototype,"normalizationMaxValue",void 0),(0,i.Cg)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],r.prototype,"normalizationMinValue",void 0),(0,i.Cg)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],r.prototype,"normalizationTotal",void 0),(0,i.Cg)([(0,s.e)(a,{name:"parameters.normalizationType"})],r.prototype,"normalizationType",null),r=(0,i.Cg)([(0,n.$K)("esri.rest.support.NormalizationBinParametersMixin")],r),r},"Q",0,a])},93470(e,t,r){const i=[252,146,31,255],o={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},l={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i};r.d(t,["Cb",0,o,"HW",0,{type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},"JR",0,[153,153,153,255],"JZ",0,{type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},"WR",0,{type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},"b6",0,{type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null},"fT",0,i,"nC",0,{type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},"yM",0,l])}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7548],{69540(e,t,n){var r=n(32198),i=n(69622),s=(n(44208),n(4718)),o=(n(53966),n(97768)),l=n(88620),a=n(64108);const h=Symbol("ClonableMixin"),u=e=>{var t;let n=e,i=class extends n{constructor(){super(...arguments),this[t]=!0}static{t=h}clone(e){let t=(0,l.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");let n=t.metadata,r=t.store,i={},a=new Map;for(let t in n){let o=n[t],l=r?.originOf(t),h=o.clonable;if(o.readOnly||!1===h||7!==l&&0!==l&&5!==l&&4!==l)continue;let u=this[t],c=null;if("function"==typeof h)c=h(u,e);else if("reference"===h)c=u;else if(c=(0,s.TU)(u,e),null!=u&&null==c)continue;0===l?a.set(t,c):i[t]=c}let h=new(0,Object.getPrototypeOf(this).constructor)(i);if(a.size){let e=(0,l.oY)(h)?.store;if(e)for(let[t,n]of a)e.set(t,n,0)}return h}};return i=(0,r.Cg)([(0,a.$)("esri.core.Clonable")],i),i},c=u(i.A);n.d(t,["OU",0,u,"Pw",0,c])},7762(e,t,n){var r,i=n(32198),s=n(98291),o=n(4576),l=n(65529),a=n(36563),h=n(4718),u=n(53966),c=n(93687),d=n(76030),m=n(78888),g=n(62788),f=n(10107),y=n(7695),p=n(64108),b=n(95488),v=n(12195);class _{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}}class w{constructor(e,t,n,r,i){this.target=e,this.added=t,this.removed=n,this.start=r,this.deleteCount=i}}const C=new c.A(()=>new _,void 0,e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1});function T(e){e&&"object"==typeof e&&"destroy"in e&&"function"==typeof e.destroy&&e.destroy()}function A(e){return e?e instanceof k?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function S(e){if(e?.length)return e[0]}function M(e,t,n,r){let i=Math.min(e.length-n,t.length-r),s=0;for(;s<i&&e[n+s]===t[r+s];)s++;return s}function D(e,t,n,r){t&&t.forEach((t,i,s)=>{e.push(t),D(e,n.call(r,t,i,s),n,r)})}const L=new Set,E=new Set,x=new Set,O=new Map;let Z=0,k=r=class extends l.nJ{static ofType(e){if(!e)return r;if(O.has(e))return O.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(let n in e.typeMap){let r=e.typeMap[n].prototype.declaredClass;t?t+=` | ${r}`:t=r}let n=class extends r{};return(0,i.Cg)([(0,y.u)({Type:e,ensureType:"function"==typeof e?(0,m.dp)(e):(0,m.aq)(e)})],n.prototype,"itemType",void 0),n=(0,i.Cg)([(0,p.$)(`esri.core.Collection<${t}>`)],n),O.set(e,n),n}static isCollection(e){return null!=e&&e instanceof r}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._updating=!1,this._timer=null,this._observable=new b.I,this._length=0,this._items=[],Object.defineProperty(this,"uid",{value:Z++})}normalizeCtorArgs(e){return e?(0,o.yc)(e)||e instanceof r?{items:e}:e:{}}destroy(){this._removeAllRaw(),this._timer&&this._timer.remove(),super.destroy(),this._notifications=null}*[Symbol.iterator](){yield*this.items}get length(){return this._length}set length(e){e>this._length?u.A.getLogger(this).error("#length=","Cannot increase the length of the collection by assigning to the length property."):this.splice(e,Math.max(0,this._length-e))}get items(){return(0,g.gc)(this._observable),this._items}set items(e){this._emitBeforeChanges(1)||(this._splice(0,this.length,A(e)),this._emitAfterChanges(1))}hasEventListener(e){return!this.destroyed&&("change"===e?this._chgListeners.length>0:super.hasEventListener(e))}on(e,t){if(this.destroyed)return(0,a.hA)();if("change"===e){let e=this._chgListeners,n={removed:!1,callback:t};return e.push(n),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),(0,a.hA)(()=>{n.removed=!0,e.splice(e.indexOf(n),1)})}return super.on(e,t)}once(e,t){let n="deref"in t?()=>t.deref():()=>t,r=this.on(e,e=>{n()?.call(null,e),r.remove()});return r}add(e,t){if((0,g.gc)(this._observable),this._emitBeforeChanges(1))return this;let n=this.getNextIndex(t??null);return this._splice(n,0,[e]),this._emitAfterChanges(1),this}addMany(e,t=this._items.length){if((0,g.gc)(this._observable),!e?.length||this._emitBeforeChanges(1))return this;let n=this.getNextIndex(t);return this._splice(n,0,A(e)),this._emitAfterChanges(1),this}at(e){if((0,g.gc)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,g.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return[];let e=this._removeAllRaw();return this._emitAfterChanges(2),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,g.gc)(this._observable),this._createNewInstance({items:this._items.map(h.o8)})}concat(...e){(0,g.gc)(this._observable);let t=e.map(A);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,g.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;let n=this._splice(0,this.length),r=n.length;for(let i=0;i<r;i++)e.call(t,n[i],i,n);this._emitAfterChanges(2)}destroyAll(){this.drain(T)}destroyMany(e){let t=this.removeMany(e);return t.forEach(T),t}every(e,t){return(0,g.gc)(this._observable),this._items.every(e,t)}filter(e,t){(0,g.gc)(this._observable);let n=2===arguments.length?this._items.filter(e,t):this._items.filter(e);return this._createNewInstance({items:n})}find(e,t){return(0,g.gc)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,g.gc)(this._observable),this._items.findIndex(e,t)}findLast(e,t){return(0,g.gc)(this._observable),this._items.findLast(e,t)}findLastIndex(e,t){return(0,g.gc)(this._observable),this._items.findLastIndex(e,t)}flatten(e,t){(0,g.gc)(this._observable);let n=[];return D(n,this,e,t),new r(n)}forEach(e,t){return(0,g.gc)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,g.gc)(this._observable),this._items[e]}getNextIndex(e){(0,g.gc)(this._observable);let t=this.length;return e??=t,e<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,g.gc)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,g.gc)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,g.gc)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,g.gc)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,g.gc)(this._observable);let n=this._items.map(e,t);return new r({items:n})}reorder(e,t=this.length-1){(0,g.gc)(this._observable);let n=this.indexOf(e);if(-1!==n){if(t<0?t=0:t>=this.length&&(t=this.length-1),n!==t){if(this._emitBeforeChanges(4))return e;this._splice(n,1),this._splice(t,0,[e]),this._emitAfterChanges(4)}return e}}pop(){if((0,g.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;let e=S(this._splice(this.length-1,1));return this._emitAfterChanges(2),e}push(...e){return(0,g.gc)(this._observable),this._emitBeforeChanges(1)||(this._splice(this.length,0,e),this._emitAfterChanges(1)),this.length}reduce(e,t){(0,g.gc)(this._observable);let n=this._items;return 2===arguments.length?n.reduce(e,t):n.reduce(e)}reduceRight(e,t){(0,g.gc)(this._observable);let n=this._items;return 2===arguments.length?n.reduceRight(e,t):n.reduceRight(e)}remove(e){return(0,g.gc)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,g.gc)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(2))return;let t=S(this._splice(e,1));return this._emitAfterChanges(2),t}removeMany(e){if((0,g.gc)(this._observable),!e?.length||this._emitBeforeChanges(2))return[];let t=e instanceof r?e.toArray():e,n=this._items,i=[],s=t.length;for(let e=0;e<s;e++){let r=t[e],s=n.indexOf(r);if(s>-1){let r=1+M(t,n,e+1,s+1),o=this._splice(s,r);o&&o.length>0&&i.push.apply(i,o),e+=r-1}}return this._emitAfterChanges(2),i}reverse(){if((0,g.gc)(this._observable),this._emitBeforeChanges(4))return this;let e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(4),this}shift(){if((0,g.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;let e=S(this._splice(0,1));return this._emitAfterChanges(2),e}slice(e=0,t=this.length){return(0,g.gc)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,g.gc)(this._observable),this._items.some(e,t)}sort(e){if((0,g.gc)(this._observable),!this.length||this._emitBeforeChanges(4)||!this._requiresSort(e))return this;let t=this._splice(0,this.length);return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(4),this}_requiresSort(e=(e,t)=>e===t?0:e<t?-1:1){let t=this.length-1;for(let n=0;n<t;n++)if(e(this.items[n],this.items[n+1])>0)return!0;return!1}splice(e,t,...n){(0,g.gc)(this._observable),1===arguments.length&&(t=this.length),t??=0;let r=(t?2:0)|!!n.length;if(this._emitBeforeChanges(r))return[];let i=this._splice(e,t,n)||[];return this._emitAfterChanges(r),i}toArray(){return(0,g.gc)(this._observable),this._items.slice()}toJSON(e){return(0,g.gc)(this._observable),this.toArray().map(t=>(0,v.W)(t)?t.toJSON(e):t)}toLocaleString(){return(0,g.gc)(this._observable),this._items.toLocaleString()}toString(){return(0,g.gc)(this._observable),this._items.toString()}unshift(...e){return(0,g.gc)(this._observable),!e.length||this._emitBeforeChanges(1)||(this._splice(0,0,e),this._emitAfterChanges(1)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,n){let r,i,s=this._items,o=this.itemType;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._updating=!0,this._timer=(0,d._)(()=>this._dispatchChange())),e<0&&(e+=this.length),t){if(i=s.splice(e,t),this.hasEventListener("before-remove")){let t=C.acquire();t.target=this,t.cancellable=!0;for(let n=0,o=i.length;n<o;n++)r=i[n],t.reset(r),this.emit("before-remove",t),t.defaultPrevented&&(i.splice(n,1),s.splice(e,0,r),e+=1,--n,--o);C.release(t)}if(this._length=this._items.length,this.hasEventListener("after-remove")){let e=C.acquire();e.target=this,e.cancellable=!1;let t=i.length;for(let n=0;n<t;n++)e.reset(i[n]),this.emit("after-remove",e);C.release(e)}}if(n?.length){if(o){let e=[];for(let t of n){let n=o.ensureType(t);(null!=n||null==t)&&e.push(n)}n=e}let t=this.hasEventListener("before-add"),r=this.hasEventListener("after-add"),i=e===this.length;if(t||r){let o=C.acquire();o.target=this,o.cancellable=!0;let l=C.acquire();l.target=this,l.cancellable=!1;for(let a of n)t?(o.reset(a),this.emit("before-add",o),o.defaultPrevented||(i?s.push(a):s.splice(e++,0,a),this._length=s.length,r&&(l.reset(a),this.emit("after-add",l)))):(i?s.push(a):s.splice(e++,0,a),this._length=s.length,l.reset(a),this.emit("after-add",l));C.release(l),C.release(o)}else{if(i)for(let e of n)s.push(e);else s.splice(e,0,...n);this._length=s.length}}if((n?.length||i?.length)&&this._notifyChangeEvent(n,i),this.hasEventListener("after-splice")){let r=new w(this,n,i,e,t);this.emit("after-splice",r)}return i}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){let n=C.acquire();n.target=this,n.cancellable=!0,n.type=e,this.emit("before-changes",n),t=n.defaultPrevented,C.release(n)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){let t=C.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),C.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}get updating(){return this._updating}_dispatchChange(){if(this._timer&&=(this._timer.remove(),null),this._updating=!1,!this._notifications)return;let e=this._notifications;this._notifications=null;for(let t of e){let e=t.changes;L.clear(),E.clear(),x.clear();for(let{added:t,removed:n}of e){if(t)if(0===x.size&&0===E.size)for(let e of t)L.add(e);else for(let e of t)E.has(e)?(x.add(e),E.delete(e)):x.has(e)||L.add(e);if(n)if(0===x.size&&0===L.size)for(let e of n)E.add(e);else for(let e of n)L.has(e)?L.delete(e):(x.delete(e),E.add(e))}let n=s.A.acquire();L.forEach(e=>{n.push(e)});let r=s.A.acquire();E.forEach(e=>{r.push(e)});let i=this._items,o=t.items,l=s.A.acquire();if(x.forEach(e=>{o.indexOf(e)!==i.indexOf(e)&&l.push(e)}),t.listeners&&(n.length||r.length||l.length)){let e={target:this,added:n,removed:r,moved:l},i=t.listeners.length;for(let n=0;n<i;n++){let r=t.listeners[n];r.removed||r.callback.call(this,e)}}s.A.release(n),s.A.release(r),s.A.release(l)}L.clear(),E.clear(),x.clear()}};(0,i.Cg)([(0,f.MZ)()],k.prototype,"_updating",void 0),(0,i.Cg)([(0,f.MZ)()],k.prototype,"_length",void 0),(0,i.Cg)([(0,f.MZ)()],k.prototype,"length",null),(0,i.Cg)([(0,f.MZ)()],k.prototype,"items",null),(0,i.Cg)([(0,f.MZ)({readOnly:!0})],k.prototype,"updating",null),k=r=(0,i.Cg)([(0,p.$)("esri.core.Collection")],k);const I=k;n.d(t,["A",0,I])},4902(e,t,n){var r=n(32198),i=n(64108);let s=0;const o=e=>{let t=e,n=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return n=(0,r.Cg)([(0,i.$)("esri.core.Identifiable")],n),n};o(class{}),n.d(t,["s",0,o])},7695(e,t,n){function r(e){return(t,n)=>{t[n]=e}}n.d(t,{u:()=>r})},36708(e,t,n){n.d(t,{C_:()=>d,on:()=>c,wB:()=>a,z7:()=>h});var r=n(37955),i=n(36563),s=n(97768),o=n(17676),l=n(14012);function a(e,t,n={}){return u(e,t,n,m)}function h(e,t,n={}){return u(e,t,n,g)}function u(e,t,n={},r){let i=null,o=n.once?(e,n)=>{r(e)&&((0,s.xt)(i),t(e,n))}:(e,n)=>{r(e)&&t(e,n)};if(i=(0,l.Cn)(e,o,n.sync,n.equals),n.initial){let t=e();o(t,t)}return i}function c(e,t,n,o={}){let l=null,h=null,u=null;function c(){l&&h&&(h.remove(),o.onListenerRemove?.(l),l=null,h=null)}function d(e){o.once&&o.once&&(0,s.xt)(u),n(e)}let m=a(e,(e,n)=>{c(),(0,r.wb)(e)&&(l=e,h=(0,r.on)(e,t,d),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return u=(0,i.hA)(()=>{m.remove(),c()}),u}function d(e,t){return function(e,t,n){if((0,o.G4)(n))return Promise.reject((0,o.NK)());let r=e();if(t?.(r))return Promise.resolve(r);let l=null;function a(){l=(0,s.xt)(l)}return new Promise((r,s)=>{l=(0,i.vE)([(0,o.u7)(n,()=>{a(),s((0,o.NK)())}),u(e,e=>{a(),r(e)},{sync:!1,once:!0},t??m)])})}(e,g,t)}function m(e){return!0}function g(e){return!!e}n(80559),n.d(t,["OH",0,{sync:!0},"Vh",0,{initial:!0},"pc",0,{sync:!0,initial:!0}])},88930(e,t,n){n.d(t,{S1:()=>l,VW:()=>a,lL:()=>h,rb:()=>u,t:()=>c});var r=n(97770),i=(n(98623),n(34747));const s=/^(?<hh>([01][0-9])|(2[0-3])):(?<mm>[0-5][0-9])(:(?<ss>[0-5][0-9]))?(\.(?<ms>\d+))?$/,o={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8,unknown:NaN};function l(e,t,n,s="system"){if("unknown"===n)return e;let o=new i.oh((0,r.wj)(s)),l=i.c9.fromJSDate(e,{zone:o}),a="decades"===n||"centuries"===n?"year":function(e){switch(e){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}(n);return"decades"===n&&(t*=10),"centuries"===n&&(t*=100),l.plus({[a]:t}).toJSDate()}function a(e,t,n="milliseconds"){let r=e.getTime(),i=c(t,n,"milliseconds");return new Date(r+i)}function h(e,t,n="system"){let{unit:s}=t,o=Math.max(1,Math.trunc(t.value)),l=new i.oh((0,r.wj)(n)),a=i.c9.fromJSDate(e,{zone:l}),h=e=>e-e%o;switch(s){case"milliseconds":return a.startOf("second").plus({millisecond:h(a.millisecond)}).toJSDate();case"seconds":return a.startOf("minute").plus({second:h(a.second)}).toJSDate();case"minutes":return a.startOf("hour").plus({minute:h(a.minute)}).toJSDate();case"hours":return a.startOf("day").plus({hour:h(a.hour)}).toJSDate();case"days":return a.startOf("month").plus({day:h(a.day-1)}).toJSDate();case"weeks":{let e=a.startOf("year").startOf("week"),t=Math.floor(a.diff(e,"weeks").weeks);return e.plus({week:h(t)}).toJSDate()}case"months":return a.startOf("year").plus({month:h(a.month-1)}).toJSDate();case"years":case"decades":case"centuries":{let e=a.startOf("year"),t=("decades"===s?10:"centuries"===s?100:1)*o,n=e.year-e.year%t;return e.set({year:n}).toJSDate()}case"unknown":return e}}function u(e){let t=s.exec(e);if(!t)return null;let{hh:n,mm:r,ss:i,ms:l}=t.groups;return Number(n)*o.hours+Number(r)*o.minutes+Number(i||0)*o.seconds+Number(l||0)}function c(e,t,n){return 0===e?0:e*o[t]/o[n]}},97770(e,t,n){n.d(t,{Ey:()=>x,F8:()=>E,J2:()=>S,Yq:()=>D,_m:()=>M,iS:()=>L,wj:()=>O});var r=n(66552),i=n(73444),s=n(98623),o=n(34747);const l={dateStyle:void 0,year:void 0,month:void 0,day:void 0,weekday:void 0},a={timeStyle:void 0,hour12:void 0,hourCycle:void 0,hour:void 0,minute:void 0,second:void 0},h={timeZone:"UTC"},u={year:"numeric",month:"numeric",day:"numeric"},c={year:"numeric",month:"long",day:"numeric"},d={year:"numeric",month:"short",day:"numeric"},m={year:"numeric",month:"long",weekday:"long",day:"numeric"},g={hour:"numeric",minute:"numeric"},f={...g,second:"numeric"},y={hourCycle:"h23"},p={...g,...y},b={...f,...y},v={"short-date":u,"short-date-short-time":{...u,...g},"short-date-short-time-24":{...u,...p},"short-date-long-time":{...u,...f},"short-date-long-time-24":{...u,...b},"short-date-le":u,"short-date-le-short-time":{...u,...g},"short-date-le-short-time-24":{...u,...p},"short-date-le-long-time":{...u,...f},"short-date-le-long-time-24":{...u,...b},"long-month-day-year":c,"long-month-day-year-short-time":{...c,...g},"long-month-day-year-short-time-24":{...c,...p},"long-month-day-year-long-time":{...c,...f},"long-month-day-year-long-time-24":{...c,...b},"day-short-month-year":d,"day-short-month-year-short-time":{...d,...g},"day-short-month-year-short-time-24":{...d,...p},"day-short-month-year-long-time":{...d,...f},"day-short-month-year-long-time-24":{...d,...b},"long-date":m,"long-date-short-time":{...m,...g},"long-date-short-time-24":{...m,...p},"long-date-long-time":{...m,...f},"long-date-long-time-24":{...m,...b},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":g,"long-time":f},_=(0,r.O)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),w={ar:"ar-u-nu-latn-ca-gregory",nn:"no-NN"};function C(){let e=(0,i.lR)();return(e&&w[e])??(0,i.QC)()}"mart"!==new Intl.DateTimeFormat("bs",{month:"long"}).formatToParts(new Date(2025,2)).find(({type:e})=>"month"===e)?.value.toLowerCase()&&(w.bs="sr-Latn-CS");let T=new WeakMap;const A=v["short-date-short-time"];function S(e){return v[e]}function M(e){let{dateStyle:t,timeStyle:n,hour12:r,year:i,month:s}=e,o={};return t?o.dateStyle=t:i&&(o.year=i,o.month=s||void 0),n&&!o.year&&(o.timeStyle=n,o.hour12="auto"===r?void 0:"always"===r),o}function D(e,t=A){return function(e){let t=T.get(e);if(!t){let n=C(),r=O(e.timeZone??"system"),i={...e,timeZone:r};t=new Intl.DateTimeFormat(n,i),T.set(e,t)}return t}(t).format(e)}function L(e,t=A){return D(new Date(e),{...t,...h,...a})}function E(e,t=A){return D(new Date(`1970-01-01T${e}Z`),{...t,...h,...l})}function x(e,t=A){let n=o.c9.fromISO(e,{setZone:!0});if(!n.isValid)return e;if(t.timeZone)return D(n.toJSDate(),t);let r=0===n.offset?"UTC":t.timeZone,i={...t,timeZone:r};return n.toLocaleString(i,{locale:C()})}function O(e){switch(e){case"system":return s.N;case s.L:return"UTC";default:return e}}(0,i.Ml)(()=>{T=new WeakMap}),n.d(t,["_v",0,_])},4146(e,t,n){n.d(t,{A:()=>b});var r=n(32198),i=n(56507),s=n(49186),o=n(65529),l=n(4902),a=n(92474),h=n(53966),u=n(17676),c=n(84952),d=n(91429),m=n(5443),g=n(16930),f=n(92602),y=n(79677);let p=0,b=class extends((0,o.Zt)((0,l.s)(a.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new m.A(-180,-90,180,90,g.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+p++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){let t="string"==typeof e?{url:e}:e;return(await Promise.all([n.e(812),n.e(7982)]).then(()=>n(27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){let t="portalItem"in e?e:{portalItem:e},{fromItem:r}=await Promise.all([n.e(9917),n.e(812),n.e(5613)]).then(()=>n(45613));try{return await r(t)}catch(e){let n=t?.portalItem,r=n?.id||"unset",i=n?.portal?.url||f.A.portalUrl;throw h.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+i+"', id: '"+r+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,u.zf)(e)||h.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){let{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){let{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,c.An)(this.url)}createLayerView(e,t){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){let e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,i.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,r.Cg)([(0,d.MZ)({type:String})],b.prototype,"attributionDataUrl",void 0),(0,r.Cg)([(0,d.MZ)({readOnly:!0})],b.prototype,"effectiveVisible",null),(0,r.Cg)([(0,d.MZ)({type:m.A})],b.prototype,"fullExtent",void 0),(0,r.Cg)([(0,d.MZ)({readOnly:!0})],b.prototype,"hasAttributionData",null),(0,r.Cg)([(0,d.MZ)({type:String,clonable:!1})],b.prototype,"id",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean,nonNullable:!0})],b.prototype,"legendEnabled",void 0),(0,r.Cg)([(0,d.MZ)({type:["show","hide","hide-children"]})],b.prototype,"listMode",void 0),(0,r.Cg)([(0,d.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],b.prototype,"opacity",void 0),(0,r.Cg)([(0,d.MZ)({clonable:!1})],b.prototype,"parent",void 0),(0,r.Cg)([(0,d.MZ)({readOnly:!0})],b.prototype,"parsedUrl",null),(0,r.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],b.prototype,"persistenceEnabled",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean})],b.prototype,"popupEnabled",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean})],b.prototype,"attributionVisible",void 0),(0,r.Cg)([(0,d.MZ)({type:g.A})],b.prototype,"spatialReference",void 0),(0,r.Cg)([(0,d.MZ)({type:String})],b.prototype,"title",void 0),(0,r.Cg)([(0,d.MZ)({readOnly:!0,json:{read:!1}})],b.prototype,"type",void 0),(0,r.Cg)([(0,d.MZ)()],b.prototype,"url",void 0),(0,r.Cg)([(0,d.MZ)({type:y.A})],b.prototype,"visibilityTimeExtent",void 0),(0,r.Cg)([(0,d.MZ)({type:Boolean,nonNullable:!0})],b.prototype,"visible",void 0),b=(0,r.Cg)([(0,d.$K)("esri.layers.Layer")],b)},77548(e,t,n){n.d(t,{Gh:()=>O,tk:()=>M,BR:()=>S,p2:()=>T,qd:()=>D,wI:()=>A,G$:()=>E,$x:()=>L,Ov:()=>v,cM:()=>d,UC:()=>m,Qz:()=>g,OP:()=>x,TU:()=>b,F2:()=>f,XX:()=>p,Qi:()=>_,jy:()=>w});var r=n(70333),i=n(56507),s=n(7762),o=(n(84952),n(36563)),l=n(36708),a=n(4146);const h=new WeakMap;function u(e){return!e.destroyed&&(h.has(e)||e.addHandles([(0,l.wB)(()=>{let{parent:t}=e;return!!(t&&t instanceof a.A)&&("catalog-dynamic-group"===t.type||u(t))},t=>h.set(e,t),l.pc),(0,o.hA)(()=>h.delete(e))]),h.get(e))}function c(e,t){return"object"==typeof e&&!!e&&"type"in e&&e.type===t}function d(e){return c(e,"knowledge-graph")&&"layers"in e}function m(e){return c(e,"knowledge-graph-sublayer")}function g(e){return c(e,"link-chart")&&"layers"in e}function f(e){return c(e,"subtype-group")&&"sublayers"in e}function y(e){let t=e.parent;return function(e){return"group"===e?.type}(t)&&t.tables.includes(e)}n(16215);const p={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function b(e){let t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function v(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function _(e){return"object"==typeof e&&!!e&&"featureReduction"in e}function w(e){return function(e){return c(e,"catalog-footprint")}(e)||function(e){return c(e,"feature")}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)||function(e){return c(e,"oriented-imagery")}(e)||function(e){return"subtype-sublayer"===e?.type}(e)}function C(e){let t=e?.type;return"binning"===t||"cluster"===t}function T(e,t){if(!w(e))return;let n=t?.graphic,r="featureReduction"in e?e.featureReduction:null;if(n){if(n.isAggregate){let e=n.origin;return e&&"featureReductionProvider"in e&&r?C(r)?r:null:void 0}return e}return t?.checkFeatureReduction&&r?C(r)?r:null:e}async function A(e,t){let n=r.id?.findServerInfo(e);if(null!=n?.currentVersion)return n.owningSystemUrl||null;let s=e.toLowerCase().indexOf("/rest/services");if(-1===s)return null;let o=`${e.slice(0,s)}/rest/info`,l=null==t?null:t.signal,{data:a}=await(0,i.A)(o,{query:{f:"json"},responseType:"json",signal:l});return a?.owningSystemUrl||null}function S(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"annotation-feature":case"catalog":case"catalog-footprint":case"csv":case"dimension-feature":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"parquet":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function M(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function D(e){let t=new s.A;for(let n of e.allLayers.concat(e.allTables))u(n)||y(n)||"annotation-feature"===n.type||"dimension-feature"===n.type||("charts"in n&&t.push(n),"subtype-group"===n.type&&t.push(...n.sublayers));return t}function L(e,t){return null}function E(e){return null}function x(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function O(e,t){if(!t||!x(e))return;let n=(e.url,null);n&&(e.url=n)}},73133(e,t,n){const r=(0,n(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:"unknown"});n.d(t,["j",0,r])},16215(e,t,n){n.d(t,{S:()=>i});const r=Symbol("BasemapInstance");function i(e){return"object"==typeof e&&!!e&&r in e}n.d(t,["Y",0,r])},79677(e,t,n){n.d(t,{A:()=>c});var r,i=n(32198),s=n(25482),o=n(88930),l=n(91429),a=(n(98623),n(10184)),h=n(36005),u=n(43937);let c=class extends s.o{static{r=this}static get allTime(){return d}static get empty(){return m}static fromArray(e){return new r({start:null==e[0]?e[0]:new Date(e[0]),end:null==e[1]?e[1]:new Date(e[1])})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null==t.end?null:new Date(t.end)}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null==t.start?null:new Date(t.start)}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;let t=this.start?.getTime()??this.start,n=this.end?.getTime()??this.end,r=e.start?.getTime()??e.start,i=e.end?.getTime()??e.end;return t===r&&n===i}expandTo(e,t="system"){if(this.isEmpty||this.isAllTime||"unknown"===e)return this.clone();let n=this.start;n&&=(0,o.lL)(n,new a.A({value:1,unit:e}),t);let i=this.end;if(i){let n=(0,o.lL)(i,new a.A({value:1,unit:e}),t);i=i.getTime()===n.getTime()?n:(0,o.S1)(n,1,e,t)}return new r({start:n,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();let t,n,i=this.start?.getTime()??-1/0,s=this.end?.getTime()??1/0,o=e.start?.getTime()??-1/0,l=e.end?.getTime()??1/0;return o>=i&&o<=s?t=o:i>=o&&i<=l&&(t=i),s>=o&&s<=l?n=s:l>=i&&l<=s&&(n=l),null==t||null==n||isNaN(t)||isNaN(n)?r.empty:new r({start:t===-1/0?null:new Date(t),end:n===1/0?null:new Date(n)})}offset(e,t,n="system"){if(this.isEmpty||this.isAllTime||"unknown"===t)return this.clone();let i=new r,{start:s,end:l}=this;return null!=s&&(i.start=(0,o.S1)(s,e,t,n)),null!=l&&(i.end=(0,o.S1)(l,e,t,n)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return d.clone();let t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,n=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:n})}};(0,i.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,i.Cg)([(0,h.w)("end")],c.prototype,"readEnd",null),(0,i.Cg)([(0,u.K)("end")],c.prototype,"writeEnd",null),(0,i.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,i.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,i.Cg)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,i.Cg)([(0,h.w)("start")],c.prototype,"readStart",null),(0,i.Cg)([(0,u.K)("start")],c.prototype,"writeStart",null),c=r=(0,i.Cg)([(0,l.$K)("esri.time.TimeExtent")],c);const d=new c,m=new c({start:void 0,end:void 0})},10184(e,t,n){n.d(t,{A:()=>u});var r=n(32198),i=n(69540),s=n(25482),o=n(88930),l=n(91429),a=n(73133),h=n(93223);let u=class extends((0,i.OU)(s.o)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.t)(this.value,this.unit,"milliseconds")}};(0,r.Cg)([(0,h.e)(a.j,{nonNullable:!0})],u.prototype,"unit",void 0),(0,r.Cg)([(0,l.MZ)({type:Number,json:{write:!0},nonNullable:!0})],u.prototype,"value",void 0),u=(0,r.Cg)([(0,l.$K)("esri.time.TimeInterval")],u)}}]);