@arcgis/core 4.26.0-next.20221221 → 4.26.0-next.20221223

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 (264) hide show
  1. package/WebScene.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{2163b9ee4d639d5ed6f3.js → 05bba3ba2f9ee02f52b5.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{bbccf69f4aa1b1761265.js → 0b8dc54801a7aa5e6be3.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{6dbd3aabfe4d5d593205.js → 0b9c53e01d6ac1e7d5ca.js} +29 -29
  6. package/assets/esri/core/workers/chunks/1039cd48a12e88baa97a.js +1 -0
  7. package/assets/esri/core/workers/chunks/{634e7957696f72c8b8b1.js → 3fb4ae8d6e8563a1c255.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{b61ce04af4e57b1856cb.js → d447ebc944a9867f5a99.js} +1 -1
  9. package/assets/esri/core/workers/chunks/e3ba96417fd75a5d2feb.js +1 -0
  10. package/assets/esri/core/workers/chunks/{099765dff2b7e6958d3d.js → efc9030af5aac27055a1.js} +1 -1
  11. package/assets/esri/themes/base/widgets/_UtilityNetworkTrace.scss +1 -1
  12. package/assets/esri/themes/dark/main.css +1 -1
  13. package/assets/esri/themes/light/main.css +1 -1
  14. package/assets/esri/themes/light/view.css +1 -1
  15. package/assets/esri/widgets/Directions/t9n/Directions_ar.json +1 -1
  16. package/assets/esri/widgets/Directions/t9n/Directions_bg.json +1 -1
  17. package/assets/esri/widgets/Directions/t9n/Directions_bs.json +1 -1
  18. package/assets/esri/widgets/Directions/t9n/Directions_ca.json +1 -1
  19. package/assets/esri/widgets/Directions/t9n/Directions_cs.json +1 -1
  20. package/assets/esri/widgets/Directions/t9n/Directions_da.json +1 -1
  21. package/assets/esri/widgets/Directions/t9n/Directions_de.json +1 -1
  22. package/assets/esri/widgets/Directions/t9n/Directions_el.json +1 -1
  23. package/assets/esri/widgets/Directions/t9n/Directions_es.json +1 -1
  24. package/assets/esri/widgets/Directions/t9n/Directions_et.json +1 -1
  25. package/assets/esri/widgets/Directions/t9n/Directions_fi.json +1 -1
  26. package/assets/esri/widgets/Directions/t9n/Directions_fr.json +1 -1
  27. package/assets/esri/widgets/Directions/t9n/Directions_he.json +1 -1
  28. package/assets/esri/widgets/Directions/t9n/Directions_hr.json +1 -1
  29. package/assets/esri/widgets/Directions/t9n/Directions_hu.json +1 -1
  30. package/assets/esri/widgets/Directions/t9n/Directions_id.json +1 -1
  31. package/assets/esri/widgets/Directions/t9n/Directions_it.json +1 -1
  32. package/assets/esri/widgets/Directions/t9n/Directions_ja.json +1 -1
  33. package/assets/esri/widgets/Directions/t9n/Directions_ko.json +1 -1
  34. package/assets/esri/widgets/Directions/t9n/Directions_lt.json +1 -1
  35. package/assets/esri/widgets/Directions/t9n/Directions_lv.json +1 -1
  36. package/assets/esri/widgets/Directions/t9n/Directions_nb.json +1 -1
  37. package/assets/esri/widgets/Directions/t9n/Directions_nl.json +1 -1
  38. package/assets/esri/widgets/Directions/t9n/Directions_pl.json +1 -1
  39. package/assets/esri/widgets/Directions/t9n/Directions_pt-BR.json +1 -1
  40. package/assets/esri/widgets/Directions/t9n/Directions_pt-PT.json +1 -1
  41. package/assets/esri/widgets/Directions/t9n/Directions_ro.json +1 -1
  42. package/assets/esri/widgets/Directions/t9n/Directions_ru.json +1 -1
  43. package/assets/esri/widgets/Directions/t9n/Directions_sk.json +1 -1
  44. package/assets/esri/widgets/Directions/t9n/Directions_sl.json +1 -1
  45. package/assets/esri/widgets/Directions/t9n/Directions_sr.json +1 -1
  46. package/assets/esri/widgets/Directions/t9n/Directions_sv.json +1 -1
  47. package/assets/esri/widgets/Directions/t9n/Directions_th.json +1 -1
  48. package/assets/esri/widgets/Directions/t9n/Directions_tr.json +1 -1
  49. package/assets/esri/widgets/Directions/t9n/Directions_uk.json +1 -1
  50. package/assets/esri/widgets/Directions/t9n/Directions_vi.json +1 -1
  51. package/assets/esri/widgets/Directions/t9n/Directions_zh-CN.json +1 -1
  52. package/assets/esri/widgets/Directions/t9n/Directions_zh-HK.json +1 -1
  53. package/assets/esri/widgets/Directions/t9n/Directions_zh-TW.json +1 -1
  54. package/assets/esri/widgets/Feature/t9n/Feature_he.json +1 -1
  55. package/assets/esri/widgets/Popup/t9n/Popup_ar.json +1 -1
  56. package/assets/esri/widgets/Popup/t9n/Popup_bg.json +1 -1
  57. package/assets/esri/widgets/Popup/t9n/Popup_bs.json +1 -1
  58. package/assets/esri/widgets/Popup/t9n/Popup_ca.json +1 -1
  59. package/assets/esri/widgets/Popup/t9n/Popup_cs.json +1 -1
  60. package/assets/esri/widgets/Popup/t9n/Popup_da.json +1 -1
  61. package/assets/esri/widgets/Popup/t9n/Popup_de.json +1 -1
  62. package/assets/esri/widgets/Popup/t9n/Popup_el.json +1 -1
  63. package/assets/esri/widgets/Popup/t9n/Popup_es.json +1 -1
  64. package/assets/esri/widgets/Popup/t9n/Popup_et.json +1 -1
  65. package/assets/esri/widgets/Popup/t9n/Popup_fi.json +1 -1
  66. package/assets/esri/widgets/Popup/t9n/Popup_fr.json +1 -1
  67. package/assets/esri/widgets/Popup/t9n/Popup_he.json +1 -1
  68. package/assets/esri/widgets/Popup/t9n/Popup_hr.json +1 -1
  69. package/assets/esri/widgets/Popup/t9n/Popup_hu.json +1 -1
  70. package/assets/esri/widgets/Popup/t9n/Popup_id.json +1 -1
  71. package/assets/esri/widgets/Popup/t9n/Popup_it.json +1 -1
  72. package/assets/esri/widgets/Popup/t9n/Popup_ja.json +1 -1
  73. package/assets/esri/widgets/Popup/t9n/Popup_ko.json +1 -1
  74. package/assets/esri/widgets/Popup/t9n/Popup_lt.json +1 -1
  75. package/assets/esri/widgets/Popup/t9n/Popup_lv.json +1 -1
  76. package/assets/esri/widgets/Popup/t9n/Popup_nb.json +1 -1
  77. package/assets/esri/widgets/Popup/t9n/Popup_nl.json +1 -1
  78. package/assets/esri/widgets/Popup/t9n/Popup_pl.json +1 -1
  79. package/assets/esri/widgets/Popup/t9n/Popup_pt-BR.json +1 -1
  80. package/assets/esri/widgets/Popup/t9n/Popup_pt-PT.json +1 -1
  81. package/assets/esri/widgets/Popup/t9n/Popup_ro.json +1 -1
  82. package/assets/esri/widgets/Popup/t9n/Popup_ru.json +1 -1
  83. package/assets/esri/widgets/Popup/t9n/Popup_sk.json +1 -1
  84. package/assets/esri/widgets/Popup/t9n/Popup_sl.json +1 -1
  85. package/assets/esri/widgets/Popup/t9n/Popup_sr.json +1 -1
  86. package/assets/esri/widgets/Popup/t9n/Popup_sv.json +1 -1
  87. package/assets/esri/widgets/Popup/t9n/Popup_th.json +1 -1
  88. package/assets/esri/widgets/Popup/t9n/Popup_tr.json +1 -1
  89. package/assets/esri/widgets/Popup/t9n/Popup_uk.json +1 -1
  90. package/assets/esri/widgets/Popup/t9n/Popup_vi.json +1 -1
  91. package/assets/esri/widgets/Popup/t9n/Popup_zh-CN.json +1 -1
  92. package/assets/esri/widgets/Popup/t9n/Popup_zh-HK.json +1 -1
  93. package/assets/esri/widgets/Popup/t9n/Popup_zh-TW.json +1 -1
  94. package/assets/esri/widgets/Slice/t9n/Slice_ar.json +1 -1
  95. package/assets/esri/widgets/Slice/t9n/Slice_bg.json +1 -1
  96. package/assets/esri/widgets/Slice/t9n/Slice_bs.json +1 -1
  97. package/assets/esri/widgets/Slice/t9n/Slice_ca.json +1 -1
  98. package/assets/esri/widgets/Slice/t9n/Slice_cs.json +1 -1
  99. package/assets/esri/widgets/Slice/t9n/Slice_da.json +1 -1
  100. package/assets/esri/widgets/Slice/t9n/Slice_de.json +1 -1
  101. package/assets/esri/widgets/Slice/t9n/Slice_el.json +1 -1
  102. package/assets/esri/widgets/Slice/t9n/Slice_es.json +1 -1
  103. package/assets/esri/widgets/Slice/t9n/Slice_et.json +1 -1
  104. package/assets/esri/widgets/Slice/t9n/Slice_fi.json +1 -1
  105. package/assets/esri/widgets/Slice/t9n/Slice_fr.json +1 -1
  106. package/assets/esri/widgets/Slice/t9n/Slice_he.json +1 -1
  107. package/assets/esri/widgets/Slice/t9n/Slice_hr.json +1 -1
  108. package/assets/esri/widgets/Slice/t9n/Slice_hu.json +1 -1
  109. package/assets/esri/widgets/Slice/t9n/Slice_id.json +1 -1
  110. package/assets/esri/widgets/Slice/t9n/Slice_it.json +1 -1
  111. package/assets/esri/widgets/Slice/t9n/Slice_ja.json +1 -1
  112. package/assets/esri/widgets/Slice/t9n/Slice_ko.json +1 -1
  113. package/assets/esri/widgets/Slice/t9n/Slice_lt.json +1 -1
  114. package/assets/esri/widgets/Slice/t9n/Slice_lv.json +1 -1
  115. package/assets/esri/widgets/Slice/t9n/Slice_nb.json +1 -1
  116. package/assets/esri/widgets/Slice/t9n/Slice_nl.json +1 -1
  117. package/assets/esri/widgets/Slice/t9n/Slice_pl.json +1 -1
  118. package/assets/esri/widgets/Slice/t9n/Slice_pt-BR.json +1 -1
  119. package/assets/esri/widgets/Slice/t9n/Slice_pt-PT.json +1 -1
  120. package/assets/esri/widgets/Slice/t9n/Slice_ro.json +1 -1
  121. package/assets/esri/widgets/Slice/t9n/Slice_ru.json +1 -1
  122. package/assets/esri/widgets/Slice/t9n/Slice_sk.json +1 -1
  123. package/assets/esri/widgets/Slice/t9n/Slice_sl.json +1 -1
  124. package/assets/esri/widgets/Slice/t9n/Slice_sr.json +1 -1
  125. package/assets/esri/widgets/Slice/t9n/Slice_sv.json +1 -1
  126. package/assets/esri/widgets/Slice/t9n/Slice_th.json +1 -1
  127. package/assets/esri/widgets/Slice/t9n/Slice_tr.json +1 -1
  128. package/assets/esri/widgets/Slice/t9n/Slice_uk.json +1 -1
  129. package/assets/esri/widgets/Slice/t9n/Slice_vi.json +1 -1
  130. package/assets/esri/widgets/Slice/t9n/Slice_zh-CN.json +1 -1
  131. package/assets/esri/widgets/Slice/t9n/Slice_zh-HK.json +1 -1
  132. package/assets/esri/widgets/Slice/t9n/Slice_zh-TW.json +1 -1
  133. package/core/workers/workers.js +1 -1
  134. package/geometry/support/intersects.js +1 -1
  135. package/geometry/support/meshUtils/elevation.js +1 -1
  136. package/geometry/support/meshUtils/exporters/gltf/index.js +1 -1
  137. package/geometry.js +1 -1
  138. package/interfaces.d.ts +868 -0
  139. package/intl.js +1 -1
  140. package/layers/support/ImageParameters.js +1 -1
  141. package/layers/support/VoxelVariable.js +1 -1
  142. package/layers/support/VoxelVolumeStyle.js +1 -1
  143. package/layers/support/domains.js +1 -1
  144. package/layers/support/rasterDatasets/wcsCoverageParser.js +1 -1
  145. package/libs/maquette/projection.js +1 -1
  146. package/package.json +1 -1
  147. package/pointCloudRenderers.js +1 -1
  148. package/popup/content.js +1 -1
  149. package/rasterRenderers.js +1 -1
  150. package/renderers.js +1 -1
  151. package/rest/locator/addressesToLocations.js +1 -1
  152. package/support/arcadeUtils.js +1 -1
  153. package/support/revision.js +1 -1
  154. package/symbols/support/unitConversionUtils.js +1 -1
  155. package/symbols.js +1 -1
  156. package/views/2d/engine/FeatureContainer.js +1 -1
  157. package/views/2d/layers/BaseLayerViewGL2D.js +1 -1
  158. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  159. package/views/2d/layers/GraphicsLayerView2D.js +1 -1
  160. package/views/2d/layers/KMLLayerView2D.js +1 -1
  161. package/views/2d/layers/LayerView2D.js +1 -1
  162. package/views/2d/layers/MapImageLayerView2D.js +1 -1
  163. package/views/2d/layers/MapNotesLayerView2D.js +1 -1
  164. package/views/2d/layers/RouteLayerView2D.js +1 -1
  165. package/views/2d/layers/StreamLayerView2D.js +1 -1
  166. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  167. package/views/2d/layers/WMSLayerView2D.js +1 -1
  168. package/views/2d/layers/WMTSLayerView2D.js +1 -1
  169. package/views/2d/layers/features/FeatureStore2D.js +1 -1
  170. package/views/2d/layers/features/controllers/FeatureController2D.js +1 -1
  171. package/views/2d/layers/features/processors/HeatmapProcessor.js +1 -1
  172. package/views/2d/layers/features/processors/SymbolProcessor.js +1 -1
  173. package/views/2d/layers/features/schemaUtils.js +1 -1
  174. package/views/2d/layers/features/sources/BaseFeatureSource.js +1 -1
  175. package/views/2d/layers/features/sources/DataTileSource.js +1 -1
  176. package/views/2d/layers/features/sources/DataTileSubscription.js +1 -1
  177. package/views/2d/layers/features/sources/GeoEventSource.js +1 -1
  178. package/views/2d/layers/features/sources/SnapshotFeatureSource.js +1 -1
  179. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  180. package/views/2d/layers/features/support/rendererUtils.js +1 -1
  181. package/views/2d/layers/features/tileRenderers/SymbolTileRenderer.js +1 -1
  182. package/views/2d/layers/features/tileRenderers/support/HeatmapSource.js +1 -1
  183. package/views/2d/layers/features/tileRenderers/support/WGLFeatureView.js +1 -1
  184. package/views/2d/layers/features/tileRenderers/support/visualVariablesUtils.js +1 -1
  185. package/views/2d/layers/graphics/BaseGraphicContainer.js +1 -1
  186. package/views/2d/layers/graphics/GraphicBoundsRenderer.js +1 -1
  187. package/views/2d/layers/graphics/graphicsUtils.js +1 -1
  188. package/views/2d/layers/imagery/ImageryView2D.js +1 -1
  189. package/views/2d/layers/support/DebugOverlay.js +1 -1
  190. package/views/2d/layers/support/ExportStrategy.js +1 -1
  191. package/views/2d/layers/support/FeatureLayerProxy.js +1 -1
  192. package/views/2d/magnifier/MagnifierView2D.js +1 -1
  193. package/views/2d/navigation/MapViewNavigation.js +1 -1
  194. package/views/2d/navigation/ZoomBox.js +1 -1
  195. package/views/2d/navigation/actions/Pan.js +1 -1
  196. package/views/2d/navigation/actions/Pinch.js +1 -1
  197. package/views/2d/tiling/TileManager.js +1 -1
  198. package/views/3d/analysis/DirectLineMeasurementAnalysisView3D.js +1 -1
  199. package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
  200. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  201. package/views/3d/layers/GraphicsView3D.js +1 -1
  202. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  203. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  204. package/views/3d/layers/TiledLayerView3D.js +1 -1
  205. package/views/3d/layers/VectorTileLayerView3D.js +1 -1
  206. package/views/3d/layers/WMTSLayerView3D.js +1 -1
  207. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  208. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  209. package/views/3d/layers/graphics/Graphics3DElevationAlignment.js +1 -1
  210. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  211. package/views/3d/layers/graphics/Graphics3DFeatureStore.js +1 -1
  212. package/views/3d/layers/graphics/Graphics3DFrustumVisibility.js +1 -1
  213. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  214. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  215. package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
  216. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  217. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  218. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  219. package/views/3d/layers/graphics/Graphics3DScaleVisibility.js +1 -1
  220. package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
  221. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  222. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  223. package/views/3d/layers/graphics/QueryEngine.js +1 -1
  224. package/views/3d/layers/graphics/SpatialIndex2D.js +1 -1
  225. package/views/3d/layers/graphics/elevationAlignmentUtils.js +1 -1
  226. package/views/3d/layers/graphics/featureExpressionInfoUtils.js +1 -1
  227. package/views/3d/layers/graphics/graphicUtils.js +1 -1
  228. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  229. package/views/3d/layers/graphics/queryForSymbologySnapping.js +1 -1
  230. package/views/3d/layers/graphics/symbolComplexity.js +1 -1
  231. package/views/3d/layers/graphics/wosrLoader.js +1 -1
  232. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  233. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  234. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  235. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  236. package/views/3d/layers/i3s/attributeEditing.js +1 -1
  237. package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
  238. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  239. package/views/3d/layers/support/FeatureTileFetcher3DDebugger.js +1 -1
  240. package/views/3d/layers/support/FeatureTileTree3DDebugger.js +1 -1
  241. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  242. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  243. package/views/3d/layers/support/featureTileQuery3D.js +1 -1
  244. package/views/3d/layers/support/projectExtentUtils.js +1 -1
  245. package/views/3d/support/PBFDecoderWorker.js +1 -1
  246. package/views/3d/support/SharedSymbolResources.js +1 -1
  247. package/views/3d/terrain/PatchRenderData.js +1 -1
  248. package/views/support/geometry3dUtils.js +1 -1
  249. package/widgets/BasemapGallery/support/basemapCompatibilityUtils.js +1 -1
  250. package/widgets/Daylight.js +1 -1
  251. package/widgets/Directions/components/SaveLayer.js +1 -1
  252. package/widgets/Directions.js +1 -1
  253. package/widgets/Editor.js +1 -1
  254. package/widgets/FeatureForm.js +1 -1
  255. package/widgets/FeatureTemplates/ItemList.js +1 -1
  256. package/widgets/Popup.js +1 -1
  257. package/widgets/ShadowCast/components/Label.js +1 -1
  258. package/widgets/Slice/SlicePlane.js +1 -1
  259. package/widgets/Slice.js +1 -1
  260. package/widgets/UtilityNetworkTrace.js +1 -1
  261. package/widgets/Weather.js +1 -1
  262. package/widgets/support/SnappingControls.js +1 -1
  263. package/assets/esri/core/workers/chunks/7ce1b3056f392cd10031.js +0 -1
  264. package/assets/esri/core/workers/chunks/fc197a387187daab1df3.js +0 -1
package/WebScene.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.26/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"./chunks/tslib.es6.js";import{version as t}from"./kernel.js";import r from"./Map.js";import i from"./Viewpoint.js";import o from"./core/Collection.js";import s from"./core/Error.js";import a from"./core/Handles.js";import"./core/has.js";import{clone as n}from"./core/lang.js";import l from"./core/Loadable.js";import{loadAll as p}from"./core/loadAll.js";import c from"./core/Logger.js";import{isSome as d}from"./core/maybe.js";import{MultiOriginJSONMixin as h,MultiOriginJSONSupport as u}from"./core/MultiOriginJSONSupport.js";import{EsriPromiseMixin as m}from"./core/Promise.js";import{debounce as y,eachAlways as w}from"./core/promiseUtils.js";import{urlToObject as g,addQueryParameter as f}from"./core/urlUtils.js";import{property as v}from"./core/accessorSupport/decorators/property.js";import"./core/accessorSupport/ensureType.js";import{reader as b}from"./core/accessorSupport/decorators/reader.js";import{subclass as S}from"./core/accessorSupport/decorators/subclass.js";import{writer as A}from"./core/accessorSupport/decorators/writer.js";import{updateOrigins as _}from"./core/accessorSupport/originUtils.js";import{readLoadable as I}from"./core/accessorSupport/read.js";import j from"./geometry/Extent.js";import R from"./geometry/HeightModelInfo.js";import{canProjectWithoutEngine as L}from"./geometry/projection.js";import P from"./geometry/SpatialReference.js";import{validateWebSceneError as V}from"./geometry/support/heightModelInfoUtils.js";import{fromJSON as U}from"./geometry/support/jsonUtils.js";import{isEarth as M}from"./geometry/support/spatialReferenceUtils.js";import O from"./portal/Portal.js";import E from"./portal/PortalItem.js";import C from"./support/MapFloorInfo.js";import{createSchemaValidationError as N,createCopyError as T}from"./support/webSceneUtils.js";import{ViewingMode as G}from"./views/ViewingMode.js";import{isSpatialReferenceSupported as F}from"./views/support/spatialReferenceSupport.js";import{saveResources as $}from"./webdoc/support/saveUtils.js";import{getOptimalThumbnailSize as W}from"./webdoc/support/thumbnailUtils.js";import J from"./webscene/ApplicationProperties.js";import x from"./webscene/Environment.js";import k from"./webscene/InitialViewProperties.js";import B from"./webscene/Presentation.js";import q from"./webscene/TransportationNetwork.js";import{Version as K}from"./webscene/Version.js";const D=new K(1,30),H=()=>{const e=8,t=[],r=D.major;for(let i=e;i<=D.minor;i++)t.push(`${r}.${i}`);return t},z="Web Scene",Q="ViewingMode-Local";let X=class extends(l.LoadableMixin(m(h(r)))){constructor(e){super(e),this._handles=new a,this.applicationProperties=null,this.clippingArea=null,this.clippingEnabled=!1,this.floorInfo=null,this.heightModelInfo=null,this.sourceVersion=null,this.transportationNetworks=null,this.presentation=new B,this.initialViewProperties=new k,this.portalItem=null,this.resourceInfo=null,this._debouncedSaveOperations=y((async(e,t,r)=>{switch(e){case Y.SAVE:return this._saveImpl(t);case Y.SAVE_AS:return this._saveAsImpl(r,t)}})),this._resourceReferences={portalItem:null,paths:[]},this.authoringApp=null,this.authoringAppVersion=null,this._isAuthoringAppSetByUser=!1,this._isAuthoringAppVersionSetByUser=!1}initialize(){if(this.when().catch((e=>{c.getLogger(this.declaredClass).error("#load()","Failed to load web scene",e)})),this.resourceInfo){let t;try{t=this._validateJSON(this.resourceInfo)}catch(e){return void this.addResolvingPromise(Promise.reject(e))}this.read(t),this.addResolvingPromise(this._validateSpatialReference()),this.addResolvingPromise(this._validateHeightModelInfo())}this._handles.add(this.allLayers.on("change",(()=>this._scheduleLayersIdGC())))}destroy(){this._unscheduleLayersIdGC(),this._handles.destroy(),this.presentation&&this.presentation.destroy();const e=this.portalItem;this.portalItem=null,e?.destroy()}writeClippingArea(e,t){t.clippingArea||(t.clippingArea={}),t.clippingArea.geometry=e.toJSON()}readClippingEnabled(e,t){return!!t.clippingArea&&!!t.clippingArea.clip}writeClippingEnabled(e,t){this.clippingArea&&(t.clippingArea||(t.clippingArea={}),t.clippingArea.clip=e)}writeLayers(e,t,r,i){const o={...i,layerContainerType:"operational-layers"},s=e.map((e=>this.verifyWriteLayer(e,i)?e.write({},o):null)).filter((e=>!!e));t[r]=s.toArray()}verifyWriteLayer(e,t){return"write"in e||(t&&t.messages&&t.messages.push(new s("layer:unsupported",`Layers (${e.title}, ${e.id}) of type '${e.declaredClass}' cannot be persisted in web scenes`,{layer:e})),!1)}readSourceVersion(e,t){const[r,i]=t.version.split(".");return new K(parseInt(r,10),parseInt(i,10))}writeSourceVersion(e,t,r){t[r]=`${D.major}.${D.minor}`}get thumbnailUrl(){return this.portalItem&&this.portalItem.thumbnailUrl||null}set thumbnailUrl(e){e?this._override("thumbnailUrl",e):(this._clearOverride("thumbnailUrl"),this.clear("thumbnailUrl","user"))}set authoringApp(e){this._isAuthoringAppSetByUser=!0,this._set("authoringApp",e)}writeAuthoringApp(e,t){e&&this._isAuthoringAppSetByUser?t.authoringApp=e:t.authoringApp="ArcGIS API for JavaScript"}set authoringAppVersion(e){this._isAuthoringAppVersionSetByUser=!0,this._set("authoringAppVersion",e)}writeAuthoringAppVersion(e,r){e&&this._isAuthoringAppVersionSetByUser?r.authoringAppVersion=e:r.authoringAppVersion=t}writeGround(e,t,r,i){t[r]=e?e.write({},i):{transparency:0,layers:[]}}readInitialViewProperties(e,t){const r={};return t.initialState&&t.initialState.environment&&(r.environment=x.fromJSON(t.initialState.environment)),t.spatialReference?r.spatialReference=P.fromJSON(t.spatialReference):r.spatialReference=P.WebMercator,r.viewingMode=t.viewingMode||"global",t.initialState&&t.initialState.viewpoint&&(r.viewpoint=i.fromJSON(t.initialState.viewpoint)),new k(r)}get spatialReference(){return this.initialViewProperties?.spatialReference??P.WebMercator}get viewingMode(){return this.initialViewProperties?.viewingMode??"global"}load(e){return this.addResolvingPromise(this._loadFromSource()),Promise.resolve(this)}loadAll(){return p(this,(e=>{const t=this.presentation&&this.presentation.slides;e(this.ground,this.basemap,this.layers,t&&t.map((e=>e.basemap)))}))}read(e,t){t={...t,origin:"web-scene"};const r=this._isAuthoringAppVersionSetByUser,i=this._isAuthoringAppSetByUser;if(I(this,e,(t=>super.read(e,t)),t),i||(this._isAuthoringAppSetByUser=!1),r||(this._isAuthoringAppVersionSetByUser=!1),e.baseMap&&Array.isArray(e.baseMap.elevationLayers)&&this.sourceVersion.supportsVisibleElevationLayersInSlides){const t=e.baseMap.elevationLayers.map((e=>({id:e.id}))),r=this.presentation.slides,i=(e,t)=>e.visibleLayers.some((e=>e.id===t)),o=t.filter((e=>!r.some((t=>i(t,e.id)))));r.forEach((e=>{e.visibleLayers.addMany(o)}))}}_writeBasemapElevationLayers(e){const t=e.ground&&e.ground.layers;!e.baseMap&&t&&t.length&&(e.baseMap={title:"Basemap",baseMapLayers:[]}),e.baseMap&&(e.baseMap.elevationLayers=n(t))}write(e,t){if("loaded"!==this.loadStatus){const e=new s("webscene:not-loaded","Web scene must be loaded before it can be serialized");throw c.getLogger(this.declaredClass).error("#toJSON()","Web scene must be loaded before it can be serialized",this.loadError||this.loadStatus),e}this._runLayersIdGC();const r=!t?.messages;t={messages:[],...t,origin:"web-scene"};const i=super.write(e,t);if(r){const e=t.messages.filter((e=>"web-document-write:property-required"===e.name));if(e.length){const t=new s("web-document:property-required","One or more properties that are required in the webscene JSON are missing, see details for the specific errors",{errors:e});throw c.getLogger(this.declaredClass).error("#toJSON()","One or more properties that are required in the webscene JSON are missing",e),t}}return this._writeBasemapElevationLayers(i),i}async save(e){return this._debouncedSaveOperations(Y.SAVE,e)}async _saveImpl(e){this.portalItem||(c.getLogger(this.declaredClass).error("save(): requires the .portalItem property to be set"),await Promise.reject(new s("webscene:portal-item-not-set","Portal item to save to has not been set on the WebScene"))),this.portalItem.type!==z&&await Promise.reject(new s("webscene:portal-item-wrong-type",`Portal item needs to have type "${z}"`));const t=this._updateFromPromise;await this._ensureLoadBeforeSave();const r=this._enableVerifyItemRelativeUrls({origin:"web-scene",url:this.portalItem.itemUrl&&g(this.portalItem.itemUrl),messages:[],portal:this.portalItem.portal||O.getDefault(),portalItem:this.portalItem,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}}),i=this.write({},r);return await Promise.all(r.resources.pendingOperations),await this._verifySave(i,r,e),this._updateTypeKeywords(this.portalItem),await this.portalItem.update({data:i}),await $(this._resourceReferences,r,null),_(r),t&&await t,await this._saveThumbnail(),this.portalItem}async saveAs(e,t){return this._debouncedSaveOperations(Y.SAVE_AS,t,e)}async _saveAsImpl(e,t){let r=E.from(e);r||(c.getLogger(this.declaredClass).error("saveAs(portalItem): requires a portal item parameter"),await Promise.reject(new s("webscene:portal-item-required","saveAs requires a portal item to save to"))),r.id&&(r=r.clone(),r.id=null);const i=r.portal||O.getDefault();await this._ensureLoadBeforeSave(),r.type=z,r.portal=i;const o=this._enableVerifyItemRelativeUrls({origin:"web-scene",url:null,messages:[],portal:i,portalItem:r,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}}),a=this.write({},o);await Promise.all(o.resources.pendingOperations),await this._verifySaveAs(a,o,t);const n=this.thumbnailUrl,l=!this._isOverridden("thumbnailUrl");return this._updateTypeKeywords(r),await i.signIn(),await i.user.addItem({item:r,folder:t&&t.folder,data:a}),await $(this._resourceReferences,o,null),this.portalItem=r,u.prototype.read.call(this,{version:a.version,authoringApp:a.authoringApp,authoringAppVersion:a.authoringAppVersion},{name:"web-scene",ignoreDefaults:!0,url:r.itemUrl&&g(r.itemUrl)}),_(o),n&&(this.thumbnailUrl=l?f(n,"w","8192"):n),o.portalItem=r,await this._saveThumbnail(),r}async _saveThumbnail(){this._isOverridden("thumbnailUrl")&&(await this.portalItem.updateThumbnail({thumbnail:this.thumbnailUrl}),this._clearOverride("thumbnailUrl"),this.clear("thumbnailUrl","user"))}_verifySave(e,t,r,i=!1){if(!M(this.spatialReference))return Promise.reject(new s("webscene:unsupported-spatial-reference","Webscenes using spatial reference systems from Mars or Moon can not be saved currently."));let o,a=t.messages.filter((e=>"error"===e.type)).map((e=>new s(e.name,e.message,e.details)));t.blockedRelativeUrls&&(a=a.concat(t.blockedRelativeUrls.map((e=>new s("url:unsupported",`Relative url '${e}' is not supported in Web Scene`))))),r&&r.ignoreUnsupported&&(a=a.filter((e=>"layer:unsupported"!==e.name&&"symbol:unsupported"!==e.name&&"symbol-layer:unsupported"!==e.name&&"property:unsupported"!==e.name&&"url:unsupported"!==e.name&&"scenemodification:unsupported"!==e.name))),r?.requiredPropertyChecksDisabled&&(a=a.filter((e=>"web-document-write:property-required"!==e.name)));const n=r&&r.strictSchemaValidationEnabled;return o=n?import("./webscene/support/schemaValidator.js").then((t=>{const r=t.validate(e);if(r.length>0){const e=`webscene did not validate:\n${r.join("\n")}`;c.getLogger(this.declaredClass).error(`${i?"saveAs":"save"}(): ${e}`)}return r.map((e=>new s("webscene:schema-validation",e)))})).then((e=>{if(n&&e.length>0){throw N(e.concat(a))}return a})):Promise.resolve(a),o.then((e=>{if(e.length>0)throw new s("webscene:save","Failed to save webscene due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:e})}))}_verifySaveAs(e,t,r){return this.canNotSaveAs(t)?Promise.reject(T()):this._verifySave(e,t,r,!0)}verifySaveAs(e){const t=this._enableVerifyItemRelativeUrls({origin:"web-scene",messages:[]}),r=this.write({},t);return this._verifySaveAs(r,t,e)}canNotSaveAs(e){return e||(e=this._enableVerifyItemRelativeUrls({origin:"web-scene",messages:[]}),this.write({},e)),e.verifyItemRelativeUrls&&e.verifyItemRelativeUrls.writtenUrls.length>0}async updateFrom(e,t={}){const r=this._updateFrom(e,t);this._updateFromPromise=r,await r;this._updateFromPromise===r&&(this._updateFromPromise=null)}async _updateFrom(e,t={}){if(await e.whenReady(),!t.environmentExcluded&&e.environment&&(this.initialViewProperties.environment=x.prototype.clone.apply(e.environment)),!t.viewpointExcluded&&e.viewpoint&&(this.initialViewProperties.viewpoint=e.viewpoint.clone()),this.initialViewProperties.spatialReference=e.spatialReference.clone(),this.initialViewProperties.viewingMode=e.viewingMode,d(e.clippingArea)?e.clippingArea!==this.clippingArea&&(this.clippingArea=e.clippingArea.clone(),this.clippingEnabled=!0):this.clippingEnabled=!1,e.heightModelInfo&&(this.heightModelInfo=e.heightModelInfo.clone()),e.map===this)for(const r of e.allLayerViews){const e="visible";e in r&&e in r.layer&&r._isOverridden(e)&&(r.layer[e]=r[e])}(!1===t.thumbnailExcluded||null==t.thumbnailExcluded&&!t.viewpointExcluded)&&await this._updateFromThumbnail(e,t.thumbnailSize||void 0)}async _updateFromThumbnail(e,t){const r=W(e,t),i=await e.takeScreenshot({format:"jpg",width:r.width,height:r.height,disableDecorations:!0});this.thumbnailUrl=i.dataUrl}_loadFromSource(){return this.resourceInfo?this._loadFromJSON(this.resourceInfo,{origin:"web-scene"}):this.portalItem&&this.portalItem.id?this._loadFromItem(this.portalItem):this._loadObjectsWithLayers()}_readAndLoadFromJSON(e,t){const r=this._validateJSON(e);return this.read(r,t),this._loadFromJSON(r,t)}_extractOperationalLayers(e){const t=[];if(!this.sourceVersion.supportsGround&&e.baseMap&&Array.isArray(e.baseMap.elevationLayers))for(const o of e.baseMap.elevationLayers)t.push(o);const r=[],i=e=>(e.layers&&(e.layers=e.layers.filter(i)),"ArcGISTiledElevationServiceLayer"!==e.layerType||(this.sourceVersion.supportsGround||r.push(e),!1));return{operationalLayers:e.operationalLayers?e.operationalLayers.filter(i):[],operationalElevationLayers:r,basemapElevationLayers:t}}_loadFromJSON(e,t){const r=new o;return this._validateSpatialReference().then((()=>this._validateHeightModelInfo())).then((()=>import("./layers/support/layersCreator.js"))).then((({populateOperationalLayers:i})=>{const{operationalLayers:o,operationalElevationLayers:s,basemapElevationLayers:a}=this._extractOperationalLayers(e),n=[],l={context:{...t,layerContainerType:"operational-layers"}};if(this.portalItem&&(l.context.portal=this.portalItem.portal||O.getDefault()),a.length>0){const e={...l,context:{...l.context,layerContainerType:"ground"}};e.defaultLayerType="ArcGISTiledElevationServiceLayer",n.push(i(this.ground.layers,a,e))}if(s.length>0){const e={...l,context:{...l.context,layerContainerType:"ground"}};e.defaultLayerType="ArcGISTiledElevationServiceLayer",n.push(i(r,s,e))}return o&&o.length>0&&n.push(i(this.layers,o,l)),w(n).then((()=>{}))})).then((()=>this._loadObjectsWithLayers())).then((()=>{this.ground.layers.addMany(r)}))}async _ensureLoadBeforeSave(){await this.load(),await this._loadObjectsWithLayers();const e=[];for(const t of this.allLayers.items)if("beforeSave"in t&&"function"==typeof t.beforeSave){const r=t.beforeSave();r&&e.push(r)}await w(e)}async _loadObjectsWithLayers(){const e=[];this.ground&&e.push(this.ground.load()),this.basemap&&e.push(this.basemap.load()),this.presentation.slides.forEach((t=>{t.basemap&&e.push(t.basemap.load())})),await w(e)}async _loadFromItem(e){if(await e.load().catch((e=>{throw new s("webscene:load-portal-item","Failed to load portal item",{error:e})})),"Web Scene"!==e.type)throw new s("webscene:invalid-portal-item","Invalid portal item type '${type}', expected 'Web Scene'",{type:e.type});const t=await e.fetchData();this.resourceInfo=t;const r={origin:"web-scene",url:g(e.itemUrl),portal:e.portal||O.getDefault(),portalItem:e,readResourcePaths:[]};await this._readAndLoadFromJSON(t,r),this._resourceReferences={portalItem:e,paths:r.readResourcePaths}}_validateSpatialReference(){const e=this.initialViewProperties,t=this._sceneSpatialReference;let r;if("local"!==e.viewingMode){if(!F(t,G.Global))return Promise.reject(new s("webscene:unsupported-spatial-reference","Unsupported spatial reference (${spatialReference.wkid}) in global mode, only Web Mercator, WGS84 GCS or CGCS2000 are supported",{spatialReference:t,viewingMode:e.viewingMode}));r=e=>!e||L(e,t)}else{if(!F(t,G.Local))return Promise.reject(new s("webscene:unsupported-spatial-reference","Unsupported spatial reference (${spatialReference.wkid}) in local mode, only projected coordinate systems are supported",{spatialReference:t,viewingMode:e.viewingMode}));r=e=>!e||e.equals(t)}const i=e=>e&&(d(e.camera)&&e.camera.position&&e.camera.position.spatialReference||d(e.targetGeometry)&&e.targetGeometry.spatialReference),o=e.viewpoint,a=i(o);if(a&&!r(a))return Promise.reject(new s("webscene:incompatible-camera-spatial-reference","Camera spatial reference (${cameraSpatialReference.wkid}) is incompatible with the scene spatial reference (${sceneSpatialReference.wkid})",{cameraSpatialReference:a,sceneSpatialReference:t,viewingMode:e.viewingMode}));const n=this.presentation.slides.find((e=>!r(i(e.viewpoint))));if(n){const r=i(n.viewpoint);return Promise.reject(new s("webscene:incompatible-slide-spatial-reference","Slide spatial reference (${slideSpatialReference.wkid}) is incompatible with the scene spatial reference (${sceneSpatialReference.wkid})",{slideSpatialReference:r,sceneSpatialReference:t,viewingMode:e.viewingMode}))}return Promise.resolve()}_validateHeightModelInfo(){const e=this._sceneSpatialReference,t=V(this.heightModelInfo,e);return t?Promise.reject(t):Promise.resolve()}_validateJSON(e){const t=K.parse(e.version||"","webscene");return D.validate(t),e.version=`${t.major}.${t.minor}`,1===t.major&&t.minor<=2&&(e.spatialReference=P.WebMercator.toJSON()),e}_updateTypeKeywords(e){"local"===this.initialViewProperties.viewingMode?e.typeKeywords?e.typeKeywords.includes(Q)||e.typeKeywords.push(Q):e.typeKeywords=[Q]:"global"===this.initialViewProperties.viewingMode&&e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter((e=>e!==Q))),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)))}get _sceneSpatialReference(){return this.initialViewProperties.spatialReference||P.WebMercator}get _verifyItemRelativeRootPath(){return this.portalItem&&this.portalItem.itemUrl?g(this.portalItem.itemUrl).path:null}_enableVerifyItemRelativeUrls(e){const t=this._verifyItemRelativeRootPath;return t&&(e.verifyItemRelativeUrls={rootPath:t,writtenUrls:[]}),e}_unscheduleLayersIdGC(){this._layersIdGCTimeoutId&&(clearTimeout(this._layersIdGCTimeoutId),this._layersIdGCTimeoutId=0)}_scheduleLayersIdGC(){this._unscheduleLayersIdGC(),this._layersIdGCTimeoutId=setTimeout((()=>{this._layersIdGCTimeoutId=0,this._runLayersIdGC()}),3e3)}_runLayersIdGC(){this._unscheduleLayersIdGC();const e=this.applicationProperties&&this.applicationProperties.viewing&&this.applicationProperties.viewing.search,t=e=>this.allLayers.some((t=>t.id===e));e&&e.layers&&(e.layers=e.layers.filter((e=>t(e.id))));const r=this.presentation&&this.presentation.slides;r&&r.forEach((e=>{e.visibleLayers&&(e.visibleLayers=e.visibleLayers.filter((e=>t(e.id))))}))}static fromJSON(e){if(!e)throw new s("webscene:empty-resource","Expected a JSON resource but got nothing");return new this({resourceInfo:e})}};var Y;X.version=`${D.major}.${D.minor}`,e([v({type:J,json:{write:!0}})],X.prototype,"applicationProperties",void 0),e([v({json:{read:{source:"baseMap"},write:{target:"baseMap"}}})],X.prototype,"basemap",void 0),e([v({type:j,json:{read:{source:"clippingArea.geometry",reader:U},write:{target:"clippingArea.geometry"}}})],X.prototype,"clippingArea",void 0),e([A("clippingArea")],X.prototype,"writeClippingArea",null),e([v({type:Boolean,json:{write:{target:"clippingArea.clip"}}})],X.prototype,"clippingEnabled",void 0),e([b("clippingEnabled",["clippingArea"])],X.prototype,"readClippingEnabled",null),e([A("clippingEnabled")],X.prototype,"writeClippingEnabled",null),e([v({type:C,json:{read:{source:"mapFloorInfo"},write:{target:"mapFloorInfo"}}})],X.prototype,"floorInfo",void 0),e([v({type:R,json:{write:!0}})],X.prototype,"heightModelInfo",void 0),e([v({json:{write:{target:"operationalLayers",ignoreOrigin:!0}}})],X.prototype,"layers",void 0),e([A("layers")],X.prototype,"writeLayers",null),e([v({readOnly:!0,type:K,json:{type:H(),write:{ignoreOrigin:!0,target:"version",isRequired:!0,overridePolicy:()=>({enabled:!0,allowNull:!0,ignoreOrigin:!0})}}})],X.prototype,"sourceVersion",void 0),e([b("sourceVersion",["version"])],X.prototype,"readSourceVersion",null),e([A("sourceVersion")],X.prototype,"writeSourceVersion",null),e([v({json:{read:!1,write:!1}})],X.prototype,"tables",void 0),e([v()],X.prototype,"thumbnailUrl",null),e([v({type:String,json:{write:{writerEnsuresNonNull:!0,ignoreOrigin:!0}}})],X.prototype,"authoringApp",null),e([A("authoringApp")],X.prototype,"writeAuthoringApp",null),e([v({type:String,json:{write:{writerEnsuresNonNull:!0,ignoreOrigin:!0}}})],X.prototype,"authoringAppVersion",null),e([A("authoringAppVersion")],X.prototype,"writeAuthoringAppVersion",null),e([v({json:{write:{isRequired:!0,allowNull:!0,ignoreOrigin:!0,enabled:!0}}})],X.prototype,"ground",void 0),e([A("ground")],X.prototype,"writeGround",null),e([v({type:o.ofType(q),json:{write:!0}})],X.prototype,"transportationNetworks",void 0),e([v({type:B,nonNullable:!0,json:{write:{ignoreOrigin:!0,writer:(e,t,r,i)=>{if(e.slides&&e.slides.length>0){const r={...i,isPresentation:!0};t.presentation=e.write({},r)}}}}})],X.prototype,"presentation",void 0),e([v({type:k,nonNullable:!0,json:{write:{target:"initialState",isRequired:!0,ignoreOrigin:!0},default:()=>new k({viewingMode:"global",spatialReference:P.WebMercator})}})],X.prototype,"initialViewProperties",void 0),e([b("initialViewProperties",["initialState.environment","spatialReference","viewingMode","initialState.viewpoint"])],X.prototype,"readInitialViewProperties",null),e([v({type:P,json:{read:!1,write:{isRequired:!0,ignoreOrigin:!0}}})],X.prototype,"spatialReference",null),e([v({type:["local","global"],json:{read:!1,write:{isRequired:!0,ignoreOrigin:!0}}})],X.prototype,"viewingMode",null),e([v({type:E})],X.prototype,"portalItem",void 0),e([v()],X.prototype,"resourceInfo",void 0),X=e([S("esri.WebScene")],X),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(Y||(Y={}));const Z=X;export{Z as default};
5
+ import{_ as e}from"./chunks/tslib.es6.js";import{version as t}from"./kernel.js";import r from"./Map.js";import i from"./Viewpoint.js";import o from"./core/Collection.js";import s from"./core/Error.js";import a from"./core/Handles.js";import"./core/has.js";import{clone as n}from"./core/lang.js";import l from"./core/Loadable.js";import{loadAll as p}from"./core/loadAll.js";import c from"./core/Logger.js";import{isSome as d,unwrap as h}from"./core/maybe.js";import{MultiOriginJSONMixin as u,MultiOriginJSONSupport as m}from"./core/MultiOriginJSONSupport.js";import{EsriPromiseMixin as y}from"./core/Promise.js";import{debounce as w,eachAlways as g}from"./core/promiseUtils.js";import{urlToObject as f,addQueryParameter as v}from"./core/urlUtils.js";import{property as b}from"./core/accessorSupport/decorators/property.js";import"./core/accessorSupport/ensureType.js";import{reader as S}from"./core/accessorSupport/decorators/reader.js";import{subclass as _}from"./core/accessorSupport/decorators/subclass.js";import{writer as A}from"./core/accessorSupport/decorators/writer.js";import{updateOrigins as I}from"./core/accessorSupport/originUtils.js";import{readLoadable as j}from"./core/accessorSupport/read.js";import L from"./geometry/Extent.js";import R from"./geometry/HeightModelInfo.js";import{canProjectWithoutEngine as P}from"./geometry/projection.js";import V from"./geometry/SpatialReference.js";import{validateWebSceneError as M}from"./geometry/support/heightModelInfoUtils.js";import{fromJSON as U}from"./geometry/support/jsonUtils.js";import{isEarth as O}from"./geometry/support/spatialReferenceUtils.js";import E from"./portal/Portal.js";import C from"./portal/PortalItem.js";import N from"./support/MapFloorInfo.js";import{createSchemaValidationError as T,createCopyError as G}from"./support/webSceneUtils.js";import{ViewingMode as F}from"./views/ViewingMode.js";import{isSpatialReferenceSupported as $}from"./views/support/spatialReferenceSupport.js";import{saveResources as W}from"./webdoc/support/saveUtils.js";import{getOptimalThumbnailSize as J}from"./webdoc/support/thumbnailUtils.js";import x from"./webscene/ApplicationProperties.js";import k from"./webscene/Environment.js";import B from"./webscene/InitialViewProperties.js";import q from"./webscene/Presentation.js";import K from"./webscene/TransportationNetwork.js";import{Version as D}from"./webscene/Version.js";const H=new D(1,30),z=()=>{const e=8,t=[],r=H.major;for(let i=e;i<=H.minor;i++)t.push(`${r}.${i}`);return t},Q="Web Scene",X="ViewingMode-Local";let Y=class extends(l.LoadableMixin(y(u(r)))){constructor(e){super(e),this._layersIdGCTimeoutId=void 0,this._handles=new a,this._updateFromPromise=null,this.applicationProperties=null,this.clippingArea=null,this.clippingEnabled=!1,this.floorInfo=null,this.heightModelInfo=void 0,this.sourceVersion=null,this.transportationNetworks=null,this.presentation=new q,this.initialViewProperties=new B,this.portalItem=null,this.resourceInfo=null,this._debouncedSaveOperations=w((async(e,t,r)=>{switch(e){case Z.SAVE:return this._saveImpl(t);case Z.SAVE_AS:return this._saveAsImpl(r,t)}})),this._resourceReferences={portalItem:null,paths:[]},this.authoringApp=null,this.authoringAppVersion=null,this._isAuthoringAppSetByUser=!1,this._isAuthoringAppVersionSetByUser=!1}initialize(){if(this.when().catch((e=>{c.getLogger(this.declaredClass).error("#load()","Failed to load web scene",e)})),this.resourceInfo){let t;try{t=this._validateJSON(this.resourceInfo)}catch(e){return void this.addResolvingPromise(Promise.reject(e))}this.read(t),this.addResolvingPromise(this._validateSpatialReference()),this.addResolvingPromise(this._validateHeightModelInfo())}this._handles.add(this.allLayers.on("change",(()=>this._scheduleLayersIdGC())))}destroy(){this._unscheduleLayersIdGC(),this._handles.destroy(),this.presentation&&this.presentation.destroy();const e=this.portalItem;this.portalItem=null,e?.destroy()}writeClippingArea(e,t){t.clippingArea||(t.clippingArea={}),t.clippingArea.geometry=e.toJSON()}readClippingEnabled(e,t){return!!t.clippingArea&&!!t.clippingArea.clip}writeClippingEnabled(e,t){this.clippingArea&&(t.clippingArea||(t.clippingArea={}),t.clippingArea.clip=e)}writeLayers(e,t,r,i){const o={...i,layerContainerType:"operational-layers"},s=e.map((e=>this.verifyWriteLayer(e,i)?e.write({},o):null)).filter((e=>!!e));t[r]=s.toArray()}verifyWriteLayer(e,t){return"write"in e||(t&&t.messages&&t.messages.push(new s("layer:unsupported",`Layers (${e.title}, ${e.id}) of type '${e.declaredClass}' cannot be persisted in web scenes`,{layer:e})),!1)}readSourceVersion(e,t){const[r,i]=t.version.split(".");return new D(parseInt(r,10),parseInt(i,10))}writeSourceVersion(e,t,r){t[r]=`${H.major}.${H.minor}`}get thumbnailUrl(){return this.portalItem?.thumbnailUrl??null}set thumbnailUrl(e){e?this._override("thumbnailUrl",e):(this._clearOverride("thumbnailUrl"),this.clear("thumbnailUrl","user"))}set authoringApp(e){this._isAuthoringAppSetByUser=!0,this._set("authoringApp",e)}writeAuthoringApp(e,t){e&&this._isAuthoringAppSetByUser?t.authoringApp=e:t.authoringApp="ArcGIS API for JavaScript"}set authoringAppVersion(e){this._isAuthoringAppVersionSetByUser=!0,this._set("authoringAppVersion",e)}writeAuthoringAppVersion(e,r){e&&this._isAuthoringAppVersionSetByUser?r.authoringAppVersion=e:r.authoringAppVersion=t}writeGround(e,t,r,i){t[r]=e?e.write({},i):{transparency:0,layers:[]}}readInitialViewProperties(e,t){const r={};return t.initialState&&t.initialState.environment&&(r.environment=k.fromJSON(t.initialState.environment)),t.spatialReference?r.spatialReference=V.fromJSON(t.spatialReference):r.spatialReference=V.WebMercator,r.viewingMode=t.viewingMode||"global",t.initialState&&t.initialState.viewpoint&&(r.viewpoint=i.fromJSON(t.initialState.viewpoint)),new B(r)}get spatialReference(){return this.initialViewProperties?.spatialReference??V.WebMercator}get viewingMode(){return this.initialViewProperties?.viewingMode??"global"}load(e){return this.addResolvingPromise(this._loadFromSource()),Promise.resolve(this)}loadAll(){return p(this,(e=>{const t=this.presentation&&this.presentation.slides;e(this.ground,this.basemap,this.layers,t&&t.map((e=>e.basemap)))}))}read(e,t){t={...t,origin:"web-scene"};const r=this._isAuthoringAppVersionSetByUser,i=this._isAuthoringAppSetByUser;if(j(this,e,(t=>super.read(e,t)),t),i||(this._isAuthoringAppSetByUser=!1),r||(this._isAuthoringAppVersionSetByUser=!1),e.baseMap&&Array.isArray(e.baseMap.elevationLayers)&&this.sourceVersion?.supportsVisibleElevationLayersInSlides){const t=e.baseMap.elevationLayers.map((e=>({id:e.id}))),r=this.presentation.slides,i=(e,t)=>e.visibleLayers.some((e=>e.id===t)),o=t.filter((e=>!r.some((t=>i(t,e.id)))));r.forEach((e=>{e.visibleLayers.addMany(o)}))}}_writeBasemapElevationLayers(e){const t=e.ground&&e.ground.layers;!e.baseMap&&t&&t.length&&(e.baseMap={title:"Basemap",baseMapLayers:[]}),e.baseMap&&(e.baseMap.elevationLayers=n(t))}write(e,t){if("loaded"!==this.loadStatus){const e=new s("webscene:not-loaded","Web scene must be loaded before it can be serialized");throw c.getLogger(this.declaredClass).error("#toJSON()","Web scene must be loaded before it can be serialized",this.loadError||this.loadStatus),e}this._runLayersIdGC();const r=!t?.messages;t={messages:[],...t,origin:"web-scene"};const i=super.write(e,t);if(r){const e=t.messages?.filter((e=>"web-document-write:property-required"===e.name))??[];if(e.length){const t=new s("web-document:property-required","One or more properties that are required in the webscene JSON are missing, see details for the specific errors",{errors:e});throw c.getLogger(this.declaredClass).error("#toJSON()","One or more properties that are required in the webscene JSON are missing",e),t}}return this._writeBasemapElevationLayers(i),i}async save(e){return this._debouncedSaveOperations(Z.SAVE,e)}async _saveImpl(e){if(!this.portalItem)throw c.getLogger(this.declaredClass).error("save(): requires the .portalItem property to be set"),await Promise.resolve(),new s("webscene:portal-item-not-set","Portal item to save to has not been set on the WebScene");if(this.portalItem?.type!==Q)throw await Promise.resolve(),new s("webscene:portal-item-wrong-type",`Portal item needs to have type "${Q}"`);const t=this._updateFromPromise;await this._ensureLoadBeforeSave();const r=this._enableVerifyItemRelativeUrls({origin:"web-scene",url:this.portalItem.itemUrl?f(this.portalItem.itemUrl):null,messages:[],portal:this.portalItem.portal??E.getDefault(),portalItem:this.portalItem,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}}),i=this.write({},r);return await Promise.all(r.resources?.pendingOperations??[]),await this._verifySave(i,r,e),this._updateTypeKeywords(this.portalItem),await this.portalItem.update({data:i}),await W(this._resourceReferences,r,null),I(r),t&&await t,await this._saveThumbnail(),this.portalItem}async saveAs(e,t){return this._debouncedSaveOperations(Z.SAVE_AS,t,e)}async _saveAsImpl(e,t){let r=C.from(e);r||(c.getLogger(this.declaredClass).error("saveAs(portalItem): requires a portal item parameter"),await Promise.reject(new s("webscene:portal-item-required","saveAs requires a portal item to save to"))),r.id&&(r=r.clone(),r.id=null);const i=r.portal||E.getDefault();await this._ensureLoadBeforeSave(),r.type=Q,r.portal=i;const o=this._enableVerifyItemRelativeUrls({origin:"web-scene",url:null,messages:[],portal:i,portalItem:r,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}}),a=this.write({},o);await Promise.all(o.resources?.pendingOperations??[]),await this._verifySaveAs(a,o,t);const n=this.thumbnailUrl,l=!this._isOverridden("thumbnailUrl");return this._updateTypeKeywords(r),await i.signIn(),await(i.user?.addItem({item:r,folder:t&&t.folder,data:a})),await W(this._resourceReferences,o,null),this.portalItem=r,m.prototype.read.call(this,{version:a.version,authoringApp:a.authoringApp,authoringAppVersion:a.authoringAppVersion},{name:"web-scene",ignoreDefaults:!0,url:r.itemUrl&&f(r.itemUrl)}),I(o),n&&(this.thumbnailUrl=l?v(n,"w","8192"):n),o.portalItem=r,await this._saveThumbnail(),r}async _saveThumbnail(){this._isOverridden("thumbnailUrl")&&(await(this.portalItem?.updateThumbnail({thumbnail:this.thumbnailUrl})),this._clearOverride("thumbnailUrl"),this.clear("thumbnailUrl","user"))}_verifySave(e,t,r,i=!1){if(!O(this.spatialReference))return Promise.reject(new s("webscene:unsupported-spatial-reference","Webscenes using spatial reference systems from Mars or Moon can not be saved currently."));let o,a=t.messages?.filter((e=>"error"===e.type)).map((e=>new s(e.name,e.message,e.details)))??[];t.blockedRelativeUrls&&(a=a.concat(t.blockedRelativeUrls.map((e=>new s("url:unsupported",`Relative url '${e}' is not supported in Web Scene`))))),r&&r.ignoreUnsupported&&(a=a.filter((e=>"layer:unsupported"!==e.name&&"symbol:unsupported"!==e.name&&"symbol-layer:unsupported"!==e.name&&"property:unsupported"!==e.name&&"url:unsupported"!==e.name&&"scenemodification:unsupported"!==e.name))),r?.requiredPropertyChecksDisabled&&(a=a.filter((e=>"web-document-write:property-required"!==e.name)));const n=r&&r.strictSchemaValidationEnabled;return o=n?import("./webscene/support/schemaValidator.js").then((t=>{const r=t.validate(e);if(r.length>0){const e=`webscene did not validate:\n${r.join("\n")}`;c.getLogger(this.declaredClass).error(`${i?"saveAs":"save"}(): ${e}`)}return r.map((e=>new s("webscene:schema-validation",e)))})).then((e=>{if(n&&e.length>0){throw T(e.concat(a))}return a})):Promise.resolve(a),o.then((e=>{if(e.length>0)throw new s("webscene:save","Failed to save webscene due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:e})}))}_verifySaveAs(e,t,r){return this.canNotSaveAs(t)?Promise.reject(G()):this._verifySave(e,t,r,!0)}verifySaveAs(e){const t=this._enableVerifyItemRelativeUrls({origin:"web-scene",messages:[]}),r=this.write({},t);return this._verifySaveAs(r,t,e)}canNotSaveAs(e){return e||(e=this._enableVerifyItemRelativeUrls({origin:"web-scene",messages:[]}),this.write({},e)),(e.verifyItemRelativeUrls?.writtenUrls?.length??0)>0}async updateFrom(e,t={}){const r=this._updateFrom(e,t);this._updateFromPromise=r,await r;this._updateFromPromise===r&&(this._updateFromPromise=null)}async _updateFrom(e,t={}){if(await e.whenReady(),!t.environmentExcluded&&e.environment&&(this.initialViewProperties.environment=k.prototype.clone.apply(e.environment)),!t.viewpointExcluded&&e.viewpoint&&(this.initialViewProperties.viewpoint=e.viewpoint.clone()),this.initialViewProperties.spatialReference=e.spatialReference.clone(),this.initialViewProperties.viewingMode=e.viewingMode,d(e.clippingArea)?e.clippingArea!==this.clippingArea&&(this.clippingArea=e.clippingArea.clone(),this.clippingEnabled=!0):this.clippingEnabled=!1,e.heightModelInfo&&(this.heightModelInfo=e.heightModelInfo.clone()),e.map===this)for(const r of e.allLayerViews){const e="visible";e in r&&e in r.layer&&r._isOverridden(e)&&(r.layer[e]=r[e])}(!1===t.thumbnailExcluded||null==t.thumbnailExcluded&&!t.viewpointExcluded)&&await this._updateFromThumbnail(e,t.thumbnailSize??void 0)}async _updateFromThumbnail(e,t){const r=J(e,t),i=await e.takeScreenshot({format:"jpg",width:r.width,height:r.height,disableDecorations:!0});this.thumbnailUrl=i.dataUrl}_loadFromSource(){return this.resourceInfo?this._loadFromJSON(this.resourceInfo,{origin:"web-scene"}):this.portalItem&&this.portalItem.id?this._loadFromItem(this.portalItem):this._loadObjectsWithLayers()}_readAndLoadFromJSON(e,t){const r=this._validateJSON(e);return this.read(r,t),this._loadFromJSON(r,t)}_extractOperationalLayers(e){const t=[];if(!this.sourceVersion?.supportsGround&&e.baseMap&&Array.isArray(e.baseMap.elevationLayers))for(const o of e.baseMap.elevationLayers)t.push(o);const r=[],i=e=>(e.layers&&(e.layers=e.layers.filter(i)),"ArcGISTiledElevationServiceLayer"!==e.layerType||(this.sourceVersion?.supportsGround||r.push(e),!1));return{operationalLayers:e.operationalLayers?e.operationalLayers.filter(i):[],operationalElevationLayers:r,basemapElevationLayers:t}}_loadFromJSON(e,t){const r=new o;return this._validateSpatialReference().then((()=>this._validateHeightModelInfo())).then((()=>import("./layers/support/layersCreator.js"))).then((({populateOperationalLayers:i})=>{const{operationalLayers:o,operationalElevationLayers:s,basemapElevationLayers:a}=this._extractOperationalLayers(e),n=[],l={context:{...t,layerContainerType:"operational-layers"}};if(this.portalItem&&(l.context.portal=this.portalItem.portal||E.getDefault()),a.length>0){const e={...l,context:{...l.context,layerContainerType:"ground"}};e.defaultLayerType="ArcGISTiledElevationServiceLayer",n.push(i(this.ground.layers,a,e))}if(s.length>0){const e={...l,context:{...l.context,layerContainerType:"ground"}};e.defaultLayerType="ArcGISTiledElevationServiceLayer",n.push(i(r,s,e))}return o&&o.length>0&&n.push(i(this.layers,o,l)),g(n).then((()=>{}))})).then((()=>this._loadObjectsWithLayers())).then((()=>{this.ground.layers.addMany(r)}))}async _ensureLoadBeforeSave(){await this.load(),await this._loadObjectsWithLayers();const e=[];for(const t of this.allLayers.items)if("beforeSave"in t&&"function"==typeof t.beforeSave){const r=t.beforeSave();r&&e.push(r)}await g(e)}async _loadObjectsWithLayers(){const e=[];this.ground&&e.push(this.ground.load()),this.basemap&&e.push(this.basemap.load()),this.presentation.slides.forEach((t=>{t.basemap&&e.push(t.basemap.load())})),await g(e)}async _loadFromItem(e){if(await e.load().catch((e=>{throw new s("webscene:load-portal-item","Failed to load portal item",{error:e})})),"Web Scene"!==e.type)throw new s("webscene:invalid-portal-item","Invalid portal item type '${type}', expected 'Web Scene'",{type:e.type});const t=await e.fetchData();this.resourceInfo=t;const r={origin:"web-scene",url:f(e.itemUrl),portal:e.portal||E.getDefault(),portalItem:e,readResourcePaths:[]};await this._readAndLoadFromJSON(t,r),this._resourceReferences={portalItem:e,paths:r.readResourcePaths??[]}}_validateSpatialReference(){const e=this.initialViewProperties,t=this._sceneSpatialReference;let r;if("local"!==e.viewingMode){if(!$(t,F.Global))return Promise.reject(new s("webscene:unsupported-spatial-reference","Unsupported spatial reference (${spatialReference.wkid}) in global mode, only Web Mercator, WGS84 GCS or CGCS2000 are supported",{spatialReference:t,viewingMode:e.viewingMode}));r=e=>!e||P(e,t)}else{if(!$(t,F.Local))return Promise.reject(new s("webscene:unsupported-spatial-reference","Unsupported spatial reference (${spatialReference.wkid}) in local mode, only projected coordinate systems are supported",{spatialReference:t,viewingMode:e.viewingMode}));r=e=>!e||e.equals(t)}const i=e=>h(e?.camera)?.position.spatialReference??h(e?.targetGeometry)?.spatialReference,o=e.viewpoint,a=i(o);if(a&&!r(a))return Promise.reject(new s("webscene:incompatible-camera-spatial-reference","Camera spatial reference (${cameraSpatialReference.wkid}) is incompatible with the scene spatial reference (${sceneSpatialReference.wkid})",{cameraSpatialReference:a,sceneSpatialReference:t,viewingMode:e.viewingMode}));const n=this.presentation.slides.find((e=>!r(i(e.viewpoint))));if(n){const r=i(n.viewpoint);return Promise.reject(new s("webscene:incompatible-slide-spatial-reference","Slide spatial reference (${slideSpatialReference.wkid}) is incompatible with the scene spatial reference (${sceneSpatialReference.wkid})",{slideSpatialReference:r,sceneSpatialReference:t,viewingMode:e.viewingMode}))}return Promise.resolve()}_validateHeightModelInfo(){const e=this._sceneSpatialReference,t=M(this.heightModelInfo,e);return t?Promise.reject(t):Promise.resolve()}_validateJSON(e){const t=D.parse(e.version||"","webscene");return H.validate(t),e.version=`${t.major}.${t.minor}`,1===t.major&&t.minor<=2&&(e.spatialReference=V.WebMercator.toJSON()),e}_updateTypeKeywords(e){"local"===this.initialViewProperties.viewingMode?e.typeKeywords?e.typeKeywords.includes(X)||e.typeKeywords.push(X):e.typeKeywords=[X]:"global"===this.initialViewProperties.viewingMode&&e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter((e=>e!==X))),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)))}get _sceneSpatialReference(){return this.initialViewProperties.spatialReference||V.WebMercator}get _verifyItemRelativeRootPath(){return this.portalItem?.itemUrl?f(this.portalItem.itemUrl).path:null}_enableVerifyItemRelativeUrls(e){const t=this._verifyItemRelativeRootPath;return t&&(e.verifyItemRelativeUrls={rootPath:t,writtenUrls:[]}),e}_unscheduleLayersIdGC(){this._layersIdGCTimeoutId&&(clearTimeout(this._layersIdGCTimeoutId),this._layersIdGCTimeoutId=0)}_scheduleLayersIdGC(){this._unscheduleLayersIdGC(),this._layersIdGCTimeoutId=setTimeout((()=>{this._layersIdGCTimeoutId=0,this._runLayersIdGC()}),3e3)}_runLayersIdGC(){this._unscheduleLayersIdGC();const e=this.applicationProperties&&this.applicationProperties.viewing&&this.applicationProperties.viewing.search,t=e=>this.allLayers.some((t=>t.id===e));e&&e.layers&&(e.layers=e.layers.filter((e=>t(e.id))));const r=this.presentation&&this.presentation.slides;r&&r.forEach((e=>{e.visibleLayers&&(e.visibleLayers=e.visibleLayers.filter((e=>t(e.id))))}))}static fromJSON(e){if(!e)throw new s("webscene:empty-resource","Expected a JSON resource but got nothing");return new this({resourceInfo:e})}};var Z;Y.version=`${H.major}.${H.minor}`,e([b({type:x,json:{write:!0}})],Y.prototype,"applicationProperties",void 0),e([b({json:{read:{source:"baseMap"},write:{target:"baseMap"}}})],Y.prototype,"basemap",void 0),e([b({type:L,json:{read:{source:"clippingArea.geometry",reader:U},write:{target:"clippingArea.geometry"}}})],Y.prototype,"clippingArea",void 0),e([A("clippingArea")],Y.prototype,"writeClippingArea",null),e([b({type:Boolean,json:{write:{target:"clippingArea.clip"}}})],Y.prototype,"clippingEnabled",void 0),e([S("clippingEnabled",["clippingArea"])],Y.prototype,"readClippingEnabled",null),e([A("clippingEnabled")],Y.prototype,"writeClippingEnabled",null),e([b({type:N,json:{read:{source:"mapFloorInfo"},write:{target:"mapFloorInfo"}}})],Y.prototype,"floorInfo",void 0),e([b({type:R,json:{write:!0}})],Y.prototype,"heightModelInfo",void 0),e([b({json:{write:{target:"operationalLayers",ignoreOrigin:!0}}})],Y.prototype,"layers",void 0),e([A("layers")],Y.prototype,"writeLayers",null),e([b({readOnly:!0,type:D,json:{type:z(),write:{ignoreOrigin:!0,target:"version",isRequired:!0,overridePolicy:()=>({enabled:!0,allowNull:!0,ignoreOrigin:!0})}}})],Y.prototype,"sourceVersion",void 0),e([S("sourceVersion",["version"])],Y.prototype,"readSourceVersion",null),e([A("sourceVersion")],Y.prototype,"writeSourceVersion",null),e([b({json:{read:!1,write:!1}})],Y.prototype,"tables",void 0),e([b()],Y.prototype,"thumbnailUrl",null),e([b({type:String,json:{write:{writerEnsuresNonNull:!0,ignoreOrigin:!0}}})],Y.prototype,"authoringApp",null),e([A("authoringApp")],Y.prototype,"writeAuthoringApp",null),e([b({type:String,json:{write:{writerEnsuresNonNull:!0,ignoreOrigin:!0}}})],Y.prototype,"authoringAppVersion",null),e([A("authoringAppVersion")],Y.prototype,"writeAuthoringAppVersion",null),e([b({json:{write:{isRequired:!0,allowNull:!0,ignoreOrigin:!0,enabled:!0}}})],Y.prototype,"ground",void 0),e([A("ground")],Y.prototype,"writeGround",null),e([b({type:o.ofType(K),json:{write:!0}})],Y.prototype,"transportationNetworks",void 0),e([b({type:q,nonNullable:!0,json:{write:{ignoreOrigin:!0,writer:(e,t,r,i)=>{if(e.slides&&e.slides.length>0){const r={...i,isPresentation:!0};t.presentation=e.write({},r)}}}}})],Y.prototype,"presentation",void 0),e([b({type:B,nonNullable:!0,json:{write:{target:"initialState",isRequired:!0,ignoreOrigin:!0},default:()=>new B({viewingMode:"global",spatialReference:V.WebMercator})}})],Y.prototype,"initialViewProperties",void 0),e([S("initialViewProperties",["initialState.environment","spatialReference","viewingMode","initialState.viewpoint"])],Y.prototype,"readInitialViewProperties",null),e([b({type:V,json:{read:!1,write:{isRequired:!0,ignoreOrigin:!0}}})],Y.prototype,"spatialReference",null),e([b({type:["local","global"],json:{read:!1,write:{isRequired:!0,ignoreOrigin:!0}}})],Y.prototype,"viewingMode",null),e([b({type:C})],Y.prototype,"portalItem",void 0),e([b()],Y.prototype,"resourceInfo",void 0),Y=e([_("esri.WebScene")],Y),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(Z||(Z={}));const ee=Y;export{ee as default};
@@ -1 +1 @@
1
- var RemoteClient;(()=>{var e={88277:(e,t,r)=>{r.p=self.esriConfig.assetsPath+"/esri/core/workers/"},68773:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s}),r(80442);var n=r(78286),o=r(17202);const s={analysisTheme:{accentColor:[255,128,0],textColor:"white"},apiKey:void 0,applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",portalUrl:"https://www.arcgis.com",routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:6e4,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&((0,n.RH)(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="4.26.0";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}-next.${o.r}/assets`}s.defaultAssetsPath=s.assetsPath}},20102:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(22974),o=r(92604),s=r(58896);class i extends s.Z{constructor(e,t,r){if(super(e,t,r),!(this instanceof i))return new i(e,t,r)}toJSON(){if(null!=this.details)try{return{name:this.name,message:this.message,details:JSON.parse(JSON.stringify(this.details,((e,t)=>{if(t&&"object"==typeof t&&"function"==typeof t.toJSON)return t;try{return(0,n.d9)(t)}catch(e){return"[object]"}})))}}catch(e){throw o.Z.getLogger("esri.core.Error").error(e),e}return{name:this.name,message:this.message,details:this.details}}static fromJSON(e){return new i(e.name,e.message,e.details)}}i.prototype.type="error"},92604:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(68773),o=(r(80442),r(70586)),s=r(19153);const i={info:0,warn:1,error:2,none:3};class a{constructor(e){this.level=null,this._module="",this._parent=null,this.writer=null,this._loggedMessages={error:new Map,warn:new Map,info:new Map},null!=e.level&&(this.level=e.level),null!=e.writer&&(this.writer=e.writer),this._module=e.module,a._loggers[this.module]=this;const t=this.module.lastIndexOf(".");-1!==t&&(this._parent=a.getLogger(this.module.slice(0,t)))}get module(){return this._module}get parent(){return this._parent}error(...e){this._log("error","always",...e)}warn(...e){this._log("warn","always",...e)}info(...e){this._log("info","always",...e)}errorOnce(...e){this._log("error","once",...e)}warnOnce(...e){this._log("warn","once",...e)}infoOnce(...e){this._log("info","once",...e)}errorOncePerTick(...e){this._log("error","oncePerTick",...e)}warnOncePerTick(...e){this._log("warn","oncePerTick",...e)}infoOncePerTick(...e){this._log("info","oncePerTick",...e)}get test(){const e=this;return{loggedMessages:e._loggedMessages,clearLoggedWarnings:()=>e._loggedMessages.warn.clear()}}static get testSingleton(){return{resetLoggers(e={}){const t=a._loggers;return a._loggers=e,t},set throttlingDisabled(e){a._throttlingDisabled=e}}}static getLogger(e){let t=a._loggers[e];return t||(t=new a({module:e})),t}_log(e,t,...r){if(this._matchLevel(e)){if("always"!==t&&!a._throttlingDisabled){const n=this._argsToKey(r),o=this._loggedMessages[e].get(n);if("once"===t&&null!=o||"oncePerTick"===t&&o&&o>=a._tickCounter)return;this._loggedMessages[e].set(n,a._tickCounter),a._scheduleTickCounterIncrement()}for(const t of n.Z.log.interceptors)if(t(e,this.module,...r))return;this._inheritedWriter()(e,this.module,...r)}}_parentWithMember(e,t){let r=this;for(;(0,o.pC)(r);){const t=r[e];if((0,o.pC)(t))return t;r=r.parent}return t}_inheritedWriter(){return this._parentWithMember("writer",this._consoleWriter)}_consoleWriter(e,t,...r){console[e](`[${t}]`,...r)}_matchLevel(e){const t=n.Z.log.level?n.Z.log.level:"warn";return i[this._parentWithMember("level",t)]<=i[e]}_argsToKey(...e){return(0,s.hP)(JSON.stringify(e,((e,t)=>"object"!=typeof t||Array.isArray(t)?t:"[Object]")))}static _scheduleTickCounterIncrement(){a._tickCounterScheduled||(a._tickCounterScheduled=!0,Promise.resolve().then((()=>{a._tickCounter++,a._tickCounterScheduled=!1})))}}a._loggers={},a._tickCounter=0,a._tickCounterScheduled=!1,a._throttlingDisabled=!1},58896:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(78286);class o{constructor(e,t,r){this.name=e,this.details=r,this instanceof o&&(this.message=(t&&function(e,t){return e.replace(/\$\{([^\s\:\}]*)(?:\:([^\s\:\}]+))?\}/g,((e,r)=>{if(""===r)return"$";const o=(0,n.hS)(r,t)??"";if(void 0===o)throw new Error(`could not find key "${r}" in template`);return o.toString()}))}(t,r))??"")}toString(){return"["+this.name+"]: "+this.message}}},77734:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});class n{constructor(e=1){this._seed=e}set seed(e){this._seed=e??Math.random()*n._m}getInt(){return this._seed=(n._a*this._seed+n._c)%n._m,this._seed}getFloat(){return this.getInt()/(n._m-1)}getIntRange(e,t){return Math.round(this.getFloatRange(e,t))}getFloatRange(e,t){const r=t-e;return e+this.getInt()/n._m*r}}n._m=2147483647,n._a=48271,n._c=0},67676:(e,t,r)=>{"use strict";r.d(t,{FY:()=>m,Od:()=>y,SO:()=>d,Vx:()=>i,a9:()=>u,cq:()=>p,e$:()=>b,e5:()=>a,fS:()=>s,w6:()=>f,zG:()=>c});var n=r(70586),o=r(77734);function s(e,t,r){if((0,n.Wi)(e)&&(0,n.Wi)(t))return!0;if((0,n.Wi)(e)||(0,n.Wi)(t)||e.length!==t.length)return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function i(e,t){let r=e.length!==t.length;r&&(e.length=t.length);for(let n=0;n<t.length;++n)e[n]!==t[n]&&(e[n]=t[n],r=!0);return r}function a(e,t,r){let n,o;return r?(n=t.filter((t=>!e.some((e=>r(e,t))))),o=e.filter((e=>!t.some((t=>r(t,e)))))):(n=t.filter((t=>!e.includes(t))),o=e.filter((e=>!t.includes(e)))),{added:n,removed:o}}function c(e){return e&&"number"==typeof e.length}const l=!!Array.prototype.fill;function u(e,t){if(l)return new Array(e).fill(t);const r=new Array(e);for(let n=0;n<e;n++)r[n]=t;return r}function f(e,t){void 0===t&&(t=e,e=0);const r=new Array(t-e);for(let n=e;n<t;n++)r[n-e]=n;return r}class d{constructor(){this.last=0}}const h=new d;function p(e,t,r,n){n=n||h;const o=Math.max(0,n.last-10);for(let s=o;s<r;++s)if(e[s]===t)return n.last=s,s;const s=Math.min(o,r);for(let r=0;r<s;++r)if(e[r]===t)return n.last=r,r;return-1}function b(e,t,r,n){const o=r??e.length,s=p(e,t,o,n);if(-1!==s)return e[s]=e[o-1],null==r&&e.pop(),t}const g=new Set;function m(e,t,r=e.length,n=t.length,o,s){if(0===n||0===r)return r;g.clear();for(let e=0;e<n;++e)g.add(t[e]);o=o||h;const i=Math.max(0,o.last-10);for(let t=i;t<r;++t)if(g.has(e[t])&&(s&&s.push(e[t]),g.delete(e[t]),e[t]=e[r-1],--r,--t,0===g.size||0===r))return g.clear(),r;for(let t=0;t<i;++t)if(g.has(e[t])&&(s&&s.push(e[t]),g.delete(e[t]),e[t]=e[r-1],--r,--t,0===g.size||0===r))return g.clear(),r;return g.clear(),r}function y(e,t){const r=e.indexOf(t);return-1!==r?(e.splice(r,1),t):null}new o.Z},60235:(e,t,r)=>{"use strict";r.d(t,{Mr:()=>i,x9:()=>a});var n=r(80442);const o=new Set;function s(e,t,r=!1){r&&o.has(t)||(r&&o.add(t),e.warn(`🛑 DEPRECATED - ${t}`))}function i(e,t,r={}){if((0,n.Z)("esri-deprecation-warnings")){const{moduleName:n}=r;a(e,"Property: "+(n?n+"::":"")+t,r)}}function a(e,t,r={}){if((0,n.Z)("esri-deprecation-warnings")){const{replacement:n,version:o,see:i,warnOnce:a}=r;let c=t;n&&(c+=`\n\t🛠️ Replacement: ${n}`),o&&(c+=`\n\t⚙️ Version: ${o}`),i&&(c+=`\n\t🔗 See ${i} for more details.`),s(e,c,a)}}},91460:(e,t,r)=>{"use strict";function n(e){return e&&("function"==typeof e.on||"function"==typeof e.addEventListener)}function o(e,t,r){if(!n(e))throw new TypeError("target is not a Evented or EventTarget object");if("on"in e)return e.on(t,r);if(Array.isArray(t)){const n=t.slice();for(const t of n)e.addEventListener(t,r);return{remove(){for(const t of n)e.removeEventListener(t,r)}}}return e.addEventListener(t,r),{remove(){e.removeEventListener(t,r)}}}function s(e,t,r){if(!n(e))throw new TypeError("target is not a Evented or EventTarget object");if("once"in e)return e.once(t,r);const s=o(e,t,(t=>{s.remove(),r.call(e,t)}));return{remove(){s.remove()}}}r.d(t,{IH:()=>s,on:()=>o,vT:()=>n})},80442:(e,t,r)=>{"use strict";let n;function o(e){return"function"==typeof n[e]?n[e]=n[e](globalThis):n[e]}r.d(t,{Z:()=>o}),n=globalThis.dojoConfig?.has||globalThis.esriConfig?.has?{...globalThis.dojoConfig?.has,...globalThis.esriConfig?.has}:{},o.add=(e,t,r,s)=>((s||void 0===n[e])&&(n[e]=t),r&&o(e)),o.cache=n,o.add("esri-deprecation-warnings",!0),(()=>{o.add("host-webworker",void 0!==globalThis.WorkerGlobalScope&&self instanceof globalThis.WorkerGlobalScope);const e="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(o.add("host-browser",e),o.add("host-node","object"==typeof globalThis.process&&globalThis.process.versions?.node&&globalThis.process.versions.v8),o.add("dom",e),o("host-browser")){const e=navigator,t=e.userAgent,r=e.appVersion,n=parseFloat(r);if(o.add("wp",parseFloat(t.split("Windows Phone")[1])||void 0),o.add("msapp",parseFloat(t.split("MSAppHost/")[1])||void 0),o.add("khtml",r.includes("Konqueror")?n:void 0),o.add("edge",parseFloat(t.split("Edge/")[1])||void 0),o.add("opr",parseFloat(t.split("OPR/")[1])||void 0),o.add("webkit",!o("wp")&&!o("edge")&&parseFloat(t.split("WebKit/")[1])||void 0),o.add("chrome",!o("edge")&&!o("opr")&&parseFloat(t.split("Chrome/")[1])||void 0),o.add("android",!o("wp")&&parseFloat(t.split("Android ")[1])||void 0),o.add("safari",!r.includes("Safari")||o("wp")||o("chrome")||o("android")||o("edge")||o("opr")?void 0:parseFloat(r.split("Version/")[1])),o.add("mac",r.includes("Macintosh")),!o("wp")&&t.match(/(iPhone|iPod|iPad)/)){const e=RegExp.$1.replace(/P/,"p"),r=t.match(/OS ([\d_]+)/)?RegExp.$1:"1",n=parseFloat(r.replace(/_/,".").replace(/_/g,""));o.add(e,n),o.add("ios",n)}o("webkit")||(!t.includes("Gecko")||o("wp")||o("khtml")||o("edge")||o.add("mozilla",n),o("mozilla")&&o.add("ff",parseFloat(t.split("Firefox/")[1]||t.split("Minefield/")[1])||void 0))}})(),(()=>{if(globalThis.navigator){const e=navigator.userAgent,t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),r=/iPhone/i.test(e);t&&o.add("esri-mobile",t),r&&o.add("esri-iPhone",r),o.add("esri-geolocation",!!navigator.geolocation)}o.add("esri-wasm","WebAssembly"in globalThis),o.add("esri-shared-array-buffer",(()=>{const e="SharedArrayBuffer"in globalThis,t=!1===globalThis.crossOriginIsolated;return e&&!t})),o.add("wasm-simd",(()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])))),o.add("esri-atomics","Atomics"in globalThis),o.add("esri-workers","Worker"in globalThis),o.add("web-feat:cache","caches"in globalThis),o.add("esri-workers-arraybuffer-transfer",!o("safari")||Number(o("safari"))>=12),o.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),o.add("featurelayer-simplify-payload-size-factors",[1,1,4]),o.add("featurelayer-snapshot-enabled",!0),o.add("featurelayer-snapshot-point-min-threshold",8e4),o.add("featurelayer-snapshot-point-max-threshold",4e5),o.add("featurelayer-snapshot-point-coverage",.1),o.add("featurelayer-advanced-symbols",!1),o.add("featurelayer-pbf",!0),o.add("featurelayer-pbf-statistics",!1),o.add("feature-layers-workers",!0),o.add("feature-polyline-generalization-factor",1),o.add("mapview-transitions-duration",200),o.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),o.add("mapserver-pbf-version-support",10.81),o.add("mapimagelayer-popup-identify-max-tolerance",20),o.add("heatmap-allow-raster-fallback",!0),o.add("heatmap-force-raster",!1),o("host-webworker")||o("host-browser")&&(o.add("esri-csp-restrictions",(()=>{try{new Function}catch{return!0}return!1})),o.add("esri-image-decode",(()=>{if("decode"in new Image){const e=new Image;return e.src='data:image/svg+xml;charset=UTF-8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg"></svg>',void e.decode().then((()=>{o.add("esri-image-decode",!0,!0,!0)})).catch((()=>{o.add("esri-image-decode",!1,!0,!0)}))}return!1})),o.add("esri-url-encodes-apostrophe",(()=>{const e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")})))})()},22974:(e,t,r)=>{"use strict";r.d(t,{Vo:()=>c,d9:()=>a,fS:()=>p,y7:()=>b,yd:()=>i});var n=r(67676),o=r(70586),s=r(1533);function i(e,t){let r;if(t)for(r in e)e.hasOwnProperty(r)&&(void 0===e[r]?delete e[r]:e[r]instanceof Object&&i(e[r],!0));else for(r in e)e.hasOwnProperty(r)&&void 0===e[r]&&delete e[r];return e}function a(e){if(!e||"object"!=typeof e||"function"==typeof e)return e;const t=h(e);if((0,o.pC)(t))return t;if(l(e))return e.clone();if(u(e))return e.map(a);if(f(e))return e.clone();const r={};for(const t of Object.getOwnPropertyNames(e))r[t]=a(e[t]);return r}function c(e){if(!e||"object"!=typeof e||"function"==typeof e||"HTMLElement"in globalThis&&e instanceof HTMLElement)return e;const t=h(e);if((0,o.pC)(t))return t;if(u(e)){let t=!0;const r=e.map((e=>{const r=c(e);return null!=e&&null==r&&(t=!1),r}));return t?r:null}if(l(e))return e.clone();if(!f(e)){const t=new(0,Object.getPrototypeOf(e).constructor);for(const r of Object.getOwnPropertyNames(e)){const n=e[r],o=c(n);if(null!=n&&null==o)return null;t[r]=o}return t}return null}function l(e){return"function"==typeof e.clone}function u(e){return"function"==typeof e.map&&"function"==typeof e.forEach}function f(e){return"function"==typeof e.notifyChange&&"function"==typeof e.watch}function d(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function h(e){if((0,s.W0)(e)||(0,s.lq)(e)||(0,s.KZ)(e)||(0,s.z3)(e)||(0,s.Uc)(e)||(0,s.Hx)(e)||(0,s.ZY)(e)||(0,s.xZ)(e)||(0,s.fS)(e))return e.slice();if(e instanceof Date)return new Date(e.getTime());if(e instanceof ArrayBuffer)return e.slice(0,e.byteLength);if(e instanceof Map){const t=new Map;for(const[r,n]of e)t.set(r,a(n));return t}if(e instanceof Set){const t=new Set;for(const r of e)t.add(a(r));return t}return null}function p(e,t){return e===t||"number"==typeof e&&isNaN(e)&&"number"==typeof t&&isNaN(t)||"function"==typeof(e||{}).getTime&&"function"==typeof(t||{}).getTime&&e.getTime()===t.getTime()||!1}function b(e,t){return e===t||(null==e||"string"==typeof e?e===t:"number"==typeof e?e===t||"number"==typeof t&&isNaN(e)&&isNaN(t):e instanceof Date?t instanceof Date&&e.getTime()===t.getTime():Array.isArray(e)?Array.isArray(t)&&(0,n.fS)(e,t):e instanceof Set?t instanceof Set&&function(e,t){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}(e,t):e instanceof Map?t instanceof Map&&function(e,t){if(e.size!==t.size)return!1;for(const[r,n]of e){const e=t.get(r);if(e!==n||void 0===e&&!t.has(r))return!1}return!0}(e,t):!!d(e)&&d(t)&&function(e,t){if(null===e||null===t)return!1;const r=Object.keys(e);if(null===t||Object.keys(t).length!==r.length)return!1;for(const n of r)if(e[n]!==t[n]||!Object.prototype.hasOwnProperty.call(t,n))return!1;return!0}(e,t))}},70586:(e,t,r)=>{"use strict";function n(e){return null!=e}function o(e){return null==e}function s(e,t){return n(e)?t(e):null}function i(e){return e}function a(e,t){return c(e,t),e}function c(e,t){if(o(e))throw new Error(t??"value is None")}function l(e,t){return n(e)?e:"function"==typeof t?t():t}function u(e,t){return n(e)?e:t}function f(e){return n(e)&&e.destroy(),null}function d(e){return n(e)&&e.dispose(),null}function h(e){return n(e)&&e.remove(),null}function p(e){return n(e)&&e.abort(),null}function b(e){return n(e)&&e.release(),null}function g(e,t,r){return n(e)&&n(t)?n(r)?r(e,t):e.equals(t):e===t}function m(e){return null}function y(e,t){const r=new Array;for(const n of e)r.push(v(n,null,t));return r}function w(e,t){for(const r of e)s(r,t)}function v(e,t,r){return n(e)?r(e):t}function _(e){return e.filter((e=>n(e)))}function O(e,...t){let r=e;for(let e=0;e<t.length&&r;++e)r=r[t[e]];return r}function k(e){return e}r.d(t,{Fd:()=>y,IM:()=>p,JR:()=>w,M2:()=>d,O3:()=>c,Pt:()=>l,R2:()=>v,RY:()=>b,SC:()=>f,U2:()=>O,Wg:()=>i,Wi:()=>o,_W:()=>g,hw:()=>h,j0:()=>k,lV:()=>_,pC:()=>n,s3:()=>a,wN:()=>m,yl:()=>u,yw:()=>s})},78286:(e,t,r)=>{"use strict";r.d(t,{RB:()=>i,RH:()=>o,hS:()=>s});var n=r(22974);function o(e,t,r=!1){return c(e,t,r)}function s(e,t){if(null!=t)return t[e]||a(e.split("."),!1,t)}function i(e,t,r){const n=e.split("."),o=n.pop(),s=a(n,!0,r);s&&o&&(s[o]=t)}function a(e,t,r){let n=r;for(const r of e){if(null==n)return;if(!(r in n)){if(!t)return;n[r]={}}n=n[r]}return n}function c(e,t,r){return t?Object.keys(t).reduce(((e,o)=>{let s=e[o],i=t[o];return s===i?e:void 0===s?(e[o]=(0,n.d9)(i),e):(Array.isArray(i)||Array.isArray(e)?(s=s?Array.isArray(s)?e[o]=s.concat():e[o]=[s]:e[o]=[],i&&(Array.isArray(i)||(i=[i]),r?i.forEach((e=>{s.includes(e)||s.push(e)})):e[o]=i.concat())):i&&"object"==typeof i?e[o]=c(s,i,r):e.hasOwnProperty(o)&&!t.hasOwnProperty(o)||(e[o]=i),e)}),e||{}):e}},95330:(e,t,r)=>{"use strict";r.d(t,{e4:()=>O,zE:()=>c,dD:()=>w,hh:()=>C,Ds:()=>P,as:()=>v,WW:()=>_,R8:()=>y,D_:()=>m,Hc:()=>f,y8:()=>k,fu:()=>p,$F:()=>b,r9:()=>d,k_:()=>l,H9:()=>h,Yn:()=>j,gx:()=>S,Hl:()=>g});const n=(o=globalThis,{setTimeout:(e,t)=>{const r=o.setTimeout(e,t);return{remove:()=>o.clearTimeout(r)}}});var o;r(60235);var s=r(20102),i=r(91460),a=(r(92604),r(70586));function c(e="Aborted"){return new s.Z("AbortError",e)}function l(e,t="Aborted"){if(f(e))throw c(t)}function u(e){return(0,a.pC)(e)?"aborted"in e?e:e.signal:e}function f(e){const t=u(e);return(0,a.pC)(t)&&t.aborted}function d(e){if(m(e))throw e}function h(e){if(!m(e))throw e}function p(e,t){const r=u(e);if(!(0,a.Wi)(r)){if(!r.aborted)return(0,i.IH)(r,"abort",(()=>t()));t()}}function b(e,t){const r=u(e);if(!(0,a.Wi)(r))return l(r),(0,i.IH)(r,"abort",(()=>t(c())))}function g(e,t){const r=u(t);return(0,a.Wi)(r)?e:new Promise(((r,n)=>{let o=p(t,(()=>n(c())));const s=()=>o=(0,a.hw)(o);e.then(s,s),e.then(r,n)}))}function m(e){return"AbortError"===e?.name}async function y(e){try{return await e}catch(e){if(!m(e))throw e;return}}function w(){let e=null;const t=new Promise(((t,r)=>{e={promise:void 0,resolve:t,reject:r}}));return e.promise=t,e}async function v(e){if(!e)return;if("function"!=typeof e.forEach){const t=Object.keys(e),r=t.map((t=>e[t])),n=await v(r),o={};return t.map(((e,t)=>o[e]=n[t])),o}const t=e;return new Promise((e=>{const r=[];let n=t.length;0===n&&e(r),t.forEach((t=>{const o={promise:t||Promise.resolve(t)};r.push(o),o.promise.then((e=>{o.value=e})).catch((e=>{o.error=e})).then((()=>{--n,0===n&&e(r)}))}))}))}async function _(e){return(await v(e)).filter((e=>!!e.value)).map((e=>e.value))}function O(e,t,r){const n=new AbortController;return p(r,(()=>n.abort())),new Promise(((r,o)=>{let s=setTimeout((()=>{s=0,r(t)}),e);p(n,(()=>{s&&(clearTimeout(s),o(c()))}))}))}function k(e){return e&&"function"==typeof e.then}function S(e){return k(e)?e:Promise.resolve(e)}function P(e,t=-1){let r,n,o,s,i=null;const l=(...u)=>{if(r){n=u,s&&s.reject(c()),s=w();const e=(0,a.j0)(s.promise);if(i){const e=i;i=null,e.abort()}return e}if(o=s||w(),s=null,t>0){const n=new AbortController;r=S(e(...u,n.signal));const o=r;O(t).then((()=>{r===o&&(s?n.abort():i=n)}))}else r=1,r=S(e(...u));const f=()=>{const e=n;n=o=r=i=null,null!=e&&l(...e)},d=r,h=o;return d.then(f,f),d.then(h.resolve,h.reject),(0,a.j0)(h.promise)};return l}function C(){let e,t;const r=new Promise(((r,n)=>{e=r,t=n})),o=t=>{e(t)};return o.resolve=t=>e(t),o.reject=e=>t(e),o.timeout=(e,t)=>n.setTimeout((()=>o.reject(t)),e),o.promise=r,o}async function j(e){await Promise.resolve(),l(e)}},19153:(e,t,r)=>{"use strict";r.d(t,{Cb:()=>l,Qs:()=>a,gx:()=>i,hP:()=>c});var n=r(78286);const o=/\{([^\}]+)\}/g;function s(e){return e??""}function i(e,t){return e.replace(o,"object"==typeof t?(e,r)=>s((0,n.hS)(r,t)):(e,r)=>s(t(r)))}function a(e,t){return e.replace(/([\.$?*|{}\(\)\[\]\\\/\+\-^])/g,(e=>t&&t.includes(e)?e:`\\${e}`))}function c(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t}function l(e){return(new DOMParser).parseFromString(e||"","text/html").body.innerText||""}},1533:(e,t,r)=>{"use strict";function n(e){return e instanceof ArrayBuffer}function o(e){return e&&e.constructor&&"Int8Array"===e.constructor.name}function s(e){return e&&e.constructor&&"Uint8Array"===e.constructor.name}function i(e){return e&&e.constructor&&"Uint8ClampedArray"===e.constructor.name}function a(e){return e&&e.constructor&&"Int16Array"===e.constructor.name}function c(e){return e&&e.constructor&&"Uint16Array"===e.constructor.name}function l(e){return e&&e.constructor&&"Int32Array"===e.constructor.name}function u(e){return e&&e.constructor&&"Uint32Array"===e.constructor.name}function f(e){return e&&e.constructor&&"Float32Array"===e.constructor.name}function d(e){return e&&e.constructor&&"Float64Array"===e.constructor.name}r.d(t,{DB:()=>h,Hx:()=>l,KZ:()=>i,Uc:()=>c,W0:()=>o,ZY:()=>u,eP:()=>n,fS:()=>d,lq:()=>s,xZ:()=>f,z3:()=>a});const h=1024},17452:(e,t,r)=>{"use strict";r.d(t,{$U:()=>ne,AH:()=>V,B7:()=>j,D6:()=>L,Fv:()=>F,HK:()=>K,Hu:()=>de,Ie:()=>ue,L:()=>k,Ml:()=>be,P$:()=>B,PF:()=>Z,Qj:()=>le,R9:()=>y,TI:()=>O,YP:()=>H,Yd:()=>ae,ZN:()=>he,_l:()=>X,b7:()=>E,ed:()=>N,fZ:()=>ge,fl:()=>pe,hF:()=>q,hO:()=>oe,io:()=>ee,jc:()=>z,kl:()=>U,mN:()=>S,oC:()=>te,oh:()=>W,qg:()=>T,rS:()=>Q,sJ:()=>Y,tD:()=>$,tm:()=>I,u0:()=>P,v_:()=>D,vt:()=>ce});var n=r(68773),o=r(20102),s=r(92604),i=r(70586);const a=s.Z.getLogger("esri.core.urlUtils"),c=n.Z.request,l="esri/config: esriConfig.request.proxyUrl is not set.",u=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,f=/^\s*http:/i,d=/^\s*https:/i,h=/^\s*file:/i,p=/:\d+$/,b=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i,g=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),m=new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$");class y{constructor(e=""){this.uri=e,this.scheme=null,this.authority=null,this.path=null,this.query=null,this.fragment=null,this.user=null,this.password=null,this.host=null,this.port=null;let t=(0,i.j0)(this.uri.match(g));this.scheme=t[2]||(t[1]?"":null),this.authority=t[4]||(t[3]?"":null),this.path=t[5],this.query=t[7]||(t[6]?"":null),this.fragment=t[9]||(t[8]?"":null),null!=this.authority&&(t=(0,i.j0)(this.authority.match(m)),this.user=t[3]||null,this.password=t[4]||null,this.host=t[6]||t[7],this.port=t[9]||null)}toString(){return this.uri}}const w={};let v=new y(n.Z.applicationUrl);let _=function(){const e=(0,i.j0)(v.path),t=e.substring(0,e.lastIndexOf(e.split("/")[e.split("/").length-1]));return`${v.scheme}://${v.host}${null!=v.port?`:${v.port}`:""}${t}`}();const O=()=>v,k=()=>_;function S(e){if(!e)return null;const t={path:null,query:null},r=new y(e),n=e.indexOf("?");return null===r.query?t.path=e:(t.path=e.substring(0,n),t.query=P(r.query)),r.fragment&&(t.hash=r.fragment,null===r.query&&(t.path=t.path.substring(0,t.path.length-(r.fragment.length+1)))),t}function P(e){const t=e.split("&"),r={};for(const e of t){if(!e)continue;const t=e.indexOf("=");let n,o;t<0?(n=decodeURIComponent(e),o=""):(n=decodeURIComponent(e.slice(0,t)),o=decodeURIComponent(e.slice(t+1)));let s=r[n];"string"==typeof s&&(s=r[n]=[s]),Array.isArray(s)?s.push(o):r[n]=o}return r}function C(e){return e&&"object"==typeof e&&"toJSON"in e&&"function"==typeof e.toJSON}function j(e,t){return e?t&&"function"==typeof t?Object.keys(e).map((r=>encodeURIComponent(r)+"="+encodeURIComponent(t(r,e[r])))).join("&"):Object.keys(e).map((r=>{const n=e[r];if(null==n)return"";const o=encodeURIComponent(r)+"=",s=t&&t[r];return s?o+encodeURIComponent(s(n)):Array.isArray(n)?n.map((e=>C(e)?o+encodeURIComponent(JSON.stringify(e)):o+encodeURIComponent(e))).join("&"):C(n)?o+encodeURIComponent(JSON.stringify(n)):o+encodeURIComponent(n)})).filter((e=>e)).join("&"):""}function E(e=!1){let t,r=c.proxyUrl;if("string"==typeof e){t=ne(e);const n=N(e);n&&(r=n.proxyUrl)}else t=!!e;if(!r)throw a.warn(l),new o.Z("urlutils:proxy-not-set",l);return t&&se()&&(r=oe(r)),S(r)}function T(e){const t=N(e);let r,n;if(t){const e=A(t.proxyUrl);r=e.path,n=e.query?P(e.query):null}if(r){const t=S(e);e=r+"?"+t.path;const o=j({...n,...t.query});o&&(e=`${e}?${o}`)}return e}const x={path:"",query:""};function A(e){const t=e.indexOf("?");return-1!==t?(x.path=e.slice(0,t),x.query=e.slice(t+1)):(x.path=e,x.query=null),x}function M(e){return(e=ie(e=function(e){return e&&"/"===e[e.length-1]?e:`${e}/`}(e=A(e).path),!0)).toLowerCase()}function $(e){const t={proxyUrl:e.proxyUrl,urlPrefix:M(e.urlPrefix)},r=c.proxyRules,n=t.urlPrefix;let o=r.length;for(let e=0;e<r.length;e++){const t=r[e].urlPrefix;if(0===n.indexOf(t)){if(n.length===t.length)return-1;o=e;break}0===t.indexOf(n)&&(o=e+1)}return r.splice(o,0,t),o}function N(e){const t=c.proxyRules,r=M(e);for(let e=0;e<t.length;e++)if(0===r.indexOf(t[e].urlPrefix))return t[e]}function I(e,t){return e=R(e),t=R(t),ie(e)===ie(t)}function R(e){const t=(e=F(e)).indexOf("/sharing");return t>0?e.substring(0,t):e.replace(/\/+$/,"")}function W(e){const t=t=>null==t||t instanceof RegExp&&t.test(e)||"string"==typeof t&&e.startsWith(t),r=c.interceptors;if(r)for(const e of r)if(Array.isArray(e.urls)){if(e.urls.some(t))return e}else if(t(e.urls))return e;return null}function L(e,t,r=!1){if(!e||!t)return!1;const n=fe(e),o=fe(t);return!(!r&&n.scheme!==o.scheme)&&null!=n.host&&null!=o.host&&n.host.toLowerCase()===o.host.toLowerCase()&&n.port===o.port}function U(e){if("string"==typeof e){if(!H(e))return!0;e=fe(e)}if(L(e,v))return!0;const t=c.trustedServers||[];for(let r=0;r<t.length;r++){const n=J(t[r]);for(let t=0;t<n.length;t++)if(L(e,n[t]))return!0}return!1}function J(e){return w[e]||(re(e)||te(e)?w[e]=[new y(q(e))]:w[e]=[new y(`http://${e}`),new y(`https://${e}`)]),w[e]}function q(e,t=_,r){return te(e)?r&&r.preserveProtocolRelative?e:"http"===v.scheme&&v.authority===B(e).slice(2)?`http:${e}`:`https:${e}`:re(e)?e:(0,i.j0)(D("/"===e[0]?function(e){const t=e.indexOf("//"),r=e.indexOf("/",t+2);return-1===r?e:e.slice(0,r)}(t):t,e))}function Z(e,t=_,r){if(null==e||!H(e))return e;const n=F(e),o=n.toLowerCase(),s=F(t).toLowerCase().replace(/\/+$/,""),i=r?F(r).toLowerCase().replace(/\/+$/,""):null;if(i&&0!==s.indexOf(i))return e;const a=(e,t,r)=>-1===(r=e.indexOf(t,r))?e.length:r;let c=a(o,"/",o.indexOf("//")+2),l=-1;for(;o.slice(0,c+1)===s.slice(0,c)+"/"&&(l=c+1,c!==o.length);)c=a(o,"/",c+1);if(-1===l)return e;if(i&&l<i.length)return e;e=n.slice(l);const u=s.slice(l-1).replace(/[^/]+/g,"").length;if(u>0)for(let t=0;t<u;t++)e=`../${e}`;else e=`./${e}`;return e}function F(e){return function(e){const t=c.httpsDomains;if(!function(e){return null!=e&&f.test(e)||"http"===v.scheme&&te(e)}(e))return e;const r=e.indexOf("/",7);let n;if(n=-1===r?e:e.slice(0,r),n=n.toLowerCase().slice(7),p.test(n)){if(!n.endsWith(":80"))return e;n=n.slice(0,-3),e=e.replace(":80","")}return"http"===v.scheme&&n===v.authority&&!b.test(e)||(se()&&n===v.authority||t&&t.some((e=>n===e||n.endsWith(`.${e}`)))||se()&&!N(e))&&(e=oe(e)),e}(e=function(e){return e.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2")}(e=function(e){if(/^https?:\/\//i.test(e)){const t=A(e);e=(e=t.path.replace(/\/{2,}/g,"/")).replace("/","//"),t.query&&(e+=`?${t.query}`)}return e}(e=q(e=e.trim()))))}function D(...e){const t=e.filter(i.pC);if(!t||!t.length)return;const r=[];if(H(t[0])){const e=t[0],n=e.indexOf("//");-1!==n&&(r.push(e.slice(0,n+1)),function(e){return null!=e&&h.test(e)}(t[0])&&(r[0]+="/"),t[0]=e.slice(n+2))}else"/"===t[0][0]&&r.push("");const n=t.reduce(((e,t)=>t?e.concat(t.split("/")):e),[]);for(let e=0;e<n.length;e++){const t=n[e];".."===t&&r.length>0&&".."!==r[r.length-1]?r.pop():(!t&&e===n.length-1||t&&("."!==t||0===r.length))&&r.push(t)}return r.join("/")}function B(e,t=!1){if(null==e||z(e)||K(e))return null;let r=e.indexOf("://");if(-1===r&&te(e))r=2;else{if(-1===r)return null;r+=3}const n=e.indexOf("/",r);return-1!==n&&(e=e.slice(0,n)),t&&(e=ie(e,!0)),e}function H(e){return te(e)||re(e)}function z(e){return null!=e&&"blob:"===e.slice(0,5)}function K(e){return null!=e&&"data:"===e.slice(0,5)}function V(e){const t=Y(e);if(!t||!t.isBase64)return null;const r=atob(t.data),n=new Uint8Array(r.length);for(let e=0;e<r.length;e++)n[e]=r.charCodeAt(e);return n.buffer}function Q(e){return btoa(String.fromCharCode.apply(null,e)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}const G=/^data:(.*?)(;base64)?,(.*)$/;function Y(e){const t=e.match(G);if(!t)return null;const[,r,n,o]=t;return{mediaType:r,isBase64:!!n,data:o}}function X(e){return e.isBase64?`data:${e.mediaType};base64,${e.data}`:`data:${e.mediaType},${e.data}`}function ee(e,t){(function(e,t){if(!e)return!1;const r=document.createElement("a");if(!("download"in r))return!1;const n=URL.createObjectURL(e);return r.download=t,r.href=n,r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n),!0})(e,t)||function(e,t){!!window.navigator.msSaveOrOpenBlob&&window.navigator.msSaveOrOpenBlob(e,t)}(e,t)}function te(e){return null!=e&&"/"===e[0]&&"/"===e[1]}function re(e){return null!=e&&u.test(e)}function ne(e){return null!=e&&d.test(e)||"https"===v.scheme&&te(e)}function oe(e){return te(e)?`https:${e}`:e.replace(f,"https:")}function se(){return"https"===v.scheme}function ie(e,t=!1){return te(e)?e.slice(2):(e=e.replace(u,""),t&&e.length>1&&"/"===e[0]&&"/"===e[1]&&(e=e.slice(2)),e)}function ae(e){let t=0;if(H(e)){const r=e.indexOf("//");-1!==r&&(t=r+2)}const r=e.lastIndexOf("/");return r<t?e:e.slice(0,r+1)}function ce(e,t){if(!e)return"";const r=S(e).path.replace(/\/+$/,""),n=r.substring(r.lastIndexOf("/")+1);if(!t?.length)return n;const o=new RegExp(`.(${t.join("|")})$`,"ig");return n.replace(o,"")}function le(e){return e.replace(/\/+$/,"")}function ue(e,t,r){if(!(t&&r&&e&&H(e)))return e;const n=e.indexOf("//"),o=e.indexOf("/",n+2),s=e.indexOf(":",n+2),i=Math.min(o<0?e.length:o,s<0?e.length:s);return e.slice(n+2,i).toLowerCase()!==t.toLowerCase()?e:`${e.slice(0,n+2)}${r}${e.slice(i)}`}function fe(e){return"string"==typeof e?new y(q(e)):(e.scheme||(e.scheme=v.scheme),e)}function de(e,t){const r=S(e),n=Object.keys(r.query||{});return n.length>0&&t&&t.warn("removeQueryParameters()",`Url query parameters are not supported, the following parameters have been removed: ${n.join(", ")}.`),r.path}function he(e,t,r){const n=S(e),o=n.query||{};return o[t]=String(r),`${n.path}?${j(o)}`}function pe(e,t){const r=S(e),n=r.query||{};for(const e in t)n[e]=t[e];const o=j(n);return o?`${r.path}?${o}`:r.path}function be(e){if((0,i.Wi)(e))return null;const t=e.match(me);return t?t[2]:null}function ge(e){if((0,i.Wi)(e))return null;const t=e.match(me);return t?{path:t[1],extension:t[2]}:{path:e,extension:null}}const me=/([^.]*)\.([^\/]*)$/},25045:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>y});var n=r(40330),o=r(20102),s=r(91460),i=r(70586),a=r(95330),c=r(94362),l=r(17202);const u={statsWorker:()=>Promise.all([r.e(1400),r.e(1562),r.e(3847),r.e(6841)]).then(r.bind(r,36841)),geometryEngineWorker:()=>Promise.all([r.e(5837),r.e(8227)]).then(r.bind(r,48227)),CSVSourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1534),r.e(1562),r.e(5886),r.e(3847),r.e(9777),r.e(8833),r.e(4807),r.e(7154)]).then(r.bind(r,27793)),EdgeProcessingWorker:()=>Promise.all([r.e(6481),r.e(212),r.e(2062)]).then(r.bind(r,49594)),ElevationSamplerWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(4807),r.e(6481),r.e(6459),r.e(98)]).then(r.bind(r,61787)),FeatureServiceSnappingSourceWorker:()=>Promise.all([r.e(4547),r.e(5795),r.e(1400),r.e(1534),r.e(1562),r.e(4599),r.e(5886),r.e(3847),r.e(9777),r.e(8833),r.e(4807),r.e(3660)]).then(r.bind(r,65967)),GeoJSONSourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1534),r.e(1562),r.e(5886),r.e(3847),r.e(9777),r.e(8833),r.e(4807),r.e(7774),r.e(7845)]).then(r.bind(r,97845)),LercWorker:()=>r.e(3027).then(r.bind(r,23027)),MemorySourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1534),r.e(1562),r.e(5886),r.e(3847),r.e(9777),r.e(8833),r.e(4807),r.e(7774),r.e(639)]).then(r.bind(r,30639)),PBFDecoderWorker:()=>Promise.all([r.e(1400),r.e(1562),r.e(5886),r.e(1916)]).then(r.bind(r,61916)),Pipeline:()=>Promise.all([r.e(4547),r.e(4321),r.e(5795),r.e(1400),r.e(1534),r.e(1562),r.e(4599),r.e(5886),r.e(3847),r.e(9777),r.e(8833),r.e(4325),r.e(7483)]).then(r.bind(r,37138)),PointCloudWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(9324)]).then(r.bind(r,90447)),RasterWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(8363),r.e(3645),r.e(4370)]).then(r.bind(r,61576)),SceneLayerSnappingSourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1534),r.e(1562),r.e(5886),r.e(3847),r.e(9777),r.e(6481),r.e(212),r.e(1391)]).then(r.bind(r,73248)),SceneLayerWorker:()=>r.e(1412).then(r.bind(r,31412)),WFSSourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1534),r.e(1562),r.e(5886),r.e(3847),r.e(9777),r.e(8833),r.e(4807),r.e(7774),r.e(3230)]).then(r.bind(r,43230)),WorkerTileHandler:()=>Promise.all([r.e(4325),r.e(1785),r.e(6810),r.e(3388)]).then(r.bind(r,56456))},{CLOSE:f,ABORT:d,INVOKE:h,RESPONSE:p,OPEN_PORT:b,ON:g}=c.Cs;class m{constructor(e){this._timer=null,this._cancelledJobIds=new Set,this._invokeMessages=[],this._invoke=e,this._timer=null,this._process=this._process.bind(this)}push(e){e.type===c.Cs.ABORT?this._cancelledJobIds.add(e.jobId):(this._invokeMessages.push(e),null===this._timer&&(this._timer=setTimeout(this._process,0)))}clear(){this._invokeMessages.length=0,this._cancelledJobIds.clear(),this._timer=null}_process(){this._timer=null;for(const e of this._invokeMessages)this._cancelledJobIds.has(e.jobId)||this._invoke(e);this._cancelledJobIds.clear(),this._invokeMessages.length=0}}class y{static connect(e){const t=new MessageChannel;let r;r="function"==typeof e?new e:"default"in e&&"function"==typeof e.default?new e.default:e;const n=new y(t.port1,{channel:t,client:r},(()=>null));return"object"==typeof r&&"remoteClient"in r&&(r.remoteClient=n),y.clients.set(n,r),t.port2}static loadWorker(e){const t=u[e];return t?t():Promise.resolve(null)}constructor(e,t,r){this._port=e,this._getNextJob=r,this._outJobs=new Map,this._inJobs=new Map,this._invokeQueue=new m((e=>this._onInvokeMessage(e))),this._client=t.client,this._onMessage=this._onMessage.bind(this),this._channel=t.channel,this._schedule=t.schedule,this._port.addEventListener("message",this._onMessage),this._port.start()}close(){this._post({type:f}),this._close()}isBusy(){return this._outJobs.size>0}invoke(e,t,r){const n=r&&r.signal,s=r&&r.transferList;if(!this._port)return Promise.reject(new o.Z("worker:port-closed",`Cannot call invoke('${e}'), port is closed`,{methodName:e,data:t}));const l=(0,c.jt)();return new Promise(((r,o)=>{if((0,a.Hc)(n))return this._processWork(),void o((0,a.zE)());const c=(0,a.fu)(n,(()=>{const e=this._outJobs.get(l);e&&(this._outJobs.delete(l),this._processWork(),(0,i.hw)(e.abortHandle),this._post({type:d,jobId:l}),o((0,a.zE)()))})),u={resolve:r,reject:o,abortHandle:c,debugInfo:e};this._outJobs.set(l,u),this._post({type:h,jobId:l,methodName:e,abortable:null!=n},t,s)}))}on(e,t){const r=new MessageChannel;function n(e){t(e.data)}return this._port.postMessage({type:c.Cs.ON,eventType:e,port:r.port2},[r.port2]),r.port1.addEventListener("message",n),r.port1.start(),{remove(){r.port1.postMessage({type:c.Cs.CLOSE}),r.port1.close(),r.port1.removeEventListener("message",n)}}}jobAdded(){this._processWork()}openPort(){const e=new MessageChannel;return this._post({type:b,port:e.port2}),e.port1}_processWork(){if(this._outJobs.size>=2)return;const e=this._getNextJob();if(!e)return;const{methodName:t,data:r,invokeOptions:n,deferred:o}=e;this.invoke(t,r,n).then((e=>o.resolve(e))).catch((e=>o.reject(e)))}_close(){this._channel&&(this._channel=void 0),this._port.removeEventListener("message",this._onMessage),this._port.close(),this._outJobs.forEach((e=>{(0,i.hw)(e.abortHandle),e.reject((0,a.zE)(`Worker closing, aborting job calling '${e.debugInfo}'`))})),this._inJobs.clear(),this._outJobs.clear(),this._invokeQueue.clear(),this._port=this._client=this._schedule=null}_onMessage(e){(0,i.pC)(this._schedule)?this._schedule((()=>this._processMessage(e))):this._processMessage(e)}_processMessage(e){const t=(0,c.QM)(e);if(t)switch(t.type){case p:this._onResponseMessage(t);break;case h:this._invokeQueue.push(t);break;case d:this._onAbortMessage(t);break;case f:this._onCloseMessage();break;case b:this._onOpenPortMessage(t);break;case g:this._onOnMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,n=t.get(r);this._invokeQueue.push(e),n&&(n.controller&&n.controller.abort(),t.delete(r))}_onCloseMessage(){const e=this._client;this._close(),e&&"destroy"in e&&y.clients.get(this)===e&&e.destroy(),y.clients.delete(this),e&&e.remoteClient&&(e.remoteClient=null)}_onInvokeMessage(e){const{methodName:t,jobId:r,data:n,abortable:o}=e,s=o?new AbortController:null,i=this._inJobs;let l,u=this._client,f=u[t];try{if(!f&&t&&t.includes(".")){const e=t.split(".");for(let t=0;t<e.length-1;t++)u=u[e[t]],f=u[e[t+1]]}if("function"!=typeof f)throw new TypeError(`${t} is not a function`);l=f.call(u,n,{client:this,signal:s?s.signal:null})}catch(e){return void this._post({type:p,jobId:r,error:(0,c.AB)(e)})}(0,a.y8)(l)?(i.set(r,{controller:s,promise:l}),l.then((e=>{i.has(r)&&(i.delete(r),this._post({type:p,jobId:r},e))}),(e=>{i.has(r)&&(i.delete(r),(0,a.D_)(e)||this._post({type:p,jobId:r,error:(0,c.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:p,jobId:r},l)}_onOpenPortMessage(e){new y(e.port,{client:this._client},(()=>null))}_onOnMessage(e){const{port:t}=e,r=this._client.on(e.eventType,(e=>{t.postMessage(e)})),n=(0,s.on)(e.port,"message",(e=>{(0,c.QM)(e)?.type===c.Cs.CLOSE&&(n.remove(),r.remove(),t.close())}))}_onResponseMessage(e){const{jobId:t,error:r,data:n}=e,s=this._outJobs;if(!s.has(t))return;const a=s.get(t);s.delete(t),this._processWork(),(0,i.hw)(a.abortHandle),r?a.reject(o.Z.fromJSON(JSON.parse(r))):a.resolve(n)}_post(e,t,r){return(0,c.oi)(this._port,e,t,r)}}y.kernelInfo={revision:l.$,version:n.i8,buildDate:l.r},y.clients=new Map},94362:(e,t,r)=>{"use strict";r.d(t,{AB:()=>a,Cs:()=>n,QM:()=>l,jt:()=>i,oi:()=>c});var n,o=r(80442);!function(e){e[e.HANDSHAKE=0]="HANDSHAKE",e[e.OPEN=1]="OPEN",e[e.OPENED=2]="OPENED",e[e.RESPONSE=3]="RESPONSE",e[e.INVOKE=4]="INVOKE",e[e.ABORT=5]="ABORT",e[e.CLOSE=6]="CLOSE",e[e.OPEN_PORT=7]="OPEN_PORT",e[e.ON=8]="ON"}(n||(n={}));let s=0;function i(){return s++}function a(e){return e?"string"==typeof e?JSON.stringify({name:"message",message:e}):e.toJSON?JSON.stringify(e):JSON.stringify({name:e.name,message:e.message,details:e.details||{stack:e.stack}}):null}function c(e,t,r,s){if(t.type===n.OPEN_PORT)return void e.postMessage(t,[t.port]);if(t.type!==n.INVOKE&&t.type!==n.RESPONSE)return void e.postMessage(t);let i;if(function(e){return e&&"object"==typeof e&&("result"in e||"transferList"in e)}(r)?(i=u(r.transferList),t.data=r.result):(i=u(s),t.data=r),i){if((0,o.Z)("ff"))for(const r of i)if("byteLength"in r&&r.byteLength>267386880){const r="Worker call with large ArrayBuffer would crash Firefox";switch(t.type){case n.INVOKE:throw r;case n.RESPONSE:return void c(e,{type:n.RESPONSE,jobId:t.jobId,error:a(r)})}}e.postMessage(t,i)}else e.postMessage(t)}function l(e){if(!e)return null;const t=e.data;return t?"string"==typeof t?JSON.parse(t):t:null}function u(e){if(!e||!e.length)return null;if((0,o.Z)("esri-workers-arraybuffer-transfer"))return e;const t=e.filter((e=>!function(e){return e instanceof ArrayBuffer||e&&e.constructor&&"ArrayBuffer"===e.constructor.name}(e)));return t.length?t:null}},40330:(e,t,r)=>{"use strict";r.d(t,{Dp:()=>l,Nv:()=>i,i8:()=>s,id:()=>a,qh:()=>c});var n=r(80442),o=r(17452);const s="4.26",i={async request(e,t){const{default:n}=await r.e(3172).then(r.bind(r,3172)),s=e.options,i=s.responseType;s.signal=t?.signal,s.responseType="native"===i||"native-request-init"===i?"native-request-init":i&&["blob","json","text"].includes(i)&&(0,o.oh)(e.url)?.after?i:"array-buffer";const a=await n(e.url,s),c={data:a.data,ssl:a.ssl};switch(a.requestOptions?.responseType){case"native-request-init":return delete c.data.signal,c;case"blob":c.data=await c.data.arrayBuffer();break;case"json":c.data=(new TextEncoder).encode(JSON.stringify(c.data)).buffer;break;case"text":c.data=(new TextEncoder).encode(c.data).buffer}return{result:c,transferList:[c.data]}}};let a;function c(e){a=e}function l(e){const t=a&&a.findCredential(e);return t&&t.token?(0,o.ZN)(e,"token",t.token):e}(0,n.Z)("host-webworker")},17202:(e,t,r)=>{"use strict";r.d(t,{$:()=>o,r:()=>n});const n="20221221",o="160f62fdfa8a5975504cb68e652f8b4dce2fbec6"}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,r),s.exports}r.m=e,r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((t,n)=>(r.f[n](e,t),t)),[])),r.u=e=>"chunks/"+{9:"cd14babd690c96985b05",81:"74d86e7e5ec52a2f6018",98:"74ff8c8f40d2e9c3868b",212:"f3f2759b39ab76cde66c",223:"acf800382cbcd4875865",247:"9d9e3a38c54c41f7764c",402:"1cbffa96ea6683e5f3ec",540:"96536f507bc6e501a4f7",565:"e967ffca641947212992",576:"5ec4fedbbcbb0053cf74",632:"099765dff2b7e6958d3d",639:"e048641971aef9dd4da9",661:"0419bb1a147a2c464980",690:"ee91401507833875facc",739:"5983c9f28b7f63c7e1e0",759:"1b0a306176cc184e6926",819:"d1ead6e8aa7e8e21fbc6",837:"38d8d7e5ae339230dd99",908:"a80a9c725c06154ba415",911:"2187672a72e776b9b153",1070:"d9bc849d04147471aa31",1073:"7bc7b6cf75771687d81f",1074:"fa059d94d5051ded85b3",1158:"3714482f3a829d122da1",1227:"89003e387684af5ebeac",1391:"7e4a136131693bd4f77b",1400:"87579d06ffd2a491f7e2",1412:"b78e50c03cd33623eb62",1421:"106329846470141953ad",1423:"d431821ed03a6e7f4fd3",1433:"4d5bdf18feeb9c8cb6ff",1534:"1cf86638f8e097d8e6e2",1545:"c2c288d42129354dc218",1562:"a082bd3e6c6cbae3dba4",1612:"42f2ba5a86c10e50e94e",1761:"fc197a387187daab1df3",1773:"6ecca49fdba2618fb972",1785:"c815d4e0fa4f3ad201b6",1790:"3a00f94f8f0d49c60969",1916:"bbccf69f4aa1b1761265",1932:"d0807ae56d1e9d187af3",2062:"072f5a672171424668eb",2133:"9b1034ae5cd818ed279c",2134:"edc08ffed2d5bb161c8d",2422:"43f6aa5c6f6a2bf316ef",2592:"3a306358d1e76659f4ca",2664:"06ef2a1a43b2b0b66086",2710:"719ee5c4a064ea9bdfcf",2855:"0877bab7c03a1de2e713",3027:"c1ef0d8977c5c19b135f",3055:"a51c2c5d3e7f764f44d5",3172:"52b6711572ac7e058ce6",3230:"e3fd383aee378cbb0dae",3388:"f45ea484e96f44d69b20",3529:"b1bc79cc01b572f05ca1",3572:"3b689bb038ebc301c3b2",3645:"c9d57014385bff9d0b06",3660:"7f3ac66cee7e68ce945e",3668:"80c7726743baf9f54079",3743:"3c505cf66d538f84ce4b",3810:"6b589f47cb4731df1639",3847:"937a39fa2b24ab80fd13",3852:"d4338bc4a99b71c44dc2",3929:"ccbd36c83dc087b07f1c",3992:"4a2b4574b87be7b98481",4046:"ceb1770ed82fcbf72531",4166:"5f61db625e7f836f96c3",4242:"25f51196669db91dc5fc",4268:"7142779efc4ddba0fb82",4321:"21cc98b592871d141f97",4325:"e95e449c3fab1a03498c",4358:"eab47a18717478014e03",4370:"036384bab7511be0d209",4371:"4b56a15d904a64747e64",4475:"365372b903d5715bf9b7",4499:"423955dd5f10692daf3b",4547:"f2e5c6b7894793b8bd7d",4599:"bb8a670d4a1eaa458bef",4695:"247bc54f3553e91eee66",4807:"3c570c5936252956d795",5004:"faea681c279486b7a5e7",5015:"d75f1c8f8dcabdf32021",5132:"3326536d183a858a2a4d",5159:"ee50d5d0afe9bdccc84d",5179:"8f5ff4eb9d71b36a0036",5235:"7227df502cacbb6d0529",5329:"0e21e5b4d065567a6a91",5468:"7c6427767c26ef2bdf2c",5546:"52d1496c5b224690da1c",5587:"c11d857dca43de2229fc",5590:"f9d01ca95849d589b00b",5732:"83f7e22a12d90ef93e62",5795:"13da7d992cbeb39cc2c7",5837:"c419a26e2b7d20d99cef",5853:"a7bd0f0fe942973e9a22",5886:"c010210770a67a5a0429",5935:"60a08ce29d09cb07ef06",6233:"acfde5a4cce3a4589f15",6237:"1aaf284ce0ee24053bd1",6261:"43b2e17ffd5ffcbcf269",6459:"296cf6c6f3f48665a93e",6481:"2e3a4fc59789013185f4",6502:"78ff7a0a6422df4d9b4c",6584:"4c0d7a074083aa9614bb",6636:"6f7500c4f2b5776cc665",6710:"c860891552d6d886394b",6748:"7bef95b168303bdc4bf1",6774:"22677d246a80195507e6",6785:"634e7957696f72c8b8b1",6794:"51b298a6f0550feb44e7",6810:"f19e2fa3af43966cdc3b",6841:"31de71018575457155e5",6904:"697787ffcb6a2b2125c2",6925:"bad2ec88d0ed090daf56",7035:"46fbfb2f815f4a543d5f",7066:"e9dd3a5c61bae6235f8e",7126:"21396e5788a07a159d77",7154:"75ce17cf13aab0440572",7202:"e9c81eee503c1b112bad",7269:"02497309e0f848bf2879",7277:"ad65c24558098f21bbf3",7374:"96e2589668159601db7e",7386:"eed89430c7bece3e752a",7476:"7a54c711fea397105ebf",7483:"7ce1b3056f392cd10031",7541:"190c9feab5f80e586d84",7663:"6dbd3aabfe4d5d593205",7774:"1f742c3b11c76814fa4d",7845:"f8ab6e354834b9c0e857",7873:"21f7d3400c070aa45596",8092:"f1b26b73101210b8f29c",8096:"22a990a8d4d4587866a5",8227:"ee04b1c0c42cb1b18b24",8244:"be3a99c767bf3e613fc5",8363:"7ebc4be4ffe1b37f2792",8383:"e9e64936f01505bb1c1e",8636:"e0b40a4bd4b096db7a33",8691:"8335123c048fcca54808",8758:"803492088780e18de801",8828:"2eb2d49c549e53934b8b",8833:"b61ce04af4e57b1856cb",8880:"eee3fb92c649ef45c900",8882:"9c6d64dc3fc89edabac4",9070:"038dc3f9ef06ef3c960c",9169:"ac4c10194e904840a4ad",9230:"df8963df0766e26d20a0",9238:"c6adbf6c29594d4ade80",9243:"d15dd77b6ac668647ab6",9291:"179efcf889111d2576c5",9296:"f86ee9fd7ac176f86796",9300:"1ec2964714528de56607",9324:"692f73ba846b8afa6b67",9513:"fa07f9d9abff17559117",9675:"078a0b134210167b629d",9771:"8914f5e72a51636a59d3",9777:"83c7c2500839c79ae9d4",9880:"1b5bdd80db9a1a410ff8",9884:"356db8b8297282c77291",9903:"6be5edf3c8e21c3ec360",9904:"2163b9ee4d639d5ed6f3"}[e]+".js",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),(()=>{var e={134:1};r.f.i=(t,n)=>{e[t]||importScripts(r.p+r.u(t))};var t=self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[],n=t.push.bind(t);t.push=t=>{var[o,s,i]=t;for(var a in s)r.o(s,a)&&(r.m[a]=s[a]);for(i&&i(r);o.length;)e[o.pop()]=1;n(t)}})(),r(88277);var n=r(25045);RemoteClient=n})();
1
+ var RemoteClient;(()=>{var e={88277:(e,t,r)=>{r.p=self.esriConfig.assetsPath+"/esri/core/workers/"},68773:(e,t,r)=>{"use strict";r.d(t,{Z:()=>s}),r(80442);var n=r(78286),o=r(17202);const s={analysisTheme:{accentColor:[255,128,0],textColor:"white"},apiKey:void 0,applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",portalUrl:"https://www.arcgis.com",routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:6e4,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&((0,n.RH)(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="4.26.0";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}-next.${o.r}/assets`}s.defaultAssetsPath=s.assetsPath}},20102:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var n=r(22974),o=r(92604),s=r(58896);class i extends s.Z{constructor(e,t,r){if(super(e,t,r),!(this instanceof i))return new i(e,t,r)}toJSON(){if(null!=this.details)try{return{name:this.name,message:this.message,details:JSON.parse(JSON.stringify(this.details,((e,t)=>{if(t&&"object"==typeof t&&"function"==typeof t.toJSON)return t;try{return(0,n.d9)(t)}catch(e){return"[object]"}})))}}catch(e){throw o.Z.getLogger("esri.core.Error").error(e),e}return{name:this.name,message:this.message,details:this.details}}static fromJSON(e){return new i(e.name,e.message,e.details)}}i.prototype.type="error"},92604:(e,t,r)=>{"use strict";r.d(t,{Z:()=>a});var n=r(68773),o=(r(80442),r(70586)),s=r(19153);const i={info:0,warn:1,error:2,none:3};class a{constructor(e){this.level=null,this._module="",this._parent=null,this.writer=null,this._loggedMessages={error:new Map,warn:new Map,info:new Map},null!=e.level&&(this.level=e.level),null!=e.writer&&(this.writer=e.writer),this._module=e.module,a._loggers[this.module]=this;const t=this.module.lastIndexOf(".");-1!==t&&(this._parent=a.getLogger(this.module.slice(0,t)))}get module(){return this._module}get parent(){return this._parent}error(...e){this._log("error","always",...e)}warn(...e){this._log("warn","always",...e)}info(...e){this._log("info","always",...e)}errorOnce(...e){this._log("error","once",...e)}warnOnce(...e){this._log("warn","once",...e)}infoOnce(...e){this._log("info","once",...e)}errorOncePerTick(...e){this._log("error","oncePerTick",...e)}warnOncePerTick(...e){this._log("warn","oncePerTick",...e)}infoOncePerTick(...e){this._log("info","oncePerTick",...e)}get test(){const e=this;return{loggedMessages:e._loggedMessages,clearLoggedWarnings:()=>e._loggedMessages.warn.clear()}}static get testSingleton(){return{resetLoggers(e={}){const t=a._loggers;return a._loggers=e,t},set throttlingDisabled(e){a._throttlingDisabled=e}}}static getLogger(e){let t=a._loggers[e];return t||(t=new a({module:e})),t}_log(e,t,...r){if(this._matchLevel(e)){if("always"!==t&&!a._throttlingDisabled){const n=this._argsToKey(r),o=this._loggedMessages[e].get(n);if("once"===t&&null!=o||"oncePerTick"===t&&o&&o>=a._tickCounter)return;this._loggedMessages[e].set(n,a._tickCounter),a._scheduleTickCounterIncrement()}for(const t of n.Z.log.interceptors)if(t(e,this.module,...r))return;this._inheritedWriter()(e,this.module,...r)}}_parentWithMember(e,t){let r=this;for(;(0,o.pC)(r);){const t=r[e];if((0,o.pC)(t))return t;r=r.parent}return t}_inheritedWriter(){return this._parentWithMember("writer",this._consoleWriter)}_consoleWriter(e,t,...r){console[e](`[${t}]`,...r)}_matchLevel(e){const t=n.Z.log.level?n.Z.log.level:"warn";return i[this._parentWithMember("level",t)]<=i[e]}_argsToKey(...e){return(0,s.hP)(JSON.stringify(e,((e,t)=>"object"!=typeof t||Array.isArray(t)?t:"[Object]")))}static _scheduleTickCounterIncrement(){a._tickCounterScheduled||(a._tickCounterScheduled=!0,Promise.resolve().then((()=>{a._tickCounter++,a._tickCounterScheduled=!1})))}}a._loggers={},a._tickCounter=0,a._tickCounterScheduled=!1,a._throttlingDisabled=!1},58896:(e,t,r)=>{"use strict";r.d(t,{Z:()=>o});var n=r(78286);class o{constructor(e,t,r){this.name=e,this.details=r,this instanceof o&&(this.message=(t&&function(e,t){return e.replace(/\$\{([^\s\:\}]*)(?:\:([^\s\:\}]+))?\}/g,((e,r)=>{if(""===r)return"$";const o=(0,n.hS)(r,t)??"";if(void 0===o)throw new Error(`could not find key "${r}" in template`);return o.toString()}))}(t,r))??"")}toString(){return"["+this.name+"]: "+this.message}}},77734:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n});class n{constructor(e=1){this._seed=e}set seed(e){this._seed=e??Math.random()*n._m}getInt(){return this._seed=(n._a*this._seed+n._c)%n._m,this._seed}getFloat(){return this.getInt()/(n._m-1)}getIntRange(e,t){return Math.round(this.getFloatRange(e,t))}getFloatRange(e,t){const r=t-e;return e+this.getInt()/n._m*r}}n._m=2147483647,n._a=48271,n._c=0},67676:(e,t,r)=>{"use strict";r.d(t,{FY:()=>m,Od:()=>y,SO:()=>d,Vx:()=>i,a9:()=>u,cq:()=>p,e$:()=>b,e5:()=>a,fS:()=>s,w6:()=>f,zG:()=>c});var n=r(70586),o=r(77734);function s(e,t,r){if((0,n.Wi)(e)&&(0,n.Wi)(t))return!0;if((0,n.Wi)(e)||(0,n.Wi)(t)||e.length!==t.length)return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function i(e,t){let r=e.length!==t.length;r&&(e.length=t.length);for(let n=0;n<t.length;++n)e[n]!==t[n]&&(e[n]=t[n],r=!0);return r}function a(e,t,r){let n,o;return r?(n=t.filter((t=>!e.some((e=>r(e,t))))),o=e.filter((e=>!t.some((t=>r(t,e)))))):(n=t.filter((t=>!e.includes(t))),o=e.filter((e=>!t.includes(e)))),{added:n,removed:o}}function c(e){return e&&"number"==typeof e.length}const l=!!Array.prototype.fill;function u(e,t){if(l)return new Array(e).fill(t);const r=new Array(e);for(let n=0;n<e;n++)r[n]=t;return r}function f(e,t){void 0===t&&(t=e,e=0);const r=new Array(t-e);for(let n=e;n<t;n++)r[n-e]=n;return r}class d{constructor(){this.last=0}}const h=new d;function p(e,t,r,n){n=n||h;const o=Math.max(0,n.last-10);for(let s=o;s<r;++s)if(e[s]===t)return n.last=s,s;const s=Math.min(o,r);for(let r=0;r<s;++r)if(e[r]===t)return n.last=r,r;return-1}function b(e,t,r,n){const o=r??e.length,s=p(e,t,o,n);if(-1!==s)return e[s]=e[o-1],null==r&&e.pop(),t}const g=new Set;function m(e,t,r=e.length,n=t.length,o,s){if(0===n||0===r)return r;g.clear();for(let e=0;e<n;++e)g.add(t[e]);o=o||h;const i=Math.max(0,o.last-10);for(let t=i;t<r;++t)if(g.has(e[t])&&(s&&s.push(e[t]),g.delete(e[t]),e[t]=e[r-1],--r,--t,0===g.size||0===r))return g.clear(),r;for(let t=0;t<i;++t)if(g.has(e[t])&&(s&&s.push(e[t]),g.delete(e[t]),e[t]=e[r-1],--r,--t,0===g.size||0===r))return g.clear(),r;return g.clear(),r}function y(e,t){const r=e.indexOf(t);return-1!==r?(e.splice(r,1),t):null}new o.Z},60235:(e,t,r)=>{"use strict";r.d(t,{Mr:()=>i,x9:()=>a});var n=r(80442);const o=new Set;function s(e,t,r=!1){r&&o.has(t)||(r&&o.add(t),e.warn(`🛑 DEPRECATED - ${t}`))}function i(e,t,r={}){if((0,n.Z)("esri-deprecation-warnings")){const{moduleName:n}=r;a(e,"Property: "+(n?n+"::":"")+t,r)}}function a(e,t,r={}){if((0,n.Z)("esri-deprecation-warnings")){const{replacement:n,version:o,see:i,warnOnce:a}=r;let c=t;n&&(c+=`\n\t🛠️ Replacement: ${n}`),o&&(c+=`\n\t⚙️ Version: ${o}`),i&&(c+=`\n\t🔗 See ${i} for more details.`),s(e,c,a)}}},91460:(e,t,r)=>{"use strict";function n(e){return e&&("function"==typeof e.on||"function"==typeof e.addEventListener)}function o(e,t,r){if(!n(e))throw new TypeError("target is not a Evented or EventTarget object");if("on"in e)return e.on(t,r);if(Array.isArray(t)){const n=t.slice();for(const t of n)e.addEventListener(t,r);return{remove(){for(const t of n)e.removeEventListener(t,r)}}}return e.addEventListener(t,r),{remove(){e.removeEventListener(t,r)}}}function s(e,t,r){if(!n(e))throw new TypeError("target is not a Evented or EventTarget object");if("once"in e)return e.once(t,r);const s=o(e,t,(t=>{s.remove(),r.call(e,t)}));return{remove(){s.remove()}}}r.d(t,{IH:()=>s,on:()=>o,vT:()=>n})},80442:(e,t,r)=>{"use strict";let n;function o(e){return"function"==typeof n[e]?n[e]=n[e](globalThis):n[e]}r.d(t,{Z:()=>o}),n=globalThis.dojoConfig?.has||globalThis.esriConfig?.has?{...globalThis.dojoConfig?.has,...globalThis.esriConfig?.has}:{},o.add=(e,t,r,s)=>((s||void 0===n[e])&&(n[e]=t),r&&o(e)),o.cache=n,o.add("esri-deprecation-warnings",!0),(()=>{o.add("host-webworker",void 0!==globalThis.WorkerGlobalScope&&self instanceof globalThis.WorkerGlobalScope);const e="undefined"!=typeof window&&"undefined"!=typeof location&&"undefined"!=typeof document&&window.location===location&&window.document===document;if(o.add("host-browser",e),o.add("host-node","object"==typeof globalThis.process&&globalThis.process.versions?.node&&globalThis.process.versions.v8),o.add("dom",e),o("host-browser")){const e=navigator,t=e.userAgent,r=e.appVersion,n=parseFloat(r);if(o.add("wp",parseFloat(t.split("Windows Phone")[1])||void 0),o.add("msapp",parseFloat(t.split("MSAppHost/")[1])||void 0),o.add("khtml",r.includes("Konqueror")?n:void 0),o.add("edge",parseFloat(t.split("Edge/")[1])||void 0),o.add("opr",parseFloat(t.split("OPR/")[1])||void 0),o.add("webkit",!o("wp")&&!o("edge")&&parseFloat(t.split("WebKit/")[1])||void 0),o.add("chrome",!o("edge")&&!o("opr")&&parseFloat(t.split("Chrome/")[1])||void 0),o.add("android",!o("wp")&&parseFloat(t.split("Android ")[1])||void 0),o.add("safari",!r.includes("Safari")||o("wp")||o("chrome")||o("android")||o("edge")||o("opr")?void 0:parseFloat(r.split("Version/")[1])),o.add("mac",r.includes("Macintosh")),!o("wp")&&t.match(/(iPhone|iPod|iPad)/)){const e=RegExp.$1.replace(/P/,"p"),r=t.match(/OS ([\d_]+)/)?RegExp.$1:"1",n=parseFloat(r.replace(/_/,".").replace(/_/g,""));o.add(e,n),o.add("ios",n)}o("webkit")||(!t.includes("Gecko")||o("wp")||o("khtml")||o("edge")||o.add("mozilla",n),o("mozilla")&&o.add("ff",parseFloat(t.split("Firefox/")[1]||t.split("Minefield/")[1])||void 0))}})(),(()=>{if(globalThis.navigator){const e=navigator.userAgent,t=/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini|IEMobile/i.test(e),r=/iPhone/i.test(e);t&&o.add("esri-mobile",t),r&&o.add("esri-iPhone",r),o.add("esri-geolocation",!!navigator.geolocation)}o.add("esri-wasm","WebAssembly"in globalThis),o.add("esri-shared-array-buffer",(()=>{const e="SharedArrayBuffer"in globalThis,t=!1===globalThis.crossOriginIsolated;return e&&!t})),o.add("wasm-simd",(()=>WebAssembly.validate(new Uint8Array([0,97,115,109,1,0,0,0,1,5,1,96,0,1,123,3,2,1,0,10,10,1,8,0,65,0,253,15,253,98,11])))),o.add("esri-atomics","Atomics"in globalThis),o.add("esri-workers","Worker"in globalThis),o.add("web-feat:cache","caches"in globalThis),o.add("esri-workers-arraybuffer-transfer",!o("safari")||Number(o("safari"))>=12),o.add("featurelayer-simplify-thresholds",[.5,.5,.5,.5]),o.add("featurelayer-simplify-payload-size-factors",[1,1,4]),o.add("featurelayer-snapshot-enabled",!0),o.add("featurelayer-snapshot-point-min-threshold",8e4),o.add("featurelayer-snapshot-point-max-threshold",4e5),o.add("featurelayer-snapshot-point-coverage",.1),o.add("featurelayer-advanced-symbols",!1),o.add("featurelayer-pbf",!0),o.add("featurelayer-pbf-statistics",!1),o.add("feature-layers-workers",!0),o.add("feature-polyline-generalization-factor",1),o.add("mapview-transitions-duration",200),o.add("mapview-srswitch-adjust-rotation-scale-threshold",24e6),o.add("mapserver-pbf-version-support",10.81),o.add("mapimagelayer-popup-identify-max-tolerance",20),o.add("heatmap-allow-raster-fallback",!0),o.add("heatmap-force-raster",!1),o("host-webworker")||o("host-browser")&&(o.add("esri-csp-restrictions",(()=>{try{new Function}catch{return!0}return!1})),o.add("esri-image-decode",(()=>{if("decode"in new Image){const e=new Image;return e.src='data:image/svg+xml;charset=UTF-8,<svg version="1.1" xmlns="http://www.w3.org/2000/svg"></svg>',void e.decode().then((()=>{o.add("esri-image-decode",!0,!0,!0)})).catch((()=>{o.add("esri-image-decode",!1,!0,!0)}))}return!1})),o.add("esri-url-encodes-apostrophe",(()=>{const e=window.document.createElement("a");return e.href="?'",e.href.includes("?%27")})))})()},22974:(e,t,r)=>{"use strict";r.d(t,{Vo:()=>c,d9:()=>a,fS:()=>p,y7:()=>b,yd:()=>i});var n=r(67676),o=r(70586),s=r(1533);function i(e,t){let r;if(t)for(r in e)e.hasOwnProperty(r)&&(void 0===e[r]?delete e[r]:e[r]instanceof Object&&i(e[r],!0));else for(r in e)e.hasOwnProperty(r)&&void 0===e[r]&&delete e[r];return e}function a(e){if(!e||"object"!=typeof e||"function"==typeof e)return e;const t=h(e);if((0,o.pC)(t))return t;if(l(e))return e.clone();if(u(e))return e.map(a);if(f(e))return e.clone();const r={};for(const t of Object.getOwnPropertyNames(e))r[t]=a(e[t]);return r}function c(e){if(!e||"object"!=typeof e||"function"==typeof e||"HTMLElement"in globalThis&&e instanceof HTMLElement)return e;const t=h(e);if((0,o.pC)(t))return t;if(u(e)){let t=!0;const r=e.map((e=>{const r=c(e);return null!=e&&null==r&&(t=!1),r}));return t?r:null}if(l(e))return e.clone();if(!f(e)){const t=new(0,Object.getPrototypeOf(e).constructor);for(const r of Object.getOwnPropertyNames(e)){const n=e[r],o=c(n);if(null!=n&&null==o)return null;t[r]=o}return t}return null}function l(e){return"function"==typeof e.clone}function u(e){return"function"==typeof e.map&&"function"==typeof e.forEach}function f(e){return"function"==typeof e.notifyChange&&"function"==typeof e.watch}function d(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function h(e){if((0,s.W0)(e)||(0,s.lq)(e)||(0,s.KZ)(e)||(0,s.z3)(e)||(0,s.Uc)(e)||(0,s.Hx)(e)||(0,s.ZY)(e)||(0,s.xZ)(e)||(0,s.fS)(e))return e.slice();if(e instanceof Date)return new Date(e.getTime());if(e instanceof ArrayBuffer)return e.slice(0,e.byteLength);if(e instanceof Map){const t=new Map;for(const[r,n]of e)t.set(r,a(n));return t}if(e instanceof Set){const t=new Set;for(const r of e)t.add(a(r));return t}return null}function p(e,t){return e===t||"number"==typeof e&&isNaN(e)&&"number"==typeof t&&isNaN(t)||"function"==typeof(e||{}).getTime&&"function"==typeof(t||{}).getTime&&e.getTime()===t.getTime()||!1}function b(e,t){return e===t||(null==e||"string"==typeof e?e===t:"number"==typeof e?e===t||"number"==typeof t&&isNaN(e)&&isNaN(t):e instanceof Date?t instanceof Date&&e.getTime()===t.getTime():Array.isArray(e)?Array.isArray(t)&&(0,n.fS)(e,t):e instanceof Set?t instanceof Set&&function(e,t){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}(e,t):e instanceof Map?t instanceof Map&&function(e,t){if(e.size!==t.size)return!1;for(const[r,n]of e){const e=t.get(r);if(e!==n||void 0===e&&!t.has(r))return!1}return!0}(e,t):!!d(e)&&d(t)&&function(e,t){if(null===e||null===t)return!1;const r=Object.keys(e);if(null===t||Object.keys(t).length!==r.length)return!1;for(const n of r)if(e[n]!==t[n]||!Object.prototype.hasOwnProperty.call(t,n))return!1;return!0}(e,t))}},70586:(e,t,r)=>{"use strict";function n(e){return null!=e}function o(e){return null==e}function s(e,t){return n(e)?t(e):null}function i(e){return e}function a(e,t){return c(e,t),e}function c(e,t){if(o(e))throw new Error(t??"value is None")}function l(e,t){return n(e)?e:"function"==typeof t?t():t}function u(e,t){return n(e)?e:t}function f(e){return n(e)&&e.destroy(),null}function d(e){return n(e)&&e.dispose(),null}function h(e){return n(e)&&e.remove(),null}function p(e){return n(e)&&e.abort(),null}function b(e){return n(e)&&e.release(),null}function g(e,t,r){return n(e)&&n(t)?n(r)?r(e,t):e.equals(t):e===t}function m(e){return null}function y(e,t){const r=new Array;for(const n of e)r.push(v(n,null,t));return r}function w(e,t){for(const r of e)s(r,t)}function v(e,t,r){return n(e)?r(e):t}function _(e){return e.filter((e=>n(e)))}function O(e,...t){let r=e;for(let e=0;e<t.length&&r;++e)r=r[t[e]];return r}function k(e){return e}r.d(t,{Fd:()=>y,IM:()=>p,JR:()=>w,M2:()=>d,O3:()=>c,Pt:()=>l,R2:()=>v,RY:()=>b,SC:()=>f,U2:()=>O,Wg:()=>i,Wi:()=>o,_W:()=>g,hw:()=>h,j0:()=>k,lV:()=>_,pC:()=>n,s3:()=>a,wN:()=>m,yl:()=>u,yw:()=>s})},78286:(e,t,r)=>{"use strict";r.d(t,{RB:()=>i,RH:()=>o,hS:()=>s});var n=r(22974);function o(e,t,r=!1){return c(e,t,r)}function s(e,t){if(null!=t)return t[e]||a(e.split("."),!1,t)}function i(e,t,r){const n=e.split("."),o=n.pop(),s=a(n,!0,r);s&&o&&(s[o]=t)}function a(e,t,r){let n=r;for(const r of e){if(null==n)return;if(!(r in n)){if(!t)return;n[r]={}}n=n[r]}return n}function c(e,t,r){return t?Object.keys(t).reduce(((e,o)=>{let s=e[o],i=t[o];return s===i?e:void 0===s?(e[o]=(0,n.d9)(i),e):(Array.isArray(i)||Array.isArray(e)?(s=s?Array.isArray(s)?e[o]=s.concat():e[o]=[s]:e[o]=[],i&&(Array.isArray(i)||(i=[i]),r?i.forEach((e=>{s.includes(e)||s.push(e)})):e[o]=i.concat())):i&&"object"==typeof i?e[o]=c(s,i,r):e.hasOwnProperty(o)&&!t.hasOwnProperty(o)||(e[o]=i),e)}),e||{}):e}},95330:(e,t,r)=>{"use strict";r.d(t,{e4:()=>O,zE:()=>c,dD:()=>w,hh:()=>C,Ds:()=>P,as:()=>v,WW:()=>_,R8:()=>y,D_:()=>m,Hc:()=>f,y8:()=>k,fu:()=>p,$F:()=>b,r9:()=>d,k_:()=>l,H9:()=>h,Yn:()=>j,gx:()=>S,Hl:()=>g});const n=(o=globalThis,{setTimeout:(e,t)=>{const r=o.setTimeout(e,t);return{remove:()=>o.clearTimeout(r)}}});var o;r(60235);var s=r(20102),i=r(91460),a=(r(92604),r(70586));function c(e="Aborted"){return new s.Z("AbortError",e)}function l(e,t="Aborted"){if(f(e))throw c(t)}function u(e){return(0,a.pC)(e)?"aborted"in e?e:e.signal:e}function f(e){const t=u(e);return(0,a.pC)(t)&&t.aborted}function d(e){if(m(e))throw e}function h(e){if(!m(e))throw e}function p(e,t){const r=u(e);if(!(0,a.Wi)(r)){if(!r.aborted)return(0,i.IH)(r,"abort",(()=>t()));t()}}function b(e,t){const r=u(e);if(!(0,a.Wi)(r))return l(r),(0,i.IH)(r,"abort",(()=>t(c())))}function g(e,t){const r=u(t);return(0,a.Wi)(r)?e:new Promise(((r,n)=>{let o=p(t,(()=>n(c())));const s=()=>o=(0,a.hw)(o);e.then(s,s),e.then(r,n)}))}function m(e){return"AbortError"===e?.name}async function y(e){try{return await e}catch(e){if(!m(e))throw e;return}}function w(){let e=null;const t=new Promise(((t,r)=>{e={promise:void 0,resolve:t,reject:r}}));return e.promise=t,e}async function v(e){if(!e)return;if("function"!=typeof e.forEach){const t=Object.keys(e),r=t.map((t=>e[t])),n=await v(r),o={};return t.map(((e,t)=>o[e]=n[t])),o}const t=e;return new Promise((e=>{const r=[];let n=t.length;0===n&&e(r),t.forEach((t=>{const o={promise:t||Promise.resolve(t)};r.push(o),o.promise.then((e=>{o.value=e})).catch((e=>{o.error=e})).then((()=>{--n,0===n&&e(r)}))}))}))}async function _(e){return(await v(e)).filter((e=>!!e.value)).map((e=>e.value))}function O(e,t,r){const n=new AbortController;return p(r,(()=>n.abort())),new Promise(((r,o)=>{let s=setTimeout((()=>{s=0,r(t)}),e);p(n,(()=>{s&&(clearTimeout(s),o(c()))}))}))}function k(e){return e&&"function"==typeof e.then}function S(e){return k(e)?e:Promise.resolve(e)}function P(e,t=-1){let r,n,o,s,i=null;const l=(...u)=>{if(r){n=u,s&&s.reject(c()),s=w();const e=(0,a.j0)(s.promise);if(i){const e=i;i=null,e.abort()}return e}if(o=s||w(),s=null,t>0){const n=new AbortController;r=S(e(...u,n.signal));const o=r;O(t).then((()=>{r===o&&(s?n.abort():i=n)}))}else r=1,r=S(e(...u));const f=()=>{const e=n;n=o=r=i=null,null!=e&&l(...e)},d=r,h=o;return d.then(f,f),d.then(h.resolve,h.reject),(0,a.j0)(h.promise)};return l}function C(){let e,t;const r=new Promise(((r,n)=>{e=r,t=n})),o=t=>{e(t)};return o.resolve=t=>e(t),o.reject=e=>t(e),o.timeout=(e,t)=>n.setTimeout((()=>o.reject(t)),e),o.promise=r,o}async function j(e){await Promise.resolve(),l(e)}},19153:(e,t,r)=>{"use strict";r.d(t,{Cb:()=>l,Qs:()=>a,gx:()=>i,hP:()=>c});var n=r(78286);const o=/\{([^\}]+)\}/g;function s(e){return e??""}function i(e,t){return e.replace(o,"object"==typeof t?(e,r)=>s((0,n.hS)(r,t)):(e,r)=>s(t(r)))}function a(e,t){return e.replace(/([\.$?*|{}\(\)\[\]\\\/\+\-^])/g,(e=>t&&t.includes(e)?e:`\\${e}`))}function c(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t}function l(e){return(new DOMParser).parseFromString(e||"","text/html").body.innerText||""}},1533:(e,t,r)=>{"use strict";function n(e){return e instanceof ArrayBuffer}function o(e){return e&&e.constructor&&"Int8Array"===e.constructor.name}function s(e){return e&&e.constructor&&"Uint8Array"===e.constructor.name}function i(e){return e&&e.constructor&&"Uint8ClampedArray"===e.constructor.name}function a(e){return e&&e.constructor&&"Int16Array"===e.constructor.name}function c(e){return e&&e.constructor&&"Uint16Array"===e.constructor.name}function l(e){return e&&e.constructor&&"Int32Array"===e.constructor.name}function u(e){return e&&e.constructor&&"Uint32Array"===e.constructor.name}function f(e){return e&&e.constructor&&"Float32Array"===e.constructor.name}function d(e){return e&&e.constructor&&"Float64Array"===e.constructor.name}r.d(t,{DB:()=>h,Hx:()=>l,KZ:()=>i,Uc:()=>c,W0:()=>o,ZY:()=>u,eP:()=>n,fS:()=>d,lq:()=>s,xZ:()=>f,z3:()=>a});const h=1024},17452:(e,t,r)=>{"use strict";r.d(t,{$U:()=>ne,AH:()=>V,B7:()=>j,D6:()=>L,Fv:()=>F,HK:()=>K,Hu:()=>de,Ie:()=>ue,L:()=>k,Ml:()=>be,P$:()=>B,PF:()=>Z,Qj:()=>le,R9:()=>y,TI:()=>O,YP:()=>H,Yd:()=>ae,ZN:()=>he,_l:()=>X,b7:()=>E,ed:()=>N,fZ:()=>ge,fl:()=>pe,hF:()=>q,hO:()=>oe,io:()=>ee,jc:()=>z,kl:()=>U,mN:()=>S,oC:()=>te,oh:()=>W,qg:()=>T,rS:()=>Q,sJ:()=>Y,tD:()=>$,tm:()=>I,u0:()=>P,v_:()=>D,vt:()=>ce});var n=r(68773),o=r(20102),s=r(92604),i=r(70586);const a=s.Z.getLogger("esri.core.urlUtils"),c=n.Z.request,l="esri/config: esriConfig.request.proxyUrl is not set.",u=/^\s*[a-z][a-z0-9-+.]*:(?![0-9])/i,f=/^\s*http:/i,d=/^\s*https:/i,h=/^\s*file:/i,p=/:\d+$/,b=/^https?:\/\/[^/]+\.arcgis.com\/sharing(\/|$)/i,g=new RegExp("^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$"),m=new RegExp("^((([^\\[:]+):)?([^@]+)@)?(\\[([^\\]]+)\\]|([^\\[:]*))(:([0-9]+))?$");class y{constructor(e=""){this.uri=e,this.scheme=null,this.authority=null,this.path=null,this.query=null,this.fragment=null,this.user=null,this.password=null,this.host=null,this.port=null;let t=(0,i.j0)(this.uri.match(g));this.scheme=t[2]||(t[1]?"":null),this.authority=t[4]||(t[3]?"":null),this.path=t[5],this.query=t[7]||(t[6]?"":null),this.fragment=t[9]||(t[8]?"":null),null!=this.authority&&(t=(0,i.j0)(this.authority.match(m)),this.user=t[3]||null,this.password=t[4]||null,this.host=t[6]||t[7],this.port=t[9]||null)}toString(){return this.uri}}const w={};let v=new y(n.Z.applicationUrl);let _=function(){const e=(0,i.j0)(v.path),t=e.substring(0,e.lastIndexOf(e.split("/")[e.split("/").length-1]));return`${v.scheme}://${v.host}${null!=v.port?`:${v.port}`:""}${t}`}();const O=()=>v,k=()=>_;function S(e){if(!e)return null;const t={path:null,query:null},r=new y(e),n=e.indexOf("?");return null===r.query?t.path=e:(t.path=e.substring(0,n),t.query=P(r.query)),r.fragment&&(t.hash=r.fragment,null===r.query&&(t.path=t.path.substring(0,t.path.length-(r.fragment.length+1)))),t}function P(e){const t=e.split("&"),r={};for(const e of t){if(!e)continue;const t=e.indexOf("=");let n,o;t<0?(n=decodeURIComponent(e),o=""):(n=decodeURIComponent(e.slice(0,t)),o=decodeURIComponent(e.slice(t+1)));let s=r[n];"string"==typeof s&&(s=r[n]=[s]),Array.isArray(s)?s.push(o):r[n]=o}return r}function C(e){return e&&"object"==typeof e&&"toJSON"in e&&"function"==typeof e.toJSON}function j(e,t){return e?t&&"function"==typeof t?Object.keys(e).map((r=>encodeURIComponent(r)+"="+encodeURIComponent(t(r,e[r])))).join("&"):Object.keys(e).map((r=>{const n=e[r];if(null==n)return"";const o=encodeURIComponent(r)+"=",s=t&&t[r];return s?o+encodeURIComponent(s(n)):Array.isArray(n)?n.map((e=>C(e)?o+encodeURIComponent(JSON.stringify(e)):o+encodeURIComponent(e))).join("&"):C(n)?o+encodeURIComponent(JSON.stringify(n)):o+encodeURIComponent(n)})).filter((e=>e)).join("&"):""}function E(e=!1){let t,r=c.proxyUrl;if("string"==typeof e){t=ne(e);const n=N(e);n&&(r=n.proxyUrl)}else t=!!e;if(!r)throw a.warn(l),new o.Z("urlutils:proxy-not-set",l);return t&&se()&&(r=oe(r)),S(r)}function T(e){const t=N(e);let r,n;if(t){const e=A(t.proxyUrl);r=e.path,n=e.query?P(e.query):null}if(r){const t=S(e);e=r+"?"+t.path;const o=j({...n,...t.query});o&&(e=`${e}?${o}`)}return e}const x={path:"",query:""};function A(e){const t=e.indexOf("?");return-1!==t?(x.path=e.slice(0,t),x.query=e.slice(t+1)):(x.path=e,x.query=null),x}function M(e){return(e=ie(e=function(e){return e&&"/"===e[e.length-1]?e:`${e}/`}(e=A(e).path),!0)).toLowerCase()}function $(e){const t={proxyUrl:e.proxyUrl,urlPrefix:M(e.urlPrefix)},r=c.proxyRules,n=t.urlPrefix;let o=r.length;for(let e=0;e<r.length;e++){const t=r[e].urlPrefix;if(0===n.indexOf(t)){if(n.length===t.length)return-1;o=e;break}0===t.indexOf(n)&&(o=e+1)}return r.splice(o,0,t),o}function N(e){const t=c.proxyRules,r=M(e);for(let e=0;e<t.length;e++)if(0===r.indexOf(t[e].urlPrefix))return t[e]}function I(e,t){return e=R(e),t=R(t),ie(e)===ie(t)}function R(e){const t=(e=F(e)).indexOf("/sharing");return t>0?e.substring(0,t):e.replace(/\/+$/,"")}function W(e){const t=t=>null==t||t instanceof RegExp&&t.test(e)||"string"==typeof t&&e.startsWith(t),r=c.interceptors;if(r)for(const e of r)if(Array.isArray(e.urls)){if(e.urls.some(t))return e}else if(t(e.urls))return e;return null}function L(e,t,r=!1){if(!e||!t)return!1;const n=fe(e),o=fe(t);return!(!r&&n.scheme!==o.scheme)&&null!=n.host&&null!=o.host&&n.host.toLowerCase()===o.host.toLowerCase()&&n.port===o.port}function U(e){if("string"==typeof e){if(!H(e))return!0;e=fe(e)}if(L(e,v))return!0;const t=c.trustedServers||[];for(let r=0;r<t.length;r++){const n=J(t[r]);for(let t=0;t<n.length;t++)if(L(e,n[t]))return!0}return!1}function J(e){return w[e]||(re(e)||te(e)?w[e]=[new y(q(e))]:w[e]=[new y(`http://${e}`),new y(`https://${e}`)]),w[e]}function q(e,t=_,r){return te(e)?r&&r.preserveProtocolRelative?e:"http"===v.scheme&&v.authority===B(e).slice(2)?`http:${e}`:`https:${e}`:re(e)?e:(0,i.j0)(D("/"===e[0]?function(e){const t=e.indexOf("//"),r=e.indexOf("/",t+2);return-1===r?e:e.slice(0,r)}(t):t,e))}function Z(e,t=_,r){if(null==e||!H(e))return e;const n=F(e),o=n.toLowerCase(),s=F(t).toLowerCase().replace(/\/+$/,""),i=r?F(r).toLowerCase().replace(/\/+$/,""):null;if(i&&0!==s.indexOf(i))return e;const a=(e,t,r)=>-1===(r=e.indexOf(t,r))?e.length:r;let c=a(o,"/",o.indexOf("//")+2),l=-1;for(;o.slice(0,c+1)===s.slice(0,c)+"/"&&(l=c+1,c!==o.length);)c=a(o,"/",c+1);if(-1===l)return e;if(i&&l<i.length)return e;e=n.slice(l);const u=s.slice(l-1).replace(/[^/]+/g,"").length;if(u>0)for(let t=0;t<u;t++)e=`../${e}`;else e=`./${e}`;return e}function F(e){return function(e){const t=c.httpsDomains;if(!function(e){return null!=e&&f.test(e)||"http"===v.scheme&&te(e)}(e))return e;const r=e.indexOf("/",7);let n;if(n=-1===r?e:e.slice(0,r),n=n.toLowerCase().slice(7),p.test(n)){if(!n.endsWith(":80"))return e;n=n.slice(0,-3),e=e.replace(":80","")}return"http"===v.scheme&&n===v.authority&&!b.test(e)||(se()&&n===v.authority||t&&t.some((e=>n===e||n.endsWith(`.${e}`)))||se()&&!N(e))&&(e=oe(e)),e}(e=function(e){return e.replace(/^(https?:\/\/)(arcgis\.com)/i,"$1www.$2")}(e=function(e){if(/^https?:\/\//i.test(e)){const t=A(e);e=(e=t.path.replace(/\/{2,}/g,"/")).replace("/","//"),t.query&&(e+=`?${t.query}`)}return e}(e=q(e=e.trim()))))}function D(...e){const t=e.filter(i.pC);if(!t||!t.length)return;const r=[];if(H(t[0])){const e=t[0],n=e.indexOf("//");-1!==n&&(r.push(e.slice(0,n+1)),function(e){return null!=e&&h.test(e)}(t[0])&&(r[0]+="/"),t[0]=e.slice(n+2))}else"/"===t[0][0]&&r.push("");const n=t.reduce(((e,t)=>t?e.concat(t.split("/")):e),[]);for(let e=0;e<n.length;e++){const t=n[e];".."===t&&r.length>0&&".."!==r[r.length-1]?r.pop():(!t&&e===n.length-1||t&&("."!==t||0===r.length))&&r.push(t)}return r.join("/")}function B(e,t=!1){if(null==e||z(e)||K(e))return null;let r=e.indexOf("://");if(-1===r&&te(e))r=2;else{if(-1===r)return null;r+=3}const n=e.indexOf("/",r);return-1!==n&&(e=e.slice(0,n)),t&&(e=ie(e,!0)),e}function H(e){return te(e)||re(e)}function z(e){return null!=e&&"blob:"===e.slice(0,5)}function K(e){return null!=e&&"data:"===e.slice(0,5)}function V(e){const t=Y(e);if(!t||!t.isBase64)return null;const r=atob(t.data),n=new Uint8Array(r.length);for(let e=0;e<r.length;e++)n[e]=r.charCodeAt(e);return n.buffer}function Q(e){return btoa(String.fromCharCode.apply(null,e)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}const G=/^data:(.*?)(;base64)?,(.*)$/;function Y(e){const t=e.match(G);if(!t)return null;const[,r,n,o]=t;return{mediaType:r,isBase64:!!n,data:o}}function X(e){return e.isBase64?`data:${e.mediaType};base64,${e.data}`:`data:${e.mediaType},${e.data}`}function ee(e,t){(function(e,t){if(!e)return!1;const r=document.createElement("a");if(!("download"in r))return!1;const n=URL.createObjectURL(e);return r.download=t,r.href=n,r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(n),!0})(e,t)||function(e,t){!!window.navigator.msSaveOrOpenBlob&&window.navigator.msSaveOrOpenBlob(e,t)}(e,t)}function te(e){return null!=e&&"/"===e[0]&&"/"===e[1]}function re(e){return null!=e&&u.test(e)}function ne(e){return null!=e&&d.test(e)||"https"===v.scheme&&te(e)}function oe(e){return te(e)?`https:${e}`:e.replace(f,"https:")}function se(){return"https"===v.scheme}function ie(e,t=!1){return te(e)?e.slice(2):(e=e.replace(u,""),t&&e.length>1&&"/"===e[0]&&"/"===e[1]&&(e=e.slice(2)),e)}function ae(e){let t=0;if(H(e)){const r=e.indexOf("//");-1!==r&&(t=r+2)}const r=e.lastIndexOf("/");return r<t?e:e.slice(0,r+1)}function ce(e,t){if(!e)return"";const r=S(e).path.replace(/\/+$/,""),n=r.substring(r.lastIndexOf("/")+1);if(!t?.length)return n;const o=new RegExp(`.(${t.join("|")})$`,"ig");return n.replace(o,"")}function le(e){return e.replace(/\/+$/,"")}function ue(e,t,r){if(!(t&&r&&e&&H(e)))return e;const n=e.indexOf("//"),o=e.indexOf("/",n+2),s=e.indexOf(":",n+2),i=Math.min(o<0?e.length:o,s<0?e.length:s);return e.slice(n+2,i).toLowerCase()!==t.toLowerCase()?e:`${e.slice(0,n+2)}${r}${e.slice(i)}`}function fe(e){return"string"==typeof e?new y(q(e)):(e.scheme||(e.scheme=v.scheme),e)}function de(e,t){const r=S(e),n=Object.keys(r.query||{});return n.length>0&&t&&t.warn("removeQueryParameters()",`Url query parameters are not supported, the following parameters have been removed: ${n.join(", ")}.`),r.path}function he(e,t,r){const n=S(e),o=n.query||{};return o[t]=String(r),`${n.path}?${j(o)}`}function pe(e,t){const r=S(e),n=r.query||{};for(const e in t)n[e]=t[e];const o=j(n);return o?`${r.path}?${o}`:r.path}function be(e){if((0,i.Wi)(e))return null;const t=e.match(me);return t?t[2]:null}function ge(e){if((0,i.Wi)(e))return null;const t=e.match(me);return t?{path:t[1],extension:t[2]}:{path:e,extension:null}}const me=/([^.]*)\.([^\/]*)$/},25045:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>y});var n=r(40330),o=r(20102),s=r(91460),i=r(70586),a=r(95330),c=r(94362),l=r(17202);const u={statsWorker:()=>Promise.all([r.e(1400),r.e(1562),r.e(3847),r.e(6841)]).then(r.bind(r,36841)),geometryEngineWorker:()=>Promise.all([r.e(5837),r.e(8227)]).then(r.bind(r,48227)),CSVSourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1534),r.e(1562),r.e(5886),r.e(3847),r.e(9777),r.e(8833),r.e(4807),r.e(7154)]).then(r.bind(r,27793)),EdgeProcessingWorker:()=>Promise.all([r.e(6481),r.e(212),r.e(2062)]).then(r.bind(r,49594)),ElevationSamplerWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(4807),r.e(6481),r.e(6459),r.e(98)]).then(r.bind(r,61787)),FeatureServiceSnappingSourceWorker:()=>Promise.all([r.e(4547),r.e(5795),r.e(1400),r.e(1534),r.e(1562),r.e(4599),r.e(5886),r.e(3847),r.e(9777),r.e(8833),r.e(4807),r.e(3660)]).then(r.bind(r,65967)),GeoJSONSourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1534),r.e(1562),r.e(5886),r.e(3847),r.e(9777),r.e(8833),r.e(4807),r.e(7774),r.e(7845)]).then(r.bind(r,97845)),LercWorker:()=>r.e(3027).then(r.bind(r,23027)),MemorySourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1534),r.e(1562),r.e(5886),r.e(3847),r.e(9777),r.e(8833),r.e(4807),r.e(7774),r.e(639)]).then(r.bind(r,30639)),PBFDecoderWorker:()=>Promise.all([r.e(1400),r.e(1562),r.e(5886),r.e(1916)]).then(r.bind(r,61916)),Pipeline:()=>Promise.all([r.e(4547),r.e(4321),r.e(5795),r.e(1400),r.e(1534),r.e(1562),r.e(4599),r.e(5886),r.e(3847),r.e(9777),r.e(8833),r.e(4325),r.e(7483)]).then(r.bind(r,37138)),PointCloudWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(9324)]).then(r.bind(r,90447)),RasterWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1562),r.e(8363),r.e(3645),r.e(4370)]).then(r.bind(r,61576)),SceneLayerSnappingSourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1534),r.e(1562),r.e(5886),r.e(3847),r.e(9777),r.e(6481),r.e(212),r.e(1391)]).then(r.bind(r,73248)),SceneLayerWorker:()=>r.e(1412).then(r.bind(r,31412)),WFSSourceWorker:()=>Promise.all([r.e(4547),r.e(1400),r.e(1534),r.e(1562),r.e(5886),r.e(3847),r.e(9777),r.e(8833),r.e(4807),r.e(7774),r.e(3230)]).then(r.bind(r,43230)),WorkerTileHandler:()=>Promise.all([r.e(4325),r.e(1785),r.e(6810),r.e(3388)]).then(r.bind(r,56456))},{CLOSE:f,ABORT:d,INVOKE:h,RESPONSE:p,OPEN_PORT:b,ON:g}=c.Cs;class m{constructor(e){this._timer=null,this._cancelledJobIds=new Set,this._invokeMessages=[],this._invoke=e,this._timer=null,this._process=this._process.bind(this)}push(e){e.type===c.Cs.ABORT?this._cancelledJobIds.add(e.jobId):(this._invokeMessages.push(e),null===this._timer&&(this._timer=setTimeout(this._process,0)))}clear(){this._invokeMessages.length=0,this._cancelledJobIds.clear(),this._timer=null}_process(){this._timer=null;for(const e of this._invokeMessages)this._cancelledJobIds.has(e.jobId)||this._invoke(e);this._cancelledJobIds.clear(),this._invokeMessages.length=0}}class y{static connect(e){const t=new MessageChannel;let r;r="function"==typeof e?new e:"default"in e&&"function"==typeof e.default?new e.default:e;const n=new y(t.port1,{channel:t,client:r},(()=>null));return"object"==typeof r&&"remoteClient"in r&&(r.remoteClient=n),y.clients.set(n,r),t.port2}static loadWorker(e){const t=u[e];return t?t():Promise.resolve(null)}constructor(e,t,r){this._port=e,this._getNextJob=r,this._outJobs=new Map,this._inJobs=new Map,this._invokeQueue=new m((e=>this._onInvokeMessage(e))),this._client=t.client,this._onMessage=this._onMessage.bind(this),this._channel=t.channel,this._schedule=t.schedule,this._port.addEventListener("message",this._onMessage),this._port.start()}close(){this._post({type:f}),this._close()}isBusy(){return this._outJobs.size>0}invoke(e,t,r){const n=r&&r.signal,s=r&&r.transferList;if(!this._port)return Promise.reject(new o.Z("worker:port-closed",`Cannot call invoke('${e}'), port is closed`,{methodName:e,data:t}));const l=(0,c.jt)();return new Promise(((r,o)=>{if((0,a.Hc)(n))return this._processWork(),void o((0,a.zE)());const c=(0,a.fu)(n,(()=>{const e=this._outJobs.get(l);e&&(this._outJobs.delete(l),this._processWork(),(0,i.hw)(e.abortHandle),this._post({type:d,jobId:l}),o((0,a.zE)()))})),u={resolve:r,reject:o,abortHandle:c,debugInfo:e};this._outJobs.set(l,u),this._post({type:h,jobId:l,methodName:e,abortable:null!=n},t,s)}))}on(e,t){const r=new MessageChannel;function n(e){t(e.data)}return this._port.postMessage({type:c.Cs.ON,eventType:e,port:r.port2},[r.port2]),r.port1.addEventListener("message",n),r.port1.start(),{remove(){r.port1.postMessage({type:c.Cs.CLOSE}),r.port1.close(),r.port1.removeEventListener("message",n)}}}jobAdded(){this._processWork()}openPort(){const e=new MessageChannel;return this._post({type:b,port:e.port2}),e.port1}_processWork(){if(this._outJobs.size>=2)return;const e=this._getNextJob();if(!e)return;const{methodName:t,data:r,invokeOptions:n,deferred:o}=e;this.invoke(t,r,n).then((e=>o.resolve(e))).catch((e=>o.reject(e)))}_close(){this._channel&&(this._channel=void 0),this._port.removeEventListener("message",this._onMessage),this._port.close(),this._outJobs.forEach((e=>{(0,i.hw)(e.abortHandle),e.reject((0,a.zE)(`Worker closing, aborting job calling '${e.debugInfo}'`))})),this._inJobs.clear(),this._outJobs.clear(),this._invokeQueue.clear(),this._port=this._client=this._schedule=null}_onMessage(e){(0,i.pC)(this._schedule)?this._schedule((()=>this._processMessage(e))):this._processMessage(e)}_processMessage(e){const t=(0,c.QM)(e);if(t)switch(t.type){case p:this._onResponseMessage(t);break;case h:this._invokeQueue.push(t);break;case d:this._onAbortMessage(t);break;case f:this._onCloseMessage();break;case b:this._onOpenPortMessage(t);break;case g:this._onOnMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,n=t.get(r);this._invokeQueue.push(e),n&&(n.controller&&n.controller.abort(),t.delete(r))}_onCloseMessage(){const e=this._client;this._close(),e&&"destroy"in e&&y.clients.get(this)===e&&e.destroy(),y.clients.delete(this),e&&e.remoteClient&&(e.remoteClient=null)}_onInvokeMessage(e){const{methodName:t,jobId:r,data:n,abortable:o}=e,s=o?new AbortController:null,i=this._inJobs;let l,u=this._client,f=u[t];try{if(!f&&t&&t.includes(".")){const e=t.split(".");for(let t=0;t<e.length-1;t++)u=u[e[t]],f=u[e[t+1]]}if("function"!=typeof f)throw new TypeError(`${t} is not a function`);l=f.call(u,n,{client:this,signal:s?s.signal:null})}catch(e){return void this._post({type:p,jobId:r,error:(0,c.AB)(e)})}(0,a.y8)(l)?(i.set(r,{controller:s,promise:l}),l.then((e=>{i.has(r)&&(i.delete(r),this._post({type:p,jobId:r},e))}),(e=>{i.has(r)&&(i.delete(r),(0,a.D_)(e)||this._post({type:p,jobId:r,error:(0,c.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:p,jobId:r},l)}_onOpenPortMessage(e){new y(e.port,{client:this._client},(()=>null))}_onOnMessage(e){const{port:t}=e,r=this._client.on(e.eventType,(e=>{t.postMessage(e)})),n=(0,s.on)(e.port,"message",(e=>{(0,c.QM)(e)?.type===c.Cs.CLOSE&&(n.remove(),r.remove(),t.close())}))}_onResponseMessage(e){const{jobId:t,error:r,data:n}=e,s=this._outJobs;if(!s.has(t))return;const a=s.get(t);s.delete(t),this._processWork(),(0,i.hw)(a.abortHandle),r?a.reject(o.Z.fromJSON(JSON.parse(r))):a.resolve(n)}_post(e,t,r){return(0,c.oi)(this._port,e,t,r)}}y.kernelInfo={revision:l.$,version:n.i8,buildDate:l.r},y.clients=new Map},94362:(e,t,r)=>{"use strict";r.d(t,{AB:()=>a,Cs:()=>n,QM:()=>l,jt:()=>i,oi:()=>c});var n,o=r(80442);!function(e){e[e.HANDSHAKE=0]="HANDSHAKE",e[e.OPEN=1]="OPEN",e[e.OPENED=2]="OPENED",e[e.RESPONSE=3]="RESPONSE",e[e.INVOKE=4]="INVOKE",e[e.ABORT=5]="ABORT",e[e.CLOSE=6]="CLOSE",e[e.OPEN_PORT=7]="OPEN_PORT",e[e.ON=8]="ON"}(n||(n={}));let s=0;function i(){return s++}function a(e){return e?"string"==typeof e?JSON.stringify({name:"message",message:e}):e.toJSON?JSON.stringify(e):JSON.stringify({name:e.name,message:e.message,details:e.details||{stack:e.stack}}):null}function c(e,t,r,s){if(t.type===n.OPEN_PORT)return void e.postMessage(t,[t.port]);if(t.type!==n.INVOKE&&t.type!==n.RESPONSE)return void e.postMessage(t);let i;if(function(e){return e&&"object"==typeof e&&("result"in e||"transferList"in e)}(r)?(i=u(r.transferList),t.data=r.result):(i=u(s),t.data=r),i){if((0,o.Z)("ff"))for(const r of i)if("byteLength"in r&&r.byteLength>267386880){const r="Worker call with large ArrayBuffer would crash Firefox";switch(t.type){case n.INVOKE:throw r;case n.RESPONSE:return void c(e,{type:n.RESPONSE,jobId:t.jobId,error:a(r)})}}e.postMessage(t,i)}else e.postMessage(t)}function l(e){if(!e)return null;const t=e.data;return t?"string"==typeof t?JSON.parse(t):t:null}function u(e){if(!e||!e.length)return null;if((0,o.Z)("esri-workers-arraybuffer-transfer"))return e;const t=e.filter((e=>!function(e){return e instanceof ArrayBuffer||e&&e.constructor&&"ArrayBuffer"===e.constructor.name}(e)));return t.length?t:null}},40330:(e,t,r)=>{"use strict";r.d(t,{Dp:()=>l,Nv:()=>i,i8:()=>s,id:()=>a,qh:()=>c});var n=r(80442),o=r(17452);const s="4.26",i={async request(e,t){const{default:n}=await r.e(3172).then(r.bind(r,3172)),s=e.options,i=s.responseType;s.signal=t?.signal,s.responseType="native"===i||"native-request-init"===i?"native-request-init":i&&["blob","json","text"].includes(i)&&(0,o.oh)(e.url)?.after?i:"array-buffer";const a=await n(e.url,s),c={data:a.data,ssl:a.ssl};switch(a.requestOptions?.responseType){case"native-request-init":return delete c.data.signal,c;case"blob":c.data=await c.data.arrayBuffer();break;case"json":c.data=(new TextEncoder).encode(JSON.stringify(c.data)).buffer;break;case"text":c.data=(new TextEncoder).encode(c.data).buffer}return{result:c,transferList:[c.data]}}};let a;function c(e){a=e}function l(e){const t=a&&a.findCredential(e);return t&&t.token?(0,o.ZN)(e,"token",t.token):e}(0,n.Z)("host-webworker")},17202:(e,t,r)=>{"use strict";r.d(t,{$:()=>o,r:()=>n});const n="20221223",o="c16aa57174c1c6e489a1c0f9ee01201b4db67928"}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n](s,s.exports,r),s.exports}r.m=e,r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((t,n)=>(r.f[n](e,t),t)),[])),r.u=e=>"chunks/"+{9:"cd14babd690c96985b05",81:"74d86e7e5ec52a2f6018",98:"74ff8c8f40d2e9c3868b",212:"f3f2759b39ab76cde66c",223:"acf800382cbcd4875865",247:"9d9e3a38c54c41f7764c",402:"1cbffa96ea6683e5f3ec",540:"96536f507bc6e501a4f7",565:"e967ffca641947212992",576:"5ec4fedbbcbb0053cf74",632:"efc9030af5aac27055a1",639:"e048641971aef9dd4da9",661:"0419bb1a147a2c464980",690:"ee91401507833875facc",739:"5983c9f28b7f63c7e1e0",759:"1b0a306176cc184e6926",819:"d1ead6e8aa7e8e21fbc6",837:"38d8d7e5ae339230dd99",908:"a80a9c725c06154ba415",911:"2187672a72e776b9b153",1070:"d9bc849d04147471aa31",1073:"7bc7b6cf75771687d81f",1074:"fa059d94d5051ded85b3",1158:"3714482f3a829d122da1",1227:"89003e387684af5ebeac",1391:"7e4a136131693bd4f77b",1400:"87579d06ffd2a491f7e2",1412:"b78e50c03cd33623eb62",1421:"106329846470141953ad",1423:"d431821ed03a6e7f4fd3",1433:"4d5bdf18feeb9c8cb6ff",1534:"1cf86638f8e097d8e6e2",1545:"c2c288d42129354dc218",1562:"a082bd3e6c6cbae3dba4",1612:"42f2ba5a86c10e50e94e",1761:"1039cd48a12e88baa97a",1773:"6ecca49fdba2618fb972",1785:"c815d4e0fa4f3ad201b6",1790:"3a00f94f8f0d49c60969",1916:"0b8dc54801a7aa5e6be3",1932:"d0807ae56d1e9d187af3",2062:"072f5a672171424668eb",2133:"9b1034ae5cd818ed279c",2134:"edc08ffed2d5bb161c8d",2422:"43f6aa5c6f6a2bf316ef",2592:"3a306358d1e76659f4ca",2664:"06ef2a1a43b2b0b66086",2710:"719ee5c4a064ea9bdfcf",2855:"0877bab7c03a1de2e713",3027:"c1ef0d8977c5c19b135f",3055:"a51c2c5d3e7f764f44d5",3172:"52b6711572ac7e058ce6",3230:"e3fd383aee378cbb0dae",3388:"f45ea484e96f44d69b20",3529:"b1bc79cc01b572f05ca1",3572:"3b689bb038ebc301c3b2",3645:"c9d57014385bff9d0b06",3660:"7f3ac66cee7e68ce945e",3668:"80c7726743baf9f54079",3743:"3c505cf66d538f84ce4b",3810:"6b589f47cb4731df1639",3847:"937a39fa2b24ab80fd13",3852:"d4338bc4a99b71c44dc2",3929:"ccbd36c83dc087b07f1c",3992:"4a2b4574b87be7b98481",4046:"ceb1770ed82fcbf72531",4166:"5f61db625e7f836f96c3",4242:"25f51196669db91dc5fc",4268:"7142779efc4ddba0fb82",4321:"21cc98b592871d141f97",4325:"e95e449c3fab1a03498c",4358:"eab47a18717478014e03",4370:"036384bab7511be0d209",4371:"4b56a15d904a64747e64",4475:"365372b903d5715bf9b7",4499:"423955dd5f10692daf3b",4547:"f2e5c6b7894793b8bd7d",4599:"bb8a670d4a1eaa458bef",4695:"247bc54f3553e91eee66",4807:"3c570c5936252956d795",5004:"faea681c279486b7a5e7",5015:"d75f1c8f8dcabdf32021",5132:"3326536d183a858a2a4d",5159:"ee50d5d0afe9bdccc84d",5179:"8f5ff4eb9d71b36a0036",5235:"7227df502cacbb6d0529",5329:"0e21e5b4d065567a6a91",5468:"7c6427767c26ef2bdf2c",5546:"52d1496c5b224690da1c",5587:"c11d857dca43de2229fc",5590:"f9d01ca95849d589b00b",5732:"83f7e22a12d90ef93e62",5795:"13da7d992cbeb39cc2c7",5837:"c419a26e2b7d20d99cef",5853:"a7bd0f0fe942973e9a22",5886:"c010210770a67a5a0429",5935:"60a08ce29d09cb07ef06",6233:"acfde5a4cce3a4589f15",6237:"1aaf284ce0ee24053bd1",6261:"43b2e17ffd5ffcbcf269",6459:"296cf6c6f3f48665a93e",6481:"2e3a4fc59789013185f4",6502:"78ff7a0a6422df4d9b4c",6584:"4c0d7a074083aa9614bb",6636:"6f7500c4f2b5776cc665",6710:"c860891552d6d886394b",6748:"7bef95b168303bdc4bf1",6774:"22677d246a80195507e6",6785:"3fb4ae8d6e8563a1c255",6794:"51b298a6f0550feb44e7",6810:"f19e2fa3af43966cdc3b",6841:"31de71018575457155e5",6904:"697787ffcb6a2b2125c2",6925:"bad2ec88d0ed090daf56",7035:"46fbfb2f815f4a543d5f",7066:"e9dd3a5c61bae6235f8e",7126:"21396e5788a07a159d77",7154:"75ce17cf13aab0440572",7202:"e9c81eee503c1b112bad",7269:"02497309e0f848bf2879",7277:"ad65c24558098f21bbf3",7374:"96e2589668159601db7e",7386:"eed89430c7bece3e752a",7476:"7a54c711fea397105ebf",7483:"e3ba96417fd75a5d2feb",7541:"190c9feab5f80e586d84",7663:"0b9c53e01d6ac1e7d5ca",7774:"1f742c3b11c76814fa4d",7845:"f8ab6e354834b9c0e857",7873:"21f7d3400c070aa45596",8092:"f1b26b73101210b8f29c",8096:"22a990a8d4d4587866a5",8227:"ee04b1c0c42cb1b18b24",8244:"be3a99c767bf3e613fc5",8363:"7ebc4be4ffe1b37f2792",8383:"e9e64936f01505bb1c1e",8636:"e0b40a4bd4b096db7a33",8691:"8335123c048fcca54808",8758:"803492088780e18de801",8828:"2eb2d49c549e53934b8b",8833:"d447ebc944a9867f5a99",8880:"eee3fb92c649ef45c900",8882:"9c6d64dc3fc89edabac4",9070:"038dc3f9ef06ef3c960c",9169:"ac4c10194e904840a4ad",9230:"df8963df0766e26d20a0",9238:"c6adbf6c29594d4ade80",9243:"d15dd77b6ac668647ab6",9291:"179efcf889111d2576c5",9296:"f86ee9fd7ac176f86796",9300:"1ec2964714528de56607",9324:"692f73ba846b8afa6b67",9513:"fa07f9d9abff17559117",9675:"078a0b134210167b629d",9771:"8914f5e72a51636a59d3",9777:"83c7c2500839c79ae9d4",9880:"1b5bdd80db9a1a410ff8",9884:"356db8b8297282c77291",9903:"6be5edf3c8e21c3ec360",9904:"05bba3ba2f9ee02f52b5"}[e]+".js",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");n.length&&(e=n[n.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),(()=>{var e={134:1};r.f.i=(t,n)=>{e[t]||importScripts(r.p+r.u(t))};var t=self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[],n=t.push.bind(t);t.push=t=>{var[o,s,i]=t;for(var a in s)r.o(s,a)&&(r.m[a]=s[a]);for(i&&i(r);o.length;)e[o.pop()]=1;n(t)}})(),r(88277);var n=r(25045);RemoteClient=n})();
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9904],{88669:(e,t,n)=>{function r(){return[0,0,0,0]}function o(e,t,n,r){return[e,t,n,r]}function i(e,t){return new Float64Array(e,t,4)}function s(){return o(1,1,1,1)}function a(){return o(1,0,0,0)}function c(){return o(0,1,0,0)}function u(){return o(0,0,1,0)}function l(){return o(0,0,0,1)}n.d(t,{a:()=>i,c:()=>r,f:()=>o});const d=s(),f=a(),p=c(),h=u(),y=l();Object.freeze(Object.defineProperty({__proto__:null,create:r,clone:function(e){return[e[0],e[1],e[2],e[3]]},fromValues:o,fromArray:function(e){const t=[0,0,0,0],n=Math.min(4,e.length);for(let r=0;r<n;++r)t[r]=e[r];return t},createView:i,zeros:function(){return[0,0,0,0]},ones:s,unitX:a,unitY:c,unitZ:u,unitW:l,ZEROS:[0,0,0,0],ONES:d,UNIT_X:f,UNIT_Y:p,UNIT_Z:h,UNIT_W:y},Symbol.toStringTag,{value:"Module"}))},62357:(e,t,n)=>{n.d(t,{F2:()=>o,Wz:()=>i,t_:()=>s});const r=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i;function o(e){return e?e/72*96:0}function i(e){return e?72*e/96:0}function s(e){if("string"==typeof e){const t=e.match(r);if(t){const n=Number(t[1]),r=t[3]&&t[3].toLowerCase(),o="-"===e.charAt(0),s="px"===r?i(n):n;return o?-s:s}return console.warn("screenUtils.toPt: input not recognized!"),null}return e}},73572:(e,t,n)=>{n.d(t,{AJ:()=>s,If:()=>c,QM:()=>a,k0:()=>i,nu:()=>o,wx:()=>u}),n(22021);var r=n(62357);n(98766),n(88669);const o=2.4;function i(e){return(0,r.Wz)(e*o)}function s(e){return(0,r.F2)(e)/o}function a(e,t,n,o){const{radius:i,fieldOffset:s,field:a}=t,u=Math.round((0,r.F2)(i)),l=new Float64Array(n*o);let d,f=Number.NEGATIVE_INFINITY;const p=function(e,t){return null!=e?"string"==typeof t?t=>-1*+t.readAttribute(e):n=>+n.readAttribute(e)+t:e=>1}(a,s),h=new Set;for(const t of e){const e=t.getCursor();for(;e.next();){const t=e.getObjectId();if(h.has(t))continue;h.add(t);const r=e.readLegacyPointGeometry(),i=128;if(r.x<-i||r.x>=n+i||r.y<-i||r.y>o+i)continue;const s=+p(e),a=Math.max(0,Math.round(r.x)-u),y=Math.max(0,Math.round(r.y)-u),m=Math.min(o,Math.round(r.y)+u),w=Math.min(n,Math.round(r.x)+u);for(let e=y;e<m;e++)for(let t=a;t<w;t++){const o=e*n+t,i=c(r.x-t,r.y-e,u);d=l[o]+=i*s,d>f&&(f=d)}}}return{matrix:l.buffer,max:f}}function c(e,t,n){const r=Math.sqrt(e**2+t**2)/n;return r>1?0:3/(Math.PI*n**2)*(1-r**2)**2}function u(e,t){return"function"==typeof e?e:e?"string"==typeof t?t=>-1*+t[e]:n=>+n[e]+t:()=>1}},47988:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(43697),o=n(3920),i=n(5600),s=(n(75215),n(67676),n(52011));let a=class extends o.r{initialize(){}destroy(){}get supportsTileUpdates(){return!1}get spatialReference(){const e=this.get("tileStore.tileScheme.spatialReference");return e&&e.toJSON()||null}};(0,r._)([(0,i.Cb)({readOnly:!0})],a.prototype,"supportsTileUpdates",null),(0,r._)([(0,i.Cb)({constructOnly:!0})],a.prototype,"remoteClient",void 0),(0,r._)([(0,i.Cb)({constructOnly:!0})],a.prototype,"service",void 0),(0,r._)([(0,i.Cb)()],a.prototype,"spatialReference",null),(0,r._)([(0,i.Cb)({constructOnly:!0})],a.prototype,"tileInfo",void 0),(0,r._)([(0,i.Cb)({constructOnly:!0})],a.prototype,"tileStore",void 0),a=(0,r._)([(0,s.j)("esri.views.2d.layers.features.processors.BaseProcessor")],a);const c=a},49904:(e,t,n)=>{n.r(t),n.d(t,{default:()=>p});var r=n(43697),o=(n(80442),n(70586)),i=(n(92604),n(75215),n(67676),n(20102),n(52011)),s=n(22862),a=n(73572),c=n(16534),u=n(47988),l=n(14867);class d{constructor(e,t){this.offset=e,this.extent=t}}let f=class extends u.Z{constructor(){super(...arguments),this.type="heatmap",this._tileKeyToFeatureSets=new Map}initialize(){this.handles.add([this.tileStore.on("update",this.onTileUpdate.bind(this))])}async update(e,t){const n=t.schema.processors[0];"heatmap"===n.type&&(0,s.Hg)(this._schema,n)&&(e.mesh=!0,this._schema=n)}onTileUpdate(e){for(const t of e.removed)this._tileKeyToFeatureSets.delete(t.key.id)}onTileClear(e){return this._tileKeyToFeatureSets.delete(e.key.id),this.remoteClient.invoke("tileRenderer.onTileData",{tileKey:e.id,data:{clear:!0}})}async onTileMessage(e,t,n){this._tileKeyToFeatureSets.has(e.key.id)||this._tileKeyToFeatureSets.set(e.key.id,new Map);const r=this._tileKeyToFeatureSets.get(e.key.id);if((0,o.pC)(t.addOrUpdate)&&t.addOrUpdate.hasFeatures&&r.set(t.addOrUpdate.instance,t),t.end){const t=[],r=function(e){const t=e.key,n=new Map,r=256,o=c.I_,i=e.tileInfoView.tileInfo.isWrappable;return n.set((0,l.M)(t,-1,-1,i).id,new d([-o,-o],[o-r,o-r,o,o])),n.set((0,l.M)(t,0,-1,i).id,new d([0,-o],[0,o-r,o,o])),n.set((0,l.M)(t,1,-1,i).id,new d([o,-o],[0,o-r,r,o])),n.set((0,l.M)(t,-1,0,i).id,new d([-o,0],[o-r,0,o,o])),n.set((0,l.M)(t,1,0,i).id,new d([o,0],[0,0,r,o])),n.set((0,l.M)(t,-1,1,i).id,new d([-o,o],[o-r,0,o,r])),n.set((0,l.M)(t,0,1,i).id,new d([0,o],[0,0,o,r])),n.set((0,l.M)(t,1,1,i).id,new d([o,o],[0,0,r,r])),n}(e);this._tileKeyToFeatureSets.forEach(((n,i)=>{if(i===e.key.id)n.forEach((e=>(0,o.yw)(e.addOrUpdate,(e=>t.push(e)))));else if(r.has(i)){const e=r.get(i),[s,a]=e.offset;n.forEach((e=>(0,o.yw)(e.addOrUpdate,(e=>{const n=e.transform(s,a,1,1);t.push(n)}))))}}));const i=(0,a.QM)(t,this._schema.mesh,512,512),s={tileKey:e.key.id,intensityInfo:i},u=[i.matrix];return this.remoteClient.invoke("tileRenderer.onTileData",s,{...n,transferList:u})}}onTileError(e,t,n){return this.remoteClient.invoke("tileRenderer.onTileError",{tileKey:e.id,error:t},n)}};f=(0,r._)([(0,i.j)("esri.views.2d.layers.features.processors.HeatmapProcessor")],f);const p=f},14867:(e,t,n)=>{function r(e,t,n,r){const o=e.clone(),i=1<<o.level,s=o.col+t,a=o.row+n;return r&&s<0?(o.col=s+i,o.world-=1):s>=i?(o.col=s-i,o.world+=1):o.col=s,o.row=a,o}n.d(t,{M:()=>r}),n(3651)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9904],{88669:(e,t,n)=>{function r(){return[0,0,0,0]}function o(e,t,n,r){return[e,t,n,r]}function i(e,t){return new Float64Array(e,t,4)}function s(){return o(1,1,1,1)}function a(){return o(1,0,0,0)}function c(){return o(0,1,0,0)}function u(){return o(0,0,1,0)}function l(){return o(0,0,0,1)}n.d(t,{a:()=>i,c:()=>r,f:()=>o});const d=s(),f=a(),p=c(),h=u(),y=l();Object.freeze(Object.defineProperty({__proto__:null,create:r,clone:function(e){return[e[0],e[1],e[2],e[3]]},fromValues:o,fromArray:function(e){const t=[0,0,0,0],n=Math.min(4,e.length);for(let r=0;r<n;++r)t[r]=e[r];return t},createView:i,zeros:function(){return[0,0,0,0]},ones:s,unitX:a,unitY:c,unitZ:u,unitW:l,ZEROS:[0,0,0,0],ONES:d,UNIT_X:f,UNIT_Y:p,UNIT_Z:h,UNIT_W:y},Symbol.toStringTag,{value:"Module"}))},62357:(e,t,n)=>{n.d(t,{F2:()=>o,Wz:()=>i,t_:()=>s});const r=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i;function o(e){return e?e/72*96:0}function i(e){return e?72*e/96:0}function s(e){if("string"==typeof e){const t=e.match(r);if(t){const n=Number(t[1]),r=t[3]&&t[3].toLowerCase(),o="-"===e.charAt(0),s="px"===r?i(n):n;return o?-s:s}return console.warn("screenUtils.toPt: input not recognized!"),null}return e}},73572:(e,t,n)=>{n.d(t,{AJ:()=>s,If:()=>c,QM:()=>a,k0:()=>i,nu:()=>o,wx:()=>u}),n(22021);var r=n(62357);n(98766),n(88669);const o=2.4;function i(e){return(0,r.Wz)(e*o)}function s(e){return(0,r.F2)(e)/o}function a(e,t,n,o){const{radius:i,fieldOffset:s,field:a}=t,u=Math.round((0,r.F2)(i)),l=new Float64Array(n*o);let d,f=Number.NEGATIVE_INFINITY;const p=function(e,t){return null!=e?"string"==typeof t?t=>-1*+t.readAttribute(e):n=>+n.readAttribute(e)+t:e=>1}(a,s),h=new Set;for(const t of e){const e=t.getCursor();for(;e.next();){const t=e.getObjectId();if(h.has(t))continue;h.add(t);const r=e.readLegacyPointGeometry(),i=128;if(r.x<-i||r.x>=n+i||r.y<-i||r.y>o+i)continue;const s=+p(e),a=Math.max(0,Math.round(r.x)-u),y=Math.max(0,Math.round(r.y)-u),m=Math.min(o,Math.round(r.y)+u),w=Math.min(n,Math.round(r.x)+u);for(let e=y;e<m;e++)for(let t=a;t<w;t++){const o=e*n+t,i=c(r.x-t,r.y-e,u);d=l[o]+=i*s,d>f&&(f=d)}}}return{matrix:l.buffer,max:f}}function c(e,t,n){const r=Math.sqrt(e**2+t**2)/n;return r>1?0:3/(Math.PI*n**2)*(1-r**2)**2}function u(e,t){return"function"==typeof e?e:e?"string"==typeof t?t=>-1*+t[e]:n=>+n[e]+t:()=>1}},47988:(e,t,n)=>{n.d(t,{Z:()=>c});var r=n(43697),o=n(3920),i=n(5600),s=(n(75215),n(67676),n(52011));let a=class extends o.r{initialize(){}destroy(){}get supportsTileUpdates(){return!1}get spatialReference(){const e=this.get("tileStore.tileScheme.spatialReference");return e&&e.toJSON()||null}};(0,r._)([(0,i.Cb)({readOnly:!0})],a.prototype,"supportsTileUpdates",null),(0,r._)([(0,i.Cb)({constructOnly:!0})],a.prototype,"remoteClient",void 0),(0,r._)([(0,i.Cb)({constructOnly:!0})],a.prototype,"service",void 0),(0,r._)([(0,i.Cb)()],a.prototype,"spatialReference",null),(0,r._)([(0,i.Cb)({constructOnly:!0})],a.prototype,"tileInfo",void 0),(0,r._)([(0,i.Cb)({constructOnly:!0})],a.prototype,"tileStore",void 0),a=(0,r._)([(0,s.j)("esri.views.2d.layers.features.processors.BaseProcessor")],a);const c=a},49904:(e,t,n)=>{n.r(t),n.d(t,{default:()=>p});var r=n(43697),o=(n(80442),n(70586)),i=(n(92604),n(75215),n(67676),n(20102),n(52011)),s=n(22862),a=n(73572),c=n(16534),u=n(47988),l=n(14867);class d{constructor(e,t){this.offset=e,this.extent=t}}let f=class extends u.Z{constructor(){super(...arguments),this.type="heatmap",this._tileKeyToFeatureSets=new Map}initialize(){this.handles.add([this.tileStore.on("update",this.onTileUpdate.bind(this))])}async update(e,t){const n=t.schema.processors[0];"heatmap"===n.type&&(0,s.Hg)(this._schema,n)&&(e.mesh=!0,this._schema=n)}onTileUpdate(e){for(const t of e.removed)this._tileKeyToFeatureSets.delete(t.key.id)}onTileClear(e){return this._tileKeyToFeatureSets.delete(e.key.id),this.remoteClient.invoke("tileRenderer.onTileData",{tileKey:e.id,data:{clear:!0}})}async onTileMessage(e,t,n){this._tileKeyToFeatureSets.has(e.key.id)||this._tileKeyToFeatureSets.set(e.key.id,new Map);const r=this._tileKeyToFeatureSets.get(e.key.id);if(r&&(0,o.pC)(t.addOrUpdate)&&t.addOrUpdate.hasFeatures&&r.set(t.addOrUpdate.instance,t),t.end){const t=[],r=function(e){const t=e.key,n=new Map,r=256,o=c.I_,i=e.tileInfoView.tileInfo.isWrappable;return n.set((0,l.M)(t,-1,-1,i).id,new d([-o,-o],[o-r,o-r,o,o])),n.set((0,l.M)(t,0,-1,i).id,new d([0,-o],[0,o-r,o,o])),n.set((0,l.M)(t,1,-1,i).id,new d([o,-o],[0,o-r,r,o])),n.set((0,l.M)(t,-1,0,i).id,new d([-o,0],[o-r,0,o,o])),n.set((0,l.M)(t,1,0,i).id,new d([o,0],[0,0,r,o])),n.set((0,l.M)(t,-1,1,i).id,new d([-o,o],[o-r,0,o,r])),n.set((0,l.M)(t,0,1,i).id,new d([0,o],[0,0,o,r])),n.set((0,l.M)(t,1,1,i).id,new d([o,o],[0,0,r,r])),n}(e);this._tileKeyToFeatureSets.forEach(((n,i)=>{if(i===e.key.id)n.forEach((e=>(0,o.yw)(e.addOrUpdate,(e=>t.push(e)))));else if(r.has(i)){const e=r.get(i),[s,a]=e.offset;n.forEach((e=>(0,o.yw)(e.addOrUpdate,(e=>{const n=e.transform(s,a,1,1);t.push(n)}))))}}));const i=(0,a.QM)(t,this._schema.mesh,512,512),s={tileKey:e.key.id,intensityInfo:i},u=[i.matrix];return this.remoteClient.invoke("tileRenderer.onTileData",s,{...n,transferList:u})}}onTileError(e,t,n){return this.remoteClient.invoke("tileRenderer.onTileError",{tileKey:e.id,error:t},n)}};f=(0,r._)([(0,i.j)("esri.views.2d.layers.features.processors.HeatmapProcessor")],f);const p=f},14867:(e,t,n)=>{function r(e,t,n,r){const o=e.clone(),i=1<<o.level,s=o.col+t,a=o.row+n;return r&&s<0?(o.col=s+i,o.world-=1):s>=i?(o.col=s-i,o.world+=1):o.col=s,o.row=a,o}n.d(t,{M:()=>r}),n(3651)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1916],{36030:(e,t,r)=>{r.d(t,{J:()=>s});var n=r(35454),i=r(5600);function s(e,t={}){const r=e instanceof n.X?e:new n.X(e,t),s={type:t?.ignoreUnknown??1?r.apiValues:String,json:{type:r.jsonValues,read:!t?.readOnly&&{reader:r.read},write:{writer:r.write}}};return void 0!==t?.readOnly&&(s.readOnly=!!t.readOnly),void 0!==t?.default&&(s.json.default=t.default),void 0!==t?.name&&(s.json.name=t.name),void 0!==t?.nonNullable&&(s.nonNullable=t.nonNullable),(0,i.Cb)(s)}},43090:(e,t,r)=>{function n(e){return 32+e.length}function i(e){if(!e)return 0;let t=l;for(const r in e)if(e.hasOwnProperty(r)){const i=e[r];switch(typeof i){case"string":t+=n(i);break;case"number":t+=16;break;case"boolean":t+=4}}return t}function s(e){if(!e)return 0;if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return 32+8*t;let r=u;for(let n=0;n<t;n++)r+=o(e[n]);return r}(e);let t=l;for(const r in e)e.hasOwnProperty(r)&&(t+=o(e[r]));return t}function o(e){switch(typeof e){case"object":return s(e);case"string":return n(e);case"number":return 16;case"boolean":return 4;default:return 8}}function a(e,t){return u+e.length*t}r.d(t,{Ul:()=>s,Y8:()=>c,do:()=>a,f2:()=>i});const l=32,u=32;var c;!function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(c||(c={}))},74085:(e,t,r)=>{function n(e){}r.d(t,{Bg:()=>n}),r(80442)},45091:(e,t,r)=>{r.d(t,{Z:()=>c});var n,i,s=r(80442),o=r(71143);(i=n||(n={}))[i.varint=0]="varint",i[i.fixed64=1]="fixed64",i[i.delimited=2]="delimited",i[i.fixed32=5]="fixed32",i[i.unknown=99]="unknown";const a=4294967296,l=new TextDecoder("utf-8"),u=(0,s.Z)("safari")||(0,s.Z)("ios")?6:(0,s.Z)("ff")?12:32;class c{constructor(e,t,r=0,i=(e?e.byteLength:0)){this._tag=0,this._dataType=n.unknown,this._init(e,t,r,i)}_init(e,t,r,n){this._data=e,this._dataView=t,this._pos=r,this._end=n}asUnsafe(){return this}clone(){return new c(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;const t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let e=4294967295;return e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128?e:(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128?e:void 0))))}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();if(void 0!==e)return e>>>1^-(1&e)|0}getSInt64(){return this._decodeSVarint()}getBool(){const e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){const e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getUint32(t+4,!0)*a;return this._skip(8),r}getSFixed64(){const e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getInt32(t+4,!0)*a;return this._skip(8),r}getDouble(){const e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}getFixed32(){const e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}getSFixed32(){const e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}getFloat(){const e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}getString(){const e=this._getLength(),t=this._pos,r=this._toString(this._data,t,t+e);return this._skip(e),r}getBytes(){const e=this._getLength(),t=this._pos,r=this._toBytes(this._data,t,t+e);return this._skip(e),r}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,r,n){const i=this.getMessage(),s=e(i,t,r,n);return i.release(),s}processMessage(e){const t=this.getMessage(),r=e(t);return t.release(),r}getMessage(){const e=this._getLength(),t=c.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){c.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case n.varint:this._decodeVarint();break;case n.fixed64:this._skip(8);break;case n.delimited:this._skip(this._getLength());break;case n.fixed32:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipLen(e){this._skip(e)}_skip(e){if(this._pos+e>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=e}_decodeVarint(){const e=this._data;let t=this._pos,r=0,n=0;if(this._end-t>=10)do{if(n=e[t++],r|=127&n,0==(128&n))break;if(n=e[t++],r|=(127&n)<<7,0==(128&n))break;if(n=e[t++],r|=(127&n)<<14,0==(128&n))break;if(n=e[t++],r|=(127&n)<<21,0==(128&n))break;if(n=e[t++],r+=268435456*(127&n),0==(128&n))break;if(n=e[t++],r+=34359738368*(127&n),0==(128&n))break;if(n=e[t++],r+=4398046511104*(127&n),0==(128&n))break;if(n=e[t++],r+=562949953421312*(127&n),0==(128&n))break;if(n=e[t++],r+=72057594037927940*(127&n),0==(128&n))break;if(n=e[t++],r+=0x8000000000000000*(127&n),0==(128&n))break;throw new Error("Varint too long!")}while(0);else{let i=1;for(;t!==this._end&&(n=e[t],0!=(128&n));)++t,r+=(127&n)*i,i*=128;if(t===this._end)throw new Error("Varint overrun!");++t,r+=n*i}return this._pos=t,r}_decodeSVarint(){const e=this._data;let t=this._pos,r=0,n=0;const i=1&e[t];if(this._end-t>=10)do{if(n=e[t++],r|=127&n,0==(128&n))break;if(n=e[t++],r|=(127&n)<<7,0==(128&n))break;if(n=e[t++],r|=(127&n)<<14,0==(128&n))break;if(n=e[t++],r|=(127&n)<<21,0==(128&n))break;if(n=e[t++],r+=268435456*(127&n),0==(128&n))break;if(n=e[t++],r+=34359738368*(127&n),0==(128&n))break;if(n=e[t++],r+=4398046511104*(127&n),0==(128&n))break;if(n=e[t++],r+=562949953421312*(127&n),0==(128&n))break;if(n=e[t++],r+=72057594037927940*(127&n),0==(128&n))break;if(n=e[t++],r+=0x8000000000000000*(127&n),0==(128&n))break;throw new Error("Varint too long!")}while(0);else{let i=1;for(;t!==this._end&&(n=e[t],0!=(128&n));)++t,r+=(127&n)*i,i*=128;if(t===this._end)throw new Error("Varint overrun!");++t,r+=n*i}return this._pos=t,i?-(r+1)/2:r/2}_getLength(){if(this._dataType!==n.delimited)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(e,t,r){if((r=Math.min(this._end,r))-t>u){const n=e.subarray(t,r);return l.decode(n)}let n="",i="";for(let s=t;s<r;++s){const t=e[s];128&t?i+="%"+t.toString(16):(n+=decodeURIComponent(i)+String.fromCharCode(t),i="")}return i.length&&(n+=decodeURIComponent(i)),n}_toBytes(e,t,r){return r=Math.min(this._end,r),new Uint8Array(e.buffer,t,r-t)}}c.pool=new o.Z(c,void 0,(e=>{e._data=null,e._dataView=null}))},60437:(e,t,r)=>{r.d(t,{Gv:()=>_,HH:()=>a,JR:()=>y,TC:()=>l,Tn:()=>d,Ue:()=>s,al:()=>o,cS:()=>f,dp:()=>c,fS:()=>m,op:()=>h,pp:()=>u,t8:()=>p});var n=r(70586),i=r(6570);function s(e=b){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,r,n,i,o,a=s()){return a[0]=e,a[1]=t,a[2]=r,a[3]=n,a[4]=i,a[5]=o,a}function a(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.Z(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function u(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function c(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function h(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function d(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function p(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function f(e){return e?p(e,_):s(_)}function y(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function g(e){return 6===e.length}function m(e,t,r){if((0,n.Wi)(e)||(0,n.Wi)(t))return e===t;if(!g(e)||!g(t))return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(24470);const _=[1/0,1/0,1/0,-1/0,-1/0,-1/0],b=[0,0,0,0,0,0];s()},24470:(e,t,r)=>{r.d(t,{Gv:()=>_,HH:()=>u,SO:()=>h,Ue:()=>s,al:()=>a,cS:()=>y,fS:()=>m,jE:()=>d,jn:()=>c,kK:()=>p,oJ:()=>l,r3:()=>f}),r(80442),r(22021);var n=r(70586),i=r(6570);function s(e=b){return[e[0],e[1],e[2],e[3]]}function o(e,t){return e!==t&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3]),e}function a(e,t,r,n,i=s()){return i[0]=e,i[1]=t,i[2]=r,i[3]=n,i}function l(e,t=s()){return t[0]=e.xmin,t[1]=e.ymin,t[2]=e.xmax,t[3]=e.ymax,t}function u(e,t){return new i.Z({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:t})}function c(e,t,r){if((0,n.Wi)(t))o(r,e);else if("length"in t)g(t)?(r[0]=Math.min(e[0],t[0]),r[1]=Math.min(e[1],t[1]),r[2]=Math.max(e[2],t[2]),r[3]=Math.max(e[3],t[3])):2!==t.length&&3!==t.length||(r[0]=Math.min(e[0],t[0]),r[1]=Math.min(e[1],t[1]),r[2]=Math.max(e[2],t[0]),r[3]=Math.max(e[3],t[1]));else switch(t.type){case"extent":r[0]=Math.min(e[0],t.xmin),r[1]=Math.min(e[1],t.ymin),r[2]=Math.max(e[2],t.xmax),r[3]=Math.max(e[3],t.ymax);break;case"point":r[0]=Math.min(e[0],t.x),r[1]=Math.min(e[1],t.y),r[2]=Math.max(e[2],t.x),r[3]=Math.max(e[3],t.y)}}function h(e){return function(e){return(0,n.Wi)(e)||e[0]>=e[2]?0:e[2]-e[0]}(e)*function(e){return e[1]>=e[3]?0:e[3]-e[1]}(e)}function d(e,t,r){return t>=e[0]&&r>=e[1]&&t<=e[2]&&r<=e[3]}function p(e,t){return Math.max(t[0],e[0])<=Math.min(t[2],e[2])&&Math.max(t[1],e[1])<=Math.min(t[3],e[3])}function f(e,t){return t[0]>=e[0]&&t[2]<=e[2]&&t[1]>=e[1]&&t[3]<=e[3]}function y(e){return e?o(e,_):s(_)}function g(e){return null!=e&&4===e.length}function m(e,t){return g(e)&&g(t)?e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]:e===t}const _=[1/0,1/0,-1/0,-1/0],b=[0,0,0,0]},33955:(e,t,r)=>{r.d(t,{Ji:()=>g,YX:()=>c,aW:()=>h,im:()=>y,l9:()=>p,oU:()=>f,q9:()=>_,wp:()=>d});var n=r(70586),i=r(6570),s=r(9361),o=r(65091),a=r(94139),l=r(38913),u=r(58901);function c(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function h(e){return void 0!==e.points}function d(e){return void 0!==e.x&&void 0!==e.y}function p(e){return void 0!==e.paths}function f(e){return void 0!==e.rings}function y(e){return(0,n.Wi)(e)?null:e instanceof s.Z?e:d(e)?a.Z.fromJSON(e):p(e)?u.Z.fromJSON(e):f(e)?l.Z.fromJSON(e):h(e)?o.Z.fromJSON(e):c(e)?i.Z.fromJSON(e):null}function g(e){return e?d(e)?"esriGeometryPoint":p(e)?"esriGeometryPolyline":f(e)?"esriGeometryPolygon":c(e)?"esriGeometryEnvelope":h(e)?"esriGeometryMultipoint":null:null}const m={esriGeometryPoint:a.Z,esriGeometryPolyline:u.Z,esriGeometryPolygon:l.Z,esriGeometryEnvelope:i.Z,esriGeometryMultipoint:o.Z};function _(e){return e&&m[e]||null}},82397:(e,t,r)=>{r.d(t,{G6:()=>g,Ie:()=>y,J9:()=>p,RF:()=>d,U1:()=>f,vY:()=>a});var n=r(70586);r(33955);const i=(e,t,r)=>[t,r],s=(e,t,r)=>[t,r,e[2]],o=(e,t,r)=>[t,r,e[2],e[3]];function a(e){return e?{originPosition:"upper-left"===e.originPosition?"upperLeft":"lower-left"===e.originPosition?"lowerLeft":e.originPosition,scale:e.tolerance?[e.tolerance,e.tolerance]:[1,1],translate:(0,n.pC)(e.extent)?[e.extent.xmin,e.extent.ymax]:[0,0]}:null}function l({scale:e,translate:t},r){return r*e[0]+t[0]}function u({scale:e,translate:t},r){return t[1]-r*e[1]}function c(e,t,r){const n=new Array(r.length);if(!r.length)return n;const[i,s]=e.scale;let o=l(e,r[0][0]),a=u(e,r[0][1]);n[0]=t(r[0],o,a);for(let e=1;e<r.length;e++){const l=r[e];o+=l[0]*i,a-=l[1]*s,n[e]=t(l,o,a)}return n}function h(e,t,r){const n=new Array(r.length);for(let i=0;i<r.length;i++)n[i]=c(e,t,r[i]);return n}function d(e,t,r,n,i){return t.x=function({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}(e,r.x),t.y=function({scale:e,translate:t},r){return Math.round((t[1]-r)/e[1])}(e,r.y),t!==r&&(n&&(t.z=r.z),i&&(t.m=r.m)),t}function p(e,t,r,a,l){return(0,n.pC)(r)&&(t.points=function(e,t,r,n){return c(e,r?n?o:s:n?s:i,t)}(e,r.points,a,l)),t}function f(e,t,r,i,s){return(0,n.Wi)(r)||(t.x=l(e,r.x),t.y=u(e,r.y),t!==r&&(i&&(t.z=r.z),s&&(t.m=r.m))),t}function y(e,t,r,a,l){return(0,n.pC)(r)&&(t.rings=function(e,t,r,n){return h(e,r?n?o:s:n?s:i,t)}(e,r.rings,a,l)),t}function g(e,t,r,a,l){return(0,n.pC)(r)&&(t.paths=function(e,t,r,n){return h(e,r?n?o:s:n?s:i,t)}(e,r.paths,a,l)),t}},86973:(e,t,r)=>{r.d(t,{Mk:()=>i,P$:()=>s});var n=r(35454);const i=(0,n.w)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),s=(0,n.w)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"})},69285:(e,t,r)=>{r.d(t,{k:()=>o});var n=r(70586),i=r(67900),s=r(8744);function o(e,t,r){if((0,n.Wi)(t)||(0,n.Wi)(r)||r.vcsWkid||(0,s.fS)(t,r))return null;const o=(0,i._R)(t)/(0,i._R)(r);if(1===o)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){e&&null!=e.z&&(e.z*=t)}(e,o);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const r of e.paths)for(const e of r)e.length>2&&(e[2]*=t)}(e,o);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const r of e.rings)for(const e of r)e.length>2&&(e[2]*=t)}(e,o);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const r of e.points)r.length>2&&(r[2]*=t)}(e,o);case"extent":case"esriGeometryExtent":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,o);default:return null}}},1231:(e,t,r)=>{r.d(t,{Z:()=>g});var n,i=r(43697),s=r(35454),o=r(96674),a=r(5600),l=r(75215),u=(r(67676),r(36030)),c=r(71715),h=r(52011),d=r(72729),p=r(86719);const f=new s.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let y=n=class extends o.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=-1,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?f.fromJSON(r.fieldValueType):null}clone(){return new n({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],y.prototype,"alias",void 0),(0,i._)([(0,a.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],y.prototype,"defaultValue",void 0),(0,i._)([(0,a.Cb)()],y.prototype,"description",void 0),(0,i._)([(0,c.r)("description")],y.prototype,"readDescription",null),(0,i._)([(0,a.Cb)({types:d.V5,json:{read:{reader:d.im},write:!0}})],y.prototype,"domain",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],y.prototype,"editable",void 0),(0,i._)([(0,a.Cb)({type:l.z8,json:{write:!0}})],y.prototype,"length",void 0),(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],y.prototype,"name",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],y.prototype,"nullable",void 0),(0,i._)([(0,u.J)(p.v)],y.prototype,"type",void 0),(0,i._)([(0,a.Cb)()],y.prototype,"valueType",void 0),(0,i._)([(0,c.r)("valueType",["description"])],y.prototype,"readValueType",null),(0,i._)([(0,a.Cb)({type:Boolean,json:{read:!1}})],y.prototype,"visible",void 0),y=n=(0,i._)([(0,h.j)("esri.layers.support.Field")],y);const g=y},72729:(e,t,r)=>{r.d(t,{im:()=>v,V5:()=>T}),r(80442);var n,i=r(43697),s=r(22974),o=r(5600),a=(r(75215),r(36030)),l=r(52011),u=r(96674);r(67676);let c=n=class extends u.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new n({name:this.name,code:this.code})}};(0,i._)([(0,o.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,i._)([(0,o.Cb)({type:[String,Number],json:{write:!0}})],c.prototype,"code",void 0),c=n=(0,i._)([(0,l.j)("esri.layers.support.CodedValue")],c);const h=new(r(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends u.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,i._)([(0,o.Cb)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,i._)([(0,a.J)(h)],d.prototype,"type",void 0),d=(0,i._)([(0,l.j)("esri.layers.support.Domain")],d);const p=d;var f;let y=f=class extends p{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new f({codedValues:(0,s.d9)(this.codedValues),name:this.name})}};(0,i._)([(0,o.Cb)({type:[c],json:{write:!0}})],y.prototype,"codedValues",void 0),(0,i._)([(0,a.J)({codedValue:"coded-value"})],y.prototype,"type",void 0),y=f=(0,i._)([(0,l.j)("esri.layers.support.CodedValueDomain")],y);const g=y;var m;r(92604),r(20102);let _=m=class extends p{constructor(e){super(e),this.type="inherited"}clone(){return new m}};(0,i._)([(0,a.J)({inherited:"inherited"})],_.prototype,"type",void 0),_=m=(0,i._)([(0,l.j)("esri.layers.support.InheritedDomain")],_);const b=_;var k;let w=k=class extends p{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new k({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,i._)([(0,o.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],w.prototype,"maxValue",void 0),(0,i._)([(0,o.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],w.prototype,"minValue",void 0),(0,i._)([(0,a.J)({range:"range"})],w.prototype,"type",void 0),w=k=(0,i._)([(0,l.j)("esri.layers.support.RangeDomain")],w);const x=w,T={key:"type",base:p,typeMap:{range:w,"coded-value":g,inherited:b}};function v(e){if(!e||!e.type)return null;switch(e.type){case"range":return x.fromJSON(e);case"codedValue":return g.fromJSON(e);case"inherited":return b.fromJSON(e)}return null}},86719:(e,t,r)=>{r.d(t,{v:()=>n});const n=new(r(35454).X)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml"})},77863:(e,t,r)=>{r.d(t,{G$:()=>v,K9:()=>F,O7:()=>h});var n=r(20102),i=r(70586),s=r(45091),o=r(5428),a=r(78760);const l=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeString","esriFieldTypeDate","esriFieldTypeOID","esriFieldTypeGeometry","esriFieldTypeBlob","esriFieldTypeRaster","esriFieldTypeGUID","esriFieldTypeGlobalID","esriFieldTypeXML"],u=["sqlTypeBigInt","sqlTypeBinary","sqlTypeBit","sqlTypeChar","sqlTypeDate","sqlTypeDecimal","sqlTypeDouble","sqlTypeFloat","sqlTypeGeometry","sqlTypeGUID","sqlTypeInteger","sqlTypeLongNVarchar","sqlTypeLongVarbinary","sqlTypeLongVarchar","sqlTypeNChar","sqlTypeNVarchar","sqlTypeOther","sqlTypeReal","sqlTypeSmallInt","sqlTypeSqlXml","sqlTypeTime","sqlTypeTimestamp","sqlTypeTimestamp2","sqlTypeTinyInt","sqlTypeVarbinary","sqlTypeVarchar"],c=["upperLeft","lowerLeft"];function h(e){return e>=l.length?null:l[e]}function d(e){return e>=u.length?null:u[e]}function p(e){return e>=c.length?null:c[e]}function f(e,t){return t>=e.geometryTypes.length?null:e.geometryTypes[t]}function y(e,t,r){const n=e.asUnsafe(),i=t.createPointGeometry(r);for(;n.next();)switch(n.tag()){case 3:{const e=n.getUInt32(),r=n.pos()+e;let s=0;for(;n.pos()<r;)t.addCoordinatePoint(i,n.getSInt64(),s++);break}default:n.skip()}return i}function g(e,t,r){const n=e.asUnsafe(),i=t.createGeometry(r),s=2+(r.hasZ?1:0)+(r.hasM?1:0);for(;n.next();)switch(n.tag()){case 2:{const e=n.getUInt32(),r=n.pos()+e;let s=0;for(;n.pos()<r;)t.addLength(i,n.getUInt32(),s++);break}case 3:{const e=n.getUInt32(),r=n.pos()+e;let o=0;for(t.allocateCoordinates(i);n.pos()<r;)t.addCoordinate(i,n.getSInt64(),o),o++,o===s&&(o=0);break}default:n.skip()}return i}function m(e){const t=e.asUnsafe(),r=new o.Z;let n="esriGeometryPoint";for(;t.next();)switch(t.tag()){case 2:{const e=t.getUInt32(),n=t.pos()+e;for(;t.pos()<n;)r.lengths.push(t.getUInt32());break}case 3:{const e=t.getUInt32(),n=t.pos()+e;for(;t.pos()<n;)r.coords.push(t.getSInt64());break}case 1:n=a.A[t.getEnum()];break;default:t.skip()}return{queryGeometry:r,queryGeometryType:n}}function _(e){const t=e.asUnsafe();for(;t.next();)switch(t.tag()){case 1:return t.getString();case 2:return t.getFloat();case 3:return t.getDouble();case 4:return t.getSInt32();case 5:return t.getUInt32();case 6:return t.getInt64();case 7:return t.getUInt64();case 8:return t.getSInt64();case 9:return t.getBool();default:return t.skip(),null}return null}function b(e){const t=e.asUnsafe(),r={type:h(0)};for(;t.next();)switch(t.tag()){case 1:r.name=t.getString();break;case 2:r.type=h(t.getEnum());break;case 3:r.alias=t.getString();break;case 4:r.sqlType=d(t.getEnum());break;case 5:default:t.skip();break;case 6:r.defaultValue=t.getString()}return r}function k(e){const t={},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.name=r.getString();break;case 2:t.isSystemMaintained=r.getBool();break;default:r.skip()}return t}function w(e,t,r,n){const i=t.createFeature(r);let s=0;for(;e.next();)switch(e.tag()){case 1:{const t=n[s++].name;i.attributes[t]=e.processMessage(_);break}case 2:i.geometry=e.processMessageWithArgs(g,t,r);break;case 4:i.centroid=e.processMessageWithArgs(y,t,r);break;default:e.skip()}return i}function x(e){const t=[1,1,1,1],r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t[0]=r.getDouble();break;case 2:t[1]=r.getDouble();break;case 4:t[2]=r.getDouble();break;case 3:t[3]=r.getDouble();break;default:r.skip()}return t}function T(e){const t=[0,0,0,0],r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t[0]=r.getDouble();break;case 2:t[1]=r.getDouble();break;case 4:t[2]=r.getDouble();break;case 3:t[3]=r.getDouble();break;default:r.skip()}return t}function v(e){const t={originPosition:p(0)},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.originPosition=p(r.getEnum());break;case 2:t.scale=r.processMessage(x);break;case 3:t.translate=r.processMessage(T);break;default:r.skip()}return t}function M(e){const t={},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.shapeAreaFieldName=r.getString();break;case 2:t.shapeLengthFieldName=r.getString();break;case 3:t.units=r.getString();break;default:r.skip()}return t}function S(e,t){const r=t.createSpatialReference();for(;e.next();)switch(e.tag()){case 1:r.wkid=e.getUInt32();break;case 5:r.wkt=e.getString();break;case 2:r.latestWkid=e.getUInt32();break;case 3:r.vcsWkid=e.getUInt32();break;case 4:r.latestVcsWkid=e.getUInt32();break;default:e.skip()}return r}function G(e,t){const r=t.createFeatureResult(),n=e.asUnsafe();r.geometryType=f(t,0);let i=!1;for(;n.next();)switch(n.tag()){case 1:r.objectIdFieldName=n.getString();break;case 3:r.globalIdFieldName=n.getString();break;case 4:r.geohashFieldName=n.getString();break;case 5:r.geometryProperties=n.processMessage(M);break;case 7:r.geometryType=f(t,n.getEnum());break;case 8:r.spatialReference=n.processMessageWithArgs(S,t);break;case 10:r.hasZ=n.getBool();break;case 11:r.hasM=n.getBool();break;case 12:r.transform=n.processMessage(v);break;case 9:{const e=n.getBool();r.exceededTransferLimit=e;break}case 13:t.addField(r,n.processMessage(b));break;case 15:i||(t.prepareFeatures(r),i=!0),t.addFeature(r,n.processMessageWithArgs(w,t,r,r.fields));break;case 2:r.uniqueIdField=n.processMessage(k);break;default:n.skip()}return t.finishFeatureResult(r),r}function I(e,t){const r={};let n=null;for(;e.next();)switch(e.tag()){case 4:n=e.processMessageWithArgs(m);break;case 1:r.featureResult=e.processMessageWithArgs(G,t);break;default:e.skip()}return(0,i.pC)(n)&&r.featureResult&&t.addQueryGeometry(r,n),r}function F(e,t){try{const r=2,n=new s.Z(new Uint8Array(e),new DataView(e)),i={};for(;n.next();)n.tag()===r?i.queryResult=n.processMessageWithArgs(I,t):n.skip();return i}catch(e){throw new n.Z("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:e})}}},78760:(e,t,r)=>{r.d(t,{A:()=>l,J:()=>u});var n=r(67900),i=r(8744),s=r(70272),o=r(44876),a=r(5428);const l=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];class u{constructor(e){this._options=e,this.geometryTypes=l,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new o.Z}prepareFeatures(e){this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++}finishFeatureResult(e){if(!e||!e.features||!e.hasZ||!this._options.sourceSpatialReference||!e.spatialReference||(0,i.fS)(e.spatialReference,this._options.sourceSpatialReference)||e.spatialReference.vcsWkid)return;const t=(0,n._R)(this._options.sourceSpatialReference)/(0,n._R)(e.spatialReference);if(1!==t)for(const r of e.features){if(!(0,s.S6)(r))continue;const e=r.geometry.coords;for(let r=2;r<e.length;r+=3)e[r]*=t}}addFeature(e,t){e.features.push(t)}createFeature(){return new s.u_}createSpatialReference(){return{wkid:0}}createGeometry(){return new a.Z}addField(e,t){e.fields.push(t)}allocateCoordinates(e){e.coords.length=e.lengths.reduce(((e,t)=>e+t),0)*this._vertexDimension,this._coordinatePtr=0}addCoordinate(e,t){e.coords[this._coordinatePtr++]=t}addCoordinatePoint(e,t){e.coords.push(t)}addLength(e,t){e.lengths.push(t)}addQueryGeometry(e,t){e.queryGeometry=t.queryGeometry,e.queryGeometryType=t.queryGeometryType}createPointGeometry(){return new a.Z}}},45178:(e,t,r)=>{r.d(t,{C:()=>i});var n=r(77863);function i(e,t){const r=(0,n.K9)(e,t),i=r.queryResult.featureResult,s=r.queryResult.queryGeometry,o=r.queryResult.queryGeometryType;if(i&&i.features&&i.features.length&&i.objectIdFieldName){const e=i.objectIdFieldName;for(const t of i.features)t.attributes&&(t.objectId=t.attributes[e])}return i&&(i.queryGeometry=s,i.queryGeometryType=o),i}},61916:(e,t,r)=>{r.r(t),r.d(t,{default:()=>T});var n=r(74085),i=r(70586),s=r(99001),o=r(82971),a=r(69285),l=(r(43090),r(80442),r(60437)),u=r(24470),c=(r(82397),r(86973),r(1231));r(8744);class h{constructor(e,t,r){this.uid=e,this.geometry=t,this.attributes=r,this.visible=!0,this.objectId=null,this.centroid=null}}class d{constructor(){this.exceededTransferLimit=!1,this.features=[],this.fields=[],this.hasM=!1,this.hasZ=!1,this.geometryType=null,this.objectIdFieldName=null,this.globalIdFieldName=null,this.geometryProperties=null,this.geohashFieldName=null,this.spatialReference=null,this.transform=null}}(0,l.Ue)(),(0,u.Ue)();var p=r(98732);function f(e,t){return t}function y(e,t,r,n){switch(r){case 0:return b(e,t+n,0);case 1:return"lowerLeft"===e.originPosition?b(e,t+n,1):function({translate:e,scale:t},r,n){return e[n]-r*t[n]}(e,t+n,1)}}function g(e,t,r,n){return 2===r?b(e,t,2):y(e,t,r,n)}function m(e,t,r,n){return 2===r?b(e,t,3):y(e,t,r,n)}function _(e,t,r,n){return 3===r?b(e,t,3):g(e,t,r,n)}function b({translate:e,scale:t},r,n){return e[n]+r*t[n]}class k{constructor(e){this._options=e,this.geometryTypes=["point","multipoint","polyline","polygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=f,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{}}createFeatureResult(){return new d}finishFeatureResult(e){if(this._options.applyTransform&&(e.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!e.hasZ)return;const t=(0,a.k)(e.geometryType,this._options.sourceSpatialReference,e.spatialReference);if(!(0,i.Wi)(t))for(const r of e.features)t(r.geometry)}createSpatialReference(){return new o.Z}addField(e,t){e.fields.push(c.Z.fromJSON(t));const r=e.fields.map((e=>e.name));this._attributesConstructor=function(){for(const e of r)this[e]=null}}addFeature(e,t){const r=this._options.maxStringAttributeLength?this._options.maxStringAttributeLength:0;if(r>0)for(const e in t.attributes){const n=t.attributes[e];"string"==typeof n&&n.length>r&&(t.attributes[e]="")}e.features.push(t)}addQueryGeometry(e,t){const{queryGeometry:r,queryGeometryType:n}=t,i=(0,p.$g)(r.clone(),r,!1,!1,this._transform),s=(0,p.di)(i,n,!1,!1);let o=null;switch(n){case"esriGeometryPoint":o="point";break;case"esriGeometryPolygon":o="polygon";break;case"esriGeometryPolyline":o="polyline";break;case"esriGeometryMultipoint":o="multipoint"}s.type=o,e.queryGeometryType=n,e.queryGeometry=s}prepareFeatures(e){switch(this._transform=e.transform??null,this._options.applyTransform&&e.transform&&(this._applyTransform=this._deriveApplyTransform(e)),this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++,e.geometryType){case"point":this.addCoordinate=(e,t,r)=>this.addCoordinatePoint(e,t,r),this.createGeometry=e=>this.createPointGeometry(e);break;case"polygon":this.addCoordinate=(e,t,r)=>this._addCoordinatePolygon(e,t,r),this.createGeometry=e=>this._createPolygonGeometry(e);break;case"polyline":this.addCoordinate=(e,t,r)=>this._addCoordinatePolyline(e,t,r),this.createGeometry=e=>this._createPolylineGeometry(e);break;case"multipoint":this.addCoordinate=(e,t,r)=>this._addCoordinateMultipoint(e,t,r),this.createGeometry=e=>this._createMultipointGeometry(e);break;case"mesh":case"extent":break;default:(0,n.Bg)(e.geometryType)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,new h((0,s.D)(),null,new this._attributesConstructor)}allocateCoordinates(){const e=this._lengths.reduce(((e,t)=>e+t),0);this._coordinateBuffer=new Float64Array(e*this._vertexDimension),this._coordinateBufferPtr=0}addLength(e,t){0===this._lengths.length&&(this._toAddInCurrentPath=t),this._lengths.push(t)}createPointGeometry(e){const t={type:"point",x:0,y:0,spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM};return t.hasZ&&(t.z=0),t.hasM&&(t.m=0),t}addCoordinatePoint(e,t,r){const n=this._transform?this._applyTransform(this._transform,t,r,0):t;if(null!=n)switch(r){case 0:e.x=n;break;case 1:e.y=n;break;case 2:e.hasZ?e.z=n:e.m=n;break;case 3:e.m=n}}_transformPathLikeValue(e,t){let r=0;return t<=1&&(r=this._previousCoordinate[t],this._previousCoordinate[t]+=e),this._transform?this._applyTransform(this._transform,e,t,r):e}_addCoordinatePolyline(e,t,r){this._dehydratedAddPointsCoordinate(e.paths,t,r)}_addCoordinatePolygon(e,t,r){this._dehydratedAddPointsCoordinate(e.rings,t,r)}_addCoordinateMultipoint(e,t,r){0===r&&e.points.push([]);const n=this._transformPathLikeValue(t,r);e.points[e.points.length-1].push(n)}_createPolygonGeometry(e){return{type:"polygon",rings:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createPolylineGeometry(e){return{type:"polyline",paths:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createMultipointGeometry(e){return{type:"multipoint",points:[],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_dehydratedAddPointsCoordinate(e,t,r){0===r&&0==this._toAddInCurrentPath--&&(e.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const n=this._transformPathLikeValue(t,r),i=e[e.length-1],s=this._coordinateBuffer;if(s){if(0===r){const e=this._coordinateBufferPtr*Float64Array.BYTES_PER_ELEMENT;i.push(new Float64Array(s.buffer,e,this._vertexDimension))}s[this._coordinateBufferPtr++]=n}}_deriveApplyTransform(e){const{hasZ:t,hasM:r}=e;return t&&r?_:t?g:r?m:y}}var w=r(45178);class x{_parseFeatureQuery(e){const t=(0,w.C)(e.buffer,new k(e.options)),r={...t,spatialReference:t.spatialReference.toJSON(),fields:t.fields?t.fields.map((e=>e.toJSON())):void 0};return Promise.resolve(r)}}function T(){return new x}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1916],{36030:(e,t,r)=>{r.d(t,{J:()=>s});var n=r(35454),i=r(5600);function s(e,t={}){const r=e instanceof n.X?e:new n.X(e,t),s={type:t?.ignoreUnknown??1?r.apiValues:String,json:{type:r.jsonValues,read:!t?.readOnly&&{reader:r.read},write:{writer:r.write}}};return void 0!==t?.readOnly&&(s.readOnly=!!t.readOnly),void 0!==t?.default&&(s.json.default=t.default),void 0!==t?.name&&(s.json.name=t.name),void 0!==t?.nonNullable&&(s.nonNullable=t.nonNullable),(0,i.Cb)(s)}},43090:(e,t,r)=>{function n(e){return 32+e.length}function i(e){if(!e)return 0;let t=l;for(const r in e)if(e.hasOwnProperty(r)){const i=e[r];switch(typeof i){case"string":t+=n(i);break;case"number":t+=16;break;case"boolean":t+=4}}return t}function s(e){if(!e)return 0;if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return 32+8*t;let r=u;for(let n=0;n<t;n++)r+=o(e[n]);return r}(e);let t=l;for(const r in e)e.hasOwnProperty(r)&&(t+=o(e[r]));return t}function o(e){switch(typeof e){case"object":return s(e);case"string":return n(e);case"number":return 16;case"boolean":return 4;default:return 8}}function a(e,t){return u+e.length*t}r.d(t,{Ul:()=>s,Y8:()=>c,do:()=>a,f2:()=>i});const l=32,u=32;var c;!function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(c||(c={}))},74085:(e,t,r)=>{function n(e){}r.d(t,{Bg:()=>n}),r(80442)},45091:(e,t,r)=>{r.d(t,{Z:()=>c});var n,i,s=r(80442),o=r(71143);(i=n||(n={}))[i.varint=0]="varint",i[i.fixed64=1]="fixed64",i[i.delimited=2]="delimited",i[i.fixed32=5]="fixed32",i[i.unknown=99]="unknown";const a=4294967296,l=new TextDecoder("utf-8"),u=(0,s.Z)("safari")||(0,s.Z)("ios")?6:(0,s.Z)("ff")?12:32;class c{constructor(e,t,r=0,i=(e?e.byteLength:0)){this._tag=0,this._dataType=n.unknown,this._init(e,t,r,i)}_init(e,t,r,n){this._data=e,this._dataView=t,this._pos=r,this._end=n}asUnsafe(){return this}clone(){return new c(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;const t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let e=4294967295;return e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128?e:(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128?e:void 0))))}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();if(void 0!==e)return e>>>1^-(1&e)|0}getSInt64(){return this._decodeSVarint()}getBool(){const e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){const e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getUint32(t+4,!0)*a;return this._skip(8),r}getSFixed64(){const e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getInt32(t+4,!0)*a;return this._skip(8),r}getDouble(){const e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}getFixed32(){const e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}getSFixed32(){const e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}getFloat(){const e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}getString(){const e=this._getLength(),t=this._pos,r=this._toString(this._data,t,t+e);return this._skip(e),r}getBytes(){const e=this._getLength(),t=this._pos,r=this._toBytes(this._data,t,t+e);return this._skip(e),r}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,r,n){const i=this.getMessage(),s=e(i,t,r,n);return i.release(),s}processMessage(e){const t=this.getMessage(),r=e(t);return t.release(),r}getMessage(){const e=this._getLength(),t=c.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){c.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case n.varint:this._decodeVarint();break;case n.fixed64:this._skip(8);break;case n.delimited:this._skip(this._getLength());break;case n.fixed32:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipLen(e){this._skip(e)}_skip(e){if(this._pos+e>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=e}_decodeVarint(){const e=this._data;let t=this._pos,r=0,n=0;if(this._end-t>=10)do{if(n=e[t++],r|=127&n,0==(128&n))break;if(n=e[t++],r|=(127&n)<<7,0==(128&n))break;if(n=e[t++],r|=(127&n)<<14,0==(128&n))break;if(n=e[t++],r|=(127&n)<<21,0==(128&n))break;if(n=e[t++],r+=268435456*(127&n),0==(128&n))break;if(n=e[t++],r+=34359738368*(127&n),0==(128&n))break;if(n=e[t++],r+=4398046511104*(127&n),0==(128&n))break;if(n=e[t++],r+=562949953421312*(127&n),0==(128&n))break;if(n=e[t++],r+=72057594037927940*(127&n),0==(128&n))break;if(n=e[t++],r+=0x8000000000000000*(127&n),0==(128&n))break;throw new Error("Varint too long!")}while(0);else{let i=1;for(;t!==this._end&&(n=e[t],0!=(128&n));)++t,r+=(127&n)*i,i*=128;if(t===this._end)throw new Error("Varint overrun!");++t,r+=n*i}return this._pos=t,r}_decodeSVarint(){const e=this._data;let t=this._pos,r=0,n=0;const i=1&e[t];if(this._end-t>=10)do{if(n=e[t++],r|=127&n,0==(128&n))break;if(n=e[t++],r|=(127&n)<<7,0==(128&n))break;if(n=e[t++],r|=(127&n)<<14,0==(128&n))break;if(n=e[t++],r|=(127&n)<<21,0==(128&n))break;if(n=e[t++],r+=268435456*(127&n),0==(128&n))break;if(n=e[t++],r+=34359738368*(127&n),0==(128&n))break;if(n=e[t++],r+=4398046511104*(127&n),0==(128&n))break;if(n=e[t++],r+=562949953421312*(127&n),0==(128&n))break;if(n=e[t++],r+=72057594037927940*(127&n),0==(128&n))break;if(n=e[t++],r+=0x8000000000000000*(127&n),0==(128&n))break;throw new Error("Varint too long!")}while(0);else{let i=1;for(;t!==this._end&&(n=e[t],0!=(128&n));)++t,r+=(127&n)*i,i*=128;if(t===this._end)throw new Error("Varint overrun!");++t,r+=n*i}return this._pos=t,i?-(r+1)/2:r/2}_getLength(){if(this._dataType!==n.delimited)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(e,t,r){if((r=Math.min(this._end,r))-t>u){const n=e.subarray(t,r);return l.decode(n)}let n="",i="";for(let s=t;s<r;++s){const t=e[s];128&t?i+="%"+t.toString(16):(n+=decodeURIComponent(i)+String.fromCharCode(t),i="")}return i.length&&(n+=decodeURIComponent(i)),n}_toBytes(e,t,r){return r=Math.min(this._end,r),new Uint8Array(e.buffer,t,r-t)}}c.pool=new o.Z(c,void 0,(e=>{e._data=null,e._dataView=null}))},60437:(e,t,r)=>{r.d(t,{Gv:()=>_,HH:()=>a,JR:()=>y,TC:()=>l,Tn:()=>d,Ue:()=>s,al:()=>o,cS:()=>f,dp:()=>c,fS:()=>m,op:()=>h,pp:()=>u,t8:()=>p});var n=r(70586),i=r(6570);function s(e=b){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,r,n,i,o,a=s()){return a[0]=e,a[1]=t,a[2]=r,a[3]=n,a[4]=i,a[5]=o,a}function a(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.Z(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function u(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function c(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function h(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function d(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function p(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function f(e){return e?p(e,_):s(_)}function y(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function g(e){return 6===e.length}function m(e,t,r){if((0,n.Wi)(e)||(0,n.Wi)(t))return e===t;if(!g(e)||!g(t))return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(24470);const _=[1/0,1/0,1/0,-1/0,-1/0,-1/0],b=[0,0,0,0,0,0];s()},24470:(e,t,r)=>{r.d(t,{Gv:()=>_,HH:()=>u,SO:()=>h,Ue:()=>s,al:()=>a,cS:()=>y,fS:()=>m,jE:()=>d,jn:()=>c,kK:()=>p,oJ:()=>l,r3:()=>f}),r(80442),r(22021);var n=r(70586),i=r(6570);function s(e=b){return[e[0],e[1],e[2],e[3]]}function o(e,t){return e!==t&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3]),e}function a(e,t,r,n,i=s()){return i[0]=e,i[1]=t,i[2]=r,i[3]=n,i}function l(e,t=s()){return t[0]=e.xmin,t[1]=e.ymin,t[2]=e.xmax,t[3]=e.ymax,t}function u(e,t){return new i.Z({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:t})}function c(e,t,r){if((0,n.Wi)(t))o(r,e);else if("length"in t)g(t)?(r[0]=Math.min(e[0],t[0]),r[1]=Math.min(e[1],t[1]),r[2]=Math.max(e[2],t[2]),r[3]=Math.max(e[3],t[3])):2!==t.length&&3!==t.length||(r[0]=Math.min(e[0],t[0]),r[1]=Math.min(e[1],t[1]),r[2]=Math.max(e[2],t[0]),r[3]=Math.max(e[3],t[1]));else switch(t.type){case"extent":r[0]=Math.min(e[0],t.xmin),r[1]=Math.min(e[1],t.ymin),r[2]=Math.max(e[2],t.xmax),r[3]=Math.max(e[3],t.ymax);break;case"point":r[0]=Math.min(e[0],t.x),r[1]=Math.min(e[1],t.y),r[2]=Math.max(e[2],t.x),r[3]=Math.max(e[3],t.y)}}function h(e){return function(e){return(0,n.Wi)(e)||e[0]>=e[2]?0:e[2]-e[0]}(e)*function(e){return e[1]>=e[3]?0:e[3]-e[1]}(e)}function d(e,t,r){return t>=e[0]&&r>=e[1]&&t<=e[2]&&r<=e[3]}function p(e,t){return Math.max(t[0],e[0])<=Math.min(t[2],e[2])&&Math.max(t[1],e[1])<=Math.min(t[3],e[3])}function f(e,t){return t[0]>=e[0]&&t[2]<=e[2]&&t[1]>=e[1]&&t[3]<=e[3]}function y(e){return e?o(e,_):s(_)}function g(e){return null!=e&&4===e.length}function m(e,t){return g(e)&&g(t)?e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]:e===t}const _=[1/0,1/0,-1/0,-1/0],b=[0,0,0,0]},33955:(e,t,r)=>{r.d(t,{Ji:()=>g,YX:()=>c,aW:()=>h,im:()=>y,l9:()=>p,oU:()=>f,q9:()=>_,wp:()=>d});var n=r(70586),i=r(6570),s=r(9361),o=r(65091),a=r(94139),l=r(38913),u=r(58901);function c(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function h(e){return void 0!==e.points}function d(e){return void 0!==e.x&&void 0!==e.y}function p(e){return void 0!==e.paths}function f(e){return void 0!==e.rings}function y(e){return(0,n.Wi)(e)?null:e instanceof s.Z?e:d(e)?a.Z.fromJSON(e):p(e)?u.Z.fromJSON(e):f(e)?l.Z.fromJSON(e):h(e)?o.Z.fromJSON(e):c(e)?i.Z.fromJSON(e):null}function g(e){return e?d(e)?"esriGeometryPoint":p(e)?"esriGeometryPolyline":f(e)?"esriGeometryPolygon":c(e)?"esriGeometryEnvelope":h(e)?"esriGeometryMultipoint":null:null}const m={esriGeometryPoint:a.Z,esriGeometryPolyline:u.Z,esriGeometryPolygon:l.Z,esriGeometryEnvelope:i.Z,esriGeometryMultipoint:o.Z};function _(e){return e&&m[e]||null}},82397:(e,t,r)=>{r.d(t,{G6:()=>g,Ie:()=>y,J9:()=>p,RF:()=>d,U1:()=>f,vY:()=>a});var n=r(70586);r(33955);const i=(e,t,r)=>[t,r],s=(e,t,r)=>[t,r,e[2]],o=(e,t,r)=>[t,r,e[2],e[3]];function a(e){return e?{originPosition:"upper-left"===e.originPosition?"upperLeft":"lower-left"===e.originPosition?"lowerLeft":e.originPosition,scale:e.tolerance?[e.tolerance,e.tolerance]:[1,1],translate:(0,n.pC)(e.extent)?[e.extent.xmin,e.extent.ymax]:[0,0]}:null}function l({scale:e,translate:t},r){return r*e[0]+t[0]}function u({scale:e,translate:t},r){return t[1]-r*e[1]}function c(e,t,r){const n=new Array(r.length);if(!r.length)return n;const[i,s]=e.scale;let o=l(e,r[0][0]),a=u(e,r[0][1]);n[0]=t(r[0],o,a);for(let e=1;e<r.length;e++){const l=r[e];o+=l[0]*i,a-=l[1]*s,n[e]=t(l,o,a)}return n}function h(e,t,r){const n=new Array(r.length);for(let i=0;i<r.length;i++)n[i]=c(e,t,r[i]);return n}function d(e,t,r,n,i){return t.x=function({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}(e,r.x),t.y=function({scale:e,translate:t},r){return Math.round((t[1]-r)/e[1])}(e,r.y),t!==r&&(n&&(t.z=r.z),i&&(t.m=r.m)),t}function p(e,t,r,a,l){return(0,n.pC)(r)&&(t.points=function(e,t,r,n){return c(e,r?n?o:s:n?s:i,t)}(e,r.points,a,l)),t}function f(e,t,r,i,s){return(0,n.Wi)(r)||(t.x=l(e,r.x),t.y=u(e,r.y),t!==r&&(i&&(t.z=r.z),s&&(t.m=r.m))),t}function y(e,t,r,a,l){return(0,n.pC)(r)&&(t.rings=function(e,t,r,n){return h(e,r?n?o:s:n?s:i,t)}(e,r.rings,a,l)),t}function g(e,t,r,a,l){return(0,n.pC)(r)&&(t.paths=function(e,t,r,n){return h(e,r?n?o:s:n?s:i,t)}(e,r.paths,a,l)),t}},86973:(e,t,r)=>{r.d(t,{Mk:()=>i,P$:()=>s});var n=r(35454);const i=(0,n.w)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),s=(0,n.w)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"})},69285:(e,t,r)=>{r.d(t,{k:()=>o});var n=r(70586),i=r(67900),s=r(8744);function o(e,t,r){if((0,n.Wi)(t)||(0,n.Wi)(r)||r.vcsWkid||(0,s.fS)(t,r))return null;const o=(0,i._R)(t)/(0,i._R)(r);if(1===o)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){e&&null!=e.z&&(e.z*=t)}(e,o);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const r of e.paths)for(const e of r)e.length>2&&(e[2]*=t)}(e,o);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const r of e.rings)for(const e of r)e.length>2&&(e[2]*=t)}(e,o);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const r of e.points)r.length>2&&(r[2]*=t)}(e,o);case"extent":case"esriGeometryExtent":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,o);default:return null}}},1231:(e,t,r)=>{r.d(t,{Z:()=>g});var n,i=r(43697),s=r(35454),o=r(96674),a=r(5600),l=r(75215),u=(r(67676),r(36030)),c=r(71715),h=r(52011),d=r(72729),p=r(86719);const f=new s.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let y=n=class extends o.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=-1,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?f.fromJSON(r.fieldValueType):null}clone(){return new n({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],y.prototype,"alias",void 0),(0,i._)([(0,a.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],y.prototype,"defaultValue",void 0),(0,i._)([(0,a.Cb)()],y.prototype,"description",void 0),(0,i._)([(0,c.r)("description")],y.prototype,"readDescription",null),(0,i._)([(0,a.Cb)({types:d.V5,json:{read:{reader:d.im},write:!0}})],y.prototype,"domain",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],y.prototype,"editable",void 0),(0,i._)([(0,a.Cb)({type:l.z8,json:{write:!0}})],y.prototype,"length",void 0),(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],y.prototype,"name",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],y.prototype,"nullable",void 0),(0,i._)([(0,u.J)(p.v)],y.prototype,"type",void 0),(0,i._)([(0,a.Cb)()],y.prototype,"valueType",void 0),(0,i._)([(0,c.r)("valueType",["description"])],y.prototype,"readValueType",null),(0,i._)([(0,a.Cb)({type:Boolean,json:{read:!1}})],y.prototype,"visible",void 0),y=n=(0,i._)([(0,h.j)("esri.layers.support.Field")],y);const g=y},72729:(e,t,r)=>{r.d(t,{im:()=>v,V5:()=>T}),r(80442);var n,i=r(43697),s=r(22974),o=r(5600),a=(r(75215),r(36030)),l=r(52011),u=r(96674);r(67676);let c=n=class extends u.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new n({name:this.name,code:this.code})}};(0,i._)([(0,o.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,i._)([(0,o.Cb)({type:[String,Number],json:{write:!0}})],c.prototype,"code",void 0),c=n=(0,i._)([(0,l.j)("esri.layers.support.CodedValue")],c);const h=new(r(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends u.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,i._)([(0,o.Cb)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,i._)([(0,a.J)(h)],d.prototype,"type",void 0),d=(0,i._)([(0,l.j)("esri.layers.support.Domain")],d);const p=d;var f;let y=f=class extends p{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new f({codedValues:(0,s.d9)(this.codedValues),name:this.name})}};(0,i._)([(0,o.Cb)({type:[c],json:{write:!0}})],y.prototype,"codedValues",void 0),(0,i._)([(0,a.J)({codedValue:"coded-value"})],y.prototype,"type",void 0),y=f=(0,i._)([(0,l.j)("esri.layers.support.CodedValueDomain")],y);const g=y;var m;r(92604),r(20102);let _=m=class extends p{constructor(e){super(e),this.type="inherited"}clone(){return new m}};(0,i._)([(0,a.J)({inherited:"inherited"})],_.prototype,"type",void 0),_=m=(0,i._)([(0,l.j)("esri.layers.support.InheritedDomain")],_);const b=_;var k;let w=k=class extends p{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new k({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,i._)([(0,o.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],w.prototype,"maxValue",void 0),(0,i._)([(0,o.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],w.prototype,"minValue",void 0),(0,i._)([(0,a.J)({range:"range"})],w.prototype,"type",void 0),w=k=(0,i._)([(0,l.j)("esri.layers.support.RangeDomain")],w);const x=w,T={key:"type",base:p,typeMap:{range:w,"coded-value":g,inherited:b}};function v(e){if(!e||!e.type)return null;switch(e.type){case"range":return x.fromJSON(e);case"codedValue":return g.fromJSON(e);case"inherited":return b.fromJSON(e)}return null}},86719:(e,t,r)=>{r.d(t,{v:()=>n});const n=new(r(35454).X)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml"})},77863:(e,t,r)=>{r.d(t,{G$:()=>v,K9:()=>F,O7:()=>h});var n=r(20102),i=r(70586),s=r(45091),o=r(5428),a=r(78760);const l=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeString","esriFieldTypeDate","esriFieldTypeOID","esriFieldTypeGeometry","esriFieldTypeBlob","esriFieldTypeRaster","esriFieldTypeGUID","esriFieldTypeGlobalID","esriFieldTypeXML"],u=["sqlTypeBigInt","sqlTypeBinary","sqlTypeBit","sqlTypeChar","sqlTypeDate","sqlTypeDecimal","sqlTypeDouble","sqlTypeFloat","sqlTypeGeometry","sqlTypeGUID","sqlTypeInteger","sqlTypeLongNVarchar","sqlTypeLongVarbinary","sqlTypeLongVarchar","sqlTypeNChar","sqlTypeNVarchar","sqlTypeOther","sqlTypeReal","sqlTypeSmallInt","sqlTypeSqlXml","sqlTypeTime","sqlTypeTimestamp","sqlTypeTimestamp2","sqlTypeTinyInt","sqlTypeVarbinary","sqlTypeVarchar"],c=["upperLeft","lowerLeft"];function h(e){return e>=l.length?null:l[e]}function d(e){return e>=u.length?null:u[e]}function p(e){return e>=c.length?null:c[e]}function f(e,t){return t>=e.geometryTypes.length?null:e.geometryTypes[t]}function y(e,t,r){const n=e.asUnsafe(),i=t.createPointGeometry(r);for(;n.next();)switch(n.tag()){case 3:{const e=n.getUInt32(),r=n.pos()+e;let s=0;for(;n.pos()<r;)t.addCoordinatePoint(i,n.getSInt64(),s++);break}default:n.skip()}return i}function g(e,t,r){const n=e.asUnsafe(),i=t.createGeometry(r),s=2+(r.hasZ?1:0)+(r.hasM?1:0);for(;n.next();)switch(n.tag()){case 2:{const e=n.getUInt32(),r=n.pos()+e;let s=0;for(;n.pos()<r;)t.addLength(i,n.getUInt32(),s++);break}case 3:{const e=n.getUInt32(),r=n.pos()+e;let o=0;for(t.allocateCoordinates(i);n.pos()<r;)t.addCoordinate(i,n.getSInt64(),o),o++,o===s&&(o=0);break}default:n.skip()}return i}function m(e){const t=e.asUnsafe(),r=new o.Z;let n="esriGeometryPoint";for(;t.next();)switch(t.tag()){case 2:{const e=t.getUInt32(),n=t.pos()+e;for(;t.pos()<n;)r.lengths.push(t.getUInt32());break}case 3:{const e=t.getUInt32(),n=t.pos()+e;for(;t.pos()<n;)r.coords.push(t.getSInt64());break}case 1:n=a.A[t.getEnum()];break;default:t.skip()}return{queryGeometry:r,queryGeometryType:n}}function _(e){const t=e.asUnsafe();for(;t.next();)switch(t.tag()){case 1:return t.getString();case 2:return t.getFloat();case 3:return t.getDouble();case 4:return t.getSInt32();case 5:return t.getUInt32();case 6:return t.getInt64();case 7:return t.getUInt64();case 8:return t.getSInt64();case 9:return t.getBool();default:return t.skip(),null}return null}function b(e){const t=e.asUnsafe(),r={type:h(0)};for(;t.next();)switch(t.tag()){case 1:r.name=t.getString();break;case 2:r.type=h(t.getEnum());break;case 3:r.alias=t.getString();break;case 4:r.sqlType=d(t.getEnum());break;case 5:default:t.skip();break;case 6:r.defaultValue=t.getString()}return r}function k(e){const t={},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.name=r.getString();break;case 2:t.isSystemMaintained=r.getBool();break;default:r.skip()}return t}function w(e,t,r,n){const i=t.createFeature(r);let s=0;for(;e.next();)switch(e.tag()){case 1:{const t=n[s++].name;i.attributes[t]=e.processMessage(_);break}case 2:i.geometry=e.processMessageWithArgs(g,t,r);break;case 4:i.centroid=e.processMessageWithArgs(y,t,r);break;default:e.skip()}return i}function x(e){const t=[1,1,1,1],r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t[0]=r.getDouble();break;case 2:t[1]=r.getDouble();break;case 4:t[2]=r.getDouble();break;case 3:t[3]=r.getDouble();break;default:r.skip()}return t}function T(e){const t=[0,0,0,0],r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t[0]=r.getDouble();break;case 2:t[1]=r.getDouble();break;case 4:t[2]=r.getDouble();break;case 3:t[3]=r.getDouble();break;default:r.skip()}return t}function v(e){const t={originPosition:p(0)},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.originPosition=p(r.getEnum());break;case 2:t.scale=r.processMessage(x);break;case 3:t.translate=r.processMessage(T);break;default:r.skip()}return t}function M(e){const t={},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.shapeAreaFieldName=r.getString();break;case 2:t.shapeLengthFieldName=r.getString();break;case 3:t.units=r.getString();break;default:r.skip()}return t}function S(e,t){const r=t.createSpatialReference();for(;e.next();)switch(e.tag()){case 1:r.wkid=e.getUInt32();break;case 5:r.wkt=e.getString();break;case 2:r.latestWkid=e.getUInt32();break;case 3:r.vcsWkid=e.getUInt32();break;case 4:r.latestVcsWkid=e.getUInt32();break;default:e.skip()}return r}function G(e,t){const r=t.createFeatureResult(),n=e.asUnsafe();r.geometryType=f(t,0);let i=!1;for(;n.next();)switch(n.tag()){case 1:r.objectIdFieldName=n.getString();break;case 3:r.globalIdFieldName=n.getString();break;case 4:r.geohashFieldName=n.getString();break;case 5:r.geometryProperties=n.processMessage(M);break;case 7:r.geometryType=f(t,n.getEnum());break;case 8:r.spatialReference=n.processMessageWithArgs(S,t);break;case 10:r.hasZ=n.getBool();break;case 11:r.hasM=n.getBool();break;case 12:r.transform=n.processMessage(v);break;case 9:{const e=n.getBool();r.exceededTransferLimit=e;break}case 13:t.addField(r,n.processMessage(b));break;case 15:i||(t.prepareFeatures(r),i=!0),t.addFeature(r,n.processMessageWithArgs(w,t,r,r.fields));break;case 2:r.uniqueIdField=n.processMessage(k);break;default:n.skip()}return t.finishFeatureResult(r),r}function I(e,t){const r={};let n=null;for(;e.next();)switch(e.tag()){case 4:n=e.processMessageWithArgs(m);break;case 1:r.featureResult=e.processMessageWithArgs(G,t);break;default:e.skip()}return(0,i.pC)(n)&&r.featureResult&&t.addQueryGeometry(r,n),r}function F(e,t){try{const r=2,n=new s.Z(new Uint8Array(e),new DataView(e)),i={};for(;n.next();)n.tag()===r?i.queryResult=n.processMessageWithArgs(I,t):n.skip();return i}catch(e){throw new n.Z("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:e})}}},78760:(e,t,r)=>{r.d(t,{A:()=>l,J:()=>u});var n=r(67900),i=r(8744),s=r(70272),o=r(44876),a=r(5428);const l=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];class u{constructor(e){this._options=e,this.geometryTypes=l,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new o.Z}prepareFeatures(e){this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++}finishFeatureResult(e){if(!e||!e.features||!e.hasZ||!this._options.sourceSpatialReference||!e.spatialReference||(0,i.fS)(e.spatialReference,this._options.sourceSpatialReference)||e.spatialReference.vcsWkid)return;const t=(0,n._R)(this._options.sourceSpatialReference)/(0,n._R)(e.spatialReference);if(1!==t)for(const r of e.features){if(!(0,s.S6)(r))continue;const e=r.geometry.coords;for(let r=2;r<e.length;r+=3)e[r]*=t}}addFeature(e,t){e.features.push(t)}createFeature(){return new s.u_}createSpatialReference(){return{wkid:0}}createGeometry(){return new a.Z}addField(e,t){e.fields.push(t)}allocateCoordinates(e){e.coords.length=e.lengths.reduce(((e,t)=>e+t),0)*this._vertexDimension,this._coordinatePtr=0}addCoordinate(e,t){e.coords[this._coordinatePtr++]=t}addCoordinatePoint(e,t){e.coords.push(t)}addLength(e,t){e.lengths.push(t)}addQueryGeometry(e,t){e.queryGeometry=t.queryGeometry,e.queryGeometryType=t.queryGeometryType}createPointGeometry(){return new a.Z}}},45178:(e,t,r)=>{r.d(t,{C:()=>i});var n=r(77863);function i(e,t){const r=(0,n.K9)(e,t),i=r.queryResult.featureResult,s=r.queryResult.queryGeometry,o=r.queryResult.queryGeometryType;if(i&&i.features&&i.features.length&&i.objectIdFieldName){const e=i.objectIdFieldName;for(const t of i.features)t.attributes&&(t.objectId=t.attributes[e])}return i&&(i.queryGeometry=s,i.queryGeometryType=o),i}},61916:(e,t,r)=>{r.r(t),r.d(t,{default:()=>T});var n=r(74085),i=r(70586),s=r(99001),o=r(82971),a=r(69285),l=(r(43090),r(80442),r(60437)),u=r(24470),c=(r(82397),r(86973),r(1231));r(8744);class h{constructor(e,t,r){this.uid=e,this.geometry=t,this.attributes=r,this.visible=!0,this.objectId=null,this.centroid=null}}class d{constructor(){this.exceededTransferLimit=!1,this.features=[],this.fields=[],this.hasM=!1,this.hasZ=!1,this.geometryType=null,this.objectIdFieldName=null,this.globalIdFieldName=null,this.geometryProperties=null,this.geohashFieldName=null,this.spatialReference=null,this.transform=null}}(0,l.Ue)(),(0,u.Ue)();var p=r(98732);function f(e,t){return t}function y(e,t,r,n){switch(r){case 0:return b(e,t+n,0);case 1:return"lowerLeft"===e.originPosition?b(e,t+n,1):function({translate:e,scale:t},r,n){return e[n]-r*t[n]}(e,t+n,1)}}function g(e,t,r,n){return 2===r?b(e,t,2):y(e,t,r,n)}function m(e,t,r,n){return 2===r?b(e,t,3):y(e,t,r,n)}function _(e,t,r,n){return 3===r?b(e,t,3):g(e,t,r,n)}function b({translate:e,scale:t},r,n){return e[n]+r*t[n]}class k{constructor(e){this._options=e,this.geometryTypes=["point","multipoint","polyline","polygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=f,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{}}createFeatureResult(){return new d}finishFeatureResult(e){if(this._options.applyTransform&&(e.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!e.hasZ)return;const t=(0,a.k)(e.geometryType,this._options.sourceSpatialReference,e.spatialReference);if(!(0,i.Wi)(t))for(const r of e.features)t(r.geometry)}createSpatialReference(){return new o.Z}addField(e,t){e.fields.push(c.Z.fromJSON(t));const r=e.fields.map((e=>e.name));this._attributesConstructor=function(){for(const e of r)this[e]=null}}addFeature(e,t){const r=this._options.maxStringAttributeLength?this._options.maxStringAttributeLength:0;if(r>0)for(const e in t.attributes){const n=t.attributes[e];"string"==typeof n&&n.length>r&&(t.attributes[e]="")}e.features.push(t)}addQueryGeometry(e,t){const{queryGeometry:r,queryGeometryType:n}=t,i=(0,p.$g)(r.clone(),r,!1,!1,this._transform),s=(0,p.di)(i,n,!1,!1);let o=null;switch(n){case"esriGeometryPoint":o="point";break;case"esriGeometryPolygon":o="polygon";break;case"esriGeometryPolyline":o="polyline";break;case"esriGeometryMultipoint":o="multipoint"}s.type=o,e.queryGeometryType=n,e.queryGeometry=s}prepareFeatures(e){switch(this._transform=e.transform??null,this._options.applyTransform&&e.transform&&(this._applyTransform=this._deriveApplyTransform(e)),this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++,e.geometryType){case"point":this.addCoordinate=(e,t,r)=>this.addCoordinatePoint(e,t,r),this.createGeometry=e=>this.createPointGeometry(e);break;case"polygon":this.addCoordinate=(e,t,r)=>this._addCoordinatePolygon(e,t,r),this.createGeometry=e=>this._createPolygonGeometry(e);break;case"polyline":this.addCoordinate=(e,t,r)=>this._addCoordinatePolyline(e,t,r),this.createGeometry=e=>this._createPolylineGeometry(e);break;case"multipoint":this.addCoordinate=(e,t,r)=>this._addCoordinateMultipoint(e,t,r),this.createGeometry=e=>this._createMultipointGeometry(e);break;case"mesh":case"extent":break;default:(0,n.Bg)(e.geometryType)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,new h((0,s.D)(),null,new this._attributesConstructor)}allocateCoordinates(){const e=this._lengths.reduce(((e,t)=>e+t),0);this._coordinateBuffer=new Float64Array(e*this._vertexDimension),this._coordinateBufferPtr=0}addLength(e,t){0===this._lengths.length&&(this._toAddInCurrentPath=t),this._lengths.push(t)}createPointGeometry(e){const t={type:"point",x:0,y:0,spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM};return t.hasZ&&(t.z=0),t.hasM&&(t.m=0),t}addCoordinatePoint(e,t,r){const n=this._transform?this._applyTransform(this._transform,t,r,0):t;if(null!=n)switch(r){case 0:e.x=n;break;case 1:e.y=n;break;case 2:e.hasZ?e.z=n:e.m=n;break;case 3:e.m=n}}_transformPathLikeValue(e,t){let r=0;return t<=1&&(r=this._previousCoordinate[t],this._previousCoordinate[t]+=e),this._transform?this._applyTransform(this._transform,e,t,r):e}_addCoordinatePolyline(e,t,r){this._dehydratedAddPointsCoordinate(e.paths,t,r)}_addCoordinatePolygon(e,t,r){this._dehydratedAddPointsCoordinate(e.rings,t,r)}_addCoordinateMultipoint(e,t,r){0===r&&e.points.push([]);const n=this._transformPathLikeValue(t,r);e.points[e.points.length-1].push(n)}_createPolygonGeometry(e){return{type:"polygon",rings:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createPolylineGeometry(e){return{type:"polyline",paths:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createMultipointGeometry(e){return{type:"multipoint",points:[],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_dehydratedAddPointsCoordinate(e,t,r){0===r&&0==this._toAddInCurrentPath--&&(e.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const n=this._transformPathLikeValue(t,r),i=e[e.length-1],s=this._coordinateBuffer;if(s){if(0===r){const e=this._coordinateBufferPtr*Float64Array.BYTES_PER_ELEMENT;i.push(new Float64Array(s.buffer,e,this._vertexDimension))}s[this._coordinateBufferPtr++]=n}}_deriveApplyTransform(e){const{hasZ:t,hasM:r}=e;return t&&r?_:t?g:r?m:y}}var w=r(45178);class x{_parseFeatureQuery(e){const t=(0,w.C)(e.buffer,new k(e.options)),r={...t,spatialReference:t.spatialReference?.toJSON(),fields:t.fields?t.fields.map((e=>e.toJSON())):void 0};return Promise.resolve(r)}}function T(){return new x}}}]);