@arcgis/core 4.27.0-next.20230321 → 4.27.0-next.20230323

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 (267) hide show
  1. package/analysis/LineOfSightAnalysisObserver.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/02b6227c156ee0d8eb66.js +1 -0
  4. package/assets/esri/core/workers/chunks/{7e0c65aa61c2ff0c3504.js → 1c98b92933a48cf96c1e.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{a27951dbe83c63f9d01a.js → 26bc91a9d9d7345a3eba.js} +1 -1
  6. package/assets/esri/core/workers/chunks/321f272d4c7ed6b0cb46.js +1 -0
  7. package/assets/esri/core/workers/chunks/{a09cc8e2ff43fe4afa04.js → 375628de4cfc71cb41c1.js} +1 -1
  8. package/assets/esri/core/workers/chunks/47bd558e2ce89f47f908.js +1 -0
  9. package/assets/esri/core/workers/chunks/4cb62855bb1ae608bfde.js +1 -0
  10. package/assets/esri/core/workers/chunks/4f0c2b6b200bf8222fd7.js +1 -0
  11. package/assets/esri/core/workers/chunks/5252f3cc244204edc299.js +1 -0
  12. package/assets/esri/core/workers/chunks/6f952a6464cf9e62dbac.js +1098 -0
  13. package/assets/esri/core/workers/chunks/76d6c1fc25f02bcf258e.js +1 -0
  14. package/assets/esri/core/workers/chunks/{d6ec7682de8fad9718e9.js → 77dccfaf1f9e778973b3.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{c5d872adce711ec61ede.js → 8980c5dc389c27368b73.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{6acaf28cba5d49a98fb6.js → 91b292f310f06a0cbf72.js} +1 -1
  17. package/assets/esri/core/workers/chunks/9bac27976e7a71268b7b.js +1 -0
  18. package/assets/esri/core/workers/chunks/{ff9efa829497557ec26a.js → aa4640a0207e0be224e2.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{81a6f4b43e047c3395c0.js → aebc5091bd4159197ce0.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{c8cd3fde6d8d43ddb954.js → b6cdf4daf07d9e55f61e.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{6b14673a4afd6ef81487.js → c76cabd2d2510a653dff.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{4be7647605300e07e843.js → c90fff7e28ba5b443b11.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{e637e47000f4dc48054d.js → cc7f4fd20443a2acf0f1.js} +1 -1
  24. package/assets/esri/core/workers/chunks/d19e9fab4f4fb765c6a3.js +1 -0
  25. package/assets/esri/core/workers/chunks/d9ef4891c8b0bdd90f5b.js +1 -0
  26. package/assets/esri/core/workers/chunks/{d92d6a43270fb0d366b4.js → de4f5c48efbcee82c3c1.js} +1 -1
  27. package/assets/esri/core/workers/chunks/f6e7948075b3742b4ef9.js +1 -0
  28. package/assets/esri/core/workers/chunks/{32f9b488915a4a8864e5.js → f8b9e0c1671e55b61904.js} +1 -1
  29. package/assets/esri/views/3d/analysis/Slice/images/heading-rotate.ts.svg +7 -28
  30. package/assets/esri/views/3d/analysis/Slice/images/tilt-rotate.ts.svg +11 -0
  31. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList.json +1 -1
  32. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ar.json +1 -1
  33. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_bg.json +1 -1
  34. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_bs.json +1 -1
  35. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ca.json +1 -1
  36. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_cs.json +1 -1
  37. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_da.json +1 -1
  38. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_de.json +1 -1
  39. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_el.json +1 -1
  40. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_en.json +1 -1
  41. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_es.json +1 -1
  42. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_et.json +1 -1
  43. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_fi.json +1 -1
  44. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_fr.json +1 -1
  45. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_he.json +1 -1
  46. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_hr.json +1 -1
  47. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_hu.json +1 -1
  48. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_id.json +1 -1
  49. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_it.json +1 -1
  50. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ja.json +1 -1
  51. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ko.json +1 -1
  52. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_lt.json +1 -1
  53. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_lv.json +1 -1
  54. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_nb.json +1 -1
  55. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_nl.json +1 -1
  56. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pl.json +1 -1
  57. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pt-BR.json +1 -1
  58. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pt-PT.json +1 -1
  59. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ro.json +1 -1
  60. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ru.json +1 -1
  61. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sk.json +1 -1
  62. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sl.json +1 -1
  63. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sr.json +1 -1
  64. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sv.json +1 -1
  65. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_th.json +1 -1
  66. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_tr.json +1 -1
  67. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_uk.json +1 -1
  68. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_vi.json +1 -1
  69. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-CN.json +1 -1
  70. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-HK.json +1 -1
  71. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-TW.json +1 -1
  72. package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
  73. package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
  74. package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
  75. package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
  76. package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
  77. package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
  78. package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
  79. package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
  80. package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
  81. package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
  82. package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
  83. package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
  84. package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
  85. package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
  86. package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
  87. package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
  88. package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
  89. package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
  90. package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
  91. package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
  92. package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
  93. package/assets/esri/widgets/Editor/t9n/Editor_nb.json +1 -1
  94. package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
  95. package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
  96. package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
  97. package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
  98. package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
  99. package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
  100. package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
  101. package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
  102. package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
  103. package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
  104. package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
  105. package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
  106. package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
  107. package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
  108. package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
  109. package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
  110. package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
  111. package/assets/esri/widgets/LayerList/t9n/LayerList.json +1 -1
  112. package/assets/esri/widgets/LayerList/t9n/LayerList_ar.json +1 -1
  113. package/assets/esri/widgets/LayerList/t9n/LayerList_bg.json +1 -1
  114. package/assets/esri/widgets/LayerList/t9n/LayerList_bs.json +1 -1
  115. package/assets/esri/widgets/LayerList/t9n/LayerList_ca.json +1 -1
  116. package/assets/esri/widgets/LayerList/t9n/LayerList_cs.json +1 -1
  117. package/assets/esri/widgets/LayerList/t9n/LayerList_da.json +1 -1
  118. package/assets/esri/widgets/LayerList/t9n/LayerList_de.json +1 -1
  119. package/assets/esri/widgets/LayerList/t9n/LayerList_el.json +1 -1
  120. package/assets/esri/widgets/LayerList/t9n/LayerList_en.json +1 -1
  121. package/assets/esri/widgets/LayerList/t9n/LayerList_es.json +1 -1
  122. package/assets/esri/widgets/LayerList/t9n/LayerList_et.json +1 -1
  123. package/assets/esri/widgets/LayerList/t9n/LayerList_fi.json +1 -1
  124. package/assets/esri/widgets/LayerList/t9n/LayerList_fr.json +1 -1
  125. package/assets/esri/widgets/LayerList/t9n/LayerList_he.json +1 -1
  126. package/assets/esri/widgets/LayerList/t9n/LayerList_hr.json +1 -1
  127. package/assets/esri/widgets/LayerList/t9n/LayerList_hu.json +1 -1
  128. package/assets/esri/widgets/LayerList/t9n/LayerList_id.json +1 -1
  129. package/assets/esri/widgets/LayerList/t9n/LayerList_it.json +1 -1
  130. package/assets/esri/widgets/LayerList/t9n/LayerList_ja.json +1 -1
  131. package/assets/esri/widgets/LayerList/t9n/LayerList_ko.json +1 -1
  132. package/assets/esri/widgets/LayerList/t9n/LayerList_lt.json +1 -1
  133. package/assets/esri/widgets/LayerList/t9n/LayerList_lv.json +1 -1
  134. package/assets/esri/widgets/LayerList/t9n/LayerList_nb.json +1 -1
  135. package/assets/esri/widgets/LayerList/t9n/LayerList_nl.json +1 -1
  136. package/assets/esri/widgets/LayerList/t9n/LayerList_pl.json +1 -1
  137. package/assets/esri/widgets/LayerList/t9n/LayerList_pt-BR.json +1 -1
  138. package/assets/esri/widgets/LayerList/t9n/LayerList_pt-PT.json +1 -1
  139. package/assets/esri/widgets/LayerList/t9n/LayerList_ro.json +1 -1
  140. package/assets/esri/widgets/LayerList/t9n/LayerList_ru.json +1 -1
  141. package/assets/esri/widgets/LayerList/t9n/LayerList_sk.json +1 -1
  142. package/assets/esri/widgets/LayerList/t9n/LayerList_sl.json +1 -1
  143. package/assets/esri/widgets/LayerList/t9n/LayerList_sr.json +1 -1
  144. package/assets/esri/widgets/LayerList/t9n/LayerList_sv.json +1 -1
  145. package/assets/esri/widgets/LayerList/t9n/LayerList_th.json +1 -1
  146. package/assets/esri/widgets/LayerList/t9n/LayerList_tr.json +1 -1
  147. package/assets/esri/widgets/LayerList/t9n/LayerList_uk.json +1 -1
  148. package/assets/esri/widgets/LayerList/t9n/LayerList_vi.json +1 -1
  149. package/assets/esri/widgets/LayerList/t9n/LayerList_zh-CN.json +1 -1
  150. package/assets/esri/widgets/LayerList/t9n/LayerList_zh-HK.json +1 -1
  151. package/assets/esri/widgets/LayerList/t9n/LayerList_zh-TW.json +1 -1
  152. package/chunks/ComponentShader.glsl.js +1 -1
  153. package/chunks/DefaultMaterial.glsl.js +4 -4
  154. package/chunks/vec42.js +1 -1
  155. package/core/Loadable.js +1 -1
  156. package/core/accessorSupport/Property.js +1 -1
  157. package/core/accessorSupport/tracking/SimpleTrackingTarget.js +1 -1
  158. package/core/analysisThemeUtils.js +1 -1
  159. package/core/maybe.js +1 -1
  160. package/geometry/support/buffer/math/vec4.js +1 -1
  161. package/interfaces.d.ts +1 -1
  162. package/layers/IntegratedMeshLayer.js +1 -1
  163. package/layers/LineOfSightLayer.js +1 -1
  164. package/layers/SceneLayer.js +1 -1
  165. package/layers/graphics/sources/connections/GeoEventConnection.js +1 -1
  166. package/layers/mixins/ImageryTileMixin.js +1 -1
  167. package/layers/mixins/RefreshableLayer.js +1 -1
  168. package/layers/support/SceneFilter.js +1 -1
  169. package/layers/support/SceneModifications.js +1 -1
  170. package/layers/support/rasterFunctions/clipUtils.js +1 -1
  171. package/layers/support/rasterFunctions/stretchUtils.js +1 -1
  172. package/package.json +1 -1
  173. package/portal/PortalItemResource.js +1 -1
  174. package/portal/support/resourceUtils.js +1 -1
  175. package/support/revision.js +1 -1
  176. package/symbols/support/utils.js +1 -1
  177. package/views/2d/engine/vectorTiles/TileHandler.js +1 -1
  178. package/views/2d/viewpointUtils.js +1 -1
  179. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  180. package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
  181. package/views/3d/analysis/Dimension/settings.js +1 -1
  182. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  183. package/views/3d/analysis/Slice/SliceVisualization.js +1 -1
  184. package/views/3d/analysis/Slice/images/Factory.js +1 -1
  185. package/views/3d/analysis/Slice/images/generateTextures.js +1 -1
  186. package/views/3d/analysis/Slice/images/heading-rotate-svg.js +1 -1
  187. package/views/3d/analysis/Slice/images/tilt-rotate-svg.js +5 -0
  188. package/views/3d/analysis/Slice/settings.js +5 -0
  189. package/views/3d/analysis/Slice/sliceToolConfig.js +1 -1
  190. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  191. package/views/3d/environment/Stars.js +1 -1
  192. package/views/3d/interactive/Manipulator3D.js +1 -1
  193. package/views/3d/interactive/editingTools/transformGraphic/ExtentTransformTool.js +1 -1
  194. package/views/3d/interactive/manipulatorUtils.js +1 -1
  195. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  196. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  197. package/views/3d/layers/PointCloudWorker.js +1 -1
  198. package/views/3d/layers/VectorTileLayerView3D.js +1 -1
  199. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  200. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  201. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  202. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  203. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  204. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  205. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  206. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  207. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  208. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  209. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  210. package/views/3d/layers/i3s/PointCloudRendererUtil.js +1 -1
  211. package/views/3d/layers/i3s/PointCloudWorkerUtil.js +1 -1
  212. package/views/3d/layers/i3s/PointGraphic.js +1 -1
  213. package/views/3d/state/ViewState.js +1 -1
  214. package/views/3d/state/controllers/SurfaceCollisionCorrectionController.js +1 -1
  215. package/views/3d/terrain/GeometryState.js +1 -1
  216. package/views/3d/terrain/PatchGeometry.js +1 -1
  217. package/views/3d/terrain/PatchGeometryFactory.js +1 -1
  218. package/views/3d/terrain/TileAgent.js +1 -1
  219. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  220. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  221. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  222. package/views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js +6 -5
  223. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +1 -1
  224. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +11 -11
  225. package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeShadingNormal.glsl.js +1 -1
  226. package/views/3d/webgl-engine/lib/AnimationTimeStep.js +1 -1
  227. package/views/3d/webgl-engine/lib/AttributeArray.js +1 -1
  228. package/views/3d/webgl-engine/lib/DefaultVertexAttributeLocations.js +1 -1
  229. package/views/3d/webgl-engine/lib/Normals.js +5 -0
  230. package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
  231. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  232. package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
  233. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  234. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  235. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  236. package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
  237. package/views/3d/webgl-engine/shaders/RealisticTreeTechnique.js +1 -1
  238. package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
  239. package/views/LayerViewManager.js +1 -1
  240. package/views/SceneView.js +1 -1
  241. package/views/draw/support/Reshape.js +1 -1
  242. package/views/layers/SceneLayerView.js +1 -1
  243. package/views/support/colorUtils.js +1 -1
  244. package/views/webgl/ShaderTranspiler.js +1 -1
  245. package/widgets/BasemapLayerList.js +1 -1
  246. package/widgets/Daylight/DaylightViewModel.js +1 -1
  247. package/widgets/Expand.js +1 -1
  248. package/widgets/FeatureForm/FieldInput.js +1 -1
  249. package/widgets/LayerList.js +1 -1
  250. package/widgets/Search.js +1 -1
  251. package/widgets/Sketch/SketchViewModel.js +1 -1
  252. package/assets/esri/core/workers/chunks/0487ab23a20ec356ab4c.js +0 -1
  253. package/assets/esri/core/workers/chunks/29ee4f14602caf6967e4.js +0 -1
  254. package/assets/esri/core/workers/chunks/2c0775541cfec9d43acb.js +0 -1
  255. package/assets/esri/core/workers/chunks/4879164b48da9ad4547a.js +0 -1
  256. package/assets/esri/core/workers/chunks/69060e5cffc19e76062a.js +0 -1
  257. package/assets/esri/core/workers/chunks/87edeb09a948122fa030.js +0 -1
  258. package/assets/esri/core/workers/chunks/92951b85676df776961f.js +0 -1100
  259. package/assets/esri/core/workers/chunks/a71a5c8a9aa302bf6f01.js +0 -1
  260. package/assets/esri/core/workers/chunks/ad5c61daaed286c74982.js +0 -1
  261. package/assets/esri/core/workers/chunks/bc002e4dff8859571a7a.js +0 -1
  262. package/assets/esri/core/workers/chunks/ef2d3e84cd58df5f80af.js +0 -1
  263. package/assets/esri/core/workers/chunks/fec5e55e0fbf1710e22d.js +0 -1
  264. package/assets/esri/views/3d/analysis/Slice/images/tilt-rotate.svg +0 -80
  265. package/assets/esri/views/3d/analysis/Slice/images/tilt-rotate.ts.png +0 -0
  266. package/views/3d/analysis/Slice/images/tilt-rotate-png.js +0 -5
  267. package/views/3d/webgl-engine/core/shaderLibrary/util/DecodeNormal.glsl.js +0 -8
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6610],{97575:(e,t,r)=>{r.d(t,{J:()=>s});var n,o,i,s={},a={get exports(){return s},set exports(e){s=e}};n=a,o=function(){var e=function(){function e(e){this.message="JPEG error: "+e}return e.prototype=new Error,e.prototype.name="JpegError",e.constructor=e,e}();return function(){if(!self||!self.Uint8ClampedArray)return null;var t=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),r=4017,n=799,o=3406,i=2276,s=1567,a=3784,l=5793,u=2896;function h(){this.decodeTransform=null,this.colorTransform=-1}function c(e,t){for(var r,n,o=0,i=[],s=16;s>0&&!e[s-1];)s--;i.push({children:[],index:0});var a,l=i[0];for(r=0;r<s;r++){for(n=0;n<e[r];n++){for((l=i.pop()).children[l.index]=t[o];l.index>0;)l=i.pop();for(l.index++,i.push(l);i.length<=r;)i.push(a={children:[],index:0}),l.children[l.index]=a.children,l=a;o++}r+1<s&&(i.push(a={children:[],index:0}),l.children[l.index]=a.children,l=a)}return i[0].children}function f(e,t,r){return 64*((e.blocksPerLine+1)*t+r)}function d(r,n,o,i,s,a,l,u,h){var c=o.mcusPerLine,d=o.progressive,p=n,g=0,y=0;function w(){if(y>0)return y--,g>>y&1;if(255===(g=r[n++])){var t=r[n++];if(t)throw new e("unexpected marker "+(g<<8|t).toString(16))}return y=7,g>>>7}function C(t){for(var r=t;;){if("number"==typeof(r=r[w()]))return r;if("object"!=typeof r)throw new e("invalid huffman sequence")}}function b(e){for(var t=0;e>0;)t=t<<1|w(),e--;return t}function x(e){if(1===e)return 1===w()?1:-1;var t=b(e);return t>=1<<e-1?t:t+(-1<<e)+1}var k,v=0,T=0;function S(e,t,r,n,o){var i=r%c;t(e,f(e,(r/c|0)*e.v+n,i*e.h+o))}function A(e,t,r){t(e,f(e,r/e.blocksPerLine|0,r%e.blocksPerLine))}var I,P,M,E,D,R,L=i.length;R=d?0===a?0===u?function(e,t){var r=C(e.huffmanTableDC),n=0===r?0:x(r)<<h;e.blockData[t]=e.pred+=n}:function(e,t){e.blockData[t]|=w()<<h}:0===u?function(e,r){if(v>0)v--;else for(var n=a,o=l;n<=o;){var i=C(e.huffmanTableAC),s=15&i,u=i>>4;if(0!==s){var c=t[n+=u];e.blockData[r+c]=x(s)*(1<<h),n++}else{if(u<15){v=b(u)+(1<<u)-1;break}n+=16}}}:function(r,n){for(var o,i,s=a,u=l,c=0;s<=u;){var f=t[s];switch(T){case 0:if(c=(i=C(r.huffmanTableAC))>>4,0==(o=15&i))c<15?(v=b(c)+(1<<c),T=4):(c=16,T=1);else{if(1!==o)throw new e("invalid ACn encoding");k=x(o),T=c?2:3}continue;case 1:case 2:r.blockData[n+f]?r.blockData[n+f]+=w()<<h:0==--c&&(T=2===T?3:0);break;case 3:r.blockData[n+f]?r.blockData[n+f]+=w()<<h:(r.blockData[n+f]=k<<h,T=0);break;case 4:r.blockData[n+f]&&(r.blockData[n+f]+=w()<<h)}s++}4===T&&0==--v&&(T=0)}:function(e,r){var n=C(e.huffmanTableDC),o=0===n?0:x(n);e.blockData[r]=e.pred+=o;for(var i=1;i<64;){var s=C(e.huffmanTableAC),a=15&s,l=s>>4;if(0!==a){var u=t[i+=l];e.blockData[r+u]=x(a),i++}else{if(l<15)break;i+=16}}};var _,B,U,G,O=0;for(B=1===L?i[0].blocksPerLine*i[0].blocksPerColumn:c*o.mcusPerColumn;O<B;){var F=s?Math.min(B-O,s):B;for(P=0;P<L;P++)i[P].pred=0;if(v=0,1===L)for(I=i[0],D=0;D<F;D++)A(I,R,O),O++;else for(D=0;D<F;D++){for(P=0;P<L;P++)for(U=(I=i[P]).h,G=I.v,M=0;M<G;M++)for(E=0;E<U;E++)S(I,R,O,M,E);O++}y=0,(_=m(r,n))&&_.invalid&&(console.log("decodeScan - unexpected MCU data, next marker is: "+_.invalid),n=_.offset);var N=_&&_.marker;if(!N||N<=65280)throw new e("marker was not found");if(!(N>=65488&&N<=65495))break;n+=2}return(_=m(r,n))&&_.invalid&&(console.log("decodeScan - unexpected Scan data, next marker is: "+_.invalid),n=_.offset),n-p}function p(t,h,c){var f,d,p,g,m,y,w,C,b,x,k,v,T,S,A,I,P,M=t.quantizationTable,E=t.blockData;if(!M)throw new e("missing required Quantization Table.");for(var D=0;D<64;D+=8)b=E[h+D],x=E[h+D+1],k=E[h+D+2],v=E[h+D+3],T=E[h+D+4],S=E[h+D+5],A=E[h+D+6],I=E[h+D+7],b*=M[D],0!=(x|k|v|T|S|A|I)?(x*=M[D+1],k*=M[D+2],v*=M[D+3],T*=M[D+4],S*=M[D+5],A*=M[D+6],I*=M[D+7],d=(f=(f=l*b+128>>8)+(d=l*T+128>>8)+1>>1)-d,P=(p=k)*a+(g=A)*s+128>>8,p=p*s-g*a+128>>8,w=(m=(m=u*(x-I)+128>>8)+(w=S<<4)+1>>1)-w,y=(C=(C=u*(x+I)+128>>8)+(y=v<<4)+1>>1)-y,g=(f=f+(g=P)+1>>1)-g,p=(d=d+p+1>>1)-p,P=m*i+C*o+2048>>12,m=m*o-C*i+2048>>12,C=P,P=y*n+w*r+2048>>12,y=y*r-w*n+2048>>12,w=P,c[D]=f+C,c[D+7]=f-C,c[D+1]=d+w,c[D+6]=d-w,c[D+2]=p+y,c[D+5]=p-y,c[D+3]=g+m,c[D+4]=g-m):(P=l*b+512>>10,c[D]=P,c[D+1]=P,c[D+2]=P,c[D+3]=P,c[D+4]=P,c[D+5]=P,c[D+6]=P,c[D+7]=P);for(var R=0;R<8;++R)b=c[R],0!=((x=c[R+8])|(k=c[R+16])|(v=c[R+24])|(T=c[R+32])|(S=c[R+40])|(A=c[R+48])|(I=c[R+56]))?(d=(f=4112+((f=l*b+2048>>12)+(d=l*T+2048>>12)+1>>1))-d,P=(p=k)*a+(g=A)*s+2048>>12,p=p*s-g*a+2048>>12,g=P,w=(m=(m=u*(x-I)+2048>>12)+(w=S)+1>>1)-w,y=(C=(C=u*(x+I)+2048>>12)+(y=v)+1>>1)-y,P=m*i+C*o+2048>>12,m=m*o-C*i+2048>>12,C=P,P=y*n+w*r+2048>>12,y=y*r-w*n+2048>>12,b=(b=(f=f+g+1>>1)+C)<16?0:b>=4080?255:b>>4,x=(x=(d=d+p+1>>1)+(w=P))<16?0:x>=4080?255:x>>4,k=(k=(p=d-p)+y)<16?0:k>=4080?255:k>>4,v=(v=(g=f-g)+m)<16?0:v>=4080?255:v>>4,T=(T=g-m)<16?0:T>=4080?255:T>>4,S=(S=p-y)<16?0:S>=4080?255:S>>4,A=(A=d-w)<16?0:A>=4080?255:A>>4,I=(I=f-C)<16?0:I>=4080?255:I>>4,E[h+R]=b,E[h+R+8]=x,E[h+R+16]=k,E[h+R+24]=v,E[h+R+32]=T,E[h+R+40]=S,E[h+R+48]=A,E[h+R+56]=I):(P=(P=l*b+8192>>14)<-2040?0:P>=2024?255:P+2056>>4,E[h+R]=P,E[h+R+8]=P,E[h+R+16]=P,E[h+R+24]=P,E[h+R+32]=P,E[h+R+40]=P,E[h+R+48]=P,E[h+R+56]=P)}function g(e,t){for(var r=t.blocksPerLine,n=t.blocksPerColumn,o=new Int16Array(64),i=0;i<n;i++)for(var s=0;s<r;s++)p(t,f(t,i,s),o);return t.blockData}function m(e,t,r){function n(t){return e[t]<<8|e[t+1]}var o=e.length-1,i=r<t?r:t;if(t>=o)return null;var s=n(t);if(s>=65472&&s<=65534)return{invalid:null,marker:s,offset:t};for(var a=n(i);!(a>=65472&&a<=65534);){if(++i>=o)return null;a=n(i)}return{invalid:s.toString(16),marker:a,offset:i}}return h.prototype={parse:function(r){function n(){var e=r[l]<<8|r[l+1];return l+=2,e}function o(){var e=n(),t=l+e-2,o=m(r,t,l);o&&o.invalid&&(console.log("readDataBlock - incorrect length, next marker is: "+o.invalid),t=o.offset);var i=r.subarray(l,t);return l+=i.length,i}function i(e){for(var t=Math.ceil(e.samplesPerLine/8/e.maxH),r=Math.ceil(e.scanLines/8/e.maxV),n=0;n<e.components.length;n++){O=e.components[n];var o=Math.ceil(Math.ceil(e.samplesPerLine/8)*O.h/e.maxH),i=Math.ceil(Math.ceil(e.scanLines/8)*O.v/e.maxV),s=t*O.h,a=r*O.v*64*(s+1);O.blockData=new Int16Array(a),O.blocksPerLine=o,O.blocksPerColumn=i}e.mcusPerLine=t,e.mcusPerColumn=r}var s,a,l=0,u=null,h=null,f=[],p=[],y=[],w=n();if(65496!==w)throw new e("SOI not found");for(w=n();65497!==w;){var C,b,x;switch(w){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var k=o();65504===w&&74===k[0]&&70===k[1]&&73===k[2]&&70===k[3]&&0===k[4]&&(u={version:{major:k[5],minor:k[6]},densityUnits:k[7],xDensity:k[8]<<8|k[9],yDensity:k[10]<<8|k[11],thumbWidth:k[12],thumbHeight:k[13],thumbData:k.subarray(14,14+3*k[12]*k[13])}),65518===w&&65===k[0]&&100===k[1]&&111===k[2]&&98===k[3]&&101===k[4]&&(h={version:k[5]<<8|k[6],flags0:k[7]<<8|k[8],flags1:k[9]<<8|k[10],transformCode:k[11]});break;case 65499:for(var v=n()+l-2;l<v;){var T=r[l++],S=new Uint16Array(64);if(T>>4==0)for(b=0;b<64;b++)S[t[b]]=r[l++];else{if(T>>4!=1)throw new e("DQT - invalid table spec");for(b=0;b<64;b++)S[t[b]]=n()}f[15&T]=S}break;case 65472:case 65473:case 65474:if(s)throw new e("Only single frame JPEGs supported");n(),(s={}).extended=65473===w,s.progressive=65474===w,s.precision=r[l++],s.scanLines=n(),s.samplesPerLine=n(),s.components=[],s.componentIds={};var A,I=r[l++],P=0,M=0;for(C=0;C<I;C++){A=r[l];var E=r[l+1]>>4,D=15&r[l+1];P<E&&(P=E),M<D&&(M=D);var R=r[l+2];x=s.components.push({h:E,v:D,quantizationId:R,quantizationTable:null}),s.componentIds[A]=x-1,l+=3}s.maxH=P,s.maxV=M,i(s);break;case 65476:var L=n();for(C=2;C<L;){var _=r[l++],B=new Uint8Array(16),U=0;for(b=0;b<16;b++,l++)U+=B[b]=r[l];var G=new Uint8Array(U);for(b=0;b<U;b++,l++)G[b]=r[l];C+=17+U,(_>>4==0?y:p)[15&_]=c(B,G)}break;case 65501:n(),a=n();break;case 65498:n();var O,F=r[l++],N=[];for(C=0;C<F;C++){var V=s.componentIds[r[l++]];O=s.components[V];var z=r[l++];O.huffmanTableDC=y[z>>4],O.huffmanTableAC=p[15&z],N.push(O)}var j=r[l++],Z=r[l++],J=r[l++],W=d(r,l,s,N,a,j,Z,J>>4,15&J);l+=W;break;case 65535:255!==r[l]&&l--;break;default:if(255===r[l-3]&&r[l-2]>=192&&r[l-2]<=254){l-=3;break}throw new e("unknown marker "+w.toString(16))}w=n()}for(this.width=s.samplesPerLine,this.height=s.scanLines,this.jfif=u,this.eof=l,this.adobe=h,this.components=[],C=0;C<s.components.length;C++){var H=f[(O=s.components[C]).quantizationId];H&&(O.quantizationTable=H),this.components.push({output:g(0,O),scaleX:O.h/s.maxH,scaleY:O.v/s.maxV,blocksPerLine:O.blocksPerLine,blocksPerColumn:O.blocksPerColumn})}this.numComponents=this.components.length},_getLinearizedBlockData:function(e,t){var r,n,o,i,s,a,l,u,h,c,f,d=this.width/e,p=this.height/t,g=0,m=this.components.length,y=e*t*m,w=new Uint8ClampedArray(y),C=new Uint32Array(e),b=4294967288;for(l=0;l<m;l++){for(n=(r=this.components[l]).scaleX*d,o=r.scaleY*p,g=l,f=r.output,i=r.blocksPerLine+1<<3,s=0;s<e;s++)u=0|s*n,C[s]=(u&b)<<3|7&u;for(a=0;a<t;a++)for(c=i*((u=0|a*o)&b)|(7&u)<<3,s=0;s<e;s++)w[g]=f[c+C[s]],g+=m}var x=this.decodeTransform;if(x)for(l=0;l<y;)for(u=0,h=0;u<m;u++,l++,h+=2)w[l]=(w[l]*x[h]>>8)+x[h+1];return w},_isColorConversionNeeded:function(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this.colorTransform:1===this.colorTransform},_convertYccToRgb:function(e){for(var t,r,n,o=0,i=e.length;o<i;o+=3)t=e[o],r=e[o+1],n=e[o+2],e[o]=t-179.456+1.402*n,e[o+1]=t+135.459-.344*r-.714*n,e[o+2]=t-226.816+1.772*r;return e},_convertYcckToRgb:function(e){for(var t,r,n,o,i=0,s=0,a=e.length;s<a;s+=4)t=e[s],r=e[s+1],n=e[s+2],o=e[s+3],e[i++]=r*(-660635669420364e-19*r+.000437130475926232*n-54080610064599e-18*t+.00048449797120281*o-.154362151871126)-122.67195406894+n*(-.000957964378445773*n+.000817076911346625*t-.00477271405408747*o+1.53380253221734)+t*(.000961250184130688*t-.00266257332283933*o+.48357088451265)+o*(-.000336197177618394*o+.484791561490776),e[i++]=107.268039397724+r*(219927104525741e-19*r-.000640992018297945*n+.000659397001245577*t+.000426105652938837*o-.176491792462875)+n*(-.000778269941513683*n+.00130872261408275*t+.000770482631801132*o-.151051492775562)+t*(.00126935368114843*t-.00265090189010898*o+.25802910206845)+o*(-.000318913117588328*o-.213742400323665),e[i++]=r*(-.000570115196973677*r-263409051004589e-19*n+.0020741088115012*t-.00288260236853442*o+.814272968359295)-20.810012546947+n*(-153496057440975e-19*n-.000132689043961446*t+.000560833691242812*o-.195152027534049)+t*(.00174418132927582*t-.00255243321439347*o+.116935020465145)+o*(-.000343531996510555*o+.24165260232407);return e},_convertYcckToCmyk:function(e){for(var t,r,n,o=0,i=e.length;o<i;o+=4)t=e[o],r=e[o+1],n=e[o+2],e[o]=434.456-t-1.402*n,e[o+1]=119.541-t+.344*r+.714*n,e[o+2]=481.816-t-1.772*r;return e},_convertCmykToRgb:function(e){for(var t,r,n,o,i=0,s=1/255,a=0,l=e.length;a<l;a+=4)t=e[a]*s,r=e[a+1]*s,n=e[a+2]*s,o=e[a+3]*s,e[i++]=255+t*(-4.387332384609988*t+54.48615194189176*r+18.82290502165302*n+212.25662451639585*o-285.2331026137004)+r*(1.7149763477362134*r-5.6096736904047315*n-17.873870861415444*o-5.497006427196366)+n*(-2.5217340131683033*n-21.248923337353073*o+17.5119270841813)-o*(21.86122147463605*o+189.48180835922747),e[i++]=255+t*(8.841041422036149*t+60.118027045597366*r+6.871425592049007*n+31.159100130055922*o-79.2970844816548)+r*(-15.310361306967817*r+17.575251261109482*n+131.35250912493976*o-190.9453302588951)+n*(4.444339102852739*n+9.8632861493405*o-24.86741582555878)-o*(20.737325471181034*o+187.80453709719578),e[i++]=255+t*(.8842522430003296*t+8.078677503112928*r+30.89978309703729*n-.23883238689178934*o-14.183576799673286)+r*(10.49593273432072*r+63.02378494754052*n+50.606957656360734*o-112.23884253719248)+n*(.03296041114873217*n+115.60384449646641*o-193.58209356861505)-o*(22.33816807309886*o+180.12613974708367);return e},getData:function(t,r,n){if(this.numComponents>4)throw new e("Unsupported color mode");var o=this._getLinearizedBlockData(t,r);if(1===this.numComponents&&n){for(var i=o.length,s=new Uint8ClampedArray(3*i),a=0,l=0;l<i;l++){var u=o[l];s[a++]=u,s[a++]=u,s[a++]=u}return s}if(3===this.numComponents&&this._isColorConversionNeeded())return this._convertYccToRgb(o);if(4===this.numComponents){if(this._isColorConversionNeeded())return n?this._convertYcckToRgb(o):this._convertYcckToCmyk(o);if(n)return this._convertCmykToRgb(o)}return o}},h}()},void 0!==(i=o())&&(n.exports=i)},80899:(e,t,r)=>{r.d(t,{Z:()=>s});var n,o,i,s={},a={get exports(){return s},set exports(e){s=e}};o=a,void 0!==(n=function(){function e(){this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=null}return e.prototype={ensureBuffer:function(e){var t=this.buffer,r=t?t.byteLength:0;if(e<r)return t;for(var n=512;n<e;)n<<=1;for(var o=new Uint8Array(n),i=0;i<r;++i)o[i]=t[i];return this.buffer=o},getByte:function(){for(var e=this.pos;this.bufferLength<=e;){if(this.eof)return null;this.readBlock()}return this.buffer[this.pos++]},getBytes:function(e){var t=this.pos;if(e){this.ensureBuffer(t+e);for(var r=t+e;!this.eof&&this.bufferLength<r;)this.readBlock();var n=this.bufferLength;r>n&&(r=n)}else{for(;!this.eof;)this.readBlock();r=this.bufferLength}return this.pos=r,this.buffer.subarray(t,r)},lookChar:function(){for(var e=this.pos;this.bufferLength<=e;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos])},getChar:function(){for(var e=this.pos;this.bufferLength<=e;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos++])},makeSubStream:function(e,t,r){for(var n=e+t;this.bufferLength<=n&&!this.eof;)this.readBlock();return new Stream(this.buffer,e,t,r)},skip:function(e){e||(e=1),this.pos+=e},reset:function(){this.pos=0}},e}(),i=function(){if(!self||!self.Uint32Array)return null;var e=new Uint32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),t=new Uint32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),r=new Uint32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),o=[new Uint32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],i=[new Uint32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5];function s(e){throw new Error(e)}function a(e){var t=0,r=e[t++],o=e[t++];-1!=r&&-1!=o||s("Invalid header in flate stream"),8!=(15&r)&&s("Unknown compression method in flate stream"),((r<<8)+o)%31!=0&&s("Bad FCHECK in flate stream"),32&o&&s("FDICT bit set in flate stream"),this.bytes=e,this.bytesPos=2,this.codeSize=0,this.codeBuf=0,n.call(this)}return a.prototype=Object.create(n.prototype),a.prototype.getBits=function(e){for(var t,r=this.codeSize,n=this.codeBuf,o=this.bytes,i=this.bytesPos;r<e;)void 0===(t=o[i++])&&s("Bad encoding in flate stream"),n|=t<<r,r+=8;return t=n&(1<<e)-1,this.codeBuf=n>>e,this.codeSize=r-=e,this.bytesPos=i,t},a.prototype.getCode=function(e){for(var t=e[0],r=e[1],n=this.codeSize,o=this.codeBuf,i=this.bytes,a=this.bytesPos;n<r;){var l;void 0===(l=i[a++])&&s("Bad encoding in flate stream"),o|=l<<n,n+=8}var u=t[o&(1<<r)-1],h=u>>16,c=65535&u;return(0==n||n<h||0==h)&&s("Bad encoding in flate stream"),this.codeBuf=o>>h,this.codeSize=n-h,this.bytesPos=a,c},a.prototype.generateHuffmanTable=function(e){for(var t=e.length,r=0,n=0;n<t;++n)e[n]>r&&(r=e[n]);for(var o=1<<r,i=new Uint32Array(o),s=1,a=0,l=2;s<=r;++s,a<<=1,l<<=1)for(var u=0;u<t;++u)if(e[u]==s){var h=0,c=a;for(n=0;n<s;++n)h=h<<1|1&c,c>>=1;for(n=h;n<o;n+=l)i[n]=s<<16|u;++a}return[i,r]},a.prototype.readBlock=function(){function n(e,t,r,n,o){for(var i=e.getBits(r)+n;i-- >0;)t[p++]=o}var a=this.getBits(3);if(1&a&&(this.eof=!0),0!=(a>>=1)){var l,u;if(1==a)l=o,u=i;else if(2==a){for(var h=this.getBits(5)+257,c=this.getBits(5)+1,f=this.getBits(4)+4,d=Array(e.length),p=0;p<f;)d[e[p++]]=this.getBits(3);for(var g=this.generateHuffmanTable(d),m=0,y=(p=0,h+c),w=new Array(y);p<y;){var C=this.getCode(g);16==C?n(this,w,2,3,m):17==C?n(this,w,3,3,m=0):18==C?n(this,w,7,11,m=0):w[p++]=m=C}l=this.generateHuffmanTable(w.slice(0,h)),u=this.generateHuffmanTable(w.slice(h,y))}else s("Unknown block type in flate stream");for(var b=(R=this.buffer)?R.length:0,x=this.bufferLength;;){var k=this.getCode(l);if(k<256)x+1>=b&&(b=(R=this.ensureBuffer(x+1)).length),R[x++]=k;else{if(256==k)return void(this.bufferLength=x);var v=(k=t[k-=257])>>16;v>0&&(v=this.getBits(v)),m=(65535&k)+v,k=this.getCode(u),(v=(k=r[k])>>16)>0&&(v=this.getBits(v));var T=(65535&k)+v;x+m>=b&&(b=(R=this.ensureBuffer(x+m)).length);for(var S=0;S<m;++S,++x)R[x]=R[x-T]}}}else{var A,I=this.bytes,P=this.bytesPos;void 0===(A=I[P++])&&s("Bad block header in flate stream");var M=A;void 0===(A=I[P++])&&s("Bad block header in flate stream"),M|=A<<8,void 0===(A=I[P++])&&s("Bad block header in flate stream");var E=A;void 0===(A=I[P++])&&s("Bad block header in flate stream"),(E|=A<<8)!=(65535&~M)&&s("Bad uncompressed block length in flate stream"),this.codeBuf=0,this.codeSize=0;var D=this.bufferLength,R=this.ensureBuffer(D+M),L=D+M;this.bufferLength=L;for(var _=D;_<L;++_){if(void 0===(A=I[P++])){this.eof=!0;break}R[_]=A}this.bytesPos=P}},a}())&&(o.exports=i)},3892:(e,t,r)=>{function n(e){return"h"in e&&"s"in e&&"v"in e}function o(e){return"l"in e&&"a"in e&&"b"in e}function i(e){return"l"in e&&"c"in e&&"h"in e}r.d(t,{Y3:()=>g,_Y:()=>p,sJ:()=>m,xr:()=>d});const s=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],a=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function l(e,t){const r=[];let n,o;if(e[0].length!==t.length)throw new Error("dimensions do not match");const i=e.length,s=e[0].length;let a=0;for(n=0;n<i;n++){for(a=0,o=0;o<s;o++)a+=e[n][o]*t[o];r.push(a)}return r}function u(e){const t=[e.r/255,e.g/255,e.b/255].map((e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4)),r=l(s,t);return{x:100*r[0],y:100*r[1],z:100*r[2]}}function h(e){const t=l(a,[e.x/100,e.y/100,e.z/100]).map((e=>{const t=e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055;return Math.min(1,Math.max(t,0))}));return{r:Math.round(255*t[0]),g:Math.round(255*t[1]),b:Math.round(255*t[2])}}function c(e){const t=[e.x/95.047,e.y/100,e.z/108.883].map((e=>e>(6/29)**3?e**(1/3):1/3*(29/6)**2*e+4/29));return{l:116*t[1]-16,a:500*(t[0]-t[1]),b:200*(t[1]-t[2])}}function f(e){const t=e.l,r=[(t+16)/116+e.a/500,(t+16)/116,(t+16)/116-e.b/200].map((e=>e>6/29?e**3:3*(6/29)**2*(e-4/29)));return{x:95.047*r[0],y:100*r[1],z:108.883*r[2]}}function d(e){return"r"in(t=e)&&"g"in t&&"b"in t?e:i(e)?function(e){return h(f(function(e){const t=e.l,r=e.c,n=e.h;return{l:t,a:r*Math.cos(n),b:r*Math.sin(n)}}(e)))}(e):o(e)?function(e){return h(f(e))}(e):function(e){return"x"in e&&"y"in e&&"z"in e}(e)?h(e):n(e)?function(e){const t=(e.h+360)%360/60,r=e.s/100,n=e.v/100*255,o=n*r,i=o*(1-Math.abs(t%2-1));let s;switch(Math.floor(t)){case 0:s={r:o,g:i,b:0};break;case 1:s={r:i,g:o,b:0};break;case 2:s={r:0,g:o,b:i};break;case 3:s={r:0,g:i,b:o};break;case 4:s={r:i,g:0,b:o};break;case 5:case 6:s={r:o,g:0,b:i};break;default:s={r:0,g:0,b:0}}return s.r=Math.round(s.r+n-o),s.g=Math.round(s.g+n-o),s.b=Math.round(s.b+n-o),s}(e):e;var t}function p(e){return n(e)?e:function(e){const t=e.r,r=e.g,n=e.b,o=Math.max(t,r,n),i=o-Math.min(t,r,n);let s=o,a=0===i?0:o===t?(r-n)/i%6:o===r?(n-t)/i+2:(t-r)/i+4,l=0===i?0:i/s;return a<0&&(a+=6),a*=60,l*=100,s*=100/255,{h:a,s:l,v:s}}(d(e))}function g(e){return o(e)?e:function(e){return c(u(e))}(d(e))}function m(e){return i(e)?e:function(e){return function(e){const t=e.l,r=e.a,n=e.b,o=Math.sqrt(r*r+n*n);let i=Math.atan2(n,r);return i=i>0?i:i+2*Math.PI,{l:t,c:o,h:i}}(c(u(e)))}(d(e))}},5847:(e,t,r)=>{r.d(t,{Z:()=>g});var n=r(43697),o=r(20102),i=r(96674),s=r(22974),a=r(92604),l=r(5600),u=r(90578),h=r(52011);class c{constructor(e=null,t=null,r=null){this.minValue=e,this.maxValue=t,this.noDataValue=r}}var f,d=r(81578);let p=f=class extends i.wq{static createEmptyBand(e,t){return new(f.getPixelArrayConstructor(e))(t)}static getPixelArrayConstructor(e){let t;switch(e){case"u1":case"u2":case"u4":case"u8":t=Uint8Array;break;case"u16":t=Uint16Array;break;case"u32":t=Uint32Array;break;case"s8":t=Int8Array;break;case"s16":t=Int16Array;break;case"s32":t=Int32Array;break;case"f32":case"c64":case"c128":case"unknown":t=Float32Array;break;case"f64":t=Float64Array}return t}constructor(e){super(e),this.width=null,this.height=null,this.pixelType="f32",this.validPixelCount=null,this.mask=null,this.maskIsAlpha=!1,this.premultiplyAlpha=!1,this.statistics=null,this.depthCount=1}castPixelType(e){if(!e)return"f32";let t=e.toLowerCase();return["u1","u2","u4"].includes(t)?t="u8":["unknown","u8","s8","u16","s16","u32","s32","f32","f64"].includes(t)||(t="f32"),t}getPlaneCount(){return this.pixels?.length}addData(e){if(!e.pixels||e.pixels.length!==this.width*this.height)throw new o.Z("pixelblock:invalid-or-missing-pixels","add data requires valid pixels array that has same length defined by pixel block width * height");this.pixels||(this.pixels=[]),this.statistics||(this.statistics=[]),this.pixels.push(e.pixels),this.statistics.push(e.statistics??new c)}getAsRGBA(){const e=new ArrayBuffer(this.width*this.height*4);switch(this.pixelType){case"s8":case"s16":case"u16":case"s32":case"u32":case"f32":case"f64":this._fillFromNon8Bit(e);break;default:this._fillFrom8Bit(e)}return new Uint8ClampedArray(e)}getAsRGBAFloat(){const e=new Float32Array(this.width*this.height*4);return this._fillFrom32Bit(e),e}updateStatistics(){if(!this.pixels)return;this.statistics=this.pixels.map((e=>this._calculateBandStatistics(e,this.mask)));const e=this.mask;let t=0;if(null!=e)for(let r=0;r<e.length;r++)e[r]&&t++;else t=this.width*this.height;this.validPixelCount=t}clamp(e){if(!e||"f64"===e||"f32"===e||!this.pixels)return;const[t,r]=(0,d.r)(e),n=this.pixels,o=this.width*this.height,i=n.length;let s,a,l;const u=[];for(let h=0;h<i;h++){l=f.createEmptyBand(e,o),s=n[h];for(let e=0;e<o;e++)a=s[e],l[e]=a>r?r:a<t?t:a;u.push(l)}this.pixels=u,this.pixelType=e}extractBands(e){const{pixels:t,statistics:r}=this;if(null==e||0===e.length||!t||0===t.length)return this;const n=t.length,o=e.some((e=>e>=t.length)),i=n===e.length&&!e.some(((e,t)=>e!==t));return o||i?this:new f({pixelType:this.pixelType,width:this.width,height:this.height,mask:this.mask,validPixelCount:this.validPixelCount,maskIsAlpha:this.maskIsAlpha,pixels:e.map((e=>t[e])),statistics:r&&e.map((e=>r[e]))})}clone(){const e=new f({width:this.width,height:this.height,pixelType:this.pixelType,maskIsAlpha:this.maskIsAlpha,validPixelCount:this.validPixelCount});let t;null!=this.mask&&(this.mask instanceof Uint8Array?e.mask=new Uint8Array(this.mask):e.mask=this.mask.slice(0));const r=f.getPixelArrayConstructor(this.pixelType);if(this.pixels&&this.pixels.length>0){e.pixels=[];const n=!!this.pixels[0].slice;for(t=0;t<this.pixels.length;t++)e.pixels[t]=n?this.pixels[t].slice(0,this.pixels[t].length):new r(this.pixels[t])}if(this.statistics)for(e.statistics=[],t=0;t<this.statistics.length;t++)e.statistics[t]=(0,s.d9)(this.statistics[t]);return e.premultiplyAlpha=this.premultiplyAlpha,e}_fillFrom8Bit(e){const{mask:t,maskIsAlpha:r,premultiplyAlpha:n,pixels:o}=this;if(!e||!o||!o.length)return void a.Z.getLogger(this.declaredClass).error("getAsRGBA()","Unable to convert to RGBA. The input pixel block is empty.");let i,s,l,u;i=s=l=o[0],o.length>=3?(s=o[1],l=o[2]):2===o.length&&(s=o[1]);const h=new Uint32Array(e),c=this.width*this.height;if(i.length===c)if(null!=t&&t.length===c)if(r)for(u=0;u<c;u++){const e=t[u];if(e){const t=e/255;h[u]=n?e<<24|l[u]*t<<16|s[u]*t<<8|i[u]*t:e<<24|l[u]<<16|s[u]<<8|i[u]}}else for(u=0;u<c;u++)t[u]&&(h[u]=255<<24|l[u]<<16|s[u]<<8|i[u]);else for(u=0;u<c;u++)h[u]=255<<24|l[u]<<16|s[u]<<8|i[u];else a.Z.getLogger(this.declaredClass).error("getAsRGBA()","Unable to convert to RGBA. The pixelblock is invalid.")}_fillFromNon8Bit(e){const{pixels:t,mask:r,statistics:n}=this;if(!e||!t||!t.length)return void a.Z.getLogger(this.declaredClass).error("getAsRGBA()","Unable to convert to RGBA. The input pixel block is empty.");const o=this.pixelType;let i=1,s=0,l=1;if(n&&n.length>0){for(const e of n)if(null!=e.minValue&&(s=Math.min(s,e.minValue)),null!=e.maxValue&&null!=e.minValue){const t=e.maxValue-e.minValue;l=Math.max(l,t)}i=255/l}else{let e=255;"s8"===o?(s=-128,e=127):"u16"===o?e=65535:"s16"===o?(s=-32768,e=32767):"u32"===o?e=4294967295:"s32"===o?(s=-2147483648,e=2147483647):"f32"===o?(s=-34e38,e=34e38):"f64"===o&&(s=-Number.MAX_VALUE,e=Number.MAX_VALUE),i=255/(e-s)}const u=new Uint32Array(e),h=this.width*this.height;let c,f,d,p,g;if(c=f=d=t[0],c.length!==h)return a.Z.getLogger(this.declaredClass).error("getAsRGBA()","Unable to convert to RGBA. The pixelblock is invalid.");if(t.length>=2)if(f=t[1],t.length>=3&&(d=t[2]),null!=r&&r.length===h)for(p=0;p<h;p++)r[p]&&(u[p]=255<<24|(d[p]-s)*i<<16|(f[p]-s)*i<<8|(c[p]-s)*i);else for(p=0;p<h;p++)u[p]=255<<24|(d[p]-s)*i<<16|(f[p]-s)*i<<8|(c[p]-s)*i;else if(null!=r&&r.length===h)for(p=0;p<h;p++)g=(c[p]-s)*i,r[p]&&(u[p]=255<<24|g<<16|g<<8|g);else for(p=0;p<h;p++)g=(c[p]-s)*i,u[p]=255<<24|g<<16|g<<8|g}_fillFrom32Bit(e){const{pixels:t,mask:r}=this;if(!e||!t||!t.length)return a.Z.getLogger(this.declaredClass).error("getAsRGBAFloat()","Unable to convert to RGBA. The input pixel block is empty.");let n,o,i,s;n=o=i=t[0],t.length>=3?(o=t[1],i=t[2]):2===t.length&&(o=t[1]);const l=this.width*this.height;if(n.length!==l)return a.Z.getLogger(this.declaredClass).error("getAsRGBAFloat()","Unable to convert to RGBA. The pixelblock is invalid.");let u=0;if(null!=r&&r.length===l)for(s=0;s<l;s++)e[u++]=n[s],e[u++]=o[s],e[u++]=i[s],e[u++]=1&r[s];else for(s=0;s<l;s++)e[u++]=n[s],e[u++]=o[s],e[u++]=i[s],e[u++]=1}_calculateBandStatistics(e,t){let r=1/0,n=-1/0;const o=e.length;let i,s=0;if(null!=t)for(i=0;i<o;i++)t[i]&&(s=e[i],r=s<r?s:r,n=s>n?s:n);else for(i=0;i<o;i++)s=e[i],r=s<r?s:r,n=s>n?s:n;return new c(r,n)}};(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"width",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"height",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"pixelType",void 0),(0,n._)([(0,u.p)("pixelType")],p.prototype,"castPixelType",null),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"validPixelCount",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"mask",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"maskIsAlpha",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"pixels",void 0),(0,n._)([(0,l.Cb)()],p.prototype,"premultiplyAlpha",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"statistics",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"depthCount",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"noDataValues",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"bandMasks",void 0),p=f=(0,n._)([(0,h.j)("esri.layers.support.PixelBlock")],p);const g=p},48526:(e,t,r)=>{r.d(t,{Z:()=>d});var n,o=r(43697),i=r(96674),s=r(22974),a=r(5600),l=(r(75215),r(52011)),u=r(6570),h=r(82971),c=r(36679);let f=n=class extends i.wq{constructor(e){super(e),this.attributeTable=null,this.bandCount=null,this.colormap=null,this.extent=null,this.format=void 0,this.height=null,this.width=null,this.histograms=null,this.keyProperties={},this.multidimensionalInfo=null,this.noDataValue=null,this.pixelSize=null,this.pixelType=null,this.isPseudoSpatialReference=!1,this.spatialReference=null,this.statistics=null,this.storageInfo=null,this.transform=null}get dataType(){const e=this.keyProperties?.DataType?.toLowerCase()??"generic";return"stdtime"===e?"standard-time":e}get nativeExtent(){return this._get("nativeExtent")||this.extent}set nativeExtent(e){e&&this._set("nativeExtent",e)}get nativePixelSize(){if(null==this.transform||!this.transform.affectsPixelSize)return this.pixelSize;const e=this.nativeExtent;return{x:e.width/this.width,y:e.height/this.height}}get hasMultidimensionalTranspose(){return!!this.storageInfo?.transposeInfo}clone(){return new n({attributeTable:(0,s.d9)(this.attributeTable),bandCount:this.bandCount,colormap:(0,s.d9)(this.colormap),extent:(0,s.d9)(this.extent),nativePixelSize:(0,s.d9)(this.nativePixelSize),format:this.format,height:this.height,width:this.width,histograms:(0,s.d9)(this.histograms),keyProperties:(0,s.d9)(this.keyProperties),multidimensionalInfo:(0,s.d9)(this.multidimensionalInfo),noDataValue:this.noDataValue,pixelSize:(0,s.d9)(this.pixelSize),pixelType:this.pixelType,isPseudoSpatialReference:this.isPseudoSpatialReference,spatialReference:(0,s.d9)(this.spatialReference),statistics:(0,s.d9)(this.statistics),storageInfo:(0,s.d9)(this.storageInfo),transform:(0,s.d9)(this.transform)})}};(0,o._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"attributeTable",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"bandCount",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"colormap",void 0),(0,o._)([(0,a.Cb)({type:String,readOnly:!0})],f.prototype,"dataType",null),(0,o._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],f.prototype,"extent",void 0),(0,o._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],f.prototype,"nativeExtent",null),(0,o._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"nativePixelSize",null),(0,o._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"format",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"height",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"width",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"hasMultidimensionalTranspose",null),(0,o._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"histograms",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"keyProperties",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"multidimensionalInfo",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"noDataValue",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"pixelSize",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"pixelType",void 0),(0,o._)([(0,a.Cb)()],f.prototype,"isPseudoSpatialReference",void 0),(0,o._)([(0,a.Cb)({type:h.Z,json:{write:!0}})],f.prototype,"spatialReference",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"statistics",void 0),(0,o._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],f.prototype,"storageInfo",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"transform",void 0),f=n=(0,o._)([(0,l.j)("esri.layers.support.RasterInfo")],f);const d=f},36679:(e,t,r)=>{r.d(t,{Z:()=>c});var n,o=r(43697),i=r(96674),s=r(22974),a=r(5600),l=(r(75215),r(52011)),u=r(94139);let h=n=class extends i.wq{constructor(){super(...arguments),this.blockWidth=void 0,this.blockHeight=void 0,this.compression=null,this.origin=null,this.firstPyramidLevel=null,this.maximumPyramidLevel=null,this.pyramidScalingFactor=2,this.pyramidBlockWidth=null,this.pyramidBlockHeight=null,this.isVirtualTileInfo=!1,this.tileInfo=null,this.transposeInfo=null,this.blockBoundary=null}clone(){return new n({blockWidth:this.blockWidth,blockHeight:this.blockHeight,compression:this.compression,origin:(0,s.d9)(this.origin),firstPyramidLevel:this.firstPyramidLevel,maximumPyramidLevel:this.maximumPyramidLevel,pyramidResolutions:(0,s.d9)(this.pyramidResolutions),pyramidScalingFactor:this.pyramidScalingFactor,pyramidBlockWidth:this.pyramidBlockWidth,pyramidBlockHeight:this.pyramidBlockHeight,isVirtualTileInfo:this.isVirtualTileInfo,tileInfo:(0,s.d9)(this.tileInfo),transposeInfo:(0,s.d9)(this.transposeInfo),blockBoundary:(0,s.d9)(this.blockBoundary)})}};(0,o._)([(0,a.Cb)({type:Number,json:{write:!0}})],h.prototype,"blockWidth",void 0),(0,o._)([(0,a.Cb)({type:Number,json:{write:!0}})],h.prototype,"blockHeight",void 0),(0,o._)([(0,a.Cb)({type:String,json:{write:!0}})],h.prototype,"compression",void 0),(0,o._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],h.prototype,"origin",void 0),(0,o._)([(0,a.Cb)({type:Number,json:{write:!0}})],h.prototype,"firstPyramidLevel",void 0),(0,o._)([(0,a.Cb)({type:Number,json:{write:!0}})],h.prototype,"maximumPyramidLevel",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],h.prototype,"pyramidResolutions",void 0),(0,o._)([(0,a.Cb)({type:Number,json:{write:!0}})],h.prototype,"pyramidScalingFactor",void 0),(0,o._)([(0,a.Cb)({type:Number,json:{write:!0}})],h.prototype,"pyramidBlockWidth",void 0),(0,o._)([(0,a.Cb)({type:Number,json:{write:!0}})],h.prototype,"pyramidBlockHeight",void 0),(0,o._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"isVirtualTileInfo",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],h.prototype,"tileInfo",void 0),(0,o._)([(0,a.Cb)()],h.prototype,"transposeInfo",void 0),(0,o._)([(0,a.Cb)()],h.prototype,"blockBoundary",void 0),h=n=(0,o._)([(0,l.j)("esri.layers.support.RasterStorageInfo")],h);const c=h},20095:(e,t,r)=>{function n(e,t){let r=0,n="",o=0,i=0;const s=e.length;for(;r<s;)i=e[r++],o=i>>4,o<8?o=1:15===o?(o=4,i=(7&i)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++]):14===o?(o=3,i=(15&i)<<12|(63&e[r++])<<6|63&e[r++]):(o=2,i=(31&i)<<6|63&e[r++]),(0!==i||t)&&(n+=String.fromCharCode(i));return n}r.d(t,{f:()=>n})},72955:(e,t,r)=>{r.d(t,{Jx:()=>c,zD:()=>a});var n=r(99880);const o=[{pixelType:"S8",size:1,ctor:Int8Array,range:[-128,127]},{pixelType:"U8",size:1,ctor:Uint8Array,range:[0,255]},{pixelType:"S16",size:2,ctor:Int16Array,range:[-32768,32767]},{pixelType:"U16",size:2,ctor:Uint16Array,range:[0,65536]},{pixelType:"S32",size:4,ctor:Int32Array,range:[-2147483648,2147483647]},{pixelType:"U32",size:4,ctor:Uint32Array,range:[0,4294967296]},{pixelType:"F32",size:4,ctor:Float32Array,range:[-34027999387901484e22,34027999387901484e22]},{pixelType:"F64",size:8,ctor:Float64Array,range:[-17976931348623157e292,17976931348623157e292]}];let i=null,s=null;function a(){return i||(i=r.e(6233).then(r.bind(r,26233)).then((e=>e.l)).then((({default:e})=>e({locateFile:e=>(0,n.V)(`esri/layers/support/rasterFormats/${e}`)}))).then((e=>{(function(e){const{_malloc:t,_free:r,_lerc_getBlobInfo:n,_lerc_getDataRanges:i,_lerc_decode_4D:s,asm:a}=e;let h;const c=Object.values(a).find((t=>t&&"buffer"in t&&t.buffer===e.HEAPU8.buffer)),f=e=>{const r=e.map((e=>function(e){return 16+(e>>3<<3)}(e))),n=r.reduce(((e,t)=>e+t)),o=t(n);h=new Uint8Array(c.buffer);let i=r[0];r[0]=o;for(let e=1;e<r.length;e++){const t=r[e];r[e]=r[e-1]+i,i=t}return r};l.getBlobInfo=e=>{const t=new Uint8Array(48),o=new Uint8Array(24),[s,a,l]=f([e.length,t.length,o.length]);h.set(e,s),h.set(t,a),h.set(o,l);let d=n(s,e.length,a,l,12,3);if(d)throw r(s),new Error(`lerc-getBlobInfo: error code is ${d}`);h=new Uint8Array(c.buffer),u(h,a,t),u(h,l,o);const p=new Uint32Array(t.buffer),g=new Float64Array(o.buffer),[m,y,,w,C,b,x,k,v,T,S]=p,A={version:m,depthCount:T,width:w,height:C,validPixelCount:x,bandCount:b,blobSize:k,maskCount:v,dataType:y,minValue:g[0],maxValue:g[1],maxZerror:g[2],statistics:[],bandCountWithNoData:S};if(S)return A;if(1===T&&1===b)return r(s),A.statistics.push({minValue:g[0],maxValue:g[1]}),A;const I=T*b*8,P=new Uint8Array(I),M=new Uint8Array(I);let E=s,D=0,R=0,L=!1;if(h.byteLength<s+2*I?(r(s),L=!0,[E,D,R]=f([e.length,I,I]),h.set(e,E)):[D,R]=f([I,I]),h.set(P,D),h.set(M,R),d=i(E,e.length,T,b,D,R),d)throw r(E),L||r(D),new Error(`lerc-getDataRanges: error code is ${d}`);h=new Uint8Array(c.buffer),u(h,D,P),u(h,R,M);const _=new Float64Array(P.buffer),B=new Float64Array(M.buffer),U=A.statistics;for(let e=0;e<b;e++)if(T>1){const t=_.slice(e*T,(e+1)*T),r=B.slice(e*T,(e+1)*T),n=Math.min.apply(null,t),o=Math.max.apply(null,r);U.push({minValue:n,maxValue:o,depthStats:{minValues:t,maxValues:r}})}else U.push({minValue:_[e],maxValue:B[e]});return r(E),L||r(D),A},l.decode=(e,t)=>{const{maskCount:n,depthCount:i,bandCount:a,width:l,height:d,dataType:p,bandCountWithNoData:g}=t,m=o[p],y=l*d,w=new Uint8Array(y*a),C=y*i*a*m.size,b=new Uint8Array(C),x=new Uint8Array(a),k=new Uint8Array(8*a),[v,T,S,A,I]=f([e.length,w.length,b.length,x.length,k.length]);h.set(e,v),h.set(w,T),h.set(b,S),h.set(x,A),h.set(k,I);const P=s(v,e.length,n,T,i,l,d,a,p,S,A,I);if(P)throw r(v),new Error(`lerc-decode: error code is ${P}`);h=new Uint8Array(c.buffer),u(h,S,b),u(h,T,w);let M=null;if(g){u(h,A,x),u(h,I,k),M=[];const e=new Float64Array(k.buffer);for(let t=0;t<x.length;t++)M.push(x[t]?e[t]:null)}return r(v),{data:b,maskData:w,noDataValues:M}}})(e),s=!0})),i)}const l={getBlobInfo:null,decode:null};function u(e,t,r){r.set(e.slice(t,t+r.length))}function h(e,t,r,n,o){if(r<2)return e;const i=new n(t*r);if(o)for(let n=0,o=0;n<t;n++)for(let s=0,a=n;s<r;s++,a+=t)i[a]=e[o++];else for(let n=0,o=0;n<t;n++)for(let s=0,a=n;s<r;s++,a+=t)i[o++]=e[a];return i}function c(e,t={}){const r=t.inputOffset??0,n=e instanceof Uint8Array?e.subarray(r):new Uint8Array(e,r),i=l.getBlobInfo(n),{data:s,maskData:a,noDataValues:u}=l.decode(n,i),{width:c,height:f,bandCount:d,depthCount:p,dataType:g,maskCount:m,statistics:y}=i,w=o[g],C=new w.ctor(s.buffer),b=[],x=[],k=c*f,v=k*p;for(let e=0;e<d;e++){const r=C.subarray(e*v,(e+1)*v);if(t.returnInterleaved)b.push(r);else{const e=h(r,k,p,w.ctor,!0);b.push(e)}x.push(a.subarray(e*v,(e+1)*v))}const T=0===m?null:1===m?x[0]:new Uint8Array(k);if(m>1){T.set(x[0]);for(let e=1;e<x.length;e++){const t=x[e];for(let e=0;e<k;e++)T[e]=T[e]&t[e]}}const{noDataValue:S}=t,A=null!=S&&w.range[0]<=S&&w.range[1]>=S;if(m>0&&A)for(let e=0;e<d;e++){const t=b[e],r=x[e]||T;for(let e=0;e<k;e++)0===r[e]&&(t[e]=S)}const I=m===d&&d>1?x:null,{pixelType:P}=w;return{width:c,height:f,bandCount:d,pixelType:P,depthCount:p,statistics:y,pixels:b,mask:T,bandMasks:I,noDataValues:u}}},88781:(e,t,r)=>{function n(){const e=[];for(let t=0;t<=257;t++)e[t]=[t];return e}function o(e,t){for(let r=0;r<t.length;r++)e.push(t[r])}r.d(t,{J:()=>s});const i=new Set;function s(e,t,r,s=!0){const a=function(e,t,r,n=!0){if(t%4!=0||r%4!=0){const o=new ArrayBuffer(4*Math.ceil(r/4)),i=new Uint8Array(o),s=new Uint8Array(e,t,r);if(n)for(let e=0;e<i.length;e+=4)i[e]=s[e+3],i[e+1]=s[e+2],i[e+2]=s[e+1],i[e+3]=s[e];else i.set(s);return new Uint32Array(i.buffer)}if(n){const n=new Uint8Array(e,t,r),o=new Uint8Array(n.length);for(let e=0;e<o.length;e+=4)o[e]=n[e+3],o[e+1]=n[e+2],o[e+2]=n[e+1],o[e+3]=n[e];return new Uint32Array(o.buffer)}return new Uint32Array(e,t,r/4)}(e,t,r,s);let l=9,u=n(),h=32,c=u.length,f=[],d=1,p=a[0],g=0;const m=a.length,y=8*(4*m-r),w=[];for(;null!=p;){if(h>=l)h-=l,g=p>>>32-l,p<<=l;else{g=p>>>32-h,p=a[d++];const e=l-h;h=32-e,g=(g<<e)+(p>>>h),p<<=e}if(257===g)break;if(256===g){l=9,u=n(),c=u.length,f=[];continue}const e=u[g];if(null==e){if(g>u.length)throw new Error("data integrity issue: code does not exist on code page");f.push(f[0]),u[c++]=f.slice(),o(w,f)}else o(w,e),f.push(e[0]),f.length>1&&(u[c++]=f.slice()),f=e.slice();if(i.has(c)&&l++,0===h&&(p=a[d++],h=32),d>m||d===m&&h<=y)break}return new Uint8Array(w)}i.add(511),i.add(1023),i.add(2047),i.add(4095),i.add(8191)},75993:(e,t,r)=>{r.d(t,{J:()=>R,y:()=>D});var n=r(20102),o=r(70586),i=r(5847),s=r(95330),a=r(80899);class l{constructor(e){this._canvas=null,this._ctx=null,e&&(this._canvas=e.canvas,this._ctx=e.ctx||e.canvas&&e.canvas.getContext("2d"))}decode(e,t,r){if(!e||e.byteLength<10)throw new n.Z("imagecanvasdecoder: decode","required a valid encoded data as input.");let{width:o=0,height:i=0,format:a}=t;const{applyJpegMask:u}=t;if(u&&(!o||!i))throw new n.Z("imagecanvasdecoder: decode","image width and height are needed to apply jpeg mask directly to canvas");return new Promise(((n,h)=>{let c=null;"jpg"===a&&u&&(c=l._getMask(e,{width:o,height:i}));const f=new Blob([new Uint8Array(e)],{type:"image/"+a=="jpg"?"jpeg":a}),d=URL.createObjectURL(f),p=new Image;let g;p.src=d,p.onload=()=>{if(URL.revokeObjectURL(d),(0,s.Hc)(r))return void h((0,s.zE)());o=p.width,i=p.height,this._canvas&&this._ctx?(this._canvas.width===o&&this._canvas.height===i||(this._canvas.width=o,this._canvas.height=i),this._ctx.clearRect(0,0,o,i)):(this._canvas=document.createElement("canvas"),this._canvas.width=o,this._canvas.height=i,this._ctx=this._canvas.getContext("2d")),this._ctx.drawImage(p,0,0);const e=this._ctx.getImageData(0,0,o,i);let a;if(g=e.data,t.renderOnCanvas){if(c)for(a=0;a<c.length;a++)c[a]?g[4*a+3]=255:g[4*a+3]=0;return this._ctx.putImageData(e,0,0),void n(null)}const l=o*i,u=new Uint8Array(l),f=new Uint8Array(l),m=new Uint8Array(l);if(c)for(a=0;a<l;a++)u[a]=g[4*a],f[a]=g[4*a+1],m[a]=g[4*a+2];else for(c=new Uint8Array(l),a=0;a<l;a++)u[a]=g[4*a],f[a]=g[4*a+1],m[a]=g[4*a+2],c[a]=g[4*a+3];n({width:o,height:i,pixels:[u,f,m],mask:c,pixelType:"u8"})},p.onerror=()=>{URL.revokeObjectURL(d),h("cannot load image")}}))}static _getMask(e,t){let r=null;try{const n=new Uint8Array(e),o=Math.ceil(n.length/2);let i=0;const s=n.length-2;for(i=o;i<s&&(255!==n[i]||217!==n[i+1]);i++);if(i+=2,i<n.length-1){const e=new a.Z(n.subarray(i)).getBytes();r=new Uint8Array(t.width*t.height);let o=0;for(let t=0;t<e.length;t++)for(let n=7;n>=0;n--)r[o++]=e[t]>>n&1}}catch(e){}return r}}var u=r(97575);class h{static decode(e,t=!1){const r=new Uint8Array(e),n=new u.J;n.parse(r);const{width:o,height:i,numComponents:s,eof:l}=n,h=n.getData(o,i,!0),c=o*i;let f,d=null,p=0,g=0,m=0;if(!t&&l<r.length-1)try{const e=new a.Z(r.subarray(l)).getBytes();d=new Uint8Array(c);let t=0;for(p=0;p<e.length;p++)for(m=7;m>=0;m--)d[t++]=e[p]>>m&1}catch{}if(1===s&&h.length===o*i){const e=new Uint8Array(h.buffer);f=[e,e,e]}else{for(f=[],p=0;p<3;p++)f.push(new Uint8Array(c));for(m=0,g=0;g<c;g++)for(p=0;p<3;p++)f[p][g]=h[m++]}return{width:o,height:i,pixels:f,mask:d}}}var c=r(72955),f=r(88781),d=r(81578);const p=(e,t)=>{const r=t.width*t.height,n=t.pixelType;return Math.floor(e.byteLength/(r*g(n)))},g=e=>{let t=1;switch(e){case Uint8Array:case Int8Array:t=1;break;case Uint16Array:case Int16Array:t=2;break;case Uint32Array:case Int32Array:case Float32Array:t=4;break;case Float64Array:t=8}return t};class m{static decode(e,t){const r=t.pixelType,n=[],o=t.width*t.height,i=p(e,t),{bandIds:s,format:a}=t,l=s&&s.length||p(e,t),u=e.byteLength-e.byteLength%(o*g(r)),h=new r(e,0,o*i);let c,f,d,m,y=null;if("bip"===a)for(c=0;c<l;c++){for(d=new r(o),m=s?s[c]:c,f=0;f<o;f++)d[f]=h[f*i+m];n.push(d)}else if("bsq"===a)for(c=0;c<l;c++)m=s?s[c]:c,n.push(h.subarray(m*o,(m+1)*o));return u<e.byteLength-1&&(y=((e,t)=>{if(8*e.byteLength<t)return null;const r=new Uint8Array(e,0,Math.ceil(t/8)),n=new Uint8Array(t);let o=0,i=0,s=0,a=0;for(s=0;s<r.length-1;s++)for(i=r[s],a=7;a>=0;a--)n[o++]=i>>a&1;for(a=7;o<t-1;)i=r[r.length-1],n[o++]=i>>a&1,a--;return n})(e.slice(u),o)),{pixels:n,mask:y}}}var y=r(94793),w=r(48279),C=function(e){var t,r,n;function o(e){var t,r,n,o,i,s,a,l,u,h,c,f,d;for(this.data=e,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},i=null;;){switch(t=this.readUInt32(),l=function(){var e,t;for(t=[],e=0;e<4;++e)t.push(String.fromCharCode(this.data[this.pos++]));return t}.call(this).join(""),l){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(t);break;case"fcTL":i&&this.animation.frames.push(i),this.pos+=4,i={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},o=this.readUInt16(),n=this.readUInt16()||100,i.delay=1e3*o/n,i.disposeOp=this.data[this.pos++],i.blendOp=this.data[this.pos++],i.data=[];break;case"IDAT":case"fdAT":for("fdAT"===l&&(this.pos+=4,t-=4),e=(null!=i?i.data:void 0)||this.imgData,c=0;0<=t?c<t:c>t;0<=t?++c:--c)e.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(this.transparency.indexed=this.read(t),(u=255-this.transparency.indexed.length)>0)for(f=0;0<=u?f<u:f>u;0<=u?++f:--f)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(t)[0];break;case 2:this.transparency.rgb=this.read(t)}break;case"tEXt":s=(h=this.read(t)).indexOf(0),a=String.fromCharCode.apply(String,h.slice(0,s)),this.text[a]=String.fromCharCode.apply(String,h.slice(s+1));break;case"IEND":return i&&this.animation.frames.push(i),this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=4===(d=this.colorType)||6===d,r=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*r,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=t}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}return o.load=function(e,t,r){var n;return"function"==typeof t&&(r=t),(n=new XMLHttpRequest).open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){var e;return e=new o(new Uint8Array(n.response||n.mozResponseArrayBuffer)),"function"==typeof(null!=t?t.getContext:void 0)&&e.render(t),"function"==typeof r?r(e):void 0},n.send(null)},o.prototype.read=function(e){var t,r;for(r=[],t=0;0<=e?t<e:t>e;0<=e?++t:--t)r.push(this.data[this.pos++]);return r},o.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},o.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},o.prototype.decodePixels=function(e){var t,r,n,o,i,s,l,u,h,c,f,d,p,g,m,y,w,C,b,x,k,v,T;if(null==e&&(e=this.imgData),0===e.length)return new Uint8Array(0);for(e=(e=new a.Z(e)).getBytes(),y=(d=this.pixelBitlength/8)*this.width,p=new Uint8Array(y*this.height),s=e.length,m=0,g=0,r=0;g<s;){switch(e[g++]){case 0:for(o=b=0;b<y;o=b+=1)p[r++]=e[g++];break;case 1:for(o=x=0;x<y;o=x+=1)t=e[g++],i=o<d?0:p[r-d],p[r++]=(t+i)%256;break;case 2:for(o=k=0;k<y;o=k+=1)t=e[g++],n=(o-o%d)/d,w=m&&p[(m-1)*y+n*d+o%d],p[r++]=(w+t)%256;break;case 3:for(o=v=0;v<y;o=v+=1)t=e[g++],n=(o-o%d)/d,i=o<d?0:p[r-d],w=m&&p[(m-1)*y+n*d+o%d],p[r++]=(t+Math.floor((i+w)/2))%256;break;case 4:for(o=T=0;T<y;o=T+=1)t=e[g++],n=(o-o%d)/d,i=o<d?0:p[r-d],0===m?w=C=0:(w=p[(m-1)*y+n*d+o%d],C=n&&p[(m-1)*y+(n-1)*d+o%d]),l=i+w-C,u=Math.abs(l-i),c=Math.abs(l-w),f=Math.abs(l-C),h=u<=c&&u<=f?i:c<=f?w:C,p[r++]=(t+h)%256;break;default:throw new Error("Invalid filter algorithm: "+e[g-1])}m++}return p},o.prototype.decodePalette=function(){var e,t,r,n,o,i,s,a,l;for(r=this.palette,i=this.transparency.indexed||[],o=new Uint8Array((i.length||0)+r.length),n=0,r.length,e=0,t=s=0,a=r.length;s<a;t=s+=3)o[n++]=r[t],o[n++]=r[t+1],o[n++]=r[t+2],o[n++]=null!=(l=i[e++])?l:255;return o},o.prototype.copyToImageData=function(e,t){var r,n,o,i,s,a,l,u,h,c,f;if(n=this.colors,h=null,r=this.hasAlphaChannel,this.palette.length&&(h=null!=(f=this._decodedPalette)?f:this._decodedPalette=this.decodePalette(),n=4,r=!0),u=(o=e.data||e).length,s=h||t,i=a=0,1===n)for(;i<u;)l=h?4*t[i/4]:a,c=s[l++],o[i++]=c,o[i++]=c,o[i++]=c,o[i++]=r?s[l++]:this.transparency.grayscale&&this.transparency.grayscale===c?0:255,a=l;else for(;i<u;)l=h?4*t[i/4]:a,o[i++]=s[l++],o[i++]=s[l++],o[i++]=s[l++],o[i++]=r?s[l++]:this.transparency.rgb&&this.transparency.rgb[1]===s[l-3]&&this.transparency.rgb[3]===s[l-2]&&this.transparency.rgb[5]===s[l-1]?0:255,a=l},o.prototype.decode=function(){var e;return e=new Uint8Array(this.width*this.height*4),this.copyToImageData(e,this.decodePixels()),e},r=e.document&&e.document.createElement("canvas"),n=r&&r.getContext("2d"),t=function(e){var t;return n.width=e.width,n.height=e.height,n.clearRect(0,0,e.width,e.height),n.putImageData(e,0,0),(t=new Image).src=r.toDataURL(),t},o.prototype.decodeFrames=function(e){var r,n,o,i,s,a,l,u;if(this.animation){for(u=[],n=s=0,a=(l=this.animation.frames).length;s<a;n=++s)r=l[n],o=e.createImageData(r.width,r.height),i=this.decodePixels(new Uint8Array(r.data)),this.copyToImageData(o,i),r.imageData=o,u.push(r.image=t(o));return u}},o.prototype.renderFrame=function(e,t){var r,n,o;return r=(n=this.animation.frames)[t],o=n[t-1],0===t&&e.clearRect(0,0,this.width,this.height),1===(null!=o?o.disposeOp:void 0)?e.clearRect(o.xOffset,o.yOffset,o.width,o.height):2===(null!=o?o.disposeOp:void 0)&&e.putImageData(o.imageData,o.xOffset,o.yOffset),0===r.blendOp&&e.clearRect(r.xOffset,r.yOffset,r.width,r.height),e.drawImage(r.image,r.xOffset,r.yOffset)},o.prototype.animate=function(e){var t,r,n,o,i,s,a=this;return r=0,s=this.animation,o=s.numFrames,n=s.frames,i=s.numPlays,(t=function(){var s,l;if(s=r++%o,l=n[s],a.renderFrame(e,s),o>1&&r/o<i)return a.animation._timeout=setTimeout(t,l.delay)})()},o.prototype.stopAnimation=function(){var e;return clearTimeout(null!=(e=this.animation)?e._timeout:void 0)},o.prototype.render=function(e){var t,r;return e._png&&e._png.stopAnimation(),e._png=this,e.width=this.width,e.height=this.height,t=e.getContext("2d"),this.animation?(this.decodeFrames(t),this.animate(t)):(r=t.createImageData(this.width,this.height),this.copyToImageData(r,this.decodePixels()),t.putImageData(r,0,0))},o}(self);const b=new Set(["jpg","png","bmp","gif"]);async function x(e,t){if(!w.f)throw new n.Z("rasterCoded:decode","lerc decoder is not supported on big endian platform");await(0,c.zD)();const{offset:r}=t,{width:o,height:s,pixelType:a,statistics:l,depthCount:u,noDataValues:h,bandMasks:f,pixels:d,mask:p}=(0,c.Jx)(e,{inputOffset:r,returnInterleaved:t.returnInterleaved});return new i.Z({width:o,height:s,pixelType:a.toLowerCase(),pixels:d,mask:p,statistics:l,bandMasks:f,depthCount:u,noDataValues:h})}async function k(e,t){const r=await(0,y.Jx)(e,{...t,noDataValue:null});(0,o.O3)(r);const n=new i.Z({width:r.width,height:r.height,pixels:r.pixels,pixelType:r.pixelType.toLowerCase(),mask:r.mask,statistics:null});return n.updateStatistics(),n}function v(e,t){const r=t.pixelType||"u8",n=i.Z.getPixelArrayConstructor(r),o="u8"===r?e:new n(e.buffer),s=[],a=t.planes||1;if(1===a)s.push(o);else for(let r=0;r<a;r++){const i=(t.width||1)*(t.height||e.length),l=new n(i);for(let e=0;e<i;e++)l[e]=o[e*a+r];s.push(l)}const l=new i.Z({width:t.width||1,height:t.height||e.length,pixels:s,pixelType:r,statistics:null});return l.updateStatistics(),l}function T(e,t){return v(new a.Z(new Uint8Array(e)).getBytes(),t)}function S(e,t){return v((0,f.J)(e,t.offset,t.eof,!t.isInputBigEndian),t)}function A(e,t,r){const{pixelTypeCtor:n}=function(e){let t=null,r=null;switch(e?e.toLowerCase():"f32"){case"u1":case"u2":case"u4":case"u8":r=255,t=Uint8Array;break;case"u16":r=r||65535,t=Uint16Array;break;case"u32":r=r||2**32-1,t=Uint32Array;break;case"s8":r=r||-128,t=Int8Array;break;case"s16":r=r||-32768,t=Int16Array;break;case"s32":r=r||0-2**31,t=Int32Array;break;default:t=Float32Array}return{pixelTypeCtor:t,noDataValue:r}}(t.pixelType),o=(0,m.decode)(e,{width:t.width,height:t.height,pixelType:n,format:r}),s=new i.Z({width:t.width,height:t.height,pixels:o.pixels,pixelType:t.pixelType,mask:o.mask,statistics:null});return s.updateStatistics(),s}function I(e,t){const r=h.decode(e,t.hasNoZlibMask??void 0),n=new i.Z({width:r.width,height:r.height,pixels:r.pixels,pixelType:"U8",mask:r.mask,statistics:null});return n.updateStatistics(),n}function P(e,t){const r=new Uint8Array(e),n=new C(r),{width:o,height:s}=t,a=o*s,l=n.decode();let u,h=0,c=0;const f=new Uint8Array(a);for(h=0;h<a;h++)f[h]=l[4*h+3];const d=new i.Z({width:o,height:s,pixels:[],pixelType:"U8",mask:f,statistics:[]});for(h=0;h<3;h++){for(u=new Uint8Array(a),c=0;c<a;c++)u[c]=l[4*c+h];d.addData({pixels:u})}return d.updateStatistics(),d}async function M(e,t,r,n){const o=new l,s={applyJpegMask:!1,format:t,...r},a=await o.decode(e,s,n),u=new i.Z(a);return u.updateStatistics(),u}function E(e){if(null==e)throw new n.Z("rasterCodec:decode","parameter encodeddata is required.");const t=new Uint8Array(e,0,10);let r="";return 255===t[0]&&216===t[1]?r="jpg":137===t[0]&&80===t[1]&&78===t[2]&&71===t[3]?r="png":67===t[0]&&110===t[1]&&116===t[2]&&90===t[3]&&73===t[4]&&109===t[5]&&97===t[6]&&103===t[7]&&101===t[8]&&32===t[9]?r="lerc":76===t[0]&&101===t[1]&&114===t[2]&&99===t[3]&&50===t[4]&&32===t[5]?r="lerc2":73===t[0]&&73===t[1]&&42===t[2]&&0===t[3]||77===t[0]&&77===t[1]&&0===t[2]&&42===t[3]||73===t[0]&&73===t[1]&&43===t[2]&&0===t[3]||77===t[0]&&77===t[1]&&0===t[2]&&43===t[3]?r="tiff":71===t[0]&&73===t[1]&&70===t[2]?r="gif":66===t[0]&&77===t[1]?r="bmp":String.fromCharCode.apply(null,t).toLowerCase().includes("error")&&(r="error"),r}function D(e){let t=E(e);return"lerc2"===t?t="lerc":"error"===t&&(t=""),t}async function R(e,t={},r){if(null==e)throw new n.Z("rasterCodec:decode","missing encodeddata parameter.");let o=t.format&&t.format.toLowerCase();if(!("bsq"!==o&&"bip"!==o||null!=t.width&&null!=t.height))throw new n.Z("rasterCodec:decode","requires width and height in options parameter.");if("tiff"===o&&t.customOptions)return async function(e,t){const r=await(0,y.Uw)(e,t.customOptions),n=new i.Z({width:r.width,height:r.height,pixels:r.pixels,pixelType:r.pixelType.toLowerCase(),mask:r.mask,statistics:null});return n.updateStatistics(),n}(e,t);if((!o||"bsq"!==o&&"bip"!==o&&"deflate"!==o&&"lzw"!==o)&&(o=E(e)),t.useCanvas&&b.has(o))return M(e,o,t,r);const s=function(e){let t=null;switch(e){case"lerc":case"lerc2":t=x;break;case"jpg":t=I;break;case"png":t=P;break;case"bsq":case"bip":t=(t,r)=>A(t,r,e);break;case"tiff":t=k;break;case"deflate":t=T;break;case"lzw":t=S;break;case"error":t=()=>{throw new n.Z("rasterCodec:decode","input data contains error")};break;default:t=()=>{throw new n.Z("rasterCodec:decode","unsupported raster format")}}return t}(o);t.isPoint&&(null!=(t={...t}).width&&t.width++,null!=t.height&&t.height++);const a=await s(e,t);return a?("jpg"!==o&&null!=t.noDataValue&&1===a.depthCount&&(0,d.A)(a,t.noDataValue,{customFloatTolerance:t.tolerance}),t.isPoint&&function(e,t=1){if(!e)return;const{pixels:r,width:n,height:o,mask:s}=e;if(!r||0===r.length)return;const a=r.length,l=n-1,u=o-1,h=[];let c,f,d,p,g,m,y=null;const w=i.Z.getPixelArrayConstructor(e.pixelType);if(0===t){for(c=0;c<a;c++){for(g=r[c],m=new w(l*u),f=0;f<u;f++)for(p=f*n,d=0;d<l;d++)m[f*l+d]=g[p+d];h.push(m)}if(null!=s)for(y=new Uint8Array(l*u),f=0;f<u;f++)for(p=f*n,d=0;d<l;d++)y[f*l+d]=s[p+d]}else{for(c=0;c<a;c++){for(g=r[c],m=new w(l*u),f=0;f<u;f++)for(p=f*n,d=0;d<l;d++)m[f*l+d]=(g[p+d]+g[p+d+1]+g[p+n+d]+g[p+n+d+1])/4;h.push(m)}if(s)for(y=new Uint8Array(l*u),f=0;f<u;f++)for(p=f*n,d=0;d<l;d++)y[f*l+d]=Math.min.apply(null,[s[p+d],s[p+d+1],s[p+n+d],s[p+n+d+1]])}e.width=l,e.height=u,e.mask=y,e.pixels=h}(a),a):a}},94793:(e,t,r)=>{r.d(t,{Dq:()=>E,FI:()=>D,I7:()=>_,If:()=>R,Jx:()=>z,Uw:()=>V,cK:()=>O,ee:()=>L,vr:()=>F});var n=r(20095),o=r(97575),i=r(72955),s=r(88781),a=r(81578),l=r(9832),u=r(48279),h=r(80899);const c=[0,1,1,2,4,8,1,1,2,4,8,4,8,-1,-1,-1,8,8,8],f=4294967296,d=new Set([1,5,6,7,8,34712,34887]);function p(e,t){let r="unknown";return 3===e?r=64===t?"f64":"f32":1===e?1===t?r="u1":2===t?r="u2":4===t?r="u4":t<=8?r="u8":t<=16?r="u16":t<=32&&(r="u32"):2===e&&(t<=8?r="s8":t<=16?r="s16":t<=32&&(r="s32")),r}function g(e){let t=null;switch(e?e.toLowerCase():"f32"){case"u1":case"u2":case"u4":case"u8":t=Uint8Array;break;case"u16":t=Uint16Array;break;case"u32":t=Uint32Array;break;case"s8":t=Int8Array;break;case"s16":t=Int16Array;break;case"s32":t=Int32Array;break;case"f64":t=Float64Array;break;default:t=Float32Array}return t}function m(e,t){return{x:t[0]*e.x+t[1]*e.y+t[2],y:t[3]*e.x+t[4]*e.y+t[5]}}function y(e,t){return e.get(t)?.values}function w(e,t){return e.get(t)?.values}function C(e,t){return e.get(t)?.values?.[0]}function b(e,t){return e.get(t)?.values?.[0]}function x(e,t,r,n=0,o=l.Z.TIFF_TAGS,i=4){const s=8===i,a=s?B(new DataView(e,r,8),0,t):new DataView(e,r,2).getUint16(0,t),u=4+2*i,h=s?8:2,c=h+a*u;if(r+c>e.byteLength)return{success:!1,ifd:null,nextIFD:null,requiredBufferSize:c};const f=r+c+4<=e.byteLength?G(new DataView(e,r+c,8===i?8:4),0,t,8===i):null,d=r+h,p=new Map;let g,m,y,w,C,b=0,x=0;for(let r=0;r<a;r++){m=new DataView(e,d+u*r,u),y=m.getUint16(0,t),C=m.getUint16(2,t),w=l.Z.getTagName(y,o);const s=[];2===i?(b=m.getUint16(4,t),x=m.getUint16(6,t)):4===i?(b=m.getUint32(4,t),x=m.getUint32(8,t)):8===i&&(b=G(m,4,t,!0),x=G(m,12,t,!0),s.push(m.getUint32(12,t)),s.push(m.getUint32(16,t))),g={id:y,type:C,valueCount:b,valueOffset:x,valueOffsets:s,values:null},E(e,t,g,n,!1,i),p.set(w,g)}return{success:!0,ifd:p,nextIFD:f,requiredBufferSize:c}}const k=(e,t)=>(0,i.Jx)(e,{inputOffset:t}).pixels[0];function v(e,t){if(1!==t&&2!==t&&4!==t)return e;const r=new Uint8Array(e),n=8/t,o=new Uint8Array(e.byteLength*n);let i=0;const s=2**t-1;for(let e=0;e<r.length;e++){const a=r[e];for(let e=0;e<n;e++)o[i++]=a<<t*e>>>8-t&s}return o.buffer}function T(e,t,r){const n=new o.J;n.parse(e),n.colorTransform=6===r?-1:0;const i=n.getData(n.width,n.height,1!==t);return new Uint8Array(i.buffer)}function S(e){const t=new h.Z(e).getBytes(),r=new ArrayBuffer(t.length),n=new Uint8Array(r);return n.set(t),n}async function A(e,t,r,n,o){const a=u.f===t,l=b(r,"BITSPERSAMPLE"),h=b(r,"SAMPLESPERPIXEL"),c=b(r,"PHOTOMETRICINTERPRETATION"),f=p(b(r,"SAMPLEFORMAT")??1,l),d=b(r,"COMPRESSION")??1,m=g(f);let y,w,C;if(34887===d)return await(0,i.zD)(),k(e,n);if(1===d)y=e.slice(n,n+o),w=new Uint8Array(y);else if(8===d||32946===d)w=new Uint8Array(e,n,o),w=S(w),y=w.buffer;else if(6===d)w=new Uint8Array(e,n,o),w=T(w,h,c),y=w.buffer;else if(7===d){const t=r.get("JPEGTABLES").values,i=t.length-2;w=new Uint8Array(i+o-2);for(let e=0;e<i;e++)w[e]=t[e];const s=new Uint8Array(e,n+2,o-2);for(let e=0;e<s.length;e++)w[i+e]=s[e];w=T(w,h,c),y=w.buffer}else{if(5!==d)throw new Error("tiff-decode: unsupport compression "+d);w=(0,s.J)(e,n,o,t),y=w.buffer}if(y=v(y,l),"u8"===f||"s8"===f||a)C=new m(y);else{y=new ArrayBuffer(w.length);const e=new Uint8Array(y);switch(f){case"u16":case"s16":for(let t=0;t<w.length;t+=2)e[t]=w[t+1],e[t+1]=w[t];break;case"u32":case"s32":case"f32":for(let t=0;t<w.length;t+=4)e[t]=w[t+3],e[t+1]=w[t+2],e[t+2]=w[t+1],e[t+3]=w[t]}C=new m(y)}return C}const I=(e,t,r)=>{const n=u.f===t.littleEndian,o=w(r,"STRIPOFFSETS");if(void 0===o)return null;const{width:i,height:a,pixelType:l}=D([r]),h=b(r,"SAMPLESPERPIXEL")||t.planes,c=b(r,"PHOTOMETRICINTERPRETATION"),f=i*a,d=b(r,"BITSPERSAMPLE"),p=g(l),m=new p(f*h),y=w(r,"STRIPBYTECOUNTS"),C=b(r,"ROWSPERSTRIP"),x=b(r,"COMPRESSION")??1;let k,A,I,P,M,E,R,L,_,B=C;if(d%8==0)for(k=0;k<o.length;k++){if(M=k*(C*i)*h,B=(k+1)*C>a?a-k*C:C,"u8"===l||"s8"===l||n)8===x||32946===x?(R=new Uint8Array(e,o[k],y[k]),R=S(R),E=R.buffer):6===x?(R=new Uint8Array(e,o[k],y[k]),R=T(R,h,c),E=R.buffer):5===x?(R=(0,s.J)(e,o[k],y[k],t.littleEndian),E=R.buffer):(y[k]!==B*i*h*d/8&&console.log("strip byte counts is different than expected"),E=e.slice(o[k],o[k]+y[k])),E=v(E,d),P=new p(E);else{switch(6===x||8===x||32946===x?(R=new Uint8Array(e,o[k],y[k]),L=S(R),E=L.buffer):(y[k]!==B*i*h*d/8&&console.log("strip byte counts is different than expected"),E=new ArrayBuffer(y[k]),R=new Uint8Array(e,o[k],y[k]),L=new Uint8Array(E)),l){case"u16":case"s16":for(I=0;I<R.length;I+=2)L[I]=R[I+1],L[I+1]=R[I];break;case"u32":case"s32":case"f32":for(I=0;I<R.length;I+=4)L[I]=R[I+3],L[I+1]=R[I+2],L[I+2]=R[I+1],L[I+3]=R[I]}E=v(E,d),P=new p(E)}m.set(P,M)}const U=[];if(1===h)U.push(m);else for(k=0;k<h;k++){for(_=new p(f),A=0;A<f;A++)_[A]=m[A*h+k];U.push(_)}return{width:i,height:a,pixelType:l,pixels:U}},P=(e,t,r)=>{if(!(e&&e.length>0&&t&&r))return null;let n,o,i;const s=e[0].length,a=e.length,l=new Uint8Array(s);for(let u=0;u<a;u++)if(n=e[u],o=t[u],i=r[u],0===u)for(let e=0;e<s;e++)l[e]=n[e]<o||n[e]>i?0:1;else for(let e=0;e<s;e++)l[e]&&(l[e]=n[e]<o||n[e]>i?0:1);return l},M=e=>{if(!e)return null;const t=e.match(/<Item(.*?)Item>/gi);if(!t||0===t.length)return null;const r=new Map;let n,o,i,s,a;for(let e=0;e<t.length;e++)n=t[e],o=n.slice("<Item ".length,n.indexOf(">")),s=n.indexOf("sample="),s>-1&&(a=n.slice(s+'sample="'.length,n.indexOf('"',s+'sample="'.length))),s=n.indexOf("name="),s>-1&&(o=n.slice(s+'name="'.length,n.indexOf('"',s+'name="'.length))),o&&(i=n.slice(n.indexOf(">")+1,n.indexOf("</Item>")).trim(),null!=a?r.has(o)?r.get(o)[a]=i:r.set(o,[i]):r.set(o,i)),a=null;const l=r.get("STATISTICS_MINIMUM"),u=r.get("STATISTICS_MAXIMUM"),h=r.get("STATISTICS_MEAN"),c=r.get("STATISTICS_STDDEV");let f=null;if(l&&u){f=[];for(let e=0;e<l.length;e++)f.push({min:parseFloat(l[e]),max:parseFloat(u[e]),avg:h&&parseFloat(h[e]),stddev:c&&parseFloat(c[e])})}const d=r.get("BandName"),p=r.get("WavelengthMin"),g=r.get("WavelengthMax");let m=null;if(d){m=[];for(let e=0;e<d.length;e++)m.push({BandName:d[e],WavelengthMin:p&&parseFloat(p[e]),WavelengthMax:g&&parseFloat(g[e])})}return{statistics:f,bandProperties:m,dataType:r.get("DataType"),rawMetadata:r}};function E(e,t,r,n=0,o=!1,i=4){if(r.values)return!0;const s=r.type,a=r.valueCount;let l=r.valueOffset,u=[];const h=c[s],d=8*h,p=a*h,g=a*c[s]*8;let m,y;const w=8===i?64:32,C=r.valueOffsets;if(g>w&&p>(o?e.byteLength:e?e.byteLength-l+n:0))return r.offlineOffsetSize=[l,p],r.values=null,!1;if(g<=w){if(!t)if(w<=32)l>>>=32-g;else{const e=C?.length?C[0]:l>>>0,t=C?.length?C[1]:Math.round((l-e)/f);g<=32?(l=e>>>32-g,C[0]=l):(l=e*2**(32-g)+(t>>>32-g),C[0]=e,C[1]=t>>>32-g)}if(1===a&&d===w)u=[l];else if(64===w){const e=C?.length?C[0]:l>>>0,t=C?.length?C[1]:Math.round((l-e)/f);let r=e,n=32;for(y=1;y<=a;y++){const e=32-d*y%32;if(n<d){const o=r<<e>>>32-n,i=t<<32-n>>>32-n;r=t,u.push(o+i*2**(d-n)),n-=32-(d-n)}else u.push(r<<e>>>32-d),n-=d;0===n&&(n=32,r=t)}}else for(y=1;y<=a;y++){const e=32-d*y;u.push(l<<e>>>32-d)}}else{l-=n,o&&(l=0);for(let r=l;r<l+p;r+=h){switch(s){case 1:case 2:case 7:m=new DataView(e,r,1).getUint8(0);break;case 3:m=new DataView(e,r,2).getUint16(0,t);break;case 4:case 13:m=new DataView(e,r,4).getUint32(0,t);break;case 5:m=new DataView(e,r,4).getUint32(0,t)/new DataView(e,r+4,4).getUint32(0,t);break;case 6:m=new DataView(e,r,1).getInt8(0);break;case 8:m=new DataView(e,r,2).getInt16(0,t);break;case 9:m=new DataView(e,r,4).getInt32(0,t);break;case 10:m=new DataView(e,r,4).getInt32(0,t)/new DataView(e,r+4,4).getInt32(0,t);break;case 11:m=new DataView(e,r,4).getFloat32(0,t);break;case 12:m=new DataView(e,r,8).getFloat64(0,t);break;case 16:case 18:m=B(new DataView(e,r,8),0,t);break;case 17:m=U(new DataView(e,r,8),0,t);break;default:m=null}u.push(m)}}if(2===s){let e="";const t=u;for(u=[],y=0;y<t.length;y++)0===t[y]&&""!==e?(u.push(e),e=""):e+=String.fromCharCode(t[y]);""===e&&0!==u.length||u.push(e)}return r.values=u,!0}function D(e){const t=e[0],r=b(t,"TILEWIDTH"),n=b(t,"TILELENGTH"),o=b(t,"IMAGEWIDTH"),i=b(t,"IMAGELENGTH"),s=b(t,"BITSPERSAMPLE"),a=b(t,"SAMPLESPERPIXEL"),l=b(t,"SAMPLEFORMAT")??1,u=p(l,s),h=R(t),c=y(t,"GDAL_NODATA");let f=null;c?.length&&(f=c.map((e=>parseFloat(e))),f.some((e=>isNaN(e)))&&(f=null));const g=b(t,"COMPRESSION")??1;let x;switch(g){case 1:x="NONE";break;case 2:case 3:case 4:case 32771:x="CCITT";break;case 5:x="LZW";break;case 6:case 7:x="JPEG";break;case 32773:x="PACKBITS";break;case 8:case 32946:x="DEFLATE";break;case 34712:x="JPEG2000";break;case 34887:x="LERC";break;default:x=String(g)}let k=!0,v="";d.has(g)||(k=!1,v+="unsupported tag compression "+g),l>3&&(k=!1,v+="unsupported tag sampleFormat "+l),1!==s&&2!==s&&4!==s&&s%8!=0&&(k=!1,v+="unsupported tag bitsPerSample "+s);const T=C(t,"GEOASCIIPARAMS");let S;if(T){const e=T.split("|").find((e=>e.includes("ESRI PE String = "))),t=e?e.replace("ESRI PE String = ",""):"";S=t.startsWith("COMPD_CS")||t.startsWith("PROJCS")||t.startsWith("GEOGCS")?{wkid:null,wkt:t}:null}const A=w(t,"GEOTIEPOINTS"),I=w(t,"GEOPIXELSCALE"),P=w(t,"GEOTRANSMATRIX"),E=t.has("GEOKEYDIRECTORY")?t.get("GEOKEYDIRECTORY").data:null;let D,B,U=!1,G=!1;if(E){U=2===b(E,"GTRasterTypeGeoKey");const e=b(E,"GTModelTypeGeoKey");if(2===e){const e=b(E,"GeographicTypeGeoKey");e>=1024&&e<=32766&&(S={wkid:e}),S||32767!==e||(G=!0,S={wkid:4326})}else if(1===e){const e=b(E,"ProjectedCSTypeGeoKey");e>=1024&&e<=32766&&(S={wkid:e})}}if(I&&A&&A.length>=6?(D=[I[0],0,A[3]-A[0]*I[0],0,-Math.abs(I[1]),A[4]-A[1]*I[1]],U&&(D[2]-=.5*D[0]+.5*D[1],D[5]-=.5*D[3]+.5*D[4])):P&&16===P.length&&(D=U?[P[0],P[1],P[3]-.5*P[0],P[4],P[5],P[7]-.5*P[5]]:[P[0],P[1],P[3],P[4],P[5],P[7]]),D){const e=[{x:0,y:i},{x:0,y:0},{x:o,y:i},{x:o,y:0}];let t,r=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,a=Number.NEGATIVE_INFINITY;for(let o=0;o<e.length;o++)t=m(e[o],D),r=t.x>r?r:t.x,s=t.x<s?s:t.x,n=t.y>n?n:t.y,a=t.y<a?a:t.y;B={xmin:r,xmax:s,ymin:n,ymax:a,spatialReference:S}}else B={xmin:-.5,ymin:.5-i,xmax:o-.5,ymax:.5,spatialReference:S};G&&(B.xmax-B.xmin>400||Math.max(Math.abs(B.xmin),Math.abs(B.xmax))>361)&&(S=null,B.spatialReference=null);const O=L(e);let F,V,z,j,Z;if(O.length>0){z=Math.round(Math.log(o/b(O[0],"IMAGEWIDTH"))/Math.LN2);const e=O[O.length-1];j=Math.round(Math.log(o/b(e,"IMAGEWIDTH"))/Math.LN2),F=b(e,"TILEWIDTH"),V=b(e,"TILELENGTH")}F=null!=j&&j>0?F||r:null,V=null!=j&&j>0?V||n:null,r&&(Z=[{maxCol:Math.ceil(o/r)-1,maxRow:Math.ceil(i/n)-1,minRow:0,minCol:0}],O.forEach((e=>{Z.push({maxCol:Math.ceil(b(e,"IMAGEWIDTH")/b(e,"TILEWIDTH"))-1,maxRow:Math.ceil(b(e,"IMAGELENGTH")/b(e,"TILELENGTH"))-1,minRow:0,minCol:0})})));const J=C(e[0],"GDAL_METADATA"),W=M(J);return v+=" "+N({width:o,height:i,tileWidth:r,tileHeight:n,planes:a,ifds:e}),{width:o,height:i,tileWidth:r,tileHeight:n,planes:a,isBSQ:h,pixelType:u,compression:x,noData:f,hasMaskBand:_(e).length===O.length+1,isSupported:k,message:v,extent:B,isPseudoGeographic:G,affine:I?null:D,firstPyramidLevel:z,maximumPyramidLevel:j,pyramidBlockWidth:F,pyramidBlockHeight:V,tileBoundary:Z,metadata:W}}function R(e,t){const r=y(e,"PLANARCONFIGURATION");return r?2===r[0]:!!t&&t.isBSQ}function L(e){return e.filter((e=>1===b(e,"NEWSUBFILETYPE")))}function _(e){return e.filter((e=>{const t=4==(4&(b(e,"NEWSUBFILETYPE")??0)),r=4===b(e,"PHOTOMETRICINTERPRETATION");return t&&r}))}function B(e,t,r){const n=e.getUint32(t,r),o=e.getUint32(t+4,r);return r?o*f+n:n*f+o}function U(e,t,r){let n=r?e.getInt32(t,r):e.getUint32(t,r),o=r?e.getUint32(t+4,r):e.getInt32(t+4,r);const i=(r?n:o)>=0?1:-1;return r?n*=i:o*=i,i*(r?o*f+n:n*f+o)}function G(e,t,r,n){return n?B(e,t,r):e.getUint32(t,r)}function O(e){const t=new DataView(e,0,16),r=t.getUint16(0,!1);let n=null;if(18761===r)n=!0;else{if(19789!==r)throw new Error("unexpected endianess byte");n=!1}const o=t.getUint16(2,n);if(42!==o&&43!==o)throw new Error("unexpected tiff identifier");let i=4;const s=43===o;if(s){const e=t.getUint16(i,n);if(i+=2,8!==e)throw new Error("unsupported bigtiff version");if(0!==t.getUint16(i,n))throw new Error("unsupported bigtiff version");i+=2}return{littleEndian:n,isBigTiff:s,firstIFDPos:G(t,i,n,s)}}function F(e,t,r,o=0,i=l.Z.TIFF_TAGS,s=4){const a=x(e,t,r,o,i,s);let u;const h=a.ifd;if(h){if(l.Z.ifdTags.forEach(((r,n)=>{h.has(n)&&(u=h.get(n),u.data=x(e,t,u.valueOffset-o,o,r).ifd)})),h.has("GEOKEYDIRECTORY")){u=h.get("GEOKEYDIRECTORY");const r=u.values;if(r&&r.length>4){const n=r[0]+"."+r[1]+"."+r[2];u.data=x(e,t,u.valueOffset+6-o,o,l.Z.GEO_KEYS,2).ifd,u.data&&u.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[n]})}}if(h.has("XMP")){u=h.get("XMP");const e=u.values;"number"==typeof e[0]&&7===u.type&&(u.values=[(0,n.f)(new Uint8Array(e))])}}return a}function N(e){const{width:t,height:r,tileHeight:n,tileWidth:o}=e,i=e.planes,s=o?o*n:t*r,a=b(e.ifds[0],"BITSPERSAMPLE");let l="";return s*i>2**30/(a>8?a/8:1)&&(l=o?"tiled tiff exceeding 1 gigabits per tile is not supported":"scanline tiff exceeding 1 gigabits is not supported"),l}async function V(e,t){const{headerInfo:r,ifd:n,offsets:o,sizes:i}=t,s=[];for(let t=0;t<o.length;t++){const a=await A(e,r.littleEndian,n,o[t],i[t]||e.byteLength);s.push(a)}const l=R(n,r),u=b(n,"BITSPERSAMPLE"),h=p(b(n,"SAMPLEFORMAT")??1,u),c=b(n,"SAMPLESPERPIXEL")||r.planes,f=g(h),d=b(n,"TILEWIDTH"),m=b(n,"TILELENGTH"),y=b(n,"COMPRESSION")??1,w=d*m;let C;const x=[];let k=s[0];const v=34887===y;for(let e=0;e<c;e++){if(C=new f(w),l&&v){if(k=s[e],k.length)for(let t=0;t<w;t++)C[t]=k[e][t+e]}else if(k.length)if(l||v&&!l)C=k.slice(w*e,w*(e+1));else for(let t=0;t<w;t++)C[t]=k[t*c+e];x.push(C)}const T=r.noData?r.noData[0]:t.noDataValue,S=r.metadata?r.metadata.statistics:null,I=S?S.map((e=>e.min)):null,M=S?S.map((e=>e.max)):null,E={pixelType:h,width:d,height:m,pixels:x,noDataValue:T};return null!=T?(0,a.A)(E,T):I&&M&&t.applyMinMaxConstraint&&(E.mask=P(x,I,M)),E}async function z(e,t={}){const r=t.pyramidLevel||0,n=t.headerInfo||function(e){const{littleEndian:t,isBigTiff:r,firstIFDPos:n}=O(e);let o=n;const i=[];do{const n=F(e,t,o,0,l.Z.TIFF_TAGS,r?8:4);if(!n.success)break;i.push(n.ifd),o=n.nextIFD}while(o>0);return{...D(i),littleEndian:t,isBigTiff:r,ifds:i,pyramidIFDs:L(i),maskIFDs:_(i)}}(e),{ifds:o,noData:i}=n;if(0===o.length)throw new Error("no valid image file directory");const s=N(n);if(s)throw s;let u=null;const h=-1===r?o[o.length-1]:o[r],c=i??t.noDataValue;return u=n.tileWidth?await async function(e,t,r){const n=w(r,"TILEOFFSETS");if(void 0===n)return null;const o=w(r,"TILEBYTECOUNTS"),{width:i,height:s,pixelType:a,tileWidth:l,tileHeight:u}=D([r]),h=R(r,t),c=b(r,"SAMPLESPERPIXEL")||t.planes,f=i*s,d=b(r,"BITSPERSAMPLE"),p=34887===(b(r,"COMPRESSION")??1),m=g(a),y=[];for(let e=0;e<c;e++)y.push(new m(f));let C,x,k,v,T,S,I,P,M,E,L,_,B;const U=Math.ceil(i/l);if(d%8==0)if(p&&h&&c>1){const a=Math.round(n.length/c);for(C=0;C<a;C++){S=Math.floor(C/U)*u,I=C%U*l,P=S*i+I;for(let a=0;a<c;a++){const h=C*c+a;if(0!==o[h])for(k=await A(e,t.littleEndian,r,n[h],o[h]),E=0,M=P,_=Math.min(l,i-I),L=Math.min(u,s-S),B=y[a],v=0;v<L;v++)for(M=P+v*i,E=v*l,T=0;T<_;T++,M++,E++)B[M]=k[E]}}}else for(C=0;C<n.length;C++)if(0!==o[C])for(S=Math.floor(C/U)*u,I=C%U*l,P=S*i+I,k=await A(e,t.littleEndian,r,n[C],o[C]),E=0,M=P,_=Math.min(l,i-I),L=Math.min(u,s-S),x=0;x<c;x++)if(B=y[x],h||p)for(v=0;v<L;v++)for(M=P+v*i,E=l*u*x+v*l,T=0;T<_;T++,M++,E++)B[M]=k[E];else for(v=0;v<L;v++)for(M=P+v*i,E=v*l*c+x,T=0;T<_;T++,M++,E+=c)B[M]=k[E];return{width:i,height:s,pixelType:a,pixels:y}}(e,n,h):await I(e,n,h),u?(null!=c&&(0,a.A)(u,c),u):u}},9832:(e,t,r)=>{r.d(t,{Z:()=>a});const n=(()=>{const e=[];return e[254]="NEWSUBFILETYPE",e[255]="SUBFILETYPE",e[256]="IMAGEWIDTH",e[257]="IMAGELENGTH",e[258]="BITSPERSAMPLE",e[259]="COMPRESSION",e[262]="PHOTOMETRICINTERPRETATION",e[263]="THRESHHOLDING",e[264]="CELLWIDTH",e[265]="CELLLENGTH",e[266]="FILLORDER",e[269]="DOCUMENTNAME",e[270]="IMAGEDESCRIPTION",e[271]="MAKE",e[272]="MODEL",e[273]="STRIPOFFSETS",e[274]="ORIENTATION",e[277]="SAMPLESPERPIXEL",e[278]="ROWSPERSTRIP",e[279]="STRIPBYTECOUNTS",e[280]="MINSAMPLEVALUE",e[281]="MAXSAMPLEVALUE",e[282]="XRESOLUTION",e[283]="YRESOLUTION",e[284]="PLANARCONFIGURATION",e[285]="PAGENAME",e[286]="XPOSITION",e[287]="YPOSITION",e[288]="FREEOFFSETS",e[289]="FREEBYTECOUNTS",e[290]="GRAYRESPONSEUNIT",e[291]="GRAYRESPONSECURVE",e[292]="T4OPTIONS",e[293]="T6OPTIONS",e[296]="RESOLUTIONUNIT",e[297]="PAGENUMBER",e[300]="COLORRESPONSEUNIT",e[301]="TRANSFERFUNCTION",e[305]="SOFTWARE",e[306]="DATETIME",e[315]="ARTIST",e[316]="HOSTCOMPUTER",e[317]="PREDICTOR",e[318]="WHITEPOINT",e[319]="PRIMARYCHROMATICITIES",e[320]="COLORMAP",e[321]="HALFTONEHINTS",e[322]="TILEWIDTH",e[323]="TILELENGTH",e[324]="TILEOFFSETS",e[325]="TILEBYTECOUNTS",e[326]="BADFAXLINES",e[327]="CLEANFAXDATA",e[328]="CONSECUTIVEBADFAXLINES",e[330]="SUBIFD",e[332]="INKSET",e[333]="INKNAMES",e[334]="NUMBEROFINKS",e[336]="DOTRANGE",e[337]="TARGETPRINTER",e[338]="EXTRASAMPLES",e[339]="SAMPLEFORMAT",e[340]="SMINSAMPLEVALUE",e[341]="SMAXSAMPLEVALUE",e[342]="TRANSFERRANGE",e[347]="JPEGTABLES",e[512]="JPEGPROC",e[513]="JPEGIFOFFSET",e[514]="JPEGIFBYTECOUNT",e[515]="JPEGRESTARTINTERVAL",e[517]="JPEGLOSSLESSPREDICTORS",e[518]="JPEGPOINTTRANSFORM",e[519]="JPEGQTABLES",e[520]="JPEGDCTABLES",e[521]="JPEGACTABLES",e[529]="YCBCRCOEFFICIENTS",e[530]="YCBCRSUBSAMPLING",e[531]="YCBCRPOSITIONING",e[532]="REFERENCEBLACKWHITE",e[700]="XMP",e[33550]="GEOPIXELSCALE",e[33922]="GEOTIEPOINTS",e[33432]="COPYRIGHT",e[42112]="GDAL_METADATA",e[42113]="GDAL_NODATA",e[50844]="RPCCOEFFICIENT",e[34264]="GEOTRANSMATRIX",e[34735]="GEOKEYDIRECTORY",e[34736]="GEODOUBLEPARAMS",e[34737]="GEOASCIIPARAMS",e[34665]="EXIFIFD",e[34853]="GPSIFD",e[40965]="INTEROPERABILITYIFD",e})(),o=(()=>{const e=n.slice();return e[36864]="ExifVersion",e[40960]="FlashpixVersion",e[40961]="ColorSpace",e[42240]="Gamma",e[37121]="ComponentsConfiguration",e[37122]="CompressedBitsPerPixel",e[40962]="PixelXDimension",e[40963]="PixelYDimension",e[37500]="MakerNote",e[37510]="UserComment",e[40964]="RelatedSoundFile",e[36867]="DateTimeOriginal",e[36868]="DateTimeDigitized",e[36880]="OffsetTime",e[36881]="OffsetTimeOriginal",e[36882]="OffsetTimeDigitized",e[37520]="SubSecTime",e[37521]="SubSecTimeOriginal",e[37522]="SubSecTimeDigitized",e[37888]="Temperature",e[37889]="Humidity",e[37890]="Pressure",e[37891]="WaterDepth",e[37892]="Acceleration",e[37893]="CameraElevationAngle",e[42016]="ImageUniqueID",e[42032]="CameraOwnerName",e[42033]="BodySerialNumber",e[42034]="LensSpecification",e[42035]="LensMake",e[42036]="LensModel",e[42037]="LensSerialNumber",e[33434]="ExposureTime",e[33437]="FNumber",e[34850]="ExposureProgram",e[34852]="SpectralSensitivity",e[34855]="PhotographicSensitivity",e[34856]="OECF",e[34864]="SensitivityType",e[34865]="StandardOutputSensitivity",e[34866]="RecommendedExposureIndex",e[34867]="ISOSpeed",e[34868]="ISOSpeedLatitudeyyy",e[34869]="ISOSpeedLatitudezzz",e[37377]="ShutterSpeedValue",e[37378]="ApertureValue",e[37379]="BrightnessValue",e[37380]="ExposureBiasValue",e[37381]="MaxApertureValue",e[37382]="SubjectDistance",e[37383]="MeteringMode",e[37384]="LightSource",e[37385]="Flash",e[37386]="FocalLength",e[37396]="SubjectArea",e[41483]="FlashEnergy",e[41484]="SpatialFrequencyResponse",e[41486]="FocalPlaneXResolution",e[41487]="FocalPlaneYResolution",e[41488]="FocalPlaneResolutionUnit",e[41492]="SubjectLocation",e[41493]="ExposureIndex",e[41495]="SensingMethod",e[41728]="FileSource",e[41729]="SceneType",e[41730]="CFAPattern",e[41985]="CustomRendered",e[41986]="ExposureMode",e[41987]="WhiteBalance",e[41988]="DigitalZoomRatio",e[41989]="FocalLengthIn35mmFilm",e[41990]="SceneCaptureType",e[41991]="GainControl",e[41992]="Contrast",e[41993]="Saturation",e[41994]="Sharpness",e[41995]="DeviceSettingDescription",e[41996]="SubjectDistanceRange",e})(),i=(()=>{const e=[];return e[1024]="GTModelTypeGeoKey",e[1025]="GTRasterTypeGeoKey",e[1026]="GTCitationGeoKey",e[2048]="GeographicTypeGeoKey",e[2049]="GeogCitationGeoKey",e[2050]="GeogGeodeticDatumGeoKey",e[2051]="GeogPrimeMeridianGeoKey",e[2052]="GeogLinearUnitsGeoKey",e[2053]="GeogLinearUnitSizeGeoKey",e[2054]="GeogAngularUnitsGeoKey",e[2055]="GeogAngularUnitSizeGeoKey",e[2056]="GeogEllipsoidGeoKey",e[2057]="GeogSemiMajorAxisGeoKey",e[2058]="GeogSemiMinorAxisGeoKey",e[2059]="GeogInvFlatteningGeoKey",e[2061]="GeogPrimeMeridianLongGeoKey",e[2060]="GeogAzimuthUnitsGeoKey",e[3072]="ProjectedCSTypeGeoKey",e[3073]="PCSCitationGeoKey",e[3074]="ProjectionGeoKey",e[3075]="ProjCoordTransGeoKey",e[3076]="ProjLinearUnitsGeoKey",e[3077]="ProjLinearUnitSizeGeoKey",e[3078]="ProjStdParallel1GeoKey",e[3079]="ProjStdParallel2GeoKey",e[3080]="ProjNatOriginLongGeoKey",e[3081]="ProjNatOriginLatGeoKey",e[3082]="ProjFalseEastingGeoKey",e[3083]="ProjFalseNorthingGeoKey",e[3084]="ProjFalseOriginLongGeoKey",e[3085]="ProjFalseOriginLatGeoKey",e[3086]="ProjFalseOriginEastingGeoKey",e[3087]="ProjFalseOriginNorthingGeoKey",e[3088]="ProjCenterLongGeoKey",e[3090]="ProjCenterEastingGeoKey",e[3091]="ProjCenterNorthingGeoKey",e[3092]="ProjScaleAtNatOriginGeoKey",e[3093]="ProjScaleAtCenterGeoKey",e[3094]="ProjAzimuthAngleGeoKey",e[3095]="ProjStraightVertPoleLongGeoKey",e[4096]="VerticalCSTypeGeoKey",e[4097]="VerticalCitationGeoKey",e[4098]="VerticalDatumGeoKey",e[4099]="VerticalUnitsGeoKey",e})(),s=new Map;s.set("EXIFIFD",o),s.set("GPSIFD",["GPSVersionID","GPSLatitudeRef","GPSLatitude","GPSLongitudeRef","GPSLongitude","GPSAltitudeRef","GPSAltitude","GPSTimeStamp","GPSSatellites","GPSStatus","GPSMeasureMode","GPSDOP","GPSSpeedRef","GPSSpeed","GPSTrackRef","GPSTrack","GPSImgDirectionRef","GPSImgDirection","GPSMapDatum","GPSDestLatitudeRef","GPSDestLatitude","GPSDestLongitudeRef","GPSDestLongitude","GPSDestBearingRef","GPSDestBearing","GPSDestDistanceRef","GPSDestDistance","GPSProcessingMethod","GPSAreaInformation","GPSDateStamp","GPSDifferential","GPSHPositioningError"]);const a={TIFF_TAGS:n,ifdTags:s,GEO_KEYS:i,getTagName:(e,t)=>{let r=(t||n)[e];return void 0===r&&(r="unknown"+String(e)),r}}},81578:(e,t,r)=>{r.d(t,{A:()=>a,r:()=>s});const n=9999999e31,o=2e-7,i={u1:[0,1],u2:[0,3],u4:[0,15],u8:[0,255],s8:[-128,127],u16:[0,65535],s16:[-32768,32767],u32:[0,4294967295],s32:[-2147483648,2147483647],f32:[-34028234663852886e22,34028234663852886e22],f64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function s(e){return i[e]??[-34028234663852886e22,34028234663852886e22]}function a(e,t,r){if(e.depthCount&&e.depthCount>1)return;const{pixels:i,statistics:a,pixelType:l}=e,u=i[0].length,h=e.bandMasks??[],c=e.mask??new Uint8Array(u).fill(255),f="f32"===l||"f64"===l,d=s(l);let p=!1;for(let e=0;e<i.length;e++){const s="number"==typeof t?t:t[e];if(null==s)continue;const g=a?.[e].minValue??d[0],m=a?.[e].maxValue??d[1];if(g>s+Number.EPSILON||m<s-Number.EPSILON)continue;const y=h[e]||new Uint8Array(u).fill(255),w=i[e],C=r?.customFloatTolerance;if(f&&0!==C){let e=C;e||(e=Math.abs(s)>=n?o*Math.abs(s):"f32"===l?2**-23:Number.EPSILON);for(let t=0;t<w.length;t++)y[t]&&Math.abs(w[t]-s)<e&&(w[t]=0,y[t]=0,c[t]=0,p=!0)}else for(let e=0;e<w.length;e++)y[e]&&w[e]===s&&(w[e]=0,y[e]=0,c[e]=0,p=!0);h[e]=y}p&&(e.bandMasks=h,e.mask=c),p&&"updateStatistics"in e&&e.updateStatistics()}},48279:(e,t,r)=>{r.d(t,{f:()=>n});const n=(()=>{const e=new ArrayBuffer(4),t=new Uint8Array(e);return new Uint32Array(e)[0]=1,1===t[0]})()},55914:(e,t,r)=>{r.d(t,{CD:()=>o,DX:()=>n,Gd:()=>c,Pz:()=>f,Qh:()=>B,SJ:()=>d,Uk:()=>U,Vl:()=>L,XV:()=>p,a2:()=>y,hd:()=>l,nA:()=>v,nk:()=>u,oB:()=>k,pW:()=>A,qF:()=>h,sS:()=>x,us:()=>S,wV:()=>g,zp:()=>m});var n,o,i,s=r(5847),a=r(81578);(i=n||(n={}))[i.matchAny=0]="matchAny",i[i.matchAll=1]="matchAll",function(e){e[e.bestMatch=0]="bestMatch",e[e.fail=1]="fail"}(o||(o={}));const l=6;function u(e){return null!=e&&"esri.layers.support.PixelBlock"===e.declaredClass&&e.pixels&&e.pixels.length>0}function h(e,t){if(!t?.length||!u(e))return e;const r=e.pixels.length;return t&&t.some((e=>e>=r))||1===r&&1===t.length&&0===t[0]?e:r!==t.length||t.some(((e,t)=>e!==t))?new s.Z({pixelType:e.pixelType,width:e.width,height:e.height,mask:e.mask,validPixelCount:e.validPixelCount,maskIsAlpha:e.maskIsAlpha,pixels:t.map((t=>e.pixels[t])),statistics:e.statistics&&t.map((t=>e.statistics[t]))}):e}function c(e){if(!e?.length||e.some((e=>!u(e))))return null;if(1===e.length)return e[0]?.clone()??null;const t=e,{width:r,height:n,pixelType:o}=t[0];if(t.some((e=>e.width!==r||e.height!==n)))return null;const i=t.map((({mask:e})=>e)).filter((e=>null!=e));let a=null;i.length&&(a=new Uint8Array(r*n),a.set(i[0]),i.length>1&&b(i.slice(1),a));const l=[];t.forEach((({pixels:e})=>l.push(...e)));const h=t.map((({statistics:e})=>e)).filter((e=>e?.length)),c=[];return h.forEach((e=>c.push(...e))),new s.Z({pixelType:o,width:r,height:n,mask:a,pixels:l,statistics:c.length?c:null})}function f(e){if(!e)return;const t=e.colormap;if(!t||0===t.length)return;const r=t.sort(((e,t)=>e[0]-t[0]));let n=0;r[0][0]<0&&(n=r[0][0]);const o=Math.max(256,r[r.length-1][0]-n+1),i=new Uint8Array(4*o),s=[];let a,l=0,u=0;const h=5===r[0].length;if(o>65536)return r.forEach((e=>{s[e[0]-n]=h?e.slice(1):e.slice(1).concat([255])})),{indexed2DColormap:s,offset:n,alphaSpecified:h};if(e.fillUnspecified)for(a=r[u],l=a[0]-n;l<o;l++)i[4*l]=a[1],i[4*l+1]=a[2],i[4*l+2]=a[3],i[4*l+3]=h?a[4]:255,l===a[0]-n&&(a=u===r.length-1?a:r[++u]);else for(l=0;l<r.length;l++)a=r[l],u=4*(a[0]-n),i[u]=a[1],i[u+1]=a[2],i[u+2]=a[3],i[u+3]=h?a[4]:255;return{indexedColormap:i,offset:n,alphaSpecified:h}}function d(e,t){if(!u(e))return e;if(!t||!t.indexedColormap&&!t.indexed2DColormap)return e;const r=e.clone(),n=r.pixels;let o=r.mask;const i=r.width*r.height;if(1!==n.length)return e;const{indexedColormap:s,indexed2DColormap:a,offset:l,alphaSpecified:h}=t;let c=0;const f=n[0],d=new Uint8Array(f.length),p=new Uint8Array(f.length),g=new Uint8Array(f.length);let m,y=0;if(s){const e=s.length-1;if(null!=o)for(c=0;c<i;c++)o[c]&&(y=4*(f[c]-l),y<l||y>e?o[c]=0:(d[c]=s[y],p[c]=s[y+1],g[c]=s[y+2],o[c]=s[y+3]));else{for(o=new Uint8Array(i),c=0;c<i;c++)y=4*(f[c]-l),y<l||y>e?o[c]=0:(d[c]=s[y],p[c]=s[y+1],g[c]=s[y+2],o[c]=s[y+3]);r.mask=o}}else if(a)if(null!=o)for(c=0;c<i;c++)o[c]&&(m=a[f[c]],d[c]=m[0],p[c]=m[1],g[c]=m[2],o[c]=m[3]);else{for(o=new Uint8Array(i),c=0;c<i;c++)m=a[f[c]],d[c]=m[0],p[c]=m[1],g[c]=m[2],o[c]=m[3];r.mask=o}return r.pixels=[d,p,g],r.statistics=null,r.pixelType="u8",r.maskIsAlpha=h,r}function p(e,t){if(!u(e))return null;const{pixels:r,mask:n}=e,o=r.length;let i=t.lut;const{offset:a}=t;i&&1===i[0].length&&(i=r.map((()=>i)));const l=[],h=t.outputPixelType||"u8";for(let e=0;e<o;e++){const t=g(r[e],n,i[e],a||0,h);l.push(t)}const c=new s.Z({width:e.width,height:e.height,pixels:l,mask:n,pixelType:h});return c.updateStatistics(),c}function g(e,t,r,n,o){const i=e.length,a=s.Z.createEmptyBand(o,i);if(t)for(let o=0;o<i;o++)t[o]&&(a[o]=r[e[o]-n]);else for(let t=0;t<i;t++)a[t]=r[e[t]-n];return a}function m(e,t){if(!u(e))return null;const r=e.clone(),{pixels:n}=r,o=r.width*r.height,i=t.length,s=Math.floor(i/2),a=t[Math.floor(s)],l=n[0];let h,c,f,d,p,g,m=!1;const y=new Uint8Array(o),w=new Uint8Array(o),C=new Uint8Array(o);let b=r.mask;const x=4===t[0].mappedColor.length;for(b||(b=new Uint8Array(o),b.fill(x?255:1),r.mask=b),p=0;p<o;p++)if(b[p]){for(h=l[p],m=!1,g=s,c=a,f=0,d=i-1;d-f>1;){if(h===c.value){m=!0;break}h>c.value?f=g:d=g,g=Math.floor((f+d)/2),c=t[Math.floor(g)]}m||(h===t[f].value?(c=t[f],m=!0):h===t[d].value?(c=t[d],m=!0):h<t[f].value?(m=!1,c=null):h>t[f].value&&(h<t[d].value?(c=t[f],m=!0):d===i-1?(m=!1,c=null):(c=t[d],m=!0))),m?(y[p]=c.mappedColor[0],w[p]=c.mappedColor[1],C[p]=c.mappedColor[2],b[p]=c.mappedColor[3]):y[p]=w[p]=C[p]=b[p]=0}return r.pixels=[y,w,C],r.mask=b,r.pixelType="u8",r.maskIsAlpha=x,r}function y(e,t){if(!u(e))return null;const{width:r,height:n}=e,{inputRanges:o,outputValues:i,outputPixelType:l,noDataRanges:h,allowUnmatched:c,isLastInputRangeInclusive:f}=t,d=e.pixels[0],p=s.Z.createEmptyBand(l,d.length),g=e.mask,m=new Uint8Array(r*n);g?m.set(g):m.fill(255);const y=e.pixelType.startsWith("f")?1e-6:0,w=o.map((e=>e-y));w[0]=o[0],w[w.length-1]=o[o.length-1]+(f?1e-6:0);const C=o.length/2,[b,x]=(0,a.r)(l);for(let e=0;e<n;e++)for(let t=0;t<r;t++){const n=e*r+t;if(m[n]){const e=d[n];let t=!1;for(let r=C-1;r>=0;r--)if(e===w[2*r]||e>w[2*r]&&e<w[2*r+1]){p[n]=i[r],t=!0;break}t||(c?p[n]=e>x?x:e<b?b:e:m[n]=0)}}const k=h?.length;if(k)for(let e=0;e<n;e++)for(let t=0;t<r;t++){const n=e*r+t;if(!g||g[n]){const e=d[n];for(let t=0;t<k;t+=2)if(e>=h[t]&&e<=h[t+1]){p[n]=0,m[n]=0;break}}}return new s.Z({width:r,height:n,pixelType:l,pixels:[p],mask:m})}function w(e,t,r,n){const o=null!=r&&r.length>=2?new Set(r):null,i=1===r?.length?r[0]:null,s=!!t?.length;for(let r=0;r<e.length;r++)if(n[r]){const a=e[r];if(s){let e=!1;for(let r=0;r<t.length;r+=2)if(a>=t[r]&&a<=t[r+1]){e=!0;break}e||(n[r]=0)}n[r]&&(a===i||o?.has(a))&&(n[r]=0)}}function C(e,t){const r=e[0].length;for(let n=0;n<r;n++)if(t[n]){let r=!1;for(let t=0;t<e.length;t++)if(e[t][n]){r=!0;break}r||(t[n]=0)}}function b(e,t){const r=e[0].length;for(let n=0;n<r;n++)if(t[n]){let r=!1;for(let t=0;t<e.length;t++)if(0===e[t][n]){r=!0;break}r&&(t[n]=0)}}function x(e,t){if(!u(e))return null;const{width:r,height:n,pixels:o}=e,i=r*n,a=new Uint8Array(i);e.mask?a.set(e.mask):a.fill(255);const l=o.length,{includedRanges:h,noDataValues:c,outputPixelType:f,matchAll:d,lookups:p}=t;if(p){const e=[];for(let t=0;t<l;t++){const r=p[t],n=g(o[t],a,r.lut,r.offset||0,"u8");e.push(n)}1===e.length?a.set(e[0]):d?C(e,a):b(e,a)}else if(d){const e=[];for(let t=0;t<l;t++){const r=new Uint8Array(i);r.set(a),w(o[t],h?.slice(2*t,2*t+2),c?.[t],r),e.push(r)}1===e.length?a.set(e[0]):C(e,a)}else for(let e=0;e<l;e++)w(o[e],h?.slice(2*e,2*e+2),c?.[e],a);return new s.Z({width:r,height:n,pixelType:f,pixels:o,mask:a})}function k(e){const{srcPixelType:t,inputRanges:r,outputValues:n,allowUnmatched:o,noDataRanges:i,isLastInputRangeInclusive:l,outputPixelType:u}=e;if("u8"!==t&&"s8"!==t&&"u16"!==t&&"s16"!==t)return null;const h=t.includes("16")?65536:256,c=t.includes("s")?-h/2:0,f=s.Z.createEmptyBand(u,h),d=new Uint8Array(h);o&&d.fill(255);const[p,g]=(0,a.r)(u);if(r?.length&&n?.length){const e=1e-6,t=r.map((t=>t-e));t[0]=r[0],l&&(t[t.length-1]=r[r.length-1]);for(let e=0;e<t.length;e++){const r=n[e]>g?g:n[e]<p?p:n[e],o=Math.ceil(t[2*e]-c),i=Math.floor(t[2*e+1]-c);for(let e=o;e<=i;e++)f[e]=r,d[e]=255}}if(i?.length)for(let e=0;e<i.length;e++){const t=Math.ceil(i[2*e]-c),r=Math.floor(i[2*e+1]-c);for(let e=t;e<=r;e++)d[e]=0}return{lut:f,offset:c,mask:d}}function v(e,t,r){if("u8"!==e&&"s8"!==e&&"u16"!==e&&"s16"!==e)return null;const n=e.includes("16")?65536:256,o=e.includes("s")?-n/2:0,i=new Uint8Array(n);if(t)for(let e=0;e<t.length;e++){const r=Math.ceil(t[2*e]-o),n=Math.floor(t[2*e+1]-o);for(let e=r;e<=n;e++)i[e]=255}else i.fill(255);if(r)for(let e=0;e<r.length;e++)i[r[e]-o]=0;return{lut:i,offset:o}}function T(e,t,r,n,o,i){const{width:s,height:a}=r.block,{x:l,y:u}=r.offset,{width:h,height:c}=r.mosaic,f=function(e,t,r,n,o,i,s,a){return{xmin:o<=r*e?0:o<r*e+e?o-r*e:e,ymin:i<=n*t?0:i<n*t+t?i-n*t:t,xmax:o+s<=r*e?0:o+s<r*e+e?o+s-r*e:e,ymax:i+a<=n*t?0:i+a<n*t+t?i+a-n*t:t}}(s,a,n,o,l,u,h,c);let d=0,p=0;if(i){const e=i.hasGCSSShiftTransform?360:i.halfWorldWidth??0,t=s*i.resolutionX,r=i.startX+n*t;r<e&&r+t>e?p=i.rightPadding:r>=e&&(d=i.leftMargin-i.rightPadding,p=0)}if(f.xmax-=p,"number"!=typeof t)for(let r=f.ymin;r<f.ymax;r++){const i=(o*a+r-u)*h+(n*s-l)+d,c=r*s;for(let r=f.xmin;r<f.xmax;r++)e[i+r]=t[c+r]}else for(let r=f.ymin;r<f.ymax;r++){const i=(o*a+r-u)*h+(n*s-l)+d;for(let r=f.xmin;r<f.xmax;r++)e[i+r]=t}}function S(e,t,r={}){const{clipOffset:n,clipSize:o,alignmentInfo:i,blockWidths:a}=r;if(a)return function(e,t,r){const n=e.find((e=>null!=e));if(null==n)return null;const o=e.some((e=>null==e||!!e.mask)),{width:i,height:a}=t,l=o?new Uint8Array(i*a):null,{blockWidths:h}=r,c=[],f=n.getPlaneCount(),d=s.Z.getPixelArrayConstructor(n.pixelType);if(o)for(let t=0,r=0;t<e.length;r+=h[t],t++){const n=e[t];if(!u(n))continue;const o=n.mask;for(let e=0;e<a;e++)for(let s=0;s<h[t];s++)l[e*i+s+r]=null==o?255:o[e*n.width+s]}for(let t=0;t<f;t++){const r=new d(i*a);for(let n=0,o=0;n<e.length;o+=h[n],n++){const s=e[n];if(!u(s))continue;const l=s.pixels[t];if(null!=l)for(let e=0;e<a;e++)for(let t=0;t<h[n];t++)r[e*i+t+o]=l[e*s.width+t]}c.push(r)}const p=new s.Z({width:i,height:a,mask:l,pixels:c,pixelType:n.pixelType});return p.updateStatistics(),p}(e,t,{blockWidths:a});const l=e.find((e=>u(e)));if(null==l)return null;const h=o?o.width:t.width,c=o?o.height:t.height,f=l.width,d=l.height,p=t.width/f,g=t.height/d,m={offset:n||{x:0,y:0},mosaic:o||t,block:{width:f,height:d}},y=l.pixelType,w=s.Z.getPixelArrayConstructor(y),C=l.pixels.length,b=[];let x,k,v;for(let t=0;t<C;t++){k=new w(h*c);for(let r=0;r<g;r++)for(let n=0;n<p;n++){const o=e[r*p+n];u(o)&&(x=o.pixels[t],T(k,x,m,n,r,i))}b.push(k)}if(e.some((e=>null==e||null!=e.mask&&e.mask.length>0))){v=new Uint8Array(h*c);for(let t=0;t<g;t++)for(let r=0;r<p;r++){const n=e[t*p+r],o=null!=n?n.mask:null;T(v,null!=o?o:n?1:0,m,r,t,i)}}const S=new s.Z({width:h,height:c,pixels:b,pixelType:y,mask:v});return S.updateStatistics(),S}function A(e,t,r){if(!u(e))return null;const{width:n,height:o}=e,i=t.x,s=t.y,a=r.width+i,l=r.height+s;if(i<0||s<0||a>n||l>o)return e;if(0===i&&0===s&&a===n&&l===o)return e;e.mask||(e.mask=new Uint8Array(n*o));const h=e.mask;for(let e=0;e<o;e++){const t=e*n;for(let r=0;r<n;r++)h[t+r]=e<s||e>=l||r<i||r>=a?0:1}return e.updateStatistics(),e}function I(e){if(!u(e))return null;const t=e.clone(),{width:r,height:n,pixels:o}=e,i=o[0],s=t.pixels[0],a=e.mask;for(let e=2;e<n-1;e++){const t=new Map;for(let n=e-2;n<e+2;n++)for(let e=0;e<4;e++){const o=n*r+e;E(t,i[o],a?a[o]:1)}s[e*r]=P(t),s[e*r+1]=s[e*r+2]=s[e*r];let n=3;for(;n<r-1;n++){let o=(e-2)*r+n+1;E(t,i[o],a?a[o]:1),o=(e-1)*r+n+1,E(t,i[o],a?a[o]:1),o=e*r+n+1,E(t,i[o],a?a[o]:1),o=(e+1)*r+n+1,E(t,i[o],a?a[o]:1),o=(e-2)*r+n-3,M(t,i[o],a?a[o]:1),o=(e-1)*r+n-3,M(t,i[o],a?a[o]:1),o=e*r+n-3,M(t,i[o],a?a[o]:1),o=(e+1)*r+n-3,M(t,i[o],a?a[o]:1),s[e*r+n]=P(t)}s[e*r+n+1]=s[e*r+n]}for(let e=0;e<r;e++)s[e]=s[r+e]=s[2*r+e],s[(n-1)*r+e]=s[(n-2)*r+e];return t.updateStatistics(),t}function P(e){if(0===e.size)return 0;let t=0,r=-1,n=0;const o=e.keys();let i=o.next();for(;!i.done;)n=e.get(i.value),n>t&&(r=i.value,t=n),i=o.next();return r}function M(e,t,r){if(0===r)return;const n=e.get(t);1===n?e.delete(t):e.set(t,n-1)}function E(e,t,r){0!==r&&e.set(t,e.has(t)?e.get(t)+1:1)}function D(e,t,r){let{x:n,y:o}=t;const{width:i,height:a}=r;if(0===n&&0===o&&a===e.height&&i===e.width)return e;const{width:l,height:h}=e,c=Math.max(0,o),f=Math.max(0,n),d=Math.min(n+i,l),p=Math.min(o+a,h);if(d<0||p<0||!u(e))return null;n=Math.max(0,-n),o=Math.max(0,-o);const{pixels:g}=e,m=i*a,y=g.length,w=[];for(let t=0;t<y;t++){const r=g[t],a=s.Z.createEmptyBand(e.pixelType,m);for(let e=c;e<p;e++){const t=e*l;let s=(e+o-c)*i+n;for(let e=f;e<d;e++)a[s++]=r[t+e]}w.push(a)}const C=new Uint8Array(m),b=e.mask;for(let e=c;e<p;e++){const t=e*l;let r=(e+o-c)*i+n;for(let e=f;e<d;e++)C[r++]=b?b[t+e]:1}const x=new s.Z({width:r.width,height:r.height,pixelType:e.pixelType,pixels:w,mask:C});return x.updateStatistics(),x}function R(e,t=!0){if(!u(e))return null;const{pixels:r,width:n,height:o,mask:i,pixelType:a}=e,l=[],h=Math.round(n/2),c=Math.round(o/2),f=o-1,d=n-1;for(let e=0;e<r.length;e++){const i=r[e],u=s.Z.createEmptyBand(a,h*c);let p=0;for(let e=0;e<o;e+=2)for(let r=0;r<n;r+=2){const o=i[e*n+r];if(t){const t=r===d?o:i[e*n+r+1],s=e===f?o:i[e*n+r+n],a=r===d?s:e===f?t:i[e*n+r+n+1];u[p++]=(o+t+s+a)/4}else u[p++]=o}l.push(u)}let p=null;if(null!=i){p=new Uint8Array(h*c);let e=0;for(let r=0;r<o;r+=2)for(let o=0;o<n;o+=2){const s=i[r*n+o];if(t){const t=o===d?s:i[r*n+o+1],a=r===f?s:i[r*n+o+n],l=o===d?a:r===f?t:i[r*n+o+n+1];p[e++]=s*t*a*l?1:0}else p[e++]=s}}return new s.Z({width:h,height:c,pixelType:a,pixels:l,mask:p})}function L(e,t,r){if(!u(e))return null;const{width:n,height:o}=t;let{width:i,height:s}=e;const a=new Map,l={x:0,y:0},h=null==r?1:1+r;let c=e;for(let e=0;e<h;e++){const r=Math.ceil(i/n),u=Math.ceil(s/o);for(let i=0;i<u;i++){l.y=i*o;for(let o=0;o<r;o++){l.x=o*n;const r=D(c,l,t);a.set(`${e}/${i}/${o}`,r)}}e<h-1&&(c=R(c)),i=Math.round(i/2),s=Math.round(s/2)}return a}function _(e,t,r,n,o=0){const{width:i,height:s}=e,{width:a,height:l}=t,u=n.cols,h=n.rows,c=Math.ceil(a/u-.1/u),f=Math.ceil(l/h-.1/h);let d,p,g,m,y,w,C;const b=c*u,x=b*f*h,k=new Float32Array(x),v=new Float32Array(x),T=new Uint32Array(x),S=new Uint32Array(x);let A,I,P=0;for(let e=0;e<f;e++)for(let t=0;t<c;t++){d=12*(e*c+t),p=r[d],g=r[d+1],m=r[d+2],y=r[d+3],w=r[d+4],C=r[d+5];for(let r=0;r<h;r++){P=(e*h+r)*b+t*u,I=(r+.5)/h;for(let e=0;e<r;e++)A=(e+.5)/u,k[P+e]=(p*A+g*I+m)*i+o,v[P+e]=(y*A+w*I+C)*s+o,T[P+e]=Math.floor(k[P+e]),S[P+e]=Math.floor(v[P+e])}d+=6,p=r[d],g=r[d+1],m=r[d+2],y=r[d+3],w=r[d+4],C=r[d+5];for(let r=0;r<h;r++){P=(e*h+r)*b+t*u,I=(r+.5)/h;for(let e=r;e<u;e++)A=(e+.5)/u,k[P+e]=(p*A+g*I+m)*i+o,v[P+e]=(y*A+w*I+C)*s+o,T[P+e]=Math.floor(k[P+e]),S[P+e]=Math.floor(v[P+e])}}return{offsets_x:k,offsets_y:v,offsets_xi:T,offsets_yi:S,gridWidth:b}}function B(e,t){const{coefficients:r,spacing:n}=t,{offsets_x:o,offsets_y:i,gridWidth:s}=_(e,e,r,{rows:n[0],cols:n[1]}),{width:a,height:l}=e,u=new Float32Array(a*l),h=180/Math.PI;for(let e=0;e<l;e++)for(let t=0;t<a;t++){const r=e*s+t,n=0===e?r:r-s,c=e===l-1?r:r+s,f=o[n]-o[c],d=i[c]-i[n];if(isNaN(f)||isNaN(d))u[e*a+t]=90;else{let r=Math.atan2(d,f)*h;r=(360+r)%360,u[e*a+t]=r}}return u}function U(e,t,r,n,o="nearest"){if(!u(e))return null;"majority"===o&&(e=I(e));const{pixels:i,mask:a,pixelType:l}=e,h=e.width,c=e.height,f=s.Z.getPixelArrayConstructor(l),d=i.length,{width:p,height:g}=t;let m=!1;for(let e=0;e<r.length;e+=3)-1===r[e]&&-1===r[e+1]&&-1===r[e+2]&&(m=!0);const{offsets_x:y,offsets_y:w,offsets_xi:C,offsets_yi:b,gridWidth:x}=_({width:h,height:c},t,r,n,"majority"===o?.5:0);let k;const v=(e,t,r)=>{const n=e instanceof Float32Array||e instanceof Float64Array?0:.5;for(let o=0;o<g;o++){k=o*x;for(let i=0;i<p;i++){if(y[k]<0||w[k]<0)e[o*p+i]=0;else if(r)e[o*p+i]=t[C[k]+b[k]*h];else{const r=Math.floor(y[k]),s=Math.floor(w[k]),l=Math.ceil(y[k]),u=Math.ceil(w[k]),c=y[k]-r,f=w[k]-s;if(!a||a[r+s*h]&&a[l+s*h]&&a[r+u*h]&&a[l+u*h]){const a=(1-c)*t[r+s*h]+c*t[l+s*h],d=(1-c)*t[r+u*h]+c*t[l+u*h];e[o*p+i]=(1-f)*a+f*d+n}else e[o*p+i]=t[C[k]+b[k]*h]}k++}}},T=[];let S;for(let e=0;e<d;e++)S=new f(p*g),v(S,i[e],"nearest"===o||"majority"===o),T.push(S);const A=new s.Z({width:p,height:g,pixelType:l,pixels:T});if(null!=a)A.mask=new Uint8Array(p*g),v(A.mask,a,!0);else if(m){A.mask=new Uint8Array(p*g);for(let e=0;e<p*g;e++)A.mask[e]=y[e]<0||w[e]<0?0:1}return A.updateStatistics(),A}},15612:(e,t,r)=>{r.d(t,{AV:()=>m,Hv:()=>p,Oh:()=>g,ZF:()=>c,dy:()=>w,hE:()=>h,js:()=>d,oc:()=>u,um:()=>y});var n=r(70586),o=r(5847),i=r(81578),s=r(75509);const a=1,l=[.299,.587,.114];function u(e,t=256){t=Math.min(t,256);const{size:r,counts:n}=e,o=new Uint8Array(r),i=n.reduce(((e,r)=>e+r/t),0);let s=0,a=0,l=0,u=i;for(let e=0;e<r;e++)if(l+=n[e],!(e<r-1&&l+n[e+1]<u)){for(;s<t-1&&u<l;)s++,u+=i;for(let t=a;t<=e;t++)o[t]=s;a=e+1}for(let e=a;e<r;e++)o[e]=t-1;return o}function h(e){const{minCutOff:t,maxCutOff:r,gamma:n,pixelType:o,rounding:i}=e,s=e.outMin||0,a=e.outMax||255;if(!["u8","u16","s8","s16"].includes(o))return null;const l=t.length;let u,h,c=0;"s8"===o?c=-127:"s16"===o&&(c=-32767);let f=256;["u16","s16"].includes(o)&&(f=65536);const d=[],p=[],g=a-s;for(u=0;u<l;u++)p[u]=r[u]-t[u],d[u]=0===p[u]?0:g/p[u];let m;const w=[];let C,b,x;if(n&&n.length>=l){const e=y(l,n);for(u=0;u<l;u++){for(x=[],h=0;h<f;h++)if(0!==p[u])if(C=h+c,m=(C-t[u])/p[u],b=1,n[u]>1&&(b-=(1/g)**(m*e[u])),C<r[u]&&C>t[u]){const e=b*g*m**(1/n[u])+s;x[h]="floor"===i?Math.floor(e):"round"===i?Math.round(e):e}else C>=r[u]?x[h]=a:x[h]=s;else x[h]=s;w[u]=x}}else for(u=0;u<l;u++){for(x=[],h=0;h<f;h++)if(C=h+c,C<=t[u])x[h]=s;else if(C>=r[u])x[h]=a;else{const e=(C-t[u])*d[u]+s;x[h]="floor"===i?Math.floor(e):"round"===i?Math.round(e):e}w[u]=x}if(null!=e.contrastOffset){const t=function(e,t){const r=Math.min(Math.max(e,-100),100),n=Math.min(Math.max(t??0,-100),100),o=255;let i=0,s=0;const a=new Uint8Array(256);for(i=0;i<256;i++)r>0&&r<100?s=(200*i-25500+510*n)/(2*(100-r))+128:r<=0&&r>-100?s=(200*i-25500+510*n)*(100+r)/2e4+128:100===r?(s=200*i-25500+256*(100-r)+510*n,s=s>0?o:0):-100===r&&(s=128),a[i]=s>o?o:s<0?0:s;return a}(e.contrastOffset,e.brightnessOffset);for(u=0;u<l;u++)for(x=w[u],h=0;h<f;h++)x[h]=t[x[h]]}return{lut:w,offset:c}}function c(e,t,r){const n=[];for(let o=0;o<t.length;o++){let i=0,s=0,a=0;"min"in t[o]?({min:i,max:s,avg:a}=t[o]):[i,s,a]=t[o];let u=a??0;"u8"!==e&&(u=255*(u-i)/(s-i)),r&&(u*=l[o]),n.push(f(u))}return n}function f(e){if(e<=0||e>=255)return a;let t=0;150!==e&&(t=e<=150?45*Math.cos(.01047*e):17*Math.sin(.021*e));const r=e+t,n=Math.log(e/255),o=Math.log(r/255);if(0===o)return a;const i=n/o;return isNaN(i)?a:Math.min(9.9,Math.max(.01,i))}function d(e){const{pixels:t,mask:r,pixelType:n}=e,o=t.map((e=>function(e,t,r,n){let o=1/0,i=-1/0,s=0,a=0;const l=e.length;for(let r=0;r<l;r++){const n=e[r];t&&!t[r]||(o=n<o?n:o,i=n>i?n:i,s+=n,a++)}if(0===a)return{statistics:{min:0,max:0,avg:0,stddev:0},histogram:null};const u=s/a;let h=0;for(let r=0;r<l;r++)t&&!t[r]||(h+=(e[r]-u)**2);const c=t?t.filter((e=>e)).length:l,f={min:o,max:i,avg:u,stddev:c<=1?0:Math.sqrt(h/(c-1))};const d=256,p=new Uint32Array(d);if("u8"===r){for(let r=0;r<l;r++)t&&!t[r]||p[e[r]]++;return{statistics:f,histogram:{min:-.5,max:255.5,size:d,counts:p}}}const g=(i-o)/d;if(0===g){let e=0;if(null==t)e=l;else for(let r=0;r<l;r++)t[r]&&e++;return{statistics:f,histogram:{min:-.5,max:255.5,size:1,counts:new Uint32Array(1).fill(e)}}}const m=new Uint32Array(257);for(let r=0;r<l;r++)t&&!t[r]||m[Math.floor((e[r]-o)/g)]++;for(let e=0;e<255;e++)p[e]=m[e];return p[255]=m[255]+m[d],{statistics:f,histogram:{min:-.5,max:255.5,size:d,counts:p}}}(e,r,n)));return{statistics:o.map((({statistics:e})=>e)),histograms:o.map((({histogram:e})=>e))}}function p(e){if(null==e||!e.pixels?.length)return null;const{pixels:t,mask:r,pixelType:n}=e,o=e.width*e.height,i=t.length;let s,a,l,u,h;const c=[],f=[];let d,p,g,m,y,w,C,b,x,k;const v=256;for(u=0;u<i;u++){if(d=new Uint32Array(v),g=t[u],"u8"===n)if(s=-.5,a=255.5,r)for(h=0;h<o;h++)r[h]&&d[g[h]]++;else for(h=0;h<o;h++)d[g[h]]++;else{let t=!1;e.statistics||(e.updateStatistics(),t=!0);const n=e.statistics;if(s=n[u].minValue,a=n[u].maxValue,l=(a-s)/v,0===l){!n||e.validPixelCount||t||e.updateStatistics();const r=(e.validPixelCount||e.width*e.height)/v;for(let e=0;e<v;e++)d[e]=Math.round(r*(e+1))-Math.round(r*e)}else{for(p=new Uint32Array(257),h=0;h<o;h++)r&&!r[h]||p[Math.floor((g[h]-s)/l)]++;for(h=0;h<255;h++)d[h]=p[h];d[255]=p[255]+p[v]}}for(c.push({min:s,max:a,size:v,counts:d}),m=0,y=0,b=0,h=0;h<v;h++)m+=d[h],y+=h*d[h];for(x=y/m,h=0;h<v;h++)b+=d[h]*(h-x)**2;k=Math.sqrt(b/(m-1)),l=(a-s)/v,w=(x+.5)*l+s,C=k*l,f.push({min:s,max:a,avg:w,stddev:C})}return{statistics:f,histograms:c}}function g(e){const t=[];for(let r=0;r<e.length;r++){const{min:n,max:o,size:i,counts:s}=e[r];let a=0,l=0;for(let e=0;e<i;e++)a+=s[e],l+=e*s[e];const u=l/a;let h=0;for(let e=0;e<i;e++)h+=s[e]*(e-u)**2;const c=(o-n)/i,f=(u+.5)*c+n,d=Math.sqrt(h/(a-1))*c;t.push({min:n,max:o,avg:f,stddev:d})}return t}function m(e,t){const{pixelBlock:r,bandIds:o,returnHistogramLut:a,rasterInfo:l}=t;let h=null,c=null,f=e.stretchType;if("number"==typeof f&&(f=s.J[f]),e.dra)if("minMax"===f&&null!=r&&r.statistics)h=r.statistics.map((e=>[e.minValue,e.maxValue,0,0]));else{const e=p(r);h=null!=e?e.statistics:null,c=null!=e?e.histograms:null}else h=e.statistics?.length>0?e.statistics:l.statistics,c=e.histograms||l.histograms;"percentClip"!==f&&"histogramEqualization"!==f||c?.length||(f="minMax");const d=h?.length||c?.length||l.bandCount,g=[],m=[];let y,w,C,b,x,k,v,T,S;h&&!Array.isArray(h[0])&&(h=h.map((e=>[e.min,e.max,e.avg,e.stddev])));const[A,I]=(0,i.r)(l.pixelType);if(!h?.length){for(h=[],T=0;T<d;T++)h.push([A,I,1,1]);"standardDeviation"===f&&(f="minMax")}switch(f){case"none":for(T=0;T<d;T++)g[T]=A,m[T]=I;break;case"minMax":for(T=0;T<d;T++)g[T]=h[T][0],m[T]=h[T][1];break;case"standardDeviation":for(T=0;T<d;T++)g[T]=h[T][2]-e.numberOfStandardDeviations*h[T][3],m[T]=h[T][2]+e.numberOfStandardDeviations*h[T][3],g[T]<h[T][0]&&(g[T]=h[T][0]),m[T]>h[T][1]&&(m[T]=h[T][1]);break;case"histogramEqualization":for((0,n.O3)(c),T=0;T<d;T++)g[T]=c[T].min,m[T]=c[T].max;break;case"percentClip":for((0,n.O3)(c),T=0;T<c.length;T++){for(y=c[T],x=new Uint32Array(y.size),b=[...y.counts],b.length>=20&&(b[0]=b[1]=b[2]=b[b.length-1]=b[b.length-2]=0),C=0,w=(y.max-y.min)/y.size,v=-.5===y.min&&1===w?.5:0,S=0;S<y.size;S++)C+=b[S],x[S]=C;for(k=(e.minPercent||0)*C/100,g[T]=y.min+v,S=0;S<y.size;S++)if(x[S]>k){g[T]=y.min+w*(S+v);break}for(k=(1-(e.maxPercent||0)/100)*C,m[T]=y.max+v,S=y.size-2;S>=0;S--)if(x[S]<k){m[T]=y.min+w*(S+2-v);break}if(m[T]<g[T]){const e=g[T];g[T]=m[T],m[T]=e}}break;default:for(T=0;T<d;T++)g[T]=h[T][0],m[T]=h[T][1]}let P,M,E;return"histogramEqualization"===f?((0,n.O3)(c),M=c[0].size||256,P=0,a&&(E=c.map((e=>u(e))))):(M=e.max||255,P=e.min||0),function(e,t){if(null==t||0===t.length)return e;const r=Math.max.apply(null,t),{minCutOff:n,maxCutOff:o,outMin:i,outMax:s,histogramLut:a}=e;return n.length===t.length||n.length<=r?e:{minCutOff:t.map((e=>n[e])),maxCutOff:t.map((e=>o[e])),histogramLut:a?t.map((e=>a[e])):null,outMin:i,outMax:s}}({minCutOff:g,maxCutOff:m,outMax:M,outMin:P,histogramLut:E},o)}function y(e,t){const r=new Float32Array(e);for(let n=0;n<e;n++)t[n]>1?t[n]>2?r[n]=6.5+(t[n]-2)**2.5:r[n]=6.5+100*(2-t[n])**4:r[n]=1;return r}function w(e,t){if(null==e||!e.pixels?.length)return e;const{mask:r,width:n,height:i,pixels:s}=e,{minCutOff:a,maxCutOff:l,gamma:u}=t,h=t.outMin||0,c=t.outMax||255,f=n*i,d=t.outputPixelType||"u8",p=e.pixels.map((()=>o.Z.createEmptyBand(d,f))),g=p.length;let m,w,C,b,x;const k=c-h,v=[],T=[];for(m=0;m<g;m++)T[m]=l[m]-a[m],v[m]=0===T[m]?0:k/T[m];const S=d.startsWith("u")||d.startsWith("s"),A=u&&u.length>=g,I=!!t.isRenderer;if(A){const e=y(g,u);for(w=0;w<f;w++)if(null==r||r[w])for(m=0;m<g;m++)if(0!==T[m])if(C=s[m][w],x=(C-a[m])/T[m],b=1,u[m]>1&&(b-=(1/k)**(x*e[m])),C<l[m]&&C>a[m]){const e=b*k*x**(1/u[m])+h;p[m][w]=I?Math.floor(e):S?Math.round(e):e}else C>=l[m]?p[m][w]=c:p[m][w]=h;else p[m][w]=h}else for(w=0;w<f;w++)if(null==r||r[w])for(m=0;m<g;m++)if(C=s[m][w],C<l[m]&&C>a[m]){const e=(C-a[m])*v[m]+h;p[m][w]=I?Math.floor(e):S?Math.round(e):e}else C>=l[m]?p[m][w]=c:p[m][w]=h;const P=new o.Z({width:n,height:i,mask:r,pixels:p,pixelType:d});return P.updateStatistics(),P}},63342:(e,t,r)=>{r.d(t,{CX:()=>s,M_:()=>d,Ne:()=>p,TK:()=>a,Ub:()=>c,vC:()=>h,yg:()=>f});var n=r(5847),o=r(55914);const i=1,s=1/111e3;function a(e){let{altitude:t,azimuth:r}=e;const{hillshadeType:n,pixelSizePower:o=1,pixelSizeFactor:i=1,scalingType:a,isGCS:l,resolution:u}=e,h="multi-directional"===n?2*e.zFactor:e.zFactor,{x:c,y:f}=u;let d=h/(8*c),p=h/(8*f);if(l&&h>.001&&(d/=s,p/=s),"adjusted"===a)if(l){const e=c*s,t=f*s;d=(h+e**o*i)/(8*e),p=(h+t**o*i)/(8*t)}else d=(h+c**o*i)/(8*c),p=(h+f**o*i)/(8*f);let g=(90-t)*Math.PI/180,m=Math.cos(g),y=(360-r+90)*Math.PI/180,w=Math.sin(g)*Math.cos(y),C=Math.sin(g)*Math.sin(y);const b=[315,270,225,360,180,0],x=[60,60,60,60,60,90],k=new Float32Array([3,5,3,2,1,4]),v=k.reduce(((e,t)=>e+t)),T=k.map((e=>e/v)),S="multi-directional"===n?b.length:1,A=new Float32Array(6),I=new Float32Array(6),P=new Float32Array(6);if("multi-directional"===n)for(let e=0;e<S;e++)t=x[e],r=b[e],g=(90-t)*Math.PI/180,m=Math.cos(g),y=(360-r+90)*Math.PI/180,w=Math.sin(g)*Math.cos(y),C=Math.sin(g)*Math.sin(y),A[e]=m,I[e]=w,P[e]=C;else A.fill(m),I.fill(w),P.fill(C);return{resolution:u,factor:[d,p],sinZcosA:w,sinZsinA:C,cosZ:m,sinZcosAs:I,sinZsinAs:P,cosZs:A,weights:T,hillshadeType:["traditional","multi-directional"].indexOf(n)}}function l(e,t){const{width:r,height:n,mask:o}=e,s=new Uint8Array(r*n),a=null!=o;if(a)for(let e=0;e<o.length;e++)o[e]&&(s[e]=1);const l=e.pixels[0],u=new Float32Array(r*n),h=new Float32Array(r*n);let c,f=0;if(t){const{resolution:e}=t,o=e?(e.x+e.y)/2:1;f=200*t.zFactor/(o*o),c=new Float32Array(r*n)}const d=t?.curvatureType;let p,g,m,y,w,C,b,x;for(let e=i;e<n-i;e++){const t=e*r;for(let e=i;e<r-i;e++){const n=t+e;if(!a||0!==o[n]){if(a){if(o[n-r-1]+o[n-r]+o[n-r+1]+o[n-1]+o[n+1]+o[n+r-1]+o[n+r]+o[n+r+1]<7){s[n]=0;continue}p=o[n-r-1]?l[n-r-1]:l[n],g=o[n-r]?l[n-r]:l[n],m=o[n-r+1]?l[n-r+1]:l[n],y=o[n-1]?l[n-1]:l[n],w=o[n+1]?l[n+1]:l[n],C=o[n+r-1]?l[n+r-1]:l[n],b=o[n+r]?l[n+r]:l[n],x=o[n+r+1]?l[n+r+1]:l[n]}else p=l[n-r-1],g=l[n-r],m=l[n-r+1],y=l[n-1],w=l[n+1],C=l[n+r-1],b=l[n+r],x=l[n+r+1];if(u[n]=m+w+w+x-(p+y+y+C),h[n]=C+b+b+x-(p+g+g+m),null!=c){const e=l[n],t=.5*(y+w)-e,r=.5*(g+b)-e;if("standard"===d)c[n]=-f*(t+r);else{const e=(-p+m+C-x)/4,o=(-y+w)/2,i=(g-b)/2,s=o*o,a=i*i,l=s+a;l&&(c[n]="profile"===d?f*(t*s+r*a+e*o*i)/l:-f*(t*a+r*s-e*o*i)/l)}}}}}return{outMask:a?s:null,dzxs:u,dzys:h,curvatures:c}}function u(e,t,r){for(let n=0;n<r;n++)e[n*t]=e[n*t+1],e[(n+1)*t-1]=e[(n+1)*t-2];for(let n=1;n<t-1;n++)e[n]=e[n+t],e[n+(r-1)*t]=e[n+(r-2)*t]}function h(e,t){if(!(0,o.nk)(e))return e;const{factor:r,sinZcosA:s,sinZsinA:h,cosZ:c,sinZcosAs:f,sinZsinAs:d,cosZs:p,weights:g}=a(t),[m,y]=r,w="traditional"===t.hillshadeType,{width:C,height:b}=e,x=new Uint8Array(C*b),{dzxs:k,dzys:v,outMask:T}=l(e);for(let e=i;e<b-i;e++){const t=e*C;for(let e=i;e<C-i;e++){const r=t+e;if(!T||T[r]){const e=k[r]*m,t=v[r]*y,n=Math.sqrt(1+e*e+t*t);let o=0;if(w){let r=255*(c+h*t-s*e)/n;r<0&&(r=0),o=r}else{const r=d.length;for(let i=0;i<r;i++){let r=255*(p[i]+d[i]*t-f[i]*e)/n;r<0&&(r=0),o+=r*g[i]}}x[r]=255&o}}}return u(x,C,b),new n.Z({width:C,height:b,pixels:[x],mask:T,pixelType:"u8",validPixelCount:e.validPixelCount,statistics:[{minValue:0,maxValue:255}]})}function c(e,t,r,n){if(!(0,o.nk)(e)||!(0,o.nk)(t))return;const{min:i,max:s}=n,a=e.pixels[0],{pixels:l,mask:u}=t,h=l[0],c=255.00001/(s-i),f=new Uint8ClampedArray(h.length),d=new Uint8ClampedArray(h.length),p=new Uint8ClampedArray(h.length),g=r.length-1;for(let e=0;e<h.length;e++){if(u&&0===u[e])continue;const t=Math.floor((h[e]-i)*c),[n,o]=r[t<0?0:t>g?g:t],s=a[e],l=s*o,m=l*(1-Math.abs(n%2-1)),y=s-l;switch(Math.floor(n)){case 0:f[e]=l+y,d[e]=m+y,p[e]=y;break;case 1:f[e]=m+y,d[e]=l+y,p[e]=y;break;case 2:f[e]=y,d[e]=l+y,p[e]=m+y;break;case 3:f[e]=y,d[e]=m+y,p[e]=l+y;break;case 4:f[e]=m+y,d[e]=y,p[e]=l+y;break;case 5:case 6:f[e]=l+y,d[e]=y,p[e]=m+y}}e.pixels=[f,d,p],e.updateStatistics()}function f(e,t){if(!(0,o.nk)(e))return e;const r=t.zFactor,a=t.pixelSizePower??1,h=t.pixelSizeFactor??1,c=t.slopeType,f=t.isGCS,{x:d,y:p}=t.resolution;let g=r/(8*d),m=r/(8*p);f&&Math.abs(r-1)<1e-4&&(g/=s,m/=s),"adjusted"===c&&(g=(r+d**a*h)/(8*d),m=(r+p**a*h)/(8*p));const{dzxs:y,dzys:w,outMask:C}=l(e),{width:b,height:x}=e,k=new Float32Array(b*x);for(let e=i;e<x-i;e++){const t=e*b;for(let e=i;e<b-i;e++){const r=t+e;if(!C||C[r]){const n=y[r]*g,o=w[r]*m,i=Math.sqrt(n*n+o*o);k[t+e]="percent-rise"===c?100*i:57.2957795*Math.atan(i)}}}u(k,b,x);const v=new n.Z({width:b,height:x,pixels:[k],mask:C,pixelType:"f32",validPixelCount:e.validPixelCount});return v.updateStatistics(),v}function d(e,t={}){if(!(0,o.nk)(e))return e;const{resolution:r}=t,s=r?1/r.x:1,a=r?1/r.y:1,{dzxs:h,dzys:c,outMask:f}=l(e),{width:d,height:p}=e,g=new Float32Array(d*p);for(let e=i;e<p-i;e++){const t=e*d;for(let e=i;e<d-i;e++){const r=t+e;if(!f||f[r]){const n=h[r]*s,o=c[r]*a;let i=-1;0===n&&0===o||(i=90-57.29578*Math.atan2(o,-n),i<0&&(i+=360),360===i?i=0:i>360&&(i%=360)),g[t+e]=i}}}return u(g,d,p),new n.Z({width:d,height:p,pixels:[g],mask:f,pixelType:"f32",validPixelCount:e.validPixelCount,statistics:[{minValue:-1,maxValue:360}]})}function p(e,t){if(!(0,o.nk)(e))return e;const{curvatures:r,outMask:i}=l(e,t),{width:s,height:a}=e;u(r,s,a);const h=new n.Z({width:s,height:a,pixels:[r],mask:i,pixelType:"f32",validPixelCount:e.validPixelCount});return h.updateStatistics(),h}},80676:(e,t,r)=>{r.d(t,{KC:()=>p,NL:()=>l,QI:()=>g,Tg:()=>c,Yx:()=>u,xQ:()=>d});var n=r(35454),o=r(5847),i=r(55914);const s=new Map;s.set("meter-per-second",1),s.set("kilometer-per-hour",.277778),s.set("knots",.514444),s.set("feet-per-second",.3048),s.set("mile-per-hour",.44704);const a=180/Math.PI,l=new n.X({esriMetersPerSecond:"meter-per-second",esriKilometersPerHour:"kilometer-per-hour",esriKnots:"knots",esriFeetPerSecond:"feet-per-second",esriMilesPerHour:"mile-per-hour"});function u(e,t){return s.get(e)/s.get(t)||1}function h(e){return(450-e)%360}function c(e,t="geographic"){const[r,n]=e,o=Math.sqrt(r*r+n*n);let i=Math.atan2(n,r)*a;return i=(360+i)%360,"geographic"===t&&(i=h(i)),[o,i]}function f(e,t="geographic"){let r=e[1];"geographic"===t&&(r=h(r)),r%=360;const n=e[0];return[n*Math.cos(r/a),n*Math.sin(r/a)]}function d(e,t,r,n="geographic"){if(!(0,i.nk)(e)||null==r)return e;const o="vector-magdir"===t?e.clone():p(e,t),s=o.pixels[1];for(let e=0;e<s.length;e++)s[e]="geographic"===n?(s[e]+r[e]+270)%360:(s[e]+360-r[e])%360;return"vector-magdir"===t?o:p(o,"vector-magdir")}function p(e,t,r="geographic",n=1){if(!(0,i.nk)(e))return e;const{pixels:s,width:a,height:l}=e,u=a*l,h=s[0],d=s[1],p=e.pixelType.startsWith("f")?e.pixelType:"f32",g=o.Z.createEmptyBand(p,u),m=o.Z.createEmptyBand(p,u);let y=0;for(let e=0;e<l;e++)for(let e=0;e<a;e++)"vector-uv"===t?([g[y],m[y]]=c([h[y],d[y]],r),g[y]*=n):([g[y],m[y]]=f([h[y],d[y]],r),g[y]*=n,m[y]*=n),y++;const w=new o.Z({pixelType:p,width:e.width,height:e.height,mask:e.mask,validPixelCount:e.validPixelCount,maskIsAlpha:e.maskIsAlpha,pixels:[g,m]});return w.updateStatistics(),w}function g(e,t,r=1){if(1===r||!(0,i.nk)(e))return e;const n=e.clone(),{pixels:o,width:s,height:a}=n,l=o[0],u=o[1];let h=0;for(let e=0;e<a;e++)for(let e=0;e<s;e++)"vector-uv"===t?(l[h]*=r,u[h]*=r):l[h]*=r,h++;return n.updateStatistics(),n}function m(e,t,r,n=1){const o=Math.sqrt(e*e+t*t)/n,i=(2*Math.PI+Math.atan2(t,e))%(2*Math.PI);return[o,(2*Math.PI+i-r)%(2*Math.PI)]}!function(e=0,t=0,r=Math.PI,n=!0){n&&(r=(2*Math.PI-r)%(2*Math.PI));const o=n?-1:1,i=13*o,s=-7*o,a=-2*o,l=-16*o,u=21.75,[h,c]=m(0,t+i,r,u),[f,d]=m(e-5.5,t+s,r,u),[p,g]=m(e+5.5,t+s,r,u),[y,w]=m(e-1.5,t+a,r,u),[C,b]=m(e+1.5,t+a,r,u),[x,k]=m(e-1.5,t+l,r,u),[v,T]=m(e+1.5,t+l,r,u)}(0,0,0)},72758:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(43697),o=r(3892),i=r(96674),s=r(92604),a=r(5600),l=(r(75215),r(67676),r(80442),r(52011)),u=r(48526),h=r(55914),c=r(15612),f=r(63342),d=r(93010);let p=class extends i.wq{constructor(e){super(e)}bind(){const{rendererJSON:e}=this;if(!e)return{success:!1};let t;switch(this.lookup={rendererJSON:{}},e.type){case"uniqueValue":t=this._updateUVRenderer(e);break;case"rasterColormap":t=this._updateColormapRenderer(e);break;case"rasterStretch":t=this._updateStretchRenderer(e);break;case"classBreaks":t=this._updateClassBreaksRenderer(e);break;case"rasterShadedRelief":t=this._updateShadedReliefRenderer(e);break;case"vectorField":t=this._updateVectorFieldRenderer();break;case"flowRenderer":t=this._updateFlowRenderer()}return t}symbolize(e){let t=e&&e.pixelBlock;if(!g(t))return t;if(e.simpleStretchParams&&"rasterStretch"===this.rendererJSON.type)return this.simpleStretch(t,e.simpleStretchParams);try{let r;switch(t.pixels.length>3&&(t=(0,h.qF)(t,[0,1,2])),this.rendererJSON.type){case"uniqueValue":case"rasterColormap":r=this._symbolizeColormap(t);break;case"classBreaks":r=this._symbolizeClassBreaks(t);break;case"rasterStretch":r=this._symbolizeStretch(t,e.bandIds);break;case"rasterShadedRelief":{const n=e.extent,o=n.spatialReference.isGeographic,i={x:(n.xmax-n.xmin)/t.width,y:(n.ymax-n.ymin)/t.height};r=this._symbolizeShadedRelief(t,{isGCS:o,resolution:i});break}}return r}catch(e){return s.Z.getLogger(this.declaredClass).error("symbolize",e.message),t}}simpleStretch(e,t){if(!g(e))return e;try{return e.pixels.length>3&&(e=(0,h.qF)(e,[0,1,2])),(0,c.dy)(e,{...t,isRenderer:!0})}catch(t){return s.Z.getLogger(this.declaredClass).error("symbolize",t.message),e}}generateWebGLParameters(e){if(["uniqueValue","rasterColormap","classBreaks"].includes(this.rendererJSON.type)){const{indexedColormap:e,offset:t}=this.lookup.colormapLut||{};return{colormap:e,colormapOffset:t,type:"lut"}}const{pixelBlock:t,isGCS:r,resolution:n,bandIds:o}=e,{rendererJSON:i}=this;return"rasterStretch"===i.type?this._generateStretchWebGLParams(t,i,o):"rasterShadedRelief"===i.type?this._generateShadedReliefWebGLParams(i,r,n??void 0):"vectorField"===i.type?this._generateVectorFieldWebGLParams(i):null}_isLUTChanged(e){if(!this.lookup||!this.lookup.rendererJSON)return!0;if("colorRamp"in this.rendererJSON){const t=this.rendererJSON.colorRamp;return e?JSON.stringify(t)!==JSON.stringify(this.lookup.rendererJSON.colorRamp):(this.rendererJSON,this.lookup.rendererJSON,JSON.stringify(this.rendererJSON)!==JSON.stringify(this.lookup.rendererJSON))}return JSON.stringify(this.rendererJSON)!==JSON.stringify(this.lookup.rendererJSON)}_symbolizeColormap(e){return this._isLUTChanged()&&!this.bind().success?e:(0,h.SJ)(e,this.lookup.colormapLut)}_symbolizeClassBreaks(e){const{canUseIndexedLUT:t}=this._analyzeClassBreaks(this.rendererJSON);return this._isLUTChanged()&&!this.bind().success?e:t?(0,h.SJ)(e,this.lookup.colormapLut):(0,h.zp)(e,this.lookup.remapLut??[])}_symbolizeStretch(e,t){const{rasterInfo:r}=this,{pixelType:n,bandCount:o}=r,i=this.rendererJSON,s=["u8","u16","s8","s16"].includes(n);let a,l;const{dra:u}=i,{gamma:f}=this.lookup;if("histogramEqualization"===i.stretchType){const n=u?null:this.lookup?.histogramLut,o=(0,c.AV)(i,{rasterInfo:r,pixelBlock:e,bandIds:t,returnHistogramLut:!n}),s=(0,c.dy)(e,{...o,gamma:f,isRenderer:!0});l=(0,h.XV)(s,{lut:u?o.histogramLut:n,offset:0})}else if(s){if(u){const o=(0,c.AV)(i,{rasterInfo:r,pixelBlock:e,bandIds:t});a=(0,c.hE)({pixelType:n,...o,gamma:f,rounding:"floor"})}else if(this._isLUTChanged()){if(!this.bind().success)return e;a=this.lookup?this.lookup.stretchLut:null}else a=this.lookup?this.lookup.stretchLut:null;if(!a)return e;o>1&&null!=t&&t.length===e?.pixels.length&&a?.lut.length===o&&(a={lut:t.map((e=>a.lut[e])),offset:a.offset}),l=(0,h.XV)(e,a)}else{const n=(0,c.AV)(i,{rasterInfo:r,pixelBlock:e,bandIds:t});l=(0,c.dy)(e,{...n,gamma:f,isRenderer:!0})}if(i.colorRamp){if(this._isLUTChanged(!0)&&!this.bind().success)return e;l=(0,h.SJ)(l,this.lookup?.colormapLut)}return l}_symbolizeShadedRelief(e,t){const r=this.rendererJSON,n={...r,...t},o=(0,f.vC)(e,n);if(!r.colorRamp)return o;let i;if(this._isLUTChanged(!0)){if(!this.bind().success)return o;i=this.lookup?this.lookup.hsvMap:null}else i=this.lookup?this.lookup.hsvMap:null;if(!i)return o;const s=this.rasterInfo.statistics?.[0]??{min:0,max:8e3};return(0,f.Ub)(o,e,i,s),o}_isVectorFieldData(){const{bandCount:e,dataType:t}=this.rasterInfo;return 2===e&&("vector-magdir"===t||"vector-uv"===t)}_updateVectorFieldRenderer(){return this._isVectorFieldData()?{success:!0}:{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; VectorFieldRenderer only supports "vector-magdir" and "vector-uv".`}}_updateFlowRenderer(){return this._isVectorFieldData()?{success:!0}:{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; FlowRenderer only supports "vector-magdir" and "vector-uv".`}}_updateUVRenderer(e){const{bandCount:t,attributeTable:r,pixelType:n}=this.rasterInfo,o=e.field1;if(!o)return{success:!1,error:"Unsupported renderer; missing UniqueValueRenderer.field."};const i=e.defaultSymbol,s=1===t&&["u8","s8"].includes(n);if(!function(e,t){const{attributeTable:r,bandCount:n}=e;return!(null==r||n>1||t&&null==r.fields.find((e=>e.name.toLowerCase()===t.toLowerCase())))}(this.rasterInfo,o)&&!s)return{success:!1,error:"Unsupported data; UniqueValueRenderer is only supported on single band data with a valid raster attribute table."};const a=[];if(null!=r){const t=r.fields.find((e=>"value"===e.name.toLowerCase()));if(!t)return{success:!1,error:"Unsupported data; the data's raster attribute table does not have a value field."};r.features.forEach((r=>{const n=e.uniqueValueInfos?.find((e=>String(e.value)===String(r.attributes[o]))),s=n?.symbol?.color;s?a.push([r.attributes[t.name]].concat(s)):i&&a.push([r.attributes[t.name]].concat(i.color))}))}else{if("value"!==o.toLowerCase())return{success:!1,error:'Unsupported renderer; UniqueValueRenderer.field must be "Value" when raster attribute table is not availalbe.'};e.uniqueValueInfos?.forEach((e=>{const t=e?.symbol?.color;t?a.push([parseInt(""+e.value,10)].concat(t)):i&&a.push([parseInt(""+e.value,10)].concat(i?.color))}))}if(0===a.length)return{success:!1,error:"Invalid UniqueValueRenderer. Cannot find matching records in the raster attribute table."};const l=(0,h.Pz)({colormap:a});return this.lookup={rendererJSON:e,colormapLut:l},this.canRenderInWebGL=!0,{success:!0}}_updateColormapRenderer(e){if(!function(e){const{bandCount:t,colormap:r}=e;return null!=r&&r.length>0&&1===t}(this.rasterInfo))return{success:!1,error:"Unsupported data; the data source does not have a colormap."};const t=e.colormapInfos.map((e=>[e.value].concat(e.color))).sort(((e,t)=>e[0]-t[0]));if(!t||0===t.length)return{success:!1,error:"Unsupported renderer; ColormapRenderer must have meaningful colormapInfos."};const r=(0,h.Pz)({colormap:t});return this.lookup={rendererJSON:e,colormapLut:r},this.canRenderInWebGL=!0,{success:!0}}_updateShadedReliefRenderer(e){if(!function(e){const{bandCount:t,dataType:r,pixelType:n}=e;return"elevation"===r||"generic"===r&&1===t&&("s16"===n||"f32"===n||"f64"===n)}(this.rasterInfo))return{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; ShadedReliefRenderer only supports "elevation", or single band float/s16 data.`};if(e.colorRamp){const t=(0,d.Jw)(e.colorRamp,{interpolateAlpha:!0}),r=(0,h.Pz)({colormap:t}),n=[],i=r.indexedColormap;for(let e=0;e<i.length;e+=4){const t=(0,o._Y)({r:i[e],g:i[e+1],b:i[e+2]});n.push([t.h/60,t.s/100,255*t.v/100])}this.lookup={rendererJSON:e,colormapLut:r,hsvMap:n}}else this.lookup=null;return this.canRenderInWebGL=!0,{success:!0}}_analyzeClassBreaks(e){const{attributeTable:t,pixelType:r}=this.rasterInfo,n=null!=t?t.fields.find((e=>"value"===e.name.toLowerCase())):null,o=null!=t?t.fields.find((t=>t.name.toLowerCase()===e.field.toLowerCase())):null,i=null!=n&&null!==o;return{canUseIndexedLUT:["u8","u16","s8","s16"].includes(r)||i,tableValueField:n,tableBreakField:o}}_updateClassBreaksRenderer(e){const{attributeTable:t}=this.rasterInfo,{canUseIndexedLUT:r,tableValueField:n,tableBreakField:o}=this._analyzeClassBreaks(e),i=e.classBreakInfos;if(!i?.length)return{success:!1,error:"Unsupported renderer; missing or invalid ClassBreaksRenderer.classBreakInfos."};const s=i.sort(((e,t)=>e.classMaxValue-t.classMaxValue)),a=s[s.length-1];let l=e.minValue;if(!r){const t=[];for(let e=0;e<s.length;e++)t.push({value:s[e].classMinValue??l,mappedColor:s[e].symbol.color}),l=s[e].classMaxValue;return t.push({value:a.classMaxValue,mappedColor:a.symbol.color}),this.lookup={rendererJSON:e,remapLut:t},this.canRenderInWebGL=!1,{success:!0}}const u=[];if(null!=t&&null!=n&&null!==o&&n!==o){const r=n.name,i=o.name,a=s[s.length-1],{classMaxValue:h}=a;l=e.minValue;for(const e of t.features){const t=e.attributes[r],n=e.attributes[i],o=n===h?a:n<l?null:s.find((({classMaxValue:e})=>e>n));o&&u.push([t].concat(o.symbol.color))}}else{l=Math.floor(e.minValue);for(let e=0;e<s.length;e++){const t=s[e];for(let e=l;e<t.classMaxValue;e++)u.push([e].concat(t.symbol.color));l=Math.ceil(t.classMaxValue)}a.classMaxValue===l&&u.push([a.classMaxValue].concat(a.symbol.color))}const c=(0,h.Pz)({colormap:u,fillUnspecified:!1});return this.lookup={rendererJSON:e,colormapLut:c},this.canRenderInWebGL=!0,{success:!0}}_isHistogramRequired(e){return"percentClip"===e||"histogramEqualization"===e}_isValidRasterStatistics(e){return null!=e&&e.length>0&&null!=e[0].min&&null!=e[0].max}_updateStretchRenderer(e){let{stretchType:t,dra:r}=e;if(!("none"===t||e.statistics?.length||this._isValidRasterStatistics(this.rasterInfo.statistics)||r))return{success:!1,error:"Unsupported renderer; StretchRenderer.statistics is required when dynamic range adjustment is not used."};const n=e.histograms||this.rasterInfo.histograms;!this._isHistogramRequired(e.stretchType)||n?.length||r||(t="minMax");const{computeGamma:o,useGamma:i,colorRamp:s}=e;let{gamma:a}=e;if(i&&o&&!a?.length){const t=e.statistics?.length?e.statistics:this.rasterInfo.statistics;a=(0,c.ZF)(this.rasterInfo.pixelType,t)}const l=this.rasterInfo.pixelType,u=!r&&["u8","u16","s8","s16"].includes(l);if("histogramEqualization"===t){const t=n.map((e=>(0,c.oc)(e)));this.lookup={rendererJSON:e,histogramLut:t}}else if(u){const t=(0,c.AV)(e,{rasterInfo:this.rasterInfo}),r=(0,c.hE)({pixelType:l,...t,gamma:i?a:null,rounding:"floor"});this.lookup={rendererJSON:e,stretchLut:r}}if(s){const t=(0,d.Jw)(s,{interpolateAlpha:!0});this.lookup||(this.lookup={rendererJSON:e}),this.lookup.colormapLut=(0,h.Pz)({colormap:t}),this.lookup.rendererJSON=e}return this.lookup.gamma=i&&a?.length?a:null,this.canRenderInWebGL=!0,{success:!0}}_generateStretchWebGLParams(e,t,r){let n=null,o=null;const i=this.lookup&&this.lookup.colormapLut;t.colorRamp&&i&&(n=i.indexedColormap,o=i.offset),"histogramEqualization"===t.stretchType&&(t={...t,stretchType:"minMax"});const{gamma:s}=this.lookup,a=!!(t.useGamma&&s&&s.some((e=>1!==e))),{minCutOff:l,maxCutOff:u,outMin:h,outMax:f}=(0,c.AV)(t,{rasterInfo:this.rasterInfo,pixelBlock:e,bandIds:r});let d=0;null!=e&&(d=e.getPlaneCount(),2===d&&((e=e.clone()).statistics=[e.statistics[0]],e.pixels=[e.pixels[0]]));const{bandCount:p}=this.rasterInfo,g=Math.min(3,r?.length||d||p,p),m=new Float32Array(g),y=n||a?1:255;let w;for(w=0;w<l.length;w++)m[w]=u[w]===l[w]?0:(f-h)/(u[w]-l[w])/y;const C=new Float32Array(g);if(a&&s)for(w=0;w<g;w++)s[w]>1?s[w]>2?C[w]=6.5+(s[w]-2)**2.5:C[w]=6.5+100*(2-s[w])**4:C[w]=1;return{bandCount:g,outMin:h/y,outMax:f/y,minCutOff:l,maxCutOff:u,factor:m,useGamma:a,gamma:a?s:[1,1,1],gammaCorrection:a?C:[1,1,1],colormap:n,colormapOffset:o,stretchType:t.stretchType,type:"stretch"}}_generateShadedReliefWebGLParams(e,t=!1,r={x:0,y:0}){let n=null,o=null;const i=this.lookup&&this.lookup.colormapLut;e.colorRamp&&i&&(n=i.indexedColormap,o=i.offset);const s={...e,isGCS:t,resolution:r},a=(0,f.TK)(s),l=this.rasterInfo.statistics?.[0];return{...a,minValue:l?.min??0,maxValue:l?.max??8e3,hillshadeType:"traditional"===e.hillshadeType?0:1,type:"hillshade",colormap:n,colormapOffset:o}}_generateVectorFieldWebGLParams(e){const{style:t,inputUnit:r,outputUnit:n,visualVariables:o,symbolTileSize:i,flowRepresentation:s}=e;let a;const l=this.rasterInfo.statistics?.[0].min??0,u=this.rasterInfo.statistics?.[0].max??50,h=o?.find((e=>"sizeInfo"===e.type))??{type:"sizeInfo",field:"Magnitude",maxDataValue:u,maxSize:.8*i,minDataValue:l,minSize:.2*i},c=h.minDataValue??l,f=h.maxDataValue??u,d=null!=h.maxSize&&null!=h.minSize?[h.minSize/i,h.maxSize/i]:[.2,.8];if("wind_speed"===t){const e=(d[0]+d[1])/2;d[0]=d[1]=e}const p=null!=c&&null!=f?[c,f]:null;if("classified_arrow"===t)if(null!=c&&null!=f&&null!=h){a=[];const e=(h.maxDataValue-h.minDataValue)/5;for(let t=0;t<6;t++)a.push(h.minDataValue+e*t)}else a=[0,1e-6,3.5,7,10.5,14];const g="flow_to"===s==("ocean_current_kn"===t||"ocean_current_m"===t)?0:Math.PI,m=o?.find((e=>"rotationInfo"===e.type));return{breakValues:a,dataRange:p,inputUnit:r,outputUnit:n,symbolTileSize:i,symbolPercentRange:d,style:t||"single_arrow",rotation:g,rotationType:this.rasterInfo.storageInfo?.tileInfo&&"vector-uv"===this.rasterInfo.dataType?"geographic":m?.rotationType||e.rotationType,type:"vectorField"}}};function g(e){return(0,h.nk)(e)&&0!==e.validPixelCount}(0,n._)([(0,a.Cb)({json:{write:!0}})],p.prototype,"rendererJSON",void 0),(0,n._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"rasterInfo",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],p.prototype,"lookup",void 0),(0,n._)([(0,a.Cb)()],p.prototype,"canRenderInWebGL",void 0),p=(0,n._)([(0,l.j)("esri.renderers.support.RasterSymbolizer")],p);const m=p},93010:(e,t,r)=>{r.d(t,{B4:()=>f,H0:()=>u,Jw:()=>m,Ms:()=>a,Oi:()=>s,Uh:()=>c,XL:()=>g,io:()=>b,pM:()=>y});var n=r(22303),o=r(3892),i=r(35454);const s=["random","ndvi","ndvi2","ndvi3","elevation","gray","hillshade"],a=[{id:"aspect_predefined",type:"multipart",colorRamps:[{fromColor:[190,190,190],toColor:[255,45,8]},{fromColor:[255,45,8],toColor:[255,181,61]},{fromColor:[255,181,61],toColor:[255,254,52]},{fromColor:[255,254,52],toColor:[0,251,50]},{fromColor:[0,251,50],toColor:[255,254,52]},{fromColor:[0,253,255],toColor:[0,181,255]},{fromColor:[0,181,255],toColor:[26,35,253]},{fromColor:[26,35,253],toColor:[255,57,251]},{fromColor:[255,57,251],toColor:[255,45,8]}]},{id:"blackToWhite_predefined",fromColor:[0,0,0],toColor:[255,255,255]},{id:"blueBright_predefined",fromColor:[204,204,255],toColor:[0,0,224]},{id:"blueLightToDark_predefined",fromColor:[211,229,232],toColor:[46,100,140]},{id:"blueGreenBright_predefined",fromColor:[203,245,234],toColor:[48,207,146]},{id:"blueGreenLightToDark_predefined",fromColor:[216,242,237],toColor:[21,79,74]},{id:"brownLightToDark_predefined",fromColor:[240,236,170],toColor:[102,72,48]},{id:"brownToBlueGreenDivergingBright_predefined",type:"multipart",colorRamps:[{fromColor:[156,85,31],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[33,130,145]}]},{id:"brownToBlueGreenDivergingDark_predefined",type:"multipart",colorRamps:[{fromColor:[110,70,45],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[48,100,102]}]},{id:"coefficientBias_predefined",fromColor:[214,214,255],toColor:[0,57,148]},{id:"coldToHotDiverging_predefined",type:"multipart",colorRamps:[{fromColor:[69,117,181],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[214,47,39]}]},{id:"conditionNumber_predefined",type:"multipart",colorRamps:[{fromColor:[0,97,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,34,0]}]},{id:"cyanToPurple_predefined",type:"multipart",colorRamps:[{fromColor:[0,245,245],toColor:[0,0,245]},{fromColor:[0,0,245],toColor:[245,0,245]}]},{id:"cyanLightToBlueDark_predefined",type:"multipart",colorRamps:[{fromColor:[182,237,240],toColor:[31,131,224]},{fromColor:[31,131,224],toColor:[9,9,145]}]},{id:"distance_predefined",fromColor:[255,200,0],toColor:[0,0,255]},{id:"elevation1_predefined",type:"multipart",colorRamps:[{fromColor:[175,240,233],toColor:[255,255,179]},{fromColor:[255,255,179],toColor:[0,128,64]},{fromColor:[0,128,64],toColor:[252,186,3]},{fromColor:[252,186,3],toColor:[128,0,0]},{fromColor:[120,0,0],toColor:[105,48,13]},{fromColor:[105,48,13],toColor:[171,171,171]},{fromColor:[171,171,171],toColor:[255,252,255]}]},{id:"elevation2_predefined",type:"multipart",colorRamps:[{fromColor:[118,219,211],toColor:[255,255,199]},{fromColor:[255,255,199],toColor:[255,255,128]},{fromColor:[255,255,128],toColor:[217,194,121]},{fromColor:[217,194,121],toColor:[135,96,38]},{fromColor:[135,96,38],toColor:[150,150,181]},{fromColor:[150,150,181],toColor:[181,150,181]},{fromColor:[181,150,181],toColor:[255,252,255]}]},{id:"errors_predefined",fromColor:[255,235,214],toColor:[196,10,10]},{id:"grayLightToDark_predefined",fromColor:[219,219,219],toColor:[69,69,69]},{id:"greenBright_predefined",fromColor:[204,255,204],toColor:[14,204,14]},{id:"greenLightToDark_predefined",fromColor:[220,245,233],toColor:[34,102,51]},{id:"greenToBlue_predefined",type:"multipart",colorRamps:[{fromColor:[32,204,16],toColor:[0,242,242]},{fromColor:[0,242,242],toColor:[2,33,227]}]},{id:"orangeBright_predefined",fromColor:[255,235,204],toColor:[240,118,5]},{id:"orangeLightToDark_predefined",fromColor:[250,233,212],toColor:[171,65,36]},{id:"partialSpectrum_predefined",type:"multipart",colorRamps:[{fromColor:[242,241,162],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]},{fromColor:[252,3,69],toColor:[176,7,237]},{fromColor:[176,7,237],toColor:[2,29,173]}]},{id:"partialSpectrum1Diverging_predefined",type:"multipart",colorRamps:[{fromColor:[135,38,38],toColor:[240,149,12]},{fromColor:[240,149,12],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[74,80,181]},{fromColor:[74,80,181],toColor:[39,32,122]}]},{id:"partialSpectrum2Diverging_predefined",type:"multipart",colorRamps:[{fromColor:[115,77,42],toColor:[201,137,52]},{fromColor:[201,137,52],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[91,63,176]},{fromColor:[91,63,176],toColor:[81,13,97]}]},{id:"pinkToYellowGreenDivergingBright_predefined",type:"multipart",colorRamps:[{fromColor:[158,30,113],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[99,110,45]}]},{id:"pinkToYellowGreenDivergingDark_predefined",type:"multipart",colorRamps:[{fromColor:[97,47,73],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[22,59,15]}]},{id:"precipitation_predefined",type:"multipart",colorRamps:[{fromColor:[194,82,60],toColor:[237,161,19]},{fromColor:[237,161,19],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,219,0]},{fromColor:[0,219,0],toColor:[32,153,143]},{fromColor:[32,153,143],toColor:[11,44,122]}]},{id:"prediction_predefined",type:"multipart",colorRamps:[{fromColor:[40,146,199],toColor:[250,250,100]},{fromColor:[250,250,100],toColor:[232,16,20]}]},{id:"purpleBright_predefined",fromColor:[255,204,255],toColor:[199,0,199]},{id:"purpleToGreenDivergingBright_predefined",type:"multipart",colorRamps:[{fromColor:[77,32,150],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[20,122,11]}]},{id:"purpleToGreenDivergingDark_predefined",type:"multipart",colorRamps:[{fromColor:[67,14,89],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[24,79,15]}]},{id:"purpleBlueBright_predefined",fromColor:[223,184,230],toColor:[112,12,242]},{id:"purpleBlueLightToDark_predefined",fromColor:[229,213,242],toColor:[93,44,112]},{id:"purpleRedBright_predefined",fromColor:[255,204,225],toColor:[199,0,99]},{id:"purpleRedLightToDark_predefined",fromColor:[250,215,246],toColor:[143,17,57]},{id:"redBright_predefined",fromColor:[255,204,204],toColor:[219,0,0]},{id:"redLightToDark_predefined",fromColor:[255,224,224],toColor:[143,10,10]},{id:"redToBlueDivergingBright_predefined",type:"multipart",colorRamps:[{fromColor:[196,69,57],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[48,95,207]}]},{id:"redToBlueDivergingDark_predefined",type:"multipart",colorRamps:[{fromColor:[107,13,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[13,53,97]}]},{id:"redToGreen_predefined",type:"multipart",colorRamps:[{fromColor:[245,0,0],toColor:[245,245,0]},{fromColor:[245,245,0],toColor:[0,245,0]}]},{id:"redToGreenDivergingBright_predefined",type:"multipart",colorRamps:[{fromColor:[186,20,20],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[54,145,33]}]},{id:"redToGreenDivergingDark_predefined",type:"multipart",colorRamps:[{fromColor:[97,21,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[16,69,16]}]},{id:"slope_predefined",type:"multipart",colorRamps:[{fromColor:[56,168,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]}]},{id:"spectrumFullBright_predefined",type:"multipart",colorRamps:[{fromColor:[255,0,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,0,255]}]},{id:"spectrumFullDark_predefined",type:"multipart",colorRamps:[{fromColor:[153,0,0],toColor:[153,153,0]},{fromColor:[153,153,0],toColor:[0,153,153]},{fromColor:[0,153,153],toColor:[0,0,153]}]},{id:"spectrumFullLight_predefined",type:"multipart",colorRamps:[{fromColor:[255,153,153],toColor:[255,255,153]},{fromColor:[255,255,153],toColor:[153,255,255]},{fromColor:[153,255,255],toColor:[153,153,255]}]},{id:"surface_predefined",type:"multipart",colorRamps:[{fromColor:[112,153,89],toColor:[242,238,162]},{fromColor:[242,238,162],toColor:[242,206,133]},{fromColor:[242,206,133],toColor:[194,140,124]},{fromColor:[194,140,124],toColor:[255,242,255]}]},{id:"temperature_predefined",type:"multipart",colorRamps:[{fromColor:[255,252,255],toColor:[255,0,255]},{fromColor:[255,0,255],toColor:[0,0,255]},{fromColor:[0,0,255],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,255,0]},{fromColor:[0,255,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,128,0]},{fromColor:[255,128,0],toColor:[128,0,0]}]},{id:"whiteToBlack_predefined",fromColor:[255,255,255],toColor:[0,0,0]},{id:"yellowToDarkRed_predefined",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[242,167,46]},{fromColor:[242,167,46],toColor:[107,0,0]}]},{id:"yellowToGreenToDarkBlue_predefined",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[56,224,9]},{fromColor:[56,224,9],toColor:[26,147,171]},{fromColor:[26,147,171],toColor:[12,16,120]}]},{id:"yellowToRed_predefined",fromColor:[245,245,0],toColor:[255,0,0]},{id:"yellowGreenBright_predefined",fromColor:[236,252,204],toColor:[157,204,16]},{id:"yellowGreenLightToDark_predefined",fromColor:[215,240,175],toColor:[96,107,45]}],l={aspect_predefined:"Aspect",blackToWhite_predefined:"Black to White",blueBright_predefined:"Blue Bright",blueLightToDark_predefined:"Blue Light to Dark",blueGreenBright_predefined:"Blue-Green Bright",blueGreenLightToDark_predefined:"Blue-Green Light to Dark",brownLightToDark_predefined:"Brown Light to Dark",brownToBlueGreenDivergingBright_predefined:"Brown to Blue Green Diverging, Bright",brownToBlueGreenDivergingDark_predefined:"Brown to Blue Green Diverging, Dark",coefficientBias_predefined:"Coefficient Bias",coldToHotDiverging_predefined:"Cold to Hot Diverging",conditionNumber_predefined:"Condition Number",cyanToPurple_predefined:"Cyan to Purple",cyanLightToBlueDark_predefined:"Cyan-Light to Blue-Dark",distance_predefined:"Distance",elevation1_predefined:"Elevation #1",elevation2_predefined:"Elevation #2",errors_predefined:"Errors",grayLightToDark_predefined:"Gray Light to Dark",greenBright_predefined:"Green Bright",greenLightToDark_predefined:"Green Light to Dark",greenToBlue_predefined:"Green to Blue",orangeBright_predefined:"Orange Bright",orangeLightToDark_predefined:"Orange Light to Dark",partialSpectrum_predefined:"Partial Spectrum",partialSpectrum1Diverging_predefined:"Partial Spectrum 1 Diverging",partialSpectrum2Diverging_predefined:"Partial Spectrum 2 Diverging",pinkToYellowGreenDivergingBright_predefined:"Pink to YellowGreen Diverging, Bright",pinkToYellowGreenDivergingDark_predefined:"Pink to YellowGreen Diverging, Dark",precipitation_predefined:"Precipitation",prediction_predefined:"Prediction",purpleBright_predefined:"Purple Bright",purpleToGreenDivergingBright_predefined:"Purple to Green Diverging, Bright",purpleToGreenDivergingDark_predefined:"Purple to Green Diverging, Dark",purpleBlueBright_predefined:"Purple-Blue Bright",purpleBlueLightToDark_predefined:"Purple-Blue Light to Dark",purpleRedBright_predefined:"Purple-Red Bright",purpleRedLightToDark_predefined:"Purple-Red Light to Dark",redBright_predefined:"Red Bright",redLightToDark_predefined:"Red Light to Dark",redToBlueDivergingBright_predefined:"Red to Blue Diverging, Bright",redToBlueDivergingDark_predefined:"Red to Blue Diverging, Dark",redToGreen_predefined:"Red to Green",redToGreenDivergingBright_predefined:"Red to Green Diverging, Bright",redToGreenDivergingDark_predefined:"Red to Green Diverging, Dark",slope_predefined:"Slope",spectrumFullBright_predefined:"Spectrum-Full Bright",spectrumFullDark_predefined:"Spectrum-Full Dark",spectrumFullLight_predefined:"Spectrum-Full Light",surface_predefined:"Surface",temperature_predefined:"Temperature",whiteToBlack_predefined:"White to Black",yellowToDarkRed_predefined:"Yellow to Dark Red",yellowToGreenToDarkBlue_predefined:"Yellow to Green to Dark Blue",yellowToRed_predefined:"Yellow to Red",yellowGreenBright_predefined:"Yellow-Green Bright",yellowGreenLightToDark_predefined:"Yellow-Green Light to Dark"},u=new i.X({Aspect:"aspect","Black to White":"black-to-white","Blue Bright":"blue-bright","Blue Light to Dark":"blue-light-to-dark","Blue-Green Bright":"blue-green-bright","Blue-Green Light to Dark":"blue-green-light-to-dark","Brown Light to Dark":"brown-light-to-dark","Brown to Blue Green Diverging, Bright":"brown-to-blue-green-diverging-right","Brown to Blue Green Diverging, Dark":"brown-to-blue-green-diverging-dark","Coefficient Bias":"coefficient-bias","Cold to Hot Diverging":"cold-to-hot-diverging","Condition Number":"condition-number","Cyan to Purple":"cyan-to-purple","Cyan-Light to Blue-Dark":"cyan-light-to-blue-dark",Distance:"distance","Elevation #1":"elevation1","Elevation #2":"elevation2",Errors:"errors","Gray Light to Dark":"gray-light-to-dark","Green Bright":"green-bright","Green Light to Dark":"green-light-to-dark","Green to Blue":"green-to-blue","Orange Bright":"orange-bright","Orange Light to Dark":"orange-light-to-dark","Partial Spectrum":"partial-spectrum","Partial Spectrum 1 Diverging":"partial-spectrum-1-diverging","Partial Spectrum 2 Diverging":"partial-spectrum-2-diverging","Pink to YellowGreen Diverging, Bright":"pink-to-yellow-green-diverging-bright","Pink to YellowGreen Diverging, Dark":"pink-to-yellow-green-diverging-dark",Precipitation:"precipitation",Prediction:"prediction","urple Bright":"purple-bright","Purple to Green Diverging, Bright":"purple-to-green-diverging-bright","Purple to Green Diverging, Dark":"purple-to-green-diverging-dark","Purple-Blue Bright":"purple-blue-bright","Purple-Blue Light to Dark":"purple-blue-light-to-dark","Purple-Red Bright":"purple-red-bright","Purple-Red Light to Dark":"purple-red-light-to-dark","Red Bright":"red-bright","Red Light to Dark":"red-light-to-dark","Red to Blue Diverging, Bright":"red-to-blue-diverging-bright","Red to Blue Diverging, Dark":"red-to-blue-diverging-dark","Red to Green":"red-to-green","Red to Green Diverging, Bright":"red-to-green-diverging-bright","Red to Green Diverging, Dark":"red-to-green-diverging-dark",Slope:"slope","Spectrum-Full Bright":"spectrum-full-bright","Spectrum-Full Dark":"spectrum-full-dark","Spectrum-Full Light":"spectrum-full-light",Surface:"surface",Temperature:"temperature","White to Black":"white-to-black","Yellow to Dark Red":"yellow-to-dark-red","Yellow to Green to Dark Blue":"yellow-to-green-to-dark-blue","Yellow to Red":"yellow-to-red","Yellow-Green Bright":"yellow-green-bright","Yellow-Green Light to Dark":"yellow-green-light-to-dark"});function h(e,t){if(!e||!t||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]>t[r]+2||e[r]<t[r]-2)return!1;return!0}function c(e){const t=function(e,t){if(!e)return;const r=a;let o=null;return"algorithmic"===e.type?r.some((t=>{if(h(e.fromColor.toRgb(),t.fromColor)&&h(e.toColor.toRgb(),t.toColor))return o=t.id,!0})):"multipart"===e.type&&r.some((t=>{const r=e.colorRamps,i=t.colorRamps;if(r&&i&&r.length===i.length&&!i.some(((e,t)=>{if(!h(r[t].fromColor.toRgb(),new n.Z(e.fromColor).toRgb())||!h(r[t].toColor.toRgb(),new n.Z(e.toColor).toRgb()))return!0}))){if(o)return!0;o=t.id}})),o}(e);return t?l[t]:null}function f(e){const t=u.toJSON(e),r=Object.entries(l).find((e=>e[1]===t))?.[0],n=a.find((e=>e.id===r));return n?n.colorRamps?{type:"multipart",colorRamps:n.colorRamps.map((e=>({type:"algorithmic",algorithm:"esriCIELabAlgorithm",fromColor:e.fromColor,toColor:e.toColor})))}:{type:"algorithmic",algorithm:"esriCIELabAlgorithm",fromColor:n.fromColor,toColor:n.toColor}:null}function d(e){const t=(e=e||{}).numColors||256,r=e.distanceOffset||0,n=null!=e.isCustomInterval?e.isCustomInterval:null!==e.distanceInterval&&e.distanceInterval!==1/(t-1),o=e.distanceInterval||1/(t-1);return{...e,numColors:t,distanceOffset:r,interpolateAlpha:!!e.interpolateAlpha,distanceInterval:o,isCustomInterval:n,weights:e.weights}}function p(e,t){let{fromColor:r,toColor:n}=e;3===r.length&&(r=r.concat([255])),3===n.length&&(n=n.concat([255]));const i=e.algorithm||"esriCIELabAlgorithm",s=d(t),{numColors:a,distanceOffset:l,isCustomInterval:u,interpolateAlpha:h}=s;if(1===a&&0===l)return[r];if(2===a&&0===l&&!u)return[r,n];const c={r:r[0],g:r[1],b:r[2]},f={r:n[0],g:n[1],b:n[2]},p="esriCIELabAlgorithm"===i?function(e,t,r){const{numColors:n,distanceOffset:o,distanceInterval:i,isCustomInterval:s}=r;let{l:a,a:l,b:u}=e;const h=(t.l-a)*i,c=(t.a-l)*i,f=(t.b-u)*i,d=[];if(o){const e=o/i;a+=e*h,l+=e*c,u+=e*f}for(let e=0;e<n-1;e++)d.push({l:a,a:l,b:u}),a+=h,l+=c,u+=f;return d.push(s?{l:a,a:l,b:u}:t),d}((0,o.Y3)(c),(0,o.Y3)(f),s):"esriHSVAlgorithm"===i?function(e,t,r){const{numColors:n,distanceOffset:o,distanceInterval:i,isCustomInterval:s}=r,a=0===e.s,l=0===t.s;let u=e.h,h=t.h;a&&!l?u=h:l&&!a&&(t={...t,h:u},h=u);let c,f=Math.abs(h-u);const d=360;f<180?c=(h-u)*i:(f=d-f,c=u>h?f*i:-f*i);const p=(t.s-e.s)*i,g=(t.v-e.v)*i;let{s:m,v:y}=e,w=u;if(o){const e=o/i;w=(w+e*c+d)%d,m+=e*p,y+=e*g}const C=[];for(let e=0;e<n-1;e++)C.push({h:w,s:m,v:y}),w=(w+c+d)%d,m+=p,y+=g;return C.push(s?{h:w,s:m,v:y}:t),C}((0,o._Y)(c),(0,o._Y)(f),s):function(e,t,r){const{numColors:n,distanceOffset:o,distanceInterval:i,isCustomInterval:s}=r,a=e.h,l=t.h,u=2*Math.PI;let h;if(a<=l){const e=l-a,t=l-a-u;h=Math.abs(t)<Math.abs(e)?t:e}else{const e=l+u-a,t=l-a;h=Math.abs(t)<Math.abs(e)?t:e}const c=h*i,f=(t.l-e.l)*i,d=(t.c-e.c)*i;let{l:p,c:g,h:m}=e;if(o){const e=o/i;p+=e*f,g+=e*d,m=(m+e*c+u)%u}const y=[];for(let e=0;e<n-1;e++)y.push({l:p,c:g,h:m}),p+=f,g+=d,m=(m+c+u)%u;return y.push(s?{l:p,c:g,h:m}:t),y}((0,o.sJ)(c),(0,o.sJ)(f),s),g=[],m=r[3]??255,y=((n[3]??255)-m)/(a-1);for(let e=0;e<a;e++){const{r:t,g:r,b:n}=(0,o.xr)(p[e]),i=h?Math.round(m+y*e):255;g.push([t,r,n,i])}return g}function g(e,t){const r="toJSON"in e?e.toJSON():e;return"multipart"===r.type?function(e,t){const{numColors:r,interpolateAlpha:n}=d(t);let o=t?.weights;const{colorRamps:i}=e;if(o){const e=o.reduce(((e,t)=>e+t));o=o.map((t=>t/e))}else{o=[];for(let e=0;e<i.length;e++)o[e]=1/i.length}const s=[];let a=0,l=0;const u=1/(r-1);let h=!1;for(let e=0;e<i.length;e++){let t=h?0:a*u-l,c=e===i.length-1?r-1-a:(o[e]-t)/u;if(h=Math.ceil(c)===c,c=Math.ceil(c),0===c)continue;t/=o[e];const f=p(i[e],{numColors:c,interpolateAlpha:n,distanceOffset:t,distanceInterval:u/o[e]});a+=f.length,s.push(...f),l+=o[e]}const c=[...i[i.length-1].toColor];return 3===c.length&&c.push(255),s.push(c),s}(r,t):p(r,t)}function m(e,t){const r=g(e,t),n=t?.interpolateAlpha;return r.forEach(((e,t)=>{e.unshift(t),n||e.pop()})),r}function y(e){const t=c(e);if(e){if("algorithmic"===e.type)return{...w(e),Name:t};if(e.colorRamps){const r=e.colorRamps.map(w);return{type:"MultiPartColorRamp",NumColorRamps:r.length,ArrayOfColorRamp:r,Name:t}}}}function w(e){if(!e)return;const t=e.toJSON();return{Algorithm:t?.Algorithm||"esriHSVAlgorithm",type:"AlgorithmicColorRamp",FromColor:C(e.fromColor),ToColor:C(e.toColor)}}function C(e){const t=(0,o._Y)(e);return{type:"HsvColor",Hue:t.h,Saturation:t.s,Value:t.v,AlphaValue:255}}function b(e){const t=e.reverse().map((e=>{const t=e.toString(16);return t.length<2?"0"+t:t}));return 4294967295&Number.parseInt(t.join(""),16)}},75509:(e,t,r)=>{r.d(t,{J:()=>o,v:()=>n});const n=new(r(35454).X)({none:"none",standardDeviation:"standard-deviation",histogramEqualization:"histogram-equalization",minMax:"min-max",percentClip:"percent-clip",sigmoid:"sigmoid"}),o={0:"none",3:"standardDeviation",4:"histogramEqualization",5:"minMax",6:"percentClip",9:"sigmoid"}},23808:(e,t,r)=>{r.d(t,{GE:()=>u}),r(66577);var n=r(80442),o=r(92604),i=(r(22021),r(95330)),s=r(77734);r(8744),r(6570);const a=o.Z.getLogger("esri.views.2d.engine.flow.dataUtils"),l=10;async function u(e,t,r,o){const u=performance.now(),h=function(e,t){const r=function(e,t,r,n){if(0===n)return e;const o=Math.round(3*n),i=new Array(2*o+1);let s=0;for(let e=-o;e<=o;e++){const t=Math.exp(-e*e/(n*n));i[e+o]=t,s+=t}for(let e=-o;e<=o;e++)i[e+o]/=s;const a=new Float32Array(e.length);for(let n=0;n<r;n++)for(let r=0;r<t;r++){let s=0,l=0;for(let a=-o;a<=o;a++){if(r+a<0||r+a>=t)continue;const u=i[a+o];s+=u*e[2*(n*t+(r+a))],l+=u*e[2*(n*t+(r+a))+1]}a[2*(n*t+r)]=s,a[2*(n*t+r)+1]=l}const l=new Float32Array(e.length);for(let e=0;e<t;e++)for(let n=0;n<r;n++){let s=0,u=0;for(let l=-o;l<=o;l++){if(n+l<0||n+l>=r)continue;const h=i[l+o];s+=h*a[2*((n+l)*t+e)],u+=h*a[2*((n+l)*t+e)+1]}l[2*(n*t+e)]=s,l[2*(n*t+e)+1]=u}return l}(t.data,t.width,t.height,e.smoothing);return e.interpolate?(e,n)=>{const o=Math.floor(e),i=Math.floor(n);if(o<0||o>=t.width)return[0,0];if(i<0||i>=t.height)return[0,0];const s=e-o,a=n-i,l=o,u=i,h=o<t.width-1?o+1:o,c=i<t.height-1?i+1:i,f=r[2*(u*t.width+l)],d=r[2*(u*t.width+h)],p=r[2*(c*t.width+l)],g=r[2*(c*t.width+h)],m=r[2*(u*t.width+l)+1],y=r[2*(u*t.width+h)+1];return[(f*(1-a)+p*a)*(1-s)+(d*(1-a)+g*a)*s,(m*(1-a)+r[2*(c*t.width+l)+1]*a)*(1-s)+(y*(1-a)+r[2*(c*t.width+h)+1]*a)*s]}:(e,n)=>{const o=Math.round(e),i=Math.round(n);return o<0||o>=t.width||i<0||i>=t.height?[0,0]:[r[2*(i*t.width+o)],r[2*(i*t.width+o)+1]]}}(t,r),f=performance.now(),d=c(t,h,r.width,r.height),p=performance.now(),g=function(e,t){const r=new s.Z,n=e.reduce(((e,t)=>e+t.length),0),o=new Float32Array(4*n),i=new Array(e.length);let a=0,l=0;for(const t of e){const e=a;for(const e of t)o[4*a]=e.x,o[4*a+1]=e.y,o[4*a+2]=e.t,o[4*a+3]=e.speed,a++;i[l++]={startVertex:e,numberOfVertices:t.length,totalTime:t[t.length-1].t,timeSeed:r.getFloat()}}return{lineVertices:o,lineDescriptors:i}}(d),m=performance.now(),y="Streamlines"===e?function(e,t){const r=9,{lineVertices:n,lineDescriptors:o}=e;let i=0,s=0;for(const e of o)i+=2*e.numberOfVertices,s+=6*(e.numberOfVertices-1);const a=new Float32Array(i*r),l=new Uint32Array(s);let u=0,h=0;function c(){l[h++]=u-2,l[h++]=u,l[h++]=u-1,l[h++]=u,l[h++]=u+1,l[h++]=u-1}function f(e,t,n,o,i,s,l,h){const c=u*r;let f=0;a[c+f++]=e,a[c+f++]=t,a[c+f++]=1,a[c+f++]=n,a[c+f++]=s,a[c+f++]=l,a[c+f++]=o/2,a[c+f++]=i/2,a[c+f++]=h,u++,a[c+f++]=e,a[c+f++]=t,a[c+f++]=-1,a[c+f++]=n,a[c+f++]=s,a[c+f++]=l,a[c+f++]=-o/2,a[c+f++]=-i/2,a[c+f++]=h,u++}for(const e of o){const{totalTime:r,timeSeed:o}=e;let i=null,s=null,a=null,l=null,u=null,h=null;for(let d=0;d<e.numberOfVertices;d++){const p=n[4*(e.startVertex+d)],g=n[4*(e.startVertex+d)+1],m=n[4*(e.startVertex+d)+2],y=n[4*(e.startVertex+d)+3];let w=null,C=null,b=null,x=null;if(d>0){w=p-i,C=g-s;const e=Math.sqrt(w*w+C*C);if(w/=e,C/=e,d>1){let e=w+u,r=C+h;const n=Math.sqrt(e*e+r*r);e/=n,r/=n;const o=Math.min(1/(e*w+r*C),t);e*=o,r*=o,b=-r,x=e}else b=-C,x=w;null!==b&&null!==x&&(f(i,s,a,b,x,r,o,y),c())}i=p,s=g,a=m,u=w,h=C,l=y}f(i,s,a,-h,u,r,o,l)}return{vertexData:a,indexData:l}}(g,l):function(e){const t=16,r=1,n=2,{lineVertices:o,lineDescriptors:i}=e;let s=0,a=0;for(const e of i){const t=e.numberOfVertices-1;s+=4*t*2,a+=6*t*2}const l=new Float32Array(s*t),u=new Uint32Array(a);let h,c,f,d,p,g,m,y,w,C,b,x,k,v,T=0,S=0;function A(){u[S++]=T-8,u[S++]=T-7,u[S++]=T-6,u[S++]=T-7,u[S++]=T-5,u[S++]=T-6,u[S++]=T-4,u[S++]=T-3,u[S++]=T-2,u[S++]=T-3,u[S++]=T-1,u[S++]=T-2}function I(e,o,i,s,a,u,h,c,f,d,p,g,m,y){const w=T*t;let C=0;for(const t of[r,n])for(const r of[1,2,3,4])l[w+C++]=e,l[w+C++]=o,l[w+C++]=i,l[w+C++]=s,l[w+C++]=h,l[w+C++]=c,l[w+C++]=f,l[w+C++]=d,l[w+C++]=t,l[w+C++]=r,l[w+C++]=m,l[w+C++]=y,l[w+C++]=a/2,l[w+C++]=u/2,l[w+C++]=p/2,l[w+C++]=g/2,T++}function P(e,t){let r=w+b,n=C+x;const o=Math.sqrt(r*r+n*n);r/=o,n/=o;const i=w*r+C*n;r/=i,n/=i;let s=b+k,a=x+v;const l=Math.sqrt(s*s+a*a);s/=l,a/=l;const u=b*s+x*a;s/=u,a/=u,I(h,c,f,d,-n,r,p,g,m,y,-a,s,e,t),A()}function M(e,t,r,n,o,i){if(w=b,C=x,b=k,x=v,null==w&&null==C&&(w=b,C=x),null!=p&&null!=g){k=e-p,v=t-g;const r=Math.sqrt(k*k+v*v);k/=r,v/=r}null!=w&&null!=C&&P(o,i),h=p,c=g,f=m,d=y,p=e,g=t,m=r,y=n}function E(e,t){w=b,C=x,b=k,x=v,null==w&&null==C&&(w=b,C=x),null!=w&&null!=C&&P(e,t)}for(const e of i){h=null,c=null,f=null,d=null,p=null,g=null,m=null,y=null,w=null,C=null,b=null,x=null,k=null,v=null;const{totalTime:t,timeSeed:r}=e;for(let n=0;n<e.numberOfVertices;n++)M(o[4*(e.startVertex+n)],o[4*(e.startVertex+n)+1],o[4*(e.startVertex+n)+2],o[4*(e.startVertex+n)+3],t,r);E(t,r)}return{vertexData:l,indexData:u}}(g),w=performance.now();return(0,n.Z)("esri-2d-profiler")&&(a.info("I.1","_createFlowFieldFromData (ms)",Math.round(f-u)),a.info("I.2","_getStreamlines (ms)",Math.round(p-f)),a.info("I.3","createAnimatedLinesData (ms)",Math.round(m-p)),a.info("I.4","create{Streamlines|Particles}Mesh (ms)",Math.round(w-m)),a.info("I.5","createFlowMesh (ms)",Math.round(w-u)),a.info("I.6","Mesh size (bytes)",y.vertexData.buffer.byteLength+y.indexData.buffer.byteLength)),await Promise.resolve(),(0,i.k_)(o),y}function h(e,t,r,n,o,i,s,a,l){const u=[];let h=r,c=n,f=0,[d,p]=t(h,c);d*=e.velocityScale,p*=e.velocityScale;const g=Math.sqrt(d*d+p*p);let m,y;u.push({x:h,y:c,t:f,speed:g});for(let r=0;r<e.verticesPerLine;r++){let[r,n]=t(h,c);r*=e.velocityScale,n*=e.velocityScale;const d=Math.sqrt(r*r+n*n);if(d<e.minSpeedThreshold)return u;const p=r/d,g=n/d;if(h+=p*e.segmentLength,c+=g*e.segmentLength,f+=e.segmentLength/d,Math.acos(p*m+g*y)>e.maxTurnAngle)return u;if(e.collisions){const e=Math.round(h*l),t=Math.round(c*l);if(e<0||e>s-1||t<0||t>a-1)return u;const r=i[t*s+e];if(-1!==r&&r!==o)return u;i[t*s+e]=o}u.push({x:h,y:c,t:f,speed:d}),m=p,y=g}return u}function c(e,t,r,n){const o=[],i=new s.Z,a=1/Math.max(e.lineCollisionWidth,1),l=Math.round(r*a),u=Math.round(n*a),c=new Int32Array(l*u);for(let e=0;e<c.length;e++)c[e]=-1;const f=[];for(let t=0;t<n;t+=e.lineSpacing)for(let n=0;n<r;n+=e.lineSpacing)f.push({x:n,y:t,sort:i.getFloat()});f.sort(((e,t)=>e.sort-t.sort));for(const{x:r,y:n}of f)if(i.getFloat()<e.density){const i=h(e,t,r,n,o.length,c,l,u,a);if(i.length<2)continue;o.push(i)}return o}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6610],{97575:(e,t,r)=>{r.d(t,{J:()=>s});var n,o,i,s={},a={get exports(){return s},set exports(e){s=e}};n=a,o=function(){var e=function(){function e(e){this.message="JPEG error: "+e}return e.prototype=new Error,e.prototype.name="JpegError",e.constructor=e,e}();return function(){if(!self||!self.Uint8ClampedArray)return null;var t=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),r=4017,n=799,o=3406,i=2276,s=1567,a=3784,l=5793,u=2896;function h(){this.decodeTransform=null,this.colorTransform=-1}function c(e,t){for(var r,n,o=0,i=[],s=16;s>0&&!e[s-1];)s--;i.push({children:[],index:0});var a,l=i[0];for(r=0;r<s;r++){for(n=0;n<e[r];n++){for((l=i.pop()).children[l.index]=t[o];l.index>0;)l=i.pop();for(l.index++,i.push(l);i.length<=r;)i.push(a={children:[],index:0}),l.children[l.index]=a.children,l=a;o++}r+1<s&&(i.push(a={children:[],index:0}),l.children[l.index]=a.children,l=a)}return i[0].children}function f(e,t,r){return 64*((e.blocksPerLine+1)*t+r)}function d(r,n,o,i,s,a,l,u,h){var c=o.mcusPerLine,d=o.progressive,p=n,g=0,y=0;function w(){if(y>0)return y--,g>>y&1;if(255===(g=r[n++])){var t=r[n++];if(t)throw new e("unexpected marker "+(g<<8|t).toString(16))}return y=7,g>>>7}function C(t){for(var r=t;;){if("number"==typeof(r=r[w()]))return r;if("object"!=typeof r)throw new e("invalid huffman sequence")}}function b(e){for(var t=0;e>0;)t=t<<1|w(),e--;return t}function x(e){if(1===e)return 1===w()?1:-1;var t=b(e);return t>=1<<e-1?t:t+(-1<<e)+1}var k,v=0,T=0;function S(e,t,r,n,o){var i=r%c;t(e,f(e,(r/c|0)*e.v+n,i*e.h+o))}function A(e,t,r){t(e,f(e,r/e.blocksPerLine|0,r%e.blocksPerLine))}var I,P,M,E,D,R,L=i.length;R=d?0===a?0===u?function(e,t){var r=C(e.huffmanTableDC),n=0===r?0:x(r)<<h;e.blockData[t]=e.pred+=n}:function(e,t){e.blockData[t]|=w()<<h}:0===u?function(e,r){if(v>0)v--;else for(var n=a,o=l;n<=o;){var i=C(e.huffmanTableAC),s=15&i,u=i>>4;if(0!==s){var c=t[n+=u];e.blockData[r+c]=x(s)*(1<<h),n++}else{if(u<15){v=b(u)+(1<<u)-1;break}n+=16}}}:function(r,n){for(var o,i,s=a,u=l,c=0;s<=u;){var f=t[s];switch(T){case 0:if(c=(i=C(r.huffmanTableAC))>>4,0==(o=15&i))c<15?(v=b(c)+(1<<c),T=4):(c=16,T=1);else{if(1!==o)throw new e("invalid ACn encoding");k=x(o),T=c?2:3}continue;case 1:case 2:r.blockData[n+f]?r.blockData[n+f]+=w()<<h:0==--c&&(T=2===T?3:0);break;case 3:r.blockData[n+f]?r.blockData[n+f]+=w()<<h:(r.blockData[n+f]=k<<h,T=0);break;case 4:r.blockData[n+f]&&(r.blockData[n+f]+=w()<<h)}s++}4===T&&0==--v&&(T=0)}:function(e,r){var n=C(e.huffmanTableDC),o=0===n?0:x(n);e.blockData[r]=e.pred+=o;for(var i=1;i<64;){var s=C(e.huffmanTableAC),a=15&s,l=s>>4;if(0!==a){var u=t[i+=l];e.blockData[r+u]=x(a),i++}else{if(l<15)break;i+=16}}};var _,B,U,G,O=0;for(B=1===L?i[0].blocksPerLine*i[0].blocksPerColumn:c*o.mcusPerColumn;O<B;){var F=s?Math.min(B-O,s):B;for(P=0;P<L;P++)i[P].pred=0;if(v=0,1===L)for(I=i[0],D=0;D<F;D++)A(I,R,O),O++;else for(D=0;D<F;D++){for(P=0;P<L;P++)for(U=(I=i[P]).h,G=I.v,M=0;M<G;M++)for(E=0;E<U;E++)S(I,R,O,M,E);O++}y=0,(_=m(r,n))&&_.invalid&&(console.log("decodeScan - unexpected MCU data, next marker is: "+_.invalid),n=_.offset);var N=_&&_.marker;if(!N||N<=65280)throw new e("marker was not found");if(!(N>=65488&&N<=65495))break;n+=2}return(_=m(r,n))&&_.invalid&&(console.log("decodeScan - unexpected Scan data, next marker is: "+_.invalid),n=_.offset),n-p}function p(t,h,c){var f,d,p,g,m,y,w,C,b,x,k,v,T,S,A,I,P,M=t.quantizationTable,E=t.blockData;if(!M)throw new e("missing required Quantization Table.");for(var D=0;D<64;D+=8)b=E[h+D],x=E[h+D+1],k=E[h+D+2],v=E[h+D+3],T=E[h+D+4],S=E[h+D+5],A=E[h+D+6],I=E[h+D+7],b*=M[D],0!=(x|k|v|T|S|A|I)?(x*=M[D+1],k*=M[D+2],v*=M[D+3],T*=M[D+4],S*=M[D+5],A*=M[D+6],I*=M[D+7],d=(f=(f=l*b+128>>8)+(d=l*T+128>>8)+1>>1)-d,P=(p=k)*a+(g=A)*s+128>>8,p=p*s-g*a+128>>8,w=(m=(m=u*(x-I)+128>>8)+(w=S<<4)+1>>1)-w,y=(C=(C=u*(x+I)+128>>8)+(y=v<<4)+1>>1)-y,g=(f=f+(g=P)+1>>1)-g,p=(d=d+p+1>>1)-p,P=m*i+C*o+2048>>12,m=m*o-C*i+2048>>12,C=P,P=y*n+w*r+2048>>12,y=y*r-w*n+2048>>12,w=P,c[D]=f+C,c[D+7]=f-C,c[D+1]=d+w,c[D+6]=d-w,c[D+2]=p+y,c[D+5]=p-y,c[D+3]=g+m,c[D+4]=g-m):(P=l*b+512>>10,c[D]=P,c[D+1]=P,c[D+2]=P,c[D+3]=P,c[D+4]=P,c[D+5]=P,c[D+6]=P,c[D+7]=P);for(var R=0;R<8;++R)b=c[R],0!=((x=c[R+8])|(k=c[R+16])|(v=c[R+24])|(T=c[R+32])|(S=c[R+40])|(A=c[R+48])|(I=c[R+56]))?(d=(f=4112+((f=l*b+2048>>12)+(d=l*T+2048>>12)+1>>1))-d,P=(p=k)*a+(g=A)*s+2048>>12,p=p*s-g*a+2048>>12,g=P,w=(m=(m=u*(x-I)+2048>>12)+(w=S)+1>>1)-w,y=(C=(C=u*(x+I)+2048>>12)+(y=v)+1>>1)-y,P=m*i+C*o+2048>>12,m=m*o-C*i+2048>>12,C=P,P=y*n+w*r+2048>>12,y=y*r-w*n+2048>>12,b=(b=(f=f+g+1>>1)+C)<16?0:b>=4080?255:b>>4,x=(x=(d=d+p+1>>1)+(w=P))<16?0:x>=4080?255:x>>4,k=(k=(p=d-p)+y)<16?0:k>=4080?255:k>>4,v=(v=(g=f-g)+m)<16?0:v>=4080?255:v>>4,T=(T=g-m)<16?0:T>=4080?255:T>>4,S=(S=p-y)<16?0:S>=4080?255:S>>4,A=(A=d-w)<16?0:A>=4080?255:A>>4,I=(I=f-C)<16?0:I>=4080?255:I>>4,E[h+R]=b,E[h+R+8]=x,E[h+R+16]=k,E[h+R+24]=v,E[h+R+32]=T,E[h+R+40]=S,E[h+R+48]=A,E[h+R+56]=I):(P=(P=l*b+8192>>14)<-2040?0:P>=2024?255:P+2056>>4,E[h+R]=P,E[h+R+8]=P,E[h+R+16]=P,E[h+R+24]=P,E[h+R+32]=P,E[h+R+40]=P,E[h+R+48]=P,E[h+R+56]=P)}function g(e,t){for(var r=t.blocksPerLine,n=t.blocksPerColumn,o=new Int16Array(64),i=0;i<n;i++)for(var s=0;s<r;s++)p(t,f(t,i,s),o);return t.blockData}function m(e,t,r){function n(t){return e[t]<<8|e[t+1]}var o=e.length-1,i=r<t?r:t;if(t>=o)return null;var s=n(t);if(s>=65472&&s<=65534)return{invalid:null,marker:s,offset:t};for(var a=n(i);!(a>=65472&&a<=65534);){if(++i>=o)return null;a=n(i)}return{invalid:s.toString(16),marker:a,offset:i}}return h.prototype={parse:function(r){function n(){var e=r[l]<<8|r[l+1];return l+=2,e}function o(){var e=n(),t=l+e-2,o=m(r,t,l);o&&o.invalid&&(console.log("readDataBlock - incorrect length, next marker is: "+o.invalid),t=o.offset);var i=r.subarray(l,t);return l+=i.length,i}function i(e){for(var t=Math.ceil(e.samplesPerLine/8/e.maxH),r=Math.ceil(e.scanLines/8/e.maxV),n=0;n<e.components.length;n++){O=e.components[n];var o=Math.ceil(Math.ceil(e.samplesPerLine/8)*O.h/e.maxH),i=Math.ceil(Math.ceil(e.scanLines/8)*O.v/e.maxV),s=t*O.h,a=r*O.v*64*(s+1);O.blockData=new Int16Array(a),O.blocksPerLine=o,O.blocksPerColumn=i}e.mcusPerLine=t,e.mcusPerColumn=r}var s,a,l=0,u=null,h=null,f=[],p=[],y=[],w=n();if(65496!==w)throw new e("SOI not found");for(w=n();65497!==w;){var C,b,x;switch(w){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var k=o();65504===w&&74===k[0]&&70===k[1]&&73===k[2]&&70===k[3]&&0===k[4]&&(u={version:{major:k[5],minor:k[6]},densityUnits:k[7],xDensity:k[8]<<8|k[9],yDensity:k[10]<<8|k[11],thumbWidth:k[12],thumbHeight:k[13],thumbData:k.subarray(14,14+3*k[12]*k[13])}),65518===w&&65===k[0]&&100===k[1]&&111===k[2]&&98===k[3]&&101===k[4]&&(h={version:k[5]<<8|k[6],flags0:k[7]<<8|k[8],flags1:k[9]<<8|k[10],transformCode:k[11]});break;case 65499:for(var v=n()+l-2;l<v;){var T=r[l++],S=new Uint16Array(64);if(T>>4==0)for(b=0;b<64;b++)S[t[b]]=r[l++];else{if(T>>4!=1)throw new e("DQT - invalid table spec");for(b=0;b<64;b++)S[t[b]]=n()}f[15&T]=S}break;case 65472:case 65473:case 65474:if(s)throw new e("Only single frame JPEGs supported");n(),(s={}).extended=65473===w,s.progressive=65474===w,s.precision=r[l++],s.scanLines=n(),s.samplesPerLine=n(),s.components=[],s.componentIds={};var A,I=r[l++],P=0,M=0;for(C=0;C<I;C++){A=r[l];var E=r[l+1]>>4,D=15&r[l+1];P<E&&(P=E),M<D&&(M=D);var R=r[l+2];x=s.components.push({h:E,v:D,quantizationId:R,quantizationTable:null}),s.componentIds[A]=x-1,l+=3}s.maxH=P,s.maxV=M,i(s);break;case 65476:var L=n();for(C=2;C<L;){var _=r[l++],B=new Uint8Array(16),U=0;for(b=0;b<16;b++,l++)U+=B[b]=r[l];var G=new Uint8Array(U);for(b=0;b<U;b++,l++)G[b]=r[l];C+=17+U,(_>>4==0?y:p)[15&_]=c(B,G)}break;case 65501:n(),a=n();break;case 65498:n();var O,F=r[l++],N=[];for(C=0;C<F;C++){var V=s.componentIds[r[l++]];O=s.components[V];var z=r[l++];O.huffmanTableDC=y[z>>4],O.huffmanTableAC=p[15&z],N.push(O)}var j=r[l++],Z=r[l++],J=r[l++],W=d(r,l,s,N,a,j,Z,J>>4,15&J);l+=W;break;case 65535:255!==r[l]&&l--;break;default:if(255===r[l-3]&&r[l-2]>=192&&r[l-2]<=254){l-=3;break}throw new e("unknown marker "+w.toString(16))}w=n()}for(this.width=s.samplesPerLine,this.height=s.scanLines,this.jfif=u,this.eof=l,this.adobe=h,this.components=[],C=0;C<s.components.length;C++){var H=f[(O=s.components[C]).quantizationId];H&&(O.quantizationTable=H),this.components.push({output:g(0,O),scaleX:O.h/s.maxH,scaleY:O.v/s.maxV,blocksPerLine:O.blocksPerLine,blocksPerColumn:O.blocksPerColumn})}this.numComponents=this.components.length},_getLinearizedBlockData:function(e,t){var r,n,o,i,s,a,l,u,h,c,f,d=this.width/e,p=this.height/t,g=0,m=this.components.length,y=e*t*m,w=new Uint8ClampedArray(y),C=new Uint32Array(e),b=4294967288;for(l=0;l<m;l++){for(n=(r=this.components[l]).scaleX*d,o=r.scaleY*p,g=l,f=r.output,i=r.blocksPerLine+1<<3,s=0;s<e;s++)u=0|s*n,C[s]=(u&b)<<3|7&u;for(a=0;a<t;a++)for(c=i*((u=0|a*o)&b)|(7&u)<<3,s=0;s<e;s++)w[g]=f[c+C[s]],g+=m}var x=this.decodeTransform;if(x)for(l=0;l<y;)for(u=0,h=0;u<m;u++,l++,h+=2)w[l]=(w[l]*x[h]>>8)+x[h+1];return w},_isColorConversionNeeded:function(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this.colorTransform:1===this.colorTransform},_convertYccToRgb:function(e){for(var t,r,n,o=0,i=e.length;o<i;o+=3)t=e[o],r=e[o+1],n=e[o+2],e[o]=t-179.456+1.402*n,e[o+1]=t+135.459-.344*r-.714*n,e[o+2]=t-226.816+1.772*r;return e},_convertYcckToRgb:function(e){for(var t,r,n,o,i=0,s=0,a=e.length;s<a;s+=4)t=e[s],r=e[s+1],n=e[s+2],o=e[s+3],e[i++]=r*(-660635669420364e-19*r+.000437130475926232*n-54080610064599e-18*t+.00048449797120281*o-.154362151871126)-122.67195406894+n*(-.000957964378445773*n+.000817076911346625*t-.00477271405408747*o+1.53380253221734)+t*(.000961250184130688*t-.00266257332283933*o+.48357088451265)+o*(-.000336197177618394*o+.484791561490776),e[i++]=107.268039397724+r*(219927104525741e-19*r-.000640992018297945*n+.000659397001245577*t+.000426105652938837*o-.176491792462875)+n*(-.000778269941513683*n+.00130872261408275*t+.000770482631801132*o-.151051492775562)+t*(.00126935368114843*t-.00265090189010898*o+.25802910206845)+o*(-.000318913117588328*o-.213742400323665),e[i++]=r*(-.000570115196973677*r-263409051004589e-19*n+.0020741088115012*t-.00288260236853442*o+.814272968359295)-20.810012546947+n*(-153496057440975e-19*n-.000132689043961446*t+.000560833691242812*o-.195152027534049)+t*(.00174418132927582*t-.00255243321439347*o+.116935020465145)+o*(-.000343531996510555*o+.24165260232407);return e},_convertYcckToCmyk:function(e){for(var t,r,n,o=0,i=e.length;o<i;o+=4)t=e[o],r=e[o+1],n=e[o+2],e[o]=434.456-t-1.402*n,e[o+1]=119.541-t+.344*r+.714*n,e[o+2]=481.816-t-1.772*r;return e},_convertCmykToRgb:function(e){for(var t,r,n,o,i=0,s=1/255,a=0,l=e.length;a<l;a+=4)t=e[a]*s,r=e[a+1]*s,n=e[a+2]*s,o=e[a+3]*s,e[i++]=255+t*(-4.387332384609988*t+54.48615194189176*r+18.82290502165302*n+212.25662451639585*o-285.2331026137004)+r*(1.7149763477362134*r-5.6096736904047315*n-17.873870861415444*o-5.497006427196366)+n*(-2.5217340131683033*n-21.248923337353073*o+17.5119270841813)-o*(21.86122147463605*o+189.48180835922747),e[i++]=255+t*(8.841041422036149*t+60.118027045597366*r+6.871425592049007*n+31.159100130055922*o-79.2970844816548)+r*(-15.310361306967817*r+17.575251261109482*n+131.35250912493976*o-190.9453302588951)+n*(4.444339102852739*n+9.8632861493405*o-24.86741582555878)-o*(20.737325471181034*o+187.80453709719578),e[i++]=255+t*(.8842522430003296*t+8.078677503112928*r+30.89978309703729*n-.23883238689178934*o-14.183576799673286)+r*(10.49593273432072*r+63.02378494754052*n+50.606957656360734*o-112.23884253719248)+n*(.03296041114873217*n+115.60384449646641*o-193.58209356861505)-o*(22.33816807309886*o+180.12613974708367);return e},getData:function(t,r,n){if(this.numComponents>4)throw new e("Unsupported color mode");var o=this._getLinearizedBlockData(t,r);if(1===this.numComponents&&n){for(var i=o.length,s=new Uint8ClampedArray(3*i),a=0,l=0;l<i;l++){var u=o[l];s[a++]=u,s[a++]=u,s[a++]=u}return s}if(3===this.numComponents&&this._isColorConversionNeeded())return this._convertYccToRgb(o);if(4===this.numComponents){if(this._isColorConversionNeeded())return n?this._convertYcckToRgb(o):this._convertYcckToCmyk(o);if(n)return this._convertCmykToRgb(o)}return o}},h}()},void 0!==(i=o())&&(n.exports=i)},80899:(e,t,r)=>{r.d(t,{Z:()=>s});var n,o,i,s={},a={get exports(){return s},set exports(e){s=e}};o=a,void 0!==(n=function(){function e(){this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=null}return e.prototype={ensureBuffer:function(e){var t=this.buffer,r=t?t.byteLength:0;if(e<r)return t;for(var n=512;n<e;)n<<=1;for(var o=new Uint8Array(n),i=0;i<r;++i)o[i]=t[i];return this.buffer=o},getByte:function(){for(var e=this.pos;this.bufferLength<=e;){if(this.eof)return null;this.readBlock()}return this.buffer[this.pos++]},getBytes:function(e){var t=this.pos;if(e){this.ensureBuffer(t+e);for(var r=t+e;!this.eof&&this.bufferLength<r;)this.readBlock();var n=this.bufferLength;r>n&&(r=n)}else{for(;!this.eof;)this.readBlock();r=this.bufferLength}return this.pos=r,this.buffer.subarray(t,r)},lookChar:function(){for(var e=this.pos;this.bufferLength<=e;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos])},getChar:function(){for(var e=this.pos;this.bufferLength<=e;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos++])},makeSubStream:function(e,t,r){for(var n=e+t;this.bufferLength<=n&&!this.eof;)this.readBlock();return new Stream(this.buffer,e,t,r)},skip:function(e){e||(e=1),this.pos+=e},reset:function(){this.pos=0}},e}(),i=function(){if(!self||!self.Uint32Array)return null;var e=new Uint32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),t=new Uint32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),r=new Uint32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),o=[new Uint32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],i=[new Uint32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5];function s(e){throw new Error(e)}function a(e){var t=0,r=e[t++],o=e[t++];-1!=r&&-1!=o||s("Invalid header in flate stream"),8!=(15&r)&&s("Unknown compression method in flate stream"),((r<<8)+o)%31!=0&&s("Bad FCHECK in flate stream"),32&o&&s("FDICT bit set in flate stream"),this.bytes=e,this.bytesPos=2,this.codeSize=0,this.codeBuf=0,n.call(this)}return a.prototype=Object.create(n.prototype),a.prototype.getBits=function(e){for(var t,r=this.codeSize,n=this.codeBuf,o=this.bytes,i=this.bytesPos;r<e;)void 0===(t=o[i++])&&s("Bad encoding in flate stream"),n|=t<<r,r+=8;return t=n&(1<<e)-1,this.codeBuf=n>>e,this.codeSize=r-=e,this.bytesPos=i,t},a.prototype.getCode=function(e){for(var t=e[0],r=e[1],n=this.codeSize,o=this.codeBuf,i=this.bytes,a=this.bytesPos;n<r;){var l;void 0===(l=i[a++])&&s("Bad encoding in flate stream"),o|=l<<n,n+=8}var u=t[o&(1<<r)-1],h=u>>16,c=65535&u;return(0==n||n<h||0==h)&&s("Bad encoding in flate stream"),this.codeBuf=o>>h,this.codeSize=n-h,this.bytesPos=a,c},a.prototype.generateHuffmanTable=function(e){for(var t=e.length,r=0,n=0;n<t;++n)e[n]>r&&(r=e[n]);for(var o=1<<r,i=new Uint32Array(o),s=1,a=0,l=2;s<=r;++s,a<<=1,l<<=1)for(var u=0;u<t;++u)if(e[u]==s){var h=0,c=a;for(n=0;n<s;++n)h=h<<1|1&c,c>>=1;for(n=h;n<o;n+=l)i[n]=s<<16|u;++a}return[i,r]},a.prototype.readBlock=function(){function n(e,t,r,n,o){for(var i=e.getBits(r)+n;i-- >0;)t[p++]=o}var a=this.getBits(3);if(1&a&&(this.eof=!0),0!=(a>>=1)){var l,u;if(1==a)l=o,u=i;else if(2==a){for(var h=this.getBits(5)+257,c=this.getBits(5)+1,f=this.getBits(4)+4,d=Array(e.length),p=0;p<f;)d[e[p++]]=this.getBits(3);for(var g=this.generateHuffmanTable(d),m=0,y=(p=0,h+c),w=new Array(y);p<y;){var C=this.getCode(g);16==C?n(this,w,2,3,m):17==C?n(this,w,3,3,m=0):18==C?n(this,w,7,11,m=0):w[p++]=m=C}l=this.generateHuffmanTable(w.slice(0,h)),u=this.generateHuffmanTable(w.slice(h,y))}else s("Unknown block type in flate stream");for(var b=(R=this.buffer)?R.length:0,x=this.bufferLength;;){var k=this.getCode(l);if(k<256)x+1>=b&&(b=(R=this.ensureBuffer(x+1)).length),R[x++]=k;else{if(256==k)return void(this.bufferLength=x);var v=(k=t[k-=257])>>16;v>0&&(v=this.getBits(v)),m=(65535&k)+v,k=this.getCode(u),(v=(k=r[k])>>16)>0&&(v=this.getBits(v));var T=(65535&k)+v;x+m>=b&&(b=(R=this.ensureBuffer(x+m)).length);for(var S=0;S<m;++S,++x)R[x]=R[x-T]}}}else{var A,I=this.bytes,P=this.bytesPos;void 0===(A=I[P++])&&s("Bad block header in flate stream");var M=A;void 0===(A=I[P++])&&s("Bad block header in flate stream"),M|=A<<8,void 0===(A=I[P++])&&s("Bad block header in flate stream");var E=A;void 0===(A=I[P++])&&s("Bad block header in flate stream"),(E|=A<<8)!=(65535&~M)&&s("Bad uncompressed block length in flate stream"),this.codeBuf=0,this.codeSize=0;var D=this.bufferLength,R=this.ensureBuffer(D+M),L=D+M;this.bufferLength=L;for(var _=D;_<L;++_){if(void 0===(A=I[P++])){this.eof=!0;break}R[_]=A}this.bytesPos=P}},a}())&&(o.exports=i)},3892:(e,t,r)=>{function n(e){return"h"in e&&"s"in e&&"v"in e}function o(e){return"l"in e&&"a"in e&&"b"in e}function i(e){return"l"in e&&"c"in e&&"h"in e}r.d(t,{Y3:()=>g,_Y:()=>p,sJ:()=>m,xr:()=>d});const s=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],a=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function l(e,t){const r=[];let n,o;if(e[0].length!==t.length)throw new Error("dimensions do not match");const i=e.length,s=e[0].length;let a=0;for(n=0;n<i;n++){for(a=0,o=0;o<s;o++)a+=e[n][o]*t[o];r.push(a)}return r}function u(e){const t=[e.r/255,e.g/255,e.b/255].map((e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4)),r=l(s,t);return{x:100*r[0],y:100*r[1],z:100*r[2]}}function h(e){const t=l(a,[e.x/100,e.y/100,e.z/100]).map((e=>{const t=e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055;return Math.min(1,Math.max(t,0))}));return{r:Math.round(255*t[0]),g:Math.round(255*t[1]),b:Math.round(255*t[2])}}function c(e){const t=[e.x/95.047,e.y/100,e.z/108.883].map((e=>e>(6/29)**3?e**(1/3):1/3*(29/6)**2*e+4/29));return{l:116*t[1]-16,a:500*(t[0]-t[1]),b:200*(t[1]-t[2])}}function f(e){const t=e.l,r=[(t+16)/116+e.a/500,(t+16)/116,(t+16)/116-e.b/200].map((e=>e>6/29?e**3:3*(6/29)**2*(e-4/29)));return{x:95.047*r[0],y:100*r[1],z:108.883*r[2]}}function d(e){return"r"in(t=e)&&"g"in t&&"b"in t?e:i(e)?function(e){return h(f(function(e){const t=e.l,r=e.c,n=e.h;return{l:t,a:r*Math.cos(n),b:r*Math.sin(n)}}(e)))}(e):o(e)?function(e){return h(f(e))}(e):function(e){return"x"in e&&"y"in e&&"z"in e}(e)?h(e):n(e)?function(e){const t=(e.h+360)%360/60,r=e.s/100,n=e.v/100*255,o=n*r,i=o*(1-Math.abs(t%2-1));let s;switch(Math.floor(t)){case 0:s={r:o,g:i,b:0};break;case 1:s={r:i,g:o,b:0};break;case 2:s={r:0,g:o,b:i};break;case 3:s={r:0,g:i,b:o};break;case 4:s={r:i,g:0,b:o};break;case 5:case 6:s={r:o,g:0,b:i};break;default:s={r:0,g:0,b:0}}return s.r=Math.round(s.r+n-o),s.g=Math.round(s.g+n-o),s.b=Math.round(s.b+n-o),s}(e):e;var t}function p(e){return n(e)?e:function(e){const t=e.r,r=e.g,n=e.b,o=Math.max(t,r,n),i=o-Math.min(t,r,n);let s=o,a=0===i?0:o===t?(r-n)/i%6:o===r?(n-t)/i+2:(t-r)/i+4,l=0===i?0:i/s;return a<0&&(a+=6),a*=60,l*=100,s*=100/255,{h:a,s:l,v:s}}(d(e))}function g(e){return o(e)?e:function(e){return c(u(e))}(d(e))}function m(e){return i(e)?e:function(e){return function(e){const t=e.l,r=e.a,n=e.b,o=Math.sqrt(r*r+n*n);let i=Math.atan2(n,r);return i=i>0?i:i+2*Math.PI,{l:t,c:o,h:i}}(c(u(e)))}(d(e))}},5847:(e,t,r)=>{r.d(t,{Z:()=>g});var n=r(43697),o=r(20102),i=r(96674),s=r(22974),a=r(92604),l=r(5600),u=r(90578),h=r(52011);class c{constructor(e=null,t=null,r=null){this.minValue=e,this.maxValue=t,this.noDataValue=r}}var f,d=r(81578);let p=f=class extends i.wq{static createEmptyBand(e,t){return new(f.getPixelArrayConstructor(e))(t)}static getPixelArrayConstructor(e){let t;switch(e){case"u1":case"u2":case"u4":case"u8":t=Uint8Array;break;case"u16":t=Uint16Array;break;case"u32":t=Uint32Array;break;case"s8":t=Int8Array;break;case"s16":t=Int16Array;break;case"s32":t=Int32Array;break;case"f32":case"c64":case"c128":case"unknown":t=Float32Array;break;case"f64":t=Float64Array}return t}constructor(e){super(e),this.width=null,this.height=null,this.pixelType="f32",this.validPixelCount=null,this.mask=null,this.maskIsAlpha=!1,this.premultiplyAlpha=!1,this.statistics=null,this.depthCount=1}castPixelType(e){if(!e)return"f32";let t=e.toLowerCase();return["u1","u2","u4"].includes(t)?t="u8":["unknown","u8","s8","u16","s16","u32","s32","f32","f64"].includes(t)||(t="f32"),t}getPlaneCount(){return this.pixels?.length}addData(e){if(!e.pixels||e.pixels.length!==this.width*this.height)throw new o.Z("pixelblock:invalid-or-missing-pixels","add data requires valid pixels array that has same length defined by pixel block width * height");this.pixels||(this.pixels=[]),this.statistics||(this.statistics=[]),this.pixels.push(e.pixels),this.statistics.push(e.statistics??new c)}getAsRGBA(){const e=new ArrayBuffer(this.width*this.height*4);switch(this.pixelType){case"s8":case"s16":case"u16":case"s32":case"u32":case"f32":case"f64":this._fillFromNon8Bit(e);break;default:this._fillFrom8Bit(e)}return new Uint8ClampedArray(e)}getAsRGBAFloat(){const e=new Float32Array(this.width*this.height*4);return this._fillFrom32Bit(e),e}updateStatistics(){if(!this.pixels)return;this.statistics=this.pixels.map((e=>this._calculateBandStatistics(e,this.mask)));const e=this.mask;let t=0;if(null!=e)for(let r=0;r<e.length;r++)e[r]&&t++;else t=this.width*this.height;this.validPixelCount=t}clamp(e){if(!e||"f64"===e||"f32"===e||!this.pixels)return;const[t,r]=(0,d.r)(e),n=this.pixels,o=this.width*this.height,i=n.length;let s,a,l;const u=[];for(let h=0;h<i;h++){l=f.createEmptyBand(e,o),s=n[h];for(let e=0;e<o;e++)a=s[e],l[e]=a>r?r:a<t?t:a;u.push(l)}this.pixels=u,this.pixelType=e}extractBands(e){const{pixels:t,statistics:r}=this;if(null==e||0===e.length||!t||0===t.length)return this;const n=t.length,o=e.some((e=>e>=t.length)),i=n===e.length&&!e.some(((e,t)=>e!==t));return o||i?this:new f({pixelType:this.pixelType,width:this.width,height:this.height,mask:this.mask,validPixelCount:this.validPixelCount,maskIsAlpha:this.maskIsAlpha,pixels:e.map((e=>t[e])),statistics:r&&e.map((e=>r[e]))})}clone(){const e=new f({width:this.width,height:this.height,pixelType:this.pixelType,maskIsAlpha:this.maskIsAlpha,validPixelCount:this.validPixelCount});let t;null!=this.mask&&(this.mask instanceof Uint8Array?e.mask=new Uint8Array(this.mask):e.mask=this.mask.slice(0));const r=f.getPixelArrayConstructor(this.pixelType);if(this.pixels&&this.pixels.length>0){e.pixels=[];const n=!!this.pixels[0].slice;for(t=0;t<this.pixels.length;t++)e.pixels[t]=n?this.pixels[t].slice(0,this.pixels[t].length):new r(this.pixels[t])}if(this.statistics)for(e.statistics=[],t=0;t<this.statistics.length;t++)e.statistics[t]=(0,s.d9)(this.statistics[t]);return e.premultiplyAlpha=this.premultiplyAlpha,e}_fillFrom8Bit(e){const{mask:t,maskIsAlpha:r,premultiplyAlpha:n,pixels:o}=this;if(!e||!o||!o.length)return void a.Z.getLogger(this.declaredClass).error("getAsRGBA()","Unable to convert to RGBA. The input pixel block is empty.");let i,s,l,u;i=s=l=o[0],o.length>=3?(s=o[1],l=o[2]):2===o.length&&(s=o[1]);const h=new Uint32Array(e),c=this.width*this.height;if(i.length===c)if(null!=t&&t.length===c)if(r)for(u=0;u<c;u++){const e=t[u];if(e){const t=e/255;h[u]=n?e<<24|l[u]*t<<16|s[u]*t<<8|i[u]*t:e<<24|l[u]<<16|s[u]<<8|i[u]}}else for(u=0;u<c;u++)t[u]&&(h[u]=255<<24|l[u]<<16|s[u]<<8|i[u]);else for(u=0;u<c;u++)h[u]=255<<24|l[u]<<16|s[u]<<8|i[u];else a.Z.getLogger(this.declaredClass).error("getAsRGBA()","Unable to convert to RGBA. The pixelblock is invalid.")}_fillFromNon8Bit(e){const{pixels:t,mask:r,statistics:n}=this;if(!e||!t||!t.length)return void a.Z.getLogger(this.declaredClass).error("getAsRGBA()","Unable to convert to RGBA. The input pixel block is empty.");const o=this.pixelType;let i=1,s=0,l=1;if(n&&n.length>0){for(const e of n)if(null!=e.minValue&&(s=Math.min(s,e.minValue)),null!=e.maxValue&&null!=e.minValue){const t=e.maxValue-e.minValue;l=Math.max(l,t)}i=255/l}else{let e=255;"s8"===o?(s=-128,e=127):"u16"===o?e=65535:"s16"===o?(s=-32768,e=32767):"u32"===o?e=4294967295:"s32"===o?(s=-2147483648,e=2147483647):"f32"===o?(s=-34e38,e=34e38):"f64"===o&&(s=-Number.MAX_VALUE,e=Number.MAX_VALUE),i=255/(e-s)}const u=new Uint32Array(e),h=this.width*this.height;let c,f,d,p,g;if(c=f=d=t[0],c.length!==h)return a.Z.getLogger(this.declaredClass).error("getAsRGBA()","Unable to convert to RGBA. The pixelblock is invalid.");if(t.length>=2)if(f=t[1],t.length>=3&&(d=t[2]),null!=r&&r.length===h)for(p=0;p<h;p++)r[p]&&(u[p]=255<<24|(d[p]-s)*i<<16|(f[p]-s)*i<<8|(c[p]-s)*i);else for(p=0;p<h;p++)u[p]=255<<24|(d[p]-s)*i<<16|(f[p]-s)*i<<8|(c[p]-s)*i;else if(null!=r&&r.length===h)for(p=0;p<h;p++)g=(c[p]-s)*i,r[p]&&(u[p]=255<<24|g<<16|g<<8|g);else for(p=0;p<h;p++)g=(c[p]-s)*i,u[p]=255<<24|g<<16|g<<8|g}_fillFrom32Bit(e){const{pixels:t,mask:r}=this;if(!e||!t||!t.length)return a.Z.getLogger(this.declaredClass).error("getAsRGBAFloat()","Unable to convert to RGBA. The input pixel block is empty.");let n,o,i,s;n=o=i=t[0],t.length>=3?(o=t[1],i=t[2]):2===t.length&&(o=t[1]);const l=this.width*this.height;if(n.length!==l)return a.Z.getLogger(this.declaredClass).error("getAsRGBAFloat()","Unable to convert to RGBA. The pixelblock is invalid.");let u=0;if(null!=r&&r.length===l)for(s=0;s<l;s++)e[u++]=n[s],e[u++]=o[s],e[u++]=i[s],e[u++]=1&r[s];else for(s=0;s<l;s++)e[u++]=n[s],e[u++]=o[s],e[u++]=i[s],e[u++]=1}_calculateBandStatistics(e,t){let r=1/0,n=-1/0;const o=e.length;let i,s=0;if(null!=t)for(i=0;i<o;i++)t[i]&&(s=e[i],r=s<r?s:r,n=s>n?s:n);else for(i=0;i<o;i++)s=e[i],r=s<r?s:r,n=s>n?s:n;return new c(r,n)}};(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"width",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"height",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"pixelType",void 0),(0,n._)([(0,u.p)("pixelType")],p.prototype,"castPixelType",null),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"validPixelCount",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"mask",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"maskIsAlpha",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"pixels",void 0),(0,n._)([(0,l.Cb)()],p.prototype,"premultiplyAlpha",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"statistics",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"depthCount",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"noDataValues",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"bandMasks",void 0),p=f=(0,n._)([(0,h.j)("esri.layers.support.PixelBlock")],p);const g=p},48526:(e,t,r)=>{r.d(t,{Z:()=>d});var n,o=r(43697),i=r(96674),s=r(22974),a=r(5600),l=(r(75215),r(52011)),u=r(6570),h=r(82971),c=r(36679);let f=n=class extends i.wq{constructor(e){super(e),this.attributeTable=null,this.bandCount=null,this.colormap=null,this.extent=null,this.format=void 0,this.height=null,this.width=null,this.histograms=null,this.keyProperties={},this.multidimensionalInfo=null,this.noDataValue=null,this.pixelSize=null,this.pixelType=null,this.isPseudoSpatialReference=!1,this.spatialReference=null,this.statistics=null,this.storageInfo=null,this.transform=null}get dataType(){const e=this.keyProperties?.DataType?.toLowerCase()??"generic";return"stdtime"===e?"standard-time":e}get nativeExtent(){return this._get("nativeExtent")||this.extent}set nativeExtent(e){e&&this._set("nativeExtent",e)}get nativePixelSize(){if(null==this.transform||!this.transform.affectsPixelSize)return this.pixelSize;const e=this.nativeExtent;return{x:e.width/this.width,y:e.height/this.height}}get hasMultidimensionalTranspose(){return!!this.storageInfo?.transposeInfo}clone(){return new n({attributeTable:(0,s.d9)(this.attributeTable),bandCount:this.bandCount,colormap:(0,s.d9)(this.colormap),extent:(0,s.d9)(this.extent),nativePixelSize:(0,s.d9)(this.nativePixelSize),format:this.format,height:this.height,width:this.width,histograms:(0,s.d9)(this.histograms),keyProperties:(0,s.d9)(this.keyProperties),multidimensionalInfo:(0,s.d9)(this.multidimensionalInfo),noDataValue:this.noDataValue,pixelSize:(0,s.d9)(this.pixelSize),pixelType:this.pixelType,isPseudoSpatialReference:this.isPseudoSpatialReference,spatialReference:(0,s.d9)(this.spatialReference),statistics:(0,s.d9)(this.statistics),storageInfo:(0,s.d9)(this.storageInfo),transform:(0,s.d9)(this.transform)})}};(0,o._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"attributeTable",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"bandCount",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"colormap",void 0),(0,o._)([(0,a.Cb)({type:String,readOnly:!0})],f.prototype,"dataType",null),(0,o._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],f.prototype,"extent",void 0),(0,o._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],f.prototype,"nativeExtent",null),(0,o._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"nativePixelSize",null),(0,o._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"format",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"height",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"width",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"hasMultidimensionalTranspose",null),(0,o._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"histograms",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"keyProperties",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"multidimensionalInfo",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"noDataValue",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"pixelSize",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"pixelType",void 0),(0,o._)([(0,a.Cb)()],f.prototype,"isPseudoSpatialReference",void 0),(0,o._)([(0,a.Cb)({type:h.Z,json:{write:!0}})],f.prototype,"spatialReference",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"statistics",void 0),(0,o._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],f.prototype,"storageInfo",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],f.prototype,"transform",void 0),f=n=(0,o._)([(0,l.j)("esri.layers.support.RasterInfo")],f);const d=f},36679:(e,t,r)=>{r.d(t,{Z:()=>c});var n,o=r(43697),i=r(96674),s=r(22974),a=r(5600),l=(r(75215),r(52011)),u=r(94139);let h=n=class extends i.wq{constructor(){super(...arguments),this.blockWidth=void 0,this.blockHeight=void 0,this.compression=null,this.origin=null,this.firstPyramidLevel=null,this.maximumPyramidLevel=null,this.pyramidScalingFactor=2,this.pyramidBlockWidth=null,this.pyramidBlockHeight=null,this.isVirtualTileInfo=!1,this.tileInfo=null,this.transposeInfo=null,this.blockBoundary=null}clone(){return new n({blockWidth:this.blockWidth,blockHeight:this.blockHeight,compression:this.compression,origin:(0,s.d9)(this.origin),firstPyramidLevel:this.firstPyramidLevel,maximumPyramidLevel:this.maximumPyramidLevel,pyramidResolutions:(0,s.d9)(this.pyramidResolutions),pyramidScalingFactor:this.pyramidScalingFactor,pyramidBlockWidth:this.pyramidBlockWidth,pyramidBlockHeight:this.pyramidBlockHeight,isVirtualTileInfo:this.isVirtualTileInfo,tileInfo:(0,s.d9)(this.tileInfo),transposeInfo:(0,s.d9)(this.transposeInfo),blockBoundary:(0,s.d9)(this.blockBoundary)})}};(0,o._)([(0,a.Cb)({type:Number,json:{write:!0}})],h.prototype,"blockWidth",void 0),(0,o._)([(0,a.Cb)({type:Number,json:{write:!0}})],h.prototype,"blockHeight",void 0),(0,o._)([(0,a.Cb)({type:String,json:{write:!0}})],h.prototype,"compression",void 0),(0,o._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],h.prototype,"origin",void 0),(0,o._)([(0,a.Cb)({type:Number,json:{write:!0}})],h.prototype,"firstPyramidLevel",void 0),(0,o._)([(0,a.Cb)({type:Number,json:{write:!0}})],h.prototype,"maximumPyramidLevel",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],h.prototype,"pyramidResolutions",void 0),(0,o._)([(0,a.Cb)({type:Number,json:{write:!0}})],h.prototype,"pyramidScalingFactor",void 0),(0,o._)([(0,a.Cb)({type:Number,json:{write:!0}})],h.prototype,"pyramidBlockWidth",void 0),(0,o._)([(0,a.Cb)({type:Number,json:{write:!0}})],h.prototype,"pyramidBlockHeight",void 0),(0,o._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"isVirtualTileInfo",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],h.prototype,"tileInfo",void 0),(0,o._)([(0,a.Cb)()],h.prototype,"transposeInfo",void 0),(0,o._)([(0,a.Cb)()],h.prototype,"blockBoundary",void 0),h=n=(0,o._)([(0,l.j)("esri.layers.support.RasterStorageInfo")],h);const c=h},20095:(e,t,r)=>{function n(e,t){let r=0,n="",o=0,i=0;const s=e.length;for(;r<s;)i=e[r++],o=i>>4,o<8?o=1:15===o?(o=4,i=(7&i)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++]):14===o?(o=3,i=(15&i)<<12|(63&e[r++])<<6|63&e[r++]):(o=2,i=(31&i)<<6|63&e[r++]),(0!==i||t)&&(n+=String.fromCharCode(i));return n}r.d(t,{f:()=>n})},72955:(e,t,r)=>{r.d(t,{Jx:()=>c,zD:()=>a});var n=r(99880);const o=[{pixelType:"S8",size:1,ctor:Int8Array,range:[-128,127]},{pixelType:"U8",size:1,ctor:Uint8Array,range:[0,255]},{pixelType:"S16",size:2,ctor:Int16Array,range:[-32768,32767]},{pixelType:"U16",size:2,ctor:Uint16Array,range:[0,65536]},{pixelType:"S32",size:4,ctor:Int32Array,range:[-2147483648,2147483647]},{pixelType:"U32",size:4,ctor:Uint32Array,range:[0,4294967296]},{pixelType:"F32",size:4,ctor:Float32Array,range:[-34027999387901484e22,34027999387901484e22]},{pixelType:"F64",size:8,ctor:Float64Array,range:[-17976931348623157e292,17976931348623157e292]}];let i=null,s=null;function a(){return i||(i=r.e(6233).then(r.bind(r,26233)).then((e=>e.l)).then((({default:e})=>e({locateFile:e=>(0,n.V)(`esri/layers/support/rasterFormats/${e}`)}))).then((e=>{(function(e){const{_malloc:t,_free:r,_lerc_getBlobInfo:n,_lerc_getDataRanges:i,_lerc_decode_4D:s,asm:a}=e;let h;const c=Object.values(a).find((t=>t&&"buffer"in t&&t.buffer===e.HEAPU8.buffer)),f=e=>{const r=e.map((e=>function(e){return 16+(e>>3<<3)}(e))),n=r.reduce(((e,t)=>e+t)),o=t(n);h=new Uint8Array(c.buffer);let i=r[0];r[0]=o;for(let e=1;e<r.length;e++){const t=r[e];r[e]=r[e-1]+i,i=t}return r};l.getBlobInfo=e=>{const t=new Uint8Array(48),o=new Uint8Array(24),[s,a,l]=f([e.length,t.length,o.length]);h.set(e,s),h.set(t,a),h.set(o,l);let d=n(s,e.length,a,l,12,3);if(d)throw r(s),new Error(`lerc-getBlobInfo: error code is ${d}`);h=new Uint8Array(c.buffer),u(h,a,t),u(h,l,o);const p=new Uint32Array(t.buffer),g=new Float64Array(o.buffer),[m,y,,w,C,b,x,k,v,T,S]=p,A={version:m,depthCount:T,width:w,height:C,validPixelCount:x,bandCount:b,blobSize:k,maskCount:v,dataType:y,minValue:g[0],maxValue:g[1],maxZerror:g[2],statistics:[],bandCountWithNoData:S};if(S)return A;if(1===T&&1===b)return r(s),A.statistics.push({minValue:g[0],maxValue:g[1]}),A;const I=T*b*8,P=new Uint8Array(I),M=new Uint8Array(I);let E=s,D=0,R=0,L=!1;if(h.byteLength<s+2*I?(r(s),L=!0,[E,D,R]=f([e.length,I,I]),h.set(e,E)):[D,R]=f([I,I]),h.set(P,D),h.set(M,R),d=i(E,e.length,T,b,D,R),d)throw r(E),L||r(D),new Error(`lerc-getDataRanges: error code is ${d}`);h=new Uint8Array(c.buffer),u(h,D,P),u(h,R,M);const _=new Float64Array(P.buffer),B=new Float64Array(M.buffer),U=A.statistics;for(let e=0;e<b;e++)if(T>1){const t=_.slice(e*T,(e+1)*T),r=B.slice(e*T,(e+1)*T),n=Math.min.apply(null,t),o=Math.max.apply(null,r);U.push({minValue:n,maxValue:o,depthStats:{minValues:t,maxValues:r}})}else U.push({minValue:_[e],maxValue:B[e]});return r(E),L||r(D),A},l.decode=(e,t)=>{const{maskCount:n,depthCount:i,bandCount:a,width:l,height:d,dataType:p,bandCountWithNoData:g}=t,m=o[p],y=l*d,w=new Uint8Array(y*a),C=y*i*a*m.size,b=new Uint8Array(C),x=new Uint8Array(a),k=new Uint8Array(8*a),[v,T,S,A,I]=f([e.length,w.length,b.length,x.length,k.length]);h.set(e,v),h.set(w,T),h.set(b,S),h.set(x,A),h.set(k,I);const P=s(v,e.length,n,T,i,l,d,a,p,S,A,I);if(P)throw r(v),new Error(`lerc-decode: error code is ${P}`);h=new Uint8Array(c.buffer),u(h,S,b),u(h,T,w);let M=null;if(g){u(h,A,x),u(h,I,k),M=[];const e=new Float64Array(k.buffer);for(let t=0;t<x.length;t++)M.push(x[t]?e[t]:null)}return r(v),{data:b,maskData:w,noDataValues:M}}})(e),s=!0})),i)}const l={getBlobInfo:null,decode:null};function u(e,t,r){r.set(e.slice(t,t+r.length))}function h(e,t,r,n,o){if(r<2)return e;const i=new n(t*r);if(o)for(let n=0,o=0;n<t;n++)for(let s=0,a=n;s<r;s++,a+=t)i[a]=e[o++];else for(let n=0,o=0;n<t;n++)for(let s=0,a=n;s<r;s++,a+=t)i[o++]=e[a];return i}function c(e,t={}){const r=t.inputOffset??0,n=e instanceof Uint8Array?e.subarray(r):new Uint8Array(e,r),i=l.getBlobInfo(n),{data:s,maskData:a,noDataValues:u}=l.decode(n,i),{width:c,height:f,bandCount:d,depthCount:p,dataType:g,maskCount:m,statistics:y}=i,w=o[g],C=new w.ctor(s.buffer),b=[],x=[],k=c*f,v=k*p;for(let e=0;e<d;e++){const r=C.subarray(e*v,(e+1)*v);if(t.returnInterleaved)b.push(r);else{const e=h(r,k,p,w.ctor,!0);b.push(e)}x.push(a.subarray(e*v,(e+1)*v))}const T=0===m?null:1===m?x[0]:new Uint8Array(k);if(m>1){T.set(x[0]);for(let e=1;e<x.length;e++){const t=x[e];for(let e=0;e<k;e++)T[e]=T[e]&t[e]}}const{noDataValue:S}=t,A=null!=S&&w.range[0]<=S&&w.range[1]>=S;if(m>0&&A)for(let e=0;e<d;e++){const t=b[e],r=x[e]||T;for(let e=0;e<k;e++)0===r[e]&&(t[e]=S)}const I=m===d&&d>1?x:null,{pixelType:P}=w;return{width:c,height:f,bandCount:d,pixelType:P,depthCount:p,statistics:y,pixels:b,mask:T,bandMasks:I,noDataValues:u}}},88781:(e,t,r)=>{function n(){const e=[];for(let t=0;t<=257;t++)e[t]=[t];return e}function o(e,t){for(let r=0;r<t.length;r++)e.push(t[r])}r.d(t,{J:()=>s});const i=new Set;function s(e,t,r,s=!0){const a=function(e,t,r,n=!0){if(t%4!=0||r%4!=0){const o=new ArrayBuffer(4*Math.ceil(r/4)),i=new Uint8Array(o),s=new Uint8Array(e,t,r);if(n)for(let e=0;e<i.length;e+=4)i[e]=s[e+3],i[e+1]=s[e+2],i[e+2]=s[e+1],i[e+3]=s[e];else i.set(s);return new Uint32Array(i.buffer)}if(n){const n=new Uint8Array(e,t,r),o=new Uint8Array(n.length);for(let e=0;e<o.length;e+=4)o[e]=n[e+3],o[e+1]=n[e+2],o[e+2]=n[e+1],o[e+3]=n[e];return new Uint32Array(o.buffer)}return new Uint32Array(e,t,r/4)}(e,t,r,s);let l=9,u=n(),h=32,c=u.length,f=[],d=1,p=a[0],g=0;const m=a.length,y=8*(4*m-r),w=[];for(;null!=p;){if(h>=l)h-=l,g=p>>>32-l,p<<=l;else{g=p>>>32-h,p=a[d++];const e=l-h;h=32-e,g=(g<<e)+(p>>>h),p<<=e}if(257===g)break;if(256===g){l=9,u=n(),c=u.length,f=[];continue}const e=u[g];if(null==e){if(g>u.length)throw new Error("data integrity issue: code does not exist on code page");f.push(f[0]),u[c++]=f.slice(),o(w,f)}else o(w,e),f.push(e[0]),f.length>1&&(u[c++]=f.slice()),f=e.slice();if(i.has(c)&&l++,0===h&&(p=a[d++],h=32),d>m||d===m&&h<=y)break}return new Uint8Array(w)}i.add(511),i.add(1023),i.add(2047),i.add(4095),i.add(8191)},75993:(e,t,r)=>{r.d(t,{J:()=>R,y:()=>D});var n=r(20102),o=r(70586),i=r(5847),s=r(95330),a=r(80899);class l{constructor(e){this._canvas=null,this._ctx=null,e&&(this._canvas=e.canvas,this._ctx=e.ctx||e.canvas&&e.canvas.getContext("2d"))}decode(e,t,r){if(!e||e.byteLength<10)throw new n.Z("imagecanvasdecoder: decode","required a valid encoded data as input.");let{width:o=0,height:i=0,format:a}=t;const{applyJpegMask:u}=t;if(u&&(!o||!i))throw new n.Z("imagecanvasdecoder: decode","image width and height are needed to apply jpeg mask directly to canvas");return new Promise(((n,h)=>{let c=null;"jpg"===a&&u&&(c=l._getMask(e,{width:o,height:i}));const f=new Blob([new Uint8Array(e)],{type:"image/"+a=="jpg"?"jpeg":a}),d=URL.createObjectURL(f),p=new Image;let g;p.src=d,p.onload=()=>{if(URL.revokeObjectURL(d),(0,s.Hc)(r))return void h((0,s.zE)());o=p.width,i=p.height,this._canvas&&this._ctx?(this._canvas.width===o&&this._canvas.height===i||(this._canvas.width=o,this._canvas.height=i),this._ctx.clearRect(0,0,o,i)):(this._canvas=document.createElement("canvas"),this._canvas.width=o,this._canvas.height=i,this._ctx=this._canvas.getContext("2d")),this._ctx.drawImage(p,0,0);const e=this._ctx.getImageData(0,0,o,i);let a;if(g=e.data,t.renderOnCanvas){if(c)for(a=0;a<c.length;a++)c[a]?g[4*a+3]=255:g[4*a+3]=0;return this._ctx.putImageData(e,0,0),void n(null)}const l=o*i,u=new Uint8Array(l),f=new Uint8Array(l),m=new Uint8Array(l);if(c)for(a=0;a<l;a++)u[a]=g[4*a],f[a]=g[4*a+1],m[a]=g[4*a+2];else for(c=new Uint8Array(l),a=0;a<l;a++)u[a]=g[4*a],f[a]=g[4*a+1],m[a]=g[4*a+2],c[a]=g[4*a+3];n({width:o,height:i,pixels:[u,f,m],mask:c,pixelType:"u8"})},p.onerror=()=>{URL.revokeObjectURL(d),h("cannot load image")}}))}static _getMask(e,t){let r=null;try{const n=new Uint8Array(e),o=Math.ceil(n.length/2);let i=0;const s=n.length-2;for(i=o;i<s&&(255!==n[i]||217!==n[i+1]);i++);if(i+=2,i<n.length-1){const e=new a.Z(n.subarray(i)).getBytes();r=new Uint8Array(t.width*t.height);let o=0;for(let t=0;t<e.length;t++)for(let n=7;n>=0;n--)r[o++]=e[t]>>n&1}}catch(e){}return r}}var u=r(97575);class h{static decode(e,t=!1){const r=new Uint8Array(e),n=new u.J;n.parse(r);const{width:o,height:i,numComponents:s,eof:l}=n,h=n.getData(o,i,!0),c=o*i;let f,d=null,p=0,g=0,m=0;if(!t&&l<r.length-1)try{const e=new a.Z(r.subarray(l)).getBytes();d=new Uint8Array(c);let t=0;for(p=0;p<e.length;p++)for(m=7;m>=0;m--)d[t++]=e[p]>>m&1}catch{}if(1===s&&h.length===o*i){const e=new Uint8Array(h.buffer);f=[e,e,e]}else{for(f=[],p=0;p<3;p++)f.push(new Uint8Array(c));for(m=0,g=0;g<c;g++)for(p=0;p<3;p++)f[p][g]=h[m++]}return{width:o,height:i,pixels:f,mask:d}}}var c=r(72955),f=r(88781),d=r(81578);const p=(e,t)=>{const r=t.width*t.height,n=t.pixelType;return Math.floor(e.byteLength/(r*g(n)))},g=e=>{let t=1;switch(e){case Uint8Array:case Int8Array:t=1;break;case Uint16Array:case Int16Array:t=2;break;case Uint32Array:case Int32Array:case Float32Array:t=4;break;case Float64Array:t=8}return t};class m{static decode(e,t){const r=t.pixelType,n=[],o=t.width*t.height,i=p(e,t),{bandIds:s,format:a}=t,l=s&&s.length||p(e,t),u=e.byteLength-e.byteLength%(o*g(r)),h=new r(e,0,o*i);let c,f,d,m,y=null;if("bip"===a)for(c=0;c<l;c++){for(d=new r(o),m=s?s[c]:c,f=0;f<o;f++)d[f]=h[f*i+m];n.push(d)}else if("bsq"===a)for(c=0;c<l;c++)m=s?s[c]:c,n.push(h.subarray(m*o,(m+1)*o));return u<e.byteLength-1&&(y=((e,t)=>{if(8*e.byteLength<t)return null;const r=new Uint8Array(e,0,Math.ceil(t/8)),n=new Uint8Array(t);let o=0,i=0,s=0,a=0;for(s=0;s<r.length-1;s++)for(i=r[s],a=7;a>=0;a--)n[o++]=i>>a&1;for(a=7;o<t-1;)i=r[r.length-1],n[o++]=i>>a&1,a--;return n})(e.slice(u),o)),{pixels:n,mask:y}}}var y=r(94793),w=r(48279),C=function(e){var t,r,n;function o(e){var t,r,n,o,i,s,a,l,u,h,c,f,d;for(this.data=e,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},i=null;;){switch(t=this.readUInt32(),l=function(){var e,t;for(t=[],e=0;e<4;++e)t.push(String.fromCharCode(this.data[this.pos++]));return t}.call(this).join(""),l){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(t);break;case"fcTL":i&&this.animation.frames.push(i),this.pos+=4,i={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},o=this.readUInt16(),n=this.readUInt16()||100,i.delay=1e3*o/n,i.disposeOp=this.data[this.pos++],i.blendOp=this.data[this.pos++],i.data=[];break;case"IDAT":case"fdAT":for("fdAT"===l&&(this.pos+=4,t-=4),e=(null!=i?i.data:void 0)||this.imgData,c=0;0<=t?c<t:c>t;0<=t?++c:--c)e.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(this.transparency.indexed=this.read(t),(u=255-this.transparency.indexed.length)>0)for(f=0;0<=u?f<u:f>u;0<=u?++f:--f)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(t)[0];break;case 2:this.transparency.rgb=this.read(t)}break;case"tEXt":s=(h=this.read(t)).indexOf(0),a=String.fromCharCode.apply(String,h.slice(0,s)),this.text[a]=String.fromCharCode.apply(String,h.slice(s+1));break;case"IEND":return i&&this.animation.frames.push(i),this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=4===(d=this.colorType)||6===d,r=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*r,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=t}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}return o.load=function(e,t,r){var n;return"function"==typeof t&&(r=t),(n=new XMLHttpRequest).open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){var e;return e=new o(new Uint8Array(n.response||n.mozResponseArrayBuffer)),"function"==typeof(null!=t?t.getContext:void 0)&&e.render(t),"function"==typeof r?r(e):void 0},n.send(null)},o.prototype.read=function(e){var t,r;for(r=[],t=0;0<=e?t<e:t>e;0<=e?++t:--t)r.push(this.data[this.pos++]);return r},o.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},o.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},o.prototype.decodePixels=function(e){var t,r,n,o,i,s,l,u,h,c,f,d,p,g,m,y,w,C,b,x,k,v,T;if(null==e&&(e=this.imgData),0===e.length)return new Uint8Array(0);for(e=(e=new a.Z(e)).getBytes(),y=(d=this.pixelBitlength/8)*this.width,p=new Uint8Array(y*this.height),s=e.length,m=0,g=0,r=0;g<s;){switch(e[g++]){case 0:for(o=b=0;b<y;o=b+=1)p[r++]=e[g++];break;case 1:for(o=x=0;x<y;o=x+=1)t=e[g++],i=o<d?0:p[r-d],p[r++]=(t+i)%256;break;case 2:for(o=k=0;k<y;o=k+=1)t=e[g++],n=(o-o%d)/d,w=m&&p[(m-1)*y+n*d+o%d],p[r++]=(w+t)%256;break;case 3:for(o=v=0;v<y;o=v+=1)t=e[g++],n=(o-o%d)/d,i=o<d?0:p[r-d],w=m&&p[(m-1)*y+n*d+o%d],p[r++]=(t+Math.floor((i+w)/2))%256;break;case 4:for(o=T=0;T<y;o=T+=1)t=e[g++],n=(o-o%d)/d,i=o<d?0:p[r-d],0===m?w=C=0:(w=p[(m-1)*y+n*d+o%d],C=n&&p[(m-1)*y+(n-1)*d+o%d]),l=i+w-C,u=Math.abs(l-i),c=Math.abs(l-w),f=Math.abs(l-C),h=u<=c&&u<=f?i:c<=f?w:C,p[r++]=(t+h)%256;break;default:throw new Error("Invalid filter algorithm: "+e[g-1])}m++}return p},o.prototype.decodePalette=function(){var e,t,r,n,o,i,s,a,l;for(r=this.palette,i=this.transparency.indexed||[],o=new Uint8Array((i.length||0)+r.length),n=0,r.length,e=0,t=s=0,a=r.length;s<a;t=s+=3)o[n++]=r[t],o[n++]=r[t+1],o[n++]=r[t+2],o[n++]=null!=(l=i[e++])?l:255;return o},o.prototype.copyToImageData=function(e,t){var r,n,o,i,s,a,l,u,h,c,f;if(n=this.colors,h=null,r=this.hasAlphaChannel,this.palette.length&&(h=null!=(f=this._decodedPalette)?f:this._decodedPalette=this.decodePalette(),n=4,r=!0),u=(o=e.data||e).length,s=h||t,i=a=0,1===n)for(;i<u;)l=h?4*t[i/4]:a,c=s[l++],o[i++]=c,o[i++]=c,o[i++]=c,o[i++]=r?s[l++]:this.transparency.grayscale&&this.transparency.grayscale===c?0:255,a=l;else for(;i<u;)l=h?4*t[i/4]:a,o[i++]=s[l++],o[i++]=s[l++],o[i++]=s[l++],o[i++]=r?s[l++]:this.transparency.rgb&&this.transparency.rgb[1]===s[l-3]&&this.transparency.rgb[3]===s[l-2]&&this.transparency.rgb[5]===s[l-1]?0:255,a=l},o.prototype.decode=function(){var e;return e=new Uint8Array(this.width*this.height*4),this.copyToImageData(e,this.decodePixels()),e},r=e.document&&e.document.createElement("canvas"),n=r&&r.getContext("2d"),t=function(e){var t;return n.width=e.width,n.height=e.height,n.clearRect(0,0,e.width,e.height),n.putImageData(e,0,0),(t=new Image).src=r.toDataURL(),t},o.prototype.decodeFrames=function(e){var r,n,o,i,s,a,l,u;if(this.animation){for(u=[],n=s=0,a=(l=this.animation.frames).length;s<a;n=++s)r=l[n],o=e.createImageData(r.width,r.height),i=this.decodePixels(new Uint8Array(r.data)),this.copyToImageData(o,i),r.imageData=o,u.push(r.image=t(o));return u}},o.prototype.renderFrame=function(e,t){var r,n,o;return r=(n=this.animation.frames)[t],o=n[t-1],0===t&&e.clearRect(0,0,this.width,this.height),1===(null!=o?o.disposeOp:void 0)?e.clearRect(o.xOffset,o.yOffset,o.width,o.height):2===(null!=o?o.disposeOp:void 0)&&e.putImageData(o.imageData,o.xOffset,o.yOffset),0===r.blendOp&&e.clearRect(r.xOffset,r.yOffset,r.width,r.height),e.drawImage(r.image,r.xOffset,r.yOffset)},o.prototype.animate=function(e){var t,r,n,o,i,s,a=this;return r=0,s=this.animation,o=s.numFrames,n=s.frames,i=s.numPlays,(t=function(){var s,l;if(s=r++%o,l=n[s],a.renderFrame(e,s),o>1&&r/o<i)return a.animation._timeout=setTimeout(t,l.delay)})()},o.prototype.stopAnimation=function(){var e;return clearTimeout(null!=(e=this.animation)?e._timeout:void 0)},o.prototype.render=function(e){var t,r;return e._png&&e._png.stopAnimation(),e._png=this,e.width=this.width,e.height=this.height,t=e.getContext("2d"),this.animation?(this.decodeFrames(t),this.animate(t)):(r=t.createImageData(this.width,this.height),this.copyToImageData(r,this.decodePixels()),t.putImageData(r,0,0))},o}(self);const b=new Set(["jpg","png","bmp","gif"]);async function x(e,t){if(!w.f)throw new n.Z("rasterCoded:decode","lerc decoder is not supported on big endian platform");await(0,c.zD)();const{offset:r}=t,{width:o,height:s,pixelType:a,statistics:l,depthCount:u,noDataValues:h,bandMasks:f,pixels:d,mask:p}=(0,c.Jx)(e,{inputOffset:r,returnInterleaved:t.returnInterleaved});return new i.Z({width:o,height:s,pixelType:a.toLowerCase(),pixels:d,mask:p,statistics:l,bandMasks:f,depthCount:u,noDataValues:h})}async function k(e,t){const r=await(0,y.Jx)(e,{...t,noDataValue:null});(0,o.O3)(r);const n=new i.Z({width:r.width,height:r.height,pixels:r.pixels,pixelType:r.pixelType.toLowerCase(),mask:r.mask,statistics:null});return n.updateStatistics(),n}function v(e,t){const r=t.pixelType||"u8",n=i.Z.getPixelArrayConstructor(r),o="u8"===r?e:new n(e.buffer),s=[],a=t.planes||1;if(1===a)s.push(o);else for(let r=0;r<a;r++){const i=(t.width||1)*(t.height||e.length),l=new n(i);for(let e=0;e<i;e++)l[e]=o[e*a+r];s.push(l)}const l=new i.Z({width:t.width||1,height:t.height||e.length,pixels:s,pixelType:r,statistics:null});return l.updateStatistics(),l}function T(e,t){return v(new a.Z(new Uint8Array(e)).getBytes(),t)}function S(e,t){return v((0,f.J)(e,t.offset,t.eof,!t.isInputBigEndian),t)}function A(e,t,r){const{pixelTypeCtor:n}=function(e){let t=null,r=null;switch(e?e.toLowerCase():"f32"){case"u1":case"u2":case"u4":case"u8":r=255,t=Uint8Array;break;case"u16":r=r||65535,t=Uint16Array;break;case"u32":r=r||2**32-1,t=Uint32Array;break;case"s8":r=r||-128,t=Int8Array;break;case"s16":r=r||-32768,t=Int16Array;break;case"s32":r=r||0-2**31,t=Int32Array;break;default:t=Float32Array}return{pixelTypeCtor:t,noDataValue:r}}(t.pixelType),o=(0,m.decode)(e,{width:t.width,height:t.height,pixelType:n,format:r}),s=new i.Z({width:t.width,height:t.height,pixels:o.pixels,pixelType:t.pixelType,mask:o.mask,statistics:null});return s.updateStatistics(),s}function I(e,t){const r=h.decode(e,t.hasNoZlibMask??void 0),n=new i.Z({width:r.width,height:r.height,pixels:r.pixels,pixelType:"U8",mask:r.mask,statistics:null});return n.updateStatistics(),n}function P(e,t){const r=new Uint8Array(e),n=new C(r),{width:o,height:s}=t,a=o*s,l=n.decode();let u,h=0,c=0;const f=new Uint8Array(a);for(h=0;h<a;h++)f[h]=l[4*h+3];const d=new i.Z({width:o,height:s,pixels:[],pixelType:"U8",mask:f,statistics:[]});for(h=0;h<3;h++){for(u=new Uint8Array(a),c=0;c<a;c++)u[c]=l[4*c+h];d.addData({pixels:u})}return d.updateStatistics(),d}async function M(e,t,r,n){const o=new l,s={applyJpegMask:!1,format:t,...r},a=await o.decode(e,s,n),u=new i.Z(a);return u.updateStatistics(),u}function E(e){if(null==e)throw new n.Z("rasterCodec:decode","parameter encodeddata is required.");const t=new Uint8Array(e,0,10);let r="";return 255===t[0]&&216===t[1]?r="jpg":137===t[0]&&80===t[1]&&78===t[2]&&71===t[3]?r="png":67===t[0]&&110===t[1]&&116===t[2]&&90===t[3]&&73===t[4]&&109===t[5]&&97===t[6]&&103===t[7]&&101===t[8]&&32===t[9]?r="lerc":76===t[0]&&101===t[1]&&114===t[2]&&99===t[3]&&50===t[4]&&32===t[5]?r="lerc2":73===t[0]&&73===t[1]&&42===t[2]&&0===t[3]||77===t[0]&&77===t[1]&&0===t[2]&&42===t[3]||73===t[0]&&73===t[1]&&43===t[2]&&0===t[3]||77===t[0]&&77===t[1]&&0===t[2]&&43===t[3]?r="tiff":71===t[0]&&73===t[1]&&70===t[2]?r="gif":66===t[0]&&77===t[1]?r="bmp":String.fromCharCode.apply(null,t).toLowerCase().includes("error")&&(r="error"),r}function D(e){let t=E(e);return"lerc2"===t?t="lerc":"error"===t&&(t=""),t}async function R(e,t={},r){if(null==e)throw new n.Z("rasterCodec:decode","missing encodeddata parameter.");let o=t.format&&t.format.toLowerCase();if(!("bsq"!==o&&"bip"!==o||null!=t.width&&null!=t.height))throw new n.Z("rasterCodec:decode","requires width and height in options parameter.");if("tiff"===o&&t.customOptions)return async function(e,t){const r=await(0,y.Uw)(e,t.customOptions),n=new i.Z({width:r.width,height:r.height,pixels:r.pixels,pixelType:r.pixelType.toLowerCase(),mask:r.mask,statistics:null});return n.updateStatistics(),n}(e,t);if((!o||"bsq"!==o&&"bip"!==o&&"deflate"!==o&&"lzw"!==o)&&(o=E(e)),t.useCanvas&&b.has(o))return M(e,o,t,r);const s=function(e){let t=null;switch(e){case"lerc":case"lerc2":t=x;break;case"jpg":t=I;break;case"png":t=P;break;case"bsq":case"bip":t=(t,r)=>A(t,r,e);break;case"tiff":t=k;break;case"deflate":t=T;break;case"lzw":t=S;break;case"error":t=()=>{throw new n.Z("rasterCodec:decode","input data contains error")};break;default:t=()=>{throw new n.Z("rasterCodec:decode","unsupported raster format")}}return t}(o);t.isPoint&&(null!=(t={...t}).width&&t.width++,null!=t.height&&t.height++);const a=await s(e,t);return a?("jpg"!==o&&null!=t.noDataValue&&1===a.depthCount&&(0,d.A)(a,t.noDataValue,{customFloatTolerance:t.tolerance}),t.isPoint&&function(e,t=1){if(!e)return;const{pixels:r,width:n,height:o,mask:s}=e;if(!r||0===r.length)return;const a=r.length,l=n-1,u=o-1,h=[];let c,f,d,p,g,m,y=null;const w=i.Z.getPixelArrayConstructor(e.pixelType);if(0===t){for(c=0;c<a;c++){for(g=r[c],m=new w(l*u),f=0;f<u;f++)for(p=f*n,d=0;d<l;d++)m[f*l+d]=g[p+d];h.push(m)}if(null!=s)for(y=new Uint8Array(l*u),f=0;f<u;f++)for(p=f*n,d=0;d<l;d++)y[f*l+d]=s[p+d]}else{for(c=0;c<a;c++){for(g=r[c],m=new w(l*u),f=0;f<u;f++)for(p=f*n,d=0;d<l;d++)m[f*l+d]=(g[p+d]+g[p+d+1]+g[p+n+d]+g[p+n+d+1])/4;h.push(m)}if(s)for(y=new Uint8Array(l*u),f=0;f<u;f++)for(p=f*n,d=0;d<l;d++)y[f*l+d]=Math.min.apply(null,[s[p+d],s[p+d+1],s[p+n+d],s[p+n+d+1]])}e.width=l,e.height=u,e.mask=y,e.pixels=h}(a),a):a}},94793:(e,t,r)=>{r.d(t,{Dq:()=>E,FI:()=>D,I7:()=>_,If:()=>R,Jx:()=>z,Uw:()=>V,cK:()=>O,ee:()=>L,vr:()=>F});var n=r(20095),o=r(97575),i=r(72955),s=r(88781),a=r(81578),l=r(9832),u=r(48279),h=r(80899);const c=[0,1,1,2,4,8,1,1,2,4,8,4,8,-1,-1,-1,8,8,8],f=4294967296,d=new Set([1,5,6,7,8,34712,34887]);function p(e,t){let r="unknown";return 3===e?r=64===t?"f64":"f32":1===e?1===t?r="u1":2===t?r="u2":4===t?r="u4":t<=8?r="u8":t<=16?r="u16":t<=32&&(r="u32"):2===e&&(t<=8?r="s8":t<=16?r="s16":t<=32&&(r="s32")),r}function g(e){let t=null;switch(e?e.toLowerCase():"f32"){case"u1":case"u2":case"u4":case"u8":t=Uint8Array;break;case"u16":t=Uint16Array;break;case"u32":t=Uint32Array;break;case"s8":t=Int8Array;break;case"s16":t=Int16Array;break;case"s32":t=Int32Array;break;case"f64":t=Float64Array;break;default:t=Float32Array}return t}function m(e,t){return{x:t[0]*e.x+t[1]*e.y+t[2],y:t[3]*e.x+t[4]*e.y+t[5]}}function y(e,t){return e.get(t)?.values}function w(e,t){return e.get(t)?.values}function C(e,t){return e.get(t)?.values?.[0]}function b(e,t){return e.get(t)?.values?.[0]}function x(e,t,r,n=0,o=l.Z.TIFF_TAGS,i=4){const s=8===i,a=s?B(new DataView(e,r,8),0,t):new DataView(e,r,2).getUint16(0,t),u=4+2*i,h=s?8:2,c=h+a*u;if(r+c>e.byteLength)return{success:!1,ifd:null,nextIFD:null,requiredBufferSize:c};const f=r+c+4<=e.byteLength?G(new DataView(e,r+c,8===i?8:4),0,t,8===i):null,d=r+h,p=new Map;let g,m,y,w,C,b=0,x=0;for(let r=0;r<a;r++){m=new DataView(e,d+u*r,u),y=m.getUint16(0,t),C=m.getUint16(2,t),w=l.Z.getTagName(y,o);const s=[];2===i?(b=m.getUint16(4,t),x=m.getUint16(6,t)):4===i?(b=m.getUint32(4,t),x=m.getUint32(8,t)):8===i&&(b=G(m,4,t,!0),x=G(m,12,t,!0),s.push(m.getUint32(12,t)),s.push(m.getUint32(16,t))),g={id:y,type:C,valueCount:b,valueOffset:x,valueOffsets:s,values:null},E(e,t,g,n,!1,i),p.set(w,g)}return{success:!0,ifd:p,nextIFD:f,requiredBufferSize:c}}const k=(e,t)=>(0,i.Jx)(e,{inputOffset:t}).pixels[0];function v(e,t){if(1!==t&&2!==t&&4!==t)return e;const r=new Uint8Array(e),n=8/t,o=new Uint8Array(e.byteLength*n);let i=0;const s=2**t-1;for(let e=0;e<r.length;e++){const a=r[e];for(let e=0;e<n;e++)o[i++]=a<<t*e>>>8-t&s}return o.buffer}function T(e,t,r){const n=new o.J;n.parse(e),n.colorTransform=6===r?-1:0;const i=n.getData(n.width,n.height,1!==t);return new Uint8Array(i.buffer)}function S(e){const t=new h.Z(e).getBytes(),r=new ArrayBuffer(t.length),n=new Uint8Array(r);return n.set(t),n}async function A(e,t,r,n,o){const a=u.f===t,l=b(r,"BITSPERSAMPLE"),h=b(r,"SAMPLESPERPIXEL"),c=b(r,"PHOTOMETRICINTERPRETATION"),f=p(b(r,"SAMPLEFORMAT")??1,l),d=b(r,"COMPRESSION")??1,m=g(f);let y,w,C;if(34887===d)return await(0,i.zD)(),k(e,n);if(1===d)y=e.slice(n,n+o),w=new Uint8Array(y);else if(8===d||32946===d)w=new Uint8Array(e,n,o),w=S(w),y=w.buffer;else if(6===d)w=new Uint8Array(e,n,o),w=T(w,h,c),y=w.buffer;else if(7===d){const t=r.get("JPEGTABLES").values,i=t.length-2;w=new Uint8Array(i+o-2);for(let e=0;e<i;e++)w[e]=t[e];const s=new Uint8Array(e,n+2,o-2);for(let e=0;e<s.length;e++)w[i+e]=s[e];w=T(w,h,c),y=w.buffer}else{if(5!==d)throw new Error("tiff-decode: unsupport compression "+d);w=(0,s.J)(e,n,o,t),y=w.buffer}if(y=v(y,l),"u8"===f||"s8"===f||a)C=new m(y);else{y=new ArrayBuffer(w.length);const e=new Uint8Array(y);switch(f){case"u16":case"s16":for(let t=0;t<w.length;t+=2)e[t]=w[t+1],e[t+1]=w[t];break;case"u32":case"s32":case"f32":for(let t=0;t<w.length;t+=4)e[t]=w[t+3],e[t+1]=w[t+2],e[t+2]=w[t+1],e[t+3]=w[t]}C=new m(y)}return C}const I=(e,t,r)=>{const n=u.f===t.littleEndian,o=w(r,"STRIPOFFSETS");if(void 0===o)return null;const{width:i,height:a,pixelType:l}=D([r]),h=b(r,"SAMPLESPERPIXEL")||t.planes,c=b(r,"PHOTOMETRICINTERPRETATION"),f=i*a,d=b(r,"BITSPERSAMPLE"),p=g(l),m=new p(f*h),y=w(r,"STRIPBYTECOUNTS"),C=b(r,"ROWSPERSTRIP"),x=b(r,"COMPRESSION")??1;let k,A,I,P,M,E,R,L,_,B=C;if(d%8==0)for(k=0;k<o.length;k++){if(M=k*(C*i)*h,B=(k+1)*C>a?a-k*C:C,"u8"===l||"s8"===l||n)8===x||32946===x?(R=new Uint8Array(e,o[k],y[k]),R=S(R),E=R.buffer):6===x?(R=new Uint8Array(e,o[k],y[k]),R=T(R,h,c),E=R.buffer):5===x?(R=(0,s.J)(e,o[k],y[k],t.littleEndian),E=R.buffer):(y[k]!==B*i*h*d/8&&console.log("strip byte counts is different than expected"),E=e.slice(o[k],o[k]+y[k])),E=v(E,d),P=new p(E);else{switch(6===x||8===x||32946===x?(R=new Uint8Array(e,o[k],y[k]),L=S(R),E=L.buffer):(y[k]!==B*i*h*d/8&&console.log("strip byte counts is different than expected"),E=new ArrayBuffer(y[k]),R=new Uint8Array(e,o[k],y[k]),L=new Uint8Array(E)),l){case"u16":case"s16":for(I=0;I<R.length;I+=2)L[I]=R[I+1],L[I+1]=R[I];break;case"u32":case"s32":case"f32":for(I=0;I<R.length;I+=4)L[I]=R[I+3],L[I+1]=R[I+2],L[I+2]=R[I+1],L[I+3]=R[I]}E=v(E,d),P=new p(E)}m.set(P,M)}const U=[];if(1===h)U.push(m);else for(k=0;k<h;k++){for(_=new p(f),A=0;A<f;A++)_[A]=m[A*h+k];U.push(_)}return{width:i,height:a,pixelType:l,pixels:U}},P=(e,t,r)=>{if(!(e&&e.length>0&&t&&r))return null;let n,o,i;const s=e[0].length,a=e.length,l=new Uint8Array(s);for(let u=0;u<a;u++)if(n=e[u],o=t[u],i=r[u],0===u)for(let e=0;e<s;e++)l[e]=n[e]<o||n[e]>i?0:1;else for(let e=0;e<s;e++)l[e]&&(l[e]=n[e]<o||n[e]>i?0:1);return l},M=e=>{if(!e)return null;const t=e.match(/<Item(.*?)Item>/gi);if(!t||0===t.length)return null;const r=new Map;let n,o,i,s,a;for(let e=0;e<t.length;e++)n=t[e],o=n.slice("<Item ".length,n.indexOf(">")),s=n.indexOf("sample="),s>-1&&(a=n.slice(s+'sample="'.length,n.indexOf('"',s+'sample="'.length))),s=n.indexOf("name="),s>-1&&(o=n.slice(s+'name="'.length,n.indexOf('"',s+'name="'.length))),o&&(i=n.slice(n.indexOf(">")+1,n.indexOf("</Item>")).trim(),null!=a?r.has(o)?r.get(o)[a]=i:r.set(o,[i]):r.set(o,i)),a=null;const l=r.get("STATISTICS_MINIMUM"),u=r.get("STATISTICS_MAXIMUM"),h=r.get("STATISTICS_MEAN"),c=r.get("STATISTICS_STDDEV");let f=null;if(l&&u){f=[];for(let e=0;e<l.length;e++)f.push({min:parseFloat(l[e]),max:parseFloat(u[e]),avg:h&&parseFloat(h[e]),stddev:c&&parseFloat(c[e])})}const d=r.get("BandName"),p=r.get("WavelengthMin"),g=r.get("WavelengthMax");let m=null;if(d){m=[];for(let e=0;e<d.length;e++)m.push({BandName:d[e],WavelengthMin:p&&parseFloat(p[e]),WavelengthMax:g&&parseFloat(g[e])})}return{statistics:f,bandProperties:m,dataType:r.get("DataType"),rawMetadata:r}};function E(e,t,r,n=0,o=!1,i=4){if(r.values)return!0;const s=r.type,a=r.valueCount;let l=r.valueOffset,u=[];const h=c[s],d=8*h,p=a*h,g=a*c[s]*8;let m,y;const w=8===i?64:32,C=r.valueOffsets;if(g>w&&p>(o?e.byteLength:e?e.byteLength-l+n:0))return r.offlineOffsetSize=[l,p],r.values=null,!1;if(g<=w){if(!t)if(w<=32)l>>>=32-g;else{const e=C?.length?C[0]:l>>>0,t=C?.length?C[1]:Math.round((l-e)/f);g<=32?(l=e>>>32-g,C[0]=l):(l=e*2**(32-g)+(t>>>32-g),C[0]=e,C[1]=t>>>32-g)}if(1===a&&d===w)u=[l];else if(64===w){const e=C?.length?C[0]:l>>>0,t=C?.length?C[1]:Math.round((l-e)/f);let r=e,n=32;for(y=1;y<=a;y++){const e=32-d*y%32;if(n<d){const o=r<<e>>>32-n,i=t<<32-n>>>32-n;r=t,u.push(o+i*2**(d-n)),n-=32-(d-n)}else u.push(r<<e>>>32-d),n-=d;0===n&&(n=32,r=t)}}else for(y=1;y<=a;y++){const e=32-d*y;u.push(l<<e>>>32-d)}}else{l-=n,o&&(l=0);for(let r=l;r<l+p;r+=h){switch(s){case 1:case 2:case 7:m=new DataView(e,r,1).getUint8(0);break;case 3:m=new DataView(e,r,2).getUint16(0,t);break;case 4:case 13:m=new DataView(e,r,4).getUint32(0,t);break;case 5:m=new DataView(e,r,4).getUint32(0,t)/new DataView(e,r+4,4).getUint32(0,t);break;case 6:m=new DataView(e,r,1).getInt8(0);break;case 8:m=new DataView(e,r,2).getInt16(0,t);break;case 9:m=new DataView(e,r,4).getInt32(0,t);break;case 10:m=new DataView(e,r,4).getInt32(0,t)/new DataView(e,r+4,4).getInt32(0,t);break;case 11:m=new DataView(e,r,4).getFloat32(0,t);break;case 12:m=new DataView(e,r,8).getFloat64(0,t);break;case 16:case 18:m=B(new DataView(e,r,8),0,t);break;case 17:m=U(new DataView(e,r,8),0,t);break;default:m=null}u.push(m)}}if(2===s){let e="";const t=u;for(u=[],y=0;y<t.length;y++)0===t[y]&&""!==e?(u.push(e),e=""):e+=String.fromCharCode(t[y]);""===e&&0!==u.length||u.push(e)}return r.values=u,!0}function D(e){const t=e[0],r=b(t,"TILEWIDTH"),n=b(t,"TILELENGTH"),o=b(t,"IMAGEWIDTH"),i=b(t,"IMAGELENGTH"),s=b(t,"BITSPERSAMPLE"),a=b(t,"SAMPLESPERPIXEL"),l=b(t,"SAMPLEFORMAT")??1,u=p(l,s),h=R(t),c=y(t,"GDAL_NODATA");let f=null;c?.length&&(f=c.map((e=>parseFloat(e))),f.some((e=>isNaN(e)))&&(f=null));const g=b(t,"COMPRESSION")??1;let x;switch(g){case 1:x="NONE";break;case 2:case 3:case 4:case 32771:x="CCITT";break;case 5:x="LZW";break;case 6:case 7:x="JPEG";break;case 32773:x="PACKBITS";break;case 8:case 32946:x="DEFLATE";break;case 34712:x="JPEG2000";break;case 34887:x="LERC";break;default:x=String(g)}let k=!0,v="";d.has(g)||(k=!1,v+="unsupported tag compression "+g),l>3&&(k=!1,v+="unsupported tag sampleFormat "+l),1!==s&&2!==s&&4!==s&&s%8!=0&&(k=!1,v+="unsupported tag bitsPerSample "+s);const T=C(t,"GEOASCIIPARAMS");let S;if(T){const e=T.split("|").find((e=>e.includes("ESRI PE String = "))),t=e?e.replace("ESRI PE String = ",""):"";S=t.startsWith("COMPD_CS")||t.startsWith("PROJCS")||t.startsWith("GEOGCS")?{wkid:null,wkt:t}:null}const A=w(t,"GEOTIEPOINTS"),I=w(t,"GEOPIXELSCALE"),P=w(t,"GEOTRANSMATRIX"),E=t.has("GEOKEYDIRECTORY")?t.get("GEOKEYDIRECTORY").data:null;let D,B,U=!1,G=!1;if(E){U=2===b(E,"GTRasterTypeGeoKey");const e=b(E,"GTModelTypeGeoKey");if(2===e){const e=b(E,"GeographicTypeGeoKey");e>=1024&&e<=32766&&(S={wkid:e}),S||32767!==e||(G=!0,S={wkid:4326})}else if(1===e){const e=b(E,"ProjectedCSTypeGeoKey");e>=1024&&e<=32766&&(S={wkid:e})}}if(I&&A&&A.length>=6?(D=[I[0],0,A[3]-A[0]*I[0],0,-Math.abs(I[1]),A[4]-A[1]*I[1]],U&&(D[2]-=.5*D[0]+.5*D[1],D[5]-=.5*D[3]+.5*D[4])):P&&16===P.length&&(D=U?[P[0],P[1],P[3]-.5*P[0],P[4],P[5],P[7]-.5*P[5]]:[P[0],P[1],P[3],P[4],P[5],P[7]]),D){const e=[{x:0,y:i},{x:0,y:0},{x:o,y:i},{x:o,y:0}];let t,r=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,a=Number.NEGATIVE_INFINITY;for(let o=0;o<e.length;o++)t=m(e[o],D),r=t.x>r?r:t.x,s=t.x<s?s:t.x,n=t.y>n?n:t.y,a=t.y<a?a:t.y;B={xmin:r,xmax:s,ymin:n,ymax:a,spatialReference:S}}else B={xmin:-.5,ymin:.5-i,xmax:o-.5,ymax:.5,spatialReference:S};G&&(B.xmax-B.xmin>400||Math.max(Math.abs(B.xmin),Math.abs(B.xmax))>361)&&(S=null,B.spatialReference=null);const O=L(e);let F,V,z,j,Z;if(O.length>0){z=Math.round(Math.log(o/b(O[0],"IMAGEWIDTH"))/Math.LN2);const e=O[O.length-1];j=Math.round(Math.log(o/b(e,"IMAGEWIDTH"))/Math.LN2),F=b(e,"TILEWIDTH"),V=b(e,"TILELENGTH")}F=null!=j&&j>0?F||r:null,V=null!=j&&j>0?V||n:null,r&&(Z=[{maxCol:Math.ceil(o/r)-1,maxRow:Math.ceil(i/n)-1,minRow:0,minCol:0}],O.forEach((e=>{Z.push({maxCol:Math.ceil(b(e,"IMAGEWIDTH")/b(e,"TILEWIDTH"))-1,maxRow:Math.ceil(b(e,"IMAGELENGTH")/b(e,"TILELENGTH"))-1,minRow:0,minCol:0})})));const J=C(e[0],"GDAL_METADATA"),W=M(J);return v+=" "+N({width:o,height:i,tileWidth:r,tileHeight:n,planes:a,ifds:e}),{width:o,height:i,tileWidth:r,tileHeight:n,planes:a,isBSQ:h,pixelType:u,compression:x,noData:f,hasMaskBand:_(e).length===O.length+1,isSupported:k,message:v,extent:B,isPseudoGeographic:G,affine:I?null:D,firstPyramidLevel:z,maximumPyramidLevel:j,pyramidBlockWidth:F,pyramidBlockHeight:V,tileBoundary:Z,metadata:W}}function R(e,t){const r=y(e,"PLANARCONFIGURATION");return r?2===r[0]:!!t&&t.isBSQ}function L(e){return e.filter((e=>1===b(e,"NEWSUBFILETYPE")))}function _(e){return e.filter((e=>{const t=4==(4&(b(e,"NEWSUBFILETYPE")??0)),r=4===b(e,"PHOTOMETRICINTERPRETATION");return t&&r}))}function B(e,t,r){const n=e.getUint32(t,r),o=e.getUint32(t+4,r);return r?o*f+n:n*f+o}function U(e,t,r){let n=r?e.getInt32(t,r):e.getUint32(t,r),o=r?e.getUint32(t+4,r):e.getInt32(t+4,r);const i=(r?n:o)>=0?1:-1;return r?n*=i:o*=i,i*(r?o*f+n:n*f+o)}function G(e,t,r,n){return n?B(e,t,r):e.getUint32(t,r)}function O(e){const t=new DataView(e,0,16),r=t.getUint16(0,!1);let n=null;if(18761===r)n=!0;else{if(19789!==r)throw new Error("unexpected endianess byte");n=!1}const o=t.getUint16(2,n);if(42!==o&&43!==o)throw new Error("unexpected tiff identifier");let i=4;const s=43===o;if(s){const e=t.getUint16(i,n);if(i+=2,8!==e)throw new Error("unsupported bigtiff version");if(0!==t.getUint16(i,n))throw new Error("unsupported bigtiff version");i+=2}return{littleEndian:n,isBigTiff:s,firstIFDPos:G(t,i,n,s)}}function F(e,t,r,o=0,i=l.Z.TIFF_TAGS,s=4){const a=x(e,t,r,o,i,s);let u;const h=a.ifd;if(h){if(l.Z.ifdTags.forEach(((r,n)=>{h.has(n)&&(u=h.get(n),u.data=x(e,t,u.valueOffset-o,o,r).ifd)})),h.has("GEOKEYDIRECTORY")){u=h.get("GEOKEYDIRECTORY");const r=u.values;if(r&&r.length>4){const n=r[0]+"."+r[1]+"."+r[2];u.data=x(e,t,u.valueOffset+6-o,o,l.Z.GEO_KEYS,2).ifd,u.data&&u.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[n]})}}if(h.has("XMP")){u=h.get("XMP");const e=u.values;"number"==typeof e[0]&&7===u.type&&(u.values=[(0,n.f)(new Uint8Array(e))])}}return a}function N(e){const{width:t,height:r,tileHeight:n,tileWidth:o}=e,i=e.planes,s=o?o*n:t*r,a=b(e.ifds[0],"BITSPERSAMPLE");let l="";return s*i>2**30/(a>8?a/8:1)&&(l=o?"tiled tiff exceeding 1 gigabits per tile is not supported":"scanline tiff exceeding 1 gigabits is not supported"),l}async function V(e,t){const{headerInfo:r,ifd:n,offsets:o,sizes:i}=t,s=[];for(let t=0;t<o.length;t++){const a=await A(e,r.littleEndian,n,o[t],i[t]||e.byteLength);s.push(a)}const l=R(n,r),u=b(n,"BITSPERSAMPLE"),h=p(b(n,"SAMPLEFORMAT")??1,u),c=b(n,"SAMPLESPERPIXEL")||r.planes,f=g(h),d=b(n,"TILEWIDTH"),m=b(n,"TILELENGTH"),y=b(n,"COMPRESSION")??1,w=d*m;let C;const x=[];let k=s[0];const v=34887===y;for(let e=0;e<c;e++){if(C=new f(w),l&&v){if(k=s[e],k.length)for(let t=0;t<w;t++)C[t]=k[e][t+e]}else if(k.length)if(l||v&&!l)C=k.slice(w*e,w*(e+1));else for(let t=0;t<w;t++)C[t]=k[t*c+e];x.push(C)}const T=r.noData?r.noData[0]:t.noDataValue,S=r.metadata?r.metadata.statistics:null,I=S?S.map((e=>e.min)):null,M=S?S.map((e=>e.max)):null,E={pixelType:h,width:d,height:m,pixels:x,noDataValue:T};return null!=T?(0,a.A)(E,T):I&&M&&t.applyMinMaxConstraint&&(E.mask=P(x,I,M)),E}async function z(e,t={}){const r=t.pyramidLevel||0,n=t.headerInfo||function(e){const{littleEndian:t,isBigTiff:r,firstIFDPos:n}=O(e);let o=n;const i=[];do{const n=F(e,t,o,0,l.Z.TIFF_TAGS,r?8:4);if(!n.success)break;i.push(n.ifd),o=n.nextIFD}while(o>0);return{...D(i),littleEndian:t,isBigTiff:r,ifds:i,pyramidIFDs:L(i),maskIFDs:_(i)}}(e),{ifds:o,noData:i}=n;if(0===o.length)throw new Error("no valid image file directory");const s=N(n);if(s)throw s;let u=null;const h=-1===r?o[o.length-1]:o[r],c=i??t.noDataValue;return u=n.tileWidth?await async function(e,t,r){const n=w(r,"TILEOFFSETS");if(void 0===n)return null;const o=w(r,"TILEBYTECOUNTS"),{width:i,height:s,pixelType:a,tileWidth:l,tileHeight:u}=D([r]),h=R(r,t),c=b(r,"SAMPLESPERPIXEL")||t.planes,f=i*s,d=b(r,"BITSPERSAMPLE"),p=34887===(b(r,"COMPRESSION")??1),m=g(a),y=[];for(let e=0;e<c;e++)y.push(new m(f));let C,x,k,v,T,S,I,P,M,E,L,_,B;const U=Math.ceil(i/l);if(d%8==0)if(p&&h&&c>1){const a=Math.round(n.length/c);for(C=0;C<a;C++){S=Math.floor(C/U)*u,I=C%U*l,P=S*i+I;for(let a=0;a<c;a++){const h=C*c+a;if(0!==o[h])for(k=await A(e,t.littleEndian,r,n[h],o[h]),E=0,M=P,_=Math.min(l,i-I),L=Math.min(u,s-S),B=y[a],v=0;v<L;v++)for(M=P+v*i,E=v*l,T=0;T<_;T++,M++,E++)B[M]=k[E]}}}else for(C=0;C<n.length;C++)if(0!==o[C])for(S=Math.floor(C/U)*u,I=C%U*l,P=S*i+I,k=await A(e,t.littleEndian,r,n[C],o[C]),E=0,M=P,_=Math.min(l,i-I),L=Math.min(u,s-S),x=0;x<c;x++)if(B=y[x],h||p)for(v=0;v<L;v++)for(M=P+v*i,E=l*u*x+v*l,T=0;T<_;T++,M++,E++)B[M]=k[E];else for(v=0;v<L;v++)for(M=P+v*i,E=v*l*c+x,T=0;T<_;T++,M++,E+=c)B[M]=k[E];return{width:i,height:s,pixelType:a,pixels:y}}(e,n,h):await I(e,n,h),u?(null!=c&&(0,a.A)(u,c),u):u}},9832:(e,t,r)=>{r.d(t,{Z:()=>a});const n=(()=>{const e=[];return e[254]="NEWSUBFILETYPE",e[255]="SUBFILETYPE",e[256]="IMAGEWIDTH",e[257]="IMAGELENGTH",e[258]="BITSPERSAMPLE",e[259]="COMPRESSION",e[262]="PHOTOMETRICINTERPRETATION",e[263]="THRESHHOLDING",e[264]="CELLWIDTH",e[265]="CELLLENGTH",e[266]="FILLORDER",e[269]="DOCUMENTNAME",e[270]="IMAGEDESCRIPTION",e[271]="MAKE",e[272]="MODEL",e[273]="STRIPOFFSETS",e[274]="ORIENTATION",e[277]="SAMPLESPERPIXEL",e[278]="ROWSPERSTRIP",e[279]="STRIPBYTECOUNTS",e[280]="MINSAMPLEVALUE",e[281]="MAXSAMPLEVALUE",e[282]="XRESOLUTION",e[283]="YRESOLUTION",e[284]="PLANARCONFIGURATION",e[285]="PAGENAME",e[286]="XPOSITION",e[287]="YPOSITION",e[288]="FREEOFFSETS",e[289]="FREEBYTECOUNTS",e[290]="GRAYRESPONSEUNIT",e[291]="GRAYRESPONSECURVE",e[292]="T4OPTIONS",e[293]="T6OPTIONS",e[296]="RESOLUTIONUNIT",e[297]="PAGENUMBER",e[300]="COLORRESPONSEUNIT",e[301]="TRANSFERFUNCTION",e[305]="SOFTWARE",e[306]="DATETIME",e[315]="ARTIST",e[316]="HOSTCOMPUTER",e[317]="PREDICTOR",e[318]="WHITEPOINT",e[319]="PRIMARYCHROMATICITIES",e[320]="COLORMAP",e[321]="HALFTONEHINTS",e[322]="TILEWIDTH",e[323]="TILELENGTH",e[324]="TILEOFFSETS",e[325]="TILEBYTECOUNTS",e[326]="BADFAXLINES",e[327]="CLEANFAXDATA",e[328]="CONSECUTIVEBADFAXLINES",e[330]="SUBIFD",e[332]="INKSET",e[333]="INKNAMES",e[334]="NUMBEROFINKS",e[336]="DOTRANGE",e[337]="TARGETPRINTER",e[338]="EXTRASAMPLES",e[339]="SAMPLEFORMAT",e[340]="SMINSAMPLEVALUE",e[341]="SMAXSAMPLEVALUE",e[342]="TRANSFERRANGE",e[347]="JPEGTABLES",e[512]="JPEGPROC",e[513]="JPEGIFOFFSET",e[514]="JPEGIFBYTECOUNT",e[515]="JPEGRESTARTINTERVAL",e[517]="JPEGLOSSLESSPREDICTORS",e[518]="JPEGPOINTTRANSFORM",e[519]="JPEGQTABLES",e[520]="JPEGDCTABLES",e[521]="JPEGACTABLES",e[529]="YCBCRCOEFFICIENTS",e[530]="YCBCRSUBSAMPLING",e[531]="YCBCRPOSITIONING",e[532]="REFERENCEBLACKWHITE",e[700]="XMP",e[33550]="GEOPIXELSCALE",e[33922]="GEOTIEPOINTS",e[33432]="COPYRIGHT",e[42112]="GDAL_METADATA",e[42113]="GDAL_NODATA",e[50844]="RPCCOEFFICIENT",e[34264]="GEOTRANSMATRIX",e[34735]="GEOKEYDIRECTORY",e[34736]="GEODOUBLEPARAMS",e[34737]="GEOASCIIPARAMS",e[34665]="EXIFIFD",e[34853]="GPSIFD",e[40965]="INTEROPERABILITYIFD",e})(),o=(()=>{const e=n.slice();return e[36864]="ExifVersion",e[40960]="FlashpixVersion",e[40961]="ColorSpace",e[42240]="Gamma",e[37121]="ComponentsConfiguration",e[37122]="CompressedBitsPerPixel",e[40962]="PixelXDimension",e[40963]="PixelYDimension",e[37500]="MakerNote",e[37510]="UserComment",e[40964]="RelatedSoundFile",e[36867]="DateTimeOriginal",e[36868]="DateTimeDigitized",e[36880]="OffsetTime",e[36881]="OffsetTimeOriginal",e[36882]="OffsetTimeDigitized",e[37520]="SubSecTime",e[37521]="SubSecTimeOriginal",e[37522]="SubSecTimeDigitized",e[37888]="Temperature",e[37889]="Humidity",e[37890]="Pressure",e[37891]="WaterDepth",e[37892]="Acceleration",e[37893]="CameraElevationAngle",e[42016]="ImageUniqueID",e[42032]="CameraOwnerName",e[42033]="BodySerialNumber",e[42034]="LensSpecification",e[42035]="LensMake",e[42036]="LensModel",e[42037]="LensSerialNumber",e[33434]="ExposureTime",e[33437]="FNumber",e[34850]="ExposureProgram",e[34852]="SpectralSensitivity",e[34855]="PhotographicSensitivity",e[34856]="OECF",e[34864]="SensitivityType",e[34865]="StandardOutputSensitivity",e[34866]="RecommendedExposureIndex",e[34867]="ISOSpeed",e[34868]="ISOSpeedLatitudeyyy",e[34869]="ISOSpeedLatitudezzz",e[37377]="ShutterSpeedValue",e[37378]="ApertureValue",e[37379]="BrightnessValue",e[37380]="ExposureBiasValue",e[37381]="MaxApertureValue",e[37382]="SubjectDistance",e[37383]="MeteringMode",e[37384]="LightSource",e[37385]="Flash",e[37386]="FocalLength",e[37396]="SubjectArea",e[41483]="FlashEnergy",e[41484]="SpatialFrequencyResponse",e[41486]="FocalPlaneXResolution",e[41487]="FocalPlaneYResolution",e[41488]="FocalPlaneResolutionUnit",e[41492]="SubjectLocation",e[41493]="ExposureIndex",e[41495]="SensingMethod",e[41728]="FileSource",e[41729]="SceneType",e[41730]="CFAPattern",e[41985]="CustomRendered",e[41986]="ExposureMode",e[41987]="WhiteBalance",e[41988]="DigitalZoomRatio",e[41989]="FocalLengthIn35mmFilm",e[41990]="SceneCaptureType",e[41991]="GainControl",e[41992]="Contrast",e[41993]="Saturation",e[41994]="Sharpness",e[41995]="DeviceSettingDescription",e[41996]="SubjectDistanceRange",e})(),i=(()=>{const e=[];return e[1024]="GTModelTypeGeoKey",e[1025]="GTRasterTypeGeoKey",e[1026]="GTCitationGeoKey",e[2048]="GeographicTypeGeoKey",e[2049]="GeogCitationGeoKey",e[2050]="GeogGeodeticDatumGeoKey",e[2051]="GeogPrimeMeridianGeoKey",e[2052]="GeogLinearUnitsGeoKey",e[2053]="GeogLinearUnitSizeGeoKey",e[2054]="GeogAngularUnitsGeoKey",e[2055]="GeogAngularUnitSizeGeoKey",e[2056]="GeogEllipsoidGeoKey",e[2057]="GeogSemiMajorAxisGeoKey",e[2058]="GeogSemiMinorAxisGeoKey",e[2059]="GeogInvFlatteningGeoKey",e[2061]="GeogPrimeMeridianLongGeoKey",e[2060]="GeogAzimuthUnitsGeoKey",e[3072]="ProjectedCSTypeGeoKey",e[3073]="PCSCitationGeoKey",e[3074]="ProjectionGeoKey",e[3075]="ProjCoordTransGeoKey",e[3076]="ProjLinearUnitsGeoKey",e[3077]="ProjLinearUnitSizeGeoKey",e[3078]="ProjStdParallel1GeoKey",e[3079]="ProjStdParallel2GeoKey",e[3080]="ProjNatOriginLongGeoKey",e[3081]="ProjNatOriginLatGeoKey",e[3082]="ProjFalseEastingGeoKey",e[3083]="ProjFalseNorthingGeoKey",e[3084]="ProjFalseOriginLongGeoKey",e[3085]="ProjFalseOriginLatGeoKey",e[3086]="ProjFalseOriginEastingGeoKey",e[3087]="ProjFalseOriginNorthingGeoKey",e[3088]="ProjCenterLongGeoKey",e[3090]="ProjCenterEastingGeoKey",e[3091]="ProjCenterNorthingGeoKey",e[3092]="ProjScaleAtNatOriginGeoKey",e[3093]="ProjScaleAtCenterGeoKey",e[3094]="ProjAzimuthAngleGeoKey",e[3095]="ProjStraightVertPoleLongGeoKey",e[4096]="VerticalCSTypeGeoKey",e[4097]="VerticalCitationGeoKey",e[4098]="VerticalDatumGeoKey",e[4099]="VerticalUnitsGeoKey",e})(),s=new Map;s.set("EXIFIFD",o),s.set("GPSIFD",["GPSVersionID","GPSLatitudeRef","GPSLatitude","GPSLongitudeRef","GPSLongitude","GPSAltitudeRef","GPSAltitude","GPSTimeStamp","GPSSatellites","GPSStatus","GPSMeasureMode","GPSDOP","GPSSpeedRef","GPSSpeed","GPSTrackRef","GPSTrack","GPSImgDirectionRef","GPSImgDirection","GPSMapDatum","GPSDestLatitudeRef","GPSDestLatitude","GPSDestLongitudeRef","GPSDestLongitude","GPSDestBearingRef","GPSDestBearing","GPSDestDistanceRef","GPSDestDistance","GPSProcessingMethod","GPSAreaInformation","GPSDateStamp","GPSDifferential","GPSHPositioningError"]);const a={TIFF_TAGS:n,ifdTags:s,GEO_KEYS:i,getTagName:(e,t)=>{let r=(t||n)[e];return void 0===r&&(r="unknown"+String(e)),r}}},81578:(e,t,r)=>{r.d(t,{A:()=>a,r:()=>s});const n=9999999e31,o=2e-7,i={u1:[0,1],u2:[0,3],u4:[0,15],u8:[0,255],s8:[-128,127],u16:[0,65535],s16:[-32768,32767],u32:[0,4294967295],s32:[-2147483648,2147483647],f32:[-34028234663852886e22,34028234663852886e22],f64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function s(e){return i[e]??[-34028234663852886e22,34028234663852886e22]}function a(e,t,r){if(e.depthCount&&e.depthCount>1)return;const{pixels:i,statistics:a,pixelType:l}=e,u=i[0].length,h=e.bandMasks??[],c=e.mask??new Uint8Array(u).fill(255),f="f32"===l||"f64"===l,d=s(l);let p=!1;for(let e=0;e<i.length;e++){const s="number"==typeof t?t:t[e];if(null==s)continue;const g=a?.[e].minValue??d[0],m=a?.[e].maxValue??d[1];if(g>s+Number.EPSILON||m<s-Number.EPSILON)continue;const y=h[e]||new Uint8Array(u).fill(255),w=i[e],C=r?.customFloatTolerance;if(f&&0!==C){let e=C;e||(e=Math.abs(s)>=n?o*Math.abs(s):"f32"===l?2**-23:Number.EPSILON);for(let t=0;t<w.length;t++)y[t]&&Math.abs(w[t]-s)<e&&(w[t]=0,y[t]=0,c[t]=0,p=!0)}else for(let e=0;e<w.length;e++)y[e]&&w[e]===s&&(w[e]=0,y[e]=0,c[e]=0,p=!0);h[e]=y}p&&(e.bandMasks=h,e.mask=c),p&&"updateStatistics"in e&&e.updateStatistics()}},48279:(e,t,r)=>{r.d(t,{f:()=>n});const n=(()=>{const e=new ArrayBuffer(4),t=new Uint8Array(e);return new Uint32Array(e)[0]=1,1===t[0]})()},55914:(e,t,r)=>{r.d(t,{CD:()=>o,DX:()=>n,Gd:()=>c,Pz:()=>f,Qh:()=>B,SJ:()=>d,Uk:()=>U,Vl:()=>L,XV:()=>p,a2:()=>y,hd:()=>l,nA:()=>v,nk:()=>u,oB:()=>k,pW:()=>A,qF:()=>h,sS:()=>x,us:()=>S,wV:()=>g,zp:()=>m});var n,o,i,s=r(5847),a=r(81578);(i=n||(n={}))[i.matchAny=0]="matchAny",i[i.matchAll=1]="matchAll",function(e){e[e.bestMatch=0]="bestMatch",e[e.fail=1]="fail"}(o||(o={}));const l=6;function u(e){return null!=e&&"esri.layers.support.PixelBlock"===e.declaredClass&&e.pixels&&e.pixels.length>0}function h(e,t){if(!t?.length||!u(e))return e;const r=e.pixels.length;return t&&t.some((e=>e>=r))||1===r&&1===t.length&&0===t[0]?e:r!==t.length||t.some(((e,t)=>e!==t))?new s.Z({pixelType:e.pixelType,width:e.width,height:e.height,mask:e.mask,validPixelCount:e.validPixelCount,maskIsAlpha:e.maskIsAlpha,pixels:t.map((t=>e.pixels[t])),statistics:e.statistics&&t.map((t=>e.statistics[t]))}):e}function c(e){if(!e?.length||e.some((e=>!u(e))))return null;if(1===e.length)return e[0]?.clone()??null;const t=e,{width:r,height:n,pixelType:o}=t[0];if(t.some((e=>e.width!==r||e.height!==n)))return null;const i=t.map((({mask:e})=>e)).filter((e=>null!=e));let a=null;i.length&&(a=new Uint8Array(r*n),a.set(i[0]),i.length>1&&b(i.slice(1),a));const l=[];t.forEach((({pixels:e})=>l.push(...e)));const h=t.map((({statistics:e})=>e)).filter((e=>e?.length)),c=[];return h.forEach((e=>c.push(...e))),new s.Z({pixelType:o,width:r,height:n,mask:a,pixels:l,statistics:c.length?c:null})}function f(e){if(!e)return;const t=e.colormap;if(!t||0===t.length)return;const r=t.sort(((e,t)=>e[0]-t[0]));let n=0;r[0][0]<0&&(n=r[0][0]);const o=Math.max(256,r[r.length-1][0]-n+1),i=new Uint8Array(4*o),s=[];let a,l=0,u=0;const h=5===r[0].length;if(o>65536)return r.forEach((e=>{s[e[0]-n]=h?e.slice(1):e.slice(1).concat([255])})),{indexed2DColormap:s,offset:n,alphaSpecified:h};if(e.fillUnspecified)for(a=r[u],l=a[0]-n;l<o;l++)i[4*l]=a[1],i[4*l+1]=a[2],i[4*l+2]=a[3],i[4*l+3]=h?a[4]:255,l===a[0]-n&&(a=u===r.length-1?a:r[++u]);else for(l=0;l<r.length;l++)a=r[l],u=4*(a[0]-n),i[u]=a[1],i[u+1]=a[2],i[u+2]=a[3],i[u+3]=h?a[4]:255;return{indexedColormap:i,offset:n,alphaSpecified:h}}function d(e,t){if(!u(e))return e;if(!t||!t.indexedColormap&&!t.indexed2DColormap)return e;const r=e.clone(),n=r.pixels;let o=r.mask;const i=r.width*r.height;if(1!==n.length)return e;const{indexedColormap:s,indexed2DColormap:a,offset:l,alphaSpecified:h}=t;let c=0;const f=n[0],d=new Uint8Array(f.length),p=new Uint8Array(f.length),g=new Uint8Array(f.length);let m,y=0;if(s){const e=s.length-1;if(null!=o)for(c=0;c<i;c++)o[c]&&(y=4*(f[c]-l),y<l||y>e?o[c]=0:(d[c]=s[y],p[c]=s[y+1],g[c]=s[y+2],o[c]=s[y+3]));else{for(o=new Uint8Array(i),c=0;c<i;c++)y=4*(f[c]-l),y<l||y>e?o[c]=0:(d[c]=s[y],p[c]=s[y+1],g[c]=s[y+2],o[c]=s[y+3]);r.mask=o}}else if(a)if(null!=o)for(c=0;c<i;c++)o[c]&&(m=a[f[c]],d[c]=m[0],p[c]=m[1],g[c]=m[2],o[c]=m[3]);else{for(o=new Uint8Array(i),c=0;c<i;c++)m=a[f[c]],d[c]=m[0],p[c]=m[1],g[c]=m[2],o[c]=m[3];r.mask=o}return r.pixels=[d,p,g],r.statistics=null,r.pixelType="u8",r.maskIsAlpha=h,r}function p(e,t){if(!u(e))return null;const{pixels:r,mask:n}=e,o=r.length;let i=t.lut;const{offset:a}=t;i&&1===i[0].length&&(i=r.map((()=>i)));const l=[],h=t.outputPixelType||"u8";for(let e=0;e<o;e++){const t=g(r[e],n,i[e],a||0,h);l.push(t)}const c=new s.Z({width:e.width,height:e.height,pixels:l,mask:n,pixelType:h});return c.updateStatistics(),c}function g(e,t,r,n,o){const i=e.length,a=s.Z.createEmptyBand(o,i);if(t)for(let o=0;o<i;o++)t[o]&&(a[o]=r[e[o]-n]);else for(let t=0;t<i;t++)a[t]=r[e[t]-n];return a}function m(e,t){if(!u(e))return null;const r=e.clone(),{pixels:n}=r,o=r.width*r.height,i=t.length,s=Math.floor(i/2),a=t[Math.floor(s)],l=n[0];let h,c,f,d,p,g,m=!1;const y=new Uint8Array(o),w=new Uint8Array(o),C=new Uint8Array(o);let b=r.mask;const x=4===t[0].mappedColor.length;for(b||(b=new Uint8Array(o),b.fill(x?255:1),r.mask=b),p=0;p<o;p++)if(b[p]){for(h=l[p],m=!1,g=s,c=a,f=0,d=i-1;d-f>1;){if(h===c.value){m=!0;break}h>c.value?f=g:d=g,g=Math.floor((f+d)/2),c=t[Math.floor(g)]}m||(h===t[f].value?(c=t[f],m=!0):h===t[d].value?(c=t[d],m=!0):h<t[f].value?(m=!1,c=null):h>t[f].value&&(h<t[d].value?(c=t[f],m=!0):d===i-1?(m=!1,c=null):(c=t[d],m=!0))),m?(y[p]=c.mappedColor[0],w[p]=c.mappedColor[1],C[p]=c.mappedColor[2],b[p]=c.mappedColor[3]):y[p]=w[p]=C[p]=b[p]=0}return r.pixels=[y,w,C],r.mask=b,r.pixelType="u8",r.maskIsAlpha=x,r}function y(e,t){if(!u(e))return null;const{width:r,height:n}=e,{inputRanges:o,outputValues:i,outputPixelType:l,noDataRanges:h,allowUnmatched:c,isLastInputRangeInclusive:f}=t,d=e.pixels[0],p=s.Z.createEmptyBand(l,d.length),g=e.mask,m=new Uint8Array(r*n);g?m.set(g):m.fill(255);const y=e.pixelType.startsWith("f")?1e-6:0,w=o.map((e=>e-y));w[0]=o[0],w[w.length-1]=o[o.length-1]+(f?1e-6:0);const C=o.length/2,[b,x]=(0,a.r)(l);for(let e=0;e<n;e++)for(let t=0;t<r;t++){const n=e*r+t;if(m[n]){const e=d[n];let t=!1;for(let r=C-1;r>=0;r--)if(e===w[2*r]||e>w[2*r]&&e<w[2*r+1]){p[n]=i[r],t=!0;break}t||(c?p[n]=e>x?x:e<b?b:e:m[n]=0)}}const k=h?.length;if(k)for(let e=0;e<n;e++)for(let t=0;t<r;t++){const n=e*r+t;if(!g||g[n]){const e=d[n];for(let t=0;t<k;t+=2)if(e>=h[t]&&e<=h[t+1]){p[n]=0,m[n]=0;break}}}return new s.Z({width:r,height:n,pixelType:l,pixels:[p],mask:m})}function w(e,t,r,n){const o=null!=r&&r.length>=2?new Set(r):null,i=1===r?.length?r[0]:null,s=!!t?.length;for(let r=0;r<e.length;r++)if(n[r]){const a=e[r];if(s){let e=!1;for(let r=0;r<t.length;r+=2)if(a>=t[r]&&a<=t[r+1]){e=!0;break}e||(n[r]=0)}n[r]&&(a===i||o?.has(a))&&(n[r]=0)}}function C(e,t){const r=e[0].length;for(let n=0;n<r;n++)if(t[n]){let r=!1;for(let t=0;t<e.length;t++)if(e[t][n]){r=!0;break}r||(t[n]=0)}}function b(e,t){const r=e[0].length;for(let n=0;n<r;n++)if(t[n]){let r=!1;for(let t=0;t<e.length;t++)if(0===e[t][n]){r=!0;break}r&&(t[n]=0)}}function x(e,t){if(!u(e))return null;const{width:r,height:n,pixels:o}=e,i=r*n,a=new Uint8Array(i);e.mask?a.set(e.mask):a.fill(255);const l=o.length,{includedRanges:h,noDataValues:c,outputPixelType:f,matchAll:d,lookups:p}=t;if(p){const e=[];for(let t=0;t<l;t++){const r=p[t],n=g(o[t],a,r.lut,r.offset||0,"u8");e.push(n)}1===e.length?a.set(e[0]):d?C(e,a):b(e,a)}else if(d){const e=[];for(let t=0;t<l;t++){const r=new Uint8Array(i);r.set(a),w(o[t],h?.slice(2*t,2*t+2),c?.[t],r),e.push(r)}1===e.length?a.set(e[0]):C(e,a)}else for(let e=0;e<l;e++)w(o[e],h?.slice(2*e,2*e+2),c?.[e],a);return new s.Z({width:r,height:n,pixelType:f,pixels:o,mask:a})}function k(e){const{srcPixelType:t,inputRanges:r,outputValues:n,allowUnmatched:o,noDataRanges:i,isLastInputRangeInclusive:l,outputPixelType:u}=e;if("u8"!==t&&"s8"!==t&&"u16"!==t&&"s16"!==t)return null;const h=t.includes("16")?65536:256,c=t.includes("s")?-h/2:0,f=s.Z.createEmptyBand(u,h),d=new Uint8Array(h);o&&d.fill(255);const[p,g]=(0,a.r)(u);if(r?.length&&n?.length){const e=1e-6,t=r.map((t=>t-e));t[0]=r[0],l&&(t[t.length-1]=r[r.length-1]);for(let e=0;e<t.length;e++){const r=n[e]>g?g:n[e]<p?p:n[e],o=Math.ceil(t[2*e]-c),i=Math.floor(t[2*e+1]-c);for(let e=o;e<=i;e++)f[e]=r,d[e]=255}}if(i?.length)for(let e=0;e<i.length;e++){const t=Math.ceil(i[2*e]-c),r=Math.floor(i[2*e+1]-c);for(let e=t;e<=r;e++)d[e]=0}return{lut:f,offset:c,mask:d}}function v(e,t,r){if("u8"!==e&&"s8"!==e&&"u16"!==e&&"s16"!==e)return null;const n=e.includes("16")?65536:256,o=e.includes("s")?-n/2:0,i=new Uint8Array(n);if(t)for(let e=0;e<t.length;e++){const r=Math.ceil(t[2*e]-o),n=Math.floor(t[2*e+1]-o);for(let e=r;e<=n;e++)i[e]=255}else i.fill(255);if(r)for(let e=0;e<r.length;e++)i[r[e]-o]=0;return{lut:i,offset:o}}function T(e,t,r,n,o,i){const{width:s,height:a}=r.block,{x:l,y:u}=r.offset,{width:h,height:c}=r.mosaic,f=function(e,t,r,n,o,i,s,a){return{xmin:o<=r*e?0:o<r*e+e?o-r*e:e,ymin:i<=n*t?0:i<n*t+t?i-n*t:t,xmax:o+s<=r*e?0:o+s<r*e+e?o+s-r*e:e,ymax:i+a<=n*t?0:i+a<n*t+t?i+a-n*t:t}}(s,a,n,o,l,u,h,c);let d=0,p=0;if(i){const e=i.hasGCSSShiftTransform?360:i.halfWorldWidth??0,t=s*i.resolutionX,r=i.startX+n*t;r<e&&r+t>e?p=i.rightPadding:r>=e&&(d=i.leftMargin-i.rightPadding,p=0)}if(f.xmax-=p,"number"!=typeof t)for(let r=f.ymin;r<f.ymax;r++){const i=(o*a+r-u)*h+(n*s-l)+d,c=r*s;for(let r=f.xmin;r<f.xmax;r++)e[i+r]=t[c+r]}else for(let r=f.ymin;r<f.ymax;r++){const i=(o*a+r-u)*h+(n*s-l)+d;for(let r=f.xmin;r<f.xmax;r++)e[i+r]=t}}function S(e,t,r={}){const{clipOffset:n,clipSize:o,alignmentInfo:i,blockWidths:a}=r;if(a)return function(e,t,r){const n=e.find((e=>null!=e));if(null==n)return null;const o=e.some((e=>null==e||!!e.mask)),{width:i,height:a}=t,l=o?new Uint8Array(i*a):null,{blockWidths:h}=r,c=[],f=n.getPlaneCount(),d=s.Z.getPixelArrayConstructor(n.pixelType);if(o)for(let t=0,r=0;t<e.length;r+=h[t],t++){const n=e[t];if(!u(n))continue;const o=n.mask;for(let e=0;e<a;e++)for(let s=0;s<h[t];s++)l[e*i+s+r]=null==o?255:o[e*n.width+s]}for(let t=0;t<f;t++){const r=new d(i*a);for(let n=0,o=0;n<e.length;o+=h[n],n++){const s=e[n];if(!u(s))continue;const l=s.pixels[t];if(null!=l)for(let e=0;e<a;e++)for(let t=0;t<h[n];t++)r[e*i+t+o]=l[e*s.width+t]}c.push(r)}const p=new s.Z({width:i,height:a,mask:l,pixels:c,pixelType:n.pixelType});return p.updateStatistics(),p}(e,t,{blockWidths:a});const l=e.find((e=>u(e)));if(null==l)return null;const h=o?o.width:t.width,c=o?o.height:t.height,f=l.width,d=l.height,p=t.width/f,g=t.height/d,m={offset:n||{x:0,y:0},mosaic:o||t,block:{width:f,height:d}},y=l.pixelType,w=s.Z.getPixelArrayConstructor(y),C=l.pixels.length,b=[];let x,k,v;for(let t=0;t<C;t++){k=new w(h*c);for(let r=0;r<g;r++)for(let n=0;n<p;n++){const o=e[r*p+n];u(o)&&(x=o.pixels[t],T(k,x,m,n,r,i))}b.push(k)}if(e.some((e=>null==e||null!=e.mask&&e.mask.length>0))){v=new Uint8Array(h*c);for(let t=0;t<g;t++)for(let r=0;r<p;r++){const n=e[t*p+r],o=null!=n?n.mask:null;T(v,null!=o?o:n?1:0,m,r,t,i)}}const S=new s.Z({width:h,height:c,pixels:b,pixelType:y,mask:v});return S.updateStatistics(),S}function A(e,t,r){if(!u(e))return null;const{width:n,height:o}=e,i=t.x,s=t.y,a=r.width+i,l=r.height+s;if(i<0||s<0||a>n||l>o)return e;if(0===i&&0===s&&a===n&&l===o)return e;e.mask||(e.mask=new Uint8Array(n*o));const h=e.mask;for(let e=0;e<o;e++){const t=e*n;for(let r=0;r<n;r++)h[t+r]=e<s||e>=l||r<i||r>=a?0:1}return e.updateStatistics(),e}function I(e){if(!u(e))return null;const t=e.clone(),{width:r,height:n,pixels:o}=e,i=o[0],s=t.pixels[0],a=e.mask;for(let e=2;e<n-1;e++){const t=new Map;for(let n=e-2;n<e+2;n++)for(let e=0;e<4;e++){const o=n*r+e;E(t,i[o],a?a[o]:1)}s[e*r]=P(t),s[e*r+1]=s[e*r+2]=s[e*r];let n=3;for(;n<r-1;n++){let o=(e-2)*r+n+1;E(t,i[o],a?a[o]:1),o=(e-1)*r+n+1,E(t,i[o],a?a[o]:1),o=e*r+n+1,E(t,i[o],a?a[o]:1),o=(e+1)*r+n+1,E(t,i[o],a?a[o]:1),o=(e-2)*r+n-3,M(t,i[o],a?a[o]:1),o=(e-1)*r+n-3,M(t,i[o],a?a[o]:1),o=e*r+n-3,M(t,i[o],a?a[o]:1),o=(e+1)*r+n-3,M(t,i[o],a?a[o]:1),s[e*r+n]=P(t)}s[e*r+n+1]=s[e*r+n]}for(let e=0;e<r;e++)s[e]=s[r+e]=s[2*r+e],s[(n-1)*r+e]=s[(n-2)*r+e];return t.updateStatistics(),t}function P(e){if(0===e.size)return 0;let t=0,r=-1,n=0;const o=e.keys();let i=o.next();for(;!i.done;)n=e.get(i.value),n>t&&(r=i.value,t=n),i=o.next();return r}function M(e,t,r){if(0===r)return;const n=e.get(t);1===n?e.delete(t):e.set(t,n-1)}function E(e,t,r){0!==r&&e.set(t,e.has(t)?e.get(t)+1:1)}function D(e,t,r){let{x:n,y:o}=t;const{width:i,height:a}=r;if(0===n&&0===o&&a===e.height&&i===e.width)return e;const{width:l,height:h}=e,c=Math.max(0,o),f=Math.max(0,n),d=Math.min(n+i,l),p=Math.min(o+a,h);if(d<0||p<0||!u(e))return null;n=Math.max(0,-n),o=Math.max(0,-o);const{pixels:g}=e,m=i*a,y=g.length,w=[];for(let t=0;t<y;t++){const r=g[t],a=s.Z.createEmptyBand(e.pixelType,m);for(let e=c;e<p;e++){const t=e*l;let s=(e+o-c)*i+n;for(let e=f;e<d;e++)a[s++]=r[t+e]}w.push(a)}const C=new Uint8Array(m),b=e.mask;for(let e=c;e<p;e++){const t=e*l;let r=(e+o-c)*i+n;for(let e=f;e<d;e++)C[r++]=b?b[t+e]:1}const x=new s.Z({width:r.width,height:r.height,pixelType:e.pixelType,pixels:w,mask:C});return x.updateStatistics(),x}function R(e,t=!0){if(!u(e))return null;const{pixels:r,width:n,height:o,mask:i,pixelType:a}=e,l=[],h=Math.round(n/2),c=Math.round(o/2),f=o-1,d=n-1;for(let e=0;e<r.length;e++){const i=r[e],u=s.Z.createEmptyBand(a,h*c);let p=0;for(let e=0;e<o;e+=2)for(let r=0;r<n;r+=2){const o=i[e*n+r];if(t){const t=r===d?o:i[e*n+r+1],s=e===f?o:i[e*n+r+n],a=r===d?s:e===f?t:i[e*n+r+n+1];u[p++]=(o+t+s+a)/4}else u[p++]=o}l.push(u)}let p=null;if(null!=i){p=new Uint8Array(h*c);let e=0;for(let r=0;r<o;r+=2)for(let o=0;o<n;o+=2){const s=i[r*n+o];if(t){const t=o===d?s:i[r*n+o+1],a=r===f?s:i[r*n+o+n],l=o===d?a:r===f?t:i[r*n+o+n+1];p[e++]=s*t*a*l?1:0}else p[e++]=s}}return new s.Z({width:h,height:c,pixelType:a,pixels:l,mask:p})}function L(e,t,r){if(!u(e))return null;const{width:n,height:o}=t;let{width:i,height:s}=e;const a=new Map,l={x:0,y:0},h=null==r?1:1+r;let c=e;for(let e=0;e<h;e++){const r=Math.ceil(i/n),u=Math.ceil(s/o);for(let i=0;i<u;i++){l.y=i*o;for(let o=0;o<r;o++){l.x=o*n;const r=D(c,l,t);a.set(`${e}/${i}/${o}`,r)}}e<h-1&&(c=R(c)),i=Math.round(i/2),s=Math.round(s/2)}return a}function _(e,t,r,n,o=0){const{width:i,height:s}=e,{width:a,height:l}=t,u=n.cols,h=n.rows,c=Math.ceil(a/u-.1/u),f=Math.ceil(l/h-.1/h);let d,p,g,m,y,w,C;const b=c*u,x=b*f*h,k=new Float32Array(x),v=new Float32Array(x),T=new Uint32Array(x),S=new Uint32Array(x);let A,I,P=0;for(let e=0;e<f;e++)for(let t=0;t<c;t++){d=12*(e*c+t),p=r[d],g=r[d+1],m=r[d+2],y=r[d+3],w=r[d+4],C=r[d+5];for(let r=0;r<h;r++){P=(e*h+r)*b+t*u,I=(r+.5)/h;for(let e=0;e<r;e++)A=(e+.5)/u,k[P+e]=(p*A+g*I+m)*i+o,v[P+e]=(y*A+w*I+C)*s+o,T[P+e]=Math.floor(k[P+e]),S[P+e]=Math.floor(v[P+e])}d+=6,p=r[d],g=r[d+1],m=r[d+2],y=r[d+3],w=r[d+4],C=r[d+5];for(let r=0;r<h;r++){P=(e*h+r)*b+t*u,I=(r+.5)/h;for(let e=r;e<u;e++)A=(e+.5)/u,k[P+e]=(p*A+g*I+m)*i+o,v[P+e]=(y*A+w*I+C)*s+o,T[P+e]=Math.floor(k[P+e]),S[P+e]=Math.floor(v[P+e])}}return{offsets_x:k,offsets_y:v,offsets_xi:T,offsets_yi:S,gridWidth:b}}function B(e,t){const{coefficients:r,spacing:n}=t,{offsets_x:o,offsets_y:i,gridWidth:s}=_(e,e,r,{rows:n[0],cols:n[1]}),{width:a,height:l}=e,u=new Float32Array(a*l),h=180/Math.PI;for(let e=0;e<l;e++)for(let t=0;t<a;t++){const r=e*s+t,n=0===e?r:r-s,c=e===l-1?r:r+s,f=o[n]-o[c],d=i[c]-i[n];if(isNaN(f)||isNaN(d))u[e*a+t]=90;else{let r=Math.atan2(d,f)*h;r=(360+r)%360,u[e*a+t]=r}}return u}function U(e,t,r,n,o="nearest"){if(!u(e))return null;"majority"===o&&(e=I(e));const{pixels:i,mask:a,pixelType:l}=e,h=e.width,c=e.height,f=s.Z.getPixelArrayConstructor(l),d=i.length,{width:p,height:g}=t;let m=!1;for(let e=0;e<r.length;e+=3)-1===r[e]&&-1===r[e+1]&&-1===r[e+2]&&(m=!0);const{offsets_x:y,offsets_y:w,offsets_xi:C,offsets_yi:b,gridWidth:x}=_({width:h,height:c},t,r,n,"majority"===o?.5:0);let k;const v=(e,t,r)=>{const n=e instanceof Float32Array||e instanceof Float64Array?0:.5;for(let o=0;o<g;o++){k=o*x;for(let i=0;i<p;i++){if(y[k]<0||w[k]<0)e[o*p+i]=0;else if(r)e[o*p+i]=t[C[k]+b[k]*h];else{const r=Math.floor(y[k]),s=Math.floor(w[k]),l=Math.ceil(y[k]),u=Math.ceil(w[k]),c=y[k]-r,f=w[k]-s;if(!a||a[r+s*h]&&a[l+s*h]&&a[r+u*h]&&a[l+u*h]){const a=(1-c)*t[r+s*h]+c*t[l+s*h],d=(1-c)*t[r+u*h]+c*t[l+u*h];e[o*p+i]=(1-f)*a+f*d+n}else e[o*p+i]=t[C[k]+b[k]*h]}k++}}},T=[];let S;for(let e=0;e<d;e++)S=new f(p*g),v(S,i[e],"nearest"===o||"majority"===o),T.push(S);const A=new s.Z({width:p,height:g,pixelType:l,pixels:T});if(null!=a)A.mask=new Uint8Array(p*g),v(A.mask,a,!0);else if(m){A.mask=new Uint8Array(p*g);for(let e=0;e<p*g;e++)A.mask[e]=y[e]<0||w[e]<0?0:1}return A.updateStatistics(),A}},15612:(e,t,r)=>{r.d(t,{AV:()=>m,Hv:()=>p,Oh:()=>g,ZF:()=>c,dy:()=>w,hE:()=>h,js:()=>d,oc:()=>u,um:()=>y});var n=r(70586),o=r(5847),i=r(81578),s=r(75509);const a=1,l=[.299,.587,.114];function u(e,t=256){t=Math.min(t,256);const{size:r,counts:n}=e,o=new Uint8Array(r),i=n.reduce(((e,r)=>e+r/t),0);let s=0,a=0,l=0,u=i;for(let e=0;e<r;e++)if(l+=n[e],!(e<r-1&&l+n[e+1]<u)){for(;s<t-1&&u<l;)s++,u+=i;for(let t=a;t<=e;t++)o[t]=s;a=e+1}for(let e=a;e<r;e++)o[e]=t-1;return o}function h(e){const{minCutOff:t,maxCutOff:r,gamma:n,pixelType:o,rounding:i}=e,s=e.outMin||0,a=e.outMax||255;if(!["u8","u16","s8","s16"].includes(o))return null;const l=t.length;let u,h,c=0;"s8"===o?c=-127:"s16"===o&&(c=-32767);let f=256;["u16","s16"].includes(o)&&(f=65536);const d=[],p=[],g=a-s;for(u=0;u<l;u++)p[u]=r[u]-t[u],d[u]=0===p[u]?0:g/p[u];let m;const w=[];let C,b,x;if(n&&n.length>=l){const e=y(l,n);for(u=0;u<l;u++){for(x=[],h=0;h<f;h++)if(0!==p[u])if(C=h+c,m=(C-t[u])/p[u],b=1,n[u]>1&&(b-=(1/g)**(m*e[u])),C<r[u]&&C>t[u]){const e=b*g*m**(1/n[u])+s;x[h]="floor"===i?Math.floor(e):"round"===i?Math.round(e):e}else C>=r[u]?x[h]=a:x[h]=s;else x[h]=s;w[u]=x}}else for(u=0;u<l;u++){for(x=[],h=0;h<f;h++)if(C=h+c,C<=t[u])x[h]=s;else if(C>=r[u])x[h]=a;else{const e=(C-t[u])*d[u]+s;x[h]="floor"===i?Math.floor(e):"round"===i?Math.round(e):e}w[u]=x}if(null!=e.contrastOffset){const t=function(e,t){const r=Math.min(Math.max(e,-100),100),n=Math.min(Math.max(t??0,-100),100),o=255;let i=0,s=0;const a=new Uint8Array(256);for(i=0;i<256;i++)r>0&&r<100?s=(200*i-25500+510*n)/(2*(100-r))+128:r<=0&&r>-100?s=(200*i-25500+510*n)*(100+r)/2e4+128:100===r?(s=200*i-25500+256*(100-r)+510*n,s=s>0?o:0):-100===r&&(s=128),a[i]=s>o?o:s<0?0:s;return a}(e.contrastOffset,e.brightnessOffset);for(u=0;u<l;u++)for(x=w[u],h=0;h<f;h++)x[h]=t[x[h]]}return{lut:w,offset:c}}function c(e,t,r){const n=[];for(let o=0;o<t.length;o++){let i=0,s=0,a=0;"min"in t[o]?({min:i,max:s,avg:a}=t[o]):[i,s,a]=t[o];let u=a??0;"u8"!==e&&(u=255*(u-i)/(s-i)),r&&(u*=l[o]),n.push(f(u))}return n}function f(e){if(e<=0||e>=255)return a;let t=0;150!==e&&(t=e<=150?45*Math.cos(.01047*e):17*Math.sin(.021*e));const r=e+t,n=Math.log(e/255),o=Math.log(r/255);if(0===o)return a;const i=n/o;return isNaN(i)?a:Math.min(9.9,Math.max(.01,i))}function d(e){const{pixels:t,mask:r,pixelType:n}=e,o=t.map((e=>function(e,t,r,n){let o=1/0,i=-1/0,s=0,a=0;const l=e.length;for(let r=0;r<l;r++){const n=e[r];t&&!t[r]||(o=n<o?n:o,i=n>i?n:i,s+=n,a++)}if(0===a)return{statistics:{min:0,max:0,avg:0,stddev:0},histogram:null};const u=s/a;let h=0;for(let r=0;r<l;r++)t&&!t[r]||(h+=(e[r]-u)**2);const c=t?t.filter((e=>e)).length:l,f={min:o,max:i,avg:u,stddev:c<=1?0:Math.sqrt(h/(c-1))};if(["u8","s8","u4","u2","u1"].includes(r)){const r=i-o+1,n=new Uint32Array(r);for(let r=0;r<l;r++)t&&!t[r]||n[e[r]-o]++;return{statistics:f,histogram:{min:o-.5,max:i+.5,size:r,counts:n}}}const d=256,p=new Uint32Array(d),g=(i-o)/d;if(0===g)return{statistics:f,histogram:{min:o,max:i,size:1,counts:new Uint32Array(1).fill(a)}};const m=new Uint32Array(257);for(let r=0;r<l;r++)t&&!t[r]||m[Math.floor((e[r]-o)/g)]++;for(let e=0;e<255;e++)p[e]=m[e];return p[255]=m[255]+m[d],{statistics:f,histogram:{min:o,max:i,size:d,counts:p}}}(e,r,n)));return{statistics:o.map((({statistics:e})=>e)),histograms:o.map((({histogram:e})=>e))}}function p(e){if(null==e||!e.pixels?.length)return null;const{pixels:t,mask:r,pixelType:n}=e,o=e.width*e.height,i=t.length;let s,a,l,u,h;const c=[],f=[];let d,p,g,m,y,w,C,b,x,k;const v=256;for(u=0;u<i;u++){if(d=new Uint32Array(v),g=t[u],"u8"===n)if(s=-.5,a=255.5,r)for(h=0;h<o;h++)r[h]&&d[g[h]]++;else for(h=0;h<o;h++)d[g[h]]++;else{let t=!1;e.statistics||(e.updateStatistics(),t=!0);const n=e.statistics;if(s=n[u].minValue,a=n[u].maxValue,l=(a-s)/v,0===l){!n||e.validPixelCount||t||e.updateStatistics();const r=(e.validPixelCount||e.width*e.height)/v;for(let e=0;e<v;e++)d[e]=Math.round(r*(e+1))-Math.round(r*e)}else{for(p=new Uint32Array(257),h=0;h<o;h++)r&&!r[h]||p[Math.floor((g[h]-s)/l)]++;for(h=0;h<255;h++)d[h]=p[h];d[255]=p[255]+p[v]}}for(c.push({min:s,max:a,size:v,counts:d}),m=0,y=0,b=0,h=0;h<v;h++)m+=d[h],y+=h*d[h];for(x=y/m,h=0;h<v;h++)b+=d[h]*(h-x)**2;k=Math.sqrt(b/(m-1)),l=(a-s)/v,w=(x+.5)*l+s,C=k*l,f.push({min:s,max:a,avg:w,stddev:C})}return{statistics:f,histograms:c}}function g(e){const t=[];for(let r=0;r<e.length;r++){const{min:n,max:o,size:i,counts:s}=e[r];let a=0,l=0;for(let e=0;e<i;e++)a+=s[e],l+=e*s[e];const u=l/a;let h=0;for(let e=0;e<i;e++)h+=s[e]*(e-u)**2;const c=(o-n)/i,f=(u+.5)*c+n,d=Math.sqrt(h/(a-1))*c;t.push({min:n,max:o,avg:f,stddev:d})}return t}function m(e,t){const{pixelBlock:r,bandIds:o,returnHistogramLut:a,rasterInfo:l}=t;let h=null,c=null,f=e.stretchType;if("number"==typeof f&&(f=s.J[f]),e.dra)if("minMax"===f&&null!=r&&r.statistics)h=r.statistics.map((e=>[e.minValue,e.maxValue,0,0]));else{const e=p(r);h=null!=e?e.statistics:null,c=null!=e?e.histograms:null}else h=e.statistics?.length>0?e.statistics:l.statistics,c=e.histograms||l.histograms;"percentClip"!==f&&"histogramEqualization"!==f||c?.length||(f="minMax");const d=h?.length||c?.length||l.bandCount,g=[],m=[];let y,w,C,b,x,k,v,T,S;h&&!Array.isArray(h[0])&&(h=h.map((e=>[e.min,e.max,e.avg,e.stddev])));const[A,I]=(0,i.r)(l.pixelType);if(!h?.length){for(h=[],T=0;T<d;T++)h.push([A,I,1,1]);"standardDeviation"===f&&(f="minMax")}switch(f){case"none":for(T=0;T<d;T++)g[T]=A,m[T]=I;break;case"minMax":for(T=0;T<d;T++)g[T]=h[T][0],m[T]=h[T][1];break;case"standardDeviation":for(T=0;T<d;T++)g[T]=h[T][2]-e.numberOfStandardDeviations*h[T][3],m[T]=h[T][2]+e.numberOfStandardDeviations*h[T][3],g[T]<h[T][0]&&(g[T]=h[T][0]),m[T]>h[T][1]&&(m[T]=h[T][1]);break;case"histogramEqualization":for((0,n.O3)(c),T=0;T<d;T++)g[T]=c[T].min,m[T]=c[T].max;break;case"percentClip":for((0,n.O3)(c),T=0;T<c.length;T++){for(y=c[T],x=new Uint32Array(y.size),b=[...y.counts],b.length>=20&&(b[0]=b[1]=b[2]=b[b.length-1]=b[b.length-2]=0),C=0,w=(y.max-y.min)/y.size,v=-.5===y.min&&1===w?.5:0,S=0;S<y.size;S++)C+=b[S],x[S]=C;for(k=(e.minPercent||0)*C/100,g[T]=y.min+v,S=0;S<y.size;S++)if(x[S]>k){g[T]=y.min+w*(S+v);break}for(k=(1-(e.maxPercent||0)/100)*C,m[T]=y.max+v,S=y.size-2;S>=0;S--)if(x[S]<k){m[T]=y.min+w*(S+2-v);break}if(m[T]<g[T]){const e=g[T];g[T]=m[T],m[T]=e}}break;default:for(T=0;T<d;T++)g[T]=h[T][0],m[T]=h[T][1]}let P,M,E;return"histogramEqualization"===f?((0,n.O3)(c),M=c[0].size||256,P=0,a&&(E=c.map((e=>u(e))))):(M=e.max||255,P=e.min||0),function(e,t){if(null==t||0===t.length)return e;const r=Math.max.apply(null,t),{minCutOff:n,maxCutOff:o,outMin:i,outMax:s,histogramLut:a}=e;return n.length===t.length||n.length<=r?e:{minCutOff:t.map((e=>n[e])),maxCutOff:t.map((e=>o[e])),histogramLut:a?t.map((e=>a[e])):null,outMin:i,outMax:s}}({minCutOff:g,maxCutOff:m,outMax:M,outMin:P,histogramLut:E},o)}function y(e,t){const r=new Float32Array(e);for(let n=0;n<e;n++)t[n]>1?t[n]>2?r[n]=6.5+(t[n]-2)**2.5:r[n]=6.5+100*(2-t[n])**4:r[n]=1;return r}function w(e,t){if(null==e||!e.pixels?.length)return e;const{mask:r,width:n,height:i,pixels:s}=e,{minCutOff:a,maxCutOff:l,gamma:u}=t,h=t.outMin||0,c=t.outMax||255,f=n*i,d=t.outputPixelType||"u8",p=e.pixels.map((()=>o.Z.createEmptyBand(d,f))),g=p.length;let m,w,C,b,x;const k=c-h,v=[],T=[];for(m=0;m<g;m++)T[m]=l[m]-a[m],v[m]=0===T[m]?0:k/T[m];const S=d.startsWith("u")||d.startsWith("s"),A=u&&u.length>=g,I=!!t.isRenderer;if(A){const e=y(g,u);for(w=0;w<f;w++)if(null==r||r[w])for(m=0;m<g;m++)if(0!==T[m])if(C=s[m][w],x=(C-a[m])/T[m],b=1,u[m]>1&&(b-=(1/k)**(x*e[m])),C<l[m]&&C>a[m]){const e=b*k*x**(1/u[m])+h;p[m][w]=I?Math.floor(e):S?Math.round(e):e}else C>=l[m]?p[m][w]=c:p[m][w]=h;else p[m][w]=h}else for(w=0;w<f;w++)if(null==r||r[w])for(m=0;m<g;m++)if(C=s[m][w],C<l[m]&&C>a[m]){const e=(C-a[m])*v[m]+h;p[m][w]=I?Math.floor(e):S?Math.round(e):e}else C>=l[m]?p[m][w]=c:p[m][w]=h;const P=new o.Z({width:n,height:i,mask:r,pixels:p,pixelType:d});return P.updateStatistics(),P}},63342:(e,t,r)=>{r.d(t,{CX:()=>s,M_:()=>d,Ne:()=>p,TK:()=>a,Ub:()=>c,vC:()=>h,yg:()=>f});var n=r(5847),o=r(55914);const i=1,s=1/111e3;function a(e){let{altitude:t,azimuth:r}=e;const{hillshadeType:n,pixelSizePower:o=1,pixelSizeFactor:i=1,scalingType:a,isGCS:l,resolution:u}=e,h="multi-directional"===n?2*e.zFactor:e.zFactor,{x:c,y:f}=u;let d=h/(8*c),p=h/(8*f);if(l&&h>.001&&(d/=s,p/=s),"adjusted"===a)if(l){const e=c*s,t=f*s;d=(h+e**o*i)/(8*e),p=(h+t**o*i)/(8*t)}else d=(h+c**o*i)/(8*c),p=(h+f**o*i)/(8*f);let g=(90-t)*Math.PI/180,m=Math.cos(g),y=(360-r+90)*Math.PI/180,w=Math.sin(g)*Math.cos(y),C=Math.sin(g)*Math.sin(y);const b=[315,270,225,360,180,0],x=[60,60,60,60,60,90],k=new Float32Array([3,5,3,2,1,4]),v=k.reduce(((e,t)=>e+t)),T=k.map((e=>e/v)),S="multi-directional"===n?b.length:1,A=new Float32Array(6),I=new Float32Array(6),P=new Float32Array(6);if("multi-directional"===n)for(let e=0;e<S;e++)t=x[e],r=b[e],g=(90-t)*Math.PI/180,m=Math.cos(g),y=(360-r+90)*Math.PI/180,w=Math.sin(g)*Math.cos(y),C=Math.sin(g)*Math.sin(y),A[e]=m,I[e]=w,P[e]=C;else A.fill(m),I.fill(w),P.fill(C);return{resolution:u,factor:[d,p],sinZcosA:w,sinZsinA:C,cosZ:m,sinZcosAs:I,sinZsinAs:P,cosZs:A,weights:T,hillshadeType:["traditional","multi-directional"].indexOf(n)}}function l(e,t){const{width:r,height:n,mask:o}=e,s=new Uint8Array(r*n),a=null!=o;if(a)for(let e=0;e<o.length;e++)o[e]&&(s[e]=1);const l=e.pixels[0],u=new Float32Array(r*n),h=new Float32Array(r*n);let c,f=0;if(t){const{resolution:e}=t,o=e?(e.x+e.y)/2:1;f=200*t.zFactor/(o*o),c=new Float32Array(r*n)}const d=t?.curvatureType;let p,g,m,y,w,C,b,x;for(let e=i;e<n-i;e++){const t=e*r;for(let e=i;e<r-i;e++){const n=t+e;if(!a||0!==o[n]){if(a){if(o[n-r-1]+o[n-r]+o[n-r+1]+o[n-1]+o[n+1]+o[n+r-1]+o[n+r]+o[n+r+1]<7){s[n]=0;continue}p=o[n-r-1]?l[n-r-1]:l[n],g=o[n-r]?l[n-r]:l[n],m=o[n-r+1]?l[n-r+1]:l[n],y=o[n-1]?l[n-1]:l[n],w=o[n+1]?l[n+1]:l[n],C=o[n+r-1]?l[n+r-1]:l[n],b=o[n+r]?l[n+r]:l[n],x=o[n+r+1]?l[n+r+1]:l[n]}else p=l[n-r-1],g=l[n-r],m=l[n-r+1],y=l[n-1],w=l[n+1],C=l[n+r-1],b=l[n+r],x=l[n+r+1];if(u[n]=m+w+w+x-(p+y+y+C),h[n]=C+b+b+x-(p+g+g+m),null!=c){const e=l[n],t=.5*(y+w)-e,r=.5*(g+b)-e;if("standard"===d)c[n]=-f*(t+r);else{const e=(-p+m+C-x)/4,o=(-y+w)/2,i=(g-b)/2,s=o*o,a=i*i,l=s+a;l&&(c[n]="profile"===d?f*(t*s+r*a+e*o*i)/l:-f*(t*a+r*s-e*o*i)/l)}}}}}return{outMask:a?s:null,dzxs:u,dzys:h,curvatures:c}}function u(e,t,r){for(let n=0;n<r;n++)e[n*t]=e[n*t+1],e[(n+1)*t-1]=e[(n+1)*t-2];for(let n=1;n<t-1;n++)e[n]=e[n+t],e[n+(r-1)*t]=e[n+(r-2)*t]}function h(e,t){if(!(0,o.nk)(e))return e;const{factor:r,sinZcosA:s,sinZsinA:h,cosZ:c,sinZcosAs:f,sinZsinAs:d,cosZs:p,weights:g}=a(t),[m,y]=r,w="traditional"===t.hillshadeType,{width:C,height:b}=e,x=new Uint8Array(C*b),{dzxs:k,dzys:v,outMask:T}=l(e);for(let e=i;e<b-i;e++){const t=e*C;for(let e=i;e<C-i;e++){const r=t+e;if(!T||T[r]){const e=k[r]*m,t=v[r]*y,n=Math.sqrt(1+e*e+t*t);let o=0;if(w){let r=255*(c+h*t-s*e)/n;r<0&&(r=0),o=r}else{const r=d.length;for(let i=0;i<r;i++){let r=255*(p[i]+d[i]*t-f[i]*e)/n;r<0&&(r=0),o+=r*g[i]}}x[r]=255&o}}}return u(x,C,b),new n.Z({width:C,height:b,pixels:[x],mask:T,pixelType:"u8",validPixelCount:e.validPixelCount,statistics:[{minValue:0,maxValue:255}]})}function c(e,t,r,n){if(!(0,o.nk)(e)||!(0,o.nk)(t))return;const{min:i,max:s}=n,a=e.pixels[0],{pixels:l,mask:u}=t,h=l[0],c=255.00001/(s-i),f=new Uint8ClampedArray(h.length),d=new Uint8ClampedArray(h.length),p=new Uint8ClampedArray(h.length),g=r.length-1;for(let e=0;e<h.length;e++){if(u&&0===u[e])continue;const t=Math.floor((h[e]-i)*c),[n,o]=r[t<0?0:t>g?g:t],s=a[e],l=s*o,m=l*(1-Math.abs(n%2-1)),y=s-l;switch(Math.floor(n)){case 0:f[e]=l+y,d[e]=m+y,p[e]=y;break;case 1:f[e]=m+y,d[e]=l+y,p[e]=y;break;case 2:f[e]=y,d[e]=l+y,p[e]=m+y;break;case 3:f[e]=y,d[e]=m+y,p[e]=l+y;break;case 4:f[e]=m+y,d[e]=y,p[e]=l+y;break;case 5:case 6:f[e]=l+y,d[e]=y,p[e]=m+y}}e.pixels=[f,d,p],e.updateStatistics()}function f(e,t){if(!(0,o.nk)(e))return e;const r=t.zFactor,a=t.pixelSizePower??1,h=t.pixelSizeFactor??1,c=t.slopeType,f=t.isGCS,{x:d,y:p}=t.resolution;let g=r/(8*d),m=r/(8*p);f&&Math.abs(r-1)<1e-4&&(g/=s,m/=s),"adjusted"===c&&(g=(r+d**a*h)/(8*d),m=(r+p**a*h)/(8*p));const{dzxs:y,dzys:w,outMask:C}=l(e),{width:b,height:x}=e,k=new Float32Array(b*x);for(let e=i;e<x-i;e++){const t=e*b;for(let e=i;e<b-i;e++){const r=t+e;if(!C||C[r]){const n=y[r]*g,o=w[r]*m,i=Math.sqrt(n*n+o*o);k[t+e]="percent-rise"===c?100*i:57.2957795*Math.atan(i)}}}u(k,b,x);const v=new n.Z({width:b,height:x,pixels:[k],mask:C,pixelType:"f32",validPixelCount:e.validPixelCount});return v.updateStatistics(),v}function d(e,t={}){if(!(0,o.nk)(e))return e;const{resolution:r}=t,s=r?1/r.x:1,a=r?1/r.y:1,{dzxs:h,dzys:c,outMask:f}=l(e),{width:d,height:p}=e,g=new Float32Array(d*p);for(let e=i;e<p-i;e++){const t=e*d;for(let e=i;e<d-i;e++){const r=t+e;if(!f||f[r]){const n=h[r]*s,o=c[r]*a;let i=-1;0===n&&0===o||(i=90-57.29578*Math.atan2(o,-n),i<0&&(i+=360),360===i?i=0:i>360&&(i%=360)),g[t+e]=i}}}return u(g,d,p),new n.Z({width:d,height:p,pixels:[g],mask:f,pixelType:"f32",validPixelCount:e.validPixelCount,statistics:[{minValue:-1,maxValue:360}]})}function p(e,t){if(!(0,o.nk)(e))return e;const{curvatures:r,outMask:i}=l(e,t),{width:s,height:a}=e;u(r,s,a);const h=new n.Z({width:s,height:a,pixels:[r],mask:i,pixelType:"f32",validPixelCount:e.validPixelCount});return h.updateStatistics(),h}},80676:(e,t,r)=>{r.d(t,{KC:()=>p,NL:()=>l,QI:()=>g,Tg:()=>c,Yx:()=>u,xQ:()=>d});var n=r(35454),o=r(5847),i=r(55914);const s=new Map;s.set("meter-per-second",1),s.set("kilometer-per-hour",.277778),s.set("knots",.514444),s.set("feet-per-second",.3048),s.set("mile-per-hour",.44704);const a=180/Math.PI,l=new n.X({esriMetersPerSecond:"meter-per-second",esriKilometersPerHour:"kilometer-per-hour",esriKnots:"knots",esriFeetPerSecond:"feet-per-second",esriMilesPerHour:"mile-per-hour"});function u(e,t){return s.get(e)/s.get(t)||1}function h(e){return(450-e)%360}function c(e,t="geographic"){const[r,n]=e,o=Math.sqrt(r*r+n*n);let i=Math.atan2(n,r)*a;return i=(360+i)%360,"geographic"===t&&(i=h(i)),[o,i]}function f(e,t="geographic"){let r=e[1];"geographic"===t&&(r=h(r)),r%=360;const n=e[0];return[n*Math.cos(r/a),n*Math.sin(r/a)]}function d(e,t,r,n="geographic"){if(!(0,i.nk)(e)||null==r)return e;const o="vector-magdir"===t?e.clone():p(e,t),s=o.pixels[1];for(let e=0;e<s.length;e++)s[e]="geographic"===n?(s[e]+r[e]+270)%360:(s[e]+360-r[e])%360;return"vector-magdir"===t?o:p(o,"vector-magdir")}function p(e,t,r="geographic",n=1){if(!(0,i.nk)(e))return e;const{pixels:s,width:a,height:l}=e,u=a*l,h=s[0],d=s[1],p=e.pixelType.startsWith("f")?e.pixelType:"f32",g=o.Z.createEmptyBand(p,u),m=o.Z.createEmptyBand(p,u);let y=0;for(let e=0;e<l;e++)for(let e=0;e<a;e++)"vector-uv"===t?([g[y],m[y]]=c([h[y],d[y]],r),g[y]*=n):([g[y],m[y]]=f([h[y],d[y]],r),g[y]*=n,m[y]*=n),y++;const w=new o.Z({pixelType:p,width:e.width,height:e.height,mask:e.mask,validPixelCount:e.validPixelCount,maskIsAlpha:e.maskIsAlpha,pixels:[g,m]});return w.updateStatistics(),w}function g(e,t,r=1){if(1===r||!(0,i.nk)(e))return e;const n=e.clone(),{pixels:o,width:s,height:a}=n,l=o[0],u=o[1];let h=0;for(let e=0;e<a;e++)for(let e=0;e<s;e++)"vector-uv"===t?(l[h]*=r,u[h]*=r):l[h]*=r,h++;return n.updateStatistics(),n}function m(e,t,r,n=1){const o=Math.sqrt(e*e+t*t)/n,i=(2*Math.PI+Math.atan2(t,e))%(2*Math.PI);return[o,(2*Math.PI+i-r)%(2*Math.PI)]}!function(e=0,t=0,r=Math.PI,n=!0){n&&(r=(2*Math.PI-r)%(2*Math.PI));const o=n?-1:1,i=13*o,s=-7*o,a=-2*o,l=-16*o,u=21.75,[h,c]=m(0,t+i,r,u),[f,d]=m(e-5.5,t+s,r,u),[p,g]=m(e+5.5,t+s,r,u),[y,w]=m(e-1.5,t+a,r,u),[C,b]=m(e+1.5,t+a,r,u),[x,k]=m(e-1.5,t+l,r,u),[v,T]=m(e+1.5,t+l,r,u)}(0,0,0)},72758:(e,t,r)=>{r.d(t,{Z:()=>m});var n=r(43697),o=r(3892),i=r(96674),s=r(92604),a=r(5600),l=(r(75215),r(67676),r(80442),r(52011)),u=r(48526),h=r(55914),c=r(15612),f=r(63342),d=r(93010);let p=class extends i.wq{constructor(e){super(e)}bind(){const{rendererJSON:e}=this;if(!e)return{success:!1};let t;switch(this.lookup={rendererJSON:{}},e.type){case"uniqueValue":t=this._updateUVRenderer(e);break;case"rasterColormap":t=this._updateColormapRenderer(e);break;case"rasterStretch":t=this._updateStretchRenderer(e);break;case"classBreaks":t=this._updateClassBreaksRenderer(e);break;case"rasterShadedRelief":t=this._updateShadedReliefRenderer(e);break;case"vectorField":t=this._updateVectorFieldRenderer();break;case"flowRenderer":t=this._updateFlowRenderer()}return t}symbolize(e){let t=e&&e.pixelBlock;if(!g(t))return t;if(e.simpleStretchParams&&"rasterStretch"===this.rendererJSON.type)return this.simpleStretch(t,e.simpleStretchParams);try{let r;switch(t.pixels.length>3&&(t=(0,h.qF)(t,[0,1,2])),this.rendererJSON.type){case"uniqueValue":case"rasterColormap":r=this._symbolizeColormap(t);break;case"classBreaks":r=this._symbolizeClassBreaks(t);break;case"rasterStretch":r=this._symbolizeStretch(t,e.bandIds);break;case"rasterShadedRelief":{const n=e.extent,o=n.spatialReference.isGeographic,i={x:(n.xmax-n.xmin)/t.width,y:(n.ymax-n.ymin)/t.height};r=this._symbolizeShadedRelief(t,{isGCS:o,resolution:i});break}}return r}catch(e){return s.Z.getLogger(this.declaredClass).error("symbolize",e.message),t}}simpleStretch(e,t){if(!g(e))return e;try{return e.pixels.length>3&&(e=(0,h.qF)(e,[0,1,2])),(0,c.dy)(e,{...t,isRenderer:!0})}catch(t){return s.Z.getLogger(this.declaredClass).error("symbolize",t.message),e}}generateWebGLParameters(e){if(["uniqueValue","rasterColormap","classBreaks"].includes(this.rendererJSON.type)){const{indexedColormap:e,offset:t}=this.lookup.colormapLut||{};return{colormap:e,colormapOffset:t,type:"lut"}}const{pixelBlock:t,isGCS:r,resolution:n,bandIds:o}=e,{rendererJSON:i}=this;return"rasterStretch"===i.type?this._generateStretchWebGLParams(t,i,o):"rasterShadedRelief"===i.type?this._generateShadedReliefWebGLParams(i,r,n??void 0):"vectorField"===i.type?this._generateVectorFieldWebGLParams(i):null}_isLUTChanged(e){if(!this.lookup||!this.lookup.rendererJSON)return!0;if("colorRamp"in this.rendererJSON){const t=this.rendererJSON.colorRamp;return e?JSON.stringify(t)!==JSON.stringify(this.lookup.rendererJSON.colorRamp):(this.rendererJSON,this.lookup.rendererJSON,JSON.stringify(this.rendererJSON)!==JSON.stringify(this.lookup.rendererJSON))}return JSON.stringify(this.rendererJSON)!==JSON.stringify(this.lookup.rendererJSON)}_symbolizeColormap(e){return this._isLUTChanged()&&!this.bind().success?e:(0,h.SJ)(e,this.lookup.colormapLut)}_symbolizeClassBreaks(e){const{canUseIndexedLUT:t}=this._analyzeClassBreaks(this.rendererJSON);return this._isLUTChanged()&&!this.bind().success?e:t?(0,h.SJ)(e,this.lookup.colormapLut):(0,h.zp)(e,this.lookup.remapLut??[])}_symbolizeStretch(e,t){const{rasterInfo:r}=this,{pixelType:n,bandCount:o}=r,i=this.rendererJSON,s=["u8","u16","s8","s16"].includes(n);let a,l;const{dra:u}=i,{gamma:f}=this.lookup;if("histogramEqualization"===i.stretchType){const n=u?null:this.lookup?.histogramLut,o=(0,c.AV)(i,{rasterInfo:r,pixelBlock:e,bandIds:t,returnHistogramLut:!n}),s=(0,c.dy)(e,{...o,gamma:f,isRenderer:!0});l=(0,h.XV)(s,{lut:u?o.histogramLut:n,offset:0})}else if(s){if(u){const o=(0,c.AV)(i,{rasterInfo:r,pixelBlock:e,bandIds:t});a=(0,c.hE)({pixelType:n,...o,gamma:f,rounding:"floor"})}else if(this._isLUTChanged()){if(!this.bind().success)return e;a=this.lookup?this.lookup.stretchLut:null}else a=this.lookup?this.lookup.stretchLut:null;if(!a)return e;o>1&&null!=t&&t.length===e?.pixels.length&&a?.lut.length===o&&(a={lut:t.map((e=>a.lut[e])),offset:a.offset}),l=(0,h.XV)(e,a)}else{const n=(0,c.AV)(i,{rasterInfo:r,pixelBlock:e,bandIds:t});l=(0,c.dy)(e,{...n,gamma:f,isRenderer:!0})}if(i.colorRamp){if(this._isLUTChanged(!0)&&!this.bind().success)return e;l=(0,h.SJ)(l,this.lookup?.colormapLut)}return l}_symbolizeShadedRelief(e,t){const r=this.rendererJSON,n={...r,...t},o=(0,f.vC)(e,n);if(!r.colorRamp)return o;let i;if(this._isLUTChanged(!0)){if(!this.bind().success)return o;i=this.lookup?this.lookup.hsvMap:null}else i=this.lookup?this.lookup.hsvMap:null;if(!i)return o;const s=this.rasterInfo.statistics?.[0]??{min:0,max:8e3};return(0,f.Ub)(o,e,i,s),o}_isVectorFieldData(){const{bandCount:e,dataType:t}=this.rasterInfo;return 2===e&&("vector-magdir"===t||"vector-uv"===t)}_updateVectorFieldRenderer(){return this._isVectorFieldData()?{success:!0}:{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; VectorFieldRenderer only supports "vector-magdir" and "vector-uv".`}}_updateFlowRenderer(){return this._isVectorFieldData()?{success:!0}:{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; FlowRenderer only supports "vector-magdir" and "vector-uv".`}}_updateUVRenderer(e){const{bandCount:t,attributeTable:r,pixelType:n}=this.rasterInfo,o=e.field1;if(!o)return{success:!1,error:"Unsupported renderer; missing UniqueValueRenderer.field."};const i=e.defaultSymbol,s=1===t&&["u8","s8"].includes(n);if(!function(e,t){const{attributeTable:r,bandCount:n}=e;return!(null==r||n>1||t&&null==r.fields.find((e=>e.name.toLowerCase()===t.toLowerCase())))}(this.rasterInfo,o)&&!s)return{success:!1,error:"Unsupported data; UniqueValueRenderer is only supported on single band data with a valid raster attribute table."};const a=[];if(null!=r){const t=r.fields.find((e=>"value"===e.name.toLowerCase()));if(!t)return{success:!1,error:"Unsupported data; the data's raster attribute table does not have a value field."};r.features.forEach((r=>{const n=e.uniqueValueInfos?.find((e=>String(e.value)===String(r.attributes[o]))),s=n?.symbol?.color;s?a.push([r.attributes[t.name]].concat(s)):i&&a.push([r.attributes[t.name]].concat(i.color))}))}else{if("value"!==o.toLowerCase())return{success:!1,error:'Unsupported renderer; UniqueValueRenderer.field must be "Value" when raster attribute table is not availalbe.'};e.uniqueValueInfos?.forEach((e=>{const t=e?.symbol?.color;t?a.push([parseInt(""+e.value,10)].concat(t)):i&&a.push([parseInt(""+e.value,10)].concat(i?.color))}))}if(0===a.length)return{success:!1,error:"Invalid UniqueValueRenderer. Cannot find matching records in the raster attribute table."};const l=(0,h.Pz)({colormap:a});return this.lookup={rendererJSON:e,colormapLut:l},this.canRenderInWebGL=!0,{success:!0}}_updateColormapRenderer(e){if(!function(e){const{bandCount:t,colormap:r}=e;return null!=r&&r.length>0&&1===t}(this.rasterInfo))return{success:!1,error:"Unsupported data; the data source does not have a colormap."};const t=e.colormapInfos.map((e=>[e.value].concat(e.color))).sort(((e,t)=>e[0]-t[0]));if(!t||0===t.length)return{success:!1,error:"Unsupported renderer; ColormapRenderer must have meaningful colormapInfos."};const r=(0,h.Pz)({colormap:t});return this.lookup={rendererJSON:e,colormapLut:r},this.canRenderInWebGL=!0,{success:!0}}_updateShadedReliefRenderer(e){if(!function(e){const{bandCount:t,dataType:r,pixelType:n}=e;return"elevation"===r||"generic"===r&&1===t&&("s16"===n||"f32"===n||"f64"===n)}(this.rasterInfo))return{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; ShadedReliefRenderer only supports "elevation", or single band float/s16 data.`};if(e.colorRamp){const t=(0,d.Jw)(e.colorRamp,{interpolateAlpha:!0}),r=(0,h.Pz)({colormap:t}),n=[],i=r.indexedColormap;for(let e=0;e<i.length;e+=4){const t=(0,o._Y)({r:i[e],g:i[e+1],b:i[e+2]});n.push([t.h/60,t.s/100,255*t.v/100])}this.lookup={rendererJSON:e,colormapLut:r,hsvMap:n}}else this.lookup=null;return this.canRenderInWebGL=!0,{success:!0}}_analyzeClassBreaks(e){const{attributeTable:t,pixelType:r}=this.rasterInfo,n=null!=t?t.fields.find((e=>"value"===e.name.toLowerCase())):null,o=null!=t?t.fields.find((t=>t.name.toLowerCase()===e.field.toLowerCase())):null,i=null!=n&&null!==o;return{canUseIndexedLUT:["u8","u16","s8","s16"].includes(r)||i,tableValueField:n,tableBreakField:o}}_updateClassBreaksRenderer(e){const{attributeTable:t}=this.rasterInfo,{canUseIndexedLUT:r,tableValueField:n,tableBreakField:o}=this._analyzeClassBreaks(e),i=e.classBreakInfos;if(!i?.length)return{success:!1,error:"Unsupported renderer; missing or invalid ClassBreaksRenderer.classBreakInfos."};const s=i.sort(((e,t)=>e.classMaxValue-t.classMaxValue)),a=s[s.length-1];let l=e.minValue;if(!r){const t=[];for(let e=0;e<s.length;e++)t.push({value:s[e].classMinValue??l,mappedColor:s[e].symbol.color}),l=s[e].classMaxValue;return t.push({value:a.classMaxValue,mappedColor:a.symbol.color}),this.lookup={rendererJSON:e,remapLut:t},this.canRenderInWebGL=!1,{success:!0}}const u=[];if(null!=t&&null!=n&&null!==o&&n!==o){const r=n.name,i=o.name,a=s[s.length-1],{classMaxValue:h}=a;l=e.minValue;for(const e of t.features){const t=e.attributes[r],n=e.attributes[i],o=n===h?a:n<l?null:s.find((({classMaxValue:e})=>e>n));o&&u.push([t].concat(o.symbol.color))}}else{l=Math.floor(e.minValue);for(let e=0;e<s.length;e++){const t=s[e];for(let e=l;e<t.classMaxValue;e++)u.push([e].concat(t.symbol.color));l=Math.ceil(t.classMaxValue)}a.classMaxValue===l&&u.push([a.classMaxValue].concat(a.symbol.color))}const c=(0,h.Pz)({colormap:u,fillUnspecified:!1});return this.lookup={rendererJSON:e,colormapLut:c},this.canRenderInWebGL=!0,{success:!0}}_isHistogramRequired(e){return"percentClip"===e||"histogramEqualization"===e}_isValidRasterStatistics(e){return null!=e&&e.length>0&&null!=e[0].min&&null!=e[0].max}_updateStretchRenderer(e){let{stretchType:t,dra:r}=e;if(!("none"===t||e.statistics?.length||this._isValidRasterStatistics(this.rasterInfo.statistics)||r))return{success:!1,error:"Unsupported renderer; StretchRenderer.statistics is required when dynamic range adjustment is not used."};const n=e.histograms||this.rasterInfo.histograms;!this._isHistogramRequired(e.stretchType)||n?.length||r||(t="minMax");const{computeGamma:o,useGamma:i,colorRamp:s}=e;let{gamma:a}=e;if(i&&o&&!a?.length){const t=e.statistics?.length?e.statistics:this.rasterInfo.statistics;a=(0,c.ZF)(this.rasterInfo.pixelType,t)}const l=this.rasterInfo.pixelType,u=!r&&["u8","u16","s8","s16"].includes(l);if("histogramEqualization"===t){const t=n.map((e=>(0,c.oc)(e)));this.lookup={rendererJSON:e,histogramLut:t}}else if(u){const t=(0,c.AV)(e,{rasterInfo:this.rasterInfo}),r=(0,c.hE)({pixelType:l,...t,gamma:i?a:null,rounding:"floor"});this.lookup={rendererJSON:e,stretchLut:r}}if(s){const t=(0,d.Jw)(s,{interpolateAlpha:!0});this.lookup||(this.lookup={rendererJSON:e}),this.lookup.colormapLut=(0,h.Pz)({colormap:t}),this.lookup.rendererJSON=e}return this.lookup.gamma=i&&a?.length?a:null,this.canRenderInWebGL=!0,{success:!0}}_generateStretchWebGLParams(e,t,r){let n=null,o=null;const i=this.lookup&&this.lookup.colormapLut;t.colorRamp&&i&&(n=i.indexedColormap,o=i.offset),"histogramEqualization"===t.stretchType&&(t={...t,stretchType:"minMax"});const{gamma:s}=this.lookup,a=!!(t.useGamma&&s&&s.some((e=>1!==e))),{minCutOff:l,maxCutOff:u,outMin:h,outMax:f}=(0,c.AV)(t,{rasterInfo:this.rasterInfo,pixelBlock:e,bandIds:r});let d=0;null!=e&&(d=e.getPlaneCount(),2===d&&((e=e.clone()).statistics=[e.statistics[0]],e.pixels=[e.pixels[0]]));const{bandCount:p}=this.rasterInfo,g=Math.min(3,r?.length||d||p,p),m=new Float32Array(g),y=n||a?1:255;let w;for(w=0;w<l.length;w++)m[w]=u[w]===l[w]?0:(f-h)/(u[w]-l[w])/y;const C=new Float32Array(g);if(a&&s)for(w=0;w<g;w++)s[w]>1?s[w]>2?C[w]=6.5+(s[w]-2)**2.5:C[w]=6.5+100*(2-s[w])**4:C[w]=1;return{bandCount:g,outMin:h/y,outMax:f/y,minCutOff:l,maxCutOff:u,factor:m,useGamma:a,gamma:a?s:[1,1,1],gammaCorrection:a?C:[1,1,1],colormap:n,colormapOffset:o,stretchType:t.stretchType,type:"stretch"}}_generateShadedReliefWebGLParams(e,t=!1,r={x:0,y:0}){let n=null,o=null;const i=this.lookup&&this.lookup.colormapLut;e.colorRamp&&i&&(n=i.indexedColormap,o=i.offset);const s={...e,isGCS:t,resolution:r},a=(0,f.TK)(s),l=this.rasterInfo.statistics?.[0];return{...a,minValue:l?.min??0,maxValue:l?.max??8e3,hillshadeType:"traditional"===e.hillshadeType?0:1,type:"hillshade",colormap:n,colormapOffset:o}}_generateVectorFieldWebGLParams(e){const{style:t,inputUnit:r,outputUnit:n,visualVariables:o,symbolTileSize:i,flowRepresentation:s}=e;let a;const l=this.rasterInfo.statistics?.[0].min??0,u=this.rasterInfo.statistics?.[0].max??50,h=o?.find((e=>"sizeInfo"===e.type))??{type:"sizeInfo",field:"Magnitude",maxDataValue:u,maxSize:.8*i,minDataValue:l,minSize:.2*i},c=h.minDataValue??l,f=h.maxDataValue??u,d=null!=h.maxSize&&null!=h.minSize?[h.minSize/i,h.maxSize/i]:[.2,.8];if("wind_speed"===t){const e=(d[0]+d[1])/2;d[0]=d[1]=e}const p=null!=c&&null!=f?[c,f]:null;if("classified_arrow"===t)if(null!=c&&null!=f&&null!=h){a=[];const e=(h.maxDataValue-h.minDataValue)/5;for(let t=0;t<6;t++)a.push(h.minDataValue+e*t)}else a=[0,1e-6,3.5,7,10.5,14];const g="flow_to"===s==("ocean_current_kn"===t||"ocean_current_m"===t)?0:Math.PI,m=o?.find((e=>"rotationInfo"===e.type));return{breakValues:a,dataRange:p,inputUnit:r,outputUnit:n,symbolTileSize:i,symbolPercentRange:d,style:t||"single_arrow",rotation:g,rotationType:this.rasterInfo.storageInfo?.tileInfo&&"vector-uv"===this.rasterInfo.dataType?"geographic":m?.rotationType||e.rotationType,type:"vectorField"}}};function g(e){return(0,h.nk)(e)&&0!==e.validPixelCount}(0,n._)([(0,a.Cb)({json:{write:!0}})],p.prototype,"rendererJSON",void 0),(0,n._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"rasterInfo",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],p.prototype,"lookup",void 0),(0,n._)([(0,a.Cb)()],p.prototype,"canRenderInWebGL",void 0),p=(0,n._)([(0,l.j)("esri.renderers.support.RasterSymbolizer")],p);const m=p},93010:(e,t,r)=>{r.d(t,{B4:()=>f,H0:()=>u,Jw:()=>m,Ms:()=>a,Oi:()=>s,Uh:()=>c,XL:()=>g,io:()=>b,pM:()=>y});var n=r(22303),o=r(3892),i=r(35454);const s=["random","ndvi","ndvi2","ndvi3","elevation","gray","hillshade"],a=[{id:"aspect_predefined",type:"multipart",colorRamps:[{fromColor:[190,190,190],toColor:[255,45,8]},{fromColor:[255,45,8],toColor:[255,181,61]},{fromColor:[255,181,61],toColor:[255,254,52]},{fromColor:[255,254,52],toColor:[0,251,50]},{fromColor:[0,251,50],toColor:[255,254,52]},{fromColor:[0,253,255],toColor:[0,181,255]},{fromColor:[0,181,255],toColor:[26,35,253]},{fromColor:[26,35,253],toColor:[255,57,251]},{fromColor:[255,57,251],toColor:[255,45,8]}]},{id:"blackToWhite_predefined",fromColor:[0,0,0],toColor:[255,255,255]},{id:"blueBright_predefined",fromColor:[204,204,255],toColor:[0,0,224]},{id:"blueLightToDark_predefined",fromColor:[211,229,232],toColor:[46,100,140]},{id:"blueGreenBright_predefined",fromColor:[203,245,234],toColor:[48,207,146]},{id:"blueGreenLightToDark_predefined",fromColor:[216,242,237],toColor:[21,79,74]},{id:"brownLightToDark_predefined",fromColor:[240,236,170],toColor:[102,72,48]},{id:"brownToBlueGreenDivergingBright_predefined",type:"multipart",colorRamps:[{fromColor:[156,85,31],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[33,130,145]}]},{id:"brownToBlueGreenDivergingDark_predefined",type:"multipart",colorRamps:[{fromColor:[110,70,45],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[48,100,102]}]},{id:"coefficientBias_predefined",fromColor:[214,214,255],toColor:[0,57,148]},{id:"coldToHotDiverging_predefined",type:"multipart",colorRamps:[{fromColor:[69,117,181],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[214,47,39]}]},{id:"conditionNumber_predefined",type:"multipart",colorRamps:[{fromColor:[0,97,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,34,0]}]},{id:"cyanToPurple_predefined",type:"multipart",colorRamps:[{fromColor:[0,245,245],toColor:[0,0,245]},{fromColor:[0,0,245],toColor:[245,0,245]}]},{id:"cyanLightToBlueDark_predefined",type:"multipart",colorRamps:[{fromColor:[182,237,240],toColor:[31,131,224]},{fromColor:[31,131,224],toColor:[9,9,145]}]},{id:"distance_predefined",fromColor:[255,200,0],toColor:[0,0,255]},{id:"elevation1_predefined",type:"multipart",colorRamps:[{fromColor:[175,240,233],toColor:[255,255,179]},{fromColor:[255,255,179],toColor:[0,128,64]},{fromColor:[0,128,64],toColor:[252,186,3]},{fromColor:[252,186,3],toColor:[128,0,0]},{fromColor:[120,0,0],toColor:[105,48,13]},{fromColor:[105,48,13],toColor:[171,171,171]},{fromColor:[171,171,171],toColor:[255,252,255]}]},{id:"elevation2_predefined",type:"multipart",colorRamps:[{fromColor:[118,219,211],toColor:[255,255,199]},{fromColor:[255,255,199],toColor:[255,255,128]},{fromColor:[255,255,128],toColor:[217,194,121]},{fromColor:[217,194,121],toColor:[135,96,38]},{fromColor:[135,96,38],toColor:[150,150,181]},{fromColor:[150,150,181],toColor:[181,150,181]},{fromColor:[181,150,181],toColor:[255,252,255]}]},{id:"errors_predefined",fromColor:[255,235,214],toColor:[196,10,10]},{id:"grayLightToDark_predefined",fromColor:[219,219,219],toColor:[69,69,69]},{id:"greenBright_predefined",fromColor:[204,255,204],toColor:[14,204,14]},{id:"greenLightToDark_predefined",fromColor:[220,245,233],toColor:[34,102,51]},{id:"greenToBlue_predefined",type:"multipart",colorRamps:[{fromColor:[32,204,16],toColor:[0,242,242]},{fromColor:[0,242,242],toColor:[2,33,227]}]},{id:"orangeBright_predefined",fromColor:[255,235,204],toColor:[240,118,5]},{id:"orangeLightToDark_predefined",fromColor:[250,233,212],toColor:[171,65,36]},{id:"partialSpectrum_predefined",type:"multipart",colorRamps:[{fromColor:[242,241,162],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]},{fromColor:[252,3,69],toColor:[176,7,237]},{fromColor:[176,7,237],toColor:[2,29,173]}]},{id:"partialSpectrum1Diverging_predefined",type:"multipart",colorRamps:[{fromColor:[135,38,38],toColor:[240,149,12]},{fromColor:[240,149,12],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[74,80,181]},{fromColor:[74,80,181],toColor:[39,32,122]}]},{id:"partialSpectrum2Diverging_predefined",type:"multipart",colorRamps:[{fromColor:[115,77,42],toColor:[201,137,52]},{fromColor:[201,137,52],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[91,63,176]},{fromColor:[91,63,176],toColor:[81,13,97]}]},{id:"pinkToYellowGreenDivergingBright_predefined",type:"multipart",colorRamps:[{fromColor:[158,30,113],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[99,110,45]}]},{id:"pinkToYellowGreenDivergingDark_predefined",type:"multipart",colorRamps:[{fromColor:[97,47,73],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[22,59,15]}]},{id:"precipitation_predefined",type:"multipart",colorRamps:[{fromColor:[194,82,60],toColor:[237,161,19]},{fromColor:[237,161,19],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,219,0]},{fromColor:[0,219,0],toColor:[32,153,143]},{fromColor:[32,153,143],toColor:[11,44,122]}]},{id:"prediction_predefined",type:"multipart",colorRamps:[{fromColor:[40,146,199],toColor:[250,250,100]},{fromColor:[250,250,100],toColor:[232,16,20]}]},{id:"purpleBright_predefined",fromColor:[255,204,255],toColor:[199,0,199]},{id:"purpleToGreenDivergingBright_predefined",type:"multipart",colorRamps:[{fromColor:[77,32,150],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[20,122,11]}]},{id:"purpleToGreenDivergingDark_predefined",type:"multipart",colorRamps:[{fromColor:[67,14,89],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[24,79,15]}]},{id:"purpleBlueBright_predefined",fromColor:[223,184,230],toColor:[112,12,242]},{id:"purpleBlueLightToDark_predefined",fromColor:[229,213,242],toColor:[93,44,112]},{id:"purpleRedBright_predefined",fromColor:[255,204,225],toColor:[199,0,99]},{id:"purpleRedLightToDark_predefined",fromColor:[250,215,246],toColor:[143,17,57]},{id:"redBright_predefined",fromColor:[255,204,204],toColor:[219,0,0]},{id:"redLightToDark_predefined",fromColor:[255,224,224],toColor:[143,10,10]},{id:"redToBlueDivergingBright_predefined",type:"multipart",colorRamps:[{fromColor:[196,69,57],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[48,95,207]}]},{id:"redToBlueDivergingDark_predefined",type:"multipart",colorRamps:[{fromColor:[107,13,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[13,53,97]}]},{id:"redToGreen_predefined",type:"multipart",colorRamps:[{fromColor:[245,0,0],toColor:[245,245,0]},{fromColor:[245,245,0],toColor:[0,245,0]}]},{id:"redToGreenDivergingBright_predefined",type:"multipart",colorRamps:[{fromColor:[186,20,20],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[54,145,33]}]},{id:"redToGreenDivergingDark_predefined",type:"multipart",colorRamps:[{fromColor:[97,21,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[16,69,16]}]},{id:"slope_predefined",type:"multipart",colorRamps:[{fromColor:[56,168,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]}]},{id:"spectrumFullBright_predefined",type:"multipart",colorRamps:[{fromColor:[255,0,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,0,255]}]},{id:"spectrumFullDark_predefined",type:"multipart",colorRamps:[{fromColor:[153,0,0],toColor:[153,153,0]},{fromColor:[153,153,0],toColor:[0,153,153]},{fromColor:[0,153,153],toColor:[0,0,153]}]},{id:"spectrumFullLight_predefined",type:"multipart",colorRamps:[{fromColor:[255,153,153],toColor:[255,255,153]},{fromColor:[255,255,153],toColor:[153,255,255]},{fromColor:[153,255,255],toColor:[153,153,255]}]},{id:"surface_predefined",type:"multipart",colorRamps:[{fromColor:[112,153,89],toColor:[242,238,162]},{fromColor:[242,238,162],toColor:[242,206,133]},{fromColor:[242,206,133],toColor:[194,140,124]},{fromColor:[194,140,124],toColor:[255,242,255]}]},{id:"temperature_predefined",type:"multipart",colorRamps:[{fromColor:[255,252,255],toColor:[255,0,255]},{fromColor:[255,0,255],toColor:[0,0,255]},{fromColor:[0,0,255],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,255,0]},{fromColor:[0,255,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,128,0]},{fromColor:[255,128,0],toColor:[128,0,0]}]},{id:"whiteToBlack_predefined",fromColor:[255,255,255],toColor:[0,0,0]},{id:"yellowToDarkRed_predefined",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[242,167,46]},{fromColor:[242,167,46],toColor:[107,0,0]}]},{id:"yellowToGreenToDarkBlue_predefined",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[56,224,9]},{fromColor:[56,224,9],toColor:[26,147,171]},{fromColor:[26,147,171],toColor:[12,16,120]}]},{id:"yellowToRed_predefined",fromColor:[245,245,0],toColor:[255,0,0]},{id:"yellowGreenBright_predefined",fromColor:[236,252,204],toColor:[157,204,16]},{id:"yellowGreenLightToDark_predefined",fromColor:[215,240,175],toColor:[96,107,45]}],l={aspect_predefined:"Aspect",blackToWhite_predefined:"Black to White",blueBright_predefined:"Blue Bright",blueLightToDark_predefined:"Blue Light to Dark",blueGreenBright_predefined:"Blue-Green Bright",blueGreenLightToDark_predefined:"Blue-Green Light to Dark",brownLightToDark_predefined:"Brown Light to Dark",brownToBlueGreenDivergingBright_predefined:"Brown to Blue Green Diverging, Bright",brownToBlueGreenDivergingDark_predefined:"Brown to Blue Green Diverging, Dark",coefficientBias_predefined:"Coefficient Bias",coldToHotDiverging_predefined:"Cold to Hot Diverging",conditionNumber_predefined:"Condition Number",cyanToPurple_predefined:"Cyan to Purple",cyanLightToBlueDark_predefined:"Cyan-Light to Blue-Dark",distance_predefined:"Distance",elevation1_predefined:"Elevation #1",elevation2_predefined:"Elevation #2",errors_predefined:"Errors",grayLightToDark_predefined:"Gray Light to Dark",greenBright_predefined:"Green Bright",greenLightToDark_predefined:"Green Light to Dark",greenToBlue_predefined:"Green to Blue",orangeBright_predefined:"Orange Bright",orangeLightToDark_predefined:"Orange Light to Dark",partialSpectrum_predefined:"Partial Spectrum",partialSpectrum1Diverging_predefined:"Partial Spectrum 1 Diverging",partialSpectrum2Diverging_predefined:"Partial Spectrum 2 Diverging",pinkToYellowGreenDivergingBright_predefined:"Pink to YellowGreen Diverging, Bright",pinkToYellowGreenDivergingDark_predefined:"Pink to YellowGreen Diverging, Dark",precipitation_predefined:"Precipitation",prediction_predefined:"Prediction",purpleBright_predefined:"Purple Bright",purpleToGreenDivergingBright_predefined:"Purple to Green Diverging, Bright",purpleToGreenDivergingDark_predefined:"Purple to Green Diverging, Dark",purpleBlueBright_predefined:"Purple-Blue Bright",purpleBlueLightToDark_predefined:"Purple-Blue Light to Dark",purpleRedBright_predefined:"Purple-Red Bright",purpleRedLightToDark_predefined:"Purple-Red Light to Dark",redBright_predefined:"Red Bright",redLightToDark_predefined:"Red Light to Dark",redToBlueDivergingBright_predefined:"Red to Blue Diverging, Bright",redToBlueDivergingDark_predefined:"Red to Blue Diverging, Dark",redToGreen_predefined:"Red to Green",redToGreenDivergingBright_predefined:"Red to Green Diverging, Bright",redToGreenDivergingDark_predefined:"Red to Green Diverging, Dark",slope_predefined:"Slope",spectrumFullBright_predefined:"Spectrum-Full Bright",spectrumFullDark_predefined:"Spectrum-Full Dark",spectrumFullLight_predefined:"Spectrum-Full Light",surface_predefined:"Surface",temperature_predefined:"Temperature",whiteToBlack_predefined:"White to Black",yellowToDarkRed_predefined:"Yellow to Dark Red",yellowToGreenToDarkBlue_predefined:"Yellow to Green to Dark Blue",yellowToRed_predefined:"Yellow to Red",yellowGreenBright_predefined:"Yellow-Green Bright",yellowGreenLightToDark_predefined:"Yellow-Green Light to Dark"},u=new i.X({Aspect:"aspect","Black to White":"black-to-white","Blue Bright":"blue-bright","Blue Light to Dark":"blue-light-to-dark","Blue-Green Bright":"blue-green-bright","Blue-Green Light to Dark":"blue-green-light-to-dark","Brown Light to Dark":"brown-light-to-dark","Brown to Blue Green Diverging, Bright":"brown-to-blue-green-diverging-right","Brown to Blue Green Diverging, Dark":"brown-to-blue-green-diverging-dark","Coefficient Bias":"coefficient-bias","Cold to Hot Diverging":"cold-to-hot-diverging","Condition Number":"condition-number","Cyan to Purple":"cyan-to-purple","Cyan-Light to Blue-Dark":"cyan-light-to-blue-dark",Distance:"distance","Elevation #1":"elevation1","Elevation #2":"elevation2",Errors:"errors","Gray Light to Dark":"gray-light-to-dark","Green Bright":"green-bright","Green Light to Dark":"green-light-to-dark","Green to Blue":"green-to-blue","Orange Bright":"orange-bright","Orange Light to Dark":"orange-light-to-dark","Partial Spectrum":"partial-spectrum","Partial Spectrum 1 Diverging":"partial-spectrum-1-diverging","Partial Spectrum 2 Diverging":"partial-spectrum-2-diverging","Pink to YellowGreen Diverging, Bright":"pink-to-yellow-green-diverging-bright","Pink to YellowGreen Diverging, Dark":"pink-to-yellow-green-diverging-dark",Precipitation:"precipitation",Prediction:"prediction","urple Bright":"purple-bright","Purple to Green Diverging, Bright":"purple-to-green-diverging-bright","Purple to Green Diverging, Dark":"purple-to-green-diverging-dark","Purple-Blue Bright":"purple-blue-bright","Purple-Blue Light to Dark":"purple-blue-light-to-dark","Purple-Red Bright":"purple-red-bright","Purple-Red Light to Dark":"purple-red-light-to-dark","Red Bright":"red-bright","Red Light to Dark":"red-light-to-dark","Red to Blue Diverging, Bright":"red-to-blue-diverging-bright","Red to Blue Diverging, Dark":"red-to-blue-diverging-dark","Red to Green":"red-to-green","Red to Green Diverging, Bright":"red-to-green-diverging-bright","Red to Green Diverging, Dark":"red-to-green-diverging-dark",Slope:"slope","Spectrum-Full Bright":"spectrum-full-bright","Spectrum-Full Dark":"spectrum-full-dark","Spectrum-Full Light":"spectrum-full-light",Surface:"surface",Temperature:"temperature","White to Black":"white-to-black","Yellow to Dark Red":"yellow-to-dark-red","Yellow to Green to Dark Blue":"yellow-to-green-to-dark-blue","Yellow to Red":"yellow-to-red","Yellow-Green Bright":"yellow-green-bright","Yellow-Green Light to Dark":"yellow-green-light-to-dark"});function h(e,t){if(!e||!t||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]>t[r]+2||e[r]<t[r]-2)return!1;return!0}function c(e){const t=function(e,t){if(!e)return;const r=a;let o=null;return"algorithmic"===e.type?r.some((t=>{if(h(e.fromColor.toRgb(),t.fromColor)&&h(e.toColor.toRgb(),t.toColor))return o=t.id,!0})):"multipart"===e.type&&r.some((t=>{const r=e.colorRamps,i=t.colorRamps;if(r&&i&&r.length===i.length&&!i.some(((e,t)=>{if(!h(r[t].fromColor.toRgb(),new n.Z(e.fromColor).toRgb())||!h(r[t].toColor.toRgb(),new n.Z(e.toColor).toRgb()))return!0}))){if(o)return!0;o=t.id}})),o}(e);return t?l[t]:null}function f(e){const t=u.toJSON(e),r=Object.entries(l).find((e=>e[1]===t))?.[0],n=a.find((e=>e.id===r));return n?n.colorRamps?{type:"multipart",colorRamps:n.colorRamps.map((e=>({type:"algorithmic",algorithm:"esriCIELabAlgorithm",fromColor:e.fromColor,toColor:e.toColor})))}:{type:"algorithmic",algorithm:"esriCIELabAlgorithm",fromColor:n.fromColor,toColor:n.toColor}:null}function d(e){const t=(e=e||{}).numColors||256,r=e.distanceOffset||0,n=null!=e.isCustomInterval?e.isCustomInterval:null!==e.distanceInterval&&e.distanceInterval!==1/(t-1),o=e.distanceInterval||1/(t-1);return{...e,numColors:t,distanceOffset:r,interpolateAlpha:!!e.interpolateAlpha,distanceInterval:o,isCustomInterval:n,weights:e.weights}}function p(e,t){let{fromColor:r,toColor:n}=e;3===r.length&&(r=r.concat([255])),3===n.length&&(n=n.concat([255]));const i=e.algorithm||"esriCIELabAlgorithm",s=d(t),{numColors:a,distanceOffset:l,isCustomInterval:u,interpolateAlpha:h}=s;if(1===a&&0===l)return[r];if(2===a&&0===l&&!u)return[r,n];const c={r:r[0],g:r[1],b:r[2]},f={r:n[0],g:n[1],b:n[2]},p="esriCIELabAlgorithm"===i?function(e,t,r){const{numColors:n,distanceOffset:o,distanceInterval:i,isCustomInterval:s}=r;let{l:a,a:l,b:u}=e;const h=(t.l-a)*i,c=(t.a-l)*i,f=(t.b-u)*i,d=[];if(o){const e=o/i;a+=e*h,l+=e*c,u+=e*f}for(let e=0;e<n-1;e++)d.push({l:a,a:l,b:u}),a+=h,l+=c,u+=f;return d.push(s?{l:a,a:l,b:u}:t),d}((0,o.Y3)(c),(0,o.Y3)(f),s):"esriHSVAlgorithm"===i?function(e,t,r){const{numColors:n,distanceOffset:o,distanceInterval:i,isCustomInterval:s}=r,a=0===e.s,l=0===t.s;let u=e.h,h=t.h;a&&!l?u=h:l&&!a&&(t={...t,h:u},h=u);let c,f=Math.abs(h-u);const d=360;f<180?c=(h-u)*i:(f=d-f,c=u>h?f*i:-f*i);const p=(t.s-e.s)*i,g=(t.v-e.v)*i;let{s:m,v:y}=e,w=u;if(o){const e=o/i;w=(w+e*c+d)%d,m+=e*p,y+=e*g}const C=[];for(let e=0;e<n-1;e++)C.push({h:w,s:m,v:y}),w=(w+c+d)%d,m+=p,y+=g;return C.push(s?{h:w,s:m,v:y}:t),C}((0,o._Y)(c),(0,o._Y)(f),s):function(e,t,r){const{numColors:n,distanceOffset:o,distanceInterval:i,isCustomInterval:s}=r,a=e.h,l=t.h,u=2*Math.PI;let h;if(a<=l){const e=l-a,t=l-a-u;h=Math.abs(t)<Math.abs(e)?t:e}else{const e=l+u-a,t=l-a;h=Math.abs(t)<Math.abs(e)?t:e}const c=h*i,f=(t.l-e.l)*i,d=(t.c-e.c)*i;let{l:p,c:g,h:m}=e;if(o){const e=o/i;p+=e*f,g+=e*d,m=(m+e*c+u)%u}const y=[];for(let e=0;e<n-1;e++)y.push({l:p,c:g,h:m}),p+=f,g+=d,m=(m+c+u)%u;return y.push(s?{l:p,c:g,h:m}:t),y}((0,o.sJ)(c),(0,o.sJ)(f),s),g=[],m=r[3]??255,y=((n[3]??255)-m)/(a-1);for(let e=0;e<a;e++){const{r:t,g:r,b:n}=(0,o.xr)(p[e]),i=h?Math.round(m+y*e):255;g.push([t,r,n,i])}return g}function g(e,t){const r="toJSON"in e?e.toJSON():e;return"multipart"===r.type?function(e,t){const{numColors:r,interpolateAlpha:n}=d(t);let o=t?.weights;const{colorRamps:i}=e;if(o){const e=o.reduce(((e,t)=>e+t));o=o.map((t=>t/e))}else{o=[];for(let e=0;e<i.length;e++)o[e]=1/i.length}const s=[];let a=0,l=0;const u=1/(r-1);let h=!1;for(let e=0;e<i.length;e++){let t=h?0:a*u-l,c=e===i.length-1?r-1-a:(o[e]-t)/u;if(h=Math.ceil(c)===c,c=Math.ceil(c),0===c)continue;t/=o[e];const f=p(i[e],{numColors:c,interpolateAlpha:n,distanceOffset:t,distanceInterval:u/o[e]});a+=f.length,s.push(...f),l+=o[e]}const c=[...i[i.length-1].toColor];return 3===c.length&&c.push(255),s.push(c),s}(r,t):p(r,t)}function m(e,t){const r=g(e,t),n=t?.interpolateAlpha;return r.forEach(((e,t)=>{e.unshift(t),n||e.pop()})),r}function y(e){const t=c(e);if(e){if("algorithmic"===e.type)return{...w(e),Name:t};if(e.colorRamps){const r=e.colorRamps.map(w);return{type:"MultiPartColorRamp",NumColorRamps:r.length,ArrayOfColorRamp:r,Name:t}}}}function w(e){if(!e)return;const t=e.toJSON();return{Algorithm:t?.Algorithm||"esriHSVAlgorithm",type:"AlgorithmicColorRamp",FromColor:C(e.fromColor),ToColor:C(e.toColor)}}function C(e){const t=(0,o._Y)(e);return{type:"HsvColor",Hue:t.h,Saturation:t.s,Value:t.v,AlphaValue:255}}function b(e){const t=e.reverse().map((e=>{const t=e.toString(16);return t.length<2?"0"+t:t}));return 4294967295&Number.parseInt(t.join(""),16)}},75509:(e,t,r)=>{r.d(t,{J:()=>o,v:()=>n});const n=new(r(35454).X)({none:"none",standardDeviation:"standard-deviation",histogramEqualization:"histogram-equalization",minMax:"min-max",percentClip:"percent-clip",sigmoid:"sigmoid"}),o={0:"none",3:"standardDeviation",4:"histogramEqualization",5:"minMax",6:"percentClip",9:"sigmoid"}},23808:(e,t,r)=>{r.d(t,{GE:()=>u}),r(66577);var n=r(80442),o=r(92604),i=(r(22021),r(95330)),s=r(77734);r(8744),r(6570);const a=o.Z.getLogger("esri.views.2d.engine.flow.dataUtils"),l=10;async function u(e,t,r,o){const u=performance.now(),h=function(e,t){const r=function(e,t,r,n){if(0===n)return e;const o=Math.round(3*n),i=new Array(2*o+1);let s=0;for(let e=-o;e<=o;e++){const t=Math.exp(-e*e/(n*n));i[e+o]=t,s+=t}for(let e=-o;e<=o;e++)i[e+o]/=s;const a=new Float32Array(e.length);for(let n=0;n<r;n++)for(let r=0;r<t;r++){let s=0,l=0;for(let a=-o;a<=o;a++){if(r+a<0||r+a>=t)continue;const u=i[a+o];s+=u*e[2*(n*t+(r+a))],l+=u*e[2*(n*t+(r+a))+1]}a[2*(n*t+r)]=s,a[2*(n*t+r)+1]=l}const l=new Float32Array(e.length);for(let e=0;e<t;e++)for(let n=0;n<r;n++){let s=0,u=0;for(let l=-o;l<=o;l++){if(n+l<0||n+l>=r)continue;const h=i[l+o];s+=h*a[2*((n+l)*t+e)],u+=h*a[2*((n+l)*t+e)+1]}l[2*(n*t+e)]=s,l[2*(n*t+e)+1]=u}return l}(t.data,t.width,t.height,e.smoothing);return e.interpolate?(e,n)=>{const o=Math.floor(e),i=Math.floor(n);if(o<0||o>=t.width)return[0,0];if(i<0||i>=t.height)return[0,0];const s=e-o,a=n-i,l=o,u=i,h=o<t.width-1?o+1:o,c=i<t.height-1?i+1:i,f=r[2*(u*t.width+l)],d=r[2*(u*t.width+h)],p=r[2*(c*t.width+l)],g=r[2*(c*t.width+h)],m=r[2*(u*t.width+l)+1],y=r[2*(u*t.width+h)+1];return[(f*(1-a)+p*a)*(1-s)+(d*(1-a)+g*a)*s,(m*(1-a)+r[2*(c*t.width+l)+1]*a)*(1-s)+(y*(1-a)+r[2*(c*t.width+h)+1]*a)*s]}:(e,n)=>{const o=Math.round(e),i=Math.round(n);return o<0||o>=t.width||i<0||i>=t.height?[0,0]:[r[2*(i*t.width+o)],r[2*(i*t.width+o)+1]]}}(t,r),f=performance.now(),d=c(t,h,r.width,r.height),p=performance.now(),g=function(e,t){const r=new s.Z,n=e.reduce(((e,t)=>e+t.length),0),o=new Float32Array(4*n),i=new Array(e.length);let a=0,l=0;for(const t of e){const e=a;for(const e of t)o[4*a]=e.x,o[4*a+1]=e.y,o[4*a+2]=e.t,o[4*a+3]=e.speed,a++;i[l++]={startVertex:e,numberOfVertices:t.length,totalTime:t[t.length-1].t,timeSeed:r.getFloat()}}return{lineVertices:o,lineDescriptors:i}}(d),m=performance.now(),y="Streamlines"===e?function(e,t){const r=9,{lineVertices:n,lineDescriptors:o}=e;let i=0,s=0;for(const e of o)i+=2*e.numberOfVertices,s+=6*(e.numberOfVertices-1);const a=new Float32Array(i*r),l=new Uint32Array(s);let u=0,h=0;function c(){l[h++]=u-2,l[h++]=u,l[h++]=u-1,l[h++]=u,l[h++]=u+1,l[h++]=u-1}function f(e,t,n,o,i,s,l,h){const c=u*r;let f=0;a[c+f++]=e,a[c+f++]=t,a[c+f++]=1,a[c+f++]=n,a[c+f++]=s,a[c+f++]=l,a[c+f++]=o/2,a[c+f++]=i/2,a[c+f++]=h,u++,a[c+f++]=e,a[c+f++]=t,a[c+f++]=-1,a[c+f++]=n,a[c+f++]=s,a[c+f++]=l,a[c+f++]=-o/2,a[c+f++]=-i/2,a[c+f++]=h,u++}for(const e of o){const{totalTime:r,timeSeed:o}=e;let i=null,s=null,a=null,l=null,u=null,h=null;for(let d=0;d<e.numberOfVertices;d++){const p=n[4*(e.startVertex+d)],g=n[4*(e.startVertex+d)+1],m=n[4*(e.startVertex+d)+2],y=n[4*(e.startVertex+d)+3];let w=null,C=null,b=null,x=null;if(d>0){w=p-i,C=g-s;const e=Math.sqrt(w*w+C*C);if(w/=e,C/=e,d>1){let e=w+u,r=C+h;const n=Math.sqrt(e*e+r*r);e/=n,r/=n;const o=Math.min(1/(e*w+r*C),t);e*=o,r*=o,b=-r,x=e}else b=-C,x=w;null!==b&&null!==x&&(f(i,s,a,b,x,r,o,y),c())}i=p,s=g,a=m,u=w,h=C,l=y}f(i,s,a,-h,u,r,o,l)}return{vertexData:a,indexData:l}}(g,l):function(e){const t=16,r=1,n=2,{lineVertices:o,lineDescriptors:i}=e;let s=0,a=0;for(const e of i){const t=e.numberOfVertices-1;s+=4*t*2,a+=6*t*2}const l=new Float32Array(s*t),u=new Uint32Array(a);let h,c,f,d,p,g,m,y,w,C,b,x,k,v,T=0,S=0;function A(){u[S++]=T-8,u[S++]=T-7,u[S++]=T-6,u[S++]=T-7,u[S++]=T-5,u[S++]=T-6,u[S++]=T-4,u[S++]=T-3,u[S++]=T-2,u[S++]=T-3,u[S++]=T-1,u[S++]=T-2}function I(e,o,i,s,a,u,h,c,f,d,p,g,m,y){const w=T*t;let C=0;for(const t of[r,n])for(const r of[1,2,3,4])l[w+C++]=e,l[w+C++]=o,l[w+C++]=i,l[w+C++]=s,l[w+C++]=h,l[w+C++]=c,l[w+C++]=f,l[w+C++]=d,l[w+C++]=t,l[w+C++]=r,l[w+C++]=m,l[w+C++]=y,l[w+C++]=a/2,l[w+C++]=u/2,l[w+C++]=p/2,l[w+C++]=g/2,T++}function P(e,t){let r=w+b,n=C+x;const o=Math.sqrt(r*r+n*n);r/=o,n/=o;const i=w*r+C*n;r/=i,n/=i;let s=b+k,a=x+v;const l=Math.sqrt(s*s+a*a);s/=l,a/=l;const u=b*s+x*a;s/=u,a/=u,I(h,c,f,d,-n,r,p,g,m,y,-a,s,e,t),A()}function M(e,t,r,n,o,i){if(w=b,C=x,b=k,x=v,null==w&&null==C&&(w=b,C=x),null!=p&&null!=g){k=e-p,v=t-g;const r=Math.sqrt(k*k+v*v);k/=r,v/=r}null!=w&&null!=C&&P(o,i),h=p,c=g,f=m,d=y,p=e,g=t,m=r,y=n}function E(e,t){w=b,C=x,b=k,x=v,null==w&&null==C&&(w=b,C=x),null!=w&&null!=C&&P(e,t)}for(const e of i){h=null,c=null,f=null,d=null,p=null,g=null,m=null,y=null,w=null,C=null,b=null,x=null,k=null,v=null;const{totalTime:t,timeSeed:r}=e;for(let n=0;n<e.numberOfVertices;n++)M(o[4*(e.startVertex+n)],o[4*(e.startVertex+n)+1],o[4*(e.startVertex+n)+2],o[4*(e.startVertex+n)+3],t,r);E(t,r)}return{vertexData:l,indexData:u}}(g),w=performance.now();return(0,n.Z)("esri-2d-profiler")&&(a.info("I.1","_createFlowFieldFromData (ms)",Math.round(f-u)),a.info("I.2","_getStreamlines (ms)",Math.round(p-f)),a.info("I.3","createAnimatedLinesData (ms)",Math.round(m-p)),a.info("I.4","create{Streamlines|Particles}Mesh (ms)",Math.round(w-m)),a.info("I.5","createFlowMesh (ms)",Math.round(w-u)),a.info("I.6","Mesh size (bytes)",y.vertexData.buffer.byteLength+y.indexData.buffer.byteLength)),await Promise.resolve(),(0,i.k_)(o),y}function h(e,t,r,n,o,i,s,a,l){const u=[];let h=r,c=n,f=0,[d,p]=t(h,c);d*=e.velocityScale,p*=e.velocityScale;const g=Math.sqrt(d*d+p*p);let m,y;u.push({x:h,y:c,t:f,speed:g});for(let r=0;r<e.verticesPerLine;r++){let[r,n]=t(h,c);r*=e.velocityScale,n*=e.velocityScale;const d=Math.sqrt(r*r+n*n);if(d<e.minSpeedThreshold)return u;const p=r/d,g=n/d;if(h+=p*e.segmentLength,c+=g*e.segmentLength,f+=e.segmentLength/d,Math.acos(p*m+g*y)>e.maxTurnAngle)return u;if(e.collisions){const e=Math.round(h*l),t=Math.round(c*l);if(e<0||e>s-1||t<0||t>a-1)return u;const r=i[t*s+e];if(-1!==r&&r!==o)return u;i[t*s+e]=o}u.push({x:h,y:c,t:f,speed:d}),m=p,y=g}return u}function c(e,t,r,n){const o=[],i=new s.Z,a=1/Math.max(e.lineCollisionWidth,1),l=Math.round(r*a),u=Math.round(n*a),c=new Int32Array(l*u);for(let e=0;e<c.length;e++)c[e]=-1;const f=[];for(let t=0;t<n;t+=e.lineSpacing)for(let n=0;n<r;n+=e.lineSpacing)f.push({x:n,y:t,sort:i.getFloat()});f.sort(((e,t)=>e.sort-t.sort));for(const{x:r,y:n}of f)if(i.getFloat()<e.density){const i=h(e,t,r,n,o.length,c,l,u,a);if(i.length<2)continue;o.push(i)}return o}}}]);