@arcgis/core 4.26.0-next.20230111 → 4.26.0-next.20230113

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 (296) hide show
  1. package/arcade/ArcadeDate.js +5 -0
  2. package/arcade/Dictionary.js +1 -1
  3. package/arcade/Feature.js +1 -1
  4. package/arcade/arcadeAsyncRuntime.js +1 -1
  5. package/arcade/arcadeCompiler.js +1 -1
  6. package/arcade/arcadeRuntime.js +1 -1
  7. package/arcade/arcadeTimeUtils.js +5 -0
  8. package/arcade/executionError.js +1 -1
  9. package/arcade/featureset/actions/Adapted.js +1 -1
  10. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  11. package/arcade/featureset/sources/FeatureLayerMemory.js +1 -1
  12. package/arcade/featureset/sources/FeatureLayerRelated.js +1 -1
  13. package/arcade/featureset/support/FeatureSet.js +1 -1
  14. package/arcade/featureset/support/shared.js +1 -1
  15. package/arcade/featureset/support/sqlUtils.js +1 -1
  16. package/arcade/functions/date.js +1 -1
  17. package/arcade/functions/featuresetbase.js +1 -1
  18. package/arcade/functions/featuresetstring.js +1 -1
  19. package/arcade/functions/geomasync.js +1 -1
  20. package/arcade/functions/geometry.js +1 -1
  21. package/arcade/functions/geomsync.js +1 -1
  22. package/arcade/functions/maths.js +1 -1
  23. package/arcade/functions/string.js +1 -1
  24. package/arcade/languageUtils.js +1 -1
  25. package/arcade/treeAnalysis.js +1 -1
  26. package/arcade.js +1 -1
  27. package/assets/esri/core/workers/RemoteClient.js +1 -1
  28. package/assets/esri/core/workers/chunks/{c9477250a5d5ebdef00c.js → 01cd5a9cd4cb1f13691c.js} +1 -1
  29. package/assets/esri/core/workers/chunks/028f9a133104e78e60d2.js +1 -0
  30. package/assets/esri/core/workers/chunks/033e6ae5da6afebd993c.js +1 -0
  31. package/assets/esri/core/workers/chunks/05ab092987251d4a1242.js +1 -0
  32. package/assets/esri/core/workers/chunks/1186a56dacaf269d5271.js +1 -0
  33. package/assets/esri/core/workers/chunks/264e1c00936bcafb9a36.js +1 -0
  34. package/assets/esri/core/workers/chunks/2680392cef77d98ad097.js +1 -0
  35. package/assets/esri/core/workers/chunks/27ba1889fe9f1812389a.js +1165 -0
  36. package/assets/esri/core/workers/chunks/2dfb17fa5b6a5d239942.js +1 -0
  37. package/assets/esri/core/workers/chunks/2e3962506c353b562a88.js +1 -0
  38. package/assets/esri/core/workers/chunks/30ae4c22f6b8aab9f841.js +1 -0
  39. package/assets/esri/core/workers/chunks/329e512f210cb3e904f1.js +1 -0
  40. package/assets/esri/core/workers/chunks/3878efe67f43962b46f8.js +1 -0
  41. package/assets/esri/core/workers/chunks/3b6748f414437cc6cfde.js +1 -0
  42. package/assets/esri/core/workers/chunks/41d25407888326c91566.js +1 -0
  43. package/assets/esri/core/workers/chunks/493e2b00133682748e62.js +1 -0
  44. package/assets/esri/core/workers/chunks/4b2edcb8ef7fae4f7d28.js +1 -0
  45. package/assets/esri/core/workers/chunks/{c11d857dca43de2229fc.js → 4c085cee22ff64ce6d1f.js} +1 -1
  46. package/assets/esri/core/workers/chunks/4d8c53e961275b6a4ee1.js +1 -0
  47. package/assets/esri/core/workers/chunks/5049771eeffe208a9cb8.js +1 -0
  48. package/assets/esri/core/workers/chunks/{58d219ffd9dcc45bb0d1.js → 5191f80f2413ee92c875.js} +1 -1
  49. package/assets/esri/core/workers/chunks/5dfed65b615b33588488.js +1 -0
  50. package/assets/esri/core/workers/chunks/5e9869849d999aac5756.js +1 -0
  51. package/assets/esri/core/workers/chunks/6216cd8134703fd9d9b4.js +1 -0
  52. package/assets/esri/core/workers/chunks/62c8e43741f2d6141f00.js +1 -0
  53. package/assets/esri/core/workers/chunks/64f137358100a1c818f0.js +1 -0
  54. package/assets/esri/core/workers/chunks/6f5f81855985db7c1936.js +1 -0
  55. package/assets/esri/core/workers/chunks/6fba07833345b2d8d373.js +1 -0
  56. package/assets/esri/core/workers/chunks/{80c7726743baf9f54079.js → 7747ee359d357f6e5858.js} +1 -1
  57. package/assets/esri/core/workers/chunks/78fd609f334a29ef39dc.js +1 -0
  58. package/assets/esri/core/workers/chunks/798cd875d64182741364.js +1 -0
  59. package/assets/esri/core/workers/chunks/{9d247a46e0cfdad26273.js → 8176286f8dd055c8ae05.js} +1 -1
  60. package/assets/esri/core/workers/chunks/8530ac02c840c89cc1df.js +1 -0
  61. package/assets/esri/core/workers/chunks/8a69a9b5a04e7321740d.js +1 -0
  62. package/assets/esri/core/workers/chunks/8bd26c71e78698c16778.js +1 -0
  63. package/assets/esri/core/workers/chunks/8c12b82612f050492fef.js +1 -0
  64. package/assets/esri/core/workers/chunks/90653ef5e718bafd6960.js +1 -0
  65. package/assets/esri/core/workers/chunks/{418922fd99e733df023f.js → 9070aa0a94a9204ded1c.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{2ac0d2164a1b49e6f057.js → 94633a9bb5fa4f4ba4de.js} +1 -1
  67. package/assets/esri/core/workers/chunks/969bb94d5bdc9da114e2.js +1 -0
  68. package/assets/esri/core/workers/chunks/9785dba81a6af339e35a.js +1 -0
  69. package/assets/esri/core/workers/chunks/99e16173584702577b80.js +1 -0
  70. package/assets/esri/core/workers/chunks/9aee6f171d4fbac941d9.js +1 -0
  71. package/assets/esri/core/workers/chunks/a194f90ffe13b3d448b0.js +1 -0
  72. package/assets/esri/core/workers/chunks/a53d194e3eede703a6df.js +1 -0
  73. package/assets/esri/core/workers/chunks/a605bf8bc29099ae1b1a.js +1 -0
  74. package/assets/esri/core/workers/chunks/ba7239089a04098e3619.js +1 -0
  75. package/assets/esri/core/workers/chunks/bd2fe663a2b090b134e9.js +1 -0
  76. package/assets/esri/core/workers/chunks/c16003307aad2f84ac51.js +1 -0
  77. package/assets/esri/core/workers/chunks/c6eb6a97ecc6ed9ce713.js +1 -0
  78. package/assets/esri/core/workers/chunks/c81d898f4aef6ecacdb5.js +1 -0
  79. package/assets/esri/core/workers/chunks/cb83480d7074f6185e21.js +1 -0
  80. package/assets/esri/core/workers/chunks/cd0fa942d57a278b0a44.js +1 -0
  81. package/assets/esri/core/workers/chunks/d55332e4d7b8184fd718.js +1 -0
  82. package/assets/esri/core/workers/chunks/d6842acbfa7a39f3ca30.js +1 -0
  83. package/assets/esri/core/workers/chunks/d798bd544433e932f772.js +1 -0
  84. package/assets/esri/core/workers/chunks/e18851e915cb69f53032.js +1 -0
  85. package/assets/esri/core/workers/chunks/{54899827baea77776fc7.js → ea1054116ec842a4f813.js} +1 -1
  86. package/assets/esri/core/workers/chunks/ed1312c2627c0d7e654d.js +1 -0
  87. package/assets/esri/core/workers/chunks/f2750a7b44e8bc8b1e4c.js +1 -0
  88. package/assets/esri/themes/base/widgets/_Editor.scss +1 -11
  89. package/assets/esri/themes/base/widgets/_ItemList.scss +0 -13
  90. package/assets/esri/themes/dark/main.css +1 -1
  91. package/assets/esri/themes/light/main.css +1 -1
  92. package/assets/esri/themes/light/view.css +1 -1
  93. package/assets/esri/widgets/Sketch/t9n/Sketch_ar.json +1 -1
  94. package/assets/esri/widgets/Sketch/t9n/Sketch_bg.json +1 -1
  95. package/assets/esri/widgets/Sketch/t9n/Sketch_bs.json +1 -1
  96. package/assets/esri/widgets/Sketch/t9n/Sketch_ca.json +1 -1
  97. package/assets/esri/widgets/Sketch/t9n/Sketch_cs.json +1 -1
  98. package/assets/esri/widgets/Sketch/t9n/Sketch_da.json +1 -1
  99. package/assets/esri/widgets/Sketch/t9n/Sketch_de.json +1 -1
  100. package/assets/esri/widgets/Sketch/t9n/Sketch_el.json +1 -1
  101. package/assets/esri/widgets/Sketch/t9n/Sketch_es.json +1 -1
  102. package/assets/esri/widgets/Sketch/t9n/Sketch_et.json +1 -1
  103. package/assets/esri/widgets/Sketch/t9n/Sketch_fi.json +1 -1
  104. package/assets/esri/widgets/Sketch/t9n/Sketch_fr.json +1 -1
  105. package/assets/esri/widgets/Sketch/t9n/Sketch_he.json +1 -1
  106. package/assets/esri/widgets/Sketch/t9n/Sketch_hr.json +1 -1
  107. package/assets/esri/widgets/Sketch/t9n/Sketch_hu.json +1 -1
  108. package/assets/esri/widgets/Sketch/t9n/Sketch_id.json +1 -1
  109. package/assets/esri/widgets/Sketch/t9n/Sketch_it.json +1 -1
  110. package/assets/esri/widgets/Sketch/t9n/Sketch_ja.json +1 -1
  111. package/assets/esri/widgets/Sketch/t9n/Sketch_ko.json +1 -1
  112. package/assets/esri/widgets/Sketch/t9n/Sketch_lt.json +1 -1
  113. package/assets/esri/widgets/Sketch/t9n/Sketch_lv.json +1 -1
  114. package/assets/esri/widgets/Sketch/t9n/Sketch_nb.json +1 -1
  115. package/assets/esri/widgets/Sketch/t9n/Sketch_nl.json +1 -1
  116. package/assets/esri/widgets/Sketch/t9n/Sketch_pl.json +1 -1
  117. package/assets/esri/widgets/Sketch/t9n/Sketch_pt-BR.json +1 -1
  118. package/assets/esri/widgets/Sketch/t9n/Sketch_pt-PT.json +1 -1
  119. package/assets/esri/widgets/Sketch/t9n/Sketch_ro.json +1 -1
  120. package/assets/esri/widgets/Sketch/t9n/Sketch_ru.json +1 -1
  121. package/assets/esri/widgets/Sketch/t9n/Sketch_sk.json +1 -1
  122. package/assets/esri/widgets/Sketch/t9n/Sketch_sl.json +1 -1
  123. package/assets/esri/widgets/Sketch/t9n/Sketch_sr.json +1 -1
  124. package/assets/esri/widgets/Sketch/t9n/Sketch_sv.json +1 -1
  125. package/assets/esri/widgets/Sketch/t9n/Sketch_th.json +1 -1
  126. package/assets/esri/widgets/Sketch/t9n/Sketch_tr.json +1 -1
  127. package/assets/esri/widgets/Sketch/t9n/Sketch_uk.json +1 -1
  128. package/assets/esri/widgets/Sketch/t9n/Sketch_vi.json +1 -1
  129. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-CN.json +1 -1
  130. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-HK.json +1 -1
  131. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-TW.json +1 -1
  132. package/chunks/ComponentShader.glsl.js +1 -1
  133. package/chunks/Path.glsl.js +1 -1
  134. package/chunks/Terrain.glsl.js +1 -1
  135. package/chunks/languageUtils.js +1 -1
  136. package/geometry/support/MeshTexture.js +1 -1
  137. package/geometry/support/aaBoundingBox.js +1 -1
  138. package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
  139. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  140. package/interfaces.d.ts +1400 -1314
  141. package/layers/ImageryTileLayer.js +1 -1
  142. package/layers/VoxelWasmPerSceneView.js +1 -1
  143. package/layers/graphics/data/FeatureStore.js +1 -1
  144. package/layers/graphics/data/QueryEngine.js +1 -1
  145. package/layers/graphics/data/timeSupport.js +1 -1
  146. package/layers/graphics/featureConversionUtils.js +1 -1
  147. package/layers/graphics/sources/WFSSourceWorker.js +1 -1
  148. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  149. package/layers/graphics/sources/support/CSVSourceWorker.js +1 -1
  150. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  151. package/layers/mixins/ArcGISImageService.js +1 -1
  152. package/layers/mixins/ImageryTileMixin.js +1 -1
  153. package/layers/support/layerOriginUtils.js +1 -1
  154. package/layers/support/rasterFormats/JpgPlus.js +1 -1
  155. package/layers/support/rasterFormats/TiffDecoder.js +1 -1
  156. package/layers/support/rasterFunctions/ConvolutionFunction.js +1 -1
  157. package/layers/support/rasterFunctions/ConvolutionFunctionArguments.js +1 -1
  158. package/layers/support/rasterFunctions/ExtractBandFunction.js +1 -1
  159. package/layers/support/rasterFunctions/ExtractBandFunctionArguments.js +1 -1
  160. package/layers/support/rasterFunctions/NDVIFunction.js +1 -1
  161. package/layers/support/rasterFunctions/NDVIFunctionArguments.js +1 -1
  162. package/layers/support/rasterFunctions/SlopeFunctionArguments.js +1 -1
  163. package/layers/support/rasterFunctions/StatisticsHistogramFunction.js +5 -0
  164. package/layers/support/rasterFunctions/{StatisticsHistogramsFunctionArguments.js → StatisticsHistogramFunctionArguments.js} +1 -1
  165. package/layers/support/rasterFunctions/rasterFunctionHelper.js +1 -1
  166. package/package.json +1 -1
  167. package/rest/imageService.js +1 -1
  168. package/rest/support/BaseImageMeasureResult.d.ts +4 -0
  169. package/rest/support/ImageAreaParameters.d.ts +4 -0
  170. package/rest/support/{ImageMeasureAreaAndPerimeterParameters.js → ImageAreaParameters.js} +1 -1
  171. package/rest/support/ImageAreaResult.d.ts +4 -0
  172. package/rest/support/{ImageMeasureAreaAndPerimeterResult.js → ImageAreaResult.js} +1 -1
  173. package/rest/support/ImageDistanceParameters.d.ts +4 -0
  174. package/rest/support/{ImageMeasureDistanceAndAngleParameters.js → ImageDistanceParameters.js} +1 -1
  175. package/rest/support/ImageDistanceResult.d.ts +4 -0
  176. package/rest/support/ImageDistanceResult.js +5 -0
  177. package/rest/support/ImageHeightParameters.d.ts +4 -0
  178. package/rest/support/{ImageMeasureHeightParameters.js → ImageHeightParameters.js} +1 -1
  179. package/rest/support/ImageHeightResult.d.ts +4 -0
  180. package/rest/support/{ImageMeasureHeightResult.js → ImageHeightResult.js} +1 -1
  181. package/rest/support/ImagePointParameters.d.ts +4 -0
  182. package/rest/support/{ImageMeasurePointParameters.js → ImagePointParameters.js} +1 -1
  183. package/rest/support/ImagePointResult.d.ts +4 -0
  184. package/rest/support/{ImageMeasurePointResult.js → ImagePointResult.js} +1 -1
  185. package/support/arcadeUtils.js +1 -1
  186. package/support/revision.js +1 -1
  187. package/time/timeReferenceUtils.js +1 -1
  188. package/views/2d/engine/webgl/Overlay.js +1 -1
  189. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  190. package/views/2d/layers/features/FeatureStore2D.js +1 -1
  191. package/views/2d/layers/features/Pipeline.js +1 -1
  192. package/views/2d/layers/features/support/BinStore.js +1 -1
  193. package/views/2d/layers/features/support/ClusterStore.js +1 -1
  194. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  195. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  196. package/views/3d/glTF/internal/Resource.js +1 -1
  197. package/views/3d/glTF/internal/resourceUtils.js +5 -0
  198. package/views/3d/layers/VectorTileLayerView3D.js +1 -1
  199. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  200. package/views/3d/layers/graphics/Graphics3DFeatureStore.js +1 -1
  201. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  202. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  203. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  204. package/views/3d/layers/graphics/Labeler.js +1 -1
  205. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  206. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  207. package/views/3d/layers/i3s/I3SQueryFeatureStore.js +1 -1
  208. package/views/3d/state/ViewState.js +1 -1
  209. package/views/3d/state/ViewStateManager.js +1 -1
  210. package/views/3d/terrain/Overlay.js +1 -1
  211. package/views/3d/terrain/OverlayManager.js +1 -1
  212. package/views/3d/terrain/TerrainRenderer.js +1 -1
  213. package/views/3d/terrain/TerrainSurface.js +1 -1
  214. package/views/3d/terrain/TileRenderer.js +1 -1
  215. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  216. package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js +1 -1
  217. package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +1 -1
  218. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +1 -1
  219. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js +1 -1
  220. package/views/3d/webgl-engine/lib/AnimationTimeStep.js +5 -0
  221. package/views/3d/webgl-engine/lib/AnimationTimer.js +1 -1
  222. package/views/3d/webgl-engine/lib/GLMaterial.js +1 -1
  223. package/views/3d/webgl-engine/lib/Material.js +1 -1
  224. package/views/3d/webgl-engine/lib/RenderFeature.js +5 -0
  225. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  226. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  227. package/views/3d/webgl-engine/lib/basicInterfaces.js +1 -1
  228. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  229. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  230. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  231. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  232. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  233. package/views/draw/support/layerUtils.js +1 -1
  234. package/views/webgl/RenderingContext.js +1 -1
  235. package/views/webgl/Texture.js +1 -1
  236. package/widgets/Editor/EditorViewModel.js +1 -1
  237. package/widgets/Editor.js +1 -1
  238. package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
  239. package/widgets/FeatureTemplates/ItemList.js +1 -1
  240. package/widgets/FeatureTemplates/TemplateItem.js +1 -1
  241. package/widgets/FeatureTemplates/TemplateItemGroup.js +1 -1
  242. package/widgets/FeatureTemplates.js +1 -1
  243. package/widgets/LineOfSight/LineOfSightViewModel.js +1 -1
  244. package/widgets/support/decorators/accessibleHandler.js +1 -1
  245. package/assets/esri/core/workers/chunks/038dc3f9ef06ef3c960c.js +0 -1
  246. package/assets/esri/core/workers/chunks/078a0b134210167b629d.js +0 -1
  247. package/assets/esri/core/workers/chunks/080a4be417be4943f6a0.js +0 -1
  248. package/assets/esri/core/workers/chunks/0877bab7c03a1de2e713.js +0 -1
  249. package/assets/esri/core/workers/chunks/0c9200ab19fd2f56f87f.js +0 -1
  250. package/assets/esri/core/workers/chunks/1cbffa96ea6683e5f3ec.js +0 -1
  251. package/assets/esri/core/workers/chunks/1f742c3b11c76814fa4d.js +0 -1
  252. package/assets/esri/core/workers/chunks/2eb2d49c549e53934b8b.js +0 -1
  253. package/assets/esri/core/workers/chunks/332494b96a47b378f4e0.js +0 -1
  254. package/assets/esri/core/workers/chunks/3326536d183a858a2a4d.js +0 -1
  255. package/assets/esri/core/workers/chunks/3f4fc8379fc11bc293cc.js +0 -1
  256. package/assets/esri/core/workers/chunks/43fecd621cd043f64828.js +0 -1165
  257. package/assets/esri/core/workers/chunks/47b0b660f5412097fe26.js +0 -1
  258. package/assets/esri/core/workers/chunks/4c0d7a074083aa9614bb.js +0 -1
  259. package/assets/esri/core/workers/chunks/594d7e871b648d5c9662.js +0 -1
  260. package/assets/esri/core/workers/chunks/680b90ac98e8d1ac0e33.js +0 -1
  261. package/assets/esri/core/workers/chunks/6b589f47cb4731df1639.js +0 -1
  262. package/assets/esri/core/workers/chunks/72557c4b1582aa18ad4d.js +0 -1
  263. package/assets/esri/core/workers/chunks/72b490ad371e0c2264f6.js +0 -1
  264. package/assets/esri/core/workers/chunks/75ce17cf13aab0440572.js +0 -1
  265. package/assets/esri/core/workers/chunks/75f4e884a1a0aedc0afd.js +0 -1
  266. package/assets/esri/core/workers/chunks/7b9ab3fb378172831c14.js +0 -1
  267. package/assets/esri/core/workers/chunks/7bef95b168303bdc4bf1.js +0 -1
  268. package/assets/esri/core/workers/chunks/803492088780e18de801.js +0 -1
  269. package/assets/esri/core/workers/chunks/89003e387684af5ebeac.js +0 -1
  270. package/assets/esri/core/workers/chunks/8f93026764a0cce0901b.js +0 -1
  271. package/assets/esri/core/workers/chunks/98350b6b95da62ef5f12.js +0 -1
  272. package/assets/esri/core/workers/chunks/a9cae0d386aa9c00f744.js +0 -1
  273. package/assets/esri/core/workers/chunks/ad65c24558098f21bbf3.js +0 -1
  274. package/assets/esri/core/workers/chunks/aef90ee3f0979a7acb38.js +0 -1
  275. package/assets/esri/core/workers/chunks/b68c7754b0220b194ecf.js +0 -1
  276. package/assets/esri/core/workers/chunks/c012317f045a74fdd79d.js +0 -1
  277. package/assets/esri/core/workers/chunks/cb42675e5b1c41634c63.js +0 -1
  278. package/assets/esri/core/workers/chunks/cb901033dd15b3b72025.js +0 -1
  279. package/assets/esri/core/workers/chunks/d398b6b8a6b0a95247de.js +0 -1
  280. package/assets/esri/core/workers/chunks/d447ebc944a9867f5a99.js +0 -1
  281. package/assets/esri/core/workers/chunks/daaabed988b6ea866350.js +0 -1
  282. package/assets/esri/core/workers/chunks/e048641971aef9dd4da9.js +0 -1
  283. package/assets/esri/core/workers/chunks/e3fd383aee378cbb0dae.js +0 -1
  284. package/assets/esri/core/workers/chunks/e967ffca641947212992.js +0 -1
  285. package/assets/esri/core/workers/chunks/e9c81eee503c1b112bad.js +0 -1
  286. package/assets/esri/core/workers/chunks/ea6cf948fe2de0242308.js +0 -1
  287. package/assets/esri/core/workers/chunks/ed5e71b45dfefcbb2da4.js +0 -1
  288. package/assets/esri/core/workers/chunks/ee50d5d0afe9bdccc84d.js +0 -1
  289. package/assets/esri/core/workers/chunks/ee91401507833875facc.js +0 -1
  290. package/assets/esri/core/workers/chunks/f7d40dd78ef116f5793b.js +0 -1
  291. package/assets/esri/core/workers/chunks/f8ab6e354834b9c0e857.js +0 -1
  292. package/assets/esri/core/workers/chunks/faea681c279486b7a5e7.js +0 -1
  293. package/layers/support/rasterFunctions/StatisticsHistogramsFunction.js +0 -5
  294. package/rest/support/ImageMeasureDistanceAndAngleResult.js +0 -5
  295. package/views/3d/support/animationUtils.js +0 -5
  296. package/views/3d/webgl-engine/lib/RenderStateFeature.js +0 -5
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2592],{13867:(e,t,i)=>{i.d(t,{Z:()=>s});var r=i(69801);class s{constructor(e,t){this._storage=new r.WJ,this._storage.maxSize=e,t&&this._storage.registerRemoveFunc("",t)}put(e,t,i){this._storage.put(e,t,i,1)}pop(e){return this._storage.pop(e)}get(e){return this._storage.get(e)}clear(){this._storage.clearAll()}destroy(){this._storage.destroy()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}}},51806:(e,t,i)=>{i.d(t,{aX:()=>C});var r=i(68773),s=i(20102),n=i(92604),a=i(70586),o=i(38913),l=i(58901),c=i(82971),u=i(33955);const f={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new l.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:c.Z.WebMercator}),minus180Line:new l.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:c.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new l.Z({paths:[[[180,-180],[180,180]]],spatialReference:c.Z.WGS84}),minus180Line:new l.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:c.Z.WGS84})}};function h(e,t){return Math.ceil((e-t)/(2*t))}function d(e,t){const i=p(e);for(const e of i)for(const i of e)i[0]+=t;return e}function p(e){return(0,u.oU)(e)?e.rings:e.paths}var m=i(8744),y=i(40488),g=(i(66577),i(3172)),x=i(11282),I=i(17452);const b=n.Z.getLogger("esri.geometry.support.normalizeUtils");function w(e){return"polygon"===e[0].type}function _(e){return"polyline"===e[0].type}function S(e,t,i){if(t){const t=function(e,t){if(!(e instanceof l.Z||e instanceof o.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw b.error(e),new s.Z(e)}const i=p(e),r=[];for(const e of i){const i=[];r.push(i),i.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const s=e[r][0],n=e[r][1],a=e[r+1][0],o=e[r+1][1],l=Math.sqrt((a-s)*(a-s)+(o-n)*(o-n)),c=(o-n)/l,u=(a-s)/l,f=l/t;if(f>1){for(let e=1;e<=f-1;e++){const r=e*t,a=u*r+s,o=c*r+n;i.push([a,o])}const e=(l+Math.floor(f-1)*t)/2,r=u*e+s,a=c*e+n;i.push([r,a])}i.push([a,o])}}return function(e){return"polygon"===e.type}(e)?new o.Z({rings:r,spatialReference:e.spatialReference}):new l.Z({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,y.Sx)(t,!0)}return i&&(e=d(e,i)),e}function v(e,t,i){if(Array.isArray(e)){const r=e[0];if(r>t){const i=h(r,t);e[0]=r+i*(-2*t)}else if(r<i){const t=h(r,i);e[0]=r+t*(-2*i)}}else{const r=e.x;if(r>t){const i=h(r,t);e=e.clone().offset(i*(-2*t),0)}else if(r<i){const t=h(r,i);e=e.clone().offset(t*(-2*i),0)}}return e}function R(e,t){let i=-1;for(let r=0;r<t.cutIndexes.length;r++){const s=t.cutIndexes[r],n=t.geometries[r],a=p(n);for(let e=0;e<a.length;e++){const t=a[e];t.some((i=>{if(i[0]<180)return!0;{let i=0;for(let e=0;e<t.length;e++){const r=t[e][0];i=r>i?r:i}i=Number(i.toFixed(9));const r=-360*h(i,180);for(let i=0;i<t.length;i++){const t=n.getPoint(e,i);n.setPoint(e,i,t.clone().offset(r,0))}return!0}}))}if(s===i){if(w(e))for(const t of p(n))e[s]=e[s].addRing(t);else if(_(e))for(const t of p(n))e[s]=e[s].addPath(t)}else i=s,e[s]=n}return e}async function C(e,t,i){if(!Array.isArray(e))return C([e],t);t&&"string"!=typeof t&&b.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const s="string"==typeof t?t:t?.url??r.Z.geometryServiceUrl;let n,c,p,w,_,T,k,F,P=0;const M=[],O=[];for(const t of e)if((0,a.Wi)(t))O.push(t);else if(n||(n=t.spatialReference,c=(0,m.C5)(n),p=n.isWebMercator,T=p?102100:4326,w=f[T].maxX,_=f[T].minX,k=f[T].plus180Line,F=f[T].minus180Line),c)if("mesh"===t.type)O.push(t);else if("point"===t.type)O.push(v(t.clone(),w,_));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>v(e,w,_))),O.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,c);O.push(e.rings?new o.Z(e):e)}else if(t.extent){const e=t.extent,i=h(e.xmin,_)*(2*w);let r=0===i?t.clone():d(t.clone(),i);e.offset(i,0),e.intersects(k)&&e.xmax!==w?(P=e.xmax>P?e.xmax:P,r=S(r,p),M.push(r),O.push("cut")):e.intersects(F)&&e.xmin!==_?(P=e.xmax*(2*w)>P?e.xmax*(2*w):P,r=S(r,p,360),M.push(r),O.push("cut")):O.push(r)}else O.push(t.clone());else O.push(t);let B=h(P,w),D=-90;const z=B,J=new l.Z;for(;B>0;){const e=360*B-180;J.addPath([[e,D],[e,-1*D]]),D*=-1,B--}if(M.length>0&&z>0){const t=R(M,await async function(e,t,i,r){const s=(0,x.en)(e),n=t[0].spatialReference,a={...r,query:{...s.query,f:"json",sr:JSON.stringify(n),target:JSON.stringify({geometryType:(0,u.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(i)}},o=await(0,g.default)(s.path+"/cut",a),{cutIndexes:l,geometries:c=[]}=o.data;return{cutIndexes:l,geometries:c.map((e=>{const t=(0,u.im)(e);return t.spatialReference=n,t}))}}(s,M,J,i)),r=[],n=[];for(let i=0;i<O.length;i++){const s=O[i];if("cut"!==s)n.push(s);else{const s=t.shift(),o=e[i];(0,a.pC)(o)&&"polygon"===o.type&&o.rings&&o.rings.length>1&&s.rings.length>=o.rings.length?(r.push(s),n.push("simplify")):n.push(p?(0,y.$)(s):s)}}if(!r.length)return n;const o=await async function(e,t,i){const r="string"==typeof e?(0,I.mN)(e):e,s=t[0].spatialReference,n=(0,u.Ji)(t[0]),a={...i,query:{...r.query,f:"json",sr:s.wkid?s.wkid:JSON.stringify(s),geometries:JSON.stringify((l=t,{geometryType:(0,u.Ji)(l[0]),geometries:l.map((e=>e.toJSON()))}))}},{data:o}=await(0,g.default)(r.path+"/simplify",a);var l;return function(e,t,i){const r=(0,u.q9)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=i,t}))}(o.geometries,n,s)}(s,r,i),l=[];for(let e=0;e<n.length;e++){const t=n[e];"simplify"!==t?l.push(t):l.push(p?(0,y.$)(o.shift()):o.shift())}return l}const N=[];for(let e=0;e<O.length;e++){const t=O[e];if("cut"!==t)N.push(t);else{const e=M.shift();N.push(!0===p?(0,y.$)(e):e)}}return N}},92045:(e,t,i)=>{i.r(t),i.d(t,{default:()=>ot});var r=i(43697),s=i(51773),n=i(30030),a=i(20102),o=i(92604),l=i(70586),c=i(16453),u=i(95330),f=i(17445),h=i(5600),d=i(75215),p=(i(67676),i(36030)),m=i(71715),y=i(52011),g=i(87085),x=i(17287),I=i(71612),b=i(17017),w=(i(66577),i(3172)),_=i(8744),S=i(66677),v=i(21506),R=i(35956),C=i(29876),T=i(40297),k=i(88281),F=i(11145),P=i(96674),M=i(609),O=i(39450),B=i(36679),D=i(99815),z=i(73506),J=i(94139);const N=new Map,Z=new class{constructor(e=15e3,t=5e3){this._timer=null,this._cachedBlocks=new Map,this._size=-1,this._duration=e,this._interval=Math.min(e,t)}decreaseRefCount(e,t){const i=e+"/"+t,r=this._cachedBlocks;if(r.has(i)){const e=r.get(i);return e.refCount--,e.refCount<=0&&(r.delete(i),e.controller&&e.controller.abort()),e.refCount}return 0}getBlock(e,t){const i=e+"/"+t,r=this._cachedBlocks;if(r.has(i)){const e=r.get(i);return e.ts=Date.now(),e.refCount++,r.delete(i),r.set(i,e),e.block}return null}putBlock(e,t,i,r){const s=this._cachedBlocks,n=e+"/"+t;if(s.has(n)){const e=s.get(n);e.ts=Date.now(),e.refCount++}else s.set(n,{block:i,ts:Date.now(),refCount:1,controller:r});this._trim(),this._updateTimer()}deleteBlock(e,t){const i=this._cachedBlocks,r=e+"/"+t;i.has(r)&&i.delete(r)}updateMaxSize(e){this._size=e,this._trim()}empty(){this._cachedBlocks.clear(),this._clearTimer()}getCurrentSize(){return this._cachedBlocks.size}_updateTimer(){if(null!=this._timer)return;const e=this._cachedBlocks;this._timer=setInterval((()=>{const t=Array.from(e),i=Date.now();for(let r=0;r<t.length&&t[r][1].ts<=i-this._duration;r++)e.delete(t[r][0]);0===e.size&&this._clearTimer()}),this._interval)}_trim(){const e=this._cachedBlocks;if(-1===this._size||this._size>=e.size)return;const t=Array.from(e);for(let i=0;i<t.length-this._size;i++)e.delete(t[i][0])}_clearTimer(){null!=this._timer&&(clearInterval(this._timer),this._timer=null)}};function W(e,t){return null==t?e:`${e}?sliceId=${t}`}function E(e,t,i){const r=N.get(e);if(!r)return null==t?Z.decreaseRefCount(e,i):0;if(null==t||null==r[t])return Z.decreaseRefCount(e,i);const s=r[t]?.cache,n=s?.get(i);if(s&&n){if(n.refCount--,0===n.refCount){s.delete(i);for(let e=0;e<r.length;e++)r[e]?.cache.delete(i);n.controller&&n.controller.abort()}return n.refCount}return 0}function H(e,t,i){const r=N.get(e);if(!r)return null==t?Z.getBlock(e,i):null;if(null==t||null==r[t]){for(let e=0;e<r.length;e++){const t=r[e]?.cache.get(i);if(t)return t.refCount++,t.block}return Z.getBlock(e,i)}const s=r[t]?.cache.get(i);if(s)return s.refCount++,s.block;for(let e=0;e<r.length;e++){if(e===t||!r[e])continue;const s=r[e]?.cache,n=s?.get(i);if(s&&n)return n.refCount++,s.set(i,n),n.block}return null}function A(e,t,i,r,s=null){const n=N.get(e);if(!n)return void(null==t&&Z.putBlock(e,i,r,s));if(null==t||null==n[t])return void Z.putBlock(e,i,r,s);const a={refCount:1,block:r,isResolved:!1,isRejected:!1,controller:s};r.then((()=>a.isResolved=!0)).catch((()=>a.isRejected=!0)),n[t]?.cache.set(i,a)}function L(e,t,i){const r=N.get(e);r?null!=t&&null!=r[t]?r[t]?.cache.delete(i):Z.deleteBlock(e,i):null==t&&Z.deleteBlock(e,i)}var q=i(75993),j=i(55914),G=i(80676),U=i(6570);let $=class extends((0,M.v)(P.wq)){constructor(){super(...arguments),this.rasterJobHandler=null,this.datasetName=null,this.datasetFormat=null,this.rasterInfo=null,this.ioConfig={sampling:"closest"}}async init(){const e=(0,z.zD)();this.addResolvingPromise(e),await this.when()}normalizeCtorArgs(e){return e&&e.ioConfig&&(e={...e,ioConfig:{resolution:null,bandIds:null,sampling:"closest",tileInfo:F.Z.create(),...e.ioConfig}}),e}get _isGlobalWrappableSource(){const{rasterInfo:e}=this,t=(0,z.ut)(e.spatialReference);return(0,l.pC)(t)&&e.extent.width>=t/2}set url(e){this._set("url",(0,S.Nm)(e,o.Z.getLogger(this.declaredClass)))}async open(e){throw new a.Z("BaseRaster:open-not-implemented","open() is not implemented")}async fetchTile(e,t,i,r={}){const s=r.tileInfo||this.rasterInfo.storageInfo.tileInfo,n=this.getTileExtentFromTileInfo(e,t,i,s);return this.fetchPixels(n,s.size[0],s.size[1],r)}async identify(e,t={}){e=(0,d.TJ)(J.Z,e).clone().normalize();const{multidimensionalDefinition:i,timeExtent:r}=t,{hasMultidimensionalTranspose:s,multidimensionalInfo:n}=this.rasterInfo;let{transposedVariableName:a}=t;const o=(0,l.pC)(n)&&s&&(null!=r||(0,D.WU)(i));o&&!a&&(a=(0,l.pC)(i)&&i.length>0?i[0].variableName??void 0:n.variables[0].name,t={...t,transposedVariableName:a}),t=this._getRequestOptionsWithSliceId(t);const{spatialReference:c,extent:u}=this.rasterInfo,{datumTransformation:f}=t;let h=(0,z.nF)(e,c,f);if(!u.intersects(h))return{location:h,value:null};if((0,l.pC)(this.rasterInfo.transform)){const e=this.rasterInfo.transform.inverseTransform(h);if(!this.rasterInfo.nativeExtent.intersects(e))return{location:e,value:null};h=e}let p=0;const m=(0,l.pC)(a)&&(0,l.pC)(n)&&this.rasterInfo.hasMultidimensionalTranspose;if(!m)if(t.srcResolution)p=(0,z.kr)(t.srcResolution,this.rasterInfo,this.ioConfig.sampling).pyramidLevel;else if(p=await this.computeBestPyramidLevelForLocation(e,t),null==p)return{location:h,value:null};const y=this.identifyPixelLocation(h,p,null,m);if(null===y)return{location:h,value:null};const{row:g,col:x,rowOffset:I,colOffset:b,blockWidth:w}=y,_=a??(0,l.Wg)(t.sliceId),S=W(this.url,_),v=`${p}/${g}/${x}`;let R=H(S,null,v);(0,l.Wi)(R)&&(R=this.fetchRawTile(p,g,x,t),A(S,null,v,R));const C=await R;if((0,l.Wi)(C)||!C.pixels?.length)return{location:h,value:null};const T=I*w+b;return this._processIdentifyResult(C,{srcLocation:h,position:T,pyramidLevel:p,useTransposedTile:!!m,requestSomeSlices:o,identifyOptions:t})}async fetchPixels(e,t,i,r={}){if(e=(0,z.kZ)(e),(r=this._getRequestOptionsWithSliceId(r)).requestRawData)return this._fetchPixels(e,t,i,r);const s=(0,z.ut)(e.spatialReference),n=(0,z.Hq)(e);if((0,l.Wi)(s)||0===n||1===n&&this._isGlobalWrappableSource)return this._fetchPixels(e,t,i,r);if(n>=3)return{extent:e,pixelBlock:null};const a=[],{xmin:o,xmax:c}=e,u=Math.round(s/(c-o)*t),f=u-Math.round((s/2-o)/(c-o)*t);let h=0;const d=[];for(let l=0;l<=n;l++){const p=new U.Z({xmin:0===l?o:-s/2,xmax:l===n?c-s*l:s/2,ymin:e.ymin,ymax:e.ymax,spatialReference:e.spatialReference}),m=0===l?u-f:l===n?t-h:u;h+=m,d.push(m);const y=r.disableWrapAround&&l>0?null:this._fetchPixels(p,m,i,r);a.push(y)}const p=(await Promise.all(a)).map((e=>e?.pixelBlock));let m=null;const y={width:t,height:i};return m=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:p,srcMosaicSize:y,destDimension:null,coefs:null,sampleSpacing:null,interpolation:"nearest",alignmentInfo:null,blockWidths:d},r)).pixelBlock:(0,j.us)(p,y,{blockWidths:d}),{extent:e,srcExtent:(0,z.tB)(e,this.rasterInfo.spatialReference,r.datumTransformation),pixelBlock:m}}async fetchRawPixels(e,t,i,r={}){t={x:Math.floor(t.x),y:Math.floor(t.y)};const s=await this._fetchRawTiles(e,t,i,r),{nativeExtent:n,nativePixelSize:a,storageInfo:o}=this.rasterInfo,c=2**e,u=a.x*c,f=a.y*c,h=new U.Z({xmin:n.xmin+u*t.x,xmax:n.xmin+u*(t.x+i.width-1),ymin:n.ymax-f*(t.y+i.height-1),ymax:n.ymax-f*t.y,spatialReference:n.spatialReference});if(!s)return{extent:h,srcExtent:h,pixelBlock:null};const{pixelBlocks:d,mosaicSize:p}=s;if(1===d.length&&(0,l.pC)(d[0])&&d[0].width===i.width&&d[0].height===i.height)return{extent:h,srcExtent:h,pixelBlock:s.pixelBlocks[0]};const m=e>0?o.pyramidBlockWidth:o.blockWidth,y=e>0?o.pyramidBlockHeight:o.blockHeight,g={x:t.x%m,y:t.y%y};let x;return x=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:d,srcMosaicSize:p,destDimension:i,clipOffset:g,clipSize:i,coefs:null,sampleSpacing:null,interpolation:r.interpolation,alignmentInfo:null,blockWidths:null},r)).pixelBlock:(0,j.us)(d,p,{clipOffset:g,clipSize:i}),{extent:h,srcExtent:h,pixelBlock:x}}fetchRawTile(e,t,i,r){throw new a.Z("BaseRaster:read-not-implemented","fetchRawTile() is not implemented")}computeExtent(e){return(0,z.tB)(this.rasterInfo.extent,e)}decodePixelBlock(e,t){return!this.rasterJobHandler||t.useCanvas?(0,q.J)(e,t):this.rasterJobHandler.decode({data:e,options:t})}async request(e,t,i=0){const{customFetchParameters:r}=this.ioConfig,{range:s,query:n,headers:a}=t;i=i??t.retryCount??this.ioConfig.retryCount;const o=s?{Range:`bytes=${s.from}-${s.to}`}:null;try{return await(0,w.default)(e,{...t,query:{...n,...r},headers:{...a,...o}})}catch(r){if(i>0)return i--,this.request(e,t,i);throw r}}getSliceIndex(e){const{multidimensionalInfo:t}=this.rasterInfo;return(0,l.Wi)(t)||(0,l.Wi)(e)||0===e.length?null:(0,D.gk)(e,t)}getTileExtentFromTileInfo(e,t,i,r){const s=(0,l.s3)(r.lodAt(e));return this.getTileExtent({x:s.resolution,y:s.resolution},t,i,r.origin,r.spatialReference,r.size)}updateTileInfo(){const{storageInfo:e,spatialReference:t,extent:i,pixelSize:r}=this.rasterInfo;if(!e.tileInfo){const s=[],n=e.maximumPyramidLevel||0;let a=Math.max(r.x,r.y),o=1/.0254*96*a;for(let e=0;e<=n;e++)s.push(new O.Z({level:n-e,resolution:a,scale:o})),a*=2,o*=2;const l=new J.Z({x:i.xmin,y:i.ymax,spatialReference:t});e.tileInfo=new F.Z({origin:l,size:[e.blockWidth,e.blockHeight],spatialReference:t,lods:s}),e.isVirtualTileInfo=!0}}createRemoteDatasetStorageInfo(e,t=512,i=512,r){const{width:s,height:n,nativeExtent:a,pixelSize:o,spatialReference:l}=e,c=new J.Z({x:a.xmin,y:a.ymax,spatialReference:l});null==r&&(r=Math.max(0,Math.round(Math.log(Math.max(s,n))/Math.LN2-8)));const u=this.computeBlockBoundary(a,512,512,{x:a.xmin,y:a.ymax},[o],r);e.storageInfo=new B.Z({blockWidth:t,blockHeight:i,pyramidBlockWidth:t,pyramidBlockHeight:i,origin:c,firstPyramidLevel:1,maximumPyramidLevel:r,blockBoundary:u})}async computeBestPyramidLevelForLocation(e,t={}){return 0}computeBlockBoundary(e,t,i,r,s,n=0,a=2){if(1===s.length&&n>0){s=[...s];let{x:e,y:t}=s[0];for(let i=0;i<n;i++)e*=a,t*=a,s.push({x:e,y:t})}const o=[],{x:l,y:c}=r;for(let r=0;r<s.length;r++){const{x:n,y:a}=s[r];o.push({minCol:Math.floor((e.xmin-l+.1*n)/t/n),maxCol:Math.floor((e.xmax-l-.1*n)/t/n),minRow:Math.floor((c-e.ymax+.1*a)/i/a),maxRow:Math.floor((c-e.ymin-.1*a)/i/a)})}return o}getPyramidPixelSize(e){const{nativePixelSize:t}=this.rasterInfo,{pyramidResolutions:i,pyramidScalingFactor:r}=this.rasterInfo.storageInfo;if(0===e)return t;if((0,l.pC)(i)&&i.length)return i[e-1];const s=r**e;return{x:t.x*s,y:t.y*s}}identifyPixelLocation(e,t,i,r){const{spatialReference:s,nativeExtent:n,storageInfo:a}=this.rasterInfo,{maximumPyramidLevel:o,origin:c,transposeInfo:u}=a,f=r&&(0,l.pC)(u)?u.tileSize[0]:a.blockWidth,h=r&&(0,l.pC)(u)?u.tileSize[1]:a.blockHeight,d=(0,z.nF)(e,s,i);if(!n.intersects(d))return null;if(t<0||t>o)return null;const p=this.getPyramidPixelSize(t),{x:m,y}=p,g=(c.y-d.y)/y/h,x=(d.x-c.x)/m/f,I=Math.min(h-1,Math.floor((g-Math.floor(g))*h)),b=Math.min(f-1,Math.floor((x-Math.floor(x))*f));return{pyramidLevel:t,row:Math.floor(g),col:Math.floor(x),rowOffset:I,colOffset:b,blockWidth:f,srcLocation:d}}getTileExtent(e,t,i,r,s,n){const[a,o]=n,l=r.x+i*a*e.x,c=l+a*e.x,u=r.y-t*o*e.y,f=u-o*e.y;return new U.Z({xmin:l,xmax:c,ymin:f,ymax:u,spatialReference:s})}getBlockWidthHeight(e){return{blockWidth:e>0?this.rasterInfo.storageInfo.pyramidBlockWidth:this.rasterInfo.storageInfo.blockWidth,blockHeight:e>0?this.rasterInfo.storageInfo.pyramidBlockHeight:this.rasterInfo.storageInfo.blockHeight}}isBlockOutside(e,t,i){const r=this.rasterInfo.storageInfo.blockBoundary[e];return!r||r.maxRow<t||r.maxCol<i||r.minRow>t||r.minCol>i}async _fetchPixels(e,t,i,r={}){let s=(0,z.Hq)(e);if(s>=2)return{extent:e,pixelBlock:null};const n=this._getSourceDataInfo(e,t,i,r),{pyramidLevel:a,pyramidResolution:o,srcResolution:c,srcExtent:u,srcWidth:f,srcHeight:h}=n;if(0===f||0===h)return{extent:e,srcExtent:u,pixelBlock:null};const d=(0,l.Wg)(this.rasterInfo.transform),p="gcs-shift"===d?.type,m=(0,l.pC)((0,z.ut)(e.spatialReference));!p&&m||(s=(0,z.Hq)(n.srcExtent,p));const y=this.rasterInfo.storageInfo,g={x:Math.floor((u.xmin-y.origin.x)/o.x+.1),y:Math.floor((y.origin.y-u.ymax)/o.y+.1)},x=await this._fetchRawTiles(a,g,{width:f,height:h,wrapCount:s},r);if(!x)return{extent:e,srcExtent:u,pixelBlock:null};const I=a>0?y.pyramidBlockWidth:y.blockWidth,b=a>0?y.pyramidBlockHeight:y.blockHeight,w=I===f&&b===h&&g.x%I==0&&g.y%b==0,_=new J.Z({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/i,spatialReference:e.spatialReference}),S=!e.spatialReference.equals(this.rasterInfo.spatialReference),{datumTransformation:v}=r;if(!S&&w&&1===x.pixelBlocks.length&&I===t&&b===i&&c.x===_.x&&c.y===_.y)return{extent:e,srcExtent:u,pixelBlock:x.pixelBlocks[0]};const R=m&&(0,l.pC)((0,z.ut)(u.spatialReference)),C=r.requestProjectedLocalDirections&&this.rasterInfo.dataType.startsWith("vector");C&&!this.rasterJobHandler&&await(0,z.zD)();const T=this.rasterJobHandler?await this.rasterJobHandler.getProjectionOffsetGrid({projectedExtent:e,srcBufferExtent:x.extent,pixelSize:_.toJSON(),datumTransformation:v,rasterTransform:d,hasWrapAround:s>0||R,isAdaptive:!1!==this.ioConfig.optimizeProjectionAccuracy,includeGCSGrid:C},r):(0,z.Qp)({projectedExtent:e,srcBufferExtent:x.extent,pixelSize:_,datumTransformation:v,rasterTransform:d,hasWrapAround:s>0||R,isAdaptive:!1,includeGCSGrid:C});let k;const F=!r.requestRawData,P={rows:T.spacing[0],cols:T.spacing[1]},M=(0,l.Wg)(this._getRasterTileAlignmentInfo(a,x.extent.xmin)),{pixelBlocks:O,mosaicSize:B,isPartiallyFilled:D}=x;let N=null;if(this.rasterJobHandler){const e=await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:O,srcMosaicSize:B,destDimension:F?{width:t,height:i}:null,coefs:F?T.coefficients:null,sampleSpacing:F?P:null,projectDirections:C,gcsGrid:C?T.gcsGrid:null,isUV:"vector-uv"===this.rasterInfo.dataType,interpolation:r.interpolation,alignmentInfo:M,blockWidths:null},r);({pixelBlock:k,localNorthDirections:N}=e)}else{const e=(0,j.us)(O,B,{alignmentInfo:M});k=F?(0,j.Uk)(e,{width:t,height:i},T.coefficients,P,r.interpolation):e,C&&T.gcsGrid&&(N=(0,j.Qh)({width:t,height:i},T.gcsGrid),k=(0,G.xQ)(k,this.rasterInfo.dataType,N))}return r.requestRawData||C?{srcExtent:u,pixelBlock:k,transformGrid:T,localNorthDirections:N,extent:e,isPartiallyFilled:D}:{srcExtent:u,extent:e,pixelBlock:k}}async _fetchRawTiles(e,t,i,r){const{origin:s,blockBoundary:n}=this.rasterInfo.storageInfo,{blockWidth:a,blockHeight:o}=this.getBlockWidthHeight(e);let{x:c,y:u}=t,{width:f,height:h,wrapCount:d}=i;const p=this._getRasterTileAlignmentInfo(e,0);r.buffer&&(c-=r.buffer.cols,u-=r.buffer.rows,f+=2*r.buffer.cols,h+=2*r.buffer.rows);let m=0,y=0,g=0;d&&(0,l.pC)(p)&&(({worldColumnCountFromOrigin:y,originColumnOffset:g,rightPadding:m}=p),y*p.blockWidth-m>=c+f&&(m=0));const x=Math.floor(c/a),I=Math.floor(u/o),b=Math.floor((c+f+m-1)/a),w=Math.floor((u+h+m-1)/o),_=n[e];if(!_)return null;const{minRow:S,minCol:v,maxCol:R,maxRow:C}=_;if(0===d&&(w<S||b<v||I>C||x>R))return null;const T=new Array;let k=!1;const F=null==this.ioConfig.allowPartialFill?r.allowPartialFill:this.ioConfig.allowPartialFill;for(let t=I;t<=w;t++)for(let i=x;i<=b;i++){let s=i;if(!r.disableWrapAround&&d&&(0,l.pC)(p)&&y<=i&&(s=i-y-g),t>=S&&s>=v&&C>=t&&R>=s){const i=this._fetchRawTile(e,t,s,r);F?T.push(new Promise((e=>{i.then((t=>e(t))).catch((()=>{k=!0,e(null)}))}))):T.push(i)}else T.push(Promise.resolve(null))}if(0===T.length)return null;const P=await Promise.all(T),M={height:(w-I+1)*o,width:(b-x+1)*a},{spatialReference:O}=this.rasterInfo,B=this.getPyramidPixelSize(e),{x:D,y:z}=B;return{extent:new U.Z({xmin:s.x+x*a*D,xmax:s.x+(b+1)*a*D,ymin:s.y-(w+1)*o*z,ymax:s.y-I*o*z,spatialReference:O}),pixelBlocks:P,mosaicSize:M,isPartiallyFilled:k}}_fetchRawTile(e,t,i,r){const s=this.rasterInfo.storageInfo.blockBoundary[e];if(!s)return Promise.resolve(null);const{minRow:n,minCol:a,maxCol:o,maxRow:c}=s;if(t<n||i<a||t>c||i>o)return Promise.resolve(null);const f=W(this.url,r.sliceId),h=`${e}/${t}/${i}`;let d=H(f,r.registryId,h);if((0,l.Wi)(d)){const s=new AbortController;d=this.fetchRawTile(e,t,i,{...r,signal:s.signal}),A(f,r.registryId,h,d,s),d.catch((()=>L(f,r.registryId,h)))}return r.signal&&(0,u.fu)(r,(()=>{E(f,r.registryId,h)})),d}_computeMagDirValues(e){const{bandCount:t,dataType:i}=this.rasterInfo;if((2!==t||"vector-magdir"!==i)&&"vector-uv"!==i||2!==e?.length||!e[0]?.length)return null;const r=e[0].length;if("vector-magdir"===i){const t=e[1].map((e=>(e+360)%360));return[e[0],t]}const[s,n]=e,a=[],o=[];for(let e=0;e<r;e++){const[t,i]=(0,G.Tg)([s[e],n[e]]);a.push(t),o.push(i)}return[a,o]}_getRasterTileAlignmentInfo(e,t){return null==this._rasterTileAlighmentInfo&&(this._rasterTileAlighmentInfo=(0,z.P_)(this.rasterInfo)),(0,l.Wi)(this._rasterTileAlighmentInfo.pyramidsInfo)?null:{startX:t,halfWorldWidth:this._rasterTileAlighmentInfo.halfWorldWidth,hasGCSSShiftTransform:this._rasterTileAlighmentInfo.hasGCSSShiftTransform,...this._rasterTileAlighmentInfo.pyramidsInfo[e]}}_getSourceDataInfo(e,t,i,r={}){const s={datumTransformation:r.datumTransformation,pyramidLevel:0,pyramidResolution:null,srcExtent:null,srcHeight:0,srcResolution:null,srcWidth:0};r.srcResolution&&(s.srcResolution=r.srcResolution,this._updateSourceDataInfo(e,s));const n=this.rasterInfo.storageInfo.maximumPyramidLevel||0,{srcWidth:a,srcHeight:o,pyramidLevel:l}=s,c=a/t,u=o/i,f=l<n&&c*u>=16,h=l===n&&this._requireTooManySrcTiles(a,o,t,i);if(f||h||0===a||0===o){const a=new J.Z({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/i,spatialReference:e.spatialReference});let o=(0,z.VO)(a,this.rasterInfo.spatialReference,e,s.datumTransformation);const h=!o||r.srcResolution&&o.x+o.y<r.srcResolution.x+r.srcResolution.y;if(f&&r.srcResolution&&h){const e=Math.round(Math.log(Math.max(c,u))/Math.LN2)-1;if(n-l+3>=e){const t=2**e;o={x:r.srcResolution.x*t,y:r.srcResolution.y*t}}}o&&(s.srcResolution=o,this._updateSourceDataInfo(e,s))}return this._requireTooManySrcTiles(s.srcWidth,s.srcHeight,t,i)&&(s.srcWidth=0,s.srcHeight=0),s}_requireTooManySrcTiles(e,t,i,r){const{tileInfo:s}=this.rasterInfo.storageInfo;return Math.ceil(e/s.size[0])*Math.ceil(t/s.size[1])>=256||e/i>8||t/r>8}_updateSourceDataInfo(e,t){t.srcWidth=0,t.srcHeight=0;const i=this.rasterInfo.spatialReference,{srcResolution:r,datumTransformation:s}=t,{pyramidLevel:n,pyramidResolution:a,excessiveReading:o}=(0,z.kr)(r,this.rasterInfo,this.ioConfig.sampling);if(o)return;let c=t.srcExtent||(0,z.tB)(e,i,s);if(null==c)return;const u=(0,l.Wg)(this.rasterInfo.transform);u&&(c=u.inverseTransform(c)),t.srcExtent=c;const f=Math.ceil((c.xmax-c.xmin)/a.x-.1),h=Math.ceil((c.ymax-c.ymin)/a.y-.1);t.pyramidLevel=n,t.pyramidResolution=a,t.srcWidth=f,t.srcHeight=h}_getRequestOptionsWithSliceId(e){return(0,l.pC)(this.rasterInfo.multidimensionalInfo)&&null==e.sliceId&&(e={...e,sliceId:this.getSliceIndex(e.multidimensionalDefinition)}),e}_processIdentifyResult(e,t){const{srcLocation:i,position:r,pyramidLevel:s,useTransposedTile:n}=t,a=e.pixels[0].length/e.width/e.height;if(e.mask&&!e.mask[r])return{location:i,value:null};const{multidimensionalInfo:o}=this.rasterInfo;if((0,l.Wi)(o)||!n){const t=e.pixels.map((e=>e[r])),n={location:i,value:t,pyramidLevel:s},a=this._computeMagDirValues(t.map((e=>[e])));return a?.length&&(n.magdirValue=a.map((e=>e[0]))),n}let c=e.pixels.map((e=>Array.prototype.slice.call(e,r*a,r*a+a))),u=this._computeMagDirValues(c);const{requestSomeSlices:f,identifyOptions:h}=t;let d=(0,D.MO)(o,h.transposedVariableName);if(f){const e=(0,D.Ur)(d,(0,l.Wg)(h.multidimensionalDefinition),(0,l.Wg)(h.timeExtent));c=c.map((t=>e.map((e=>t[e])))),u=u?.map((t=>e.map((e=>t[e])))),d=e.map((e=>d[e]))}return{location:i,value:null,dataSeries:d.map(((e,t)=>{const i={value:c.map((e=>e[t])),multidimensionalDefinition:e.multidimensionalDefinition.map((e=>new R.Z({...e,isSlice:!0})))};return u?.length&&(i.magdirValue=[u[0][t],u[1][t]]),i})),pyramidLevel:s}}};(0,r._)([(0,h.Cb)()],$.prototype,"_rasterTileAlighmentInfo",void 0),(0,r._)([(0,h.Cb)({readOnly:!0})],$.prototype,"_isGlobalWrappableSource",null),(0,r._)([(0,h.Cb)(v.HQ)],$.prototype,"url",null),(0,r._)([(0,h.Cb)({type:String,json:{write:!0}})],$.prototype,"datasetName",void 0),(0,r._)([(0,h.Cb)({type:String,json:{write:!0}})],$.prototype,"datasetFormat",void 0),(0,r._)([(0,h.Cb)()],$.prototype,"rasterInfo",void 0),(0,r._)([(0,h.Cb)()],$.prototype,"ioConfig",void 0),(0,r._)([(0,h.Cb)()],$.prototype,"sourceJSON",void 0),$=(0,r._)([(0,y.j)("esri.layers.support.rasterDatasets.BaseRaster")],$);const V=$;let X=class extends V{constructor(){super(...arguments),this.datasetFormat="Function",this.tileType="Raster",this.rasterFunction=null,this._primaryRasters=null}async open(e){await this.init();const{rasterFunction:t}=this,{rasters:i,rasterIds:r}=t.getPrimaryRasters(),s=i.map((t=>t.rasterInfo?void 0:t.open(e)));await Promise.all(s);const n=i.map((({rasterInfo:e})=>e)),o=t.bind({rasterInfos:n,rasterIds:r});if(!o.success)throw new a.Z("raster-function:open",`cannot bind the function: ${o.error??""}`);await this.syncJobHandler(),this.set("sourceJSON",i[0].sourceJSON),this.set("rasterInfo",t.rasterInfo)}async syncJobHandler(){const{rasterFunction:e}=this;if(this._primaryRasters=e.getPrimaryRasters(),this.rasterJobHandler)return this.rasterJobHandler.updateRasterFunction(e)}async fetchPixels(e,t,i,r={}){const{rasters:s,rasterIds:n}=this._primaryRasters,a=s.map((s=>s.fetchPixels(e,t,i,r))),o=await Promise.all(a),c=o.map((e=>e.pixelBlock));if(r.skipRasterFunction||c.every((e=>(0,l.Wi)(e))))return o[0];const u=o.find((e=>(0,l.pC)(e.pixelBlock)))?.extent??e,f=this.rasterJobHandler?await this.rasterJobHandler.process({extent:u,primaryPixelBlocks:c,primaryRasterIds:n}):this.rasterFunction.process({extent:u,primaryPixelBlocks:c,primaryRasterIds:n});return{...o[0],pixelBlock:f}}};(0,r._)([(0,h.Cb)({type:String,json:{write:!0}})],X.prototype,"datasetFormat",void 0),(0,r._)([(0,h.Cb)()],X.prototype,"tileType",void 0),(0,r._)([(0,h.Cb)()],X.prototype,"rasterFunction",void 0),X=(0,r._)([(0,y.j)("esri.layers.support.rasterDatasets.FunctionRaster")],X);const Y=X;var K=i(8168),Q=i(67058),ee=i(72758),te=i(23808),ie=i(82971);const re=o.Z.getLogger("esri.layers.mixins.ImageryTileMixin"),se=e=>{let t=class extends e{constructor(){super(...arguments),this._rasterJobHandler={instance:null,refCount:0,connectionPromise:null},this.bandIds=null,this.copyright=null,this.interpolation="nearest",this.multidimensionalSubset=null,this.raster=null,this.rasterFunction=null,this.rasterInfo=null,this.sourceJSON=null,this.spatialReference=null,this.symbolizer=null}get fullExtent(){return this.rasterInfo?.extent}set multidimensionalDefinition(e){this._set("multidimensionalDefinition",e),this.updateRenderer()}get tileInfo(){return this.rasterInfo?.storageInfo.tileInfo}set url(e){this._set("url",(0,S.Nm)(e,re))}set renderer(e){this._set("renderer",e),this.updateRenderer()}async convertVectorFieldData(e,t){if((0,l.Wi)(e)||!this.rasterInfo)return null;const i=this._rasterJobHandler.instance,r=this.rasterInfo.dataType;return i?i.convertVectorFieldData({pixelBlock:e,dataType:r},t):(0,G.KC)(e,r)}async createFlowMesh(e,t){const i=this._rasterJobHandler.instance;return i?i.createFlowMesh(e,t):(0,te.GE)(e.meshType,e.simulationSettings,e.flowData,(0,l.pC)(t.signal)?t.signal:(new AbortController).signal)}normalizeRasterFetchOptions(e){const{multidimensionalInfo:t}=this.rasterInfo??{};if((0,l.Wi)(t))return e;let i=e.multidimensionalDefinition||this.multidimensionalDefinition;!(0,l.Wi)(i)&&i.length||(i=(0,D.Tj)(this.raster.rasterInfo,{multidimensionalSubset:this.multidimensionalSubset}));const r=e.timeExtent||this.timeExtent;if((0,l.pC)(i)&&(0,l.pC)(r)&&((0,l.pC)(r.start)||(0,l.pC)(r.end))){i=i.map((e=>e.clone()));const s=t.variables.find((({name:e})=>e===i[0].variableName))?.dimensions?.find((({name:e})=>"StdTime"===e)),n=i.find((({dimensionName:e})=>"StdTime"===e));if(!s||!n)return{...e,multidimensionalDefinition:null};const{start:a,end:o}=r,c=(0,l.Wi)(a)?null:a.getTime(),u=(0,l.Wi)(o)?null:o.getTime(),f=c??u,h=u??c;if((0,l.pC)(s.values)){const e=s.values.filter((e=>{if(Array.isArray(e)){if(f===h)return e[0]<=f&&e[1]>=f;const t=e[0]<=f&&e[1]>f||e[0]<h&&e[1]>=h,i=e[0]>=f&&e[1]<=h||e[0]<f&&e[1]>h;return t||i}return f===h?e===f:e>=f&&e<=h}));if(e.length){const t=e.sort(((e,t)=>f===h?(e[0]??e)-(t[0]??t):Math.abs((e[1]??e)-h)-Math.abs((t[1]??t)-h)))[0];n.values=[t]}else i=null}else if(s.hasRegularIntervals&&s.extent){const[e,t]=s.extent;f>t||h<e?i=null:n.values=f===h?[f]:[Math.max(e,f),Math.min(t,h)]}}return(0,l.pC)(i)&&(0,D.nb)(i,this.multidimensionalSubset)?{...e,multidimensionalDefinition:null}:{...e,multidimensionalDefinition:i}}async updateRasterFunction(){if("imagery-tile"!==this.type||JSON.stringify(this.rasterFunction)===JSON.stringify(this._cachedRasterFunctionJson))return;let e=this.raster;const{bandCount:t}=e.rasterInfo;if("Function"===e.datasetFormat){const t=e.rasterFunction.getPrimaryRasters();e=t.rasters[0]}const{rasterFunction:i}=this;let r=!1;if(i){const t=(0,K.Ue)(i.rasterFunctionDefinition??i.toJSON(),{raster:e}),r=new Y({rasterFunction:t});r.rasterJobHandler=this._rasterJobHandler.instance,await r.open(),this._cachedRasterFunctionJson=this.rasterFunction?.toJSON(),this.raster=r}else r="Function"===this.raster?.datasetFormat,this.raster=e,this._cachedRasterFunctionJson=null;this._cachedRendererJson=null;const{bandCount:s}=this.raster.rasterInfo,{bandIds:n}=this;(n?.length?n.some((e=>e>=s))||1===n.length&&t>=3!=s>=3:s>=3)?(this._set("bandIds",null),this._configDefaultRenderer("auto")):r&&this._configDefaultRenderer("auto")}async updateRenderer(){const{loaded:e,symbolizer:t}=this;if(!e||!t)return;const{rasterInfo:i}=this.raster,r=(0,D.WY)(i,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset})?.name,s=(0,Q.ol)({...this.renderer.toJSON(),variableName:r});if(JSON.stringify(this._cachedRendererJson)===JSON.stringify(s))return;const n=this._rasterJobHandler.instance;n&&(t.rasterInfo=(0,Q.FI)(i,r),t.rendererJSON=s,t.bind(),await n.updateSymbolizer(t),this._cachedRendererJson=s)}async applyRenderer(e,t){const i=e&&e.pixelBlock;if(!((0,l.pC)(i)&&i.pixels&&i.pixels.length>0))return null;let r;await this.updateRenderer();const s=this._rasterJobHandler.instance,n=this.bandIds??[];return r=s?await s.symbolize({...e,simpleStretchParams:t,bandIds:n}):this.symbolizer.symbolize({...e,simpleStretchParams:t,bandIds:n}),r}getTileUrl(e,t,i){return"RasterTileServer"===this.raster.datasetFormat?`${this.url}/tile/${e}/${t}/${i}`:""}getCompatibleTileInfo(e,t,i=!1){if(!this.loaded||(0,l.Wi)(t))return null;if(i&&e.equals(this.spatialReference))return this.tileInfo;const r=(0,_.C5)(e);return F.Z.create({size:256,spatialReference:e,origin:r?{x:r.origin[0],y:r.origin[1]}:{x:t.xmin,y:t.ymax}})}getCompatibleFullExtent(e){return this.loaded?(this._compatibleFullExtent&&this._compatibleFullExtent.spatialReference.equals(e)||(this._compatibleFullExtent=this.raster.computeExtent(e)),this._compatibleFullExtent):null}async fetchTile(e,t,r,s={}){if(i(this),s.requestAsImageElement){const i=this.getTileUrl(e,t,r);return(0,w.default)(i,{responseType:"image",query:{...this.refreshParameters,...this.raster.ioConfig.customFetchParameters},signal:s.signal}).then((e=>e.data))}const{rasterInfo:n}=this;if((0,l.pC)(n.multidimensionalInfo)&&(s=this.normalizeRasterFetchOptions(s),(0,l.Wi)(s.multidimensionalDefinition))){const i=s.tileInfo||n.storageInfo.tileInfo;return{extent:this.raster.getTileExtentFromTileInfo(e,t,r,i),pixelBlock:null}}return await this._initJobHandler(),await this.updateRasterFunction(),"raster-shaded-relief"===this.renderer.type&&(s={...s,buffer:{cols:1,rows:1}}),this.raster.fetchTile(e,t,r,s)}async fetchPixels(e,t,i,r={}){return(0,l.pC)(this.rasterInfo.multidimensionalInfo)&&(r=this.normalizeRasterFetchOptions(r),(0,l.Wi)(r.multidimensionalDefinition))?{extent:e,pixelBlock:null}:(await this._initJobHandler(),await this.updateRasterFunction(),this.raster.fetchPixels(e,t,i,r))}async identify(e,t={}){const{raster:i,rasterInfo:r}=this;return!(0,l.pC)(r.multidimensionalInfo)||r.hasMultidimensionalTranspose&&((0,D.WU)(t.multidimensionalDefinition)||t.transposedVariableName||t.timeExtent)||(t=this.normalizeRasterFetchOptions(t),!(0,l.Wi)(t.multidimensionalDefinition))?i.identify(e,t):{location:e,value:null}}increaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount++}decreaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount--,this._rasterJobHandler.refCount<=0&&this._shutdownJobHandler()}hasStandardTime(){const e=this.rasterInfo?.multidimensionalInfo;if((0,l.Wi)(e)||"standard-time"!==this.rasterInfo?.dataType)return!1;const t=this.multidimensionalDefinition,i=t?.[0]?.variableName;return e.variables.some((e=>e.name===i&&(!t?.[0].dimensionName||e.dimensions.some((e=>"StdTime"===e.name)))))}getStandardTimeValue(e){return new Date(24*(e-25569)*3600*1e3).toString()}getMultidimensionalSubsetVariables(e){const t=e??this.rasterInfo?.multidimensionalInfo;return(0,D.jj)(this.multidimensionalSubset,t)}_configDefaultSettings(){this._configDefaultInterpolation(),this.multidimensionalDefinition||(this.multidimensionalDefinition=(0,D.Tj)(this.raster.rasterInfo,{multidimensionalSubset:this.multidimensionalSubset})),this._configDefaultRenderer()}_initJobHandler(){if(null!=this._rasterJobHandler.connectionPromise)return this._rasterJobHandler.connectionPromise;const e=new k.Z;return this._rasterJobHandler.connectionPromise=e.initialize().then((()=>{i(this),this._rasterJobHandler.instance=e,this.raster.rasterJobHandler=e,this.renderer&&this.updateRenderer(),"Function"===this.raster.datasetFormat&&this.raster.syncJobHandler()})).catch((()=>{})),this._rasterJobHandler.connectionPromise}_shutdownJobHandler(){this._rasterJobHandler.instance&&this._rasterJobHandler.instance.destroy(),this._rasterJobHandler.instance=null,this._rasterJobHandler.connectionPromise=null,this._rasterJobHandler.refCount=0,this._cachedRendererJson=null,this.raster&&(this.raster.rasterJobHandler=null)}_configDefaultInterpolation(){if(null==this.interpolation){i(this);const{raster:e}=this,t=(0,Q.In)(e.rasterInfo,e.tileType,this.sourceJSON?.defaultResamplingMethod);this._set("interpolation",t)}}_configDefaultRenderer(e="no"){i(this);const{rasterInfo:t}=this.raster;this.bandIds||(this.bandIds=(0,Q.YD)(t));const r=(0,D.WY)(t,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset})?.name;if(!this.renderer||"override"===e){const e=(0,Q.Ob)(t,{bandIds:this.bandIds,variableName:r});"WCSServer"===this.raster.datasetFormat&&"raster-stretch"===e.type&&((t.statistics?.[0].max??0)>1e24||(t.statistics?.[0].min??0)<-1e24)&&(e.dynamicRangeAdjustment=!0,e.statistics=null,"none"===e.stretchType&&(e.stretchType="min-max")),this.renderer=e}const s=(0,Q.ol)({...this.renderer.toJSON(),variableName:r}),n=(0,Q.FI)(t,r);this.symbolizer?(this.symbolizer.rendererJSON=s,this.symbolizer.rasterInfo=n):this.symbolizer=new ee.Z({rendererJSON:s,rasterInfo:n});const a=this.symbolizer.bind();a.success||(re.warn("imagery-tile-mixin",a.error||"The given renderer is not supported by the layer."),"auto"===e&&this._configDefaultRenderer("override"))}};function i(e){if(!e.raster||!e.rasterInfo)throw new a.Z("imagery-tile","no raster")}return(0,r._)([(0,h.Cb)()],t.prototype,"_cachedRendererJson",void 0),(0,r._)([(0,h.Cb)()],t.prototype,"_cachedRasterFunctionJson",void 0),(0,r._)([(0,h.Cb)()],t.prototype,"_compatibleFullExtent",void 0),(0,r._)([(0,h.Cb)()],t.prototype,"_rasterJobHandler",void 0),(0,r._)([(0,h.Cb)()],t.prototype,"bandIds",void 0),(0,r._)([(0,h.Cb)({json:{origins:{service:{read:{source:"copyrightText"}}}}})],t.prototype,"copyright",void 0),(0,r._)([(0,h.Cb)({json:{read:!1}})],t.prototype,"fullExtent",null),(0,r._)([(0,h.Cb)()],t.prototype,"interpolation",void 0),(0,r._)([(0,h.Cb)()],t.prototype,"ioConfig",void 0),(0,r._)([(0,h.Cb)({type:[R.Z],json:{write:!0}})],t.prototype,"multidimensionalDefinition",null),(0,r._)([(0,h.Cb)({type:C.Z,json:{write:!0}})],t.prototype,"multidimensionalSubset",void 0),(0,r._)([(0,h.Cb)()],t.prototype,"raster",void 0),(0,r._)([(0,h.Cb)({type:T.Z})],t.prototype,"rasterFunction",void 0),(0,r._)([(0,h.Cb)()],t.prototype,"rasterInfo",void 0),(0,r._)([(0,h.Cb)()],t.prototype,"sourceJSON",void 0),(0,r._)([(0,h.Cb)({readOnly:!0,type:ie.Z,json:{read:!1}})],t.prototype,"spatialReference",void 0),(0,r._)([(0,h.Cb)({json:{read:!1}})],t.prototype,"tileInfo",null),(0,r._)([(0,h.Cb)(v.HQ)],t.prototype,"url",null),(0,r._)([(0,h.Cb)({types:n.dr})],t.prototype,"renderer",null),(0,r._)([(0,h.Cb)()],t.prototype,"symbolizer",void 0),t=(0,r._)([(0,y.j)("esri.layers.ImageryTileMixin")],t),t};var ne=i(38009),ae=i(16859),oe=i(34760),le=i(72965),ce=i(28294),ue=i(1231),fe=i(69608),he=i(48526),de=i(20095);function pe(e){const t=e.fields,i=e.records,r=t.some((e=>"oid"===e.name.toLowerCase()))?"OBJECTID":"OID",s=[{name:r,type:"esriFieldTypeOID",alias:"OID"}].concat(t.map((e=>({name:e.name,type:"esriFieldType"+e.typeName,alias:e.name})))),n=s.map((e=>e.name)),a=[];let o=0,l=0;return i.forEach((e=>{const t={};for(t[r]=o++,l=1;l<n.length;l++)t[n[l]]=e[l-1];a.push({attributes:t})})),{displayFieldName:"",fields:s,features:a}}class me{static get supportedVersions(){return[5]}static parse(e){const t=new DataView(e),i=3&t.getUint8(0);if(3!==i)return{header:{version:i},recordSet:null};const r=t.getUint32(4,!0),s=t.getUint16(8,!0),n=t.getUint16(10,!0),a={version:i,recordCount:r,headerByteCount:s,recordByteCount:n};let o=32;const l=[],c=[];let u;if(3===i){for(;13!==t.getUint8(o);)u=String.fromCharCode(t.getUint8(o+11)).trim(),l.push({name:(0,de.f)(new Uint8Array(e,o,11)),type:u,typeName:["String","Date","Double","Boolean","String","Integer"][["C","D","F","L","M","N"].indexOf(u)],length:t.getUint8(o+16)}),o+=32;if(o+=1,l.length>0)for(;c.length<r&&e.byteLength-o>n;){const i=[];32===t.getUint8(o)?(o+=1,l.forEach((t=>{if("C"===t.type)i.push((0,de.f)(new Uint8Array(e,o,t.length)).trim());else if("N"===t.type)i.push(parseInt(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim(),10));else if("F"===t.type)i.push(parseFloat(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim()));else if("D"===t.type){const r=String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim();i.push(new Date(parseInt(r.substring(0,4),10),parseInt(r.substring(4,6),10)-1,parseInt(r.substring(6,8),10)))}o+=t.length})),c.push(i)):o+=n}}return{header:a,fields:l,records:c,recordSet:pe({fields:l,records:c})}}}var ye=i(87521),ge=i(74889);const xe=new Map;xe.set("int16","esriFieldTypeSmallInteger"),xe.set("int32","esriFieldTypeInteger"),xe.set("int64","esriFieldTypeInteger"),xe.set("float32","esriFieldTypeSingle"),xe.set("float64","esriFieldTypeDouble"),xe.set("text","esriFieldTypeString");let Ie=class extends V{constructor(){super(...arguments),this.storageInfo=null,this.datasetFormat="CRF"}async open(e){await this.init();const{data:t}=await this.request(this.url+"/conf.json",{signal:e?.signal});if(!this._validateHeader(t))throw new a.Z("cloudraster:open","Invalid or unsupported conf.json.");this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const{storageInfo:i,rasterInfo:r}=this._parseHeader(t);if("thematic"===r.dataType){const e=await this._fetchAuxiliaryInformation();r.attributeTable=e}this._set("storageInfo",i),this._set("rasterInfo",r),this.ioConfig.retryCount=this.ioConfig.retryCount||0}async fetchRawTile(e,t,i,r={}){const{transposeInfo:s}=this.rasterInfo.storageInfo,{transposedVariableName:n}=r,a=!(!s||!n),o=a?0:this.rasterInfo.storageInfo.maximumPyramidLevel-e;if(o<0)return null;const l=this._buildCacheFilePath(o,t,i,r.multidimensionalDefinition,n),c=this._getIndexRecordFromBundle(t,i,a),u=await this.request(l,{range:{from:0,to:this.storageInfo.headerSize-1},responseType:"array-buffer",signal:r.signal});if(!u)return null;const f=new Uint8Array(u.data),h=this._getTileEndAndContentType(f,c);if(0===h.recordSize)return null;const d=await this.request(l,{range:{from:h.position,to:h.position+h.recordSize},responseType:"array-buffer",signal:r.signal});if(!d)return null;const[p,m]=this._getTileSize(a);return this.decodePixelBlock(d.data,{width:p,height:m,planes:null,pixelType:null,returnInterleaved:a})}_validateHeader(e){return e&&"RasterInfo"===e.type&&!["origin","extent","geodataXform","LODInfos","blockWidth","blockHeight","bandCount","pixelType","pixelSizeX","pixelSizeY","format","packetSize"].some((t=>!e[t]))}_parseHeader(e){const t=["u1","u2","u4","u8","s8","u16","s16","u32","s32","f32","f64"][e.pixelType],{bandCount:i,histograms:r,colormap:s,blockWidth:n,blockHeight:a,firstPyramidLevel:o,maximumPyramidLevel:l}=e,c=e.statistics&&e.statistics.map((e=>({min:e.min,max:e.max,avg:e.mean,stddev:e.standardDeviation,median:e.median,mode:e.mode}))),u=e.extent.spatialReference,f=e.geodataXform?.spatialReference,h=new ie.Z(u?.wkid||u?.wkt?u:f);let d=new U.Z({xmin:e.extent.xmin,ymin:e.extent.ymin,xmax:e.extent.xmax,ymax:e.extent.ymax,spatialReference:h});const p=new J.Z({x:e.pixelSizeX,y:e.pixelSizeY,spatialReference:h}),m=Math.round((d.xmax-d.xmin)/p.x),y=Math.round((d.ymax-d.ymin)/p.y),g=this._parseTransform(e.geodataXform),x=g?d:null;g&&(d=g.forwardTransform(d),p.x=(d.xmax-d.xmin)/m,p.y=(d.ymax-d.ymin)/y);const I=e.properties??{},b=e.format.toLowerCase().replace("cache/",""),w=new J.Z(e.origin.x,e.origin.y,h);let _,S,v,R;if(s&&s.colors)for(_=[],S=0;S<s.colors.length;S++)v=s.colors[S],R=s.values?s.values[S]:S,_.push([R,255&v,v<<16>>>24,v<<8>>>24,v>>>24]);const C=e.LODInfos,T=[];for(S=0;S<C.levels.length;S++)T.push(new O.Z({level:C.levels[S],resolution:C.resolutions[S],scale:96/.0254*C.resolutions[S]}));const k=new F.Z({dpi:96,lods:T,format:b,origin:w,size:[n,a],spatialReference:h}),P={recordSize:8,packetSize:e.packetSize,headerSize:e.packetSize*e.packetSize*8+64},M=[{maxCol:Math.ceil(m/n)-1,maxRow:Math.ceil(y/a)-1,minCol:0,minRow:0}];let D=2;if(l>0)for(S=0;S<l;S++)M.push({maxCol:Math.ceil(m/D/n)-1,maxRow:Math.ceil(y/D/a)-1,minCol:0,minRow:0}),D*=2;const z=e.mdInfo;let N=null;if(z&&I._yxs){const e=I._yxs;N={packetSize:e.PacketSize,tileSize:[e.TileXSize,e.TileYSize]}}return{storageInfo:P,rasterInfo:new he.Z({width:m,height:y,pixelType:t,bandCount:i,extent:d,nativeExtent:x,transform:g,spatialReference:h,pixelSize:p,keyProperties:I,statistics:c,histograms:r,multidimensionalInfo:z,colormap:_,storageInfo:new B.Z({blockWidth:n,blockHeight:a,pyramidBlockWidth:n,pyramidBlockHeight:a,origin:w,tileInfo:k,transposeInfo:N,firstPyramidLevel:o,maximumPyramidLevel:l,blockBoundary:M})})}}_parseTransform(e){if(!(0,ye.j)(e))throw new a.Z("cloudraster:open","the data contains unsupported geodata transform types");const t=(0,ye.c)(e);if("identity"===t.type)return null;if("polynomial"!==t.type||!t.forwardCoefficients?.length||!t.inverseCoefficients?.length)throw new a.Z("cloudraster:open","the data contains unsupported geodata transforms - both forward and inverse coefficients are required currently");return t}async _fetchAuxiliaryInformation(e){const t=this.request(this.url+"/conf.vat.json",{signal:e}).then((e=>e.data)).catch((()=>null)),i=this.request(this.url+"/conf.vat.dbf",{responseType:"array-buffer",signal:e}).then((e=>e.data)).catch((()=>null)),r=await Promise.all([t,i]);let s;if(r[0]){let e=r[0].fields;const t=r[0].values;if(e&&t){e=e.map((e=>({type:"OID"===e.name?"esriFieldTypeOID":xe.get(e.type),name:e.name,alias:e.alias||e.name})));const i=t.map((e=>({attributes:e})));e&&t&&(s={fields:e,features:i})}}return!s&&r[1]&&(s=me.parse(r[1]).recordSet),ge.Z.fromJSON(s)}_buildCacheFilePath(e,t,i,r,s){const n=this._getPackageSize(!!s),a=Math.floor(t/n)*n,o=Math.floor(i/n)*n,c="R"+this._toHexString4(a)+"C"+this._toHexString4(o);let u="L";u+=e>=10?e.toString():"0"+e.toString();const{multidimensionalInfo:f}=this.rasterInfo,h=r?.[0];if((0,l.Wi)(f)||!h)return`${this.url}/_alllayers/${u}/${c}.bundle`;let d="_yxs";if(!s){d=f.variables.find((e=>e.name===h.variableName)).dimensions[0].values.indexOf(h.values[0]).toString(16);const e=4-d.length;for(let t=0;t<e;t++)d="0"+d;d="S"+d}const p=this._getVariableFolderName(s||h.variableName);return`${this.url}/_alllayers/${p}/${d}/${u}/${c}.bundle`}_getPackageSize(e=!1){const{transposeInfo:t}=this.rasterInfo.storageInfo;return e&&(0,l.pC)(t)?t.packetSize??0:this.storageInfo.packetSize}_getTileSize(e=!1){const{storageInfo:t}=this.rasterInfo,{transposeInfo:i}=t;return e&&(0,l.pC)(i)?i.tileSize:t.tileInfo.size}_getVariableFolderName(e){return""===(e=e.trim())?"_v":e.replace(/[\{|\}\-]/g,"_").replace("\\*","_v")}_getIndexRecordFromBundle(e,t,i=!1){const r=this._getPackageSize(i),s=r*(e%r)+t%r;if(s<0)throw new Error("Invalid level / row / col");return 20+s*this.storageInfo.recordSize+44}_getTileEndAndContentType(e,t){const i=e.subarray(t,t+8);let r,s=0;for(r=0;r<5;r++)s|=(255&i[r])<<8*r;const n=0xffffffffff&s;for(s=0,r=5;r<8;r++)s|=(255&i[r])<<8*(r-5);return{position:n,recordSize:0xffffffffff&s}}_toHexString4(e){let t=e.toString(16);if(4!==t.length){let e=4-t.length;for(;e-- >0;)t="0"+t}return t}};(0,r._)([(0,h.Cb)({readOnly:!0})],Ie.prototype,"storageInfo",void 0),(0,r._)([(0,h.Cb)({type:String,json:{write:!0}})],Ie.prototype,"datasetFormat",void 0),Ie=(0,r._)([(0,y.j)("esri.layers.support.rasterDatasets.CloudRaster")],Ie);const be=Ie;var we=i(80442),_e=i(15612);let Se=class extends V{constructor(){super(...arguments),this.datasetFormat="MEMORY",this.data=null}async open(e){await this.init();const t=this.data,{pixelBlock:i,statistics:r,histograms:s,name:n,keyProperties:a,nativeExtent:o,transform:l}=this.data,{width:c,height:u,pixelType:f}=i,h=t.extent??new U.Z({xmin:-.5,ymin:.5,xmax:c-.5,ymax:u-.5,spatialReference:new ie.Z({wkid:3857})}),d=t.isPseudoSpatialReference??!t.extent,p={x:h.width/c,y:h.height/u},m=new he.Z({width:c,height:u,pixelType:f,extent:h,nativeExtent:o,transform:l,pixelSize:p,spatialReference:h.spatialReference,bandCount:3,keyProperties:a||{},statistics:r,isPseudoSpatialReference:d,histograms:s});this.createRemoteDatasetStorageInfo(m,512,512),this._set("rasterInfo",m),this.updateTileInfo(),await this._buildInMemoryRaster(i,{width:512,height:512},e),this.datasetName=n,this.url="/InMemory/"+n}fetchRawTile(e,t,i,r={}){const s=this._pixelBlockTiles.get(`${e}/${t}/${i}`);return Promise.resolve(s)}async _buildInMemoryRaster(e,t,i){const r=this.rasterInfo.storageInfo.maximumPyramidLevel,s=this.rasterJobHandler?this.rasterJobHandler.split({pixelBlock:e,tileSize:t,maximumPyramidLevel:r},i):Promise.resolve((0,j.Vl)(e,t,r)),n=(0,l.pC)(this.rasterInfo.statistics),o=(0,l.pC)(this.rasterInfo.histograms),c=n?Promise.resolve({statistics:null,histograms:null}):this.rasterJobHandler?this.rasterJobHandler.estimateStatisticsHistograms({pixelBlock:e},i):Promise.resolve((0,_e.Hv)(e)),f=await(0,u.as)([s,c]);if(!f[0].value&&f[1].value)throw new a.Z("inmemory-raster:open","failed to build in memory raster");this._pixelBlockTiles=f[0].value,n||(this.rasterInfo.statistics=f[1].value?.statistics),o||(this.rasterInfo.histograms=f[1].value?.histograms)}};(0,r._)([(0,h.Cb)({type:String,json:{write:!0}})],Se.prototype,"datasetFormat",void 0),(0,r._)([(0,h.Cb)()],Se.prototype,"data",void 0),Se=(0,r._)([(0,y.j)("esri.layers.support.rasterDatasets.InMemoryRaster")],Se);const ve=Se;function Re(e,t){if(!e||!t)return[];let i=t;t.includes("/")?(i=t.slice(0,t.indexOf("/")),t=t.slice(t.indexOf("/")+1)):t="";const r=[];if(t){const s=Re(e,i);for(let e=0;e<s.length;e++)Re(s[e],t).forEach((e=>r.push(e)));return r}const s=e.getElementsByTagNameNS("*",i);if(!s||0===s.length)return[];for(let e=0;e<s.length;e++)r.push(s[e]||s.item[e]);return r}function Ce(e,t){if(!e||!t)return null;let i=t;t.includes("/")?(i=t.slice(0,t.indexOf("/")),t=t.slice(t.indexOf("/")+1)):t="";const r=Re(e,i);return r.length>0?t?Ce(r[0],t):r[0]:null}function Te(e,t=null){const i=t?Ce(e,t):e;let r;return i?(r=i.textContent||i.nodeValue,r?r.trim():null):null}function ke(e,t){return function(e,t){const i=Re(e,t),r=[];let s;for(let e=0;e<i.length;e++)s=i[e].textContent||i[e].nodeValue,s&&(s=s.trim(),""!==s&&r.push(s));return r}(e,t).map((e=>Number(e)))}function Fe(e,t){const i=Te(e,t);return Number(i)}function Pe(e,t){const i=e?.nodeName?.toLowerCase(),r=t.toLowerCase();return i.slice(i.lastIndexOf(":")+1)===r}var Me=i(87390);function Oe(e,t){if(!e||!t)return null;const i=[];for(let r=0;r<e.length;r++)i.push(e[r]),i.push(t[r]);return i}function Be(e){if(!e)return null;let t=Number(e);if(!isNaN(t)&&0!==t)return new ie.Z({wkid:t});if((e=String(e)).startsWith("COMPD_CS")){if(!e.includes("VERTCS")||!e.includes("GEOGCS")&&!e.startsWith("PROJCS"))return null;const i=e.indexOf("VERTCS"),r=e.indexOf("PROJCS"),s=r>-1?r:e.indexOf("GEOGCS");if(-1===s)return null;const n=e.slice(s,e.lastIndexOf("]",i)+1).trim(),a=e.slice(i,e.lastIndexOf("]")).trim();t=De(n);const o=new ie.Z(t?{wkid:t}:{wkt:n}),l=De(a);return l&&(o.vcsWkid=l),o}return e.startsWith("GEOGCS")||e.startsWith("PROJCS")?(t=De(e),new ie.Z(0!==t?{wkid:t}:{wkt:e})):null}function De(e){const t=e.replace(/\]/g,"[").replace(/\"/g,"").split("[").map((e=>e.trim())).filter((e=>""!==e)),i=t[t.length-1].split(","),r=i[0]?.toLowerCase();if(("epsg"===r||"esri"===r)&&e.endsWith('"]]')){const e=Number(i[1]);if(!isNaN(e)&&0!==e)return e}return 0}function ze(e){if("pamdataset"!==e?.documentElement.tagName?.toLowerCase())return{};const t={spatialReference:null,transform:null,metadata:{},rasterBands:[],statistics:null,histograms:null};e.documentElement.childNodes.forEach((e=>{if(1===e.nodeType)if(Pe(e,"SRS")){if(!t.spatialReference){const i=Te(e);t.spatialReference=Be(i)}}else if(Pe(e,"Metadata"))if("xml:ESRI"===e.getAttribute("domain")){const{spatialReference:i,transform:r}=function(e){const t=Ce(e,"GeodataXform"),i=Be(Fe(t,"SpatialReference/WKID")||Te(t,"SpatialReference/WKT"));if("typens:PolynomialXform"!==t.getAttribute("xsi:type"))return{spatialReference:i,transform:null};const r=Fe(t,"PolynomialOrder")??1,s=ke(t,"CoeffX/Double"),n=ke(t,"CoeffY/Double"),a=ke(t,"InverseCoeffX/Double"),o=ke(t,"InverseCoeffY/Double"),l=Oe(s,n),c=Oe(a,o);return{spatialReference:i,transform:l&&c&&l.length&&c.length?new Me.Z({spatialReference:i,polynomialOrder:r,forwardCoefficients:l,inverseCoefficients:c}):null}}(e);t.transform=r,t.spatialReference||(t.spatialReference=i)}else Re(e,"MDI").forEach((e=>t.metadata[e.getAttribute("key")]=Te(e)));else if(Pe(e,"PAMRasterBand")){const i=function(e){const t=Fe(e,"NoDataValue"),i=Ce(e,"Histograms/HistItem"),r=Fe(i,"HistMin"),s=Fe(i,"HistMax"),n=Fe(i,"BucketCount"),a=Te(i,"HistCounts")?.split("|").map((e=>Number(e)));let o,l,c,u;Re(e,"Metadata/MDI").forEach((e=>{const t=Number(e.textContent??e.nodeValue);switch(e.getAttribute("key").toUpperCase()){case"STATISTICS_MINIMUM":o=t;break;case"STATISTICS_MAXIMUM":l=t;break;case"STATISTICS_MEAN":c=t;break;case"STATISTICS_STDDEV":u=t}}));const f=Fe(e,"Metadata/SourceBandIndex");return{noDataValue:t,histogram:a?.length&&null!=r&&null!=s?{min:r,max:s,size:n||a.length,counts:a}:null,sourceBandIndex:f,statistics:null!=o&&null!=l?{min:o,max:l,avg:c,stddev:u}:null}}(e);null!=i.sourceBandIndex&&null==t.rasterBands[i.sourceBandIndex]?t.rasterBands[i.sourceBandIndex]=i:t.rasterBands.push(i)}}));const i=t.rasterBands;if(i.length){const e=!!i[0].statistics;t.statistics=e?i.map((e=>e.statistics)).filter(l.pC):null;const r=!!i[0].histogram;t.histograms=r?i.map((e=>e.histogram)).filter(l.pC):null}return t}let Je=class extends V{async open(e){await this.init();const t=await this._fetchData(e);let{spatialReference:i,statistics:r,histograms:s,transform:n}=await this._fetchAuxiliaryData(e);const a=!i;a&&(i=new ie.Z({wkid:3857})),s?.length&&null==r&&(r=(0,_e.Oh)(s));const{width:o,height:l}=t;let c=new U.Z({xmin:-.5,ymin:.5-l,xmax:o-.5,ymax:.5,spatialReference:i});const u=n?n.forwardTransform(c):c;let f=!0;if(n){const e=n.forwardCoefficients;f=e&&0===e[1]&&0===e[2],f&&(n=null,c=u)}const h=new ve({data:{extent:u,nativeExtent:c,transform:n,pixelBlock:t,statistics:r,histograms:s,keyProperties:{DateType:"Processed"},isPseudoSpatialReference:a}});await h.open(),h.data=null,this._set("rasterInfo",h.rasterInfo),this._inMemoryRaster=h}fetchRawTile(e,t,i,r={}){return this._inMemoryRaster.fetchRawTile(e,t,i,r)}async _fetchData(e){const{data:t}=await this.request(this.url,{responseType:"array-buffer",signal:e?.signal}),i=(0,q.y)(t).toUpperCase();if("JPG"!==i&&"PNG"!==i&&"GIF"!==i&&"BMP"!==i)throw new a.Z("image-aux-raster:open","the data is not a supported format");this._set("datasetFormat",i);const r=i.toLowerCase(),s="gif"===r||"bmp"===r||!(0,we.Z)("ios"),n=await this.decodePixelBlock(t,{format:r,useCanvas:s,hasNoZlibMask:!0});if(null==n)throw new a.Z("image-aux-raster:open","the data cannot be decoded");return n}async _fetchAuxiliaryData(e){const t=(0,l.Wg)(e?.signal),i=this.ioConfig.skipExtensions??[],r=i.includes("aux.xml")?null:this.request(this.url+".aux.xml",{responseType:"xml",signal:t}),s=this.datasetFormat,n="JPG"===s?"jgw":"PNG"===s?"pgw":"BMP"===s?"bpw":null,a=n&&i.includes(n)?null:this.request(this.url.slice(0,this.url.lastIndexOf("."))+"."+n,{responseType:"text",signal:t}),o=await(0,u.as)([r,a]);if(t?.aborted)throw(0,u.zE)();const c=ze(o[0].value?.data);if(!c.transform){const e=o[1].value?o[1].value.data.split("\n").slice(0,6).map((e=>Number(e))):null;c.transform=6===e?.length?new Me.Z({forwardCoefficients:[e[4],e[5],e[0],-e[1],e[2],-e[3]]}):null}return c}};(0,r._)([(0,h.Cb)({type:String,json:{write:!0}})],Je.prototype,"datasetFormat",void 0),Je=(0,r._)([(0,y.j)("esri.layers.support.rasterDatasets.ImageAuxRaster")],Je);const Ne=Je;var Ze=i(17452),We=i(45322),Ee=i(56608),He=i(29680),Ae=i(26059);let Le=class extends V{constructor(){super(...arguments),this._levelOffset=0,this._tilemapCache=null,this._slices=null,this.datasetFormat="RasterTileServer",this.tileType=null}async open(e){await this.init();const t=e&&e.signal,i=this.sourceJSON?{data:this.sourceJSON}:await this.request(this.url,{query:{f:"json"},signal:t});i.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));const r=i.data;if(this.sourceJSON=r,!r)throw new a.Z("imageserverraster:open","cannot initialize tiled image service, missing service info");if(!r.tileInfo)throw new a.Z("imageserverraster:open","use ImageryLayer to open non-tiled image services");this._fixScaleInServiceInfo(),this.tileType=r.cacheType,null==this.tileType&&(["jpg","jpeg","png","png8","png24","png32","mixed"].includes(r.tileInfo.format.toLowerCase())?this.tileType="Map":"lerc"===r.tileInfo.format.toLowerCase()?this.tileType="Elevation":this.tileType="Raster"),this.datasetName=r.name?.slice(r.name.indexOf("/")+1)??"";const s=await this._fetchRasterInfo({signal:t});if((0,l.Wi)(s))throw new a.Z("image-server-raster:open","cannot initialize image service");const n="Map"===this.tileType?(0,We.d)(r.tileInfo,r):F.Z.fromJSON(r.tileInfo);(0,l.O3)(n);const[o,c]=this._computeMinMaxLOD(s,n),{extent:u,pixelSize:f}=s,h=.5/s.width*f.x,d=Math.max(f.x,f.y),{lods:p}=n;("Map"!==this.tileType&&0!==r.maxScale||Math.abs(f.x-f.y)>h||!p.some((e=>Math.abs(e.resolution-d)<h)))&&(f.x=f.y=o.resolution,s.width=Math.ceil((u.xmax-u.xmin)/f.x-.1),s.height=Math.ceil((u.ymax-u.ymin)/f.y-.1));const m=o.level-c.level,[y,g]=n.size,x=[];p.forEach((e=>{e.level>=c.level&&e.level<=o.level&&x.push({x:e.resolution,y:e.resolution})})),x.sort(((e,t)=>e.x-t.x));const I=this.computeBlockBoundary(u,y,g,n.origin,x,m),b=x.length>1?x.slice(1):null;let w;if(r.transposeInfo&&(w={tileSize:[r.transposeInfo.rows,r.transposeInfo.cols],packetSize:s.keyProperties?._yxs.PacketSize??0}),s.storageInfo=new B.Z({blockWidth:n.size[0],blockHeight:n.size[1],pyramidBlockWidth:n.size[0],pyramidBlockHeight:n.size[1],pyramidResolutions:b,compression:n.format,origin:n.origin,firstPyramidLevel:1,maximumPyramidLevel:m,tileInfo:n,transposeInfo:w,blockBoundary:I}),this._fixGCSShift(s),this._set("rasterInfo",s),r.capabilities.toLowerCase().includes("tilemap")){const e={tileInfo:s.storageInfo.tileInfo,parsedUrl:(0,Ze.mN)(this.url),url:this.url,tileServers:[],type:"tile"};this._tilemapCache=new Ee.y({layer:e})}}async fetchRawTile(e,t,i,r={}){const{storageInfo:s,extent:n}=this.rasterInfo,{transposeInfo:a}=s,o=(0,l.pC)(a)&&!!r.transposedVariableName;if(this._slices&&!o&&null==r.sliceId)return null;const c=o?0:s.maximumPyramidLevel-e+this._levelOffset,u=`${this.url}/tile/${c}/${t}/${i}`,f=this._slices?o?{variable:r.transposedVariableName}:{sliceId:r.sliceId||0}:null,{data:h}=await this.request(u,{query:f,responseType:"array-buffer",signal:r.signal});if(!h)return null;const d=o?a.tileSize:s.tileInfo.size,p=await this.decodePixelBlock(h,{width:d[0],height:d[1],planes:null,pixelType:null,isPoint:"Elevation"===this.tileType,returnInterleaved:o});if(null==p)return null;const m=s.blockBoundary[e];if("jpg"!==s.compression||i>m.minCol&&i<m.maxCol&&t>m.minRow&&t<m.maxRow)return p;const{origin:y,blockWidth:g,blockHeight:x}=s,{x:I,y:b}=this.getPyramidPixelSize(e),w=Math.round((n.xmin-y.x)/I)%g,_=Math.round((n.xmax-y.x)/I)%g||g,S=Math.round((y.y-n.ymax)/b)%x,v=Math.round((y.y-n.ymin)/b)%x||x,R=i===m.minCol?w:0,C=t===m.minRow?S:0,T=i===m.maxCol?_:g,k=t===m.maxRow?v:x;return(0,j.pW)(p,{x:R,y:C},{width:T-R,height:k-C}),p}getSliceIndex(e){if(!this._slices||(0,l.Wi)(e)||0===e.length)return null;const t=e;for(let e=0;e<this._slices.length;e++){const i=this._slices[e].multidimensionalDefinition;if(i.length===t.length&&!i.some((e=>{const i=t.find((t=>e.variableName===t.variableName&&t.dimensionName===e.dimensionName));return!i||(Array.isArray(e.values[0])?`${e.values[0][0]}-${e.values[0][1]}`:e.values[0])!==(Array.isArray(i.values[0])?`${i.values[0][0]}-${i.values[0][1]}`:i.values[0])})))return e}return null}async fetchVariableStatisticsHistograms(e,t){const i=this.request(this.url+"/statistics",{query:{variable:e,f:"json"},signal:t}).then((e=>e.data?.statistics)),r=this.request(this.url+"/histograms",{query:{variable:e,f:"json"},signal:t}).then((e=>e.data?.histograms)),s=await Promise.all([i,r]);return s[0]&&s[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:s[0]||null,histograms:s[1]||null}}async computeBestPyramidLevelForLocation(e,t={}){if(!this._tilemapCache)return 0;let i=this.identifyPixelLocation(e,0,(0,l.Wg)(t.datumTransformation));if(null===i)return null;let r=0;const{maximumPyramidLevel:s}=this.rasterInfo.storageInfo;let n=s-r+this._levelOffset;const a=i.srcLocation;for(;n>=0;){try{if("available"===await this._tilemapCache.fetchAvailability(n,i.row,i.col,t))break}catch{}if(n--,r++,i=this.identifyPixelLocation(a,r,(0,l.Wg)(t.datumTransformation)),null===i)return null}return-1===n||null==i?null:r}async _fetchRasterInfo(e){const t=this.sourceJSON;if("Map"===this.tileType){const e=t.fullExtent||t.extent,i=Math.ceil((e.xmax-e.xmin)/t.pixelSizeX-.1),r=Math.ceil((e.ymax-e.ymin)/t.pixelSizeY-.1),s=ie.Z.fromJSON(t.spatialReference||e.spatialReference),n=new J.Z({x:t.pixelSizeX,y:t.pixelSizeY,spatialReference:s});return new he.Z({width:i,height:r,bandCount:3,extent:U.Z.fromJSON(e),spatialReference:s,pixelSize:n,pixelType:"u8",statistics:null,keyProperties:{DataType:"processed"}})}const{signal:i}=e,r=(0,Ae.g)(this.url,this.sourceJSON,{signal:i,query:this.ioConfig.customFetchParameters}),s=t.hasMultidimensions?this.request(`${this.url}/slices`,{query:{f:"json"},signal:i}).then((e=>e.data&&e.data.slices)).catch((()=>null)):null,n=await Promise.all([r,s]);return this._slices=n[1],n[0]}_fixScaleInServiceInfo(){const{sourceJSON:e}=this;e.minScale&&e.minScale<0&&(e.minScale=0),e.maxScale&&e.maxScale<0&&(e.maxScale=0)}_fixGCSShift(e){const{extent:t,spatialReference:i}=e;t.xmin>-1&&t.xmax>181&&i?.wkid&&i.isGeographic&&(e.nativeExtent=e.extent,e.transform=new He.Z,e.extent=e.transform.forwardTransform(t))}_computeMinMaxLOD(e,t){const{pixelSize:i}=e,r=.5/e.width*i.x,{lods:s}=t,n=t.lodAt(Math.max.apply(null,s.map((e=>e.level)))),a=t.lodAt(Math.min.apply(null,s.map((e=>e.level)))),{tileType:o}=this;if("Map"===o)return this._levelOffset=s[0].level,[n,a];if("Raster"===o)return[s.find((e=>e.resolution===i.x))??n,a];const{minScale:l,maxScale:c}=this.sourceJSON;let u=n;c>0&&(u=s.find((e=>Math.abs(e.scale-c)<r)),u||(u=s.filter((e=>e.scale>c)).sort(((e,t)=>e.scale>t.scale?1:-1))[0]??n));let f=a;return l>0&&(f=s.find((e=>Math.abs(e.scale-l)<r))??a,this._levelOffset=f.level-a.level),[u,f]}};(0,r._)([(0,h.Cb)({type:String,json:{write:!0}})],Le.prototype,"datasetFormat",void 0),(0,r._)([(0,h.Cb)()],Le.prototype,"tileType",void 0),Le=(0,r._)([(0,y.j)("esri.layers.support.rasterDatasets.ImageServerRaster")],Le);const qe=Le;var je=i(5847),Ge=i(48279);const Ue=new Map;Ue.set("Int8","s8"),Ue.set("UInt8","u8"),Ue.set("Int16","s16"),Ue.set("UInt16","u16"),Ue.set("Int32","s32"),Ue.set("UInt32","u32"),Ue.set("Float32","f32"),Ue.set("Float64","f32"),Ue.set("Double64","f32");const $e=new Map;$e.set("none",{blobExtension:".til",isOneSegment:!0,decoderFormat:"bip"}),$e.set("lerc",{blobExtension:".lrc",isOneSegment:!1,decoderFormat:"lerc"}),$e.set("deflate",{blobExtension:".pzp",isOneSegment:!0,decoderFormat:"deflate"}),$e.set("jpeg",{blobExtension:".pjg",isOneSegment:!0,decoderFormat:"jpg"});let Ve=class extends V{constructor(){super(...arguments),this._files=null,this._storageIndex=null,this.datasetFormat="MRF"}async open(e){await this.init(),this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const t=e?(0,l.Wg)(e.signal):null,i=await this.request(this.url,{responseType:"xml",signal:t}),{rasterInfo:r,files:s}=this._parseHeader(i.data);if(-1===this.ioConfig.skipExtensions?.indexOf("aux.xml")){const t=await this._fetchAuxiliaryData(e);null!=t&&(r.statistics=t.statistics??r.statistics,r.histograms=t.histograms,t.histograms&&(0,l.Wi)(r.statistics)&&(r.statistics=(0,_e.Oh)(t.histograms)))}this._set("rasterInfo",r),this._files=s;const n=await this.request(s.index,{responseType:"array-buffer",signal:t});this._storageIndex=this._parseIndex(n.data);const{blockWidth:a,blockHeight:o}=this.rasterInfo.storageInfo,c=this.rasterInfo.storageInfo.pyramidScalingFactor,{width:u,height:f}=this.rasterInfo,h=[],d=this._getBandSegmentCount();let p=0,m=-1;for(;p<this._storageIndex.length;){m++;const e=Math.ceil(u/a/c**m)-1,t=Math.ceil(f/o/c**m)-1;p+=(e+1)*(t+1)*d*4,h.push({maxRow:t,maxCol:e,minCol:0,minRow:0})}this.rasterInfo.storageInfo.blockBoundary=h,m>0&&(this.rasterInfo.storageInfo.firstPyramidLevel=1,this.rasterInfo.storageInfo.maximumPyramidLevel=m),this.updateTileInfo()}async fetchRawTile(e,t,i,r={}){const{blockWidth:s,blockHeight:n,blockBoundary:a}=this.rasterInfo.storageInfo,o=a[e];if(!o||o.maxRow<t||o.maxCol<i||o.minRow>t||o.minCol>i)return null;const{bandCount:c,pixelType:u}=this.rasterInfo,{ranges:f,actualTileWidth:h,actualTileHeight:d}=this._getTileLocation(e,t,i);if(!f||0===f.length)return null;if(0===f[0].from&&0===f[0].to){const e=new Uint8Array(s*n);return new je.Z({width:s,height:n,pixels:null,mask:e,validPixelCount:0})}const{bandIds:p}=this.ioConfig,m=this._getBandSegmentCount(),y=[];let g=0;for(g=0;g<m;g++)(!p||p.indexOf[g]>-1)&&y.push(this.request(this._files.data,{range:{from:f[g].from,to:f[g].to},responseType:"array-buffer",signal:r.signal}));const x=await Promise.all(y),I=x.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),b=new Uint8Array(I);let w=0;for(g=0;g<m;g++)b.set(new Uint8Array(x[g].data),w),w+=x[g].data.byteLength;const _=$e.get(this.rasterInfo.storageInfo.compression).decoderFormat,S=await this.decodePixelBlock(b.buffer,{width:s,height:n,format:_,planes:p?.length||c,pixelType:u});if(null==S)return null;if((0,l.pC)(this.rasterInfo.noDataValue)&&"lerc"!==_&&!S.mask){const e=this.rasterInfo.noDataValue[0];if(null!=e){const t=S.width*S.height,i=new Uint8Array(t);if(Math.abs(e)>1e24)for(g=0;g<t;g++)Math.abs((S.pixels[0][g]-e)/e)>1e-6&&(i[g]=1);else for(g=0;g<t;g++)S.pixels[0][g]!==e&&(i[g]=1);S.mask=i}}let v=0,R=0;if(h!==s||d!==n){let e=S.mask;if(e)for(g=0;g<n;g++)if(R=g*s,g<d)for(v=h;v<s;v++)e[R+v]=0;else for(v=0;v<s;v++)e[R+v]=0;else for(e=new Uint8Array(s*n),S.mask=e,g=0;g<d;g++)for(R=g*s,v=0;v<h;v++)e[R+v]=1}return S}_parseIndex(e){if(e.byteLength%16>0)throw new Error("invalid array buffer must be multiples of 16");let t,i,r,s,n,a;if(Ge.f){for(i=new Uint8Array(e),s=new ArrayBuffer(e.byteLength),r=new Uint8Array(s),n=0;n<e.byteLength/4;n++)for(a=0;a<4;a++)r[4*n+a]=i[4*n+3-a];t=new Uint32Array(s)}else t=new Uint32Array(e);return t}_getBandSegmentCount(){return $e.get(this.rasterInfo.storageInfo.compression).isOneSegment?1:this.rasterInfo.bandCount}_getTileLocation(e,t,i){const{blockWidth:r,blockHeight:s,pyramidScalingFactor:n}=this.rasterInfo.storageInfo,{width:a,height:o}=this.rasterInfo,l=this._getBandSegmentCount();let c,u,f,h=0,d=0;for(f=0;f<e;f++)d=n**f,c=Math.ceil(a/r/d),u=Math.ceil(o/s/d),h+=c*u;d=n**e,c=Math.ceil(a/r/d),u=Math.ceil(o/s/d),h+=t*c+i,h*=4*l;const p=this._storageIndex.subarray(h,h+4*l);let m=0,y=0;const g=[];for(let e=0;e<l;e++)m=p[4*e+0]*2**32+p[4*e+1],y=m+p[4*e+2]*2**32+p[4*e+3],g.push({from:m,to:y});return{ranges:g,actualTileWidth:i<c-1?r:Math.ceil(a/d)-r*(c-1),actualTileHeight:t<u-1?s:Math.ceil(o/d)-s*(u-1)}}_parseHeader(e){const t=Ce(e,"MRF_META/Raster");if(!t)throw new a.Z("mrf:open","not a valid MRF format");const i=Ce(t,"Size"),r=parseInt(i.getAttribute("x"),10),s=parseInt(i.getAttribute("y"),10),n=parseInt(i.getAttribute("c"),10),o=(Te(t,"Compression")||"none").toLowerCase();if(!$e.has(o))throw new a.Z("mrf:open","currently does not support compression "+o);const l=Te(t,"DataType")||"UInt8",c=Ue.get(l);if(null==c)throw new a.Z("mrf:open","currently does not support pixel type "+l);const u=Ce(t,"PageSize"),f=parseInt(u.getAttribute("x"),10),h=parseInt(u.getAttribute("y"),10),d=Ce(t,"DataValues");let p,m;if(d&&(m=d.getAttribute("NoData"),null!=m&&(p=m.trim().split(" ").map((e=>parseFloat(e))))),Ce(e,"MRF_META/CachedSource"))throw new a.Z("mrf:open","currently does not support MRF referencing other data files");const y=Ce(e,"MRF_META/GeoTags"),g=Ce(y,"BoundingBox");let x,I=!1;if(null!=g){const e=parseFloat(g.getAttribute("minx")),t=parseFloat(g.getAttribute("miny")),i=parseFloat(g.getAttribute("maxx")),r=parseFloat(g.getAttribute("maxy")),s=Te(y,"Projection")||"";let n=ie.Z.WGS84;if("LOCAL_CS[]"!==s)if(s.toLowerCase().startsWith("epsg:")){const e=Number(s.slice(5));isNaN(e)||0===e||(n=new ie.Z({wkid:e}))}else n=Be(s)??ie.Z.WGS84;else I=!0,n=new ie.Z({wkid:3857});x=new U.Z(e,t,i,r),x.spatialReference=n}else I=!0,x=new U.Z({xmin:-.5,ymin:.5-s,xmax:r-.5,ymax:.5,spatialReference:new ie.Z({wkid:3857})});const b=Ce(e,"MRF_META/Rsets"),w=parseInt(b&&b.getAttribute("scale")||"2",10),_=x.spatialReference,S=new B.Z({origin:new J.Z({x:x.xmin,y:x.ymax,spatialReference:_}),blockWidth:f,blockHeight:h,pyramidBlockWidth:f,pyramidBlockHeight:h,compression:o,pyramidScalingFactor:w}),v=new J.Z({x:x.width/r,y:x.height/s,spatialReference:_}),R=new he.Z({width:r,height:s,extent:x,isPseudoSpatialReference:I,spatialReference:_,bandCount:n,pixelType:c,pixelSize:v,noDataValue:p,storageInfo:S}),C=Te(e,"datafile"),T=Te(e,"IndexFile");return{rasterInfo:R,files:{mrf:this.url,index:T||this.url.replace(".mrf",".idx"),data:C||this.url.replace(".mrf",$e.get(o).blobExtension)}}}async _fetchAuxiliaryData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return ze(t)}catch{return null}}};(0,r._)([(0,h.Cb)()],Ve.prototype,"_files",void 0),(0,r._)([(0,h.Cb)()],Ve.prototype,"_storageIndex",void 0),(0,r._)([(0,h.Cb)({type:String,json:{write:!0}})],Ve.prototype,"datasetFormat",void 0),Ve=(0,r._)([(0,y.j)("esri.layers.support.rasterIO.MRFRaster")],Ve);const Xe=Ve;var Ye=i(94793),Ke=i(9832);const Qe=(e,t)=>e.get(t)?.values,et=(e,t)=>e.get(t)?.values?.[0];let tt=class extends V{constructor(){super(...arguments),this._files=null,this._headerInfo=null,this._bufferSize=1048576,this.datasetFormat="TIFF"}async open(e){await this.init();const t=e?(0,l.Wg)(e.signal):null,{data:i}=await this.request(this.url,{range:{from:0,to:this._bufferSize},responseType:"array-buffer",signal:t});if(!i)throw new a.Z("tiffraster:open","failed to open url "+this.url);this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1,this.url.lastIndexOf("."));const{littleEndian:r,firstIFDPos:s,isBigTiff:n}=(0,Ye.cK)(i),o=[];await this._readIFDs(o,i,r,s,0,n?8:4,t);const{imageInfo:c,rasterInfo:u}=this._parseIFDs(o),f=(0,Ye.ee)(o),h=(0,Ye.I7)(o);if(this._headerInfo={littleEndian:r,isBigTiff:n,ifds:o,pyramidIFDs:f,maskIFDs:h,...c},this._set("rasterInfo",u),!c.isSupported)throw new a.Z("tiffraster:open","this tiff is not supported: "+c.message);if(!c.tileWidth)throw new a.Z("tiffraster:open","none-tiled tiff is not optimized for access, convert to COG and retry.");const{skipExtensions:d=[]}=this.ioConfig;if(!d.includes("aux.xml")){const t=await this._fetchAuxiliaryMetaData(e);null!=t&&this._processPAMInfo(t,u)}d.includes("vat.dbf")||1!==u.bandCount||"u8"!==u.pixelType||(u.attributeTable=await this._fetchAuxiliaryTable(e),(0,l.pC)(u.attributeTable)&&(u.keyProperties.DataType="thematic")),this.updateTileInfo()}async fetchRawTile(e,t,i,r={}){if(!this._headerInfo?.isSupported||this.isBlockOutside(e,t,i))return null;const s=await this._fetchRawTiffTile(e,t,i,!1,r);if((0,l.pC)(s)&&this._headerInfo.hasMaskBand){const n=await this._fetchRawTiffTile(e,t,i,!0,r);(0,l.pC)(n)&&n.pixels[0]instanceof Uint8Array&&(s.mask=n.pixels[0])}return s}_parseIFDs(e){const t=(0,Ye.FI)(e),{width:i,height:r,tileWidth:s,tileHeight:n,planes:a,pixelType:o,compression:l,firstPyramidLevel:c,maximumPyramidLevel:u,pyramidBlockWidth:f,pyramidBlockHeight:h,tileBoundary:d,affine:p,metadata:m}=t;let y=Be(t.extent.spatialReference?.wkt||t.extent.spatialReference?.wkid),g=!!t.isPseudoGeographic;null==y&&(g=!0,y=new ie.Z({wkid:3857}));const x=new U.Z({...t.extent,spatialReference:y}),I=new J.Z(x?{x:x.xmin,y:x.ymax,spatialReference:y}:{x:0,y:0}),b=new B.Z({blockWidth:s,blockHeight:n,pyramidBlockWidth:f,pyramidBlockHeight:h,compression:l,origin:I,firstPyramidLevel:c,maximumPyramidLevel:u,blockBoundary:d}),w=new J.Z({x:(x.xmax-x.xmin)/i,y:(x.ymax-x.ymin)/r,spatialReference:y}),_=m?{BandProperties:m.bandProperties,DataType:m.dataType}:{};let S=null;const v=et(e[0],"PHOTOMETRICINTERPRETATION"),R=Qe(e[0],"COLORMAP");if(v<=3&&R?.length>3&&R.length%3==0){S=[];const e=R.length/3;for(let t=0;t<e;t++)S.push([t,R[t]>>>8,R[t+e]>>>8,R[t+2*e]>>>8])}const C=new he.Z({width:i,height:r,bandCount:a,pixelType:o,pixelSize:w,storageInfo:b,spatialReference:y,isPseudoSpatialReference:g,keyProperties:_,extent:x,colormap:S,statistics:m?m.statistics:null});return p?.length&&(C.nativeExtent=new U.Z({xmin:-.5,ymin:.5-r,xmax:i-.5,ymax:.5,spatialReference:y}),C.transform=new Me.Z({polynomialOrder:1,forwardCoefficients:[p[2]+p[0]/2,p[5]-p[3]/2,p[0],p[3],-p[1],-p[4]]}),C.extent=C.transform.forwardTransform(C.nativeExtent),C.pixelSize=new J.Z({x:(x.xmax-x.xmin)/i,y:(x.ymax-x.ymin)/r,spatialReference:y}),b.origin.x=-.5,b.origin.y=.5),{imageInfo:t,rasterInfo:C}}_processPAMInfo(e,t){if(t.statistics=e.statistics??t.statistics,t.histograms=e.histograms,e.histograms&&(0,l.Wi)(t.statistics)&&(t.statistics=(0,_e.Oh)(e.histograms)),e.transform&&(0,l.Wi)(t.transform)){t.transform=e.transform,t.nativeExtent=t.extent;const i=t.transform.forwardTransform(t.nativeExtent);t.pixelSize=new J.Z({x:(i.xmax-i.xmin)/t.width,y:(i.ymax-i.ymin)/t.height,spatialReference:t.spatialReference}),t.extent=i}t.isPseudoSpatialReference&&e.spatialReference&&(t.spatialReference=e.spatialReference)}async _readIFDs(e,t,i,r,s,n=4,a){if(!r)return null;(r>=t.byteLength||r<0)&&(t=(await this.request(this.url,{range:{from:r+s,to:r+s+this._bufferSize},responseType:"array-buffer",signal:a})).data,s=r+s,r=0);const o=await this._readIFD(t,i,r,s,Ke.Z.TIFF_TAGS,n,a);if(e.push(o.ifd),!o.nextIFD)return null;await this._readIFDs(e,t,i,o.nextIFD-s,s,n,a)}async _readIFD(e,t,i,r,s=Ke.Z.TIFF_TAGS,n=4,a){if(!e)return null;const o=(0,Ye.vr)(e,t,i,r,s,n);if(o.success){const i=[];if(o.ifd?.forEach((e=>{e.values||i.push(e)})),i.length>0){const s=i.map((e=>e.offlineOffsetSize)).filter(l.pC),n=Math.min.apply(null,s.map((e=>e[0])));if(Math.min.apply(null,s.map((e=>e[0]+e[1])))-n<=this._bufferSize){const{data:s}=await this.request(this.url,{range:{from:n,to:n+this._bufferSize},responseType:"array-buffer",signal:a});e=s,r=n,i.forEach((i=>(0,Ye.Dq)(e,t,i,r)))}}if(o.ifd?.has("GEOKEYDIRECTORY")){const i=o.ifd.get("GEOKEYDIRECTORY"),s=i?.values;if(s&&s.length>4){const n=s[0]+"."+s[1]+"."+s[2],o=await this._readIFD(e,t,i.valueOffset+6-r,r,Ke.Z.GEO_KEYS,2,a);i.data=o.ifd,i.data&&i.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[n]})}}return o}if(o.requiredBufferSize&&o.requiredBufferSize!==e.byteLength){const i=await this.request(this.url,{range:{from:r,to:r+o.requiredBufferSize+4},responseType:"array-buffer",signal:a});return(e=i.data).byteLength<o.requiredBufferSize?null:this._readIFD(e,t,0,r,Ke.Z.TIFF_TAGS,4,a)}}async _fetchRawTiffTile(e,t,i,r,s={}){const n=this._getTileLocation(e,t,i,r);if(!n)return null;const{ranges:a,actualTileWidth:o,actualTileHeight:l,ifd:c}=n,u=a.map((e=>this.request(this.url,{range:e,responseType:"array-buffer",signal:s.signal}))),f=await Promise.all(u),h=f.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),d=1===f.length?f[0].data:new ArrayBuffer(h),p=[0],m=[0];if(f.length>1){const e=new Uint8Array(d);for(let t=0,i=0;t<f.length;t++){const r=f[t].data;e.set(new Uint8Array(r),i),p[t]=i,i+=r.byteLength,m[t]=r.byteLength}}const{blockWidth:y,blockHeight:g}=this.getBlockWidthHeight(e),x=await this.decodePixelBlock(d,{format:"tiff",customOptions:{headerInfo:this._headerInfo,ifd:c,offsets:p,sizes:m},width:y,height:g,planes:null,pixelType:null});if(null==x)return null;let I,b,w;if(o!==y||l!==g){let e=x.mask;if(e)for(I=0;I<g;I++)if(w=I*y,I<l)for(b=o;b<y;b++)e[w+b]=0;else for(b=0;b<y;b++)e[w+b]=0;else for(e=new Uint8Array(y*g),x.mask=e,I=0;I<l;I++)for(w=I*y,b=0;b<o;b++)e[w+b]=1}return x}_getTileLocation(e,t,i,r=!1){const{firstPyramidLevel:s,blockBoundary:n}=this.rasterInfo.storageInfo,a=0===e?0:e-(s-1),{_headerInfo:o}=this;if(!o)return null;const l=r?o.maskIFDs[a]:0===a?o?.ifds[0]:o?.pyramidIFDs[a-1];if(!l)return null;const c=(0,Ye.If)(l,o),u=Qe(l,"TILEOFFSETS");if(void 0===u)return null;const f=Qe(l,"TILEBYTECOUNTS"),{minRow:h,minCol:d,maxRow:p,maxCol:m}=n[a];if(t>p||i>m||t<h||i<d)return null;const y=et(l,"IMAGEWIDTH"),g=et(l,"IMAGELENGTH"),x=et(l,"TILEWIDTH"),I=et(l,"TILELENGTH"),b=c?this.rasterInfo.bandCount:1,w=b*t*(m+1)+i,_=[{from:u[w],to:u[w+b-1]+f[w+b-1]-1}];if(c){let e=!0;for(let t=0;t<b;t++)if(u[w+t]+f[w+t]!==u[w+t+1]){e=!1;break}if(!e)for(let e=0;e<b;e++)_[e]={from:u[w+e],to:u[w+e]+f[w+e]-1}}const S=u[w],v=f[w];return null==S||null==v?null:{ranges:_,ifd:l,actualTileWidth:i===m&&y%x||x,actualTileHeight:t===p&&g%I||I}}async _fetchAuxiliaryMetaData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return ze(t)}catch{return null}}async _fetchAuxiliaryTable(e){try{const{data:t}=await this.request(this.url+".vat.dbf",{responseType:"array-buffer",signal:e?.signal}),i=me.parse(t);return i?.recordSet?ge.Z.fromJSON(i.recordSet):null}catch{return null}}};(0,r._)([(0,h.Cb)()],tt.prototype,"_files",void 0),(0,r._)([(0,h.Cb)()],tt.prototype,"_headerInfo",void 0),(0,r._)([(0,h.Cb)()],tt.prototype,"_bufferSize",void 0),(0,r._)([(0,h.Cb)({type:String,json:{write:!0}})],tt.prototype,"datasetFormat",void 0),tt=(0,r._)([(0,y.j)("esri.layers.support.rasterDatasets.TIFFRaster")],tt);const it=tt,rt=new Map;rt.set("CRF",{desc:"Cloud Raster Format",constructor:be}),rt.set("MRF",{desc:"Meta Raster Format",constructor:Xe}),rt.set("TIFF",{desc:"GeoTIFF",constructor:it}),rt.set("RasterTileServer",{desc:"Raster Tile Server",constructor:qe}),rt.set("JPG",{desc:"JPG Raster Format",constructor:Ne}),rt.set("PNG",{desc:"PNG Raster Format",constructor:Ne}),rt.set("GIF",{desc:"GIF Raster Format",constructor:Ne}),rt.set("BMP",{desc:"BMP Raster Format",constructor:Ne});class st{static get supportedFormats(){const e=new Set;return rt.forEach(((t,i)=>e.add(i))),e}static async open(e){const{url:t,ioConfig:i,sourceJSON:r}=e;let s=e.datasetFormat;null==s&&t.lastIndexOf(".")&&(s=t.slice(t.lastIndexOf(".")+1).toUpperCase()),"OVR"===s||"TIF"===s?s="TIFF":"JPG"!==s&&"JPEG"!==s&&"JFIF"!==s||(s="JPG"),t.toLowerCase().includes("/imageserver")&&!t.toLowerCase().includes("/wcsserver")&&(s="RasterTileServer");const n={url:t,sourceJSON:r,datasetFormat:s,ioConfig:i??{bandIds:null,sampling:null}};let o,l;if(s&&this.supportedFormats.has(s)){if("CRF"===s&&!i?.enableCRF)throw new a.Z("rasterfactory:open",`cannot open raster: ${t}`);return o=rt.get(s).constructor,l=new o(n),await l.open({signal:e.signal}),l}if(s)throw new a.Z("rasterfactory:open","not a supported format "+s);const c=Array.from(rt.keys());let u=0;const f=()=>(s=c[u++],s&&("CRF"!==s||i?.enableCRF)?(o=rt.get(s).constructor,l=new o(n),l.open({signal:e.signal}).then((()=>l)).catch((()=>f()))):null);return f()}static register(e,t,i){rt.has(e.toUpperCase())||rt.set(e.toUpperCase(),{desc:t,constructor:i})}}var nt=i(32163);let at=class extends((0,I.h)((0,le.M)((0,ne.q)((0,ae.I)((0,b.N)(se((0,ce.n)((0,x.Y)((0,oe.Q)((0,c.R)(g.Z))))))))))){constructor(...e){super(...e),this._primaryRaster=null,this.bandIds=null,this.interpolation=null,this.legendEnabled=!0,this.isReference=null,this.listMode="show",this.sourceJSON=null,this.version=null,this.type="imagery-tile",this.operationalLayerType="ArcGISTiledImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.fields=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=(0,l.pC)(e)?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(u.r9).then((()=>this._openRaster(t)))),Promise.resolve(this)}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){let e=[new ue.Z({name:"Raster.ServicePixelValue",alias:"Pixel Value",domain:null,editable:!1,length:50,type:"string"})];const{rasterInfo:t}=this,i=t?.attributeTable,r=(0,l.pC)(i)?i.fields:null;if(r){const t=r.filter((e=>"oid"!==e.type&&"value"!==e.name.toLowerCase())).map((e=>{const t=e.clone();return t.name="Raster."+e.name,t}));e=e.concat(t)}const s=t?.dataType,n=t?.multidimensionalInfo;if(("vector-magdir"===s||"vector-uv"===s)&&(0,l.pC)(n)){const t=n.variables[0].unit?.trim(),i="Magnitude"+(t?` (${t})`:"");e.push(new ue.Z({name:"Raster.Magnitude",alias:i,domain:null,editable:!1,type:"double"})),e.push(new ue.Z({name:"Raster.Direction",alias:"Direction (°)",domain:null,editable:!1,type:"double"}))}return e}set renderer(e){this._set("renderer",e),this.updateRenderer()}readRenderer(e,t,i){const r=t&&t.layerDefinition&&t.layerDefinition.drawingInfo&&t.layerDefinition.drawingInfo.renderer,s=(0,n.ij)(r,i)||void 0;if(null!=s)return s}createPopupTemplate(e){return(0,nt.eZ)({fields:this.rasterFields,title:this.title},e)}async generateRasterInfo(e,t){if(!e)return this._primaryRaster.rasterInfo;try{const i=(0,K.Ue)(e.toJSON(),{raster:this._primaryRaster}),r=new Y({rasterFunction:i});return await r.open(t),r.rasterInfo}catch{return null}}write(e,t){const{raster:i}=this;if(this.loaded?"RasterTileServer"===i.datasetFormat&&("Raster"===i.tileType||"Map"===i.tileType):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))return super.write(e,t);if(t&&t.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new a.Z("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}async _openRaster(e){if(this.raster){if(this.raster.rasterInfo||await this.raster.open(),"Function"===this.raster.datasetFormat){const e=this.raster.rasterFunction.getPrimaryRasters();this._primaryRaster=e.rasters[0]}else this._primaryRaster=this.raster;this.url=this.raster.url}else{const t=await st.open({url:this.url,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:e});if(null==t)throw new a.Z("imagery-tile-layer:open",`cannot open raster: ${this.url}`);this._primaryRaster=t;const{rasterFunction:i}=this;if(i){const e=(0,K.Ue)(i.rasterFunctionDefinition??i.toJSON(),{raster:t}),r=new Y({rasterFunction:e});try{await r.open(),this.raster=r}catch(e){const i=o.Z.getLogger(this.declaredClass);e instanceof a.Z&&i.error("imagery-tile-layer:open",e.message),i.warn("imagery-tile-layer:open","the raster function cannot be applied and is removed"),this._set("rasterFunction",null),this.raster=t}}else this.raster=t}const t=this.raster.rasterInfo;if(!t)throw new a.Z("imagery-tile-layer:load","cannot load resources on "+this.url);if(this._set("rasterInfo",this._primaryRaster.rasterInfo),this._set("spatialReference",t.spatialReference),this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,null!=this.sourceJSON){const e="Map"===this.raster.tileType&&null!=this.sourceJSON.minLOD&&null!=this.sourceJSON.maxLOD?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:"service"})}this.title||(this.title=this.raster.datasetName),"Map"===this.raster.tileType&&(this.popupEnabled=!1),this._configDefaultSettings(),this.addHandles((0,f.YP)((()=>this.customParameters),(e=>{this.raster&&(this.raster.ioConfig.customFetchParameters=e)})))}};(0,r._)([(0,h.Cb)()],at.prototype,"_primaryRaster",void 0),(0,r._)([(0,h.Cb)({type:[d.z8],json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"0,1,2"!==this.bandIds?.join(",")}}}}})],at.prototype,"bandIds",void 0),(0,r._)([(0,h.Cb)({json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"bilinear"!==this.interpolation}}}}}),(0,p.J)(fe.c)],at.prototype,"interpolation",void 0),(0,r._)([(0,h.Cb)(v.rn)],at.prototype,"legendEnabled",void 0),(0,r._)([(0,h.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],at.prototype,"isReference",void 0),(0,r._)([(0,h.Cb)({type:["show","hide"]})],at.prototype,"listMode",void 0),(0,r._)([(0,h.Cb)({json:{read:!0,write:!0}})],at.prototype,"blendMode",void 0),(0,r._)([(0,h.Cb)()],at.prototype,"sourceJSON",void 0),(0,r._)([(0,h.Cb)({readOnly:!0,json:{origins:{service:{read:{source:"currentVersion"}}}}})],at.prototype,"version",void 0),(0,r._)([(0,h.Cb)({readOnly:!0,json:{read:!1}})],at.prototype,"type",void 0),(0,r._)([(0,h.Cb)({type:["ArcGISTiledImageServiceLayer"]})],at.prototype,"operationalLayerType",void 0),(0,r._)([(0,h.Cb)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}},writer(e,t,i){t[i]=!e}}}})],at.prototype,"popupEnabled",void 0),(0,r._)([(0,h.Cb)({type:s.Z,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}}}}})],at.prototype,"popupTemplate",void 0),(0,r._)([(0,h.Cb)({readOnly:!0})],at.prototype,"defaultPopupTemplate",null),(0,r._)([(0,h.Cb)({readOnly:!0,type:[ue.Z]})],at.prototype,"fields",void 0),(0,r._)([(0,h.Cb)({readOnly:!0,type:[ue.Z]})],at.prototype,"rasterFields",null),(0,r._)([(0,h.Cb)({types:n.dr,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy(){const e="raster-stretch"===this.renderer?.type&&"none"===this.renderer.stretchType&&!this.renderer.useGamma;return{enabled:!this.loaded||"Raster"===this.raster.tileType||!e}}},origins:{"web-scene":{types:n.FK,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],at.prototype,"renderer",null),(0,r._)([(0,m.r)("renderer")],at.prototype,"readRenderer",null),at=(0,r._)([(0,y.j)("esri.layers.ImageryTileLayer")],at);const ot=at},11282:(e,t,i)=>{i.d(t,{cv:()=>o,en:()=>a,lA:()=>n}),i(68773),i(40330);var r=i(22974),s=i(17452);function n(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function a(e){return"string"==typeof e?(0,s.mN)(e):(0,r.d9)(e)}function o(e,t,i){const r={};for(const s in e){if("declaredClass"===s)continue;const n=e[s];if(null!=n&&"function"!=typeof n)if(Array.isArray(n)){r[s]=[];for(let e=0;e<n.length;e++)r[s][e]=o(n[e])}else if("object"==typeof n)if(n.toJSON){const e=n.toJSON(i&&i[s]);r[s]=t?e:JSON.stringify(e)}else r[s]=t?n:JSON.stringify(n);else r[s]=n}return r}i(71058)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7774,5732],{5732:(e,t,s)=>{s.d(t,{c:()=>i,g:()=>n});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},69801:(e,t,s)=>{s.d(t,{WJ:()=>h,Xq:()=>a});var i,n,r=s(70586),o=s(44553);(n=i||(i={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class a{constructor(e,t,s){this._namespace=e,this._storage=t,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),this._namespace+=":",s&&(this._storage.registerRemoveFunc(this._namespace,s),this._removeFunc=!0)}destroy(){this._storage.clear(this._namespace),this._removeFunc&&this._storage.deregisterRemoveFunc(this._namespace),this._storage.deregister(this),this._storage=null}get namespace(){return this._namespace.slice(0,-1)}get hitRate(){return this._hit/(this._hit+this._miss)}get size(){return this._storage.size}get maxSize(){return this._storage.maxSize}resetHitRate(){this._hit=this._miss=0}put(e,t,s,i=0){this._storage.put(this._namespace+e,t,s,i)}get(e){const t=this._storage.get(this._namespace+e);return void 0===t?++this._miss:++this._hit,t}pop(e){const t=this._storage.pop(this._namespace+e);return void 0===t?++this._miss:++this._hit,t}updateSize(e,t,s){this._storage.updateSize(this._namespace+e,t,s)}clear(){this._storage.clear(this._namespace)}clearAll(){this._storage.clearAll()}getStats(){return this._storage.getStats()}resetStats(){this._storage.resetStats()}}class h{constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new o.Z,this._users=new o.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get size(){return this._size}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,0),this._checkSizeLimit()}put(e,t,s,n){const r=this._db.get(e);if(r&&(this._size-=r.size,this._db.delete(e),r.entry!==t&&this._notifyRemove(e,r.entry,i.ALL)),s>this._maxSize)return void this._notifyRemove(e,t,i.ALL);if(void 0===t)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return void console.warn("Refusing to cache entry with invalid size "+s);const o=1+Math.max(n,-3)- -3;this._db.set(e,{entry:t,size:s,lifetime:o,lives:o}),this._size+=s,this._checkSizeLimit()}updateSize(e,t,s){const n=this._db.get(e);if(n&&n.entry===t){for(this._size-=n.size;s>this._maxSize;){const n=this._notifyRemove(e,t,i.SOME);if(!((0,r.pC)(n)&&n>0))return void this._db.delete(e);s=n}n.size=s,this._size+=s,this._checkSizeLimit()}}pop(e){const t=this._db.get(e);if(t)return this._size-=t.size,this._db.delete(e),++this._hit,t.entry;++this._miss}get(e){const t=this._db.get(e);if(void 0!==t)return this._db.delete(e),t.lives=t.lifetime,this._db.set(e,t),++this._hit,t.entry;++this._miss}getStats(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach(((e,i)=>{const n=e.lifetime;s[n]=(s[n]||0)+e.size,this._users.forAll((s=>{const n=s.namespace;if(i.startsWith(n)){const s=t[n]||0;t[n]=s+e.size}}))}));const i={};this._users.forAll((e=>{const s=e.namespace;if(!isNaN(e.hitRate)&&e.hitRate>0){const n=t[s]||0;t[s]=n,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"}));const n=Object.keys(t);n.sort(((e,s)=>t[s]-t[e])),n.forEach((s=>e[s]=Math.round(t[s]/2**20)+"MB / "+i[s]));for(let t=s.length-1;t>=0;--t){const i=s[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this.size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){this._db.forEach(((t,s)=>{s.startsWith(e)&&(this._size-=t.size,this._db.delete(s),this._notifyRemove(s,t.entry,i.ALL))}))}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,i.ALL))),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s){let i;return this._removeFuncs.some((n=>{if(e.startsWith(n[0])){const e=n[1](t,s);return"number"==typeof e&&(i=e),!0}return!1})),i}_checkSizeLimit(){if(!(this._size<=this._maxSize))for(const[e,t]of this._db){if(this._db.delete(e),t.lives<=1){this._size-=t.size;const s=this._notifyRemove(e,t.entry,i.SOME);(0,r.pC)(s)&&s>0&&(this._size+=s,t.lives=t.lifetime,t.size=s,this._db.set(e,t))}else--t.lives,this._db.set(e,t);if(this._size<=.9*this.maxSize)return}}}},17445:(e,t,s)=>{s.d(t,{N1:()=>c,YP:()=>h,Z_:()=>m,gx:()=>l,nn:()=>g,on:()=>d,tX:()=>p});var i=s(91460),n=s(50758),r=s(70586),o=s(95330),a=s(26258);function h(e,t,s={}){return u(e,t,s,f)}function l(e,t,s={}){return u(e,t,s,_)}function u(e,t,s={},i){let n=null;const o=s.once?(e,s)=>{i(e)&&((0,r.hw)(n),t(e,s))}:(e,s)=>{i(e)&&t(e,s)};if(n=(0,a.aQ)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return n}function d(e,t,s,o={}){let a=null,l=null,u=null;function d(){a&&l&&(l.remove(),o.onListenerRemove?.(a),a=null,l=null)}function c(e){o.once&&o.once&&(0,r.hw)(u),s(e)}const f=h(e,((e,s)=>{d(),(0,i.vT)(e)&&(a=e,l=(0,i.on)(e,t,c),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return u=(0,n.kB)((()=>{f.remove(),d()})),u}function c(e,t){return function(e,t,s){if((0,o.Hc)(s))return Promise.reject((0,o.zE)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function h(){a=(0,r.hw)(a)}return new Promise(((i,r)=>{a=(0,n.AL)([(0,o.fu)(s,(()=>{h(),r((0,o.zE)())})),u(e,(e=>{h(),i(e)}),{sync:!1,once:!0},t??f)])}))}(e,_,t)}function f(e){return!0}function _(e){return!!e}s(87538);const m={sync:!0},g={initial:!0},p={sync:!0,initial:!0}},51806:(e,t,s)=>{s.d(t,{aX:()=>F});var i=s(68773),n=s(20102),r=s(92604),o=s(70586),a=s(38913),h=s(58901),l=s(82971),u=s(33955);const d={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new h.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:l.Z.WebMercator}),minus180Line:new h.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:l.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new h.Z({paths:[[[180,-180],[180,180]]],spatialReference:l.Z.WGS84}),minus180Line:new h.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:l.Z.WGS84})}};function c(e,t){return Math.ceil((e-t)/(2*t))}function f(e,t){const s=_(e);for(const e of s)for(const s of e)s[0]+=t;return e}function _(e){return(0,u.oU)(e)?e.rings:e.paths}var m=s(8744),g=s(40488),p=(s(66577),s(3172)),y=s(11282),b=s(17452);const v=r.Z.getLogger("esri.geometry.support.normalizeUtils");function I(e){return"polygon"===e[0].type}function x(e){return"polyline"===e[0].type}function S(e,t,s){if(t){const t=function(e,t){if(!(e instanceof h.Z||e instanceof a.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw v.error(e),new n.Z(e)}const s=_(e),i=[];for(const e of s){const s=[];i.push(s),s.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const n=e[i][0],r=e[i][1],o=e[i+1][0],a=e[i+1][1],h=Math.sqrt((o-n)*(o-n)+(a-r)*(a-r)),l=(a-r)/h,u=(o-n)/h,d=h/t;if(d>1){for(let e=1;e<=d-1;e++){const i=e*t,o=u*i+n,a=l*i+r;s.push([o,a])}const e=(h+Math.floor(d-1)*t)/2,i=u*e+n,o=l*e+r;s.push([i,o])}s.push([o,a])}}return function(e){return"polygon"===e.type}(e)?new a.Z({rings:i,spatialReference:e.spatialReference}):new h.Z({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,g.Sx)(t,!0)}return s&&(e=f(e,s)),e}function z(e,t,s){if(Array.isArray(e)){const i=e[0];if(i>t){const s=c(i,t);e[0]=i+s*(-2*t)}else if(i<s){const t=c(i,s);e[0]=i+t*(-2*s)}}else{const i=e.x;if(i>t){const s=c(i,t);e=e.clone().offset(s*(-2*t),0)}else if(i<s){const t=c(i,s);e=e.clone().offset(t*(-2*s),0)}}return e}function w(e,t){let s=-1;for(let i=0;i<t.cutIndexes.length;i++){const n=t.cutIndexes[i],r=t.geometries[i],o=_(r);for(let e=0;e<o.length;e++){const t=o[e];t.some((s=>{if(s[0]<180)return!0;{let s=0;for(let e=0;e<t.length;e++){const i=t[e][0];s=i>s?i:s}s=Number(s.toFixed(9));const i=-360*c(s,180);for(let s=0;s<t.length;s++){const t=r.getPoint(e,s);r.setPoint(e,s,t.clone().offset(i,0))}return!0}}))}if(n===s){if(I(e))for(const t of _(r))e[n]=e[n].addRing(t);else if(x(e))for(const t of _(r))e[n]=e[n].addPath(t)}else s=n,e[n]=r}return e}async function F(e,t,s){if(!Array.isArray(e))return F([e],t);t&&"string"!=typeof t&&v.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??i.Z.geometryServiceUrl;let r,l,_,I,x,B,M,R,L=0;const T=[],Z=[];for(const t of e)if((0,o.Wi)(t))Z.push(t);else if(r||(r=t.spatialReference,l=(0,m.C5)(r),_=r.isWebMercator,B=_?102100:4326,I=d[B].maxX,x=d[B].minX,M=d[B].plus180Line,R=d[B].minus180Line),l)if("mesh"===t.type)Z.push(t);else if("point"===t.type)Z.push(z(t.clone(),I,x));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>z(e,I,x))),Z.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,l);Z.push(e.rings?new a.Z(e):e)}else if(t.extent){const e=t.extent,s=c(e.xmin,x)*(2*I);let i=0===s?t.clone():f(t.clone(),s);e.offset(s,0),e.intersects(M)&&e.xmax!==I?(L=e.xmax>L?e.xmax:L,i=S(i,_),T.push(i),Z.push("cut")):e.intersects(R)&&e.xmin!==x?(L=e.xmax*(2*I)>L?e.xmax*(2*I):L,i=S(i,_,360),T.push(i),Z.push("cut")):Z.push(i)}else Z.push(t.clone());else Z.push(t);let A=c(L,I),C=-90;const q=A,E=new h.Z;for(;A>0;){const e=360*A-180;E.addPath([[e,C],[e,-1*C]]),C*=-1,A--}if(T.length>0&&q>0){const t=w(T,await async function(e,t,s,i){const n=(0,y.en)(e),r=t[0].spatialReference,o={...i,query:{...n.query,f:"json",sr:JSON.stringify(r),target:JSON.stringify({geometryType:(0,u.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(s)}},a=await(0,p.default)(n.path+"/cut",o),{cutIndexes:h,geometries:l=[]}=a.data;return{cutIndexes:h,geometries:l.map((e=>{const t=(0,u.im)(e);return t.spatialReference=r,t}))}}(n,T,E,s)),i=[],r=[];for(let s=0;s<Z.length;s++){const n=Z[s];if("cut"!==n)r.push(n);else{const n=t.shift(),a=e[s];(0,o.pC)(a)&&"polygon"===a.type&&a.rings&&a.rings.length>1&&n.rings.length>=a.rings.length?(i.push(n),r.push("simplify")):r.push(_?(0,g.$)(n):n)}}if(!i.length)return r;const a=await async function(e,t,s){const i="string"==typeof e?(0,b.mN)(e):e,n=t[0].spatialReference,r=(0,u.Ji)(t[0]),o={...s,query:{...i.query,f:"json",sr:n.wkid?n.wkid:JSON.stringify(n),geometries:JSON.stringify((h=t,{geometryType:(0,u.Ji)(h[0]),geometries:h.map((e=>e.toJSON()))}))}},{data:a}=await(0,p.default)(i.path+"/simplify",o);var h;return function(e,t,s){const i=(0,u.q9)(t);return e.map((e=>{const t=i.fromJSON(e);return t.spatialReference=s,t}))}(a.geometries,r,n)}(n,i,s),h=[];for(let e=0;e<r.length;e++){const t=r[e];"simplify"!==t?h.push(t):h.push(_?(0,g.$)(a.shift()):a.shift())}return h}const O=[];for(let e=0;e<Z.length;e++){const t=Z[e];if("cut"!==t)O.push(t);else{const e=T.shift();O.push(!0===_?(0,g.$)(e):e)}}return O}},37549:(e,t,s)=>{s.d(t,{H:()=>a});var i=s(80442),n=s(24133),r=s(24470);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.Q(9,(0,i.Z)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((s,i)=>{e[t++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.cS)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,s){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,s)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},57191:(e,t,s)=>{s.d(t,{Z:()=>p});var i=s(20102),n=s(32448),r=s(92604),o=s(70586),a=s(60437),h=s(24470),l=s(98732),u=s(37549),d=s(29730),c=s(70272),f=s(5428);const _={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new c.u_(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>((0,o.Wi)(e.centroid)&&(e.centroid=(0,d.Y)(new f.Z,e.geometry,t.hasZ,t.hasM)),e.centroid)};var m=s(11490);const g=(0,a.Ue)();class p{constructor(e){this.geometryInfo=e,this._boundsStore=new u.H,this._featuresById=new Map,this._markedIds=new Set,this.events=new n.Z,this.featureAdapter=_}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{(0,o.pC)(t.geometry)&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if((0,o.Wi)(this.fullBounds))return null;const[t,s,i,n]=this.fullBounds;return{xmin:t,ymin:s,xmax:i,ymax:n,spatialReference:(0,m.S2)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,a.JR)(g,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,s)=>{this._markedIds.has(s)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void r.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new i.Z("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let n;if(this._markedIds.add(t),s?(e.displayId=s.displayId,n=this._boundsStore.get(t),this._boundsStore.delete(t)):(0,o.pC)(this.onFeatureAdd)&&this.onFeatureAdd(e),(0,o.Wi)(e.geometry)||!e.geometry.coords||!e.geometry.coords.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);n=(0,l.$)((0,o.pC)(n)?n:(0,h.Ue)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),(0,o.pC)(n)&&this._boundsStore.set(t,n),this._featuresById.set(t,e)}_remove(e){(0,o.pC)(this.onFeatureRemove)&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},23095:(e,t,s)=>{s.d(t,{O0:()=>c,av:()=>h,b:()=>g,d1:()=>u,og:()=>m});var i=s(70586),n=s(8744),r=s(35671);class o{constructor(){this.code=null,this.description=null}}class a{constructor(e){this.error=new o,this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error.description=e}}function h(e){return new a(e)}class l{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function u(e){return new l(e)}const d=new Set;function c(e,t,s,i=!1,n){d.clear();for(const o in s){const a=e.get(o);if(!a)continue;const l=s[o],u=f(a,l);if(u!==l&&n&&n.push({name:"invalid-value-type",message:"attribute value was converted to match the field type",details:{field:a,originalValue:l,sanitizedValue:u}}),d.add(a.name),a&&(i||a.editable)){const e=(0,r.Qc)(a,u);if(e)return h((0,r.vP)(e,a,u));t[a.name]=u}}for(const t of e?.requiredFields??[])if(!d.has(t.name))return h(`missing required field "${t.name}"`);return null}function f(e,t){let s=t;return"string"==typeof t&&(0,r.H7)(e)?s=parseFloat(t):null!=t&&(0,r.qN)(e)&&"string"!=typeof t&&(s=String(t)),(0,r.Pz)(s)}let _;function m(e,t){if(!e||!(0,n.JY)(t))return e;if("rings"in e||"paths"in e){if((0,i.Wi)(_))throw new TypeError("geometry engine not loaded");return _.simplify(t,e)}return e}async function g(e,t){!(0,n.JY)(e)||"esriGeometryPolygon"!==t&&"esriGeometryPolyline"!==t||await async function(){return(0,i.Wi)(_)&&(_=await Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247))),_}()}},99514:(e,t,s)=>{s.d(t,{Z:()=>o});var i=s(35671);function n(e){return"oid"===e.type||"esriFieldTypeOID"===e.type}function r(e){return"global-id"===e.type||"esriFieldTypeGlobalID"===e.type}class o{constructor(e=[]){if(this.fields=[],this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this.dateFields=[],this.numericFields=[],this._requiredFields=null,!e)return;this.fields=e;const t=[];for(const o of e){const e=o?.name,l=h(o?.name);if(e&&l){const h=a(e);this._fieldsMap.set(e,o),this._fieldsMap.set(h,o),this._normalizedFieldsMap.set(l,o),t.push(h),"date"===(s=o).type||"esriFieldTypeDate"===s.type?(this.dateFields.push(o),this._dateFieldsSet.add(o)):(0,i.H7)(o)&&(this._numericFieldsSet.add(o),this.numericFields.push(o)),n(o)||r(o)||(o.editable=null==o.editable||!!o.editable,o.nullable=null==o.nullable||!!o.nullable)}}var s;t.sort(),this.uid=t.join(",")}destroy(){this._fieldsMap.clear()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)n(e)||r(e)||e.nullable||void 0!==(0,i.os)(e)||this._requiredFields.push(e)}return this._requiredFields}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(a(e))??this._normalizedFieldsMap.get(h(e)),t&&this._fieldsMap.set(e,t),t)}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){const t=this.get(e);if(t)return t.name??void 0}}function a(e){return e.trim().toLowerCase()}function h(e){return(0,i.q6)(e)?.toLowerCase()??""}},86719:(e,t,s)=>{s.d(t,{v:()=>i});const i=new(s(35454).X)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml"})},11282:(e,t,s)=>{s.d(t,{cv:()=>a,en:()=>o,lA:()=>r}),s(68773),s(40330);var i=s(22974),n=s(17452);function r(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function o(e){return"string"==typeof e?(0,n.mN)(e):(0,i.d9)(e)}function a(e,t,s){const i={};for(const n in e){if("declaredClass"===n)continue;const r=e[n];if(null!=r&&"function"!=typeof r)if(Array.isArray(r)){i[n]=[];for(let e=0;e<r.length;e++)i[n][e]=a(r[e])}else if("object"==typeof r)if(r.toJSON){const e=r.toJSON(s&&s[n]);i[n]=t?e:JSON.stringify(e)}else i[n]=t?r:JSON.stringify(r);else i[n]=r}return i}s(71058)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[665,5935],{45378:(e,t,i)=>{i.r(t),i.d(t,{default:()=>kt});var r=i(43697),s=i(51773),n=i(70586),o=i(16453),a=i(95330),l=i(5600),u=i(75215),p=(i(67676),i(52011)),c=i(30556),d=i(87085),m=i(66577),h=i(38171),y=i(30030),f=i(3172),g=i(20102),b=i(35454),R=i(22974),w=i(92604),v=i(17445),_=i(17452),C=i(71715),S=i(21506),x=i(35956),I=i(96674),F=i(40297);const j={StretchFunction:{arguments:{ComputeGamma:{isDataset:!1,isPublic:!1,name:"ComputeGamma",type:"RasterFunctionVariable",value:!1},DRA:{isDataset:!1,isPublic:!1,name:"DRA",type:"RasterFunctionVariable",value:!1},EstimateStatsHistogram:{isDataset:!1,isPublic:!1,name:"EstimateStatsHistogram",type:"RasterFunctionVariable",value:!1},Gamma:{displayName:"Gamma",isDataset:!1,isPublic:!1,name:"Gamma",type:"RasterFunctionVariable"},Histograms:{isDataset:!1,isPublic:!1,name:"Histograms",type:"RasterFunctionVariable"},Max:{isDataset:!1,isPublic:!1,name:"Max",type:"RasterFunctionVariable",value:255},MaxPercent:{isDataset:!1,isPublic:!1,name:"MaxPercent",type:"RasterFunctionVariable",value:.5},Min:{isDataset:!1,isPublic:!1,name:"Min",type:"RasterFunctionVariable",value:0},MinPercent:{isDataset:!1,isPublic:!1,name:"MinPercent",type:"RasterFunctionVariable",value:.25},NumberOfStandardDeviations:{isDataset:!1,isPublic:!1,name:"NumberOfStandardDeviation",type:"RasterFunctionVariable",value:2},Raster:{isDataset:!0,isPublic:!1,name:"Raster",type:"RasterFunctionVariable"},SigmoidStrengthLevel:{isDataset:!1,isPublic:!1,name:"SigmoidStrengthLevel",type:"RasterFunctionVariable",value:2},Statistics:{isDataset:!1,isPublic:!1,name:"Statistics",type:"RasterFunctionVariable"},StretchType:{isDataset:!1,isPublic:!1,name:"StretchType",type:"RasterFunctionVariable",value:0},type:"StretchFunctionArguments",UseGamma:{isDataset:!1,isPublic:!1,name:"UseGamma",type:"RasterFunctionVariable",value:!1}},description:"Enhances an image by adjusting the range of values displayed. This does not alter the underlying pixel values. If a pixel has a value outside of the specified range, it will appear as either the minimum or maximum value.",function:{description:"Enhances an image by adjusting the range of values displayed. This does not alter the underlying pixel values. If a pixel has a value outside of the specified range, it will appear as either the minimum or maximum value.",name:"Stretch",pixelType:"UNKNOWN",type:"StretchFunction"},functionType:0,name:"Stretch",thumbnail:""},RemapFunction:{name:"Remap",description:"Changes pixel values by assigning new values to ranges of pixel values or using an external table.",function:{type:"RemapFunction",pixelType:"UNKNOWN",name:"Remap",description:"Changes pixel values by assigning new values to ranges of pixel values or using an external table."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},UseTable:{name:"UseTable",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},InputRanges:{name:"InputRanges",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"Input Ranges"},OutputValues:{name:"OutputValues",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"Output Values"},NoDataRanges:{name:"NoDataRanges",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"NoData Ranges"},Table:{name:"Table",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},InputField:{name:"InputField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},OutputField:{name:"OutputField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},InputMaxField:{name:"InputMaxField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},RemapTableType:{name:"RemapTableType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},AllowUnmatched:{name:"AllowUnmatched",isPublic:!1,isDataset:!1,value:!0,type:"RasterFunctionVariable"},type:"RemapFunctionArguments"},functionType:0,thumbnail:""},ColormapFunction:{name:"Colormap",description:"Changes pixel values to display the raster data as either a grayscale or a red, green, blue (RGB) image, based on a colormap or a color ramp.",function:{type:"ColormapFunction",pixelType:"UNKNOWN",name:"Colormap",description:"Changes pixel values to display the raster data as either a grayscale or a red, green, blue (RGB) image, based on a colormap or a color ramp."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ColorSchemeType:{name:"ColorSchemeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},Colormap:{name:"Colormap",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},ColormapName:{name:"ColormapName",isPublic:!1,isDataset:!1,value:"Gray",type:"RasterFunctionVariable"},ColorRamp:{name:"ColorRamp",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},type:"ColormapFunctionArguments"},functionType:0,thumbnail:""},ShadedReliefFunction:{name:"Shaded Relief",description:"Creates a multiband, color coded, 3D representation of the surface, with the sun's relative position taken into account for shading the image.",function:{type:"ShadedReliefFunction",pixelType:"UNKNOWN",name:"Shaded Relief",description:"Creates a multiband, color coded, 3D representation of the surface, with the sun's relative position taken into account for shading the image."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ColorSchemeType:{name:"ColorSchemeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ColorRamp:{name:"ColorRamp",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},HillshadeType:{name:"HillshadeType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},Colormap:{name:"Colormap",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},Azimuth:{name:"Azimuth",isPublic:!1,isDataset:!1,value:315,type:"RasterFunctionVariable"},Altitude:{name:"Altitude",isPublic:!1,isDataset:!1,value:45,type:"RasterFunctionVariable"},SlopeType:{name:"SlopeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ZFactor:{name:"ZFactor",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},PSPower:{name:"PSPower",isPublic:!1,isDataset:!1,value:.664,type:"RasterFunctionVariable"},PSZFactor:{name:"PSZFactor",isPublic:!1,isDataset:!1,value:.024,type:"RasterFunctionVariable"},RemoveEdgeEffect:{name:"RemoveEdgeEffect",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},type:"ShadedReliefFunctionArguments"},functionType:0,thumbnail:""},HillshadeFunction:{name:"Hillshade",description:"Creates a 3D representation of the surface, with the sun's relative position taken into account for shading the image",function:{type:"HillshadeFunction",pixelType:"UNKNOWN",name:"Hillshade",description:"Creates a 3D representation of the surface, with the sun's relative position taken into account for shading the image"},arguments:{DEM:{name:"DEM",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},HillshadeType:{name:"HillshadeType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},Azimuth:{name:"Azimuth",isPublic:!1,isDataset:!1,value:315,type:"RasterFunctionVariable"},Altitude:{name:"Altitude",isPublic:!1,isDataset:!1,value:45,type:"RasterFunctionVariable"},SlopeType:{name:"SlopeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ZFactor:{name:"ZFactor",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},PSPower:{name:"PSPower",isPublic:!1,isDataset:!1,value:.664,type:"RasterFunctionVariable"},PSZFactor:{name:"PSZFactor",isPublic:!1,isDataset:!1,value:.024,type:"RasterFunctionVariable"},RemoveEdgeEffect:{name:"RemoveEdgeEffect",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},type:"HillshadeFunctionArguments"},functionType:0,thumbnail:""},ResampleFunction:{name:"Resample",description:"Changes the cell size of a raster.",function:{type:"ResampleFunction",pixelType:"UNKNOWN",name:"Resample",description:"Changes the cell size of a raster."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ResamplingType:{name:"ResamplingType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},InputCellSize:{name:"InputCellsize",isPublic:!1,isDataset:!1,value:{x:0,y:0},type:"RasterFunctionVariable"},OutputCellSize:{name:"OutputCellsize",isPublic:!1,isDataset:!1,value:{x:0,y:0},type:"RasterFunctionVariable"},type:"ResampleFunctionArguments"},functionType:0,thumbnail:""}};var T=i(93010),D=i(75509),N=i(23847);const P={u1:[0,1],u2:[0,3],u4:[0,15],u8:[0,255],s8:[-128,127],u16:[0,65535],s16:[-32768,32767]},O={simple_scalar:"Simple Scalar",wind_barb:"Wind Barb",single_arrow:"Single Arrow",beaufort_kn:"Beaufort Wind (Knots)",beaufort_m:"Beaufort Wind (MetersPerSecond)",ocean_current_m:"Ocean Current (MetersPerSecond)",ocean_current_kn:"Ocean Current (Knots)"},M=new Set(["raster-stretch","unique-value","class-breaks","raster-shaded-relief","vector-field","raster-colormap"]);function V(e){return M.has(e.type)}function A(e,t){if(!e||!t)return(0,R.d9)(e||t);const i=(0,R.d9)(e);if(i.rasterFunctionDefinition&&t.rasterFunctionDefinition){const e=t.rasterFunctionDefinition;(e.thumbnail||e.thumbnailEx)&&(e.thumbnail=e.thumbnailEx=void 0),J(i.rasterFunctionDefinition.arguments,t)}else"none"!==t.functionName?.toLowerCase()&&(E(i.functionArguments).Raster=t);return i}function J(e,t){for(const i in e)"raster"===i.toLowerCase()&&("RasterFunctionVariable"===e[i].type?(e[i]=t.rasterFunctionDefinition,e[i].type="RasterFunctionTemplate"):"RasterFunctionTemplate"===e[i].type&&J(e[i].arguments,t))}function Z(e){const t=(0,R.d9)(j[e.functionName+"Function"]),i=e.functionArguments;for(const e in i)"raster"===e.toLowerCase()?(t.arguments[e]=Z(i[e]),t.arguments[e].type="RasterFunctionTemplate"):"colormap"===e.toLowerCase()?(t.arguments[e].value=L(i[e]),t.arguments.ColorSchemeType.value=0):t.arguments[e].value=i[e];return t}function E(e){const t=e?.Raster;return t&&"esri.layers.support.RasterFunction"===t.declaredClass?E(t.functionArguments):e}const q={none:0,standardDeviation:3,histogramEqualization:4,minMax:5,percentClip:6,sigmoid:9};function z(e,t){const i=P[String(t).toLowerCase()];return i&&e.push([Math.floor(i[0]-1),0,0,0],[Math.ceil(i[1]+1),0,0,0]),e}function G(e){if((0,n.Wi)(e))return;const{fields:t}=e,i=t&&t.find((e=>e&&e.name&&"value"===e.name.toLowerCase()));return i&&i.name}function H(e){const t=[];return e?.forEach((e=>{const i=e;if(Array.isArray(i))t.push(i);else{if(null==i.min||null==i.max)return;const e=[i.min,i.max,i.avg||0,i.stddev||0];t.push(e)}})),t}function L(e){const t=[],i=[];return e.forEach((e=>{t.push(e[0]),i.push((0,T.io)([...e.slice(1),255]))})),{type:"RasterColormap",values:t,colors:i}}var U,B=i(90578),k=i(94139);const Q=(0,b.w)()({MT_FIRST:"first",MT_LAST:"last",MT_MIN:"min",MT_MAX:"max",MT_MEAN:"mean",MT_BLEND:"blend",MT_SUM:"sum"}),W=(0,b.w)()({esriMosaicNone:"none",esriMosaicCenter:"center",esriMosaicNadir:"nadir",esriMosaicViewpoint:"viewpoint",esriMosaicAttribute:"attribute",esriMosaicLockRaster:"lock-raster",esriMosaicNorthwest:"northwest",esriMosaicSeamline:"seamline"});let $=U=class extends I.wq{constructor(e){super(e),this.ascending=!0,this.itemRenderingRule=null,this.lockRasterIds=null,this.method=null,this.multidimensionalDefinition=null,this.objectIds=null,this.operation=null,this.sortField=null,this.sortValue=null,this.viewpoint=null,this.where=null}readAscending(e,t){return null!=t.ascending?t.ascending:null==t.sortAscending||t.sortAscending}readMethod(e,t){return function(e){let t;switch(e?e.toLowerCase().replace("esrimosaic",""):""){case"byattribute":case"attribute":t="esriMosaicAttribute";break;case"lockraster":t="esriMosaicLockRaster";break;case"center":t="esriMosaicCenter";break;case"northwest":t="esriMosaicNorthwest";break;case"nadir":t="esriMosaicNadir";break;case"viewpoint":t="esriMosaicViewpoint";break;case"seamline":t="esriMosaicSeamline";break;default:t="esriMosaicNone"}return W.fromJSON(t)}(t.mosaicMethod||t.defaultMosaicMethod)}writeMultidimensionalDefinition(e,t,i){null!=e&&(e=e.filter((({variableName:e,dimensionName:t})=>e&&"*"!==e||t))).length&&(t[i]=e.map((e=>e.toJSON())))}readOperation(e,t){const i=t.mosaicOperation,r=t.mosaicOperator&&t.mosaicOperator.toLowerCase(),s=i||(r?Q.toJSON(r):null);return Q.fromJSON(s)||"first"}castSortValue(e){return null==e||"string"==typeof e||"number"==typeof e?e:`${e}`}clone(){return new U({ascending:this.ascending,itemRenderingRule:(0,R.d9)(this.itemRenderingRule),lockRasterIds:(0,R.d9)(this.lockRasterIds),method:this.method,multidimensionalDefinition:(0,R.d9)(this.multidimensionalDefinition),objectIds:(0,R.d9)(this.objectIds),operation:this.operation,sortField:this.sortField,sortValue:this.sortValue,viewpoint:(0,R.d9)(this.viewpoint),where:this.where})}};(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],$.prototype,"ascending",void 0),(0,r._)([(0,C.r)("ascending",["ascending","sortAscending"])],$.prototype,"readAscending",null),(0,r._)([(0,l.Cb)({type:F.Z,json:{write:!0}})],$.prototype,"itemRenderingRule",void 0),(0,r._)([(0,l.Cb)({type:[u.z8],json:{write:{overridePolicy(){return{enabled:"lock-raster"===this.method}}}}})],$.prototype,"lockRasterIds",void 0),(0,r._)([(0,l.Cb)({type:String,json:{type:W.jsonValues,write:{target:"mosaicMethod",writer:W.write}}})],$.prototype,"method",void 0),(0,r._)([(0,C.r)("method",["mosaicMethod","defaultMosaicMethod"])],$.prototype,"readMethod",null),(0,r._)([(0,l.Cb)({type:[x.Z],json:{write:!0}})],$.prototype,"multidimensionalDefinition",void 0),(0,r._)([(0,c.c)("multidimensionalDefinition")],$.prototype,"writeMultidimensionalDefinition",null),(0,r._)([(0,l.Cb)({type:[u.z8],json:{name:"fids",write:!0}})],$.prototype,"objectIds",void 0),(0,r._)([(0,l.Cb)({json:{type:Q.jsonValues,read:{reader:Q.read},write:{target:"mosaicOperation",writer:Q.write}}})],$.prototype,"operation",void 0),(0,r._)([(0,C.r)("operation",["mosaicOperation","mosaicOperator"])],$.prototype,"readOperation",null),(0,r._)([(0,l.Cb)({type:String,json:{write:{overridePolicy(){return{enabled:"attribute"===this.method}}}}})],$.prototype,"sortField",void 0),(0,r._)([(0,l.Cb)({type:[String,Number],json:{write:{allowNull:!0,overridePolicy(){return{enabled:"attribute"===this.method,allowNull:!0}}}}})],$.prototype,"sortValue",void 0),(0,r._)([(0,B.p)("sortValue")],$.prototype,"castSortValue",null),(0,r._)([(0,l.Cb)({type:k.Z,json:{write:!0}})],$.prototype,"viewpoint",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],$.prototype,"where",void 0),$=U=(0,r._)([(0,p.j)("esri.layers.support.MosaicRule")],$);const X=$;var K=i(69608);let Y=class extends I.wq{constructor(){super(...arguments),this.layer=null,this.compression=void 0,this.pixelType=void 0,this.lercVersion=2}get adjustAspectRatio(){return this.layer.adjustAspectRatio}writeAdjustAspectRatio(e,t,i){this.layer.version<10.3||(t[i]=e)}get bandIds(){return this.layer.bandIds}get compressionQuality(){return this.layer.compressionQuality}writeCompressionQuality(e,t,i){this.format&&this.format.toLowerCase().includes("jpg")&&null!=e&&(t[i]=e)}get compressionTolerance(){return this.layer.compressionTolerance}writeCompressionTolerance(e,t,i){"lerc"===this.format&&null!=e&&(t[i]=e)}get format(){return"vector-field"===this.layer.renderer?.type?"lerc":this.layer.format}get interpolation(){return this.layer.interpolation}get noData(){return this.layer.noData}get noDataInterpretation(){return this.layer.noDataInterpretation}writeLercVersion(e,t,i){"lerc"===this.format&&this.layer.version>=10.5&&(t[i]=e)}get version(){const e=this.layer;return e.commitProperty("bandIds"),e.commitProperty("format"),e.commitProperty("compressionQuality"),e.commitProperty("compressionTolerance"),e.commitProperty("interpolation"),e.commitProperty("noData"),e.commitProperty("noDataInterpretation"),e.commitProperty("mosaicRule"),e.commitProperty("renderingRule"),e.commitProperty("adjustAspectRatio"),e.commitProperty("pixelFilter"),e.commitProperty("definitionExpression"),e.commitProperty("multidimensionalSubset"),(this._get("version")||0)+1}set version(e){this._set("version",e)}get mosaicRule(){const e=this.layer;let t=e.mosaicRule;const i=e.definitionExpression;return t?i&&i!==t.where&&(t=t.clone(),t.where=i):i&&(t=new X({where:i})),t}get renderingRule(){const e=this.layer;let t=e.renderingRule;const i=e.pixelFilter,r=!e.format||e.format.includes("jpg")||e.format.includes("png");t=this._addResampleRasterFunction(t);const s=e.multidimensionalSubset?.areaOfInterest;return s&&(t=this._addClipFunction(t,s)),r&&!i&&"vector-field"!==e.renderer?.type&&(t=this.combineRendererWithRenderingRule(t)),t}combineRendererWithRenderingRule(e){const t=this.layer,{rasterInfo:i,renderer:r}=t;return e=e||t.renderingRule,r&&V(r)?A(function(e,t){switch(t=t||{},e.type){case"raster-stretch":return function(e,t){const i=t.convertToRFT,r=new F.Z;r.functionName="Stretch";const s=q[D.v.toJSON(e.stretchType)],n="u8",o={StretchType:s,Statistics:H(e.statistics??[]),DRA:e.dynamicRangeAdjustment,UseGamma:e.useGamma,Gamma:e.gamma,ComputeGamma:e.computeGamma};if(null!=e.outputMin&&(o.Min=e.outputMin),null!=e.outputMax&&(o.Max=e.outputMax),s===q.standardDeviation?(o.NumberOfStandardDeviations=e.numberOfStandardDeviations,r.outputPixelType=n):s===q.percentClip?(o.MinPercent=e.minPercent,o.MaxPercent=e.maxPercent,r.outputPixelType=n):s===q.minMax?r.outputPixelType=n:s===q.sigmoid&&(o.SigmoidStrengthLevel=e.sigmoidStrengthLevel),r.functionArguments=o,r.variableName="Raster",e.colorRamp){const s=e.colorRamp,n=new F.Z;if(i)n.functionArguments={ColorRamp:(0,T.pM)(s)};else{const i=(0,T.Uh)(s);if(i)n.functionArguments={colorRamp:i};else if(!t.convertColorRampToColormap||"algorithmic"!==s.type&&"multipart"!==s.type){const t=e.colorRamp.toJSON();"algorithmic"===t.type?t.algorithm=t.algorithm||"esriCIELabAlgorithm":"multipart"===t.type&&t.colorRamps?.length&&t.colorRamps.forEach((e=>e.algorithm=e.algorithm||"esriCIELabAlgorithm")),n.functionArguments={colorRamp:t}}else n.functionArguments={Colormap:(0,T.Jw)(s)}}return n.variableName="Raster",n.functionName="Colormap",n.functionArguments.Raster=r,i?new F.Z({rasterFunctionDefinition:Z(n)}):n}return i?new F.Z({rasterFunctionDefinition:Z(r)}):r}(e,t);case"class-breaks":return function(e,t){const i=[],r=[],s=[],o=[],a=1e-6,{pixelType:l,rasterAttributeTable:u}=t,p=(0,n.Wi)(u)?null:u.features,c=G(u);if(c&&p&&Array.isArray(p)&&e.classBreakInfos){e.classBreakInfos.forEach(((t,i)=>{const r=t.symbol?.color;let s;r?.a&&null!=t.minValue&&null!=t.maxValue&&p.forEach((n=>{null!=t.minValue&&null!=t.maxValue&&(s=n.attributes[e.field],(s>=t.minValue&&s<t.maxValue||i===e.classBreakInfos.length-1&&s>=t.minValue)&&o.push([n.attributes[c],r.r,r.g,r.b]))}))}));const i=l?z(o,l):o,r=new F.Z;return r.functionName="Colormap",r.functionArguments={},r.functionArguments.Colormap=i,r.variableName="Raster",t.convertToRFT?new F.Z({rasterFunctionDefinition:Z(r)}):r}e.classBreakInfos.forEach(((e,t)=>{if(null==e.minValue||null==e.maxValue)return;const n=e.symbol&&e.symbol.color;n?.a?(0===t?i.push(e.minValue,e.maxValue+a):i.push(e.minValue+a,e.maxValue+a),r.push(t),o.push([t,n.r,n.g,n.b])):s.push(e.minValue,e.maxValue)}));const d=l?z(o,l):o,m=new F.Z;m.functionName="Remap",m.functionArguments={InputRanges:i,OutputValues:r,NoDataRanges:s},m.variableName="Raster";const h=new F.Z;return h.functionName="Colormap",h.functionArguments={Colormap:d,Raster:m},t.convertToRFT?new F.Z({rasterFunctionDefinition:Z(h)}):h}(e,t);case"unique-value":return function(e,t){const i=[],{pixelType:r,rasterAttributeTable:s}=t,o=(0,n.Wi)(s)?null:s.features,a=G(s),l=e.defaultSymbol?.color?.toRgb(),u=e.uniqueValueInfos;if(u)if(o){if(a){const t=new Map;u.forEach((e=>{const i=e.value,r=e.symbol?.color;null!=i&&r&&r.a&&t.set(String(i),r.toRgb())}));const r=e.field;o.forEach((({attributes:e})=>{const s=String(e[r]),n=e[a],o=t.get(s);o?i.push([n,...o]):l&&i.push([n,...l])}))}}else for(let e=0;e<u.length;e++){const t=u[e],r=t.symbol?.color,s=+t.value;if(r?.a){if(isNaN(s))return null;i.push([s,r.r,r.g,r.b])}}const p=r&&i.length>0?z(i,r):i,c=new F.Z;return c.functionName="Colormap",c.functionArguments={},c.functionArguments.Colormap=p,c.variableName="Raster",t.convertToRFT?new F.Z({rasterFunctionDefinition:Z(c)}):c}(e,t);case"raster-colormap":return function(e,t){const i=e.extractColormap();if(!i||0===i.length)return null;const{pixelType:r}=t,s=r?z(i,r):i,n=new F.Z;return n.functionName="Colormap",n.functionArguments={},n.functionArguments.Colormap=s,t.convertToRFT?new F.Z({rasterFunctionDefinition:Z(n)}):n}(e,t);case"vector-field":return function(e,t){const i=new F.Z;i.functionName="VectorFieldRenderer";const{dataType:r,bandProperties:s}=t,n="vector-uv"===r;let o,a;s&&2===s.length&&(o=s.map((e=>e.BandName.toLowerCase())).indexOf("magnitude"),a=s.map((e=>e.BandName.toLowerCase())).indexOf("direction")),-1!==o&&null!==o||(o=0,a=1);const l="arithmetic"===e.rotationType?1:2,u="flow-from"===e.flowRepresentation?0:1,p=e.visualVariables?e.visualVariables.find((e=>"Magnitude"===e.field)):new N.Z,c={magnitudeBandID:o,directionBandID:a,isUVComponents:n,referenceSystem:l,massFlowAngleRepresentation:u,symbolTileSize:50,symbolTileSizeUnits:100,calculationMethod:"Vector Average",symbologyName:O[e.style.toLowerCase().replace("-","_")],minimumMagnitude:p.minDataValue,maximumMagnitude:p.maxDataValue,minimumSymbolSize:p.minSize,maximumSymbolSize:p.maxSize};return i.functionArguments=c,t.convertToRFT?new F.Z({rasterFunctionDefinition:Z(i)}):i}(e,t);case"raster-shaded-relief":return function(e,t){const i=t.convertToRFT;if("elevation"!==t.dataType&&("generic"!==t.dataType||1!==t.bandCount||"s16"!==t.pixelType&&"s32"!==t.pixelType&&"f32"!==t.pixelType&&"f64"!==t.pixelType))return new F.Z;const r=new F.Z;r.functionName="Hillshade";const s="traditional"===e.hillshadeType?0:1,n="none"===e.scalingType?1:3,o={HillshadeType:s,SlopeType:n,ZFactor:e.zFactor};return 0===s&&(o.Azimuth=e.azimuth,o.Altitude=e.altitude),3===n&&(o.PSPower=e.pixelSizePower,o.PSZFactor=e.pixelSizeFactor),r.functionArguments=o,r.variableName="Raster",e.colorRamp&&(r.functionName="ShadedRelief",i?o.ColorRamp=(0,T.pM)(e.colorRamp):o.Colormap=(0,T.Jw)(e.colorRamp)),i?new F.Z({rasterFunctionDefinition:Z(r)}):r}(e,t);case"flow":throw new Error("Unsupported rendering rule.")}}(r,{rasterAttributeTable:i.attributeTable,pixelType:i.pixelType,dataType:i.dataType,bandProperties:i.keyProperties?.BandProperties,convertColorRampToColormap:t.version<10.6,convertToRFT:!!e?.rasterFunctionDefinition,bandCount:i.bandCount}),e):e}_addResampleRasterFunction(e){if("vector-field"!==this.layer.renderer?.type||"Resample"===e?.functionName)return e;const t="esriImageServiceDataTypeVector-UV"===this.layer.serviceDataType?7:10,i=this.layer.serviceRasterInfo.pixelSize;let r=new F.Z({functionName:"Resample",functionArguments:{ResamplingType:t,InputCellSize:i}});return r=e?.rasterFunctionDefinition?new F.Z({rasterFunctionDefinition:Z(r)}):r,A(r,e)}_addClipFunction(e,t){return A(new F.Z({functionName:"Clip",functionArguments:{ClippingGeometry:t.toJSON(),ClippingType:1}}),e)}};(0,r._)([(0,l.Cb)()],Y.prototype,"layer",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],Y.prototype,"adjustAspectRatio",null),(0,r._)([(0,c.c)("adjustAspectRatio")],Y.prototype,"writeAdjustAspectRatio",null),(0,r._)([(0,l.Cb)({json:{write:!0}})],Y.prototype,"bandIds",null),(0,r._)([(0,l.Cb)({json:{write:!0}})],Y.prototype,"compression",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],Y.prototype,"compressionQuality",null),(0,r._)([(0,c.c)("compressionQuality")],Y.prototype,"writeCompressionQuality",null),(0,r._)([(0,l.Cb)({json:{write:!0}})],Y.prototype,"compressionTolerance",null),(0,r._)([(0,c.c)("compressionTolerance")],Y.prototype,"writeCompressionTolerance",null),(0,r._)([(0,l.Cb)({json:{write:!0}})],Y.prototype,"format",null),(0,r._)([(0,l.Cb)({type:String,json:{read:{reader:K.c.read},write:{writer:K.c.write}}})],Y.prototype,"interpolation",null),(0,r._)([(0,l.Cb)({json:{write:!0}})],Y.prototype,"noData",null),(0,r._)([(0,l.Cb)({type:String,json:{read:{reader:K.k.read},write:{writer:K.k.write}}})],Y.prototype,"noDataInterpretation",null),(0,r._)([(0,l.Cb)({json:{write:!0}})],Y.prototype,"pixelType",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],Y.prototype,"lercVersion",void 0),(0,r._)([(0,c.c)("lercVersion")],Y.prototype,"writeLercVersion",null),(0,r._)([(0,l.Cb)({type:Number})],Y.prototype,"version",null),(0,r._)([(0,l.Cb)({json:{write:!0}})],Y.prototype,"mosaicRule",null),(0,r._)([(0,l.Cb)({json:{write:!0}})],Y.prototype,"renderingRule",null),Y=(0,r._)([(0,p.j)("esri.layers.mixins.ExportImageServiceParameters")],Y);var ee=i(1231),te=i(99514),ie=i(29876),re=i(5847),se=i(48526),ne=i(88281),oe=i(99815),ae=i(75993),le=i(80676),ue=i(67058),pe=i(72758),ce=i(51806),de=i(11282),me=i(82971);let he=class extends I.wq{constructor(e){super(e),this.north=null,this.up=null,this.spatialReference=null}};(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],he.prototype,"north",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],he.prototype,"up",void 0),(0,r._)([(0,l.Cb)({type:me.Z,json:{write:!0}})],he.prototype,"spatialReference",void 0),he=(0,r._)([(0,p.j)("esri.rest.support.ImageAngleResult")],he);const ye=he;var fe=i(67900);let ge=class extends I.wq{constructor(){super(...arguments),this.value=null,this.displayValue=null,this.uncertainty=null}};(0,r._)([(0,l.Cb)({type:Number,json:{read:!0,write:!0}})],ge.prototype,"value",void 0),(0,r._)([(0,l.Cb)({type:String,json:{read:!0,write:!0}})],ge.prototype,"displayValue",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{read:!0,write:!0}})],ge.prototype,"uncertainty",void 0),ge=(0,r._)([(0,p.j)("esri.rest.support.ImageMeasureResultValue")],ge);let be=class extends ge{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,l.Cb)({type:String,json:{read:fe.Jo.read,write:fe.Jo.write}})],be.prototype,"unit",void 0),be=(0,r._)([(0,p.j)("esri.rest.support.ImageMeasureResultLengthValue")],be);let Re=class extends ge{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,l.Cb)({type:String,json:{read:fe.gV.read,write:fe.gV.write}})],Re.prototype,"unit",void 0),Re=(0,r._)([(0,p.j)("esri.rest.support.ImageMeasureResultAreaValue")],Re);let we=class extends ge{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,l.Cb)({type:String,json:{read:fe.CN.read,write:fe.CN.write}})],we.prototype,"unit",void 0),we=(0,r._)([(0,p.j)("esri.rest.support.ImageMeasureResultAngleValue")],we);let ve=class extends I.wq{constructor(){super(...arguments),this.name=null,this.sensorName=null}};(0,r._)([(0,l.Cb)({type:String,json:{read:!0,write:!0}})],ve.prototype,"name",void 0),(0,r._)([(0,l.Cb)({type:String,json:{read:!0,write:!0}})],ve.prototype,"sensorName",void 0),ve=(0,r._)([(0,p.j)("esri.rest.support.BaseImageMeasureResult")],ve);let _e=class extends ve{constructor(){super(...arguments),this.area=null,this.perimeter=null}};(0,r._)([(0,l.Cb)({type:Re,json:{read:!0,write:!0}})],_e.prototype,"area",void 0),(0,r._)([(0,l.Cb)({type:be,json:{read:!0,write:!0}})],_e.prototype,"perimeter",void 0),_e=(0,r._)([(0,p.j)("esri.rest.support.ImageAreaResult")],_e);const Ce=_e;let Se=class extends ve{constructor(){super(...arguments),this.distance=null,this.azimuthAngle=null,this.elevationAngle=null}};(0,r._)([(0,l.Cb)({type:be,json:{read:!0,write:!0}})],Se.prototype,"distance",void 0),(0,r._)([(0,l.Cb)({type:we,json:{read:!0,write:!0}})],Se.prototype,"azimuthAngle",void 0),(0,r._)([(0,l.Cb)({type:we,json:{read:!0,write:!0}})],Se.prototype,"elevationAngle",void 0),Se=(0,r._)([(0,p.j)("esri.rest.support.ImageDistanceResult")],Se);const xe=Se;let Ie=class extends ve{constructor(){super(...arguments),this.height=null}};(0,r._)([(0,l.Cb)({type:be,json:{read:!0,write:!0}})],Ie.prototype,"height",void 0),Ie=(0,r._)([(0,p.j)("esri.rest.support.ImageHeightResult")],Ie);const Fe=Ie;var je=i(74889);let Te=class extends I.wq{constructor(){super(...arguments),this.catalogItemVisibilities=null,this.catalogItems=null,this.location=null,this.name=null,this.objectId=null,this.processedValues=null,this.properties=null,this.value=null}};(0,r._)([(0,l.Cb)({json:{write:!0}})],Te.prototype,"catalogItemVisibilities",void 0),(0,r._)([(0,l.Cb)({type:je.Z,json:{write:!0}})],Te.prototype,"catalogItems",void 0),(0,r._)([(0,l.Cb)({type:k.Z,json:{write:!0}})],Te.prototype,"location",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],Te.prototype,"name",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],Te.prototype,"objectId",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],Te.prototype,"processedValues",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],Te.prototype,"properties",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],Te.prototype,"value",void 0),Te=(0,r._)([(0,p.j)("esri.rest.support.ImageIdentifyResult")],Te);const De=Te;let Ne=class extends I.wq{constructor(){super(...arguments),this.geometries=null}};(0,r._)([(0,l.Cb)({json:{write:!0}})],Ne.prototype,"geometries",void 0),Ne=(0,r._)([(0,p.j)("esri.rest.support.ImagePixelLocationResult")],Ne);const Pe=Ne;let Oe=class extends ve{constructor(){super(...arguments),this.point=null}};(0,r._)([(0,l.Cb)({type:k.Z,json:{name:"point.value",read:!0,write:!0}})],Oe.prototype,"point",void 0),Oe=(0,r._)([(0,p.j)("esri.rest.support.ImagePointResult")],Oe);const Me=Oe;let Ve=class extends I.wq{constructor(){super(...arguments),this.attributes=null,this.location=null,this.locationId=null,this.rasterId=null,this.resolution=null,this.pixelValue=null}};(0,r._)([(0,l.Cb)({json:{write:!0}})],Ve.prototype,"attributes",void 0),(0,r._)([(0,l.Cb)({type:k.Z,json:{write:!0}})],Ve.prototype,"location",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],Ve.prototype,"locationId",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],Ve.prototype,"rasterId",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],Ve.prototype,"resolution",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],Ve.prototype,"pixelValue",void 0),Ve=(0,r._)([(0,p.j)("esri.rest.support.ImageSample")],Ve);const Ae=Ve;let Je=class extends I.wq{constructor(){super(...arguments),this.samples=null}};(0,r._)([(0,l.Cb)({type:[Ae],json:{write:!0}})],Je.prototype,"samples",void 0),Je=(0,r._)([(0,p.j)("esri.rest.support.ImageSampleResult")],Je);const Ze=Je;function Ee(e){const t=e?.time;if(t&&(null!=t.start||null!=t.end)){const i=[];null!=t.start&&i.push(t.start),null==t.end||i.includes(t.end)||i.push(t.end),e.time=i.join(",")}}async function qe(e,t,i){const r=(0,de.en)(e),s=t.geometry?[t.geometry]:[],o=await(0,ce.aX)(s),a=t.toJSON();Ee(a);const l=o&&o[0];(0,n.pC)(l)&&(a.geometry=l.toJSON());const u=(0,de.cv)({...r.query,f:"json",...a});return(0,de.lA)(u,i)}async function ze(e,t,i){const r=(0,de.en)(e),s=t.geometry?[t.geometry]:[];return(0,ce.aX)(s).then((e=>{const s=t.toJSON(),o=e&&e[0];(0,n.pC)(o)&&(s.geometry=JSON.stringify(o.toJSON()));const a=(0,de.cv)({...r.query,f:"json",...s}),l=(0,de.lA)(a,i);return(0,f.default)(r.path+"/identify",l)})).then((e=>De.fromJSON(e.data)))}async function Ge(e,t,i,r){const s=(0,de.en)(e),o=await(0,ce.aX)(i),a=t.toJSON();(0,n.pC)(o[0])&&(a.fromGeometry=JSON.stringify(o[0].toJSON())),(0,n.pC)(o[1])&&(a.toGeometry=JSON.stringify(o[1].toJSON()));const l=(0,de.cv)({...s.query,f:"json",...a}),u=(0,de.lA)(l,r),{data:p}=await(0,f.default)(s.path+"/measure",u);return p}function He(e){const{imageCoordinateSystem:t}=e;if(t){const{id:e,referenceServiceName:i}=t;return null!=e?i?{icsid:e,icsns:i}:{icsid:e}:{ics:t}}return e.toJSON()}function Le(e,t){const i=He(e),{icsid:r,icsns:s,wkid:n}=i;return null!=r?null==s||t?.toLowerCase().includes("/"+s.toLowerCase()+"/")?`0:${r}`:JSON.stringify(i):n?n.toString():JSON.stringify(i)}i(80442),i(10158);var Ue,Be=i(4967),ke=(i(68773),i(40330),i(8744),i(98732),i(6570)),Qe=(i(9361),i(65091)),We=i(38913),$e=(i(58901),i(45091),i(14165)),Xe=(i(98326),i(56545),i(41818)),Ke=i(5396),Ye=(i(75935),i(28141),i(26059)),et=i(36679);let tt=Ue=class extends I.wq{constructor(e){super(e),this.angleNames=null,this.point=null,this.spatialReference=null,this.rasterId=null}clone(){return new Ue((0,R.d9)({angleNames:this.angleNames,point:this.point,spatialReference:this.spatialReference,rasterId:this.rasterId}))}};(0,r._)([(0,l.Cb)({type:[String],json:{name:"angleName",write:!0}})],tt.prototype,"angleNames",void 0),(0,r._)([(0,l.Cb)({type:k.Z,json:{write:!0}})],tt.prototype,"point",void 0),(0,r._)([(0,l.Cb)({type:me.Z,json:{write:!0}})],tt.prototype,"spatialReference",void 0),(0,r._)([(0,l.Cb)({type:u.z8,json:{write:!0}})],tt.prototype,"rasterId",void 0),tt=Ue=(0,r._)([(0,p.j)("esri.rest.support.ImageAngleParameters")],tt);const it=tt;var rt=i(33955);const st=new b.X({esriMensurationPoint:"point",esriMensurationCentroid:"centroid",esriMensurationDistanceAndAngle:"distance-and-angle",esriMensurationAreaAndPerimeter:"area-and-perimeter",esriMensurationHeightFromBaseAndTop:"base-and-top",esriMensurationHeightFromBaseAndTopShadow:"base-and-top-shadow",esriMensurationHeightFromTopAndTopShadow:"top-and-top-shadow",esriMensurationPoint3D:"point-3D",esriMensurationCentroid3D:"centroid-3D",esriMensurationDistanceAndAngle3D:"distance-and-angle-3D",esriMensurationAreaAndPerimeter3D:"area-and-perimeter-3D"});let nt=class extends I.wq{constructor(){super(...arguments),this.type=null,this.measureOperation=null,this.mosaicRule=null,this.renderingRule=null,this.pixelSize=null,this.raster=void 0}};var ot;(0,r._)([(0,l.Cb)()],nt.prototype,"type",void 0),(0,r._)([(0,l.Cb)({type:st.apiValues,json:{read:st.read,write:st.write}})],nt.prototype,"measureOperation",void 0),(0,r._)([(0,l.Cb)({type:X,json:{write:!0}})],nt.prototype,"mosaicRule",void 0),(0,r._)([(0,l.Cb)({type:F.Z,json:{write:!0}})],nt.prototype,"renderingRule",void 0),(0,r._)([(0,l.Cb)({type:k.Z,json:{write:!0}})],nt.prototype,"pixelSize",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],nt.prototype,"raster",void 0),nt=(0,r._)([(0,p.j)("esri.rest.support.BaseImageMeasureParameters")],nt);let at=ot=class extends nt{constructor(){super(...arguments),this.type="area-perimeter",this.geometry=null,this.is3D=!1,this.linearUnit="meters",this.areaUnit="square-meters"}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,rt.Ji)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"area-and-perimeter-3D":"area-and-perimeter"}clone(){return new ot((0,R.d9)({geometry:this.geometry,is3D:this.is3D,linearUnit:this.linearUnit,areaUnit:this.areaUnit,mosaicRule:this.mosaicRule,renderingRule:this.renderingRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,l.Cb)({types:m.qM,json:{name:"fromGeometry",read:!0,write:!0}})],at.prototype,"geometry",void 0),(0,r._)([(0,c.c)("geometry")],at.prototype,"writeGeometry",null),(0,r._)([(0,l.Cb)({type:st.apiValues,json:{write:st.write}})],at.prototype,"measureOperation",null),(0,r._)([(0,l.Cb)({json:{read:!0}})],at.prototype,"is3D",void 0),(0,r._)([(0,l.Cb)({type:String,json:{read:fe.Jo.read,write:fe.Jo.write}})],at.prototype,"linearUnit",void 0),(0,r._)([(0,l.Cb)({type:String,json:{read:fe.gV.read,write:fe.gV.write}})],at.prototype,"areaUnit",void 0),at=ot=(0,r._)([(0,p.j)("esri.rest.support.ImageAreaParameters")],at);const lt=at;var ut;let pt=ut=class extends nt{constructor(){super(...arguments),this.type="distance-angle",this.fromGeometry=null,this.toGeometry=null,this.is3D=!1,this.linearUnit="meters",this.angularUnit="degrees"}writeFromGeometry(e,t,i){null!=e&&(t.geometryType=(0,rt.Ji)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"distance-and-angle-3D":"distance-and-angle"}clone(){return new ut((0,R.d9)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,is3D:this.is3D,linearUnit:this.linearUnit,angularUnit:this.angularUnit,mosaicRule:this.mosaicRule,renderingRule:this.renderingRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,l.Cb)({type:k.Z,json:{read:!0,write:!0}})],pt.prototype,"fromGeometry",void 0),(0,r._)([(0,c.c)("fromGeometry")],pt.prototype,"writeFromGeometry",null),(0,r._)([(0,l.Cb)({type:k.Z,json:{read:!0,write:!0}})],pt.prototype,"toGeometry",void 0),(0,r._)([(0,l.Cb)({type:st.apiValues,json:{write:st.write}})],pt.prototype,"measureOperation",null),(0,r._)([(0,l.Cb)({json:{read:!0}})],pt.prototype,"is3D",void 0),(0,r._)([(0,l.Cb)({type:String,json:{read:fe.Jo.read,write:fe.Jo.write}})],pt.prototype,"linearUnit",void 0),(0,r._)([(0,l.Cb)({type:String,json:{read:fe.CN.read,write:fe.CN.write}})],pt.prototype,"angularUnit",void 0),pt=ut=(0,r._)([(0,p.j)("esri.rest.support.ImageDistanceParameters")],pt);const ct=pt;var dt;let mt=dt=class extends nt{constructor(){super(...arguments),this.type="height",this.fromGeometry=null,this.toGeometry=null,this.operationType="base-and-top",this.linearUnit="meters"}writeFromGeometry(e,t,i){null!=e&&(t.geometryType=(0,rt.Ji)(e),t[i]=e.toJSON())}get measureOperation(){return this.operationType}clone(){return new dt((0,R.d9)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,operationType:this.operationType,linearUnit:this.linearUnit,mosaicRule:this.mosaicRule,renderingRule:this.renderingRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,l.Cb)({type:k.Z,json:{read:!0}})],mt.prototype,"fromGeometry",void 0),(0,r._)([(0,c.c)("fromGeometry")],mt.prototype,"writeFromGeometry",null),(0,r._)([(0,l.Cb)({type:k.Z,json:{read:!0,write:!0}})],mt.prototype,"toGeometry",void 0),(0,r._)([(0,l.Cb)({type:st.apiValues,json:{write:st.write}})],mt.prototype,"measureOperation",null),(0,r._)([(0,l.Cb)({json:{read:!0}})],mt.prototype,"operationType",void 0),(0,r._)([(0,l.Cb)({type:String,json:{read:fe.Jo.read,write:fe.Jo.write}})],mt.prototype,"linearUnit",void 0),mt=dt=(0,r._)([(0,p.j)("esri.rest.support.ImageHeightParameters")],mt);const ht=mt;var yt,ft=i(92835);let gt=yt=class extends I.wq{constructor(){super(...arguments),this.geometry=null,this.mosaicRule=null,this.renderingRule=null,this.pixelSize=null,this.raster=void 0,this.timeExtent=null}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,rt.Ji)(e),t[i]=e.toJSON())}clone(){return new yt((0,R.d9)({geometry:this.geometry,mosaicRule:this.mosaicRule,renderingRule:this.renderingRule,pixelSize:this.pixelSize,raster:this.raster,timeExtent:this.timeExtent}))}};(0,r._)([(0,l.Cb)({types:m.qM,json:{read:rt.im}})],gt.prototype,"geometry",void 0),(0,r._)([(0,c.c)("geometry")],gt.prototype,"writeGeometry",null),(0,r._)([(0,l.Cb)({type:X,json:{write:!0}})],gt.prototype,"mosaicRule",void 0),(0,r._)([(0,l.Cb)({type:F.Z,json:{write:!0}})],gt.prototype,"renderingRule",void 0),(0,r._)([(0,l.Cb)({type:k.Z,json:{write:!0}})],gt.prototype,"pixelSize",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],gt.prototype,"raster",void 0),(0,r._)([(0,l.Cb)({type:ft.Z,json:{read:{source:"time"},write:{target:"time"}}})],gt.prototype,"timeExtent",void 0),gt=yt=(0,r._)([(0,p.j)("esri.rest.support.ImageHistogramParameters")],gt);const bt=gt;var Rt;let wt=Rt=class extends I.wq{constructor(){super(...arguments),this.geometry=null,this.renderingRules=null,this.pixelSize=null,this.returnGeometry=!0,this.returnCatalogItems=!0,this.returnPixelValues=!0,this.maxItemCount=null,this.timeExtent=null,this.raster=void 0,this.viewId=void 0,this.processAsMultidimensional=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,rt.Ji)(e),t[i]=JSON.stringify(e.toJSON()))}set mosaicRule(e){let t=e;t&&t.mosaicMethod&&(t=X.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}writeMosaicRule(e,t,i){null!=e&&(t[i]=JSON.stringify(e.toJSON()))}set renderingRule(e){let t=e;t&&t.rasterFunction&&(t=F.Z.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("renderingRule",t)}writeRenderingRule(e,t,i){null!=e&&(t[i]=JSON.stringify(e.toJSON())),e.rasterFunctionDefinition&&(t[i]=JSON.stringify(e.rasterFunctionDefinition))}writeRenderingRules(e,t,i){null!=e&&(t[i]=JSON.stringify(e.map((e=>e.rasterFunctionDefinition||e.toJSON()))))}writePixelSize(e,t,i){null!=e&&(t[i]=JSON.stringify(e))}writeTimeExtent(e,t,i){if(null!=e){const r=(0,n.pC)(e.start)?e.start.getTime():null,s=(0,n.pC)(e.end)?e.end.getTime():null;t[i]=null!=r?null!=s?`${r},${s}`:`${r}`:null}}clone(){return new Rt((0,R.d9)({geometry:this.geometry,mosaicRule:this.mosaicRule,renderingRule:this.renderingRule,pixelSize:this.pixelSize,returnGeometry:this.returnGeometry,returnCatalogItems:this.returnCatalogItems,returnPixelValues:this.returnPixelValues,maxItemCount:this.maxItemCount,processAsMultidimensional:this.processAsMultidimensional,raster:this.raster,viewId:this.viewId,timeExtent:this.timeExtent}))}};(0,r._)([(0,l.Cb)({json:{write:!0}})],wt.prototype,"geometry",void 0),(0,r._)([(0,c.c)("geometry")],wt.prototype,"writeGeometry",null),(0,r._)([(0,l.Cb)({type:X,json:{write:!0}})],wt.prototype,"mosaicRule",null),(0,r._)([(0,c.c)("mosaicRule")],wt.prototype,"writeMosaicRule",null),(0,r._)([(0,l.Cb)({type:F.Z,json:{write:!0}})],wt.prototype,"renderingRule",null),(0,r._)([(0,c.c)("renderingRule")],wt.prototype,"writeRenderingRule",null),(0,r._)([(0,l.Cb)({type:[F.Z],json:{write:!0}})],wt.prototype,"renderingRules",void 0),(0,r._)([(0,c.c)("renderingRules")],wt.prototype,"writeRenderingRules",null),(0,r._)([(0,l.Cb)({type:k.Z,json:{write:!0}})],wt.prototype,"pixelSize",void 0),(0,r._)([(0,c.c)("pixelSize")],wt.prototype,"writePixelSize",null),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],wt.prototype,"returnGeometry",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],wt.prototype,"returnCatalogItems",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],wt.prototype,"returnPixelValues",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],wt.prototype,"maxItemCount",void 0),(0,r._)([(0,l.Cb)({type:ft.Z,json:{write:{target:"time"}}})],wt.prototype,"timeExtent",void 0),(0,r._)([(0,c.c)("timeExtent")],wt.prototype,"writeTimeExtent",null),(0,r._)([(0,l.Cb)({json:{write:!0}})],wt.prototype,"raster",void 0),(0,r._)([(0,l.Cb)({json:{write:!0}})],wt.prototype,"viewId",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],wt.prototype,"processAsMultidimensional",void 0),wt=Rt=(0,r._)([(0,p.j)("esri.rest.support.ImageIdentifyParameters")],wt);const vt=wt;var _t;let Ct=_t=class extends I.wq{constructor(){super(...arguments),this.geometries=null,this.rasterId=null}writeGeometry(e,t,i){t.geometries={geometryType:"esriGeometryPoint",geometries:e.map((e=>e.toJSON()))}}clone(){return new _t({geometries:this.geometries?.map((e=>e.clone()))??[],rasterId:this.rasterId})}};(0,r._)([(0,l.Cb)({type:[k.Z],json:{write:!0}})],Ct.prototype,"geometries",void 0),(0,r._)([(0,c.c)("geometries")],Ct.prototype,"writeGeometry",null),(0,r._)([(0,l.Cb)({type:u.z8,json:{write:!0}})],Ct.prototype,"rasterId",void 0),Ct=_t=(0,r._)([(0,p.j)("esri.rest.support.ImagePixelLocationParameters")],Ct);const St=Ct;var xt;let It=xt=class extends nt{constructor(){super(...arguments),this.type="point",this.geometry=null,this.is3D=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,rt.Ji)(e),t[i]=e.toJSON())}get measureOperation(){const{is3D:e,geometry:t}=this;return"point"===t.type?e?"point-3D":"point":e?"centroid-3D":"centroid"}clone(){return new xt((0,R.d9)({geometry:this.geometry,is3D:this.is3D,mosaicRule:this.mosaicRule,renderingRule:this.renderingRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,l.Cb)({types:m.qM,json:{name:"fromGeometry",read:rt.im}})],It.prototype,"geometry",void 0),(0,r._)([(0,c.c)("geometry")],It.prototype,"writeGeometry",null),(0,r._)([(0,l.Cb)({type:st.apiValues,json:{read:st.read,write:st.write}})],It.prototype,"measureOperation",null),(0,r._)([(0,l.Cb)({json:{read:!0}})],It.prototype,"is3D",void 0),It=xt=(0,r._)([(0,p.j)("esri.rest.support.ImagePointParameters")],It);const Ft=It;var jt;let Tt=jt=class extends I.wq{constructor(){super(...arguments),this.geometry=null,this.interpolation="nearest",this.mosaicRule=null,this.outFields=null,this.pixelSize=null,this.returnFirstValueOnly=!0,this.sampleDistance=null,this.sampleCount=null,this.sliceId=null,this.timeExtent=null}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,rt.Ji)(e),t[i]=e.toJSON())}set locations(e){if(e?.length){const t=new Qe.Z({spatialReference:e[0].spatialReference});t.points=e.map((e=>[e.x,e.y])),this._set("locations",e),this.geometry=t}}clone(){return new jt((0,R.d9)({geometry:this.geometry,locations:this.locations,interpolation:this.interpolation,mosaicRule:this.mosaicRule,outFields:this.outFields,raster:this.raster,returnFirstValueOnly:this.returnFirstValueOnly,sampleDistance:this.sampleDistance,sampleCount:this.sampleCount,sliceId:this.sliceId,pixelSize:this.pixelSize,timeExtent:this.timeExtent}))}};(0,r._)([(0,l.Cb)({types:m.qM,json:{read:rt.im}})],Tt.prototype,"geometry",void 0),(0,r._)([(0,c.c)("geometry")],Tt.prototype,"writeGeometry",null),(0,r._)([(0,l.Cb)()],Tt.prototype,"locations",null),(0,r._)([(0,l.Cb)({type:String,json:{type:K.c.jsonValues,read:K.c.read,write:K.c.write}})],Tt.prototype,"interpolation",void 0),(0,r._)([(0,l.Cb)({type:X,json:{write:!0}})],Tt.prototype,"mosaicRule",void 0),(0,r._)([(0,l.Cb)({type:[String],json:{write:!0}})],Tt.prototype,"outFields",void 0),(0,r._)([(0,l.Cb)({type:k.Z,json:{write:!0}})],Tt.prototype,"pixelSize",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],Tt.prototype,"raster",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],Tt.prototype,"returnFirstValueOnly",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],Tt.prototype,"sampleDistance",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],Tt.prototype,"sampleCount",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],Tt.prototype,"sliceId",void 0),(0,r._)([(0,l.Cb)({type:ft.Z,json:{read:{source:"time"},write:{target:"time"}}})],Tt.prototype,"timeExtent",void 0),Tt=jt=(0,r._)([(0,p.j)("esri.rest.support.ImageSampleParameters")],Tt);const Dt=Tt;var Nt=i(23808);const Pt=(0,b.w)()({U1:"u1",U2:"u2",U4:"u4",U8:"u8",S8:"s8",U16:"u16",S16:"s16",U32:"u32",S32:"s32",F32:"f32",F64:"f64",C64:"c64",C128:"c128",UNKNOWN:"unknown"}),Ot=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),Mt=(0,l.Eg)(u.q9,{min:0,max:255}),Vt=e=>{let t=class extends e{constructor(){super(...arguments),this._functionRasterInfos={},this._rasterJobHandler={instance:null,refCount:0,connectionPromise:null},this._cachedRendererJson=null,this._serviceSupportsMosaicRule=null,this._rasterAttributeTableFieldPrefix="Raster.",this.adjustAspectRatio=null,this.bandIds=void 0,this.capabilities=null,this.compressionQuality=void 0,this.compressionTolerance=.01,this.copyright=null,this.defaultMosaicRule=null,this.definitionExpression=null,this.exportImageServiceParameters=null,this.rasterInfo=null,this.fields=null,this.fullExtent=null,this.hasMultidimensions=!1,this.imageMaxHeight=4100,this.imageMaxWidth=4100,this.interpolation=void 0,this.minScale=0,this.maxScale=0,this.multidimensionalInfo=null,this.multidimensionalSubset=null,this.noData=null,this.noDataInterpretation=void 0,this.objectIdField=null,this.geometryType="polygon",this.typeIdField=null,this.types=[],this.pixelFilter=null,this.raster=void 0,this.sourceType=null,this.viewId=void 0,this.symbolizer=null,this.rasterFunctionInfos=null,this.serviceDataType=null,this.spatialReference=null,this.pixelType=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.url=null,this.version=void 0}initialize(){this._set("exportImageServiceParameters",new Y({layer:this}))}readServiceSupportsMosaicRule(e,t){return this._isMosaicRuleSupported(t)}get _rasterFunctionNamesIndex(){const e=new Map;return!this.rasterFunctionInfos||(0,n.pC)(this.rasterFunctionInfos)&&this.rasterFunctionInfos.length<1||(0,n.pC)(this.rasterFunctionInfos)&&this.rasterFunctionInfos.forEach((t=>{e.set(t.name.toLowerCase().replace(/ /gi,"_"),t.name)})),e}readBandIds(e,t){if(Array.isArray(e)&&e.length>0&&e.every((e=>"number"==typeof e)))return e}readCapabilities(e,t){return this._readCapabilities(t)}writeCompressionQuality(e,t,i){null!=e&&"lerc"!==this.format&&(t[i]=e)}writeCompressionTolerance(e,t,i){"lerc"===this.format&&null!=e&&(t[i]=e)}readDefaultMosaicRule(e,t){return this._serviceSupportsMosaicRule?X.fromJSON(t):null}get fieldsIndex(){return this.fields?new te.Z(this.fields):null}set format(e){e&&Ot.has(e.toLowerCase())&&this._set("format",e.toLowerCase())}readFormat(e,t){return"esriImageServiceDataTypeVector-UV"===t.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===t.serviceDataType||null!=this.pixelFilter?"lerc":"jpgpng"}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}set mosaicRule(e){let t=e;t&&t.mosaicMethod&&(t=X.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}readMosaicRule(e,t){const i=e||t.mosaicRule;return i?X.fromJSON(i):this._isMosaicRuleSupported(t)?X.fromJSON(t):null}writeMosaicRule(e,t,i){let r=this.mosaicRule;const s=this.definitionExpression;r?s&&s!==r.where&&(r=r.clone(),r.where=s):s&&(r=new X({where:s})),this._isValidCustomizedMosaicRule(r)&&(t[i]=r.toJSON())}writeNoData(e,t,i){null!=e&&"number"==typeof e&&(t[i]=Mt(e))}readObjectIdField(e,t){if(!e){const i=t.fields.filter((e=>"esriFieldTypeOID"===e.type||"oid"===e.type));e=i&&i[0]&&i[0].name}return e}get parsedUrl(){return(0,_.mN)(this.url)}readSourceType(e,t){return this._isMosaicDataset(t)?"mosaic-dataset":"raster-dataset"}set renderer(e){this.loaded&&(e=this._configRenderer(e)),this._set("renderer",e)}readRenderer(e,t,i){const r=t?.layerDefinition?.drawingInfo?.renderer,s=(0,y.ij)(r,i);return null==s?null:("vector-field"===s.type&&t.symbolTileSize&&!r.symbolTileSize&&(s.symbolTileSize=t.symbolTileSize),V(s)||w.Z.getLogger(this.declaredClass).warn("ArcGISImageService","Imagery layer doesn't support given renderer type."),s)}writeRenderer(e,t,i){t.layerDefinition=t.layerDefinition||{},t.layerDefinition.drawingInfo=t.layerDefinition.drawingInfo||{},t.layerDefinition.drawingInfo.renderer=e.toJSON(),"vector-field"===e.type&&(t.symbolTileSize=e.symbolTileSize)}get rasterFields(){const e=this._rasterAttributeTableFieldPrefix||"Raster.",t=new ee.Z({name:"Raster.ItemPixelValue",alias:"Item Pixel Value",domain:null,editable:!1,length:50,type:"string"}),i=new ee.Z({name:"Raster.ServicePixelValue",alias:"Service Pixel Value",domain:null,editable:!1,length:50,type:"string"}),r=new ee.Z({name:"Raster.ServicePixelValue.Raw",alias:"Raw Service Pixel Value",domain:null,editable:!1,length:50,type:"string"});let s=this.fields?(0,R.d9)(this.fields):[];s.push(i),this.capabilities?.operations.supportsQuery&&this.fields&&this.fields.length>0&&s.push(t),this.version>=10.4&&(0,n.pC)(this.rasterFunctionInfos)&&this.rasterFunctionInfos.some((e=>"none"===e.name.toLowerCase()))&&s.push(r),(0,n.pC)(this.rasterFunctionInfos)&&this.rasterFunctionInfos.filter((e=>"none"!==e.name.toLowerCase())).forEach((e=>{s.push(new ee.Z({name:"Raster.ServicePixelValue."+e.name,alias:e.name,domain:null,editable:!1,length:50,type:"string"}))})),this._isVectorDataSet()&&(s.push(new ee.Z({name:"Raster.Magnitude",alias:"Magnitude",domain:null,editable:!1,type:"double"})),s.push(new ee.Z({name:"Raster.Direction",alias:"Direction",domain:null,editable:!1,type:"double"})));const{attributeTable:o}=this.rasterInfo??{};if((0,n.pC)(o)){const t=o.fields.filter((e=>"esriFieldTypeOID"!==e.type&&"value"!==e.name.toLowerCase())).map((t=>{const i=(0,R.d9)(t);return i.name=e+t.name,i}));s=s.concat(t)}return s}set renderingRule(e){let t=e;t&&t.rasterFunction&&(t=F.Z.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("renderingRule",t)}readRenderingRule(e,t){const i=t.rasterFunctionInfos;return t.renderingRule||i&&i.length&&"None"!==i[0].name?this._isRFTJson(t.renderingRule)?F.Z.fromJSON({rasterFunctionDefinition:t.renderingRule}):F.Z.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}writeRenderingRule(e,t,i){const r=e.toJSON();r.rasterFunctionDefinition?t[i]=r.rasterFunctionDefinition:t[i]=r}readSpatialReference(e,t){const i=e||t.extent.spatialReference;return i?me.Z.fromJSON(i):null}readPixelType(e){return Pt.fromJSON(e)||e}writePixelType(e,t,i){((0,n.Wi)(this.serviceRasterInfo)||this.pixelType!==this.serviceRasterInfo.pixelType)&&(t[i]=Pt.toJSON(e))}readVersion(e,t){let i=t.currentVersion;return i||(i=t.hasOwnProperty("fields")||t.hasOwnProperty("timeInfo")?10:9.3),i}applyFilter(e){let t=e;return this.pixelFilter&&(t=this._clonePixelData(e),this.pixelFilter(t)),t}async applyRenderer(e,t){let i=e;const{renderer:r,symbolizer:s,pixelFilter:n,bandIds:o}=this;if(!this._isPicture()&&r&&s&&!n){const n=JSON.stringify(this._cachedRendererJson)!==JSON.stringify(r.toJSON()),a=this._rasterJobHandler.instance;if(a){n&&(s.bind(),await a.updateSymbolizer(s,t),this._cachedRendererJson=r.toJSON());const l=await a.symbolize({bandIds:o,...e},t);i={extent:e.extent,pixelBlock:l}}else i={extent:e.extent,pixelBlock:s.symbolize({bandIds:o,...e})}}return i}destroy(){this._shutdownJobHandler()}increaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount++}decreaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount--,this._rasterJobHandler.refCount<=0&&this._shutdownJobHandler()}async computeAngles(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeAngles)throw new g.Z("imagery-layer:compute-angles","this operation is not supported on the input image service");return e=(0,u.TJ)(it,e).clone(),async function(e,t,i){const r=t.toJSON();(0,n.pC)(r.angleName)&&(r.angleName=r.angleName.join(",")),(0,n.pC)(t.point)&&t.point.spatialReference?.imageCoordinateSystem&&(r.point.spatialReference=He(t.point.spatialReference)),(0,n.pC)(t.spatialReference)&&t.spatialReference.imageCoordinateSystem&&(r.spatialReference=Le(t.spatialReference));const s=(0,de.en)(e),o=(0,de.cv)({...s.query,f:"json",...r}),a=(0,de.lA)(o,i),{data:l}=await(0,f.default)(`${s.path}/computeAngles`,a);return l.spatialReference=l.spatialReference?null!=l.spatialReference.geodataXform?new me.Z({wkid:0,imageCoordinateSystem:l.spatialReference}):me.Z.fromJSON(l.spatialReference):null,"NaN"===l.north&&(l.north=null),"NaN"===l.up&&(l.up=null),new ye(l)}(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputePixelLocation)throw new g.Z("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return e=(0,u.TJ)(St,e).clone(),async function(e,t,i){const r=t.toJSON(),{geometries:s}=t;if(s)for(let e=0;e<s.length;e++)s[e].spatialReference?.imageCoordinateSystem&&(r.geometries.geometries[e].spatialReference=He(s[e].spatialReference));const n=(0,de.en)(e),o=(0,de.cv)({...n.query,f:"json",...r}),a=(0,de.lA)(o,i),{data:l}=await(0,f.default)(`${n.path}/computePixelLocation`,a);return Pe.fromJSON(l)}(this.url,e,this._getRequestOptions(t))}async computeHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeHistograms)throw new g.Z("imagery-layer:compute-histograms","this operation is not supported on the input image service");return e=(0,u.TJ)(bt,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await qe(e,t,i),s=(0,de.en)(e),{data:n}=await(0,f.default)(`${s.path}/computeHistograms`,r);return{histograms:n.histograms}}(this.url,e,this._getRequestOptions(t))}async computeStatisticsHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeStatisticsHistograms)throw new g.Z("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");return e=(0,u.TJ)(bt,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await qe(e,t,i),s=(0,de.en)(e),{data:n}=await(0,f.default)(`${s.path}/computeStatisticsHistograms`,r),{statistics:o}=n;return o?.length&&o.forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:o,histograms:n.histograms}}(this.url,e,this._getRequestOptions(t))}async measureHeight(e,t){const i=await this._fetchCapabilities(t?.signal);if(!("base-and-top"===e.operationType?i.mensuration.supportsHeightFromBaseAndTop:"base-and-top-shadow"===e.operationType?i.mensuration.supportsHeightFromBaseAndTopShadow:i.mensuration.supportsHeightFromTopAndTopShadow))throw new g.Z("imagery-layer:measure-height","this operation is not supported on the input image service");return e=(0,u.TJ)(ht,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await Ge(e,t,[t.fromGeometry,t.toGeometry],i);return Fe.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measureAreaAndPerimeter(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsAreaAndPerimeter||e.is3D&&!i.mensuration.supports3D)throw new g.Z("imagery-layer:measure-area-and-perimeter","this operation is not supported on the input image service");return e=(0,u.TJ)(lt,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await Ge(e,t,[t.geometry],i);return Ce.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measureDistanceAndAngle(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsDistanceAndAngle||e.is3D&&!i.mensuration.supports3D)throw new g.Z("imagery-layer:measure-distance-and-angle","this operation is not supported on the input image service");return e=(0,u.TJ)(ct,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await Ge(e,t,[t.fromGeometry,t.toGeometry],i);return xe.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measurePointOrCentroid(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsPointOrCentroid||e.is3D&&!i.mensuration.supports3D)throw new g.Z("imagery-layer:measure-point-or-centroid","this operation is not supported on the input image service");return e=(0,u.TJ)(Ft,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await Ge(e,t,[t.geometry],i);return Me.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}getField(e){const{fieldsIndex:t}=this;return(0,n.pC)(t)?t.get(e):void 0}getFieldDomain(e,t){const i=this.getField(e);return i?i.domain:null}async fetchImage(e,t,i,r={}){if(null==e||null==t||null==i)throw new g.Z("imagery-layer:fetch-image","Insufficient parameters for requesting an image. A valid extent, width and height values are required.");if(this.renderer||this.symbolizer){const e=await this.generateRasterInfo(this.renderingRule,{signal:r.signal});e&&(this.rasterInfo=e)}const s=this.getExportImageServiceParameters(e,t,i,r.timeExtent);if(null==s){if(r.requestAsImageElement&&this._canRequestImageElement(this.format)){const e=document.createElement("canvas");return e.width=t,e.height=i,{imageOrCanvasElement:e}}const{bandIds:s,rasterInfo:n}=this,o=(s?.length||n.bandCount)??0,a=t*i,l=n.pixelType,u=[];for(let e=0;e<o;e++)u.push(re.Z.createEmptyBand(l,a));return{pixelData:{pixelBlock:new re.Z({width:t,height:i,pixels:u,mask:new Uint8Array(a),pixelType:l}),extent:e}}}const n={imageServiceParameters:s,imageProps:{extent:e,width:t,height:i,format:this.format},requestAsImageElement:r.requestAsImageElement&&!this.pixelFilter||!1,signal:r.signal};return this._requestArrayBuffer(n)}fetchKeyProperties(e){return(0,f.default)(i(this.parsedUrl)+"/keyProperties",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.renderingRule:null})}).then((e=>e.data))}fetchRasterAttributeTable(e){return this.version<10.1?Promise.reject(new g.Z("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):(0,f.default)(i(this.parsedUrl)+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.renderingRule:null})}).then((e=>je.Z.fromJSON(e.data)))}getCatalogItemRasterInfo(e,t){const r={...t,query:this._getQueryParams()};return async function(e,t,i){const r=(0,de.en)(e),s=(0,de.cv)({...r?.query,f:"json"}),n=(0,de.lA)(s,i),o=`${r?.path}/${t}/info`,a=(0,f.default)(`${o}`,n),l=(0,f.default)(`${o}/keyProperties`,n),u=await Promise.allSettled([a,l]),p="fulfilled"===u[0].status?u[0].value.data:null,c="fulfilled"===u[1].status?u[1].value.data:null;let d=null;p.statistics?.length&&(d=p.statistics.map((e=>({min:e[0],max:e[1],avg:e[2],stddev:e[3]}))));const m=ke.Z.fromJSON(p.extent),h=Math.ceil(m.width/p.pixelSizeX-.1),y=Math.ceil(m.height/p.pixelSizeY-.1),g=m.spatialReference,b=new k.Z({x:p.pixelSizeX,y:p.pixelSizeY,spatialReference:g}),R=p.histograms?.length?p.histograms:null,w=new et.Z({origin:p.origin,blockWidth:p.blockWidth,blockHeight:p.blockHeight,firstPyramidLevel:p.firstPyramidLevel,maximumPyramidLevel:p.maxPyramidLevel});return new se.Z({width:h,height:y,bandCount:p.bandCount,extent:m,spatialReference:g,pixelSize:b,pixelType:p.pixelType.toLowerCase(),statistics:d,histograms:R,keyProperties:c,storageInfo:w})}(i(this.parsedUrl),e,r)}async getCatalogItemICSInfo(e,t){const{data:r}=await(0,f.default)(i(this.parsedUrl)+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),s=r&&r.ics;if(!s)return;let n=null;try{n=(await(0,f.default)(i(this.parsedUrl)+"/"+e+"/info",{query:this._getQueryParams(),...t})).data.extent}catch{}if(!n||!n.spatialReference)return{ics:s,icsToPixelTransform:null,icsExtent:null,northDirection:null};const o=this.version>=10.7?(0,f.default)(i(this.parsedUrl)+"/"+e+"/info/icstopixel",{query:this._getQueryParams(),...t}).then((e=>e.data)).catch((()=>({}))):{},a=n.spatialReference,l={geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[n]}),inSR:a.wkid||JSON.stringify(a),outSR:"0:"+e},u=(0,f.default)(i(this.parsedUrl)+"/project",{query:this._getQueryParams(l),...t}).then((e=>e.data)).catch((()=>({}))),p=(n.xmin+n.xmax)/2,c=(n.ymax-n.ymin)/6,d=n.ymin+c,m=[];for(let e=0;e<5;e++)m.push({x:p,y:d+c*e});const h={geometries:JSON.stringify({geometryType:"esriGeometryPoint",geometries:m}),inSR:a.wkid||JSON.stringify(a),outSR:"0:"+e},y=(0,f.default)(i(this.parsedUrl)+"/project",{query:this._getQueryParams(h),...t}).then((e=>e.data)).catch((()=>({}))),g=await Promise.all([o,u,y]);let b=g[0].ipxf;if(null==b){const e=s.geodataXform?.xf_0;"topup"===e?.name?.toLowerCase()&&6===e?.coefficients?.length&&(b={affine:{name:"ics [sensor: Frame] to pixel (column, row) transformation",coefficients:e.coefficients,cellsizeRatio:0,type:"GeometricXform"}})}const R=ke.Z.fromJSON(g[1]&&g[1].geometries&&g[1].geometries[0]);R&&(R.spatialReference=new me.Z({wkid:0,imageCoordinateSystem:s}));const w=g[2].geometries?g[2].geometries.filter((e=>null!=e&&null!=e.x&&null!=e.y&&"NaN"!==e.x&&"NaN"!==e.y)):[],v=w.length;if(v<3)return{ics:s,icsToPixelTransform:b,icsExtent:R,northDirection:null};let _=0,C=0,S=0,x=0;for(let e=0;e<v;e++)_+=w[e].x,C+=w[e].y,S+=w[e].x*w[e].x,x+=w[e].x*w[e].y;const I=(v*x-_*C)/(v*S-_*_);let F=0;const j=w[4].x>w[0].x,T=w[4].y>w[0].y;return I===1/0?F=T?90:270:0===I?F=j?0:180:I>0?F=j?180*Math.atan(I)/Math.PI:180*Math.atan(I)/Math.PI+180:I<0&&(F=T?180+180*Math.atan(I)/Math.PI:360+180*Math.atan(I)/Math.PI),{ics:s,icsToPixelTransform:b,icsExtent:R,northDirection:F}}async generateRasterInfo(e,t){if(this.serviceRasterInfo&&(!e||"none"===e.functionName?.toLowerCase()||this._isVectorFieldResampleFunction(e)))return this.serviceRasterInfo;const i=function(e){if(!e)return null;const t=JSON.stringify(e).match(/"rasterFunction":"(.*?")/gi)?.map((e=>e.replace('"rasterFunction":"',"").replace('"',"")));return t?t.join("/"):null}(e);if(!i)return null;if(this._functionRasterInfos[i])return this._functionRasterInfos[i];const r=this._generateRasterInfo(e,t);this._functionRasterInfos[i]=r;try{return await r}catch{return this._functionRasterInfos[i]=null,null}}getExportImageServiceParameters(e,t,r,s){const o=Le((e=e.clone().shiftCentralMeridian()).spatialReference,i(this.parsedUrl));this.pixelType!==this.serviceRasterInfo.pixelType&&(this.exportImageServiceParameters.pixelType=this.pixelType);const a=this.exportImageServiceParameters.toJSON(),{bandIds:l,noData:u}=a;let{renderingRule:p}=a;const c=this.renderingRule?.rasterFunctionDefinition,d=!this.renderer||"raster-stretch"===this.renderer.type;if(l?.length&&this._hasRenderingRule(this.renderingRule)&&!c&&d){const e={rasterFunction:"ExtractBand",rasterFunctionArguments:{BandIds:l}};if("Stretch"===p.rasterFunction)e.rasterFunctionArguments.Raster=p.rasterFunctionArguments.Raster,p.rasterFunctionArguments.Raster=e;else if("Colormap"===p.rasterFunction){const t=p.rasterFunctionArguments.Raster;"Stretch"===t?.rasterFunction?(e.rasterFunctionArguments.Raster=t.rasterFunctionArguments.Raster,t.rasterFunctionArguments.Raster=e):(e.rasterFunctionArguments.Raster=t,p.rasterFunctionArguments.Raster=e)}else e.rasterFunctionArguments.Raster=p,p=e;a.bandIds=void 0}else a.bandIds=l?.join(",");u instanceof Array&&u.length>0&&(a.noData=u.join(","));const m=this._serviceSupportsMosaicRule?this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,s):null;a.mosaicRule=(0,n.pC)(m)?JSON.stringify(m):null;const{multidimensionalSubset:h}=this;if(h&&(0,n.pC)(m)&&m.multidimensionalDefinition&&(0,oe.nb)(m.multidimensionalDefinition,h,!0))return null;a.renderingRule=this._getRenderingRuleString(F.Z.fromJSON(p));const y={};if(s){const{start:e,end:t}=s.toJSON();let i;if(e&&t&&e===t?(y.time=""+e,i=[e]):null==e&&null==t||(y.time=`${e??"null"},${t??"null"}`,i=null!=e&&null!=t?[e,t]:[e??t]),i&&h){const e=h.dimensions.find((({name:e})=>"StdTime"===e));if(2===i.length&&e?.extent.length){if(i[0]=Math.max(i[0],e.extent[0]),i[1]=Math.min(i[1],e.extent[1]??e.extent[0]),i[1]<i[0])return null;y.time=i.join()}const t=new x.Z({variableName:"",dimensionName:"StdTime",isSlice:1===i.length,values:i});if((0,oe.nb)([t],h,!0))return null}}return{bbox:e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:o,imageSR:o,size:t+","+r,...a,...y}}async getSamples(e,t){if(!(await this._fetchCapabilities(t?.signal))?.operations.supportsGetSamples)throw new g.Z("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=(0,u.TJ)(Dt,e).clone();const{raster:i}=this;return i&&null==e.raster&&(e.raster=i),async function(e,t,i){const r=t.toJSON();Ee(r),r.outFields?.length&&(r.outFields=r.outFields.join(","));const s=(await(0,ce.aX)(t.geometry))?.[0];(0,n.pC)(s)&&(r.geometry=s.toJSON());const o=(0,de.en)(e),a=(0,de.cv)({...o.query,f:"json",...r}),l=(0,de.lA)(a,i),{data:u}=await(0,f.default)(`${o.path}/getSamples`,l),p=u?.samples?.map((e=>{const t="NaN"===e.value||""===e.value?null:e.value.split(" ").map((e=>Number(e)));return{...e,pixelValue:t}}));return Ze.fromJSON({samples:p})}(this.url,e,this._getRequestOptions(t))}async identify(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsIdentify)throw new g.Z("imagery-layer:query-rasters","query operation is not supported on the input image service");e=(0,u.TJ)(vt,e).clone();const{raster:i,mosaicRule:r,renderingRule:s}=this;if(s&&null==e.renderingRule&&(e.renderingRule=s),r&&null==e.mosaicRule){const t=this._combineMosaicRuleWithTimeExtent(r,e.timeExtent);e.mosaicRule=(0,n.Wg)(t)}return i&&null==e.raster&&(e.raster=i),ze(this.url,e,this._getRequestOptions(t))}createQuery(){const e=new $e.Z;return e.outFields=["*"],e.returnGeometry=!0,e.where=this.definitionExpression||"1=1",e}async queryRasters(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,Be.e)(this.url,e,t)}async queryObjectIds(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,Ke.G)(this.url,e,t)}async queryRasterCount(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,Xe.P)(this.url,e,t)}async queryVisibleRasters(e,t){if(!e)throw new g.Z("imagery-layer: query-visible-rasters","missing query parameter");await this.load();const{pixelSize:i,returnDomainValues:r,returnTopmostRaster:s,showNoDataRecords:o}=t||{pixelSize:null,returnDomainValues:!1,returnTopmostRaster:!1,showNoDataRecords:!1};let a=!1,l=null,u=null;const p="raster.servicepixelvalue",c=this._rasterFunctionNamesIndex;if((0,n.pC)(e.outFields)&&(a=e.outFields.some((e=>!e.toLowerCase().includes(p))),this.version>=10.4)){const t=e.outFields.filter((e=>e.toLowerCase().includes(p)&&e.length>p.length)).map((e=>{const t=e.slice(p.length+1);return[this._updateRenderingRulesFunctionName(t,c),t]}));l=t.map((e=>new F.Z({functionName:e[0]}))),u=t.map((e=>e[1]));const{renderingRule:i}=this;0===l.length?i?.functionName?(l.push(i),u.push(i.functionName)):l=null:i?.functionName&&!l.some((e=>e.functionName===i.functionName))&&(l.push(i),u.push(i.functionName))}const d=(0,n.Wi)(e.outSpatialReference)||e.outSpatialReference.equals(this.spatialReference),m=e.timeExtent||this.timeExtent,h=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,m),y=this._getQueryParams({geometry:e.geometry,timeExtent:m,mosaicRule:h,renderingRule:this.version<10.4?this.renderingRule:null,renderingRules:l,pixelSize:i,returnCatalogItems:a,returnGeometry:d,raster:this.raster,maxItemCount:s?1:null});delete y.f;const f=new vt(y);try{await this.generateRasterInfo(this.renderingRule);const i=await ze(this.url,f,{signal:t?.signal,query:{...this.customParameters}}),s=e.outFields,l=null!=i.value&&i.value.toLowerCase().includes("nodata");if(!a||d||!i?.catalogItems?.features.length||!o&&l)return this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:u,showNoDataRecords:o,templateFields:s});const p=this.objectIdField||"ObjectId",c=i.catalogItems?.features??[],m=c.map((e=>e.attributes?.[p])),h=new $e.Z({objectIds:m,returnGeometry:!0,outSpatialReference:e.outSpatialReference,outFields:[p]}),y=await this.queryRasters(h);return y?.features?.length&&y.features.forEach((t=>{c.forEach((i=>{i.attributes[p]===t.attributes[p]&&(i.geometry=new We.Z(t.geometry),(0,n.pC)(e.outSpatialReference)&&(i.geometry.spatialReference=e.outSpatialReference))}))})),this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:u,showNoDataRecords:o,templateFields:s})}catch{throw new g.Z("imagery-layer:query-visible-rasters","encountered error when querying visible rasters")}}async fetchVariableStatisticsHistograms(e,t){const r=(0,f.default)(i(this.parsedUrl)+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.statistics)),s=(0,f.default)(i(this.parsedUrl)+"/histograms",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.histograms)),n=await Promise.all([r,s]);return n[0]&&n[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:n[0]||null,histograms:n[1]||null}}async createFlowMesh(e,t){const i=this._rasterJobHandler.instance;return i?i.createFlowMesh(e,t):(0,Nt.GE)(e.meshType,e.simulationSettings,e.flowData,(0,n.pC)(t.signal)?t.signal:(new AbortController).signal)}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo.multidimensionalInfo;return(0,oe.jj)(this.multidimensionalSubset,t)}async _fetchService(e){await this._fetchServiceInfo(e),this.rasterInfo||(this.rasterInfo=this.serviceRasterInfo);const t=this.sourceJSON,r=(0,n.pC)(this.serviceRasterInfo)?Promise.resolve(this.serviceRasterInfo):(0,Ye.g)(i(this.parsedUrl),t,{signal:e,query:this._getQueryParams()}).then((e=>(this._set("serviceRasterInfo",e),this._set("multidimensionalInfo",e.multidimensionalInfo),e))),s=this._hasRenderingRule(this.renderingRule)?this.generateRasterInfo(this.renderingRule,{signal:e}):null,o=this._getRasterFunctionInfos();return Promise.all([r,s,o]).then((e=>{e[1]?this._set("rasterInfo",e[1]):this._set("rasterInfo",e[0]),e[2]&&this._set("rasterFunctionInfos",e[2]),this.renderer&&!this._isSupportedRenderer(this.renderer)&&(this._set("renderer",null),w.Z.getLogger(this.declaredClass).warn("ArcGISImageService","Switching to the default renderer. Renderer applied is not valid for this Imagery Layer")),this._set("renderer",this._configRenderer(this.renderer)),this.addHandles([(0,v.YP)((()=>this.renderingRule),(e=>{(this.renderer||this.symbolizer||this.popupEnabled&&this.popupTemplate)&&this.generateRasterInfo(e).then((e=>{e&&(this.rasterInfo=e)}))}))]);const{serviceRasterInfo:t}=this;(0,n.pC)(t.multidimensionalInfo)&&this._updateMultidimensionalDefinition(t)}))}_combineMosaicRuleWithTimeExtent(e,t){const i=this.timeInfo,{multidimensionalInfo:r}=this.serviceRasterInfo;if((0,n.Wi)(e)||(0,n.Wi)(r)||(0,n.Wi)(t)||(0,n.Wi)(i?.startField))return e;const{startField:s}=i,o=r.variables.some((e=>e.dimensions.some((e=>e.name===s))))?s:"StdTime";if(e=e.clone(),"mosaic-dataset"===this.sourceType)return e.multidimensionalDefinition=e.multidimensionalDefinition?.filter((e=>e.dimensionName!==o)),this._cleanupMultidimensionalDefinition(e);e.multidimensionalDefinition=e.multidimensionalDefinition||[];const a=e.multidimensionalDefinition.filter((e=>e.dimensionName===o)),l=(0,n.pC)(t.start)?t.start.getTime():null,u=(0,n.pC)(t.end)?t.end.getTime():null,p=null==l||null==u||l===u,c=p?[l||u]:[[l,u]],d=this.version>=10.8;if(a.length)a.forEach((e=>{e.dimensionName===o&&(d?(e.dimensionName=null,e.isSlice=!1,e.values=[]):(e.isSlice=p,e.values=c))}));else if(!d){const t=e.multidimensionalDefinition.filter((e=>null!=e.variableName&&null==e.dimensionName));t.length?t.forEach((e=>{e.dimensionName=o,e.isSlice=p,e.values=c})):e.multidimensionalDefinition.push(new x.Z({variableName:"",dimensionName:o,isSlice:p,values:c}))}return this._cleanupMultidimensionalDefinition(e)}_cleanupMultidimensionalDefinition(e){return(0,n.Wi)(e)?null:(e.multidimensionalDefinition&&(e.multidimensionalDefinition=e.multidimensionalDefinition.filter((e=>!(!e.variableName&&!e.dimensionName))),0===e.multidimensionalDefinition.length&&(e.multidimensionalDefinition=null)),"mosaic-dataset"!==this.sourceType&&null==e.multidimensionalDefinition?null:e)}async _prepareForQuery(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQuery)throw new g.Z("imagery-layer:query-rasters","query operation is not supported on the input image service");return e=(0,n.pC)(e)?(0,u.TJ)($e.Z,e):this.createQuery(),t=this._getRequestOptions(t),this.raster&&(t.query={...t.query,raster:this.raster}),{query:e,requestOptions:t}}async _initJobHandler(){if(null!=this._rasterJobHandler.connectionPromise)return this._rasterJobHandler.connectionPromise;const e=new ne.Z;this._rasterJobHandler.connectionPromise=e.initialize().then((()=>{this._rasterJobHandler.instance=e}),(()=>{})),await this._rasterJobHandler.connectionPromise}_shutdownJobHandler(){this._rasterJobHandler.instance&&this._rasterJobHandler.instance.destroy(),this._rasterJobHandler.instance=null,this._rasterJobHandler.connectionPromise=null,this._rasterJobHandler.refCount=0,this._cachedRendererJson=null}_isSupportedRenderer(e){const{rasterInfo:t,renderingRule:i}=this;return"unique-value"===e.type&&this._hasRenderingRule(i)&&1===t?.bandCount&&["u8","s8"].includes(t.pixelType)||null!=t&&null!=e&&(0,ue.U0)(t).includes(e.type)}async _fetchCapabilities(e){return this.capabilities||await this._fetchServiceInfo(e),this.capabilities}async _fetchServiceInfo(e){let t=this.sourceJSON;if(!t){const{data:r,ssl:s}=await(0,f.default)(i(this.parsedUrl),{query:this._getQueryParams(),signal:e});t=r,this.sourceJSON=t,s&&(this.url=this.url.replace(/^http:/i,"https:"))}if(t.capabilities?.toLowerCase().split(",").map((e=>e.trim())).indexOf("tilesonly")>-1)throw new g.Z("imagery-layer:fetch-service-info","use ImageryTileLayer to open tiles-only image services");this.read(t,{origin:"service",url:this.parsedUrl})}_isMosaicDataset(e){return e.serviceSourceType?"esriImageServiceSourceTypeMosaicDataset"===e.serviceSourceType:e.fields?.length>0}_isMosaicRuleSupported(e){if(!e)return!1;const t=this._isMosaicDataset(e),i=e.currentVersion>=10.71&&e.hasMultidimensions&&!(e.fields?.length>1);return t||i}_isVectorFieldResampleFunction(e){if((0,n.Wi)(e))return!1;const{functionName:t,functionArguments:i}=e,r="resample"===t?.toLowerCase(),s=i?.ResampleType||i?.resampleType;return r&&(7===s||10===s)}_isPicture(){return!this.format||this.format.includes("jpg")||this.format.includes("png")}_configRenderer(e){const t=this._isPicture(),{rasterInfo:i}=this;if(!t&&!this.pixelFilter||this._isVectorDataSet()){if(!this.bandIds&&i.bandCount>=3){const e=(0,ue.YD)(i);!e||3===i.bandCount&&0===e[0]&&1===e[1]&&2===e[2]||(this.bandIds=e)}e||(e=(0,ue.Ob)(i,{bandIds:this.bandIds,variableName:this.renderingRule?null:this.mosaicRule?.multidimensionalDefinition?.[0].variableName}));const t=(0,ue.ol)(e.toJSON());this.symbolizer?(this.symbolizer.rendererJSON=t,this.symbolizer.rasterInfo=i):this.symbolizer=new pe.Z({rendererJSON:t,rasterInfo:i}),this.symbolizer.bind().success||(this.symbolizer=null)}return e}_clonePixelData(e){return null==e?e:{extent:e.extent&&e.extent.clone(),pixelBlock:(0,n.pC)(e.pixelBlock)?e.pixelBlock.clone():null}}_getQueryParams(e){e&&(0,n.pC)(e.renderingRule)&&"string"!=typeof e.renderingRule&&(e.renderingRule=this._getRenderingRuleString(e.renderingRule));const{raster:t,viewId:i}=this;return{raster:t,viewId:i,f:"json",...e,...this.customParameters}}_getRequestOptions(e){return{...e,query:{...e?.query,...this.customParameters}}}_decodePixelBlock(e,t,i){return this._rasterJobHandler.instance?this._rasterJobHandler.instance.decode({data:e,options:t}):(0,ae.J)(e,t,i)}async _getRasterFunctionInfos(e){const t=this.sourceJSON.rasterFunctionInfos;return this.loaded?t:t&&this.version>=10.3?1===t.length&&"none"===t[0].name.toLowerCase()?t:(await(0,f.default)(i(this.parsedUrl)+"/rasterFunctionInfos",{query:this._getQueryParams(),signal:e})).data?.rasterFunctionInfos:null}_canRequestImageElement(e){return!this.pixelFilter&&(!e||e.includes("png"))}async _requestArrayBuffer(e){const{imageProps:t,requestAsImageElement:r,signal:s}=e;if(r&&this._canRequestImageElement(t.format))return{imageOrCanvasElement:(await(0,f.default)(i(this.parsedUrl)+"/exportImage",{responseType:"image",query:this._getQueryParams({f:"image",...this.refreshParameters,...e.imageServiceParameters}),signal:s})).data,params:t};const n=this._initJobHandler(),o=(0,f.default)(i(this.parsedUrl)+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:s}),a=(await Promise.all([o,n]))[0].data,l=t.format||"jpgpng";let u=l;if("bsq"!==u&&"bip"!==u&&(u=(0,ae.y)(a)),!u)throw new g.Z("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(a)));const p={signal:s},c="gif"===l||"bmp"===l||l.includes("png")&&("png"===u||"jpg"===u)?(0,ae.J)(a,{useCanvas:!0,...t},p):this._decodePixelBlock(a,{width:t.width,height:t.height,planes:null,pixelType:null,noDataValue:null,format:l},p);return{pixelData:{pixelBlock:await c,extent:t.extent},params:t}}_generateRasterInfo(e,t){const r={...t,query:this._getQueryParams()};return(0,Ye.N)(i(this.parsedUrl),e,r)}_isValidCustomizedMosaicRule(e){return e&&JSON.stringify(e.toJSON())!==JSON.stringify(this.defaultMosaicRule?.toJSON())}_updateMultidimensionalDefinition(e){if(this._isValidCustomizedMosaicRule(this.mosaicRule))return;let t=(0,oe.Tj)(e,{multidimensionalSubset:this.multidimensionalSubset});if((0,n.pC)(t)&&t.length>0){this.mosaicRule=this.mosaicRule||new X;const e=this.mosaicRule.multidimensionalDefinition;!this.sourceJSON.defaultVariableName&&this.renderingRule&&"none"!==this.renderingRule.functionName?.toLowerCase()&&t.forEach((e=>e.variableName="")),t=t.filter((({variableName:e,dimensionName:t})=>e&&"*"!==e||t)),!e?.length&&t.length&&(this.mosaicRule.multidimensionalDefinition=t)}}_processVisibleRastersResponse(e,t){t=t||{};const i=e.value,{templateRRFunctionNames:r,showNoDataRecords:s,returnDomainValues:o,templateFields:a}=t,l=e.processedValues;let u=e.catalogItems&&e.catalogItems.features,p=e.properties&&e.properties.Values&&e.properties.Values.map((e=>e.replace(/ /gi,", ")))||[];const c=this.objectIdField||"ObjectId",d="string"==typeof i&&i.toLowerCase().includes("nodata"),m=[];if(i&&!u&&!d){const e={};e[c]=0,p=[i],u=[new h.Z(this.fullExtent,null,e)]}if(!u)return[];let y,f,g;this._updateResponseFieldNames(u,a),d&&!s&&(u=[]);for(let e=0;e<u.length;e++){if(y=u[e],null!=i){if(f=p[e],g=this.renderingRule&&l&&l.length>0&&r&&r.length>0&&r.includes(this.renderingRule.functionName)?l[r.indexOf(this.renderingRule.functionName)]:i,"nodata"===f.toLowerCase()&&!s)continue;const t="Raster.ItemPixelValue",o="Raster.ServicePixelValue";y.attributes[t]=f,y.attributes[o]=g,this._updateFeatureWithMagDirValues(y,f);const a=this.fields&&this.fields.length>0;let u=this.renderingRule&&(0,n.pC)(this.serviceRasterInfo.attributeTable)?a?f:i:g;this.renderingRule||(u=a?f:i),this._updateFeatureWithRasterAttributeTableValues(y,u)}if(y.sourceLayer=y.layer=this,o&&this._updateFeatureWithDomainValues(y),r&&l&&r.length===l.length)for(let e=0;e<r.length;e++){const t="Raster.ServicePixelValue."+r[e];y.attributes[t]=l[e]}m.push(u[e])}return m}_updateFeatureWithRasterAttributeTableValues(e,t){const i=this.rasterInfo.attributeTable||this.serviceRasterInfo.attributeTable;if((0,n.Wi)(i))return;const{features:r,fields:s}=i,o=s.map((e=>e.name)).filter((e=>"value"===e.toLowerCase())),a=o&&o[0];if(!a)return;const l=r.filter((e=>e.attributes[a]===(null!=t?parseInt(t,10):null)));l&&l[0]&&s.forEach((t=>{const i=this._rasterAttributeTableFieldPrefix+t.name;e.attributes[i]=l[0].attributes[t.name]}))}_updateFeatureWithMagDirValues(e,t){if(!this._isVectorDataSet())return;const i=t.split(/,\s*/).map((e=>parseFloat(e))),r=i.map((e=>[e])),s=i.map((e=>({minValue:e,maxValue:e,noDataValue:null}))),n=new re.Z({height:1,width:1,pixelType:"f32",pixels:r,statistics:s});null!=this.pixelFilter&&this.pixelFilter({pixelBlock:n,extent:new ke.Z(0,0,0,0,this.spatialReference)});const o="esriImageServiceDataTypeVector-MagDir"===this.serviceDataType?[n.pixels[0][0],n.pixels[1][0]]:(0,le.Tg)([n.pixels[0][0],n.pixels[1][0]]);e.attributes["Raster.Magnitude"]=o[0],e.attributes["Raster.Direction"]=o[1]}_updateFeatureWithDomainValues(e){const t=this.fields&&this.fields.filter((e=>e.domain&&"coded-value"===e.domain.type));null!=t&&t.forEach((t=>{const i=e.attributes[t.name];if(null!=i){const r=t.domain.codedValues.find((e=>e.code===i));r&&(e.attributes[t.name]=r.name)}}))}_updateResponseFieldNames(e,t){if(!t||t.length<1)return;const i=this.fieldsIndex;(0,n.Wi)(i)||e.forEach((e=>{if(e&&e.attributes)for(const r of t){const t=i.get(r)?.name;t&&t!==r&&(e.attributes[r]=e.attributes[t],delete e.attributes[t])}}))}_getRenderingRuleString(e){if(this._hasRenderingRule(e)){let t=e.toJSON();return t=t.rasterFunctionDefinition??t,(t.thumbnail||t.thumbnailEx)&&(t.thumbnail=t.thumbnailEx=null),JSON.stringify(t)}return null}_hasRenderingRule(e){return null!=e&&null!=e.functionName&&"none"!==e.functionName.toLowerCase()}_updateRenderingRulesFunctionName(e,t){if(!e||e.length<1)return;if("Raw"===e)return e.replace("Raw","None");const i=e.toLowerCase().replace(/ /gi,"_");return t.has(i)?t.get(i):e}_isRFTJson(e){return e&&e.name&&e.arguments&&e.function&&e.hasOwnProperty("functionType")}_isVectorDataSet(){return"esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType}_applyMosaicAndRenderingRules(e){const{raster:t,mosaicRule:i,renderingRule:r}=this;r&&null==e.renderingRule&&(e.renderingRule=r),i&&null==e.mosaicRule&&(e.mosaicRule=i),t&&null==e.raster&&(e.raster=t)}_readCapabilities(e){const t=e.capabilities?e.capabilities.toLowerCase().split(",").map((e=>e.trim())):["image","catalog"],{currentVersion:i,advancedQueryCapabilities:r,maxRecordCount:s}=e,n=t.includes("image"),o="esriImageServiceDataTypeElevation"===e.serviceDataType,a=!!(e.spatialReference||e.extent&&e.extent.spatialReference),l=t.includes("edit"),u=t.includes("mensuration")&&a,p=null==e.mensurationCapabilities?[]:e.mensurationCapabilities.toLowerCase().split(",").map((e=>e.trim())),c=u&&p.includes("basic");return{data:{supportsAttachment:!1},operations:{supportsComputeHistograms:n,supportsExportImage:n,supportsIdentify:n,supportsMeasure:u,supportsDownload:t.includes("download"),supportsQuery:t.includes("catalog")&&e.fields&&e.fields.length>0,supportsGetSamples:i>=10.2&&n,supportsProject:i>=10.3&&n,supportsComputeStatisticsHistograms:i>=10.4&&n,supportsQueryBoundary:i>=10.6&&n,supportsCalculateVolume:i>=10.7&&o,supportsComputePixelLocation:i>=10.7&&t.includes("catalog"),supportsComputeAngles:i>=10.91,supportsAdd:l,supportsDelete:l,supportsEditing:l,supportsUpdate:l,supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsChangeTracking:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsExceedsLimitStatistics:!1,supportsQueryAnalytics:!1,supportsQueryTopFeatures:!1},query:{maxRecordCount:s,maxRecordCountFactor:void 0,supportsStatistics:!!r?.supportsStatistics,supportsOrderBy:!!r?.supportsOrderBy,supportsDistinct:!!r?.supportsDistinct,supportsPagination:!!r?.supportsPagination,supportsStandardizedQueriesOnly:!!r?.useStandardizedQueries,supportsPercentileStatistics:!!r?.supportsPercentileStatistics,supportsCentroid:!!r?.supportsReturningGeometryCentroid,supportsDistance:!!r?.supportsQueryWithDistance,supportsExtent:!!r?.supportsReturningQueryExtent,supportsGeometryProperties:!!r?.supportsReturningGeometryProperties,supportsHavingClause:!!r?.supportsHavingClause,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsMaxRecordCountFactor:!1,supportsSqlExpression:!1,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!1,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!1,supportsCacheHint:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!!r?.supportsDefaultSR,supportsFullTextSearch:!1,supportsCompactGeometry:!1,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0},mensuration:{supportsDistanceAndAngle:c,supportsAreaAndPerimeter:c,supportsPointOrCentroid:c,supportsHeightFromBaseAndTop:u&&p.includes("base-top height"),supportsHeightFromBaseAndTopShadow:u&&p.includes("base-top shadow height"),supportsHeightFromTopAndTopShadow:u&&p.includes("top-top shadow height"),supports3D:u&&p.includes("3d")}}}};function i(e){return e?.path??""}return(0,r._)([(0,l.Cb)()],t.prototype,"_functionRasterInfos",void 0),(0,r._)([(0,l.Cb)()],t.prototype,"_rasterJobHandler",void 0),(0,r._)([(0,l.Cb)()],t.prototype,"_cachedRendererJson",void 0),(0,r._)([(0,l.Cb)({readOnly:!0})],t.prototype,"_serviceSupportsMosaicRule",void 0),(0,r._)([(0,C.r)("_serviceSupportsMosaicRule",["currentVersion","fields"])],t.prototype,"readServiceSupportsMosaicRule",null),(0,r._)([(0,l.Cb)()],t.prototype,"_rasterAttributeTableFieldPrefix",void 0),(0,r._)([(0,l.Cb)({readOnly:!0})],t.prototype,"_rasterFunctionNamesIndex",null),(0,r._)([(0,l.Cb)()],t.prototype,"adjustAspectRatio",void 0),(0,r._)([(0,l.Cb)({type:[u.z8],json:{write:!0}})],t.prototype,"bandIds",void 0),(0,r._)([(0,C.r)("bandIds")],t.prototype,"readBandIds",null),(0,r._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],t.prototype,"capabilities",void 0),(0,r._)([(0,C.r)("service","capabilities",["capabilities","currentVersion","serviceDataType"])],t.prototype,"readCapabilities",null),(0,r._)([(0,l.Cb)({type:Number})],t.prototype,"compressionQuality",void 0),(0,r._)([(0,c.c)("compressionQuality")],t.prototype,"writeCompressionQuality",null),(0,r._)([(0,l.Cb)({type:Number})],t.prototype,"compressionTolerance",void 0),(0,r._)([(0,c.c)("compressionTolerance")],t.prototype,"writeCompressionTolerance",null),(0,r._)([(0,l.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,r._)([(0,l.Cb)({readOnly:!0,dependsOn:["_serviceSupportsMosaicRule"]})],t.prototype,"defaultMosaicRule",void 0),(0,r._)([(0,C.r)("defaultMosaicRule",["defaultMosaicMethod"])],t.prototype,"readDefaultMosaicRule",null),(0,r._)([(0,l.Cb)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],t.prototype,"definitionExpression",void 0),(0,r._)([(0,l.Cb)({readOnly:!0,constructOnly:!0})],t.prototype,"exportImageServiceParameters",void 0),(0,r._)([(0,l.Cb)()],t.prototype,"rasterInfo",void 0),(0,r._)([(0,l.Cb)({readOnly:!0,type:[ee.Z]})],t.prototype,"fields",void 0),(0,r._)([(0,l.Cb)({readOnly:!0})],t.prototype,"fieldsIndex",null),(0,r._)([(0,l.Cb)({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"],json:{write:!0}})],t.prototype,"format",null),(0,r._)([(0,C.r)("service","format",["serviceDataType"])],t.prototype,"readFormat",null),(0,r._)([(0,l.Cb)({type:ke.Z})],t.prototype,"fullExtent",void 0),(0,r._)([(0,l.Cb)({readOnly:!0})],t.prototype,"hasMultidimensions",void 0),(0,r._)([(0,l.Cb)({json:{read:{source:"maxImageHeight"}}})],t.prototype,"imageMaxHeight",void 0),(0,r._)([(0,l.Cb)({json:{read:{source:"maxImageWidth"}}})],t.prototype,"imageMaxWidth",void 0),(0,r._)([(0,l.Cb)({type:String,json:{type:K.c.jsonValues,read:K.c.read,write:K.c.write}})],t.prototype,"interpolation",void 0),(0,r._)([(0,l.Cb)()],t.prototype,"minScale",void 0),(0,r._)([(0,C.r)("service","minScale")],t.prototype,"readMinScale",null),(0,r._)([(0,l.Cb)()],t.prototype,"maxScale",void 0),(0,r._)([(0,C.r)("service","maxScale")],t.prototype,"readMaxScale",null),(0,r._)([(0,l.Cb)({type:X})],t.prototype,"mosaicRule",null),(0,r._)([(0,C.r)("mosaicRule",["mosaicRule","defaultMosaicMethod"])],t.prototype,"readMosaicRule",null),(0,r._)([(0,c.c)("mosaicRule")],t.prototype,"writeMosaicRule",null),(0,r._)([(0,l.Cb)()],t.prototype,"multidimensionalInfo",void 0),(0,r._)([(0,l.Cb)({type:ie.Z,json:{write:!0}})],t.prototype,"multidimensionalSubset",void 0),(0,r._)([(0,l.Cb)({json:{type:u.z8}})],t.prototype,"noData",void 0),(0,r._)([(0,c.c)("noData")],t.prototype,"writeNoData",null),(0,r._)([(0,l.Cb)({type:String,json:{type:K.k.jsonValues,read:K.k.read,write:K.k.write}})],t.prototype,"noDataInterpretation",void 0),(0,r._)([(0,l.Cb)({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],t.prototype,"objectIdField",void 0),(0,r._)([(0,C.r)("objectIdField")],t.prototype,"readObjectIdField",null),(0,r._)([(0,l.Cb)({})],t.prototype,"geometryType",void 0),(0,r._)([(0,l.Cb)({})],t.prototype,"typeIdField",void 0),(0,r._)([(0,l.Cb)({})],t.prototype,"types",void 0),(0,r._)([(0,l.Cb)({readOnly:!0})],t.prototype,"parsedUrl",null),(0,r._)([(0,l.Cb)({type:Function})],t.prototype,"pixelFilter",void 0),(0,r._)([(0,l.Cb)()],t.prototype,"raster",void 0),(0,r._)([(0,l.Cb)({readOnly:!0})],t.prototype,"sourceType",void 0),(0,r._)([(0,C.r)("sourceType",["serviceSourceType","fields"])],t.prototype,"readSourceType",null),(0,r._)([(0,l.Cb)()],t.prototype,"viewId",void 0),(0,r._)([(0,l.Cb)({types:y.dr,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:y.FK,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],t.prototype,"renderer",null),(0,r._)([(0,C.r)("renderer")],t.prototype,"readRenderer",null),(0,r._)([(0,c.c)("renderer")],t.prototype,"writeRenderer",null),(0,r._)([(0,l.Cb)()],t.prototype,"symbolizer",void 0),(0,r._)([(0,l.Cb)(S.Oh)],t.prototype,"opacity",void 0),(0,r._)([(0,l.Cb)({readOnly:!0})],t.prototype,"rasterFields",null),(0,r._)([(0,l.Cb)({constructOnly:!0})],t.prototype,"rasterFunctionInfos",void 0),(0,r._)([(0,l.Cb)({type:F.Z})],t.prototype,"renderingRule",null),(0,r._)([(0,C.r)("renderingRule",["renderingRule","rasterFunctionInfos"])],t.prototype,"readRenderingRule",null),(0,r._)([(0,c.c)("renderingRule")],t.prototype,"writeRenderingRule",null),(0,r._)([(0,l.Cb)()],t.prototype,"serviceDataType",void 0),(0,r._)([(0,l.Cb)({readOnly:!0,type:me.Z})],t.prototype,"spatialReference",void 0),(0,r._)([(0,C.r)("spatialReference",["spatialReference","extent"])],t.prototype,"readSpatialReference",null),(0,r._)([(0,l.Cb)({json:{type:Pt.jsonValues}})],t.prototype,"pixelType",void 0),(0,r._)([(0,C.r)("pixelType")],t.prototype,"readPixelType",null),(0,r._)([(0,c.c)("pixelType")],t.prototype,"writePixelType",null),(0,r._)([(0,l.Cb)({constructOnly:!0,type:se.Z})],t.prototype,"serviceRasterInfo",void 0),(0,r._)([(0,l.Cb)()],t.prototype,"sourceJSON",void 0),(0,r._)([(0,l.Cb)(S.HQ)],t.prototype,"url",void 0),(0,r._)([(0,l.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,r._)([(0,C.r)("version",["currentVersion","fields","timeInfo"])],t.prototype,"readVersion",null),t=(0,r._)([(0,p.j)("esri.layers.mixins.ArcGISImageService")],t),t};var At=i(17287),Jt=i(71612),Zt=i(17017),Et=i(38009),qt=i(16859),zt=i(34760),Gt=i(72965),Ht=i(28294),Lt=i(60199),Ut=i(32163);let Bt=class extends((0,Jt.h)((0,Ht.n)((0,Gt.M)((0,Et.q)((0,qt.I)(Vt((0,zt.Q)((0,Zt.N)((0,At.Y)((0,o.R)(d.Z))))))))))){constructor(...e){super(...e),this.legendEnabled=!0,this.isReference=null,this.operationalLayerType="ArcGISImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.type="imagery"}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=(0,n.pC)(e)?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(a.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}writeOperationalLayerType(e,t,i){const r="vector-field"===this.renderer?.type;t[i]=r?"ArcGISImageServiceVectorLayer":"ArcGISImageServiceLayer"}get defaultPopupTemplate(){return this.createPopupTemplate()}createPopupTemplate(e){const t=this.rasterFields,i=this.title,r=new Set;let s=!1,n=!1;this.capabilities&&(s=this.capabilities.operations.supportsQuery&&this.fields&&this.fields.length>0,n="esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType);const o=new Set;s&&o.add("raster.itempixelvalue");for(const e of t){const t=e.name.toLowerCase();o.has(t)||t.includes("raster.servicepixelvalue.")||r.add(e.name)}return n&&r.add("raster.magnitude").add("raster.direction"),(0,Ut.eZ)({fields:t,title:i},{...e,visibleFieldNames:r})}queryFeatures(e,t){return this.queryRasters(e,t).then((e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e}))}queryFeatureCount(e,t){return this.queryRasterCount(e,t)}redraw(){this.emit("redraw")}serviceSupportsSpatialReference(e){return(0,Lt.D)(this,e)}};(0,r._)([(0,l.Cb)(S.rn)],Bt.prototype,"legendEnabled",void 0),(0,r._)([(0,l.Cb)({type:["show","hide"]})],Bt.prototype,"listMode",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Bt.prototype,"isReference",void 0),(0,r._)([(0,l.Cb)({type:["ArcGISImageServiceLayer"],json:{origins:{"web-map":{type:["ArcGISImageServiceLayer","ArcGISImageServiceVectorLayer"],read:!1,write:{target:"layerType",ignoreOrigin:!0}}}}})],Bt.prototype,"operationalLayerType",void 0),(0,r._)([(0,c.c)("web-map","operationalLayerType")],Bt.prototype,"writeOperationalLayerType",null),(0,r._)([(0,l.Cb)(S.C_)],Bt.prototype,"popupEnabled",void 0),(0,r._)([(0,l.Cb)({type:s.Z,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],Bt.prototype,"popupTemplate",void 0),(0,r._)([(0,l.Cb)({readOnly:!0})],Bt.prototype,"defaultPopupTemplate",null),(0,r._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],Bt.prototype,"type",void 0),Bt=(0,r._)([(0,p.j)("esri.layers.ImageryLayer")],Bt);const kt=Bt},17287:(e,t,i)=>{i.d(t,{Y:()=>u});var r=i(43697),s=i(92604),n=i(70586),o=i(5600),a=(i(75215),i(67676),i(52011)),l=i(66677);const u=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,l.Qc)(this.url);if((0,n.pC)(e)&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,l.Nm)(e,s.Z.getLogger(this.declaredClass)))}};return(0,r._)([(0,o.Cb)()],t.prototype,"title",null),(0,r._)([(0,o.Cb)({type:String})],t.prototype,"url",null),t=(0,r._)([(0,a.j)("esri.layers.mixins.ArcGISService")],t),t}},60199:(e,t,i)=>{i.d(t,{D:()=>n});var r=i(66677);const s=[];function n(e,t){if((0,r.M8)(e.url??""))return!0;const{wkid:i}=t;for(const t of s){if((e.version??0)>=t[0])return!0;if("function"==typeof t[1]&&(t[1]=t[1]()),t[1].has(i))return!1}return!0}s.push([10.91,()=>{const e=new Set([9709,9716,9741,9761,9766]);for(let t=9712;t<=9713;t++)e.add(t);for(let t=9748;t<=9749;t++)e.add(t);for(let t=20904;t<=20932;t++)e.add(t);for(let t=21004;t<=21032;t++)e.add(t);for(let t=21207;t<=21264;t++)e.add(t);for(let t=21307;t<=21364;t++)e.add(t);for(let t=102759;t<=102760;t++)e.add(t);for(let t=102901;t<=102955;t++)e.add(t);return e}]),s.push([10.9,()=>{const e=new Set([9300,9354,9364,9367,9373,9377,9387,9456,9473,9498,9678,9680,29874,103599,103872,104028]);for(let t=9356;t<=9360;t++)e.add(t);for(let t=9404;t<=9407;t++)e.add(t);for(let t=9476;t<=9482;t++)e.add(t);for(let t=9487;t<=9494;t++)e.add(t);for(let t=9697;t<=9699;t++)e.add(t);return e}]),s.push([10.81,()=>{const e=new Set([9265,9333,103598,103699]);for(let t=9248;t<=9254;t++)e.add(t);for(let t=9271;t<=9273;t++)e.add(t);for(let t=9284;t<=9285;t++)e.add(t);for(let t=21453;t<=21463;t++)e.add(t);return e}]),s.push([10.8,()=>{const e=new Set([8088,8395,8428,8433,8531,8687,8692,8694,8699,8900,9003,9006,9009,9012,9017,9191]);for(let t=8035;t<=8036;t++)e.add(t);for(let t=8455;t<=8456;t++)e.add(t);for(let t=8518;t<=8529;t++)e.add(t);for(let t=8533;t<=8536;t++)e.add(t);for(let t=8538;t<=8540;t++)e.add(t);for(let t=8677;t<=8679;t++)e.add(t);for(let t=8902;t<=8903;t++)e.add(t);for(let t=8907;t<=8910;t++)e.add(t);for(let t=8949;t<=8951;t++)e.add(t);for(let t=8972;t<=8987;t++)e.add(t);for(let t=9039;t<=9040;t++)e.add(t);for(let t=9068;t<=9069;t++)e.add(t);for(let t=9140;t<=9141;t++)e.add(t);for(let t=9148;t<=9150;t++)e.add(t);for(let t=9153;t<=9159;t++)e.add(t);for(let t=9205;t<=9218;t++)e.add(t);for(let t=9221;t<=9222;t++)e.add(t);for(let t=54098;t<=54101;t++)e.add(t);return e}]),s.push([10.71,()=>{const e=new Set([6316]);for(let t=8351;t<=8353;t++)e.add(t);for(let t=9294;t<=9297;t++)e.add(t);for(let t=22619;t<=22621;t++)e.add(t);for(let t=103586;t<=103594;t++)e.add(t);return e}]),s.push([10.7,()=>{const e=new Set([8387,8391,8427,8545,8682,8685,8818,31370,104022,104024,104975]);for(let t=8065;t<=8068;t++)e.add(t);for(let t=8082;t<=8083;t++)e.add(t);for(let t=8379;t<=8385;t++)e.add(t);for(let t=8836;t<=8840;t++)e.add(t);for(let t=8857;t<=8860;t++)e.add(t);for(let t=53035;t<=53037;t++)e.add(t);for(let t=54090;t<=54091;t++)e.add(t);for(let t=102498;t<=102499;t++)e.add(t);return e}]),s.push([10.61,()=>new Set([102497])]),s.push([10.6,()=>{const e=new Set([7803,7805,7887,8086,8232,8237,8240,8246,8249,8252,8255,9019,9391]);for(let t=7755;t<=7787;t++)e.add(t);for(let t=7791;t<=7795;t++)e.add(t);for(let t=7799;t<=7801;t++)e.add(t);for(let t=7825;t<=7831;t++)e.add(t);for(let t=7877;t<=7878;t++)e.add(t);for(let t=7882;t<=7883;t++)e.add(t);for(let t=7991;t<=7992;t++)e.add(t);for(let t=8042;t<=8043;t++)e.add(t);for(let t=8058;t<=8059;t++)e.add(t);for(let t=8311;t<=8348;t++)e.add(t);for(let t=9060;t<=9067;t++)e.add(t);for(let t=102562;t<=102568;t++)e.add(t);for(let t=102799;t<=102900;t++)e.add(t);return e}]),s.push([10.51,()=>{const e=new Set([7683,7881,7886,7899,8888,9e3]);for(let t=8013;t<=8032;t++)e.add(t);for(let t=9053;t<=9057;t++)e.add(t);for(let t=104017;t<=104018;t++)e.add(t);for(let t=104971;t<=104974;t++)e.add(t);return e}]),s.push([10.5,()=>{const e=new Set([6962,7035,7037,7039,7041,7084,7086,7133,7798,102399]);for(let t=4087;t<=4088;t++)e.add(t);for(let t=5896;t<=5899;t++)e.add(t);for(let t=7005;t<=7007;t++)e.add(t);for(let t=7057;t<=7070;t++)e.add(t);for(let t=7073;t<=7082;t++)e.add(t);for(let t=7109;t<=7128;t++)e.add(t);for(let t=7844;t<=7859;t++)e.add(t);return e}])},41818:(e,t,i)=>{i.d(t,{P:()=>o});var r=i(11282),s=i(34599),n=i(14165);async function o(e,t,i){const o=(0,r.en)(e);return(0,s.hH)(o,n.Z.from(t),{...i}).then((e=>e.data.count))}},5396:(e,t,i)=>{i.d(t,{G:()=>o});var r=i(11282),s=i(34599),n=i(14165);async function o(e,t,i){const o=(0,r.en)(e);return(0,s.Ev)(o,n.Z.from(t),{...i}).then((e=>e.data.objectIds))}},4967:(e,t,i)=>{i.d(t,{F:()=>l,e:()=>a});var r=i(11282),s=i(34599),n=i(74889),o=i(14165);async function a(e,t,i){const r=await l(e,t,i);return n.Z.fromJSON(r)}async function l(e,t,i){const n=(0,r.en)(e),a={...i},l=o.Z.from(t),{data:u}=await(0,s.JT)(n,l,l.sourceSpatialReference,a);return u}},28694:(e,t,i)=>{i.d(t,{p:()=>n});var r=i(70586),s=i(69285);function n(e,t,i){if(!i||!i.features||!i.hasZ)return;const n=(0,s.k)(i.geometryType,t,e.outSpatialReference);if(!(0,r.Wi)(n))for(const e of i.features)n(e.geometry)}},98326:(e,t,i)=>{i.d(t,{Z:()=>c});var r,s=i(43697),n=i(96674),o=i(5600),a=i(75215),l=(i(67676),i(52011));const u={1:{id:1,rotation:0,mirrored:!1},2:{id:2,rotation:0,mirrored:!0},3:{id:3,rotation:180,mirrored:!1},4:{id:4,rotation:180,mirrored:!0},5:{id:5,rotation:-90,mirrored:!0},6:{id:6,rotation:90,mirrored:!1},7:{id:7,rotation:90,mirrored:!0},8:{id:8,rotation:-90,mirrored:!1}};let p=r=class extends n.wq{constructor(e){super(e),this.contentType=null,this.exifInfo=null,this.id=null,this.globalId=null,this.keywords=null,this.name=null,this.parentGlobalId=null,this.parentObjectId=null,this.size=null,this.url=null}get orientationInfo(){const{exifInfo:e}=this,t=function(e){const{exifInfo:t,exifName:i,tagName:r}=e;if(!t||!i||!r)return null;const s=t.find((e=>e.name===i));return s?function(e){const{tagName:t,tags:i}=e;if(!i||!t)return null;const r=i.find((e=>e.name===t));return r&&r.value||null}({tagName:r,tags:s.tags}):null}({exifName:"Exif IFD0",tagName:"Orientation",exifInfo:e});return u[t]||null}clone(){return new r({contentType:this.contentType,exifInfo:this.exifInfo,id:this.id,globalId:this.globalId,keywords:this.keywords,name:this.name,parentGlobalId:this.parentGlobalId,parentObjectId:this.parentObjectId,size:this.size,url:this.url})}};(0,s._)([(0,o.Cb)({type:String})],p.prototype,"contentType",void 0),(0,s._)([(0,o.Cb)()],p.prototype,"exifInfo",void 0),(0,s._)([(0,o.Cb)({readOnly:!0})],p.prototype,"orientationInfo",null),(0,s._)([(0,o.Cb)({type:a.z8})],p.prototype,"id",void 0),(0,s._)([(0,o.Cb)({type:String})],p.prototype,"globalId",void 0),(0,s._)([(0,o.Cb)({type:String})],p.prototype,"keywords",void 0),(0,s._)([(0,o.Cb)({type:String})],p.prototype,"name",void 0),(0,s._)([(0,o.Cb)({json:{read:!1}})],p.prototype,"parentGlobalId",void 0),(0,s._)([(0,o.Cb)({json:{read:!1}})],p.prototype,"parentObjectId",void 0),(0,s._)([(0,o.Cb)({type:a.z8})],p.prototype,"size",void 0),(0,s._)([(0,o.Cb)({json:{read:!1}})],p.prototype,"url",void 0),p=r=(0,s._)([(0,l.j)("esri.layers.support.AttachmentInfo")],p);const c=p},56545:(e,t,i)=>{i.d(t,{Z:()=>d});var r,s=i(43697),n=i(96674),o=i(22974),a=i(5600),l=i(75215),u=i(52011),p=i(30556);let c=r=class extends n.wq{constructor(e){super(e),this.attachmentTypes=null,this.attachmentsWhere=null,this.cacheHint=void 0,this.keywords=null,this.globalIds=null,this.name=null,this.num=null,this.objectIds=null,this.returnMetadata=!1,this.size=null,this.start=null,this.where=null}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new r((0,o.d9)({attachmentTypes:this.attachmentTypes,attachmentsWhere:this.attachmentsWhere,cacheHint:this.cacheHint,keywords:this.keywords,where:this.where,globalIds:this.globalIds,name:this.name,num:this.num,objectIds:this.objectIds,returnMetadata:this.returnMetadata,size:this.size,start:this.start}))}};(0,s._)([(0,a.Cb)({type:[String],json:{write:!0}})],c.prototype,"attachmentTypes",void 0),(0,s._)([(0,a.Cb)({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],c.prototype,"attachmentsWhere",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],c.prototype,"cacheHint",void 0),(0,s._)([(0,a.Cb)({type:[String],json:{write:!0}})],c.prototype,"keywords",void 0),(0,s._)([(0,a.Cb)({type:[Number],json:{write:!0}})],c.prototype,"globalIds",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],c.prototype,"name",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],c.prototype,"num",void 0),(0,s._)([(0,a.Cb)({type:[Number],json:{write:!0}})],c.prototype,"objectIds",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{default:!1,write:!0}})],c.prototype,"returnMetadata",void 0),(0,s._)([(0,a.Cb)({type:[Number],json:{write:!0}})],c.prototype,"size",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],c.prototype,"start",void 0),(0,s._)([(0,p.c)("start"),(0,p.c)("num")],c.prototype,"writeStart",null),(0,s._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],c.prototype,"where",void 0),c=r=(0,s._)([(0,u.j)("esri.rest.support.AttachmentQuery")],c),c.from=(0,l.se)(c);const d=c},75935:(e,t,i)=>{i.r(t),i.d(t,{default:()=>h});var r,s=i(43697),n=(i(66577),i(96674)),o=i(22974),a=i(5600),l=i(75215),u=i(52011),p=i(30556),c=i(10158),d=i(82971);let m=r=class extends n.wq{constructor(e){super(e),this.cacheHint=void 0,this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.where=null}_writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,this.start>0&&null==this.where&&(t.definitionExpression="1=1")}clone(){return new r((0,o.d9)({cacheHint:this.cacheHint,dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment.getTime()),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))}};(0,s._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"cacheHint",void 0),(0,s._)([(0,a.Cb)({type:c.n,json:{write:!0}})],m.prototype,"dynamicDataSource",void 0),(0,s._)([(0,a.Cb)({type:String,json:{write:!0}})],m.prototype,"gdbVersion",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{write:!0}})],m.prototype,"geometryPrecision",void 0),(0,s._)([(0,a.Cb)({type:Date})],m.prototype,"historicMoment",void 0),(0,s._)([(0,p.c)("historicMoment")],m.prototype,"_writeHistoricMoment",null),(0,s._)([(0,a.Cb)({type:Number,json:{write:!0}})],m.prototype,"maxAllowableOffset",void 0),(0,s._)([(0,a.Cb)({type:[Number],json:{write:!0}})],m.prototype,"objectIds",void 0),(0,s._)([(0,a.Cb)({type:[String],json:{write:!0}})],m.prototype,"orderByFields",void 0),(0,s._)([(0,a.Cb)({type:[String],json:{write:!0}})],m.prototype,"outFields",void 0),(0,s._)([(0,a.Cb)({type:d.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],m.prototype,"outSpatialReference",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],m.prototype,"relationshipId",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],m.prototype,"start",void 0),(0,s._)([(0,p.c)("start"),(0,p.c)("num")],m.prototype,"writeStart",null),(0,s._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],m.prototype,"num",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],m.prototype,"returnGeometry",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"returnM",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"returnZ",void 0),(0,s._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],m.prototype,"where",void 0),m=r=(0,s._)([(0,u.j)("esri.rest.support.RelationshipQuery")],m),m.from=(0,l.se)(m);const h=m},28141:(e,t,i)=>{i.d(t,{Z:()=>C});var r,s=i(43697),n=i(66577),o=i(92835),a=i(35454),l=i(96674),u=i(22974),p=i(70586),c=i(5600),d=i(75215),m=i(52011),h=i(30556),y=i(33955);i(67676);let f=r=class extends l.wq{constructor(e){super(e),this.groupByFields=void 0,this.topCount=void 0,this.orderByFields=void 0}clone(){return new r({groupByFields:this.groupByFields,topCount:this.topCount,orderByFields:this.orderByFields})}};(0,s._)([(0,c.Cb)({type:[String],json:{write:!0}})],f.prototype,"groupByFields",void 0),(0,s._)([(0,c.Cb)({type:Number,json:{write:!0}})],f.prototype,"topCount",void 0),(0,s._)([(0,c.Cb)({type:[String],json:{write:!0}})],f.prototype,"orderByFields",void 0),f=r=(0,s._)([(0,m.j)("esri.rest.support.TopFilter")],f);const g=f;var b,R=i(82971);const w=new a.X({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),v=new a.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let _=b=class extends l.wq{constructor(e){super(e),this.cacheHint=void 0,this.distance=void 0,this.geometry=null,this.geometryPrecision=void 0,this.maxAllowableOffset=void 0,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.resultType=null,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.start=void 0,this.spatialRelationship="intersects",this.timeExtent=null,this.topFilter=void 0,this.units=null,this.where="1=1"}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new b((0,u.d9)({cacheHint:this.cacheHint,distance:this.distance,geometry:this.geometry,geometryPrecision:this.geometryPrecision,maxAllowableOffset:this.maxAllowableOffset,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,resultType:this.resultType,returnGeometry:this.returnGeometry,returnZ:this.returnZ,returnM:this.returnM,start:this.start,spatialRelationship:this.spatialRelationship,timeExtent:this.timeExtent,topFilter:this.topFilter,units:this.units,where:this.where}))}};(0,s._)([(0,c.Cb)({type:Boolean,json:{write:!0}})],_.prototype,"cacheHint",void 0),(0,s._)([(0,c.Cb)({type:Number,json:{write:{overridePolicy:e=>({enabled:e>0})}}})],_.prototype,"distance",void 0),(0,s._)([(0,c.Cb)({types:n.qM,json:{read:y.im,write:!0}})],_.prototype,"geometry",void 0),(0,s._)([(0,c.Cb)({type:Number,json:{write:!0}})],_.prototype,"geometryPrecision",void 0),(0,s._)([(0,c.Cb)({type:Number,json:{write:!0}})],_.prototype,"maxAllowableOffset",void 0),(0,s._)([(0,c.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],_.prototype,"num",void 0),(0,s._)([(0,c.Cb)({json:{write:!0}})],_.prototype,"objectIds",void 0),(0,s._)([(0,c.Cb)({type:[String],json:{write:!0}})],_.prototype,"orderByFields",void 0),(0,s._)([(0,c.Cb)({type:[String],json:{write:!0}})],_.prototype,"outFields",void 0),(0,s._)([(0,c.Cb)({type:R.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],_.prototype,"outSpatialReference",void 0),(0,s._)([(0,c.Cb)({type:String,json:{write:!0}})],_.prototype,"resultType",void 0),(0,s._)([(0,c.Cb)({json:{write:!0}})],_.prototype,"returnGeometry",void 0),(0,s._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"returnM",void 0),(0,s._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"returnZ",void 0),(0,s._)([(0,c.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],_.prototype,"start",void 0),(0,s._)([(0,h.c)("start"),(0,h.c)("num")],_.prototype,"writeStart",null),(0,s._)([(0,c.Cb)({type:String,json:{read:{source:"spatialRel",reader:w.read},write:{target:"spatialRel",writer:w.write}}})],_.prototype,"spatialRelationship",void 0),(0,s._)([(0,c.Cb)({type:o.Z,json:{write:!0}})],_.prototype,"timeExtent",void 0),(0,s._)([(0,c.Cb)({type:g,json:{write:!0}})],_.prototype,"topFilter",void 0),(0,s._)([(0,c.Cb)({type:String,json:{read:v.read,write:{writer:v.write,overridePolicy(e){return{enabled:(0,p.pC)(e)&&(0,p.pC)(this.distance)&&this.distance>0}}}}})],_.prototype,"units",void 0),(0,s._)([(0,c.Cb)({type:String,json:{write:!0}})],_.prototype,"where",void 0),_=b=(0,s._)([(0,m.j)("esri.rest.support.TopFeaturesQuery")],_),_.from=(0,d.se)(_);const C=_}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9070],{99070:(e,t,n)=>{n.r(t),n.d(t,{loadGLTFMesh:()=>I});var r=n(22303),o=n(3172),s=n(30175),a=n(22021),c=n(70586),i=n(21787),u=n(46521),l=n(65617),f=n(88669),p=n(62540),m=n(60746),g=n(91024),d=n(71630),x=n(56481),C=n(20773),T=n(11077),w=n(8323),h=n(66459),y=n(40270),b=n(88246),v=n(91911),A=n(15317),R=n(54388),E=n(57758),M=n(35371),S=n(56067),$=n(75488),B=n(10816);async function I(e,t,n){const a=new y.C(function(e){const t=e?.resolveFile;return t?{busy:!1,request:async(e,n,r)=>{const s=t(e),a="image"===n?"image":"binary"===n?"array-buffer":"json";return(await(0,o.default)(s,{responseType:a,signal:(0,c.pC)(r)?r.signal:null})).data}}:null}(n)),i=(await(0,b.Q)(a,t,n,!0)).model,u=i.lods.shift(),p=new Map,C=new Map;i.textures.forEach(((e,t)=>p.set(t,function(e){return new g.Z({data:((0,A.$A)(e.data),e.data),wrap:P(e.parameters.wrap)})}(e)))),i.materials.forEach(((e,t)=>C.set(t,function(e,t){const n=new r.Z(function(e,t){return(0,f.f)(D(e[0]),D(e[1]),D(e[2]),t)}(e.color,e.opacity)),o=e.emissiveFactor?new r.Z(function(e){return(0,l.f)(D(e[0]),D(e[1]),D(e[2]))}(e.emissiveFactor)):null;return new m.Z({color:n,colorTexture:(0,c.Wg)((0,c.yw)(e.textureColor,(e=>t.get(e)))),normalTexture:(0,c.Wg)((0,c.yw)(e.textureNormal,(e=>t.get(e)))),emissiveColor:o,emissiveTexture:(0,c.Wg)((0,c.yw)(e.textureEmissive,(e=>t.get(e)))),occlusionTexture:(0,c.Wg)((0,c.yw)(e.textureOcclusion,(e=>t.get(e)))),alphaMode:N(e.alphaMode),alphaCutoff:e.alphaCutoff,doubleSided:e.doubleSided,metallic:e.metallicFactor,roughness:e.roughnessFactor,metallicRoughnessTexture:(0,c.Wg)((0,c.yw)(e.textureMetallicRoughness,(e=>t.get(e)))),colorTextureTransform:e.colorTextureTransform,normalTextureTransform:e.normalTextureTransform,occlusionTextureTransform:e.occlusionTextureTransform,emissiveTextureTransform:e.emissiveTextureTransform,metallicRoughnessTextureTransform:e.metallicRoughnessTextureTransform})}(e,p))));const T=function(e){let t=0;const n={color:!1,tangent:!1,normal:!1,texCoord0:!1},r=new Map,o=new Map,a=[];for(const c of e.parts){const{attributes:{position:e,normal:i,color:u,tangent:l,texCoord0:f}}=c,p=`\n ${k(e,r)}/\n ${k(i,r)}/\n ${k(u,r)}/\n ${k(l,r)}/\n ${k(f,r)}/\n ${F(c.transform)}\n `;let m=!1;const g=(0,s.s1)(o,p,(()=>(m=!0,{start:t,length:e.count})));m&&(t+=e.count),i&&(n.normal=!0),u&&(n.color=!0),l&&(n.tangent=!0),f&&(n.texCoord0=!0),a.push({gltf:c,writeVertices:m,region:g})}return{vertexAttributes:{position:(0,w.gS)(x.fP,t),normal:n.normal?(0,w.gS)(x.ct,t):null,tangent:n.tangent?(0,w.gS)(x.ek,t):null,color:n.color?(0,w.gS)(x.mc,t):null,texCoord0:n.texCoord0?(0,w.gS)(x.Eu,t):null},parts:a,components:[]}}(u);for(const e of T.parts)L(T,e,C);const{position:v,normal:R,tangent:E,color:M,texCoord0:S}=T.vertexAttributes,$={position:v.typedBuffer,normal:(0,c.pC)(R)?R.typedBuffer:null,tangent:(0,c.pC)(E)?E.typedBuffer:null,uv:(0,c.pC)(S)?S.typedBuffer:null,color:(0,c.pC)(M)?M.typedBuffer:null},B=(0,h.w1)($,e,n);return{transform:B.transform,components:T.components,spatialReference:e.spatialReference,vertexAttributes:new d.Q({position:B.vertexAttributes.position,normal:B.vertexAttributes.normal,tangent:B.vertexAttributes.tangent,color:$.color,uv:$.uv})}}function k(e,t){if((0,c.Wi)(e))return"-";const n=e.typedBuffer;return`${(0,s.s1)(t,n.buffer,(()=>t.size))}/${n.byteOffset}/${n.byteLength}`}function F(e){return(0,c.pC)(e)?e.toString():"-"}function L(e,t,n){t.writeVertices&&function(e,t){const{position:n,normal:r,tangent:o,color:s,texCoord0:l}=e.vertexAttributes,f=t.region.start,{attributes:p,transform:m}=t.gltf,g=p.position.count;if((0,C.t)(n.slice(f,g),p.position,m),(0,c.pC)(p.normal)&&(0,c.pC)(r)){const e=(0,i.b)((0,u.c)(),m),t=r.slice(f,g);(0,C.a)(t,p.normal,e),(0,a.oc)(e)&&(0,C.n)(t,t)}else(0,c.pC)(r)&&(0,S.f)(r,0,0,1,{dstIndex:f,count:g});if((0,c.pC)(p.tangent)&&(0,c.pC)(o)){const e=(0,i.b)((0,u.c)(),m),t=o.slice(f,g);(0,T.t)(t,p.tangent,e),(0,a.oc)(e)&&(0,T.n)(t,t)}else(0,c.pC)(o)&&(0,$.f)(o,0,0,1,1,{dstIndex:f,count:g});if((0,c.pC)(p.texCoord0)&&(0,c.pC)(l)?(0,B.n)(l.slice(f,g),p.texCoord0):(0,c.pC)(l)&&(0,B.f)(l,0,0,{dstIndex:f,count:g}),(0,c.pC)(p.color)&&(0,c.pC)(s)){const e=p.color,t=s.slice(f,g);if(4===e.elementCount)e instanceof x.ek?(0,T.s)(t,e,255):e instanceof x.mc?(0,$.c)(t,e):e instanceof x.v6&&(0,T.a)(t,e,8);else{(0,$.f)(t,255,255,255,255);const n=x.ne.fromTypedArray(t.typedBuffer,t.typedBufferStride);e instanceof x.ct?(0,C.s)(n,e,255):e instanceof x.ne?(0,S.c)(n,e):e instanceof x.mw&&(0,C.b)(n,e,8)}}else(0,c.pC)(s)&&(0,$.f)(s.slice(f,g),255,255,255,255)}(e,t);const r=t.gltf,o=function(e,t){switch(t){case M.MX.TRIANGLES:return(0,v.nh)(e,R.DX);case M.MX.TRIANGLE_STRIP:return(0,v.DA)(e);case M.MX.TRIANGLE_FAN:return(0,v.jX)(e)}}(r.indices||r.attributes.position.count,r.primitiveType),s=t.region.start;if(s)for(let e=0;e<o.length;e++)o[e]+=s;e.components.push(new p.Z({faces:o,material:n.get(r.material),trustSourceNormals:!0}))}function N(e){switch(e){case"OPAQUE":return"opaque";case"MASK":return"mask";case"BLEND":return"blend"}}function P(e){return{horizontal:W(e.s),vertical:W(e.t)}}function W(e){switch(e){case M.e8.CLAMP_TO_EDGE:return"clamp";case M.e8.MIRRORED_REPEAT:return"mirror";case M.e8.REPEAT:return"repeat"}}function D(e){return e**(1/E.K)*255}}}]);