@arcgis/core 6.0.0-next.27 → 6.0.0-next.29
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/Map.d.ts +6 -0
- package/analysis/AreaMeasurementAnalysis.d.ts +4 -2
- package/analysis/DirectLineMeasurementAnalysis.d.ts +8 -4
- package/arcgisGlobal.d.ts +0 -2
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/131185d26343a997495e.js +1 -0
- package/assets/esri/core/workers/chunks/144bad0c2415c345736a.js +1 -0
- package/assets/esri/core/workers/chunks/176d0a06ebff5a29dedf.js +1 -0
- package/assets/esri/core/workers/chunks/{b0ca81a07cff25df19d2.js → 176d75e76318bfc25a53.js} +1 -1
- package/assets/esri/core/workers/chunks/18776a130d96879a68b1.js +1 -0
- package/assets/esri/core/workers/chunks/{e35641a3a4da8cfbcf54.js → 189321d88026bd7e6d3e.js} +1 -1
- package/assets/esri/core/workers/chunks/18e7fa4d3e0b1a084cc6.js +1 -0
- package/assets/esri/core/workers/chunks/{1168bc5c9f0a7e1f63a2.js → 1989410a618865f02dec.js} +1 -1
- package/assets/esri/core/workers/chunks/{2c0cb214fedb29487eef.js → 199a7f97916679e0257c.js} +1 -1
- package/assets/esri/core/workers/chunks/1c406ab2bf99ac563316.js +1 -0
- package/assets/esri/core/workers/chunks/1d96fbad881a7d14a950.js +1 -0
- package/assets/esri/core/workers/chunks/{42d44c7d532df5ee70e9.js → 1deca3de77b1a9a07da4.js} +1 -1
- package/assets/esri/core/workers/chunks/{45f826554499c38968c6.js → 1ee4df0fd61440cb5f02.js} +1 -1
- package/assets/esri/core/workers/chunks/22e73501e1435a896826.js +1 -0
- package/assets/esri/core/workers/chunks/25657f70c5f04a4ed978.js +1 -0
- package/assets/esri/core/workers/chunks/276a0b549acf048e8673.js +1 -0
- package/assets/esri/core/workers/chunks/{56e903ccef66cbe18f92.js → 2cd60fd062d954322c1f.js} +1 -1
- package/assets/esri/core/workers/chunks/{ad96132bc89671e595f3.js → 2d3e0e4442dbc6ec6def.js} +1 -1
- package/assets/esri/core/workers/chunks/2de4296590bf9f9e9add.js +1 -0
- package/assets/esri/core/workers/chunks/2f5d014d6a72108b0b3a.js +1 -0
- package/assets/esri/core/workers/chunks/{0363d29fc665d169ebc4.js → 3105336a05f38a95ebea.js} +1 -1
- package/assets/esri/core/workers/chunks/379ef56f6b32494832a6.js +1 -0
- package/assets/esri/core/workers/chunks/3aafdb905c697bc9b1ad.js +1 -0
- package/assets/esri/core/workers/chunks/40c2674dae73f0942751.js +1 -0
- package/assets/esri/core/workers/chunks/418addce122dbb8897b4.js +1 -0
- package/assets/esri/core/workers/chunks/4419732baf3459a80e6d.js +1 -0
- package/assets/esri/core/workers/chunks/4976f5567fc7f1b63d10.js +1 -0
- package/assets/esri/core/workers/chunks/4e17665dd9048c300d87.js +1 -0
- package/assets/esri/core/workers/chunks/5396b6e99a0546a25d19.js +1 -0
- package/assets/esri/core/workers/chunks/53c7510df09b71ab5646.js +1 -0
- package/assets/esri/core/workers/chunks/561c48cb4d49b150765b.js +1 -0
- package/assets/esri/core/workers/chunks/{d90a3bfd45b5ed4092e0.js → 590fe0f56bc4c33a50e7.js} +1 -1
- package/assets/esri/core/workers/chunks/5bb6c255bdc8aa9ba23e.js +1 -0
- package/assets/esri/core/workers/chunks/5f1cb79aec9c4a9b7ddc.js +29 -0
- package/assets/esri/core/workers/chunks/{23a4806b4cdf7cc32e4d.js → 5f787809b74eed7b9a91.js} +1 -1
- package/assets/esri/core/workers/chunks/636e9c4ac1f9ae98f9d1.js +1 -0
- package/assets/esri/core/workers/chunks/654f5441227579d2b6b4.js +1 -0
- package/assets/esri/core/workers/chunks/692f0093c444fcc752b5.js +1 -0
- package/assets/esri/core/workers/chunks/69627b2634da64dd885f.js +1 -0
- package/assets/esri/core/workers/chunks/6a7de221cea4426cb490.js +1 -0
- package/assets/esri/core/workers/chunks/7030a4d0714a35995a58.js +1 -0
- package/assets/esri/core/workers/chunks/72d20d3957d612f86431.js +1 -0
- package/assets/esri/core/workers/chunks/7862abd24fb5c3b12e6b.js +1 -0
- package/assets/esri/core/workers/chunks/7a0b4dc0cda190367a39.js +1 -0
- package/assets/esri/core/workers/chunks/{ab1660f5f8a5268c2fac.js → 84038dd85005fea413eb.js} +1 -1
- package/assets/esri/core/workers/chunks/849f446c718e892f39ce.js +1 -0
- package/assets/esri/core/workers/chunks/{8ac2098ecdc40ad41055.js → 8502274806ea52308822.js} +1 -1
- package/assets/esri/core/workers/chunks/865cebc5c982c040ab6f.js +1 -0
- package/assets/esri/core/workers/chunks/{76196c414e48834f7b92.js → 8f008eedb11685ee2048.js} +1 -1
- package/assets/esri/core/workers/chunks/90d797ab82d4a68ba32f.js +1 -0
- package/assets/esri/core/workers/chunks/9184c947cdefe06bf551.js +1 -0
- package/assets/esri/core/workers/chunks/9976eaa81085c0d17e14.js +1 -0
- package/assets/esri/core/workers/chunks/{177f353ce72133e2eeed.js → 9c2436464b7dfd666678.js} +1 -1
- package/assets/esri/core/workers/chunks/a125650edbed802e419a.js +1 -0
- package/assets/esri/core/workers/chunks/{23fd4de56de352f63e2d.js → a2196a49f89d57a0a1c7.js} +1 -1
- package/assets/esri/core/workers/chunks/ad21757d78e372fa2ed6.js +1 -0
- package/assets/esri/core/workers/chunks/b01688ccc29d33bfc82d.js +1 -0
- package/assets/esri/core/workers/chunks/b5eff28cf482d920b9ea.js +1 -0
- package/assets/esri/core/workers/chunks/{04ecf15524ff3838c01c.js → ba4520ddcb6a49988da6.js} +1 -1
- package/assets/esri/core/workers/chunks/be55771758e4bcef0976.js +1 -0
- package/assets/esri/core/workers/chunks/bead830a677690eeb6fb.js +1 -0
- package/assets/esri/core/workers/chunks/c131e0dd180a4c10e12e.js +1 -0
- package/assets/esri/core/workers/chunks/c1cf3edce15f09648eb4.js +1 -0
- package/assets/esri/core/workers/chunks/c4f78a481f43cfae7b63.js +1 -0
- package/assets/esri/core/workers/chunks/c570b90995c65bbb2e14.js +1 -0
- package/assets/esri/core/workers/chunks/c576bef77e34920af188.js +1 -0
- package/assets/esri/core/workers/chunks/c9feffb9884cfed52c4b.js +1 -0
- package/assets/esri/core/workers/chunks/cc97e4fd0dacad970a23.js +1 -0
- package/assets/esri/core/workers/chunks/ce324dde6d7daea33638.js +1 -0
- package/assets/esri/core/workers/chunks/d1d6154b4af1c9cc497b.js +1 -0
- package/assets/esri/core/workers/chunks/d3c3fb079ad97970f834.js +1 -0
- package/assets/esri/core/workers/chunks/daae21cf77864f3293ef.js +1 -0
- package/assets/esri/core/workers/chunks/dc2f93453dfa40f623ab.js +1 -0
- package/assets/esri/core/workers/chunks/dcf6024dc19428ff2b9d.js +1 -0
- package/assets/esri/core/workers/chunks/dd30b02c5978c1c5f511.js +1 -0
- package/assets/esri/core/workers/chunks/de3f140058aa0b907b65.js +1 -0
- package/assets/esri/core/workers/chunks/df375d1b0dab5ecbd1be.js +1 -0
- package/assets/esri/core/workers/chunks/{ef2c3febcceedc44b3ac.js → dfd4782b11d6fdca0492.js} +1 -1
- package/assets/esri/core/workers/chunks/{48cc58890fddbcf69cef.js → e121d15b883184ee83e7.js} +1 -1
- package/assets/esri/core/workers/chunks/{67e06d606c7fd2064adf.js → e2c6cd8dac01e129ccfe.js} +1 -1
- package/assets/esri/core/workers/chunks/e3b212f8af448ec29eef.js +1 -0
- package/assets/esri/core/workers/chunks/e4042e43f0081fe49f7b.js +1 -0
- package/assets/esri/core/workers/chunks/e480e7d5f40049a2053b.js +1 -0
- package/assets/esri/core/workers/chunks/eaab787a5f2445be5e5a.js +1 -0
- package/assets/esri/core/workers/chunks/edd36a1fc80b1d29907e.js +1 -0
- package/assets/esri/core/workers/chunks/ee0dc906cc7979080329.js +1 -0
- package/assets/esri/core/workers/chunks/f07fb9b3fa30d7ee1681.js +1 -0
- package/assets/esri/core/workers/chunks/f09bc86cd52224febfcb.js +1 -0
- package/assets/esri/core/workers/chunks/{037c67ef5c4398d5954d.js → f2dab9fcd90ce38ae3d1.js} +1 -1
- package/assets/esri/core/workers/chunks/f39c700f3db7db52b522.js +1 -0
- package/assets/esri/core/workers/chunks/f3b4159c0722df8ffe13.js +1 -0
- package/assets/esri/core/workers/chunks/f3dc0bc0e00635855a7a.js +1 -0
- package/assets/esri/core/workers/chunks/f45064066e1ab041a0b2.js +1 -0
- package/assets/esri/core/workers/chunks/f7398cfd8bbd041bd635.js +1 -0
- package/assets/esri/core/workers/chunks/f9dc38761b314d33890f.js +1 -0
- package/assets/esri/core/workers/chunks/fe6dcb21570395e46ce8.js +1 -0
- package/assets/esri/core/workers/chunks/{00580a68835aac653038.js → fefdd10bdd5a4c8d8ed0.js} +45 -48
- package/assets/esri/core/workers/chunks/ffe49d9e7df081bef4a5.js +1 -0
- package/assets/esri/themes/base/_core.scss +0 -2
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/BlendLayers.glsl.js +1 -1
- package/chunks/Component.glsl.js +51 -54
- package/chunks/EmissionComposite.glsl.js +1 -1
- package/chunks/Fog.glsl.js +1 -1
- package/chunks/GaussianSplat.glsl.js +65 -21
- package/chunks/GaussianSplatDepth.glsl.js +53 -4
- package/chunks/GaussianSplatShadow.glsl.js +83 -19
- package/chunks/GlobalIllumination.glsl.js +2 -17
- package/chunks/LineMarker.glsl.js +32 -31
- package/chunks/OITAddEmission.glsl.js +1 -1
- package/chunks/RasterColorizer.glsl.js +1 -1
- package/chunks/RibbonLine.glsl.js +34 -34
- package/chunks/Terrain.glsl.js +3 -4
- package/chunks/Water.glsl.js +22 -23
- package/config.d.ts +12 -9
- package/config.js +1 -1
- package/form/FormTemplate.d.ts +1 -1
- package/form/elements/AttachmentElement.d.ts +2 -0
- package/form/elements/FieldElement.d.ts +2 -2
- package/form/elements/FieldElement.js +1 -1
- package/form/elements/RelationshipElement.d.ts +1 -1
- package/form/elements/TextElement.d.ts +2 -2
- package/form/elements/UtilityNetworkAssociationsElement.d.ts +1 -1
- package/form/elements/inputs/DynamicChoiceInput.d.ts +2 -2
- package/form/elements/inputs/inputUtils.js +1 -1
- package/form/elements/inputs/types.d.ts +19 -0
- package/form/elements/inputs.d.ts +3 -2
- package/form/elements/inputs.js +1 -1
- package/geometry/operators/containsOperator.d.ts +1 -1
- package/geometry/operators/densifyOperator.d.ts +1 -1
- package/geometry/operators/differenceOperator.d.ts +6 -4
- package/geometry/operators/distanceOperator.d.ts +1 -1
- package/geometry/operators/geodesicProximityOperator.d.ts +8 -8
- package/geometry/operators/graphicBufferOperator.d.ts +6 -6
- package/geometry/operators/integrateOperator.d.ts +2 -2
- package/geometry/operators/intersectsOperator.d.ts +3 -3
- package/geometry/operators/linesToPolygonsOperator.d.ts +2 -2
- package/geometry/operators/locateBetweenOperator.d.ts +2 -2
- package/geometry/operators/minimumBoundingCircleOperator.d.ts +1 -1
- package/geometry/operators/multiPartToSinglePartOperator.d.ts +2 -2
- package/geometry/operators/polygonSlicerOperator.d.ts +2 -2
- package/geometry/operators/projectOperator.d.ts +2 -2
- package/geometry/operators/proximityOperator.d.ts +15 -15
- package/geometry/operators/shapePreservingProjectOperator.d.ts +2 -2
- package/geometry/operators/simplifyOperator.d.ts +2 -2
- package/geometry/operators/support/GeographicTransformationStep.d.ts +3 -3
- package/geometry/operators/support/Transformation.d.ts +8 -8
- package/geometry/operators/support/geographicTransformationUtils.d.ts +3 -3
- package/geometry/operators/symmetricDifferenceOperator.d.ts +2 -2
- package/geometry/operators/withinOperator.d.ts +3 -3
- package/interfaces.d.ts +0 -14
- package/kernel.js +1 -1
- package/layers/GeospatialPDFLayer.d.ts +2 -2
- package/layers/ParquetLayer.d.ts +1 -1
- package/layers/VideoLayer.d.ts +5 -5
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
- package/layers/orientedImagery/core/coverageUtils.js +1 -1
- package/layers/orientedImagery/transformations/rotationUtils.js +2 -0
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/save/parquetLayerUtils.js +1 -1
- package/layers/support/vectorTileLayerLoader.js +1 -1
- package/package.json +2 -2
- package/popup/FeaturesModel.js +1 -1
- package/popup/support/featureUtils.js +1 -1
- package/rest/featureService/FeatureService.d.ts +0 -5
- package/rest/networks/support/TraceLocation.d.ts +2 -1
- package/rest/networks/support/TraceResult.d.ts +0 -4
- package/rest/support/OutDistance.d.ts +0 -1
- package/smartMapping/statistics/histogramForTimeSeries.js +1 -1
- package/smartMapping/statistics/summaryStatisticsForTimeSeries.js +1 -1
- package/smartMapping/support/adapters/support/histogramUtils.js +1 -1
- package/support/BasemapStyle.d.ts +2 -2
- package/symbols/cim/types.d.ts +7 -9
- package/views/2d/engine/vectorTiles/TileHandler.js +1 -1
- package/views/2d/engine/vectorTiles/style/GeoJSONVectorTileSource.js +1 -1
- package/views/2d/engine/vectorTiles/style/GeoJSONVectorTileSourceWorker.js +1 -1
- package/views/2d/engine/vectorTiles/style/geoJSONVectorTileUtils.js +2 -0
- package/views/2d/engine/webgl/animations/instructions.js +1 -1
- package/views/2d/engine/webgl/collisions/LabelMetric.js +1 -1
- package/views/2d/engine/webgl/collisions/LabelStore.js +1 -1
- package/views/2d/layers/VectorTileLayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
- package/views/2d/layers/support/visualVariableSimpleUtils.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementPathHelper.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
- package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementController.js +1 -1
- package/views/3d/analysis/support/projectionUtils.js +1 -1
- package/views/3d/environment/SunLighting.d.ts +15 -2
- package/views/3d/environment/VirtualLighting.d.ts +15 -2
- package/views/3d/input/SceneInputManager.js +1 -1
- package/views/3d/input/handlers/ground/GroundMouseWheelMove.js +2 -0
- package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
- package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
- package/views/3d/navigation/Navigation3D.js +1 -1
- package/views/3d/state/controllers/GroundMouseWheelController.js +2 -0
- package/views/3d/state/controllers/PointToPointAnimationController.js +1 -1
- package/views/3d/state/utils/OffsetCorrectionController.js +1 -1
- package/views/3d/state/utils/groundNavigationUtils.js +1 -1
- package/views/3d/support/ResourceController.js +1 -1
- package/views/3d/terrain/BlendLayers.glsl.js +1 -1
- package/views/3d/terrain/RasterColorizer.glsl.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/TileAgent.js +1 -1
- package/views/3d/terrain/TileCompositor.js +1 -1
- package/views/3d/terrain/TileRenderer.js +1 -1
- package/views/3d/webgl-engine/Stage.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/Component.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js +23 -26
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +18 -21
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexTangent.glsl.js +7 -8
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js +5 -5
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeFragmentNormals.glsl.js +10 -12
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +22 -25
- package/views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js +3 -5
- package/views/3d/webgl-engine/core/shaderLibrary/shading/forwardLocalUp.glsl.js +6 -0
- package/views/3d/webgl-engine/core/shaderLibrary/shading/getLocalUp.glsl.js +4 -0
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/{TileBackground.glsl.js → blendLayers.glsl.js} +10 -11
- package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatEvaluation.glsl.js +8 -2
- package/views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js +1 -1
- package/views/3d/webgl-engine/effects/RenderPluginContext.js +2 -0
- package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/effects/glow/applyEmissiveGlow.glsl.js +3 -3
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatDepthRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeUtil.glsl.js +30 -35
- package/views/3d/webgl-engine/materials/Water.glsl.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/EmissiveTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatDepth.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js +70 -108
- package/views/3d/webgl-engine/shaders/GaussianSplatShadow.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
- package/views/VideoView.d.ts +10 -0
- package/views/VideoView.js +1 -1
- package/views/draw/DrawOperation.js +1 -1
- package/views/draw/DrawScreenTool.js +1 -1
- package/views/input/types.d.ts +2 -4
- package/views/interactive/options/LabelOptions.d.ts +5 -5
- package/views/interactive/options/SnappingOptions.d.ts +2 -2
- package/views/layers/LayerView.d.ts +10 -2
- package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +2 -3
- package/widgets/Editor/EditorViewModel.d.ts +10 -12
- package/widgets/Editor/VisibleElements.d.ts +4 -0
- package/widgets/Editor.d.ts +2 -0
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/support/EditableColumnTemplateMixin.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/Features/FeaturesViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/ImageMeasurementWorker.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementWorkerUtils.js +2 -0
- package/widgets/OrientedImageryViewer/services/ImageMeasurementService.js +1 -1
- package/widgets/OrientedImageryViewer/support/NonPanoramicMedia.js +1 -1
- package/widgets/OrientedImageryViewer/support/dataCaptureUtils.js +1 -1
- package/widgets/OrientedImageryViewer/support/superimposeUtils.js +1 -1
- package/widgets/PanoramicViewer/utils.js +1 -1
- package/widgets/Search/LayerSearchSource.d.ts +1 -1
- package/widgets/Sketch/VisibleElements.d.ts +4 -0
- package/widgets/Sketch.d.ts +2 -0
- package/widgets/support/iconUtils.js +1 -1
- package/assets/esri/core/workers/chunks/010f57ec7fdbedf78d02.js +0 -1
- package/assets/esri/core/workers/chunks/0487e1d7a7cecf7c1c25.js +0 -1
- package/assets/esri/core/workers/chunks/09300e74e5b014ce6269.js +0 -1
- package/assets/esri/core/workers/chunks/0bd04bcd4b2710838d48.js +0 -1
- package/assets/esri/core/workers/chunks/0d9c4c6c571ce26d356b.js +0 -1
- package/assets/esri/core/workers/chunks/112ed86f812e4400a7e0.js +0 -1
- package/assets/esri/core/workers/chunks/151e5799ede763a03ee2.js +0 -1
- package/assets/esri/core/workers/chunks/173f89c55a5c79ff065b.js +0 -1
- package/assets/esri/core/workers/chunks/2447d2e2a4a3ab8fcf94.js +0 -1
- package/assets/esri/core/workers/chunks/2a36fe3f3f257a779a1b.js +0 -1
- package/assets/esri/core/workers/chunks/2a97268000c6d03ef720.js +0 -1
- package/assets/esri/core/workers/chunks/2cf8172be83b10b11bdc.js +0 -1
- package/assets/esri/core/workers/chunks/2df37a9a95ceebb87a5f.js +0 -1
- package/assets/esri/core/workers/chunks/2e00c155e447e4930442.js +0 -1
- package/assets/esri/core/workers/chunks/2f91fd61019d2a37476d.js +0 -1
- package/assets/esri/core/workers/chunks/30af63b3b750142faadb.js +0 -1
- package/assets/esri/core/workers/chunks/3a47fc97c400fca2c736.js +0 -1
- package/assets/esri/core/workers/chunks/3cd04d23b73beaf79650.js +0 -1
- package/assets/esri/core/workers/chunks/426b4eb500fdfe9df325.js +0 -1
- package/assets/esri/core/workers/chunks/45367aa8e5c5d574de94.js +0 -1
- package/assets/esri/core/workers/chunks/47c97640ec525676918b.js +0 -1
- package/assets/esri/core/workers/chunks/47d074136a7f8e551a9a.js +0 -1
- package/assets/esri/core/workers/chunks/4a6b92ecbb1f1c55cc43.js +0 -1
- package/assets/esri/core/workers/chunks/4cb751dc8d00bdaeb04c.js +0 -1
- package/assets/esri/core/workers/chunks/518ab22f80c3300bcfff.js +0 -1
- package/assets/esri/core/workers/chunks/53ff68d4f9e365fc15cd.js +0 -1
- package/assets/esri/core/workers/chunks/58609bf94f72bc4f1952.js +0 -1
- package/assets/esri/core/workers/chunks/586a929bc037e23857af.js +0 -1
- package/assets/esri/core/workers/chunks/5c7780f804d789cb37f5.js +0 -1
- package/assets/esri/core/workers/chunks/5d76f4d97beee494bbbf.js +0 -1
- package/assets/esri/core/workers/chunks/603fdbbe9534c614928f.js +0 -1
- package/assets/esri/core/workers/chunks/611e3cdf67283c11576f.js +0 -1
- package/assets/esri/core/workers/chunks/6431480ba0fa8c8d487f.js +0 -1
- package/assets/esri/core/workers/chunks/652faf4359ac072c5dde.js +0 -1
- package/assets/esri/core/workers/chunks/65c98f3449044fa4fd79.js +0 -1
- package/assets/esri/core/workers/chunks/6b9961261241fdce0e94.js +0 -1
- package/assets/esri/core/workers/chunks/6dfe96b056bec30068df.js +0 -1
- package/assets/esri/core/workers/chunks/6f897b4e7ddd1dd1672b.js +0 -1
- package/assets/esri/core/workers/chunks/70cc2d79653d66e85b58.js +0 -1
- package/assets/esri/core/workers/chunks/7159d9c36869cd82599e.js +0 -29
- package/assets/esri/core/workers/chunks/7393f63043a1da3d05a6.js +0 -1
- package/assets/esri/core/workers/chunks/7449568eb2305bf2d650.js +0 -1
- package/assets/esri/core/workers/chunks/75d551a449bba61ce238.js +0 -1
- package/assets/esri/core/workers/chunks/7748c2886d0122b40eeb.js +0 -1
- package/assets/esri/core/workers/chunks/78643f116677950ea29a.js +0 -1
- package/assets/esri/core/workers/chunks/78fbe330f16bdbdb886e.js +0 -1
- package/assets/esri/core/workers/chunks/7e0f04a5038e2a4f6e4b.js +0 -1
- package/assets/esri/core/workers/chunks/7f16ae01ccd9b6114d1c.js +0 -1
- package/assets/esri/core/workers/chunks/90153b5230b3a4985c14.js +0 -1
- package/assets/esri/core/workers/chunks/9189dfe19a2a2ccd5173.js +0 -1
- package/assets/esri/core/workers/chunks/943a0f140813ee4ab04a.js +0 -1
- package/assets/esri/core/workers/chunks/98be2f621801e230aa01.js +0 -1
- package/assets/esri/core/workers/chunks/99f51d5d9da6e9bfc430.js +0 -1
- package/assets/esri/core/workers/chunks/9aebe876b1a2fb075f9c.js +0 -1
- package/assets/esri/core/workers/chunks/9b6929faf649e81265fb.js +0 -1
- package/assets/esri/core/workers/chunks/9dd1fc56eb1ea6eb705e.js +0 -1
- package/assets/esri/core/workers/chunks/9dd48e75b4e8d9811d81.js +0 -1
- package/assets/esri/core/workers/chunks/a163c6005aba3378edaa.js +0 -1
- package/assets/esri/core/workers/chunks/a8286febe371dc186aaa.js +0 -1
- package/assets/esri/core/workers/chunks/acb265a22be5e12f38e5.js +0 -1
- package/assets/esri/core/workers/chunks/b12acf1f694f82e00df9.js +0 -1
- package/assets/esri/core/workers/chunks/b83cef2d3f528726d492.js +0 -1
- package/assets/esri/core/workers/chunks/b9596d862da1ec342cd3.js +0 -1
- package/assets/esri/core/workers/chunks/bc1fcc9c897461e68e29.js +0 -1
- package/assets/esri/core/workers/chunks/bdc221d94300c225665a.js +0 -1
- package/assets/esri/core/workers/chunks/be97a629e2ae4d13ceb3.js +0 -1
- package/assets/esri/core/workers/chunks/bfb39590c548188f5052.js +0 -1
- package/assets/esri/core/workers/chunks/c2318c014e97ba519be8.js +0 -1
- package/assets/esri/core/workers/chunks/c29091fe157564cffcf7.js +0 -1
- package/assets/esri/core/workers/chunks/c62237c344e341619341.js +0 -1
- package/assets/esri/core/workers/chunks/c8eae00b0ec87d8b2ff3.js +0 -1
- package/assets/esri/core/workers/chunks/cdb5c26fed7d9a97db49.js +0 -1
- package/assets/esri/core/workers/chunks/cdf0c7706d3e1221f49b.js +0 -1
- package/assets/esri/core/workers/chunks/cea0db3ee326f60610eb.js +0 -1
- package/assets/esri/core/workers/chunks/d7f2f1708d2a2668676c.js +0 -1
- package/assets/esri/core/workers/chunks/daf9b691817e83a11f3c.js +0 -1
- package/assets/esri/core/workers/chunks/db41490bd39d863305bf.js +0 -1
- package/assets/esri/core/workers/chunks/ddc95cdac6c06fc4794c.js +0 -1
- package/assets/esri/core/workers/chunks/df26ec0b508cf4716e0a.js +0 -1
- package/assets/esri/core/workers/chunks/e11159e3dc3353b27c57.js +0 -1
- package/assets/esri/core/workers/chunks/e4a57a0a9629faafd6c6.js +0 -1
- package/assets/esri/core/workers/chunks/ebc1a2ef3aed8aa29424.js +0 -1
- package/assets/esri/core/workers/chunks/ec1c4d66142b6efb0e8b.js +0 -1
- package/assets/esri/core/workers/chunks/ef12fa3574d4cbf8b084.js +0 -1
- package/assets/esri/core/workers/chunks/f2d56f5c15d5977e1d19.js +0 -1
- package/assets/esri/core/workers/chunks/f7bfa3d33b05b250ce33.js +0 -1
- package/assets/esri/core/workers/chunks/f905f1a1aa4c123cbe83.js +0 -1
- package/assets/esri/core/workers/chunks/fc139f251dc0523074e7.js +0 -1
- package/assets/esri/themes/base/widgets/_VideoPlayer.scss +0 -129
- package/assets/esri/widgets/VideoPlayer/t9n/messages.ar.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.bg.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.bs.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.ca.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.cs.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.da.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.de.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.el.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.en.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.es.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.et.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.fi.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.fr.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.he.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.hr.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.hu.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.id.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.it.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.ja.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.ko.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.lt.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.lv.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.nl.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.no.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.pl.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.pt-BR.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.pt-PT.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.ro.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.ru.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.sk.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.sl.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.sr.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.sv.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.th.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.tr.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.uk.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.vi.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.zh-CN.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.zh-HK.json +0 -1
- package/assets/esri/widgets/VideoPlayer/t9n/messages.zh-TW.json +0 -1
- package/widgets/VideoPlayer/VideoPlayerViewModel.d.ts +0 -232
- package/widgets/VideoPlayer/VideoPlayerViewModel.js +0 -2
- package/widgets/VideoPlayer/components/MetadataSection.js +0 -2
- package/widgets/VideoPlayer/components/PlayerActionsGroup.js +0 -2
- package/widgets/VideoPlayer/components/PlayerControlsGroup.js +0 -2
- package/widgets/VideoPlayer/components/SettingsButton.js +0 -2
- package/widgets/VideoPlayer/css.js +0 -2
- package/widgets/VideoPlayer.d.ts +0 -119
- package/widgets/VideoPlayer.js +0 -2
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8118],{18370(e,t,r){r.d(t,{z:()=>i});class s{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return this._promise??=this._import().then(async e=>(this.module=e,e)),this._promise}}function i(e){return new s(e)}},69397(e,t,r){r.d(t,{Qf:()=>a,Qh:()=>n,lM:()=>o,ro:()=>u,rq:()=>p});var s=r(44208),i=r(34275);function o(e){if(!e)return 0;let t=d;for(let r in e)e.hasOwnProperty(r)&&(t+=l(e[r],!1));return t}function n(e){if(!e)return 0;if("number"==typeof e[0])return a(e);if(Array.isArray(e))return function(e){let t=e.length;if(0===t||"number"==typeof e[0])return p(e,8);let r=c;for(let s=0;s<t;s++)r+=l(e[s]);return r}(e);let t=d;for(let r in e)e.hasOwnProperty(r)&&(t+=l(e[r]));return t}function l(e,t=!0){switch(typeof e){case"object":return t?n(e):d;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function a(...e){return e.reduce((e,t)=>e+u(t),0)}function u(e,t=16){return e?(0,i.iu)(e)?e.byteLength+h:Array.isArray(e)?p(e,t):0:0}function p(e,t){return c+e.length*t}const d=32,c=16,y=(0,s.A)("ios")||!(0,s.A)("chrome")&&!(0,s.A)("opr")?8:4,h=145;r.d(t,["JY",0,y])},65977(e,t,r){r.r(t),r.d(t,{default:()=>V});var s=r(32198),i=r(40124),o=r(49186),n=r(25728),l=r(91429),a=r(5443),u=r(16930),p=r(50498),d=r(41910),c=r(55156),y=r(60950),h=r(89808),f=r(99959);const g=Symbol("isOGCFeatureGraphicOrigin");var m;class v extends f.A{get[(m=g,y.ym)](){return this.layer}get[c.e](){return this.layer}get[h.Q](){return this.layer}get[d.e7](){return this.layer}constructor(e){super(),this[m]=!0,this.type="ogc-feature",this.layer=e}get id(){return this.layer.id}}var w=r(4146),C=r(92474),M=r(799),b=r(75321),x=r(4071),P=r(22671);let A=class extends C.x_{constructor(){super(...arguments),this.featureDefinition=null,this.type="ogc-feature"}load(e){return this.addResolvingPromise(this._loadOGCServices(this.layer,e)),this.when()}getSource(){let{featureDefinition:{collection:e,layerDefinition:t,spatialReference:r,supportedCrs:s},layer:{apiKey:i,customParameters:o,effectiveMaxRecordCount:n}}=this;return{type:"ogc-source",collection:e,layerDefinition:t,maxRecordCount:n,queryParameters:{apiKey:i,customParameters:o},spatialReference:r,supportedCrs:s}}queryExtent(e,t={}){return null}queryFeatureCount(e,t={}){return null}queryFeatures(e,t={}){return this.queryFeaturesJSON(e,t).then(e=>P.A.fromJSON(e))}queryFeaturesJSON(e,t={}){let r=this.getSource();return this.load(t).then(()=>(0,b.bW)(r,e,t))}queryObjectIds(e,t={}){return null}serviceSupportsSpatialReference(e){let{isWebMercator:t,isWGS84:r,latestWkid:s,wkid:i}=e,{supportedCrs:o}=this.featureDefinition;return r||t||!!i&&!!o[i]||!!s&&!!o[s]}_conformsToType(e,t){let r=RegExp(`^${(0,M.Cj)(t)}$`,"i");return e.conformsTo.some(e=>r.test(e))??!1}_getCapabilities(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:t,maxRecordCountFactor:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:void 0,standardMaxRecordCount:void 0,standardMaxRecordCountNoGeometry:void 0,supportsStatisticsAggregatedIds:!1,supportsCacheHint:!1,supportsCentroid:!1,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsOutDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPaginationOnAggregatedQueries:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsReturnExceededLimitGeometries:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,supportsSqlExpression:!1,supportsTrueCurve:!1,tileMaxRecordCount:void 0},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:x.$,editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:!1,supportsTrueCurveUpdateByTrueCurveClientsOnly:!0,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}_getMaxRecordCount(e){let t=e?.components?.parameters;return t?.limit?.schema?.maximum??t?.limitFeatures?.schema?.maximum}_getStorageSpatialReference(e){let t=e.storageCrs??b.QE,r=(0,b.J0)(t);return null==r?u.A.WGS84:new u.A({wkid:r})}_getSupportedSpatialReferences(e,t){let r="#/crs",s=e.crs??[b.QE],i=s.includes(r)?s.filter(e=>e!==r).concat(t.crs??[]):s,o=/^http:\/\/www\.opengis.net\/def\/crs\/epsg\/.*\/3785$/i;return i.filter(e=>!o.test(e))}async _loadOGCServices(e,t){let r=null==t?null:t.signal,{apiKey:s,collectionId:i,customParameters:n,fields:l,geometryType:a,hasZ:u,objectIdField:d,timeInfo:c,url:y}=e,h={fields:l?.map(e=>e.toJSON()),geometryType:p.Ye.toJSON(a),hasZ:u,objectIdField:d,timeInfo:c?.toJSON()},f={apiKey:s,customParameters:n,signal:r},g=await(0,b.Ki)(y,f),[m,v]=await Promise.all([(0,b.Px)(g,f),(0,b.CJ)(g,f)]);if(!this._conformsToType(m,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson"))throw new o.A("ogc-feature-layer:no-geojson-support","Server does not support geojson");let w=v.collections.find(({id:e})=>e===i);if(!w)throw new o.A("ogc-feature-layer:collection-not-found","Server does not contain the named collection");let C=this._conformsToType(m,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30")?await(0,b.GA)(g,f):null,x=await(0,b.GL)(w,h,f),P=this._getMaxRecordCount(C),A=this._getCapabilities(x.hasZ,P),I=this._getStorageSpatialReference(w).toJSON(),F=this._getSupportedSpatialReferences(w,v),T=RegExp(`^${(0,M.Cj)(b.vJ)}`,"i"),S={};for(let e of F){let t=(0,b.J0)(e);null!=t&&(S[t]||(S[t]=e.replace(T,"")))}this.featureDefinition={capabilities:A,collection:w,layerDefinition:x,spatialReference:I,supportedCrs:S}}};(0,s.Cg)([(0,l.MZ)()],A.prototype,"featureDefinition",void 0),(0,s.Cg)([(0,l.MZ)({constructOnly:!0})],A.prototype,"layer",void 0),(0,s.Cg)([(0,l.MZ)()],A.prototype,"type",void 0),A=(0,s.Cg)([(0,l.$K)("esri.layers.graphics.sources.OGCFeatureSource")],A);var I=r(52136),F=r(63074),T=r(69208),S=r(6455),Z=r(87718),O=r(56658),R=r(34287),G=r(32756),j=r(8303),E=r(54310),D=r(25036),_=r(82935),U=r(63396),q=r(10873),B=r(33143),L=r(20437),N=r(17036),Q=r(30524),k=r(46499),$=r(39383),z=r(41214),J=r(97552),H=r(30291);const K=(0,N.p)();let W=class extends((0,S.FJ)((0,I.p)((0,T.d)((0,O.J)((0,Z.F)((0,F.dM)((0,G.fY)((0,_.e)((0,U.d)((0,D.j)((0,R.q)((0,j.A)((0,E.J)((0,n.M)(w.A))))))))))))))){constructor(e){super(e),this.capabilities=null,this.collectionId=null,this.copyright=null,this.description=null,this.displayField=null,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new v(this),this.hasZ=void 0,this.labelingInfo=null,this.labelsVisible=!0,this.legendEnabled=!0,this.maxRecordCount=null,this.objectIdField=null,this.operationalLayerType="OGCFeatureLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new A({layer:this}),this.spatialReference=null,this.timeInfo=null,this.title=null,this.type="ogc-feature",this.typeIdField=null,this.types=null,this.url=null}destroy(){this.source?.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["OGCFeatureServer"]},e).then(()=>this._fetchService(e))),this.when()}get defaultPopupTemplate(){return this.createPopupTemplate()}get effectiveMaxRecordCount(){return this.maxRecordCount??this.capabilities?.query.maxRecordCount??5e3}get isTable(){return this.loaded&&null==this.geometryType}set renderer(e){(0,Q.yp)(e,this.fieldsIndex),this._set("renderer",e)}createPopupTemplate(e){return(0,H.tn)(this,e)}createQuery(){return new J.A}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){let r,s=!1,i=t?.feature?.attributes,o=this.typeIdField&&i?.[this.typeIdField];return null!=o&&this.types&&(s=this.types.some(t=>t.id==o&&(r=t.domains?.[e],"inherited"===r?.type&&(r=this._getLayerDomain(e)),!0))),!s&&!r&&(r=this._getLayerDomain(e)),r}queryFeatures(e,t){return this.load().then(()=>this.source.queryFeatures(J.A.from(e)||this.createQuery(),t)).then(e=>(e?.features?.forEach(e=>{e.layer=e.sourceLayer=this,e.origin=this.graphicOrigin}),e))}async queryAttributeBins(e,t){throw new o.A("OGCFeatureLayer","Layer source does not support queryAttributeBins capability")}serviceSupportsSpatialReference(e){return this.source?.serviceSupportsSpatialReference(e)??!1}async _fetchService(e){await this.source.load(e),this.read(this.source.featureDefinition,{origin:"service"}),(0,Q.yp)(this.renderer,this.fieldsIndex),(0,Q.sv)(this.timeInfo,this.fieldsIndex)}_getLayerDomain(e){if(!this.fields)return null;for(let t of this.fields)if(t.name===e&&t.domain)return t.domain;return null}};(0,s.Cg)([(0,l.MZ)({readOnly:!0,json:{origins:{service:{read:!0}}}})],W.prototype,"capabilities",void 0),(0,s.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],W.prototype,"collectionId",void 0),(0,s.Cg)([(0,l.MZ)({type:String})],W.prototype,"copyright",void 0),(0,s.Cg)([(0,l.MZ)({readOnly:!0})],W.prototype,"defaultPopupTemplate",null),(0,s.Cg)([(0,l.MZ)({readOnly:!0,type:String,json:{origins:{service:{name:"collection.description"}}}})],W.prototype,"description",void 0),(0,s.Cg)([(0,l.MZ)({type:String})],W.prototype,"displayField",void 0),(0,s.Cg)([(0,l.MZ)({type:Number})],W.prototype,"effectiveMaxRecordCount",null),(0,s.Cg)([(0,l.MZ)(q.Yj)],W.prototype,"elevationInfo",void 0),(0,s.Cg)([(0,l.MZ)({type:[L.A],json:{origins:{service:{name:"layerDefinition.fields"}}}})],W.prototype,"fields",void 0),(0,s.Cg)([(0,l.MZ)(K.fieldsIndex)],W.prototype,"fieldsIndex",void 0),(0,s.Cg)([(0,l.MZ)({readOnly:!0,type:a.A,json:{origins:{service:{name:"layerDefinition.extent"}}}})],W.prototype,"fullExtent",void 0),(0,s.Cg)([(0,l.MZ)({type:p.gy.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:p.gy.read}}}}})],W.prototype,"geometryType",void 0),(0,s.Cg)([(0,l.MZ)({readOnly:!0,clonable:!1})],W.prototype,"graphicOrigin",void 0),(0,s.Cg)([(0,l.MZ)({type:Boolean,json:{origins:{service:{name:"layerDefinition.hasZ"}}}})],W.prototype,"hasZ",void 0),(0,s.Cg)([(0,l.MZ)({type:Boolean,readOnly:!0})],W.prototype,"isTable",null),(0,s.Cg)([(0,l.MZ)({type:[k.A],json:{origins:{"web-document":{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:$.w},write:!0}}}})],W.prototype,"labelingInfo",void 0),(0,s.Cg)([(0,l.MZ)(q.kF)],W.prototype,"labelsVisible",void 0),(0,s.Cg)([(0,l.MZ)(q.fV)],W.prototype,"legendEnabled",void 0),(0,s.Cg)([(0,l.MZ)({type:Number})],W.prototype,"maxRecordCount",void 0),(0,s.Cg)([(0,l.MZ)({type:String,json:{origins:{service:{name:"layerDefinition.objectIdField"}}}})],W.prototype,"objectIdField",void 0),(0,s.Cg)([(0,l.MZ)({type:["OGCFeatureLayer"]})],W.prototype,"operationalLayerType",void 0),(0,s.Cg)([(0,l.MZ)(q.M6)],W.prototype,"popupEnabled",void 0),(0,s.Cg)([(0,l.MZ)({type:i.A,json:{name:"popupInfo",write:!0}})],W.prototype,"popupTemplate",void 0),(0,s.Cg)([(0,l.MZ)({types:z.Hg,json:{origins:{service:{name:"layerDefinition.drawingInfo.renderer",write:!1},"web-scene":{types:z.XJ,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:!0}})],W.prototype,"renderer",null),(0,s.Cg)([(0,l.MZ)(q.PY)],W.prototype,"screenSizePerspectiveEnabled",void 0),(0,s.Cg)([(0,l.MZ)({readOnly:!0})],W.prototype,"source",void 0),(0,s.Cg)([(0,l.MZ)({readOnly:!0,type:u.A,json:{origins:{service:{read:!0}}}})],W.prototype,"spatialReference",void 0),(0,s.Cg)([(0,l.MZ)((0,q.U$)({name:"layerDefinition.timeInfo"}))],W.prototype,"timeInfo",void 0),(0,s.Cg)([(0,l.MZ)({type:String,json:{write:{enabled:!0,ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"collection.title"}}}})],W.prototype,"title",void 0),(0,s.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],W.prototype,"type",void 0),(0,s.Cg)([(0,l.MZ)({type:String,readOnly:!0})],W.prototype,"typeIdField",void 0),(0,s.Cg)([(0,l.MZ)({type:[B.A]})],W.prototype,"types",void 0),(0,s.Cg)([(0,l.MZ)(q.OZ)],W.prototype,"url",void 0),W=(0,s.Cg)([(0,l.$K)("esri.layers.OGCFeatureLayer")],W);const V=W},43334(e,t,r){r.d(t,{N3:()=>l,Om:()=>n});var s=r(69397),i=r(27647),o=r(92722);class n{constructor(e,t,r,s,i=0,o=null,n=null){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=s,this.displayId=i,this.distance=o,this.vertexCount=n}static fromJSON(e){let t=e.geometry?o.A.fromJSON(e.geometry):null,r=e.centroid?o.A.fromJSON(e.centroid):null,s=e.objectId;return new n(t,e.attributes,r,s,void 0,e.distance,e.vertexCount)}weakClone(){return new n(this.geometry,this.attributes,this.centroid,this.objectId,this.displayId,this.distance,this.vertexCount)}clone(){return new n(this.geometry?.clone(),{...this.attributes},this.centroid?.clone(),this.objectId,this.displayId,this.distance,this.vertexCount)}ensureCentroid(e){return this.centroid??=(0,i.Q)(this.geometry),this.centroid}get usedMemory(){return 128+(0,s.lM)(this.attributes)+(this.geometry?.usedMemory??0)}}function l(e){return!!e.geometry?.coords?.length}},58512(e,t,r){r.d(t,{A:()=>s});class s{constructor(){this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){let e=new s;return e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},92722(e,t,r){r.d(t,{A:()=>i});var s=r(69397);class i{constructor(e=[],t=[],r=!1,s=!1){this.lengths=e??[],this.coords=t??[],this.hasZ=r,this.hasM=s}static fromJSON({lengths:e,coords:t,hasZ:r,hasM:s}){return new i(e,t,r||!1,s||!1)}static fromRect([e,t,r,s]){let o=r-e,n=s-t;return new i([5],[e,t,o,0,0,n,-o,0,0,-n])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((e,t)=>e+t,0)}get usedMemory(){return 64+(0,s.Qf)(this.lengths,this.coords)}get stride(){return+!!this.hasZ+2+ +!!this.hasM}area(){if(this.isPoint)return 0;let e=0,t=0;for(let r of this.lengths){if(r<3)continue;let{stride:s}=this,i=this.coords[s*t],o=this.coords[s*t+1];for(let n=1;n<r;n+=1){let r=s*(t+n),l=this.coords[r],a=this.coords[r+1];e+=-.5*(l-i)*(a+o),i=l,o=a}t+=r}return e}forEachVertex(e){let t=0;if(this.isPoint)return e(this.coords[0],this.coords[1]);let{stride:r}=this;for(let s of this.lengths){for(let i=0;i<s;i++){let s=r*(t+i);e(this.coords[s],this.coords[s+1])}t+=s}}deltaDecode(){let e=this.clone(),{coords:t,lengths:r}=e,s=0,{stride:i}=this;for(let e of r){for(let r=1;r<e;r++){let e=i*(s+r);t[e]+=t[e-i],t[e+1]+=t[e+1-i]}s+=e}return e}clone(e){if(this.isPoint)return new i([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);let t=Array.from(this.lengths),{stride:r,size:s}=this,o=this.coords.slice(0,s*r);return e?(e.set(o),new i(t,e,this.hasZ,this.hasM)):new i(t,Array.from(o),this.hasZ,this.hasM)}justXY(){let{stride:e,size:t}=this;if(2===e)return this;let r=Array(t*e);for(let t=0,s=0;t<r.length;t+=e)r[s++]=this.coords[t],r[s++]=this.coords[t+1];return new i(this.lengths,r,!1,!1)}}},27647(e,t,r){r.d(t,{Q:()=>o});var s=r(92722);function i(e,t){return e?t?4:3:t?3:2}function o(e){if(null==e||!e?.lengths.length)return null;let{lengths:t,coords:r,stride:i,hasZ:o,hasM:a}=e,u=new s.A([],[],o,!1),p=u.coords,d=[],c=o?[1/0,-1/0,1/0,-1/0,1/0,-1/0]:[1/0,-1/0,1/0,-1/0],y=0;for(let e of t){let t=n(c,r,y,e,o,a);t&&d.push(t),y+=e*i}if(d.sort((e,t)=>{let r=e[2]-t[2];return 0===r&&o&&(r=e[4]-t[4]),r}),d.length){let e=6*d[0][2];p[0]=d[0][0]/e,p[1]=d[0][1]/e,o&&(e=6*d[0][4],p[2]=0===e?0:d[0][3]/e),(p[0]<c[0]||p[0]>c[1]||p[1]<c[2]||p[1]>c[3]||o&&(p[2]<c[4]||p[2]>c[5]))&&(p.length=0)}if(!p.length){let s=e.lengths[0]?l(r,0,t[0],o,a):null;if(!s)return null;p[0]=s[0],p[1]=s[1],o&&(p[2]=s[2]??0)}return u}function n(e,t,r,s,o,n){let l=i(o,n),a=r,u=r+l,p=0,d=0,c=0,y=0,h=0;for(let r=0,i=s-1;r<i;r++,a+=l,u+=l){let r=t[a],s=t[a+1],i=t[a+2],n=t[u],l=t[u+1],f=t[u+2],g=r*l-n*s;y+=g,p+=(r+n)*g,d+=(s+l)*g,o&&(g=r*f-n*i,c+=(i+f)*g,h+=g),r<e[0]&&(e[0]=r),r>e[1]&&(e[1]=r),s<e[2]&&(e[2]=s),s>e[3]&&(e[3]=s),o&&(i<e[4]&&(e[4]=i),i>e[5]&&(e[5]=i))}if(y>0&&(y*=-1),h>0&&(h*=-1),!y)return null;let f=[p,d,.5*y];return o&&(f[3]=c,f[4]=.5*h),f}function l(e,t,r,s,o){let n=i(s,o),l=t,c=t+n,y=0,h=0,f=0,g=0;for(let t=0,i=r-1;t<i;t++,l+=n,c+=n){let t=e[l],r=e[l+1],i=e[l+2],o=e[c],n=e[c+1],m=e[c+2],v=s?u(t,r,i,o,n,m):a(t,r,o,n);if(v)if(y+=v,s){let e=d(t,r,i,o,n,m);h+=v*e[0],f+=v*e[1],g+=v*e[2]}else{let e=p(t,r,o,n);h+=v*e[0],f+=v*e[1]}}return y>0?s?[h/y,f/y,g/y]:[h/y,f/y]:r>0?s?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function a(e,t,r,s){let i=r-e,o=s-t;return Math.sqrt(i*i+o*o)}function u(e,t,r,s,i,o){let n=s-e,l=i-t,a=o-r;return Math.sqrt(n*n+l*l+a*a)}function p(e,t,r,s){return[e+.5*(r-e),t+.5*(s-t)]}function d(e,t,r,s,i,o){return[e+.5*(s-e),t+.5*(i-t),r+.5*(o-r)]}},99352(e,t,r){r.d(t,["F",0,{supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!0,supportedSpatialAggregationStatistics:{envelope:!0,centroid:!0,convexHull:!0},supportsStatisticsAggregatedIds:!0,supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsOutDistance:!1,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsReturnExceededLimitGeometries:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:0,standardMaxRecordCount:void 0,standardMaxRecordCountNoGeometry:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},"P",0,{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}}])},90708(e,t,r){r.d(t,{Ap:()=>F,B2:()=>g,DF:()=>b,Di:()=>G,E2:()=>R,IE:()=>f,Nl:()=>L,PR:()=>A,Rk:()=>H,Ux:()=>E,Ye:()=>S,ZF:()=>U,aQ:()=>z,jH:()=>B,jQ:()=>$,kz:()=>N,oN:()=>j,q3:()=>q,qN:()=>x,zv:()=>D});var s=r(49186),i=r(53966),o=r(97768),n=r(70328),l=r(19419),a=r(60408),u=r(43334),p=r(58512),d=r(92722),c=r(54339);const y=()=>i.A.getLogger("esri.layers.graphics.featureConversionUtils"),h={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryMultiPatch:3,esriGeometryEnvelope:0};function f({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}function g({scale:e,translate:t},r){return Math.round((t[1]-r)/e[1])}function m({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}function v({scale:e,translate:t},r){return Math.round((r-t[1])/e[1])}function w({scale:e,translate:t},r,s){return r*e[s]+t[s]}function C(e,t,r){return t&&(e.hasZ=!0),r&&(e.hasM=!0),e}function M(e,t,r,s){if(t&&s&&e!==r)return(t,r,s,i)=>{s[i++]=t[r++],s[i++]=t[r++],e?r++:s[i++]=0,s[i++]=t[r++]??0};let i=+!!r+2+ +!!s,o=i-((!e&&r?1:0)+(!t&&s?1:0));return(e,t,r,s)=>{for(let n=0;n<i;++n)r[s++]=n<o?e[t++]??0:0}}function b(e,t,r){if(!e)return null;let{coords:s,hasZ:i,hasM:o}=e,[n,l]=s,a=i?s[2]:0,u=o?s[+!!i+2]:0;return{x:n,y:l,z:t?a:void 0,m:r?u:void 0}}function x(e,t=(0,a.Pv)(e),r=(0,a.W0)(e)){let{x:s,y:i,z:o,m:n}=e,l=[s,i];return t&&l.push(o??0),r&&l.push(n??0),new d.A([],l,t,r)}function P(e,t,r){if(null==e)return null;let{coords:s,stride:i,hasZ:o,hasM:n}=e,l=M(o,n,t,r),a=[];for(let e=0;e<s.length;e+=i){let t=[];l(s,e,t,0),a.push(t)}return C({points:a},t,r)}function A(e,t=(0,a.Pv)(e),r=(0,a.W0)(e)){let{points:s,hasZ:i,hasM:o}=e,n=new d.A([s.length],[],t,r),{coords:l,stride:u}=n,p=0,c=M(i??!1,o??!1,t,r);for(let e of s)c(e,0,l,p),p+=u;return n}function I(e,t,r){if(!e)return null;let{coords:s,lengths:i,stride:o,hasZ:n,hasM:l}=e,a=0,u=M(n,l,t,r),p=[];for(let e of i){let t=[];for(let r=0;r<e;r++){let e=[];u(s,a,e,0),a+=o,t.push(e)}p.push(t)}return C({paths:p},t,r)}function F(e,t=(0,a.Pv)(e),r=(0,a.W0)(e)){let{paths:s,hasZ:i,hasM:o}=e,n=M(i??!1,o??!1,t,r),l=new d.A([],[],t,r),{lengths:u,coords:p,stride:c}=l,y=0;for(let e of s){for(let t of e)n(t,0,p,y),y+=c;u.push(e.length)}return l}function T(e,t,r){if(!e)return null;let{coords:s,lengths:i,stride:o,hasZ:n,hasM:l}=e,a=0,u=M(n,l,t,r),p=[];for(let e of i){let t=[];for(let r=0;r<e;r++){let e=[];u(s,a,e,0),a+=o,t.push(e)}p.push(t)}return C({rings:p},t,r)}function S(e,t=(0,a.Pv)(e),r=(0,a.W0)(e)){let{rings:s,hasZ:i,hasM:o}=e,n=new d.A([],[],t,r),{lengths:l,coords:u,stride:p}=n,c=0,y=M(i??!1,o??!1,t,r);for(let e of s){for(let t of e)y(t,0,u,c),c+=p;l.push(e.length)}return n}const Z=[],O=[];function R(e,t,r,s,i){Z[0]=e;let[o]=G(O,Z,t,r,s,i);return K(Z),K(O),o}function G(e,t,r,i,o,n){if(K(e),!r){for(let r of t){let t=(0,c.W)(r,n);e.push(new u.Om(null,r.attributes,null,t,void 0,r.distance,r.vertexCount))}return e}switch(r){case"esriGeometryPoint":return function(e,t,r,s,i){for(let o of t){let{geometry:t,attributes:n,centroid:l}=o,p=(0,a.Pv)(t),d=(0,a.W0)(t);e.push(new u.Om(t?x(t,r&&p,s&&d):null,n,l?x(l,!1,!1):null,(0,c.W)(o,i),o.displayId,o.distance,o.vertexCount))}return e}(e,t,i,o,n);case"esriGeometryMultipoint":return function(e,t,r,s,i){for(let o of t){let{geometry:t,attributes:n}=o,l=(0,a.Pv)(t),p=(0,a.W0)(t);e.push(new u.Om(t?A(t,r&&l,s&&p):null,n,null,(0,c.W)(o,i),o.displayId,o.distance,o.vertexCount))}return e}(e,t,i,o,n);case"esriGeometryPolyline":return function(e,t,r,s,i){for(let o of t){let{geometry:t,attributes:n,centroid:l}=o,p=(0,a.Pv)(t),d=(0,a.W0)(t);e.push(new u.Om(t?F(t,r&&p,s&&d):null,n,l?x(l,!1,!1):null,(0,c.W)(o,i),o.displayId,o.distance,o.vertexCount))}return e}(e,t,i,o,n);case"esriGeometryPolygon":case"esriGeometryMultiPatch":return function(e,t,r,s,i){for(let o of t){let{geometry:t,attributes:n,centroid:l}=o,p=(0,a.Pv)(t),d=(0,a.W0)(t);e.push(new u.Om(t?S(t,r&&p,s&&d):null,n,l?x(l,!1,!1):null,(0,c.W)(o,i),o.displayId,o.distance,o.vertexCount))}return e}(e,t,i,o,n);default:y().error("convertToFeatureSet:unknown-geometry",new s.A("internal:geometry",`Unable to parse unknown geometry type '${r}'`)),K(e)}return e}function j(e,t,r,s){O[0]=e,_(Z,O,t,r,s);let i=Z[0];return K(Z),K(O),i}function E(e,t=(0,a.Pv)(e),r=(0,a.W0)(e)){return null==e?null:(0,a.fT)(e)?x(e,t,r):(0,a.Bi)(e)?S(e,t,r):(0,a.Rg)(e)?F(e,t,r):(0,a.U9)(e)?A(e,t,r):void y().error("convertFromGeometry:unknown-geometry",new s.A("internal:geometry",`Unable to parse unknown geometry type '${e}'`))}function D(e,t,r,i){if(null==e)return null;let o="coords"in e?e:e.geometry;if(null==o)return null;switch(t){case"esriGeometryPoint":return b(o,r,i);case"esriGeometryMultipoint":return P(o,r,i);case"esriGeometryPolyline":return I(o,r,i);case"esriGeometryPolygon":return T(o,r,i);default:return y().error("convertToGeometry:unknown-geometry",new s.A("internal:geometry",`Unable to parse unknown geometry type '${t}'`)),null}}function _(e,t,r,i,o){if(K(e),null==r)return function(e,t){for(let r of t)e.push({attributes:r.attributes});return e}(e,t);switch(r){case"esriGeometryPoint":return function(e,t,r,s){for(let{geometry:i,attributes:o}of t)e.push({attributes:o,geometry:b(i,r,s)});return e}(e,t,i,o);case"esriGeometryMultipoint":return function(e,t,r,s){for(let{geometry:i,attributes:o}of t)e.push({geometry:i&&P(i,r,s),attributes:o});return e}(e,t,i,o);case"esriGeometryPolyline":return function(e,t,r,s){for(let{geometry:i,attributes:o}of t)e.push({geometry:i&&I(i,r,s),attributes:o});return e}(e,t,i,o);case"esriGeometryPolygon":return function(e,t,r,s){for(let{geometry:i,attributes:o,centroid:n}of t){let t=T(i,r,s),l=b(n,!1,!1);e.push(n?{geometry:t,attributes:o,centroid:l}:{geometry:t,attributes:o})}return e}(e,t,i,o);default:y().error("convertToFeatureSet:unknown-geometry",new s.A("internal:geometry",`Unable to parse unknown geometry type '${r}'`))}return e}function U(e){let{spatialReference:t,transform:r,fields:s,hasM:i,hasZ:o,features:n,geometryType:l,exceededTransferLimit:a,queryGeometry:u,queryGeometryType:p}=e,d={features:_([],n,l,o,i),fields:s,geometryType:l,spatialReference:t,queryGeometry:D(u,p,o,i)};return r&&(d.transform=r),a&&(d.exceededTransferLimit=a),i&&(d.hasM=i),o&&(d.hasZ=o),d}function q(e,t){let r=new p.A,{hasM:s,hasZ:i,features:o,spatialReference:n,geometryType:l,exceededTransferLimit:a,transform:u,fields:d,globalIdFieldName:c}=e;return d&&(r.fields=d),r.geometryType=l??null,r.spatialReference=n??null,o&&G(r.features,o,l,i,s,t),a&&(r.exceededTransferLimit=a),s&&(r.hasM=s),i&&(r.hasZ=i),u&&(r.transform=u),c&&(r.globalIdFieldName=c),r}function B(e,t){let{geometryType:r,features:s}=t;if(!e)return t;for(let t=0;t<s.length;t++){let i=s[t],o=i.weakClone();o.geometry=L(i.geometry,r,e),o.centroid=L(i.centroid,"esriGeometryPoint",e),s[t]=o}return t.transform=e,t}function L(e,t,r,s,i,o=!1){if(null==e||!e?.coords.length)return null;let n=h[t],{coords:l,lengths:a,stride:u,hasZ:p,hasM:c}=e;s??=p,i??=c;let y=new d.A([],[],s,i),w=y.stride,C=M(p,c,s,i),b=0,x=[0,0,0,0].slice(w),P=o?m:f,A=o?v:g;function I(){C(l,b,x,0),b+=u,x[0]=P(r,x[0]),x[1]=A(r,x[1])}if(e.isPoint)return I(),y.coords.push(...x),y;let F=0;for(let e of a){if(e<n)continue;let t=1;I(),y.coords.push(...x);let[r,s]=x;for(let i=1;i<e;i++){I();let[e,i]=x;(r!==e||s!==i)&&(o||(x[0]-=r,x[1]-=s),y.coords.push(...x),r=e,s=i,t++)}t>=n?(y.lengths.push(t),F=y.coords.length):K(y.coords,F)}return K(y.coords,F),y.coords.length?y:null}function N(e,t,r,s=e.hasZ,i=e.hasM){if(!e.coords.length)return null;let o=h[t],{coords:n,lengths:l,stride:a,hasZ:u,hasM:p}=e,c=new d.A([],[],s,i),y=c.stride,f=M(u,p,s,i);if(e.isPoint)return f(n,0,c.coords,0),c;let g=0,m=r*r;for(let e of l){if(e<o){g+=e*a;continue}let t=c.coords.length/y,r=g,s=g+(e-1)*a;f(n,r,c.coords,c.coords.length),k(c.coords,n,a,m,f,r,s),f(n,s,c.coords,c.coords.length);let i=c.coords.length/y-t;i>=o?c.lengths.push(i):K(c.coords,t*y),g+=e*a}return c.coords.length?c:null}function Q(e,t,r,s){let i=e[t],o=e[t+1],n=e[r],l=e[r+1],a=e[s],u=e[s+1],p=n,d=l,c=a-p,y=u-d;if(0!==c||0!==y){let e=((i-p)*c+(o-d)*y)/(c*c+y*y);e>1?(p=a,d=u):e>0&&(p+=c*e,d+=y*e)}return c=i-p,y=o-d,c*c+y*y}function k(e,t,r,s,i,o,n){let l,a=s,u=0;for(let e=o+r;e<n;e+=r)l=Q(t,e,o,n),l>a&&(u=e,a=l);a>s&&(u-o>r&&k(e,t,r,s,i,o,u),i(t,u,e,e.length),n-u>r&&k(e,t,r,s,i,u,n))}function $(e,t){if(!t?.coords?.length)return null;let r=1/0,s=1/0,i=-1/0,o=-1/0,{coords:a,stride:u}=t;for(let e=0;e<a.length;e+=u){let t=a[e],n=a[e+1];r=Math.min(r,t),i=Math.max(i,t),s=Math.min(s,n),o=Math.max(o,n)}return(0,n.is)(e)?(0,n.BI)(e,r,s,i,o):(0,l.fA)(r,s,i,o,e),e}function z(e,t){let{coords:r,lengths:s,stride:i,hasZ:n,hasM:l}=e;if(!r.length)return void(s.length=0);(0,o.Lw)(t);let{originPosition:a,scale:u,translate:p}=t,d=W;d.originPosition=a;let c=d.scale;c[0]=u[0]??1,c[1]=-(u[1]??1),c[2]=u[2]??1,c[3]=u[3]??1;let y=d.translate;if(y[0]=p[0]??0,y[1]=p[1]??0,y[2]=p[2]??0,y[3]=p[3]??0,l&&!n&&(c[2]=c[3],y[2]=y[3]),!s.length){for(let e=0;e<i;++e)r[e]=w(d,r[e],e);return void(s.length=0)}let h=0;for(let e=0;e<s.length;e++){let t=s[e];s[e]=t;for(let e=0;e<i;++e)r[h+e]=w(d,r[h+e],e);let o=r[h],n=r[h+1];h+=i;for(let e=1;e<t;e++,h+=i){o+=r[h]*c[0],n+=r[h+1]*c[1],r[h]=o,r[h+1]=n;for(let e=2;e<i;++e)r[h+e]=w(d,r[h+e],e)}}}function J(e,t,r,s){let i=0,o=e[s*t],n=e[s*(t+1)];for(let l=1;l<r;l++){let r=o+e[s*(t+l)],a=n+e[s*(t+l)+1],u=(r-o)*(a+n);o=r,n=a,i+=u}return.5*i}function H(e,t){let{coords:r,lengths:s}=e,i=0,o=0;for(let e=0;e<s.length;e++){let n=s[e];o+=J(r,i,n,t),i+=n}return Math.abs(o)}function K(e,t=0){e.length!==t&&(e.length=t)}const W={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]}},64714(e,t,r){r.d(t,{F0:()=>l,Vx:()=>p,e2:()=>c,f:()=>f});var s=r(44208),i=r(4718),o=r(99352),n=r(93470);function l(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?n.Cb:"esriGeometryPolyline"===e?n.yM:n.WR}}}const a=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function p(e,t){if((0,s.A)("esri-csp-restrictions"))return()=>t?{[t]:null,...e}:{...e};try{let r="";t&&(r+=`this${d(t)} = null;`);for(let t in e)r+=`this${d(t)} = ${JSON.stringify(e[t])};`;let s=Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch{return()=>t?{[t]:null,...e}:{...e}}}function d(e){return a.test(e)?`.${e}`:`[${JSON.stringify(e)}]`}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,i.o8)(e)}}]}const y={...o.F,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!1,supportsDistance:!1,supportsExtent:!1,supportsQuantization:!1,supportsQueryGeometry:!1,supportsDisjointSpatialRelationship:!1},h={...o.P,supportedStatistics:{...o.P.supportedStatistics,envelope:!1,centroid:!1,convexHull:!1}};function f(e,t,r=!1){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!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,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r?y:o.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:r?h:o.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:t,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},52136(e,t,r){var s=r(32198),i=r(91429);r.d(t,["p",0,e=>{let t=e,r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null==e?(this._clearOverride("apiKey"),this.clear("apiKey","user")):this._override("apiKey",e)}};return(0,s.Cg)([(0,i.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,s.Cg)([(0,i.$K)("esri.layers.mixins.APIKeyMixin")],r),r}])},69208(e,t,r){var s=r(32198),i=r(91429);r.d(t,["d",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,s.Cg)([(0,i.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,s.Cg)([(0,i.$K)("esri.layers.mixins.CustomParametersMixin")],r),r}])},32756(e,t,r){r.d(t,{Rr:()=>l});var s=r(32198),i=r(93637),o=r(91429),n=r(91880);function l(e,t,r){if(!e)return null;let s=e.find(e=>!!e.field);if(!s)return null;let i=new n.A;return i.read(s,r),[i]}const a={type:[n.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,r,s){let o=e.find(e=>!!e.field);o&&(0,i.sM)(r,[o.toJSON()],t)}}}};r.d(t,["fY",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,s.Cg)([(0,o.MZ)(a)],r.prototype,"orderBy",void 0),r=(0,s.Cg)([(0,o.$K)("esri.layers.mixins.OrderedLayer")],r),r},"ne",0,a])},8303(e,t,r){var s=r(32198),i=r(92602),o=r(70333),n=r(56507),l=r(60999),a=r(49186),u=r(36563),p=r(53966),d=r(97768),c=r(17676),y=r(84952),h=r(91429),f=r(77548),g=r(20655),m=r(80812),v=r(41318),w=r(10407),C=r(26121),M=r(36005),b=r(43937);const x={credential:null,user:null};r.d(t,["A",0,e=>{let t=e,P=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){super.destroy(),this.portalItem=(0,d.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new m.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{let{load:s}=await r.e(1204).then(()=>r(41204));return(0,c.Te)(t),await s({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,c.zf)(e)||p.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async reloadFromPortal(e,t){if(!this.loaded||!this.portalItem?.id)return!1;let s=t?.signal?null:new AbortController;try{let{reload:i}=await r.e(1204).then(()=>r(41204));return s&&this.addHandles((0,u.rE)(s),"reloadFromPortal"),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t?.signal?t:{signal:s.signal})}catch(e){throw(0,c.zf)(e)||p.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}finally{s&&this.removeHandles("reloadFromPortal")}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,c.QP)(e),!0)))}async setUserPrivileges(e,t){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{let{features:{edit:r,fullEdit:s},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);let s,i,n=!o.id?.findCredential(this.url),l=e===r.id;if(l&&r.portal.user)return this._getUserPrivileges(r,n);if(l)s=r.portal.url;else try{s=await(0,f.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!s||!(0,y.b8)(s,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{let e=null==t?null:t.signal;i=await(o.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}if(!i)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(l?await r.reload():(r=new m.default({id:e,portal:{url:s}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,n)}catch(e){(0,c.QP)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}_getUserPrivileges(e,t){let r=(0,w.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){let t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;let 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){let t=this.portalItem?.portal?.user;if(t)return t;let r=o.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;let s=`${r.owningSystemUrl}/sharing/rest`,i=g.A.getDefault();if(i&&i.loaded&&(0,y.S8)(i.restUrl)===(0,y.S8)(s))return i.user;let a=`${s}/community/self`,u=null==e?null:e.signal,p=await(0,l.Ke)((0,n.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?v.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){return(0,C.wN)(this.portalItem,t)?(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,s.Cg)([(0,h.MZ)({type:m.default})],P.prototype,"portalItem",null),(0,s.Cg)([(0,M.w)("web-document","portalItem",["itemId"])],P.prototype,"readPortalItem",null),(0,s.Cg)([(0,b.K)("web-document","portalItem",{itemId:{type:String}})],P.prototype,"writePortalItem",null),(0,s.Cg)([(0,h.MZ)({clonable:!1})],P.prototype,"resourceReferences",void 0),(0,s.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],P.prototype,"userHasEditingPrivileges",void 0),(0,s.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],P.prototype,"userHasFullEditingPrivileges",void 0),(0,s.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],P.prototype,"userHasUpdateItemPrivileges",void 0),P=(0,s.Cg)([(0,h.$K)("esri.layers.mixins.PortalLayer")],P),P}])},82935(e,t,r){var s=r(32198),i=r(91429),o=r(30524),n=r(96184),l=r(73133),a=r(79677),u=r(10184),p=r(36005);const d={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"}}};r.d(t,["B",0,d,"e",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){let r=t.timeInfo.exportOptions;if(!r)return null;let s=r.timeOffset,i=l.j.fromJSON(r.timeOffsetUnits);return s&&i?new u.A({value:s,unit:i}):null}get timeInfo(){return this._get("timeInfo")}set timeInfo(e){(0,o.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,s.Cg)([(0,i.MZ)({type:a.A,json:{write:!1}})],r.prototype,"timeExtent",void 0),(0,s.Cg)([(0,i.MZ)({type:u.A})],r.prototype,"timeOffset",void 0),(0,s.Cg)([(0,p.w)("service","timeOffset",["timeInfo.exportOptions"])],r.prototype,"readOffset",null),(0,s.Cg)([(0,i.MZ)({value:null,type:n.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],r.prototype,"timeInfo",null),(0,s.Cg)([(0,i.MZ)(d)],r.prototype,"useViewTime",void 0),r=(0,s.Cg)([(0,i.$K)("esri.layers.mixins.TemporalLayer")],r),r}])},63396(e,t,r){r.d(t,{d:()=>x});var s=r(32198),i=r(91429),o=r(41910),n=r(60950),l=r(99959);class a extends l.A{constructor(e){super(),this.type="track",this.trackInfoProvider=e}get id(){return this.trackInfoProvider.id}get[n.ym](){return this.trackInfoProvider.trackInfo}get[o.e7](){return this.trackInfoProvider}}var u=r(40124),p=r(69540),d=r(25482),c=r(93637),y=r(50820),h=r(10873),f=r(46499),g=r(41214);let m=class extends((0,p.OU)(d.o)){constructor(e){super(e),this.labelingInfo=null,this.labelsVisible=!0,this.renderer=null,this.visible=!0}};(0,s.Cg)([(0,i.MZ)({type:[f.A],json:{write:!0}})],m.prototype,"labelingInfo",void 0),(0,s.Cg)([(0,i.MZ)(h.kF)],m.prototype,"labelsVisible",void 0),(0,s.Cg)([(0,i.MZ)({types:g.Hg,json:{write:!0}})],m.prototype,"renderer",void 0),(0,s.Cg)([(0,i.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"visible",void 0),m=(0,s.Cg)([(0,i.$K)("esri.layers.support.TrackPartInfo")],m);var v=r(96576),w=r(59868),C=r(10184),M=r(43937);let b=class extends((0,p.OU)(d.o)){constructor(e){super(e),this.enabled=!0,this.fields=[],this.latestObservations=new m({renderer:new v.A({symbol:w.UK.clone()})}),this.maxDisplayDuration=null,this.maxDisplayObservationsPerTrack=0,this.popupEnabled=!0,this.popupTemplate=null,this.previousObservations=new m({renderer:new v.A({symbol:w.UK.clone()})}),this.trackLines=new m({renderer:new v.A({symbol:w.A7.clone()})}),this.timeField="startTimeField"}writeFields(e,t,r){let s=e.filter(e=>"avg_angle"!==e.statisticType).map(e=>e.toJSON());(0,c.sM)(r,s,t)}};(0,s.Cg)([(0,i.MZ)({type:Boolean,json:{write:!0}})],b.prototype,"enabled",void 0),(0,s.Cg)([(0,i.MZ)({type:[y.A],json:{write:!0}})],b.prototype,"fields",void 0),(0,s.Cg)([(0,M.K)("fields")],b.prototype,"writeFields",null),(0,s.Cg)([(0,i.MZ)({type:m,json:{write:!0}})],b.prototype,"latestObservations",void 0),(0,s.Cg)([(0,i.MZ)({type:C.A,json:{write:!0}})],b.prototype,"maxDisplayDuration",void 0),(0,s.Cg)([(0,i.MZ)({type:Number,json:{write:!0}})],b.prototype,"maxDisplayObservationsPerTrack",void 0),(0,s.Cg)([(0,i.MZ)(h.M6)],b.prototype,"popupEnabled",void 0),(0,s.Cg)([(0,i.MZ)({type:u.A,json:{name:"popupInfo",write:!0}})],b.prototype,"popupTemplate",void 0),(0,s.Cg)([(0,i.MZ)({type:m,json:{write:!0}})],b.prototype,"previousObservations",void 0),(0,s.Cg)([(0,i.MZ)({type:m,json:{write:!0}})],b.prototype,"trackLines",void 0),(0,s.Cg)([(0,i.MZ)({type:["timeReceived","startTimeField","endTimeField"],json:{read:!0,write:!0}})],b.prototype,"timeField",void 0),b=(0,s.Cg)([(0,i.$K)("esri.layers.support.TrackInfo")],b);const x=e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.trackGraphicOrigin=new a(this),this.trackInfo=null}};return(0,s.Cg)([(0,i.MZ)({readOnly:!0,clonable:!1})],r.prototype,"trackGraphicOrigin",void 0),(0,s.Cg)([(0,i.MZ)({type:b})],r.prototype,"trackInfo",void 0),r=(0,s.Cg)([(0,i.$K)("esri.layers.mixins.TrackableLayer")],r),r}},29005(e,t,r){r.d(t,{A:()=>u});var s=r(32198),i=r(69540),o=r(66552),n=r(25482),l=r(91429);const a=new o.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 u=class extends((0,i.OU)(n.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,s.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"name",void 0),(0,s.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"description",void 0),(0,s.Cg)([(0,l.MZ)({json:{read:a.read,write:a.write}})],u.prototype,"drawingTool",void 0),(0,s.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,s.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,s.Cg)([(0,l.$K)("esri.layers.support.FeatureTemplate")],u)},33143(e,t,r){r.d(t,{A:()=>d});var s=r(32198),i=r(69540),o=r(25482),n=r(91429),l=r(8631),a=r(29005),u=r(36005),p=r(43937);let d=class extends((0,i.OU)(o.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){let t={};for(let r of Object.keys(e))t[r]=(0,l.r)(e[r]);return t}writeDomains(e,t){let r={};for(let t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,s.Cg)([(0,n.MZ)({json:{write:!0}})],d.prototype,"id",void 0),(0,s.Cg)([(0,n.MZ)({json:{write:!0}})],d.prototype,"name",void 0),(0,s.Cg)([(0,n.MZ)({json:{write:!0}})],d.prototype,"domains",void 0),(0,s.Cg)([(0,u.w)("domains")],d.prototype,"readDomains",null),(0,s.Cg)([(0,p.K)("domains")],d.prototype,"writeDomains",null),(0,s.Cg)([(0,n.MZ)({type:[a.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,s.Cg)([(0,n.$K)("esri.layers.support.FeatureType")],d)},91880(e,t,r){r.d(t,{A:()=>u});var s,i=r(32198),o=r(66552),n=r(25482),l=r(91429);const a=new o.J({asc:"ascending",desc:"descending"});let u=class extends n.o{static{s=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new s({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,i.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],u.prototype,"field",void 0),(0,i.Cg)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],u.prototype,"valueExpression",void 0),(0,i.Cg)([(0,l.MZ)({type:a.apiValues,json:{type:a.jsonValues,read:a.read,write:a.write}})],u.prototype,"order",void 0),u=s=(0,i.Cg)([(0,l.$K)("esri.layers.support.OrderByInfo")],u)},17036(e,t,r){r.d(t,{p:()=>a});var s=r(44208),i=r(53966),o=r(20437),n=r(95466),l=r(30524);function a(){return{fields:{type:[o.A],value:null,set:function(e){if(e&&(0,s.A)("big-integer-warning-enabled")){let t=e.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(t.length){let e=t.map(e=>`'${e.name}'`).join(", ");i.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 ${2**53-1} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return n.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){let e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(let t of e)this.fieldsIndex?.has(t)||i.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 s,i=r(32198),o=r(52106),n=r(66552),l=r(25482),a=r(4718),u=r(91429),p=r(16930),d=r(60408),c=r(65864),y=r(50498),h=r(20437),f=r(36005),g=r(43937);const m=new n.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=s=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,o.A)}writeGeometryType(e,t,r,s){if(e)return void m.write(e,t,r,s);let{features:i}=this;if(i)for(let e of i)if(null!=e?.geometry)return void m.write(e.geometry.type,t,r,s)}readQueryGeometry(e,t){if(!e)return null;let r=!!e.spatialReference,s=(0,c.rS)(e);return s&&!r&&t.spatialReference&&(s.spatialReference=p.A.fromJSON(t.spatialReference)),s}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());let{features:r}=this;if(r)for(let e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new s(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){let t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){let s=t.features[r];s.geometry&&=(e?.[r])?.toJSON()||s.geometry}return t}quantize(e){let{scale:[t,r],translate:[s,i]}=e,o=this.features,n=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-s)/t),e=>Math.round((i-e)/r));for(let e=0,t=o.length;e<t;e++)n?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){let{geometryType:e,features:t,transform:r}=this;if(!r)return this;let{translate:[s,i],scale:[o,n]}=r,l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){let{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){let{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}let u=this._getHydrationFunction(e,e=>e*o+s,e=>i-e*n,l,a);for(let{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){let s=p.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){let o=e[t],n=r.fromJSON(o),l=o.geometry?.spatialReference;null!=n.geometry&&!l&&(n.geometry.spatialReference=s);let a=o.aggregateGeometries,u=n.aggregateGeometries;if(a&&null!=u)for(let e in u){let t=u[e],r=a[e]?.spatialReference;null!=t&&!r&&(t.spatialReference=s)}i.push(n)}return i}_quantizePoints(e,t,r){let s,i,o=[];for(let n=0,l=e.length;n<l;n++){let l=e[n];if(n>0){let e=t(l[0]),n=r(l[1]);(e!==s||n!==i)&&(o.push([e-s,n-i]),s=e,i=n)}else s=t(l[0]),i=r(l[1]),o.push([s,i])}return o.length>0?o: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=>{let s=(0,d.Bi)(e)?e.rings:e.paths,i=[];for(let e=0,o=s.length;e<o;e++){let o=s[e],n=this._quantizePoints(o,t,r);n&&i.push(n)}return i.length>0?((0,d.Bi)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{let s=this._quantizePoints(e.points,t,r);return s&&s.length>0?(e.points=s,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,s,i){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),s&&(e.z=s(e.z))}:"polyline"===e||"polygon"===e?e=>{let o,n,l=(0,d.Bi)(e)?e.rings:e.paths;for(let e=0,s=l.length;e<s;e++){let s=l[e];for(let e=0,i=s.length;e<i;e++){let i=s[e];e>0?(o+=i[0],n+=i[1]):(o=i[0],n=i[1]),i[0]=t(o),i[1]=r(n)}}if(s&&i)for(let e=0,t=l.length;e<t;e++){let t=l[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=s(r[2]),r[3]=i(r[3])}}else if(s)for(let e=0,t=l.length;e<t;e++){let t=l[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=s(r[2])}}else if(i)for(let e=0,t=l.length;e<t;e++){let t=l[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(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),s&&null!=e.zmax&&null!=e.zmin&&(e.zmax=s(e.zmax),e.zmin=s(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{let o,n,l=e.points;for(let e=0,s=l.length;e<s;e++){let s=l[e];e>0?(o+=s[0],n+=s[1]):(o=s[0],n=s[1]),s[0]=t(o),s[1]=r(n)}if(s&&i)for(let e=0,t=l.length;e<t;e++){let t=l[e];t[2]=s(t[2]),t[3]=i(t[3])}else if(s)for(let e=0,t=l.length;e<t;e++){let t=l[e];t[2]=s(t[2])}else if(i)for(let e=0,t=l.length;e<t;e++){let t=l[e];t[2]=i(t[2])}}:null}};(0,i.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,i.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,i.Cg)([(0,u.MZ)({type:[o.A],json:{write:!0}})],v.prototype,"features",void 0),(0,i.Cg)([(0,f.w)("features")],v.prototype,"readFeatures",null),(0,i.Cg)([(0,u.MZ)({type:[h.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,i.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:m.read}}})],v.prototype,"geometryType",void 0),(0,i.Cg)([(0,g.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,i.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,i.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,i.Cg)([(0,u.MZ)({types:y.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,i.Cg)([(0,f.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,i.Cg)([(0,u.MZ)({type:p.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,i.Cg)([(0,g.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,i.Cg)([(0,u.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=s=(0,i.Cg)([(0,u.$K)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0},26121(e,t,r){r.d(t,{I6:()=>p,ci:()=>u,dL:()=>a,wN:()=>d});var s=r(49186),i=r(84952),o=r(77548),n=r(20655),l=r(59923);async function a(e){let t=[];for(let r of e.allLayers)if("beforeSave"in r&&"function"==typeof r.beforeSave){let e=r.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}function u(e,t,r){let i=(e.messages??[]).filter(({type:e})=>"error"===e).map(({name:e,message:t,details:r})=>new s.A(e,t,r));if(e.blockedRelativeUrls&&(i=i.concat(e.blockedRelativeUrls.map(e=>(0,l.GL)("url",`Relative url '${e}' is not supported`)))),r){let{ignoreUnsupported:e,supplementalUnsupportedErrors:t=[],requiredPropertyChecksDisabled:s}=r;e&&(i=i.filter(({name:e})=>!(l.MG.has(e)||t.includes(e)))),s&&(i=i.filter(e=>"web-document-write:property-required"!==e.name))}if(i.length>0)throw new s.A(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:i})}function p(e){return(0,o.qd)(e).some(e=>!!e.charts?.length)}function d(e,t){let r=t?.portal,s=e?.id&&(e.portal||n.A.getDefault());return!!r&&!!s&&!(0,i.ut)(s.restUrl,r.restUrl)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9235],{99235(t,e,s){s.d(e,{vt:()=>Vr,UD:()=>Er});var r=s(85334),n=s(49186),i=s(4718),o=s(32198),a=s(91429),l=s(94778),u=s(25482);let p=class extends u.o{constructor(){super(...arguments),this.raster=void 0}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],p.prototype,"raster",void 0),p=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.BaseFunctionArguments")],p);const c=p;var h;let m=h=class extends c{constructor(){super(...arguments),this.raster2=void 0}get rasters(){return[this.raster,this.raster2]}clone(){return new h({raster:this.raster,raster2:this.raster2,operation:this.operation})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],m.prototype,"operation",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],m.prototype,"raster2",void 0),(0,o.Cg)([(0,a.MZ)({readOnly:!0})],m.prototype,"rasters",null),m=h=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ArithmeticFunctionArguments")],m);const d=m;var g=s(14140),f=s(87186);const y=new Set(["slope","aspect","curvature","hillshade","shadedrelief","statistics"]);let w=class extends u.o{constructor(){super(...arguments),this.functionArguments=null,this.readingBufferSize=0,this.id=-1,this.isNoopProcess=!1,this.rawInputBandIds=[],this.rawSourceRasterInfos=null,this.isInputBandIdsSwizzled=!1,this.swizzledBandSelection=[],this.isBranch=!1,this.isRoot=!1,this._bindingResult=null}get supportsGPU(){return this._bindingResult.supportsGPU}get flatWebGLFunctionChain(){let t=this.getWebGLProcessorDefinition();if(!t)return null;let e=[t],{parameters:s}=t,r=s.rasters||s.raster&&[s.raster];for(;r?.length;){e.unshift(...r);let t=[];for(let e=0;e<r.length;e++){let{parameters:s}=r[e],n=s.rasters||s.raster&&[s.raster];n?.length&&t.push(...n)}r=t}for(let t=e.length-1;t>=0;t--)e[t].isNoopProcess&&e.splice(t,1);let n=!1;for(let t=0;t<e.length;t++){let s=e[t];s.id=e.length-t-1;let{rasters:r}=s.parameters;n||=null!=r&&r.length>1}let i=e.some(({name:t})=>y.has(t.toLowerCase())),{rawSourceRasterInfos:o}=this;return{functions:e,hasBranches:n,hasFocalFunction:i,isSourceSingleBand:1===o?.[0]?.bandCount}}get neighborhoodSize(){let{rows:t,cols:e}=this._getNeighborhoodSize(),s=this.getImmediateChildFunctions();for(let r of s){let s=r.neighborhoodSize;t=Math.max(t,s.rows),e=Math.max(e,s.cols)}return{rows:t,cols:e}}bind(t,e=!1,s=-1){this.id=s+1;let r=this._getRasterValues(),n=!0;for(let s=0;s<r.length;s++){let i=r[s];if(null!=i&&this._isRasterFunctionValue(i)){let r=i.bind(t,e,this.id+s);if(!r.success)return this._bindingResult=r,r;n&&=r.supportsGPU}}return!this.rasterInfo||e?(this.sourceRasterInfos=this._getSourceRasterInfos(t),this._bindingResult=this._bindSourceRasters(),n&&=this._bindingResult.supportsGPU,this._bindingResult.success&&(this._patchRasterInfo(),n&&this.isRoot&&(this.processInputBandIds(),this.swizzleInputBandIds(this.rawInputBandIds)||(n=this.rawInputBandIds.length<=3))),this._bindingResult.supportsGPU=n,this._bindingResult):(this._bindingResult={success:!0,supportsGPU:!0},this._bindingResult)}queryRasterFunction(t){let e=[this];for(;e.length;){let s=e.pop();if(t(s))return s;let r=s.getImmediateChildFunctions();e.push(...r)}}getImmediateChildFunctions(){return this._getRasterValues().filter(t=>t&&"object"==typeof t&&"bind"in t)}process(t,e){let s=this._getRasterValues(),r=0===s.length?t.pixelBlocks??t.primaryPixelBlocks:s.map(s=>this._readRasterValue(s,t,e));return this._processPixels({...t,pixelBlocks:r},e)}processInputBandIds(){let t=this._getRasterValues().filter(this._isRasterFunctionValue);if(t.length>1){let e=t.map(t=>t.processInputBandIds());return this.rawInputBandIds=[...new Set(e.flat())],this.rawInputBandIds}let e=t[0];if(e)return this.rawInputBandIds=e.processInputBandIds(),this.rawInputBandIds;let{bandCount:s}=this.sourceRasterInfos[0],r=Array.from({length:s},(t,e)=>e);return this.rawInputBandIds=this._getInputBandIds(r),this.rawInputBandIds}swizzleInputBandIds(t){let e=this._getRasterValues().filter(this._isRasterFunctionValue),s=!0;for(let r of e)s=r.swizzleInputBandIds(t)&&s;return!!s&&this._swizzleBandIds(t)}getPrimaryRasters(){let t=[],e=[];return this._getPrimaryRasters(this,t,e),{rasters:t,rasterIds:e}}getWebGLProcessorDefinition(){let t=this._getWebGLParameters(),{raster:e,rasters:s}=this.functionArguments;return s&&Array.isArray(s)&&s.length?(t.rasters=s.map(t=>this._isRasterFunctionValue(t)?t.getWebGLProcessorDefinition():"number"==typeof t?{name:"Constant",parameters:{value:t},pixelType:"f32",id:-1,isNoopProcess:!1}:{name:"Identity",parameters:{value:t},pixelType:"f32",id:-1,isNoopProcess:!1}),t.rasters.some(t=>null!=t)||(t.rasters=null)):this._isRasterFunctionValue(e)&&(t.raster=e.getWebGLProcessorDefinition()),{name:this.functionName,parameters:t,pixelType:this.outputPixelType,id:this.id,isNoopProcess:this.isNoopProcess}}getClippingGeometries(){let t=[];"Clip"===this.functionName&&t.push(this.functionArguments);let{raster:e,rasters:s}=this.functionArguments;if(s&&Array.isArray(s)&&s.length)s.forEach(e=>{if(this._isRasterFunctionValue(e)){let s=e.getClippingGeometries();t.push(...s)}});else if(this._isRasterFunctionValue(e)){let s=e.getClippingGeometries();t.push(...s)}return t}_getOutputPixelType(t){return"unknown"===this.outputPixelType?t:this.outputPixelType??t}_getWebGLParameters(){return{}}_getInputBandIds(t){return t}_swizzleBandIds(t){return!0}_isInputRasterPrimaryOrConstant(){return!this._getRasterValues().some(t=>t&&"object"==typeof t&&"rasterFunction"in t&&t.rasterFunction)}_getNeighborhoodSize(){return{rows:1,cols:1}}_removeStatsHistColormapVAT(t){t.statistics=null,t.histograms=null,t.colormap=null,t.attributeTable=null,t.multidimensionalInfo?.variables.forEach(t=>{t.statistics=void 0,t.histograms=void 0})}_getRasterValues(){let{rasterArgumentNames:t}=this;return"rasters"===t[0]?this.functionArguments.rasters??[]:t.flatMap(t=>this.functionArguments[t])}_getSourceRasterInfos(t){let e=this._getRasterValues(),{rasterInfos:s,rasterIds:r}=t;if(0===e.length)return s;let n=e.map(t=>t&&"object"==typeof t&&"bind"in t&&t.rasterInfo?t.rasterInfo:"string"==typeof t&&r.includes(t)?s[r.indexOf(t)]:"number"!=typeof t?s[0]:void 0),i=n.find(t=>t)??s[0];return n.forEach((t,e)=>{void 0===t&&(n[e]=i)}),n}_getPrimaryRasterId(t){return t?.rasterId}_getPrimaryRasters(t,e=[],s=[]){for(let r=0;r<t.sourceRasters.length;r++){let n=t.sourceRasters[r];if("number"!=typeof n)if("bind"in n)this._getPrimaryRasters(n,e,s);else{let t=n,r=this._getPrimaryRasterId(t);if(null==r)continue;s.includes(r)||(this.mainPrimaryRasterId===r?(e.unshift(t),s.unshift(r)):(e.push(t),s.push(r)))}}}_isRasterFunctionValue(t){return"object"==typeof t&&!!t&&"getWebGLProcessorDefinition"in t}_readRasterValue(t,e,s){let{primaryPixelBlocks:r}=e;if(null==t||"$$"===t){let t=r[0];return null==t?null:t.clone()}if("string"==typeof t){let s=e.primaryRasterIds.indexOf(t);return-1===s?null:r[s]}if("number"==typeof t){let e=r[0];if(null==e)return null;let{width:s,height:n,pixelType:i}=e,o=new Float32Array(s*n);o.fill(t);let a=this.sourceRasterInfos[0].bandCount,l=Array(a).fill(o);return new g.A({width:s,height:n,pixelType:i,pixels:l})}return t.process(e,s)}_patchRasterInfo(){let{rasterInfo:t}=this;if(!t?.keyProperties)return;let{bandCount:e,keyProperties:s,statistics:r,histograms:n}=t,i=s.BandProperties;i&&i.length!==e&&(t.keyProperties={...s,BandProperties:void 0}),r&&r.length!==e&&(t.statistics=r.length>e?r.slice(0,e):null),n&&n.length!==e&&(t.histograms=n.length>e?n.slice(0,e):null),s.BAND_COUNT&&Number(s.BAND_COUNT)!==e&&(t.keyProperties={...s,BAND_COUNT:"string"==typeof s.BAND_COUNT?String(e):e})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],w.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],w.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],w.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}}),(0,a.wg)(t=>t?.toLowerCase())],w.prototype,"outputPixelType",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],w.prototype,"mainPrimaryRasterId",void 0),(0,o.Cg)([(0,a.MZ)()],w.prototype,"sourceRasters",void 0),(0,o.Cg)([(0,a.MZ)({type:[f.A],json:{write:!0}})],w.prototype,"sourceRasterInfos",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],w.prototype,"rasterInfo",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],w.prototype,"readingBufferSize",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],w.prototype,"id",void 0),(0,o.Cg)([(0,a.MZ)()],w.prototype,"isNoopProcess",void 0),(0,o.Cg)([(0,a.MZ)()],w.prototype,"supportsGPU",null),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],w.prototype,"rawInputBandIds",void 0),(0,o.Cg)([(0,a.MZ)()],w.prototype,"rawSourceRasterInfos",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],w.prototype,"isInputBandIdsSwizzled",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],w.prototype,"swizzledBandSelection",void 0),(0,o.Cg)([(0,a.MZ)()],w.prototype,"isBranch",void 0),(0,o.Cg)([(0,a.MZ)()],w.prototype,"isRoot",void 0),(0,o.Cg)([(0,a.MZ)({readOnly:!0})],w.prototype,"flatWebGLFunctionChain",null),(0,o.Cg)([(0,a.MZ)({readOnly:!0})],w.prototype,"neighborhoodSize",null),(0,o.Cg)([(0,a.MZ)()],w.prototype,"_bindingResult",void 0),w=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.BaseRasterFunction")],w);const x=w,v={userDefined:-1,lineDetectionHorizontal:0,lineDetectionVertical:1,lineDetectionLeftDiagonal:2,lineDetectionRightDiagonal:3,gradientNorth:4,gradientWest:5,gradientEast:6,gradientSouth:7,gradientNorthEast:8,gradientNorthWest:9,smoothArithmeticMean:10,smoothing3x3:11,smoothing5x5:12,sharpening3x3:13,sharpening5x5:14,laplacian3x3:15,laplacian5x5:16,sobelHorizontal:17,sobelVertical:18,sharpen:19,sharpen2:20,pointSpread:21,none:255},A={bitwiseAnd:11,bitwiseLeftShift:12,bitwiseNot:13,bitwiseOr:14,bitwiseRightShift:15,bitwiseXOr:16,booleanAnd:17,booleanNot:18,booleanOr:19,booleanXOr:20,equalTo:24,greaterThan:28,greaterThanEqual:29,lessThan:33,lessThanEqual:34,isNull:31,notEqual:46},C={acos:6,asin:7,atan:8,atanh:9,cos:21,cosh:22,sin:51,sinh:52,tan:56,tanh:57,acosh:59,asinh:60,atan2:61},b={setNull:50,conditional:78},M={plus:1,minus:2,times:3,sqrt:4,power:5,abs:10,divide:23,exp:25,exp10:26,exp2:27,int:30,float:32,ln:35,log10:36,log2:37,mod:44,negate:45,roundDown:48,roundUp:49,square:53,floatDivide:64,floorDivide:65,...A,...C,majority:38,max:39,mean:40,med:41,min:42,minority:43,range:47,stddev:54,sum:55,variety:58,majorityIgnoreNoData:66,maxIgnoreNoData:67,meanIgnoreNoData:68,medIgnoreNoData:69,minIgnoreNoData:70,minorityIgnoreNoData:71,rangeIgnoreNoData:72,stddevIgnoreNoData:73,sumIgnoreNoData:74,varietyIgnoreNoData:75,...b},P=new Map([[C.acos,{domain:[0,Math.PI],isInteger:!1}],[C.asin,{domain:[-Math.PI/2,Math.PI/2],isInteger:!1}],[C.atan,{domain:[-Math.PI/2,Math.PI/2],isInteger:!1}],[C.cos,{domain:[-1,1],isInteger:!1}],[C.sin,{domain:[-1,1],isInteger:!1}],[A.booleanAnd,{domain:[0,1],isInteger:!0}],[A.booleanNot,{domain:[0,1],isInteger:!0}],[A.booleanOr,{domain:[0,1],isInteger:!0}],[A.booleanXOr,{domain:[0,1],isInteger:!0}],[A.equalTo,{domain:[0,1],isInteger:!0}],[A.notEqual,{domain:[0,1],isInteger:!0}],[A.greaterThan,{domain:[0,1],isInteger:!0}],[A.greaterThanEqual,{domain:[0,1],isInteger:!0}],[A.lessThan,{domain:[0,1],isInteger:!0}],[A.lessThanEqual,{domain:[0,1],isInteger:!0}],[A.isNull,{domain:[0,1],isInteger:!0}]]);function T(t){return P.get(t)}const N=[0,2,2,2,1,2,1,1,1,1,1,2,2,1,2,2,2,2,1,2,2,1,1,2,2,1,1,1,2,2,1,1,1,2,2,1,1,1,999,999,999,999,999,999,2,1,2,999,1,1,2,1,1,1,999,999,1,1,999,1,1,2,999,999,2,2,999,999,999,999,999,999,999,999,999,999,3,999,3];function I(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]+n[t]);return o}function R(t,e,s){let[r]=t,n=r.length,i=g.A.createEmptyBand("f32",n);return i.set(r),i}function F(t,e,s){let[r]=t,n=r.length,i=g.A.createEmptyBand(s,n);for(let t=0;t<n;t++)(!e||e[t])&&(i[t]=r[t]*r[t]);return i}function _(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]-n[t]);return o}function k(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]*n[t]);return o}function S(t,e,s){let[r]=t,n=r.length,i=g.A.createEmptyBand(s,n);for(let t=0;t<n;t++)(!e||e[t])&&(i[t]=Math.sign(r[t])*Math.floor(Math.abs(r[t])));return i}function B(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]/n[t]);return o}function j(t,e,s){return B(t,e,"f32")}function Z(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=Math.floor(r[t]/n[t]));return o}function z(t,e,s,r){let n=t[0],i=n.length,o=g.A.createEmptyBand(s,i);if(r===C.atanh){for(let t=0;t<i;t++)if(e[t]){let s=n[t];Math.abs(s)>=1?e[t]=0:o[t]=Math.atanh(s)}return o}let a=r===C.asin?Math.asin:Math.acos;for(let t=0;t<i;t++)if(e[t]){let s=n[t];Math.abs(s)>1?e[t]=0:o[t]=a(s)}return o}function G(t,e,s,r){let[n]=t,i=n.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r(n[t]));return o}function O(t,e,s,r){let[n,i]=t,o=n.length,a=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)(!e||e[t])&&(a[t]=r(n[t],i[t]));return a}function D(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]&n[t]);return o}function E(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]<<n[t]);return o}function V(t,e,s){let[r]=t,n=r.length,i=g.A.createEmptyBand(s,n);for(let t=0;t<n;t++)(!e||e[t])&&(i[t]=~r[t]);return i}function U(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]|n[t]);return o}function L(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]>>n[t]);return o}function $(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]^n[t]);return o}function K(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]&&n[t]?1:0);return o}function W(t,e,s){let[r]=t,n=r.length,i=g.A.createEmptyBand(s,n);for(let t=0;t<n;t++)(!e||e[t])&&(i[t]=+!r[t]);return i}function H(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]||n[t]?1:0);return o}function q(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=+!!r[t]^!!n[t]);return o}function J(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=+(r[t]===n[t]));return o}function X(t,e,s,r){let[n]=t,i=n.length,o=g.A.createEmptyBand(s,i),a=r===Math.E;for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=a?Math.exp(n[t]):r**n[t]);return o}function Q(t,e,s){return X(t,e,s,10)}function Y(t,e,s){return X(t,e,s,2)}function tt(t,e,s){return X(t,e,s,Math.E)}function et(t,e,s,r){let[n]=t,i=n.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(n[t]<=0?e[t]=0:o[t]=r(n[t]));return o}function st(t,e,s){return et(t,e,s,Math.log10)}function rt(t,e,s){return et(t,e,s,Math.log2)}function nt(t,e,s){return et(t,e,s,Math.log)}function it(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=+(r[t]>n[t]));return o}function ot(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=+(r[t]>=n[t]));return o}function at(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=+(r[t]<n[t]));return o}function lt(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=+(r[t]<=n[t]));return o}function ut(t,e,s){let[r]=t,n=r.length,i=g.A.createEmptyBand(s,n);if(!e)return i;for(let t=0;t<n;t++)i[t]=+!e[t];return i}function pt(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]%n[t]);return o}function ct(t,e,s){let[r]=t,n=r.length,i=g.A.createEmptyBand(s,n);for(let t=0;t<n;t++)(!e||e[t])&&(i[t]=-r[t]);return i}function ht(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]===n[t]?0:1);return o}function mt(t,e,s){let[r,n]=t,i=r.length,o=g.A.createEmptyBand(s,i),a=new Uint8Array(i);for(let t=0;t<i;t++)(null==e||e[t])&&0===r[t]&&(o[t]=n[t],a[t]=255);return{band:o,mask:a}}function dt(t,e,s){let[r,n,i]=t,o=r.length,a=g.A.createEmptyBand(s,o);for(let t=0;t<o;t++)(!e||e[t])&&(a[t]=r[t]?n[t]:i[t]);return a}function gt(t,e,s){let r=t.length;if(r<2)return t[0];let[n]=t,i=n.length,o=g.A.createEmptyBand(s,i);for(let s=0;s<i;s++)if(!e||e[s]){let e=n[s];for(let n=1;n<r;n++){let r=t[n][s];e<r&&(e=r)}o[s]=e}return o}function ft(t,e,s){let r=t.length;if(r<2)return t[0];let[n]=t,i=n.length,o=g.A.createEmptyBand(s,i);for(let s=0;s<i;s++)if(!e||e[s]){let e=n[s];for(let n=1;n<r;n++){let r=t[n][s];e>r&&(e=r)}o[s]=e}return o}function yt(t,e,s){let r=t.length;if(r<2)return t[0];let[n]=t,i=n.length,o=g.A.createEmptyBand(s,i);for(let s=0;s<i;s++)if(!e||e[s]){let e=n[s],i=e;for(let n=1;n<r;n++){let r=t[n][s];i<r?i=r:e>r&&(e=r)}o[s]=i-e}return o}function wt(t,e,s){let r=t.length;if(r<2)return t[0];let[n]=t,i=n.length,o=g.A.createEmptyBand(s,i);for(let s=0;s<i;s++)if(!e||e[s]){let e=0;for(let n=0;n<r;n++)e+=t[n][s];o[s]=e/r}return o}function xt(t,e,s){let r=t.length;if(r<2)return t[0];let[n]=t,i=n.length,o=g.A.createEmptyBand(s,i);for(let s=0;s<i;s++)if(!e||e[s])for(let e=0;e<r;e++){let r=t[e];o[s]+=r[s]}return o}function vt(t,e,s){let r=t.length;if(r<2)return t[0];let[n]=t,i=n.length,o=g.A.createEmptyBand(s,i);for(let s=0;s<i;s++)if(!e||e[s]){let e=new Float32Array(r),n=0;for(let i=0;i<r;i++){let r=t[i];n+=r[s],e[i]=r[s]}n/=r;let i=0;for(let t=0;t<r;t++)i+=(e[t]-n)**2;o[s]=Math.sqrt(i/r)}return o}function At(t,e,s){let r=t.length;if(r<2)return t[0];let n=Math.floor(r/2),[i]=t,o=i.length,a=g.A.createEmptyBand(s,o),l=new Float32Array(r),u=r%2==1;for(let s=0;s<o;s++)if(!e||e[s]){for(let e=0;e<r;e++)l[e]=t[e][s];l.sort(),a[s]=u?l[n]:(l[n]+l[n-1])/2}return a}function Ct(t,e,s){let[r,n]=t;if(null==n)return r;let i=r.length,o=g.A.createEmptyBand(s,i);for(let t=0;t<i;t++)(!e||e[t])&&(o[t]=r[t]<n[t]?r[t]:n[t]);return o}function bt(t,e,s){let r=t.length;if(r<=2)return Ct(t,e,s);let n=t[0].length,i=g.A.createEmptyBand(s,n),o=new Map;for(let s=0;s<n;s++)if(!e||e[s]){o.clear();for(let e=0;e<r;e++){let r=t[e][s];o.set(r,o.has(r)?o.get(r)+1:1)}let e=0,n=0,a=[];for(let t of o.keys())e=o.get(t),e>n?(n=e,a.length=0,a.push(t)):e===n&&a.push(t);a.length>1&&a.sort((t,e)=>t-e),i[s]=a[0]}return i}function Mt(t,e,s){let r=t.length;if(r<=2)return Ct(t,e,s);let n=t[0].length,i=g.A.createEmptyBand(s,n),o=new Map;for(let s=0;s<n;s++)if(!e||e[s]){o.clear();for(let e=0;e<r;e++){let r=t[e][s];o.set(r,o.has(r)?o.get(r)+1:1)}let e=0,n=t.length,a=[];for(let t of o.keys())e=o.get(t),e<n?(n=e,a.length=0,a.push(t)):e===n&&a.push(t);a.length>1&&a.sort((t,e)=>t-e),i[s]=a[0]}return i}function Pt(t,e,s){let r=t.length;if(r<2)return t[0];let[n]=t,i=n.length,o=g.A.createEmptyBand(s,i),a=new Set;for(let s=0;s<i;s++)if(!e||e[s]){let e;a.clear();for(let n=0;n<r;n++)e=t[n][s],a.add(e);o[s]=a.size}return o}const Tt=new Map,Nt=new Map,It=new Map,Rt=new Map;function Ft(){Tt.size||(Tt.set(4,Math.sqrt),Tt.set(6,Math.acos),Tt.set(7,Math.asin),Tt.set(8,Math.atan),Tt.set(9,Math.atanh),Tt.set(10,Math.abs),Tt.set(21,Math.cos),Tt.set(22,Math.cosh),Tt.set(48,Math.floor),Tt.set(49,Math.ceil),Tt.set(51,Math.sin),Tt.set(52,Math.sinh),Tt.set(56,Math.tan),Tt.set(57,Math.tanh),Tt.set(59,Math.acosh),Tt.set(60,Math.asinh),Tt.set(65,Math.floor),Nt.set(5,Math.pow),Nt.set(61,Math.atan2),It.set(1,I),It.set(2,_),It.set(3,k),It.set(11,D),It.set(12,E),It.set(13,V),It.set(14,U),It.set(15,L),It.set(16,$),It.set(17,K),It.set(18,W),It.set(19,H),It.set(20,q),It.set(23,B),It.set(24,J),It.set(25,tt),It.set(26,Q),It.set(27,Y),It.set(28,it),It.set(29,ot),It.set(30,S),It.set(31,ut),It.set(32,R),It.set(33,at),It.set(34,lt),It.set(35,nt),It.set(36,st),It.set(37,rt),It.set(44,pt),It.set(45,ct),It.set(46,ht),It.set(53,F),It.set(64,j),It.set(65,Z),It.set(76,dt),It.set(78,dt),Rt.set(38,bt),Rt.set(39,gt),Rt.set(40,wt),Rt.set(41,At),Rt.set(42,ft),Rt.set(43,Mt),Rt.set(47,yt),Rt.set(54,vt),Rt.set(55,xt),Rt.set(58,Pt),Rt.set(66,bt),Rt.set(67,gt),Rt.set(68,wt),Rt.set(69,At),Rt.set(70,ft),Rt.set(71,Mt),Rt.set(72,yt),Rt.set(73,vt),Rt.set(74,xt),Rt.set(75,Pt))}function _t(t,e,s={}){Ft();let r=function(t,e=!1){let s=t.map(t=>t.mask),r=s.filter(t=>null!=t),n=t[0].pixels[0].length;if(0===r.length||e&&r.length!==s.length)return new Uint8Array(n).fill(255);let i=r[0],o=new Uint8Array(i);if(1===r.length)return o;if(!e){for(let t=1;t<r.length;t++){let e=r[t];for(let t=0;t<o.length;t++)o[t]&&(o[t]=e[t]?255:0)}return o}for(let t=1;t<r.length;t++){let e=r[t];for(let t=0;t<o.length;t++)0===o[t]&&(o[t]=e[t]?255:0)}return o}(t,e>=66&&e<=75),{outputPixelType:n="f32"}=s,i=!Rt.has(e)||s.processAsMultiband,o=i?t[0].pixels.length:1,a=[];for(let s=0;s<o;s++){let o,u=Rt.has(e)&&!i?t.flatMap(t=>t.pixels):t.map(t=>t.pixels[s]),p=!0;if(e===b.setNull){let t=mt(u,r,n);o=t.band,r=t.mask,p=!1}else It.has(e)?o=It.get(e)(u,r,"f64"):Tt.has(e)?o=e===C.asin||e===C.acos||e===C.atanh?z(u,r,"f64",e):G(u,r,"f64",Tt.get(e)):Nt.has(e)?o=O(u,r,"f64",Nt.get(e)):Rt.has(e)?o=Rt.get(e)(u,r,"f64"):(o=u[0],p=!1);if(p&&e!==A.isNull&&!P.has(e)){let t=g.A.createEmptyBand(n,o.length);r||=new Uint8Array(o.length).fill(255),(0,l.$p)(o,r),(0,l.yM)(o,r,n,t),o=t}a.push(o)}let u=t[0];return new g.A({width:u.width,height:u.height,pixelType:n,mask:e===A.isNull?null:r,pixels:a})}let kt=class extends x{constructor(){super(...arguments),this.functionName="Arithmetic",this.functionArguments=null,this.rasterArgumentNames=["raster","raster2"]}_bindSourceRasters(){let{operation:t}=this.functionArguments;if(t<1||t>6)return{success:!1,supportsGPU:!1,error:"unsupported operation"};let e=this.sourceRasterInfos[0].clone();return this.outputPixelType=this._getOutputPixelType(e.pixelType),e.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(e),this.rasterInfo=e,{success:!0,supportsGPU:e.bandCount<=3}}_processPixels(t){let{pixelBlocks:e}=t;return null==e?.[0]||null==e?.[1]?null:function(t,e,s){return _t(t,e=[null,1,2,3,23,5,44][e]??1,{outputPixelType:s})}(e,this.functionArguments.operation,this.outputPixelType)}_getWebGLParameters(){let{operation:t}=this.functionArguments,e=["","plus","minus","times","divide","power","mod"][t],s=this.outputPixelType??"f32",[r,n]=(0,l.hP)(s),i=(0,l.zw)(s);return i&&(r-=1e-4,n+=1e-4),{imageCount:2,operationName:e,domainRange:[r,n],isOutputRounded:i}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],kt.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:d,json:{write:!0,name:"rasterFunctionArguments"}})],kt.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],kt.prototype,"rasterArgumentNames",void 0),kt=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ArithmeticFunction")],kt);const St=kt;var Bt;let jt=Bt=class extends c{clone(){return new Bt({raster:this.raster})}};jt=Bt=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.AspectFunctionArguments")],jt);const Zt=jt;var zt=s(51181);let Gt=class extends x{constructor(){super(...arguments),this.functionName="Aspect",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){let t=this.sourceRasterInfos[0];this.isGCS=t.spatialReference?.isGeographic??!1,this.outputPixelType=this._getOutputPixelType("f32");let e=t.clone();return e.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(e),e.statistics=[{min:-1,max:360,avg:180,stddev:30}],e.bandCount=1,this.rasterInfo=e,{success:!0,supportsGPU:!0}}_processPixels(t){let e=t.pixelBlocks?.[0];if(null==e)return null;let{extent:s,primaryPixelSizes:r}=t,n=r?.[0]??(s?{x:s.width/e.width,y:s.height/e.height}:{x:1,y:1});return(0,zt.di)(e,{resolution:n})}_getNeighborhoodSize(){return{rows:3,cols:3}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Gt.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Zt,json:{write:!0,name:"rasterFunctionArguments"}})],Gt.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Gt.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Gt.prototype,"isGCS",void 0),Gt=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.AspectFunction")],Gt);const Ot=Gt;var Dt=s(66552);const Et=new Set(["+","-","*","/","(",")"]);function Vt(t,e){return t.toLowerCase().startsWith("b")?e[parseInt(t.slice(1),10)-1]:parseFloat(t)}function Ut(t,e,s,r){if("number"==typeof s&&"number"==typeof r)return s+r;let n,i,o;"number"==typeof s?(o=r,n=o.length,i=new Float32Array(n),i.fill(s)):(n=s.length,i=s,r.constructor===Number?(o=new Float32Array(n),o.fill(r)):o=r);let a=new Float32Array(n);switch(e){case"+":for(let e=0;e<n;e++)(null==t||t[e])&&(a[e]=i[e]+o[e]);break;case"-":for(let e=0;e<n;e++)(null==t||t[e])&&(a[e]=i[e]-o[e]);break;case"*":for(let e=0;e<n;e++)(null==t||t[e])&&(a[e]=i[e]*o[e]);break;case"/":for(let e=0;e<n;e++)(null==t||t[e])&&o[e]&&(a[e]=i[e]/o[e]);break;case"(":case")":throw Error("encountered error with custom band index equation")}return a}function Lt(t,e){t.splice(e,1);let s=0,r=0;do{s=0,r=0;for(let e=0;e<t.length;e++)if("("===t[e])s=e;else if(")"===t[e]){r=e;break}r===s+1&&t.splice(s,2)}while(r===s+1);return t}function $t(t){if(1===t.length)return{opIndex:0,numIndex:0};let e=0,s=0;for(let r=0;r<t.length;r++)if("("===t[r])e=r;else if(")"===t[r]){s=r;break}let r=0===s?t:t.slice(e+1,s),n=-1;for(let t=0;t<r.length;t++)if("*"===r[t]||"/"===r[t]){n=t;break}if(n>-1)s>0&&(n+=e+1);else{for(let t=0;t<r.length;t++)if("+"===r[t]||"-"===r[t]){n=t;break}s>0&&(n+=e+1)}let i=0;for(let e=0;e<n;e++)"("===t[e]&&i++;return{opIndex:n,numIndex:n-i}}var Kt=s(47520);const Wt=new Dt.J({0:"custom",1:"ndvi",2:"savi",3:"tsavi",4:"msavi",5:"gemi",6:"pvi",7:"gvitm",8:"sultan",9:"vari",10:"gndvi",11:"sr",12:"ndvi-re",13:"sr-re",14:"mtvi2",15:"rtvi-core",16:"ci-re",17:"ci-g",18:"ndwi",19:"evi",20:"iron-oxide",21:"ferrous-minerals",22:"clay-minerals",23:"wndwi",24:"bai",25:"nbr",26:"ndbi",27:"ndmi",28:"ndsi",29:"mndwi"},{useNumericKeys:!0});function Ht(t,e){if(!(0,Kt.AB)(t))return t;let s,{equation:r,method:n}=e,i=e.bandIndexes.map(t=>t-1),{pixels:o,mask:a}=t;switch(n){case"gndvi":case"nbr":case"ndbi":case"ndvi":case"ndvi-re":case"ndsi":case"ndmi":case"mndwi":s=Jt(a,o[i[0]],o[i[1]]);break;case"ndwi":s=Jt(a,o[i[1]],o[i[0]]);break;case"sr":case"sr-re":case"iron-oxide":case"ferrous-minerals":case"clay-minerals":s=function(t,e,s){let r=s.length,n=new Float32Array(r);for(let i=0;i<r;i++)if(null==t||t[i]){let t=e[i],r=s[i];r&&(n[i]=t/r)}return[n]}(a,o[i[0]],o[i[1]]);break;case"ci-g":case"ci-re":s=function(t,e,s){let r=e.length,n=new Float32Array(r);for(let i=0;i<r;i++)if(null==t||t[i]){let t=e[i],r=s[i];r&&(n[i]=t/r-1)}return[n]}(a,o[i[0]],o[i[1]]);break;case"savi":s=function(t,e,s,r){let n=s.length,i=new Float32Array(n);for(let o=0;o<n;o++)if(null==t||t[o]){let t=s[o],n=e[o],a=n+t+r;a&&(i[o]=(n-t)/a*(1+r))}return[i]}(a,o[i[0]],o[i[1]],i[2]+1);break;case"tsavi":s=function(t,e,s,r,n,i){let o=s.length,a=new Float32Array(o),l=-n*r+i*(1+r*r);for(let i=0;i<o;i++)if(null==t||t[i]){let t=s[i],o=e[i],u=n*o+t+l;u&&(a[i]=r*(o-r*t-n)/u)}return[a]}(a,o[i[0]],o[i[1]],i[2]+1,i[3]+1,i[4]+1);break;case"msavi":s=function(t,e,s){let r=s.length,n=new Float32Array(r);for(let i=0;i<r;i++)if(null==t||t[i]){let t=s[i],r=e[i],o=2*r+1;n[i]=.5*(o-Math.sqrt(o*o-8*(r-t)))}return[n]}(a,o[i[0]],o[i[1]]);break;case"gemi":s=function(t,e,s){let r=s.length,n=new Float32Array(r);for(let i=0;i<r;i++)if(null==t||t[i]){let t=s[i],r=e[i];if(1!==t&&r+t+.5!==0){let e=(2*(r*r-t*t)+1.5*r+.5*t)/(r+t+.5);n[i]=e*(1-.25*e)-(t-.125)/(1-t)}}return[n]}(a,o[i[0]],o[i[1]]);break;case"pvi":s=function(t,e,s,r,n){let i=s.length,o=new Float32Array(i),a=1/Math.sqrt(1+r*r);for(let l=0;l<i;l++)if(null==t||t[l]){let t=s[l],i=e[l];o[l]=(i-r*t-n)*a}return[o]}(a,o[i[0]],o[i[1]],i[2]+1,i[3]+1);break;case"gvitm":s=function(t,e){let[s,r,n,i,o,a]=e,l=s.length,u=new Float32Array(l);for(let e=0;e<l;e++)(null==t||t[e])&&(u[e]=-.2848*s[e]-.2435*r[e]-.5436*n[e]+.7243*i[e]+.084*o[e]-.18*a[e]);return[u]}(a,[o[i[0]],o[i[1]],o[i[2]],o[i[3]],o[i[4]],o[i[5]]]);break;case"sultan":s=function(t,e){let[s,r,n,i,o]=e,a=s.length,l=new Float32Array(a),u=new Float32Array(a),p=new Float32Array(a);for(let e=0;e<a;e++)(null==t||t[e])&&(l[e]=o[e]?i[e]/o[e]*100:0,u[e]=s[e]?i[e]/s[e]*100:0,p[e]=n[e]?r[e]/n[e]*(i[e]/n[e])*100:0);return[l,u,p]}(a,[o[i[0]],o[i[1]],o[i[2]],o[i[3]],o[i[4]]]);break;case"vari":s=function(t,e){let[s,r,n]=e,i=s.length,o=new Float32Array(i);for(let e=0;e<i;e++)if(null==t||t[e])for(e=0;e<i;e++){let t=s[e],i=r[e],a=i+t-n[e];a&&(o[e]=(i-t)/a)}return[o]}(a,[o[i[0]],o[i[1]],o[i[2]]]);break;case"mtvi2":s=function(t,e){let[s,r,n]=e,i=s.length,o=new Float32Array(i);for(let e=0;e<i;e++)if(null==t||t[e])for(e=0;e<i;e++){let t=s[e],i=r[e],a=n[e],l=Math.sqrt((2*t+1)**2-(6*t-5*Math.sqrt(i))-.5);if(l){let s=1.5*(1.2*(t-a)-2.5*(i-a));o[e]=s/l}}return[o]}(a,[o[i[0]],o[i[1]],o[i[2]]]);break;case"rtvi-core":s=function(t,e){let[s,r,n]=e,i=s.length,o=new Float32Array(i);for(let e=0;e<i;e++)if(null==t||t[e])for(e=0;e<i;e++){let t=s[e],i=r[e],a=n[e];o[e]=100*(t-i)-10*(t-a)}return[o]}(a,[o[i[0]],o[i[1]],o[i[2]]]);break;case"evi":s=function(t,e){let[s,r,n]=e,i=s.length,o=new Float32Array(i);for(let e=0;e<i;e++)if(null==t||t[e])for(e=0;e<i;e++){let t=s[e],i=r[e],a=t+6*i-7.5*n[e]+1;a&&(o[e]=2.5*(t-i)/a)}return[o]}(a,[o[i[0]],o[i[1]],o[i[2]]]);break;case"wndwi":s=function(t,e,s=.5){let[r,n,i]=e,o=n.length,a=new Float32Array(o);for(let e=0;e<o;e++)if(null==t||t[e])for(e=0;e<o;e++){let t=r[e],o=n[e],l=i[e],u=t+s*o+(1-s)*l;u&&(a[e]=(t-s*o-(1-s)*l)/u)}return[a]}(a,[o[i[0]],o[i[1]],o[i[2]]],i[3]?i[3]+1:.5);break;case"bai":s=function(t,e,s){let r=s.length,n=new Float32Array(r);for(let i=0;i<r;i++)if(null==t||t[i])for(i=0;i<r;i++){let t=(.1-e[i])**2+(.06-s[i])**2;t&&(n[i]=1/t)}return[n]}(a,o[i[0]],o[i[1]]);break;case"custom":s=function(t,e,s){let r,{ops:n,nums:i}=function(t,e){(t=t.replaceAll(" ","")).startsWith("-")&&(t="0"+t),t.startsWith("+")&&(t=t.slice(1));let s=t.split(""),r=[],n=[],i="";for(let t=0;t<s.length;t++){let o=s[t];Et.has(o)?(i.length&&n.push(Vt(i,e)),r.push(o),i=""):i=i.concat(o)}return i.length&&n.push(Vt(i,e)),{ops:r,nums:n}}(s,e);if(0===n.length){let t=1===i.length?i[0]:e[0];if(t instanceof Float32Array)return[t];let s=new Float32Array(e[0].length);return"number"==typeof t?s.fill(t):s.set(t),[s]}for(;n.length>0;){let{numIndex:e,opIndex:s}=$t(n);if(r=Ut(t,n[s],i[e],i[e+1]),1===n.length)break;n=Lt(n,s),i.splice(e,2,r)}return[r]}(a,o,r);break;default:return t}let u,{outputPixelType:p="f32"}=e,c=null!=p&&(0,l.zw)(p);a?(u=new Uint8Array(t.width*t.height),u.set(a)):c&&(u=new Uint8Array(t.width*t.height).fill(255)),c&&(s=s.map(t=>{let e=g.A.createEmptyBand(p,t.length);return(0,l.yM)(t,u,p,e),e}));let h=new g.A({width:t.width,height:t.height,pixelType:p,pixels:s,mask:u});return h.updateStatistics(),h}function qt(t){let e=new Float32Array(9);return e[3*t[0]]=1,e[3*t[1]+1]=1,e[3*t[2]+2]=1,e}function Jt(t,e,s){let r=s.length,n=new Float32Array(r);for(let i=0;i<r;i++)if(null==t||t[i]){let t=e[i],r=s[i],o=t+r;o&&(n[i]=(t-r)/o)}return[n]}var Xt,Qt=s(93223);let Yt=Xt=class extends c{constructor(){super(...arguments),this.method="custom"}clone(){return new Xt({method:this.method,bandIndexes:this.bandIndexes,raster:(0,i.o8)(this.raster)})}};(0,o.Cg)([(0,a.MZ)({json:{type:String,write:!0}})],Yt.prototype,"bandIndexes",void 0),(0,o.Cg)([(0,Qt.e)(Wt)],Yt.prototype,"method",void 0),Yt=Xt=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.BandArithmeticFunctionArguments")],Yt);const te=Yt,ee=new Set(["vari","mtvi2","rtvi-core","evi"]);let se=class extends x{constructor(){super(...arguments),this.functionName="BandArithmetic",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){this.outputPixelType=this._getOutputPixelType("f32");let t=this.sourceRasterInfos[0];if(t.bandCount<2)return{success:!1,supportsGPU:!1,error:"band-arithmetic-function: source raster has insufficient amount of raster bands"};let e=t.clone();return e.pixelType=this.outputPixelType,e.bandCount="sultan"===this.functionArguments.method?3:1,this._removeStatsHistColormapVAT(e),e.keyProperties={...e.keyProperties,BandProperties:void 0},this.rasterInfo=e,{success:!0,supportsGPU:!["custom","gvitm","sultan"].includes(this.functionArguments.method)}}_processPixels(t){let e=t.pixelBlocks?.[0];if(null==e)return e;let{method:s,bandIndexes:r}=this.functionArguments,n=r.split(" ").map(t=>parseFloat(t));if(this.rasterInfo.storageInfo.isBsqTile){let{rawInputBandIds:t}=this,e=ee.has(this.functionArguments.method)?3:2,s=n.slice(0,e).map(e=>t.indexOf(e-1));n.splice(0,e,...s)}return Ht(e,{method:s,bandIndexes:n,equation:r,outputPixelType:this.outputPixelType})}_getWebGLParameters(){let t=this.functionArguments.bandIndexes.split(" ").map(t=>parseFloat(t)-1);2===t.length&&t.push(0);let e,s,r=this.isInputBandIdsSwizzled?[0,1,2]:t,n=new Float32Array(3),{method:i}=this.functionArguments;switch(i){case"gndvi":case"nbr":case"ndbi":case"ndvi":case"ndvi-re":case"ndsi":case"ndmi":case"mndwi":e=qt([r[0],r[1],0]),s="ndxi";break;case"ndwi":e=qt([r[1],r[0],0]),s="ndxi";break;case"sr":case"sr-re":case"iron-oxide":case"ferrous-minerals":case"clay-minerals":e=qt([r[0],r[1],0]),s="sr";break;case"ci-g":case"ci-re":e=qt([r[0],r[1],0]),s="ci";break;case"savi":e=qt([r[0],r[1],0]),s="savi",n[0]=t[2]+1;break;case"tsavi":e=qt([r[0],r[1],0]),s="tsavi",n[0]=t[2]+1,n[1]=t[3]+1,n[2]=t[4]+1;break;case"msavi":e=qt([r[0],r[1],0]),s="msavi";break;case"gemi":e=qt([r[0],r[1],0]),s="gemi";break;case"pvi":e=qt([r[0],r[1],0]),s="tsavi",n[0]=t[2]+1,n[1]=t[3]+1;break;case"vari":e=qt([r[0],r[1],r[2]]),s="vari";break;case"mtvi2":e=qt([r[0],r[1],r[2]]),s="mtvi";break;case"rtvi-core":e=qt([r[0],r[1],r[2]]),s="rtvicore";break;case"evi":e=qt([r[0],r[1],r[2]]),s="evi";break;case"wndwi":e=qt([r[0],r[1],0]),s="wndwi",n[0]=t[3]?t[3]+1:.5;break;case"bai":e=qt([r[1],r[0],0]),s="bai";break;default:e=qt([0,1,2]),s="custom"}return{bandIndexMat3:e,indexType:s,adjustments:n,isOutputRounded:(0,l.zw)(this.outputPixelType)}}_getInputBandIds(t){if("custom"===this.functionArguments.method)return t;let e=this.functionArguments.bandIndexes.split(" ").map(t=>parseFloat(t)-1),s=t.length,r=e.map(t=>t>=s?s-1:t),n=ee.has(this.functionArguments.method)?3:2,i=r.slice(0,n).map(e=>t[e]);return 2===i.length&&i.push(0),i}_swizzleBandIds(t){let e=this.functionArguments.bandIndexes.split(" ").map(t=>parseFloat(t)-1);2===e.length&&e.push(0);let{method:s}=this.functionArguments,r=(["vari","mtvi2","rtvi-core","evi"].includes(s)?e.slice(0,3):"bai"===s||"ndwi"===s?[e[1],e[0]]:e.slice(0,2)).map(e=>t.indexOf(e));return r[2]??=r[1],this.isInputBandIdsSwizzled=!0,this.swizzledBandSelection=r,!1}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],se.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:te,json:{write:!0,name:"rasterFunctionArguments"}})],se.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],se.prototype,"rasterArgumentNames",void 0),se=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.BandArithmeticFunction")],se);const re=se;var ne,ie=s(65864),oe=s(50498);const ae=new Dt.J({1:"outside",2:"inside"},{useNumericKeys:!0});let le=ne=class extends c{constructor(){super(...arguments),this.clippingType="outside"}clone(){return new ne({clippingGeometry:this.clippingGeometry.clone(),clippingType:this.clippingType})}};(0,o.Cg)([(0,a.MZ)({types:oe.yR,json:{read:ie.rS,write:!0}})],le.prototype,"clippingGeometry",void 0),(0,o.Cg)([(0,a.MZ)({json:{read:ae.read,write:ae.write}})],le.prototype,"clippingType",void 0),le=ne=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ClipFunctionArguments")],le);const ue=le;var pe=s(34930),ce=s(37373);let he=class extends x{constructor(){super(...arguments),this.functionName="Clip",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){let t=this.sourceRasterInfos[0].clone();this.outputPixelType=this._getOutputPixelType(t.pixelType),t.pixelType=this.outputPixelType,this.rasterInfo=t;let{functionArguments:e}=this,{clippingGeometry:s,clippingType:r}=e;if(!s)return{success:!1,supportsGPU:!1,error:"missing clipping geometry"};if("outside"===r)try{let{spatialReference:e}=t,r="extent"===s.type?(0,ce._l)(s,e):(0,ce.uk)(s,e).extent;r&&(0,pe.Sd)(t,r)}catch{}return{success:!0,supportsGPU:!0}}_processPixels(t){return t.pixelBlocks?.[0]}_getWebGLParameters(){let{clippingGeometry:t,clippingType:e}=this.functionArguments;return{clippingGeometry:t.toJSON(),clippingType:e}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],he.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:ue,json:{write:!0,name:"rasterFunctionArguments"}})],he.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],he.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)()],he.prototype,"isNoopProcess",void 0),he=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ClipFunction")],he);const me=he;var de,ge=s(67369),fe=s(95349),ye=s(36005);let we=de=class extends c{castColormapName(t){if(!t)return null;let e=t.toLowerCase();return ge.L7.includes(e)?e:null}readColorRamp(t){return(0,fe.r)(t)}readColorRampName(t,e){if(!t)return null;let s=ge.kH.jsonValues.find(e=>e.toLowerCase()===t.toLowerCase());return s?ge.kH.fromJSON(s):null}clone(){return new de({colormap:(0,i.o8)(this.colormap),colormapName:this.colormapName,colorRamp:this.colorRamp?.clone(),colorRampName:this.colorRampName})}};(0,o.Cg)([(0,a.MZ)({type:[[Number]],json:{write:!0}})],we.prototype,"colormap",void 0),(0,o.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],we.prototype,"colormapName",void 0),(0,o.Cg)([(0,a.wg)("colormapName")],we.prototype,"castColormapName",null),(0,o.Cg)([(0,a.MZ)({types:fe.g,json:{write:!0}})],we.prototype,"colorRamp",void 0),(0,o.Cg)([(0,ye.w)("colorRamp")],we.prototype,"readColorRamp",null),(0,o.Cg)([(0,a.MZ)({type:ge.kH.apiValues,json:{type:ge.kH.jsonValues,write:ge.kH.write}})],we.prototype,"colorRampName",void 0),(0,o.Cg)([(0,ye.w)("colorRampName")],we.prototype,"readColorRampName",null),we=de=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ColormapFunctionArguments")],we);const xe=we,ve=[[36,0,255],[36,0,255],[36,0,255],[36,0,255],[112,75,3],[113,76,3],[114,77,3],[115,77,3],[116,78,3],[117,79,3],[118,79,3],[119,80,3],[121,81,4],[122,82,4],[123,82,4],[124,83,4],[125,84,4],[126,84,4],[127,85,4],[128,86,4],[129,86,4],[130,87,4],[131,88,4],[132,89,4],[133,89,4],[134,90,4],[135,91,4],[136,91,4],[137,92,4],[138,93,4],[139,94,4],[140,94,4],[142,95,5],[143,96,5],[144,96,5],[145,97,5],[146,98,5],[147,99,5],[148,99,5],[149,100,5],[150,101,5],[151,101,5],[152,102,5],[153,103,5],[154,104,5],[155,104,5],[156,105,5],[157,106,5],[158,106,5],[159,107,5],[160,108,5],[161,108,5],[162,109,5],[164,110,6],[165,111,6],[166,111,6],[167,112,6],[168,113,6],[169,113,6],[170,114,6],[171,115,6],[172,116,6],[173,116,6],[174,117,6],[245,0,0],[245,5,0],[245,10,0],[246,15,0],[246,20,0],[246,25,0],[246,30,0],[247,35,0],[247,40,0],[247,45,0],[247,50,0],[247,55,0],[248,60,0],[248,65,0],[248,70,0],[248,75,0],[249,81,0],[249,86,0],[249,91,0],[249,96,0],[250,101,0],[250,106,0],[250,111,0],[250,116,0],[250,121,0],[251,126,0],[251,131,0],[251,136,0],[251,141,0],[252,146,0],[252,151,0],[252,156,0],[252,156,0],[251,159,0],[250,162,0],[249,165,0],[248,168,0],[247,171,0],[246,174,0],[245,177,0],[245,179,0],[244,182,0],[243,185,0],[242,188,0],[241,191,0],[240,194,0],[239,197,0],[238,200,0],[237,203,0],[236,206,0],[235,209,0],[234,212,0],[233,215,0],[232,218,0],[231,221,0],[230,224,0],[230,226,0],[229,229,0],[228,232,0],[227,235,0],[226,238,0],[225,241,0],[224,244,0],[223,247,0],[165,247,0],[163,244,0],[161,240,0],[158,237,0],[156,233,1],[154,230,1],[152,227,1],[149,223,1],[147,220,1],[145,216,1],[143,213,1],[140,210,2],[138,206,2],[136,203,2],[134,200,2],[132,196,2],[129,193,2],[127,189,2],[125,186,3],[123,183,3],[120,179,3],[118,176,3],[116,172,3],[114,169,3],[111,166,3],[109,162,4],[107,159,4],[105,155,4],[103,152,4],[100,149,4],[98,145,4],[96,142,4],[94,138,5],[91,135,5],[89,132,5],[87,128,5],[85,125,5],[82,121,5],[80,118,5],[78,115,6],[76,111,6],[73,108,6],[71,105,6],[69,101,6],[67,98,6],[65,94,6],[62,91,7],[60,88,7],[58,84,7],[56,81,7],[53,77,7],[51,74,7],[49,71,7],[47,67,8],[44,64,8],[42,60,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8],[40,57,8]],Ae=[[36,0,255],[36,0,255],[36,0,255],[36,0,255],[245,20,0],[245,24,0],[245,29,0],[245,31,0],[247,33,0],[247,33,0],[247,37,0],[247,41,0],[247,41,0],[247,41,0],[247,45,0],[247,45,0],[247,47,0],[247,49,0],[247,49,0],[247,54,0],[247,54,0],[247,56,0],[247,58,0],[247,58,0],[250,62,0],[250,62,0],[250,62,0],[250,67,0],[250,67,0],[250,67,0],[250,69,0],[250,71,0],[250,71,0],[250,75,0],[250,75,0],[250,78,0],[250,79,0],[250,79,0],[250,79,0],[250,81,0],[250,83,0],[250,83,0],[250,87,0],[250,87,0],[250,90,0],[250,92,0],[252,93,0],[252,93,0],[252,97,0],[252,97,0],[252,97,0],[252,97,0],[252,101,0],[252,101,0],[252,101,0],[252,101,0],[252,105,0],[252,105,0],[252,107,0],[252,109,0],[252,109,0],[252,113,13],[255,118,20],[255,119,23],[255,121,25],[255,126,33],[255,132,38],[255,133,40],[255,135,43],[255,141,48],[255,144,54],[255,150,59],[255,152,61],[255,153,64],[255,159,69],[255,163,77],[255,165,79],[255,168,82],[255,174,87],[255,176,92],[255,181,97],[255,183,99],[255,186,102],[255,191,107],[255,197,115],[255,201,120],[255,203,123],[255,205,125],[255,209,130],[255,214,138],[255,216,141],[255,218,143],[255,224,150],[255,228,156],[255,234,163],[255,236,165],[255,238,168],[255,243,173],[255,248,181],[255,252,186],[253,252,186],[250,252,187],[244,250,180],[238,247,176],[234,246,173],[231,245,169],[223,240,163],[217,237,157],[211,235,150],[205,233,146],[200,230,142],[195,227,136],[189,224,132],[184,222,126],[180,220,123],[174,217,119],[169,214,114],[163,212,108],[160,210,105],[154,207,101],[148,204,96],[143,201,93],[138,199,88],[134,197,84],[130,194,81],[126,191,77],[117,189,70],[115,186,68],[112,184,64],[106,181,60],[100,179,55],[94,176,49],[92,174,47],[90,173,45],[81,168,37],[75,166,33],[71,163,28],[66,160,24],[62,158,21],[56,156,14],[51,153,0],[51,153,0],[51,153,0],[50,150,0],[50,150,0],[50,150,0],[50,150,0],[49,148,0],[49,148,0],[49,148,0],[48,145,0],[48,145,0],[48,145,0],[48,145,0],[48,143,0],[48,143,0],[48,143,0],[48,143,0],[47,140,0],[47,140,0],[47,140,0],[47,140,0],[46,138,0],[46,138,0],[46,138,0],[46,138,0],[45,135,0],[45,135,0],[45,135,0],[45,135,0],[44,133,0],[44,133,0],[44,133,0],[43,130,0],[43,130,0],[43,130,0],[43,130,0],[43,130,0],[43,130,0],[42,128,0],[42,128,0],[42,128,0],[42,125,0],[42,125,0],[42,125,0],[42,125,0],[41,122,0],[41,122,0],[41,122,0],[41,122,0],[40,120,0],[40,120,0],[40,120,0],[40,120,0],[40,120,0],[39,117,0],[39,117,0],[39,117,0],[39,117,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0],[38,115,0]];function Ce(t,e){let s=[],r=[];for(let e=0;e<t.length-1;e++)s.push({type:"algorithmic",algorithm:"esriHSVAlgorithm",fromColor:t[e].slice(1),toColor:t[e+1].slice(1)}),r.push(t[e+1][0]-t[e][0]);let n=t[t.length-1][0];return e??=r,(0,ge.iv)({type:"multipart",colorRamps:s},{numColors:n,weights:e})}let be=class extends x{constructor(){super(...arguments),this.functionName="Colormap",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){let t=this.sourceRasterInfos[0];if(t.bandCount>1)return{success:!1,supportsGPU:!1,error:"colormap-function: source data must be single band"};let{colormap:e,colormapName:s,colorRamp:r,colorRampName:n}=this.functionArguments;if(!e?.length)if(r)this.colorRamp=r,e=(0,ge.R8)(r,{interpolateAlpha:!0});else if(n){let t=(0,ge.M5)(n);t&&(e=(0,ge.R8)(t),this.colorRamp=(0,fe.r)(t))}else s&&(e=function(t){let e;switch(t){case"elevation":e=Ce([[0,0,191,191],[51,0,0,255],[102,255,0,255],[153,255,0,127],[204,191,63,127],[256,20,20,20]]);break;case"gray":e=(0,ge.iv)({type:"algorithmic",algorithm:"esriHSVAlgorithm",fromColor:[0,0,0],toColor:[255,255,255]});break;case"hillshade":e=Ce([[0,38,41,54],[69,79,82,90],[131,156,156,156],[256,253,253,241]],[.268,.238,.495]);break;case"ndvi":e=ve;break;case"ndvi2":e=function(){let t=Ce([[0,255,255,255],[70,0,255,0],[80,205,173,193],[100,150,150,150],[110,120,51,100],[130,120,100,200],[140,28,3,144],[160,6,0,55],[180,10,25,30],[201,6,7,27]]);for(let e=t.length;e<256;e++)t.push([6,27,7]);return t}();break;case"ndvi3":e=Ae;break;case"random":e=function(){let t=[];for(let e=0;e<256;e++){let e=[];for(let t=0;t<3;t++)e.push(Math.round(255*Math.random()));t.push(e)}return t}()}return e?(e=e.map((t,e)=>[e,...t]),e):null}(s));if(!e?.length)return{success:!1,supportsGPU:!1,error:"colormap-function: missing colormap argument"};let i=this._getOutputPixelType(t.pixelType);this.outputPixelType=i.startsWith("f")?"s32":i;let o=t.clone();return o.pixelType=this.outputPixelType,o.colormap=e,o.bandCount=1,this.rasterInfo=o,{success:!0,supportsGPU:!0}}_processPixels(t){let e=t.pixelBlocks?.[0];return!e||(0,l.zw)(e.pixelType)||(e=e.clone(),e.clamp(this.outputPixelType)),e}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],be.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:xe,json:{write:!0,name:"rasterFunctionArguments"}})],be.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],be.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)()],be.prototype,"isNoopProcess",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],be.prototype,"indexedColormap",void 0),(0,o.Cg)([(0,a.MZ)()],be.prototype,"colorRamp",void 0),be=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ColormapFunction")],be);const Me=be;var Pe;let Te=Pe=class extends c{clone(){return new Pe({raster:this.raster})}};Te=Pe=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ColormapToRGBFunctionArguments")],Te);const Ne=Te;var Ie=s(4151),Re=s(88178);let Fe=class extends x{constructor(){super(...arguments),this.functionName="ColormapToRGB",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){let t=this.sourceRasterInfos[0];if(t.bandCount>1||!t.colormap?.length)return{success:!1,supportsGPU:!1,error:"colormap-to-rgb-function: source data must be single band with a colormap"};let e=t.clone();e.pixelType=this.outputPixelType=this._getOutputPixelType("u8"),this._removeStatsHistColormapVAT(e),e.bandCount=3,e.statistics=[{min:0,max:255,avg:100,stddev:20},{min:0,max:255,avg:100,stddev:20},{min:0,max:255,avg:100,stddev:20}],this.rasterInfo=e;let s=[...t.colormap].sort((t,e)=>t[0]-e[0]),{indexedColormap:r,offset:n}=(0,Kt.zg)({colormap:s});return r?(this.lookup={indexedColormap:r,offset:n},{success:!0,supportsGPU:(0,Re.WN)(r)}):{success:!1,supportsGPU:!1,error:"colormap-to-rgb-function: the colormap is not supported"}}_processPixels(t){let e=t.pixelBlocks?.[0];if(!e||!this.lookup)return e;e=e.clone();let s=e.pixels[0],r=e.mask??new Uint8Array(s.length).fill(255),n=new Uint8Array(s.length),i=new Uint8Array(s.length),o=new Uint8Array(s.length),{indexedColormap:a,offset:l}=this.lookup,u=a.length;for(let t=0;t<s.length;t++)if(r[t]){let e=4*(s[t]-l);e<0||e>u-4?r[t]=0:(n[t]=a[e++],i[t]=a[e++],o[t]=a[e++])}return e.pixels=[n,i,o],e.statistics=[new Ie.A(0,255),new Ie.A(0,255),new Ie.A(0,255)],e.pixelType=this.outputPixelType,e}_getWebGLParameters(){return this.lookup}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Fe.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Ne,json:{write:!0,name:"rasterFunctionArguments"}})],Fe.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Fe.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Fe.prototype,"lookup",void 0),Fe=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ColormapToRGBFunction")],Fe);const _e=Fe;var ke,Se=s(43937);let Be=ke=class extends c{constructor(){super(...arguments),this.rasters=[]}writeRasters(t,e){e.rasters=t.map(t=>"number"==typeof t||"string"==typeof t?t:t.toJSON())}clone(){return new ke({rasters:(0,i.o8)(this.rasters)})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Be.prototype,"rasters",void 0),(0,o.Cg)([(0,Se.K)("rasters")],Be.prototype,"writeRasters",null),Be=ke=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.CompositeBandFunctionArguments")],Be);const je=Be;let Ze=class extends x{constructor(){super(...arguments),this.functionName="CompositeBand",this.functionArguments=null,this.rasterArgumentNames=["rasters"]}_bindSourceRasters(){let{sourceRasterInfos:t}=this,e=t[0];this.outputPixelType=this._getOutputPixelType(e.pixelType);let s=e.clone();if(s.attributeTable=null,s.colormap=null,s.pixelType=this.outputPixelType,s.bandCount=t.map(({bandCount:t})=>t).reduce((t,e)=>t+e),t.every(({statistics:t})=>null!=t&&t.length)){let e=[];t.forEach(({statistics:t})=>null!=t&&e.push(...t)),s.statistics=e}if(t.every(({histograms:t})=>null!=t&&t.length)){let e=[];t.forEach(({histograms:t})=>null!=t&&e.push(...t)),s.histograms=e}s.multidimensionalInfo&&s.multidimensionalInfo.variables.forEach(e=>{let s=t.map(t=>t.multidimensionalInfo?.variables.find(({name:t})=>t===e.name)),r=s.map(t=>t?.statistics?.length?t.statistics:null),n=s.map(t=>t?.histograms?.length?t.histograms:null);e.statistics=r.every(t=>null!=t)?r.flat():null,e.histograms=n.every(t=>null!=t)?n.flat():null}),s.bandCount>1&&(s.colormap=null,s.attributeTable=null);let r=t.every(t=>t.keyProperties.BandProperties?.length)?t.flatMap(t=>t.keyProperties.BandProperties):void 0;return s.keyProperties={...s.keyProperties,BandProperties:r},this.rasterInfo=s,{success:!0,supportsGPU:s.bandCount<=3}}_processPixels(t){let{pixelBlocks:e}=t;return e&&null!=e?.[0]?(0,Kt.Wy)(e):null}_getWebGLParameters(){return{bandCount:this.rasterInfo.bandCount}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Ze.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:je,json:{write:!0,name:"rasterFunctionArguments"}})],Ze.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Ze.prototype,"rasterArgumentNames",void 0),Ze=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.CompositeBandFunction")],Ze);const ze=Ze,Ge=new Dt.J({0:"difference",1:"relative-difference",2:"categorical",3:"euclidean-distance",4:"angle-difference",5:"band-with-most-change"},{useNumericKeys:!0}),Oe=new Dt.J({0:"all",1:"changed",2:"unchanged"},{useNumericKeys:!0});var De;let Ee=De=class extends c{constructor(){super(...arguments),this.method="difference",this.keepMethod="all",this.raster2=void 0}get rasters(){return[this.raster,this.raster2]}clone(){return new De({raster:this.raster,raster2:this.raster2,method:this.method,keepMethod:this.keepMethod})}};(0,o.Cg)([(0,Qt.e)(Ge)],Ee.prototype,"method",void 0),(0,o.Cg)([(0,Qt.e)(Oe)],Ee.prototype,"keepMethod",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Ee.prototype,"raster2",void 0),(0,o.Cg)([(0,a.MZ)({readOnly:!0})],Ee.prototype,"rasters",null),Ee=De=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ComputeChangeFunctionArguments")],Ee);const Ve=Ee;var Ue=s(20437);let Le=class extends x{constructor(){super(...arguments),this.functionName="ComputeChange",this.functionArguments=null,this.rasterArgumentNames=["raster","raster2"]}_bindSourceRasters(){let{method:t}=this.functionArguments,e=this.sourceRasterInfos[0].clone();if(this.outputPixelType=this._getOutputPixelType(e.pixelType),e.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(e),"categorical"===t){let t=this.sourceRasterInfos.map(t=>t.attributeTable),s=this._getFieldNames(t,"value"),r=t.map(t=>this._getClassFieldName(t));if(null==s[0]||null==s[1]||null==r[0]||null==r[1])return{success:!1,supportsGPU:!1,error:"both inputs must have proper attribute table with value and class fields"};this._updateAttributeTable(e,s,r)}return e.bandCount=1,this.rasterInfo=e,{success:!0,supportsGPU:"difference"===t||"relative-difference"===t}}_processPixels(t){let{pixelBlocks:e}=t;if(null==e?.[0]||null==e?.[1])return null;let{method:s}=this.functionArguments;return function(t,e,s,r){let[n,i]=t,o=(0,l.zw)(s)&&!(0,l.zw)(n.pixelType)&&!(0,l.zw)(i.pixelType),a=[n.mask,i.mask].filter(t=>t),u=g.A.combineBandMasks(a),p=t.map(t=>t.pixels[0]),{width:c,height:h}=n,m=g.A.createEmptyBand(s,c*h);switch(e){case"difference":case"relative-difference":!function(t){let{bands:[e,s],mask:r,isRelative:n,isRoundingNeeded:i,outBand:o}=t,a=e.length;for(let t=0;t<a;t++)if(!r||r[t]){let r=e[t]-s[t];if(n){let n=Math.max(Math.abs(e[t]),Math.abs(s[t]));r=0===n?0:r/n}o[t]=i?Math.round(r):r}}({bands:p,mask:u,outBand:m,isRoundingNeeded:o,isRelative:"relative-difference"===e});break;case"categorical":!function(t){let{bands:[e,s],categoryIndexLookups:[r,n],classNames:[i,o],mask:a,keepMethod:l,outBand:u}=t,p=e.length,c=i.length,h=o.length,m=c*h,d=m+1,g=m+2;for(let t=0;t<p;t++)if(!a||a[t]){let a=e[t],p=s[t],c=r[a],f=n[p],y=i[c],w=o[f];u[t]=null==c||null==f?m:"changed"===l&&y===w?d:"unchanged"===l&&y!==w?g:c*h+f}}({bands:p,mask:u,outBand:m,...r});break;case"euclidean-distance":!function(t){let{pixels:[e,s],mask:r,outBand:n}=t,i=e[0].length,o=e.length;for(let t=0;t<i;t++)if(!r||r[t]){let r=0;for(let n=0;n<o;n++){let i=e[n][t]-s[n][t];r+=i*i}n[t]=Math.sqrt(r)}}({pixels:t.map(t=>t.pixels),mask:u,outBand:m});break;case"angle-difference":!function(t){let{pixels:[e,s],mask:r,outBand:n}=t,i=e[0].length,o=e.length;for(let t=0;t<i;t++)if(!r||r[t]){let r=0,i=0,a=0;for(let n=0;n<o;n++){let o=e[n][t],l=s[n][t];r+=o*l,i+=o*o,a+=l*l}let l=Math.sqrt(i*a);n[t]=l?Math.acos(r/l):1.5707963267948966}}({pixels:t.map(t=>t.pixels),mask:u,outBand:m});break;case"band-with-most-change":!function(t){let{pixels:[e,s],mask:r,outBand:n}=t,i=e[0].length,o=e.length;for(let t=0;t<i;t++)if(!r||r[t]){let r=0,i=0;for(let n=0;n<o;n++){let o=Math.abs(e[n][t]-s[n][t]);o>r&&(r=o,i=n)}n[t]=i}}({pixels:t.map(t=>t.pixels),mask:u,outBand:m})}let d=new g.A({width:c,height:h,pixels:[m],pixelType:s,mask:u});return d.updateStatistics(),d}(e,s,this.outputPixelType,this._categoryConfig)}_getWebGLParameters(){let t=this.outputPixelType??"f32",[e,s]=(0,l.hP)(t),r=(0,l.zw)(t);return r&&(e-=1e-4,s+=1e-4),{method:this.functionArguments.method,domainRange:[e,s],isOutputRounded:r}}_updateAttributeTable(t,e,s){let r=this.sourceRasterInfos.map(t=>t.attributeTable),n=r.map((t,s)=>t.features.map(t=>t.attributes[e[s]])),i=r.map((t,e)=>t.features.map(t=>t.attributes[s[e]])),o=n.map(t=>{let e=[];return t.forEach((t,s)=>e[t]=s),e}),{keepMethod:a}=this.functionArguments;this._categoryConfig={categoryIndexLookups:o,classNames:i,keepMethod:a};let l=r[0].clone();l.fields=[new Ue.A({name:"OID",type:"oid"}),new Ue.A({name:"Value",type:"integer"}),new Ue.A({name:"ClassName",type:"string"}),new Ue.A({name:"Class_From",type:"string"}),new Ue.A({name:"Class_To",type:"string"})];let u=this._getFieldNames(r,"red"),p=this._getFieldNames(r,"green"),c=this._getFieldNames(r,"blue"),h=[],m=2===u.length&&2===p.length&&2===c.length;m&&(h.push(...r.map((t,e)=>t.features.map(t=>[t.attributes[u[e]],t.attributes[p[e]],t.attributes[c[e]]]))),l.fields.push(new Ue.A({name:"Red",type:"integer"}),new Ue.A({name:"Green",type:"integer"}),new Ue.A({name:"Blue",type:"integer"})));let d=l.features[0].clone();d.geometry=null;let g=[],[f,y]=n.map(t=>t.length),w=1;for(let t=0;t<f;t++){let e=i[0][t];for(let s=0;s<y;s++){let r=i[1][s];if("changed"===a&&e===r||"unchanged"===a&&e!==r)continue;let n=d.clone();n.attributes={OID:w++,Value:t*y+s,ClassName:e===r?e:`${e} -> ${r}`,Class_From:e,Class_To:r},m&&(n.attributes.Red=h[0][t][0]+h[1][s][0]>>1,n.attributes.Green=h[0][t][1]+h[1][s][1]>>1,n.attributes.Blue=h[0][t][2]+h[1][s][2]>>1),g.push(n)}}if("changed"===a){let t=d.clone();t.attributes={OID:w++,Value:f*y+1,ClassName:"No Change",Class_From:"Same",Class_To:"Same"},g.push(t)}else if("unchanged"===a){let t=d.clone();t.attributes={OID:w++,Value:f*y+2,ClassName:"Changed",Class_From:"Any",Class_To:"Any"},g.push(t)}l.features=g,t.attributeTable=l}_getFieldNames(t,e){return t.map(({fields:t})=>t.find(t=>t.name.toLowerCase()===e)?.name).filter(t=>t)}_getClassFieldName(t){return(t.fields.find(t=>"string"===t.type&&t.name.toLowerCase().startsWith("class"))??t.fields.find(t=>"string"===t.type&&t.name.toLowerCase().includes("class")||t.name.toLowerCase().includes("type")||t.name.toLowerCase().includes("name"))??t.fields.find(t=>"string"===t.type))?.name}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Le.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Ve,json:{write:!0,name:"rasterFunctionArguments"}})],Le.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Le.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Le.prototype,"_categoryConfig",void 0),Le=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ComputeChangeFunction")],Le);const $e=Le;var Ke;let We=Ke=class extends c{constructor(){super(...arguments),this.contrastOffset=0,this.brightnessOffset=0}clone(){return new Ke({contrastOffset:this.contrastOffset,brightnessOffset:this.brightnessOffset,raster:this.raster})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],We.prototype,"contrastOffset",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],We.prototype,"brightnessOffset",void 0),We=Ke=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ContrastBrightnessFunctionArguments")],We);const He=We;var qe=s(51927);let Je=class extends x{constructor(){super(...arguments),this.functionName="ContrastBrightness",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null}_bindSourceRasters(){let{sourceRasterInfos:t}=this,e=t[0];if("u8"!==e.pixelType)return{success:!1,supportsGPU:!1,error:"Only unsigned 8 bit raster is supported by ContrastBrightness function."};this.outputPixelType=this._getOutputPixelType("u8");let s=e.clone();this._removeStatsHistColormapVAT(s),this.rasterInfo=s;let{contrastOffset:r,brightnessOffset:n}=this.functionArguments;return this.lookup=(0,qe.zj)(r,n),{success:!0,supportsGPU:!0}}_processPixels(t){let e=t.pixelBlocks?.[0];return null==e?null:(0,Kt.eH)(e,{lut:e.pixels.map(()=>this.lookup),offset:0,outputPixelType:"u8"})}_getWebGLParameters(){let{contrastOffset:t,brightnessOffset:e}=this.functionArguments;return{contrastOffset:t,brightnessOffset:e}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Je.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:He,json:{write:!0,name:"rasterFunctionArguments"}})],Je.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Je.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Je.prototype,"lookup",void 0),Je=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ContrastBrightnessFunction")],Je);const Xe=Je;function Qe(t,e,s,r,n){let i=Math.floor(r/2);for(let r=0;r<i;r++)for(let i=0;i<e;i++)t[r*e+i]=t[(n-1-r)*e+i],t[(s-1-r)*e+i]=t[(s-n+r)*e+i];let o=Math.floor(n/2);for(let r=0;r<s;r++){let s=r*e;for(let r=0;r<o;r++)t[s+r]=t[s+n-1-r],t[s+e-r-1]=t[s+e+r-n]}}const Ye=new Map;function ts(t,e,s,r,n,i,o){let a=new Float32Array(e*s),l=i.length,u=o?0:r,p=o?r:0,c=o?1:e;for(let o=u;o<s-u;o++){let s=o*e;for(let o=p;o<e-p;o++){if(n&&!n[s+o])continue;let e=0;for(let n=0;n<l;n++)e+=t[s+o+(n-r)*c]*i[n];a[s+o]=e}}return a}function es(t,e,s,r,n,i,o){let a=new Float32Array(e*s),l=Math.floor(r/2),u=Math.floor(n/2);for(let p=l;p<s-l;p++){let s=p*e;for(let p=u;p<e-u;p++){if(i&&!i[s+p])continue;let c=0;for(let i=0;i<r;i++)for(let r=0;r<n;r++)c+=t[s+p+(i-l)*e+r-u]*o[i*n+r];a[s+p]=c}}return a}var ss;Ye.set(v.none,[0,0,0,0,1,0,0,0,0]),Ye.set(v.lineDetectionHorizontal,[-1,-1,-1,2,2,2,-1,-1,-1]),Ye.set(v.lineDetectionVertical,[-1,2,-1,-1,2,-1,-1,2,-1]),Ye.set(v.lineDetectionLeftDiagonal,[2,-1,-1,-1,2,-1,-1,-1,2]),Ye.set(v.lineDetectionRightDiagonal,[-1,-1,2,-1,2,-1,2,-1,-1]),Ye.set(v.gradientNorth,[-1,-2,-1,0,0,0,1,2,1]),Ye.set(v.gradientWest,[-1,0,1,-2,0,2,-1,0,1]),Ye.set(v.gradientEast,[1,0,-1,2,0,-2,1,0,-1]),Ye.set(v.gradientSouth,[1,2,1,0,0,0,-1,-2,-1]),Ye.set(v.gradientNorthEast,[0,-1,-2,1,0,-1,2,1,0]),Ye.set(v.gradientNorthWest,[-2,-1,0,-1,0,1,0,1,2]),Ye.set(v.smoothArithmeticMean,[.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111,.111111111111]),Ye.set(v.smoothing3x3,[.0625,.125,.0625,.125,.25,.125,.0625,.125,.0625]),Ye.set(v.smoothing5x5,[1,1,1,1,1,1,4,4,4,1,1,4,12,4,1,1,4,4,4,1,1,1,1,1,1]),Ye.set(v.sharpening3x3,[-1,-1,-1,-1,9,-1,-1,-1,-1]),Ye.set(v.sharpening5x5,[-1,-3,-4,-3,-1,-3,0,6,0,-3,-4,6,21,6,-4,-3,0,6,0,-3,-1,-3,-4,-3,-1]),Ye.set(v.laplacian3x3,[0,-1,0,-1,4,-1,0,-1,0]),Ye.set(v.laplacian5x5,[0,0,-1,0,0,0,-1,-2,-1,0,-1,-2,17,-2,-1,0,-1,-2,-1,0,0,0,-1,0,0]),Ye.set(v.sobelHorizontal,[-1,-2,-1,0,0,0,1,2,1]),Ye.set(v.sobelVertical,[-1,0,1,-2,0,2,-1,0,1]),Ye.set(v.sharpen,[0,-.25,0,-.25,2,-.25,0,-.25,0]),Ye.set(v.sharpen2,[-.25,-.25,-.25,-.25,3,-.25,-.25,-.25,-.25]),Ye.set(v.pointSpread,[-.627,.352,-.627,.352,2.923,.352,-.627,.352,-.627]);let rs=ss=class extends c{constructor(){super(...arguments),this.rows=3,this.cols=3,this.kernel=[0,0,0,0,1,0,0,0,0]}set convolutionType(t){this._set("convolutionType",t);let e=Ye.get(t);if(!e||t===v.userDefined||t===v.none)return;let s=Math.round(Math.sqrt(e.length));this._set("kernel",e),this._set("cols",s),this._set("rows",s)}clone(){return new ss({cols:this.cols,rows:this.rows,kernel:[...this.kernel],convolutionType:this.convolutionType,raster:(0,i.o8)(this.raster)})}};(0,o.Cg)([(0,a.MZ)({json:{type:Number,write:!0}})],rs.prototype,"rows",void 0),(0,o.Cg)([(0,a.MZ)({json:{type:Number,write:!0,name:"columns"}})],rs.prototype,"cols",void 0),(0,o.Cg)([(0,a.MZ)({json:{name:"type",type:Number,write:!0}})],rs.prototype,"convolutionType",null),(0,o.Cg)([(0,a.MZ)({json:{type:[Number],write:!0}})],rs.prototype,"kernel",void 0),rs=ss=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ConvolutionFunctionArguments")],rs);const ns=rs;let is=class extends x{constructor(){super(...arguments),this.functionName="Convolution",this.rasterArgumentNames=["raster"]}get _normalizedKernel(){let{kernel:t,convolutionType:e}=this.functionArguments,s=t.reduce((t,e)=>t+e);return-1===e||0===s||1===s?t:t.map(t=>t/s)}_bindSourceRasters(){let{convolutionType:t,rows:e,cols:s,kernel:r}=this.functionArguments;if(!Object.values(v).includes(t))return{success:!1,supportsGPU:!1,error:`convolution-function: the specified kernel type is not supported ${t}`};if(t!==v.none&&e*s!==r.length)return{success:!1,supportsGPU:!1,error:"convolution-function: the specified rows and cols do not match the length of the kernel"};let n=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType(n.pixelType);let i=n.clone();i.pixelType=this.outputPixelType;let o=[v.none,v.sharpen,v.sharpen2,v.sharpening3x3,v.sharpening5x5];return(-1===t||"u8"!==this.outputPixelType&&!o.includes(t))&&(i.statistics=null,i.histograms=null),i.colormap=null,i.attributeTable=null,this.rasterInfo=i,{success:!0,supportsGPU:r.length<=25}}_processPixels(t){let e=t.pixelBlocks?.[0];if(null==e||this.functionArguments.convolutionType===v.none)return e;let{rows:s,cols:r}=this.functionArguments,{_normalizedKernel:n}=this;return function(t,e){let s=function(t){let e=Math.sqrt(t.length),s=t.slice(0,e),r=[1];for(let s=1;s<e;s++){let n=null;for(let r=0;r<e;r++){let i=t[r+s*e],o=t[r];if(null==n)if(0===o){if(i)return{separable:!1,row:null,col:null}}else n=i/o;else if(i/o!==n)return{separable:!1,row:null,col:null}}if(null==n)return{separable:!1,row:null,col:null};r.push(n)}return{separable:!0,row:s,col:r}}(e.kernel),r=!1!==e.mirrorEdges,n=s.separable?function(t,e,s,r=!0){let{pixels:n,width:i,height:o,pixelType:a,mask:l}=t,u=n.length,p=[],c=e.length,h=s.length,m=Math.floor(c/2),d=Math.floor(h/2);for(let t=0;t<u;t++){let a=ts(n[t],i,o,m,l,e,!0);a=ts(a,i,o,d,l,s,!1),r&&Qe(a,i,o,c,h),p.push(a)}return new g.A({width:i,height:o,pixelType:a,pixels:p,mask:l})}(t,s.row,s.col,r):function(t,e,s=!0){let{pixels:r,width:n,height:i,pixelType:o,mask:a}=t,l=r.length,u=[],{kernel:p,rows:c,cols:h}=e;for(let t=0;t<l;t++){let e=es(r[t],n,i,c,h,a,p);s&&Qe(e,n,i,c,h),u.push(e)}return new g.A({width:n,height:i,pixelType:o,pixels:u,mask:a})}(t,e,r),{outputPixelType:i}=e;return i&&n.clamp(i),n}(e,{kernel:n,rows:s,cols:r,outputPixelType:this.outputPixelType})}_getWebGLParameters(){let t=new Float32Array(25),{rows:e,cols:s}=this.functionArguments,{_normalizedKernel:r}=this;for(let n=0;n<e;n++)for(let e=0;e<s;e++)t[5*n+e]=r[n*s+e];return{kernelRows:e,kernelCols:s,kernel:t,clampRange:(0,l.hP)(this.outputPixelType)}}_getNeighborhoodSize(){let{rows:t,cols:e}=this.functionArguments;return{rows:t,cols:e}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],is.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:ns,json:{write:!0,name:"rasterFunctionArguments"}})],is.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],is.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)()],is.prototype,"_normalizedKernel",null),is=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ConvolutionFunction")],is);const os=is;var as;const ls=new Dt.J({0:"standard",1:"planform",2:"profile"},{useNumericKeys:!0});let us=as=class extends c{constructor(){super(...arguments),this.curvatureType="standard",this.zFactor=1}readCurvatureType(t,e){return ls.fromJSON(e.type??e.curvatureType??0)}clone(){return new as({curvatureType:this.curvatureType,zFactor:this.zFactor,raster:this.raster})}};(0,o.Cg)([(0,a.MZ)({json:{write:{target:"type"}}}),(0,Qt.e)(ls)],us.prototype,"curvatureType",void 0),(0,o.Cg)([(0,ye.w)("curvatureType",["type","curvatureType"])],us.prototype,"readCurvatureType",null),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],us.prototype,"zFactor",void 0),us=as=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.CurvatureFunctionArguments")],us);const ps=us;let cs=class extends x{constructor(){super(...arguments),this.functionName="Curvature",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){this.outputPixelType=this._getOutputPixelType("f32");let t=this.sourceRasterInfos[0].clone();return t.pixelType=this.outputPixelType,t.bandCount=1,this._removeStatsHistColormapVAT(t),this.rasterInfo=t,this.isGCS=t.spatialReference?.isGeographic??!1,{success:!0,supportsGPU:!0}}_processPixels(t){let e=t.pixelBlocks?.[0];if(null==e)return null;let{zFactor:s,curvatureType:r}=this.functionArguments,{extent:n,primaryPixelSizes:i}=t,o=i?.[0]??(n?{x:n.width/e.width,y:n.height/e.height}:{x:1,y:1}),a=this.isGCS&&s>=1?s*zt.rk:s;return(0,zt.E0)(e,{zFactor:a,curvatureType:r,resolution:o})}_getWebGLParameters(){let{zFactor:t,curvatureType:e}=this.functionArguments;return{curvatureType:e,zFactor:this.isGCS&&t>=1?t*zt.rk:t}}_getNeighborhoodSize(){return{rows:3,cols:3}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],cs.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:ps,json:{write:!0,name:"rasterFunctionArguments"}})],cs.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],cs.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],cs.prototype,"isGCS",void 0),cs=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.CurvatureFunction")],cs);const hs=cs;var ms;let ds=ms=class extends c{constructor(){super(...arguments),this.bandIds=[],this.bandNames=[],this.bandWavelengths=[],this.missingBandAction=0}clone(){return new ms({bandIds:this.bandIds?.slice(),bandNames:this.bandNames?.slice(),bandWavelengths:this.bandWavelengths?.slice(),missingBandAction:this.missingBandAction,method:this.method,wavelengthMatchTolerance:this.wavelengthMatchTolerance})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],ds.prototype,"bandIds",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],ds.prototype,"bandNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],ds.prototype,"bandWavelengths",void 0),(0,o.Cg)([(0,Qt.e)({0:"name",1:"wavelength",2:"id"})],ds.prototype,"method",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],ds.prototype,"missingBandAction",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],ds.prototype,"wavelengthMatchTolerance",void 0),ds=ms=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ExtractBandFunctionArguments")],ds);const gs=ds;let fs=class extends x{constructor(){super(...arguments),this.functionName="ExtractBand",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){let{functionArguments:t,sourceRasterInfos:e}=this,s=e[0],{method:r,bandNames:n,bandWavelengths:i,bandIds:o,missingBandAction:a}=t,l=n?.length&&("name"===r||"id"!==r&&!o?.length),u=i?.length&&("wavelength"===r||"id"!==r&&!o?.length),p=1===a,c=l?function(t,e){let s=t.bandInfos.map(({name:t})=>t.toLowerCase()),r=[];for(let t=0;t<e.length;t++){let n=e[t].toLowerCase(),i=s.indexOf(n);if(-1===i&&"nearinfrared"===n&&(i=s.findIndex(t=>t.startsWith("nearinfrared_1")),-1===i&&(i=s.findIndex(t=>t.startsWith("nearinfrared")))),-1===i)return null;r.push(i)}return r}(s,n):u?function(t,e,{wavelengthMatchTolerance:s},r){let{bandInfos:n}=t,i=[];for(let t=0;t<n.length;t++){let{minWavelength:e,maxWavelength:s}=n[t];if(!e||!s)return null;i.push({minWavelength:e,maxWavelength:s})}let o=[];for(let t=0;t<e.length;t++){let n=e[t],a=!1,l=-1,u=Number.MAX_VALUE;for(let t=0;t<i.length;t++){let e=i[t],s=n>=e.minWavelength&&n<=e.maxWavelength,r=Math.abs(n-(e.minWavelength+e.maxWavelength)/2);s?r<u&&(a=!0,l=t,u=r):!a&&r<u&&(l=t,u=r)}if(!a&&s&&u<s&&(a=!0),!a&&r)return null;o.push(l)}return o}(s,i,this.functionArguments,p):function(t,e,s){let{bandCount:r}=t;return!e?.length||s&&e.some(t=>t<0||t>=r)?null:e}(s,o,p);if(null==c)return{success:!1,supportsGPU:!1,error:`extract-band-function: Invalid ${l?"band names":u?"band wavelengths":"band ids"} for the imagery data source`};this.functionArguments.bandIds=c,this.functionArguments.method="id",this.outputPixelType=this._getOutputPixelType(s.pixelType);let h=s.clone();h.pixelType=this.outputPixelType,h.bandCount=c.length;let{statistics:m,histograms:d}=h;null!=m&&m.length&&(h.statistics=c.map(t=>m[t]||m[m.length-1])),null!=d&&d.length&&(h.histograms=c.map(t=>d[t]||d[d.length-1])),h.multidimensionalInfo&&h.multidimensionalInfo.variables.forEach(t=>{let{statistics:e,histograms:s}=t;null!=e&&e.length&&(t.statistics=c.map(t=>e[t]||e[e.length-1])),null!=s&&s.length&&(t.histograms=c.map(t=>s[t]||s[s.length-1]))});let g=h.keyProperties?.BandProperties;return g?.length&&(g=c.map(t=>t>=g.length?g[g.length-1]:g[t]),h.keyProperties={...h.keyProperties,BandProperties:g}),this.rasterInfo=h,{success:!0,supportsGPU:h.bandCount<=3}}_processPixels(t){let e=t.pixelBlocks?.[0];if(null==e)return null;let{bandIds:s}=this.functionArguments;if(this.rasterInfo.storageInfo.isBsqTile){let{rawInputBandIds:t}=this;s=s.map(e=>t.indexOf(e))}else{let t=e.pixels.length;s=s.map(e=>e>=t?t-1:e)}return e.extractBands(s)}_getWebGLParameters(){let t;if(this.isInputBandIdsSwizzled)t=this.swizzledBandSelection.length?this.swizzledBandSelection:[0,1,2];else{t=[...this.functionArguments.bandIds],0===t.length?t=[0,1,2]:t.length<3&&(t[1]=t[1]??t[0],t[2]=t[2]??t[1]);for(let e=0;e<3;e++)t[e]=Math.min(t[e],2)}return{bandIndexMat3:qt(t)}}_getInputBandIds(t){let e=t.length;return this.functionArguments.bandIds.map(t=>t>=e?e-1:t).map(e=>t[e])}_swizzleBandIds(t){let e=this.functionArguments.bandIds.map(e=>t.indexOf(e));return this.isInputBandIdsSwizzled=!0,e[1]??=e[0],e[2]??=e[1],this.swizzledBandSelection=e,!1}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],fs.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:gs,json:{write:!0,name:"rasterFunctionArguments"}})],fs.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],fs.prototype,"rasterArgumentNames",void 0),fs=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ExtractBandFunction")],fs);const ys=fs;function ws(t,e,s,r){let{pixels:n,width:i,height:o}=t,a=n.length,u=s.startsWith("f"),p=!u,[c,h]=(0,l.hP)(s),m=i*o,d=g.A.createEmptyBand(s,m);for(let t=0;t<o;t++){let s=t*i;for(let t=0;t<i;t++,s++)if(!r||r[s]){let t=0;for(let r=0;r<a;r++)t+=e[r]*n[r][s];u||(t=Math.round(t),p&&(t=t>h?h:t<c?c:t)),d[s]=t}}return d}var xs;let vs=xs=class extends c{clone(){return new xs({conversionParameters:[...this.conversionParameters],raster:this.raster})}};(0,o.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],vs.prototype,"conversionParameters",void 0),vs=xs=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.GrayscaleFunctionArguments")],vs);const As=vs;let Cs=class extends x{constructor(){super(...arguments),this.functionName="Grayscale",this.functionArguments=null,this.rasterArgumentNames=["raster"]}get _normalizedWeights(){let{conversionParameters:t}=this.functionArguments,e=t.reduce((t,e)=>t+e);return t.map(t=>t/e)}_bindSourceRasters(){let{conversionParameters:t}=this.functionArguments;if(!t?.length)return{success:!1,supportsGPU:!1,error:"missing valid conversion parameters."};let e=this.sourceRasterInfos[0].clone();this.outputPixelType=this._getOutputPixelType(e.pixelType),e.pixelType=this.outputPixelType;let s=3===t.length||3===e.bandCount&&t.length>3;return e.bandCount=1,this._removeStatsHistColormapVAT(e),this.rasterInfo=e,{success:!0,supportsGPU:s}}_processPixels(t){let e=t.pixelBlocks?.[0];return null==e?null:function(t,e,s){let{width:r,height:n,mask:i,bandMasks:o}=t,a=o?.length?g.A.combineBandMasks(o):i,l=ws(t,e,s,a),u=new g.A({width:r,height:n,pixels:[l],pixelType:s,mask:a});return u.updateStatistics(),u}(e,this._normalizedWeights,this.outputPixelType)}_getWebGLParameters(){return{weights:this._normalizedWeights}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Cs.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:As,json:{write:!0,name:"rasterFunctionArguments"}})],Cs.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Cs.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)()],Cs.prototype,"_normalizedWeights",null),Cs=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.GrayscaleFunction")],Cs);const bs=Cs;var Ms;const Ps=new Dt.J({0:"traditional",1:"multi-directional"},{useNumericKeys:!0}),Ts=new Dt.J({1:"degree",2:"percent-rise",3:"scaled"},{useNumericKeys:!0});let Ns=Ms=class extends c{constructor(){super(...arguments),this.altitude=45,this.azimuth=315,this.hillshadeType="traditional",this.pixelSizePower=.664,this.pixelSizeFactor=.024,this.slopeType="degree",this.zFactor=1,this.removeEdgeEffect=!1}clone(){return new Ms({hillshadeType:this.hillshadeType,altitude:this.altitude,azimuth:this.azimuth,zFactor:this.zFactor,slopeType:this.slopeType,pixelSizeFactor:this.pixelSizeFactor,pixelSizePower:this.pixelSizePower,removeEdgeEffect:this.removeEdgeEffect,raster:this.raster})}};(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Ns.prototype,"altitude",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Ns.prototype,"azimuth",void 0),(0,o.Cg)([(0,a.MZ)(),(0,Qt.e)(Ps)],Ns.prototype,"hillshadeType",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0,name:"psPower"}})],Ns.prototype,"pixelSizePower",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0,name:"psZFactor"}})],Ns.prototype,"pixelSizeFactor",void 0),(0,o.Cg)([(0,a.MZ)(),(0,Qt.e)(Ts)],Ns.prototype,"slopeType",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],Ns.prototype,"zFactor",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],Ns.prototype,"removeEdgeEffect",void 0),Ns=Ms=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.HillshadeFunctionArguments")],Ns);const Is=Ns;let Rs=class extends x{constructor(){super(...arguments),this.functionName="Hillshade",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){let t=this.sourceRasterInfos[0];if(t.bandCount>1)return{success:!1,supportsGPU:!1,error:"hillshade-function: source data must be single band"};this.outputPixelType=this._getOutputPixelType("u8");let e=t.clone();return this._removeStatsHistColormapVAT(e),e.pixelType=this.outputPixelType,e.bandCount=1,e.statistics=[{min:0,max:255,avg:60,stddev:10}],this.rasterInfo=e,this.isGCS=e.spatialReference?.isGeographic??!1,{success:!0,supportsGPU:!0}}_processPixels(t){let e=t.pixelBlocks?.[0];if(!e)return null;let{extent:s,primaryPixelSizes:r}=t,n=r?.[0]??(s?{x:s.width/e.width,y:s.height/e.height}:{x:1,y:1}),i=(0,zt.PP)(this.functionArguments,n,this.isGCS),o=(0,zt.fw)(e,i);return o.pixelType=this.outputPixelType,o}_getWebGLParameters(){let t=(0,zt.PP)(this.functionArguments,{x:1,y:1},this.isGCS),e=(0,zt.ng)(t),{slopeType:s,zFactor:r,pixelSizeFactor:n,pixelSizePower:i}=this.functionArguments,o="scaled"===s,a=(0,l.zw)(this.outputPixelType);return{...e,zFactor:r,gcsFactor:this.isGCS?zt.rk:1,pixelSizeFactor:o?n:0,pixelSizePower:o?i:0,isOutputRounded:a}}_getNeighborhoodSize(){return{rows:3,cols:3}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Rs.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Is,json:{write:!0,name:"rasterFunctionArguments"}})],Rs.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Rs.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Rs.prototype,"isGCS",void 0),Rs=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.HillshadeFunction")],Rs);const Fs=Rs;var _s;let ks=_s=class extends c{constructor(){super(...arguments),this.rasters=[],this.processAsMultiband=!0}writeRasters(t,e){e.rasters=t.map(t=>"number"==typeof t||"string"==typeof t?t:t.toJSON())}clone(){return new _s({operation:this.operation,processAsMultiband:this.processAsMultiband,rasters:(0,i.o8)(this.rasters)})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],ks.prototype,"operation",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],ks.prototype,"rasters",void 0),(0,o.Cg)([(0,Se.K)("rasters")],ks.prototype,"writeRasters",null),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],ks.prototype,"processAsMultiband",void 0),ks=_s=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.LocalFunctionArguments")],ks);const Ss=ks;let Bs=class extends x{constructor(){super(...arguments),this.functionName="Local",this.functionArguments=null,this.rasterArgumentNames=["rasters"]}_bindSourceRasters(){let{sourceRasterInfos:t}=this,e=t[0],{bandCount:s}=e,{processAsMultiband:r}=this.functionArguments;if(t.some(t=>t.bandCount!==s))return{success:!1,supportsGPU:!1,error:"local-function: input rasters do not have same band count"};let{operation:n,rasters:i}=this.functionArguments,o=N[n];if(!(999===o||i.length===o||i.length<=1&&1===o))return{success:!1,supportsGPU:!1,error:`local-function: the length of functionArguments.rasters does not match operation's requirement: ${o}`};let a=e.clone();return a.bandCount=999!==o||r?s:1,this._removeStatsHistColormapVAT(a),this._updateStatistics(a),this._updatePixelType(a),this.rasterInfo=a,{success:!0,supportsGPU:1===a.bandCount&&o<=3}}_processPixels(t){let{pixelBlocks:e}=t;return null==e||e.some(t=>null==t)?null:_t(e,this.functionArguments.operation,{processAsMultiband:this.functionArguments.processAsMultiband,outputPixelType:this.outputPixelType??void 0})}_getWebGLParameters(){let{operation:t}=this.functionArguments,e=N[t],s=Object.keys(M).find(e=>M[e]===t)?.toLowerCase()??"undefined",r=this.outputPixelType??"f32",[n,i]=(0,l.hP)(r),o=(0,l.zw)(r);return o&&(n-=1e-4,i+=1e-4),{imageCount:e,operationName:s,domainRange:[n,i],isOutputRounded:o}}_updateStatistics(t){let e=this.sourceRasterInfos[0],{operation:s}=this.functionArguments,r=T(s)?.domain;if(r){t.statistics=[];for(let e=0;e<t.bandCount;e++)t.statistics[e]={min:r[0],max:r[1],avg:(r[0]+r[1])/2,stddev:(r[0]+r[1])/10}}else 45===s&&e.statistics?.length&&(t.statistics=e.statistics.map(t=>({min:-t.max,max:-t.min,avg:null==t.avg?void 0:-t.avg,stddev:null==t.stddev?void 0:-t.stddev})))}_updatePixelType(t){let{statistics:e,pixelType:s}=this.sourceRasterInfos[0],{operation:r}=this.functionArguments,{domain:n,isInteger:i}=T(r)??{domain:null,isInteger:!1},o="f32";if(n&&i)o=(0,l.X1)(n[0],n[1]);else if(30===r){let t=e?.[0];o=t?(0,l.X1)(t.min,t.max):(0,l.zw)(s)?s:"s32"}else if(45===r&&(0,l.zw)(s)){let t=e?.map(({max:t})=>-t),r=e?.map(({min:t})=>-t),n=t?.length?Math.min(...t):null,i=r?.length?Math.min(...r):null;o=null!=n&&null!=i?(0,l.X1)(n,i):s.startsWith("s")?s.replace("s","u"):"u1"===s||"u2"===s||"u4"===s?"s8":"u8"===s?"s16":"s32"}t.pixelType=this.outputPixelType=this._getOutputPixelType(o)}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Bs.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Ss,json:{write:!0,name:"rasterFunctionArguments"}})],Bs.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Bs.prototype,"rasterArgumentNames",void 0),Bs=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.LocalFunction")],Bs);const js=Bs;var Zs,zs=s(34727);let Gs=Zs=class extends c{constructor(){super(...arguments),this.includedRanges=null,this.noDataValues=null,this.noDataInterpretation=0}get normalizedNoDataValues(){let{noDataValues:t}=this;if(!t?.length)return null;let e=!1,s=t.map(t=>{if("number"==typeof t)return e=!0,[t];if("string"==typeof t){let s=t.trim().split(" ").filter(t=>""!==t.trim()).map(t=>Number(t));return e||=s.length>0,0===s.length?null:s}return null});return e?s:null}clone(){return new Zs({includedRanges:this.includedRanges?.slice()??[],noDataValues:this.noDataValues?.slice()??[],noDataInterpretation:this.noDataInterpretation})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Gs.prototype,"includedRanges",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Gs.prototype,"noDataValues",void 0),(0,o.Cg)([(0,a.MZ)()],Gs.prototype,"normalizedNoDataValues",null),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Gs.prototype,"noDataInterpretation",void 0),Gs=Zs=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.MaskFunctionArguments")],Gs);const Os=Gs;let Ds=class extends x{constructor(){super(...arguments),this.functionName="Mask",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){let t=this.sourceRasterInfos[0].clone(),{pixelType:e}=t;this.outputPixelType=this._getOutputPixelType(e),t.pixelType=this.outputPixelType,this.rasterInfo=t;let{includedRanges:s,normalizedNoDataValues:r}=this.functionArguments;if(!s?.length&&!r?.length)return{success:!1,supportsGPU:!1,error:"missing includedRanges or noDataValues argument"};let n=[];for(let i=0;i<t.bandCount;i++){let t=(0,Kt.Wt)(e,s?.slice(2*i,2*i+2),r?.[i]);if(null==t){n=null;break}n.push(t)}this.lookups=n;let i=null!=r&&r.every(t=>t?.length===r[0]?.length);return{success:!0,supportsGPU:(!s||s.length<=18)&&(!r||i&&r[0].length<=9)}}_processPixels(t){let e=t.pixelBlocks?.[0];if(null==e)return null;let{outputPixelType:s,lookups:r}=this,{includedRanges:n,noDataInterpretation:i,normalizedNoDataValues:o}=this.functionArguments;return(0,Kt.dK)(e,{includedRanges:n,noDataValues:o,outputPixelType:s,matchAll:1===i,lookups:r})}_getWebGLParameters(){let{includedRanges:t,normalizedNoDataValues:e}=this.functionArguments,s=new Float32Array(9);s.fill(zs.pq),e?.[0]?.length&&s.set(e[0]);let r=new Float32Array(6);for(let e=0;e<r.length;e+=2)r[e]=t?.[e]??-zs.pq,r[e+1]=t?.[e+1]??zs.pq;return t?.length&&r.set(t),{bandCount:this.sourceRasterInfos[0].bandCount,noDataValues:s,includedRanges:r}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Ds.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Os,json:{write:!0,name:"rasterFunctionArguments"}})],Ds.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Ds.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Ds.prototype,"lookups",void 0),Ds=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.MaskFunction")],Ds);const Es=Ds;var Vs;let Us=Vs=class extends c{constructor(){super(...arguments),this.visibleBandID=0,this.infraredBandID=1,this.scientificOutput=!1}clone(){let{visibleBandID:t,infraredBandID:e,scientificOutput:s}=this;return new Vs({visibleBandID:t,infraredBandID:e,scientificOutput:s})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Us.prototype,"visibleBandID",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Us.prototype,"infraredBandID",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Us.prototype,"scientificOutput",void 0),Us=Vs=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.NDVIFunctionArguments")],Us);const Ls=Us;let $s=class extends x{constructor(){super(...arguments),this.functionName="NDVI",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){let{scientificOutput:t,visibleBandID:e,infraredBandID:s}=this.functionArguments;this.outputPixelType=this._getOutputPixelType(t?"f32":"u8");let r=this.sourceRasterInfos[0],n=Math.max(e,s);if(r.bandCount<2||n>=r.bandCount)return{success:!1,supportsGPU:!1,error:"ndvi-function: source raster has insufficient amount of raster bands"};if(e<0||s<0)return{success:!1,supportsGPU:!1,error:"ndvi-function: invalid visible or infrared band id"};let i=r.clone();i.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(i),i.bandCount=1,i.keyProperties={...i.keyProperties,BandProperties:void 0};let[o,a,l,u]=t?[-1,1,0,.1]:[0,200,100,10];return i.statistics=[{min:o,max:a,avg:l,stddev:u}],this.rasterInfo=i,{success:!0,supportsGPU:!0}}_processPixels(t){let e=t.pixelBlocks?.[0];if(null==e)return null;let{visibleBandID:s,infraredBandID:r,scientificOutput:n}=this.functionArguments;if(this.rasterInfo.storageInfo.isBsqTile){let{rawInputBandIds:t}=this;r=t.indexOf(r),s=t.indexOf(s)}return function(t,e,s,r){let{mask:n,pixels:i,width:o,height:a}=t,l=i[s],u=i[e],p=u.length,c=r?new Uint8Array(p):new Float32Array(p),h=r?100:1,m=r?100.5:0;for(let t=0;t<p;t++)if(null==n||n[t]){let e=l[t],s=u[t],r=e+s;r&&(c[t]=(e-s)/r*h+m)}let d=new g.A({width:o,height:a,mask:n,pixelType:r?"u8":"f32",pixels:[c]});return d.updateStatistics(),d}(e,s,r,!n)}_getWebGLParameters(){let{visibleBandID:t,infraredBandID:e,scientificOutput:s}=this.functionArguments;return{bandIndexMat3:qt(this.isInputBandIdsSwizzled?[0,1,2]:[e,t,0]),scaled:!s}}_getInputBandIds(t){let{visibleBandID:e,infraredBandID:s}=this.functionArguments;return[s,e,0].map(e=>t[e])}_swizzleBandIds(t){let{visibleBandID:e,infraredBandID:s}=this.functionArguments,r=[e,s].map(e=>t.indexOf(e));return r[2]=r[1],this.isInputBandIdsSwizzled=!0,this.swizzledBandSelection=r,!1}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],$s.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Ls,json:{write:!0,name:"rasterFunctionArguments"}})],$s.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],$s.prototype,"rasterArgumentNames",void 0),$s=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.NDVIFunction")],$s);const Ks=$s;var Ws;let Hs=Ws=class extends c{constructor(){super(...arguments),this.inputRanges=null,this.outputValues=null,this.noDataRanges=null,this.allowUnmatched=!1,this.isLastInputRangeInclusive=!1}clone(){return new Ws({inputRanges:[...this.inputRanges],outputValues:[...this.outputValues],noDataRanges:[...this.noDataRanges],allowUnmatched:this.allowUnmatched,isLastInputRangeInclusive:this.isLastInputRangeInclusive})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Hs.prototype,"inputRanges",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Hs.prototype,"outputValues",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Hs.prototype,"noDataRanges",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Hs.prototype,"allowUnmatched",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Hs.prototype,"replacementValue",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Hs.prototype,"isLastInputRangeInclusive",void 0),Hs=Ws=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.RemapFunctionArguments")],Hs);const qs=Hs;let Js=class extends x{constructor(){super(...arguments),this.functionName="Remap",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null}_bindSourceRasters(){let t=this.sourceRasterInfos[0].clone(),{pixelType:e}=t;t.bandCount=1;let{statistics:s}=t;this._removeStatsHistColormapVAT(t);let{allowUnmatched:r,replacementValue:n,outputValues:i,inputRanges:o,noDataRanges:a,isLastInputRangeInclusive:u}=this.functionArguments,p="unknown"===this.outputPixelType||null==this.outputPixelType;if(this.outputPixelType=this._getOutputPixelType(e),i?.length){let o=s?.[0];if(r&&null==n){let e=o?.min??i[0],s=o?.max??i[0];e=Math.min.apply(null,[...i,e]),s=Math.max.apply(null,[...i,s]),t.statistics=[{min:e,max:s,avg:o?.avg??0,stddev:o?.stddev??-1}]}else{let e=i[0],s=e;for(let t=0;t<i.length;t++)e=e>i[t]?i[t]:e,s=s>i[t]?s:i[t];r&&null!=n&&(e=Math.min(e,n),s=Math.max(s,n)),t.statistics=[{min:e,max:s,avg:o?.avg??0,stddev:o?.stddev??-1}]}if(p){let{min:s,max:o}=t.statistics[0],a=["u8","s8","u16","s16","u32","s32","f32"],u=a.find(t=>{let[e,r]=(0,l.hP)(t);return s>=e&&o<=r})??"f64";this.outputPixelType=i.some(t=>Math.floor(t)!==t)?"f64"===u?"f64":"f32":r&&null==n&&a.indexOf(e)>a.indexOf(u)?e:u}}return t.pixelType=this.outputPixelType,this.rasterInfo=t,this.lookup=r?null:(0,Kt.XU)({srcPixelType:e,inputRanges:o,outputValues:i,noDataRanges:a,allowUnmatched:r,isLastInputRangeInclusive:u,outputPixelType:this.outputPixelType}),{success:!0,supportsGPU:(!i||i.length<=9)&&(!a||a.length<=9)}}_processPixels(t){let e=t.pixelBlocks?.[0];if(null==e)return null;let{lookup:s,outputPixelType:r}=this;if(s){let t=(0,Kt.eH)(e,{lut:[s.lut],offset:s.offset,outputPixelType:r});return null!=t&&s.mask&&(t.mask=(0,Kt.UK)(e.pixels[0],e.mask,s.mask,s.offset,"u8")),t}let{inputRanges:n,outputValues:i,noDataRanges:o,allowUnmatched:a,isLastInputRangeInclusive:l,replacementValue:u}=this.functionArguments;return(0,Kt.Ew)(e,{inputRanges:n,outputValues:i,noDataRanges:o,outputPixelType:r,allowUnmatched:a,isLastInputRangeInclusive:l,replacementValue:u})}_getWebGLParameters(){let{allowUnmatched:t,noDataRanges:e,isLastInputRangeInclusive:s}=this.functionArguments,r=this.functionArguments.inputRanges??[],n=this.functionArguments.outputValues??[],i=(0,Kt.bL)(r,n,s),o=new Float32Array(18);return o.fill(zs.pq),e?.length&&o.set(e),{allowUnmatched:t,rangeMaps:i,noDataRanges:o,clampRange:(0,l.hP)(this.outputPixelType),replacementValue:this.functionArguments.replacementValue}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Js.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:qs,json:{write:!0,name:"rasterFunctionArguments"}})],Js.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Js.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Js.prototype,"lookup",void 0),Js=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.RemapFunction")],Js);const Xs=Js;var Qs;let Ys=Qs=class extends Is{readColorRamp(t){if("string"==typeof t){let e=ge.kH.jsonValues.find(e=>e.toLowerCase()===t.toLowerCase());return e?(0,ge.M5)(ge.kH.fromJSON(e)):null}return"toJSON"in t?t.toJSON():t}clone(){return new Qs({hillshadeType:this.hillshadeType,altitude:this.altitude,azimuth:this.azimuth,zFactor:this.zFactor,slopeType:this.slopeType,pixelSizeFactor:this.pixelSizeFactor,pixelSizePower:this.pixelSizePower,removeEdgeEffect:this.removeEdgeEffect,colorRamp:this.colorRamp,colormap:this.colormap,raster:this.raster})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Ys.prototype,"colorRamp",void 0),(0,o.Cg)([(0,ye.w)("colorRamp")],Ys.prototype,"readColorRamp",null),(0,o.Cg)([(0,a.MZ)({type:[[Number]],json:{write:!0}})],Ys.prototype,"colormap",void 0),Ys=Qs=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ShadedReliefFunctionArguments")],Ys);const tr=Ys;let er=class extends x{constructor(){super(...arguments),this.functionName="ShadedRelief",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){let t=this.sourceRasterInfos[0];if(t.bandCount>1)return{success:!1,supportsGPU:!1,error:"shadedrelief-function: source data must be single band"};let{colorRamp:e,colormap:s}=this.functionArguments;if(!e&&!s?.length)return{success:!1,supportsGPU:!1,error:"shadedrelief-function: a color ramp argument must be specified"};this.outputPixelType=this._getOutputPixelType("u8");let r=t.clone();this._removeStatsHistColormapVAT(r),r.pixelType=this.outputPixelType,r.bandCount=3,r.statistics=[{min:0,max:255,avg:60,stddev:10},{min:0,max:255,avg:60,stddev:10},{min:0,max:255,avg:60,stddev:10}],this.rasterInfo=r,this.isGCS=r.spatialReference?.isGeographic??!1,s?.length||(s=(0,ge.R8)(e,{interpolateAlpha:!0}));let{indexedColormap:n,offset:i}=(0,Kt.zg)({colormap:s});if(!n?.length)return{success:!1,supportsGPU:!1,error:"shadedrelief-function: a valid colorramp is required"};let o=(0,ge.S2)(n);return this.lookup={indexedColormap:n,offset:i,hsvMap:o},{success:!0,supportsGPU:(0,Re.WN)(n)}}_processPixels(t){let e=t.pixelBlocks?.[0];if(!e||!this.lookup)return null;let s=t.primaryPixelSizes?.[0];if(null==s){let{extent:r}=t;s=r?{x:r.width/e.width,y:r.height/e.height}:{x:1,y:1}}let r=(0,zt.PP)(this.functionArguments,s,this.isGCS),n=(0,zt.fw)(e,r),i=this.sourceRasterInfos[0].statistics?.[0]??{min:0,max:8e3};return(0,zt.SC)(n,e,this.lookup.hsvMap,i),n.pixelType=this.outputPixelType,n}_getWebGLParameters(){let t=(0,zt.PP)(this.functionArguments,{x:1,y:1},this.isGCS),e=(0,zt.ng)(t),{slopeType:s,zFactor:r,pixelSizeFactor:n,pixelSizePower:i}=this.functionArguments,o="scaled"===s,{indexedColormap:a,offset:u}=this.lookup,p=this.sourceRasterInfos[0].statistics?.[0],c=(0,l.zw)(this.outputPixelType);return{...e,indexedColormap:a,offset:u,zFactor:r,gcsFactor:this.isGCS?zt.rk:1,pixelSizeFactor:o?n:0,pixelSizePower:o?i:0,minValue:p?.min??0,maxValue:p?.max??8e3,isOutputRounded:c}}_getNeighborhoodSize(){return{rows:3,cols:3}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],er.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:tr,json:{write:!0,name:"rasterFunctionArguments"}})],er.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],er.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],er.prototype,"isGCS",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],er.prototype,"lookup",void 0),er=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.ShadedReliefFunction")],er);const sr=er;var rr;const nr=new Dt.J({1:"degree",2:"percent-rise",3:"adjusted"},{useNumericKeys:!0});let ir=rr=class extends c{constructor(){super(...arguments),this.slopeType="degree",this.zFactor=1,this.pixelSizePower=.664,this.pixelSizeFactor=.024,this.removeEdgeEffect=!1}clone(){return new rr({slopeType:this.slopeType,zFactor:this.zFactor,pixelSizePower:this.pixelSizePower,pixelSizeFactor:this.pixelSizeFactor,removeEdgeEffect:this.removeEdgeEffect,raster:this.raster})}};(0,o.Cg)([(0,Qt.e)(nr)],ir.prototype,"slopeType",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],ir.prototype,"zFactor",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{name:"psPower",write:!0}})],ir.prototype,"pixelSizePower",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{name:"psZFactor",write:!0}})],ir.prototype,"pixelSizeFactor",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],ir.prototype,"removeEdgeEffect",void 0),ir=rr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.SlopeFunctionArguments")],ir);const or=ir;let ar=class extends x{constructor(){super(...arguments),this.functionName="Slope",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isGCS=!1}_bindSourceRasters(){this.outputPixelType=this._getOutputPixelType("f32");let t=this.sourceRasterInfos[0].clone();return t.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(t),t.statistics="percent-rise"===this.functionArguments.slopeType?null:[{min:0,max:90,avg:1,stddev:1}],t.bandCount=1,this.rasterInfo=t,this.isGCS=t.spatialReference?.isGeographic??!1,{success:!0,supportsGPU:!0}}_processPixels(t){let e=t.pixelBlocks?.[0];if(null==e)return null;let{zFactor:s,slopeType:r,pixelSizePower:n,pixelSizeFactor:i}=this.functionArguments,{isGCS:o}=this,{extent:a,primaryPixelSizes:l}=t,u=l?.[0]??(a?{x:a.width/e.width,y:a.height/e.height}:{x:1,y:1});return(0,zt.yy)(e,{zFactor:s,slopeType:r,pixelSizePower:n,pixelSizeFactor:i,isGCS:o,resolution:u})}_getWebGLParameters(){let{zFactor:t,slopeType:e,pixelSizeFactor:s,pixelSizePower:r}=this.functionArguments;return{zFactor:this.isGCS&&t>=1?t*zt.rk:t,slopeType:e,pixelSizeFactor:s??0,pixelSizePower:r??0,isOutputRounded:(0,l.zw)(this.outputPixelType)}}_getNeighborhoodSize(){return{rows:3,cols:3}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],ar.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:or,json:{write:!0,name:"rasterFunctionArguments"}})],ar.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],ar.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],ar.prototype,"isGCS",void 0),ar=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.SlopeFunction")],ar);const lr=ar;var ur;let pr=ur=class extends c{clone(){return new ur({conversionMatrix:[...this.conversionMatrix],raster:this.raster})}};(0,o.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],pr.prototype,"conversionMatrix",void 0),pr=ur=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.SpectralConversionFunctionArguments")],pr);const cr=pr;let hr=class extends x{constructor(){super(...arguments),this.functionName="SpectralConversion",this.functionArguments=null,this.rasterArgumentNames=["raster"]}_bindSourceRasters(){let t=this.sourceRasterInfos[0].clone();return this.outputPixelType=this._getOutputPixelType(t.pixelType),t.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(t),this.rasterInfo=t,{success:!0,supportsGPU:3===t.bandCount&&9===this.functionArguments.conversionMatrix.length}}_processPixels(t){let e=t.pixelBlocks?.[0];return null==e?null:function(t,e,s){let{width:r,height:n,mask:i,bandMasks:o}=t,a=o?.length?g.A.combineBandMasks(o):i,l=[],u=t.pixels.length;for(let r=0;r<e.length/u;r++){let n=ws(t,e.slice(r*u,(r+1)*u),s,a);l.push(n)}let p=new g.A({width:r,height:n,pixels:l,pixelType:s,mask:a});return p.updateStatistics(),p}(e,this.functionArguments.conversionMatrix,this.outputPixelType)}_getWebGLParameters(){let t=(0,l.hP)(this.outputPixelType),[e,s,r,n,i,o,a,u,p]=this.functionArguments.conversionMatrix;return{weights:[e,n,a,s,i,u,r,o,p],clampRange:t}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],hr.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:cr,json:{write:!0,name:"rasterFunctionArguments"}})],hr.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],hr.prototype,"rasterArgumentNames",void 0),hr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.SpectralConversionFunction")],hr);const mr=hr,dr=new Dt.J({1:"min",2:"max",3:"mean",4:"stddev",5:"median",6:"majority",7:"minority"},{useNumericKeys:!0});function gr(t,e){let{fillNoDataOnly:s}=e,{band:r,width:n,height:i,mask:o,outBand:a}=t;if(s&&!o)return void a.set(r);let{statisticsType:l,kernelRows:u,kernelCols:p}=e,c="stddev"===l,h=n*i,m=new Float64Array(h),d=new Float64Array(h),g=new Uint32Array(h);for(let t=0;t<i;t++){let e=t*n,s=0,i=0,a=0;for(let t=0;t<p;t++)(!o||o[e+t])&&(s+=r[e+t],c&&(i+=r[e+t]**2),a++);m[e]=s,d[e]=i,g[e]=a;for(let t=1;t<=n-p;t++){let n=e+t-1,l=n+p;o?(o[n]&&(a--,s-=r[n],c&&(i-=r[n]**2)),o[l]&&(a++,s+=r[l],c&&(i+=r[l]**2))):(s-=r[n],s+=r[l],c&&(i-=r[n]**2,i+=r[l]**2)),m[e+t]=s,g[e+t]=a,c&&(d[e+t]=i)}}let f=new Float64Array(h),y=new Float64Array(h),w=new Uint32Array(h),x=u*n;for(let t=0;t<=n-p;t++){let e=0,s=0,r=0;for(let i=0;i<u;i++){let o=i*n+t;e+=m[o],r+=g[o],c&&(s+=d[o])}f[t]=e,y[t]=s,w[t]=r;for(let o=1;o<=i-u;o++){let i=(o-1)*n+t,a=i+x;e-=m[i],e+=m[a],r-=g[i],r+=g[a],c&&(s-=d[i],s+=d[a]),f[o*n+t]=e,y[o*n+t]=s,w[o*n+t]=r}}let v=Math.floor(u/2),A=Math.floor(p/2);for(let t=v;t<i-v;t++){let e=t*n;for(let r=A;r<n-A;r++){let i=(t-v)*n+r-A,l=w[i];if(0===l||s&&(!o||o[e+r]))continue;let u=f[i]/l,p=c?Math.sqrt((y[i]-f[i]*u)/l):u;a[e+r]=p,o&&(o[e+r]=255)}}}function fr(t,e){let{fillNoDataOnly:s}=e,{band:r,width:n,height:i,mask:o,outBand:a}=t;if(s&&!o)return void a.set(r);let{kernelRows:l,kernelCols:u,statisticsType:p}=e,c=Math.floor(l/2),h=Math.floor(u/2),m="min"===p,d=a.slice(),g=new Uint32Array(n*i);for(let t=c;t<i-c;t++){let e=t*n;for(let t=h;t<n-h;t++){let s=m?Number.MAX_VALUE:-Number.MAX_VALUE,i=0;for(let a=0;a<l;a++)for(let l=0;l<u;l++){let u=e+t+(a-c)*n+l-h;(!o||o[u])&&(s=m?Math.min(s,r[u]):Math.max(s,r[u]),i++)}o?(d[e+t]=0===i?0:s,g[e+t]=i):a[e+t]=0===i?0:s}}if(o)for(let t=c;t<i-c;t++){let e=t*n;for(let t=h;t<n-h;t++)if(g[e+t]){if(s&&o[e+t])continue;a[e+t]=d[e+t],o[e+t]=255}}}function yr(t,e){let{fillNoDataOnly:s}=e,{band:r,width:n,height:i,mask:o,outBand:a}=t;if(s&&!o)return void a.set(r);let{kernelRows:l,kernelCols:u}=e,p=Math.floor(l/2),c=Math.floor(u/2),h=a.slice(),m=new Uint32Array(n*i);for(let t=p;t<i-p;t++){let e=t*n;for(let t=c;t<n-c;t++){if(s&&o?.[e+t])continue;let i=[];for(let s=0;s<l;s++)for(let a=0;a<u;a++){let l=e+t+(s-p)*n+a-c;(!o||o[l])&&i.push(r[l])}i.length&&(i.sort((t,e)=>t-e),o?(h[e+t]=i[Math.floor((i.length-1)/2)],m[e+t]=i.length):a[e+t]=i[Math.floor((i.length-1)/2)])}}if(o)for(let t=p;t<i-p;t++){let e=t*n;for(let t=c;t<n-c;t++)if(m[e+t]){if(s&&o[e+t])continue;a[e+t]=h[e+t],o[e+t]=255}}}function wr(t,e){let{fillNoDataOnly:s}=e,{band:r,width:n,height:i,mask:o,outBand:a}=t;if(s&&!o)return void a.set(r);let{kernelRows:l,kernelCols:u}=e,p=Math.floor(l/2),c=Math.floor(u/2),h="majority"===e.statisticsType,m=l*u,d=a.slice(),g=new Uint32Array(n*i);for(let t=p;t<i-p;t++){let e=t*n;for(let t=c;t<n-c;t++){if(s&&o?.[e+t])continue;let i=new Map;for(let s=0;s<l;s++)for(let a=0;a<u;a++){let l=e+t+(s-p)*n+a-c;if(o&&!o[l])continue;let u=r[l];i.set(u,i.has(u)?i.get(u)+1:1)}if(0===i.size)continue;let f=0,y=0,w=h?0:m+1;for(let t of i.keys())y=i.get(t),h===y>w&&(w=y,f=t);o?(d[e+t]=f,g[e+t]=i.size):a[e+t]=f}}if(o)for(let t=p;t<i-p;t++){let e=t*n;for(let t=c;t<n-c;t++)if(g[e+t]){if(s&&o[e+t])continue;a[e+t]=d[e+t],o[e+t]=255}}}var xr;let vr=xr=class extends c{constructor(){super(...arguments),this.rows=3,this.cols=3,this.fillNoDataOnly=!1,this.statisticsType="min"}clone(){return new xr({rows:this.rows,cols:this.cols,fillNoDataOnly:this.fillNoDataOnly,statisticsType:this.statisticsType,raster:(0,i.o8)(this.raster)})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,read:{source:["kernelRows","rows"],reader:(t,e)=>Number(t??e?.kernelRows??3)}}})],vr.prototype,"rows",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0,read:{source:["kernelCols","cols"],reader:(t,e)=>Number(t??e?.kernelCols??3)}}})],vr.prototype,"cols",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],vr.prototype,"fillNoDataOnly",void 0),(0,o.Cg)([(0,a.MZ)({json:{read:{source:["statisticsType","type"],reader:(t,e)=>dr.fromJSON(e?.statisticsType??e?.type)??"min"},write:{target:"type"}}}),(0,Qt.e)(dr)],vr.prototype,"statisticsType",void 0),vr=xr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.StatisticsFunctionArguments")],vr);const Ar=vr;let Cr=class extends x{constructor(){super(...arguments),this.functionName="Statistics",this.rasterArgumentNames=["raster"]}_bindSourceRasters(){let{type:t}=this.functionArguments.toJSON();if(t<1||t>7)return{success:!1,supportsGPU:!1,error:`statistics-function: the given statistics type is not supported ${t}`};let e=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType(e.pixelType);let s=e.clone();s.pixelType=this.outputPixelType;let{statisticsType:r}=this.functionArguments;return"stddev"===r&&this._removeStatsHistColormapVAT(s),this.rasterInfo=s,{success:!0,supportsGPU:s.bandCount<=3&&t<5}}_processPixels(t){let e=t.pixelBlocks?.[0];if(null==e)return e;let{statisticsType:s,rows:r,cols:n,fillNoDataOnly:i}=this.functionArguments;return function(t,e){let{mask:s}=t,{fillNoDataOnly:r}=e;if(r&&!s)return t;let{pixels:n,width:i,height:o,bandMasks:a,pixelType:l}=t,u=n.length,p=i*o,c=[],{kernelRows:h,kernelCols:m,statisticsType:d,mirrorEdges:f}=e;if(r&&!s)return t;let y=e.outputPixelType??l,w=[];for(let t=0;t<u;t++){let l=n[t],u=g.A.createEmptyBand(y,p);r&&u.set(l);let x=(a?.[t]??s)?.slice()??null,v={band:l,width:i,height:o,mask:x,outBand:u};switch(d){case"min":case"max":fr(v,e);break;case"mean":case"stddev":gr(v,e);break;case"median":yr(v,e);break;case"majority":case"minority":wr(v,e)}f&&!r&&Qe(u,i,o,h,m),c.push(u),x&&w.push(x)}let x=w[0]??s;w.length!==u&&(w.length=0),u>1&&a?.length&&(x=g.A.combineBandMasks(a));let v=new g.A({pixelType:y,width:i,height:o,pixels:c,bandMasks:a&&w.length?w:null,mask:x});return v.updateStatistics(),v}(e,{kernelRows:r,kernelCols:n,fillNoDataOnly:i,outputPixelType:this.outputPixelType,statisticsType:s,mirrorEdges:!0})}_getWebGLParameters(){let{rows:t,cols:e,statisticsType:s,fillNoDataOnly:r}=this.functionArguments;return{fillNoDataOnly:r,kernelRows:t,kernelCols:e,statisticsType:s,clampRange:(0,l.hP)(this.outputPixelType)}}_getNeighborhoodSize(){let{rows:t,cols:e}=this.functionArguments;return{rows:t,cols:e}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Cr.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Ar,json:{write:!0,name:"rasterFunctionArguments"}})],Cr.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Cr.prototype,"rasterArgumentNames",void 0),Cr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.StatisticsFunction")],Cr);const br=Cr;var Mr;let Pr=Mr=class extends c{constructor(){super(...arguments),this.statistics=null,this.histograms=null}readStatistics(t,e){if(!t?.length)return null;let s=[];return t.forEach(t=>{let e={min:t.min,max:t.max,avg:t.avg??t.mean,stddev:t.stddev??t.standardDeviation};s.push(e)}),s}writeStatistics(t,e,s){if(!t?.length)return;let r=[];t.forEach(t=>{let e={...t,mean:t.avg,standardDeviation:t.stddev};delete e.avg,delete e.stddev,r.push(e)}),e[s]=r}clone(){return new Mr({statistics:(0,i.o8)(this.statistics),histograms:(0,i.o8)(this.histograms)})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Pr.prototype,"statistics",void 0),(0,o.Cg)([(0,ye.w)("statistics")],Pr.prototype,"readStatistics",null),(0,o.Cg)([(0,Se.K)("statistics")],Pr.prototype,"writeStatistics",null),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Pr.prototype,"histograms",void 0),Pr=Mr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.StatisticsHistogramFunctionArguments")],Pr);const Tr=Pr;let Nr=class extends x{constructor(){super(...arguments),this.functionName="StatisticsHistogram",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){let t=this.sourceRasterInfos[0];this.outputPixelType=this._getOutputPixelType("u8");let e=t.clone(),{statistics:s,histograms:r}=this.functionArguments;return r&&(e.histograms=r),s&&(e.statistics=s),this.rasterInfo=e,{success:!0,supportsGPU:!0}}_processPixels(t){return t.pixelBlocks?.[0]}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Nr.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:Tr,json:{write:!0,name:"rasterFunctionArguments"}})],Nr.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Nr.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Nr.prototype,"indexedColormap",void 0),(0,o.Cg)([(0,a.MZ)()],Nr.prototype,"isNoopProcess",void 0),Nr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.StatisticsHistogramFunction")],Nr);const Ir=Nr;var Rr;const Fr=new Dt.J({0:"none",3:"standard-deviation",4:"histogram-equalization",5:"min-max",6:"percent-clip",9:"sigmoid"},{useNumericKeys:!0});let _r=Rr=class extends c{constructor(){super(...arguments),this.computeGamma=!1,this.dynamicRangeAdjustment=!1,this.gamma=[],this.histograms=null,this.statistics=null,this.stretchType="none",this.useGamma=!1}writeStatistics(t,e,s){t?.length&&(Array.isArray(t[0])||(t=t.map(t=>[t.min,t.max,t.avg,t.stddev])),e[s]=t)}clone(){return new Rr({stretchType:this.stretchType,outputMin:this.outputMin,outputMax:this.outputMax,useGamma:this.useGamma,computeGamma:this.computeGamma,statistics:(0,i.o8)(this.statistics),gamma:(0,i.o8)(this.gamma),sigmoidStrengthLevel:this.sigmoidStrengthLevel,numberOfStandardDeviations:this.numberOfStandardDeviations,minPercent:this.minPercent,maxPercent:this.maxPercent,histograms:(0,i.o8)(this.histograms),dynamicRangeAdjustment:this.dynamicRangeAdjustment,raster:this.raster})}};(0,o.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],_r.prototype,"computeGamma",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean,json:{name:"dra",write:!0}})],_r.prototype,"dynamicRangeAdjustment",void 0),(0,o.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],_r.prototype,"gamma",void 0),(0,o.Cg)([(0,a.MZ)()],_r.prototype,"histograms",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],_r.prototype,"maxPercent",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],_r.prototype,"minPercent",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],_r.prototype,"numberOfStandardDeviations",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{name:"max",write:!0}})],_r.prototype,"outputMax",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{name:"min",write:!0}})],_r.prototype,"outputMin",void 0),(0,o.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],_r.prototype,"sigmoidStrengthLevel",void 0),(0,o.Cg)([(0,a.MZ)({json:{type:[[Number]],write:!0}})],_r.prototype,"statistics",void 0),(0,o.Cg)([(0,Se.K)("statistics")],_r.prototype,"writeStatistics",null),(0,o.Cg)([(0,Qt.e)(Fr)],_r.prototype,"stretchType",void 0),(0,o.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],_r.prototype,"useGamma",void 0),_r=Rr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.StretchFunctionArguments")],_r);const kr=_r;let Sr=class extends x{constructor(){super(...arguments),this.functionName="Stretch",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.lookup=null,this.cutOffs=null}_bindSourceRasters(){this.lookup=null,this.cutOffs=null;let t=this.sourceRasterInfos[0],{pixelType:e}=t,{functionArguments:s}=this,{dynamicRangeAdjustment:r,gamma:n,useGamma:i}=s;if(!r&&["u8","u16","s8","s16"].includes(e)){let r=(0,qe.DP)(s.toJSON(),{rasterInfo:t}),o=(0,l.zw)(this.outputPixelType)?"round":"float";this.lookup=(0,qe.RP)({pixelType:e,...r,gamma:i?n:null,rounding:o}),this.cutOffs=r}else r||(this.cutOffs=(0,qe.DP)(s.toJSON(),{rasterInfo:t}));this.outputPixelType=this._getOutputPixelType(e);let o=t.clone();o.pixelType=this.outputPixelType,this._removeStatsHistColormapVAT(o),"u8"===this.outputPixelType&&(o.keyProperties.DataType="processed");let{outputMin:a=0,outputMax:u=255}=this.functionArguments;o.statistics=[];for(let t=0;t<o.bandCount;t++)o.statistics[t]={min:a,max:u};return this.rasterInfo=o,{success:!0,supportsGPU:!r}}_processPixels(t,e){let s=t.pixelBlocks?.[0];if(null==s)return s;let{lookup:r}=this;if(r)return(0,Kt.eH)(s,{...r,outputPixelType:this.rasterInfo.pixelType});let{functionArguments:n}=this,i=e?.stretchCutoff??this.cutOffs??(0,qe.DP)(n.toJSON(),{rasterInfo:this.sourceRasterInfos[0],pixelBlock:s}),o=n.useGamma?n.gamma:null;return(0,qe._N)(s,{...i,gamma:o,outputPixelType:this.outputPixelType})}_getWebGLParameters(){let{outputMin:t=0,outputMax:e=255,gamma:s,useGamma:r}=this.functionArguments,n=this.rasterInfo.bandCount>=2?3:1,i=r&&s?.length?(0,qe.Nh)(n,s):[1,1,1],{minCutOff:o,maxCutOff:a}=this.cutOffs??{minCutOff:[0,0,0],maxCutOff:[255,255,255]};1===o.length&&(o[1]=o[2]=o[0],a[1]=a[2]=a[0]);let u=a.map((s,r)=>(e-t)/(a[r]-o[r])),p=(0,l.zw)(this.outputPixelType);return{bandCount:n,minOutput:t,maxOutput:e,minCutOff:o,maxCutOff:a,factor:u,useGamma:r,gamma:r&&s?[s[0],s[1]??s[0],s[2]??s[0]]:[1,1,1],gammaCorrection:r?[i[0],i[1]??i[0],i[2]??i[0]]:[1,1,1],stretchType:this.functionArguments.stretchType,isOutputRounded:p,type:"stretch"}}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Sr.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:kr,json:{write:!0,name:"rasterFunctionArguments"}})],Sr.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Sr.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Sr.prototype,"lookup",void 0),(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Sr.prototype,"cutOffs",void 0),Sr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.StretchFunction")],Sr);const Br=Sr;var jr;let Zr=jr=class extends c{constructor(){super(...arguments),this.attributeTableAsRecordSet=null}clone(){return new jr({attributeTableAsRecordSet:(0,i.o8)(this.attributeTableAsRecordSet)})}};(0,o.Cg)([(0,a.MZ)({json:{write:!0}})],Zr.prototype,"attributeTableAsRecordSet",void 0),Zr=jr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.TableFunctionArguments")],Zr);const zr=Zr;let Gr=class extends x{constructor(){super(...arguments),this.functionName="Table",this.functionArguments=null,this.rasterArgumentNames=["raster"],this.isNoopProcess=!0}_bindSourceRasters(){let t=this.sourceRasterInfos[0];if(t.bandCount>1||t.pixelType.startsWith("f"))return{success:!1,supportsGPU:!1,error:"table-function: Source data must be single band and integer pixel type."};let{attributeTableAsRecordSet:e}=this.functionArguments;if(!e)return{success:!1,supportsGPU:!1,error:"table-function: Missing attributeTableAsRecordSet argument."};this.outputPixelType=this._getOutputPixelType(t.pixelType);let s=t.clone();return s.pixelType=this.outputPixelType,s.bandCount=1,"thematic"!==s.dataType&&(s.keyProperties=s.keyProperties?{...s.keyProperties,DataType:"thematic"}:{DataType:"thematic"}),this.rasterInfo=s,{success:!0,supportsGPU:!0}}_processPixels(t){return t.pixelBlocks?.[0]}};(0,o.Cg)([(0,a.MZ)({json:{write:!0,name:"rasterFunction"}})],Gr.prototype,"functionName",void 0),(0,o.Cg)([(0,a.MZ)({type:zr,json:{write:!0,name:"rasterFunctionArguments"}})],Gr.prototype,"functionArguments",void 0),(0,o.Cg)([(0,a.MZ)()],Gr.prototype,"rasterArgumentNames",void 0),(0,o.Cg)([(0,a.MZ)()],Gr.prototype,"isNoopProcess",void 0),Gr=(0,o.Cg)([(0,a.$K)("esri.layers.raster.functions.TableFunction")],Gr);const Or=Gr,Dr=new Map;function Er(t,e){let{rasterFunctionArguments:s}=t;s&&(s.rasters||[s.raster,s.raster2]).forEach(t=>{t&&"number"!=typeof t&&("string"==typeof t?t.startsWith("http")&&(e.includes(t)||e.push(t)):"rasterFunctionArguments"in t&&Er(t,e))})}function Vr(t,e){e??={};try{if("function"in(t=(0,i.o8)(t))&&"arguments"in t&&t.arguments){let s=qr(t,new Map,e);if(Xr(s),!s.renderingRule)throw new n.A("raster-function-helper","Unsupported raster function json.");t=s.renderingRule}if("rasterFunction"in t){let s=$r(t=Lr(t),e);return s.isRoot=!0,s}}catch{}throw new n.A("raster-function-helper","unsupported raster function json.")}function Ur(t){return!!(t&&"object"==typeof t&&t.rasterFunction&&t.rasterFunctionArguments)}function Lr(t){let{rasterFunction:e,rasterFunctionArguments:s}=t,r={};for(let t in s){let e=s[t],n=t.toLowerCase();if("rasters"===n&&Array.isArray(e))r.rasters=e.map(t=>Ur(t)?Lr(t):t);else switch(Ur(e)&&(e=Lr(e)),n){case"dra":r.dra=e;break;case"pspower":r.psPower=e;break;case"pszfactor":r.psZFactor=e;break;case"bandids":r.bandIds=e;break;default:r[t[0].toLowerCase()+t.slice(1)]=e}}return"Local"===e&&!r.rasters?.length&&(r.rasters=["$$"]),{...t,rasterFunctionArguments:r}}function $r(t,e){let{rasterFunction:s,rasterFunctionArguments:r}=t,i=t.outputPixelType?.toLowerCase();if(null==s||!Dr.has(s))throw new n.A("raster-function-helper",`unsupported raster function: ${s}`);let o=Dr.get(s),a=("function"==typeof o.ctor?o.ctor:o.ctor.default).fromJSON({...t,outputPixelType:i}),{rasterArgumentNames:l}=a,u=[],p=function(t,e){return"rasters"===e[0]&&Array.isArray(t.rasters)?t.rasters:e.map(e=>t[e])}(r,l),c="rasters"===l[0]||l.length>1,h=[];for(let t=0;t<p.length;t++){let s,r=p[t];null==r||"string"==typeof r&&r.startsWith("$")?u.push(e?.raster):"string"==typeof r?e[r]&&u.push(e[r]):"number"!=typeof r&&"rasterFunction"in r&&(s=$r(r,e),c||(a.functionArguments[l[t]]=s),u.push(s)),c&&h.push(s??r)}if(c&&("rasters"===l[0]?a.functionArguments.rasters=h:l.forEach((t,e)=>{a.functionArguments[t]=h[e]})),e){a.sourceRasters=u;let t=e.raster?.url;t&&(a.mainPrimaryRasterId=t)}return a}function Kr(t,e){if(t&&e)for(let s in t){let r=t[s];r&&"object"==typeof r&&"type"in r&&("RasterFunctionTemplate"===r.type?Kr(r.arguments,e):"RasterFunctionVariable"===r.type&&null!=e[r.name]&&(r.value=e[r.name]))}}function Wr(t,e){if(!t||"object"!=typeof t)return t;let{value:s}=t;if(!s||"object"!=typeof s)return t.isDataset?"$$":s;if(Array.isArray(s))return 0===s.length?[]:s.map(t=>t&&"object"==typeof t&&"RasterFunctionVariable"===t.type?Wr(t,e):t);if("value"in s&&["number","string","boolean"].includes(typeof s.value))return s.value;if(t.isDataset&&"Scalar"!==s.type)return"$$";if(!("type"in s))return s;let r=s;switch(s.type){case"Scalar":r=s.value;break;case"AlgorithmicColorRamp":r=Hr(s);break;case"MultiPartColorRamp":r={type:"multipart",colorRamps:s.ArrayOfColorRamp.map(Hr)};break;case"ArgumentArray":if(s.elements?.length&&"RasterStatistics"!==s.elements[0].type){let t=[];for(let r=0;r<s.elements.length;r++){let i=s.elements[r],{type:o}=i;if(o)if("RasterFunctionTemplate"===o){let{renderingRule:s}=qr(i,e);t.push(s),null!=i._object_id&&e.set(i._object_id,s)}else{if("RasterFunctionVariable"!==o)throw new n.A("raster-function-helper","unsupported raster function json.");{let s=Wr(i,e);t.push(s),null!=i._object_id&&e.set(i._object_id,s)}}else t.push(i)}r=t}else r=s.elements}return null!=s._object_id&&e.set(s._object_id,r),r}function Hr(t){let e=t.algorithm??"esriHSVAlgorithm",{FromColor:s,ToColor:n}=t;if(!Array.isArray(s)){let{r:t,g:e,b:n}=(0,r.$)({h:s.Hue,s:s.Saturation,v:s.Value});s=[t,e,n,s.AlphaValue]}if(!Array.isArray(n)){let{r:t,g:e,b:s}=(0,r.$)({h:n.Hue,s:n.Saturation,v:n.Value});n=[t,e,s,n.AlphaValue]}return{type:"algorithmic",algorithm:e,fromColor:s,toColor:n}}function qr(t,e,s){s&&Kr(t,s);let r={renderingRule:{},templates:e};return Jr(t,r),r}function Jr(t,e){if(!t||!e.renderingRule)return;let{renderingRule:s,templates:r}=e,{function:n,arguments:i,_object_id:o}=t;if(!n||!i)return;null!=o&&r.set(o,s),s.rasterFunction=n.type.replace("Function",""),s.outputPixelType=n.pixelType;let a={};s.rasterFunctionArguments=a;for(let t in i){if("type"===t||"object_id"===t||"_object_ref_id"===t)continue;let e=i[t];!e||"object"!=typeof e||!("type"in e)||"RasterFunctionTemplate"!==e.type&&"RasterFunctionVariable"!==e.type?a[t]=e:("RasterFunctionVariable"===e.type?a[t]=Wr(e,r):(s.rasterFunctionArguments[t]={},Jr(e,{renderingRule:s.rasterFunctionArguments[t],templates:r})),null!=e._object_id&&r.set(e._object_id,a[t]))}switch(a.DEM&&!a.Raster&&(a.Raster=a.DEM,delete a.DEM),s.rasterFunction){case"Stretch":!function(t){t.Statistics?.length&&"object"==typeof t.Statistics&&(t.Statistics=t.Statistics.map(t=>[t.min,t.max,t.mean,t.standardDeviation])),null!=t.NumberOfStandardDeviation&&(t.NumberOfStandardDeviations=t.NumberOfStandardDeviation,delete t.NumberOfStandardDeviation)}(a);break;case"Colormap":!function(t){"randomcolorramp"===t.ColorRamp?.type?.toLowerCase()&&(delete t.ColorRamp,t.ColormapName="Random"),0===t.ColorSchemeType&&delete t.ColorRamp}(a);break;case"Convolution":!function(t){null!=t.ConvolutionType&&(t.Type=t.ConvolutionType,delete t.ConvolutionType)}(a);break;case"Mask":!function(t){t.NoDataValues?.length&&"string"==typeof t.NoDataValues[0]&&(t.NoDataValues=t.NoDataValues.filter(t=>""!==t).map(t=>Number(t)))}(a)}}function Xr(t){let{renderingRule:e,templates:s}=t;if("object"!=typeof e||!e?.rasterFunctionArguments||!s.size)return;let{rasterFunctionArguments:r}=e;for(let t in r){let e=r[t],i="_object_ref_id"===t?e:e&&"object"==typeof e&&"_object_ref_id"in e?e._object_ref_id:null;if(null!=i){if(!s.has(i))throw new n.A("raster-function-helper",`unsupported raster function json. _object_ref_id: ${i} does not exist`);let e=s.get(i);"_object_ref_id"===t?e&&"object"==typeof e&&Object.assign(r,e):r[t]=e}else e&&"object"==typeof e&&(e.rasterFunctionArguments&&Xr({renderingRule:e,templates:s}),Array.isArray(e)&&e.forEach((t,r)=>{if(t&&"object"==typeof t)if(null!=t._object_ref_id){if(!s.has(t._object_ref_id))throw new n.A("raster-function-helper",`unsupported raster function json. _object_ref_id: ${e} does not exist`);let o=s.get(i);o&&"object"==typeof o?Object.assign(t,o):e[r]=o}else Xr({renderingRule:t,templates:s})}))}}Dr.set("Arithmetic",{desc:"Arithmetic Function",ctor:St,rasterArgumentNames:["rasters"]}),Dr.set("Aspect",{desc:"Aspect Function",ctor:Ot,rasterArgumentNames:["raster"]}),Dr.set("BandArithmetic",{desc:"Band Arithmetic Function",ctor:re,rasterArgumentNames:["raster"]}),Dr.set("Colormap",{desc:"Colormap Function",ctor:Me,rasterArgumentNames:["raster"]}),Dr.set("ColormapToRGB",{desc:"ColormapToRGB Function",ctor:_e,rasterArgumentNames:["raster"]}),Dr.set("CompositeBand",{desc:"CompositeBand Function",ctor:ze,rasterArgumentNames:["rasters"]}),Dr.set("ComputeChange",{desc:"ComputeChange Function",ctor:$e,rasterArgumentNames:["rasters"]}),Dr.set("Convolution",{desc:"Convolution Function",ctor:os,rasterArgumentNames:["raster"]}),Dr.set("ContrastBrightness",{desc:"Contrast Brightness Function",ctor:Xe,rasterArgumentNames:["raster"]}),Dr.set("ExtractBand",{desc:"ExtractBand Function",ctor:ys,rasterArgumentNames:["raster"]}),Dr.set("Curvature",{desc:"Curvature Function",ctor:hs,rasterArgumentNames:["raster"]}),Dr.set("Hillshade",{desc:"Hillshade Function",ctor:Fs,rasterArgumentNames:["raster"]}),Dr.set("ShadedRelief",{desc:"ShadedRelief Function",ctor:sr,rasterArgumentNames:["raster"]}),Dr.set("Grayscale",{desc:"Grayscale Function",ctor:bs,rasterArgumentNames:["raster"]}),Dr.set("Clip",{desc:"Clip Function",ctor:me,rasterArgumentNames:["raster"]}),Dr.set("Local",{desc:"Local Function",ctor:js,rasterArgumentNames:["rasters"]}),Dr.set("Mask",{desc:"Mask Function",ctor:Es,rasterArgumentNames:["raster"]}),Dr.set("NDVI",{desc:"NDVI Function",ctor:Ks,rasterArgumentNames:["raster"]}),Dr.set("Remap",{desc:"Remap Function",ctor:Xs,rasterArgumentNames:["raster"]}),Dr.set("Slope",{desc:"Slope Function",ctor:lr,rasterArgumentNames:["raster"]}),Dr.set("SpectralConversion",{desc:"Spectral Conversion",ctor:mr,rasterArgumentNames:["raster"]}),Dr.set("Statistics",{desc:"Focal Statistics Function",ctor:br,rasterArgumentNames:["raster"]}),Dr.set("StatisticsHistogram",{desc:"Statistics Histogram Function",ctor:Ir,rasterArgumentNames:["raster"]}),Dr.set("Stretch",{desc:"Stretch Function",ctor:Br,rasterArgumentNames:["raster"]}),Dr.set("Table",{desc:"Attribute Table Function",ctor:Or,rasterArgumentNames:["raster"]})}}]);
|