@arcgis/core 4.27.0-next.20230321 → 4.27.0-next.20230323
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/analysis/LineOfSightAnalysisObserver.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/02b6227c156ee0d8eb66.js +1 -0
- package/assets/esri/core/workers/chunks/{7e0c65aa61c2ff0c3504.js → 1c98b92933a48cf96c1e.js} +1 -1
- package/assets/esri/core/workers/chunks/{a27951dbe83c63f9d01a.js → 26bc91a9d9d7345a3eba.js} +1 -1
- package/assets/esri/core/workers/chunks/321f272d4c7ed6b0cb46.js +1 -0
- package/assets/esri/core/workers/chunks/{a09cc8e2ff43fe4afa04.js → 375628de4cfc71cb41c1.js} +1 -1
- package/assets/esri/core/workers/chunks/47bd558e2ce89f47f908.js +1 -0
- package/assets/esri/core/workers/chunks/4cb62855bb1ae608bfde.js +1 -0
- package/assets/esri/core/workers/chunks/4f0c2b6b200bf8222fd7.js +1 -0
- package/assets/esri/core/workers/chunks/5252f3cc244204edc299.js +1 -0
- package/assets/esri/core/workers/chunks/6f952a6464cf9e62dbac.js +1098 -0
- package/assets/esri/core/workers/chunks/76d6c1fc25f02bcf258e.js +1 -0
- package/assets/esri/core/workers/chunks/{d6ec7682de8fad9718e9.js → 77dccfaf1f9e778973b3.js} +1 -1
- package/assets/esri/core/workers/chunks/{c5d872adce711ec61ede.js → 8980c5dc389c27368b73.js} +1 -1
- package/assets/esri/core/workers/chunks/{6acaf28cba5d49a98fb6.js → 91b292f310f06a0cbf72.js} +1 -1
- package/assets/esri/core/workers/chunks/9bac27976e7a71268b7b.js +1 -0
- package/assets/esri/core/workers/chunks/{ff9efa829497557ec26a.js → aa4640a0207e0be224e2.js} +1 -1
- package/assets/esri/core/workers/chunks/{81a6f4b43e047c3395c0.js → aebc5091bd4159197ce0.js} +1 -1
- package/assets/esri/core/workers/chunks/{c8cd3fde6d8d43ddb954.js → b6cdf4daf07d9e55f61e.js} +1 -1
- package/assets/esri/core/workers/chunks/{6b14673a4afd6ef81487.js → c76cabd2d2510a653dff.js} +1 -1
- package/assets/esri/core/workers/chunks/{4be7647605300e07e843.js → c90fff7e28ba5b443b11.js} +1 -1
- package/assets/esri/core/workers/chunks/{e637e47000f4dc48054d.js → cc7f4fd20443a2acf0f1.js} +1 -1
- package/assets/esri/core/workers/chunks/d19e9fab4f4fb765c6a3.js +1 -0
- package/assets/esri/core/workers/chunks/d9ef4891c8b0bdd90f5b.js +1 -0
- package/assets/esri/core/workers/chunks/{d92d6a43270fb0d366b4.js → de4f5c48efbcee82c3c1.js} +1 -1
- package/assets/esri/core/workers/chunks/f6e7948075b3742b4ef9.js +1 -0
- package/assets/esri/core/workers/chunks/{32f9b488915a4a8864e5.js → f8b9e0c1671e55b61904.js} +1 -1
- package/assets/esri/views/3d/analysis/Slice/images/heading-rotate.ts.svg +7 -28
- package/assets/esri/views/3d/analysis/Slice/images/tilt-rotate.ts.svg +11 -0
- package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList.json +1 -1
- 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_en.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/Editor/t9n/Editor_ar.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_nb.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_ar.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_bg.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_bs.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_ca.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_cs.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_da.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_de.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_el.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_en.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_es.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_et.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_fi.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_fr.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_he.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_hr.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_hu.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_id.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_it.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_ja.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_ko.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_lt.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_lv.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_nb.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_nl.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_pl.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_pt-BR.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_pt-PT.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_ro.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_ru.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_sk.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_sl.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_sr.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_sv.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_th.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_tr.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_uk.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_vi.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_zh-CN.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_zh-HK.json +1 -1
- package/assets/esri/widgets/LayerList/t9n/LayerList_zh-TW.json +1 -1
- package/chunks/ComponentShader.glsl.js +1 -1
- package/chunks/DefaultMaterial.glsl.js +4 -4
- package/chunks/vec42.js +1 -1
- package/core/Loadable.js +1 -1
- package/core/accessorSupport/Property.js +1 -1
- package/core/accessorSupport/tracking/SimpleTrackingTarget.js +1 -1
- package/core/analysisThemeUtils.js +1 -1
- package/core/maybe.js +1 -1
- package/geometry/support/buffer/math/vec4.js +1 -1
- package/interfaces.d.ts +1 -1
- package/layers/IntegratedMeshLayer.js +1 -1
- package/layers/LineOfSightLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/graphics/sources/connections/GeoEventConnection.js +1 -1
- package/layers/mixins/ImageryTileMixin.js +1 -1
- package/layers/mixins/RefreshableLayer.js +1 -1
- package/layers/support/SceneFilter.js +1 -1
- package/layers/support/SceneModifications.js +1 -1
- package/layers/support/rasterFunctions/clipUtils.js +1 -1
- package/layers/support/rasterFunctions/stretchUtils.js +1 -1
- package/package.json +1 -1
- package/portal/PortalItemResource.js +1 -1
- package/portal/support/resourceUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/support/utils.js +1 -1
- package/views/2d/engine/vectorTiles/TileHandler.js +1 -1
- package/views/2d/viewpointUtils.js +1 -1
- package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
- package/views/3d/analysis/Dimension/settings.js +1 -1
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/analysis/Slice/SliceVisualization.js +1 -1
- package/views/3d/analysis/Slice/images/Factory.js +1 -1
- package/views/3d/analysis/Slice/images/generateTextures.js +1 -1
- package/views/3d/analysis/Slice/images/heading-rotate-svg.js +1 -1
- package/views/3d/analysis/Slice/images/tilt-rotate-svg.js +5 -0
- package/views/3d/analysis/Slice/settings.js +5 -0
- package/views/3d/analysis/Slice/sliceToolConfig.js +1 -1
- package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
- package/views/3d/environment/Stars.js +1 -1
- package/views/3d/interactive/Manipulator3D.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ExtentTransformTool.js +1 -1
- package/views/3d/interactive/manipulatorUtils.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudWorker.js +1 -1
- package/views/3d/layers/VectorTileLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/i3s/I3SOverrides.js +1 -1
- package/views/3d/layers/i3s/PointCloudRendererUtil.js +1 -1
- package/views/3d/layers/i3s/PointCloudWorkerUtil.js +1 -1
- package/views/3d/layers/i3s/PointGraphic.js +1 -1
- package/views/3d/state/ViewState.js +1 -1
- package/views/3d/state/controllers/SurfaceCollisionCorrectionController.js +1 -1
- package/views/3d/terrain/GeometryState.js +1 -1
- package/views/3d/terrain/PatchGeometry.js +1 -1
- package/views/3d/terrain/PatchGeometryFactory.js +1 -1
- package/views/3d/terrain/TileAgent.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js +6 -5
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +11 -11
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeShadingNormal.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/AnimationTimeStep.js +1 -1
- package/views/3d/webgl-engine/lib/AttributeArray.js +1 -1
- package/views/3d/webgl-engine/lib/DefaultVertexAttributeLocations.js +1 -1
- package/views/3d/webgl-engine/lib/Normals.js +5 -0
- package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/RealisticTreeTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
- package/views/LayerViewManager.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/draw/support/Reshape.js +1 -1
- package/views/layers/SceneLayerView.js +1 -1
- package/views/support/colorUtils.js +1 -1
- package/views/webgl/ShaderTranspiler.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/Daylight/DaylightViewModel.js +1 -1
- package/widgets/Expand.js +1 -1
- package/widgets/FeatureForm/FieldInput.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/Search.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/0487ab23a20ec356ab4c.js +0 -1
- package/assets/esri/core/workers/chunks/29ee4f14602caf6967e4.js +0 -1
- package/assets/esri/core/workers/chunks/2c0775541cfec9d43acb.js +0 -1
- package/assets/esri/core/workers/chunks/4879164b48da9ad4547a.js +0 -1
- package/assets/esri/core/workers/chunks/69060e5cffc19e76062a.js +0 -1
- package/assets/esri/core/workers/chunks/87edeb09a948122fa030.js +0 -1
- package/assets/esri/core/workers/chunks/92951b85676df776961f.js +0 -1100
- package/assets/esri/core/workers/chunks/a71a5c8a9aa302bf6f01.js +0 -1
- package/assets/esri/core/workers/chunks/ad5c61daaed286c74982.js +0 -1
- package/assets/esri/core/workers/chunks/bc002e4dff8859571a7a.js +0 -1
- package/assets/esri/core/workers/chunks/ef2d3e84cd58df5f80af.js +0 -1
- package/assets/esri/core/workers/chunks/fec5e55e0fbf1710e22d.js +0 -1
- package/assets/esri/views/3d/analysis/Slice/images/tilt-rotate.svg +0 -80
- package/assets/esri/views/3d/analysis/Slice/images/tilt-rotate.ts.png +0 -0
- package/views/3d/analysis/Slice/images/tilt-rotate-png.js +0 -5
- package/views/3d/webgl-engine/core/shaderLibrary/util/DecodeNormal.glsl.js +0 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7035,3172,9880],{22303:(e,t,r)=>{r.d(t,{Z:()=>f});var n,o,i=r(35270),s=r(22021),a=r(75215);function u(e){return(0,s.uZ)((0,a.vU)(e),0,255)}function l(e,t,r){return e=Number(e),isNaN(e)?r:e<t?t:e>r?r:e}class c{static blendColors(e,t,r,n=new c){return n.r=Math.round(e.r+(t.r-e.r)*r),n.g=Math.round(e.g+(t.g-e.g)*r),n.b=Math.round(e.b+(t.b-e.b)*r),n.a=e.a+(t.a-e.a)*r,n._sanitize()}static fromRgb(e,t){const r=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(r){const e=r[2].split(/\s*,\s*/),n=r[1];if("rgb"===n&&3===e.length||"rgba"===n&&4===e.length){const r=e[0];if("%"===r.charAt(r.length-1)){const r=e.map((e=>2.56*parseFloat(e)));return 4===e.length&&(r[3]=parseFloat(e[3])),c.fromArray(r,t)}return c.fromArray(e.map((e=>parseFloat(e))),t)}if("hsl"===n&&3===e.length||"hsla"===n&&4===e.length)return c.fromArray((0,i.B7)(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3])),t)}return null}static fromHex(e,t=new c){if(4!==e.length&&7!==e.length||"#"!==e[0])return null;const r=4===e.length?4:8,n=(1<<r)-1;let o=Number("0x"+e.substr(1));return isNaN(o)?null:(["b","g","r"].forEach((e=>{const i=o&n;o>>=r,t[e]=4===r?17*i:i})),t.a=1,t)}static fromArray(e,t=new c){return t._set(Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3])),isNaN(t.a)&&(t.a=1),t._sanitize()}static fromString(e,t){const r=(0,i.St)(e)?(0,i.h$)(e):null;return r&&c.fromArray(r,t)||c.fromRgb(e,t)||c.fromHex(e,t)}static fromJSON(e){return e&&new c([e[0],e[1],e[2],e[3]/255])}static toUnitRGB(e){return null!=e?[e.r/255,e.g/255,e.b/255]:null}static toUnitRGBA(e){return null!=e?[e.r/255,e.g/255,e.b/255,null!=e.a?e.a:1]:null}constructor(e){this.r=255,this.g=255,this.b=255,this.a=1,e&&this.setColor(e)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(e){return"string"==typeof e?c.fromString(e,this):Array.isArray(e)?c.fromArray(e,this):(this._set(e.r??0,e.g??0,e.b??0,e.a??1),e instanceof c||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(){const e=this.r.toString(16),t=this.g.toString(16),r=this.b.toString(16);return`#${e.length<2?"0"+e:e}${t.length<2?"0"+t:t}${r.length<2?"0"+r:r}`}toCss(e=!1){const t=this.r+", "+this.g+", "+this.b;return e?`rgba(${t}, ${this.a})`:`rgb(${t})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(e=c.AlphaMode.ALWAYS){const t=u(this.r),r=u(this.g),n=u(this.b);return e===c.AlphaMode.ALWAYS||1!==this.a?[t,r,n,u(255*this.a)]:[t,r,n]}clone(){return new c(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(e){return null!=e&&e.r===this.r&&e.g===this.g&&e.b===this.b&&e.a===this.a}_sanitize(){return this.r=Math.round(l(this.r,0,255)),this.g=Math.round(l(this.g,0,255)),this.b=Math.round(l(this.b,0,255)),this.a=l(this.a,0,1),this}_set(e,t,r,n){this.r=e,this.g=t,this.b=r,this.a=n}}c.prototype.declaredClass="esri.Color",n=c||(c={}),(o=n.AlphaMode||(n.AlphaMode={}))[o.ALWAYS=0]="ALWAYS",o[o.UNLESS_OPAQUE=1]="UNLESS_OPAQUE";const f=c},99880:(e,t,r)=>{r.d(t,{V:()=>u});var n=r(68773),o=(r(3172),r(20102)),i=r(92604),s=r(17452);const a=i.Z.getLogger("esri.assets");function u(e){if(!n.Z.assetsPath)throw a.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new o.Z("assets:path-not-set","config.assetsPath is not set");return(0,s.v_)(n.Z.assetsPath,e)}},46521:(e,t,r)=>{function n(){return[1,0,0,0,1,0,0,0,1]}function o(e,t,r,n,o,i,s,a,u){return[e,t,r,n,o,i,s,a,u]}function i(e,t){return new Float64Array(e,t,9)}r.d(t,{a:()=>i,c:()=>n,f:()=>o}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},create:n,createView:i,fromValues:o},Symbol.toStringTag,{value:"Module"}))},51305:(e,t,r)=>{r.d(t,{c:()=>h,g:()=>c,j:()=>M,k:()=>g,m:()=>f,s:()=>l});var n=r(46521),o=r(94961),i=r(65617),s=r(46851),a=r(17896),u=r(98766);function l(e,t,r){r*=.5;const n=Math.sin(r);return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=Math.cos(r),e}function c(e,t){const r=2*Math.acos(t[3]),n=Math.sin(r/2);return n>(0,s.g)()?(e[0]=t[0]/n,e[1]=t[1]/n,e[2]=t[2]/n):(e[0]=1,e[1]=0,e[2]=0),r}function f(e,t,r){const n=t[0],o=t[1],i=t[2],s=t[3],a=r[0],u=r[1],l=r[2],c=r[3];return e[0]=n*c+s*a+o*l-i*u,e[1]=o*c+s*u+i*a-n*l,e[2]=i*c+s*l+n*u-o*a,e[3]=s*c-n*a-o*u-i*l,e}function d(e,t,r,n){const o=t[0],i=t[1],a=t[2],u=t[3];let l,c,f,d,h,p=r[0],g=r[1],b=r[2],m=r[3];return c=o*p+i*g+a*b+u*m,c<0&&(c=-c,p=-p,g=-g,b=-b,m=-m),1-c>(0,s.g)()?(l=Math.acos(c),f=Math.sin(l),d=Math.sin((1-n)*l)/f,h=Math.sin(n*l)/f):(d=1-n,h=n),e[0]=d*o+h*p,e[1]=d*i+h*g,e[2]=d*a+h*b,e[3]=d*u+h*m,e}function h(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function p(e,t){const r=t[0]+t[4]+t[8];let n;if(r>0)n=Math.sqrt(r+1),e[3]=.5*n,n=.5/n,e[0]=(t[5]-t[7])*n,e[1]=(t[6]-t[2])*n,e[2]=(t[1]-t[3])*n;else{let r=0;t[4]>t[0]&&(r=1),t[8]>t[3*r+r]&&(r=2);const o=(r+1)%3,i=(r+2)%3;n=Math.sqrt(t[3*r+r]-t[3*o+o]-t[3*i+i]+1),e[r]=.5*n,n=.5/n,e[3]=(t[3*o+i]-t[3*i+o])*n,e[o]=(t[3*o+r]+t[3*r+o])*n,e[i]=(t[3*i+r]+t[3*r+i])*n}return e}function g(e,t,r,n){const o=.5*Math.PI/180;t*=o,r*=o,n*=o;const i=Math.sin(t),s=Math.cos(t),a=Math.sin(r),u=Math.cos(r),l=Math.sin(n),c=Math.cos(n);return e[0]=i*u*c-s*a*l,e[1]=s*a*c+i*u*l,e[2]=s*u*l-i*a*c,e[3]=s*u*c+i*a*l,e}const b=u.c,m=u.s,y=u.a,w=f,O=u.b,A=u.d,T=u.l,C=u.e,v=C,E=u.f,S=E,I=u.n,M=u.g,U=u.h,L=(0,i.c)(),N=(0,i.f)(1,0,0),R=(0,i.f)(0,1,0),F=(0,o.a)(),P=(0,o.a)(),Z=(0,n.c)();Object.freeze(Object.defineProperty({__proto__:null,add:y,calculateW:function(e,t){const r=t[0],n=t[1],o=t[2];return e[0]=r,e[1]=n,e[2]=o,e[3]=Math.sqrt(Math.abs(1-r*r-n*n-o*o)),e},conjugate:h,copy:b,dot:A,equals:U,exactEquals:M,fromEuler:g,fromMat3:p,getAxisAngle:c,identity:function(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},invert:function(e,t){const r=t[0],n=t[1],o=t[2],i=t[3],s=r*r+n*n+o*o+i*i,a=s?1/s:0;return e[0]=-r*a,e[1]=-n*a,e[2]=-o*a,e[3]=i*a,e},len:v,length:C,lerp:T,mul:w,multiply:f,normalize:I,random:function(e){const t=s.R,r=t(),n=t(),o=t(),i=Math.sqrt(1-r),a=Math.sqrt(r);return e[0]=i*Math.sin(2*Math.PI*n),e[1]=i*Math.cos(2*Math.PI*n),e[2]=a*Math.sin(2*Math.PI*o),e[3]=a*Math.cos(2*Math.PI*o),e},rotateX:function(e,t,r){r*=.5;const n=t[0],o=t[1],i=t[2],s=t[3],a=Math.sin(r),u=Math.cos(r);return e[0]=n*u+s*a,e[1]=o*u+i*a,e[2]=i*u-o*a,e[3]=s*u-n*a,e},rotateY:function(e,t,r){r*=.5;const n=t[0],o=t[1],i=t[2],s=t[3],a=Math.sin(r),u=Math.cos(r);return e[0]=n*u-i*a,e[1]=o*u+s*a,e[2]=i*u+n*a,e[3]=s*u-o*a,e},rotateZ:function(e,t,r){r*=.5;const n=t[0],o=t[1],i=t[2],s=t[3],a=Math.sin(r),u=Math.cos(r);return e[0]=n*u+o*a,e[1]=o*u-n*a,e[2]=i*u+s*a,e[3]=s*u-i*a,e},rotationTo:function(e,t,r){const n=(0,a.e)(t,r);return n<-.999999?((0,a.f)(L,N,t),(0,a.u)(L)<1e-6&&(0,a.f)(L,R,t),(0,a.n)(L,L),l(e,L,Math.PI),e):n>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):((0,a.f)(L,t,r),e[0]=L[0],e[1]=L[1],e[2]=L[2],e[3]=1+n,I(e,e))},scale:O,set:m,setAxes:function(e,t,r,n){const o=Z;return o[0]=r[0],o[3]=r[1],o[6]=r[2],o[1]=n[0],o[4]=n[1],o[7]=n[2],o[2]=-t[0],o[5]=-t[1],o[8]=-t[2],I(e,p(e,o))},setAxisAngle:l,slerp:d,sqlerp:function(e,t,r,n,o,i){return d(F,t,o,i),d(P,r,n,i),d(e,F,P,2*i*(1-i)),e},sqrLen:S,squaredLength:E,str:function(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}},Symbol.toStringTag,{value:"Module"}))},37140:(e,t,r)=>{function n(){const e=new Float32Array(4);return e[3]=1,e}function o(e){const t=new Float32Array(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}r.d(t,{b:()=>o,c:()=>n}),Object.freeze(Object.defineProperty({__proto__:null,clone:o,create:n,createView:function(e,t){return new Float32Array(e,t,4)},fromValues:function(e,t,r,n){const o=new Float32Array(4);return o[0]=e,o[1]=t,o[2]=r,o[3]=n,o}},Symbol.toStringTag,{value:"Module"}))},94961:(e,t,r)=>{function n(){return[0,0,0,1]}function o(e){return[e[0],e[1],e[2],e[3]]}function i(e,t){return new Float64Array(e,t,4)}r.d(t,{I:()=>s,a:()=>n,b:()=>o,c:()=>i});const s=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:o,create:n,createView:i,fromValues:function(e,t,r,n){return[e,t,r,n]}},Symbol.toStringTag,{value:"Module"}))},72119:(e,t,r)=>{function n(){return new Float32Array(3)}function o(e){const t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function i(e,t,r){const n=new Float32Array(3);return n[0]=e,n[1]=t,n[2]=r,n}function s(){return n()}function a(){return i(1,1,1)}function u(){return i(1,0,0)}function l(){return i(0,1,0)}function c(){return i(0,0,1)}r.d(t,{b:()=>o,c:()=>n,f:()=>i});const f=s(),d=a(),h=u(),p=l(),g=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:d,UNIT_X:h,UNIT_Y:p,UNIT_Z:g,ZEROS:f,clone:o,create:n,createView:function(e,t){return new Float32Array(e,t,3)},fromValues:i,ones:a,unitX:u,unitY:l,unitZ:c,zeros:s},Symbol.toStringTag,{value:"Module"}))},36030:(e,t,r)=>{r.d(t,{J:()=>i});var n=r(35454),o=r(5600);function i(e,t={}){const r=e instanceof n.X?e:new n.X(e,t),i={type:t?.ignoreUnknown??1?r.apiValues:String,json:{type:r.jsonValues,read:!t?.readOnly&&{reader:r.read},write:{writer:r.write}}};return void 0!==t?.readOnly&&(i.readOnly=!!t.readOnly),void 0!==t?.default&&(i.json.default=t.default),void 0!==t?.name&&(i.json.name=t.name),void 0!==t?.nonNullable&&(i.nonNullable=t.nonNullable),(0,o.Cb)(i)}},10661:(e,t,r)=>{r.d(t,{s:()=>o});var n=r(42100);class o extends n.s{notify(){const e=this._observers;if(e&&e.length>0){const t=e.slice();for(const e of t)e.onInvalidated(),e.onCommitted()}}}},3172:(e,t,r)=>{r.r(t),r.d(t,{default:()=>h});var n=r(68773),o=r(40330),i=r(20102),s=r(80442),a=r(22974),u=r(95330),l=r(17452),c=r(19745),f=r(71058),d=r(85958);async function h(e,t){const a=(0,l.HK)(e),c=(0,l.jc)(e);c||a||(e=(0,l.Fv)(e));const m={url:e,requestOptions:{...t}};let y=(0,l.oh)(e);if(y){const e=await async function(e,t){if(null!=e.responseData)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let r,n;try{n=await e.before(t)}catch(e){r=C("request:interceptor",e,t)}if((n instanceof Error||n instanceof i.Z)&&(r=C("request:interceptor",n,t)),r)throw e.error&&e.error(r),r;return n}}(y,m);if(null!=e)return{data:e,getHeader:O,httpStatus:200,requestOptions:m.requestOptions,url:m.url};y.after||y.error||(y=null)}if(e=m.url,"image"===(t=m.requestOptions).responseType){if((0,s.Z)("host-webworker")||(0,s.Z)("host-node"))throw C("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),m)}else if(a)throw C("request:invalid-parameters",new Error("Data URLs are not supported for responseType = "+t.responseType),m);if("head"===t.method){if(t.body)throw C("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),m);if(a||c)throw C("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),m)}if(await async function(){(0,s.Z)("host-webworker")?p||(p=await r.e(9884).then(r.bind(r,29884))):h._abortableFetch||(h._abortableFetch=globalThis.fetch.bind(globalThis))}(),p)return p.execute(e,t);const w=new AbortController;(0,u.fu)(t,(()=>w.abort()));const A={controller:w,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:y,params:m,redoRequest:!1,useIdentity:g.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},T=await async function(e){let t,r;await async function(e){const t=e.params.url,r=e.params.requestOptions,i=e.controller.signal,s=r.body;let a=null,l=null;if(b&&"HTMLFormElement"in globalThis&&(s instanceof FormData?a=s:s instanceof HTMLFormElement&&(a=new FormData(s))),"string"==typeof s&&(l=s),e.fetchOptions={cache:r.cacheBust&&!h._abortableFetch.polyfill?"no-cache":"default",credentials:"same-origin",headers:r.headers||{},method:"head"===r.method?"HEAD":"GET",mode:"cors",priority:g.priority,redirect:"follow",signal:i},(a||l)&&(e.fetchOptions.body=a||l),"anonymous"===r.authMode&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(t)||r.query?.token||a?.get("token")),!e.hasToken&&n.Z.apiKey&&(0,f.r)(t)&&(r.query||(r.query={}),r.query.token=n.Z.apiKey,e.hasToken=!0),e.useIdentity&&!e.hasToken&&!e.credentialToken&&!E(t)&&!(0,u.Hc)(i)){let n;"immediate"===r.authMode?(await v(),n=await o.id.getCredential(t,{signal:i}),e.credential=n):"no-prompt"===r.authMode?(await v(),n=await o.id.getCredential(t,{prompt:!1,signal:i}).catch((()=>{})),e.credential=n):o.id&&(n=o.id.findCredential(t)),n&&(e.credentialToken=n.token,e.useSSL=!!n.ssl)}}(e);try{do{[t,r]=await S(e)}while(!await M(e,t,r))}catch(r){const n=C("request:server",r,e.params,t);throw n.details.ssl=e.useSSL,e.interceptor&&e.interceptor.error&&e.interceptor.error(n),n}const i=e.params.url;if(r&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(i)){if(!e.hasToken&&!e.credentialToken&&r.user?.username&&!(0,l.kl)(i)){const e=(0,l.P$)(i,!0);e&&g.trustedServers.push(e)}Array.isArray(r.authorizedCrossOriginNoCorsDomains)&&(0,d.Hu)(r.authorizedCrossOriginNoCorsDomains)}const s=e.credential;if(s&&o.id){const e=o.id.findServerInfo(s.server);let t=e&&e.owningSystemUrl;if(t){t=t.replace(/\/?$/,"/sharing");const e=o.id.findCredential(t,s.userId);e&&-1===o.id._getIdenticalSvcIdx(t,e)&&e.resources.unshift(t)}}return{data:r,getHeader:t?e=>t?.headers.get(e):O,httpStatus:t?.status??200,requestOptions:e.params.requestOptions,ssl:e.useSSL,url:e.params.url}}(A);return y?.after?.(T),T}let p;const g=n.Z.request,b="FormData"in globalThis,m=[499,498,403,401],y=["COM_0056","COM_0057","SB_0008"],w=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],O=()=>null,A=Symbol();function T(e){const t=(0,l.P$)(e);return!t||t.endsWith(".arcgis.com")||h._corsServers.includes(t)||(0,l.kl)(t)}function C(e,t,r,n){let o="Error";const s={url:r.url,requestOptions:r.requestOptions,getHeader:O,ssl:!1};if(t instanceof i.Z)return t.details?(t.details=(0,a.d9)(t.details),t.details.url=r.url,t.details.requestOptions=r.requestOptions):t.details=s,t;if(t){const e=n&&(e=>n.headers.get(e)),r=n&&n.status,i=t.message;i&&(o=i),e&&(s.getHeader=e),s.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||r||0,s.subCode=t.subcode,s.messageCode=t.messageCode,"string"==typeof t.details?s.messages=[t.details]:s.messages=t.details,s.raw=A in t?t[A]:t}return(0,u.D_)(t)?(0,u.zE)():new i.Z(e,o,s)}async function v(){o.id||await Promise.all([r.e(6261),r.e(1400),r.e(450)]).then(r.bind(r,73660))}function E(e){return w.some((t=>t.test(e)))}async function S(e){let t=e.params.url;const r=e.params.requestOptions,n=e.fetchOptions??{},i=(0,l.jc)(t)||(0,l.HK)(t),a=r.responseType||"json",f=i?0:null!=r.timeout?r.timeout:g.timeout;let p=!1;if(!i){e.useSSL&&(t=(0,l.hO)(t)),r.cacheBust&&"default"===n.cache&&(t=(0,l.ZN)(t,"request.preventCache",Date.now()));let i={...r.query};e.credentialToken&&(i.token=e.credentialToken);let a=(0,l.B7)(i);(0,s.Z)("esri-url-encodes-apostrophe")&&(a=a.replace(/'/g,"%27"));const u=t.length+1+a.length;let f;p="delete"===r.method||"post"===r.method||"put"===r.method||!!r.body||u>g.maxUrlLength;const h=r.useProxy||!!(0,l.ed)(t);if(h){const e=(0,l.b7)(t);f=e.path,!p&&f.length+1+u>g.maxUrlLength&&(p=!0),e.query&&(i={...e.query,...i})}if("HEAD"===n.method&&(p||h)){if(p){if(u>g.maxUrlLength)throw C("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params);throw C("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params)}if(h)throw C("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}if(p?(n.method="delete"===r.method?"DELETE":"put"===r.method?"PUT":"POST",r.body?t=(0,l.fl)(t,i):(n.body=(0,l.B7)(i),n.headers||(n.headers={}),n.headers["Content-Type"]="application/x-www-form-urlencoded")):t=(0,l.fl)(t,i),h&&(e.useProxy=!0,t=`${f}?${t}`),i.token&&b&&n.body instanceof FormData&&!(0,c.P)(t)&&n.body.set("token",i.token),r.hasOwnProperty("withCredentials"))e.withCredentials=r.withCredentials;else if(!(0,l.D6)(t,(0,l.TI)()))if((0,l.kl)(t))e.withCredentials=!0;else if(o.id){const r=o.id.findServerInfo(t);r&&r.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(n.credentials="include",(0,d.jH)(t)&&await(0,d.jz)(p?(0,l.fl)(t,i):t))}let m,y,w=0,O=!1;f>0&&(w=setTimeout((()=>{O=!0,e.controller.abort()}),f));try{if("native-request-init"===r.responseType)y=n,y.url=t;else if("image"!==r.responseType||"default"!==n.cache||"GET"!==n.method||p||function(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}(r.headers)||!i&&!e.useProxy&&g.proxyUrl&&!T(t)){if(m=await h._abortableFetch(t,n),e.useProxy||function(e){const t=(0,l.P$)(e);t&&!h._corsServers.includes(t)&&h._corsServers.push(t)}(t),"native"===r.responseType)y=m;else if("HEAD"!==n.method)if(m.ok){switch(a){case"array-buffer":y=await m.arrayBuffer();break;case"blob":case"image":y=await m.blob();break;default:y=await m.text()}if(w&&(clearTimeout(w),w=0),"json"===a||"xml"===a||"document"===a)if(y)switch(a){case"json":y=JSON.parse(y);break;case"xml":y=I(y,"application/xml");break;case"document":y=I(y,"text/html")}else y=null;if(y){if("array-buffer"===a||"blob"===a){const e=m.headers.get("Content-Type");if(e&&/application\/json|text\/plain/i.test(e)&&y["blob"===a?"size":"byteLength"]<=750)try{const e=await new Response(y).json();e.error&&(y=e)}catch{}}"image"===a&&y instanceof Blob&&(y=await U(URL.createObjectURL(y),e,!0))}}else y=await m.text()}else y=await U(t,e)}catch(n){if("AbortError"===n.name){if(O)throw new Error("Timeout exceeded");throw(0,u.zE)("Request canceled")}if(!(!m&&n instanceof TypeError&&g.proxyUrl)||r.body||"delete"===r.method||"head"===r.method||"post"===r.method||"put"===r.method||e.useProxy||T(t))throw n;e.redoRequest=!0,(0,l.tD)({proxyUrl:g.proxyUrl,urlPrefix:(0,l.P$)(t)??""})}finally{w&&clearTimeout(w)}return[m,y]}function I(e,t){let r;try{r=(new DOMParser).parseFromString(e,t)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}async function M(e,t,r){if(e.redoRequest)return e.redoRequest=!1,!1;const n=e.params.requestOptions;if(!t||"native"===n.responseType||"native-request-init"===n.responseType)return!0;let i,s;if(!t.ok)throw i=new Error(`Unable to load ${t.url} status: ${t.status}`),i[A]=r,i;r&&(r.error?i=r.error:"error"===r.status&&Array.isArray(r.messages)&&(i={...r},i[A]=r,i.details=r.messages));let a,u=null;i&&(s=Number(i.code),u=i.hasOwnProperty("subcode")?Number(i.subcode):null,a=i.messageCode,a=a&&a.toUpperCase());const l=n.authMode;if(403===s&&(4===u||i.message&&i.message.toLowerCase().includes("ssl")&&!i.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==l||498===s)&&void 0!==s&&m.includes(s)&&!E(e.params.url)&&(403!==s||a&&!y.includes(a)&&(null==u||2===u&&e.credentialToken))){await v();try{const t=await o.id.getCredential(e.params.url,{error:C("request:server",i,e.params),prompt:"no-prompt"!==l,signal:e.controller.signal,token:e.credentialToken});return e.credential=t,e.credentialToken=t.token,e.useSSL=e.useSSL||t.ssl,!1}catch(t){if("no-prompt"===l)return e.credential=void 0,e.credentialToken=void 0,!1;i=t}}if(i)throw i;return!0}function U(e,t,r=!1){const n=t.controller.signal,o=new Image;return t.withCredentials?o.crossOrigin="use-credentials":o.crossOrigin="anonymous",o.alt="",o.fetchPriority=g.priority,o.src=e,(0,d.fY)(o,e,r,n)}h._abortableFetch=null,h._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"]},71058:(e,t,r)=>{r.d(t,{r:()=>i});var n=r(17452);const o=["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"];function i(e){const t=(0,n.P$)(e,!0);return!!t&&t.endsWith(".arcgis.com")&&!o.includes(t)&&!e.endsWith("/sharing/rest/generateToken")}},85958:(e,t,r)=>{r.d(t,{Hu:()=>l,fY:()=>a,jH:()=>c,jz:()=>f});var n=r(68773),o=r(80442),i=r(95330),s=r(17452);function a(e,t,r=!1,n){return new Promise(((s,a)=>{if((0,i.Hc)(n))return void a(u());let l=()=>{d(),a(new Error(`Unable to load ${t}`))},c=()=>{const t=e;d(),s(t)},f=()=>{if(!e)return;const t=e;d(),t.src="",a(u())};const d=()=>{(0,o.Z)("esri-image-decode")||(e.removeEventListener("error",l),e.removeEventListener("load",c)),l=null,c=null,e=null,null!=n&&n.removeEventListener("abort",f),f=null,r&&URL.revokeObjectURL(t)};null!=n&&n.addEventListener("abort",f),(0,o.Z)("esri-image-decode")?e.decode().then(c,l):(e.addEventListener("error",l),e.addEventListener("load",c))}))}function u(){try{return new DOMException("Aborted","AbortError")}catch{const e=new Error;return e.name="AbortError",e}}function l(e){n.Z.request.crossOriginNoCorsDomains||(n.Z.request.crossOriginNoCorsDomains={});const t=n.Z.request.crossOriginNoCorsDomains;for(let r of e)r=r.toLowerCase(),/^https?:\/\//.test(r)?t[(0,s.P$)(r)??""]=0:(t[(0,s.P$)("http://"+r)??""]=0,t[(0,s.P$)("https://"+r)??""]=0)}function c(e){const t=n.Z.request.crossOriginNoCorsDomains;if(t){let r=(0,s.P$)(e);if(r)return r=r.toLowerCase(),!(0,s.D6)(r,(0,s.TI)())&&t[r]<Date.now()-36e5}return!1}async function f(e){const t=n.Z.request.crossOriginNoCorsDomains,r=(0,s.P$)(e);t&&r&&(t[r.toLowerCase()]=Date.now());const o=(0,s.mN)(e);e=o.path,"json"===o.query?.f&&(e+="?f=json");try{await fetch(e,{mode:"no-cors",credentials:"include"})}catch{}}},90447:(e,t,r)=>{r.r(t),r.d(t,{default:()=>A});var n=r(70586),o=r(1533),i=r(51305),s=r(37140),a=r(17896),u=r(72119),l=r(44547),c=r(82971),f=r(23030),d=r(14008),h=r(46329),p=r(91891),g=r(25683);function b(e,t,r){return null!=e&&e.attributeInfo.useElevation?t?function(e,t){const r=new Float64Array(t);for(let n=0;n<t;n++)r[n]=e[3*n+2];return r}(t,r):null:null!=e&&e.attributeInfo.storageInfo?(0,p.qM)(e.attributeInfo.storageInfo,e.buffer,r):null}function m(e){return null==e||"none"===e?null:"low-four-bit"===e?e=>15&e:"high-four-bit"===e?e=>(240&e)>>4:"absolute-value"===e?e=>Math.abs(e):"modulo-ten"===e?e=>e%10:null}function y(e){let t=0;for(const r of e||[])t|=1<<r;return t}class w{transform(e){const t=this._transform(e),r=[t.points.buffer,t.rgb.buffer];null!=t.pointIdFilterMap&&r.push(t.pointIdFilterMap.buffer);for(const e of t.attributes)"buffer"in e.values&&(0,o.eP)(e.values.buffer)&&e.values.buffer!==t.rgb.buffer&&r.push(e.values.buffer);return Promise.resolve({result:t,transferList:r})}_transform(e){const t=function(e,t){if(null==e.encoding||""===e.encoding){const r=(0,p.W7)(t,e);if(null==r.vertexAttributes.position)return;const n=(0,p.I_)(t,r.vertexAttributes.position),o=r.header.fields,i=[o.offsetX,o.offsetY,o.offsetZ],s=[o.scaleX,o.scaleY,o.scaleZ],a=n.length/3,u=new Float64Array(3*a);for(let e=0;e<a;e++)u[3*e]=n[3*e]*s[0]+i[0],u[3*e+1]=n[3*e+1]*s[1]+i[1],u[3*e+2]=n[3*e+2]*s[2]+i[2];return u}if("lepcc-xyz"===e.encoding)return(0,g.Gi)(t).result}(e.schema,e.geometryBuffer);let r=t.length/3,o=null;const i=[],s=b(e.primaryAttributeData,t,r);null!=e.primaryAttributeData&&s&&i.push({attributeInfo:e.primaryAttributeData.attributeInfo,values:s});const a=b(e.modulationAttributeData,t,r);null!=e.modulationAttributeData&&a&&i.push({attributeInfo:e.modulationAttributeData.attributeInfo,values:a});let u=function(e,t,r,n){const{rendererJSON:o,isRGBRenderer:i}=e;let s=null,a=null;if(t&&i)s=t;else if(t&&"pointCloudUniqueValueRenderer"===o?.type){a=h.Z.fromJSON(o);const e=a.colorUniqueValueInfos;s=new Uint8Array(3*n);const r=m(a.fieldTransformType);for(let o=0;o<n;o++){const n=(r?r(t[o]):t[o])+"";for(let t=0;t<e.length;t++)if(e[t].values.includes(n)){s[3*o]=e[t].color.r,s[3*o+1]=e[t].color.g,s[3*o+2]=e[t].color.b;break}}}else if(t&&"pointCloudStretchRenderer"===o?.type){a=d.Z.fromJSON(o);const e=a.stops;s=new Uint8Array(3*n);const r=m(a.fieldTransformType);for(let o=0;o<n;o++){const n=r?r(t[o]):t[o],i=e.length-1;if(n<e[0].value)s[3*o]=e[0].color.r,s[3*o+1]=e[0].color.g,s[3*o+2]=e[0].color.b;else if(n>=e[i].value)s[3*o]=e[i].color.r,s[3*o+1]=e[i].color.g,s[3*o+2]=e[i].color.b;else for(let t=1;t<e.length;t++)if(n<e[t].value){const r=(n-e[t-1].value)/(e[t].value-e[t-1].value);s[3*o]=e[t].color.r*r+e[t-1].color.r*(1-r),s[3*o+1]=e[t].color.g*r+e[t-1].color.g*(1-r),s[3*o+2]=e[t].color.b*r+e[t-1].color.b*(1-r);break}}}else if(t&&"pointCloudClassBreaksRenderer"===o?.type){a=f.Z.fromJSON(o);const e=a.colorClassBreakInfos;s=new Uint8Array(3*n);const r=m(a.fieldTransformType);for(let o=0;o<n;o++){const n=r?r(t[o]):t[o];for(let t=0;t<e.length;t++)if(n>=e[t].minValue&&n<=e[t].maxValue){s[3*o]=e[t].color.r,s[3*o+1]=e[t].color.g,s[3*o+2]=e[t].color.b;break}}}else{s=new Uint8Array(3*n);for(let e=0;e<s.length;e++)s[e]=255}if(r&&a&&a.colorModulation){const e=a.colorModulation.minValue,t=a.colorModulation.maxValue,o=.3;for(let i=0;i<n;i++){const n=r[i],a=n>=t?1:n<=e?o:o+(1-o)*(n-e)/(t-e);s[3*i]=a*s[3*i],s[3*i+1]=a*s[3*i+1],s[3*i+2]=a*s[3*i+2]}}return s}(e.rendererInfo,s,a,r);if(e.filterInfo&&e.filterInfo.length>0&&null!=e.filterAttributesData){const s=e.filterAttributesData.filter(n.pC).map((e=>{const n=b(e,t,r),o={attributeInfo:e.attributeInfo,values:n};return i.push(o),o}));o=new Uint32Array(r),r=function(e,t,r,n,o){const i=e.length/3;let s=0;for(let a=0;a<i;a++){let i=!0;for(let e=0;e<n.length&&i;e++){const{filterJSON:t}=n[e],r=o[e].values[a];switch(t.type){case"pointCloudValueFilter":{const e="exclude"===t.mode;t.values.includes(r)===e&&(i=!1);break}case"pointCloudBitfieldFilter":{const e=y(t.requiredSetBits),n=y(t.requiredClearBits);(r&e)===e&&0==(r&n)||(i=!1);break}case"pointCloudReturnFilter":{const e=15&r,n=r>>>4&15,o=n>1,s=1===e,a=e===n;let u=!1;for(const e of t.includedReturns)if("last"===e&&a||"firstOfMany"===e&&s&&o||"lastOfMany"===e&&a&&o||"single"===e&&!o){u=!0;break}u||(i=!1);break}}}i&&(r[s]=a,e[3*s]=e[3*a],e[3*s+1]=e[3*a+1],e[3*s+2]=e[3*a+2],t[3*s]=t[3*a],t[3*s+1]=t[3*a+1],t[3*s+2]=t[3*a+2],s++)}return s}(t,u,o,e.filterInfo,s)}for(const n of e.userAttributesData){const e=b(n,t,r);i.push({attributeInfo:n.attributeInfo,values:e})}3*r<u.length&&(u=new Uint8Array(u.buffer.slice(0,3*r))),this._applyElevationOffsetInPlace(t,r,e.elevationOffset);const l=this._transformCoordinates(t,r,e.obb,c.Z.fromJSON(e.inSR),c.Z.fromJSON(e.outSR));return{obb:e.obb,points:l,rgb:u,attributes:i,pointIdFilterMap:o}}_transformCoordinates(e,t,r,n,o){if(!(0,l.CM)(e,n,0,e,o,0,t))throw new Error("Can't reproject");const s=(0,u.f)(r.center[0],r.center[1],r.center[2]),c=(0,u.c)(),f=(0,u.c)();(0,i.c)(O,r.quaternion);const d=new Float32Array(3*t);for(let n=0;n<t;n++)c[0]=e[3*n]-s[0],c[1]=e[3*n+1]-s[1],c[2]=e[3*n+2]-s[2],(0,a.q)(f,c,O),r.halfSize[0]=Math.max(r.halfSize[0],Math.abs(f[0])),r.halfSize[1]=Math.max(r.halfSize[1],Math.abs(f[1])),r.halfSize[2]=Math.max(r.halfSize[2],Math.abs(f[2])),d[3*n]=c[0],d[3*n+1]=c[1],d[3*n+2]=c[2];return d}_applyElevationOffsetInPlace(e,t,r){if(0!==r)for(let n=0;n<t;n++)e[3*n+2]+=r}}const O=(0,s.c)();function A(){return new w}},91891:(e,t,r)=>{r.d(t,{I_:()=>d,W7:()=>g,qM:()=>m});var n=r(20102),o=r(22974),i=r(92604),s=r(25683),a=r(35065);const u=i.Z.getLogger("esri.views.3d.layers.i3s.I3SBinaryReader");function l(e,t,r){let o="",i=0;for(;i<r;){const s=e[t+i];if(s<128)o+=String.fromCharCode(s),i++;else if(s>=192&&s<224){if(i+1>=r)throw new n.Z("utf8-decode-error","UTF-8 Decode failed. Two byte character was truncated.");const a=(31&s)<<6|63&e[t+i+1];o+=String.fromCharCode(a),i+=2}else if(s>=224&&s<240){if(i+2>=r)throw new n.Z("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const a=(15&s)<<12|(63&e[t+i+1])<<6|63&e[t+i+2];o+=String.fromCharCode(a),i+=3}else{if(!(s>=240&&s<248))throw new n.Z("utf8-decode-error","UTF-8 Decode failed. Invalid multi byte sequence.");{if(i+3>=r)throw new n.Z("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const a=(7&s)<<18|(63&e[t+i+1])<<12|(63&e[t+i+2])<<6|63&e[t+i+3];if(a>=65536){const e=55296+(a-65536>>10),t=56320+(1023&a);o+=String.fromCharCode(e,t)}else o+=String.fromCharCode(a);i+=4}}}return o}function c(e,t){const r={byteOffset:0,byteCount:0,fields:Object.create(null)};let n=0;for(let o=0;o<t.length;o++){const i=t[o],s=i.valueType||i.type,a=w[s];r.fields[i.property]=a(e,n),n+=y[s].BYTES_PER_ELEMENT}return r.byteCount=n,r}function f(e,t,r){const o=[];let i,s,a=0;for(s=0;s<e;s+=1){if(i=t[s],i>0){if(o.push(l(r,a,i-1)),0!==r[a+i-1])throw new n.Z("string-array-error","Invalid string array: missing null termination.")}else o.push(null);a+=i}return o}function d(e,t){return new(0,y[t.valueType])(e,t.byteOffset,t.count*t.valuesPerElement)}function h(e,t,r){const i=null!=t.header?c(e,t.header):{byteOffset:0,byteCount:0,fields:{count:r}},s={header:i,byteOffset:i.byteCount,byteCount:0,entries:Object.create(null)};let a=i.byteCount;for(let e=0;e<t.ordering.length;e++){const r=t.ordering[e],u=(0,o.d9)(t[r]);if(u.count=i.fields.count??0,"String"===u.valueType){if(u.byteOffset=a,u.byteCount=i.fields[r+"ByteCount"],"UTF-8"!==u.encoding)throw new n.Z("unsupported-encoding","Unsupported String encoding.",{encoding:u.encoding});if(u.timeEncoding&&"ECMA_ISO8601"!==u.timeEncoding)throw new n.Z("unsupported-time-encoding","Unsupported time encoding.",{timeEncoding:u.timeEncoding})}else{if(!O(u.valueType))throw new n.Z("unsupported-value-type","Unsupported binary valueType",{valueType:u.valueType});{const e=A(u.valueType);a+=a%e!=0?e-a%e:0,u.byteOffset=a,u.byteCount=e*u.valuesPerElement*u.count}}a+=u.byteCount??0,s.entries[r]=u}return s.byteCount=a-s.byteOffset,s}function p(e,t,r){if(t!==e&&u.error(`Invalid ${r} buffer size\n expected: ${e}, actual: ${t})`),t<e)throw new n.Z("buffer-too-small","Binary buffer is too small",{expectedSize:e,actualSize:t})}function g(e,t){const r=c(e,t&&t.header);let n=r.byteCount;const o={isDraco:!1,header:r,byteOffset:r.byteCount,byteCount:0,vertexAttributes:{}},i=r.fields,s=null!=i.vertexCount?i.vertexCount:i.count;for(const e of t.ordering){if(!t.vertexAttributes[e])continue;const r={...t.vertexAttributes[e],byteOffset:n,count:s},i=b[e]||"_"+e;o.vertexAttributes[i]=r,n+=A(r.valueType)*r.valuesPerElement*s}const a=i.faceCount;if(t.faces&&a){o.faces={};for(const e of t.ordering){if(!t.faces[e])continue;const r={...t.faces[e],byteOffset:n,count:a};o.faces[e]=r,n+=A(r.valueType)*r.valuesPerElement*a}}const u=i.featureCount;if(t.featureAttributes&&t.featureAttributeOrder&&u){o.featureAttributes={};for(const e of t.featureAttributeOrder){if(!t.featureAttributes[e])continue;const r={...t.featureAttributes[e],byteOffset:n,count:u};o.featureAttributes[e]=r,n+=("UInt64"===r.valueType?8:A(r.valueType))*r.valuesPerElement*u}}return p(n,e.byteLength,"geometry"),o.byteCount=n-o.byteOffset,o}const b={position:a.T.POSITION,normal:a.T.NORMAL,color:a.T.COLOR,uv0:a.T.UV0,region:a.T.UVREGION};function m(e,t,r){if("lepcc-rgb"===e.encoding)return(0,s.IT)(t);if("lepcc-intensity"===e.encoding)return(0,s.ti)(t);if(null!=e.encoding&&""!==e.encoding)throw new n.Z("unknown-attribute-storage-info-encoding","Unknown Attribute Storage Info Encoding");e["attributeByteCounts "]&&!e.attributeByteCounts&&(u.warn("Warning: Trailing space in 'attributeByteCounts '."),e.attributeByteCounts=e["attributeByteCounts "]),"ObjectIds"===e.ordering[0]&&e.hasOwnProperty("objectIds")&&(u.warn("Warning: Case error in objectIds"),e.ordering[0]="objectIds");const o=h(t,e,r);p(o.byteOffset+o.byteCount,t.byteLength,"attribute");const i=o.entries.attributeValues||o.entries.objectIds;if(i){if("String"===i.valueType){const e=o.entries.attributeByteCounts,r=d(t,e),n=function(e,t){return new Uint8Array(e,t.byteOffset,t.byteCount)}(t,i);return i.timeEncoding?function(e,t,r){return f(e,t,r).map((e=>{const t=e?Date.parse(e):null;return t&&!Number.isNaN(t)?t:null}))}(e.count,r,n):f(e.count,r,n)}return d(t,i)}throw new n.Z("bad-attribute-storage-info","Bad attributeStorageInfo specification.")}const y={Float32:Float32Array,Float64:Float64Array,UInt8:Uint8Array,Int8:Int8Array,UInt16:Uint16Array,Int16:Int16Array,UInt32:Uint32Array,Int32:Int32Array},w={Float32:(e,t)=>new DataView(e,0).getFloat32(t,!0),Float64:(e,t)=>new DataView(e,0).getFloat64(t,!0),UInt8:(e,t)=>new DataView(e,0).getUint8(t),Int8:(e,t)=>new DataView(e,0).getInt8(t),UInt16:(e,t)=>new DataView(e,0).getUint16(t,!0),Int16:(e,t)=>new DataView(e,0).getInt16(t,!0),UInt32:(e,t)=>new DataView(e,0).getUint32(t,!0),Int32:(e,t)=>new DataView(e,0).getInt32(t,!0)};function O(e){return y.hasOwnProperty(e)}function A(e){return O(e)?y[e].BYTES_PER_ELEMENT:0}},25683:(e,t,r)=>{r.d(t,{Gi:()=>l,IT:()=>p,ti:()=>m});var n=r(20102);const o=!0,i={identifierOffset:0,identifierLength:10,versionOffset:10,checksumOffset:12,byteCount:16};function s(e,t,r){return{identifier:String.fromCharCode.apply(null,new Uint8Array(e,r+i.identifierOffset,i.identifierLength)),version:t.getUint16(r+i.versionOffset,o),checksum:t.getUint32(r+i.checksumOffset,o)}}const a={sizeLo:0,sizeHi:4,minX:8,minY:16,minZ:24,maxX:32,maxY:40,maxZ:48,errorX:56,errorY:64,errorZ:72,count:80,reserved:84,byteCount:88};function u(e,t){return{sizeLo:e.getUint32(t+a.sizeLo,o),sizeHi:e.getUint32(t+a.sizeHi,o),minX:e.getFloat64(t+a.minX,o),minY:e.getFloat64(t+a.minY,o),minZ:e.getFloat64(t+a.minZ,o),maxX:e.getFloat64(t+a.maxX,o),maxY:e.getFloat64(t+a.maxY,o),maxZ:e.getFloat64(t+a.maxZ,o),errorX:e.getFloat64(t+a.errorX,o),errorY:e.getFloat64(t+a.errorY,o),errorZ:e.getFloat64(t+a.errorZ,o),count:e.getUint32(t+a.count,o),reserved:e.getUint32(t+a.reserved,o)}}function l(e){const t=new DataView(e,0);let r=0;const{identifier:o,version:l}=s(e,t,r);if(r+=i.byteCount,"LEPCC "!==o)throw new n.Z("lepcc-decode-error","Bad identifier");if(l>1)throw new n.Z("lepcc-decode-error","Unknown version");const f=u(t,r);if(r+=a.byteCount,f.sizeHi*2**32+f.sizeLo!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad size");const d=new Float64Array(3*f.count),h=[],p=[],g=[],b=[];if(r=c(e,r,h),r=c(e,r,p),r=c(e,r,g),r=c(e,r,b),r!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad length");let m=0,y=0;for(let e=0;e<h.length;e++){y+=h[e];let t=0;for(let r=0;r<p[e];r++){t+=g[m];const e=b[m];d[3*m]=Math.min(f.maxX,f.minX+2*f.errorX*t),d[3*m+1]=Math.min(f.maxY,f.minY+2*f.errorY*y),d[3*m+2]=Math.min(f.maxZ,f.minZ+2*f.errorZ*e),m++}}return{errorX:f.errorX,errorY:f.errorY,errorZ:f.errorZ,result:d}}function c(e,t,r){const n=[];t=f(e,t,n);const o=[];for(let i=0;i<n.length;i++){o.length=0,t=f(e,t,o);for(let e=0;e<o.length;e++)r.push(o[e]+n[i])}return t}function f(e,t,r){const i=new DataView(e,t),s=i.getUint8(0),a=31&s,u=!!(32&s),l=(192&s)>>6;let c=0;if(0===l)c=i.getUint32(1,o),t+=5;else if(1===l)c=i.getUint16(1,o),t+=3;else{if(2!==l)throw new n.Z("lepcc-decode-error","Bad count type");c=i.getUint8(1),t+=2}if(u)throw new n.Z("lepcc-decode-error","LUT not implemented");const f=Math.ceil(c*a/8),d=new Uint8Array(e,t,f);let h=0,p=0,g=0;const b=-1>>>32-a;for(let e=0;e<c;e++){for(;p<a;)h|=d[g]<<p,p+=8,g+=1;r[e]=h&b,h>>>=a,p-=a,p+a>32&&(h|=d[g-1]>>8-p)}return t+g}const d={sizeLo:0,sizeHi:4,count:8,colorMapCount:12,lookupMethod:14,compressionMethod:15,byteCount:16};function h(e,t){return{sizeLo:e.getUint32(t+d.sizeLo,o),sizeHi:e.getUint32(t+d.sizeHi,o),count:e.getUint32(t+d.count,o),colorMapCount:e.getUint16(t+d.colorMapCount,o),lookupMethod:e.getUint8(t+d.lookupMethod),compressionMethod:e.getUint8(t+d.compressionMethod)}}function p(e){const t=new DataView(e,0);let r=0;const{identifier:o,version:a}=s(e,t,r);if(r+=i.byteCount,"ClusterRGB"!==o)throw new n.Z("lepcc-decode-error","Bad identifier");if(a>1)throw new n.Z("lepcc-decode-error","Unknown version");const u=h(t,r);if(r+=d.byteCount,u.sizeHi*2**32+u.sizeLo!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad size");if((2===u.lookupMethod||1===u.lookupMethod)&&0===u.compressionMethod){if(3*u.colorMapCount+u.count+r!==e.byteLength||u.colorMapCount>256)throw new n.Z("lepcc-decode-error","Bad count");const t=new Uint8Array(e,r,3*u.colorMapCount),o=new Uint8Array(e,r+3*u.colorMapCount,u.count),i=new Uint8Array(3*u.count);for(let e=0;e<u.count;e++){const r=o[e];i[3*e]=t[3*r],i[3*e+1]=t[3*r+1],i[3*e+2]=t[3*r+2]}return i}if(0===u.lookupMethod&&0===u.compressionMethod){if(3*u.count+r!==e.byteLength||0!==u.colorMapCount)throw new n.Z("lepcc-decode-error","Bad count");return new Uint8Array(e,r).slice()}if(u.lookupMethod<=2&&1===u.compressionMethod){if(r+3!==e.byteLength||1!==u.colorMapCount)throw new n.Z("lepcc-decode-error","Bad count");const o=t.getUint8(r),i=t.getUint8(r+1),s=t.getUint8(r+2),a=new Uint8Array(3*u.count);for(let e=0;e<u.count;e++)a[3*e]=o,a[3*e+1]=i,a[3*e+2]=s;return a}throw new n.Z("lepcc-decode-error","Bad method "+u.lookupMethod+","+u.compressionMethod)}const g={sizeLo:0,sizeHi:4,count:8,scaleFactor:12,bitsPerPoint:14,reserved:15,byteCount:16};function b(e,t){return{sizeLo:e.getUint32(t+g.sizeLo,o),sizeHi:e.getUint32(t+g.sizeHi,o),count:e.getUint32(t+g.count,o),scaleFactor:e.getUint16(t+g.scaleFactor,o),bitsPerPoint:e.getUint8(t+g.bitsPerPoint),reserved:e.getUint8(t+g.reserved)}}function m(e){const t=new DataView(e,0);let r=0;const{identifier:o,version:a}=s(e,t,r);if(r+=i.byteCount,"Intensity "!==o)throw new n.Z("lepcc-decode-error","Bad identifier");if(a>1)throw new n.Z("lepcc-decode-error","Unknown version");const u=b(t,r);if(r+=g.byteCount,u.sizeHi*2**32+u.sizeLo!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad size");const l=new Uint16Array(u.count);if(8===u.bitsPerPoint){if(u.count+r!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad size");const t=new Uint8Array(e,r,u.count);for(let e=0;e<u.count;e++)l[e]=t[e]*u.scaleFactor}else if(16===u.bitsPerPoint){if(2*u.count+r!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad size");const t=new Uint16Array(e,r,u.count);for(let e=0;e<u.count;e++)l[e]=t[e]*u.scaleFactor}else{const t=[];if(f(e,r,t)!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad size");for(let e=0;e<u.count;e++)l[e]=t[e]*u.scaleFactor}return l}},35065:(e,t,r)=>{var n;r.d(t,{T:()=>n}),function(e){e.POSITION="position",e.NORMAL="normal",e.NORMALCOMPRESSED="normalCompressed",e.UV0="uv0",e.AUXPOS1="auxpos1",e.AUXPOS2="auxpos2",e.COLOR="color",e.SYMBOLCOLOR="symbolColor",e.SIZE="size",e.TANGENT="tangent",e.OFFSET="offset",e.SUBDIVISIONFACTOR="subdivisionFactor",e.COLORFEATUREATTRIBUTE="colorFeatureAttribute",e.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",e.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",e.DISTANCETOSTART="distanceToStart",e.UVMAPSPACE="uvMapSpace",e.BOUNDINGRECT="boundingRect",e.UVREGION="uvRegion",e.PROFILERIGHT="profileRight",e.PROFILEUP="profileUp",e.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",e.FEATUREVALUE="featureValue",e.MODELORIGINHI="modelOriginHi",e.MODELORIGINLO="modelOriginLo",e.MODEL="model",e.MODELNORMAL="modelNormal",e.INSTANCECOLOR="instanceColor",e.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",e.LOCALTRANSFORM="localTransform",e.GLOBALTRANSFORM="globalTransform",e.BOUNDINGSPHERE="boundingSphere",e.MODELORIGIN="modelOrigin",e.MODELSCALEFACTORS="modelScaleFactors",e.FEATUREATTRIBUTE="featureAttribute",e.STATE="state",e.LODLEVEL="lodLevel",e.POSITION0="position0",e.POSITION1="position1",e.NORMALA="normalA",e.NORMALB="normalB",e.COMPONENTINDEX="componentIndex",e.VARIANTOFFSET="variantOffset",e.VARIANTSTROKE="variantStroke",e.VARIANTEXTENSION="variantExtension",e.U8PADDING="u8padding",e.U16PADDING="u16padding",e.SIDENESS="sideness",e.START="start",e.END="end",e.UP="up",e.EXTRUDE="extrude",e.OBJECTANDLAYERIDCOLOR="objectAndLayerIdColor",e.OBJECTANDLAYERIDCOLOR_INSTANCED="objectAndLayerIdColor_instanced"}(n||(n={}))}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7035,3172,9880],{22303:(e,t,r)=>{r.d(t,{Z:()=>f});var n,o,i=r(35270),s=r(22021),a=r(75215);function u(e){return(0,s.uZ)((0,a.vU)(e),0,255)}function l(e,t,r){return e=Number(e),isNaN(e)?r:e<t?t:e>r?r:e}class c{static blendColors(e,t,r,n=new c){return n.r=Math.round(e.r+(t.r-e.r)*r),n.g=Math.round(e.g+(t.g-e.g)*r),n.b=Math.round(e.b+(t.b-e.b)*r),n.a=e.a+(t.a-e.a)*r,n._sanitize()}static fromRgb(e,t){const r=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(r){const e=r[2].split(/\s*,\s*/),n=r[1];if("rgb"===n&&3===e.length||"rgba"===n&&4===e.length){const r=e[0];if("%"===r.charAt(r.length-1)){const r=e.map((e=>2.56*parseFloat(e)));return 4===e.length&&(r[3]=parseFloat(e[3])),c.fromArray(r,t)}return c.fromArray(e.map((e=>parseFloat(e))),t)}if("hsl"===n&&3===e.length||"hsla"===n&&4===e.length)return c.fromArray((0,i.B7)(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3])),t)}return null}static fromHex(e,t=new c){if(4!==e.length&&7!==e.length||"#"!==e[0])return null;const r=4===e.length?4:8,n=(1<<r)-1;let o=Number("0x"+e.substr(1));return isNaN(o)?null:(["b","g","r"].forEach((e=>{const i=o&n;o>>=r,t[e]=4===r?17*i:i})),t.a=1,t)}static fromArray(e,t=new c){return t._set(Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3])),isNaN(t.a)&&(t.a=1),t._sanitize()}static fromString(e,t){const r=(0,i.St)(e)?(0,i.h$)(e):null;return r&&c.fromArray(r,t)||c.fromRgb(e,t)||c.fromHex(e,t)}static fromJSON(e){return e&&new c([e[0],e[1],e[2],e[3]/255])}static toUnitRGB(e){return null!=e?[e.r/255,e.g/255,e.b/255]:null}static toUnitRGBA(e){return null!=e?[e.r/255,e.g/255,e.b/255,null!=e.a?e.a:1]:null}constructor(e){this.r=255,this.g=255,this.b=255,this.a=1,e&&this.setColor(e)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(e){return"string"==typeof e?c.fromString(e,this):Array.isArray(e)?c.fromArray(e,this):(this._set(e.r??0,e.g??0,e.b??0,e.a??1),e instanceof c||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(){const e=this.r.toString(16),t=this.g.toString(16),r=this.b.toString(16);return`#${e.length<2?"0"+e:e}${t.length<2?"0"+t:t}${r.length<2?"0"+r:r}`}toCss(e=!1){const t=this.r+", "+this.g+", "+this.b;return e?`rgba(${t}, ${this.a})`:`rgb(${t})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(e=c.AlphaMode.ALWAYS){const t=u(this.r),r=u(this.g),n=u(this.b);return e===c.AlphaMode.ALWAYS||1!==this.a?[t,r,n,u(255*this.a)]:[t,r,n]}clone(){return new c(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(e){return null!=e&&e.r===this.r&&e.g===this.g&&e.b===this.b&&e.a===this.a}_sanitize(){return this.r=Math.round(l(this.r,0,255)),this.g=Math.round(l(this.g,0,255)),this.b=Math.round(l(this.b,0,255)),this.a=l(this.a,0,1),this}_set(e,t,r,n){this.r=e,this.g=t,this.b=r,this.a=n}}c.prototype.declaredClass="esri.Color",n=c||(c={}),(o=n.AlphaMode||(n.AlphaMode={}))[o.ALWAYS=0]="ALWAYS",o[o.UNLESS_OPAQUE=1]="UNLESS_OPAQUE";const f=c},99880:(e,t,r)=>{r.d(t,{V:()=>u});var n=r(68773),o=(r(3172),r(20102)),i=r(92604),s=r(17452);const a=i.Z.getLogger("esri.assets");function u(e){if(!n.Z.assetsPath)throw a.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new o.Z("assets:path-not-set","config.assetsPath is not set");return(0,s.v_)(n.Z.assetsPath,e)}},46521:(e,t,r)=>{function n(){return[1,0,0,0,1,0,0,0,1]}function o(e,t,r,n,o,i,s,a,u){return[e,t,r,n,o,i,s,a,u]}function i(e,t){return new Float64Array(e,t,9)}r.d(t,{a:()=>i,c:()=>n,f:()=>o}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},create:n,createView:i,fromValues:o},Symbol.toStringTag,{value:"Module"}))},51305:(e,t,r)=>{r.d(t,{c:()=>h,g:()=>c,j:()=>M,k:()=>g,m:()=>f,s:()=>l});var n=r(46521),o=r(94961),i=r(65617),s=r(46851),a=r(17896),u=r(98766);function l(e,t,r){r*=.5;const n=Math.sin(r);return e[0]=n*t[0],e[1]=n*t[1],e[2]=n*t[2],e[3]=Math.cos(r),e}function c(e,t){const r=2*Math.acos(t[3]),n=Math.sin(r/2);return n>(0,s.g)()?(e[0]=t[0]/n,e[1]=t[1]/n,e[2]=t[2]/n):(e[0]=1,e[1]=0,e[2]=0),r}function f(e,t,r){const n=t[0],o=t[1],i=t[2],s=t[3],a=r[0],u=r[1],l=r[2],c=r[3];return e[0]=n*c+s*a+o*l-i*u,e[1]=o*c+s*u+i*a-n*l,e[2]=i*c+s*l+n*u-o*a,e[3]=s*c-n*a-o*u-i*l,e}function d(e,t,r,n){const o=t[0],i=t[1],a=t[2],u=t[3];let l,c,f,d,h,p=r[0],g=r[1],b=r[2],m=r[3];return c=o*p+i*g+a*b+u*m,c<0&&(c=-c,p=-p,g=-g,b=-b,m=-m),1-c>(0,s.g)()?(l=Math.acos(c),f=Math.sin(l),d=Math.sin((1-n)*l)/f,h=Math.sin(n*l)/f):(d=1-n,h=n),e[0]=d*o+h*p,e[1]=d*i+h*g,e[2]=d*a+h*b,e[3]=d*u+h*m,e}function h(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function p(e,t){const r=t[0]+t[4]+t[8];let n;if(r>0)n=Math.sqrt(r+1),e[3]=.5*n,n=.5/n,e[0]=(t[5]-t[7])*n,e[1]=(t[6]-t[2])*n,e[2]=(t[1]-t[3])*n;else{let r=0;t[4]>t[0]&&(r=1),t[8]>t[3*r+r]&&(r=2);const o=(r+1)%3,i=(r+2)%3;n=Math.sqrt(t[3*r+r]-t[3*o+o]-t[3*i+i]+1),e[r]=.5*n,n=.5/n,e[3]=(t[3*o+i]-t[3*i+o])*n,e[o]=(t[3*o+r]+t[3*r+o])*n,e[i]=(t[3*i+r]+t[3*r+i])*n}return e}function g(e,t,r,n){const o=.5*Math.PI/180;t*=o,r*=o,n*=o;const i=Math.sin(t),s=Math.cos(t),a=Math.sin(r),u=Math.cos(r),l=Math.sin(n),c=Math.cos(n);return e[0]=i*u*c-s*a*l,e[1]=s*a*c+i*u*l,e[2]=s*u*l-i*a*c,e[3]=s*u*c+i*a*l,e}const b=u.c,m=u.s,y=u.a,w=f,O=u.b,A=u.d,T=u.l,C=u.e,v=C,E=u.f,S=E,I=u.n,M=u.g,U=u.h,L=(0,i.c)(),N=(0,i.f)(1,0,0),R=(0,i.f)(0,1,0),F=(0,o.a)(),P=(0,o.a)(),Z=(0,n.c)();Object.freeze(Object.defineProperty({__proto__:null,add:y,calculateW:function(e,t){const r=t[0],n=t[1],o=t[2];return e[0]=r,e[1]=n,e[2]=o,e[3]=Math.sqrt(Math.abs(1-r*r-n*n-o*o)),e},conjugate:h,copy:b,dot:A,equals:U,exactEquals:M,fromEuler:g,fromMat3:p,getAxisAngle:c,identity:function(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},invert:function(e,t){const r=t[0],n=t[1],o=t[2],i=t[3],s=r*r+n*n+o*o+i*i,a=s?1/s:0;return e[0]=-r*a,e[1]=-n*a,e[2]=-o*a,e[3]=i*a,e},len:v,length:C,lerp:T,mul:w,multiply:f,normalize:I,random:function(e){const t=s.R,r=t(),n=t(),o=t(),i=Math.sqrt(1-r),a=Math.sqrt(r);return e[0]=i*Math.sin(2*Math.PI*n),e[1]=i*Math.cos(2*Math.PI*n),e[2]=a*Math.sin(2*Math.PI*o),e[3]=a*Math.cos(2*Math.PI*o),e},rotateX:function(e,t,r){r*=.5;const n=t[0],o=t[1],i=t[2],s=t[3],a=Math.sin(r),u=Math.cos(r);return e[0]=n*u+s*a,e[1]=o*u+i*a,e[2]=i*u-o*a,e[3]=s*u-n*a,e},rotateY:function(e,t,r){r*=.5;const n=t[0],o=t[1],i=t[2],s=t[3],a=Math.sin(r),u=Math.cos(r);return e[0]=n*u-i*a,e[1]=o*u+s*a,e[2]=i*u+n*a,e[3]=s*u-o*a,e},rotateZ:function(e,t,r){r*=.5;const n=t[0],o=t[1],i=t[2],s=t[3],a=Math.sin(r),u=Math.cos(r);return e[0]=n*u+o*a,e[1]=o*u-n*a,e[2]=i*u+s*a,e[3]=s*u-i*a,e},rotationTo:function(e,t,r){const n=(0,a.e)(t,r);return n<-.999999?((0,a.f)(L,N,t),(0,a.u)(L)<1e-6&&(0,a.f)(L,R,t),(0,a.n)(L,L),l(e,L,Math.PI),e):n>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):((0,a.f)(L,t,r),e[0]=L[0],e[1]=L[1],e[2]=L[2],e[3]=1+n,I(e,e))},scale:O,set:m,setAxes:function(e,t,r,n){const o=Z;return o[0]=r[0],o[3]=r[1],o[6]=r[2],o[1]=n[0],o[4]=n[1],o[7]=n[2],o[2]=-t[0],o[5]=-t[1],o[8]=-t[2],I(e,p(e,o))},setAxisAngle:l,slerp:d,sqlerp:function(e,t,r,n,o,i){return d(F,t,o,i),d(P,r,n,i),d(e,F,P,2*i*(1-i)),e},sqrLen:S,squaredLength:E,str:function(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}},Symbol.toStringTag,{value:"Module"}))},37140:(e,t,r)=>{function n(){const e=new Float32Array(4);return e[3]=1,e}function o(e){const t=new Float32Array(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}r.d(t,{b:()=>o,c:()=>n}),Object.freeze(Object.defineProperty({__proto__:null,clone:o,create:n,createView:function(e,t){return new Float32Array(e,t,4)},fromValues:function(e,t,r,n){const o=new Float32Array(4);return o[0]=e,o[1]=t,o[2]=r,o[3]=n,o}},Symbol.toStringTag,{value:"Module"}))},94961:(e,t,r)=>{function n(){return[0,0,0,1]}function o(e){return[e[0],e[1],e[2],e[3]]}function i(e,t){return new Float64Array(e,t,4)}r.d(t,{I:()=>s,a:()=>n,b:()=>o,c:()=>i});const s=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:o,create:n,createView:i,fromValues:function(e,t,r,n){return[e,t,r,n]}},Symbol.toStringTag,{value:"Module"}))},72119:(e,t,r)=>{function n(){return new Float32Array(3)}function o(e){const t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function i(e,t,r){const n=new Float32Array(3);return n[0]=e,n[1]=t,n[2]=r,n}function s(){return n()}function a(){return i(1,1,1)}function u(){return i(1,0,0)}function l(){return i(0,1,0)}function c(){return i(0,0,1)}r.d(t,{b:()=>o,c:()=>n,f:()=>i});const f=s(),d=a(),h=u(),p=l(),g=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:d,UNIT_X:h,UNIT_Y:p,UNIT_Z:g,ZEROS:f,clone:o,create:n,createView:function(e,t){return new Float32Array(e,t,3)},fromValues:i,ones:a,unitX:u,unitY:l,unitZ:c,zeros:s},Symbol.toStringTag,{value:"Module"}))},36030:(e,t,r)=>{r.d(t,{J:()=>i});var n=r(35454),o=r(5600);function i(e,t={}){const r=e instanceof n.X?e:new n.X(e,t),i={type:t?.ignoreUnknown??1?r.apiValues:String,json:{type:r.jsonValues,read:!t?.readOnly&&{reader:r.read},write:{writer:r.write}}};return void 0!==t?.readOnly&&(i.readOnly=!!t.readOnly),void 0!==t?.default&&(i.json.default=t.default),void 0!==t?.name&&(i.json.name=t.name),void 0!==t?.nonNullable&&(i.nonNullable=t.nonNullable),(0,o.Cb)(i)}},10661:(e,t,r)=>{r.d(t,{s:()=>o});var n=r(42100);class o extends n.s{notify(){const e=this._observers;if(e&&e.length>0){const t=e.slice();for(const e of t)e.onInvalidated(),e.onCommitted()}}}},3172:(e,t,r)=>{r.r(t),r.d(t,{default:()=>h});var n=r(68773),o=r(40330),i=r(20102),s=r(80442),a=r(22974),u=r(95330),l=r(17452),c=r(19745),f=r(71058),d=r(85958);async function h(e,t){const a=(0,l.HK)(e),c=(0,l.jc)(e);c||a||(e=(0,l.Fv)(e));const m={url:e,requestOptions:{...t}};let y=(0,l.oh)(e);if(y){const e=await async function(e,t){if(null!=e.responseData)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let r,n;try{n=await e.before(t)}catch(e){r=C("request:interceptor",e,t)}if((n instanceof Error||n instanceof i.Z)&&(r=C("request:interceptor",n,t)),r)throw e.error&&e.error(r),r;return n}}(y,m);if(null!=e)return{data:e,getHeader:O,httpStatus:200,requestOptions:m.requestOptions,url:m.url};y.after||y.error||(y=null)}if(e=m.url,"image"===(t=m.requestOptions).responseType){if((0,s.Z)("host-webworker")||(0,s.Z)("host-node"))throw C("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),m)}else if(a)throw C("request:invalid-parameters",new Error("Data URLs are not supported for responseType = "+t.responseType),m);if("head"===t.method){if(t.body)throw C("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),m);if(a||c)throw C("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),m)}if(await async function(){(0,s.Z)("host-webworker")?p||(p=await r.e(9884).then(r.bind(r,29884))):h._abortableFetch||(h._abortableFetch=globalThis.fetch.bind(globalThis))}(),p)return p.execute(e,t);const w=new AbortController;(0,u.fu)(t,(()=>w.abort()));const A={controller:w,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:y,params:m,redoRequest:!1,useIdentity:g.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},T=await async function(e){let t,r;await async function(e){const t=e.params.url,r=e.params.requestOptions,i=e.controller.signal,s=r.body;let a=null,l=null;if(b&&"HTMLFormElement"in globalThis&&(s instanceof FormData?a=s:s instanceof HTMLFormElement&&(a=new FormData(s))),"string"==typeof s&&(l=s),e.fetchOptions={cache:r.cacheBust&&!h._abortableFetch.polyfill?"no-cache":"default",credentials:"same-origin",headers:r.headers||{},method:"head"===r.method?"HEAD":"GET",mode:"cors",priority:g.priority,redirect:"follow",signal:i},(a||l)&&(e.fetchOptions.body=a||l),"anonymous"===r.authMode&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(t)||r.query?.token||a?.get("token")),!e.hasToken&&n.Z.apiKey&&(0,f.r)(t)&&(r.query||(r.query={}),r.query.token=n.Z.apiKey,e.hasToken=!0),e.useIdentity&&!e.hasToken&&!e.credentialToken&&!E(t)&&!(0,u.Hc)(i)){let n;"immediate"===r.authMode?(await v(),n=await o.id.getCredential(t,{signal:i}),e.credential=n):"no-prompt"===r.authMode?(await v(),n=await o.id.getCredential(t,{prompt:!1,signal:i}).catch((()=>{})),e.credential=n):o.id&&(n=o.id.findCredential(t)),n&&(e.credentialToken=n.token,e.useSSL=!!n.ssl)}}(e);try{do{[t,r]=await S(e)}while(!await M(e,t,r))}catch(r){const n=C("request:server",r,e.params,t);throw n.details.ssl=e.useSSL,e.interceptor&&e.interceptor.error&&e.interceptor.error(n),n}const i=e.params.url;if(r&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(i)){if(!e.hasToken&&!e.credentialToken&&r.user?.username&&!(0,l.kl)(i)){const e=(0,l.P$)(i,!0);e&&g.trustedServers.push(e)}Array.isArray(r.authorizedCrossOriginNoCorsDomains)&&(0,d.Hu)(r.authorizedCrossOriginNoCorsDomains)}const s=e.credential;if(s&&o.id){const e=o.id.findServerInfo(s.server);let t=e&&e.owningSystemUrl;if(t){t=t.replace(/\/?$/,"/sharing");const e=o.id.findCredential(t,s.userId);e&&-1===o.id._getIdenticalSvcIdx(t,e)&&e.resources.unshift(t)}}return{data:r,getHeader:t?e=>t?.headers.get(e):O,httpStatus:t?.status??200,requestOptions:e.params.requestOptions,ssl:e.useSSL,url:e.params.url}}(A);return y?.after?.(T),T}let p;const g=n.Z.request,b="FormData"in globalThis,m=[499,498,403,401],y=["COM_0056","COM_0057","SB_0008"],w=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],O=()=>null,A=Symbol();function T(e){const t=(0,l.P$)(e);return!t||t.endsWith(".arcgis.com")||h._corsServers.includes(t)||(0,l.kl)(t)}function C(e,t,r,n){let o="Error";const s={url:r.url,requestOptions:r.requestOptions,getHeader:O,ssl:!1};if(t instanceof i.Z)return t.details?(t.details=(0,a.d9)(t.details),t.details.url=r.url,t.details.requestOptions=r.requestOptions):t.details=s,t;if(t){const e=n&&(e=>n.headers.get(e)),r=n&&n.status,i=t.message;i&&(o=i),e&&(s.getHeader=e),s.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||r||0,s.subCode=t.subcode,s.messageCode=t.messageCode,"string"==typeof t.details?s.messages=[t.details]:s.messages=t.details,s.raw=A in t?t[A]:t}return(0,u.D_)(t)?(0,u.zE)():new i.Z(e,o,s)}async function v(){o.id||await Promise.all([r.e(6261),r.e(1400),r.e(450)]).then(r.bind(r,73660))}function E(e){return w.some((t=>t.test(e)))}async function S(e){let t=e.params.url;const r=e.params.requestOptions,n=e.fetchOptions??{},i=(0,l.jc)(t)||(0,l.HK)(t),a=r.responseType||"json",f=i?0:null!=r.timeout?r.timeout:g.timeout;let p=!1;if(!i){e.useSSL&&(t=(0,l.hO)(t)),r.cacheBust&&"default"===n.cache&&(t=(0,l.ZN)(t,"request.preventCache",Date.now()));let i={...r.query};e.credentialToken&&(i.token=e.credentialToken);let a=(0,l.B7)(i);(0,s.Z)("esri-url-encodes-apostrophe")&&(a=a.replace(/'/g,"%27"));const u=t.length+1+a.length;let f;p="delete"===r.method||"post"===r.method||"put"===r.method||!!r.body||u>g.maxUrlLength;const h=r.useProxy||!!(0,l.ed)(t);if(h){const e=(0,l.b7)(t);f=e.path,!p&&f.length+1+u>g.maxUrlLength&&(p=!0),e.query&&(i={...e.query,...i})}if("HEAD"===n.method&&(p||h)){if(p){if(u>g.maxUrlLength)throw C("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params);throw C("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params)}if(h)throw C("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}if(p?(n.method="delete"===r.method?"DELETE":"put"===r.method?"PUT":"POST",r.body?t=(0,l.fl)(t,i):(n.body=(0,l.B7)(i),n.headers||(n.headers={}),n.headers["Content-Type"]="application/x-www-form-urlencoded")):t=(0,l.fl)(t,i),h&&(e.useProxy=!0,t=`${f}?${t}`),i.token&&b&&n.body instanceof FormData&&!(0,c.P)(t)&&n.body.set("token",i.token),r.hasOwnProperty("withCredentials"))e.withCredentials=r.withCredentials;else if(!(0,l.D6)(t,(0,l.TI)()))if((0,l.kl)(t))e.withCredentials=!0;else if(o.id){const r=o.id.findServerInfo(t);r&&r.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(n.credentials="include",(0,d.jH)(t)&&await(0,d.jz)(p?(0,l.fl)(t,i):t))}let m,y,w=0,O=!1;f>0&&(w=setTimeout((()=>{O=!0,e.controller.abort()}),f));try{if("native-request-init"===r.responseType)y=n,y.url=t;else if("image"!==r.responseType||"default"!==n.cache||"GET"!==n.method||p||function(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}(r.headers)||!i&&!e.useProxy&&g.proxyUrl&&!T(t)){if(m=await h._abortableFetch(t,n),e.useProxy||function(e){const t=(0,l.P$)(e);t&&!h._corsServers.includes(t)&&h._corsServers.push(t)}(t),"native"===r.responseType)y=m;else if("HEAD"!==n.method)if(m.ok){switch(a){case"array-buffer":y=await m.arrayBuffer();break;case"blob":case"image":y=await m.blob();break;default:y=await m.text()}if(w&&(clearTimeout(w),w=0),"json"===a||"xml"===a||"document"===a)if(y)switch(a){case"json":y=JSON.parse(y);break;case"xml":y=I(y,"application/xml");break;case"document":y=I(y,"text/html")}else y=null;if(y){if("array-buffer"===a||"blob"===a){const e=m.headers.get("Content-Type");if(e&&/application\/json|text\/plain/i.test(e)&&y["blob"===a?"size":"byteLength"]<=750)try{const e=await new Response(y).json();e.error&&(y=e)}catch{}}"image"===a&&y instanceof Blob&&(y=await U(URL.createObjectURL(y),e,!0))}}else y=await m.text()}else y=await U(t,e)}catch(n){if("AbortError"===n.name){if(O)throw new Error("Timeout exceeded");throw(0,u.zE)("Request canceled")}if(!(!m&&n instanceof TypeError&&g.proxyUrl)||r.body||"delete"===r.method||"head"===r.method||"post"===r.method||"put"===r.method||e.useProxy||T(t))throw n;e.redoRequest=!0,(0,l.tD)({proxyUrl:g.proxyUrl,urlPrefix:(0,l.P$)(t)??""})}finally{w&&clearTimeout(w)}return[m,y]}function I(e,t){let r;try{r=(new DOMParser).parseFromString(e,t)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}async function M(e,t,r){if(e.redoRequest)return e.redoRequest=!1,!1;const n=e.params.requestOptions;if(!t||"native"===n.responseType||"native-request-init"===n.responseType)return!0;let i,s;if(!t.ok)throw i=new Error(`Unable to load ${t.url} status: ${t.status}`),i[A]=r,i;r&&(r.error?i=r.error:"error"===r.status&&Array.isArray(r.messages)&&(i={...r},i[A]=r,i.details=r.messages));let a,u=null;i&&(s=Number(i.code),u=i.hasOwnProperty("subcode")?Number(i.subcode):null,a=i.messageCode,a=a&&a.toUpperCase());const l=n.authMode;if(403===s&&(4===u||i.message&&i.message.toLowerCase().includes("ssl")&&!i.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==l||498===s)&&void 0!==s&&m.includes(s)&&!E(e.params.url)&&(403!==s||a&&!y.includes(a)&&(null==u||2===u&&e.credentialToken))){await v();try{const t=await o.id.getCredential(e.params.url,{error:C("request:server",i,e.params),prompt:"no-prompt"!==l,signal:e.controller.signal,token:e.credentialToken});return e.credential=t,e.credentialToken=t.token,e.useSSL=e.useSSL||t.ssl,!1}catch(t){if("no-prompt"===l)return e.credential=void 0,e.credentialToken=void 0,!1;i=t}}if(i)throw i;return!0}function U(e,t,r=!1){const n=t.controller.signal,o=new Image;return t.withCredentials?o.crossOrigin="use-credentials":o.crossOrigin="anonymous",o.alt="",o.fetchPriority=g.priority,o.src=e,(0,d.fY)(o,e,r,n)}h._abortableFetch=null,h._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"]},71058:(e,t,r)=>{r.d(t,{r:()=>i});var n=r(17452);const o=["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"];function i(e){const t=(0,n.P$)(e,!0);return!!t&&t.endsWith(".arcgis.com")&&!o.includes(t)&&!e.endsWith("/sharing/rest/generateToken")}},85958:(e,t,r)=>{r.d(t,{Hu:()=>l,fY:()=>a,jH:()=>c,jz:()=>f});var n=r(68773),o=r(80442),i=r(95330),s=r(17452);function a(e,t,r=!1,n){return new Promise(((s,a)=>{if((0,i.Hc)(n))return void a(u());let l=()=>{d(),a(new Error(`Unable to load ${t}`))},c=()=>{const t=e;d(),s(t)},f=()=>{if(!e)return;const t=e;d(),t.src="",a(u())};const d=()=>{(0,o.Z)("esri-image-decode")||(e.removeEventListener("error",l),e.removeEventListener("load",c)),l=null,c=null,e=null,null!=n&&n.removeEventListener("abort",f),f=null,r&&URL.revokeObjectURL(t)};null!=n&&n.addEventListener("abort",f),(0,o.Z)("esri-image-decode")?e.decode().then(c,l):(e.addEventListener("error",l),e.addEventListener("load",c))}))}function u(){try{return new DOMException("Aborted","AbortError")}catch{const e=new Error;return e.name="AbortError",e}}function l(e){n.Z.request.crossOriginNoCorsDomains||(n.Z.request.crossOriginNoCorsDomains={});const t=n.Z.request.crossOriginNoCorsDomains;for(let r of e)r=r.toLowerCase(),/^https?:\/\//.test(r)?t[(0,s.P$)(r)??""]=0:(t[(0,s.P$)("http://"+r)??""]=0,t[(0,s.P$)("https://"+r)??""]=0)}function c(e){const t=n.Z.request.crossOriginNoCorsDomains;if(t){let r=(0,s.P$)(e);if(r)return r=r.toLowerCase(),!(0,s.D6)(r,(0,s.TI)())&&t[r]<Date.now()-36e5}return!1}async function f(e){const t=n.Z.request.crossOriginNoCorsDomains,r=(0,s.P$)(e);t&&r&&(t[r.toLowerCase()]=Date.now());const o=(0,s.mN)(e);e=o.path,"json"===o.query?.f&&(e+="?f=json");try{await fetch(e,{mode:"no-cors",credentials:"include"})}catch{}}},90447:(e,t,r)=>{r.r(t),r.d(t,{default:()=>T});var n=r(70586),o=r(1533),i=r(51305),s=r(37140),a=r(17896),u=r(72119),l=r(44547),c=r(82971),f=(r(80442),r(23030)),d=r(14008),h=r(46329),p=r(91891),g=r(25683);function b(e,t,r){return null!=e&&e.attributeInfo.useElevation?t?function(e,t){const r=new Float64Array(t);for(let n=0;n<t;n++)r[n]=e[3*n+2];return r}(t,r):null:null!=e&&e.attributeInfo.storageInfo?(0,p.qM)(e.attributeInfo.storageInfo,e.buffer,r):null}function m(e,t,r,n,o){const i=e.length/3;let s=0;for(let a=0;a<i;a++){let i=!0;for(let e=0;e<n.length&&i;e++){const{filterJSON:t}=n[e],r=o[e].values[a];switch(t.type){case"pointCloudValueFilter":{const e="exclude"===t.mode;t.values.includes(r)===e&&(i=!1);break}case"pointCloudBitfieldFilter":{const e=w(t.requiredSetBits),n=w(t.requiredClearBits);(r&e)===e&&0==(r&n)||(i=!1);break}case"pointCloudReturnFilter":{const e=15&r,n=r>>>4&15,o=n>1,s=1===e,a=e===n;let u=!1;for(const e of t.includedReturns)if("last"===e&&a||"firstOfMany"===e&&s&&o||"lastOfMany"===e&&a&&o||"single"===e&&!o){u=!0;break}u||(i=!1);break}}}i&&(r[s]=a,e[3*s]=e[3*a],e[3*s+1]=e[3*a+1],e[3*s+2]=e[3*a+2],t[3*s]=t[3*a],t[3*s+1]=t[3*a+1],t[3*s+2]=t[3*a+2],s++)}return s}function y(e){switch(e){default:case null:case"none":return e=>e;case"low-four-bit":return e=>15&e;case"high-four-bit":return e=>(240&e)>>4;case"absolute-value":return e=>Math.abs(e);case"modulo-ten":return e=>e%10}}function w(e){let t=0;for(const r of e||[])t|=1<<r;return t}class O{transform(e){const t=this._transform(e),r=[t.points.buffer,t.rgb.buffer];null!=t.pointIdFilterMap&&r.push(t.pointIdFilterMap.buffer);for(const e of t.attributes)"buffer"in e.values&&(0,o.eP)(e.values.buffer)&&e.values.buffer!==t.rgb.buffer&&r.push(e.values.buffer);return Promise.resolve({result:t,transferList:r})}_transform(e){const t=function(e,t){if(null==e.encoding||""===e.encoding){const r=(0,p.W7)(t,e);if(null==r.vertexAttributes.position)return;const n=(0,p.I_)(t,r.vertexAttributes.position),o=r.header.fields,i=[o.offsetX,o.offsetY,o.offsetZ],s=[o.scaleX,o.scaleY,o.scaleZ],a=n.length/3,u=new Float64Array(3*a);for(let e=0;e<a;e++)u[3*e]=n[3*e]*s[0]+i[0],u[3*e+1]=n[3*e+1]*s[1]+i[1],u[3*e+2]=n[3*e+2]*s[2]+i[2];return u}if("lepcc-xyz"===e.encoding)return(0,g.Gi)(t).result}(e.schema,e.geometryBuffer);let r=t.length/3,o=null;const i=new Array,s=b(e.primaryAttributeData,t,r);null!=e.primaryAttributeData&&s&&i.push({attributeInfo:e.primaryAttributeData.attributeInfo,values:s});const a=b(e.modulationAttributeData,t,r);null!=e.modulationAttributeData&&a&&i.push({attributeInfo:e.modulationAttributeData.attributeInfo,values:a});let u=function(e,t,r,n){const{rendererJSON:o,isRGBRenderer:i}=e;let s=null,a=null;if(t&&i)s=t;else if(t&&"pointCloudUniqueValueRenderer"===o?.type){a=h.Z.fromJSON(o);const e=a.colorUniqueValueInfos;s=new Uint8Array(3*n);const r=y(a.fieldTransformType);for(let o=0;o<n;o++){const n=(r?r(t[o]):t[o])+"";for(let t=0;t<e.length;t++)if(e[t].values.includes(n)){s[3*o]=e[t].color.r,s[3*o+1]=e[t].color.g,s[3*o+2]=e[t].color.b;break}}}else if(t&&"pointCloudStretchRenderer"===o?.type){a=d.Z.fromJSON(o);const e=a.stops;s=new Uint8Array(3*n);const r=y(a.fieldTransformType);for(let o=0;o<n;o++){const n=r?r(t[o]):t[o],i=e.length-1;if(n<e[0].value)s[3*o]=e[0].color.r,s[3*o+1]=e[0].color.g,s[3*o+2]=e[0].color.b;else if(n>=e[i].value)s[3*o]=e[i].color.r,s[3*o+1]=e[i].color.g,s[3*o+2]=e[i].color.b;else for(let t=1;t<e.length;t++)if(n<e[t].value){const r=(n-e[t-1].value)/(e[t].value-e[t-1].value);s[3*o]=e[t].color.r*r+e[t-1].color.r*(1-r),s[3*o+1]=e[t].color.g*r+e[t-1].color.g*(1-r),s[3*o+2]=e[t].color.b*r+e[t-1].color.b*(1-r);break}}}else if(t&&"pointCloudClassBreaksRenderer"===o?.type){a=f.Z.fromJSON(o);const e=a.colorClassBreakInfos;s=new Uint8Array(3*n);const r=y(a.fieldTransformType);for(let o=0;o<n;o++){const n=r?r(t[o]):t[o];for(let t=0;t<e.length;t++)if(n>=e[t].minValue&&n<=e[t].maxValue){s[3*o]=e[t].color.r,s[3*o+1]=e[t].color.g,s[3*o+2]=e[t].color.b;break}}}else s=new Uint8Array(3*n).fill(255);if(r&&a&&a.colorModulation){const e=a.colorModulation.minValue,t=a.colorModulation.maxValue,o=.3;for(let i=0;i<n;i++){const n=r[i],a=n>=t?1:n<=e?o:o+(1-o)*(n-e)/(t-e);s[3*i]=a*s[3*i],s[3*i+1]=a*s[3*i+1],s[3*i+2]=a*s[3*i+2]}}return s}(e.rendererInfo,s,a,r);if(e.filterInfo&&e.filterInfo.length>0&&null!=e.filterAttributesData){const s=e.filterAttributesData.filter(n.pC).map((e=>{const n=b(e,t,r),o={attributeInfo:e.attributeInfo,values:n};return i.push(o),o}));o=new Uint32Array(r),r=m(t,u,o,e.filterInfo,s)}for(const n of e.userAttributesData){const e=b(n,t,r);i.push({attributeInfo:n.attributeInfo,values:e})}3*r<u.length&&(u=new Uint8Array(u.buffer.slice(0,3*r))),this._applyElevationOffsetInPlace(t,r,e.elevationOffset);const l=this._transformCoordinates(t,r,e.obb,c.Z.fromJSON(e.inSR),c.Z.fromJSON(e.outSR));return{obb:e.obb,points:l,rgb:u,attributes:i,pointIdFilterMap:o}}_transformCoordinates(e,t,r,n,o){if(!(0,l.CM)(e,n,0,e,o,0,t))throw new Error("Can't reproject");const s=(0,u.f)(r.center[0],r.center[1],r.center[2]),c=(0,u.c)(),f=(0,u.c)();(0,i.c)(A,r.quaternion);const d=new Float32Array(3*t);for(let n=0;n<t;n++)c[0]=e[3*n]-s[0],c[1]=e[3*n+1]-s[1],c[2]=e[3*n+2]-s[2],(0,a.q)(f,c,A),r.halfSize[0]=Math.max(r.halfSize[0],Math.abs(f[0])),r.halfSize[1]=Math.max(r.halfSize[1],Math.abs(f[1])),r.halfSize[2]=Math.max(r.halfSize[2],Math.abs(f[2])),d[3*n]=c[0],d[3*n+1]=c[1],d[3*n+2]=c[2];return d}_applyElevationOffsetInPlace(e,t,r){if(0!==r)for(let n=0;n<t;n++)e[3*n+2]+=r}}const A=(0,s.c)();function T(){return new O}},91891:(e,t,r)=>{r.d(t,{I_:()=>d,W7:()=>g,qM:()=>m});var n=r(20102),o=r(22974),i=r(92604),s=r(25683),a=r(35065);const u=i.Z.getLogger("esri.views.3d.layers.i3s.I3SBinaryReader");function l(e,t,r){let o="",i=0;for(;i<r;){const s=e[t+i];if(s<128)o+=String.fromCharCode(s),i++;else if(s>=192&&s<224){if(i+1>=r)throw new n.Z("utf8-decode-error","UTF-8 Decode failed. Two byte character was truncated.");const a=(31&s)<<6|63&e[t+i+1];o+=String.fromCharCode(a),i+=2}else if(s>=224&&s<240){if(i+2>=r)throw new n.Z("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const a=(15&s)<<12|(63&e[t+i+1])<<6|63&e[t+i+2];o+=String.fromCharCode(a),i+=3}else{if(!(s>=240&&s<248))throw new n.Z("utf8-decode-error","UTF-8 Decode failed. Invalid multi byte sequence.");{if(i+3>=r)throw new n.Z("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const a=(7&s)<<18|(63&e[t+i+1])<<12|(63&e[t+i+2])<<6|63&e[t+i+3];if(a>=65536){const e=55296+(a-65536>>10),t=56320+(1023&a);o+=String.fromCharCode(e,t)}else o+=String.fromCharCode(a);i+=4}}}return o}function c(e,t){const r={byteOffset:0,byteCount:0,fields:Object.create(null)};let n=0;for(let o=0;o<t.length;o++){const i=t[o],s=i.valueType||i.type,a=w[s];r.fields[i.property]=a(e,n),n+=y[s].BYTES_PER_ELEMENT}return r.byteCount=n,r}function f(e,t,r){const o=[];let i,s,a=0;for(s=0;s<e;s+=1){if(i=t[s],i>0){if(o.push(l(r,a,i-1)),0!==r[a+i-1])throw new n.Z("string-array-error","Invalid string array: missing null termination.")}else o.push(null);a+=i}return o}function d(e,t){return new(0,y[t.valueType])(e,t.byteOffset,t.count*t.valuesPerElement)}function h(e,t,r){const i=null!=t.header?c(e,t.header):{byteOffset:0,byteCount:0,fields:{count:r}},s={header:i,byteOffset:i.byteCount,byteCount:0,entries:Object.create(null)};let a=i.byteCount;for(let e=0;e<t.ordering.length;e++){const r=t.ordering[e],u=(0,o.d9)(t[r]);if(u.count=i.fields.count??0,"String"===u.valueType){if(u.byteOffset=a,u.byteCount=i.fields[r+"ByteCount"],"UTF-8"!==u.encoding)throw new n.Z("unsupported-encoding","Unsupported String encoding.",{encoding:u.encoding});if(u.timeEncoding&&"ECMA_ISO8601"!==u.timeEncoding)throw new n.Z("unsupported-time-encoding","Unsupported time encoding.",{timeEncoding:u.timeEncoding})}else{if(!O(u.valueType))throw new n.Z("unsupported-value-type","Unsupported binary valueType",{valueType:u.valueType});{const e=A(u.valueType);a+=a%e!=0?e-a%e:0,u.byteOffset=a,u.byteCount=e*u.valuesPerElement*u.count}}a+=u.byteCount??0,s.entries[r]=u}return s.byteCount=a-s.byteOffset,s}function p(e,t,r){if(t!==e&&u.error(`Invalid ${r} buffer size\n expected: ${e}, actual: ${t})`),t<e)throw new n.Z("buffer-too-small","Binary buffer is too small",{expectedSize:e,actualSize:t})}function g(e,t){const r=c(e,t&&t.header);let n=r.byteCount;const o={isDraco:!1,header:r,byteOffset:r.byteCount,byteCount:0,vertexAttributes:{}},i=r.fields,s=null!=i.vertexCount?i.vertexCount:i.count;for(const e of t.ordering){if(!t.vertexAttributes[e])continue;const r={...t.vertexAttributes[e],byteOffset:n,count:s},i=b[e]||"_"+e;o.vertexAttributes[i]=r,n+=A(r.valueType)*r.valuesPerElement*s}const a=i.faceCount;if(t.faces&&a){o.faces={};for(const e of t.ordering){if(!t.faces[e])continue;const r={...t.faces[e],byteOffset:n,count:a};o.faces[e]=r,n+=A(r.valueType)*r.valuesPerElement*a}}const u=i.featureCount;if(t.featureAttributes&&t.featureAttributeOrder&&u){o.featureAttributes={};for(const e of t.featureAttributeOrder){if(!t.featureAttributes[e])continue;const r={...t.featureAttributes[e],byteOffset:n,count:u};o.featureAttributes[e]=r,n+=("UInt64"===r.valueType?8:A(r.valueType))*r.valuesPerElement*u}}return p(n,e.byteLength,"geometry"),o.byteCount=n-o.byteOffset,o}const b={position:a.T.POSITION,normal:a.T.NORMAL,color:a.T.COLOR,uv0:a.T.UV0,region:a.T.UVREGION};function m(e,t,r){if("lepcc-rgb"===e.encoding)return(0,s.IT)(t);if("lepcc-intensity"===e.encoding)return(0,s.ti)(t);if(null!=e.encoding&&""!==e.encoding)throw new n.Z("unknown-attribute-storage-info-encoding","Unknown Attribute Storage Info Encoding");e["attributeByteCounts "]&&!e.attributeByteCounts&&(u.warn("Warning: Trailing space in 'attributeByteCounts '."),e.attributeByteCounts=e["attributeByteCounts "]),"ObjectIds"===e.ordering[0]&&e.hasOwnProperty("objectIds")&&(u.warn("Warning: Case error in objectIds"),e.ordering[0]="objectIds");const o=h(t,e,r);p(o.byteOffset+o.byteCount,t.byteLength,"attribute");const i=o.entries.attributeValues||o.entries.objectIds;if(i){if("String"===i.valueType){const e=o.entries.attributeByteCounts,r=d(t,e),n=function(e,t){return new Uint8Array(e,t.byteOffset,t.byteCount)}(t,i);return i.timeEncoding?function(e,t,r){return f(e,t,r).map((e=>{const t=e?Date.parse(e):null;return t&&!Number.isNaN(t)?t:null}))}(e.count,r,n):f(e.count,r,n)}return d(t,i)}throw new n.Z("bad-attribute-storage-info","Bad attributeStorageInfo specification.")}const y={Float32:Float32Array,Float64:Float64Array,UInt8:Uint8Array,Int8:Int8Array,UInt16:Uint16Array,Int16:Int16Array,UInt32:Uint32Array,Int32:Int32Array},w={Float32:(e,t)=>new DataView(e,0).getFloat32(t,!0),Float64:(e,t)=>new DataView(e,0).getFloat64(t,!0),UInt8:(e,t)=>new DataView(e,0).getUint8(t),Int8:(e,t)=>new DataView(e,0).getInt8(t),UInt16:(e,t)=>new DataView(e,0).getUint16(t,!0),Int16:(e,t)=>new DataView(e,0).getInt16(t,!0),UInt32:(e,t)=>new DataView(e,0).getUint32(t,!0),Int32:(e,t)=>new DataView(e,0).getInt32(t,!0)};function O(e){return y.hasOwnProperty(e)}function A(e){return O(e)?y[e].BYTES_PER_ELEMENT:0}},25683:(e,t,r)=>{r.d(t,{Gi:()=>l,IT:()=>p,ti:()=>m});var n=r(20102);const o=!0,i={identifierOffset:0,identifierLength:10,versionOffset:10,checksumOffset:12,byteCount:16};function s(e,t,r){return{identifier:String.fromCharCode.apply(null,new Uint8Array(e,r+i.identifierOffset,i.identifierLength)),version:t.getUint16(r+i.versionOffset,o),checksum:t.getUint32(r+i.checksumOffset,o)}}const a={sizeLo:0,sizeHi:4,minX:8,minY:16,minZ:24,maxX:32,maxY:40,maxZ:48,errorX:56,errorY:64,errorZ:72,count:80,reserved:84,byteCount:88};function u(e,t){return{sizeLo:e.getUint32(t+a.sizeLo,o),sizeHi:e.getUint32(t+a.sizeHi,o),minX:e.getFloat64(t+a.minX,o),minY:e.getFloat64(t+a.minY,o),minZ:e.getFloat64(t+a.minZ,o),maxX:e.getFloat64(t+a.maxX,o),maxY:e.getFloat64(t+a.maxY,o),maxZ:e.getFloat64(t+a.maxZ,o),errorX:e.getFloat64(t+a.errorX,o),errorY:e.getFloat64(t+a.errorY,o),errorZ:e.getFloat64(t+a.errorZ,o),count:e.getUint32(t+a.count,o),reserved:e.getUint32(t+a.reserved,o)}}function l(e){const t=new DataView(e,0);let r=0;const{identifier:o,version:l}=s(e,t,r);if(r+=i.byteCount,"LEPCC "!==o)throw new n.Z("lepcc-decode-error","Bad identifier");if(l>1)throw new n.Z("lepcc-decode-error","Unknown version");const f=u(t,r);if(r+=a.byteCount,f.sizeHi*2**32+f.sizeLo!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad size");const d=new Float64Array(3*f.count),h=[],p=[],g=[],b=[];if(r=c(e,r,h),r=c(e,r,p),r=c(e,r,g),r=c(e,r,b),r!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad length");let m=0,y=0;for(let e=0;e<h.length;e++){y+=h[e];let t=0;for(let r=0;r<p[e];r++){t+=g[m];const e=b[m];d[3*m]=Math.min(f.maxX,f.minX+2*f.errorX*t),d[3*m+1]=Math.min(f.maxY,f.minY+2*f.errorY*y),d[3*m+2]=Math.min(f.maxZ,f.minZ+2*f.errorZ*e),m++}}return{errorX:f.errorX,errorY:f.errorY,errorZ:f.errorZ,result:d}}function c(e,t,r){const n=[];t=f(e,t,n);const o=[];for(let i=0;i<n.length;i++){o.length=0,t=f(e,t,o);for(let e=0;e<o.length;e++)r.push(o[e]+n[i])}return t}function f(e,t,r){const i=new DataView(e,t),s=i.getUint8(0),a=31&s,u=!!(32&s),l=(192&s)>>6;let c=0;if(0===l)c=i.getUint32(1,o),t+=5;else if(1===l)c=i.getUint16(1,o),t+=3;else{if(2!==l)throw new n.Z("lepcc-decode-error","Bad count type");c=i.getUint8(1),t+=2}if(u)throw new n.Z("lepcc-decode-error","LUT not implemented");const f=Math.ceil(c*a/8),d=new Uint8Array(e,t,f);let h=0,p=0,g=0;const b=-1>>>32-a;for(let e=0;e<c;e++){for(;p<a;)h|=d[g]<<p,p+=8,g+=1;r[e]=h&b,h>>>=a,p-=a,p+a>32&&(h|=d[g-1]>>8-p)}return t+g}const d={sizeLo:0,sizeHi:4,count:8,colorMapCount:12,lookupMethod:14,compressionMethod:15,byteCount:16};function h(e,t){return{sizeLo:e.getUint32(t+d.sizeLo,o),sizeHi:e.getUint32(t+d.sizeHi,o),count:e.getUint32(t+d.count,o),colorMapCount:e.getUint16(t+d.colorMapCount,o),lookupMethod:e.getUint8(t+d.lookupMethod),compressionMethod:e.getUint8(t+d.compressionMethod)}}function p(e){const t=new DataView(e,0);let r=0;const{identifier:o,version:a}=s(e,t,r);if(r+=i.byteCount,"ClusterRGB"!==o)throw new n.Z("lepcc-decode-error","Bad identifier");if(a>1)throw new n.Z("lepcc-decode-error","Unknown version");const u=h(t,r);if(r+=d.byteCount,u.sizeHi*2**32+u.sizeLo!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad size");if((2===u.lookupMethod||1===u.lookupMethod)&&0===u.compressionMethod){if(3*u.colorMapCount+u.count+r!==e.byteLength||u.colorMapCount>256)throw new n.Z("lepcc-decode-error","Bad count");const t=new Uint8Array(e,r,3*u.colorMapCount),o=new Uint8Array(e,r+3*u.colorMapCount,u.count),i=new Uint8Array(3*u.count);for(let e=0;e<u.count;e++){const r=o[e];i[3*e]=t[3*r],i[3*e+1]=t[3*r+1],i[3*e+2]=t[3*r+2]}return i}if(0===u.lookupMethod&&0===u.compressionMethod){if(3*u.count+r!==e.byteLength||0!==u.colorMapCount)throw new n.Z("lepcc-decode-error","Bad count");return new Uint8Array(e,r).slice()}if(u.lookupMethod<=2&&1===u.compressionMethod){if(r+3!==e.byteLength||1!==u.colorMapCount)throw new n.Z("lepcc-decode-error","Bad count");const o=t.getUint8(r),i=t.getUint8(r+1),s=t.getUint8(r+2),a=new Uint8Array(3*u.count);for(let e=0;e<u.count;e++)a[3*e]=o,a[3*e+1]=i,a[3*e+2]=s;return a}throw new n.Z("lepcc-decode-error","Bad method "+u.lookupMethod+","+u.compressionMethod)}const g={sizeLo:0,sizeHi:4,count:8,scaleFactor:12,bitsPerPoint:14,reserved:15,byteCount:16};function b(e,t){return{sizeLo:e.getUint32(t+g.sizeLo,o),sizeHi:e.getUint32(t+g.sizeHi,o),count:e.getUint32(t+g.count,o),scaleFactor:e.getUint16(t+g.scaleFactor,o),bitsPerPoint:e.getUint8(t+g.bitsPerPoint),reserved:e.getUint8(t+g.reserved)}}function m(e){const t=new DataView(e,0);let r=0;const{identifier:o,version:a}=s(e,t,r);if(r+=i.byteCount,"Intensity "!==o)throw new n.Z("lepcc-decode-error","Bad identifier");if(a>1)throw new n.Z("lepcc-decode-error","Unknown version");const u=b(t,r);if(r+=g.byteCount,u.sizeHi*2**32+u.sizeLo!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad size");const l=new Uint16Array(u.count);if(8===u.bitsPerPoint){if(u.count+r!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad size");const t=new Uint8Array(e,r,u.count);for(let e=0;e<u.count;e++)l[e]=t[e]*u.scaleFactor}else if(16===u.bitsPerPoint){if(2*u.count+r!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad size");const t=new Uint16Array(e,r,u.count);for(let e=0;e<u.count;e++)l[e]=t[e]*u.scaleFactor}else{const t=[];if(f(e,r,t)!==e.byteLength)throw new n.Z("lepcc-decode-error","Bad size");for(let e=0;e<u.count;e++)l[e]=t[e]*u.scaleFactor}return l}},35065:(e,t,r)=>{var n;r.d(t,{T:()=>n}),function(e){e.POSITION="position",e.NORMAL="normal",e.NORMALCOMPRESSED="normalCompressed",e.UV0="uv0",e.AUXPOS1="auxpos1",e.AUXPOS2="auxpos2",e.COLOR="color",e.SYMBOLCOLOR="symbolColor",e.SIZE="size",e.TANGENT="tangent",e.OFFSET="offset",e.SUBDIVISIONFACTOR="subdivisionFactor",e.COLORFEATUREATTRIBUTE="colorFeatureAttribute",e.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",e.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",e.DISTANCETOSTART="distanceToStart",e.UVMAPSPACE="uvMapSpace",e.BOUNDINGRECT="boundingRect",e.UVREGION="uvRegion",e.PROFILERIGHT="profileRight",e.PROFILEUP="profileUp",e.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",e.FEATUREVALUE="featureValue",e.MODELORIGINHI="modelOriginHi",e.MODELORIGINLO="modelOriginLo",e.MODEL="model",e.MODELNORMAL="modelNormal",e.INSTANCECOLOR="instanceColor",e.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",e.LOCALTRANSFORM="localTransform",e.GLOBALTRANSFORM="globalTransform",e.BOUNDINGSPHERE="boundingSphere",e.MODELORIGIN="modelOrigin",e.MODELSCALEFACTORS="modelScaleFactors",e.FEATUREATTRIBUTE="featureAttribute",e.STATE="state",e.LODLEVEL="lodLevel",e.POSITION0="position0",e.POSITION1="position1",e.NORMALA="normalA",e.NORMALB="normalB",e.COMPONENTINDEX="componentIndex",e.VARIANTOFFSET="variantOffset",e.VARIANTSTROKE="variantStroke",e.VARIANTEXTENSION="variantExtension",e.U8PADDING="u8padding",e.U16PADDING="u16padding",e.SIDENESS="sideness",e.START="start",e.END="end",e.UP="up",e.EXTRUDE="extrude",e.OBJECTANDLAYERIDCOLOR="objectAndLayerIdColor",e.OBJECTANDLAYERIDCOLOR_INSTANCED="objectAndLayerIdColor_instanced"}(n||(n={}))}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[237,7873],{92835:(e,t,r)=>{r.d(t,{Z:()=>m});var i,s=r(43697),n=r(96674),o=r(70586),a=r(35463),l=r(5600),u=(r(75215),r(67676),r(80442),r(71715)),d=r(52011),c=r(30556);let h=i=class extends n.wq{static get allTime(){return p}static get empty(){return f}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=null!=this.start?this.start.getTime():this.start,r=null!=this.end?this.end.getTime():this.end,i=null!=e.start?e.start.getTime():e.start,s=null!=e.end?e.end.getTime():e.end;return t===i&&r===s}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();const t=(0,o.yw)(this.start,(t=>(0,a.JE)(t,e))),r=(0,o.yw)(this.end,(t=>{const r=(0,a.JE)(t,e);return t.getTime()===r.getTime()?r:(0,a.Nm)(r,1,e)}));return new i({start:t,end:r})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,s=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let o,a;if(s>=t&&s<=r?o=s:t>=s&&t<=n&&(o=t),r>=s&&r<=n?a=r:n>=t&&n<=r&&(a=n),null!=o&&null!=a&&!isNaN(o)&&!isNaN(a)){const e=new i;return e.start=o===-1/0?null:new Date(o),e.end=a===1/0?null:new Date(a),e}return i.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const r=new i,{start:s,end:n}=this;return null!=s&&(r.start=(0,a.Nm)(s,e,t)),null!=n&&(r.end=(0,a.Nm)(n,e,t)),r}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,s._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"end",void 0),(0,s._)([(0,u.r)("end")],h.prototype,"readEnd",null),(0,s._)([(0,c.c)("end")],h.prototype,"writeEnd",null),(0,s._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],h.prototype,"isAllTime",null),(0,s._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],h.prototype,"isEmpty",null),(0,s._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"start",void 0),(0,s._)([(0,u.r)("start")],h.prototype,"readStart",null),(0,s._)([(0,c.c)("start")],h.prototype,"writeStart",null),h=i=(0,s._)([(0,d.j)("esri.TimeExtent")],h);const p=new h,f=new h({start:void 0,end:void 0}),m=h},46791:(e,t,r)=>{r.d(t,{Z:()=>O});var i,s=r(43697),n=r(3894),o=r(32448),a=r(22974),l=r(70586),u=r(71143);!function(e){e[e.ADD=1]="ADD",e[e.REMOVE=2]="REMOVE",e[e.MOVE=4]="MOVE"}(i||(i={}));var d,c=r(1654),h=r(75215),p=r(58971),f=r(5600),m=r(52421),g=r(52011),y=r(10661);const v=new u.Z(class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}},void 0,(e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1})),_=()=>{};function b(e){return e?e instanceof T?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function w(e){if(e&&e.length)return e[0]}function S(e,t,r,i){const s=Math.min(e.length-r,t.length-i);let n=0;for(;n<s&&e[r+n]===t[i+n];)n++;return n}function C(e,t,r,i){t&&t.forEach(((t,s,n)=>{e.push(t),C(e,r.call(i,t,s,n),r,i)}))}const I=new Set,x=new Set,E=new Set,R=new Map;let A=0,T=d=class extends o.Z.EventedAccessor{static isCollection(e){return null!=e&&e instanceof d}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._timer=null,this._observable=new y.s,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:A++})}normalizeCtorArgs(e){return e?Array.isArray(e)||e instanceof d?{items:e}:e:{}}destroy(){this._removeAllRaw()}*[Symbol.iterator](){yield*this.items}get items(){return(0,p.it)(this._observable),this._items}set items(e){this._emitBeforeChanges(i.ADD)||(this._splice(0,this.length,b(e)),this._emitAfterChanges(i.ADD))}hasEventListener(e){return"change"===e?this._chgListeners.length>0:this._emitter.hasEventListener(e)}on(e,t){if("change"===e){const e=this._chgListeners,r={removed:!1,callback:t};return e.push(r),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),{remove(){this.remove=_,r.removed=!0,e.splice(e.indexOf(r),1)}}}return this._emitter.on(e,t)}once(e,t){const r=this.on(e,t);return{remove(){r.remove()}}}add(e,t){if((0,p.it)(this._observable),this._emitBeforeChanges(i.ADD))return this;const r=this.getNextIndex(t??null);return this._splice(r,0,[e]),this._emitAfterChanges(i.ADD),this}addMany(e,t=this._items.length){if((0,p.it)(this._observable),!e||!e.length)return this;if(this._emitBeforeChanges(i.ADD))return this;const r=this.getNextIndex(t);return this._splice(r,0,b(e)),this._emitAfterChanges(i.ADD),this}at(e){if((0,p.it)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,p.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return[];const e=this._removeAllRaw();return this._emitAfterChanges(i.REMOVE),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,p.it)(this._observable),this._createNewInstance({items:this._items.map(a.d9)})}concat(...e){(0,p.it)(this._observable);const t=e.map(b);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,p.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const r=(0,l.j0)(this._splice(0,this.length)),s=r.length;for(let i=0;i<s;i++)e.call(t,r[i],i,r);this._emitAfterChanges(i.REMOVE)}every(e,t){return(0,p.it)(this._observable),this._items.every(e,t)}filter(e,t){let r;return(0,p.it)(this._observable),r=2===arguments.length?this._items.filter(e,t):this._items.filter(e),this._createNewInstance({items:r})}find(e,t){return(0,p.it)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,p.it)(this._observable),this._items.findIndex(e,t)}flatten(e,t){(0,p.it)(this._observable);const r=[];return C(r,this,e,t),new d(r)}forEach(e,t){return(0,p.it)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,p.it)(this._observable),this._items[e]}getNextIndex(e){(0,p.it)(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,p.it)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,p.it)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,p.it)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,p.it)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,p.it)(this._observable);const r=this._items.map(e,t);return new d({items:r})}reorder(e,t=this.length-1){(0,p.it)(this._observable);const r=this.indexOf(e);if(-1!==r){if(t<0?t=0:t>=this.length&&(t=this.length-1),r!==t){if(this._emitBeforeChanges(i.MOVE))return e;this._splice(r,1),this._splice(t,0,[e]),this._emitAfterChanges(i.MOVE)}return e}}pop(){if((0,p.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const e=w(this._splice(this.length-1,1));return this._emitAfterChanges(i.REMOVE),e}push(...e){return(0,p.it)(this._observable),this._emitBeforeChanges(i.ADD)||(this._splice(this.length,0,e),this._emitAfterChanges(i.ADD)),this.length}reduce(e,t){(0,p.it)(this._observable);const r=this._items;return 2===arguments.length?r.reduce(e,t):r.reduce(e)}reduceRight(e,t){(0,p.it)(this._observable);const r=this._items;return 2===arguments.length?r.reduceRight(e,t):r.reduceRight(e)}remove(e){return(0,p.it)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,p.it)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(i.REMOVE))return;const t=w(this._splice(e,1));return this._emitAfterChanges(i.REMOVE),t}removeMany(e){if((0,p.it)(this._observable),!e||!e.length||this._emitBeforeChanges(i.REMOVE))return[];const t=e instanceof d?e.toArray():e,r=this._items,s=[],n=t.length;for(let e=0;e<n;e++){const i=t[e],n=r.indexOf(i);if(n>-1){const i=1+S(t,r,e+1,n+1),o=this._splice(n,i);o&&o.length>0&&s.push.apply(s,o),e+=i-1}}return this._emitAfterChanges(i.REMOVE),s}reverse(){if((0,p.it)(this._observable),this._emitBeforeChanges(i.MOVE))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(i.MOVE),this}shift(){if((0,p.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const e=w(this._splice(0,1));return this._emitAfterChanges(i.REMOVE),e}slice(e=0,t=this.length){return(0,p.it)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,p.it)(this._observable),this._items.some(e,t)}sort(e){if((0,p.it)(this._observable),!this.length||this._emitBeforeChanges(i.MOVE))return this;const t=(0,l.j0)(this._splice(0,this.length));return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(i.MOVE),this}splice(e,t,...r){(0,p.it)(this._observable);const s=(t?i.REMOVE:0)|(r.length?i.ADD:0);if(this._emitBeforeChanges(s))return[];const n=this._splice(e,t,r)||[];return this._emitAfterChanges(s),n}toArray(){return(0,p.it)(this._observable),this._items.slice()}toJSON(){return(0,p.it)(this._observable),this.toArray()}toLocaleString(){return(0,p.it)(this._observable),this._items.toLocaleString()}toString(){return(0,p.it)(this._observable),this._items.toString()}unshift(...e){return(0,p.it)(this._observable),!e.length||this._emitBeforeChanges(i.ADD)||(this._splice(0,0,e),this._emitAfterChanges(i.ADD)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,r){const i=this._items,s=this.itemType;let n,o;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=(0,c.Os)((()=>this._dispatchChange()))),t){if(o=i.splice(e,t),this.hasEventListener("before-remove")){const t=v.acquire();t.target=this,t.cancellable=!0;for(let r=0,s=o.length;r<s;r++)n=o[r],t.reset(n),this.emit("before-remove",t),t.defaultPrevented&&(o.splice(r,1),i.splice(e,0,n),e+=1,r-=1,s-=1);v.release(t)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const e=v.acquire();e.target=this,e.cancellable=!1;const t=o.length;for(let r=0;r<t;r++)e.reset(o[r]),this.emit("after-remove",e);v.release(e)}}if(r&&r.length){if(s){const e=[];for(const t of r){const r=s.ensureType(t);null==r&&null!=t||e.push(r)}r=e}const t=this.hasEventListener("before-add"),n=this.hasEventListener("after-add"),o=e===this.length;if(t||n){const s=v.acquire();s.target=this,s.cancellable=!0;const a=v.acquire();a.target=this,a.cancellable=!1;for(const l of r)t?(s.reset(l),this.emit("before-add",s),s.defaultPrevented||(o?i.push(l):i.splice(e++,0,l),this._set("length",i.length),n&&(a.reset(l),this.emit("after-add",a)))):(o?i.push(l):i.splice(e++,0,l),this._set("length",i.length),a.reset(l),this.emit("after-add",a));v.release(a),v.release(s)}else{if(o)for(const e of r)i.push(e);else i.splice(e,0,...r);this._set("length",i.length)}}return(r&&r.length||o&&o.length)&&this._notifyChangeEvent(r,o),o}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const r=v.acquire();r.target=this,r.cancellable=!0,r.type=e,this.emit("before-changes",r),t=r.defaultPrevented,v.release(r)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=v.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),v.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const e=t.changes;I.clear(),x.clear(),E.clear();for(const{added:t,removed:r}of e){if(t)if(0===E.size&&0===x.size)for(const e of t)I.add(e);else for(const e of t)x.has(e)?(E.add(e),x.delete(e)):E.has(e)||I.add(e);if(r)if(0===E.size&&0===I.size)for(const e of r)x.add(e);else for(const e of r)I.has(e)?I.delete(e):(E.delete(e),x.add(e))}const r=n.Z.acquire();I.forEach((e=>{r.push(e)}));const i=n.Z.acquire();x.forEach((e=>{i.push(e)}));const s=this._items,o=t.items,a=n.Z.acquire();if(E.forEach((e=>{o.indexOf(e)!==s.indexOf(e)&&a.push(e)})),t.listeners&&(r.length||i.length||a.length)){const e={target:this,added:r,removed:i,moved:a},s=t.listeners.length;for(let r=0;r<s;r++){const i=t.listeners[r];i.removed||i.callback.call(this,e)}}n.Z.release(r),n.Z.release(i),n.Z.release(a)}I.clear(),x.clear(),E.clear()}};T.ofType=e=>{if(!e)return d;if(R.has(e))return R.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(const r in e.typeMap){const i=e.typeMap[r].prototype.declaredClass;t?t+=` | ${i}`:t=i}let r=class extends d{};return(0,s._)([(0,m.c)({Type:e,ensureType:"function"==typeof e?(0,h.se)(e):(0,h.N7)(e)})],r.prototype,"itemType",void 0),r=(0,s._)([(0,g.j)(`esri.core.Collection<${t}>`)],r),R.set(e,r),r},(0,s._)([(0,f.Cb)()],T.prototype,"length",void 0),(0,s._)([(0,f.Cb)()],T.prototype,"items",null),T=d=(0,s._)([(0,g.j)("esri.core.Collection")],T);const O=T},52421:(e,t,r)=>{function i(e){return(t,r)=>{t[r]=e}}r.d(t,{c:()=>i})},65845:(e,t,r)=>{r.d(t,{D:()=>s});var i=r(81153);function s(e){e&&e.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,i.l)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},81153:(e,t,r)=>{function i(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{l:()=>i})},35463:(e,t,r)=>{r.d(t,{JE:()=>o,Nm:()=>n,rJ:()=>a}),r(80442);const i={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},s={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function n(e,t,r){const i=new Date(e.getTime());if(t&&r){const e=s[r],{getter:n,setter:o,multiplier:a}=e;if("months"===r){const e=function(e,t){const r=new Date(e,t+1,1);return r.setDate(0),r.getDate()}(i.getFullYear(),i.getMonth()+t);i.getDate()>e&&i.setDate(e)}i[o](i[n]()+t*a)}return i}function o(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function a(e,t,r){return 0===e?0:e*i[t]/i[r]}},41123:(e,t,r)=>{r.d(t,{D:()=>s});const i="randomUUID"in crypto;function s(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}},79235:(e,t,r)=>{r.d(t,{Z:()=>_});var i,s=r(43697),n=r(67676),o=r(35454),a=r(96674),l=r(67900),u=r(20941),d=r(5600),c=(r(75215),r(80442),r(71715)),h=r(52011),p=r(30556);const f=(0,o.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),m=f.jsonValues.slice();(0,n.e$)(m,"orthometric");const g=(0,o.w)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let y=i=class extends a.wq{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return f.write(e,t,r)}readHeightModel(e,t,r){return f.read(e)||(r&&r.messages&&r.messages.push(function(e,t){return new u.Z("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return g.read(e)||(r&&r.messages&&r.messages.push(v(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.$C)(e)||g.read(e)||(r&&r.messages&&r.messages.push(v(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,l.cM)(t);return new i({heightModel:e.heightModel,heightUnit:r,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new u.Z("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s._)([(0,d.Cb)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m,default:"ellipsoidal"}}}})],y.prototype,"heightModel",void 0),(0,s._)([(0,p.c)("web-scene","heightModel")],y.prototype,"writeHeightModel",null),(0,s._)([(0,c.r)(["web-scene","service"],"heightModel")],y.prototype,"readHeightModel",null),(0,s._)([(0,d.Cb)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g.jsonValues,write:g.write}}}})],y.prototype,"heightUnit",void 0),(0,s._)([(0,c.r)("web-scene","heightUnit")],y.prototype,"readHeightUnit",null),(0,s._)([(0,c.r)("service","heightUnit")],y.prototype,"readHeightUnitService",null),(0,s._)([(0,d.Cb)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],y.prototype,"vertCRS",void 0),(0,s._)([(0,c.r)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],y.prototype,"readVertCRS",null),y=i=(0,s._)([(0,h.j)("esri.geometry.HeightModelInfo")],y);const _=y},10608:(e,t,r)=>{r.r(t),r.d(t,{default:()=>W});var i=r(43697),s=r(51773),n=r(3172),o=r(20102),a=r(22974),l=r(92604),u=r(16453),d=r(78286),c=r(95330),h=r(17452),p=r(5600),f=r(75215),m=r(71715),g=r(52011),y=r(30556),v=r(87085),_=r(54295),b=r(17287),w=r(38009),S=r(16859),C=r(72965),I=r(20559),x=r(36030),E=r(96674);r(67676),r(80442);let R=class extends E.wq{constructor(e){super(e),this.field=null,this.type=null}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}};(0,i._)([(0,p.Cb)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],R.prototype,"field",void 0),(0,i._)([(0,p.Cb)({readOnly:!0,nonNullable:!0,json:{read:!1}})],R.prototype,"type",void 0),R=(0,i._)([(0,g.j)("esri.layers.pointCloudFilters.PointCloudFilter")],R);const A=R;var T;let O=T=class extends A{constructor(e){super(e),this.requiredClearBits=null,this.requiredSetBits=null,this.type="bitfield"}clone(){return new T({field:this.field,requiredClearBits:(0,a.d9)(this.requiredClearBits),requiredSetBits:(0,a.d9)(this.requiredSetBits)})}};(0,i._)([(0,p.Cb)({type:[f.z8],json:{write:{enabled:!0,overridePolicy(){return{enabled:!0,isRequired:!this.requiredSetBits}}}}})],O.prototype,"requiredClearBits",void 0),(0,i._)([(0,p.Cb)({type:[f.z8],json:{write:{enabled:!0,overridePolicy(){return{enabled:!0,isRequired:!this.requiredClearBits}}}}})],O.prototype,"requiredSetBits",void 0),(0,i._)([(0,x.J)({pointCloudBitfieldFilter:"bitfield"})],O.prototype,"type",void 0),O=T=(0,i._)([(0,g.j)("esri.layers.pointCloudFilters.PointCloudBitfieldFilter")],O);const F=O;var M;let D=M=class extends A{constructor(e){super(e),this.includedReturns=[],this.type="return"}clone(){return new M({field:this.field,includedReturns:(0,a.d9)(this.includedReturns)})}};(0,i._)([(0,p.Cb)({type:[["firstOfMany","last","lastOfMany","single"]],json:{write:{enabled:!0,isRequired:!0}}})],D.prototype,"includedReturns",void 0),(0,i._)([(0,x.J)({pointCloudReturnFilter:"return"})],D.prototype,"type",void 0),D=M=(0,i._)([(0,g.j)("esri.layers.pointCloudFilters.PointCloudReturnFilter")],D);const j=D;var N;let Z=N=class extends A{constructor(e){super(e),this.mode="exclude",this.type="value",this.values=[]}clone(){return new N({field:this.field,mode:this.mode,values:(0,a.d9)(this.values)})}};(0,i._)([(0,p.Cb)({type:["exclude","include"],json:{write:{enabled:!0,isRequired:!0}}})],Z.prototype,"mode",void 0),(0,i._)([(0,x.J)({pointCloudValueFilter:"value"})],Z.prototype,"type",void 0),(0,i._)([(0,p.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],Z.prototype,"values",void 0),Z=N=(0,i._)([(0,g.j)("esri.layers.pointCloudFilters.PointCloudValueFilter")],Z);const P={key:"type",base:A,typeMap:{value:Z,bitfield:F,return:j}};var V,L=r(21506),q=r(1231),U=r(53518),k=r(11223),B=r(23030),K=r(25848);let $=V=class extends K.Z{constructor(e){super(e),this.type="point-cloud-rgb",this.field=null}clone(){return new V({...this.cloneProperties(),field:(0,a.d9)(this.field)})}};(0,i._)([(0,x.J)({pointCloudRGBRenderer:"point-cloud-rgb"})],$.prototype,"type",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],$.prototype,"field",void 0),$=V=(0,i._)([(0,g.j)("esri.renderers.PointCloudRGBRenderer")],$);const Y=$;var H=r(14008),z=r(46329);const J={key:"type",base:K.Z,typeMap:{"point-cloud-class-breaks":B.Z,"point-cloud-rgb":Y,"point-cloud-stretch":H.Z,"point-cloud-unique-value":z.Z},errorContext:"renderer"};var G=r(32163);const Q=(0,U.v)();let X=class extends((0,I.Vt)((0,b.Y)((0,w.q)((0,S.I)((0,C.M)((0,u.R)((0,_.V)(v.Z)))))))){constructor(...e){super(...e),this.operationalLayerType="PointCloudLayer",this.popupEnabled=!0,this.popupTemplate=null,this.opacity=1,this.filters=[],this.fields=null,this.fieldsIndex=null,this.outFields=null,this.path=null,this.legendEnabled=!0,this.renderer=null,this.type="point-cloud"}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}get defaultPopupTemplate(){return this.attributeStorageInfo?this.createPopupTemplate():null}getFieldDomain(e){const t=this.fieldsIndex.get(e);return t&&t.domain?t.domain:null}readServiceFields(e,t,r){return Array.isArray(e)?e.map((e=>{const t=new q.Z;return"FieldTypeInteger"===e.type&&((e=(0,a.d9)(e)).type="esriFieldTypeInteger"),t.read(e,r),t})):Array.isArray(t.attributeStorageInfo)?t.attributeStorageInfo.map((e=>new q.Z({name:e.name,type:"ELEVATION"===e.name?"double":"integer"}))):null}set elevationInfo(e){this._set("elevationInfo",e),this._validateElevationInfo()}writeRenderer(e,t,r,i){(0,d.RB)("layerDefinition.drawingInfo.renderer",e.write({},i),t)}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(c.r9).then((()=>this._fetchService(t)));return this.addResolvingPromise(r),Promise.resolve(this)}createPopupTemplate(e){const t=(0,G.eZ)(this,e);return t&&(this._formatPopupTemplateReturnsField(t),this._formatPopupTemplateRGBField(t)),t}_formatPopupTemplateReturnsField(e){const t=this.fieldsIndex.get("RETURNS");if(!t)return;const r=e.fieldInfos?.find((e=>e.fieldName===t.name));if(!r)return;const i=new k.Z({name:"pcl-returns-decoded",title:t.alias||t.name,expression:`\n var returnValue = $feature.${t.name};\n return (returnValue % 16) + " / " + Floor(returnValue / 16);\n `});e.expressionInfos=[...e.expressionInfos||[],i],r.fieldName="expression/pcl-returns-decoded"}_formatPopupTemplateRGBField(e){const t=this.fieldsIndex.get("RGB");if(!t)return;const r=e.fieldInfos?.find((e=>e.fieldName===t.name));if(!r)return;const i=new k.Z({name:"pcl-rgb-decoded",title:t.alias||t.name,expression:`\n var rgb = $feature.${t.name};\n var red = Floor(rgb / 65536, 0);\n var green = Floor((rgb - (red * 65536)) / 256,0);\n var blue = rgb - (red * 65536) - (green * 256);\n\n return "rgb(" + red + "," + green + "," + blue + ")";\n `});e.expressionInfos=[...e.expressionInfos||[],i],r.fieldName="expression/pcl-rgb-decoded"}async queryCachedStatistics(e,t){if(await this.load(t),!this.attributeStorageInfo)throw new o.Z("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const r=this.fieldsIndex.get(e);if(!r)throw new o.Z("pointcloudlayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const e of this.attributeStorageInfo)if(e.name===r.name){const r=(0,h.v_)(this.parsedUrl.path,`./statistics/${e.key}`);return(0,n.default)(r,{query:{f:"json",token:this.apiKey},responseType:"json",signal:t?t.signal:null}).then((e=>e.data))}throw new o.Z("pointcloudlayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(I.xp.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"point-cloud"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"point-cloud"};return this._debouncedSaveOperations(I.xp.SAVE,e)}validateLayer(e){if(e.layerType&&"PointCloud"!==e.layerType)throw new o.Z("pointcloudlayer:layer-type-not-supported","PointCloudLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new o.Z("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x-2.x"});if(this.version.major>2)throw new o.Z("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x-2.x"})}hasCachedStatistics(e){return null!=this.attributeStorageInfo&&this.attributeStorageInfo.some((t=>t.name===e))}_getTypeKeywords(){return["PointCloud"]}_validateElevationInfo(){const e=this.elevationInfo;e&&("absolute-height"!==e.mode&&l.Z.getLogger(this.declaredClass).warn(".elevationInfo=","Point cloud layers only support absolute-height elevation mode"),e.featureExpressionInfo&&"0"!==e.featureExpressionInfo.expression&&l.Z.getLogger(this.declaredClass).warn(".elevationInfo=","Point cloud layers do not support featureExpressionInfo"))}};(0,i._)([(0,p.Cb)({type:["PointCloudLayer"]})],X.prototype,"operationalLayerType",void 0),(0,i._)([(0,p.Cb)(L.C_)],X.prototype,"popupEnabled",void 0),(0,i._)([(0,p.Cb)({type:s.Z,json:{name:"popupInfo",write:!0}})],X.prototype,"popupTemplate",void 0),(0,i._)([(0,p.Cb)({readOnly:!0,json:{read:!1}})],X.prototype,"defaultPopupTemplate",null),(0,i._)([(0,p.Cb)({readOnly:!0,json:{write:!1,read:!1,origins:{"web-document":{write:!1,read:!1}}}})],X.prototype,"opacity",void 0),(0,i._)([(0,p.Cb)({type:["show","hide"]})],X.prototype,"listMode",void 0),(0,i._)([(0,p.Cb)({types:[P],json:{origins:{service:{read:{source:"filters"}}},name:"layerDefinition.filters",write:!0}})],X.prototype,"filters",void 0),(0,i._)([(0,p.Cb)({type:[q.Z]})],X.prototype,"fields",void 0),(0,i._)([(0,p.Cb)(Q.fieldsIndex)],X.prototype,"fieldsIndex",void 0),(0,i._)([(0,m.r)("service","fields",["fields","attributeStorageInfo"])],X.prototype,"readServiceFields",null),(0,i._)([(0,p.Cb)(Q.outFields)],X.prototype,"outFields",void 0),(0,i._)([(0,p.Cb)({readOnly:!0})],X.prototype,"attributeStorageInfo",void 0),(0,i._)([(0,p.Cb)(L.PV)],X.prototype,"elevationInfo",null),(0,i._)([(0,p.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],X.prototype,"path",void 0),(0,i._)([(0,p.Cb)(L.rn)],X.prototype,"legendEnabled",void 0),(0,i._)([(0,p.Cb)({types:J,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:{target:{"layerDefinition.drawingInfo.renderer":{types:J},"layerDefinition.drawingInfo.transparency":{type:Number}}}}})],X.prototype,"renderer",void 0),(0,i._)([(0,y.c)("renderer")],X.prototype,"writeRenderer",null),(0,i._)([(0,p.Cb)({json:{read:!1},readOnly:!0})],X.prototype,"type",void 0),X=(0,i._)([(0,g.j)("esri.layers.PointCloudLayer")],X);const W=X},54295:(e,t,r)=>{r.d(t,{V:()=>o});var i=r(43697),s=r(5600),n=(r(75215),r(67676),r(80442),r(52011));const o=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,s.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,n.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>l});var i=r(43697),s=r(92604),n=r(5600),o=(r(75215),r(67676),r(80442),r(52011)),a=r(66677);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.Qc)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Nm)(e,s.Z.getLogger(this.declaredClass)))}};return(0,i._)([(0,n.Cb)()],t.prototype,"title",null),(0,i._)([(0,n.Cb)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,o.j)("esri.layers.mixins.ArcGISService")],t),t}},72965:(e,t,r)=>{r.d(t,{M:()=>o});var i=r(43697),s=r(5600),n=(r(75215),r(67676),r(80442),r(52011));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,i._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,i._)([(0,s.Cb)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,i._)([(0,n.j)("esri.layers.mixins.ScaleRangeLayer")],t),t}},20559:(e,t,r)=>{r.d(t,{xp:()=>V,Vt:()=>M});var i=r(43697),s=r(3172),n=r(20102),o=r(92604),a=r(95330),l=r(17452),u=r(5600),d=(r(75215),r(67676),r(80442),r(71715)),c=r(52011),h=r(30556),p=r(65845),f=r(6570),m=r(79235),g=r(82971),y=r(66677),v=r(21506),_=r(61064);let b=null;function w(){return b}var S=r(65587),C=r(15235),I=r(66643),x=r(41123),E=r(97873);async function R(e,t,r){if(!t||!t.resources)return;const i=t.portalItem===e.portalItem?new Set(e.paths):new Set;e.paths.length=0,e.portalItem=t.portalItem;const s=new Set(t.resources.toKeep.map((e=>e.resource.path))),o=new Set,l=[];s.forEach((t=>{i.delete(t),e.paths.push(t)}));for(const n of t.resources.toUpdate)if(i.delete(n.resource.path),s.has(n.resource.path)||o.has(n.resource.path)){const{resource:t,content:i,finish:s,error:o}=n,a=(0,E.getSiblingOfSameTypeI)(t,(0,x.D)());e.paths.push(a.path),l.push(A({resource:a,content:i,compress:n.compress,finish:s,error:o},r))}else e.paths.push(n.resource.path),l.push(T(n,r)),o.add(n.resource.path);for(const i of t.resources.toAdd)l.push(A(i,r)),e.paths.push(i.resource.path);if(i.forEach((e=>{if(t.portalItem){const r=t.portalItem.resourceFromPath(e);l.push(r.portalItem.removeResource(r).catch((()=>{})))}})),0===l.length)return;const u=await(0,a.as)(l);(0,a.k_)(r);const d=u.filter((e=>"error"in e)).map((e=>e.error));if(d.length>0)throw new n.Z("save:resources","Failed to save one or more resources",{errors:d})}async function A(e,t){const r={...null!=t?t:{},compress:e.compress},i=await(0,I.q6)(e.resource.portalItem.addResource(e.resource,e.content,r));if(!0!==i.ok)throw e.error?.(i.error),i.error;e.finish?.(e.resource)}async function T(e,t){const r=await(0,I.q6)(e.resource.update(e.content,t));if(!0!==r.ok)throw e.error?.(r.error),r.error;e.finish?.(e.resource)}const O="esri.layers.mixins.SceneService",F=o.Z.getLogger(O),M=e=>{let t=class extends e{constructor(){super(...arguments),this.spatialReference=null,this.fullExtent=null,this.heightModelInfo=null,this.minScale=0,this.maxScale=0,this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.copyright=null,this.sublayerTitleMode="item-title",this.title=null,this.layerId=null,this.indexInfo=null,this._debouncedSaveOperations=(0,a.Ds)((async(e,t,r)=>{switch(e){case V.SAVE:return this._save(t);case V.SAVE_AS:return this._saveAs(r,t)}}))}readSpatialReference(e,t){return this._readSpatialReference(t)}_readSpatialReference(e){if(null!=e.spatialReference)return g.Z.fromJSON(e.spatialReference);{const t=e.store,r=t.indexCRS||t.geographicCRS,i=r&&parseInt(r.substring(r.lastIndexOf("/")+1,r.length),10);return null!=i?new g.Z(i):null}}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const i=null==e.spatialReference?{...e,spatialReference:this._readSpatialReference(t)}:e;return f.Z.fromJSON(i,r)}const i=t.store,s=this._readSpatialReference(t);return null==s||null==i||null==i.extent||!Array.isArray(i.extent)||i.extent.some((e=>e<D))?null:new f.Z({xmin:i.extent[0],ymin:i.extent[1],xmax:i.extent[2],ymax:i.extent[3],spatialReference:s})}parseVersionString(e){const t={major:Number.NaN,minor:Number.NaN,versionString:e},r=e.split(".");return r.length>=2&&(t.major=parseInt(r[0],10),t.minor=parseInt(r[1],10)),t}readVersion(e,t){const r=t.store,i=null!=r.version?r.version.toString():"";return this.parseVersionString(i)}readTitlePortalItem(e){return"item-title"!==this.sublayerTitleMode?void 0:e}readTitleService(e,t){const r=this.portalItem&&this.portalItem.title;if("item-title"===this.sublayerTitleMode)return(0,y.a7)(this.url,t.name);let i=t.name;if(!i&&this.url){const e=(0,y.Qc)(this.url);null!=e&&(i=e.title)}return"item-title-and-service-name"===this.sublayerTitleMode&&r&&(i=r+" - "+i),(0,y.ld)(i)}set url(e){const t=(0,y.XG)({layer:this,url:e,nonStandardUrlAllowed:!1,logger:F});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,r,i){(0,y.wH)(this,e,"layers",t,i)}get parsedUrl(){const e=this._get("url"),t=(0,l.mN)(e);return null!=this.layerId&&(t.path=`${t.path}/layers/${this.layerId}`),t}async _fetchIndexAndUpdateExtent(e,t){this.indexInfo=(0,_.T)(this.parsedUrl.path,this.rootNode,e,this.apiKey,F,t),null==this.fullExtent||this.fullExtent.hasZ||this._updateExtent(await this.indexInfo)}_updateExtent(e){if("page"===e?.type){const t=e.rootIndex%e.pageSize,r=e.rootPage?.nodes?.[t];if(null==r||null==r.obb||null==r.obb.center||null==r.obb.halfSize)throw new n.Z("sceneservice:invalid-node-page","Invalid node page.");if(r.obb.center[0]<D||null==this.fullExtent||this.fullExtent.hasZ)return;const i=r.obb.halfSize,s=r.obb.center[2],o=Math.sqrt(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]);this.fullExtent.zmin=s-o,this.fullExtent.zmax=s+o}else if("node"===e?.type){const t=e.rootNode?.mbs;if(!Array.isArray(t)||4!==t.length||t[0]<D)return;const r=t[2],i=t[3],{fullExtent:s}=this;s&&(s.zmin=r-i,s.zmax=r+i)}}async _fetchService(e){if(null==this.url)throw new n.Z("sceneservice:url-not-set","Scene service can not be loaded without valid portal item or url");if(null==this.layerId&&/SceneServer\/*$/i.test(this.url)){const t=await this._fetchFirstLayerId(e);null!=t&&(this.layerId=t)}return this._fetchServiceLayer(e)}async _fetchFirstLayerId(e){const t=await(0,s.default)(this.url,{query:{f:"json",token:this.apiKey},responseType:"json",signal:e});if(t.data&&Array.isArray(t.data.layers)&&t.data.layers.length>0)return t.data.layers[0].id}async _fetchServiceLayer(e){const t=await(0,s.default)(this.parsedUrl?.path??"",{query:{f:"json",token:this.apiKey},responseType:"json",signal:e});t.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));let r=!1;if(t.data.layerType&&"Voxel"===t.data.layerType&&(r=!0),r)return this._fetchVoxelServiceLayer();const i=t.data;this.read(i,this._getServiceContext()),this.validateLayer(i)}async _fetchVoxelServiceLayer(e){const t=(await(0,s.default)(this.parsedUrl?.path+"/layer",{query:{f:"json",token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,this._getServiceContext()),this.validateLayer(t)}_getServiceContext(){return{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl}}async _ensureLoadBeforeSave(){await this.load(),"beforeSave"in this&&"function"==typeof this.beforeSave&&await this.beforeSave()}validateLayer(e){}_updateTypeKeywords(e,t,r){e.typeKeywords||(e.typeKeywords=[]);const i=t.getTypeKeywords();for(const t of i)e.typeKeywords.push(t);e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)),r===j.newItem&&(e.typeKeywords=e.typeKeywords.filter((e=>"Hosted Service"!==e))))}async _saveAs(e,t){const r={...P,...t};let i=C.default.from(e);i||(F.error("_saveAs(): requires a portal item parameter"),await Promise.reject(new n.Z("sceneservice:portal-item-required","_saveAs() requires a portal item to save to"))),i.id&&(i=i.clone(),i.id=null);const s=i.portal||S.Z.getDefault();await this._ensureLoadBeforeSave(),i.type=Z,i.portal=s;const o={origin:"portal-item",url:null,messages:[],portal:s,portalItem:i,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}},a={layers:[this.write({},o)]};return await Promise.all(o.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(a,o,r),i.url=this.url,i.title||(i.title=this.title),this._updateTypeKeywords(i,r,j.newItem),await s.signIn(),await(s.user?.addItem({item:i,folder:r&&r.folder,data:a})),await R(this.resourceReferences,o,null),this.portalItem=i,(0,p.D)(o),o.portalItem=i,i}async _save(e){const t={...P,...e};if(!this.portalItem)throw F.error("_save(): requires the .portalItem property to be set"),new n.Z("sceneservice:portal-item-not-set","Portal item to save to has not been set on this SceneService");if(this.portalItem.type!==Z)throw F.error("_save(): Non-matching portal item type. Got "+this.portalItem.type+", expected "+Z),new n.Z("sceneservice:portal-item-wrong-type",`Portal item needs to have type "${Z}"`);await this._ensureLoadBeforeSave();const r={origin:"portal-item",url:this.portalItem.itemUrl&&(0,l.mN)(this.portalItem.itemUrl),messages:[],portal:this.portalItem.portal||S.Z.getDefault(),portalItem:this.portalItem,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}},i={layers:[this.write({},r)]};return await Promise.all(r.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(i,r,t),this.portalItem.url=this.url,this.portalItem.title||(this.portalItem.title=this.title),this._updateTypeKeywords(this.portalItem,t,j.existingItem),await this.portalItem.update({data:i}),await R(this.resourceReferences,r,null),(0,p.D)(r),this.portalItem}async _validateAgainstJSONSchema(e,t,r){let i=t.messages?.filter((e=>"error"===e.type)).map((e=>new n.Z(e.name,e.message,e.details)))??[];r?.validationOptions?.ignoreUnsupported&&(i=i.filter((e=>"layer:unsupported"!==e.name&&"symbol:unsupported"!==e.name&&"symbol-layer:unsupported"!==e.name&&"property:unsupported"!==e.name&&"url:unsupported"!==e.name&&"scenemodification:unsupported"!==e.name)));const s=r?.validationOptions,o=s?.enabled,a=w();if(o&&a){const t=(await a()).validate(e,r.portalItemLayerType);if(t.length>0){const e=`Layer item did not validate:\n${t.join("\n")}`;if(F.error(`_validateAgainstJSONSchema(): ${e}`),"throw"===s.failPolicy){const e=t.map((e=>new n.Z("sceneservice:schema-validation",e))).concat(i);throw new n.Z("sceneservice-validate:error","Failed to save layer item due to schema validation, see `details.errors`.",{combined:e})}}}if(i.length>0)throw new n.Z("sceneservice:save","Failed to save SceneService due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:i})}};return(0,i._)([(0,u.Cb)(v.id)],t.prototype,"id",void 0),(0,i._)([(0,u.Cb)({type:g.Z})],t.prototype,"spatialReference",void 0),(0,i._)([(0,d.r)("spatialReference",["spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readSpatialReference",null),(0,i._)([(0,u.Cb)({type:f.Z})],t.prototype,"fullExtent",void 0),(0,i._)([(0,d.r)("fullExtent",["fullExtent","store.extent","spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readFullExtent",null),(0,i._)([(0,u.Cb)({readOnly:!0,type:m.Z})],t.prototype,"heightModelInfo",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:{source:"minScale"},write:!1}}}})],t.prototype,"minScale",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:{source:"maxScale"},write:!1}}}})],t.prototype,"maxScale",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,i._)([(0,d.r)("version",["store.version"])],t.prototype,"readVersion",null),(0,i._)([(0,u.Cb)({type:String,json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,u.Cb)({type:String,json:{read:!1}})],t.prototype,"sublayerTitleMode",void 0),(0,i._)([(0,u.Cb)({type:String})],t.prototype,"title",void 0),(0,i._)([(0,d.r)("portal-item","title")],t.prototype,"readTitlePortalItem",null),(0,i._)([(0,d.r)("service","title",["name"])],t.prototype,"readTitleService",null),(0,i._)([(0,u.Cb)({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{write:{target:"id",isRequired:!0,ignoreOrigin:!0},read:!1}}}})],t.prototype,"layerId",void 0),(0,i._)([(0,u.Cb)(v.HQ)],t.prototype,"url",null),(0,i._)([(0,h.c)("url")],t.prototype,"writeUrl",null),(0,i._)([(0,u.Cb)()],t.prototype,"parsedUrl",null),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"store",void 0),(0,i._)([(0,u.Cb)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],t.prototype,"rootNode",void 0),t=(0,i._)([(0,c.j)(O)],t),t},D=-1e38;var j,N;(N=j||(j={}))[N.existingItem=0]="existingItem",N[N.newItem=1]="newItem";const Z="Scene Service",P={getTypeKeywords:()=>[],portalItemLayerType:"unknown",validationOptions:{enabled:!0,ignoreUnsupported:!1,failPolicy:"throw"}};var V;!function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(V||(V={}))},61064:(e,t,r)=>{r.d(t,{T:()=>n});var i=r(3172),s=r(20102);async function n(e,t,r,n,o,a){let l=null;if(null!=r){const t=`${e}/nodepages/`,s=t+Math.floor(r.rootIndex/r.nodesPerPage);try{return{type:"page",rootPage:(await(0,i.default)(s,{query:{f:"json",token:n},responseType:"json",signal:a})).data,rootIndex:r.rootIndex,pageSize:r.nodesPerPage,lodMetric:r.lodSelectionMetricType,urlPrefix:t}}catch(e){null!=o&&o.warn("#fetchIndexInfo()","Failed to load root node page. Falling back to node documents.",s,e),l=e}}if(!t)return null;const u=`${e}/nodes/`,d=u+(t&&t.split("/").pop());try{return{type:"node",rootNode:(await(0,i.default)(d,{query:{f:"json",token:n},responseType:"json",signal:a})).data,urlPrefix:u}}catch(e){throw new s.Z("sceneservice:root-node-missing","Root node missing.",{pageError:l,nodeError:e,url:d})}}},53518:(e,t,r)=>{r.d(t,{v:()=>a});var i=r(92604),s=r(1231),n=r(99514),o=r(35671);function a(){return{fields:{type:[s.Z],value:null},fieldsIndex:{readOnly:!0,get(){return new n.Z(this.fields||[])}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e||!e.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||i.Z.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,o.Q0)(this.fieldsIndex,e)}}}}},97873:(e,t,r)=>{r.r(t),r.d(t,{addOrUpdateResource:()=>l,contentToBlob:()=>p,fetchResources:()=>a,getSiblingOfSameType:()=>f,getSiblingOfSameTypeI:()=>m,removeAllResources:()=>d,removeResource:()=>u,splitPrefixFileNameAndExtension:()=>h});var i=r(3172),s=r(20102),n=r(70586),o=r(17452);async function a(e,t={},r){await e.load(r);const i=(0,o.v_)(e.itemUrl,"resources"),{start:s=1,num:a=10,sortOrder:l="asc",sortField:u="created"}=t,d={query:{start:s,num:a,sortOrder:l,sortField:u,token:e.apiKey},signal:(0,n.U2)(r,"signal")},c=await e.portal.request(i,d);return{total:c.total,nextStart:c.nextStart,resources:c.resources.map((({created:t,size:r,resource:i})=>({created:new Date(t),size:r,resource:e.resourceFromPath(i)})))}}async function l(e,t,r,i){if(!e.hasPath())throw new s.Z(`portal-item-resource-${t}:invalid-path`,"Resource does not have a valid path");const a=e.portalItem;await a.load(i);const l=(0,o.v_)(a.userItemUrl,"add"===t?"addResources":"updateResources"),[u,d]=c(e.path),h=await p(r),f=new FormData;return u&&"."!==u&&f.append("resourcesPrefix",u),null!=i&&i.compress&&f.append("compress","true"),f.append("fileName",d),f.append("file",h,d),f.append("f","json"),null!=i&&i.access&&f.append("access",i.access),await a.portal.request(l,{method:"post",body:f,signal:(0,n.U2)(i,"signal")}),e}async function u(e,t,r){if(!t.hasPath())throw new s.Z("portal-item-resources-remove:invalid-path","Resource does not have a valid path");await e.load(r);const i=(0,o.v_)(e.userItemUrl,"removeResources");await e.portal.request(i,{method:"post",query:{resource:t.path},signal:(0,n.U2)(r,"signal")}),t.portalItem=null}async function d(e,t){await e.load(t);const r=(0,o.v_)(e.userItemUrl,"removeResources");return e.portal.request(r,{method:"post",query:{deleteAll:!0},signal:(0,n.U2)(t,"signal")})}function c(e){const t=e.lastIndexOf("/");return-1===t?[".",e]:[e.slice(0,t),e.slice(t+1)]}function h(e){const[t,r]=function(e){const t=(0,o.Ml)(e);return null==t?[e,""]:[e.slice(0,e.length-t.length-1),`.${t}`]}(e),[i,s]=c(t);return[i,s,r]}async function p(e){return e instanceof Blob?e:(await(0,i.default)(e.url,{responseType:"blob"})).data}function f(e,t){if(!e.hasPath())return null;const[r,,i]=h(e.path);return e.portalItem.resourceFromPath((0,o.v_)(r,t+i))}function m(e,t){if(!e.hasPath())return null;const[r,,i]=h(e.path);return e.portalItem.resourceFromPath((0,o.v_)(r,t+i))}},32163:(e,t,r)=>{r.d(t,{eZ:()=>c});var i=r(51773),s=r(35671),n=r(84649),o=(r(63801),r(48074),r(38745),r(9190)),a=(r(10214),r(71423),r(44951),r(422)),l=r(63061);const u=["oid","global-id"],d=["oid","global-id","guid"];function c({displayField:e,editFieldsInfo:t,fields:r,objectIdField:l,title:u},d){if(!r)return null;const c=function({editFieldsInfo:e,fields:t,objectIdField:r},i){return function(e,t){const r=e;return t&&(e=e.filter((e=>!t.includes(e.type)))),e===r&&(e=e.slice()),e.sort(f),e}(t??[],i?.ignoreFieldTypes||_).map((t=>new a.Z({fieldName:t.name,isEditable:g(t,e),label:t.alias,format:y(t),visible:p(t,{editFieldsInfo:e,objectIdField:r,visibleFieldNames:i?.visibleFieldNames})})))}({editFieldsInfo:t,fields:r,objectIdField:l},d);if(!c.length)return null;const h=function(e){const t=(0,s.O5)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:u,fields:r,displayField:e}),m=[new o.Z,new n.Z];return new i.Z({title:h,content:m,fieldInfos:c})}const h=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/shape/i,/perimeter/i,/objectid/i,/_i$/i],p=(e,{editFieldsInfo:t,objectIdField:r,visibleFieldNames:i})=>i?i.has(e.name):!(m(e.name,t)||r&&e.name===r||u.includes(e.type)||h.some((t=>t.test(e.name))));function f(e,t){return"oid"===e.type?-1:"oid"===t.type?1:v(e)?-1:v(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function m(e,t){if(!e||!t)return!1;const{creationDateField:r,creatorField:i,editDateField:s,editorField:n}=t;return[r&&r.toLowerCase(),i&&i.toLowerCase(),s&&s.toLowerCase(),n&&n.toLowerCase()].includes(e.toLowerCase())}function g(e,t){return e.editable&&!d.includes(e.type)&&!m(e.name,t)}function y(e){switch(e.type){case"small-integer":case"integer":case"single":return new l.Z({digitSeparator:!0,places:0});case"double":return new l.Z({digitSeparator:!0,places:2});case"date":return new l.Z({dateFormat:"long-month-day-year"});default:return"string"===e.type&&(0,s.Ec)(e.name)?new l.Z({digitSeparator:!0,places:0}):null}}function v(e){return"name"===(e.name&&e.name.toLowerCase())||"name"===(e.alias&&e.alias.toLowerCase())}const _=["geometry","blob","raster","guid","xml"]}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[237,7873],{92835:(e,t,r)=>{r.d(t,{Z:()=>m});var i,s=r(43697),n=r(96674),o=r(70586),a=r(35463),l=r(5600),u=(r(75215),r(67676),r(80442),r(71715)),d=r(52011),c=r(30556);let h=i=class extends n.wq{static get allTime(){return p}static get empty(){return f}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=null!=this.start?this.start.getTime():this.start,r=null!=this.end?this.end.getTime():this.end,i=null!=e.start?e.start.getTime():e.start,s=null!=e.end?e.end.getTime():e.end;return t===i&&r===s}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();const t=(0,o.yw)(this.start,(t=>(0,a.JE)(t,e))),r=(0,o.yw)(this.end,(t=>{const r=(0,a.JE)(t,e);return t.getTime()===r.getTime()?r:(0,a.Nm)(r,1,e)}));return new i({start:t,end:r})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,s=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let o,a;if(s>=t&&s<=r?o=s:t>=s&&t<=n&&(o=t),r>=s&&r<=n?a=r:n>=t&&n<=r&&(a=n),null!=o&&null!=a&&!isNaN(o)&&!isNaN(a)){const e=new i;return e.start=o===-1/0?null:new Date(o),e.end=a===1/0?null:new Date(a),e}return i.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const r=new i,{start:s,end:n}=this;return null!=s&&(r.start=(0,a.Nm)(s,e,t)),null!=n&&(r.end=(0,a.Nm)(n,e,t)),r}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,s._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"end",void 0),(0,s._)([(0,u.r)("end")],h.prototype,"readEnd",null),(0,s._)([(0,c.c)("end")],h.prototype,"writeEnd",null),(0,s._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],h.prototype,"isAllTime",null),(0,s._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],h.prototype,"isEmpty",null),(0,s._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"start",void 0),(0,s._)([(0,u.r)("start")],h.prototype,"readStart",null),(0,s._)([(0,c.c)("start")],h.prototype,"writeStart",null),h=i=(0,s._)([(0,d.j)("esri.TimeExtent")],h);const p=new h,f=new h({start:void 0,end:void 0}),m=h},46791:(e,t,r)=>{r.d(t,{Z:()=>O});var i,s=r(43697),n=r(3894),o=r(32448),a=r(22974),l=r(70586),u=r(71143);!function(e){e[e.ADD=1]="ADD",e[e.REMOVE=2]="REMOVE",e[e.MOVE=4]="MOVE"}(i||(i={}));var d,c=r(1654),h=r(75215),p=r(58971),f=r(5600),m=r(52421),g=r(52011),y=r(10661);const v=new u.Z(class{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}},void 0,(e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1})),_=()=>{};function b(e){return e?e instanceof T?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function w(e){if(e&&e.length)return e[0]}function S(e,t,r,i){const s=Math.min(e.length-r,t.length-i);let n=0;for(;n<s&&e[r+n]===t[i+n];)n++;return n}function C(e,t,r,i){t&&t.forEach(((t,s,n)=>{e.push(t),C(e,r.call(i,t,s,n),r,i)}))}const I=new Set,x=new Set,E=new Set,R=new Map;let A=0,T=d=class extends o.Z.EventedAccessor{static isCollection(e){return null!=e&&e instanceof d}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._timer=null,this._observable=new y.s,this.length=0,this._items=[],Object.defineProperty(this,"uid",{value:A++})}normalizeCtorArgs(e){return e?Array.isArray(e)||e instanceof d?{items:e}:e:{}}destroy(){this._removeAllRaw()}*[Symbol.iterator](){yield*this.items}get items(){return(0,p.it)(this._observable),this._items}set items(e){this._emitBeforeChanges(i.ADD)||(this._splice(0,this.length,b(e)),this._emitAfterChanges(i.ADD))}hasEventListener(e){return"change"===e?this._chgListeners.length>0:this._emitter.hasEventListener(e)}on(e,t){if("change"===e){const e=this._chgListeners,r={removed:!1,callback:t};return e.push(r),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),{remove(){this.remove=_,r.removed=!0,e.splice(e.indexOf(r),1)}}}return this._emitter.on(e,t)}once(e,t){const r=this.on(e,t);return{remove(){r.remove()}}}add(e,t){if((0,p.it)(this._observable),this._emitBeforeChanges(i.ADD))return this;const r=this.getNextIndex(t??null);return this._splice(r,0,[e]),this._emitAfterChanges(i.ADD),this}addMany(e,t=this._items.length){if((0,p.it)(this._observable),!e||!e.length)return this;if(this._emitBeforeChanges(i.ADD))return this;const r=this.getNextIndex(t);return this._splice(r,0,b(e)),this._emitAfterChanges(i.ADD),this}at(e){if((0,p.it)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,p.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return[];const e=this._removeAllRaw();return this._emitAfterChanges(i.REMOVE),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,p.it)(this._observable),this._createNewInstance({items:this._items.map(a.d9)})}concat(...e){(0,p.it)(this._observable);const t=e.map(b);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,p.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const r=(0,l.j0)(this._splice(0,this.length)),s=r.length;for(let i=0;i<s;i++)e.call(t,r[i],i,r);this._emitAfterChanges(i.REMOVE)}every(e,t){return(0,p.it)(this._observable),this._items.every(e,t)}filter(e,t){let r;return(0,p.it)(this._observable),r=2===arguments.length?this._items.filter(e,t):this._items.filter(e),this._createNewInstance({items:r})}find(e,t){return(0,p.it)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,p.it)(this._observable),this._items.findIndex(e,t)}flatten(e,t){(0,p.it)(this._observable);const r=[];return C(r,this,e,t),new d(r)}forEach(e,t){return(0,p.it)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,p.it)(this._observable),this._items[e]}getNextIndex(e){(0,p.it)(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,p.it)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,p.it)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,p.it)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,p.it)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,p.it)(this._observable);const r=this._items.map(e,t);return new d({items:r})}reorder(e,t=this.length-1){(0,p.it)(this._observable);const r=this.indexOf(e);if(-1!==r){if(t<0?t=0:t>=this.length&&(t=this.length-1),r!==t){if(this._emitBeforeChanges(i.MOVE))return e;this._splice(r,1),this._splice(t,0,[e]),this._emitAfterChanges(i.MOVE)}return e}}pop(){if((0,p.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const e=w(this._splice(this.length-1,1));return this._emitAfterChanges(i.REMOVE),e}push(...e){return(0,p.it)(this._observable),this._emitBeforeChanges(i.ADD)||(this._splice(this.length,0,e),this._emitAfterChanges(i.ADD)),this.length}reduce(e,t){(0,p.it)(this._observable);const r=this._items;return 2===arguments.length?r.reduce(e,t):r.reduce(e)}reduceRight(e,t){(0,p.it)(this._observable);const r=this._items;return 2===arguments.length?r.reduceRight(e,t):r.reduceRight(e)}remove(e){return(0,p.it)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,p.it)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(i.REMOVE))return;const t=w(this._splice(e,1));return this._emitAfterChanges(i.REMOVE),t}removeMany(e){if((0,p.it)(this._observable),!e||!e.length||this._emitBeforeChanges(i.REMOVE))return[];const t=e instanceof d?e.toArray():e,r=this._items,s=[],n=t.length;for(let e=0;e<n;e++){const i=t[e],n=r.indexOf(i);if(n>-1){const i=1+S(t,r,e+1,n+1),o=this._splice(n,i);o&&o.length>0&&s.push.apply(s,o),e+=i-1}}return this._emitAfterChanges(i.REMOVE),s}reverse(){if((0,p.it)(this._observable),this._emitBeforeChanges(i.MOVE))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(i.MOVE),this}shift(){if((0,p.it)(this._observable),!this.length||this._emitBeforeChanges(i.REMOVE))return;const e=w(this._splice(0,1));return this._emitAfterChanges(i.REMOVE),e}slice(e=0,t=this.length){return(0,p.it)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,p.it)(this._observable),this._items.some(e,t)}sort(e){if((0,p.it)(this._observable),!this.length||this._emitBeforeChanges(i.MOVE))return this;const t=(0,l.j0)(this._splice(0,this.length));return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(i.MOVE),this}splice(e,t,...r){(0,p.it)(this._observable);const s=(t?i.REMOVE:0)|(r.length?i.ADD:0);if(this._emitBeforeChanges(s))return[];const n=this._splice(e,t,r)||[];return this._emitAfterChanges(s),n}toArray(){return(0,p.it)(this._observable),this._items.slice()}toJSON(){return(0,p.it)(this._observable),this.toArray()}toLocaleString(){return(0,p.it)(this._observable),this._items.toLocaleString()}toString(){return(0,p.it)(this._observable),this._items.toString()}unshift(...e){return(0,p.it)(this._observable),!e.length||this._emitBeforeChanges(i.ADD)||(this._splice(0,0,e),this._emitAfterChanges(i.ADD)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,r){const i=this._items,s=this.itemType;let n,o;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._timer=(0,c.Os)((()=>this._dispatchChange()))),t){if(o=i.splice(e,t),this.hasEventListener("before-remove")){const t=v.acquire();t.target=this,t.cancellable=!0;for(let r=0,s=o.length;r<s;r++)n=o[r],t.reset(n),this.emit("before-remove",t),t.defaultPrevented&&(o.splice(r,1),i.splice(e,0,n),e+=1,r-=1,s-=1);v.release(t)}if(this.length=this._items.length,this.hasEventListener("after-remove")){const e=v.acquire();e.target=this,e.cancellable=!1;const t=o.length;for(let r=0;r<t;r++)e.reset(o[r]),this.emit("after-remove",e);v.release(e)}}if(r&&r.length){if(s){const e=[];for(const t of r){const r=s.ensureType(t);null==r&&null!=t||e.push(r)}r=e}const t=this.hasEventListener("before-add"),n=this.hasEventListener("after-add"),o=e===this.length;if(t||n){const s=v.acquire();s.target=this,s.cancellable=!0;const a=v.acquire();a.target=this,a.cancellable=!1;for(const l of r)t?(s.reset(l),this.emit("before-add",s),s.defaultPrevented||(o?i.push(l):i.splice(e++,0,l),this._set("length",i.length),n&&(a.reset(l),this.emit("after-add",a)))):(o?i.push(l):i.splice(e++,0,l),this._set("length",i.length),a.reset(l),this.emit("after-add",a));v.release(a),v.release(s)}else{if(o)for(const e of r)i.push(e);else i.splice(e,0,...r);this._set("length",i.length)}}return(r&&r.length||o&&o.length)&&this._notifyChangeEvent(r,o),o}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const r=v.acquire();r.target=this,r.cancellable=!0,r.type=e,this.emit("before-changes",r),t=r.defaultPrevented,v.release(r)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=v.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),v.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const e=t.changes;I.clear(),x.clear(),E.clear();for(const{added:t,removed:r}of e){if(t)if(0===E.size&&0===x.size)for(const e of t)I.add(e);else for(const e of t)x.has(e)?(E.add(e),x.delete(e)):E.has(e)||I.add(e);if(r)if(0===E.size&&0===I.size)for(const e of r)x.add(e);else for(const e of r)I.has(e)?I.delete(e):(E.delete(e),x.add(e))}const r=n.Z.acquire();I.forEach((e=>{r.push(e)}));const i=n.Z.acquire();x.forEach((e=>{i.push(e)}));const s=this._items,o=t.items,a=n.Z.acquire();if(E.forEach((e=>{o.indexOf(e)!==s.indexOf(e)&&a.push(e)})),t.listeners&&(r.length||i.length||a.length)){const e={target:this,added:r,removed:i,moved:a},s=t.listeners.length;for(let r=0;r<s;r++){const i=t.listeners[r];i.removed||i.callback.call(this,e)}}n.Z.release(r),n.Z.release(i),n.Z.release(a)}I.clear(),x.clear(),E.clear()}};T.ofType=e=>{if(!e)return d;if(R.has(e))return R.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(const r in e.typeMap){const i=e.typeMap[r].prototype.declaredClass;t?t+=` | ${i}`:t=i}let r=class extends d{};return(0,s._)([(0,m.c)({Type:e,ensureType:"function"==typeof e?(0,h.se)(e):(0,h.N7)(e)})],r.prototype,"itemType",void 0),r=(0,s._)([(0,g.j)(`esri.core.Collection<${t}>`)],r),R.set(e,r),r},(0,s._)([(0,f.Cb)()],T.prototype,"length",void 0),(0,s._)([(0,f.Cb)()],T.prototype,"items",null),T=d=(0,s._)([(0,g.j)("esri.core.Collection")],T);const O=T},52421:(e,t,r)=>{function i(e){return(t,r)=>{t[r]=e}}r.d(t,{c:()=>i})},65845:(e,t,r)=>{r.d(t,{D:()=>s});var i=r(81153);function s(e){e&&e.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,i.l)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},81153:(e,t,r)=>{function i(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{l:()=>i})},35463:(e,t,r)=>{r.d(t,{JE:()=>o,Nm:()=>n,rJ:()=>a}),r(80442);const i={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},s={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function n(e,t,r){const i=new Date(e.getTime());if(t&&r){const e=s[r],{getter:n,setter:o,multiplier:a}=e;if("months"===r){const e=function(e,t){const r=new Date(e,t+1,1);return r.setDate(0),r.getDate()}(i.getFullYear(),i.getMonth()+t);i.getDate()>e&&i.setDate(e)}i[o](i[n]()+t*a)}return i}function o(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function a(e,t,r){return 0===e?0:e*i[t]/i[r]}},41123:(e,t,r)=>{r.d(t,{D:()=>s});const i="randomUUID"in crypto;function s(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}},79235:(e,t,r)=>{r.d(t,{Z:()=>_});var i,s=r(43697),n=r(67676),o=r(35454),a=r(96674),l=r(67900),u=r(20941),d=r(5600),c=(r(75215),r(80442),r(71715)),h=r(52011),p=r(30556);const f=(0,o.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),m=f.jsonValues.slice();(0,n.e$)(m,"orthometric");const g=(0,o.w)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let y=i=class extends a.wq{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return f.write(e,t,r)}readHeightModel(e,t,r){return f.read(e)||(r&&r.messages&&r.messages.push(function(e,t){return new u.Z("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return g.read(e)||(r&&r.messages&&r.messages.push(v(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.$C)(e)||g.read(e)||(r&&r.messages&&r.messages.push(v(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,l.cM)(t);return new i({heightModel:e.heightModel,heightUnit:r,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new u.Z("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s._)([(0,d.Cb)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m,default:"ellipsoidal"}}}})],y.prototype,"heightModel",void 0),(0,s._)([(0,p.c)("web-scene","heightModel")],y.prototype,"writeHeightModel",null),(0,s._)([(0,c.r)(["web-scene","service"],"heightModel")],y.prototype,"readHeightModel",null),(0,s._)([(0,d.Cb)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g.jsonValues,write:g.write}}}})],y.prototype,"heightUnit",void 0),(0,s._)([(0,c.r)("web-scene","heightUnit")],y.prototype,"readHeightUnit",null),(0,s._)([(0,c.r)("service","heightUnit")],y.prototype,"readHeightUnitService",null),(0,s._)([(0,d.Cb)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],y.prototype,"vertCRS",void 0),(0,s._)([(0,c.r)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],y.prototype,"readVertCRS",null),y=i=(0,s._)([(0,h.j)("esri.geometry.HeightModelInfo")],y);const _=y},10608:(e,t,r)=>{r.r(t),r.d(t,{default:()=>W});var i=r(43697),s=r(51773),n=r(3172),o=r(20102),a=r(22974),l=r(92604),u=r(16453),d=r(78286),c=r(95330),h=r(17452),p=r(5600),f=r(75215),m=r(71715),g=r(52011),y=r(30556),v=r(87085),_=r(54295),b=r(17287),w=r(38009),S=r(16859),C=r(72965),I=r(20559),x=r(36030),E=r(96674);r(67676),r(80442);let R=class extends E.wq{constructor(e){super(e),this.field=null,this.type=null}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}};(0,i._)([(0,p.Cb)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],R.prototype,"field",void 0),(0,i._)([(0,p.Cb)({readOnly:!0,nonNullable:!0,json:{read:!1}})],R.prototype,"type",void 0),R=(0,i._)([(0,g.j)("esri.layers.pointCloudFilters.PointCloudFilter")],R);const A=R;var T;let O=T=class extends A{constructor(e){super(e),this.requiredClearBits=null,this.requiredSetBits=null,this.type="bitfield"}clone(){return new T({field:this.field,requiredClearBits:(0,a.d9)(this.requiredClearBits),requiredSetBits:(0,a.d9)(this.requiredSetBits)})}};(0,i._)([(0,p.Cb)({type:[f.z8],json:{write:{enabled:!0,overridePolicy(){return{enabled:!0,isRequired:!this.requiredSetBits}}}}})],O.prototype,"requiredClearBits",void 0),(0,i._)([(0,p.Cb)({type:[f.z8],json:{write:{enabled:!0,overridePolicy(){return{enabled:!0,isRequired:!this.requiredClearBits}}}}})],O.prototype,"requiredSetBits",void 0),(0,i._)([(0,x.J)({pointCloudBitfieldFilter:"bitfield"})],O.prototype,"type",void 0),O=T=(0,i._)([(0,g.j)("esri.layers.pointCloudFilters.PointCloudBitfieldFilter")],O);const F=O;var M;let D=M=class extends A{constructor(e){super(e),this.includedReturns=[],this.type="return"}clone(){return new M({field:this.field,includedReturns:(0,a.d9)(this.includedReturns)})}};(0,i._)([(0,p.Cb)({type:[["firstOfMany","last","lastOfMany","single"]],json:{write:{enabled:!0,isRequired:!0}}})],D.prototype,"includedReturns",void 0),(0,i._)([(0,x.J)({pointCloudReturnFilter:"return"})],D.prototype,"type",void 0),D=M=(0,i._)([(0,g.j)("esri.layers.pointCloudFilters.PointCloudReturnFilter")],D);const j=D;var N;let Z=N=class extends A{constructor(e){super(e),this.mode="exclude",this.type="value",this.values=[]}clone(){return new N({field:this.field,mode:this.mode,values:(0,a.d9)(this.values)})}};(0,i._)([(0,p.Cb)({type:["exclude","include"],json:{write:{enabled:!0,isRequired:!0}}})],Z.prototype,"mode",void 0),(0,i._)([(0,x.J)({pointCloudValueFilter:"value"})],Z.prototype,"type",void 0),(0,i._)([(0,p.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],Z.prototype,"values",void 0),Z=N=(0,i._)([(0,g.j)("esri.layers.pointCloudFilters.PointCloudValueFilter")],Z);const P={key:"type",base:A,typeMap:{value:Z,bitfield:F,return:j}};var V,L=r(21506),q=r(1231),U=r(53518),k=r(11223),B=r(23030),K=r(25848);let $=V=class extends K.Z{constructor(e){super(e),this.type="point-cloud-rgb",this.field=null}clone(){return new V({...this.cloneProperties(),field:(0,a.d9)(this.field)})}};(0,i._)([(0,x.J)({pointCloudRGBRenderer:"point-cloud-rgb"})],$.prototype,"type",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],$.prototype,"field",void 0),$=V=(0,i._)([(0,g.j)("esri.renderers.PointCloudRGBRenderer")],$);const Y=$;var H=r(14008),z=r(46329);const J={key:"type",base:K.Z,typeMap:{"point-cloud-class-breaks":B.Z,"point-cloud-rgb":Y,"point-cloud-stretch":H.Z,"point-cloud-unique-value":z.Z},errorContext:"renderer"};var G=r(32163);const Q=(0,U.v)();let X=class extends((0,I.Vt)((0,b.Y)((0,w.q)((0,S.I)((0,C.M)((0,u.R)((0,_.V)(v.Z)))))))){constructor(...e){super(...e),this.operationalLayerType="PointCloudLayer",this.popupEnabled=!0,this.popupTemplate=null,this.opacity=1,this.filters=[],this.fields=null,this.fieldsIndex=null,this.outFields=null,this.path=null,this.legendEnabled=!0,this.renderer=null,this.type="point-cloud"}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}get defaultPopupTemplate(){return this.attributeStorageInfo?this.createPopupTemplate():null}getFieldDomain(e){const t=this.fieldsIndex.get(e);return t&&t.domain?t.domain:null}readServiceFields(e,t,r){return Array.isArray(e)?e.map((e=>{const t=new q.Z;return"FieldTypeInteger"===e.type&&((e=(0,a.d9)(e)).type="esriFieldTypeInteger"),t.read(e,r),t})):Array.isArray(t.attributeStorageInfo)?t.attributeStorageInfo.map((e=>new q.Z({name:e.name,type:"ELEVATION"===e.name?"double":"integer"}))):null}set elevationInfo(e){this._set("elevationInfo",e),this._validateElevationInfo()}writeRenderer(e,t,r,i){(0,d.RB)("layerDefinition.drawingInfo.renderer",e.write({},i),t)}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(c.r9).then((()=>this._fetchService(t)));return this.addResolvingPromise(r),Promise.resolve(this)}createPopupTemplate(e){const t=(0,G.eZ)(this,e);return t&&(this._formatPopupTemplateReturnsField(t),this._formatPopupTemplateRGBField(t)),t}_formatPopupTemplateReturnsField(e){const t=this.fieldsIndex.get("RETURNS");if(!t)return;const r=e.fieldInfos?.find((e=>e.fieldName===t.name));if(!r)return;const i=new k.Z({name:"pcl-returns-decoded",title:t.alias||t.name,expression:`\n var returnValue = $feature.${t.name};\n return (returnValue % 16) + " / " + Floor(returnValue / 16);\n `});e.expressionInfos=[...e.expressionInfos||[],i],r.fieldName="expression/pcl-returns-decoded"}_formatPopupTemplateRGBField(e){const t=this.fieldsIndex.get("RGB");if(!t)return;const r=e.fieldInfos?.find((e=>e.fieldName===t.name));if(!r)return;const i=new k.Z({name:"pcl-rgb-decoded",title:t.alias||t.name,expression:`\n var rgb = $feature.${t.name};\n var red = Floor(rgb / 65536, 0);\n var green = Floor((rgb - (red * 65536)) / 256,0);\n var blue = rgb - (red * 65536) - (green * 256);\n\n return "rgb(" + red + "," + green + "," + blue + ")";\n `});e.expressionInfos=[...e.expressionInfos||[],i],r.fieldName="expression/pcl-rgb-decoded"}async queryCachedStatistics(e,t){if(await this.load(t),!this.attributeStorageInfo)throw new o.Z("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const r=this.fieldsIndex.get(e);if(!r)throw new o.Z("pointcloudlayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const e of this.attributeStorageInfo)if(e.name===r.name){const r=(0,h.v_)(this.parsedUrl.path,`./statistics/${e.key}`);return(0,n.default)(r,{query:{f:"json",token:this.apiKey},responseType:"json",signal:t?t.signal:null}).then((e=>e.data))}throw new o.Z("pointcloudlayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(I.xp.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"point-cloud"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"point-cloud"};return this._debouncedSaveOperations(I.xp.SAVE,e)}validateLayer(e){if(e.layerType&&"PointCloud"!==e.layerType)throw new o.Z("pointcloudlayer:layer-type-not-supported","PointCloudLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new o.Z("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x-2.x"});if(this.version.major>2)throw new o.Z("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x-2.x"})}hasCachedStatistics(e){return null!=this.attributeStorageInfo&&this.attributeStorageInfo.some((t=>t.name===e))}_getTypeKeywords(){return["PointCloud"]}_validateElevationInfo(){const e=this.elevationInfo;e&&("absolute-height"!==e.mode&&l.Z.getLogger(this.declaredClass).warn(".elevationInfo=","Point cloud layers only support absolute-height elevation mode"),e.featureExpressionInfo&&"0"!==e.featureExpressionInfo.expression&&l.Z.getLogger(this.declaredClass).warn(".elevationInfo=","Point cloud layers do not support featureExpressionInfo"))}};(0,i._)([(0,p.Cb)({type:["PointCloudLayer"]})],X.prototype,"operationalLayerType",void 0),(0,i._)([(0,p.Cb)(L.C_)],X.prototype,"popupEnabled",void 0),(0,i._)([(0,p.Cb)({type:s.Z,json:{name:"popupInfo",write:!0}})],X.prototype,"popupTemplate",void 0),(0,i._)([(0,p.Cb)({readOnly:!0,json:{read:!1}})],X.prototype,"defaultPopupTemplate",null),(0,i._)([(0,p.Cb)({readOnly:!0,json:{write:!1,read:!1,origins:{"web-document":{write:!1,read:!1}}}})],X.prototype,"opacity",void 0),(0,i._)([(0,p.Cb)({type:["show","hide"]})],X.prototype,"listMode",void 0),(0,i._)([(0,p.Cb)({types:[P],json:{origins:{service:{read:{source:"filters"}}},name:"layerDefinition.filters",write:!0}})],X.prototype,"filters",void 0),(0,i._)([(0,p.Cb)({type:[q.Z]})],X.prototype,"fields",void 0),(0,i._)([(0,p.Cb)(Q.fieldsIndex)],X.prototype,"fieldsIndex",void 0),(0,i._)([(0,m.r)("service","fields",["fields","attributeStorageInfo"])],X.prototype,"readServiceFields",null),(0,i._)([(0,p.Cb)(Q.outFields)],X.prototype,"outFields",void 0),(0,i._)([(0,p.Cb)({readOnly:!0})],X.prototype,"attributeStorageInfo",void 0),(0,i._)([(0,p.Cb)(L.PV)],X.prototype,"elevationInfo",null),(0,i._)([(0,p.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],X.prototype,"path",void 0),(0,i._)([(0,p.Cb)(L.rn)],X.prototype,"legendEnabled",void 0),(0,i._)([(0,p.Cb)({types:J,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:{target:{"layerDefinition.drawingInfo.renderer":{types:J},"layerDefinition.drawingInfo.transparency":{type:Number}}}}})],X.prototype,"renderer",void 0),(0,i._)([(0,y.c)("renderer")],X.prototype,"writeRenderer",null),(0,i._)([(0,p.Cb)({json:{read:!1},readOnly:!0})],X.prototype,"type",void 0),X=(0,i._)([(0,g.j)("esri.layers.PointCloudLayer")],X);const W=X},54295:(e,t,r)=>{r.d(t,{V:()=>o});var i=r(43697),s=r(5600),n=(r(75215),r(67676),r(80442),r(52011));const o=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,s.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,n.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>l});var i=r(43697),s=r(92604),n=r(5600),o=(r(75215),r(67676),r(80442),r(52011)),a=r(66677);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.Qc)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Nm)(e,s.Z.getLogger(this.declaredClass)))}};return(0,i._)([(0,n.Cb)()],t.prototype,"title",null),(0,i._)([(0,n.Cb)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,o.j)("esri.layers.mixins.ArcGISService")],t),t}},72965:(e,t,r)=>{r.d(t,{M:()=>o});var i=r(43697),s=r(5600),n=(r(75215),r(67676),r(80442),r(52011));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,i._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,i._)([(0,s.Cb)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,i._)([(0,n.j)("esri.layers.mixins.ScaleRangeLayer")],t),t}},20559:(e,t,r)=>{r.d(t,{xp:()=>V,Vt:()=>M});var i=r(43697),s=r(3172),n=r(20102),o=r(92604),a=r(95330),l=r(17452),u=r(5600),d=(r(75215),r(67676),r(80442),r(71715)),c=r(52011),h=r(30556),p=r(65845),f=r(6570),m=r(79235),g=r(82971),y=r(66677),v=r(21506),_=r(61064);let b=null;function w(){return b}var S=r(65587),C=r(15235),I=r(66643),x=r(41123),E=r(97873);async function R(e,t,r){if(!t||!t.resources)return;const i=t.portalItem===e.portalItem?new Set(e.paths):new Set;e.paths.length=0,e.portalItem=t.portalItem;const s=new Set(t.resources.toKeep.map((e=>e.resource.path))),o=new Set,l=[];s.forEach((t=>{i.delete(t),e.paths.push(t)}));for(const n of t.resources.toUpdate)if(i.delete(n.resource.path),s.has(n.resource.path)||o.has(n.resource.path)){const{resource:t,content:i,finish:s,error:o}=n,a=(0,E.getSiblingOfSameTypeI)(t,(0,x.D)());e.paths.push(a.path),l.push(A({resource:a,content:i,compress:n.compress,finish:s,error:o},r))}else e.paths.push(n.resource.path),l.push(T(n,r)),o.add(n.resource.path);for(const i of t.resources.toAdd)l.push(A(i,r)),e.paths.push(i.resource.path);if(i.forEach((e=>{if(t.portalItem){const r=t.portalItem.resourceFromPath(e);l.push(r.portalItem.removeResource(r).catch((()=>{})))}})),0===l.length)return;const u=await(0,a.as)(l);(0,a.k_)(r);const d=u.filter((e=>"error"in e)).map((e=>e.error));if(d.length>0)throw new n.Z("save:resources","Failed to save one or more resources",{errors:d})}async function A(e,t){const r={...null!=t?t:{},compress:e.compress},i=await(0,I.q6)(e.resource.portalItem.addResource(e.resource,e.content,r));if(!0!==i.ok)throw e.error?.(i.error),i.error;e.finish?.(e.resource)}async function T(e,t){const r=await(0,I.q6)(e.resource.update(e.content,t));if(!0!==r.ok)throw e.error?.(r.error),r.error;e.finish?.(e.resource)}const O="esri.layers.mixins.SceneService",F=o.Z.getLogger(O),M=e=>{let t=class extends e{constructor(){super(...arguments),this.spatialReference=null,this.fullExtent=null,this.heightModelInfo=null,this.minScale=0,this.maxScale=0,this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.copyright=null,this.sublayerTitleMode="item-title",this.title=null,this.layerId=null,this.indexInfo=null,this._debouncedSaveOperations=(0,a.Ds)((async(e,t,r)=>{switch(e){case V.SAVE:return this._save(t);case V.SAVE_AS:return this._saveAs(r,t)}}))}readSpatialReference(e,t){return this._readSpatialReference(t)}_readSpatialReference(e){if(null!=e.spatialReference)return g.Z.fromJSON(e.spatialReference);{const t=e.store,r=t.indexCRS||t.geographicCRS,i=r&&parseInt(r.substring(r.lastIndexOf("/")+1,r.length),10);return null!=i?new g.Z(i):null}}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const i=null==e.spatialReference?{...e,spatialReference:this._readSpatialReference(t)}:e;return f.Z.fromJSON(i,r)}const i=t.store,s=this._readSpatialReference(t);return null==s||null==i||null==i.extent||!Array.isArray(i.extent)||i.extent.some((e=>e<D))?null:new f.Z({xmin:i.extent[0],ymin:i.extent[1],xmax:i.extent[2],ymax:i.extent[3],spatialReference:s})}parseVersionString(e){const t={major:Number.NaN,minor:Number.NaN,versionString:e},r=e.split(".");return r.length>=2&&(t.major=parseInt(r[0],10),t.minor=parseInt(r[1],10)),t}readVersion(e,t){const r=t.store,i=null!=r.version?r.version.toString():"";return this.parseVersionString(i)}readTitlePortalItem(e){return"item-title"!==this.sublayerTitleMode?void 0:e}readTitleService(e,t){const r=this.portalItem&&this.portalItem.title;if("item-title"===this.sublayerTitleMode)return(0,y.a7)(this.url,t.name);let i=t.name;if(!i&&this.url){const e=(0,y.Qc)(this.url);null!=e&&(i=e.title)}return"item-title-and-service-name"===this.sublayerTitleMode&&r&&(i=r+" - "+i),(0,y.ld)(i)}set url(e){const t=(0,y.XG)({layer:this,url:e,nonStandardUrlAllowed:!1,logger:F});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,r,i){(0,y.wH)(this,e,"layers",t,i)}get parsedUrl(){const e=this._get("url"),t=(0,l.mN)(e);return null!=this.layerId&&(t.path=`${t.path}/layers/${this.layerId}`),t}async _fetchIndexAndUpdateExtent(e,t){this.indexInfo=(0,_.T)(this.parsedUrl.path,this.rootNode,e,this.apiKey,F,t),null==this.fullExtent||this.fullExtent.hasZ||this._updateExtent(await this.indexInfo)}_updateExtent(e){if("page"===e?.type){const t=e.rootIndex%e.pageSize,r=e.rootPage?.nodes?.[t];if(null==r||null==r.obb||null==r.obb.center||null==r.obb.halfSize)throw new n.Z("sceneservice:invalid-node-page","Invalid node page.");if(r.obb.center[0]<D||null==this.fullExtent||this.fullExtent.hasZ)return;const i=r.obb.halfSize,s=r.obb.center[2],o=Math.sqrt(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]);this.fullExtent.zmin=s-o,this.fullExtent.zmax=s+o}else if("node"===e?.type){const t=e.rootNode?.mbs;if(!Array.isArray(t)||4!==t.length||t[0]<D)return;const r=t[2],i=t[3],{fullExtent:s}=this;s&&(s.zmin=r-i,s.zmax=r+i)}}async _fetchService(e){if(null==this.url)throw new n.Z("sceneservice:url-not-set","Scene service can not be loaded without valid portal item or url");if(null==this.layerId&&/SceneServer\/*$/i.test(this.url)){const t=await this._fetchFirstLayerId(e);null!=t&&(this.layerId=t)}return this._fetchServiceLayer(e)}async _fetchFirstLayerId(e){const t=await(0,s.default)(this.url,{query:{f:"json",token:this.apiKey},responseType:"json",signal:e});if(t.data&&Array.isArray(t.data.layers)&&t.data.layers.length>0)return t.data.layers[0].id}async _fetchServiceLayer(e){const t=await(0,s.default)(this.parsedUrl?.path??"",{query:{f:"json",token:this.apiKey},responseType:"json",signal:e});t.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));let r=!1;if(t.data.layerType&&"Voxel"===t.data.layerType&&(r=!0),r)return this._fetchVoxelServiceLayer();const i=t.data;this.read(i,this._getServiceContext()),this.validateLayer(i)}async _fetchVoxelServiceLayer(e){const t=(await(0,s.default)(this.parsedUrl?.path+"/layer",{query:{f:"json",token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,this._getServiceContext()),this.validateLayer(t)}_getServiceContext(){return{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl}}async _ensureLoadBeforeSave(){await this.load(),"beforeSave"in this&&"function"==typeof this.beforeSave&&await this.beforeSave()}validateLayer(e){}_updateTypeKeywords(e,t,r){e.typeKeywords||(e.typeKeywords=[]);const i=t.getTypeKeywords();for(const t of i)e.typeKeywords.push(t);e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)),r===j.newItem&&(e.typeKeywords=e.typeKeywords.filter((e=>"Hosted Service"!==e))))}async _saveAs(e,t){const r={...P,...t};let i=C.default.from(e);i||(F.error("_saveAs(): requires a portal item parameter"),await Promise.reject(new n.Z("sceneservice:portal-item-required","_saveAs() requires a portal item to save to"))),i.id&&(i=i.clone(),i.id=null);const s=i.portal||S.Z.getDefault();await this._ensureLoadBeforeSave(),i.type=Z,i.portal=s;const o={origin:"portal-item",url:null,messages:[],portal:s,portalItem:i,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}},a={layers:[this.write({},o)]};return await Promise.all(o.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(a,o,r),i.url=this.url,i.title||(i.title=this.title),this._updateTypeKeywords(i,r,j.newItem),await s.signIn(),await(s.user?.addItem({item:i,folder:r&&r.folder,data:a})),await R(this.resourceReferences,o,null),this.portalItem=i,(0,p.D)(o),o.portalItem=i,i}async _save(e){const t={...P,...e};if(!this.portalItem)throw F.error("_save(): requires the .portalItem property to be set"),new n.Z("sceneservice:portal-item-not-set","Portal item to save to has not been set on this SceneService");if(this.portalItem.type!==Z)throw F.error("_save(): Non-matching portal item type. Got "+this.portalItem.type+", expected "+Z),new n.Z("sceneservice:portal-item-wrong-type",`Portal item needs to have type "${Z}"`);await this._ensureLoadBeforeSave();const r={origin:"portal-item",url:this.portalItem.itemUrl&&(0,l.mN)(this.portalItem.itemUrl),messages:[],portal:this.portalItem.portal||S.Z.getDefault(),portalItem:this.portalItem,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}},i={layers:[this.write({},r)]};return await Promise.all(r.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(i,r,t),this.portalItem.url=this.url,this.portalItem.title||(this.portalItem.title=this.title),this._updateTypeKeywords(this.portalItem,t,j.existingItem),await this.portalItem.update({data:i}),await R(this.resourceReferences,r,null),(0,p.D)(r),this.portalItem}async _validateAgainstJSONSchema(e,t,r){let i=t.messages?.filter((e=>"error"===e.type)).map((e=>new n.Z(e.name,e.message,e.details)))??[];r?.validationOptions?.ignoreUnsupported&&(i=i.filter((e=>"layer:unsupported"!==e.name&&"symbol:unsupported"!==e.name&&"symbol-layer:unsupported"!==e.name&&"property:unsupported"!==e.name&&"url:unsupported"!==e.name&&"scenemodification:unsupported"!==e.name)));const s=r?.validationOptions,o=s?.enabled,a=w();if(o&&a){const t=(await a()).validate(e,r.portalItemLayerType);if(t.length>0){const e=`Layer item did not validate:\n${t.join("\n")}`;if(F.error(`_validateAgainstJSONSchema(): ${e}`),"throw"===s.failPolicy){const e=t.map((e=>new n.Z("sceneservice:schema-validation",e))).concat(i);throw new n.Z("sceneservice-validate:error","Failed to save layer item due to schema validation, see `details.errors`.",{combined:e})}}}if(i.length>0)throw new n.Z("sceneservice:save","Failed to save SceneService due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:i})}};return(0,i._)([(0,u.Cb)(v.id)],t.prototype,"id",void 0),(0,i._)([(0,u.Cb)({type:g.Z})],t.prototype,"spatialReference",void 0),(0,i._)([(0,d.r)("spatialReference",["spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readSpatialReference",null),(0,i._)([(0,u.Cb)({type:f.Z})],t.prototype,"fullExtent",void 0),(0,i._)([(0,d.r)("fullExtent",["fullExtent","store.extent","spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readFullExtent",null),(0,i._)([(0,u.Cb)({readOnly:!0,type:m.Z})],t.prototype,"heightModelInfo",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:{source:"minScale"},write:!1}}}})],t.prototype,"minScale",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:{source:"maxScale"},write:!1}}}})],t.prototype,"maxScale",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,i._)([(0,d.r)("version",["store.version"])],t.prototype,"readVersion",null),(0,i._)([(0,u.Cb)({type:String,json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,u.Cb)({type:String,json:{read:!1}})],t.prototype,"sublayerTitleMode",void 0),(0,i._)([(0,u.Cb)({type:String})],t.prototype,"title",void 0),(0,i._)([(0,d.r)("portal-item","title")],t.prototype,"readTitlePortalItem",null),(0,i._)([(0,d.r)("service","title",["name"])],t.prototype,"readTitleService",null),(0,i._)([(0,u.Cb)({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{write:{target:"id",isRequired:!0,ignoreOrigin:!0},read:!1}}}})],t.prototype,"layerId",void 0),(0,i._)([(0,u.Cb)(v.HQ)],t.prototype,"url",null),(0,i._)([(0,h.c)("url")],t.prototype,"writeUrl",null),(0,i._)([(0,u.Cb)()],t.prototype,"parsedUrl",null),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"store",void 0),(0,i._)([(0,u.Cb)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],t.prototype,"rootNode",void 0),t=(0,i._)([(0,c.j)(O)],t),t},D=-1e38;var j,N;(N=j||(j={}))[N.existingItem=0]="existingItem",N[N.newItem=1]="newItem";const Z="Scene Service",P={getTypeKeywords:()=>[],portalItemLayerType:"unknown",validationOptions:{enabled:!0,ignoreUnsupported:!1,failPolicy:"throw"}};var V;!function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(V||(V={}))},61064:(e,t,r)=>{r.d(t,{T:()=>n});var i=r(3172),s=r(20102);async function n(e,t,r,n,o,a){let l=null;if(null!=r){const t=`${e}/nodepages/`,s=t+Math.floor(r.rootIndex/r.nodesPerPage);try{return{type:"page",rootPage:(await(0,i.default)(s,{query:{f:"json",token:n},responseType:"json",signal:a})).data,rootIndex:r.rootIndex,pageSize:r.nodesPerPage,lodMetric:r.lodSelectionMetricType,urlPrefix:t}}catch(e){null!=o&&o.warn("#fetchIndexInfo()","Failed to load root node page. Falling back to node documents.",s,e),l=e}}if(!t)return null;const u=`${e}/nodes/`,d=u+(t&&t.split("/").pop());try{return{type:"node",rootNode:(await(0,i.default)(d,{query:{f:"json",token:n},responseType:"json",signal:a})).data,urlPrefix:u}}catch(e){throw new s.Z("sceneservice:root-node-missing","Root node missing.",{pageError:l,nodeError:e,url:d})}}},53518:(e,t,r)=>{r.d(t,{v:()=>a});var i=r(92604),s=r(1231),n=r(99514),o=r(35671);function a(){return{fields:{type:[s.Z],value:null},fieldsIndex:{readOnly:!0,get(){return new n.Z(this.fields||[])}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e||!e.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||i.Z.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,o.Q0)(this.fieldsIndex,e)}}}}},97873:(e,t,r)=>{r.r(t),r.d(t,{addOrUpdateResource:()=>a,contentToBlob:()=>h,fetchResources:()=>o,getSiblingOfSameType:()=>p,getSiblingOfSameTypeI:()=>f,removeAllResources:()=>u,removeResource:()=>l,splitPrefixFileNameAndExtension:()=>c});var i=r(3172),s=r(20102),n=r(17452);async function o(e,t={},r){await e.load(r);const i=(0,n.v_)(e.itemUrl,"resources"),{start:s=1,num:o=10,sortOrder:a="asc",sortField:l="created"}=t,u={query:{start:s,num:o,sortOrder:a,sortField:l,token:e.apiKey},signal:r?.signal},d=await e.portal.request(i,u);return{total:d.total,nextStart:d.nextStart,resources:d.resources.map((({created:t,size:r,resource:i})=>({created:new Date(t),size:r,resource:e.resourceFromPath(i)})))}}async function a(e,t,r,i){if(!e.hasPath())throw new s.Z(`portal-item-resource-${t}:invalid-path`,"Resource does not have a valid path");const o=e.portalItem;await o.load(i);const a=(0,n.v_)(o.userItemUrl,"add"===t?"addResources":"updateResources"),[l,u]=d(e.path),c=await h(r),p=new FormData;return l&&"."!==l&&p.append("resourcesPrefix",l),null!=i&&i.compress&&p.append("compress","true"),p.append("fileName",u),p.append("file",c,u),p.append("f","json"),null!=i&&i.access&&p.append("access",i.access),await o.portal.request(a,{method:"post",body:p,signal:i?.signal}),e}async function l(e,t,r){if(!t.hasPath())throw new s.Z("portal-item-resources-remove:invalid-path","Resource does not have a valid path");await e.load(r);const i=(0,n.v_)(e.userItemUrl,"removeResources");await e.portal.request(i,{method:"post",query:{resource:t.path},signal:r?.signal}),t.portalItem=null}async function u(e,t){await e.load(t);const r=(0,n.v_)(e.userItemUrl,"removeResources");return e.portal.request(r,{method:"post",query:{deleteAll:!0},signal:t?.signal})}function d(e){const t=e.lastIndexOf("/");return-1===t?[".",e]:[e.slice(0,t),e.slice(t+1)]}function c(e){const[t,r]=function(e){const t=(0,n.Ml)(e);return null==t?[e,""]:[e.slice(0,e.length-t.length-1),`.${t}`]}(e),[i,s]=d(t);return[i,s,r]}async function h(e){return e instanceof Blob?e:(await(0,i.default)(e.url,{responseType:"blob"})).data}function p(e,t){if(!e.hasPath())return null;const[r,,i]=c(e.path);return e.portalItem.resourceFromPath((0,n.v_)(r,t+i))}function f(e,t){if(!e.hasPath())return null;const[r,,i]=c(e.path);return e.portalItem.resourceFromPath((0,n.v_)(r,t+i))}},32163:(e,t,r)=>{r.d(t,{eZ:()=>c});var i=r(51773),s=r(35671),n=r(84649),o=(r(63801),r(48074),r(38745),r(9190)),a=(r(10214),r(71423),r(44951),r(422)),l=r(63061);const u=["oid","global-id"],d=["oid","global-id","guid"];function c({displayField:e,editFieldsInfo:t,fields:r,objectIdField:l,title:u},d){if(!r)return null;const c=function({editFieldsInfo:e,fields:t,objectIdField:r},i){return function(e,t){const r=e;return t&&(e=e.filter((e=>!t.includes(e.type)))),e===r&&(e=e.slice()),e.sort(f),e}(t??[],i?.ignoreFieldTypes||_).map((t=>new a.Z({fieldName:t.name,isEditable:g(t,e),label:t.alias,format:y(t),visible:p(t,{editFieldsInfo:e,objectIdField:r,visibleFieldNames:i?.visibleFieldNames})})))}({editFieldsInfo:t,fields:r,objectIdField:l},d);if(!c.length)return null;const h=function(e){const t=(0,s.O5)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:u,fields:r,displayField:e}),m=[new o.Z,new n.Z];return new i.Z({title:h,content:m,fieldInfos:c})}const h=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/shape/i,/perimeter/i,/objectid/i,/_i$/i],p=(e,{editFieldsInfo:t,objectIdField:r,visibleFieldNames:i})=>i?i.has(e.name):!(m(e.name,t)||r&&e.name===r||u.includes(e.type)||h.some((t=>t.test(e.name))));function f(e,t){return"oid"===e.type?-1:"oid"===t.type?1:v(e)?-1:v(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function m(e,t){if(!e||!t)return!1;const{creationDateField:r,creatorField:i,editDateField:s,editorField:n}=t;return[r&&r.toLowerCase(),i&&i.toLowerCase(),s&&s.toLowerCase(),n&&n.toLowerCase()].includes(e.toLowerCase())}function g(e,t){return e.editable&&!d.includes(e.type)&&!m(e.name,t)}function y(e){switch(e.type){case"small-integer":case"integer":case"single":return new l.Z({digitSeparator:!0,places:0});case"double":return new l.Z({digitSeparator:!0,places:2});case"date":return new l.Z({dateFormat:"long-month-day-year"});default:return"string"===e.type&&(0,s.Ec)(e.name)?new l.Z({digitSeparator:!0,places:0}):null}}function v(e){return"name"===(e.name&&e.name.toLowerCase())||"name"===(e.alias&&e.alias.toLowerCase())}const _=["geometry","blob","raster","guid","xml"]}}]);
|