@arcgis/core 4.28.0-next.20230921 → 4.28.0-next.20230922

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 (313) hide show
  1. package/Graphic.js +1 -1
  2. package/arcade/ArcadeDate.js +1 -1
  3. package/arcade/Feature.js +1 -1
  4. package/arcade/featureSetUtils.js +1 -1
  5. package/arcade/featureset/actions/Adapted.js +1 -1
  6. package/arcade/featureset/actions/GroupBy.js +1 -1
  7. package/arcade/featureset/support/FeatureSet.js +1 -1
  8. package/arcade/featureset/support/FeatureSetIterator.js +1 -1
  9. package/arcade/featureset/support/StatsField.js +1 -1
  10. package/arcade/featureset/support/sqlUtils.js +1 -1
  11. package/arcade/functions/date.js +1 -1
  12. package/arcade/functions/featuresetbase.js +1 -1
  13. package/arcade/functions/featuresetstats.js +1 -1
  14. package/arcade.js +1 -1
  15. package/assets/esri/core/workers/RemoteClient.js +1 -1
  16. package/assets/esri/core/workers/chunks/{2cb36f9686693234991a.js → 07a2dab2f645dcd7d8d6.js} +1 -1
  17. package/assets/esri/core/workers/chunks/07f6175b52366b2c28bd.js +1 -0
  18. package/assets/esri/core/workers/chunks/098073c3b2849f56dad8.js +1 -0
  19. package/assets/esri/core/workers/chunks/{580039dd491854ca325c.js → 21fc02f0d5716c4a7acd.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{072b4e041b8630c513a0.js → 243b1f9b2fba02946481.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{dff1c3c38dda2bd1a9d6.js → 246a954347fe9318190e.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{314c307e30f308a40a28.js → 25b09e9c0511c8e1cf8a.js} +1 -1
  23. package/assets/esri/core/workers/chunks/28a5ef2e2daa4207dd8b.js +1 -0
  24. package/assets/esri/core/workers/chunks/2b017e1aa1be71974c2e.js +1 -0
  25. package/assets/esri/core/workers/chunks/425b5733bb88e6efe242.js +1 -0
  26. package/assets/esri/core/workers/chunks/{c9dfb145f0c1d93e0fbd.js → 4bcca5fffb1fcc2d4353.js} +1 -1
  27. package/assets/esri/core/workers/chunks/4bf1a7e82a68ccee0ee1.js +1 -0
  28. package/assets/esri/core/workers/chunks/4c110c7f4f940ec58010.js +1 -0
  29. package/assets/esri/core/workers/chunks/{bde89b2684b6185992ef.js → 4ed77097e69fa3096ce4.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{1cbaba30f55f00f7498b.js → 51324d042f469f3b8914.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{3f4e9b1663ec521bfe00.js → 542ce10e1872399790b4.js} +1 -1
  32. package/assets/esri/core/workers/chunks/54d2b7e2ac4ba883bee8.js +1 -0
  33. package/assets/esri/core/workers/chunks/54ecb6cae310818d1aa2.js +1 -0
  34. package/assets/esri/core/workers/chunks/57c932e289d89d97da4b.js +1 -0
  35. package/assets/esri/core/workers/chunks/{6403de6fc067cf8f7436.js → 592c1fb531f2be928e8a.js} +1 -1
  36. package/assets/esri/core/workers/chunks/609a475ab395f2ce63e2.js +1 -0
  37. package/assets/esri/core/workers/chunks/{332689bf60d246485993.js → 65186e168dd112ac6221.js} +1 -1
  38. package/assets/esri/core/workers/chunks/6b9248fb2d6aadbce7bb.js +1 -0
  39. package/assets/esri/core/workers/chunks/709465832d306e02df52.js +1 -0
  40. package/assets/esri/core/workers/chunks/{bbc0dcd316c5598bc9ad.js → 74368a5213def6c200a2.js} +1 -1
  41. package/assets/esri/core/workers/chunks/78e7af899d9d50aa7e74.js +1 -0
  42. package/assets/esri/core/workers/chunks/7fe641cf1467496e670a.js +1 -0
  43. package/assets/esri/core/workers/chunks/{df8f62beb36fb9d2ac81.js → 810c8d6ff19976fd1366.js} +1 -1
  44. package/assets/esri/core/workers/chunks/83a15aa4b1c5252c651b.js +1 -0
  45. package/assets/esri/core/workers/chunks/85e436decdd693f240ee.js +1 -0
  46. package/assets/esri/core/workers/chunks/{243a4eed107d363dfad8.js → 887652bbdb3b71d0a089.js} +1 -1
  47. package/assets/esri/core/workers/chunks/896bfda379cf620b63ec.js +1 -0
  48. package/assets/esri/core/workers/chunks/{1f7e041140088f8ac489.js → 97073a60f0ea2a397165.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{101f776316a85b708927.js → a99070ec4c06c435b744.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{21a9c8aa2a9e9990df41.js → b499b4fa771e8c422b43.js} +1 -1
  51. package/assets/esri/core/workers/chunks/bffad8aec92f982cc75a.js +1 -0
  52. package/assets/esri/core/workers/chunks/d414dba3179bcf75bc6b.js +1 -0
  53. package/assets/esri/core/workers/chunks/{b449d6bd5851187d419f.js → d6e5408f9fa6b4bcd118.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{3ca759f72d3bb29e9ea9.js → e14da83329f7771135bc.js} +2 -2
  55. package/assets/esri/core/workers/chunks/{f508ccfde6425dabe9ac.js → ee0bf611d191103a7046.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{ed1fbc1bc8d50453e2f5.js → f793cd41fcd022baeea2.js} +1 -1
  57. package/assets/esri/core/workers/chunks/fb87fd64411b78afea23.js +1 -0
  58. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +2 -0
  59. package/assets/esri/themes/dark/main.css +1 -1
  60. package/assets/esri/themes/light/main.css +1 -1
  61. package/assets/esri/themes/light/view.css +1 -1
  62. package/config.js +1 -1
  63. package/core/Accessor.js +1 -1
  64. package/core/has.js +1 -1
  65. package/core/sql/DateOnly.js +1 -1
  66. package/core/sql/WhereClause.js +1 -1
  67. package/core/sql.js +1 -1
  68. package/identity/IdentityForm.js +1 -1
  69. package/identity/IdentityModal.js +1 -1
  70. package/interfaces.d.ts +28 -199
  71. package/layers/OrientedImageryLayer.js +1 -1
  72. package/layers/graphics/applyEditsUtils.js +5 -0
  73. package/layers/graphics/editingSupport.js +1 -1
  74. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  75. package/layers/mixins/EditBusLayer.js +1 -1
  76. package/layers/orientedImagery/core/CameraOrientationLTP.js +1 -1
  77. package/layers/orientedImagery/core/ElevationSourceDefinitions.js +5 -0
  78. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  79. package/layers/orientedImagery/core/cameraOrientationFactory.js +1 -1
  80. package/layers/orientedImagery/core/utils.js +5 -0
  81. package/layers/orientedImagery/transformations/groundToImageUtils.js +1 -1
  82. package/layers/support/fieldProperties.js +1 -1
  83. package/networks/Network.js +1 -1
  84. package/package.json +1 -1
  85. package/rest/featureService/FeatureService.js +1 -1
  86. package/support/arcadeUtils.js +1 -1
  87. package/support/revision.js +1 -1
  88. package/symbols/support/svgUtils.js +1 -1
  89. package/versionManagement/VersionManagementService.js +1 -1
  90. package/versionManagement/support/EditMomentStack.js +5 -0
  91. package/versionManagement/support/versionManagementUtils.js +1 -1
  92. package/views/2d/engine/Container.js +1 -1
  93. package/views/2d/engine/DisplayObject.js +1 -1
  94. package/views/2d/engine/ManagedCanvas.js +5 -0
  95. package/views/2d/engine/Stage.js +1 -1
  96. package/views/2d/engine/webgl/GroupContainer.js +1 -1
  97. package/views/2d/engine/webgl/Painter.js +1 -1
  98. package/views/2d/engine/webgl/WGLContainer.js +1 -1
  99. package/views/2d/engine/webgl/WorldExtentClipRenderer.js +1 -1
  100. package/views/2d/engine/webgl/effects/FeatureEffect.js +1 -1
  101. package/views/2d/engine/webgl/effects/HighlightEffect.js +1 -1
  102. package/views/2d/engine/webgl/effects/HittestEffectVTL.js +1 -1
  103. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  104. package/views/2d/layers/MediaLayerView2D.js +1 -1
  105. package/views/2d/layers/TileLayerView2D.js +1 -1
  106. package/views/2d/layers/features/tileRenderers/support/WGLFeatureView.js +1 -1
  107. package/views/2d/layers/graphics/BaseGraphicContainer.js +1 -1
  108. package/views/2d/layers/graphics/GraphicContainer.js +1 -1
  109. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  110. package/views/2d/layers/graphics/HighlightGraphicContainer.js +1 -1
  111. package/views/2d/layers/support/DisplayGL.js +1 -1
  112. package/views/2d/webglDeps.js +1 -1
  113. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  114. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  115. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  116. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  117. package/views/3d/layers/SceneLayerView3D.js +1 -1
  118. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  119. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  120. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  121. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  122. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  123. package/views/3d/layers/graphics/Labeler.js +1 -1
  124. package/views/3d/layers/graphics/graphicUtils.js +1 -1
  125. package/views/3d/layers/i3s/featureEditing.js +1 -1
  126. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  127. package/views/3d/support/buffer/glUtil.js +1 -1
  128. package/views/3d/support/engineContent/line.js +1 -1
  129. package/views/3d/support/viewpointUtils.js +1 -1
  130. package/views/3d/webgl-engine/Stage.js +1 -1
  131. package/views/3d/webgl-engine/effects/RenderPluginInput.js +1 -1
  132. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  133. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  134. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  135. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  136. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  137. package/views/3d/webgl-engine/lib/ModelDirtySet.js +1 -1
  138. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  139. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  140. package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
  141. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  142. package/views/3d/webgl-engine/lib/TextTextureFactory.js +1 -1
  143. package/views/3d/webgl-engine/lib/VertexAttribute.js +1 -1
  144. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  145. package/views/3d/webgl-engine/lib/edgeRendering/bufferLayouts.js +1 -1
  146. package/views/3d/webgl-engine/lib/edgeRendering/edgeProcessing.js +1 -1
  147. package/views/View.js +1 -1
  148. package/views/interactive/tooltip/TooltipContentWithHelpMessage.js +1 -1
  149. package/views/interactive/tooltip/TooltipEditableField.js +1 -1
  150. package/views/interactive/tooltip/constraintUtils.js +1 -1
  151. package/views/interactive/tooltip/content/Fields.js +1 -1
  152. package/views/interactive/tooltip/content/TooltipContentDrawCircle.js +1 -1
  153. package/views/interactive/tooltip/content/TooltipContentDrawMesh.js +1 -1
  154. package/views/interactive/tooltip/content/TooltipContentDrawPoint.js +1 -1
  155. package/views/interactive/tooltip/content/TooltipContentDrawPolygon.js +1 -1
  156. package/views/interactive/tooltip/content/TooltipContentDrawPolyline.js +1 -1
  157. package/views/interactive/tooltip/content/TooltipContentDrawRectangle.js +1 -1
  158. package/views/interactive/tooltip/content/TooltipContentExtentRotate.js +1 -1
  159. package/views/interactive/tooltip/content/TooltipContentExtentScale.js +1 -1
  160. package/views/interactive/tooltip/content/TooltipContentReshapeEdgeOffset.js +1 -1
  161. package/views/interactive/tooltip/content/TooltipContentTransformAbsolute.js +1 -1
  162. package/views/interactive/tooltip/content/TooltipContentTransformRotate.js +1 -1
  163. package/views/interactive/tooltip/content/TooltipContentTransformScale.js +1 -1
  164. package/views/interactive/tooltip/content/TooltipContentTranslateGraphic.js +1 -1
  165. package/views/interactive/tooltip/content/TooltipContentTranslateGraphicXY.js +1 -1
  166. package/views/interactive/tooltip/content/TooltipContentTranslateGraphicZ.js +1 -1
  167. package/views/interactive/tooltip/content/TooltipContentTranslateVertex.js +1 -1
  168. package/views/interactive/tooltip/content/TooltipContentTranslateVertexXY.js +1 -1
  169. package/views/interactive/tooltip/content/TooltipContentTranslateVertexZ.js +1 -1
  170. package/views/support/angularMeasurementUtils.js +1 -1
  171. package/views/webgl/Texture.js +1 -1
  172. package/views/webgl/contextUtils.js +1 -1
  173. package/widgets/AreaMeasurement2D.js +1 -1
  174. package/widgets/AreaMeasurement3D.js +1 -1
  175. package/widgets/Attachments.js +1 -1
  176. package/widgets/Attribution.js +1 -1
  177. package/widgets/BasemapGallery.js +1 -1
  178. package/widgets/BasemapLayerList.js +1 -1
  179. package/widgets/BasemapToggle.js +1 -1
  180. package/widgets/Bookmarks.js +1 -1
  181. package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesNode.js +1 -1
  182. package/widgets/BuildingExplorer/BuildingDisciplinesTree/BuildingDisciplinesTree.js +1 -1
  183. package/widgets/BuildingExplorer/BuildingLevelPicker/BuildingLevelPicker.js +1 -1
  184. package/widgets/BuildingExplorer/BuildingLevelPicker/Label.js +1 -1
  185. package/widgets/BuildingExplorer/BuildingLevelPicker/LevelItem.js +1 -1
  186. package/widgets/BuildingExplorer/BuildingPhasePicker/BuildingPhasePicker.js +1 -1
  187. package/widgets/BuildingExplorer.js +1 -1
  188. package/widgets/Compass.js +1 -1
  189. package/widgets/CoordinateConversion.js +1 -1
  190. package/widgets/Daylight/support/SliderWithDropdown.js +1 -1
  191. package/widgets/Daylight.js +1 -1
  192. package/widgets/DirectLineMeasurement3D.js +1 -1
  193. package/widgets/DirectionalPad.js +1 -1
  194. package/widgets/Directions/components/SaveLayer.js +1 -1
  195. package/widgets/Directions.js +1 -1
  196. package/widgets/DistanceMeasurement2D.js +1 -1
  197. package/widgets/Editor/components/FooterActions.js +1 -1
  198. package/widgets/Editor/components/Notices.js +1 -1
  199. package/widgets/Editor/components/PanelContent.js +1 -1
  200. package/widgets/Editor/components/PanelToolbar.js +1 -1
  201. package/widgets/Editor/components/Prompt.js +1 -1
  202. package/widgets/Editor/components/Settings.js +1 -1
  203. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  204. package/widgets/Editor/components/UploadDetails.js +1 -1
  205. package/widgets/Editor.js +1 -1
  206. package/widgets/ElevationProfile/components/LegendItem.js +1 -1
  207. package/widgets/ElevationProfile/components/SettingsButton.js +1 -1
  208. package/widgets/ElevationProfile/components/Statistics.js +1 -1
  209. package/widgets/ElevationProfile.js +1 -1
  210. package/widgets/Expand.js +1 -1
  211. package/widgets/Feature/FeatureContent.js +1 -1
  212. package/widgets/Feature/FeatureExpression.js +1 -1
  213. package/widgets/Feature/FeatureFields.js +1 -1
  214. package/widgets/Feature/FeatureMedia.js +1 -1
  215. package/widgets/Feature/FeatureRelationship.js +1 -1
  216. package/widgets/Feature/support/FeatureContentMixin.js +1 -1
  217. package/widgets/Feature/support/FeatureElementInfo.js +1 -1
  218. package/widgets/Feature.js +1 -1
  219. package/widgets/FeatureForm.js +1 -1
  220. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  221. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  222. package/widgets/FeatureTable/Grid/support/ButtonMenu.js +1 -1
  223. package/widgets/FeatureTable.js +1 -1
  224. package/widgets/FeatureTemplates/ItemList.js +1 -1
  225. package/widgets/FeatureTemplates.js +1 -1
  226. package/widgets/Features/FeaturesRelatedRecords.js +1 -1
  227. package/widgets/Features.js +1 -1
  228. package/widgets/FloorFilter.js +1 -1
  229. package/widgets/Fullscreen.js +1 -1
  230. package/widgets/Histogram.js +1 -1
  231. package/widgets/HistogramRangeSlider.js +1 -1
  232. package/widgets/Home.js +1 -1
  233. package/widgets/LayerList/ListItemPanel.js +1 -1
  234. package/widgets/LayerList.js +1 -1
  235. package/widgets/Legend/styles/Card.js +1 -1
  236. package/widgets/Legend/styles/Classic.js +1 -1
  237. package/widgets/Legend/styles/support/relationshipUtils.js +1 -1
  238. package/widgets/Legend/styles/support/univariateUtils.js +1 -1
  239. package/widgets/LineOfSight.js +1 -1
  240. package/widgets/Locate.js +1 -1
  241. package/widgets/NavigationToggle.js +1 -1
  242. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  243. package/widgets/OrientedImageryViewer.js +1 -1
  244. package/widgets/Popup.js +1 -1
  245. package/widgets/Print.js +1 -1
  246. package/widgets/ScaleRangeSlider.js +1 -1
  247. package/widgets/Search/SearchResultRenderer.js +1 -1
  248. package/widgets/Search.js +1 -1
  249. package/widgets/ShadowCast/components/DiscreteConfigurator.js +1 -1
  250. package/widgets/ShadowCast/components/DurationConfigurator.js +1 -1
  251. package/widgets/ShadowCast/components/ShadowTooltipContent.js +1 -1
  252. package/widgets/ShadowCast/components/ThresholdConfigurator.js +1 -1
  253. package/widgets/ShadowCast.js +1 -1
  254. package/widgets/Sketch.js +1 -1
  255. package/widgets/Slice.js +1 -1
  256. package/widgets/Slider.js +1 -1
  257. package/widgets/Swipe.js +1 -1
  258. package/widgets/TableList.js +1 -1
  259. package/widgets/TimeSlider.js +1 -1
  260. package/widgets/Track.js +1 -1
  261. package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsLineSymbolPicker.js +1 -1
  262. package/widgets/UtilityNetworkAssociations.js +1 -1
  263. package/widgets/UtilityNetworkTrace.js +1 -1
  264. package/widgets/UtilityNetworkValidateTopology.js +1 -1
  265. package/widgets/ValuePicker.js +1 -1
  266. package/widgets/VideoPlayer/components/PlayerControlsGroup.js +1 -1
  267. package/widgets/VideoPlayer/components/SettingsButton.js +1 -1
  268. package/widgets/VideoPlayer.js +1 -1
  269. package/widgets/Weather/LabeledSlider.js +1 -1
  270. package/widgets/Weather.js +1 -1
  271. package/widgets/Zoom/IconButton.js +1 -1
  272. package/widgets/smartMapping/BinaryColorSizeSlider.js +1 -1
  273. package/widgets/smartMapping/ClassedColorSlider.js +1 -1
  274. package/widgets/smartMapping/ClassedSizeSlider.js +1 -1
  275. package/widgets/smartMapping/ColorSizeSlider.js +1 -1
  276. package/widgets/smartMapping/ColorSlider.js +1 -1
  277. package/widgets/smartMapping/HeatmapSlider.js +1 -1
  278. package/widgets/smartMapping/OpacitySlider.js +1 -1
  279. package/widgets/smartMapping/SizeSlider.js +1 -1
  280. package/widgets/smartMapping/SmartMappingSliderBase.js +1 -1
  281. package/widgets/support/ColorPicker.js +1 -1
  282. package/widgets/support/DatePicker.js +1 -1
  283. package/widgets/support/Heading.js +1 -1
  284. package/widgets/support/LabeledSwitch.js +1 -1
  285. package/widgets/support/MeasurementWidgetContent.js +1 -1
  286. package/widgets/support/Popover.js +1 -1
  287. package/widgets/support/SelectionToolbar.js +1 -1
  288. package/widgets/support/SketchTooltipControls.js +1 -1
  289. package/widgets/support/SnappingControls.js +1 -1
  290. package/widgets/support/TimePicker.js +1 -1
  291. package/widgets/support/TimezonePicker.js +1 -1
  292. package/widgets/support/UnitSelect.js +1 -1
  293. package/assets/esri/core/workers/chunks/092920c25cac89c038ee.js +0 -1
  294. package/assets/esri/core/workers/chunks/1b3655f5bf5d90fa8730.js +0 -1
  295. package/assets/esri/core/workers/chunks/1cf7bb514e7eefc3e9c6.js +0 -1
  296. package/assets/esri/core/workers/chunks/24629402c647ef6b5f6b.js +0 -1
  297. package/assets/esri/core/workers/chunks/2d0d03cbea83c868edba.js +0 -1
  298. package/assets/esri/core/workers/chunks/2e130cb2f1038055c07b.js +0 -1
  299. package/assets/esri/core/workers/chunks/4369a6c1e0a82ab4db6a.js +0 -1
  300. package/assets/esri/core/workers/chunks/4f4a424d1747d04501df.js +0 -1
  301. package/assets/esri/core/workers/chunks/59c00d6fba0fd1c03d01.js +0 -1
  302. package/assets/esri/core/workers/chunks/650a317b6dc245a7060f.js +0 -1
  303. package/assets/esri/core/workers/chunks/7a358b1fd0c0cce59e9b.js +0 -1
  304. package/assets/esri/core/workers/chunks/83d1a1b3d371c991cc4c.js +0 -1
  305. package/assets/esri/core/workers/chunks/c4bb67150ccd01ea6014.js +0 -1
  306. package/assets/esri/core/workers/chunks/c60cf62f374e71e562fc.js +0 -1
  307. package/assets/esri/core/workers/chunks/c8f239c25fe864f0e47a.js +0 -1
  308. package/assets/esri/core/workers/chunks/cad260881653567bc8f9.js +0 -1
  309. package/assets/esri/core/workers/chunks/e55f7fc7eff0074ce0fc.js +0 -1
  310. package/assets/esri/core/workers/chunks/eef27d305023034084a4.js +0 -1
  311. package/assets/esri/core/workers/chunks/f38c54ada9e7012a2960.js +0 -1
  312. package/core/watchUtils.d.ts +0 -4
  313. package/core/watchUtils.js +0 -5
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3529],{63529:(e,a,r)=>{r.r(a),r.d(a,{fromUrl:()=>d});var t=r(20102),n=r(17452),l=r(66677),s=r(71592),i=r(52104),o=r(84230),c=r(87344),u=r(96187);const y={FeatureLayer:!0,SceneLayer:!0};async function d(e){const a=e.properties?.customParameters,c=await async function(e,a){let r=(0,l.Qc)(e);if(null==r&&(r=await async function(e,a){const r=await(0,u.T)(e,{customParameters:a});let t=null,s=null;const i=r.type;if("Feature Layer"===i||"Table"===i?(t="FeatureServer",s=r.id??null):"indexedVector"===i?t="VectorTileServer":r.hasOwnProperty("mapName")?t="MapServer":r.hasOwnProperty("bandCount")&&r.hasOwnProperty("pixelSizeX")?t="ImageServer":r.hasOwnProperty("maxRecordCount")&&r.hasOwnProperty("allowGeometryUpdates")?t="FeatureServer":r.hasOwnProperty("streamUrls")?t="StreamServer":m(r)?(t="SceneServer",s=r.id):r.hasOwnProperty("layers")&&m(r.layers?.[0])&&(t="SceneServer"),!t)return null;const o=null!=s?(0,l.DR)(e):null;return{title:null!=o&&r.name||(0,n.vt)(e),serverType:t,sublayer:s,url:{path:null!=o?o.serviceUrl:(0,n.mN)(e).path}}}(e,a)),null==r)throw new t.Z("arcgis-layers:url-mismatch","The url '${url}' is not a valid arcgis resource",{url:e});const{serverType:c,sublayer:d}=r;let f;const h={FeatureServer:"FeatureLayer",StreamServer:"StreamLayer",VectorTileServer:"VectorTileLayer"};switch(c){case"MapServer":f=null!=d?"FeatureLayer":await async function(e,a){return(await(0,u.T)(e,{customParameters:a})).tileInfo}(e,a)?"TileLayer":"MapImageLayer";break;case"ImageServer":{const r=await(0,u.T)(e,{customParameters:a}),{tileInfo:t,cacheType:n}=r;f=t?"LERC"!==t?.format?.toUpperCase()||n&&"elevation"!==n.toLowerCase()?"ImageryTileLayer":"ElevationLayer":"ImageryLayer";break}case"SceneServer":{const e=await(0,u.T)(r.url.path,{customParameters:a});if(f="SceneLayer",e){const a=e?.layers;if("Voxel"===e?.layerType)f="VoxelLayer";else if(a?.length){const e=a[0]?.layerType;null!=e&&null!=o.fb[e]&&(f=o.fb[e])}}break}default:f=h[c]}const b="FeatureServer"===c,p="SceneServer"===c,v={parsedUrl:r,Constructor:null,layerId:b||p?d??void 0:void 0,layers:[],tables:[]};if(y[f]&&null==d){const r=await async function(e,a,r){let t,n,l=!1;switch(a){case"FeatureServer":{const a=await(0,i.V)(e,{customParameters:r});l=!!a.layersJSON,t=a.layersJSON||a.serviceJSON;break}case"SceneServer":{const a=await async function(e,a){const r=await(0,u.T)(e,{customParameters:a}),t=r.layers?.[0];if(!t)return{serviceInfo:r};try{const{serverUrl:t}=await(0,s.w)(e),n=await(0,u.T)(t,{customParameters:a}).catch((()=>null));return n&&(r.tables=n.tables),{serviceInfo:r,tableServerUrl:t}}catch{return{serviceInfo:r}}}(e,r);t=a.serviceInfo,n=a.tableServerUrl;break}default:t=await(0,u.T)(e,{customParameters:r})}const o=t?.layers,c=t?.tables;return{layers:o?.map((e=>({id:e.id}))).reverse()||[],tables:c?.map((e=>({serverUrl:n,id:e.id}))).reverse()||[],layerInfos:l?o:[],tableInfos:l?c:[]}}(e,c,a);b&&(v.sublayerInfos=r.layerInfos,v.tableInfos=r.tableInfos),1!==r.layers.length+r.tables.length?(v.layers=r.layers,v.tables=r.tables):(b||p)&&(v.layerId=r.layers[0]?.id??r.tables[0]?.id,v.sourceJSON=r.layerInfos?.[0]??r.tableInfos?.[0])}return v.Constructor=await w(f),v}(e.url,a),d={...e.properties,url:e.url};if(c.layers.length+c.tables.length===0)return null!=c.layerId&&(d.layerId=c.layerId),null!=c.sourceJSON&&(d.sourceJSON=c.sourceJSON),new c.Constructor(d);const h=new(0,(await Promise.all([r.e(163),r.e(4609),r.e(7865)]).then(r.bind(r,40504))).default)({title:c.parsedUrl.title});return await async function(e,a,r){function t(e,a,t,n){const l={...r,layerId:a,sublayerTitleMode:"service-name"};return null!=e&&(l.url=e),null!=t&&(l.sourceJSON=t),n(l)}for(const{id:r,serverUrl:n}of a.layers){const l=t(n,r,f(a.sublayerInfos,r),(e=>new a.Constructor(e)));e.add(l)}if(a.tables.length){const r=await w("FeatureLayer");a.tables.forEach((({id:n,serverUrl:l})=>{const s=t(l,n,f(a.tableInfos,n),(e=>new r(e)));e.tables.add(s)}))}}(h,c,d),h}function f(e,a){return e?e.find((e=>e.id===a)):null}function m(e){return null!=e&&e.hasOwnProperty("store")&&e.hasOwnProperty("id")&&"number"==typeof e.id}async function w(e){return(0,c.T[e])()}},71592:(e,a,r)=>{r.d(a,{w:()=>u});var t=r(40330),n=r(3172),l=r(20102),s=r(95330),i=r(66677),o=r(48522),c=r(15235);async function u(e,a){const r=(0,i.Qc)(e);if(!r)throw new l.Z("invalid-url","Invalid scene service url");const u={...a,sceneServerUrl:r.url.path,layerId:r.sublayer??void 0};if(u.sceneLayerItem??=await async function(e){const a=(await y(e)).serviceItemId;if(!a)return null;const r=new c.default({id:a,apiKey:e.apiKey}),l=await async function(e){const a=t.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const r=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.Z)(r,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,s.r9)(e)}return null}(e);null!=l&&(r.portal=new o.Z({url:l}));try{return r.load({signal:e.signal})}catch(e){return(0,s.r9)(e),null}}(u),null==u.sceneLayerItem)return d(u.sceneServerUrl.replace("/SceneServer","/FeatureServer"),u);const f=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const r=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find((e=>"Feature Service"===e.type))||null;if(!r)return null;const t=new c.default({portal:r.portal,id:r.id});return await t.load(),t}catch(e){return(0,s.r9)(e),null}}(u);if(!f?.url)throw new l.Z("related-service-not-found","Could not find feature service through portal item relationship");const m=await d(f.url,u);return m.portalItem=f,m}async function y(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",token:e.apiKey},responseType:"json",signal:e.signal};try{const r=await(0,n.Z)(e.sceneServerUrl,a);e.rootDocument=r.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const r=(0,i.Qc)(e);if(!r)throw new l.Z("invalid-feature-service-url","Invalid feature service url");const t=r.url.path,s=a.layerId;if(null==s)return{serverUrl:t};const o=y(a),c=e=>{const r={query:{f:"json"},responseType:"json",authMode:e,signal:a.signal};return(0,n.Z)(t,r)},u=c("anonymous").catch((()=>c("no-prompt"))),[d,f]=await Promise.all([u,o]),m=f&&f.layers,w=d.data&&d.data.layers;if(!Array.isArray(w))throw new Error("expected layers array");if(Array.isArray(m)){for(let e=0;e<Math.min(m.length,w.length);e++)if(m[e].id===s)return{serverUrl:t,layerId:w[e].id}}else if(null!=s&&s<w.length)return{serverUrl:t,layerId:w[s].id};throw new Error("could not find matching associated sublayer")}},52104:(e,a,r)=>{r.d(a,{V:()=>n});var t=r(96187);async function n(e,a){const r=await(0,t.T)(e,a);r.layers=r.layers.filter(l);const n={serviceJSON:r};if((r.currentVersion??0)<10.5)return n;const s=await(0,t.T)(e+"/layers",a);return n.layersJSON={layers:s.layers.filter(l),tables:s.tables},n}function l(e){return!e.type||"Feature Layer"===e.type||"Oriented Imagery Layer"===e.type}},87344:(e,a,r)=>{r.d(a,{T:()=>t});const t={BingMapsLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(8153)]).then(r.bind(r,2723))).default,BuildingSceneLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(6569),r.e(1423),r.e(4165),r.e(3778),r.e(6404),r.e(8654),r.e(9238),r.e(6170),r.e(3975),r.e(1161),r.e(3554)]).then(r.bind(r,30223))).default,CSVLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(6569),r.e(1423),r.e(4165),r.e(3778),r.e(6404),r.e(8654),r.e(9238),r.e(3584)]).then(r.bind(r,45425))).default,DimensionLayer:async()=>(await Promise.all([r.e(163),r.e(9717)]).then(r.bind(r,40081))).default,ElevationLayer:async()=>(await Promise.all([r.e(163),r.e(6569),r.e(9016),r.e(2763)]).then(r.bind(r,65665))).default,FeatureLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(6569),r.e(1423),r.e(4165),r.e(3778),r.e(6404),r.e(8654),r.e(9238),r.e(7520)]).then(r.bind(r,19238))).default,GeoJSONLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(6569),r.e(1423),r.e(4165),r.e(3778),r.e(6404),r.e(9069)]).then(r.bind(r,23477))).default,GeoRSSLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(1043)]).then(r.bind(r,3723))).default,GroupLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9059)]).then(r.bind(r,40504))).default,ImageryLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(6569),r.e(4165),r.e(4599),r.e(6610),r.e(3663),r.e(4608)]).then(r.bind(r,60590))).default,ImageryTileLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(6569),r.e(6610),r.e(4136),r.e(3663),r.e(5913)]).then(r.bind(r,74878))).default,IntegratedMeshLayer:async()=>(await Promise.all([r.e(163),r.e(3975),r.e(1537)]).then(r.bind(r,9310))).default,KMLLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(1423),r.e(6472)]).then(r.bind(r,42756))).default,LineOfSightLayer:async()=>(await Promise.all([r.e(163),r.e(4998)]).then(r.bind(r,21786))).default,LinkChartLayer:async()=>(await Promise.all([r.e(4609),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(6569),r.e(1423),r.e(4165),r.e(6404),r.e(8968),r.e(5286),r.e(801)]).then(r.bind(r,19087))).default,MapImageLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(1423),r.e(4165),r.e(3778),r.e(4599),r.e(2863),r.e(7374)]).then(r.bind(r,27374))).default,MapNotesLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(6569),r.e(1423),r.e(4165),r.e(3778),r.e(6404),r.e(8654),r.e(9238),r.e(2575)]).then(r.bind(r,62128))).default,MediaLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4828)]).then(r.bind(r,57765))).default,OGCFeatureLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(1423),r.e(4165),r.e(3778),r.e(6404),r.e(2341)]).then(r.bind(r,88068))).default,OpenStreetMapLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9971),r.e(6237)]).then(r.bind(r,66237))).default,OrientedImageryLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(6569),r.e(1423),r.e(4165),r.e(3778),r.e(6404),r.e(8654),r.e(9238),r.e(6964)]).then(r.bind(r,76604))).default,PointCloudLayer:async()=>(await Promise.all([r.e(163),r.e(8775),r.e(3975),r.e(8643),r.e(6138)]).then(r.bind(r,10608))).default,RouteLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(1423),r.e(261)]).then(r.bind(r,40153))).default,SceneLayer:async()=>(await Promise.all([r.e(163),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(1423),r.e(4165),r.e(3778),r.e(6170),r.e(3975),r.e(1161),r.e(1174)]).then(r.bind(r,57476))).default,StreamLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(1423),r.e(4165),r.e(3778),r.e(6404),r.e(7132)]).then(r.bind(r,88387))).default,SubtypeGroupLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(1423),r.e(4165),r.e(3778),r.e(8654),r.e(8324),r.e(2596)]).then(r.bind(r,20697))).default,TileLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(1423),r.e(4165),r.e(3778),r.e(4599),r.e(9016),r.e(2863),r.e(8636)]).then(r.bind(r,98636))).default,UnknownLayer:async()=>(await r.e(4166).then(r.bind(r,44166))).default,UnsupportedLayer:async()=>(await r.e(9296).then(r.bind(r,39296))).default,VectorTileLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9016),r.e(4325),r.e(9805),r.e(5481)]).then(r.bind(r,94756))).default,VoxelLayer:async()=>(await Promise.all([r.e(163),r.e(8775),r.e(3975),r.e(9327)]).then(r.bind(r,28865))).default,WFSLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(6569),r.e(1423),r.e(4165),r.e(3778),r.e(6404),r.e(6506)]).then(r.bind(r,12653))).default,WMSLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(1574)]).then(r.bind(r,25906))).default,WMTSLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9971),r.e(2594)]).then(r.bind(r,72594))).default,WebTileLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9971)]).then(r.bind(r,16199))).default}},96187:(e,a,r)=>{r.d(a,{T:()=>n});var t=r(3172);async function n(e,a){const{data:r}=await(0,t.Z)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return r}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3529],{63529:(e,a,r)=>{r.r(a),r.d(a,{fromUrl:()=>d});var t=r(20102),n=r(17452),l=r(66677),s=r(71592),i=r(52104),o=r(84230),c=r(87344),u=r(96187);const y={FeatureLayer:!0,SceneLayer:!0};async function d(e){const a=e.properties?.customParameters,c=await async function(e,a){let r=(0,l.Qc)(e);if(null==r&&(r=await async function(e,a){const r=await(0,u.T)(e,{customParameters:a});let t=null,s=null;const i=r.type;if("Feature Layer"===i||"Table"===i?(t="FeatureServer",s=r.id??null):"indexedVector"===i?t="VectorTileServer":r.hasOwnProperty("mapName")?t="MapServer":r.hasOwnProperty("bandCount")&&r.hasOwnProperty("pixelSizeX")?t="ImageServer":r.hasOwnProperty("maxRecordCount")&&r.hasOwnProperty("allowGeometryUpdates")?t="FeatureServer":r.hasOwnProperty("streamUrls")?t="StreamServer":m(r)?(t="SceneServer",s=r.id):r.hasOwnProperty("layers")&&m(r.layers?.[0])&&(t="SceneServer"),!t)return null;const o=null!=s?(0,l.DR)(e):null;return{title:null!=o&&r.name||(0,n.vt)(e),serverType:t,sublayer:s,url:{path:null!=o?o.serviceUrl:(0,n.mN)(e).path}}}(e,a)),null==r)throw new t.Z("arcgis-layers:url-mismatch","The url '${url}' is not a valid arcgis resource",{url:e});const{serverType:c,sublayer:d}=r;let f;const h={FeatureServer:"FeatureLayer",StreamServer:"StreamLayer",VectorTileServer:"VectorTileLayer"};switch(c){case"MapServer":f=null!=d?"FeatureLayer":await async function(e,a){return(await(0,u.T)(e,{customParameters:a})).tileInfo}(e,a)?"TileLayer":"MapImageLayer";break;case"ImageServer":{const r=await(0,u.T)(e,{customParameters:a}),{tileInfo:t,cacheType:n}=r;f=t?"LERC"!==t?.format?.toUpperCase()||n&&"elevation"!==n.toLowerCase()?"ImageryTileLayer":"ElevationLayer":"ImageryLayer";break}case"SceneServer":{const e=await(0,u.T)(r.url.path,{customParameters:a});if(f="SceneLayer",e){const a=e?.layers;if("Voxel"===e?.layerType)f="VoxelLayer";else if(a?.length){const e=a[0]?.layerType;null!=e&&null!=o.fb[e]&&(f=o.fb[e])}}break}default:f=h[c]}const b="FeatureServer"===c,p="SceneServer"===c,v={parsedUrl:r,Constructor:null,layerId:b||p?d??void 0:void 0,layers:[],tables:[]};if(y[f]&&null==d){const r=await async function(e,a,r){let t,n,l=!1;switch(a){case"FeatureServer":{const a=await(0,i.V)(e,{customParameters:r});l=!!a.layersJSON,t=a.layersJSON||a.serviceJSON;break}case"SceneServer":{const a=await async function(e,a){const r=await(0,u.T)(e,{customParameters:a}),t=r.layers?.[0];if(!t)return{serviceInfo:r};try{const{serverUrl:t}=await(0,s.w)(e),n=await(0,u.T)(t,{customParameters:a}).catch((()=>null));return n&&(r.tables=n.tables),{serviceInfo:r,tableServerUrl:t}}catch{return{serviceInfo:r}}}(e,r);t=a.serviceInfo,n=a.tableServerUrl;break}default:t=await(0,u.T)(e,{customParameters:r})}const o=t?.layers,c=t?.tables;return{layers:o?.map((e=>({id:e.id}))).reverse()||[],tables:c?.map((e=>({serverUrl:n,id:e.id}))).reverse()||[],layerInfos:l?o:[],tableInfos:l?c:[]}}(e,c,a);b&&(v.sublayerInfos=r.layerInfos,v.tableInfos=r.tableInfos),1!==r.layers.length+r.tables.length?(v.layers=r.layers,v.tables=r.tables):(b||p)&&(v.layerId=r.layers[0]?.id??r.tables[0]?.id,v.sourceJSON=r.layerInfos?.[0]??r.tableInfos?.[0])}return v.Constructor=await w(f),v}(e.url,a),d={...e.properties,url:e.url};if(c.layers.length+c.tables.length===0)return null!=c.layerId&&(d.layerId=c.layerId),null!=c.sourceJSON&&(d.sourceJSON=c.sourceJSON),new c.Constructor(d);const h=new(0,(await Promise.all([r.e(163),r.e(4609),r.e(7865)]).then(r.bind(r,40504))).default)({title:c.parsedUrl.title});return await async function(e,a,r){function t(e,a,t,n){const l={...r,layerId:a,sublayerTitleMode:"service-name"};return null!=e&&(l.url=e),null!=t&&(l.sourceJSON=t),n(l)}for(const{id:r,serverUrl:n}of a.layers){const l=t(n,r,f(a.sublayerInfos,r),(e=>new a.Constructor(e)));e.add(l)}if(a.tables.length){const r=await w("FeatureLayer");a.tables.forEach((({id:n,serverUrl:l})=>{const s=t(l,n,f(a.tableInfos,n),(e=>new r(e)));e.tables.add(s)}))}}(h,c,d),h}function f(e,a){return e?e.find((e=>e.id===a)):null}function m(e){return null!=e&&e.hasOwnProperty("store")&&e.hasOwnProperty("id")&&"number"==typeof e.id}async function w(e){return(0,c.T[e])()}},71592:(e,a,r)=>{r.d(a,{w:()=>u});var t=r(40330),n=r(3172),l=r(20102),s=r(95330),i=r(66677),o=r(48522),c=r(15235);async function u(e,a){const r=(0,i.Qc)(e);if(!r)throw new l.Z("invalid-url","Invalid scene service url");const u={...a,sceneServerUrl:r.url.path,layerId:r.sublayer??void 0};if(u.sceneLayerItem??=await async function(e){const a=(await y(e)).serviceItemId;if(!a)return null;const r=new c.default({id:a,apiKey:e.apiKey}),l=await async function(e){const a=t.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const r=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.Z)(r,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,s.r9)(e)}return null}(e);null!=l&&(r.portal=new o.Z({url:l}));try{return r.load({signal:e.signal})}catch(e){return(0,s.r9)(e),null}}(u),null==u.sceneLayerItem)return d(u.sceneServerUrl.replace("/SceneServer","/FeatureServer"),u);const f=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const r=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find((e=>"Feature Service"===e.type))||null;if(!r)return null;const t=new c.default({portal:r.portal,id:r.id});return await t.load(),t}catch(e){return(0,s.r9)(e),null}}(u);if(!f?.url)throw new l.Z("related-service-not-found","Could not find feature service through portal item relationship");const m=await d(f.url,u);return m.portalItem=f,m}async function y(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",token:e.apiKey},responseType:"json",signal:e.signal};try{const r=await(0,n.Z)(e.sceneServerUrl,a);e.rootDocument=r.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const r=(0,i.Qc)(e);if(!r)throw new l.Z("invalid-feature-service-url","Invalid feature service url");const t=r.url.path,s=a.layerId;if(null==s)return{serverUrl:t};const o=y(a),c=e=>{const r={query:{f:"json"},responseType:"json",authMode:e,signal:a.signal};return(0,n.Z)(t,r)},u=c("anonymous").catch((()=>c("no-prompt"))),[d,f]=await Promise.all([u,o]),m=f&&f.layers,w=d.data&&d.data.layers;if(!Array.isArray(w))throw new Error("expected layers array");if(Array.isArray(m)){for(let e=0;e<Math.min(m.length,w.length);e++)if(m[e].id===s)return{serverUrl:t,layerId:w[e].id}}else if(null!=s&&s<w.length)return{serverUrl:t,layerId:w[s].id};throw new Error("could not find matching associated sublayer")}},52104:(e,a,r)=>{r.d(a,{V:()=>n});var t=r(96187);async function n(e,a){const r=await(0,t.T)(e,a);r.layers=r.layers.filter(l);const n={serviceJSON:r};if((r.currentVersion??0)<10.5)return n;const s=await(0,t.T)(e+"/layers",a);return n.layersJSON={layers:s.layers.filter(l),tables:s.tables},n}function l(e){return!e.type||"Feature Layer"===e.type||"Oriented Imagery Layer"===e.type}},87344:(e,a,r)=>{r.d(a,{T:()=>t});const t={BingMapsLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(8153)]).then(r.bind(r,2723))).default,BuildingSceneLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(6569),r.e(1423),r.e(4165),r.e(3778),r.e(6404),r.e(8654),r.e(9238),r.e(6170),r.e(3975),r.e(1161),r.e(3554)]).then(r.bind(r,30223))).default,CSVLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(6569),r.e(1423),r.e(4165),r.e(3778),r.e(6404),r.e(8654),r.e(9238),r.e(3584)]).then(r.bind(r,45425))).default,DimensionLayer:async()=>(await Promise.all([r.e(163),r.e(9717)]).then(r.bind(r,40081))).default,ElevationLayer:async()=>(await Promise.all([r.e(163),r.e(6569),r.e(9016),r.e(2763)]).then(r.bind(r,65665))).default,FeatureLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(6569),r.e(1423),r.e(4165),r.e(3778),r.e(6404),r.e(8654),r.e(9238),r.e(7520)]).then(r.bind(r,19238))).default,GeoJSONLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(6569),r.e(1423),r.e(4165),r.e(3778),r.e(6404),r.e(9069)]).then(r.bind(r,23477))).default,GeoRSSLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(1043)]).then(r.bind(r,3723))).default,GroupLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9059)]).then(r.bind(r,40504))).default,ImageryLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(6569),r.e(4165),r.e(4599),r.e(6610),r.e(3663),r.e(4608)]).then(r.bind(r,60590))).default,ImageryTileLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(6569),r.e(6610),r.e(4136),r.e(3663),r.e(5913)]).then(r.bind(r,74878))).default,IntegratedMeshLayer:async()=>(await Promise.all([r.e(163),r.e(3975),r.e(1537)]).then(r.bind(r,9310))).default,KMLLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(1423),r.e(6472)]).then(r.bind(r,42756))).default,LineOfSightLayer:async()=>(await Promise.all([r.e(163),r.e(4998)]).then(r.bind(r,21786))).default,LinkChartLayer:async()=>(await Promise.all([r.e(4609),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(6569),r.e(1423),r.e(4165),r.e(6404),r.e(8968),r.e(5286),r.e(801)]).then(r.bind(r,19087))).default,MapImageLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(1423),r.e(4165),r.e(3778),r.e(4599),r.e(2863),r.e(7374)]).then(r.bind(r,27374))).default,MapNotesLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(6569),r.e(1423),r.e(4165),r.e(3778),r.e(6404),r.e(8654),r.e(9238),r.e(2575)]).then(r.bind(r,62128))).default,MediaLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(4828)]).then(r.bind(r,57765))).default,OGCFeatureLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(1423),r.e(4165),r.e(3778),r.e(6404),r.e(2341)]).then(r.bind(r,88068))).default,OpenStreetMapLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9971),r.e(6237)]).then(r.bind(r,66237))).default,OrientedImageryLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(6569),r.e(1423),r.e(4165),r.e(3778),r.e(6404),r.e(8654),r.e(9238),r.e(3681)]).then(r.bind(r,44958))).default,PointCloudLayer:async()=>(await Promise.all([r.e(163),r.e(8775),r.e(3975),r.e(8643),r.e(6138)]).then(r.bind(r,10608))).default,RouteLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(1423),r.e(261)]).then(r.bind(r,40153))).default,SceneLayer:async()=>(await Promise.all([r.e(163),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(1423),r.e(4165),r.e(3778),r.e(6170),r.e(3975),r.e(1161),r.e(1174)]).then(r.bind(r,57476))).default,StreamLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(1423),r.e(4165),r.e(3778),r.e(6404),r.e(7132)]).then(r.bind(r,88387))).default,SubtypeGroupLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(1423),r.e(4165),r.e(3778),r.e(8654),r.e(8324),r.e(2596)]).then(r.bind(r,20697))).default,TileLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(1423),r.e(4165),r.e(3778),r.e(4599),r.e(9016),r.e(2863),r.e(8636)]).then(r.bind(r,98636))).default,UnknownLayer:async()=>(await r.e(4166).then(r.bind(r,44166))).default,UnsupportedLayer:async()=>(await r.e(9296).then(r.bind(r,39296))).default,VectorTileLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9016),r.e(4325),r.e(9805),r.e(5481)]).then(r.bind(r,94756))).default,VoxelLayer:async()=>(await Promise.all([r.e(163),r.e(8775),r.e(3975),r.e(9327)]).then(r.bind(r,28865))).default,WFSLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(3928),r.e(3547),r.e(6569),r.e(1423),r.e(4165),r.e(3778),r.e(6404),r.e(6506)]).then(r.bind(r,12653))).default,WMSLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9790),r.e(8775),r.e(1574)]).then(r.bind(r,25906))).default,WMTSLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9971),r.e(2594)]).then(r.bind(r,72594))).default,WebTileLayer:async()=>(await Promise.all([r.e(163),r.e(4609),r.e(9971)]).then(r.bind(r,16199))).default}},96187:(e,a,r)=>{r.d(a,{T:()=>n});var t=r(3172);async function n(e,a){const{data:r}=await(0,t.Z)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return r}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5481],{92835:(t,e,r)=>{r.d(e,{Z:()=>y});var s,i=r(43697),o=r(96674),n=r(35463),l=r(5600),a=(r(75215),r(67676),r(80442),r(71715)),u=r(52011),h=r(30556);let c=s=class extends o.wq{static get allTime(){return p}static get empty(){return d}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?.getTime()??null}get isAllTime(){return this.equals(s.allTime)}get isEmpty(){return this.equals(s.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?.getTime()??null}clone(){return new s({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,s=t.start?.getTime()??t.start,i=t.end?.getTime()??t.end;return e===s&&r===i}expandTo(t,e="system"){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,n.JE)(r,t,e));let i=this.end;if(i){const r=(0,n.JE)(i,t,e);i=i.getTime()===r.getTime()?r:(0,n.Nm)(r,1,t,e)}return new s({start:r,end:i})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return s.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,i=t.start?.getTime()??-1/0,o=t.end?.getTime()??1/0;let n,l;if(i>=e&&i<=r?n=i:e>=i&&e<=o&&(n=e),r>=i&&r<=o?l=r:o>=e&&o<=r&&(l=o),null!=n&&null!=l&&!isNaN(n)&&!isNaN(l)){const t=new s;return t.start=n===-1/0?null:new Date(n),t.end=l===1/0?null:new Date(l),t}return s.empty}offset(t,e,r="system"){if(this.isEmpty||this.isAllTime)return this.clone();const i=new s,{start:o,end:l}=this;return null!=o&&(i.start=(0,n.Nm)(o,t,e,r)),null!=l&&(i.end=(0,n.Nm)(l,t,e,r)),i}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return p.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,r=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new s({start:e,end:r})}};(0,i._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,i._)([(0,a.r)("end")],c.prototype,"readEnd",null),(0,i._)([(0,h.c)("end")],c.prototype,"writeEnd",null),(0,i._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,i._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,i._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,i._)([(0,a.r)("start")],c.prototype,"readStart",null),(0,i._)([(0,h.c)("start")],c.prototype,"writeStart",null),c=s=(0,i._)([(0,u.j)("esri.TimeExtent")],c);const p=new c,d=new c({start:void 0,end:void 0}),y=c},10699:(t,e,r)=>{r.d(e,{IG:()=>n,iv:()=>l});var s=r(43697),i=r(52011);let o=0;const n=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+o++})}};return e=(0,s._)([(0,i.j)("esri.core.Identifiable")],e),e},l=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:o++})}};return e=(0,s._)([(0,i.j)("esri.core.NumericIdentifiable")],e),e};let a=class extends(n(class{})){};a=(0,s._)([(0,i.j)("esri.core.Identifiable")],a)},13867:(t,e,r)=>{r.d(e,{z:()=>i});var s=r(69801);class i{constructor(t,e){this._storage=new s.WJ,this.id="",this.name="",this.size=0,this._storage.maxSize=t,this._storage.register(this),e&&this._storage.registerRemoveFunc("",e)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(t,e,r=1){this._storage.put(this,t,e,r,1)}pop(t){return this._storage.pop(this,t)}get(t){return this._storage.get(this,t)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}resetHitRate(){}}},69801:(t,e,r)=>{r.d(e,{WJ:()=>l,Xq:()=>n});var s,i,o=r(44553);(i=s||(s={}))[i.ALL=0]="ALL",i[i.SOME=1]="SOME";class n{constructor(t,e,r){this.name=t,this._storage=e,this.id=a+++":",this.size=0,this.maxSize=0,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),r&&(this._storage.registerRemoveFunc(this.id,r),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get sizeAll(){return this._storage.size}resetHitRate(){this._hit=this._miss=0}put(t,e,r,s=0){this._storage.put(this,t,e,r,s)}get(t){const e=this._storage.get(this,t);return void 0===e?++this._miss:++this._hit,e}peek(t){return this._storage.peek(this,t)}pop(t){const e=this._storage.pop(this,t);return void 0===e?++this._miss:++this._hit,e}updateSize(t,e,r){this._storage.updateSize(this,t,e,r)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class l{get size(){return this._size}constructor(t=10485760){this._maxSize=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new o.Z,this._users=new o.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(t){this._users.push(t)}deregister(t){this._users.removeUnordered(t)}registerRemoveFunc(t,e){this._removeFuncs.push([t,e])}deregisterRemoveFunc(t){this._removeFuncs.filterInPlace((e=>e[0]!==t))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize=Math.max(t,0),this._checkSizeLimits()}put(t,e,r,i,o){e=t.id+e;const n=this._db.get(e);if(n&&(this._size-=n.size,t.size-=n.size,this._db.delete(e),n.entry!==r&&this._notifyRemove(e,n.entry,s.ALL)),i>this._maxSize)return void this._notifyRemove(e,r,s.ALL);if(void 0===r)return void console.warn("Refusing to cache undefined entry ");if(!i||i<0)return void console.warn(`Refusing to cache entry with size ${i} for key ${e}`);const l=1+Math.max(o,-3)- -3;this._db.set(e,{entry:r,size:i,lifetime:l,lives:l}),this._size+=i,t.size+=i,this._checkSizeLimits()}updateSize(t,e,r,i){e=t.id+e;const o=this._db.get(e);if(o&&o.entry===r){for(this._size-=o.size,t.size-=o.size;i>this._maxSize;){const t=this._notifyRemove(e,r,s.SOME);if(!(null!=t&&t>0))return void this._db.delete(e);i=t}o.size=i,this._size+=i,t.size+=i,this._checkSizeLimits()}}pop(t,e){e=t.id+e;const r=this._db.get(e);if(r)return this._size-=r.size,t.size-=r.size,this._db.delete(e),++this._hit,r.entry;++this._miss}get(t,e){e=t.id+e;const r=this._db.get(e);if(void 0!==r)return this._db.delete(e),r.lives=r.lifetime,this._db.set(e,r),++this._hit,r.entry;++this._miss}peek(t,e){const r=this._db.get(t.id+e);return r?++this._hit:++this._miss,r?.entry}get performanceInfo(){const t={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},e={},r=new Array;this._db.forEach(((t,s)=>{const i=t.lifetime;r[i]=(r[i]||0)+t.size,this._users.forAll((r=>{const{id:i,name:o}=r;if(s.startsWith(i)){const r=e[o]||0;e[o]=r+t.size}}))}));const s={};this._users.forAll((t=>{const r=t.name;if("hitRate"in t&&"number"==typeof t.hitRate&&!isNaN(t.hitRate)&&t.hitRate>0){const i=e[r]||0;e[r]=i,s[r]=Math.round(100*t.hitRate)+"%"}else s[r]="0%"}));const i=Object.keys(e);i.sort(((t,r)=>e[r]-e[t])),i.forEach((r=>t[r]=Math.round(e[r]/2**20)+"MB / "+s[r]));for(let e=r.length-1;e>=0;--e){const s=r[e];s&&(t["Priority "+(e+-3-1)]=Math.round(s/this._size*100)+"%")}return t}resetStats(){this._hit=this._miss=0,this._users.forAll((t=>t.resetHitRate()))}clear(t){const e=t.id;this._db.forEach(((t,r)=>{r.startsWith(e)&&(this._size-=t.size,this._db.delete(r),this._notifyRemove(r,t.entry,s.ALL))})),t.size=0}clearAll(){this._db.forEach(((t,e)=>this._notifyRemove(e,t.entry,s.ALL))),this._users.forEach((t=>t.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(t,e,r){let s;return this._removeFuncs.some((i=>{if(t.startsWith(i[0])){const t=i[1](e,r);return"number"==typeof t&&(s=t),!0}return!1})),s}_checkSizeLimits(){if(this._size>this._maxSize)for(const[t,e]of this._db)if(this._purgeItem(t,e),this._size<=.9*this.maxSize)return;this._users.forEach((t=>{if(t.maxSize>0&&t.size>t.maxSize)for(const[e,r]of this._db)if(e.startsWith(t.id)&&(this._purgeItem(e,r,t),t.size<=.9*t.maxSize))return}))}_purgeItem(t,e,r=this._users.find((e=>t.startsWith(e.id)))){if(this._db.delete(t),e.lives<=1){this._size-=e.size,r&&(r.size-=e.size);const i=this._notifyRemove(t,e.entry,s.SOME);null!=i&&i>0&&(this._size+=i,r&&(r.size+=i),e.lives=e.lifetime,e.size=i,this._db.set(t,e))}else--e.lives,this._db.set(t,e)}}let a=0},17445:(t,e,r)=>{r.d(e,{N1:()=>p,YP:()=>a,Z_:()=>m,gx:()=>u,nn:()=>f,on:()=>c,tX:()=>g}),r(66643),r(46791);var s=r(91460),i=r(50758),o=r(70586),n=r(95330),l=r(26258);function a(t,e,r={}){return h(t,e,r,d)}function u(t,e,r={}){return h(t,e,r,y)}function h(t,e,r={},s){let i=null;const n=r.once?(t,r)=>{s(t)&&((0,o.hw)(i),e(t,r))}:(t,r)=>{s(t)&&e(t,r)};if(i=(0,l.aQ)(t,n,r.sync,r.equals),r.initial){const e=t();n(e,e)}return i}function c(t,e,r,n={}){let l=null,u=null,h=null;function c(){l&&u&&(u.remove(),n.onListenerRemove?.(l),l=null,u=null)}function p(t){n.once&&n.once&&(0,o.hw)(h),r(t)}const d=a(t,((t,r)=>{c(),(0,s.vT)(t)&&(l=t,u=(0,s.on)(t,e,p),n.onListenerAdd?.(t))}),{sync:n.sync,initial:!0});return h=(0,i.kB)((()=>{d.remove(),c()})),h}function p(t,e){return function(t,e,r){if((0,n.Hc)(r))return Promise.reject((0,n.zE)());const s=t();if(e?.(s))return Promise.resolve(s);let l=null;function a(){l=(0,o.hw)(l)}return new Promise(((s,o)=>{l=(0,i.AL)([(0,n.fu)(r,(()=>{a(),o((0,n.zE)())})),h(t,(t=>{a(),s(t)}),{sync:!1,once:!0},e??d)])}))}(t,y,e)}function d(t){return!0}function y(t){return!!t}r(87538);const m={sync:!0},f={initial:!0},g={sync:!0,initial:!0}},35463:(t,e,r)=>{r.d(e,{JE:()=>l,Nm:()=>n,rJ:()=>a});var s=r(90344),i=r(17126);const o={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8};function n(t,e,r,o="system"){const n=new i.vF((0,s.f1)(o)),l=i.ou.fromJSDate(t,{zone:n}),a="decades"===r||"centuries"===r?"year":u(r);return"decades"===r&&(e*=10),"centuries"===r&&(e*=100),l.plus({[a]:e}).toJSDate()}function l(t,e,r="system"){const o=new i.vF((0,s.f1)(r)),n=i.ou.fromJSDate(t,{zone:o});if("decades"===e||"centuries"===e){const t=n.startOf("year"),{year:r}=t,s=r-r%("decades"===e?10:100);return t.set({year:s}).toJSDate()}const l=u(e);return n.startOf(l).toJSDate()}function a(t,e,r){return 0===t?0:t*o[e]/o[r]}function u(t){switch(t){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}},90344:(t,e,r)=>{r.d(e,{Xr:()=>y,Ze:()=>_,f1:()=>w,p6:()=>v});var s=r(35454),i=r(70171),o=r(15512);r(17126);const n=Intl.DateTimeFormat().resolvedOptions().timeZone,l=(o.pt,{year:"numeric",month:"numeric",day:"numeric"}),a={year:"numeric",month:"long",day:"numeric"},u={year:"numeric",month:"short",day:"numeric"},h={year:"numeric",month:"long",weekday:"long",day:"numeric"},c={hour:"numeric",minute:"numeric"},p={...c,second:"numeric"},d={"short-date":l,"short-date-short-time":{...l,...c},"short-date-short-time-24":{...l,...c,hour12:!1},"short-date-long-time":{...l,...p},"short-date-long-time-24":{...l,...p,hour12:!1},"short-date-le":l,"short-date-le-short-time":{...l,...c},"short-date-le-short-time-24":{...l,...c,hour12:!1},"short-date-le-long-time":{...l,...p},"short-date-le-long-time-24":{...l,...p,hour12:!1},"long-month-day-year":a,"long-month-day-year-short-time":{...a,...c},"long-month-day-year-short-time-24":{...a,...c,hour12:!1},"long-month-day-year-long-time":{...a,...p},"long-month-day-year-long-time-24":{...a,...p,hour12:!1},"day-short-month-year":u,"day-short-month-year-short-time":{...u,...c},"day-short-month-year-short-time-24":{...u,...c,hour12:!1},"day-short-month-year-long-time":{...u,...p},"day-short-month-year-long-time-24":{...u,...p,hour12:!1},"long-date":h,"long-date-short-time":{...h,...c},"long-date-short-time-24":{...h,...c,hour12:!1},"long-date-long-time":{...h,...p},"long-date-long-time-24":{...h,...p,hour12:!1},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":c,"long-time":p},y=(0,s.w)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),m={ar:"ar-u-nu-latn-ca-gregory"};let f=new WeakMap;const g=d["short-date-short-time"];function _(t){return d[t]}function v(t,e=g){return function(t){let e=f.get(t);if(!e){const r=(0,i.Kd)(),s=m[r]||r,n=w(t.timeZone??o.By),l={...t,timeZone:n};e=new Intl.DateTimeFormat(s,l),f.set(t,e)}return e}(e).format(t)}function w(t){switch(t){case o.By:return n;case o._4:return o.pt;default:return t}}(0,i.Ze)((()=>{f=new WeakMap}))},87085:(t,e,r)=>{r.d(e,{Z:()=>v});var s=r(43697),i=(r(66577),r(3172)),o=r(20102),n=r(32448),l=r(10699),a=r(83379),u=r(92604),h=r(95330),c=r(17452),p=r(5600),d=(r(75215),r(67676),r(80442),r(52011)),y=r(68773),m=r(6570),f=r(82971);let g=0,_=class extends(n.Z.EventedMixin((0,l.IG)(a.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new m.Z(-180,-90,180,90,f.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+g++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=f.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(t){const e="string"==typeof t?{url:t}:t;return(await r.e(3529).then(r.bind(r,63529))).fromUrl(e)}static fromPortalItem(t){return async function(t){const e="portalItem"in t?t:{portalItem:t},{fromItem:s}=await r.e(8008).then(r.bind(r,28008));try{return await s(e)}catch(t){const r=e&&e.portalItem,s=r&&r.id||"unset",i=r&&r.portal&&r.portal.url||y.default.portalUrl;throw u.Z.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+i+"', id: '"+s+"')",t),t}}(t)}initialize(){this.when().catch((t=>{(0,h.D_)(t)||u.Z.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:t})}))}destroy(){const t=this.parent;if(t){const e=this;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"referenceLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e),this._set("parent",null)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,c.mN)(this.url)}async fetchAttributionData(){const t=this.attributionDataUrl;if(this.hasAttributionData&&t)return(await(0,i.Z)(t,{query:{f:"json"},responseType:"json"})).data;throw new o.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,s._)([(0,p.Cb)({type:String})],_.prototype,"attributionDataUrl",void 0),(0,s._)([(0,p.Cb)({type:m.Z})],_.prototype,"fullExtent",void 0),(0,s._)([(0,p.Cb)({readOnly:!0})],_.prototype,"hasAttributionData",null),(0,s._)([(0,p.Cb)({type:String,clonable:!1})],_.prototype,"id",void 0),(0,s._)([(0,p.Cb)({type:Boolean,nonNullable:!0})],_.prototype,"legendEnabled",void 0),(0,s._)([(0,p.Cb)({type:["show","hide","hide-children"]})],_.prototype,"listMode",void 0),(0,s._)([(0,p.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],_.prototype,"opacity",void 0),(0,s._)([(0,p.Cb)({clonable:!1})],_.prototype,"parent",void 0),(0,s._)([(0,p.Cb)({readOnly:!0})],_.prototype,"parsedUrl",null),(0,s._)([(0,p.Cb)({type:Boolean,readOnly:!0})],_.prototype,"persistenceEnabled",void 0),(0,s._)([(0,p.Cb)({type:Boolean})],_.prototype,"popupEnabled",void 0),(0,s._)([(0,p.Cb)({type:Boolean})],_.prototype,"attributionVisible",void 0),(0,s._)([(0,p.Cb)({type:f.Z})],_.prototype,"spatialReference",void 0),(0,s._)([(0,p.Cb)({type:String})],_.prototype,"title",void 0),(0,s._)([(0,p.Cb)({readOnly:!0,json:{read:!1}})],_.prototype,"type",void 0),(0,s._)([(0,p.Cb)()],_.prototype,"url",void 0),(0,s._)([(0,p.Cb)({type:Boolean,nonNullable:!0})],_.prototype,"visible",void 0),_=(0,s._)([(0,d.j)("esri.layers.Layer")],_);const v=_},94756:(t,e,r)=>{r.r(e),r.d(e,{default:()=>ft});var s=r(43697),i=r(22303),o=r(3172),n=r(66643),l=r(20102),a=r(22974),u=r(16453),h=r(95330),c=r(17452),p=r(5600),d=(r(75215),r(71715)),y=r(52011),m=r(30556),f=r(65617),g=r(6570),_=r(82971),v=r(87085),w=r(54295),S=r(46486),b=r(17287),A=r(71612),x=r(17017),E=r(38009),I=r(16859),T=r(72965);let L=null;var R=r(92604),C=r(1533);class P{constructor(t,e){this._spriteSource=t,this._maxTextureSize=e,this.devicePixelRatio=1,this._spriteImageFormat="png",this._isRetina=!1,this._spritesData={},this.image=null,this.width=null,this.height=null,this.loadStatus="not-loaded","url"===t.type&&t.spriteFormat&&(this._spriteImageFormat=t.spriteFormat),t.pixelRatio&&(this.devicePixelRatio=t.pixelRatio),this.baseURL=t.spriteUrl}get spriteNames(){const t=[];for(const e in this._spritesData)t.push(e);return t.sort(),t}getSpriteInfo(t){return this._spritesData?this._spritesData[t]:null}async load(t){if(this.baseURL){this.loadStatus="loading";try{await this._loadSprites(t),this.loadStatus="loaded"}catch{this.loadStatus="failed"}}else this.loadStatus="failed"}async _loadSprites(t){this._isRetina=this.devicePixelRatio>1.15;const{width:e,height:r,data:s,json:i}=await this._getSpriteData(this._spriteSource,t),o=Object.keys(i);if(!o||0===o.length||!s)return this._spritesData=this.image=null,void(this.width=this.height=0);this._spritesData=i,this.width=e,this.height=r;const n=Math.max(this._maxTextureSize,4096);if(e>n||r>n){const t=`Sprite resource for style ${this.baseURL} is bigger than the maximum allowed of ${n} pixels}`;throw R.Z.getLogger("esri.layers.support.SpriteSource").error(t),new l.Z("SpriteSource",t)}let a;for(let t=0;t<s.length;t+=4)a=s[t+3]/255,s[t]=s[t]*a,s[t+1]=s[t+1]*a,s[t+2]=s[t+2]*a;this.image=s}async _getSpriteData(t,e){if("image"===t.type){let e,r;if(this.devicePixelRatio<1.15){if(!t.spriteSource1x)throw new l.Z("SpriteSource","no image data provided for low resolution sprites!");e=t.spriteSource1x.image,r=t.spriteSource1x.json}else{if(!t.spriteSource2x)throw new l.Z("SpriteSource","no image data provided for high resolution sprites!");e=t.spriteSource2x.image,r=t.spriteSource2x.json}return"width"in e&&"height"in e&&"data"in e&&((0,C.eP)(e.data)||(0,C.KZ)(e.data))?{width:e.width,height:e.height,data:new Uint8Array(e.data),json:r}:{...U(e),json:r}}const r=(0,c.mN)(this.baseURL),s=r.query?"?"+(0,c.B7)(r.query):"",i=this._isRetina?"@2x":"",n=`${r.path}${i}.${this._spriteImageFormat}${s}`,a=`${r.path}${i}.json${s}`,[u,h]=await Promise.all([(0,o.Z)(a,e),(0,o.Z)(n,{responseType:"image",...e})]);return{...U(h.data),json:u.data}}}function U(t){const e=document.createElement("canvas"),r=e.getContext("2d");e.width=t.width,e.height=t.height,r.drawImage(t,0,0,t.width,t.height);const s=r.getImageData(0,0,t.width,t.height);return{width:t.width,height:t.height,data:new Uint8Array(s.data)}}var z=r(11145),D=r(28589),O=r(8744),M=r(40488),B=r(55415);class F{constructor(t){this.url=t}destroy(){this._tileIndexPromise=null}async fetchTileIndex(){return this._tileIndexPromise||(this._tileIndexPromise=(0,o.Z)(this.url).then((t=>t.data.index))),this._tileIndexPromise}async dataKey(t,e){const r=await this.fetchTileIndex();return(0,h.k_)(e),this._getIndexedDataKey(r,t)}_getIndexedDataKey(t,e){const r=[e];if(e.level<0||e.row<0||e.col<0||e.row>>e.level>0||e.col>>e.level>0)return null;let s=e;for(;0!==s.level;)s=new B.Z(s.level-1,s.row>>1,s.col>>1,s.world),r.push(s);let i,o,n=t,l=r.pop();if(1===n)return l;for(;r.length;)if(i=r.pop(),o=(1&i.col)+((1&i.row)<<1),n){if(0===n[o]){l=null;break}if(1===n[o]){l=i;break}l=i,n=n[o]}return l}}var Z=r(70586);class j{constructor(t,e){this._tilemap=t,this._tileIndexUrl=e}destroy(){this._tilemap=(0,Z.SC)(this._tilemap),this._tileIndexPromise=null}async fetchTileIndex(t){return this._tileIndexPromise||(this._tileIndexPromise=(0,o.Z)(this._tileIndexUrl,{query:{...t?.query}}).then((t=>t.data.index))),this._tileIndexPromise}dataKey(t,e){const{level:r,row:s,col:i}=t,o=new B.Z(t);return this._tilemap.fetchAvailabilityUpsample(r,s,i,o,e).then((()=>(o.world=t.world,o))).catch((t=>{if((0,h.D_)(t))throw t;return null}))}}var k=r(30175);class N{constructor(t){this._tileUrl=t,this._promise=null,this._abortController=null,this._abortOptions=[]}getData(t){null===this._promise&&(this._abortController=new AbortController,this._promise=this._makeRequest(this._tileUrl,this._abortController.signal));const e=this._abortOptions;return e.push(t),(0,h.fu)(t,(()=>{e.every((t=>(0,h.Hc)(t)))&&this._abortController.abort()})),this._promise.then((t=>(0,a.d9)(t)))}async _makeRequest(t,e){const{data:r}=await(0,o.Z)(t,{responseType:"array-buffer",signal:e});return r}}const W=new Map;function G(t,e){return(0,k.s1)(W,t,(()=>new N(t))).getData(e).then((e=>(W.delete(t),e))).catch((e=>{throw W.delete(t),e}))}class ${constructor(t,e,r){this.tilemap=null,this.tileInfo=null,this.capabilities=null,this.fullExtent=null,this.initialExtent=null,this.name=t,this.sourceUrl=e;const s=(0,c.mN)(this.sourceUrl),i=(0,a.d9)(r),o=i.tiles;if(s)for(let t=0;t<o.length;t++){const e=(0,c.mN)(o[t]);e&&((0,c.YP)(e.path)||(e.path=(0,c.v_)(s.path,e.path)),o[t]=(0,c.fl)(e.path,{...s.query,...e.query}))}this.tileServers=o;const n=r.capabilities&&r.capabilities.split(",").map((t=>t.toLowerCase().trim())),l=!0===r?.exportTilesAllowed,u=!0===n?.includes("tilemap"),h=l&&r.hasOwnProperty("maxExportTilesCount")?r.maxExportTilesCount:0;this.capabilities={operations:{supportsExportTiles:l,supportsTileMap:u},exportTiles:l?{maxExportTilesCount:+h}:null},this.tileInfo=z.Z.fromJSON(i.tileInfo);const p=r.tileMap?(0,c.fl)((0,c.v_)(s.path,r.tileMap),s.query??{}):null;u?(this.type="vector-tile",this.tilemap=new j(new D.y({layer:{parsedUrl:s,tileInfo:this.tileInfo},minLOD:i.minLOD??this.tileInfo.lods[0].level,maxLOD:i.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}),p)):p&&(this.tilemap=new F(p)),this.fullExtent=g.Z.fromJSON(r.fullExtent),this.initialExtent=g.Z.fromJSON(r.initialExtent)}destroy(){this.tilemap?.destroy()}async getRefKey(t,e){return await(this.tilemap?.dataKey(t,e))??t}requestTile(t,e,r,s){return function(t,e,r,s,i){const o=(0,c.mN)(t),n=o.query;if(n)for(const[t,i]of Object.entries(n))switch(i){case"{x}":n[t]=s.toString();break;case"{y}":n[t]=r.toString();break;case"{z}":n[t]=e.toString()}const l=o.path;return G((0,c.fl)(l.replaceAll(/\{z\}/gi,e.toString()).replaceAll(/\{y\}/gi,r.toString()).replaceAll(/\{x\}/gi,s.toString()),{...o.query}),i)}(this.tileServers[e%this.tileServers.length],t,e,r,s)}isCompatibleWith(t){const e=this.tileInfo,r=t.tileInfo;if(!e.spatialReference.equals(r.spatialReference))return!1;if(!e.origin.equals(r.origin))return!1;if(Math.round(e.dpi)!==Math.round(r.dpi))return!1;const s=e.lods,i=r.lods,o=Math.min(s.length,i.length);for(let t=0;t<o;t++){const e=s[t],r=i[t];if(e.level!==r.level||Math.round(e.scale)!==Math.round(r.scale))return!1}return!0}}function H(...t){let e;for(const r of t)if(null!=r)if((0,c.oC)(r)){if(e){const t=e.split("://")[0];e=t+":"+r.trim()}}else e=(0,c.YP)(r)?r:(0,c.v_)(e,r);return e?(0,c.Qj)(e):void 0}async function q(t,e,r,s,i){let n,l,a;if((0,h.k_)(i),"string"==typeof r){const t=(0,c.Fv)(r);a=await(0,o.Z)(t,{...i,responseType:"json",query:{f:"json",...i?.query}}),a.ssl&&(n&&(n=n.replace(/^http:/i,"https:")),l&&(l=l.replace(/^http:/i,"https:"))),n=t,l=t}else null!=r&&(a={data:r},n=r.jsonUrl||null,l=s);const u=a?.data;if(V(u))return t.styleUrl=n||null,async function(t,e,r,s){const i=r?(0,c.Yd)(r):(0,c.L)();t.styleBase=i,t.style=e,e["sprite-format"]&&"webp"===e["sprite-format"].toLowerCase()&&(t.spriteFormat="webp");const o=[];if(e.sources&&e.sources.esri){const r=e.sources.esri;r.url?await q(t,"esri",H(i,r.url),void 0,s):o.push(q(t,"esri",r,i,s))}for(const r of Object.keys(e.sources))"esri"!==r&&"vector"===e.sources[r].type&&(e.sources[r].url?o.push(q(t,r,H(i,e.sources[r].url),void 0,s)):e.sources[r].tiles&&o.push(q(t,r,e.sources[r],i,s)));await Promise.all(o)}(t,u,l,i);if(!V(u))return t.sourceUrl?J(t,u,l,!1,e,i):(t.sourceUrl=n||null,J(t,u,l,!0,e,i));throw new Error("You must specify the URL or the JSON for a service or for a style.")}function K(t){return"object"==typeof t&&!!t&&"tilejson"in t&&null!=t.tilejson}function V(t){return!!t&&"sources"in t&&!!t.sources}async function J(t,e,r,s,i,o){const n=r?(0,c.Qj)(r)+"/":(0,c.L)(),l=function(t){if(t.hasOwnProperty("tileInfo"))return t;const e={xmin:-20037507.067161843,ymin:-20037507.067161843,xmax:20037507.067161843,ymax:20037507.067161843,spatialReference:{wkid:102100}};let r=null;if(K(t)){const{bounds:e}=t;if(e){const t=(0,M.$)({x:e[0],y:e[1],spatialReference:(0,a.d9)(O.Zn)}),s=(0,M.$)({x:e[2],y:e[3],spatialReference:(0,a.d9)(O.Zn)});r={xmin:t.x,ymin:t.y,xmax:s.x,ymax:s.y,spatialReference:(0,a.d9)(O.R_)}}}null===r&&(r=e);let s=78271.51696400007,i=295828763.7957775;const o=[],n=t.hasOwnProperty("minzoom")?+t.minzoom:0,l=t.hasOwnProperty("maxzoom")?+t.maxzoom:22;for(let t=0;t<=l;t++)t>=n&&o.push({level:t,scale:i,resolution:s}),s/=2,i/=2;return{capabilities:"TilesOnly",initialExtent:r,fullExtent:e,minScale:0,maxScale:0,tiles:t.tiles,tileInfo:{rows:512,cols:512,dpi:96,format:"pbf",origin:{x:-20037508.342787,y:20037508.342787},lods:o,spatialReference:(0,a.d9)(O.R_)}}}(e),u=new $(i,(0,c.fl)(n,o?.query??{}),l);if(!s&&t.primarySourceName in t.sourceNameToSource){const e=t.sourceNameToSource[t.primarySourceName];if(!e.isCompatibleWith(u))return;null!=u.fullExtent&&(null!=e.fullExtent?e.fullExtent.union(u.fullExtent):e.fullExtent=u.fullExtent.clone()),e.tileInfo&&u.tileInfo&&e.tileInfo.lods.length<u.tileInfo.lods.length&&(e.tileInfo=u.tileInfo)}if(s&&(t.sourceBase=n,t.source=e,t.validatedSource=l,t.primarySourceName=i),t.sourceNameToSource[i]=u,!K(t)&&"defaultStyles"in e&&!t.style){if(null==e.defaultStyles)throw new Error;return"string"==typeof e.defaultStyles?q(t,"",H(n,e.defaultStyles,"root.json"),void 0,o):q(t,"",e.defaultStyles,H(n,"root.json"),o)}}var Q=r(33516),Y=r(19745),X=r(25929),tt=r(94139),et=r(39450);const rt=1e-6;function st(t,e){if(t===e)return!0;if(null==t&&null!=e)return!1;if(null!=t&&null==e)return!1;if(null==t||null==e)return!1;if(!t.spatialReference.equals(e.spatialReference)||t.dpi!==e.dpi)return!1;const r=t.origin,s=e.origin;if(Math.abs(r.x-s.x)>=rt||Math.abs(r.y-s.y)>=rt)return!1;let i,o;t.lods[0].scale>e.lods[0].scale?(i=t,o=e):(o=t,i=e);for(let t=i.lods[0].scale;t>=o.lods[o.lods.length-1].scale-rt;t/=2)if(Math.abs(t-o.lods[0].scale)<rt)return!0;return!1}function it(t,e){if(t===e)return t;if(null==t&&null!=e)return e;if(null!=t&&null==e)return t;if(null==t||null==e)return null;const r=t.size[0],s=t.format,i=t.dpi,o=new tt.Z({x:t.origin.x,y:t.origin.y}),n=t.spatialReference,l=t.lods[0].scale>e.lods[0].scale?t.lods[0]:e.lods[0],a=t.lods[t.lods.length-1].scale<=e.lods[e.lods.length-1].scale?t.lods[t.lods.length-1]:e.lods[e.lods.length-1],u=l.scale,h=l.resolution,c=a.scale,p=[];let d=u,y=h,m=0;for(;d>c;)p.push(new et.Z({level:m,resolution:y,scale:d})),m++,d/=2,y/=2;return new z.Z({size:[r,r],dpi:i,format:s||"pbf",origin:o,lods:p,spatialReference:n})}var ot=r(51785),nt=r(7575);let lt,at;function ut(t){const e=(0,nt.Sh)(t);for(;e.length>1;){const t=ht(e.shift());if(t.available)return t}return ht(e.shift())}function ht(t){switch(t){case nt.zO.WEBGL1:return lt||(lt=function(){const t=new pt,e=yt(nt.zO.WEBGL1,t);return null==e||(t.supportsElementIndexUint=null!==e.getExtension("OES_element_index_uint"),t.supportsStandardDerivatives=null!==e.getExtension("OES_standard_derivatives"),t.supportsInstancedArrays=null!==e.getExtension("ANGLE_instanced_arrays"),t.supportsTextureFloat=null!==e.getExtension("OES_texture_float"),t.supportsTextureHalfFloat=null!==e.getExtension("OES_texture_half_float"),t.supportsColorBufferFloat=null!==e.getExtension("WEBGL_color_buffer_float"),t.supportsColorBufferFloatBlend=null!==e.getExtension("EXT_float_blend"),t.supportsColorBufferHalfFloat=null!==e.getExtension("EXT_color_buffer_half_float")),t}()),lt;case nt.zO.WEBGL2:return at||(at=function(){const t=new dt,e=yt(nt.zO.WEBGL2,t);return null==e||(t.supportsColorBufferFloat=null!==e.getExtension("EXT_color_buffer_float"),t.supportsColorBufferFloatBlend=null!==e.getExtension("EXT_float_blend"),t.supportsColorBufferHalfFloat=t.supportsColorBufferFloat||null!==e.getExtension("EXT_color_buffer_half_float")),t}()),at}}class ct{constructor(){this.available=!1,this.majorPerformanceCaveat=!1,this.maxTextureSize=0,this.supportsVertexShaderSamplers=!1,this.supportsHighPrecisionFragment=!1,this.supportsElementIndexUint=!1,this.supportsStandardDerivatives=!1,this.supportsInstancedArrays=!1,this.supportsTextureFloat=!1,this.supportsTextureHalfFloat=!1,this.supportsColorBufferFloat=!1,this.supportsColorBufferFloatBlend=!1,this.supportsColorBufferHalfFloat=!1}}class pt extends ct{constructor(){super(...arguments),this.type=nt.zO.WEBGL1}}class dt extends ct{constructor(){super(...arguments),this.type=nt.zO.WEBGL2,this.supportsElementIndexUint=!0,this.supportsStandardDerivatives=!0,this.supportsInstancedArrays=!0,this.supportsTextureFloat=!0,this.supportsTextureHalfFloat=!0}}function yt(t,e){if(t===nt.zO.WEBGL1&&"undefined"==typeof WebGLRenderingContext||t===nt.zO.WEBGL2&&"undefined"==typeof WebGL2RenderingContext)return null;const r=document.createElement("canvas");if(!r)return null;let s=(0,nt.kr)(r,t,{failIfMajorPerformanceCaveat:!0});if(null==s&&(s=(0,nt.kr)(r,t),null!=s&&(e.majorPerformanceCaveat=!0)),null==s)return s;if(t===nt.zO.WEBGL1){const t=s.getParameter(s.VERSION),r=t?.match(/^WebGL\s+([\d.]*)/);if(r){const t=parseFloat(r[1]);e.available=t>=.94}}else e.available=!0;e.maxTextureSize=s.getParameter(s.MAX_TEXTURE_SIZE),e.supportsVertexShaderSamplers=s.getParameter(s.MAX_VERTEX_TEXTURE_IMAGE_UNITS)>0;const i=s.getShaderPrecisionFormat(s.FRAGMENT_SHADER,s.HIGH_FLOAT);return i&&(e.supportsHighPrecisionFragment=i.precision>0),s}let mt=class extends((0,A.h)((0,T.M)((0,S.Z)((0,b.Y)((0,E.q)((0,I.I)((0,x.N)((0,w.V)((0,u.R)(v.Z)))))))))){constructor(...t){super(...t),this._spriteSourceMap=new Map,this.currentStyleInfo=null,this.isReference=null,this.operationalLayerType="VectorTileLayer",this.style=null,this.tilemapCache=null,this.type="vector-tile",this.url=null,this.path=null}normalizeCtorArgs(t,e){return"string"==typeof t?{url:t,...e}:t}destroy(){if(this.sourceNameToSource)for(const t of Object.values(this.sourceNameToSource))t?.destroy();this.primarySource?.destroy(),this._spriteSourceMap.clear()}async prefetchResources(t){await this.loadSpriteSource(globalThis.devicePixelRatio||1,t)}load(t){const e=this.loadFromPortal({supportedTypes:["Vector Tile Service"],supportsData:!1},t).catch(h.r9).then((async()=>{if(!this.portalItem||!this.portalItem.id)return;const e=`${this.portalItem.itemCdnUrl}/resources/styles/root.json`;(await(0,o.Z)(e,{...t,query:{f:"json",...this.customParameters,token:this.apiKey}})).data&&this.read({url:e},(0,Q.h)(this.portalItem))})).catch(h.r9).then((()=>this._loadStyle(t)));return this.addResolvingPromise(e),Promise.resolve(this)}get attributionDataUrl(){const t=this.currentStyleInfo,e=t&&t.serviceUrl&&(0,c.mN)(t.serviceUrl);if(!e)return null;const r=this._getDefaultAttribution(e.path);return r?(0,c.fl)(r,{...this.customParameters,token:this.apiKey}):null}get capabilities(){const t=this.primarySource;return t?t.capabilities:{operations:{supportsExportTiles:!1,supportsTileMap:!1},exportTiles:null}}get fullExtent(){return this.primarySource?.fullExtent||null}get initialExtent(){return this.primarySource?.initialExtent||null}get parsedUrl(){return this.serviceUrl?(0,c.mN)(this.serviceUrl):null}get serviceUrl(){return this.currentStyleInfo&&this.currentStyleInfo.serviceUrl||null}get spatialReference(){return this.tileInfo?.spatialReference??null}get styleUrl(){return this.currentStyleInfo&&this.currentStyleInfo.styleUrl||null}writeStyleUrl(t,e){t&&(0,c.oC)(t)&&(t=`https:${t}`);const r=(0,Y.a)(t);e.styleUrl=(0,X.e)(t,r)}get tileInfo(){const t=[];for(const e in this.sourceNameToSource)t.push(this.sourceNameToSource[e]);let e=this.primarySource?.tileInfo||new z.Z;if(t.length>1)for(let r=0;r<t.length;r++)st(e,t[r].tileInfo)&&(e=it(e,t[r].tileInfo));return e}readTilemapCache(t,e){const r=e.capabilities?.includes("Tilemap");return r?new D.y({layer:this}):null}readVersion(t,e){return e.version?parseFloat(e.version):parseFloat(e.currentVersion)}get backgroundColor(){const t=this.getPaintProperties("background")?.["background-color"];if("string"==typeof t){const e=i.Z.toUnitRGBA(i.Z.fromHex(t));if(e)return(0,f.f)(e[0]||0,e[1]||0,e[2]||0)}else if("object"==typeof t&&t.stops?.length>0)return[t.stops[0][1][0],t.stops[0][1][1],t.stops[0][1][2]];return null}async loadSpriteSource(t=1,e){if(!this._spriteSourceMap.has(t)){const r=ut("2d").maxTextureSize,s=this.currentStyleInfo?.spriteUrl?(0,c.fl)(this.currentStyleInfo.spriteUrl,{...this.customParameters,token:this.apiKey}):null,i=new P({type:"url",spriteUrl:s,pixelRatio:t,spriteFormat:this.currentStyleInfo?.spriteFormat},r);await i.load(e),this._spriteSourceMap.set(t,i)}return this._spriteSourceMap.get(t)}async setSpriteSource(t,e){if(!t)return null;const r=ut("2d").maxTextureSize,s=t.spriteUrl,i=s?(0,c.fl)(s,{...this.customParameters,token:this.apiKey}):null;if(!i&&"url"===t.type)return null;const o=new P(t,r);try{await o.load(e);const r=t.pixelRatio||1;return this._spriteSourceMap.clear(),this._spriteSourceMap.set(r,o),i&&this.currentStyleInfo&&(this.currentStyleInfo.spriteUrl=i),this.emit("spriteSource-change",{spriteSource:o}),o}catch(t){(0,h.r9)(t)}return null}async loadStyle(t,e){const r=t||this.style||this.url;return this._loadingTask&&"string"==typeof r&&this.url===r||(this._loadingTask?.abort(),this._loadingTask=(0,n.vr)((t=>(this._spriteSourceMap.clear(),this._getSourceAndStyle(r,{signal:t}))),e)),this._loadingTask.promise}getStyleLayerId(t){return this.styleRepository.getStyleLayerId(t)}getStyleLayerIndex(t){return this.styleRepository.getStyleLayerIndex(t)}getPaintProperties(t){return(0,a.d9)(this.styleRepository?.getPaintProperties(t))}setPaintProperties(t,e){const r=this.styleRepository.isPainterDataDriven(t);this.styleRepository.setPaintProperties(t,e);const s=this.styleRepository.isPainterDataDriven(t);this.emit("paint-change",{layer:t,paint:e,isDataDriven:r||s})}getStyleLayer(t){return(0,a.d9)(this.styleRepository.getStyleLayer(t))}setStyleLayer(t,e){this.styleRepository.setStyleLayer(t,e),this.emit("style-layer-change",{layer:t,index:e})}deleteStyleLayer(t){this.styleRepository.deleteStyleLayer(t),this.emit("delete-style-layer",{layer:t})}getLayoutProperties(t){return(0,a.d9)(this.styleRepository.getLayoutProperties(t))}setLayoutProperties(t,e){this.styleRepository.setLayoutProperties(t,e),this.emit("layout-change",{layer:t,layout:e})}setStyleLayerVisibility(t,e){this.styleRepository.setStyleLayerVisibility(t,e),this.emit("style-layer-visibility-change",{layer:t,visibility:e})}getStyleLayerVisibility(t){return this.styleRepository.getStyleLayerVisibility(t)}write(t,e){return e?.origin&&!this.styleUrl?(e.messages&&e.messages.push(new l.Z("vectortilelayer:unsupported",`VectorTileLayer (${this.title}, ${this.id}) with style defined by JSON only are not supported`,{layer:this})),null):super.write(t,e)}getTileUrl(t,e,r){return null}async _getSourceAndStyle(t,e){if(!t)throw new Error("invalid style!");const r=await async function(t,e){const r={source:null,sourceBase:null,sourceUrl:null,validatedSource:null,style:null,styleBase:null,styleUrl:null,sourceNameToSource:{},primarySourceName:"",spriteFormat:"png"},[s,i]="string"==typeof t?[t,null]:[null,t.jsonUrl];return await q(r,"esri",t,i,e),{layerDefinition:r.validatedSource,url:s,serviceUrl:r.sourceUrl,style:r.style,styleUrl:r.styleUrl,spriteUrl:r.style.sprite&&H(r.styleBase,r.style.sprite),spriteFormat:r.spriteFormat,glyphsUrl:r.style.glyphs&&H(r.styleBase,r.style.glyphs),sourceNameToSource:r.sourceNameToSource,primarySourceName:r.primarySourceName}}(t,{...e,query:{...this.customParameters,token:this.apiKey}});"webp"===r.spriteFormat&&(await function(t){if(L)return L;const e={lossy:"UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",lossless:"UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",animation:"UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"};return L=new Promise((t=>{const r=new Image;r.onload=()=>{r.onload=r.onerror=null,t(r.width>0&&r.height>0)},r.onerror=()=>{r.onload=r.onerror=null,t(!1)},r.src="data:image/webp;base64,"+e.lossy})),L}()||(r.spriteFormat="png")),this._set("currentStyleInfo",{...r}),"string"==typeof t?(this.url=t,this.style=null):(this.url=null,this.style=t),this._set("sourceNameToSource",r.sourceNameToSource),this._set("primarySource",r.sourceNameToSource[r.primarySourceName]),this._set("styleRepository",new ot.Z(r.style)),this.read(r.layerDefinition,{origin:"service"}),this.emit("load-style")}_getDefaultAttribution(t){const e=t.match(/^https?:\/\/(?:basemaps|basemapsbeta|basemapsdev)(?:-api)?\.arcgis\.com(\/[^\/]+)?\/arcgis\/rest\/services\/([^\/]+(\/[^\/]+)*)\/vectortileserver/i),r=["OpenStreetMap_v2","OpenStreetMap_Daylight_v2","OpenStreetMap_Export_v2","OpenStreetMap_FTS_v2","OpenStreetMap_GCS_v2","World_Basemap","World_Basemap_v2","World_Basemap_Export_v2","World_Basemap_GCS_v2","World_Basemap_WGS84","World_Contours_v2"];if(!e)return;const s=e[2]&&e[2].toLowerCase();if(!s)return;const i=e[1]||"";for(const t of r)if(t.toLowerCase().includes(s))return(0,c.Fv)(`//static.arcgis.com/attribution/Vector${i}/${t}`)}async _loadStyle(t){return this._loadingTask?.promise??this.loadStyle(null,t)}};(0,s._)([(0,p.Cb)({readOnly:!0})],mt.prototype,"attributionDataUrl",null),(0,s._)([(0,p.Cb)({type:["show","hide"]})],mt.prototype,"listMode",void 0),(0,s._)([(0,p.Cb)({json:{read:!0,write:!0}})],mt.prototype,"blendMode",void 0),(0,s._)([(0,p.Cb)({readOnly:!0,json:{read:!1}})],mt.prototype,"capabilities",null),(0,s._)([(0,p.Cb)({readOnly:!0})],mt.prototype,"currentStyleInfo",void 0),(0,s._)([(0,p.Cb)({json:{read:!1},readOnly:!0,type:g.Z})],mt.prototype,"fullExtent",null),(0,s._)([(0,p.Cb)({json:{read:!1},readOnly:!0,type:g.Z})],mt.prototype,"initialExtent",null),(0,s._)([(0,p.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],mt.prototype,"isReference",void 0),(0,s._)([(0,p.Cb)({type:["VectorTileLayer"]})],mt.prototype,"operationalLayerType",void 0),(0,s._)([(0,p.Cb)({readOnly:!0})],mt.prototype,"parsedUrl",null),(0,s._)([(0,p.Cb)()],mt.prototype,"style",void 0),(0,s._)([(0,p.Cb)({readOnly:!0})],mt.prototype,"serviceUrl",null),(0,s._)([(0,p.Cb)({type:_.Z,readOnly:!0})],mt.prototype,"spatialReference",null),(0,s._)([(0,p.Cb)({readOnly:!0})],mt.prototype,"styleRepository",void 0),(0,s._)([(0,p.Cb)({readOnly:!0})],mt.prototype,"sourceNameToSource",void 0),(0,s._)([(0,p.Cb)({readOnly:!0})],mt.prototype,"primarySource",void 0),(0,s._)([(0,p.Cb)({type:String,readOnly:!0,json:{write:{ignoreOrigin:!0},origins:{"web-document":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],mt.prototype,"styleUrl",null),(0,s._)([(0,m.c)(["portal-item","web-document"],"styleUrl")],mt.prototype,"writeStyleUrl",null),(0,s._)([(0,p.Cb)({json:{read:!1,origins:{service:{read:!1}}},readOnly:!0,type:z.Z})],mt.prototype,"tileInfo",null),(0,s._)([(0,p.Cb)()],mt.prototype,"tilemapCache",void 0),(0,s._)([(0,d.r)("service","tilemapCache",["capabilities","tileInfo"])],mt.prototype,"readTilemapCache",null),(0,s._)([(0,p.Cb)({json:{read:!1},readOnly:!0,value:"vector-tile"})],mt.prototype,"type",void 0),(0,s._)([(0,p.Cb)({json:{origins:{"web-document":{read:{source:"styleUrl"}},"portal-item":{read:{source:"url"}}},write:!1,read:!1}})],mt.prototype,"url",void 0),(0,s._)([(0,p.Cb)({readOnly:!0})],mt.prototype,"version",void 0),(0,s._)([(0,d.r)("version",["version","currentVersion"])],mt.prototype,"readVersion",null),(0,s._)([(0,p.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],mt.prototype,"path",void 0),(0,s._)([(0,p.Cb)()],mt.prototype,"backgroundColor",null),mt=(0,s._)([(0,y.j)("esri.layers.VectorTileLayer")],mt);const ft=mt},54295:(t,e,r)=>{r.d(e,{V:()=>n});var s=r(43697),i=r(5600),o=(r(75215),r(67676),r(80442),r(52011));const n=t=>{let e=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(t){null!=t?this._override("apiKey",t):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,s._)([(0,i.Cb)({type:String})],e.prototype,"apiKey",null),e=(0,s._)([(0,o.j)("esri.layers.mixins.APIKeyMixin")],e),e}},17017:(t,e,r)=>{r.d(e,{N:()=>n});var s=r(43697),i=r(5600),o=(r(75215),r(67676),r(80442),r(52011));const n=t=>{let e=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,s._)([(0,i.Cb)({type:Object,json:{write:{overridePolicy:t=>({enabled:!!(t&&Object.keys(t).length>0)})}}})],e.prototype,"customParameters",void 0),e=(0,s._)([(0,o.j)("esri.layers.mixins.CustomParametersMixin")],e),e}},16859:(t,e,r)=>{r.d(e,{I:()=>b});var s=r(43697),i=r(68773),o=r(40330),n=r(3172),l=r(66643),a=r(20102),u=r(92604),h=r(70586),c=r(95330),p=r(17452),d=r(5600),y=(r(75215),r(67676),r(80442),r(71715)),m=r(52011),f=r(30556),g=r(84230),_=r(48522),v=r(15235),w=r(86082),S=r(14661);const b=t=>{let e=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,h.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(t){t!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",t))}readPortalItem(t,e,r){if(e.itemId)return new v.default({id:e.itemId,portal:r&&r.portal})}writePortalItem(t,e){t&&t.id&&(e.itemId=t.id)}async loadFromPortal(t,e){if(this.portalItem&&this.portalItem.id)try{const{load:s}=await r.e(8062).then(r.bind(r,18062));return(0,c.k_)(e),await s({instance:this,supportedTypes:t.supportedTypes,validateItem:t.validateItem,supportsData:t.supportsData,layerModuleTypeMap:t.layerModuleTypeMap},e)}catch(t){throw(0,c.D_)(t)||u.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${t}`),t}}async finishLoadEditablePortalLayer(t){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(t).catch((t=>((0,c.r9)(t),!0))))}async setUserPrivileges(t,e){if(!i.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(e);if(this.url)try{const{features:{edit:r,fullEdit:s},content:{updateItem:i}}=await this._fetchUserPrivileges(t,e);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",i)}catch(t){(0,c.r9)(t)}}async _fetchUserPrivileges(t,e){let r=this.portalItem;if(!t||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(e);const s=t===r.id;if(s&&r.portal.user)return(0,S.Ss)(r);let i,n;if(s)i=r.portal.url;else try{i=await(0,g.oP)(this.url,e)}catch(t){(0,c.r9)(t)}if(!i||!(0,p.Zo)(i,r.portal.url))return this._fetchFallbackUserPrivileges(e);try{const t=null!=e?e.signal:null;n=await(o.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:t}))}catch(t){(0,c.r9)(t)}if(!n)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(s?await r.reload():(r=new v.default({id:t,portal:{url:i}}),await r.load(e)),r.portal.user)return(0,S.Ss)(r)}catch(t){(0,c.r9)(t)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(t){let e=!0;try{e=await this._fetchUserHasEditingPrivileges(t)}catch(t){(0,c.r9)(t)}return{features:{edit:e,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(t){const e=this.url?o.id?.findCredential(this.url):null;if(!e)return!0;const r=A.credential===e?A.user:await this._fetchEditingUser(t);return A.credential=e,A.user=r,null==r||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(t){const e=this.portalItem?.portal?.user;if(e)return e;const r=o.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const s=`${r.owningSystemUrl}/sharing/rest`,i=_.Z.getDefault();if(i&&i.loaded&&(0,p.Fv)(i.restUrl)===(0,p.Fv)(s))return i.user;const a=`${s}/community/self`,u=null!=t?t.signal:null,h=await(0,l.q6)((0,n.Z)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return h.ok?w.Z.fromJSON(h.value.data):null}read(t,e){e&&(e.layer=this),super.read(t,e)}write(t,e){const r=e&&e.portal,s=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||_.Z.getDefault());return r&&s&&!(0,p.tm)(s.restUrl,r.restUrl)?(e.messages&&e.messages.push(new a.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(t,{...e,layer:this})}};return(0,s._)([(0,d.Cb)({type:v.default})],e.prototype,"portalItem",null),(0,s._)([(0,y.r)("web-document","portalItem",["itemId"])],e.prototype,"readPortalItem",null),(0,s._)([(0,f.c)("web-document","portalItem",{itemId:{type:String}})],e.prototype,"writePortalItem",null),(0,s._)([(0,d.Cb)({clonable:!1})],e.prototype,"resourceReferences",void 0),(0,s._)([(0,d.Cb)({type:Boolean,readOnly:!0})],e.prototype,"userHasEditingPrivileges",void 0),(0,s._)([(0,d.Cb)({type:Boolean,readOnly:!0})],e.prototype,"userHasFullEditingPrivileges",void 0),(0,s._)([(0,d.Cb)({type:Boolean,readOnly:!0})],e.prototype,"userHasUpdateItemPrivileges",void 0),e=(0,s._)([(0,m.j)("esri.layers.mixins.PortalLayer")],e),e},A={credential:null,user:null}},33516:(t,e,r)=>{r.d(e,{Y:()=>n,h:()=>o});var s=r(17452),i=r(48522);function o(t){return{origin:"portal-item",url:(0,s.mN)(t.itemUrl),portal:t.portal||i.Z.getDefault(),portalItem:t,readResourcePaths:[]}}function n(t){return{origin:"portal-item",messages:[],writtenProperties:[],url:t.itemUrl?(0,s.mN)(t.itemUrl):null,portal:t.portal||i.Z.getDefault(),portalItem:t}}},15512:(t,e,r)=>{r.d(e,{By:()=>s,_4:()=>i,pt:()=>o});const s="system",i="unknown",o="UTC"},55415:(t,e,r)=>{r.d(e,{Z:()=>i});var s=r(71143);class i{static getId(t,e,r,s){return"object"==typeof t?`${t.level}/${t.row}/${t.col}/${t.world}`:`${t}/${e}/${r}/${s}`}constructor(t,e,r,s){this.set(t,e,r,s)}get key(){return this}get id(){return this.toString()}set id(t){this.set(t)}get hash(){const t=4095&this.row,e=4095&this.col,r=63&this.level;return(3&this.world)<<30|e<<22|t<<8|r}acquire(t,e,r,s){this.set(t,e,r,s)}contains(t){const e=t.level-this.level;return e>=0&&this.row===t.row>>e&&this.col===t.col>>e&&this.world===t.world}equals(t){return this.level===t.level&&this.row===t.row&&this.col===t.col&&this.world===t.world}clone(){return new i(this)}release(){this.level=0,this.row=0,this.col=0,this.world=0}set(t,e,r,s){if(null==t)this.level=0,this.row=0,this.col=0,this.world=0;else if("object"==typeof t)this.level=t.level||0,this.row=t.row||0,this.col=t.col||0,this.world=t.world||0;else if("string"==typeof t){const[e,r,s,i]=t.split("/");this.level=parseFloat(e),this.row=parseFloat(r),this.col=parseFloat(s),this.world=parseFloat(i)}else this.level=+t,this.row=+e,this.col=+r,this.world=+s||0;return this}toString(){return`${this.level}/${this.row}/${this.col}/${this.world}`}getParentKey(){return this.level<=0?null:new i(this.level-1,this.row>>1,this.col>>1,this.world)}getChildKeys(){const t=this.level+1,e=this.row<<1,r=this.col<<1,s=this.world;return[new i(t,e,r,s),new i(t,e,r+1,s),new i(t,e+1,r,s),new i(t,e+1,r+1,s)]}compareRowMajor(t){return this.row<t.row?-1:this.row>t.row?1:this.col<t.col?-1:this.col>t.col?1:0}}i.pool=new s.Z(i,null,null,25,50)},7575:(t,e,r)=>{r.d(e,{Sh:()=>n,kr:()=>o,zO:()=>s});var s,i=r(80442);function o(t,e,r={}){const i=e===s.WEBGL1?["webgl","experimental-webgl","webkit-3d","moz-webgl"]:["webgl2"];for(const e of i){const s=t.getContext(e,r);if(s)return s}return null}function n(t){if("3d"===t)return[s.WEBGL2];const e=(0,i.Z)("esri-force-webgl");return e===s.WEBGL1||e===s.WEBGL2?[e]:(0,i.Z)("mac")&&(0,i.Z)("chrome")?[s.WEBGL1,s.WEBGL2]:[s.WEBGL2,s.WEBGL1]}!function(t){t[t.WEBGL1=1]="WEBGL1",t[t.WEBGL2=2]="WEBGL2"}(s||(s={}))}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5481],{92835:(t,e,r)=>{r.d(e,{Z:()=>y});var s,i=r(43697),o=r(96674),n=r(35463),l=r(5600),a=(r(75215),r(67676),r(80442),r(71715)),u=r(52011),h=r(30556);let c=s=class extends o.wq{static get allTime(){return p}static get empty(){return d}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?.getTime()??null}get isAllTime(){return this.equals(s.allTime)}get isEmpty(){return this.equals(s.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?.getTime()??null}clone(){return new s({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,s=t.start?.getTime()??t.start,i=t.end?.getTime()??t.end;return e===s&&r===i}expandTo(t,e="system"){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,n.JE)(r,t,e));let i=this.end;if(i){const r=(0,n.JE)(i,t,e);i=i.getTime()===r.getTime()?r:(0,n.Nm)(r,1,t,e)}return new s({start:r,end:i})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return s.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,i=t.start?.getTime()??-1/0,o=t.end?.getTime()??1/0;let n,l;if(i>=e&&i<=r?n=i:e>=i&&e<=o&&(n=e),r>=i&&r<=o?l=r:o>=e&&o<=r&&(l=o),null!=n&&null!=l&&!isNaN(n)&&!isNaN(l)){const t=new s;return t.start=n===-1/0?null:new Date(n),t.end=l===1/0?null:new Date(l),t}return s.empty}offset(t,e,r="system"){if(this.isEmpty||this.isAllTime)return this.clone();const i=new s,{start:o,end:l}=this;return null!=o&&(i.start=(0,n.Nm)(o,t,e,r)),null!=l&&(i.end=(0,n.Nm)(l,t,e,r)),i}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return p.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,r=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new s({start:e,end:r})}};(0,i._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,i._)([(0,a.r)("end")],c.prototype,"readEnd",null),(0,i._)([(0,h.c)("end")],c.prototype,"writeEnd",null),(0,i._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,i._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,i._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,i._)([(0,a.r)("start")],c.prototype,"readStart",null),(0,i._)([(0,h.c)("start")],c.prototype,"writeStart",null),c=s=(0,i._)([(0,u.j)("esri.TimeExtent")],c);const p=new c,d=new c({start:void 0,end:void 0}),y=c},10699:(t,e,r)=>{r.d(e,{IG:()=>n,iv:()=>l});var s=r(43697),i=r(52011);let o=0;const n=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+o++})}};return e=(0,s._)([(0,i.j)("esri.core.Identifiable")],e),e},l=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:o++})}};return e=(0,s._)([(0,i.j)("esri.core.NumericIdentifiable")],e),e};let a=class extends(n(class{})){};a=(0,s._)([(0,i.j)("esri.core.Identifiable")],a)},13867:(t,e,r)=>{r.d(e,{z:()=>i});var s=r(69801);class i{constructor(t,e){this._storage=new s.WJ,this.id="",this.name="",this.size=0,this._storage.maxSize=t,this._storage.register(this),e&&this._storage.registerRemoveFunc("",e)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(t,e,r=1){this._storage.put(this,t,e,r,1)}pop(t){return this._storage.pop(this,t)}get(t){return this._storage.get(this,t)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}resetHitRate(){}}},69801:(t,e,r)=>{r.d(e,{WJ:()=>l,Xq:()=>n});var s,i,o=r(44553);(i=s||(s={}))[i.ALL=0]="ALL",i[i.SOME=1]="SOME";class n{constructor(t,e,r){this.name=t,this._storage=e,this.id=a+++":",this.size=0,this.maxSize=0,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),r&&(this._storage.registerRemoveFunc(this.id,r),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get sizeAll(){return this._storage.size}resetHitRate(){this._hit=this._miss=0}put(t,e,r,s=0){this._storage.put(this,t,e,r,s)}get(t){const e=this._storage.get(this,t);return void 0===e?++this._miss:++this._hit,e}peek(t){return this._storage.peek(this,t)}pop(t){const e=this._storage.pop(this,t);return void 0===e?++this._miss:++this._hit,e}updateSize(t,e,r){this._storage.updateSize(this,t,e,r)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class l{get size(){return this._size}constructor(t=10485760){this._maxSize=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new o.Z,this._users=new o.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(t){this._users.push(t)}deregister(t){this._users.removeUnordered(t)}registerRemoveFunc(t,e){this._removeFuncs.push([t,e])}deregisterRemoveFunc(t){this._removeFuncs.filterInPlace((e=>e[0]!==t))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize=Math.max(t,0),this._checkSizeLimits()}put(t,e,r,i,o){e=t.id+e;const n=this._db.get(e);if(n&&(this._size-=n.size,t.size-=n.size,this._db.delete(e),n.entry!==r&&this._notifyRemove(e,n.entry,s.ALL)),i>this._maxSize)return void this._notifyRemove(e,r,s.ALL);if(void 0===r)return void console.warn("Refusing to cache undefined entry ");if(!i||i<0)return void console.warn(`Refusing to cache entry with size ${i} for key ${e}`);const l=1+Math.max(o,-3)- -3;this._db.set(e,{entry:r,size:i,lifetime:l,lives:l}),this._size+=i,t.size+=i,this._checkSizeLimits()}updateSize(t,e,r,i){e=t.id+e;const o=this._db.get(e);if(o&&o.entry===r){for(this._size-=o.size,t.size-=o.size;i>this._maxSize;){const t=this._notifyRemove(e,r,s.SOME);if(!(null!=t&&t>0))return void this._db.delete(e);i=t}o.size=i,this._size+=i,t.size+=i,this._checkSizeLimits()}}pop(t,e){e=t.id+e;const r=this._db.get(e);if(r)return this._size-=r.size,t.size-=r.size,this._db.delete(e),++this._hit,r.entry;++this._miss}get(t,e){e=t.id+e;const r=this._db.get(e);if(void 0!==r)return this._db.delete(e),r.lives=r.lifetime,this._db.set(e,r),++this._hit,r.entry;++this._miss}peek(t,e){const r=this._db.get(t.id+e);return r?++this._hit:++this._miss,r?.entry}get performanceInfo(){const t={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},e={},r=new Array;this._db.forEach(((t,s)=>{const i=t.lifetime;r[i]=(r[i]||0)+t.size,this._users.forAll((r=>{const{id:i,name:o}=r;if(s.startsWith(i)){const r=e[o]||0;e[o]=r+t.size}}))}));const s={};this._users.forAll((t=>{const r=t.name;if("hitRate"in t&&"number"==typeof t.hitRate&&!isNaN(t.hitRate)&&t.hitRate>0){const i=e[r]||0;e[r]=i,s[r]=Math.round(100*t.hitRate)+"%"}else s[r]="0%"}));const i=Object.keys(e);i.sort(((t,r)=>e[r]-e[t])),i.forEach((r=>t[r]=Math.round(e[r]/2**20)+"MB / "+s[r]));for(let e=r.length-1;e>=0;--e){const s=r[e];s&&(t["Priority "+(e+-3-1)]=Math.round(s/this._size*100)+"%")}return t}resetStats(){this._hit=this._miss=0,this._users.forAll((t=>t.resetHitRate()))}clear(t){const e=t.id;this._db.forEach(((t,r)=>{r.startsWith(e)&&(this._size-=t.size,this._db.delete(r),this._notifyRemove(r,t.entry,s.ALL))})),t.size=0}clearAll(){this._db.forEach(((t,e)=>this._notifyRemove(e,t.entry,s.ALL))),this._users.forEach((t=>t.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(t,e,r){let s;return this._removeFuncs.some((i=>{if(t.startsWith(i[0])){const t=i[1](e,r);return"number"==typeof t&&(s=t),!0}return!1})),s}_checkSizeLimits(){if(this._size>this._maxSize)for(const[t,e]of this._db)if(this._purgeItem(t,e),this._size<=.9*this.maxSize)return;this._users.forEach((t=>{if(t.maxSize>0&&t.size>t.maxSize)for(const[e,r]of this._db)if(e.startsWith(t.id)&&(this._purgeItem(e,r,t),t.size<=.9*t.maxSize))return}))}_purgeItem(t,e,r=this._users.find((e=>t.startsWith(e.id)))){if(this._db.delete(t),e.lives<=1){this._size-=e.size,r&&(r.size-=e.size);const i=this._notifyRemove(t,e.entry,s.SOME);null!=i&&i>0&&(this._size+=i,r&&(r.size+=i),e.lives=e.lifetime,e.size=i,this._db.set(t,e))}else--e.lives,this._db.set(t,e)}}let a=0},17445:(t,e,r)=>{r.d(e,{N1:()=>p,YP:()=>a,Z_:()=>m,gx:()=>u,nn:()=>f,on:()=>c,tX:()=>g}),r(66643),r(46791);var s=r(91460),i=r(50758),o=r(70586),n=r(95330),l=r(26258);function a(t,e,r={}){return h(t,e,r,d)}function u(t,e,r={}){return h(t,e,r,y)}function h(t,e,r={},s){let i=null;const n=r.once?(t,r)=>{s(t)&&((0,o.hw)(i),e(t,r))}:(t,r)=>{s(t)&&e(t,r)};if(i=(0,l.aQ)(t,n,r.sync,r.equals),r.initial){const e=t();n(e,e)}return i}function c(t,e,r,n={}){let l=null,u=null,h=null;function c(){l&&u&&(u.remove(),n.onListenerRemove?.(l),l=null,u=null)}function p(t){n.once&&n.once&&(0,o.hw)(h),r(t)}const d=a(t,((t,r)=>{c(),(0,s.vT)(t)&&(l=t,u=(0,s.on)(t,e,p),n.onListenerAdd?.(t))}),{sync:n.sync,initial:!0});return h=(0,i.kB)((()=>{d.remove(),c()})),h}function p(t,e){return function(t,e,r){if((0,n.Hc)(r))return Promise.reject((0,n.zE)());const s=t();if(e?.(s))return Promise.resolve(s);let l=null;function a(){l=(0,o.hw)(l)}return new Promise(((s,o)=>{l=(0,i.AL)([(0,n.fu)(r,(()=>{a(),o((0,n.zE)())})),h(t,(t=>{a(),s(t)}),{sync:!1,once:!0},e??d)])}))}(t,y,e)}function d(t){return!0}function y(t){return!!t}r(87538);const m={sync:!0},f={initial:!0},g={sync:!0,initial:!0}},35463:(t,e,r)=>{r.d(e,{JE:()=>l,Nm:()=>n,rJ:()=>a});var s=r(90344),i=r(17126);const o={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8};function n(t,e,r,o="system"){const n=new i.vF((0,s.f1)(o)),l=i.ou.fromJSDate(t,{zone:n}),a="decades"===r||"centuries"===r?"year":u(r);return"decades"===r&&(e*=10),"centuries"===r&&(e*=100),l.plus({[a]:e}).toJSDate()}function l(t,e,r="system"){const o=new i.vF((0,s.f1)(r)),n=i.ou.fromJSDate(t,{zone:o});if("decades"===e||"centuries"===e){const t=n.startOf("year"),{year:r}=t,s=r-r%("decades"===e?10:100);return t.set({year:s}).toJSDate()}const l=u(e);return n.startOf(l).toJSDate()}function a(t,e,r){return 0===t?0:t*o[e]/o[r]}function u(t){switch(t){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}},90344:(t,e,r)=>{r.d(e,{Xr:()=>y,Ze:()=>_,f1:()=>w,p6:()=>v});var s=r(35454),i=r(70171),o=r(15512);r(17126);const n=Intl.DateTimeFormat().resolvedOptions().timeZone,l=(o.pt,{year:"numeric",month:"numeric",day:"numeric"}),a={year:"numeric",month:"long",day:"numeric"},u={year:"numeric",month:"short",day:"numeric"},h={year:"numeric",month:"long",weekday:"long",day:"numeric"},c={hour:"numeric",minute:"numeric"},p={...c,second:"numeric"},d={"short-date":l,"short-date-short-time":{...l,...c},"short-date-short-time-24":{...l,...c,hour12:!1},"short-date-long-time":{...l,...p},"short-date-long-time-24":{...l,...p,hour12:!1},"short-date-le":l,"short-date-le-short-time":{...l,...c},"short-date-le-short-time-24":{...l,...c,hour12:!1},"short-date-le-long-time":{...l,...p},"short-date-le-long-time-24":{...l,...p,hour12:!1},"long-month-day-year":a,"long-month-day-year-short-time":{...a,...c},"long-month-day-year-short-time-24":{...a,...c,hour12:!1},"long-month-day-year-long-time":{...a,...p},"long-month-day-year-long-time-24":{...a,...p,hour12:!1},"day-short-month-year":u,"day-short-month-year-short-time":{...u,...c},"day-short-month-year-short-time-24":{...u,...c,hour12:!1},"day-short-month-year-long-time":{...u,...p},"day-short-month-year-long-time-24":{...u,...p,hour12:!1},"long-date":h,"long-date-short-time":{...h,...c},"long-date-short-time-24":{...h,...c,hour12:!1},"long-date-long-time":{...h,...p},"long-date-long-time-24":{...h,...p,hour12:!1},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":c,"long-time":p},y=(0,s.w)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),m={ar:"ar-u-nu-latn-ca-gregory"};let f=new WeakMap;const g=d["short-date-short-time"];function _(t){return d[t]}function v(t,e=g){return function(t){let e=f.get(t);if(!e){const r=(0,i.Kd)(),s=m[r]||r,n=w(t.timeZone??o.By),l={...t,timeZone:n};e=new Intl.DateTimeFormat(s,l),f.set(t,e)}return e}(e).format(t)}function w(t){switch(t){case o.By:return n;case o._4:return o.pt;default:return t}}(0,i.Ze)((()=>{f=new WeakMap}))},87085:(t,e,r)=>{r.d(e,{Z:()=>v});var s=r(43697),i=(r(66577),r(3172)),o=r(20102),n=r(32448),l=r(10699),a=r(83379),u=r(92604),h=r(95330),c=r(17452),p=r(5600),d=(r(75215),r(67676),r(80442),r(52011)),y=r(68773),m=r(6570),f=r(82971);let g=0,_=class extends(n.Z.EventedMixin((0,l.IG)(a.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new m.Z(-180,-90,180,90,f.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+g++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=f.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(t){const e="string"==typeof t?{url:t}:t;return(await r.e(3529).then(r.bind(r,63529))).fromUrl(e)}static fromPortalItem(t){return async function(t){const e="portalItem"in t?t:{portalItem:t},{fromItem:s}=await r.e(8008).then(r.bind(r,28008));try{return await s(e)}catch(t){const r=e&&e.portalItem,s=r&&r.id||"unset",i=r&&r.portal&&r.portal.url||y.default.portalUrl;throw u.Z.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+i+"', id: '"+s+"')",t),t}}(t)}initialize(){this.when().catch((t=>{(0,h.D_)(t)||u.Z.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:t})}))}destroy(){const t=this.parent;if(t){const e=this;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"referenceLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e),this._set("parent",null)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,c.mN)(this.url)}async fetchAttributionData(){const t=this.attributionDataUrl;if(this.hasAttributionData&&t)return(await(0,i.Z)(t,{query:{f:"json"},responseType:"json"})).data;throw new o.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,s._)([(0,p.Cb)({type:String})],_.prototype,"attributionDataUrl",void 0),(0,s._)([(0,p.Cb)({type:m.Z})],_.prototype,"fullExtent",void 0),(0,s._)([(0,p.Cb)({readOnly:!0})],_.prototype,"hasAttributionData",null),(0,s._)([(0,p.Cb)({type:String,clonable:!1})],_.prototype,"id",void 0),(0,s._)([(0,p.Cb)({type:Boolean,nonNullable:!0})],_.prototype,"legendEnabled",void 0),(0,s._)([(0,p.Cb)({type:["show","hide","hide-children"]})],_.prototype,"listMode",void 0),(0,s._)([(0,p.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],_.prototype,"opacity",void 0),(0,s._)([(0,p.Cb)({clonable:!1})],_.prototype,"parent",void 0),(0,s._)([(0,p.Cb)({readOnly:!0})],_.prototype,"parsedUrl",null),(0,s._)([(0,p.Cb)({type:Boolean,readOnly:!0})],_.prototype,"persistenceEnabled",void 0),(0,s._)([(0,p.Cb)({type:Boolean})],_.prototype,"popupEnabled",void 0),(0,s._)([(0,p.Cb)({type:Boolean})],_.prototype,"attributionVisible",void 0),(0,s._)([(0,p.Cb)({type:f.Z})],_.prototype,"spatialReference",void 0),(0,s._)([(0,p.Cb)({type:String})],_.prototype,"title",void 0),(0,s._)([(0,p.Cb)({readOnly:!0,json:{read:!1}})],_.prototype,"type",void 0),(0,s._)([(0,p.Cb)()],_.prototype,"url",void 0),(0,s._)([(0,p.Cb)({type:Boolean,nonNullable:!0})],_.prototype,"visible",void 0),_=(0,s._)([(0,d.j)("esri.layers.Layer")],_);const v=_},94756:(t,e,r)=>{r.r(e),r.d(e,{default:()=>ft});var s=r(43697),i=r(22303),o=r(3172),n=r(66643),l=r(20102),a=r(22974),u=r(16453),h=r(95330),c=r(17452),p=r(5600),d=(r(75215),r(71715)),y=r(52011),m=r(30556),f=r(65617),g=r(6570),_=r(82971),v=r(87085),w=r(54295),S=r(46486),b=r(17287),A=r(71612),x=r(17017),E=r(38009),I=r(16859),T=r(72965);let L=null;var R=r(92604),C=r(1533);class P{constructor(t,e){this._spriteSource=t,this._maxTextureSize=e,this.devicePixelRatio=1,this._spriteImageFormat="png",this._isRetina=!1,this._spritesData={},this.image=null,this.width=null,this.height=null,this.loadStatus="not-loaded","url"===t.type&&t.spriteFormat&&(this._spriteImageFormat=t.spriteFormat),t.pixelRatio&&(this.devicePixelRatio=t.pixelRatio),this.baseURL=t.spriteUrl}get spriteNames(){const t=[];for(const e in this._spritesData)t.push(e);return t.sort(),t}getSpriteInfo(t){return this._spritesData?this._spritesData[t]:null}async load(t){if(this.baseURL){this.loadStatus="loading";try{await this._loadSprites(t),this.loadStatus="loaded"}catch{this.loadStatus="failed"}}else this.loadStatus="failed"}async _loadSprites(t){this._isRetina=this.devicePixelRatio>1.15;const{width:e,height:r,data:s,json:i}=await this._getSpriteData(this._spriteSource,t),o=Object.keys(i);if(!o||0===o.length||!s)return this._spritesData=this.image=null,void(this.width=this.height=0);this._spritesData=i,this.width=e,this.height=r;const n=Math.max(this._maxTextureSize,4096);if(e>n||r>n){const t=`Sprite resource for style ${this.baseURL} is bigger than the maximum allowed of ${n} pixels}`;throw R.Z.getLogger("esri.layers.support.SpriteSource").error(t),new l.Z("SpriteSource",t)}let a;for(let t=0;t<s.length;t+=4)a=s[t+3]/255,s[t]=s[t]*a,s[t+1]=s[t+1]*a,s[t+2]=s[t+2]*a;this.image=s}async _getSpriteData(t,e){if("image"===t.type){let e,r;if(this.devicePixelRatio<1.15){if(!t.spriteSource1x)throw new l.Z("SpriteSource","no image data provided for low resolution sprites!");e=t.spriteSource1x.image,r=t.spriteSource1x.json}else{if(!t.spriteSource2x)throw new l.Z("SpriteSource","no image data provided for high resolution sprites!");e=t.spriteSource2x.image,r=t.spriteSource2x.json}return"width"in e&&"height"in e&&"data"in e&&((0,C.eP)(e.data)||(0,C.KZ)(e.data))?{width:e.width,height:e.height,data:new Uint8Array(e.data),json:r}:{...U(e),json:r}}const r=(0,c.mN)(this.baseURL),s=r.query?"?"+(0,c.B7)(r.query):"",i=this._isRetina?"@2x":"",n=`${r.path}${i}.${this._spriteImageFormat}${s}`,a=`${r.path}${i}.json${s}`,[u,h]=await Promise.all([(0,o.Z)(a,e),(0,o.Z)(n,{responseType:"image",...e})]);return{...U(h.data),json:u.data}}}function U(t){const e=document.createElement("canvas"),r=e.getContext("2d");e.width=t.width,e.height=t.height,r.drawImage(t,0,0,t.width,t.height);const s=r.getImageData(0,0,t.width,t.height);return{width:t.width,height:t.height,data:new Uint8Array(s.data)}}var z=r(11145),D=r(28589),O=r(8744),M=r(40488),B=r(55415);class F{constructor(t){this.url=t}destroy(){this._tileIndexPromise=null}async fetchTileIndex(){return this._tileIndexPromise||(this._tileIndexPromise=(0,o.Z)(this.url).then((t=>t.data.index))),this._tileIndexPromise}async dataKey(t,e){const r=await this.fetchTileIndex();return(0,h.k_)(e),this._getIndexedDataKey(r,t)}_getIndexedDataKey(t,e){const r=[e];if(e.level<0||e.row<0||e.col<0||e.row>>e.level>0||e.col>>e.level>0)return null;let s=e;for(;0!==s.level;)s=new B.Z(s.level-1,s.row>>1,s.col>>1,s.world),r.push(s);let i,o,n=t,l=r.pop();if(1===n)return l;for(;r.length;)if(i=r.pop(),o=(1&i.col)+((1&i.row)<<1),n){if(0===n[o]){l=null;break}if(1===n[o]){l=i;break}l=i,n=n[o]}return l}}var Z=r(70586);class j{constructor(t,e){this._tilemap=t,this._tileIndexUrl=e}destroy(){this._tilemap=(0,Z.SC)(this._tilemap),this._tileIndexPromise=null}async fetchTileIndex(t){return this._tileIndexPromise||(this._tileIndexPromise=(0,o.Z)(this._tileIndexUrl,{query:{...t?.query}}).then((t=>t.data.index))),this._tileIndexPromise}dataKey(t,e){const{level:r,row:s,col:i}=t,o=new B.Z(t);return this._tilemap.fetchAvailabilityUpsample(r,s,i,o,e).then((()=>(o.world=t.world,o))).catch((t=>{if((0,h.D_)(t))throw t;return null}))}}var k=r(30175);class N{constructor(t){this._tileUrl=t,this._promise=null,this._abortController=null,this._abortOptions=[]}getData(t){null===this._promise&&(this._abortController=new AbortController,this._promise=this._makeRequest(this._tileUrl,this._abortController.signal));const e=this._abortOptions;return e.push(t),(0,h.fu)(t,(()=>{e.every((t=>(0,h.Hc)(t)))&&this._abortController.abort()})),this._promise.then((t=>(0,a.d9)(t)))}async _makeRequest(t,e){const{data:r}=await(0,o.Z)(t,{responseType:"array-buffer",signal:e});return r}}const W=new Map;function G(t,e){return(0,k.s1)(W,t,(()=>new N(t))).getData(e).then((e=>(W.delete(t),e))).catch((e=>{throw W.delete(t),e}))}class ${constructor(t,e,r){this.tilemap=null,this.tileInfo=null,this.capabilities=null,this.fullExtent=null,this.initialExtent=null,this.name=t,this.sourceUrl=e;const s=(0,c.mN)(this.sourceUrl),i=(0,a.d9)(r),o=i.tiles;if(s)for(let t=0;t<o.length;t++){const e=(0,c.mN)(o[t]);e&&((0,c.YP)(e.path)||(e.path=(0,c.v_)(s.path,e.path)),o[t]=(0,c.fl)(e.path,{...s.query,...e.query}))}this.tileServers=o;const n=r.capabilities&&r.capabilities.split(",").map((t=>t.toLowerCase().trim())),l=!0===r?.exportTilesAllowed,u=!0===n?.includes("tilemap"),h=l&&r.hasOwnProperty("maxExportTilesCount")?r.maxExportTilesCount:0;this.capabilities={operations:{supportsExportTiles:l,supportsTileMap:u},exportTiles:l?{maxExportTilesCount:+h}:null},this.tileInfo=z.Z.fromJSON(i.tileInfo);const p=r.tileMap?(0,c.fl)((0,c.v_)(s.path,r.tileMap),s.query??{}):null;u?(this.type="vector-tile",this.tilemap=new j(new D.y({layer:{parsedUrl:s,tileInfo:this.tileInfo},minLOD:i.minLOD??this.tileInfo.lods[0].level,maxLOD:i.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}),p)):p&&(this.tilemap=new F(p)),this.fullExtent=g.Z.fromJSON(r.fullExtent),this.initialExtent=g.Z.fromJSON(r.initialExtent)}destroy(){this.tilemap?.destroy()}async getRefKey(t,e){return await(this.tilemap?.dataKey(t,e))??t}requestTile(t,e,r,s){return function(t,e,r,s,i){const o=(0,c.mN)(t),n=o.query;if(n)for(const[t,i]of Object.entries(n))switch(i){case"{x}":n[t]=s.toString();break;case"{y}":n[t]=r.toString();break;case"{z}":n[t]=e.toString()}const l=o.path;return G((0,c.fl)(l.replaceAll(/\{z\}/gi,e.toString()).replaceAll(/\{y\}/gi,r.toString()).replaceAll(/\{x\}/gi,s.toString()),{...o.query}),i)}(this.tileServers[e%this.tileServers.length],t,e,r,s)}isCompatibleWith(t){const e=this.tileInfo,r=t.tileInfo;if(!e.spatialReference.equals(r.spatialReference))return!1;if(!e.origin.equals(r.origin))return!1;if(Math.round(e.dpi)!==Math.round(r.dpi))return!1;const s=e.lods,i=r.lods,o=Math.min(s.length,i.length);for(let t=0;t<o;t++){const e=s[t],r=i[t];if(e.level!==r.level||Math.round(e.scale)!==Math.round(r.scale))return!1}return!0}}function H(...t){let e;for(const r of t)if(null!=r)if((0,c.oC)(r)){if(e){const t=e.split("://")[0];e=t+":"+r.trim()}}else e=(0,c.YP)(r)?r:(0,c.v_)(e,r);return e?(0,c.Qj)(e):void 0}async function q(t,e,r,s,i){let n,l,a;if((0,h.k_)(i),"string"==typeof r){const t=(0,c.Fv)(r);a=await(0,o.Z)(t,{...i,responseType:"json",query:{f:"json",...i?.query}}),a.ssl&&(n&&(n=n.replace(/^http:/i,"https:")),l&&(l=l.replace(/^http:/i,"https:"))),n=t,l=t}else null!=r&&(a={data:r},n=r.jsonUrl||null,l=s);const u=a?.data;if(V(u))return t.styleUrl=n||null,async function(t,e,r,s){const i=r?(0,c.Yd)(r):(0,c.L)();t.styleBase=i,t.style=e,e["sprite-format"]&&"webp"===e["sprite-format"].toLowerCase()&&(t.spriteFormat="webp");const o=[];if(e.sources&&e.sources.esri){const r=e.sources.esri;r.url?await q(t,"esri",H(i,r.url),void 0,s):o.push(q(t,"esri",r,i,s))}for(const r of Object.keys(e.sources))"esri"!==r&&"vector"===e.sources[r].type&&(e.sources[r].url?o.push(q(t,r,H(i,e.sources[r].url),void 0,s)):e.sources[r].tiles&&o.push(q(t,r,e.sources[r],i,s)));await Promise.all(o)}(t,u,l,i);if(!V(u))return t.sourceUrl?J(t,u,l,!1,e,i):(t.sourceUrl=n||null,J(t,u,l,!0,e,i));throw new Error("You must specify the URL or the JSON for a service or for a style.")}function K(t){return"object"==typeof t&&!!t&&"tilejson"in t&&null!=t.tilejson}function V(t){return!!t&&"sources"in t&&!!t.sources}async function J(t,e,r,s,i,o){const n=r?(0,c.Qj)(r)+"/":(0,c.L)(),l=function(t){if(t.hasOwnProperty("tileInfo"))return t;const e={xmin:-20037507.067161843,ymin:-20037507.067161843,xmax:20037507.067161843,ymax:20037507.067161843,spatialReference:{wkid:102100}};let r=null;if(K(t)){const{bounds:e}=t;if(e){const t=(0,M.$)({x:e[0],y:e[1],spatialReference:(0,a.d9)(O.Zn)}),s=(0,M.$)({x:e[2],y:e[3],spatialReference:(0,a.d9)(O.Zn)});r={xmin:t.x,ymin:t.y,xmax:s.x,ymax:s.y,spatialReference:(0,a.d9)(O.R_)}}}null===r&&(r=e);let s=78271.51696400007,i=295828763.7957775;const o=[],n=t.hasOwnProperty("minzoom")?+t.minzoom:0,l=t.hasOwnProperty("maxzoom")?+t.maxzoom:22;for(let t=0;t<=l;t++)t>=n&&o.push({level:t,scale:i,resolution:s}),s/=2,i/=2;return{capabilities:"TilesOnly",initialExtent:r,fullExtent:e,minScale:0,maxScale:0,tiles:t.tiles,tileInfo:{rows:512,cols:512,dpi:96,format:"pbf",origin:{x:-20037508.342787,y:20037508.342787},lods:o,spatialReference:(0,a.d9)(O.R_)}}}(e),u=new $(i,(0,c.fl)(n,o?.query??{}),l);if(!s&&t.primarySourceName in t.sourceNameToSource){const e=t.sourceNameToSource[t.primarySourceName];if(!e.isCompatibleWith(u))return;null!=u.fullExtent&&(null!=e.fullExtent?e.fullExtent.union(u.fullExtent):e.fullExtent=u.fullExtent.clone()),e.tileInfo&&u.tileInfo&&e.tileInfo.lods.length<u.tileInfo.lods.length&&(e.tileInfo=u.tileInfo)}if(s&&(t.sourceBase=n,t.source=e,t.validatedSource=l,t.primarySourceName=i),t.sourceNameToSource[i]=u,!K(t)&&"defaultStyles"in e&&!t.style){if(null==e.defaultStyles)throw new Error;return"string"==typeof e.defaultStyles?q(t,"",H(n,e.defaultStyles,"root.json"),void 0,o):q(t,"",e.defaultStyles,H(n,"root.json"),o)}}var Q=r(33516),Y=r(19745),X=r(25929),tt=r(94139),et=r(39450);const rt=1e-6;function st(t,e){if(t===e)return!0;if(null==t&&null!=e)return!1;if(null!=t&&null==e)return!1;if(null==t||null==e)return!1;if(!t.spatialReference.equals(e.spatialReference)||t.dpi!==e.dpi)return!1;const r=t.origin,s=e.origin;if(Math.abs(r.x-s.x)>=rt||Math.abs(r.y-s.y)>=rt)return!1;let i,o;t.lods[0].scale>e.lods[0].scale?(i=t,o=e):(o=t,i=e);for(let t=i.lods[0].scale;t>=o.lods[o.lods.length-1].scale-rt;t/=2)if(Math.abs(t-o.lods[0].scale)<rt)return!0;return!1}function it(t,e){if(t===e)return t;if(null==t&&null!=e)return e;if(null!=t&&null==e)return t;if(null==t||null==e)return null;const r=t.size[0],s=t.format,i=t.dpi,o=new tt.Z({x:t.origin.x,y:t.origin.y}),n=t.spatialReference,l=t.lods[0].scale>e.lods[0].scale?t.lods[0]:e.lods[0],a=t.lods[t.lods.length-1].scale<=e.lods[e.lods.length-1].scale?t.lods[t.lods.length-1]:e.lods[e.lods.length-1],u=l.scale,h=l.resolution,c=a.scale,p=[];let d=u,y=h,m=0;for(;d>c;)p.push(new et.Z({level:m,resolution:y,scale:d})),m++,d/=2,y/=2;return new z.Z({size:[r,r],dpi:i,format:s||"pbf",origin:o,lods:p,spatialReference:n})}var ot=r(51785),nt=r(7575);let lt,at;function ut(t){const e=(0,nt.Sh)(t);for(;e.length>1;){const t=ht(e.shift());if(t.available)return t}return ht(e.shift())}function ht(t){switch(t){case nt.zO.WEBGL1:return lt||(lt=function(){const t=new pt,e=yt(nt.zO.WEBGL1,t);return null==e||(t.supportsElementIndexUint=null!==e.getExtension("OES_element_index_uint"),t.supportsStandardDerivatives=null!==e.getExtension("OES_standard_derivatives"),t.supportsInstancedArrays=null!==e.getExtension("ANGLE_instanced_arrays"),t.supportsTextureFloat=null!==e.getExtension("OES_texture_float"),t.supportsTextureHalfFloat=null!==e.getExtension("OES_texture_half_float"),t.supportsColorBufferFloat=null!==e.getExtension("WEBGL_color_buffer_float"),t.supportsColorBufferFloatBlend=null!==e.getExtension("EXT_float_blend"),t.supportsColorBufferHalfFloat=null!==e.getExtension("EXT_color_buffer_half_float")),t}()),lt;case nt.zO.WEBGL2:return at||(at=function(){const t=new dt,e=yt(nt.zO.WEBGL2,t);return null==e||(t.supportsColorBufferFloat=null!==e.getExtension("EXT_color_buffer_float"),t.supportsColorBufferFloatBlend=null!==e.getExtension("EXT_float_blend"),t.supportsColorBufferHalfFloat=t.supportsColorBufferFloat||null!==e.getExtension("EXT_color_buffer_half_float")),t}()),at}}class ct{constructor(){this.available=!1,this.majorPerformanceCaveat=!1,this.maxTextureSize=0,this.supportsVertexShaderSamplers=!1,this.supportsHighPrecisionFragment=!1,this.supportsElementIndexUint=!1,this.supportsStandardDerivatives=!1,this.supportsInstancedArrays=!1,this.supportsTextureFloat=!1,this.supportsTextureHalfFloat=!1,this.supportsColorBufferFloat=!1,this.supportsColorBufferFloatBlend=!1,this.supportsColorBufferHalfFloat=!1}}class pt extends ct{constructor(){super(...arguments),this.type=nt.zO.WEBGL1}}class dt extends ct{constructor(){super(...arguments),this.type=nt.zO.WEBGL2,this.supportsElementIndexUint=!0,this.supportsStandardDerivatives=!0,this.supportsInstancedArrays=!0,this.supportsTextureFloat=!0,this.supportsTextureHalfFloat=!0}}function yt(t,e){if(t===nt.zO.WEBGL1&&"undefined"==typeof WebGLRenderingContext||t===nt.zO.WEBGL2&&"undefined"==typeof WebGL2RenderingContext)return null;const r=document.createElement("canvas");if(!r)return null;let s=(0,nt.kr)(r,t,{failIfMajorPerformanceCaveat:!0});if(null==s&&(s=(0,nt.kr)(r,t),null!=s&&(e.majorPerformanceCaveat=!0)),null==s)return s;if(t===nt.zO.WEBGL1){const t=s.getParameter(s.VERSION),r=t?.match(/^WebGL\s+([\d.]*)/);if(r){const t=parseFloat(r[1]);e.available=t>=.94}}else e.available=!0;e.maxTextureSize=s.getParameter(s.MAX_TEXTURE_SIZE),e.supportsVertexShaderSamplers=s.getParameter(s.MAX_VERTEX_TEXTURE_IMAGE_UNITS)>0;const i=s.getShaderPrecisionFormat(s.FRAGMENT_SHADER,s.HIGH_FLOAT);return i&&(e.supportsHighPrecisionFragment=i.precision>0),s}let mt=class extends((0,A.h)((0,T.M)((0,S.Z)((0,b.Y)((0,E.q)((0,I.I)((0,x.N)((0,w.V)((0,u.R)(v.Z)))))))))){constructor(...t){super(...t),this._spriteSourceMap=new Map,this.currentStyleInfo=null,this.isReference=null,this.operationalLayerType="VectorTileLayer",this.style=null,this.tilemapCache=null,this.type="vector-tile",this.url=null,this.path=null}normalizeCtorArgs(t,e){return"string"==typeof t?{url:t,...e}:t}destroy(){if(this.sourceNameToSource)for(const t of Object.values(this.sourceNameToSource))t?.destroy();this.primarySource?.destroy(),this._spriteSourceMap.clear()}async prefetchResources(t){await this.loadSpriteSource(globalThis.devicePixelRatio||1,t)}load(t){const e=this.loadFromPortal({supportedTypes:["Vector Tile Service"],supportsData:!1},t).catch(h.r9).then((async()=>{if(!this.portalItem||!this.portalItem.id)return;const e=`${this.portalItem.itemCdnUrl}/resources/styles/root.json`;(await(0,o.Z)(e,{...t,query:{f:"json",...this.customParameters,token:this.apiKey}})).data&&this.read({url:e},(0,Q.h)(this.portalItem))})).catch(h.r9).then((()=>this._loadStyle(t)));return this.addResolvingPromise(e),Promise.resolve(this)}get attributionDataUrl(){const t=this.currentStyleInfo,e=t&&t.serviceUrl&&(0,c.mN)(t.serviceUrl);if(!e)return null;const r=this._getDefaultAttribution(e.path);return r?(0,c.fl)(r,{...this.customParameters,token:this.apiKey}):null}get capabilities(){const t=this.primarySource;return t?t.capabilities:{operations:{supportsExportTiles:!1,supportsTileMap:!1},exportTiles:null}}get fullExtent(){return this.primarySource?.fullExtent||null}get initialExtent(){return this.primarySource?.initialExtent||null}get parsedUrl(){return this.serviceUrl?(0,c.mN)(this.serviceUrl):null}get serviceUrl(){return this.currentStyleInfo&&this.currentStyleInfo.serviceUrl||null}get spatialReference(){return this.tileInfo?.spatialReference??null}get styleUrl(){return this.currentStyleInfo&&this.currentStyleInfo.styleUrl||null}writeStyleUrl(t,e){t&&(0,c.oC)(t)&&(t=`https:${t}`);const r=(0,Y.a)(t);e.styleUrl=(0,X.e)(t,r)}get tileInfo(){const t=[];for(const e in this.sourceNameToSource)t.push(this.sourceNameToSource[e]);let e=this.primarySource?.tileInfo||new z.Z;if(t.length>1)for(let r=0;r<t.length;r++)st(e,t[r].tileInfo)&&(e=it(e,t[r].tileInfo));return e}readTilemapCache(t,e){const r=e.capabilities?.includes("Tilemap");return r?new D.y({layer:this}):null}readVersion(t,e){return e.version?parseFloat(e.version):parseFloat(e.currentVersion)}get backgroundColor(){const t=this.getPaintProperties("background")?.["background-color"];if("string"==typeof t){const e=i.Z.toUnitRGBA(i.Z.fromHex(t));if(e)return(0,f.f)(e[0]||0,e[1]||0,e[2]||0)}else if("object"==typeof t&&t.stops?.length>0)return[t.stops[0][1][0],t.stops[0][1][1],t.stops[0][1][2]];return null}async loadSpriteSource(t=1,e){if(!this._spriteSourceMap.has(t)){const r=ut("2d").maxTextureSize,s=this.currentStyleInfo?.spriteUrl?(0,c.fl)(this.currentStyleInfo.spriteUrl,{...this.customParameters,token:this.apiKey}):null,i=new P({type:"url",spriteUrl:s,pixelRatio:t,spriteFormat:this.currentStyleInfo?.spriteFormat},r);await i.load(e),this._spriteSourceMap.set(t,i)}return this._spriteSourceMap.get(t)}async setSpriteSource(t,e){if(!t)return null;const r=ut("2d").maxTextureSize,s=t.spriteUrl,i=s?(0,c.fl)(s,{...this.customParameters,token:this.apiKey}):null;if(!i&&"url"===t.type)return null;const o=new P(t,r);try{await o.load(e);const r=t.pixelRatio||1;return this._spriteSourceMap.clear(),this._spriteSourceMap.set(r,o),i&&this.currentStyleInfo&&(this.currentStyleInfo.spriteUrl=i),this.emit("spriteSource-change",{spriteSource:o}),o}catch(t){(0,h.r9)(t)}return null}async loadStyle(t,e){const r=t||this.style||this.url;return this._loadingTask&&"string"==typeof r&&this.url===r||(this._loadingTask?.abort(),this._loadingTask=(0,n.vr)((t=>(this._spriteSourceMap.clear(),this._getSourceAndStyle(r,{signal:t}))),e)),this._loadingTask.promise}getStyleLayerId(t){return this.styleRepository.getStyleLayerId(t)}getStyleLayerIndex(t){return this.styleRepository.getStyleLayerIndex(t)}getPaintProperties(t){return(0,a.d9)(this.styleRepository?.getPaintProperties(t))}setPaintProperties(t,e){const r=this.styleRepository.isPainterDataDriven(t);this.styleRepository.setPaintProperties(t,e);const s=this.styleRepository.isPainterDataDriven(t);this.emit("paint-change",{layer:t,paint:e,isDataDriven:r||s})}getStyleLayer(t){return(0,a.d9)(this.styleRepository.getStyleLayer(t))}setStyleLayer(t,e){this.styleRepository.setStyleLayer(t,e),this.emit("style-layer-change",{layer:t,index:e})}deleteStyleLayer(t){this.styleRepository.deleteStyleLayer(t),this.emit("delete-style-layer",{layer:t})}getLayoutProperties(t){return(0,a.d9)(this.styleRepository.getLayoutProperties(t))}setLayoutProperties(t,e){this.styleRepository.setLayoutProperties(t,e),this.emit("layout-change",{layer:t,layout:e})}setStyleLayerVisibility(t,e){this.styleRepository.setStyleLayerVisibility(t,e),this.emit("style-layer-visibility-change",{layer:t,visibility:e})}getStyleLayerVisibility(t){return this.styleRepository.getStyleLayerVisibility(t)}write(t,e){return e?.origin&&!this.styleUrl?(e.messages&&e.messages.push(new l.Z("vectortilelayer:unsupported",`VectorTileLayer (${this.title}, ${this.id}) with style defined by JSON only are not supported`,{layer:this})),null):super.write(t,e)}getTileUrl(t,e,r){return null}async _getSourceAndStyle(t,e){if(!t)throw new Error("invalid style!");const r=await async function(t,e){const r={source:null,sourceBase:null,sourceUrl:null,validatedSource:null,style:null,styleBase:null,styleUrl:null,sourceNameToSource:{},primarySourceName:"",spriteFormat:"png"},[s,i]="string"==typeof t?[t,null]:[null,t.jsonUrl];return await q(r,"esri",t,i,e),{layerDefinition:r.validatedSource,url:s,serviceUrl:r.sourceUrl,style:r.style,styleUrl:r.styleUrl,spriteUrl:r.style.sprite&&H(r.styleBase,r.style.sprite),spriteFormat:r.spriteFormat,glyphsUrl:r.style.glyphs&&H(r.styleBase,r.style.glyphs),sourceNameToSource:r.sourceNameToSource,primarySourceName:r.primarySourceName}}(t,{...e,query:{...this.customParameters,token:this.apiKey}});"webp"===r.spriteFormat&&(await function(t){if(L)return L;const e={lossy:"UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",lossless:"UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==",alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==",animation:"UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"};return L=new Promise((t=>{const r=new Image;r.onload=()=>{r.onload=r.onerror=null,t(r.width>0&&r.height>0)},r.onerror=()=>{r.onload=r.onerror=null,t(!1)},r.src="data:image/webp;base64,"+e.lossy})),L}()||(r.spriteFormat="png")),this._set("currentStyleInfo",{...r}),"string"==typeof t?(this.url=t,this.style=null):(this.url=null,this.style=t),this._set("sourceNameToSource",r.sourceNameToSource),this._set("primarySource",r.sourceNameToSource[r.primarySourceName]),this._set("styleRepository",new ot.Z(r.style)),this.read(r.layerDefinition,{origin:"service"}),this.emit("load-style")}_getDefaultAttribution(t){const e=t.match(/^https?:\/\/(?:basemaps|basemapsbeta|basemapsdev)(?:-api)?\.arcgis\.com(\/[^\/]+)?\/arcgis\/rest\/services\/([^\/]+(\/[^\/]+)*)\/vectortileserver/i),r=["OpenStreetMap_v2","OpenStreetMap_Daylight_v2","OpenStreetMap_Export_v2","OpenStreetMap_FTS_v2","OpenStreetMap_GCS_v2","World_Basemap","World_Basemap_v2","World_Basemap_Export_v2","World_Basemap_GCS_v2","World_Basemap_WGS84","World_Contours_v2"];if(!e)return;const s=e[2]&&e[2].toLowerCase();if(!s)return;const i=e[1]||"";for(const t of r)if(t.toLowerCase().includes(s))return(0,c.Fv)(`//static.arcgis.com/attribution/Vector${i}/${t}`)}async _loadStyle(t){return this._loadingTask?.promise??this.loadStyle(null,t)}};(0,s._)([(0,p.Cb)({readOnly:!0})],mt.prototype,"attributionDataUrl",null),(0,s._)([(0,p.Cb)({type:["show","hide"]})],mt.prototype,"listMode",void 0),(0,s._)([(0,p.Cb)({json:{read:!0,write:!0}})],mt.prototype,"blendMode",void 0),(0,s._)([(0,p.Cb)({readOnly:!0,json:{read:!1}})],mt.prototype,"capabilities",null),(0,s._)([(0,p.Cb)({readOnly:!0})],mt.prototype,"currentStyleInfo",void 0),(0,s._)([(0,p.Cb)({json:{read:!1},readOnly:!0,type:g.Z})],mt.prototype,"fullExtent",null),(0,s._)([(0,p.Cb)({json:{read:!1},readOnly:!0,type:g.Z})],mt.prototype,"initialExtent",null),(0,s._)([(0,p.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],mt.prototype,"isReference",void 0),(0,s._)([(0,p.Cb)({type:["VectorTileLayer"]})],mt.prototype,"operationalLayerType",void 0),(0,s._)([(0,p.Cb)({readOnly:!0})],mt.prototype,"parsedUrl",null),(0,s._)([(0,p.Cb)()],mt.prototype,"style",void 0),(0,s._)([(0,p.Cb)({readOnly:!0})],mt.prototype,"serviceUrl",null),(0,s._)([(0,p.Cb)({type:_.Z,readOnly:!0})],mt.prototype,"spatialReference",null),(0,s._)([(0,p.Cb)({readOnly:!0})],mt.prototype,"styleRepository",void 0),(0,s._)([(0,p.Cb)({readOnly:!0})],mt.prototype,"sourceNameToSource",void 0),(0,s._)([(0,p.Cb)({readOnly:!0})],mt.prototype,"primarySource",void 0),(0,s._)([(0,p.Cb)({type:String,readOnly:!0,json:{write:{ignoreOrigin:!0},origins:{"web-document":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],mt.prototype,"styleUrl",null),(0,s._)([(0,m.c)(["portal-item","web-document"],"styleUrl")],mt.prototype,"writeStyleUrl",null),(0,s._)([(0,p.Cb)({json:{read:!1,origins:{service:{read:!1}}},readOnly:!0,type:z.Z})],mt.prototype,"tileInfo",null),(0,s._)([(0,p.Cb)()],mt.prototype,"tilemapCache",void 0),(0,s._)([(0,d.r)("service","tilemapCache",["capabilities","tileInfo"])],mt.prototype,"readTilemapCache",null),(0,s._)([(0,p.Cb)({json:{read:!1},readOnly:!0,value:"vector-tile"})],mt.prototype,"type",void 0),(0,s._)([(0,p.Cb)({json:{origins:{"web-document":{read:{source:"styleUrl"}},"portal-item":{read:{source:"url"}}},write:!1,read:!1}})],mt.prototype,"url",void 0),(0,s._)([(0,p.Cb)({readOnly:!0})],mt.prototype,"version",void 0),(0,s._)([(0,d.r)("version",["version","currentVersion"])],mt.prototype,"readVersion",null),(0,s._)([(0,p.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],mt.prototype,"path",void 0),(0,s._)([(0,p.Cb)()],mt.prototype,"backgroundColor",null),mt=(0,s._)([(0,y.j)("esri.layers.VectorTileLayer")],mt);const ft=mt},54295:(t,e,r)=>{r.d(e,{V:()=>n});var s=r(43697),i=r(5600),o=(r(75215),r(67676),r(80442),r(52011));const n=t=>{let e=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(t){null!=t?this._override("apiKey",t):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,s._)([(0,i.Cb)({type:String})],e.prototype,"apiKey",null),e=(0,s._)([(0,o.j)("esri.layers.mixins.APIKeyMixin")],e),e}},17017:(t,e,r)=>{r.d(e,{N:()=>n});var s=r(43697),i=r(5600),o=(r(75215),r(67676),r(80442),r(52011));const n=t=>{let e=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,s._)([(0,i.Cb)({type:Object,json:{write:{overridePolicy:t=>({enabled:!!(t&&Object.keys(t).length>0)})}}})],e.prototype,"customParameters",void 0),e=(0,s._)([(0,o.j)("esri.layers.mixins.CustomParametersMixin")],e),e}},16859:(t,e,r)=>{r.d(e,{I:()=>b});var s=r(43697),i=r(68773),o=r(40330),n=r(3172),l=r(66643),a=r(20102),u=r(92604),h=r(70586),c=r(95330),p=r(17452),d=r(5600),y=(r(75215),r(67676),r(80442),r(71715)),m=r(52011),f=r(30556),g=r(84230),_=r(48522),v=r(15235),w=r(86082),S=r(14661);const b=t=>{let e=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,h.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(t){t!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",t))}readPortalItem(t,e,r){if(e.itemId)return new v.default({id:e.itemId,portal:r&&r.portal})}writePortalItem(t,e){t&&t.id&&(e.itemId=t.id)}async loadFromPortal(t,e){if(this.portalItem&&this.portalItem.id)try{const{load:s}=await r.e(8062).then(r.bind(r,18062));return(0,c.k_)(e),await s({instance:this,supportedTypes:t.supportedTypes,validateItem:t.validateItem,supportsData:t.supportsData,layerModuleTypeMap:t.layerModuleTypeMap},e)}catch(t){throw(0,c.D_)(t)||u.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${t}`),t}}async finishLoadEditablePortalLayer(t){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(t).catch((t=>((0,c.r9)(t),!0))))}async setUserPrivileges(t,e){if(!i.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(e);if(this.url)try{const{features:{edit:r,fullEdit:s},content:{updateItem:i}}=await this._fetchUserPrivileges(t,e);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",i)}catch(t){(0,c.r9)(t)}}async _fetchUserPrivileges(t,e){let r=this.portalItem;if(!t||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(e);const s=t===r.id;if(s&&r.portal.user)return(0,S.Ss)(r);let i,n;if(s)i=r.portal.url;else try{i=await(0,g.oP)(this.url,e)}catch(t){(0,c.r9)(t)}if(!i||!(0,p.Zo)(i,r.portal.url))return this._fetchFallbackUserPrivileges(e);try{const t=null!=e?e.signal:null;n=await(o.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:t}))}catch(t){(0,c.r9)(t)}if(!n)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(s?await r.reload():(r=new v.default({id:t,portal:{url:i}}),await r.load(e)),r.portal.user)return(0,S.Ss)(r)}catch(t){(0,c.r9)(t)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(t){let e=!0;try{e=await this._fetchUserHasEditingPrivileges(t)}catch(t){(0,c.r9)(t)}return{features:{edit:e,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(t){const e=this.url?o.id?.findCredential(this.url):null;if(!e)return!0;const r=A.credential===e?A.user:await this._fetchEditingUser(t);return A.credential=e,A.user=r,null==r||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(t){const e=this.portalItem?.portal?.user;if(e)return e;const r=o.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const s=`${r.owningSystemUrl}/sharing/rest`,i=_.Z.getDefault();if(i&&i.loaded&&(0,p.Fv)(i.restUrl)===(0,p.Fv)(s))return i.user;const a=`${s}/community/self`,u=null!=t?t.signal:null,h=await(0,l.q6)((0,n.Z)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return h.ok?w.Z.fromJSON(h.value.data):null}read(t,e){e&&(e.layer=this),super.read(t,e)}write(t,e){const r=e&&e.portal,s=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||_.Z.getDefault());return r&&s&&!(0,p.tm)(s.restUrl,r.restUrl)?(e.messages&&e.messages.push(new a.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(t,{...e,layer:this})}};return(0,s._)([(0,d.Cb)({type:v.default})],e.prototype,"portalItem",null),(0,s._)([(0,y.r)("web-document","portalItem",["itemId"])],e.prototype,"readPortalItem",null),(0,s._)([(0,f.c)("web-document","portalItem",{itemId:{type:String}})],e.prototype,"writePortalItem",null),(0,s._)([(0,d.Cb)({clonable:!1})],e.prototype,"resourceReferences",void 0),(0,s._)([(0,d.Cb)({type:Boolean,readOnly:!0})],e.prototype,"userHasEditingPrivileges",void 0),(0,s._)([(0,d.Cb)({type:Boolean,readOnly:!0})],e.prototype,"userHasFullEditingPrivileges",void 0),(0,s._)([(0,d.Cb)({type:Boolean,readOnly:!0})],e.prototype,"userHasUpdateItemPrivileges",void 0),e=(0,s._)([(0,m.j)("esri.layers.mixins.PortalLayer")],e),e},A={credential:null,user:null}},33516:(t,e,r)=>{r.d(e,{Y:()=>n,h:()=>o});var s=r(17452),i=r(48522);function o(t){return{origin:"portal-item",url:(0,s.mN)(t.itemUrl),portal:t.portal||i.Z.getDefault(),portalItem:t,readResourcePaths:[]}}function n(t){return{origin:"portal-item",messages:[],writtenProperties:[],url:t.itemUrl?(0,s.mN)(t.itemUrl):null,portal:t.portal||i.Z.getDefault(),portalItem:t}}},15512:(t,e,r)=>{r.d(e,{By:()=>s,_4:()=>i,pt:()=>o});const s="system",i="unknown",o="UTC"},55415:(t,e,r)=>{r.d(e,{Z:()=>i});var s=r(71143);class i{static getId(t,e,r,s){return"object"==typeof t?`${t.level}/${t.row}/${t.col}/${t.world}`:`${t}/${e}/${r}/${s}`}constructor(t,e,r,s){this.set(t,e,r,s)}get key(){return this}get id(){return this.toString()}set id(t){this.set(t)}get hash(){const t=4095&this.row,e=4095&this.col,r=63&this.level;return(3&this.world)<<30|e<<22|t<<8|r}acquire(t,e,r,s){this.set(t,e,r,s)}contains(t){const e=t.level-this.level;return e>=0&&this.row===t.row>>e&&this.col===t.col>>e&&this.world===t.world}equals(t){return this.level===t.level&&this.row===t.row&&this.col===t.col&&this.world===t.world}clone(){return new i(this)}release(){this.level=0,this.row=0,this.col=0,this.world=0}set(t,e,r,s){if(null==t)this.level=0,this.row=0,this.col=0,this.world=0;else if("object"==typeof t)this.level=t.level||0,this.row=t.row||0,this.col=t.col||0,this.world=t.world||0;else if("string"==typeof t){const[e,r,s,i]=t.split("/");this.level=parseFloat(e),this.row=parseFloat(r),this.col=parseFloat(s),this.world=parseFloat(i)}else this.level=+t,this.row=+e,this.col=+r,this.world=+s||0;return this}toString(){return`${this.level}/${this.row}/${this.col}/${this.world}`}getParentKey(){return this.level<=0?null:new i(this.level-1,this.row>>1,this.col>>1,this.world)}getChildKeys(){const t=this.level+1,e=this.row<<1,r=this.col<<1,s=this.world;return[new i(t,e,r,s),new i(t,e,r+1,s),new i(t,e+1,r,s),new i(t,e+1,r+1,s)]}compareRowMajor(t){return this.row<t.row?-1:this.row>t.row?1:this.col<t.col?-1:this.col>t.col?1:0}}i.pool=new s.Z(i,null,null,25,50)},7575:(t,e,r)=>{r.d(e,{Sh:()=>n,kr:()=>o,zO:()=>s});var s,i=r(80442);function o(t,e,r={}){const i=e===s.WEBGL1?"webgl":"webgl2";return t.getContext(i,r)||null}function n(t){if("3d"===t)return[s.WEBGL2];const e=(0,i.Z)("esri-force-webgl");return e===s.WEBGL1||e===s.WEBGL2?[e]:(0,i.Z)("mac")&&(0,i.Z)("chrome")?[s.WEBGL1,s.WEBGL2]:[s.WEBGL2,s.WEBGL1]}!function(t){t[t.WEBGL1=1]="WEBGL1",t[t.WEBGL2=2]="WEBGL2"}(s||(s={}))}}]);