@arcgis/core 4.34.0-next.61 → 4.34.0-next.64
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/AggregateGraphic.js +1 -1
- package/Graphic.js +1 -1
- package/TrackGraphic.js +1 -1
- package/analysis/VolumeMeasurement/VolumeMeasurementCutFillOptions.js +1 -1
- package/analysis/VolumeMeasurementAnalysis.js +1 -1
- package/applications/Components/actionUtils.d.ts +3 -0
- package/applications/Components/actionUtils.js +5 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{5de7c2a80bd9c81cefe2.js → 070b29cba896f46537f9.js} +1 -1
- package/assets/esri/core/workers/chunks/{8c0e11f781607239749d.js → 0a36df6fdab95785d1ce.js} +1 -1
- package/assets/esri/core/workers/chunks/0b01c87db77246632ad9.js +1 -0
- package/assets/esri/core/workers/chunks/0b24a6c06d1becbb6815.js +1 -0
- package/assets/esri/core/workers/chunks/0cdf6b51f2a63f348530.js +1 -0
- package/assets/esri/core/workers/chunks/10ec10ca361842efce92.js +1 -0
- package/assets/esri/core/workers/chunks/{bdc18ef9cdc8242f014e.js → 1143313f2f6f34deaad7.js} +1 -1
- package/assets/esri/core/workers/chunks/226833d408eb1225e168.js +1 -0
- package/assets/esri/core/workers/chunks/2394ac65d64e50399d76.js +1 -0
- package/assets/esri/core/workers/chunks/33718ea851645d9078d1.js +1 -0
- package/assets/esri/core/workers/chunks/{69fbe363bb130fdd8146.js → 3d6f07e04f77cc0a7506.js} +1 -1
- package/assets/esri/core/workers/chunks/{db7678104b18534482e3.js → 426232091caf8608e5f1.js} +1 -1
- package/assets/esri/core/workers/chunks/47febd4de836a33b51b1.js +1 -0
- package/assets/esri/core/workers/chunks/487afbf352d12c745430.js +1 -0
- package/assets/esri/core/workers/chunks/{3fd09a7c05583a57a317.js → 5d12862042b6bf9f9d54.js} +1 -1
- package/assets/esri/core/workers/chunks/5d65987f2c1b5c56a799.js +1 -0
- package/assets/esri/core/workers/chunks/5de07f7a09eb9f3ab666.js +1 -0
- package/assets/esri/core/workers/chunks/{ba0c7339fa19cc7cbde7.js → 5e1d6704ee0aa41b1d06.js} +1 -1
- package/assets/esri/core/workers/chunks/{4ac127cefa3aa5e93e78.js → 657b01a6df8dc46c5209.js} +1 -1
- package/assets/esri/core/workers/chunks/{71b222089f5e9dcee474.js → 6a1b652ccbf58ac44658.js} +1 -1
- package/assets/esri/core/workers/chunks/{4050ddb580d364d9e205.js → 6ab435423acb0ed0b1c7.js} +1 -1
- package/assets/esri/core/workers/chunks/7b7f5028a488bb9c10f4.js +1 -0
- package/assets/esri/core/workers/chunks/{d83bdc13c3cad3eee7be.js → 7c3a1958990de095d3a1.js} +1 -1
- package/assets/esri/core/workers/chunks/808cfed7022e3846d5b2.js +1 -0
- package/assets/esri/core/workers/chunks/{b68b54be3d67595a9446.js → 861a6d6fe7958df36aa1.js} +35 -34
- package/assets/esri/core/workers/chunks/8bd5a0ff7dcf1067bf53.js +1 -0
- package/assets/esri/core/workers/chunks/{f462a138912e5379b6a7.js → 904c116c6b093e0e970c.js} +1 -1
- package/assets/esri/core/workers/chunks/99b20eef2893047fac10.js +1 -0
- package/assets/esri/core/workers/chunks/a16b471c3706ee37f9b6.js +1 -0
- package/assets/esri/core/workers/chunks/{bb2ab663e3e5597f2104.js → a1bd4eecca1e3272bffb.js} +1 -1
- package/assets/esri/core/workers/chunks/{8005ae652361f506bc5f.js → a29fb90226bd08157bd1.js} +1 -1
- package/assets/esri/core/workers/chunks/a596d6ccb6103e594031.js +1 -0
- package/assets/esri/core/workers/chunks/a5e6359fadbd699b1c8e.js +1 -0
- package/assets/esri/core/workers/chunks/a7f3cdd9a249ef4572ce.js +1 -0
- package/assets/esri/core/workers/chunks/{d2bdd52d2291306a4e47.js → a80d769b0ed025f0df64.js} +1 -1
- package/assets/esri/core/workers/chunks/a987731d1b5449d8fb0c.js +1 -0
- package/assets/esri/core/workers/chunks/af83dddddbfe25194527.js +1 -0
- package/assets/esri/core/workers/chunks/{4d8d942fbd6750bb7567.js → b057e6d593c1607cae61.js} +1 -1
- package/assets/esri/core/workers/chunks/{d707538b150d79050336.js → b1f1a26e7a2ef5b783ee.js} +1 -1
- package/assets/esri/core/workers/chunks/c337c1a2dbc452780dd7.js +1 -0
- package/assets/esri/core/workers/chunks/{a35a439f053d1fe0541b.js → c601bbdafdee5074b04f.js} +1 -1
- package/assets/esri/core/workers/chunks/{d7ce68667bb355ef8e5d.js → c7a386ac90e58eb71935.js} +1 -1
- package/assets/esri/core/workers/chunks/c8694a27e2cf28b010e8.js +1 -0
- package/assets/esri/core/workers/chunks/cf69f6afeaf1229e032c.js +1 -0
- package/assets/esri/core/workers/chunks/d1e8220dcae1d01d3c35.js +1 -0
- package/assets/esri/core/workers/chunks/e12e8d69c05c182b6a69.js +1 -0
- package/assets/esri/core/workers/chunks/{220c8d6338f236298720.js → e6457ac25c0829ee039c.js} +1 -1
- package/assets/esri/core/workers/chunks/{c77a97c723b8c17df186.js → e72aee3f857aa473822c.js} +1 -1
- package/assets/esri/core/workers/chunks/{8374d87176486c1fc90e.js → eadac757f74470b89a36.js} +1 -1
- package/assets/esri/core/workers/chunks/f542bdc994a5ea3aa9d1.js +1 -0
- package/assets/esri/core/workers/chunks/{7c23be93d394f1bee941.js → f6107f844f4feed42828.js} +1 -1
- package/assets/esri/core/workers/chunks/f76774781865cb1411b0.js +1 -0
- package/assets/esri/core/workers/chunks/fd04df45cdcc6ff52554.js +1 -0
- package/assets/esri/layers/support/rasterFormats/qb3-wasm.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/assets/esri/libs/vxl/vxlLayer.wasm +0 -0
- package/chunks/BloomComposition.glsl.js +6 -5
- package/chunks/Fog.glsl.js +20 -13
- package/chunks/GaussianSplat.glsl.js +7 -0
- package/chunks/GaussianSplatComposition.glsl.js +7 -0
- package/chunks/GaussianSplatDepthComposition.glsl.js +11 -0
- package/chunks/RealisticTree.glsl.js +29 -28
- package/chunks/lyr3DMain.js +1 -1
- package/chunks/lyr3DWorker.js +1 -1
- package/chunks/qb3-wasm.js +5 -0
- package/chunks/vxlLayer.js +1 -1
- package/config.js +1 -1
- package/core/Collection.js +1 -1
- package/core/has.js +1 -1
- package/geometry/ellipsoidUtils.js +1 -1
- package/geometry/operators/geodeticUtilsOperator.d.ts +6 -0
- package/geometry/support/heightModelInfoUtils.js +1 -1
- package/graphic/AggregateGraphicOrigin.js +5 -0
- package/graphic/CSVGraphicOrigin.js +1 -1
- package/graphic/CatalogGraphicOrigin.js +1 -1
- package/graphic/FeatureGraphicOrigin.js +1 -1
- package/graphic/GeoJSONGraphicOrigin.js +1 -1
- package/graphic/KnowledgeGraphGraphicOrigin.js +1 -1
- package/graphic/OGCFeatureGraphicOrigin.js +1 -1
- package/graphic/OrientedImageryGraphicOrigin.js +1 -1
- package/graphic/ParquetGraphicOrigin.js +1 -1
- package/graphic/StreamGraphicOrigin.js +1 -1
- package/graphic/SubtypeGroupGraphicOrigin.js +1 -1
- package/graphic/TrackGraphicOrigin.js +5 -0
- package/graphic/WFSGraphicOrigin.js +1 -1
- package/graphic/getPopupProvider.js +5 -0
- package/interfaces.d.ts +869 -38
- package/kernel.js +1 -1
- package/layers/GaussianSplatLayer.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/knowledgeGraph/nodeMovementUtils.js +1 -1
- package/layers/mixins/FeatureReductionLayer.js +1 -1
- package/layers/mixins/TrackableLayer.js +1 -1
- package/layers/support/GaussianSplatAtlasPageAllocator.js +5 -0
- package/layers/support/gaussianSplatUtils.js +5 -0
- package/layers/support/rasterDatasets/MRFRaster.js +1 -1
- package/layers/support/rasterFormats/Qb3.js +5 -0
- package/layers/support/rasterFormats/RasterCodec.js +1 -1
- package/layers/support/tiles3DUtils.js +5 -0
- package/layers/video/VideoController.js +1 -1
- package/package.json +2 -2
- package/rest/knowledgeGraph/GraphApplyEditsResult.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/wasmToUpdateResponseFactories.js +1 -1
- package/rest/knowledgeGraphService.js +1 -1
- package/rest/lastMileDelivery/enums.js +5 -0
- package/rest/lastMileDelivery.d.ts +10 -0
- package/rest/lastMileDelivery.js +5 -0
- package/rest/route/utils.js +1 -1
- package/rest/support/JobInfo.js +1 -1
- package/rest/support/LastMileDeliveryParameters.d.ts +4 -0
- package/rest/support/LastMileDeliveryParameters.js +5 -0
- package/support/revision.js +1 -1
- package/symbols/IconSymbol3DLayer.js +1 -1
- package/symbols/TextSymbol3DLayer.js +1 -1
- package/symbols/patterns/StylePattern3D.js +1 -1
- package/symbols/patterns/styles.js +1 -1
- package/symbols/support/IconSymbol3DLayerResource.js +1 -1
- package/symbols/support/OccludedVisibility.js +5 -0
- package/symbols/support/Symbol3DAnchorPosition2D.js +1 -1
- package/symbols/support/Symbol3DIconOutline.js +1 -1
- package/unionTypes.d.ts +3 -0
- package/views/2d/analysis/AnalysisView2D.js +5 -0
- package/views/2d/analysis/ElevationProfileAnalysisView2D.d.ts +4 -0
- package/views/2d/analysis/ElevationProfileAnalysisView2D.js +5 -0
- package/views/2d/analysis/analysisViewModuleImportUtils.js +5 -0
- package/views/2d/engine/webgl/Painter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/GraphShaderModule.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TextureStatisticsTechnique.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsDiffShader.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsMinMaxSumShader.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsStdDevShader.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsSumOfSquaredDiffShader.js +5 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/utils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/videoScreenRenderer/VideoScreenTechnique.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
- package/views/3d/analysis/AnalysisView3D.js +1 -1
- package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
- package/views/3d/analysis/DimensionAnalysisView3D.js +1 -1
- package/views/3d/analysis/DirectLineMeasurementAnalysisView3D.js +1 -1
- package/views/3d/analysis/ElevationProfile/ElevationProfileHoveredPointsVisualization.js +1 -1
- package/views/3d/analysis/ElevationProfile/ElevationProfileInputVisualization.js +1 -1
- package/views/3d/analysis/ElevationProfile/ElevationProfileLineVisualization.js +5 -0
- package/views/3d/analysis/ElevationProfile/ElevationProfileSceneLineComputation.js +1 -1
- package/views/3d/analysis/ElevationProfile/ElevationProfileVisualization.js +1 -1
- package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
- package/views/3d/analysis/LineOfSightAnalysisView3D.js +1 -1
- package/views/3d/analysis/SliceAnalysisView3D.js +1 -1
- package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
- package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
- package/views/3d/analysis/analysisViewModuleImportUtils.js +5 -0
- package/views/3d/environment/EnvironmentRenderer.js +1 -1
- package/views/3d/environment/Fog.glsl.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/environment/FogTechniqueConfiguration.js +5 -0
- package/views/3d/environment/Precipitation.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/GraphicsView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/{IntegratedMesh3DTilesViewPerformanceInfo.js → Lyr3DViewPerformanceInfo.js} +1 -1
- package/views/3d/layers/Lyr3DWasm.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWebStyleSymbol.js +1 -1
- package/views/3d/layers/graphics/Labeler.js +1 -1
- package/views/3d/layers/support/LayerViewAnalysisViewManager.js +1 -1
- package/views/3d/support/GaussianSplatSortWorker.js +1 -1
- package/views/3d/support/GaussianSplatWorkerHandle.js +1 -1
- package/views/3d/support/QualitySettings.js +1 -1
- package/views/3d/support/pointsOfInterest/ContentGeometryUpdates.js +1 -1
- package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/ComputeCovariance.glsl.js +40 -0
- package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js +59 -0
- package/views/3d/webgl-engine/core/shaderLibrary/util/QuaternionToRotationMatrix.glsl.js +23 -0
- package/views/3d/webgl-engine/effects/blit/Blit.js +1 -1
- package/views/3d/webgl-engine/effects/bloom/BloomComposition.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/bloom/BloomCompositionTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
- package/views/3d/webgl-engine/effects/weather/SnowCover.glsl.js +4 -4
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +5 -0
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +5 -0
- package/views/3d/webgl-engine/shaders/GaussianSplatComposition.glsl.js +5 -0
- package/views/3d/webgl-engine/shaders/GaussianSplatCompositionTechnique.js +5 -0
- package/views/3d/webgl-engine/shaders/GaussianSplatCompositionTechniqueConfiguration.js +5 -0
- package/views/3d/webgl-engine/shaders/GaussianSplatDepthComposition.glsl.js +5 -0
- package/views/3d/webgl-engine/shaders/GaussianSplatDepthCompositionTechnique.js +5 -0
- package/views/3d/webgl-engine/shaders/GaussianSplatDepthTechnique.js +5 -0
- package/views/3d/webgl-engine/shaders/GaussianSplatTechnique.js +5 -0
- package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +5 -0
- package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/View2D.js +1 -1
- package/views/analysis/AnalysisView.js +5 -0
- package/views/analysis/ElevationProfile/ElevationProfileInputLineComputation.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileResult.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileTool.js +5 -0
- package/views/analysis/ElevationProfile/elevationProfileGeometryUtils.js +1 -1
- package/views/layers/FeatureLayerView.js +1 -1
- package/views/support/AnalysisViewManager.js +1 -1
- package/views/webgl/FramebufferObject.js +1 -1
- package/widgets/CoordinateConversion/support/Format.js +1 -1
- package/widgets/Locate/LocateViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
- package/widgets/Popup/actionUtils.js +1 -1
- package/assets/esri/core/workers/chunks/08d420cd7cfa19a10fa4.js +0 -1
- package/assets/esri/core/workers/chunks/17abab49db1813d3e192.js +0 -1
- package/assets/esri/core/workers/chunks/182383fd00008606bfaa.js +0 -1
- package/assets/esri/core/workers/chunks/188feb2bcbf8e48e3163.js +0 -1
- package/assets/esri/core/workers/chunks/232c76f122b1f519e099.js +0 -1
- package/assets/esri/core/workers/chunks/3124a8516e815efec973.js +0 -1
- package/assets/esri/core/workers/chunks/3461701a15be46603c56.js +0 -1
- package/assets/esri/core/workers/chunks/36acf191a2d48560c796.js +0 -1
- package/assets/esri/core/workers/chunks/40e1fbfbf3f3979b3713.js +0 -1
- package/assets/esri/core/workers/chunks/4b1daffa97fd90a554a0.js +0 -1
- package/assets/esri/core/workers/chunks/4b68783e8d1415d0a171.js +0 -1
- package/assets/esri/core/workers/chunks/5915f5ba9064097aee79.js +0 -1
- package/assets/esri/core/workers/chunks/5e1afea05b624b315d9f.js +0 -1
- package/assets/esri/core/workers/chunks/5ed7e139c72cd2b3ddba.js +0 -1
- package/assets/esri/core/workers/chunks/63f3e46bfa820436161c.js +0 -1
- package/assets/esri/core/workers/chunks/702d2c668dedf83421ca.js +0 -1
- package/assets/esri/core/workers/chunks/7b2ec80dca0fdb0442cf.js +0 -1
- package/assets/esri/core/workers/chunks/7b9178c3826f9ef52a00.js +0 -1
- package/assets/esri/core/workers/chunks/9a20390602126995f831.js +0 -1
- package/assets/esri/core/workers/chunks/a2150baf0661e2f28011.js +0 -1
- package/assets/esri/core/workers/chunks/a532614aa65fb52dee7b.js +0 -1
- package/assets/esri/core/workers/chunks/abededd48e0ea6cfec01.js +0 -1
- package/assets/esri/core/workers/chunks/ae1cb4c65d72217ae4d4.js +0 -1
- package/assets/esri/core/workers/chunks/c1c6202f7bef24b5db26.js +0 -1
- package/assets/esri/core/workers/chunks/c75b0243e5bb84738419.js +0 -1
- package/assets/esri/core/workers/chunks/d47c3431c501d77b1779.js +0 -1
- package/assets/esri/core/workers/chunks/f6d91256c4e5f8a0d5c0.js +0 -1
- package/assets/esri/core/workers/chunks/f711aeba1a2c184ddb43.js +0 -1
- package/graphic/isPopupProviderGraphicOrigin.js +0 -5
- package/views/2d/analysisViewModuleImportUtils.js +0 -5
- package/views/3d/analysis/ElevationProfile/ElevationProfileLinesVisualization.js +0 -5
- package/views/3d/analysisViewModuleImportUtils.js +0 -5
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import s from"../../core/Accessor.js";import{createTask as t}from"../../core/asyncUtils.js";import i from"../../core/Collection.js";import a from"../../core/Error.js";import{makeHandle as o}from"../../core/handleUtils.js";import"../../core/has.js";import n from"../../core/Logger.js";import{removeMaybe as r,destroyMaybe as l,abortMaybe as c}from"../../core/maybe.js";import{createAbortError as h,isAborted as w,onAbort as d,createResolver as y}from"../../core/promiseUtils.js";import{schedule as
|
|
5
|
+
import{__decorate as e}from"tslib";import s from"../../core/Accessor.js";import{createTask as t}from"../../core/asyncUtils.js";import i from"../../core/Collection.js";import a from"../../core/Error.js";import{makeHandle as o}from"../../core/handleUtils.js";import"../../core/has.js";import n from"../../core/Logger.js";import{removeMaybe as r,destroyMaybe as l,abortMaybe as c}from"../../core/maybe.js";import{createAbortError as h,isAborted as w,onAbort as d,createResolver as y}from"../../core/promiseUtils.js";import{schedule as p}from"../../core/scheduling.js";import{property as _}from"../../core/accessorSupport/decorators/property.js";import{subclass as m}from"../../core/accessorSupport/decorators/subclass.js";const u=Symbol("analyses-owner-handles");let V=class extends s{constructor(e){super(e),this._allAnalysisViews=new i,this._creatingViewCount=0,this._attachedToViewResolver=A(),this._items=new Map,this._moduleMap=new Map,this._scheduledUpdateHandle=null,this._emitOnView=(e,s)=>this.view.emit(e,s)}destroy(){this._disconnectOwners(),this._attachedToViewResolver.reject(h("AnalysisViewManager was destroyed")),this._set("view",null)}attach(){this._connectOwners(),this._attachedToViewResolver.resolve()}detach(){this._disconnectOwners(),this._attachedToViewResolver.reject(h()),this._attachedToViewResolver=A()}get updating(){return!this.view.ready||0!==this._creatingViewCount||this._allAnalysisViews.some(e=>e.updating)}get testInfo(){}async whenAnalysisView(e){await this._attachedToViewResolver.promise;const s=this._items.get(e);if(null==s||1===s.state.list){throw new a("AnalysisViewManager:no-analysis-view-for-analysis","The analysis does not exist in view.analyses",{analysis:e})}return s.createAnalysisViewTask.promise}_connectOwners(){this.addHandles(this._connectAnalysesCollection(this.view.analyses),u)}_disconnectOwners(){this.removeHandles(u),this._update(),this._creatingViewCount=0}_connectAnalysesCollection(e){for(const i of e)this._addAnalysis(i);const s=e.on("after-add",e=>this._addAnalysis(e.item)),t=e.on("after-remove",e=>this._removeAnalysis(e.item));return o(()=>{s.remove(),t.remove();for(const s of e)this._removeAnalysis(s)})}_addAnalysis(e){const s=this._items.get(e);if(null==s){const s={state:{view:0,list:0},analysis:e,view:null,createAnalysisViewTask:null};this._items.set(e,s),s.createAnalysisViewTask=t(t=>this._createAnalysisViewPromise(s,t).then(s=>(this._emitOnView("analysis-view-create",{analysis:e,analysisView:s}),s),s=>{throw this._emitOnView("analysis-view-create-error",{analysis:e,error:s}),s}))}else s.state.list=0}_removeAnalysis(e){const s=this._items.get(e);null!=s?(s.state.list=1,this._scheduleUpdate()):n.getLogger(this).error("Trying to remove analysis which was not added")}_scheduleUpdate(){null==this._scheduledUpdateHandle&&(this._scheduledUpdateHandle=p(()=>this._update()))}_update(){this._scheduledUpdateHandle=r(this._scheduledUpdateHandle),this._items.forEach(e=>{if(1!==e.state.list)return;const{analysis:s,view:t}=e;switch(this._items.delete(s),e.state.view){case 0:e.createAnalysisViewTask=c(e.createAnalysisViewTask);break;case 1:null!=t&&(this._allAnalysisViews.remove(t),e.view=l(t),e.createAnalysisViewTask=null,this._emitOnView("analysis-view-destroy",{analysis:s,analysisView:t}))}})}async _createAnalysisViewPromise(e,s){const{analysis:t}=e;if(this._creatingViewCount+=1,!this._moduleMap.has(t.type))try{this._moduleMap.set(t.type,await this.importAnalysisViewModule(t))}catch(n){throw this._creatingViewCount-=1,new a("AnalysisViewManager:no-analysis-view-for-analysis",`Analysis of type "${t.type}" is not supported`)}if(w(s))throw this._creatingViewCount-=1,h("AnalysisView creation aborted");const i=new(this._moduleMap.get(t.type).default)({analysis:t,view:this.view});let o=!0;d(s,()=>{o&&this._destroyAnalysisView(t,i)});try{await i.when()}catch(n){throw o=!1,this._destroyAnalysisView(t,i),n}if(w(s))throw h();return o=!1,e.view=i,e.state.view=1,this._allAnalysisViews.add(i),this._creatingViewCount-=1,i}_destroyAnalysisView(e,s){s.destroyed||(this._creatingViewCount-=1,s.destroy(),this._emitOnView("analysis-view-destroy",{analysis:e,analysisView:s}))}};e([_()],V.prototype,"updating",null),e([_({constructOnly:!0})],V.prototype,"importAnalysisViewModule",void 0),e([_({constructOnly:!0})],V.prototype,"view",void 0),e([_()],V.prototype,"_allAnalysisViews",void 0),e([_()],V.prototype,"_creatingViewCount",void 0),V=e([m("esri.views.support.AnalysisViewManager")],V);const v=V;function A(){const e=y();return e.promise.catch(()=>{}),e}export{v as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../core/has.js";import t from"../../core/Logger.js";import{disposeMaybe as e}from"../../core/maybe.js";import{BufferObject as r}from"./BufferObject.js";import{webglDebugEnabled as i}from"./checkWebGLError.js";import{ResourceType as s,ColorAttachment0 as n,PixelType as h,StencilAttachment as o,SizedDepthStencilFormat as c,DepthStencilAttachment as a,SizedDepthFormat as u,DepthAttachment as f}from"./enums.js";import{Renderbuffer as l}from"./Renderbuffer.js";import{Texture as d}from"./Texture.js";const _=()=>t.getLogger("esri.views.webgl.FramebufferObject");class m{constructor(t,e,r){if(this._context=t,this._glName=null,this._colorAttachments=new Map,this._depthStencilBuffer=null,this._depthStencilTexture=null,this._initialized=!1,t.instanceCounter.increment(s.FramebufferObject,this),null!=e){const r=E(t,e);null!=r&&(this._colorAttachments.set(n,r),p(r)?this._validateTextureDescriptor(r.descriptor):this._validateRenderbufferDescriptor(r.descriptor)),this._validateColorAttachmentPoint(n)}if(null!=r)if(x(r))this._depthStencilTexture=p(r)?r:new d(t,r),this._validateTextureDescriptor(this._depthStencilTexture.descriptor);else{const e=T(r)?r:new l(t,r);this._depthStencilBuffer=e,this._validateRenderbufferDescriptor(e.descriptor)}}dispose(){const{_colorAttachments:t,_glName:e}=this;if(0===t.size&&!this._depthStencilBuffer&&!this._depthStencilTexture&&!e)return;const{_context:r}=this,i=r.getBoundFramebufferObject();t.forEach((t,e)=>this.detachColorTexture(e)?.dispose()),this.detachDepthStencilBuffer()?.dispose(),this.detachDepthStencilTexture()?.dispose(),r.gl.deleteFramebuffer(e),this._glName=null,r.bindFramebuffer(i===this?null:i),r.instanceCounter.decrement(s.FramebufferObject,this)}get glName(){return this._glName}get colorTexture(){const t=this._colorAttachments.get(n);return p(t)?t:null}get depthStencil(){return this._depthStencilTexture||this._depthStencilBuffer}get depthStencilTexture(){return this._depthStencilTexture}get width(){const t=this._colorAttachments.get(n)??this._depthStencilTexture??this._depthStencilBuffer;return t?.descriptor?.width??0}get height(){const t=this._colorAttachments.get(n)??this._depthStencilTexture??this._depthStencilBuffer;return t?.descriptor?.height??0}get usedMemory(){return[...this._colorAttachments].reduce((t,[e,r])=>t+r.usedMemory,this.depthStencil?.usedMemory??0)}static{this._MAX_COLOR_ATTACHMENTS=-1}getColorTexture(t){const e=this._colorAttachments.get(t);return e&&p(e)?e:null}get colorAttachments(){return[...this._colorAttachments.keys()]}attachColorTexture(t,e=n){if(!t)return;this._validateColorAttachmentPoint(e);const{descriptor:r}=t;this._validateTextureDescriptor(r),this.detachColorTexture(e)?.dispose(),this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(t.glName,e)),this._colorAttachments.set(e,t)}detachColorTexture(t=n){const e=this._colorAttachments.get(t);if(!e)return;const r=p(e);return this._initialized&&this._context.temporaryBindFramebufferObject(this,()=>{if(r)this._framebufferTexture2D(null,t);else{const e=this._context.gl;e.framebufferRenderbuffer(e.FRAMEBUFFER,t,e.RENDERBUFFER,null)}}),this._colorAttachments.delete(t),r?e:void 0}setColorTextureTarget(t,e=n,r=0){const i=this._colorAttachments.get(e);i&&(35866===t?this._framebufferTextureLayer(i.glName,e,36160,0,r):this._framebufferTexture2D(i.glName,e,t,36160,0))}attachDepthStencil(t){if(t)switch(t.type){case 1:return this._attachDepthStencilTexture(t);case 2:return this._attachDepthStencilBuffer(t)}}_attachDepthStencilTexture(t){if(null==t)return;const{descriptor:e}=t,{pixelFormat:r,dataType:i}=e;34041===r||6402===r?34041!==r||i===h.UNSIGNED_INT_24_8?6402!==r||i===h.UNSIGNED_INT||i===h.UNSIGNED_SHORT?(this._validateTextureDescriptor(e),this._disposeDepthStencilAttachments(),this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(t.glName,A(r))),this._depthStencilTexture?.dispose(),this._depthStencilTexture=t):console.error("Depth texture must have data type of UNSIGNED_INT or UNSIGNED_SHORT!"):console.error("Depth/Stencil texture must have data type of UNSIGNED_INT_24_8!"):console.error("Depth/Stencil texture must have a pixel type of DEPTH_STENCIL!")}detachDepthStencilTexture(){const t=this._depthStencilTexture;return t&&this._initialized&&this._context.temporaryBindFramebufferObject(this,()=>{this._framebufferTexture2D(null,A(t.descriptor.pixelFormat))}),this._depthStencilTexture=null,t}_attachDepthStencilBuffer(t){if(null==t)return;const e=t.descriptor;if(this._validateRenderbufferDescriptor(e),this._disposeDepthStencilAttachments(),this._initialized){this._context.bindFramebuffer(this);const{gl:r}=this._context,i=this._getGLAttachmentPoint(e);r.framebufferRenderbuffer(36160,i,r.RENDERBUFFER,t.glName)}this._depthStencilBuffer=t}detachDepthStencilBuffer(){const t=this._depthStencilBuffer;if(t&&this._initialized){const{_context:e}=this,r=e.getBoundFramebufferObject();e.bindFramebuffer(this);const{gl:i}=e,s=this._getGLAttachmentPoint(t.descriptor);i.framebufferRenderbuffer(36160,s,i.RENDERBUFFER,null),e.bindFramebuffer(r)}return this._depthStencilBuffer=null,t}invalidateAttachments(t){const{_context:e}=this;e.temporaryBindFramebufferObject(this,()=>e.gl.invalidateFramebuffer(36160,t),!0)}copyToTexture(t,e,r,i,s,n,h){(t<0||e<0||s<0||n<0)&&console.error("Offsets cannot be negative!"),(r<=0||i<=0)&&console.error("Copy width and height must be greater than zero!");const o=h.descriptor;3553!==h.descriptor.target&&console.error("Texture target must be TEXTURE_2D!"),(null==o?.width||null==o?.height||t+r>this.width||e+i>this.height||s+r>o.width||n+i>o.height)&&console.error("Bad dimensions, the current input values will attempt to read or copy out of bounds!");const c=this._context,a=c.bindTexture(h,d.TEXTURE_UNIT_FOR_UPDATES);c.setActiveTexture(d.TEXTURE_UNIT_FOR_UPDATES),c.bindFramebuffer(this),c.gl.copyTexSubImage2D(3553,0,s,n,t,e,r,i),c.bindTexture(a,d.TEXTURE_UNIT_FOR_UPDATES)}readPixels(t,e,r,i,s,n,h){(r<=0||i<=0)&&console.error("Copy width and height must be greater than zero!"),h||console.error("Target memory is not initialized!"),this._context.bindFramebuffer(this),this._context.gl.readPixels(t,e,r,i,s,n,h)}async readPixelsAsync(t,e,i,s,n,h,o){const{gl:c}=this._context,a=r.createPixelPack(this._context,35041,o.byteLength);this._context.bindBuffer(a);const u=this._context.getBoundFramebufferObject();this._context.bindFramebuffer(this),c.readPixels(t,e,i,s,n,h,0),this._context.unbindBuffer(35051),this._context.bindFramebuffer(u),await a.getSubDataAsync(o),a.dispose()}resize(t,e){if(this.width===t&&this.height===e)return;const r={width:t,height:e};D(r,this._context.parameters.maxTextureSize),this._colorAttachments.forEach(t=>t.resize(r.width,r.height)),this._depthStencilTexture?.resize(r.width,r.height),this._initialized&&(D(r,this._context.parameters.maxRenderbufferSize),this._depthStencilBuffer?.resize(r.width,r.height),this._context.getBoundFramebufferObject()===this&&this._context.bindFramebuffer(null),this._initialized=!1)}initializeAndBind(t=36160){const{gl:e}=this._context;if(this._initialized)return void e.bindFramebuffer(t,this.glName);this._glName&&e.deleteFramebuffer(this._glName);const r=e.createFramebuffer();if(e.bindFramebuffer(t,r),this._colorAttachments.forEach((e,r)=>{if(p(e)){const i=F(e);35866===i?this._framebufferTextureLayer(e.glName,r,t,0,0):this._framebufferTexture2D(e.glName,r,i,t)}else if(T(e)){const i=this._context.gl;i.framebufferRenderbuffer(t,r,i.RENDERBUFFER,e.glName)}}),this._depthStencilBuffer){const r=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);e.framebufferRenderbuffer(t,r,e.RENDERBUFFER,this._depthStencilBuffer.glName)}else if(this._depthStencilTexture){const e=A(this._depthStencilTexture.descriptor.pixelFormat);this._framebufferTexture2D(this._depthStencilTexture.glName,e,F(this._depthStencilTexture),t)}if(i()){e.checkFramebufferStatus(t)!==e.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!")}this._glName=r,this._initialized=!0}_framebufferTexture2D(t,e=n,r=3553,i=36160,s=0){this._context.gl.framebufferTexture2D(i,e,r,t,s)}_framebufferTextureLayer(t,e=n,r=36160,i=0,s=0){this._context.gl.framebufferTextureLayer(r,e,t,i,s)}_disposeDepthStencilAttachments(){const t=this._context.gl;if(this._depthStencilBuffer){if(this._initialized){this._context.bindFramebuffer(this);const e=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);t.framebufferRenderbuffer(36160,e,t.RENDERBUFFER,null)}this._depthStencilBuffer=e(this._depthStencilBuffer)}this._depthStencilTexture&&(this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(null,A(this._depthStencilTexture.descriptor.pixelFormat))),this._depthStencilTexture=e(this._depthStencilTexture))}_validateTextureDescriptor(t){3553!==t.target&&34067!==t.target&&35866!==t.target&&console.error("Texture type must be TEXTURE_2D, TEXTURE_2D_ARRAY or TEXTURE_CUBE_MAP!"),D(t,this._context.parameters.maxTextureSize),this._validateBufferDimensions(t)}_validateRenderbufferDescriptor(t){D(t,this._context.parameters.maxRenderbufferSize),this._validateBufferDimensions(t)}_validateBufferDimensions(t){t.width<=0&&(t.width=this.width),t.height<=0&&(t.height=this.height),this.width>0&&this.height>0&&(this.width===t.width&&this.height===t.height||console.error("Attachment size must match framebuffer size!"))}_getGLAttachmentPoint(t){switch(t.internalFormat){case u.DEPTH_COMPONENT16:case u.DEPTH_COMPONENT24:case u.DEPTH_COMPONENT32F:return f;case c.DEPTH24_STENCIL8:case c.DEPTH32F_STENCIL8:return a;case 36168:return o;default:return n}}_validateColorAttachmentPoint(e){if(-1===m._MAX_COLOR_ATTACHMENTS){const{gl:t}=this._context;m._MAX_COLOR_ATTACHMENTS=t.getParameter(t.MAX_COLOR_ATTACHMENTS)}const r=e-n;r+1>m._MAX_COLOR_ATTACHMENTS&&t.getLogger("esri.views.webgl.FrameBufferObject").error("esri.FrameBufferObject",`illegal attachment point for color attachment: ${r+1}. Implementation supports up to ${m._MAX_COLOR_ATTACHMENTS} color attachments`)}}function p(t){return 1===S(t)}function T(t){return 2===S(t)}function x(t){return p(t)||b(t)}function b(t){return 0===S(t)}function g(t){return 3===S(t)||null!=t&&"samples"in t}function S(t){return null!=t&&"type"in t?t.type:null}function E(t,e){return p(e)||T(e)?e:b(e)?new d(t,e):g(e)?new l(t,e):null}function D(t,e){const r=Math.max(t.width,t.height);if(r>e){_().warnOnce(`Resizing FBO attachment size ${t.width}x${t.height} to device limit ${e}`);const i=e/r;return t.width=Math.round(t.width*i),t.height=Math.round(t.height*i),!1}return!0}function F(t){return 34067===t.descriptor.target?34069:35866===t.descriptor.target?35866:3553}function A(t){return 6402===t?f:a}export{m as FramebufferObject,D as ensureAttachmentMaxSize};
|
|
5
|
+
import"../../core/has.js";import e from"../../core/Logger.js";import{disposeMaybe as t}from"../../core/maybe.js";import{BufferObject as r}from"./BufferObject.js";import{webglDebugEnabled as i}from"./checkWebGLError.js";import{ResourceType as s,ColorAttachment0 as n,PixelType as h,StencilAttachment as o,SizedDepthStencilFormat as c,DepthStencilAttachment as a,SizedDepthFormat as u,DepthAttachment as f}from"./enums.js";import{Renderbuffer as l}from"./Renderbuffer.js";import{Texture as d}from"./Texture.js";const _=()=>e.getLogger("esri.views.webgl.FramebufferObject");class m{constructor(e,t,r){if(this._context=e,this._glName=null,this._colorAttachments=new Map,this._depthStencilBuffer=null,this._depthStencilTexture=null,this._initialized=!1,e.instanceCounter.increment(s.FramebufferObject,this),null!=t){const r=E(e,t);null!=r&&(this._colorAttachments.set(n,r),p(r)?this._validateTextureDescriptor(r.descriptor):this._validateRenderbufferDescriptor(r.descriptor)),this._validateColorAttachmentPoint(n)}if(null!=r)if(x(r))this._depthStencilTexture=p(r)?r:new d(e,r),this._validateTextureDescriptor(this._depthStencilTexture.descriptor);else{const t=T(r)?r:new l(e,r);this._depthStencilBuffer=t,this._validateRenderbufferDescriptor(t.descriptor)}}dispose(){const{_colorAttachments:e,_glName:t}=this;if(0===e.size&&!this._depthStencilBuffer&&!this._depthStencilTexture&&!t)return;const{_context:r}=this,i=r.getBoundFramebufferObject();e.forEach((e,t)=>this.detachColorTexture(t)?.dispose()),this.detachDepthStencilBuffer()?.dispose(),this.detachDepthStencilTexture()?.dispose(),r.gl.deleteFramebuffer(t),this._glName=null,r.bindFramebuffer(i===this?null:i),r.instanceCounter.decrement(s.FramebufferObject,this)}get glName(){return this._glName}get colorTexture(){const e=this._colorAttachments.get(n);return p(e)?e:null}get depthStencil(){return this._depthStencilTexture||this._depthStencilBuffer}get depthStencilTexture(){return this._depthStencilTexture}get width(){const e=this._colorAttachments.get(n)??this._depthStencilTexture??this._depthStencilBuffer;return e?.descriptor?.width??0}get height(){const e=this._colorAttachments.get(n)??this._depthStencilTexture??this._depthStencilBuffer;return e?.descriptor?.height??0}get usedMemory(){return[...this._colorAttachments].reduce((e,[t,r])=>e+r.usedMemory,this.depthStencil?.usedMemory??0)}static{this._MAX_COLOR_ATTACHMENTS=-1}getColorTexture(e){const t=this._colorAttachments.get(e);return t&&p(t)?t:null}get colorAttachments(){return[...this._colorAttachments.keys()]}attachColorTexture(e,t=n){if(!e)return;this._validateColorAttachmentPoint(t);const{descriptor:r}=e;this._validateTextureDescriptor(r),this.detachColorTexture(t)?.dispose(),this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(e.glName,t)),this._colorAttachments.set(t,e)}detachColorTexture(e=n){const t=this._colorAttachments.get(e);if(!t)return;const r=p(t);return this._initialized&&this._context.temporaryBindFramebufferObject(this,()=>{if(r)this._framebufferTexture2D(null,e);else{const t=this._context.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,e,t.RENDERBUFFER,null)}}),this._colorAttachments.delete(e),r?t:void 0}setColorTextureTarget(e,t=n,r=0){const i=this._colorAttachments.get(t);i&&(35866===e?this._framebufferTextureLayer(i.glName,t,36160,0,r):this._framebufferTexture2D(i.glName,t,e,36160,0))}attachDepthStencil(e){if(e)switch(e.type){case 1:return this._attachDepthStencilTexture(e);case 2:return this._attachDepthStencilBuffer(e)}}_attachDepthStencilTexture(e){if(null==e)return;const{descriptor:t}=e,{pixelFormat:r,dataType:i}=t;34041===r||6402===r?34041!==r||i===h.UNSIGNED_INT_24_8?6402!==r||i===h.UNSIGNED_INT||i===h.UNSIGNED_SHORT?(this._validateTextureDescriptor(t),this._disposeDepthStencilAttachments(),this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(e.glName,A(r))),this._depthStencilTexture?.dispose(),this._depthStencilTexture=e):console.error("Depth texture must have data type of UNSIGNED_INT or UNSIGNED_SHORT!"):console.error("Depth/Stencil texture must have data type of UNSIGNED_INT_24_8!"):console.error("Depth/Stencil texture must have a pixel type of DEPTH_STENCIL!")}detachDepthStencilTexture(){const e=this._depthStencilTexture;return e&&this._initialized&&this._context.temporaryBindFramebufferObject(this,()=>{this._framebufferTexture2D(null,A(e.descriptor.pixelFormat))}),this._depthStencilTexture=null,e}_attachDepthStencilBuffer(e){if(null==e)return;const t=e.descriptor;if(this._validateRenderbufferDescriptor(t),this._disposeDepthStencilAttachments(),this._initialized){this._context.bindFramebuffer(this);const{gl:r}=this._context,i=this._getGLAttachmentPoint(t);r.framebufferRenderbuffer(36160,i,r.RENDERBUFFER,e.glName)}this._depthStencilBuffer=e}detachDepthStencilBuffer(){const e=this._depthStencilBuffer;if(e&&this._initialized){const{_context:t}=this,r=t.getBoundFramebufferObject();t.bindFramebuffer(this);const{gl:i}=t,s=this._getGLAttachmentPoint(e.descriptor);i.framebufferRenderbuffer(36160,s,i.RENDERBUFFER,null),t.bindFramebuffer(r)}return this._depthStencilBuffer=null,e}invalidateAttachments(e){const{_context:t}=this;t.temporaryBindFramebufferObject(this,()=>t.gl.invalidateFramebuffer(36160,e),!0)}copyToTexture(e,t,r,i,s,n,h){(e<0||t<0||s<0||n<0)&&console.error("Offsets cannot be negative!"),(r<=0||i<=0)&&console.error("Copy width and height must be greater than zero!");const o=h.descriptor;3553!==h.descriptor.target&&console.error("Texture target must be TEXTURE_2D!"),(null==o?.width||null==o?.height||e+r>this.width||t+i>this.height||s+r>o.width||n+i>o.height)&&console.error("Bad dimensions, the current input values will attempt to read or copy out of bounds!");const c=this._context,a=c.bindTexture(h,d.TEXTURE_UNIT_FOR_UPDATES);c.setActiveTexture(d.TEXTURE_UNIT_FOR_UPDATES),c.bindFramebuffer(this),c.gl.copyTexSubImage2D(3553,0,s,n,e,t,r,i),c.bindTexture(a,d.TEXTURE_UNIT_FOR_UPDATES)}readPixels(e,t,r,i,s,n,h){(r<=0||i<=0)&&console.error("Copy width and height must be greater than zero!"),h||console.error("Target memory is not initialized!"),this._context.bindFramebuffer(this),this._context.gl.readPixels(e,t,r,i,s,n,h)}async readPixelsAsync(e,t,i,s,n,h,o){const{gl:c}=this._context,a=r.createPixelPack(this._context,35041,o.byteLength);this._context.bindBuffer(a);const u=this._context.getBoundFramebufferObject();this._context.bindFramebuffer(this),c.readPixels(e,t,i,s,n,h,0),this._context.unbindBuffer(35051),this._context.bindFramebuffer(u),await a.getSubDataAsync(o),a.dispose()}resize(e,t){if(this.width===e&&this.height===t)return;const r={width:e,height:t};if(F(r,this._context.parameters.maxTextureSize),this._colorAttachments.forEach(e=>e.resize(r.width,r.height)),this._depthStencilTexture?.resize(r.width,r.height),this._initialized&&(F(r,this._context.parameters.maxRenderbufferSize),this._depthStencilBuffer?.resize(r.width,r.height),i())){const{gl:e}=this._context;e.checkFramebufferStatus(36160)!==e.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!")}}initializeAndBind(e=36160){const{gl:t}=this._context;if(this._initialized)return void t.bindFramebuffer(e,this.glName);this._glName&&t.deleteFramebuffer(this._glName);const r=t.createFramebuffer();if(t.bindFramebuffer(e,r),this._colorAttachments.forEach((t,r)=>{if(p(t)){const i=D(t);35866===i?this._framebufferTextureLayer(t.glName,r,e,0,0):this._framebufferTexture2D(t.glName,r,i,e)}else if(T(t)){const i=this._context.gl;i.framebufferRenderbuffer(e,r,i.RENDERBUFFER,t.glName)}}),this._depthStencilBuffer){const r=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);t.framebufferRenderbuffer(e,r,t.RENDERBUFFER,this._depthStencilBuffer.glName)}else if(this._depthStencilTexture){const t=A(this._depthStencilTexture.descriptor.pixelFormat);this._framebufferTexture2D(this._depthStencilTexture.glName,t,D(this._depthStencilTexture),e)}if(i()){t.checkFramebufferStatus(e)!==t.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!")}this._glName=r,this._initialized=!0}_framebufferTexture2D(e,t=n,r=3553,i=36160,s=0){this._context.gl.framebufferTexture2D(i,t,r,e,s)}_framebufferTextureLayer(e,t=n,r=36160,i=0,s=0){this._context.gl.framebufferTextureLayer(r,t,e,i,s)}_disposeDepthStencilAttachments(){const e=this._context.gl;if(this._depthStencilBuffer){if(this._initialized){this._context.bindFramebuffer(this);const t=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);e.framebufferRenderbuffer(36160,t,e.RENDERBUFFER,null)}this._depthStencilBuffer=t(this._depthStencilBuffer)}this._depthStencilTexture&&(this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(null,A(this._depthStencilTexture.descriptor.pixelFormat))),this._depthStencilTexture=t(this._depthStencilTexture))}_validateTextureDescriptor(e){3553!==e.target&&34067!==e.target&&35866!==e.target&&console.error("Texture type must be TEXTURE_2D, TEXTURE_2D_ARRAY or TEXTURE_CUBE_MAP!"),F(e,this._context.parameters.maxTextureSize),this._validateBufferDimensions(e)}_validateRenderbufferDescriptor(e){F(e,this._context.parameters.maxRenderbufferSize),this._validateBufferDimensions(e)}_validateBufferDimensions(e){e.width<=0&&(e.width=this.width),e.height<=0&&(e.height=this.height),this.width>0&&this.height>0&&(this.width===e.width&&this.height===e.height||console.error("Attachment size must match framebuffer size!"))}_getGLAttachmentPoint(e){switch(e.internalFormat){case u.DEPTH_COMPONENT16:case u.DEPTH_COMPONENT24:case u.DEPTH_COMPONENT32F:return f;case c.DEPTH24_STENCIL8:case c.DEPTH32F_STENCIL8:return a;case 36168:return o;default:return n}}_validateColorAttachmentPoint(t){if(-1===m._MAX_COLOR_ATTACHMENTS){const{gl:e}=this._context;m._MAX_COLOR_ATTACHMENTS=e.getParameter(e.MAX_COLOR_ATTACHMENTS)}const r=t-n;r+1>m._MAX_COLOR_ATTACHMENTS&&e.getLogger("esri.views.webgl.FrameBufferObject").error("esri.FrameBufferObject",`illegal attachment point for color attachment: ${r+1}. Implementation supports up to ${m._MAX_COLOR_ATTACHMENTS} color attachments`)}}function p(e){return 1===S(e)}function T(e){return 2===S(e)}function x(e){return p(e)||b(e)}function b(e){return 0===S(e)}function g(e){return 3===S(e)||null!=e&&"samples"in e}function S(e){return null!=e&&"type"in e?e.type:null}function E(e,t){return p(t)||T(t)?t:b(t)?new d(e,t):g(t)?new l(e,t):null}function F(e,t){const r=Math.max(e.width,e.height);if(r>t){_().warnOnce(`Resizing FBO attachment size ${e.width}x${e.height} to device limit ${t}`);const i=t/r;return e.width=Math.round(e.width*i),e.height=Math.round(e.height*i),!1}return!0}function D(e){return 34067===e.descriptor.target?34069:35866===e.descriptor.target?35866:3553}function A(e){return 6402===e?f:a}export{m as FramebufferObject,F as ensureAttachmentMaxSize};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import r from"../../../core/Error.js";import"../../../core/has.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{fromUsng as i,fromUtm as s,fromMgrs as a,fromLatitudeLongitude as l,toUtm as c,toUsng as p,toMgrs as u,toLatitudeLongitude as m}from"../../../geometry/coordinateFormatter.js";import{isLoaded as d,project as h}from"../../../geometry/projectionUtils.js";import f from"../../../geometry/SpatialReference.js";import{equals as v}from"../../../geometry/support/spatialReferenceUtils.js";import{project as g}from"../../../geometry/support/webMercatorUtils.js";import{isValidPoint as y,fromXY as w,pointToCoordinate as b,getDegreePrecision as S}from"./coordinateConversionUtils.js";let _=class extends t{constructor(e){super(e),this.conversionInfo=null,this.coordinateSegments=null,this._currentPattern=void 0,this.defaultPattern=null,this.name=null,this.viewModel=null}get currentPattern(){return(this._currentPattern||this.defaultPattern)??""}set currentPattern(e){this._currentPattern=e}get label(){return this.name??""}set label(e){this._overrideIfSome("label",e)}get hasDisplayProperties(){return!(!this.defaultPattern||!this.coordinateSegments)}get spatialReference(){return"basemap"===this.name?this._viewSpatialReference:this.conversionInfo?.spatialReference??f.WGS84}set spatialReference(e){this._overrideIfSome("spatialReference",e)}get _viewSpatialReference(){return this.viewModel?.view?.spatialReference??f.WGS84}get _additionalCharactersPattern(){const e=this.coordinateSegments;if(!e)return null;const t=e.map(e=>e.alias),r=this.currentPattern.replaceAll(new RegExp(`["nsew${t.join()}]`,"gi"),"").replaceAll(" ","");return new RegExp(`[${r}]`,"g")}get test(){}async convert(e){if(!y(e))throw new r("format:invalid-point","Could not convert invalid point.",{point:e});const t=this.conversionInfo?.convert;if(t)return Promise.resolve().then(()=>t(e));const n=this._project(e,this.spatialReference);return{location:n,coordinate:this._getCoordinate(n)}}getConversionStrategy(){const e=this._viewSpatialReference;return this.conversionInfo?.convert||this.viewModel?.formatterAvailable||"xy"===this.name&&(e.isWebMercator||e.isWGS84)||"basemap"===this.name?"client":"server"}getDisplayCoordinate(e){if(!e)return null;if(!this.coordinateSegments||!this.currentPattern)return e;let t=this.currentPattern;const r=this._getSegmentMatches(e,!1);for(let n=this.coordinateSegments.length-1;n>=0;n--){const e=this.coordinateSegments[n];t=t.replace(e.alias,r[n])}return t}_parseUserInput(e){const{defaultPattern:t,_additionalCharactersPattern:r,coordinateSegments:n}=this;if(!t||!r)return"";let o=t.replace(r,"");e=e.replace(r,"");const i=this._getSegmentMatches(e,!0);if(n)for(let s=n.length-1;s>=0;s--){const e=n[s];o=o.replace(e.alias,i[s])}return o}_getSegmentMatches(e,t){const r=new Array,{coordinateSegments:n}=this;if(!n)return r;for(let o=0;o<n.length;o++){const i=n[o],s=e.match(i.searchPattern);if(!s){r.push("");continue}let a=s[0];if(e=e.replace(a,"").trim(),i.substitution){const e=t?i.substitution.input(a):i.substitution.output(a);e&&(a=`${e}`)}r.push(a)}return r}async reverseConvert(e){const t=this._parseUserInput(e),n=this.conversionInfo?.reverseConvert;let o;if(n)o=n(t);else if("xy"===this.name||"basemap"===this.name)o=w(t,this.spatialReference);else if(this.viewModel?.formatterAvailable)switch(this.name){case"dd":case"ddm":case"dms":o=l(t,this.spatialReference);break;case"mgrs":{const e="automatic";o=a(t,this.spatialReference,e);break}case"utm":{const e="latitude-band-indicators";o=s(t,this.spatialReference,e);break}case"usng":o=i(t,this.spatialReference);break;default:o=null}if(!o)throw new r("format:invalid-input","Could not parse input into point.",{
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import r from"../../../core/Error.js";import"../../../core/has.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{fromUsng as i,fromUtm as s,fromMgrs as a,fromLatitudeLongitude as l,toUtm as c,toUsng as p,toMgrs as u,toLatitudeLongitude as m}from"../../../geometry/coordinateFormatter.js";import{isLoaded as d,project as h}from"../../../geometry/projectionUtils.js";import f from"../../../geometry/SpatialReference.js";import{equals as v}from"../../../geometry/support/spatialReferenceUtils.js";import{project as g}from"../../../geometry/support/webMercatorUtils.js";import{isValidPoint as y,fromXY as w,pointToCoordinate as b,getDegreePrecision as S}from"./coordinateConversionUtils.js";let _=class extends t{constructor(e){super(e),this.conversionInfo=null,this.coordinateSegments=null,this._currentPattern=void 0,this.defaultPattern=null,this.name=null,this.viewModel=null}get currentPattern(){return(this._currentPattern||this.defaultPattern)??""}set currentPattern(e){this._currentPattern=e}get label(){return this.name??""}set label(e){this._overrideIfSome("label",e)}get hasDisplayProperties(){return!(!this.defaultPattern||!this.coordinateSegments)}get spatialReference(){return"basemap"===this.name?this._viewSpatialReference:this.conversionInfo?.spatialReference??f.WGS84}set spatialReference(e){this._overrideIfSome("spatialReference",e)}get _viewSpatialReference(){return this.viewModel?.view?.spatialReference??f.WGS84}get _additionalCharactersPattern(){const e=this.coordinateSegments;if(!e)return null;const t=e.map(e=>e.alias),r=this.currentPattern.replaceAll(new RegExp(`["nsew${t.join()}]`,"gi"),"").replaceAll(" ","");return new RegExp(`[${r}]`,"g")}get test(){}async convert(e){if(!y(e))throw new r("format:invalid-point","Could not convert invalid point.",{point:e});const t=this.conversionInfo?.convert;if(t)return Promise.resolve().then(()=>t(e));const n=this._project(e,this.spatialReference);return{location:n,coordinate:this._getCoordinate(n)}}getConversionStrategy(){const e=this._viewSpatialReference;return this.conversionInfo?.convert||this.viewModel?.formatterAvailable||"xy"===this.name&&(e.isWebMercator||e.isWGS84)||"basemap"===this.name?"client":"server"}getDisplayCoordinate(e){if(!e)return null;if(!this.coordinateSegments||!this.currentPattern)return e;let t=this.currentPattern;const r=this._getSegmentMatches(e,!1);for(let n=this.coordinateSegments.length-1;n>=0;n--){const e=this.coordinateSegments[n];t=t.replace(e.alias,r[n])}return t}_parseUserInput(e){const{defaultPattern:t,_additionalCharactersPattern:r,coordinateSegments:n}=this;if(!t||!r)return"";let o=t.replace(r,"");e=e.replace(r,"");const i=this._getSegmentMatches(e,!0);if(n)for(let s=n.length-1;s>=0;s--){const e=n[s];o=o.replace(e.alias,i[s])}return o}_getSegmentMatches(e,t){const r=new Array,{coordinateSegments:n}=this;if(!n)return r;for(let o=0;o<n.length;o++){const i=n[o],s=e.match(i.searchPattern);if(!s){r.push("");continue}let a=s[0];if(e=e.replace(a,"").trim(),i.substitution){const e=t?i.substitution.input(a):i.substitution.output(a);e&&(a=`${e}`)}r.push(a)}return r}async reverseConvert(e){const t=this._parseUserInput(e),n=this.conversionInfo?.reverseConvert;let o;if(n)o=n(t);else if("xy"===this.name||"basemap"===this.name)o=w(t,this.spatialReference);else if(this.viewModel?.formatterAvailable)switch(this.name){case"dd":case"ddm":case"dms":o=l(t,this.spatialReference);break;case"mgrs":{const e="automatic";o=a(t,this.spatialReference,e);break}case"utm":{const e="latitude-band-indicators";o=s(t,this.spatialReference,e);break}case"usng":o=i(t,this.spatialReference);break;default:o=null}if(!o)throw new r("format:invalid-input","Could not parse input into point.",{coordinate:e});return this._project(o,this._viewSpatialReference)}_getCoordinate(e){const t=this.viewModel?.view?.scale??0;if(!y(e))throw new r("format:invalid-point","Could not transform invalid point into coordinate.",{point:e});if(this.viewModel?.formatterAvailable||"basemap"===this.name||"xy"===this.name)switch(this.name){case"dd":case"ddm":case"dms":{const r=S(t);return m(e,this.name,r)}case"mgrs":return u(e,"automatic",5,!1);case"usng":return p(e,5,!1);case"utm":return c(e,"latitude-band-indicators",!0);default:return b(e,t)}return b(e,t)}_project(e,t){if(v(e.spatialReference,t)||!t)return e;if(this.viewModel?.formatterAvailable&&d())return h(e,t);if(!this.viewModel?.formatterAvailable){const r=g(e,t);if(null!=r)return r}return null}};e([n()],_.prototype,"conversionInfo",void 0),e([n()],_.prototype,"coordinateSegments",void 0),e([n()],_.prototype,"currentPattern",null),e([n()],_.prototype,"_currentPattern",void 0),e([n()],_.prototype,"label",null),e([n()],_.prototype,"defaultPattern",void 0),e([n({readOnly:!0})],_.prototype,"hasDisplayProperties",null),e([n()],_.prototype,"name",void 0),e([n({type:f})],_.prototype,"spatialReference",null),e([n()],_.prototype,"viewModel",void 0),e([n({readOnly:!0})],_.prototype,"_viewSpatialReference",null),e([n({readOnly:!0})],_.prototype,"_additionalCharactersPattern",null),_=e([o("esri.widgets.CoordinateConversion.support.Format")],_);const R=_;export{R as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import"../../intl.js";import e from"../../PopupTemplate.js";import o from"../../core/Error.js";import{isAbortError as
|
|
5
|
+
import{__decorate as t}from"tslib";import"../../intl.js";import e from"../../PopupTemplate.js";import{deprecateUnnecessaryViewModel as o}from"../../core/deprecate.js";import r from"../../core/Error.js";import a from"../../core/Logger.js";import{isAbortError as i}from"../../core/promiseUtils.js";import{property as l}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{removeSelectedFeature as c}from"../Popup/actions.js";import p from"../support/GeolocationPositioning.js";import{getCurrentPosition as n}from"../support/geolocationUtils.js";import{onLocaleChange as d}from"../../intl/locale.js";import{fetchMessageBundle as u}from"../../intl/messages.js";async function m(){const t=await u("esri/widgets/Locate/t9n/Locate");return new e({title:t.currentLocation,fieldInfos:[{fieldName:"timestamp",label:t.timestamp,format:{dateFormat:"short-date-short-time"}},{fieldName:"latitude",label:t.latitude,format:{places:4,digitSeparator:!0}},{fieldName:"longitude",label:t.longitude,format:{places:4,digitSeparator:!0}},{fieldName:"accuracy",label:t.accuracy,format:{places:0,digitSeparator:!0}},{fieldName:"altitude",label:t.altitude,format:{places:0,digitSeparator:!0}},{fieldName:"altitudeAccuracy",label:t.altitudeAccuracy,format:{places:0,digitSeparator:!0}},{fieldName:"heading",label:t.heading,format:{places:0,digitSeparator:!0}},{fieldName:"speed",label:t.speed,format:{places:0,digitSeparator:!0}}],actions:[c.clone()],content:[{type:"fields"}]})}let h=class extends p{constructor(t){super(t),this._locateController=null,this.error=void 0,this.popupEnabled=!0,this.locate=this.locate.bind(this),t?.isDefaultViewModel||o(a.getLogger(this),"LocateViewModel","arcgis-locate",{version:"4.34"})}initialize(){this.addHandles([d(()=>{const{graphic:t,view:e}=this;if(!t)return;const o=e?.graphics?.includes(t);o&&this._updatePopupTemplate(t)})])}destroy(){this.cancelLocate()}get state(){return this._geolocationUsable?this.view?.ready?this._locateController?"locating":null!=this.error?"error":"ready":"disabled":"feature-unsupported"}async locate(){if(this.cancelLocate(),"disabled"===this.state)throw new r("locate:disabled-state","Cannot locate when disabled.");if("feature-unsupported"===this.state)throw new r("locate:feature-unsupported-state","Cannot locate in unsecure domain.");const t=new AbortController;this._locateController=t,this.error=void 0;try{const e=await n(this.geolocationOptions);if(await this.updatePosition(e,t),this._locateController!==t)return null;const{graphic:o}=this;return o&&await this._updatePopupTemplate(o),this._addGraphic(),this.emit("locate",{position:e}),this._locateController=null,e}catch(e){if(i(e))return null;throw t===this._locateController&&(this._locateController=null),this.error=e,this.emit("locate-error",{error:e}),e}}cancelLocate(){this._clearGraphic(),this._locateController&&this._locateController.abort(),this._locateController=null}async _updatePopupTemplate(t){if(!this.popupEnabled)return;const e=await m(),o=t!==this.graphic;this.destroyed||o||(t.popupTemplate=e)}};t([l()],h.prototype,"_locateController",void 0),t([l()],h.prototype,"error",void 0),t([l()],h.prototype,"popupEnabled",void 0),t([l({readOnly:!0})],h.prototype,"state",null),t([l()],h.prototype,"locate",null),t([l()],h.prototype,"cancelLocate",null),h=t([s("esri.widgets.Locate.LocateViewModel")],h);const f=h;export{f as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{rad2deg as t}from"../../core/mathUtils.js";import{throwIfAborted as e}from"../../core/promiseUtils.js";import{formatArea as n,formatLength as r}from"../../core/quantityFormatUtils.js";import{createArea as a,createLength as o}from"../../core/quantityUtils.js";import{set as s,determinant as i}from"../../core/libs/gl-matrix-2/math/mat3.js";import{create as c}from"../../core/libs/gl-matrix-2/factories/mat3f64.js";import{zeros as u,fromValues as l}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{distance as f}from"../../core/libs/gl-matrix-2/math/vec2.js";import{i as m,h as p,a as h}from"../../chunks/vec32.js";import y from"../../geometry/Point.js";import g from"../../geometry/Polygon.js";import x from"../../geometry/Polyline.js";import{projectWithZConversion as w,project as M}from"../../geometry/projectionUtils.js";import R from"../../geometry/SpatialReference.js";import{e as d}from"../../chunks/areaOperator.js";import{l as z,e as P}from"../../chunks/geodeticAreaOperator.js";import{l as v,e as j}from"../../chunks/geodeticDensifyOperator.js";import{l as b,e as O}from"../../chunks/geodeticLengthOperator.js";import{e as E}from"../../chunks/lengthOperator.js";import{e as L}from"../../chunks/simplifyOperator.js";import{isSupported as q,geodesicLengths as I,geodesicAreas as W}from"../../geometry/support/geodesicUtils.js";import{imageToWorldPanoramic as k,imageToWorld as G}from"../../layers/orientedImagery/transformations/imageToWorld.js";import{convertSphereVertexToPixelLocation as A,scaleWithFactor as D}from"../../layers/orientedImagery/transformations/utils.js";import{worldToImagePanoramic as U,worldToImage as B}from"../../layers/orientedImagery/transformations/worldToImage.js";const S=1e5;function F(t,e){let n=180*Math.atan2(-t.y+e.y,t.x-e.x)/Math.PI;return n<0&&(n+=180),n*Math.PI/180}function T(t,e){let n=180*Math.atan2(-t.y+e.y,t.x-e.x)/Math.PI;return n<0&&(n+=180),n*Math.PI/180}function H(t,e,n){if(!t?.length||!e?.length||!n)return;const[r,a]=t,[,o]=e,s=o-a;return[r+s*Math.cos(n),a+s*Math.sin(n)]}async function V(t,e,n){if(await v(),q(t)){const t=I([e],"meters")[0];return{area:W([n],"square-meters")[0],perimeter:t}}const r=R.WGS84,a=M(e,r),o=M(n,r);let s=j(o,S);if(s=s?L(s):null,!s)return null;const i=I([a],"meters")[0];return{area:W([s],"square-meters")[0],perimeter:i}}async function C(t,n,r,a,o=!1,s){if(n.length<2||!a||!r||!t)return null;const i=Mt(r,t);if(!i)return null;const c=n.map(t=>[t.x,t.y]),u=c.at(0),l=c.at(-1);if(!u||!l)return null;const f=i.map(e=>bt([u,l],e,t,o,!1)),m=await Promise.all(f);e(s);let p=0;for(const e of m){if(!e)return null;const t=Math.abs(e-a);p=Math.max(t,p)}return p}async function J(t,n,r,a,o,s=!1,i){if(n.length<2||!a||!r||!t)throw new Error("Missing parameters");const c=Rt(r,t),u=n.map(t=>[t.x,t.y]),l=u.at(0),f=u.at(-1),m=c.map(e=>Ot([l,f],e,t,o,s,!1)),p=await Promise.all(m);e(i);let h=0;for(const e of p){if(!e)return 0;const t=Math.abs(e-a);h=Math.max(t,h)}return h}function K(t,e,n=1){const r=xt(t,!1);if(!r?.length)return;return 20*f([r[0].x,r[0].y],[r.at(-1).x,r.at(-1).y])*n/e}async function N(t){await b();const e=t.spatialReference;if(e.isGeographic){if(q(e))return I([t],"meters")[0];const n=M(t,R.WGS84);return I([n],"meters")[0]}return e.isWebMercator?O(t):E(t)}function Q(t){if(!t?.length)throw new Error("Invalid deviations array");const[e,n,r]=[0,1,2].map(e=>t.map(t=>t[e]).filter(t=>null!==t)).map(t=>t.length?Pt(t):0);return[e,n,r]}function X(t,e){const n=L(e);if(!n)return null;const r=E(t);return{area:d(n),perimeter:r}}function Y(t,e){return[(t[1][0]-t[0][0])/e,(t[1][1]-t[0][1])/e,(t[1][2]-t[0][2])/e]}async function Z(t,e){await Promise.all([z(),v(),b()]);let n=j(e,S);if(n=n?L(n):null,!n)return null;const r=O(t);return{area:P(n),perimeter:r}}async function $(t,n,r){if(!n||!t)throw new Error("Missing required parameters");const a=await G(t,n);e(r);const o=a.clone();o.z?o.z+=20:o.z=20;const{averageElevation:s,cameraPitch:i,cameraRoll:c,farDistance:u,...l}=n;return B(o,l)}async function _(t,n,r,a){const{attributes:o}=r,{location:s}=o,{updateElevationProps:i,...c}=n;if(!t||!n)throw new Error("Missing parameters");let u=s.clone();u.spatialReference.isGeographic&&(u=await w(u,R.WebMercator));const l=await k(t,{...c,cameraLocation:u},i);e(a);const f=l.clone();return f.z?f.z+=20:f.z=20,U(f,c)}function tt(t,e,n,r,a=0,o=1,s){const{averageElevation:i,cameraPitch:c,cameraRoll:u,farDistance:l,...m}=r;if(a>=5||o<=.1){return{value:t*jt(r.cameraLocation.spatialReference)}}const p=new y({x:e.x,y:e.y,z:e.z?e.z+t:t,spatialReference:r.cameraLocation.spatialReference}),h=B(p,m),g=f([n[0].x,n[0].y],[h.x,h.y]),x=n.at(0),w=n.at(-1);if(!x||!w)return null;const M=f([x.x,x.y],[w.x,w.y])*t/g;return tt(M,e,n,r,a+1,Math.abs(t-M))}function et(t,e,n,r,a=0,o=1,s){const{averageElevation:i,horizontalFieldOfView:c,verticalFieldOfView:u,farDistance:l,...m}=r;if(a>=5||o<=.1){return{value:t*jt(r.cameraLocation.spatialReference)}}const p=new y({x:e.x,y:e.y,z:e.z?e.z+t:t,spatialReference:r.cameraLocation.spatialReference}),h=U(p,m),g=f([n[0].x,n[0].y],[h.x,h.y]),x=n.at(0),w=n.at(-1);if(!x||!w)return null;const M=f([x.x,x.y],[w.x,w.y])*t/g;return et(M,e,n,r,a+1,Math.abs(t-M))}function nt(t,e,n){return new x({paths:[[[t.x,t.y,t.z??0],[e.x,e.y,e.z??0]]],spatialReference:n})}function rt(t){return 1/Math.cos(Math.PI/2-2*Math.atan(Math.exp(-1*t/6378137)))}function at(t,e){return Math.sqrt((Math.sqrt((t[0][0]-t[1][0])**2+(t[0][1]-t[1][1])**2)/e)**2+(t[0][2]-t[1][2])**2)}function ot(t,e){return Math.sqrt((t[0][0]-t[1][0])**2+(t[0][1]-t[1][1])**2)/e}function st(e){return t(Math.atan((e[1][2]-e[0][2])/Math.sqrt((e[1][0]-e[0][0])**2+(e[1][1]-e[0][1])**2)))}function it(e){let n=90-t(Math.atan2(e[1][1]-e[0][1],e[1][0]-e[0][0]));return n<0&&(n+=360),n}function ct(t,e){return new y({x:(t.pointOnA[0]+t.pointOnB[0])/2,y:(t.pointOnA[1]+t.pointOnB[1])/2,z:(t.pointOnA[2]+t.pointOnB[2])/2,spatialReference:e})}async function ut(t){if(2===t?.length){const e=[];let n=1;const[r,a]=t,o=r.camera.spatialReference,{measurePoints:s}=r;for(let t=0;t<s.length;t++){const s=nt(r.camera,r.measurePoints[t],o),i=nt(a.camera,a.measurePoints[t],o),c=await Wt(s,i);if(!c)return null;const u=ct(c,o);u.spatialReference.isWebMercator&&(n=rt(u.y)),e.push([u.x,u.y,u.z??0])}if(e?.length>1){return{distance:at(e,n),horizontalDistance:ot(e,n),verticalDistance:Math.abs(e[0][2]-e[1][2]),slope:st(e),aspect:it(e)}}}return null}async function lt(t){const e=t[0].camera.spatialReference;if(2!==t?.length)return null;const[n,r]=t,{camera:a,measurePoints:o}=n,{camera:s,measurePoints:i}=r,c=nt(a,o[0],e),u=nt(s,i[0],e),l=await Wt(c,u);return l?ct(l,e)??null:null}async function ft(t,e){if(!t?.length)return null;const n=[],r=t[0],a=t[1],o=r.camera.spatialReference,{measurePoints:s}=r;for(let l=0;l<s.length;l++){const t=nt(r.camera,r.measurePoints[l],o),e=nt(a.camera,a.measurePoints[l],o),s=await Wt(t,e);if(!s)return null;const i=ct(s,o);n.push([i.x,i.y,i.z??0])}if(n?.length<2)return null;const i=new x({paths:[n],spatialReference:e}),c=new g({rings:[n],spatialReference:e});if(e.isGeographic){const t=await V(e,i,c);return t?.area??null}if(e.isWebMercator){const t=await Z(i,c);return t?.area??null}const u=X(i,c);return u?.area??null}function mt(t,e){if(!t)return null;return{camera:e.geometry.clone(),measurePoints:Array.isArray(t)?t:[t]}}async function pt(t,e){const{updateElevationProps:n,...r}=e;return await G(t,r,n)}async function ht(t,e){const{updateElevationProps:n,...r}=e;return k(t,r,n)}function yt(t){navigator.clipboard.writeText(t).catch(t=>{throw t})}function gt(t){const e=t.map(t=>[t.x,t.y]),n=t[0].spatialReference;return new x({paths:[e],spatialReference:n})}function xt(t,e){return t.map(t=>({x:e?.5+t[0]:t[0],y:e?.5-t[1]:t[1]}))}function wt(t,e,n,a,s){const i="measurement"===t?e:n;if(s&&i)return r(a,o(i,"meters"),s,3)||null}function Mt(t,e){const{cameraPitch:n,cameraRoll:r,cameraLocation:a}=t,{x:o,y:s,z:i,spatialReference:c}=a;if(e.every(t=>0===t)||!e||!e.length)return null;const[u,l,,f,m]=e,p=[-f,0,f],h=[-m,0,m],g=[-u,0,u],x=[-l,0,l],w=[];for(const M of p)for(const e of h)for(const a of g)for(const u of g)for(const l of x){const f={...t};f.cameraPitch=n+M,f.cameraRoll=r+e,f.cameraLocation=new y({x:o+a,y:s+u,z:i?i+l:0,spatialReference:{wkid:c.wkid}}),w.push(f)}return w}function Rt(t,e){const{cameraHeading:n,cameraLocation:r}=t,{x:a,y:o,z:s,spatialReference:i}=r;if(e.every(t=>0===t)||!e||!e.length)throw new Error("Invalid parameters");const[c,u,l]=e,f=l>0?[-l,0,l]:[],m=c>0?[-c,0,c]:[],p=u>0?[-u,0,u]:[],h=[];for(const g of f)for(const e of m)for(const r of m)for(const c of p){const u={...t};u.cameraHeading=n+g,u.cameraLocation=new y({x:a+e,y:o+r,z:s?s+c:0,spatialReference:{wkid:i.wkid}}),h.push(u)}return h}function dt(t,e,n,a,s){const i="measurement"===t?e:Pt(n);if(s&&i)return r(a,o(i,"meters"),s,3)||null}function zt(t,e,r,o,s){const i="measurement"===t?e:r;if(s&&i)return n(o,a(i,"square-meters"),s,3)||null}function Pt(t){return Math.sqrt(t.reduce((t,e)=>t+e**2,0))}function vt(t,e,n){if("default"===e)return t;const r={x:t[0],y:t[1],z:t[2]},a=A(r,n[0],n[1]);return[a.x,a.y]}function jt(t){return t.metersPerUnit}async function bt(t,n,r,a=!1,o=!1,s){if(!t||!n||t.length<2)return null;const i=xt(t,a);if(!i||i.length<2)return null;const[c,u]=[i[0],i.at(-1)];if(!u)return null;const l=[c],m=await G(c,n);e(s);const p=m.clone();p.z?p.z+=20:p.z=20;const{averageElevation:h,cameraPitch:y,cameraRoll:g,farDistance:x,...w}=n,M=B(p,w),R=f([c.x,c.y],[M.x,M.y]),d=F(c,M);if(!d)return;const z=H([c.x,c.y],[u.x,u.y],d);if(!z?.length)return;l.push({x:z[0],y:z[1]});const P=20*f([l[0].x,l[0].y],[l[1].x,l[1].y])*jt(n.cameraLocation.spatialReference)/R;if(!o)return P;const v=tt(P,m,l,n,0,1);return v?.value}async function Ot(t,n,r,a,o=!1,s=!1,i){const{attributes:c}=a,{location:u}=c,{updateElevationProps:l,...m}=n;if(!t||!n||t.length<2)throw new Error("Invalid parameters");const p=xt(t,o),[h,y]=[p[0],p.at(-1)],g=[h];let x=u.clone();x.spatialReference.isGeographic&&(x=await w(x,R.WebMercator));const M=await k(h,{...m,cameraLocation:x},l);e(i);const d=M.clone();d.z?d.z+=20:d.z=20;const z=U(d,m),P=f([h.x,h.y],[z.x,z.y]),v=F(h,z);if(!v)return;const j=H([h.x,h.y],[y.x,y.y],v);if(!j?.length)return;g.push({x:j[0],y:j[1]});const b=20*f([g[0].x,g[0].y],[g[1].x,g[1].y])*jt(n.cameraLocation.spatialReference)/P;if(!s)return b;const O=et(b,M,g,n,0,1);return O?.value}async function Et(t,e,n=!1){if(t.length<3)return null;const r=xt(t,n),a=await pt(r,e),o=a.map(({x:t,y:e})=>[t,e]);t.push(t[0]),o.push(o[0]);const s=a[0].spatialReference,i=new x({paths:[o],spatialReference:s}),c=new g({rings:[o],spatialReference:s});return s.isGeographic?V(s,i,c):s.isWebMercator?Z(i,c):X(i,c)}async function Lt(t,n,r=!1,a){if(t.length<3)return null;const o=xt(t,r),s=await ht(o,n);e(a);const i=s.map(({x:t,y:e})=>[t,e]);t.push(t[0]),i.push(i[0]);const c=s[0].spatialReference,u=new x({paths:[i],spatialReference:c}),l=new g({rings:[i],spatialReference:c});return c.isGeographic?V(c,u,l):c.isWebMercator?Z(u,l):X(u,l)}async function qt(t,e,n=!1){const r=xt(t,n);return N(gt(await pt(r,e)))}async function It(t,n,r=!1,a){const o=xt(t,r),s=await ht(o,n);e(a);return N(gt(s))}async function Wt(t,e){const n=c(),r=t.paths[0][0],a=e.paths[0][0];let o,u;t.spatialReference.isWGS84||t.spatialReference.isWebMercator?(await b(),o=O(t),u=O(e)):(o=E(t),u=E(e));const l=Y(t.paths[0],o),f=Y(e.paths[0],u),m=kt(l,f),[p,h,y]=l,[g,x,w]=f.map(t=>-t),[M,R,d]=m,[z,P,v]=[a[0]-r[0],a[1]-r[1],a[2]-r[2]];s(n,p,g,M,h,x,R,y,w,d);const j=i(n);if(0===j)return null;s(n,z,g,M,P,x,R,v,w,d);const L=i(n);s(n,p,z,M,h,P,R,y,v,d);const q=i(n);s(n,p,g,z,h,x,P,y,w,v);const I=L/j,W=q/j,k=i(n)/j;return{distance:Math.abs(k/Math.sqrt(m[0]*m[0]+m[1]*m[1]+m[2]*m[2])),pointOnA:Gt(r,I,l),pointOnB:Gt(a,W,f)}}function kt(t,e){const n=u(),r=m(u(),t[0],t[1],t[2]),a=m(u(),e[0],e[1],e[2]),o=p(n,r,a);return[o[0],o[1],o[2]]}function Gt(t,e,n){return[t[0]+e*n[0],t[1]+e*n[1],t[2]+e*n[2]]}function At(t,e){const n=l(t[0],t[1],t[2]),r=l(e[0],e[1],e[2]);return h(u(),n,r)}function Dt(t,e,n){const r=D(t,e,n);return[r[0],r[1],r[2]]}export{F as calculateAngle,T as calculateAnglePano,H as calculateCorrectedPixel,C as calculateHeightAccuracy,J as calculateHeightAccuracyPanoramic,K as calculateHeightFromTemporaryDistance,Q as calculateLocationAccuracyFromDeviations,_ as calculateReferenceImagePointPanoramic,$ as calculateTempImagePoint,tt as computeHeightIteratively,et as computeHeightIterativelyPanoramic,ft as computeTriangulatedAreaMeasurement,ut as computeTriangulatedDistanceMeasurement,lt as computeTriangulatedPoint,mt as computeTriangulatedVector,yt as copyToClipboard,xt as formatPixels,Mt as generateCombinations,Rt as generateCombinationsPanoramic,zt as getConvertedArea,dt as getConvertedDistance,wt as getConvertedHeight,vt as getModeCorrectedPoint,Pt as getRootOfSumOfSquaredErrors,jt as getUnitRateFromSpatialReference,bt as heightMeasurement2D,Ot as heightMeasurementPanoramic,Et as pixelAreaMeasurement2D,Lt as pixelAreaMeasurementPanoramic,qt as pixelDistanceMeasurement2D,It as pixelDistanceMeasurementPanoramic,Dt as scale,Wt as solveSkewLinesIntersection,At as subtract};
|
|
5
|
+
import{rad2deg as t}from"../../core/mathUtils.js";import{throwIfAborted as e}from"../../core/promiseUtils.js";import{formatArea as n,formatLength as r}from"../../core/quantityFormatUtils.js";import{createArea as a,createLength as o}from"../../core/quantityUtils.js";import{set as i,determinant as s}from"../../core/libs/gl-matrix-2/math/mat3.js";import{create as c}from"../../core/libs/gl-matrix-2/factories/mat3f64.js";import{zeros as u,fromValues as l}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{distance as f}from"../../core/libs/gl-matrix-2/math/vec2.js";import{i as m,h as p,a as h}from"../../chunks/vec32.js";import y from"../../geometry/Point.js";import g from"../../geometry/Polygon.js";import x from"../../geometry/Polyline.js";import{projectWithZConversion as w,project as M}from"../../geometry/projectionUtils.js";import R from"../../geometry/SpatialReference.js";import{e as d}from"../../chunks/areaOperator.js";import{l as z,e as P}from"../../chunks/geodeticAreaOperator.js";import{l as v,e as j}from"../../chunks/geodeticDensifyOperator.js";import{l as b,e as O}from"../../chunks/geodeticLengthOperator.js";import{e as E}from"../../chunks/lengthOperator.js";import{e as L}from"../../chunks/simplifyOperator.js";import{isSupported as I,geodesicLengths as W,geodesicAreas as k}from"../../geometry/support/geodesicUtils.js";import{imageToWorldPanoramic as q,imageToWorld as G}from"../../layers/orientedImagery/transformations/imageToWorld.js";import{convertSphereVertexToPixelLocation as A,scaleWithFactor as D}from"../../layers/orientedImagery/transformations/utils.js";import{worldToImagePanoramic as U,worldToImage as B}from"../../layers/orientedImagery/transformations/worldToImage.js";const S=1e5,F="meters",T="square-meters";function H(t,e){let n=180*Math.atan2(-t.y+e.y,t.x-e.x)/Math.PI;return n<0&&(n+=180),n*Math.PI/180}function V(t,e){let n=180*Math.atan2(-t.y+e.y,t.x-e.x)/Math.PI;return n<0&&(n+=180),n*Math.PI/180}function C(t,e,n){if(!t?.length||!e?.length||!n)return;const[r,a]=t,[,o]=e,i=o-a;return[r+i*Math.cos(n),a+i*Math.sin(n)]}async function J(t,e,n){if(await v(),I(t)){const t=W([e],F)[0];return{area:k([n],T)[0],perimeter:t}}const r=R.WGS84,a=M(e,r),o=M(n,r);let i=j(o,S);if(i=i?L(i):null,!i)return null;const s=W([a],F)[0];return{area:k([i],T)[0],perimeter:s}}async function K(t,n,r,a,o=!1,i){if(n.length<2||!a||!r||!t)return null;const s=dt(r,t);if(!s)return null;const c=n.map(t=>[t.x,t.y]),u=c.at(0),l=c.at(-1);if(!u||!l)return null;const f=s.map(e=>Et([u,l],e,t,o,!1)),m=await Promise.all(f);e(i);let p=0;for(const e of m){if(!e)return null;const t=Math.abs(e-a);p=Math.max(t,p)}return p}async function N(t,n,r,a,o,i=!1,s){if(n.length<2||!a||!r||!t)throw new Error("Missing parameters");const c=zt(r,t),u=n.map(t=>[t.x,t.y]),l=u.at(0),f=u.at(-1),m=c.map(e=>Lt([l,f],e,t,o,i,!1)),p=await Promise.all(m);e(s);let h=0;for(const e of p){if(!e)return 0;const t=Math.abs(e-a);h=Math.max(t,h)}return h}function Q(t,e,n=1){const r=Mt(t,!1);if(!r?.length)return;return 20*f([r[0].x,r[0].y],[r.at(-1).x,r.at(-1).y])*n/e}async function X(t){await b();const e=t.spatialReference;if(e.isGeographic){if(I(e))return W([t],F)[0];const n=M(t,R.WGS84);return W([n],F)[0]}return e.isWebMercator?O(t,{unit:F}):E(t,{unit:F})}function Y(t){if(!t?.length)throw new Error("Invalid deviations array");const[e,n,r]=[0,1,2].map(e=>t.map(t=>t[e]).filter(t=>null!==t)).map(t=>t.length?jt(t):0);return[e,n,r]}function Z(t,e){const n=L(e);if(!n)return null;const r=E(t,{unit:F});return{area:d(n,{unit:T}),perimeter:r}}function $(t,e){return[(t[1][0]-t[0][0])/e,(t[1][1]-t[0][1])/e,(t[1][2]-t[0][2])/e]}async function _(t,e){await Promise.all([z(),v(),b()]);let n=j(e,S);if(n=n?L(n):null,!n)return null;const r=O(t,{unit:F});return{area:P(n,{unit:T}),perimeter:r}}async function tt(t,n,r){if(!n||!t)throw new Error("Missing required parameters");const a=await G(t,n);e(r);const o=a.clone();o.z?o.z+=20:o.z=20;const{averageElevation:i,cameraPitch:s,cameraRoll:c,farDistance:u,...l}=n;return B(o,l)}async function et(t,n,r,a){const{attributes:o}=r,{location:i}=o,{updateElevationProps:s,...c}=n;if(!t||!n)throw new Error("Missing parameters");let u=i.clone();u.spatialReference.isGeographic&&(u=await w(u,R.WebMercator));const l=await q(t,{...c,cameraLocation:u},s);e(a);const f=l.clone();return f.z?f.z+=20:f.z=20,U(f,c)}function nt(t,e,n,r,a=0,o=1,i){const{averageElevation:s,cameraPitch:c,cameraRoll:u,farDistance:l,...m}=r;if(a>=5||o<=.1){return{value:t*Ot(r.cameraLocation.spatialReference)}}const p=new y({x:e.x,y:e.y,z:e.z?e.z+t:t,spatialReference:r.cameraLocation.spatialReference}),h=B(p,m),g=f([n[0].x,n[0].y],[h.x,h.y]),x=n.at(0),w=n.at(-1);if(!x||!w)return null;const M=f([x.x,x.y],[w.x,w.y])*t/g;return nt(M,e,n,r,a+1,Math.abs(t-M))}function rt(t,e,n,r,a=0,o=1,i){const{averageElevation:s,horizontalFieldOfView:c,verticalFieldOfView:u,farDistance:l,...m}=r;if(a>=5||o<=.1){return{value:t*Ot(r.cameraLocation.spatialReference)}}const p=new y({x:e.x,y:e.y,z:e.z?e.z+t:t,spatialReference:r.cameraLocation.spatialReference}),h=U(p,m),g=f([n[0].x,n[0].y],[h.x,h.y]),x=n.at(0),w=n.at(-1);if(!x||!w)return null;const M=f([x.x,x.y],[w.x,w.y])*t/g;return rt(M,e,n,r,a+1,Math.abs(t-M))}function at(t,e,n){return new x({paths:[[[t.x,t.y,t.z??0],[e.x,e.y,e.z??0]]],spatialReference:n})}function ot(t){return 1/Math.cos(Math.PI/2-2*Math.atan(Math.exp(-1*t/6378137)))}function it(t,e){return Math.sqrt((Math.sqrt((t[0][0]-t[1][0])**2+(t[0][1]-t[1][1])**2)/e)**2+(t[0][2]-t[1][2])**2)}function st(t,e){return Math.sqrt((t[0][0]-t[1][0])**2+(t[0][1]-t[1][1])**2)/e}function ct(e){return t(Math.atan((e[1][2]-e[0][2])/Math.sqrt((e[1][0]-e[0][0])**2+(e[1][1]-e[0][1])**2)))}function ut(e){let n=90-t(Math.atan2(e[1][1]-e[0][1],e[1][0]-e[0][0]));return n<0&&(n+=360),n}function lt(t,e){return new y({x:(t.pointOnA[0]+t.pointOnB[0])/2,y:(t.pointOnA[1]+t.pointOnB[1])/2,z:(t.pointOnA[2]+t.pointOnB[2])/2,spatialReference:e})}async function ft(t){if(2===t?.length){const e=[];let n=1;const[r,a]=t,o=r.camera.spatialReference,{measurePoints:i}=r;for(let t=0;t<i.length;t++){const i=at(r.camera,r.measurePoints[t],o),s=at(a.camera,a.measurePoints[t],o),c=await Gt(i,s);if(!c)return null;const u=lt(c,o);u.spatialReference.isWebMercator&&(n=ot(u.y)),e.push([u.x,u.y,u.z??0])}if(e?.length>1){return{distance:it(e,n),horizontalDistance:st(e,n),verticalDistance:Math.abs(e[0][2]-e[1][2]),slope:ct(e),aspect:ut(e)}}}return null}async function mt(t){const e=t[0].camera.spatialReference;if(2!==t?.length)return null;const[n,r]=t,{camera:a,measurePoints:o}=n,{camera:i,measurePoints:s}=r,c=at(a,o[0],e),u=at(i,s[0],e),l=await Gt(c,u);return l?lt(l,e)??null:null}async function pt(t,e){if(!t?.length)return null;const n=[],r=t[0],a=t[1],o=r.camera.spatialReference,{measurePoints:i}=r;for(let l=0;l<i.length;l++){const t=at(r.camera,r.measurePoints[l],o),e=at(a.camera,a.measurePoints[l],o),i=await Gt(t,e);if(!i)return null;const s=lt(i,o);n.push([s.x,s.y,s.z??0])}if(n?.length<2)return null;const s=new x({paths:[n],spatialReference:e}),c=new g({rings:[n],spatialReference:e});if(e.isGeographic){const t=await J(e,s,c);return t?.area??null}if(e.isWebMercator){const t=await _(s,c);return t?.area??null}const u=Z(s,c);return u?.area??null}function ht(t,e){if(!t)return null;return{camera:e.geometry.clone(),measurePoints:Array.isArray(t)?t:[t]}}async function yt(t,e){const{updateElevationProps:n,...r}=e;return await G(t,r,n)}async function gt(t,e){const{updateElevationProps:n,...r}=e;return q(t,r,n)}function xt(t){navigator.clipboard.writeText(t).catch(t=>{throw t})}function wt(t){const e=t.map(t=>[t.x,t.y]),n=t[0].spatialReference;return new x({paths:[e],spatialReference:n})}function Mt(t,e){return t.map(t=>({x:e?.5+t[0]:t[0],y:e?.5-t[1]:t[1]}))}function Rt(t,e,n,a,i){const s="measurement"===t?e:n;if(i&&s)return r(a,o(s,F),i,3)||null}function dt(t,e){const{cameraPitch:n,cameraRoll:r,cameraLocation:a}=t,{x:o,y:i,z:s,spatialReference:c}=a;if(e.every(t=>0===t)||!e||!e.length)return null;const[u,l,,f,m]=e,p=[-f,0,f],h=[-m,0,m],g=[-u,0,u],x=[-l,0,l],w=[];for(const M of p)for(const e of h)for(const a of g)for(const u of g)for(const l of x){const f={...t};f.cameraPitch=n+M,f.cameraRoll=r+e,f.cameraLocation=new y({x:o+a,y:i+u,z:s?s+l:0,spatialReference:{wkid:c.wkid}}),w.push(f)}return w}function zt(t,e){const{cameraHeading:n,cameraLocation:r}=t,{x:a,y:o,z:i,spatialReference:s}=r;if(e.every(t=>0===t)||!e||!e.length)throw new Error("Invalid parameters");const[c,u,l]=e,f=l>0?[-l,0,l]:[],m=c>0?[-c,0,c]:[],p=u>0?[-u,0,u]:[],h=[];for(const g of f)for(const e of m)for(const r of m)for(const c of p){const u={...t};u.cameraHeading=n+g,u.cameraLocation=new y({x:a+e,y:o+r,z:i?i+c:0,spatialReference:{wkid:s.wkid}}),h.push(u)}return h}function Pt(t,e,n,a,i){const s="measurement"===t?e:jt(n);if(i&&s)return r(a,o(s,F),i,3)||null}function vt(t,e,r,o,i){const s="measurement"===t?e:r;if(i&&s)return n(o,a(s,T),i,3)||null}function jt(t){return Math.sqrt(t.reduce((t,e)=>t+e**2,0))}function bt(t,e,n){if("default"===e)return t;const r={x:t[0],y:t[1],z:t[2]},a=A(r,n[0],n[1]);return[a.x,a.y]}function Ot(t){return t.metersPerUnit}async function Et(t,n,r,a=!1,o=!1,i){if(!t||!n||t.length<2)return null;const s=Mt(t,a);if(!s||s.length<2)return null;const[c,u]=[s[0],s.at(-1)];if(!u)return null;const l=[c],m=await G(c,n);e(i);const p=m.clone();p.z?p.z+=20:p.z=20;const{averageElevation:h,cameraPitch:y,cameraRoll:g,farDistance:x,...w}=n,M=B(p,w),R=f([c.x,c.y],[M.x,M.y]),d=H(c,M);if(!d)return;const z=C([c.x,c.y],[u.x,u.y],d);if(!z?.length)return;l.push({x:z[0],y:z[1]});const P=20*f([l[0].x,l[0].y],[l[1].x,l[1].y])*Ot(n.cameraLocation.spatialReference)/R;if(!o)return P;const v=nt(P,m,l,n,0,1);return v?.value}async function Lt(t,n,r,a,o=!1,i=!1,s){const{attributes:c}=a,{location:u}=c,{updateElevationProps:l,...m}=n;if(!t||!n||t.length<2)throw new Error("Invalid parameters");const p=Mt(t,o),[h,y]=[p[0],p.at(-1)],g=[h];let x=u.clone();x.spatialReference.isGeographic&&(x=await w(x,R.WebMercator));const M=await q(h,{...m,cameraLocation:x},l);e(s);const d=M.clone();d.z?d.z+=20:d.z=20;const z=U(d,m),P=f([h.x,h.y],[z.x,z.y]),v=H(h,z);if(!v)return;const j=C([h.x,h.y],[y.x,y.y],v);if(!j?.length)return;g.push({x:j[0],y:j[1]});const b=20*f([g[0].x,g[0].y],[g[1].x,g[1].y])*Ot(n.cameraLocation.spatialReference)/P;if(!i)return b;const O=rt(b,M,g,n,0,1);return O?.value}async function It(t,e,n=!1){if(t.length<3)return null;const r=Mt(t,n),a=await yt(r,e),o=a.map(({x:t,y:e})=>[t,e]);t.push(t[0]),o.push(o[0]);const i=a[0].spatialReference,s=new x({paths:[o],spatialReference:i}),c=new g({rings:[o],spatialReference:i});return i.isGeographic?J(i,s,c):i.isWebMercator?_(s,c):Z(s,c)}async function Wt(t,n,r=!1,a){if(t.length<3)return null;const o=Mt(t,r),i=await gt(o,n);e(a);const s=i.map(({x:t,y:e})=>[t,e]);t.push(t[0]),s.push(s[0]);const c=i[0].spatialReference,u=new x({paths:[s],spatialReference:c}),l=new g({rings:[s],spatialReference:c});return c.isGeographic?J(c,u,l):c.isWebMercator?_(u,l):Z(u,l)}async function kt(t,e,n=!1){const r=Mt(t,n);return X(wt(await yt(r,e)))}async function qt(t,n,r=!1,a){const o=Mt(t,r),i=await gt(o,n);e(a);return X(wt(i))}async function Gt(t,e){const n=c(),r=t.paths[0][0],a=e.paths[0][0];let o,u;t.spatialReference.isWGS84||t.spatialReference.isWebMercator?(await b(),o=O(t),u=O(e)):(o=E(t),u=E(e));const l=$(t.paths[0],o),f=$(e.paths[0],u),m=At(l,f),[p,h,y]=l,[g,x,w]=f.map(t=>-t),[M,R,d]=m,[z,P,v]=[a[0]-r[0],a[1]-r[1],a[2]-r[2]];i(n,p,g,M,h,x,R,y,w,d);const j=s(n);if(0===j)return null;i(n,z,g,M,P,x,R,v,w,d);const L=s(n);i(n,p,z,M,h,P,R,y,v,d);const I=s(n);i(n,p,g,z,h,x,P,y,w,v);const W=L/j,k=I/j,q=s(n)/j;return{distance:Math.abs(q/Math.sqrt(m[0]*m[0]+m[1]*m[1]+m[2]*m[2])),pointOnA:Dt(r,W,l),pointOnB:Dt(a,k,f)}}function At(t,e){const n=u(),r=m(u(),t[0],t[1],t[2]),a=m(u(),e[0],e[1],e[2]),o=p(n,r,a);return[o[0],o[1],o[2]]}function Dt(t,e,n){return[t[0]+e*n[0],t[1]+e*n[1],t[2]+e*n[2]]}function Ut(t,e){const n=l(t[0],t[1],t[2]),r=l(e[0],e[1],e[2]);return h(u(),n,r)}function Bt(t,e,n){const r=D(t,e,n);return[r[0],r[1],r[2]]}export{H as calculateAngle,V as calculateAnglePano,C as calculateCorrectedPixel,K as calculateHeightAccuracy,N as calculateHeightAccuracyPanoramic,Q as calculateHeightFromTemporaryDistance,Y as calculateLocationAccuracyFromDeviations,et as calculateReferenceImagePointPanoramic,tt as calculateTempImagePoint,nt as computeHeightIteratively,rt as computeHeightIterativelyPanoramic,pt as computeTriangulatedAreaMeasurement,ft as computeTriangulatedDistanceMeasurement,mt as computeTriangulatedPoint,ht as computeTriangulatedVector,xt as copyToClipboard,Mt as formatPixels,dt as generateCombinations,zt as generateCombinationsPanoramic,vt as getConvertedArea,Pt as getConvertedDistance,Rt as getConvertedHeight,bt as getModeCorrectedPoint,jt as getRootOfSumOfSquaredErrors,Ot as getUnitRateFromSpatialReference,Et as heightMeasurement2D,Lt as heightMeasurementPanoramic,It as pixelAreaMeasurement2D,Wt as pixelAreaMeasurementPanoramic,kt as pixelDistanceMeasurement2D,qt as pixelDistanceMeasurementPanoramic,Bt as scale,Gt as solveSkewLinesIntersection,Ut as subtract};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../core/Error.js";import t from"../../core/Logger.js";import{isAbortError as r,throwIfNotAbortError as o}from"../../core/promiseUtils.js";import{zoomToFeature as i,zoomToClusteredFeatures as n,browseClusteredFeatures as a,removeSelectedFeature as s}from"./actions.js";const c="esri.widgets.Popup.PopupViewModel",u=()=>t.getLogger(c),l=t=>{const{event:r,view:c,viewModel:u}=t,{action:l}=r;if(!l)return Promise.reject(new e("trigger-action:missing-arguments","Event has no action"));const{disabled:d,id:g}=l;if(!g)return Promise.reject(new e("trigger-action:invalid-action","action.id is missing"));if(d)return Promise.reject(new e("trigger-action:invalid-action","Action is disabled"));if(g===i.id)return f(u).catch(o);if(g===n.id)return m(u);if(g===a.id)return u.browseClusterEnabled=!u.browseClusterEnabled,u.featureMenuOpen=u.browseClusterEnabled,Promise.resolve();if(g===s.id){u.visible=!1;const{selectedFeature:t}=u;if(!t)return Promise.reject(new e(`trigger-action:${s.id}`,"selectedFeature is required",{selectedFeature:t}));const{sourceLayer:r}=t;return r?r.remove(t):c?.graphics.remove(t),Promise.resolve()}return Promise.resolve()};function d(e){const{selectedFeature:t,location:r,view:o}=e;return o?t??r??null:null}function g(e){return!!e&&e.isAggregate&&"cluster"===e.sourceLayer?.featureReduction?.type}async function w(e,t){if("3d"!==t?.type||!e||"esri.Graphic"!==e.declaredClass)return!0;const r=t.getViewForGraphic(e);if(r&&"whenGraphicBounds"in r){let t=null;try{t=await r.whenGraphicBounds(e,{useViewElevation:!0})}catch(o){}return!t||!t.boundingBox||t.boundingBox[0]===t.boundingBox[3]&&t.boundingBox[1]===t.boundingBox[4]&&t.boundingBox[2]===t.boundingBox[5]}return!0}async function f(t,o){const{location:n,selectedFeature:a,view:s,zoomFactor:c}=t;await(o?.viewModel?.updateGeometry());const l=o?.graphic,g=l?.geometry?l:d(t);if(!s||!g){const t=new e("zoom-to:invalid-target-or-view","Cannot zoom to location without a target and view.",{target:g,view:s});throw u().error(t),t}const f=s.scale/c,m=l?.geometry??t.selectedFeature?.geometry??n,v=null!=m&&"point"===m.type&&await w(l??a,s);i.active=!0,i.disabled=!0;try{await t.zoomTo({target:{target:g,scale:v?f:void 0}})}catch(p){if(r(p))return;const t=new e("zoom-to:invalid-graphic","Could not zoom to the location of the graphic.",{graphic:l??a});u().error(t)}finally{i.active=!1,i.disabled=!1,t.zoomToLocation=null,v&&(t.location=m)}}async function m(t){const{selectedFeature:r,view:o}=t;if("2d"!==o?.type){const t=new e("zoomToCluster:invalid-view","View must be 2d MapView.",{view:o});throw u().error(t),t}if(!r||!g(r)){const t=new e("zoomToCluster:invalid-selectedFeature","Selected feature must represent an aggregate/cluster graphic.",{selectedFeature:r});throw u().error(t),t}const[i,a]=await y(o,r);n.active=!0,n.disabled=!0;const{extent:s}=await i.queryExtent(a);s&&await t.zoomTo({target:s}),n.active=!1,n.disabled=!1}async function v(e){const{view:t,selectedFeature:r}=e;if(!t||!r)return;const[o,i]=await y(t,r),{extent:n}=await o.queryExtent(i);e.selectedClusterBoundaryFeature.geometry=n,t.graphics.add(e.selectedClusterBoundaryFeature)}async function p(e){const{selectedFeature:t,view:r}=e;if(!r||!t)return;const[o,i]=await y(r,t);a.active=!0,a.disabled=!0;const{features:n}=await o.queryFeatures(i);a.active=!1,a.disabled=!1,a.value=!0;const s={features:[t].concat(n)};"feature"===e?.initialDisplayMode&&(s.featureMenuOpen=!0),e?.open(s)}async function y(e,t){const r=await e.whenLayerView(t.sourceLayer),o=r.createQuery(),i=t.getObjectId();return o.aggregateIds=null!=i?[i]:[],[r,o]}function h(e){a.value=!1;const t=e.features.filter(e=>g(e));t.length&&(e.features=t)}export{p as browseAggregateFeatures,v as displayClusterExtent,d as getSelectedTarget,g as isClusterFeature,h as removeClusteredFeaturesForBrowsing,l as triggerAction,m as zoomToClusterExtent,f as zoomToLocation};
|
|
5
|
+
import e from"../../core/Error.js";import t from"../../core/Logger.js";import{isAbortError as r,throwIfNotAbortError as o}from"../../core/promiseUtils.js";import{zoomToFeature as i,zoomToClusteredFeatures as n,browseClusteredFeatures as a,removeSelectedFeature as s}from"./actions.js";const c="esri.widgets.Popup.PopupViewModel",u=()=>t.getLogger(c),l=t=>{const{event:r,view:c,viewModel:u}=t,{action:l}=r;if(!l)return Promise.reject(new e("trigger-action:missing-arguments","Event has no action"));const{disabled:d,id:g}=l;if(!g)return Promise.reject(new e("trigger-action:invalid-action","action.id is missing"));if(d)return Promise.reject(new e("trigger-action:invalid-action","Action is disabled"));if(g===i.id)return f(u).catch(o);if(g===n.id)return m(u);if(g===a.id)return u.browseClusterEnabled=!u.browseClusterEnabled,u.featureMenuOpen=u.browseClusterEnabled,Promise.resolve();if(g===s.id){u.visible=!1;const{selectedFeature:t}=u;if(!t)return Promise.reject(new e(`trigger-action:${s.id}`,"selectedFeature is required",{selectedFeature:t}));const{sourceLayer:r}=t;return r?r.remove(t):c?.graphics.remove(t),Promise.resolve()}return Promise.resolve()};function d(e){const{selectedFeature:t,location:r,view:o}=e;return o?t??r??null:null}function g(e){return!!e&&e.isAggregate&&"cluster"===e.sourceLayer?.featureReduction?.type}async function w(e,t){if("3d"!==t?.type||!e||"esri.Graphic"!==e.declaredClass)return!0;const r=t.getViewForGraphic(e);if(r&&"whenGraphicBounds"in r){let t=null;try{t=await r.whenGraphicBounds(e,{useViewElevation:!0})}catch(o){}return!t||!t.boundingBox||t.boundingBox[0]===t.boundingBox[3]&&t.boundingBox[1]===t.boundingBox[4]&&t.boundingBox[2]===t.boundingBox[5]}return!0}async function f(t,o){const{location:n,selectedFeature:a,view:s,zoomFactor:c}=t;await(o?.viewModel?.updateGeometry());const l=o?.graphic,g=l?.geometry?l:d(t);if(!s||!g){const t=new e("zoom-to:invalid-target-or-view","Cannot zoom to location without a target and view.",{target:g,view:s});throw u().error(t),t}const f=s.scale/c,m=l?.geometry??t.selectedFeature?.geometry??n,v=null!=m&&"point"===m.type&&await w(l??a,s);i.active=!0,i.disabled=!0;try{await t.zoomTo({target:{target:g,scale:v?f:void 0}})}catch(p){if(r(p))return;const t=new e("zoom-to:invalid-graphic","Could not zoom to the location of the graphic.",{graphic:l??a});u().error(t)}finally{i.active=!1,i.disabled=!1,t.zoomToLocation=null,v&&(t.location=m)}}async function m(t){const{selectedFeature:r,view:o}=t;if("2d"!==o?.type){const t=new e("zoomToCluster:invalid-view","View must be 2d MapView.",{view:o});throw u().error(t),t}if(!r||!g(r)){const t=new e("zoomToCluster:invalid-selectedFeature","Selected feature must represent an aggregate/cluster graphic.",{selectedFeature:r});throw u().error(t),t}const[i,a]=await y(o,r);n.active=!0,n.disabled=!0;const{extent:s}=await i.queryExtent(a);s&&await t.zoomTo({target:s}),n.active=!1,n.disabled=!1}async function v(e){const{view:t,selectedFeature:r}=e;if(!t||!r)return;const[o,i]=await y(t,r),{extent:n}=await o.queryExtent(i);e.selectedClusterBoundaryFeature.geometry=n,t.graphics.add(e.selectedClusterBoundaryFeature)}async function p(e){const{selectedFeature:t,view:r}=e;if(!r||!t)return;const[o,i]=await y(r,t);a.active=!0,a.disabled=!0;const{features:n}=await o.queryFeatures(i);a.active=!1,a.disabled=!1,a.value=!0;const s={features:[t].concat(n)};"feature"===e?.initialDisplayMode&&(s.featureMenuOpen=!0),e?.open(s)}async function y(e,t){const r=await e.whenLayerView(t.sourceLayer),o=r.createQuery(),i=t.getObjectId();return o.aggregateIds=null!=i?[i]:[],[r,o]}function h(e){a.value=!1;const t=e.features.filter(e=>g(e));t.length&&(e.features=t)}export{p as browseAggregateFeatures,v as displayClusterExtent,d as getSelectedTarget,g as isClusterFeature,w as isZoomScreenSize,h as removeClusteredFeaturesForBrowsing,l as triggerAction,m as zoomToClusterExtent,f as zoomToLocation};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3549,8766],{4197:(e,t,r)=>{r.d(t,{Vj:()=>u,cj:()=>a,jh:()=>s,l5:()=>l,xm:()=>o});var i=r(34275),n=r(9093);function s(e){return e<=i.y9?new Array(e).fill(0):new Float64Array(e)}function o(e){return((0,i.iu)(e)?e.byteLength/8:e.length)<=i.y9?Array.from(e):new Float64Array(e)}function l(e,t,r){return Array.isArray(e)?e.slice(t,t+r):e.subarray(t,t+r)}function a(e){return[...e]}function u(e){const t=(0,n.vt)();for(let r=0;r<16;++r)t[r]=e[r];return t}},6455:(e,t,r)=>{r.d(t,{FJ:()=>v,Dp:()=>w,KV:()=>b});var i=r(31635),n=r(93637),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),l=r(89317),a=r(69540),u=r(7762),p=r(25482),d=r(43937),c=r(83960),y=r(13069);const h={write:{overridePolicy:(e,t,r)=>({enabled:!r||"scale"===r.filterMode})}};let m=class extends((0,a.OU)(p.o)){constructor(e){super(e),this.id=(0,y.lk)(),this.maxScale=0,this.minScale=0,this.title="",this.where=null}};(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],m.prototype,"id",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:h})],m.prototype,"maxScale",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:h})],m.prototype,"minScale",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],m.prototype,"title",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],m.prototype,"where",void 0),m=(0,i.Cg)([(0,o.$)("esri.layers.support.DisplayFilter")],m);var f=r(41560);let g=class extends((0,a.OU)(p.o)){constructor(e){super(e),this.activeFilterId=null,this.filters=new(u.A.ofType(m)),this.mode="manual"}writeFilters(e,t,r,i){const n=e.toArray();"scale"===this.mode&&n.sort((e,t)=>{const r=(0,c.oW)(t.minScale,e.minScale),i=e.maxScale-t.maxScale;return 0===r?i:r}),t[r]=n.map(e=>e.toJSON(i))}write(e,t){return super.write(e,(0,f.mW)(this,t))}};(0,i.Cg)([(0,s.MZ)({type:String,json:{write:{overridePolicy:(e,t,r)=>({enabled:"manual"===r.filterMode,isRequired:!0})}}})],g.prototype,"activeFilterId",void 0),(0,i.Cg)([(0,s.MZ)({type:u.A.ofType(m),nonNullable:!0,json:{write:!0}})],g.prototype,"filters",void 0),(0,i.Cg)([(0,d.K)("filters")],g.prototype,"writeFilters",null),(0,i.Cg)([(0,s.MZ)({type:["manual","scale"],nonNullable:!0,json:{name:"filterMode",write:!0}})],g.prototype,"mode",void 0),g=(0,i.Cg)([(0,o.$)("esri.layers.support.DisplayFilterInfo")],g);const v=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.displayFilterEnabled=!0,this.displayFilterInfo=null}};return(0,i.Cg)([(0,s.MZ)(w)],r.prototype,"displayFilterEnabled",void 0),(0,i.Cg)([(0,s.MZ)(b)],r.prototype,"displayFilterInfo",void 0),r=(0,i.Cg)([(0,o.$)("esri.layers.mixins.DisplayFilteredLayer")],r),r},w={type:Boolean,json:{name:"layerDefinition.disableDisplayFilter",read:{reader:e=>!e},write:{layerContainerTypes:l.K,writer(e,t,r){(0,n.sM)(r,!e,t)}},origins:{"web-scene":{write:!1,read:!1}}}},b={type:g,json:{name:"layerDefinition.displayFilterInfo",write:{enabled:!0,allowNull:!0,layerContainerTypes:l.K},origins:{"web-scene":{write:!1,read:!1}}}}},6797:(e,t,r)=>{r.d(t,{Mj:()=>c,Ui:()=>h,w2:()=>y});var i=r(65008),n=r(7762),s=r(88620);const o=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof i.A}function a(e){return e instanceof n.A?Object.keys(e.items):l(e)?(0,s.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof n.A?e.items[t]:e[t]}function p(e){return e?e.declaredClass:null}function d(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const i=a(e),n=a(t);if(0===i.length&&0===n.length)return;if(!i.length||!n.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const s=n.filter(e=>!i.includes(e)),c=i.filter(e=>!n.includes(e)),y=i.filter(r=>n.includes(r)&&u(e,r)!==u(t,r)).concat(s,c).sort(),h=p(e);if(h&&o.has(h)&&y.length)return{type:"complete",oldValue:e,newValue:t};let m;const f=l(e)&&l(t);for(const i of y){const n=u(e,i),s=u(t,i);let o;if((f||"function"!=typeof n&&"function"!=typeof s)&&n!==s&&(null!=n||null!=s)){if(r&&r[i]&&"function"==typeof r[i])o=r[i]?.(n,s);else if(n instanceof Date&&s instanceof Date){if(n.getTime()===s.getTime())continue;o={type:"complete",oldValue:n,newValue:s}}else o="object"==typeof n&&"object"==typeof s&&p(n)===p(s)?d(n,s):{type:"complete",oldValue:n,newValue:s};null!=o&&(null!=m?m.diff[i]=o:m={type:"partial",diff:{[i]:o}})}}return m}function c(e,t){return function(e,t){if(null==e)return!1;const r=t.split(".");let i=e;for(const e of r){if("complete"===i.type)return!0;if("partial"!==i.type)return!1;{const t=i.diff[e];if(!t)return!1;i=t}}return!0}(e,t)}function y(e,t){if(!e)return!1;if("partial"===e.type){const r=Object.keys(e.diff);return 1===r.length&&r[0]===t}return!1}function h(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&p(e)!==p(t)?{type:"complete",oldValue:e,newValue:t}:d(e,t)}},8303:(e,t,r)=>{r.d(t,{A:()=>F});var i=r(31635),n=r(92602),s=r(70333),o=r(78888),l=r(60999),a=r(49186),u=r(53966),p=r(97768),d=r(74887),c=r(84952),y=r(10107),h=(r(44208),r(87811),r(36005)),m=r(40608),f=r(43937),g=r(77548),v=r(20655),w=r(80812),b=r(41318),T=r(10407);const F=e=>{const t=e;let F=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new w.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await r.e(1204).then(r.bind(r,41204));return(0,d.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,d.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,d.QP)(e),!0)))}async setUserPrivileges(e,t){if(!n.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!s.id?.findCredential(this.url),n=e===r.id;if(n&&r.portal.user)return this._getUserPrivileges(r,i);let o,l;if(n)o=r.portal.url;else try{o=await(0,g.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!o||!(0,c.b8)(o,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;l=await(s.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}const a=!0,u=!1,p=!1;if(!l)return{features:{edit:a,fullEdit:u},content:{updateItem:p}};try{if(n?await r.reload():(r=new w.default({id:e,portal:{url:o}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,d.QP)(e)}return{features:{edit:a,fullEdit:u},content:{updateItem:p}}}_getUserPrivileges(e,t){const r=(0,T.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=x.credential===t?x.user:await this._fetchEditingUser(e);return x.credential=t,x.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=v.A.getDefault();if(n&&n.loaded&&(0,c.S8)(n.restUrl)===(0,c.S8)(i))return n.user;const a=`${i}/community/self`,u=null!=e?e.signal:null,p=await(0,l.Ke)((0,o.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?b.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&i&&!(0,c.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i.Cg)([(0,y.MZ)({type:w.default})],F.prototype,"portalItem",null),(0,i.Cg)([(0,h.w)("web-document","portalItem",["itemId"])],F.prototype,"readPortalItem",null),(0,i.Cg)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],F.prototype,"writePortalItem",null),(0,i.Cg)([(0,y.MZ)({clonable:!1})],F.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],F.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],F.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,y.MZ)({type:Boolean,readOnly:!0})],F.prototype,"userHasUpdateItemPrivileges",void 0),F=(0,i.Cg)([(0,m.$)("esri.layers.mixins.PortalLayer")],F),F},x={credential:null,user:null}},9093:(e,t,r)=>{function i(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function n(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}r.d(t,{o8:()=>n,vt:()=>i,zK:()=>s});const s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:n,create:i,fromValues:function(e,t,r,i,n,s,o,l,a,u,p,d,c,y,h,m){return[e,t,r,i,n,s,o,l,a,u,p,d,c,y,h,m]}},Symbol.toStringTag,{value:"Module"}))},13069:(e,t,r)=>{r.d(t,{AG:()=>l,lk:()=>n,vD:()=>o,yS:()=>s});const i="randomUUID"in crypto;function n(){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)}function s(){return`{${n().toUpperCase()}}`}function o(){return`{${n()}}`}function l(e){const t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},15481:(e,t,r)=>{r.r(t),r.d(t,{default:()=>te});var i=r(31635),n=r(13874),s=r(92071),o=r(74887),l=r(84952),a=r(10107),u=r(44208),p=r(53966),d=(r(87811),r(40608)),c=r(5443),y=r(16930),h=r(50498),m=r(99959);const f=Symbol("isGeoJSONGraphicOrigin");var g,v,w=r(37734);class b extends m.A{static{g=f,v=w.s}constructor(e){super(),this[g]=!0,this[v]=!0,this.type="geojson",this.layer=e}get popupProvider(){return this.layer}}var T=r(4146),F=r(49186),x=r(92474),M=r(29953),_=r(39829),I=r(64714),C=r(22671);let S=class extends x.x_{constructor(){super(...arguments),this.type="geojson",this.refresh=(0,o.sg)(async e=>{await this.load();const{extent:t,timeExtent:r}=await this._connection.invoke("refresh",e);return this.sourceJSON.extent=t,r&&(this.sourceJSON.timeInfo.timeExtent=[r.start,r.end]),{dataChanged:!0,updates:{extent:this.sourceJSON.extent,timeInfo:this.sourceJSON.timeInfo}}})}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}applyEdits(e){return this.load().then(()=>this._applyEdits(e))}openPorts(){return this.load().then(()=>this._connection.openPorts())}queryFeatures(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryFeatures",e?e.toJSON():null,t)).then(e=>C.A.fromJSON(e))}queryFeaturesJSON(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryFeatures",e?e.toJSON():null,t))}queryFeatureCount(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t))}queryObjectIds(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryObjectIds",e?e.toJSON():null,t))}queryExtent(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryExtent",e?e.toJSON():null,t)).then(e=>({count:e.count,extent:c.A.fromJSON(e.extent)}))}querySnapping(e,t={}){return this.load(t).then(()=>this._connection.invoke("querySnapping",e,t))}async queryAttributeBins(e,t={}){return await this.load(),this._connection.invoke("queryAttributeBins",e?.toJSON(),t)}_applyEdits(e){if(!this._connection)throw new F.A("geojson-layer-source:edit-failure","Memory source not loaded");const t=this.layer.objectIdField,r=[],i=[],n=[];if(e.addFeatures)for(const t of e.addFeatures)r.push(this._serializeFeature(t));if(e.deleteFeatures)for(const r of e.deleteFeatures)"objectId"in r&&null!=r.objectId?i.push(r.objectId):"attributes"in r&&null!=r.attributes[t]&&i.push(r.attributes[t]);if(e.updateFeatures)for(const t of e.updateFeatures)n.push(this._serializeFeature(t));return this._connection.invoke("applyEdits",{adds:r,updates:n,deletes:i}).then(({extent:e,timeExtent:t,featureEditResults:r})=>(this.sourceJSON.extent=e,t&&(this.sourceJSON.timeInfo.timeExtent=[t.start,t.end]),this._createEditsResult(r)))}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:""};return{objectId:e.objectId,globalId:e.globalId,error:t?new F.A("geojson-layer-source:edit-failure",t.description,{code:t.code}):null}}_serializeFeature(e){const{attributes:t}=e,r=this._geometryForSerialization(e);return r?{geometry:r.toJSON(),attributes:t}:{attributes:t}}_geometryForSerialization(e){const{geometry:t}=e;return null==t?null:"mesh"===t.type||"extent"===t.type?_.A.fromExtent(t.extent):t}async _startWorker(e){this._connection=await(0,M.ho)("GeoJSONSourceWorker",{strategy:(0,u.A)("feature-layers-workers")?"dedicated":"local",signal:e,registryTarget:this});const{fields:t,spatialReference:r,hasZ:i,geometryType:n,objectIdField:s,url:o,timeInfo:l,customParameters:a}=this.layer,d="defaults"===this.layer.originOf("spatialReference"),c={url:o,customParameters:a,fields:t&&t.map(e=>e.toJSON()),geometryType:h.gy.toJSON(n),hasZ:i,objectIdField:s,timeInfo:l?l.toJSON():null,spatialReference:d?null:r&&r.toJSON()},y=await this._connection.invoke("load",c,{signal:e});for(const e of y.warnings)p.A.getLogger(this.layer).warn("#load()",`${e.message} (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{warning:e});y.featureErrors.length&&p.A.getLogger(this.layer).warn("#load()",`Encountered ${y.featureErrors.length} validation errors while loading features. (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{errors:y.featureErrors}),this.sourceJSON=y.layerDefinition,this.capabilities=(0,I.f)(this.sourceJSON.hasZ,!0)}};(0,i.Cg)([(0,a.MZ)()],S.prototype,"capabilities",void 0),(0,i.Cg)([(0,a.MZ)()],S.prototype,"type",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],S.prototype,"layer",void 0),(0,i.Cg)([(0,a.MZ)()],S.prototype,"sourceJSON",void 0),S=(0,i.Cg)([(0,d.$)("esri.layers.graphics.sources.GeoJSONSource")],S);var A=r(63074),O=r(69208),Z=r(6455),E=r(87718),N=r(76294),j=r(16131),P=r(32756),R=r(8303),D=r(54310),$=r(25036),J=r(82935),U=r(68109),G=r(10873),z=r(15426),q=r(29005),L=r(20437),k=r(17036),B=r(30524),V=r(46499),Q=r(39383),H=r(41214),Y=r(61956),W=r(30291),K=r(56400);const X=(0,k.p)();let ee=class extends((0,P.fY)((0,Z.FJ)((0,O.d)((0,N.J)((0,E.F)((0,A.dM)((0,J.e)((0,U.d)((0,$.j)((0,D.J)((0,j.q)((0,R.A)((0,s.P)(T.A)))))))))))))){constructor(e){super(e),this.attributeTableTemplate=null,this.copyright=null,this.dateFieldsTimeZone=null,this.definitionExpression=null,this.displayField=null,this.editingEnabled=!1,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new b(this),this.hasZ=void 0,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="GeoJSON",this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new S({layer:this}),this.spatialReference=y.A.WGS84,this.templates=null,this.title="GeoJSON",this.type="geojson"}destroy(){this.source?.destroy()}load(e){const t=this.loadFromPortal({supportedTypes:["GeoJson"],supportsData:!1},e).catch(o.QP).then(()=>this.source.load(e)).then(()=>{this.read(this.source.sourceJSON,{origin:"service",url:this.parsedUrl}),this.revert(["objectIdField","fields","timeInfo"],"service"),(0,B.yp)(this.renderer,this.fieldsIndex),(0,B.sv)(this.timeInfo,this.fieldsIndex)});return this.addResolvingPromise(t),Promise.resolve(this)}set portalItem(e){super.portalItem=e}set timeInfo(e){super.timeInfo=e}get capabilities(){return this.source?this.source.capabilities:null}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")||0)+1}get defaultPopupTemplate(){return this.createPopupTemplate()}get isTable(){return this.loaded&&null==this.geometryType}get parsedUrl(){return(0,l.An)(this.url)}set renderer(e){(0,B.yp)(e,this.fieldsIndex),this._set("renderer",e)}set url(e){if(!e)return void this._set("url",e);const t=(0,l.An)(e);this._set("url",t.path),t.query&&(this.customParameters={...this.customParameters,...t.query})}async applyEdits(e,t){const{applyEdits:i}=await Promise.all([r.e(8628),r.e(3513)]).then(r.bind(r,78628));await this.load();const n=await i(this,this.source,e,t);return this.read({extent:this.source.sourceJSON.extent,timeInfo:this.source.sourceJSON.timeInfo},{origin:"service",ignoreDefaults:!0}),n}createPopupTemplate(e){return(0,W.tn)(this,e)}createQuery(){const e=new Y.A,t=this.capabilities?.data;e.returnGeometry=!0,t&&t.supportsZ&&(e.returnZ=!0),e.outFields=["*"],e.where=this.definitionExpression||"1=1";const{timeOffset:r,timeExtent:i}=this;return e.timeExtent=null!=r&&null!=i?i.offset(-r.value,r.unit):i||null,e}getFieldDomain(e,t){return this.getField(e)?.domain}getField(e){return this.fieldsIndex.get(e)}queryFeatures(e,t){return this.load().then(()=>this.source.queryFeatures(Y.A.from(e)||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}queryObjectIds(e,t){return this.load().then(()=>this.source.queryObjectIds(Y.A.from(e)||this.createQuery(),t))}queryFeatureCount(e,t){return this.load().then(()=>this.source.queryFeatureCount(Y.A.from(e)||this.createQuery(),t))}queryExtent(e,t){return this.load().then(()=>this.source.queryExtent(Y.A.from(e)||this.createQuery(),t))}async queryAttributeBins(e,t){const{source:i,capabilities:n}=await this.load();(0,z.ZJ)(e,n,"GeoJSONLayer");const s=await Promise.all([r.e(4575),r.e(7136)]).then(r.bind(r,14575)),o=await i.queryAttributeBins(s.default.from(e),t);if(o.features)for(const e of o.features)e.layer=e.sourceLayer=this;return o}async hasDataChanged(){try{const{dataChanged:e,updates:t}=await this.source.refresh(this.customParameters);return null!=t&&this.read(t,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}};(0,i.Cg)([(0,a.MZ)(G.zQ)],ee.prototype,"attributeTableTemplate",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1,write:!1}})],ee.prototype,"capabilities",null),(0,i.Cg)([(0,a.MZ)({type:String})],ee.prototype,"copyright",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],ee.prototype,"createQueryVersion",null),(0,i.Cg)([(0,a.MZ)((0,K.P6)("dateFieldsTimeReference"))],ee.prototype,"dateFieldsTimeZone",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],ee.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,a.MZ)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],ee.prototype,"definitionExpression",void 0),(0,i.Cg)([(0,a.MZ)({type:String})],ee.prototype,"displayField",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean})],ee.prototype,"editingEnabled",void 0),(0,i.Cg)([(0,a.MZ)(G.Yj)],ee.prototype,"elevationInfo",void 0),(0,i.Cg)([(0,a.MZ)({type:[L.A],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],ee.prototype,"fields",void 0),(0,i.Cg)([(0,a.MZ)(X.fieldsIndex)],ee.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,a.MZ)({type:c.A,json:{name:"extent"}})],ee.prototype,"fullExtent",void 0),(0,i.Cg)([(0,a.MZ)({type:["point","polygon","polyline","multipoint"],json:{read:{reader:h.gy.read}}})],ee.prototype,"geometryType",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0,clonable:!1})],ee.prototype,"graphicOrigin",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean})],ee.prototype,"hasZ",void 0),(0,i.Cg)([(0,a.MZ)(G.id)],ee.prototype,"id",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean,readOnly:!0})],ee.prototype,"isTable",null),(0,i.Cg)([(0,a.MZ)(G.kF)],ee.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,a.MZ)({type:[V.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:Q.w},write:!0}})],ee.prototype,"labelingInfo",void 0),(0,i.Cg)([(0,a.MZ)(G.fV)],ee.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,a.MZ)({type:["show","hide"]})],ee.prototype,"listMode",void 0),(0,i.Cg)([(0,a.MZ)({type:String,json:{name:"layerDefinition.objectIdField",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"objectIdField"}}}})],ee.prototype,"objectIdField",void 0),(0,i.Cg)([(0,a.MZ)(G.ke)],ee.prototype,"opacity",void 0),(0,i.Cg)([(0,a.MZ)({type:["GeoJSON"]})],ee.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,a.MZ)(X.outFields)],ee.prototype,"outFields",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],ee.prototype,"parsedUrl",null),(0,i.Cg)([(0,a.MZ)(G.M6)],ee.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,a.MZ)({type:n.A,json:{name:"popupInfo",write:!0}})],ee.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,a.MZ)({types:H.Hg,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{name:"drawingInfo.renderer"},"web-scene":{types:H.XJ}}}})],ee.prototype,"renderer",null),(0,i.Cg)([(0,a.MZ)(G.PY)],ee.prototype,"screenSizePerspectiveEnabled",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],ee.prototype,"source",void 0),(0,i.Cg)([(0,a.MZ)({type:y.A})],ee.prototype,"spatialReference",void 0),(0,i.Cg)([(0,a.MZ)({type:[q.A]})],ee.prototype,"templates",void 0),(0,i.Cg)([(0,a.MZ)()],ee.prototype,"title",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!1},readOnly:!0})],ee.prototype,"type",void 0),(0,i.Cg)([(0,a.MZ)(G.OZ)],ee.prototype,"url",null),ee=(0,i.Cg)([(0,d.$)("esri.layers.GeoJSONLayer")],ee);const te=ee},17036:(e,t,r)=>{r.d(t,{p:()=>a});var i=r(44208),n=r(53966),s=r(20437),o=r(95466),l=r(30524);function a(){return{fields:{type:[s.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){const t=e.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(t.length){const e=t.map(e=>`'${e.name}'`).join(", ");n.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return o.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!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||n.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,l.DB)(this.fieldsIndex,e)}}}}},22671:(e,t,r)=>{r.d(t,{A:()=>v});var i,n=r(31635),s=r(52106),o=r(66552),l=r(25482),a=r(4718),u=r(10107),p=(r(44208),r(53966),r(36005)),d=r(40608),c=r(43937),y=r(16930),h=r(65864),m=r(50498),f=r(20437);const g=new o.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=i=class extends l.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,s.A)}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:n}=this;if(n)for(const e of n)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,h.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=y.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,a.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,s=this.features,o=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((n-e)/r));for(let e=0,t=s.length;e<t;e++)o?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,n],scale:[s,o]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,e=>e*s+i,e=>n-e*o,l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const i=y.A.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const s=e[t],o=r.fromJSON(s),l=s.geometry?.spatialReference;null==o.geometry||l||(o.geometry.spatialReference=i);const a=s.aggregateGeometries,u=o.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],r=a[e],n=r?.spatialReference;null==t||n||(t.spatialReference=i)}n.push(o)}return n}_quantizePoints(e,t,r){let i,n;const s=[];for(let o=0,l=e.length;o<l;o++){const l=e[o];if(o>0){const e=t(l[0]),o=r(l[1]);e===i&&o===n||(s.push([e-i,o-n]),i=e,n=o)}else i=t(l[0]),n=r(l[1]),s.push([i,n])}return s.length>0?s:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,h.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,s=i.length;e<s;e++){const s=i[e],o=this._quantizePoints(s,t,r);o&&n.push(o)}return n.length>0?((0,h.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,h.Bi)(e)?e.rings:e.paths;let o,l;for(let e=0,i=s.length;e<i;e++){const i=s[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(o+=n[0],l+=n[1]):(o=n[0],l=n[1]),n[0]=t(o),n[1]=r(l)}}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let o,l;for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(o+=i[0],l+=i[1]):(o=i[0],l=i[1]),i[0]=t(o),i[1]=r(l)}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2])}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=n(t[2])}}:null}};(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,n.Cg)([(0,u.MZ)({type:[s.A],json:{write:!0}})],v.prototype,"features",void 0),(0,n.Cg)([(0,p.w)("features")],v.prototype,"readFeatures",null),(0,n.Cg)([(0,u.MZ)({type:[f.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,n.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],v.prototype,"geometryType",void 0),(0,n.Cg)([(0,c.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,n.Cg)([(0,u.MZ)({types:m.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,n.Cg)([(0,p.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,n.Cg)([(0,u.MZ)({type:y.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,n.Cg)([(0,c.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,n.Cg)([(0,u.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=i=(0,n.Cg)([(0,d.$)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0},26253:(e,t,r)=>{r.d(t,{T:()=>d});var i=r(31635),n=r(69540),s=r(25482),o=r(88930),l=r(10107),a=(r(44208),r(53966),r(87811),r(93223)),u=r(40608),p=r(73133);let d=class extends((0,n.OU)(s.o)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.t)(this.value,this.unit,"milliseconds")}};(0,i.Cg)([(0,a.e)(p.j,{nonNullable:!0})],d.prototype,"unit",void 0),(0,i.Cg)([(0,l.MZ)({type:Number,json:{write:!0},nonNullable:!0})],d.prototype,"value",void 0),d=(0,i.Cg)([(0,u.$)("esri.time.TimeInterval")],d)},29005:(e,t,r)=>{r.d(t,{A:()=>p});var i=r(31635),n=r(69540),s=r(66552),o=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const u=new s.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let p=class extends((0,n.OU)(o.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"description",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:u.read,write:u.write}})],p.prototype,"drawingTool",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"prototype",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],p.prototype,"thumbnail",void 0),p=(0,i.Cg)([(0,a.$)("esri.layers.support.FeatureTemplate")],p)},32730:(e,t,r)=>{r.d(t,{BI:()=>f,D3:()=>h,XJ:()=>m,lc:()=>y,mX:()=>v,rU:()=>g,tH:()=>x});var i=r(799);const n="__begin__",s="__end__",o=new RegExp(n,"ig"),l=new RegExp(s,"ig"),a=new RegExp("^"+n,"i"),u=new RegExp(s+"$","i"),p='"',d=p+" + ",c=" + "+p;function y(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function h(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function m(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=y(e.labelExpression),t.type="conventional"),t}function f(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return v(t.expression);case"arcade":return t.expression}return null}function g(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return x(t.expression)}return null}function v(e){let t;return e?(t=(0,i.HC)(e,e=>n+'$feature["'+e+'"]'+s),t=a.test(t)?t.replace(a,""):p+t,t=u.test(t)?t.replace(u,""):t+p,t=t.replaceAll(o,d).replaceAll(l,c)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,T=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,F=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function x(e){if(!e)return null;let t=b.exec(e)||T.exec(e);return t?t[1]||t[3]:(t=F.exec(e),t?t[2]:null)}},32756:(e,t,r)=>{r.d(t,{Rr:()=>a,fY:()=>p,ne:()=>u});var i=r(31635),n=r(93637),s=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),l=r(91880);function a(e,t,r){if(!e)return null;const i=e.find(e=>!!e.field);if(!i)return null;const n=new l.A;return n.read(i,r),[n]}const u={type:[l.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:a},write:{writer:function(e,t,r,i){const s=e.find(e=>!!e.field);s&&(0,n.sM)(r,[s.toJSON()],t)}}}},p=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,s.MZ)(u)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,o.$)("esri.layers.mixins.OrderedLayer")],r),r}},37734:(e,t,r)=>{r.d(t,{s:()=>i});const i=Symbol("isPopupProviderGraphicOriginSymbol")},41366:(e,t,r)=>{r.d(t,{K:()=>c,Q:()=>u});var i=r(31635),n=r(66552),s=r(53966),o=r(10107),l=(r(44208),r(87811),r(93223)),a=r(40608);const u=(0,n.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),p="percent-of-total",d="field",c=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&d||r&&p||null,t&&r&&s.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==d&&e!==p||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],r.prototype,"normalizationField",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],r.prototype,"normalizationMaxValue",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],r.prototype,"normalizationMinValue",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],r.prototype,"normalizationTotal",void 0),(0,i.Cg)([(0,l.e)(u,{name:"parameters.normalizationType"})],r.prototype,"normalizationType",null),r=(0,i.Cg)([(0,a.$)("esri.rest.support.NormalizationBinParametersMixin")],r),r}},41560:(e,t,r)=>{r.d(t,{Ch:()=>o,mW:()=>s});var i=r(34727),n=r(39516);function s(e,t){return{...t,filterMode:e.mode}}function o(e,t,r){const s=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r,maxScale:i}of e.filters)t[0]=Math.max(t[0],p(r)),t[1]=Math.min(t[1],d(i));return t}(e);if(s&&((0,i.gg)(t,s[0])||(0,i.ZH)(r,s[1])))return"";const o=Array.from(l(e,t,r)),a=function(e,t,r){if(0===e.length)return!0;const n=p(e.at(0)?.minScale),s=d(e.at(-1)?.maxScale);if((0,i.ZH)(n,t)||(0,i.gg)(s,r))return!0;for(let t=0;t<e.length-1;t++){const r=e[t],n=e[t+1];if((0,i.ZH)(p(n.minScale),d(r.maxScale)))return!0}return!1}(o,t,r)?"1=1":o.map(e=>e.where||"1=1").reduce((e,t)=>(0,n.IW)(e,t),"");return a&&"1=1"!==a?a:""}function*l(e,t,r){if("manual"===u(e)){const t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const i of e.filters)a(i.minScale,i.maxScale,t,r)&&(yield i)}}function a(e,t,r,n){return e=p(e),r=p(r),t=d(t),!(!(0,i.Sp)(r,e)&&(n??r)>e||(0,i.Hx)(t,r)||void 0!==n&&(0,i.Sp)(n,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function p(e){return e||Number.POSITIVE_INFINITY}function d(e){return e||0}},46140:(e,t,r)=>{r.d(t,{R:()=>n});var i=r(49186);let n=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[n,s]=t.split("."),o=/^\s*\d+\s*$/;if(!n?.match||!o.test(n))throw new i.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!s?.match||!o.test(s))throw new i.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const l=parseInt(n,10),a=parseInt(s,10);return new e(l,a,r)}}},50498:(e,t,r)=>{r.d(t,{Ye:()=>d,gy:()=>p,yR:()=>c});var i=r(66552),n=r(5443),s=r(91075),o=r(48526),l=r(86738),a=r(39829),u=r(82799);const p=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),d=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),c={base:s.A,key:"type",typeMap:{extent:n.A,multipoint:o.A,point:l.A,polyline:u.A,polygon:a.A}}},52106:(e,t,r)=>{r.d(t,{A:()=>b});var i,n=r(31635),s=r(13874),o=r(69540),l=r(51447),a=r(25482),u=r(53966),p=r(36708),d=r(24326),c=r(10107),y=(r(44208),r(87811),r(40608)),h=r(12195),m=r(65864),f=r(50498),g=r(54339),v=r(33910);function w(e){if(null==e)return null;const t={};for(const r in e){const i=e[r];i&&(t[r]=i.toJSON())}return 0!==Object.keys(t).length?t:null}let b=class extends((0,o.OU)(a.o)){static{i=this}constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,d.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,l.eF)(u.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new i({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const r of[t,this.sourceLayer,this.layer])if(r&&"object"==typeof r){if("popupTemplate"in r&&r.popupTemplate)return r.popupTemplate;if(e&&"defaultPopupTemplate"in r&&null!=r.defaultPopupTemplate)return r.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=this.sourceLayer??this.layer;return e?(0,g.r)(this,e):null}getGlobalId(){const e=this.sourceLayer??this.layer;return e&&"globalIdField"in e&&e.globalIdField?this.getAttribute(e.globalIdField):null}toJSON(){return{aggregateGeometries:w(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,h.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,i){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const n={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(n.action=i),"attributes"===e&&(n.attributeName=i),this.layer.graphicChanged(n)}_watchMeshGeometryChanges(){this.addHandles([(0,p.z7)(()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,p.z7)(()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0,()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)},{equals:(e,t)=>e===t,sync:!0})])}};(0,n.Cg)([(0,c.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const i=(0,m.rS)(e[r]);i&&(t[r]=i)}return 0!==Object.keys(t).length?t:null}}})],b.prototype,"aggregateGeometries",null),(0,n.Cg)([(0,c.MZ)({value:null})],b.prototype,"attributes",null),(0,n.Cg)([(0,c.MZ)({value:null,types:f.yR,json:{read:m.rS}})],b.prototype,"geometry",null),(0,n.Cg)([(0,c.MZ)({type:Boolean})],b.prototype,"isAggregate",void 0),(0,n.Cg)([(0,c.MZ)({clonable:!1})],b.prototype,"layer",void 0),(0,n.Cg)([(0,c.MZ)({clonable:"reference"})],b.prototype,"origin",void 0),(0,n.Cg)([(0,c.MZ)({type:s.A,value:null})],b.prototype,"popupTemplate",null),(0,n.Cg)([(0,c.MZ)({clonable:"reference"})],b.prototype,"sourceLayer",void 0),(0,n.Cg)([(0,c.MZ)({value:null,types:v.Es})],b.prototype,"symbol",null),(0,n.Cg)([(0,c.MZ)({clonable:!1,json:{read:!1,write:!1}})],b.prototype,"_version",void 0),(0,n.Cg)([(0,c.MZ)({type:Boolean,value:!0})],b.prototype,"visible",null),b=i=(0,n.Cg)([(0,y.$)("esri.Graphic")],b)},54339:(e,t,r)=>{function i(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const r=[];for(const i of t.fieldNames)r.push(e.attributes[i]??null);return JSON.stringify(r)}}}function n(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const r=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(r)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}r.d(t,{W:()=>i,r:()=>n})},55674:(e,t,r)=>{r.d(t,{Ad:()=>y,Gj:()=>f,QY:()=>c,lL:()=>g,xR:()=>h});var i=r(66131),n=r(49186),s=(r(44208),r(44729)),o=r(15032),l=r(65864),a=r(95466),u=r(43668),p=r(98623);const d=["geometry","scale","timeProperties"];function c(e,t){if(null!=t)for(const r of d)t.hasArcadeDependency(r)&&e.add(r);return e}function y(e,t){return m.create(e,t,null,["$feature","$view"])}function h(e,t,r){return m.create(e,t,r,["$feature","$view","$config"])}class m{static async create(e,t,r,i){const{arcade:s,Dictionary:o}=await(0,u.l)();let l;try{l=s.parseScript(e)}catch(t){throw new n.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const a=s.scriptUsesGeometryEngine(l);a&&await s.enableGeometrySupport(),await s.loadDependentModules(new Set,l,null,!1,a);const p={vars:i.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:t,useAsync:!1},d=s.compileScript(l,p);let c=null;null!=r&&(c=new o(r),c.immutable=!0);const y=new o;return y.immutable=!1,y.setField("scale",0),new m(e,s,l,d,t,y,c,o)}constructor(e,t,r,i,n,s,o,l){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=i,this._spatialReference=n,this._viewDict=s,this._configDict=o,this._dictionaryCtor=l,this._dependencies=new Map,this._featureReader=new f,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const r=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:n,currentEnd:s}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=n?null!=r?i.lY.epochToArcadeDate(n,r):i.lY.unknownEpochToArcadeDate(n):void 0,currentEnd:null!=s?null!=r?i.lY.epochToArcadeDate(s,r):i.lY.unknownEpochToArcadeDate(s):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:r})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class f{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const i=t??new a.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=i.fields,this._boundSchema.fieldsIndex=i,this._boundSchema.spatialReference=r}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,l.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===p.L5}field(e,t=!0){const r=this._getField(e);if(r){const t=this._boundTarget.attributes[r.name];if(null==t)return null;switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return s.n.fromReader(t);case"time-only":case"esriFieldTypeTimeOnly":return o.k.fromReader(t);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return i.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?i.lY.unknownEpochToArcadeDate(t):i.lY.epochToArcadeDate(t,this.contextTimeZone??p.qU);default:return t}}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map(e=>e.name)}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function g(e){const t=[];for(const r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},64714:(e,t,r)=>{r.d(t,{F0:()=>l,Vx:()=>p,e2:()=>c,f:()=>y});var i=r(44208),n=r(4718),s=r(99352),o=r(93470);function l(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.Cb:"esriGeometryPolyline"===e?o.yM:o.WR}}}const a=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function p(e,t){if((0,i.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this${d(t)} = null;`;for(const t in e)r+=`this${d(t)} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new i}catch(r){return()=>({[t]:null,...e})}}function d(e){return a.test(e)?`.${e}`:`["${e}"]`}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(e)}}]}function y(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:s.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:s.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},68109:(e,t,r)=>{r.d(t,{d:()=>b});var i=r(31635),n=r(10107),s=(r(44208),r(53966),r(87811),r(40608)),o=r(13874),l=r(69540),a=r(25482),u=r(93637),p=r(43937),d=r(50820),c=r(10873),y=r(46499),h=r(41214);let m=class extends((0,l.OU)(a.o)){constructor(e){super(e),this.labelingInfo=null,this.labelsVisible=!0,this.renderer=null,this.visible=!0}};(0,i.Cg)([(0,n.MZ)({type:[y.A],json:{write:!0}})],m.prototype,"labelingInfo",void 0),(0,i.Cg)([(0,n.MZ)(c.kF)],m.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,n.MZ)({types:h.Hg,json:{write:!0}})],m.prototype,"renderer",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"visible",void 0),m=(0,i.Cg)([(0,s.$)("esri.layers.support.TrackPartInfo")],m);var f=r(96576),g=r(59868),v=r(26253);let w=class extends((0,l.OU)(a.o)){constructor(e){super(e),this.enabled=!0,this.fields=[],this.latestObservations=new m({renderer:new f.A({symbol:g.UK.clone()})}),this.maxDisplayDuration=null,this.maxDisplayObservationsPerTrack=0,this.popupEnabled=!0,this.popupTemplate=null,this.previousObservations=new m({renderer:new f.A({symbol:g.UK.clone()})}),this.trackLines=new m({renderer:new f.A({symbol:g.A7.clone()})}),this.timeField="startTimeField"}writeFields(e,t,r){const i=e.filter(e=>"avg_angle"!==e.statisticType).map(e=>e.toJSON());(0,u.sM)(r,i,t)}};(0,i.Cg)([(0,n.MZ)({type:Boolean,json:{write:!0}})],w.prototype,"enabled",void 0),(0,i.Cg)([(0,n.MZ)({type:[d.A],json:{write:!0}})],w.prototype,"fields",void 0),(0,i.Cg)([(0,p.K)("fields")],w.prototype,"writeFields",null),(0,i.Cg)([(0,n.MZ)({type:m,json:{write:!0}})],w.prototype,"latestObservations",void 0),(0,i.Cg)([(0,n.MZ)({type:v.T,json:{write:!0}})],w.prototype,"maxDisplayDuration",void 0),(0,i.Cg)([(0,n.MZ)({type:Number,json:{write:!0}})],w.prototype,"maxDisplayObservationsPerTrack",void 0),(0,i.Cg)([(0,n.MZ)(c.M6)],w.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,n.MZ)({type:o.A,json:{name:"popupInfo",write:!0}})],w.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,n.MZ)({type:m,json:{write:!0}})],w.prototype,"previousObservations",void 0),(0,i.Cg)([(0,n.MZ)({type:m,json:{write:!0}})],w.prototype,"trackLines",void 0),(0,i.Cg)([(0,n.MZ)({type:["timeReceived","startTimeField","endTimeField"],json:{read:!0,write:!0}})],w.prototype,"timeField",void 0),w=(0,i.Cg)([(0,s.$)("esri.layers.support.TrackInfo")],w);const b=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.trackInfo=null}};return(0,i.Cg)([(0,n.MZ)({type:w})],r.prototype,"trackInfo",void 0),r=(0,i.Cg)([(0,s.$)("esri.layers.mixins.TrackableLayer")],r),r}},69208:(e,t,r)=>{r.d(t,{d:()=>o});var i=r(31635),n=r(10107),s=(r(44208),r(53966),r(87811),r(40608));const o=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,i.Cg)([(0,n.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,i.Cg)([(0,s.$)("esri.layers.mixins.CustomParametersMixin")],r),r}},70328:(e,t,r)=>{r.d(t,{BI:()=>w,DC:()=>d,Ej:()=>y,Ie:()=>g,Jt:()=>v,Ne:()=>h,RF:()=>p,aI:()=>T,fA:()=>o,gE:()=>a,hZ:()=>f,iT:()=>c,is:()=>b,qv:()=>F,vI:()=>m,vY:()=>l,v_:()=>x,vt:()=>s,w1:()=>u});var i=r(5443),n=(r(19419),r(4197));function s(e=x){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,r,i,n,o,l=s()){return l[0]=e,l[1]=t,l[2]=r,l[3]=i,l[4]=n,l[5]=o,l}function l(e,t=s()){return function(e,t,r,i=s()){return f(i,F),function(e,t,r=0,i=t.length/3){let n=e[0],s=e[1],o=e[2],l=e[3],a=e[4],u=e[5];for(let e=0;e<i;e++)n=Math.min(n,t[r+3*e]),s=Math.min(s,t[r+3*e+1]),o=Math.min(o,t[r+3*e+2]),l=Math.max(l,t[r+3*e]),a=Math.max(a,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=n,e[1]=s,e[2]=o,e[3]=l,e[4]=a,e[5]=u}(i,e,t,r),i}(e,0,e.length/3,t)}function a(e,t=(0,n.jh)(24)){const[r,i,s,o,l,a]=e;return t[0]=r,t[1]=i,t[2]=s,t[3]=r,t[4]=i,t[5]=a,t[6]=r,t[7]=l,t[8]=s,t[9]=r,t[10]=l,t[11]=a,t[12]=o,t[13]=i,t[14]=s,t[15]=o,t[16]=i,t[17]=a,t[18]=o,t[19]=l,t[20]=s,t[21]=o,t[22]=l,t[23]=a,t}function u(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function p(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function d(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function y(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function h(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function m(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function g(e){return e?f(e,F):s(F)}function v(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function w(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=n,e[5]=Number.POSITIVE_INFINITY,e}function b(e){return 6===e.length}function T(e,t,r){if(null==e||null==t)return e===t;if(!b(e)||!b(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}const F=[1/0,1/0,1/0,-1/0,-1/0,-1/0],x=[0,0,0,0,0,0];s()},73133:(e,t,r)=>{r.d(t,{j:()=>i});const i=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},73681:(e,t,r)=>{r.d(t,{n:()=>a});var i=r(49186),n=r(53966),s=r(46140),o=r(95466),l=r(55674);class a{static async from(e,t,r){const o=e.dictionary_version?s.R.parse(e.dictionary_version):null,p=new Set(e.itemsNames),d={};if(t)for(const e in t)d[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)d.hasOwnProperty(t.name)||(d[t.name]=t.value);const c=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))c.delete(e);c.size&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:c});const y=await(0,l.xR)(e.expression,null,d);if(!y)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const h=!o||!o.greaterEqual(4,0);h&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:o});const m=new u(r,h);return new a(h,p,y,m)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new o.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new o.A(t)}}class u extends l.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},82935:(e,t,r)=>{r.d(t,{B:()=>y,e:()=>h});var i=r(31635),n=r(10107),s=(r(44208),r(53966),r(87811),r(36005)),o=r(40608),l=r(89317),a=r(30524),u=r(96184),p=r(73133),d=r(64272),c=r(26253);const y={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:l.K}}},h=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const i=r.timeOffset,n=p.j.fromJSON(r.timeOffsetUnits);return i&&n?new c.T({value:i,unit:n}):null}set timeInfo(e){(0,a.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i.Cg)([(0,n.MZ)({type:d.T,json:{write:!1}})],r.prototype,"timeExtent",void 0),(0,i.Cg)([(0,n.MZ)({type:c.T})],r.prototype,"timeOffset",void 0),(0,i.Cg)([(0,s.w)("service","timeOffset",["timeInfo.exportOptions"])],r.prototype,"readOffset",null),(0,i.Cg)([(0,n.MZ)({value:null,type:u.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],r.prototype,"timeInfo",null),(0,i.Cg)([(0,n.MZ)(y)],r.prototype,"useViewTime",void 0),r=(0,i.Cg)([(0,o.$)("esri.layers.mixins.TemporalLayer")],r),r}},83960:(e,t,r)=>{r.d(t,{X_:()=>o,oW:()=>a,zx:()=>l});var i=r(34727),n=r(83047);const s=96;function o(e,t){const r=t||e.extent,i=e.width,o=(0,n.GA)(r?.spatialReference);return r&&i?r.width/i*o*n.dy*s:0}function l(e,t,r){return function(e,t){return 0===t||(0,i.Sp)(e,t)||e<t}(e,t)&&function(e,t){return 0===t||(0,i.Sp)(e,t)||e>t}(e,r)}function a(e,t){return(0,i.Sp)(e,t)?0:(e||Number.POSITIVE_INFINITY)>(t||Number.POSITIVE_INFINITY)?1:-1}},91880:(e,t,r)=>{r.d(t,{A:()=>p});var i,n=r(31635),s=r(66552),o=r(25482),l=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const u=new s.J({asc:"ascending",desc:"descending"});let p=class extends o.o{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,n.Cg)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],p.prototype,"valueExpression",void 0),(0,n.Cg)([(0,l.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],p.prototype,"order",void 0),p=i=(0,n.Cg)([(0,a.$)("esri.layers.support.OrderByInfo")],p)},95466:(e,t,r)=>{r.d(t,{A:()=>y});var i=r(49186),n=r(53966),s=r(91869),o=r(3330),l=r(12195),a=r(30524),u=r(98623),p=r(56400),d=r(96285);const c=new Map;class y{static fromJSON(e){return new y(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new y(e.fields??[],g(e))}static fromLayerJSON(e){return new y(e.fields??[],g(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=m(t);if(t&&i){const n=h(t);this._fieldsMap.set(t,e),this._fieldsMap.set(n,e),this._normalizedFieldsMap.set(i,e),r.push(`${n}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,a.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,a.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,a.te)(e)||(0,a.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,a.te)(e)||(0,a.Xz)(e)||e.nullable||void 0!==(0,a.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(h(e))??this._normalizedFieldsMap.get(m(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):f.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?o.GB.instance:t===u.n$?d.mQ.utcInstance:(0,s.tE)(c,t,()=>d.oh.create(t)):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,a.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map(e=>(0,l.W)(e)?e.toJSON():e),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function h(e){return e.trim().toLowerCase()}function m(e){return(0,a.rS)(e)?.toLowerCase()??""}const f=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function g(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:n}=e,s=(i?"startField"in i?i.startField:i.startTimeField:"")??"",o=(i?"endField"in i?i.endField:i.endTimeField:"")??"",l=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,p.ZS)(e.dateFieldsTimeReference):null,a=n?function(e){return"timeZone"in e}(n)?n.timeZone??l:n.dateFieldsTimeReference?(0,p.ZS)(n.dateFieldsTimeReference):l??u.n$:null,d=i?function(e){return"timeZone"in e}(i)?i.timeZone??l:i.timeReference?(0,p.ZS)(i.timeReference):l:null,c=new Map([[h(n?.creationDateField??""),a],[h(n?.editDateField??""),a],[h(s),d],[h(o),d]]);for(const{name:i,type:n}of e.fields)if(f.has(n))t.set(i,u.L5);else if("date"!==n&&"esriFieldTypeDate"!==n)t.set(i,null);else if(r)t.set(i,u.L5);else{const e=c.get(h(i??""))??l;t.set(i,e)}return t}},96184:(e,t,r)=>{r.d(t,{A:()=>h});var i=r(31635),n=r(69540),s=r(25482),o=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),a=r(40608),u=r(43937),p=r(64272),d=r(26253),c=r(56400);function y(e,t){return d.T.fromJSON({value:e,unit:t})}let h=class extends((0,n.OU)(s.o)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?p.T.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?y(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?y(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],h.prototype,"cumulative",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"endField",void 0),(0,i.Cg)([(0,o.MZ)({type:p.T,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"fullTimeExtent",void 0),(0,i.Cg)([(0,l.w)("fullTimeExtent",["timeExtent"])],h.prototype,"readFullTimeExtent",null),(0,i.Cg)([(0,u.K)("fullTimeExtent")],h.prototype,"writeFullTimeExtent",null),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],h.prototype,"hasLiveData",void 0),(0,i.Cg)([(0,o.MZ)({type:d.T,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"interval",void 0),(0,i.Cg)([(0,l.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],h.prototype,"readInterval",null),(0,i.Cg)([(0,u.K)("interval")],h.prototype,"writeInterval",null),(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"startField",void 0),(0,i.Cg)([(0,o.MZ)((0,c.P6)("timeReference",!0))],h.prototype,"timeZone",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"trackIdField",void 0),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],h.prototype,"useTime",void 0),(0,i.Cg)([(0,o.MZ)({type:[Date],json:{read:!1}})],h.prototype,"stops",void 0),h=(0,i.Cg)([(0,a.$)("esri.layers.support.TimeInfo")],h)},99352:(e,t,r)=>{r.d(t,{F:()=>i,P:()=>n});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},n={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3549],{4197:(e,t,n)=>{n.d(t,{Vj:()=>u,cj:()=>a,jh:()=>o,l5:()=>l,xm:()=>s});var i=n(34275),r=n(9093);function o(e){return e<=i.y9?new Array(e).fill(0):new Float64Array(e)}function s(e){return((0,i.iu)(e)?e.byteLength/8:e.length)<=i.y9?Array.from(e):new Float64Array(e)}function l(e,t,n){return Array.isArray(e)?e.slice(t,t+n):e.subarray(t,t+n)}function a(e){return[...e]}function u(e){const t=(0,r.vt)();for(let n=0;n<16;++n)t[n]=e[n];return t}},6797:(e,t,n)=>{n.d(t,{Mj:()=>m,Ui:()=>h,w2:()=>p});var i=n(65008),r=n(7762),o=n(88620);const s=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof i.A}function a(e){return e instanceof r.A?Object.keys(e.items):l(e)?(0,o.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof r.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function f(e,t){const n=e.diff;if(n&&"function"==typeof n)return n(e,t);const i=a(e),r=a(t);if(0===i.length&&0===r.length)return;if(!i.length||!r.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const o=r.filter(e=>!i.includes(e)),m=i.filter(e=>!r.includes(e)),p=i.filter(n=>r.includes(n)&&u(e,n)!==u(t,n)).concat(o,m).sort(),h=c(e);if(h&&s.has(h)&&p.length)return{type:"complete",oldValue:e,newValue:t};let y;const d=l(e)&&l(t);for(const i of p){const r=u(e,i),o=u(t,i);let s;if((d||"function"!=typeof r&&"function"!=typeof o)&&r!==o&&(null!=r||null!=o)){if(n&&n[i]&&"function"==typeof n[i])s=n[i]?.(r,o);else if(r instanceof Date&&o instanceof Date){if(r.getTime()===o.getTime())continue;s={type:"complete",oldValue:r,newValue:o}}else s="object"==typeof r&&"object"==typeof o&&c(r)===c(o)?f(r,o):{type:"complete",oldValue:r,newValue:o};null!=s&&(null!=y?y.diff[i]=s:y={type:"partial",diff:{[i]:s}})}}return y}function m(e,t){return function(e,t){if(null==e)return!1;const n=t.split(".");let i=e;for(const e of n){if("complete"===i.type)return!0;if("partial"!==i.type)return!1;{const t=i.diff[e];if(!t)return!1;i=t}}return!0}(e,t)}function p(e,t){if(!e)return!1;if("partial"===e.type){const n=Object.keys(e.diff);return 1===n.length&&n[0]===t}return!1}function h(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:f(e,t)}},9093:(e,t,n)=>{function i(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function r(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}n.d(t,{o8:()=>r,vt:()=>i,zK:()=>o});const o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:r,create:i,fromValues:function(e,t,n,i,r,o,s,l,a,u,c,f,m,p,h,y){return[e,t,n,i,r,o,s,l,a,u,c,f,m,p,h,y]}},Symbol.toStringTag,{value:"Module"}))},13069:(e,t,n)=>{n.d(t,{AG:()=>l,lk:()=>r,vD:()=>s,yS:()=>o});const i="randomUUID"in crypto;function r(){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)}function o(){return`{${r().toUpperCase()}}`}function s(){return`{${r()}}`}function l(e){const t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},32730:(e,t,n)=>{n.d(t,{BI:()=>d,D3:()=>h,XJ:()=>y,lc:()=>p,mX:()=>b,rU:()=>g,tH:()=>x});var i=n(799);const r="__begin__",o="__end__",s=new RegExp(r,"ig"),l=new RegExp(o,"ig"),a=new RegExp("^"+r,"i"),u=new RegExp(o+"$","i"),c='"',f=c+" + ",m=" + "+c;function p(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function h(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function y(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=p(e.labelExpression),t.type="conventional"),t}function d(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return b(t.expression);case"arcade":return t.expression}return null}function g(e){const t=y(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(M);return t?.[1].trim()||null}(t.expression);case"arcade":return x(t.expression)}return null}function b(e){let t;return e?(t=(0,i.HC)(e,e=>r+'$feature["'+e+'"]'+o),t=a.test(t)?t.replace(a,""):c+t,t=u.test(t)?t.replace(u,""):t+c,t=t.replaceAll(s,f).replaceAll(l,m)):t='""',t}const M=/^\s*\{([^}]+)\}\s*$/i,_=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,F=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,T=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function x(e){if(!e)return null;let t=_.exec(e)||F.exec(e);return t?t[1]||t[3]:(t=T.exec(e),t?t[2]:null)}},41366:(e,t,n)=>{n.d(t,{K:()=>m,Q:()=>u});var i=n(31635),r=n(66552),o=n(53966),s=n(10107),l=(n(44208),n(87811),n(93223)),a=n(40608);const u=(0,r.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",f="field",m=e=>{const t=e;let n=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,n=null!=this.normalizationTotal;return t||n?(e=t&&f||n&&c||null,t&&n&&o.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==f&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i.Cg)([(0,s.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],n.prototype,"normalizationField",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],n.prototype,"normalizationMaxValue",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],n.prototype,"normalizationMinValue",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],n.prototype,"normalizationTotal",void 0),(0,i.Cg)([(0,l.e)(u,{name:"parameters.normalizationType"})],n.prototype,"normalizationType",null),n=(0,i.Cg)([(0,a.$)("esri.rest.support.NormalizationBinParametersMixin")],n),n}},41560:(e,t,n)=>{n.d(t,{Ch:()=>s,mW:()=>o});var i=n(34727),r=n(39516);function o(e,t){return{...t,filterMode:e.mode}}function s(e,t,n){const o=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:n,maxScale:i}of e.filters)t[0]=Math.max(t[0],c(n)),t[1]=Math.min(t[1],f(i));return t}(e);if(o&&((0,i.gg)(t,o[0])||(0,i.ZH)(n,o[1])))return"";const s=Array.from(l(e,t,n)),a=function(e,t,n){if(0===e.length)return!0;const r=c(e.at(0)?.minScale),o=f(e.at(-1)?.maxScale);if((0,i.ZH)(r,t)||(0,i.gg)(o,n))return!0;for(let t=0;t<e.length-1;t++){const n=e[t],r=e[t+1];if((0,i.ZH)(c(r.minScale),f(n.maxScale)))return!0}return!1}(s,t,n)?"1=1":s.map(e=>e.where||"1=1").reduce((e,t)=>(0,r.IW)(e,t),"");return a&&"1=1"!==a?a:""}function*l(e,t,n){if("manual"===u(e)){const t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const i of e.filters)a(i.minScale,i.maxScale,t,n)&&(yield i)}}function a(e,t,n,r){return e=c(e),n=c(n),t=f(t),!(!(0,i.Sp)(n,e)&&(r??n)>e||(0,i.Hx)(t,n)||void 0!==r&&(0,i.Sp)(r,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function c(e){return e||Number.POSITIVE_INFINITY}function f(e){return e||0}},50498:(e,t,n)=>{n.d(t,{Ye:()=>f,gy:()=>c,yR:()=>m});var i=n(66552),r=n(5443),o=n(91075),s=n(48526),l=n(86738),a=n(39829),u=n(82799);const c=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),f=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),m={base:o.A,key:"type",typeMap:{extent:r.A,multipoint:s.A,point:l.A,polyline:u.A,polygon:a.A}}},52106:(e,t,n)=>{n.d(t,{A:()=>_});var i,r=n(31635),o=n(13874),s=n(69540),l=n(51447),a=n(25482),u=n(53966),c=n(36708),f=n(24326),m=n(10107),p=(n(44208),n(87811),n(40608)),h=n(12195),y=n(65864),d=n(50498),g=n(54339),b=n(33910);function M(e){if(null==e)return null;const t={};for(const n in e){const i=e[n];i&&(t[n]=i.toJSON())}return 0!==Object.keys(t).length?t:null}let _=class extends((0,s.OU)(a.o)){static{i=this}constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,f.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,l.eF)(u.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new i({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const n of[t,this.sourceLayer,this.layer])if(n&&"object"==typeof n){if("popupTemplate"in n&&n.popupTemplate)return n.popupTemplate;if(e&&"defaultPopupTemplate"in n&&null!=n.defaultPopupTemplate)return n.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const n=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",n,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=this.sourceLayer??this.layer;return e?(0,g.r)(this,e):null}getGlobalId(){const e=this.sourceLayer??this.layer;return e&&"globalIdField"in e&&e.globalIdField?this.getAttribute(e.globalIdField):null}toJSON(){return{aggregateGeometries:M(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,h.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const n={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",n,n,e.action)}}_notifyLayer(e,t,n,i){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const r={graphic:this,property:e,oldValue:t,newValue:n};"origin-transform"===e&&(r.action=i),"attributes"===e&&(r.attributeName=i),this.layer.graphicChanged(r)}_watchMeshGeometryChanges(){this.addHandles([(0,c.z7)(()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,c.z7)(()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0,()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)},{equals:(e,t)=>e===t,sync:!0})])}};(0,r.Cg)([(0,m.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const n in e){const i=(0,y.rS)(e[n]);i&&(t[n]=i)}return 0!==Object.keys(t).length?t:null}}})],_.prototype,"aggregateGeometries",null),(0,r.Cg)([(0,m.MZ)({value:null})],_.prototype,"attributes",null),(0,r.Cg)([(0,m.MZ)({value:null,types:d.yR,json:{read:y.rS}})],_.prototype,"geometry",null),(0,r.Cg)([(0,m.MZ)({type:Boolean})],_.prototype,"isAggregate",void 0),(0,r.Cg)([(0,m.MZ)({clonable:!1})],_.prototype,"layer",void 0),(0,r.Cg)([(0,m.MZ)({clonable:"reference"})],_.prototype,"origin",void 0),(0,r.Cg)([(0,m.MZ)({type:o.A,value:null})],_.prototype,"popupTemplate",null),(0,r.Cg)([(0,m.MZ)({clonable:"reference"})],_.prototype,"sourceLayer",void 0),(0,r.Cg)([(0,m.MZ)({value:null,types:b.Es})],_.prototype,"symbol",null),(0,r.Cg)([(0,m.MZ)({clonable:!1,json:{read:!1,write:!1}})],_.prototype,"_version",void 0),(0,r.Cg)([(0,m.MZ)({type:Boolean,value:!0})],_.prototype,"visible",null),_=i=(0,r.Cg)([(0,p.$)("esri.Graphic")],_)},54339:(e,t,n)=>{function i(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const n=[];for(const i of t.fieldNames)n.push(e.attributes[i]??null);return JSON.stringify(n)}}}function r(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const n=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(n)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}n.d(t,{W:()=>i,r:()=>r})},70328:(e,t,n)=>{n.d(t,{BI:()=>M,DC:()=>f,Ej:()=>p,Ie:()=>g,Jt:()=>b,Ne:()=>h,RF:()=>c,aI:()=>F,fA:()=>s,gE:()=>a,hZ:()=>d,iT:()=>m,is:()=>_,qv:()=>T,vI:()=>y,vY:()=>l,v_:()=>x,vt:()=>o,w1:()=>u});var i=n(5443),r=(n(19419),n(4197));function o(e=x){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,n,i,r,s,l=o()){return l[0]=e,l[1]=t,l[2]=n,l[3]=i,l[4]=r,l[5]=s,l}function l(e,t=o()){return function(e,t,n,i=o()){return d(i,T),function(e,t,n=0,i=t.length/3){let r=e[0],o=e[1],s=e[2],l=e[3],a=e[4],u=e[5];for(let e=0;e<i;e++)r=Math.min(r,t[n+3*e]),o=Math.min(o,t[n+3*e+1]),s=Math.min(s,t[n+3*e+2]),l=Math.max(l,t[n+3*e]),a=Math.max(a,t[n+3*e+1]),u=Math.max(u,t[n+3*e+2]);e[0]=r,e[1]=o,e[2]=s,e[3]=l,e[4]=a,e[5]=u}(i,e,t,n),i}(e,0,e.length/3,t)}function a(e,t=(0,r.jh)(24)){const[n,i,o,s,l,a]=e;return t[0]=n,t[1]=i,t[2]=o,t[3]=n,t[4]=i,t[5]=a,t[6]=n,t[7]=l,t[8]=o,t[9]=n,t[10]=l,t[11]=a,t[12]=s,t[13]=i,t[14]=o,t[15]=s,t[16]=i,t[17]=a,t[18]=s,t[19]=l,t[20]=o,t[21]=s,t[22]=l,t[23]=a,t}function u(e,t){const n=isFinite(e[2])||isFinite(e[5]);return new i.A(n?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function f(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function m(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function p(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function h(e,t,n=e){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n!==e&&(n[3]=e[3],n[4]=e[4],n[5]=e[5]),n}function y(e,t,n=e){return n[3]=t[0],n[4]=t[1],n[5]=t[2],n!==e&&(n[0]=e[0],n[1]=e[1],n[2]=e[2]),e}function d(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function g(e){return e?d(e,T):o(T)}function b(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function M(e,t,n,i,r){return e[0]=t,e[1]=n,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=r,e[5]=Number.POSITIVE_INFINITY,e}function _(e){return 6===e.length}function F(e,t,n){if(null==e||null==t)return e===t;if(!_(e)||!_(t))return!1;if(n){for(let i=0;i<e.length;i++)if(!n(e[i],t[i]))return!1}else for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}const T=[1/0,1/0,1/0,-1/0,-1/0,-1/0],x=[0,0,0,0,0,0];o()},95466:(e,t,n)=>{n.d(t,{A:()=>p});var i=n(49186),r=n(53966),o=n(91869),s=n(3330),l=n(12195),a=n(30524),u=n(98623),c=n(56400),f=n(96285);const m=new Map;class p{static fromJSON(e){return new p(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new p(e.fields??[],g(e))}static fromLayerJSON(e){return new p(e.fields??[],g(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const n=[];for(const e of this.fields){const t=e?.name,i=y(t);if(t&&i){const r=h(t);this._fieldsMap.set(t,e),this._fieldsMap.set(r,e),this._normalizedFieldsMap.set(i,e),n.push(`${r}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,a.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,a.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,a.te)(e)||(0,a.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}n.sort(),this.uid=n.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,a.te)(e)||(0,a.Xz)(e)||e.nullable||void 0!==(0,a.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(h(e))??this._normalizedFieldsMap.get(y(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(r.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):d.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?s.GB.instance:t===u.n$?f.mQ.utcInstance:(0,o.tE)(m,t,()=>f.oh.create(t)):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,a.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map(e=>(0,l.W)(e)?e.toJSON():e),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function h(e){return e.trim().toLowerCase()}function y(e){return(0,a.rS)(e)?.toLowerCase()??""}const d=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function g(e){const t=new Map;if(!e.fields)return t;const n=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:r}=e,o=(i?"startField"in i?i.startField:i.startTimeField:"")??"",s=(i?"endField"in i?i.endField:i.endTimeField:"")??"",l=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,c.ZS)(e.dateFieldsTimeReference):null,a=r?function(e){return"timeZone"in e}(r)?r.timeZone??l:r.dateFieldsTimeReference?(0,c.ZS)(r.dateFieldsTimeReference):l??u.n$:null,f=i?function(e){return"timeZone"in e}(i)?i.timeZone??l:i.timeReference?(0,c.ZS)(i.timeReference):l:null,m=new Map([[h(r?.creationDateField??""),a],[h(r?.editDateField??""),a],[h(o),f],[h(s),f]]);for(const{name:i,type:r}of e.fields)if(d.has(r))t.set(i,u.L5);else if("date"!==r&&"esriFieldTypeDate"!==r)t.set(i,null);else if(n)t.set(i,u.L5);else{const e=m.get(h(i??""))??l;t.set(i,e)}return t}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[573,2042,7136],{4197:(e,t,r)=>{r.d(t,{Vj:()=>u,cj:()=>a,jh:()=>s,l5:()=>l,xm:()=>o});var i=r(34275),n=r(9093);function s(e){return e<=i.y9?new Array(e).fill(0):new Float64Array(e)}function o(e){return((0,i.iu)(e)?e.byteLength/8:e.length)<=i.y9?Array.from(e):new Float64Array(e)}function l(e,t,r){return Array.isArray(e)?e.slice(t,t+r):e.subarray(t,t+r)}function a(e){return[...e]}function u(e){const t=(0,n.vt)();for(let r=0;r<16;++r)t[r]=e[r];return t}},9093:(e,t,r)=>{function i(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function n(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}r.d(t,{o8:()=>n,vt:()=>i,zK:()=>s});const s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:n,create:i,fromValues:function(e,t,r,i,n,s,o,l,a,u,p,c,h,f,y,m){return[e,t,r,i,n,s,o,l,a,u,p,c,h,f,y,m]}},Symbol.toStringTag,{value:"Module"}))},13069:(e,t,r)=>{r.d(t,{AG:()=>l,lk:()=>n,vD:()=>o,yS:()=>s});const i="randomUUID"in crypto;function n(){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)}function s(){return`{${n().toUpperCase()}}`}function o(){return`{${n()}}`}function l(e){const t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},17136:(e,t,r)=>{r.d(t,{O7:()=>S,el:()=>T});var i=r(92602),n=r(49186),s=r(53966),o=r(39829),l=r(82799),a=r(80754),u=r(21325),p=r(28735),c=r(78888),h=r(65864),f=r(2272),y=r(84952),m=r(92300);const d=()=>s.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function v(e){return"polyline"===e[0].type}function M(e,t,r){if(t){const t=function(e,t){if(!(e instanceof l.A||e instanceof o.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw d().error(e),new n.A("internal:geometry",e)}const r=(0,a.r8)(e),i=[];for(const e of r){const r=[];i.push(r),r.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const n=e[i][0],s=e[i][1],o=e[i+1][0],l=e[i+1][1],a=Math.sqrt((o-n)*(o-n)+(l-s)*(l-s)),u=(l-s)/a,p=(o-n)/a,c=a/t;if(c>1){for(let e=1;e<=c-1;e++){const i=e*t,o=p*i+n,l=u*i+s;r.push([o,l])}const e=(a+Math.floor(c-1)*t)/2,i=p*e+n,o=u*e+s;r.push([i,o])}r.push([o,l])}}return function(e){return"polygon"===e.type}(e)?new o.A({rings:i,spatialReference:e.spatialReference}):new l.A({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,p.ci)(t,!0)}return r&&(e=(0,a.kS)(e,r)),e}function b(e,t,r){if(Array.isArray(e)){const i=e[0];if(i>t){const r=(0,a.kd)(i,t);e[0]=i+r*(-2*t)}else if(i<r){const t=(0,a.kd)(i,r);e[0]=i+t*(-2*r)}}else{const i=e.x;if(i>t){const r=(0,a.kd)(i,t);e=e.clone().offset(r*(-2*t),0)}else if(i<r){const t=(0,a.kd)(i,r);e=e.clone().offset(t*(-2*r),0)}}return e}function _(e,t){let r=-1;for(let i=0;i<t.cutIndexes.length;i++){const n=t.cutIndexes[i],s=t.geometries[i],o=(0,a.r8)(s);for(let e=0;e<o.length;e++){const t=o[e];t.some(r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const i=t[e][0];r=i>r?i:r}r=Number(r.toFixed(9));const i=-360*(0,a.kd)(r,180);for(let r=0;r<t.length;r++){const t=s.getPoint(e,r);s.setPoint(e,r,t.clone().offset(i,0))}return!0}})}if(n===r){if(g(e))for(const t of(0,a.r8)(s))e[n]=e[n].addRing(t);else if(v(e))for(const t of(0,a.r8)(s))e[n]=e[n].addPath(t)}else r=n,e[n]=s}return e}async function T(e,t,r){if(!Array.isArray(e))return T([e],t);t&&"string"!=typeof t&&d().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??i.A.geometryServiceUrl;let s,g,v,S,A,w,F,x,C=0;const N=[],O=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,g=(0,u.Vp)(s),v=s.isWebMercator,w=v?102100:4326,S=a.j7[w].maxX,A=a.j7[w].minX,F=a.j7[w].plus180Line,x=a.j7[w].minus180Line),g)if("mesh"===t.type)O.push(t);else if("point"===t.type)O.push(b(t.clone(),S,A));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>b(e,S,A)),O.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);O.push(e.rings?new o.A(e):e)}else if(t.extent){const e=t.extent,r=(0,a.kd)(e.xmin,A)*(2*S);let i=0===r?t.clone():(0,a.kS)(t.clone(),r);e.offset(r,0);let{xmin:n,xmax:s}=e;n=Number(n.toFixed(9)),s=Number(s.toFixed(9)),e.intersects(F)&&s!==S?(C=s>C?s:C,i=M(i,v),N.push(i),O.push("cut")):e.intersects(x)&&n!==A?(C=s*(2*S)>C?s*(2*S):C,i=M(i,v,360),N.push(i),O.push("cut")):O.push(i)}else O.push(t.clone());else O.push(t);else O.push(t);let R=(0,a.kd)(C,S),Z=-90;const I=R,G=new l.A;for(;R>0;){const e=360*R-180;G.addPath([[e,Z],[e,-1*Z]]),Z*=-1,R--}if(N.length>0&&I>0){const t=_(N,await async function(e,t,r,i){const n=(0,f.Dl)(e),s=t[0].spatialReference,o={...i,responseType:"json",query:{...n.query,f:"json",sr:(0,u.YX)(s),target:JSON.stringify({geometryType:(0,h.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},l=await(0,c.A)(n.path+"/cut",o),{cutIndexes:a,geometries:p=[]}=l.data;return{cutIndexes:a,geometries:p.map(e=>{const t=(0,h.rS)(e);return t.spatialReference=s,t})}}(n,N,G,r)),i=[],s=[];for(let r=0;r<O.length;r++){const n=O[r];if("cut"!==n)s.push(n);else{const n=t.shift(),o=e[r];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&n.rings.length>=o.rings.length?(i.push(n),s.push("simplify")):s.push(v?(0,p.Gh)(n):n)}}if(!i.length)return s;const o=await async function(e,t,r){const i="string"==typeof e?(0,y.An)(e):e,n=t[0].spatialReference,s=(0,h.$B)(t[0]),o={...r,query:{...i.query,f:"json",sr:(0,u.YX)(n),geometries:JSON.stringify((0,m.X)(t))}},{data:l}=await(0,c.A)(i.path+"/simplify",o);return(0,m.V)(l.geometries,s,n)}(n,i,r),l=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?l.push(t):l.push(v?(0,p.Gh)(o.shift()):o.shift())}return l}const j=[];for(let e=0;e<O.length;e++){const t=O[e];if("cut"!==t)j.push(t);else{const e=N.shift();j.push(!0===v?(0,p.Gh)(e):e)}}return j}function S(e,t,r){const i=(0,u.Vp)(r);if(null==i)return e;const[n,s]=i.valid,o=2*s;let l=0,a=0;t>s?l=Math.ceil(Math.abs(t-s)/o):t<n&&(l=-Math.ceil(Math.abs(t-n)/o)),e>s?a=Math.ceil(Math.abs(e-s)/o):e<n&&(a=-Math.ceil(Math.abs(e-n)/o));let p=e+(l-a)*o;const c=p-t;return c>s?p-=o:c<n&&(p+=o),p}},22671:(e,t,r)=>{r.d(t,{A:()=>v});var i,n=r(31635),s=r(52106),o=r(66552),l=r(25482),a=r(4718),u=r(10107),p=(r(44208),r(53966),r(36005)),c=r(40608),h=r(43937),f=r(16930),y=r(65864),m=r(50498),d=r(20437);const g=new o.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=i=class extends l.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,s.A)}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:n}=this;if(n)for(const e of n)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,y.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=f.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,a.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,s=this.features,o=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((n-e)/r));for(let e=0,t=s.length;e<t;e++)o?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,n],scale:[s,o]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,e=>e*s+i,e=>n-e*o,l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const i=f.A.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const s=e[t],o=r.fromJSON(s),l=s.geometry?.spatialReference;null==o.geometry||l||(o.geometry.spatialReference=i);const a=s.aggregateGeometries,u=o.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],r=a[e],n=r?.spatialReference;null==t||n||(t.spatialReference=i)}n.push(o)}return n}_quantizePoints(e,t,r){let i,n;const s=[];for(let o=0,l=e.length;o<l;o++){const l=e[o];if(o>0){const e=t(l[0]),o=r(l[1]);e===i&&o===n||(s.push([e-i,o-n]),i=e,n=o)}else i=t(l[0]),n=r(l[1]),s.push([i,n])}return s.length>0?s:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,y.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,s=i.length;e<s;e++){const s=i[e],o=this._quantizePoints(s,t,r);o&&n.push(o)}return n.length>0?((0,y.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,y.Bi)(e)?e.rings:e.paths;let o,l;for(let e=0,i=s.length;e<i;e++){const i=s[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(o+=n[0],l+=n[1]):(o=n[0],l=n[1]),n[0]=t(o),n[1]=r(l)}}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let o,l;for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(o+=i[0],l+=i[1]):(o=i[0],l=i[1]),i[0]=t(o),i[1]=r(l)}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2])}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=n(t[2])}}:null}};(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,n.Cg)([(0,u.MZ)({type:[s.A],json:{write:!0}})],v.prototype,"features",void 0),(0,n.Cg)([(0,p.w)("features")],v.prototype,"readFeatures",null),(0,n.Cg)([(0,u.MZ)({type:[d.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,n.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],v.prototype,"geometryType",void 0),(0,n.Cg)([(0,h.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,n.Cg)([(0,u.MZ)({types:m.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,n.Cg)([(0,p.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,n.Cg)([(0,u.MZ)({type:f.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,n.Cg)([(0,h.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,n.Cg)([(0,u.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=i=(0,n.Cg)([(0,c.$)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0},50498:(e,t,r)=>{r.d(t,{Ye:()=>c,gy:()=>p,yR:()=>h});var i=r(66552),n=r(5443),s=r(91075),o=r(48526),l=r(86738),a=r(39829),u=r(82799);const p=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),c=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),h={base:s.A,key:"type",typeMap:{extent:n.A,multipoint:o.A,point:l.A,polyline:u.A,polygon:a.A}}},52106:(e,t,r)=>{r.d(t,{A:()=>b});var i,n=r(31635),s=r(13874),o=r(69540),l=r(51447),a=r(25482),u=r(53966),p=r(36708),c=r(24326),h=r(10107),f=(r(44208),r(87811),r(40608)),y=r(12195),m=r(65864),d=r(50498),g=r(54339),v=r(33910);function M(e){if(null==e)return null;const t={};for(const r in e){const i=e[r];i&&(t[r]=i.toJSON())}return 0!==Object.keys(t).length?t:null}let b=class extends((0,o.OU)(a.o)){static{i=this}constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,c.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,l.eF)(u.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new i({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const r of[t,this.sourceLayer,this.layer])if(r&&"object"==typeof r){if("popupTemplate"in r&&r.popupTemplate)return r.popupTemplate;if(e&&"defaultPopupTemplate"in r&&null!=r.defaultPopupTemplate)return r.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=this.sourceLayer??this.layer;return e?(0,g.r)(this,e):null}getGlobalId(){const e=this.sourceLayer??this.layer;return e&&"globalIdField"in e&&e.globalIdField?this.getAttribute(e.globalIdField):null}toJSON(){return{aggregateGeometries:M(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,y.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,i){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const n={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(n.action=i),"attributes"===e&&(n.attributeName=i),this.layer.graphicChanged(n)}_watchMeshGeometryChanges(){this.addHandles([(0,p.z7)(()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,p.z7)(()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0,()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)},{equals:(e,t)=>e===t,sync:!0})])}};(0,n.Cg)([(0,h.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const i=(0,m.rS)(e[r]);i&&(t[r]=i)}return 0!==Object.keys(t).length?t:null}}})],b.prototype,"aggregateGeometries",null),(0,n.Cg)([(0,h.MZ)({value:null})],b.prototype,"attributes",null),(0,n.Cg)([(0,h.MZ)({value:null,types:d.yR,json:{read:m.rS}})],b.prototype,"geometry",null),(0,n.Cg)([(0,h.MZ)({type:Boolean})],b.prototype,"isAggregate",void 0),(0,n.Cg)([(0,h.MZ)({clonable:!1})],b.prototype,"layer",void 0),(0,n.Cg)([(0,h.MZ)({clonable:"reference"})],b.prototype,"origin",void 0),(0,n.Cg)([(0,h.MZ)({type:s.A,value:null})],b.prototype,"popupTemplate",null),(0,n.Cg)([(0,h.MZ)({clonable:"reference"})],b.prototype,"sourceLayer",void 0),(0,n.Cg)([(0,h.MZ)({value:null,types:v.Es})],b.prototype,"symbol",null),(0,n.Cg)([(0,h.MZ)({clonable:!1,json:{read:!1,write:!1}})],b.prototype,"_version",void 0),(0,n.Cg)([(0,h.MZ)({type:Boolean,value:!0})],b.prototype,"visible",null),b=i=(0,n.Cg)([(0,f.$)("esri.Graphic")],b)},54339:(e,t,r)=>{function i(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const r=[];for(const i of t.fieldNames)r.push(e.attributes[i]??null);return JSON.stringify(r)}}}function n(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const r=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(r)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}r.d(t,{W:()=>i,r:()=>n})},70328:(e,t,r)=>{r.d(t,{BI:()=>M,DC:()=>c,Ej:()=>f,Ie:()=>g,Jt:()=>v,Ne:()=>y,RF:()=>p,aI:()=>_,fA:()=>o,gE:()=>a,hZ:()=>d,iT:()=>h,is:()=>b,qv:()=>T,vI:()=>m,vY:()=>l,v_:()=>S,vt:()=>s,w1:()=>u});var i=r(5443),n=(r(19419),r(4197));function s(e=S){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,r,i,n,o,l=s()){return l[0]=e,l[1]=t,l[2]=r,l[3]=i,l[4]=n,l[5]=o,l}function l(e,t=s()){return function(e,t,r,i=s()){return d(i,T),function(e,t,r=0,i=t.length/3){let n=e[0],s=e[1],o=e[2],l=e[3],a=e[4],u=e[5];for(let e=0;e<i;e++)n=Math.min(n,t[r+3*e]),s=Math.min(s,t[r+3*e+1]),o=Math.min(o,t[r+3*e+2]),l=Math.max(l,t[r+3*e]),a=Math.max(a,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=n,e[1]=s,e[2]=o,e[3]=l,e[4]=a,e[5]=u}(i,e,t,r),i}(e,0,e.length/3,t)}function a(e,t=(0,n.jh)(24)){const[r,i,s,o,l,a]=e;return t[0]=r,t[1]=i,t[2]=s,t[3]=r,t[4]=i,t[5]=a,t[6]=r,t[7]=l,t[8]=s,t[9]=r,t[10]=l,t[11]=a,t[12]=o,t[13]=i,t[14]=s,t[15]=o,t[16]=i,t[17]=a,t[18]=o,t[19]=l,t[20]=s,t[21]=o,t[22]=l,t[23]=a,t}function u(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function p(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function h(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function f(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function y(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function m(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function d(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function g(e){return e?d(e,T):s(T)}function v(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function M(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=n,e[5]=Number.POSITIVE_INFINITY,e}function b(e){return 6===e.length}function _(e,t,r){if(null==e||null==t)return e===t;if(!b(e)||!b(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}const T=[1/0,1/0,1/0,-1/0,-1/0,-1/0],S=[0,0,0,0,0,0];s()},71756:(e,t,r)=>{r.r(t),r.d(t,{default:()=>P});var i,n=r(31635),s=r(78888),o=r(49186),l=r(81583),a=r(92071),u=r(74887),p=r(84952),c=r(10107),h=r(79901),f=(r(44208),r(87811),r(36005)),y=r(40608),m=r(43937),d=r(16930),g=r(4146),v=r(52136),M=r(89186),b=r(98534),_=r(18768),T=r(63074),S=r(69208),A=r(16131),w=r(8303),F=r(54310),x=r(25036),C=r(91921),N=r(60694),O=r(10873),R=r(33446),Z=r(15775),I=r(88625);const G=["Canvas/World_Dark_Gray_Base","Canvas/World_Dark_Gray_Reference","Canvas/World_Light_Gray_Base","Canvas/World_Light_Gray_Reference","Elevation/World_Hillshade","Elevation/World_Hillshade_Dark","Ocean/World_Ocean_Base","Ocean/World_Ocean_Reference","Ocean_Basemap","Reference/World_Boundaries_and_Places","Reference/World_Boundaries_and_Places_Alternate","Reference/World_Transportation","World_Imagery","World_Street_Map","World_Topo_Map"];let j=i=class extends((0,T.dM)((0,x.j)((0,C.I)((0,M.f)((0,b.V)((0,A.q)((0,w.A)((0,_.b)((0,a.P)((0,F.J)((0,v.p)((0,S.d)(g.A))))))))))))){constructor(...e){super(...e),this.listMode="show",this.elevationInfo=new I.A({mode:"on-the-ground"}),this.isReference=null,this.operationalLayerType="ArcGISTiledMapServiceLayer",this.resampling=!0,this.sourceJSON=null,this.spatialReference=null,this.path=null,this.sublayers=null,this.type="tile",this.url=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Map Service"]},e).catch(u.QP).then(()=>this._fetchService(t))),Promise.resolve(this)}get attributionDataUrl(){const e=this.parsedUrl?.path.toLowerCase();return e?this._getDefaultAttribution(this._getMapName(e)):null}get hasAttributionData(){return super.hasAttributionData}readSpatialReference(e,t){return(e=e||t.tileInfo?.spatialReference)&&d.A.fromJSON(e)}writeSublayers(e,t,r,i){if(!this.loaded||!e)return;const n=e.slice().reverse().flatten(({sublayers:e})=>e&&e.toArray().reverse()).toArray(),s=[],o={writeSublayerStructure:!1,...i};n.forEach(e=>{const t=e.write({},o);s.push(t)}),s.some(e=>Object.keys(e).length>1)&&(t.layers=s)}get tileServers(){return this._getDefaultTileServers(this.parsedUrl?.path)}castTileServers(e){return Array.isArray(e)?e.map(e=>(0,p.An)(e).path):null}fetchTile(e,t,r,i={}){const{signal:n}=i,o=this.getTileUrl(e,t,r),l={responseType:"image",signal:n,query:{...this.refreshParameters}};return(0,s.A)(o,l).then(e=>e.data)}async fetchImageBitmapTile(e,t,r,n={}){const{signal:o}=n;if(this.fetchTile!==i.prototype.fetchTile){const i=await this.fetchTile(e,t,r,n);return(0,R.C)(i,e,t,r,o)}const l=this.getTileUrl(e,t,r),a={responseType:"blob",signal:o,query:{...this.refreshParameters}},{data:u}=await(0,s.A)(l,a);return(0,R.C)(u,e,t,r,o)}getTileUrl(e,t,r){const i=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,n=(0,p.x0)({...this.parsedUrl?.query,blankTile:!i&&null,...this.customParameters,token:this.apiKey}),s=this.tileServers;return`${s&&s.length?s[t%s.length]:this.parsedUrl?.path}/tile/${e}/${t}/${r}${n?"?"+n:""}`}loadAll(){return(0,l.g)(this,e=>{e(this.allSublayers)})}_fetchService(e){return new Promise((t,r)=>{if(this.sourceJSON){if(null!=this.sourceJSON.bandCount&&null!=this.sourceJSON.pixelSizeX)throw new o.A("tile-layer:unsupported-url","use ImageryTileLayer to open a tiled image service");return void t({data:this.sourceJSON})}if(!this.parsedUrl)throw new o.A("tile-layer:undefined-url","layer's url is not defined");const i=(0,N.qg)(this.parsedUrl.path);if(null!=i&&"ImageServer"===i.serverType)throw new o.A("tile-layer:unsupported-url","use ImageryTileLayer to open a tiled image service");(0,s.A)(this.parsedUrl.path,{query:{f:"json",...this.parsedUrl.query,...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then(t,r)}).then(t=>{let r=this.url;if(t.ssl&&(r=this.url=r.replace(/^http:/i,"https:")),this.sourceJSON=t.data,this.read(t.data,{origin:"service",url:this.parsedUrl}),10.1===this.version&&!(0,N.Wo)(r))return this._fetchServerVersion(r,e).then(e=>{this.read({currentVersion:e})}).catch(()=>{})})}_fetchServerVersion(e,t){if(!(0,N.Fi)(e))return Promise.reject();const r=e.replace(/(.*\/rest)\/.*/i,"$1")+"/info";return(0,s.A)(r,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:t}).then(e=>{if(e.data?.currentVersion)return e.data.currentVersion;throw new o.A("tile-layer:version-not-available","Server did not provide a version")})}_getMapName(e){const t=e.match(/^(?:https?:)?\/\/(server\.arcgisonline\.com|services\.arcgisonline\.com|ibasemaps-api\.arcgis\.com)\/arcgis\/rest\/services\/([^/]+(\/[^/]+)*)\/mapserver/i);return t?t[2]:void 0}_getDefaultAttribution(e){if(null==e)return null;let t;e=e.toLowerCase();for(let r=0,i=G.length;r<i;r++)if(t=G[r],t.toLowerCase().includes(e))return(0,p.s2)("//static.arcgis.com/attribution/"+t);return null}_getDefaultTileServers(e){if(null==e)return[];const t=-1!==e.search(/^(?:https?:)?\/\/server\.arcgisonline\.com/i),r=-1!==e.search(/^(?:https?:)?\/\/services\.arcgisonline\.com/i);return t||r?[e,e.replace(t?/server\.arcgisonline/i:/services\.arcgisonline/i,t?"services.arcgisonline":"server.arcgisonline")]:[]}get hasOverriddenFetchTile(){return!this.fetchTile[L]}};(0,n.Cg)([(0,c.MZ)({readOnly:!0})],j.prototype,"attributionDataUrl",null),(0,n.Cg)([(0,c.MZ)({type:["show","hide","hide-children"]})],j.prototype,"listMode",void 0),(0,n.Cg)([(0,c.MZ)({json:{read:!0,write:!0}})],j.prototype,"blendMode",void 0),(0,n.Cg)([(0,c.MZ)()],j.prototype,"elevationInfo",void 0),(0,n.Cg)([(0,c.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],j.prototype,"isReference",void 0),(0,n.Cg)([(0,c.MZ)({readOnly:!0,type:["ArcGISTiledMapServiceLayer"]})],j.prototype,"operationalLayerType",void 0),(0,n.Cg)([(0,c.MZ)({type:Boolean})],j.prototype,"resampling",void 0),(0,n.Cg)([(0,c.MZ)()],j.prototype,"sourceJSON",void 0),(0,n.Cg)([(0,c.MZ)({type:d.A})],j.prototype,"spatialReference",void 0),(0,n.Cg)([(0,f.w)("spatialReference",["spatialReference","tileInfo"])],j.prototype,"readSpatialReference",null),(0,n.Cg)([(0,c.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],j.prototype,"path",void 0),(0,n.Cg)([(0,c.MZ)({readOnly:!0})],j.prototype,"sublayers",void 0),(0,n.Cg)([(0,m.K)("sublayers",{layers:{type:[Z.A]}})],j.prototype,"writeSublayers",null),(0,n.Cg)([(0,c.MZ)({json:{read:!1,write:!1}})],j.prototype,"popupEnabled",void 0),(0,n.Cg)([(0,c.MZ)()],j.prototype,"tileServers",null),(0,n.Cg)([(0,h.w)("tileServers")],j.prototype,"castTileServers",null),(0,n.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],j.prototype,"type",void 0),(0,n.Cg)([(0,c.MZ)(O.OZ)],j.prototype,"url",void 0),j=i=(0,n.Cg)([(0,y.$)("esri.layers.TileLayer")],j);const L=Symbol("default-fetch-tile");j.prototype.fetchTile[L]=!0;const P=j},80754:(e,t,r)=>{r.d(t,{j7:()=>o,kS:()=>a,kd:()=>l,r8:()=>u});var i=r(82799),n=r(16930),s=r(65864);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function a(e,t){const r=u(e);for(const e of r)for(const r of e)r[0]+=t;return e}function u(e){return(0,s.Bi)(e)?e.rings:e.paths}},92300:(e,t,r)=>{r.d(t,{V:()=>s,X:()=>n});var i=r(65864);function n(e){return{geometryType:(0,i.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function s(e,t,r){const n=(0,i.xD)(t);return e.map(e=>{const t=n.fromJSON(e);return t.spatialReference=r,t})}},95466:(e,t,r)=>{r.d(t,{A:()=>f});var i=r(49186),n=r(53966),s=r(91869),o=r(3330),l=r(12195),a=r(30524),u=r(98623),p=r(56400),c=r(96285);const h=new Map;class f{static fromJSON(e){return new f(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new f(e.fields??[],g(e))}static fromLayerJSON(e){return new f(e.fields??[],g(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=m(t);if(t&&i){const n=y(t);this._fieldsMap.set(t,e),this._fieldsMap.set(n,e),this._normalizedFieldsMap.set(i,e),r.push(`${n}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,a.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,a.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,a.te)(e)||(0,a.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,a.te)(e)||(0,a.Xz)(e)||e.nullable||void 0!==(0,a.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(y(e))??this._normalizedFieldsMap.get(m(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):d.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?o.GB.instance:t===u.n$?c.mQ.utcInstance:(0,s.tE)(h,t,()=>c.oh.create(t)):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,a.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map(e=>(0,l.W)(e)?e.toJSON():e),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function y(e){return e.trim().toLowerCase()}function m(e){return(0,a.rS)(e)?.toLowerCase()??""}const d=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function g(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:n}=e,s=(i?"startField"in i?i.startField:i.startTimeField:"")??"",o=(i?"endField"in i?i.endField:i.endTimeField:"")??"",l=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,p.ZS)(e.dateFieldsTimeReference):null,a=n?function(e){return"timeZone"in e}(n)?n.timeZone??l:n.dateFieldsTimeReference?(0,p.ZS)(n.dateFieldsTimeReference):l??u.n$:null,c=i?function(e){return"timeZone"in e}(i)?i.timeZone??l:i.timeReference?(0,p.ZS)(i.timeReference):l:null,h=new Map([[y(n?.creationDateField??""),a],[y(n?.editDateField??""),a],[y(s),c],[y(o),c]]);for(const{name:i,type:n}of e.fields)if(d.has(n))t.set(i,u.L5);else if("date"!==n&&"esriFieldTypeDate"!==n)t.set(i,null);else if(r)t.set(i,u.L5);else{const e=h.get(y(i??""))??l;t.set(i,e)}return t}}}]);
|