@arcgis/core 5.0.0-next.68 → 5.0.0-next.69
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/Ground.d.ts +3 -4
- package/WebDocument2D.d.ts +1 -1
- package/WebLinkChart.d.ts +2 -0
- package/analysis/ElevationProfile/ElevationProfileLineQuery.d.ts +3 -4
- package/analysis/types.d.ts +1 -0
- package/applications/Components/analysisUtils.d.ts +1 -3
- package/applications/Components/arcadeFeatureUtils.d.ts +1 -1
- package/applications/ExperienceBuilder/sketchUtils.d.ts +2 -2
- package/applications/KnowledgeStudio/reshape.d.ts +2 -2
- package/applications/SceneViewer/sceneViewerUtils.d.ts +11 -0
- package/applications/SceneViewer/sceneViewerUtils.js +1 -1
- package/assets/esri/core/libs/libtess/libtess-f32.wasm +0 -0
- package/assets/esri/core/libs/libtess/libtess-f64.wasm +0 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{c623918e289a09905cd1.js → 01d7542d85a453384cf1.js} +1 -1
- package/assets/esri/core/workers/chunks/{168ec8fca2702617a543.js → 09dfec3e097ebbef6a89.js} +1 -1
- package/assets/esri/core/workers/chunks/{794960ec36e11f4416c2.js → 1d1e25bb61eeeee8ee94.js} +1 -1
- package/assets/esri/core/workers/chunks/2e2c47f8a80ee9234350.js +1 -0
- package/assets/esri/core/workers/chunks/{b2a1e5e9182b643909eb.js → 4c04c54330b693892cfc.js} +47 -49
- package/assets/esri/core/workers/chunks/563933a84fc9b0e021f6.js +1 -0
- package/assets/esri/core/workers/chunks/58b3a776ef129f7f86dc.js +1 -0
- package/assets/esri/core/workers/chunks/58e8d41dcc450e6427c9.js +1 -0
- package/assets/esri/core/workers/chunks/6c9dac4a869742cc2718.js +1 -0
- package/assets/esri/core/workers/chunks/{e5aac523c37d906eece6.js → 827277e5da652bcecaf2.js} +1 -1
- package/assets/esri/core/workers/chunks/9f34cf024231f574009c.js +1 -0
- package/assets/esri/core/workers/chunks/a10c6dd3bb8b3602de68.js +1 -0
- package/assets/esri/core/workers/chunks/a64cd02ca959d511101c.js +1 -0
- package/assets/esri/core/workers/chunks/{0f8149fdcf0adeca268e.js → b28e0b89603d8b03f9e1.js} +1 -1
- package/assets/esri/core/workers/chunks/b5e4a36784d598ae6679.js +1 -0
- package/assets/esri/core/workers/chunks/{204d738c8b651314ae64.js → b899b4e7979c13b99526.js} +1 -1
- package/assets/esri/core/workers/chunks/bf05164b7a3e4f31e9db.js +1 -0
- package/assets/esri/core/workers/chunks/d0ae8752419d5b761190.js +1 -0
- package/assets/esri/core/workers/chunks/dbfb00fb28b8b9f687a1.js +1 -0
- package/assets/esri/core/workers/chunks/e071b912539304564b69.js +1 -0
- package/assets/esri/core/workers/chunks/{ab71865b94022e78035c.js → f92845eb7df1804fcd6d.js} +1 -1
- package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +108 -0
- 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/GaussianSplat.glsl.js +2 -2
- package/chunks/GaussianSplatDepthComposition.glsl.js +4 -5
- package/chunks/HUDMaterial.glsl.js +45 -47
- package/chunks/LineMarker.glsl.js +33 -34
- package/chunks/PointRenderer.glsl.js +6 -6
- package/chunks/RibbonLine.glsl.js +62 -54
- package/chunks/libtess-f32.js +1 -1
- package/chunks/libtess-f64.js +1 -1
- package/config.js +1 -1
- package/core/Collection.d.ts +3 -2
- package/core/Identifiable.d.ts +1 -3
- package/core/accessorSupport/types.d.ts +0 -8
- package/core/promiseUtils.d.ts +1 -1
- package/core/reactiveUtils.d.ts +2 -2
- package/core/units.d.ts +8 -2
- package/geometry/HeightModelInfo.d.ts +3 -3
- package/geometry/SpatialReference.d.ts +2 -2
- package/geometry/libtess.js +1 -1
- package/geometry/support/meshUtils/types.d.ts +2 -2
- package/geometry/types.d.ts +2 -0
- package/identity/IdentityManagerBase.d.ts +4 -4
- package/interfaces.d.ts +2937 -2954
- package/kernel.js +1 -1
- package/layers/BaseElevationLayer.d.ts +3 -4
- package/layers/ElevationLayer.d.ts +3 -4
- package/layers/FeatureLayer.d.ts +12 -11
- package/layers/FeatureLayer.js +1 -1
- package/layers/GroupLayer.d.ts +3 -3
- package/layers/ImageryLayer.d.ts +3 -3
- package/layers/ImageryTileLayer.d.ts +3 -4
- package/layers/Layer.d.ts +4 -4
- package/layers/LineOfSightLayer.d.ts +1 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/MapImageLayer.d.ts +7 -8
- package/layers/MediaLayer.d.ts +3 -3
- package/layers/OrientedImageryLayer.d.ts +3 -3
- package/layers/ParquetLayer.d.ts +1 -1
- package/layers/ParquetLayer.js +1 -1
- package/layers/RouteLayer.d.ts +2 -3
- package/layers/SceneLayer.d.ts +167 -3
- package/layers/SceneLayer.js +1 -1
- package/layers/StreamLayer.d.ts +3 -3
- package/layers/SubtypeGroupLayer.d.ts +3 -3
- package/layers/WCSLayer.d.ts +3 -3
- package/layers/graphics/sources/ParquetSource.d.ts +1 -1
- package/layers/graphics/sources/support/QueryTask.js +1 -1
- package/layers/mixins/SceneService.d.ts +2 -2
- package/layers/orientedImagery/queries.js +1 -1
- package/layers/orientedImagery/transformations/imageToWorld.d.ts +2 -2
- package/layers/orientedImagery/transformations/types.d.ts +1 -1
- package/layers/raster/datasets/pixelReader.d.ts +1 -7
- package/layers/raster/functions/creators/createBandIndexFunctions.d.ts +29 -29
- package/layers/support/BuildingFilterMode.d.ts +3 -1
- package/layers/support/BuildingFilterMode.js +1 -1
- package/layers/support/BuildingFilterModeSolid.js +1 -1
- package/layers/support/BuildingFilterModeWireFrame.js +1 -1
- package/layers/support/BuildingFilterModeXRay.js +1 -1
- package/layers/support/CodedValue.d.ts +1 -1
- package/layers/support/ControlPoint.d.ts +6 -20
- package/layers/support/ControlPointsGeoreference.d.ts +2 -1
- package/layers/support/ElevationSampler.d.ts +2 -2
- package/layers/support/FeatureReductionBinning.d.ts +4 -4
- package/layers/support/FeatureReductionBinning.js +1 -1
- package/layers/support/FeatureReductionSelection.d.ts +3 -3
- package/layers/support/FeatureReductionSelection.js +1 -1
- package/layers/support/Field.d.ts +1 -2
- package/layers/support/ParquetGeometryEncodingLocation.d.ts +6 -4
- package/layers/support/ParquetGeometryEncodingLocation.js +1 -1
- package/layers/support/ParquetGeometryEncodingWkb.d.ts +6 -4
- package/layers/support/ParquetGeometryEncodingWkb.js +1 -1
- package/layers/support/PixelBlock.d.ts +11 -3
- package/layers/support/RangeDomain.d.ts +2 -1
- package/layers/support/SceneServiceTimeInfo.js +5 -0
- package/layers/support/SpriteSource.d.ts +1 -0
- package/layers/support/Sublayer.d.ts +17 -16
- package/layers/support/Sublayer.js +1 -1
- package/layers/support/featureReductionUtils.js +1 -1
- package/layers/support/rasterFunctionUtils.d.ts +30 -30
- package/layers/support/types.d.ts +101 -1
- package/layers/types.d.ts +12 -1
- package/layers/wms/types.d.ts +0 -4
- package/networks/CircuitManager.d.ts +5 -5
- package/networks/Network.d.ts +5 -5
- package/networks/UtilityNetwork.d.ts +2 -2
- package/package.json +2 -2
- package/popup/content/types.d.ts +1 -3
- package/portal/PortalItem.d.ts +8 -8
- package/portal/PortalItemResource.d.ts +2 -2
- package/portal/PortalUser.d.ts +3 -3
- package/portal/support/resourceUtils.d.ts +3 -3
- package/portal/types.d.ts +6 -6
- package/renderers/support/pointCloud/types.d.ts +1 -0
- package/renderers/support/raster/types.d.ts +1 -0
- package/renderers/types.d.ts +2 -0
- package/rest/knowledgeGraph/wasmInterface/WasmDataModelWrapperInterfaces.d.ts +0 -2
- package/rest/layerSources/DynamicDataLayer.d.ts +102 -0
- package/rest/layerSources/DynamicDataLayer.js +5 -0
- package/{layers/support/source/MapLayerSource.d.ts → rest/layerSources/DynamicMapLayer.d.ts} +4 -4
- package/rest/layerSources/DynamicMapLayer.js +5 -0
- package/rest/layerSources/JoinTableDataSource.d.ts +75 -0
- package/rest/layerSources/JoinTableDataSource.js +5 -0
- package/{layers/support/source → rest/layerSources}/QueryTableDataSource.d.ts +8 -7
- package/rest/layerSources/QueryTableDataSource.js +5 -0
- package/{layers/support/source → rest/layerSources}/RasterDataSource.d.ts +2 -2
- package/rest/layerSources/RasterDataSource.js +5 -0
- package/{layers/support/source → rest/layerSources}/TableDataSource.d.ts +2 -2
- package/rest/layerSources/TableDataSource.js +5 -0
- package/rest/layerSources/utils.js +5 -0
- package/rest/print.js +1 -1
- package/rest/query/executeQuery.js +1 -1
- package/rest/support/Query.js +1 -1
- package/rest/support/RelationshipQuery.js +1 -1
- package/rest/support/types.d.ts +0 -4
- package/smartMapping/heuristics/binLevel.d.ts +2 -2
- package/smartMapping/heuristics/scaleRange.d.ts +2 -2
- package/smartMapping/heuristics/sizeRange.d.ts +2 -2
- package/smartMapping/heuristics/types.d.ts +3 -3
- package/smartMapping/labels/bins.d.ts +2 -2
- package/smartMapping/labels/clusters.d.ts +2 -2
- package/smartMapping/renderers/color.d.ts +14 -14
- package/smartMapping/renderers/dotDensity.d.ts +2 -2
- package/smartMapping/renderers/heatmap.d.ts +4 -4
- package/smartMapping/renderers/location.d.ts +2 -2
- package/smartMapping/renderers/opacity.d.ts +2 -2
- package/smartMapping/renderers/pieChart.d.ts +4 -4
- package/smartMapping/renderers/predominance.d.ts +2 -2
- package/smartMapping/renderers/relationship.d.ts +4 -4
- package/smartMapping/renderers/size.d.ts +15 -15
- package/smartMapping/renderers/support/rendererUtils.d.ts +2 -2
- package/smartMapping/renderers/type.d.ts +4 -4
- package/smartMapping/renderers/univariateColorSize.d.ts +4 -4
- package/smartMapping/statistics/classBreaks.d.ts +2 -2
- package/smartMapping/statistics/heatmapStatistics.d.ts +2 -2
- package/smartMapping/statistics/histogram.d.ts +2 -2
- package/smartMapping/statistics/predominantCategories.d.ts +2 -2
- package/smartMapping/statistics/summaryStatistics.d.ts +2 -2
- package/smartMapping/statistics/summaryStatisticsForAge.d.ts +2 -2
- package/smartMapping/statistics/support/ageUtils.d.ts +2 -2
- package/smartMapping/statistics/types.d.ts +7 -7
- package/smartMapping/statistics/uniqueValues.d.ts +2 -2
- package/smartMapping/symbology/color.d.ts +8 -8
- package/smartMapping/symbology/dotDensity.d.ts +6 -6
- package/smartMapping/symbology/flow.d.ts +6 -6
- package/smartMapping/symbology/heatmap.d.ts +6 -6
- package/smartMapping/symbology/location.d.ts +2 -2
- package/smartMapping/symbology/pieChart.d.ts +6 -6
- package/smartMapping/symbology/predominance.d.ts +6 -6
- package/smartMapping/symbology/relationship.d.ts +6 -6
- package/smartMapping/symbology/size.d.ts +2 -2
- package/smartMapping/symbology/support/colorRamps.d.ts +2 -2
- package/smartMapping/symbology/type.d.ts +6 -6
- package/support/popupUtils.d.ts +2 -2
- package/support/revision.js +1 -1
- package/symbols/LineSymbol3D.d.ts +2 -2
- package/symbols/PointSymbol3D.d.ts +2 -2
- package/symbols/PolygonSymbol3D.d.ts +2 -2
- package/symbols/patterns/LinePattern3D.d.ts +8 -0
- package/symbols/patterns/LineStylePattern3D.d.ts +1 -2
- package/symbols/patterns/Pattern3D.d.ts +9 -0
- package/symbols/patterns/StylePattern3D.d.ts +1 -2
- package/symbols/types.d.ts +7 -0
- package/unionTypes.d.ts +13 -13
- package/views/2d/analysis/types.d.ts +1 -0
- package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/BaseLayerView2D.d.ts +0 -5
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/StreamLayerView2D.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/support/MediaLayerInteractionOptions.js +1 -1
- package/views/3d/analysis/LineOfSightAnalysisView3D.d.ts +0 -2
- package/views/3d/analysis/types.d.ts +1 -0
- package/views/3d/environment/SunLighting.d.ts +1 -3
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/support/MediaLayerInteractionOptions.d.ts +4 -0
- package/views/3d/support/QualityProfile.js +1 -1
- package/views/3d/support/QualitySettings.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatFadeTexture.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Transform.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/PositionOutsideClipSpace.js +5 -0
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/LocalOriginManager.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/LegacyTransform.js +5 -0
- package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/PointRenderer.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/View.js +1 -1
- package/views/View2D.js +1 -1
- package/views/analysis/types.d.ts +4 -0
- package/views/input/types.d.ts +2 -4
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
- package/views/layers/CatalogLayerView.d.ts +1 -4
- package/views/layers/DimensionLayerView.d.ts +4 -6
- package/views/layers/DimensionLayerViewMixin.d.ts +0 -97
- package/views/layers/LineOfSightLayerView.d.ts +4 -6
- package/views/layers/LineOfSightLayerViewMixin.d.ts +0 -77
- package/views/layers/StreamLayerView.d.ts +31 -2
- package/views/support/WebAssemblyRequirements.js +5 -0
- package/views/support/WebGLRequirements.js +1 -1
- package/webdoc/support/SlideThumbnail.d.ts +6 -3
- package/webdoc/support/SlideThumbnail.js +1 -1
- package/webscene/spec-certification/api.js +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.d.ts +2 -2
- package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.js +1 -1
- package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.d.ts +2 -2
- package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.js +1 -1
- package/widgets/BatchAttributeForm/inputs/InputBase.js +1 -1
- package/widgets/BatchAttributeForm/inputs/TextElementInput.d.ts +7 -0
- package/widgets/BatchAttributeForm/inputs/TextElementInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/textInputElementUtils.js +5 -0
- package/widgets/BatchAttributeForm/templates/TextElementTemplate.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.d.ts +2 -2
- package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.js +1 -1
- package/widgets/Directions/DirectionsViewModel.d.ts +20 -4
- package/widgets/Directions/DirectionsViewModel.js +1 -1
- package/widgets/Directions.d.ts +2 -3
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.d.ts +2 -2
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.js +1 -1
- package/widgets/Editor/EditorViewModel.d.ts +2 -2
- package/widgets/Editor.d.ts +2 -2
- package/widgets/ElevationProfile/support/HoveredPoints.js +1 -1
- package/widgets/ElevationProfile/types.d.ts +3 -4
- package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
- package/widgets/Feature/types.d.ts +1 -5
- package/widgets/FeatureTable/Grid/types.d.ts +0 -2
- package/widgets/FeatureTable/support/types.d.ts +8 -8
- package/widgets/Features/FeaturesViewModel.d.ts +3 -3
- package/widgets/Features/FeaturesViewModel.js +1 -1
- package/widgets/LineOfSight/LineOfSightViewModel.d.ts +2 -2
- package/widgets/LineOfSight/LineOfSightViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
- package/widgets/Popup/types.d.ts +0 -2
- package/widgets/ShadowCast/ShadowCastVisibleElements.d.ts +2 -0
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch/types.d.ts +2 -2
- package/widgets/Slice/SliceViewModel.d.ts +2 -2
- package/widgets/Slice/SliceViewModel.js +1 -1
- package/widgets/Spinner/SpinnerViewModel.js +1 -1
- package/widgets/support/AnalysisViewModelMixin.js +5 -0
- package/widgets/support/AnchorElementViewModel.js +1 -1
- package/widgets/support/InteractiveToolViewModelMixin.js +5 -0
- package/assets/esri/core/workers/chunks/3c3d311b88f5400951ef.js +0 -1
- package/assets/esri/core/workers/chunks/4a060147d25929680ec8.js +0 -1
- package/assets/esri/core/workers/chunks/4d0eaeb4cd6cd55e25fd.js +0 -1
- package/assets/esri/core/workers/chunks/61801bb8c7be8fe77086.js +0 -1
- package/assets/esri/core/workers/chunks/62b28f73f814413c10fc.js +0 -1
- package/assets/esri/core/workers/chunks/6925f09d44cc38480d53.js +0 -1
- package/assets/esri/core/workers/chunks/98f4b44eca91c42ca08e.js +0 -1
- package/assets/esri/core/workers/chunks/990341f7c47bd656c782.js +0 -1
- package/assets/esri/core/workers/chunks/ba7f57788847cc0f68df.js +0 -1
- package/assets/esri/core/workers/chunks/bf06250be7a7a36306b1.js +0 -1
- package/assets/esri/core/workers/chunks/cd2708fb7636b3ace229.js +0 -1
- package/assets/esri/core/workers/chunks/f7d93aae350796b88562.js +0 -1
- package/assets/esri/core/workers/chunks/f95e488d2b86e320624f.js +0 -1
- package/layers/mixins/TemporalSceneLayer.d.ts +0 -177
- package/layers/mixins/TemporalSceneLayer.js +0 -5
- package/layers/mixins/properties/ILayerWithSave.d.ts +0 -11
- package/layers/support/ContingencyConstraintViolation.d.ts +0 -2
- package/layers/support/ContingentValue.d.ts +0 -2
- package/layers/support/ContingentValuesResult.d.ts +0 -2
- package/layers/support/ElevationQuery.d.ts +0 -35
- package/layers/support/ElevationQueryContext.d.ts +0 -37
- package/layers/support/FeatureReduction.d.ts +0 -3
- package/layers/support/FeatureReduction.js +0 -5
- package/layers/support/FieldGroup.d.ts +0 -2
- package/layers/support/FieldValueType.d.ts +0 -2
- package/layers/support/I3SLayer.d.ts +0 -9
- package/layers/support/ParquetGeometryEncodingBase.d.ts +0 -9
- package/layers/support/ParquetGeometryEncodingBase.js +0 -5
- package/layers/support/SimpleBandStatistics.d.ts +0 -10
- package/layers/support/source/DataLayerSource.d.ts +0 -171
- package/layers/support/source/DataLayerSource.js +0 -5
- package/layers/support/source/MapLayerSource.js +0 -5
- package/layers/support/source/QueryTableDataSource.js +0 -5
- package/layers/support/source/RasterDataSource.js +0 -5
- package/layers/support/source/TableDataSource.js +0 -5
- package/layers/support/source/types.d.ts +0 -4
- package/views/2d/layers/features/FeaturePipelineWorkerProxy.d.ts +0 -32
- package/views/3d/webgl-engine/shaders/GaussianSplatColorTechnique.js +0 -5
- package/views/3d/webgl-engine/shaders/GaussianSplatCompositionTechniqueConfiguration.js +0 -5
- package/views/3d/webgl-engine/shaders/GaussianSplatDepthTechnique.js +0 -5
- package/widgets/support/AnalysisViewModel.d.ts +0 -5
- package/widgets/support/AnalysisViewModel.js +0 -5
- package/widgets/support/AnchorElementViewModel.d.ts +0 -3
- package/widgets/support/InteractiveToolViewModel.d.ts +0 -4
- package/widgets/support/InteractiveToolViewModel.js +0 -5
- /package/webdoc/support/{thumbnailUtils.d.ts → types.d.ts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type Accessor from "../core/Accessor.js";
|
|
2
2
|
import type PortalItem from "./PortalItem.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { PortalItemResourceAddOrUpdateOptions, PortalItemResourceWithPath } from "./types.js";
|
|
4
4
|
import type { RequestOptions } from "../request/types.js";
|
|
5
5
|
|
|
6
6
|
export interface PortalItemResourceProperties extends Partial<Pick<PortalItemResource, "path" | "portalItem">> {}
|
|
@@ -42,7 +42,7 @@ export default class PortalItemResource extends Accessor {
|
|
|
42
42
|
* @returns When resolved, returns the `PortalItemResource`.
|
|
43
43
|
* @see [ArcGIS REST API - Update Item](https://developers.arcgis.com/rest/users-groups-and-items/update-item.htm)
|
|
44
44
|
*/
|
|
45
|
-
update(content: Blob, options?:
|
|
45
|
+
update(content: Blob, options?: PortalItemResourceAddOrUpdateOptions): Promise<PortalItemResourceWithPath>;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
export type PortalItemResourceFetchOptions = Pick<RequestOptions, "cacheBust" | "signal">;
|
package/portal/PortalUser.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type Portal from "./Portal.js";
|
|
|
5
5
|
import type PortalQueryResult from "./PortalQueryResult.js";
|
|
6
6
|
import type { JSONSupport, JSONSupportMixinProperties } from "../core/JSONSupport.js";
|
|
7
7
|
import type { PortalQueryParamsProperties } from "./PortalQueryParams.js";
|
|
8
|
-
import type {
|
|
8
|
+
import type { AddItemParameters, DeleteItemsResult, FetchItemsParameters, FetchItemsResult } from "./types.js";
|
|
9
9
|
|
|
10
10
|
export interface PortalUserProperties extends JSONSupportMixinProperties, Partial<Pick<PortalUser, "access" | "culture" | "description" | "email" | "fullName" | "id" | "orgId" | "portal" | "preferredView" | "privileges" | "region" | "role" | "roleId" | "sourceJSON" | "units" | "username">> {
|
|
11
11
|
/** The date the user was created. */
|
|
@@ -108,7 +108,7 @@ export default class PortalUser extends JSONSupport {
|
|
|
108
108
|
* @returns When resolved, returns the [PortalItem](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalItem.html) to be
|
|
109
109
|
* added to the user's content.
|
|
110
110
|
*/
|
|
111
|
-
addItem(params:
|
|
111
|
+
addItem(params: AddItemParameters): Promise<PortalItem>;
|
|
112
112
|
/**
|
|
113
113
|
* Deletes an item from the user's portal content.
|
|
114
114
|
*
|
|
@@ -211,7 +211,7 @@ export default class PortalUser extends JSONSupport {
|
|
|
211
211
|
* });
|
|
212
212
|
* });
|
|
213
213
|
*/
|
|
214
|
-
fetchItems(params?:
|
|
214
|
+
fetchItems(params?: FetchItemsParameters): Promise<FetchItemsResult>;
|
|
215
215
|
/**
|
|
216
216
|
* Fetches the tag objects that have been created by the portal user.
|
|
217
217
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PortalItemResourceWithPath } from "../types.js";
|
|
2
2
|
|
|
3
3
|
/** Parameters used when fetching portal item resources using [PortalItem.fetchResources()](https://developers.arcgis.com/javascript/latest/api-reference/esri-portal-PortalItem.html#fetchResources). */
|
|
4
|
-
export interface
|
|
4
|
+
export interface FetchResourcesParameters {
|
|
5
5
|
/**
|
|
6
6
|
* The maximum number of results to be included in the [FetchResourcesResult.resources](#FetchResourcesResult) set response. The maximum value allowed is
|
|
7
7
|
* `100`. The `start` property combined with the `num` property can be used to paginate the search results.
|
|
@@ -49,7 +49,7 @@ export interface FetchResource {
|
|
|
49
49
|
/** When the resource was created. */
|
|
50
50
|
created: Date;
|
|
51
51
|
/** Relative path of the resource. */
|
|
52
|
-
resource:
|
|
52
|
+
resource: PortalItemResourceWithPath;
|
|
53
53
|
/** The size of the resource in bytes. */
|
|
54
54
|
size: number;
|
|
55
55
|
}
|
package/portal/types.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import type { AbortOptions } from "../core/promiseUtils.js";
|
|
|
6
6
|
|
|
7
7
|
export type PortalAuthMode = "anonymous" | "auto" | "immediate" | "no-prompt";
|
|
8
8
|
|
|
9
|
-
export interface
|
|
9
|
+
export interface ItemUpdateParameters {
|
|
10
10
|
/**
|
|
11
11
|
* **Optional**. The component used to stream
|
|
12
12
|
* the data represented by the item to the client.
|
|
@@ -14,7 +14,7 @@ export interface ItemUpdateParams {
|
|
|
14
14
|
data?: any;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
export interface
|
|
17
|
+
export interface PortalItemResourceAddOrUpdateOptions extends AbortOptions {
|
|
18
18
|
/**
|
|
19
19
|
* Indicates the level of access to the resource. The default is
|
|
20
20
|
* "inherit" which causes the resource to have the same access level as the owning item.
|
|
@@ -24,9 +24,9 @@ export interface IPortalItemResourceAddOrUpdateOptions extends AbortOptions {
|
|
|
24
24
|
access?: "inherit" | "private";
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
export interface
|
|
27
|
+
export interface PortalItemResourceWithPath extends PortalItemResource {}
|
|
28
28
|
|
|
29
|
-
export interface
|
|
29
|
+
export interface AddItemParameters {
|
|
30
30
|
/**
|
|
31
31
|
* The component used to stream
|
|
32
32
|
* the data represented by the item to the client.
|
|
@@ -51,7 +51,7 @@ export interface DeleteItemsResult {
|
|
|
51
51
|
success: boolean;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
export interface
|
|
54
|
+
export interface FetchItemsParameters {
|
|
55
55
|
/** The folder to retrieve items from. When `folder` is not specified, the `includeSubfolderItems` parameter can be used to include items from subfolders. */
|
|
56
56
|
folder?: PortalFolder;
|
|
57
57
|
/**
|
|
@@ -103,7 +103,7 @@ export interface FetchItemsResult {
|
|
|
103
103
|
total: number;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
export interface
|
|
106
|
+
export interface FetchRelatedItemsParameters {
|
|
107
107
|
/**
|
|
108
108
|
* The direction of the relationship. Can either
|
|
109
109
|
* be `forward` (from origin to destination) or `reverse` (from destination to origin).
|
|
@@ -3,6 +3,7 @@ import type PointCloudRGBRenderer from "../../PointCloudRGBRenderer.js";
|
|
|
3
3
|
import type PointCloudStretchRenderer from "../../PointCloudStretchRenderer.js";
|
|
4
4
|
import type PointCloudUniqueValueRenderer from "../../PointCloudUniqueValueRenderer.js";
|
|
5
5
|
|
|
6
|
+
/** Union of all point cloud renderers. */
|
|
6
7
|
export type PointCloudRendererUnion = PointCloudClassBreaksRenderer | PointCloudRGBRenderer | PointCloudStretchRenderer | PointCloudUniqueValueRenderer;
|
|
7
8
|
|
|
8
9
|
export type PointCloudRendererType = PointCloudRendererUnion["type"];
|
|
@@ -51,4 +51,5 @@ export interface ClassBreaksParameters {
|
|
|
51
51
|
numClasses?: number;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
+
/** Union of all raster renderers. */
|
|
54
55
|
export type RasterRendererUnion = ClassBreaksRenderer | FlowRenderer | RasterColormapRenderer | RasterShadedReliefRenderer | RasterStretchRenderer | UniqueValueRenderer | VectorFieldRenderer;
|
package/renderers/types.d.ts
CHANGED
|
@@ -85,6 +85,8 @@ export type DictionaryUserConfig = Object;
|
|
|
85
85
|
|
|
86
86
|
export type DictionaryFieldMap = Record<string, string>;
|
|
87
87
|
|
|
88
|
+
/** Union of all renderers with visual variables. */
|
|
88
89
|
export type RendererWithVisualVariablesUnion = SimpleRenderer | ClassBreaksRenderer | UniqueValueRenderer | DotDensityRenderer | DictionaryRenderer | PieChartRenderer;
|
|
89
90
|
|
|
91
|
+
/** Union of renderers. */
|
|
90
92
|
export type RendererUnion = RendererWithVisualVariablesUnion | HeatmapRenderer;
|
|
@@ -13,8 +13,6 @@ export type EsriGraphPropertyRoles = "esriGraphPropertyUNSPECIFIED" | "esriGraph
|
|
|
13
13
|
|
|
14
14
|
export type EsriIdentifierInfoTypes = "esriIdentifierInfoTypeUNSPECIFIED" | "esriIdentifierInfoTypeDatabaseNative" | "esriIdentifierInfoTypeUniformProperty";
|
|
15
15
|
|
|
16
|
-
export type EsriDomainTypes = "unspecified" | "codedValue" | "range";
|
|
17
|
-
|
|
18
16
|
export type EsriMergePolicyTypes = "esriMergePolicyType_UNSPECIFIED" | "esriMergePolicyTypeSumValues" | "esriMergePolicyTypeAreaWeighted" | "esriMergePolicyTypeDefaultValue";
|
|
19
17
|
|
|
20
18
|
export type EsriSplitPolicyTypes = "esriSplitPolicyType_UNSPECIFIED" | "esriSplitPolicyTypeGeometryRatio" | "esriSplitPolicyTypeDuplicate" | "esriSplitPolicyTypeDefaultValue";
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import type Field from "../../layers/support/Field.js";
|
|
2
|
+
import type JoinTableDataSource from "./JoinTableDataSource.js";
|
|
3
|
+
import type QueryTableDataSource from "./QueryTableDataSource.js";
|
|
4
|
+
import type RasterDataSource from "./RasterDataSource.js";
|
|
5
|
+
import type TableDataSource from "./TableDataSource.js";
|
|
6
|
+
import type { JSONSupport, JSONSupportMixinProperties } from "../../core/JSONSupport.js";
|
|
7
|
+
import type { FieldProperties } from "../../layers/support/Field.js";
|
|
8
|
+
import type { TableDataSourceProperties } from "./TableDataSource.js";
|
|
9
|
+
import type { RasterDataSourceProperties } from "./RasterDataSource.js";
|
|
10
|
+
import type { QueryTableDataSourceProperties } from "./QueryTableDataSource.js";
|
|
11
|
+
import type { JoinTableDataSourceProperties } from "./JoinTableDataSource.js";
|
|
12
|
+
|
|
13
|
+
export interface DynamicDataLayerProperties extends JSONSupportMixinProperties {
|
|
14
|
+
/**
|
|
15
|
+
* A table,
|
|
16
|
+
* feature class, or raster that resides in a registered workspace (either a folder or geodatabase).
|
|
17
|
+
* The data sources are not visible in the Services Directory by default. They may be viewed, published, and configured using
|
|
18
|
+
* the ArcGIS Server Manager.
|
|
19
|
+
*/
|
|
20
|
+
dataSource?: (JoinTableDataSourceProperties & { type: "join-table" }) | (QueryTableDataSourceProperties & { type: "query-table" }) | (RasterDataSourceProperties & { type: "raster" }) | (TableDataSourceProperties & { type: "table" });
|
|
21
|
+
/**
|
|
22
|
+
* Controls field visibility in the layer. Only specified fields will be visible.
|
|
23
|
+
* If `null`, all fields are visible in the dynamic layer. The specification for a field object is
|
|
24
|
+
* provided below.
|
|
25
|
+
*/
|
|
26
|
+
fields?: FieldProperties[];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* A dynamic data layer is a layer created on-the-fly with data stored in a
|
|
31
|
+
* [registered workspace](https://enterprise.arcgis.com/en/server/latest/manage-data/windows/overview-register-data-with-arcgis-server.htm). This is data that can be rendered and queried on the fly,
|
|
32
|
+
* but that isn't explicitly exposed as a service sublayer.
|
|
33
|
+
* Depending on the type of data source, these layers are classified as
|
|
34
|
+
* one of the following:
|
|
35
|
+
*
|
|
36
|
+
* Data source | Description
|
|
37
|
+
* ------------|------------
|
|
38
|
+
* [TableDataSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-layerSources-TableDataSource.html) | A feature class with geometries or table without geometries. When a table data source does not contain geometries, it may be used as one of the sources in a {@link rest/layerSources/DataLayerSource!JoinTableDataSource join operation}. Feature class tables may be used on their own since they contain a geometry field.
|
|
39
|
+
* [QueryTableDataSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-layerSources-QueryTableDataSource.html) | A feature class or table that may be queried on the fly with a SQL where clause. This data source is useful for scenarios where you have a table containing unique geometries and another table with multiple records that match to each geometry. You can use the QueryTableDataSource to select only a subset of those matching records (so records in both tables have a one-to-one relationship with each other) and join them to the table with geometries.
|
|
40
|
+
* [RasterDataSource](https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-layerSources-RasterDataSource.html) | A raster dataset used for visualization purposes only.
|
|
41
|
+
* {@link rest/layerSources/DataLayerSource!JoinTableDataSource} | This data source consists of two data sources joined by a common attribute or key. The left table data source typically contains geometries, while the right source may be a table or query table without geometries.
|
|
42
|
+
*
|
|
43
|
+
* @see [Sample - MapImageLayer: toggle sublayer visibility](https://developers.arcgis.com/javascript/latest/sample-code/layers-mapimagelayer-sublayers/)
|
|
44
|
+
* @see [Sample - MapImageLayer: dynamic data layer with table join](https://developers.arcgis.com/javascript/latest/sample-code/layers-dynamicdatalayer-table-join/)
|
|
45
|
+
* @see [Sample - MapImageLayer: dynamic data layer with query table](https://developers.arcgis.com/javascript/latest/sample-code/layers-dynamicdatalayer-query-table/)
|
|
46
|
+
* @see [Sample - MapImageLayer: raster data source](https://developers.arcgis.com/javascript/latest/sample-code/layers-dynamicdatalayer-raster/)
|
|
47
|
+
* @see [ArcGIS REST API - Dynamic data layer](https://developers.arcgis.com/rest/services-reference/enterprise/layer-source-object/#dynamic-data-layer)
|
|
48
|
+
* @example
|
|
49
|
+
* let layer = new MapImageLayer({
|
|
50
|
+
* url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer",
|
|
51
|
+
* sublayers: [{
|
|
52
|
+
* id: 0,
|
|
53
|
+
* renderer: renderer,
|
|
54
|
+
* opacity: 0.9,
|
|
55
|
+
* source: {
|
|
56
|
+
* type: "data-layer",
|
|
57
|
+
* dataSource: {
|
|
58
|
+
* type: "join-table",
|
|
59
|
+
* leftTableSource: {
|
|
60
|
+
* type: "map-layer",
|
|
61
|
+
* mapLayerId: 3
|
|
62
|
+
* },
|
|
63
|
+
* rightTableSource: {
|
|
64
|
+
* type: "data-layer",
|
|
65
|
+
* // references a table in a registered workspace that doesn't have geometries
|
|
66
|
+
* dataSource: {
|
|
67
|
+
* type: "table",
|
|
68
|
+
* workspaceId: "CensusFileGDBWorkspaceID",
|
|
69
|
+
* dataSourceName: "ancestry"
|
|
70
|
+
* }
|
|
71
|
+
* },
|
|
72
|
+
* leftTableKey: "STATE_NAME",
|
|
73
|
+
* rightTableKey: "State",
|
|
74
|
+
* joinType: "left-outer-join"
|
|
75
|
+
* }
|
|
76
|
+
* }
|
|
77
|
+
* }
|
|
78
|
+
* ]
|
|
79
|
+
* });
|
|
80
|
+
*/
|
|
81
|
+
export default abstract class DynamicDataLayer extends JSONSupport {
|
|
82
|
+
/**
|
|
83
|
+
* A table,
|
|
84
|
+
* feature class, or raster that resides in a registered workspace (either a folder or geodatabase).
|
|
85
|
+
* The data sources are not visible in the Services Directory by default. They may be viewed, published, and configured using
|
|
86
|
+
* the ArcGIS Server Manager.
|
|
87
|
+
*/
|
|
88
|
+
get dataSource(): JoinTableDataSource | QueryTableDataSource | RasterDataSource | TableDataSource;
|
|
89
|
+
set dataSource(value: (JoinTableDataSourceProperties & { type: "join-table" }) | (QueryTableDataSourceProperties & { type: "query-table" }) | (RasterDataSourceProperties & { type: "raster" }) | (TableDataSourceProperties & { type: "table" }));
|
|
90
|
+
/**
|
|
91
|
+
* Controls field visibility in the layer. Only specified fields will be visible.
|
|
92
|
+
* If `null`, all fields are visible in the dynamic layer. The specification for a field object is
|
|
93
|
+
* provided below.
|
|
94
|
+
*/
|
|
95
|
+
get fields(): Field[];
|
|
96
|
+
set fields(value: FieldProperties[]);
|
|
97
|
+
/**
|
|
98
|
+
* This value is always `data-layer` and is inferred when
|
|
99
|
+
* the `dataSource` property is set.
|
|
100
|
+
*/
|
|
101
|
+
get type(): "data-layer";
|
|
102
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{__decorate as r}from"tslib";import{JSONSupport as e}from"../../core/JSONSupport.js";import{property as o,subclass as t}from"../../core/accessorSupport/decorators.js";import{ensureType as a}from"../../core/accessorSupport/ensureType.js";import s from"../../layers/support/Field.js";import p from"./JoinTableDataSource.js";import i from"./QueryTableDataSource.js";import c from"./RasterDataSource.js";import m from"./TableDataSource.js";import{registerDynamicDataLayerClass as u}from"./utils.js";import{enumeration as l}from"../../core/accessorSupport/decorators/enumeration.js";var y;const d={key:"type",base:null,typeMap:{"join-table":p,"query-table":i,raster:c,table:m}};let n=class extends e{static{y=this}constructor(r){super(r),this.type="data-layer"}clone(){const{fields:r,dataSource:e}=this;return new y({fields:r,dataSource:e})}};r([l({dataLayer:"data-layer"}),o({json:{write:{isRequired:!0}}})],n.prototype,"type",void 0),r([o({type:[s],json:{write:!0}})],n.prototype,"fields",void 0),r([o({types:d,json:{write:!0}})],n.prototype,"dataSource",void 0),n=y=r([t("esri.rest.layerSources.DynamicDataLayer")],n),n.from=a(n),u(n);export{n as default};
|
package/{layers/support/source/MapLayerSource.d.ts → rest/layerSources/DynamicMapLayer.d.ts}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { JSONSupport, JSONSupportMixinProperties } from "
|
|
1
|
+
import type { JSONSupport, JSONSupportMixinProperties } from "../../core/JSONSupport.js";
|
|
2
2
|
|
|
3
|
-
export interface
|
|
3
|
+
export interface DynamicMapLayerProperties extends JSONSupportMixinProperties, Partial<Pick<DynamicMapLayer, "gdbVersion" | "mapLayerId">> {}
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* A dynamic map layer refers to a layer published in a map service that has
|
|
@@ -10,7 +10,7 @@ export interface MapLayerSourceProperties extends JSONSupportMixinProperties, Pa
|
|
|
10
10
|
* expressions, renderers, and other properties.
|
|
11
11
|
*
|
|
12
12
|
* @see [Sample - MapImageLayer: create dynamic map layers](https://developers.arcgis.com/javascript/latest/sample-code/layers-dynamicmaplayer/)
|
|
13
|
-
* @see [ArcGIS REST API -
|
|
13
|
+
* @see [ArcGIS REST API - Dynamic map layer](https://developers.arcgis.com/rest/services-reference/enterprise/layer-source-object/#dynamic-map-layer)
|
|
14
14
|
* @example
|
|
15
15
|
* // Creates two sublayers that point to the same map service layer.
|
|
16
16
|
* // Each layer presents different features in the data using
|
|
@@ -41,7 +41,7 @@ export interface MapLayerSourceProperties extends JSONSupportMixinProperties, Pa
|
|
|
41
41
|
* }]
|
|
42
42
|
* });
|
|
43
43
|
*/
|
|
44
|
-
export default abstract class
|
|
44
|
+
export default abstract class DynamicMapLayer extends JSONSupport {
|
|
45
45
|
/** An optional property for specifying the GDB version. */
|
|
46
46
|
accessor gdbVersion: string;
|
|
47
47
|
/** The [Sublayer#id](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Sublayer.html#id) of the service sublayer. */
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{__decorate as r}from"tslib";import{JSONSupport as e}from"../../core/JSONSupport.js";import{property as o,subclass as t}from"../../core/accessorSupport/decorators.js";import{Integer as s}from"../../core/accessorSupport/ensureType.js";import{enumeration as p}from"../../core/accessorSupport/decorators/enumeration.js";var a;let i=a=class extends e{constructor(r){super(r),this.type="map-layer"}clone(){const{mapLayerId:r,gdbVersion:e}=this;return new a({mapLayerId:r,gdbVersion:e})}};r([p({mapLayer:"map-layer"}),o({json:{write:{isRequired:!0}}})],i.prototype,"type",void 0),r([o({type:s,json:{write:{isRequired:!0}}})],i.prototype,"mapLayerId",void 0),r([o({type:String,json:{write:!0}})],i.prototype,"gdbVersion",void 0),i=a=r([t("esri.rest.layerSources.DynamicMapLayer")],i);export{i as default};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type DynamicDataLayer from "./DynamicDataLayer.js";
|
|
2
|
+
import type DynamicMapLayer from "./DynamicMapLayer.js";
|
|
3
|
+
import type { JSONSupport, JSONSupportMixinProperties } from "../../core/JSONSupport.js";
|
|
4
|
+
|
|
5
|
+
export interface JoinTableDataSourceProperties extends JSONSupportMixinProperties, Partial<Pick<JoinTableDataSource, "joinType" | "leftTableKey" | "leftTableSource" | "rightTableKey" | "rightTableSource">> {}
|
|
6
|
+
|
|
7
|
+
export type JoinType = "left-inner-join" | "left-outer-join";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The result of an on-the-fly join operation at runtime. Nested joins are supported.
|
|
11
|
+
* To use nested joins, set either `leftTableSource` or `rightTableSource` to `join-table`.
|
|
12
|
+
*
|
|
13
|
+
* @see [Sample - MapImageLayer: dynamic data layer with table join](https://developers.arcgis.com/javascript/latest/sample-code/layers-dynamicdatalayer-table-join/)
|
|
14
|
+
* @see [ArcGIS REST API - Join table data source](https://developers.arcgis.com/rest/services-reference/enterprise/data-source-object/#join-table-data-source)
|
|
15
|
+
* @example
|
|
16
|
+
* let layer = new MapImageLayer({
|
|
17
|
+
* url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer",
|
|
18
|
+
* sublayers: [{
|
|
19
|
+
* id: 0,
|
|
20
|
+
* renderer: renderer,
|
|
21
|
+
* opacity: 0.9,
|
|
22
|
+
* source: {
|
|
23
|
+
* type: "data-layer",
|
|
24
|
+
* dataSource: {
|
|
25
|
+
* type: "join-table",
|
|
26
|
+
* leftTableSource: {
|
|
27
|
+
* type: "map-layer",
|
|
28
|
+
* mapLayerId: 3
|
|
29
|
+
* },
|
|
30
|
+
* rightTableSource: {
|
|
31
|
+
* type: "data-layer",
|
|
32
|
+
* dataSource: {
|
|
33
|
+
* type: "table",
|
|
34
|
+
* workspaceId: "CensusFileGDBWorkspaceID",
|
|
35
|
+
* dataSourceName: "ancestry"
|
|
36
|
+
* }
|
|
37
|
+
* },
|
|
38
|
+
* leftTableKey: "STATE_NAME",
|
|
39
|
+
* rightTableKey: "State",
|
|
40
|
+
* joinType: "left-outer-join"
|
|
41
|
+
* }
|
|
42
|
+
* }
|
|
43
|
+
* }]
|
|
44
|
+
* });
|
|
45
|
+
*/
|
|
46
|
+
export default abstract class JoinTableDataSource extends JSONSupport {
|
|
47
|
+
/**
|
|
48
|
+
* The type of join that will be performed.
|
|
49
|
+
*
|
|
50
|
+
* Possible Value | Description
|
|
51
|
+
* ---------------|------------
|
|
52
|
+
* left-outer-join | Unmatched records in the left table source are preserved and joined with `null` values in the right table source.
|
|
53
|
+
* left-inner-join | Records in the left table source are discarded if they are unmatched with records in the right table source.
|
|
54
|
+
*/
|
|
55
|
+
joinType: JoinType;
|
|
56
|
+
/**
|
|
57
|
+
* The field name used for joining or matching records in the left table to
|
|
58
|
+
* records in the right table.
|
|
59
|
+
*/
|
|
60
|
+
accessor leftTableKey: string;
|
|
61
|
+
/** The left table for joining to the right table source. This can either be a dynamic map layer or a dynamic data layer. The dynamic data layer may contain another join data source used for nested joining. */
|
|
62
|
+
accessor leftTableSource: DynamicMapLayer | DynamicDataLayer;
|
|
63
|
+
/**
|
|
64
|
+
* The field name used for joining or matching records in the right table
|
|
65
|
+
* to records in the left table.
|
|
66
|
+
*/
|
|
67
|
+
accessor rightTableKey: string;
|
|
68
|
+
/** The right table for joining to the left table source. This can either be a dynamic map layer or a dynamic data layer. The dynamic data layer may contain another join data source used for nested joining. */
|
|
69
|
+
accessor rightTableSource: DynamicMapLayer | DynamicDataLayer;
|
|
70
|
+
/**
|
|
71
|
+
* This value is always `join-table` and is inferred when other
|
|
72
|
+
* join table properties of this object are set.
|
|
73
|
+
*/
|
|
74
|
+
get type(): "join-table";
|
|
75
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{__decorate as e}from"tslib";import{strict as r}from"../../core/jsonMap.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import{cast as c}from"../../core/accessorSupport/decorators/cast.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{enumeration as a}from"../../core/accessorSupport/decorators/enumeration.js";import{reader as i}from"../../core/accessorSupport/decorators/reader.js";import{ensureOneOfType as p}from"../../core/accessorSupport/ensureType.js";import{getTypesReader as l,getLayerSourceTypes as u}from"./utils.js";var n;const b=r()({esriLeftInnerJoin:"left-inner-join",esriLeftOuterJoin:"left-outer-join"});let S=n=class extends o{constructor(e){super(e),this.type="join-table"}readLeftTableSource(e,r,o){return l()(e,r,o)}castLeftTableSource(e){return p(u(),e)}readRightTableSource(e,r,o){return l()(e,r,o)}castRightTableSource(e){return p(u(),e)}clone(){const{leftTableKey:e,rightTableKey:r,leftTableSource:o,rightTableSource:t,joinType:c}=this,s={leftTableKey:e,rightTableKey:r,leftTableSource:o?.clone()??void 0,rightTableSource:t?.clone()??void 0,joinType:c};return new n(s)}};e([a({joinTable:"join-table"}),t({json:{write:{isRequired:!0}}})],S.prototype,"type",void 0),e([t({type:String,json:{write:!0}})],S.prototype,"leftTableKey",void 0),e([t({type:String,json:{write:!0}})],S.prototype,"rightTableKey",void 0),e([t({json:{write:!0}})],S.prototype,"leftTableSource",void 0),e([i("leftTableSource")],S.prototype,"readLeftTableSource",null),e([c("leftTableSource")],S.prototype,"castLeftTableSource",null),e([t({json:{write:!0}})],S.prototype,"rightTableSource",void 0),e([i("rightTableSource")],S.prototype,"readRightTableSource",null),e([c("rightTableSource")],S.prototype,"castRightTableSource",null),e([a(b)],S.prototype,"joinType",void 0),S=n=e([s("esri.rest.layerSources.JoinTableDataSource")],S);const T=S;export{T as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type SpatialReference from "
|
|
2
|
-
import type { JSONSupport, JSONSupportMixinProperties } from "
|
|
3
|
-
import type { FeatureGeometryType } from "
|
|
4
|
-
import type { SpatialReferenceProperties } from "
|
|
1
|
+
import type SpatialReference from "../../geometry/SpatialReference.js";
|
|
2
|
+
import type { JSONSupport, JSONSupportMixinProperties } from "../../core/JSONSupport.js";
|
|
3
|
+
import type { FeatureGeometryType } from "../../geometry/types.js";
|
|
4
|
+
import type { SpatialReferenceProperties } from "../../geometry/SpatialReference.js";
|
|
5
5
|
|
|
6
6
|
export interface QueryTableDataSourceProperties extends JSONSupportMixinProperties, Partial<Pick<QueryTableDataSource, "geometryType" | "oidFields" | "query" | "workspaceId">> {
|
|
7
7
|
/** The spatial reference of the geometry of each feature in the table source. */
|
|
@@ -23,7 +23,7 @@ export interface QueryTableDataSourceProperties extends JSONSupportMixinProperti
|
|
|
23
23
|
* so records in both tables have a one-to-one relationship with each other.
|
|
24
24
|
*
|
|
25
25
|
* @see [Sample - MapImageLayer: dynamic data layer with query table](https://developers.arcgis.com/javascript/latest/sample-code/layers-dynamicdatalayer-query-table/)
|
|
26
|
-
* @see [ArcGIS REST API -
|
|
26
|
+
* @see [ArcGIS REST API - Query table data source](https://developers.arcgis.com/rest/services-reference/enterprise/data-source-object/#query-table-data-source)
|
|
27
27
|
* @example
|
|
28
28
|
* let layer = new MapImageLayer({
|
|
29
29
|
* url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer",
|
|
@@ -42,13 +42,14 @@ export interface QueryTableDataSourceProperties extends JSONSupportMixinProperti
|
|
|
42
42
|
* }]
|
|
43
43
|
* });
|
|
44
44
|
*/
|
|
45
|
-
export default
|
|
45
|
+
export default class QueryTableDataSource extends JSONSupport {
|
|
46
|
+
constructor(properties?: QueryTableDataSourceProperties);
|
|
46
47
|
/** The geometry type of each record in the table. */
|
|
47
48
|
geometryType: FeatureGeometryType;
|
|
48
49
|
/**
|
|
49
50
|
* The field name(s) containing the unique IDs for each
|
|
50
51
|
* record in the table. This can be a comma separated list if the query table is used
|
|
51
|
-
* in a
|
|
52
|
+
* in a {@link rest/layerSources/DataLayerSource!JoinTableDataSource JoinTableDataSource}.
|
|
52
53
|
*/
|
|
53
54
|
accessor oidFields: string;
|
|
54
55
|
/** The SQL query used to filter records. */
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{__decorate as e}from"tslib";import{JSONSupport as r}from"../../core/JSONSupport.js";import{property as o,subclass as t}from"../../core/accessorSupport/decorators.js";import p from"../../geometry/SpatialReference.js";import{featureGeometryTypeKebabDictionary as s}from"../../geometry/support/typeUtils.js";import{enumeration as i}from"../../core/accessorSupport/decorators/enumeration.js";var y;let a=y=class extends r{constructor(e){super(e),this.type="query-table"}clone(){const{workspaceId:e,query:r,oidFields:o,spatialReference:t,geometryType:p}=this,s={workspaceId:e,query:r,oidFields:o,spatialReference:t?.clone()??void 0,geometryType:p};return new y(s)}};e([i({queryTable:"query-table"}),o({json:{write:{isRequired:!0}}})],a.prototype,"type",void 0),e([o({type:String,json:{write:!0}})],a.prototype,"workspaceId",void 0),e([o({type:String,json:{write:!0}})],a.prototype,"query",void 0),e([o({type:String,json:{write:!0}})],a.prototype,"oidFields",void 0),e([o({type:p,json:{write:!0}})],a.prototype,"spatialReference",void 0),e([i(s)],a.prototype,"geometryType",void 0),a=y=e([t("esri.rest.layerSources.QueryTableDataSource")],a);const c=a;export{c as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { JSONSupport, JSONSupportMixinProperties } from "
|
|
1
|
+
import type { JSONSupport, JSONSupportMixinProperties } from "../../core/JSONSupport.js";
|
|
2
2
|
|
|
3
3
|
export interface RasterDataSourceProperties extends JSONSupportMixinProperties, Partial<Pick<RasterDataSource, "dataSourceName" | "workspaceId">> {}
|
|
4
4
|
|
|
@@ -7,7 +7,7 @@ export interface RasterDataSourceProperties extends JSONSupportMixinProperties,
|
|
|
7
7
|
* only be displayed in the view, not queried or assigned a renderer.
|
|
8
8
|
*
|
|
9
9
|
* @see [Sample - MapImageLayer: raster data source](https://developers.arcgis.com/javascript/latest/sample-code/layers-dynamicdatalayer-raster/)
|
|
10
|
-
* @see [ArcGIS REST API -
|
|
10
|
+
* @see [ArcGIS REST API - Raster data source](https://developers.arcgis.com/rest/services-reference/enterprise/data-source-object/#raster-data-source)
|
|
11
11
|
* @example
|
|
12
12
|
* let layer = new MapImageLayer({
|
|
13
13
|
* url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/Elevation/GlacierBay/MapServer",
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{__decorate as r}from"tslib";import{JSONSupport as e}from"../../core/JSONSupport.js";import{property as o,subclass as t}from"../../core/accessorSupport/decorators.js";import{enumeration as s}from"../../core/accessorSupport/decorators/enumeration.js";var a;let p=a=class extends e{constructor(r){super(r),this.type="raster"}clone(){const{workspaceId:r,dataSourceName:e}=this;return new a({workspaceId:r,dataSourceName:e})}};r([s({raster:"raster"}),o({json:{write:{isRequired:!0}}})],p.prototype,"type",void 0),r([o({type:String,json:{write:!0}})],p.prototype,"dataSourceName",void 0),r([o({type:String,json:{write:!0}})],p.prototype,"workspaceId",void 0),p=a=r([t("esri.rest.layerSources.RasterDataSource")],p);const c=p;export{c as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { JSONSupport, JSONSupportMixinProperties } from "
|
|
1
|
+
import type { JSONSupport, JSONSupportMixinProperties } from "../../core/JSONSupport.js";
|
|
2
2
|
|
|
3
3
|
export interface TableDataSourceProperties extends JSONSupportMixinProperties, Partial<Pick<TableDataSource, "dataSourceName" | "gdbVersion" | "workspaceId">> {}
|
|
4
4
|
|
|
@@ -9,7 +9,7 @@ export interface TableDataSourceProperties extends JSONSupportMixinProperties, P
|
|
|
9
9
|
*
|
|
10
10
|
* @see [Sample - MapImageLayer: toggle sublayer visibility](https://developers.arcgis.com/javascript/latest/sample-code/layers-mapimagelayer-sublayers/)
|
|
11
11
|
* @see [Sample - MapImageLayer: dynamic data layer with table join](https://developers.arcgis.com/javascript/latest/sample-code/layers-dynamicdatalayer-table-join/)
|
|
12
|
-
* @see [ArcGIS REST API -
|
|
12
|
+
* @see [ArcGIS REST API - Table data source](https://developers.arcgis.com/rest/services-reference/enterprise/data-source-object/#table-data-source)
|
|
13
13
|
* @example
|
|
14
14
|
* let layer = new MapImageLayer({
|
|
15
15
|
* url: "https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer",
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{__decorate as e}from"tslib";import{JSONSupport as o}from"../../core/JSONSupport.js";import{property as r,subclass as t}from"../../core/accessorSupport/decorators.js";import{enumeration as s}from"../../core/accessorSupport/decorators/enumeration.js";var a;let p=a=class extends o{constructor(e){super(e),this.type="table"}clone(){const{workspaceId:e,gdbVersion:o,dataSourceName:r}=this;return new a({workspaceId:e,gdbVersion:o,dataSourceName:r})}};e([s({table:"table"}),r({json:{write:{isRequired:!0}}})],p.prototype,"type",void 0),e([r({type:String,json:{write:!0}})],p.prototype,"workspaceId",void 0),e([r({type:String,json:{write:!0}})],p.prototype,"gdbVersion",void 0),e([r({type:String,json:{write:!0}})],p.prototype,"dataSourceName",void 0),p=a=e([t("esri.rest.layerSources.TableDataSource")],p);const i=p;export{i as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{createTypeReader as e}from"../../core/accessorSupport/extensions/serializableProperty/reader.js";import r from"./DynamicMapLayer.js";let l=null;function t(e){o=null,n=null,l=e}let n=null;function a(){return n||(n=e({types:p()})),n}let o=null;function p(){return o||(o={key:"type",base:null,typeMap:{"data-layer":l,"map-layer":r}}),o}export{p as getLayerSourceTypes,a as getTypesReader,t as registerDynamicDataLayerClass};
|
package/rest/print.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{id as e}from"../kernel.js";import t from"../request.js";import{JSONMap as a}from"../core/jsonMap.js";import{createScreenPoint as i,pt2px as r,px2pt as n}from"../core/screenUtils.js";import{dataComponents as o,normalize as s}from"../core/urlUtils.js";import l from"../geometry/Polygon.js";import{collectLabelingFields as c}from"../layers/support/fieldUtils.js";import{getFloorFilterClause as u}from"../layers/support/floorFilterUtils.js";import{getSizeRangeAtScale as y}from"../renderers/visualVariables/support/visualVariableUtils.js";import{asValidOptions as f,findToken as p}from"./utils.js";import{execute as d}from"./geoprocessor/execute.js";import{submitJob as m}from"./geoprocessor/submitJob.js";import{formatJsonMap as g}from"./support/fileFormat.js";import{toJSON as b}from"./support/layoutTemplate.js";import{getVisibleLayerViews as h,isScreenshotRequired as w,isBingMapsLayer as S,isBlendLayer as I,getCopyright as x,getSelectionSymbol as v,createPointLayer as D,createPolygonLayer as T,createPolylineLayer as L,createMultipointLayer as O,getContextBoundingBox as V}from"./support/printTaskUtils.js";import E from"./support/PrintTemplate.js";import{toJSON as P}from"./support/reportTemplate.js";import M from"../symbols/WebStyleSymbol.js";import{getDefaultHighlightOptions as F}from"../views/2d/support/highlightOptionsUtils.js";import k from"../views/support/HighlightOptions.js";const N={Feet:"ft",Kilometers:"km",Meters:"m",Miles:"mi"},j=new a({esriFeet:"Feet",esriKilometers:"Kilometers",esriMeters:"Meters",esriMiles:"Miles"}),R=new a({esriExecutionTypeSynchronous:"sync",esriExecutionTypeAsynchronous:"async"}),U=new Map;async function J(e,t,a){const i=await A(e,a),r=await $(t,i);if("sync"===await C(e,a)){const{results:t}=await d(e,r,void 0,a);return t?.[0]?.value}const n=await m(e,r,void 0,a);await n.waitForJobCompletion({interval:t.updateDelay});const{value:o}=await n.fetchResultData("Output_File",null,a);return o}async function A(e,a){const i=B(e),r=U.get(i)??{gpServerUrl:i,legendLayerNameMap:{},legendLayers:[]};return r.gpMetadata??=(await t(i,f({f:"json"},a))).data,r.cimVersion=r.gpMetadata.cimVersion,r.webStyleCache??=new Map,U.set(i,r),r}async function C(e,t){return De(await A(e,t))}async function _(e,a){const i=await A(e,a),r=i.gpMetadata.tasks,n=i.gpServerUrl;if(i.taskInfos)return i.taskInfos;const o=(await t(e,f({f:"json"},a))).data;i.taskInfos={ExportWebMap:o};const s=r?.filter(e=>e!==o.name)??[];return await Promise.all(s.map(async e=>{const r=(await t(`${n}/${e}`,f({f:"json"},a))).data,o=r.name.startsWith("GetLayoutTemplatesInfo")?"GetLayoutTemplatesInfo":null;o&&(i.taskInfos[o]??=r)})),i.taskInfos}async function q(e,t,a){return(await _(e,a))[t]??null}async function z(e,t,a){const i=await q(e,t,a);return i?.executionType?R.fromJSON(i.executionType):"sync"}async function $(t,a){a=a||{is11xService:!1,legendLayerNameMap:{},legendLayers:[]};const i=t.template||new E;null==i.showLabels&&(i.showLabels=!0);const r=i.exportOptions;let n;const o=b(i.layout);if(r){if(n={dpi:r.dpi},"map_only"===o?.toLowerCase()||""===o){const{width:e,height:t}=r;n.outputSize=null!=e&&null!=t?[e,t]:void 0}}const s=i.layoutOptions;let l;if(s){let e,t;"Miles"===s.scalebarUnit||"Kilometers"===s.scalebarUnit?(e="Kilometers",t="Miles"):"Meters"!==s.scalebarUnit&&"Feet"!==s.scalebarUnit||(e="Meters",t="Feet"),l={titleText:s.titleText,authorText:s.authorText,copyrightText:s.copyrightText,customTextElements:s.customTextElements,elementOverrides:s.elementOverrides,scaleBarOptions:e||t?{metricUnit:j.toJSON(e)??void 0,metricLabel:e?N[e]:void 0,nonMetricUnit:j.toJSON(t)??void 0,nonMetricLabel:t?N[t]:void 0}:void 0}}let c=null;s?.legendLayers&&(c=s.legendLayers.map(e=>{const t=e.layerId;a.legendLayerNameMap[t]=e.title;const i={id:t};return e.subLayerIds&&(i.subLayerIds=e.subLayerIds),null!=e.dynamicLegend&&(i.dynamicLegend=e.dynamicLegend),i}));const u=await W(t,i,a);if(u.operationalLayers){const e=new RegExp("[\\u4E00-\\u9FFF\\u0E00-\\u0E7F\\u0900-\\u097F\\u3040-\\u309F\\u30A0-\\u30FF\\u31F0-\\u31FF]"),t=/[\u0600-\u06FF]/,a=a=>{const i=a.text,r=a.font,n=r?.family?.toLowerCase();i&&r&&("arial"===n||"arial unicode ms"===n)&&(r.family=e.test(i)?"Arial Unicode MS":"Arial","normal"!==r.style&&t.test(i)&&(r.family="Arial Unicode MS"))};for(const i of u.operationalLayers)if(i.featureCollection?.layers)for(const e of i.featureCollection.layers){if(e.layerDefinition?.drawingInfo?.renderer?.symbol){const t=e.layerDefinition.drawingInfo.renderer;"esriTS"===t.symbol.type&&a(t.symbol)}if(e.featureSet?.features)for(const t of e.featureSet.features)t.symbol&&"esriTS"===t.symbol.type&&a(t.symbol)}}t.outSpatialReference&&(u.mapOptions.spatialReference=t.outSpatialReference.toJSON()),Object.assign(u,{exportOptions:n,layoutOptions:l||{}}),Object.assign(u.layoutOptions,{legendOptions:{operationalLayers:null!=c?c:a.legendLayers.slice()}}),a.legendLayers.length=0,U.set(a.gpServerUrl,a);const y={Web_Map_as_JSON:JSON.stringify(u),Format:g.toJSON(i.format),Layout_Template:o,Layout_Item_ID:void 0,Report_Template:P(i.report),Report_Item_ID:void 0};if(i.layoutItem){delete y.Layout_Template;const t=i.layoutItem;await t.load(),"public"!==t.access&&e&&await e.getCredential(a.gpServerUrl),y.Layout_Item_ID=JSON.stringify({id:t.id})}if(i.reportItem){delete y.Report_Template;const t=i.reportItem;await t.load(),"public"!==t.access&&e&&await e.getCredential(a.gpServerUrl),y.Report_Item_ID=JSON.stringify({id:t.id})}return t.extraParameters&&Object.assign(y,t.extraParameters),y}async function W(e,t,a){const i=e.view;let r=i.spatialReference;const n={operationalLayers:await G(i,t,a)};t.includeTables&&(n.tables=await ue(i));let o=e.extent||a.ssExtent||i.extent;if(r?.isWrappable&&(o=o.clone()._normalize(!0),r=o.spatialReference),n.mapOptions={extent:o&&o.toJSON(),spatialReference:r&&r.toJSON(),showAttribution:t.attributionVisible},a.ssExtent=null,i.background&&(n.background=i.background.toJSON()),i.rotation&&(n.mapOptions.rotation=-i.rotation),t.scalePreserved&&(n.mapOptions.scale=t.outScale||i.scale),null!=i.timeExtent){const e=null!=i.timeExtent.start?i.timeExtent.start.getTime():null,t=null!=i.timeExtent.end?i.timeExtent.end.getTime():null;n.mapOptions.time=[e,t]}return t.reportOptions&&(n.reportOptions=t.reportOptions),n}function B(e){let t=e;const a=t.lastIndexOf("/GPServer/");return a>0&&(t=t.slice(0,a+9)),t}async function G(e,t,a){const i=[],r={layerView:null,printTemplate:t,view:e};let n=0;t.scalePreserved&&(n=t.outScale||e.scale);const o=h(e,n);for(const s of o){const e=s.layer;if(!e.loaded||"layers"in e)continue;let t;r.layerView=s,t=w(s)?await se(e,r,a):S(e)?K(e):"csv"===e?.type?await Q(e,r,a):"catalog-footprint"===e?.type?await H(e,r,a):"feature"===e?.type?await Y(e,r,a):"geojson"===e?.type?await Z(e,r,a):"graphics"===e?.type?await ee(e,r,a):"imagery"===e?.type?te(e,a):"imagery-tile"===e?.type?await ae(e,r,a):"kml"===e?.type?await ie(e,r,a):"map-image"===e?.type?re(e,r,a):"map-notes"===e?.type?await ne(r,a):"open-street-map"===e?.type?oe():"stream"===e?.type?await le(e,r,a):"subtype-group"===e?.type?await ce(e,a):"tile"===e?.type?ye(e,a):"vector-tile"===e?.type?await fe(e,r,a):"web-tile"===e?.type?pe(e):"wfs"===e?.type?await de(e,r,a):"wms"===e?.type?me(e,a):"wmts"===e?.type?ge(e):await se(e,r,a),t&&(Array.isArray(t)?i.push(...t):(t.id=e.id,t.title=a.legendLayerNameMap[e.id]||e.title,t.opacity=s.fullOpacity,t.minScale=e.minScale||0,t.maxScale=e.maxScale||0,I(e)&&e.blendMode&&"normal"!==e.blendMode&&(t.blendMode=e.blendMode),i.push(t)))}if(n)for(const s of i)s.minScale=0,s.maxScale=0;if(e.graphics?.length){const r=await X(null,e.graphics,t,a);r&&i.push(r)}return i}function K(e){return{culture:e.culture,key:e.key,type:"BingMaps"+("aerial"===e.style?"Aerial":"hybrid"===e.style?"Hybrid":"Road")}}async function H(e,{layerView:t,printTemplate:a},i){if(parseFloat(i.cimVersion)<3.1){return X(e,await xe(t),a,i)}const r=e.parent,n={id:(o=ve(r,"web-map")).id,url:o.url,layerType:o.layerType,customParameters:o.customParameters,dynamicGroupLayer:{visibility:!1},footprintLayer:o.footprintLayer,layerDefinition:o.layerDefinition};var o;return be(n,r),n}async function Q(e,t,a){e.legendEnabled&&a.legendLayers.push({id:e.id});const i=t.layerView,r=t.printTemplate;if(!(i.filter||e.portalItem&&"public"!==e.portalItem.access)){const t=ve(e,"web-map");return t.type="CSV",delete t.popupInfo,delete t.layerType,t.showLabels=r.showLabels&&e.labelsVisible,t}return X(e,await xe(i),r,a)}async function X(e,t,a,i){let r;const n=T(),o=L(),s=D(),u=O(),y=D();if(y.layerDefinition.name="textLayer",delete y.layerDefinition.drawingInfo,e){if("esri.layers.FeatureLayer"===e.declaredClass||"esri.layers.StreamLayer"===e.declaredClass?n.layerDefinition.name=o.layerDefinition.name=s.layerDefinition.name=u.layerDefinition.name=i.legendLayerNameMap[e.id]||e.arcgisProps?.title||e.title:"esri.layers.GraphicsLayer"===e.declaredClass&&(t=e.graphics.items),e.renderer){const t=e.renderer.toJSON(),a=n.layerDefinition.drawingInfo;a&&(a.renderer=t);const i=o.layerDefinition.drawingInfo;i&&(i.renderer=t);const r=s.layerDefinition.drawingInfo;r&&(r.renderer=t);const l=u.layerDefinition.drawingInfo;l&&(l.renderer=t)}if(a.showLabels&&e.labelsVisible&&"function"==typeof e.write){const t=ve(e,"web-map"),a=t.layerDefinition?.drawingInfo?.labelingInfo;if(a){r=!0;const e=n.layerDefinition.drawingInfo;e&&(e.labelingInfo=a);const t=o.layerDefinition.drawingInfo;t&&(t.labelingInfo=a);const i=s.layerDefinition.drawingInfo;i&&(i.labelingInfo=a);const l=u.layerDefinition.drawingInfo;l&&(l.labelingInfo=a)}}}let f;e?.renderer||r||(delete n.layerDefinition.drawingInfo,delete o.layerDefinition.drawingInfo,delete s.layerDefinition.drawingInfo,delete u.layerDefinition.drawingInfo);const p=e?.fieldsIndex,d=e?.renderer;if(p){const t=new Set;r&&await c(t,e),d&&"function"==typeof d.collectRequiredFields&&await d.collectRequiredFields(t,p),f=Array.from(t);const a=p.fields.map(e=>e.toJSON());n.layerDefinition.fields=a,o.layerDefinition.fields=a,s.layerDefinition.fields=a,u.layerDefinition.fields=a}const m=t?.length;let g;for(let c=0;c<m;c++){const e=t[c]||t.at(c);if(!1!==e.visible&&e.geometry){if(g=e.toJSON(),g.hasOwnProperty("popupTemplate")&&delete g.popupTemplate,g.geometry?.z&&delete g.geometry.z,g.symbol&&(g.symbol.angle||delete g.symbol.angle,Te(g.symbol)?g.symbol=await he(g.symbol,i):g.symbol.text&&delete g.attributes),(!a||!a.forceFeatureAttributes)&&f?.length){const e={};for(const t of f)g.attributes?.hasOwnProperty(t)&&(e[t]=g.attributes[t]);g.attributes=e}"polygon"===e.geometry.type?n.featureSet.features.push(g):"polyline"===e.geometry.type?o.featureSet.features.push(g):"point"===e.geometry.type?g.symbol?.text?y.featureSet.features.push(g):s.featureSet.features.push(g):"multipoint"===e.geometry.type?u.featureSet.features.push(g):"extent"===e.geometry.type&&(g.geometry=l.fromExtent(e.geometry).toJSON(),n.featureSet.features.push(g))}}const b=[n,o,u,s,y].filter(e=>e.featureSet.features.length>0);for(const l of b){const e=l.featureSet.features.every(e=>e.symbol);if(e&&(!a||!a.forceFeatureAttributes))for(const t of l.featureSet.features)delete t.attributes;e&&delete l.layerDefinition.drawingInfo,l.layerDefinition.drawingInfo?.renderer&&(await Ie(l.layerDefinition.drawingInfo.renderer,i),await we(l.layerDefinition.drawingInfo.renderer,i))}return b.length?{featureCollection:{layers:b},showLabels:r}:null}async function Y(e,t,a){let i;const r=e.renderer,n=parseFloat(a.cimVersion);if("binning"===e.featureReduction?.type||"cluster"===e.featureReduction?.type&&(n<2.9||"pie-chart"===e.featureReduction.renderer?.type)||"pie-chart"===r?.type&&n<3.1||"dot-density"===r?.type&&n<2.6||"polygon"===e.geometryType&&r?.authoringInfo?.visualVariables?.some(e=>"spike"===e.theme))return se(e,t,a);e.legendEnabled&&a.legendLayers.push({id:e.id});const o=t.layerView,{printTemplate:s,view:l}=t,c="feature-layer"!==e.source?.type&&"ogc-feature"!==e.source?.type;if(o.filter||c||!r||"field"in r&&null!=r.field&&!e.getField(r.field)){const t=await xe(o);i=await X(e,t,s,a)}else{if(i={id:(f=ve(e)).id,title:f.title,url:f.url,layerType:f.layerType,customParameters:f.customParameters,layerDefinition:f.layerDefinition,charts:s.includeCharts?f.charts:void 0},s.attributionVisible&&(i.credits=x(e)),i.showLabels=s.showLabels&&e.labelsVisible,be(i,e),delete i.layerDefinition?.featureReduction?.disablePopup,delete i.layerDefinition?.featureReduction?.popupInfo,o.displayFilterEnabled||delete i.layerDefinition?.displayFilterInfo,i.layerDefinition?.drawingInfo?.renderer&&(delete i.layerDefinition.minScale,delete i.layerDefinition.maxScale,await Ie(i.layerDefinition.drawingInfo.renderer,a),await we(i.layerDefinition.drawingInfo.renderer,a),"visualVariables"in r&&r.visualVariables?.[0])){const e=r.visualVariables[0];if("size"===e.type&&e.maxSize&&"number"!=typeof e.maxSize&&e.minSize&&"number"!=typeof e.minSize){const t=y(e,l.scale);i.layerDefinition.drawingInfo.renderer.visualVariables[0].minSize=t.minSize,i.layerDefinition.drawingInfo.renderer.visualVariables[0].maxSize=t.maxSize}}const t=u(o);if(t&&(i.layerDefinition??={},i.layerDefinition.definitionExpression=i.layerDefinition.definitionExpression?`(${i.layerDefinition.definitionExpression}) AND (${t})`:t),e.gdbVersion&&(i.layerDefinition??={},i.layerDefinition.gdbVersion=e.gdbVersion),o.hasHighlight&&"highlightIds"in o){const t=o;i.selectionObjectIds=t.highlightIds;const a=F(t)||F(l)||new k;i.selectionSymbol=v(e.geometryType,a)}}var f;return i}async function Z(e,t,a){if("binning"===e.featureReduction?.type||"cluster"===e.featureReduction?.type)return se(e,t,a);e.legendEnabled&&a.legendLayers.push({id:e.id});return X(e,await xe(t.layerView),t.printTemplate,a)}async function ee(e,{printTemplate:t},a){return X(e,null,t,a)}function te(e,t){e.legendEnabled&&t.legendLayers.push({id:e.id});const a={layerType:(i=ve(e)).layerType,customParameters:i.customParameters};var i;return a.bandIds=e.bandIds,a.compressionQuality=e.compressionQuality,a.format=e.format,a.interpolation=e.interpolation,(e.mosaicRule||e.definitionExpression)&&(a.mosaicRule=e.exportImageServiceParameters.mosaicRule.toJSON()),e.rasterFunction&&(a.renderingRule=e.rasterFunction.toJSON()),e.renderer&&(a.layerDefinition??={},a.layerDefinition.drawingInfo??={},a.layerDefinition.drawingInfo.renderer=e.renderer.toJSON()),be(a,e),a}async function ae(e,t,a){if("flow"===e.renderer?.type||!e.supportsWrite())return se(e,t,a);e.legendEnabled&&a.legendLayers.push({id:e.id});const i={bandIds:(r=ve(e)).bandIds,customParameters:r.customParameters,interpolation:r.interpolation,layerDefinition:r.layerDefinition};var r;return i.layerType="ArcGISImageServiceLayer",be(i,e),i}async function ie(e,t,a){const i=t.printTemplate;if(!e.portalItem||"public"===e.portalItem.access){const t=ve(e,"web-map");return t.type="kml",delete t.layerType,t.url=s(e.url),t}const r=[],n=t.layerView,o="data:image/png;base64,";n.allVisibleMapImages.forEach((t,a)=>{const i={id:`${e.id}_image${a}`,type:"image",title:e.id,minScale:e.minScale||0,maxScale:e.maxScale||0,opacity:n.fullOpacity,extent:t.extent};t.href.startsWith(o)?i.imageData=t.href.slice(o.length):i.url=t.href,r.push(i)});const l=[...n.allVisiblePoints.items,...n.allVisiblePolylines.items,...n.allVisiblePolygons.items],c={id:e.id,...await X(null,l,i,a)};return r.push(c),r}function re(e,{printTemplate:t,view:a},i){let r;const n={id:e.id,subLayerIds:[]};let o=[];const s=a.scale,l=e=>{const t=0===s,a=0===e.minScale||s<=e.minScale,i=0===e.maxScale||s>=e.maxScale;if(e.visible&&(t||a&&i))if(e.sublayers)e.sublayers.forEach(l);else{const t=e.toExportImageJSON(),a={id:e.id,name:e.title,layerDefinition:{definitionExpression:t.definitionExpression,drawingInfo:t.drawingInfo,orderBy:t.orderBy,source:t.source}};o.unshift(a),n.subLayerIds.push(e.id)}};var c;return e.sublayers?.forEach(l),o.length&&(o=o.map(({id:e,name:t,layerDefinition:a})=>({id:e,name:t,layerDefinition:a})),r={layerType:(c=ve(e)).layerType,customParameters:c.customParameters},r.layers=o,r.visibleLayers=e.capabilities?.exportMap?.supportsDynamicLayers?void 0:n.subLayerIds,t.attributionVisible&&(r.credits=x(e)),e.gdbVersion&&(r.gdbVersion=e.gdbVersion),be(r,e),e.legendEnabled&&i.legendLayers.push(n)),r}async function ne({layerView:e,printTemplate:t},a){const i=[],r=e.layer;if(null!=r.featureCollections)for(const n of r.featureCollections){const e=await X(n,n.source,t,a);e&&i.push(...e.featureCollection.layers)}else if(null!=r.sublayers)for(const n of r.sublayers){const e=await X(null,n.graphics,t,a);e&&i.push(...e.featureCollection.layers)}return{featureCollection:{layers:i}}}function oe(){return{type:"OpenStreetMap"}}async function se(e,{printTemplate:t,view:a},r){const n={type:"image"},s={format:"png",ignoreBackground:!0,ignorePadding:!0,layers:[e]};0!==a.rotation&&(s.rotation=0);const l=r.ssExtent||a.state.extent.clone();let c=96,u=!0,y=!0;if(t.exportOptions){const e=t.exportOptions;null!=e.dpi&&e.dpi>0&&(c=e.dpi),null!=e.width&&e.width>0&&(u=e.width%2==a.width%2),null!=e.height&&e.height>0&&(y=e.height%2==a.height%2)}if("map-only"===t.layout&&t.scalePreserved&&(!t.outScale||t.outScale===a.scale)&&96===c&&(!u||!y)&&a.state.extent.equals(a.extent)&&(s.area={x:0,y:0,width:a.width,height:a.height},u||(s.area.width-=1),y||(s.area.height-=1),!r.ssExtent)){const e=a.toMap(i(s.area.width,s.area.height));l.ymin=e.y,l.xmax=e.x,r.ssExtent=l}n.extent=l.clone()._normalize(!0).toJSON();const f=await a.takeScreenshot(s);return n.imageData=o(f.dataUrl)?.data,n}async function le(e,{layerView:t,printTemplate:a},i){e.legendEnabled&&i.legendLayers.push({id:e.id});return X(e,await xe(t),a,i)}async function ce(e,t){if(e.legendEnabled)for(const r of e.sublayers)r.legendEnabled&&t.legendLayers.push({id:r.id});const a={customParameters:(i=ve(e)).customParameters,effect:i.effect,layerDefinition:i.layerDefinition,layerType:i.layerType,layers:i.layers,url:i.url};var i;if(be(a,e),Array.isArray(a.layers)){for(const e of a.layers)delete e.popupInfo;a.token&&a.layers.length>0&&(a.layers[a.layers.length-1].token=a.token,delete a.token)}return a}async function ue(e){const t=[],a=[];for(const i of e.map.allTables)"feature"!==i.type||i.loaded||a.push(i.load());a.length&&await Promise.allSettled(a);for(const i of e.map.allTables)if("feature"===i.type&&i.loaded&&i.isTable&&"feature-layer"===i.source?.type){const e=(e=>({id:e.id,title:e.title,customParameters:e.customParameters,layerDefinition:{definitionExpression:e.layerDefinition?.definitionExpression},url:e.url}))(ve(i));be(e,i),t.push(e)}return t.length?t:void 0}function ye(e,t){e.legendEnabled&&t.legendLayers.push({id:e.id});const a={layerType:(i=ve(e)).layerType,customParameters:i.customParameters};var i;return be(a,e),a}async function fe(e,t,a){const i=t.layerView;if(e.serviceUrl&&e.styleUrl&&!i.spriteSourceChanged&&!i.styleChanged){const t=p(e.styleUrl,e.apiKey),i=p(e.serviceUrl,e.apiKey);if(!t&&!i||"2.1.0"!==a.cimVersion){const a={type:"VectorTileLayer"};return a.styleUrl=s(e.styleUrl),a.token=t,i!==t&&(a.additionalTokens=[{url:e.serviceUrl,token:i}]),a}}return se(e,t,a)}function pe(e){const t=e.urlTemplate?.replaceAll("${","{"),a={type:"WebTiledLayer",urlTemplate:t,credits:e.copyright};return e.subDomains&&e.subDomains.length>0&&(a.subDomains=e.subDomains),a}async function de(e,t,a){return parseFloat(a.cimVersion)<3.5?se(e,t,a):(e.legendEnabled&&a.legendLayers.push({id:e.id}),{layerType:(i=ve(e,"web-map")).layerType,layerDefinition:i.layerDefinition,url:i.url,wfsInfo:i.wfsInfo});var i}function me(e,t){let a;const i=[],r=e=>{e.visible&&(e.sublayers?e.sublayers.forEach(r):e.name&&i.unshift(e.name))};return e.sublayers&&e.sublayers.forEach(r),i.length&&(e.legendEnabled&&t.legendLayers.push({id:e.id,subLayerIds:i}),a={type:"wms",customLayerParameters:e.customLayerParameters,customParameters:e.customParameters,transparentBackground:e.imageTransparency,visibleLayers:i,url:s(e.url),version:e.version}),a}function ge(e){const t=e.activeLayer;return{type:"wmts",customLayerParameters:e.customLayerParameters,customParameters:e.customParameters,format:t.imageFormat,layer:t.id,style:t.styleId,tileMatrixSet:t.tileMatrixSetId,url:s(e.url)}}function be(e,t){t.url&&(e.url=s(e.url||t.url),e.token=p(e.url,t.apiKey))}async function he(e,a){a.canvas||(a.canvas=document.createElement("canvas"));const i=1024;a.canvas.width=i,a.canvas.height=i;const o=a.canvas.getContext("2d");let s,l;if(e.path){const t=new Path2D(e.path);t.closePath(),o.fillStyle=Array.isArray(e.color)?`rgba(${e.color[0]},${e.color[1]},${e.color[2]},${e.color[3]/255})`:"rgb(0,0,0)",o.fill(t);const a=V(o);if(!a)return null;o.clearRect(0,0,i,i);const n=r(e.size)/Math.max(a.width,a.height);o.scale(n,n);const c=i/n,u=c/2-a.width/2-a.x,y=c/2-a.height/2-a.y;if(o.translate(u,y),Array.isArray(e.color)&&o.fill(t),e.outline?.width&&Array.isArray(e.outline.color)){const i=e.outline;o.lineWidth=r(i.width)/n,o.lineJoin="round",o.strokeStyle=`rgba(${i.color[0]},${i.color[1]},${i.color[2]},${i.color[3]/255})`,o.stroke(t),a.width+=o.lineWidth,a.height+=o.lineWidth}a.width*=n,a.height*=n;const f=o.getImageData(i/2-a.width/2,i/2-a.height/2,Math.ceil(a.width),Math.ceil(a.height));s=f.width,l=f.height,o.canvas.width=s,o.canvas.height=l,o.putImageData(f,0,0)}else{const a="image/svg+xml"===e.contentType?"data:image/svg+xml;base64,"+e.imageData:e.url,i=(await t(a,{responseType:"image"})).data;s=r(e.width),l=r(e.height),o.canvas.width=s,o.canvas.height=l,o.drawImage(i,0,0,o.canvas.width,o.canvas.height)}return{type:"esriPMS",imageData:o.canvas.toDataURL("image/png").slice(22),angle:e.angle,contentType:"image/png",height:n(l),width:n(s),xoffset:e.xoffset,yoffset:e.yoffset}}async function we(e,t){const a=e.type;if("simple"===a&&Te(e.symbol))e.symbol=await he(e.symbol,t);else if("uniqueValue"===a||"classBreaks"===a){Te(e.defaultSymbol)&&(e.defaultSymbol=await he(e.defaultSymbol,t));const i=e["uniqueValue"===a?"uniqueValueInfos":"classBreakInfos"];if(i)for(const e of i)Te(e.symbol)&&(e.symbol=await he(e.symbol,t))}}async function Se(e,t){if("styleSymbolReference"!==e?.type)return e;try{const a=await M.fromJSON(e).fetchSymbol({cache:t.webStyleCache});return a?.toJSON()??e}catch{return e}}async function Ie(e,t){if("simple"===e.type&&e.symbol)e.symbol=await Se(e.symbol,t);else if("uniqueValue"===e.type){if(e.defaultSymbol=await Se(e.defaultSymbol,t),"uniqueValueInfos"in e&&e.uniqueValueInfos)for(const a of e.uniqueValueInfos)a.symbol=await Se(a.symbol,t);if("uniqueValueGroups"in e&&e.uniqueValueGroups)for(const a of e.uniqueValueGroups)for(const e of a.classes)e.symbol=await Se(e.symbol,t)}else if("classBreaks"===e.type){e.defaultSymbol=await Se(e.defaultSymbol,t);for(const a of e.classBreakInfos)a.symbol=await Se(a.symbol,t)}}async function xe(e){return e.queryFeatures(e.createQuery()).then(e=>e.features)}function ve(e,t){return e.write({},{ignorePersistenceEnabled:!0,origin:t})??{}}function De(e){return e.gpMetadata?.executionType?R.fromJSON(e.gpMetadata.executionType):"sync"}function Te(e){return e&&(e.path||"image/svg+xml"===e.contentType||e.url?.endsWith(".svg"))}export{J as execute,$ as getGpPrintParams,B as getGpServerUrl,C as getMode,z as getTaskExecutionMode,q as getTaskInfo,_ as getTaskInfos,U as printCacheMap};
|
|
5
|
+
import{id as e}from"../kernel.js";import t from"../request.js";import{JSONMap as a}from"../core/jsonMap.js";import{createScreenPoint as i,pt2px as r,px2pt as n}from"../core/screenUtils.js";import{dataComponents as o,normalize as s}from"../core/urlUtils.js";import l from"../geometry/Polygon.js";import{collectLabelingFields as c}from"../layers/support/fieldUtils.js";import{getFloorFilterClause as u}from"../layers/support/floorFilterUtils.js";import{getSizeRangeAtScale as y}from"../renderers/visualVariables/support/visualVariableUtils.js";import{asValidOptions as f,findToken as p}from"./utils.js";import{execute as d}from"./geoprocessor/execute.js";import{submitJob as m}from"./geoprocessor/submitJob.js";import{formatJsonMap as g}from"./support/fileFormat.js";import{toJSON as b}from"./support/layoutTemplate.js";import{getVisibleLayerViews as h,isScreenshotRequired as w,isBingMapsLayer as S,isBlendLayer as I,getCopyright as x,getSelectionSymbol as v,createPointLayer as D,createPolygonLayer as T,createPolylineLayer as L,createMultipointLayer as O,getContextBoundingBox as V}from"./support/printTaskUtils.js";import E from"./support/PrintTemplate.js";import{toJSON as P}from"./support/reportTemplate.js";import M from"../symbols/WebStyleSymbol.js";import{getDefaultHighlightOptions as F}from"../views/2d/support/highlightOptionsUtils.js";import k from"../views/support/HighlightOptions.js";const N={Feet:"ft",Kilometers:"km",Meters:"m",Miles:"mi"},j=new a({esriFeet:"Feet",esriKilometers:"Kilometers",esriMeters:"Meters",esriMiles:"Miles"}),R=new a({esriExecutionTypeSynchronous:"sync",esriExecutionTypeAsynchronous:"async"}),U=new Map;async function J(e,t,a){const i=await A(e,a),r=await $(t,i);if("sync"===await C(e,a)){const{results:t}=await d(e,r,void 0,a);return t?.[0]?.value}const n=await m(e,r,void 0,a);await n.waitForJobCompletion({interval:t.updateDelay});const{value:o}=await n.fetchResultData("Output_File",null,a);return o}async function A(e,a){const i=B(e),r=U.get(i)??{gpServerUrl:i,legendLayerNameMap:{},legendLayers:[]};return r.gpMetadata??=(await t(i,f({f:"json"},a))).data,r.cimVersion=r.gpMetadata.cimVersion,r.webStyleCache??=new Map,U.set(i,r),r}async function C(e,t){return De(await A(e,t))}async function _(e,a){const i=await A(e,a),r=i.gpMetadata.tasks,n=i.gpServerUrl;if(i.taskInfos)return i.taskInfos;const o=(await t(e,f({f:"json"},a))).data;i.taskInfos={ExportWebMap:o};const s=r?.filter(e=>e!==o.name)??[];return await Promise.all(s.map(async e=>{const r=(await t(`${n}/${e}`,f({f:"json"},a))).data,o=r.name.startsWith("GetLayoutTemplatesInfo")?"GetLayoutTemplatesInfo":null;o&&(i.taskInfos[o]??=r)})),i.taskInfos}async function q(e,t,a){return(await _(e,a))[t]??null}async function z(e,t,a){const i=await q(e,t,a);return i?.executionType?R.fromJSON(i.executionType):"sync"}async function $(t,a){a=a||{is11xService:!1,legendLayerNameMap:{},legendLayers:[]};const i=t.template||new E;null==i.showLabels&&(i.showLabels=!0);const r=i.exportOptions;let n;const o=b(i.layout);if(r){if(n={dpi:r.dpi},"map_only"===o?.toLowerCase()||""===o){const{width:e,height:t}=r;n.outputSize=null!=e&&null!=t?[e,t]:void 0}}const s=i.layoutOptions;let l;if(s){let e,t;"Miles"===s.scalebarUnit||"Kilometers"===s.scalebarUnit?(e="Kilometers",t="Miles"):"Meters"!==s.scalebarUnit&&"Feet"!==s.scalebarUnit||(e="Meters",t="Feet"),l={titleText:s.titleText,authorText:s.authorText,copyrightText:s.copyrightText,customTextElements:s.customTextElements,elementOverrides:s.elementOverrides,scaleBarOptions:e||t?{metricUnit:j.toJSON(e)??void 0,metricLabel:e?N[e]:void 0,nonMetricUnit:j.toJSON(t)??void 0,nonMetricLabel:t?N[t]:void 0}:void 0}}let c=null;s?.legendLayers&&(c=s.legendLayers.map(e=>{const t=e.layerId;a.legendLayerNameMap[t]=e.title;const i={id:t};return e.subLayerIds&&(i.subLayerIds=e.subLayerIds),null!=e.dynamicLegend&&(i.dynamicLegend=e.dynamicLegend),i}));const u=await W(t,i,a);if(u.operationalLayers){const e=new RegExp("[\\u4E00-\\u9FFF\\u0E00-\\u0E7F\\u0900-\\u097F\\u3040-\\u309F\\u30A0-\\u30FF\\u31F0-\\u31FF]"),t=/[\u0600-\u06FF]/,a=a=>{const i=a.text,r=a.font,n=r?.family?.toLowerCase();i&&r&&("arial"===n||"arial unicode ms"===n)&&(r.family=e.test(i)?"Arial Unicode MS":"Arial","normal"!==r.style&&t.test(i)&&(r.family="Arial Unicode MS"))};for(const i of u.operationalLayers)if(i.featureCollection?.layers)for(const e of i.featureCollection.layers){if(e.layerDefinition?.drawingInfo?.renderer?.symbol){const t=e.layerDefinition.drawingInfo.renderer;"esriTS"===t.symbol.type&&a(t.symbol)}if(e.featureSet?.features)for(const t of e.featureSet.features)t.symbol&&"esriTS"===t.symbol.type&&a(t.symbol)}}t.outSpatialReference&&(u.mapOptions.spatialReference=t.outSpatialReference.toJSON()),Object.assign(u,{exportOptions:n,layoutOptions:l||{}}),Object.assign(u.layoutOptions,{legendOptions:{operationalLayers:null!=c?c:a.legendLayers.slice()}}),a.legendLayers.length=0,U.set(a.gpServerUrl,a);const y={Web_Map_as_JSON:JSON.stringify(u),Format:g.toJSON(i.format),Layout_Template:o,Layout_Item_ID:void 0,Report_Template:P(i.report),Report_Item_ID:void 0};if(i.layoutItem){delete y.Layout_Template;const t=i.layoutItem;await t.load(),"public"!==t.access&&e&&await e.getCredential(a.gpServerUrl),y.Layout_Item_ID=JSON.stringify({id:t.id})}if(i.reportItem){delete y.Report_Template;const t=i.reportItem;await t.load(),"public"!==t.access&&e&&await e.getCredential(a.gpServerUrl),y.Report_Item_ID=JSON.stringify({id:t.id})}return t.extraParameters&&Object.assign(y,t.extraParameters),y}async function W(e,t,a){const i=e.view;let r=i.spatialReference;const n={operationalLayers:await G(i,t,a)};t.includeTables&&(n.tables=await ue(i));let o=e.extent||a.ssExtent||i.extent;if(r?.isWrappable&&(o=o.clone()._normalize(!0),r=o.spatialReference),n.mapOptions={extent:o&&o.toJSON(),spatialReference:r&&r.toJSON(),showAttribution:t.attributionVisible},a.ssExtent=null,i.background&&(n.background=i.background.toJSON()),i.rotation&&(n.mapOptions.rotation=-i.rotation),t.scalePreserved&&(n.mapOptions.scale=t.outScale||i.scale),null!=i.timeExtent){const e=null!=i.timeExtent.start?i.timeExtent.start.getTime():null,t=null!=i.timeExtent.end?i.timeExtent.end.getTime():null;n.mapOptions.time=[e,t]}return t.reportOptions&&(n.reportOptions=t.reportOptions),n}function B(e){let t=e;const a=t.lastIndexOf("/GPServer/");return a>0&&(t=t.slice(0,a+9)),t}async function G(e,t,a){const i=[];let r=0;t.scalePreserved&&(r=t.outScale||e.scale);const n={layerView:null,outScale:r,printTemplate:t,view:e},o=h(e,r);for(const s of o){const e=s.layer;if(!e.loaded||"layers"in e)continue;let t;n.layerView=s,t=w(s)?await se(e,n,a):S(e)?K(e):"csv"===e?.type?await Q(e,n,a):"catalog-footprint"===e?.type?await H(e,n,a):"feature"===e?.type?await Y(e,n,a):"geojson"===e?.type?await Z(e,n,a):"graphics"===e?.type?await ee(e,n,a):"imagery"===e?.type?te(e,a):"imagery-tile"===e?.type?await ae(e,n,a):"kml"===e?.type?await ie(e,n,a):"map-image"===e?.type?re(e,n,a):"map-notes"===e?.type?await ne(n,a):"open-street-map"===e?.type?oe():"stream"===e?.type?await le(e,n,a):"subtype-group"===e?.type?await ce(e,a):"tile"===e?.type?ye(e,a):"vector-tile"===e?.type?await fe(e,n,a):"web-tile"===e?.type?pe(e):"wfs"===e?.type?await de(e,n,a):"wms"===e?.type?me(e,a):"wmts"===e?.type?ge(e):await se(e,n,a),t&&(Array.isArray(t)?i.push(...t):(t.id=e.id,t.title=a.legendLayerNameMap[e.id]||e.title,t.opacity=s.fullOpacity,t.minScale=e.minScale||0,t.maxScale=e.maxScale||0,I(e)&&e.blendMode&&"normal"!==e.blendMode&&(t.blendMode=e.blendMode),i.push(t)))}if(r)for(const s of i)s.minScale=0,s.maxScale=0;if(e.graphics?.length){const r=await X(null,e.graphics,t,a);r&&i.push(r)}return i}function K(e){return{culture:e.culture,key:e.key,type:"BingMaps"+("aerial"===e.style?"Aerial":"hybrid"===e.style?"Hybrid":"Road")}}async function H(e,{layerView:t,printTemplate:a},i){if(parseFloat(i.cimVersion)<3.1){return X(e,await xe(t),a,i)}const r=e.parent,n={id:(o=ve(r,"web-map")).id,url:o.url,layerType:o.layerType,customParameters:o.customParameters,dynamicGroupLayer:{visibility:!1},footprintLayer:o.footprintLayer,layerDefinition:o.layerDefinition};var o;return be(n,r),n}async function Q(e,t,a){e.legendEnabled&&a.legendLayers.push({id:e.id});const i=t.layerView,r=t.printTemplate;if(!(i.filter||e.portalItem&&"public"!==e.portalItem.access)){const t=ve(e,"web-map");return t.type="CSV",delete t.popupInfo,delete t.layerType,t.showLabels=r.showLabels&&e.labelsVisible,t}return X(e,await xe(i),r,a)}async function X(e,t,a,i){let r;const n=T(),o=L(),s=D(),u=O(),y=D();if(y.layerDefinition.name="textLayer",delete y.layerDefinition.drawingInfo,e){if("esri.layers.FeatureLayer"===e.declaredClass||"esri.layers.StreamLayer"===e.declaredClass?n.layerDefinition.name=o.layerDefinition.name=s.layerDefinition.name=u.layerDefinition.name=i.legendLayerNameMap[e.id]||e.arcgisProps?.title||e.title:"esri.layers.GraphicsLayer"===e.declaredClass&&(t=e.graphics.items),e.renderer){const t=e.renderer.toJSON(),a=n.layerDefinition.drawingInfo;a&&(a.renderer=t);const i=o.layerDefinition.drawingInfo;i&&(i.renderer=t);const r=s.layerDefinition.drawingInfo;r&&(r.renderer=t);const l=u.layerDefinition.drawingInfo;l&&(l.renderer=t)}if(a.showLabels&&e.labelsVisible&&"function"==typeof e.write){const t=ve(e,"web-map"),a=t.layerDefinition?.drawingInfo?.labelingInfo;if(a){r=!0;const e=n.layerDefinition.drawingInfo;e&&(e.labelingInfo=a);const t=o.layerDefinition.drawingInfo;t&&(t.labelingInfo=a);const i=s.layerDefinition.drawingInfo;i&&(i.labelingInfo=a);const l=u.layerDefinition.drawingInfo;l&&(l.labelingInfo=a)}}}let f;e?.renderer||r||(delete n.layerDefinition.drawingInfo,delete o.layerDefinition.drawingInfo,delete s.layerDefinition.drawingInfo,delete u.layerDefinition.drawingInfo);const p=e?.fieldsIndex,d=e?.renderer;if(p){const t=new Set;r&&await c(t,e),d&&"function"==typeof d.collectRequiredFields&&await d.collectRequiredFields(t,p),f=Array.from(t);const a=p.fields.map(e=>e.toJSON());n.layerDefinition.fields=a,o.layerDefinition.fields=a,s.layerDefinition.fields=a,u.layerDefinition.fields=a}const m=t?.length;let g;for(let c=0;c<m;c++){const e=t[c]||t.at(c);if(!1!==e.visible&&e.geometry){if(g=e.toJSON(),g.hasOwnProperty("popupTemplate")&&delete g.popupTemplate,g.geometry?.z&&delete g.geometry.z,g.symbol&&(g.symbol.angle||delete g.symbol.angle,Te(g.symbol)?g.symbol=await he(g.symbol,i):g.symbol.text&&delete g.attributes),(!a||!a.forceFeatureAttributes)&&f?.length){const e={};for(const t of f)g.attributes?.hasOwnProperty(t)&&(e[t]=g.attributes[t]);g.attributes=e}"polygon"===e.geometry.type?n.featureSet.features.push(g):"polyline"===e.geometry.type?o.featureSet.features.push(g):"point"===e.geometry.type?g.symbol?.text?y.featureSet.features.push(g):s.featureSet.features.push(g):"multipoint"===e.geometry.type?u.featureSet.features.push(g):"extent"===e.geometry.type&&(g.geometry=l.fromExtent(e.geometry).toJSON(),n.featureSet.features.push(g))}}const b=[n,o,u,s,y].filter(e=>e.featureSet.features.length>0);for(const l of b){const e=l.featureSet.features.every(e=>e.symbol);if(e&&(!a||!a.forceFeatureAttributes))for(const t of l.featureSet.features)delete t.attributes;e&&delete l.layerDefinition.drawingInfo,l.layerDefinition.drawingInfo?.renderer&&(await Ie(l.layerDefinition.drawingInfo.renderer,i),await we(l.layerDefinition.drawingInfo.renderer,i))}return b.length?{featureCollection:{layers:b},showLabels:r}:null}async function Y(e,t,a){let i;const r=e.renderer,n=parseFloat(a.cimVersion);if("binning"===e.featureReduction?.type||"cluster"===e.featureReduction?.type&&(n<2.9||"pie-chart"===e.featureReduction.renderer?.type)||"pie-chart"===r?.type&&n<3.1||"dot-density"===r?.type&&n<2.6||"polygon"===e.geometryType&&r?.authoringInfo?.visualVariables?.some(e=>"spike"===e.theme))return se(e,t,a);e.legendEnabled&&a.legendLayers.push({id:e.id});const o=t.layerView,{printTemplate:s,view:l}=t,c="feature-layer"!==e.source?.type&&"ogc-feature"!==e.source?.type;if(o.filter||c||!r||"field"in r&&null!=r.field&&!e.getField(r.field)){const t=await xe(o);i=await X(e,t,s,a)}else{if(i={id:(f=ve(e)).id,title:f.title,url:f.url,layerType:f.layerType,customParameters:f.customParameters,layerDefinition:f.layerDefinition,charts:s.includeCharts?f.charts:void 0},s.attributionVisible&&(i.credits=x(e)),i.showLabels=s.showLabels&&e.labelsVisible,be(i,e),delete i.layerDefinition?.featureReduction?.disablePopup,delete i.layerDefinition?.featureReduction?.popupInfo,o.displayFilterEnabled||delete i.layerDefinition?.displayFilterInfo,i.layerDefinition?.drawingInfo?.renderer&&(delete i.layerDefinition.minScale,delete i.layerDefinition.maxScale,await Ie(i.layerDefinition.drawingInfo.renderer,a),await we(i.layerDefinition.drawingInfo.renderer,a),"visualVariables"in r&&r.visualVariables?.[0])){const e=r.visualVariables[0];if("size"===e.type&&e.maxSize&&"number"!=typeof e.maxSize&&e.minSize&&"number"!=typeof e.minSize){const t=y(e,l.scale);i.layerDefinition.drawingInfo.renderer.visualVariables[0].minSize=t.minSize,i.layerDefinition.drawingInfo.renderer.visualVariables[0].maxSize=t.maxSize}}const t=u(o);if(t&&(i.layerDefinition??={},i.layerDefinition.definitionExpression=i.layerDefinition.definitionExpression?`(${i.layerDefinition.definitionExpression}) AND (${t})`:t),e.gdbVersion&&(i.layerDefinition??={},i.layerDefinition.gdbVersion=e.gdbVersion),o.hasHighlight&&"highlightIds"in o){const t=o;i.selectionObjectIds=t.highlightIds;const a=F(t)||F(l)||new k;i.selectionSymbol=v(e.geometryType,a)}}var f;return i}async function Z(e,t,a){if("binning"===e.featureReduction?.type||"cluster"===e.featureReduction?.type)return se(e,t,a);e.legendEnabled&&a.legendLayers.push({id:e.id});return X(e,await xe(t.layerView),t.printTemplate,a)}async function ee(e,{printTemplate:t},a){return X(e,null,t,a)}function te(e,t){e.legendEnabled&&t.legendLayers.push({id:e.id});const a={layerType:(i=ve(e)).layerType,customParameters:i.customParameters};var i;return a.bandIds=e.bandIds,a.compressionQuality=e.compressionQuality,a.format=e.format,a.interpolation=e.interpolation,(e.mosaicRule||e.definitionExpression)&&(a.mosaicRule=e.exportImageServiceParameters.mosaicRule.toJSON()),e.rasterFunction&&(a.renderingRule=e.rasterFunction.toJSON()),e.renderer&&(a.layerDefinition??={},a.layerDefinition.drawingInfo??={},a.layerDefinition.drawingInfo.renderer=e.renderer.toJSON()),be(a,e),a}async function ae(e,t,a){if("flow"===e.renderer?.type||!e.supportsWrite())return se(e,t,a);e.legendEnabled&&a.legendLayers.push({id:e.id});const i={bandIds:(r=ve(e)).bandIds,customParameters:r.customParameters,interpolation:r.interpolation,layerDefinition:r.layerDefinition};var r;return i.layerType="ArcGISImageServiceLayer",be(i,e),i}async function ie(e,t,a){const i=t.printTemplate;if(!e.portalItem||"public"===e.portalItem.access){const t=ve(e,"web-map");return t.type="kml",delete t.layerType,t.url=s(e.url),t}const r=[],n=t.layerView,o="data:image/png;base64,";n.allVisibleMapImages.forEach((t,a)=>{const i={id:`${e.id}_image${a}`,type:"image",title:e.id,minScale:e.minScale||0,maxScale:e.maxScale||0,opacity:n.fullOpacity,extent:t.extent};t.href.startsWith(o)?i.imageData=t.href.slice(o.length):i.url=t.href,r.push(i)});const l=[...n.allVisiblePoints.items,...n.allVisiblePolylines.items,...n.allVisiblePolygons.items],c={id:e.id,...await X(null,l,i,a)};return r.push(c),r}function re(e,{outScale:t,printTemplate:a,view:i},r){let n;const o={id:e.id,subLayerIds:[]};let s=[];const l=t||i.scale,c=e=>{const t=0===l,a=0===e.minScale||l<=e.minScale,i=0===e.maxScale||l>=e.maxScale;if(e.visible&&(t||a&&i))if(e.sublayers)e.sublayers.forEach(c);else{const t=e.toExportImageJSON(),a={id:e.id,name:e.title,layerDefinition:{definitionExpression:t.definitionExpression,drawingInfo:t.drawingInfo,orderBy:t.orderBy,source:t.source}};s.unshift(a),o.subLayerIds.push(e.id)}};var u;return e.sublayers?.forEach(c),s.length&&(s=s.map(({id:e,name:t,layerDefinition:a})=>({id:e,name:t,layerDefinition:a})),n={layerType:(u=ve(e)).layerType,customParameters:u.customParameters},n.layers=s,n.visibleLayers=e.capabilities?.exportMap?.supportsDynamicLayers?void 0:o.subLayerIds,a.attributionVisible&&(n.credits=x(e)),e.gdbVersion&&(n.gdbVersion=e.gdbVersion),be(n,e),e.legendEnabled&&r.legendLayers.push(o)),n}async function ne({layerView:e,printTemplate:t},a){const i=[],r=e.layer;if(null!=r.featureCollections)for(const n of r.featureCollections){const e=await X(n,n.source,t,a);e&&i.push(...e.featureCollection.layers)}else if(null!=r.sublayers)for(const n of r.sublayers){const e=await X(null,n.graphics,t,a);e&&i.push(...e.featureCollection.layers)}return{featureCollection:{layers:i}}}function oe(){return{type:"OpenStreetMap"}}async function se(e,{printTemplate:t,view:a},r){const n={type:"image"},s={format:"png",ignoreBackground:!0,ignorePadding:!0,layers:[e]};0!==a.rotation&&(s.rotation=0);const l=r.ssExtent||a.state.extent.clone();let c=96,u=!0,y=!0;if(t.exportOptions){const e=t.exportOptions;null!=e.dpi&&e.dpi>0&&(c=e.dpi),null!=e.width&&e.width>0&&(u=e.width%2==a.width%2),null!=e.height&&e.height>0&&(y=e.height%2==a.height%2)}if("map-only"===t.layout&&t.scalePreserved&&(!t.outScale||t.outScale===a.scale)&&96===c&&(!u||!y)&&a.state.extent.equals(a.extent)&&(s.area={x:0,y:0,width:a.width,height:a.height},u||(s.area.width-=1),y||(s.area.height-=1),!r.ssExtent)){const e=a.toMap(i(s.area.width,s.area.height));l.ymin=e.y,l.xmax=e.x,r.ssExtent=l}n.extent=l.clone()._normalize(!0).toJSON();const f=await a.takeScreenshot(s);return n.imageData=o(f.dataUrl)?.data,n}async function le(e,{layerView:t,printTemplate:a},i){e.legendEnabled&&i.legendLayers.push({id:e.id});return X(e,await xe(t),a,i)}async function ce(e,t){if(e.legendEnabled)for(const r of e.sublayers)r.legendEnabled&&t.legendLayers.push({id:r.id});const a={customParameters:(i=ve(e)).customParameters,effect:i.effect,layerDefinition:i.layerDefinition,layerType:i.layerType,layers:i.layers,url:i.url};var i;if(be(a,e),Array.isArray(a.layers)){for(const e of a.layers)delete e.popupInfo;a.token&&a.layers.length>0&&(a.layers[a.layers.length-1].token=a.token,delete a.token)}return a}async function ue(e){const t=[],a=[];for(const i of e.map.allTables)"feature"!==i.type||i.loaded||a.push(i.load());a.length&&await Promise.allSettled(a);for(const i of e.map.allTables)if("feature"===i.type&&i.loaded&&i.isTable&&"feature-layer"===i.source?.type){const e=(e=>({id:e.id,title:e.title,customParameters:e.customParameters,layerDefinition:{definitionExpression:e.layerDefinition?.definitionExpression},url:e.url}))(ve(i));be(e,i),t.push(e)}return t.length?t:void 0}function ye(e,t){e.legendEnabled&&t.legendLayers.push({id:e.id});const a={layerType:(i=ve(e)).layerType,customParameters:i.customParameters};var i;return be(a,e),a}async function fe(e,t,a){const i=t.layerView;if(e.serviceUrl&&e.styleUrl&&!i.spriteSourceChanged&&!i.styleChanged){const t=p(e.styleUrl,e.apiKey),i=p(e.serviceUrl,e.apiKey);if(!t&&!i||"2.1.0"!==a.cimVersion){const a={type:"VectorTileLayer"};return a.styleUrl=s(e.styleUrl),a.token=t,i!==t&&(a.additionalTokens=[{url:e.serviceUrl,token:i}]),a}}return se(e,t,a)}function pe(e){const t=e.urlTemplate?.replaceAll("${","{"),a={type:"WebTiledLayer",urlTemplate:t,credits:e.copyright};return e.subDomains&&e.subDomains.length>0&&(a.subDomains=e.subDomains),a}async function de(e,t,a){return parseFloat(a.cimVersion)<3.5?se(e,t,a):(e.legendEnabled&&a.legendLayers.push({id:e.id}),{layerType:(i=ve(e,"web-map")).layerType,layerDefinition:i.layerDefinition,url:i.url,wfsInfo:i.wfsInfo});var i}function me(e,t){let a;const i=[],r=e=>{e.visible&&(e.sublayers?e.sublayers.forEach(r):e.name&&i.unshift(e.name))};return e.sublayers&&e.sublayers.forEach(r),i.length&&(e.legendEnabled&&t.legendLayers.push({id:e.id,subLayerIds:i}),a={type:"wms",customLayerParameters:e.customLayerParameters,customParameters:e.customParameters,transparentBackground:e.imageTransparency,visibleLayers:i,url:s(e.url),version:e.version}),a}function ge(e){const t=e.activeLayer;return{type:"wmts",customLayerParameters:e.customLayerParameters,customParameters:e.customParameters,format:t.imageFormat,layer:t.id,style:t.styleId,tileMatrixSet:t.tileMatrixSetId,url:s(e.url)}}function be(e,t){t.url&&(e.url=s(e.url||t.url),e.token=p(e.url,t.apiKey))}async function he(e,a){a.canvas||(a.canvas=document.createElement("canvas"));const i=1024;a.canvas.width=i,a.canvas.height=i;const o=a.canvas.getContext("2d");let s,l;if(e.path){const t=new Path2D(e.path);t.closePath(),o.fillStyle=Array.isArray(e.color)?`rgba(${e.color[0]},${e.color[1]},${e.color[2]},${e.color[3]/255})`:"rgb(0,0,0)",o.fill(t);const a=V(o);if(!a)return null;o.clearRect(0,0,i,i);const n=r(e.size)/Math.max(a.width,a.height);o.scale(n,n);const c=i/n,u=c/2-a.width/2-a.x,y=c/2-a.height/2-a.y;if(o.translate(u,y),Array.isArray(e.color)&&o.fill(t),e.outline?.width&&Array.isArray(e.outline.color)){const i=e.outline;o.lineWidth=r(i.width)/n,o.lineJoin="round",o.strokeStyle=`rgba(${i.color[0]},${i.color[1]},${i.color[2]},${i.color[3]/255})`,o.stroke(t),a.width+=o.lineWidth,a.height+=o.lineWidth}a.width*=n,a.height*=n;const f=o.getImageData(i/2-a.width/2,i/2-a.height/2,Math.ceil(a.width),Math.ceil(a.height));s=f.width,l=f.height,o.canvas.width=s,o.canvas.height=l,o.putImageData(f,0,0)}else{const a="image/svg+xml"===e.contentType?"data:image/svg+xml;base64,"+e.imageData:e.url,i=(await t(a,{responseType:"image"})).data;s=r(e.width),l=r(e.height),o.canvas.width=s,o.canvas.height=l,o.drawImage(i,0,0,o.canvas.width,o.canvas.height)}return{type:"esriPMS",imageData:o.canvas.toDataURL("image/png").slice(22),angle:e.angle,contentType:"image/png",height:n(l),width:n(s),xoffset:e.xoffset,yoffset:e.yoffset}}async function we(e,t){const a=e.type;if("simple"===a&&Te(e.symbol))e.symbol=await he(e.symbol,t);else if("uniqueValue"===a||"classBreaks"===a){Te(e.defaultSymbol)&&(e.defaultSymbol=await he(e.defaultSymbol,t));const i=e["uniqueValue"===a?"uniqueValueInfos":"classBreakInfos"];if(i)for(const e of i)Te(e.symbol)&&(e.symbol=await he(e.symbol,t))}}async function Se(e,t){if("styleSymbolReference"!==e?.type)return e;try{const a=await M.fromJSON(e).fetchSymbol({cache:t.webStyleCache});return a?.toJSON()??e}catch{return e}}async function Ie(e,t){if("simple"===e.type&&e.symbol)e.symbol=await Se(e.symbol,t);else if("uniqueValue"===e.type){if(e.defaultSymbol=await Se(e.defaultSymbol,t),"uniqueValueInfos"in e&&e.uniqueValueInfos)for(const a of e.uniqueValueInfos)a.symbol=await Se(a.symbol,t);if("uniqueValueGroups"in e&&e.uniqueValueGroups)for(const a of e.uniqueValueGroups)for(const e of a.classes)e.symbol=await Se(e.symbol,t)}else if("classBreaks"===e.type){e.defaultSymbol=await Se(e.defaultSymbol,t);for(const a of e.classBreakInfos)a.symbol=await Se(a.symbol,t)}}async function xe(e){return e.queryFeatures(e.createQuery()).then(e=>e.features)}function ve(e,t){return e.write({},{ignorePersistenceEnabled:!0,origin:t})??{}}function De(e){return e.gpMetadata?.executionType?R.fromJSON(e.gpMetadata.executionType):"sync"}function Te(e){return e&&(e.path||"image/svg+xml"===e.contentType||e.url?.endsWith(".svg"))}export{J as execute,$ as getGpPrintParams,B as getGpServerUrl,C as getMode,z as getTaskExecutionMode,q as getTaskInfo,_ as getTaskInfos,U as printCacheMap};
|