@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
@@ -1 +0,0 @@
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 h={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 f(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,h=l/t;if(h>1){for(let e=1;e<=h-1;e++){const r=e*t,a=u*r+s,o=c*r+n;i.push([a,o])}const e=(l+Math.floor(h-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=f(r,t);e[0]=r+i*(-2*t)}else if(r<i){const t=f(r,i);e[0]=r+t*(-2*i)}}else{const r=e.x;if(r>t){const i=f(r,t);e=e.clone().offset(i*(-2*t),0)}else if(r<i){const t=f(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*f(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=h[T].maxX,_=h[T].minX,k=h[T].plus180Line,F=h[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=f(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=f(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),h=i(17445),f=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:h}=t;let f=(0,z.nF)(e,c,h);if(!u.intersects(f))return{location:f,value:null};if((0,l.pC)(this.rasterInfo.transform)){const e=this.rasterInfo.transform.inverseTransform(f);if(!this.rasterInfo.nativeExtent.intersects(e))return{location:e,value:null};f=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:f,value:null};const y=this.identifyPixelLocation(f,p,null,m);if(null===y)return{location:f,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:f,value:null};const T=I*w+b;return this._processIdentifyResult(C,{srcLocation:f,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),h=u-Math.round((s/2-o)/(c-o)*t);let f=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-h:l===n?t-f:u;f+=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,h=a.y*c,f=new U.Z({xmin:n.xmin+u*t.x,xmax:n.xmin+u*(t.x+i.width-1),ymin:n.ymax-h*(t.y+i.height-1),ymax:n.ymax-h*t.y,spatialReference:n.spatialReference});if(!s)return{extent:f,srcExtent:f,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:f,srcExtent:f,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:f,srcExtent:f,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,h=r&&(0,l.pC)(u)?u.tileSize[0]:a.blockWidth,f=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/f,x=(d.x-c.x)/m/h,I=Math.min(f-1,Math.floor((g-Math.floor(g))*f)),b=Math.min(h-1,Math.floor((x-Math.floor(x))*h));return{pyramidLevel:t,row:Math.floor(g),col:Math.floor(x),rowOffset:I,colOffset:b,blockWidth:h,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,h=u-o*e.y;return new U.Z({xmin:l,xmax:c,ymin:h,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:h,srcHeight:f}=n;if(0===h||0===f)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:h,height:f,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===h&&b===f&&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:h,height:f,wrapCount:d}=i;const p=this._getRasterTileAlignmentInfo(e,0);r.buffer&&(c-=r.buffer.cols,u-=r.buffer.rows,h+=2*r.buffer.cols,f+=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+h&&(m=0));const x=Math.floor(c/a),I=Math.floor(u/o),b=Math.floor((c+h+m-1)/a),w=Math.floor((u+f+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 h=W(this.url,r.sliceId),f=`${e}/${t}/${i}`;let d=H(h,r.registryId,f);if((0,l.Wi)(d)){const s=new AbortController;d=this.fetchRawTile(e,t,i,{...r,signal:s.signal}),A(h,r.registryId,f,d,s),d.catch((()=>L(h,r.registryId,f)))}return r.signal&&(0,u.fu)(r,(()=>{E(h,r.registryId,f)})),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,h=l<n&&c*u>=16,f=l===n&&this._requireTooManySrcTiles(a,o,t,i);if(h||f||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 f=!o||r.srcResolution&&o.x+o.y<r.srcResolution.x+r.srcResolution.y;if(h&&r.srcResolution&&f){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 h=Math.ceil((c.xmax-c.xmin)/a.x-.1),f=Math.ceil((c.ymax-c.ymin)/a.y-.1);t.pyramidLevel=n,t.pyramidResolution=a,t.srcWidth=h,t.srcHeight=f}_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:h,identifyOptions:f}=t;let d=(0,D.MO)(o,f.transposedVariableName);if(h){const e=(0,D.Ur)(d,(0,l.Wg)(f.multidimensionalDefinition),(0,l.Wg)(f.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,f.Cb)()],$.prototype,"_rasterTileAlighmentInfo",void 0),(0,r._)([(0,f.Cb)({readOnly:!0})],$.prototype,"_isGlobalWrappableSource",null),(0,r._)([(0,f.Cb)(v.HQ)],$.prototype,"url",null),(0,r._)([(0,f.Cb)({type:String,json:{write:!0}})],$.prototype,"datasetName",void 0),(0,r._)([(0,f.Cb)({type:String,json:{write:!0}})],$.prototype,"datasetFormat",void 0),(0,r._)([(0,f.Cb)()],$.prototype,"rasterInfo",void 0),(0,r._)([(0,f.Cb)()],$.prototype,"ioConfig",void 0),(0,r._)([(0,f.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,h=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:h}}};(0,r._)([(0,f.Cb)({type:String,json:{write:!0}})],X.prototype,"datasetFormat",void 0),(0,r._)([(0,f.Cb)()],X.prototype,"tileType",void 0),(0,r._)([(0,f.Cb)()],X.prototype,"rasterFunction",void 0),X=(0,r._)([(0,y.j)("esri.layers.support.rasterDatasets.FunctionRaster")],X);const Y=X;var K=i(41214),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(),h=c??u,f=u??c;if((0,l.pC)(s.values)){const e=s.values.filter((e=>{if(Array.isArray(e)){if(h===f)return e[0]<=h&&e[1]>=h;const t=e[0]<=h&&e[1]>h||e[0]<f&&e[1]>=f,i=e[0]>=h&&e[1]<=f||e[0]<h&&e[1]>f;return t||i}return h===f?e===h:e>=h&&e<=f}));if(e.length){const t=e.sort(((e,t)=>h===f?(e[0]??e)-(t[0]??t):Math.abs((e[1]??e)-f)-Math.abs((t[1]??t)-f)))[0];n.values=[t]}else i=null}else if(s.hasRegularIntervals&&s.extent){const[e,t]=s.extent;h>t||f<e?i=null:n.values=h===f?[h]:[Math.max(e,h),Math.min(t,f)]}}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.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,f.Cb)()],t.prototype,"_cachedRendererJson",void 0),(0,r._)([(0,f.Cb)()],t.prototype,"_cachedRasterFunctionJson",void 0),(0,r._)([(0,f.Cb)()],t.prototype,"_compatibleFullExtent",void 0),(0,r._)([(0,f.Cb)()],t.prototype,"_rasterJobHandler",void 0),(0,r._)([(0,f.Cb)()],t.prototype,"bandIds",void 0),(0,r._)([(0,f.Cb)({json:{origins:{service:{read:{source:"copyrightText"}}}}})],t.prototype,"copyright",void 0),(0,r._)([(0,f.Cb)({json:{read:!1}})],t.prototype,"fullExtent",null),(0,r._)([(0,f.Cb)()],t.prototype,"interpolation",void 0),(0,r._)([(0,f.Cb)()],t.prototype,"ioConfig",void 0),(0,r._)([(0,f.Cb)({type:[R.Z],json:{write:!0}})],t.prototype,"multidimensionalDefinition",null),(0,r._)([(0,f.Cb)({type:C.Z,json:{write:!0}})],t.prototype,"multidimensionalSubset",void 0),(0,r._)([(0,f.Cb)()],t.prototype,"raster",void 0),(0,r._)([(0,f.Cb)({type:T.Z})],t.prototype,"rasterFunction",void 0),(0,r._)([(0,f.Cb)()],t.prototype,"rasterInfo",void 0),(0,r._)([(0,f.Cb)()],t.prototype,"sourceJSON",void 0),(0,r._)([(0,f.Cb)({readOnly:!0,type:ie.Z,json:{read:!1}})],t.prototype,"spatialReference",void 0),(0,r._)([(0,f.Cb)({json:{read:!1}})],t.prototype,"tileInfo",null),(0,r._)([(0,f.Cb)(v.HQ)],t.prototype,"url",null),(0,r._)([(0,f.Cb)({types:n.dr})],t.prototype,"renderer",null),(0,r._)([(0,f.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),he=i(69608),fe=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 h=new Uint8Array(u.data),f=this._getTileEndAndContentType(h,c);if(0===f.recordSize)return null;const d=await this.request(l,{range:{from:f.position,to:f.position+f.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,h=e.geodataXform?.spatialReference,f=new ie.Z(u?.wkid||u?.wkt?u:h);let d=new U.Z({xmin:e.extent.xmin,ymin:e.extent.ymin,xmax:e.extent.xmax,ymax:e.extent.ymax,spatialReference:f});const p=new J.Z({x:e.pixelSizeX,y:e.pixelSizeY,spatialReference:f}),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,f);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:f}),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 fe.Z({width:m,height:y,pixelType:t,bandCount:i,extent:d,nativeExtent:x,transform:g,spatialReference:f,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:h}=this.rasterInfo,f=r?.[0];if((0,l.Wi)(h)||!f)return`${this.url}/_alllayers/${u}/${c}.bundle`;let d="_yxs";if(!s){d=h.variables.find((e=>e.name===f.variableName)).dimensions[0].values.indexOf(f.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||f.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,f.Cb)({readOnly:!0})],Ie.prototype,"storageInfo",void 0),(0,r._)([(0,f.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:h}=i,f=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:f.width/c,y:f.height/u},m=new fe.Z({width:c,height:u,pixelType:h,extent:f,nativeExtent:o,transform:l,pixelSize:p,spatialReference:f.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)),h=await(0,u.as)([s,c]);if(!h[0].value&&h[1].value)throw new a.Z("inmemory-raster:open","failed to build in memory raster");this._pixelBlockTiles=h[0].value,n||(this.rasterInfo.statistics=h[1].value?.statistics),o||(this.rasterInfo.histograms=h[1].value?.histograms)}};(0,r._)([(0,f.Cb)({type:String,json:{write:!0}})],Se.prototype,"datasetFormat",void 0),(0,r._)([(0,f.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 h=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:h,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 h=!0;if(n){const e=n.forwardCoefficients;h=e&&0===e[1]&&0===e[2],h&&(n=null,c=u)}const f=new ve({data:{extent:u,nativeExtent:c,transform:n,pixelBlock:t,statistics:r,histograms:s,keyProperties:{DateType:"Processed"},isPseudoSpatialReference:a}});await f.open(),f.data=null,this._set("rasterInfo",f.rasterInfo),this._inMemoryRaster=f}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,f.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:h}=s,f=.5/s.width*h.x,d=Math.max(h.x,h.y),{lods:p}=n;("Map"!==this.tileType&&0!==r.maxScale||Math.abs(h.x-h.y)>f||!p.some((e=>Math.abs(e.resolution-d)<f)))&&(h.x=h.y=o.resolution,s.width=Math.ceil((u.xmax-u.xmin)/h.x-.1),s.height=Math.ceil((u.ymax-u.ymin)/h.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}`,h=this._slices?o?{variable:r.transposedVariableName}:{sliceId:r.sliceId||0}:null,{data:f}=await this.request(u,{query:h,responseType:"array-buffer",signal:r.signal});if(!f)return null;const d=o?a.tileSize:s.tileInfo.size,p=await this.decodePixelBlock(f,{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 fe.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 h=a;return l>0&&(h=s.find((e=>Math.abs(e.scale-l)<r))??a,this._levelOffset=h.level-a.level),[u,h]}};(0,r._)([(0,f.Cb)({type:String,json:{write:!0}})],Le.prototype,"datasetFormat",void 0),(0,r._)([(0,f.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:h}=this.rasterInfo,f=[],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(h/o/c**m)-1;p+=(e+1)*(t+1)*d*4,f.push({maxRow:t,maxCol:e,minCol:0,minRow:0})}this.rasterInfo.storageInfo.blockBoundary=f,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:h,actualTileWidth:f,actualTileHeight:d}=this._getTileLocation(e,t,i);if(!h||0===h.length)return null;if(0===h[0].from&&0===h[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:h[g].from,to:h[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(f!==s||d!==n){let e=S.mask;if(e)for(g=0;g<n;g++)if(R=g*s,g<d)for(v=f;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<f;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,h,f=0,d=0;for(h=0;h<e;h++)d=n**h,c=Math.ceil(a/r/d),u=Math.ceil(o/s/d),f+=c*u;d=n**e,c=Math.ceil(a/r/d),u=Math.ceil(o/s/d),f+=t*c+i,f*=4*l;const p=this._storageIndex.subarray(f,f+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"),h=parseInt(u.getAttribute("x"),10),f=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:h,blockHeight:f,pyramidBlockWidth:h,pyramidBlockHeight:f,compression:o,pyramidScalingFactor:w}),v=new J.Z({x:x.width/r,y:x.height/s,spatialReference:_}),R=new fe.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,f.Cb)()],Ve.prototype,"_files",void 0),(0,r._)([(0,f.Cb)()],Ve.prototype,"_storageIndex",void 0),(0,r._)([(0,f.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),h=(0,Ye.ee)(o),f=(0,Ye.I7)(o);if(this._headerInfo={littleEndian:r,isBigTiff:n,ifds:o,pyramidIFDs:h,maskIFDs:f,...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:h,pyramidBlockHeight:f,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:h,pyramidBlockHeight:f,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 fe.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}))),h=await Promise.all(u),f=h.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),d=1===h.length?h[0].data:new ArrayBuffer(f),p=[0],m=[0];if(h.length>1){const e=new Uint8Array(d);for(let t=0,i=0;t<h.length;t++){const r=h[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 h=Qe(l,"TILEBYTECOUNTS"),{minRow:f,minCol:d,maxRow:p,maxCol:m}=n[a];if(t>p||i>m||t<f||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]+h[w+b-1]-1}];if(c){let e=!0;for(let t=0;t<b;t++)if(u[w+t]+h[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]+h[w+e]-1}}const S=u[w],v=h[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,f.Cb)()],tt.prototype,"_files",void 0),(0,r._)([(0,f.Cb)()],tt.prototype,"_headerInfo",void 0),(0,r._)([(0,f.Cb)()],tt.prototype,"_bufferSize",void 0),(0,r._)([(0,f.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 h=()=>(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((()=>h()))):null);return h()}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}`);if(this._primaryRaster=t,this.rasterFunction){const e=(0,K.Ue)(this.rasterFunction.toJSON(),{raster:t}),i=new Y({rasterFunction:e});try{await i.open(),this.raster=i}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,h.YP)((()=>this.customParameters),(e=>{this.raster&&(this.raster.ioConfig.customFetchParameters=e)})))}};(0,r._)([(0,f.Cb)()],at.prototype,"_primaryRaster",void 0),(0,r._)([(0,f.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,f.Cb)({json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"bilinear"!==this.interpolation}}}}}),(0,p.J)(he.c)],at.prototype,"interpolation",void 0),(0,r._)([(0,f.Cb)(v.rn)],at.prototype,"legendEnabled",void 0),(0,r._)([(0,f.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],at.prototype,"isReference",void 0),(0,r._)([(0,f.Cb)({type:["show","hide"]})],at.prototype,"listMode",void 0),(0,r._)([(0,f.Cb)({json:{read:!0,write:!0}})],at.prototype,"blendMode",void 0),(0,r._)([(0,f.Cb)()],at.prototype,"sourceJSON",void 0),(0,r._)([(0,f.Cb)({readOnly:!0,json:{origins:{service:{read:{source:"currentVersion"}}}}})],at.prototype,"version",void 0),(0,r._)([(0,f.Cb)({readOnly:!0,json:{read:!1}})],at.prototype,"type",void 0),(0,r._)([(0,f.Cb)({type:["ArcGISTiledImageServiceLayer"]})],at.prototype,"operationalLayerType",void 0),(0,r._)([(0,f.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,f.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,f.Cb)({readOnly:!0})],at.prototype,"defaultPopupTemplate",null),(0,r._)([(0,f.Cb)({readOnly:!0,type:[ue.Z]})],at.prototype,"fields",void 0),(0,r._)([(0,f.Cb)({readOnly:!0,type:[ue.Z]})],at.prototype,"rasterFields",null),(0,r._)([(0,f.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)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2133],{93860:(e,t,r)=>{function n(e,t){const r=e.count;t||(t=new e.TypedArrayConstructor(r));for(let n=0;n<r;n++)t[n]=e.get(n);return t}r.d(t,{m:()=>n}),Object.freeze(Object.defineProperty({__proto__:null,copy:function(e,t,r){const n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride,_=r?r.count:t.count;let i=(r&&r.dstIndex?r.dstIndex:0)*o,E=(r&&r.srcIndex?r.srcIndex:0)*a;for(let e=0;e<_;++e)n[i]=s[E],i+=o,E+=a},makeDense:n},Symbol.toStringTag,{value:"Module"}))},10816:(e,t,r)=>{r.d(t,{f:()=>a,n:()=>s});var n=r(79583);function o(e,t,r){const n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride,_=r?r.count:t.count;let i=(r&&r.dstIndex?r.dstIndex:0)*o,E=(r&&r.srcIndex?r.srcIndex:0)*a;for(let e=0;e<_;++e)n[i]=s[E],n[i+1]=s[E+1],i+=o,E+=a}function s(e,t,r){const s=e.typedBuffer,a=e.typedBufferStride,_=t.typedBuffer,i=t.typedBufferStride,E=r?r.count:t.count;let T=(r&&r.dstIndex?r.dstIndex:0)*a,u=(r&&r.srcIndex?r.srcIndex:0)*i;if((0,n.U)(t.elementType)){const e=(0,n.Op)(t.elementType);if((0,n.B3)(t.elementType))for(let t=0;t<E;++t)s[T]=Math.max(_[u]/e,-1),s[T+1]=Math.max(_[u+1]/e,-1),T+=a,u+=i;else for(let t=0;t<E;++t)s[T]=_[u]/e,s[T+1]=_[u+1]/e,T+=a,u+=i}else o(e,t,r);return e}function a(e,t,r,n){const o=e.typedBuffer,s=e.typedBufferStride,a=n?.count??e.count;let _=(n?.dstIndex??0)*s;for(let e=0;e<a;++e)o[_]=t,o[_+1]=r,_+=s}Object.freeze(Object.defineProperty({__proto__:null,copy:o,fill:a,normalizeIntegerBuffer:s},Symbol.toStringTag,{value:"Module"}))},11077:(e,t,r)=>{r.d(t,{a:()=>_,n:()=>s,s:()=>a,t:()=>o});var n=r(72220);function o(e,t,r){if(e.count!==t.count)return void n.c.error("source and destination buffers need to have the same number of elements");const o=e.count,s=r[0],a=r[1],_=r[2],i=r[3],E=r[4],T=r[5],u=r[6],c=r[7],R=r[8],A=e.typedBuffer,f=e.typedBufferStride,N=t.typedBuffer,d=t.typedBufferStride;for(let e=0;e<o;e++){const t=e*f,r=e*d,n=N[r],o=N[r+1],S=N[r+2],l=N[r+3];A[t]=s*n+i*o+u*S,A[t+1]=a*n+E*o+c*S,A[t+2]=_*n+T*o+R*S,A[t+3]=l}}function s(e,t){const r=Math.min(e.count,t.count),n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride;for(let e=0;e<r;e++){const t=e*o,r=e*a,_=s[r],i=s[r+1],E=s[r+2],T=_*_+i*i+E*E;if(T>0){const e=1/Math.sqrt(T);n[t]=e*_,n[t+1]=e*i,n[t+2]=e*E}}}function a(e,t,r){const n=Math.min(e.count,t.count),o=e.typedBuffer,s=e.typedBufferStride,a=t.typedBuffer,_=t.typedBufferStride;for(let e=0;e<n;e++){const t=e*s,n=e*_;o[t]=r*a[n],o[t+1]=r*a[n+1],o[t+2]=r*a[n+2],o[t+3]=r*a[n+3]}}function _(e,t,r){const n=Math.min(e.count,t.count),o=e.typedBuffer,s=e.typedBufferStride,a=t.typedBuffer,_=t.typedBufferStride;for(let e=0;e<n;e++){const t=e*s,n=e*_;o[t]=a[n]>>r,o[t+1]=a[n+1]>>r,o[t+2]=a[n+2]>>r,o[t+3]=a[n+3]>>r}}Object.freeze(Object.defineProperty({__proto__:null,normalize:s,scale:a,shiftRight:_,transformMat3:o,transformMat4:function(e,t,r){if(e.count!==t.count)return void n.c.error("source and destination buffers need to have the same number of elements");const o=e.count,s=r[0],a=r[1],_=r[2],i=r[3],E=r[4],T=r[5],u=r[6],c=r[7],R=r[8],A=r[9],f=r[10],N=r[11],d=r[12],S=r[13],l=r[14],I=r[15],O=e.typedBuffer,C=e.typedBufferStride,p=t.typedBuffer,L=t.typedBufferStride;for(let e=0;e<o;e++){const t=e*C,r=e*L,n=p[r],o=p[r+1],m=p[r+2],M=p[r+3];O[t]=s*n+E*o+R*m+d*M,O[t+1]=a*n+T*o+A*m+S*M,O[t+2]=_*n+u*o+f*m+l*M,O[t+3]=i*n+c*o+N*m+I*M}}},Symbol.toStringTag,{value:"Module"}))},75488:(e,t,r)=>{function n(e,t,r){const n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride,_=r?r.count:t.count;let i=(r&&r.dstIndex?r.dstIndex:0)*o,E=(r&&r.srcIndex?r.srcIndex:0)*a;for(let e=0;e<_;++e)n[i]=s[E],n[i+1]=s[E+1],n[i+2]=s[E+2],n[i+3]=s[E+3],i+=o,E+=a}function o(e,t,r,n,o,s){const a=e.typedBuffer,_=e.typedBufferStride,i=s?.count??e.count;let E=(s?.dstIndex??0)*_;for(let e=0;e<i;++e)a[E]=t,a[E+1]=r,a[E+2]=n,a[E+3]=o,E+=_}r.d(t,{c:()=>n,f:()=>o}),Object.freeze(Object.defineProperty({__proto__:null,copy:n,fill:o},Symbol.toStringTag,{value:"Module"}))},23670:(e,t,r)=>{r.d(t,{G:()=>o});var n=r(20102);let o=class{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}since(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new n.Z(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new o(this.major,this.minor,this._context)}static parse(e,t=""){const[r,s]=e.split("."),a=/^\s*\d+\s*$/;if(!r||!r.match||!r.match(a))throw new n.Z((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!s||!s.match||!s.match(a))throw new n.Z((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const _=parseInt(r,10),i=parseInt(s,10);return new o(_,i,t)}}},79583:(e,t,r)=>{function n(e){switch(e){case"u8":case"i8":return 1;case"u16":case"i16":return 2;case"u32":case"i32":case"f32":return 4;case"f64":return 8}}function o(e){switch(e){case"u8":case"u16":case"u32":return!1;case"i8":case"i16":case"i32":case"f32":case"f64":return!0}}function s(e){switch(e){case"u8":case"u16":case"u32":case"i8":case"i16":case"i32":return!0;case"f32":case"f64":return!1}}function a(e){switch(e){case"u8":return 255;case"u16":return 65535;case"u32":return 4294967295;case"i8":return 127;case"i16":return 32767;case"i32":return 2147483647;case"f32":return 3402823e32;case"f64":return 179769e303}}r.d(t,{B3:()=>o,Op:()=>a,U:()=>s,n1:()=>n})},8323:(e,t,r)=>{r.d(t,{gS:()=>o});var n=r(79583);function o(e,t){return new e(new ArrayBuffer(t*e.ElementCount*(0,n.n1)(e.ElementType)))}Object.freeze(Object.defineProperty({__proto__:null,copy:function(e,t,r){const n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride,_=r?r.count:t.count;let i=(r&&r.dstIndex?r.dstIndex:0)*o,E=(r&&r.srcIndex?r.srcIndex:0)*a;for(let e=0;e<_;++e){for(let e=0;e<9;++e)n[i+e]=s[E+e];i+=o,E+=a}}},Symbol.toStringTag,{value:"Module"})),Object.freeze(Object.defineProperty({__proto__:null,copy:function(e,t,r){const n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride,_=r?r.count:t.count;let i=(r&&r.dstIndex?r.dstIndex:0)*o,E=(r&&r.srcIndex?r.srcIndex:0)*a;for(let e=0;e<_;++e){for(let e=0;e<16;++e)n[i+e]=s[E+e];i+=o,E+=a}}},Symbol.toStringTag,{value:"Module"})),r(93860),r(10816),r(56067),r(75488)},40270:(e,t,r)=>{r.d(t,{C:()=>E});var n=r(3172),o=r(66643),s=r(20102),a=r(70586),_=r(95330),i=r(17452);class E{constructor(e){this._streamDataRequester=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,i.HK)(e)?((0,_.k_)(t),(0,i.AH)(e)):this._load("binary",e,t)}async loadImage(e,t){return this._load("image",e,t)}async _load(e,t,r){if((0,a.Wi)(this._streamDataRequester))return(await(0,n.default)(t,{responseType:T[e]})).data;const i=await(0,o.q6)(this._streamDataRequester.request(t,e,r));if(!0===i.ok)return i.value;throw(0,_.r9)(i.error),new s.Z("",`Request for resource failed: ${i.error}`)}}const T={image:"image",binary:"array-buffer",json:"json"}},91911:(e,t,r)=>{r.d(t,{DA:()=>a,jX:()=>_,nh:()=>s});var n=r(1533),o=r(54388);function s(e,t=o.p){return"number"==typeof e?t(e):(0,n.Uc)(e)||(0,n.lq)(e)?new Uint32Array(e):e}function a(e){const t="number"==typeof e?e:e.length;if(t<3)return[];const r=t-2,n=(0,o.$z)(r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(n[e++]=t,n[e++]=t+1,n[e++]=t+2):(n[e++]=t+1,n[e++]=t,n[e++]=t+2)}else{let t=0;for(let o=0;o<r;o+=1)if(o%2==0){const r=e[o],s=e[o+1],a=e[o+2];n[t++]=r,n[t++]=s,n[t++]=a}else{const r=e[o+1],s=e[o],a=e[o+2];n[t++]=r,n[t++]=s,n[t++]=a}}return n}function _(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,n=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)n[e++]=0,n[e++]=t+1,n[e++]=t+2;return n}{const t=e[0];let o=e[1],s=0;for(let a=0;a<r;++a){const r=e[a+2];n[s++]=t,n[s++]=o,n[s++]=r,o=r}return n}}},88246:(e,t,r)=>{r.d(t,{Q:()=>b});var n,o,s=r(70586),a=r(13598),_=r(20102),i=r(92604),E=r(35371),T=r(30175),u=r(95330),c=r(17452),R=r(23670),A=r(52138),f=r(51305),N=r(94961),d=r(56481),S=r(93860);class l{constructor(e){this._data=e,this._offset4=0,this._dataUint32=new Uint32Array(this._data,0,Math.floor(this._data.byteLength/4))}readUint32(){const e=this._offset4;return this._offset4+=1,this._dataUint32[e]}readUint8Array(e){const t=4*this._offset4;return this._offset4+=e/4,new Uint8Array(this._data,t,e)}remainingBytes(){return this._data.byteLength-4*this._offset4}}!function(e){e.SCALAR="SCALAR",e.VEC2="VEC2",e.VEC3="VEC3",e.VEC4="VEC4",e.MAT2="MAT2",e.MAT3="MAT3",e.MAT4="MAT4"}(n||(n={})),function(e){e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER"}(o||(o={}));var I=r(74085);const O={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1},C={pbrMetallicRoughness:O,emissiveFactor:[0,0,0],alphaMode:"OPAQUE",alphaCutoff:.5,doubleSided:!1},p={ESRI_externalColorMixMode:"tint"},L=(e={})=>{const t={...O,...e.pbrMetallicRoughness},r=function(e){switch(e.ESRI_externalColorMixMode){case"multiply":case"tint":case"ignore":case"replace":break;default:(0,I.Bg)(e.ESRI_externalColorMixMode),e.ESRI_externalColorMixMode="tint"}return e}({...p,...e.extras});return{...C,...e,pbrMetallicRoughness:t,extras:r}},m={magFilter:E.cw.LINEAR,minFilter:E.cw.LINEAR_MIPMAP_LINEAR,wrapS:E.e8.REPEAT,wrapT:E.e8.REPEAT},M=e=>({...m,...e}),U=1179937895;class h{constructor(e,t,r,n,o){this._context=e,this._errorContext=t,this.uri=r,this.json=n,this._glbBuffer=o,this._bufferLoaders=new Map,this._textureLoaders=new Map,this._textureCache=new Map,this._materialCache=new Map,this._nodeParentMap=new Map,this._nodeTransformCache=new Map,this._baseUri=function(e){let t,r;return e.replace(/^(.*\/)?([^/]*)$/,((e,n,o)=>(t=n||"",r=o||"",""))),{dirPart:t,filePart:r}}(this.uri).dirPart,this._checkVersionSupported(),this._checkRequiredExtensionsSupported(),t.errorUnsupportedIf(null==n.scenes,"Scenes must be defined."),t.errorUnsupportedIf(null==n.meshes,"Meshes must be defined"),t.errorUnsupportedIf(null==n.nodes,"Nodes must be defined."),this._computeNodeParents()}static async load(e,t,r,n){if((0,c.HK)(r)){const n=(0,c.sJ)(r);if(n&&"model/gltf-binary"!==n.mediaType)try{const o=JSON.parse(n.isBase64?atob(n.data):n.data);return new h(e,t,r,o)}catch{}const o=(0,c.AH)(r);if(h._isGLBData(o))return this._fromGLBData(e,t,r,o)}if(r.endsWith(".gltf")){const o=await e.loadJSON(r,n);return new h(e,t,r,o)}const o=await e.loadBinary(r,n);if(h._isGLBData(o))return this._fromGLBData(e,t,r,o);const s=await e.loadJSON(r,n);return new h(e,t,r,s)}static _isGLBData(e){if(null==e)return!1;const t=new l(e);return t.remainingBytes()>=4&&t.readUint32()===U}static async _fromGLBData(e,t,r,n){const o=await h._parseGLBData(t,n);return new h(e,t,r,o.json,o.binaryData)}static async _parseGLBData(e,t){const r=new l(t);e.assert(r.remainingBytes()>=12,"GLB binary data is insufficiently large.");const n=r.readUint32(),o=r.readUint32(),s=r.readUint32();e.assert(n===U,"Magic first 4 bytes do not fit to expected GLB value."),e.assert(t.byteLength>=s,"GLB binary data is smaller than header specifies."),e.errorUnsupportedIf(2!==o,"An unsupported GLB container version was detected. Only version 2 is supported.");let a,_,i=0;for(;r.remainingBytes()>=8;){const t=r.readUint32(),n=r.readUint32();0===i?(e.assert(1313821514===n,"First GLB chunk must be JSON."),e.assert(t>=0,"No JSON data found."),a=await x(r.readUint8Array(t))):1===i?(e.errorUnsupportedIf(5130562!==n,"Second GLB chunk expected to be BIN."),_=r.readUint8Array(t)):e.warnUnsupported("More than 2 GLB chunks detected. Skipping."),i+=1}return a||e.error("No GLB JSON chunk detected."),{json:a,binaryData:_}}async getBuffer(e,t){const r=this.json.buffers[e],n=this._errorContext;if(null==r.uri)return n.assert(null!=this._glbBuffer,"GLB buffer not present"),this._glbBuffer;const o=await this._getBufferLoader(e,t);return n.assert(o.byteLength===r.byteLength,"Buffer byte lengths should match."),o}async _getBufferLoader(e,t){const r=this._bufferLoaders.get(e);if(r)return r;const n=this.json.buffers[e].uri,o=this._context.loadBinary(this._resolveUri(n),t).then((e=>new Uint8Array(e)));return this._bufferLoaders.set(e,o),o}async getAccessor(e,t){const r=this._errorContext;r.errorUnsupportedIf(!this.json.accessors,"Accessors missing.");const o=this.json.accessors[e];r.errorUnsupportedIf(null==o?.bufferView,"Some accessor does not specify a bufferView."),r.errorUnsupportedIf(o.type in[n.MAT2,n.MAT3,n.MAT4],`AttributeType ${o.type} is not supported`);const s=this.json.bufferViews[o.bufferView],a=await this.getBuffer(s.buffer,t),_=P[o.type],i=G[o.componentType],E=_*i,T=s.byteStride||E;return{raw:a.buffer,byteStride:T,byteOffset:a.byteOffset+(s.byteOffset||0)+(o.byteOffset||0),entryCount:o.count,isDenselyPacked:T===E,componentCount:_,componentByteSize:i,componentType:o.componentType,min:o.min,max:o.max,normalized:!!o.normalized}}async getIndexData(e,t){if(null==e.indices)return;const r=await this.getAccessor(e.indices,t);if(r.isDenselyPacked)switch(r.componentType){case E.g.UNSIGNED_BYTE:return new Uint8Array(r.raw,r.byteOffset,r.entryCount);case E.g.UNSIGNED_SHORT:return new Uint16Array(r.raw,r.byteOffset,r.entryCount);case E.g.UNSIGNED_INT:return new Uint32Array(r.raw,r.byteOffset,r.entryCount)}else switch(r.componentType){case E.g.UNSIGNED_BYTE:return(0,S.m)(this._wrapAccessor(d.D_,r));case E.g.UNSIGNED_SHORT:return(0,S.m)(this._wrapAccessor(d.av,r));case E.g.UNSIGNED_INT:return(0,S.m)(this._wrapAccessor(d.Nu,r))}}async getPositionData(e,t){const r=this._errorContext;r.errorUnsupportedIf(null==e.attributes.POSITION,"No POSITION vertex data found.");const n=await this.getAccessor(e.attributes.POSITION,t);return r.errorUnsupportedIf(n.componentType!==E.g.FLOAT,"Expected type FLOAT for POSITION vertex attribute, but found "+E.g[n.componentType]),r.errorUnsupportedIf(3!==n.componentCount,"POSITION vertex attribute must have 3 components, but found "+n.componentCount.toFixed()),this._wrapAccessor(d.ct,n)}async getNormalData(e,t){const r=this._errorContext;r.assert(null!=e.attributes.NORMAL,"No NORMAL vertex data found.");const n=await this.getAccessor(e.attributes.NORMAL,t);return r.errorUnsupportedIf(n.componentType!==E.g.FLOAT,"Expected type FLOAT for NORMAL vertex attribute, but found "+E.g[n.componentType]),r.errorUnsupportedIf(3!==n.componentCount,"NORMAL vertex attribute must have 3 components, but found "+n.componentCount.toFixed()),this._wrapAccessor(d.ct,n)}async getTangentData(e,t){const r=this._errorContext;r.assert(null!=e.attributes.TANGENT,"No TANGENT vertex data found.");const n=await this.getAccessor(e.attributes.TANGENT,t);return r.errorUnsupportedIf(n.componentType!==E.g.FLOAT,"Expected type FLOAT for TANGENT vertex attribute, but found "+E.g[n.componentType]),r.errorUnsupportedIf(4!==n.componentCount,"TANGENT vertex attribute must have 4 components, but found "+n.componentCount.toFixed()),new d.ek(n.raw,n.byteOffset,n.byteStride,n.byteOffset+n.byteStride*n.entryCount)}async getTextureCoordinates(e,t){const r=this._errorContext;r.assert(null!=e.attributes.TEXCOORD_0,"No TEXCOORD_0 vertex data found.");const n=await this.getAccessor(e.attributes.TEXCOORD_0,t);return r.errorUnsupportedIf(2!==n.componentCount,"TEXCOORD_0 vertex attribute must have 2 components, but found "+n.componentCount.toFixed()),n.componentType===E.g.FLOAT?this._wrapAccessor(d.Eu,n):(r.errorUnsupportedIf(!n.normalized,"Integer component types are only supported for a normalized accessor for TEXCOORD_0."),function(e){switch(e.componentType){case E.g.BYTE:return new d.Vs(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case E.g.UNSIGNED_BYTE:return new d.xA(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case E.g.SHORT:return new d.or(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case E.g.UNSIGNED_SHORT:return new d.TS(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case E.g.UNSIGNED_INT:return new d.qt(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case E.g.FLOAT:return new d.Eu(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount)}}(n))}async getVertexColors(e,t){const r=this._errorContext;r.assert(null!=e.attributes.COLOR_0,"No COLOR_0 vertex data found.");const n=await this.getAccessor(e.attributes.COLOR_0,t);if(r.errorUnsupportedIf(4!==n.componentCount&&3!==n.componentCount,"COLOR_0 attribute must have 3 or 4 components, but found "+n.componentCount.toFixed()),4===n.componentCount){if(n.componentType===E.g.FLOAT)return this._wrapAccessor(d.ek,n);if(n.componentType===E.g.UNSIGNED_BYTE)return this._wrapAccessor(d.mc,n);if(n.componentType===E.g.UNSIGNED_SHORT)return this._wrapAccessor(d.v6,n)}else if(3===n.componentCount){if(n.componentType===E.g.FLOAT)return this._wrapAccessor(d.ct,n);if(n.componentType===E.g.UNSIGNED_BYTE)return this._wrapAccessor(d.ne,n);if(n.componentType===E.g.UNSIGNED_SHORT)return this._wrapAccessor(d.mw,n)}r.errorUnsupported("Unsupported component type for COLOR_0 attribute: "+E.g[n.componentType])}hasPositions(e){return void 0!==e.attributes.POSITION}hasNormals(e){return void 0!==e.attributes.NORMAL}hasVertexColors(e){return void 0!==e.attributes.COLOR_0}hasTextureCoordinates(e){return void 0!==e.attributes.TEXCOORD_0}hasTangents(e){return void 0!==e.attributes.TANGENT}async getMaterial(e,t,r){let n=e.material?this._materialCache.get(e.material):void 0;if(!n){const o=null!=e.material?L(this.json.materials[e.material]):L(),s=o.pbrMetallicRoughness,a=this.hasVertexColors(e),_=this.getTexture(s.baseColorTexture,t),i=this.getTexture(o.normalTexture,t),E=r?this.getTexture(o.occlusionTexture,t):void 0,T=r?this.getTexture(o.emissiveTexture,t):void 0,u=r?this.getTexture(s.metallicRoughnessTexture,t):void 0,c=null!=e.material?e.material:-1;n={alphaMode:o.alphaMode,alphaCutoff:o.alphaCutoff,color:s.baseColorFactor,doubleSided:!!o.doubleSided,colorTexture:await _,normalTexture:await i,name:o.name,id:c,occlusionTexture:await E,emissiveTexture:await T,emissiveFactor:o.emissiveFactor,metallicFactor:s.metallicFactor,roughnessFactor:s.roughnessFactor,metallicRoughnessTexture:await u,hasVertexColors:a,ESRI_externalColorMixMode:o.extras.ESRI_externalColorMixMode,colorTextureTransform:s?.baseColorTexture?.extensions?.KHR_texture_transform,normalTextureTransform:o.normalTexture?.extensions?.KHR_texture_transform,occlusionTextureTransform:o.occlusionTexture?.extensions?.KHR_texture_transform,emissiveTextureTransform:o.emissiveTexture?.extensions?.KHR_texture_transform,metallicRoughnessTextureTransform:s?.metallicRoughnessTexture?.extensions?.KHR_texture_transform}}return n}async getTexture(e,t){if(!e)return;this._errorContext.errorUnsupportedIf(0!==(e.texCoord||0),"Only TEXCOORD with index 0 is supported.");const r=e.index,n=this._errorContext,o=this.json.textures[r],s=M(null!=o.sampler?this.json.samplers[o.sampler]:{});n.errorUnsupportedIf(null==o.source,"Source is expected to be defined for a texture.");const a=this.json.images[o.source],_=await this._loadTextureImageData(r,o,t);return(0,T.s1)(this._textureCache,r,(()=>{const e=e=>33071===e||33648===e||10497===e,t=e=>(n.error(`Unexpected TextureSampler WrapMode: ${e}. Using default REPEAT(10497).`),10497);return{data:_,wrapS:e(s.wrapS)?s.wrapS:t(s.wrapS),wrapT:e(s.wrapT)?s.wrapT:t(s.wrapT),minFilter:s.minFilter,name:a.name,id:r}}))}getNodeTransform(e){if(void 0===e)return B;let t=this._nodeTransformCache.get(e);if(!t){const r=this.getNodeTransform(this._getNodeParent(e)),n=this.json.nodes[e];n.matrix?t=(0,A.m)((0,a.c)(),r,n.matrix):n.translation||n.rotation||n.scale?(t=(0,a.b)(r),n.translation&&(0,A.w)(t,t,n.translation),n.rotation&&(y[3]=(0,f.g)(y,n.rotation),(0,A.e)(t,t,y[3],y)),n.scale&&(0,A.k)(t,t,n.scale)):t=(0,a.b)(r),this._nodeTransformCache.set(e,t)}return t}_wrapAccessor(e,t){return new e(t.raw,t.byteOffset,t.byteStride,t.byteOffset+t.byteStride*(t.entryCount-1)+t.componentByteSize*t.componentCount)}_resolveUri(e){return(0,c.hF)(e,this._baseUri)}_getNodeParent(e){return this._nodeParentMap.get(e)}_checkVersionSupported(){const e=R.G.parse(this.json.asset.version,"glTF");D.validate(e)}_checkRequiredExtensionsSupported(){const e=this.json,t=this._errorContext;e.extensionsRequired&&0!==e.extensionsRequired.length&&t.errorUnsupported("gltf loader was not able to load unsupported feature. Required extensions: "+e.extensionsRequired.join(", "))}_computeNodeParents(){this.json.nodes.forEach(((e,t)=>{e.children&&e.children.forEach((e=>{this._nodeParentMap.set(e,t)}))}))}async _loadTextureImageData(e,t,r){const n=this._textureLoaders.get(e);if(n)return n;const o=this._createTextureLoader(t,r);return this._textureLoaders.set(e,o),o}async _createTextureLoader(e,t){const r=this.json.images[e.source];if(r.uri)return this._context.loadImage(this._resolveUri(r.uri),t);const n=this._errorContext;n.errorUnsupportedIf(null==r.bufferView,"Image bufferView must be defined."),n.errorUnsupportedIf(null==r.mimeType,"Image mimeType must be defined.");const o=this.json.bufferViews[r.bufferView],s=await this.getBuffer(o.buffer,t);return n.errorUnsupportedIf(null!=o.byteStride,"byteStride not supported for image buffer"),async function(e,t){return new Promise(((r,n)=>{const o=new Blob([e],{type:t}),s=URL.createObjectURL(o),a=new Image,_=()=>{URL.revokeObjectURL(s),"decode"in a?a.decode().then((()=>r(a)),(()=>r(a))).then(E):(r(a),E())},i=e=>{URL.revokeObjectURL(s),n(e),E()},E=()=>{a.removeEventListener("load",_),a.removeEventListener("error",i)};a.addEventListener("load",_),a.addEventListener("error",i),a.src=s}))}(new Uint8Array(s.buffer,s.byteOffset+(o.byteOffset||0),o.byteLength),r.mimeType)}async getLoadedBuffersSize(){if(this._glbBuffer)return this._glbBuffer.byteLength;const e=await(0,u.WW)(Array.from(this._bufferLoaders.values())),t=await(0,u.WW)(Array.from(this._textureLoaders.values()));return e.reduce(((e,t)=>e+(t?.byteLength??0)),0)+t.reduce(((e,t)=>e+(t?t.width*t.height*4:0)),0)}}const B=(0,A.A)((0,a.c)(),Math.PI/2),D=new R.G(2,0,"glTF"),y=(0,N.a)(),P={SCALAR:1,VEC2:2,VEC3:3,VEC4:4},G={[E.g.BYTE]:1,[E.g.UNSIGNED_BYTE]:1,[E.g.SHORT]:2,[E.g.UNSIGNED_SHORT]:2,[E.g.FLOAT]:4,[E.g.UNSIGNED_INT]:4};async function x(e){return new Promise(((t,r)=>{const n=new Blob([e]),o=new FileReader;o.onload=()=>{const e=o.result;t(JSON.parse(e))},o.onerror=e=>{r(e)},o.readAsText(n)}))}let F=0;async function b(e,t,r={},n=!0){const o=await h.load(e,V,t,r),_="gltf_"+F++,i={lods:[],materials:new Map,textures:new Map,meta:g(o)},T=!(!o.json.asset.extras||"symbolResource"!==o.json.asset.extras.ESRI_type),u=new Map;await w(o,(async(e,t,T,c)=>{const R=u.get(T)??0;u.set(T,R+1);const A=void 0!==e.mode?e.mode:E.MX.TRIANGLES,f=A===E.MX.TRIANGLES||A===E.MX.TRIANGLE_STRIP||A===E.MX.TRIANGLE_FAN?A:null;if((0,s.Wi)(f))return void V.warnUnsupported("Unsupported primitive mode ("+E.MX[A]+"). Skipping primitive.");if(!o.hasPositions(e))return void V.warn("Skipping primitive without POSITION vertex attribute.");const N=o.getPositionData(e,r),d=o.getMaterial(e,r,n),S=o.hasNormals(e)?o.getNormalData(e,r):null,l=o.hasTangents(e)?o.getTangentData(e,r):null,I=o.hasTextureCoordinates(e)?o.getTextureCoordinates(e,r):null,O=o.hasVertexColors(e)?o.getVertexColors(e,r):null,C=o.getIndexData(e,r),p={transform:(0,a.b)(t),attributes:{position:await N,normal:S?await S:null,texCoord0:I?await I:null,color:O?await O:null,tangent:l?await l:null},indices:await C,primitiveType:f,material:v(i,await d,_)};let L=null;(0,s.pC)(i.meta)&&(0,s.pC)(i.meta.ESRI_lod)&&"screenSpaceRadius"===i.meta.ESRI_lod.metric&&(L=i.meta.ESRI_lod.thresholds[T]),i.lods[T]=i.lods[T]||{parts:[],name:c,lodThreshold:L},i.lods[T].parts[R]=p}));for(const e of i.lods)e.parts=e.parts.filter((e=>!!e));const c=await o.getLoadedBuffersSize();return{model:i,meta:{isEsriSymbolResource:T,uri:o.uri},customMeta:{},size:c}}function g(e){const t=e.json;let r=null;return t.nodes.forEach((e=>{const t=e.extras;(0,s.pC)(t)&&(t.ESRI_proxyEllipsoid||t.ESRI_lod)&&(r=t)})),r}async function w(e,t){const r=e.json,n=r.scenes[r.scene||0].nodes,o=n.length>1,s=[];for(const e of n){const t=r.nodes[e];s.push(a(e,0)),H(t)&&!o&&t.extensions.MSFT_lod.ids.forEach(((e,t)=>a(e,t+1)))}async function a(n,o){const _=r.nodes[n],i=e.getNodeTransform(n);if(V.warnUnsupportedIf(null!=_.weights,"Morph targets are not supported."),null!=_.mesh){const e=r.meshes[_.mesh];for(const r of e.primitives)s.push(t(r,i,o,e.name))}for(const e of _.children||[])s.push(a(e,o))}await Promise.all(s)}function H(e){return e.extensions&&e.extensions.MSFT_lod&&Array.isArray(e.extensions.MSFT_lod.ids)}function v(e,t,r){const n=t=>{const n=`${r}_tex_${t&&t.id}${t&&t.name?"_"+t.name:""}`;if(t&&!e.textures.has(n)){const r=function(e,t={}){return{data:e,parameters:{wrap:{s:E.e8.REPEAT,t:E.e8.REPEAT,...t.wrap},noUnpackFlip:!0,mipmap:!1,...t}}}(t.data,{wrap:{s:t.wrapS,t:t.wrapT},mipmap:Y.includes(t.minFilter),noUnpackFlip:!0});e.textures.set(n,r)}return n},o=`${r}_mat_${t.id}_${t.name}`;if(!e.materials.has(o)){const r=function(e={}){return{color:[1,1,1],opacity:1,alphaMode:"OPAQUE",alphaCutoff:.5,doubleSided:!1,castShadows:!0,receiveShadows:!0,receiveAmbientOcclustion:!0,textureColor:null,textureNormal:null,textureOcclusion:null,textureEmissive:null,textureMetallicRoughness:null,colorTextureTransform:null,normalTextureTransform:null,occlusionTextureTransform:null,emissiveTextureTransform:null,metallicRoughnessTextureTransform:null,emissiveFactor:[0,0,0],metallicFactor:1,roughnessFactor:1,colorMixMode:"multiply",...e}}({color:[t.color[0],t.color[1],t.color[2]],opacity:t.color[3],alphaMode:t.alphaMode,alphaCutoff:t.alphaCutoff,doubleSided:t.doubleSided,colorMixMode:t.ESRI_externalColorMixMode,textureColor:t.colorTexture?n(t.colorTexture):void 0,textureNormal:t.normalTexture?n(t.normalTexture):void 0,textureOcclusion:t.occlusionTexture?n(t.occlusionTexture):void 0,textureEmissive:t.emissiveTexture?n(t.emissiveTexture):void 0,textureMetallicRoughness:t.metallicRoughnessTexture?n(t.metallicRoughnessTexture):void 0,emissiveFactor:[t.emissiveFactor[0],t.emissiveFactor[1],t.emissiveFactor[2]],colorTextureTransform:t.colorTextureTransform,normalTextureTransform:t.normalTextureTransform,occlusionTextureTransform:t.occlusionTextureTransform,emissiveTextureTransform:t.emissiveTextureTransform,metallicRoughnessTextureTransform:t.metallicRoughnessTextureTransform,metallicFactor:t.metallicFactor,roughnessFactor:t.roughnessFactor});e.materials.set(o,r)}return o}const V=new class{error(e){throw new _.Z("gltf-loader-error",e)}errorUnsupported(e){throw new _.Z("gltf-loader-unsupported-feature",e)}errorUnsupportedIf(e,t){e&&this.errorUnsupported(t)}assert(e,t){e||this.error(t)}warn(e){i.Z.getLogger("esri.views.3d.glTF").warn(e)}warnUnsupported(e){this.warn("[Unsupported Feature] "+e)}warnUnsupportedIf(e,t){e&&this.warnUnsupported(t)}},Y=[E.cw.LINEAR_MIPMAP_LINEAR,E.cw.LINEAR_MIPMAP_NEAREST]},57758:(e,t,r)=>{r.d(t,{K:()=>n});const n=2.1},35371:(e,t,r)=>{var n,o,s,a,_,i,E,T,u,c,R,A,f,N,d,S,l,I,O,C,p,L,m,M;r.d(t,{Br:()=>S,LR:()=>i,Lm:()=>p,Lu:()=>U,MX:()=>o,No:()=>f,OU:()=>L,Tg:()=>l,VI:()=>N,VY:()=>M,Wf:()=>E,_g:()=>m,cw:()=>R,db:()=>a,e8:()=>A,g:()=>T,l1:()=>I,lP:()=>d,q_:()=>h,qi:()=>C,w0:()=>_,wb:()=>u,xS:()=>c,zi:()=>s}),function(e){e[e.DEPTH_BUFFER_BIT=256]="DEPTH_BUFFER_BIT",e[e.STENCIL_BUFFER_BIT=1024]="STENCIL_BUFFER_BIT",e[e.COLOR_BUFFER_BIT=16384]="COLOR_BUFFER_BIT"}(n||(n={})),function(e){e[e.POINTS=0]="POINTS",e[e.LINES=1]="LINES",e[e.LINE_LOOP=2]="LINE_LOOP",e[e.LINE_STRIP=3]="LINE_STRIP",e[e.TRIANGLES=4]="TRIANGLES",e[e.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",e[e.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(o||(o={})),function(e){e[e.ZERO=0]="ZERO",e[e.ONE=1]="ONE",e[e.SRC_COLOR=768]="SRC_COLOR",e[e.ONE_MINUS_SRC_COLOR=769]="ONE_MINUS_SRC_COLOR",e[e.SRC_ALPHA=770]="SRC_ALPHA",e[e.ONE_MINUS_SRC_ALPHA=771]="ONE_MINUS_SRC_ALPHA",e[e.DST_ALPHA=772]="DST_ALPHA",e[e.ONE_MINUS_DST_ALPHA=773]="ONE_MINUS_DST_ALPHA",e[e.DST_COLOR=774]="DST_COLOR",e[e.ONE_MINUS_DST_COLOR=775]="ONE_MINUS_DST_COLOR",e[e.SRC_ALPHA_SATURATE=776]="SRC_ALPHA_SATURATE",e[e.CONSTANT_COLOR=32769]="CONSTANT_COLOR",e[e.ONE_MINUS_CONSTANT_COLOR=32770]="ONE_MINUS_CONSTANT_COLOR",e[e.CONSTANT_ALPHA=32771]="CONSTANT_ALPHA",e[e.ONE_MINUS_CONSTANT_ALPHA=32772]="ONE_MINUS_CONSTANT_ALPHA"}(s||(s={})),function(e){e[e.ADD=32774]="ADD",e[e.SUBTRACT=32778]="SUBTRACT",e[e.REVERSE_SUBTRACT=32779]="REVERSE_SUBTRACT"}(a||(a={})),function(e){e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e[e.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",e[e.PIXEL_PACK_BUFFER=35051]="PIXEL_PACK_BUFFER",e[e.PIXEL_UNPACK_BUFFER=35052]="PIXEL_UNPACK_BUFFER",e[e.COPY_READ_BUFFER=36662]="COPY_READ_BUFFER",e[e.COPY_WRITE_BUFFER=36663]="COPY_WRITE_BUFFER"}(_||(_={})),function(e){e[e.FRONT=1028]="FRONT",e[e.BACK=1029]="BACK",e[e.FRONT_AND_BACK=1032]="FRONT_AND_BACK"}(i||(i={})),function(e){e[e.CW=2304]="CW",e[e.CCW=2305]="CCW"}(E||(E={})),function(e){e[e.BYTE=5120]="BYTE",e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.SHORT=5122]="SHORT",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.INT=5124]="INT",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.FLOAT=5126]="FLOAT"}(T||(T={})),function(e){e[e.NEVER=512]="NEVER",e[e.LESS=513]="LESS",e[e.EQUAL=514]="EQUAL",e[e.LEQUAL=515]="LEQUAL",e[e.GREATER=516]="GREATER",e[e.NOTEQUAL=517]="NOTEQUAL",e[e.GEQUAL=518]="GEQUAL",e[e.ALWAYS=519]="ALWAYS"}(u||(u={})),function(e){e[e.ZERO=0]="ZERO",e[e.KEEP=7680]="KEEP",e[e.REPLACE=7681]="REPLACE",e[e.INCR=7682]="INCR",e[e.DECR=7683]="DECR",e[e.INVERT=5386]="INVERT",e[e.INCR_WRAP=34055]="INCR_WRAP",e[e.DECR_WRAP=34056]="DECR_WRAP"}(c||(c={})),function(e){e[e.NEAREST=9728]="NEAREST",e[e.LINEAR=9729]="LINEAR",e[e.NEAREST_MIPMAP_NEAREST=9984]="NEAREST_MIPMAP_NEAREST",e[e.LINEAR_MIPMAP_NEAREST=9985]="LINEAR_MIPMAP_NEAREST",e[e.NEAREST_MIPMAP_LINEAR=9986]="NEAREST_MIPMAP_LINEAR",e[e.LINEAR_MIPMAP_LINEAR=9987]="LINEAR_MIPMAP_LINEAR"}(R||(R={})),function(e){e[e.CLAMP_TO_EDGE=33071]="CLAMP_TO_EDGE",e[e.REPEAT=10497]="REPEAT",e[e.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(A||(A={})),function(e){e[e.TEXTURE_2D=3553]="TEXTURE_2D",e[e.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",e[e.TEXTURE_3D=32879]="TEXTURE_3D",e[e.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",e[e.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",e[e.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",e[e.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",e[e.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",e[e.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY"}(f||(f={})),function(e){e[e.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e[e.ALPHA=6406]="ALPHA",e[e.RGB=6407]="RGB",e[e.RGBA=6408]="RGBA",e[e.LUMINANCE=6409]="LUMINANCE",e[e.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",e[e.RED=6403]="RED",e[e.RG=33319]="RG",e[e.RED_INTEGER=36244]="RED_INTEGER",e[e.RG_INTEGER=33320]="RG_INTEGER",e[e.RGB_INTEGER=36248]="RGB_INTEGER",e[e.RGBA_INTEGER=36249]="RGBA_INTEGER"}(N||(N={})),function(e){e[e.RGBA4=32854]="RGBA4",e[e.R16F=33325]="R16F",e[e.RG16F=33327]="RG16F",e[e.RGB32F=34837]="RGB32F",e[e.RGBA16F=34842]="RGBA16F",e[e.R32F=33326]="R32F",e[e.RG32F=33328]="RG32F",e[e.RGBA32F=34836]="RGBA32F",e[e.R11F_G11F_B10F=35898]="R11F_G11F_B10F",e[e.RGB8=32849]="RGB8",e[e.RGBA8=32856]="RGBA8",e[e.RGB5_A1=32855]="RGB5_A1",e[e.R8=33321]="R8",e[e.RG8=33323]="RG8",e[e.R8I=33329]="R8I",e[e.R8UI=33330]="R8UI",e[e.R16I=33331]="R16I",e[e.R16UI=33332]="R16UI",e[e.R32I=33333]="R32I",e[e.R32UI=33334]="R32UI",e[e.RG8I=33335]="RG8I",e[e.RG8UI=33336]="RG8UI",e[e.RG16I=33337]="RG16I",e[e.RG16UI=33338]="RG16UI",e[e.RG32I=33339]="RG32I",e[e.RG32UI=33340]="RG32UI",e[e.RGB16F=34843]="RGB16F",e[e.RGB9_E5=35901]="RGB9_E5",e[e.SRGB8=35905]="SRGB8",e[e.SRGB8_ALPHA8=35907]="SRGB8_ALPHA8",e[e.RGB565=36194]="RGB565",e[e.RGBA32UI=36208]="RGBA32UI",e[e.RGB32UI=36209]="RGB32UI",e[e.RGBA16UI=36214]="RGBA16UI",e[e.RGB16UI=36215]="RGB16UI",e[e.RGBA8UI=36220]="RGBA8UI",e[e.RGB8UI=36221]="RGB8UI",e[e.RGBA32I=36226]="RGBA32I",e[e.RGB32I=36227]="RGB32I",e[e.RGBA16I=36232]="RGBA16I",e[e.RGB16I=36233]="RGB16I",e[e.RGBA8I=36238]="RGBA8I",e[e.RGB8I=36239]="RGB8I",e[e.R8_SNORM=36756]="R8_SNORM",e[e.RG8_SNORM=36757]="RG8_SNORM",e[e.RGB8_SNORM=36758]="RGB8_SNORM",e[e.RGBA8_SNORM=36759]="RGBA8_SNORM",e[e.RGB10_A2=32857]="RGB10_A2",e[e.RGB10_A2UI=36975]="RGB10_A2UI"}(d||(d={})),function(e){e[e.FLOAT=5126]="FLOAT",e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",e[e.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",e[e.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",e[e.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",e[e.BYTE=5120]="BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.SHORT=5122]="SHORT",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.INT=5124]="INT",e[e.HALF_FLOAT=5131]="HALF_FLOAT",e[e.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",e[e.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",e[e.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",e[e.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV"}(S||(S={})),function(e){e[e.DEPTH_COMPONENT16=33189]="DEPTH_COMPONENT16",e[e.STENCIL_INDEX8=36168]="STENCIL_INDEX8",e[e.DEPTH_STENCIL=34041]="DEPTH_STENCIL",e[e.DEPTH_COMPONENT24=33190]="DEPTH_COMPONENT24",e[e.DEPTH_COMPONENT32F=36012]="DEPTH_COMPONENT32F",e[e.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",e[e.DEPTH32F_STENCIL8=36013]="DEPTH32F_STENCIL8"}(l||(l={})),function(e){e[e.STATIC_DRAW=35044]="STATIC_DRAW",e[e.DYNAMIC_DRAW=35048]="DYNAMIC_DRAW",e[e.STREAM_DRAW=35040]="STREAM_DRAW",e[e.STATIC_READ=35045]="STATIC_READ",e[e.DYNAMIC_READ=35049]="DYNAMIC_READ",e[e.STREAM_READ=35041]="STREAM_READ",e[e.STATIC_COPY=35046]="STATIC_COPY",e[e.DYNAMIC_COPY=35050]="DYNAMIC_COPY",e[e.STREAM_COPY=35042]="STREAM_COPY"}(I||(I={})),function(e){e[e.FRAGMENT_SHADER=35632]="FRAGMENT_SHADER",e[e.VERTEX_SHADER=35633]="VERTEX_SHADER"}(O||(O={})),function(e){e[e.FRAMEBUFFER=36160]="FRAMEBUFFER",e[e.READ_FRAMEBUFFER=36008]="READ_FRAMEBUFFER",e[e.DRAW_FRAMEBUFFER=36009]="DRAW_FRAMEBUFFER"}(C||(C={})),function(e){e[e.TEXTURE=0]="TEXTURE",e[e.RENDER_BUFFER=1]="RENDER_BUFFER",e[e.CUBEMAP=2]="CUBEMAP"}(p||(p={})),function(e){e[e.NONE=0]="NONE",e[e.DEPTH_RENDER_BUFFER=1]="DEPTH_RENDER_BUFFER",e[e.STENCIL_RENDER_BUFFER=2]="STENCIL_RENDER_BUFFER",e[e.DEPTH_STENCIL_RENDER_BUFFER=3]="DEPTH_STENCIL_RENDER_BUFFER",e[e.DEPTH_STENCIL_TEXTURE=4]="DEPTH_STENCIL_TEXTURE"}(L||(L={})),function(e){e[e.Texture=0]="Texture",e[e.BufferObject=1]="BufferObject",e[e.VertexArrayObject=2]="VertexArrayObject",e[e.Shader=3]="Shader",e[e.Program=4]="Program",e[e.FramebufferObject=5]="FramebufferObject",e[e.Renderbuffer=6]="Renderbuffer",e[e.Sync=7]="Sync",e[e.COUNT=8]="COUNT"}(m||(m={})),function(e){e[e.COLOR_ATTACHMENT0=36064]="COLOR_ATTACHMENT0",e[e.COLOR_ATTACHMENT1=36065]="COLOR_ATTACHMENT1",e[e.COLOR_ATTACHMENT2=36066]="COLOR_ATTACHMENT2",e[e.COLOR_ATTACHMENT3=36067]="COLOR_ATTACHMENT3",e[e.COLOR_ATTACHMENT4=36068]="COLOR_ATTACHMENT4",e[e.COLOR_ATTACHMENT5=36069]="COLOR_ATTACHMENT5",e[e.COLOR_ATTACHMENT6=36070]="COLOR_ATTACHMENT6",e[e.COLOR_ATTACHMENT7=36071]="COLOR_ATTACHMENT7",e[e.COLOR_ATTACHMENT8=36072]="COLOR_ATTACHMENT8",e[e.COLOR_ATTACHMENT9=36073]="COLOR_ATTACHMENT9",e[e.COLOR_ATTACHMENT10=36074]="COLOR_ATTACHMENT10",e[e.COLOR_ATTACHMENT11=36075]="COLOR_ATTACHMENT11",e[e.COLOR_ATTACHMENT12=36076]="COLOR_ATTACHMENT12",e[e.COLOR_ATTACHMENT13=36077]="COLOR_ATTACHMENT13",e[e.COLOR_ATTACHMENT14=36078]="COLOR_ATTACHMENT14",e[e.COLOR_ATTACHMENT15=36079]="COLOR_ATTACHMENT15"}(M||(M={}));const U=33306;var h,B,D,y,P,G,x;!function(e){e[e.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",e[e.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",e[e.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",e[e.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",e[e.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",e[e.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",e[e.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",e[e.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",e[e.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",e[e.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",e[e.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",e[e.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC"}(h||(h={})),function(e){e[e.FLOAT=5126]="FLOAT",e[e.FLOAT_VEC2=35664]="FLOAT_VEC2",e[e.FLOAT_VEC3=35665]="FLOAT_VEC3",e[e.FLOAT_VEC4=35666]="FLOAT_VEC4",e[e.INT=5124]="INT",e[e.INT_VEC2=35667]="INT_VEC2",e[e.INT_VEC3=35668]="INT_VEC3",e[e.INT_VEC4=35669]="INT_VEC4",e[e.BOOL=35670]="BOOL",e[e.BOOL_VEC2=35671]="BOOL_VEC2",e[e.BOOL_VEC3=35672]="BOOL_VEC3",e[e.BOOL_VEC4=35673]="BOOL_VEC4",e[e.FLOAT_MAT2=35674]="FLOAT_MAT2",e[e.FLOAT_MAT3=35675]="FLOAT_MAT3",e[e.FLOAT_MAT4=35676]="FLOAT_MAT4",e[e.SAMPLER_2D=35678]="SAMPLER_2D",e[e.SAMPLER_CUBE=35680]="SAMPLER_CUBE",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.UNSIGNED_INT_VEC2=36294]="UNSIGNED_INT_VEC2",e[e.UNSIGNED_INT_VEC3=36295]="UNSIGNED_INT_VEC3",e[e.UNSIGNED_INT_VEC4=36296]="UNSIGNED_INT_VEC4",e[e.FLOAT_MAT2x3=35685]="FLOAT_MAT2x3",e[e.FLOAT_MAT2x4=35686]="FLOAT_MAT2x4",e[e.FLOAT_MAT3x2=35687]="FLOAT_MAT3x2",e[e.FLOAT_MAT3x4=35688]="FLOAT_MAT3x4",e[e.FLOAT_MAT4x2=35689]="FLOAT_MAT4x2",e[e.FLOAT_MAT4x3=35690]="FLOAT_MAT4x3",e[e.SAMPLER_3D=35679]="SAMPLER_3D",e[e.SAMPLER_2D_SHADOW=35682]="SAMPLER_2D_SHADOW",e[e.SAMPLER_2D_ARRAY=36289]="SAMPLER_2D_ARRAY",e[e.SAMPLER_2D_ARRAY_SHADOW=36292]="SAMPLER_2D_ARRAY_SHADOW",e[e.SAMPLER_CUBE_SHADOW=36293]="SAMPLER_CUBE_SHADOW",e[e.INT_SAMPLER_2D=36298]="INT_SAMPLER_2D",e[e.INT_SAMPLER_3D=36299]="INT_SAMPLER_3D",e[e.INT_SAMPLER_CUBE=36300]="INT_SAMPLER_CUBE",e[e.INT_SAMPLER_2D_ARRAY=36303]="INT_SAMPLER_2D_ARRAY",e[e.UNSIGNED_INT_SAMPLER_2D=36306]="UNSIGNED_INT_SAMPLER_2D",e[e.UNSIGNED_INT_SAMPLER_3D=36307]="UNSIGNED_INT_SAMPLER_3D",e[e.UNSIGNED_INT_SAMPLER_CUBE=36308]="UNSIGNED_INT_SAMPLER_CUBE",e[e.UNSIGNED_INT_SAMPLER_2D_ARRAY=36311]="UNSIGNED_INT_SAMPLER_2D_ARRAY"}(B||(B={})),function(e){e[e.OBJECT_TYPE=37138]="OBJECT_TYPE",e[e.SYNC_CONDITION=37139]="SYNC_CONDITION",e[e.SYNC_STATUS=37140]="SYNC_STATUS",e[e.SYNC_FLAGS=37141]="SYNC_FLAGS"}(D||(D={})),function(e){e[e.UNSIGNALED=37144]="UNSIGNALED",e[e.SIGNALED=37145]="SIGNALED"}(y||(y={})),function(e){e[e.ALREADY_SIGNALED=37146]="ALREADY_SIGNALED",e[e.TIMEOUT_EXPIRED=37147]="TIMEOUT_EXPIRED",e[e.CONDITION_SATISFIED=37148]="CONDITION_SATISFIED",e[e.WAIT_FAILED=37149]="WAIT_FAILED"}(P||(P={})),function(e){e[e.SYNC_GPU_COMMANDS_COMPLETE=37143]="SYNC_GPU_COMMANDS_COMPLETE"}(G||(G={})),function(e){e[e.SYNC_FLUSH_COMMANDS_BIT=1]="SYNC_FLUSH_COMMANDS_BIT"}(x||(x={}))}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8833],{88764:(e,t,s)=>{s.d(t,{q:()=>o});var i,r,n,a={},u={get exports(){return a},set exports(e){a=e}};i=u,r=function(){function e(s,i,r,n,a){for(;n>r;){if(n-r>600){var u=n-r+1,o=i-r+1,l=Math.log(u),h=.5*Math.exp(2*l/3),c=.5*Math.sqrt(l*h*(u-h)/u)*(o-u/2<0?-1:1);e(s,i,Math.max(r,Math.floor(i-o*h/u+c)),Math.min(n,Math.floor(i+(u-o)*h/u+c)),a)}var d=s[i],_=r,p=n;for(t(s,r,i),a(s[n],d)>0&&t(s,r,n);_<p;){for(t(s,_,p),_++,p--;a(s[_],d)<0;)_++;for(;a(s[p],d)>0;)p--}0===a(s[r],d)?t(s,r,p):t(s,++p,n),p<=i&&(r=p+1),i<=p&&(n=p-1)}}function t(e,t,s){var i=e[t];e[t]=e[s],e[s]=i}function s(e,t){return e<t?-1:e>t?1:0}return function(t,i,r,n,a){e(t,i,r||0,n||t.length-1,a||s)}},void 0!==(n=r())&&(i.exports=n);const o=a},32448:(e,t,s)=>{s.d(t,{Z:()=>o});var i=s(43697),r=s(15923),n=s(50758),a=s(52011);class u{constructor(){this._emitter=new u.EventEmitter(this)}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}}!function(e){class t{constructor(e=null){this._target=e,this._listenersMap=null}clear(){this._listenersMap&&this._listenersMap.clear(),this._listenersMap=null}emit(e,t){const s=this._listenersMap&&this._listenersMap.get(e);if(!s)return!1;const i=this._target||this;return[...s].forEach((e=>{e.call(i,t)})),s.length>0}on(e,t){if(Array.isArray(e)){const s=e.map((e=>this.on(e,t)));return(0,n.AL)(s)}if(e.includes(","))throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap||(this._listenersMap=new Map);const s=this._listenersMap.get(e)||[];return s.push(t),this._listenersMap.set(e,s),{remove:()=>{const s=this._listenersMap&&this._listenersMap.get(e)||[],i=s.indexOf(t);i>=0&&s.splice(i,1)}}}once(e,t){const s=this.on(e,(e=>{s.remove(),t.call(null,e)}));return s}hasEventListener(e){const t=this._listenersMap&&this._listenersMap.get(e);return null!=t&&t.length>0}}e.EventEmitter=t,e.EventedMixin=e=>{let s=class extends e{constructor(){super(...arguments),this._emitter=new t}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};return s=(0,i._)([(0,a.j)("esri.core.Evented")],s),s};let s=class extends r.Z{constructor(){super(...arguments),this._emitter=new u.EventEmitter(this)}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};s=(0,i._)([(0,a.j)("esri.core.Evented")],s),e.EventedAccessor=s}(u||(u={}));const o=u},29730:(e,t,s)=>{s.d(t,{Y:()=>n});var i=s(70586);function r(e,t){return e?t?4:3:t?3:2}function n(e,t,s,n,o){if((0,i.Wi)(t)||!t.lengths.length)return null;const l="upperLeft"===o?.originPosition?-1:1;e.lengths.length&&(e.lengths.length=0),e.coords.length&&(e.coords.length=0);const h=e.coords,c=[],d=s?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY],{lengths:_,coords:p}=t,f=r(s,n);let m=0;for(const e of _){const t=a(d,p,m,e,s,n,l);t&&c.push(t),m+=e*f}if(c.sort(((e,t)=>{let i=l*e[2]-l*t[2];return 0===i&&s&&(i=e[4]-t[4]),i})),c.length){let e=6*c[0][2];h[0]=c[0][0]/e,h[1]=c[0][1]/e,s&&(e=6*c[0][4],h[2]=0!==e?c[0][3]/e:0),(h[0]<d[0]||h[0]>d[1]||h[1]<d[2]||h[1]>d[3]||s&&(h[2]<d[4]||h[2]>d[5]))&&(h.length=0)}if(!h.length){const e=t.lengths[0]?u(p,0,_[0],s,n):null;if(!e)return null;h[0]=e[0],h[1]=e[1],s&&e.length>2&&(h[2]=e[2])}return e}function a(e,t,s,i,n,a,u=1){const o=r(n,a);let l=s,h=s+o,c=0,d=0,_=0,p=0,f=0;for(let s=0,r=i-1;s<r;s++,l+=o,h+=o){const s=t[l],i=t[l+1],r=t[l+2],a=t[h],u=t[h+1],o=t[h+2];let m=s*u-a*i;p+=m,c+=(s+a)*m,d+=(i+u)*m,n&&(m=s*o-a*r,_+=(r+o)*m,f+=m),s<e[0]&&(e[0]=s),s>e[1]&&(e[1]=s),i<e[2]&&(e[2]=i),i>e[3]&&(e[3]=i),n&&(r<e[4]&&(e[4]=r),r>e[5]&&(e[5]=r))}if(p*u>0&&(p*=-1),f*u>0&&(f*=-1),!p)return null;const m=[c,d,.5*p];return n&&(m[3]=_,m[4]=.5*f),m}function u(e,t,s,i,n){const a=r(i,n);let u=t,d=t+a,_=0,p=0,f=0,m=0;for(let t=0,r=s-1;t<r;t++,u+=a,d+=a){const t=e[u],s=e[u+1],r=e[u+2],n=e[d],a=e[d+1],g=e[d+2],y=i?l(t,s,r,n,a,g):o(t,s,n,a);if(y)if(_+=y,i){const e=c(t,s,r,n,a,g);p+=y*e[0],f+=y*e[1],m+=y*e[2]}else{const e=h(t,s,n,a);p+=y*e[0],f+=y*e[1]}}return _>0?i?[p/_,f/_,m/_]:[p/_,f/_]:s>0?i?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function o(e,t,s,i){const r=s-e,n=i-t;return Math.sqrt(r*r+n*n)}function l(e,t,s,i,r,n){const a=i-e,u=r-t,o=n-s;return Math.sqrt(a*a+u*u+o*o)}function h(e,t,s,i){return[e+.5*(s-e),t+.5*(i-t)]}function c(e,t,s,i,r,n){return[e+.5*(i-e),t+.5*(r-t),s+.5*(n-s)]}},50245:(e,t,s)=>{s.d(t,{q:()=>ue});var i=s(67676),r=s(20102),n=s(22974),a=s(70586),u=s(69801),o=s(67900),l=s(60437),h=s(24470),c=s(20322),d=s(33955),_=s(51806),p=s(8744),f=s(98732),m=s(62432),g=s(37427),y=s(61159),E=s(26993),I=s(10402),T=s(17590),S=s(11490),R=s(99514),A=s(59266),w=s(61247),F=(s(80442),s(92604)),b=s(54790),x=s(44553),N=s(95330),C=s(17445),O=s(76882),k=s(58971),L=s(10661);class v{constructor(e){this._observable=new L.s,this._value=e}get(){return(0,k.it)(this._observable),this._value}set(e){e!==this._value&&(this._value=e,this._observable.notify())}}class P{constructor(){this._tasks=new Array,this._running=new v(!1)}get length(){return this._tasks.length}get running(){return this._running.get()}destroy(){this.cancelAll()}runTask(e){for(;!e.done&&this._process(e);)e.madeProgress()}push(e,t,s){return this._running.set(!0),new Promise(((i,r)=>this._tasks.push(new Q(i,r,e,t,s))))}unshift(e,t,s){return this._running.set(!0),new Promise(((i,r)=>this._tasks.unshift(new Q(i,r,e,t,s))))}_process(e){if(0===this._tasks.length)return!1;const t=this._tasks.shift();try{const s=(0,N.Hc)(t.signal);if(s&&!t.abortCallback)t.reject((0,N.zE)());else{const i=s?t.abortCallback?.((0,N.zE)()):t.callback(e);(0,N.y8)(i)?i.then(t.resolve,t.reject):t.resolve(i)}}catch(e){t.reject(e)}return this._running.set(this._tasks.length>0),!0}cancelAll(){const e=(0,N.zE)();for(const t of this._tasks)if(t.abortCallback){const s=t.abortCallback(e);t.resolve(s)}else t.reject(e);this._tasks.length=0,this._running.set(!1)}}class Q{constructor(e,t,s,i,r){this.resolve=e,this.reject=t,this.callback=s,this.signal=i,this.abortCallback=r}}var U=s(43697),G=s(15923),M=s(5600),D=(s(75215),s(52011));let B=class extends G.Z{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,U._)([(0,M.Cb)()],B.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,U._)([(0,M.Cb)()],B.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),B=(0,U._)([(0,D.j)("esri.views.support.DebugFlags")],B);const q=new B;var Y,H,V,j;!function(e){e[e.ANIMATING=0]="ANIMATING",e[e.INTERACTING=1]="INTERACTING",e[e.IDLE=2]="IDLE"}(Y||(Y={})),(j=H||(H={}))[j.YIELD=1]="YIELD",function(e){e.RESOURCE_CONTROLLER_IMMEDIATE="immediate",e.RESOURCE_CONTROLLER="schedule",e.SLIDE="slide",e.STREAM_DATA_LOADER="stream loader",e.ELEVATION_QUERY="elevation query",e.TERRAIN_SURFACE="terrain",e.SURFACE_GEOMETRY_UPDATES="surface geometry updates",e.LOD_RENDERER="LoD renderer",e.GRAPHICS_CORE="Graphics3D",e.I3S_CONTROLLER="I3S",e.POINT_CLOUD_LAYER="point cloud",e.FEATURE_TILE_FETCHER="feature fetcher",e.OVERLAY="overlay",e.STAGE="stage",e.GRAPHICS_DECONFLICTOR="graphics deconflictor",e.FILTER_VISIBILITY="Graphics3D filter visibility",e.SCALE_VISIBILITY="Graphics3D scale visibility",e.FRUSTUM_VISIBILITY="Graphics3D frustum visibility",e.POINT_OF_INTEREST_FREQUENT="POI frequent",e.POINT_OF_INTEREST_INFREQUENT="POI infrequent",e.LABELER="labeler",e.FEATURE_QUERY_ENGINE="feature query",e.FEATURE_TILE_TREE="feature tile tree",e.FEATURE_TILE_TREE_ACTIVE="fast feature tile tree",e.ELEVATION_ALIGNMENT="elevation alignment",e.TEXT_TEXTURE_ATLAS="text texture atlas",e.TEXTURE_UNLOAD="texture unload",e.LINE_OF_SIGHT_TOOL="line of sight tool",e.LINE_OF_SIGHT_TOOL_INTERACTIVE="interactive line of sight tool",e.ELEVATION_PROFILE="elevation profile",e.SNAPPING="snapping",e.SHADOW_ACCUMULATOR="shadow accumulator",e.CLOUDS_GENERATOR="clouds generator",e[e.TEST_PRIO=1]="TEST_PRIO"}(V||(V={}));const W=new Map([[V.RESOURCE_CONTROLLER_IMMEDIATE,0],[V.RESOURCE_CONTROLLER,4],[V.SLIDE,0],[V.STREAM_DATA_LOADER,0],[V.ELEVATION_QUERY,0],[V.TERRAIN_SURFACE,1],[V.SURFACE_GEOMETRY_UPDATES,1],[V.LOD_RENDERER,2],[V.GRAPHICS_CORE,2],[V.I3S_CONTROLLER,2],[V.POINT_CLOUD_LAYER,2],[V.FEATURE_TILE_FETCHER,2],[V.OVERLAY,4],[V.STAGE,4],[V.GRAPHICS_DECONFLICTOR,4],[V.FILTER_VISIBILITY,4],[V.SCALE_VISIBILITY,4],[V.FRUSTUM_VISIBILITY,4],[V.CLOUDS_GENERATOR,4],[V.POINT_OF_INTEREST_FREQUENT,6],[V.POINT_OF_INTEREST_INFREQUENT,30],[V.LABELER,8],[V.FEATURE_QUERY_ENGINE,8],[V.FEATURE_TILE_TREE,16],[V.FEATURE_TILE_TREE_ACTIVE,0],[V.ELEVATION_ALIGNMENT,12],[V.TEXT_TEXTURE_ATLAS,12],[V.TEXTURE_UNLOAD,12],[V.LINE_OF_SIGHT_TOOL,16],[V.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[V.SNAPPING,0],[V.SHADOW_ACCUMULATOR,30]]);function Z(e){return W.has(e)?W.get(e):"number"==typeof e?e:1}const z=(0,O.HA)(6.5),X=(0,O.HA)(1),J=(0,O.HA)(30),$=(0,O.HA)(1e3/30),K=(0,O.HA)(100);var ee,te;!function(e){e.Scheduler=class{get updating(){return this._updating.get()}_updatingChanged(){this._updating.set(this._tasks.some((e=>e.needsUpdate)))}constructor(){this._updating=new v(!0),this._microTaskQueued=!1,this._frameNumber=0,this.performanceInfo={total:new b.Z("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new s,this._state=Y.INTERACTING,this._tasks=new x.Z,this._runQueue=new x.Z,this._load=0,this._idleStateCallbacks=new x.Z,this._idleUpdatesStartFired=!1,this._forceTask=!1,this._debug=!1,this._debugHandle=(0,C.YP)((()=>q.SCHEDULER_LOG_SLOW_TASKS),(e=>this._debug=e),C.nn);for(const e of Object.keys(V))this.performanceInfo.tasks.set(V[e],new b.Z(V[e]));const e=this;this._test={FRAME_SAFETY_BUDGET:z,INTERACTING_BUDGET:$,IDLE_BUDGET:K,get availableBudget(){return e._budget.budget},usedBudget:0,getBudget:()=>e._budget,setBudget:t=>e._budget=t,updateTask:e=>this._updateTask(e),getState:e=>this._getState(e),getRuntime:e=>this._getRuntime(e),frameTaskTimes:this._frameTaskTimes,resetRuntimes:()=>this._resetRuntimes(),getRunning:()=>this._getRunning()}}destroy(){this._tasks.toArray().forEach((e=>e.remove())),this._tasks.clear(),(0,a.hw)(this._debugHandle),this._microTaskQueued=!1,this._updatingChanged()}taskRunningChanged(e){this._updatingChanged(),e&&this._budget.remaining>0&&!this._microTaskQueued&&(this._microTaskQueued=!0,queueMicrotask((()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.remaining>0&&this._schedule()&&this.frame())})))}registerTask(e,s){const i=Z(e),r=new t(this,e,s,i);return this._tasks.push(r),this._updatingChanged(),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new b.Z(e)),r}registerIdleStateCallbacks(e,t){const s={idleBegin:e,idleEnd:t};this._idleStateCallbacks.push(s),this.state===Y.IDLE&&this._idleUpdatesStartFired&&s.idleBegin();const i=this;return{remove:()=>this._removeIdleStateCallbacks(s),set idleBegin(e){i._idleUpdatesStartFired&&(s.idleEnd(),i._state===Y.IDLE&&e()),s.idleBegin=e},set idleEnd(e){s.idleEnd=e}}}get load(){return this._load}set state(e){this._state!==e&&(this._state=e,this.state!==Y.IDLE&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forAll((e=>e.idleEnd()))))}get state(){return this._state}updateBudget(e){this._test.usedBudget=0,++this._frameNumber;let t=z,s=e.frameDuration,i=X;switch(this.state){case Y.IDLE:t=(0,O.HA)(0),s=(0,O.HA)(Math.max(K,e.frameDuration)),i=J;break;case Y.INTERACTING:s=(0,O.HA)(Math.max($,e.frameDuration));case Y.ANIMATING:}return s=(0,O.HA)(s-e.elapsedFrameTime-t),this.state!==Y.IDLE&&s<X&&!this._forceTask?(this._forceTask=!0,!1):(s=(0,O.HA)(Math.max(s,i)),this._budget.reset(s,this.state),this._updateLoad(),this._schedule())}frame(){switch(this._forceTask=!1,this._microTaskQueued=!1,this.state){case Y.IDLE:this._idleUpdatesStartFired||(this._idleUpdatesStartFired=!0,this._idleStateCallbacks.forAll((e=>e.idleBegin()))),this._runIdle();break;case Y.INTERACTING:this._runInteracting();break;default:this._runAnimating()}this._test.usedBudget=this._budget.elapsed}stopFrame(){this._budget.reset((0,O.HA)(0),this._state),this._budget.madeProgress()}_removeIdleStateCallbacks(e){this._idleUpdatesStartFired&&e.idleEnd(),this._idleStateCallbacks.removeUnordered(e)}removeTask(e){this._tasks.removeUnordered(e),this._runQueue.removeUnordered(e),this._updatingChanged()}_updateTask(e){this._tasks.forAll((t=>{t.name===e&&t.setPriority(e)}))}_getState(e){if(this._runQueue.some((t=>t.name===e)))return te.SCHEDULED;let t=te.IDLE;return this._tasks.forAll((s=>{s.name===e&&s.needsUpdate&&(s.schedulePriority<=1?t=te.READY:t!==te.READY&&(t=te.WAITING))})),t}_getRuntime(e){let t=0;return this._tasks.forAll((s=>{s.name===e&&(t+=s.runtime)})),t}_resetRuntimes(){this._tasks.forAll((e=>e.runtime=0))}_getRunning(){const e=new Map;if(this._tasks.forAll((t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)})),0===e.size)return null;let t="";return e.forEach(((e,s)=>{t+=e>1?` ${e}x ${s}`:` ${s}`})),t}_runIdle(){this._run()}_runInteracting(){this._run()}_runAnimating(){this._run()}_updateLoad(){const e=this._tasks.reduce(((e,t)=>t.needsUpdate?++e:e),0);this._load=.9*this._load+e*(1-.9)}_schedule(){for(this._runQueue.filterInPlace((e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1))),this._tasks.forAll((e=>{0===e.basePriority&&e.needsUpdate&&!this._runQueue.includes(e)&&e.blockFrame!==this._frameNumber&&this._runQueue.unshift(e)}));0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forAll((s=>{s.needsUpdate&&0!==s.schedulePriority&&0!==s.basePriority&&s.blockFrame!==this._frameNumber&&(e=!0,t=Math.max(t,s.basePriority),1===s.schedulePriority?(s.schedulePriority=0,this._runQueue.push(s)):--s.schedulePriority)})),!e)return this._updatingChanged(),!1}return this._updatingChanged(),!0}_run(){const e=this._budget.now();this._startFrameTaskTimes();do{for(;this._runQueue.length>0;){const t=this._budget.now(),s=this._runQueue.pop();this._budget.resetProgress();try{s.task.runTask(this._budget)===H.YIELD&&(s.blockFrame=this._frameNumber)}catch(e){F.Z.getLogger("esri.views.support.Scheduler").error(`Exception in task "${s.name}"`,e)}!this._budget.hasProgressed&&s.blockFrame!==this._frameNumber&&s.needsUpdate&&(s.name,V.I3S_CONTROLLER,s.blockFrame=this._frameNumber),s.schedulePriority=s.basePriority;const i=this._budget.now()-t;if(s.runtime+=i,this._frameTaskTimes.set(s.priority,this._frameTaskTimes.get(s.priority)+i),this._debug&&i>2*this._budget.budget&&console.log("Task",s.name,"used",i,"of max",this._budget.budget,"ms"),this._budget.remaining<=0)return this._updatingChanged(),void this._recordFrameTaskTimes(this._budget.now()-e)}}while(this._schedule());this._updatingChanged(),this._recordFrameTaskTimes(this._budget.now()-e)}_startFrameTaskTimes(){for(const e of Object.keys(V))this._frameTaskTimes.set(V[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach(((e,t)=>this.performanceInfo.tasks.get(t).record(e))),this.performanceInfo.total.record(e)}get test(){return this._test}};class t{get task(){return this._task.get()}get updating(){return this._queue.running}constructor(e,t,s,i){this._scheduler=e,this.name=t,this._basePriority=i,this.blockFrame=0,this.runtime=0,this._queue=new P,this._handles=new w.Z,this.schedulePriority=this._basePriority,this._task=new v((0,a.pC)(s)?s:this._queue),this._handles.add((0,C.gx)((()=>this.task.running),(t=>e.taskRunningChanged(t))))}remove(){this.processQueue(se),this._scheduler.removeTask(this),this.schedule=ie.schedule,this.reschedule=ie.reschedule,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){this.name=e;const t=Z(e);0!==this._basePriority&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.updating||this.task.running}schedule(e,t,s){return this._queue.push(e,t,s)}reschedule(e,t,s){return this._queue.unshift(e,t,s)}processQueue(e){this._queue.runTask(e)}}class s{constructor(){this._begin="undefined"!=typeof performance?performance.now():0,this._budget=0,this._state=Y.IDLE,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get state(){return this._state}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e,t){this._begin=this.now(),this._budget=e,this._state=t,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return performance.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}}e.Budget=s}(ee||(ee={})),function(e){e.SCHEDULED="s",e.READY="r",e.WAITING="w",e.IDLE="i"}(te||(te={}));const se=(()=>{const e=new ee.Budget;return e.enabled=!1,e})(),ie=new class{remove(){}processQueue(){}schedule(e,t,s){try{if((0,N.Hc)(t)){const e=(0,N.zE)();return s?Promise.resolve(s(e)):Promise.reject(e)}return(0,N.gx)(e(se))}catch(e){return Promise.reject(e)}}reschedule(e,t,s){return this.schedule(e,t,s)}},re="feature-store:unsupported-query",ne=new u.WJ(2e6);let ae=0;class ue{constructor(e){this._geometryQueryCache=null,this._changeHandle=null,this.capabilities={query:y.g},this._timeExtent=null,this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.objectIdField=e.objectIdField,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._changeHandle=this.featureStore.events.on("changed",(()=>this.clearCache())),this.timeInfo=e.timeInfo,e.cacheSpatialQueries&&(this._geometryQueryCache=new u.Xq(ae+++"$$",ne)),this.fieldsIndex=new R.Z(e.fields),e.scheduler&&e.priority&&(this._frameTask=e.scheduler.registerTask(e.priority))}destroy(){this._frameTask=(0,a.hw)(this._frameTask),this.clearCache(),(0,a.SC)(this._geometryQueryCache),this._changeHandle=(0,a.hw)(this._changeHandle),(0,a.SC)(this.fieldsIndex)}get featureAdapter(){return this.featureStore.featureAdapter}get timeExtent(){return this.timeInfo?(this._timeExtent||(this._timeExtent=(0,T.R)(this.timeInfo,this.featureStore)),this._timeExtent):null}clearCache(){this._geometryQueryCache?.clear(),this._allFeaturesPromise=null,this._timeExtent=null}async executeQuery(e,t){try{return(await this._executeQuery(e,{},t)).createQueryResponse()}catch(t){if(t!==S.vF)throw t;return new E.y([],e,this).createQueryResponse()}}async executeQueryForCount(e={},t){try{return(await this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null},t)).createQueryResponseForCount()}catch(e){if(e!==S.vF)throw e;return 0}}async executeQueryForExtent(e,t){const s=e.outSR;try{const i=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},t),r=i.size;if(!r)return{count:0,extent:null};(0,l.t8)(le,l.Gv),this.featureStore.forEachBounds(i.items,(e=>(0,l.TC)(le,e)),oe);const n={xmin:le[0],ymin:le[1],xmax:le[3],ymax:le[4],spatialReference:(0,S.S2)(this.spatialReference)};this.hasZ&&isFinite(le[2])&&isFinite(le[5])&&(n.zmin=le[2],n.zmax=le[5]);const a=(0,g.iV)(n,i.spatialReference,s);if(a.spatialReference=(0,S.S2)(s||this.spatialReference),a.xmax-a.xmin==0){const e=(0,o.c9)(a.spatialReference);a.xmin-=e,a.xmax+=e}if(a.ymax-a.ymin==0){const e=(0,o.c9)(a.spatialReference);a.ymin-=e,a.ymax+=e}if(this.hasZ&&null!=a.zmin&&null!=a.zmax&&a.zmax-a.zmin==0){const e=(0,o.c9)(a.spatialReference);a.zmin-=e,a.zmax+=e}return{count:r,extent:a}}catch(e){if(e===S.vF)return{count:0,extent:null};throw e}}async executeQueryForIds(e,t){return this.executeQueryForIdSet(e,t).then((e=>Array.from(e)))}async executeQueryForIdSet(e,t){try{const s=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},t),i=s.items,r=new Set;return await this._reschedule((()=>{for(const e of i)r.add(s.featureAdapter.getObjectId(e))}),t),r}catch(e){if(e===S.vF)return new Set;throw e}}async executeQueryForSnapping(e,t){const{point:s,distance:i,types:r}=e;if(r===E.r.NONE)return{candidates:[]};const n=await this._reschedule((()=>this._checkQuerySupport(e.query)),t),u=!(0,p.fS)(s.spatialReference,this.spatialReference);u&&await(0,g._W)(s.spatialReference,this.spatialReference);const o="number"==typeof i?i:i.x,l="number"==typeof i?i:i.y,h={xmin:s.x-o,xmax:s.x+o,ymin:s.y-l,ymax:s.y+l,spatialReference:s.spatialReference},c=u?(0,g.iV)(h,this.spatialReference):h;if(!c)return{candidates:[]};const f=(await(0,_.aX)((0,d.im)(s),null,{signal:t}))[0],m=(await(0,_.aX)((0,d.im)(c),null,{signal:t}))[0];if((0,a.Wi)(f)||(0,a.Wi)(m))return{candidates:[]};const y=new E.y(this._searchFeatures(this._getQueryBBoxes(m.toJSON())),n,this);await this._reschedule((()=>this._executeObjectIdsQuery(y)),t),await this._reschedule((()=>this._executeTimeQuery(y)),t),await this._reschedule((()=>this._executeAttributesQuery(y)),t);const I=f.toJSON(),T=u?(0,g.iV)(I,this.spatialReference):I,S=u?Math.max(c.xmax-c.xmin,c.ymax-c.ymin)/2:i;return y.createSnappingResponse({...e,point:T,distance:S},s.spatialReference)}async executeQueryForLatestObservations(e,t){if(!this.timeInfo||!this.timeInfo.trackIdField)throw new r.Z(re,"Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});try{const s=await this._executeQuery(e,{},t);return await this._reschedule((()=>this._filterLatest(s)),t),s.createQueryResponse()}catch(t){if(t!==S.vF)throw t;return new E.y([],e,this).createQueryResponse()}}async executeQueryForSummaryStatistics(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createSummaryStatisticsResponse(t)}async executeQueryForUniqueValues(e={},t,s){const{field:i,field2:r,field3:n,valueExpression:a}=t;return(await this._getQueryEngineResultForStats(e,{field:i,field2:r,field3:n,valueExpression:a},s)).createUniqueValuesResponse(t)}async executeQueryForClassBreaks(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createClassBreaksResponse(t)}async executeQueryForHistogram(e={},t,s){const{field:i,normalizationField:r,valueExpression:n}=t;return(await this._getQueryEngineResultForStats(e,{field:i,normalizationField:r,valueExpression:n},s)).createHistogramResponse(t)}async _schedule(e,t){return(0,a.pC)(this._frameTask)?this._frameTask.schedule(e,t):e(se)}async _reschedule(e,t){return(0,a.pC)(this._frameTask)?this._frameTask.reschedule(e,t):e(se)}async _getAllFeaturesQueryEngineResult(e){return new E.y(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if((0,a.Wi)(this._allFeaturesPromise)){const e=[];this._allFeaturesPromise=(async()=>{await this.featureStore.forEach((t=>e.push(t)))})().then((()=>e))}return(await this._allFeaturesPromise).slice()}async _executeQuery(e,t,s){e=(0,n.d9)(e),e=await this._schedule((()=>(0,S.Up)(e,this.definitionExpression,this.spatialReference)),s),e=await this._reschedule((()=>this._checkQuerySupport(e)),s),e={...e,...t};const i=await this._reschedule((()=>this._executeSceneFilterQuery(e,s)),s),r=await this._reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this._reschedule((()=>this._executeAggregateIdsQuery(r)),s),await this._reschedule((()=>this._executeObjectIdsQuery(r)),s),await this._reschedule((()=>this._executeTimeQuery(r)),s),await this._reschedule((()=>this._executeAttributesQuery(r)),s),r}async _executeSceneFilterQuery(e,t){if((0,a.Wi)(e.sceneFilter))return null;const{outSR:s,returnGeometry:i,returnCentroid:r}=e,n=this.featureStore.featureSpatialReference,u=e.sceneFilter.geometry,o=(0,a.Wi)(n)||(0,p.fS)(n,u.spatialReference)?u:(0,g.iV)(u,n);if(!o)return null;const l=i||r,h=(0,p.JY)(s)&&!(0,p.fS)(this.spatialReference,s)&&l?async e=>this._project(e,s):e=>e,c=this.featureAdapter,d=this._searchFeatures(this._getQueryBBoxes(o));if("disjoint"===e.sceneFilter.spatialRelationship){if(!d.length)return null;const s=new Set;for(const e of d)s.add(c.getObjectId(e));const i=await this._reschedule((()=>this._getAllFeatures()),t);return h(await this._reschedule((async()=>{const r=await(0,I.cW)("esriSpatialRelDisjoint",o,this.geometryType,this.hasZ,this.hasM),n=await this._runSpatialFilter(i,(e=>!s.has(c.getObjectId(e))||r(c.getGeometry(e))),t);return new E.y(n,e,this)}),t))}if(!d.length)return new E.y([],e,this);if(this._canExecuteSinglePass(o,e))return h(new E.y(d,e,this));const _=await(0,I.cW)("esriSpatialRelContains",o,this.geometryType,this.hasZ,this.hasM),f=await this._runSpatialFilter(d,(e=>_(c.getGeometry(e))),t);return h(new E.y(f,e,this))}async _executeGeometryQuery(e,t,s){if((0,a.pC)(t)&&0===t.items.length)return t;e=(0,a.pC)(t)?t.query:e;const{geometry:r,outSR:n,spatialRel:u,returnGeometry:o,returnCentroid:l}=e,h=this.featureStore.featureSpatialReference,c=!r||(0,a.Wi)(h)||(0,p.fS)(h,r.spatialReference)?r:(0,g.iV)(r,h),d=o||l,_=(0,p.JY)(n)&&!(0,p.fS)(this.spatialReference,n),f=this._geometryQueryCache&&(0,a.Wi)(t)?_&&d?JSON.stringify({originalFilterGeometry:r,spatialRelationship:u,outSpatialReference:n}):JSON.stringify({originalFilterGeometry:r,spatialRelationship:u}):null,m=f?this._geometryQueryCache.get(f):null;if((0,a.pC)(m))return new E.y(m,e,this);const y=async e=>(_&&d&&await this._project(e,n),f&&this._geometryQueryCache.put(f,e.items,e.items.length+1),e);if(!c)return y((0,a.pC)(t)?t:await this._getAllFeaturesQueryEngineResult(e));const T=this.featureAdapter;let S=this._searchFeatures(this._getQueryBBoxes(r));if("esriSpatialRelDisjoint"===u){if(!S.length)return y((0,a.pC)(t)?t:await this._getAllFeaturesQueryEngineResult(e));const i=new Set;for(const e of S)i.add(T.getObjectId(e));const r=(0,a.pC)(t)?t.items:await this._reschedule((()=>this._getAllFeatures()),s),n=await this._reschedule((async()=>{const t=await(0,I.cW)(u,c,this.geometryType,this.hasZ,this.hasM),n=await this._runSpatialFilter(r,(e=>!i.has(T.getObjectId(e))||t(T.getGeometry(e))),s);return new E.y(n,e,this)}),s);return y(n)}if((0,a.pC)(t)){const e=new i.SO;S=S.filter((s=>(0,i.cq)(t.items,s,t.items.length,e)>=0))}if(!S.length){const t=new E.y([],e,this);return f&&this._geometryQueryCache.put(f,t.items,1),t}if(this._canExecuteSinglePass(c,e))return y(new E.y(S,e,this));const R=await(0,I.cW)(u,c,this.geometryType,this.hasZ,this.hasM),A=await this._runSpatialFilter(S,(e=>R(T.getGeometry(e))),s);return y(new E.y(A,e,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds||!e.query.aggregateIds.length||(0,a.Wi)(this.aggregateAdapter))return;const t=new Set;for(const s of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(s).forEach((e=>t.add(e)));const s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}_executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds||!e.query.objectIds.length)return;const t=new Set(e.query.objectIds),s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}_executeTimeQuery(e){if(0===e.items.length)return;const t=(0,T.y)(this.timeInfo,e.query.timeExtent,this.featureAdapter);(0,a.Wi)(t)||(e.items=e.items.filter(t))}_executeAttributesQuery(e){if(0===e.items.length)return;const t=(0,m.Jc)(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter((e=>t.testFeature(e,this.featureAdapter)))}}async _runSpatialFilter(e,t,s){if(!t)return e;if((0,a.Wi)(this._frameTask))return e.filter((e=>t(e)));let i=0;const r=new Array,n=async a=>{for(;i<e.length;){const u=e[i++];t(u)&&(r.push(u),a.madeProgress()),a.done&&await this._reschedule((e=>n(e)),s)}};return this._reschedule((e=>n(e)),s).then((()=>r))}_filterLatest(e){const{trackIdField:t,startTimeField:s,endTimeField:i}=this.timeInfo,r=i||s,n=new Map,a=this.featureAdapter.getAttribute;for(const s of e.items){const e=a(s,t),i=a(s,r),u=n.get(e);(!u||i>a(u,r))&&n.set(e,s)}e.items=Array.from(n.values())}_canExecuteSinglePass(e,t){const{spatialRel:s}=t;return(0,I.hN)(e)&&("esriSpatialRelEnvelopeIntersects"===s||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===s||"esriSpatialRelContains"===s||"esriSpatialRelWithin"===s))}async _project(e,t){if(!t||(0,p.fS)(this.spatialReference,t))return e;const s=this.featureAdapter,i=await(0,g.oj)(e.items.map((e=>(0,S.Op)(this.geometryType,this.hasZ,this.hasM,s.getGeometry(e)))),this.spatialReference,t);return e.items=i.map(((t,i)=>s.cloneWithGeometry(e.items[i],(0,f.GH)(t,this.hasZ,this.hasM)))),e}_getQueryBBoxes(e){if((0,I.hN)(e)){if((0,d.YX)(e))return[(0,h.al)(e.xmin,e.ymin,e.xmax,e.ymax)];if((0,d.oU)(e))return e.rings.map((e=>(0,h.al)(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1]))))}return[(0,c.$P)((0,h.Ue)(),e)]}_searchFeatures(e){for(const t of e)this.featureStore.forEachInBounds(t,(e=>he.add(e)));const t=Array.from(he.values());return he.clear(),t}async _checkStatisticsSupport(e,t){if((e.distance??0)<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new r.Z(re,"Unsupported query options",{query:e});return this._checkAttributesQuerySupport(e),Promise.all([this._checkStatisticsParamsSupport(t),(0,I.P0)(e,this.geometryType,this.spatialReference),(0,g._W)(this.spatialReference,e.outSR)]).then((()=>e))}async _checkStatisticsParamsSupport(e){let t=[];if(e.valueExpression){const{arcadeUtils:s}=await(0,A.LC)();t=s.extractFieldNames(e.valueExpression)}if(e.field&&t.push(e.field),e.field2&&t.push(e.field2),e.field3&&t.push(e.field3),e.normalizationField&&t.push(e.normalizationField),!t.length)throw new r.Z(re,"params should have at least a field or valueExpression",{params:e});(0,m.Of)(this.fieldsIndex,t,"params contains missing fields")}async _checkQuerySupport(e){if((e.distance??0)<0||null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new r.Z(re,"Unsupported query options",{query:e});return this._checkAttributesQuerySupport(e),this._checkStatisticsQuerySupport(e),Promise.all([(0,I.P0)(e,this.geometryType,this.spatialReference),(0,g._W)(this.spatialReference,e.outSR)]).then((()=>e))}_checkAttributesQuerySupport(e){const{outFields:t,orderByFields:s,returnDistinctValues:i,outStatistics:n}=e,a=n?n.map((e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase())).filter(Boolean):[];if(s&&s.length>0){const e=" asc",t=" desc",i=s.map((s=>{const i=s.toLowerCase();return i.includes(e)?i.split(e)[0]:i.includes(t)?i.split(t)[0]:s})).filter((e=>!a.includes(e)));(0,m.Of)(this.fieldsIndex,i,"orderByFields contains missing fields")}if(t&&t.length>0)(0,m.Of)(this.fieldsIndex,t,"outFields contains missing fields");else if(i)throw new r.Z(re,"outFields should be specified for returnDistinctValues",{query:e});(0,m.hO)(this.fieldsIndex,e.where)}_checkStatisticsQuerySupport(e){const{outStatistics:t,groupByFieldsForStatistics:s,having:i}=e,n=s&&s.length,a=t&&t.length;if(i){if(!n||!a)throw new r.Z(re,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:e});(0,m.z4)(this.fieldsIndex,i,t)}if(a){if(!function(e){return null!=e&&e.every((e=>"exceedslimit"!==e.statisticType))}(t))return;const i=t.map((e=>e.onStatisticField)).filter(Boolean);(0,m.Of)(this.fieldsIndex,i,"onStatisticFields contains missing fields"),n&&(0,m.Of)(this.fieldsIndex,s,"groupByFieldsForStatistics contains missing fields");for(const s of t){const{onStatisticField:t,statisticType:i}=s;if("percentile_disc"!==i&&"percentile_cont"!==i||!("statisticParameters"in s)){if("count"!==i&&t&&(0,m.G3)(t,this.fieldsIndex))throw new r.Z(re,"outStatistics contains non-numeric fields",{definition:s,query:e})}else{const{statisticParameters:t}=s;if(!t)throw new r.Z(re,"statisticParamters should be set for percentile type",{definition:s,query:e})}}}}async _getQueryEngineResultForStats(e,t,s){e=(0,n.d9)(e);try{e=await this._schedule((()=>(0,S.Up)(e,this.definitionExpression,this.spatialReference)),s),e=await this._reschedule((()=>this._checkStatisticsSupport(e,t)),s);const i=await this._reschedule((()=>this._executeSceneFilterQuery(e,s)),s),r=await this._reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this._reschedule((()=>this._executeAggregateIdsQuery(r)),s),await this._reschedule((()=>this._executeObjectIdsQuery(r)),s),await this._reschedule((()=>this._executeTimeQuery(r)),s),await this._reschedule((()=>this._executeAttributesQuery(r)),s),r}catch(t){if(t!==S.vF)throw t;return new E.y([],e,this)}}}const oe=(0,l.Ue)(),le=(0,l.Ue)(),he=new Set},61159:(e,t,s)=>{s.d(t,{g:()=>i});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},10402:(e,t,s)=>{s.d(t,{hN:()=>R,P0:()=>S,cW:()=>T});var i=s(20102),r=s(54102),n=s(87416),a=s(33955),u=s(8744);function o(e,t){return e?t?4:3:t?3:2}function l(e,t,s,i,r,n){const a=o(r,n),{coords:u,lengths:l}=i;if(!l)return!1;for(let i=0,r=0;i<l.length;i++,r+=a)if(!h(e,t,s,u[r],u[r+1]))return!1;return!0}function h(e,t,s,i,r){if(!e)return!1;const n=o(t,s),{coords:a,lengths:u}=e;let l=!1,h=0;for(const e of u)l=c(l,a,n,h,e,i,r),h+=e*n;return l}function c(e,t,s,i,r,n,a){let u=e,o=i;for(let e=i,l=i+r*s;e<l;e+=s){o=e+s,o===l&&(o=i);const r=t[e],h=t[e+1],c=t[o],d=t[o+1];(h<a&&d>=a||d<a&&h>=a)&&r+(a-h)/(d-h)*(c-r)<n&&(u=!u)}return u}var d=s(98732),_=s(5428),p=s(37427),f=s(11490);const m="feature-store:unsupported-query",g={esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"intersects",esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:null},y={esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},E={esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},I={esriGeometryPoint:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1};function T(e,t,i,u,o){if((0,a.oU)(t)&&"esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,d.Uy)(new _.Z,t,!1,!1);return Promise.resolve((t=>function(e,t,s,i){return h(e,!1,!1,i.coords[0],i.coords[1])}(e,0,0,t)))}if((0,a.oU)(t)&&"esriGeometryMultipoint"===i){const s=(0,d.Uy)(new _.Z,t,!1,!1);if("esriSpatialRelContains"===e)return Promise.resolve((e=>l(s,!1,!1,e,u,o)))}if((0,a.YX)(t)&&"esriGeometryPoint"===i&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return Promise.resolve((e=>(0,r.aV)(t,(0,f.Op)(i,u,o,e))));if((0,a.YX)(t)&&"esriGeometryMultipoint"===i&&"esriSpatialRelContains"===e)return Promise.resolve((e=>(0,r.lQ)(t,(0,f.Op)(i,u,o,e))));if((0,a.YX)(t)&&"esriSpatialRelIntersects"===e){const e="mesh"===(c=i)?n.h_:(0,n.IY)(c);return Promise.resolve((s=>e(t,(0,f.Op)(i,u,o,s))))}var c;return Promise.all([s.e(5837),s.e(247)]).then(s.bind(s,30247)).then((s=>{const r=s[g[e]].bind(null,t.spatialReference,t);return e=>r((0,f.Op)(i,u,o,e))}))}async function S(e,t,s){const{spatialRel:r,geometry:n}=e;if(n){if(!function(e){return null!=e&&!0===y[e]}(r))throw new i.Z(m,"Unsupported query spatial relationship",{query:e});if((0,u.JY)(n.spatialReference)&&(0,u.JY)(s)){if(!function(e){return null!=e&&!0===E[(0,a.Ji)(e)]}(n))throw new i.Z(m,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===I[e]}(t))throw new i.Z(m,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,p._W)(e.geometry&&e.geometry.spatialReference,e.outSR)}}}function R(e){if((0,a.YX)(e))return!0;if((0,a.oU)(e)){for(const t of e.rings){if(5!==t.length)return!1;if(t[0][0]!==t[1][0]||t[0][0]!==t[4][0]||t[2][0]!==t[3][0]||t[0][1]!==t[3][1]||t[0][1]!==t[4][1]||t[1][1]!==t[2][1])return!1}return!0}return!1}},17590:(e,t,s)=>{function i(e,t){if(!e)return null;const s=t.featureAdapter,{startTimeField:i,endTimeField:r}=e;let n=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY;if(i&&r)t.forEach((e=>{const t=s.getAttribute(e,i),u=s.getAttribute(e,r);null==t||isNaN(t)||(n=Math.min(n,t)),null==u||isNaN(u)||(a=Math.max(a,u))}));else{const e=i||r;t.forEach((t=>{const i=s.getAttribute(t,e);null==i||isNaN(i)||(n=Math.min(n,i),a=Math.max(a,i))}))}return{start:n,end:a}}function r(e,t,s){if(!t||!e)return null;const{startTimeField:i,endTimeField:r}=e;if(!i&&!r)return null;const{start:n,end:a}=t;return null===n&&null===a?null:void 0===n&&void 0===a?()=>!1:i&&r?function(e,t,s,i,r){return null!=i&&null!=r?n=>{const a=e.getAttribute(n,t),u=e.getAttribute(n,s);return(null==a||a<=r)&&(null==u||u>=i)}:null!=i?t=>{const r=e.getAttribute(t,s);return null==r||r>=i}:null!=r?s=>{const i=e.getAttribute(s,t);return null==i||i<=r}:void 0}(s,i,r,n,a):function(e,t,s,i){return null!=s&&null!=i&&s===i?i=>e.getAttribute(i,t)===s:null!=s&&null!=i?r=>{const n=e.getAttribute(r,t);return n>=s&&n<=i}:null!=s?i=>e.getAttribute(i,t)>=s:null!=i?s=>e.getAttribute(s,t)<=i:void 0}(s,i||r,n,a)}s.d(t,{R:()=>i,y:()=>r})}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[908],{84552:(e,t,i)=>{i.d(t,{Z:()=>c});var r=i(43697),a=i(2368),n=i(96674),s=i(35463),o=i(5600),l=(i(75215),i(67676),i(36030)),d=i(52011),u=i(78981);let p=class extends((0,a.J)(n.wq)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,s.rJ)(this.value,this.unit,"milliseconds")}};(0,r._)([(0,l.J)(u.v,{nonNullable:!0})],p.prototype,"unit",void 0),(0,r._)([(0,o.Cb)({type:Number,json:{write:!0},nonNullable:!0})],p.prototype,"value",void 0),p=(0,r._)([(0,d.j)("esri.TimeInterval")],p);const c=p},3920:(e,t,i)=>{i.d(t,{p:()=>d,r:()=>u});var r=i(43697),a=i(15923),n=i(61247),s=i(5600),o=i(52011),l=i(72762);const d=e=>{let t=class extends e{destroy(){this.destroyed||(this._get("handles")?.destroy(),this._get("updatingHandles")?.destroy())}get handles(){return this._get("handles")||new n.Z}get updatingHandles(){return this._get("updatingHandles")||new l.t}};return(0,r._)([(0,s.Cb)({readOnly:!0})],t.prototype,"handles",null),(0,r._)([(0,s.Cb)({readOnly:!0})],t.prototype,"updatingHandles",null),t=(0,r._)([(0,o.j)("esri.core.HandleOwner")],t),t};let u=class extends(d(a.Z)){};u=(0,r._)([(0,o.j)("esri.core.HandleOwner")],u)},42033:(e,t,i)=>{i.d(t,{E:()=>a,_:()=>n});var r=i(70586);async function a(e,t){const{WhereClause:r}=await i.e(1534).then(i.bind(i,41534));return r.create(e,t)}function n(e,t){return(0,r.pC)(e)?(0,r.pC)(t)?`(${e}) AND (${t})`:e:t}},72762:(e,t,i)=>{i.d(t,{t:()=>p});var r=i(43697),a=i(15923),n=i(61247),s=i(70586),o=i(17445),l=i(1654),d=i(5600),u=i(52011);let p=class extends a.Z{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._handles=new n.Z,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll(),this._handles.destroy()}add(e,t,i={}){return this._installWatch(e,t,i,o.YP)}addWhen(e,t,i={}){return this._installWatch(e,t,i,o.gx)}addOnCollectionChange(e,t,{initial:i=!1,final:r=!1}={}){const a=++this._handleId;return this._handles.add([(0,o.on)(e,"after-changes",this._createSyncUpdatingCallback(),o.Z_),(0,o.on)(e,"change",t,{onListenerAdd:i?e=>t({added:e.toArray(),removed:[]}):void 0,onListenerRemove:r?e=>t({added:[],removed:e.toArray()}):void 0})],a),{remove:()=>this._handles.remove(a)}}addPromise(e){if((0,s.Wi)(e))return e;const t=++this._handleId;this._handles.add({remove:()=>{this._pendingPromises.delete(e)&&(0!==this._pendingPromises.size||this._handles.has(c)||this._set("updating",!1))}},t),this._pendingPromises.add(e),this._set("updating",!0);const i=()=>this._handles.remove(t);return e.then(i,i),e}removeAll(){this._pendingPromises.clear(),this._handles.removeAll(),this._set("updating",!1)}_installWatch(e,t,i={},r){const a=++this._handleId;i.sync||this._installSyncUpdatingWatch(e,a);const n=r(e,t,i);return this._handles.add(n,a),{remove:()=>this._handles.remove(a)}}_installSyncUpdatingWatch(e,t){const i=this._createSyncUpdatingCallback(),r=(0,o.YP)(e,i,{sync:!0,equals:()=>!1});return this._handles.add(r,t),r}_createSyncUpdatingCallback(){return()=>{this._handles.remove(c),++this._scheduleHandleId;const e=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this._handles.add((0,l.Os)((()=>{e===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this._handles.remove(c))})),c)}}};(0,r._)([(0,d.Cb)({readOnly:!0})],p.prototype,"updating",void 0),p=(0,r._)([(0,u.j)("esri.core.support.WatchUpdatingTracking")],p);const c=-42},30359:(e,t,i)=>{i.r(t),i.d(t,{default:()=>be});var r=i(43697),a=i(46791),n=i(20102),s=i(3920),o=i(61247),l=i(70586),d=i(16453),u=i(95330),p=i(17445),c=i(42033),y=i(17452),m=i(5600),h=(i(75215),i(67676),i(71715)),g=i(52011),f=i(31263),S=i(87085),T=i(54295),b=i(17287),v=i(71612),C=i(17017),w=i(66361),A=i(53713),_=i(38009),E=i(16859),I=i(34760),F=i(72965),x=i(28294),M=i(66677),j=i(21506),O=i(50957),P=i(53518),U=i(35671),k=i(96674),Z=i(30556),R=i(72729);let G=class extends k.wq{constructor(){super(...arguments),this.code=null,this.defaultValues={},this.domains=null,this.name=null}readDomains(e){if(!e)return null;const t={};for(const i of Object.keys(e))t[i]=(0,R.im)(e[i]);return t}writeDomains(e,t){if(!e)return;const i={};for(const t of Object.keys(e))e[t]&&(i[t]=e[t]?.toJSON());t.domains=i}};(0,r._)([(0,m.Cb)({type:Number,json:{write:!0}})],G.prototype,"code",void 0),(0,r._)([(0,m.Cb)({type:Object,json:{write:!0}})],G.prototype,"defaultValues",void 0),(0,r._)([(0,m.Cb)({json:{write:!0}})],G.prototype,"domains",void 0),(0,r._)([(0,h.r)("domains")],G.prototype,"readDomains",null),(0,r._)([(0,Z.c)("domains")],G.prototype,"writeDomains",null),(0,r._)([(0,m.Cb)({type:String,json:{write:!0}})],G.prototype,"name",void 0),G=(0,r._)([(0,g.j)("esri.layers.support.Subtype")],G);const L=G;var D=i(51773),N=i(16050),Q=(i(12501),i(28756),i(92271),i(72529),i(5499)),z=i(84382),B=i(81571),W=(i(91423),i(80442),i(10699)),q=i(22974),H=i(83379),V=i(78286),K=i(63213),J=i(55343),Y=i(70082),$=i(54306),X=i(30707),ee=i(32163),te=i(28412);const ie=["charts","editingEnabled","formTemplate","labelsVisible","labelingInfo","legendEnabled","minScale","maxScale","opacity","popupEnabled","popupTemplate","renderer","subtypeCode","templates","title","visible"],re={key:"type",base:Q.Z,errorContext:"renderer",typeMap:{simple:z.Z,"unique-value":B.Z,"class-breaks":N.Z}},ae=(0,P.v)(),ne=(0,K.d)({types:re});let se=0;function oe(e){const t=e.json.write;return"object"==typeof t?t.ignoreOrigin=!0:e.json.write={ignoreOrigin:!0},e}function le(e){switch(e){case"point":case"multipoint":return te.xA.clone();case"polyline":return te.CJ.clone();case"polygon":case"multipatch":return te.z3.clone();default:return null}}function de(e,t){return null==e?null:t.subtypes?.find((t=>t.code===e))}function ue(e,t){let i=null;switch(t.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":i="point";break;case"esriGeometryPolyline":i="line";break;case"esriGeometryPolygon":case"esriGeometryMultiPatch":i="polygon";break;default:t.type,i=null}const r={},a=de(e,t);if((0,l.pC)(a)){const{defaultValues:e}=a;for(const t in e)r[t]=e[t]}return r[t.subtypeField]=e,new Y.Z({name:"New Feature",drawingTool:i,prototype:{attributes:r}})}let pe=class extends((0,s.p)((0,d.R)((0,W.IG)(H.Z)))){constructor(e){super(e),this.charts=null,this.editingEnabled=!0,this.fieldOverrides=null,this.fieldsIndex=null,this.formTemplate=null,this.id=`${Date.now().toString(16)}-subtype-sublayer-${se++}`,this.type="subtype-sublayer",this.labelsVisible=!0,this.labelingInfo=null,this.layerType="ArcGISFeatureLayer",this.legendEnabled=!0,this.listMode="show",this.minScale=0,this.maxScale=0,this.opacity=1,this.popupEnabled=!0,this.popupTemplate=null,this.subtypeCode=null,this.templates=null,this.title=null,this.visible=!0}writeFieldOverrides(e,t,i){const{fields:r,parent:a}=this;let n;if(r){n=[];let e=0;r.forEach((({name:t,alias:i,editable:r,visible:s})=>{if(!s)return;const o=a?.fields?.find((e=>e.name===t));if(!o)return;const l={name:t};let d=!1;i!==o.alias&&(l.alias=i,d=!0),r!==o.editable&&(l.editable=r,d=!0),n.push(l),d&&e++})),0===e&&n.length===r.length&&(n=null)}else n=(0,q.d9)(e);n?.length&&(0,V.RB)(i,n,t)}get fields(){const{parent:e,fieldOverrides:t,subtypeCode:i}=this,r=e?.fields;if(!e||!r?.length)return null;const{subtypes:a,subtypeField:n}=e,s=a?.find((e=>e.code===i)),o=s?.defaultValues,l=s?.domains,d=[];for(const e of r){const r=e.clone(),{name:a}=r,s=t?.find((e=>e.name===a));if(r.visible=!t||!!s,s){const{alias:e,editable:t}=s;e&&(r.alias=e),!1===t&&(r.editable=!1)}const u=o?.[a]??null;r.defaultValue=a===n?i:u;const p=l?.[a]??null;r.domain=a===n?null:p?"inherited"===p.type?r.domain:p.clone():null,d.push(r)}return d}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){(0,U.YN)(e,this.fieldsIndex),this._override("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const{parent:e}=this;return e&&!e.isTable&&"mesh"!==e.geometryType?function(e){return new z.Z({symbol:le(e)})}(e.geometryType):null}readRendererFromService(e,t,i){if("Table"===t.type)return null;const r=t.drawingInfo?.renderer,a=ne(r,t,i);let n;const{subtypeCode:s}=this;if(null!=s&&function(e,t){return!(!t||"unique-value"!==e?.type||"string"!=typeof e.field||e.field.toLowerCase()!==t.toLowerCase()||e.field2||e.field3||e.valueExpression)}(a,t.subtypeField)){const e=a.uniqueValueInfos?.find((({value:e})=>(e="number"==typeof e?String(e):e)===String(s)));e&&(n=new z.Z({symbol:e.symbol}))}else"simple"!==a?.type||a.visualVariables?.length||(n=a);return n}readRenderer(e,t,i){const r=t?.layerDefinition?.drawingInfo?.renderer;if(r&&!r.visualVariables?.length)return ne(r,t,i)||void 0}readTemplatesFromService(e,t){return[ue(this.subtypeCode,t)]}readTitleFromService(e,t){const i=de(this.subtypeCode,t);return(0,l.pC)(i)?i.name:null}createPopupTemplate(e){let t=this;const{parent:i,fields:r,title:a}=this;if(i){const{displayField:e,editFieldsInfo:n,objectIdField:s}=i;t={displayField:e,editFieldsInfo:n,fields:r,objectIdField:s,title:a}}return(0,ee.eZ)(t,e)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e){return this._getLayerDomain(e)}hasUserOverrides(){return ie.some((e=>this.originIdOf(e)===f.s3.USER))}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}};(0,r._)([(0,m.Cb)({json:{write:{ignoreOrigin:!0}}})],pe.prototype,"charts",void 0),(0,r._)([(0,m.Cb)({type:Boolean,nonNullable:!0,json:{name:"enableEditing",write:{ignoreOrigin:!0}}})],pe.prototype,"editingEnabled",void 0),(0,r._)([(0,m.Cb)({readOnly:!0,json:{name:"layerDefinition.fieldOverrides",origins:{service:{read:!1}},write:{ignoreOrigin:!0,allowNull:!0}}})],pe.prototype,"fieldOverrides",void 0),(0,r._)([(0,Z.c)("fieldOverrides")],pe.prototype,"writeFieldOverrides",null),(0,r._)([(0,m.Cb)({...ae.fields,readOnly:!0,json:{read:!1}})],pe.prototype,"fields",null),(0,r._)([(0,m.Cb)(ae.fieldsIndex)],pe.prototype,"fieldsIndex",void 0),(0,r._)([(0,m.Cb)({type:J.Z,json:{name:"formInfo",write:{ignoreOrigin:!0}}})],pe.prototype,"formTemplate",void 0),(0,r._)([(0,m.Cb)({type:String,readOnly:!0,json:{origins:{service:{read:!1}},write:{ignoreOrigin:!0}}})],pe.prototype,"id",void 0),(0,r._)([(0,m.Cb)({readOnly:!0,json:{read:!1}})],pe.prototype,"type",void 0),(0,r._)([(0,m.Cb)(oe((0,q.d9)(j.iR)))],pe.prototype,"labelsVisible",void 0),(0,r._)([(0,m.Cb)({type:[$.Z],json:{name:"layerDefinition.drawingInfo.labelingInfo",origins:{service:{read:!1}},read:{reader:X.r},write:{ignoreOrigin:!0}}})],pe.prototype,"labelingInfo",void 0),(0,r._)([(0,m.Cb)({type:["ArcGISFeatureLayer"],readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],pe.prototype,"layerType",void 0),(0,r._)([(0,m.Cb)(oe((0,q.d9)(j.rn)))],pe.prototype,"legendEnabled",void 0),(0,r._)([(0,m.Cb)({type:["show","hide"]})],pe.prototype,"listMode",void 0),(0,r._)([(0,m.Cb)((()=>{const e=(0,q.d9)(j.rO);return e.json.origins.service.read=!1,oe(e)})())],pe.prototype,"minScale",void 0),(0,r._)([(0,m.Cb)((()=>{const e=(0,q.d9)(j.u1);return e.json.origins.service.read=!1,oe(e)})())],pe.prototype,"maxScale",void 0),(0,r._)([(0,m.Cb)({readOnly:!0})],pe.prototype,"effectiveScaleRange",null),(0,r._)([(0,m.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0,json:{write:{ignoreOrigin:!0}}})],pe.prototype,"opacity",void 0),(0,r._)([(0,m.Cb)()],pe.prototype,"parent",void 0),(0,r._)([(0,m.Cb)(oe((0,q.d9)(j.C_)))],pe.prototype,"popupEnabled",void 0),(0,r._)([(0,m.Cb)({type:D.Z,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],pe.prototype,"popupTemplate",void 0),(0,r._)([(0,m.Cb)({readOnly:!0})],pe.prototype,"defaultPopupTemplate",null),(0,r._)([(0,m.Cb)({types:re,json:{write:{target:"layerDefinition.drawingInfo.renderer",ignoreOrigin:!0}}})],pe.prototype,"renderer",null),(0,r._)([(0,h.r)("service","renderer",["drawingInfo.renderer","subtypeField","type"])],pe.prototype,"readRendererFromService",null),(0,r._)([(0,h.r)("renderer",["layerDefinition.drawingInfo.renderer"])],pe.prototype,"readRenderer",null),(0,r._)([(0,m.Cb)({type:Number,json:{origins:{service:{read:!1}},write:{ignoreOrigin:!0}}})],pe.prototype,"subtypeCode",void 0),(0,r._)([(0,m.Cb)({type:[Y.Z],json:{name:"layerDefinition.templates",write:{ignoreOrigin:!0}}})],pe.prototype,"templates",void 0),(0,r._)([(0,h.r)("service","templates",["geometryType","subtypeField","subtypes","type"])],pe.prototype,"readTemplatesFromService",null),(0,r._)([(0,m.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],pe.prototype,"title",void 0),(0,r._)([(0,h.r)("service","title",["subtypes"])],pe.prototype,"readTitleFromService",null),(0,r._)([(0,m.Cb)({type:Boolean,nonNullable:!0,json:{name:"visibility",write:{ignoreOrigin:!0}}})],pe.prototype,"visible",void 0),pe=(0,r._)([(0,g.j)("esri.layers.support.SubtypeSublayer")],pe);const ce=pe;var ye=i(76259),me=i(60199),he=i(14165);const ge="SubtypeGroupLayer";function fe(e,t){return new n.Z("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}const Se=(0,P.v)();let Te=class extends((0,A.B)((0,w.o1)((0,v.h)((0,x.n)((0,F.M)((0,I.Q)((0,b.Y)((0,_.q)((0,E.I)((0,d.R)((0,C.N)((0,T.V)((0,s.p)(S.Z)))))))))))))){constructor(...e){super(...e),this._handles=new o.Z,this._sublayersCollectionChanged=!1,this.fields=null,this.fieldsIndex=null,this.outFields=null,this.subtypes=null,this.sublayers=new(a.Z.ofType(ce)),this.timeInfo=null,this.title="Layer",this.type="subtype-group",this.addHandles((0,p.YP)((()=>this.sublayers),((e,t)=>this._handleSublayersChange(e,t)),p.Z_))}destroy(){this.source?.destroy(),this._handles=(0,l.SC)(this._handles)}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=(0,l.pC)(e)?e.signal:null,i=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(u.r9).then((async()=>{if(!this.url)throw new n.Z("subtype-grouplayer:missing-url-or-source","SubtypeGroupLayer must be created with either a url or a portal item");if(null==this.layerId)throw new n.Z("subtype-grouplayer:missing-layerid","layerId is required for a SubtypeGroupLayer created with url");return this._initLayerProperties(await this.createGraphicsSource(t))})).then((()=>(0,O.Fs)(this,e))).then((()=>this.finishLoadEditablePortalLayer(e)));return this.addResolvingPromise(i),Promise.resolve(this)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get parsedUrl(){const e=(0,y.mN)(this.url);return null!=e&&null!=this.layerId&&(e.path=(0,y.v_)(e.path,this.layerId.toString())),e}set source(e){this._get("source")!==e&&this._set("source",e)}readTitleFromService(e,{name:t}){return this.url?(0,M.a7)(this.url,t):t}async addAttachment(e,t){return(0,O.JD)(this,e,t,ge)}async updateAttachment(e,t,i){return(0,O.Y5)(this,e,t,i,ge)}async applyEdits(e,t){return(0,O.Jj)(this,e,t)}on(e,t){return super.on(e,t)}async createGraphicsSource(e){const{default:t}=await(0,u.Hl)(Promise.all([i.e(4599),i.e(9771)]).then(i.bind(i,6502)),e);return new t({layer:this}).load({signal:e})}createQuery(){const e=(0,O.rP)(this),t=this.sublayers.map((e=>e.subtypeCode));return e.where=(0,c._)(`${this.subtypeField} IN (${t.join(",")})`,this.definitionExpression),e}async deleteAttachments(e,t){return(0,O.FV)(this,e,t,ge)}async fetchRecomputedExtents(e){return(0,O.Ci)(this,e,ge)}getFieldDomain(e,t){return this._getLayerDomain(e)}getField(e){return this.fieldsIndex.get(e)}async queryAttachments(e,t){return(0,O.SU)(this,e,t,ge)}async queryFeatures(e,t){const i=await this.load(),r=he.Z.from(e)??i.createQuery(),a=(0,l.Pt)(r.outFields,[]);a.includes(this.subtypeField)||(a.push(this.subtypeField),r.outFields=a);const n=await i.source.queryFeatures(r,t);if(n?.features)for(const e of n.features)e.layer=this._findSublayerForFeature(e),e.sourceLayer=this;return n}async queryObjectIds(e,t){return(0,O.tD)(this,e,t,ge)}async queryFeatureCount(e,t){return(0,O.VG)(this,e,t,ge)}async queryExtent(e,t){return(0,O.KE)(this,e,t,ge)}async queryRelatedFeatures(e,t){return(0,O.kp)(this,e,t,ge)}async queryRelatedFeaturesCount(e,t){return(0,O.C9)(this,e,t,ge)}write(e,t){const{origin:i,layerContainerType:r,messages:a}=t;if(this.isTable){if("web-scene"===i||"web-map"===i&&"tables"!==r)return a?.push(fe(this,"using a table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&"web-map"===i&&"tables"===r)return a?.push(fe(this,"using a non-table source cannot be written to tables in web maps")),null;return this.sublayers?.length?super.write(e,t):(a?.push(new n.Z("web-document-write:invalid-property",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' has invalid value for 'sublayers' property. 'sublayers' collection should contain at least one sublayer`,{layer:this})),null)}serviceSupportsSpatialReference(e){return!!this.loaded&&(0,me.D)(this,e)}_findSublayerForFeature(e){const t=this.fieldsIndex.get(this.subtypeField),i=e.attributes[t.name];return this.sublayers.find((e=>e.subtypeCode===i))}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}async _initLayerProperties(e){this._set("source",e);const{sourceJSON:t}=e;if(t&&(this.sourceJSON=t,this.read(t,{origin:"service",url:this.parsedUrl})),this.isTable)throw new n.Z("subtype-grouplayer:unsupported-source","SubtypeGroupLayer cannot be created using a layer with table source");if(!this.subtypes?.length)throw new n.Z("subtype-grouplayer:missing-subtypes","SubtypeGroupLayer must be created using a layer with subtypes");this._verifyFields(),(0,U.UF)(this.timeInfo,this.fieldsIndex)}async hasDataChanged(){return(0,O.gG)(this)}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("SubtypeGroupLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some((e=>"geometry"===e.type))||console.log("SubtypeGroupLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null})),this.handles.remove("sublayers-owner")),e&&(e.forEach((e=>{e.parent=this})),this._sublayersCollectionChanged=!1,this.handles.add([e.on("after-add",(({item:e})=>{e.parent=this})),e.on("after-remove",(({item:e})=>{e.parent=null})),e.on("after-changes",(()=>{this._sublayersCollectionChanged=!0}))],"sublayers-owner"))}};(0,r._)([(0,m.Cb)({readOnly:!0})],Te.prototype,"createQueryVersion",null),(0,r._)([(0,m.Cb)({type:Boolean,readOnly:!0})],Te.prototype,"editingEnabled",null),(0,r._)([(0,m.Cb)({...Se.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],Te.prototype,"fields",void 0),(0,r._)([(0,m.Cb)(Se.fieldsIndex)],Te.prototype,"fieldsIndex",void 0),(0,r._)([(0,m.Cb)(j.id)],Te.prototype,"id",void 0),(0,r._)([(0,m.Cb)({type:["show","hide","hide-children"]})],Te.prototype,"listMode",void 0),(0,r._)([(0,m.Cb)({value:"SubtypeGroupLayer",type:["SubtypeGroupLayer"]})],Te.prototype,"operationalLayerType",void 0),(0,r._)([(0,m.Cb)(Se.outFields)],Te.prototype,"outFields",void 0),(0,r._)([(0,m.Cb)({readOnly:!0})],Te.prototype,"parsedUrl",null),(0,r._)([(0,m.Cb)()],Te.prototype,"source",null),(0,r._)([(0,m.Cb)({type:[L],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Te.prototype,"subtypes",void 0),(0,r._)([(0,m.Cb)({type:a.Z.ofType(ce),json:{origins:{service:{read:{source:"subtypes",reader:(e,t,i)=>{const r=e.map((({code:e})=>{const r=new ce({subtypeCode:e});return r.read(t,i),r}));return new(a.Z.ofType(ce))(r)}}}},name:"layers",write:{overridePolicy(e,t,i){const r=this.originOf("sublayers"),a=f.s3.PORTAL_ITEM;let n=!0;if((0,f.M9)(r)===a&&(0,f.M9)(i.origin)>a){const t=e.some((e=>e.hasUserOverrides()));n=this._sublayersCollectionChanged||t}return{enabled:n,ignoreOrigin:!0}}}}})],Te.prototype,"sublayers",void 0),(0,r._)([(0,m.Cb)({type:ye.Z})],Te.prototype,"timeInfo",void 0),(0,r._)([(0,m.Cb)({json:{origins:{"portal-item":{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0}}}}})],Te.prototype,"title",void 0),(0,r._)([(0,h.r)("service","title",["name"])],Te.prototype,"readTitleFromService",null),(0,r._)([(0,m.Cb)({json:{read:!1}})],Te.prototype,"type",void 0),Te=(0,r._)([(0,g.j)("esri.layers.SubtypeGroupLayer")],Te);const be=Te},54295:(e,t,i)=>{i.d(t,{V:()=>s});var r=i(43697),a=i(5600),n=(i(75215),i(67676),i(52011));const s=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,r._)([(0,a.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,r._)([(0,n.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17287:(e,t,i)=>{i.d(t,{Y:()=>d});var r=i(43697),a=i(92604),n=i(70586),s=i(5600),o=(i(75215),i(67676),i(52011)),l=i(66677);const d=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,a.Z.getLogger(this.declaredClass)))}};return(0,r._)([(0,s.Cb)()],t.prototype,"title",null),(0,r._)([(0,s.Cb)({type:String})],t.prototype,"url",null),t=(0,r._)([(0,o.j)("esri.layers.mixins.ArcGISService")],t),t}},28294:(e,t,i)=>{i.d(t,{n:()=>c});var r=i(43697),a=i(92835),n=i(84552),s=i(5600),o=(i(75215),i(67676),i(71715)),l=i(52011),d=i(35671),u=i(76259),p=i(78981);const c=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const i=t.timeInfo.exportOptions;if(!i)return null;const r=i.timeOffset,a=p.v.fromJSON(i.timeOffsetUnits);return r&&a?new n.Z({value:r,unit:a}):null}set timeInfo(e){(0,d.UF)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,r._)([(0,s.Cb)({type:a.Z,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,r._)([(0,s.Cb)({type:n.Z})],t.prototype,"timeOffset",void 0),(0,r._)([(0,o.r)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,r._)([(0,s.Cb)({value:null,type:u.Z,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,r._)([(0,s.Cb)({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=(0,r._)([(0,l.j)("esri.layers.mixins.TemporalLayer")],t),t}},70082:(e,t,i)=>{i.d(t,{Z:()=>p});var r=i(43697),a=i(2368),n=i(35454),s=i(96674),o=i(5600),l=(i(75215),i(67676),i(52011));const d=new n.X({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,a.J)(s.wq)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,r._)([(0,o.Cb)({json:{write:!0}})],u.prototype,"name",void 0),(0,r._)([(0,o.Cb)({json:{write:!0}})],u.prototype,"description",void 0),(0,r._)([(0,o.Cb)({json:{read:d.read,write:d.write}})],u.prototype,"drawingTool",void 0),(0,r._)([(0,o.Cb)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,r._)([(0,o.Cb)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,r._)([(0,l.j)("esri.layers.support.FeatureTemplate")],u);const p=u},56765:(e,t,i)=>{i.d(t,{Z:()=>u});var r,a=i(43697),n=i(46791),s=i(96674),o=i(5600),l=(i(75215),i(67676),i(52011));let d=r=class extends s.wq{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new n.Z}clone(){return new r({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,a._)([(0,o.Cb)({type:String,json:{write:!0}})],d.prototype,"floorField",void 0),(0,a._)([(0,o.Cb)({json:{read:!1,write:!1}})],d.prototype,"viewAllMode",void 0),(0,a._)([(0,o.Cb)({json:{read:!1,write:!1}})],d.prototype,"viewAllLevelIds",void 0),d=r=(0,a._)([(0,l.j)("esri.layers.support.LayerFloorInfo")],d);const u=d},76259:(e,t,i)=>{i.d(t,{Z:()=>g});var r=i(43697),a=i(92835),n=i(84552),s=i(2368),o=i(96674),l=i(70586),d=i(5600),u=(i(75215),i(67676),i(71715)),p=i(52011),c=i(30556),y=i(60955);function m(e,t){return n.Z.fromJSON({value:e,unit:t})}let h=class extends((0,s.J)(o.wq)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeReference=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const i=new Date(t.timeExtent[0]),r=new Date(t.timeExtent[1]);return new a.Z({start:i,end:r})}writeFullTimeExtent(e,t){e&&(0,l.pC)(e.start)&&(0,l.pC)(e.end)?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?m(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?m(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,r._)([(0,d.Cb)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],h.prototype,"cumulative",void 0),(0,r._)([(0,d.Cb)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"endField",void 0),(0,r._)([(0,d.Cb)({type:a.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"fullTimeExtent",void 0),(0,r._)([(0,u.r)("fullTimeExtent",["timeExtent"])],h.prototype,"readFullTimeExtent",null),(0,r._)([(0,c.c)("fullTimeExtent")],h.prototype,"writeFullTimeExtent",null),(0,r._)([(0,d.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"hasLiveData",void 0),(0,r._)([(0,d.Cb)({type:n.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"interval",void 0),(0,r._)([(0,u.r)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],h.prototype,"readInterval",null),(0,r._)([(0,c.c)("interval")],h.prototype,"writeInterval",null),(0,r._)([(0,d.Cb)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"startField",void 0),(0,r._)([(0,d.Cb)({type:y.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"timeReference",void 0),(0,r._)([(0,d.Cb)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"trackIdField",void 0),(0,r._)([(0,d.Cb)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],h.prototype,"useTime",void 0),h=(0,r._)([(0,p.j)("esri.layers.support.TimeInfo")],h);const g=h},53518:(e,t,i)=>{i.d(t,{v:()=>o});var r=i(92604),a=i(1231),n=i(99514),s=i(35671);function o(){return{fields:{type:[a.Z],value:null},fieldsIndex:{readOnly:!0,get(){return new n.Z(this.fields||[])}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e||!e.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const i=this.fieldsIndex?.has(t);i||r.Z.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,s.Q0)(this.fieldsIndex,e)}}}}},72064:(e,t,i)=>{i.d(t,{h:()=>p});var r=i(80442),a=i(70586),n=i(66677);const s={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"};function o(e,t,i){return!!(e&&e.hasOwnProperty(t)?e[t]:i)}function l(e,t,i){return e&&e.hasOwnProperty(t)?e[t]:i}function d(e){const t=e?.supportedSpatialAggregationStatistics?.map((e=>e.toLowerCase()));return{envelope:!!t?.includes("envelopeaggregate"),centroid:!!t?.includes("centroidaggregate"),convexHull:!!t?.includes("convexhullaggregate")}}function u(e,t){const i=e?.supportedOperationsWithCacheHint?.map((e=>e.toLowerCase()));return!!i?.includes(t.toLowerCase())}function p(e,t){return{analytics:c(e),attachment:y(e),data:m(e),metadata:h(e),operations:g(e.capabilities,e,t),query:f(e,t),queryRelated:S(e),queryTopFeatures:T(e),editing:b(e)}}function c(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryAnalytics")}}function y(e){const t=e.attachmentProperties,i={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:u(e.advancedQueryCapabilities,"queryAttachments"),supportsResize:o(e,"supportsAttachmentsResizing",!1)};return t&&Array.isArray(t)&&t.forEach((e=>{const t=s[e.name];t&&(i[t]=!!e.isEnabled)})),i}function m(e){return{isVersioned:o(e,"isDataVersioned",!1),supportsAttachment:o(e,"hasAttachments",!1),supportsM:o(e,"hasM",!1),supportsZ:o(e,"hasZ",!1)}}function h(e){return{supportsAdvancedFieldProperties:o(e,"supportsFieldDescriptionProperty",!1)}}function g(e,t,i){const r=e?e.toLowerCase().split(",").map((e=>e.trim())):[],s=i?(0,n.Qc)(i):null,l=r.includes((0,a.pC)(s)&&"MapServer"===s.serverType?"data":"query"),d=r.includes("editing")&&!t.datesInUnknownTimezone;let u=d&&r.includes("create"),p=d&&r.includes("delete"),c=d&&r.includes("update");const y=r.includes("changetracking"),m=t.advancedQueryCapabilities;return d&&!(u||p||c)&&(u=p=c=!0),{supportsCalculate:o(t,"supportsCalculate",!1),supportsTruncate:o(t,"supportsTruncate",!1),supportsValidateSql:o(t,"supportsValidateSql",!1),supportsAdd:u,supportsDelete:p,supportsEditing:d,supportsChangeTracking:y,supportsQuery:l,supportsQueryAnalytics:o(m,"supportsQueryAnalytic",!1),supportsQueryAttachments:o(m,"supportsQueryAttachments",!1),supportsQueryTopFeatures:o(m,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:o(t,"supportsAttachmentsResizing",!1),supportsSync:r.includes("sync"),supportsUpdate:c,supportsExceedsLimitStatistics:o(t,"supportsExceedsLimitStatistics",!1)}}function f(e,t){const i=e.advancedQueryCapabilities,a=e.ownershipBasedAccessControlForFeatures,s=e.archivingInfo,p=e.currentVersion,c=t?.includes("MapServer"),y=!c||p>=(0,r.Z)("mapserver-pbf-version-support"),m=(0,n.M8)(t),h=new Set((e.supportedQueryFormats??"").split(",").map((e=>e.toLowerCase().trim())));return{supportsStatistics:o(i,"supportsStatistics",e.supportsStatistics),supportsPercentileStatistics:o(i,"supportsPercentileStatistics",!1),supportsSpatialAggregationStatistics:o(i,"supportsSpatialAggregationStatistics",!1),supportedSpatialAggregationStatistics:d(i),supportsCentroid:o(i,"supportsReturningGeometryCentroid",!1),supportsDistance:o(i,"supportsQueryWithDistance",!1),supportsDistinct:o(i,"supportsDistinct",e.supportsAdvancedQueries),supportsExtent:o(i,"supportsReturningQueryExtent",!1),supportsGeometryProperties:o(i,"supportsReturningGeometryProperties",!1),supportsHavingClause:o(i,"supportsHavingClause",!1),supportsOrderBy:o(i,"supportsOrderBy",e.supportsAdvancedQueries),supportsPagination:o(i,"supportsPagination",!1),supportsQuantization:o(e,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:o(e,"supportsQuantizationEditMode",!1),supportsQueryGeometry:o(e,"supportsReturningQueryGeometry",!1),supportsResultType:o(i,"supportsQueryWithResultType",!1),supportsMaxRecordCountFactor:o(i,"supportsMaxRecordCountFactor",!1),supportsSqlExpression:o(i,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:o(e,"useStandardizedQueries",!1),supportsTopFeaturesQuery:o(i,"supportsTopFeaturesQuery",!1),supportsQueryByOthers:o(a,"allowOthersToQuery",!0),supportsHistoricMoment:o(s,"supportsQueryWithHistoricMoment",!1),supportsFormatPBF:y&&h.has("pbf"),supportsDisjointSpatialRelationship:o(i,"supportsDisjointSpatialRel",!1),supportsCacheHint:o(i,"supportsQueryWithCacheHint",!1)||u(i,"query"),supportsDefaultSpatialReference:o(i,"supportsDefaultSR",!1),supportsCompactGeometry:m,supportsFullTextSearch:o(i,"supportsFullTextSearch",!1),maxRecordCountFactor:l(e,"maxRecordCountFactor",void 0),maxRecordCount:l(e,"maxRecordCount",void 0),standardMaxRecordCount:l(e,"standardMaxRecordCount",void 0),tileMaxRecordCount:l(e,"tileMaxRecordCount",void 0)}}function S(e){const t=e.advancedQueryCapabilities,i=o(t,"supportsAdvancedQueryRelated",!1);return{supportsPagination:o(t,"supportsQueryRelatedPagination",!1),supportsCount:i,supportsOrderBy:i,supportsCacheHint:u(t,"queryRelated")}}function T(e){return{supportsCacheHint:u(e.advancedQueryCapabilities,"queryTopFilter")}}function b(e){const t=e.ownershipBasedAccessControlForFeatures;return{supportsGeometryUpdate:o(e,"allowGeometryUpdates",!0),supportsGlobalId:o(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:o(e,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:o(e,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:o(e,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:o(e,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:o(t,"allowAnonymousToDelete",!0),supportsDeleteByOthers:o(t,"allowOthersToDelete",!0),supportsUpdateByAnonymous:o(t,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:o(t,"allowOthersToUpdate",!0)}}},78981:(e,t,i)=>{i.d(t,{v:()=>r});const r=(0,i(35454).w)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},51706:(e,t,i)=>{var r,a;function n(e){return e&&"esri.renderers.visualVariables.SizeVariable"===e.declaredClass}function s(e){return null!=e&&!isNaN(e)&&isFinite(e)}function o(e){return e.valueExpression?r.Expression:e.field&&"string"==typeof e.field?r.Field:r.Unknown}function l(e,t){const i=t||o(e),n=e.valueUnit||"unknown";return i===r.Unknown?a.Constant:e.stops?a.Stops:null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?a.ClampedLinear:"unknown"===n?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?a.Proportional:a.Additive:a.Identity:a.RealWorldSize}i.d(t,{PS:()=>o,QW:()=>l,RY:()=>r,hL:()=>a,iY:()=>n,qh:()=>s}),function(e){e.Unknown="unknown",e.Expression="expression",e.Field="field"}(r||(r={})),function(e){e.Unknown="unknown",e.Stops="stops",e.ClampedLinear="clamped-linear",e.Proportional="proportional",e.Additive="additive",e.Constant="constant",e.Identity="identity",e.RealWorldSize="real-world-size"}(a||(a={}))},56545:(e,t,i)=>{i.d(t,{Z:()=>c});var r,a=i(43697),n=i(96674),s=i(22974),o=i(5600),l=i(75215),d=i(52011),u=i(30556);let p=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,s.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,a._)([(0,o.Cb)({type:[String],json:{write:!0}})],p.prototype,"attachmentTypes",void 0),(0,a._)([(0,o.Cb)({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],p.prototype,"attachmentsWhere",void 0),(0,a._)([(0,o.Cb)({type:Boolean,json:{write:!0}})],p.prototype,"cacheHint",void 0),(0,a._)([(0,o.Cb)({type:[String],json:{write:!0}})],p.prototype,"keywords",void 0),(0,a._)([(0,o.Cb)({type:[Number],json:{write:!0}})],p.prototype,"globalIds",void 0),(0,a._)([(0,o.Cb)({json:{write:!0}})],p.prototype,"name",void 0),(0,a._)([(0,o.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],p.prototype,"num",void 0),(0,a._)([(0,o.Cb)({type:[Number],json:{write:!0}})],p.prototype,"objectIds",void 0),(0,a._)([(0,o.Cb)({type:Boolean,json:{default:!1,write:!0}})],p.prototype,"returnMetadata",void 0),(0,a._)([(0,o.Cb)({type:[Number],json:{write:!0}})],p.prototype,"size",void 0),(0,a._)([(0,o.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],p.prototype,"start",void 0),(0,a._)([(0,u.c)("start"),(0,u.c)("num")],p.prototype,"writeStart",null),(0,a._)([(0,o.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],p.prototype,"where",void 0),p=r=(0,a._)([(0,d.j)("esri.rest.support.AttachmentQuery")],p),p.from=(0,l.se)(p);const c=p},58333:(e,t,i)=>{i.d(t,{ET:()=>n,I4:()=>a,eG:()=>l,lF:()=>s,lj:()=>u,qP:()=>o,wW:()=>d});const r=[252,146,31,255],a={type:"esriSMS",style:"esriSMSCircle",size:6,color:r,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},n={type:"esriSLS",style:"esriSLSSolid",width:.75,color:r},s={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},o={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},d={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},u={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}},60955:(e,t,i)=>{i.d(t,{Z:()=>m});var r=i(43697),a=i(2368),n=i(96674),s=i(70586),o=i(5600),l=(i(75215),i(67676),i(71715)),d=i(52011),u=i(30556);const p=new Map([["AUS Central Standard Time","Australia/Darwin"],["AUS Eastern Standard Time","Australia/Sydney"],["Afghanistan Standard Time","Asia/Kabul"],["Alaskan Standard Time","America/Anchorage"],["Aleutian Standard Time","America/Adak"],["Altai Standard Time","Asia/Barnaul"],["Arab Standard Time","Asia/Riyadh"],["Arabian Standard Time","Asia/Dubai"],["Arabic Standard Time","Asia/Baghdad"],["Argentina Standard Time","America/Buenos_Aires"],["Astrakhan Standard Time","Europe/Astrakhan"],["Atlantic Standard Time","America/Halifax"],["Aus Central W. Standard Time","Australia/Eucla"],["Azerbaijan Standard Time","Asia/Baku"],["Azores Standard Time","Atlantic/Azores"],["Bahia Standard Time","America/Bahia"],["Bangladesh Standard Time","Asia/Dhaka"],["Belarus Standard Time","Europe/Minsk"],["Bougainville Standard Time","Pacific/Bougainville"],["Canada Central Standard Time","America/Regina"],["Cape Verde Standard Time","Atlantic/Cape_Verde"],["Caucasus Standard Time","Asia/Yerevan"],["Cen. Australia Standard Time","Australia/Adelaide"],["Central America Standard Time","America/Guatemala"],["Central Asia Standard Time","Asia/Almaty"],["Central Brazilian Standard Time","America/Cuiaba"],["Central Europe Standard Time","Europe/Budapest"],["Central European Standard Time","Europe/Warsaw"],["Central Pacific Standard Time","Pacific/Guadalcanal"],["Central Standard Time","America/Chicago"],["Central Standard Time (Mexico)","America/Mexico_City"],["Chatham Islands Standard Time","Pacific/Chatham"],["China Standard Time","Asia/Shanghai"],["Cuba Standard Time","America/Havana"],["Dateline Standard Time","Etc/GMT+12"],["E. Africa Standard Time","Africa/Nairobi"],["E. Australia Standard Time","Australia/Brisbane"],["E. Europe Standard Time","Europe/Chisinau"],["E. South America Standard Time","America/Sao_Paulo"],["Easter Island Standard Time","Pacific/Easter"],["Eastern Standard Time","America/New_York"],["Eastern Standard Time (Mexico)","America/Cancun"],["Egypt Standard Time","Africa/Cairo"],["Ekaterinburg Standard Time","Asia/Yekaterinburg"],["FLE Standard Time","Europe/Kiev"],["Fiji Standard Time","Pacific/Fiji"],["GMT Standard Time","Europe/London"],["GTB Standard Time","Europe/Bucharest"],["Georgian Standard Time","Asia/Tbilisi"],["Greenland Standard Time","America/Godthab"],["Greenwich Standard Time","Atlantic/Reykjavik"],["Haiti Standard Time","America/Port-au-Prince"],["Hawaiian Standard Time","Pacific/Honolulu"],["India Standard Time","Asia/Calcutta"],["Iran Standard Time","Asia/Tehran"],["Israel Standard Time","Asia/Jerusalem"],["Jordan Standard Time","Asia/Amman"],["Kaliningrad Standard Time","Europe/Kaliningrad"],["Korea Standard Time","Asia/Seoul"],["Libya Standard Time","Africa/Tripoli"],["Line Islands Standard Time","Pacific/Kiritimati"],["Lord Howe Standard Time","Australia/Lord_Howe"],["Magadan Standard Time","Asia/Magadan"],["Magallanes Standard Time","America/Punta_Arenas"],["Marquesas Standard Time","Pacific/Marquesas"],["Mauritius Standard Time","Indian/Mauritius"],["Middle East Standard Time","Asia/Beirut"],["Montevideo Standard Time","America/Montevideo"],["Morocco Standard Time","Africa/Casablanca"],["Mountain Standard Time","America/Denver"],["Mountain Standard Time (Mexico)","America/Chihuahua"],["Myanmar Standard Time","Asia/Rangoon"],["N. Central Asia Standard Time","Asia/Novosibirsk"],["Namibia Standard Time","Africa/Windhoek"],["Nepal Standard Time","Asia/Katmandu"],["New Zealand Standard Time","Pacific/Auckland"],["Newfoundland Standard Time","America/St_Johns"],["Norfolk Standard Time","Pacific/Norfolk"],["North Asia East Standard Time","Asia/Irkutsk"],["North Asia Standard Time","Asia/Krasnoyarsk"],["North Korea Standard Time","Asia/Pyongyang"],["Omsk Standard Time","Asia/Omsk"],["Pacific SA Standard Time","America/Santiago"],["Pacific Standard Time","America/Los_Angeles"],["Pacific Standard Time (Mexico)","America/Tijuana"],["Pakistan Standard Time","Asia/Karachi"],["Paraguay Standard Time","America/Asuncion"],["Qyzylorda Standard Time","Asia/Qyzylorda"],["Romance Standard Time","Europe/Paris"],["Russia Time Zone 10","Asia/Srednekolymsk"],["Russia Time Zone 11","Asia/Kamchatka"],["Russia Time Zone 3","Europe/Samara"],["Russian Standard Time","Europe/Moscow"],["SA Eastern Standard Time","America/Cayenne"],["SA Pacific Standard Time","America/Bogota"],["SA Western Standard Time","America/La_Paz"],["SE Asia Standard Time","Asia/Bangkok"],["Saint Pierre Standard Time","America/Miquelon"],["Sakhalin Standard Time","Asia/Sakhalin"],["Samoa Standard Time","Pacific/Apia"],["Sao Tome Standard Time","Africa/Sao_Tome"],["Saratov Standard Time","Europe/Saratov"],["Singapore Standard Time","Asia/Singapore"],["South Africa Standard Time","Africa/Johannesburg"],["South Sudan Standard Time","Africa/Juba"],["Sri Lanka Standard Time","Asia/Colombo"],["Sudan Standard Time","Africa/Khartoum"],["Syria Standard Time","Asia/Damascus"],["Taipei Standard Time","Asia/Taipei"],["Tasmania Standard Time","Australia/Hobart"],["Tocantins Standard Time","America/Araguaina"],["Tokyo Standard Time","Asia/Tokyo"],["Tomsk Standard Time","Asia/Tomsk"],["Tonga Standard Time","Pacific/Tongatapu"],["Transbaikal Standard Time","Asia/Chita"],["Turkey Standard Time","Europe/Istanbul"],["Turks And Caicos Standard Time","America/Grand_Turk"],["US Eastern Standard Time","America/Indianapolis"],["US Mountain Standard Time","America/Phoenix"],["UTC","Etc/GMT"],["UTC+01","Etc/GMT-1"],["UTC+02","Etc/GMT-2"],["UTC+03","Etc/GMT-3"],["UTC+04","Etc/GMT-4"],["UTC+05","Etc/GMT-5"],["UTC+06","Etc/GMT-6"],["UTC+07","Etc/GMT-7"],["UTC+08","Etc/GMT-8"],["UTC+09","Etc/GMT-9"],["UTC+10","Etc/GMT-10"],["UTC+11","Etc/GMT-11"],["UTC+12","Etc/GMT-12"],["UTC+13","Etc/GMT-13"],["UTC+14","Etc/GMT-14"],["UTC-01","Etc/GMT+1"],["UTC-02","Etc/GMT+2"],["UTC-03","Etc/GMT+3"],["UTC-04","Etc/GMT+4"],["UTC-05","Etc/GMT+5"],["UTC-06","Etc/GMT+6"],["UTC-07","Etc/GMT+7"],["UTC-08","Etc/GMT+8"],["UTC-09","Etc/GMT+9"],["UTC-10","Etc/GMT+10"],["UTC-11","Etc/GMT+11"],["UTC-12","Etc/GMT+12"],["Ulaanbaatar Standard Time","Asia/Ulaanbaatar"],["Venezuela Standard Time","America/Caracas"],["Vladivostok Standard Time","Asia/Vladivostok"],["Volgograd Standard Time","Europe/Volgograd"],["W. Australia Standard Time","Australia/Perth"],["W. Central Africa Standard Time","Africa/Lagos"],["W. Europe Standard Time","Europe/Berlin"],["W. Mongolia Standard Time","Asia/Hovd"],["West Asia Standard Time","Asia/Tashkent"],["West Bank Standard Time","Asia/Hebron"],["West Pacific Standard Time","Pacific/Port_Moresby"],["Yakutsk Standard Time","Asia/Yakutsk"],["Yukon Standard Time","America/Whitehorse"]]);var c=i(17126);let y=class extends((0,a.J)(n.wq)){constructor(e){super(e),this.legacy=null,this.timeZone="system"}readLegacy(e,t){const{timeZone:i,respectsDaylightSaving:r}=t;return{timeZone:i,respectsDaylightSaving:r}}readTimeZone(e,t){return"timeZoneIANA"in t?t.timeZoneIANA:function(e){if(!e||!p.has(e.timeZone))return"system";const t=p.get(e.timeZone);return e.timeZone.startsWith("UTC")||e.respectsDaylightSaving?t:function(e){const t=c.ou.local().setZone(e),i=Math.min(t.set({month:1,day:1}).offset,t.set({month:5}).offset);return 0===i?"Etc/UTC":`Etc/GMT${c.Qf.instance(-i).formatOffset(0,"narrow")}`}(t)}(t)}writeTimeZone(e,t){t.timeZoneIANA=e}equals(e){return!((0,s.Wi)(e)||(0,s.Wi)(this.timeZone)||(0,s.Wi)(e.timeZone))&&this.timeZone===e.timeZone}};(0,r._)([(0,o.Cb)()],y.prototype,"legacy",void 0),(0,r._)([(0,l.r)("legacy",["timeZone"])],y.prototype,"readLegacy",null),(0,r._)([(0,o.Cb)({type:String,nonNullable:!0})],y.prototype,"timeZone",void 0),(0,r._)([(0,l.r)("timeZone",["timeZone","timeZoneIANA","respectsDaylightSaving"])],y.prototype,"readTimeZone",null),(0,r._)([(0,u.c)("timeZone")],y.prototype,"writeTimeZone",null),y=(0,r._)([(0,d.j)("esri.time.TimeReference")],y);const m=y}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[639],{92908:(e,t,s)=>{s.d(t,{S:()=>r,X:()=>i});const i=1;function r(e,t){let s=0;for(const i of t){const t=i.attributes?.[e];"number"==typeof t&&isFinite(t)&&(s=Math.max(s,t))}return s}},30639:(e,t,s)=>{s.r(t),s.d(t,{default:()=>_});var i=s(20102),r=s(70586),n=s(33955),a=s(8744),o=s(98732),l=s(92908),u=s(57191),d=s(37427),p=s(50245),c=s(25278),y=s(23095),f=s(99514),h=s(86719),m=s(35671);const g=a.Zn,I={xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:a.Zn},b={hasAttachments:!1,capabilities:"query, editing, create, delete, update",useStandardizedQueries:!0,supportsCoordinatesQuantization:!0,supportsReturningQueryGeometry:!0,advancedQueryCapabilities:{supportsQueryAttachments:!1,supportsStatistics:!0,supportsPercentileStatistics:!0,supportsReturningGeometryCentroid:!0,supportsQueryWithDistance:!0,supportsDistinct:!0,supportsReturningQueryExtent:!0,supportsReturningGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQueryWithResultType:!1,supportsSqlExpression:!0,supportsDisjointSpatialRel:!0}};function F(e){return(0,n.wp)(e)?null!=e.z:!!e.hasZ}function S(e){return(0,n.wp)(e)?null!=e.m:!!e.hasM}class _{constructor(){this._queryEngine=null,this._nextObjectId=null}destroy(){this._queryEngine&&this._queryEngine&&this._queryEngine.destroy(),this._queryEngine=this._fieldsIndex=this._createDefaultAttributes=null}async load(e){const t=[],{features:s}=e,r=this._inferLayerProperties(s,e.fields),n=e.fields||[],a=null!=e.hasM?e.hasM:!!r.hasM,o=null!=e.hasZ?e.hasZ:!!r.hasZ,y=!e.spatialReference&&!r.spatialReference,F=y?g:e.spatialReference||r.spatialReference,S=y?I:null,_=e.geometryType||r.geometryType,E=!_;let T=e.objectIdField||r.objectIdField,q=e.timeInfo;if(!E&&(y&&t.push({name:"feature-layer:spatial-reference-not-found",message:"Spatial reference not provided or found in features. Defaults to WGS84"}),!_))throw new i.Z("feature-layer:missing-property","geometryType not set and couldn't be inferred from the provided features");if(!T)throw new i.Z("feature-layer:missing-property","objectIdField not set and couldn't be found in the provided fields");if(r.objectIdField&&T!==r.objectIdField&&(t.push({name:"feature-layer:duplicated-oid-field",message:`Provided objectIdField "${T}" doesn't match the field name "${r.objectIdField}", found in the provided fields`}),T=r.objectIdField),T&&!r.objectIdField){let e=null;n.some((t=>t.name===T&&(e=t,!0)))?(e.type="esriFieldTypeOID",e.editable=!1,e.nullable=!1):n.unshift({alias:T,name:T,type:"esriFieldTypeOID",editable:!1,nullable:!1})}for(const e of n){if(null==e.name&&(e.name=e.alias),null==e.alias&&(e.alias=e.name),!e.name)throw new i.Z("feature-layer:invalid-field-name","field name is missing",{field:e});if(e.name===T&&(e.type="esriFieldTypeOID"),!h.v.jsonValues.includes(e.type))throw new i.Z("feature-layer:invalid-field-type",`invalid type for field "${e.name}"`,{field:e})}const x={};for(const e of n)if("esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type){const t=(0,m.os)(e);void 0!==t&&(x[e.name]=t)}if(this._fieldsIndex=new f.Z(n),this._createDefaultAttributes=(0,c.Dm)(x,T),q){if(q.startTimeField){const e=this._fieldsIndex.get(q.startTimeField);e?(q.startTimeField=e.name,e.type="esriFieldTypeDate"):q.startTimeField=null}if(q.endTimeField){const e=this._fieldsIndex.get(q.endTimeField);e?(q.endTimeField=e.name,e.type="esriFieldTypeDate"):q.endTimeField=null}if(q.trackIdField){const e=this._fieldsIndex.get(q.trackIdField);e?q.trackIdField=e.name:(q.trackIdField=null,t.push({name:"feature-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:q}}))}q.startTimeField||q.endTimeField||(t.push({name:"feature-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing or invalid",details:{timeInfo:q}}),q=null)}const R={warnings:t,featureErrors:[],layerDefinition:{...b,drawingInfo:(0,c.bU)(_),templates:(0,c.Hq)(x),extent:S,geometryType:_,objectIdField:T,fields:n,hasZ:o,hasM:a,timeInfo:q},assignedObjectIds:{}};if(this._queryEngine=new p.q({fields:n,geometryType:_,hasM:a,hasZ:o,objectIdField:T,spatialReference:F,featureStore:new u.Z({geometryType:_,hasM:a,hasZ:o}),timeInfo:q,cacheSpatialQueries:!0}),!s||!s.length)return this._nextObjectId=l.X,R;const j=(0,l.S)(T,s);return this._nextObjectId=j+1,await(0,d._W)(s,F),this._loadInitialFeatures(R,s)}async applyEdits(e){const{spatialReference:t,geometryType:s}=this._queryEngine;return await Promise.all([(0,y.b)(t,s),(0,d._W)(e.adds,t),(0,d._W)(e.updates,t)]),this._applyEdits(e)}queryFeatures(e,t={}){return this._queryEngine.executeQuery(e,t.signal)}queryFeatureCount(e,t={}){return this._queryEngine.executeQueryForCount(e,t.signal)}queryObjectIds(e,t={}){return this._queryEngine.executeQueryForIds(e,t.signal)}queryExtent(e,t={}){return this._queryEngine.executeQueryForExtent(e,t.signal)}querySnapping(e,t={}){return this._queryEngine.executeQueryForSnapping(e,t.signal)}_inferLayerProperties(e,t){let s,i,a=null,o=null,l=null;for(const t of e){const e=t.geometry;if(!(0,r.Wi)(e)&&(a||(a=(0,n.Ji)(e)),o||(o=e.spatialReference),null==s&&(s=F(e)),null==i&&(i=S(e)),a&&o&&null!=s&&null!=i))break}if(t&&t.length){let e=null;t.some((t=>{const s="esriFieldTypeOID"===t.type,i=!t.type&&t.name&&"objectid"===t.name.toLowerCase();return e=t,s||i}))&&(l=e.name)}return{geometryType:a,spatialReference:o,objectIdField:l,hasM:i,hasZ:s}}_loadInitialFeatures(e,t){const{geometryType:s,hasM:i,hasZ:a,objectIdField:l,spatialReference:u,featureStore:p}=this._queryEngine,c=[];for(const i of t){if(null!=i.uid&&(e.assignedObjectIds[i.uid]=-1),i.geometry&&s!==(0,n.Ji)(i.geometry)){e.featureErrors.push((0,y.av)("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),a=(0,y.O0)(this._fieldsIndex,t,i.attributes,!0,e.warnings);a?e.featureErrors.push(a):(this._assignObjectId(t,i.attributes,!0),i.attributes=t,null!=i.uid&&(e.assignedObjectIds[i.uid]=i.attributes[l]),(0,r.pC)(i.geometry)&&(i.geometry=(0,d.iV)(i.geometry,i.geometry.spatialReference,u)),c.push(i))}if(p.addMany((0,o.Yn)([],c,s,a,i,l)),e.layerDefinition.extent=this._queryEngine.featureStore.getFullExtent(u),e.layerDefinition.timeInfo){const{start:t,end:s}=this._queryEngine.timeExtent;e.layerDefinition.timeInfo.timeExtent=[t,s]}return e}_applyEdits(e){const{adds:t,updates:s,deletes:i}=e,r={addResults:[],deleteResults:[],updateResults:[],uidToObjectId:{}};if(t&&t.length&&this._applyAddEdits(r,t),s&&s.length&&this._applyUpdateEdits(r,s),i&&i.length){for(const e of i)r.deleteResults.push((0,y.d1)(e));this._queryEngine.featureStore.removeManyById(i)}return{fullExtent:this._queryEngine.featureStore.getFullExtent(this._queryEngine.spatialReference),featureEditResults:r}}_applyAddEdits(e,t){const{addResults:s}=e,{geometryType:i,hasM:a,hasZ:l,objectIdField:u,spatialReference:p,featureStore:c}=this._queryEngine,f=[];for(const a of t){if(a.geometry&&i!==(0,n.Ji)(a.geometry)){s.push((0,y.av)("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),o=(0,y.O0)(this._fieldsIndex,t,a.attributes);if(o)s.push(o);else{if(this._assignObjectId(t,a.attributes),a.attributes=t,null!=a.uid){const t=a.attributes[u];e.uidToObjectId[a.uid]=t}if((0,r.pC)(a.geometry)){const e=a.geometry.spatialReference??p;a.geometry=(0,d.iV)((0,y.og)(a.geometry,e),e,p)}f.push(a),s.push((0,y.d1)(a.attributes[u]))}}c.addMany((0,o.Yn)([],f,i,l,a,u))}_applyUpdateEdits({updateResults:e},t){const{geometryType:s,hasM:i,hasZ:a,objectIdField:l,spatialReference:u,featureStore:p}=this._queryEngine;for(const c of t){const{attributes:t,geometry:f}=c,h=t&&t[l];if(null==h){e.push((0,y.av)(`Identifier field ${l} missing`));continue}if(!p.has(h)){e.push((0,y.av)(`Feature with object id ${h} missing`));continue}const m=(0,o.EI)(p.getFeature(h),s,a,i);if((0,r.pC)(f)){if(s!==(0,n.Ji)(f)){e.push((0,y.av)("Incorrect geometry type."));continue}const t=f.spatialReference??u;m.geometry=(0,d.iV)((0,y.og)(f,t),t,u)}if(t){const s=(0,y.O0)(this._fieldsIndex,m.attributes,t);if(s){e.push(s);continue}}p.add((0,o.XA)(m,s,a,i,l)),e.push((0,y.d1)(h))}}_assignObjectId(e,t,s=!1){const i=this._queryEngine.objectIdField;s&&t&&isFinite(t[i])?e[i]=t[i]:e[i]=this._nextObjectId++}}},25278:(e,t,s)=>{s.d(t,{Dm:()=>d,Hq:()=>p,MS:()=>c,bU:()=>o});var i=s(80442),r=s(22974),n=s(61159),a=s(58333);function o(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?a.I4:"esriGeometryPolyline"===e?a.ET:a.lF}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function d(e,t){if((0,i.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let s=`this.${t} = null;`;for(const t in e)s+=`this${l.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${s};\n }\n }\n `)();return()=>new i}catch(s){return()=>({[t]:null,...e})}}function p(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,r.d9)(e)}}]}function c(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0},query:n.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1}}}},58333:(e,t,s)=>{s.d(t,{ET:()=>n,I4:()=>r,eG:()=>l,lF:()=>a,lj:()=>d,qP:()=>o,wW:()=>u});const i=[252,146,31,255],r={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},n={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},a={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},o={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},d={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);