@arcgis/core 4.28.0-next.20230720 → 4.28.0-next.20230721

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 (261) hide show
  1. package/Color.js +1 -1
  2. package/analysis/AreaMeasurementAnalysis.js +1 -1
  3. package/arcade/arcadeCompiler.js +1 -1
  4. package/arcade/featureSetUtils.js +1 -1
  5. package/arcade/featureset/actions/Top.js +1 -1
  6. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  7. package/arcade/featureset/support/FeatureSet.js +1 -1
  8. package/arcade/featureset/support/FeatureSetIterator.js +1 -1
  9. package/arcade/functions/convertdirection.js +1 -1
  10. package/arcade/functions/featuresetbase.js +1 -1
  11. package/arcade/functions/geomasync.js +1 -1
  12. package/arcade/functions/geomsync.js +1 -1
  13. package/arcade/lib/comment-handler.js +1 -1
  14. package/arcade/lib/parser.js +1 -1
  15. package/arcade/lib/scanner.js +1 -1
  16. package/assets/esri/core/workers/RemoteClient.js +1 -1
  17. package/assets/esri/core/workers/chunks/{75c28da8d0b02d612d69.js → 040b3fc9c9c0736dd893.js} +1 -1
  18. package/assets/esri/core/workers/chunks/0652f6a8d5221e978033.js +1 -0
  19. package/assets/esri/core/workers/chunks/{c13b332afdb3f6be1ec9.js → 092fda62b6f62c2e4869.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{57e0ad037188bd2997e7.js → 0af18a96cbd4e2d35436.js} +1 -1
  21. package/assets/esri/core/workers/chunks/0b5eeec0f66c87a46a0c.js +1 -0
  22. package/assets/esri/core/workers/chunks/{68e568b67b6fb34393db.js → 0cad2b991d0d0fd07846.js} +1 -1
  23. package/assets/esri/core/workers/chunks/0dccbc6c2559fdc0c2ad.js +1 -0
  24. package/assets/esri/core/workers/chunks/256a82f6f6e1405fbcc6.js +1 -0
  25. package/assets/esri/core/workers/chunks/{bb9213899049e1db90da.js → 2c57c9bd71637c5bed8a.js} +1 -1
  26. package/assets/esri/core/workers/chunks/2cdbabcbfe32286ec78d.js +1 -0
  27. package/assets/esri/core/workers/chunks/{2b1c83453a862e01954b.js → 2d9d80b2d0042a9c09fb.js} +1 -1
  28. package/assets/esri/core/workers/chunks/2f9aec2238ff6cb99e09.js +1 -0
  29. package/assets/esri/core/workers/chunks/{7dbd3e6406fb3e3a1a8f.js → 3cf748c025f3936c1cb2.js} +1 -1
  30. package/assets/esri/core/workers/chunks/4481d1103363434f16da.js +1 -0
  31. package/assets/esri/core/workers/chunks/5ae325e6a795c72eac6c.js +1 -0
  32. package/assets/esri/core/workers/chunks/5e4dde2886a1027b4b96.js +1 -0
  33. package/assets/esri/core/workers/chunks/730eb7e5f617fdab4f10.js +1 -0
  34. package/assets/esri/core/workers/chunks/{5a2e6bed9431cf4f42b1.js → 740dc67038f554431f1b.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{09178454bda15bb7929a.js → 7fbdfd1527582c52f9b6.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{1c026947505a9ff94a53.js → 807742f38885fa90b4fe.js} +1 -1
  37. package/assets/esri/core/workers/chunks/82dfbc175b52c7a10475.js +1 -0
  38. package/assets/esri/core/workers/chunks/870a05451e074b58f19a.js +1 -0
  39. package/assets/esri/core/workers/chunks/8c5a8c1dfb086069bb06.js +1 -0
  40. package/assets/esri/core/workers/chunks/99a5a434e0bad48c7a5c.js +1 -0
  41. package/assets/esri/core/workers/chunks/9a5916c66dad91d01d5b.js +1 -0
  42. package/assets/esri/core/workers/chunks/9c133fd8c1fbd0295b86.js +1 -0
  43. package/assets/esri/core/workers/chunks/9cddb504079d396779ea.js +1 -0
  44. package/assets/esri/core/workers/chunks/a3a1d4f32e518e97d071.js +1 -0
  45. package/assets/esri/core/workers/chunks/{9548aa449fe3a300c015.js → a4fa40dc77e116c954ac.js} +1 -1
  46. package/assets/esri/core/workers/chunks/a54ec9929a7db879d5db.js +1 -0
  47. package/assets/esri/core/workers/chunks/afc5b84693757fda2bc8.js +1 -0
  48. package/assets/esri/core/workers/chunks/{591b5c277cfd3a4101a4.js → b08f2a4aa94087c6c367.js} +1 -1
  49. package/assets/esri/core/workers/chunks/c0e12f6a7bb2360e4c21.js +1 -0
  50. package/assets/esri/core/workers/chunks/c8e656cd470a17f538e9.js +1 -0
  51. package/assets/esri/core/workers/chunks/d0e203405f95e14b1399.js +1 -0
  52. package/assets/esri/core/workers/chunks/{ec72f492f24e67e008ae.js → d8e58dc14d3495f0830c.js} +1 -1
  53. package/assets/esri/core/workers/chunks/ddc393a012588f799f42.js +1 -0
  54. package/assets/esri/core/workers/chunks/de3baa85b1639c25458d.js +1 -0
  55. package/assets/esri/core/workers/chunks/e66cea26064ba8353af0.js +1 -0
  56. package/assets/esri/core/workers/chunks/ea478f2f4a19463e13fd.js +1 -0
  57. package/assets/esri/core/workers/chunks/eba197e45507f56f3ed0.js +1 -0
  58. package/assets/esri/core/workers/chunks/ebd006fcd568a7731115.js +1 -0
  59. package/assets/esri/core/workers/chunks/ef9a9a7d66d818720e20.js +1 -0
  60. package/assets/esri/core/workers/chunks/f3b458f55236566c940b.js +1 -0
  61. package/assets/esri/core/workers/chunks/fd0a91b9e0216cc269c3.js +1 -0
  62. package/assets/esri/core/workers/chunks/{a4fe220a912b1f428e49.js → fdd6403a8390d629392b.js} +1 -1
  63. package/assets/esri/themes/base/widgets/_Directions.scss +13 -7
  64. package/assets/esri/themes/dark/main.css +1 -1
  65. package/assets/esri/themes/light/main.css +1 -1
  66. package/assets/esri/themes/light/view.css +1 -1
  67. package/chunks/array.js +1 -1
  68. package/core/Collection.js +1 -1
  69. package/core/accessorSupport/decorators/subclass.js +1 -1
  70. package/core/accessorSupport/ensureType.js +1 -1
  71. package/core/accessorSupport/get.js +1 -1
  72. package/core/accessorSupport/tracking.js +1 -1
  73. package/core/accessorSupport/utils.js +1 -1
  74. package/core/libs/rbush/PooledRBush.js +1 -1
  75. package/core/urlUtils.js +1 -1
  76. package/geometry/GeometryCursor.js +1 -1
  77. package/geometry/support/TileClipper.js +1 -1
  78. package/geometry/support/geodesicUtils.js +1 -1
  79. package/interfaces.d.ts +7 -1
  80. package/layers/LinkChartLayer.js +1 -1
  81. package/layers/VectorTileLayer.js +1 -1
  82. package/layers/VoxelLayer.js +1 -1
  83. package/layers/WCSLayer.js +1 -1
  84. package/layers/effects/EffectView.js +1 -1
  85. package/layers/graphics/sources/geojson/geojson.js +1 -1
  86. package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
  87. package/layers/mixins/ArcGISCachedService.js +1 -1
  88. package/layers/support/ElevationQuery.js +1 -1
  89. package/layers/support/MultidimensionalSubset.js +1 -1
  90. package/layers/support/TileInfo.js +1 -1
  91. package/layers/support/TileInfoTilemapCache.js +1 -1
  92. package/layers/support/TilemapCache.js +1 -1
  93. package/layers/support/rasterDatasets/multidimensionalUtils.js +1 -1
  94. package/layers/support/rasterDatasets/pamParser.js +1 -1
  95. package/layers/support/rasterDatasets/wcsCoverageParser.js +1 -1
  96. package/layers/support/rasterFormats/Raw.js +1 -1
  97. package/layers/support/rasterFormats/TiffDecoder.js +1 -1
  98. package/layers/support/rasterFunctions/ExtractBandFunction.js +1 -1
  99. package/layers/support/rasterFunctions/colormaps.js +1 -1
  100. package/layers/support/rasterFunctions/pixelUtils.js +1 -1
  101. package/layers/support/rasterFunctions/rasterProjectionHelper.js +1 -1
  102. package/layers/video/VideoController.js +1 -1
  103. package/layers/voxel/VoxelDimension.js +1 -1
  104. package/layers/voxel/VoxelTransferFunctionStyle.js +1 -1
  105. package/layers/voxel/VoxelVolume.js +1 -1
  106. package/package.json +1 -1
  107. package/renderers/support/RasterSymbolizer.js +1 -1
  108. package/renderers/support/colorRampUtils.js +1 -1
  109. package/renderers/visualVariables/support/visualVariableUtils.js +1 -1
  110. package/rest/query/operations/pbfDehydratedFeatureSet.js +1 -1
  111. package/rest/query/operations/pbfJSONFeatureSet.js +1 -1
  112. package/rest/support/generateRendererUtils.js +1 -1
  113. package/smartMapping/raster/renderers/classBreaks.js +1 -1
  114. package/smartMapping/renderers/color.js +1 -1
  115. package/smartMapping/renderers/support/utils.js +1 -1
  116. package/smartMapping/renderers/type.js +1 -1
  117. package/smartMapping/renderers/univariateColorSize.js +1 -1
  118. package/smartMapping/support/adapters/support/utils.js +1 -1
  119. package/statistics/utils.js +1 -1
  120. package/support/revision.js +1 -1
  121. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  122. package/symbols/cim/GeometryWalker.js +1 -1
  123. package/symbols/cim/cimAnalyzer.js +1 -1
  124. package/symbols/cim/effects/EffectArrow.js +1 -1
  125. package/symbols/cim/effects/EffectControlMeasureLine.js +1 -1
  126. package/symbols/support/symbolUtils.js +1 -1
  127. package/views/2d/constraints/ZoomConstraint.js +1 -1
  128. package/views/2d/engine/flow/dataUtils.js +1 -1
  129. package/views/2d/engine/flow/utils.js +1 -1
  130. package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
  131. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  132. package/views/2d/engine/vectorTiles/expression/expression.js +1 -1
  133. package/views/2d/engine/vectorTiles/style/VectorTileSource.js +1 -1
  134. package/views/2d/engine/vectorTiles/tileInfoUtils.js +1 -1
  135. package/views/2d/engine/webgl/TurboLine.js +1 -1
  136. package/views/2d/engine/webgl/mesh/MeshData.js +1 -1
  137. package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
  138. package/views/2d/interactive/editingTools/ControlPointsTransformTool.js +1 -1
  139. package/views/2d/interactive/editingTools/draw/DrawGraphicTool2D.js +1 -1
  140. package/views/2d/layers/BaseLayerView2D.js +1 -1
  141. package/views/2d/layers/BaseLayerViewGL2D.js +1 -1
  142. package/views/2d/layers/BitmapTileLayerView2D.js +1 -1
  143. package/views/2d/layers/MediaLayerView2D.js +1 -1
  144. package/views/2d/layers/TileLayerView2D.js +1 -1
  145. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  146. package/views/2d/layers/WMTSLayerView2D.js +1 -1
  147. package/views/2d/layers/features/support/rendererUtils.js +1 -1
  148. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  149. package/views/2d/layers/support/vectorTileDebugUtils.js +5 -0
  150. package/views/2d/tiling/TileInfoView.js +1 -1
  151. package/views/2d/tiling/TileInfoViewPOT.js +1 -1
  152. package/views/2d/tiling/TileQueue.js +1 -1
  153. package/views/2d/tiling.js +1 -1
  154. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  155. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  156. package/views/3d/interactive/editingTools/moveGraphic/GraphicMoveTool.js +1 -1
  157. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  158. package/views/3d/layers/TiledLayerView3D.js +1 -1
  159. package/views/3d/layers/VectorTileLayerView3D.js +1 -1
  160. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  161. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  162. package/views/3d/layers/support/featureReference.js +1 -1
  163. package/views/3d/support/LaserLineRenderer.js +1 -1
  164. package/views/3d/terrain/Overlay.js +1 -1
  165. package/views/3d/terrain/OverlayFramebufferObject.js +1 -1
  166. package/views/3d/terrain/OverlayRenderTarget.js +1 -1
  167. package/views/3d/terrain/OverlayRenderer.js +1 -1
  168. package/views/3d/terrain/TerrainRenderer.js +1 -1
  169. package/views/3d/terrain/TileCompositor.js +1 -1
  170. package/views/3d/terrain/TileRenderer.js +1 -1
  171. package/views/3d/terrain/TilingScheme.js +1 -1
  172. package/views/3d/webgl-engine/collections/Component/ComponentData.js +1 -1
  173. package/views/3d/webgl-engine/core/shaderModules/interfaces.js +1 -1
  174. package/views/3d/webgl-engine/effects/ScreenSpaceGeometry.js +1 -1
  175. package/views/3d/webgl-engine/effects/SmaaRenderPass.js +1 -1
  176. package/views/3d/webgl-engine/lib/CompositingHelper.js +1 -1
  177. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  178. package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
  179. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  180. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  181. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  182. package/views/3d/webgl-engine/lib/WebGLLayer.js +1 -1
  183. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  184. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  185. package/views/3d/webgl-engine/parts/requireUtils.js +1 -1
  186. package/views/MapView.js +1 -1
  187. package/views/animation/pointToPoint/Path.js +1 -1
  188. package/views/draw/DrawOperation.js +1 -1
  189. package/views/draw/support/Reshape.js +1 -1
  190. package/views/draw/support/createUtils.js +1 -1
  191. package/views/interactive/SegmentLabels.js +1 -1
  192. package/views/interactive/editGeometry/EditGeometry.js +1 -1
  193. package/views/interactive/editGeometry/EditGeometryOperations.js +1 -1
  194. package/views/interactive/editGeometry/operations/UndoGroup.js +1 -1
  195. package/views/layers/GroupLayerView.js +1 -1
  196. package/views/webgl/ProgramCache.js +1 -1
  197. package/webscene/spec-certification/api.js +1 -1
  198. package/webscene/spec-certification/spec.js +1 -1
  199. package/webscene/spec-certification/utils.js +1 -1
  200. package/widgets/BuildingExplorer/BuildingNumericFilterViewModel.js +1 -1
  201. package/widgets/BuildingExplorer/BuildingPhase.js +1 -1
  202. package/widgets/BuildingExplorer/support/validation.js +1 -1
  203. package/widgets/Directions/support/resources.js +1 -1
  204. package/widgets/Directions.js +1 -1
  205. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  206. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  207. package/widgets/FeatureForm/FieldInput.js +1 -1
  208. package/widgets/FeatureForm/FormExpressionsManager.js +1 -1
  209. package/widgets/FeatureForm.js +1 -1
  210. package/widgets/Features.js +1 -1
  211. package/widgets/Histogram/HistogramViewModel.js +1 -1
  212. package/widgets/HistogramRangeSlider/HistogramRangeSliderViewModel.js +1 -1
  213. package/widgets/Legend/styles/Card.js +1 -1
  214. package/widgets/Legend/styles/support/univariateUtils.js +1 -1
  215. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  216. package/widgets/Legend/support/colorRampUtils.js +1 -1
  217. package/widgets/Legend/support/sizeRampUtils.js +1 -1
  218. package/widgets/Legend/support/utils.js +1 -1
  219. package/widgets/Popup.js +1 -1
  220. package/widgets/ScaleRangeSlider/ScaleRangeSliderViewModel.js +1 -1
  221. package/widgets/ScaleRangeSlider/ScaleRanges.js +1 -1
  222. package/widgets/ValuePicker/ValuePickerSlider.js +1 -1
  223. package/widgets/smartMapping/ClassedSizeSlider.js +1 -1
  224. package/widgets/smartMapping/ColorSizeSlider.js +1 -1
  225. package/widgets/smartMapping/HeatmapSlider/HeatmapSliderViewModel.js +1 -1
  226. package/widgets/smartMapping/SizeSlider.js +1 -1
  227. package/widgets/smartMapping/SmartMappingPrimaryHandleSliderViewModel.js +1 -1
  228. package/widgets/smartMapping/SmartMappingSliderViewModel.js +1 -1
  229. package/assets/esri/core/workers/chunks/0210f4c2e1f3ed13041b.js +0 -1
  230. package/assets/esri/core/workers/chunks/07bb40162d97d098bc19.js +0 -1
  231. package/assets/esri/core/workers/chunks/0a18317566c1fcb68422.js +0 -1
  232. package/assets/esri/core/workers/chunks/0de65e03db8c611af9fb.js +0 -1
  233. package/assets/esri/core/workers/chunks/1a60d23a92bcf91dbb22.js +0 -1
  234. package/assets/esri/core/workers/chunks/205a0b34b698d5329854.js +0 -1
  235. package/assets/esri/core/workers/chunks/25211d5904ee9d5f4a9d.js +0 -1
  236. package/assets/esri/core/workers/chunks/26b12d1ea713c1e07701.js +0 -1
  237. package/assets/esri/core/workers/chunks/2bfa7ee324c32a56b0d3.js +0 -1
  238. package/assets/esri/core/workers/chunks/4510a17839405146130b.js +0 -1
  239. package/assets/esri/core/workers/chunks/524156c3f5383c2dd0e3.js +0 -1
  240. package/assets/esri/core/workers/chunks/59666ecb7c2c1f5a13b2.js +0 -1
  241. package/assets/esri/core/workers/chunks/5c005c9514354c77ec27.js +0 -1
  242. package/assets/esri/core/workers/chunks/620ec5c75561183d3d73.js +0 -1
  243. package/assets/esri/core/workers/chunks/68512670816f59c0e6a5.js +0 -1
  244. package/assets/esri/core/workers/chunks/6c7374ebc18b46b3480a.js +0 -1
  245. package/assets/esri/core/workers/chunks/75ba2af92da232067adb.js +0 -1
  246. package/assets/esri/core/workers/chunks/7c1f0598a016516dcec3.js +0 -1
  247. package/assets/esri/core/workers/chunks/8dcec8d1b670d2b7ea2b.js +0 -1
  248. package/assets/esri/core/workers/chunks/8e07dfb6fc2673b640cb.js +0 -1
  249. package/assets/esri/core/workers/chunks/9050b167355588b7003d.js +0 -1
  250. package/assets/esri/core/workers/chunks/9230d68799f0b0b9ef36.js +0 -1
  251. package/assets/esri/core/workers/chunks/af4083f2aad5f5d49dde.js +0 -1
  252. package/assets/esri/core/workers/chunks/b0a57718a0765d1c8df0.js +0 -1
  253. package/assets/esri/core/workers/chunks/b431b81a7bf45dd527da.js +0 -1
  254. package/assets/esri/core/workers/chunks/bda311ad48efdb265939.js +0 -1
  255. package/assets/esri/core/workers/chunks/d5cce09fbe16cbb8fee4.js +0 -1
  256. package/assets/esri/core/workers/chunks/da547c3cabe4a89c3ce6.js +0 -1
  257. package/assets/esri/core/workers/chunks/dd295fa57b45b7ec4ec5.js +0 -1
  258. package/assets/esri/core/workers/chunks/f553b464e969d45bf451.js +0 -1
  259. package/assets/esri/core/workers/chunks/f5865294983eb160de8c.js +0 -1
  260. package/assets/esri/core/workers/chunks/fdb7b1fbdb6fe091ad83.js +0 -1
  261. package/views/2d/tiling/PagedTileQueue.js +0 -5
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6610],{97575:(t,e,r)=>{r.d(e,{J:()=>l});var o,n,i,s=r(5732),a={exports:{}};o=a,n=function(){var t=function(){function t(t){this.message="JPEG error: "+t}return t.prototype=new Error,t.prototype.name="JpegError",t.constructor=t,t}();return function(){if(!self||!self.Uint8ClampedArray)return null;var e=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,o=799,n=3406,i=2276,s=1567,a=3784,l=5793,u=2896;function c(){this.decodeTransform=null,this.colorTransform=-1}function h(t,e){for(var r,o,n=0,i=[],s=16;s>0&&!t[s-1];)s--;i.push({children:[],index:0});var a,l=i[0];for(r=0;r<s;r++){for(o=0;o<t[r];o++){for((l=i.pop()).children[l.index]=e[n];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;n++}r+1<s&&(i.push(a={children:[],index:0}),l.children[l.index]=a.children,l=a)}return i[0].children}function f(t,e,r){return 64*((t.blocksPerLine+1)*e+r)}function d(r,o,n,i,s,a,l,u,c){var h=n.mcusPerLine,d=n.progressive,p=o,m=0,y=0;function w(){if(y>0)return y--,m>>y&1;if(255===(m=r[o++])){var e=r[o++];if(e)throw new t("unexpected marker "+(m<<8|e).toString(16))}return y=7,m>>>7}function b(e){for(var r=e;;){if("number"==typeof(r=r[w()]))return r;if("object"!=typeof r)throw new t("invalid huffman sequence")}}function C(t){for(var e=0;t>0;)e=e<<1|w(),t--;return e}function v(t){if(1===t)return 1===w()?1:-1;var e=C(t);return e>=1<<t-1?e:e+(-1<<t)+1}var x,k=0,A=0;function S(t,e,r,o,n){var i=r%h;e(t,f(t,(r/h|0)*t.v+o,i*t.h+n))}function T(t,e,r){e(t,f(t,r/t.blocksPerLine|0,r%t.blocksPerLine))}var I,M,P,E,R,L,U=i.length;L=d?0===a?0===u?function(t,e){var r=b(t.huffmanTableDC),o=0===r?0:v(r)<<c;t.blockData[e]=t.pred+=o}:function(t,e){t.blockData[e]|=w()<<c}:0===u?function(t,r){if(k>0)k--;else for(var o=a,n=l;o<=n;){var i=b(t.huffmanTableAC),s=15&i,u=i>>4;if(0!==s){var h=e[o+=u];t.blockData[r+h]=v(s)*(1<<c),o++}else{if(u<15){k=C(u)+(1<<u)-1;break}o+=16}}}:function(r,o){for(var n,i,s=a,u=l,h=0;s<=u;){var f=e[s];switch(A){case 0:if(h=(i=b(r.huffmanTableAC))>>4,0==(n=15&i))h<15?(k=C(h)+(1<<h),A=4):(h=16,A=1);else{if(1!==n)throw new t("invalid ACn encoding");x=v(n),A=h?2:3}continue;case 1:case 2:r.blockData[o+f]?r.blockData[o+f]+=w()<<c:0==--h&&(A=2===A?3:0);break;case 3:r.blockData[o+f]?r.blockData[o+f]+=w()<<c:(r.blockData[o+f]=x<<c,A=0);break;case 4:r.blockData[o+f]&&(r.blockData[o+f]+=w()<<c)}s++}4===A&&0==--k&&(A=0)}:function(t,r){var o=b(t.huffmanTableDC),n=0===o?0:v(o);t.blockData[r]=t.pred+=n;for(var i=1;i<64;){var s=b(t.huffmanTableAC),a=15&s,l=s>>4;if(0!==a){var u=e[i+=l];t.blockData[r+u]=v(a),i++}else{if(l<15)break;i+=16}}};var O,D,G,B,_=0;for(D=1===U?i[0].blocksPerLine*i[0].blocksPerColumn:h*n.mcusPerColumn;_<D;){var N=s?Math.min(D-_,s):D;for(M=0;M<U;M++)i[M].pred=0;if(k=0,1===U)for(I=i[0],R=0;R<N;R++)T(I,L,_),_++;else for(R=0;R<N;R++){for(M=0;M<U;M++)for(G=(I=i[M]).h,B=I.v,P=0;P<B;P++)for(E=0;E<G;E++)S(I,L,_,P,E);_++}y=0,(O=g(r,o))&&O.invalid&&(console.log("decodeScan - unexpected MCU data, next marker is: "+O.invalid),o=O.offset);var F=O&&O.marker;if(!F||F<=65280)throw new t("marker was not found");if(!(F>=65488&&F<=65495))break;o+=2}return(O=g(r,o))&&O.invalid&&(console.log("decodeScan - unexpected Scan data, next marker is: "+O.invalid),o=O.offset),o-p}function p(e,c,h){var f,d,p,m,g,y,w,b,C,v,x,k,A,S,T,I,M,P=e.quantizationTable,E=e.blockData;if(!P)throw new t("missing required Quantization Table.");for(var R=0;R<64;R+=8)C=E[c+R],v=E[c+R+1],x=E[c+R+2],k=E[c+R+3],A=E[c+R+4],S=E[c+R+5],T=E[c+R+6],I=E[c+R+7],C*=P[R],0!=(v|x|k|A|S|T|I)?(v*=P[R+1],x*=P[R+2],k*=P[R+3],A*=P[R+4],S*=P[R+5],T*=P[R+6],I*=P[R+7],d=(f=(f=l*C+128>>8)+(d=l*A+128>>8)+1>>1)-d,M=(p=x)*a+(m=T)*s+128>>8,p=p*s-m*a+128>>8,w=(g=(g=u*(v-I)+128>>8)+(w=S<<4)+1>>1)-w,y=(b=(b=u*(v+I)+128>>8)+(y=k<<4)+1>>1)-y,m=(f=f+(m=M)+1>>1)-m,p=(d=d+p+1>>1)-p,M=g*i+b*n+2048>>12,g=g*n-b*i+2048>>12,b=M,M=y*o+w*r+2048>>12,y=y*r-w*o+2048>>12,w=M,h[R]=f+b,h[R+7]=f-b,h[R+1]=d+w,h[R+6]=d-w,h[R+2]=p+y,h[R+5]=p-y,h[R+3]=m+g,h[R+4]=m-g):(M=l*C+512>>10,h[R]=M,h[R+1]=M,h[R+2]=M,h[R+3]=M,h[R+4]=M,h[R+5]=M,h[R+6]=M,h[R+7]=M);for(var L=0;L<8;++L)C=h[L],0!=((v=h[L+8])|(x=h[L+16])|(k=h[L+24])|(A=h[L+32])|(S=h[L+40])|(T=h[L+48])|(I=h[L+56]))?(d=(f=4112+((f=l*C+2048>>12)+(d=l*A+2048>>12)+1>>1))-d,M=(p=x)*a+(m=T)*s+2048>>12,p=p*s-m*a+2048>>12,m=M,w=(g=(g=u*(v-I)+2048>>12)+(w=S)+1>>1)-w,y=(b=(b=u*(v+I)+2048>>12)+(y=k)+1>>1)-y,M=g*i+b*n+2048>>12,g=g*n-b*i+2048>>12,b=M,M=y*o+w*r+2048>>12,y=y*r-w*o+2048>>12,C=(C=(f=f+m+1>>1)+b)<16?0:C>=4080?255:C>>4,v=(v=(d=d+p+1>>1)+(w=M))<16?0:v>=4080?255:v>>4,x=(x=(p=d-p)+y)<16?0:x>=4080?255:x>>4,k=(k=(m=f-m)+g)<16?0:k>=4080?255:k>>4,A=(A=m-g)<16?0:A>=4080?255:A>>4,S=(S=p-y)<16?0:S>=4080?255:S>>4,T=(T=d-w)<16?0:T>=4080?255:T>>4,I=(I=f-b)<16?0:I>=4080?255:I>>4,E[c+L]=C,E[c+L+8]=v,E[c+L+16]=x,E[c+L+24]=k,E[c+L+32]=A,E[c+L+40]=S,E[c+L+48]=T,E[c+L+56]=I):(M=(M=l*C+8192>>14)<-2040?0:M>=2024?255:M+2056>>4,E[c+L]=M,E[c+L+8]=M,E[c+L+16]=M,E[c+L+24]=M,E[c+L+32]=M,E[c+L+40]=M,E[c+L+48]=M,E[c+L+56]=M)}function m(t,e){for(var r=e.blocksPerLine,o=e.blocksPerColumn,n=new Int16Array(64),i=0;i<o;i++)for(var s=0;s<r;s++)p(e,f(e,i,s),n);return e.blockData}function g(t,e,r){function o(e){return t[e]<<8|t[e+1]}var n=t.length-1,i=r<e?r:e;if(e>=n)return null;var s=o(e);if(s>=65472&&s<=65534)return{invalid:null,marker:s,offset:e};for(var a=o(i);!(a>=65472&&a<=65534);){if(++i>=n)return null;a=o(i)}return{invalid:s.toString(16),marker:a,offset:i}}return c.prototype={parse:function(r){function o(){var t=r[l]<<8|r[l+1];return l+=2,t}function n(){var t=o(),e=l+t-2,n=g(r,e,l);n&&n.invalid&&(console.log("readDataBlock - incorrect length, next marker is: "+n.invalid),e=n.offset);var i=r.subarray(l,e);return l+=i.length,i}function i(t){for(var e=Math.ceil(t.samplesPerLine/8/t.maxH),r=Math.ceil(t.scanLines/8/t.maxV),o=0;o<t.components.length;o++){_=t.components[o];var n=Math.ceil(Math.ceil(t.samplesPerLine/8)*_.h/t.maxH),i=Math.ceil(Math.ceil(t.scanLines/8)*_.v/t.maxV),s=e*_.h,a=r*_.v*64*(s+1);_.blockData=new Int16Array(a),_.blocksPerLine=n,_.blocksPerColumn=i}t.mcusPerLine=e,t.mcusPerColumn=r}var s,a,l=0,u=null,c=null,f=[],p=[],y=[],w=o();if(65496!==w)throw new t("SOI not found");for(w=o();65497!==w;){var b,C,v;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 x=n();65504===w&&74===x[0]&&70===x[1]&&73===x[2]&&70===x[3]&&0===x[4]&&(u={version:{major:x[5],minor:x[6]},densityUnits:x[7],xDensity:x[8]<<8|x[9],yDensity:x[10]<<8|x[11],thumbWidth:x[12],thumbHeight:x[13],thumbData:x.subarray(14,14+3*x[12]*x[13])}),65518===w&&65===x[0]&&100===x[1]&&111===x[2]&&98===x[3]&&101===x[4]&&(c={version:x[5]<<8|x[6],flags0:x[7]<<8|x[8],flags1:x[9]<<8|x[10],transformCode:x[11]});break;case 65499:for(var k=o()+l-2;l<k;){var A=r[l++],S=new Uint16Array(64);if(A>>4==0)for(C=0;C<64;C++)S[e[C]]=r[l++];else{if(A>>4!=1)throw new t("DQT - invalid table spec");for(C=0;C<64;C++)S[e[C]]=o()}f[15&A]=S}break;case 65472:case 65473:case 65474:if(s)throw new t("Only single frame JPEGs supported");o(),(s={}).extended=65473===w,s.progressive=65474===w,s.precision=r[l++],s.scanLines=o(),s.samplesPerLine=o(),s.components=[],s.componentIds={};var T,I=r[l++],M=0,P=0;for(b=0;b<I;b++){T=r[l];var E=r[l+1]>>4,R=15&r[l+1];M<E&&(M=E),P<R&&(P=R);var L=r[l+2];v=s.components.push({h:E,v:R,quantizationId:L,quantizationTable:null}),s.componentIds[T]=v-1,l+=3}s.maxH=M,s.maxV=P,i(s);break;case 65476:var U=o();for(b=2;b<U;){var O=r[l++],D=new Uint8Array(16),G=0;for(C=0;C<16;C++,l++)G+=D[C]=r[l];var B=new Uint8Array(G);for(C=0;C<G;C++,l++)B[C]=r[l];b+=17+G,(O>>4==0?y:p)[15&O]=h(D,B)}break;case 65501:o(),a=o();break;case 65498:o();var _,N=r[l++],F=[];for(b=0;b<N;b++){var V=s.componentIds[r[l++]];_=s.components[V];var z=r[l++];_.huffmanTableDC=y[z>>4],_.huffmanTableAC=p[15&z],F.push(_)}var j=r[l++],Z=r[l++],W=r[l++],J=d(r,l,s,F,a,j,Z,W>>4,15&W);l+=J;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 t("unknown marker "+w.toString(16))}w=o()}for(this.width=s.samplesPerLine,this.height=s.scanLines,this.jfif=u,this.eof=l,this.adobe=c,this.components=[],b=0;b<s.components.length;b++){var H=f[(_=s.components[b]).quantizationId];H&&(_.quantizationTable=H),this.components.push({output:m(0,_),scaleX:_.h/s.maxH,scaleY:_.v/s.maxV,blocksPerLine:_.blocksPerLine,blocksPerColumn:_.blocksPerColumn})}this.numComponents=this.components.length},_getLinearizedBlockData:function(t,e){var r,o,n,i,s,a,l,u,c,h,f,d=this.width/t,p=this.height/e,m=0,g=this.components.length,y=t*e*g,w=new Uint8ClampedArray(y),b=new Uint32Array(t),C=4294967288;for(l=0;l<g;l++){for(o=(r=this.components[l]).scaleX*d,n=r.scaleY*p,m=l,f=r.output,i=r.blocksPerLine+1<<3,s=0;s<t;s++)u=0|s*o,b[s]=(u&C)<<3|7&u;for(a=0;a<e;a++)for(h=i*((u=0|a*n)&C)|(7&u)<<3,s=0;s<t;s++)w[m]=f[h+b[s]],m+=g}var v=this.decodeTransform;if(v)for(l=0;l<y;)for(u=0,c=0;u<g;u++,l++,c+=2)w[l]=(w[l]*v[c]>>8)+v[c+1];return w},_isColorConversionNeeded:function(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this.colorTransform:1===this.colorTransform},_convertYccToRgb:function(t){for(var e,r,o,n=0,i=t.length;n<i;n+=3)e=t[n],r=t[n+1],o=t[n+2],t[n]=e-179.456+1.402*o,t[n+1]=e+135.459-.344*r-.714*o,t[n+2]=e-226.816+1.772*r;return t},_convertYcckToRgb:function(t){for(var e,r,o,n,i=0,s=0,a=t.length;s<a;s+=4)e=t[s],r=t[s+1],o=t[s+2],n=t[s+3],t[i++]=r*(-660635669420364e-19*r+.000437130475926232*o-54080610064599e-18*e+.00048449797120281*n-.154362151871126)-122.67195406894+o*(-.000957964378445773*o+.000817076911346625*e-.00477271405408747*n+1.53380253221734)+e*(.000961250184130688*e-.00266257332283933*n+.48357088451265)+n*(-.000336197177618394*n+.484791561490776),t[i++]=107.268039397724+r*(219927104525741e-19*r-.000640992018297945*o+.000659397001245577*e+.000426105652938837*n-.176491792462875)+o*(-.000778269941513683*o+.00130872261408275*e+.000770482631801132*n-.151051492775562)+e*(.00126935368114843*e-.00265090189010898*n+.25802910206845)+n*(-.000318913117588328*n-.213742400323665),t[i++]=r*(-.000570115196973677*r-263409051004589e-19*o+.0020741088115012*e-.00288260236853442*n+.814272968359295)-20.810012546947+o*(-153496057440975e-19*o-.000132689043961446*e+.000560833691242812*n-.195152027534049)+e*(.00174418132927582*e-.00255243321439347*n+.116935020465145)+n*(-.000343531996510555*n+.24165260232407);return t},_convertYcckToCmyk:function(t){for(var e,r,o,n=0,i=t.length;n<i;n+=4)e=t[n],r=t[n+1],o=t[n+2],t[n]=434.456-e-1.402*o,t[n+1]=119.541-e+.344*r+.714*o,t[n+2]=481.816-e-1.772*r;return t},_convertCmykToRgb:function(t){for(var e,r,o,n,i=0,s=1/255,a=0,l=t.length;a<l;a+=4)e=t[a]*s,r=t[a+1]*s,o=t[a+2]*s,n=t[a+3]*s,t[i++]=255+e*(-4.387332384609988*e+54.48615194189176*r+18.82290502165302*o+212.25662451639585*n-285.2331026137004)+r*(1.7149763477362134*r-5.6096736904047315*o-17.873870861415444*n-5.497006427196366)+o*(-2.5217340131683033*o-21.248923337353073*n+17.5119270841813)-n*(21.86122147463605*n+189.48180835922747),t[i++]=255+e*(8.841041422036149*e+60.118027045597366*r+6.871425592049007*o+31.159100130055922*n-79.2970844816548)+r*(-15.310361306967817*r+17.575251261109482*o+131.35250912493976*n-190.9453302588951)+o*(4.444339102852739*o+9.8632861493405*n-24.86741582555878)-n*(20.737325471181034*n+187.80453709719578),t[i++]=255+e*(.8842522430003296*e+8.078677503112928*r+30.89978309703729*o-.23883238689178934*n-14.183576799673286)+r*(10.49593273432072*r+63.02378494754052*o+50.606957656360734*n-112.23884253719248)+o*(.03296041114873217*o+115.60384449646641*n-193.58209356861505)-n*(22.33816807309886*n+180.12613974708367);return t},getData:function(e,r,o){if(this.numComponents>4)throw new t("Unsupported color mode");var n=this._getLinearizedBlockData(e,r);if(1===this.numComponents&&o){for(var i=n.length,s=new Uint8ClampedArray(3*i),a=0,l=0;l<i;l++){var u=n[l];s[a++]=u,s[a++]=u,s[a++]=u}return s}if(3===this.numComponents&&this._isColorConversionNeeded())return this._convertYccToRgb(n);if(4===this.numComponents){if(this._isColorConversionNeeded())return o?this._convertYcckToRgb(n):this._convertYcckToCmyk(n);if(o)return this._convertCmykToRgb(n)}return n}},c}()},void 0!==(i=n())&&(o.exports=i);const l=(0,s.g)(a.exports)},80899:(t,e,r)=>{r.d(e,{Z:()=>l});var o,n,i,s=r(5732),a={exports:{}};n=a,void 0!==(o=function(){function t(){this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=null}return t.prototype={ensureBuffer:function(t){var e=this.buffer,r=e?e.byteLength:0;if(t<r)return e;for(var o=512;o<t;)o<<=1;for(var n=new Uint8Array(o),i=0;i<r;++i)n[i]=e[i];return this.buffer=n},getByte:function(){for(var t=this.pos;this.bufferLength<=t;){if(this.eof)return null;this.readBlock()}return this.buffer[this.pos++]},getBytes:function(t){var e=this.pos;if(t){this.ensureBuffer(e+t);for(var r=e+t;!this.eof&&this.bufferLength<r;)this.readBlock();var o=this.bufferLength;r>o&&(r=o)}else{for(;!this.eof;)this.readBlock();r=this.bufferLength}return this.pos=r,this.buffer.subarray(e,r)},lookChar:function(){for(var t=this.pos;this.bufferLength<=t;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos])},getChar:function(){for(var t=this.pos;this.bufferLength<=t;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos++])},makeSubStream:function(t,e,r){for(var o=t+e;this.bufferLength<=o&&!this.eof;)this.readBlock();return new Stream(this.buffer,t,e,r)},skip:function(t){t||(t=1),this.pos+=t},reset:function(){this.pos=0}},t}(),i=function(){if(!self||!self.Uint32Array)return null;var t=new Uint32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),e=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]),n=[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(t){throw new Error(t)}function a(t){var e=0,r=t[e++],n=t[e++];-1!=r&&-1!=n||s("Invalid header in flate stream"),8!=(15&r)&&s("Unknown compression method in flate stream"),((r<<8)+n)%31!=0&&s("Bad FCHECK in flate stream"),32&n&&s("FDICT bit set in flate stream"),this.bytes=t,this.bytesPos=2,this.codeSize=0,this.codeBuf=0,o.call(this)}return a.prototype=Object.create(o.prototype),a.prototype.getBits=function(t){for(var e,r=this.codeSize,o=this.codeBuf,n=this.bytes,i=this.bytesPos;r<t;)void 0===(e=n[i++])&&s("Bad encoding in flate stream"),o|=e<<r,r+=8;return e=o&(1<<t)-1,this.codeBuf=o>>t,this.codeSize=r-=t,this.bytesPos=i,e},a.prototype.getCode=function(t){for(var e=t[0],r=t[1],o=this.codeSize,n=this.codeBuf,i=this.bytes,a=this.bytesPos;o<r;){var l;void 0===(l=i[a++])&&s("Bad encoding in flate stream"),n|=l<<o,o+=8}var u=e[n&(1<<r)-1],c=u>>16,h=65535&u;return(0==o||o<c||0==c)&&s("Bad encoding in flate stream"),this.codeBuf=n>>c,this.codeSize=o-c,this.bytesPos=a,h},a.prototype.generateHuffmanTable=function(t){for(var e=t.length,r=0,o=0;o<e;++o)t[o]>r&&(r=t[o]);for(var n=1<<r,i=new Uint32Array(n),s=1,a=0,l=2;s<=r;++s,a<<=1,l<<=1)for(var u=0;u<e;++u)if(t[u]==s){var c=0,h=a;for(o=0;o<s;++o)c=c<<1|1&h,h>>=1;for(o=c;o<n;o+=l)i[o]=s<<16|u;++a}return[i,r]},a.prototype.readBlock=function(){function o(t,e,r,o,n){for(var i=t.getBits(r)+o;i-- >0;)e[p++]=n}var a=this.getBits(3);if(1&a&&(this.eof=!0),0!=(a>>=1)){var l,u;if(1==a)l=n,u=i;else if(2==a){for(var c=this.getBits(5)+257,h=this.getBits(5)+1,f=this.getBits(4)+4,d=Array(t.length),p=0;p<f;)d[t[p++]]=this.getBits(3);for(var m=this.generateHuffmanTable(d),g=0,y=(p=0,c+h),w=new Array(y);p<y;){var b=this.getCode(m);16==b?o(this,w,2,3,g):17==b?o(this,w,3,3,g=0):18==b?o(this,w,7,11,g=0):w[p++]=g=b}l=this.generateHuffmanTable(w.slice(0,c)),u=this.generateHuffmanTable(w.slice(c,y))}else s("Unknown block type in flate stream");for(var C=(L=this.buffer)?L.length:0,v=this.bufferLength;;){var x=this.getCode(l);if(x<256)v+1>=C&&(C=(L=this.ensureBuffer(v+1)).length),L[v++]=x;else{if(256==x)return void(this.bufferLength=v);var k=(x=e[x-=257])>>16;k>0&&(k=this.getBits(k)),g=(65535&x)+k,x=this.getCode(u),(k=(x=r[x])>>16)>0&&(k=this.getBits(k));var A=(65535&x)+k;v+g>=C&&(C=(L=this.ensureBuffer(v+g)).length);for(var S=0;S<g;++S,++v)L[v]=L[v-A]}}}else{var T,I=this.bytes,M=this.bytesPos;void 0===(T=I[M++])&&s("Bad block header in flate stream");var P=T;void 0===(T=I[M++])&&s("Bad block header in flate stream"),P|=T<<8,void 0===(T=I[M++])&&s("Bad block header in flate stream");var E=T;void 0===(T=I[M++])&&s("Bad block header in flate stream"),(E|=T<<8)!=(65535&~P)&&s("Bad uncompressed block length in flate stream"),this.codeBuf=0,this.codeSize=0;var R=this.bufferLength,L=this.ensureBuffer(R+P),U=R+P;this.bufferLength=U;for(var O=R;O<U;++O){if(void 0===(T=I[M++])){this.eof=!0;break}L[O]=T}this.bytesPos=M}},a}())&&(n.exports=i);const l=(0,s.g)(a.exports)},3892:(t,e,r)=>{function o(t){return"h"in t&&"s"in t&&"v"in t}function n(t){return"l"in t&&"a"in t&&"b"in t}function i(t){return"l"in t&&"c"in t&&"h"in t}r.d(e,{Y3:()=>m,_Y:()=>p,sJ:()=>g,xr:()=>d}),r(22303),r(88669);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(t,e){const r=[];let o,n;if(t[0].length!==e.length)throw new Error("dimensions do not match");const i=t.length,s=t[0].length;let a=0;for(o=0;o<i;o++){for(a=0,n=0;n<s;n++)a+=t[o][n]*e[n];r.push(a)}return r}function u(t){const e=[t.r/255,t.g/255,t.b/255].map((t=>t<=.04045?t/12.92:((t+.055)/1.055)**2.4)),r=l(s,e);return{x:100*r[0],y:100*r[1],z:100*r[2]}}function c(t){const e=l(a,[t.x/100,t.y/100,t.z/100]).map((t=>{const e=t<=.0031308?12.92*t:1.055*t**(1/2.4)-.055;return Math.min(1,Math.max(e,0))}));return{r:Math.round(255*e[0]),g:Math.round(255*e[1]),b:Math.round(255*e[2])}}function h(t){const e=[t.x/95.047,t.y/100,t.z/108.883].map((t=>t>(6/29)**3?t**(1/3):1/3*(29/6)**2*t+4/29));return{l:116*e[1]-16,a:500*(e[0]-e[1]),b:200*(e[1]-e[2])}}function f(t){const e=t.l,r=[(e+16)/116+t.a/500,(e+16)/116,(e+16)/116-t.b/200].map((t=>t>6/29?t**3:3*(6/29)**2*(t-4/29)));return{x:95.047*r[0],y:100*r[1],z:108.883*r[2]}}function d(t){return function(t){return"r"in t&&"g"in t&&"b"in t}(t)?t:i(t)?function(t){return c(f(function(t){const e=t.l,r=t.c,o=t.h;return{l:e,a:r*Math.cos(o),b:r*Math.sin(o)}}(t)))}(t):n(t)?function(t){return c(f(t))}(t):function(t){return"x"in t&&"y"in t&&"z"in t}(t)?c(t):o(t)?function(t){const e=(t.h+360)%360/60,r=t.s/100,o=t.v/100*255,n=o*r,i=n*(1-Math.abs(e%2-1));let s;switch(Math.floor(e)){case 0:s={r:n,g:i,b:0};break;case 1:s={r:i,g:n,b:0};break;case 2:s={r:0,g:n,b:i};break;case 3:s={r:0,g:i,b:n};break;case 4:s={r:i,g:0,b:n};break;case 5:case 6:s={r:n,g:0,b:i};break;default:s={r:0,g:0,b:0}}return s.r=Math.round(s.r+o-n),s.g=Math.round(s.g+o-n),s.b=Math.round(s.b+o-n),s}(t):t}function p(t){return o(t)?t:function(t){const e=t.r,r=t.g,o=t.b,n=Math.max(e,r,o),i=n-Math.min(e,r,o);let s=n,a=0===i?0:n===e?(r-o)/i%6:n===r?(o-e)/i+2:(e-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(t))}function m(t){return n(t)?t:function(t){return h(u(t))}(d(t))}function g(t){return i(t)?t:function(t){return function(t){const e=t.l,r=t.a,o=t.b,n=Math.sqrt(r*r+o*o);let i=Math.atan2(o,r);return i=i>0?i:i+2*Math.PI,{l:e,c:n,h:i}}(h(u(t)))}(d(t))}},5847:(t,e,r)=>{r.d(e,{Z:()=>m});var o=r(43697),n=r(20102),i=r(96674),s=r(22974),a=r(92604),l=r(5600),u=r(90578),c=r(52011);class h{constructor(t=null,e=null,r=null){this.minValue=t,this.maxValue=e,this.noDataValue=r}}var f,d=r(81578);let p=f=class extends i.wq{static createEmptyBand(t,e){return new(f.getPixelArrayConstructor(t))(e)}static getPixelArrayConstructor(t){let e;switch(t){case"u1":case"u2":case"u4":case"u8":e=Uint8Array;break;case"u16":e=Uint16Array;break;case"u32":e=Uint32Array;break;case"s8":e=Int8Array;break;case"s16":e=Int16Array;break;case"s32":e=Int32Array;break;case"f32":case"c64":case"c128":case"unknown":e=Float32Array;break;case"f64":e=Float64Array}return e}constructor(t){super(t),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(t){if(!t)return"f32";let e=t.toLowerCase();return["u1","u2","u4"].includes(e)?e="u8":["unknown","u8","s8","u16","s16","u32","s32","f32","f64"].includes(e)||(e="f32"),e}getPlaneCount(){return this.pixels?.length}addData(t){if(!t.pixels||t.pixels.length!==this.width*this.height)throw new n.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(t.pixels),this.statistics.push(t.statistics??new h)}getAsRGBA(){const t=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(t);break;default:this._fillFrom8Bit(t)}return new Uint8ClampedArray(t)}getAsRGBAFloat(){const t=new Float32Array(this.width*this.height*4);return this._fillFrom32Bit(t),t}updateStatistics(){if(!this.pixels)return;this.statistics=this.pixels.map((t=>this._calculateBandStatistics(t,this.mask)));const t=this.mask;let e=0;if(null!=t)for(let r=0;r<t.length;r++)t[r]&&e++;else e=this.width*this.height;this.validPixelCount=e}clamp(t){if(!t||"f64"===t||"f32"===t||!this.pixels)return;const[e,r]=(0,d.r)(t),o=this.pixels,n=this.width*this.height,i=o.length;let s,a,l;const u=[];for(let c=0;c<i;c++){l=f.createEmptyBand(t,n),s=o[c];for(let t=0;t<n;t++)a=s[t],l[t]=a>r?r:a<e?e:a;u.push(l)}this.pixels=u,this.pixelType=t}extractBands(t){const{pixels:e,statistics:r}=this;if(null==t||0===t.length||!e||0===e.length)return this;const o=e.length,n=t.some((t=>t>=e.length)),i=o===t.length&&!t.some(((t,e)=>t!==e));if(n||i)return this;const s=this.bandMasks?.length===o?t.map((t=>this.bandMasks[t])):void 0;let{mask:a,validPixelCount:l}=this;const{width:u,height:c}=this;if(s){if(1===s.length)a=s[0];else{const t=u*c;a=new Uint8Array(t).fill(255);for(let e=0;e<s.length;e++){const r=s[e];for(let e=0;e<t;e++)r[e]||(a[e]=0)}}l=a.filter((t=>!!t)).length}return new f({pixelType:this.pixelType,width:u,height:c,mask:a,bandMasks:s,validPixelCount:l,maskIsAlpha:this.maskIsAlpha,pixels:t.map((t=>e[t])),statistics:r&&t.map((t=>r[t]))})}clone(){const t=new f({width:this.width,height:this.height,pixelType:this.pixelType,maskIsAlpha:this.maskIsAlpha,validPixelCount:this.validPixelCount});let e;null!=this.mask&&(this.mask instanceof Uint8Array?t.mask=new Uint8Array(this.mask):t.mask=this.mask.slice(0)),this.bandMasks&&(t.bandMasks=this.bandMasks.map((t=>new Uint8Array(t))));const r=f.getPixelArrayConstructor(this.pixelType);if(this.pixels&&this.pixels.length>0){t.pixels=[];const o=!!this.pixels[0].slice;for(e=0;e<this.pixels.length;e++)t.pixels[e]=o?this.pixels[e].slice(0,this.pixels[e].length):new r(this.pixels[e])}if(this.statistics)for(t.statistics=[],e=0;e<this.statistics.length;e++)t.statistics[e]=(0,s.d9)(this.statistics[e]);return t.premultiplyAlpha=this.premultiplyAlpha,t}_fillFrom8Bit(t){const{mask:e,maskIsAlpha:r,premultiplyAlpha:o,pixels:n}=this;if(!t||!n||!n.length)return void a.Z.getLogger(this).error("getAsRGBA()","Unable to convert to RGBA. The input pixel block is empty.");let i,s,l,u;i=s=l=n[0],n.length>=3?(s=n[1],l=n[2]):2===n.length&&(s=n[1]);const c=new Uint32Array(t),h=this.width*this.height;if(i.length===h)if(null!=e&&e.length===h)if(r)for(u=0;u<h;u++){const t=e[u];if(t){const e=t/255;c[u]=o?t<<24|l[u]*e<<16|s[u]*e<<8|i[u]*e:t<<24|l[u]<<16|s[u]<<8|i[u]}}else for(u=0;u<h;u++)e[u]&&(c[u]=255<<24|l[u]<<16|s[u]<<8|i[u]);else for(u=0;u<h;u++)c[u]=255<<24|l[u]<<16|s[u]<<8|i[u];else a.Z.getLogger(this).error("getAsRGBA()","Unable to convert to RGBA. The pixelblock is invalid.")}_fillFromNon8Bit(t){const{pixels:e,mask:r,statistics:o}=this;if(!t||!e||!e.length)return void a.Z.getLogger(this).error("getAsRGBA()","Unable to convert to RGBA. The input pixel block is empty.");const n=this.pixelType;let i=1,s=0,l=1;if(o&&o.length>0){for(const t of o)if(null!=t.minValue&&(s=Math.min(s,t.minValue)),null!=t.maxValue&&null!=t.minValue){const e=t.maxValue-t.minValue;l=Math.max(l,e)}i=255/l}else{let t=255;"s8"===n?(s=-128,t=127):"u16"===n?t=65535:"s16"===n?(s=-32768,t=32767):"u32"===n?t=4294967295:"s32"===n?(s=-2147483648,t=2147483647):"f32"===n?(s=-34e38,t=34e38):"f64"===n&&(s=-Number.MAX_VALUE,t=Number.MAX_VALUE),i=255/(t-s)}const u=new Uint32Array(t),c=this.width*this.height;let h,f,d,p,m;if(h=f=d=e[0],h.length!==c)return a.Z.getLogger(this).error("getAsRGBA()","Unable to convert to RGBA. The pixelblock is invalid.");if(e.length>=2)if(f=e[1],e.length>=3&&(d=e[2]),null!=r&&r.length===c)for(p=0;p<c;p++)r[p]&&(u[p]=255<<24|(d[p]-s)*i<<16|(f[p]-s)*i<<8|(h[p]-s)*i);else for(p=0;p<c;p++)u[p]=255<<24|(d[p]-s)*i<<16|(f[p]-s)*i<<8|(h[p]-s)*i;else if(null!=r&&r.length===c)for(p=0;p<c;p++)m=(h[p]-s)*i,r[p]&&(u[p]=255<<24|m<<16|m<<8|m);else for(p=0;p<c;p++)m=(h[p]-s)*i,u[p]=255<<24|m<<16|m<<8|m}_fillFrom32Bit(t){const{pixels:e,mask:r}=this;if(!t||!e||!e.length)return a.Z.getLogger(this).error("getAsRGBAFloat()","Unable to convert to RGBA. The input pixel block is empty.");let o,n,i,s;o=n=i=e[0],e.length>=3?(n=e[1],i=e[2]):2===e.length&&(n=e[1]);const l=this.width*this.height;if(o.length!==l)return a.Z.getLogger(this).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++)t[u++]=o[s],t[u++]=n[s],t[u++]=i[s],t[u++]=1&r[s];else for(s=0;s<l;s++)t[u++]=o[s],t[u++]=n[s],t[u++]=i[s],t[u++]=1}_calculateBandStatistics(t,e){let r=1/0,o=-1/0;const n=t.length;let i,s=0;if(null!=e)for(i=0;i<n;i++)e[i]&&(s=t[i],r=s<r?s:r,o=s>o?s:o);else for(i=0;i<n;i++)s=t[i],r=s<r?s:r,o=s>o?s:o;return new h(r,o)}};(0,o._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"width",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"height",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"pixelType",void 0),(0,o._)([(0,u.p)("pixelType")],p.prototype,"castPixelType",null),(0,o._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"validPixelCount",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"mask",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"maskIsAlpha",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"pixels",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"premultiplyAlpha",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"statistics",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"depthCount",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"noDataValues",void 0),(0,o._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"bandMasks",void 0),p=f=(0,o._)([(0,c.j)("esri.layers.support.PixelBlock")],p);const m=p},25972:(t,e,r)=>{r.d(e,{Z:()=>k});var o,n=r(43697),i=r(96674),s=r(22974),a=r(5600),l=(r(75215),r(52011)),u=r(6570),c=r(82971);function h(t){return t=Number(t),isNaN(t)?void 0:t}r(67676),r(80442);let f=o=class extends i.wq{constructor(){super(...arguments),this.name=null,this.minWavelength=void 0,this.maxWavelength=void 0,this.radianceBias=void 0,this.radianceGain=void 0,this.reflectanceBias=void 0,this.reflectanceGain=void 0,this.solarIrradiance=void 0}clone(){return new o({name:this.name,minWavelength:this.minWavelength,maxWavelength:this.maxWavelength,radianceBias:this.radianceBias,radianceGain:this.radianceGain,reflectanceBias:this.reflectanceBias,reflectanceGain:this.reflectanceGain,solarIrradiance:this.solarIrradiance})}};(0,n._)([(0,a.Cb)({json:{name:"BandName",write:!0}})],f.prototype,"name",void 0),(0,n._)([(0,a.Cb)({json:{name:"WavelengthMin",read:{reader:h},write:!0}})],f.prototype,"minWavelength",void 0),(0,n._)([(0,a.Cb)({json:{name:"WavelengthMax",read:{reader:h},write:!0}})],f.prototype,"maxWavelength",void 0),(0,n._)([(0,a.Cb)({json:{name:"RadianceBias",read:{reader:h},write:!0}})],f.prototype,"radianceBias",void 0),(0,n._)([(0,a.Cb)({json:{name:"RadianceGain",read:{reader:h},write:!0}})],f.prototype,"radianceGain",void 0),(0,n._)([(0,a.Cb)({json:{name:"ReflectanceBias",read:{reader:h},write:!0}})],f.prototype,"reflectanceBias",void 0),(0,n._)([(0,a.Cb)({json:{name:"ReflectanceGain",read:{reader:h},write:!0}})],f.prototype,"reflectanceGain",void 0),(0,n._)([(0,a.Cb)({json:{name:"SolarIrradiance",read:{reader:h},write:!0}})],f.prototype,"solarIrradiance",void 0),f=o=(0,n._)([(0,l.j)("esri.layers.support.RasterBandInfo")],f);const d=f;var p,m=r(71715),g=r(30556);function y(t){return t=Number(t),isNaN(t)?void 0:t}let w=p=class extends i.wq{constructor(){super(...arguments),this.acquisitionDate=void 0,this.cloudCover=void 0,this.productName=void 0,this.sensorName=null,this.sensorAzimuth=void 0,this.sensorElevation=void 0,this.sunAzimuth=void 0,this.sunElevation=void 0}readAcquisitionDate(t){return new Date(t)}writeAcquisitionDate(t,e){e.AcquisitionDate=t.getTime()}clone(){return new p({acquisitionDate:this.acquisitionDate,cloudCover:this.cloudCover,productName:this.productName,sensorName:this.sensorName,sensorAzimuth:this.sensorAzimuth,sensorElevation:this.sensorElevation,sunAzimuth:this.sunAzimuth,sunElevation:this.sunElevation})}};(0,n._)([(0,a.Cb)({json:{name:"AcquisitionDate",write:!0}})],w.prototype,"acquisitionDate",void 0),(0,n._)([(0,m.r)("acquisitionDate")],w.prototype,"readAcquisitionDate",null),(0,n._)([(0,g.c)("acquisitionDate")],w.prototype,"writeAcquisitionDate",null),(0,n._)([(0,a.Cb)({json:{name:"CloudCover",read:{reader:y},write:!0}})],w.prototype,"cloudCover",void 0),(0,n._)([(0,a.Cb)({json:{name:"ProductName",write:!0}})],w.prototype,"productName",void 0),(0,n._)([(0,a.Cb)({json:{name:"SensorName",write:!0}})],w.prototype,"sensorName",void 0),(0,n._)([(0,a.Cb)({json:{name:"SensorAzimuth",read:{reader:y},write:!0}})],w.prototype,"sensorAzimuth",void 0),(0,n._)([(0,a.Cb)({json:{name:"SensorElevation",read:{reader:y},write:!0}})],w.prototype,"sensorElevation",void 0),(0,n._)([(0,a.Cb)({json:{name:"SunAzimuth",read:{reader:y},write:!0}})],w.prototype,"sunAzimuth",void 0),(0,n._)([(0,a.Cb)({json:{name:"SunElevation",read:{reader:y},write:!0}})],w.prototype,"sunElevation",void 0),w=p=(0,n._)([(0,l.j)("esri.layers.support.RasterSensorInfo")],w);const b=w;var C,v=r(36679);let x=C=class extends i.wq{constructor(t){super(t),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 bandInfos(){const t=this.keyProperties.BandProperties;if(!t?.length){const t=[];for(let e=1;e<=this.bandCount;e++)t.push(new d({name:"band_"+e}));return t}const e=t.map((t=>d.fromJSON(t)));for(let t=0;t<e.length;t++)e[t].name=e[t].name??"band_"+(t+1);return e}get dataType(){const t=this.keyProperties?.DataType?.toLowerCase()??"generic";return"stdtime"===t?"standard-time":t}get nativeExtent(){return this._get("nativeExtent")||this.extent}set nativeExtent(t){t&&this._set("nativeExtent",t)}get nativePixelSize(){if(null==this.transform||!this.transform.affectsPixelSize)return this.pixelSize;const t=this.nativeExtent;return{x:t.width/this.width,y:t.height/this.height}}get hasMultidimensionalTranspose(){return!!this.storageInfo?.transposeInfo}get sensorInfo(){if(this.keyProperties?.SensorName)return b.fromJSON(this.keyProperties)}clone(){return new C({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,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"attributeTable",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"bandCount",void 0),(0,n._)([(0,a.Cb)({readOnly:!0})],x.prototype,"bandInfos",null),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"colormap",void 0),(0,n._)([(0,a.Cb)({type:String,readOnly:!0})],x.prototype,"dataType",null),(0,n._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],x.prototype,"extent",void 0),(0,n._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],x.prototype,"nativeExtent",null),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"nativePixelSize",null),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"format",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"height",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"width",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"hasMultidimensionalTranspose",null),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"histograms",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"keyProperties",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"multidimensionalInfo",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"noDataValue",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"pixelSize",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"pixelType",void 0),(0,n._)([(0,a.Cb)()],x.prototype,"isPseudoSpatialReference",void 0),(0,n._)([(0,a.Cb)({readOnly:!0})],x.prototype,"sensorInfo",null),(0,n._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],x.prototype,"spatialReference",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"statistics",void 0),(0,n._)([(0,a.Cb)({type:v.Z,json:{write:!0}})],x.prototype,"storageInfo",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"transform",void 0),x=C=(0,n._)([(0,l.j)("esri.layers.support.RasterInfo")],x);const k=x},36679:(t,e,r)=>{r.d(e,{Z:()=>h});var o,n=r(43697),i=r(96674),s=r(22974),a=r(5600),l=(r(75215),r(52011)),u=r(94139);let c=o=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 o({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,n._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"blockWidth",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"blockHeight",void 0),(0,n._)([(0,a.Cb)({type:String,json:{write:!0}})],c.prototype,"compression",void 0),(0,n._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],c.prototype,"origin",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"firstPyramidLevel",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"maximumPyramidLevel",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],c.prototype,"pyramidResolutions",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"pyramidScalingFactor",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"pyramidBlockWidth",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"pyramidBlockHeight",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],c.prototype,"isVirtualTileInfo",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],c.prototype,"tileInfo",void 0),(0,n._)([(0,a.Cb)()],c.prototype,"transposeInfo",void 0),(0,n._)([(0,a.Cb)()],c.prototype,"blockBoundary",void 0),c=o=(0,n._)([(0,l.j)("esri.layers.support.RasterStorageInfo")],c);const h=c},20095:(t,e,r)=>{function o(t,e){let r=0,o="",n=0,i=0;const s=t.length;for(;r<s;)i=t[r++],n=i>>4,n<8?n=1:15===n?(n=4,i=(7&i)<<18|(63&t[r++])<<12|(63&t[r++])<<6|63&t[r++]):14===n?(n=3,i=(15&i)<<12|(63&t[r++])<<6|63&t[r++]):(n=2,i=(31&i)<<6|63&t[r++]),(0!==i||e)&&(o+=String.fromCharCode(i));return o}r.d(e,{f:()=>o})},72955:(t,e,r)=>{r.d(e,{Jx:()=>h,zD:()=>a});var o=r(99880);const n=[{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((t=>t.l)).then((({default:t})=>t({locateFile:t=>(0,o.V)(`esri/layers/support/rasterFormats/${t}`)}))).then((t=>{(function(t){const{_malloc:e,_free:r,_lerc_getBlobInfo:o,_lerc_getDataRanges:i,_lerc_decode_4D:s,asm:a}=t;let c;const h=Object.values(a).find((e=>e&&"buffer"in e&&e.buffer===t.HEAPU8.buffer)),f=t=>{const r=t.map((t=>function(t){return 16+(t>>3<<3)}(t))),o=r.reduce(((t,e)=>t+e)),n=e(o);c=new Uint8Array(h.buffer);let i=r[0];r[0]=n;for(let t=1;t<r.length;t++){const e=r[t];r[t]=r[t-1]+i,i=e}return r};l.getBlobInfo=t=>{const e=new Uint8Array(48),n=new Uint8Array(24),[s,a,l]=f([t.length,e.length,n.length]);c.set(t,s),c.set(e,a),c.set(n,l);let d=o(s,t.length,a,l,12,3);if(d)throw r(s),new Error(`lerc-getBlobInfo: error code is ${d}`);c=new Uint8Array(h.buffer),u(c,a,e),u(c,l,n);const p=new Uint32Array(e.buffer),m=new Float64Array(n.buffer),[g,y,,w,b,C,v,x,k,A,S]=p,T={version:g,depthCount:A,width:w,height:b,validPixelCount:v,bandCount:C,blobSize:x,maskCount:k,dataType:y,minValue:m[0],maxValue:m[1],maxZerror:m[2],statistics:[],bandCountWithNoData:S};if(S)return T;if(1===A&&1===C)return r(s),T.statistics.push({minValue:m[0],maxValue:m[1]}),T;const I=A*C*8,M=new Uint8Array(I),P=new Uint8Array(I);let E=s,R=0,L=0,U=!1;if(c.byteLength<s+2*I?(r(s),U=!0,[E,R,L]=f([t.length,I,I]),c.set(t,E)):[R,L]=f([I,I]),c.set(M,R),c.set(P,L),d=i(E,t.length,A,C,R,L),d)throw r(E),U||r(R),new Error(`lerc-getDataRanges: error code is ${d}`);c=new Uint8Array(h.buffer),u(c,R,M),u(c,L,P);const O=new Float64Array(M.buffer),D=new Float64Array(P.buffer),G=T.statistics;for(let t=0;t<C;t++)if(A>1){const e=O.slice(t*A,(t+1)*A),r=D.slice(t*A,(t+1)*A),o=Math.min.apply(null,e),n=Math.max.apply(null,r);G.push({minValue:o,maxValue:n,depthStats:{minValues:e,maxValues:r}})}else G.push({minValue:O[t],maxValue:D[t]});return r(E),U||r(R),T},l.decode=(t,e)=>{const{maskCount:o,depthCount:i,bandCount:a,width:l,height:d,dataType:p,bandCountWithNoData:m}=e,g=n[p],y=l*d,w=new Uint8Array(y*a),b=y*i*a*g.size,C=new Uint8Array(b),v=new Uint8Array(a),x=new Uint8Array(8*a),[k,A,S,T,I]=f([t.length,w.length,C.length,v.length,x.length]);c.set(t,k),c.set(w,A),c.set(C,S),c.set(v,T),c.set(x,I);const M=s(k,t.length,o,A,i,l,d,a,p,S,T,I);if(M)throw r(k),new Error(`lerc-decode: error code is ${M}`);c=new Uint8Array(h.buffer),u(c,S,C),u(c,A,w);let P=null;if(m){u(c,T,v),u(c,I,x),P=[];const t=new Float64Array(x.buffer);for(let e=0;e<v.length;e++)P.push(v[e]?t[e]:null)}return r(k),{data:C,maskData:w,noDataValues:P}}})(t),s=!0})),i)}const l={getBlobInfo:null,decode:null};function u(t,e,r){r.set(t.slice(e,e+r.length))}function c(t,e,r,o,n){if(r<2)return t;const i=new o(e*r);if(n)for(let o=0,n=0;o<e;o++)for(let s=0,a=o;s<r;s++,a+=e)i[a]=t[n++];else for(let o=0,n=0;o<e;o++)for(let s=0,a=o;s<r;s++,a+=e)i[n++]=t[a];return i}function h(t,e={}){const r=e.inputOffset??0,o=t instanceof Uint8Array?t.subarray(r):new Uint8Array(t,r),i=l.getBlobInfo(o),{data:s,maskData:a,noDataValues:u}=l.decode(o,i),{width:h,height:f,bandCount:d,depthCount:p,dataType:m,maskCount:g,statistics:y}=i,w=n[m],b=new w.ctor(s.buffer),C=[],v=[],x=h*f,k=x*p;for(let t=0;t<d;t++){const r=b.subarray(t*k,(t+1)*k);if(e.returnInterleaved)C.push(r);else{const t=c(r,x,p,w.ctor,!0);C.push(t)}v.push(a.subarray(t*k,(t+1)*k))}const A=0===g?null:1===g?v[0]:new Uint8Array(x);if(g>1){A.set(v[0]);for(let t=1;t<v.length;t++){const e=v[t];for(let t=0;t<x;t++)A[t]=A[t]&e[t]}}const{noDataValue:S}=e,T=null!=S&&w.range[0]<=S&&w.range[1]>=S;if(g>0&&T)for(let t=0;t<d;t++){const e=C[t],r=v[t]||A;for(let t=0;t<x;t++)0===r[t]&&(e[t]=S)}const I=g===d&&d>1?v:null,{pixelType:M}=w;return{width:h,height:f,bandCount:d,pixelType:M,depthCount:p,statistics:y,pixels:C,mask:A,bandMasks:I,noDataValues:u}}},88781:(t,e,r)=>{function o(){const t=[];for(let e=0;e<=257;e++)t[e]=[e];return t}function n(t,e){for(let r=0;r<e.length;r++)t.push(e[r])}r.d(e,{J:()=>s});const i=new Set;function s(t,e,r,s=!0){const a=function(t,e,r,o=!0){if(e%4!=0||r%4!=0){const n=new ArrayBuffer(4*Math.ceil(r/4)),i=new Uint8Array(n),s=new Uint8Array(t,e,r);if(o)for(let t=0;t<i.length;t+=4)i[t]=s[t+3],i[t+1]=s[t+2],i[t+2]=s[t+1],i[t+3]=s[t];else i.set(s);return new Uint32Array(i.buffer)}if(o){const o=new Uint8Array(t,e,r),n=new Uint8Array(o.length);for(let t=0;t<n.length;t+=4)n[t]=o[t+3],n[t+1]=o[t+2],n[t+2]=o[t+1],n[t+3]=o[t];return new Uint32Array(n.buffer)}return new Uint32Array(t,e,r/4)}(t,e,r,s);let l=9,u=o(),c=32,h=u.length,f=[],d=1,p=a[0],m=0;const g=a.length,y=8*(4*g-r),w=[];for(;null!=p;){if(c>=l)c-=l,m=p>>>32-l,p<<=l;else{m=p>>>32-c,p=a[d++];const t=l-c;c=32-t,m=(m<<t)+(p>>>c),p<<=t}if(257===m)break;if(256===m){l=9,u=o(),h=u.length,f=[];continue}const t=u[m];if(null==t){if(m>u.length)throw new Error("data integrity issue: code does not exist on code page");f.push(f[0]),u[h++]=f.slice(),n(w,f)}else n(w,t),f.push(t[0]),f.length>1&&(u[h++]=f.slice()),f=t.slice();if(i.has(h)&&l++,0===c&&(p=a[d++],c=32),d>g||d===g&&c<=y)break}return new Uint8Array(w)}i.add(511),i.add(1023),i.add(2047),i.add(4095),i.add(8191)},75993:(t,e,r)=>{r.d(e,{J:()=>L,y:()=>R});var o=r(20102),n=r(70586),i=r(5847),s=r(95330),a=r(80899);class l{constructor(t){this._canvas=null,this._ctx=null,t&&(this._canvas=t.canvas,this._ctx=t.ctx||t.canvas&&t.canvas.getContext("2d"))}decode(t,e,r){if(!t||t.byteLength<10)throw new o.Z("imagecanvasdecoder: decode","required a valid encoded data as input.");let{width:n=0,height:i=0,format:a}=e;const{applyJpegMask:u}=e;if(u&&(!n||!i))throw new o.Z("imagecanvasdecoder: decode","image width and height are needed to apply jpeg mask directly to canvas");return new Promise(((o,c)=>{let h=null;"jpg"===a&&u&&(h=l._getMask(t,{width:n,height:i}));const f=new Blob([new Uint8Array(t)],{type:"image/"+a=="jpg"?"jpeg":a}),d=URL.createObjectURL(f),p=new Image;let m;p.src=d,p.onload=()=>{if(URL.revokeObjectURL(d),(0,s.Hc)(r))return void c((0,s.zE)());n=p.width,i=p.height,this._canvas&&this._ctx?(this._canvas.width===n&&this._canvas.height===i||(this._canvas.width=n,this._canvas.height=i),this._ctx.clearRect(0,0,n,i)):(this._canvas=document.createElement("canvas"),this._canvas.width=n,this._canvas.height=i,this._ctx=this._canvas.getContext("2d")),this._ctx.drawImage(p,0,0);const t=this._ctx.getImageData(0,0,n,i);let a;if(m=t.data,e.renderOnCanvas){if(h)for(a=0;a<h.length;a++)h[a]?m[4*a+3]=255:m[4*a+3]=0;return this._ctx.putImageData(t,0,0),void o(null)}const l=n*i,u=new Uint8Array(l),f=new Uint8Array(l),g=new Uint8Array(l);if(h)for(a=0;a<l;a++)u[a]=m[4*a],f[a]=m[4*a+1],g[a]=m[4*a+2];else for(h=new Uint8Array(l),a=0;a<l;a++)u[a]=m[4*a],f[a]=m[4*a+1],g[a]=m[4*a+2],h[a]=m[4*a+3];o({width:n,height:i,pixels:[u,f,g],mask:h,pixelType:"u8"})},p.onerror=()=>{URL.revokeObjectURL(d),c("cannot load image")}}))}static _getMask(t,e){let r=null;try{const o=new Uint8Array(t),n=Math.ceil(o.length/2);let i=0;const s=o.length-2;for(i=n;i<s&&(255!==o[i]||217!==o[i+1]);i++);if(i+=2,i<o.length-1){const t=new a.Z(o.subarray(i)).getBytes();r=new Uint8Array(e.width*e.height);let n=0;for(let e=0;e<t.length;e++)for(let o=7;o>=0;o--)r[n++]=t[e]>>o&1}}catch(t){}return r}}var u=r(97575);class c{static decode(t,e=!1){const r=new Uint8Array(t),o=new u.J;o.parse(r);const{width:n,height:i,numComponents:s,eof:l}=o,c=o.getData(n,i,!0),h=n*i;let f,d=null,p=0,m=0,g=0;if(!e&&l<r.length-1)try{const t=new a.Z(r.subarray(l)).getBytes();d=new Uint8Array(h);let e=0;for(p=0;p<t.length;p++)for(g=7;g>=0;g--)d[e++]=t[p]>>g&1}catch{}if(1===s&&c.length===n*i){const t=new Uint8Array(c.buffer);f=[t,t,t]}else{for(f=[],p=0;p<3;p++)f.push(new Uint8Array(h));for(g=0,m=0;m<h;m++)for(p=0;p<3;p++)f[p][m]=c[g++]}return{width:n,height:i,pixels:f,mask:d}}}var h=r(72955),f=r(88781),d=r(81578);const p=(t,e)=>{const r=e.width*e.height,o=e.pixelType;return Math.floor(t.byteLength/(r*m(o)))},m=t=>{let e=1;switch(t){case Uint8Array:case Int8Array:e=1;break;case Uint16Array:case Int16Array:e=2;break;case Uint32Array:case Int32Array:case Float32Array:e=4;break;case Float64Array:e=8}return e};class g{static decode(t,e){const r=e.pixelType,o=[],n=e.width*e.height,i=p(t,e),{bandIds:s,format:a}=e,l=s&&s.length||p(t,e),u=t.byteLength-t.byteLength%(n*m(r)),c=new r(t,0,n*i);let h,f,d,g,y=null;if("bip"===a)for(h=0;h<l;h++){for(d=new r(n),g=s?s[h]:h,f=0;f<n;f++)d[f]=c[f*i+g];o.push(d)}else if("bsq"===a)for(h=0;h<l;h++)g=s?s[h]:h,o.push(c.subarray(g*n,(g+1)*n));return u<t.byteLength-1&&(y=((t,e)=>{if(8*t.byteLength<e)return null;const r=new Uint8Array(t,0,Math.ceil(e/8)),o=new Uint8Array(e);let n=0,i=0,s=0,a=0;for(s=0;s<r.length-1;s++)for(i=r[s],a=7;a>=0;a--)o[n++]=i>>a&1;for(a=7;n<e-1;)i=r.at(-1),o[n++]=i>>a&1,a--;return o})(t.slice(u),n)),{pixels:o,mask:y}}}var y=r(94793),w=r(48279),b=function(t){var e,r,o;function n(t){var e,r,o,n,i,s,a,l,u,c,h,f,d;for(this.data=t,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},i=null;;){switch(e=this.readUInt32(),l=function(){var t,e;for(e=[],t=0;t<4;++t)e.push(String.fromCharCode(this.data[this.pos++]));return e}.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(e);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()},n=this.readUInt16(),o=this.readUInt16()||100,i.delay=1e3*n/o,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,e-=4),t=(null!=i?i.data:void 0)||this.imgData,h=0;0<=e?h<e:h>e;0<=e?++h:--h)t.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(this.transparency.indexed=this.read(e),(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(e)[0];break;case 2:this.transparency.rgb=this.read(e)}break;case"tEXt":s=(c=this.read(e)).indexOf(0),a=String.fromCharCode.apply(String,c.slice(0,s)),this.text[a]=String.fromCharCode.apply(String,c.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+=e}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}return n.load=function(t,e,r){var o;return"function"==typeof e&&(r=e),(o=new XMLHttpRequest).open("GET",t,!0),o.responseType="arraybuffer",o.onload=function(){var t;return t=new n(new Uint8Array(o.response||o.mozResponseArrayBuffer)),"function"==typeof(null!=e?e.getContext:void 0)&&t.render(e),"function"==typeof r?r(t):void 0},o.send(null)},n.prototype.read=function(t){var e,r;for(r=[],e=0;0<=t?e<t:e>t;0<=t?++e:--e)r.push(this.data[this.pos++]);return r},n.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},n.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},n.prototype.decodePixels=function(t){var e,r,o,n,i,s,l,u,c,h,f,d,p,m,g,y,w,b,C,v,x,k,A;if(null==t&&(t=this.imgData),0===t.length)return new Uint8Array(0);for(t=(t=new a.Z(t)).getBytes(),y=(d=this.pixelBitlength/8)*this.width,p=new Uint8Array(y*this.height),s=t.length,g=0,m=0,r=0;m<s;){switch(t[m++]){case 0:for(n=C=0;C<y;n=C+=1)p[r++]=t[m++];break;case 1:for(n=v=0;v<y;n=v+=1)e=t[m++],i=n<d?0:p[r-d],p[r++]=(e+i)%256;break;case 2:for(n=x=0;x<y;n=x+=1)e=t[m++],o=(n-n%d)/d,w=g&&p[(g-1)*y+o*d+n%d],p[r++]=(w+e)%256;break;case 3:for(n=k=0;k<y;n=k+=1)e=t[m++],o=(n-n%d)/d,i=n<d?0:p[r-d],w=g&&p[(g-1)*y+o*d+n%d],p[r++]=(e+Math.floor((i+w)/2))%256;break;case 4:for(n=A=0;A<y;n=A+=1)e=t[m++],o=(n-n%d)/d,i=n<d?0:p[r-d],0===g?w=b=0:(w=p[(g-1)*y+o*d+n%d],b=o&&p[(g-1)*y+(o-1)*d+n%d]),l=i+w-b,u=Math.abs(l-i),h=Math.abs(l-w),f=Math.abs(l-b),c=u<=h&&u<=f?i:h<=f?w:b,p[r++]=(e+c)%256;break;default:throw new Error("Invalid filter algorithm: "+t[m-1])}g++}return p},n.prototype.decodePalette=function(){var t,e,r,o,n,i,s,a,l;for(r=this.palette,i=this.transparency.indexed||[],n=new Uint8Array((i.length||0)+r.length),o=0,r.length,t=0,e=s=0,a=r.length;s<a;e=s+=3)n[o++]=r[e],n[o++]=r[e+1],n[o++]=r[e+2],n[o++]=null!=(l=i[t++])?l:255;return n},n.prototype.copyToImageData=function(t,e){var r,o,n,i,s,a,l,u,c,h,f;if(o=this.colors,c=null,r=this.hasAlphaChannel,this.palette.length&&(c=null!=(f=this._decodedPalette)?f:this._decodedPalette=this.decodePalette(),o=4,r=!0),u=(n=t.data||t).length,s=c||e,i=a=0,1===o)for(;i<u;)l=c?4*e[i/4]:a,h=s[l++],n[i++]=h,n[i++]=h,n[i++]=h,n[i++]=r?s[l++]:this.transparency.grayscale&&this.transparency.grayscale===h?0:255,a=l;else for(;i<u;)l=c?4*e[i/4]:a,n[i++]=s[l++],n[i++]=s[l++],n[i++]=s[l++],n[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},n.prototype.decode=function(){var t;return t=new Uint8Array(this.width*this.height*4),this.copyToImageData(t,this.decodePixels()),t},r=t.document&&t.document.createElement("canvas"),o=r&&r.getContext("2d"),e=function(t){var e;return o.width=t.width,o.height=t.height,o.clearRect(0,0,t.width,t.height),o.putImageData(t,0,0),(e=new Image).src=r.toDataURL(),e},n.prototype.decodeFrames=function(t){var r,o,n,i,s,a,l,u;if(this.animation){for(u=[],o=s=0,a=(l=this.animation.frames).length;s<a;o=++s)r=l[o],n=t.createImageData(r.width,r.height),i=this.decodePixels(new Uint8Array(r.data)),this.copyToImageData(n,i),r.imageData=n,u.push(r.image=e(n));return u}},n.prototype.renderFrame=function(t,e){var r,o,n;return r=(o=this.animation.frames)[e],n=o[e-1],0===e&&t.clearRect(0,0,this.width,this.height),1===(null!=n?n.disposeOp:void 0)?t.clearRect(n.xOffset,n.yOffset,n.width,n.height):2===(null!=n?n.disposeOp:void 0)&&t.putImageData(n.imageData,n.xOffset,n.yOffset),0===r.blendOp&&t.clearRect(r.xOffset,r.yOffset,r.width,r.height),t.drawImage(r.image,r.xOffset,r.yOffset)},n.prototype.animate=function(t){var e,r,o,n,i,s,a=this;return r=0,s=this.animation,n=s.numFrames,o=s.frames,i=s.numPlays,(e=function(){var s,l;if(s=r++%n,l=o[s],a.renderFrame(t,s),n>1&&r/n<i)return a.animation._timeout=setTimeout(e,l.delay)})()},n.prototype.stopAnimation=function(){var t;return clearTimeout(null!=(t=this.animation)?t._timeout:void 0)},n.prototype.render=function(t){var e,r;return t._png&&t._png.stopAnimation(),t._png=this,t.width=this.width,t.height=this.height,e=t.getContext("2d"),this.animation?(this.decodeFrames(e),this.animate(e)):(r=e.createImageData(this.width,this.height),this.copyToImageData(r,this.decodePixels()),e.putImageData(r,0,0))},n}(self);const C=new Set(["jpg","png","bmp","gif"]);async function v(t,e){if(!w.f)throw new o.Z("rasterCoded:decode","lerc decoder is not supported on big endian platform");await(0,h.zD)();const{offset:r}=e,{width:n,height:s,pixelType:a,statistics:l,depthCount:u,noDataValues:c,bandMasks:f,pixels:d,mask:p}=(0,h.Jx)(t,{inputOffset:r,returnInterleaved:e.returnInterleaved});return new i.Z({width:n,height:s,pixelType:a.toLowerCase(),pixels:d,mask:p,statistics:l,bandMasks:f,depthCount:u,noDataValues:c})}async function x(t,e){const r=await(0,y.Jx)(t,{...e,noDataValue:null});(0,n.O3)(r);const o=new i.Z({width:r.width,height:r.height,pixels:r.pixels,pixelType:r.pixelType.toLowerCase(),mask:r.mask,bandMasks:r.bandMasks,statistics:null});return o.updateStatistics(),o}function k(t,e){const r=e.pixelType||"u8",o=i.Z.getPixelArrayConstructor(r),n="u8"===r?t:new o(t.buffer),s=[],a=e.planes||1;if(1===a)s.push(n);else for(let r=0;r<a;r++){const i=(e.width||1)*(e.height||t.length),l=new o(i);for(let t=0;t<i;t++)l[t]=n[t*a+r];s.push(l)}const l=new i.Z({width:e.width||1,height:e.height||t.length,pixels:s,pixelType:r,statistics:null});return l.updateStatistics(),l}function A(t,e){return k(new a.Z(new Uint8Array(t)).getBytes(),e)}function S(t,e){return k((0,f.J)(t,e.offset,e.eof,!e.isInputBigEndian),e)}function T(t,e,r){const{pixelTypeCtor:o}=function(t){let e=null,r=null;switch(t?t.toLowerCase():"f32"){case"u1":case"u2":case"u4":case"u8":r=255,e=Uint8Array;break;case"u16":r=r||65535,e=Uint16Array;break;case"u32":r=r||2**32-1,e=Uint32Array;break;case"s8":r=r||-128,e=Int8Array;break;case"s16":r=r||-32768,e=Int16Array;break;case"s32":r=r||0-2**31,e=Int32Array;break;default:e=Float32Array}return{pixelTypeCtor:e,noDataValue:r}}(e.pixelType),n=(0,g.decode)(t,{width:e.width,height:e.height,pixelType:o,format:r}),s=new i.Z({width:e.width,height:e.height,pixels:n.pixels,pixelType:e.pixelType,mask:n.mask,statistics:null});return s.updateStatistics(),s}function I(t,e){const r=c.decode(t,e.hasNoZlibMask??void 0),o=new i.Z({width:r.width,height:r.height,pixels:r.pixels,pixelType:"U8",mask:r.mask,statistics:null});return o.updateStatistics(),o}function M(t,e){const r=new Uint8Array(t),o=new b(r),{width:n,height:s}=e,a=n*s,l=o.decode();let u,c=0,h=0;const f=new Uint8Array(a);for(c=0;c<a;c++)f[c]=l[4*c+3];const d=new i.Z({width:n,height:s,pixels:[],pixelType:"U8",mask:f,statistics:[]});for(c=0;c<3;c++){for(u=new Uint8Array(a),h=0;h<a;h++)u[h]=l[4*h+c];d.addData({pixels:u})}return d.updateStatistics(),d}async function P(t,e,r,o){const n=new l,s={applyJpegMask:!1,format:e,...r},a=await n.decode(t,s,o),u=new i.Z(a);return u.updateStatistics(),u}function E(t){if(null==t)throw new o.Z("rasterCodec:decode","parameter encodeddata is required.");const e=new Uint8Array(t,0,10);let r="";return 255===e[0]&&216===e[1]?r="jpg":137===e[0]&&80===e[1]&&78===e[2]&&71===e[3]?r="png":67===e[0]&&110===e[1]&&116===e[2]&&90===e[3]&&73===e[4]&&109===e[5]&&97===e[6]&&103===e[7]&&101===e[8]&&32===e[9]?r="lerc":76===e[0]&&101===e[1]&&114===e[2]&&99===e[3]&&50===e[4]&&32===e[5]?r="lerc2":73===e[0]&&73===e[1]&&42===e[2]&&0===e[3]||77===e[0]&&77===e[1]&&0===e[2]&&42===e[3]||73===e[0]&&73===e[1]&&43===e[2]&&0===e[3]||77===e[0]&&77===e[1]&&0===e[2]&&43===e[3]?r="tiff":71===e[0]&&73===e[1]&&70===e[2]?r="gif":66===e[0]&&77===e[1]?r="bmp":String.fromCharCode.apply(null,e).toLowerCase().includes("error")&&(r="error"),r}function R(t){let e=E(t);return"lerc2"===e?e="lerc":"error"===e&&(e=""),e}async function L(t,e={},r){if(null==t)throw new o.Z("rasterCodec:decode","missing encodeddata parameter.");let n=e.format&&e.format.toLowerCase();if(!("bsq"!==n&&"bip"!==n||null!=e.width&&null!=e.height))throw new o.Z("rasterCodec:decode","requires width and height in options parameter.");if("tiff"===n&&e.customOptions)return async function(t,e){const r=await(0,y.Uw)(t,e.customOptions),o=new i.Z({width:r.width,height:r.height,pixels:r.pixels,pixelType:r.pixelType.toLowerCase(),mask:r.mask,statistics:null});return o.updateStatistics(),o}(t,e);if((!n||"bsq"!==n&&"bip"!==n&&"deflate"!==n&&"lzw"!==n)&&(n=E(t)),e.useCanvas&&C.has(n))return P(t,n,e,r);const s=function(t){let e=null;switch(t){case"lerc":case"lerc2":e=v;break;case"jpg":e=I;break;case"png":e=M;break;case"bsq":case"bip":e=(e,r)=>T(e,r,t);break;case"tiff":e=x;break;case"deflate":e=A;break;case"lzw":e=S;break;case"error":e=()=>{throw new o.Z("rasterCodec:decode","input data contains error")};break;default:e=()=>{throw new o.Z("rasterCodec:decode","unsupported raster format")}}return e}(n);e.isPoint&&(null!=(e={...e}).width&&e.width++,null!=e.height&&e.height++);const a=await s(t,e);return a?("jpg"!==n&&null!=e.noDataValue&&1===a.depthCount&&(0,d.A)(a,e.noDataValue,{customFloatTolerance:e.tolerance}),e.isPoint&&function(t,e=1){if(!t)return;const{pixels:r,width:o,height:n,mask:s}=t;if(!r||0===r.length)return;const a=r.length,l=o-1,u=n-1,c=[];let h,f,d,p,m,g,y=null;const w=i.Z.getPixelArrayConstructor(t.pixelType);if(0===e){for(h=0;h<a;h++){for(m=r[h],g=new w(l*u),f=0;f<u;f++)for(p=f*o,d=0;d<l;d++)g[f*l+d]=m[p+d];c.push(g)}if(null!=s)for(y=new Uint8Array(l*u),f=0;f<u;f++)for(p=f*o,d=0;d<l;d++)y[f*l+d]=s[p+d]}else{for(h=0;h<a;h++){for(m=r[h],g=new w(l*u),f=0;f<u;f++)for(p=f*o,d=0;d<l;d++)g[f*l+d]=(m[p+d]+m[p+d+1]+m[p+o+d]+m[p+o+d+1])/4;c.push(g)}if(s)for(y=new Uint8Array(l*u),f=0;f<u;f++)for(p=f*o,d=0;d<l;d++)y[f*l+d]=Math.min.apply(null,[s[p+d],s[p+d+1],s[p+o+d],s[p+o+d+1]])}t.width=l,t.height=u,t.mask=y,t.pixels=c}(a),a):a}},94793:(t,e,r)=>{r.d(e,{Dq:()=>E,FI:()=>R,I7:()=>O,If:()=>L,Jx:()=>z,Uw:()=>V,cK:()=>_,ee:()=>U,vr:()=>N});var o=r(20095),n=r(97575),i=r(72955),s=r(88781),a=r(81578),l=r(9832),u=r(48279),c=r(80899);const h=[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(t,e){let r="unknown";return 3===t?r=64===e?"f64":"f32":1===t?1===e?r="u1":2===e?r="u2":4===e?r="u4":e<=8?r="u8":e<=16?r="u16":e<=32&&(r="u32"):2===t&&(e<=8?r="s8":e<=16?r="s16":e<=32&&(r="s32")),r}function m(t){let e=null;switch(t?t.toLowerCase():"f32"){case"u1":case"u2":case"u4":case"u8":e=Uint8Array;break;case"u16":e=Uint16Array;break;case"u32":e=Uint32Array;break;case"s8":e=Int8Array;break;case"s16":e=Int16Array;break;case"s32":e=Int32Array;break;case"f64":e=Float64Array;break;default:e=Float32Array}return e}function g(t,e){return{x:e[0]*t.x+e[1]*t.y+e[2],y:e[3]*t.x+e[4]*t.y+e[5]}}function y(t,e){return t.get(e)?.values}function w(t,e){return t.get(e)?.values}function b(t,e){return t.get(e)?.values?.[0]}function C(t,e){return t.get(e)?.values?.[0]}function v(t,e,r,o=0,n=l.Z.TIFF_TAGS,i=4){const s=8===i,a=s?D(new DataView(t,r,8),0,e):new DataView(t,r,2).getUint16(0,e),u=4+2*i,c=s?8:2,h=c+a*u;if(r+h>t.byteLength)return{success:!1,ifd:null,nextIFD:null,requiredBufferSize:h};const f=r+h+4<=t.byteLength?B(new DataView(t,r+h,8===i?8:4),0,e,8===i):null,d=r+c,p=new Map;let m,g,y,w,b,C=0,v=0;for(let r=0;r<a;r++){g=new DataView(t,d+u*r,u),y=g.getUint16(0,e),b=g.getUint16(2,e),w=l.Z.getTagName(y,n);const s=[];2===i?(C=g.getUint16(4,e),v=g.getUint16(6,e)):4===i?(C=g.getUint32(4,e),v=g.getUint32(8,e)):8===i&&(C=B(g,4,e,!0),v=B(g,12,e,!0),s.push(g.getUint32(12,e)),s.push(g.getUint32(16,e))),m={id:y,type:b,valueCount:C,valueOffset:v,valueOffsets:s,values:null},E(t,e,m,o,!1,i),p.set(w,m)}return{success:!0,ifd:p,nextIFD:f,requiredBufferSize:h}}const x=(t,e)=>(0,i.Jx)(t,{inputOffset:e}).pixels[0];function k(t,e){if(1!==e&&2!==e&&4!==e)return t;const r=new Uint8Array(t),o=8/e,n=new Uint8Array(t.byteLength*o);let i=0;const s=2**e-1;for(let t=0;t<r.length;t++){const a=r[t];for(let t=0;t<o;t++)n[i++]=a<<e*t>>>8-e&s}return n.buffer}function A(t,e,r){const o=new n.J;o.parse(t),o.colorTransform=6===r?-1:0;const i=o.getData(o.width,o.height,1!==e&&4!==e);return new Uint8Array(i.buffer)}function S(t){const e=new c.Z(t).getBytes(),r=new ArrayBuffer(e.length),o=new Uint8Array(r);return o.set(e),o}async function T(t,e,r,o,n){const a=u.f===e,l=C(r,"BITSPERSAMPLE"),c=C(r,"SAMPLESPERPIXEL")??1,h=C(r,"PHOTOMETRICINTERPRETATION"),f=C(r,"SAMPLEFORMAT")??1,d=p(f,l),g=C(r,"COMPRESSION")??1,y=m(d);let w,b,v;if(34887===g)return await(0,i.zD)(),x(t,o);if(1===g)w=t.slice(o,o+n),b=new Uint8Array(w);else if(8===g||32946===g)b=new Uint8Array(t,o,n),b=S(b),w=b.buffer;else if(6===g)b=new Uint8Array(t,o,n),b=A(b,c,h),w=b.buffer;else if(7===g){const e=r.get("JPEGTABLES").values,i=e.length-2;b=new Uint8Array(i+n-2);for(let t=0;t<i;t++)b[t]=e[t];const s=new Uint8Array(t,o+2,n-2);for(let t=0;t<s.length;t++)b[i+t]=s[t];b=A(b,c,h),w=b.buffer}else{if(5!==g)throw new Error("tiff-decode: unsupport compression "+g);b=(0,s.J)(t,o,n,e),w=b.buffer}if(w=k(w,l),"u8"===d||"s8"===d||a)v=new y(w);else{w=new ArrayBuffer(b.length);const t=new Uint8Array(w);switch(d){case"u16":case"s16":for(let e=0;e<b.length;e+=2)t[e]=b[e+1],t[e+1]=b[e];break;case"u32":case"s32":case"f32":for(let e=0;e<b.length;e+=4)t[e]=b[e+3],t[e+1]=b[e+2],t[e+2]=b[e+1],t[e+3]=b[e]}v=new y(w)}const T=C(r,"PREDICTOR")??1,I=C(r,"TILEWIDTH"),M=C(r,"TILELENGTH");if(T>1&&(5===g||8===g||32946===g)&&I&&M){const t=L(r),e=new y(v.length);e.set(v),v=function(t,e,r,o,n){const i=o?4:1,s=r*i*n;o&&(t=new Uint8Array(t.buffer));for(let r=0;r<e;r++){const e=r*s;for(let r=n;r<s;r++)t[e+r]+=t[e+r-n]}if(!o)return t;const a=new Uint8Array(t.length),l=r*n;for(let r=0;r<e;r++){const e=r*s;for(let r=0;r<l;r++)for(let o=0;o<i;o++)a[e+r*i+o]=t[e+r+(i-o-1)*l]}return new Float32Array(a.buffer)}(e,M,I,3===f&&3===T,t?1:c)}return v}const I=(t,e,r)=>{const o=u.f===e.littleEndian,n=w(r,"STRIPOFFSETS");if(void 0===n)return null;const{width:i,height:a,pixelType:l}=R([r]),c=C(r,"SAMPLESPERPIXEL")||e.planes,h=C(r,"PHOTOMETRICINTERPRETATION"),f=i*a,d=C(r,"BITSPERSAMPLE"),p=m(l),g=new p(f*c),y=w(r,"STRIPBYTECOUNTS"),b=C(r,"ROWSPERSTRIP"),v=C(r,"COMPRESSION")??1;let x,T,I,M,P,E,L,U,O,D=b;if(d%8==0)for(x=0;x<n.length;x++){if(P=x*(b*i)*c,D=(x+1)*b>a?a-x*b:b,"u8"===l||"s8"===l||o)8===v||32946===v?(L=new Uint8Array(t,n[x],y[x]),L=S(L),E=L.buffer):6===v?(L=new Uint8Array(t,n[x],y[x]),L=A(L,c,h),E=L.buffer):5===v?(L=(0,s.J)(t,n[x],y[x],e.littleEndian),E=L.buffer):(y[x]!==D*i*c*d/8&&console.log("strip byte counts is different than expected"),E=t.slice(n[x],n[x]+y[x])),E=k(E,d),M=new p(E);else{switch(6===v||8===v||32946===v?(L=new Uint8Array(t,n[x],y[x]),U=S(L),E=U.buffer):(y[x]!==D*i*c*d/8&&console.log("strip byte counts is different than expected"),E=new ArrayBuffer(y[x]),L=new Uint8Array(t,n[x],y[x]),U=new Uint8Array(E)),l){case"u16":case"s16":for(I=0;I<L.length;I+=2)U[I]=L[I+1],U[I+1]=L[I];break;case"u32":case"s32":case"f32":for(I=0;I<L.length;I+=4)U[I]=L[I+3],U[I+1]=L[I+2],U[I+2]=L[I+1],U[I+3]=L[I]}E=k(E,d),M=new p(E)}g.set(M,P)}const G=[];if(1===c)G.push(g);else for(x=0;x<c;x++){for(O=new p(f),T=0;T<f;T++)O[T]=g[T*c+x];G.push(O)}return{width:i,height:a,pixelType:l,pixels:G}},M=(t,e,r)=>{if(!(t&&t.length>0&&e&&r))return null;let o,n,i;const s=t[0].length,a=t.length,l=new Uint8Array(s);for(let u=0;u<a;u++)if(o=t[u],n=e[u],i=r[u],0===u)for(let t=0;t<s;t++)l[t]=o[t]<n||o[t]>i?0:1;else for(let t=0;t<s;t++)l[t]&&(l[t]=o[t]<n||o[t]>i?0:1);return l},P=t=>{if(!t)return null;const e=t.match(/<Item(.*?)Item>/gi);if(!e||0===e.length)return null;const r=new Map;let o,n,i,s,a;for(let t=0;t<e.length;t++)o=e[t],n=o.slice(6,o.indexOf(">")),s=o.indexOf("sample="),s>-1&&(a=o.slice(s+8,o.indexOf('"',s+8))),s=o.indexOf("name="),s>-1&&(n=o.slice(s+6,o.indexOf('"',s+6))),n&&(i=o.slice(o.indexOf(">")+1,o.indexOf("</Item>")).trim(),null!=a?r.has(n)?r.get(n)[a]=i:r.set(n,[i]):r.set(n,i)),a=null;const l=r.get("STATISTICS_MINIMUM"),u=r.get("STATISTICS_MAXIMUM"),c=r.get("STATISTICS_MEAN"),h=r.get("STATISTICS_STDDEV");let f=null;if(l&&u){f=[];for(let t=0;t<l.length;t++)f.push({min:parseFloat(l[t]),max:parseFloat(u[t]),avg:c&&parseFloat(c[t]),stddev:h&&parseFloat(h[t])})}const d=r.get("BandName"),p=r.get("WavelengthMin"),m=r.get("WavelengthMax");let g=null;if(d){g=[];for(let t=0;t<d.length;t++)g.push({BandName:d[t],WavelengthMin:p&&parseFloat(p[t]),WavelengthMax:m&&parseFloat(m[t])})}return{statistics:f,bandProperties:g,dataType:r.get("DataType"),rawMetadata:r}};function E(t,e,r,o=0,n=!1,i=4){if(r.values)return!0;const s=r.type,a=r.valueCount;let l=r.valueOffset,u=[];const c=h[s],d=8*c,p=a*c,m=a*h[s]*8;let g,y;const w=8===i?64:32,b=r.valueOffsets;if(m>w&&p>(n?t.byteLength:t?t.byteLength-l+o:0))return r.offlineOffsetSize=[l,p],r.values=null,!1;if(m<=w){if(!e)if(w<=32)l>>>=32-m;else{const t=b?.length?b[0]:l>>>0,e=b?.length?b[1]:Math.round((l-t)/f);m<=32?(l=t>>>32-m,b[0]=l):(l=t*2**(32-m)+(e>>>32-m),b[0]=t,b[1]=e>>>32-m)}if(1===a&&d===w)u=[l];else if(64===w){const t=b?.length?b[0]:l>>>0,e=b?.length?b[1]:Math.round((l-t)/f);let r=t,o=32;for(y=1;y<=a;y++){const t=32-d*y%32;if(o<d){const n=r<<t>>>32-o,i=e<<32-o>>>32-o;r=e,u.push(n+i*2**(d-o)),o-=32-(d-o)}else u.push(r<<t>>>32-d),o-=d;0===o&&(o=32,r=e)}}else for(y=1;y<=a;y++){const t=32-d*y;u.push(l<<t>>>32-d)}}else{l-=o,n&&(l=0);for(let r=l;r<l+p;r+=c){switch(s){case 1:case 2:case 7:g=new DataView(t,r,1).getUint8(0);break;case 3:g=new DataView(t,r,2).getUint16(0,e);break;case 4:case 13:g=new DataView(t,r,4).getUint32(0,e);break;case 5:g=new DataView(t,r,4).getUint32(0,e)/new DataView(t,r+4,4).getUint32(0,e);break;case 6:g=new DataView(t,r,1).getInt8(0);break;case 8:g=new DataView(t,r,2).getInt16(0,e);break;case 9:g=new DataView(t,r,4).getInt32(0,e);break;case 10:g=new DataView(t,r,4).getInt32(0,e)/new DataView(t,r+4,4).getInt32(0,e);break;case 11:g=new DataView(t,r,4).getFloat32(0,e);break;case 12:g=new DataView(t,r,8).getFloat64(0,e);break;case 16:case 18:g=D(new DataView(t,r,8),0,e);break;case 17:g=G(new DataView(t,r,8),0,e);break;default:g=null}u.push(g)}}if(2===s){let t="";const e=u;for(u=[],y=0;y<e.length;y++)0===e[y]&&""!==t?(u.push(t),t=""):t+=String.fromCharCode(e[y]);""===t&&0!==u.length||u.push(t)}return r.values=u,!0}function R(t){const e=t[0],r=C(e,"TILEWIDTH"),o=C(e,"TILELENGTH"),n=C(e,"IMAGEWIDTH"),i=C(e,"IMAGELENGTH"),s=C(e,"BITSPERSAMPLE"),a=C(e,"SAMPLESPERPIXEL"),l=C(e,"SAMPLEFORMAT")??1,u=p(l,s),c=L(e),h=y(e,"GDAL_NODATA");let f=null;h?.length&&(f=h.map((t=>parseFloat(t))),f.some((t=>isNaN(t)))&&(f=null));const m=C(e,"COMPRESSION")??1;let v;switch(m){case 1:v="NONE";break;case 2:case 3:case 4:case 32771:v="CCITT";break;case 5:v="LZW";break;case 6:case 7:v="JPEG";break;case 32773:v="PACKBITS";break;case 8:case 32946:v="DEFLATE";break;case 34712:v="JPEG2000";break;case 34887:v="LERC";break;default:v=String(m)}let x=!0,k="";d.has(m)||(x=!1,k+="unsupported tag compression "+m),l>3&&(x=!1,k+="unsupported tag sampleFormat "+l),1!==s&&2!==s&&4!==s&&s%8!=0&&(x=!1,k+="unsupported tag bitsPerSample "+s);const A=b(e,"GEOASCIIPARAMS");let S;if(A){const t=A.split("|").find((t=>t.includes("ESRI PE String = "))),e=t?t.replace("ESRI PE String = ",""):"";S=e.startsWith("COMPD_CS")||e.startsWith("PROJCS")||e.startsWith("GEOGCS")?{wkid:null,wkt:e}:null}const T=w(e,"GEOTIEPOINTS"),I=w(e,"GEOPIXELSCALE"),M=w(e,"GEOTRANSMATRIX"),E=e.has("GEOKEYDIRECTORY")?e.get("GEOKEYDIRECTORY").data:null;let R,D,G=!1,B=!1;if(E){G=2===C(E,"GTRasterTypeGeoKey");const t=C(E,"GTModelTypeGeoKey");if(2===t){const t=C(E,"GeographicTypeGeoKey");t>=1024&&t<=32766&&(S={wkid:t}),S||32767!==t||(B=!0,S={wkid:4326})}else if(1===t){const t=C(E,"ProjectedCSTypeGeoKey");t>=1024&&t<=32766&&(S={wkid:t})}}if(I&&T&&T.length>=6?(R=[I[0],0,T[3]-T[0]*I[0],0,-Math.abs(I[1]),T[4]-T[1]*I[1]],G&&(R[2]-=.5*R[0]+.5*R[1],R[5]-=.5*R[3]+.5*R[4])):M&&16===M.length&&(R=G?[M[0],M[1],M[3]-.5*M[0],M[4],M[5],M[7]-.5*M[5]]:[M[0],M[1],M[3],M[4],M[5],M[7]]),R){const t=[{x:0,y:i},{x:0,y:0},{x:n,y:i},{x:n,y:0}];let e,r=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,a=Number.NEGATIVE_INFINITY;for(let n=0;n<t.length;n++)e=g(t[n],R),r=e.x>r?r:e.x,s=e.x<s?s:e.x,o=e.y>o?o:e.y,a=e.y<a?a:e.y;D={xmin:r,xmax:s,ymin:o,ymax:a,spatialReference:S}}else D={xmin:-.5,ymin:.5-i,xmax:n-.5,ymax:.5,spatialReference:S};B&&(D.xmax-D.xmin>400||Math.max(Math.abs(D.xmin),Math.abs(D.xmax))>361)&&(S=null,D.spatialReference=null);const _=U(t);let N,V,z,j,Z;if(_.length>0){z=Math.round(Math.log(n/C(_[0],"IMAGEWIDTH"))/Math.LN2);const t=_.at(-1);j=Math.round(Math.log(n/C(t,"IMAGEWIDTH"))/Math.LN2),N=C(t,"TILEWIDTH"),V=C(t,"TILELENGTH")}N=null!=j&&j>0?N||r:null,V=null!=j&&j>0?V||o:null,r&&(Z=[{maxCol:Math.ceil(n/r)-1,maxRow:Math.ceil(i/o)-1,minRow:0,minCol:0}],_.forEach((t=>{Z.push({maxCol:Math.ceil(C(t,"IMAGEWIDTH")/C(t,"TILEWIDTH"))-1,maxRow:Math.ceil(C(t,"IMAGELENGTH")/C(t,"TILELENGTH"))-1,minRow:0,minCol:0})})));const W=b(t[0],"GDAL_METADATA"),J=P(W);return k+=" "+F({width:n,height:i,tileWidth:r,tileHeight:o,planes:a,ifds:t}),{width:n,height:i,tileWidth:r,tileHeight:o,planes:a,isBSQ:c,pixelType:u,compression:v,noData:f,hasMaskBand:O(t).length===_.length+1,isSupported:x,message:k,extent:D,isPseudoGeographic:B,affine:I?null:R,firstPyramidLevel:z,maximumPyramidLevel:j,pyramidBlockWidth:N,pyramidBlockHeight:V,tileBoundary:Z,metadata:J}}function L(t,e){const r=y(t,"PLANARCONFIGURATION");return r?2===r[0]:!!e&&e.isBSQ}function U(t){return t.filter((t=>1===C(t,"NEWSUBFILETYPE")))}function O(t){return t.filter((t=>{const e=4==(4&(C(t,"NEWSUBFILETYPE")??0)),r=4===C(t,"PHOTOMETRICINTERPRETATION");return e&&r}))}function D(t,e,r){const o=t.getUint32(e,r),n=t.getUint32(e+4,r);return r?n*f+o:o*f+n}function G(t,e,r){let o=r?t.getInt32(e,r):t.getUint32(e,r),n=r?t.getUint32(e+4,r):t.getInt32(e+4,r);const i=(r?o:n)>=0?1:-1;return r?o*=i:n*=i,i*(r?n*f+o:o*f+n)}function B(t,e,r,o){return o?D(t,e,r):t.getUint32(e,r)}function _(t){const e=new DataView(t,0,16),r=e.getUint16(0,!1);let o=null;if(18761===r)o=!0;else{if(19789!==r)throw new Error("unexpected endianess byte");o=!1}const n=e.getUint16(2,o);if(42!==n&&43!==n)throw new Error("unexpected tiff identifier");let i=4;const s=43===n;if(s){const t=e.getUint16(i,o);if(i+=2,8!==t)throw new Error("unsupported bigtiff version");if(0!==e.getUint16(i,o))throw new Error("unsupported bigtiff version");i+=2}return{littleEndian:o,isBigTiff:s,firstIFDPos:B(e,i,o,s)}}function N(t,e,r,n=0,i=l.Z.TIFF_TAGS,s=4){const a=v(t,e,r,n,i,s);let u;const c=a.ifd;if(c){if(l.Z.ifdTags.forEach(((r,o)=>{c.has(o)&&(u=c.get(o),u.data=v(t,e,u.valueOffset-n,n,r).ifd)})),c.has("GEOKEYDIRECTORY")){u=c.get("GEOKEYDIRECTORY");const r=u.values;if(r&&r.length>4){const o=r[0]+"."+r[1]+"."+r[2];u.data=v(t,e,u.valueOffset+6-n,n,l.Z.GEO_KEYS,2).ifd,u.data&&u.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[o]})}}if(c.has("XMP")){u=c.get("XMP");const t=u.values;"number"==typeof t[0]&&7===u.type&&(u.values=[(0,o.f)(new Uint8Array(t))])}}return a}function F(t){const{width:e,height:r,tileHeight:o,tileWidth:n}=t,i=t.planes,s=n?n*o:e*r,a=C(t.ifds[0],"BITSPERSAMPLE");let l="";return s*i>2**30/(a>8?a/8:1)&&(l=n?"tiled tiff exceeding 1 gigabits per tile is not supported":"scanline tiff exceeding 1 gigabits is not supported"),l}async function V(t,e){const{headerInfo:r,ifd:o,offsets:n,sizes:i}=e,s=[];for(let e=0;e<n.length;e++){i[e];const a=await T(t,r.littleEndian,o,n[e],i[e]||t.byteLength);s.push(a)}const l=L(o,r),u=C(o,"BITSPERSAMPLE"),c=p(C(o,"SAMPLEFORMAT")??1,u),h=C(o,"SAMPLESPERPIXEL")||r.planes,f=m(c),d=C(o,"TILEWIDTH"),g=C(o,"TILELENGTH"),y=C(o,"COMPRESSION")??1,w=d*g;let b;const v=[];let x=s[0];const k=34887===y;for(let t=0;t<h;t++){if(b=new f(w),s.length===h)x=s[t],x.length===w&&(b=x);else if(x.length)if(l||k)b=x.length===w?x:x.slice(w*t,w*(t+1));else for(let e=0;e<w;e++)b[e]=x[e*h+t];v.push(b)}const A=r.noData?r.noData[0]:e.noDataValue,S=r.metadata?r.metadata.statistics:null,I=S?S.map((t=>t.min)):null,P=S?S.map((t=>t.max)):null,E={pixelType:c,width:d,height:g,pixels:v,noDataValue:A};return null!=A?(0,a.A)(E,A):I&&P&&e.applyMinMaxConstraint&&(E.mask=M(v,I,P)),E}async function z(t,e={}){const r=e.pyramidLevel||0,o=e.headerInfo||function(t){const{littleEndian:e,isBigTiff:r,firstIFDPos:o}=_(t);let n=o;const i=[];do{const o=N(t,e,n,0,l.Z.TIFF_TAGS,r?8:4);if(!o.success)break;i.push(o.ifd),n=o.nextIFD}while(n>0);return{...R(i),littleEndian:e,isBigTiff:r,ifds:i,pyramidIFDs:U(i),maskIFDs:O(i)}}(t),{ifds:n,noData:i}=o;if(0===n.length)throw new Error("no valid image file directory");const s=F(o);if(s)throw s;let u=null;const c=-1===r?n.at(-1):n[r],h=i??e.noDataValue;return u=o.tileWidth?await async function(t,e,r){const o=w(r,"TILEOFFSETS");if(void 0===o)return null;const n=w(r,"TILEBYTECOUNTS"),{width:i,height:s,pixelType:a,tileWidth:l,tileHeight:u}=R([r]),c=L(r,e),h=C(r,"SAMPLESPERPIXEL")||e.planes,f=i*s,d=C(r,"BITSPERSAMPLE"),p=34887===(C(r,"COMPRESSION")??1),g=m(a),y=[];for(let t=0;t<h;t++)y.push(new g(f));let b,v,x,k,A,S,I,M,P,E,U,O,D;const G=Math.ceil(i/l),B=new Uint8Array(f).fill(255);let _=!1;if(d%8==0)if(p&&c&&h>1){const a=Math.round(o.length/h);for(b=0;b<a;b++){S=Math.floor(b/G)*u,I=b%G*l,M=S*i+I;for(let a=0;a<h;a++){const c=b*h+a;for(0===n[c]?(x=null,_=!0):x=await T(t,e.littleEndian,r,o[c],n[c]),E=0,P=M,O=Math.min(l,i-I),U=Math.min(u,s-S),D=y[a],k=0;k<U;k++)for(P=M+k*i,E=k*l,A=0;A<O;A++,P++,E++)x?D[P]=x[E]:B[P]=0}}}else for(b=0;b<o.length;b++)for(S=Math.floor(b/G)*u,I=b%G*l,M=S*i+I,0===n[b]?(x=null,_=!0):x=await T(t,e.littleEndian,r,o[b],n[b]),E=0,P=M,O=Math.min(l,i-I),U=Math.min(u,s-S),v=0;v<h;v++)if(D=y[v],c||p)for(k=0;k<U;k++)for(P=M+k*i,E=l*u*v+k*l,A=0;A<O;A++,P++,E++)x?D[P]=x[E]:B[P]=0;else for(k=0;k<U;k++)for(P=M+k*i,E=k*l*h+v,A=0;A<O;A++,P++,E+=h)x?D[P]=x[E]:B[P]=0;return{width:i,height:s,pixelType:a,pixels:y,mask:_?B:void 0}}(t,o,c):await I(t,o,c),u?(null!=h&&(0,a.A)(u,h),u):u}},9832:(t,e,r)=>{r.d(e,{Z:()=>a});const o=(()=>{const t=[];return t[254]="NEWSUBFILETYPE",t[255]="SUBFILETYPE",t[256]="IMAGEWIDTH",t[257]="IMAGELENGTH",t[258]="BITSPERSAMPLE",t[259]="COMPRESSION",t[262]="PHOTOMETRICINTERPRETATION",t[263]="THRESHHOLDING",t[264]="CELLWIDTH",t[265]="CELLLENGTH",t[266]="FILLORDER",t[269]="DOCUMENTNAME",t[270]="IMAGEDESCRIPTION",t[271]="MAKE",t[272]="MODEL",t[273]="STRIPOFFSETS",t[274]="ORIENTATION",t[277]="SAMPLESPERPIXEL",t[278]="ROWSPERSTRIP",t[279]="STRIPBYTECOUNTS",t[280]="MINSAMPLEVALUE",t[281]="MAXSAMPLEVALUE",t[282]="XRESOLUTION",t[283]="YRESOLUTION",t[284]="PLANARCONFIGURATION",t[285]="PAGENAME",t[286]="XPOSITION",t[287]="YPOSITION",t[288]="FREEOFFSETS",t[289]="FREEBYTECOUNTS",t[290]="GRAYRESPONSEUNIT",t[291]="GRAYRESPONSECURVE",t[292]="T4OPTIONS",t[293]="T6OPTIONS",t[296]="RESOLUTIONUNIT",t[297]="PAGENUMBER",t[300]="COLORRESPONSEUNIT",t[301]="TRANSFERFUNCTION",t[305]="SOFTWARE",t[306]="DATETIME",t[315]="ARTIST",t[316]="HOSTCOMPUTER",t[317]="PREDICTOR",t[318]="WHITEPOINT",t[319]="PRIMARYCHROMATICITIES",t[320]="COLORMAP",t[321]="HALFTONEHINTS",t[322]="TILEWIDTH",t[323]="TILELENGTH",t[324]="TILEOFFSETS",t[325]="TILEBYTECOUNTS",t[326]="BADFAXLINES",t[327]="CLEANFAXDATA",t[328]="CONSECUTIVEBADFAXLINES",t[330]="SUBIFD",t[332]="INKSET",t[333]="INKNAMES",t[334]="NUMBEROFINKS",t[336]="DOTRANGE",t[337]="TARGETPRINTER",t[338]="EXTRASAMPLES",t[339]="SAMPLEFORMAT",t[340]="SMINSAMPLEVALUE",t[341]="SMAXSAMPLEVALUE",t[342]="TRANSFERRANGE",t[347]="JPEGTABLES",t[512]="JPEGPROC",t[513]="JPEGIFOFFSET",t[514]="JPEGIFBYTECOUNT",t[515]="JPEGRESTARTINTERVAL",t[517]="JPEGLOSSLESSPREDICTORS",t[518]="JPEGPOINTTRANSFORM",t[519]="JPEGQTABLES",t[520]="JPEGDCTABLES",t[521]="JPEGACTABLES",t[529]="YCBCRCOEFFICIENTS",t[530]="YCBCRSUBSAMPLING",t[531]="YCBCRPOSITIONING",t[532]="REFERENCEBLACKWHITE",t[700]="XMP",t[33550]="GEOPIXELSCALE",t[33922]="GEOTIEPOINTS",t[33432]="COPYRIGHT",t[42112]="GDAL_METADATA",t[42113]="GDAL_NODATA",t[50844]="RPCCOEFFICIENT",t[34264]="GEOTRANSMATRIX",t[34735]="GEOKEYDIRECTORY",t[34736]="GEODOUBLEPARAMS",t[34737]="GEOASCIIPARAMS",t[34665]="EXIFIFD",t[34853]="GPSIFD",t[40965]="INTEROPERABILITYIFD",t})(),n=(()=>{const t=o.slice();return t[36864]="ExifVersion",t[40960]="FlashpixVersion",t[40961]="ColorSpace",t[42240]="Gamma",t[37121]="ComponentsConfiguration",t[37122]="CompressedBitsPerPixel",t[40962]="PixelXDimension",t[40963]="PixelYDimension",t[37500]="MakerNote",t[37510]="UserComment",t[40964]="RelatedSoundFile",t[36867]="DateTimeOriginal",t[36868]="DateTimeDigitized",t[36880]="OffsetTime",t[36881]="OffsetTimeOriginal",t[36882]="OffsetTimeDigitized",t[37520]="SubSecTime",t[37521]="SubSecTimeOriginal",t[37522]="SubSecTimeDigitized",t[37888]="Temperature",t[37889]="Humidity",t[37890]="Pressure",t[37891]="WaterDepth",t[37892]="Acceleration",t[37893]="CameraElevationAngle",t[42016]="ImageUniqueID",t[42032]="CameraOwnerName",t[42033]="BodySerialNumber",t[42034]="LensSpecification",t[42035]="LensMake",t[42036]="LensModel",t[42037]="LensSerialNumber",t[33434]="ExposureTime",t[33437]="FNumber",t[34850]="ExposureProgram",t[34852]="SpectralSensitivity",t[34855]="PhotographicSensitivity",t[34856]="OECF",t[34864]="SensitivityType",t[34865]="StandardOutputSensitivity",t[34866]="RecommendedExposureIndex",t[34867]="ISOSpeed",t[34868]="ISOSpeedLatitudeyyy",t[34869]="ISOSpeedLatitudezzz",t[37377]="ShutterSpeedValue",t[37378]="ApertureValue",t[37379]="BrightnessValue",t[37380]="ExposureBiasValue",t[37381]="MaxApertureValue",t[37382]="SubjectDistance",t[37383]="MeteringMode",t[37384]="LightSource",t[37385]="Flash",t[37386]="FocalLength",t[37396]="SubjectArea",t[41483]="FlashEnergy",t[41484]="SpatialFrequencyResponse",t[41486]="FocalPlaneXResolution",t[41487]="FocalPlaneYResolution",t[41488]="FocalPlaneResolutionUnit",t[41492]="SubjectLocation",t[41493]="ExposureIndex",t[41495]="SensingMethod",t[41728]="FileSource",t[41729]="SceneType",t[41730]="CFAPattern",t[41985]="CustomRendered",t[41986]="ExposureMode",t[41987]="WhiteBalance",t[41988]="DigitalZoomRatio",t[41989]="FocalLengthIn35mmFilm",t[41990]="SceneCaptureType",t[41991]="GainControl",t[41992]="Contrast",t[41993]="Saturation",t[41994]="Sharpness",t[41995]="DeviceSettingDescription",t[41996]="SubjectDistanceRange",t})(),i=(()=>{const t=[];return t[1024]="GTModelTypeGeoKey",t[1025]="GTRasterTypeGeoKey",t[1026]="GTCitationGeoKey",t[2048]="GeographicTypeGeoKey",t[2049]="GeogCitationGeoKey",t[2050]="GeogGeodeticDatumGeoKey",t[2051]="GeogPrimeMeridianGeoKey",t[2052]="GeogLinearUnitsGeoKey",t[2053]="GeogLinearUnitSizeGeoKey",t[2054]="GeogAngularUnitsGeoKey",t[2055]="GeogAngularUnitSizeGeoKey",t[2056]="GeogEllipsoidGeoKey",t[2057]="GeogSemiMajorAxisGeoKey",t[2058]="GeogSemiMinorAxisGeoKey",t[2059]="GeogInvFlatteningGeoKey",t[2061]="GeogPrimeMeridianLongGeoKey",t[2060]="GeogAzimuthUnitsGeoKey",t[3072]="ProjectedCSTypeGeoKey",t[3073]="PCSCitationGeoKey",t[3074]="ProjectionGeoKey",t[3075]="ProjCoordTransGeoKey",t[3076]="ProjLinearUnitsGeoKey",t[3077]="ProjLinearUnitSizeGeoKey",t[3078]="ProjStdParallel1GeoKey",t[3079]="ProjStdParallel2GeoKey",t[3080]="ProjNatOriginLongGeoKey",t[3081]="ProjNatOriginLatGeoKey",t[3082]="ProjFalseEastingGeoKey",t[3083]="ProjFalseNorthingGeoKey",t[3084]="ProjFalseOriginLongGeoKey",t[3085]="ProjFalseOriginLatGeoKey",t[3086]="ProjFalseOriginEastingGeoKey",t[3087]="ProjFalseOriginNorthingGeoKey",t[3088]="ProjCenterLongGeoKey",t[3090]="ProjCenterEastingGeoKey",t[3091]="ProjCenterNorthingGeoKey",t[3092]="ProjScaleAtNatOriginGeoKey",t[3093]="ProjScaleAtCenterGeoKey",t[3094]="ProjAzimuthAngleGeoKey",t[3095]="ProjStraightVertPoleLongGeoKey",t[4096]="VerticalCSTypeGeoKey",t[4097]="VerticalCitationGeoKey",t[4098]="VerticalDatumGeoKey",t[4099]="VerticalUnitsGeoKey",t})(),s=new Map;s.set("EXIFIFD",n),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:o,ifdTags:s,GEO_KEYS:i,getTagName:(t,e)=>{let r=(e||o)[t];return void 0===r&&(r="unknown"+String(t)),r}}},81578:(t,e,r)=>{r.d(e,{A:()=>a,r:()=>s});const o=9999999e31,n=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],unknown:void 0,c64:void 0,c128:void 0};function s(t){return i[t]??[-34028234663852886e22,34028234663852886e22]}function a(t,e,r){if(t.depthCount&&t.depthCount>1)return;const{pixels:i,statistics:a,pixelType:l}=t,u=i[0].length,c=t.bandMasks??[],h=t.mask??new Uint8Array(u).fill(255),f="f32"===l||"f64"===l,d=s(l);let p=!1;for(let t=0;t<i.length;t++){const s="number"==typeof e?e:e[t];if(null==s)continue;const u=a?.[t].minValue??d[0],m=a?.[t].maxValue??d[1];if(u>s+Number.EPSILON||m<s-Number.EPSILON)continue;const g=c[t]||h.slice(),y=i[t],w=r?.customFloatTolerance;if(f&&0!==w){let t=w;t||(t=Math.abs(s)>=o?n*Math.abs(s):"f32"===l?2**-23:Number.EPSILON);for(let e=0;e<y.length;e++)g[e]&&Math.abs(y[e]-s)<t&&(y[e]=0,g[e]=0,h[e]=0,p=!0)}else for(let t=0;t<y.length;t++)g[t]&&y[t]===s&&(y[t]=0,g[t]=0,h[t]=0,p=!0);c[t]=g}p&&(t.bandMasks=t.bandMasks||t.pixels.length>1?c:null,t.mask=h),p&&"updateStatistics"in t&&t.updateStatistics()}},48279:(t,e,r)=>{r.d(e,{f:()=>o});const o=(()=>{const t=new ArrayBuffer(4),e=new Uint8Array(t);return new Uint32Array(t)[0]=1,1===e[0]})()},55914:(t,e,r)=>{r.d(e,{CD:()=>n,DX:()=>o,Gd:()=>c,Pz:()=>h,Qh:()=>O,SJ:()=>f,Uk:()=>D,Vl:()=>L,XV:()=>d,a2:()=>g,hd:()=>l,nA:()=>x,nk:()=>u,oB:()=>v,pW:()=>S,sS:()=>C,us:()=>A,wV:()=>p,zp:()=>m});var o,n,i,s=r(5847),a=r(81578);(i=o||(o={}))[i.matchAny=0]="matchAny",i[i.matchAll=1]="matchAll",function(t){t[t.bestMatch=0]="bestMatch",t[t.fail=1]="fail"}(n||(n={}));const l=6;function u(t){return null!=t&&"esri.layers.support.PixelBlock"===t.declaredClass&&t.pixels&&t.pixels.length>0}function c(t){if(!t?.length||t.some((t=>!u(t))))return null;if(1===t.length)return t[0]?.clone()??null;const e=t,{width:r,height:o,pixelType:n}=e[0];if(e.some((t=>t.width!==r||t.height!==o)))return null;const i=e.map((({mask:t})=>t)).filter((t=>null!=t));let a=null;i.length&&(a=new Uint8Array(r*o),a.set(i[0]),i.length>1&&b(i.slice(1),a));const l=[];e.forEach((({pixels:t})=>l.push(...t)));const c=e.map((({statistics:t})=>t)).filter((t=>t?.length)),h=[];return c.forEach((t=>h.push(...t))),new s.Z({pixelType:n,width:r,height:o,mask:a,pixels:l,statistics:h.length?h:null})}function h(t){if(!t)return;const e=t.colormap;if(!e||0===e.length)return;const r=e.sort(((t,e)=>t[0]-e[0]));let o=0;r[0][0]<0&&(o=r[0][0]);const n=Math.max(256,r.at(-1)[0]-o+1),i=new Uint8Array(4*n),s=[];let a,l=0,u=0;const c=5===r[0].length;if(n>65536)return r.forEach((t=>{s[t[0]-o]=c?t.slice(1):t.slice(1).concat([255])})),{indexed2DColormap:s,offset:o,alphaSpecified:c};if(t.fillUnspecified)for(a=r[u],l=a[0]-o;l<n;l++)i[4*l]=a[1],i[4*l+1]=a[2],i[4*l+2]=a[3],i[4*l+3]=c?a[4]:255,l===a[0]-o&&(a=u===r.length-1?a:r[++u]);else for(l=0;l<r.length;l++)a=r[l],u=4*(a[0]-o),i[u]=a[1],i[u+1]=a[2],i[u+2]=a[3],i[u+3]=c?a[4]:255;return{indexedColormap:i,offset:o,alphaSpecified:c}}function f(t,e){if(!u(t))return t;if(!e||!e.indexedColormap&&!e.indexed2DColormap)return t;const r=t.clone(),o=r.pixels;let n=r.mask;const i=r.width*r.height;if(1!==o.length)return t;const{indexedColormap:s,indexed2DColormap:a,offset:l,alphaSpecified:c}=e;let h=0;const f=o[0],d=new Uint8Array(f.length),p=new Uint8Array(f.length),m=new Uint8Array(f.length);let g,y=0;if(s){const t=s.length-1;if(null!=n)for(h=0;h<i;h++)n[h]&&(y=4*(f[h]-l),y<l||y>t?n[h]=0:(d[h]=s[y],p[h]=s[y+1],m[h]=s[y+2],n[h]=s[y+3]));else{for(n=new Uint8Array(i),h=0;h<i;h++)y=4*(f[h]-l),y<l||y>t?n[h]=0:(d[h]=s[y],p[h]=s[y+1],m[h]=s[y+2],n[h]=s[y+3]);r.mask=n}}else if(a)if(null!=n)for(h=0;h<i;h++)n[h]&&(g=a[f[h]],d[h]=g[0],p[h]=g[1],m[h]=g[2],n[h]=g[3]);else{for(n=new Uint8Array(i),h=0;h<i;h++)g=a[f[h]],d[h]=g[0],p[h]=g[1],m[h]=g[2],n[h]=g[3];r.mask=n}return r.pixels=[d,p,m],r.statistics=null,r.pixelType="u8",r.maskIsAlpha=c,r}function d(t,e){if(!u(t))return null;const{pixels:r,mask:o}=t,n=r.length;let i=e.lut;const{offset:a}=e;i&&1===i[0].length&&(i=r.map((()=>i)));const l=[],c=e.outputPixelType||"u8";for(let t=0;t<n;t++){const e=p(r[t],o,i[t],a||0,c);l.push(e)}const h=new s.Z({width:t.width,height:t.height,pixels:l,mask:o,pixelType:c});return h.updateStatistics(),h}function p(t,e,r,o,n){const i=t.length,a=s.Z.createEmptyBand(n,i);if(e)for(let n=0;n<i;n++)e[n]&&(a[n]=r[t[n]-o]);else for(let e=0;e<i;e++)a[e]=r[t[e]-o];return a}function m(t,e){if(!u(t))return null;const r=t.clone(),{pixels:o}=r,n=r.width*r.height,i=e.length,s=Math.floor(i/2),a=e[Math.floor(s)],l=o[0];let c,h,f,d,p,m,g=!1;const y=new Uint8Array(n),w=new Uint8Array(n),b=new Uint8Array(n);let C=r.mask;const v=4===e[0].mappedColor.length;for(C||(C=new Uint8Array(n),C.fill(v?255:1),r.mask=C),p=0;p<n;p++)if(C[p]){for(c=l[p],g=!1,m=s,h=a,f=0,d=i-1;d-f>1;){if(c===h.value){g=!0;break}c>h.value?f=m:d=m,m=Math.floor((f+d)/2),h=e[Math.floor(m)]}g||(c===e[f].value?(h=e[f],g=!0):c===e[d].value?(h=e[d],g=!0):c<e[f].value?(g=!1,h=null):c>e[f].value&&(c<e[d].value?(h=e[f],g=!0):d===i-1?(g=!1,h=null):(h=e[d],g=!0))),g?(y[p]=h.mappedColor[0],w[p]=h.mappedColor[1],b[p]=h.mappedColor[2],C[p]=h.mappedColor[3]):y[p]=w[p]=b[p]=C[p]=0}return r.pixels=[y,w,b],r.mask=C,r.pixelType="u8",r.maskIsAlpha=v,r}function g(t,e){if(!u(t))return null;const{width:r,height:o}=t,{inputRanges:n,outputValues:i,outputPixelType:l,noDataRanges:c,allowUnmatched:h,isLastInputRangeInclusive:f}=e,d=t.pixels[0],p=s.Z.createEmptyBand(l,d.length),m=t.mask,g=new Uint8Array(r*o);m?g.set(m):g.fill(255);const y=t.pixelType.startsWith("f")?1e-6:0,w=n.map((t=>t-y));w[0]=n[0],w[w.length-1]=n.at(-1)+(f?1e-6:0);const b=n.length/2,[C,v]=(0,a.r)(l);for(let t=0;t<o;t++)for(let e=0;e<r;e++){const o=t*r+e;if(g[o]){const t=d[o];let e=!1;for(let r=b-1;r>=0;r--)if(t===w[2*r]||t>w[2*r]&&t<w[2*r+1]){p[o]=i[r],e=!0;break}e||(h?p[o]=t>v?v:t<C?C:t:g[o]=0)}}const x=c?.length;if(x)for(let t=0;t<o;t++)for(let e=0;e<r;e++){const o=t*r+e;if(!m||m[o]){const t=d[o];for(let e=0;e<x;e+=2)if(t>=c[e]&&t<=c[e+1]){p[o]=0,g[o]=0;break}}}return new s.Z({width:r,height:o,pixelType:l,pixels:[p],mask:g})}function y(t,e,r,o){const n=null!=r&&r.length>=2?new Set(r):null,i=1===r?.length?r[0]:null,s=!!e?.length;for(let r=0;r<t.length;r++)if(o[r]){const a=t[r];if(s){let t=!1;for(let r=0;r<e.length;r+=2)if(a>=e[r]&&a<=e[r+1]){t=!0;break}t||(o[r]=0)}o[r]&&(a===i||n?.has(a))&&(o[r]=0)}}function w(t,e){const r=t[0].length;for(let o=0;o<r;o++)if(e[o]){let r=!1;for(let e=0;e<t.length;e++)if(t[e][o]){r=!0;break}r||(e[o]=0)}}function b(t,e){const r=t[0].length;for(let o=0;o<r;o++)if(e[o]){let r=!1;for(let e=0;e<t.length;e++)if(0===t[e][o]){r=!0;break}r&&(e[o]=0)}}function C(t,e){if(!u(t))return null;const{width:r,height:o,pixels:n}=t,i=r*o,a=new Uint8Array(i);t.mask?a.set(t.mask):a.fill(255);const l=n.length,{includedRanges:c,noDataValues:h,outputPixelType:f,matchAll:d,lookups:m}=e;if(m){const t=[];for(let e=0;e<l;e++){const r=m[e],o=p(n[e],a,r.lut,r.offset||0,"u8");t.push(o)}1===t.length?a.set(t[0]):d?w(t,a):b(t,a)}else if(d){const t=[];for(let e=0;e<l;e++){const r=new Uint8Array(i);r.set(a),y(n[e],c?.slice(2*e,2*e+2),h?.[e],r),t.push(r)}1===t.length?a.set(t[0]):w(t,a)}else for(let t=0;t<l;t++)y(n[t],c?.slice(2*t,2*t+2),h?.[t],a);return new s.Z({width:r,height:o,pixelType:f,pixels:n,mask:a})}function v(t){const{srcPixelType:e,inputRanges:r,outputValues:o,allowUnmatched:n,noDataRanges:i,isLastInputRangeInclusive:l,outputPixelType:u}=t;if("u8"!==e&&"s8"!==e&&"u16"!==e&&"s16"!==e)return null;const c=e.includes("16")?65536:256,h=e.includes("s")?-c/2:0,f=s.Z.createEmptyBand(u,c),d=new Uint8Array(c);n&&d.fill(255);const[p,m]=(0,a.r)(u);if(r?.length&&o?.length){const t=1e-6,e=r.map((e=>e-t));e[0]=r[0],l&&(e[e.length-1]=r.at(-1));for(let t=0;t<e.length;t++){const r=o[t]>m?m:o[t]<p?p:o[t],n=Math.ceil(e[2*t]-h),i=Math.floor(e[2*t+1]-h);for(let t=n;t<=i;t++)f[t]=r,d[t]=255}}if(i?.length)for(let t=0;t<i.length;t++){const e=Math.ceil(i[2*t]-h),r=Math.floor(i[2*t+1]-h);for(let t=e;t<=r;t++)d[t]=0}return{lut:f,offset:h,mask:d}}function x(t,e,r){if("u8"!==t&&"s8"!==t&&"u16"!==t&&"s16"!==t)return null;const o=t.includes("16")?65536:256,n=t.includes("s")?-o/2:0,i=new Uint8Array(o);if(e)for(let t=0;t<e.length;t++){const r=Math.ceil(e[2*t]-n),o=Math.floor(e[2*t+1]-n);for(let t=r;t<=o;t++)i[t]=255}else i.fill(255);if(r)for(let t=0;t<r.length;t++)i[r[t]-n]=0;return{lut:i,offset:n}}function k(t,e,r,o,n,i){const{width:s,height:a}=r.block,{x:l,y:u}=r.offset,{width:c,height:h}=r.mosaic,f=function(t,e,r,o,n,i,s,a){return{xmin:n<=r*t?0:n<r*t+t?n-r*t:t,ymin:i<=o*e?0:i<o*e+e?i-o*e:e,xmax:n+s<=r*t?0:n+s<r*t+t?n+s-r*t:t,ymax:i+a<=o*e?0:i+a<o*e+e?i+a-o*e:e}}(s,a,o,n,l,u,c,h);let d=0,p=0;if(i){const t=i.hasGCSSShiftTransform?360:i.halfWorldWidth??0,e=s*i.resolutionX,r=i.startX+o*e;r<t&&r+e>t?p=i.rightPadding:r>=t&&(d=i.leftMargin-i.rightPadding,p=0)}if(f.xmax-=p,"number"!=typeof e)for(let r=f.ymin;r<f.ymax;r++){const i=(n*a+r-u)*c+(o*s-l)+d,h=r*s;for(let r=f.xmin;r<f.xmax;r++)t[i+r]=e[h+r]}else for(let r=f.ymin;r<f.ymax;r++){const i=(n*a+r-u)*c+(o*s-l)+d;for(let r=f.xmin;r<f.xmax;r++)t[i+r]=e}}function A(t,e,r={}){const{clipOffset:o,clipSize:n,alignmentInfo:i,blockWidths:a}=r;if(a)return function(t,e,r){const o=t.find((t=>null!=t));if(null==o)return null;const n=t.some((t=>null==t||!!t.mask)),{width:i,height:a}=e,l=n?new Uint8Array(i*a):null,{blockWidths:c}=r,h=[],f=o.getPlaneCount(),d=s.Z.getPixelArrayConstructor(o.pixelType);if(n)for(let e=0,r=0;e<t.length;r+=c[e],e++){const o=t[e];if(!u(o))continue;const n=o.mask;for(let t=0;t<a;t++)for(let s=0;s<c[e];s++)l[t*i+s+r]=null==n?255:n[t*o.width+s]}const p=t.some((t=>null!=t&&t.bandMasks&&t.bandMasks.length>1)),m=p?[]:void 0,g=i*a;for(let e=0;e<f;e++){const r=new d(g),o=p?new Uint8Array(g):void 0;for(let n=0,s=0;n<t.length;s+=c[n],n++){const l=t[n];if(!u(l))continue;const h=l.pixels[e];if(null!=h){for(let t=0;t<a;t++)for(let e=0;e<c[n];e++)r[t*i+e+s]=h[t*l.width+e];if(o){const t=l.bandMasks?.[e]??l.mask;for(let e=0;e<a;e++)for(let r=0;r<c[n];r++)o[e*i+r+s]=t?t[e*l.width+r]:255}}}h.push(r),m&&o&&m.push(o)}const y=new s.Z({width:i,height:a,mask:l,bandMasks:m,pixels:h,pixelType:o.pixelType});return y.updateStatistics(),y}(t,e,{blockWidths:a});const l=t.find((t=>u(t)));if(null==l)return null;const c=n?n.width:e.width,h=n?n.height:e.height,f=l.width,d=l.height,p=e.width/f,m=e.height/d,g={offset:o||{x:0,y:0},mosaic:n||e,block:{width:f,height:d}},y=l.pixelType,w=s.Z.getPixelArrayConstructor(y),b=l.pixels.length,C=[];let v,x;for(let e=0;e<b;e++){x=new w(c*h);for(let r=0;r<m;r++)for(let o=0;o<p;o++){const n=t[r*p+o];u(n)&&(v=n.pixels[e],k(x,v,g,o,r,i))}C.push(x)}const A=t.some((t=>null==t||null!=t.mask&&t.mask.length>0)),S=t.some((t=>null!=t&&t.bandMasks&&t.bandMasks.length>1)),T=A?new Uint8Array(c*h):void 0,I=S?[]:void 0;if(T){for(let e=0;e<m;e++)for(let r=0;r<p;r++){const o=t[e*p+r],n=null!=o?o.mask:null;k(T,null!=n?n:o?255:0,g,r,e,i)}if(I)for(let e=0;e<b;e++){const r=new Uint8Array(c*h);for(let o=0;o<m;o++)for(let n=0;n<p;n++){const s=t[o*p+n],a=s?.bandMasks?.[e]??s?.mask;k(r,null!=a?a:s?255:0,g,n,o,i)}I.push(r)}}const M=new s.Z({width:c,height:h,pixels:C,pixelType:y,bandMasks:I,mask:T});return M.updateStatistics(),M}function S(t,e,r){if(!u(t))return null;const{width:o,height:n}=t,i=e.x,s=e.y,a=r.width+i,l=r.height+s;if(i<0||s<0||a>o||l>n)return t;if(0===i&&0===s&&a===o&&l===n)return t;t.mask||(t.mask=new Uint8Array(o*n));const c=t.mask;for(let t=0;t<n;t++){const e=t*o;for(let r=0;r<o;r++)c[e+r]=t<s||t>=l||r<i||r>=a?0:1}return t.updateStatistics(),t}function T(t){if(!u(t))return null;const e=t.clone(),{width:r,height:o,pixels:n}=t,i=n[0],s=e.pixels[0],a=t.mask;for(let t=2;t<o-1;t++){const e=new Map;for(let o=t-2;o<t+2;o++)for(let t=0;t<4;t++){const n=o*r+t;P(e,i[n],a?a[n]:1)}s[t*r]=I(e),s[t*r+1]=s[t*r+2]=s[t*r];let o=3;for(;o<r-1;o++){let n=(t-2)*r+o+1;P(e,i[n],a?a[n]:1),n=(t-1)*r+o+1,P(e,i[n],a?a[n]:1),n=t*r+o+1,P(e,i[n],a?a[n]:1),n=(t+1)*r+o+1,P(e,i[n],a?a[n]:1),n=(t-2)*r+o-3,M(e,i[n],a?a[n]:1),n=(t-1)*r+o-3,M(e,i[n],a?a[n]:1),n=t*r+o-3,M(e,i[n],a?a[n]:1),n=(t+1)*r+o-3,M(e,i[n],a?a[n]:1),s[t*r+o]=I(e)}s[t*r+o+1]=s[t*r+o]}for(let t=0;t<r;t++)s[t]=s[r+t]=s[2*r+t],s[(o-1)*r+t]=s[(o-2)*r+t];return e.updateStatistics(),e}function I(t){if(0===t.size)return 0;let e=0,r=-1,o=0;const n=t.keys();let i=n.next();for(;!i.done;)o=t.get(i.value),o>e&&(r=i.value,e=o),i=n.next();return r}function M(t,e,r){if(0===r)return;const o=t.get(e);1===o?t.delete(e):t.set(e,o-1)}function P(t,e,r){0!==r&&t.set(e,t.has(e)?t.get(e)+1:1)}function E(t,e,r){let{x:o,y:n}=e;const{width:i,height:a}=r;if(0===o&&0===n&&a===t.height&&i===t.width)return t;const{width:l,height:c}=t,h=Math.max(0,n),f=Math.max(0,o),d=Math.min(o+i,l),p=Math.min(n+a,c);if(d<0||p<0||!u(t))return null;o=Math.max(0,-o),n=Math.max(0,-n);const{pixels:m}=t,g=i*a,y=m.length,w=[];for(let e=0;e<y;e++){const r=m[e],a=s.Z.createEmptyBand(t.pixelType,g);for(let t=h;t<p;t++){const e=t*l;let s=(t+n-h)*i+o;for(let t=f;t<d;t++)a[s++]=r[e+t]}w.push(a)}const b=new Uint8Array(g),C=t.mask;for(let t=h;t<p;t++){const e=t*l;let r=(t+n-h)*i+o;for(let t=f;t<d;t++)b[r++]=C?C[e+t]:1}const v=new s.Z({width:r.width,height:r.height,pixelType:t.pixelType,pixels:w,mask:b});return v.updateStatistics(),v}function R(t,e=!0){if(!u(t))return null;const{pixels:r,width:o,height:n,mask:i,pixelType:a}=t,l=[],c=Math.round(o/2),h=Math.round(n/2),f=n-1,d=o-1;for(let t=0;t<r.length;t++){const i=r[t],u=s.Z.createEmptyBand(a,c*h);let p=0;for(let t=0;t<n;t+=2)for(let r=0;r<o;r+=2){const n=i[t*o+r];if(e){const e=r===d?n:i[t*o+r+1],s=t===f?n:i[t*o+r+o],a=r===d?s:t===f?e:i[t*o+r+o+1];u[p++]=(n+e+s+a)/4}else u[p++]=n}l.push(u)}let p=null;if(null!=i){p=new Uint8Array(c*h);let t=0;for(let r=0;r<n;r+=2)for(let n=0;n<o;n+=2){const s=i[r*o+n];if(e){const e=n===d?s:i[r*o+n+1],a=r===f?s:i[r*o+n+o],l=n===d?a:r===f?e:i[r*o+n+o+1];p[t++]=s*e*a*l?1:0}else p[t++]=s}}return new s.Z({width:c,height:h,pixelType:a,pixels:l,mask:p})}function L(t,e,r){if(!u(t))return null;const{width:o,height:n}=e;let{width:i,height:s}=t;const a=new Map,l={x:0,y:0},c=null==r?1:1+r;let h=t;for(let t=0;t<c;t++){const r=Math.ceil(i/o),u=Math.ceil(s/n);for(let i=0;i<u;i++){l.y=i*n;for(let n=0;n<r;n++){l.x=n*o;const r=E(h,l,e);a.set(`${t}/${i}/${n}`,r)}}t<c-1&&(h=R(h)),i=Math.round(i/2),s=Math.round(s/2)}return a}function U(t,e,r,o,n=0){const{width:i,height:s}=t,{width:a,height:l}=e,u=o.cols,c=o.rows,h=Math.ceil(a/u-.1/u),f=Math.ceil(l/c-.1/c);let d,p,m,g,y,w,b;const C=h*u,v=C*f*c,x=new Float32Array(v),k=new Float32Array(v),A=new Uint32Array(v),S=new Uint32Array(v);let T,I,M=0;for(let t=0;t<f;t++)for(let e=0;e<h;e++){d=12*(t*h+e),p=r[d],m=r[d+1],g=r[d+2],y=r[d+3],w=r[d+4],b=r[d+5];for(let r=0;r<c;r++){M=(t*c+r)*C+e*u,I=(r+.5)/c;for(let t=0;t<r;t++)T=(t+.5)/u,x[M+t]=(p*T+m*I+g)*i+n,k[M+t]=(y*T+w*I+b)*s+n,A[M+t]=Math.floor(x[M+t]),S[M+t]=Math.floor(k[M+t])}d+=6,p=r[d],m=r[d+1],g=r[d+2],y=r[d+3],w=r[d+4],b=r[d+5];for(let r=0;r<c;r++){M=(t*c+r)*C+e*u,I=(r+.5)/c;for(let t=r;t<u;t++)T=(t+.5)/u,x[M+t]=(p*T+m*I+g)*i+n,k[M+t]=(y*T+w*I+b)*s+n,A[M+t]=Math.floor(x[M+t]),S[M+t]=Math.floor(k[M+t])}}return{offsets_x:x,offsets_y:k,offsets_xi:A,offsets_yi:S,gridWidth:C}}function O(t,e){const{coefficients:r,spacing:o}=e,{offsets_x:n,offsets_y:i,gridWidth:s}=U(t,t,r,{rows:o[0],cols:o[1]}),{width:a,height:l}=t,u=new Float32Array(a*l),c=180/Math.PI;for(let t=0;t<l;t++)for(let e=0;e<a;e++){const r=t*s+e,o=0===t?r:r-s,h=t===l-1?r:r+s,f=n[o]-n[h],d=i[h]-i[o];if(isNaN(f)||isNaN(d))u[t*a+e]=90;else{let r=Math.atan2(d,f)*c;r=(360+r)%360,u[t*a+e]=r}}return u}function D(t,e,r,o,n="nearest"){if(!u(t))return null;"majority"===n&&(t=T(t));const{pixels:i,mask:a,bandMasks:l,pixelType:c}=t,h=t.width,f=t.height,d=s.Z.getPixelArrayConstructor(c),p=i.length,{width:m,height:g}=e;let y=!1;for(let t=0;t<r.length;t+=3)-1===r[t]&&-1===r[t+1]&&-1===r[t+2]&&(y=!0);const{offsets_x:w,offsets_y:b,offsets_xi:C,offsets_yi:v,gridWidth:x}=U({width:h,height:f},e,r,o,"majority"===n?.5:0);let k;const A=(t,e,r,o)=>{const n=t instanceof Float32Array||t instanceof Float64Array?0:.5;for(let i=0;i<g;i++){k=i*x;for(let s=0;s<m;s++){if(w[k]<0||b[k]<0)t[i*m+s]=0;else if(o)t[i*m+s]=e[C[k]+v[k]*h];else{const o=Math.floor(w[k]),a=Math.floor(b[k]),l=Math.ceil(w[k]),u=Math.ceil(b[k]),c=w[k]-o,f=b[k]-a;if(!r||r[o+a*h]&&r[l+a*h]&&r[o+u*h]&&r[l+u*h]){const r=(1-c)*e[o+a*h]+c*e[l+a*h],d=(1-c)*e[o+u*h]+c*e[l+u*h];t[i*m+s]=(1-f)*r+f*d+n}else t[i*m+s]=e[C[k]+v[k]*h]}k++}}},S=[];let I;const M=l?.length===p,P=[];for(let t=0;t<p;t++){if(M){const e=new Uint8Array(m*g);A(e,l[t],l[t],!0),P.push(e)}I=new d(m*g),A(I,i[t],M?l[t]:a,"nearest"===n||"majority"===n),S.push(I)}const E=new s.Z({width:m,height:g,pixelType:c,pixels:S,bandMasks:M?P:void 0});if(null!=a)E.mask=new Uint8Array(m*g),A(E.mask,a,a,!0);else if(y){E.mask=new Uint8Array(m*g);for(let t=0;t<m*g;t++)E.mask[t]=w[t]<0||b[t]<0?0:1}return E.updateStatistics(),E}},15612:(t,e,r)=>{r.d(e,{AV:()=>g,Hv:()=>p,Oh:()=>m,ZF:()=>h,dy:()=>w,hE:()=>c,js:()=>d,oc:()=>u,um:()=>y});var o=r(70586),n=r(5847),i=r(81578),s=r(75509);const a=1,l=[.299,.587,.114];function u(t,e=256){e=Math.min(e,256);const{size:r,counts:o}=t,n=new Uint8Array(r),i=o.reduce(((t,r)=>t+r/e),0);let s=0,a=0,l=0,u=i;for(let t=0;t<r;t++)if(l+=o[t],!(t<r-1&&l+o[t+1]<u)){for(;s<e-1&&u<l;)s++,u+=i;for(let e=a;e<=t;e++)n[e]=s;a=t+1}for(let t=a;t<r;t++)n[t]=e-1;return n}function c(t){const{minCutOff:e,maxCutOff:r,gamma:o,pixelType:n,rounding:i}=t,s=t.outMin||0,a=t.outMax||255;if(!["u8","u16","s8","s16"].includes(n))return null;const l=e.length;let u,c,h=0;"s8"===n?h=-127:"s16"===n&&(h=-32767);let f=256;["u16","s16"].includes(n)&&(f=65536);const d=[],p=[],m=a-s;for(u=0;u<l;u++)p[u]=r[u]-e[u],d[u]=0===p[u]?0:m/p[u];let g;const w=[];let b,C,v;if(o&&o.length>=l){const t=y(l,o);for(u=0;u<l;u++){for(v=[],c=0;c<f;c++)if(0!==p[u])if(b=c+h,g=(b-e[u])/p[u],C=1,o[u]>1&&(C-=(1/m)**(g*t[u])),b<r[u]&&b>e[u]){const t=C*m*g**(1/o[u])+s;v[c]="floor"===i?Math.floor(t):"round"===i?Math.round(t):t}else b>=r[u]?v[c]=a:v[c]=s;else v[c]=s;w[u]=v}}else for(u=0;u<l;u++){for(v=[],c=0;c<f;c++)if(b=c+h,b<=e[u])v[c]=s;else if(b>=r[u])v[c]=a;else{const t=(b-e[u])*d[u]+s;v[c]="floor"===i?Math.floor(t):"round"===i?Math.round(t):t}w[u]=v}if(null!=t.contrastOffset){const e=function(t,e){const r=Math.min(Math.max(t,-100),100),o=Math.min(Math.max(e??0,-100),100),n=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*o)/(2*(100-r))+128:r<=0&&r>-100?s=(200*i-25500+510*o)*(100+r)/2e4+128:100===r?(s=200*i-25500+256*(100-r)+510*o,s=s>0?n:0):-100===r&&(s=128),a[i]=s>n?n:s<0?0:s;return a}(t.contrastOffset,t.brightnessOffset);for(u=0;u<l;u++)for(v=w[u],c=0;c<f;c++)v[c]=e[v[c]]}return{lut:w,offset:h}}function h(t,e,r){const o=[];for(let n=0;n<e.length;n++){let i=0,s=0,a=0;"min"in e[n]?({min:i,max:s,avg:a}=e[n]):[i,s,a]=e[n];let u=a??0;"u8"!==t&&(u=255*(u-i)/(s-i)),r&&(u*=l[n]),o.push(f(u))}return o}function f(t){if(t<=0||t>=255)return a;let e=0;150!==t&&(e=t<=150?45*Math.cos(.01047*t):17*Math.sin(.021*t));const r=t+e,o=Math.log(t/255),n=Math.log(r/255);if(0===n)return a;const i=o/n;return isNaN(i)?a:Math.min(9.9,Math.max(.01,i))}function d(t){const{pixels:e,mask:r,pixelType:o,bandMasks:n}=t,i=e.map(((t,e)=>function(t,e,r,o){let n=1/0,i=-1/0,s=0,a=0,l=0,u=0;const c=t.length,h=new Map,f=[];for(let r=0;r<c;r++){const o=t[r];if(!e||e[r]){f.push(o);const t=(h.get(o)??0)+1;h.set(o,t),t>u&&(u=t,l=o),n=o<n?o:n,i=o>i?o:i,s+=o,a++}}if(0===a)return{statistics:{min:0,max:0,avg:0,stddev:0,mode:0,median:0},histogram:null};const d=s/a;let p=0;for(let r=0;r<c;r++)e&&!e[r]||(p+=(t[r]-d)**2);const m=e?e.filter((t=>t)).length:c,g=m<=1?0:Math.sqrt(p/(m-1));f.sort(((t,e)=>t-e));const y=a>>>1,w={min:n,max:i,avg:d,stddev:g,mode:l,median:a%2?f[Math.floor(y)]:(f[y-1]+f[y])/2};if(["u8","s8","u4","u2","u1"].includes(r)){const r=i-n+1,o=new Uint32Array(r);for(let r=0;r<c;r++)e&&!e[r]||o[t[r]-n]++;return{statistics:w,histogram:{min:n-.5,max:i+.5,size:r,counts:o}}}const b=256,C=new Uint32Array(b),v=(i-n)/b;if(0===v)return{statistics:w,histogram:{min:n,max:i,size:1,counts:new Uint32Array(1).fill(a)}};const x=new Uint32Array(257);for(let r=0;r<c;r++)e&&!e[r]||x[Math.floor((t[r]-n)/v)]++;for(let t=0;t<255;t++)C[t]=x[t];return C[255]=x[255]+x[b],{statistics:w,histogram:{min:n,max:i,size:b,counts:C}}}(t,n?.[e]??r,o)));return{statistics:i.map((({statistics:t})=>t)),histograms:i.map((({histogram:t})=>t))}}function p(t){if(null==t||!t.pixels?.length)return null;const{pixels:e,mask:r,bandMasks:o,pixelType:n}=t,i=t.width*t.height,s=e.length;let a,l,u,c,h;const f=[],d=[];let p,m,g,y,w,b,C,v,x,k;const A=256;for(c=0;c<s;c++){p=new Uint32Array(A),g=e[c];const s=o?.[c]??r;if("u8"===n)if(a=-.5,l=255.5,s)for(h=0;h<i;h++)s[h]&&p[g[h]]++;else for(h=0;h<i;h++)p[g[h]]++;else{let e=!1;t.statistics||(t.updateStatistics(),e=!0);const r=t.statistics;if(a=r[c].minValue,l=r[c].maxValue,u=(l-a)/A,0===u){!r||t.validPixelCount||e||t.updateStatistics();const o=(t.validPixelCount||t.width*t.height)/A;for(let t=0;t<A;t++)p[t]=Math.round(o*(t+1))-Math.round(o*t)}else{for(m=new Uint32Array(257),h=0;h<i;h++)s&&!s[h]||m[Math.floor((g[h]-a)/u)]++;for(h=0;h<255;h++)p[h]=m[h];p[255]=m[255]+m[A]}}for(f.push({min:a,max:l,size:A,counts:p}),y=0,w=0,v=0,h=0;h<A;h++)y+=p[h],w+=h*p[h];for(x=w/y,h=0;h<A;h++)v+=p[h]*(h-x)**2;k=Math.sqrt(v/(y-1)),u=(l-a)/A,b=(x+.5)*u+a,C=k*u,d.push({min:a,max:l,avg:b,stddev:C})}return{statistics:d,histograms:f}}function m(t){const e=[];for(let r=0;r<t.length;r++){const{min:o,max:n,size:i,counts:s}=t[r];let a=0,l=0;for(let t=0;t<i;t++)a+=s[t],l+=t*s[t];const u=l/a;let c=0;for(let t=0;t<i;t++)c+=s[t]*(t-u)**2;const h=(n-o)/i,f=(u+.5)*h+o,d=Math.sqrt(c/(a-1))*h;e.push({min:o,max:n,avg:f,stddev:d})}return e}function g(t,e){const{pixelBlock:r,bandIds:n,returnHistogramLut:a,rasterInfo:l}=e;let c=null,h=null,f=t.stretchType;if("number"==typeof f&&(f=s.J[f]),t.dra)if("minMax"===f&&null!=r&&r.statistics)c=r.statistics.map((t=>[t.minValue,t.maxValue,0,0]));else{const t=p(r);c=null!=t?t.statistics:null,h=null!=t?t.histograms:null}else c=t.statistics?.length>0?t.statistics:l.statistics,h="histograms"in t?t.histograms:void 0,h||(h=l.histograms);"percentClip"!==f&&"histogramEqualization"!==f||h?.length||(f="minMax");const d=c?.length||h?.length||l.bandCount,m=[],g=[];let y,w,b,C,v,x,k,A,S;c&&!Array.isArray(c[0])&&(c=c.map((t=>[t.min,t.max,t.avg,t.stddev])));const[T,I]=(0,i.r)(l.pixelType);if(!c?.length){for(c=[],A=0;A<d;A++)c.push([T,I,1,1]);"standardDeviation"===f&&(f="minMax")}switch(f){case"none":for(A=0;A<d;A++)m[A]=T,g[A]=I;break;case"minMax":for(A=0;A<d;A++){const t=c[A];m[A]=t[0],g[A]=t[1]}break;case"standardDeviation":for(A=0;A<d;A++){const e=c[A];m[A]=e[2]-t.numberOfStandardDeviations*e[3],g[A]=e[2]+t.numberOfStandardDeviations*e[3],m[A]<e[0]&&(m[A]=e[0]),g[A]>e[1]&&(g[A]=e[1])}break;case"histogramEqualization":for((0,o.O3)(h),A=0;A<d;A++)m[A]=h[A].min,g[A]=h[A].max;break;case"percentClip":for((0,o.O3)(h),A=0;A<h.length;A++){for(y=h[A],v=new Uint32Array(y.size),C=[...y.counts],C.length>=20&&(C[0]=C[1]=C[2]=C[C.length-1]=C[C.length-2]=0),b=0,w=(y.max-y.min)/y.size,k=-.5===y.min&&1===w?.5:0,S=0;S<y.size;S++)b+=C[S],v[S]=b;for(x=(t.minPercent||0)*b/100,m[A]=y.min+k,S=0;S<y.size;S++)if(v[S]>x){m[A]=y.min+w*(S+k);break}for(x=(1-(t.maxPercent||0)/100)*b,g[A]=y.max+k,S=y.size-2;S>=0;S--)if(v[S]<x){g[A]=y.min+w*(S+2-k);break}if(g[A]<m[A]){const t=m[A];m[A]=g[A],g[A]=t}}break;default:for(A=0;A<d;A++){const t=c[A];m[A]=t[0],g[A]=t[1]}}let M,P,E;return"histogramEqualization"===f?((0,o.O3)(h),P=h[0].size||256,M=0,a&&(E=h.map((t=>u(t))))):(P=t.max||255,M=t.min||0),function(t,e){if(null==e||0===e.length)return t;const r=Math.max.apply(null,e),{minCutOff:o,maxCutOff:n,outMin:i,outMax:s,histogramLut:a}=t;return o.length===e.length||o.length<=r?t:{minCutOff:e.map((t=>o[t])),maxCutOff:e.map((t=>n[t])),histogramLut:a?e.map((t=>a[t])):null,outMin:i,outMax:s}}({minCutOff:m,maxCutOff:g,outMax:P,outMin:M,histogramLut:E},n)}function y(t,e){const r=new Float32Array(t);for(let o=0;o<t;o++)e[o]>1?e[o]>2?r[o]=6.5+(e[o]-2)**2.5:r[o]=6.5+100*(2-e[o])**4:r[o]=1;return r}function w(t,e){if(null==t||!t.pixels?.length)return t;const{mask:r,bandMasks:o,width:i,height:s,pixels:a}=t,{minCutOff:l,maxCutOff:u,gamma:c}=e,h=e.outMin||0,f=e.outMax||255,d=i*s,p=e.outputPixelType||"u8",m=t.pixels.map((()=>n.Z.createEmptyBand(p,d))),g=m.length,w=f-h,b=[],C=[];for(let t=0;t<g;t++)C[t]=u[t]-l[t],b[t]=0===C[t]?0:w/C[t];const v=p.startsWith("u")||p.startsWith("s"),x=c&&c.length>=g,k=!!e.isRenderer;if(x){const t=y(g,c);for(let e=0;e<g;e++){const n=o?.[e]??r;for(let r=0;r<d;r++)if(null==n||n[r]){if(0===C[e]){m[e][r]=h;continue}const o=a[e][r],n=(o-l[e])/C[e];let i=1;if(c[e]>1&&(i-=(1/w)**(n*t[e])),o<u[e]&&o>l[e]){const t=i*w*n**(1/c[e])+h;m[e][r]=k?Math.floor(t):v?Math.round(t):t}else o>=u[e]?m[e][r]=f:m[e][r]=h}}}else for(let t=0;t<g;t++){const e=o?.[t]??r;for(let r=0;r<d;r++)if(null==e||e[r]){const e=a[t][r];if(e<u[t]&&e>l[t]){const o=(e-l[t])*b[t]+h;m[t][r]=k?Math.floor(o):v?Math.round(o):o}else e>=u[t]?m[t][r]=f:m[t][r]=h}}const A=new n.Z({width:i,height:s,mask:r,bandMasks:o,pixels:m,pixelType:p});return A.updateStatistics(),A}},63342:(t,e,r)=>{r.d(e,{CX:()=>s,M_:()=>d,Ne:()=>p,TK:()=>a,Ub:()=>h,vC:()=>c,yg:()=>f});var o=r(5847),n=r(55914);const i=1,s=1/111e3;function a(t){let{altitude:e,azimuth:r}=t;const{hillshadeType:o,pixelSizePower:n=1,pixelSizeFactor:i=1,scalingType:a,isGCS:l,resolution:u}=t,c="multi-directional"===o?2*t.zFactor:t.zFactor,{x:h,y:f}=u;let d=c/(8*h),p=c/(8*f);if(l&&c>.001&&(d/=s,p/=s),"adjusted"===a)if(l){const t=h*s,e=f*s;d=(c+t**n*i)/(8*t),p=(c+e**n*i)/(8*e)}else d=(c+h**n*i)/(8*h),p=(c+f**n*i)/(8*f);let m=(90-e)*Math.PI/180,g=Math.cos(m),y=(360-r+90)*Math.PI/180,w=Math.sin(m)*Math.cos(y),b=Math.sin(m)*Math.sin(y);const C=[315,270,225,360,180,0],v=[60,60,60,60,60,90],x=new Float32Array([3,5,3,2,1,4]),k=x.reduce(((t,e)=>t+e)),A=x.map((t=>t/k)),S="multi-directional"===o?C.length:1,T=new Float32Array(6),I=new Float32Array(6),M=new Float32Array(6);if("multi-directional"===o)for(let t=0;t<S;t++)e=v[t],r=C[t],m=(90-e)*Math.PI/180,g=Math.cos(m),y=(360-r+90)*Math.PI/180,w=Math.sin(m)*Math.cos(y),b=Math.sin(m)*Math.sin(y),T[t]=g,I[t]=w,M[t]=b;else T.fill(g),I.fill(w),M.fill(b);return{resolution:u,factor:[d,p],sinZcosA:w,sinZsinA:b,cosZ:g,sinZcosAs:I,sinZsinAs:M,cosZs:T,weights:A,hillshadeType:["traditional","multi-directional"].indexOf(o)}}function l(t,e){const{width:r,height:o}=t,n=r*o,s=new Uint8Array(n),a=null!=t.mask;let l;if(a){l=new Uint8Array(t.mask);for(let t=0;t<l.length;t++)l[t]&&(s[t]=1,l[t]=1)}const u=t.pixels[0],c=new Float32Array(n),h=new Float32Array(n);let f,d=0;if(e){const{resolution:t}=e,r=t?(t.x+t.y)/2:1;d=200*e.zFactor/(r*r),f=new Float32Array(n)}const p=e?.curvatureType;let m,g,y,w,b,C,v,x;for(let t=i;t<o-i;t++){const e=t*r;for(let t=i;t<r-i;t++){const o=e+t;if(!l||0!==l[o]){if(l){if(l[o-r-1]+l[o-r]+l[o-r+1]+l[o-1]+l[o+1]+l[o+r-1]+l[o+r]+l[o+r+1]<7){s[o]=0;continue}m=l[o-r-1]?u[o-r-1]:u[o],g=l[o-r]?u[o-r]:u[o],y=l[o-r+1]?u[o-r+1]:u[o],w=l[o-1]?u[o-1]:u[o],b=l[o+1]?u[o+1]:u[o],C=l[o+r-1]?u[o+r-1]:u[o],v=l[o+r]?u[o+r]:u[o],x=l[o+r+1]?u[o+r+1]:u[o]}else m=u[o-r-1],g=u[o-r],y=u[o-r+1],w=u[o-1],b=u[o+1],C=u[o+r-1],v=u[o+r],x=u[o+r+1];if(c[o]=y+b+b+x-(m+w+w+C),h[o]=C+v+v+x-(m+g+g+y),null!=f){const t=u[o],e=.5*(w+b)-t,r=.5*(g+v)-t;if("standard"===p)f[o]=-d*(e+r);else{const t=(-m+y+C-x)/4,n=(-w+b)/2,i=(g-v)/2,s=n*n,a=i*i,l=s+a;l&&(f[o]="profile"===p?d*(e*s+r*a+t*n*i)/l:-d*(e*a+r*s-t*n*i)/l)}}}}}return{outMask:a?s:null,dzxs:c,dzys:h,curvatures:f}}function u(t,e,r){for(let o=0;o<r;o++)t[o*e]=t[o*e+1],t[(o+1)*e-1]=t[(o+1)*e-2];for(let o=1;o<e-1;o++)t[o]=t[o+e],t[o+(r-1)*e]=t[o+(r-2)*e]}function c(t,e){if(!(0,n.nk)(t))return t;const{factor:r,sinZcosA:s,sinZsinA:c,cosZ:h,sinZcosAs:f,sinZsinAs:d,cosZs:p,weights:m}=a(e),[g,y]=r,w="traditional"===e.hillshadeType,{width:b,height:C}=t,v=new Uint8Array(b*C),{dzxs:x,dzys:k,outMask:A}=l(t);for(let t=i;t<C-i;t++){const e=t*b;for(let t=i;t<b-i;t++){const r=e+t;if(!A||A[r]){const t=x[r]*g,e=k[r]*y,o=Math.sqrt(1+t*t+e*e);let n=0;if(w){let r=255*(h+c*e-s*t)/o;r<0&&(r=0),n=r}else{const r=d.length;for(let i=0;i<r;i++){let r=255*(p[i]+d[i]*e-f[i]*t)/o;r<0&&(r=0),n+=r*m[i]}}v[r]=255&n}}}return u(v,b,C),new o.Z({width:b,height:C,pixels:[v],mask:A,pixelType:"u8",validPixelCount:t.validPixelCount,statistics:[{minValue:0,maxValue:255}]})}function h(t,e,r,o){if(!(0,n.nk)(t)||!(0,n.nk)(e))return;const{min:i,max:s}=o,a=t.pixels[0],{pixels:l,mask:u}=e,c=l[0],h=255.00001/(s-i),f=new Uint8ClampedArray(c.length),d=new Uint8ClampedArray(c.length),p=new Uint8ClampedArray(c.length),m=r.length-1;for(let t=0;t<c.length;t++){if(u&&0===u[t])continue;const e=Math.floor((c[t]-i)*h),[o,n]=r[e<0?0:e>m?m:e],s=a[t],l=s*n,g=l*(1-Math.abs(o%2-1)),y=s-l;switch(Math.floor(o)){case 0:f[t]=l+y,d[t]=g+y,p[t]=y;break;case 1:f[t]=g+y,d[t]=l+y,p[t]=y;break;case 2:f[t]=y,d[t]=l+y,p[t]=g+y;break;case 3:f[t]=y,d[t]=g+y,p[t]=l+y;break;case 4:f[t]=g+y,d[t]=y,p[t]=l+y;break;case 5:case 6:f[t]=l+y,d[t]=y,p[t]=g+y}}t.pixels=[f,d,p],t.updateStatistics()}function f(t,e){if(!(0,n.nk)(t))return t;const r=e.zFactor,a=e.pixelSizePower??1,c=e.pixelSizeFactor??1,h=e.slopeType,f=e.isGCS,{x:d,y:p}=e.resolution;let m=r/(8*d),g=r/(8*p);f&&Math.abs(r-1)<1e-4&&(m/=s,g/=s),"adjusted"===h&&(m=(r+d**a*c)/(8*d),g=(r+p**a*c)/(8*p));const{dzxs:y,dzys:w,outMask:b}=l(t),{width:C,height:v}=t,x=new Float32Array(C*v);for(let t=i;t<v-i;t++){const e=t*C;for(let t=i;t<C-i;t++){const r=e+t;if(!b||b[r]){const o=y[r]*m,n=w[r]*g,i=Math.sqrt(o*o+n*n);x[e+t]="percent-rise"===h?100*i:57.2957795*Math.atan(i)}}}u(x,C,v);const k=new o.Z({width:C,height:v,pixels:[x],mask:b,pixelType:"f32",validPixelCount:t.validPixelCount});return k.updateStatistics(),k}function d(t,e={}){if(!(0,n.nk)(t))return t;const{resolution:r}=e,s=r?1/r.x:1,a=r?1/r.y:1,{dzxs:c,dzys:h,outMask:f}=l(t),{width:d,height:p}=t,m=new Float32Array(d*p);for(let t=i;t<p-i;t++){const e=t*d;for(let t=i;t<d-i;t++){const r=e+t;if(!f||f[r]){const o=c[r]*s,n=h[r]*a;let i=-1;0===o&&0===n||(i=90-57.29578*Math.atan2(n,-o),i<0&&(i+=360),360===i?i=0:i>360&&(i%=360)),m[e+t]=i}}}return u(m,d,p),new o.Z({width:d,height:p,pixels:[m],mask:f,pixelType:"f32",validPixelCount:t.validPixelCount,statistics:[{minValue:-1,maxValue:360}]})}function p(t,e){if(!(0,n.nk)(t))return t;const{curvatures:r,outMask:i}=l(t,e),{width:s,height:a}=t;u(r,s,a);const c=new o.Z({width:s,height:a,pixels:[r],mask:i,pixelType:"f32",validPixelCount:t.validPixelCount});return c.updateStatistics(),c}},80676:(t,e,r)=>{r.d(e,{KC:()=>p,NL:()=>l,QI:()=>m,Tg:()=>h,Yx:()=>u,xQ:()=>d});var o=r(35454),n=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 o.X({esriMetersPerSecond:"meter-per-second",esriKilometersPerHour:"kilometer-per-hour",esriKnots:"knots",esriFeetPerSecond:"feet-per-second",esriMilesPerHour:"mile-per-hour"});function u(t,e){return s.get(t)/s.get(e)||1}function c(t){return(450-t)%360}function h(t,e="geographic"){const[r,o]=t,n=Math.sqrt(r*r+o*o);let i=Math.atan2(o,r)*a;return i=(360+i)%360,"geographic"===e&&(i=c(i)),[n,i]}function f(t,e="geographic"){let r=t[1];"geographic"===e&&(r=c(r)),r%=360;const o=t[0];return[o*Math.cos(r/a),o*Math.sin(r/a)]}function d(t,e,r,o="geographic"){if(!(0,i.nk)(t)||null==r)return t;const n="vector-magdir"===e?t.clone():p(t,e),s=n.pixels[1];for(let t=0;t<s.length;t++)s[t]="geographic"===o?(s[t]+r[t]+270)%360:(s[t]+360-r[t])%360;return"vector-magdir"===e?n:p(n,"vector-magdir")}function p(t,e,r="geographic",o=1){if(!(0,i.nk)(t))return t;const{pixels:s,width:a,height:l}=t,u=a*l,c=s[0],d=s[1],p=t.pixelType.startsWith("f")?t.pixelType:"f32",m=n.Z.createEmptyBand(p,u),g=n.Z.createEmptyBand(p,u);let y=0;for(let t=0;t<l;t++)for(let t=0;t<a;t++)"vector-uv"===e?([m[y],g[y]]=h([c[y],d[y]],r),m[y]*=o):([m[y],g[y]]=f([c[y],d[y]],r),m[y]*=o,g[y]*=o),y++;const w=new n.Z({pixelType:p,width:t.width,height:t.height,mask:t.mask,validPixelCount:t.validPixelCount,maskIsAlpha:t.maskIsAlpha,pixels:[m,g]});return w.updateStatistics(),w}function m(t,e,r=1){if(1===r||!(0,i.nk)(t))return t;const o=t.clone(),{pixels:n,width:s,height:a}=o,l=n[0],u=n[1];let c=0;for(let t=0;t<a;t++)for(let t=0;t<s;t++)"vector-uv"===e?(l[c]*=r,u[c]*=r):l[c]*=r,c++;return o.updateStatistics(),o}function g(t,e,r,o=1){const n=Math.sqrt(t*t+e*e)/o,i=(2*Math.PI+Math.atan2(e,t))%(2*Math.PI);return[n,(2*Math.PI+i-r)%(2*Math.PI)]}!function(t=0,e=0,r=Math.PI,o=!0){o&&(r=(2*Math.PI-r)%(2*Math.PI));const n=o?-1:1,i=13*n,s=-7*n,a=-2*n,l=-16*n,u=21.75,[c,h]=g(0,e+i,r,u),[f,d]=g(t-5.5,e+s,r,u),[p,m]=g(t+5.5,e+s,r,u),[y,w]=g(t-1.5,e+a,r,u),[b,C]=g(t+1.5,e+a,r,u),[v,x]=g(t-1.5,e+l,r,u),[k,A]=g(t+1.5,e+l,r,u)}(0,0,0)},72758:(t,e,r)=>{r.d(e,{Z:()=>y});var o=r(43697),n=r(3892),i=r(96674),s=r(92604),a=r(5600),l=(r(75215),r(67676),r(80442),r(52011)),u=r(25972),c=r(55914),h=r(15612),f=r(63342),d=r(93010),p=r(12163);let m=class extends i.wq{constructor(t){super(t)}bind(){const{rendererJSON:t}=this;if(!t)return{success:!1};let e;switch(this.lookup={rendererJSON:{}},t.type){case"uniqueValue":e=this._updateUVRenderer(t);break;case"rasterColormap":e=this._updateColormapRenderer(t);break;case"rasterStretch":e=this._updateStretchRenderer(t);break;case"classBreaks":e=this._updateClassBreaksRenderer(t);break;case"rasterShadedRelief":e=this._updateShadedReliefRenderer(t);break;case"vectorField":e=this._updateVectorFieldRenderer();break;case"flowRenderer":e=this._updateFlowRenderer()}return e}symbolize(t){let e=t&&t.pixelBlock;if(!g(e))return e;if(t.simpleStretchParams&&"rasterStretch"===this.rendererJSON.type)return this.simpleStretch(e,t.simpleStretchParams);try{let r;switch(e.pixels.length>3&&(e=e.extractBands([0,1,2])),this.rendererJSON.type){case"uniqueValue":case"rasterColormap":r=this._symbolizeColormap(e);break;case"classBreaks":r=this._symbolizeClassBreaks(e);break;case"rasterStretch":r=this._symbolizeStretch(e,t.bandIds);break;case"rasterShadedRelief":{const o=t.extent,n=o.spatialReference.isGeographic,i={x:(o.xmax-o.xmin)/e.width,y:(o.ymax-o.ymin)/e.height};r=this._symbolizeShadedRelief(e,{isGCS:n,resolution:i});break}}return r}catch(t){return s.Z.getLogger(this).error("symbolize",t.message),e}}simpleStretch(t,e){if(!g(t))return t;try{return t.pixels.length>3&&(t=t.extractBands([0,1,2])),(0,h.dy)(t,{...e,isRenderer:!0})}catch(e){return s.Z.getLogger(this).error("symbolize",e.message),t}}generateWebGLParameters(t){if(["uniqueValue","rasterColormap","classBreaks"].includes(this.rendererJSON.type)){const{indexedColormap:t,offset:e}=this.lookup.colormapLut||{};return{colormap:t,colormapOffset:e,type:"lut"}}const{pixelBlock:e,isGCS:r,resolution:o,bandIds:n}=t,{rendererJSON:i}=this;return"rasterStretch"===i.type?this._generateStretchWebGLParams(e,i,n):"rasterShadedRelief"===i.type?this._generateShadedReliefWebGLParams(i,r,o??void 0):"vectorField"===i.type?this._generateVectorFieldWebGLParams(i):null}_isLUTChanged(t){if(!this.lookup||!this.lookup.rendererJSON)return!0;if("colorRamp"in this.rendererJSON){const e=this.rendererJSON.colorRamp;return t?JSON.stringify(e)!==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(t){return this._isLUTChanged()&&!this.bind().success?t:(0,c.SJ)(t,this.lookup.colormapLut)}_symbolizeClassBreaks(t){const{canUseIndexedLUT:e}=this._analyzeClassBreaks(this.rendererJSON);return this._isLUTChanged()&&!this.bind().success?t:e?(0,c.SJ)(t,this.lookup.colormapLut):(0,c.zp)(t,this.lookup.remapLut??[])}_symbolizeStretch(t,e){const{rasterInfo:r}=this,{pixelType:o,bandCount:n}=r,i=this.rendererJSON,s=["u8","u16","s8","s16"].includes(o);let a,l;const{dra:u}=i,{gamma:f}=this.lookup;if("histogramEqualization"===i.stretchType){const o=u?null:this.lookup?.histogramLut,n=(0,h.AV)(i,{rasterInfo:r,pixelBlock:t,bandIds:e,returnHistogramLut:!o}),s=(0,h.dy)(t,{...n,gamma:f,isRenderer:!0});l=(0,c.XV)(s,{lut:u?n.histogramLut:o,offset:0})}else if(s){if(u){const n=(0,h.AV)(i,{rasterInfo:r,pixelBlock:t,bandIds:e});a=(0,h.hE)({pixelType:o,...n,gamma:f,rounding:"floor"})}else if(this._isLUTChanged()){if(!this.bind().success)return t;a=this.lookup?this.lookup.stretchLut:null}else a=this.lookup?this.lookup.stretchLut:null;if(!a)return t;n>1&&null!=e&&e.length===t?.pixels.length&&a?.lut.length===n&&(a={lut:e.map((t=>a.lut[t])),offset:a.offset}),l=(0,c.XV)(t,a)}else{const o=(0,h.AV)(i,{rasterInfo:r,pixelBlock:t,bandIds:e});l=(0,h.dy)(t,{...o,gamma:f,isRenderer:!0})}if(i.colorRamp){if(this._isLUTChanged(!0)&&!this.bind().success)return t;l=(0,c.SJ)(l,this.lookup?.colormapLut)}return l}_symbolizeShadedRelief(t,e){const r=this.rendererJSON,o={...r,...e},n=(0,f.vC)(t,o);if(!r.colorRamp)return n;let i;if(this._isLUTChanged(!0)){if(!this.bind().success)return n;i=this.lookup?this.lookup.hsvMap:null}else i=this.lookup?this.lookup.hsvMap:null;if(!i)return n;const s=this.rasterInfo.statistics?.[0]??{min:0,max:8e3};return(0,f.Ub)(n,t,i,s),n}_isVectorFieldData(){const{bandCount:t,dataType:e}=this.rasterInfo;return 2===t&&("vector-magdir"===e||"vector-uv"===e)}_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(t){const{bandCount:e,attributeTable:r,pixelType:o}=this.rasterInfo,n=t.field1;if(!n)return{success:!1,error:"Unsupported renderer; missing UniqueValueRenderer.field."};const i=t.defaultSymbol,s=1===e&&["u8","s8"].includes(o);if(!(0,p.MG)(this.rasterInfo,n)&&!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 e=r.fields.find((t=>"value"===t.name.toLowerCase()));if(!e)return{success:!1,error:"Unsupported data; the data's raster attribute table does not have a value field."};r.features.forEach((r=>{const o=t.uniqueValueInfos?.find((t=>String(t.value)===String(r.attributes[n]))),s=o?.symbol?.color;s?a.push([r.attributes[e.name]].concat(s)):i&&a.push([r.attributes[e.name]].concat(i.color))}))}else{if("value"!==n.toLowerCase())return{success:!1,error:'Unsupported renderer; UniqueValueRenderer.field must be "Value" when raster attribute table is not availalbe.'};t.uniqueValueInfos?.forEach((t=>{const e=t?.symbol?.color;e?a.push([parseInt(""+t.value,10)].concat(e)):i&&a.push([parseInt(""+t.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,c.Pz)({colormap:a});return this.lookup={rendererJSON:t,colormapLut:l},this.canRenderInWebGL=!0,{success:!0}}_updateColormapRenderer(t){if(!(0,p.mO)(this.rasterInfo))return{success:!1,error:"Unsupported data; the data source does not have a colormap."};const e=t.colormapInfos.map((t=>[t.value].concat(t.color))).sort(((t,e)=>t[0]-e[0]));if(!e||0===e.length)return{success:!1,error:"Unsupported renderer; ColormapRenderer must have meaningful colormapInfos."};const r=(0,c.Pz)({colormap:e});return this.lookup={rendererJSON:t,colormapLut:r},this.canRenderInWebGL=!0,{success:!0}}_updateShadedReliefRenderer(t){if(!(0,p.jX)(this.rasterInfo))return{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; ShadedReliefRenderer only supports "elevation", or single band float/s16 data.`};if(t.colorRamp){const e=(0,d.Jw)(t.colorRamp,{interpolateAlpha:!0}),r=(0,c.Pz)({colormap:e}),o=[],i=r.indexedColormap;for(let t=0;t<i.length;t+=4){const e=(0,n._Y)({r:i[t],g:i[t+1],b:i[t+2]});o.push([e.h/60,e.s/100,255*e.v/100])}this.lookup={rendererJSON:t,colormapLut:r,hsvMap:o}}else this.lookup=null;return this.canRenderInWebGL=!0,{success:!0}}_analyzeClassBreaks(t){const{attributeTable:e,pixelType:r}=this.rasterInfo,o=null!=e?e.fields.find((t=>"value"===t.name.toLowerCase())):null,n=null!=e?e.fields.find((e=>e.name.toLowerCase()===t.field.toLowerCase())):null,i=null!=o&&null!==n;return{canUseIndexedLUT:["u8","u16","s8","s16"].includes(r)||i,tableValueField:o,tableBreakField:n}}_updateClassBreaksRenderer(t){const{attributeTable:e}=this.rasterInfo,{canUseIndexedLUT:r,tableValueField:o,tableBreakField:n}=this._analyzeClassBreaks(t),i=t.classBreakInfos;if(!i?.length)return{success:!1,error:"Unsupported renderer; missing or invalid ClassBreaksRenderer.classBreakInfos."};const s=i.sort(((t,e)=>t.classMaxValue-e.classMaxValue)),a=s.at(-1);let l=t.minValue;if(!r){const e=[];for(let t=0;t<s.length;t++)e.push({value:s[t].classMinValue??l,mappedColor:s[t].symbol.color}),l=s[t].classMaxValue;return e.push({value:a.classMaxValue,mappedColor:a.symbol.color}),this.lookup={rendererJSON:t,remapLut:e},this.canRenderInWebGL=!1,{success:!0}}const u=[];if(null!=e&&null!=o&&null!==n&&o!==n){const r=o.name,i=n.name,a=s.at(-1),{classMaxValue:c}=a;l=t.minValue;for(const t of e.features){const e=t.attributes[r],o=t.attributes[i],n=o===c?a:o<l?null:s.find((({classMaxValue:t})=>t>o));n&&u.push([e].concat(n.symbol.color))}}else{l=Math.floor(t.minValue);for(let t=0;t<s.length;t++){const e=s[t];for(let t=l;t<e.classMaxValue;t++)u.push([t].concat(e.symbol.color));l=Math.ceil(e.classMaxValue)}a.classMaxValue===l&&u.push([a.classMaxValue].concat(a.symbol.color))}const h=(0,c.Pz)({colormap:u,fillUnspecified:!1});return this.lookup={rendererJSON:t,colormapLut:h},this.canRenderInWebGL=!0,{success:!0}}_isHistogramRequired(t){return"percentClip"===t||"histogramEqualization"===t}_isValidRasterStatistics(t){return null!=t&&t.length>0&&null!=t[0].min&&null!=t[0].max}_updateStretchRenderer(t){let{stretchType:e,dra:r}=t;if(!("none"===e||t.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 o=t.histograms||this.rasterInfo.histograms;!this._isHistogramRequired(t.stretchType)||o?.length||r||(e="minMax");const{computeGamma:n,useGamma:i,colorRamp:s}=t;let{gamma:a}=t;if(i&&n&&!a?.length){const e=t.statistics?.length?t.statistics:this.rasterInfo.statistics;a=(0,h.ZF)(this.rasterInfo.pixelType,e)}const l=this.rasterInfo.pixelType,u=!r&&["u8","u16","s8","s16"].includes(l);if("histogramEqualization"===e){const e=o.map((t=>(0,h.oc)(t)));this.lookup={rendererJSON:t,histogramLut:e}}else if(u){const e=(0,h.AV)(t,{rasterInfo:this.rasterInfo}),r=(0,h.hE)({pixelType:l,...e,gamma:i?a:null,rounding:"floor"});this.lookup={rendererJSON:t,stretchLut:r}}if(s){const e=(0,d.Jw)(s,{interpolateAlpha:!0});this.lookup||(this.lookup={rendererJSON:t}),this.lookup.colormapLut=(0,c.Pz)({colormap:e}),this.lookup.rendererJSON=t}return this.lookup.gamma=i&&a?.length?a:null,this.canRenderInWebGL=!0,{success:!0}}_generateStretchWebGLParams(t,e,r){let o=null,n=null;const i=this.lookup&&this.lookup.colormapLut;e.colorRamp&&i&&(o=i.indexedColormap,n=i.offset),"histogramEqualization"===e.stretchType&&(e={...e,stretchType:"minMax"});const{gamma:s}=this.lookup,a=!!(e.useGamma&&s&&s.some((t=>1!==t))),{minCutOff:l,maxCutOff:u,outMin:c,outMax:f}=(0,h.AV)(e,{rasterInfo:this.rasterInfo,pixelBlock:t,bandIds:r});let d=0;null!=t&&(d=t.getPlaneCount(),2===d&&((t=t.clone()).statistics=[t.statistics[0]],t.pixels=[t.pixels[0]]));const{bandCount:p}=this.rasterInfo,m=Math.min(3,r?.length||d||p,p),g=new Float32Array(m),y=o||a?1:255;let w;for(w=0;w<l.length;w++)g[w]=u[w]===l[w]?0:(f-c)/(u[w]-l[w])/y;const b=new Float32Array(m);if(a&&s)for(w=0;w<m;w++)s[w]>1?s[w]>2?b[w]=6.5+(s[w]-2)**2.5:b[w]=6.5+100*(2-s[w])**4:b[w]=1;return{bandCount:m,outMin:c/y,outMax:f/y,minCutOff:l,maxCutOff:u,factor:g,useGamma:a,gamma:a?s:[1,1,1],gammaCorrection:a?b:[1,1,1],colormap:o,colormapOffset:n,stretchType:e.stretchType,type:"stretch"}}_generateShadedReliefWebGLParams(t,e=!1,r={x:0,y:0}){let o=null,n=null;const i=this.lookup&&this.lookup.colormapLut;t.colorRamp&&i&&(o=i.indexedColormap,n=i.offset);const s={...t,isGCS:e,resolution:r},a=(0,f.TK)(s),l=this.rasterInfo.statistics?.[0];return{...a,minValue:l?.min??0,maxValue:l?.max??8e3,hillshadeType:"traditional"===t.hillshadeType?0:1,type:"hillshade",colormap:o,colormapOffset:n}}_generateVectorFieldWebGLParams(t){const{style:e,inputUnit:r,outputUnit:o,visualVariables:n,symbolTileSize:i,flowRepresentation:s}=t;let a;const l=this.rasterInfo.statistics?.[0].min??0,u=this.rasterInfo.statistics?.[0].max??50,c=n?.find((t=>"sizeInfo"===t.type))??{type:"sizeInfo",field:"Magnitude",maxDataValue:u,maxSize:.8*i,minDataValue:l,minSize:.2*i},h=c.minDataValue??l,f=c.maxDataValue??u,d=null!=c.maxSize&&null!=c.minSize?[c.minSize/i,c.maxSize/i]:[.2,.8];if("wind_speed"===e){const t=(d[0]+d[1])/2;d[0]=d[1]=t}const p=null!=h&&null!=f?[h,f]:null;if("classified_arrow"===e)if(null!=h&&null!=f&&null!=c){a=[];const t=(c.maxDataValue-c.minDataValue)/5;for(let e=0;e<6;e++)a.push(c.minDataValue+t*e)}else a=[0,1e-6,3.5,7,10.5,14];const m="flow_to"===s==("ocean_current_kn"===e||"ocean_current_m"===e)?0:Math.PI,g=n?.find((t=>"rotationInfo"===t.type));return{breakValues:a,dataRange:p,inputUnit:r,outputUnit:o,symbolTileSize:i,symbolPercentRange:d,style:e||"single_arrow",rotation:m,rotationType:this.rasterInfo.storageInfo?.tileInfo&&"vector-uv"===this.rasterInfo.dataType?"geographic":g?.rotationType||t.rotationType,type:"vectorField"}}};function g(t){return(0,c.nk)(t)&&0!==t.validPixelCount}(0,o._)([(0,a.Cb)({json:{write:!0}})],m.prototype,"rendererJSON",void 0),(0,o._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],m.prototype,"rasterInfo",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],m.prototype,"lookup",void 0),(0,o._)([(0,a.Cb)()],m.prototype,"canRenderInWebGL",void 0),m=(0,o._)([(0,l.j)("esri.renderers.support.RasterSymbolizer")],m);const y=m},93010:(t,e,r)=>{r.d(e,{B4:()=>p,H0:()=>u,Jw:()=>w,Ms:()=>l,Oi:()=>a,Uh:()=>d,XL:()=>y,oI:()=>x,pM:()=>v});var o=r(22303),n=r(3892),i=r(35454),s=r(96674);const a=["random","ndvi","ndvi2","ndvi3","elevation","gray","hillshade"],l=[{id:"aspect",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:"black-to-white",fromColor:[0,0,0],toColor:[255,255,255]},{id:"blue-bright",fromColor:[204,204,255],toColor:[0,0,224]},{id:"blue-light-to-dark",fromColor:[211,229,232],toColor:[46,100,140]},{id:"blue-green-bright",fromColor:[203,245,234],toColor:[48,207,146]},{id:"blue-green-light-to-dark",fromColor:[216,242,237],toColor:[21,79,74]},{id:"brown-light-to-dark",fromColor:[240,236,170],toColor:[102,72,48]},{id:"brown-to-blue-green-diverging-right",type:"multipart",colorRamps:[{fromColor:[156,85,31],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[33,130,145]}]},{id:"brown-to-blue-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[110,70,45],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[48,100,102]}]},{id:"coefficient-bias",fromColor:[214,214,255],toColor:[0,57,148]},{id:"cold-to-hot-diverging",type:"multipart",colorRamps:[{fromColor:[69,117,181],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[214,47,39]}]},{id:"condition-number",type:"multipart",colorRamps:[{fromColor:[0,97,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,34,0]}]},{id:"cyan-to-purple",type:"multipart",colorRamps:[{fromColor:[0,245,245],toColor:[0,0,245]},{fromColor:[0,0,245],toColor:[245,0,245]}]},{id:"cyan-light-to-blue-dark",type:"multipart",colorRamps:[{fromColor:[182,237,240],toColor:[31,131,224]},{fromColor:[31,131,224],toColor:[9,9,145]}]},{id:"distance",fromColor:[255,200,0],toColor:[0,0,255]},{id:"elevation1",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",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",fromColor:[255,235,214],toColor:[196,10,10]},{id:"gray-light-to-dark",fromColor:[219,219,219],toColor:[69,69,69]},{id:"green-bright",fromColor:[204,255,204],toColor:[14,204,14]},{id:"green-light-to-dark",fromColor:[220,245,233],toColor:[34,102,51]},{id:"green-to-blue",type:"multipart",colorRamps:[{fromColor:[32,204,16],toColor:[0,242,242]},{fromColor:[0,242,242],toColor:[2,33,227]}]},{id:"orange-bright",fromColor:[255,235,204],toColor:[240,118,5]},{id:"orange-light-to-dark",fromColor:[250,233,212],toColor:[171,65,36]},{id:"partial-spectrum",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:"partial-spectrum-1-diverging",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:"partial-spectrum-2-diverging",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:"pink-to-yellow-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[158,30,113],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[99,110,45]}]},{id:"pink-to-yellow-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[97,47,73],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[22,59,15]}]},{id:"precipitation",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",type:"multipart",colorRamps:[{fromColor:[40,146,199],toColor:[250,250,100]},{fromColor:[250,250,100],toColor:[232,16,20]}]},{id:"purple-bright",fromColor:[255,204,255],toColor:[199,0,199]},{id:"purple-to-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[77,32,150],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[20,122,11]}]},{id:"purple-to-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[67,14,89],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[24,79,15]}]},{id:"purple-blue-bright",fromColor:[223,184,230],toColor:[112,12,242]},{id:"purple-blue-light-to-dark",fromColor:[229,213,242],toColor:[93,44,112]},{id:"purple-red-bright",fromColor:[255,204,225],toColor:[199,0,99]},{id:"purple-red-light-to-dark",fromColor:[250,215,246],toColor:[143,17,57]},{id:"red-bright",fromColor:[255,204,204],toColor:[219,0,0]},{id:"red-light-to-dark",fromColor:[255,224,224],toColor:[143,10,10]},{id:"red-to-blue-diverging-bright",type:"multipart",colorRamps:[{fromColor:[196,69,57],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[48,95,207]}]},{id:"red-to-blue-diverging-dark",type:"multipart",colorRamps:[{fromColor:[107,13,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[13,53,97]}]},{id:"red-to-green",type:"multipart",colorRamps:[{fromColor:[245,0,0],toColor:[245,245,0]},{fromColor:[245,245,0],toColor:[0,245,0]}]},{id:"red-to-green-diverging-bright",type:"multipart",colorRamps:[{fromColor:[186,20,20],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[54,145,33]}]},{id:"red-to-green-diverging-dark",type:"multipart",colorRamps:[{fromColor:[97,21,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[16,69,16]}]},{id:"slope",type:"multipart",colorRamps:[{fromColor:[56,168,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]}]},{id:"spectrum-full-bright",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:"spectrum-full-dark",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:"spectrum-full-light",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",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",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:"white-to-black",fromColor:[255,255,255],toColor:[0,0,0]},{id:"yellow-to-dark-red",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[242,167,46]},{fromColor:[242,167,46],toColor:[107,0,0]}]},{id:"yellow-to-green-to-dark-blue",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:"yellow-to-red",fromColor:[245,245,0],toColor:[255,0,0]},{id:"yellow-green-bright",fromColor:[236,252,204],toColor:[157,204,16]},{id:"yellow-green-light-to-dark",fromColor:[215,240,175],toColor:[96,107,45]}],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","Purple 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 c(t,e){if(!t||!e||t.length!==e.length)return!1;for(let r=0;r<t.length;r++)if(t[r]>e[r]+2||t[r]<e[r]-2)return!1;return!0}function h(t){const e=t.clone();return e.fromColor=t.toColor,e.toColor=t.fromColor,e.algorithm=t.algorithm,e}function f(t,e){if(!t)return;const r=e??l;let n=null;return"algorithmic"===t.type?r.some((e=>{if(c(t.fromColor.toRgb(),e.fromColor)&&c(t.toColor.toRgb(),e.toColor))return n=e.id,!0})):"multipart"===t.type&&r.some((e=>{const r=t.colorRamps,i=e.colorRamps;if(r&&i&&r.length===i.length&&!i.some(((t,e)=>{if(!c(r[e].fromColor.toRgb(),new o.Z(t.fromColor).toRgb())||!c(r[e].toColor.toRgb(),new o.Z(t.toColor).toRgb()))return!0}))){if(n)return!0;n=e.id}})),n}function d(t,e=!1){const r="string"==typeof t?t:function(t,e,r=!1){if(!t)return;let o=f(t,e);return null!=o||r||(o=f(t=function(t){if("multipart"===t.type){const e=t.clone();return e.colorRamps?.length?(e.colorRamps=e.colorRamps.reverse().map((t=>h(t))),e):e}return h(t)}(t),e)),o}(t,void 0,e);return r?u.toJSON(r):null}function p(t,e="esriCIELabAlgorithm"){const r=l.find((({id:e})=>e===t));return r?r.colorRamps?{type:"multipart",colorRamps:r.colorRamps.map((t=>({type:"algorithmic",algorithm:e,fromColor:[...t.fromColor],toColor:[...t.toColor]})))}:{type:"algorithmic",algorithm:e,fromColor:[...r.fromColor],toColor:[...r.toColor]}:null}function m(t){const e=(t=t||{}).numColors||256,r=t.distanceOffset||0,o=null!=t.isCustomInterval?t.isCustomInterval:null!==t.distanceInterval&&t.distanceInterval!==1/(e-1),n=t.distanceInterval||1/(e-1);return{...t,numColors:e,distanceOffset:r,interpolateAlpha:!!t.interpolateAlpha,distanceInterval:n,isCustomInterval:o,weights:t.weights}}function g(t,e){let{fromColor:r,toColor:o}=t;r=[...r],o=[...o],3===r.length&&(r=r.concat([255])),3===o.length&&(o=o.concat([255]));const i=t.algorithm||"esriCIELabAlgorithm",s=m(e),{numColors:a,distanceOffset:l,isCustomInterval:u,interpolateAlpha:c}=s;if(1===a&&0===l)return[r];if(2===a&&0===l&&!u)return[r,o];const h={r:r[0],g:r[1],b:r[2]},f={r:o[0],g:o[1],b:o[2]},d="esriCIELabAlgorithm"===i?function(t,e,r){const{numColors:o,distanceOffset:n,distanceInterval:i,isCustomInterval:s}=r;let{l:a,a:l,b:u}=t;const c=(e.l-a)*i,h=(e.a-l)*i,f=(e.b-u)*i,d=[];if(n){const t=n/i;a+=t*c,l+=t*h,u+=t*f}for(let t=0;t<o-1;t++)d.push({l:a,a:l,b:u}),a+=c,l+=h,u+=f;return d.push(s?{l:a,a:l,b:u}:e),d}((0,n.Y3)(h),(0,n.Y3)(f),s):"esriHSVAlgorithm"===i?function(t,e,r){const{numColors:o,distanceOffset:n,distanceInterval:i,isCustomInterval:s}=r,a=0===t.s,l=0===e.s;let u=t.h,c=e.h;a&&!l?u=c:l&&!a&&(e={...e,h:u},c=u);let h,f=Math.abs(c-u);const d=360;f<180?h=(c-u)*i:(f=d-f,h=u>c?f*i:-f*i);const p=(e.s-t.s)*i,m=(e.v-t.v)*i;let{s:g,v:y}=t,w=u;if(n){const t=n/i;w=(w+t*h+d)%d,g+=t*p,y+=t*m}const b=[];for(let t=0;t<o-1;t++)b.push({h:w,s:g,v:y}),w=(w+h+d)%d,g+=p,y+=m;return b.push(s?{h:w,s:g,v:y}:e),b}((0,n._Y)(h),(0,n._Y)(f),s):function(t,e,r){const{numColors:o,distanceOffset:n,distanceInterval:i,isCustomInterval:s}=r,a=t.h,l=e.h,u=2*Math.PI;let c;if(a<=l){const t=l-a,e=l-a-u;c=Math.abs(e)<Math.abs(t)?e:t}else{const t=l+u-a,e=l-a;c=Math.abs(e)<Math.abs(t)?e:t}const h=c*i,f=(e.l-t.l)*i,d=(e.c-t.c)*i;let{l:p,c:m,h:g}=t;if(n){const t=n/i;p+=t*f,m+=t*d,g=(g+t*h+u)%u}const y=[];for(let t=0;t<o-1;t++)y.push({l:p,c:m,h:g}),p+=f,m+=d,g=(g+h+u)%u;return y.push(s?{l:p,c:m,h:g}:e),y}((0,n.sJ)(h),(0,n.sJ)(f),s),p=[],g=r[3]??255,y=((o[3]??255)-g)/(a-1);for(let t=0;t<a;t++){const{r:e,g:r,b:o}=(0,n.xr)(d[t]),i=c?Math.round(g+y*t):255;p.push([e,r,o,i])}return p}function y(t,e){const r=(0,s.AK)(t)?t.toJSON():t;return"multipart"===r.type?function(t,e){const{numColors:r,interpolateAlpha:o}=m(e);let n=e?.weights;const{colorRamps:i}=t;if(n){const t=n.reduce(((t,e)=>t+e));n=n.map((e=>e/t))}else{n=[];for(let t=0;t<i.length;t++)n[t]=1/i.length}const s=[];let a=0,l=0;const u=1/(r-1);let c=!1;for(let t=0;t<i.length;t++){let e=c?0:a*u-l,h=t===i.length-1?r-1-a:(n[t]-e)/u;if(c=Math.ceil(h)===h,h=Math.ceil(h),0===h)continue;e/=n[t];const f=g(i[t],{numColors:h,interpolateAlpha:o,distanceOffset:e,distanceInterval:u/n[t]});a+=f.length,s.push(...f),l+=n[t]}const h=[...i.at(-1).toColor];return 3===h.length&&h.push(255),s.push(h),s}(r,e):g(r,e)}function w(t,e){const r=y(t,e),o=e?.interpolateAlpha;return r.forEach(((t,e)=>{t.unshift(e),o||t.pop()})),r}function b(t){const e=(0,n._Y)(t);return{type:"HsvColor",Hue:e.h,Saturation:e.s,Value:e.v,AlphaValue:255}}function C(t){const e=t.toJSON();return{Algorithm:e?.Algorithm||"esriHSVAlgorithm",type:"AlgorithmicColorRamp",FromColor:b(t.fromColor),ToColor:b(t.toColor)}}function v(t){const e=d(t);if(!e)return null;if("algorithmic"===t.type)return{...C(t),Name:e};if(t.colorRamps){const r=t.colorRamps.map(C);return{type:"MultiPartColorRamp",NumColorRamps:r.length,ArrayOfColorRamp:r,Name:e}}return null}function x(t){const e=t.reverse().map((t=>{const e=t.toString(16);return e.length<2?"0"+e:e}));return 4294967295&Number.parseInt(e.join(""),16)}},12163:(t,e,r)=>{function o(t,e){const{attributeTable:r,bandCount:o}=t;return!((null!=r||(n=t,!["u8","s8"].includes(n.pixelType)||null==n.statistics?.[0]?.min||null==n.statistics[0]?.max||1!==n.bandCount))&&(null==r||o>1||e&&null==r.fields.find((t=>t.name.toLowerCase()===e.toLowerCase()))));var n}function n(t){const{bandCount:e,dataType:r,pixelType:o}=t;return"elevation"===r||"generic"===r&&1===e&&("s16"===o||"s32"===o||"f32"===o||"f64"===o)}function i(t,e=!1){const{bandCount:r,colormap:o,pixelType:n}=t;return 1===r&&(!!o?.length||!e&&"u8"===n)}function s(t,e=!1){const{attributeTable:r,bandCount:o}=t;return 1===o&&(!e||null!=r||null!=t.histograms)}function a(t){const{dataType:e}=t;return"vector-uv"===e||"vector-magdir"===e}function l(t){const{dataType:e}=t;return"vector-uv"===e||"vector-magdir"===e}r.d(e,{LV:()=>a,MG:()=>o,aG:()=>l,fI:()=>s,jX:()=>n,mO:()=>i})},75509:(t,e,r)=>{r.d(e,{J:()=>n,v:()=>o});const o=new(r(35454).X)({none:"none",standardDeviation:"standard-deviation",histogramEqualization:"histogram-equalization",minMax:"min-max",percentClip:"percent-clip",sigmoid:"sigmoid"}),n={0:"none",3:"standardDeviation",4:"histogramEqualization",5:"minMax",6:"percentClip",9:"sigmoid"}},23808:(t,e,r)=>{r.d(e,{GE:()=>u}),r(66577);var o=r(80442),n=r(92604),i=(r(22021),r(95330)),s=r(77734);r(8744),r(6570);const a=n.Z.getLogger("esri.views.2d.engine.flow.dataUtils"),l=10;async function u(t,e,r,n){const u=performance.now(),c=function(t,e){const r=function(t,e,r,o){if(0===o)return t;const n=Math.round(3*o),i=new Array(2*n+1);let s=0;for(let t=-n;t<=n;t++){const e=Math.exp(-t*t/(o*o));i[t+n]=e,s+=e}for(let t=-n;t<=n;t++)i[t+n]/=s;const a=new Float32Array(t.length);for(let o=0;o<r;o++)for(let r=0;r<e;r++){let s=0,l=0;for(let a=-n;a<=n;a++){if(r+a<0||r+a>=e)continue;const u=i[a+n];s+=u*t[2*(o*e+(r+a))],l+=u*t[2*(o*e+(r+a))+1]}a[2*(o*e+r)]=s,a[2*(o*e+r)+1]=l}const l=new Float32Array(t.length);for(let t=0;t<e;t++)for(let o=0;o<r;o++){let s=0,u=0;for(let l=-n;l<=n;l++){if(o+l<0||o+l>=r)continue;const c=i[l+n];s+=c*a[2*((o+l)*e+t)],u+=c*a[2*((o+l)*e+t)+1]}l[2*(o*e+t)]=s,l[2*(o*e+t)+1]=u}return l}(e.data,e.width,e.height,t.smoothing);return t.interpolate?(t,o)=>{const n=Math.floor(t),i=Math.floor(o);if(n<0||n>=e.width)return[0,0];if(i<0||i>=e.height)return[0,0];const s=t-n,a=o-i,l=n,u=i,c=n<e.width-1?n+1:n,h=i<e.height-1?i+1:i,f=r[2*(u*e.width+l)],d=r[2*(u*e.width+c)],p=r[2*(h*e.width+l)],m=r[2*(h*e.width+c)],g=r[2*(u*e.width+l)+1],y=r[2*(u*e.width+c)+1];return[(f*(1-a)+p*a)*(1-s)+(d*(1-a)+m*a)*s,(g*(1-a)+r[2*(h*e.width+l)+1]*a)*(1-s)+(y*(1-a)+r[2*(h*e.width+c)+1]*a)*s]}:(t,o)=>{const n=Math.round(t),i=Math.round(o);return n<0||n>=e.width||i<0||i>=e.height?[0,0]:[r[2*(i*e.width+n)],r[2*(i*e.width+n)+1]]}}(e,r),f=performance.now(),d=h(e,c,r.width,r.height),p=performance.now(),m=function(t,e){const r=new s.Z,o=t.reduce(((t,e)=>t+e.length),0),n=new Float32Array(4*o),i=new Array(t.length);let a=0,l=0;for(const e of t){const t=a;for(const t of e)n[4*a]=t.x,n[4*a+1]=t.y,n[4*a+2]=t.t,n[4*a+3]=t.speed,a++;i[l++]={startVertex:t,numberOfVertices:e.length,totalTime:e.at(-1).t,timeSeed:r.getFloat()}}return{lineVertices:n,lineDescriptors:i}}(d),g=performance.now(),y="Streamlines"===t?function(t,e){const{lineVertices:r,lineDescriptors:o}=t;let n=0,i=0;for(const t of o)n+=2*t.numberOfVertices,i+=6*(t.numberOfVertices-1);const s=new Float32Array(9*n),a=new Uint32Array(i);let l=0,u=0;function c(){a[u++]=l-2,a[u++]=l,a[u++]=l-1,a[u++]=l,a[u++]=l+1,a[u++]=l-1}function h(t,e,r,o,n,i,a,u){const c=9*l;let h=0;s[c+h++]=t,s[c+h++]=e,s[c+h++]=1,s[c+h++]=r,s[c+h++]=i,s[c+h++]=a,s[c+h++]=o/2,s[c+h++]=n/2,s[c+h++]=u,l++,s[c+h++]=t,s[c+h++]=e,s[c+h++]=-1,s[c+h++]=r,s[c+h++]=i,s[c+h++]=a,s[c+h++]=-o/2,s[c+h++]=-n/2,s[c+h++]=u,l++}for(const t of o){const{totalTime:o,timeSeed:n}=t;let i=null,s=null,a=null,l=null,u=null,f=null;for(let d=0;d<t.numberOfVertices;d++){const p=r[4*(t.startVertex+d)],m=r[4*(t.startVertex+d)+1],g=r[4*(t.startVertex+d)+2],y=r[4*(t.startVertex+d)+3];let w=null,b=null,C=null,v=null;if(d>0){w=p-i,b=m-s;const t=Math.sqrt(w*w+b*b);if(w/=t,b/=t,d>1){let t=w+u,r=b+f;const o=Math.sqrt(t*t+r*r);t/=o,r/=o;const n=Math.min(1/(t*w+r*b),e);t*=n,r*=n,C=-r,v=t}else C=-b,v=w;null!==C&&null!==v&&(h(i,s,a,C,v,o,n,y),c())}i=p,s=m,a=g,u=w,f=b,l=y}h(i,s,a,-f,u,o,n,l)}return{vertexData:s,indexData:a}}(m,l):function(t){const e=16,r=1,o=2,{lineVertices:n,lineDescriptors:i}=t;let s=0,a=0;for(const t of i){const e=t.numberOfVertices-1;s+=4*e*2,a+=6*e*2}const l=new Float32Array(s*e),u=new Uint32Array(a);let c,h,f,d,p,m,g,y,w,b,C,v,x,k,A=0,S=0;function T(){u[S++]=A-8,u[S++]=A-7,u[S++]=A-6,u[S++]=A-7,u[S++]=A-5,u[S++]=A-6,u[S++]=A-4,u[S++]=A-3,u[S++]=A-2,u[S++]=A-3,u[S++]=A-1,u[S++]=A-2}function I(t,n,i,s,a,u,c,h,f,d,p,m,g,y){const w=A*e;let b=0;for(const e of[r,o])for(const r of[1,2,3,4])l[w+b++]=t,l[w+b++]=n,l[w+b++]=i,l[w+b++]=s,l[w+b++]=c,l[w+b++]=h,l[w+b++]=f,l[w+b++]=d,l[w+b++]=e,l[w+b++]=r,l[w+b++]=g,l[w+b++]=y,l[w+b++]=a/2,l[w+b++]=u/2,l[w+b++]=p/2,l[w+b++]=m/2,A++}function M(t,e){let r=w+C,o=b+v;const n=Math.sqrt(r*r+o*o);r/=n,o/=n;const i=w*r+b*o;r/=i,o/=i;let s=C+x,a=v+k;const l=Math.sqrt(s*s+a*a);s/=l,a/=l;const u=C*s+v*a;s/=u,a/=u,I(c,h,f,d,-o,r,p,m,g,y,-a,s,t,e),T()}function P(t,e,r,o,n,i){if(w=C,b=v,C=x,v=k,null==w&&null==b&&(w=C,b=v),null!=p&&null!=m){x=t-p,k=e-m;const r=Math.sqrt(x*x+k*k);x/=r,k/=r}null!=w&&null!=b&&M(n,i),c=p,h=m,f=g,d=y,p=t,m=e,g=r,y=o}function E(t,e){w=C,b=v,C=x,v=k,null==w&&null==b&&(w=C,b=v),null!=w&&null!=b&&M(t,e)}for(const t of i){c=null,h=null,f=null,d=null,p=null,m=null,g=null,y=null,w=null,b=null,C=null,v=null,x=null,k=null;const{totalTime:e,timeSeed:r}=t;for(let o=0;o<t.numberOfVertices;o++)P(n[4*(t.startVertex+o)],n[4*(t.startVertex+o)+1],n[4*(t.startVertex+o)+2],n[4*(t.startVertex+o)+3],e,r);E(e,r)}return{vertexData:l,indexData:u}}(m),w=performance.now();return(0,o.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(g-p)),a.info("I.4","create{Streamlines|Particles}Mesh (ms)",Math.round(w-g)),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_)(n),y}function c(t,e,r,o,n,i,s,a,l){const u=[];let c=r,h=o,f=0,[d,p]=e(c,h);d*=t.velocityScale,p*=t.velocityScale;const m=Math.sqrt(d*d+p*p);let g,y;u.push({x:c,y:h,t:f,speed:m});for(let r=0;r<t.verticesPerLine;r++){let[r,o]=e(c,h);r*=t.velocityScale,o*=t.velocityScale;const d=Math.sqrt(r*r+o*o);if(d<t.minSpeedThreshold)return u;const p=r/d,m=o/d;if(c+=p*t.segmentLength,h+=m*t.segmentLength,f+=t.segmentLength/d,Math.acos(p*g+m*y)>t.maxTurnAngle)return u;if(t.collisions){const t=Math.round(c*l),e=Math.round(h*l);if(t<0||t>s-1||e<0||e>a-1)return u;const r=i[e*s+t];if(-1!==r&&r!==n)return u;i[e*s+t]=n}u.push({x:c,y:h,t:f,speed:d}),g=p,y=m}return u}function h(t,e,r,o){const n=[],i=new s.Z,a=1/Math.max(t.lineCollisionWidth,1),l=Math.round(r*a),u=Math.round(o*a),h=new Int32Array(l*u);for(let t=0;t<h.length;t++)h[t]=-1;const f=[];for(let e=0;e<o;e+=t.lineSpacing)for(let o=0;o<r;o+=t.lineSpacing)f.push({x:o,y:e,sort:i.getFloat()});f.sort(((t,e)=>t.sort-e.sort));for(const{x:r,y:o}of f)if(i.getFloat()<t.density){const i=c(t,e,r,o,n.length,h,l,u,a);if(i.length<2)continue;n.push(i)}return n}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3230],{43230:(e,t,n)=>{n.r(t),n.d(t,{default:()=>g});var r=n(66643),o=n(20102),s=n(92604),a=n(95330),i=n(8744),u=n(98732),c=n(57191),l=n(37427),p=n(64106),y=n(92722),f=n(23095),d=n(51432),m=n(99514);class g{constructor(){this._queryEngine=null,this._customParameters=null,this._snapshotFeatures=async e=>{const{objectIdField:t}=this._queryEngine,n=await(0,d.Bm)(this._getFeatureUrl??"",this._featureType.typeName,this._getFeatureOutputFormat,{customParameters:this._customParameters,dateFields:this._queryEngine.fieldsIndex.dateFields.map((e=>e.name)),signal:e});await(0,y.O3)(n),(0,a.k_)(e);const r=(0,y.lG)(n,{geometryType:this._queryEngine.geometryType,hasZ:!1,objectIdField:t});if(!(0,i.fS)(this._queryEngine.spatialReference,i.Zn))for(const e of r)null!=e.geometry&&(e.geometry=(0,u.GH)((0,l.iV)((0,u.di)(e.geometry,this._queryEngine.geometryType,!1,!1),i.Zn,this._queryEngine.spatialReference)));let o=1;for(const e of r){const n={};(0,f.O0)(this._fieldsIndex,n,e.attributes,!0),e.attributes=n,null==e.attributes[t]&&(e.objectId=e.attributes[t]=o++)}return r}}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(e,t){const{getFeatureUrl:n,getFeatureOutputFormat:r,spatialReference:o,fields:s,geometryType:i,featureType:u,objectIdField:l,customParameters:y}=e;this._featureType=u,this._customParameters=y,this._getFeatureUrl=n,this._getFeatureOutputFormat=r,this._fieldsIndex=new m.Z(s),await this._checkProjection(o),(0,a.k_)(t),this._queryEngine=new p.q({fields:s,geometryType:i,hasM:!1,hasZ:!1,objectIdField:l,spatialReference:o,timeInfo:null,featureStore:new c.Z({geometryType:i,hasM:!1,hasZ:!1})});const f=await this._snapshotFeatures(t.signal);return this._queryEngine.featureStore.addMany(f),{extent:(await this._queryEngine.fetchRecomputedExtents()).fullExtent}}async applyEdits(){throw new o.Z("wfs-source:editing-not-supported","applyEdits() is not supported on WFSLayer")}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(e,t.signal)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForSnapping(e,t.signal)}async refresh(e){return this._customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=(0,r.vr)(this._snapshotFeatures),this._snapshotTask.promise.then((e=>{this._queryEngine.featureStore.clear(),e&&this._queryEngine.featureStore.addMany(e)}),(e=>{this._queryEngine.featureStore.clear(),(0,a.D_)(e)||s.Z.getLogger("esri.layers.WFSLayer").error(new o.Z("wfs-layer:getfeature-error","An error occurred during the GetFeature request",{error:e}))})),await this._waitSnapshotComplete(),{extent:(await this._queryEngine.fetchRecomputedExtents()).fullExtent}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _checkProjection(e){try{await(0,l._W)(i.Zn,e)}catch{throw new o.Z("unsupported-projection","Projection not supported",{spatialReference:e})}}}},92722:(e,t,n)=>{n.d(t,{O3:()=>S,lG:()=>E,my:()=>T,q9:()=>u});var r=n(20102),o=n(70272),s=n(5428),a=n(35671);const i={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function u(e){return i[e]}function*c(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(const t of e.features)t&&(yield t)}}function*l(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(const t of e.coordinates)yield*t;break;case"MultiPolygon":for(const t of e.coordinates)for(const e of t)yield*e}}function p(e){for(const t of e)if(t.length>2)return!0;return!1}function y(e){let t=0;for(let n=0;n<e.length;n++){const r=e[n],o=e[(n+1)%e.length];t+=r[0]*o[1]-o[0]*r[1]}return t<=0}function f(e){const t=e[0],n=e.at(-1);return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]||e.push(t),e}function d(e,t,n){switch(t.type){case"LineString":case"MultiPoint":return function(e,t,n){return h(e,t.coordinates,n),e}(e,t,n);case"MultiLineString":return function(e,t,n){for(const r of t.coordinates)h(e,r,n);return e}(e,t,n);case"MultiPolygon":return function(e,t,n){for(const r of t.coordinates){m(e,r[0],n);for(let t=1;t<r.length;t++)g(e,r[t],n)}return e}(e,t,n);case"Point":return function(e,t,n){return b(e,t.coordinates,n),e}(e,t,n);case"Polygon":return function(e,t,n){const r=t.coordinates;m(e,r[0],n);for(let t=1;t<r.length;t++)g(e,r[t],n);return e}(e,t,n)}}function m(e,t,n){const r=f(t);!function(e){return!y(e)}(r)?h(e,r,n):w(e,r,n)}function g(e,t,n){const r=f(t);!function(e){return y(e)}(r)?h(e,r,n):w(e,r,n)}function h(e,t,n){for(const r of t)b(e,r,n);e.lengths.push(t.length)}function w(e,t,n){for(let r=t.length-1;r>=0;r--)b(e,t[r],n);e.lengths.push(t.length)}function b(e,t,n){const[r,o,s]=t;e.coords.push(r,o),n.hasZ&&e.coords.push(s||0)}function F(e){switch(typeof e){case"string":return"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function S(e){if(!e)throw new r.Z("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new r.Z("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});const{crs:t}=e;if(!t)return;const n="string"==typeof t?t:"name"===t.type?t.properties.name:"EPSG"===t.type?t.properties.code:null,o=new RegExp(".*(CRS84H?|4326)$","i");if(!n||!o.test(n))throw new r.Z("geojson-layer:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:t})}function T(e,t={}){const n=[],r=new Set,o=new Set;let s,i=!1,y=null,f=!1,{geometryType:d=null}=t,m=!1;for(const t of c(e)){const{geometry:e,properties:c,id:g}=t;if((!e||(d||(d=u(e.type)),u(e.type)===d))&&(i||(i=p(l(e))),f||(f=null!=g,f&&(s=typeof g,c&&(y=Object.keys(c).filter((e=>c[e]===g))))),c&&y&&f&&null!=g&&(y.length>1?y=y.filter((e=>c[e]===g)):1===y.length&&(y=c[y[0]]===g?y:[])),!m&&c)){let e=!0;for(const t in c){if(r.has(t))continue;const s=c[t];if(null==s){e=!1,o.add(t);continue}const i=F(s);if("unknown"===i){o.add(t);continue}o.delete(t),r.add(t);const u=(0,a.q6)(t);u&&n.push({name:u,alias:t,type:i})}m=e}}const g=(0,a.q6)(1===y?.length&&y[0]||null)??void 0;if(g)for(const e of n)if(e.name===g&&(0,a.H7)(e)){e.type="esriFieldTypeOID";break}return{fields:n,geometryType:d,hasZ:i,objectIdFieldName:g,objectIdFieldType:s,unknownFields:Array.from(o)}}function E(e,t){return Array.from(function*(e,t={}){const{geometryType:n,objectIdField:r}=t;for(const a of e){const{geometry:e,properties:i,id:c}=a;if(e&&u(e.type)!==n)continue;const l=i||{};let p;r&&(p=l[r],null==c||p||(l[r]=p=c));const y=new o.u_(e?d(new s.Z,e,t):null,l,null,p??void 0);yield y}}(c(e),t))}},51432:(e,t,n)=>{n.d(t,{M8:()=>b,ft:()=>R,FU:()=>N,Bm:()=>O,be:()=>j,eB:()=>v}),n(66577);var r=n(3172),o=n(20102),s=n(66374),a=n(17452),i=n(44547),u=n(8744),c=n(86973),l=n(92722);function p(e){return function(e){const t=y.exec(e);if(!t?.groups)return null;const n=t.groups,r=+n.year,o=+n.month-1,s=+n.day,a=+(n.hours??"0"),i=+(n.minutes??"0"),u=+(n.seconds??"0");if(a>23)return null;if(i>59)return null;if(u>59)return null;const c=n.ms??"0",l=c?+c.padEnd(3,"0").substring(0,3):0;let p;if(n.isUTC)p=Date.UTC(r,o,s,a,i,u,l);else if(n.offsetSign){const e=+n.offsetHours,t=+n.offsetMinutes;p=6e4*("+"===n.offsetSign?-1:1)*(60*e+t)+Date.UTC(r,o,s,a,i,u,l)}else p=new Date(r,o,s,a,i,u,l).getTime();return Number.isNaN(p)?null:p}(e)??function(e){const t=new Date(e).getTime();return Number.isNaN(t)?null:t}(e)}const y=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/;var f=n(88724),d=n(1231),m=n(82971),g=n(6570);const h="xlink:href",w="2.0.0",b="__esri_wfs_id__",F="wfs-layer:getWFSLayerTypeInfo-error",S="wfs-layer:empty-service",T="wfs-layer:feature-type-not-found",E="wfs-layer:geojson-not-supported",x="wfs-layer:kvp-encoding-not-supported",_="wfs-layer:malformed-json",C="wfs-layer:unknown-geometry-type",P="wfs-layer:unknown-field-type",k="wfs-layer:unsupported-spatial-reference",Z="wfs-layer:unsupported-wfs-version";async function N(e,t){const n=function(e){const t=U(e);(function(e){const t=e.firstElementChild?.getAttribute("version");if(t&&t!==w)throw new o.Z(Z,`Unsupported WFS version ${t}. Supported version: ${w}`)})(t),$(t);const n=t.firstElementChild,r=(0,s.Fs)(function(e){return(0,f.H)(e,{FeatureTypeList:{FeatureType:e=>{const t={typeName:"undefined:undefined",name:"",title:"",description:"",extent:null,namespacePrefix:"",namespaceUri:"",supportedSpatialReferences:[]},n=new Set([4326]),r=e=>{const t=parseInt(e.textContent?.match(/(?<wkid>\d+$)/i)?.groups?.wkid??"",10);Number.isNaN(t)||n.add(t)};return(0,f.h)(e,{Name:e=>{const{name:n,prefix:r}=L(e.textContent);t.typeName=`${r}:${n}`,t.name=n,t.namespacePrefix=r,t.namespaceUri=e.lookupNamespaceURI(r)},Abstract:e=>{t.description=e.textContent},Title:e=>{t.title=e.textContent},WGS84BoundingBox:e=>{t.extent=function(e){let t,n,r,o;for(const s of e.children)switch(s.localName){case"LowerCorner":[t,n]=s.textContent.split(" ").map((e=>Number.parseFloat(e)));break;case"UpperCorner":[r,o]=s.textContent.split(" ").map((e=>Number.parseFloat(e)))}return{xmin:t,ymin:n,xmax:r,ymax:o,spatialReference:u.Zn}}(e)},DefaultSRS:r,DefaultCRS:r,OtherSRS:r,OtherCRS:r}),t.title||(t.title=t.name),t.supportedSpatialReferences.push(...n),t}}})}(n));return{operations:q(n),get featureTypes(){return Array.from(r())},readFeatureTypes:r}}((await(0,r.Z)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"GetCapabilities",VERSION:w,...t?.customParameters},signal:t?.signal})).data);return function(e,t){(0,a.$U)(e)&&((0,a.D6)(e,t.operations.DescribeFeatureType.url,!0)&&(t.operations.DescribeFeatureType.url=(0,a.hO)(t.operations.DescribeFeatureType.url)),(0,a.D6)(e,t.operations.GetFeature.url,!0)&&(t.operations.GetFeature.url=(0,a.hO)(t.operations.GetFeature.url)))}(e,n),n}const G=new Set(["json","application/json","geojson","application/json; subtype=geojson"]);function q(e){let t=!1;const n={GetCapabilities:{url:""},DescribeFeatureType:{url:""},GetFeature:{url:"",outputFormat:null,supportsPagination:!1}};if((0,f.h)(e,{OperationsMetadata:{Operation:e=>{switch(e.getAttribute("name")){case"GetCapabilities":return{DCP:{HTTP:{Get:e=>{n.GetCapabilities.url=e.getAttribute(h)}}}};case"DescribeFeatureType":return{DCP:{HTTP:{Get:e=>{n.DescribeFeatureType.url=e.getAttribute(h)}}}};case"GetFeature":return{DCP:{HTTP:{Get:e=>{n.GetFeature.url=e.getAttribute(h)}}},Parameter:e=>{if("outputFormat"===e.getAttribute("name"))return{AllowedValues:{Value:e=>{const t=e.textContent;t&&G.has(t.toLowerCase())&&(n.GetFeature.outputFormat=t)}}}}}}},Constraint:e=>{switch(e.getAttribute("name")){case"KVPEncoding":return{DefaultValue:e=>{t="true"===e.textContent.toLowerCase()}};case"ImplementsResultPaging":return{DefaultValue:e=>{n.GetFeature.supportsPagination="true"===e.textContent.toLowerCase()}}}}}}),!t)throw new o.Z(x,"WFS service doesn't support key/value pair (KVP) encoding");if(null==n.GetFeature.outputFormat)throw new o.Z(E,"WFS service doesn't support GeoJSON output format");return n}function R(e,t,n){return(0,s.sE)(e,(e=>n?e.name===t&&e.namespaceUri===n:e.typeName===t||e.name===t))}async function j(e,t,n,r={}){const{featureType:s,extent:a}=await async function(e,t,n,r={}){const{spatialReference:s=m.Z.WGS84}=r,a=e.readFeatureTypes(),c=t?R(a,t,n):a.next().value;if(null==c)throw t?new o.Z(T,`The type '${t}' could not be found in the service`):new o.Z(S,"The service is empty");let l=new g.Z({...c.extent,spatialReference:s});if(!(0,u.fS)(s,u.Zn))try{await(0,i.initializeProjection)(u.Zn,s,void 0,r),l=(0,i.iV)(l,u.Zn)}catch{throw new o.Z(k,"Projection not supported")}return{extent:l,spatialReference:s,featureType:c}}(e,t,n,r),{fields:c,geometryType:l,swapXY:p,objectIdField:y,geometryField:f}=await async function(e,t,n={}){const[r,s]=await Promise.allSettled([I(e.operations.DescribeFeatureType.url,t,n),A(e,t,n)]),a=e=>new o.Z(F,`An error occurred while getting info about the feature type '${t}'`,{error:e});if("rejected"===r.status)throw a(r.reason);if("rejected"===s.status)throw a(s.reason);const{fields:i,errors:u}=r.value??{},c=r.value?.geometryType||s.value?.geometryType,l=s.value?.swapXY??!1;if(null==c)throw new o.Z(C,`The geometry type could not be determined for type '${t}`,{typeName:t,geometryType:c,fields:i,errors:u});return{...v(i??[]),geometryType:c,swapXY:l}}(e,s.typeName,r);return{url:e.operations.GetCapabilities.url,name:s.name,namespaceUri:s.namespaceUri,fields:c,geometryField:f,geometryType:l,objectIdField:y,spatialReference:r.spatialReference??m.Z.WGS84,extent:a,swapXY:p,wfsCapabilities:e,customParameters:r.customParameters}}function v(e){const t=e.find((e=>"geometry"===e.type));let n=e.find((e=>"oid"===e.type));return e=e.filter((e=>"geometry"!==e.type)),n||(n=new d.Z({name:b,type:"oid",alias:b}),e.unshift(n)),{geometryField:t?.name??null,objectIdField:n.name,fields:e}}async function A(e,t,n={}){let o,s=!1;const[a,i]=await Promise.all([O(e.operations.GetFeature.url,t,e.operations.GetFeature.outputFormat,{...n,count:1}),(0,r.Z)(e.operations.GetFeature.url,{responseType:"text",query:D(t,void 0,{...n,count:1}),signal:n?.signal})]),u="FeatureCollection"===a.type&&a.features[0]?.geometry;if(u){let e;switch(o=c.M.fromJSON((0,l.q9)(u.type)),u.type){case"Point":e=u.coordinates;break;case"LineString":case"MultiPoint":e=u.coordinates[0];break;case"MultiLineString":case"Polygon":e=u.coordinates[0][0];break;case"MultiPolygon":e=u.coordinates[0][0][0]}const t=/<[^>]*pos[^>]*> *(-?\d+(?:\.\d+)?) (-?\d+(?:\.\d+)?)/.exec(i.data);if(t){const n=e[0].toFixed(3),r=e[1].toFixed(3),o=parseFloat(t[1]).toFixed(3);n===parseFloat(t[2]).toFixed(3)&&r===o&&(s=!0)}}return{geometryType:o,swapXY:s}}async function I(e,t,n){return function(e,t){const{name:n}=L(e),r=U(t);$(r);const a=(0,s.sE)((0,f.H)(r.firstElementChild,{element:e=>({name:e.getAttribute("name"),typeName:L(e.getAttribute("type")).name})}),(({name:e})=>e===n));if(null!=a){const e=(0,s.sE)((0,f.H)(r.firstElementChild,{complexType:e=>e}),(e=>e.getAttribute("name")===a.typeName));if(null!=e)return function(e){const t=[],n=[];let r;const s=(0,f.H)(e,{complexContent:{extension:{sequence:{element:e=>e}}}});for(const a of s){const s=a.getAttribute("name");if(!s)continue;let i,u;if(a.hasAttribute("type")?i=L(a.getAttribute("type")).name:(0,f.h)(a,{simpleType:{restriction:e=>(i=L(e.getAttribute("base")).name,{maxLength:e=>{u=+e.getAttribute("value")}})}}),!i)continue;const c="true"===a.getAttribute("nillable");let l=!1;switch(i.toLowerCase()){case"integer":case"nonpositiveinteger":case"negativeinteger":case"long":case"int":case"short":case"byte":case"nonnegativeinteger":case"unsignedlong":case"unsignedint":case"unsignedshort":case"unsignedbyte":case"positiveinteger":n.push(new d.Z({name:s,alias:s,type:"integer",nullable:c}));break;case"float":case"double":case"decimal":n.push(new d.Z({name:s,alias:s,type:"double",nullable:c}));break;case"boolean":case"string":case"gyearmonth":case"gyear":case"gmonthday":case"gday":case"gmonth":case"anyuri":case"qname":case"notation":case"normalizedstring":case"token":case"language":case"idrefs":case"entities":case"nmtoken":case"nmtokens":case"name":case"ncname":case"id":case"idref":case"entity":case"duration":case"time":n.push(new d.Z({name:s,alias:s,type:"string",nullable:c,length:u??255}));break;case"datetime":case"date":n.push(new d.Z({name:s,alias:s,type:"date",nullable:c,length:u??36}));break;case"pointpropertytype":r="point",l=!0;break;case"multipointpropertytype":r="multipoint",l=!0;break;case"curvepropertytype":case"multicurvepropertytype":case"multilinestringpropertytype":r="polyline",l=!0;break;case"surfacepropertytype":case"multisurfacepropertytype":case"multipolygonpropertytype":r="polygon",l=!0;break;case"geometrypropertytype":case"multigeometrypropertytype":l=!0,t.push(new o.Z(C,`geometry type '${i}' is not supported`,{type:(new XMLSerializer).serializeToString(e)}));break;default:t.push(new o.Z(P,`Unknown field type '${i}'`,{type:(new XMLSerializer).serializeToString(e)}))}l&&n.push(new d.Z({name:s,alias:s,type:"geometry",nullable:c}))}for(const e of n)if("integer"===e.type&&!e.nullable&&M.has(e.name.toLowerCase())){e.type="oid";break}return{geometryType:r,fields:n,errors:t}}(e)}throw new o.Z(T,`Type '${e}' not found in document`,{document:(new XMLSerializer).serializeToString(r)})}(t,(await(0,r.Z)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"DescribeFeatureType",VERSION:w,TYPENAME:t,...n?.customParameters},signal:n?.signal})).data)}const M=new Set(["objectid","fid"]);async function O(e,t,n,s){let{data:a}=await(0,r.Z)(e,{responseType:"text",query:D(t,n,s),signal:s?.signal});a=a.replaceAll(/": +(-?\d+),(\d+)(,)?/g,'": $1.$2$3');try{if(s?.dateFields?.length){const e=new Set(s.dateFields);return JSON.parse(a,((t,n)=>e.has(t)?p(n):n))}return JSON.parse(a)}catch(e){throw new o.Z(_,"Error while parsing the response",{response:a,error:e})}}function D(e,t,n){return{SERVICE:"WFS",REQUEST:"GetFeature",VERSION:w,TYPENAMES:e,OUTPUTFORMAT:t,SRSNAME:"EPSG:4326",STARTINDEX:n?.startIndex,COUNT:n?.count,...n?.customParameters}}function U(e){return(new DOMParser).parseFromString(e.trim(),"text/xml")}function L(e){const[t,n]=e.split(":");return{prefix:n?t:"",name:n??t}}function $(e){let t="",n="";if((0,f.h)(e.firstElementChild,{Exception:e=>(t=e.getAttribute("exceptionCode"),{ExceptionText:e=>{n=e.textContent}})}),t)throw new o.Z(`wfs-layer:${t}`,n)}},88724:(e,t,n)=>{function r(e,t){if(e&&t)for(const n of e.children)if(n.localName in t){const e=t[n.localName];if("function"==typeof e){const t=e(n);t&&r(n,t)}else r(n,e)}}function*o(e,t){for(const n of e.children)if(n.localName in t){const e=t[n.localName];"function"==typeof e?yield e(n):yield*o(n,e)}}n.d(t,{H:()=>o,h:()=>r})}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8159],{84552:(e,t,r)=>{r.d(t,{Z:()=>d});var i=r(43697),n=r(2368),o=r(96674),s=r(35463),l=r(5600),a=(r(75215),r(67676),r(80442),r(36030)),u=r(52011),p=r(78981);let c=class extends((0,n.J)(o.wq)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,s.rJ)(this.value,this.unit,"milliseconds")}};(0,i._)([(0,a.J)(p.v,{nonNullable:!0})],c.prototype,"unit",void 0),(0,i._)([(0,l.Cb)({type:Number,json:{write:!0},nonNullable:!0})],c.prototype,"value",void 0),c=(0,i._)([(0,u.j)("esri.TimeInterval")],c);const d=c},22862:(e,t,r)=>{r.d(t,{Hg:()=>f,V7:()=>y,uD:()=>d});var i=r(92036),n=r(46791),o=r(1153);const s=["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"];function l(e){return e instanceof i.Z}function a(e){return e instanceof n.Z?Object.keys(e.items):l(e)?(0,o.vw)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof n.Z?e.items[t]:e[t]}function p(e){return e?e.declaredClass:null}function c(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const i=a(e),n=a(t);if(0===i.length&&0===n.length)return;if(!i.length||!n.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const o=n.filter((e=>!i.includes(e))),d=i.filter((e=>!n.includes(e))),y=i.filter((r=>n.includes(r)&&u(e,r)!==u(t,r))).concat(o,d).sort(),f=p(e);if(f&&s.includes(f)&&y.length)return{type:"complete",oldValue:e,newValue:t};let m;const h=l(e)&&l(t);for(const i of y){const n=u(e,i),o=u(t,i);let s;if((h||"function"!=typeof n&&"function"!=typeof o)&&n!==o&&(null!=n||null!=o)){if(r&&r[i]&&"function"==typeof r[i])s=r[i]?.(n,o);else if(n instanceof Date&&o instanceof Date){if(n.getTime()===o.getTime())continue;s={type:"complete",oldValue:n,newValue:o}}else s="object"==typeof n&&"object"==typeof o&&p(n)===p(o)?c(n,o):{type:"complete",oldValue:n,newValue:o};null!=s&&(null!=m?m.diff[i]=s:m={type:"partial",diff:{[i]:s}})}}return m}function d(e,t){if(null==e)return!1;const r=t.split(".");let i=e;for(const e of r){if("complete"===i.type)return!0;if("partial"!==i.type)return!1;{const t=i.diff[e];if(!t)return!1;i=t}}return!0}function y(e,t){for(const r of t)if(d(e,r))return!0;return!1}function f(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&p(e)!==p(t)?{type:"complete",oldValue:e,newValue:t}:c(e,t)}},88068:(e,t,r)=>{r.r(t),r.d(t,{default:()=>q});var i=r(43697),n=(r(66577),r(51773)),o=(r(16050),r(12501),r(28756),r(92271),r(72529),r(5499),r(84382),r(81571),r(91423),r(32400)),s=r(16453),l=r(5600),a=(r(75215),r(67676),r(80442),r(52011)),u=r(86973),p=r(87085),c=r(20102),d=r(83379),y=r(16467),f=r(74889),m=r(82971);let h=class extends d.Z{constructor(){super(...arguments),this.featureDefinition=null,this.type="ogc-feature"}load(e){return this.addResolvingPromise(this._loadOGCServices(this.layer,e)),this.when()}getSource(){const{featureDefinition:{collection:e,layerDefinition:t,spatialReference:r,supportedCrs:i},layer:{apiKey:n,customParameters:o,effectiveMaxRecordCount:s}}=this;return{type:"ogc-source",collection:e,layerDefinition:t,maxRecordCount:s,queryParameters:{apiKey:n,customParameters:o},spatialReference:r,supportedCrs:i}}queryExtent(e,t={}){return null}queryFeatureCount(e,t={}){return null}queryFeatures(e,t={}){return this.queryFeaturesJSON(e,t).then((e=>f.Z.fromJSON(e)))}queryFeaturesJSON(e,t={}){const r=this.getSource();return this.load(t).then((()=>(0,y.yN)(r,e,t)))}queryObjectIds(e,t={}){return null}serviceSupportsSpatialReference(e){return!(!e.isWGS84&&!e.isWebMercator&&!this.featureDefinition.supportedCrs[e.wkid])}_conformsToType(e,t){const r=new RegExp(`^${t}$`,"i");return e.conformsTo.some((e=>r.test(e)))??!1}_getCapabilities(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:t,maxRecordCountFactor:void 0,standardMaxRecordCount:void 0,supportsCacheHint:!1,supportsCentroid:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,supportsSqlExpression:!1,tileMaxRecordCount:void 0},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1}}}_getMaxRecordCount(e){const t=e?.components?.parameters;return t?.limit?.schema?.maximum??t?.limitFeatures?.schema?.maximum}_getStorageSpatialReference(e){const t=e.storageCrs??y.$9,r=(0,y.d)(t);return null==r?m.Z.WGS84:new m.Z({wkid:r})}_getSupportedSpatialReferences(e,t){const r="#/crs",i=e.crs??[y.$9],n=i.includes(r)?i.filter((e=>e!==r)).concat(t.crs??[]):i,o=/^http:\/\/www\.opengis.net\/def\/crs\/epsg\/.*\/3785$/i;return n.filter((e=>!o.test(e)))}async _loadOGCServices(e,t){const r=null!=t?t.signal:null,{apiKey:i,collectionId:n,customParameters:o,fields:s,geometryType:l,hasZ:a,objectIdField:p,timeInfo:d,url:f}=e,m={fields:s?.map((e=>e.toJSON())),geometryType:u.P.toJSON(l),hasZ:a??!1,objectIdField:p,timeInfo:d?.toJSON()},h={apiKey:i,customParameters:o,signal:r},g=await(0,y.gp)(f,h),[w,b]=await Promise.all([(0,y.G4)(g,h),(0,y.j)(g,h)]);if(!this._conformsToType(w,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson"))throw new c.Z("ogc-feature-layer:no-geojson-support","Server does not support geojson");const v=b.collections.find((e=>e.id===n));if(!v)throw new c.Z("ogc-feature-layer:collection-not-found","Server does not contain the named collection");const S=this._conformsToType(w,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30")?await(0,y.eS)(g,h):null,C=await(0,y.w9)(v,m,h),_=this._getMaxRecordCount(S),x=this._getCapabilities(C.hasZ,_),I=this._getStorageSpatialReference(v).toJSON(),F=this._getSupportedSpatialReferences(v,b),T=new RegExp(`^${y.Lu}`,"i"),j={};for(const e of F){const t=(0,y.d)(e);null!=t&&(j[t]||(j[t]=e.replace(T,"")))}this.featureDefinition={capabilities:x,collection:v,layerDefinition:C,spatialReference:I,supportedCrs:j}}};(0,i._)([(0,l.Cb)()],h.prototype,"featureDefinition",void 0),(0,i._)([(0,l.Cb)({constructOnly:!0})],h.prototype,"layer",void 0),(0,i._)([(0,l.Cb)()],h.prototype,"type",void 0),h=(0,i._)([(0,a.j)("esri.layers.graphics.sources.OGCFeatureSource")],h);var g=r(54295),w=r(71612),b=r(17017),v=r(69637),S=r(6404),C=r(38009),_=r(68825),x=r(16859),I=r(34760),F=r(72965),T=r(28294),j=r(21506),R=r(16451),E=r(1231),P=r(53518),Z=r(35671),O=r(54306),D=r(30707),M=r(14165),N=r(32163),G=r(6570);const U=(0,P.v)();let k=class extends((0,g.V)((0,b.N)((0,S.M)((0,v.b)((0,w.h)((0,_.c)((0,T.n)((0,F.M)((0,C.q)((0,x.I)((0,I.Q)((0,s.R)(p.Z))))))))))))){constructor(e){super(e),this.capabilities=null,this.collectionId=null,this.copyright=null,this.definitionExpression=null,this.description=null,this.displayField=null,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.hasZ=void 0,this.labelingInfo=null,this.labelsVisible=!0,this.legendEnabled=!0,this.maxRecordCount=null,this.objectIdField=null,this.operationalLayerType="OGCFeatureLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new h({layer:this}),this.spatialReference=null,this.title=null,this.type="ogc-feature",this.typeIdField=null,this.types=null,this.url=null}destroy(){this.source?.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["OGCFeatureServer"]},e).then((()=>this._fetchService(e)))),this.when()}get defaultPopupTemplate(){return this.createPopupTemplate()}get effectiveMaxRecordCount(){return this.maxRecordCount??this.capabilities?.query.maxRecordCount??5e3}get isTable(){return this.loaded&&null==this.geometryType}set renderer(e){(0,Z.YN)(e,this.fieldsIndex),this._set("renderer",e)}on(e,t){return super.on(e,t)}createPopupTemplate(e){return(0,N.eZ)(this,e)}createQuery(){return new M.Z}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){let r,i=!1;const n=t?.feature?.attributes,o=this.typeIdField&&n?.[this.typeIdField];return null!=o&&this.types&&(i=this.types.some((t=>t.id==o&&(r=t.domains?.[e],"inherited"===r?.type&&(r=this._getLayerDomain(e)),!0)))),i||r||(r=this._getLayerDomain(e)),r}queryFeatures(e,t){return this.load().then((()=>this.source.queryFeatures(M.Z.from(e)||this.createQuery(),t))).then((e=>(e?.features?.forEach((e=>{e.layer=e.sourceLayer=this})),e)))}serviceSupportsSpatialReference(e){return this.source?.serviceSupportsSpatialReference(e)??!1}async _fetchService(e){await this.source.load(e),this.read(this.source.featureDefinition,{origin:"service"}),(0,Z.YN)(this.renderer,this.fieldsIndex),(0,Z.UF)(this.timeInfo,this.fieldsIndex)}_getLayerDomain(e){if(!this.fields)return null;for(const t of this.fields)if(t.name===e&&t.domain)return t.domain;return null}};(0,i._)([(0,l.Cb)({readOnly:!0,json:{origins:{service:{read:!0}}}})],k.prototype,"capabilities",void 0),(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],k.prototype,"collectionId",void 0),(0,i._)([(0,l.Cb)({type:String})],k.prototype,"copyright",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],k.prototype,"defaultPopupTemplate",null),(0,i._)([(0,l.Cb)({type:String})],k.prototype,"definitionExpression",void 0),(0,i._)([(0,l.Cb)({readOnly:!0,type:String,json:{origins:{service:{name:"collection.description"}}}})],k.prototype,"description",void 0),(0,i._)([(0,l.Cb)({type:String})],k.prototype,"displayField",void 0),(0,i._)([(0,l.Cb)({type:Number})],k.prototype,"effectiveMaxRecordCount",null),(0,i._)([(0,l.Cb)(j.PV)],k.prototype,"elevationInfo",void 0),(0,i._)([(0,l.Cb)({type:[E.Z],json:{origins:{service:{name:"layerDefinition.fields"}}}})],k.prototype,"fields",void 0),(0,i._)([(0,l.Cb)(U.fieldsIndex)],k.prototype,"fieldsIndex",void 0),(0,i._)([(0,l.Cb)({readOnly:!0,type:G.Z,json:{origins:{service:{name:"layerDefinition.extent"}}}})],k.prototype,"fullExtent",void 0),(0,i._)([(0,l.Cb)({type:u.M.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:u.M.read}}}}})],k.prototype,"geometryType",void 0),(0,i._)([(0,l.Cb)({type:Boolean,json:{origins:{service:{name:"layerDefinition.hasZ"}}}})],k.prototype,"hasZ",void 0),(0,i._)([(0,l.Cb)({type:Boolean,readOnly:!0})],k.prototype,"isTable",null),(0,i._)([(0,l.Cb)({type:[O.Z],json:{origins:{"web-document":{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:D.r},write:!0}}}})],k.prototype,"labelingInfo",void 0),(0,i._)([(0,l.Cb)(j.iR)],k.prototype,"labelsVisible",void 0),(0,i._)([(0,l.Cb)(j.rn)],k.prototype,"legendEnabled",void 0),(0,i._)([(0,l.Cb)({type:Number})],k.prototype,"maxRecordCount",void 0),(0,i._)([(0,l.Cb)({type:String,json:{origins:{service:{name:"layerDefinition.objectIdField"}}}})],k.prototype,"objectIdField",void 0),(0,i._)([(0,l.Cb)({type:["OGCFeatureLayer"]})],k.prototype,"operationalLayerType",void 0),(0,i._)([(0,l.Cb)(j.C_)],k.prototype,"popupEnabled",void 0),(0,i._)([(0,l.Cb)({type:n.Z,json:{name:"popupInfo",write:!0}})],k.prototype,"popupTemplate",void 0),(0,i._)([(0,l.Cb)({types:o.A,json:{origins:{service:{name:"layerDefinition.drawingInfo.renderer",write:!1},"web-scene":{types:o.o,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:!0}})],k.prototype,"renderer",null),(0,i._)([(0,l.Cb)(j.YI)],k.prototype,"screenSizePerspectiveEnabled",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],k.prototype,"source",void 0),(0,i._)([(0,l.Cb)({readOnly:!0,type:m.Z,json:{origins:{service:{read:!0}}}})],k.prototype,"spatialReference",void 0),(0,i._)([(0,l.Cb)({type:String,json:{write:{enabled:!0,ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"collection.title"}}}})],k.prototype,"title",void 0),(0,i._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],k.prototype,"type",void 0),(0,i._)([(0,l.Cb)({type:String,readOnly:!0})],k.prototype,"typeIdField",void 0),(0,i._)([(0,l.Cb)({type:[R.Z]})],k.prototype,"types",void 0),(0,i._)([(0,l.Cb)(j.HQ)],k.prototype,"url",void 0),k=(0,i._)([(0,a.j)("esri.layers.OGCFeatureLayer")],k);const q=k},61159:(e,t,r)=>{r.d(t,{g:()=>i});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},92722:(e,t,r)=>{r.d(t,{O3:()=>S,lG:()=>_,my:()=>C,q9:()=>a});var i=r(20102),n=r(70272),o=r(5428),s=r(35671);const l={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function a(e){return l[e]}function*u(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(const t of e.features)t&&(yield t)}}function*p(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(const t of e.coordinates)yield*t;break;case"MultiPolygon":for(const t of e.coordinates)for(const e of t)yield*e}}function c(e){for(const t of e)if(t.length>2)return!0;return!1}function d(e){let t=0;for(let r=0;r<e.length;r++){const i=e[r],n=e[(r+1)%e.length];t+=i[0]*n[1]-n[0]*i[1]}return t<=0}function y(e){const t=e[0],r=e.at(-1);return t[0]===r[0]&&t[1]===r[1]&&t[2]===r[2]||e.push(t),e}function f(e,t,r){switch(t.type){case"LineString":case"MultiPoint":return function(e,t,r){return g(e,t.coordinates,r),e}(e,t,r);case"MultiLineString":return function(e,t,r){for(const i of t.coordinates)g(e,i,r);return e}(e,t,r);case"MultiPolygon":return function(e,t,r){for(const i of t.coordinates){m(e,i[0],r);for(let t=1;t<i.length;t++)h(e,i[t],r)}return e}(e,t,r);case"Point":return function(e,t,r){return b(e,t.coordinates,r),e}(e,t,r);case"Polygon":return function(e,t,r){const i=t.coordinates;m(e,i[0],r);for(let t=1;t<i.length;t++)h(e,i[t],r);return e}(e,t,r)}}function m(e,t,r){const i=y(t);!function(e){return!d(e)}(i)?g(e,i,r):w(e,i,r)}function h(e,t,r){const i=y(t);!function(e){return d(e)}(i)?g(e,i,r):w(e,i,r)}function g(e,t,r){for(const i of t)b(e,i,r);e.lengths.push(t.length)}function w(e,t,r){for(let i=t.length-1;i>=0;i--)b(e,t[i],r);e.lengths.push(t.length)}function b(e,t,r){const[i,n,o]=t;e.coords.push(i,n),r.hasZ&&e.coords.push(o||0)}function v(e){switch(typeof e){case"string":return"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function S(e){if(!e)throw new i.Z("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new i.Z("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});const{crs:t}=e;if(!t)return;const r="string"==typeof t?t:"name"===t.type?t.properties.name:"EPSG"===t.type?t.properties.code:null,n=new RegExp(".*(CRS84H?|4326)$","i");if(!r||!n.test(r))throw new i.Z("geojson-layer:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:t})}function C(e,t={}){const r=[],i=new Set,n=new Set;let o,l=!1,d=null,y=!1,{geometryType:f=null}=t,m=!1;for(const t of u(e)){const{geometry:e,properties:u,id:h}=t;if((!e||(f||(f=a(e.type)),a(e.type)===f))&&(l||(l=c(p(e))),y||(y=null!=h,y&&(o=typeof h,u&&(d=Object.keys(u).filter((e=>u[e]===h))))),u&&d&&y&&null!=h&&(d.length>1?d=d.filter((e=>u[e]===h)):1===d.length&&(d=u[d[0]]===h?d:[])),!m&&u)){let e=!0;for(const t in u){if(i.has(t))continue;const o=u[t];if(null==o){e=!1,n.add(t);continue}const l=v(o);if("unknown"===l){n.add(t);continue}n.delete(t),i.add(t);const a=(0,s.q6)(t);a&&r.push({name:a,alias:t,type:l})}m=e}}const h=(0,s.q6)(1===d?.length&&d[0]||null)??void 0;if(h)for(const e of r)if(e.name===h&&(0,s.H7)(e)){e.type="esriFieldTypeOID";break}return{fields:r,geometryType:f,hasZ:l,objectIdFieldName:h,objectIdFieldType:o,unknownFields:Array.from(n)}}function _(e,t){return Array.from(function*(e,t={}){const{geometryType:r,objectIdField:i}=t;for(const s of e){const{geometry:e,properties:l,id:u}=s;if(e&&a(e.type)!==r)continue;const p=l||{};let c;i&&(c=p[i],null==u||c||(p[i]=c=u));const d=new n.u_(e?f(new o.Z,e,t):null,p,null,c??void 0);yield d}}(u(e),t))}},25278:(e,t,r)=>{r.d(t,{Dm:()=>p,Hq:()=>c,MS:()=>d,bU:()=>l});var i=r(80442),n=r(22974),o=r(61159),s=r(58333);function l(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?s.I4:"esriGeometryPolyline"===e?s.ET:s.lF}}}const a=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function p(e,t){if((0,i.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${a.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new i}catch(r){return()=>({[t]:null,...e})}}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.d9)(e)}}]}function d(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:o.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1}}}},54295:(e,t,r)=>{r.d(t,{V:()=>s});var i=r(43697),n=r(5600),o=(r(75215),r(67676),r(80442),r(52011));const s=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,n.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,o.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17017:(e,t,r)=>{r.d(t,{N:()=>s});var i=r(43697),n=r(5600),o=(r(75215),r(67676),r(80442),r(52011));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,n.Cb)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,o.j)("esri.layers.mixins.CustomParametersMixin")],t),t}},69637:(e,t,r)=>{r.d(t,{b:()=>T});var i,n=r(43697),o=r(5600),s=(r(75215),r(67676),r(80442),r(52011)),l=r(20102),a=r(96674),u=r(78286),p=r(67760),c=r(66577),d=r(92835),y=r(35454),f=r(22974),m=r(14165);const h=new y.X({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),g=new y.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let w=i=class extends a.wq{constructor(e){super(e),this.where=null,this.geometry=null,this.spatialRelationship="intersects",this.distance=void 0,this.objectIds=null,this.units=null,this.timeExtent=null}createQuery(e={}){const{where:t,geometry:r,spatialRelationship:i,timeExtent:n,objectIds:o,units:s,distance:l}=this;return new m.Z({geometry:(0,f.d9)(r),objectIds:(0,f.d9)(o),spatialRelationship:i,timeExtent:(0,f.d9)(n),where:t,units:s,distance:l,...e})}clone(){const{where:e,geometry:t,spatialRelationship:r,timeExtent:n,objectIds:o,units:s,distance:l}=this;return new i({geometry:(0,f.d9)(t),objectIds:(0,f.d9)(o),spatialRelationship:r,timeExtent:(0,f.d9)(n),where:e,units:s,distance:l})}};(0,n._)([(0,o.Cb)({type:String,json:{write:!0}})],w.prototype,"where",void 0),(0,n._)([(0,o.Cb)({types:c.qM,json:{write:!0}})],w.prototype,"geometry",void 0),(0,n._)([(0,o.Cb)({type:h.apiValues,json:{name:"spatialRel",read:{reader:h.read},write:{allowNull:!1,writer:h.write,overridePolicy(){return{enabled:null!=this.geometry}}}}})],w.prototype,"spatialRelationship",void 0),(0,n._)([(0,o.Cb)({type:Number,json:{write:{overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],w.prototype,"distance",void 0),(0,n._)([(0,o.Cb)({type:[Number],json:{write:!0}})],w.prototype,"objectIds",void 0),(0,n._)([(0,o.Cb)({type:g.apiValues,json:{read:g.read,write:{writer:g.write,overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],w.prototype,"units",void 0),(0,n._)([(0,o.Cb)({type:d.Z,json:{write:!0}})],w.prototype,"timeExtent",void 0),w=i=(0,n._)([(0,s.j)("esri.layers.support.FeatureFilter")],w);const b=w;var v;const S={read:{reader:p.ij},write:{writer:p.cW,overridePolicy(){return{allowNull:null!=this.excludedEffect,isRequired:null==this.excludedEffect}}}},C={read:{reader:p.ij},write:{writer:p.cW,overridePolicy(){return{allowNull:null!=this.includedEffect,isRequired:null==this.includedEffect}}}},_={name:"showExcludedLabels",default:!0};let x=v=class extends a.wq{constructor(e){super(e),this.filter=null,this.includedEffect=null,this.excludedEffect=null,this.excludedLabelsVisible=!1}write(e,t){const r=super.write(e,t);if(t?.origin){if(r.filter){const e=Object.keys(r.filter);if(e.length>1||"where"!==e[0])return t.messages?.push(new l.Z("web-document-write:unsupported-feature-effect","Invalid feature effect 'filter'. A filter can only contain a 'where' property",{layer:t.layer,effect:this})),null}if("showExcludedLabels"in r)return t.messages?.push(new l.Z("web-document-write:unsupported-feature-effect","Invalid value for property 'excludedLabelsVisible' which should always be 'true'",{layer:t.layer,effect:this})),null}return r}clone(){return new v({filter:null!=this.filter?this.filter.clone():null,includedEffect:this.includedEffect,excludedEffect:this.excludedEffect,excludedLabelsVisible:this.excludedLabelsVisible})}};(0,n._)([(0,o.Cb)({type:b,json:{write:{allowNull:!0,writer(e,t,r,i){const n=e?.write({},i);n&&0!==Object.keys(n).length?(0,u.RB)(r,n,t):(0,u.RB)(r,null,t)}}}})],x.prototype,"filter",void 0),(0,n._)([(0,o.Cb)({json:{write:!0,origins:{"web-map":S,"portal-item":S}}})],x.prototype,"includedEffect",void 0),(0,n._)([(0,o.Cb)({json:{write:!0,origins:{"web-map":C,"portal-item":C}}})],x.prototype,"excludedEffect",void 0),(0,n._)([(0,o.Cb)({type:Boolean,json:{write:!0,name:"showExcludedLabels",origins:{"web-map":_,"portal-item":_}}})],x.prototype,"excludedLabelsVisible",void 0),x=v=(0,n._)([(0,s.j)("esri.layers.support.FeatureEffect")],x);const I=x,F={write:{allowNull:!0}},T=e=>{let t=class extends e{constructor(){super(...arguments),this.featureEffect=null}};return(0,n._)([(0,o.Cb)({type:I,json:{origins:{"web-map":F,"portal-item":F}}})],t.prototype,"featureEffect",void 0),t=(0,n._)([(0,s.j)("esri.layers.mixins.FeatureEffectLayer")],t),t}},68825:(e,t,r)=>{r.d(t,{c:()=>m});var i,n=r(43697),o=r(78286),s=r(5600),l=(r(75215),r(67676),r(80442),r(52011)),a=r(35454),u=r(96674);const p=new a.X({asc:"ascending",desc:"descending"});let c=i=class extends u.wq{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n._)([(0,s.Cb)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,n._)([(0,s.Cb)({type:String,json:{write:!0}})],c.prototype,"valueExpression",void 0),(0,n._)([(0,s.Cb)({type:p.apiValues,json:{read:p.read,write:p.write}})],c.prototype,"order",void 0),c=i=(0,n._)([(0,l.j)("esri.layers.support.OrderByInfo")],c);const d=c;function y(e,t,r){if(!e)return null;const i=e.find((e=>!!e.field));if(!i)return null;const n=new d;return n.read(i,r),[n]}function f(e,t,r,i){const n=e.find((e=>!!e.field));n&&(0,o.RB)(r,[n.toJSON()],t)}const m=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,n._)([(0,s.Cb)({type:[d],json:{origins:{"web-scene":{write:!1,read:!1}},read:{source:"layerDefinition.orderBy",reader:y},write:{target:"layerDefinition.orderBy",writer:f}}})],t.prototype,"orderBy",void 0),t=(0,n._)([(0,l.j)("esri.layers.mixins.OrderedLayer")],t),t}},16859:(e,t,r)=>{r.d(t,{I:()=>S});var i=r(43697),n=r(68773),o=r(40330),s=r(3172),l=r(66643),a=r(20102),u=r(92604),p=r(95330),c=r(17452),d=r(5600),y=(r(75215),r(67676),r(80442),r(71715)),f=r(52011),m=r(30556),h=r(84230),g=r(48522),w=r(15235),b=r(86082),v=r(14661);const S=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=null,this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new w.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:i}=await r.e(8062).then(r.bind(r,18062));return(0,p.k_)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,p.D_)(e)||u.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,p.r9)(e),!0))))}async setUserPrivileges(e,t){if(!n.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,p.r9)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,v.Ss)(r);let n,s;if(i)n=r.portal.url;else try{n=await(0,h.oP)(this.url,t)}catch(e){(0,p.r9)(e)}if(!n||!(0,c.Zo)(n,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;s=await(o.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.r9)(e)}if(!s)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(i?await r.reload():(r=new w.default({id:e,portal:{url:n}}),await r.load(t)),r.portal.user)return(0,v.Ss)(r)}catch(e){(0,p.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const r=C.credential===t?C.user:await this._fetchEditingUser(e);return C.credential=t,C.user=r,null==r||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=o.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=g.Z.getDefault();if(n&&n.loaded&&(0,c.Fv)(n.restUrl)===(0,c.Fv)(i))return n.user;const a=`${i}/community/self`,u=null!=e?e.signal:null,p=await(0,l.q6)((0,s.Z)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?b.Z.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,i=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||g.Z.getDefault());return r&&i&&!(0,c.tm)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,d.Cb)({type:w.default})],t.prototype,"portalItem",null),(0,i._)([(0,y.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,m.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,d.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,f.j)("esri.layers.mixins.PortalLayer")],t),t},C={credential:null,user:null}},28294:(e,t,r)=>{r.d(t,{n:()=>d});var i=r(43697),n=r(92835),o=r(84552),s=r(5600),l=(r(75215),r(67676),r(80442),r(71715)),a=r(52011),u=r(35671),p=r(76259),c=r(78981);const d=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const i=r.timeOffset,n=c.v.fromJSON(r.timeOffsetUnits);return i&&n?new o.Z({value:i,unit:n}):null}set timeInfo(e){(0,u.UF)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i._)([(0,s.Cb)({type:n.Z,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,i._)([(0,s.Cb)({type:o.Z})],t.prototype,"timeOffset",void 0),(0,i._)([(0,l.r)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,i._)([(0,s.Cb)({value:null,type:p.Z,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,i._)([(0,s.Cb)({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=(0,i._)([(0,a.j)("esri.layers.mixins.TemporalLayer")],t),t}},16467:(e,t,r)=>{r.d(t,{$9:()=>g,G4:()=>v,Lu:()=>h,WW:()=>I,d:()=>_,eS:()=>C,gp:()=>S,j:()=>b,w9:()=>w,yN:()=>x}),r(66577);var i=r(3172),n=r(20102),o=r(92604),s=r(8744),l=r(40488),a=r(98732),u=r(44876),p=r(92722),c=r(25278),d=r(99514),y=r(86719),f=r(82971);const m=o.Z.getLogger("esri.layers.graphics.sources.ogcfeature"),h="http://www.opengis.net/def/crs/",g=`${h}OGC/1.3/CRS84`;async function w(e,t,r={},o=5){const{links:s}=e,l=E(s,"items","application/geo+json")||E(s,"http://www.opengis.net/def/rel/ogc/1.0/items","application/geo+json");if(null==l)throw new n.Z("ogc-feature-layer:missing-items-page","Missing items url");const{data:a}=await(0,i.Z)(l.href,{signal:r.signal,query:{limit:o,...r.customParameters,token:r.apiKey},headers:{accept:"application/geo+json"}});await(0,p.O3)(a);const u=(0,p.my)(a,{geometryType:t.geometryType}),f=t.fields||u.fields||[],h=null!=t.hasZ?t.hasZ:u.hasZ,g=u.geometryType,w=t.objectIdField||u.objectIdFieldName||"OBJECTID";let b=t.timeInfo;const v=f.find((({name:e})=>e===w));if(v)v.editable=!1,v.nullable=!1;else{if(!u.objectIdFieldType)throw new n.Z("ogc-feature-layer:missing-feature-id","Collection geojson require a feature id as a unique identifier");f.unshift({name:w,alias:w,type:"number"===u.objectIdFieldType?"esriFieldTypeOID":"esriFieldTypeString",editable:!1,nullable:!1})}if(w!==u.objectIdFieldName){const e=f.find((({name:e})=>e===u.objectIdFieldName));e&&(e.type="esriFieldTypeInteger")}f===u.fields&&u.unknownFields.length>0&&m.warn({name:"ogc-feature-layer:unknown-field-types",message:"Some fields types couldn't be inferred from the features and were dropped",details:{unknownFields:u.unknownFields}});for(const e of f){if(null==e.name&&(e.name=e.alias),null==e.alias&&(e.alias=e.name),"esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type&&(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable),!e.name)throw new n.Z("ogc-feature-layer:invalid-field-name","field name is missing",{field:e});if(!y.v.jsonValues.includes(e.type))throw new n.Z("ogc-feature-layer:invalid-field-type",`invalid type for field "${e.name}"`,{field:e})}if(b){const e=new d.Z(f);if(b.startTimeField){const t=e.get(b.startTimeField);t?(b.startTimeField=t.name,t.type="esriFieldTypeDate"):b.startTimeField=null}if(b.endTimeField){const t=e.get(b.endTimeField);t?(b.endTimeField=t.name,t.type="esriFieldTypeDate"):b.endTimeField=null}if(b.trackIdField){const t=e.get(b.trackIdField);t?b.trackIdField=t.name:(b.trackIdField=null,m.warn({name:"ogc-feature-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:b}}))}b.startTimeField||b.endTimeField||(m.warn({name:"ogc-feature-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing",details:{timeInfo:b}}),b=null)}return{drawingInfo:g?(0,c.bU)(g):null,extent:R(e),geometryType:g,fields:f,hasZ:!!h,objectIdField:w,timeInfo:b}}async function b(e,t={}){const{links:r}=e,o=E(r,"data","application/json")||E(r,"http://www.opengis.net/def/rel/ogc/1.0/data","application/json");if(null==o)throw new n.Z("ogc-feature-layer:missing-collections-page","Missing collections url");const{apiKey:s,customParameters:l,signal:a}=t,{data:u}=await(0,i.Z)(o.href,{signal:a,headers:{accept:"application/json"},query:{...l,token:s}});return u}async function v(e,t={}){const{links:r}=e,o=E(r,"conformance","application/json")||E(r,"http://www.opengis.net/def/rel/ogc/1.0/conformance","application/json");if(null==o)throw new n.Z("ogc-feature-layer:missing-conformance-page","Missing conformance url");const{apiKey:s,customParameters:l,signal:a}=t,{data:u}=await(0,i.Z)(o.href,{signal:a,headers:{accept:"application/json"},query:{...l,token:s}});return u}async function S(e,t={}){const{apiKey:r,customParameters:n,signal:o}=t,{data:s}=await(0,i.Z)(e,{signal:o,headers:{accept:"application/json"},query:{...n,token:r}});return s}async function C(e,t={}){const r="application/vnd.oai.openapi+json;version=3.0",n=E(e.links,"service-desc",r);if(null==n)return m.warn("ogc-feature-layer:missing-openapi-page","The OGC API-Features server does not have an OpenAPI page."),null;const{apiKey:o,customParameters:s,signal:l}=t,{data:a}=await(0,i.Z)(n.href,{signal:l,headers:{accept:r},query:{...s,token:o}});return a}function _(e){const t=/^http:\/\/www\.opengis.net\/def\/crs\/(?<authority>.*)\/(?<version>.*)\/(?<code>.*)$/i.exec(e),r=t?.groups;if(!r)return null;const{authority:i,code:n}=r;switch(i.toLowerCase()){case"ogc":switch(n.toLowerCase()){case"crs27":return f.Z.GCS_NAD_1927.wkid;case"crs83":return 4269;case"crs84":case"crs84h":return f.Z.WGS84.wkid;default:return null}case"esri":case"epsg":{const e=Number.parseInt(n,10);return Number.isNaN(e)?null:e}default:return null}}async function x(e,t,r){const i=await I(e,t,r);return(0,a.cn)(i)}async function I(e,t,r){const{collection:o,layerDefinition:c,maxRecordCount:d,queryParameters:{apiKey:y,customParameters:m},spatialReference:h,supportedCrs:g}=e,{links:w}=o,b=E(w,"items","application/geo+json")||E(w,"http://www.opengis.net/def/rel/ogc/1.0/items","application/geo+json");if(null==b)throw new n.Z("ogc-feature-layer:missing-items-page","Missing items url");const{geometry:v,num:S,start:C,timeExtent:_,where:x}=t;if(t.objectIds)throw new n.Z("ogc-feature-layer:query-by-objectids-not-supported","Queries with objectids are not supported");const I=f.Z.fromJSON(h),T=t.outSpatialReference??I,R=T.isWGS84?null:F(T,g),P=j(v,g),Z=function(e){if(null==e)return null;const{start:t,end:r}=e;return`${null!=t?t.toISOString():".."}/${null!=r?r.toISOString():".."}`}(_),O=null!=(N=x)&&N&&"1=1"!==N?N:null,D=S??(null!=C&&void 0!==C?10:d),{data:M}=await(0,i.Z)(b.href,{...r,query:{...m,...P,crs:R,datetime:Z,query:O,limit:D,startindex:C,token:y},headers:{accept:"application/geo+json"}});var N;let G=!1;M.links&&(G=!!M.links.find((e=>"next"===e.rel))),!G&&Number.isInteger(M.numberMatched)&&Number.isInteger(M.numberReturned)&&(G=M.numberReturned<M.numberMatched);const{fields:U,geometryType:k,hasZ:q,objectIdField:A}=c,L=(0,p.lG)(M,{geometryType:k,hasZ:q,objectIdField:A});if(!R&&T.isWebMercator)for(const e of L)if(null!=e.geometry&&null!=k){const t=(0,a.di)(e.geometry,k,q,!1);t.spatialReference=f.Z.WGS84,e.geometry=(0,a.GH)((0,l.iV)(t,T))}for(const e of L)e.objectId=e.attributes[A];const $=R||!R&&T.isWebMercator?T.toJSON():s.Zn,B=new u.Z;return B.exceededTransferLimit=G,B.features=L,B.fields=U,B.geometryType=k,B.hasZ=q,B.objectIdFieldName=A,B.spatialReference=$,B}function F(e,t){const{isWebMercator:r,wkid:i}=e;if(!i)return null;const n=r?t[3857]??t[102100]??t[102113]??t[900913]:t[e.wkid];return n?`${h}${n}`:null}function T(e){if(null==e)return"";const{xmin:t,ymin:r,xmax:i,ymax:n}=e;return`${t},${r},${i},${n}`}function j(e,t){if(!function(e){return null!=e&&"extent"===e.type}(e))return null;const{spatialReference:r}=e;if(!r||r.isWGS84)return{bbox:T(e)};const i=F(r,t);return null!=i?{bbox:T(e),"bbox-crs":i}:r.isWebMercator?{bbox:T((0,l.iV)(e,f.Z.WGS84))}:null}function R(e){const t=e.extent?.spatial;if(!t)return null;const r=t.bbox[0],i=4===r.length,n=r[0],o=r[1],s=i?void 0:r[2];return{xmin:n,ymin:o,xmax:i?r[2]:r[3],ymax:i?r[3]:r[4],zmin:s,zmax:i?void 0:r[5],spatialReference:f.Z.WGS84.toJSON()}}function E(e,t,r){return e.find((e=>e.rel===t&&e.type===r))||e.find((e=>e.rel===t&&!e.type))}},70082:(e,t,r)=>{r.d(t,{Z:()=>c});var i=r(43697),n=r(2368),o=r(35454),s=r(96674),l=r(5600),a=(r(75215),r(67676),r(80442),r(52011));const u=new o.X({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let p=class extends((0,n.J)(s.wq)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"name",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"description",void 0),(0,i._)([(0,l.Cb)({json:{read:u.read,write:u.write}})],p.prototype,"drawingTool",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"prototype",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"thumbnail",void 0),p=(0,i._)([(0,a.j)("esri.layers.support.FeatureTemplate")],p);const c=p},16451:(e,t,r)=>{r.d(t,{Z:()=>y});var i=r(43697),n=r(2368),o=r(96674),s=r(5600),l=(r(75215),r(67676),r(80442),r(71715)),a=r(52011),u=r(30556),p=r(72729),c=r(70082);let d=class extends((0,n.J)(o.wq)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,p.im)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i._)([(0,s.Cb)({json:{write:!0}})],d.prototype,"id",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],d.prototype,"name",void 0),(0,i._)([(0,s.Cb)({json:{write:!0}})],d.prototype,"domains",void 0),(0,i._)([(0,l.r)("domains")],d.prototype,"readDomains",null),(0,i._)([(0,u.c)("domains")],d.prototype,"writeDomains",null),(0,i._)([(0,s.Cb)({type:[c.Z],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,i._)([(0,a.j)("esri.layers.support.FeatureType")],d);const y=d},76259:(e,t,r)=>{r.d(t,{Z:()=>m});var i=r(43697),n=r(92835),o=r(84552),s=r(2368),l=r(96674),a=r(5600),u=(r(75215),r(67676),r(80442),r(71715)),p=r(52011),c=r(30556),d=r(80216);function y(e,t){return o.Z.fromJSON({value:e,unit:t})}let f=class extends((0,s.J)(l.wq)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeReference=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const r=new Date(t.timeExtent[0]),i=new Date(t.timeExtent[1]);return new n.Z({start:r,end:i})}writeFullTimeExtent(e,t){e&&null!=e.start&&null!=e.end?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?y(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?y(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i._)([(0,a.Cb)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],f.prototype,"cumulative",void 0),(0,i._)([(0,a.Cb)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],f.prototype,"endField",void 0),(0,i._)([(0,a.Cb)({type:n.Z,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"fullTimeExtent",void 0),(0,i._)([(0,u.r)("fullTimeExtent",["timeExtent"])],f.prototype,"readFullTimeExtent",null),(0,i._)([(0,c.c)("fullTimeExtent")],f.prototype,"writeFullTimeExtent",null),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"hasLiveData",void 0),(0,i._)([(0,a.Cb)({type:o.Z,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"interval",void 0),(0,i._)([(0,u.r)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],f.prototype,"readInterval",null),(0,i._)([(0,c.c)("interval")],f.prototype,"writeInterval",null),(0,i._)([(0,a.Cb)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],f.prototype,"startField",void 0),(0,i._)([(0,a.Cb)({type:d.Z,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"timeReference",void 0),(0,i._)([(0,a.Cb)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"trackIdField",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],f.prototype,"useTime",void 0),f=(0,i._)([(0,p.j)("esri.layers.support.TimeInfo")],f);const m=f},30707:(e,t,r)=>{r.d(t,{a:()=>c,r:()=>u});var i=r(20102),n=r(22974),o=r(92604),s=r(54306);const l=o.Z.getLogger("esri.layers.support.labelingInfo"),a=/\[([^\[\]]+)\]/gi;function u(e,t,r){return e?e.map((e=>{const i=new s.Z;if(i.read(e,r),i.labelExpression){const e=t.fields||t.layerDefinition&&t.layerDefinition.fields||this.fields;i.labelExpression=i.labelExpression.replaceAll(a,((t,r)=>`[${function(e,t){if(!t)return e;const r=e.toLowerCase();for(let e=0;e<t.length;e++){const i=t[e].name;if(i.toLowerCase()===r)return i}return e}(r,e)}]`))}return i})):null}const p={esriGeometryPoint:["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along"],esriGeometryMultipoint:null};function c(e,t){const r=(0,n.d9)(e);return r.some((e=>function(e,t){const r=e.labelPlacement,n=p[t];if(!e.symbol)return l.warn("No ILabelClass symbol specified."),!0;if(!n)return l.error(new i.Z("labeling:unsupported-geometry-type",`Unable to create labels for layer, geometry type '${t}' is not supported`)),!0;if(!n.includes(r)){const i=n[0];r&&l.warn(`Found invalid label placement type ${r} for ${t}. Defaulting to ${i}`),e.labelPlacement=i}return!1}(e,t)))?[]:r}},78981:(e,t,r)=>{r.d(t,{v:()=>i});const i=(0,r(35454).w)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},74889:(e,t,r)=>{r.d(t,{Z:()=>b});var i,n=r(43697),o=r(66577),s=r(38171),l=r(35454),a=r(96674),u=r(22974),p=r(5600),c=(r(75215),r(71715)),d=r(52011),y=r(30556),f=r(82971),m=r(33955),h=r(1231);const g=new l.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=i=class extends a.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=f.Z.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const n=e[t],o=s.Z.fromJSON(n),l=n.geometry&&n.geometry.spatialReference;null==o.geometry||l||(o.geometry.spatialReference=r);const a=n.aggregateGeometries,u=o.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],i=a[e],n=i?.spatialReference;null==t||n||(t.spatialReference=r)}i.push(o)}return i}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:n}=this;if(n)for(const e of n)if(e&&null!=e.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,m.im)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=f.Z.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,u.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e&&e[r];i.geometry=t&&t.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,o=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((n-e)/r)));for(let e=0,t=o.length;e<t;e++)s?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,n],scale:[o,s]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*o+i),(e=>n-e*s),l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,n;const o=[];for(let s=0,l=e.length;s<l;s++){const l=e[s];if(s>0){const e=t(l[0]),s=r(l[1]);e===i&&s===n||(o.push([e-i,s-n]),i=e,n=s)}else i=t(l[0]),n=r(l[1]),o.push([i,n])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,m.oU)(e)?e.rings:e.paths,n=[];for(let e=0,o=i.length;e<o;e++){const o=i[e],s=this._quantizePoints(o,t,r);s&&n.push(s)}return n.length>0?((0,m.oU)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,m.oU)(e)?e.rings:e.paths;let s,l;for(let e=0,i=o.length;e<i;e++){const i=o[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(s+=n[0],l+=n[1]):(s=n[0],l=n[1]),n[0]=t(s),n[1]=r(l)}}if(i&&n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let s,l;for(let e=0,i=o.length;e<i;e++){const i=o[e];e>0?(s+=i[0],l+=i[1]):(s=i[0],l=i[1]),i[0]=t(s),i[1]=r(l)}if(i&&n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2])}}:null}};(0,n._)([(0,p.Cb)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,n._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,n._)([(0,p.Cb)({type:[s.Z],json:{write:!0}})],w.prototype,"features",void 0),(0,n._)([(0,c.r)("features")],w.prototype,"readFeatures",null),(0,n._)([(0,p.Cb)({type:[h.Z],json:{write:!0}})],w.prototype,"fields",void 0),(0,n._)([(0,p.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],w.prototype,"geometryType",void 0),(0,n._)([(0,y.c)("geometryType")],w.prototype,"writeGeometryType",null),(0,n._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,n._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,n._)([(0,p.Cb)({types:o.qM,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,n._)([(0,c.r)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,n._)([(0,p.Cb)({type:f.Z,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,n._)([(0,y.c)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,n._)([(0,p.Cb)({json:{write:!0}})],w.prototype,"transform",void 0),w=i=(0,n._)([(0,d.j)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0;const b=w},58333:(e,t,r)=>{r.d(t,{ET:()=>o,I4:()=>n,eG:()=>a,lF:()=>s,lj:()=>p,qP:()=>l,wW:()=>u});const i=[252,146,31,255],n={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},s={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},a={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},p={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);