@arcgis/core 4.28.0-next.20230713 → 4.28.0-next.20230715

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 (273) hide show
  1. package/Basemap.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{0b28b5eec6dc67be8ce9.js → 0121bfc81b794745e024.js} +1 -1
  4. package/assets/esri/core/workers/chunks/067d3d45caeaaba18d81.js +1 -0
  5. package/assets/esri/core/workers/chunks/080a13dc08a8db498ffa.js +1 -0
  6. package/assets/esri/core/workers/chunks/0dccbc6c2559fdc0c2ad.js +1 -0
  7. package/assets/esri/core/workers/chunks/{c912466351e37db68b6c.js → 14ab33573bb02d6c6b1a.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{c4b066760e9aa85b7607.js → 1b948f8429d8f9b1bbfb.js} +1 -1
  9. package/assets/esri/core/workers/chunks/204ed2ebd2d3da659791.js +1 -0
  10. package/assets/esri/core/workers/chunks/{5d5d4a4fdf5ca8d7837f.js → 239d4176ff2d5142b7f1.js} +1 -1
  11. package/assets/esri/core/workers/chunks/23bb98aaa20b180ee680.js +1 -0
  12. package/assets/esri/core/workers/chunks/27cf3ef9566d5226b0df.js +1 -0
  13. package/assets/esri/core/workers/chunks/{1c86f80d73dee1a4d9b7.js → 2f1695e4807a534e1743.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{60b422009f58d7bbb8c4.js → 3164b862a6b3f654fade.js} +1 -1
  15. package/assets/esri/core/workers/chunks/35f60625ada14eb801fd.js +1 -0
  16. package/assets/esri/core/workers/chunks/{4e4e62462deec25e82ce.js → 3a04bf1cdce263fe2191.js} +1 -1
  17. package/assets/esri/core/workers/chunks/41011207b6cc5eb6232f.js +1 -0
  18. package/assets/esri/core/workers/chunks/{8d50449c029c73136204.js → 432e3558db53574d21b4.js} +1 -1
  19. package/assets/esri/core/workers/chunks/4767f69b81d36dde9550.js +1 -0
  20. package/assets/esri/core/workers/chunks/{08ee2bd914867fd2cbd5.js → 490629c6f9fee501c9cd.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{044b15794b6403792f04.js → 4f079d0e69189c1d8bd9.js} +1 -1
  22. package/assets/esri/core/workers/chunks/4f1f4cc82fea0d1f79ec.js +1 -0
  23. package/assets/esri/core/workers/chunks/503a393327df755d8843.js +1 -0
  24. package/assets/esri/core/workers/chunks/50e05f479c7d414fc06b.js +1 -0
  25. package/assets/esri/core/workers/chunks/{3835a76c017431f19422.js → 51da3c5c50b153ce6bc7.js} +1 -1
  26. package/assets/esri/core/workers/chunks/54b97ca5f2164b941f5b.js +1 -0
  27. package/assets/esri/core/workers/chunks/5a3fb63dab89cf3418f7.js +1 -0
  28. package/assets/esri/core/workers/chunks/5ceaf1f05b219034a10c.js +1 -0
  29. package/assets/esri/core/workers/chunks/70aabffaaa0a1da8e609.js +1 -0
  30. package/assets/esri/core/workers/chunks/78cb95d1594a0cb0dd7a.js +1 -0
  31. package/assets/esri/core/workers/chunks/7f391ae5e0ea7812baca.js +1 -0
  32. package/assets/esri/core/workers/chunks/{1d2b8b937bbda91a6549.js → 82dfbc175b52c7a10475.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{036cd65514eab1749363.js → 8467d05626a3a72462c9.js} +1 -1
  34. package/assets/esri/core/workers/chunks/9038b1317f1252e31f09.js +1 -0
  35. package/assets/esri/core/workers/chunks/929ddc4d9975ed893767.js +1 -0
  36. package/assets/esri/core/workers/chunks/{e86dcc239c6a57000afc.js → 94633cc9cfb089ef010e.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{2f5f398374ff77fb17f0.js → 975eef6d20c17a0ed07b.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{8913bddc76b82cb24664.js → 98cf4e744e8f2c3fc536.js} +1 -1
  39. package/assets/esri/core/workers/chunks/a00414550fa21c5662f3.js +1 -0
  40. package/assets/esri/core/workers/chunks/a3a1d4f32e518e97d071.js +1 -0
  41. package/assets/esri/core/workers/chunks/{4e2029c8cc8a5afe5759.js → a5348f117dacdcae99ee.js} +1 -1
  42. package/assets/esri/core/workers/chunks/b0f0a3178d88fa600a11.js +1 -0
  43. package/assets/esri/core/workers/chunks/b4446ce010bc4a5aa917.js +1 -0
  44. package/assets/esri/core/workers/chunks/b8a45b28a915a423d09d.js +1 -0
  45. package/assets/esri/core/workers/chunks/{fb97d39b25b0b009d2f0.js → bd9e6f38c9ec4195322a.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{30deb5a8e9a82186991d.js → c15c4bd52d4472ed50bc.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{55109f141c9f120833f6.js → c3d773c93efb41088c54.js} +1 -1
  48. package/assets/esri/core/workers/chunks/c518410b1214ffc58017.js +1 -0
  49. package/assets/esri/core/workers/chunks/d55faafe2ac914a3ebd1.js +1 -0
  50. package/assets/esri/core/workers/chunks/d5fd4780d57173f3e303.js +1 -0
  51. package/assets/esri/core/workers/chunks/da01e520a1ae0048e73e.js +1 -0
  52. package/assets/esri/core/workers/chunks/dd7603c9e5fd178c88f7.js +1 -0
  53. package/assets/esri/core/workers/chunks/ddcf58937924ab5a3d76.js +1 -0
  54. package/assets/esri/core/workers/chunks/e03a0f52d438f53a3057.js +1 -0
  55. package/assets/esri/core/workers/chunks/e433440fecd0114cb23d.js +1 -0
  56. package/assets/esri/core/workers/chunks/ea1560129e426980a4e2.js +1 -0
  57. package/assets/esri/core/workers/chunks/f73e2143f8d053aef092.js +1 -0
  58. package/assets/esri/core/workers/chunks/{0a0af540f4fe64c3d292.js → fa14238f1c308a74f843.js} +1 -1
  59. package/assets/esri/themes/base/widgets/_ElevationProfile.scss +3 -0
  60. package/assets/esri/themes/dark/main.css +1 -1
  61. package/assets/esri/themes/light/main.css +1 -1
  62. package/assets/esri/themes/light/view.css +1 -1
  63. package/chunks/RibbonLine.glsl.js +57 -72
  64. package/chunks/ar.js +1 -1
  65. package/chunks/ar2.js +1 -1
  66. package/chunks/bg_BG.js +1 -1
  67. package/chunks/bg_BG2.js +1 -1
  68. package/chunks/bs_BA.js +1 -1
  69. package/chunks/bs_BA2.js +1 -1
  70. package/chunks/ca_ES.js +1 -1
  71. package/chunks/ca_ES2.js +1 -1
  72. package/chunks/chartUtilsAm5.js +1 -1
  73. package/chunks/cs_CZ.js +1 -1
  74. package/chunks/cs_CZ2.js +1 -1
  75. package/chunks/da_DK.js +1 -1
  76. package/chunks/da_DK2.js +1 -1
  77. package/chunks/de_CH.js +1 -1
  78. package/chunks/de_CH2.js +1 -1
  79. package/chunks/de_DE.js +1 -1
  80. package/chunks/de_DE2.js +1 -1
  81. package/chunks/el_GR.js +1 -1
  82. package/chunks/el_GR2.js +1 -1
  83. package/chunks/en_CA.js +1 -1
  84. package/chunks/en_CA2.js +1 -1
  85. package/chunks/en_US.js +1 -1
  86. package/chunks/en_US2.js +1 -1
  87. package/chunks/es_ES.js +1 -1
  88. package/chunks/es_ES2.js +1 -1
  89. package/chunks/et_EE.js +1 -1
  90. package/chunks/et_EE2.js +1 -1
  91. package/chunks/fi_FI.js +1 -1
  92. package/chunks/fi_FI2.js +1 -1
  93. package/chunks/fr_FR.js +1 -1
  94. package/chunks/fr_FR2.js +1 -1
  95. package/chunks/he_IL.js +1 -1
  96. package/chunks/he_IL2.js +1 -1
  97. package/chunks/hr_HR.js +1 -1
  98. package/chunks/hr_HR2.js +1 -1
  99. package/chunks/hu_HU.js +1 -1
  100. package/chunks/hu_HU2.js +1 -1
  101. package/chunks/id_ID.js +1 -1
  102. package/chunks/id_ID2.js +1 -1
  103. package/chunks/it_IT.js +1 -1
  104. package/chunks/it_IT2.js +1 -1
  105. package/chunks/ja_JP.js +1 -1
  106. package/chunks/ja_JP2.js +1 -1
  107. package/chunks/ko_KR.js +1 -1
  108. package/chunks/ko_KR2.js +1 -1
  109. package/chunks/lt_LT.js +1 -1
  110. package/chunks/lt_LT2.js +1 -1
  111. package/chunks/lv_LV.js +1 -1
  112. package/chunks/lv_LV2.js +1 -1
  113. package/chunks/nb_NO.js +1 -1
  114. package/chunks/nb_NO2.js +1 -1
  115. package/chunks/nl_NL.js +1 -1
  116. package/chunks/nl_NL2.js +1 -1
  117. package/chunks/pl_PL.js +1 -1
  118. package/chunks/pl_PL2.js +1 -1
  119. package/chunks/pt_BR.js +1 -1
  120. package/chunks/pt_BR2.js +1 -1
  121. package/chunks/pt_PT.js +1 -1
  122. package/chunks/pt_PT2.js +1 -1
  123. package/chunks/ro_RO.js +1 -1
  124. package/chunks/ro_RO2.js +1 -1
  125. package/chunks/ru_RU.js +1 -1
  126. package/chunks/ru_RU2.js +1 -1
  127. package/chunks/sk_SK.js +1 -1
  128. package/chunks/sk_SK2.js +1 -1
  129. package/chunks/sl_SL.js +1 -1
  130. package/chunks/sl_SL2.js +1 -1
  131. package/chunks/sr_RS.js +1 -1
  132. package/chunks/sr_RS2.js +1 -1
  133. package/chunks/sv_SE.js +1 -1
  134. package/chunks/sv_SE2.js +1 -1
  135. package/chunks/th_TH.js +1 -1
  136. package/chunks/th_TH2.js +1 -1
  137. package/chunks/tr_TR.js +1 -1
  138. package/chunks/tr_TR2.js +1 -1
  139. package/chunks/uk_UA.js +1 -1
  140. package/chunks/uk_UA2.js +1 -1
  141. package/chunks/vi_VN.js +1 -1
  142. package/chunks/vi_VN2.js +1 -1
  143. package/chunks/zh_Hans.js +1 -1
  144. package/chunks/zh_Hans2.js +1 -1
  145. package/chunks/zh_Hant.js +1 -1
  146. package/chunks/zh_Hant2.js +1 -1
  147. package/config.js +1 -1
  148. package/core/colorUtils.js +1 -1
  149. package/core/image/apng.js +1 -1
  150. package/core/image/gif.js +1 -1
  151. package/core/urlUtils.js +1 -1
  152. package/core/workers/WorkerOwner.js +1 -1
  153. package/core/workers/staticWorkerMessages.js +5 -0
  154. package/geometry/projection.js +1 -1
  155. package/interfaces.d.ts +42 -2
  156. package/kernel.js +1 -1
  157. package/layers/support/ImageElement.js +1 -1
  158. package/layers/video/VideoController.js +1 -1
  159. package/package.json +1 -1
  160. package/portal/Portal.js +1 -1
  161. package/support/BasemapStyle.js +5 -0
  162. package/support/basemapUtils.js +1 -1
  163. package/support/revision.js +1 -1
  164. package/symbols/support/previewSymbol2D.js +1 -1
  165. package/views/2d/GoToManager.js +5 -0
  166. package/views/2d/engine/Stage.js +1 -1
  167. package/views/2d/engine/webgl/Overlay.js +1 -1
  168. package/views/2d/engine/webgl/animatedFormats/utils.js +1 -1
  169. package/views/2d/interactive/editingTools/ControlPointsTransformTool.js +1 -1
  170. package/views/2d/interactive/editingTools/TransformTool.js +1 -1
  171. package/views/2d/layers/BaseLayerViewGL2D.js +1 -1
  172. package/views/2d/layers/MediaLayerView2D.js +1 -1
  173. package/views/2d/layers/TileLayerView2D.js +1 -1
  174. package/views/2d/support/engineHelpers.js +1 -1
  175. package/views/2d/support/screenshotUtils.js +5 -0
  176. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
  177. package/views/3d/analysis/Dimension/DimensionTool.js +1 -1
  178. package/views/3d/analysis/Dimension/DimensionVisualization.js +1 -1
  179. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  180. package/views/3d/analysis/Dimension/LengthDimensionVisualization.js +1 -1
  181. package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
  182. package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
  183. package/views/3d/analysis/Dimension/settings.js +1 -1
  184. package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementVisualization.js +1 -1
  185. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  186. package/views/3d/analysis/LineOfSight/LineOfSightToolConfiguration.js +1 -1
  187. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  188. package/views/3d/analysis/Slice/SliceVisualization.js +1 -1
  189. package/views/3d/analysis/Slice/settings.js +1 -1
  190. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  191. package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
  192. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  193. package/views/3d/interactive/editingTools/lineGraphicVisualElementUtils.js +1 -1
  194. package/views/3d/interactive/editingTools/manipulations/MoveXYAxisManipulation.js +1 -1
  195. package/views/3d/interactive/editingTools/manipulations/MoveXYDiscManipulation.js +1 -1
  196. package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
  197. package/views/3d/interactive/editingTools/originGraphicVisualElementUtils.js +1 -1
  198. package/views/3d/interactive/editingTools/reshapeGraphic/ReshapeOperation.js +1 -1
  199. package/views/3d/interactive/editingTools/settings.js +1 -1
  200. package/views/3d/interactive/editingTools/transformGraphic/ExtentTransformTool.js +1 -1
  201. package/views/3d/interactive/editingTools/transformGraphic/GraphicScaleRotateTransform.js +1 -1
  202. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
  203. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
  204. package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
  205. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  206. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  207. package/views/3d/terrain/TerrainRenderer.js +1 -1
  208. package/views/3d/terrain/TerrainSurface.js +1 -1
  209. package/views/3d/terrain/Tile.js +1 -1
  210. package/views/3d/terrain/TileRenderer.js +1 -1
  211. package/views/3d/terrain/TileTexture.js +1 -1
  212. package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +12 -13
  213. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  214. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBuffer.js +1 -1
  215. package/views/3d/webgl-engine/lib/edgeRendering/strokes.js +1 -1
  216. package/views/3d/webgl-engine/lib/glUtil3D.js +1 -1
  217. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  218. package/views/3d/webgl-engine/materials/internal/WaterTextureRepository.js +1 -1
  219. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  220. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  221. package/views/3d/webgl-engine/statistics/RendererPerformanceInfo.js +1 -1
  222. package/views/MapView.js +1 -1
  223. package/views/Theme.js +5 -0
  224. package/views/View.js +1 -1
  225. package/views/interactive/SegmentLabels.js +1 -1
  226. package/views/support/colorUtils.js +1 -1
  227. package/views/webgl/Texture.js +1 -1
  228. package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
  229. package/widgets/Attachments.js +1 -1
  230. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
  231. package/widgets/ElevationProfile/support/InputRepresentation3D.js +1 -1
  232. package/widgets/ElevationProfile/support/chartUtils.js +1 -1
  233. package/widgets/Feature/FeatureMedia/chartCommon.js +1 -1
  234. package/widgets/Feature/FeatureMedia.js +1 -1
  235. package/widgets/support/chartUtils.js +1 -1
  236. package/widgets/support/chartUtilsAm5.js +1 -1
  237. package/assets/esri/core/workers/chunks/05f3374114bce72d3560.js +0 -1
  238. package/assets/esri/core/workers/chunks/10028df973ef7f9531c8.js +0 -1
  239. package/assets/esri/core/workers/chunks/1cbb03eec9dc23ef043b.js +0 -1
  240. package/assets/esri/core/workers/chunks/289061552a2a64bebd76.js +0 -1
  241. package/assets/esri/core/workers/chunks/308eeeaec591b4eea1de.js +0 -1
  242. package/assets/esri/core/workers/chunks/3155c750fc5a4e04a785.js +0 -1
  243. package/assets/esri/core/workers/chunks/346f67995b327bca8ee0.js +0 -1
  244. package/assets/esri/core/workers/chunks/3736e17dd6461f74cfaf.js +0 -1
  245. package/assets/esri/core/workers/chunks/37e60f9ca86f9d4bf4ea.js +0 -1
  246. package/assets/esri/core/workers/chunks/3a0b45ecc48e23a3a5d5.js +0 -1
  247. package/assets/esri/core/workers/chunks/417377c8e76944f428a7.js +0 -1
  248. package/assets/esri/core/workers/chunks/498dca81073e1fb477b9.js +0 -1
  249. package/assets/esri/core/workers/chunks/536962375ce4f1394481.js +0 -1
  250. package/assets/esri/core/workers/chunks/64bb4093c019a02d5309.js +0 -1
  251. package/assets/esri/core/workers/chunks/69de4733173ee2dee6e1.js +0 -1
  252. package/assets/esri/core/workers/chunks/6dcffe6683a798a42c78.js +0 -1
  253. package/assets/esri/core/workers/chunks/7a898d167029ee11a680.js +0 -1
  254. package/assets/esri/core/workers/chunks/7a973d70e6bc42d804ee.js +0 -1
  255. package/assets/esri/core/workers/chunks/7d9d2629af373c84624f.js +0 -1
  256. package/assets/esri/core/workers/chunks/885cb0da78e6853b23a4.js +0 -1
  257. package/assets/esri/core/workers/chunks/8e28862296972e9e6f82.js +0 -1
  258. package/assets/esri/core/workers/chunks/928431e1c449c6054547.js +0 -1
  259. package/assets/esri/core/workers/chunks/afdf30439d71a7cc19ae.js +0 -1
  260. package/assets/esri/core/workers/chunks/b1fa1571fd98d3b8dffe.js +0 -1
  261. package/assets/esri/core/workers/chunks/b20167d9163d0ee74b65.js +0 -1
  262. package/assets/esri/core/workers/chunks/b2a0e3e1dfccda7ed12e.js +0 -1
  263. package/assets/esri/core/workers/chunks/c09db831248054600e16.js +0 -1
  264. package/assets/esri/core/workers/chunks/dcccc9760998271254b5.js +0 -1
  265. package/assets/esri/core/workers/chunks/ddea45acae89759e57fa.js +0 -1
  266. package/assets/esri/core/workers/chunks/e039108eb3a592f6d8e3.js +0 -1
  267. package/assets/esri/core/workers/chunks/e70314ac10cc1f8f9f86.js +0 -1
  268. package/assets/esri/core/workers/chunks/f2d399b394a1a9156214.js +0 -1
  269. package/assets/esri/core/workers/chunks/f74d4e1eecec06f84ee2.js +0 -1
  270. package/assets/esri/core/workers/chunks/fb7eff7f76386f81d57b.js +0 -1
  271. package/assets/esri/core/workers/chunks/fe277d33b5b8a11c76df.js +0 -1
  272. package/core/analysisThemeUtils.js +0 -5
  273. package/views/support/createScreenshotPlan.js +0 -5
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[223],{91303:(e,t,i)=>{var l;i.d(t,{Y:()=>l}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(l||(l={}))},17287:(e,t,i)=>{i.d(t,{Y:()=>n});var l=i(43697),r=i(92604),s=i(5600),o=(i(75215),i(67676),i(80442),i(52011)),a=i(66677);const n=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.Qc)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Nm)(e,r.Z.getLogger(this)))}};return(0,l._)([(0,s.Cb)()],t.prototype,"title",null),(0,l._)([(0,s.Cb)({type:String})],t.prototype,"url",null),t=(0,l._)([(0,o.j)("esri.layers.mixins.ArcGISService")],t),t}},16859:(e,t,i)=>{i.d(t,{I:()=>b});var l=i(43697),r=i(68773),s=i(40330),o=i(3172),a=i(66643),n=i(20102),h=i(92604),c=i(95330),p=i(17452),u=i(5600),d=(i(75215),i(67676),i(80442),i(71715)),f=i(52011),m=i(30556),v=i(84230),y=i(48522),g=i(15235),w=i(86082),_=i(14661);const b=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=null,this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new g.default({id:t.itemId,portal:i&&i.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:l}=await i.e(8062).then(i.bind(i,18062));return(0,c.k_)(t),await l({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,c.D_)(e)||h.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.r9)(e),!0))))}async setUserPrivileges(e,t){if(!r.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:l},content:{updateItem:r}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",l),this._set("userHasUpdateItemPrivileges",r)}catch(e){(0,c.r9)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const l=e===i.id;if(l&&i.portal.user)return(0,_.Ss)(i);let r,o;if(l)r=i.portal.url;else try{r=await(0,v.oP)(this.url,t)}catch(e){(0,c.r9)(e)}if(!r||!(0,p.Zo)(r,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(s.id?.getCredential(`${r}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.r9)(e)}if(!o)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(l?await i.reload():(i=new g.default({id:e,portal:{url:r}}),await i.load(t)),i.portal.user)return(0,_.Ss)(i)}catch(e){(0,c.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const i=I.credential===t?I.user:await this._fetchEditingUser(e);return I.credential=t,I.user=i,null==i||null==i.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=s.id.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const l=`${i.owningSystemUrl}/sharing/rest`,r=y.Z.getDefault();if(r&&r.loaded&&(0,p.Fv)(r.restUrl)===(0,p.Fv)(l))return r.user;const n=`${l}/community/self`,h=null!=e?e.signal:null,c=await(0,a.q6)((0,o.default)(n,{authMode:"no-prompt",query:{f:"json"},signal:h}));return c.ok?w.Z.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t&&t.portal,l=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||y.Z.getDefault());return i&&l&&!(0,p.tm)(l.restUrl,i.restUrl)?(t.messages&&t.messages.push(new n.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,l._)([(0,u.Cb)({type:g.default})],t.prototype,"portalItem",null),(0,l._)([(0,d.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,l._)([(0,m.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,l._)([(0,u.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,l._)([(0,u.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,l._)([(0,u.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,l._)([(0,u.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,l._)([(0,f.j)("esri.layers.mixins.PortalLayer")],t),t},I={credential:null,user:null}},39450:(e,t,i)=>{i.d(t,{Z:()=>c});var l,r=i(43697),s=i(96674),o=i(5600),a=i(75215),n=(i(67676),i(80442),i(52011));let h=l=class extends s.wq{constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new l({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,r._)([(0,o.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],h.prototype,"cols",void 0),(0,r._)([(0,o.Cb)({type:a.z8,json:{write:!0}})],h.prototype,"level",void 0),(0,r._)([(0,o.Cb)({type:String,json:{write:!0}})],h.prototype,"levelValue",void 0),(0,r._)([(0,o.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],h.prototype,"origin",void 0),(0,r._)([(0,o.Cb)({type:Number,json:{write:!0}})],h.prototype,"resolution",void 0),(0,r._)([(0,o.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],h.prototype,"rows",void 0),(0,r._)([(0,o.Cb)({type:Number,json:{write:!0}})],h.prototype,"scale",void 0),h=l=(0,r._)([(0,n.j)("esri.layers.support.LOD")],h);const c=h},11145:(e,t,i)=>{i.d(t,{Z:()=>P});var l,r=i(43697),s=i(35454),o=i(96674),a=i(67900),n=i(5600),h=i(75215),c=(i(67676),i(80442),i(71715)),p=i(52011),u=i(30556),d=i(94139),f=i(82971),m=i(24470),v=i(8744),y=i(40488),g=i(39450),w=i(43077);const _=new s.X({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let b=l=class extends o.wq{static create(e={}){const{resolutionFactor:t=1,scales:i,size:r=256,spatialReference:s=f.Z.WebMercator,numLODs:o=24}=e;if(!(0,v.JY)(s)){const e=[];if(i)for(let t=0;t<i.length;t++){const l=i[t];e.push(new g.Z({level:t,scale:l,resolution:l}))}else{let t=5e-4;for(let i=o-1;i>=0;i--)e.unshift(new g.Z({level:i,scale:t,resolution:t})),t*=2}return new l({dpi:96,lods:e,origin:new d.Z(0,0,s),size:[r,r],spatialReference:s})}const n=(0,v.C5)(s),h=e.origin?new d.Z({x:e.origin.x,y:e.origin.y,spatialReference:s}):new d.Z(n?{x:n.origin[0],y:n.origin[1],spatialReference:s}:{x:0,y:0,spatialReference:s}),c=1/(39.37*(0,a.c9)(s)*96),p=[];if(i)for(let e=0;e<i.length;e++){const t=i[e],l=t*c;p.push(new g.Z({level:e,scale:t,resolution:l}))}else{let e=(0,v.sT)(s)?512/r*591657527.5917094:256/r*591657527.591555;const i=Math.ceil(o/t);p.push(new g.Z({level:0,scale:e,resolution:e*c}));for(let l=1;l<i;l++){const i=e/2**t,r=i*c;p.push(new g.Z({level:l,scale:i,resolution:r})),e=i}}return new l({dpi:96,lods:p,origin:h,size:[r,r],spatialReference:s})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const i=(0,v.C5)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return d.Z.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0;const l=[],r=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach((e=>{l.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,r[e.level]=e}))),this._set("scales",l),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const i=Math.floor(e),l=i+1;return t[i]/(t[i]/t[l])**(e-i)}scaleToZoom(e){const t=this.scales,i=t.length-1;let l=0;for(;l<i;l++){const i=t[l],r=t[l+1];if(i<=e)return l;if(r===e)return l+1;if(i>e&&r<e)return l+Math.log(i/e)/Math.log(i/r)}return l}snapScale(e,t=.95){const i=this.scaleToZoom(e);return i%Math.floor(i)>=t?this.zoomToScale(Math.ceil(i)):this.zoomToScale(Math.floor(i))}tileAt(e,t,i,l){const r=this.lodAt(e);if(!r)return null;let s,o;if("number"==typeof t)s=t,o=i;else if((0,v.fS)(t.spatialReference,this.spatialReference))s=t.x,o=t.y,l=i;else{const e=(0,y.iV)(t,this.spatialReference);if(null==e)return null;s=e.x,o=e.y,l=i}const a=r.resolution*this.size[0],n=r.resolution*this.size[1];return l||(l=new w.f(null,0,0,0,(0,m.Ue)())),l.level=e,l.row=Math.floor((this.origin.y-o)/n+.001),l.col=Math.floor((s-this.origin.x)/a+.001),this.updateTileInfo(l),l}updateTileInfo(e,t=l.ExtrapolateOptions.NONE){let i=this.lodAt(e.level);if(!i&&t===l.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return;const r=e.level-i.level,s=i.resolution*this.size[0]/2**r,o=i.resolution*this.size[1]/2**r;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,m.Ue)()),e.extent[0]=this.origin.x+e.col*s,e.extent[1]=this.origin.y-(e.row+1)*o,e.extent[2]=e.extent[0]+s,e.extent[3]=e.extent[1]+o}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const i=this.lodAt(t.level);if(null==i)return null;const{resolution:l}=i,r=l*this.size[0],s=l*this.size[1];return e[0]=this.origin.x+t.col*r,e[1]=this.origin.y-(t.row+1)*s,e[2]=e[0]+r,e[3]=e[1]+s,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return l.fromJSON(this.write({}))}getOrCreateCompatible(e,t){if(256===this.size[0]&&256===this.size[1])return 256===e?this:null;const i=[],r=this.lods.length;for(let e=0;e<r;e++){const l=this.lods[e],r=l.resolution*t;i.push(new g.Z({level:l.level,scale:l.scale,resolution:r}))}return new l({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){const l=e[i];this._upsampleLevels[l.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/l.resolution:0},t=l}}};var I,O;(0,r._)([(0,n.Cb)({type:Number,json:{write:!0}})],b.prototype,"compressionQuality",void 0),(0,r._)([(0,n.Cb)({type:Number,json:{write:!0}})],b.prototype,"dpi",void 0),(0,r._)([(0,n.Cb)({type:String,json:{read:_.read,write:_.write,origins:{"web-scene":{read:!1,write:!1}}}})],b.prototype,"format",void 0),(0,r._)([(0,n.Cb)({readOnly:!0})],b.prototype,"isWrappable",null),(0,r._)([(0,n.Cb)({type:d.Z,json:{write:!0}})],b.prototype,"origin",void 0),(0,r._)([(0,c.r)("origin")],b.prototype,"readOrigin",null),(0,r._)([(0,n.Cb)({type:[g.Z],value:null,json:{write:!0}})],b.prototype,"lods",null),(0,r._)([(0,n.Cb)({readOnly:!0})],b.prototype,"scales",void 0),(0,r._)([(0,n.Cb)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],b.prototype,"size",void 0),(0,r._)([(0,c.r)("size",["rows","cols"])],b.prototype,"readSize",null),(0,r._)([(0,u.c)("size",{cols:{type:h.z8},rows:{type:h.z8}})],b.prototype,"writeSize",null),(0,r._)([(0,n.Cb)({type:f.Z,json:{write:!0}})],b.prototype,"spatialReference",void 0),b=l=(0,r._)([(0,p.j)("esri.layers.support.TileInfo")],b),(O=(I=b||(b={})).ExtrapolateOptions||(I.ExtrapolateOptions={}))[O.NONE=0]="NONE",O[O.POWER_OF_TWO=1]="POWER_OF_TWO";const P=b},43077:(e,t,i)=>{i.d(t,{f:()=>l});class l{constructor(e,t,i,l,r=void 0){this.id=e,this.level=t,this.row=i,this.col=l,this.extent=r}}},28589:(e,t,i)=>{i.d(t,{y:()=>P});var l,r=i(43697),s=i(3172),o=i(92036),a=i(91303),n=i(20102),h=i(50758),c=i(13867),p=i(44553),u=i(95330),d=i(17445),f=i(1654),m=i(17452),v=i(5600),y=(i(75215),i(67676)),g=(i(80442),i(52011)),w=i(43077),_=i(22974),b=i(1533);class I{constructor(e){this._validateJSON(e);const{location:t,data:i}=e;this.location=Object.freeze((0,_.d9)(t));const l=this.location.width,r=this.location.height;let s=!0,o=!0;const a=function(e,t=!1){return e<=b.DB?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(l*r/32));let n=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(o=!1,a[n]|=1<<t):s=!1,31===t&&++n}o?(this._availability="unavailable",this.byteSize=40):s?(this._availability="available",this.byteSize=40):(this._availability=a,this.byteSize=40+(0,b.Xw)(a))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),l=i%32,r=i>>5,s=this._availability;return r<0||r>s.length?"unknown":s[r]&1<<l?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||s.default,{row:l,col:r,width:o,height:a}=e,h={query:{f:"json"}};return t=t?{...h,...t}:h,i(function(e){let t;if(e.service.tileServers?.length){const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then((e=>e.data)).catch((e=>{if(e&&e.details&&422===e.details.httpStatus)return{location:{top:l,left:r,width:o,height:a},valid:!0,data:(0,y.a9)(o*a,0)};throw e})).then((e=>{if(e.location&&(e.location.top!==l||e.location.left!==r||e.location.width!==o||e.location.height!==a))throw new n.Z("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:l,left:r,width:o,height:a}});return I.fromJSON(e)}))}static fromJSON(e){return Object.freeze(new I(e))}_validateJSON(e){if(!e||!e.location)throw new n.Z("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new n.Z("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new n.Z("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new n.Z("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new n.Z("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}}function O(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}let P=l=class extends o.Z{constructor(e){super(e),this._pendingTilemapRequests={},this.request=s.default,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new c.z(2*a.Y.MEGABYTES),this.addHandles([(0,d.YP)((()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]}),(()=>this._initializeTilemapDefinition()),d.nn)])}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}fetchTilemap(e,t,i,l){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new n.Z("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const r=this._tmpTilemapDefinition,s=this._tilemapFromCache(e,t,i,r);if(s)return Promise.resolve(s);const o=l&&l.signal;return l={...l,signal:null},new Promise(((e,t)=>{(0,u.fu)(o,(()=>t((0,u.zE)())));const i=O(r);let s=this._pendingTilemapRequests[i];if(!s){s=I.fromDefinition(r,l).then((e=>(this._tilemapCache.put(i,e,e.byteSize),e)));const e=()=>delete this._pendingTilemapRequests[i];this._pendingTilemapRequests[i]=s,s.then(e,e)}s.then(e,t)}))}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";const l=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return l?l.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,l){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(new n.Z("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})):this.fetchTilemap(e,t,i,l).catch((e=>e)).then((l=>{if(l instanceof I){const r=l.getAvailability(t,i);if("unavailable"===r)throw new n.Z("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i});return r}if((0,u.D_)(l))throw l;return"unknown"}))}fetchAvailabilityUpsample(e,t,i,l,r){l.level=e,l.row=t,l.col=i;const s=this.layer.tileInfo;s.updateTileInfo(l);const o=this.fetchAvailability(e,t,i,r).catch((e=>{if((0,u.D_)(e))throw e;if(s.upsampleTile(l))return this.fetchAvailabilityUpsample(l.level,l.row,l.col,l,r);throw e}));return this._fetchAvailabilityUpsamplePrefetch(l.id,e,t,i,r,o),o}async _fetchAvailabilityUpsamplePrefetch(e,t,i,r,s,o){if(!this._prefetchingEnabled||null==e)return;const a=`prefetch-${e}`;if(this.hasHandles(a))return;const n=new AbortController;o.then((()=>n.abort()),(()=>n.abort()));let c=!1;const p=(0,h.kB)((()=>{c||(c=!0,n.abort())}));if(this.addHandles(p,a),await(0,f.MU)(10,n.signal).catch((()=>{})),c||(c=!0,this.removeHandles(a)),(0,u.Hc)(n))return;const d=new w.f(e,t,i,r),m={...s,signal:n.signal},v=this.layer.tileInfo;for(let e=0;l._prefetches.length<l._maxPrefetch&&v.upsampleTile(d);++e){const e=this.fetchAvailability(d.level,d.row,d.col,m);l._prefetches.push(e);const t=()=>{l._prefetches.removeUnordered(e)};e.then(t,t)}}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,m.B7)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,l){l.level=e,l.row=t-t%this.size,l.col=i-i%this.size;const r=O(l);return this._tilemapCache.get(r)}get test(){const e=this;return{get prefetchingEnabled(){return e._prefetchingEnabled},set prefetchingEnabled(t){e._prefetchingEnabled=t},hasTilemap:(t,i,l)=>!!e._tilemapFromCache(t,i,l,e._tmpTilemapDefinition)}}};P._maxPrefetch=4,P._prefetches=new p.Z({initialSize:l._maxPrefetch}),(0,r._)([(0,v.Cb)({constructOnly:!0})],P.prototype,"layer",void 0),(0,r._)([(0,v.Cb)({constructOnly:!0})],P.prototype,"minLOD",void 0),(0,r._)([(0,v.Cb)({constructOnly:!0})],P.prototype,"maxLOD",void 0),(0,r._)([(0,v.Cb)({constructOnly:!0})],P.prototype,"request",void 0),(0,r._)([(0,v.Cb)({constructOnly:!0})],P.prototype,"size",void 0),P=l=(0,r._)([(0,g.j)("esri.layers.support.TilemapCache")],P)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2462,5732],{38171:(e,t,r)=>{r.d(t,{Z:()=>f});var n,i=r(43697),s=r(66577),l=r(51773),a=r(9790),o=r(2368),u=r(96674),p=r(99001),c=r(5600),d=(r(75215),r(67676),r(80442),r(52011)),m=r(33955);function h(e){if(null==e)return null;const t={};for(const r in e){const n=e[r];n&&(t[r]=n.toJSON())}return 0!==Object.keys(t).length?t:null}let y=n=class extends((0,o.J)(u.wq)){constructor(...e){super(...e),this.isAggregate=!1,this.layer=null,this.popupTemplate=null,this.sourceLayer=null,Object.defineProperty(this,"uid",{value:(0,p.D)(),configurable:!0})}normalizeCtorArgs(e,t,r,n){return e&&!e.declaredClass?e:{geometry:e,symbol:t,attributes:r,popupTemplate:n}}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),this._notifyLayer("geometry",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new n({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;for(const t of[this.sourceLayer,this.layer])if(t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t},this._notifyLayer("attributes",void 0,t,e)}getObjectId(){return this.sourceLayer&&"objectIdField"in this.sourceLayer&&this.sourceLayer.objectIdField?this.getAttribute(this.sourceLayer.objectIdField):null}toJSON(){return{aggregateGeometries:h(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:{...this.attributes},popupTemplate:this.popupTemplate&&this.popupTemplate.toJSON()}}notifyGeometryChanged(){this._notifyLayer("geometry",this.geometry,this.geometry)}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,n){if(!this.layer||!("graphicChanged"in this.layer))return;const i={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(i.action=n),"attributes"===e&&(i.attributeName=n),this.layer.graphicChanged(i)}};(0,i._)([(0,c.Cb)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const n=(0,m.im)(e[r]);n&&(t[r]=n)}return 0!==Object.keys(t).length?t:null}}})],y.prototype,"aggregateGeometries",null),(0,i._)([(0,c.Cb)({value:null})],y.prototype,"attributes",null),(0,i._)([(0,c.Cb)({value:null,types:s.qM,json:{read:m.im}})],y.prototype,"geometry",null),(0,i._)([(0,c.Cb)({type:Boolean})],y.prototype,"isAggregate",void 0),(0,i._)([(0,c.Cb)({clonable:"reference"})],y.prototype,"layer",void 0),(0,i._)([(0,c.Cb)({type:l.Z})],y.prototype,"popupTemplate",void 0),(0,i._)([(0,c.Cb)({clonable:"reference"})],y.prototype,"sourceLayer",void 0),(0,i._)([(0,c.Cb)({value:null,types:a.LB})],y.prototype,"symbol",null),(0,i._)([(0,c.Cb)({type:Boolean,value:!0})],y.prototype,"visible",null),y=n=(0,i._)([(0,d.j)("esri.Graphic")],y),(y||(y={})).generateUID=p.D;const f=y},92835:(e,t,r)=>{r.d(t,{Z:()=>h});var n,i=r(43697),s=r(96674),l=r(35463),a=r(5600),o=(r(75215),r(67676),r(80442),r(71715)),u=r(52011),p=r(30556);let c=n=class extends s.wq{static get allTime(){return d}static get empty(){return m}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(n.allTime)}get isEmpty(){return this.equals(n.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new n({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=null!=this.start?this.start.getTime():this.start,r=null!=this.end?this.end.getTime():this.end,n=null!=e.start?e.start.getTime():e.start,i=null!=e.end?e.end.getTime():e.end;return t===n&&r===i}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();let t=this.start;t&&(t=(0,l.JE)(t,e));let r=this.end;if(r){const t=(0,l.JE)(r,e);r=r.getTime()===t.getTime()?t:(0,l.Nm)(t,1,e)}return new n({start:t,end:r})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return n.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let l,a;if(i>=t&&i<=r?l=i:t>=i&&t<=s&&(l=t),r>=i&&r<=s?a=r:s>=t&&s<=r&&(a=s),null!=l&&null!=a&&!isNaN(l)&&!isNaN(a)){const e=new n;return e.start=l===-1/0?null:new Date(l),e.end=a===1/0?null:new Date(a),e}return n.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const r=new n,{start:i,end:s}=this;return null!=i&&(r.start=(0,l.Nm)(i,e,t)),null!=s&&(r.end=(0,l.Nm)(s,e,t)),r}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return d.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new n({start:t,end:r})}};(0,i._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,i._)([(0,o.r)("end")],c.prototype,"readEnd",null),(0,i._)([(0,p.c)("end")],c.prototype,"writeEnd",null),(0,i._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,i._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,i._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,i._)([(0,o.r)("start")],c.prototype,"readStart",null),(0,i._)([(0,p.c)("start")],c.prototype,"writeStart",null),c=n=(0,i._)([(0,u.j)("esri.TimeExtent")],c);const d=new c,m=new c({start:void 0,end:void 0}),h=c},84552:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(43697),i=r(2368),s=r(96674),l=r(35463),a=r(5600),o=(r(75215),r(67676),r(80442),r(36030)),u=r(52011),p=r(78981);let c=class extends((0,i.J)(s.wq)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,l.rJ)(this.value,this.unit,"milliseconds")}};(0,n._)([(0,o.J)(p.v,{nonNullable:!0})],c.prototype,"unit",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{write:!0},nonNullable:!0})],c.prototype,"value",void 0),c=(0,n._)([(0,u.j)("esri.TimeInterval")],c);const d=c},5732:(e,t,r)=>{r.d(t,{c:()=>n,g:()=>i});var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},57435:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(43697),i=r(46791),s=(r(66643),r(20102),r(92604),r(26258),r(87538)),l=r(5600),a=r(52011);let o=class extends i.Z{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,s.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new i.Z(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const n of t)if(n){if(r(n)){const t=this.indexOf(n,e);t>=0?t!==e&&this.reorder(n,e):this.add(n,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(n);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,n._)([(0,l.Cb)()],o.prototype,"getCollections",void 0),(0,n._)([(0,l.Cb)()],o.prototype,"getChildrenFunction",void 0),(0,n._)([(0,l.Cb)()],o.prototype,"itemFilterFunction",void 0),o=(0,n._)([(0,a.j)("esri.core.CollectionFlattener")],o);const u=o},17445:(e,t,r)=>{r.d(t,{N1:()=>d,YP:()=>o,Z_:()=>y,gx:()=>u,nn:()=>f,on:()=>c,tX:()=>g}),r(66643),r(46791);var n=r(91460),i=r(50758),s=r(70586),l=r(95330),a=r(26258);function o(e,t,r={}){return p(e,t,r,m)}function u(e,t,r={}){return p(e,t,r,h)}function p(e,t,r={},n){let i=null;const l=r.once?(e,r)=>{n(e)&&((0,s.hw)(i),t(e,r))}:(e,r)=>{n(e)&&t(e,r)};if(i=(0,a.aQ)(e,l,r.sync,r.equals),r.initial){const t=e();l(t,t)}return i}function c(e,t,r,l={}){let a=null,u=null,p=null;function c(){a&&u&&(u.remove(),l.onListenerRemove?.(a),a=null,u=null)}function d(e){l.once&&l.once&&(0,s.hw)(p),r(e)}const m=o(e,((e,r)=>{c(),(0,n.vT)(e)&&(a=e,u=(0,n.on)(e,t,d),l.onListenerAdd?.(e))}),{sync:l.sync,initial:!0});return p=(0,i.kB)((()=>{m.remove(),c()})),p}function d(e,t){return function(e,t,r){if((0,l.Hc)(r))return Promise.reject((0,l.zE)());const n=e();if(t?.(n))return Promise.resolve(n);let a=null;function o(){a=(0,s.hw)(a)}return new Promise(((n,s)=>{a=(0,i.AL)([(0,l.fu)(r,(()=>{o(),s((0,l.zE)())})),p(e,(e=>{o(),n(e)}),{sync:!1,once:!0},t??m)])}))}(e,h,t)}function m(e){return!0}function h(e){return!!e}r(87538);const y={sync:!0},f={initial:!0},g={sync:!0,initial:!0}},35463:(e,t,r)=>{r.d(t,{JE:()=>l,Nm:()=>s,rJ:()=>a}),r(80442);const n={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},i={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function s(e,t,r){const n=new Date(e.getTime());if(t&&r){const e=i[r],{getter:s,setter:l,multiplier:a}=e;if("months"===r){const e=function(e,t){const r=new Date(e,t+1,1);return r.setDate(0),r.getDate()}(n.getFullYear(),n.getMonth()+t);n.getDate()>e&&n.setDate(e)}n[l](n[s]()+t*a)}return n}function l(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function a(e,t,r){return 0===e?0:e*n[t]/n[r]}},91040:(e,t,r)=>{r.d(t,{yZ:()=>s});var n=r(67900);const i=96;function s(e,t){const r=t||e.extent,s=e.width,l=(0,n.c9)(r&&r.spatialReference);return r&&s?r.width/s*l*n.hd*i:0}},25906:(e,t,r)=>{r.r(t),r.d(t,{default:()=>xe});var n=r(43697),i=r(68773),s=r(38171),l=r(51773),a=r(3172),o=r(46791),u=r(57435),p=r(35454),c=r(22974),d=r(16453),m=r(95330),h=r(17445),y=r(17452),f=r(5600),g=r(75215),b=r(71715),v=r(52011),w=r(30556),_=r(76169),x=r(6570),C=r(82971),I=r(91040),E=r(8744),T=r(87085),F=r(71612),S=r(38009),N=r(16859),O=r(34760),P=r(72965),U=r(28294),L=r(52162),j=r(66677),A=r(21506),M=r(92036),D=r(67676);r(80442);const R={visible:"visibleSublayers"};let Z=class extends M.Z{constructor(e){super(e),this.scale=0}set layer(e){this._get("layer")!==e&&(this._set("layer",e),this.removeHandles("layer"),e&&this.addHandles([e.sublayers.on("change",(()=>this.notifyChange("visibleSublayers"))),e.on("wms-sublayer-update",(e=>this.notifyChange(R[e.propertyName])))],"layer"))}get layers(){return this.visibleSublayers.filter((({name:e})=>e)).map((({name:e})=>e)).join()}get version(){this.commitProperty("layers");const e=this.layer;return e&&e.commitProperty("imageTransparency"),(this._get("version")||0)+1}get visibleSublayers(){const{layer:e,scale:t}=this,r=e?.sublayers,n=[],i=e=>{const{minScale:r,maxScale:s,sublayers:l,visible:a}=e;a&&(0===t||(0===r||t<=r)&&(0===s||t>=s))&&(l?l.forEach(i):n.push(e))};return r?.forEach(i),n}toJSON(){const{layer:e,layers:t}=this,{imageFormat:r,imageTransparency:n,version:i}=e;return{format:r,request:"GetMap",service:"WMS",styles:"",transparent:n?"TRUE":"FALSE",version:i,layers:t}}};(0,n._)([(0,f.Cb)()],Z.prototype,"layer",null),(0,n._)([(0,f.Cb)({readOnly:!0})],Z.prototype,"layers",null),(0,n._)([(0,f.Cb)({type:Number})],Z.prototype,"scale",void 0),(0,n._)([(0,f.Cb)({readOnly:!0})],Z.prototype,"version",null),(0,n._)([(0,f.Cb)({readOnly:!0})],Z.prototype,"visibleSublayers",null),Z=(0,n._)([(0,v.j)("esri.layers.support.ExportWMSImageParameters")],Z);var q,H=r(90082),k=r(10699),B=r(90578);let $=0,J=q=class extends((0,k.IG)(d.w)){constructor(e){super(e),this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.legendUrl=null,this.legendEnabled=!0,this.layer=null,this.maxScale=0,this.minScale=0,this.name=null,this.parent=null,this.popupEnabled=!1,this.queryable=!1,this.sublayers=null,this.spatialReferences=null,this.title=null,this.addHandles([(0,h.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=this,e.layer=this.layer}),h.Z_),(0,h.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),h.Z_),(0,h.YP)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=this,t.layer=this.layer}),h.Z_),(0,h.YP)((()=>this.layer),(e=>{if(this.sublayers)for(const t of this.sublayers)t.layer=e}),h.Z_)])}get id(){return this._get("id")??$++}set id(e){this._set("id",e)}readLegendUrl(e,t){return t.legendUrl??t.legendURL??null}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}castSublayers(e){return(0,g.se)(o.Z.ofType(q),e)}set visible(e){this._setAndNotifyLayer("visible",e)}clone(){const e=new q;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent.clone()),this.hasOwnProperty("fullExtents")&&(e.fullExtents=this.fullExtents?.map((e=>e.clone()))??null),this.hasOwnProperty("legendUrl")&&(e.legendUrl=this.legendUrl),this.hasOwnProperty("legendEnabled")&&(e.legendEnabled=this.legendEnabled),this.hasOwnProperty("layer")&&(e.layer=this.layer),this.hasOwnProperty("name")&&(e.name=this.name),this.hasOwnProperty("parent")&&(e.parent=this.parent),this.hasOwnProperty("queryable")&&(e.queryable=this.queryable),this.hasOwnProperty("sublayers")&&(e.sublayers=this.sublayers&&this.sublayers.map((e=>e.clone()))),this.hasOwnProperty("spatialReferences")&&(e.spatialReferences=this.spatialReferences?.map((e=>e))),this.hasOwnProperty("visible")&&(e.visible=this.visible),this.hasOwnProperty("title")&&(e.title=this.title),e}_setAndNotifyLayer(e,t){const r=this.layer;this._get(e)!==t&&(this._set(e,t),r&&r.emit("wms-sublayer-update",{propertyName:e,id:this.id}))}};(0,n._)([(0,f.Cb)()],J.prototype,"description",void 0),(0,n._)([(0,f.Cb)({readOnly:!0})],J.prototype,"dimensions",void 0),(0,n._)([(0,f.Cb)({type:x.Z,json:{name:"extent"}})],J.prototype,"fullExtent",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"fullExtents",void 0),(0,n._)([(0,f.Cb)({type:Number,json:{write:{enabled:!1,overridePolicy:()=>({ignoreOrigin:!0,enabled:!0})}}})],J.prototype,"id",null),(0,n._)([(0,f.Cb)({type:String,json:{name:"legendUrl",write:{ignoreOrigin:!0}}})],J.prototype,"legendUrl",void 0),(0,n._)([(0,b.r)("legendUrl",["legendUrl","legendURL"])],J.prototype,"readLegendUrl",null),(0,n._)([(0,f.Cb)({type:Boolean,json:{name:"showLegend",origins:{"web-map":{read:!1,write:!1},"web-scene":{read:!1,write:!1}}}})],J.prototype,"legendEnabled",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"layer",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"maxScale",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"minScale",void 0),(0,n._)([(0,f.Cb)({readOnly:!0})],J.prototype,"effectiveScaleRange",null),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],J.prototype,"name",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"parent",void 0),(0,n._)([(0,f.Cb)({type:Boolean,json:{read:{source:"showPopup"},write:{ignoreOrigin:!0,target:"showPopup"}}})],J.prototype,"popupEnabled",void 0),(0,n._)([(0,f.Cb)({type:Boolean,json:{write:{ignoreOrigin:!0}}})],J.prototype,"queryable",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"sublayers",void 0),(0,n._)([(0,B.p)("sublayers")],J.prototype,"castSublayers",null),(0,n._)([(0,f.Cb)({type:[Number],json:{read:{source:"spatialReferences"}}})],J.prototype,"spatialReferences",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],J.prototype,"title",void 0),(0,n._)([(0,f.Cb)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"}}})],J.prototype,"visible",null),J=q=(0,n._)([(0,v.j)("esri.layers.support.WMSSublayer")],J);const G=J;var V=r(20102);const Y={84:4326,83:4269,27:4267};function W(e){if(!e)return null;const t={idCounter:-1};"string"==typeof e&&(e=(new DOMParser).parseFromString(e,"text/xml"));const r=e.documentElement;if("ServiceExceptionReport"===r.nodeName){const e=Array.prototype.slice.call(r.childNodes).map((e=>e.textContent)).join("\r\n");throw new V.Z("wmslayer:wms-capabilities-xml-is-not-valid","The server returned errors when the WMS capabilities were requested.",e)}const n=K("Capability",r),i=K("Service",r),s=n&&K("Request",n);if(!n||!i||!s)return null;const l=K("Layer",n);if(!l)return null;const a="WMS_Capabilities"===r.nodeName||"WMT_MS_Capabilities"===r.nodeName?r.getAttribute("version"):"1.3.0",o=te("Title",i,"")||te("Name",i,""),u=te("AccessConstraints",i,""),p=/^none$/i.test(u)?"":u,c=te("Abstract",i,""),d=parseInt(te("MaxWidth",i,"5000"),10),m=parseInt(te("MaxHeight",i,"5000"),10),h=ie(s,"GetMap"),y=ne(s,"GetMap"),f=le(l,a,t);if(!f)return null;let g,b=0;const v=Array.prototype.slice.call(n.childNodes),w=f.sublayers??[],_=e=>{null!=e&&w.push(e)};v.forEach((e=>{"Layer"===e.nodeName&&(0===b?g=e:1===b?(f.name&&(f.name="",_(le(g,a,t))),_(le(e,a,t))):_(le(e,a,t)),b++)}));let C=f.sublayers,I=f.extent;const E=f.fullExtents??[];if(C||(C=[]),0===C.length&&C.push(f),!I){const e=new x.Z(C[0].extent);f.extent=e.toJSON(),I=f.extent}const T=f.spatialReferences.length>0?f.spatialReferences:X(f),F=ne(s,"GetFeatureInfo"),S=F?ie(s,"GetFeatureInfo"):null,N=z(C),O=f.minScale||0,P=f.maxScale||0,U=f.dimensions??[],L=N.reduce(((e,t)=>e.concat(t.dimensions??[])),[]),j=U.concat(L).filter(oe);let A=null;if(j.length){const e=j.map((e=>{const{extent:t}=e;return function(e){return Array.isArray(e)&&e.length>0&&e[0]instanceof Date}(t)?t.map((e=>e.getTime())):t?.map((e=>[e.min.getTime(),e.max.getTime()]))})).flat(2).filter(D.pC);A={startTimeField:null,endTimeField:null,trackIdField:void 0,timeExtent:[Math.min(...e),Math.max(...e)]}}return{copyright:p,description:c,dimensions:U,extent:I,fullExtents:E,featureInfoFormats:S,featureInfoUrl:F,mapUrl:y,maxWidth:d,maxHeight:m,maxScale:P,minScale:O,layers:N,spatialReferences:T,supportedImageFormatTypes:h,timeInfo:A,title:o,version:a}}function X(e){if(e.spatialReferences.length>0)return e.spatialReferences;if(e.sublayers)for(const t of e.sublayers){const e=X(t);if(e.length>0)return e}return[]}function z(e){let t=[];for(const r of e)t.push(r),r.sublayers?.length&&(t=t.concat(z(r.sublayers)),delete r.sublayers);return t}function Q(e,t,r){return t.getAttribute(e)??r}function K(e,t){for(let r=0;r<t.childNodes.length;r++){const n=t.childNodes[r];if(ae(n)&&n.nodeName===e)return n}return null}function ee(e,t){if(null==t)return[];const r=[];for(let n=0;n<t.childNodes.length;n++){const i=t.childNodes[n];ae(i)&&i.nodeName===e&&r.push(i)}return r}function te(e,t,r){return K(e,t)?.textContent??r}function re(e,t,r){if(!e)return null;const n=parseFloat(e.getAttribute("minx")),i=parseFloat(e.getAttribute("miny")),s=parseFloat(e.getAttribute("maxx")),l=parseFloat(e.getAttribute("maxy"));let a,o,u,p;r?(a=isNaN(i)?-Number.MAX_VALUE:i,o=isNaN(n)?-Number.MAX_VALUE:n,u=isNaN(l)?Number.MAX_VALUE:l,p=isNaN(s)?Number.MAX_VALUE:s):(a=isNaN(n)?-Number.MAX_VALUE:n,o=isNaN(i)?-Number.MAX_VALUE:i,u=isNaN(s)?Number.MAX_VALUE:s,p=isNaN(l)?Number.MAX_VALUE:l);const c=new C.Z({wkid:t});return new x.Z({xmin:a,ymin:o,xmax:u,ymax:p,spatialReference:c})}function ne(e,t){const r=K(t,e);if(r){const e=K("DCPType",r);if(e){const t=K("HTTP",e);if(t){const e=K("Get",t);if(e){let t=function(e,t,r,n){const i=K("OnlineResource",r);return i?Q("xlink:href",i,null):null}(0,0,e);if(t)return t.indexOf("&")===t.length-1&&(t=t.substring(0,t.length-1)),function(e,t){const r=[],n=(0,y.mN)(e);for(const e in n.query)n.query.hasOwnProperty(e)&&(t.includes(e.toLowerCase())||r.push(e+"="+n.query[e]));return n.path+(r.length?"?"+r.join("&"):"")}(t,["service","request"])}}}}return null}function ie(e,t){const r=ee("Operation",e);if(!r.length)return ee("Format",K(t,e)).map((({textContent:e})=>e)).filter(D.pC);const n=[];for(const e of r)if(e.getAttribute("name")===t){const t=ee("Format",e);for(const{textContent:e}of t)null!=e&&n.push(e)}return n}function se(e,t,r){const n=K(t,e);if(!n)return r;const{textContent:i}=n;if(null==i||""===i)return r;const s=Number(i);return isNaN(s)?r:s}function le(e,t,r){if(!e)return null;const n={id:r.idCounter++,fullExtents:[],parentLayerId:null,queryable:"1"===e.getAttribute("queryable"),spatialReferences:[],sublayers:null},i=K("LatLonBoundingBox",e),s=K("EX_GeographicBoundingBox",e);let l=null;i&&(l=re(i,4326)),s&&(l=new x.Z(0,0,0,0,new C.Z({wkid:4326})),l.xmin=parseFloat(te("westBoundLongitude",s,"0")),l.ymin=parseFloat(te("southBoundLatitude",s,"0")),l.xmax=parseFloat(te("eastBoundLongitude",s,"0")),l.ymax=parseFloat(te("northBoundLatitude",s,"0"))),i||s||(l=new x.Z(-180,-90,180,90,new C.Z({wkid:4326}))),n.minScale=se(e,"MaxScaleDenominator",0),n.maxScale=se(e,"MinScaleDenominator",0);const a=["1.0.0","1.1.0","1.1.1"].includes(t)?"SRS":"CRS";return Array.prototype.slice.call(e.childNodes).forEach((e=>{if("Name"===e.nodeName)n.name=e.textContent||"";else if("Title"===e.nodeName)n.title=e.textContent||"";else if("Abstract"===e.nodeName)n.description=e.textContent||"";else if("BoundingBox"===e.nodeName){const r=e.getAttribute(a);if(r&&0===r.indexOf("EPSG:")){const n=parseInt(r.substring(5),10);0===n||isNaN(n)||l||(l="1.3.0"===t?re(e,n,(0,L.A)(n)):re(e,n))}const i=r&&r.indexOf(":");if(i&&i>-1){let s=parseInt(r.substring(i+1,r.length),10);0===s||isNaN(s)||(s=Y[s]??s);const l="1.3.0"===t?re(e,s,(0,L.A)(s)):re(e,s);l&&n.fullExtents&&n.fullExtents.push(l)}}else if(e.nodeName===a)(e.textContent?.split(" ")??[]).forEach((e=>{const t=e.includes(":")?parseInt(e.split(":")[1],10):parseInt(e,10);if(0!==t&&!isNaN(t)){const e=Y[t]??t;n.spatialReferences.includes(e)||n.spatialReferences.push(e)}}));else if("Style"!==e.nodeName||n.legendUrl){if("Layer"===e.nodeName){const i=le(e,t,r);i&&(i.parentLayerId=n.id,n.sublayers||(n.sublayers=[]),n.sublayers.push(i))}}else{const t=K("LegendURL",e);if(t){const e=K("OnlineResource",t);e&&(n.legendUrl=e.getAttribute("xlink:href"))}}})),n.extent=l?.toJSON(),n.dimensions=ee("Dimension",e).filter((e=>e.getAttribute("name")&&e.getAttribute("units")&&e.textContent)).map((e=>{const t=e.getAttribute("name"),r=e.getAttribute("units"),n=e.textContent,i=e.getAttribute("unitSymbol")??void 0,s=e.getAttribute("default")??void 0,l="0"!==Q("default",e,"0"),a="0"!==Q("nearestValue",e,"0"),o="0"!==Q("current",e,"0");return oe({name:t,units:r})?{name:"time",units:"ISO8601",extent:ce(n),default:ce(s),multipleValues:l,nearestValue:a,current:o}:function(e){return/^elevation$/i.test(e.name)&&/^(epsg|crs):\d+$/i.test(e.units)}({name:t,units:r})?{name:"elevation",units:r,extent:ue(n),unitSymbol:i,default:ue(s),multipleValues:l,nearestValue:a}:{name:t,units:r,extent:pe(n),unitSymbol:i,default:pe(s),multipleValues:l,nearestValue:a}})),n}function ae(e){return e.nodeType===Node.ELEMENT_NODE}function oe(e){return/^time$/i.test(e.name)&&/^iso8601$/i.test(e.units)}function ue(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:parseFloat(t[0]),max:parseFloat(t[1]),resolution:t.length>=3&&"0"!==t[2]?parseFloat(t[2]):void 0}})).filter(D.pC):r.map((e=>parseFloat(e)))}function pe(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:t[0],max:t[1],resolution:t.length>=3&&"0"!==t[2]?t[2]:void 0}})).filter(D.pC):r}function ce(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:new Date(t[0]),max:new Date(t[1]),resolution:t.length>=3&&"0"!==t[2]?de(t[2]):void 0}})).filter(D.pC):r.map((e=>new Date(e)))}function de(e){const t=e.match(/(?:p(\d+y|\d+(?:.|,)\d+y)?(\d+m|\d+(?:.|,)\d+m)?(\d+d|\d+(?:.|,)\d+d)?)?(?:t(\d+h|\d+(?:.|,)\d+h)?(\d+m|\d+(?:.|,)\d+m)?(\d+s|\d+(?:.|,)\d+s)?)?/i);return t?{years:me(t[1]),months:me(t[2]),days:me(t[3]),hours:me(t[4]),minutes:me(t[5]),seconds:me(t[6])}:null}function me(e){if(!e)return 0;const t=e.match(/(?:\d+(?:.|,)\d+|\d+)/);if(!t)return 0;const r=t[0].replace(",",".");return Number(r)}function he(e){return e.toISOString().replace(/\.[0-9]{3}/,"")}const ye=new Set([102100,3857,102113,900913]),fe=new Set([3395,54004]),ge=new p.X({bmp:"image/bmp",gif:"image/gif",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml"},{ignoreUnknown:!1});function be(e){return"text/html"===e}function ve(e){return"text/plain"===e}let we=class extends((0,F.h)((0,U.n)((0,O.Q)((0,P.M)((0,S.q)((0,N.I)((0,d.R)(T.Z)))))))){constructor(...e){super(...e),this.allSublayers=new u.Z({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.customParameters=null,this.customLayerParameters=null,this.copyright=null,this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.featureInfoFormats=null,this.featureInfoUrl=null,this.fetchFeatureInfoFunction=null,this.imageFormat=null,this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.legendEnabled=!0,this.mapUrl=null,this.isReference=null,this.operationalLayerType="WMS",this.spatialReference=null,this.spatialReferences=null,this.sublayers=null,this.type="wms",this.version=null,this.addHandles([(0,h.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=e.layer=this}),h.Z_),(0,h.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),h.Z_),(0,h.YP)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=t.layer=this}),h.Z_)])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this.allSublayers.destroy()}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMS"]},e).catch(m.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}readFullExtentFromItemOrMap(e,t){const r=t.extent;return r?new x.Z({xmin:r[0][0],ymin:r[0][1],xmax:r[1][0],ymax:r[1][1]}):null}writeFullExtent(e,t){t.extent=[[e.xmin,e.ymin],[e.xmax,e.ymax]]}get featureInfoFormat(){return null==this.featureInfoFormats?null:this.featureInfoFormats.find(be)??this.featureInfoFormats.find(ve)??null}set featureInfoFormat(e){null==e?(this.revert("featureInfoFormat","service"),this._clearOverride("featureInfoFormat")):(be(e)||ve(e))&&this._override("featureInfoFormat",e)}readImageFormat(e,t){const r=t.supportedImageFormatTypes;return r&&r.includes("image/png")?"image/png":r&&r[0]}readSpatialReferenceFromItemOrDocument(e,t){return new C.Z(t.spatialReferences[0])}writeSpatialReferences(e,t){const r=this.spatialReference?.wkid;e&&r?(t.spatialReferences=e.filter((e=>e!==r)),t.spatialReferences.unshift(r)):t.spatialReferences=e}readSublayersFromItemOrMap(e,t,r){return _e(t.layers,r,t.visibleLayers)}readSublayers(e,t,r){return _e(t.layers,r)}writeSublayers(e,t,r,n){t.layers=[];const i=new Map,s=e.flatten((({sublayers:e})=>e??[]));for(const e of s)if("number"==typeof e.parent?.id){const t=i.get(e.parent.id);null!=t?t.push(e.id):i.set(e.parent.id,[e.id])}for(const e of s){const r={sublayer:e,...n},s=e.write({parentLayerId:"number"==typeof e.parent?.id?e.parent.id:-1},r);if(i.has(e.id)&&(s.sublayerIds=i.get(e.id)),!e.sublayers&&e.name){const n=e.write({},r);delete n.id,t.layers.push(n)}}t.visibleLayers=s.filter((({visible:e,sublayers:t})=>e&&!t)).map((({name:e})=>e)).toArray()}set url(e){if(!e)return void this._set("url",e);const{path:t,query:r}=(0,y.mN)(e);for(const e in r)/^(request|service)$/i.test(e)&&delete r[e];const n=(0,y.fl)(t,r??{});this._set("url",n)}createExportImageParameters(e,t,r,n){const i=n?.pixelRatio??1,s=(0,I.yZ)({extent:e,width:t})*i,l=new Z({layer:this,scale:s}),{xmin:a,ymin:o,xmax:u,ymax:p,spatialReference:c}=e,d=function(e,t){let r=e.wkid;return null==t?r:(null!=r&&t.includes(r)||!e.latestWkid||(r=e.latestWkid),null!=r&&ye.has(r)?t.find((e=>ye.has(e)))||t.find((e=>fe.has(e)))||102100:r)}(c,this.spatialReferences),m="1.3.0"===this.version&&(0,L.A)(d)?`${o},${a},${p},${u}`:`${a},${o},${u},${p}`,h=l.toJSON();return{bbox:m,["1.3.0"===this.version?"crs":"srs"]:null==d||isNaN(d)?void 0:"EPSG:"+d,...h}}async fetchImage(e,t,r,n){const i=this.mapUrl,s=this.createExportImageParameters(e,t,r,n);if(!s.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const l=n?.timeExtent?.start,o=n?.timeExtent?.end,u=null!=l&&null!=o?l.getTime()===o.getTime()?he(l):`${he(l)}/${he(o)}`:void 0,p={responseType:"image",query:this._mixCustomParameters({width:t,height:r,...s,time:u,...this.refreshParameters}),signal:n?.signal};return(0,a.default)(i??"",p).then((e=>e.data))}async fetchImageBitmap(e,t,r,n){const i=this.mapUrl??"",s=this.createExportImageParameters(e,t,r,n);if(!s.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const l=n?.timeExtent?.start,o=n?.timeExtent?.end,u=null!=l&&null!=o?l.getTime()===o.getTime()?he(l):`${he(l)}/${he(o)}`:void 0,p={responseType:"blob",query:this._mixCustomParameters({width:t,height:r,...s,time:u,...this.refreshParameters}),signal:n?.signal},{data:c}=await(0,a.default)(i,p);return(0,H.g)(c,i,n?.signal)}fetchFeatureInfo(e,t,r,n,i){const s=(0,I.yZ)({extent:e,width:t}),l=function(e){const t=e.filter((e=>e.popupEnabled&&e.name&&e.queryable));return t.length?t.map((({name:e})=>e)).join():null}(new Z({layer:this,scale:s}).visibleSublayers);if(null==this.featureInfoUrl||null==l)return Promise.resolve([]);if(null==this.fetchFeatureInfoFunction&&null==this.featureInfoFormat)return Promise.resolve([]);const a="1.3.0"===this.version?{I:n,J:i}:{x:n,y:i},o={query_layers:l,request:"GetFeatureInfo",info_format:this.featureInfoFormat,feature_count:25,width:t,height:r,...a},u={...this.createExportImageParameters(e,t,r),...o},p=this._mixCustomParameters(u);return null!=this.fetchFeatureInfoFunction?this.fetchFeatureInfoFunction(p):this._defaultFetchFeatureInfoFunction((0,y.fl)(this.featureInfoUrl,p))}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}findSublayerByName(e){return this.allSublayers.find((t=>t.name===e))}serviceSupportsSpatialReference(e){return(0,j.G)(this.url)||null!=this.spatialReferences&&this.spatialReferences.some((t=>{const r=900913===t?C.Z.WebMercator:new C.Z({wkid:t});return(0,E.fS)(r,e)}))}_defaultFetchFeatureInfoFunction(e){const t=document.createElement("iframe");t.src=(0,y.qg)(e),t.style.border="none",t.style.margin="0",t.style.width="100%",t.setAttribute("sandbox","");const r=new l.Z({title:this.title,content:t}),n=new s.Z({sourceLayer:this,popupTemplate:r});return Promise.resolve([n])}async _fetchService(e){if(!this.resourceInfo&&this.parsedUrl?.path){const{path:t,query:r}=this.parsedUrl,{data:n}=await(0,a.default)(t,{query:{SERVICE:"WMS",REQUEST:"GetCapabilities",...r,...this.customParameters},responseType:"xml",signal:e});this.resourceInfo=W(n)}if(this.parsedUrl){const e=new y.R9(this.parsedUrl.path),{httpsDomains:t}=i.default.request;"https"!==e.scheme||e.port&&"443"!==e.port||!e.host||t.includes(e.host)||t.push(e.host)}this.read(this.resourceInfo,{origin:"service"})}_mixCustomParameters(e){if(!this.customLayerParameters&&!this.customParameters)return e;const t={...this.customParameters,...this.customLayerParameters};for(const r in t)e[r.toLowerCase()]=t[r];return e}};function _e(e,t,r){e=e??[];const n=new Map;e.every((e=>null==e.id))&&(e=(0,c.d9)(e)).forEach(((e,t)=>e.id=t));for(const i of e){const e=new G;e.read(i,t),r&&!r.includes(e.name)&&(e.visible=!1),n.set(e.id,e)}const i=[];for(const t of e){const e=null!=t.id?n.get(t.id):null;if(e)if(null!=t.parentLayerId&&t.parentLayerId>=0){const r=n.get(t.parentLayerId);if(!r)continue;r.sublayers||(r.sublayers=new o.Z),r.sublayers.push(e)}else i.push(e)}return i}(0,n._)([(0,f.Cb)({readOnly:!0})],we.prototype,"allSublayers",void 0),(0,n._)([(0,f.Cb)({json:{type:Object,write:!0}})],we.prototype,"customParameters",void 0),(0,n._)([(0,f.Cb)({json:{type:Object,write:!0}})],we.prototype,"customLayerParameters",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:!0}})],we.prototype,"copyright",void 0),(0,n._)([(0,f.Cb)()],we.prototype,"description",void 0),(0,n._)([(0,f.Cb)({readOnly:!0})],we.prototype,"dimensions",void 0),(0,n._)([(0,f.Cb)({json:{type:[[Number]],read:{source:"extent"},write:{target:"extent"},origins:{"web-document":{write:{ignoreOrigin:!0}},"portal-item":{write:{ignoreOrigin:!0}}}}})],we.prototype,"fullExtent",void 0),(0,n._)([(0,b.r)(["web-document","portal-item"],"fullExtent",["extent"])],we.prototype,"readFullExtentFromItemOrMap",null),(0,n._)([(0,w.c)(["web-document","portal-item"],"fullExtent",{extent:{type:[[Number]]}})],we.prototype,"writeFullExtent",null),(0,n._)([(0,f.Cb)()],we.prototype,"fullExtents",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],we.prototype,"featureInfoFormat",null),(0,n._)([(0,f.Cb)({type:[String],readOnly:!0})],we.prototype,"featureInfoFormats",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],we.prototype,"featureInfoUrl",void 0),(0,n._)([(0,f.Cb)()],we.prototype,"fetchFeatureInfoFunction",void 0),(0,n._)([(0,f.Cb)({type:String,json:{origins:{"web-document":{default:"image/png",type:ge.jsonValues,read:{reader:ge.read,source:"format"},write:{writer:ge.write,target:"format"}}}}})],we.prototype,"imageFormat",void 0),(0,n._)([(0,b.r)("imageFormat",["supportedImageFormatTypes"])],we.prototype,"readImageFormat",null),(0,n._)([(0,f.Cb)({type:Number,json:{read:{source:"maxHeight"},write:{target:"maxHeight"}}})],we.prototype,"imageMaxHeight",void 0),(0,n._)([(0,f.Cb)({type:Number,json:{read:{source:"maxWidth"},write:{target:"maxWidth"}}})],we.prototype,"imageMaxWidth",void 0),(0,n._)([(0,f.Cb)()],we.prototype,"imageTransparency",void 0),(0,n._)([(0,f.Cb)(A.rn)],we.prototype,"legendEnabled",void 0),(0,n._)([(0,f.Cb)({type:["show","hide","hide-children"]})],we.prototype,"listMode",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],we.prototype,"mapUrl",void 0),(0,n._)([(0,f.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],we.prototype,"isReference",void 0),(0,n._)([(0,f.Cb)({type:["WMS"]})],we.prototype,"operationalLayerType",void 0),(0,n._)([(0,f.Cb)()],we.prototype,"resourceInfo",void 0),(0,n._)([(0,f.Cb)({type:C.Z,json:{origins:{service:{read:{source:"extent.spatialReference"}}},write:!1}})],we.prototype,"spatialReference",void 0),(0,n._)([(0,b.r)(["web-document","portal-item"],"spatialReference",["spatialReferences"])],we.prototype,"readSpatialReferenceFromItemOrDocument",null),(0,n._)([(0,f.Cb)({type:[g.z8],json:{read:!1,origins:{service:{read:!0},"web-document":{read:!1,write:{ignoreOrigin:!0}},"portal-item":{read:!1,write:{ignoreOrigin:!0}}}}})],we.prototype,"spatialReferences",void 0),(0,n._)([(0,w.c)(["web-document","portal-item"],"spatialReferences")],we.prototype,"writeSpatialReferences",null),(0,n._)([(0,f.Cb)({type:o.Z.ofType(G),json:{write:{target:"layers",overridePolicy(e,t,r){if(function(e,t){return e.some((e=>{for(const r in e)if((0,_.d)(e,r,null,t))return!0;return!1}))}(this.allSublayers,r))return{ignoreOrigin:!0}}}}})],we.prototype,"sublayers",void 0),(0,n._)([(0,b.r)(["web-document","portal-item"],"sublayers",["layers","visibleLayers"])],we.prototype,"readSublayersFromItemOrMap",null),(0,n._)([(0,b.r)("service","sublayers",["layers"])],we.prototype,"readSublayers",null),(0,n._)([(0,w.c)("sublayers",{layers:{type:[G]},visibleLayers:{type:[String]}})],we.prototype,"writeSublayers",null),(0,n._)([(0,f.Cb)({json:{read:!1},readOnly:!0,value:"wms"})],we.prototype,"type",void 0),(0,n._)([(0,f.Cb)(A.HQ)],we.prototype,"url",null),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],we.prototype,"version",void 0),we=(0,n._)([(0,v.j)("esri.layers.WMSLayer")],we);const xe=we},16859:(e,t,r)=>{r.d(t,{I:()=>_});var n=r(43697),i=r(68773),s=r(40330),l=r(3172),a=r(66643),o=r(20102),u=r(92604),p=r(95330),c=r(17452),d=r(5600),m=(r(75215),r(67676),r(80442),r(71715)),h=r(52011),y=r(30556),f=r(84230),g=r(48522),b=r(15235),v=r(86082),w=r(14661);const _=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=null,this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new b.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:n}=await r.e(8062).then(r.bind(r,18062));return(0,p.k_)(t),await n({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,p.D_)(e)||u.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,p.r9)(e),!0))))}async setUserPrivileges(e,t){if(!i.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:n},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",n),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,p.r9)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const n=e===r.id;if(n&&r.portal.user)return(0,w.Ss)(r);let i,l;if(n)i=r.portal.url;else try{i=await(0,f.oP)(this.url,t)}catch(e){(0,p.r9)(e)}if(!i||!(0,c.Zo)(i,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;l=await(s.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.r9)(e)}if(!l)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(n?await r.reload():(r=new b.default({id:e,portal:{url:i}}),await r.load(t)),r.portal.user)return(0,w.Ss)(r)}catch(e){(0,p.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=x.credential===t?x.user:await this._fetchEditingUser(e);return x.credential=t,x.user=r,null==r||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const n=`${r.owningSystemUrl}/sharing/rest`,i=g.Z.getDefault();if(i&&i.loaded&&(0,c.Fv)(i.restUrl)===(0,c.Fv)(n))return i.user;const o=`${n}/community/self`,u=null!=e?e.signal:null,p=await(0,a.q6)((0,l.default)(o,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?v.default.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,n=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||g.Z.getDefault());return r&&n&&!(0,c.tm)(n.restUrl,r.restUrl)?(t.messages&&t.messages.push(new o.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,n._)([(0,d.Cb)({type:b.default})],t.prototype,"portalItem",null),(0,n._)([(0,m.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,n._)([(0,y.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,n._)([(0,d.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,n._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,n._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,n._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,n._)([(0,h.j)("esri.layers.mixins.PortalLayer")],t),t},x={credential:null,user:null}},34760:(e,t,r)=>{r.d(t,{Q:()=>g});var n=r(43697),i=r(92604),s=r(95330),l=r(5600),a=(r(75215),r(67676),r(80442),r(52011)),o=r(46791),u=(r(66643),r(20102),r(26258),r(87538));const p=new o.Z,c=new WeakMap;function d(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e}function m(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:m(t,e%t):0}let h=0,y=0;function f(){const e=Date.now();for(const t of p)t.refreshInterval&&e-(c.get(t)??0)+5>=6e4*t.refreshInterval&&(c.set(t,e),t.refresh(e))}(0,u.EH)((()=>{const e=Date.now();let t=0;for(const r of p)t=m(Math.round(6e4*r.refreshInterval),t),r.refreshInterval?c.get(r)||c.set(r,e):c.delete(r);if(t!==y){if(y=t,clearInterval(h),0===y)return void(h=0);h=setInterval(f,y)}}));const g=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,s.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||function(e){d(e)&&p.push(e)}(this)}),(()=>{}))}destroy(){var e;d(e=this)&&p.includes(e)&&p.remove(e)}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,s.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{i.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}};return(0,n._)([(0,l.Cb)({type:Number,cast:e=>e>=.1?e:e<=0?0:.1,json:{write:!0}})],t.prototype,"refreshInterval",void 0),(0,n._)([(0,l.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,n._)([(0,l.Cb)()],t.prototype,"refreshParameters",null),t=(0,n._)([(0,a.j)("esri.layers.mixins.RefreshableLayer")],t),t}},28294:(e,t,r)=>{r.d(t,{n:()=>d});var n=r(43697),i=r(92835),s=r(84552),l=r(5600),a=(r(75215),r(67676),r(80442),r(71715)),o=r(52011),u=r(35671),p=r(76259),c=r(78981);const d=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const n=r.timeOffset,i=c.v.fromJSON(r.timeOffsetUnits);return n&&i?new s.Z({value:n,unit:i}):null}set timeInfo(e){(0,u.UF)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,n._)([(0,l.Cb)({type:i.Z,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,n._)([(0,l.Cb)({type:s.Z})],t.prototype,"timeOffset",void 0),(0,n._)([(0,a.r)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,n._)([(0,l.Cb)({value:null,type:p.Z,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,n._)([(0,l.Cb)({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=(0,n._)([(0,o.j)("esri.layers.mixins.TemporalLayer")],t),t}},52162:(e,t,r)=>{r.d(t,{A:()=>i});const n=[[3819,3819],[3821,3824],[3889,3889],[3906,3906],[4001,4025],[4027,4036],[4039,4047],[4052,4055],[4074,4075],[4080,4081],[4120,4176],[4178,4185],[4188,4216],[4218,4289],[4291,4304],[4306,4319],[4322,4326],[4463,4463],[4470,4470],[4475,4475],[4483,4483],[4490,4490],[4555,4558],[4600,4646],[4657,4765],[4801,4811],[4813,4821],[4823,4824],[4901,4904],[5013,5013],[5132,5132],[5228,5229],[5233,5233],[5246,5246],[5252,5252],[5264,5264],[5324,5340],[5354,5354],[5360,5360],[5365,5365],[5370,5373],[5381,5381],[5393,5393],[5451,5451],[5464,5464],[5467,5467],[5489,5489],[5524,5524],[5527,5527],[5546,5546],[2044,2045],[2081,2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3038,3051],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3150,3151],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3389,3390],[3416,3417],[3833,3841],[3844,3850],[3854,3854],[3873,3885],[3907,3910],[4026,4026],[4037,4038],[4417,4417],[4434,4434],[4491,4554],[4839,4839],[5048,5048],[5105,5130],[5253,5259],[5269,5275],[5343,5349],[5479,5482],[5518,5519],[5520,5520],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]];function i(e){return null!=e&&n.some((([t,r])=>e>=t&&e<=r))}},76259:(e,t,r)=>{r.d(t,{Z:()=>y});var n=r(43697),i=r(92835),s=r(84552),l=r(2368),a=r(96674),o=r(5600),u=(r(75215),r(67676),r(80442),r(71715)),p=r(52011),c=r(30556),d=r(80216);function m(e,t){return s.Z.fromJSON({value:e,unit:t})}let h=class extends((0,l.J)(a.wq)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeReference=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const r=new Date(t.timeExtent[0]),n=new Date(t.timeExtent[1]);return new i.Z({start:r,end:n})}writeFullTimeExtent(e,t){e&&null!=e.start&&null!=e.end?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?m(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?m(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,n._)([(0,o.Cb)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],h.prototype,"cumulative",void 0),(0,n._)([(0,o.Cb)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"endField",void 0),(0,n._)([(0,o.Cb)({type:i.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"fullTimeExtent",void 0),(0,n._)([(0,u.r)("fullTimeExtent",["timeExtent"])],h.prototype,"readFullTimeExtent",null),(0,n._)([(0,c.c)("fullTimeExtent")],h.prototype,"writeFullTimeExtent",null),(0,n._)([(0,o.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"hasLiveData",void 0),(0,n._)([(0,o.Cb)({type:s.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"interval",void 0),(0,n._)([(0,u.r)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],h.prototype,"readInterval",null),(0,n._)([(0,c.c)("interval")],h.prototype,"writeInterval",null),(0,n._)([(0,o.Cb)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"startField",void 0),(0,n._)([(0,o.Cb)({type:d.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"timeReference",void 0),(0,n._)([(0,o.Cb)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"trackIdField",void 0),(0,n._)([(0,o.Cb)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],h.prototype,"useTime",void 0),h=(0,n._)([(0,p.j)("esri.layers.support.TimeInfo")],h);const y=h},90082:(e,t,r)=>{r.d(t,{V:()=>l,g:()=>s});var n=r(20102),i=r(95330);async function s(e,t,r){let s;try{s=await createImageBitmap(e)}catch(e){throw new n.Z("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,i.k_)(r),s}async function l(e,t,r,s,l){let a;try{a=await createImageBitmap(e)}catch(e){throw new n.Z("request:server",`Unable to load tile ${t}/${r}/${s}`,{error:e,level:t,row:r,col:s})}return(0,i.k_)(l),a}},78981:(e,t,r)=>{r.d(t,{v:()=>n});const n=(0,r(35454).w)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2462,5732],{38171:(e,t,r)=>{r.d(t,{Z:()=>f});var n,i=r(43697),s=r(66577),l=r(51773),a=r(9790),o=r(2368),u=r(96674),p=r(99001),c=r(5600),d=(r(75215),r(67676),r(80442),r(52011)),m=r(33955);function h(e){if(null==e)return null;const t={};for(const r in e){const n=e[r];n&&(t[r]=n.toJSON())}return 0!==Object.keys(t).length?t:null}let y=n=class extends((0,o.J)(u.wq)){constructor(...e){super(...e),this.isAggregate=!1,this.layer=null,this.popupTemplate=null,this.sourceLayer=null,Object.defineProperty(this,"uid",{value:(0,p.D)(),configurable:!0})}normalizeCtorArgs(e,t,r,n){return e&&!e.declaredClass?e:{geometry:e,symbol:t,attributes:r,popupTemplate:n}}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),this._notifyLayer("geometry",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new n({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;for(const t of[this.sourceLayer,this.layer])if(t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t},this._notifyLayer("attributes",void 0,t,e)}getObjectId(){return this.sourceLayer&&"objectIdField"in this.sourceLayer&&this.sourceLayer.objectIdField?this.getAttribute(this.sourceLayer.objectIdField):null}toJSON(){return{aggregateGeometries:h(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:{...this.attributes},popupTemplate:this.popupTemplate&&this.popupTemplate.toJSON()}}notifyGeometryChanged(){this._notifyLayer("geometry",this.geometry,this.geometry)}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,n){if(!this.layer||!("graphicChanged"in this.layer))return;const i={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(i.action=n),"attributes"===e&&(i.attributeName=n),this.layer.graphicChanged(i)}};(0,i._)([(0,c.Cb)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const n=(0,m.im)(e[r]);n&&(t[r]=n)}return 0!==Object.keys(t).length?t:null}}})],y.prototype,"aggregateGeometries",null),(0,i._)([(0,c.Cb)({value:null})],y.prototype,"attributes",null),(0,i._)([(0,c.Cb)({value:null,types:s.qM,json:{read:m.im}})],y.prototype,"geometry",null),(0,i._)([(0,c.Cb)({type:Boolean})],y.prototype,"isAggregate",void 0),(0,i._)([(0,c.Cb)({clonable:"reference"})],y.prototype,"layer",void 0),(0,i._)([(0,c.Cb)({type:l.Z})],y.prototype,"popupTemplate",void 0),(0,i._)([(0,c.Cb)({clonable:"reference"})],y.prototype,"sourceLayer",void 0),(0,i._)([(0,c.Cb)({value:null,types:a.LB})],y.prototype,"symbol",null),(0,i._)([(0,c.Cb)({type:Boolean,value:!0})],y.prototype,"visible",null),y=n=(0,i._)([(0,d.j)("esri.Graphic")],y),(y||(y={})).generateUID=p.D;const f=y},92835:(e,t,r)=>{r.d(t,{Z:()=>h});var n,i=r(43697),s=r(96674),l=r(35463),a=r(5600),o=(r(75215),r(67676),r(80442),r(71715)),u=r(52011),p=r(30556);let c=n=class extends s.wq{static get allTime(){return d}static get empty(){return m}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(n.allTime)}get isEmpty(){return this.equals(n.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new n({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=null!=this.start?this.start.getTime():this.start,r=null!=this.end?this.end.getTime():this.end,n=null!=e.start?e.start.getTime():e.start,i=null!=e.end?e.end.getTime():e.end;return t===n&&r===i}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();let t=this.start;t&&(t=(0,l.JE)(t,e));let r=this.end;if(r){const t=(0,l.JE)(r,e);r=r.getTime()===t.getTime()?t:(0,l.Nm)(t,1,e)}return new n({start:t,end:r})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return n.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let l,a;if(i>=t&&i<=r?l=i:t>=i&&t<=s&&(l=t),r>=i&&r<=s?a=r:s>=t&&s<=r&&(a=s),null!=l&&null!=a&&!isNaN(l)&&!isNaN(a)){const e=new n;return e.start=l===-1/0?null:new Date(l),e.end=a===1/0?null:new Date(a),e}return n.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const r=new n,{start:i,end:s}=this;return null!=i&&(r.start=(0,l.Nm)(i,e,t)),null!=s&&(r.end=(0,l.Nm)(s,e,t)),r}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return d.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new n({start:t,end:r})}};(0,i._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,i._)([(0,o.r)("end")],c.prototype,"readEnd",null),(0,i._)([(0,p.c)("end")],c.prototype,"writeEnd",null),(0,i._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,i._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,i._)([(0,a.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,i._)([(0,o.r)("start")],c.prototype,"readStart",null),(0,i._)([(0,p.c)("start")],c.prototype,"writeStart",null),c=n=(0,i._)([(0,u.j)("esri.TimeExtent")],c);const d=new c,m=new c({start:void 0,end:void 0}),h=c},84552:(e,t,r)=>{r.d(t,{Z:()=>d});var n=r(43697),i=r(2368),s=r(96674),l=r(35463),a=r(5600),o=(r(75215),r(67676),r(80442),r(36030)),u=r(52011),p=r(78981);let c=class extends((0,i.J)(s.wq)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,l.rJ)(this.value,this.unit,"milliseconds")}};(0,n._)([(0,o.J)(p.v,{nonNullable:!0})],c.prototype,"unit",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{write:!0},nonNullable:!0})],c.prototype,"value",void 0),c=(0,n._)([(0,u.j)("esri.TimeInterval")],c);const d=c},5732:(e,t,r)=>{r.d(t,{c:()=>n,g:()=>i});var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},57435:(e,t,r)=>{r.d(t,{Z:()=>u});var n=r(43697),i=r(46791),s=(r(66643),r(20102),r(92604),r(26258),r(87538)),l=r(5600),a=r(52011);let o=class extends i.Z{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,s.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new i.Z(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const n of t)if(n){if(r(n)){const t=this.indexOf(n,e);t>=0?t!==e&&this.reorder(n,e):this.add(n,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(n);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,n._)([(0,l.Cb)()],o.prototype,"getCollections",void 0),(0,n._)([(0,l.Cb)()],o.prototype,"getChildrenFunction",void 0),(0,n._)([(0,l.Cb)()],o.prototype,"itemFilterFunction",void 0),o=(0,n._)([(0,a.j)("esri.core.CollectionFlattener")],o);const u=o},17445:(e,t,r)=>{r.d(t,{N1:()=>d,YP:()=>o,Z_:()=>y,gx:()=>u,nn:()=>f,on:()=>c,tX:()=>g}),r(66643),r(46791);var n=r(91460),i=r(50758),s=r(70586),l=r(95330),a=r(26258);function o(e,t,r={}){return p(e,t,r,m)}function u(e,t,r={}){return p(e,t,r,h)}function p(e,t,r={},n){let i=null;const l=r.once?(e,r)=>{n(e)&&((0,s.hw)(i),t(e,r))}:(e,r)=>{n(e)&&t(e,r)};if(i=(0,a.aQ)(e,l,r.sync,r.equals),r.initial){const t=e();l(t,t)}return i}function c(e,t,r,l={}){let a=null,u=null,p=null;function c(){a&&u&&(u.remove(),l.onListenerRemove?.(a),a=null,u=null)}function d(e){l.once&&l.once&&(0,s.hw)(p),r(e)}const m=o(e,((e,r)=>{c(),(0,n.vT)(e)&&(a=e,u=(0,n.on)(e,t,d),l.onListenerAdd?.(e))}),{sync:l.sync,initial:!0});return p=(0,i.kB)((()=>{m.remove(),c()})),p}function d(e,t){return function(e,t,r){if((0,l.Hc)(r))return Promise.reject((0,l.zE)());const n=e();if(t?.(n))return Promise.resolve(n);let a=null;function o(){a=(0,s.hw)(a)}return new Promise(((n,s)=>{a=(0,i.AL)([(0,l.fu)(r,(()=>{o(),s((0,l.zE)())})),p(e,(e=>{o(),n(e)}),{sync:!1,once:!0},t??m)])}))}(e,h,t)}function m(e){return!0}function h(e){return!!e}r(87538);const y={sync:!0},f={initial:!0},g={sync:!0,initial:!0}},35463:(e,t,r)=>{r.d(t,{JE:()=>l,Nm:()=>s,rJ:()=>a}),r(80442);const n={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},i={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function s(e,t,r){const n=new Date(e.getTime());if(t&&r){const e=i[r],{getter:s,setter:l,multiplier:a}=e;if("months"===r){const e=function(e,t){const r=new Date(e,t+1,1);return r.setDate(0),r.getDate()}(n.getFullYear(),n.getMonth()+t);n.getDate()>e&&n.setDate(e)}n[l](n[s]()+t*a)}return n}function l(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function a(e,t,r){return 0===e?0:e*n[t]/n[r]}},91040:(e,t,r)=>{r.d(t,{yZ:()=>s});var n=r(67900);const i=96;function s(e,t){const r=t||e.extent,s=e.width,l=(0,n.c9)(r&&r.spatialReference);return r&&s?r.width/s*l*n.hd*i:0}},25906:(e,t,r)=>{r.r(t),r.d(t,{default:()=>xe});var n=r(43697),i=r(68773),s=r(38171),l=r(51773),a=r(3172),o=r(46791),u=r(57435),p=r(35454),c=r(22974),d=r(16453),m=r(95330),h=r(17445),y=r(17452),f=r(5600),g=r(75215),b=r(71715),v=r(52011),w=r(30556),_=r(76169),x=r(6570),C=r(82971),I=r(91040),E=r(8744),T=r(87085),F=r(71612),S=r(38009),N=r(16859),O=r(34760),P=r(72965),U=r(28294),L=r(52162),j=r(66677),A=r(21506),M=r(92036),D=r(67676);r(80442);const R={visible:"visibleSublayers"};let Z=class extends M.Z{constructor(e){super(e),this.scale=0}set layer(e){this._get("layer")!==e&&(this._set("layer",e),this.removeHandles("layer"),e&&this.addHandles([e.sublayers.on("change",(()=>this.notifyChange("visibleSublayers"))),e.on("wms-sublayer-update",(e=>this.notifyChange(R[e.propertyName])))],"layer"))}get layers(){return this.visibleSublayers.filter((({name:e})=>e)).map((({name:e})=>e)).join()}get version(){this.commitProperty("layers");const e=this.layer;return e&&e.commitProperty("imageTransparency"),(this._get("version")||0)+1}get visibleSublayers(){const{layer:e,scale:t}=this,r=e?.sublayers,n=[],i=e=>{const{minScale:r,maxScale:s,sublayers:l,visible:a}=e;a&&(0===t||(0===r||t<=r)&&(0===s||t>=s))&&(l?l.forEach(i):n.push(e))};return r?.forEach(i),n}toJSON(){const{layer:e,layers:t}=this,{imageFormat:r,imageTransparency:n,version:i}=e;return{format:r,request:"GetMap",service:"WMS",styles:"",transparent:n?"TRUE":"FALSE",version:i,layers:t}}};(0,n._)([(0,f.Cb)()],Z.prototype,"layer",null),(0,n._)([(0,f.Cb)({readOnly:!0})],Z.prototype,"layers",null),(0,n._)([(0,f.Cb)({type:Number})],Z.prototype,"scale",void 0),(0,n._)([(0,f.Cb)({readOnly:!0})],Z.prototype,"version",null),(0,n._)([(0,f.Cb)({readOnly:!0})],Z.prototype,"visibleSublayers",null),Z=(0,n._)([(0,v.j)("esri.layers.support.ExportWMSImageParameters")],Z);var q,H=r(90082),k=r(10699),B=r(90578);let $=0,J=q=class extends((0,k.IG)(d.w)){constructor(e){super(e),this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.legendUrl=null,this.legendEnabled=!0,this.layer=null,this.maxScale=0,this.minScale=0,this.name=null,this.parent=null,this.popupEnabled=!1,this.queryable=!1,this.sublayers=null,this.spatialReferences=null,this.title=null,this.addHandles([(0,h.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=this,e.layer=this.layer}),h.Z_),(0,h.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),h.Z_),(0,h.YP)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=this,t.layer=this.layer}),h.Z_),(0,h.YP)((()=>this.layer),(e=>{if(this.sublayers)for(const t of this.sublayers)t.layer=e}),h.Z_)])}get id(){return this._get("id")??$++}set id(e){this._set("id",e)}readLegendUrl(e,t){return t.legendUrl??t.legendURL??null}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}castSublayers(e){return(0,g.se)(o.Z.ofType(q),e)}set visible(e){this._setAndNotifyLayer("visible",e)}clone(){const e=new q;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent.clone()),this.hasOwnProperty("fullExtents")&&(e.fullExtents=this.fullExtents?.map((e=>e.clone()))??null),this.hasOwnProperty("legendUrl")&&(e.legendUrl=this.legendUrl),this.hasOwnProperty("legendEnabled")&&(e.legendEnabled=this.legendEnabled),this.hasOwnProperty("layer")&&(e.layer=this.layer),this.hasOwnProperty("name")&&(e.name=this.name),this.hasOwnProperty("parent")&&(e.parent=this.parent),this.hasOwnProperty("queryable")&&(e.queryable=this.queryable),this.hasOwnProperty("sublayers")&&(e.sublayers=this.sublayers&&this.sublayers.map((e=>e.clone()))),this.hasOwnProperty("spatialReferences")&&(e.spatialReferences=this.spatialReferences?.map((e=>e))),this.hasOwnProperty("visible")&&(e.visible=this.visible),this.hasOwnProperty("title")&&(e.title=this.title),e}_setAndNotifyLayer(e,t){const r=this.layer;this._get(e)!==t&&(this._set(e,t),r&&r.emit("wms-sublayer-update",{propertyName:e,id:this.id}))}};(0,n._)([(0,f.Cb)()],J.prototype,"description",void 0),(0,n._)([(0,f.Cb)({readOnly:!0})],J.prototype,"dimensions",void 0),(0,n._)([(0,f.Cb)({type:x.Z,json:{name:"extent"}})],J.prototype,"fullExtent",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"fullExtents",void 0),(0,n._)([(0,f.Cb)({type:Number,json:{write:{enabled:!1,overridePolicy:()=>({ignoreOrigin:!0,enabled:!0})}}})],J.prototype,"id",null),(0,n._)([(0,f.Cb)({type:String,json:{name:"legendUrl",write:{ignoreOrigin:!0}}})],J.prototype,"legendUrl",void 0),(0,n._)([(0,b.r)("legendUrl",["legendUrl","legendURL"])],J.prototype,"readLegendUrl",null),(0,n._)([(0,f.Cb)({type:Boolean,json:{name:"showLegend",origins:{"web-map":{read:!1,write:!1},"web-scene":{read:!1,write:!1}}}})],J.prototype,"legendEnabled",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"layer",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"maxScale",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"minScale",void 0),(0,n._)([(0,f.Cb)({readOnly:!0})],J.prototype,"effectiveScaleRange",null),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],J.prototype,"name",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"parent",void 0),(0,n._)([(0,f.Cb)({type:Boolean,json:{read:{source:"showPopup"},write:{ignoreOrigin:!0,target:"showPopup"}}})],J.prototype,"popupEnabled",void 0),(0,n._)([(0,f.Cb)({type:Boolean,json:{write:{ignoreOrigin:!0}}})],J.prototype,"queryable",void 0),(0,n._)([(0,f.Cb)()],J.prototype,"sublayers",void 0),(0,n._)([(0,B.p)("sublayers")],J.prototype,"castSublayers",null),(0,n._)([(0,f.Cb)({type:[Number],json:{read:{source:"spatialReferences"}}})],J.prototype,"spatialReferences",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],J.prototype,"title",void 0),(0,n._)([(0,f.Cb)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"}}})],J.prototype,"visible",null),J=q=(0,n._)([(0,v.j)("esri.layers.support.WMSSublayer")],J);const G=J;var V=r(20102);const Y={84:4326,83:4269,27:4267};function W(e){if(!e)return null;const t={idCounter:-1};"string"==typeof e&&(e=(new DOMParser).parseFromString(e,"text/xml"));const r=e.documentElement;if("ServiceExceptionReport"===r.nodeName){const e=Array.prototype.slice.call(r.childNodes).map((e=>e.textContent)).join("\r\n");throw new V.Z("wmslayer:wms-capabilities-xml-is-not-valid","The server returned errors when the WMS capabilities were requested.",e)}const n=K("Capability",r),i=K("Service",r),s=n&&K("Request",n);if(!n||!i||!s)return null;const l=K("Layer",n);if(!l)return null;const a="WMS_Capabilities"===r.nodeName||"WMT_MS_Capabilities"===r.nodeName?r.getAttribute("version"):"1.3.0",o=te("Title",i,"")||te("Name",i,""),u=te("AccessConstraints",i,""),p=/^none$/i.test(u)?"":u,c=te("Abstract",i,""),d=parseInt(te("MaxWidth",i,"5000"),10),m=parseInt(te("MaxHeight",i,"5000"),10),h=ie(s,"GetMap"),y=ne(s,"GetMap"),f=le(l,a,t);if(!f)return null;let g,b=0;const v=Array.prototype.slice.call(n.childNodes),w=f.sublayers??[],_=e=>{null!=e&&w.push(e)};v.forEach((e=>{"Layer"===e.nodeName&&(0===b?g=e:1===b?(f.name&&(f.name="",_(le(g,a,t))),_(le(e,a,t))):_(le(e,a,t)),b++)}));let C=f.sublayers,I=f.extent;const E=f.fullExtents??[];if(C||(C=[]),0===C.length&&C.push(f),!I){const e=new x.Z(C[0].extent);f.extent=e.toJSON(),I=f.extent}const T=f.spatialReferences.length>0?f.spatialReferences:X(f),F=ne(s,"GetFeatureInfo"),S=F?ie(s,"GetFeatureInfo"):null,N=z(C),O=f.minScale||0,P=f.maxScale||0,U=f.dimensions??[],L=N.reduce(((e,t)=>e.concat(t.dimensions??[])),[]),j=U.concat(L).filter(oe);let A=null;if(j.length){const e=j.map((e=>{const{extent:t}=e;return function(e){return Array.isArray(e)&&e.length>0&&e[0]instanceof Date}(t)?t.map((e=>e.getTime())):t?.map((e=>[e.min.getTime(),e.max.getTime()]))})).flat(2).filter(D.pC);A={startTimeField:null,endTimeField:null,trackIdField:void 0,timeExtent:[Math.min(...e),Math.max(...e)]}}return{copyright:p,description:c,dimensions:U,extent:I,fullExtents:E,featureInfoFormats:S,featureInfoUrl:F,mapUrl:y,maxWidth:d,maxHeight:m,maxScale:P,minScale:O,layers:N,spatialReferences:T,supportedImageFormatTypes:h,timeInfo:A,title:o,version:a}}function X(e){if(e.spatialReferences.length>0)return e.spatialReferences;if(e.sublayers)for(const t of e.sublayers){const e=X(t);if(e.length>0)return e}return[]}function z(e){let t=[];for(const r of e)t.push(r),r.sublayers?.length&&(t=t.concat(z(r.sublayers)),delete r.sublayers);return t}function Q(e,t,r){return t.getAttribute(e)??r}function K(e,t){for(let r=0;r<t.childNodes.length;r++){const n=t.childNodes[r];if(ae(n)&&n.nodeName===e)return n}return null}function ee(e,t){if(null==t)return[];const r=[];for(let n=0;n<t.childNodes.length;n++){const i=t.childNodes[n];ae(i)&&i.nodeName===e&&r.push(i)}return r}function te(e,t,r){return K(e,t)?.textContent??r}function re(e,t,r){if(!e)return null;const n=parseFloat(e.getAttribute("minx")),i=parseFloat(e.getAttribute("miny")),s=parseFloat(e.getAttribute("maxx")),l=parseFloat(e.getAttribute("maxy"));let a,o,u,p;r?(a=isNaN(i)?-Number.MAX_VALUE:i,o=isNaN(n)?-Number.MAX_VALUE:n,u=isNaN(l)?Number.MAX_VALUE:l,p=isNaN(s)?Number.MAX_VALUE:s):(a=isNaN(n)?-Number.MAX_VALUE:n,o=isNaN(i)?-Number.MAX_VALUE:i,u=isNaN(s)?Number.MAX_VALUE:s,p=isNaN(l)?Number.MAX_VALUE:l);const c=new C.Z({wkid:t});return new x.Z({xmin:a,ymin:o,xmax:u,ymax:p,spatialReference:c})}function ne(e,t){const r=K(t,e);if(r){const e=K("DCPType",r);if(e){const t=K("HTTP",e);if(t){const e=K("Get",t);if(e){let t=function(e,t,r,n){const i=K("OnlineResource",r);return i?Q("xlink:href",i,null):null}(0,0,e);if(t)return t.indexOf("&")===t.length-1&&(t=t.substring(0,t.length-1)),function(e,t){const r=[],n=(0,y.mN)(e);for(const e in n.query)n.query.hasOwnProperty(e)&&(t.includes(e.toLowerCase())||r.push(e+"="+n.query[e]));return n.path+(r.length?"?"+r.join("&"):"")}(t,["service","request"])}}}}return null}function ie(e,t){const r=ee("Operation",e);if(!r.length)return ee("Format",K(t,e)).map((({textContent:e})=>e)).filter(D.pC);const n=[];for(const e of r)if(e.getAttribute("name")===t){const t=ee("Format",e);for(const{textContent:e}of t)null!=e&&n.push(e)}return n}function se(e,t,r){const n=K(t,e);if(!n)return r;const{textContent:i}=n;if(null==i||""===i)return r;const s=Number(i);return isNaN(s)?r:s}function le(e,t,r){if(!e)return null;const n={id:r.idCounter++,fullExtents:[],parentLayerId:null,queryable:"1"===e.getAttribute("queryable"),spatialReferences:[],sublayers:null},i=K("LatLonBoundingBox",e),s=K("EX_GeographicBoundingBox",e);let l=null;i&&(l=re(i,4326)),s&&(l=new x.Z(0,0,0,0,new C.Z({wkid:4326})),l.xmin=parseFloat(te("westBoundLongitude",s,"0")),l.ymin=parseFloat(te("southBoundLatitude",s,"0")),l.xmax=parseFloat(te("eastBoundLongitude",s,"0")),l.ymax=parseFloat(te("northBoundLatitude",s,"0"))),i||s||(l=new x.Z(-180,-90,180,90,new C.Z({wkid:4326}))),n.minScale=se(e,"MaxScaleDenominator",0),n.maxScale=se(e,"MinScaleDenominator",0);const a=["1.0.0","1.1.0","1.1.1"].includes(t)?"SRS":"CRS";return Array.prototype.slice.call(e.childNodes).forEach((e=>{if("Name"===e.nodeName)n.name=e.textContent||"";else if("Title"===e.nodeName)n.title=e.textContent||"";else if("Abstract"===e.nodeName)n.description=e.textContent||"";else if("BoundingBox"===e.nodeName){const r=e.getAttribute(a);if(r&&0===r.indexOf("EPSG:")){const n=parseInt(r.substring(5),10);0===n||isNaN(n)||l||(l="1.3.0"===t?re(e,n,(0,L.A)(n)):re(e,n))}const i=r&&r.indexOf(":");if(i&&i>-1){let s=parseInt(r.substring(i+1,r.length),10);0===s||isNaN(s)||(s=Y[s]??s);const l="1.3.0"===t?re(e,s,(0,L.A)(s)):re(e,s);l&&n.fullExtents&&n.fullExtents.push(l)}}else if(e.nodeName===a)(e.textContent?.split(" ")??[]).forEach((e=>{const t=e.includes(":")?parseInt(e.split(":")[1],10):parseInt(e,10);if(0!==t&&!isNaN(t)){const e=Y[t]??t;n.spatialReferences.includes(e)||n.spatialReferences.push(e)}}));else if("Style"!==e.nodeName||n.legendUrl){if("Layer"===e.nodeName){const i=le(e,t,r);i&&(i.parentLayerId=n.id,n.sublayers||(n.sublayers=[]),n.sublayers.push(i))}}else{const t=K("LegendURL",e);if(t){const e=K("OnlineResource",t);e&&(n.legendUrl=e.getAttribute("xlink:href"))}}})),n.extent=l?.toJSON(),n.dimensions=ee("Dimension",e).filter((e=>e.getAttribute("name")&&e.getAttribute("units")&&e.textContent)).map((e=>{const t=e.getAttribute("name"),r=e.getAttribute("units"),n=e.textContent,i=e.getAttribute("unitSymbol")??void 0,s=e.getAttribute("default")??void 0,l="0"!==Q("default",e,"0"),a="0"!==Q("nearestValue",e,"0"),o="0"!==Q("current",e,"0");return oe({name:t,units:r})?{name:"time",units:"ISO8601",extent:ce(n),default:ce(s),multipleValues:l,nearestValue:a,current:o}:function(e){return/^elevation$/i.test(e.name)&&/^(epsg|crs):\d+$/i.test(e.units)}({name:t,units:r})?{name:"elevation",units:r,extent:ue(n),unitSymbol:i,default:ue(s),multipleValues:l,nearestValue:a}:{name:t,units:r,extent:pe(n),unitSymbol:i,default:pe(s),multipleValues:l,nearestValue:a}})),n}function ae(e){return e.nodeType===Node.ELEMENT_NODE}function oe(e){return/^time$/i.test(e.name)&&/^iso8601$/i.test(e.units)}function ue(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:parseFloat(t[0]),max:parseFloat(t[1]),resolution:t.length>=3&&"0"!==t[2]?parseFloat(t[2]):void 0}})).filter(D.pC):r.map((e=>parseFloat(e)))}function pe(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:t[0],max:t[1],resolution:t.length>=3&&"0"!==t[2]?t[2]:void 0}})).filter(D.pC):r}function ce(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:new Date(t[0]),max:new Date(t[1]),resolution:t.length>=3&&"0"!==t[2]?de(t[2]):void 0}})).filter(D.pC):r.map((e=>new Date(e)))}function de(e){const t=e.match(/(?:p(\d+y|\d+(?:.|,)\d+y)?(\d+m|\d+(?:.|,)\d+m)?(\d+d|\d+(?:.|,)\d+d)?)?(?:t(\d+h|\d+(?:.|,)\d+h)?(\d+m|\d+(?:.|,)\d+m)?(\d+s|\d+(?:.|,)\d+s)?)?/i);return t?{years:me(t[1]),months:me(t[2]),days:me(t[3]),hours:me(t[4]),minutes:me(t[5]),seconds:me(t[6])}:null}function me(e){if(!e)return 0;const t=e.match(/(?:\d+(?:.|,)\d+|\d+)/);if(!t)return 0;const r=t[0].replace(",",".");return Number(r)}function he(e){return e.toISOString().replace(/\.[0-9]{3}/,"")}const ye=new Set([102100,3857,102113,900913]),fe=new Set([3395,54004]),ge=new p.X({bmp:"image/bmp",gif:"image/gif",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml"},{ignoreUnknown:!1});function be(e){return"text/html"===e}function ve(e){return"text/plain"===e}let we=class extends((0,F.h)((0,U.n)((0,O.Q)((0,P.M)((0,S.q)((0,N.I)((0,d.R)(T.Z)))))))){constructor(...e){super(...e),this.allSublayers=new u.Z({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.customParameters=null,this.customLayerParameters=null,this.copyright=null,this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.featureInfoFormats=null,this.featureInfoUrl=null,this.fetchFeatureInfoFunction=null,this.imageFormat=null,this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.legendEnabled=!0,this.mapUrl=null,this.isReference=null,this.operationalLayerType="WMS",this.spatialReference=null,this.spatialReferences=null,this.sublayers=null,this.type="wms",this.version=null,this.addHandles([(0,h.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=e.layer=this}),h.Z_),(0,h.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),h.Z_),(0,h.YP)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=t.layer=this}),h.Z_)])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this.allSublayers.destroy()}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMS"]},e).catch(m.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}readFullExtentFromItemOrMap(e,t){const r=t.extent;return r?new x.Z({xmin:r[0][0],ymin:r[0][1],xmax:r[1][0],ymax:r[1][1]}):null}writeFullExtent(e,t){t.extent=[[e.xmin,e.ymin],[e.xmax,e.ymax]]}get featureInfoFormat(){return null==this.featureInfoFormats?null:this.featureInfoFormats.find(be)??this.featureInfoFormats.find(ve)??null}set featureInfoFormat(e){null==e?(this.revert("featureInfoFormat","service"),this._clearOverride("featureInfoFormat")):(be(e)||ve(e))&&this._override("featureInfoFormat",e)}readImageFormat(e,t){const r=t.supportedImageFormatTypes;return r&&r.includes("image/png")?"image/png":r&&r[0]}readSpatialReferenceFromItemOrDocument(e,t){return new C.Z(t.spatialReferences[0])}writeSpatialReferences(e,t){const r=this.spatialReference?.wkid;e&&r?(t.spatialReferences=e.filter((e=>e!==r)),t.spatialReferences.unshift(r)):t.spatialReferences=e}readSublayersFromItemOrMap(e,t,r){return _e(t.layers,r,t.visibleLayers)}readSublayers(e,t,r){return _e(t.layers,r)}writeSublayers(e,t,r,n){t.layers=[];const i=new Map,s=e.flatten((({sublayers:e})=>e??[]));for(const e of s)if("number"==typeof e.parent?.id){const t=i.get(e.parent.id);null!=t?t.push(e.id):i.set(e.parent.id,[e.id])}for(const e of s){const r={sublayer:e,...n},s=e.write({parentLayerId:"number"==typeof e.parent?.id?e.parent.id:-1},r);if(i.has(e.id)&&(s.sublayerIds=i.get(e.id)),!e.sublayers&&e.name){const n=e.write({},r);delete n.id,t.layers.push(n)}}t.visibleLayers=s.filter((({visible:e,sublayers:t})=>e&&!t)).map((({name:e})=>e)).toArray()}set url(e){if(!e)return void this._set("url",e);const{path:t,query:r}=(0,y.mN)(e);for(const e in r)/^(request|service)$/i.test(e)&&delete r[e];const n=(0,y.fl)(t,r??{});this._set("url",n)}createExportImageParameters(e,t,r,n){const i=n?.pixelRatio??1,s=(0,I.yZ)({extent:e,width:t})*i,l=new Z({layer:this,scale:s}),{xmin:a,ymin:o,xmax:u,ymax:p,spatialReference:c}=e,d=function(e,t){let r=e.wkid;return null==t?r:(null!=r&&t.includes(r)||!e.latestWkid||(r=e.latestWkid),null!=r&&ye.has(r)?t.find((e=>ye.has(e)))||t.find((e=>fe.has(e)))||102100:r)}(c,this.spatialReferences),m="1.3.0"===this.version&&(0,L.A)(d)?`${o},${a},${p},${u}`:`${a},${o},${u},${p}`,h=l.toJSON();return{bbox:m,["1.3.0"===this.version?"crs":"srs"]:null==d||isNaN(d)?void 0:"EPSG:"+d,...h}}async fetchImage(e,t,r,n){const i=this.mapUrl,s=this.createExportImageParameters(e,t,r,n);if(!s.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const l=n?.timeExtent?.start,o=n?.timeExtent?.end,u=null!=l&&null!=o?l.getTime()===o.getTime()?he(l):`${he(l)}/${he(o)}`:void 0,p={responseType:"image",query:this._mixCustomParameters({width:t,height:r,...s,time:u,...this.refreshParameters}),signal:n?.signal};return(0,a.default)(i??"",p).then((e=>e.data))}async fetchImageBitmap(e,t,r,n){const i=this.mapUrl??"",s=this.createExportImageParameters(e,t,r,n);if(!s.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const l=n?.timeExtent?.start,o=n?.timeExtent?.end,u=null!=l&&null!=o?l.getTime()===o.getTime()?he(l):`${he(l)}/${he(o)}`:void 0,p={responseType:"blob",query:this._mixCustomParameters({width:t,height:r,...s,time:u,...this.refreshParameters}),signal:n?.signal},{data:c}=await(0,a.default)(i,p);return(0,H.g)(c,i,n?.signal)}fetchFeatureInfo(e,t,r,n,i){const s=(0,I.yZ)({extent:e,width:t}),l=function(e){const t=e.filter((e=>e.popupEnabled&&e.name&&e.queryable));return t.length?t.map((({name:e})=>e)).join():null}(new Z({layer:this,scale:s}).visibleSublayers);if(null==this.featureInfoUrl||null==l)return Promise.resolve([]);if(null==this.fetchFeatureInfoFunction&&null==this.featureInfoFormat)return Promise.resolve([]);const a="1.3.0"===this.version?{I:n,J:i}:{x:n,y:i},o={query_layers:l,request:"GetFeatureInfo",info_format:this.featureInfoFormat,feature_count:25,width:t,height:r,...a},u={...this.createExportImageParameters(e,t,r),...o},p=this._mixCustomParameters(u);return null!=this.fetchFeatureInfoFunction?this.fetchFeatureInfoFunction(p):this._defaultFetchFeatureInfoFunction((0,y.fl)(this.featureInfoUrl,p))}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}findSublayerByName(e){return this.allSublayers.find((t=>t.name===e))}serviceSupportsSpatialReference(e){return(0,j.G)(this.url)||null!=this.spatialReferences&&this.spatialReferences.some((t=>{const r=900913===t?C.Z.WebMercator:new C.Z({wkid:t});return(0,E.fS)(r,e)}))}_defaultFetchFeatureInfoFunction(e){const t=document.createElement("iframe");t.src=(0,y.qg)(e),t.style.border="none",t.style.margin="0",t.style.width="100%",t.setAttribute("sandbox","");const r=new l.Z({title:this.title,content:t}),n=new s.Z({sourceLayer:this,popupTemplate:r});return Promise.resolve([n])}async _fetchService(e){if(!this.resourceInfo&&this.parsedUrl?.path){const{path:t,query:r}=this.parsedUrl,{data:n}=await(0,a.default)(t,{query:{SERVICE:"WMS",REQUEST:"GetCapabilities",...r,...this.customParameters},responseType:"xml",signal:e});this.resourceInfo=W(n)}if(this.parsedUrl){const e=new y.R9(this.parsedUrl.path),{httpsDomains:t}=i.default.request;"https"!==e.scheme||e.port&&"443"!==e.port||!e.host||t.includes(e.host)||t.push(e.host)}this.read(this.resourceInfo,{origin:"service"})}_mixCustomParameters(e){if(!this.customLayerParameters&&!this.customParameters)return e;const t={...this.customParameters,...this.customLayerParameters};for(const r in t)e[r.toLowerCase()]=t[r];return e}};function _e(e,t,r){e=e??[];const n=new Map;e.every((e=>null==e.id))&&(e=(0,c.d9)(e)).forEach(((e,t)=>e.id=t));for(const i of e){const e=new G;e.read(i,t),r&&!r.includes(e.name)&&(e.visible=!1),n.set(e.id,e)}const i=[];for(const t of e){const e=null!=t.id?n.get(t.id):null;if(e)if(null!=t.parentLayerId&&t.parentLayerId>=0){const r=n.get(t.parentLayerId);if(!r)continue;r.sublayers||(r.sublayers=new o.Z),r.sublayers.push(e)}else i.push(e)}return i}(0,n._)([(0,f.Cb)({readOnly:!0})],we.prototype,"allSublayers",void 0),(0,n._)([(0,f.Cb)({json:{type:Object,write:!0}})],we.prototype,"customParameters",void 0),(0,n._)([(0,f.Cb)({json:{type:Object,write:!0}})],we.prototype,"customLayerParameters",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:!0}})],we.prototype,"copyright",void 0),(0,n._)([(0,f.Cb)()],we.prototype,"description",void 0),(0,n._)([(0,f.Cb)({readOnly:!0})],we.prototype,"dimensions",void 0),(0,n._)([(0,f.Cb)({json:{type:[[Number]],read:{source:"extent"},write:{target:"extent"},origins:{"web-document":{write:{ignoreOrigin:!0}},"portal-item":{write:{ignoreOrigin:!0}}}}})],we.prototype,"fullExtent",void 0),(0,n._)([(0,b.r)(["web-document","portal-item"],"fullExtent",["extent"])],we.prototype,"readFullExtentFromItemOrMap",null),(0,n._)([(0,w.c)(["web-document","portal-item"],"fullExtent",{extent:{type:[[Number]]}})],we.prototype,"writeFullExtent",null),(0,n._)([(0,f.Cb)()],we.prototype,"fullExtents",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],we.prototype,"featureInfoFormat",null),(0,n._)([(0,f.Cb)({type:[String],readOnly:!0})],we.prototype,"featureInfoFormats",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],we.prototype,"featureInfoUrl",void 0),(0,n._)([(0,f.Cb)()],we.prototype,"fetchFeatureInfoFunction",void 0),(0,n._)([(0,f.Cb)({type:String,json:{origins:{"web-document":{default:"image/png",type:ge.jsonValues,read:{reader:ge.read,source:"format"},write:{writer:ge.write,target:"format"}}}}})],we.prototype,"imageFormat",void 0),(0,n._)([(0,b.r)("imageFormat",["supportedImageFormatTypes"])],we.prototype,"readImageFormat",null),(0,n._)([(0,f.Cb)({type:Number,json:{read:{source:"maxHeight"},write:{target:"maxHeight"}}})],we.prototype,"imageMaxHeight",void 0),(0,n._)([(0,f.Cb)({type:Number,json:{read:{source:"maxWidth"},write:{target:"maxWidth"}}})],we.prototype,"imageMaxWidth",void 0),(0,n._)([(0,f.Cb)()],we.prototype,"imageTransparency",void 0),(0,n._)([(0,f.Cb)(A.rn)],we.prototype,"legendEnabled",void 0),(0,n._)([(0,f.Cb)({type:["show","hide","hide-children"]})],we.prototype,"listMode",void 0),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],we.prototype,"mapUrl",void 0),(0,n._)([(0,f.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],we.prototype,"isReference",void 0),(0,n._)([(0,f.Cb)({type:["WMS"]})],we.prototype,"operationalLayerType",void 0),(0,n._)([(0,f.Cb)()],we.prototype,"resourceInfo",void 0),(0,n._)([(0,f.Cb)({type:C.Z,json:{origins:{service:{read:{source:"extent.spatialReference"}}},write:!1}})],we.prototype,"spatialReference",void 0),(0,n._)([(0,b.r)(["web-document","portal-item"],"spatialReference",["spatialReferences"])],we.prototype,"readSpatialReferenceFromItemOrDocument",null),(0,n._)([(0,f.Cb)({type:[g.z8],json:{read:!1,origins:{service:{read:!0},"web-document":{read:!1,write:{ignoreOrigin:!0}},"portal-item":{read:!1,write:{ignoreOrigin:!0}}}}})],we.prototype,"spatialReferences",void 0),(0,n._)([(0,w.c)(["web-document","portal-item"],"spatialReferences")],we.prototype,"writeSpatialReferences",null),(0,n._)([(0,f.Cb)({type:o.Z.ofType(G),json:{write:{target:"layers",overridePolicy(e,t,r){if(function(e,t){return e.some((e=>{for(const r in e)if((0,_.d)(e,r,null,t))return!0;return!1}))}(this.allSublayers,r))return{ignoreOrigin:!0}}}}})],we.prototype,"sublayers",void 0),(0,n._)([(0,b.r)(["web-document","portal-item"],"sublayers",["layers","visibleLayers"])],we.prototype,"readSublayersFromItemOrMap",null),(0,n._)([(0,b.r)("service","sublayers",["layers"])],we.prototype,"readSublayers",null),(0,n._)([(0,w.c)("sublayers",{layers:{type:[G]},visibleLayers:{type:[String]}})],we.prototype,"writeSublayers",null),(0,n._)([(0,f.Cb)({json:{read:!1},readOnly:!0,value:"wms"})],we.prototype,"type",void 0),(0,n._)([(0,f.Cb)(A.HQ)],we.prototype,"url",null),(0,n._)([(0,f.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],we.prototype,"version",void 0),we=(0,n._)([(0,v.j)("esri.layers.WMSLayer")],we);const xe=we},16859:(e,t,r)=>{r.d(t,{I:()=>_});var n=r(43697),i=r(68773),s=r(40330),l=r(3172),a=r(66643),o=r(20102),u=r(92604),p=r(95330),c=r(17452),d=r(5600),m=(r(75215),r(67676),r(80442),r(71715)),h=r(52011),y=r(30556),f=r(84230),g=r(48522),b=r(15235),v=r(86082),w=r(14661);const _=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=null,this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new b.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:n}=await r.e(8062).then(r.bind(r,18062));return(0,p.k_)(t),await n({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,p.D_)(e)||u.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,p.r9)(e),!0))))}async setUserPrivileges(e,t){if(!i.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:n},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",n),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,p.r9)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const n=e===r.id;if(n&&r.portal.user)return(0,w.Ss)(r);let i,l;if(n)i=r.portal.url;else try{i=await(0,f.oP)(this.url,t)}catch(e){(0,p.r9)(e)}if(!i||!(0,c.Zo)(i,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;l=await(s.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.r9)(e)}if(!l)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(n?await r.reload():(r=new b.default({id:e,portal:{url:i}}),await r.load(t)),r.portal.user)return(0,w.Ss)(r)}catch(e){(0,p.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=x.credential===t?x.user:await this._fetchEditingUser(e);return x.credential=t,x.user=r,null==r||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const n=`${r.owningSystemUrl}/sharing/rest`,i=g.Z.getDefault();if(i&&i.loaded&&(0,c.Fv)(i.restUrl)===(0,c.Fv)(n))return i.user;const o=`${n}/community/self`,u=null!=e?e.signal:null,p=await(0,a.q6)((0,l.default)(o,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?v.Z.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,n=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||g.Z.getDefault());return r&&n&&!(0,c.tm)(n.restUrl,r.restUrl)?(t.messages&&t.messages.push(new o.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,n._)([(0,d.Cb)({type:b.default})],t.prototype,"portalItem",null),(0,n._)([(0,m.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,n._)([(0,y.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,n._)([(0,d.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,n._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,n._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,n._)([(0,d.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,n._)([(0,h.j)("esri.layers.mixins.PortalLayer")],t),t},x={credential:null,user:null}},34760:(e,t,r)=>{r.d(t,{Q:()=>g});var n=r(43697),i=r(92604),s=r(95330),l=r(5600),a=(r(75215),r(67676),r(80442),r(52011)),o=r(46791),u=(r(66643),r(20102),r(26258),r(87538));const p=new o.Z,c=new WeakMap;function d(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e}function m(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:m(t,e%t):0}let h=0,y=0;function f(){const e=Date.now();for(const t of p)t.refreshInterval&&e-(c.get(t)??0)+5>=6e4*t.refreshInterval&&(c.set(t,e),t.refresh(e))}(0,u.EH)((()=>{const e=Date.now();let t=0;for(const r of p)t=m(Math.round(6e4*r.refreshInterval),t),r.refreshInterval?c.get(r)||c.set(r,e):c.delete(r);if(t!==y){if(y=t,clearInterval(h),0===y)return void(h=0);h=setInterval(f,y)}}));const g=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,s.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||function(e){d(e)&&p.push(e)}(this)}),(()=>{}))}destroy(){var e;d(e=this)&&p.includes(e)&&p.remove(e)}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,s.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{i.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}};return(0,n._)([(0,l.Cb)({type:Number,cast:e=>e>=.1?e:e<=0?0:.1,json:{write:!0}})],t.prototype,"refreshInterval",void 0),(0,n._)([(0,l.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,n._)([(0,l.Cb)()],t.prototype,"refreshParameters",null),t=(0,n._)([(0,a.j)("esri.layers.mixins.RefreshableLayer")],t),t}},28294:(e,t,r)=>{r.d(t,{n:()=>d});var n=r(43697),i=r(92835),s=r(84552),l=r(5600),a=(r(75215),r(67676),r(80442),r(71715)),o=r(52011),u=r(35671),p=r(76259),c=r(78981);const d=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const n=r.timeOffset,i=c.v.fromJSON(r.timeOffsetUnits);return n&&i?new s.Z({value:n,unit:i}):null}set timeInfo(e){(0,u.UF)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,n._)([(0,l.Cb)({type:i.Z,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,n._)([(0,l.Cb)({type:s.Z})],t.prototype,"timeOffset",void 0),(0,n._)([(0,a.r)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,n._)([(0,l.Cb)({value:null,type:p.Z,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,n._)([(0,l.Cb)({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=(0,n._)([(0,o.j)("esri.layers.mixins.TemporalLayer")],t),t}},52162:(e,t,r)=>{r.d(t,{A:()=>i});const n=[[3819,3819],[3821,3824],[3889,3889],[3906,3906],[4001,4025],[4027,4036],[4039,4047],[4052,4055],[4074,4075],[4080,4081],[4120,4176],[4178,4185],[4188,4216],[4218,4289],[4291,4304],[4306,4319],[4322,4326],[4463,4463],[4470,4470],[4475,4475],[4483,4483],[4490,4490],[4555,4558],[4600,4646],[4657,4765],[4801,4811],[4813,4821],[4823,4824],[4901,4904],[5013,5013],[5132,5132],[5228,5229],[5233,5233],[5246,5246],[5252,5252],[5264,5264],[5324,5340],[5354,5354],[5360,5360],[5365,5365],[5370,5373],[5381,5381],[5393,5393],[5451,5451],[5464,5464],[5467,5467],[5489,5489],[5524,5524],[5527,5527],[5546,5546],[2044,2045],[2081,2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3038,3051],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3150,3151],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3389,3390],[3416,3417],[3833,3841],[3844,3850],[3854,3854],[3873,3885],[3907,3910],[4026,4026],[4037,4038],[4417,4417],[4434,4434],[4491,4554],[4839,4839],[5048,5048],[5105,5130],[5253,5259],[5269,5275],[5343,5349],[5479,5482],[5518,5519],[5520,5520],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]];function i(e){return null!=e&&n.some((([t,r])=>e>=t&&e<=r))}},76259:(e,t,r)=>{r.d(t,{Z:()=>y});var n=r(43697),i=r(92835),s=r(84552),l=r(2368),a=r(96674),o=r(5600),u=(r(75215),r(67676),r(80442),r(71715)),p=r(52011),c=r(30556),d=r(80216);function m(e,t){return s.Z.fromJSON({value:e,unit:t})}let h=class extends((0,l.J)(a.wq)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeReference=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const r=new Date(t.timeExtent[0]),n=new Date(t.timeExtent[1]);return new i.Z({start:r,end:n})}writeFullTimeExtent(e,t){e&&null!=e.start&&null!=e.end?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?m(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?m(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,n._)([(0,o.Cb)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],h.prototype,"cumulative",void 0),(0,n._)([(0,o.Cb)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"endField",void 0),(0,n._)([(0,o.Cb)({type:i.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"fullTimeExtent",void 0),(0,n._)([(0,u.r)("fullTimeExtent",["timeExtent"])],h.prototype,"readFullTimeExtent",null),(0,n._)([(0,c.c)("fullTimeExtent")],h.prototype,"writeFullTimeExtent",null),(0,n._)([(0,o.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"hasLiveData",void 0),(0,n._)([(0,o.Cb)({type:s.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"interval",void 0),(0,n._)([(0,u.r)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],h.prototype,"readInterval",null),(0,n._)([(0,c.c)("interval")],h.prototype,"writeInterval",null),(0,n._)([(0,o.Cb)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"startField",void 0),(0,n._)([(0,o.Cb)({type:d.Z,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"timeReference",void 0),(0,n._)([(0,o.Cb)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"trackIdField",void 0),(0,n._)([(0,o.Cb)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],h.prototype,"useTime",void 0),h=(0,n._)([(0,p.j)("esri.layers.support.TimeInfo")],h);const y=h},90082:(e,t,r)=>{r.d(t,{V:()=>l,g:()=>s});var n=r(20102),i=r(95330);async function s(e,t,r){let s;try{s=await createImageBitmap(e)}catch(e){throw new n.Z("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,i.k_)(r),s}async function l(e,t,r,s,l){let a;try{a=await createImageBitmap(e)}catch(e){throw new n.Z("request:server",`Unable to load tile ${t}/${r}/${s}`,{error:e,level:t,row:r,col:s})}return(0,i.k_)(l),a}},78981:(e,t,r)=>{r.d(t,{v:()=>n});const n=(0,r(35454).w)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})}}]);
@@ -192,6 +192,9 @@
192
192
 
193
193
  &__collapse-toggle {
194
194
  flex-shrink: 0;
195
+ // Make sure the element has a size, to avoid popping due to Calcite Components loading async
196
+ width: 32px;
197
+ height: 32px;
195
198
  }
196
199
 
197
200
  &__label {