@arcgis/core 4.30.0-next.20240311 → 4.30.0-next.20240313

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 (247) hide show
  1. package/applications/SceneViewer/layerUtils.d.ts +4 -0
  2. package/applications/SceneViewer/layerUtils.js +5 -0
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/{182f94904b6eb611b886.js → 052005514ce006ce0027.js} +1 -1
  5. package/assets/esri/core/workers/chunks/078397f7c17a9bbbf8c0.js +1 -0
  6. package/assets/esri/core/workers/chunks/{f0cd48d5f5f09ed01773.js → 08c9226e24b2261388e3.js} +1 -1
  7. package/assets/esri/core/workers/chunks/129ea550bf7ad7ad24f9.js +1 -0
  8. package/assets/esri/core/workers/chunks/196b5917e41da7b60cde.js +1 -0
  9. package/assets/esri/core/workers/chunks/{bfef87eb228c96004a4a.js → 1f385cd347b7735d505b.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{49a715520999bbfab18d.js → 1f5b7880ccf47ef9229d.js} +5 -5
  11. package/assets/esri/core/workers/chunks/1f79a9bf849134b95bb6.js +1 -0
  12. package/assets/esri/core/workers/chunks/{523903a812624d0d6d06.js → 2427699e34e1895ed024.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{83d39f990223ca97a320.js → 28ccc007bc898af2187c.js} +1 -1
  14. package/assets/esri/core/workers/chunks/2ceebeac397374a126ba.js +2 -0
  15. package/assets/esri/core/workers/chunks/300062b53d90ba3d8b09.js +1 -0
  16. package/assets/esri/core/workers/chunks/{c8634493442e8e1ce32b.js → 4b70d2db1cd9ddf4b453.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{86fe8077986a991f0462.js → 500f39a5f74fa289df25.js} +1 -1
  18. package/assets/esri/core/workers/chunks/604dae6ff05ff4ac516b.js +1 -0
  19. package/assets/esri/core/workers/chunks/6204698fb1f20f1b41fe.js +1 -0
  20. package/assets/esri/core/workers/chunks/67ab6af927ea04c01a40.js +1 -0
  21. package/assets/esri/core/workers/chunks/67abe8171d41cf21624f.js +1 -0
  22. package/assets/esri/core/workers/chunks/7ae3b1a39ca4963ece12.js +1 -0
  23. package/assets/esri/core/workers/chunks/7ce30bf0770b2b8c6f82.js +1 -0
  24. package/assets/esri/core/workers/chunks/{16da21e329db54ccf49b.js → 893d96c21d929d38ab58.js} +1 -1
  25. package/assets/esri/core/workers/chunks/8a98d957bfcbfe69786d.js +1 -0
  26. package/assets/esri/core/workers/chunks/9656002ff528a7eda746.js +1 -0
  27. package/assets/esri/core/workers/chunks/99283ac67e6b73695df7.js +1 -0
  28. package/assets/esri/core/workers/chunks/9b70ef60e2e01b087d08.js +1 -0
  29. package/assets/esri/core/workers/chunks/a689f1ff4c6ae02b07ae.js +1 -0
  30. package/assets/esri/core/workers/chunks/ab3136c47c5fa8301980.js +1 -0
  31. package/assets/esri/core/workers/chunks/{9326343d8d4a66b96b01.js → b93e601da1592f153a3d.js} +1 -1
  32. package/assets/esri/core/workers/chunks/b9e8c2e2c5b4c9564319.js +1 -0
  33. package/assets/esri/core/workers/chunks/bb33e00cbd80fecc5606.js +1 -0
  34. package/assets/esri/core/workers/chunks/{6dbbfbaa37f4f6bf2120.js → c67b99d2a8376a15a71b.js} +1 -1
  35. package/assets/esri/core/workers/chunks/c76e155332aa0491de3d.js +1 -0
  36. package/assets/esri/core/workers/chunks/cccf63c65070c6a47b16.js +1 -0
  37. package/assets/esri/core/workers/chunks/cd425259ffa675ce7373.js +1 -0
  38. package/assets/esri/core/workers/chunks/{33821f2e70375d8dd01f.js → d2e4c01e33691801f9ef.js} +1 -1
  39. package/assets/esri/core/workers/chunks/d6becb4a089310101448.js +1 -0
  40. package/assets/esri/core/workers/chunks/da7189c3077f49858dc8.js +1 -0
  41. package/assets/esri/core/workers/chunks/dd5a078b7919f749ba3e.js +1 -0
  42. package/assets/esri/core/workers/chunks/f7cfdba77cb614fd3725.js +1 -0
  43. package/assets/esri/core/workers/chunks/f9427ac73435d1726d6c.js +1 -0
  44. package/assets/esri/core/workers/chunks/ff4151d794ec73064fac.js +1 -0
  45. package/chunks/Jpg.js +1 -1
  46. package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
  47. package/chunks/arcgis-knowledge-client-core.js +1 -1
  48. package/chunks/geometryEngineBase.js +1 -1
  49. package/chunks/i3s.js +1 -1
  50. package/chunks/lclayout.js +1 -1
  51. package/chunks/lerc-wasm.js +1 -1
  52. package/chunks/libtess-asm.js +1 -1
  53. package/chunks/lyr3DMain.js +1 -1
  54. package/chunks/lyr3DWorker.js +1 -1
  55. package/chunks/pe-wasm.js +1 -1
  56. package/chunks/vxlLayer.js +1 -1
  57. package/core/image/apng.js +1 -1
  58. package/core/image/gif.js +1 -1
  59. package/core/mathUtils.js +1 -1
  60. package/core/pbf.js +1 -1
  61. package/core/sql/WhereGrammar.js +1 -1
  62. package/geohash/geohashUtils.js +1 -1
  63. package/interfaces.d.ts +24 -8
  64. package/layers/BingMapsLayer.js +1 -1
  65. package/layers/effects/parser.js +1 -1
  66. package/layers/graphics/data/QueryEngine.js +1 -1
  67. package/layers/mixins/SceneService.js +1 -1
  68. package/layers/support/ExportImageServiceParameters.js +1 -1
  69. package/layers/support/LayerContingentValuesCache.js +1 -1
  70. package/layers/support/LercWorker.js +1 -1
  71. package/layers/support/PixelBlock.js +1 -1
  72. package/layers/support/Tilemap.js +1 -1
  73. package/layers/support/rasterDatasets/BaseRaster.js +1 -1
  74. package/layers/support/rasterDatasets/CloudRaster.js +1 -1
  75. package/layers/support/rasterDatasets/FunctionRaster.js +1 -1
  76. package/layers/support/rasterDatasets/ImageServerRaster.js +1 -1
  77. package/layers/support/rasterDatasets/MRFRaster.js +1 -1
  78. package/layers/support/rasterDatasets/TIFFRaster.js +1 -1
  79. package/layers/support/rasterDatasets/WCSRaster.js +1 -1
  80. package/layers/support/rasterFormats/TiffDecoder.js +1 -1
  81. package/layers/support/rasterFunctions/ExtractBandFunction.js +1 -1
  82. package/layers/video/VideoController.js +1 -1
  83. package/package.json +3 -3
  84. package/request.js +1 -1
  85. package/rest/featureService/FeatureService.js +1 -1
  86. package/rest/symbolService.js +1 -1
  87. package/support/elevationInfoUtils.js +1 -1
  88. package/support/revision.js +1 -1
  89. package/views/2d/interactive/editingTools/ControlPointsTransformTool.js +1 -1
  90. package/views/2d/interactive/editingTools/TransformTool.js +1 -1
  91. package/views/2d/interactive/editingTools/manipulations/DragManipulation.js +1 -1
  92. package/views/2d/interactive/editingTools/manipulations/RotateManipulation.js +1 -1
  93. package/views/2d/interactive/editingTools/manipulations/ScaleManipulation.js +1 -1
  94. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  95. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementPathHelper.js +1 -1
  96. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  97. package/views/3d/camera/constraintUtils/common.js +1 -1
  98. package/views/3d/interactive/editingTools/ManipulatedObjectGraphic3D.js +5 -0
  99. package/views/3d/interactive/editingTools/dragEventPipeline3D.js +1 -1
  100. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  101. package/views/3d/interactive/editingTools/{isSupportedGraphicUtils.js → isSupportedObjectUtils.js} +1 -1
  102. package/views/3d/interactive/editingTools/lineObjectVisualElementUtils.js +5 -0
  103. package/views/3d/interactive/editingTools/manipulatedObjectUtils.js +5 -0
  104. package/views/3d/interactive/editingTools/manipulations/MoveManipulation.js +1 -1
  105. package/views/3d/interactive/editingTools/manipulations/MoveXYAxisManipulation.js +1 -1
  106. package/views/3d/interactive/editingTools/manipulations/MoveXYDiscManipulation.js +1 -1
  107. package/views/3d/interactive/editingTools/manipulations/MoveXYObjectManipulation.js +5 -0
  108. package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
  109. package/views/3d/interactive/editingTools/manipulations/moveUtils.js +1 -1
  110. package/views/3d/interactive/editingTools/manipulatorUtils.js +1 -1
  111. package/views/3d/interactive/editingTools/meshFastUpdateUtils.js +1 -1
  112. package/views/3d/interactive/editingTools/move/MoveTool3D.js +5 -0
  113. package/views/3d/interactive/editingTools/move/isSupportedObject.js +5 -0
  114. package/views/3d/interactive/editingTools/originGeometryVisualElementUtils.js +5 -0
  115. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +5 -0
  116. package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +5 -0
  117. package/views/3d/interactive/editingTools/reshape/isSupportedObject.js +5 -0
  118. package/views/3d/interactive/editingTools/settings.js +1 -1
  119. package/views/3d/interactive/editingTools/transform/ExtentTransformTool.js +5 -0
  120. package/views/3d/interactive/editingTools/{transformGraphic → transform}/ScaleRotateMeshAdapter.js +1 -1
  121. package/views/3d/interactive/editingTools/{transformGraphic → transform}/ScaleRotateObjectSymbol3DAdapter.js +1 -1
  122. package/views/3d/interactive/editingTools/transform/ScaleRotateTransform.js +5 -0
  123. package/views/3d/interactive/editingTools/transform/TransformTool3D.js +5 -0
  124. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentMove.js +5 -0
  125. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentRotate.js +5 -0
  126. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentScale.js +5 -0
  127. package/views/3d/interactive/editingTools/transform/extentTransform/PreserveAspectRatio.js +5 -0
  128. package/views/3d/interactive/editingTools/transform/extentTransform/extentUtils.js +5 -0
  129. package/views/3d/interactive/editingTools/transform/isSupportedGraphic.js +5 -0
  130. package/views/3d/interactive/editingTools/transform/undoRecords.js +5 -0
  131. package/views/3d/interactive/editingTools/visualElementUtils.js +1 -1
  132. package/views/3d/interactive/editingTools.js +1 -1
  133. package/views/3d/interactive/manipulatorUtils.js +1 -1
  134. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
  135. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
  136. package/views/3d/layers/I3SMeshView3D.js +1 -1
  137. package/views/3d/layers/MediaLayerView3D.js +1 -1
  138. package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
  139. package/views/3d/layers/graphics/Graphics3DLodInstanceGraphicLayer.js +1 -1
  140. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  141. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  142. package/views/3d/layers/i3s/I3SNodeLoader.js +1 -1
  143. package/views/3d/layers/i3s/PagedNodeIndex.js +1 -1
  144. package/views/3d/layers/i3s/PointCloudWorkerUtil.js +1 -1
  145. package/views/3d/state/ConstraintsManager.js +1 -1
  146. package/views/3d/state/ViewState.js +1 -1
  147. package/views/3d/support/LaserlinePathData.js +1 -1
  148. package/views/3d/support/orientedBoundingBox.js +1 -1
  149. package/views/3d/terrain/PatchRenderData.js +1 -1
  150. package/views/3d/terrain/TerrainRenderer.js +1 -1
  151. package/views/3d/terrain/Tile.js +1 -1
  152. package/views/3d/terrain/TileRenderer.js +1 -1
  153. package/views/3d/terrain/TilingScheme.js +1 -1
  154. package/views/3d/terrain/tileUtils.js +1 -1
  155. package/views/3d/webgl-engine/collections/Component/DepthRange.js +1 -1
  156. package/views/3d/webgl-engine/lib/ComponentUtils.js +1 -1
  157. package/views/3d/webgl-engine/lib/DDSUtil.js +1 -1
  158. package/views/3d/webgl-engine/lib/MagnifierHelper.js +1 -1
  159. package/views/3d/webgl-engine/lib/Material.js +1 -1
  160. package/views/3d/webgl-engine/lib/Object3DStateSet.js +1 -1
  161. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  162. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  163. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  164. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  165. package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
  166. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  167. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  168. package/views/3d/webgl-engine/lib/edgeRendering/EdgeWorkerHandle.js +1 -1
  169. package/views/3d/webgl-engine/lib/lodRendering/InstanceData.js +1 -1
  170. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  171. package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
  172. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  173. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  174. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  175. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  176. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  177. package/views/draw/DrawAction.js +1 -1
  178. package/views/draw/DrawOperation.js +1 -1
  179. package/views/draw/SegmentDrawAction.js +1 -1
  180. package/views/draw/support/Box.js +1 -1
  181. package/views/draw/support/Reshape.js +1 -1
  182. package/views/input/InputManager.js +1 -1
  183. package/views/interactive/dragEventPipeline.js +1 -1
  184. package/views/interactive/editGeometry/EditGeometry.js +1 -1
  185. package/views/interactive/editGeometry/EditGeometryOperations.js +1 -1
  186. package/views/interactive/editGeometry/operations/MoveMesh.js +5 -0
  187. package/views/interactive/editGeometry/operations/SetAllVertexPositions.js +5 -0
  188. package/views/interactive/tooltip/TranslateTooltipInfos.js +1 -1
  189. package/views/interactive/tooltip/content/{TooltipContentTranslateGraphic.js → TooltipContentTranslate.js} +1 -1
  190. package/views/interactive/tooltip/content/{TooltipContentTranslateGraphicXY.js → TooltipContentTranslateXY.js} +1 -1
  191. package/views/interactive/tooltip/content/{TooltipContentTranslateGraphicZ.js → TooltipContentTranslateZ.js} +1 -1
  192. package/views/interactive/tooltip/content/tooltipContentFactory.js +1 -1
  193. package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
  194. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
  195. package/widgets/ElevationProfile/support/InputRepresentation3D.js +1 -1
  196. package/widgets/Sketch/SketchViewModel.js +1 -1
  197. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  198. package/widgets/UtilityNetworkTrace/support/ResultAreaHandler.js +1 -1
  199. package/assets/esri/core/workers/chunks/0008d178ba41307f7bb4.js +0 -1
  200. package/assets/esri/core/workers/chunks/0272af5adbbd4482f50d.js +0 -1
  201. package/assets/esri/core/workers/chunks/07f017d3af8051577cae.js +0 -1
  202. package/assets/esri/core/workers/chunks/13901677c9a53d6e814c.js +0 -1
  203. package/assets/esri/core/workers/chunks/16f1ede633a712a555a6.js +0 -1
  204. package/assets/esri/core/workers/chunks/2801fa3eeb6511324632.js +0 -1
  205. package/assets/esri/core/workers/chunks/40eb89485beba79167e0.js +0 -1
  206. package/assets/esri/core/workers/chunks/41b4d651db6376fb3609.js +0 -1
  207. package/assets/esri/core/workers/chunks/4e6091bf95d1042eecd2.js +0 -1
  208. package/assets/esri/core/workers/chunks/615edb84daad08678931.js +0 -1
  209. package/assets/esri/core/workers/chunks/618393798d39655debf5.js +0 -1
  210. package/assets/esri/core/workers/chunks/61d903fe9200dced54df.js +0 -1
  211. package/assets/esri/core/workers/chunks/771b95d28e1c9a14df64.js +0 -1
  212. package/assets/esri/core/workers/chunks/79f36c3a2026c2f35fb0.js +0 -1
  213. package/assets/esri/core/workers/chunks/8526061e12755d6ddfd1.js +0 -2
  214. package/assets/esri/core/workers/chunks/899b4539e516f44c51af.js +0 -1
  215. package/assets/esri/core/workers/chunks/9ecc225c87ba2637a298.js +0 -1
  216. package/assets/esri/core/workers/chunks/ab1b23decd5bae49155a.js +0 -1
  217. package/assets/esri/core/workers/chunks/ac95efd57f7c1472698a.js +0 -1
  218. package/assets/esri/core/workers/chunks/b20412f08361ba99f73e.js +0 -1
  219. package/assets/esri/core/workers/chunks/b226161c2ad448347689.js +0 -1
  220. package/assets/esri/core/workers/chunks/b70be572d509557428f4.js +0 -1
  221. package/assets/esri/core/workers/chunks/bbedc4ff3d0aadbde16a.js +0 -1
  222. package/assets/esri/core/workers/chunks/c16ed88e7733b1d31041.js +0 -1
  223. package/assets/esri/core/workers/chunks/cb9d1f24ebd4763412df.js +0 -1
  224. package/assets/esri/core/workers/chunks/d206f750dd2933c7e6b0.js +0 -1
  225. package/assets/esri/core/workers/chunks/d54500cf91321b705565.js +0 -1
  226. package/assets/esri/core/workers/chunks/e538d269ff6c79a8fd3b.js +0 -1
  227. package/assets/esri/core/workers/chunks/ea7e4f72a5b65ecb1c23.js +0 -1
  228. package/views/3d/interactive/editingTools/lineGraphicVisualElementUtils.js +0 -5
  229. package/views/3d/interactive/editingTools/manipulations/MoveXYGraphicManipulation.js +0 -5
  230. package/views/3d/interactive/editingTools/moveGraphic/GraphicMoveTool.js +0 -5
  231. package/views/3d/interactive/editingTools/moveGraphic/isSupportedGraphic.js +0 -5
  232. package/views/3d/interactive/editingTools/originGraphicVisualElementUtils.js +0 -5
  233. package/views/3d/interactive/editingTools/reshapeGraphic/GraphicReshapeTool.js +0 -5
  234. package/views/3d/interactive/editingTools/reshapeGraphic/ReshapeOperation.js +0 -5
  235. package/views/3d/interactive/editingTools/reshapeGraphic/isSupportedGraphic.js +0 -5
  236. package/views/3d/interactive/editingTools/transformGraphic/ExtentMove.js +0 -5
  237. package/views/3d/interactive/editingTools/transformGraphic/ExtentRotate.js +0 -5
  238. package/views/3d/interactive/editingTools/transformGraphic/ExtentScale.js +0 -5
  239. package/views/3d/interactive/editingTools/transformGraphic/ExtentTransformTool.js +0 -5
  240. package/views/3d/interactive/editingTools/transformGraphic/GraphicScaleRotateTransform.js +0 -5
  241. package/views/3d/interactive/editingTools/transformGraphic/GraphicTransformTool.js +0 -5
  242. package/views/3d/interactive/editingTools/transformGraphic/PreserveAspectRatio.js +0 -5
  243. package/views/3d/interactive/editingTools/transformGraphic/extentUtils.js +0 -5
  244. package/views/3d/interactive/editingTools/transformGraphic/isSupportedGraphic.js +0 -5
  245. package/views/3d/interactive/editingTools/transformGraphic/undoRecords.js +0 -5
  246. /package/assets/esri/core/workers/chunks/{8526061e12755d6ddfd1.js.LICENSE.txt → 2ceebeac397374a126ba.js.LICENSE.txt} +0 -0
  247. /package/views/3d/interactive/editingTools/{reshapeGraphic → reshape}/edgeOffsetUtils.js +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4349],{71903:(e,t,i)=>{var l;i.d(t,{u:()=>l}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(l||(l={}))},89186:(e,t,i)=>{i.d(t,{f:()=>p});var l=i(90237),s=(i(59456),i(10107)),o=(i(44208),i(53966),i(87811),i(36005)),r=i(40608),n=i(87045),a=i(65509),c=i(25943),h=i(16930);const p=e=>{let t=class extends e{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}destroy(){this.tilemapCache?.destroy?.()}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(e,t,i){const l=t.capabilities?.includes("Tilemap");let{minLOD:s,maxLOD:o,minScale:r,maxScale:h}=t;if(null==s&&null==o&&0!==r&&0!==h){const e=e=>Math.round(1e4*e)/1e4;r=e(r||t.tileInfo.lods[0].scale),h=e(h||t.tileInfo.lods[t.tileInfo.lods.length-1].scale);for(const i of t.tileInfo.lods){const t=e(i.scale);s=t>=r?i.level:s,o=t>=h?i.level:o}}if(l)return new c.d({layer:this,minLOD:s,maxLOD:o});if(t.tileInfo){const e=new n.A;return e.read(t.tileInfo,i),new a.A(e,s,o)}return null}};return(0,l._)([(0,s.MZ)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,l._)([(0,s.MZ)()],t.prototype,"minScale",void 0),(0,l._)([(0,o.w)("service","minScale")],t.prototype,"readMinScale",null),(0,l._)([(0,s.MZ)()],t.prototype,"maxScale",void 0),(0,l._)([(0,o.w)("service","maxScale")],t.prototype,"readMaxScale",null),(0,l._)([(0,s.MZ)({type:h.A})],t.prototype,"spatialReference",void 0),(0,l._)([(0,s.MZ)({readOnly:!0})],t.prototype,"supportsBlankTile",null),(0,l._)([(0,s.MZ)({type:n.A})],t.prototype,"tileInfo",void 0),(0,l._)([(0,s.MZ)()],t.prototype,"tilemapCache",void 0),(0,l._)([(0,o.w)("service","tilemapCache",["capabilities","tileInfo"])],t.prototype,"readTilemapCache",null),(0,l._)([(0,s.MZ)()],t.prototype,"version",void 0),t=(0,l._)([(0,r.$)("esri.layers.mixins.ArcGISCachedService")],t),t}},18768:(e,t,i)=>{i.d(t,{b:()=>a});var l=i(90237),s=i(53966),o=i(10107),r=(i(44208),i(87811),i(40608)),n=i(60694);const a=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,n.qg)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,n.Jf)(e,s.A.getLogger(this)))}};return(0,l._)([(0,o.MZ)()],t.prototype,"title",null),(0,l._)([(0,o.MZ)({type:String})],t.prototype,"url",null),t=(0,l._)([(0,r.$)("esri.layers.mixins.ArcGISService")],t),t}},91806:(e,t,i)=>{i.d(t,{A:()=>h});var l,s=i(90237),o=i(25482),r=i(10107),n=i(56507),a=(i(87811),i(44208),i(40608));let c=l=class extends o.oY{constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new l({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,s._)([(0,r.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"cols",void 0),(0,s._)([(0,r.MZ)({type:n.jz,json:{write:!0}})],c.prototype,"level",void 0),(0,s._)([(0,r.MZ)({type:String,json:{write:!0}})],c.prototype,"levelValue",void 0),(0,s._)([(0,r.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"origin",void 0),(0,s._)([(0,r.MZ)({type:Number,json:{write:!0}})],c.prototype,"resolution",void 0),(0,s._)([(0,r.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"rows",void 0),(0,s._)([(0,r.MZ)({type:Number,json:{write:!0}})],c.prototype,"scale",void 0),c=l=(0,s._)([(0,a.$)("esri.layers.support.LOD")],c);const h=c},87045:(e,t,i)=>{i.d(t,{A:()=>M});var l,s=i(90237),o=i(66552),r=i(25482),n=i(83047),a=i(10107),c=i(56507),h=(i(87811),i(44208),i(36005)),p=i(40608),u=i(43937),f=i(86738),d=i(16930),v=i(19419),m=i(21325),y=i(28735),w=i(91806),g=i(72802);const _=new o.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let b=l=class extends r.oY{static create(e={}){const{resolutionFactor:t=1,scales:i,size:s=256,spatialReference:o=d.A.WebMercator,numLODs:r=24}=e;if(!(0,m.fn)(o)){const e=[];if(i)for(let t=0;t<i.length;t++){const l=i[t];e.push(new w.A({level:t,scale:l,resolution:l}))}else{let t=5e-4;for(let i=r-1;i>=0;i--)e.unshift(new w.A({level:i,scale:t,resolution:t})),t*=2}return new l({dpi:96,lods:e,origin:new f.A(0,0,o),size:[s,s],spatialReference:o})}const a=(0,m.Vp)(o),c=e.origin?new f.A({x:e.origin.x,y:e.origin.y,spatialReference:o}):new f.A(a?{x:a.origin[0],y:a.origin[1],spatialReference:o}:{x:0,y:0,spatialReference:o}),h=1/(39.37*(0,n.GA)(o)*96),p=[];if(i)for(let e=0;e<i.length;e++){const t=i[e],l=t*h;p.push(new w.A({level:e,scale:t,resolution:l}))}else{let e=(0,m.EA)(o)?512/s*591657527.5917094:256/s*591657527.591555;const i=Math.ceil(r/t);p.push(new w.A({level:0,scale:e,resolution:e*h}));for(let l=1;l<i;l++){const i=e/2**t,s=i*h;p.push(new w.A({level:l,scale:i,resolution:s})),e=i}}return new l({dpi:96,lods:p,origin:c,size:[s,s],spatialReference:o})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const i=(0,m.Vp)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return f.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0;const l=[],s=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach((e=>{l.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,s[e.level]=e}))),this._set("scales",l),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const i=Math.floor(e),l=i+1;return t[i]/(t[i]/t[l])**(e-i)}scaleToZoom(e){const t=this.scales,i=t.length-1;let l=0;for(;l<i;l++){const i=t[l],s=t[l+1];if(i<=e)return l;if(s===e)return l+1;if(i>e&&s<e)return l+Math.log(i/e)/Math.log(i/s)}return l}snapScale(e,t=.95){const i=this.scaleToZoom(e);return i%Math.floor(i)>=t?this.zoomToScale(Math.ceil(i)):this.zoomToScale(Math.floor(i))}tileAt(e,t,i,l){const s=this.lodAt(e);if(!s)return null;let o,r;if("number"==typeof t)o=t,r=i;else if((0,m.aI)(t.spatialReference,this.spatialReference))o=t.x,r=t.y,l=i;else{const e=(0,y.Cv)(t,this.spatialReference);if(null==e)return null;o=e.x,r=e.y,l=i}const n=s.resolution*this.size[0],a=s.resolution*this.size[1];return l||(l=new g.U(null,0,0,0,(0,v.vt)())),l.level=e,l.row=Math.floor((this.origin.y-r)/a+.001),l.col=Math.floor((o-this.origin.x)/n+.001),this.updateTileInfo(l),l}updateTileInfo(e,t=l.ExtrapolateOptions.NONE){let i=this.lodAt(e.level);if(!i&&t===l.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return;const s=e.level-i.level,o=i.resolution*this.size[0]/2**s,r=i.resolution*this.size[1]/2**s;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,v.vt)()),e.extent[0]=this.origin.x+e.col*o,e.extent[1]=this.origin.y-(e.row+1)*r,e.extent[2]=e.extent[0]+o,e.extent[3]=e.extent[1]+r}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const i=this.lodAt(t.level);if(null==i)return null;const{resolution:l}=i,s=l*this.size[0],o=l*this.size[1];return e[0]=this.origin.x+t.col*s,e[1]=this.origin.y-(t.row+1)*o,e[2]=e[0]+s,e[3]=e[1]+o,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return l.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;const t=(512===this.size[0]&&256===e?-1:0)+(this.spatialReference.isGeographic?1:0);if(this.size[0]===e&&0===t)return this;const i=[],s=this.lods.length-t;for(let e=0;e<s;e++){const l=e+t,{scale:s,resolution:o}=l>=0?this.lods[l]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};i.push(new w.A({level:e,scale:s,resolution:o}))}return new l({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){const l=e[i];this._upsampleLevels[l.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/l.resolution:0},t=l}}};var A,O;(0,s._)([(0,a.MZ)({type:Number,json:{write:!0}})],b.prototype,"compressionQuality",void 0),(0,s._)([(0,a.MZ)({type:Number,json:{write:!0}})],b.prototype,"dpi",void 0),(0,s._)([(0,a.MZ)({type:String,json:{read:_.read,write:_.write,origins:{"web-scene":{read:!1,write:!1}}}})],b.prototype,"format",void 0),(0,s._)([(0,a.MZ)({readOnly:!0})],b.prototype,"isWrappable",null),(0,s._)([(0,a.MZ)({type:f.A,json:{write:!0}})],b.prototype,"origin",void 0),(0,s._)([(0,h.w)("origin")],b.prototype,"readOrigin",null),(0,s._)([(0,a.MZ)({type:[w.A],value:null,json:{write:!0}})],b.prototype,"lods",null),(0,s._)([(0,a.MZ)({readOnly:!0})],b.prototype,"scales",void 0),(0,s._)([(0,a.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],b.prototype,"size",void 0),(0,s._)([(0,h.w)("size",["rows","cols"])],b.prototype,"readSize",null),(0,s._)([(0,u.K)("size",{cols:{type:c.jz},rows:{type:c.jz}})],b.prototype,"writeSize",null),(0,s._)([(0,a.MZ)({type:d.A,json:{write:!0}})],b.prototype,"spatialReference",void 0),b=l=(0,s._)([(0,p.$)("esri.layers.support.TileInfo")],b),(O=(A=b||(b={})).ExtrapolateOptions||(A.ExtrapolateOptions={}))[O.NONE=0]="NONE",O[O.POWER_OF_TWO=1]="POWER_OF_TWO";const M=b},65509:(e,t,i)=>{i.d(t,{A:()=>o});var l=i(49186),s=i(74887);class o{constructor(e,t=0,i=e.lods[e.lods.length-1].level){this.tileInfo=e,this.minLOD=t,this.maxLOD=i,e.lodAt(t)||(this.minLOD=e.lods[0].level),e.lodAt(i)||(this.maxLOD=e.lods[e.lods.length-1].level)}get effectiveMinLOD(){return this.minLOD??this.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}getAvailability(e,t,i){const l=this.tileInfo?.lodAt(e);return!l||e<this.minLOD||e>this.maxLOD?"unavailable":l.cols&&l.rows?i>=l.cols[0]&&i<=l.cols[1]&&t>=l.rows[0]&&t<=l.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(e,t,i,o){await(0,s.NO)(o);const r=this.getAvailability(e,t,i);if("unavailable"===r)throw new l.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i});return r}async fetchAvailabilityUpsample(e,t,i,l,o){await(0,s.NO)(o),l.level=e,l.row=t,l.col=i;const r=this.tileInfo;return r.updateTileInfo(l),this.fetchAvailability(e,t,i,o).catch((e=>{if((0,s.zf)(e))throw e;if(r.upsampleTile(l))return this.fetchAvailabilityUpsample(l.level,l.row,l.col,l,o);throw e}))}}},72802:(e,t,i)=>{i.d(t,{U:()=>l});class l{constructor(e,t,i,l,s=void 0){this.id=e,this.level=t,this.row=i,this.col=l,this.extent=s}}},25943:(e,t,i)=>{i.d(t,{d:()=>M});var l,s=i(90237),o=i(78888),r=i(69622),n=i(71903),a=i(49186),c=i(36563),h=i(55359),p=i(3694),u=i(74887),f=i(36708),d=i(11932),v=i(84952),m=i(10107),y=(i(44208),i(53966),i(87811),i(40608)),w=i(72802),g=i(4576),_=i(4718),b=i(34275);class A{constructor(e){this._validateJSON(e);const{location:t,data:i}=e;this.location=Object.freeze((0,_.o8)(t));const l=this.location.width,s=this.location.height;let o=!0,r=!0;const n=function(e,t=!1){return e<=b.y9?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(l*s/32));let a=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(r=!1,n[a]|=1<<t):o=!1,31===t&&++a}r?(this._availability="unavailable",this.byteSize=40):o?(this._availability="available",this.byteSize=40):(this._availability=n,this.byteSize=40+(0,b.Ek)(n))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),l=i%32,s=i>>5,o=this._availability;return s<0||s>o.length?"unknown":o[s]&1<<l?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||o.A,{row:l,col:s,width:r,height:n}=e,c={query:{f:"json"}};return t=t?{...c,...t}:c,i(function(e){let t;if(e.service.tileServers?.length){const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then((e=>e.data)).catch((e=>{if(e&&e.details&&422===e.details.httpStatus)return{location:{top:l,left:s,width:r,height:n},valid:!0,data:(0,g.dY)(r*n,0)};throw e})).then((e=>{if(e.location&&(e.location.top!==l||e.location.left!==s||e.location.width!==r||e.location.height!==n))throw new a.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:l,left:s,width:r,height:n}});return A.fromJSON(e)}))}static fromJSON(e){return Object.freeze(new A(e))}_validateJSON(e){if(!e?.location)throw new a.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new a.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new a.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new a.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new a.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}}function O(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}let M=l=class extends r.A{constructor(e){super(e),this._pendingTilemapRequests={},this.request=o.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new h.q(2*n.u.MEGABYTES),this.addHandles((0,f.wB)((()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]}),(()=>this._initializeTilemapDefinition()),f.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}fetchTilemap(e,t,i,l){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new a.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const s=this._tmpTilemapDefinition,o=this._tilemapFromCache(e,t,i,s);if(o)return Promise.resolve(o);const r=l?.signal;return l={...l,signal:null},new Promise(((e,t)=>{(0,u.u7)(r,(()=>t((0,u.NK)())));const i=O(s);let o=this._pendingTilemapRequests[i];if(!o){o=A.fromDefinition(s,l).then((e=>(this._tilemapCache.put(i,e,e.byteSize),e)));const e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=o,o.then(e,e)}o.then(e,t)}))}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";const l=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return l?l.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,l){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(new a.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})):this.fetchTilemap(e,t,i,l).catch((e=>e)).then((l=>{if(l instanceof A){const s=l.getAvailability(t,i);if("unavailable"===s)throw new a.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i});return s}if((0,u.zf)(l))throw l;return"unknown"}))}fetchAvailabilityUpsample(e,t,i,l,s){l.level=e,l.row=t,l.col=i;const o=this.layer.tileInfo;o.updateTileInfo(l);const r=this.fetchAvailability(e,t,i,s).catch((e=>{if((0,u.zf)(e))throw e;if(o.upsampleTile(l))return this.fetchAvailabilityUpsample(l.level,l.row,l.col,l,s);throw e}));return this._fetchAvailabilityUpsamplePrefetch(l.id,e,t,i,s,r),r}async _fetchAvailabilityUpsamplePrefetch(e,t,i,s,o,r){if(!this._prefetchingEnabled||null==e)return;const n=`prefetch-${e}`;if(this.hasHandles(n))return;const a=new AbortController;r.then((()=>a.abort()),(()=>a.abort()));let h=!1;const p=(0,c.hA)((()=>{h||(h=!0,a.abort())}));if(this.addHandles(p,n),await(0,d.md)(10,a.signal).catch((()=>{})),h||(h=!0,this.removeHandles(n)),(0,u.G4)(a))return;const f=new w.U(e,t,i,s),v={...o,signal:a.signal},m=this.layer.tileInfo;for(let e=0;l._prefetches.length<l._maxPrefetch&&m.upsampleTile(f);++e){const e=this.fetchAvailability(f.level,f.row,f.col,v);l._prefetches.push(e);const t=()=>{l._prefetches.removeUnordered(e)};e.then(t,t)}}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,v.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,l){l.level=e,l.row=t-t%this.size,l.col=i-i%this.size;const s=O(l);return this._tilemapCache.get(s)}get test(){const e=this;return{get prefetchingEnabled(){return e._prefetchingEnabled},set prefetchingEnabled(t){e._prefetchingEnabled=t},hasTilemap:(t,i,l)=>!!e._tilemapFromCache(t,i,l,e._tmpTilemapDefinition)}}};M._maxPrefetch=4,M._prefetches=new p.A({initialSize:l._maxPrefetch}),(0,s._)([(0,m.MZ)({constructOnly:!0})],M.prototype,"layer",void 0),(0,s._)([(0,m.MZ)({constructOnly:!0})],M.prototype,"minLOD",void 0),(0,s._)([(0,m.MZ)({constructOnly:!0})],M.prototype,"maxLOD",void 0),(0,s._)([(0,m.MZ)({constructOnly:!0})],M.prototype,"request",void 0),(0,s._)([(0,m.MZ)({constructOnly:!0})],M.prototype,"size",void 0),M=l=(0,s._)([(0,y.$)("esri.layers.support.TilemapCache")],M)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4349],{71903:(e,t,i)=>{var l;i.d(t,{u:()=>l}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(l||(l={}))},89186:(e,t,i)=>{i.d(t,{f:()=>p});var l=i(90237),s=(i(59456),i(10107)),o=(i(44208),i(53966),i(87811),i(36005)),r=i(40608),n=i(87045),a=i(65509),c=i(25943),h=i(16930);const p=e=>{let t=class extends e{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}destroy(){this.tilemapCache?.destroy?.()}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(e,t,i){const l=t.capabilities?.includes("Tilemap");let{minLOD:s,maxLOD:o,minScale:r,maxScale:h}=t;if(null==s&&null==o&&0!==r&&0!==h){const e=e=>Math.round(1e4*e)/1e4;r=e(r||t.tileInfo.lods[0].scale),h=e(h||t.tileInfo.lods[t.tileInfo.lods.length-1].scale);for(const i of t.tileInfo.lods){const t=e(i.scale);s=t>=r?i.level:s,o=t>=h?i.level:o}}if(l)return new c.d({layer:this,minLOD:s,maxLOD:o});if(t.tileInfo){const e=new n.A;return e.read(t.tileInfo,i),new a.A(e,s,o)}return null}};return(0,l._)([(0,s.MZ)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,l._)([(0,s.MZ)()],t.prototype,"minScale",void 0),(0,l._)([(0,o.w)("service","minScale")],t.prototype,"readMinScale",null),(0,l._)([(0,s.MZ)()],t.prototype,"maxScale",void 0),(0,l._)([(0,o.w)("service","maxScale")],t.prototype,"readMaxScale",null),(0,l._)([(0,s.MZ)({type:h.A})],t.prototype,"spatialReference",void 0),(0,l._)([(0,s.MZ)({readOnly:!0})],t.prototype,"supportsBlankTile",null),(0,l._)([(0,s.MZ)({type:n.A})],t.prototype,"tileInfo",void 0),(0,l._)([(0,s.MZ)()],t.prototype,"tilemapCache",void 0),(0,l._)([(0,o.w)("service","tilemapCache",["capabilities","tileInfo"])],t.prototype,"readTilemapCache",null),(0,l._)([(0,s.MZ)()],t.prototype,"version",void 0),t=(0,l._)([(0,r.$)("esri.layers.mixins.ArcGISCachedService")],t),t}},18768:(e,t,i)=>{i.d(t,{b:()=>a});var l=i(90237),s=i(53966),o=i(10107),r=(i(44208),i(87811),i(40608)),n=i(60694);const a=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,n.qg)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,n.Jf)(e,s.A.getLogger(this)))}};return(0,l._)([(0,o.MZ)()],t.prototype,"title",null),(0,l._)([(0,o.MZ)({type:String})],t.prototype,"url",null),t=(0,l._)([(0,r.$)("esri.layers.mixins.ArcGISService")],t),t}},91806:(e,t,i)=>{i.d(t,{A:()=>h});var l,s=i(90237),o=i(25482),r=i(10107),n=i(56507),a=(i(87811),i(44208),i(40608));let c=l=class extends o.oY{constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new l({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,s._)([(0,r.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"cols",void 0),(0,s._)([(0,r.MZ)({type:n.jz,json:{write:!0}})],c.prototype,"level",void 0),(0,s._)([(0,r.MZ)({type:String,json:{write:!0}})],c.prototype,"levelValue",void 0),(0,s._)([(0,r.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"origin",void 0),(0,s._)([(0,r.MZ)({type:Number,json:{write:!0}})],c.prototype,"resolution",void 0),(0,s._)([(0,r.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"rows",void 0),(0,s._)([(0,r.MZ)({type:Number,json:{write:!0}})],c.prototype,"scale",void 0),c=l=(0,s._)([(0,a.$)("esri.layers.support.LOD")],c);const h=c},87045:(e,t,i)=>{i.d(t,{A:()=>M});var l,s=i(90237),o=i(66552),r=i(25482),n=i(83047),a=i(10107),c=i(56507),h=(i(87811),i(44208),i(36005)),p=i(40608),u=i(43937),f=i(86738),d=i(16930),v=i(19419),m=i(21325),y=i(28735),w=i(91806),g=i(72802);const _=new o.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let b=l=class extends r.oY{static create(e={}){const{resolutionFactor:t=1,scales:i,size:s=256,spatialReference:o=d.A.WebMercator,numLODs:r=24}=e;if(!(0,m.fn)(o)){const e=[];if(i)for(let t=0;t<i.length;t++){const l=i[t];e.push(new w.A({level:t,scale:l,resolution:l}))}else{let t=5e-4;for(let i=r-1;i>=0;i--)e.unshift(new w.A({level:i,scale:t,resolution:t})),t*=2}return new l({dpi:96,lods:e,origin:new f.A(0,0,o),size:[s,s],spatialReference:o})}const a=(0,m.Vp)(o),c=e.origin?new f.A({x:e.origin.x,y:e.origin.y,spatialReference:o}):new f.A(a?{x:a.origin[0],y:a.origin[1],spatialReference:o}:{x:0,y:0,spatialReference:o}),h=1/(39.37*(0,n.GA)(o)*96),p=[];if(i)for(let e=0;e<i.length;e++){const t=i[e],l=t*h;p.push(new w.A({level:e,scale:t,resolution:l}))}else{let e=(0,m.EA)(o)?512/s*591657527.5917094:256/s*591657527.591555;const i=Math.ceil(r/t);p.push(new w.A({level:0,scale:e,resolution:e*h}));for(let l=1;l<i;l++){const i=e/2**t,s=i*h;p.push(new w.A({level:l,scale:i,resolution:s})),e=i}}return new l({dpi:96,lods:p,origin:c,size:[s,s],spatialReference:o})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const i=(0,m.Vp)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return f.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0;const l=[],s=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach((e=>{l.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,s[e.level]=e}))),this._set("scales",l),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const i=Math.floor(e),l=i+1;return t[i]/(t[i]/t[l])**(e-i)}scaleToZoom(e){const t=this.scales,i=t.length-1;let l=0;for(;l<i;l++){const i=t[l],s=t[l+1];if(i<=e)return l;if(s===e)return l+1;if(i>e&&s<e)return l+Math.log(i/e)/Math.log(i/s)}return l}snapScale(e,t=.95){const i=this.scaleToZoom(e);return i%Math.floor(i)>=t?this.zoomToScale(Math.ceil(i)):this.zoomToScale(Math.floor(i))}tileAt(e,t,i,l){const s=this.lodAt(e);if(!s)return null;let o,r;if("number"==typeof t)o=t,r=i;else if((0,m.aI)(t.spatialReference,this.spatialReference))o=t.x,r=t.y,l=i;else{const e=(0,y.Cv)(t,this.spatialReference);if(null==e)return null;o=e.x,r=e.y,l=i}const n=s.resolution*this.size[0],a=s.resolution*this.size[1];return l||(l=new g.U(null,0,0,0,(0,v.vt)())),l.level=e,l.row=Math.floor((this.origin.y-r)/a+.001),l.col=Math.floor((o-this.origin.x)/n+.001),this.updateTileInfo(l),l}updateTileInfo(e,t=l.ExtrapolateOptions.NONE){let i=this.lodAt(e.level);if(!i&&t===l.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return;const s=e.level-i.level,o=i.resolution*this.size[0]/2**s,r=i.resolution*this.size[1]/2**s;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,v.vt)()),e.extent[0]=this.origin.x+e.col*o,e.extent[1]=this.origin.y-(e.row+1)*r,e.extent[2]=e.extent[0]+o,e.extent[3]=e.extent[1]+r}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const i=this.lodAt(t.level);if(null==i)return null;const{resolution:l}=i,s=l*this.size[0],o=l*this.size[1];return e[0]=this.origin.x+t.col*s,e[1]=this.origin.y-(t.row+1)*o,e[2]=e[0]+s,e[3]=e[1]+o,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return l.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;const t=(512===this.size[0]&&256===e?-1:0)+(this.spatialReference.isGeographic?1:0);if(this.size[0]===e&&0===t)return this;const i=[],s=this.lods.length-t;for(let e=0;e<s;e++){const l=e+t,{scale:s,resolution:o}=l>=0?this.lods[l]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};i.push(new w.A({level:e,scale:s,resolution:o}))}return new l({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){const l=e[i];this._upsampleLevels[l.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/l.resolution:0},t=l}}};var A,O;(0,s._)([(0,a.MZ)({type:Number,json:{write:!0}})],b.prototype,"compressionQuality",void 0),(0,s._)([(0,a.MZ)({type:Number,json:{write:!0}})],b.prototype,"dpi",void 0),(0,s._)([(0,a.MZ)({type:String,json:{read:_.read,write:_.write,origins:{"web-scene":{read:!1,write:!1}}}})],b.prototype,"format",void 0),(0,s._)([(0,a.MZ)({readOnly:!0})],b.prototype,"isWrappable",null),(0,s._)([(0,a.MZ)({type:f.A,json:{write:!0}})],b.prototype,"origin",void 0),(0,s._)([(0,h.w)("origin")],b.prototype,"readOrigin",null),(0,s._)([(0,a.MZ)({type:[w.A],value:null,json:{write:!0}})],b.prototype,"lods",null),(0,s._)([(0,a.MZ)({readOnly:!0})],b.prototype,"scales",void 0),(0,s._)([(0,a.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],b.prototype,"size",void 0),(0,s._)([(0,h.w)("size",["rows","cols"])],b.prototype,"readSize",null),(0,s._)([(0,u.K)("size",{cols:{type:c.jz},rows:{type:c.jz}})],b.prototype,"writeSize",null),(0,s._)([(0,a.MZ)({type:d.A,json:{write:!0}})],b.prototype,"spatialReference",void 0),b=l=(0,s._)([(0,p.$)("esri.layers.support.TileInfo")],b),(O=(A=b||(b={})).ExtrapolateOptions||(A.ExtrapolateOptions={}))[O.NONE=0]="NONE",O[O.POWER_OF_TWO=1]="POWER_OF_TWO";const M=b},65509:(e,t,i)=>{i.d(t,{A:()=>o});var l=i(49186),s=i(74887);class o{constructor(e,t=0,i=e.lods[e.lods.length-1].level){this.tileInfo=e,this.minLOD=t,this.maxLOD=i,e.lodAt(t)||(this.minLOD=e.lods[0].level),e.lodAt(i)||(this.maxLOD=e.lods[e.lods.length-1].level)}get effectiveMinLOD(){return this.minLOD??this.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}getAvailability(e,t,i){const l=this.tileInfo?.lodAt(e);return!l||e<this.minLOD||e>this.maxLOD?"unavailable":l.cols&&l.rows?i>=l.cols[0]&&i<=l.cols[1]&&t>=l.rows[0]&&t<=l.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(e,t,i,o){await(0,s.NO)(o);const r=this.getAvailability(e,t,i);if("unavailable"===r)throw new l.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i});return r}async fetchAvailabilityUpsample(e,t,i,l,o){await(0,s.NO)(o),l.level=e,l.row=t,l.col=i;const r=this.tileInfo;return r.updateTileInfo(l),this.fetchAvailability(e,t,i,o).catch((e=>{if((0,s.zf)(e))throw e;if(r.upsampleTile(l))return this.fetchAvailabilityUpsample(l.level,l.row,l.col,l,o);throw e}))}}},72802:(e,t,i)=>{i.d(t,{U:()=>l});class l{constructor(e,t,i,l,s=void 0){this.id=e,this.level=t,this.row=i,this.col=l,this.extent=s}}},25943:(e,t,i)=>{i.d(t,{d:()=>M});var l,s=i(90237),o=i(78888),r=i(69622),n=i(71903),a=i(49186),c=i(36563),h=i(55359),p=i(3694),u=i(74887),f=i(36708),d=i(11932),v=i(84952),m=i(10107),y=(i(44208),i(53966),i(87811),i(40608)),w=i(72802),g=i(4576),_=i(4718),b=i(34275);class A{constructor(e){!function(e){if(!e?.location)throw new a.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new a.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new a.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new a.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new a.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);const{location:t,data:i}=e;this.location=Object.freeze((0,_.o8)(t));const l=this.location.width,s=this.location.height;let o=!0,r=!0;const n=function(e,t=!1){return e<=b.y9?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(l*s/32));let c=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(r=!1,n[c]|=1<<t):o=!1,31===t&&++c}r?(this._availability="unavailable",this.byteSize=40):o?(this._availability="available",this.byteSize=40):(this._availability=n,this.byteSize=40+(0,b.Ek)(n))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),l=i%32,s=i>>5,o=this._availability;return s<0||s>o.length?"unknown":o[s]&1<<l?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||o.A,{row:l,col:s,width:r,height:n}=e,c={query:{f:"json"}};return t=t?{...c,...t}:c,i(function(e){let t;if(e.service.tileServers?.length){const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then((e=>e.data)).catch((e=>{if(e&&e.details&&422===e.details.httpStatus)return{location:{top:l,left:s,width:r,height:n},valid:!0,data:(0,g.dY)(r*n,0)};throw e})).then((e=>{if(e.location&&(e.location.top!==l||e.location.left!==s||e.location.width!==r||e.location.height!==n))throw new a.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:l,left:s,width:r,height:n}});return A.fromJSON(e)}))}static fromJSON(e){return Object.freeze(new A(e))}}function O(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}let M=l=class extends r.A{constructor(e){super(e),this._pendingTilemapRequests={},this.request=o.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new h.q(2*n.u.MEGABYTES),this.addHandles((0,f.wB)((()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]}),(()=>this._initializeTilemapDefinition()),f.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}fetchTilemap(e,t,i,l){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new a.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const s=this._tmpTilemapDefinition,o=this._tilemapFromCache(e,t,i,s);if(o)return Promise.resolve(o);const r=l?.signal;return l={...l,signal:null},new Promise(((e,t)=>{(0,u.u7)(r,(()=>t((0,u.NK)())));const i=O(s);let o=this._pendingTilemapRequests[i];if(!o){o=A.fromDefinition(s,l).then((e=>(this._tilemapCache.put(i,e,e.byteSize),e)));const e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=o,o.then(e,e)}o.then(e,t)}))}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";const l=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return l?l.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,l){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(new a.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})):this.fetchTilemap(e,t,i,l).catch((e=>e)).then((l=>{if(l instanceof A){const s=l.getAvailability(t,i);if("unavailable"===s)throw new a.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i});return s}if((0,u.zf)(l))throw l;return"unknown"}))}fetchAvailabilityUpsample(e,t,i,l,s){l.level=e,l.row=t,l.col=i;const o=this.layer.tileInfo;o.updateTileInfo(l);const r=this.fetchAvailability(e,t,i,s).catch((e=>{if((0,u.zf)(e))throw e;if(o.upsampleTile(l))return this.fetchAvailabilityUpsample(l.level,l.row,l.col,l,s);throw e}));return this._fetchAvailabilityUpsamplePrefetch(l.id,e,t,i,s,r),r}async _fetchAvailabilityUpsamplePrefetch(e,t,i,s,o,r){if(!this._prefetchingEnabled||null==e)return;const n=`prefetch-${e}`;if(this.hasHandles(n))return;const a=new AbortController;r.then((()=>a.abort()),(()=>a.abort()));let h=!1;const p=(0,c.hA)((()=>{h||(h=!0,a.abort())}));if(this.addHandles(p,n),await(0,d.md)(10,a.signal).catch((()=>{})),h||(h=!0,this.removeHandles(n)),(0,u.G4)(a))return;const f=new w.U(e,t,i,s),v={...o,signal:a.signal},m=this.layer.tileInfo;for(let e=0;l._prefetches.length<l._maxPrefetch&&m.upsampleTile(f);++e){const e=this.fetchAvailability(f.level,f.row,f.col,v);l._prefetches.push(e);const t=()=>{l._prefetches.removeUnordered(e)};e.then(t,t)}}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,v.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,l){l.level=e,l.row=t-t%this.size,l.col=i-i%this.size;const s=O(l);return this._tilemapCache.get(s)}get test(){const e=this;return{get prefetchingEnabled(){return e._prefetchingEnabled},set prefetchingEnabled(t){e._prefetchingEnabled=t},hasTilemap:(t,i,l)=>!!e._tilemapFromCache(t,i,l,e._tmpTilemapDefinition)}}};M._maxPrefetch=4,M._prefetches=new p.A({initialSize:l._maxPrefetch}),(0,s._)([(0,m.MZ)({constructOnly:!0})],M.prototype,"layer",void 0),(0,s._)([(0,m.MZ)({constructOnly:!0})],M.prototype,"minLOD",void 0),(0,s._)([(0,m.MZ)({constructOnly:!0})],M.prototype,"maxLOD",void 0),(0,s._)([(0,m.MZ)({constructOnly:!0})],M.prototype,"request",void 0),(0,s._)([(0,m.MZ)({constructOnly:!0})],M.prototype,"size",void 0),M=l=(0,s._)([(0,y.$)("esri.layers.support.TilemapCache")],M)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3666],{3666:(e,r,t)=>{t.r(r),t.d(r,{l:()=>l});var n,a,i,o=t(11053),u={exports:{}};n=u,a="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,"undefined"!=typeof __filename&&(a=a||__filename),i=function(e={}){var r,t,n=e;n.ready=new Promise(((e,n)=>{r=e,t=n}));var i,o,u,s=Object.assign({},n),l="./this.program",c="object"==typeof window,f="function"==typeof importScripts,d="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,h="";if(d){var p=require("fs"),m=require("path");h=f?m.dirname(h)+"/":__dirname+"/",i=(e,r)=>(e=I(e)?new URL(e):m.normalize(e),p.readFileSync(e,r?void 0:"utf8")),u=e=>{var r=i(e,!0);return r.buffer||(r=new Uint8Array(r)),r},o=(e,r,t,n=!0)=>{e=I(e)?new URL(e):m.normalize(e),p.readFile(e,n?void 0:"utf8",((e,a)=>{e?t(e):r(n?a.buffer:a)}))},!n.thisProgram&&process.argv.length>1&&(l=process.argv[1].replace(/\\/g,"/")),process.argv.slice(2),n.inspect=()=>"[Emscripten Module object]"}else(c||f)&&(f?h=self.location.href:"undefined"!=typeof document&&document.currentScript&&(h=document.currentScript.src),a&&(h=a),h=0!==h.indexOf("blob:")?h.substr(0,h.replace(/[?#].*/,"").lastIndexOf("/")+1):"",i=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},f&&(u=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),o=(e,r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?r(n.response):t()},n.onerror=t,n.send(null)});n.print||console.log.bind(console);var v,y,g=n.printErr||console.error.bind(console);Object.assign(n,s),s=null,n.arguments&&n.arguments,n.thisProgram&&(l=n.thisProgram),n.quit&&n.quit,n.wasmBinary&&(v=n.wasmBinary),n.noExitRuntime,"object"!=typeof WebAssembly&&$("no native wasm support detected");var w,_,b,A,T,C,E,F,P=!1;function S(){var e=y.buffer;n.HEAP8=w=new Int8Array(e),n.HEAP16=b=new Int16Array(e),n.HEAPU8=_=new Uint8Array(e),n.HEAPU16=A=new Uint16Array(e),n.HEAP32=T=new Int32Array(e),n.HEAPU32=C=new Uint32Array(e),n.HEAPF32=E=new Float32Array(e),n.HEAPF64=F=new Float64Array(e)}var W=[],R=[],M=[];function j(e){W.unshift(e)}function O(e){M.unshift(e)}var D=0,k=null;function $(e){n.onAbort&&n.onAbort(e),g(e="Aborted("+e+")"),P=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw t(r),r}var x;function U(e){return e.startsWith("data:application/octet-stream;base64,")}function I(e){return e.startsWith("file://")}function H(e){if(e==x&&v)return new Uint8Array(v);if(u)return u(e);throw"both async and sync fetching of the wasm failed"}function Y(e,r,t){return function(e){if(!v&&(c||f)){if("function"==typeof fetch&&!I(e))return fetch(e,{credentials:"same-origin"}).then((r=>{if(!r.ok)throw"failed to load wasm binary file at '"+e+"'";return r.arrayBuffer()})).catch((()=>H(e)));if(o)return new Promise(((r,t)=>{o(e,(e=>r(new Uint8Array(e))),t)}))}return Promise.resolve().then((()=>H(e)))}(e).then((e=>WebAssembly.instantiate(e,r))).then((e=>e)).then(t,(e=>{g(`failed to asynchronously prepare wasm: ${e}`),$(e)}))}U(x="lclayout.wasm")||(x=function(e){return n.locateFile?n.locateFile(e,h):h+e}(x));var z=e=>{for(;e.length>0;)e.shift()(n)};function V(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){C[this.ptr+4>>2]=e},this.get_type=function(){return C[this.ptr+4>>2]},this.set_destructor=function(e){C[this.ptr+8>>2]=e},this.get_destructor=function(){return C[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,w[this.ptr+12|0]=e},this.get_caught=function(){return 0!=w[this.ptr+12|0]},this.set_rethrown=function(e){e=e?1:0,w[this.ptr+13|0]=e},this.get_rethrown=function(){return 0!=w[this.ptr+13|0]},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){C[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return C[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Ye(this.get_type()))return C[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var B,q,L,G=e=>{for(var r="",t=e;_[t];)r+=B[_[t++]];return r},X={},N={},J={},Z=e=>{throw new q(e)},K=e=>{throw new L(e)},Q=(e,r,t)=>{function n(r){var n=t(r);n.length!==e.length&&K("Mismatched type converter count");for(var a=0;a<e.length;++a)ee(e[a],n[a])}e.forEach((function(e){J[e]=r}));var a=new Array(r.length),i=[],o=0;r.forEach(((e,r)=>{N.hasOwnProperty(e)?a[r]=N[e]:(i.push(e),X.hasOwnProperty(e)||(X[e]=[]),X[e].push((()=>{a[r]=N[e],++o===i.length&&n(a)})))})),0===i.length&&n(a)};function ee(e,r,t={}){if(!("argPackAdvance"in r))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,r,t={}){var n=r.name;if(e||Z(`type "${n}" must have a positive integer typeid pointer`),N.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;Z(`Cannot register type '${n}' twice`)}if(N[e]=r,delete J[e],X.hasOwnProperty(e)){var a=X[e];delete X[e],a.forEach((e=>e()))}}(e,r,t)}function re(){this.allocated=[void 0],this.freelist=[]}var te=new re;function ne(e){return this.fromWireType(T[e>>2])}var ae,ie,oe=(e,r)=>{switch(r){case 4:return function(e){return this.fromWireType(E[e>>2])};case 8:return function(e){return this.fromWireType(F[e>>3])};default:throw new TypeError(`invalid float width (${r}): ${e}`)}},ue=e=>{if(void 0===e)return"_unknown";var r=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return r>=48&&r<=57?`_${e}`:e},se=(e,r,t)=>{if(void 0===e[r].overloadTable){var n=e[r];e[r]=function(){return e[r].overloadTable.hasOwnProperty(arguments.length)||Z(`Function '${t}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[r].overloadTable})!`),e[r].overloadTable[arguments.length].apply(this,arguments)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n}},le=(e,r,t)=>{n.hasOwnProperty(e)?((void 0===t||void 0!==n[e].overloadTable&&void 0!==n[e].overloadTable[t])&&Z(`Cannot register public name '${e}' twice`),se(n,e,e),n.hasOwnProperty(t)&&Z(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),n[e].overloadTable[t]=r):(n[e]=r,void 0!==t&&(n[e].numArguments=t))},ce=(e,r,t)=>{n.hasOwnProperty(e)||K("Replacing nonexistant public symbol"),void 0!==n[e].overloadTable&&void 0!==t?n[e].overloadTable[t]=r:(n[e]=r,n[e].argCount=t)},fe=[],de=e=>{var r=fe[e];return r||(e>=fe.length&&(fe.length=e+1),fe[e]=r=ae.get(e)),r},he=(e,r)=>{var t=(e=G(e)).includes("j")?((e,r)=>{var t=[];return function(){return t.length=0,Object.assign(t,arguments),((e,r,t)=>e.includes("j")?((e,r,t)=>{var a=n["dynCall_"+e];return t&&t.length?a.apply(null,[r].concat(t)):a.call(null,r)})(e,r,t):de(r).apply(null,t))(e,r,t)}})(e,r):de(r);return"function"!=typeof t&&Z(`unknown function pointer with signature ${e}: ${r}`),t},pe=e=>{var r=xe(e),t=G(r);return He(r),t},me=(e,r,t)=>{switch(r){case 1:return t?e=>w[0|e]:e=>_[0|e];case 2:return t?e=>b[e>>1]:e=>A[e>>1];case 4:return t?e=>T[e>>2]:e=>C[e>>2];default:throw new TypeError(`invalid integer width (${r}): ${e}`)}};function ve(e){return this.fromWireType(C[e>>2])}var ye,ge=(e,r,t,n)=>{if(!(n>0))return 0;for(var a=t,i=t+n-1,o=0;o<e.length;++o){var u=e.charCodeAt(o);if(u>=55296&&u<=57343&&(u=65536+((1023&u)<<10)|1023&e.charCodeAt(++o)),u<=127){if(t>=i)break;r[t++]=u}else if(u<=2047){if(t+1>=i)break;r[t++]=192|u>>6,r[t++]=128|63&u}else if(u<=65535){if(t+2>=i)break;r[t++]=224|u>>12,r[t++]=128|u>>6&63,r[t++]=128|63&u}else{if(t+3>=i)break;r[t++]=240|u>>18,r[t++]=128|u>>12&63,r[t++]=128|u>>6&63,r[t++]=128|63&u}}return r[t]=0,t-a},we=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n<=127?r++:n<=2047?r+=2:n>=55296&&n<=57343?(r+=4,++t):r+=3}return r},_e="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,be=(e,r)=>e?((e,r,t)=>{for(var n=r+t,a=r;e[a]&&!(a>=n);)++a;if(a-r>16&&e.buffer&&_e)return _e.decode(e.subarray(r,a));for(var i="";r<a;){var o=e[r++];if(128&o){var u=63&e[r++];if(192!=(224&o)){var s=63&e[r++];if((o=224==(240&o)?(15&o)<<12|u<<6|s:(7&o)<<18|u<<12|s<<6|63&e[r++])<65536)i+=String.fromCharCode(o);else{var l=o-65536;i+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else i+=String.fromCharCode((31&o)<<6|u)}else i+=String.fromCharCode(o)}return i})(_,e,r):"",Ae="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Te=(e,r)=>{for(var t=e,n=t>>1,a=n+r/2;!(n>=a)&&A[n];)++n;if((t=n<<1)-e>32&&Ae)return Ae.decode(_.subarray(e,t));for(var i="",o=0;!(o>=r/2);++o){var u=b[e+2*o>>1];if(0==u)break;i+=String.fromCharCode(u)}return i},Ce=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<2)return 0;for(var n=r,a=(t-=2)<2*e.length?t/2:e.length,i=0;i<a;++i){var o=e.charCodeAt(i);b[r>>1]=o,r+=2}return b[r>>1]=0,r-n},Ee=e=>2*e.length,Fe=(e,r)=>{for(var t=0,n="";!(t>=r/4);){var a=T[e+4*t>>2];if(0==a)break;if(++t,a>=65536){var i=a-65536;n+=String.fromCharCode(55296|i>>10,56320|1023&i)}else n+=String.fromCharCode(a)}return n},Pe=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<4)return 0;for(var n=r,a=n+t-4,i=0;i<e.length;++i){var o=e.charCodeAt(i);if(o>=55296&&o<=57343&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++i)),T[r>>2]=o,(r+=4)+4>a)break}return T[r>>2]=0,r-n},Se=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n>=55296&&n<=57343&&++t,r+=4}return r};ye=()=>performance.now();var We=e=>{var r=(e-y.buffer.byteLength+65535)/65536;try{return y.grow(r),S(),1}catch(e){}},Re={},Me=()=>{if(!Me.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:l||"./this.program"};for(var r in Re)void 0===Re[r]?delete e[r]:e[r]=Re[r];var t=[];for(var r in e)t.push(`${r}=${e[r]}`);Me.strings=t}return Me.strings},je=e=>e%4==0&&(e%100!=0||e%400==0),Oe=[31,29,31,30,31,30,31,31,30,31,30,31],De=[31,28,31,30,31,30,31,31,30,31,30,31];(()=>{for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);B=e})(),q=n.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},L=n.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},Object.assign(re.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var r=this.freelist.pop()||this.allocated.length;return this.allocated[r]=e,r},free(e){this.allocated[e]=void 0,this.freelist.push(e)}}),te.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),te.reserved=te.allocated.length,n.count_emval_handles=()=>{for(var e=0,r=te.reserved;r<te.allocated.length;++r)void 0!==te.allocated[r]&&++e;return e},ie=n.UnboundTypeError=((e,r)=>{var t=function(e,r){return{[e=ue(e)]:function(){return r.apply(this,arguments)}}[e]}(r,(function(e){this.name=r,this.message=e;var t=new Error(e).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}));return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},t})(Error,"UnboundTypeError");var ke={a:(e,r,t)=>{throw new V(e).init(r,t),e},m:(e,r,t,n,a)=>{},k:(e,r,t,n)=>{ee(e,{name:r=G(r),fromWireType:function(e){return!!e},toWireType:function(e,r){return r?t:n},argPackAdvance:8,readValueFromPointer:function(e){return this.fromWireType(_[e])},destructorFunction:null})},i:(e,r,t)=>{e=G(e),Q([],[r],(function(r){return r=r[0],n[e]=r.fromWireType(t),[]}))},j:(e,r)=>{ee(e,{name:r=G(r),fromWireType:e=>{var r=(e=>(e||Z("Cannot use deleted val. handle = "+e),te.get(e).value))(e);return(e=>{e>=te.reserved&&0==--te.get(e).refcount&&te.free(e)})(e),r},toWireType:(e,r)=>(e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return te.allocate({refcount:1,value:e})}})(r),argPackAdvance:8,readValueFromPointer:ne,destructorFunction:null})},h:(e,r,t)=>{ee(e,{name:r=G(r),fromWireType:e=>e,toWireType:(e,r)=>r,argPackAdvance:8,readValueFromPointer:oe(r,t),destructorFunction:null})},b:(e,r,t,n,a,i,o)=>{var u=((e,r)=>{for(var t=[],n=0;n<e;n++)t.push(C[r+4*n>>2]);return t})(r,t);e=G(e),a=he(n,a),le(e,(function(){((e,r)=>{var t=[],n={};throw r.forEach((function e(r){n[r]||N[r]||(J[r]?J[r].forEach(e):(t.push(r),n[r]=!0))})),new ie(`${e}: `+t.map(pe).join([", "]))})(`Cannot call ${e} due to unbound types`,u)}),r-1),Q([],u,(function(t){var n=[t[0],null].concat(t.slice(1));return ce(e,function(e,r,t,n,a,i){var o=r.length;o<2&&Z("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var u=null!==r[1]&&!1,s=!1,l=1;l<r.length;++l)if(null!==r[l]&&void 0===r[l].destructorFunction){s=!0;break}var c="void"!==r[0].name,f=o-2,d=new Array(f),h=[],p=[];return function(){var t;arguments.length!==f&&Z(`function ${e} called with ${arguments.length} arguments, expected ${f}`),p.length=0,h.length=u?2:1,h[0]=a,u&&(t=r[1].toWireType(p,this),h[1]=t);for(var i=0;i<f;++i)d[i]=r[i+2].toWireType(p,arguments[i]),h.push(d[i]);return function(e){if(s)(e=>{for(;e.length;){var r=e.pop();e.pop()(r)}})(p);else for(var n=u?1:2;n<r.length;n++){var a=1===n?t:d[n-2];null!==r[n].destructorFunction&&r[n].destructorFunction(a)}if(c)return r[0].fromWireType(e)}(n.apply(null,h))}}(e,n,0,a,i),r-1),[]}))},d:(e,r,t,n,a)=>{r=G(r);var i=e=>e;if(0===n){var o=32-8*t;i=e=>e<<o>>>o}var u=r.includes("unsigned");ee(e,{name:r,fromWireType:i,toWireType:u?function(e,r){return this.name,r>>>0}:function(e,r){return this.name,r},argPackAdvance:8,readValueFromPointer:me(r,t,0!==n),destructorFunction:null})},c:(e,r,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function a(e){var r=C[e>>2],t=C[e+4>>2];return new n(w.buffer,t,r)}ee(e,{name:t=G(t),fromWireType:a,argPackAdvance:8,readValueFromPointer:a},{ignoreDuplicateRegistrations:!0})},g:(e,r)=>{var t="std::string"===(r=G(r));ee(e,{name:r,fromWireType(e){var r,n=C[e>>2],a=e+4;if(t)for(var i=a,o=0;o<=n;++o){var u=a+o;if(o==n||0==_[u]){var s=be(i,u-i);void 0===r?r=s:(r+=String.fromCharCode(0),r+=s),i=u+1}}else{var l=new Array(n);for(o=0;o<n;++o)l[o]=String.fromCharCode(_[a+o]);r=l.join("")}return He(e),r},toWireType(e,r){var n;r instanceof ArrayBuffer&&(r=new Uint8Array(r));var a="string"==typeof r;a||r instanceof Uint8Array||r instanceof Uint8ClampedArray||r instanceof Int8Array||Z("Cannot pass non-string to std::string"),n=t&&a?we(r):r.length;var i=Ie(4+n+1),o=i+4;if(C[i>>2]=n,t&&a)((e,r,t)=>{ge(e,_,r,t)})(r,o,n+1);else if(a)for(var u=0;u<n;++u){var s=r.charCodeAt(u);s>255&&(He(o),Z("String has UTF-16 code units that do not fit in 8 bits")),_[o+u]=s}else for(u=0;u<n;++u)_[o+u]=r[u];return null!==e&&e.push(He,i),i},argPackAdvance:8,readValueFromPointer:ve,destructorFunction(e){He(e)}})},e:(e,r,t)=>{var n,a,i,o,u;t=G(t),2===r?(n=Te,a=Ce,o=Ee,i=()=>A,u=1):4===r&&(n=Fe,a=Pe,o=Se,i=()=>C,u=2),ee(e,{name:t,fromWireType:e=>{for(var t,a=C[e>>2],o=i(),s=e+4,l=0;l<=a;++l){var c=e+4+l*r;if(l==a||0==o[c>>u]){var f=n(s,c-s);void 0===t?t=f:(t+=String.fromCharCode(0),t+=f),s=c+r}}return He(e),t},toWireType:(e,n)=>{"string"!=typeof n&&Z(`Cannot pass non-string to C++ string type ${t}`);var i=o(n),s=Ie(4+i+r);return C[s>>2]=i>>u,a(n,s+4,i+r),null!==e&&e.push(He,s),s},argPackAdvance:8,readValueFromPointer:ne,destructorFunction(e){He(e)}})},l:(e,r)=>{ee(e,{isVoid:!0,name:r=G(r),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,r)=>{}})},r:()=>!0,f:()=>{$("")},s:()=>Date.now(),n:()=>2147483648,u:ye,v:(e,r,t)=>_.copyWithin(e,r,r+t),t:e=>{var r=_.length,t=2147483648;if((e>>>=0)>t)return!1;for(var n=(e,r)=>e+(r-e%r)%r,a=1;a<=4;a*=2){var i=r*(1+.2/a);i=Math.min(i,e+100663296);var o=Math.min(t,n(Math.max(e,i),65536));if(We(o))return!0}return!1},p:(e,r)=>{var t=0;return Me().forEach(((n,a)=>{var i=r+t;C[e+4*a>>2]=i,((e,r)=>{for(var t=0;t<e.length;++t)w[0|r++]=e.charCodeAt(t);w[0|r]=0})(n,i),t+=n.length+1})),0},q:(e,r)=>{var t=Me();C[e>>2]=t.length;var n=0;return t.forEach((e=>n+=e.length+1)),C[r>>2]=n,0},o:(e,r,t,n,a)=>((e,r,t,n)=>{var a=C[n+40>>2],i={tm_sec:T[n>>2],tm_min:T[n+4>>2],tm_hour:T[n+8>>2],tm_mday:T[n+12>>2],tm_mon:T[n+16>>2],tm_year:T[n+20>>2],tm_wday:T[n+24>>2],tm_yday:T[n+28>>2],tm_isdst:T[n+32>>2],tm_gmtoff:T[n+36>>2],tm_zone:a?be(a):""},o=be(t),u={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var s in u)o=o.replace(new RegExp(s,"g"),u[s]);var l=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],c=["January","February","March","April","May","June","July","August","September","October","November","December"];function f(e,r,t){for(var n="number"==typeof e?e.toString():e||"";n.length<r;)n=t[0]+n;return n}function d(e,r){return f(e,r,"0")}function h(e,r){function t(e){return e<0?-1:e>0?1:0}var n;return 0===(n=t(e.getFullYear()-r.getFullYear()))&&0===(n=t(e.getMonth()-r.getMonth()))&&(n=t(e.getDate()-r.getDate())),n}function p(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function m(e){var r=((e,r)=>{for(var t=new Date(e.getTime());r>0;){var n=je(t.getFullYear()),a=t.getMonth(),i=(n?Oe:De)[a];if(!(r>i-t.getDate()))return t.setDate(t.getDate()+r),t;r-=i-t.getDate()+1,t.setDate(1),a<11?t.setMonth(a+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return t})(new Date(e.tm_year+1900,0,1),e.tm_yday),t=new Date(r.getFullYear(),0,4),n=new Date(r.getFullYear()+1,0,4),a=p(t),i=p(n);return h(a,r)<=0?h(i,r)<=0?r.getFullYear()+1:r.getFullYear():r.getFullYear()-1}var v={"%a":e=>l[e.tm_wday].substring(0,3),"%A":e=>l[e.tm_wday],"%b":e=>c[e.tm_mon].substring(0,3),"%B":e=>c[e.tm_mon],"%C":e=>d((e.tm_year+1900)/100|0,2),"%d":e=>d(e.tm_mday,2),"%e":e=>f(e.tm_mday,2," "),"%g":e=>m(e).toString().substring(2),"%G":e=>m(e),"%H":e=>d(e.tm_hour,2),"%I":e=>{var r=e.tm_hour;return 0==r?r=12:r>12&&(r-=12),d(r,2)},"%j":e=>d(e.tm_mday+((e,r)=>{for(var t=0,n=0;n<=r;t+=e[n++]);return t})(je(e.tm_year+1900)?Oe:De,e.tm_mon-1),3),"%m":e=>d(e.tm_mon+1,2),"%M":e=>d(e.tm_min,2),"%n":()=>"\n","%p":e=>e.tm_hour>=0&&e.tm_hour<12?"AM":"PM","%S":e=>d(e.tm_sec,2),"%t":()=>"\t","%u":e=>e.tm_wday||7,"%U":e=>{var r=e.tm_yday+7-e.tm_wday;return d(Math.floor(r/7),2)},"%V":e=>{var r=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&r++,r){if(53==r){var t=(e.tm_wday+371-e.tm_yday)%7;4==t||3==t&&je(e.tm_year)||(r=1)}}else{r=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&je(e.tm_year%400-1))&&r++}return d(r,2)},"%w":e=>e.tm_wday,"%W":e=>{var r=e.tm_yday+7-(e.tm_wday+6)%7;return d(Math.floor(r/7),2)},"%y":e=>(e.tm_year+1900).toString().substring(2),"%Y":e=>e.tm_year+1900,"%z":e=>{var r=e.tm_gmtoff,t=r>=0;return r=(r=Math.abs(r)/60)/60*100+r%60,(t?"+":"-")+String("0000"+r).slice(-4)},"%Z":e=>e.tm_zone,"%%":()=>"%"};for(var s in o=o.replace(/%%/g,"\0\0"),v)o.includes(s)&&(o=o.replace(new RegExp(s,"g"),v[s](i)));var y=function(e,r,t){var n=we(e)+1,a=new Array(n);return ge(e,a,0,a.length),a}(o=o.replace(/\0\0/g,"%"));return y.length>r?0:(((e,r)=>{w.set(e,r)})(y,e),y.length-1)})(e,r,t,n)},$e=function(){var e={a:ke};function r(e,r){return $e=e.exports,y=$e.w,S(),ae=$e.y,function(e){R.unshift(e)}($e.x),function(e){if(D--,n.monitorRunDependencies&&n.monitorRunDependencies(D),0==D&&k){var r=k;k=null,r()}}(),$e}if(D++,n.monitorRunDependencies&&n.monitorRunDependencies(D),n.instantiateWasm)try{return n.instantiateWasm(e,r)}catch(e){g(`Module.instantiateWasm callback failed with error: ${e}`),t(e)}return function(e,r,t,n){return e||"function"!=typeof WebAssembly.instantiateStreaming||U(r)||I(r)||d||"function"!=typeof fetch?Y(r,t,n):fetch(r,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,t).then(n,(function(e){return g(`wasm streaming compile failed: ${e}`),g("falling back to ArrayBuffer instantiation"),Y(r,t,n)}))))}(v,x,e,(function(e){r(e.instance)})).catch(t),{}}(),xe=e=>(xe=$e.z)(e);n.__embind_initialize_bindings=()=>(n.__embind_initialize_bindings=$e.A)();var Ue,Ie=n._malloc=e=>(Ie=n._malloc=$e.B)(e),He=n._free=e=>(He=n._free=$e.C)(e),Ye=e=>(Ye=$e.D)(e);function ze(){function e(){Ue||(Ue=!0,n.calledRun=!0,P||(z(R),r(n),n.onRuntimeInitialized&&n.onRuntimeInitialized(),function(){if(n.postRun)for("function"==typeof n.postRun&&(n.postRun=[n.postRun]);n.postRun.length;)O(n.postRun.shift());z(M)}()))}D>0||(function(){if(n.preRun)for("function"==typeof n.preRun&&(n.preRun=[n.preRun]);n.preRun.length;)j(n.preRun.shift());z(W)}(),D>0||(n.setStatus?(n.setStatus("Running..."),setTimeout((function(){setTimeout((function(){n.setStatus("")}),1),e()}),1)):e()))}if(n.dynCall_viijii=(e,r,t,a,i,o,u)=>(n.dynCall_viijii=$e.E)(e,r,t,a,i,o,u),n.dynCall_iiiiij=(e,r,t,a,i,o,u)=>(n.dynCall_iiiiij=$e.F)(e,r,t,a,i,o,u),n.dynCall_iiiiijj=(e,r,t,a,i,o,u,s,l)=>(n.dynCall_iiiiijj=$e.G)(e,r,t,a,i,o,u,s,l),n.dynCall_iiiiiijj=(e,r,t,a,i,o,u,s,l,c)=>(n.dynCall_iiiiiijj=$e.H)(e,r,t,a,i,o,u,s,l,c),k=function e(){Ue||ze(),Ue||(k=e)},n.preInit)for("function"==typeof n.preInit&&(n.preInit=[n.preInit]);n.preInit.length>0;)n.preInit.pop()();return ze(),e.ready},n.exports=i;const s=(0,o.g)(u.exports),l=Object.freeze(Object.defineProperty({__proto__:null,default:s},Symbol.toStringTag,{value:"Module"}))}}]);
@@ -1,4 +1,4 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[347],{76412:(t,e,n)=>{n.d(e,{a:()=>M,c:()=>p,d:()=>_,f:()=>P,g:()=>A,i:()=>j,n:()=>F}),n(44208);var r=n(53966),a=n(34727),i=n(58083),s=n(38954),o=n(51850),c=n(87317),h=n(91829),u=n(34304),l=n(88582),d=n(71351),f=n(44280),m=n(32114);const v=_();function _(){return(0,h.vt)()}const g=c.e,b=c.e;function p(t,e){return(0,c.c)(e,t)}function M(t){return t[3]}function A(t){return t}function P(t,e,n,r){return(0,h.fA)(t,e,n,r)}function x(t,e,n){if(null==e)return!1;if(!C(t,e,y))return!1;let{t0:r,t1:a}=y;if((r<0||a<r&&a>0)&&(r=a),r<0)return!1;if(n){const{origin:t,direction:a}=e;n[0]=t[0]+a[0]*r,n[1]=t[1]+a[1]*r,n[2]=t[2]+a[2]*r}return!0}const y={t0:0,t1:0};function C(t,e,n){const{origin:r,direction:a}=e,i=S;i[0]=r[0]-t[0],i[1]=r[1]-t[1],i[2]=r[2]-t[2];const s=a[0]*a[0]+a[1]*a[1]+a[2]*a[2];if(0===s)return!1;const o=2*(a[0]*i[0]+a[1]*i[1]+a[2]*i[2]),c=o*o-4*s*(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]-t[3]*t[3]);if(c<0)return!1;const h=Math.sqrt(c);return n.t0=(-o-h)/(2*s),n.t1=(-o+h)/(2*s),!0}const S=(0,o.vt)();function j(t,e){return x(t,e,null)}function w(t,e,n){const r=m.rq.get(),a=m.Rc.get();(0,s.b)(r,e.origin,e.direction);const o=M(t);(0,s.b)(n,r,e.origin),(0,s.h)(n,n,1/(0,s.l)(n)*o);const c=q(t,e.origin),h=(0,f.g7)(e.origin,n);return(0,i.$0)(a,h+c,r),(0,s.e)(n,n,a),n}function I(t,e,n){const r=(0,s.f)(m.rq.get(),e,t),a=(0,s.h)(m.rq.get(),r,t[3]/(0,s.l)(r));return(0,s.g)(n,a,t)}function q(t,e){const n=(0,s.f)(m.rq.get(),e,t),r=(0,s.l)(n),i=M(t),o=i+Math.abs(i-r);return(0,a.XM)(i/o)}const T=(0,o.vt)();function z(t,e,n,r){const i=(0,s.f)(T,e,t);switch(n){case l._.X:{const t=(0,a.jU)(i,T)[2];return(0,s.s)(r,-Math.sin(t),Math.cos(t),0)}case l._.Y:{const t=(0,a.jU)(i,T),e=t[1],n=t[2],o=Math.sin(e);return(0,s.s)(r,-o*Math.cos(n),-o*Math.sin(n),Math.cos(e))}case l._.Z:return(0,s.n)(r,i);default:return}}function N(t,e){const n=(0,s.f)(O,e,t);return(0,s.l)(n)-t[3]}function F(t,e){const n=(0,s.a)(t,e),r=M(t);return n<=r*r}const O=(0,o.vt)(),R=_();Object.freeze(Object.defineProperty({__proto__:null,NullSphere:v,altitudeAt:N,angleToSilhouette:q,axisAt:z,clear:function(t){t[0]=t[1]=t[2]=t[3]=0},closestPoint:function(t,e,n){return x(t,e,n)?n:((0,d.oC)(e,t,n),I(t,n,n))},closestPointOnSilhouette:w,containsPoint:F,copy:p,create:_,distanceToSilhouette:function(t,e){const n=(0,s.f)(m.rq.get(),e,t),r=(0,s.p)(n),a=t[3]*t[3];return Math.sqrt(Math.abs(r-a))},elevate:function(t,e,n){return t!==n&&(n[0]=t[0],n[1]=t[1],n[2]=t[2]),n[3]=t[3]+e,n},equals:b,exactEquals:g,fromCenterAndRadius:function(t,e){return(0,h.fA)(t[0],t[1],t[2],e)},fromRadius:function(t,e){return t[0]=t[1]=t[2]=0,t[3]=e,t},fromValues:P,getCenter:A,getRadius:M,intersectLine:function(t,e,n){const r=(0,d.Cr)(e,n);if(!C(t,r,y))return[];const{origin:a,direction:i}=r,{t0:c,t1:h}=y,l=e=>{const n=(0,o.vt)();return(0,s.r)(n,a,i,e),I(t,n,n)};return Math.abs(c-h)<(0,u.FD)()?[l(c)]:[l(c),l(h)]},intersectRay:x,intersectRayClosestSilhouette:function(t,e,n){if(x(t,e,n))return n;const r=w(t,e,m.rq.get());return(0,s.g)(n,e.origin,(0,s.h)(m.rq.get(),e.direction,(0,s.q)(e.origin,r)/(0,s.l)(e.direction))),n},intersectsRay:j,projectPoint:I,setAltitudeAt:function(t,e,n,r){const a=N(t,e),i=z(t,e,l._.Z,O),o=(0,s.h)(O,i,n-a);return(0,s.g)(r,e,o)},setExtent:function(t,e,n){return r.A.getLogger("esri.geometry.support.sphere").error("sphere.setExtent is not yet supported"),t!==n&&p(t,n),n},tmpSphere:R,union:function(t,e,n=(0,h.vt)()){const r=(0,s.q)(t,e),a=t[3],i=e[3];return r+i<a?((0,c.c)(n,t),n):r+a<i?((0,c.c)(n,e),n):((0,s.m)(n,t,e,(r+i-a)/(2*r)),n[3]=(r+a+i)/2,n)},wrap:function(t){return t}},Symbol.toStringTag,{value:"Module"}))},4341:(t,e,n)=>{n.d(e,{I:()=>a});var r=n(26390);class a{constructor(t){this._allocator=t,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,r.d)((()=>this._reset())),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const t=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*i);this._items.length=Math.min(t,this._items.length),this._itemsPtr=0}_grow(){for(let t=0;t<Math.max(8,Math.min(this._items.length,i));t++)this._items.push(this._allocator())}}const i=1024},71351:(t,e,n)=>{n.d(e,{Cr:()=>h,LV:()=>c,oC:()=>u,vt:()=>s}),n(4576);var r=n(4341),a=n(38954),i=n(51850);function s(t){return t?o((0,i.o8)(t.origin),(0,i.o8)(t.direction)):o((0,i.vt)(),(0,i.vt)())}function o(t,e){return{origin:t,direction:e}}function c(t,e){const n=l.get();return n.origin=t,n.direction=e,n}function h(t,e,n=s()){return(0,a.c)(n.origin,t),(0,a.f)(n.direction,e,t),n}function u(t,e,n){const r=(0,a.k)(t.direction,(0,a.f)(n,e,t.origin));return(0,a.g)(n,t.origin,(0,a.h)(n,t.direction,r)),n}n(32114);const l=new r.I((()=>s()))},66104:(t,e,n)=>{var r,a;n.d(e,{k5:()=>r}),n(34727),(a=r||(r={}))[a.Multiply=1]="Multiply",a[a.Ignore=2]="Ignore",a[a.Replace=3]="Replace",a[a.Tint=4]="Tint"},57005:(t,e,n)=>{n.d(e,{ab:()=>Mt,gm:()=>qt});var r=n(77690),a=n(29242),i=n(9093),s=n(67026),o=n(82534),c=n(38954),h=n(51850),u=n(87317),l=n(91829),d=n(73941),f=n(98764),m=n(48353),v=n(9762),_=n(37539),g=n(240),b=n(21325),p=n(32114),M=n(24151),A=n(48163),P=n(46610);const x=1e-6,y=(0,h.vt)(),C=(0,h.vt)();function S(t,e,n,r,a,i,s,o,c,h){return function(t,e,n){let r=bt(t.maxVert[0],t.minVert[0]),a=0;for(let e=1;e<7;++e){const n=bt(t.maxVert[e],t.minVert[e]);n>r&&(r=n,a=e)}mt(e,t.minVert[a]),mt(n,t.maxVert[a])}(t,r,a),bt(r,a)<x?1:(dt(s,r,a),_t(s,s),function(t,e,n,r){const{data:a,size:i}=t;let s=Number.NEGATIVE_INFINITY,o=0;for(let t=0;t<a.length;t+=i){R[0]=a[t]-e[0],R[1]=a[t+1]-e[1],R[2]=a[t+2]-e[2];const r=n[0]*R[0]+n[1]*R[1]+n[2]*R[2],i=n[0]*n[0]+n[1]*n[1]+n[2]*n[2],c=R[0]*R[0]+R[1]*R[1]+R[2]*R[2]-r*r/i;c>s&&(s=c,o=t)}return mt(r,a,o),s}(e,r,s,i)<x?2:(dt(o,a,i),_t(o,o),dt(c,i,r),_t(c,c),vt(n,o,s),_t(n,n),X(e,n,s,o,c,h),0))}const j=(0,h.vt)(),w=(0,h.vt)(),I=(0,h.vt)(),q=(0,h.vt)(),T=(0,h.vt)(),z=(0,h.vt)(),N=(0,h.vt)(),F=(0,h.vt)();function O(t,e,n,r,a,i,s,o,c){(function(t,e,n,r,a){!function(t,e,n,r,a){const{data:i,size:s}=t;mt(r,i),mt(a,r),n[0]=pt(k,e),n[1]=n[0];for(let t=s;t<i.length;t+=s){const s=i[t]*e[0]+i[t+1]*e[1]+i[t+2]*e[2];s<n[0]&&(n[0]=s,mt(r,i,t)),s>n[1]&&(n[1]=s,mt(a,i,t))}}(t,e,H,a,r);const i=pt(n,e);H[1]-x<=i&&(r[0]=void 0),H[0]+x>=i&&(a[0]=void 0)})(t,e,n,j,w),void 0!==j[0]&&(dt(I,j,n),_t(I,I),dt(q,j,r),_t(q,q),dt(T,j,a),_t(T,T),vt(z,q,i),_t(z,z),vt(N,T,s),_t(N,N),vt(F,I,o),_t(F,F),X(t,z,i,q,I,c),X(t,N,s,T,q,c),X(t,F,o,I,T,c)),void 0!==w[0]&&(dt(I,w,n),_t(I,I),dt(q,w,r),_t(q,q),dt(T,w,a),_t(T,T),vt(z,q,i),_t(z,z),vt(N,T,s),_t(N,N),vt(F,I,o),_t(F,F),X(t,z,i,q,I,c),X(t,N,s,T,q,c),X(t,F,o,I,T,c))}const R=[0,0,0],H=(0,A.vt)(),D=(0,h.vt)(),V=(0,h.vt)(),B=(0,h.vt)(),E=(0,h.vt)(),L=(0,h.vt)(),U=(0,h.vt)();function X(t,e,n,r,a,i){if(gt(e)<x)return;vt(D,n,e),vt(V,r,e),vt(B,a,e),G(t,e,H),L[1]=H[0],E[1]=H[1],U[1]=E[1]-L[1];const s=[n,r,a],o=[D,V,B];for(let n=0;n<3;++n){G(t,s[n],H),L[0]=H[0],E[0]=H[1],G(t,o[n],H),L[2]=H[0],E[2]=H[1],U[0]=E[0]-L[0],U[2]=E[2]-L[2];const r=ut(U);r<i.quality&&(mt(i.b0,s[n]),mt(i.b1,e),mt(i.b2,o[n]),i.quality=r)}}const k=(0,h.vt)();function G(t,e,n){const{data:r,size:a}=t;n[0]=Number.POSITIVE_INFINITY,n[1]=Number.NEGATIVE_INFINITY;for(let t=0;t<r.length;t+=a){const a=r[t]*e[0]+r[t+1]*e[1]+r[t+2]*e[2];n[0]=Math.min(n[0],a),n[1]=Math.max(n[1],a)}}function Q(t,e,n){n.center=t,n.halfSize=(0,c.h)(e,e,.5),n.quaternion=o.zK}const Y=(0,h.vt)(),W=(0,h.vt)(),Z=(0,h.vt)(),$=(0,h.vt)(),K=(0,h.vt)(),J=(0,h.vt)();function tt(t,e,n){mt(Y,e),Math.abs(e[0])>Math.abs(e[1])&&Math.abs(e[0])>Math.abs(e[2])?Y[0]=0:Math.abs(e[1])>Math.abs(e[2])?Y[1]=0:Y[2]=0,gt(Y)<x&&(Y[0]=Y[1]=Y[2]=1),vt(W,e,Y),_t(W,W),vt(Z,e,W),_t(Z,Z),et(t,e,W,Z,$,K),dt(J,K,$),ot(e,W,Z,$,K,J,n)}function et(t,e,n,r,a,i){G(t,e,H),a[0]=H[0],i[0]=H[1],G(t,n,H),a[1]=H[0],i[1]=H[1],G(t,r,H),a[2]=H[0],i[2]=H[1]}const nt=(0,h.vt)(),rt=(0,h.vt)(),at=(0,h.vt)(),it=(0,a.fA)(1,0,0,0,1,0,0,0,1),st=(0,o.vt)();function ot(t,e,n,r,a,i,s){it[0]=t[0],it[1]=t[1],it[2]=t[2],it[3]=e[0],it[4]=e[1],it[5]=e[2],it[6]=n[0],it[7]=n[1],it[8]=n[2],s.quaternion=function(t,e){const n=e[0]+e[4]+e[8];if(n>0){let r=Math.sqrt(n+1);t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r}else{let n=0;e[4]>e[0]&&(n=1),e[8]>e[3*n+n]&&(n=2);const r=(n+1)%3,a=(n+2)%3;let i=Math.sqrt(e[3*n+n]-e[3*r+r]-e[3*a+a]+1);t[n]=.5*i,i=.5/i,t[3]=(e[3*r+a]-e[3*a+r])*i,t[r]=(e[3*r+n]+e[3*n+r])*i,t[a]=(e[3*a+n]+e[3*n+a])*i}return t}(st,it),lt(nt,r,a),ft(nt,nt,.5),ft(rt,t,nt[0]),ft(at,e,nt[1]),lt(rt,rt,at),ft(at,n,nt[2]),s.center=(0,c.g)(rt,rt,at),s.halfSize=(0,c.h)(nt,i,.5)}class ct{constructor(t){this.minVert=new Array(7),this.maxVert=new Array(7),this.buffer=new ArrayBuffer(448);let e=0;this.minProj=new Float64Array(this.buffer,e,7),e+=56,this.maxProj=new Float64Array(this.buffer,e,7),e+=56;for(let t=0;t<7;++t)this.minVert[t]=new Float64Array(this.buffer,e,3),e+=24;for(let t=0;t<7;++t)this.maxVert[t]=new Float64Array(this.buffer,e,3),e+=24;for(let t=0;t<7;++t)this.minProj[t]=Number.POSITIVE_INFINITY,this.maxProj[t]=Number.NEGATIVE_INFINITY;const n=new Array(7),r=new Array(7),{data:a,size:i}=t;for(let t=0;t<a.length;t+=i){let e=a[t];e<this.minProj[0]&&(this.minProj[0]=e,n[0]=t),e>this.maxProj[0]&&(this.maxProj[0]=e,r[0]=t),e=a[t+1],e<this.minProj[1]&&(this.minProj[1]=e,n[1]=t),e>this.maxProj[1]&&(this.maxProj[1]=e,r[1]=t),e=a[t+2],e<this.minProj[2]&&(this.minProj[2]=e,n[2]=t),e>this.maxProj[2]&&(this.maxProj[2]=e,r[2]=t),e=a[t]+a[t+1]+a[t+2],e<this.minProj[3]&&(this.minProj[3]=e,n[3]=t),e>this.maxProj[3]&&(this.maxProj[3]=e,r[3]=t),e=a[t]+a[t+1]-a[t+2],e<this.minProj[4]&&(this.minProj[4]=e,n[4]=t),e>this.maxProj[4]&&(this.maxProj[4]=e,r[4]=t),e=a[t]-a[t+1]+a[t+2],e<this.minProj[5]&&(this.minProj[5]=e,n[5]=t),e>this.maxProj[5]&&(this.maxProj[5]=e,r[5]=t),e=a[t]-a[t+1]-a[t+2],e<this.minProj[6]&&(this.minProj[6]=e,n[6]=t),e>this.maxProj[6]&&(this.maxProj[6]=e,r[6]=t)}for(let t=0;t<7;++t){let e=n[t];mt(this.minVert[t],a,e),e=r[t],mt(this.maxVert[t],a,e)}}}class ht{constructor(){this.b0=(0,h.fA)(1,0,0),this.b1=(0,h.fA)(0,1,0),this.b2=(0,h.fA)(0,0,1),this.quality=0}}function ut(t){return t[0]*t[1]+t[0]*t[2]+t[1]*t[2]}function lt(t,e,n){t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2]}function dt(t,e,n){t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2]}function ft(t,e,n){t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function mt(t,e,n=0){t[0]=e[n],t[1]=e[n+1],t[2]=e[n+2]}function vt(t,e,n){const r=e[0],a=e[1],i=e[2],s=n[0],o=n[1],c=n[2];t[0]=a*c-i*o,t[1]=i*s-r*c,t[2]=r*o-a*s}function _t(t,e){const n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2];if(n>0){const r=1/Math.sqrt(n);t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r}}function gt(t){return t[0]*t[0]+t[1]*t[1]+t[2]*t[2]}function bt(t,e){const n=e[0]-t[0],r=e[1]-t[1],a=e[2]-t[2];return n*n+r*r+a*a}function pt(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}class Mt{constructor(t=h.uY,e=Xt,n=o.zK){this._data=[t[0],t[1],t[2],e[0],e[1],e[2],n[0],n[1],n[2],n[3]]}clone(){const t=new Mt;return t._data=this._data.slice(),t}invalidate(){this._data[3]=-1}get isValid(){return this._data[3]>=0}static fromData(t){const e=new Mt;return e._data=t.slice(),e}static fromJSON(t){return new Mt(t.center,t.halfSize,t.quaternion)}copy(t){this._data=t.data.slice()}get center(){return(0,c.s)(p.rq.get(),this._data[0],this._data[1],this._data[2])}get centerX(){return this._data[0]}get centerY(){return this._data[1]}get centerZ(){return this._data[2]}getCenter(t){return t[0]=this._data[0],t[1]=this._data[1],t[2]=this._data[2],t}set center(t){this._data[0]=t[0],this._data[1]=t[1],this._data[2]=t[2]}setCenter(t,e,n){this._data[0]=t,this._data[1]=e,this._data[2]=n}get halfSize(){return(0,c.s)(p.rq.get(),this._data[3],this._data[4],this._data[5])}get halfSizeX(){return this._data[3]}get halfSizeY(){return this._data[4]}get halfSizeZ(){return this._data[5]}getHalfSize(t){return t[0]=this._data[3],t[1]=this._data[4],t[2]=this._data[5],t}set halfSize(t){this._data[3]=t[0],this._data[4]=t[1],this._data[5]=t[2]}get quaternion(){return(0,s.hZ)(p.J8.get(),this._data[6],this._data[7],this._data[8],this._data[9])}getQuaternion(t){return t[0]=this._data[6],t[1]=this._data[7],t[2]=this._data[8],t[3]=this._data[9],t}set quaternion(t){this._data[6]=t[0],this._data[7]=t[1],this._data[8]=t[2],this._data[9]=t[3]}get data(){return this._data}getCorners(t){const e=At,n=this._data;e[0]=n[6],e[1]=n[7],e[2]=n[8],e[3]=n[9];for(let r=0;r<8;++r){const a=t[r];a[0]=(1&r?-1:1)*n[3],a[1]=(2&r?-1:1)*n[4],a[2]=(4&r?-1:1)*n[5],(0,c.u)(a,a,e),a[0]+=n[0],a[1]+=n[1],a[2]+=n[2]}}doesIntersectFrustumConservativeApproximation(t){return this.intersectPlane(t[0])<=0&&this.intersectPlane(t[1])<=0&&this.intersectPlane(t[2])<=0&&this.intersectPlane(t[3])<=0&&this.intersectPlane(t[4])<=0&&this.intersectPlane(t[5])<=0}get radius(){const t=this._data[3],e=this._data[4],n=this._data[5];return Math.sqrt(t*t+e*e+n*n)}intersectSphere(t){yt[0]=this._data[0]-t[0],yt[1]=this._data[1]-t[1],yt[2]=this._data[2]-t[2];const e=this.getQuaternion(Pt);return(0,s.Xr)(At,e),(0,c.u)(yt,yt,At),(0,c.v)(yt,yt),Ct[0]=Math.min(yt[0],this._data[3]),Ct[1]=Math.min(yt[1],this._data[4]),Ct[2]=Math.min(yt[2],this._data[5]),(0,c.w)(Ct,yt)<t[3]*t[3]}intersectSphereWithMBS(t,e=this.radius){const n=this._data;yt[0]=n[0]-t[0],yt[1]=n[1]-t[1],yt[2]=n[2]-t[2];const r=t[3],a=r+e;return!((0,c.x)(yt)>a*a)&&(At[0]=-n[6],At[1]=-n[7],At[2]=-n[8],At[3]=n[9],(0,c.u)(yt,yt,At),(0,c.v)(yt,yt),Ct[0]=Math.min(yt[0],n[3]),Ct[1]=Math.min(yt[1],n[4]),Ct[2]=Math.min(yt[2],n[5]),(0,c.w)(Ct,yt)<r*r)}intersectPlane(t){const e=t[0]*this._data[0]+t[1]*this._data[1]+t[2]*this._data[2]+t[3],n=this.projectedRadius((0,g.Qj)(t));return e>n?1:e<-n?-1:0}intersectRay(t,e,n=0){const r=this._data,a=At;a[0]=-r[6],a[1]=-r[7],a[2]=-r[8],a[3]=r[9],yt[0]=t[0]-r[0],yt[1]=t[1]-r[1],yt[2]=t[2]-r[2];const i=(0,c.u)(yt,yt,At),s=(0,c.u)(Ct,e,At);let o=-1/0,h=1/0;const u=this.getHalfSize(Ht);for(let t=0;t<3;t++){const e=i[t],r=s[t],a=u[t]+n;if(Math.abs(r)>1e-6){const t=(a-e)/r,n=(-a-e)/r;o=Math.max(o,Math.min(t,n)),h=Math.min(h,Math.max(t,n))}else if(e>a||e<-a)return!1}return o<=h}projectedArea(t,e,n,a){const i=this.getQuaternion(Pt);(0,s.Xr)(At,i),yt[0]=t[0]-this._data[0],yt[1]=t[1]-this._data[1],yt[2]=t[2]-this._data[2],(0,c.u)(yt,yt,At);const o=this.getHalfSize(Ht),h=yt[0]<-o[0]?-1:yt[0]>o[0]?1:0,l=yt[1]<-o[1]?-1:yt[1]>o[1]?1:0,d=yt[2]<-o[2]?-1:yt[2]>o[2]?1:0,f=Math.abs(h)+Math.abs(l)+Math.abs(d);if(0===f)return 1/0;const m=1===f?4:6,v=6*(h+3*l+9*d+13);(0,r.I0)(Dt,i),(0,r.hs)(Dt,Dt,o);const _=this.getCenter(Ot);for(let t=0;t<m;t++){const n=It[v+t];(0,c.s)(yt,((1&n)<<1)-1,(2&n)-1,((4&n)>>1)-1),(0,c.t)(yt,yt,Dt),(0,c.g)(St,_,yt),St[3]=1,(0,u.t)(St,St,e);const r=1/Math.max(1e-6,St[3]);wt[2*t]=St[0]*r,wt[2*t+1]=St[1]*r}const g=2*m-2;let b=wt[0]*(wt[3]-wt[g+1])+wt[g]*(wt[1]-wt[g-1]);for(let t=2;t<g;t+=2)b+=wt[t]*(wt[t+3]-wt[t-1]);return Math.abs(b)*n*a*.125}projectedRadius(t){const e=this.getQuaternion(Pt);return(0,s.Xr)(At,e),(0,c.u)(yt,t,At),Math.abs(yt[0]*this._data[3])+Math.abs(yt[1]*this._data[4])+Math.abs(yt[2]*this._data[5])}minimumDistancePlane(t){return t[0]*this._data[0]+t[1]*this._data[1]+t[2]*this._data[2]+t[3]-this.projectedRadius((0,g.Qj)(t))}maximumDistancePlane(t){return t[0]*this._data[0]+t[1]*this._data[1]+t[2]*this._data[2]+t[3]+this.projectedRadius((0,g.Qj)(t))}toAaBoundingBox(t){const e=this.getQuaternion(Pt),n=(0,r.I0)(Dt,e),a=this._data[3]*Math.abs(n[0])+this._data[4]*Math.abs(n[3])+this._data[5]*Math.abs(n[6]),i=this._data[3]*Math.abs(n[1])+this._data[4]*Math.abs(n[4])+this._data[5]*Math.abs(n[7]),s=this._data[3]*Math.abs(n[2])+this._data[4]*Math.abs(n[5])+this._data[5]*Math.abs(n[8]);t[0]=this._data[0]-a,t[1]=this._data[1]-i,t[2]=this._data[2]-s,t[3]=this._data[0]+a,t[4]=this._data[1]+i,t[5]=this._data[2]+s}transform(t,e,n,r=0,a=(0,f.lO)(n),i=(0,f.lO)(e),o=(0,_.jd)(e,i)){if(n===a)e.isGeographic?function(t,e,n,r,a=(0,f.lO)(n)){const i=(0,d.tO)(n),o=1+Math.max(0,r)/(i.radius+t.centerZ);t.getCenter(Ft),Ft[2]+=r,(0,v.projectBuffer)(Ft,n,0,Ft,a,0,1),e.center=Ft;const h=t.getQuaternion(Pt);e.quaternion=h,(0,s.Xr)(At,h),(0,c.s)(Et,0,0,1),(0,c.u)(Et,Et,At);const u=t.getHalfSize(Ht);(0,c.s)(Et,u[0]*Math.abs(Et[0]),u[1]*Math.abs(Et[1]),u[2]*Math.abs(Et[2])),(0,c.h)(Et,Et,i.inverseFlattening),(0,c.g)(Et,u,Et),e.halfSize=(0,c.h)(Et,Et,o)}(this,t,e,r,i):function(t,e,n,r,a=(0,f.lO)(n),i=(0,_.jd)(n,a)){t.getCorners(Bt),t.getCenter(Ft),Ft[2]+=r,(0,m.l)(n,Ft,Vt,a),e.setCenter(Vt[12],Vt[13],Vt[14]);const o=2*Math.sqrt(1+Vt[0]+Vt[5]+Vt[10]);At[0]=(Vt[6]-Vt[9])/o,At[1]=(Vt[8]-Vt[2])/o,At[2]=(Vt[1]-Vt[4])/o,At[3]=.25*o;const h=t.getQuaternion(Pt);e.quaternion=(0,s.lw)(At,At,h),(0,s.Xr)(At,At),(0,c.s)(Lt,0,0,0);const u=e.getCenter(Rt);for(const t of Bt)t[2]+=r,i(t,0,t,0),(0,c.z)(Et,t,u),(0,c.u)(Et,Et,At),(0,c.v)(Et,Et),(0,c.C)(Lt,Lt,Et);e.halfSize=Lt}(this,t,e,r,i,o);else if(e.isWGS84&&(n.isWebMercator||(0,b.r1)(n)))!function(t,e,n,r,a){e.getCenter(Ot),Ot[2]+=a;const i=(0,f.lO)(n);(0,v.projectBuffer)(Ot,t,0,Ot,i,0,1),Tt(i,e,Ot,n,r)}(e,this,n,t,r);else if(e.isWebMercator&&(0,b.r1)(n))!function(t,e,n,r,a){e.getCenter(Ot),Ot[2]+=a,Tt(t,e,Ot,n,r)}(e,this,n,t,r);else{const a=this.getCenter(Ot);a[2]+=r,(0,v.projectBuffer)(a,e,0,a,n,0,1),t.center=a,this!==t&&(t.quaternion=this.getQuaternion(Pt),t.halfSize=this.getHalfSize(Ht))}}}const At=(0,o.vt)(),Pt=(0,o.vt)(),xt=(0,o.vt)(),yt=(0,h.vt)(),Ct=(0,h.vt)(),St=(0,l.vt)();function jt(t,e=new Mt){return function(t,e){const{data:n,size:r}=t,a=n.length/r;if(a<=0)return;const i=new ct(t);lt(y,i.minProj,i.maxProj),ft(y,y,.5),dt(C,i.maxProj,i.minProj);const s=ut(C),o=new ht;o.quality=s,a<14&&(t=new P.K(new Float64Array(i.buffer,112,42),3));const c=(0,h.vt)(),u=(0,h.vt)(),l=(0,h.vt)(),d=(0,h.vt)(),f=(0,h.vt)(),m=(0,h.vt)(),v=(0,h.vt)();switch(S(i,t,v,c,u,l,d,f,m,o)){case 1:return void Q(y,C,e);case 2:return void tt(t,d,e)}O(t,v,c,u,l,d,f,m,o),et(t,o.b0,o.b1,o.b2,$,K);const _=(0,h.vt)();dt(_,K,$),o.quality=ut(_),o.quality<s?ot(o.b0,o.b1,o.b2,$,K,_,e):Q(y,C,e)}(t,e),e}const wt=[.1,.2,.3,.4,.5,.6,.7,.8,.9,1,1.1,1.2],It=(()=>{const t=new Int8Array(162);let e=0;const n=n=>{for(let r=0;r<n.length;r++)t[e+r]=n[r];e+=6};return n([6,2,3,1,5,4]),n([0,2,3,1,5,4]),n([0,2,3,7,5,4]),n([0,1,3,2,6,4]),n([0,1,3,2,0,0]),n([0,1,5,7,3,2]),n([0,1,3,7,6,4]),n([0,1,3,7,6,2]),n([0,1,5,7,6,2]),n([0,1,5,4,6,2]),n([0,1,5,4,0,0]),n([0,1,3,7,5,4]),n([0,2,6,4,0,0]),n([0,0,0,0,0,0]),n([1,3,7,5,0,0]),n([2,3,7,6,4,0]),n([2,3,7,6,0,0]),n([2,3,1,5,7,6]),n([0,1,5,7,6,2]),n([0,1,5,7,6,4]),n([0,1,3,7,6,4]),n([4,5,7,6,2,0]),n([4,5,7,6,0,0]),n([4,5,1,3,7,6]),n([0,2,3,7,5,4]),n([6,2,3,7,5,4]),n([6,2,3,1,5,4]),t})();function qt(t,e,n,r,a){const i=t.getQuaternion(Pt);a.quaternion=i,(0,s.Xr)(At,i);const o=t.getCenter(Ot),u=t.getHalfSize(Ht);if(r===M.RT.Global){(0,c.u)(Et,o,At),(0,c.v)(Lt,Et),(0,c.y)(Ut,Lt,u),(0,c.z)(Ut,Lt,Ut);const r=(0,c.l)(Ut);(0,c.g)(Ut,Lt,u);const i=(0,c.l)(Ut);if(r<n)a.center=o,(0,c.s)(Et,n,n,n),a.halfSize=(0,c.g)(Et,u,Et);else{const s=i>0?1+e/i:1,o=r>0?1+n/r:1,h=(o+s)/2,l=(o-s)/2;(0,c.h)(Ut,Lt,l),a.halfSize=(0,c.r)(Ut,Ut,u,h),(0,c.h)(Ut,Lt,h),(0,c.r)(Ut,Ut,u,l),(0,c.A)(Et,Et),(0,c.B)(Et,Ut,Et);const d=t.getQuaternion(xt);a.center=(0,c.u)(Et,Et,d)}}else{a.center=(0,c.r)(Et,o,h.Cb,(n+e)/2);const t=(0,c.u)(Et,h.Cb,At);(0,c.v)(t,t),a.halfSize=(0,c.r)(Lt,u,t,(n-e)/2)}return a}function Tt(t,e,n,a,i){const s=e.getQuaternion(Pt),o=(0,r.I0)(Dt,s),c=e.getHalfSize(Ht);for(let t=0;t<8;++t){for(let e=0;e<3;++e)Ft[e]=c[e]*(0!=(t&1<<e)?-1:1);for(let e=0;e<3;++e){let r=n[e];for(let t=0;t<3;++t)r+=Ft[t]*o[3*t+e];zt[3*t+e]=r}}(0,v.projectBuffer)(zt,t,0,zt,a,0,8),jt(Nt,i)}const zt=new Array(24),Nt=new P.K(zt,3),Ft=(0,h.vt)(),Ot=(0,h.vt)(),Rt=(0,h.vt)(),Ht=(0,h.vt)(),Dt=(0,a.vt)(),Vt=(0,i.vt)(),Bt=[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],Et=(0,h.vt)(),Lt=(0,h.vt)(),Ut=(0,h.vt)(),Xt=(0,h.fA)(-1,-1,-1)},42583:(t,e,n)=>{n.d(e,{A:()=>i});var r=n(66104),a=n(2597);function i(t){t.vertex.code.add(a.H`
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[347],{76412:(t,e,n)=>{n.d(e,{a:()=>M,c:()=>p,d:()=>_,f:()=>P,g:()=>A,i:()=>j,n:()=>F}),n(44208);var r=n(53966),a=n(34727),i=n(58083),s=n(38954),o=n(51850),c=n(87317),h=n(91829),u=n(34304),l=n(88582),d=n(71351),f=n(44280),m=n(32114);const v=_();function _(){return(0,h.vt)()}const g=c.e,b=c.e;function p(t,e){return(0,c.c)(e,t)}function M(t){return t[3]}function A(t){return t}function P(t,e,n,r){return(0,h.fA)(t,e,n,r)}function x(t,e,n){if(null==e)return!1;if(!C(t,e,y))return!1;let{t0:r,t1:a}=y;if((r<0||a<r&&a>0)&&(r=a),r<0)return!1;if(n){const{origin:t,direction:a}=e;n[0]=t[0]+a[0]*r,n[1]=t[1]+a[1]*r,n[2]=t[2]+a[2]*r}return!0}const y={t0:0,t1:0};function C(t,e,n){const{origin:r,direction:a}=e,i=S;i[0]=r[0]-t[0],i[1]=r[1]-t[1],i[2]=r[2]-t[2];const s=a[0]*a[0]+a[1]*a[1]+a[2]*a[2];if(0===s)return!1;const o=2*(a[0]*i[0]+a[1]*i[1]+a[2]*i[2]),c=o*o-4*s*(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]-t[3]*t[3]);if(c<0)return!1;const h=Math.sqrt(c);return n.t0=(-o-h)/(2*s),n.t1=(-o+h)/(2*s),!0}const S=(0,o.vt)();function j(t,e){return x(t,e,null)}function w(t,e,n){const r=m.rq.get(),a=m.Rc.get();(0,s.b)(r,e.origin,e.direction);const o=M(t);(0,s.b)(n,r,e.origin),(0,s.h)(n,n,1/(0,s.l)(n)*o);const c=q(t,e.origin),h=(0,f.g7)(e.origin,n);return(0,i.$0)(a,h+c,r),(0,s.e)(n,n,a),n}function I(t,e,n){const r=(0,s.f)(m.rq.get(),e,t),a=(0,s.h)(m.rq.get(),r,t[3]/(0,s.l)(r));return(0,s.g)(n,a,t)}function q(t,e){const n=(0,s.f)(m.rq.get(),e,t),r=(0,s.l)(n),i=M(t),o=i+Math.abs(i-r);return(0,a.XM)(i/o)}const T=(0,o.vt)();function z(t,e,n,r){const i=(0,s.f)(T,e,t);switch(n){case l._.X:{const t=(0,a.jU)(i,T)[2];return(0,s.s)(r,-Math.sin(t),Math.cos(t),0)}case l._.Y:{const t=(0,a.jU)(i,T),e=t[1],n=t[2],o=Math.sin(e);return(0,s.s)(r,-o*Math.cos(n),-o*Math.sin(n),Math.cos(e))}case l._.Z:return(0,s.n)(r,i);default:return}}function N(t,e){const n=(0,s.f)(O,e,t);return(0,s.l)(n)-t[3]}function F(t,e){const n=(0,s.a)(t,e),r=M(t);return n<=r*r}const O=(0,o.vt)(),R=_();Object.freeze(Object.defineProperty({__proto__:null,NullSphere:v,altitudeAt:N,angleToSilhouette:q,axisAt:z,clear:function(t){t[0]=t[1]=t[2]=t[3]=0},closestPoint:function(t,e,n){return x(t,e,n)?n:((0,d.oC)(e,t,n),I(t,n,n))},closestPointOnSilhouette:w,containsPoint:F,copy:p,create:_,distanceToSilhouette:function(t,e){const n=(0,s.f)(m.rq.get(),e,t),r=(0,s.p)(n),a=t[3]*t[3];return Math.sqrt(Math.abs(r-a))},elevate:function(t,e,n){return t!==n&&(n[0]=t[0],n[1]=t[1],n[2]=t[2]),n[3]=t[3]+e,n},equals:b,exactEquals:g,fromCenterAndRadius:function(t,e){return(0,h.fA)(t[0],t[1],t[2],e)},fromRadius:function(t,e){return t[0]=t[1]=t[2]=0,t[3]=e,t},fromValues:P,getCenter:A,getRadius:M,intersectLine:function(t,e,n){const r=(0,d.Cr)(e,n);if(!C(t,r,y))return[];const{origin:a,direction:i}=r,{t0:c,t1:h}=y,l=e=>{const n=(0,o.vt)();return(0,s.r)(n,a,i,e),I(t,n,n)};return Math.abs(c-h)<(0,u.FD)()?[l(c)]:[l(c),l(h)]},intersectRay:x,intersectRayClosestSilhouette:function(t,e,n){if(x(t,e,n))return n;const r=w(t,e,m.rq.get());return(0,s.g)(n,e.origin,(0,s.h)(m.rq.get(),e.direction,(0,s.q)(e.origin,r)/(0,s.l)(e.direction))),n},intersectsRay:j,projectPoint:I,setAltitudeAt:function(t,e,n,r){const a=N(t,e),i=z(t,e,l._.Z,O),o=(0,s.h)(O,i,n-a);return(0,s.g)(r,e,o)},setExtent:function(t,e,n){return r.A.getLogger("esri.geometry.support.sphere").error("sphere.setExtent is not yet supported"),t!==n&&p(t,n),n},tmpSphere:R,union:function(t,e,n=(0,h.vt)()){const r=(0,s.q)(t,e),a=t[3],i=e[3];return r+i<a?((0,c.c)(n,t),n):r+a<i?((0,c.c)(n,e),n):((0,s.m)(n,t,e,(r+i-a)/(2*r)),n[3]=(r+a+i)/2,n)},wrap:function(t){return t}},Symbol.toStringTag,{value:"Module"}))},4341:(t,e,n)=>{n.d(e,{I:()=>a});var r=n(26390);class a{constructor(t){this._allocator=t,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,r.d)((()=>this._reset())),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const t=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*i);this._items.length=Math.min(t,this._items.length),this._itemsPtr=0}_grow(){for(let t=0;t<Math.max(8,Math.min(this._items.length,i));t++)this._items.push(this._allocator())}}const i=1024},71351:(t,e,n)=>{n.d(e,{Cr:()=>h,LV:()=>c,oC:()=>u,vt:()=>s}),n(4576);var r=n(4341),a=n(38954),i=n(51850);function s(t){return t?o((0,i.o8)(t.origin),(0,i.o8)(t.direction)):o((0,i.vt)(),(0,i.vt)())}function o(t,e){return{origin:t,direction:e}}function c(t,e){const n=l.get();return n.origin=t,n.direction=e,n}function h(t,e,n=s()){return(0,a.c)(n.origin,t),(0,a.f)(n.direction,e,t),n}function u(t,e,n){const r=(0,a.k)(t.direction,(0,a.f)(n,e,t.origin));return(0,a.g)(n,t.origin,(0,a.h)(n,t.direction,r)),n}n(32114);const l=new r.I((()=>s()))},66104:(t,e,n)=>{var r,a;n.d(e,{k5:()=>r}),n(34727),(a=r||(r={}))[a.Multiply=1]="Multiply",a[a.Ignore=2]="Ignore",a[a.Replace=3]="Replace",a[a.Tint=4]="Tint"},57005:(t,e,n)=>{n.d(e,{ab:()=>Mt,gm:()=>qt});var r=n(77690),a=n(29242),i=n(9093),s=n(67026),o=n(82534),c=n(38954),h=n(51850),u=n(87317),l=n(91829),d=n(73941),f=n(98764),m=n(48353),v=n(9762),_=n(37539),g=n(240),b=n(21325),p=n(32114),M=n(24151),A=n(48163),P=n(46610);const x=1e-6,y=(0,h.vt)(),C=(0,h.vt)();function S(t,e,n,r,a,i,s,o,c,h){return function(t,e,n){let r=bt(t.maxVert[0],t.minVert[0]),a=0;for(let e=1;e<7;++e){const n=bt(t.maxVert[e],t.minVert[e]);n>r&&(r=n,a=e)}mt(e,t.minVert[a]),mt(n,t.maxVert[a])}(t,r,a),bt(r,a)<x?1:(dt(s,r,a),_t(s,s),function(t,e,n,r){const{data:a,size:i}=t;let s=Number.NEGATIVE_INFINITY,o=0;for(let t=0;t<a.length;t+=i){R[0]=a[t]-e[0],R[1]=a[t+1]-e[1],R[2]=a[t+2]-e[2];const r=n[0]*R[0]+n[1]*R[1]+n[2]*R[2],i=n[0]*n[0]+n[1]*n[1]+n[2]*n[2],c=R[0]*R[0]+R[1]*R[1]+R[2]*R[2]-r*r/i;c>s&&(s=c,o=t)}return mt(r,a,o),s}(e,r,s,i)<x?2:(dt(o,a,i),_t(o,o),dt(c,i,r),_t(c,c),vt(n,o,s),_t(n,n),X(e,n,s,o,c,h),0))}const j=(0,h.vt)(),w=(0,h.vt)(),I=(0,h.vt)(),q=(0,h.vt)(),T=(0,h.vt)(),z=(0,h.vt)(),N=(0,h.vt)(),F=(0,h.vt)();function O(t,e,n,r,a,i,s,o,c){(function(t,e,n,r,a){!function(t,e,n,r,a){const{data:i,size:s}=t;mt(r,i),mt(a,r),n[0]=pt(k,e),n[1]=n[0];for(let t=s;t<i.length;t+=s){const s=i[t]*e[0]+i[t+1]*e[1]+i[t+2]*e[2];s<n[0]&&(n[0]=s,mt(r,i,t)),s>n[1]&&(n[1]=s,mt(a,i,t))}}(t,e,H,a,r);const i=pt(n,e);H[1]-x<=i&&(r[0]=void 0),H[0]+x>=i&&(a[0]=void 0)})(t,e,n,j,w),void 0!==j[0]&&(dt(I,j,n),_t(I,I),dt(q,j,r),_t(q,q),dt(T,j,a),_t(T,T),vt(z,q,i),_t(z,z),vt(N,T,s),_t(N,N),vt(F,I,o),_t(F,F),X(t,z,i,q,I,c),X(t,N,s,T,q,c),X(t,F,o,I,T,c)),void 0!==w[0]&&(dt(I,w,n),_t(I,I),dt(q,w,r),_t(q,q),dt(T,w,a),_t(T,T),vt(z,q,i),_t(z,z),vt(N,T,s),_t(N,N),vt(F,I,o),_t(F,F),X(t,z,i,q,I,c),X(t,N,s,T,q,c),X(t,F,o,I,T,c))}const R=[0,0,0],H=(0,A.vt)(),D=(0,h.vt)(),V=(0,h.vt)(),B=(0,h.vt)(),E=(0,h.vt)(),L=(0,h.vt)(),U=(0,h.vt)();function X(t,e,n,r,a,i){if(gt(e)<x)return;vt(D,n,e),vt(V,r,e),vt(B,a,e),G(t,e,H),L[1]=H[0],E[1]=H[1],U[1]=E[1]-L[1];const s=[n,r,a],o=[D,V,B];for(let n=0;n<3;++n){G(t,s[n],H),L[0]=H[0],E[0]=H[1],G(t,o[n],H),L[2]=H[0],E[2]=H[1],U[0]=E[0]-L[0],U[2]=E[2]-L[2];const r=ut(U);r<i.quality&&(mt(i.b0,s[n]),mt(i.b1,e),mt(i.b2,o[n]),i.quality=r)}}const k=(0,h.vt)();function G(t,e,n){const{data:r,size:a}=t;n[0]=Number.POSITIVE_INFINITY,n[1]=Number.NEGATIVE_INFINITY;for(let t=0;t<r.length;t+=a){const a=r[t]*e[0]+r[t+1]*e[1]+r[t+2]*e[2];n[0]=Math.min(n[0],a),n[1]=Math.max(n[1],a)}}function Q(t,e,n){n.center=t,n.halfSize=(0,c.h)(e,e,.5),n.quaternion=o.zK}const Y=(0,h.vt)(),W=(0,h.vt)(),Z=(0,h.vt)(),$=(0,h.vt)(),K=(0,h.vt)(),J=(0,h.vt)();function tt(t,e,n){mt(Y,e),Math.abs(e[0])>Math.abs(e[1])&&Math.abs(e[0])>Math.abs(e[2])?Y[0]=0:Math.abs(e[1])>Math.abs(e[2])?Y[1]=0:Y[2]=0,gt(Y)<x&&(Y[0]=Y[1]=Y[2]=1),vt(W,e,Y),_t(W,W),vt(Z,e,W),_t(Z,Z),et(t,e,W,Z,$,K),dt(J,K,$),ot(e,W,Z,$,K,J,n)}function et(t,e,n,r,a,i){G(t,e,H),a[0]=H[0],i[0]=H[1],G(t,n,H),a[1]=H[0],i[1]=H[1],G(t,r,H),a[2]=H[0],i[2]=H[1]}const nt=(0,h.vt)(),rt=(0,h.vt)(),at=(0,h.vt)(),it=(0,a.fA)(1,0,0,0,1,0,0,0,1),st=(0,o.vt)();function ot(t,e,n,r,a,i,s){it[0]=t[0],it[1]=t[1],it[2]=t[2],it[3]=e[0],it[4]=e[1],it[5]=e[2],it[6]=n[0],it[7]=n[1],it[8]=n[2],s.quaternion=function(t,e){const n=e[0]+e[4]+e[8];if(n>0){let r=Math.sqrt(n+1);t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r}else{let n=0;e[4]>e[0]&&(n=1),e[8]>e[3*n+n]&&(n=2);const r=(n+1)%3,a=(n+2)%3;let i=Math.sqrt(e[3*n+n]-e[3*r+r]-e[3*a+a]+1);t[n]=.5*i,i=.5/i,t[3]=(e[3*r+a]-e[3*a+r])*i,t[r]=(e[3*r+n]+e[3*n+r])*i,t[a]=(e[3*a+n]+e[3*n+a])*i}return t}(st,it),lt(nt,r,a),ft(nt,nt,.5),ft(rt,t,nt[0]),ft(at,e,nt[1]),lt(rt,rt,at),ft(at,n,nt[2]),s.center=(0,c.g)(rt,rt,at),s.halfSize=(0,c.h)(nt,i,.5)}class ct{constructor(t){this.minVert=new Array(7),this.maxVert=new Array(7),this.buffer=new ArrayBuffer(448);let e=0;this.minProj=new Float64Array(this.buffer,e,7),e+=56,this.maxProj=new Float64Array(this.buffer,e,7),e+=56;for(let t=0;t<7;++t)this.minVert[t]=new Float64Array(this.buffer,e,3),e+=24;for(let t=0;t<7;++t)this.maxVert[t]=new Float64Array(this.buffer,e,3),e+=24;for(let t=0;t<7;++t)this.minProj[t]=Number.POSITIVE_INFINITY,this.maxProj[t]=Number.NEGATIVE_INFINITY;const n=new Array(7),r=new Array(7),{data:a,size:i}=t;for(let t=0;t<a.length;t+=i){let e=a[t];e<this.minProj[0]&&(this.minProj[0]=e,n[0]=t),e>this.maxProj[0]&&(this.maxProj[0]=e,r[0]=t),e=a[t+1],e<this.minProj[1]&&(this.minProj[1]=e,n[1]=t),e>this.maxProj[1]&&(this.maxProj[1]=e,r[1]=t),e=a[t+2],e<this.minProj[2]&&(this.minProj[2]=e,n[2]=t),e>this.maxProj[2]&&(this.maxProj[2]=e,r[2]=t),e=a[t]+a[t+1]+a[t+2],e<this.minProj[3]&&(this.minProj[3]=e,n[3]=t),e>this.maxProj[3]&&(this.maxProj[3]=e,r[3]=t),e=a[t]+a[t+1]-a[t+2],e<this.minProj[4]&&(this.minProj[4]=e,n[4]=t),e>this.maxProj[4]&&(this.maxProj[4]=e,r[4]=t),e=a[t]-a[t+1]+a[t+2],e<this.minProj[5]&&(this.minProj[5]=e,n[5]=t),e>this.maxProj[5]&&(this.maxProj[5]=e,r[5]=t),e=a[t]-a[t+1]-a[t+2],e<this.minProj[6]&&(this.minProj[6]=e,n[6]=t),e>this.maxProj[6]&&(this.maxProj[6]=e,r[6]=t)}for(let t=0;t<7;++t){let e=n[t];mt(this.minVert[t],a,e),e=r[t],mt(this.maxVert[t],a,e)}}}class ht{constructor(){this.b0=(0,h.fA)(1,0,0),this.b1=(0,h.fA)(0,1,0),this.b2=(0,h.fA)(0,0,1),this.quality=0}}function ut(t){return t[0]*t[1]+t[0]*t[2]+t[1]*t[2]}function lt(t,e,n){t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2]}function dt(t,e,n){t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2]}function ft(t,e,n){t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n}function mt(t,e,n=0){t[0]=e[n],t[1]=e[n+1],t[2]=e[n+2]}function vt(t,e,n){const r=e[0],a=e[1],i=e[2],s=n[0],o=n[1],c=n[2];t[0]=a*c-i*o,t[1]=i*s-r*c,t[2]=r*o-a*s}function _t(t,e){const n=e[0]*e[0]+e[1]*e[1]+e[2]*e[2];if(n>0){const r=1/Math.sqrt(n);t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r}}function gt(t){return t[0]*t[0]+t[1]*t[1]+t[2]*t[2]}function bt(t,e){const n=e[0]-t[0],r=e[1]-t[1],a=e[2]-t[2];return n*n+r*r+a*a}function pt(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}class Mt{constructor(t=h.uY,e=Xt,n=o.zK){this._data=[t[0],t[1],t[2],e[0],e[1],e[2],n[0],n[1],n[2],n[3]]}clone(){const t=new Mt;return t._data=this._data.slice(),t}invalidate(){this._data[3]=-1}get isValid(){return this._data[3]>=0}static fromData(t){const e=new Mt;return e._data=t.slice(),e}static fromJSON(t){return new Mt(t.center,t.halfSize,t.quaternion)}copy(t){this._data=t.data.slice()}get center(){return(0,c.s)(p.rq.get(),this._data[0],this._data[1],this._data[2])}get centerX(){return this._data[0]}get centerY(){return this._data[1]}get centerZ(){return this._data[2]}getCenter(t){return t[0]=this._data[0],t[1]=this._data[1],t[2]=this._data[2],t}set center(t){this._data[0]=t[0],this._data[1]=t[1],this._data[2]=t[2]}setCenter(t,e,n){this._data[0]=t,this._data[1]=e,this._data[2]=n}get halfSize(){return(0,c.s)(p.rq.get(),this._data[3],this._data[4],this._data[5])}get halfSizeX(){return this._data[3]}get halfSizeY(){return this._data[4]}get halfSizeZ(){return this._data[5]}getHalfSize(t){return t[0]=this._data[3],t[1]=this._data[4],t[2]=this._data[5],t}set halfSize(t){this._data[3]=t[0],this._data[4]=t[1],this._data[5]=t[2]}get quaternion(){return(0,s.hZ)(p.J8.get(),this._data[6],this._data[7],this._data[8],this._data[9])}getQuaternion(t){return t[0]=this._data[6],t[1]=this._data[7],t[2]=this._data[8],t[3]=this._data[9],t}set quaternion(t){this._data[6]=t[0],this._data[7]=t[1],this._data[8]=t[2],this._data[9]=t[3]}get data(){return this._data}getCorners(t){const e=At,n=this._data;e[0]=n[6],e[1]=n[7],e[2]=n[8],e[3]=n[9];for(let r=0;r<8;++r){const a=t[r];a[0]=(1&r?-1:1)*n[3],a[1]=(2&r?-1:1)*n[4],a[2]=(4&r?-1:1)*n[5],(0,c.u)(a,a,e),a[0]+=n[0],a[1]+=n[1],a[2]+=n[2]}}doesIntersectFrustumConservativeApproximation(t){return this.intersectPlane(t[0])<=0&&this.intersectPlane(t[1])<=0&&this.intersectPlane(t[2])<=0&&this.intersectPlane(t[3])<=0&&this.intersectPlane(t[4])<=0&&this.intersectPlane(t[5])<=0}get radius(){const t=this._data[3],e=this._data[4],n=this._data[5];return Math.sqrt(t*t+e*e+n*n)}intersectSphere(t){yt[0]=this._data[0]-t[0],yt[1]=this._data[1]-t[1],yt[2]=this._data[2]-t[2];const e=this.getQuaternion(Pt);return(0,s.Xr)(At,e),(0,c.u)(yt,yt,At),(0,c.v)(yt,yt),Ct[0]=Math.min(yt[0],this._data[3]),Ct[1]=Math.min(yt[1],this._data[4]),Ct[2]=Math.min(yt[2],this._data[5]),(0,c.w)(Ct,yt)<t[3]*t[3]}intersectSphereWithMBS(t,e=this.radius){const n=this._data;yt[0]=n[0]-t[0],yt[1]=n[1]-t[1],yt[2]=n[2]-t[2];const r=t[3],a=r+e;return!((0,c.x)(yt)>a*a)&&(At[0]=-n[6],At[1]=-n[7],At[2]=-n[8],At[3]=n[9],(0,c.u)(yt,yt,At),(0,c.v)(yt,yt),Ct[0]=Math.min(yt[0],n[3]),Ct[1]=Math.min(yt[1],n[4]),Ct[2]=Math.min(yt[2],n[5]),(0,c.w)(Ct,yt)<r*r)}intersectPlane(t){const e=t[0]*this._data[0]+t[1]*this._data[1]+t[2]*this._data[2]+t[3],n=this.projectedRadius((0,g.Qj)(t));return e>n?1:e<-n?-1:0}intersectRay(t,e,n=0){const r=this._data,a=At;a[0]=-r[6],a[1]=-r[7],a[2]=-r[8],a[3]=r[9],yt[0]=t[0]-r[0],yt[1]=t[1]-r[1],yt[2]=t[2]-r[2];const i=(0,c.u)(yt,yt,At),s=(0,c.u)(Ct,e,At);let o=-1/0,h=1/0;const u=this.getHalfSize(Ht);for(let t=0;t<3;t++){const e=i[t],r=s[t],a=u[t]+n;if(Math.abs(r)>1e-6){const t=(a-e)/r,n=(-a-e)/r;o=Math.max(o,Math.min(t,n)),h=Math.min(h,Math.max(t,n))}else if(e>a||e<-a)return!1}return o<=h}projectedArea(t,e,n,a){const i=this.getQuaternion(Pt);(0,s.Xr)(At,i),yt[0]=t[0]-this._data[0],yt[1]=t[1]-this._data[1],yt[2]=t[2]-this._data[2],(0,c.u)(yt,yt,At);const o=this.getHalfSize(Ht),h=yt[0]<-o[0]?-1:yt[0]>o[0]?1:0,l=yt[1]<-o[1]?-1:yt[1]>o[1]?1:0,d=yt[2]<-o[2]?-1:yt[2]>o[2]?1:0,f=Math.abs(h)+Math.abs(l)+Math.abs(d);if(0===f)return 1/0;const m=1===f?4:6,v=6*(h+3*l+9*d+13);(0,r.I0)(Dt,i),(0,r.hs)(Dt,Dt,o);const _=this.getCenter(Ot);for(let t=0;t<m;t++){const n=It[v+t];(0,c.s)(yt,((1&n)<<1)-1,(2&n)-1,((4&n)>>1)-1),(0,c.t)(yt,yt,Dt),(0,c.g)(St,_,yt),St[3]=1,(0,u.t)(St,St,e);const r=1/Math.max(1e-6,St[3]);wt[2*t]=St[0]*r,wt[2*t+1]=St[1]*r}const g=2*m-2;let b=wt[0]*(wt[3]-wt[g+1])+wt[g]*(wt[1]-wt[g-1]);for(let t=2;t<g;t+=2)b+=wt[t]*(wt[t+3]-wt[t-1]);return Math.abs(b)*n*a*.125}projectedRadius(t){const e=this.getQuaternion(Pt);return(0,s.Xr)(At,e),(0,c.u)(yt,t,At),Math.abs(yt[0]*this._data[3])+Math.abs(yt[1]*this._data[4])+Math.abs(yt[2]*this._data[5])}minimumDistancePlane(t){return t[0]*this._data[0]+t[1]*this._data[1]+t[2]*this._data[2]+t[3]-this.projectedRadius((0,g.Qj)(t))}maximumDistancePlane(t){return t[0]*this._data[0]+t[1]*this._data[1]+t[2]*this._data[2]+t[3]+this.projectedRadius((0,g.Qj)(t))}toAaBoundingBox(t){const e=this.getQuaternion(Pt),n=(0,r.I0)(Dt,e),a=this._data[3]*Math.abs(n[0])+this._data[4]*Math.abs(n[3])+this._data[5]*Math.abs(n[6]),i=this._data[3]*Math.abs(n[1])+this._data[4]*Math.abs(n[4])+this._data[5]*Math.abs(n[7]),s=this._data[3]*Math.abs(n[2])+this._data[4]*Math.abs(n[5])+this._data[5]*Math.abs(n[8]);t[0]=this._data[0]-a,t[1]=this._data[1]-i,t[2]=this._data[2]-s,t[3]=this._data[0]+a,t[4]=this._data[1]+i,t[5]=this._data[2]+s}transform(t,e,n,r=0,a=(0,f.lO)(n),i=(0,f.lO)(e),o=(0,_.jd)(e,i)){if(n===a)e.isGeographic?function(t,e,n,r,a=(0,f.lO)(n)){const i=(0,d.tO)(n),o=1+Math.max(0,r)/(i.radius+t.centerZ);t.getCenter(Ft),Ft[2]+=r,(0,v.projectBuffer)(Ft,n,0,Ft,a,0,1),e.center=Ft;const h=t.getQuaternion(Pt);e.quaternion=h,(0,s.Xr)(At,h),(0,c.s)(Et,0,0,1),(0,c.u)(Et,Et,At);const u=t.getHalfSize(Ht);(0,c.s)(Et,u[0]*Math.abs(Et[0]),u[1]*Math.abs(Et[1]),u[2]*Math.abs(Et[2])),(0,c.h)(Et,Et,i.inverseFlattening),(0,c.g)(Et,u,Et),e.halfSize=(0,c.h)(Et,Et,o)}(this,t,e,r,i):function(t,e,n,r,a=(0,f.lO)(n),i=(0,_.jd)(n,a)){t.getCorners(Bt),t.getCenter(Ft),Ft[2]+=r,(0,m.l)(n,Ft,Vt,a),e.setCenter(Vt[12],Vt[13],Vt[14]);const o=2*Math.sqrt(1+Vt[0]+Vt[5]+Vt[10]);At[0]=(Vt[6]-Vt[9])/o,At[1]=(Vt[8]-Vt[2])/o,At[2]=(Vt[1]-Vt[4])/o,At[3]=.25*o;const h=t.getQuaternion(Pt);e.quaternion=(0,s.lw)(At,At,h),(0,s.Xr)(At,At),(0,c.s)(Lt,0,0,0);const u=e.getCenter(Rt);for(const t of Bt)t[2]+=r,i(t,0,t,0),(0,c.z)(Et,t,u),(0,c.u)(Et,Et,At),(0,c.v)(Et,Et),(0,c.C)(Lt,Lt,Et);e.halfSize=Lt}(this,t,e,r,i,o);else if(e.isWGS84&&(n.isWebMercator||(0,b.r1)(n)))!function(t,e,n,r,a){e.getCenter(Ot),Ot[2]+=a;const i=(0,f.lO)(n);(0,v.projectBuffer)(Ot,t,0,Ot,i,0,1),Tt(i,e,Ot,n,r)}(e,this,n,t,r);else if(e.isWebMercator&&(0,b.r1)(n))!function(t,e,n,r,a){e.getCenter(Ot),Ot[2]+=a,Tt(t,e,Ot,n,r)}(e,this,n,t,r);else{const a=this.getCenter(Ot);a[2]+=r,(0,v.projectBuffer)(a,e,0,a,n,0,1),t.center=a,this!==t&&(t.quaternion=this.getQuaternion(Pt),t.halfSize=this.getHalfSize(Ht))}}}const At=(0,o.vt)(),Pt=(0,o.vt)(),xt=(0,o.vt)(),yt=(0,h.vt)(),Ct=(0,h.vt)(),St=(0,l.vt)();function jt(t,e=new Mt){return function(t,e){const{data:n,size:r}=t,a=n.length/r;if(a<=0)return;const i=new ct(t);lt(y,i.minProj,i.maxProj),ft(y,y,.5),dt(C,i.maxProj,i.minProj);const s=ut(C),o=new ht;o.quality=s,a<14&&(t=new P.K(new Float64Array(i.buffer,112,42),3));const c=(0,h.vt)(),u=(0,h.vt)(),l=(0,h.vt)(),d=(0,h.vt)(),f=(0,h.vt)(),m=(0,h.vt)(),v=(0,h.vt)();switch(S(i,t,v,c,u,l,d,f,m,o)){case 1:return void Q(y,C,e);case 2:return void tt(t,d,e)}O(t,v,c,u,l,d,f,m,o),et(t,o.b0,o.b1,o.b2,$,K);const _=(0,h.vt)();dt(_,K,$),o.quality=ut(_),o.quality<s?ot(o.b0,o.b1,o.b2,$,K,_,e):Q(y,C,e)}(t,e),e}const wt=[.1,.2,.3,.4,.5,.6,.7,.8,.9,1,1.1,1.2],It=(()=>{const t=new Int8Array(162);let e=0;const n=n=>{for(let r=0;r<n.length;r++)t[e+r]=n[r];e+=6};return n([6,2,3,1,5,4]),n([0,2,3,1,5,4]),n([0,2,3,7,5,4]),n([0,1,3,2,6,4]),n([0,1,3,2,0,0]),n([0,1,5,7,3,2]),n([0,1,3,7,6,4]),n([0,1,3,7,6,2]),n([0,1,5,7,6,2]),n([0,1,5,4,6,2]),n([0,1,5,4,0,0]),n([0,1,3,7,5,4]),n([0,2,6,4,0,0]),n([0,0,0,0,0,0]),n([1,3,7,5,0,0]),n([2,3,7,6,4,0]),n([2,3,7,6,0,0]),n([2,3,1,5,7,6]),n([0,1,5,7,6,2]),n([0,1,5,7,6,4]),n([0,1,3,7,6,4]),n([4,5,7,6,2,0]),n([4,5,7,6,0,0]),n([4,5,1,3,7,6]),n([0,2,3,7,5,4]),n([6,2,3,7,5,4]),n([6,2,3,1,5,4]),t})();function qt(t,e,n,r,a){const i=t.getQuaternion(Pt);a.quaternion=i,(0,s.Xr)(At,i);const o=t.getCenter(Ot),u=t.getHalfSize(Ht);if(r===M.RT.Global){(0,c.u)(Et,o,At),(0,c.v)(Lt,Et),(0,c.y)(Ut,Lt,u),(0,c.z)(Ut,Lt,Ut);const r=(0,c.l)(Ut);(0,c.g)(Ut,Lt,u);const i=(0,c.l)(Ut);if(r<n)a.center=o,(0,c.s)(Et,n,n,n),a.halfSize=(0,c.g)(Et,u,Et);else{const s=i>0?1+e/i:1,o=r>0?1+n/r:1,h=(o+s)/2,l=(o-s)/2;(0,c.h)(Ut,Lt,l),a.halfSize=(0,c.r)(Ut,Ut,u,h),(0,c.h)(Ut,Lt,h),(0,c.r)(Ut,Ut,u,l),(0,c.A)(Et,Et),(0,c.B)(Et,Ut,Et);const d=t.getQuaternion(xt);a.center=(0,c.u)(Et,Et,d)}}else{a.center=(0,c.r)(Et,o,h.Cb,(n+e)/2);const t=(0,c.u)(Et,h.Cb,At);(0,c.v)(t,t),a.halfSize=(0,c.r)(Lt,u,t,(n-e)/2)}return a}function Tt(t,e,n,a,i){const s=e.getQuaternion(Pt),o=(0,r.I0)(Dt,s),c=e.getHalfSize(Ht);for(let t=0;t<8;++t){for(let e=0;e<3;++e)Ft[e]=c[e]*(t&1<<e?-1:1);for(let e=0;e<3;++e){let r=n[e];for(let t=0;t<3;++t)r+=Ft[t]*o[3*t+e];zt[3*t+e]=r}}(0,v.projectBuffer)(zt,t,0,zt,a,0,8),jt(Nt,i)}const zt=new Array(24),Nt=new P.K(zt,3),Ft=(0,h.vt)(),Ot=(0,h.vt)(),Rt=(0,h.vt)(),Ht=(0,h.vt)(),Dt=(0,a.vt)(),Vt=(0,i.vt)(),Bt=[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],Et=(0,h.vt)(),Lt=(0,h.vt)(),Ut=(0,h.vt)(),Xt=(0,h.fA)(-1,-1,-1)},42583:(t,e,n)=>{n.d(e,{A:()=>i});var r=n(66104),a=n(2597);function i(t){t.vertex.code.add(a.H`
2
2
  vec4 decodeSymbolColor(vec4 symbolColor, out int colorMixMode) {
3
3
  float symbolAlpha = 0.0;
4
4
 
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7139],{5999:(t,e,n)=>{n.d(e,{vt:()=>cs,UD:()=>ls});var s=n(85334),r=n(49186),o=n(4718),i=n(90237),a=n(10107),u=(n(44208),n(53966),n(87811),n(40608)),l=n(16019),c=n(25482);let p=class extends c.oY{constructor(){super(...arguments),this.raster=void 0}};(0,i._)([(0,a.MZ)({json:{write:!0}})],p.prototype,"raster",void 0),p=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.BaseFunctionArguments")],p);const h=p;var f;let m=f=class extends h{constructor(){super(...arguments),this.raster2=void 0}get rasters(){return[this.raster,this.raster2]}clone(){return new f({raster:this.raster,raster2:this.raster2,operation:this.operation})}};(0,i._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"operation",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"raster2",void 0),(0,i._)([(0,a.MZ)({readOnly:!0})],m.prototype,"rasters",null),m=f=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.ArithmeticFunctionArguments")],m);const d=m;var g=n(79901),y=n(14140),x=n(87186);const w=new Set(["slope","aspect","curvature","hillshade","shadedrelief","statistics"]);let A=class extends c.oY{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._bindingResult=null}get supportsGPU(){return this._bindingResult.supportsGPU}get flatWebGLFunctionChain(){const t=this.getWebGLProcessorDefinition();if(!t)return null;const e=[t],{parameters:n}=t;let s=n.rasters||n.raster&&[n.raster];for(;s?.length;){e.unshift(...s);const t=[];for(let e=0;e<s.length;e++){const{parameters:n}=s[e],r=n.rasters||n.raster&&[n.raster];r?.length&&t.push(...r)}s=t}for(let t=e.length-1;t>=0;t--)e[t].isNoopProcess&&e.splice(t,1);let r=!1;for(let t=0;t<e.length;t++){const n=e[t];n.id=e.length-t-1;const{rasters:s}=n.parameters;r=r||null!=s&&s.length>1}const o=e.some((({name:t})=>w.has(t.toLowerCase()))),{rawSourceRasterInfos:i}=this;return{functions:e,hasBranches:r,hasFocalFunction:o,isSourceSingleBand:1===i?.[0]?.bandCount}}bind(t,e=!1,n=-1){this.id=n+1;const s=this._getRasterValues();let r=!0;for(let n=0;n<s.length;n++){const o=s[n];if(null!=o&&this._isRasterFunctionValue(o)){const s=o.bind(t,e,this.id+n);if(!s.success)return this._bindingResult=s,s;r=r&&s.supportsGPU}}return!this.rasterInfo||e?(this.sourceRasterInfos=this._getSourceRasterInfos(t),this._bindingResult=this._bindSourceRasters(),this._bindingResult.success&&this._patchRasterInfo(),this._bindingResult.supportsGPU=r&&this._bindingResult.supportsGPU,this.processInputBandIds(),this._bindingResult):(this._bindingResult={success:!0,supportsGPU:!0},this.processInputBandIds(),this._bindingResult)}process(t){const e=this._getRasterValues(),n=0===e.length?t.pixelBlocks??t.primaryPixelBlocks:e.map((e=>this._readRasterValue(e,t)));return this._processPixels({...t,pixelBlocks:n})}processInputBandIds(){const t=this._getRasterValues().filter(this._isRasterFunctionValue);let e;if(t.length>1){const e=t.map((t=>t.processInputBandIds()[0]));this.rawInputBandIds=e,this.isInputBandIdsSwizzled=this.rawInputBandIds.some(((t,e)=>t!==e));const n=t.filter((t=>"ExtractBand"===t.functionName));return n.length&&n.forEach(((t,e)=>{t.isInputBandIdsSwizzled=!0,t.swizzledBandSelection=[e,e,e]})),this.rawInputBandIds}const n=t[0];if(n){if(e=n.processInputBandIds(),n.isInputBandIdsSwizzled)return this.rawInputBandIds=e,e}else{e=[];const{bandCount:t}=this.sourceRasterInfos[0];for(let n=0;n<t;n++)e.push(n)}const s=this._getInputBandIds(e);return this.isInputBandIdsSwizzled=s.some(((t,e)=>t!==e)),this.rawInputBandIds=s,this.rawInputBandIds}getPrimaryRasters(){const t=[],e=[];return this._getPrimaryRasters(this,t,e),{rasters:t,rasterIds:e}}getWebGLProcessorDefinition(){const t=this._getWebGLParameters(),{raster:e,rasters:n}=this.functionArguments;return n&&Array.isArray(n)&&n.length?(t.rasters=n.map((t=>this._isRasterFunctionValue(t)?t.getWebGLProcessorDefinition():"number"==typeof t?{name:"Constant",parameters:{value:t},pixelType:"f32",id:-1,isNoopProcess:!1}:{name:"Identity",parameters:{value:t},pixelType:"f32",id:-1,isNoopProcess:!1})),t.rasters.some((t=>null!=t))||(t.rasters=null)):this._isRasterFunctionValue(e)&&(t.raster=e.getWebGLProcessorDefinition()),{name:this.functionName,parameters:t,pixelType:this.outputPixelType,id:this.id,isNoopProcess:this.isNoopProcess}}getClippingGeometries(){const t=[];"Clip"===this.functionName&&t.push(this.functionArguments);const{raster:e,rasters:n}=this.functionArguments;if(n&&Array.isArray(n)&&n.length)n.forEach((e=>{if(this._isRasterFunctionValue(e)){const n=e.getClippingGeometries();t.push(...n)}}));else if(this._isRasterFunctionValue(e)){const n=e.getClippingGeometries();t.push(...n)}return t}_getOutputPixelType(t){return"unknown"===this.outputPixelType?t:this.outputPixelType??t}_getWebGLParameters(){return{}}_getInputBandIds(t){return t}_removeStatsHistColormapVAT(t){t.statistics=null,t.histograms=null,t.colormap=null,t.attributeTable=null}_getRasterValues(){const{rasterArgumentNames:t}=this;return"rasters"===t[0]?this.functionArguments.rasters??[]:t.flatMap((t=>this.functionArguments[t]))}_getSourceRasterInfos(t){const e=this._getRasterValues(),{rasterInfos:n,rasterIds:s}=t;if(0===e.length)return n;const r=e.map((t=>t&&"object"==typeof t&&"bind"in t&&t.rasterInfo?t.rasterInfo:"string"==typeof t&&s.includes(t)?n[s.indexOf(t)]:"number"!=typeof t?n[0]:void 0)),o=r.find((t=>t))??n[0];return r.forEach(((t,e)=>{void 0===t&&(r[e]=o)})),r}_getPrimaryRasterId(t){return t?.rasterId}_getPrimaryRasters(t,e=[],n=[]){for(let s=0;s<t.sourceRasters.length;s++){const r=t.sourceRasters[s];if("number"!=typeof r)if("bind"in r)this._getPrimaryRasters(r,e,n);else{const t=r,s=this._getPrimaryRasterId(t);if(null==s)continue;n.includes(s)||(this.mainPrimaryRasterId===s?(e.unshift(t),n.unshift(s)):(e.push(t),n.push(s)))}}}_isRasterFunctionValue(t){return null!=t&&"object"==typeof t&&"getWebGLProcessorDefinition"in t}_readRasterValue(t,e){const{primaryPixelBlocks:n}=e;if(null==t||"$$"===t){const t=n[0];return null==t?null:t.clone()}if("string"==typeof t){const s=e.primaryRasterIds.indexOf(t);return-1===s?null:n[s]}if("number"==typeof t){const e=n[0];if(null==e)return null;const{width:s,height:r,pixelType:o}=e,i=new Float32Array(s*r);i.fill(t);const a=this.sourceRasterInfos[0].bandCount,u=new Array(a).fill(i);return new y.A({width:s,height:r,pixelType:o,pixels:u})}return t.process(e)}_patchRasterInfo(){const{rasterInfo:t}=this;if(!t?.keyProperties)return;const{bandCount:e,keyProperties:n,statistics:s,histograms:r}=t,o=n.BandProperties;o&&o.length!==e&&(t.keyProperties={...n,BandProperties:void 0}),s&&s.length!==e&&(t.statistics=s.length>e?s.slice(0,e):null),r&&r.length!==e&&(t.histograms=r.length>e?r.slice(0,e):null),n.BAND_COUNT&&Number(n.BAND_COUNT)!==e&&(t.keyProperties={...n,BAND_COUNT:"string"==typeof n.BAND_COUNT?String(e):e})}};(0,i._)([(0,a.MZ)({json:{write:!0}})],A.prototype,"functionName",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],A.prototype,"functionArguments",void 0),(0,i._)([(0,a.MZ)()],A.prototype,"rasterArgumentNames",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}}),(0,g.w)((t=>t?.toLowerCase()))],A.prototype,"outputPixelType",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],A.prototype,"mainPrimaryRasterId",void 0),(0,i._)([(0,a.MZ)()],A.prototype,"sourceRasters",void 0),(0,i._)([(0,a.MZ)({type:[x.A],json:{write:!0}})],A.prototype,"sourceRasterInfos",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],A.prototype,"rasterInfo",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],A.prototype,"readingBufferSize",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],A.prototype,"id",void 0),(0,i._)([(0,a.MZ)()],A.prototype,"isNoopProcess",void 0),(0,i._)([(0,a.MZ)()],A.prototype,"supportsGPU",null),(0,i._)([(0,a.MZ)()],A.prototype,"rawInputBandIds",void 0),(0,i._)([(0,a.MZ)()],A.prototype,"rawSourceRasterInfos",void 0),(0,i._)([(0,a.MZ)()],A.prototype,"isInputBandIdsSwizzled",void 0),(0,i._)([(0,a.MZ)()],A.prototype,"swizzledBandSelection",void 0),(0,i._)([(0,a.MZ)()],A.prototype,"isBranch",void 0),(0,i._)([(0,a.MZ)({readOnly:!0})],A.prototype,"flatWebGLFunctionChain",null),(0,i._)([(0,a.MZ)()],A.prototype,"_bindingResult",void 0),A=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.BaseRasterFunction")],A);const v=A,b={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},_={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},M={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},P={setNull:50,conditional:78},T={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,..._,...M,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,...P},R=new Map([[M.acos,{domain:[0,Math.PI],isInteger:!1}],[M.asin,{domain:[-Math.PI/2,Math.PI/2],isInteger:!1}],[M.atan,{domain:[-Math.PI/2,Math.PI/2],isInteger:!1}],[M.cos,{domain:[-1,1],isInteger:!1}],[M.sin,{domain:[-1,1],isInteger:!1}],[_.booleanAnd,{domain:[0,1],isInteger:!0}],[_.booleanNot,{domain:[0,1],isInteger:!0}],[_.booleanOr,{domain:[0,1],isInteger:!0}],[_.booleanXOr,{domain:[0,1],isInteger:!0}],[_.equalTo,{domain:[0,1],isInteger:!0}],[_.notEqual,{domain:[0,1],isInteger:!0}],[_.greaterThan,{domain:[0,1],isInteger:!0}],[_.greaterThanEqual,{domain:[0,1],isInteger:!0}],[_.lessThan,{domain:[0,1],isInteger:!0}],[_.lessThanEqual,{domain:[0,1],isInteger:!0}],[_.isNull,{domain:[0,1],isInteger:!0}]]);function N(t){return R.get(t)}const F=[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 I(t,e,n){const[s,r]=t,o=s.length,i=y.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]+r[t]);return i}function k(t,e,n){const[s]=t,r=s.length,o=y.A.createEmptyBand("f32",r);return o.set(s),o}function C(t,e,n){const[s]=t,r=s.length,o=y.A.createEmptyBand(n,r);for(let t=0;t<r;t++)e&&!e[t]||(o[t]=s[t]*s[t]);return o}function S(t,e,n){const[s,r]=t,o=s.length,i=y.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]-r[t]);return i}function j(t,e,n){const[s,r]=t,o=s.length,i=y.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]*r[t]);return i}function B(t,e,n){const[s]=t,r=s.length,o=y.A.createEmptyBand(n,r);for(let t=0;t<r;t++)e&&!e[t]||(o[t]=Math.sign(s[t])*Math.floor(Math.abs(s[t])));return o}function Z(t,e,n){const[s,r]=t,o=s.length,i=y.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]/r[t]);return i}function G(t,e,n){return Z(t,e,"f32")}function O(t,e,n){const[s,r]=t,o=s.length,i=y.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=Math.floor(s[t]/r[t]));return i}function E(t,e,n,s){const r=t[0],o=r.length,i=y.A.createEmptyBand(n,o);if(s===M.atanh){for(let t=0;t<o;t++)if(e[t]){const n=r[t];Math.abs(n)>=1?e[t]=0:i[t]=Math.atanh(n)}return i}const a=s===M.asin?Math.asin:Math.acos;for(let t=0;t<o;t++)if(e[t]){const n=r[t];Math.abs(n)>1?e[t]=0:i[t]=a(n)}return i}function D(t,e,n,s){const[r]=t,o=r.length,i=y.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s(r[t]));return i}function z(t,e,n,s){const[r,o]=t,i=r.length,a=y.A.createEmptyBand(n,i);for(let t=0;t<i;t++)e&&!e[t]||(a[t]=s(r[t],o[t]));return a}function L(t,e,n){const[s,r]=t,o=s.length,i=y.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]&r[t]);return i}function U(t,e,n){const[s,r]=t,o=s.length,i=y.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]<<r[t]);return i}function V(t,e,n){const[s]=t,r=s.length,o=y.A.createEmptyBand(n,r);for(let t=0;t<r;t++)e&&!e[t]||(o[t]=~s[t]);return o}function W(t,e,n){const[s,r]=t,o=s.length,i=y.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]|r[t]);return i}function $(t,e,n){const[s,r]=t,o=s.length,i=y.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]>>r[t]);return i}function q(t,e,n){const[s,r]=t,o=s.length,i=y.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]^r[t]);return i}function H(t,e,n){const[s,r]=t,o=s.length,i=y.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]&&r[t]?1:0);return i}function X(t,e,n){const[s]=t,r=s.length,o=y.A.createEmptyBand(n,r);for(let t=0;t<r;t++)e&&!e[t]||(o[t]=s[t]?0:1);return o}function J(t,e,n){const[s,r]=t,o=s.length,i=y.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]||r[t]?1:0);return i}function K(t,e,n){const[s,r]=t,o=s.length,i=y.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=(s[t]?1:0)^(r[t]?1:0));return i}function Y(t,e,n){const[s,r]=t,o=s.length,i=y.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]===r[t]?1:0);return i}function Q(t,e,n,s){const[r]=t,o=r.length,i=y.A.createEmptyBand(n,o),a=s===Math.E;for(let t=0;t<o;t++)e&&!e[t]||(i[t]=a?Math.exp(r[t]):s**r[t]);return i}function tt(t,e,n){return Q(t,e,n,10)}function et(t,e,n){return Q(t,e,n,2)}function nt(t,e,n){return Q(t,e,n,Math.E)}function st(t,e,n,s){const[r]=t,o=r.length,i=y.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(r[t]<=0?e[t]=0:i[t]=s(r[t]));return i}function rt(t,e,n){return st(t,e,n,Math.log10)}function ot(t,e,n){return st(t,e,n,Math.log2)}function it(t,e,n){return st(t,e,n,Math.log)}function at(t,e,n){const[s,r]=t,o=s.length,i=y.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]>r[t]?1:0);return i}function ut(t,e,n){const[s,r]=t,o=s.length,i=y.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]>=r[t]?1:0);return i}function lt(t,e,n){const[s,r]=t,o=s.length,i=y.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]<r[t]?1:0);return i}function ct(t,e,n){const[s,r]=t,o=s.length,i=y.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]<=r[t]?1:0);return i}function pt(t,e,n){const[s]=t,r=s.length,o=y.A.createEmptyBand(n,r);if(!e)return o;for(let t=0;t<r;t++)o[t]=e[t]?0:1;return o}function ht(t,e,n){const[s,r]=t,o=s.length,i=y.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]%r[t]);return i}function ft(t,e,n){const[s]=t,r=s.length,o=y.A.createEmptyBand(n,r);for(let t=0;t<r;t++)e&&!e[t]||(o[t]=-s[t]);return o}function mt(t,e,n){const[s,r]=t,o=s.length,i=y.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e&&!e[t]||(i[t]=s[t]===r[t]?0:1);return i}function dt(t,e,n){const[s,r]=t,o=s.length,i=y.A.createEmptyBand(n,o),a=new Uint8Array(o);for(let t=0;t<o;t++)null!=e&&!e[t]||0!==s[t]||(i[t]=r[t],a[t]=255);return{band:i,mask:a}}function gt(t,e,n){const[s,r,o]=t,i=s.length,a=y.A.createEmptyBand(n,i);for(let t=0;t<i;t++)e&&!e[t]||(a[t]=s[t]?r[t]:o[t]);return a}function yt(t,e,n){const s=t.length;if(s<2)return t[0];const[r]=t,o=r.length,i=y.A.createEmptyBand(n,o);for(let n=0;n<o;n++)if(!e||e[n]){let e=r[n];for(let r=1;r<s;r++){const s=t[r][n];e<s&&(e=s)}i[n]=e}return i}function xt(t,e,n){const s=t.length;if(s<2)return t[0];const[r]=t,o=r.length,i=y.A.createEmptyBand(n,o);for(let n=0;n<o;n++)if(!e||e[n]){let e=r[n];for(let r=1;r<s;r++){const s=t[r][n];e>s&&(e=s)}i[n]=e}return i}function wt(t,e,n){const s=t.length;if(s<2)return t[0];const[r]=t,o=r.length,i=y.A.createEmptyBand(n,o);for(let n=0;n<o;n++)if(!e||e[n]){let e=r[n],o=e;for(let r=1;r<s;r++){const s=t[r][n];o<s?o=s:e>s&&(e=s)}i[n]=o-e}return i}function At(t,e,n){const s=t.length;if(s<2)return t[0];const[r]=t,o=r.length,i=y.A.createEmptyBand(n,o);for(let n=0;n<o;n++)if(!e||e[n]){let e=0;for(let r=0;r<s;r++)e+=t[r][n];i[n]=e/s}return i}function vt(t,e,n){const s=t.length;if(s<2)return t[0];const[r]=t,o=r.length,i=y.A.createEmptyBand(n,o);for(let n=0;n<o;n++)if(!e||e[n])for(let e=0;e<s;e++){const s=t[e];i[n]+=s[n]}return i}function bt(t,e,n){const s=t.length;if(s<2)return t[0];const[r]=t,o=r.length,i=y.A.createEmptyBand(n,o);for(let n=0;n<o;n++)if(!e||e[n]){const e=new Float32Array(s);let r=0;for(let o=0;o<s;o++){const s=t[o];r+=s[n],e[o]=s[n]}r/=s;let o=0;for(let t=0;t<s;t++)o+=(e[t]-r)**2;i[n]=Math.sqrt(o/s)}return i}function _t(t,e,n){const s=t.length;if(s<2)return t[0];const r=Math.floor(s/2),[o]=t,i=o.length,a=y.A.createEmptyBand(n,i),u=new Float32Array(s),l=s%2==1;for(let n=0;n<i;n++)if(!e||e[n]){for(let e=0;e<s;e++)u[e]=t[e][n];u.sort(),a[n]=l?u[r]:(u[r]+u[r-1])/2}return a}function Mt(t,e,n){const[s,r]=t;if(null==r)return s;const o=s.length,i=y.A.createEmptyBand(n,o);for(let t=0;t<o;t++)e[t]&&(s[t]===r[t]?i[t]=s[t]:e[t]=0);return i}function Pt(t,e,n){const s=t.length;if(s<=2)return Mt(t,e,n);const r=t[0].length,o=y.A.createEmptyBand(n,r),i=new Map;for(let n=0;n<r;n++)if(!e||e[n]){let e;i.clear();for(let r=0;r<s;r++)e=t[r][n],i.set(e,i.has(e)?i.get(e)+1:1);let r=0,a=0;for(const t of i.keys())r=i.get(t),r>a&&(a=r,e=t);o[n]=e}return o}function Tt(t,e,n){const s=t.length;if(s<=2)return Mt(t,e,n);const r=t[0].length,o=y.A.createEmptyBand(n,r),i=new Map;for(let n=0;n<r;n++)if(!e||e[n]){let e;i.clear();for(let r=0;r<s;r++)e=t[r][n],i.set(e,i.has(e)?i.get(e)+1:1);let r=0,a=t.length;for(const t of i.keys())r=i.get(t),r<a&&(a=r,e=t);o[n]=e}return o}function Rt(t,e,n){const s=t.length;if(s<2)return t[0];const[r]=t,o=r.length,i=y.A.createEmptyBand(n,o),a=new Set;for(let n=0;n<o;n++)if(!e||e[n]){let e;a.clear();for(let r=0;r<s;r++)e=t[r][n],a.add(e);i[n]=a.size}return i}const Nt=new Map,Ft=new Map,It=new Map,kt=new Map;function Ct(t,e,n,s){let[r,o]=(0,l.hP)(n);const i=(0,l.zw)(n);i&&(r-=1e-5,o+=1e-5);for(let n=0;n<e.length;n++)if(e[n]){const a=t[n];isNaN(a)||a<r||a>o?e[n]=0:s[n]=i?Math.round(a):a}}function St(t,e,n={}){Nt.size||(Nt.set(4,Math.sqrt),Nt.set(6,Math.acos),Nt.set(7,Math.asin),Nt.set(8,Math.atan),Nt.set(9,Math.atanh),Nt.set(10,Math.abs),Nt.set(21,Math.cos),Nt.set(22,Math.cosh),Nt.set(48,Math.floor),Nt.set(49,Math.ceil),Nt.set(51,Math.sin),Nt.set(52,Math.sinh),Nt.set(56,Math.tan),Nt.set(57,Math.tanh),Nt.set(59,Math.acosh),Nt.set(60,Math.asinh),Nt.set(65,Math.floor),Ft.set(5,Math.pow),Ft.set(61,Math.atan2),It.set(1,I),It.set(2,S),It.set(3,j),It.set(11,L),It.set(12,U),It.set(13,V),It.set(14,W),It.set(15,$),It.set(16,q),It.set(17,H),It.set(18,X),It.set(19,J),It.set(20,K),It.set(23,Z),It.set(24,Y),It.set(25,nt),It.set(26,tt),It.set(27,et),It.set(28,at),It.set(29,ut),It.set(30,B),It.set(31,pt),It.set(32,k),It.set(33,lt),It.set(34,ct),It.set(35,it),It.set(36,rt),It.set(37,ot),It.set(44,ht),It.set(45,ft),It.set(46,mt),It.set(53,C),It.set(64,G),It.set(65,O),It.set(76,gt),It.set(78,gt),kt.set(38,Pt),kt.set(39,yt),kt.set(40,At),kt.set(41,_t),kt.set(42,xt),kt.set(43,Tt),kt.set(47,wt),kt.set(54,bt),kt.set(55,vt),kt.set(58,Rt),kt.set(66,Pt),kt.set(67,yt),kt.set(68,At),kt.set(69,_t),kt.set(70,xt),kt.set(71,Tt),kt.set(72,wt),kt.set(73,bt),kt.set(74,vt),kt.set(75,Rt));let s=function(t,e=!1){const n=t.map((t=>t.mask)),s=n.filter((t=>null!=t)),r=t[0].pixels[0].length;if(0===s.length||e&&s.length!==n.length)return new Uint8Array(r).fill(255);const o=s[0],i=new Uint8Array(o);if(1===s.length)return i;if(!e){for(let t=1;t<s.length;t++){const e=s[t];for(let t=0;t<i.length;t++)i[t]&&(i[t]=e[t]?255:0)}return i}for(let t=1;t<s.length;t++){const e=s[t];for(let t=0;t<i.length;t++)0===i[t]&&(i[t]=e[t]?255:0)}return i}(t,e>=66&&e<=75);const{outputPixelType:r="f32"}=n,o=!kt.has(e)||n.processAsMultiband,i=o?t[0].pixels.length:1,a=[];for(let n=0;n<i;n++){const i=kt.has(e)&&!o?t.flatMap((t=>t.pixels)):t.map((t=>t.pixels[n]));let u,l=!0;if(e===P.setNull){const t=dt(i,s,r);u=t.band,s=t.mask,l=!1}else It.has(e)?u=It.get(e)(i,s,"f64"):Nt.has(e)?u=e===M.asin||e===M.acos||e===M.atanh?E(i,s,"f64",e):D(i,s,"f64",Nt.get(e)):Ft.has(e)?u=z(i,s,"f64",Ft.get(e)):kt.has(e)?u=kt.get(e)(i,s,"f64"):(u=i[0],l=!1);if(l&&e!==_.isNull&&!R.has(e)){const t=y.A.createEmptyBand(r,u.length);s||(s=new Uint8Array(u.length).fill(255)),Ct(u,s,r,t),u=t}a.push(u)}const u=t[0];return new y.A({width:u.width,height:u.height,pixelType:r,mask:e===_.isNull?null:s,pixels:a})}let jt=class extends v{constructor(){super(...arguments),this.functionName="Arithmetic",this.functionArguments=null,this.rasterArgumentNames=["raster","raster2"]}_bindSourceRasters(){const{operation:t}=this.functionArguments;if(t<1||t>6)return{success:!1,supportsGPU:!1,error:"unsupported operation"};const 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:e.bandCount<=3}}_processPixels(t){const{pixelBlocks:e}=t;return null==e?.[0]||null==e?.[1]?null:function(t,e,n){return St(t,e=[null,1,2,3,23,5,44][e]??1,{outputPixelType:n})}(e,this.functionArguments.operation,this.outputPixelType)}_getWebGLParameters(){const{operation:t}=this.functionArguments,e=["","plus","minus","times","divide","power","mod"][t],n=this.outputPixelType??"f32";let[s,r]=(0,l.hP)(n);const o=(0,l.zw)(n);return o&&(s-=1e-4,r+=1e-4),{imageCount:2,operationName:e,domainRange:[s,r],isOutputRounded:o}}};(0,i._)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],jt.prototype,"functionName",void 0),(0,i._)([(0,a.MZ)({type:d,json:{write:!0,name:"rasterFunctionArguments"}})],jt.prototype,"functionArguments",void 0),(0,i._)([(0,a.MZ)()],jt.prototype,"rasterArgumentNames",void 0),jt=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.ArithmeticFunction")],jt);const Bt=jt;var Zt;let Gt=Zt=class extends h{clone(){return new Zt({raster:this.raster})}};Gt=Zt=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.AspectFunctionArguments")],Gt);const Ot=Gt;var Et=n(39062);let Dt=class extends v{constructor(){super(...arguments),this.functionName="Aspect",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){const t=this.sourceRasterInfos[0];this.isGCS=t.spatialReference?.isGeographic??!1,this.outputPixelType=this._getOutputPixelType("f32");const e=t.clone();return e.pixelType=this.outputPixelType,e.statistics=[{min:-1,max:360,avg:180,stddev:30}],e.histograms=null,e.colormap=null,e.attributeTable=null,e.bandCount=1,this.rasterInfo=e,{success:!0,supportsGPU:!0}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{extent:n,primaryPixelSizes:s}=t,r=s?.[0],o=r??(n?{x:n.width/e.width,y:n.height/e.height}:{x:1,y:1});return(0,Et.di)(e,{resolution:o})}};(0,i._)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Dt.prototype,"functionName",void 0),(0,i._)([(0,a.MZ)({type:Ot,json:{write:!0,name:"rasterFunctionArguments"}})],Dt.prototype,"functionArguments",void 0),(0,i._)([(0,a.MZ)()],Dt.prototype,"rasterArgumentNames",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],Dt.prototype,"isGCS",void 0),Dt=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.AspectFunction")],Dt);const zt=Dt;var Lt=n(93223),Ut=n(66552);const Vt=new Set(["+","-","*","/","(",")"]);function Wt(t,e){return t.toLowerCase().startsWith("b")?e[parseInt(t.slice(1),10)-1]:parseFloat(t)}function $t(t,e,n,s){if("number"==typeof n&&"number"==typeof s)return n+s;let r,o,i;"number"==typeof n?(i=s,r=i.length,o=new Float32Array(r),o.fill(n)):(r=n.length,o=n,s.constructor===Number?(i=new Float32Array(r),i.fill(s)):i=s);const a=new Float32Array(r);switch(e){case"+":for(let e=0;e<r;e++)(null==t||t[e])&&(a[e]=o[e]+i[e]);break;case"-":for(let e=0;e<r;e++)(null==t||t[e])&&(a[e]=o[e]-i[e]);break;case"*":for(let e=0;e<r;e++)(null==t||t[e])&&(a[e]=o[e]*i[e]);break;case"/":for(let e=0;e<r;e++)(null==t||t[e])&&i[e]&&(a[e]=o[e]/i[e]);break;case"(":case")":throw new Error("encountered error with custom band index equation")}return a}function qt(t,e){t.splice(e,1);let n=0,s=0;do{n=0,s=0;for(let e=0;e<t.length;e++)if("("===t[e])n=e;else if(")"===t[e]){s=e;break}s===n+1&&t.splice(n,2)}while(s===n+1);return t}function Ht(t){if(1===t.length)return{opIndex:0,numIndex:0};let e=0,n=0;for(let s=0;s<t.length;s++)if("("===t[s])e=s;else if(")"===t[s]){n=s;break}const s=0===n?t:t.slice(e+1,n);let r=-1;for(let t=0;t<s.length;t++)if("*"===s[t]||"/"===s[t]){r=t;break}if(r>-1)n>0&&(r+=e+1);else{for(let t=0;t<s.length;t++)if("+"===s[t]||"-"===s[t]){r=t;break}n>0&&(r+=e+1)}let o=0;for(let e=0;e<r;e++)"("===t[e]&&o++;return{opIndex:r,numIndex:r-o}}var Xt=n(28435);const Jt=new Ut.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 Kt(t,e){if(!(0,Xt.AB)(t))return t;const{equation:n,method:s}=e,r=e.bandIndexes.map((t=>t-1)),{pixels:o,mask:i}=t;let a;switch(s){case"gndvi":case"nbr":case"ndbi":case"ndvi":case"ndvi-re":case"ndsi":case"ndmi":case"mndwi":a=Qt(i,o[r[0]],o[r[1]]);break;case"ndwi":a=Qt(i,o[r[1]],o[r[0]]);break;case"sr":case"sr-re":case"iron-oxide":case"ferrous-minerals":case"clay-minerals":a=function(t,e,n){const s=n.length,r=new Float32Array(s);for(let o=0;o<s;o++)if(null==t||t[o]){const t=e[o],s=n[o];s&&(r[o]=t/s)}return[r]}(i,o[r[0]],o[r[1]]);break;case"ci-g":case"ci-re":a=function(t,e,n){const s=e.length,r=new Float32Array(s);for(let o=0;o<s;o++)if(null==t||t[o]){const t=e[o],s=n[o];s&&(r[o]=t/s-1)}return[r]}(i,o[r[0]],o[r[1]]);break;case"savi":a=function(t,e,n,s){const r=n.length,o=new Float32Array(r);for(let i=0;i<r;i++)if(null==t||t[i]){const t=n[i],r=e[i],a=r+t+s;a&&(o[i]=(r-t)/a*(1+s))}return[o]}(i,o[r[0]],o[r[1]],r[2]+1);break;case"tsavi":a=function(t,e,n,s,r,o){const i=n.length,a=new Float32Array(i),u=-r*s+o*(1+s*s);for(let o=0;o<i;o++)if(null==t||t[o]){const t=n[o],i=e[o],l=r*i+t+u;l&&(a[o]=s*(i-s*t-r)/l)}return[a]}(i,o[r[0]],o[r[1]],r[2]+1,r[3]+1,r[4]+1);break;case"msavi":a=function(t,e,n){const s=n.length,r=new Float32Array(s);for(let o=0;o<s;o++)if(null==t||t[o]){const t=n[o],s=e[o],i=2*s+1;r[o]=.5*(i-Math.sqrt(i*i-8*(s-t)))}return[r]}(i,o[r[0]],o[r[1]]);break;case"gemi":a=function(t,e,n){const s=n.length,r=new Float32Array(s);for(let o=0;o<s;o++)if(null==t||t[o]){const t=n[o],s=e[o];if(1!==t&&s+t+.5!==0){const e=(2*(s*s-t*t)+1.5*s+.5*t)/(s+t+.5);r[o]=e*(1-.25*e)-(t-.125)/(1-t)}}return[r]}(i,o[r[0]],o[r[1]]);break;case"pvi":a=function(t,e,n,s,r){const o=n.length,i=new Float32Array(o),a=1/Math.sqrt(1+s*s);for(let u=0;u<o;u++)if(null==t||t[u]){const t=n[u],o=e[u];i[u]=(o-s*t-r)*a}return[i]}(i,o[r[0]],o[r[1]],r[2]+1,r[3]+1);break;case"gvitm":a=function(t,e){const[n,s,r,o,i,a]=e,u=n.length,l=new Float32Array(u);for(let e=0;e<u;e++)(null==t||t[e])&&(l[e]=-.2848*n[e]-.2435*s[e]-.5436*r[e]+.7243*o[e]+.084*i[e]-.18*a[e]);return[l]}(i,[o[r[0]],o[r[1]],o[r[2]],o[r[3]],o[r[4]],o[r[5]]]);break;case"sultan":a=function(t,e){const[n,s,r,o,i]=e,a=n.length,u=new Float32Array(a),l=new Float32Array(a),c=new Float32Array(a);for(let e=0;e<a;e++)(null==t||t[e])&&(u[e]=i[e]?o[e]/i[e]*100:0,l[e]=n[e]?o[e]/n[e]*100:0,c[e]=r[e]?s[e]/r[e]*(o[e]/r[e])*100:0);return[u,l,c]}(i,[o[r[0]],o[r[1]],o[r[2]],o[r[3]],o[r[4]]]);break;case"vari":a=function(t,e){const[n,s,r]=e,o=n.length,i=new Float32Array(o);for(let e=0;e<o;e++)if(null==t||t[e])for(e=0;e<o;e++){const t=n[e],o=s[e],a=o+t-r[e];a&&(i[e]=(o-t)/a)}return[i]}(i,[o[r[0]],o[r[1]],o[r[2]]]);break;case"mtvi2":a=function(t,e){const[n,s,r]=e,o=n.length,i=new Float32Array(o);for(let e=0;e<o;e++)if(null==t||t[e])for(e=0;e<o;e++){const t=n[e],o=s[e],a=r[e],u=Math.sqrt((2*t+1)**2-(6*t-5*Math.sqrt(o))-.5);if(u){const n=1.5*(1.2*(t-a)-2.5*(o-a));i[e]=n/u}}return[i]}(i,[o[r[0]],o[r[1]],o[r[2]]]);break;case"rtvi-core":a=function(t,e){const[n,s,r]=e,o=n.length,i=new Float32Array(o);for(let e=0;e<o;e++)if(null==t||t[e])for(e=0;e<o;e++){const t=n[e],o=s[e],a=r[e];i[e]=100*(t-o)-10*(t-a)}return[i]}(i,[o[r[0]],o[r[1]],o[r[2]]]);break;case"evi":a=function(t,e){const[n,s,r]=e,o=n.length,i=new Float32Array(o);for(let e=0;e<o;e++)if(null==t||t[e])for(e=0;e<o;e++){const t=n[e],o=s[e],a=t+6*o-7.5*r[e]+1;a&&(i[e]=2.5*(t-o)/a)}return[i]}(i,[o[r[0]],o[r[1]],o[r[2]]]);break;case"wndwi":a=function(t,e,n=.5){const[s,r,o]=e,i=r.length,a=new Float32Array(i);for(let e=0;e<i;e++)if(null==t||t[e])for(e=0;e<i;e++){const t=s[e],i=r[e],u=o[e],l=t+n*i+(1-n)*u;l&&(a[e]=(t-n*i-(1-n)*u)/l)}return[a]}(i,[o[r[0]],o[r[1]],o[r[2]]],r[3]?r[3]+1:.5);break;case"bai":a=function(t,e,n){const s=n.length,r=new Float32Array(s);for(let o=0;o<s;o++)if(null==t||t[o])for(o=0;o<s;o++){const t=(.1-e[o])**2+(.06-n[o])**2;t&&(r[o]=1/t)}return[r]}(i,o[r[0]],o[r[1]]);break;case"custom":a=function(t,e,n){let s,{ops:r,nums:o}=function(t,e){(t=t.replaceAll(" ","")).startsWith("-")&&(t="0"+t),t.startsWith("+")&&(t=t.slice(1,t.length));const n=t.split(""),s=[],r=[];let o="";for(let t=0;t<n.length;t++){const i=n[t];Vt.has(i)?(o.length&&r.push(Wt(o,e)),s.push(i),o=""):o=o.concat(i)}return o.length&&r.push(Wt(o,e)),{ops:s,nums:r}}(n,e);if(0===r.length){const t=1===o.length?o[0]:e[0];if(t instanceof Float32Array)return[t];const n=new Float32Array(e[0].length);return"number"==typeof t?n.fill(t):n.set(t),[n]}for(;r.length>0;){const{numIndex:e,opIndex:n}=Ht(r);if(s=$t(t,r[n],o[e],o[e+1]),1===r.length)break;r=qt(r,n),o.splice(e,2,s)}return[s]}(i,o,n);break;default:return t}const u=null!=i?new Uint8Array(i.length):null;null!=i&&null!=u&&u.set(i);const l=new y.A({width:t.width,height:t.height,pixelType:"f32",pixels:a,mask:u});return l.updateStatistics(),l}function Yt(t){const e=new Float32Array(9);return e[3*t[0]]=1,e[3*t[1]+1]=1,e[3*t[2]+2]=1,e}function Qt(t,e,n){const s=n.length,r=new Float32Array(s);for(let o=0;o<s;o++)if(null==t||t[o]){const t=e[o],s=n[o],i=t+s;i&&(r[o]=(t-s)/i)}return[r]}var te;let ee=te=class extends h{constructor(){super(...arguments),this.method="custom"}clone(){return new te({method:this.method,bandIndexes:this.bandIndexes,raster:(0,o.o8)(this.raster)})}};(0,i._)([(0,a.MZ)({json:{type:String,write:!0}})],ee.prototype,"bandIndexes",void 0),(0,i._)([(0,Lt.e)(Jt)],ee.prototype,"method",void 0),ee=te=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.BandArithmeticFunctionArguments")],ee);const ne=ee,se=new Set(["vari","mtvi2","rtvi-core","evi"]);let re=class extends v{constructor(){super(...arguments),this.functionName="BandArithmetic",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){this.outputPixelType=this._getOutputPixelType("f32");const t=this.sourceRasterInfos[0];if(t.bandCount<2)return{success:!1,supportsGPU:!1,error:"band-arithmetic-function: source raster has insufficient amount of raster bands"};const e=t.clone();return e.pixelType=this.outputPixelType,e.bandCount="sultan"===this.functionArguments.method?3:1,this._removeStatsHistColormapVAT(e),e.keyProperties={...e.keyProperties,BandProperties:void 0},this.rasterInfo=e,{success:!0,supportsGPU:!["custom","gvitm","sultan"].includes(this.functionArguments.method)}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return e;const{method:n,bandIndexes:s}=this.functionArguments,r=s.split(" ").map((t=>parseFloat(t)));return Kt(e,{method:n,bandIndexes:r,equation:s})}_getWebGLParameters(){const t=this.functionArguments.bandIndexes.split(" ").map((t=>parseFloat(t)-1));2===t.length&&t.push(0);const e=this.isInputBandIdsSwizzled?[0,1,2]:t;let n,s;const r=new Float32Array(3),{method:o}=this.functionArguments;switch(o){case"gndvi":case"nbr":case"ndbi":case"ndvi":case"ndvi-re":case"ndsi":case"ndmi":case"mndwi":n=Yt([e[0],e[1],0]),s="ndxi";break;case"ndwi":n=Yt([e[1],e[0],0]),s="ndxi";break;case"sr":case"sr-re":case"iron-oxide":case"ferrous-minerals":case"clay-minerals":n=Yt([e[0],e[1],0]),s="sr";break;case"ci-g":case"ci-re":n=Yt([e[0],e[1],0]),s="ci";break;case"savi":n=Yt([e[0],e[1],0]),s="savi",r[0]=t[2]+1;break;case"tsavi":n=Yt([e[0],e[1],0]),s="tsavi",r[0]=t[2]+1,r[1]=t[3]+1,r[2]=t[4]+1;break;case"msavi":n=Yt([e[0],e[1],0]),s="msavi";break;case"gemi":n=Yt([e[0],e[1],0]),s="gemi";break;case"pvi":n=Yt([e[0],e[1],0]),s="tsavi",r[0]=t[2]+1,r[1]=t[3]+1;break;case"vari":n=Yt([e[0],e[1],e[2]]),s="vari";break;case"mtvi2":n=Yt([e[0],e[1],e[2]]),s="mtvi";break;case"rtvi-core":n=Yt([e[0],e[1],e[2]]),s="rtvicore";break;case"evi":n=Yt([e[0],e[1],e[2]]),s="evi";break;case"wndwi":n=Yt([e[0],e[1],0]),s="wndwi",r[0]=t[3]?t[3]+1:.5;break;case"bai":n=Yt([e[1],e[0],0]),s="bai";break;default:n=Yt([0,1,2]),s="custom"}return{bandIndexMat3:n,indexType:s,adjustments:r}}_getInputBandIds(t){if("custom"===this.functionArguments.method)return t;const e=this.functionArguments.bandIndexes.split(" ").map((t=>parseFloat(t)-1)),n=t.length,s=e.map((t=>t>=n?n-1:t)),r=se.has(this.functionArguments.method)?3:2,o=s.slice(0,r).map((e=>t[e]));return 2===o.length&&o.push(0),o}};(0,i._)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],re.prototype,"functionName",void 0),(0,i._)([(0,a.MZ)({type:ne,json:{write:!0,name:"rasterFunctionArguments"}})],re.prototype,"functionArguments",void 0),(0,i._)([(0,a.MZ)()],re.prototype,"rasterArgumentNames",void 0),re=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.BandArithmeticFunction")],re);const oe=re;var ie,ae=n(59456),ue=n(65864);const le=new Ut.J({1:"outside",2:"inside"},{useNumericKeys:!0});let ce=ie=class extends h{constructor(){super(...arguments),this.clippingType="outside"}clone(){return new ie({clippingGeometry:this.clippingGeometry.clone(),clippingType:this.clippingType})}};(0,i._)([(0,a.MZ)({types:ae.yR,json:{read:ue.rS,write:!0}})],ce.prototype,"clippingGeometry",void 0),(0,i._)([(0,a.MZ)({json:{read:le.read,write:le.write}})],ce.prototype,"clippingType",void 0),ce=ie=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.ClipFunctionArguments")],ce);const pe=ce;let he=class extends v{constructor(){super(...arguments),this.functionName="Clip",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){const t=this.sourceRasterInfos[0].clone();return this.outputPixelType=this._getOutputPixelType(t.pixelType),t.pixelType=this.outputPixelType,this.rasterInfo=t,{success:!0,supportsGPU:!0}}_processPixels(t){return t.pixelBlocks?.[0]}_getWebGLParameters(){const{clippingGeometry:t,clippingType:e}=this.functionArguments;return{clippingGeometry:t.toJSON(),clippingType:e}}};(0,i._)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],he.prototype,"functionName",void 0),(0,i._)([(0,a.MZ)({type:pe,json:{write:!0,name:"rasterFunctionArguments"}})],he.prototype,"functionArguments",void 0),(0,i._)([(0,a.MZ)()],he.prototype,"rasterArgumentNames",void 0),(0,i._)([(0,a.MZ)()],he.prototype,"isNoopProcess",void 0),he=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.ClipFunction")],he);const fe=he;var me,de=n(36005),ge=n(67369),ye=n(95349);let xe=me=class extends h{castColormapName(t){if(!t)return null;const e=t.toLowerCase();return ge.L7.includes(e)?e:null}readColorRamp(t){return(0,ye.r)(t)}readColorRampName(t,e){if(!t)return null;const n=ge.kH.jsonValues.find((e=>e.toLowerCase()===t.toLowerCase()));return n?ge.kH.fromJSON(n):null}clone(){return new me({colormap:(0,o.o8)(this.colormap),colormapName:this.colormapName,colorRamp:this.colorRamp?.clone(),colorRampName:this.colorRampName})}};(0,i._)([(0,a.MZ)({type:[[Number]],json:{write:!0}})],xe.prototype,"colormap",void 0),(0,i._)([(0,a.MZ)({type:String,json:{write:!0}})],xe.prototype,"colormapName",void 0),(0,i._)([(0,g.w)("colormapName")],xe.prototype,"castColormapName",null),(0,i._)([(0,a.MZ)({types:ye.g,json:{write:!0}})],xe.prototype,"colorRamp",void 0),(0,i._)([(0,de.w)("colorRamp")],xe.prototype,"readColorRamp",null),(0,i._)([(0,a.MZ)({type:ge.kH.apiValues,json:{type:ge.kH.jsonValues,write:ge.kH.write}})],xe.prototype,"colorRampName",void 0),(0,i._)([(0,de.w)("colorRampName")],xe.prototype,"readColorRampName",null),xe=me=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.ColormapFunctionArguments")],xe);const we=xe,Ae=[[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]],ve=[[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 be(t,e){const n=[],s=[];for(let e=0;e<t.length-1;e++)n.push({type:"algorithmic",algorithm:"esriHSVAlgorithm",fromColor:t[e].slice(1),toColor:t[e+1].slice(1)}),s.push(t[e+1][0]-t[e][0]);const r=t[t.length-1][0];return(0,ge.iv)({type:"multipart",colorRamps:n},{numColors:r,weights:e=e??s})}let _e=class extends v{constructor(){super(...arguments),this.functionName="Colormap",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){const t=this.sourceRasterInfos[0];if(t.bandCount>1)return{success:!1,supportsGPU:!1,error:"colormap-function: source data must be single band"};let{colormap:e,colormapName:n,colorRamp:s,colorRampName:r}=this.functionArguments;if(!e?.length)if(s)e=(0,ge.R8)(s,{interpolateAlpha:!0});else if(r){const t=(0,ge.M5)(r);t&&(e=(0,ge.R8)(t))}else n&&(e=function(t){let e;switch(t){case"elevation":e=be([[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":e=(0,ge.iv)({type:"algorithmic",algorithm:"esriHSVAlgorithm",fromColor:[0,0,0],toColor:[255,255,255]});break;case"hillshade":e=be([[0,38,41,54],[69,79,82,90],[131,156,156,156],[256,253,253,241]],[.268,.238,.495]);break;case"ndvi":e=Ae;break;case"ndvi2":e=function(){const t=be([[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 e=t.length;e<256;e++)t.push([6,27,7]);return t}();break;case"ndvi3":e=ve;break;case"random":e=function(){const t=[];for(let e=0;e<256;e++){const e=[];for(let t=0;t<3;t++)e.push(Math.round(255*Math.random()));t.push(e)}return t}()}return e?(e=e.map(((t,e)=>[e,...t])),e):null}(n));if(!e?.length)return{success:!1,supportsGPU:!1,error:"colormap-function: missing colormap argument"};const o=this._getOutputPixelType(t.pixelType);this.outputPixelType=o.startsWith("f")?"s32":o;const i=t.clone();return i.pixelType=this.outputPixelType,i.colormap=e,i.bandCount=1,this.rasterInfo=i,{success:!0,supportsGPU:!0}}_processPixels(t){let e=t.pixelBlocks?.[0];return!e||(0,l.zw)(e.pixelType)||(e=e.clone(),e.clamp(this.outputPixelType)),e}};(0,i._)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],_e.prototype,"functionName",void 0),(0,i._)([(0,a.MZ)({type:we,json:{write:!0,name:"rasterFunctionArguments"}})],_e.prototype,"functionArguments",void 0),(0,i._)([(0,a.MZ)()],_e.prototype,"rasterArgumentNames",void 0),(0,i._)([(0,a.MZ)()],_e.prototype,"isNoopProcess",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],_e.prototype,"indexedColormap",void 0),_e=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.ColormapFunction")],_e);const Me=_e;var Pe,Te=n(43937);let Re=Pe=class extends h{constructor(){super(...arguments),this.rasters=[]}writeRasters(t,e){e.rasters=t.map((t=>"number"==typeof t||"string"==typeof t?t:t.toJSON()))}clone(){return new Pe({rasters:(0,o.o8)(this.rasters)})}};(0,i._)([(0,a.MZ)({json:{write:!0}})],Re.prototype,"rasters",void 0),(0,i._)([(0,Te.K)("rasters")],Re.prototype,"writeRasters",null),Re=Pe=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.CompositeBandFunctionArguments")],Re);const Ne=Re;let Fe=class extends v{constructor(){super(...arguments),this.functionName="CompositeBand",this.functionArguments=null,this.rasterArgumentNames=["rasters"]}_bindSourceRasters(){const{sourceRasterInfos:t}=this,e=t[0];this.outputPixelType=this._getOutputPixelType(e.pixelType);const n=e.clone();if(n.attributeTable=null,n.colormap=null,n.pixelType=this.outputPixelType,n.bandCount=t.map((({bandCount:t})=>t)).reduce(((t,e)=>t+e)),t.every((({statistics:t})=>null!=t&&t.length))){const e=[];t.forEach((({statistics:t})=>null!=t&&e.push(...t))),n.statistics=e}if(t.every((({histograms:t})=>null!=t&&t.length))){const e=[];t.forEach((({histograms:t})=>null!=t&&e.push(...t))),n.histograms=e}n.bandCount>1&&(n.colormap=null,n.attributeTable=null);const s=t.every((t=>t.keyProperties.BandProperties?.length))?t.flatMap((t=>t.keyProperties.BandProperties)):void 0;return n.keyProperties={...n.keyProperties,BandProperties:s},this.rasterInfo=n,{success:!0,supportsGPU:n.bandCount<=3}}_processPixels(t){const{pixelBlocks:e}=t;if(!e)return null;const n=e?.[0];return null==n?null:(0,Xt.Wy)(e)}_getWebGLParameters(){return{bandCount:this.rasterInfo.bandCount}}};(0,i._)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Fe.prototype,"functionName",void 0),(0,i._)([(0,a.MZ)({type:Ne,json:{write:!0,name:"rasterFunctionArguments"}})],Fe.prototype,"functionArguments",void 0),(0,i._)([(0,a.MZ)()],Fe.prototype,"rasterArgumentNames",void 0),Fe=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.CompositeBandFunction")],Fe);const Ie=Fe;var ke;let Ce=ke=class extends h{constructor(){super(...arguments),this.contrastOffset=0,this.brightnessOffset=0}clone(){return new ke({contrastOffset:this.contrastOffset,brightnessOffset:this.brightnessOffset,raster:this.raster})}};(0,i._)([(0,a.MZ)({json:{write:!0}})],Ce.prototype,"contrastOffset",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],Ce.prototype,"brightnessOffset",void 0),Ce=ke=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.ContrastBrightnessFunctionArguments")],Ce);const Se=Ce;var je=n(6952);let Be=class extends v{constructor(){super(...arguments),this.functionName="ContrastBrightness",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null}_bindSourceRasters(){const{sourceRasterInfos:t}=this,e=t[0];if("u8"!==e.pixelType)return{success:!1,supportsGPU:!1,error:"Only unsigned 8 bit raster is supported by ContrastBrightness function."};this.outputPixelType=this._getOutputPixelType("u8");const n=e.clone();this._removeStatsHistColormapVAT(n),this.rasterInfo=n;const{contrastOffset:s,brightnessOffset:r}=this.functionArguments;return this.lookup=(0,je.zj)(s,r),{success:!0,supportsGPU:!0}}_processPixels(t){const e=t.pixelBlocks?.[0];return null==e?null:(0,Xt.eH)(e,{lut:e.pixels.map((()=>this.lookup)),offset:0,outputPixelType:"u8"})}_getWebGLParameters(){const{contrastOffset:t,brightnessOffset:e}=this.functionArguments;return{contrastOffset:t,brightnessOffset:e}}};(0,i._)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Be.prototype,"functionName",void 0),(0,i._)([(0,a.MZ)({type:Se,json:{write:!0,name:"rasterFunctionArguments"}})],Be.prototype,"functionArguments",void 0),(0,i._)([(0,a.MZ)()],Be.prototype,"rasterArgumentNames",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],Be.prototype,"lookup",void 0),Be=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.ContrastBrightnessFunction")],Be);const Ze=Be;function Ge(t,e,n,s,r){const o=Math.floor(s/2);for(let s=0;s<o;s++)for(let o=0;o<e;o++)t[s*e+o]=t[(r-1-s)*e+o],t[(n-1-s)*e+o]=t[(n-r+s)*e+o];const i=Math.floor(r/2);for(let s=0;s<n;s++){const n=s*e;for(let s=0;s<i;s++)t[n+s]=t[n+r-1-s],t[n+e-s-1]=t[n+e+s-r]}}const Oe=new Map;function Ee(t,e,n,s,r,o,i){const a=new Float32Array(e*n),u=o.length,l=i?0:s,c=i?s:0,p=i?1:e;for(let i=l;i<n-l;i++){const n=i*e;for(let i=c;i<e-c;i++){if(r&&!r[n+i])continue;let e=0;for(let r=0;r<u;r++)e+=t[n+i+(r-s)*p]*o[r];a[n+i]=e}}return a}function De(t,e,n,s,r,o,i){const a=new Float32Array(e*n),u=Math.floor(s/2),l=Math.floor(r/2);for(let c=u;c<n-u;c++){const n=c*e;for(let c=l;c<e-l;c++){if(o&&!o[n+c])continue;let p=0;for(let o=0;o<s;o++)for(let s=0;s<r;s++)p+=t[n+c+(o-u)*e+s-l]*i[o*r+s];a[n+c]=p}}return a}var ze;Oe.set(b.none,[0,0,0,0,1,0,0,0,0]),Oe.set(b.lineDetectionHorizontal,[-1,-1,-1,2,2,2,-1,-1,-1]),Oe.set(b.lineDetectionVertical,[-1,2,-1,-1,2,-1,-1,2,-1]),Oe.set(b.lineDetectionLeftDiagonal,[2,-1,-1,-1,2,-1,-1,-1,2]),Oe.set(b.lineDetectionRightDiagonal,[-1,-1,2,-1,2,-1,2,-1,-1]),Oe.set(b.gradientNorth,[-1,-2,-1,0,0,0,1,2,1]),Oe.set(b.gradientWest,[-1,0,1,-2,0,2,-1,0,1]),Oe.set(b.gradientEast,[1,0,-1,2,0,-2,1,0,-1]),Oe.set(b.gradientSouth,[1,2,1,0,0,0,-1,-2,-1]),Oe.set(b.gradientNorthEast,[0,-1,-2,1,0,-1,2,1,0]),Oe.set(b.gradientNorthWest,[-2,-1,0,-1,0,1,0,1,2]),Oe.set(b.smoothArithmeticMean,[.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111]),Oe.set(b.smoothing3x3,[.0625,.125,.0625,.125,.25,.125,.0625,.125,.0625]),Oe.set(b.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]),Oe.set(b.sharpening3x3,[-1,-1,-1,-1,9,-1,-1,-1,-1]),Oe.set(b.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]),Oe.set(b.laplacian3x3,[0,-1,0,-1,4,-1,0,-1,0]),Oe.set(b.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]),Oe.set(b.sobelHorizontal,[-1,-2,-1,0,0,0,1,2,1]),Oe.set(b.sobelVertical,[-1,0,1,-2,0,2,-1,0,1]),Oe.set(b.sharpen,[0,-.25,0,-.25,2,-.25,0,-.25,0]),Oe.set(b.sharpen2,[-.25,-.25,-.25,-.25,3,-.25,-.25,-.25,-.25]),Oe.set(b.pointSpread,[-.627,.352,-.627,.352,2.923,.352,-.627,.352,-.627]);let Le=ze=class extends h{constructor(){super(...arguments),this.rows=3,this.cols=3,this.kernel=[0,0,0,0,1,0,0,0,0]}set convolutionType(t){this._set("convolutionType",t);const e=Oe.get(t);if(!e||t===b.userDefined||t===b.none)return;const n=Math.sqrt(e.length);this._set("kernel",e),this._set("cols",n),this._set("rows",n)}clone(){return new ze({cols:this.cols,rows:this.rows,kernel:[...this.kernel],convolutionType:this.convolutionType,raster:(0,o.o8)(this.raster)})}};(0,i._)([(0,a.MZ)({json:{type:Number,write:!0}})],Le.prototype,"rows",void 0),(0,i._)([(0,a.MZ)({json:{type:Number,write:!0}})],Le.prototype,"cols",void 0),(0,i._)([(0,a.MZ)({json:{name:"type",type:Number,write:!0}})],Le.prototype,"convolutionType",null),(0,i._)([(0,a.MZ)({json:{type:[Number],write:!0}})],Le.prototype,"kernel",void 0),Le=ze=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.ConvolutionFunctionArguments")],Le);const Ue=Le;let Ve=class extends v{constructor(){super(...arguments),this.functionName="Convolution",this.rasterArgumentNames=["raster"]}get _normalizedKernel(){const{kernel:t,convolutionType:e}=this.functionArguments,n=t.reduce(((t,e)=>t+e));return-1===e||0===n||1===n?t:t.map((t=>t/n))}_bindSourceRasters(){const{convolutionType:t,rows:e,cols:n,kernel:s}=this.functionArguments;if(!Object.values(b).includes(t))return{success:!1,supportsGPU:!1,error:`convolution-function: the specified kernel type is not supported ${t}`};if(t!==b.none&&e*n!==s.length)return{success:!1,supportsGPU:!1,error:"convolution-function: the specified rows and cols do not match the length of the kernel"};const r=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType(r.pixelType);const o=r.clone();o.pixelType=this.outputPixelType;const i=[b.none,b.sharpen,b.sharpen2,b.sharpening3x3,b.sharpening5x5];return(-1===t||"u8"!==this.outputPixelType&&!i.includes(t))&&(o.statistics=null,o.histograms=null),o.colormap=null,o.attributeTable=null,this.rasterInfo=o,{success:!0,supportsGPU:s.length<=25}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e||this.functionArguments.convolutionType===b.none)return e;const{rows:n,cols:s}=this.functionArguments,{_normalizedKernel:r}=this;return function(t,e){const n=function(t){const e=Math.sqrt(t.length),n=t.slice(0,e),s=[1];for(let n=1;n<e;n++){let r=null;for(let s=0;s<e;s++){const o=t[s+n*e],i=t[s];if(null==r)if(0===i){if(o)return{separable:!1,row:null,col:null}}else r=o/i;else if(o/i!==r)return{separable:!1,row:null,col:null}}if(null==r)return{separable:!1,row:null,col:null};s.push(r)}return{separable:!0,row:n,col:s}}(e.kernel),s=!1!==e.mirrorEdges,r=n.separable?function(t,e,n,s=!0){const{pixels:r,width:o,height:i,pixelType:a,mask:u}=t,l=r.length,c=[],p=e.length,h=n.length,f=Math.floor(p/2),m=Math.floor(h/2);for(let t=0;t<l;t++){let a=Ee(r[t],o,i,f,u,e,!0);a=Ee(a,o,i,m,u,n,!1),s&&Ge(a,o,i,p,h),c.push(a)}return new y.A({width:o,height:i,pixelType:a,pixels:c,mask:u})}(t,n.row,n.col,s):function(t,e,n=!0){const{pixels:s,width:r,height:o,pixelType:i,mask:a}=t,u=s.length,l=[],{kernel:c,rows:p,cols:h}=e;for(let t=0;t<u;t++){const e=De(s[t],r,o,p,h,a,c);n&&Ge(e,r,o,p,h),l.push(e)}return new y.A({width:r,height:o,pixelType:i,pixels:l,mask:a})}(t,e,s),{outputPixelType:o}=e;return o&&r.clamp(o),r}(e,{kernel:r,rows:n,cols:s,outputPixelType:this.outputPixelType})}_getWebGLParameters(){const t=new Float32Array(25);return t.set(this._normalizedKernel),{kernelRows:this.functionArguments.rows,kernelCols:this.functionArguments.cols,kernel:t,clampRange:(0,l.hP)(this.outputPixelType)}}};(0,i._)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Ve.prototype,"functionName",void 0),(0,i._)([(0,a.MZ)({type:Ue,json:{write:!0,name:"rasterFunctionArguments"}})],Ve.prototype,"functionArguments",void 0),(0,i._)([(0,a.MZ)()],Ve.prototype,"rasterArgumentNames",void 0),(0,i._)([(0,a.MZ)()],Ve.prototype,"_normalizedKernel",null),Ve=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.ConvolutionFunction")],Ve);const We=Ve;var $e;const qe=new Ut.J({0:"standard",1:"platform",2:"profile"},{useNumericKeys:!0});let He=$e=class extends h{constructor(){super(...arguments),this.curvatureType="standard",this.zFactor=1}readCurvatureType(t,e){return qe.fromJSON(e.type??e.curvatureType??0)}clone(){return new $e({curvatureType:this.curvatureType,zFactor:this.zFactor,raster:this.raster})}};(0,i._)([(0,a.MZ)({json:{write:{target:"type"}}}),(0,Lt.e)(qe)],He.prototype,"curvatureType",void 0),(0,i._)([(0,de.w)("curvatureType",["type","curvatureType"])],He.prototype,"readCurvatureType",null),(0,i._)([(0,a.MZ)({type:Number,json:{write:!0}})],He.prototype,"zFactor",void 0),He=$e=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.CurvatureFunctionArguments")],He);const Xe=He;let Je=class extends v{constructor(){super(...arguments),this.functionName="Curvature",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){this.outputPixelType=this._getOutputPixelType("f32");const t=this.sourceRasterInfos[0].clone();return t.pixelType=this.outputPixelType,t.bandCount=1,this._removeStatsHistColormapVAT(t),this.rasterInfo=t,this.isGCS=t.spatialReference?.isGeographic??!1,{success:!0,supportsGPU:!0}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{zFactor:n,curvatureType:s}=this.functionArguments,{extent:r,primaryPixelSizes:o}=t,i=o?.[0],a=i??(r?{x:r.width/e.width,y:r.height/e.height}:{x:1,y:1}),u=this.isGCS&&n>=1?n*Et.rk:n;return(0,Et.E0)(e,{zFactor:u,curvatureType:s,resolution:a})}_getWebGLParameters(){const{zFactor:t,curvatureType:e}=this.functionArguments;return{curvatureType:e,zFactor:this.isGCS&&t>=1?t*Et.rk:t}}};(0,i._)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Je.prototype,"functionName",void 0),(0,i._)([(0,a.MZ)({type:Xe,json:{write:!0,name:"rasterFunctionArguments"}})],Je.prototype,"functionArguments",void 0),(0,i._)([(0,a.MZ)()],Je.prototype,"rasterArgumentNames",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],Je.prototype,"isGCS",void 0),Je=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.CurvatureFunction")],Je);const Ke=Je;var Ye;let Qe=Ye=class extends h{constructor(){super(...arguments),this.bandIds=[],this.bandNames=[],this.bandWavelengths=[],this.missingBandAction=Xt.Wb.bestMatch}clone(){return new Ye({bandIds:this.bandIds?.slice(),bandNames:this.bandNames?.slice(),bandWavelengths:this.bandWavelengths?.slice(),missingBandAction:this.missingBandAction,method:this.method,wavelengthMatchTolerance:this.wavelengthMatchTolerance})}};(0,i._)([(0,a.MZ)({json:{write:!0}})],Qe.prototype,"bandIds",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],Qe.prototype,"bandNames",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],Qe.prototype,"bandWavelengths",void 0),(0,i._)([(0,Lt.e)({0:"name",1:"wavelength",2:"id"})],Qe.prototype,"method",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],Qe.prototype,"missingBandAction",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],Qe.prototype,"wavelengthMatchTolerance",void 0),Qe=Ye=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.ExtractBandFunctionArguments")],Qe);const tn=Qe;let en=class extends v{constructor(){super(...arguments),this.functionName="ExtractBand",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const{functionArguments:t,sourceRasterInfos:e}=this,n=e[0],{method:s,bandNames:r,bandWavelengths:o,bandIds:i,missingBandAction:a}=t,u=r?.length&&("name"===s||"id"!==s&&!i?.length),l=o?.length&&("wavelength"===s||"id"!==s&&!i?.length),c=a===Xt.Wb.fail,p=u?function(t,e){const n=t.bandInfos.map((({name:t})=>t.toLowerCase())),s=[];for(let t=0;t<e.length;t++){const r=e[t].toLowerCase();let o=n.indexOf(r);if(-1===o&&"nearinfrared"===r&&(o=n.findIndex((t=>t.startsWith("nearinfrared_1"))),-1===o&&(o=n.findIndex((t=>t.startsWith("nearinfrared"))))),-1===o)return null;s.push(o)}return s}(n,r):l?function(t,e,{wavelengthMatchTolerance:n},s){const{bandInfos:r}=t,o=[];for(let t=0;t<r.length;t++){const{minWavelength:e,maxWavelength:n}=r[t];if(!e||!n)return null;o.push({minWavelength:e,maxWavelength:n})}const i=[];for(let t=0;t<e.length;t++){const r=e[t];let a=!1,u=-1,l=Number.MAX_VALUE;for(let t=0;t<o.length;t++){const e=o[t],n=r>=e.minWavelength&&r<=e.maxWavelength,s=Math.abs(r-(e.minWavelength+e.maxWavelength)/2);n?s<l&&(a=!0,u=t,l=s):!a&&s<l&&(u=t,l=s)}if(!a&&n&&l<n&&(a=!0),!a&&s)return null;i.push(u)}return i}(n,o,this.functionArguments,c):function(t,e,n){const{bandCount:s}=t;return!e?.length||n&&e.some((t=>t<0||t>=s))?null:e}(n,i,c);if(null==p)return{success:!1,supportsGPU:!1,error:`extract-band-function: Invalid ${u?"band names":l?"band wavelengths":"band ids"} for the imagery data source`};this.functionArguments.bandIds=p,this.functionArguments.method="id",this.outputPixelType=this._getOutputPixelType("f32");const h=n.clone();h.pixelType=this.outputPixelType,h.bandCount=p.length;const{statistics:f,histograms:m}=h;null!=f&&f.length&&(h.statistics=p.map((t=>f[t]||f[f.length-1]))),null!=m&&m.length&&(h.histograms=p.map((t=>m[t]||m[m.length-1])));let d=h.keyProperties?.BandProperties;return d?.length&&(d=p.map((t=>t>=d.length?d[d.length-1]:d[t])),h.keyProperties={...h.keyProperties,BandProperties:d}),this.rasterInfo=h,{success:!0,supportsGPU:h.bandCount<=3}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const n=e.pixels.length,s=this.functionArguments.bandIds.map((t=>t>=n?n-1:t));return e.extractBands(s)}_getWebGLParameters(){let t;if(this.isInputBandIdsSwizzled)t=this.swizzledBandSelection.length?this.swizzledBandSelection:[0,1,2];else{t=[...this.functionArguments.bandIds],0===t.length?t=[0,1,2]:t.length<3&&(t[1]=t[1]??t[0],t[2]=t[2]??t[1]);for(let e=0;e<3;e++)t[e]=Math.min(t[e],2)}return{bandIndexMat3:Yt(t)}}_getInputBandIds(t){const e=t.length;return this.functionArguments.bandIds.map((t=>t>=e?e-1:t)).map((e=>t[e]))}};(0,i._)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],en.prototype,"functionName",void 0),(0,i._)([(0,a.MZ)({type:tn,json:{write:!0,name:"rasterFunctionArguments"}})],en.prototype,"functionArguments",void 0),(0,i._)([(0,a.MZ)()],en.prototype,"rasterArgumentNames",void 0),en=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.ExtractBandFunction")],en);const nn=en;var sn;let rn=sn=class extends h{clone(){return new sn({conversionParameters:[...this.conversionParameters],raster:this.raster})}};(0,i._)([(0,a.MZ)({type:[Number],json:{write:!0}})],rn.prototype,"conversionParameters",void 0),rn=sn=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.GrayscaleFunctionArguments")],rn);const on=rn;let an=class extends v{constructor(){super(...arguments),this.functionName="Grayscale",this.functionArguments=null,this.rasterArgumentNames=["raster"]}get _normalizedWeights(){const{conversionParameters:t}=this.functionArguments,e=t.reduce(((t,e)=>t+e));return t.map((t=>t/e))}_bindSourceRasters(){const{conversionParameters:t}=this.functionArguments;if(!t?.length)return{success:!1,supportsGPU:!1,error:"missing valid conversion parameters."};const e=this.sourceRasterInfos[0].clone();this.outputPixelType=this._getOutputPixelType(e.pixelType),e.pixelType=this.outputPixelType;const n=3===t.length||3===e.bandCount&&t.length>3;return e.bandCount=1,this._removeStatsHistColormapVAT(e),this.rasterInfo=e,{success:!0,supportsGPU:n}}_processPixels(t){const e=t.pixelBlocks?.[0];return null==e?null:function(t,e,n){const{pixels:s,width:r,height:o,mask:i,bandMasks:a}=t,u=r*o,c=a?.length?y.A.combineBandMasks(a):i,p=Math.min(e.length,s.length),h=n.startsWith("f"),f=!h&&n!==t.pixelType,[m,d]=(0,l.hP)(n),g=y.A.createEmptyBand(n,u);for(let t=0;t<o;t++){let n=t*r;for(let t=0;t<r;t++,n++)if(!c||c[n]){let t=0;for(let r=0;r<p;r++)t+=e[r]*s[r][n];h||(t=Math.round(t),f&&(t=t>d?d:t<m?m:t)),g[n]=t}}const x=new y.A({width:r,height:o,pixels:[g],pixelType:n,mask:c});return x.updateStatistics(),x}(e,this._normalizedWeights,this.outputPixelType)}_getWebGLParameters(){return{weights:this._normalizedWeights}}};(0,i._)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],an.prototype,"functionName",void 0),(0,i._)([(0,a.MZ)({type:on,json:{write:!0,name:"rasterFunctionArguments"}})],an.prototype,"functionArguments",void 0),(0,i._)([(0,a.MZ)()],an.prototype,"rasterArgumentNames",void 0),(0,i._)([(0,a.MZ)()],an.prototype,"_normalizedWeights",null),an=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.GrayscaleFunction")],an);const un=an;var ln;let cn=ln=class extends h{constructor(){super(...arguments),this.rasters=[],this.processAsMultiband=!0}writeRasters(t,e){e.rasters=t.map((t=>"number"==typeof t||"string"==typeof t?t:t.toJSON()))}clone(){return new ln({operation:this.operation,processAsMultiband:this.processAsMultiband,rasters:(0,o.o8)(this.rasters)})}};(0,i._)([(0,a.MZ)({json:{write:!0}})],cn.prototype,"operation",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],cn.prototype,"rasters",void 0),(0,i._)([(0,Te.K)("rasters")],cn.prototype,"writeRasters",null),(0,i._)([(0,a.MZ)({json:{write:!0}})],cn.prototype,"processAsMultiband",void 0),cn=ln=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.LocalFunctionArguments")],cn);const pn=cn;let hn=class extends v{constructor(){super(...arguments),this.functionName="Local",this.functionArguments=null,this.rasterArgumentNames=["rasters"]}_bindSourceRasters(){const{sourceRasterInfos:t}=this,e=t[0],{bandCount:n}=e,{processAsMultiband:s}=this.functionArguments;if(t.some((t=>t.bandCount!==n)))return{success:!1,supportsGPU:!1,error:"local-function: input rasters do not have same band count"};const{operation:r,rasters:o}=this.functionArguments,i=F[r];if(!(999===i||o.length===i||o.length<=1&&1===i))return{success:!1,supportsGPU:!1,error:`local-function: the length of functionArguments.rasters does not match operation's requirement: ${i}`};const a=e.clone();return a.bandCount=999!==i||s?n:1,this._removeStatsHistColormapVAT(a),this._updateStatistics(a),this._updatePixelType(a),this.rasterInfo=a,{success:!0,supportsGPU:1===a.bandCount&&i<=3&&(r<11||r>16)}}_processPixels(t){const{pixelBlocks:e}=t;return null==e||e.some((t=>null==t))?null:St(e,this.functionArguments.operation,{processAsMultiband:this.functionArguments.processAsMultiband,outputPixelType:this.outputPixelType??void 0})}_getWebGLParameters(){const{operation:t}=this.functionArguments,e=F[t],n=Object.keys(T).find((e=>T[e]===t))?.toLowerCase()??"undefined",s=this.outputPixelType??"f32";let[r,o]=(0,l.hP)(s);const i=(0,l.zw)(s);return i&&(r-=1e-4,o+=1e-4),{imageCount:e,operationName:n,domainRange:[r,o],isOutputRounded:i}}_updateStatistics(t){const e=this.sourceRasterInfos[0],{operation:n}=this.functionArguments,s=N(n)?.domain;if(s){t.statistics=[];for(let e=0;e<t.bandCount;e++)t.statistics[e]={min:s[0],max:s[1],avg:(s[0]+s[1])/2,stddev:(s[0]+s[1])/10}}else 45===n&&e.statistics?.length&&(t.statistics=e.statistics.map((t=>({min:-t.max,max:-t.min,avg:null!=t.avg?-t.avg:void 0,stddev:null!=t.stddev?-t.stddev:void 0}))))}_updatePixelType(t){const{statistics:e,pixelType:n}=this.sourceRasterInfos[0],{operation:s}=this.functionArguments,{domain:r,isInteger:o}=N(s)??{domain:null,isInteger:!1};let i="f32";if(r&&o)i=(0,l.X1)(r[0],r[1]);else if(30===s){const t=e?.[0];i=t?(0,l.X1)(t.min,t.max):(0,l.zw)(n)?n:"s32"}else if(45===s&&(0,l.zw)(n)){const t=e?.map((({max:t})=>-t)),s=e?.map((({min:t})=>-t)),r=t?.length?Math.min(...t):null,o=s?.length?Math.min(...s):null;i=null!=r&&null!=o?(0,l.X1)(r,o):n.startsWith("s")?n.replace("s","u"):"u1"===n||"u2"===n||"u4"===n?"s8":"u8"===n?"s16":"s32"}t.pixelType=this.outputPixelType=this._getOutputPixelType(i)}};(0,i._)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],hn.prototype,"functionName",void 0),(0,i._)([(0,a.MZ)({type:pn,json:{write:!0,name:"rasterFunctionArguments"}})],hn.prototype,"functionArguments",void 0),(0,i._)([(0,a.MZ)()],hn.prototype,"rasterArgumentNames",void 0),hn=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.LocalFunction")],hn);const fn=hn;var mn,dn=n(34727);let gn=mn=class extends h{constructor(){super(...arguments),this.includedRanges=null,this.noDataValues=null,this.noDataInterpretation=Xt.IB.matchAny}get normalizedNoDataValues(){const{noDataValues:t}=this;if(!t?.length)return null;let e=!1;const n=t.map((t=>{if("number"==typeof t)return e=!0,[t];if("string"==typeof t){const n=t.trim().split(" ").filter((t=>""!==t.trim())).map((t=>Number(t)));return e=e||n.length>0,0===n.length?null:n}return null}));return e?n:null}clone(){return new mn({includedRanges:this.includedRanges?.slice()??[],noDataValues:this.noDataValues?.slice()??[],noDataInterpretation:this.noDataInterpretation})}};(0,i._)([(0,a.MZ)({json:{write:!0}})],gn.prototype,"includedRanges",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],gn.prototype,"noDataValues",void 0),(0,i._)([(0,a.MZ)()],gn.prototype,"normalizedNoDataValues",null),(0,i._)([(0,a.MZ)({json:{write:!0}})],gn.prototype,"noDataInterpretation",void 0),gn=mn=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.MaskFunctionArguments")],gn);const yn=gn;let xn=class extends v{constructor(){super(...arguments),this.functionName="Mask",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const t=this.sourceRasterInfos[0].clone(),{pixelType:e}=t;this.outputPixelType=this._getOutputPixelType(e),t.pixelType=this.outputPixelType,this.rasterInfo=t;const{includedRanges:n,normalizedNoDataValues:s}=this.functionArguments;if(!n?.length&&!s?.length)return{success:!1,supportsGPU:!1,error:"missing includedRanges or noDataValues argument"};let r=[];for(let o=0;o<t.bandCount;o++){const t=(0,Xt.Wt)(e,n?.slice(2*o,2*o+2),s?.[o]);if(null==t){r=null;break}r.push(t)}this.lookups=r;const o=null!=s&&s.every((t=>t?.length===s[0]?.length));return{success:!0,supportsGPU:(!n||n.length<=2*Xt.et)&&(!s||o&&s[0].length<=Xt.et)}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{outputPixelType:n,lookups:s}=this,{includedRanges:r,noDataInterpretation:o,normalizedNoDataValues:i}=this.functionArguments,a=o===Xt.IB.matchAll;return(0,Xt.dK)(e,{includedRanges:r,noDataValues:i,outputPixelType:n,matchAll:a,lookups:s})}_getWebGLParameters(){const{includedRanges:t,normalizedNoDataValues:e}=this.functionArguments,n=new Float32Array(Xt.et);n.fill(dn.pq),e?.[0]?.length&&n.set(e[0]);const s=new Float32Array(Xt.et);for(let e=0;e<s.length;e+=2)s[e]=t?.[e]??-dn.pq,s[e+1]=t?.[e+1]??dn.pq;return t&&t.length&&s.set(t),{bandCount:this.sourceRasterInfos[0].bandCount,noDataValues:n,includedRanges:s}}};(0,i._)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],xn.prototype,"functionName",void 0),(0,i._)([(0,a.MZ)({type:yn,json:{write:!0,name:"rasterFunctionArguments"}})],xn.prototype,"functionArguments",void 0),(0,i._)([(0,a.MZ)()],xn.prototype,"rasterArgumentNames",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],xn.prototype,"lookups",void 0),xn=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.MaskFunction")],xn);const wn=xn;var An;let vn=An=class extends h{constructor(){super(...arguments),this.visibleBandID=0,this.infraredBandID=1,this.scientificOutput=!1}clone(){const{visibleBandID:t,infraredBandID:e,scientificOutput:n}=this;return new An({visibleBandID:t,infraredBandID:e,scientificOutput:n})}};(0,i._)([(0,a.MZ)({json:{write:!0}})],vn.prototype,"visibleBandID",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],vn.prototype,"infraredBandID",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],vn.prototype,"scientificOutput",void 0),vn=An=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.NDVIFunctionArguments")],vn);const bn=vn;let _n=class extends v{constructor(){super(...arguments),this.functionName="NDVI",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const{scientificOutput:t,visibleBandID:e,infraredBandID:n}=this.functionArguments;this.outputPixelType=this._getOutputPixelType(t?"f32":"u8");const s=this.sourceRasterInfos[0],r=Math.max(e,n);if(s.bandCount<2||r>=s.bandCount)return{success:!1,supportsGPU:!1,error:"ndvi-function: source raster has insufficient amount of raster bands"};const o=s.clone();o.pixelType=this.outputPixelType,o.colormap=null,o.histograms=null,o.bandCount=1,o.keyProperties={...o.keyProperties,BandProperties:void 0};const[i,a,u,l]=t?[-1,1,0,.1]:[0,200,100,10];return o.statistics=[{min:i,max:a,avg:u,stddev:l}],this.rasterInfo=o,{success:!0,supportsGPU:!0}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{visibleBandID:n,infraredBandID:s,scientificOutput:r}=this.functionArguments;return function(t,e,n,s){const{mask:r,pixels:o,width:i,height:a}=t,u=o[n],l=o[e],c=l.length,p=s?new Uint8Array(c):new Float32Array(c),h=s?100:1,f=s?100.5:0;for(let t=0;t<c;t++)if(null==r||r[t]){const e=u[t],n=l[t],s=e+n;s&&(p[t]=(e-n)/s*h+f)}const m=new y.A({width:i,height:a,mask:r,pixelType:s?"u8":"f32",pixels:[p]});return m.updateStatistics(),m}(e,n,s,!r)}_getWebGLParameters(){const{visibleBandID:t,infraredBandID:e,scientificOutput:n}=this.functionArguments;return{bandIndexMat3:Yt(this.isInputBandIdsSwizzled?[0,1,2]:[e,t,0]),scaled:!n}}_getInputBandIds(t){const{visibleBandID:e,infraredBandID:n}=this.functionArguments;return[n,e,0].map((e=>t[e]))}};(0,i._)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],_n.prototype,"functionName",void 0),(0,i._)([(0,a.MZ)({type:bn,json:{write:!0,name:"rasterFunctionArguments"}})],_n.prototype,"functionArguments",void 0),(0,i._)([(0,a.MZ)()],_n.prototype,"rasterArgumentNames",void 0),_n=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.NDVIFunction")],_n);const Mn=_n;var Pn;let Tn=Pn=class extends h{constructor(){super(...arguments),this.inputRanges=null,this.outputValues=null,this.noDataRanges=null,this.allowUnmatched=!1,this.isLastInputRangeInclusive=!1}clone(){return new Pn({inputRanges:[...this.inputRanges],outputValues:[...this.outputValues],noDataRanges:[...this.noDataRanges],allowUnmatched:this.allowUnmatched,isLastInputRangeInclusive:this.isLastInputRangeInclusive})}};(0,i._)([(0,a.MZ)({json:{write:!0}})],Tn.prototype,"inputRanges",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],Tn.prototype,"outputValues",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],Tn.prototype,"noDataRanges",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],Tn.prototype,"allowUnmatched",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],Tn.prototype,"isLastInputRangeInclusive",void 0),Tn=Pn=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.RemapFunctionArguments")],Tn);const Rn=Tn;let Nn=class extends v{constructor(){super(...arguments),this.functionName="Remap",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null}_bindSourceRasters(){const t=this.sourceRasterInfos[0].clone(),{pixelType:e}=t;this.outputPixelType=this._getOutputPixelType(e),t.pixelType=this.outputPixelType,t.colormap=null,t.histograms=null,t.bandCount=1,t.attributeTable=null;const{statistics:n}=t,{allowUnmatched:s,outputValues:r,inputRanges:o,noDataRanges:i,isLastInputRangeInclusive:a}=this.functionArguments;if(null!=n&&n.length&&r?.length)if(s){const e=Math.min.apply(null,[...r,n[0].min]),s=Math.max.apply(null,[...r,n[0].max]);t.statistics=[{...n[0],min:e,max:s}]}else{let e=r[0],s=e;for(let t=0;t<r.length;t++)e=e>r[t]?r[t]:e,s=s>r[t]?s:r[t];t.statistics=[{...n[0],min:e,max:s}]}return this.rasterInfo=t,this.lookup=s?null:(0,Xt.XU)({srcPixelType:e,inputRanges:o,outputValues:r,noDataRanges:i,allowUnmatched:s,isLastInputRangeInclusive:a,outputPixelType:this.outputPixelType}),{success:!0,supportsGPU:(!r||r.length<=Xt.et)&&(!i||i.length<=Xt.et)}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{lookup:n,outputPixelType:s}=this;if(n){const t=(0,Xt.eH)(e,{lut:[n.lut],offset:n.offset,outputPixelType:s});return null!=t&&n.mask&&(t.mask=(0,Xt.UK)(e.pixels[0],e.mask,n.mask,n.offset,"u8")),t}const{inputRanges:r,outputValues:o,noDataRanges:i,allowUnmatched:a,isLastInputRangeInclusive:u}=this.functionArguments;return(0,Xt.Ew)(e,{inputRanges:r,outputValues:o,noDataRanges:i,outputPixelType:s,allowUnmatched:a,isLastInputRangeInclusive:u})}_getWebGLParameters(){const{allowUnmatched:t,noDataRanges:e,isLastInputRangeInclusive:n}=this.functionArguments,s=new Float32Array(3*Xt.et),r=1e-5,o=this.functionArguments.inputRanges??[],i=this.functionArguments.outputValues??[],a=i.length;for(let t=0;t<Xt.et;t++)s[3*t]=o[2*t]??dn.pq-1,s[3*t+1]=o[2*t+1]??dn.pq,s[3*t+2]=i[t]??0,t<a&&(t>0&&(s[3*t]-=r),(t<a-1||!n)&&(s[3*t+1]-=r));const u=new Float32Array(2*Xt.et);return u.fill(dn.pq),e?.length&&u.set(e),{allowUnmatched:t,rangeMaps:s,noDataRanges:u,clampRange:(0,l.hP)(this.outputPixelType)}}};(0,i._)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Nn.prototype,"functionName",void 0),(0,i._)([(0,a.MZ)({type:Rn,json:{write:!0,name:"rasterFunctionArguments"}})],Nn.prototype,"functionArguments",void 0),(0,i._)([(0,a.MZ)()],Nn.prototype,"rasterArgumentNames",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],Nn.prototype,"lookup",void 0),Nn=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.RemapFunction")],Nn);const Fn=Nn;var In;const kn=new Ut.J({1:"degree",2:"percent-rise",3:"adjusted"},{useNumericKeys:!0});let Cn=In=class extends h{constructor(){super(...arguments),this.slopeType="degree",this.zFactor=1,this.pixelSizePower=.664,this.pixelSizeFactor=.024,this.removeEdgeEffect=!1}clone(){return new In({slopeType:this.slopeType,zFactor:this.zFactor,pixelSizePower:this.pixelSizePower,pixelSizeFactor:this.pixelSizeFactor,removeEdgeEffect:this.removeEdgeEffect,raster:this.raster})}};(0,i._)([(0,Lt.e)(kn)],Cn.prototype,"slopeType",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{write:!0}})],Cn.prototype,"zFactor",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{name:"psPower",write:!0}})],Cn.prototype,"pixelSizePower",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{name:"psZFactor",write:!0}})],Cn.prototype,"pixelSizeFactor",void 0),(0,i._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],Cn.prototype,"removeEdgeEffect",void 0),Cn=In=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.SlopeFunctionArguments")],Cn);const Sn=Cn;let jn=class extends v{constructor(){super(...arguments),this.functionName="Slope",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){this.outputPixelType=this._getOutputPixelType("f32");const t=this.sourceRasterInfos[0].clone();return t.pixelType=this.outputPixelType,t.statistics="percent-rise"!==this.functionArguments.slopeType?[{min:0,max:90,avg:1,stddev:1}]:null,t.histograms=null,t.colormap=null,t.attributeTable=null,t.bandCount=1,this.rasterInfo=t,this.isGCS=t.spatialReference?.isGeographic??!1,{success:!0,supportsGPU:!0}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return null;const{zFactor:n,slopeType:s,pixelSizePower:r,pixelSizeFactor:o}=this.functionArguments,{isGCS:i}=this,{extent:a,primaryPixelSizes:u}=t,l=u?.[0],c=l??(a?{x:a.width/e.width,y:a.height/e.height}:{x:1,y:1});return(0,Et.yy)(e,{zFactor:n,slopeType:s,pixelSizePower:r,pixelSizeFactor:o,isGCS:i,resolution:c})}_getWebGLParameters(){const{zFactor:t,slopeType:e,pixelSizeFactor:n,pixelSizePower:s}=this.functionArguments;return{zFactor:this.isGCS&&t>=1?t*Et.rk:t,slopeType:e,pixelSizeFactor:n??0,pixelSizePower:s??0}}};(0,i._)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],jn.prototype,"functionName",void 0),(0,i._)([(0,a.MZ)({type:Sn,json:{write:!0,name:"rasterFunctionArguments"}})],jn.prototype,"functionArguments",void 0),(0,i._)([(0,a.MZ)()],jn.prototype,"rasterArgumentNames",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],jn.prototype,"isGCS",void 0),jn=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.SlopeFunction")],jn);const Bn=jn,Zn=new Ut.J({1:"min",2:"max",3:"mean",4:"stddev",5:"median",6:"majority",7:"minority"},{useNumericKeys:!0});function Gn(t,e){const{fillNoDataOnly:n}=e,{band:s,width:r,height:o,mask:i,outBand:a}=t;if(n&&!i)return void a.set(s);const{statisticsType:u,kernelRows:l,kernelCols:c}=e,p="stddev"===u,h=r*o,f=new Float64Array(h),m=new Float64Array(h),d=new Uint32Array(h);for(let t=0;t<o;t++){const e=t*r;let n=0,o=0,a=0;for(let t=0;t<c;t++)i&&!i[e+t]||(n+=s[e+t],p&&(o+=s[e+t]**2),a++);f[e]=n,m[e]=o,d[e]=a;for(let t=1;t<=r-c;t++){const r=e+t-1,u=r+c;i?(i[r]&&(a--,n-=s[r],p&&(o-=s[r]**2)),i[u]&&(a++,n+=s[u],p&&(o+=s[u]**2))):(n-=s[r],n+=s[u],p&&(o-=s[r]**2,o+=s[u]**2)),f[e+t]=n,d[e+t]=a,p&&(m[e+t]=o)}}const g=new Float64Array(h),y=new Float64Array(h),x=new Uint32Array(h),w=l*r;for(let t=0;t<=r-c;t++){let e=0,n=0,s=0;for(let o=0;o<l;o++){const i=o*r+t;e+=f[i],s+=d[i],p&&(n+=m[i])}g[t]=e,y[t]=n,x[t]=s;for(let i=1;i<=o-l;i++){const o=(i-1)*r+t,a=o+w;e-=f[o],e+=f[a],s-=d[o],s+=d[a],p&&(n-=m[o],n+=m[a]),g[i*r+t]=e,y[i*r+t]=n,x[i*r+t]=s}}const A=Math.floor(l/2),v=Math.floor(c/2);for(let t=A;t<o-A;t++){const e=t*r;for(let s=v;s<r-v;s++){const o=(t-A)*r+s-v,u=x[o];if(0===u||n&&(!i||i[e+s]))continue;const l=g[o]/u,c=p?Math.sqrt((y[o]-g[o]*l)/u):l;a[e+s]=c,i&&(i[e+s]=255)}}}function On(t,e){const{fillNoDataOnly:n}=e,{band:s,width:r,height:o,mask:i,outBand:a}=t;if(n&&!i)return void a.set(s);const{kernelRows:u,kernelCols:l,statisticsType:c}=e,p=Math.floor(u/2),h=Math.floor(l/2),f="min"===c,m=a.slice(),d=new Uint32Array(r*o);for(let t=p;t<o-p;t++){const e=t*r;for(let t=h;t<r-h;t++){let n=f?Number.MAX_VALUE:-Number.MAX_VALUE,o=0;for(let a=0;a<u;a++)for(let u=0;u<l;u++){const l=e+t+(a-p)*r+u-h;i&&!i[l]||(n=f?Math.min(n,s[l]):Math.max(n,s[l]),o++)}i?(m[e+t]=0===o?0:n,d[e+t]=o):a[e+t]=0===o?0:n}}if(i)for(let t=p;t<o-p;t++){const e=t*r;for(let t=h;t<r-h;t++)if(d[e+t]){if(n&&i[e+t])continue;a[e+t]=m[e+t],i[e+t]=255}}}function En(t,e){const{fillNoDataOnly:n}=e,{band:s,width:r,height:o,mask:i,outBand:a}=t;if(n&&!i)return void a.set(s);const{kernelRows:u,kernelCols:l}=e,c=Math.floor(u/2),p=Math.floor(l/2),h=a.slice(),f=new Uint32Array(r*o);for(let t=c;t<o-c;t++){const e=t*r;for(let t=p;t<r-p;t++){if(n&&i&&i[e+t])continue;const o=[];for(let n=0;n<u;n++)for(let a=0;a<l;a++){const u=e+t+(n-c)*r+a-p;i&&!i[u]||o.push(s[u])}o.length&&(o.sort(((t,e)=>t-e)),i?(h[e+t]=o[Math.floor((o.length-1)/2)],f[e+t]=o.length):a[e+t]=o[Math.floor((o.length-1)/2)])}}if(i)for(let t=c;t<o-c;t++){const e=t*r;for(let t=p;t<r-p;t++)if(f[e+t]){if(n&&i[e+t])continue;a[e+t]=h[e+t],i[e+t]=255}}}function Dn(t,e){const{fillNoDataOnly:n}=e,{band:s,width:r,height:o,mask:i,outBand:a}=t;if(n&&!i)return void a.set(s);const{kernelRows:u,kernelCols:l}=e,c=Math.floor(u/2),p=Math.floor(l/2),h="majority"===e.statisticsType,f=u*l,m=a.slice(),d=new Uint32Array(r*o);for(let t=c;t<o-c;t++){const e=t*r;for(let t=p;t<r-p;t++){if(n&&i&&i[e+t])continue;const o=new Map;for(let n=0;n<u;n++)for(let a=0;a<l;a++){const u=e+t+(n-c)*r+a-p;if(i&&!i[u])continue;const l=s[u];o.set(l,o.has(l)?o.get(l)+1:1)}if(0===o.size)continue;let g=0,y=0,x=h?0:f+1;for(const t of o.keys())y=o.get(t),h===y>x&&(x=y,g=t);i?(m[e+t]=g,d[e+t]=o.size):a[e+t]=g}}if(i)for(let t=c;t<o-c;t++){const e=t*r;for(let t=p;t<r-p;t++)if(d[e+t]){if(n&&i[e+t])continue;a[e+t]=m[e+t],i[e+t]=255}}}var zn;let Ln=zn=class extends h{constructor(){super(...arguments),this.rows=3,this.cols=3,this.fillNoDataOnly=!1,this.statisticsType="min"}clone(){return new zn({rows:this.rows,cols:this.cols,fillNoDataOnly:this.fillNoDataOnly,statisticsType:this.statisticsType,raster:(0,o.o8)(this.raster)})}};(0,i._)([(0,a.MZ)({json:{write:!0,read:{source:["kernelRows","rows"],reader:(t,e)=>Number(t??e?.kernelRows??3)}}})],Ln.prototype,"rows",void 0),(0,i._)([(0,a.MZ)({json:{write:!0,read:{source:["kernelCols","cols"],reader:(t,e)=>Number(t??e?.kernelCols??3)}}})],Ln.prototype,"cols",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],Ln.prototype,"fillNoDataOnly",void 0),(0,i._)([(0,a.MZ)({json:{read:{source:["statisticsType","type"],reader:(t,e)=>Zn.fromJSON(e?.statisticsType??e?.type)??"min"},write:{target:"type"}}}),(0,Lt.e)(Zn)],Ln.prototype,"statisticsType",void 0),Ln=zn=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.StatisticsFunctionArguments")],Ln);const Un=Ln;let Vn=class extends v{constructor(){super(...arguments),this.functionName="Statistics",this.rasterArgumentNames=["raster"]}_bindSourceRasters(){const{type:t}=this.functionArguments.toJSON();if(t<1||t>7)return{success:!1,supportsGPU:!1,error:`statistics-function: the given statistics type is not supported ${t}`};const e=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType(e.pixelType);const n=e.clone();n.pixelType=this.outputPixelType;const{statisticsType:s}=this.functionArguments;return"stddev"===s&&this._removeStatsHistColormapVAT(n),this.rasterInfo=n,{success:!0,supportsGPU:n.bandCount<=3&&t<5}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return e;const{statisticsType:n,rows:s,cols:r,fillNoDataOnly:o}=this.functionArguments;return function(t,e){const{mask:n}=t,{fillNoDataOnly:s}=e;if(s&&!n)return t;const{pixels:r,width:o,height:i,bandMasks:a,pixelType:u}=t,l=r.length,c=o*i,p=[],{kernelRows:h,kernelCols:f,statisticsType:m,mirrorEdges:d}=e;if(s&&!n)return t;const g=e.outputPixelType??u,x=[];for(let t=0;t<l;t++){const u=r[t],l=y.A.createEmptyBand(g,c);s&&l.set(u);const w=a?.[t]??n,A=w?.slice()??null,v={band:u,width:o,height:i,mask:A,outBand:l};switch(m){case"min":case"max":On(v,e);break;case"mean":case"stddev":Gn(v,e);break;case"median":En(v,e);break;case"majority":case"minority":Dn(v,e)}d&&!s&&Ge(l,o,i,h,f),p.push(l),A&&x.push(A)}let w=x[0]??n;x.length!==l&&(x.length=0),l>1&&a?.length&&(w=y.A.combineBandMasks(a));const A=new y.A({pixelType:g,width:o,height:i,pixels:p,bandMasks:a&&x.length?x:null,mask:w});return A.updateStatistics(),A}(e,{kernelRows:s,kernelCols:r,fillNoDataOnly:o,outputPixelType:this.outputPixelType,statisticsType:n,mirrorEdges:!0})}_getWebGLParameters(){const{rows:t,cols:e,statisticsType:n,fillNoDataOnly:s}=this.functionArguments;return{fillNoDataOnly:s,kernelRows:t,kernelCols:e,statisticsType:n,clampRange:(0,l.hP)(this.outputPixelType)}}};(0,i._)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Vn.prototype,"functionName",void 0),(0,i._)([(0,a.MZ)({type:Un,json:{write:!0,name:"rasterFunctionArguments"}})],Vn.prototype,"functionArguments",void 0),(0,i._)([(0,a.MZ)()],Vn.prototype,"rasterArgumentNames",void 0),Vn=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.StatisticsFunction")],Vn);const Wn=Vn;var $n;let qn=$n=class extends h{constructor(){super(...arguments),this.statistics=null,this.histograms=null}readStatistics(t,e){if(!t?.length)return null;const n=[];return t.forEach((t=>{const e={min:t.min,max:t.max,avg:t.avg??t.mean,stddev:t.stddev??t.standardDeviation};n.push(e)})),n}writeStatistics(t,e,n){if(!t?.length)return;const s=[];t.forEach((t=>{const e={...t,mean:t.avg,standardDeviation:t.stddev};delete e.avg,delete e.stddev,s.push(e)})),e[n]=s}clone(){return new $n({statistics:(0,o.o8)(this.statistics),histograms:(0,o.o8)(this.histograms)})}};(0,i._)([(0,a.MZ)({json:{write:!0}})],qn.prototype,"statistics",void 0),(0,i._)([(0,de.w)("statistics")],qn.prototype,"readStatistics",null),(0,i._)([(0,Te.K)("statistics")],qn.prototype,"writeStatistics",null),(0,i._)([(0,a.MZ)({json:{write:!0}})],qn.prototype,"histograms",void 0),qn=$n=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.StatisticsHistogramFunctionArguments")],qn);const Hn=qn;let Xn=class extends v{constructor(){super(...arguments),this.functionName="StatisticsHistogram",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){const t=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType("u8");const e=t.clone(),{statistics:n,histograms:s}=this.functionArguments;return s&&(e.histograms=s),n&&(e.statistics=n),this.rasterInfo=e,{success:!0,supportsGPU:!0}}_processPixels(t){return t.pixelBlocks?.[0]}};(0,i._)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Xn.prototype,"functionName",void 0),(0,i._)([(0,a.MZ)({type:Hn,json:{write:!0,name:"rasterFunctionArguments"}})],Xn.prototype,"functionArguments",void 0),(0,i._)([(0,a.MZ)()],Xn.prototype,"rasterArgumentNames",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],Xn.prototype,"indexedColormap",void 0),(0,i._)([(0,a.MZ)()],Xn.prototype,"isNoopProcess",void 0),Xn=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.StatisticsHistogramFunction")],Xn);const Jn=Xn;var Kn;const Yn=new Ut.J({0:"none",3:"standard-deviation",4:"histogram-equalization",5:"min-max",6:"percent-clip",9:"sigmoid"},{useNumericKeys:!0});let Qn=Kn=class extends h{constructor(){super(...arguments),this.computeGamma=!1,this.dynamicRangeAdjustment=!1,this.gamma=[],this.histograms=null,this.statistics=null,this.stretchType="none",this.useGamma=!1}writeStatistics(t,e,n){t?.length&&(Array.isArray(t[0])||(t=t.map((t=>[t.min,t.max,t.avg,t.stddev]))),e[n]=t)}clone(){return new Kn({stretchType:this.stretchType,outputMin:this.outputMin,outputMax:this.outputMax,useGamma:this.useGamma,computeGamma:this.computeGamma,statistics:(0,o.o8)(this.statistics),gamma:(0,o.o8)(this.gamma),sigmoidStrengthLevel:this.sigmoidStrengthLevel,numberOfStandardDeviations:this.numberOfStandardDeviations,minPercent:this.minPercent,maxPercent:this.maxPercent,histograms:(0,o.o8)(this.histograms),dynamicRangeAdjustment:this.dynamicRangeAdjustment,raster:this.raster})}};(0,i._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],Qn.prototype,"computeGamma",void 0),(0,i._)([(0,a.MZ)({type:Boolean,json:{name:"dra",write:!0}})],Qn.prototype,"dynamicRangeAdjustment",void 0),(0,i._)([(0,a.MZ)({type:[Number],json:{write:!0}})],Qn.prototype,"gamma",void 0),(0,i._)([(0,a.MZ)()],Qn.prototype,"histograms",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{write:!0}})],Qn.prototype,"maxPercent",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{write:!0}})],Qn.prototype,"minPercent",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{write:!0}})],Qn.prototype,"numberOfStandardDeviations",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{name:"max",write:!0}})],Qn.prototype,"outputMax",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{name:"min",write:!0}})],Qn.prototype,"outputMin",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{write:!0}})],Qn.prototype,"sigmoidStrengthLevel",void 0),(0,i._)([(0,a.MZ)({json:{type:[[Number]],write:!0}})],Qn.prototype,"statistics",void 0),(0,i._)([(0,Te.K)("statistics")],Qn.prototype,"writeStatistics",null),(0,i._)([(0,Lt.e)(Yn)],Qn.prototype,"stretchType",void 0),(0,i._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],Qn.prototype,"useGamma",void 0),Qn=Kn=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.StretchFunctionArguments")],Qn);const ts=Qn;let es=class extends v{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;const t=this.sourceRasterInfos[0],{pixelType:e}=t,{functionArguments:n}=this,{dynamicRangeAdjustment:s,gamma:r,useGamma:o}=n;if(!s&&["u8","u16","s8","s16"].includes(e)){const s=(0,je.DP)(n.toJSON(),{rasterInfo:t}),i=(0,l.zw)(this.outputPixelType)?"round":"float";this.lookup=(0,je.RP)({pixelType:e,...s,gamma:o?r:null,rounding:i}),this.cutOffs=s}else s||(this.cutOffs=(0,je.DP)(n.toJSON(),{rasterInfo:t}));this.outputPixelType=this._getOutputPixelType(e);const i=t.clone();return i.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(i),"u8"===this.outputPixelType&&(i.keyProperties.DataType="processed"),this.rasterInfo=i,{success:!0,supportsGPU:!s}}_processPixels(t){const e=t.pixelBlocks?.[0];if(null==e)return e;const{lookup:n}=this;if(n)return(0,Xt.eH)(e,{...n,outputPixelType:this.rasterInfo.pixelType});const{functionArguments:s}=this,r=this.cutOffs||(0,je.DP)(s.toJSON(),{rasterInfo:this.sourceRasterInfos[0],pixelBlock:e}),o=s.useGamma?s.gamma:null;return(0,je._N)(e,{...r,gamma:o,outputPixelType:this.outputPixelType})}_getWebGLParameters(){const{outputMin:t=0,outputMax:e=255,gamma:n,useGamma:s}=this.functionArguments,r=this.rasterInfo.bandCount>=2?3:1,o=s&&n?.length?(0,je.Nh)(r,n):[1,1,1],{minCutOff:i,maxCutOff:a}=this.cutOffs??{minCutOff:[0,0,0],maxCutOff:[255,255,255]};1===i.length&&(i[1]=i[2]=i[0],a[1]=a[2]=a[0]);const u=new Float32Array(r);let c;for(c=0;c<r;c++)u[c]=(e-t)/(a[c]-i[c]);const p=(0,l.zw)(this.outputPixelType);return{bandCount:r,outMin:t,outMax:e,minCutOff:i,maxCutOff:a,factor:u,useGamma:s,gamma:s&&n?n:[1,1,1],gammaCorrection:s&&o?o:[1,1,1],stretchType:this.functionArguments.stretchType,isOutputRounded:p,type:"stretch"}}};(0,i._)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],es.prototype,"functionName",void 0),(0,i._)([(0,a.MZ)({type:ts,json:{write:!0,name:"rasterFunctionArguments"}})],es.prototype,"functionArguments",void 0),(0,i._)([(0,a.MZ)()],es.prototype,"rasterArgumentNames",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],es.prototype,"lookup",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],es.prototype,"cutOffs",void 0),es=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.StretchFunction")],es);const ns=es;var ss;let rs=ss=class extends h{constructor(){super(...arguments),this.attributeTableAsRecordSet=null}clone(){return new ss({attributeTableAsRecordSet:(0,o.o8)(this.attributeTableAsRecordSet)})}};(0,i._)([(0,a.MZ)({json:{write:!0}})],rs.prototype,"attributeTableAsRecordSet",void 0),rs=ss=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.TableFunctionArguments")],rs);const os=rs;let is=class extends v{constructor(){super(...arguments),this.functionName="Table",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){const t=this.sourceRasterInfos[0];if(t.bandCount>1||t.pixelType.startsWith("f"))return{success:!1,supportsGPU:!1,error:"table-function: Source data must be single band and integer pixel type."};const{attributeTableAsRecordSet:e}=this.functionArguments;if(!e)return{success:!1,supportsGPU:!1,error:"table-function: Missing attributeTableAsRecordSet argument."};this.outputPixelType=this._getOutputPixelType(t.pixelType);const n=t.clone();return n.pixelType=this.outputPixelType,n.bandCount=1,"thematic"!==n.dataType&&(n.keyProperties=n.keyProperties?{...n.keyProperties,DataType:"thematic"}:{DataType:"thematic"}),this.rasterInfo=n,{success:!0,supportsGPU:!0}}_processPixels(t){return t.pixelBlocks?.[0]}};(0,i._)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],is.prototype,"functionName",void 0),(0,i._)([(0,a.MZ)({type:os,json:{write:!0,name:"rasterFunctionArguments"}})],is.prototype,"functionArguments",void 0),(0,i._)([(0,a.MZ)()],is.prototype,"rasterArgumentNames",void 0),(0,i._)([(0,a.MZ)()],is.prototype,"isNoopProcess",void 0),is=(0,i._)([(0,u.$)("esri.layers.support.rasterFunctions.TableFunction")],is);const as=is,us=new Map;function ls(t,e){const{rasterFunctionArguments:n}=t;n&&(n.rasters||[n.raster]).forEach((t=>{t&&"number"!=typeof t&&("string"==typeof t?t.startsWith("http")&&(e.includes(t)||e.push(t)):"rasterFunctionArguments"in t&&ls(t,e))}))}function cs(t,e){if(e=e??{},"function"in(t=(0,o.o8)(t))&&"arguments"in t&&t.arguments){const n=ys(t,new Map,e);if(ws(n),!n.renderingRule)throw new r.A("raster-function-helper","Unsupported raster function json.");t=n.renderingRule}if("rasterFunction"in t)return fs(t=hs(t),e);throw new r.A("raster-function-helper","unsupported raster function json.")}function ps(t){return!!(t&&"object"==typeof t&&t.rasterFunction&&t.rasterFunctionArguments)}function hs(t){const{rasterFunction:e,rasterFunctionArguments:n}=t,s={};for(const t in n){let e=n[t];const r=t.toLowerCase();if("rasters"===r&&Array.isArray(e))s.rasters=e.map((t=>ps(t)?hs(t):t));else switch(ps(e)&&(e=hs(e)),r){case"dra":s.dra=e;break;case"pspower":s.psPower=e;break;case"pszfactor":s.psZFactor=e;break;case"bandids":s.bandIds=e;break;default:s[t[0].toLowerCase()+t.slice(1)]=e}}return"Local"!==e||s.rasters?.length||(s.rasters=["$$"]),{...t,rasterFunctionArguments:s}}function fs(t,e){const{rasterFunction:n,rasterFunctionArguments:s}=t,o=t.outputPixelType?.toLowerCase();if(null==n||!us.has(n))throw new r.A("raster-function-helper",`unsupported raster function: ${n}`);const i=us.get(n),a=("function"==typeof i.ctor?i.ctor:i.ctor.default).fromJSON({...t,outputPixelType:o}),{rasterArgumentNames:u}=a,l=[],c=function(t,e){return"rasters"===e[0]&&Array.isArray(t.rasters)?t.rasters:e.map((e=>t[e]))}(s,u),p="rasters"===u[0],h=[];for(let t=0;t<c.length;t++){const n=c[t];let s;null==n||"string"==typeof n&&n.startsWith("$")?l.push(e?.raster):"string"==typeof n?e[n]&&l.push(e[n]):"number"!=typeof n&&"rasterFunction"in n&&(s=fs(n,e),p||(a.functionArguments[u[t]]=s),l.push(s)),p&&h.push(s??n)}if(p&&(a.functionArguments.rasters=h),e){a.sourceRasters=l;const t=e.raster?.url;t&&(a.mainPrimaryRasterId=t)}return a}function ms(t,e){if(t&&e)for(const n in t){const s=t[n];s&&"object"==typeof s&&"type"in s&&("RasterFunctionTemplate"===s.type?ms(s.arguments,e):"RasterFunctionVariable"===s.type&&null!=e[s.name]&&(s.value=e[s.name]))}}function ds(t,e){if(!t||"object"!=typeof t)return t;const{value:n}=t;if(!n||"object"!=typeof n)return t.isDataset?"$$":n;if(Array.isArray(n))return 0===n.length?[]:n.map((t=>"object"==typeof t&&"RasterFunctionVariable"===t.type?ds(t,e):t));if("value"in n&&["number","string","boolean"].includes(typeof n.value))return n.value;if(t.isDataset&&"Scalar"!==n.type)return"$$";if(!("type"in n))return n;let s=n;switch(n.type){case"Scalar":s=n.value;break;case"AlgorithmicColorRamp":s=gs(n);break;case"MultiPartColorRamp":s={type:"multipart",colorRamps:n.ArrayOfColorRamp.map(gs)};break;case"ArgumentArray":if(n.elements?.length&&"RasterStatistics"!==n.elements[0].type){const t=[];for(let s=0;s<n.elements.length;s++){const o=n.elements[s],{type:i}=o;if(i)if("RasterFunctionTemplate"===i){const{renderingRule:n}=ys(o,e);t.push(n),null!=o._object_id&&e.set(o._object_id,n)}else{if("RasterFunctionVariable"!==i)throw new r.A("raster-function-helper","unsupported raster function json.");{const n=ds(o,e);t.push(n),null!=o._object_id&&e.set(o._object_id,n)}}else t.push(o)}s=t}else s=n.elements}return null!=n._object_id&&e.set(n._object_id,s),s}function gs(t){const e=t.algorithm??"esriHSVAlgorithm";let{FromColor:n,ToColor:r}=t;if(!Array.isArray(n)){const{r:t,g:e,b:r}=(0,s.$)({h:n.Hue,s:n.Saturation,v:n.Value});n=[t,e,r,n.AlphaValue]}if(!Array.isArray(r)){const{r:t,g:e,b:n}=(0,s.$)({h:r.Hue,s:r.Saturation,v:r.Value});r=[t,e,n,r.AlphaValue]}return{type:"algorithmic",algorithm:e,fromColor:n,toColor:r}}function ys(t,e,n){n&&ms(t,n);const s={renderingRule:{},templates:e};return xs(t,s),s}function xs(t,e){if(!t||!e.renderingRule)return;const{renderingRule:n,templates:s}=e,{function:r,arguments:o,_object_id:i}=t;if(!r||!o)return;null!=i&&s.set(i,n),n.rasterFunction=r.type.replace("Function",""),n.outputPixelType=r.pixelType;const a={};n.rasterFunctionArguments=a;for(const t in o){if("type"===t||"object_id"===t||"_object_ref_id"===t)continue;const e=o[t];e&&"object"==typeof e&&"type"in e&&("RasterFunctionTemplate"===e.type||"RasterFunctionVariable"===e.type)?("RasterFunctionVariable"===e.type?a[t]=ds(e,s):(n.rasterFunctionArguments[t]={},xs(e,{renderingRule:n.rasterFunctionArguments[t],templates:s})),null!=e._object_id&&s.set(e._object_id,a[t])):a[t]=e}switch(a.DEM&&!a.Raster&&(a.Raster=a.DEM,delete a.DEM),n.rasterFunction){case"Stretch":!function(t){t.Statistics?.length&&"object"==typeof t.Statistics&&(t.Statistics=t.Statistics.map((t=>[t.min,t.max,t.mean,t.standardDeviation]))),null!=t.NumberOfStandardDeviation&&(t.NumberOfStandardDeviations=t.NumberOfStandardDeviation,delete t.NumberOfStandardDeviation)}(a);break;case"Colormap":!function(t){"randomcolorramp"===t.ColorRamp?.type?.toLowerCase()&&(delete t.ColorRamp,t.ColormapName="Random"),0===t.ColorSchemeType&&delete t.ColorRamp}(a);break;case"Convolution":!function(t){null!=t.ConvolutionType&&(t.Type=t.ConvolutionType,delete t.ConvolutionType)}(a);break;case"Mask":!function(t){t.NoDataValues?.length&&"string"==typeof t.NoDataValues[0]&&(t.NoDataValues=t.NoDataValues.filter((t=>""!==t)).map((t=>Number(t))))}(a)}}function ws(t){const{renderingRule:e,templates:n}=t;if("object"!=typeof e||!e?.rasterFunctionArguments||!n.size)return;const{rasterFunctionArguments:s}=e;for(const t in s){const e=s[t],o="_object_ref_id"===t?e:e&&"object"==typeof e&&"_object_ref_id"in e?e._object_ref_id:null;if(null==o)e&&"object"==typeof e&&(e.rasterFunctionArguments&&ws({renderingRule:e,templates:n}),Array.isArray(e)&&e.forEach(((t,s)=>{if("object"==typeof t)if(null!=t._object_ref_id){if(!n.has(t._object_ref_id))throw new r.A("raster-function-helper",`unsupported raster function json. _object_ref_id: ${e} does not exist`);const i=n.get(o);i&&"object"==typeof i?Object.assign(t,i):e[s]=i}else ws({renderingRule:t,templates:n})})));else{if(!n.has(o))throw new r.A("raster-function-helper",`unsupported raster function json. _object_ref_id: ${o} does not exist`);const e=n.get(o);"_object_ref_id"!==t?s[t]=e:e&&"object"==typeof e&&Object.assign(s,e)}}}us.set("Arithmetic",{desc:"Arithmetic Function",ctor:Bt,rasterArgumentNames:["rasters"]}),us.set("Aspect",{desc:"Aspect Function",ctor:zt,rasterArgumentNames:["raster"]}),us.set("BandArithmetic",{desc:"Band Arithmetic Function",ctor:oe,rasterArgumentNames:["raster"]}),us.set("Colormap",{desc:"Colormap Function",ctor:Me,rasterArgumentNames:["raster"]}),us.set("CompositeBand",{desc:"CompositeBand Function",ctor:Ie,rasterArgumentNames:["rasters"]}),us.set("Convolution",{desc:"Convolution Function",ctor:We,rasterArgumentNames:["raster"]}),us.set("ContrastBrightness",{desc:"Contrast Brightness Function",ctor:Ze,rasterArgumentNames:["raster"]}),us.set("ExtractBand",{desc:"ExtractBand Function",ctor:nn,rasterArgumentNames:["raster"]}),us.set("Curvature",{desc:"Curvature Function",ctor:Ke,rasterArgumentNames:["raster"]}),us.set("Grayscale",{desc:"Grayscale Function",ctor:un,rasterArgumentNames:["raster"]}),us.set("Clip",{desc:"Clip Function",ctor:fe,rasterArgumentNames:["raster"]}),us.set("Local",{desc:"Local Function",ctor:fn,rasterArgumentNames:["rasters"]}),us.set("Mask",{desc:"Mask Function",ctor:wn,rasterArgumentNames:["raster"]}),us.set("NDVI",{desc:"NDVI Function",ctor:Mn,rasterArgumentNames:["raster"]}),us.set("Remap",{desc:"Remap Function",ctor:Fn,rasterArgumentNames:["raster"]}),us.set("Slope",{desc:"Slope Function",ctor:Bn,rasterArgumentNames:["raster"]}),us.set("Statistics",{desc:"Focal Statistics Function",ctor:Wn,rasterArgumentNames:["raster"]}),us.set("StatisticsHistogram",{desc:"Statistics Histogram Function",ctor:Jn,rasterArgumentNames:["raster"]}),us.set("Stretch",{desc:"Stretch Function",ctor:ns,rasterArgumentNames:["raster"]}),us.set("Table",{desc:"Attribute Table Function",ctor:as,rasterArgumentNames:["raster"]})},70834:(t,e,n)=>{n.d(e,{DO:()=>L,FT:()=>O,Hh:()=>P,OM:()=>z,Ps:()=>$,Wo:()=>T,_I:()=>N,_l:()=>B,l0:()=>U,t$:()=>q,uk:()=>Z,xh:()=>d}),n(59456);var s,r,o=n(4576),i=n(49186),a=n(83047),u=n(83290),l=n(57251),c=n(21325),p=n(5443),h=n(86738),f=n(39829),m=n(16930);function d(t,e,n){return!(0,l.canProjectWithoutEngine)(t,e,n)}function g(t,e,n){const s=d(t,e,n);if(s&&!(0,l.isLoaded)())throw new i.A("rasterprojectionhelper-project","projection engine is not loaded");return s}(r=s||(s={}))[r.None=0]="None",r[r.North=1]="North",r[r.South=2]="South",r[r.Both=3]="Both";const y=(t,e,n,s=0)=>{if(1===n[0])return[0,0];let r=1,o=-1,i=1,a=-1;for(let e=0;e<t.length;e+=2)isNaN(t[e])||(r=r>t[e]?t[e]:r,o=o>t[e]?o:t[e],i=i>t[e+1]?t[e+1]:i,a=a>t[e+1]?a:t[e+1]);const{cols:u,rows:l}=e,c=(o-r)/u/n[0],p=(a-i)/l/n[1],h=2*s;let f=0,m=!1,d=[0,0];for(let e=0;e<u-3;e++){for(let n=0;n<l-3;n++){const s=e*l*2+2*n,r=(t[s]+t[s+4]+t[s+4*l]+t[s+4*l+4])/4,o=(t[s+1]+t[s+5]+t[s+4*l+1]+t[s+4*l+5])/4,i=Math.abs((r-t[s+2*l+2])/c),a=Math.abs((o-t[s+2*l+3])/p);if(i+a>f&&(f=i+a,d=[i,a]),h&&f>h){m=!0;break}}if(m)break}return d},x={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},w=32,A=4,v=A,b=new Map,_=new Map,M=500;async function P(){(0,l.isLoaded)()||await(0,l.load)()}function T(t,e,n,s=null){const r=t.spatialReference;if(r.equals(e))return t;g(r,e,s);const o=n.center,i=new p.A({xmin:o.x-t.x/2,xmax:o.x+t.x/2,ymin:o.y-t.y/2,ymax:o.y+t.y/2,spatialReference:r}),u=(0,l.project)(i,e,s),c=O(e);let h;if(null==u||null!=c&&u.width>=c){const n=(0,a.GA)(r)/(0,a.GA)(e);h={x:t.x*n,y:t.y*n}}else h={x:u.width,y:u.height};return h}function R(t,e=.01){return(0,a.GA)(t)?e/(0,a.GA)(t):0}function N(t,e,n=null,s=!0){const r=t.spatialReference;if(r.equals(e))return t;g(r,e,n);const o=(0,l.project)(t,e,n);return s&&o?(F([t],[o],r,e),o):o}function F(t,e,n,s){const r=E(n,!0),o=E(s,!0),i=R(n,M),a=R(s,M);if(i&&null!=r&&null!=o)for(let n=0;n<t.length;n++){const s=e[n];if(!s)continue;const{x:u}=t[n],{x:l}=s;l>=o[1]-a&&Math.abs(u-r[0])<i?s.x-=o[1]-o[0]:l<=o[0]+a&&Math.abs(u-r[1])<i&&(s.x+=o[1]-o[0])}}function I(t){const{inSR:e,outSR:n,datumTransformation:s,preferPE:r}=t;if(e.equals(n)){const{points:e}=j(t,null);return e}if(e.isWebMercator&&n.isWGS84||e.isWGS84&&n.isWebMercator)return function(t){const{cols:e,rows:n,xres:s,yres:r,usePixelCenter:o,inSR:i,outSR:a}=t;let{xmin:u,ymax:c}=t;o&&(u+=s/2,c-=r/2);const p=[],f=[],m=Math.max(e,n);for(let t=0;t<m;t++){const o=u+s*Math.min(e,t),m=c-r*Math.min(n,t),d=(0,l.project)(new h.A({x:o,y:m,spatialReference:i}),a);t<=e&&p.push(d.x),t<=n&&f.push(d.y)}const d=[];for(let t=0;t<e;t++)for(let e=0;e<n;e++)d.push([p[t],f[e]]);return d}(t);if(g(e,n,s)&&r){if(e.isGeographic)return k(t);if(null!=C(e))return k(t)}return function(t){const{points:e}=j(t,null),{inSR:n,outSR:s,datumTransformation:r}=t,o=e.map((t=>new h.A(t[0],t[1],n))),i=(0,l.project)(o,s,r);return r&&F(o,i,n,s),i.map((t=>t?[t.x,t.y]:[NaN,NaN]))}(t)}function k(t){const{inSR:e,outSR:n,datumTransformation:s}=t,r=C(e),{points:o,mask:i}=j(t,r);if(!e.isGeographic){const t=e.wkid?u.P.coordsys(e.wkid):u.P.fromString(e.isGeographic?u.a.PE_TYPE_GEOGCS:u.a.PE_TYPE_PROJCS,e.wkt2||e.wkt);u.g.projToGeog(t,o.length,o)}if(null!=s&&s.steps.length){let t;const e=179.9955;if(n.isGeographic&&(t=o.map((([t])=>t>e?1:t<-e?-1:0))),s.steps.forEach((t=>{const e=t.wkid?u.P.geogtran(t.wkid):u.P.fromString(u.a.PE_TYPE_GEOGTRAN,t.wkt);u.h.geogToGeog(e,o.length,o,null,t.isInverse?u.a.PE_TRANSFORM_2_TO_1:u.a.PE_TRANSFORM_1_TO_2)})),t)for(let n=0;n<o.length;n++){const s=t[n],r=o[n][0],i=r>e?1:r<-e?-1:0;s&&i&&s!==i&&(o[n][0]=s>0?r+360:r-360)}}if(!n.isGeographic){const t=C(n,!0),e=null!=t&&t.isEnvelope?[t.bbox[1],t.bbox[3]]:[-90,90];!function(t,e){const[n,s]=e;for(let e=0;e<t.length;e++){const r=t[e][1];(r<n||r>s)&&(t[e]=[NaN,NaN])}}(o,e);const s=n.wkid?u.P.coordsys(n.wkid):u.P.fromString(n.isGeographic?u.a.PE_TYPE_GEOGCS:u.a.PE_TYPE_PROJCS,n.wkt2||n.wkt);u.g.geogToProj(s,o.length,o)}let a=o;if(i&&o.length!==i.length){a=[];for(let t=0,e=0;t<i.length;t++)i[t]?a.push(o[e++]):a.push([NaN,NaN])}return a}function C(t,e=!1){let n=t.wkid||t.wkt2||t.wkt;if(!n||t.isGeographic)return null;if(n=String(n),b.has(n)){const t=b.get(n);return e?t?.gcs:t?.pcs}const s=t.wkid?u.P.coordsys(t.wkid):u.P.fromString(t.isGeographic?u.a.PE_TYPE_GEOGCS:u.a.PE_TYPE_PROJCS,t.wkt2||t.wkt),r=S(s,R(t,1e-4)),o=S(s,0,!0);return b.set(n,{pcs:r,gcs:o}),e?o:r}function S(t,e=0,n=!1){const s=u.j.generate(t),r=n?t.horizonGcsGenerate():t.horizonPcsGenerate();if(!s||!r?.length)return null;let o=!1,i=r.find((t=>1===t.getInclusive()&&1===t.getKind()));if(!i){if(i=r.find((t=>1===t.getInclusive()&&0===t.getKind())),!i)return null;o=!0}const a=n?0:(2===s.getNorthPoleLocation()?1:0)|(2===s.getSouthPoleLocation()?2:0),l=s.isPannableRectangle(),c=i.getCoord();if(o)return{isEnvelope:o,isPannable:l,vertices:c,coef:null,bbox:[c[0][0]-e,c[0][1]-e,c[1][0]+e,c[1][1]+e],poleLocation:a};let p=0;const h=[];let[f,m]=c[0],[d,g]=c[0];for(let t=0,e=c.length;t<e;t++){p++,p===e&&(p=0);const[n,s]=c[t],[r,o]=c[p];if(o===s)h.push([n,r,s,o,2]);else{const t=(r-n)/(o-s||1e-4),e=n-t*s;s<o?h.push([t,e,s,o,0]):h.push([t,e,o,s,1])}f=f<n?f:n,m=m<s?m:s,d=d>n?d:n,g=g>s?g:s}return{isEnvelope:!1,isPannable:l,vertices:c,coef:h,bbox:[f,m,d,g],poleLocation:a}}function j(t,e){const n=[],{cols:s,rows:r,xres:o,yres:i,usePixelCenter:a}=t;let{xmin:u,ymax:l}=t;if(a&&(u+=o/2,l-=i/2),null==e){for(let t=0;t<s;t++)for(let e=0;e<r;e++)n.push([u+o*t,l-i*e]);return{points:n}}const c=new Uint8Array(s*r);if(e.isEnvelope){const{bbox:[t,a,p,h]}=e;for(let f=0,m=0;f<s;f++){const s=u+o*f,d=e.isPannable||s>=t&&s<=p;for(let t=0;t<r;t++,m++){const e=l-i*t;d&&e>=a&&e<=h&&(n.push([s,e]),c[m]=1)}}return{points:n,mask:c}}const p=e.coef,h=[];for(let t=0;t<r;t++){const e=l-i*t,n=[],s=[];for(let t=0;t<p.length;t++){const[r,o,i,a,u]=p[t];if(e===i&&i===a)n.push(r),n.push(o),s.push(2),s.push(2);else if(e>=i&&e<=a){const t=r*e+o;n.push(t),s.push(u)}}let r=n;if(n.length>2){let t=2===s[0]?0:s[0],e=n[0];r=[];for(let o=1;o<s.length;o++)2===s[o]&&o!==s.length-1||(s[o]!==t&&(r.push(0===t?Math.min(e,n[o-1]):Math.max(e,n[o-1])),t=s[o],e=n[o]),o===s.length-1&&r.push(0===s[o]?Math.min(e,n[o]):Math.max(e,n[o])));r.sort(((t,e)=>t-e))}else n[0]>n[1]&&(r=[n[1],n[0]]);h.push(r)}for(let t=0,e=0;t<s;t++){const s=u+o*t;for(let t=0;t<r;t++,e++){const r=l-i*t,o=h[t];if(2===o.length)s>=o[0]&&s<=o[1]&&(n.push([s,r]),c[e]=1);else if(o.length>2){let t=!1;for(let e=0;e<o.length;e+=2)if(s>=o[e]&&s<=o[e+1]){t=!0;break}t&&(n.push([s,r]),c[e]=1)}}}return{points:n,mask:c}}function B(t,e,n=null,r=!0){const i=t.spatialReference;if(i.equals(e))return t;const a=z(t),u=O(i,!0),c=O(e);if(0===a||null==u||null==c){const o=G(t,e,n,r);if(null==u&&null!=c&&Math.abs(o.width-c)<R(e)&&(0,l.isLoaded)()){const n=C(i);if(null!=n&&n.poleLocation===s.None&&t.width<(n.bbox[2]-n.bbox[0])/2)return function(t,e){const n=O(e);if(null==n)return null;let{xmin:s,ymin:r,xmax:o,ymax:i}=t;const a=t.spatialReference,u=new f.A({spatialReference:a,rings:[[[s,r],[o,r],[o,i],[s,i],[s,r]]]}),c=(0,l.project)(u,e);if(2!==c.rings.length||!c.rings[0].length||!c.rings[1].length)return null;const{rings:h}=c,m=R(a),d=new p.A({spatialReference:e});for(let t=0;t<2;t++){s=o=h[t][0][0],r=i=h[t][0][1];for(let e=0;e<h[t].length;e++)s=s>h[t][e][0]?h[t][e][0]:s,o=o<h[t][e][0]?h[t][e][0]:o,r=r>h[t][e][1]?h[t][e][1]:r,i=i<h[t][e][1]?h[t][e][1]:i;if(0===t)d.ymin=r,d.ymax=i,d.xmin=s,d.xmax=o;else if(d.ymin=Math.min(d.ymin,r),d.ymax=Math.max(d.ymax,i),Math.abs(o-n/2)<m)d.xmin=s,d.xmax=d.xmax+n;else{if(!(Math.abs(s+n/2)<m))return null;d.xmax=o+n}}return d}(t,e)||o}return o}const h=t.clone().normalize();if(1===h.length&&t.xmax<u&&t.xmax-u/2>R(i)){const{xmin:e,xmax:n}=t;for(let s=0;s<=a;s++){const r=0===s?e:-u/2,o=s===a?n-u*s:u/2;h[s]=new p.A({xmin:r,xmax:o,ymin:t.ymin,ymax:t.ymax,spatialReference:i})}}return function(t,e){const n=O(t[0].spatialReference);if(t.length<2||null==n)return t[0];if(e=e??R(t[0].spatialReference),1===(t=t.filter((t=>t.width>e))).length)return t[0];let{xmin:s,xmax:r,ymin:o,ymax:i}=t[0];for(let e=1;e<t.length;e++){const s=t[e];r=s.xmax+n*e,o=Math.min(o,s.ymin),i=Math.max(i,s.ymax)}return new p.A({xmin:s,xmax:r,ymin:o,ymax:i,spatialReference:t[0].spatialReference})}(h.map((t=>G(t,e,n,r))).filter(o.Ru))}function Z(t,e,n){if("extent"===t.type){const{xmin:e,ymin:n,xmax:s,ymax:r,spatialReference:o}=t;t=new f.A({rings:[[[e,r],[s,r],[s,n],[e,n],[e,r]]],spatialReference:o})}return t.spatialReference.equals(e)?t:(g(t.spatialReference,e,n),(0,l.project)(t,e,n))}function G(t,e,n=null,s=!0,r=!0){const o=t.spatialReference;if(o.equals(e)||!e)return t;g(o,e,n);const i=(0,l.project)(t,e,n);if(r&&e.isWebMercator&&i&&(i.ymax=Math.min(20037508.342787,i.ymax),i.ymin=Math.max(-20037508.342787,i.ymin),i.ymin>=i.ymax))return null;if(!s||!i)return i;const a=E(o,!0),u=E(e,!0);if(null==a||null==u)return i;const c=R(o,.001),p=R(o,M),f=R(e,.001);if(Math.abs(i.xmin-u[0])<f&&Math.abs(i.xmax-u[1])<f){const s=Math.abs(t.xmin-a[0]),r=Math.abs(a[1]-t.xmax);if(s<c&&r>p){i.xmin=u[0];const s=[];s.push(new h.A(t.xmax,t.ymin,o)),s.push(new h.A(t.xmax,(t.ymin+t.ymax)/2,o)),s.push(new h.A(t.xmax,t.ymax,o));const r=s.map((t=>N(t,e,n))).filter((t=>!isNaN(t?.x))).map((t=>t.x));i.xmax=Math.max.apply(null,r)}if(r<c&&s>p){i.xmax=u[1];const s=[];s.push(new h.A(t.xmin,t.ymin,o)),s.push(new h.A(t.xmin,(t.ymin+t.ymax)/2,o)),s.push(new h.A(t.xmin,t.ymax,o));const r=s.map((t=>N(t,e,n))).filter((t=>!isNaN(t?.x))).map((t=>t.x));i.xmin=Math.min.apply(null,r)}}else{const t=R(e,.001);Math.abs(i.xmin-u[0])<t&&(i.xmin=u[0]),Math.abs(i.xmax-u[1])<t&&(i.xmax=u[1])}return i}function O(t,e=!1){if(!t)return null;const n=e?20037508.342787:20037508.342788905;return t.isWebMercator?2*n:t.wkid&&t.isGeographic?360:2*x[t.wkid]||null}function E(t,e=!1){if(t.isGeographic)return[-180,180];const n=O(t,e);return null!=n?[-n/2,n/2]:null}function D(t,e,n,s){let r=(t-e)/n;return r-Math.floor(r)!=0?r=Math.floor(r):s&&(r-=1),r}function z(t,e=!1){const n=O(t.spatialReference);if(null==n)return 0;const s=e?0:-n/2,r=R(t.spatialReference),o=!e&&Math.abs(t.xmax-n/2)<r?n/2:t.xmax,i=!e&&Math.abs(t.xmin+n/2)<r?-n/2:t.xmin;return D(o,s,n,!0)-D(i,s,n,!1)}function L(t){const e=t.storageInfo.origin.x,n=O(t.spatialReference,!0);if(null==n)return{originX:e,halfWorldWidth:null,pyramidsInfo:null};const s=n/2,{nativePixelSize:r,storageInfo:o,extent:i}=t,{maximumPyramidLevel:a,blockWidth:u,pyramidScalingFactor:l}=o;let c=r.x;const p=[],h=null!=t.transform&&"gcs-shift"===t.transform.type,f=e+(h?0:s),m=h?n-e:s-e;for(let t=0;t<=a;t++){const t=(i.xmax-e)/c/u,n=t-Math.floor(t)==0?t:Math.ceil(t),s=m/c/u,r=s-Math.floor(s)==0?s:Math.ceil(s),o=Math.floor(f/c/u),a=Math.round(f/c)%u,h=(u-Math.round(m/c)%u)%u;p.push({resolutionX:c,blockWidth:u,datasetColumnCount:n,worldColumnCountFromOrigin:r,leftMargin:a,rightPadding:h,originColumnOffset:o}),c*=l}return{originX:e,halfWorldWidth:s,pyramidsInfo:p,hasGCSSShiftTransform:h}}function U(t){const e=t.isAdaptive&&null==t.spacing;let n=t.spacing||[w,w],s=V(t),r={cols:s.size[0]+1,rows:s.size[1]+1};const o=s.outofBoundPointCount>0&&s.outofBoundPointCount<s.offsets.length/2;let i=s.outofBoundPointCount===s.offsets.length/2||e&&o?[0,0]:y(s.offsets,r,n,v);const a=(i[0]+i[1])/2,l=t.projectedExtent.spatialReference,c=t.srcBufferExtent.spatialReference;if(e&&(o||a>v)&&(d(l,c,t.datumTransformation)&&(l.isGeographic||C(l)),n=[A,A],s=V({...t,spacing:n}),r={cols:s.size[0]+1,rows:s.size[1]+1},i=y(s.offsets,r,n,v)),s.error=i,n[0]>1&&(s.coefficients=W(s.offsets,r,o)),t.includeGCSGrid&&!l.isGeographic&&!l.isWebMercator)if(c.isGeographic)s.gcsGrid={offsets:s.offsets,coefficients:s.coefficients,spacing:n};else{const e=C(l);if(null!=e&&!e.isEnvelope){const e=function(t){if(!t||t.isGeographic)return t;const e=String(t.wkid||t.wkt2||t.wkt);let n;return _.has(e)?n=_.get(e):(n=(t.wkid?u.P.coordsys(t.wkid):u.P.fromString(u.a.PE_TYPE_PROJCS,t.wkt2||t.wkt)).getGeogcs().getCode(),_.set(e,n)),new m.A({wkid:n})}(l),i=B(t.projectedExtent,e),{offsets:a}=V({...t,srcBufferExtent:i,spacing:n}),c=W(a,r,o);s.gcsGrid={offsets:a,coefficients:c,spacing:n}}}return s}function V(t){const{projectedExtent:e,srcBufferExtent:n,pixelSize:s,datumTransformation:r,rasterTransform:o}=t,i=e.spatialReference,a=n.spatialReference,u=g(i,a),{xmin:l,ymin:c,xmax:p,ymax:f}=e,m=O(a),d=null!=m&&(t.hasWrapAround||"gcs-shift"===o?.type),y=t.spacing||[w,w],x=y[0]*s.x,v=y[1]*s.y,b=1===y[0],_=Math.ceil((p-l)/x-.1/y[0])+(b?0:1),P=Math.ceil((f-c)/v-.1/y[1])+(b?0:1),T=I({cols:_,rows:P,xmin:l,ymax:f,xres:x,yres:v,inSR:i,outSR:a,datumTransformation:r,preferPE:y[0]<=A,usePixelCenter:b}),N=[];let F,k=0;const S=b?-1:NaN,{xmin:j,xmax:B,ymax:Z,width:G,height:E}=n,D=R(a,M),z=null!=m&&j>0&&B>m/2;let L=!1;if(u){const t=C(i);L=null!=t&&t.poleLocation>0}for(let t=0;t<_;t++){const e=[];for(let n=0;n<P;n++){let s=T[t*P+n];if(d&&s[0]>B&&s[0]>m/2-D?s[0]-=m:d&&0===t&&s[0]<0&&z&&!o&&(s[0]+=m),!s||isNaN(s[0])||isNaN(s[1]))N.push(S),N.push(S),e.push(null),k++;else{if(o){const t=o.inverseTransform(new h.A({x:s[0],y:s[1],spatialReference:a}));s=[t.x,t.y]}e.push(s),t>0&&d&&F[n]&&s[0]<F[n][0]&&(s[0]+=m,L&&s[0]>B&&s[0]>m&&(s[0]-=m)),N.push((s[0]-j)/G),N.push((Z-s[1])/E)}}F=e}return{offsets:N,error:null,coefficients:null,outofBoundPointCount:k,spacing:y,size:b?[_,P]:[_-1,P-1]}}function W(t,e,n){const{cols:s,rows:r}=e,o=new Float32Array((s-1)*(r-1)*2*6),i=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 e=0;e<s-1;e++){for(let n=0;n<r-1;n++){let u=e*r*2+2*n;const l=t[u],c=t[u+1],p=t[u+2],h=t[u+3];u+=2*r;const f=t[u],m=t[u+1],d=t[u+2],g=t[u+3];let y=0,x=12*(n*(s-1)+e);for(let t=0;t<3;t++)o[x++]=i[y++]*l+i[y++]*p+i[y++]*d;y=0;for(let t=0;t<3;t++)o[x++]=i[y++]*c+i[y++]*h+i[y++]*g;y=0;for(let t=0;t<3;t++)o[x++]=a[y++]*l+a[y++]*f+a[y++]*d;y=0;for(let t=0;t<3;t++)o[x++]=a[y++]*c+a[y++]*m+a[y++]*g}if(n)for(let t=0;t<o.length;t++)isNaN(o[t])&&(o[t]=-1)}return o}function $(t){const{spatialReference:e}=t,n=(0,c.Vp)(e);if(!n)return t;const[s,r]=n.valid,o=r-s;let i=0;if(t.xmin<s){const e=s-t.xmin;i=Math.ceil(e/o)}else if(t.xmin>r){const e=t.xmin-r;i=-Math.ceil(e/o)}return new p.A({spatialReference:t.spatialReference,xmin:t.xmin+i*o,ymin:t.ymin,xmax:t.xmax+i*o,ymax:t.ymax})}function q(t,e,n){const{storageInfo:s,pixelSize:r}=e;let o=0,i=!1;const{pyramidResolutions:u}=s,l="mixed"===s.tileInfo.format?.toLowerCase()?Math.max(1,Math.min(3,s.tileInfo.dpi/96)):1,c=(t.x+t.y)/2/l;if(null!=u&&u.length){const t=u[u.length-1],s=(t.x+t.y)/2,l=(r.x+r.y)/2;if(c<=l)o=0;else if(c>=s)o=u.length,i=c/s>8;else{let t,e=l;for(let s=1;s<=u.length;s++){if(t=(u[s-1].x+u[s-1].y)/2,c<=t){c===t?o=s:"down"===n?(o=s-1,i=c/e>8):o="up"===n||c-e>t-c||c/e>2?s:s-1;break}e=t}}const p=0===o?r:u[o-1];return i&&Math.min(p.x,p.y)*(0,a.GA)(e.spatialReference)>19567&&(i=!1),{pyramidLevel:o,pyramidResolution:new h.A({x:p.x,y:p.y,spatialReference:e.spatialReference}),excessiveReading:i}}const p=Math.log(t.x/r.x)/Math.LN2,f=Math.log(t.y/r.y)/Math.LN2,m=e.storageInfo.maximumPyramidLevel||0;o="down"===n?Math.floor(Math.min(p,f)):"up"===n?Math.ceil(Math.max(p,f)):Math.round((p+f)/2),o<0?o=0:o>m&&(i=o>m+3,o=m);const d=2**o;return{pyramidLevel:o,pyramidResolution:new h.A({x:d*e.nativePixelSize.x,y:d*e.nativePixelSize.y,spatialReference:e.spatialReference}),excessiveReading:i}}},82434:(t,e,n)=>{n.d(e,{A:()=>u});var s=n(90237),r=n(25482),o=n(10107),i=(n(44208),n(53966),n(87811),n(40608));let a=class extends r.oY{get affectsPixelSize(){return!1}forwardTransform(t){return t}inverseTransform(t){return t}};(0,s._)([(0,o.MZ)()],a.prototype,"affectsPixelSize",null),(0,s._)([(0,o.MZ)({json:{write:!0}})],a.prototype,"spatialReference",void 0),a=(0,s._)([(0,i.$)("esri.layers.support.rasterTransforms.BaseRasterTransform")],a);const u=a},73037:(t,e,n)=>{n.d(e,{A:()=>c});var s,r=n(90237),o=n(10107),i=(n(44208),n(53966),n(87811),n(93223)),a=n(40608),u=n(82434);let l=s=class extends u.A{constructor(){super(...arguments),this.type="gcs-shift",this.tolerance=1e-8}forwardTransform(t){return"point"===(t=t.clone()).type?(t.x>180+this.tolerance&&(t.x-=360),t):(t.xmin>=180-this.tolerance?(t.xmax-=360,t.xmin-=360):t.xmax>180+this.tolerance&&(t.xmin=-180,t.xmax=180),t)}inverseTransform(t){return"point"===(t=t.clone()).type?(t.x<-this.tolerance&&(t.x+=360),t):(t.xmin<-this.tolerance&&(t.xmin+=360,t.xmax+=360),t)}clone(){return new s({tolerance:this.tolerance})}};(0,r._)([(0,i.e)({GCSShiftXform:"gcs-shift"})],l.prototype,"type",void 0),(0,r._)([(0,o.MZ)()],l.prototype,"tolerance",void 0),l=s=(0,r._)([(0,a.$)("esri.layers.support.rasterTransforms.GCSShiftTransform")],l);const c=l},21312:(t,e,n)=>{n.d(e,{A:()=>g});var s,r=n(90237),o=(n(59456),n(10107)),i=(n(44208),n(53966),n(87811),n(93223)),a=n(36005),u=n(40608),l=n(43937),c=n(82434),p=n(86738),h=n(5443);function f(t,e,n){const{x:s,y:r}=e;if(n<2)return{x:t[0]+s*t[2]+r*t[4],y:t[1]+s*t[3]+r*t[5]};if(2===n){const e=s*s,n=r*r,o=s*r;return{x:t[0]+s*t[2]+r*t[4]+e*t[6]+o*t[8]+n*t[10],y:t[1]+s*t[3]+r*t[5]+e*t[7]+o*t[9]+n*t[11]}}const o=s*s,i=r*r,a=s*r,u=o*s,l=o*r,c=s*i,p=r*i;return{x:t[0]+s*t[2]+r*t[4]+o*t[6]+a*t[8]+i*t[10]+u*t[12]+l*t[14]+c*t[16]+p*t[18],y:t[1]+s*t[3]+r*t[5]+o*t[7]+a*t[9]+i*t[11]+u*t[13]+l*t[15]+c*t[17]+p*t[19]}}function m(t,e,n){const{xmin:s,ymin:r,xmax:o,ymax:i,spatialReference:a}=e;let u=[];if(n<2)u.push({x:s,y:i}),u.push({x:o,y:i}),u.push({x:s,y:r}),u.push({x:o,y:r});else{let t=10;for(let e=0;e<t;e++)u.push({x:s,y:r+(i-r)*e/(t-1)}),u.push({x:o,y:r+(i-r)*e/(t-1)});t=8;for(let e=1;e<=t;e++)u.push({x:s+(o-s)*e/t,y:r}),u.push({x:s+(o-s)*e/t,y:i})}u=u.map((e=>f(t,e,n)));const l=u.map((t=>t.x)),c=u.map((t=>t.y));return new h.A({xmin:Math.min.apply(null,l),xmax:Math.max.apply(null,l),ymin:Math.min.apply(null,c),ymax:Math.max.apply(null,c),spatialReference:a})}let d=s=class extends c.A{constructor(){super(...arguments),this.polynomialOrder=1,this.type="polynomial"}readForwardCoefficients(t,e){const{coeffX:n,coeffY:s}=e;if(!n?.length||!s?.length||n.length!==s.length)return null;const r=[];for(let t=0;t<n.length;t++)r.push(n[t]),r.push(s[t]);return r}writeForwardCoefficients(t,e,n){const s=[],r=[];for(let e=0;e<t?.length;e++)e%2==0?s.push(t[e]):r.push(t[e]);e.coeffX=s,e.coeffY=r}get inverseCoefficients(){let t=this._get("inverseCoefficients");const e=this._get("forwardCoefficients");return!t&&e&&this.polynomialOrder<2&&(t=function(t){const[e,n,s,r,o,i]=t,a=s*i-o*r,u=o*r-s*i;return[(o*n-e*i)/a,(s*n-e*r)/u,i/a,r/u,-o/a,-s/u]}(e)),t}set inverseCoefficients(t){this._set("inverseCoefficients",t)}readInverseCoefficients(t,e){const{inverseCoeffX:n,inverseCoeffY:s}=e;if(!n?.length||!s?.length||n.length!==s.length)return null;const r=[];for(let t=0;t<n.length;t++)r.push(n[t]),r.push(s[t]);return r}writeInverseCoefficients(t,e,n){const s=[],r=[];for(let e=0;e<t?.length;e++)e%2==0?s.push(t[e]):r.push(t[e]);e.inverseCoeffX=s,e.inverseCoeffY=r}get affectsPixelSize(){return this.polynomialOrder>0}forwardTransform(t){if("point"===t.type){const e=f(this.forwardCoefficients,t,this.polynomialOrder);return new p.A({x:e.x,y:e.y,spatialReference:t.spatialReference})}return m(this.forwardCoefficients,t,this.polynomialOrder)}inverseTransform(t){if("point"===t.type){const e=f(this.inverseCoefficients,t,this.polynomialOrder);return new p.A({x:e.x,y:e.y,spatialReference:t.spatialReference})}return m(this.inverseCoefficients,t,this.polynomialOrder)}clone(){return new s({polynomialOrder:this.polynomialOrder,forwardCoefficients:this.forwardCoefficients?[...this.forwardCoefficients]:null,inverseCoefficients:this.inverseCoefficients?[...this.inverseCoefficients]:null})}};(0,r._)([(0,o.MZ)({json:{write:!0}})],d.prototype,"polynomialOrder",void 0),(0,r._)([(0,o.MZ)()],d.prototype,"forwardCoefficients",void 0),(0,r._)([(0,a.w)("forwardCoefficients",["coeffX","coeffY"])],d.prototype,"readForwardCoefficients",null),(0,r._)([(0,l.K)("forwardCoefficients")],d.prototype,"writeForwardCoefficients",null),(0,r._)([(0,o.MZ)({json:{write:!0}})],d.prototype,"inverseCoefficients",null),(0,r._)([(0,a.w)("inverseCoefficients",["inverseCoeffX","inverseCoeffY"])],d.prototype,"readInverseCoefficients",null),(0,r._)([(0,l.K)("inverseCoefficients")],d.prototype,"writeInverseCoefficients",null),(0,r._)([(0,o.MZ)()],d.prototype,"affectsPixelSize",null),(0,r._)([(0,i.e)({PolynomialXform:"polynomial"})],d.prototype,"type",void 0),d=s=(0,r._)([(0,u.$)("esri.layers.support.rasterTransforms.PolynomialTransform")],d);const g=d},41086:(t,e,n)=>{n.d(e,{J:()=>m,l:()=>d});var s,r=n(73037),o=n(90237),i=(n(53966),n(44208),n(87811),n(49186),n(93223)),a=n(40608),u=n(82434);let l=s=class extends u.A{constructor(){super(...arguments),this.type="identity"}clone(){return new s}};(0,o._)([(0,i.e)({IdentityXform:"identity"})],l.prototype,"type",void 0),l=s=(0,o._)([(0,a.$)("esri.layers.support.rasterTransforms.IdentityTransform")],l);const c=l;var p=n(21312);const h={GCSShiftXform:r.A,IdentityXform:c,PolynomialXform:p.A},f=Object.keys(h);function m(t){const e=t?.type;return!t||f.includes(e)}function d(t){const e=t?.type;if(!e)return null;const n=h[t?.type];if(n){const e=new n;return e.read(t),e}return null}}}]);