@arcgis/core 4.24.0-next.20220427 → 4.24.0-next.20220430
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.
- package/WebMap.js +1 -1
- package/analysis/LineOfSightAnalysis.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{3a43a2918b44781aaf85.js → 055a0ebf22a82f859474.js} +1 -1
- package/assets/esri/core/workers/chunks/{3273b6be43eeb49ee842.js → 0b12ff7b2ed2838afbb8.js} +1 -1
- package/assets/esri/core/workers/chunks/0e25548573baf855e394.js +1 -0
- package/assets/esri/core/workers/chunks/0edd4c3ca6e7d749d0e5.js +1 -0
- package/assets/esri/core/workers/chunks/133f971e72a1a6277ac4.js +1 -0
- package/assets/esri/core/workers/chunks/{c388ac33496f004d56f3.js → 135a90ae61f3b3cae91b.js} +1 -1
- package/assets/esri/core/workers/chunks/{54f9b1ab9d472bf4baca.js → 1facbda248863cf72cbd.js} +1 -1
- package/assets/esri/core/workers/chunks/1fb2d7abe6c8efa84695.js +1 -0
- package/assets/esri/core/workers/chunks/2133499e642193f6738f.js +1 -0
- package/assets/esri/core/workers/chunks/{dee63bfc108b4e5893a3.js → 2cf3934b3ecabdf207c8.js} +1 -1
- package/assets/esri/core/workers/chunks/{3c572629f46e5093223c.js → 30333a95dc0a44e23fb5.js} +1 -1
- package/assets/esri/core/workers/chunks/{7afe89eafab00afb31f2.js → 30837d93116f0337972f.js} +1 -1
- package/assets/esri/core/workers/chunks/31df729c17470245288c.js +2 -0
- package/assets/esri/core/workers/chunks/{c0bf663240df7be68131.js.LICENSE.txt → 31df729c17470245288c.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/4130ea1f5a9f197168d7.js +1 -0
- package/assets/esri/core/workers/chunks/{417ee7a88575cb8f9aaf.js → 492b65fe99641f5740f0.js} +1 -1
- package/assets/esri/core/workers/chunks/4cdd29e1f3a1c7a39af7.js +1 -0
- package/assets/esri/core/workers/chunks/{9a0073d43b7dbaeba736.js → 541e644fc77dbe527124.js} +1 -1
- package/assets/esri/core/workers/chunks/{5a61a12b2492c6eae592.js → 59e341b2db44351bf557.js} +1 -1
- package/assets/esri/core/workers/chunks/{73630d52768e3d932f30.js → 5a10b58533b4116115ac.js} +1 -1
- package/assets/esri/core/workers/chunks/5fd787f63362defc984f.js +1 -0
- package/assets/esri/core/workers/chunks/682a8f15f352de76df69.js +1 -0
- package/assets/esri/core/workers/chunks/6a06635089761ee3e6d4.js +972 -0
- package/assets/esri/core/workers/chunks/{ab0c0c29d54f2ed954d6.js → 86b31ae136f931d7884a.js} +1 -1
- package/assets/esri/core/workers/chunks/{dc193247a1980360ec4f.js → 8e98ff9404a802352037.js} +1 -1
- package/assets/esri/core/workers/chunks/{863cfe35ee640bac103f.js → 94e51fe1c539df6257c2.js} +1 -1
- package/assets/esri/core/workers/chunks/{cbe7e6283a427a618d4b.js → 9519a02b9b8db88a3150.js} +1 -1
- package/assets/esri/core/workers/chunks/9f3a094aa4b47e4eb046.js +1 -0
- package/assets/esri/core/workers/chunks/{50d256bc3b213c8a1b09.js → a0ebf25c9c9a7f839b93.js} +1 -1
- package/assets/esri/core/workers/chunks/{d8a992dee594a6a64fde.js → a25f0a195f9217665530.js} +1 -1
- package/assets/esri/core/workers/chunks/a59ee7d2b98c85f27dd2.js +1 -0
- package/assets/esri/core/workers/chunks/{92ef9b0c61640e0ecbb4.js → a5dbab94697757c87c49.js} +1 -1
- package/assets/esri/core/workers/chunks/{147d3ee9aa81d7b2b7fa.js → a6406a248b7b2ed65f35.js} +1 -1
- package/assets/esri/core/workers/chunks/{ebdf61eb364ac0856f40.js → acbd0f4d72d1f5d8e4e8.js} +1 -1
- package/assets/esri/core/workers/chunks/acc97a210f36bff2d1b0.js +1 -0
- package/assets/esri/core/workers/chunks/ad68fe924456d6d7d4f0.js +1 -0
- package/assets/esri/core/workers/chunks/b06c949fc7d08e376a5f.js +1 -0
- package/assets/esri/core/workers/chunks/b4405e9fe6c0cf7250d3.js +1 -0
- package/assets/esri/core/workers/chunks/b97a34d2e7cceef1ac41.js +1 -0
- package/assets/esri/core/workers/chunks/bc08fe3b03767bd694c5.js +1 -0
- package/assets/esri/core/workers/chunks/c9b09099488d0e719dfb.js +1 -0
- package/assets/esri/core/workers/chunks/{4a05d0dfa73ff570e1fa.js → d15e6662d90718411d62.js} +1 -1
- package/assets/esri/core/workers/chunks/{b74b9dceabbf7b1aec39.js → d16aac3461af9cee0c29.js} +1 -1
- package/assets/esri/core/workers/chunks/{bb678bc2e2fc48112e07.js → d60dd3e1028f714f2258.js} +1 -1
- package/assets/esri/core/workers/chunks/{31c1ae0532dd991da63d.js → d6c150c243ca1f6108f9.js} +1 -1
- package/assets/esri/core/workers/chunks/{cab6decfcb3f596a3837.js → d8c59b1d73650c060dfb.js} +1 -1
- package/assets/esri/core/workers/chunks/{d24339b37cc9316e6d99.js → dcb6e1b33402d7fa455b.js} +1 -1
- package/assets/esri/core/workers/chunks/{a8da24116180d708cf81.js → df653bca2b14dffc82d1.js} +1 -1
- package/assets/esri/core/workers/chunks/{a3db91d04fe1fca0fe4f.js → e06461703e6f1acfcfdc.js} +1 -1
- package/assets/esri/core/workers/chunks/{423e199c2f695e913c0e.js → e3e1d87b8532bf84a18d.js} +1 -1
- package/assets/esri/core/workers/chunks/e7744b7e0c16bba93151.js +1 -0
- package/assets/esri/core/workers/chunks/ea50effc5c39870dc871.js +1 -0
- package/assets/esri/core/workers/chunks/fc4fd9db056579e09bfe.js +1 -0
- package/assets/esri/core/workers/chunks/fc9b5f40c5179a8c90de.js +1 -0
- package/assets/esri/core/workers/chunks/fd35b69872ac9393924f.js +1 -0
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ar.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_bg.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_bs.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ca.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_cs.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_da.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_de.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_el.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_es.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_et.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_fi.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_fr.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_he.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_hr.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_hu.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_id.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_it.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ja.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ko.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_lt.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_lv.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_nb.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_nl.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pl.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pt-BR.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pt-PT.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ro.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ru.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sk.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sl.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sr.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sv.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_th.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_tr.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_uk.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_vi.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-CN.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-HK.json +1 -1
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-TW.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ar.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_bg.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_bs.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ca.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_cs.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_da.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_de.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_el.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_es.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_et.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_fi.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_fr.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_he.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_hr.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_hu.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_id.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_it.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ja.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ko.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_lt.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_lv.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_nb.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_nl.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_pl.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_pt-BR.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_pt-PT.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ro.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ru.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_sk.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_sl.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_sr.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_sv.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_th.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_tr.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_uk.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_vi.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_zh-CN.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_zh-HK.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_zh-TW.json +1 -1
- package/chunks/ColorMaterial.glsl.js +4 -4
- package/chunks/LineMarker.glsl.js +12 -12
- package/chunks/Pattern.glsl.js +17 -17
- package/chunks/RibbonLine.glsl.js +34 -34
- package/chunks/ShadedColorMaterial.glsl.js +11 -11
- package/chunks/index.js +1 -1
- package/chunks/sphere.js +1 -1
- package/config.js +1 -1
- package/core/workers/RemoteClient.js +1 -1
- package/core/workers/WorkerHandle.js +1 -1
- package/geometry/support/sphere.js +1 -1
- package/interfaces.d.ts +74 -20
- package/layers/mixins/PortalLayer.js +1 -1
- package/layers/support/LercDecoder.js +1 -1
- package/package.json +2 -2
- package/request.js +1 -1
- package/support/elevationInfoUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/support/previewSymbol2D.js +1 -1
- package/views/2d/engine/brushes.js +1 -1
- package/views/2d/engine/vectorTiles/TileParser.js +1 -1
- package/views/2d/engine/webgl/GraphicDisplayList.js +1 -1
- package/views/2d/engine/webgl/Painter.js +1 -1
- package/views/2d/engine/webgl/WGLRendererInfo.js +1 -1
- package/views/2d/engine/webgl/brushes/WGLBrushDotDensity.js +5 -0
- package/views/2d/engine/webgl/brushes/WGLBrushHeatmap.js +5 -0
- package/views/2d/engine/webgl/brushes/WGLGeometryBrush.js +1 -1
- package/views/2d/engine/webgl/brushes/WGLGeometryBrushFill.js +1 -1
- package/views/2d/engine/webgl/brushes/WGLGeometryBrushLabel.js +1 -1
- package/views/2d/engine/webgl/brushes/WGLGeometryBrushLine.js +1 -1
- package/views/2d/engine/webgl/brushes/WGLGeometryBrushMarker.js +1 -1
- package/views/2d/engine/webgl/brushes/WGLGeometryBrushText.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/engine/webgl/techniques/Technique.js +5 -0
- package/views/2d/engine/webgl/techniques/dotDensity/TechniqueDotDensity.js +5 -0
- package/views/2d/engine/webgl/techniques/heatmap/TechniqueHeatmap.js +5 -0
- package/views/2d/engine/webgl/techniques/utils.js +5 -0
- package/views/2d/layers/features/schemaUtils.js +1 -1
- package/views/2d/layers/features/support/AttributeStore.js +1 -1
- package/views/2d/layers/features/support/GraphicsReader.js +1 -1
- package/views/2d/layers/features/tileRenderers/support/WGLFeatureView.js +1 -1
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/camera/constraintUtils/distance.js +1 -1
- package/views/3d/camera/constraintUtils/tilt.js +1 -1
- package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
- package/views/3d/interactive/analysisTools/lineOfSight/LineOfSightTool.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/I3SMeshWorkerHandle.js +1 -1
- package/views/3d/layers/I3SPointsWorkerHandle.js +1 -1
- package/views/3d/layers/PointCloudWorkerHandle.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/i3s/I3SElevationProvider.js +1 -1
- package/views/3d/layers/i3s/I3SNode.js +1 -1
- package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
- package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/support/PBFDecoder.js +1 -1
- package/views/3d/support/geometryUtils/sphere.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/terrain/tileUtils.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/IndexRange/ComponentRangeRunLengthEncoded.js +1 -1
- package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/Octree.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeProcessingWorker.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeWorkerHandle.js +1 -1
- package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
- package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
- package/views/3d/webgl-engine/shaders/HeatmapTechnique.js +1 -1
- package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
- package/views/interactive/snapping/LineSnapper.js +1 -1
- package/views/interactive/snapping/ParallelLineSnapper.js +1 -1
- package/views/interactive/snapping/RightAngleSnapper.js +1 -1
- package/views/interactive/snapping/RightAngleTriangleSnapper.js +1 -1
- package/views/interactive/snapping/SnappingManager.js +1 -1
- package/views/interactive/snapping/candidates/EdgeSnappingCandidate.js +1 -1
- package/views/interactive/snapping/candidates/FeatureSnappingCandidate.js +1 -1
- package/views/interactive/snapping/candidates/IntersectionSnappingCandidate.js +1 -1
- package/views/interactive/snapping/candidates/LineSnappingCandidate.js +1 -1
- package/views/interactive/snapping/candidates/ParallelLineSnappingCandidate.js +1 -1
- package/views/interactive/snapping/candidates/RightAngleSnappingCandidate.js +1 -1
- package/views/interactive/snapping/candidates/RightAngleTriangleSnappingCandidate.js +1 -1
- package/views/interactive/snapping/candidates/SnappingCandidate.js +1 -1
- package/views/interactive/snapping/candidates/VertexSnappingCandidate.js +1 -1
- package/views/interactive/snapping/featureSources/FeatureCollectionSnappingSource.js +1 -1
- package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
- package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
- package/views/interactive/snapping/featureSources/SceneLayerSnappingSource.js +5 -0
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js +1 -1
- package/views/interactive/snapping/featureSources/queryEngineUtils.js +1 -1
- package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +5 -0
- package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorkerHandle.js +5 -0
- package/views/interactive/snapping/hints/IntersectionSnappingHint.js +1 -1
- package/views/interactive/snapping/hints/LineSnappingHint.js +1 -1
- package/views/interactive/snapping/hints/ParallelSnappingHint.js +1 -1
- package/views/interactive/snapping/hints/PointSnappingHint.js +1 -1
- package/views/interactive/snapping/hints/RightAngleSnappingHint.js +1 -1
- package/views/interactive/snapping/hints/SnappingHint.js +1 -1
- package/views/interactive/snapping/snappingUtils.js +1 -1
- package/views/support/colorUtils.js +1 -1
- package/webmap/Bookmark.js +1 -1
- package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.js +1 -1
- package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +2 -2
- package/widgets/LineOfSight/LineOfSightViewModel.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Slice/SliceViewModel.js +1 -1
- package/widgets/support/AnalysisViewModel.js +1 -1
- package/widgets/support/InteractiveAnalysisViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/2266d6388444ac5d50b3.js +0 -1
- package/assets/esri/core/workers/chunks/3f6b17c9d2629ed396da.js +0 -1
- package/assets/esri/core/workers/chunks/404f1d7bce014c7e6965.js +0 -1
- package/assets/esri/core/workers/chunks/4e4994665549435f51ee.js +0 -1
- package/assets/esri/core/workers/chunks/503226c5c612feab4115.js +0 -1
- package/assets/esri/core/workers/chunks/528033aa0d663b4d41bf.js +0 -1
- package/assets/esri/core/workers/chunks/54af957c5330933805a3.js +0 -1
- package/assets/esri/core/workers/chunks/6ef8de3aa9a8d9c22161.js +0 -1
- package/assets/esri/core/workers/chunks/72d8b2ad36f0d0a40a0d.js +0 -1
- package/assets/esri/core/workers/chunks/756befc4aa3354e1db1d.js +0 -972
- package/assets/esri/core/workers/chunks/8a4e2831e8fdde530b21.js +0 -1
- package/assets/esri/core/workers/chunks/9b9821772b6cbe189fe0.js +0 -1
- package/assets/esri/core/workers/chunks/9c4d41f20c1a94147344.js +0 -1
- package/assets/esri/core/workers/chunks/9cfd66ee9e6328b3693a.js +0 -1
- package/assets/esri/core/workers/chunks/b548bf032c8af34fe155.js +0 -1
- package/assets/esri/core/workers/chunks/bbcae04235830debd814.js +0 -1
- package/assets/esri/core/workers/chunks/bc6f5927f07c5993b998.js +0 -1
- package/assets/esri/core/workers/chunks/c0bf663240df7be68131.js +0 -2
- package/assets/esri/core/workers/chunks/cd9668acbe3babd2b188.js +0 -1
- package/assets/esri/core/workers/chunks/d53c7a9ede56be749f2b.js +0 -1
- package/assets/esri/core/workers/chunks/e07930ab66f89d215666.js +0 -1
- package/assets/esri/core/workers/chunks/f72de828ede4d0c5e9d7.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6208],{84552:(e,t,i)=>{i.d(t,{Z:()=>d});var s,r=i(43697),n=i(96674),o=i(35463),a=i(5600),l=(i(67676),i(80442),i(75215),i(52011)),u=i(78981);let h=s=class extends n.wq{constructor(e){super(e),this.value=0,this.unit="milliseconds"}toMilliseconds(){return(0,o.rJ)(this.value,this.unit,"milliseconds")}clone(){return new s({value:this.value,unit:this.unit})}};(0,r._)([(0,a.Cb)({type:Number,json:{write:!0},nonNullable:!0})],h.prototype,"value",void 0),(0,r._)([(0,a.Cb)({type:u.v.apiValues,json:{type:u.v.jsonValues,read:u.v.read,write:u.v.write},nonNullable:!0})],h.prototype,"unit",void 0),h=s=(0,r._)([(0,l.j)("esri.TimeInterval")],h);const d=h},66643:(e,t,i)=>{i.d(t,{Ed:()=>n,UI:()=>o,mt:()=>l,q6:()=>a});var s=i(70586),r=i(95330);function n(e,t,i){return(0,r.as)(e.map(((e,s)=>t.apply(i,[e,s]))))}async function o(e,t,i){return(await(0,r.as)(e.map(((e,s)=>t.apply(i,[e,s]))))).map((e=>e.value))}async function a(e){if((0,s.Wi)(e))return{ok:!1,error:new Error("no promise provided")};try{return{ok:!0,value:await e}}catch(e){return{ok:!1,error:e}}}async function l(e){try{return{ok:!0,value:await e}}catch(e){return(0,r.r9)(e),{ok:!1,error:e}}}},43090:(e,t,i)=>{function s(e){return 32+e.length}function r(e){if(!e)return 0;let t=32;for(const i in e)if(e.hasOwnProperty(i)){const r=e[i];switch(typeof r){case"string":t+=s(r);break;case"number":t+=16;break;case"boolean":t+=4}}return t}function n(e,t){return 32+e.length*t}var o;i.d(t,{Y8:()=>o,do:()=>n,f2:()=>r}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(o||(o={}))},24133:(e,t,i)=>{i.d(t,{Q:()=>a});var s=i(67676),r=i(70586),n=i(44553),o=i(88764);class a{constructor(e=9,t){this.compareMinX=d,this.compareMinY=c,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),b.prune(),C.prune(),T.prune(),w.prune()}all(e){this._all(this.data,e)}search(e,t){let i=this.data;const s=this._toBBox;if(_(e,i))for(b.clear();i;){for(let r=0,n=i.children.length;r<n;r++){const n=i.children[r],o=i.leaf?s(n):n;_(e,o)&&(i.leaf?t(n):y(e,o)?this._all(n,t):b.push(n))}i=b.pop()}}collides(e){let t=this.data;const i=this._toBBox;if(!_(e,t))return!1;for(b.clear();t;){for(let s=0,r=t.children.length;s<r;s++){const r=t.children[s],n=t.leaf?i(r):r;if(_(e,n)){if(t.leaf||y(e,n))return!0;b.push(r)}}t=b.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),0,e.length-1,0);if(this.data.children.length)if(this.data.height===t.height)this._splitRoot(this.data,t);else{if(this.data.height<t.height){const e=this.data;this.data=t,t=e}this._insert(t,this.data.height-t.height-1,!0)}else this.data=t;return this}insert(e){return e&&this._insert(e,this.data.height-1),this}clear(){return this.data=new E([]),this}remove(e){if(!e)return this;let t,i=this.data,n=null,o=0,a=!1;const l=this._toBBox(e);for(T.clear(),w.clear();i||T.length>0;){var u;if(i||(i=(0,r.j0)(T.pop()),n=T.data[T.length-1],o=null!=(u=w.pop())?u:0,a=!0),i.leaf&&(t=(0,s.cq)(i.children,e,i.children.length,i.indexHint),-1!==t))return i.children.splice(t,1),T.push(i),this._condense(T),this;a||i.leaf||!y(i,l)?n?(o++,i=n.children[o],a=!1):i=null:(T.push(i),w.push(o),o=0,n=i,i=i.children[0])}return this}toJSON(){return this.data}fromJSON(e){return this.data=e,this}_all(e,t){let i=e;for(C.clear();i;){var s;if(!0===i.leaf)for(const e of i.children)t(e);else C.pushArray(i.children);i=null!=(s=C.pop())?s:null}}_build(e,t,i,s){const r=i-t+1;let n=this._maxEntries;if(r<=n){const s=new E(e.slice(t,i+1));return l(s,this._toBBox),s}s||(s=Math.ceil(Math.log(r)/Math.log(n)),n=Math.ceil(r/n**(s-1)));const o=new F([]);o.height=s;const a=Math.ceil(r/n),u=a*Math.ceil(Math.sqrt(n));v(e,t,i,u,this.compareMinX);for(let r=t;r<=i;r+=u){const t=Math.min(r+u-1,i);v(e,r,t,a,this.compareMinY);for(let i=r;i<=t;i+=a){const r=Math.min(i+a-1,t);o.children.push(this._build(e,i,r,s-1))}}return l(o,this._toBBox),o}_chooseSubtree(e,t,i,s){for(;s.push(t),!0!==t.leaf&&s.length-1!==i;){let i,s=1/0,r=1/0;for(let n=0,o=t.children.length;n<o;n++){const o=t.children[n],a=p(o),l=m(e,o)-a;l<r?(r=l,s=a<s?a:s,i=o):l===r&&a<s&&(s=a,i=o)}t=i||t.children[0]}return t}_insert(e,t,i){const s=this._toBBox,r=i?e:s(e);T.clear();const n=this._chooseSubtree(r,this.data,t,T);for(n.children.push(e),h(n,r);t>=0&&T.data[t].children.length>this._maxEntries;)this._split(T,t),t--;this._adjustParentBBoxes(r,T,t)}_split(e,t){const i=e.data[t],s=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,s);const n=this._chooseSplitIndex(i,r,s);if(!n)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=i.children.splice(n,i.children.length-n),a=i.leaf?new E(o):new F(o);a.height=i.height,l(i,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,t){this.data=new F([e,t]),this.data.height=e.height+1,l(this.data,this._toBBox)}_chooseSplitIndex(e,t,i){let s,r,n;s=r=1/0;for(let o=t;o<=i-t;o++){const t=u(e,0,o,this._toBBox),a=u(e,o,i,this._toBBox),l=g(t,a),h=p(t)+p(a);l<s?(s=l,n=o,r=h<r?h:r):l===s&&h<r&&(r=h,n=o)}return n}_chooseSplitAxis(e,t,i){const s=e.leaf?this.compareMinX:d,r=e.leaf?this.compareMinY:c;this._allDistMargin(e,t,i,s)<this._allDistMargin(e,t,i,r)&&e.children.sort(s)}_allDistMargin(e,t,i,s){e.children.sort(s);const r=this._toBBox,n=u(e,0,t,r),o=u(e,i-t,i,r);let a=f(n)+f(o);for(let s=t;s<i-t;s++){const t=e.children[s];h(n,e.leaf?r(t):t),a+=f(n)}for(let s=i-t-1;s>=t;s--){const t=e.children[s];h(o,e.leaf?r(t):t),a+=f(o)}return a}_adjustParentBBoxes(e,t,i){for(let s=i;s>=0;s--)h(t.data[s],e)}_condense(e){for(let t=e.length-1;t>=0;t--){const i=e.data[t];if(0===i.children.length)if(t>0){const r=e.data[t-1],n=r.children;n.splice((0,s.cq)(n,i,n.length,r.indexHint),1)}else this.clear();else l(i,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(e[0])),this.compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){u(e,0,e.children.length,t,e)}function u(e,t,i,s,r){r||(r=new E([])),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let n,o=t;o<i;o++)n=e.children[o],h(r,e.leaf?s(n):n);return r}function h(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function d(e,t){return e.minX-t.minX}function c(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function f(e){return e.maxX-e.minX+(e.maxY-e.minY)}function m(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){const i=Math.max(e.minX,t.minX),s=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),n=Math.min(e.maxY,t.maxY);return Math.max(0,r-i)*Math.max(0,n-s)}function y(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function _(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e,t,i,s,n){const a=[t,i];for(;a.length;){const t=(0,r.j0)(a.pop()),i=(0,r.j0)(a.pop());if(t-i<=s)continue;const l=i+Math.ceil((t-i)/s/2)*s;(0,o.q)(e,l,i,t,n),a.push(i,l,l,t)}}const b=new n.Z,C=new n.Z,T=new n.Z,w=new n.Z({deallocator:void 0});class x extends class{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}{constructor(){super(...arguments),this.height=1,this.indexHint=new s.SO}}class E extends x{constructor(e){super(),this.children=e,this.leaf=!0}}class F extends x{constructor(e){super(),this.children=e,this.leaf=!1}}},37549:(e,t,i)=>{i.d(t,{H:()=>o});var s=i(80442),r=i(24133);const n={minX:0,minY:0,maxX:0,maxY:0};class o{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new r.Q(9,(0,s.Z)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((i,s)=>{e[t++]=s})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))),this._boundsToLoad.length=0)}}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,i){n.minX=t[0],n.minY=t[1],n.maxX=t[2],n.maxY=t[3],e.search(n,i)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},57191:(e,t,i)=>{i.d(t,{Z:()=>m});var s=i(20102),r=i(32448),n=i(92604),o=i(70586),a=i(60437),l=i(24470),u=i(98732),h=i(37549),d=i(29730),c=i(70272),p=i(5428);const f={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new c.u_(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>((0,o.Wi)(e.centroid)&&(e.centroid=(0,d.Y)(new p.Z,e.geometry,t.hasZ,t.hasM)),e.centroid)};class m{constructor(e){this.geometryInfo=e,this._boundsStore=new h.H,this._featuresById=new Map,this._markedIds=new Set,this.events=new r.Z,this.featureAdapter=f}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){if(!this.numFeatures)return null;const e=(0,l.Ue)(l.Gv);return this._featuresById.forEach((t=>{const i=this._boundsStore.get(t.objectId);i&&(e[0]=Math.min(i[0],e[0]),e[1]=Math.min(i[1],e[1]),e[2]=Math.max(i[2],e[2]),e[3]=Math.max(i[3],e[3]))})),e}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{(0,o.pC)(t.geometry)&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t,i){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,a.JR)(i,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,i)=>{this._markedIds.has(i)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void n.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new s.Z("featurestore:invalid-feature","feature id is missing",{feature:e}));const i=this._featuresById.get(t);let r;if(this._markedIds.add(t),i?(e.displayId=i.displayId,r=this._boundsStore.get(t),this._boundsStore.delete(t)):(0,o.pC)(this.onFeatureAdd)&&this.onFeatureAdd(e),(0,o.Wi)(e.geometry)||!e.geometry.coords||!e.geometry.coords.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);r=(0,u.$)((0,o.pC)(r)?r:(0,l.Ue)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),(0,o.pC)(r)&&this._boundsStore.set(t,r),this._featuresById.set(t,e)}_remove(e){return(0,o.pC)(this.onFeatureRemove)&&this.onFeatureRemove(e),this._markedIds.delete(e.objectId),this._boundsStore.delete(e.objectId),this._featuresById.delete(e.objectId),e}}},1231:(e,t,i)=>{i.d(t,{Z:()=>g});var s,r=i(43697),n=i(35454),o=i(96674),a=i(5600),l=(i(67676),i(80442),i(75215)),u=i(36030),h=i(71715),d=i(52011),c=i(72729),p=i(86719);const f=new n.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let m=s=class extends o.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=-1,this.name=null,this.nullable=!0,this.type=null,this.valueType=null}readDescription(e,{description:t}){let i;try{i=JSON.parse(t)}catch(e){}return i?i.value:null}readValueType(e,{description:t}){let i;try{i=JSON.parse(t)}catch(e){}return i?f.fromJSON(i.fieldValueType):null}clone(){return new s({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType})}};(0,r._)([(0,a.Cb)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,r._)([(0,a.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,r._)([(0,a.Cb)()],m.prototype,"description",void 0),(0,r._)([(0,h.r)("description")],m.prototype,"readDescription",null),(0,r._)([(0,a.Cb)({types:c.V5,json:{read:{reader:c.im},write:!0}})],m.prototype,"domain",void 0),(0,r._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,r._)([(0,a.Cb)({type:l.z8,json:{write:!0}})],m.prototype,"length",void 0),(0,r._)([(0,a.Cb)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,r._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,r._)([(0,u.J)(p.v)],m.prototype,"type",void 0),(0,r._)([(0,a.Cb)()],m.prototype,"valueType",void 0),(0,r._)([(0,h.r)("valueType",["description"])],m.prototype,"readValueType",null),m=s=(0,r._)([(0,d.j)("esri.layers.support.Field")],m);const g=m},39450:(e,t,i)=>{i.d(t,{Z:()=>h});var s,r=i(43697),n=i(96674),o=i(5600),a=(i(67676),i(80442),i(75215)),l=i(52011);let u=s=class extends n.wq{constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new s({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,r._)([(0,o.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"cols",void 0),(0,r._)([(0,o.Cb)({type:a.z8,json:{write:!0}})],u.prototype,"level",void 0),(0,r._)([(0,o.Cb)({type:String,json:{write:!0}})],u.prototype,"levelValue",void 0),(0,r._)([(0,o.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"origin",void 0),(0,r._)([(0,o.Cb)({type:Number,json:{write:!0}})],u.prototype,"resolution",void 0),(0,r._)([(0,o.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"rows",void 0),(0,r._)([(0,o.Cb)({type:Number,json:{write:!0}})],u.prototype,"scale",void 0),u=s=(0,r._)([(0,l.j)("esri.layers.support.LOD")],u);const h=u},11145:(e,t,i)=>{i.d(t,{Z:()=>x});var s,r=i(43697),n=i(35454),o=i(96674),a=i(70586),l=i(67900),u=i(5600),h=(i(67676),i(80442),i(75215)),d=i(71715),c=i(52011),p=i(30556),f=i(13473),m=i(82971),g=i(24470),y=i(8744),_=i(40488),v=i(39450);const b=new n.X({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let C=s=class extends o.wq{constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.minScale=0,this.maxScale=0,this.size=null,this.spatialReference=null}static create(e={}){const{resolutionFactor:t=1,scales:i,size:r=256,spatialReference:n=m.Z.WebMercator,numLODs:o=24}=e;if(!(0,y.JY)(n)){const e=[];if(i)for(let t=0;t<i.length;t++){const s=i[t];e.push({level:t,scale:s,resolution:s})}else{let t=5e-4;for(let i=o-1;i>=0;i--)e.unshift({level:i,scale:t,resolution:t}),t*=2}return new s({dpi:96,lods:e,origin:new f.Z(0,0,n),size:[r,r],spatialReference:n})}const a=(0,y.C5)(n),u=e.origin?new f.Z({x:e.origin.x,y:e.origin.y,spatialReference:n}):new f.Z(a?{x:a.origin[0],y:a.origin[1],spatialReference:n}:{x:0,y:0,spatialReference:n}),h=1/(39.37*(0,l.c9)(n)*96),d=[];if(i)for(let e=0;e<i.length;e++){const t=i[e],s=t*h;d.push({level:e,scale:t,resolution:s})}else{let e=(0,y.sT)(n)?512/r*591657527.5917094:256/r*591657527.591555;const i=Math.ceil(o/t);d.push({level:0,scale:e,resolution:e*h});for(let s=1;s<i;s++){const i=e/2**t,r=i*h;d.push({level:s,scale:i,resolution:r}),e=i}}return new s({dpi:96,lods:d,origin:u,size:[r,r],spatialReference:n})}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const i=(0,y.C5)(e);return e.isWrappable&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return f.Z.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0;const s=[];this._levelToLOD={},e&&(t=-1/0,i=1/0,e.forEach((e=>{s.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,this._levelToLOD[e.level]=e}))),this._set("scales",s),this._set("minScale",t),this._set("maxScale",i),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];{const i=Math.floor(e),s=i+1;return t[i]/(t[i]/t[s])**(e-i)}}scaleToZoom(e){const t=this.scales,i=t.length-1;let s=0;for(;s<i;s++){const i=t[s],r=t[s+1];if(i<=e)return s;if(r===e)return s+1;if(i>e&&r<e)return s+Math.log(i/e)/Math.log(i/r)}return s}snapScale(e,t=.95){const i=this.scaleToZoom(e);return i%Math.floor(i)>=t?this.zoomToScale(Math.ceil(i)):this.zoomToScale(Math.floor(i))}tileAt(e,t,i,s){const r=this.lodAt(e);if(!r)return null;let n,o;if("number"==typeof t)n=t,o=i;else if((0,y.fS)(t.spatialReference,this.spatialReference))n=t.x,o=t.y,s=i;else{const e=(0,_.iV)(t,this.spatialReference);if((0,a.Wi)(e))return null;n=e.x,o=e.y,s=i}const l=r.resolution*this.size[0],u=r.resolution*this.size[1];return s||(s={id:null,level:0,row:0,col:0,extent:(0,g.Ue)()}),s.level=e,s.row=Math.floor((this.origin.y-o)/u+.001),s.col=Math.floor((n-this.origin.x)/l+.001),this.updateTileInfo(s),s}updateTileInfo(e,t=s.ExtrapolateOptions.NONE){let i=this.lodAt(e.level);if(!i&&t===s.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return;const r=e.level-i.level,n=i.resolution*this.size[0]/2**r,o=i.resolution*this.size[1]/2**r;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,g.Ue)()),e.extent[0]=this.origin.x+e.col*n,e.extent[1]=this.origin.y-(e.row+1)*o,e.extent[2]=e.extent[0]+n,e.extent[3]=e.extent[1]+o}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const{resolution:i}=this.lodAt(t.level),s=i*this.size[0],r=i*this.size[1];return e[0]=this.origin.x+t.col*s,e[1]=this.origin.y-(t.row+1)*r,e[2]=e[0]+s,e[3]=e[1]+r,e}lodAt(e){return this._levelToLOD&&this._levelToLOD[e]||null}clone(){return s.fromJSON(this.write({}))}getOrCreateCompatible(e,t){if(256===this.size[0]&&256===this.size[1])return 256===e?this:null;const i=[],r=this.lods.length;for(let e=0;e<r;e++){const s=this.lods[e],r=s.resolution*t;i.push(new v.Z({level:s.level,scale:s.scale,resolution:r}))}return new s({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){const s=e[i];this._upsampleLevels[s.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/s.resolution:0},t=s}}};var T,w;(0,r._)([(0,u.Cb)({type:Number,json:{write:!0}})],C.prototype,"compressionQuality",void 0),(0,r._)([(0,u.Cb)({type:Number,json:{write:!0}})],C.prototype,"dpi",void 0),(0,r._)([(0,u.Cb)({type:String,json:{read:b.read,write:b.write,origins:{"web-scene":{read:!1,write:!1}}}})],C.prototype,"format",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],C.prototype,"isWrappable",null),(0,r._)([(0,u.Cb)({type:f.Z,json:{write:!0}})],C.prototype,"origin",void 0),(0,r._)([(0,d.r)("origin")],C.prototype,"readOrigin",null),(0,r._)([(0,u.Cb)({type:[v.Z],value:null,json:{write:!0}})],C.prototype,"lods",null),(0,r._)([(0,u.Cb)({readOnly:!0})],C.prototype,"minScale",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],C.prototype,"maxScale",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],C.prototype,"scales",void 0),(0,r._)([(0,u.Cb)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],C.prototype,"size",void 0),(0,r._)([(0,d.r)("size",["rows","cols"])],C.prototype,"readSize",null),(0,r._)([(0,p.c)("size",{cols:{type:h.z8},rows:{type:h.z8}})],C.prototype,"writeSize",null),(0,r._)([(0,u.Cb)({type:m.Z,json:{write:!0}})],C.prototype,"spatialReference",void 0),C=s=(0,r._)([(0,c.j)("esri.layers.support.TileInfo")],C),(w=(T=C||(C={})).ExtrapolateOptions||(T.ExtrapolateOptions={}))[w.NONE=0]="NONE",w[w.POWER_OF_TWO=1]="POWER_OF_TWO";const x=C},30547:(e,t,i)=>{i.d(t,{Z:()=>v});var s,r=i(43697),n=i(92835),o=i(84552),a=i(96674),l=i(22974),u=i(70586),h=i(5600),d=(i(75215),i(71715)),c=i(52011),p=i(30556);i(67676),i(80442);let f=s=class extends a.wq{constructor(e){super(e),this.respectsDaylightSaving=!1,this.timezone=null}readRespectsDaylightSaving(e,t){return void 0!==t.respectsDaylightSaving?t.respectsDaylightSaving:void 0!==t.respectDaylightSaving&&t.respectDaylightSaving}clone(){const{respectsDaylightSaving:e,timezone:t}=this;return new s({respectsDaylightSaving:e,timezone:t})}};(0,r._)([(0,h.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"respectsDaylightSaving",void 0),(0,r._)([(0,d.r)("respectsDaylightSaving",["respectsDaylightSaving","respectDaylightSaving"])],f.prototype,"readRespectsDaylightSaving",null),(0,r._)([(0,h.Cb)({type:String,json:{read:{source:"timeZone"},write:{target:"timeZone"}}})],f.prototype,"timezone",void 0),f=s=(0,r._)([(0,c.j)("esri.layers.support.TimeReference")],f);const m=f;var g,y=i(78981);let _=g=class extends a.wq{constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeReference=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const i=new Date(t.timeExtent[0]),s=new Date(t.timeExtent[1]);return new n.Z({start:i,end:s})}writeFullTimeExtent(e,t){e&&(0,u.pC)(e.start)&&(0,u.pC)(e.end)?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?new o.Z({value:t.timeInterval,unit:y.v.fromJSON(t.timeIntervalUnits)}):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?new o.Z({value:t.defaultTimeInterval,unit:y.v.fromJSON(t.defaultTimeIntervalUnits)}):null}writeInterval(e,t){if(e){const i=e.toJSON();t.timeInterval=i.value,t.timeIntervalUnits=i.unit}else t.timeInterval=null,t.timeIntervalUnits=null}clone(){const{cumulative:e,endField:t,hasLiveData:i,interval:s,startField:r,timeReference:n,fullTimeExtent:o,trackIdField:a,useTime:u}=this;return new g({cumulative:e,endField:t,hasLiveData:i,interval:s,startField:r,timeReference:(0,l.d9)(n),fullTimeExtent:(0,l.d9)(o),trackIdField:a,useTime:u})}};(0,r._)([(0,h.Cb)({type:Boolean,json:{read:{source:"exportOptions.timeDataCumulative"},write:{target:"exportOptions.timeDataCumulative"}}})],_.prototype,"cumulative",void 0),(0,r._)([(0,h.Cb)({type:String,json:{read:{source:"endTimeField"},write:{target:"endTimeField",allowNull:!0}}})],_.prototype,"endField",void 0),(0,r._)([(0,h.Cb)({type:n.Z,json:{write:{enabled:!0,allowNull:!0}}})],_.prototype,"fullTimeExtent",void 0),(0,r._)([(0,d.r)("fullTimeExtent",["timeExtent"])],_.prototype,"readFullTimeExtent",null),(0,r._)([(0,p.c)("fullTimeExtent")],_.prototype,"writeFullTimeExtent",null),(0,r._)([(0,h.Cb)({type:Boolean,json:{write:!0}})],_.prototype,"hasLiveData",void 0),(0,r._)([(0,h.Cb)({type:o.Z,json:{write:{enabled:!0,allowNull:!0}}})],_.prototype,"interval",void 0),(0,r._)([(0,d.r)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],_.prototype,"readInterval",null),(0,r._)([(0,p.c)("interval")],_.prototype,"writeInterval",null),(0,r._)([(0,h.Cb)({type:String,json:{read:{source:"startTimeField"},write:{target:"startTimeField",allowNull:!0}}})],_.prototype,"startField",void 0),(0,r._)([(0,h.Cb)({type:m,json:{write:{enabled:!0,allowNull:!0}}})],_.prototype,"timeReference",void 0),(0,r._)([(0,h.Cb)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],_.prototype,"trackIdField",void 0),(0,r._)([(0,h.Cb)({type:Boolean,json:{read:{source:"exportOptions.useTime"},write:{target:"exportOptions.useTime"}}})],_.prototype,"useTime",void 0),_=g=(0,r._)([(0,c.j)("esri.layers.support.TimeInfo")],_);const v=_},72729:(e,t,i)=>{i.d(t,{im:()=>x,V5:()=>w}),i(80442);var s,r=i(43697),n=i(22974),o=i(5600),a=(i(75215),i(36030)),l=i(52011),u=i(96674);i(67676);let h=s=class extends u.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new s({name:this.name,code:this.code})}};(0,r._)([(0,o.Cb)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,r._)([(0,o.Cb)({type:[String,Number],json:{write:!0}})],h.prototype,"code",void 0),h=s=(0,r._)([(0,l.j)("esri.layers.support.CodedValue")],h);const d=new(i(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends u.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,r._)([(0,o.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,r._)([(0,a.J)(d)],c.prototype,"type",void 0),c=(0,r._)([(0,l.j)("esri.layers.support.Domain")],c);const p=c;var f;let m=f=class extends p{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const i=String(e);this.codedValues.some((e=>(String(e.code)===i&&(t=e.name),!!t)))}return t}clone(){return new f({codedValues:(0,n.d9)(this.codedValues),name:this.name})}};(0,r._)([(0,o.Cb)({type:[h],json:{write:!0}})],m.prototype,"codedValues",void 0),(0,r._)([(0,a.J)({codedValue:"coded-value"})],m.prototype,"type",void 0),m=f=(0,r._)([(0,l.j)("esri.layers.support.CodedValueDomain")],m);const g=m;var y;i(92604),i(37697);let _=y=class extends p{constructor(e){super(e),this.type="inherited"}clone(){return new y}};(0,r._)([(0,a.J)({inherited:"inherited"})],_.prototype,"type",void 0),_=y=(0,r._)([(0,l.j)("esri.layers.support.InheritedDomain")],_);const v=_;var b;let C=b=class extends p{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new b({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,r._)([(0,o.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,i){t[i]=[this.minValue||0,e]}}}})],C.prototype,"maxValue",void 0),(0,r._)([(0,o.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[0]},write:{target:"range",writer(e,t,i){t[i]=[e,this.maxValue||0]}}}})],C.prototype,"minValue",void 0),(0,r._)([(0,a.J)({range:"range"})],C.prototype,"type",void 0),C=b=(0,r._)([(0,l.j)("esri.layers.support.RangeDomain")],C);const T=C,w={key:"type",base:p,typeMap:{range:C,"coded-value":g,inherited:v}};function x(e){if(!e||!e.type)return null;switch(e.type){case"range":return T.fromJSON(e);case"codedValue":return g.fromJSON(e);case"inherited":return v.fromJSON(e)}return null}},86719:(e,t,i)=>{i.d(t,{v:()=>s});const s=new(i(35454).X)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml"})},78981:(e,t,i)=>{i.d(t,{v:()=>s});const s=(0,i(35454).w)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},2255:(e,t,i)=>{i.r(t),i.d(t,{FeatureServiceSnappingSourceWorker:()=>Q,default:()=>$});var s=i(43697),r=i(32448),n=i(61247),o=i(70586),a=i(95330),l=i(17445),u=i(5600),h=i(67676),d=(i(80442),i(75215),i(52011)),c=i(72762),p=i(82971),f=i(57191),m=i(7673),g=i(11145),y=i(30547),_=i(57444),v=i(15923);let b=class extends v.Z{constructor(){super(...arguments),this.updating=!1,this.pending=[]}push(e,t){this.pending.push({promise:e,callback:t}),1===this.pending.length&&this._process()}_process(){if(!this.pending.length)return void(this.updating=!1);this.updating=!0;const e=this.pending[0];e.promise.then((t=>e.callback(t))).catch((()=>{})).then((()=>{this.pending.shift(),this._process()}))}};(0,s._)([(0,u.Cb)()],b.prototype,"updating",void 0),b=(0,s._)([(0,d.j)("esri.core.AsyncSequence")],b);var C,T=i(3920),w=i(50758),x=i(92604),E=i(6570),F=i(24470),I=i(98732),S=i(78760),O=i(34599),B=i(66643);class M{constructor(e,t){this.data=e,this.resolution=t,this.state={type:C.CREATED},this.alive=!0}process(e){switch(this.state.type){case C.CREATED:return this.state=this._gotoFetchCount(this.state,e),this.state.task.promise.then(e.resume,e.resume);case C.FETCH_COUNT:break;case C.FETCHED_COUNT:return this.state=this._gotoFetchFeatures(this.state,e),this.state.task.promise.then(e.resume,e.resume);case C.FETCH_FEATURES:break;case C.FETCHED_FEATURES:this.state=this._goToDone(this.state,e);case C.DONE:}return null}get debugInfo(){return{data:this.data,featureCount:this.featureCount,state:this.stateToString}}get featureCount(){switch(this.state.type){case C.CREATED:case C.FETCH_COUNT:return 0;case C.FETCHED_COUNT:return this.state.featureCount;case C.FETCH_FEATURES:return this.state.previous.featureCount;case C.FETCHED_FEATURES:return this.state.features.length;case C.DONE:return this.state.previous.features.length}}get stateToString(){switch(this.state.type){case C.CREATED:return"created";case C.FETCH_COUNT:return"fetch-count";case C.FETCHED_COUNT:return"fetched-count";case C.FETCH_FEATURES:return"fetch-features";case C.FETCHED_FEATURES:return"fetched-features";case C.DONE:return"done"}}_gotoFetchCount(e,t){return{type:C.FETCH_COUNT,previous:e,task:(0,a.vr)((async e=>{const i=await(0,B.mt)(t.fetchCount(this,e));this.state.type===C.FETCH_COUNT&&(this.state=this._gotoFetchedCount(this.state,i.ok?i.value:1/0))}))}}_gotoFetchedCount(e,t){return{type:C.FETCHED_COUNT,featureCount:t,previous:e}}_gotoFetchFeatures(e,t){return{type:C.FETCH_FEATURES,previous:e,task:(0,a.vr)((async i=>{const s=await(0,B.mt)(t.fetchFeatures(this,e.featureCount,i));this.state.type===C.FETCH_FEATURES&&(this.state=this._gotoFetchedFeatures(this.state,s.ok?s.value:[]))}))}}_gotoFetchedFeatures(e,t){return{type:C.FETCHED_FEATURES,previous:e,features:t}}_goToDone(e,t){return t.finish(this,e.features),{type:C.DONE,previous:e}}reset(){const e=this.state;switch(this.state={type:C.CREATED},e.type){case C.CREATED:case C.FETCHED_COUNT:case C.FETCHED_FEATURES:case C.DONE:break;case C.FETCH_COUNT:case C.FETCH_FEATURES:e.task.abort()}}intersects(e){return!(!(0,o.Wi)(e)&&this.data.extent)||((0,F.oJ)(e,R),(0,F.kK)(this.data.extent,R))}}!function(e){e[e.CREATED=0]="CREATED",e[e.FETCH_COUNT=1]="FETCH_COUNT",e[e.FETCHED_COUNT=2]="FETCHED_COUNT",e[e.FETCH_FEATURES=3]="FETCH_FEATURES",e[e.FETCHED_FEATURES=4]="FETCHED_FEATURES",e[e.DONE=5]="DONE"}(C||(C={}));const R=(0,F.Ue)(),D=x.Z.getLogger("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher");let A=class extends T.r{constructor(e){super(e),this.tilesOfInterest=[],this.availability=0,this.pendingTiles=new Map,this.pendingEdits=new b,this.pendingEditsAbortController=new AbortController}get minimumVerticesPerFeature(){var e;switch(null==(e=this.store)?void 0:e.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}set filter(e){const t=this._get("filter"),i=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(i)&&this._set("filter",i)}set customParameters(e){const t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){const t=this._get("tileInfo");t!==e&&((0,o.pC)(e)&&(0,o.pC)(t)&&JSON.stringify(e)===JSON.stringify(t)||(this._set("tileInfo",e),this.store.tileInfo=e))}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this.updatingHandles.updating||this.pendingEdits.updating}initialize(){this._initializeFetchExtent(),this.updatingHandles.add((()=>this.configuration),(()=>this.refresh())),this.updatingHandles.add((()=>this.tilesOfInterest),((e,t)=>{(0,h.fS)(e,t,(({id:e},{id:t})=>e===t))||this._process()}),l.Z_)}destroy(){this.pendingTiles.forEach((e=>this._deletePendingTile(e))),this.pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this.pendingEditsAbortController.abort(),this.pendingEditsAbortController=null}refresh(){this.store.refresh(),this.pendingTiles.forEach((e=>this._deletePendingTile(e))),this._process()}applyEdits(e){this.pendingEdits.push(e,(async e=>{if(0===e.addedFeatures.length&&0===e.updatedFeatures.length&&0===e.deletedFeatures.length)return;for(const[,e]of this.pendingTiles)e.reset();const t={...e,deletedFeatures:e.deletedFeatures.map((({objectId:e,globalId:t})=>e&&-1!==e?e:this._lookupObjectIdByGlobalId(t)))};await this.updatingHandles.addPromise(this.store.processEdits(t,((e,t)=>this._queryFeaturesById(e,t)),this.pendingEditsAbortController.signal)),this._processPendingTiles()}))}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent)return;const e=(0,a.vr)((async e=>{try{var t;const i=await(0,O.executeQueryForExtent)(this.url,new _.Z({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:!!this.capabilities.query.supportsCacheHint||void 0}),{query:this.configuration.customParameters,signal:e});this.store.extent=E.Z.fromJSON(null==(t=i.data)?void 0:t.extent)}catch(e){(0,a.r9)(e),D.warn("Failed to fetch data extent",e)}}));this.updatingHandles.addPromise(e.promise.then((()=>this._process()))),this.handles.add((0,w.kB)((()=>e.abort())))}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this.pendingTiles.values()).map((e=>e.debugInfo)),storedTiles:this.store.debugInfo}}_process(){this._markTilesNotAlive(),this._createPendingTiles(),this._deletePendingTiles(),this._processPendingTiles()}_markTilesNotAlive(){for(const[,e]of this.pendingTiles)e.alive=!1}_createPendingTiles(){const e=this._collectMissingTilesInfo();if(this._setAvailability((0,o.Wi)(e)?1:e.coveredArea/e.fullArea),!(0,o.Wi)(e))for(const{data:t,resolution:i}of e.missingTiles){const e=this.pendingTiles.get(t.id);e?(e.resolution=i,e.alive=!0):this._createPendingTile(t,i)}}_collectMissingTilesInfo(){let e=null;for(let t=this.tilesOfInterest.length-1;t>=0;t--){const i=this.tilesOfInterest[t],s=this.store.process(i,((e,t)=>this._verifyTileComplexity(e,t)));(0,o.Wi)(e)?e=s:e.prepend(s)}return e}_deletePendingTiles(){for(const[,e]of this.pendingTiles)e.alive||this._deletePendingTile(e)}_processPendingTiles(){const e={fetchCount:(e,t)=>this._fetchCount(e,t),fetchFeatures:(e,t,i)=>this._fetchFeatures(e,t,i),finish:(e,t)=>this._finishPendingTile(e,t),resume:()=>this._processPendingTiles()};if(this._ensureFetchAllCounts(e))for(const[,t]of this.pendingTiles)this._verifyTileComplexity(this.store.getFeatureCount(t.data),t.resolution)&&this.updatingHandles.addPromise(t.process(e))}_verifyTileComplexity(e,t){return this._verifyVertexComplexity(e)&&this._verifyFeatureDensity(e,t)}_verifyVertexComplexity(e){return e*this.minimumVerticesPerFeature<P}_verifyFeatureDensity(e,t){if((0,o.Wi)(this.tileInfo))return!1;const i=this.tileSize*t;return e*(U/(i*i))<z}_ensureFetchAllCounts(e){let t=!0;for(const[,i]of this.pendingTiles)i.state.type<C.FETCHED_COUNT&&this.updatingHandles.addPromise(i.process(e)),i.state.type<=C.FETCH_COUNT&&(t=!1);return t}_finishPendingTile(e,t){this.store.add(e.data,t),this._deletePendingTile(e),this._updateAvailability()}_updateAvailability(){const e=this._collectMissingTilesInfo();this._setAvailability((0,o.Wi)(e)?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){const i=new M(e,t);return this.pendingTiles.set(e.id,i),i}_deletePendingTile(e){e.reset(),this.pendingTiles.delete(e.data.id)}async _fetchCount(e,t){return this.store.fetchCount(e.data,this.url,this._createCountQuery(e),{query:this.customParameters,timeout:N,signal:t})}async _fetchFeatures(e,t,i){let s,r=0,n=0,a=t;for(;;){const l=this._createFeaturesQuery(e),u=this._setPagingParameters(l,r,a),{features:h,exceededTransferLimit:d}=await this._queryFeatures(l,i);if(u&&(r+=(0,o.Wg)(l.num)),n+=h.length,s=s?s.concat(h):h,a=t-n,!u||!d||a<=0)return s}}_filterProperties(e){return(0,o.Wi)(e)?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}_lookupObjectIdByGlobalId(e){const t=this.globalIdField,i=this.objectIdField;if((0,o.Wi)(t))throw new Error("Expected globalIdField to be defined");let s=null;if(this.store.featureStore.forEach((r=>{var n;e===r.attributes[t]&&(s=null!=(n=r.objectId)?n:r.attributes[i])})),(0,o.Wi)(s))throw new Error(`Expected to find a feature with globalId ${e}`);return s}_queryFeaturesById(e,t){const i=this._createFeaturesQuery(null);return i.objectIds=e,this._queryFeatures(i,t)}_queryFeatures(e,t){return this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:i}=this,{data:s}=await(0,O.executeQueryPBF)(this.url,e,new S.J({sourceSpatialReference:i}),{query:this.configuration.customParameters,timeout:N,signal:t});return(0,I.lM)(s)}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:i}=this,{data:s}=await(0,O.executeQuery)(this.url,e,i,{query:this.configuration.customParameters,timeout:N,signal:t});return(0,I.h_)(s,this.objectIdField)}_createCountQuery(e){const t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e){const t=this._createBaseQuery(e);return t.outFields=this.globalIdField?[this.globalIdField,this.objectIdField]:[this.objectIdField],t.returnGeometry=!0,(0,o.pC)(e)&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){const t=new _.Z({returnZ:!1,returnM:!1,geometry:(0,o.pC)(this.tileInfo)&&(0,o.pC)(e)?(0,F.HH)(e.data.extent,this.tileInfo.spatialReference):void 0}),i=this.configuration.filter;return(0,o.pC)(i)&&(t.where=i.where,t.gdbVersion=i.gdbVersion,t.timeExtent=i.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,i){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:s,supportsCacheHint:r,tileMaxRecordCount:n,maxRecordCount:o,supportsResultType:a}=this.capabilities.query,l=s?_.Z.MAX_MAX_RECORD_COUNT_FACTOR:1,u=l*((a||r)&&n?n:o||j);return e.start=t,s?(e.maxRecordCountFactor=Math.min(l,Math.ceil(i/u)),e.num=Math.min(i,e.maxRecordCountFactor*u)):e.num=Math.min(i,u),!0}};(0,s._)([(0,u.Cb)({constructOnly:!0})],A.prototype,"url",void 0),(0,s._)([(0,u.Cb)({constructOnly:!0})],A.prototype,"objectIdField",void 0),(0,s._)([(0,u.Cb)({constructOnly:!0})],A.prototype,"globalIdField",void 0),(0,s._)([(0,u.Cb)({constructOnly:!0})],A.prototype,"capabilities",void 0),(0,s._)([(0,u.Cb)({constructOnly:!0})],A.prototype,"sourceSpatialReference",void 0),(0,s._)([(0,u.Cb)({constructOnly:!0})],A.prototype,"spatialReference",void 0),(0,s._)([(0,u.Cb)({constructOnly:!0})],A.prototype,"store",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],A.prototype,"minimumVerticesPerFeature",null),(0,s._)([(0,u.Cb)()],A.prototype,"filter",null),(0,s._)([(0,u.Cb)()],A.prototype,"customParameters",null),(0,s._)([(0,u.Cb)({readOnly:!0})],A.prototype,"configuration",null),(0,s._)([(0,u.Cb)()],A.prototype,"tileInfo",null),(0,s._)([(0,u.Cb)()],A.prototype,"tileSize",null),(0,s._)([(0,u.Cb)()],A.prototype,"tilesOfInterest",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],A.prototype,"updating",null),(0,s._)([(0,u.Cb)({readOnly:!0})],A.prototype,"availability",void 0),A=(0,s._)([(0,d.j)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],A);const j=2e3,N=6e5,P=1e6,U=25,z=1;var H=i(43090),Z=i(37549);class k{constructor(){this._store=new Map,this._byteSize=0}set(e,t){this.delete(e),this._store.set(e,t),this._byteSize+=t.byteSize}delete(e){const t=this._store.get(e);return!!this._store.delete(e)&&(this._byteSize-=t.byteSize,!0)}get(e){return this._used(e),this._store.get(e)}has(e){return this._used(e),this._store.has(e)}clear(){this._store.clear()}applyByteSizeLimit(e,t){for(const[i,s]of this._store){if(this._byteSize<=e)break;this.delete(i),t(s)}}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}_used(e){const t=this._store.get(e);t&&(this._store.delete(e),this._store.set(e,t))}}let Y=class extends v.Z{constructor(e){super(e),this.tileInfo=null,this.extent=null,this.maximumByteSize=10*H.Y8.MEGABYTES,this.tileBounds=new Z.H,this.tiles=new k,this.refCounts=new Map,this.tileFeatureCounts=new Map,this.tmpBoundingRect=(0,F.Ue)()}add(e,t){const i=[];for(const e of t)this._referenceFeature(e.objectId)===J.ADDED&&i.push(e);this._addTileStorage(e,new Set(t.map((({objectId:e})=>e))),function(e){return e.reduce(((e,t)=>e+function(e){return 32+function(e){if((0,o.Wi)(e))return 0;const t=(0,H.do)(e.lengths,4);return 32+(0,H.do)(e.coords,8)+t}(e.geometry)+(0,H.f2)(e.attributes)}(t)),0)}(t)),this.featureStore.addMany(i),this.tiles.applyByteSizeLimit(this.maximumByteSize,(e=>this._removeTileStorage(e)))}destroy(){this.clear(),this.tileFeatureCounts.clear()}clear(){this.featureStore.clear(),this.tileBounds.clear(),this.tiles.clear(),this.refCounts.clear()}refresh(){this.clear(),this.tileFeatureCounts.clear()}processEdits(e,t,i){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,i)}_addTileStorage(e,t,i){this.tiles.set(e.id,new V(e,t,i)),this.tileBounds.set(e.id,e.extent),this.tileFeatureCounts.set(e.id,t.size)}_remove({id:e}){const t=this.tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){const t=[];for(const i of e.objectIds)this._unreferenceFeature(i)===J.REMOVED&&t.push(i);this.featureStore.removeManyById(t);const i=e.data.id;this.tiles.delete(i),this.tileBounds.delete(i)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(const[,t]of this.tiles){for(const i of e)t.objectIds.delete(i);this.tileFeatureCounts.set(t.data.id,t.objectIds.size)}for(const t of e)this.refCounts.delete(t)}async _processEditsRefetch(e,t,i){const s=(await t(e,i)).features,{hasZ:r,hasM:n}=this.featureStore;for(const e of s){const t=(0,I.$)(this.tmpBoundingRect,e.geometry,r,n);(0,o.Wi)(t)||this.tileBounds.forEachInBounds(t,(t=>{const i=this.tiles.get(t);this.featureStore.add(e),i.objectIds.has(e.objectId)||(i.objectIds.add(e.objectId),this._referenceFeature(e.objectId),this.tileFeatureCounts.set(i.data.id,i.objectIds.size))}))}}process(e,t=(()=>!0)){if((0,o.Wi)(this.tileInfo)||!e.extent||(0,o.pC)(this.extent)&&!(0,F.kK)((0,F.oJ)(this.extent,this.tmpBoundingRect),e.extent))return new L(e);if(this.tiles.has(e.id))return new L(e);const i=this._createTileTree(e,this.tileInfo);return this._simplify(i,t,null,0,1),this._collectMissingTiles(e,i,this.tileInfo)}get debugInfo(){return Array.from(this.tiles.values()).map((({data:e})=>({data:e,featureCount:this.tileFeatureCounts.get(e.id)||0})))}getFeatureCount(e){const t=this.tileFeatureCounts.get(e.id);return null!=t?t:0}async fetchCount(e,t,i,s){const r=this.tileFeatureCounts.get(e.id);if(null!=r)return r;const n=await(0,O.executeQueryForCount)(t,i,s);return this.tileFeatureCounts.set(e.id,n.data.count),n.data.count}_createTileTree(e,t){const i=new X(e.level,e.row,e.col);return t.updateTileInfo(i,g.Z.ExtrapolateOptions.POWER_OF_TWO),this.tileBounds.forEachInBounds(e.extent,(s=>{const r=this.tiles.get(s).data;this._tilesAreRelated(e,r)&&this._populateChildren(i,r,t,this.tileFeatureCounts.get(r.id)||0)})),i}_tilesAreRelated(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;const i=e.level<t.level,s=i?e:t,r=i?t:e,n=1<<r.level-s.level;return Math.floor(r.row/n)===s.row&&Math.floor(r.col/n)===s.col}_populateChildren(e,t,i,s){const r=t.level-e.level-1;if(r<0)return void(e.isLeaf=!0);const n=t.row>>r,a=t.col>>r,l=e.row<<1,u=a-(e.col<<1)+(n-l<<1),h=e.children[u];if((0,o.pC)(h))this._populateChildren(h,t,i,s);else{const r=new X(e.level+1,n,a);i.updateTileInfo(r,g.Z.ExtrapolateOptions.POWER_OF_TWO),e.children[u]=r,this._populateChildren(r,t,i,s)}}_simplify(e,t,i,s,r){const n=r*r;if(e.isLeaf)return t(this.getFeatureCount(e),r)?0:(this._remove(e),(0,o.pC)(i)&&(i.children[s]=null),n);const a=r/2,l=a*a;let u=0;for(let i=0;i<e.children.length;i++){const s=e.children[i];u+=(0,o.pC)(s)?this._simplify(s,t,e,i,a):l}return 0===u?this._mergeChildren(e):1-u/n<W&&(this._purge(e),(0,o.pC)(i)&&(i.children[s]=null),u=n),u}_mergeChildren(e){const t=new Set;let i=0;this._forEachLeaf(e,(e=>{const s=this.tiles.get(e.id);if(s){i+=s.byteSize;for(const e of s.objectIds)t.has(e)||(t.add(e),this._referenceFeature(e));this._remove(e)}})),this._addTileStorage(e,t,i),e.isLeaf=!0,e.children[0]=e.children[1]=e.children[2]=e.children[3]=null,this.tileFeatureCounts.set(e.id,t.size)}_forEachLeaf(e,t){for(const i of e.children)(0,o.Wi)(i)||(i.isLeaf?t(i):this._forEachLeaf(i,t))}_purge(e){if(!(0,o.Wi)(e))if(e.isLeaf)this._remove(e);else for(let t=0;t<e.children.length;t++){const i=e.children[t];this._purge(i),e.children[t]=null}}_collectMissingTiles(e,t,i){const s=new q(i,e,this.extent);return this._collectMissingTilesRecurse(t,s,1),s.info}_collectMissingTilesRecurse(e,t,i){if(e.isLeaf)return;if(!e.hasChildren)return void t.addMissing(e.level,e.row,e.col,i);const s=i/2;for(let i=0;i<e.children.length;i++){const r=e.children[i];(0,o.Wi)(r)?t.addMissing(e.level+1,(e.row<<1)+((2&i)>>1),(e.col<<1)+(1&i),s):this._collectMissingTilesRecurse(r,t,s)}}_referenceFeature(e){const t=(this.refCounts.get(e)||0)+1;return this.refCounts.set(e,t),1===t?J.ADDED:J.UNCHANGED}_unreferenceFeature(e){const t=(this.refCounts.get(e)||0)-1;return 0===t?(this.refCounts.delete(e),J.REMOVED):(t>0&&this.refCounts.set(e,t),J.UNCHANGED)}get test(){return{tiles:Array.from(this.tiles.values()).map((e=>`${e.data.id}:[${Array.from(e.objectIds)}]`)),featureReferences:Array.from(this.refCounts.keys()).map((e=>`${e}:${this.refCounts.get(e)}`))}}};(0,s._)([(0,u.Cb)({constructOnly:!0})],Y.prototype,"featureStore",void 0),(0,s._)([(0,u.Cb)()],Y.prototype,"tileInfo",void 0),(0,s._)([(0,u.Cb)()],Y.prototype,"extent",void 0),(0,s._)([(0,u.Cb)()],Y.prototype,"maximumByteSize",void 0),Y=(0,s._)([(0,d.j)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],Y);class V{constructor(e,t,i){this.data=e,this.objectIds=t,this.byteSize=i}}class X{constructor(e,t,i){this.level=e,this.row=t,this.col=i,this.isLeaf=!1,this.extent=null,this.children=[null,null,null,null]}get hasChildren(){return!this.isLeaf&&((0,o.pC)(this.children[0])||(0,o.pC)(this.children[1])||(0,o.pC)(this.children[2])||(0,o.pC)(this.children[3]))}}class L{constructor(e,t=[]){this.missingTiles=t,this.fullArea=0,this.coveredArea=0,this.fullArea=(0,F.SO)(e.extent),this.coveredArea=this.fullArea}prepend(e){this.missingTiles=e.missingTiles.concat(this.missingTiles),this.coveredArea+=e.coveredArea,this.fullArea+=e.fullArea}}class q{constructor(e,t,i){this.tileInfo=e,this.extent=null,this.info=new L(t),(0,o.pC)(i)&&(this.extent=(0,F.oJ)(i))}addMissing(e,t,i,s){const r={id:null,level:e,row:t,col:i};this.tileInfo.updateTileInfo(r,g.Z.ExtrapolateOptions.POWER_OF_TWO),(0,o.Wi)(r.extent)||(0,o.pC)(this.extent)&&!(0,F.kK)(this.extent,r.extent)||(this.info.missingTiles.push({data:r,resolution:s}),this.info.coveredArea-=(0,F.SO)(r.extent))}}const W=.18751;var J,G;(G=J||(J={}))[G.ADDED=0]="ADDED",G[G.REMOVED=1]="REMOVED",G[G.UNCHANGED=2]="UNCHANGED";let Q=class extends r.Z.EventedAccessor{constructor(){super(...arguments),this.isInitializing=!0,this.whenSetup=(0,a.dD)(),this.handles=new n.Z,this.updatingHandles=new c.t,this.pendingApplyEdits=new Map}get updating(){return this.featureFetcher.updating||this.isInitializing||this.updatingHandles.updating}destroy(){this.featureFetcher.destroy(),this.queryEngine.destroy(),this.featureStore.clear(),this.handles.destroy()}async setup(e){const{geometryType:t,objectIdField:i,timeInfo:s,fields:r}=e.serviceInfo;return this.featureStore=new f.Z({...e.serviceInfo,hasZ:!1,hasM:!1}),this.queryEngine=new m.q({spatialReference:e.spatialReference,featureStore:this.featureStore,geometryType:t,fields:r,hasZ:!1,hasM:!1,objectIdField:i,timeInfo:s?y.Z.fromJSON(s):null}),this.featureFetcher=new A({store:new Y({featureStore:this.featureStore}),url:e.serviceInfo.url,objectIdField:e.serviceInfo.objectIdField,globalIdField:e.serviceInfo.globalIdField,capabilities:e.serviceInfo.capabilities,spatialReference:p.Z.fromJSON(e.spatialReference),sourceSpatialReference:p.Z.fromJSON(e.serviceInfo.spatialReference)}),this.handles.add([this.featureFetcher.watch("availability",(e=>this.emit("notify-availability",{availability:e})),!0),this.watch("updating",(()=>this._notifyUpdating()))]),this.whenSetup.resolve(),this.isInitializing=!1,this.configure(e.configuration)}async configure(e){return await this.updatingHandles.addPromise(this.whenSetup.promise),this._updateFeatureFetcherConfiguration(e),{result:{}}}async fetchCandidates(e,t){return await this.whenSetup.promise,(0,a.k_)(t),{result:await this.queryEngine.executeQueryForSnapping({point:e.point,distance:e.distance,types:e.types,query:(0,o.pC)(e.filter)?e.filter:{where:"1=1"}},(0,o.pC)(t)?t.signal:null)}}async updateTiles(e,t){return await this.updatingHandles.addPromise(this.whenSetup.promise),(0,a.k_)(t),this.featureFetcher.tileSize=e.tileSize,this.featureFetcher.tilesOfInterest=e.tiles,this.featureFetcher.tileInfo=(0,o.pC)(e.tileInfo)?g.Z.fromJSON(e.tileInfo):null,{result:{}}}async refresh(e,t){return await this.updatingHandles.addPromise(this.whenSetup.promise),(0,a.k_)(t),this.featureFetcher.refresh(),{result:{}}}async whenNotUpdating(e,t){return await this.updatingHandles.addPromise(this.whenSetup.promise),(0,a.k_)(t),await(0,l.N1)((()=>!this.updating),t),(0,a.k_)(t),{result:{}}}async getDebugInfo(e,t){return(0,a.k_)(t),{result:this.featureFetcher.debugInfo}}async beginApplyEdits(e,t){this.updatingHandles.addPromise(this.whenSetup.promise),(0,a.k_)(t);const i=(0,a.dD)();return this.pendingApplyEdits.set(e.id,i),this.featureFetcher.applyEdits(i.promise),this.updatingHandles.addPromise(i.promise),{result:{}}}async endApplyEdits(e,t){const i=this.pendingApplyEdits.get(e.id);return i&&i.resolve(e.edits),(0,a.k_)(t),{result:{}}}_updateFeatureFetcherConfiguration(e){this.featureFetcher.filter=(0,o.pC)(e.filter)?_.Z.fromJSON(e.filter):null,this.featureFetcher.customParameters=e.customParameters}_notifyUpdating(){this.emit("notify-updating",{updating:this.updating})}};function $(){return new Q}(0,s._)([(0,u.Cb)({readOnly:!0})],Q.prototype,"updating",null),(0,s._)([(0,u.Cb)()],Q.prototype,"isInitializing",void 0),Q=(0,s._)([(0,d.j)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorker")],Q)}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6208],{84552:(e,t,i)=>{i.d(t,{Z:()=>d});var s,r=i(43697),n=i(96674),o=i(35463),a=i(5600),l=(i(67676),i(80442),i(75215),i(52011)),u=i(78981);let h=s=class extends n.wq{constructor(e){super(e),this.value=0,this.unit="milliseconds"}toMilliseconds(){return(0,o.rJ)(this.value,this.unit,"milliseconds")}clone(){return new s({value:this.value,unit:this.unit})}};(0,r._)([(0,a.Cb)({type:Number,json:{write:!0},nonNullable:!0})],h.prototype,"value",void 0),(0,r._)([(0,a.Cb)({type:u.v.apiValues,json:{type:u.v.jsonValues,read:u.v.read,write:u.v.write},nonNullable:!0})],h.prototype,"unit",void 0),h=s=(0,r._)([(0,l.j)("esri.TimeInterval")],h);const d=h},66643:(e,t,i)=>{i.d(t,{Ed:()=>n,UI:()=>o,mt:()=>l,q6:()=>a});var s=i(70586),r=i(95330);function n(e,t,i){return(0,r.as)(e.map(((e,s)=>t.apply(i,[e,s]))))}async function o(e,t,i){return(await(0,r.as)(e.map(((e,s)=>t.apply(i,[e,s]))))).map((e=>e.value))}async function a(e){if((0,s.Wi)(e))return{ok:!1,error:new Error("no promise provided")};try{return{ok:!0,value:await e}}catch(e){return{ok:!1,error:e}}}async function l(e){try{return{ok:!0,value:await e}}catch(e){return(0,r.r9)(e),{ok:!1,error:e}}}},43090:(e,t,i)=>{function s(e){return 32+e.length}function r(e){if(!e)return 0;let t=32;for(const i in e)if(e.hasOwnProperty(i)){const r=e[i];switch(typeof r){case"string":t+=s(r);break;case"number":t+=16;break;case"boolean":t+=4}}return t}function n(e,t){return 32+e.length*t}var o;i.d(t,{Y8:()=>o,do:()=>n,f2:()=>r}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(o||(o={}))},24133:(e,t,i)=>{i.d(t,{Q:()=>a});var s=i(67676),r=i(70586),n=i(44553),o=i(88764);class a{constructor(e=9,t){this.compareMinX=d,this.compareMinY=c,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),b.prune(),C.prune(),T.prune(),w.prune()}all(e){this._all(this.data,e)}search(e,t){let i=this.data;const s=this._toBBox;if(_(e,i))for(b.clear();i;){for(let r=0,n=i.children.length;r<n;r++){const n=i.children[r],o=i.leaf?s(n):n;_(e,o)&&(i.leaf?t(n):y(e,o)?this._all(n,t):b.push(n))}i=b.pop()}}collides(e){let t=this.data;const i=this._toBBox;if(!_(e,t))return!1;for(b.clear();t;){for(let s=0,r=t.children.length;s<r;s++){const r=t.children[s],n=t.leaf?i(r):r;if(_(e,n)){if(t.leaf||y(e,n))return!0;b.push(r)}}t=b.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),0,e.length-1,0);if(this.data.children.length)if(this.data.height===t.height)this._splitRoot(this.data,t);else{if(this.data.height<t.height){const e=this.data;this.data=t,t=e}this._insert(t,this.data.height-t.height-1,!0)}else this.data=t;return this}insert(e){return e&&this._insert(e,this.data.height-1),this}clear(){return this.data=new E([]),this}remove(e){if(!e)return this;let t,i=this.data,n=null,o=0,a=!1;const l=this._toBBox(e);for(T.clear(),w.clear();i||T.length>0;){var u;if(i||(i=(0,r.j0)(T.pop()),n=T.data[T.length-1],o=null!=(u=w.pop())?u:0,a=!0),i.leaf&&(t=(0,s.cq)(i.children,e,i.children.length,i.indexHint),-1!==t))return i.children.splice(t,1),T.push(i),this._condense(T),this;a||i.leaf||!y(i,l)?n?(o++,i=n.children[o],a=!1):i=null:(T.push(i),w.push(o),o=0,n=i,i=i.children[0])}return this}toJSON(){return this.data}fromJSON(e){return this.data=e,this}_all(e,t){let i=e;for(C.clear();i;){var s;if(!0===i.leaf)for(const e of i.children)t(e);else C.pushArray(i.children);i=null!=(s=C.pop())?s:null}}_build(e,t,i,s){const r=i-t+1;let n=this._maxEntries;if(r<=n){const s=new E(e.slice(t,i+1));return l(s,this._toBBox),s}s||(s=Math.ceil(Math.log(r)/Math.log(n)),n=Math.ceil(r/n**(s-1)));const o=new F([]);o.height=s;const a=Math.ceil(r/n),u=a*Math.ceil(Math.sqrt(n));v(e,t,i,u,this.compareMinX);for(let r=t;r<=i;r+=u){const t=Math.min(r+u-1,i);v(e,r,t,a,this.compareMinY);for(let i=r;i<=t;i+=a){const r=Math.min(i+a-1,t);o.children.push(this._build(e,i,r,s-1))}}return l(o,this._toBBox),o}_chooseSubtree(e,t,i,s){for(;s.push(t),!0!==t.leaf&&s.length-1!==i;){let i,s=1/0,r=1/0;for(let n=0,o=t.children.length;n<o;n++){const o=t.children[n],a=p(o),l=m(e,o)-a;l<r?(r=l,s=a<s?a:s,i=o):l===r&&a<s&&(s=a,i=o)}t=i||t.children[0]}return t}_insert(e,t,i){const s=this._toBBox,r=i?e:s(e);T.clear();const n=this._chooseSubtree(r,this.data,t,T);for(n.children.push(e),h(n,r);t>=0&&T.data[t].children.length>this._maxEntries;)this._split(T,t),t--;this._adjustParentBBoxes(r,T,t)}_split(e,t){const i=e.data[t],s=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,s);const n=this._chooseSplitIndex(i,r,s);if(!n)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=i.children.splice(n,i.children.length-n),a=i.leaf?new E(o):new F(o);a.height=i.height,l(i,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,t){this.data=new F([e,t]),this.data.height=e.height+1,l(this.data,this._toBBox)}_chooseSplitIndex(e,t,i){let s,r,n;s=r=1/0;for(let o=t;o<=i-t;o++){const t=u(e,0,o,this._toBBox),a=u(e,o,i,this._toBBox),l=g(t,a),h=p(t)+p(a);l<s?(s=l,n=o,r=h<r?h:r):l===s&&h<r&&(r=h,n=o)}return n}_chooseSplitAxis(e,t,i){const s=e.leaf?this.compareMinX:d,r=e.leaf?this.compareMinY:c;this._allDistMargin(e,t,i,s)<this._allDistMargin(e,t,i,r)&&e.children.sort(s)}_allDistMargin(e,t,i,s){e.children.sort(s);const r=this._toBBox,n=u(e,0,t,r),o=u(e,i-t,i,r);let a=f(n)+f(o);for(let s=t;s<i-t;s++){const t=e.children[s];h(n,e.leaf?r(t):t),a+=f(n)}for(let s=i-t-1;s>=t;s--){const t=e.children[s];h(o,e.leaf?r(t):t),a+=f(o)}return a}_adjustParentBBoxes(e,t,i){for(let s=i;s>=0;s--)h(t.data[s],e)}_condense(e){for(let t=e.length-1;t>=0;t--){const i=e.data[t];if(0===i.children.length)if(t>0){const r=e.data[t-1],n=r.children;n.splice((0,s.cq)(n,i,n.length,r.indexHint),1)}else this.clear();else l(i,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this.compareMinX=new Function("a","b",t.join(e[0])),this.compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){u(e,0,e.children.length,t,e)}function u(e,t,i,s,r){r||(r=new E([])),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let n,o=t;o<i;o++)n=e.children[o],h(r,e.leaf?s(n):n);return r}function h(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function d(e,t){return e.minX-t.minX}function c(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function f(e){return e.maxX-e.minX+(e.maxY-e.minY)}function m(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){const i=Math.max(e.minX,t.minX),s=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),n=Math.min(e.maxY,t.maxY);return Math.max(0,r-i)*Math.max(0,n-s)}function y(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function _(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e,t,i,s,n){const a=[t,i];for(;a.length;){const t=(0,r.j0)(a.pop()),i=(0,r.j0)(a.pop());if(t-i<=s)continue;const l=i+Math.ceil((t-i)/s/2)*s;(0,o.q)(e,l,i,t,n),a.push(i,l,l,t)}}const b=new n.Z,C=new n.Z,T=new n.Z,w=new n.Z({deallocator:void 0});class x extends class{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}{constructor(){super(...arguments),this.height=1,this.indexHint=new s.SO}}class E extends x{constructor(e){super(),this.children=e,this.leaf=!0}}class F extends x{constructor(e){super(),this.children=e,this.leaf=!1}}},37549:(e,t,i)=>{i.d(t,{H:()=>o});var s=i(80442),r=i(24133);const n={minX:0,minY:0,maxX:0,maxY:0};class o{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new r.Q(9,(0,s.Z)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((i,s)=>{e[t++]=s})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))),this._boundsToLoad.length=0)}}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,i){n.minX=t[0],n.minY=t[1],n.maxX=t[2],n.maxY=t[3],e.search(n,i)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},57191:(e,t,i)=>{i.d(t,{Z:()=>m});var s=i(20102),r=i(32448),n=i(92604),o=i(70586),a=i(60437),l=i(24470),u=i(98732),h=i(37549),d=i(29730),c=i(70272),p=i(5428);const f={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new c.u_(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>((0,o.Wi)(e.centroid)&&(e.centroid=(0,d.Y)(new p.Z,e.geometry,t.hasZ,t.hasM)),e.centroid)};class m{constructor(e){this.geometryInfo=e,this._boundsStore=new h.H,this._featuresById=new Map,this._markedIds=new Set,this.events=new r.Z,this.featureAdapter=f}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){if(!this.numFeatures)return null;const e=(0,l.Ue)(l.Gv);return this._featuresById.forEach((t=>{const i=this._boundsStore.get(t.objectId);i&&(e[0]=Math.min(i[0],e[0]),e[1]=Math.min(i[1],e[1]),e[2]=Math.max(i[2],e[2]),e[3]=Math.max(i[3],e[3]))})),e}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{(0,o.pC)(t.geometry)&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t,i){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,a.JR)(i,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,i)=>{this._markedIds.has(i)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void n.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new s.Z("featurestore:invalid-feature","feature id is missing",{feature:e}));const i=this._featuresById.get(t);let r;if(this._markedIds.add(t),i?(e.displayId=i.displayId,r=this._boundsStore.get(t),this._boundsStore.delete(t)):(0,o.pC)(this.onFeatureAdd)&&this.onFeatureAdd(e),(0,o.Wi)(e.geometry)||!e.geometry.coords||!e.geometry.coords.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);r=(0,u.$)((0,o.pC)(r)?r:(0,l.Ue)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),(0,o.pC)(r)&&this._boundsStore.set(t,r),this._featuresById.set(t,e)}_remove(e){return(0,o.pC)(this.onFeatureRemove)&&this.onFeatureRemove(e),this._markedIds.delete(e.objectId),this._boundsStore.delete(e.objectId),this._featuresById.delete(e.objectId),e}}},1231:(e,t,i)=>{i.d(t,{Z:()=>g});var s,r=i(43697),n=i(35454),o=i(96674),a=i(5600),l=(i(67676),i(80442),i(75215)),u=i(36030),h=i(71715),d=i(52011),c=i(72729),p=i(86719);const f=new n.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let m=s=class extends o.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=-1,this.name=null,this.nullable=!0,this.type=null,this.valueType=null}readDescription(e,{description:t}){let i;try{i=JSON.parse(t)}catch(e){}return i?i.value:null}readValueType(e,{description:t}){let i;try{i=JSON.parse(t)}catch(e){}return i?f.fromJSON(i.fieldValueType):null}clone(){return new s({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType})}};(0,r._)([(0,a.Cb)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,r._)([(0,a.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,r._)([(0,a.Cb)()],m.prototype,"description",void 0),(0,r._)([(0,h.r)("description")],m.prototype,"readDescription",null),(0,r._)([(0,a.Cb)({types:c.V5,json:{read:{reader:c.im},write:!0}})],m.prototype,"domain",void 0),(0,r._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,r._)([(0,a.Cb)({type:l.z8,json:{write:!0}})],m.prototype,"length",void 0),(0,r._)([(0,a.Cb)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,r._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,r._)([(0,u.J)(p.v)],m.prototype,"type",void 0),(0,r._)([(0,a.Cb)()],m.prototype,"valueType",void 0),(0,r._)([(0,h.r)("valueType",["description"])],m.prototype,"readValueType",null),m=s=(0,r._)([(0,d.j)("esri.layers.support.Field")],m);const g=m},39450:(e,t,i)=>{i.d(t,{Z:()=>h});var s,r=i(43697),n=i(96674),o=i(5600),a=(i(67676),i(80442),i(75215)),l=i(52011);let u=s=class extends n.wq{constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new s({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,r._)([(0,o.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"cols",void 0),(0,r._)([(0,o.Cb)({type:a.z8,json:{write:!0}})],u.prototype,"level",void 0),(0,r._)([(0,o.Cb)({type:String,json:{write:!0}})],u.prototype,"levelValue",void 0),(0,r._)([(0,o.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"origin",void 0),(0,r._)([(0,o.Cb)({type:Number,json:{write:!0}})],u.prototype,"resolution",void 0),(0,r._)([(0,o.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"rows",void 0),(0,r._)([(0,o.Cb)({type:Number,json:{write:!0}})],u.prototype,"scale",void 0),u=s=(0,r._)([(0,l.j)("esri.layers.support.LOD")],u);const h=u},11145:(e,t,i)=>{i.d(t,{Z:()=>x});var s,r=i(43697),n=i(35454),o=i(96674),a=i(70586),l=i(67900),u=i(5600),h=(i(67676),i(80442),i(75215)),d=i(71715),c=i(52011),p=i(30556),f=i(13473),m=i(82971),g=i(24470),y=i(8744),_=i(40488),v=i(39450);const b=new n.X({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let C=s=class extends o.wq{constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.minScale=0,this.maxScale=0,this.size=null,this.spatialReference=null}static create(e={}){const{resolutionFactor:t=1,scales:i,size:r=256,spatialReference:n=m.Z.WebMercator,numLODs:o=24}=e;if(!(0,y.JY)(n)){const e=[];if(i)for(let t=0;t<i.length;t++){const s=i[t];e.push({level:t,scale:s,resolution:s})}else{let t=5e-4;for(let i=o-1;i>=0;i--)e.unshift({level:i,scale:t,resolution:t}),t*=2}return new s({dpi:96,lods:e,origin:new f.Z(0,0,n),size:[r,r],spatialReference:n})}const a=(0,y.C5)(n),u=e.origin?new f.Z({x:e.origin.x,y:e.origin.y,spatialReference:n}):new f.Z(a?{x:a.origin[0],y:a.origin[1],spatialReference:n}:{x:0,y:0,spatialReference:n}),h=1/(39.37*(0,l.c9)(n)*96),d=[];if(i)for(let e=0;e<i.length;e++){const t=i[e],s=t*h;d.push({level:e,scale:t,resolution:s})}else{let e=(0,y.sT)(n)?512/r*591657527.5917094:256/r*591657527.591555;const i=Math.ceil(o/t);d.push({level:0,scale:e,resolution:e*h});for(let s=1;s<i;s++){const i=e/2**t,r=i*h;d.push({level:s,scale:i,resolution:r}),e=i}}return new s({dpi:96,lods:d,origin:u,size:[r,r],spatialReference:n})}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const i=(0,y.C5)(e);return e.isWrappable&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return f.Z.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0;const s=[];this._levelToLOD={},e&&(t=-1/0,i=1/0,e.forEach((e=>{s.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,this._levelToLOD[e.level]=e}))),this._set("scales",s),this._set("minScale",t),this._set("maxScale",i),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];{const i=Math.floor(e),s=i+1;return t[i]/(t[i]/t[s])**(e-i)}}scaleToZoom(e){const t=this.scales,i=t.length-1;let s=0;for(;s<i;s++){const i=t[s],r=t[s+1];if(i<=e)return s;if(r===e)return s+1;if(i>e&&r<e)return s+Math.log(i/e)/Math.log(i/r)}return s}snapScale(e,t=.95){const i=this.scaleToZoom(e);return i%Math.floor(i)>=t?this.zoomToScale(Math.ceil(i)):this.zoomToScale(Math.floor(i))}tileAt(e,t,i,s){const r=this.lodAt(e);if(!r)return null;let n,o;if("number"==typeof t)n=t,o=i;else if((0,y.fS)(t.spatialReference,this.spatialReference))n=t.x,o=t.y,s=i;else{const e=(0,_.iV)(t,this.spatialReference);if((0,a.Wi)(e))return null;n=e.x,o=e.y,s=i}const l=r.resolution*this.size[0],u=r.resolution*this.size[1];return s||(s={id:null,level:0,row:0,col:0,extent:(0,g.Ue)()}),s.level=e,s.row=Math.floor((this.origin.y-o)/u+.001),s.col=Math.floor((n-this.origin.x)/l+.001),this.updateTileInfo(s),s}updateTileInfo(e,t=s.ExtrapolateOptions.NONE){let i=this.lodAt(e.level);if(!i&&t===s.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return;const r=e.level-i.level,n=i.resolution*this.size[0]/2**r,o=i.resolution*this.size[1]/2**r;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,g.Ue)()),e.extent[0]=this.origin.x+e.col*n,e.extent[1]=this.origin.y-(e.row+1)*o,e.extent[2]=e.extent[0]+n,e.extent[3]=e.extent[1]+o}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const{resolution:i}=this.lodAt(t.level),s=i*this.size[0],r=i*this.size[1];return e[0]=this.origin.x+t.col*s,e[1]=this.origin.y-(t.row+1)*r,e[2]=e[0]+s,e[3]=e[1]+r,e}lodAt(e){return this._levelToLOD&&this._levelToLOD[e]||null}clone(){return s.fromJSON(this.write({}))}getOrCreateCompatible(e,t){if(256===this.size[0]&&256===this.size[1])return 256===e?this:null;const i=[],r=this.lods.length;for(let e=0;e<r;e++){const s=this.lods[e],r=s.resolution*t;i.push(new v.Z({level:s.level,scale:s.scale,resolution:r}))}return new s({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){const s=e[i];this._upsampleLevels[s.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/s.resolution:0},t=s}}};var T,w;(0,r._)([(0,u.Cb)({type:Number,json:{write:!0}})],C.prototype,"compressionQuality",void 0),(0,r._)([(0,u.Cb)({type:Number,json:{write:!0}})],C.prototype,"dpi",void 0),(0,r._)([(0,u.Cb)({type:String,json:{read:b.read,write:b.write,origins:{"web-scene":{read:!1,write:!1}}}})],C.prototype,"format",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],C.prototype,"isWrappable",null),(0,r._)([(0,u.Cb)({type:f.Z,json:{write:!0}})],C.prototype,"origin",void 0),(0,r._)([(0,d.r)("origin")],C.prototype,"readOrigin",null),(0,r._)([(0,u.Cb)({type:[v.Z],value:null,json:{write:!0}})],C.prototype,"lods",null),(0,r._)([(0,u.Cb)({readOnly:!0})],C.prototype,"minScale",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],C.prototype,"maxScale",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],C.prototype,"scales",void 0),(0,r._)([(0,u.Cb)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],C.prototype,"size",void 0),(0,r._)([(0,d.r)("size",["rows","cols"])],C.prototype,"readSize",null),(0,r._)([(0,p.c)("size",{cols:{type:h.z8},rows:{type:h.z8}})],C.prototype,"writeSize",null),(0,r._)([(0,u.Cb)({type:m.Z,json:{write:!0}})],C.prototype,"spatialReference",void 0),C=s=(0,r._)([(0,c.j)("esri.layers.support.TileInfo")],C),(w=(T=C||(C={})).ExtrapolateOptions||(T.ExtrapolateOptions={}))[w.NONE=0]="NONE",w[w.POWER_OF_TWO=1]="POWER_OF_TWO";const x=C},30547:(e,t,i)=>{i.d(t,{Z:()=>v});var s,r=i(43697),n=i(92835),o=i(84552),a=i(96674),l=i(22974),u=i(70586),h=i(5600),d=(i(75215),i(71715)),c=i(52011),p=i(30556);i(67676),i(80442);let f=s=class extends a.wq{constructor(e){super(e),this.respectsDaylightSaving=!1,this.timezone=null}readRespectsDaylightSaving(e,t){return void 0!==t.respectsDaylightSaving?t.respectsDaylightSaving:void 0!==t.respectDaylightSaving&&t.respectDaylightSaving}clone(){const{respectsDaylightSaving:e,timezone:t}=this;return new s({respectsDaylightSaving:e,timezone:t})}};(0,r._)([(0,h.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"respectsDaylightSaving",void 0),(0,r._)([(0,d.r)("respectsDaylightSaving",["respectsDaylightSaving","respectDaylightSaving"])],f.prototype,"readRespectsDaylightSaving",null),(0,r._)([(0,h.Cb)({type:String,json:{read:{source:"timeZone"},write:{target:"timeZone"}}})],f.prototype,"timezone",void 0),f=s=(0,r._)([(0,c.j)("esri.layers.support.TimeReference")],f);const m=f;var g,y=i(78981);let _=g=class extends a.wq{constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeReference=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const i=new Date(t.timeExtent[0]),s=new Date(t.timeExtent[1]);return new n.Z({start:i,end:s})}writeFullTimeExtent(e,t){e&&(0,u.pC)(e.start)&&(0,u.pC)(e.end)?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?new o.Z({value:t.timeInterval,unit:y.v.fromJSON(t.timeIntervalUnits)}):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?new o.Z({value:t.defaultTimeInterval,unit:y.v.fromJSON(t.defaultTimeIntervalUnits)}):null}writeInterval(e,t){if(e){const i=e.toJSON();t.timeInterval=i.value,t.timeIntervalUnits=i.unit}else t.timeInterval=null,t.timeIntervalUnits=null}clone(){const{cumulative:e,endField:t,hasLiveData:i,interval:s,startField:r,timeReference:n,fullTimeExtent:o,trackIdField:a,useTime:u}=this;return new g({cumulative:e,endField:t,hasLiveData:i,interval:s,startField:r,timeReference:(0,l.d9)(n),fullTimeExtent:(0,l.d9)(o),trackIdField:a,useTime:u})}};(0,r._)([(0,h.Cb)({type:Boolean,json:{read:{source:"exportOptions.timeDataCumulative"},write:{target:"exportOptions.timeDataCumulative"}}})],_.prototype,"cumulative",void 0),(0,r._)([(0,h.Cb)({type:String,json:{read:{source:"endTimeField"},write:{target:"endTimeField",allowNull:!0}}})],_.prototype,"endField",void 0),(0,r._)([(0,h.Cb)({type:n.Z,json:{write:{enabled:!0,allowNull:!0}}})],_.prototype,"fullTimeExtent",void 0),(0,r._)([(0,d.r)("fullTimeExtent",["timeExtent"])],_.prototype,"readFullTimeExtent",null),(0,r._)([(0,p.c)("fullTimeExtent")],_.prototype,"writeFullTimeExtent",null),(0,r._)([(0,h.Cb)({type:Boolean,json:{write:!0}})],_.prototype,"hasLiveData",void 0),(0,r._)([(0,h.Cb)({type:o.Z,json:{write:{enabled:!0,allowNull:!0}}})],_.prototype,"interval",void 0),(0,r._)([(0,d.r)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],_.prototype,"readInterval",null),(0,r._)([(0,p.c)("interval")],_.prototype,"writeInterval",null),(0,r._)([(0,h.Cb)({type:String,json:{read:{source:"startTimeField"},write:{target:"startTimeField",allowNull:!0}}})],_.prototype,"startField",void 0),(0,r._)([(0,h.Cb)({type:m,json:{write:{enabled:!0,allowNull:!0}}})],_.prototype,"timeReference",void 0),(0,r._)([(0,h.Cb)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],_.prototype,"trackIdField",void 0),(0,r._)([(0,h.Cb)({type:Boolean,json:{read:{source:"exportOptions.useTime"},write:{target:"exportOptions.useTime"}}})],_.prototype,"useTime",void 0),_=g=(0,r._)([(0,c.j)("esri.layers.support.TimeInfo")],_);const v=_},72729:(e,t,i)=>{i.d(t,{im:()=>x,V5:()=>w}),i(80442);var s,r=i(43697),n=i(22974),o=i(5600),a=(i(75215),i(36030)),l=i(52011),u=i(96674);i(67676);let h=s=class extends u.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new s({name:this.name,code:this.code})}};(0,r._)([(0,o.Cb)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,r._)([(0,o.Cb)({type:[String,Number],json:{write:!0}})],h.prototype,"code",void 0),h=s=(0,r._)([(0,l.j)("esri.layers.support.CodedValue")],h);const d=new(i(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends u.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,r._)([(0,o.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,r._)([(0,a.J)(d)],c.prototype,"type",void 0),c=(0,r._)([(0,l.j)("esri.layers.support.Domain")],c);const p=c;var f;let m=f=class extends p{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const i=String(e);this.codedValues.some((e=>(String(e.code)===i&&(t=e.name),!!t)))}return t}clone(){return new f({codedValues:(0,n.d9)(this.codedValues),name:this.name})}};(0,r._)([(0,o.Cb)({type:[h],json:{write:!0}})],m.prototype,"codedValues",void 0),(0,r._)([(0,a.J)({codedValue:"coded-value"})],m.prototype,"type",void 0),m=f=(0,r._)([(0,l.j)("esri.layers.support.CodedValueDomain")],m);const g=m;var y;i(92604),i(37697);let _=y=class extends p{constructor(e){super(e),this.type="inherited"}clone(){return new y}};(0,r._)([(0,a.J)({inherited:"inherited"})],_.prototype,"type",void 0),_=y=(0,r._)([(0,l.j)("esri.layers.support.InheritedDomain")],_);const v=_;var b;let C=b=class extends p{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new b({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,r._)([(0,o.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,i){t[i]=[this.minValue||0,e]}}}})],C.prototype,"maxValue",void 0),(0,r._)([(0,o.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[0]},write:{target:"range",writer(e,t,i){t[i]=[e,this.maxValue||0]}}}})],C.prototype,"minValue",void 0),(0,r._)([(0,a.J)({range:"range"})],C.prototype,"type",void 0),C=b=(0,r._)([(0,l.j)("esri.layers.support.RangeDomain")],C);const T=C,w={key:"type",base:p,typeMap:{range:C,"coded-value":g,inherited:v}};function x(e){if(!e||!e.type)return null;switch(e.type){case"range":return T.fromJSON(e);case"codedValue":return g.fromJSON(e);case"inherited":return v.fromJSON(e)}return null}},86719:(e,t,i)=>{i.d(t,{v:()=>s});const s=new(i(35454).X)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml"})},78981:(e,t,i)=>{i.d(t,{v:()=>s});const s=(0,i(35454).w)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},2255:(e,t,i)=>{i.r(t),i.d(t,{FeatureServiceSnappingSourceWorker:()=>Q,default:()=>$});var s=i(43697),r=i(32448),n=i(61247),o=i(70586),a=i(95330),l=i(17445),u=i(5600),h=i(67676),d=(i(80442),i(75215),i(52011)),c=i(72762),p=i(82971),f=i(57191),m=i(41006),g=i(11145),y=i(30547),_=i(57444),v=i(15923);let b=class extends v.Z{constructor(){super(...arguments),this.updating=!1,this.pending=[]}push(e,t){this.pending.push({promise:e,callback:t}),1===this.pending.length&&this._process()}_process(){if(!this.pending.length)return void(this.updating=!1);this.updating=!0;const e=this.pending[0];e.promise.then((t=>e.callback(t))).catch((()=>{})).then((()=>{this.pending.shift(),this._process()}))}};(0,s._)([(0,u.Cb)()],b.prototype,"updating",void 0),b=(0,s._)([(0,d.j)("esri.core.AsyncSequence")],b);var C,T=i(3920),w=i(50758),x=i(92604),E=i(6570),F=i(24470),I=i(98732),S=i(78760),O=i(34599),B=i(66643);class M{constructor(e,t){this.data=e,this.resolution=t,this.state={type:C.CREATED},this.alive=!0}process(e){switch(this.state.type){case C.CREATED:return this.state=this._gotoFetchCount(this.state,e),this.state.task.promise.then(e.resume,e.resume);case C.FETCH_COUNT:break;case C.FETCHED_COUNT:return this.state=this._gotoFetchFeatures(this.state,e),this.state.task.promise.then(e.resume,e.resume);case C.FETCH_FEATURES:break;case C.FETCHED_FEATURES:this.state=this._goToDone(this.state,e);case C.DONE:}return null}get debugInfo(){return{data:this.data,featureCount:this.featureCount,state:this.stateToString}}get featureCount(){switch(this.state.type){case C.CREATED:case C.FETCH_COUNT:return 0;case C.FETCHED_COUNT:return this.state.featureCount;case C.FETCH_FEATURES:return this.state.previous.featureCount;case C.FETCHED_FEATURES:return this.state.features.length;case C.DONE:return this.state.previous.features.length}}get stateToString(){switch(this.state.type){case C.CREATED:return"created";case C.FETCH_COUNT:return"fetch-count";case C.FETCHED_COUNT:return"fetched-count";case C.FETCH_FEATURES:return"fetch-features";case C.FETCHED_FEATURES:return"fetched-features";case C.DONE:return"done"}}_gotoFetchCount(e,t){return{type:C.FETCH_COUNT,previous:e,task:(0,a.vr)((async e=>{const i=await(0,B.mt)(t.fetchCount(this,e));this.state.type===C.FETCH_COUNT&&(this.state=this._gotoFetchedCount(this.state,i.ok?i.value:1/0))}))}}_gotoFetchedCount(e,t){return{type:C.FETCHED_COUNT,featureCount:t,previous:e}}_gotoFetchFeatures(e,t){return{type:C.FETCH_FEATURES,previous:e,task:(0,a.vr)((async i=>{const s=await(0,B.mt)(t.fetchFeatures(this,e.featureCount,i));this.state.type===C.FETCH_FEATURES&&(this.state=this._gotoFetchedFeatures(this.state,s.ok?s.value:[]))}))}}_gotoFetchedFeatures(e,t){return{type:C.FETCHED_FEATURES,previous:e,features:t}}_goToDone(e,t){return t.finish(this,e.features),{type:C.DONE,previous:e}}reset(){const e=this.state;switch(this.state={type:C.CREATED},e.type){case C.CREATED:case C.FETCHED_COUNT:case C.FETCHED_FEATURES:case C.DONE:break;case C.FETCH_COUNT:case C.FETCH_FEATURES:e.task.abort()}}intersects(e){return!(!(0,o.Wi)(e)&&this.data.extent)||((0,F.oJ)(e,R),(0,F.kK)(this.data.extent,R))}}!function(e){e[e.CREATED=0]="CREATED",e[e.FETCH_COUNT=1]="FETCH_COUNT",e[e.FETCHED_COUNT=2]="FETCHED_COUNT",e[e.FETCH_FEATURES=3]="FETCH_FEATURES",e[e.FETCHED_FEATURES=4]="FETCHED_FEATURES",e[e.DONE=5]="DONE"}(C||(C={}));const R=(0,F.Ue)(),D=x.Z.getLogger("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher");let A=class extends T.r{constructor(e){super(e),this.tilesOfInterest=[],this.availability=0,this.pendingTiles=new Map,this.pendingEdits=new b,this.pendingEditsAbortController=new AbortController}get minimumVerticesPerFeature(){var e;switch(null==(e=this.store)?void 0:e.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}set filter(e){const t=this._get("filter"),i=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(i)&&this._set("filter",i)}set customParameters(e){const t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){const t=this._get("tileInfo");t!==e&&((0,o.pC)(e)&&(0,o.pC)(t)&&JSON.stringify(e)===JSON.stringify(t)||(this._set("tileInfo",e),this.store.tileInfo=e))}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this.updatingHandles.updating||this.pendingEdits.updating}initialize(){this._initializeFetchExtent(),this.updatingHandles.add((()=>this.configuration),(()=>this.refresh())),this.updatingHandles.add((()=>this.tilesOfInterest),((e,t)=>{(0,h.fS)(e,t,(({id:e},{id:t})=>e===t))||this._process()}),l.Z_)}destroy(){this.pendingTiles.forEach((e=>this._deletePendingTile(e))),this.pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this.pendingEditsAbortController.abort(),this.pendingEditsAbortController=null}refresh(){this.store.refresh(),this.pendingTiles.forEach((e=>this._deletePendingTile(e))),this._process()}applyEdits(e){this.pendingEdits.push(e,(async e=>{if(0===e.addedFeatures.length&&0===e.updatedFeatures.length&&0===e.deletedFeatures.length)return;for(const[,e]of this.pendingTiles)e.reset();const t={...e,deletedFeatures:e.deletedFeatures.map((({objectId:e,globalId:t})=>e&&-1!==e?e:this._lookupObjectIdByGlobalId(t)))};await this.updatingHandles.addPromise(this.store.processEdits(t,((e,t)=>this._queryFeaturesById(e,t)),this.pendingEditsAbortController.signal)),this._processPendingTiles()}))}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent)return;const e=(0,a.vr)((async e=>{try{var t;const i=await(0,O.executeQueryForExtent)(this.url,new _.Z({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:!!this.capabilities.query.supportsCacheHint||void 0}),{query:this.configuration.customParameters,signal:e});this.store.extent=E.Z.fromJSON(null==(t=i.data)?void 0:t.extent)}catch(e){(0,a.r9)(e),D.warn("Failed to fetch data extent",e)}}));this.updatingHandles.addPromise(e.promise.then((()=>this._process()))),this.handles.add((0,w.kB)((()=>e.abort())))}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this.pendingTiles.values()).map((e=>e.debugInfo)),storedTiles:this.store.debugInfo}}_process(){this._markTilesNotAlive(),this._createPendingTiles(),this._deletePendingTiles(),this._processPendingTiles()}_markTilesNotAlive(){for(const[,e]of this.pendingTiles)e.alive=!1}_createPendingTiles(){const e=this._collectMissingTilesInfo();if(this._setAvailability((0,o.Wi)(e)?1:e.coveredArea/e.fullArea),!(0,o.Wi)(e))for(const{data:t,resolution:i}of e.missingTiles){const e=this.pendingTiles.get(t.id);e?(e.resolution=i,e.alive=!0):this._createPendingTile(t,i)}}_collectMissingTilesInfo(){let e=null;for(let t=this.tilesOfInterest.length-1;t>=0;t--){const i=this.tilesOfInterest[t],s=this.store.process(i,((e,t)=>this._verifyTileComplexity(e,t)));(0,o.Wi)(e)?e=s:e.prepend(s)}return e}_deletePendingTiles(){for(const[,e]of this.pendingTiles)e.alive||this._deletePendingTile(e)}_processPendingTiles(){const e={fetchCount:(e,t)=>this._fetchCount(e,t),fetchFeatures:(e,t,i)=>this._fetchFeatures(e,t,i),finish:(e,t)=>this._finishPendingTile(e,t),resume:()=>this._processPendingTiles()};if(this._ensureFetchAllCounts(e))for(const[,t]of this.pendingTiles)this._verifyTileComplexity(this.store.getFeatureCount(t.data),t.resolution)&&this.updatingHandles.addPromise(t.process(e))}_verifyTileComplexity(e,t){return this._verifyVertexComplexity(e)&&this._verifyFeatureDensity(e,t)}_verifyVertexComplexity(e){return e*this.minimumVerticesPerFeature<P}_verifyFeatureDensity(e,t){if((0,o.Wi)(this.tileInfo))return!1;const i=this.tileSize*t;return e*(U/(i*i))<z}_ensureFetchAllCounts(e){let t=!0;for(const[,i]of this.pendingTiles)i.state.type<C.FETCHED_COUNT&&this.updatingHandles.addPromise(i.process(e)),i.state.type<=C.FETCH_COUNT&&(t=!1);return t}_finishPendingTile(e,t){this.store.add(e.data,t),this._deletePendingTile(e),this._updateAvailability()}_updateAvailability(){const e=this._collectMissingTilesInfo();this._setAvailability((0,o.Wi)(e)?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){const i=new M(e,t);return this.pendingTiles.set(e.id,i),i}_deletePendingTile(e){e.reset(),this.pendingTiles.delete(e.data.id)}async _fetchCount(e,t){return this.store.fetchCount(e.data,this.url,this._createCountQuery(e),{query:this.customParameters,timeout:N,signal:t})}async _fetchFeatures(e,t,i){let s,r=0,n=0,a=t;for(;;){const l=this._createFeaturesQuery(e),u=this._setPagingParameters(l,r,a),{features:h,exceededTransferLimit:d}=await this._queryFeatures(l,i);if(u&&(r+=(0,o.Wg)(l.num)),n+=h.length,s=s?s.concat(h):h,a=t-n,!u||!d||a<=0)return s}}_filterProperties(e){return(0,o.Wi)(e)?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}_lookupObjectIdByGlobalId(e){const t=this.globalIdField,i=this.objectIdField;if((0,o.Wi)(t))throw new Error("Expected globalIdField to be defined");let s=null;if(this.store.featureStore.forEach((r=>{var n;e===r.attributes[t]&&(s=null!=(n=r.objectId)?n:r.attributes[i])})),(0,o.Wi)(s))throw new Error(`Expected to find a feature with globalId ${e}`);return s}_queryFeaturesById(e,t){const i=this._createFeaturesQuery(null);return i.objectIds=e,this._queryFeatures(i,t)}_queryFeatures(e,t){return this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:i}=this,{data:s}=await(0,O.executeQueryPBF)(this.url,e,new S.J({sourceSpatialReference:i}),{query:this.configuration.customParameters,timeout:N,signal:t});return(0,I.lM)(s)}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:i}=this,{data:s}=await(0,O.executeQuery)(this.url,e,i,{query:this.configuration.customParameters,timeout:N,signal:t});return(0,I.h_)(s,this.objectIdField)}_createCountQuery(e){const t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e){const t=this._createBaseQuery(e);return t.outFields=this.globalIdField?[this.globalIdField,this.objectIdField]:[this.objectIdField],t.returnGeometry=!0,(0,o.pC)(e)&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){const t=new _.Z({returnZ:!1,returnM:!1,geometry:(0,o.pC)(this.tileInfo)&&(0,o.pC)(e)?(0,F.HH)(e.data.extent,this.tileInfo.spatialReference):void 0}),i=this.configuration.filter;return(0,o.pC)(i)&&(t.where=i.where,t.gdbVersion=i.gdbVersion,t.timeExtent=i.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,i){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:s,supportsCacheHint:r,tileMaxRecordCount:n,maxRecordCount:o,supportsResultType:a}=this.capabilities.query,l=s?_.Z.MAX_MAX_RECORD_COUNT_FACTOR:1,u=l*((a||r)&&n?n:o||j);return e.start=t,s?(e.maxRecordCountFactor=Math.min(l,Math.ceil(i/u)),e.num=Math.min(i,e.maxRecordCountFactor*u)):e.num=Math.min(i,u),!0}};(0,s._)([(0,u.Cb)({constructOnly:!0})],A.prototype,"url",void 0),(0,s._)([(0,u.Cb)({constructOnly:!0})],A.prototype,"objectIdField",void 0),(0,s._)([(0,u.Cb)({constructOnly:!0})],A.prototype,"globalIdField",void 0),(0,s._)([(0,u.Cb)({constructOnly:!0})],A.prototype,"capabilities",void 0),(0,s._)([(0,u.Cb)({constructOnly:!0})],A.prototype,"sourceSpatialReference",void 0),(0,s._)([(0,u.Cb)({constructOnly:!0})],A.prototype,"spatialReference",void 0),(0,s._)([(0,u.Cb)({constructOnly:!0})],A.prototype,"store",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],A.prototype,"minimumVerticesPerFeature",null),(0,s._)([(0,u.Cb)()],A.prototype,"filter",null),(0,s._)([(0,u.Cb)()],A.prototype,"customParameters",null),(0,s._)([(0,u.Cb)({readOnly:!0})],A.prototype,"configuration",null),(0,s._)([(0,u.Cb)()],A.prototype,"tileInfo",null),(0,s._)([(0,u.Cb)()],A.prototype,"tileSize",null),(0,s._)([(0,u.Cb)()],A.prototype,"tilesOfInterest",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],A.prototype,"updating",null),(0,s._)([(0,u.Cb)({readOnly:!0})],A.prototype,"availability",void 0),A=(0,s._)([(0,d.j)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],A);const j=2e3,N=6e5,P=1e6,U=25,z=1;var H=i(43090),Z=i(37549);class k{constructor(){this._store=new Map,this._byteSize=0}set(e,t){this.delete(e),this._store.set(e,t),this._byteSize+=t.byteSize}delete(e){const t=this._store.get(e);return!!this._store.delete(e)&&(this._byteSize-=t.byteSize,!0)}get(e){return this._used(e),this._store.get(e)}has(e){return this._used(e),this._store.has(e)}clear(){this._store.clear()}applyByteSizeLimit(e,t){for(const[i,s]of this._store){if(this._byteSize<=e)break;this.delete(i),t(s)}}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}_used(e){const t=this._store.get(e);t&&(this._store.delete(e),this._store.set(e,t))}}let Y=class extends v.Z{constructor(e){super(e),this.tileInfo=null,this.extent=null,this.maximumByteSize=10*H.Y8.MEGABYTES,this.tileBounds=new Z.H,this.tiles=new k,this.refCounts=new Map,this.tileFeatureCounts=new Map,this.tmpBoundingRect=(0,F.Ue)()}add(e,t){const i=[];for(const e of t)this._referenceFeature(e.objectId)===J.ADDED&&i.push(e);this._addTileStorage(e,new Set(t.map((({objectId:e})=>e))),function(e){return e.reduce(((e,t)=>e+function(e){return 32+function(e){if((0,o.Wi)(e))return 0;const t=(0,H.do)(e.lengths,4);return 32+(0,H.do)(e.coords,8)+t}(e.geometry)+(0,H.f2)(e.attributes)}(t)),0)}(t)),this.featureStore.addMany(i),this.tiles.applyByteSizeLimit(this.maximumByteSize,(e=>this._removeTileStorage(e)))}destroy(){this.clear(),this.tileFeatureCounts.clear()}clear(){this.featureStore.clear(),this.tileBounds.clear(),this.tiles.clear(),this.refCounts.clear()}refresh(){this.clear(),this.tileFeatureCounts.clear()}processEdits(e,t,i){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,i)}_addTileStorage(e,t,i){this.tiles.set(e.id,new V(e,t,i)),this.tileBounds.set(e.id,e.extent),this.tileFeatureCounts.set(e.id,t.size)}_remove({id:e}){const t=this.tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){const t=[];for(const i of e.objectIds)this._unreferenceFeature(i)===J.REMOVED&&t.push(i);this.featureStore.removeManyById(t);const i=e.data.id;this.tiles.delete(i),this.tileBounds.delete(i)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(const[,t]of this.tiles){for(const i of e)t.objectIds.delete(i);this.tileFeatureCounts.set(t.data.id,t.objectIds.size)}for(const t of e)this.refCounts.delete(t)}async _processEditsRefetch(e,t,i){const s=(await t(e,i)).features,{hasZ:r,hasM:n}=this.featureStore;for(const e of s){const t=(0,I.$)(this.tmpBoundingRect,e.geometry,r,n);(0,o.Wi)(t)||this.tileBounds.forEachInBounds(t,(t=>{const i=this.tiles.get(t);this.featureStore.add(e),i.objectIds.has(e.objectId)||(i.objectIds.add(e.objectId),this._referenceFeature(e.objectId),this.tileFeatureCounts.set(i.data.id,i.objectIds.size))}))}}process(e,t=(()=>!0)){if((0,o.Wi)(this.tileInfo)||!e.extent||(0,o.pC)(this.extent)&&!(0,F.kK)((0,F.oJ)(this.extent,this.tmpBoundingRect),e.extent))return new L(e);if(this.tiles.has(e.id))return new L(e);const i=this._createTileTree(e,this.tileInfo);return this._simplify(i,t,null,0,1),this._collectMissingTiles(e,i,this.tileInfo)}get debugInfo(){return Array.from(this.tiles.values()).map((({data:e})=>({data:e,featureCount:this.tileFeatureCounts.get(e.id)||0})))}getFeatureCount(e){const t=this.tileFeatureCounts.get(e.id);return null!=t?t:0}async fetchCount(e,t,i,s){const r=this.tileFeatureCounts.get(e.id);if(null!=r)return r;const n=await(0,O.executeQueryForCount)(t,i,s);return this.tileFeatureCounts.set(e.id,n.data.count),n.data.count}_createTileTree(e,t){const i=new X(e.level,e.row,e.col);return t.updateTileInfo(i,g.Z.ExtrapolateOptions.POWER_OF_TWO),this.tileBounds.forEachInBounds(e.extent,(s=>{const r=this.tiles.get(s).data;this._tilesAreRelated(e,r)&&this._populateChildren(i,r,t,this.tileFeatureCounts.get(r.id)||0)})),i}_tilesAreRelated(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;const i=e.level<t.level,s=i?e:t,r=i?t:e,n=1<<r.level-s.level;return Math.floor(r.row/n)===s.row&&Math.floor(r.col/n)===s.col}_populateChildren(e,t,i,s){const r=t.level-e.level-1;if(r<0)return void(e.isLeaf=!0);const n=t.row>>r,a=t.col>>r,l=e.row<<1,u=a-(e.col<<1)+(n-l<<1),h=e.children[u];if((0,o.pC)(h))this._populateChildren(h,t,i,s);else{const r=new X(e.level+1,n,a);i.updateTileInfo(r,g.Z.ExtrapolateOptions.POWER_OF_TWO),e.children[u]=r,this._populateChildren(r,t,i,s)}}_simplify(e,t,i,s,r){const n=r*r;if(e.isLeaf)return t(this.getFeatureCount(e),r)?0:(this._remove(e),(0,o.pC)(i)&&(i.children[s]=null),n);const a=r/2,l=a*a;let u=0;for(let i=0;i<e.children.length;i++){const s=e.children[i];u+=(0,o.pC)(s)?this._simplify(s,t,e,i,a):l}return 0===u?this._mergeChildren(e):1-u/n<W&&(this._purge(e),(0,o.pC)(i)&&(i.children[s]=null),u=n),u}_mergeChildren(e){const t=new Set;let i=0;this._forEachLeaf(e,(e=>{const s=this.tiles.get(e.id);if(s){i+=s.byteSize;for(const e of s.objectIds)t.has(e)||(t.add(e),this._referenceFeature(e));this._remove(e)}})),this._addTileStorage(e,t,i),e.isLeaf=!0,e.children[0]=e.children[1]=e.children[2]=e.children[3]=null,this.tileFeatureCounts.set(e.id,t.size)}_forEachLeaf(e,t){for(const i of e.children)(0,o.Wi)(i)||(i.isLeaf?t(i):this._forEachLeaf(i,t))}_purge(e){if(!(0,o.Wi)(e))if(e.isLeaf)this._remove(e);else for(let t=0;t<e.children.length;t++){const i=e.children[t];this._purge(i),e.children[t]=null}}_collectMissingTiles(e,t,i){const s=new q(i,e,this.extent);return this._collectMissingTilesRecurse(t,s,1),s.info}_collectMissingTilesRecurse(e,t,i){if(e.isLeaf)return;if(!e.hasChildren)return void t.addMissing(e.level,e.row,e.col,i);const s=i/2;for(let i=0;i<e.children.length;i++){const r=e.children[i];(0,o.Wi)(r)?t.addMissing(e.level+1,(e.row<<1)+((2&i)>>1),(e.col<<1)+(1&i),s):this._collectMissingTilesRecurse(r,t,s)}}_referenceFeature(e){const t=(this.refCounts.get(e)||0)+1;return this.refCounts.set(e,t),1===t?J.ADDED:J.UNCHANGED}_unreferenceFeature(e){const t=(this.refCounts.get(e)||0)-1;return 0===t?(this.refCounts.delete(e),J.REMOVED):(t>0&&this.refCounts.set(e,t),J.UNCHANGED)}get test(){return{tiles:Array.from(this.tiles.values()).map((e=>`${e.data.id}:[${Array.from(e.objectIds)}]`)),featureReferences:Array.from(this.refCounts.keys()).map((e=>`${e}:${this.refCounts.get(e)}`))}}};(0,s._)([(0,u.Cb)({constructOnly:!0})],Y.prototype,"featureStore",void 0),(0,s._)([(0,u.Cb)()],Y.prototype,"tileInfo",void 0),(0,s._)([(0,u.Cb)()],Y.prototype,"extent",void 0),(0,s._)([(0,u.Cb)()],Y.prototype,"maximumByteSize",void 0),Y=(0,s._)([(0,d.j)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],Y);class V{constructor(e,t,i){this.data=e,this.objectIds=t,this.byteSize=i}}class X{constructor(e,t,i){this.level=e,this.row=t,this.col=i,this.isLeaf=!1,this.extent=null,this.children=[null,null,null,null]}get hasChildren(){return!this.isLeaf&&((0,o.pC)(this.children[0])||(0,o.pC)(this.children[1])||(0,o.pC)(this.children[2])||(0,o.pC)(this.children[3]))}}class L{constructor(e,t=[]){this.missingTiles=t,this.fullArea=0,this.coveredArea=0,this.fullArea=(0,F.SO)(e.extent),this.coveredArea=this.fullArea}prepend(e){this.missingTiles=e.missingTiles.concat(this.missingTiles),this.coveredArea+=e.coveredArea,this.fullArea+=e.fullArea}}class q{constructor(e,t,i){this.tileInfo=e,this.extent=null,this.info=new L(t),(0,o.pC)(i)&&(this.extent=(0,F.oJ)(i))}addMissing(e,t,i,s){const r={id:null,level:e,row:t,col:i};this.tileInfo.updateTileInfo(r,g.Z.ExtrapolateOptions.POWER_OF_TWO),(0,o.Wi)(r.extent)||(0,o.pC)(this.extent)&&!(0,F.kK)(this.extent,r.extent)||(this.info.missingTiles.push({data:r,resolution:s}),this.info.coveredArea-=(0,F.SO)(r.extent))}}const W=.18751;var J,G;(G=J||(J={}))[G.ADDED=0]="ADDED",G[G.REMOVED=1]="REMOVED",G[G.UNCHANGED=2]="UNCHANGED";let Q=class extends r.Z.EventedAccessor{constructor(){super(...arguments),this.isInitializing=!0,this.whenSetup=(0,a.dD)(),this.handles=new n.Z,this.updatingHandles=new c.t,this.pendingApplyEdits=new Map}get updating(){return this.featureFetcher.updating||this.isInitializing||this.updatingHandles.updating}destroy(){this.featureFetcher.destroy(),this.queryEngine.destroy(),this.featureStore.clear(),this.handles.destroy()}async setup(e){const{geometryType:t,objectIdField:i,timeInfo:s,fields:r}=e.serviceInfo;return this.featureStore=new f.Z({...e.serviceInfo,hasZ:!1,hasM:!1}),this.queryEngine=new m.q({spatialReference:e.spatialReference,featureStore:this.featureStore,geometryType:t,fields:r,hasZ:!1,hasM:!1,objectIdField:i,timeInfo:s?y.Z.fromJSON(s):null}),this.featureFetcher=new A({store:new Y({featureStore:this.featureStore}),url:e.serviceInfo.url,objectIdField:e.serviceInfo.objectIdField,globalIdField:e.serviceInfo.globalIdField,capabilities:e.serviceInfo.capabilities,spatialReference:p.Z.fromJSON(e.spatialReference),sourceSpatialReference:p.Z.fromJSON(e.serviceInfo.spatialReference)}),this.handles.add([this.featureFetcher.watch("availability",(e=>this.emit("notify-availability",{availability:e})),!0),this.watch("updating",(()=>this._notifyUpdating()))]),this.whenSetup.resolve(),this.isInitializing=!1,this.configure(e.configuration)}async configure(e){return await this.updatingHandles.addPromise(this.whenSetup.promise),this._updateFeatureFetcherConfiguration(e),{result:{}}}async fetchCandidates(e,t){return await this.whenSetup.promise,(0,a.k_)(t),{result:await this.queryEngine.executeQueryForSnapping({point:e.point,distance:e.distance,types:e.types,query:(0,o.pC)(e.filter)?e.filter:{where:"1=1"}},(0,o.pC)(t)?t.signal:null)}}async updateTiles(e,t){return await this.updatingHandles.addPromise(this.whenSetup.promise),(0,a.k_)(t),this.featureFetcher.tileSize=e.tileSize,this.featureFetcher.tilesOfInterest=e.tiles,this.featureFetcher.tileInfo=(0,o.pC)(e.tileInfo)?g.Z.fromJSON(e.tileInfo):null,{result:{}}}async refresh(e,t){return await this.updatingHandles.addPromise(this.whenSetup.promise),(0,a.k_)(t),this.featureFetcher.refresh(),{result:{}}}async whenNotUpdating(e,t){return await this.updatingHandles.addPromise(this.whenSetup.promise),(0,a.k_)(t),await(0,l.N1)((()=>!this.updating),t),(0,a.k_)(t),{result:{}}}async getDebugInfo(e,t){return(0,a.k_)(t),{result:this.featureFetcher.debugInfo}}async beginApplyEdits(e,t){this.updatingHandles.addPromise(this.whenSetup.promise),(0,a.k_)(t);const i=(0,a.dD)();return this.pendingApplyEdits.set(e.id,i),this.featureFetcher.applyEdits(i.promise),this.updatingHandles.addPromise(i.promise),{result:{}}}async endApplyEdits(e,t){const i=this.pendingApplyEdits.get(e.id);return i&&i.resolve(e.edits),(0,a.k_)(t),{result:{}}}_updateFeatureFetcherConfiguration(e){this.featureFetcher.filter=(0,o.pC)(e.filter)?_.Z.fromJSON(e.filter):null,this.featureFetcher.customParameters=e.customParameters}_notifyUpdating(){this.emit("notify-updating",{updating:this.updating})}};function $(){return new Q}(0,s._)([(0,u.Cb)({readOnly:!0})],Q.prototype,"updating",null),(0,s._)([(0,u.Cb)()],Q.prototype,"isInitializing",void 0),Q=(0,s._)([(0,d.j)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorker")],Q)}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5906],{38171:(e,t,r)=>{r.d(t,{Z:()=>f});var i=r(43697),s=r(66577),n=r(51773),a=r(78223),l=r(2368),o=r(96674),u=r(70586),p=r(99001),d=r(5600),c=(r(67676),r(80442),r(75215),r(52011)),m=r(33955);function h(e){if(!(0,u.pC)(e))return null;const t={};for(const r in e){const i=e[r];i&&(t[r]=i.toJSON())}return 0!==Object.keys(t).length?t:null}let y=class extends((0,l.J)(o.wq)){constructor(...e){super(...e),this.isAggregate=!1,this.layer=null,this.popupTemplate=null,this.sourceLayer=null,Object.defineProperty(this,"uid",{value:(0,p.D)(),configurable:!0})}normalizeCtorArgs(e,t,r,i){return e&&!e.declaredClass?e:{geometry:e,symbol:t,attributes:r,popupTemplate:i}}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),this._notifyLayer("geometry",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;for(const t of[this.sourceLayer,this.layer])if(t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&(0,u.pC)(t.defaultPopupTemplate))return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes&&this.attributes[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t},this._notifyLayer("attributes",void 0,t,e)}getObjectId(){return this.sourceLayer&&"objectIdField"in this.sourceLayer&&this.sourceLayer.objectIdField?this.getAttribute(this.sourceLayer.objectIdField):null}toJSON(){return{aggregateGeometries:h(this.aggregateGeometries),geometry:(0,u.pC)(this.geometry)?this.geometry.toJSON():null,symbol:(0,u.pC)(this.symbol)?this.symbol.toJSON():null,attributes:{...this.attributes},popupTemplate:this.popupTemplate&&this.popupTemplate.toJSON()}}notifyGeometryChanged(){this._notifyLayer("geometry",this.geometry,this.geometry)}notifyMeshTransformChanged(){(0,u.pC)(this.geometry)&&"mesh"===this.geometry.type&&this._notifyLayer("transform",this.geometry.transform,this.geometry.transform)}_notifyLayer(e,t,r,i){if(!this.layer||!("graphicChanged"in this.layer))return;const s={graphic:this,property:e,oldValue:t,newValue:r};"attributes"===e&&(s.attributeName=i),this.layer.graphicChanged(s)}};(0,i._)([(0,d.Cb)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const i=(0,m.im)(e[r]);i&&(t[r]=i)}return 0!==Object.keys(t).length?t:null}}})],y.prototype,"aggregateGeometries",null),(0,i._)([(0,d.Cb)({value:null})],y.prototype,"attributes",null),(0,i._)([(0,d.Cb)({value:null,types:s.qM,json:{read:m.im}})],y.prototype,"geometry",null),(0,i._)([(0,d.Cb)({type:Boolean})],y.prototype,"isAggregate",void 0),(0,i._)([(0,d.Cb)({clonable:"reference"})],y.prototype,"layer",void 0),(0,i._)([(0,d.Cb)({type:n.Z})],y.prototype,"popupTemplate",void 0),(0,i._)([(0,d.Cb)({clonable:"reference"})],y.prototype,"sourceLayer",void 0),(0,i._)([(0,d.Cb)({value:null,types:a.LB})],y.prototype,"symbol",null),(0,i._)([(0,d.Cb)({type:Boolean,value:!0})],y.prototype,"visible",null),y=(0,i._)([(0,c.j)("esri.Graphic")],y),(y||(y={})).generateUID=p.D;const f=y},84552:(e,t,r)=>{r.d(t,{Z:()=>d});var i,s=r(43697),n=r(96674),a=r(35463),l=r(5600),o=(r(67676),r(80442),r(75215),r(52011)),u=r(78981);let p=i=class extends n.wq{constructor(e){super(e),this.value=0,this.unit="milliseconds"}toMilliseconds(){return(0,a.rJ)(this.value,this.unit,"milliseconds")}clone(){return new i({value:this.value,unit:this.unit})}};(0,s._)([(0,l.Cb)({type:Number,json:{write:!0},nonNullable:!0})],p.prototype,"value",void 0),(0,s._)([(0,l.Cb)({type:u.v.apiValues,json:{type:u.v.jsonValues,read:u.v.read,write:u.v.write},nonNullable:!0})],p.prototype,"unit",void 0),p=i=(0,s._)([(0,o.j)("esri.TimeInterval")],p);const d=p},57435:(e,t,r)=>{r.d(t,{Z:()=>d});var i=r(43697),s=r(80539),n=r(3920),a=r(70586),l=(r(95330),r(26258),r(87538)),o=r(5600),u=(r(67676),r(80442),r(75215),r(52011));let p=class extends((0,n.p)(s.Z)){constructor(e){super(e),this.getCollections=null}initialize(){this.handles.add((0,l.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=(0,a.pC)(this.getCollections)?this.getCollections():null;if((0,a.Wi)(e))return void this.removeAll();let t=0;for(const r of e)(0,a.pC)(r)&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new s.Z(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction?this.itemFilterFunction:e=>!!e;for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i._)([(0,o.Cb)()],p.prototype,"getCollections",void 0),(0,i._)([(0,o.Cb)()],p.prototype,"getChildrenFunction",void 0),(0,i._)([(0,o.Cb)()],p.prototype,"itemFilterFunction",void 0),p=(0,i._)([(0,u.j)("esri.core.CollectionFlattener")],p);const d=p},91040:(e,t,r)=>{r.d(t,{yZ:()=>s});var i=r(67900);function s(e,t){const r=t||e.extent,s=e.width,n=(0,i.c9)(r&&r.spatialReference);return r&&s?r.width/s*n*i.hd*96:0}},25906:(e,t,r)=>{r.r(t),r.d(t,{default:()=>ve});var i=r(43697),s=r(68773),n=r(38171),a=r(51773),l=r(3172),o=r(80539),u=r(57435),p=r(3920),d=r(35454),c=r(22974),m=r(70586),h=r(16453),y=r(95330),f=r(17452),g=r(5600),b=r(75215),v=r(71715),w=r(52011),_=r(30556),x=r(76169),C=r(6570),I=r(82971),S=r(91040),E=r(8744),N=r(29600),T=r(71612),O=r(38009),F=r(16859),U=r(34760),L=r(72965),R=r(28294),j=r(52162),P=r(66677),A=r(21506),M=r(15923);r(67676),r(80442);const D={visible:"visibleSublayers"};let Z=class extends((0,p.p)(M.Z)){constructor(e){super(e),this.scale=0}set layer(e){this._get("layer")!==e&&(this._set("layer",e),this.handles.remove("layer"),e&&this.handles.add([e.sublayers.on("change",(()=>this.notifyChange("visibleSublayers"))),e.on("wms-sublayer-update",(e=>this.notifyChange(D[e.propertyName])))],"layer"))}get layers(){const{visibleSublayers:e}=this;return e.filter((e=>e.name)).map((e=>e.name)).join(",")}get version(){this.commitProperty("layers");const e=this.layer;return e&&e.commitProperty("imageTransparency"),(this._get("version")||0)+1}get visibleSublayers(){const{layer:e,scale:t}=this,r=null==e?void 0:e.sublayers,i=[],s=e=>{const{minScale:r,maxScale:n,sublayers:a,visible:l}=e;l&&(0===t||(0===r||t<=r)&&(0===n||t>=n))&&(a?a.forEach(s):i.unshift(e))};return null==r||r.forEach(s),i}toJSON(){const{layer:e,layers:t}=this,{imageFormat:r,imageTransparency:i,version:s}=e;return{format:r,request:"GetMap",service:"WMS",styles:"",transparent:i?"TRUE":"FALSE",version:s,layers:t}}};(0,i._)([(0,g.Cb)()],Z.prototype,"layer",null),(0,i._)([(0,g.Cb)({readOnly:!0})],Z.prototype,"layers",null),(0,i._)([(0,g.Cb)({type:Number})],Z.prototype,"scale",void 0),(0,i._)([(0,g.Cb)({readOnly:!0})],Z.prototype,"version",null),(0,i._)([(0,g.Cb)({readOnly:!0})],Z.prototype,"visibleSublayers",null),Z=(0,i._)([(0,w.j)("esri.layers.support.ExportWMSImageParameters")],Z);var q,k=r(61247),V=r(90578);let B=0,W=q=class extends h.w{constructor(e){super(e),this._sublayersHandles=new k.Z,this.dimensions=null,this.fullExtents=null,this.featureInfoFormat=null,this.featureInfoUrl=null,this.legendUrl=null,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.popupEnabled=!1,this.queryable=!1,this.spatialReferences=null}get description(){return this._get("description")}set description(e){this._set("description",e)}get fullExtent(){return this._get("fullExtent")}set fullExtent(e){this._set("fullExtent",e)}readExtent(e,t){return(e=t.extent)?C.Z.fromJSON(e):null}get id(){const e=this._get("id");return null==e?B++:e}set id(e){this._set("id",e)}readLegendUrl(e,t){return t?t.legendUrl||t.legendURL:null}set layer(e){this._set("layer",e),this.sublayers&&this.sublayers.forEach((t=>t.layer=e))}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}get name(){return this._get("name")}set name(e){this._set("name",e)}set sublayers(e){const t=this._get("sublayers");t&&(t.forEach((e=>{e.layer=null})),this._sublayersHandles.removeAll(),this._sublayersHandles=null),e&&(e.forEach((e=>{e.parent=this,e.layer=this.layer})),this._sublayersHandles.add([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this.layer})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null}))])),this._set("sublayers",e)}castSublayers(e){return(0,b.se)(o.Z.ofType(q),e)}get title(){return this._get("title")}set title(e){this._set("title",e)}get visible(){return this._get("visible")}set visible(e){this._setAndNotifyLayer("visible",e)}clone(){const e=new q;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent.clone()),this.hasOwnProperty("fullExtents")&&(e.fullExtents=this.fullExtents.map((e=>e.clone()))),this.hasOwnProperty("featureInfoFormat")&&(e.featureInfoFormat=this.featureInfoFormat),this.hasOwnProperty("featureInfoUrl")&&(e.featureInfoUrl=this.featureInfoUrl),this.hasOwnProperty("legendUrl")&&(e.legendUrl=this.legendUrl),this.hasOwnProperty("legendEnabled")&&(e.legendEnabled=this.legendEnabled),this.hasOwnProperty("layer")&&(e.layer=this.layer),this.hasOwnProperty("name")&&(e.name=this.name),this.hasOwnProperty("parent")&&(e.parent=this.parent),this.hasOwnProperty("queryable")&&(e.queryable=this.queryable),this.hasOwnProperty("sublayers")&&(e.sublayers=this.sublayers&&this.sublayers.map((e=>e.clone()))),this.hasOwnProperty("spatialReferences")&&(e.spatialReferences=this.spatialReferences.map((e=>e))),this.hasOwnProperty("visible")&&(e.visible=this.visible),this.hasOwnProperty("title")&&(e.title=this.title),e}_setAndNotifyLayer(e,t){const r=this.layer;this._get(e)!==t&&(this._set(e,t),r&&r.emit("wms-sublayer-update",{propertyName:e,id:this.id}))}};(0,i._)([(0,g.Cb)()],W.prototype,"description",null),(0,i._)([(0,g.Cb)({readOnly:!0})],W.prototype,"dimensions",void 0),(0,i._)([(0,g.Cb)({value:null})],W.prototype,"fullExtent",null),(0,i._)([(0,v.r)("fullExtent",["extent"])],W.prototype,"readExtent",null),(0,i._)([(0,g.Cb)()],W.prototype,"fullExtents",void 0),(0,i._)([(0,g.Cb)()],W.prototype,"featureInfoFormat",void 0),(0,i._)([(0,g.Cb)()],W.prototype,"featureInfoUrl",void 0),(0,i._)([(0,g.Cb)({type:Number,json:{write:{enabled:!1,overridePolicy:()=>({ignoreOrigin:!0,enabled:!0})}}})],W.prototype,"id",null),(0,i._)([(0,g.Cb)({type:String,json:{origins:{"web-document":{read:{source:["legendUrl","legendURL"]},write:{target:"legendUrl",ignoreOrigin:!0}}},read:{source:"legendURL"},write:{ignoreOrigin:!0}}})],W.prototype,"legendUrl",void 0),(0,i._)([(0,v.r)(["web-document"],"legendUrl")],W.prototype,"readLegendUrl",null),(0,i._)([(0,g.Cb)({value:!0,type:Boolean,json:{read:{source:"showLegend"},write:{target:"showLegend"},origins:{"web-map":{read:!1,write:!1},"web-scene":{read:!1,write:!1}}}})],W.prototype,"legendEnabled",void 0),(0,i._)([(0,g.Cb)({value:null})],W.prototype,"layer",null),(0,i._)([(0,g.Cb)()],W.prototype,"maxScale",void 0),(0,i._)([(0,g.Cb)()],W.prototype,"minScale",void 0),(0,i._)([(0,g.Cb)({readOnly:!0})],W.prototype,"effectiveScaleRange",null),(0,i._)([(0,g.Cb)({type:String,value:null,json:{read:{source:"name"},write:{ignoreOrigin:!0}}})],W.prototype,"name",null),(0,i._)([(0,g.Cb)()],W.prototype,"parent",void 0),(0,i._)([(0,g.Cb)({type:Boolean,json:{read:{source:"showPopup"},write:{ignoreOrigin:!0,target:"showPopup"}}})],W.prototype,"popupEnabled",void 0),(0,i._)([(0,g.Cb)({type:Boolean,json:{write:{ignoreOrigin:!0}}})],W.prototype,"queryable",void 0),(0,i._)([(0,g.Cb)()],W.prototype,"sublayers",null),(0,i._)([(0,V.p)("sublayers")],W.prototype,"castSublayers",null),(0,i._)([(0,g.Cb)({type:[Number],json:{read:{source:"spatialReferences"}}})],W.prototype,"spatialReferences",void 0),(0,i._)([(0,g.Cb)({type:String,value:null,json:{write:{ignoreOrigin:!0}}})],W.prototype,"title",null),(0,i._)([(0,g.Cb)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"}}})],W.prototype,"visible",null),W=q=(0,i._)([(0,w.j)("esri.layers.support.WMSSublayer")],W);const $=W;var H=r(20102);const G={84:4326,83:4269,27:4267};function J(e){if(!e)return null;const t={idCounter:-1};"string"==typeof e&&(e=(new DOMParser).parseFromString(e,"text/xml"));const r=e.documentElement;if("ServiceExceptionReport"===r.nodeName){const e=Array.prototype.slice.call(r.childNodes).map((e=>e.textContent)).join("\r\n");throw new H.Z("wmslayer:wms-capabilities-xml-is-not-valid","The server returned errors when the WMS capabilities were requested.",e)}const i=Y("Capability",r),s=Y("Service",r),n=Y("Request",i);if(!i||!s||!n)return null;const a=Y("Layer",i);if(!a)return null;const l="WMS_Capabilities"===r.nodeName||"WMT_MS_Capabilities"===r.nodeName?r.getAttribute("version"):"1.3.0",o=ee("Title",s,"")||ee("Name",s,""),u=ee("AccessConstraints",s,""),p=/^none$/i.test(u)?"":u,d=ee("Abstract",s,""),c=parseInt(ee("MaxWidth",s,"5000"),10),m=parseInt(ee("MaxHeight",s,"5000"),10),h=ie(n,"GetMap"),y=re(n,"GetMap"),f=ne(a,l,t);let g,b,v,w=0;if(Array.prototype.slice.call(i.childNodes).forEach((e=>{"Layer"===e.nodeName&&(0===w?g=e:1===w?(f.name&&(f.name="",f.sublayers.push(ne(g,l,t))),f.sublayers.push(ne(e,l,t))):f.sublayers.push(ne(e,l,t)),w++)})),!f)return null;const _=f.fullExtents;if(b=f.sublayers,b||(b=[]),0===b.length&&b.push(f),v=f.extent,!v){const e=new C.Z(b[0].extent);f.extent=e.toJSON(),v=f.extent}const x=f.spatialReferences.length>0?f.spatialReferences:X(f),I=re(n,"GetFeatureInfo");let S;if(I){const e=ie(n,"GetFeatureInfo");e.includes("text/html")?S="text/html":e.includes("text/plain")&&(S="text/plain")}if(!S){const e=t=>{t&&(t.queryable=!1,t.sublayers&&t.sublayers.forEach((t=>{e(t)})))};e(f)}const E=z(b),N=f.minScale||0,T=f.maxScale||0,O=f.dimensions,F=E.reduce(((e,t)=>e.concat(t.dimensions)),[]),U=O.concat(F).filter(le);let L=null;if(U.length>0){let e=Number.POSITIVE_INFINITY,t=Number.NEGATIVE_INFINITY;U.forEach((r=>{const{extent:i}=r;!function(e){return Array.isArray(e)&&e.length>0&&e[0]instanceof Date}(i)?i.forEach((r=>{e=Math.min(e,r.min.getTime()),t=Math.max(t,r.max.getTime())})):i.forEach((r=>{e=Math.min(e,r.getTime()),t=Math.max(t,r.getTime())}))})),L={startTimeField:null,endTimeField:null,trackIdField:null,timeExtent:[e,t]}}return{copyright:p,description:d,dimensions:O,extent:v,fullExtents:_,featureInfoFormat:S,featureInfoUrl:I,mapUrl:y,maxWidth:c,maxHeight:m,maxScale:T,minScale:N,layers:E,spatialReferences:x,supportedImageFormatTypes:h,timeInfo:L,title:o,version:l}}function X(e){if(e.spatialReferences.length>0)return e.spatialReferences;if(e.sublayers)for(const t of e.sublayers){const e=X(t);if(e.length>0)return e}return[]}function z(e){let t=[];return e.forEach((e=>{t.push(e),e.sublayers&&e.sublayers.length&&(t=t.concat(z(e.sublayers)),delete e.sublayers)})),t}function Q(e,t,r){var i;return null!=(i=t.getAttribute(e))?i:r}function Y(e,t){for(let r=0;r<t.childNodes.length;r++){const i=t.childNodes[r];if(ae(i)&&i.nodeName===e)return i}return null}function K(e,t){const r=[];for(let i=0;i<t.childNodes.length;i++){const s=t.childNodes[i];ae(s)&&s.nodeName===e&&r.push(s)}return r}function ee(e,t,r){const i=Y(e,t);return i?i.textContent:r}function te(e,t,r){if(!e)return null;const i=parseFloat(e.getAttribute("minx")),s=parseFloat(e.getAttribute("miny")),n=parseFloat(e.getAttribute("maxx")),a=parseFloat(e.getAttribute("maxy"));let l,o,u,p;r?(l=isNaN(s)?-Number.MAX_VALUE:s,o=isNaN(i)?-Number.MAX_VALUE:i,u=isNaN(a)?Number.MAX_VALUE:a,p=isNaN(n)?Number.MAX_VALUE:n):(l=isNaN(i)?-Number.MAX_VALUE:i,o=isNaN(s)?-Number.MAX_VALUE:s,u=isNaN(n)?Number.MAX_VALUE:n,p=isNaN(a)?Number.MAX_VALUE:a);const d=new I.Z({wkid:t});return new C.Z({xmin:l,ymin:o,xmax:u,ymax:p,spatialReference:d})}function re(e,t){const r=Y(t,e);if(r){const e=Y("DCPType",r);if(e){const t=Y("HTTP",e);if(t){const e=Y("Get",t);if(e){let t=function(e,t,r,i){const s=Y("OnlineResource",r);return s?Q("xlink:href",s,null):null}(0,0,e);if(t)return t.indexOf("&")===t.length-1&&(t=t.substring(0,t.length-1)),function(e,t){const r=[],i=(0,f.mN)(e);for(const e in i.query)i.query.hasOwnProperty(e)&&(t.includes(e.toLowerCase())||r.push(e+"="+i.query[e]));return i.path+(r.length?"?"+r.join("&"):"")}(t,["service","request"])}}}}return null}function ie(e,t){const r=K("Operation",e);if(0===r.length)return K("Format",Y(t,e)).map((e=>e.textContent));const i=[];return r.forEach((e=>{e.getAttribute("name")===t&&K("Format",e).forEach((e=>{i.push(e.textContent)}))})),i}function se(e,t,r){const i=Y(t,e);if(!i)return r;const{textContent:s}=i;if(null==s||""===s)return r;const n=Number(s);return isNaN(n)?r:n}function ne(e,t,r){var i;if(!e)return null;const s={id:r.idCounter++,fullExtents:[],parentLayerId:null,queryable:"1"===e.getAttribute("queryable"),spatialReferences:[],sublayers:null},n=Y("LatLonBoundingBox",e),a=Y("EX_GeographicBoundingBox",e);let l=null;n&&(l=te(n,4326)),a&&(l=new C.Z(0,0,0,0,new I.Z({wkid:4326})),l.xmin=parseFloat(ee("westBoundLongitude",a,"0")),l.ymin=parseFloat(ee("southBoundLatitude",a,"0")),l.xmax=parseFloat(ee("eastBoundLongitude",a,"0")),l.ymax=parseFloat(ee("northBoundLatitude",a,"0"))),n||a||(l=new C.Z(-180,-90,180,90,new I.Z({wkid:4326}))),s.minScale=se(e,"MaxScaleDenominator",0),s.maxScale=se(e,"MinScaleDenominator",0);const o=["1.0.0","1.1.0","1.1.1"].includes(t)?"SRS":"CRS";return Array.prototype.slice.call(e.childNodes).forEach((e=>{if("Name"===e.nodeName)s.name=e.textContent||"";else if("Title"===e.nodeName)s.title=e.textContent||"";else if("Abstract"===e.nodeName)s.description=e.textContent||"";else if("BoundingBox"===e.nodeName){const r=e.getAttribute(o);if(r&&0===r.indexOf("EPSG:")){const i=parseInt(r.substring(5),10);0===i||isNaN(i)||l||(l="1.3.0"===t?te(e,i,(0,j.A)(i)):te(e,i))}const i=r&&r.indexOf(":");if(i&&i>-1){let n=parseInt(r.substring(i+1,r.length),10);0===n||isNaN(n)||(n=G[n]?G[n]:n);const a="1.3.0"===t?te(e,n,(0,j.A)(n)):te(e,n);s.fullExtents.push(a)}}else if(e.nodeName===o)e.textContent.split(" ").forEach((e=>{const t=e.includes(":")?parseInt(e.split(":")[1],10):parseInt(e,10);if(0!==t&&!isNaN(t)){const e=G[t]?G[t]:t;s.spatialReferences.includes(e)||s.spatialReferences.push(e)}}));else if("Style"!==e.nodeName||s.legendURL){if("Layer"===e.nodeName){const i=ne(e,t,r);i&&(i.parentLayerId=s.id,s.sublayers||(s.sublayers=[]),s.sublayers.push(i))}}else{const t=Y("LegendURL",e);if(t){const e=Y("OnlineResource",t);e&&(s.legendURL=e.getAttribute("xlink:href"))}}})),s.extent=null==(i=l)?void 0:i.toJSON(),s.dimensions=K("Dimension",e).filter((e=>e.getAttribute("name")&&e.getAttribute("units")&&e.textContent)).map((e=>{const t=e.getAttribute("name"),r=e.getAttribute("units"),i=e.textContent,s=e.getAttribute("unitSymbol"),n=e.getAttribute("default"),a="0"!==Q("default",e,"0"),l="0"!==Q("nearestValue",e,"0"),o="0"!==Q("current",e,"0");return le({name:t,units:r})?{name:"time",units:"ISO8601",extent:pe(i),default:pe(n),multipleValues:a,nearestValue:l,current:o}:function(e){return/^elevation$/i.test(e.name)&&/^(epsg|crs):\d+$/i.test(e.units)}({name:t,units:r})?{name:"elevation",units:r,extent:oe(i),unitSymbol:s,default:oe(n),multipleValues:a,nearestValue:l}:{name:t,units:r,extent:ue(i),unitSymbol:s,default:ue(n),multipleValues:a,nearestValue:l}})),s}function ae(e){return e.nodeType===Node.ELEMENT_NODE}function le(e){return/^time$/i.test(e.name)&&/^iso8601$/i.test(e.units)}function oe(e){if(!e)return null;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:parseFloat(t[0]),max:parseFloat(t[1]),resolution:t.length>=3&&"0"!==t[2]?parseFloat(t[2]):void 0}})).filter((e=>e)):r.map((e=>parseFloat(e)))}function ue(e){if(!e)return null;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:t[0],max:t[1],resolution:t.length>=3&&"0"!==t[2]?t[2]:void 0}})).filter((e=>e)):r}function pe(e){if(!e)return null;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:new Date(t[0]),max:new Date(t[1]),resolution:t.length>=3&&"0"!==t[2]?de(t[2]):void 0}})).filter((e=>e)):r.map((e=>new Date(e)))}function de(e){const t=e.match(/(?:p(\d+y|\d+(?:.|,)\d+y)?(\d+m|\d+(?:.|,)\d+m)?(\d+d|\d+(?:.|,)\d+d)?)?(?:t(\d+h|\d+(?:.|,)\d+h)?(\d+m|\d+(?:.|,)\d+m)?(\d+s|\d+(?:.|,)\d+s)?)?/i);return t?{years:ce(t[1]),months:ce(t[2]),days:ce(t[3]),hours:ce(t[4]),minutes:ce(t[5]),seconds:ce(t[6])}:null}function ce(e){if(!e)return 0;const t=e.match(/(?:\d+(?:.|,)\d+|\d+)/);if(!t)return 0;const r=t[0].replace(",",".");return Number(r)}function me(e){return e.toISOString().replace(/\.[0-9]{3}/,"")}const he=new Set([102100,3857,102113,900913]),ye=new Set([3395,54004]),fe=new d.X({bmp:"image/bmp",gif:"image/gif",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml"},{ignoreUnknown:!1});let ge=class extends((0,p.p)((0,T.h)((0,R.n)((0,U.Q)((0,L.M)((0,O.q)((0,F.I)((0,h.R)(N.Z))))))))){constructor(...e){super(...e),this.allSublayers=new u.Z({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.customParameters=null,this.customLayerParameters=null,this.copyright=null,this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.featureInfoFormat=null,this.featureInfoUrl=null,this.imageFormat=null,this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.legendEnabled=!0,this.mapUrl=null,this.isReference=null,this.operationalLayerType="WMS",this.spatialReference=null,this.spatialReferences=null,this.sublayers=null,this.type="wms",this.url=null,this.version=null,this.watch("sublayers",((e,t)=>{if(t){for(const e of t)e.layer=null;this.handles.remove("wms-sublayer")}if(e){for(const t of e)t.parent=this,t.layer=this;this.handles.add([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null}))],"wms-sublayer")}}),!0)}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=(0,m.pC)(e)?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMS"]},e).catch(y.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}readFullExtentFromItemOrMap(e,t){const r=t.extent;return new C.Z({xmin:r[0][0],ymin:r[0][1],xmax:r[1][0],ymax:r[1][1]})}writeFullExtent(e,t){t.extent=[[e.xmin,e.ymin],[e.xmax,e.ymax]]}readImageFormat(e,t){const r=t.supportedImageFormatTypes;return r&&r.includes("image/png")?"image/png":r&&r[0]}readSpatialReferenceFromItemOrDocument(e,t){return new I.Z(t.spatialReferences[0])}writeSpatialReferences(e,t){const r=this.spatialReference&&this.spatialReference.wkid;e&&r?(t.spatialReferences=e.filter((e=>e!==r)),t.spatialReferences.unshift(r)):t.spatialReferences=e}readSublayersFromItemOrMap(e,t,r){return be(t.layers,r,t.visibleLayers)}readSublayers(e,t,r){return be(t.layers,r)}writeSublayers(e,t,r,i){t.layers=[];const s=new Map,n=e.flatten((({sublayers:e})=>e&&e.toArray())).toArray();n.forEach((e=>{"number"==typeof e.parent.id&&(s.has(e.parent.id)?s.get(e.parent.id).push(e.id):s.set(e.parent.id,[e.id]))})),n.forEach((e=>{const r={sublayer:e,...i},n=e.write({parentLayerId:"number"==typeof e.parent.id?e.parent.id:-1},r);if(s.has(e.id)&&(n.sublayerIds=s.get(e.id)),!e.sublayers&&e.name){const i=e.write({},r);delete i.id,t.layers.push(i)}})),t.visibleLayers=n.filter((e=>e.visible&&!e.sublayers)).map((e=>e.name))}createExportImageParameters(e,t,r,i){const s=i&&i.pixelRatio||1,n=(0,S.yZ)({extent:e,width:t})*s,a=new Z({layer:this,scale:n}),{xmin:l,ymin:o,xmax:u,ymax:p,spatialReference:d}=e,c=function(e,t){let r=e.wkid;return(0,m.Wi)(t)?r:(!t.includes(r)&&e.latestWkid&&(r=e.latestWkid),he.has(r)?t.find((e=>he.has(e)))||t.find((e=>ye.has(e)))||102100:r)}(d,this.spatialReferences),h="1.3.0"===this.version&&(0,j.A)(c)?`${o},${l},${p},${u}`:`${l},${o},${u},${p}`,y=a.toJSON();return{bbox:h,["1.3.0"===this.version?"crs":"srs"]:isNaN(c)?void 0:"EPSG:"+c,...y}}async fetchImage(e,t,r,i){var s,n;const a=this.mapUrl,o=this.createExportImageParameters(e,t,r,i);if(!o.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const u=null==i||null==(s=i.timeExtent)?void 0:s.start,p=null==i||null==(n=i.timeExtent)?void 0:n.end,d=(0,m.pC)(u)&&(0,m.pC)(p)?u.getTime()===p.getTime()?me(u):`${me(u)}/${me(p)}`:void 0,c={responseType:"image",query:this._mixCustomParameters({width:t,height:r,...o,time:d,...this.refreshParameters}),signal:null==i?void 0:i.signal};return(0,l.default)(a,c).then((e=>e.data))}fetchFeatureInfo(e,t,r,i,s){const l=(0,S.yZ)({extent:e,width:t}),o=function(e){return e.length?e.filter((e=>e.popupEnabled&&e.name&&e.queryable)).map((e=>e.name)).join(","):""}(new Z({layer:this,scale:l}).visibleSublayers);if(!this.featureInfoUrl||!o)return null;const u="1.3.0"===this.version?{I:i,J:s}:{x:i,y:s},p={query_layers:o,request:"GetFeatureInfo",info_format:this.featureInfoFormat,feature_count:25,width:t,height:r,...u},d={...this.createExportImageParameters(e,t,r),...p},c=this._mixCustomParameters(d),m=(0,f.fl)(this.featureInfoUrl,c),h=document.createElement("iframe");h.src=m,h.style.border="none",h.style.margin="0",h.style.width="100%",h.setAttribute("sandbox","");const y=new a.Z({title:this.title,content:h});return new n.Z({sourceLayer:this,popupTemplate:y})}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}findSublayerByName(e){return this.allSublayers.find((t=>t.name===e))}serviceSupportsSpatialReference(e){return(0,P.G)(this.url)||this.spatialReferences.some((t=>{const r=900913===t?I.Z.WebMercator:new I.Z({wkid:t});return(0,E.fS)(r,e)}))}async _fetchService(e){if(!this.resourceInfo){this.parsedUrl.query&&this.parsedUrl.query.service&&(this.parsedUrl.query.SERVICE=this.parsedUrl.query.service,delete this.parsedUrl.query.service),this.parsedUrl.query&&this.parsedUrl.query.request&&(this.parsedUrl.query.REQUEST=this.parsedUrl.query.request,delete this.parsedUrl.query.request);const t=await(0,l.default)(this.parsedUrl.path,{query:{SERVICE:"WMS",REQUEST:"GetCapabilities",...this.parsedUrl.query,...this.customParameters},responseType:"xml",signal:e});this.resourceInfo=J(t.data)}if(this.parsedUrl){const e=new f.R9(this.parsedUrl.path);"https"!==e.scheme||e.port&&"443"!==e.port||s.Z.request.httpsDomains.includes(e.host)||s.Z.request.httpsDomains.push(e.host)}this.read(this.resourceInfo,{origin:"service"})}_mixCustomParameters(e){if(!this.customLayerParameters&&!this.customParameters)return e;const t={...this.customParameters,...this.customLayerParameters};for(const r in t)e[r.toLowerCase()]=t[r];return e}};function be(e,t,r){const i=new Map;e.every((e=>null==e.id))&&(e=(0,c.d9)(e)).forEach(((e,t)=>e.id=t));for(const s of e){const e=new $;e.read(s,t),-1===(null==r?void 0:r.indexOf(e.name))&&(e.visible=!1),i.set(e.id,e)}const s=[];for(const t of e){const e=i.get(t.id);if(null!=t.parentLayerId&&t.parentLayerId>=0){const r=i.get(t.parentLayerId);r.sublayers||(r.sublayers=new o.Z),r.sublayers.unshift(e)}else s.unshift(e)}return s}(0,i._)([(0,g.Cb)({readOnly:!0})],ge.prototype,"allSublayers",void 0),(0,i._)([(0,g.Cb)({json:{type:Object,write:!0}})],ge.prototype,"customParameters",void 0),(0,i._)([(0,g.Cb)({json:{type:Object,write:!0}})],ge.prototype,"customLayerParameters",void 0),(0,i._)([(0,g.Cb)({type:String,json:{write:!0}})],ge.prototype,"copyright",void 0),(0,i._)([(0,g.Cb)()],ge.prototype,"description",void 0),(0,i._)([(0,g.Cb)({readOnly:!0})],ge.prototype,"dimensions",void 0),(0,i._)([(0,g.Cb)({json:{type:[[Number]],read:{source:"extent"},write:{target:"extent"},origins:{"web-document":{write:{ignoreOrigin:!0}},"portal-item":{write:{ignoreOrigin:!0}}}}})],ge.prototype,"fullExtent",void 0),(0,i._)([(0,v.r)(["web-document","portal-item"],"fullExtent",["extent"])],ge.prototype,"readFullExtentFromItemOrMap",null),(0,i._)([(0,_.c)(["web-document","portal-item"],"fullExtent",{extent:{type:[[Number]]}})],ge.prototype,"writeFullExtent",null),(0,i._)([(0,g.Cb)()],ge.prototype,"fullExtents",void 0),(0,i._)([(0,g.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],ge.prototype,"featureInfoFormat",void 0),(0,i._)([(0,g.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],ge.prototype,"featureInfoUrl",void 0),(0,i._)([(0,g.Cb)({type:String,json:{origins:{"web-document":{default:"image/png",type:fe.jsonValues,read:{reader:fe.read,source:"format"},write:{writer:fe.write,target:"format"}}}}})],ge.prototype,"imageFormat",void 0),(0,i._)([(0,v.r)("imageFormat",["supportedImageFormatTypes"])],ge.prototype,"readImageFormat",null),(0,i._)([(0,g.Cb)({type:Number,json:{read:{source:"maxHeight"},write:{target:"maxHeight"}}})],ge.prototype,"imageMaxHeight",void 0),(0,i._)([(0,g.Cb)({type:Number,json:{read:{source:"maxWidth"},write:{target:"maxWidth"}}})],ge.prototype,"imageMaxWidth",void 0),(0,i._)([(0,g.Cb)()],ge.prototype,"imageTransparency",void 0),(0,i._)([(0,g.Cb)(A.rn)],ge.prototype,"legendEnabled",void 0),(0,i._)([(0,g.Cb)({type:["show","hide","hide-children"]})],ge.prototype,"listMode",void 0),(0,i._)([(0,g.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],ge.prototype,"mapUrl",void 0),(0,i._)([(0,g.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],ge.prototype,"isReference",void 0),(0,i._)([(0,g.Cb)({type:["WMS"]})],ge.prototype,"operationalLayerType",void 0),(0,i._)([(0,g.Cb)()],ge.prototype,"resourceInfo",void 0),(0,i._)([(0,g.Cb)({type:I.Z,json:{origins:{service:{read:{source:"extent.spatialReference"}}},write:!1}})],ge.prototype,"spatialReference",void 0),(0,i._)([(0,v.r)(["web-document","portal-item"],"spatialReference",["spatialReferences"])],ge.prototype,"readSpatialReferenceFromItemOrDocument",null),(0,i._)([(0,g.Cb)({type:[b.z8],json:{read:!1,origins:{service:{read:!0},"web-document":{read:!1,write:{ignoreOrigin:!0}},"portal-item":{read:!1,write:{ignoreOrigin:!0}}}}})],ge.prototype,"spatialReferences",void 0),(0,i._)([(0,_.c)(["web-document","portal-item"],"spatialReferences")],ge.prototype,"writeSpatialReferences",null),(0,i._)([(0,g.Cb)({type:o.Z.ofType($),json:{write:{target:"layers",overridePolicy(e,t,r){if(function(e,t){return e.some((e=>{for(const r in e)if((0,x.d)(e,r,null,t))return!0;return!1}))}(this.allSublayers,r))return{ignoreOrigin:!0}}}}})],ge.prototype,"sublayers",void 0),(0,i._)([(0,v.r)(["web-document","portal-item"],"sublayers",["layers","visibleLayers"])],ge.prototype,"readSublayersFromItemOrMap",null),(0,i._)([(0,v.r)("service","sublayers",["layers"])],ge.prototype,"readSublayers",null),(0,i._)([(0,_.c)("sublayers",{layers:{type:[$]},visibleLayers:{type:[String]}})],ge.prototype,"writeSublayers",null),(0,i._)([(0,g.Cb)({json:{read:!1},readOnly:!0,value:"wms"})],ge.prototype,"type",void 0),(0,i._)([(0,g.Cb)(A.HQ)],ge.prototype,"url",void 0),(0,i._)([(0,g.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],ge.prototype,"version",void 0),ge=(0,i._)([(0,w.j)("esri.layers.WMSLayer")],ge);const ve=ge},16859:(e,t,r)=>{r.d(t,{I:()=>w});var i=r(43697),s=r(40330),n=r(3172),a=r(66643),l=r(20102),o=r(92604),u=r(70586),p=r(95330),d=r(17452),c=r(5600),m=(r(67676),r(80442),r(75215),r(71715)),h=r(52011),y=r(30556),f=r(65587),g=r(15235),b=r(86082);const v=o.Z.getLogger("esri.layers.mixins.PortalLayer"),w=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0}destroy(){var e;null==(e=this.portalItem)||e.destroy(),this.portalItem=null}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new g.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const i=await r.e(8062).then(r.bind(r,18062));return(0,p.k_)(t),await i.load({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData},t)}catch(e){throw(0,p.D_)(e)||v.warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,p.r9)(e),!0))))}async _fetchUserHasEditingPrivileges(e){const t=this.url?null==s.id?void 0:s.id.findCredential(this.url):null;if(!t)return!0;const r=_.credential===t?_.user:await this._fetchEditingUser(e);return _.credential=t,_.user=r,(0,u.Wi)(r)||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){var t,r;const i=null==(t=this.portalItem)||null==(r=t.portal)?void 0:r.user;if(i)return i;const l=s.id.findServerInfo(this.url);if(null==l||!l.owningSystemUrl)return null;const o=`${l.owningSystemUrl}/sharing/rest`,p=f.Z.getDefault();if(p&&p.loaded&&(0,d.Fv)(p.restUrl)===(0,d.Fv)(o))return p.user;const c=`${o}/community/self`,m=(0,u.pC)(e)?e.signal:null,h=await(0,a.q6)((0,n.default)(c,{authMode:"no-prompt",query:{f:"json"},signal:m}));return h.ok?b.default.fromJSON(h.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,i=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||f.Z.getDefault());return r&&i&&!(0,d.tm)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.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 the scene, set the layer.portalItem to null or save the scene to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,c.Cb)({type:g.default})],t.prototype,"portalItem",null),(0,i._)([(0,m.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,y.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,c.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,c.Cb)({readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),t=(0,i._)([(0,h.j)("esri.layers.mixins.PortalLayer")],t),t},_={credential:null,user:null}},34760:(e,t,r)=>{r.d(t,{Q:()=>g});var i=r(43697),s=r(92604),n=r(95330),a=r(5600),l=(r(67676),r(80442),r(75215),r(52011)),o=r(80539),u=(r(26258),r(87538));const p=new o.Z,d=new WeakMap;function c(e){return e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e}function m(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:m(t,e%t):0}let h=0,y=0;function f(){const e=Date.now();for(const r of p)if(r.refreshInterval){var t;e-(null!=(t=d.get(r))?t:0)+5>=6e4*r.refreshInterval&&(d.set(r,e),r.refresh(e))}}(0,u.EH)((()=>{const e=Date.now();let t=0;for(const r of p)t=m(Math.round(6e4*r.refreshInterval),t),r.refreshInterval?d.get(r)||d.set(r,e):d.delete(r);if(t!==y){if(y=t,clearInterval(h),0===y)return void(h=0);h=setInterval(f,y)}}));const g=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,n.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{!function(e){c(e)&&p.push(e)}(this)}),(()=>{}))}destroy(){c(this)&&p.includes(this)&&p.remove(this)}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,n.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{s.Z.getLogger(this.declaredClass).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}};return(0,i._)([(0,a.Cb)({type:Number,cast:e=>e>=.1?e:e<=0?0:.1,json:{write:!0}})],t.prototype,"refreshInterval",void 0),(0,i._)([(0,a.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,i._)([(0,a.Cb)()],t.prototype,"refreshParameters",null),t=(0,i._)([(0,l.j)("esri.layers.mixins.RefreshableLayer")],t),t}},28294:(e,t,r)=>{r.d(t,{n:()=>c});var i=r(43697),s=r(92835),n=r(84552),a=r(5600),l=(r(67676),r(80442),r(75215),r(71715)),o=r(52011),u=r(35671),p=r(30547),d=r(78981);const c=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const i=r.timeOffset,s=d.v.fromJSON(r.timeOffsetUnits);return i&&s?new n.Z({value:i,unit:s}):null}set timeInfo(e){(0,u.UF)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i._)([(0,a.Cb)({type:s.Z,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,i._)([(0,a.Cb)({type:n.Z})],t.prototype,"timeOffset",void 0),(0,i._)([(0,l.r)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,i._)([(0,a.Cb)({value:null,type:p.Z,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,i._)([(0,a.Cb)({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=(0,i._)([(0,o.j)("esri.layers.mixins.TemporalLayer")],t),t}},52162:(e,t,r)=>{r.d(t,{A:()=>s});const i=[[3819,3819],[3821,3824],[3889,3889],[3906,3906],[4001,4025],[4027,4036],[4039,4047],[4052,4055],[4074,4075],[4080,4081],[4120,4176],[4178,4185],[4188,4216],[4218,4289],[4291,4304],[4306,4319],[4322,4326],[4463,4463],[4470,4470],[4475,4475],[4483,4483],[4490,4490],[4555,4558],[4600,4646],[4657,4765],[4801,4811],[4813,4821],[4823,4824],[4901,4904],[5013,5013],[5132,5132],[5228,5229],[5233,5233],[5246,5246],[5252,5252],[5264,5264],[5324,5340],[5354,5354],[5360,5360],[5365,5365],[5370,5373],[5381,5381],[5393,5393],[5451,5451],[5464,5464],[5467,5467],[5489,5489],[5524,5524],[5527,5527],[5546,5546],[2044,2045],[2081,2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3038,3051],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3150,3151],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3389,3390],[3416,3417],[3833,3841],[3844,3850],[3854,3854],[3873,3885],[3907,3910],[4026,4026],[4037,4038],[4417,4417],[4434,4434],[4491,4554],[4839,4839],[5048,5048],[5105,5130],[5253,5259],[5269,5275],[5343,5349],[5479,5482],[5518,5519],[5520,5520],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]];function s(e){return i.some((([t,r])=>e>=t&&e<=r))}},30547:(e,t,r)=>{r.d(t,{Z:()=>v});var i,s=r(43697),n=r(92835),a=r(84552),l=r(96674),o=r(22974),u=r(70586),p=r(5600),d=(r(75215),r(71715)),c=r(52011),m=r(30556);r(67676),r(80442);let h=i=class extends l.wq{constructor(e){super(e),this.respectsDaylightSaving=!1,this.timezone=null}readRespectsDaylightSaving(e,t){return void 0!==t.respectsDaylightSaving?t.respectsDaylightSaving:void 0!==t.respectDaylightSaving&&t.respectDaylightSaving}clone(){const{respectsDaylightSaving:e,timezone:t}=this;return new i({respectsDaylightSaving:e,timezone:t})}};(0,s._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"respectsDaylightSaving",void 0),(0,s._)([(0,d.r)("respectsDaylightSaving",["respectsDaylightSaving","respectDaylightSaving"])],h.prototype,"readRespectsDaylightSaving",null),(0,s._)([(0,p.Cb)({type:String,json:{read:{source:"timeZone"},write:{target:"timeZone"}}})],h.prototype,"timezone",void 0),h=i=(0,s._)([(0,c.j)("esri.layers.support.TimeReference")],h);const y=h;var f,g=r(78981);let b=f=class extends l.wq{constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeReference=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const r=new Date(t.timeExtent[0]),i=new Date(t.timeExtent[1]);return new n.Z({start:r,end:i})}writeFullTimeExtent(e,t){e&&(0,u.pC)(e.start)&&(0,u.pC)(e.end)?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?new a.Z({value:t.timeInterval,unit:g.v.fromJSON(t.timeIntervalUnits)}):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?new a.Z({value:t.defaultTimeInterval,unit:g.v.fromJSON(t.defaultTimeIntervalUnits)}):null}writeInterval(e,t){if(e){const r=e.toJSON();t.timeInterval=r.value,t.timeIntervalUnits=r.unit}else t.timeInterval=null,t.timeIntervalUnits=null}clone(){const{cumulative:e,endField:t,hasLiveData:r,interval:i,startField:s,timeReference:n,fullTimeExtent:a,trackIdField:l,useTime:u}=this;return new f({cumulative:e,endField:t,hasLiveData:r,interval:i,startField:s,timeReference:(0,o.d9)(n),fullTimeExtent:(0,o.d9)(a),trackIdField:l,useTime:u})}};(0,s._)([(0,p.Cb)({type:Boolean,json:{read:{source:"exportOptions.timeDataCumulative"},write:{target:"exportOptions.timeDataCumulative"}}})],b.prototype,"cumulative",void 0),(0,s._)([(0,p.Cb)({type:String,json:{read:{source:"endTimeField"},write:{target:"endTimeField",allowNull:!0}}})],b.prototype,"endField",void 0),(0,s._)([(0,p.Cb)({type:n.Z,json:{write:{enabled:!0,allowNull:!0}}})],b.prototype,"fullTimeExtent",void 0),(0,s._)([(0,d.r)("fullTimeExtent",["timeExtent"])],b.prototype,"readFullTimeExtent",null),(0,s._)([(0,m.c)("fullTimeExtent")],b.prototype,"writeFullTimeExtent",null),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],b.prototype,"hasLiveData",void 0),(0,s._)([(0,p.Cb)({type:a.Z,json:{write:{enabled:!0,allowNull:!0}}})],b.prototype,"interval",void 0),(0,s._)([(0,d.r)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],b.prototype,"readInterval",null),(0,s._)([(0,m.c)("interval")],b.prototype,"writeInterval",null),(0,s._)([(0,p.Cb)({type:String,json:{read:{source:"startTimeField"},write:{target:"startTimeField",allowNull:!0}}})],b.prototype,"startField",void 0),(0,s._)([(0,p.Cb)({type:y,json:{write:{enabled:!0,allowNull:!0}}})],b.prototype,"timeReference",void 0),(0,s._)([(0,p.Cb)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],b.prototype,"trackIdField",void 0),(0,s._)([(0,p.Cb)({type:Boolean,json:{read:{source:"exportOptions.useTime"},write:{target:"exportOptions.useTime"}}})],b.prototype,"useTime",void 0),b=f=(0,s._)([(0,c.j)("esri.layers.support.TimeInfo")],b);const v=b},78981:(e,t,r)=>{r.d(t,{v:()=>i});const i=(0,r(35454).w)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5906],{38171:(e,t,r)=>{r.d(t,{Z:()=>f});var i=r(43697),s=r(66577),n=r(51773),a=r(78223),l=r(2368),o=r(96674),u=r(70586),p=r(99001),d=r(5600),c=(r(67676),r(80442),r(75215),r(52011)),m=r(33955);function h(e){if(!(0,u.pC)(e))return null;const t={};for(const r in e){const i=e[r];i&&(t[r]=i.toJSON())}return 0!==Object.keys(t).length?t:null}let y=class extends((0,l.J)(o.wq)){constructor(...e){super(...e),this.isAggregate=!1,this.layer=null,this.popupTemplate=null,this.sourceLayer=null,Object.defineProperty(this,"uid",{value:(0,p.D)(),configurable:!0})}normalizeCtorArgs(e,t,r,i){return e&&!e.declaredClass?e:{geometry:e,symbol:t,attributes:r,popupTemplate:i}}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),this._notifyLayer("geometry",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;for(const t of[this.sourceLayer,this.layer])if(t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&(0,u.pC)(t.defaultPopupTemplate))return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes&&this.attributes[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t},this._notifyLayer("attributes",void 0,t,e)}getObjectId(){return this.sourceLayer&&"objectIdField"in this.sourceLayer&&this.sourceLayer.objectIdField?this.getAttribute(this.sourceLayer.objectIdField):null}toJSON(){return{aggregateGeometries:h(this.aggregateGeometries),geometry:(0,u.pC)(this.geometry)?this.geometry.toJSON():null,symbol:(0,u.pC)(this.symbol)?this.symbol.toJSON():null,attributes:{...this.attributes},popupTemplate:this.popupTemplate&&this.popupTemplate.toJSON()}}notifyGeometryChanged(){this._notifyLayer("geometry",this.geometry,this.geometry)}notifyMeshTransformChanged(){(0,u.pC)(this.geometry)&&"mesh"===this.geometry.type&&this._notifyLayer("transform",this.geometry.transform,this.geometry.transform)}_notifyLayer(e,t,r,i){if(!this.layer||!("graphicChanged"in this.layer))return;const s={graphic:this,property:e,oldValue:t,newValue:r};"attributes"===e&&(s.attributeName=i),this.layer.graphicChanged(s)}};(0,i._)([(0,d.Cb)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const i=(0,m.im)(e[r]);i&&(t[r]=i)}return 0!==Object.keys(t).length?t:null}}})],y.prototype,"aggregateGeometries",null),(0,i._)([(0,d.Cb)({value:null})],y.prototype,"attributes",null),(0,i._)([(0,d.Cb)({value:null,types:s.qM,json:{read:m.im}})],y.prototype,"geometry",null),(0,i._)([(0,d.Cb)({type:Boolean})],y.prototype,"isAggregate",void 0),(0,i._)([(0,d.Cb)({clonable:"reference"})],y.prototype,"layer",void 0),(0,i._)([(0,d.Cb)({type:n.Z})],y.prototype,"popupTemplate",void 0),(0,i._)([(0,d.Cb)({clonable:"reference"})],y.prototype,"sourceLayer",void 0),(0,i._)([(0,d.Cb)({value:null,types:a.LB})],y.prototype,"symbol",null),(0,i._)([(0,d.Cb)({type:Boolean,value:!0})],y.prototype,"visible",null),y=(0,i._)([(0,c.j)("esri.Graphic")],y),(y||(y={})).generateUID=p.D;const f=y},84552:(e,t,r)=>{r.d(t,{Z:()=>d});var i,s=r(43697),n=r(96674),a=r(35463),l=r(5600),o=(r(67676),r(80442),r(75215),r(52011)),u=r(78981);let p=i=class extends n.wq{constructor(e){super(e),this.value=0,this.unit="milliseconds"}toMilliseconds(){return(0,a.rJ)(this.value,this.unit,"milliseconds")}clone(){return new i({value:this.value,unit:this.unit})}};(0,s._)([(0,l.Cb)({type:Number,json:{write:!0},nonNullable:!0})],p.prototype,"value",void 0),(0,s._)([(0,l.Cb)({type:u.v.apiValues,json:{type:u.v.jsonValues,read:u.v.read,write:u.v.write},nonNullable:!0})],p.prototype,"unit",void 0),p=i=(0,s._)([(0,o.j)("esri.TimeInterval")],p);const d=p},57435:(e,t,r)=>{r.d(t,{Z:()=>d});var i=r(43697),s=r(80539),n=r(3920),a=r(70586),l=(r(95330),r(26258),r(87538)),o=r(5600),u=(r(67676),r(80442),r(75215),r(52011));let p=class extends((0,n.p)(s.Z)){constructor(e){super(e),this.getCollections=null}initialize(){this.handles.add((0,l.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=(0,a.pC)(this.getCollections)?this.getCollections():null;if((0,a.Wi)(e))return void this.removeAll();let t=0;for(const r of e)(0,a.pC)(r)&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new s.Z(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction?this.itemFilterFunction:e=>!!e;for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i._)([(0,o.Cb)()],p.prototype,"getCollections",void 0),(0,i._)([(0,o.Cb)()],p.prototype,"getChildrenFunction",void 0),(0,i._)([(0,o.Cb)()],p.prototype,"itemFilterFunction",void 0),p=(0,i._)([(0,u.j)("esri.core.CollectionFlattener")],p);const d=p},91040:(e,t,r)=>{r.d(t,{yZ:()=>s});var i=r(67900);function s(e,t){const r=t||e.extent,s=e.width,n=(0,i.c9)(r&&r.spatialReference);return r&&s?r.width/s*n*i.hd*96:0}},25906:(e,t,r)=>{r.r(t),r.d(t,{default:()=>ve});var i=r(43697),s=r(68773),n=r(38171),a=r(51773),l=r(3172),o=r(80539),u=r(57435),p=r(3920),d=r(35454),c=r(22974),m=r(70586),h=r(16453),y=r(95330),f=r(17452),g=r(5600),b=r(75215),v=r(71715),w=r(52011),_=r(30556),x=r(76169),C=r(6570),I=r(82971),S=r(91040),E=r(8744),N=r(29600),T=r(71612),O=r(38009),F=r(16859),U=r(34760),L=r(72965),R=r(28294),j=r(52162),P=r(66677),A=r(21506),M=r(15923);r(67676),r(80442);const D={visible:"visibleSublayers"};let Z=class extends((0,p.p)(M.Z)){constructor(e){super(e),this.scale=0}set layer(e){this._get("layer")!==e&&(this._set("layer",e),this.handles.remove("layer"),e&&this.handles.add([e.sublayers.on("change",(()=>this.notifyChange("visibleSublayers"))),e.on("wms-sublayer-update",(e=>this.notifyChange(D[e.propertyName])))],"layer"))}get layers(){const{visibleSublayers:e}=this;return e.filter((e=>e.name)).map((e=>e.name)).join(",")}get version(){this.commitProperty("layers");const e=this.layer;return e&&e.commitProperty("imageTransparency"),(this._get("version")||0)+1}get visibleSublayers(){const{layer:e,scale:t}=this,r=null==e?void 0:e.sublayers,i=[],s=e=>{const{minScale:r,maxScale:n,sublayers:a,visible:l}=e;l&&(0===t||(0===r||t<=r)&&(0===n||t>=n))&&(a?a.forEach(s):i.unshift(e))};return null==r||r.forEach(s),i}toJSON(){const{layer:e,layers:t}=this,{imageFormat:r,imageTransparency:i,version:s}=e;return{format:r,request:"GetMap",service:"WMS",styles:"",transparent:i?"TRUE":"FALSE",version:s,layers:t}}};(0,i._)([(0,g.Cb)()],Z.prototype,"layer",null),(0,i._)([(0,g.Cb)({readOnly:!0})],Z.prototype,"layers",null),(0,i._)([(0,g.Cb)({type:Number})],Z.prototype,"scale",void 0),(0,i._)([(0,g.Cb)({readOnly:!0})],Z.prototype,"version",null),(0,i._)([(0,g.Cb)({readOnly:!0})],Z.prototype,"visibleSublayers",null),Z=(0,i._)([(0,w.j)("esri.layers.support.ExportWMSImageParameters")],Z);var q,k=r(61247),V=r(90578);let B=0,W=q=class extends h.w{constructor(e){super(e),this._sublayersHandles=new k.Z,this.dimensions=null,this.fullExtents=null,this.featureInfoFormat=null,this.featureInfoUrl=null,this.legendUrl=null,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.popupEnabled=!1,this.queryable=!1,this.spatialReferences=null}get description(){return this._get("description")}set description(e){this._set("description",e)}get fullExtent(){return this._get("fullExtent")}set fullExtent(e){this._set("fullExtent",e)}readExtent(e,t){return(e=t.extent)?C.Z.fromJSON(e):null}get id(){const e=this._get("id");return null==e?B++:e}set id(e){this._set("id",e)}readLegendUrl(e,t){return t?t.legendUrl||t.legendURL:null}set layer(e){this._set("layer",e),this.sublayers&&this.sublayers.forEach((t=>t.layer=e))}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}get name(){return this._get("name")}set name(e){this._set("name",e)}set sublayers(e){const t=this._get("sublayers");t&&(t.forEach((e=>{e.layer=null})),this._sublayersHandles.removeAll(),this._sublayersHandles=null),e&&(e.forEach((e=>{e.parent=this,e.layer=this.layer})),this._sublayersHandles.add([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this.layer})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null}))])),this._set("sublayers",e)}castSublayers(e){return(0,b.se)(o.Z.ofType(q),e)}get title(){return this._get("title")}set title(e){this._set("title",e)}get visible(){return this._get("visible")}set visible(e){this._setAndNotifyLayer("visible",e)}clone(){const e=new q;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent.clone()),this.hasOwnProperty("fullExtents")&&(e.fullExtents=this.fullExtents.map((e=>e.clone()))),this.hasOwnProperty("featureInfoFormat")&&(e.featureInfoFormat=this.featureInfoFormat),this.hasOwnProperty("featureInfoUrl")&&(e.featureInfoUrl=this.featureInfoUrl),this.hasOwnProperty("legendUrl")&&(e.legendUrl=this.legendUrl),this.hasOwnProperty("legendEnabled")&&(e.legendEnabled=this.legendEnabled),this.hasOwnProperty("layer")&&(e.layer=this.layer),this.hasOwnProperty("name")&&(e.name=this.name),this.hasOwnProperty("parent")&&(e.parent=this.parent),this.hasOwnProperty("queryable")&&(e.queryable=this.queryable),this.hasOwnProperty("sublayers")&&(e.sublayers=this.sublayers&&this.sublayers.map((e=>e.clone()))),this.hasOwnProperty("spatialReferences")&&(e.spatialReferences=this.spatialReferences.map((e=>e))),this.hasOwnProperty("visible")&&(e.visible=this.visible),this.hasOwnProperty("title")&&(e.title=this.title),e}_setAndNotifyLayer(e,t){const r=this.layer;this._get(e)!==t&&(this._set(e,t),r&&r.emit("wms-sublayer-update",{propertyName:e,id:this.id}))}};(0,i._)([(0,g.Cb)()],W.prototype,"description",null),(0,i._)([(0,g.Cb)({readOnly:!0})],W.prototype,"dimensions",void 0),(0,i._)([(0,g.Cb)({value:null})],W.prototype,"fullExtent",null),(0,i._)([(0,v.r)("fullExtent",["extent"])],W.prototype,"readExtent",null),(0,i._)([(0,g.Cb)()],W.prototype,"fullExtents",void 0),(0,i._)([(0,g.Cb)()],W.prototype,"featureInfoFormat",void 0),(0,i._)([(0,g.Cb)()],W.prototype,"featureInfoUrl",void 0),(0,i._)([(0,g.Cb)({type:Number,json:{write:{enabled:!1,overridePolicy:()=>({ignoreOrigin:!0,enabled:!0})}}})],W.prototype,"id",null),(0,i._)([(0,g.Cb)({type:String,json:{origins:{"web-document":{read:{source:["legendUrl","legendURL"]},write:{target:"legendUrl",ignoreOrigin:!0}}},read:{source:"legendURL"},write:{ignoreOrigin:!0}}})],W.prototype,"legendUrl",void 0),(0,i._)([(0,v.r)(["web-document"],"legendUrl")],W.prototype,"readLegendUrl",null),(0,i._)([(0,g.Cb)({value:!0,type:Boolean,json:{read:{source:"showLegend"},write:{target:"showLegend"},origins:{"web-map":{read:!1,write:!1},"web-scene":{read:!1,write:!1}}}})],W.prototype,"legendEnabled",void 0),(0,i._)([(0,g.Cb)({value:null})],W.prototype,"layer",null),(0,i._)([(0,g.Cb)()],W.prototype,"maxScale",void 0),(0,i._)([(0,g.Cb)()],W.prototype,"minScale",void 0),(0,i._)([(0,g.Cb)({readOnly:!0})],W.prototype,"effectiveScaleRange",null),(0,i._)([(0,g.Cb)({type:String,value:null,json:{read:{source:"name"},write:{ignoreOrigin:!0}}})],W.prototype,"name",null),(0,i._)([(0,g.Cb)()],W.prototype,"parent",void 0),(0,i._)([(0,g.Cb)({type:Boolean,json:{read:{source:"showPopup"},write:{ignoreOrigin:!0,target:"showPopup"}}})],W.prototype,"popupEnabled",void 0),(0,i._)([(0,g.Cb)({type:Boolean,json:{write:{ignoreOrigin:!0}}})],W.prototype,"queryable",void 0),(0,i._)([(0,g.Cb)()],W.prototype,"sublayers",null),(0,i._)([(0,V.p)("sublayers")],W.prototype,"castSublayers",null),(0,i._)([(0,g.Cb)({type:[Number],json:{read:{source:"spatialReferences"}}})],W.prototype,"spatialReferences",void 0),(0,i._)([(0,g.Cb)({type:String,value:null,json:{write:{ignoreOrigin:!0}}})],W.prototype,"title",null),(0,i._)([(0,g.Cb)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"}}})],W.prototype,"visible",null),W=q=(0,i._)([(0,w.j)("esri.layers.support.WMSSublayer")],W);const $=W;var H=r(20102);const G={84:4326,83:4269,27:4267};function J(e){if(!e)return null;const t={idCounter:-1};"string"==typeof e&&(e=(new DOMParser).parseFromString(e,"text/xml"));const r=e.documentElement;if("ServiceExceptionReport"===r.nodeName){const e=Array.prototype.slice.call(r.childNodes).map((e=>e.textContent)).join("\r\n");throw new H.Z("wmslayer:wms-capabilities-xml-is-not-valid","The server returned errors when the WMS capabilities were requested.",e)}const i=Y("Capability",r),s=Y("Service",r),n=Y("Request",i);if(!i||!s||!n)return null;const a=Y("Layer",i);if(!a)return null;const l="WMS_Capabilities"===r.nodeName||"WMT_MS_Capabilities"===r.nodeName?r.getAttribute("version"):"1.3.0",o=ee("Title",s,"")||ee("Name",s,""),u=ee("AccessConstraints",s,""),p=/^none$/i.test(u)?"":u,d=ee("Abstract",s,""),c=parseInt(ee("MaxWidth",s,"5000"),10),m=parseInt(ee("MaxHeight",s,"5000"),10),h=ie(n,"GetMap"),y=re(n,"GetMap"),f=ne(a,l,t);let g,b,v,w=0;if(Array.prototype.slice.call(i.childNodes).forEach((e=>{"Layer"===e.nodeName&&(0===w?g=e:1===w?(f.name&&(f.name="",f.sublayers.push(ne(g,l,t))),f.sublayers.push(ne(e,l,t))):f.sublayers.push(ne(e,l,t)),w++)})),!f)return null;const _=f.fullExtents;if(b=f.sublayers,b||(b=[]),0===b.length&&b.push(f),v=f.extent,!v){const e=new C.Z(b[0].extent);f.extent=e.toJSON(),v=f.extent}const x=f.spatialReferences.length>0?f.spatialReferences:X(f),I=re(n,"GetFeatureInfo");let S;if(I){const e=ie(n,"GetFeatureInfo");e.includes("text/html")?S="text/html":e.includes("text/plain")&&(S="text/plain")}if(!S){const e=t=>{t&&(t.queryable=!1,t.sublayers&&t.sublayers.forEach((t=>{e(t)})))};e(f)}const E=z(b),N=f.minScale||0,T=f.maxScale||0,O=f.dimensions,F=E.reduce(((e,t)=>e.concat(t.dimensions)),[]),U=O.concat(F).filter(le);let L=null;if(U.length>0){let e=Number.POSITIVE_INFINITY,t=Number.NEGATIVE_INFINITY;U.forEach((r=>{const{extent:i}=r;!function(e){return Array.isArray(e)&&e.length>0&&e[0]instanceof Date}(i)?i.forEach((r=>{e=Math.min(e,r.min.getTime()),t=Math.max(t,r.max.getTime())})):i.forEach((r=>{e=Math.min(e,r.getTime()),t=Math.max(t,r.getTime())}))})),L={startTimeField:null,endTimeField:null,trackIdField:null,timeExtent:[e,t]}}return{copyright:p,description:d,dimensions:O,extent:v,fullExtents:_,featureInfoFormat:S,featureInfoUrl:I,mapUrl:y,maxWidth:c,maxHeight:m,maxScale:T,minScale:N,layers:E,spatialReferences:x,supportedImageFormatTypes:h,timeInfo:L,title:o,version:l}}function X(e){if(e.spatialReferences.length>0)return e.spatialReferences;if(e.sublayers)for(const t of e.sublayers){const e=X(t);if(e.length>0)return e}return[]}function z(e){let t=[];return e.forEach((e=>{t.push(e),e.sublayers&&e.sublayers.length&&(t=t.concat(z(e.sublayers)),delete e.sublayers)})),t}function Q(e,t,r){var i;return null!=(i=t.getAttribute(e))?i:r}function Y(e,t){for(let r=0;r<t.childNodes.length;r++){const i=t.childNodes[r];if(ae(i)&&i.nodeName===e)return i}return null}function K(e,t){const r=[];for(let i=0;i<t.childNodes.length;i++){const s=t.childNodes[i];ae(s)&&s.nodeName===e&&r.push(s)}return r}function ee(e,t,r){const i=Y(e,t);return i?i.textContent:r}function te(e,t,r){if(!e)return null;const i=parseFloat(e.getAttribute("minx")),s=parseFloat(e.getAttribute("miny")),n=parseFloat(e.getAttribute("maxx")),a=parseFloat(e.getAttribute("maxy"));let l,o,u,p;r?(l=isNaN(s)?-Number.MAX_VALUE:s,o=isNaN(i)?-Number.MAX_VALUE:i,u=isNaN(a)?Number.MAX_VALUE:a,p=isNaN(n)?Number.MAX_VALUE:n):(l=isNaN(i)?-Number.MAX_VALUE:i,o=isNaN(s)?-Number.MAX_VALUE:s,u=isNaN(n)?Number.MAX_VALUE:n,p=isNaN(a)?Number.MAX_VALUE:a);const d=new I.Z({wkid:t});return new C.Z({xmin:l,ymin:o,xmax:u,ymax:p,spatialReference:d})}function re(e,t){const r=Y(t,e);if(r){const e=Y("DCPType",r);if(e){const t=Y("HTTP",e);if(t){const e=Y("Get",t);if(e){let t=function(e,t,r,i){const s=Y("OnlineResource",r);return s?Q("xlink:href",s,null):null}(0,0,e);if(t)return t.indexOf("&")===t.length-1&&(t=t.substring(0,t.length-1)),function(e,t){const r=[],i=(0,f.mN)(e);for(const e in i.query)i.query.hasOwnProperty(e)&&(t.includes(e.toLowerCase())||r.push(e+"="+i.query[e]));return i.path+(r.length?"?"+r.join("&"):"")}(t,["service","request"])}}}}return null}function ie(e,t){const r=K("Operation",e);if(0===r.length)return K("Format",Y(t,e)).map((e=>e.textContent));const i=[];return r.forEach((e=>{e.getAttribute("name")===t&&K("Format",e).forEach((e=>{i.push(e.textContent)}))})),i}function se(e,t,r){const i=Y(t,e);if(!i)return r;const{textContent:s}=i;if(null==s||""===s)return r;const n=Number(s);return isNaN(n)?r:n}function ne(e,t,r){var i;if(!e)return null;const s={id:r.idCounter++,fullExtents:[],parentLayerId:null,queryable:"1"===e.getAttribute("queryable"),spatialReferences:[],sublayers:null},n=Y("LatLonBoundingBox",e),a=Y("EX_GeographicBoundingBox",e);let l=null;n&&(l=te(n,4326)),a&&(l=new C.Z(0,0,0,0,new I.Z({wkid:4326})),l.xmin=parseFloat(ee("westBoundLongitude",a,"0")),l.ymin=parseFloat(ee("southBoundLatitude",a,"0")),l.xmax=parseFloat(ee("eastBoundLongitude",a,"0")),l.ymax=parseFloat(ee("northBoundLatitude",a,"0"))),n||a||(l=new C.Z(-180,-90,180,90,new I.Z({wkid:4326}))),s.minScale=se(e,"MaxScaleDenominator",0),s.maxScale=se(e,"MinScaleDenominator",0);const o=["1.0.0","1.1.0","1.1.1"].includes(t)?"SRS":"CRS";return Array.prototype.slice.call(e.childNodes).forEach((e=>{if("Name"===e.nodeName)s.name=e.textContent||"";else if("Title"===e.nodeName)s.title=e.textContent||"";else if("Abstract"===e.nodeName)s.description=e.textContent||"";else if("BoundingBox"===e.nodeName){const r=e.getAttribute(o);if(r&&0===r.indexOf("EPSG:")){const i=parseInt(r.substring(5),10);0===i||isNaN(i)||l||(l="1.3.0"===t?te(e,i,(0,j.A)(i)):te(e,i))}const i=r&&r.indexOf(":");if(i&&i>-1){let n=parseInt(r.substring(i+1,r.length),10);0===n||isNaN(n)||(n=G[n]?G[n]:n);const a="1.3.0"===t?te(e,n,(0,j.A)(n)):te(e,n);s.fullExtents.push(a)}}else if(e.nodeName===o)e.textContent.split(" ").forEach((e=>{const t=e.includes(":")?parseInt(e.split(":")[1],10):parseInt(e,10);if(0!==t&&!isNaN(t)){const e=G[t]?G[t]:t;s.spatialReferences.includes(e)||s.spatialReferences.push(e)}}));else if("Style"!==e.nodeName||s.legendURL){if("Layer"===e.nodeName){const i=ne(e,t,r);i&&(i.parentLayerId=s.id,s.sublayers||(s.sublayers=[]),s.sublayers.push(i))}}else{const t=Y("LegendURL",e);if(t){const e=Y("OnlineResource",t);e&&(s.legendURL=e.getAttribute("xlink:href"))}}})),s.extent=null==(i=l)?void 0:i.toJSON(),s.dimensions=K("Dimension",e).filter((e=>e.getAttribute("name")&&e.getAttribute("units")&&e.textContent)).map((e=>{const t=e.getAttribute("name"),r=e.getAttribute("units"),i=e.textContent,s=e.getAttribute("unitSymbol"),n=e.getAttribute("default"),a="0"!==Q("default",e,"0"),l="0"!==Q("nearestValue",e,"0"),o="0"!==Q("current",e,"0");return le({name:t,units:r})?{name:"time",units:"ISO8601",extent:pe(i),default:pe(n),multipleValues:a,nearestValue:l,current:o}:function(e){return/^elevation$/i.test(e.name)&&/^(epsg|crs):\d+$/i.test(e.units)}({name:t,units:r})?{name:"elevation",units:r,extent:oe(i),unitSymbol:s,default:oe(n),multipleValues:a,nearestValue:l}:{name:t,units:r,extent:ue(i),unitSymbol:s,default:ue(n),multipleValues:a,nearestValue:l}})),s}function ae(e){return e.nodeType===Node.ELEMENT_NODE}function le(e){return/^time$/i.test(e.name)&&/^iso8601$/i.test(e.units)}function oe(e){if(!e)return null;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:parseFloat(t[0]),max:parseFloat(t[1]),resolution:t.length>=3&&"0"!==t[2]?parseFloat(t[2]):void 0}})).filter((e=>e)):r.map((e=>parseFloat(e)))}function ue(e){if(!e)return null;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:t[0],max:t[1],resolution:t.length>=3&&"0"!==t[2]?t[2]:void 0}})).filter((e=>e)):r}function pe(e){if(!e)return null;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:new Date(t[0]),max:new Date(t[1]),resolution:t.length>=3&&"0"!==t[2]?de(t[2]):void 0}})).filter((e=>e)):r.map((e=>new Date(e)))}function de(e){const t=e.match(/(?:p(\d+y|\d+(?:.|,)\d+y)?(\d+m|\d+(?:.|,)\d+m)?(\d+d|\d+(?:.|,)\d+d)?)?(?:t(\d+h|\d+(?:.|,)\d+h)?(\d+m|\d+(?:.|,)\d+m)?(\d+s|\d+(?:.|,)\d+s)?)?/i);return t?{years:ce(t[1]),months:ce(t[2]),days:ce(t[3]),hours:ce(t[4]),minutes:ce(t[5]),seconds:ce(t[6])}:null}function ce(e){if(!e)return 0;const t=e.match(/(?:\d+(?:.|,)\d+|\d+)/);if(!t)return 0;const r=t[0].replace(",",".");return Number(r)}function me(e){return e.toISOString().replace(/\.[0-9]{3}/,"")}const he=new Set([102100,3857,102113,900913]),ye=new Set([3395,54004]),fe=new d.X({bmp:"image/bmp",gif:"image/gif",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml"},{ignoreUnknown:!1});let ge=class extends((0,p.p)((0,T.h)((0,R.n)((0,U.Q)((0,L.M)((0,O.q)((0,F.I)((0,h.R)(N.Z))))))))){constructor(...e){super(...e),this.allSublayers=new u.Z({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.customParameters=null,this.customLayerParameters=null,this.copyright=null,this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.featureInfoFormat=null,this.featureInfoUrl=null,this.imageFormat=null,this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.legendEnabled=!0,this.mapUrl=null,this.isReference=null,this.operationalLayerType="WMS",this.spatialReference=null,this.spatialReferences=null,this.sublayers=null,this.type="wms",this.url=null,this.version=null,this.watch("sublayers",((e,t)=>{if(t){for(const e of t)e.layer=null;this.handles.remove("wms-sublayer")}if(e){for(const t of e)t.parent=this,t.layer=this;this.handles.add([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null}))],"wms-sublayer")}}),!0)}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=(0,m.pC)(e)?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMS"]},e).catch(y.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}readFullExtentFromItemOrMap(e,t){const r=t.extent;return new C.Z({xmin:r[0][0],ymin:r[0][1],xmax:r[1][0],ymax:r[1][1]})}writeFullExtent(e,t){t.extent=[[e.xmin,e.ymin],[e.xmax,e.ymax]]}readImageFormat(e,t){const r=t.supportedImageFormatTypes;return r&&r.includes("image/png")?"image/png":r&&r[0]}readSpatialReferenceFromItemOrDocument(e,t){return new I.Z(t.spatialReferences[0])}writeSpatialReferences(e,t){const r=this.spatialReference&&this.spatialReference.wkid;e&&r?(t.spatialReferences=e.filter((e=>e!==r)),t.spatialReferences.unshift(r)):t.spatialReferences=e}readSublayersFromItemOrMap(e,t,r){return be(t.layers,r,t.visibleLayers)}readSublayers(e,t,r){return be(t.layers,r)}writeSublayers(e,t,r,i){t.layers=[];const s=new Map,n=e.flatten((({sublayers:e})=>e&&e.toArray())).toArray();n.forEach((e=>{"number"==typeof e.parent.id&&(s.has(e.parent.id)?s.get(e.parent.id).push(e.id):s.set(e.parent.id,[e.id]))})),n.forEach((e=>{const r={sublayer:e,...i},n=e.write({parentLayerId:"number"==typeof e.parent.id?e.parent.id:-1},r);if(s.has(e.id)&&(n.sublayerIds=s.get(e.id)),!e.sublayers&&e.name){const i=e.write({},r);delete i.id,t.layers.push(i)}})),t.visibleLayers=n.filter((e=>e.visible&&!e.sublayers)).map((e=>e.name))}createExportImageParameters(e,t,r,i){const s=i&&i.pixelRatio||1,n=(0,S.yZ)({extent:e,width:t})*s,a=new Z({layer:this,scale:n}),{xmin:l,ymin:o,xmax:u,ymax:p,spatialReference:d}=e,c=function(e,t){let r=e.wkid;return(0,m.Wi)(t)?r:(!t.includes(r)&&e.latestWkid&&(r=e.latestWkid),he.has(r)?t.find((e=>he.has(e)))||t.find((e=>ye.has(e)))||102100:r)}(d,this.spatialReferences),h="1.3.0"===this.version&&(0,j.A)(c)?`${o},${l},${p},${u}`:`${l},${o},${u},${p}`,y=a.toJSON();return{bbox:h,["1.3.0"===this.version?"crs":"srs"]:isNaN(c)?void 0:"EPSG:"+c,...y}}async fetchImage(e,t,r,i){var s,n;const a=this.mapUrl,o=this.createExportImageParameters(e,t,r,i);if(!o.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const u=null==i||null==(s=i.timeExtent)?void 0:s.start,p=null==i||null==(n=i.timeExtent)?void 0:n.end,d=(0,m.pC)(u)&&(0,m.pC)(p)?u.getTime()===p.getTime()?me(u):`${me(u)}/${me(p)}`:void 0,c={responseType:"image",query:this._mixCustomParameters({width:t,height:r,...o,time:d,...this.refreshParameters}),signal:null==i?void 0:i.signal};return(0,l.default)(a,c).then((e=>e.data))}fetchFeatureInfo(e,t,r,i,s){const l=(0,S.yZ)({extent:e,width:t}),o=function(e){return e.length?e.filter((e=>e.popupEnabled&&e.name&&e.queryable)).map((e=>e.name)).join(","):""}(new Z({layer:this,scale:l}).visibleSublayers);if(!this.featureInfoUrl||!o)return null;const u="1.3.0"===this.version?{I:i,J:s}:{x:i,y:s},p={query_layers:o,request:"GetFeatureInfo",info_format:this.featureInfoFormat,feature_count:25,width:t,height:r,...u},d={...this.createExportImageParameters(e,t,r),...p},c=this._mixCustomParameters(d),m=(0,f.fl)(this.featureInfoUrl,c),h=document.createElement("iframe");h.src=m,h.style.border="none",h.style.margin="0",h.style.width="100%",h.setAttribute("sandbox","");const y=new a.Z({title:this.title,content:h});return new n.Z({sourceLayer:this,popupTemplate:y})}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}findSublayerByName(e){return this.allSublayers.find((t=>t.name===e))}serviceSupportsSpatialReference(e){return(0,P.G)(this.url)||this.spatialReferences.some((t=>{const r=900913===t?I.Z.WebMercator:new I.Z({wkid:t});return(0,E.fS)(r,e)}))}async _fetchService(e){if(!this.resourceInfo){this.parsedUrl.query&&this.parsedUrl.query.service&&(this.parsedUrl.query.SERVICE=this.parsedUrl.query.service,delete this.parsedUrl.query.service),this.parsedUrl.query&&this.parsedUrl.query.request&&(this.parsedUrl.query.REQUEST=this.parsedUrl.query.request,delete this.parsedUrl.query.request);const t=await(0,l.default)(this.parsedUrl.path,{query:{SERVICE:"WMS",REQUEST:"GetCapabilities",...this.parsedUrl.query,...this.customParameters},responseType:"xml",signal:e});this.resourceInfo=J(t.data)}if(this.parsedUrl){const e=new f.R9(this.parsedUrl.path);"https"!==e.scheme||e.port&&"443"!==e.port||s.Z.request.httpsDomains.includes(e.host)||s.Z.request.httpsDomains.push(e.host)}this.read(this.resourceInfo,{origin:"service"})}_mixCustomParameters(e){if(!this.customLayerParameters&&!this.customParameters)return e;const t={...this.customParameters,...this.customLayerParameters};for(const r in t)e[r.toLowerCase()]=t[r];return e}};function be(e,t,r){const i=new Map;e.every((e=>null==e.id))&&(e=(0,c.d9)(e)).forEach(((e,t)=>e.id=t));for(const s of e){const e=new $;e.read(s,t),-1===(null==r?void 0:r.indexOf(e.name))&&(e.visible=!1),i.set(e.id,e)}const s=[];for(const t of e){const e=i.get(t.id);if(null!=t.parentLayerId&&t.parentLayerId>=0){const r=i.get(t.parentLayerId);r.sublayers||(r.sublayers=new o.Z),r.sublayers.unshift(e)}else s.unshift(e)}return s}(0,i._)([(0,g.Cb)({readOnly:!0})],ge.prototype,"allSublayers",void 0),(0,i._)([(0,g.Cb)({json:{type:Object,write:!0}})],ge.prototype,"customParameters",void 0),(0,i._)([(0,g.Cb)({json:{type:Object,write:!0}})],ge.prototype,"customLayerParameters",void 0),(0,i._)([(0,g.Cb)({type:String,json:{write:!0}})],ge.prototype,"copyright",void 0),(0,i._)([(0,g.Cb)()],ge.prototype,"description",void 0),(0,i._)([(0,g.Cb)({readOnly:!0})],ge.prototype,"dimensions",void 0),(0,i._)([(0,g.Cb)({json:{type:[[Number]],read:{source:"extent"},write:{target:"extent"},origins:{"web-document":{write:{ignoreOrigin:!0}},"portal-item":{write:{ignoreOrigin:!0}}}}})],ge.prototype,"fullExtent",void 0),(0,i._)([(0,v.r)(["web-document","portal-item"],"fullExtent",["extent"])],ge.prototype,"readFullExtentFromItemOrMap",null),(0,i._)([(0,_.c)(["web-document","portal-item"],"fullExtent",{extent:{type:[[Number]]}})],ge.prototype,"writeFullExtent",null),(0,i._)([(0,g.Cb)()],ge.prototype,"fullExtents",void 0),(0,i._)([(0,g.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],ge.prototype,"featureInfoFormat",void 0),(0,i._)([(0,g.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],ge.prototype,"featureInfoUrl",void 0),(0,i._)([(0,g.Cb)({type:String,json:{origins:{"web-document":{default:"image/png",type:fe.jsonValues,read:{reader:fe.read,source:"format"},write:{writer:fe.write,target:"format"}}}}})],ge.prototype,"imageFormat",void 0),(0,i._)([(0,v.r)("imageFormat",["supportedImageFormatTypes"])],ge.prototype,"readImageFormat",null),(0,i._)([(0,g.Cb)({type:Number,json:{read:{source:"maxHeight"},write:{target:"maxHeight"}}})],ge.prototype,"imageMaxHeight",void 0),(0,i._)([(0,g.Cb)({type:Number,json:{read:{source:"maxWidth"},write:{target:"maxWidth"}}})],ge.prototype,"imageMaxWidth",void 0),(0,i._)([(0,g.Cb)()],ge.prototype,"imageTransparency",void 0),(0,i._)([(0,g.Cb)(A.rn)],ge.prototype,"legendEnabled",void 0),(0,i._)([(0,g.Cb)({type:["show","hide","hide-children"]})],ge.prototype,"listMode",void 0),(0,i._)([(0,g.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],ge.prototype,"mapUrl",void 0),(0,i._)([(0,g.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],ge.prototype,"isReference",void 0),(0,i._)([(0,g.Cb)({type:["WMS"]})],ge.prototype,"operationalLayerType",void 0),(0,i._)([(0,g.Cb)()],ge.prototype,"resourceInfo",void 0),(0,i._)([(0,g.Cb)({type:I.Z,json:{origins:{service:{read:{source:"extent.spatialReference"}}},write:!1}})],ge.prototype,"spatialReference",void 0),(0,i._)([(0,v.r)(["web-document","portal-item"],"spatialReference",["spatialReferences"])],ge.prototype,"readSpatialReferenceFromItemOrDocument",null),(0,i._)([(0,g.Cb)({type:[b.z8],json:{read:!1,origins:{service:{read:!0},"web-document":{read:!1,write:{ignoreOrigin:!0}},"portal-item":{read:!1,write:{ignoreOrigin:!0}}}}})],ge.prototype,"spatialReferences",void 0),(0,i._)([(0,_.c)(["web-document","portal-item"],"spatialReferences")],ge.prototype,"writeSpatialReferences",null),(0,i._)([(0,g.Cb)({type:o.Z.ofType($),json:{write:{target:"layers",overridePolicy(e,t,r){if(function(e,t){return e.some((e=>{for(const r in e)if((0,x.d)(e,r,null,t))return!0;return!1}))}(this.allSublayers,r))return{ignoreOrigin:!0}}}}})],ge.prototype,"sublayers",void 0),(0,i._)([(0,v.r)(["web-document","portal-item"],"sublayers",["layers","visibleLayers"])],ge.prototype,"readSublayersFromItemOrMap",null),(0,i._)([(0,v.r)("service","sublayers",["layers"])],ge.prototype,"readSublayers",null),(0,i._)([(0,_.c)("sublayers",{layers:{type:[$]},visibleLayers:{type:[String]}})],ge.prototype,"writeSublayers",null),(0,i._)([(0,g.Cb)({json:{read:!1},readOnly:!0,value:"wms"})],ge.prototype,"type",void 0),(0,i._)([(0,g.Cb)(A.HQ)],ge.prototype,"url",void 0),(0,i._)([(0,g.Cb)({type:String,json:{write:{ignoreOrigin:!0}}})],ge.prototype,"version",void 0),ge=(0,i._)([(0,w.j)("esri.layers.WMSLayer")],ge);const ve=ge},16859:(e,t,r)=>{r.d(t,{I:()=>w});var i=r(43697),s=r(40330),n=r(3172),a=r(66643),l=r(20102),o=r(92604),u=r(70586),p=r(95330),d=r(17452),c=r(5600),m=(r(67676),r(80442),r(75215),r(71715)),h=r(52011),y=r(30556),f=r(65587),g=r(15235),b=r(86082);const v=o.Z.getLogger("esri.layers.mixins.PortalLayer"),w=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0}destroy(){var e;null==(e=this.portalItem)||e.destroy(),this.portalItem=null}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new g.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const i=await r.e(8062).then(r.bind(r,18062));return(0,p.k_)(t),await i.load({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData},t)}catch(e){throw(0,p.D_)(e)||v.warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,p.r9)(e),!0))))}async _fetchUserHasEditingPrivileges(e){const t=this.url?null==s.id?void 0:s.id.findCredential(this.url):null;if(!t)return!0;const r=_.credential===t?_.user:await this._fetchEditingUser(e);return _.credential=t,_.user=r,(0,u.Wi)(r)||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){var t,r;const i=null==(t=this.portalItem)||null==(r=t.portal)?void 0:r.user;if(i)return i;const l=s.id.findServerInfo(this.url);if(null==l||!l.owningSystemUrl)return null;const o=`${l.owningSystemUrl}/sharing/rest`,p=f.Z.getDefault();if(p&&p.loaded&&(0,d.Fv)(p.restUrl)===(0,d.Fv)(o))return p.user;const c=`${o}/community/self`,m=(0,u.pC)(e)?e.signal:null,h=await(0,a.q6)((0,n.default)(c,{authMode:"no-prompt",query:{f:"json"},signal:m}));return h.ok?b.default.fromJSON(h.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,i=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||f.Z.getDefault());return r&&i&&!(0,d.tm)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,c.Cb)({type:g.default})],t.prototype,"portalItem",null),(0,i._)([(0,m.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,y.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,c.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,c.Cb)({readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),t=(0,i._)([(0,h.j)("esri.layers.mixins.PortalLayer")],t),t},_={credential:null,user:null}},34760:(e,t,r)=>{r.d(t,{Q:()=>g});var i=r(43697),s=r(92604),n=r(95330),a=r(5600),l=(r(67676),r(80442),r(75215),r(52011)),o=r(80539),u=(r(26258),r(87538));const p=new o.Z,d=new WeakMap;function c(e){return e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e}function m(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:m(t,e%t):0}let h=0,y=0;function f(){const e=Date.now();for(const r of p)if(r.refreshInterval){var t;e-(null!=(t=d.get(r))?t:0)+5>=6e4*r.refreshInterval&&(d.set(r,e),r.refresh(e))}}(0,u.EH)((()=>{const e=Date.now();let t=0;for(const r of p)t=m(Math.round(6e4*r.refreshInterval),t),r.refreshInterval?d.get(r)||d.set(r,e):d.delete(r);if(t!==y){if(y=t,clearInterval(h),0===y)return void(h=0);h=setInterval(f,y)}}));const g=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,n.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{!function(e){c(e)&&p.push(e)}(this)}),(()=>{}))}destroy(){c(this)&&p.includes(this)&&p.remove(this)}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,n.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{s.Z.getLogger(this.declaredClass).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}};return(0,i._)([(0,a.Cb)({type:Number,cast:e=>e>=.1?e:e<=0?0:.1,json:{write:!0}})],t.prototype,"refreshInterval",void 0),(0,i._)([(0,a.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,i._)([(0,a.Cb)()],t.prototype,"refreshParameters",null),t=(0,i._)([(0,l.j)("esri.layers.mixins.RefreshableLayer")],t),t}},28294:(e,t,r)=>{r.d(t,{n:()=>c});var i=r(43697),s=r(92835),n=r(84552),a=r(5600),l=(r(67676),r(80442),r(75215),r(71715)),o=r(52011),u=r(35671),p=r(30547),d=r(78981);const c=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const i=r.timeOffset,s=d.v.fromJSON(r.timeOffsetUnits);return i&&s?new n.Z({value:i,unit:s}):null}set timeInfo(e){(0,u.UF)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i._)([(0,a.Cb)({type:s.Z,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,i._)([(0,a.Cb)({type:n.Z})],t.prototype,"timeOffset",void 0),(0,i._)([(0,l.r)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,i._)([(0,a.Cb)({value:null,type:p.Z,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,i._)([(0,a.Cb)({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=(0,i._)([(0,o.j)("esri.layers.mixins.TemporalLayer")],t),t}},52162:(e,t,r)=>{r.d(t,{A:()=>s});const i=[[3819,3819],[3821,3824],[3889,3889],[3906,3906],[4001,4025],[4027,4036],[4039,4047],[4052,4055],[4074,4075],[4080,4081],[4120,4176],[4178,4185],[4188,4216],[4218,4289],[4291,4304],[4306,4319],[4322,4326],[4463,4463],[4470,4470],[4475,4475],[4483,4483],[4490,4490],[4555,4558],[4600,4646],[4657,4765],[4801,4811],[4813,4821],[4823,4824],[4901,4904],[5013,5013],[5132,5132],[5228,5229],[5233,5233],[5246,5246],[5252,5252],[5264,5264],[5324,5340],[5354,5354],[5360,5360],[5365,5365],[5370,5373],[5381,5381],[5393,5393],[5451,5451],[5464,5464],[5467,5467],[5489,5489],[5524,5524],[5527,5527],[5546,5546],[2044,2045],[2081,2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3038,3051],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3150,3151],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3389,3390],[3416,3417],[3833,3841],[3844,3850],[3854,3854],[3873,3885],[3907,3910],[4026,4026],[4037,4038],[4417,4417],[4434,4434],[4491,4554],[4839,4839],[5048,5048],[5105,5130],[5253,5259],[5269,5275],[5343,5349],[5479,5482],[5518,5519],[5520,5520],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]];function s(e){return i.some((([t,r])=>e>=t&&e<=r))}},30547:(e,t,r)=>{r.d(t,{Z:()=>v});var i,s=r(43697),n=r(92835),a=r(84552),l=r(96674),o=r(22974),u=r(70586),p=r(5600),d=(r(75215),r(71715)),c=r(52011),m=r(30556);r(67676),r(80442);let h=i=class extends l.wq{constructor(e){super(e),this.respectsDaylightSaving=!1,this.timezone=null}readRespectsDaylightSaving(e,t){return void 0!==t.respectsDaylightSaving?t.respectsDaylightSaving:void 0!==t.respectDaylightSaving&&t.respectDaylightSaving}clone(){const{respectsDaylightSaving:e,timezone:t}=this;return new i({respectsDaylightSaving:e,timezone:t})}};(0,s._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],h.prototype,"respectsDaylightSaving",void 0),(0,s._)([(0,d.r)("respectsDaylightSaving",["respectsDaylightSaving","respectDaylightSaving"])],h.prototype,"readRespectsDaylightSaving",null),(0,s._)([(0,p.Cb)({type:String,json:{read:{source:"timeZone"},write:{target:"timeZone"}}})],h.prototype,"timezone",void 0),h=i=(0,s._)([(0,c.j)("esri.layers.support.TimeReference")],h);const y=h;var f,g=r(78981);let b=f=class extends l.wq{constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeReference=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const r=new Date(t.timeExtent[0]),i=new Date(t.timeExtent[1]);return new n.Z({start:r,end:i})}writeFullTimeExtent(e,t){e&&(0,u.pC)(e.start)&&(0,u.pC)(e.end)?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?new a.Z({value:t.timeInterval,unit:g.v.fromJSON(t.timeIntervalUnits)}):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?new a.Z({value:t.defaultTimeInterval,unit:g.v.fromJSON(t.defaultTimeIntervalUnits)}):null}writeInterval(e,t){if(e){const r=e.toJSON();t.timeInterval=r.value,t.timeIntervalUnits=r.unit}else t.timeInterval=null,t.timeIntervalUnits=null}clone(){const{cumulative:e,endField:t,hasLiveData:r,interval:i,startField:s,timeReference:n,fullTimeExtent:a,trackIdField:l,useTime:u}=this;return new f({cumulative:e,endField:t,hasLiveData:r,interval:i,startField:s,timeReference:(0,o.d9)(n),fullTimeExtent:(0,o.d9)(a),trackIdField:l,useTime:u})}};(0,s._)([(0,p.Cb)({type:Boolean,json:{read:{source:"exportOptions.timeDataCumulative"},write:{target:"exportOptions.timeDataCumulative"}}})],b.prototype,"cumulative",void 0),(0,s._)([(0,p.Cb)({type:String,json:{read:{source:"endTimeField"},write:{target:"endTimeField",allowNull:!0}}})],b.prototype,"endField",void 0),(0,s._)([(0,p.Cb)({type:n.Z,json:{write:{enabled:!0,allowNull:!0}}})],b.prototype,"fullTimeExtent",void 0),(0,s._)([(0,d.r)("fullTimeExtent",["timeExtent"])],b.prototype,"readFullTimeExtent",null),(0,s._)([(0,m.c)("fullTimeExtent")],b.prototype,"writeFullTimeExtent",null),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],b.prototype,"hasLiveData",void 0),(0,s._)([(0,p.Cb)({type:a.Z,json:{write:{enabled:!0,allowNull:!0}}})],b.prototype,"interval",void 0),(0,s._)([(0,d.r)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],b.prototype,"readInterval",null),(0,s._)([(0,m.c)("interval")],b.prototype,"writeInterval",null),(0,s._)([(0,p.Cb)({type:String,json:{read:{source:"startTimeField"},write:{target:"startTimeField",allowNull:!0}}})],b.prototype,"startField",void 0),(0,s._)([(0,p.Cb)({type:y,json:{write:{enabled:!0,allowNull:!0}}})],b.prototype,"timeReference",void 0),(0,s._)([(0,p.Cb)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],b.prototype,"trackIdField",void 0),(0,s._)([(0,p.Cb)({type:Boolean,json:{read:{source:"exportOptions.useTime"},write:{target:"exportOptions.useTime"}}})],b.prototype,"useTime",void 0),b=f=(0,s._)([(0,c.j)("esri.layers.support.TimeInfo")],b);const v=b},78981:(e,t,r)=>{r.d(t,{v:()=>i});const i=(0,r(35454).w)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})}}]);
|