@arcgis/core 4.24.0-next.20220508 → 4.24.0-next.20220511
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AggregateGraphic.js +1 -1
- package/analysis/Analysis.js +1 -1
- package/analysis/DimensioningAnalysis.js +1 -1
- package/analysis/LengthDimension.d.ts +4 -0
- package/analysis/LengthDimension.js +5 -0
- package/analysis/dimensionUtils.js +5 -0
- package/arcade/Dictionary.js +1 -1
- package/arcade/Feature.js +1 -1
- package/arcade/arcade.js +1 -1
- package/arcade/arcadeAsyncRuntime.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/arcade/credentials.js +1 -1
- package/arcade/featureSetCollection.js +1 -1
- package/arcade/featureSetUtils.js +1 -1
- package/arcade/featureset/actions/Adapted.js +1 -1
- package/arcade/featureset/actions/AttributeFilter.js +1 -1
- package/arcade/featureset/actions/GroupBy.js +1 -1
- package/arcade/featureset/actions/OrderBy.js +1 -1
- package/arcade/featureset/actions/SpatialFilter.js +1 -1
- package/arcade/featureset/actions/Top.js +1 -1
- package/arcade/featureset/sources/Empty.js +1 -1
- package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
- package/arcade/featureset/sources/FeatureLayerMemory.js +1 -1
- package/arcade/featureset/sources/FeatureLayerRelated.js +1 -1
- package/arcade/featureset/support/FeatureSet.js +1 -1
- package/arcade/featureset/support/FeatureSetIterator.js +1 -1
- package/arcade/featureset/support/shared.js +1 -1
- package/arcade/featureset/support/stats.js +1 -1
- package/arcade/functions/featuresetbase.js +1 -1
- package/arcade/functions/featuresetgeom.js +1 -1
- package/arcade/functions/featuresetstats.js +1 -1
- package/arcade/functions/featuresetstring.js +1 -1
- package/arcade/functions/geomasync.js +1 -1
- package/arcade/languageUtils.js +1 -1
- package/arcade/request.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0564f1cfa3d17ff1aad3.js +1 -0
- package/assets/esri/core/workers/chunks/0806d5d706a864542bfb.js +1 -0
- package/assets/esri/core/workers/chunks/0a6977144ea1abf96fbf.js +1 -0
- package/assets/esri/core/workers/chunks/13387f56acbc3291561a.js +1 -0
- package/assets/esri/core/workers/chunks/16c4e0a32d50d4db984d.js +1 -0
- package/assets/esri/core/workers/chunks/{076d1b1101b59af0d389.js → 1c010202b4c7e1d15f23.js} +1 -1
- package/assets/esri/core/workers/chunks/26827ec144676e6385f8.js +1 -0
- package/assets/esri/core/workers/chunks/287c484fd40eee643f3a.js +1 -0
- package/assets/esri/core/workers/chunks/5210f0b42dba27945226.js +1 -0
- package/assets/esri/core/workers/chunks/{db6c5b3b4efe8d804f9c.js → 52478ee2d2a1354b6900.js} +1 -1
- package/assets/esri/core/workers/chunks/5759af97f96f24c40105.js +1 -0
- package/assets/esri/core/workers/chunks/{b85218d44c6094b7e5e6.js → 6d7e2a23a0a5dd9ded1d.js} +1 -1
- package/assets/esri/core/workers/chunks/70b6356357e7640c4e8b.js +1 -0
- package/assets/esri/core/workers/chunks/7574316b3af61c389e8f.js +1 -0
- package/assets/esri/core/workers/chunks/7bc828fbdd54c0b28aac.js +1 -0
- package/assets/esri/core/workers/chunks/7e5c22b5a32ac74b1b6e.js +1 -0
- package/assets/esri/core/workers/chunks/8102bb78fe96e6197e4e.js +1 -0
- package/assets/esri/core/workers/chunks/88384e7cafbfd2348598.js +1 -0
- package/assets/esri/core/workers/chunks/9d7533aaeac3b8d145c4.js +1 -0
- package/assets/esri/core/workers/chunks/{1eecae5227318f491263.js → 9f4d892abf55e8625bc9.js} +3 -3
- package/assets/esri/core/workers/chunks/{98607a0da63626cc4614.js → a054a52712a118c6d505.js} +1 -1
- package/assets/esri/core/workers/chunks/{69a20e4d9e28c3e599fc.js → a3bb600bfcb0282622f1.js} +1 -1
- package/assets/esri/core/workers/chunks/aa49841b14c6e6df2a07.js +1 -0
- package/assets/esri/core/workers/chunks/b089058b64db3912478f.js +1 -0
- package/assets/esri/core/workers/chunks/b28539c5a6bedb71b038.js +1 -0
- package/assets/esri/core/workers/chunks/b4f171db73355c6f766e.js +1 -0
- package/assets/esri/core/workers/chunks/b7572b0921b23aef8b9d.js +1 -0
- package/assets/esri/core/workers/chunks/b758f3c419edc2306784.js +1 -0
- package/assets/esri/core/workers/chunks/c3e7290fb128d4fefd44.js +1 -0
- package/assets/esri/core/workers/chunks/c51c9b5da855f84b9a48.js +1 -0
- package/assets/esri/core/workers/chunks/c66ac36da6392b6bf331.js +1 -0
- package/assets/esri/core/workers/chunks/d16b328d32a6ddc2fdb9.js +1 -0
- package/assets/esri/core/workers/chunks/d94c5f36d52cf71f0bb9.js +1 -0
- package/assets/esri/core/workers/chunks/db937849b2c1af87b481.js +1 -0
- package/assets/esri/core/workers/chunks/{66cd99e91dad60c5274c.js → dc3ed59f450283d97a19.js} +1 -1
- package/assets/esri/core/workers/chunks/dcd0653191cd4a1ccaae.js +2 -0
- package/assets/esri/core/workers/chunks/{31df729c17470245288c.js.LICENSE.txt → dcd0653191cd4a1ccaae.js.LICENSE.txt} +2 -2
- package/assets/esri/core/workers/chunks/e4fdd1eaf987977d0a51.js +1 -0
- package/assets/esri/core/workers/chunks/e51f0e71f2a55af604d3.js +1 -0
- package/assets/esri/core/workers/chunks/eb3855d3753d6b8334bd.js +1 -0
- package/assets/esri/core/workers/chunks/{7c290763920f52a1f504.js → eeed138930a4a805691d.js} +1 -1
- package/assets/esri/core/workers/chunks/f435dc615fdc8917f6ca.js +1 -0
- package/assets/esri/core/workers/chunks/{d5c5b9f7f5401f36a3a5.js → f7f3dde4c8f9c687cc1e.js} +1 -1
- package/assets/esri/core/workers/chunks/fc6beaf9466ea3898549.js +1 -0
- package/assets/esri/libs/vxl/vxlLayer.wasm +0 -0
- package/assets/esri/themes/base/widgets/_Tooltip.scss +1 -0
- package/assets/esri/themes/base/widgets/_Weather.scss +1 -2
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/BlendLayers.glsl.js +6 -6
- package/chunks/arcade.js +1 -1
- package/chunks/array.js +1 -1
- package/chunks/languageUtils.js +1 -1
- package/config.js +1 -1
- package/core/sql/StandardizedFunctions.js +1 -1
- package/geohash/GeohashTree.js +1 -1
- package/geometry/support/contains.js +1 -1
- package/geometry/support/heightModelInfoUtils.js +1 -1
- package/geometry/support/intersects.js +1 -1
- package/geometry/support/intersectsBase.js +1 -1
- package/geometry/support/normalizeUtilsCommon.js +1 -1
- package/geometry/support/spatialReferenceUtils.js +1 -1
- package/interfaces.d.ts +685 -37
- package/layers/MediaLayer.d.ts +4 -0
- package/layers/MediaLayer.js +5 -0
- package/layers/VoxelLayer.js +1 -1
- package/layers/VoxelWasmPerSceneView.js +5 -0
- package/layers/graphics/OptimizedGeometry.js +1 -1
- package/layers/graphics/data/BoundsStore.js +1 -1
- package/layers/support/CornersGeoreference.d.ts +4 -0
- package/layers/support/CornersGeoreference.js +5 -0
- package/layers/support/ExtentAndRotationGeoreference.d.ts +4 -0
- package/layers/support/ExtentAndRotationGeoreference.js +5 -0
- package/layers/support/FeatureReduction.js +1 -1
- package/layers/support/FeatureReductionBinning.js +5 -0
- package/layers/support/GeoreferenceBase.js +5 -0
- package/layers/support/ImageElement.d.ts +4 -0
- package/layers/support/ImageElement.js +5 -0
- package/layers/support/LocalMediaElementSource.d.ts +4 -0
- package/layers/support/LocalMediaElementSource.js +5 -0
- package/layers/support/MediaElementBase.d.ts +4 -0
- package/layers/support/MediaElementBase.js +5 -0
- package/layers/support/RouteStopSymbols.d.ts +4 -0
- package/layers/support/RouteSymbols.d.ts +4 -0
- package/layers/support/VoxelFormat.d.ts +4 -0
- package/layers/support/VoxelStyle.d.ts +4 -0
- package/layers/support/VoxelVariable.d.ts +4 -0
- package/layers/support/VoxelVolume.d.ts +4 -0
- package/layers/support/VoxelVolumeStyle.d.ts +4 -0
- package/layers/support/arcgisLayerUrl.js +1 -1
- package/layers/support/featureReductionUtils.js +1 -1
- package/layers/support/fieldUtils.js +1 -1
- package/layers/support/rasterFormats/Lerc.js +1 -1
- package/package.json +3 -3
- package/request.js +1 -1
- package/support/requestUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/Font.js +1 -1
- package/symbols/support/textUtils.js +1 -1
- package/views/2d/engine/brushes.js +1 -1
- package/views/2d/engine/webgl/FeatureTile.js +1 -1
- package/views/2d/engine/webgl/Overlay.js +5 -0
- package/views/2d/engine/webgl/OverlayContainer.js +5 -0
- package/views/2d/engine/webgl/brushes/BrushOverlay.js +5 -0
- package/views/2d/engine/webgl/collisions/CollisionEngine.js +1 -1
- package/views/2d/engine/webgl/shaders/OverlayPrograms.js +5 -0
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layerViewModuleImportUtils.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/MapImageLayerView2D.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +5 -0
- package/views/2d/layers/StreamLayerView2D.js +1 -1
- package/views/2d/layers/WMTSLayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureStore2D.js +1 -1
- package/views/2d/layers/features/Pipeline.js +1 -1
- package/views/2d/layers/features/Store2D.js +1 -1
- package/views/2d/layers/features/controllers/FeatureController2D.js +1 -1
- package/views/2d/layers/features/processors/SymbolProcessor.js +1 -1
- package/views/2d/layers/features/schemaUtils.js +1 -1
- package/views/2d/layers/features/sources/GeoEventSource.js +1 -1
- package/views/2d/layers/features/support/AttributeStore.js +1 -1
- package/views/2d/layers/features/support/BinStore.js +5 -0
- package/views/2d/layers/features/support/ClusterStore.js +1 -1
- package/views/2d/layers/features/tileRenderers/support/WGLFeatureView.js +1 -1
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/2d/layers/support/clusterUtils.js +1 -1
- package/views/2d/magnifier/MagnifierView2D.js +1 -1
- package/views/2d/navigation/actions/Pinch.js +1 -1
- package/views/2d/viewpointUtils.js +1 -1
- package/views/3d/analysis/AnalysisView3D.js +1 -1
- package/views/3d/analysis/Dimensioning/DimensioningTool.js +5 -0
- package/views/3d/analysis/Dimensioning/DimensioningVisualization.js +1 -1
- package/views/3d/analysis/Dimensioning/LengthDimensionSubTool.js +5 -0
- package/views/3d/analysis/Dimensioning/{LinearDimensionVisualization.js → LengthDimensionVisualization.js} +1 -1
- package/views/3d/analysis/Dimensioning/settings.js +5 -0
- package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
- package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
- package/views/3d/interactive/SegmentLabels3D.js +5 -0
- package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
- package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
- package/views/3d/interactive/editingTools/reshapeGraphic/GraphicReshapeTool.js +1 -1
- package/views/3d/interactive/editingTools/reshapeGraphic/ReshapeOperation.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/GraphicTransformTool.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateObjectSymbol3DAdapter.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
- package/views/3d/interactive/visualElements/LabelVisualElement.js +1 -1
- package/views/3d/layerViewModuleImportUtils.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/MediaLayerView3D.js +5 -0
- package/views/3d/layers/VoxelLayerView3D.js +1 -1
- package/views/3d/layers/i3s/IDBCache.js +1 -1
- package/views/3d/state/controllers/RotateController.js +1 -1
- package/views/3d/state/controllers/local/PinchAndPanController.js +1 -1
- package/views/3d/state/controllers/local/ZoomController.js +1 -1
- package/views/3d/state/controllers/local/ZoomStepController.js +1 -1
- package/views/3d/support/ResourceController.js +1 -1
- package/views/3d/support/sunUtils.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/TileCompositor.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/BlendLayers.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/materials/WaterGLMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
- package/views/DOMContainer.js +1 -1
- package/views/GroundView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/ToolViewManager.js +1 -1
- package/views/View.js +1 -1
- package/views/draw/DrawOperation.js +1 -1
- package/views/draw/support/Reshape.js +1 -1
- package/views/interactive/GraphicManipulator.js +1 -1
- package/views/interactive/InteractiveToolBase.js +1 -1
- package/views/interactive/SegmentLabels.js +5 -0
- package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
- package/views/interactive/snapping/LineSnapper.js +1 -1
- package/views/interactive/snapping/ParallelLineSnapper.js +1 -1
- package/views/interactive/snapping/RightAngleSnapper.js +1 -1
- package/views/interactive/snapping/RightAngleTriangleSnapper.js +1 -1
- package/views/interactive/snapping/SnappingAlgorithm.js +1 -1
- package/views/interactive/snapping/SnappingManager.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
- package/views/interactive/snapping/snappingUtils.js +1 -1
- package/views/interactive/support/viewUtils.js +5 -0
- package/views/interactive/tooltip/DrawPointTooltipInfo.js +5 -0
- package/views/interactive/tooltip/DrawPolygonTooltipInfo.js +5 -0
- package/views/interactive/tooltip/DrawPolylineTooltipInfo.js +5 -0
- package/views/interactive/tooltip/Tooltip.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDrawPolygon.js +1 -1
- package/views/interactive/tooltip/support/measurements.js +5 -0
- package/views/layers/FeatureLayerView.js +1 -1
- package/views/layers/GroupLayerView.js +1 -1
- package/views/overlay/TextOverlayItem.js +1 -1
- package/views/support/Scheduler.js +1 -1
- package/views/support/screenUtils.js +1 -1
- package/webscene/Slide.js +1 -1
- package/widgets/Attribution/AttributionViewModel.js +1 -1
- package/widgets/Bookmarks.js +1 -1
- package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/ElevationProfile/support/chartUtils.js +1 -1
- package/widgets/ElevationProfile.js +1 -1
- package/widgets/Feature/FeatureAttachments.js +1 -1
- package/widgets/Feature/FeatureContent/FeatureContentViewModel.js +1 -1
- package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
- package/widgets/Feature/FeatureExpression.js +1 -1
- package/widgets/Feature/FeatureFields.js +1 -1
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/Feature.js +1 -1
- package/widgets/FeatureForm/InputFieldGroup.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTable/FieldColumn.js +1 -1
- package/widgets/FeatureTable/Grid/Column.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +11 -11
- package/widgets/FeatureTable/Grid/support/ButtonMenu.js +1 -1
- package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
- package/widgets/FeatureTemplates/TemplateItem.js +1 -1
- package/widgets/FeatureTemplates.js +1 -1
- package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
- package/widgets/FloorFilter.js +1 -1
- package/widgets/HistogramRangeSlider.js +1 -1
- package/widgets/LayerList/LayerListViewModel.js +1 -1
- package/widgets/LayerList/ListItem.js +1 -1
- package/widgets/LayerList/ListItemPanel.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/Legend/LegendViewModel.js +1 -1
- package/widgets/Legend/styles/Card.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Legend.js +1 -1
- package/widgets/LineOfSight/LineOfSightViewModel.js +1 -1
- package/widgets/Measurement.js +1 -1
- package/widgets/NavigationToggle/NavigationToggleViewModel.js +1 -1
- package/widgets/Popup/PopupViewModel.js +1 -1
- package/widgets/Popup.js +1 -1
- package/widgets/Print/FileLink.js +1 -1
- package/widgets/Print.js +1 -1
- package/widgets/ScaleBar.js +1 -1
- package/widgets/ScaleRangeSlider/ScaleRangeSliderViewModel.js +1 -1
- package/widgets/ScaleRangeSlider.js +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/widgets/Search.js +1 -1
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/TableList/ListItem.js +1 -1
- package/widgets/Weather/LabeledSlider.js +1 -1
- package/widgets/Weather/VisibleElements.js +5 -0
- package/widgets/Weather/css.js +1 -1
- package/widgets/Weather.js +1 -1
- package/widgets/support/AnalysisViewModel.js +1 -1
- package/widgets/support/InteractiveAnalysisViewModel.js +1 -1
- package/analysis/LinearDimension.d.ts +0 -4
- package/analysis/LinearDimension.js +0 -5
- package/assets/esri/core/workers/chunks/0018053ac16a09feba70.js +0 -1
- package/assets/esri/core/workers/chunks/042938ca73f0b9e5a7e2.js +0 -1
- package/assets/esri/core/workers/chunks/048645611caa28dca7cd.js +0 -1
- package/assets/esri/core/workers/chunks/0b72d123386dc4ec7538.js +0 -1
- package/assets/esri/core/workers/chunks/13b04d5bf348ab5054c2.js +0 -1
- package/assets/esri/core/workers/chunks/215007e7c44811d90777.js +0 -1
- package/assets/esri/core/workers/chunks/31df729c17470245288c.js +0 -2
- package/assets/esri/core/workers/chunks/36272141b3c33cb19026.js +0 -1
- package/assets/esri/core/workers/chunks/36c8e8de9c3f67d32572.js +0 -1
- package/assets/esri/core/workers/chunks/37c428489c59df4b597b.js +0 -1
- package/assets/esri/core/workers/chunks/493169fd978fd543ef3b.js +0 -1
- package/assets/esri/core/workers/chunks/4f378ad6f4299183df85.js +0 -1
- package/assets/esri/core/workers/chunks/58e4c6ce1580427e7b55.js +0 -1
- package/assets/esri/core/workers/chunks/6c5441da675a8af35be2.js +0 -1
- package/assets/esri/core/workers/chunks/6ea16f6a0df946de480b.js +0 -1
- package/assets/esri/core/workers/chunks/7dfd70f4fa1096e56641.js +0 -1
- package/assets/esri/core/workers/chunks/88193e61072d7bf957f5.js +0 -1
- package/assets/esri/core/workers/chunks/8ccbde593c86c872e525.js +0 -1
- package/assets/esri/core/workers/chunks/9c6be39f1f21ab8b1c2d.js +0 -1
- package/assets/esri/core/workers/chunks/a73795cce722ba15b3da.js +0 -1
- package/assets/esri/core/workers/chunks/a8ed1a938dc164b401d9.js +0 -1
- package/assets/esri/core/workers/chunks/a9a73bc4875a5aeaf1b9.js +0 -1
- package/assets/esri/core/workers/chunks/adcc5bce6c0971c1b592.js +0 -1
- package/assets/esri/core/workers/chunks/afddfe620e6539991e6b.js +0 -1
- package/assets/esri/core/workers/chunks/b340c9bdabdb37995c8f.js +0 -1
- package/assets/esri/core/workers/chunks/b4c23630d6c85f7b59c0.js +0 -1
- package/assets/esri/core/workers/chunks/c180c40838246985479d.js +0 -1
- package/assets/esri/core/workers/chunks/caed2365bd296fcc8a75.js +0 -1
- package/assets/esri/core/workers/chunks/d85b5b73a151c6fbb658.js +0 -1
- package/assets/esri/core/workers/chunks/da6261673c3e1537b6a6.js +0 -1
- package/assets/esri/core/workers/chunks/dafe120243db6648a4ab.js +0 -1
- package/assets/esri/core/workers/chunks/ec6d138e8183e193f977.js +0 -1
- package/assets/esri/core/workers/chunks/ed4519ac9533a4d340f1.js +0 -1
- package/assets/esri/core/workers/chunks/f206300eef4560611728.js +0 -1
- package/assets/esri/core/workers/chunks/f55cbaf5a1d6ee6ac171.js +0 -1
- package/layers/GeoreferencedImageLayer.d.ts +0 -4
- package/layers/GeoreferencedImageLayer.js +0 -5
- package/layers/VoxelWasmManager.js +0 -5
- package/layers/VoxelWasmPerScene.js +0 -5
- package/views/3d/interactive/measurementTools/support/viewUtils.js +0 -5
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{_ as r}from"../chunks/tslib.es6.js";import o from"../core/Collection.js";import{unwrap as e}from"../core/maybe.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import"../core/has.js";import{cast as t}from"../core/accessorSupport/decorators/cast.js";import{subclass as c}from"../core/accessorSupport/decorators/subclass.js";import p from"./Layer.js";import{BlendLayer as a}from"./mixins/BlendLayer.js";import{ScaleRangeLayer as i}from"./mixins/ScaleRangeLayer.js";import m from"./support/LocalMediaElementSource.js";let l=class extends(a(i(p))){constructor(r){super(r),this.source=new m,this.type="media"}destroy(){e(this.source)?.destroy()}castSource(r){return r?Array.isArray(r)||r instanceof o?new m({elements:r}):r:null}};r([s({type:["show","hide"]})],l.prototype,"listMode",void 0),r([s()],l.prototype,"source",void 0),r([t("source")],l.prototype,"castSource",null),r([s({readOnly:!0})],l.prototype,"type",void 0),l=r([c("esri.layers.MediaLayer")],l);const y=l;export{y as default};
|
package/layers/VoxelLayer.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/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import r from"../core/Collection.js";import t from"../core/Error.js";import
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import r from"../core/Collection.js";import t from"../core/Error.js";import o from"../core/Logger.js";import{isSome as i,isNone as s}from"../core/maybe.js";import{MultiOriginJSONMixin as n}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as l}from"../core/promiseUtils.js";import{property as a}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import"../core/has.js";import"../core/accessorSupport/ensureType.js";import{reader as p}from"../core/accessorSupport/decorators/reader.js";import{subclass as m}from"../core/accessorSupport/decorators/subclass.js";import{n as u}from"../chunks/vec3.js";import{f as c}from"../chunks/vec3f64.js";import y from"./Layer.js";import{APIKeyMixin as d}from"./mixins/APIKeyMixin.js";import{ArcGISService as h}from"./mixins/ArcGISService.js";import{OperationalLayer as v}from"./mixins/OperationalLayer.js";import{PortalLayer as f}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as b}from"./mixins/ScaleRangeLayer.js";import{SceneService as g}from"./mixins/SceneService.js";import{sanitizeUrl as S}from"./support/arcgisLayerUrl.js";import{popupEnabled as V,legendEnabled as x,url as j}from"./support/commonProperties.js";import w from"./support/VoxelDynamicSection.js";import I from"./support/VoxelSection.js";import N from"./support/VoxelSlice.js";import L from"./support/VoxelStyle.js";import{VoxelVariable as T}from"./support/VoxelVariable.js";import O from"./support/VoxelVolume.js";import P from"./support/VoxelVolumeIndex.js";const E=o.getLogger(" esri.layers.VoxelLayer");let A=class extends(g(h(v(f(b(n(d(y)))))))){constructor(e){super(e),this.serviceRoot="",this.popupEnabled=!0,this.operationalLayerType="Voxel",this.legendEnabled=!0,this.title=null,this.sections=new r,this.style=null,this.opacity=1,this.variables=new r,this.volumes=new r,this.index=null,this.minScale=0,this.maxScale=0,this.type="voxel",this.version={major:Number.NaN,minor:Number.NaN,versionString:""}}set url(e){this._set("url",S(e,E))}load(e){const r=i(e)?e.signal:null,t=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(l).then((()=>this._fetchService(r))).then((()=>this.serviceRoot=this.url));return this.addResolvingPromise(t),Promise.resolve(this)}readVersion(e,r){return super.parseVersionString(e)}validateLayer(e){if(e.layerType&&e.layerType!==this.operationalLayerType)throw new t("voxel-layer:layer-type-not-supported","VoxelLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor)||this.version.major<3)throw new t("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"});if(this.version.major>3)throw new t("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"})}getConfiguration(){const e={layerType:this.operationalLayerType,version:this.version.versionString,name:this.title,spatialReference:this.spatialReference,fullExtent:this.fullExtent,volumes:this.volumes.toJSON(),variables:this.variables.toJSON(),index:this.index.toJSON(),sections:this.sections.toJSON(),style:this.style};return e.index&&this.index.isValid()?JSON.stringify(e):""}getVariableStyle(e){let r=-1;r=i(e)?e:this.getCurrentVariableId();const t=this?.style.variableStyles;if(!t||-1===r)return null;const o=this.style.variableStyles.findIndex((e=>e.variableId===r));return o<0?null:this.style.variableStyles.getItemAt(o)}getVariable(e){let r=-1;if(r=i(e)?e:this.getCurrentVariableId(),!this.variables||-1===r)return null;const t=this.variables.findIndex((e=>e.id===r));return t<0?null:this.variables.getItemAt(t)}getSections(){const e=[];for(const r of this.sections)e.push(new I({enabled:r.enabled,href:r.href,id:r.id,label:r.label,normal:r.normal,point:r.point,sizeInPixel:r.sizeInPixel,slices:r.slices,timeId:r.timeId,variableId:r.variableId}));return e}getVolume(e){const r=this.getVariable(e);return i(r)?this.volumes.find((({id:e})=>e===r.volumeId)):null}getVolumeStyle(e){const r=this.getVariable(e);return i(r)?this.style.volumeStyles.find((({volumeId:e})=>e===r.volumeId)):null}getSlices(){const e=[],r=this.getVolume(null);if(s(r)||!r.isVolumeValid())return e;const t=this.getVolumeStyle(null);if(s(t))return e;for(const o of t.slices)this._isPlaneValid(o,[0,1,r.getZDimension()],r.dimensions)?e.push(new N({enabled:o.enabled,label:o.label,point:o.point,normal:o.normal})):e.push(new N({enabled:!1,label:"invalid",point:o.point,normal:o.normal}));return e}getDynamicSections(){const e=[],r=this.getVolume(null);if(s(r)||!r.isVolumeValid())return e;const t=this.getVolumeStyle(null);if(s(t))return e;for(const o of t.dynamicSections)this._isPlaneValid(o,[0,1,r.getZDimension()],r.dimensions)?e.push(new w({enabled:o.enabled,label:o.label,point:o.point,normal:o.normal})):e.push(new w({enabled:!1,label:"invalid",point:o.point,normal:o.normal}));return e}getCurrentVariableId(){return this.style?this.style.currentVariableId:-1}getRenderMode(){return this.style?this.style.renderMode:"volume"}getVerticalExaggeration(){const e=1,r=this.getVolumeStyle(null);return s(r)?e:r.verticalExaggeration}getVerticalOffset(){const e=1,r=this.getVolumeStyle(null);return s(r)?e:r.verticalOffset}_isPlaneValid(e,r,t){if(!e.point)return!1;if(!Array.isArray(e.point)||3!==e.point.length)return!1;if(!e.normal)return!1;if(!Array.isArray(e.normal)||3!==e.normal.length)return!1;for(let s=0;s<3;++s){const o=e.point[s];if(o<0||o>=t[r[s]].size)return!1}const o=c(e.normal[0],e.normal[1],e.normal[2]);u(o,o);const i=1e-6;return!(Math.abs(o[0])+Math.abs(o[1])+Math.abs(o[2])<i)&&(e.normal[0]=o[0],e.normal[1]=o[1],e.normal[2]=o[2],!0)}};e([a(V)],A.prototype,"popupEnabled",void 0),e([a({type:["Voxel"]})],A.prototype,"operationalLayerType",void 0),e([a(x)],A.prototype,"legendEnabled",void 0),e([a({json:{write:!0}})],A.prototype,"title",void 0),e([a(j)],A.prototype,"url",null),e([a({type:r.ofType(I),json:{write:!0,origins:{"web-scene":{name:"layerDefinition.sections",write:!0},service:{write:!1}}}})],A.prototype,"sections",void 0),e([a({type:L,json:{write:!0,origins:{"web-scene":{name:"layerDefinition.style",write:!0},service:{write:!1}}}})],A.prototype,"style",void 0),e([a({type:["show","hide"]})],A.prototype,"listMode",void 0),e([a({type:Number,range:{min:0,max:1},nonNullable:!0,json:{read:!1,write:!1,origins:{"web-scene":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],A.prototype,"opacity",void 0),e([a({type:r.ofType(T)})],A.prototype,"variables",void 0),e([a({type:r.ofType(O)})],A.prototype,"volumes",void 0),e([a({type:P})],A.prototype,"index",void 0),e([a({type:Number,json:{name:"layerDefinition.minScale",read:!1,write:!1,origins:{service:{read:!1,write:!1}}}})],A.prototype,"minScale",void 0),e([a({type:Number,json:{name:"layerDefinition.maxScale",read:!1,write:!1,origins:{service:{read:!1,write:!1}}}})],A.prototype,"maxScale",void 0),e([a({json:{read:!1},readOnly:!0})],A.prototype,"type",void 0),e([a({readOnly:!0,json:{name:"serviceVersion"}})],A.prototype,"version",void 0),e([p("service","version")],A.prototype,"readVersion",null),A=e([m("esri.layers.VoxelLayer")],A);const D=A;export{D as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import e from"../request.js";import t from"../core/has.js";import i from"../core/Logger.js";import{isSome as r,removeMaybe as s}from"../core/maybe.js";import{isAbortError as n}from"../core/promiseUtils.js";import{watch as a}from"../core/reactiveUtils.js";import{WasmCullMode as o,VoxelRequestType as l,UpdateFlags as h}from"../libs/vxl/enums.js";import{loadVoxelWASM as d}from"../libs/vxl/VxlModule.js";import{RenderPass as _}from"../views/3d/webgl-engine/lib/RenderPass.js";import{RenderSlot as c}from"../views/3d/webgl-engine/lib/RenderSlot.js";import{ContextType as u}from"../views/webgl/context-util.js";import{CompareFunction as g,Face as x,StencilOperation as m}from"../views/webgl/enums.js";const v=i.getLogger("esri.layers.VoxelWasmPerSceneView");var y;!function(e){e[e.Lifetime=1]="Lifetime",e[e.RequestResponse=2]="RequestResponse",e[e.Rendering=3]="Rendering",e[e.Error=4]="Error"}(y||(y={}));class p{constructor(e){this._halfIntTexturesAvailable=!1,this._textureFloatLinearAvailable=!1,this._havePreparedWithAllLayers=!1,this._renderPluginContext=null,this._vxl=null,this._pluginIsActive=!1,this._moreToLoad=!1,this._viewportWidth=-1,this._viewportHeight=-1,this._newLayers=[],this._layers=new Map,this._renderPass=_.MATERIAL,this._renderSlot=c.VOXEL,this._rctx=null,this._renderTargetToRestore=null,this._lastFrameWasStationary=!1,this._wasmMemBlockSizes=[512,1024,2048,4096,8192,16384,32768,65536],this._wasmMemBlocks=new Map,this._dbgFlags=new Set,this._view=e,this._initialize()}get canRender(){return!!this._vxl&&"local"===this._view.viewingMode}_dbg(e,t){this._dbgFlags.has(e)&&(e===y.Error?v.error(t):v.warn(t))}_removeRenderPlugin(){this._pluginIsActive&&this._view._stage&&(this._dbg(y.Lifetime,"--removeRenderPlugin--"),this._view._stage.removeRenderPlugin(this)),this._pluginIsActive=!1}_initialize(){this._dbg(y.Lifetime,"--initialize--");for(const e of this._wasmMemBlockSizes)this._wasmMemBlocks.set(e,0);this._readyWatchHandle=a((()=>this._view.ready),(e=>{e&&"local"===this._view.viewingMode?(this._dbg(y.Lifetime,"view ready status changed to ready on a local view, calling addRenderPlugin"),this._view._stage.addRenderPlugin([this._renderSlot],this),this._pluginIsActive=!0):(this._dbg(y.Lifetime,"view ready status changed, not ready or not a local view!"),this._removeRenderPlugin())}),{initial:!0}),this._qualityWatchHandle=a((()=>this._view?.qualityProfile),(e=>{this._dbg(y.Rendering,"qualityProfile changed to "+e),this._vxl&&this._vxl.set_quality(this._toWasmQuality(e))}),{initial:!0}),this._timeExtentWatchHandle=a((()=>this._view?.timeExtent),(()=>{if(this._vxl){const e=this._getTimeArgs(this._view?.timeExtent);this._dbg(y.Rendering,"sceneView timeExtent changed to useTime="+e.useTime+" st="+e.startTime+" et="+e.endTime),this._vxl.set_scene_time_extent(e.startTime,e.endTime,e.useTime),this._renderPluginContext.requestRender()}}),{initial:!0}),this._stationaryWatchHandle=a((()=>this._view?.stationary),(e=>{this._vxl&&e&&!this._lastFrameWasStationary&&this._renderPluginContext.requestRender()}))}initializeRenderContext(e){this._dbg(y.Lifetime,"--initializeRenderContext--");const t=e.renderContext.rctx;t.type===u.WEBGL2?(this._renderPluginContext=e,this._rctx=e.renderContext.rctx,this._halfIntTexturesAvailable=!!this._rctx.capabilities.textureNorm16,this._textureFloatLinearAvailable=this._rctx.capabilities.textureFloatLinear,this._initializeWasm(t.gl)):this._dbg(y.Error,"WebGL 1 context only!")}uninitializeRenderContext(){this._renderPluginContext=null,this._rctx=null,this._dbg(y.Lifetime,"--uninitializeRenderContext--")}_restoreFramebuffer(){if(!this._renderTargetToRestore)return;const e=this._renderTargetToRestore.fbo;if(!!!this._rctx)return void this._dbg(y.Error,"no context in restoreFramebuffer!");this._rctx.bindFramebuffer(e,!0);const t=this._renderTargetToRestore.viewport;this._rctx.setViewport(t.x,t.y,t.width,t.height)}_bindPreviousDepthToSlot(e,t){const i=!!this._rctx,r=!!this._renderTargetToRestore;if(!i||!r)return 0;const s=this._renderTargetToRestore.fbo.depthStencilTexture;return s?(0===t?this._rctx.bindTexture(null,e,!0):this._rctx.bindTexture(s,e,!0),1):(this._dbg(y.Error,"no depth/stencil texture exists!"),0)}_modifyResourceCount(e,t,i){if(!this._rctx)return void this._dbg(y.Error,"modifyAllocation callback has no rendering context!");const r=e;1===i?this._rctx.instanceCounter.increment(r,t):this._rctx.instanceCounter.decrement(r,t)}_setBlendState(e,t,i,r){this._rctx?(this._rctx.setBlendingEnabled(1===e),this._rctx.setBlendFunction(t,i),this._rctx.setBlendEquation(r)):this._dbg(y.Error,"setBlendState callback has no rendering context!")}_setFrontFace(e){this._rctx?this._rctx.setFrontFace(e):this._dbg(y.Error,"setFrontFace callback has no rendering context!")}_setDepthStencilStateFunction(e,t,i){this._rctx?(this._rctx.setDepthFunction(i),this._rctx.setDepthTestEnabled(1===e),this._rctx.setDepthWriteEnabled(1===t),this._rctx.setStencilTestEnabled(!1),this._rctx.setStencilFunction(g.ALWAYS,0,255),this._rctx.setStencilOpSeparate(x.FRONT,m.KEEP,m.INCR,m.KEEP),this._rctx.setStencilOpSeparate(x.BACK,m.KEEP,m.DECR,m.KEEP)):this._dbg(y.Error,"setDepthStencilStateFunction callback has no rendering context!")}_setRasterizerState(e){if(this._rctx)switch(e){case o.None:this._rctx.setFaceCullingEnabled(!1);break;case o.Back:this._rctx.setCullFace(x.BACK),this._rctx.setFaceCullingEnabled(!0);break;case o.Front:this._rctx.setCullFace(x.FRONT),this._rctx.setFaceCullingEnabled(!0)}else this._dbg(y.Error,"setRasterizerState callback has no rendering context!")}_setViewport(e,t,i,r){this._rctx?this._rctx.setViewport(e,t,i,r):this._dbg(y.Error,"setViewport callback has no rendering context!")}_updateMemoryUsage(){this._layers.forEach(((e,t)=>{if(e.needMemoryUsageUpdate){const i=this._vxl.estimate_memory_usage(t);i>=0&&(e.needMemoryUsageUpdate=!1,e.layerView.setUsedMemory(i))}}))}_syncRequestsResponses(){this._layers.forEach(((t,i)=>{const r=[];t.responses.forEach(((e,s)=>{r.push(s),this._dbg(y.RequestResponse,"responding for requestID:"+s+" size:"+e.size),this._vxl.respond(i,s,e),e.requestType!==l.TreeIndex&&e.requestType!==l.Section||(t.needMemoryUsageUpdate=!0)}));const s=t.responses;for(const e of r)s.delete(e);const a=this._vxl.get_new_requests(i),o=t.abortController.signal;for(const l in a){t.outstandingRequestCount+=1,1===t.outstandingRequestCount&&t.layerView.updatingFlagChanged();const i=a[l],r={responseType:"array-buffer",signal:o};this._dbg(y.RequestResponse,"making requestID:"+l+" url:"+i.url),e(i.url,r).then((e=>{t.outstandingRequestCount-=1,0===t.outstandingRequestCount&&t.layerView.updatingFlagChanged(),this._dbg(y.RequestResponse,"have response for requestID:"+l);let r=0;if(e.data.byteLength>0){r=this._vxl._malloc(e.data.byteLength);const t=new Uint8Array(this._vxl.HEAPU8.buffer,r,e.data.byteLength),i=new Uint8Array(e.data);for(let r=0;r<e.data.byteLength;++r)t[r]=i[r]}s.set(+l,{responseType:i.responseType,ptr:r,size:e.data.byteLength,success:!0,requestType:i.requestType})})).catch((e=>{t.outstandingRequestCount-=1,0===t.outstandingRequestCount&&t.layerView.updatingFlagChanged(),n(e)||(this._dbg(y.Error,`requestID:${l} failed, error=${e.toString()}`),s.set(+l,{responseType:i.responseType,ptr:0,size:0,success:!1,requestType:i.requestType}))}))}}))}updateWasmCamera(e){this._vxl.set_projection_matrix.apply(this._vxl,e.projectionMatrix),this._vxl.set_view_matrix.apply(this._vxl,e.viewMatrix),this._vxl.set_near_far(e.near,e.far)}isUpdating(e){return!(this._vxl||!this._vxlPromise)||!!this._layers.has(e)&&this._layers.get(e).outstandingRequestCount>0}setEnabled(e,t){this._layers.forEach(((i,r)=>{i.layerView.wasmLayerId===e.wasmLayerId&&(this._vxl.set_enabled(r,t),i.needMemoryUsageUpdate=!0,this._renderPluginContext.requestRender())}))}setSlices(e,t){const i={mask:h.Slices,slices:{planes:t,currentEditPlane:-1}};return this._doMaskedUIUpdate(e,i,!0)}setDynamicSections(e,t){const i={mask:h.DynamicSections,dynamicSections:{planes:t,currentEditPlane:-1}};return this._doMaskedUIUpdate(e,i,!0)}setStaticSections(e,t){const i={mask:h.StaticSections,staticSections:t};return this._doMaskedUIUpdate(e,i,!0)}setCurrentVariable(e,t){const i={mask:h.CurrentVariable,currentVariable:t};return this._doMaskedUIUpdate(e,i,!0)}setRenderMode(e,t){const i={mask:h.RenderMode,renderMode:t};return this._doMaskedUIUpdate(e,i,!0)}setVerticalExaggerationAndOffset(e,t,i,r){const s={mask:h.ExaggerationAndOffset,volStyleDesc:{volumeId:t,verticalExaggeration:i,verticalOffset:r}};return this._doMaskedUIUpdate(e,s,!0)}_doMaskedUIUpdate(e,t,i){if(!this._vxl)return!1;let r=!1;return this._layers.forEach(((i,s)=>{if(i.layerView.wasmLayerId===e.wasmLayerId){const e={str:JSON.stringify(t),byteCount:0,ptr:0,isReusable:!1};this._allocateBlock(e)&&(r=1===this._vxl.handle_masked_ui_update(s,e.ptr,e.byteCount),e.isReusable||this._vxl._free(e.ptr))}})),r&&i&&this._renderPluginContext.requestRender(),r}addVoxelLayer(e){if(!this._vxl){const t={layerView:e,resolveCallback:null,rejectCallback:null},i=new Promise(((e,i)=>{t.resolveCallback=e,t.rejectCallback=i}));return this._newLayers.push(t),i}const t=this._addVoxelLayer(e);return t<0?Promise.reject(-1):Promise.resolve(t)}removeVoxelLayer(e){if(!this._vxl){const t=this._newLayers.findIndex((t=>e.uid===t.layerView.uid));t>=0&&(this._newLayers[t].resolveCallback(-1),this._newLayers.splice(t,1));const i=this._newLayers.length;return 0===i&&(this._dbg(y.Lifetime," no voxel layers left after removing a layer, removing RenderPlugin and destroying"),this.destroy()),i}let t=-1;this._layers.forEach(((i,r)=>{i.layerView.wasmLayerId===e.wasmLayerId&&(t=r,i.abortController.abort(),this._vxl.remove_layer(t))})),t>=0&&this._layers.delete(t);const i=this._layers.size;return 0===i&&(this._dbg(y.Lifetime," no voxel layers left after removing a layer, removing RenderPlugin and destroying"),this.destroy()),i}_getBlockSize(e){for(const t of this._wasmMemBlockSizes)if(e<t)return t;return-1}_allocateBlock(e){e.byteCount=this._vxl.lengthBytesUTF8(e.str)+1;const t=this._getBlockSize(e.byteCount);return t<0?(e.isReusable=!1,e.ptr=this._vxl._malloc(e.byteCount)):(e.isReusable=!0,e.ptr=this._wasmMemBlocks.get(t),0===e.ptr&&(e.ptr=this._vxl._malloc(t),this._wasmMemBlocks.set(t,e.ptr))),0!==e.ptr&&(this._vxl.stringToUTF8(e.str,e.ptr,e.byteCount),!0)}_getTimeArgs(e){let t=-Number.MAX_VALUE,i=Number.MAX_VALUE,s=!1;return r(e)&&(e.isAllTime?s=!0:(r(e.start)&&(s=!0,t=e.start.getTime()/1e3),r(e.end)&&(s=!0,i=e.end.getTime()/1e3))),{startTime:t,endTime:i,useTime:s}}_addVoxelLayer(e){const i=e.layer;let r=-1;const s=i.getConfiguration();if(s.length<1)return-1;const n={str:s,byteCount:0,ptr:0,isReusable:!1};if(!this._allocateBlock(n))return-1;const a=this._getTimeArgs(this._view?.timeExtent),o=this._view.spatialReference.isWGS84&&i.spatialReference.isWGS84?111319.49079327357:1;if(r=this._vxl.add_layer(i.serviceRoot,n.ptr,n.byteCount,o,o,a.startTime,a.endTime,a.useTime,this._toWasmQuality(this._view.qualityProfile)),n.isReusable||this._vxl._free(n.ptr),r>=0){const i=new AbortController;if(this._layers.set(r,{layerView:e,responses:new Map,outstandingRequestCount:0,abortController:i,needMemoryUsageUpdate:!1}),!this._halfIntTexturesAvailable||t("mac")){const t=[];let i="";for(const r of e.layer.variables)"Int16"!==r.renderingFormat.type&&"UInt16"!==r.renderingFormat.type||(t.push(r.name),r.id===e.layer.style.currentVariableId&&(i=r.name));""!==i&&v.error("#addVoxelLayer_error()",e.layer,`The voxel layer '${e.layer.title}' cannot render the current variable '${i}' in this browser`),t.length>0&&v.warn("#addVoxelLayer_warning()",e.layer,`The voxel layer '${e.layer.title}' cannot render the variables '${t.toString()}' in this browser`)}if(!this._textureFloatLinearAvailable){const t=[];let i="";for(const r of e.layer.variables)"Float32"===r.renderingFormat.type&&(t.push(r.name),r.id===e.layer.style.currentVariableId&&(i=r.name));""!==i&&v.error("#addVoxelLayer_error()",e.layer,`The voxel layer '${e.layer.title}' cannot render the current variable '${i}' in this browser`),t.length>0&&v.warn("#addVoxelLayer_warning()",e.layer,`The voxel layer '${e.layer.title}' cannot render the variables '${t.toString()}' in this browser`)}return t("esri-mobile")&&v.warnOnce("Mobile support differs across devices. Voxel layer might not display as expected."),r}return-1}prepareRender(e){if(!this._vxl)return;const t=e.bindParameters.camera.viewForward,i=e.bindParameters.camera.eye;this._vxl.update_camera_pos_and_direction(i[0],i[1],i[2],t[0],t[1],t[2]);const r=this._vxl.cull();this._dbg(y.RequestResponse,"missingResourceCount="+r),this._moreToLoad=r>0,this._havePreparedWithAllLayers=0===this._newLayers.length,this._updateMemoryUsage()}render(e){if(!this._vxl||e.pass!==this._renderPass||e.bindParameters.slot!==this._renderSlot)return;for(const i of this._newLayers){const e=this._addVoxelLayer(i.layerView);-1===e?i.rejectCallback(-1):i.resolveCallback(e)}if(this._newLayers=[],0===this._layers.size)return void this._dbg(y.Error,"No voxel layers but RenderPlugin instance is being asked to render!");this._renderTargetToRestore={fbo:this._rctx.getBoundFramebufferObject(),viewport:this._rctx.getViewport()},this._syncRequestsResponses(),this._lastFrameWasStationary=this._view.stationary,this._rctx.setPolygonOffsetFillEnabled(!1),this._rctx.setScissorTestEnabled(!1),this._rctx.setColorMask(!0,!0,!0,!0),this._vxl.begin_color_frame(!this._view.stationary||this._moreToLoad,e.bindParameters.lighting.lightingMainDirection[0],e.bindParameters.lighting.lightingMainDirection[1],e.bindParameters.lighting.lightingMainDirection[2]);const t=this._renderTargetToRestore.viewport;t.width===this._viewportWidth&&t.height===this._viewportHeight||(this._viewportWidth=t.width,this._viewportHeight=t.height,this._vxl.set_viewport(t.width,t.height),this._layers.forEach((e=>{e.needMemoryUsageUpdate=!0}))),0===t.x&&0===t.y||this._dbg(y.Error,"Unsupported viewport parameters detected!"),this.updateWasmCamera(e.bindParameters.camera),this._vxl.draw(),this._renderTargetToRestore.fbo=null,e.rctx.externalTextureUnitUpdate(this._vxl.get_texture_units_bound_in_frame(),this._vxl.get_active_texture_unit()),e.rctx.externalVertexArrayObjectUpdate(),e.rctx.externalVertexBufferUpdate(),this._rctx.externalProgramUpdate(),(this._moreToLoad||!this._havePreparedWithAllLayers&&this._layers.size>0)&&this._renderPluginContext.requestRender()}destroy(){this._dbg(y.Lifetime,"--destroy--"),this._removeRenderPlugin(),this._readyWatchHandle=s(this._readyWatchHandle),this._qualityWatchHandle=s(this._qualityWatchHandle),this._timeExtentWatchHandle=s(this._timeExtentWatchHandle),this._stationaryWatchHandle=s(this._stationaryWatchHandle),this._vxl&&(this._layers.forEach((e=>{e.abortController.abort()})),this._wasmMemBlocks.forEach((e=>{0!==e&&this._vxl._free(e)})),this._vxl.uninitialize_voxel_wasm(),this._vxl=null)}_initializeWasm(e){return this._vxl?Promise.resolve():(this._vxlPromise||(this._vxlPromise=d(e).then((e=>{if(this._vxl=e,this._vxlPromise=null,this._newLayers.length<=0)return this._dbg(y.Lifetime," no voxel layers left after WASM downloaded, removing RenderPlugin and destroying"),void this.destroy();const i=this._getTimeArgs(this._view?.timeExtent),r=this._vxl.addFunction(this._restoreFramebuffer.bind(this),"v"),s=this._vxl.addFunction(this._setBlendState.bind(this),"viiii"),n=this._vxl.addFunction(this._setFrontFace.bind(this),"vi"),a=this._vxl.addFunction(this._setRasterizerState.bind(this),"vi"),o=this._vxl.addFunction(this._setDepthStencilStateFunction.bind(this),"viii"),l=this._vxl.addFunction(this._setViewport.bind(this),"viiii"),h=this._vxl.addFunction(this._bindPreviousDepthToSlot.bind(this),"iii"),d=this._vxl.addFunction(this._modifyResourceCount.bind(this),"viii"),_=this._halfIntTexturesAvailable&&!t("mac"),c=this._textureFloatLinearAvailable;this._vxl.initialize_voxel_wasm(r,s,n,a,o,l,h,d,i.startTime,i.endTime,i.useTime,_,c),this._renderPluginContext&&this._renderPluginContext.requestRender()})).catch((()=>{for(const e of this._newLayers)e.rejectCallback(-2);this._dbg(y.Error," WASM failed to download, removing RenderPlugin and destroying"),this.destroy()}))),this._vxlPromise)}pickDepth(e,t,i){if(!this._vxl||!this._rctx||0===this._layers.size)return null;const r=i.viewport[3]-t;if(e<0||e>i.viewport[2]||t<0||t>i.viewport[3])return this._dbg(y.Error,`pickDepth: outOfRange, screenXY=[${e}, ${r}], vp=[${i.viewport.toString()}]`),null;this._renderTargetToRestore={fbo:this._rctx.getBoundFramebufferObject(),viewport:this._rctx.getViewport()};const s=i.viewForward,n=i.eye;this._vxl.update_camera_pos_and_direction(n[0],n[1],n[2],s[0],s[1],s[2]),this.updateWasmCamera(i),this._vxl.begin_frame();const a=this._vxl.pick_depth(e,r);if(this._renderTargetToRestore.fbo=null,this._rctx.externalTextureUnitUpdate(this._vxl.get_texture_units_bound_in_frame(),this._vxl.get_active_texture_unit()),this._rctx.externalVertexArrayObjectUpdate(),this._rctx.externalVertexBufferUpdate(),this._rctx.externalProgramUpdate(),a.success){return a.distanceToCamera}return null}_toWasmQuality(e){switch(e){case"low":return 0;case"medium":return 1;case"high":return 2}}}export{p as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
class t{constructor(t=[],e=[],s=!1){this.lengths=t??[],this.coords=e??[],this.hasIndeterminateRingOrder=s}get isPoint(){return 0===this.lengths.length}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((t,e)=>t+e))}forEachVertex(t){let e=0;this.lengths.length||t(this.coords[0],this.coords[1]);for(let s=0;s<this.lengths.length;s++){const h=this.lengths[s];for(let s=0;s<h;s++){t(this.coords[2*(s+e)],this.coords[2*(s+e)+1])}e+=h}}clone(e){return e?(e.set(this.coords),new t(this.lengths.slice(),e,this.hasIndeterminateRingOrder)):new t(this.lengths.slice(),this.coords.slice(),this.hasIndeterminateRingOrder)}}export{t as default};
|
|
5
|
+
class t{constructor(t=[],e=[],s=!1){this.lengths=t??[],this.coords=e??[],this.hasIndeterminateRingOrder=s}static fromRect(e){const[s,h,n,r]=e,i=n-s,o=r-h;return new t([5],[s,h,i,0,0,o,-i,0,0,-o])}get isPoint(){return 0===this.lengths.length}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((t,e)=>t+e))}forEachVertex(t){let e=0;this.lengths.length||t(this.coords[0],this.coords[1]);for(let s=0;s<this.lengths.length;s++){const h=this.lengths[s];for(let s=0;s<h;s++){t(this.coords[2*(s+e)],this.coords[2*(s+e)+1])}e+=h}}clone(e){return e?(e.set(this.coords),new t(this.lengths.slice(),e,this.hasIndeterminateRingOrder)):new t(this.lengths.slice(),this.coords.slice(),this.hasIndeterminateRingOrder)}}export{t as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import i from"../../../core/has.js";import{PooledRBush as s}from"../../../core/libs/rbush/PooledRBush.js";const d=5e4,n={minX:0,minY:0,maxX:0,maxY:0};function t(i
|
|
5
|
+
import i from"../../../core/has.js";import{PooledRBush as s}from"../../../core/libs/rbush/PooledRBush.js";const d=5e4,n={minX:0,minY:0,maxX:0,maxY:0};function t(i){n.minX=i[0],n.minY=i[1],n.maxX=i[2],n.maxY=i[3]}function e(i,s,d){t(s),i.search(n,d)}class o{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new s(9,i("esri-csp-restrictions")?i=>({minX:i[0],minY:i[1],maxX:i[2],maxY:i[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const i=new Array(this._idByBounds.size);let s=0;this._idByBounds.forEach(((d,n)=>{i[s++]=n})),this._indexInvalid=!1,this._index.clear(),this._index.load(i)}else this._boundsToLoad.length&&(this._index.load(this._boundsToLoad.filter((i=>this._idByBounds.has(i)))),this._boundsToLoad.length=0)}}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(i){const s=this._boundsById.get(i);this._boundsById.delete(i),s&&(this._idByBounds.delete(s),this._indexInvalid||this._index.remove(s))}forEachInBounds(i,s){this._loadIndex(),e(this._index,i,(i=>s(this._idByBounds.get(i))))}get(i){return this._boundsById.get(i)}has(i){return this._boundsById.has(i)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(i,s){if(!this._indexInvalid){const s=this._boundsById.get(i);s&&(this._index.remove(s),this._idByBounds.delete(s))}this._boundsById.set(i,s),s&&(this._idByBounds.set(s,i),this._indexInvalid||(this._boundsToLoad.push(s),this._boundsToLoad.length>d&&this._loadIndex()))}}export{o as BoundsStore};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{_ as t}from"../../chunks/tslib.es6.js";import{isNone as o}from"../../core/maybe.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";import s from"../../geometry/Point.js";import{fromValues as p}from"../../geometry/support/aaBoundingRect.js";import i from"./GeoreferenceBase.js";let m=class extends i{constructor(t){super(t),this.bottomLeft=null,this.bottomRight=null,this.topLeft=null,this.topRight=null,this.type="corners"}get bounds(){const{coords:t}=this;if(o(t))return null;const r=t.map((t=>t[0])),e=t.map((t=>t[1])),s=Math.min(...r),i=Math.min(...e),m=Math.max(...r),n=Math.max(...e);return p(s,i,m,n)}get coords(){const{topLeft:t,topRight:r,bottomLeft:e,bottomRight:s}=this;return o(t)||o(r)||o(e)||o(s)?null:[[e.x,e.y],[t.x,t.y],[r.x,r.y],[s.x,s.y]]}};t([r({readOnly:!0})],m.prototype,"bounds",null),t([r({readOnly:!0})],m.prototype,"coords",null),t([r({type:s})],m.prototype,"bottomLeft",void 0),t([r({type:s})],m.prototype,"bottomRight",void 0),t([r({type:s})],m.prototype,"topLeft",void 0),t([r({type:s})],m.prototype,"topRight",void 0),m=t([e("esri.layers.support.CornersGeoreference")],m);const n=m;export{n as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{_ as t}from"../../chunks/tslib.es6.js";import{isNone as o}from"../../core/maybe.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";import{t as s}from"../../chunks/common.js";import n from"../../geometry/Extent.js";import{fromValues as i}from"../../geometry/support/aaBoundingRect.js";import a from"./GeoreferenceBase.js";let p=class extends a{constructor(t){super(t),this.extent=null,this.rotation=0,this.type="extent-and-rotation"}get bounds(){const{coords:t}=this;if(o(t))return null;const r=t.map((t=>t[0])),e=t.map((t=>t[1])),s=Math.min(...r),n=Math.min(...e),a=Math.max(...r),p=Math.max(...e);return i(s,n,a,p)}get coords(){if(o(this.extent))return null;const{xmin:t,ymin:r,xmax:e,ymax:s}=this.extent;if(!this.rotation)return[[t,r],[t,s],[e,s],[e,r]];const{x:n,y:i}=this.extent.center,a=c(n,i,this.rotation);return[a(t,r),a(t,s),a(e,s),a(e,r)]}};function c(t,o,r){const e=s(r),n=Math.cos(e),i=Math.sin(e);return(r,e)=>[n*(r-t)+i*(e-o)+t,n*(e-o)-i*(r-t)+o]}t([r({readOnly:!0})],p.prototype,"bounds",null),t([r({readOnly:!0})],p.prototype,"coords",null),t([r({type:n})],p.prototype,"extent",void 0),t([r({type:Number})],p.prototype,"rotation",void 0),p=t([e("esri.layers.support.ExtentAndRotationGeoreference")],p);const m=p;export{m as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as r}from"../../chunks/tslib.es6.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";let t=class extends o{constructor(){super(...arguments),this.type=null}};r([s({type:["selection","cluster"],readOnly:!0,json:{read:!1,write:!0}})],t.prototype,"type",void 0),t=r([e("esri.layers.support.FeatureReduction")],t);export{t as FeatureReduction};
|
|
5
|
+
import{_ as r}from"../../chunks/tslib.es6.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";let t=class extends o{constructor(){super(...arguments),this.type=null}};r([s({type:["selection","cluster","binning"],readOnly:!0,json:{read:!1,write:!0}})],t.prototype,"type",void 0),t=r([e("esri.layers.support.FeatureReduction")],t);export{t as FeatureReduction};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import r from"../../PopupTemplate.js";import"../../renderers/ClassBreaksRenderer.js";import"../../renderers/DictionaryRenderer.js";import"../../renderers/DotDensityRenderer.js";import"../../renderers/HeatmapRenderer.js";import"../../renderers/Renderer.js";import"../../renderers/SimpleRenderer.js";import"../../renderers/UniqueValueRenderer.js";import"../../renderers/support/jsonUtils.js";import{rendererTypes as o}from"../../renderers/support/types.js";import{clone as t}from"../../core/lang.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import{enumeration as i}from"../../core/accessorSupport/decorators/enumeration.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import n from"./AggregateField.js";import{labelsVisible as l,popupEnabled as a}from"./commonProperties.js";import{FeatureReduction as d}from"./FeatureReduction.js";import m from"./LabelClass.js";var u;let c=u=class extends d{constructor(){super(...arguments),this.type="binning",this.fixedBinLevel=3,this.labelingInfo=null,this.labelsVisible=!0,this.popupEnabled=!0,this.popupTemplate=null,this.fields=[]}clone(){return new u({fields:t(this.fields),fixedBinLevel:this.fixedBinLevel,labelingInfo:t(this.labelingInfo),labelsVisible:this.labelsVisible,popupEnabled:this.popupEnabled,popupTemplate:t(this.popupTemplate),renderer:t(this.renderer)})}};e([i({binning:"binning"})],c.prototype,"type",void 0),e([s({type:Number,json:{write:!0}})],c.prototype,"fixedBinLevel",void 0),e([s({type:[m],json:{read:{source:"drawingInfo.labelingInfo"},write:{target:"drawingInfo.labelingInfo"}}})],c.prototype,"labelingInfo",void 0),e([s(l)],c.prototype,"labelsVisible",void 0),e([s(a)],c.prototype,"popupEnabled",void 0),e([s({type:r,json:{name:"popupInfo",write:!0}})],c.prototype,"popupTemplate",void 0),e([s({type:[n],json:{write:!0,origins:{"web-document":{write:!1},"portal-item":{write:!1}}}})],c.prototype,"fields",void 0),e([s({types:o,json:{write:!0}})],c.prototype,"renderer",void 0),c=u=e([p("esri.layers.support.FeatureReductionBinning")],c);const f=c;export{f as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{_ as r}from"../../chunks/tslib.es6.js";import{Clonable as s}from"../../core/Clonable.js";import"../../core/Logger.js";import"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/set.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";let e=class extends s{};e=r([o("esri.layers.support.GeoreferenceBase")],e);const t=e;export{t as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import s from"../../request.js";import o from"../../core/Logger.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as r}from"../../core/accessorSupport/decorators/subclass.js";import a from"./MediaElementBase.js";let i=class extends a{constructor(e){super(e),this.loadedImage=null,this.type="image",this.image=null}load(){const e=this.image;if("string"==typeof e){const o=s(e,{responseType:"image"}).then((({data:e})=>{this._set("loadedImage",e)}));this.addResolvingPromise(o)}else if(e instanceof HTMLImageElement){const s=e.decode().then((()=>{this._set("loadedImage",e)}));this.addResolvingPromise(s)}else this._set("loadedImage",e);return Promise.resolve(this)}set image(e){"not-loaded"===this.loadStatus?this._set("image",e):o.getLogger(this.declaredClass).error("#image","Image cannot be changed after it was loaded.")}};e([t()],i.prototype,"image",null),e([t({readOnly:!0})],i.prototype,"loadedImage",void 0),i=e([r("esri.layers.support.ImageElement")],i);const m=i;export{m as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Collection.js";import{referenceSetter as s}from"../../core/collectionUtils.js";import o from"../../core/Evented.js";import{HandleOwnerMixin as r}from"../../core/HandleOwner.js";import{unwrap as i,isSome as n}from"../../core/maybe.js";import{throwIfAborted as m}from"../../core/promiseUtils.js";import{watch as a}from"../../core/reactiveUtils.js";import{property as c}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import{fromExtent as d}from"../../geometry/support/aaBoundingRect.js";import{extentIntersectsRings as l}from"../../geometry/support/intersectsBase.js";import{BoundsStore as h}from"../graphics/data/BoundsStore.js";import u from"./ImageElement.js";const f={key:"type",defaultKeyValue:"image",base:u,typeMap:{image:u}},j=t.ofType(f);let y=class extends(r(o.EventedAccessor)){constructor(e){super(e),this._index=new h,this.elements=new j}initialize(){this.handles.add(this.elements.on("change",(e=>{this._updateIndex(e.added,e.removed)}))),this._updateIndex(this.elements.items,[])}set elements(e){this._set("elements",s(e,this._get("elements"),j))}async queryElements(e,t){await Promise.resolve(),m(t);const s=[];return this._index.forEachInBounds(d(e),(t=>{const o=i(t.georeference)?.coords;n(o)&&l(e,[o])&&s.push(t)})),s}_updateIndex(e,t){for(const s of t)this._index.delete(s),this.handles.remove(s);for(const s of e){const e=a((()=>i(s.georeference)?.bounds),(()=>this._updateIndexForElement(s,!1)));this._updateIndexForElement(s,!0),this.handles.add(e,s)}this.emit("refresh")}_updateIndexForElement(e,t){const s=i(e.georeference)?.bounds,o=this._index.has(e),r=null!=s;this._index.delete(e),n(s)&&this._index.set(e,s),t||o===r||this.emit("refresh")}};e([c()],y.prototype,"elements",null),y=e([p("esri.layers.support.LocalMediaElementSource")],y);const _=y;export{_ as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import r from"../../core/Loadable.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import t from"./CornersGeoreference.js";import p from"./ExtentAndRotationGeoreference.js";import c from"./GeoreferenceBase.js";const a={key:"type",base:c,typeMap:{corners:t,"extent-and-rotation":p}};let i=class extends r{constructor(){super(...arguments),this.georeference=null,this.opacity=1}};e([o({types:a})],i.prototype,"georeference",void 0),e([o()],i.prototype,"opacity",void 0),i=e([s("esri.layers.support.MediaElementBase")],i);const n=i;export{n as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{isSome as
|
|
5
|
+
import{isNone as e,isSome as r}from"../../core/maybe.js";import{urlToObject as t,removeTrailingSlash as n,removeQueryParameters as s,join as u,Url as i,makeAbsolute as l}from"../../core/urlUtils.js";import{w as o}from"../../chunks/persistableUrlUtils.js";const c={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer"},a=Object.values(c),f=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${a.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),v=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${a.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),p=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function d(e){return!!f.test(e)}function m(r){if(e(r))return null;const n=t(r),s=n.path.match(f)||n.path.match(v);if(!s)return null;const[,u,i,l,o]=s,a=i.indexOf("/");return{title:h(-1!==a?i.slice(a+1):i),serverType:c[l.toLowerCase()],sublayer:null!=o&&""!==o?parseInt(o,10):null,url:{path:u}}}function w(e){const r=t(e).path.match(p);return r?{serviceUrl:r[1],sublayerId:Number(r[2])}:null}function h(e){return(e=e.replace(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function y(e,t){const n=[];if(e){const t=m(e);r(t)&&t.title&&n.push(t.title)}if(t){const e=h(t);n.push(e)}if(2===n.length){if(n[0].toLowerCase().includes(n[1].toLowerCase()))return n[0];if(n[1].toLowerCase().includes(n[0].toLowerCase()))return n[1]}return n.join(" - ")}function g(e){if(!e)return!1;const r=".arcgis.com/",t="//services",n="//tiles",s="//features",u=(e=e.toLowerCase()).includes(r),i=e.includes(t)||e.includes(n)||e.includes(s);return u&&i}function C(e,r){return r&&e&&e.toLowerCase().includes(r.toLowerCase())}function S(e,r){return e?n(s(e,r)):e}function L(e){let{url:u}=e;if(!u)return{url:u};u=s(u,e.logger);const i=t(u),l=m(i.path);let o;if(r(l))null!=l.sublayer&&null==e.layer.layerId&&(o=l.sublayer),u=l.url.path;else if(e.nonStandardUrlAllowed){const e=w(i.path);r(e)&&(u=e.serviceUrl,o=e.sublayerId)}return{url:n(u),layerId:o}}function b(e,r,t,n,s){o(r,n,"url",s),n.url&&null!=e.layerId&&(n.url=u(n.url,t,e.layerId.toString()))}function I(e){if(!e)return!1;const r=e.toLowerCase(),t=r.includes("/services/"),n=r.includes("/mapserver/wmsserver"),s=r.includes("/imageserver/wmsserver"),u=r.includes("/wmsserver");return t&&(n||s||u)}function j(e){if(!e)return!1;const r=new i(l(e)).authority.toLowerCase();return"server.arcgisonline.com"===r||"services.arcgisonline.com"===r}function U(e){if(!e)return!1;return new i(l(e)).authority.toLowerCase().includes("arcgis.com")}export{h as cleanTitle,U as isAGOLUrl,d as isArcGISUrl,g as isHostedAgolService,C as isHostedSecuredProxyService,j as isServerOrServicesAGOLUrl,I as isWmsServer,m as parse,w as parseNonStandardSublayerUrl,S as sanitizeUrl,L as sanitizeUrlWithLayerId,a as serverTypes,y as titleFromUrlAndName,b as writeUrlWithLayerId};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{FeatureReduction as e}from"./FeatureReduction.js";import t from"./FeatureReductionCluster.js";import o from"./FeatureReductionSelection.js";const
|
|
5
|
+
import{FeatureReduction as e}from"./FeatureReduction.js";import t from"./FeatureReductionBinning.js";import i from"./FeatureReductionCluster.js";import o from"./FeatureReductionSelection.js";const n={key:"type",base:e,typeMap:{selection:i}},p={types:{key:"type",base:e,typeMap:{selection:o,cluster:i,binning:t}},json:{name:"layerDefinition.featureReduction",write:{allowNull:!0},origins:{"web-map":{types:n},"portal-item":{types:n},"web-scene":{types:{key:"type",base:e,typeMap:{selection:o}}}}}};export{p as featureReductionProperty};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../core/Error.js";import{isNone as n,isSome as i}from"../../core/maybe.js";import{getDeepValue as t,setDeepValue as r}from"../../core/object.js";import{validateDomainValue as o,getDomainRange as l,DomainValidationError as s}from"./domainUtils.js";import{loadArcade as a}from"../../support/arcadeOnDemand.js";const u=["field","field2","field3","normalizationField","rotationInfo.field","proportionalSymbolInfo.field","proportionalSymbolInfo.normalizationField","colorInfo.field","colorInfo.normalizationField"],f=["field","normalizationField"];function c(e,n){if(null!=e&&null!=n)for(const i of Array.isArray(e)?e:[e])if(d(u,i,n),"visualVariables"in i&&i.visualVariables)for(const e of i.visualVariables)d(f,e,n)}function d(e,n,i){if(e)for(const o of e){const e=t(o,n),l=e&&"function"!=typeof e&&i.get(e);l&&r(o,l.name,n)}}function m(e,n){if(null!=e&&n?.fields.length)if("startField"in e){const i=n.get(e.startField),t=n.get(e.endField);e.startField=i&&i.name||null,e.endField=t&&t.name||null}else{const i=n.get(e.startTimeField),t=n.get(e.endTimeField);e.startTimeField=i&&i.name||null,e.endTimeField=t&&t.name||null}}const p=new Set;function y(e,n){return e&&n?(p.clear(),g(p,e,n),Array.from(p).sort()):[]}function g(e,n,i){if(i)if(n?.fields?.length)if(i.includes("*"))for(const{name:t}of n.fields)e.add(t);else for(const t of i)F(e,n,t);else{if(i.includes("*"))return e.clear(),void e.add("*");for(const n of i)e.add(n)}}function F(e,n,i){if("string"==typeof i)if(n){const t=n.get(i);t&&e.add(t.name)}else e.add(i)}function I(e,i){return n(i)||n(e)?[]:i.includes("*")?e.fields.map((e=>e.name)):i}function x(e,n,i=1){if(!n||!e)return[];if(n.includes("*"))return["*"];const t=y(e,n);return t.length/e.fields.length>=i?["*"]:t}async function b(e,n,i){if(!i)return;const{arcadeUtils:t}=await a(),r=t.extractFieldNames(i,n?.fields?.map((e=>e.name)));for(const o of r)F(e,n,o)}async function T(n,i,t){if(t&&"1=1"!==t){const r=(await import("../../core/sql/WhereClause.js")).WhereClause.create(t,i);if(!r.isStandardized)throw new e("fieldUtils:collectFilterFields","Where clause is not standardized");g(n,i,r.fieldNames)}}function h({displayField:e,fields:n}){return e||(n&&n.length?S(n,"name-or-title")||S(n,"unique-identifier")||S(n,"type-or-category")||w(n):null)}function w(e){for(const n of e){if(!n||!n.name)continue;const e=n.name.toLowerCase();if(e.includes("name")||e.includes("title"))return n.name}return null}function S(e,n){for(const i of e)if(i&&i.valueType&&i.valueType===n)return i.name;return null}async function v(e){if(!e)return[];const n=new Set;return await A(n,e),Array.from(n).sort()}async function A(e,n){if(!n)return;const i=t("elevationInfo.featureExpressionInfo",n);return i?i.collectRequiredFields(e,n.fieldsIndex):void 0}async function E(e,n,i){i.outStatistic.onStatisticValueExpression?b(e,n,i.outStatistic.onStatisticValueExpression):e.add(i.outStatistic.onStatisticField)}async function N(e,n,i){if(!n||!i
|
|
5
|
+
import e from"../../core/Error.js";import{isNone as n,isSome as i}from"../../core/maybe.js";import{getDeepValue as t,setDeepValue as r}from"../../core/object.js";import{validateDomainValue as o,getDomainRange as l,DomainValidationError as s}from"./domainUtils.js";import{loadArcade as a}from"../../support/arcadeOnDemand.js";const u=["field","field2","field3","normalizationField","rotationInfo.field","proportionalSymbolInfo.field","proportionalSymbolInfo.normalizationField","colorInfo.field","colorInfo.normalizationField"],f=["field","normalizationField"];function c(e,n){if(null!=e&&null!=n)for(const i of Array.isArray(e)?e:[e])if(d(u,i,n),"visualVariables"in i&&i.visualVariables)for(const e of i.visualVariables)d(f,e,n)}function d(e,n,i){if(e)for(const o of e){const e=t(o,n),l=e&&"function"!=typeof e&&i.get(e);l&&r(o,l.name,n)}}function m(e,n){if(null!=e&&n?.fields.length)if("startField"in e){const i=n.get(e.startField),t=n.get(e.endField);e.startField=i&&i.name||null,e.endField=t&&t.name||null}else{const i=n.get(e.startTimeField),t=n.get(e.endTimeField);e.startTimeField=i&&i.name||null,e.endTimeField=t&&t.name||null}}const p=new Set;function y(e,n){return e&&n?(p.clear(),g(p,e,n),Array.from(p).sort()):[]}function g(e,n,i){if(i)if(n?.fields?.length)if(i.includes("*"))for(const{name:t}of n.fields)e.add(t);else for(const t of i)F(e,n,t);else{if(i.includes("*"))return e.clear(),void e.add("*");for(const n of i)e.add(n)}}function F(e,n,i){if("string"==typeof i)if(n){const t=n.get(i);t&&e.add(t.name)}else e.add(i)}function I(e,i){return n(i)||n(e)?[]:i.includes("*")?e.fields.map((e=>e.name)):i}function x(e,n,i=1){if(!n||!e)return[];if(n.includes("*"))return["*"];const t=y(e,n);return t.length/e.fields.length>=i?["*"]:t}async function b(e,n,i){if(!i)return;const{arcadeUtils:t}=await a(),r=t.extractFieldNames(i,n?.fields?.map((e=>e.name)));for(const o of r)F(e,n,o)}async function T(n,i,t){if(t&&"1=1"!==t){const r=(await import("../../core/sql/WhereClause.js")).WhereClause.create(t,i);if(!r.isStandardized)throw new e("fieldUtils:collectFilterFields","Where clause is not standardized");g(n,i,r.fieldNames)}}function h({displayField:e,fields:n}){return e||(n&&n.length?S(n,"name-or-title")||S(n,"unique-identifier")||S(n,"type-or-category")||w(n):null)}function w(e){for(const n of e){if(!n||!n.name)continue;const e=n.name.toLowerCase();if(e.includes("name")||e.includes("title"))return n.name}return null}function S(e,n){for(const i of e)if(i&&i.valueType&&i.valueType===n)return i.name;return null}async function v(e){if(!e)return[];const n=new Set;return await A(n,e),Array.from(n).sort()}async function A(e,n){if(!n)return;const i=t("elevationInfo.featureExpressionInfo",n);return i?i.collectRequiredFields(e,n.fieldsIndex):void 0}async function E(e,n,i){i.outStatistic.onStatisticValueExpression?b(e,n,i.outStatistic.onStatisticValueExpression):e.add(i.outStatistic.onStatisticField)}async function N(e,n,i){if(!n||!i||!("fields"in i))return;const t=[];if(i.popupTemplate?.expressionInfos&&t.push(...i.popupTemplate.expressionInfos.map((i=>b(e,n.fieldsIndex,i.expression)))),Array.isArray(i.popupTemplate?.content)){const r=i.popupTemplate.content;for(const i of r)"expression"===i.type&&i.expressionInfo&&t.push(b(e,n.fieldsIndex,i.expressionInfo.expression))}i.fields&&t.push(...i.fields.map((i=>E(e,n.fieldsIndex,i)))),await Promise.all(t)}async function V(e,n,t){n&&(n.timeInfo&&i(t)&&t.timeExtent&&g(e,n.fieldsIndex,[n.timeInfo.startField,n.timeInfo.endField]),n.floorInfo&&g(e,n.fieldsIndex,[n.floorInfo.floorField]),i(t)&&i(t.where)&&await T(e,n.fieldsIndex,t.where))}async function _(e,n,i){n&&i&&await Promise.all(i.map((i=>D(e,n,i))))}async function D(e,n,i){n&&i&&(i.valueExpression?await b(e,n.fieldsIndex,i.valueExpression):i.field&&F(e,n.fieldsIndex,i.field))}async function $(e){if(!e)return[];const n="timeInfo"in e&&e.timeInfo;return n?y(e.fieldsIndex,[e.trackIdField,n.startField,n.endField]):[]}function L(e){if(!e)return[];const n="editFieldsInfo"in e&&e.editFieldsInfo;return n?y(e.fieldsIndex,[n&&n.creatorField,n&&n.creationDateField,n&&n.editorField,n&&n.editDateField]):[]}function O(e){if(!e)return[];const n=e.geometryFieldsInfo;return n?y(e.fieldsIndex,[n.shapeAreaField,n.shapeLengthField]):[]}async function U(e){if(!e)return[];const n=new Set;return await j(n,e),Array.from(n).sort()}async function j(e,n){const{labelingInfo:i,fieldsIndex:t}=n;i&&i.length&&await Promise.all(i.map((n=>z(e,t,n))))}async function z(e,n,i){if(!i)return;const t=i.getLabelExpression(),r=i.where;if("arcade"===t.type)await b(e,n,t.expression);else{const i=t.expression.match(/{[^}]*}/g);i&&i.forEach((i=>{F(e,n,i.slice(1,-1))}))}await T(e,n,r)}function P(e){const n=e.defaultValue;return void 0!==n&&Y(e,n)?n:e.nullable?null:void 0}function k(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function C(e){return null===e||k(e)}const R="isInteger"in Number?Number.isInteger:e=>"number"==typeof e&&isFinite(e)&&Math.floor(e)===e;function G(e){return null===e||R(e)}function W(e){return null!=e&&"string"==typeof e}function q(e){return null===e||W(e)}function M(){return!0}function Y(e,n){let i;switch(e.type){case"date":case"integer":case"long":case"small-integer":case"esriFieldTypeDate":case"esriFieldTypeInteger":case"esriFieldTypeLong":case"esriFieldTypeSmallInteger":i=e.nullable?G:R;break;case"double":case"single":case"esriFieldTypeSingle":case"esriFieldTypeDouble":i=e.nullable?C:k;break;case"string":case"esriFieldTypeString":i=e.nullable?q:W;break;default:i=M}return 1===arguments.length?i:i(n)}const J=["integer","small-integer","single","double"],X=new Set([...J,"esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble"]);function B(e){return null!=e&&X.has(e.type)}function H(e){return null!=e&&("string"===e.type||"esriFieldTypeString"===e.type)}function K(e){return null!=e&&("date"===e.type||"esriFieldTypeDate"===e.type)}function Q(e,n){return null===ie(e,n)}var Z,ee;function ne(e){return null==e||"number"==typeof e&&isNaN(e)?null:e}function ie(e,n){return e.nullable&&null===n?null:B(e)&&!te(e.type,Number(n))?Z.OUT_OF_RANGE:Y(e,n)?e.domain?o(e.domain,n):null:ee.INVALID_TYPE}function te(e,n){const i="string"==typeof e?oe(e):e;return!!i&&(i.isInteger?R(n)&&n>=i.min&&n<=i.max:n>=i.min&&n<=i.max)}function re(e){const n=l(e.domain);return n||(B(e)?oe(e.type):void 0)}function oe(e){switch(e){case"esriFieldTypeSmallInteger":case"small-integer":return se;case"esriFieldTypeInteger":case"integer":return ae;case"esriFieldTypeSingle":case"single":return ue;case"esriFieldTypeDouble":case"double":return fe}}function le(e){if(!k(e))return null;if(R(e)){if(e>=se.min&&e<=se.max)return"esriFieldTypeSmallInteger";if(e>=ae.min&&e<=ae.max)return"esriFieldTypeInteger"}return e>=ue.min&&e<=ue.max?"esriFieldTypeSingle":"esriFieldTypeDouble"}!function(e){e.OUT_OF_RANGE="numeric-range-validation-error::out-of-range"}(Z||(Z={})),function(e){e.INVALID_TYPE="type-validation-error::invalid-type"}(ee||(ee={}));const se={min:-32768,max:32767,isInteger:!0},ae={min:-2147483648,max:2147483647,isInteger:!0},ue={min:-34e37,max:12e37,isInteger:!1},fe={min:-Number.MAX_VALUE,max:Number.MAX_VALUE,isInteger:!1};function ce(e,n,i){switch(e){case s.INVALID_CODED_VALUE:return`Value ${i} is not in the coded domain - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case s.VALUE_OUT_OF_RANGE:return`Value ${i} is out of the range of valid values - field: ${n.name}, domain: ${JSON.stringify(n.domain)}`;case ee.INVALID_TYPE:return`Value ${i} is not a valid value for the field type - field: ${n.name}, type: ${n.type}, nullable: ${n.nullable}`;case Z.OUT_OF_RANGE:{const{min:e,max:t}=oe(n.type);return`Value ${i} is out of range for the number type - field: ${n.name}, type: ${n.type}, value range is ${e} to ${t}`}}}function de(e,n){return!me(e,n,null)}function me(e,n,t){if(!n||!n.attributes||!e){if(i(t))for(const n of e)t.add(n);return!0}const r=n.attributes;let o=!1;for(const l of e)if(!(l in r)){if(o=!0,!i(t))break;t.add(l)}return o}async function pe(e,n){const i=new Set;for(const t of n)await b(i,e.fieldsIndex,t);return Array.from(i).sort()}function ye(e){return["raster.itempixelvalue","raster.servicepixelvalue"].some((n=>e.toLowerCase().startsWith(n)))}export{Z as NumericRangeValidationError,ee as TypeValidationError,b as collectArcadeFieldNames,A as collectElevationFields,N as collectFeatureReductionFields,F as collectField,g as collectFields,V as collectFilterFields,j as collectLabelingFields,_ as collectOrderByInfos,fe as doubleRange,de as featureHasFields,y as fixFields,c as fixRendererFields,m as fixTimeInfoFields,h as getDisplayFieldName,v as getElevationFields,pe as getExpressionFields,L as getFeatureEditFields,O as getFeatureGeometryFields,P as getFieldDefaultValue,re as getFieldRange,U as getLabelingFields,le as getNumericTypeForValue,$ as getTimeFields,ae as integerRange,K as isDateField,te as isNumberInRange,B as isNumericField,ye as isRasterPixelValueField,H as isStringField,Q as isValidFieldValue,Y as isValueMatchingFieldType,J as numericTypes,x as packFields,me as populateMissingFields,u as rendererFields,ne as sanitizeNullFieldValue,ue as singleRange,se as smallIntegerRange,I as unpackFieldNames,ie as validateFieldValue,ce as validationErrorToString,f as visualVariableFields};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{getAssetUrl as e}from"../../../assets.js";const t=[{pixelType:"S8",size:1,ctor:Int8Array,range:[-128,128]},{pixelType:"U8",size:1,ctor:Uint8Array,range:[0,255]},{pixelType:"S16",size:2,ctor:Int16Array,range:[-32768,32767]},{pixelType:"U16",size:2,ctor:Uint16Array,range:[0,65536]},{pixelType:"S32",size:4,ctor:Int32Array,range:[-2147483648,2147483647]},{pixelType:"U32",size:4,ctor:Uint32Array,range:[0,4294967296]},{pixelType:"F32",size:4,ctor:Float32Array,range:[-34027999387901484e22,34027999387901484e22]},{pixelType:"F64",size:8,ctor:Float64Array,range:[-17976931348623157e292,17976931348623157e292]}];let n=null,r=!1;function a(){return n||(n=import("../../../chunks/lerc-wasm.js").then((e=>e.l)).then((({default:t})=>t({locateFile:t=>e(`esri/layers/support/rasterFormats/${t}`)}))).then((e=>{
|
|
5
|
+
import{getAssetUrl as e}from"../../../assets.js";const t=[{pixelType:"S8",size:1,ctor:Int8Array,range:[-128,128]},{pixelType:"U8",size:1,ctor:Uint8Array,range:[0,255]},{pixelType:"S16",size:2,ctor:Int16Array,range:[-32768,32767]},{pixelType:"U16",size:2,ctor:Uint16Array,range:[0,65536]},{pixelType:"S32",size:4,ctor:Int32Array,range:[-2147483648,2147483647]},{pixelType:"U32",size:4,ctor:Uint32Array,range:[0,4294967296]},{pixelType:"F32",size:4,ctor:Float32Array,range:[-34027999387901484e22,34027999387901484e22]},{pixelType:"F64",size:8,ctor:Float64Array,range:[-17976931348623157e292,17976931348623157e292]}];let n=null,r=!1;function a(){return n||(n=import("../../../chunks/lerc-wasm.js").then((e=>e.l)).then((({default:t})=>t({locateFile:t=>e(`esri/layers/support/rasterFormats/${t}`)}))).then((e=>{u(e),r=!0})),n)}function l(){return r}const i={getBlobInfo:null,decode:null};function o(e){return 16+(e>>3<<3)}function s(e,t,n){n.set(e.slice(t,t+n.length))}function u(e){const{_malloc:n,_free:r,_lerc_getBlobInfo:a,_lerc_getDataRanges:l,_lerc_decode_4D:u,asm:f}=e;let c;const y=Object.values(f).find((t=>t&&"buffer"in t&&t.buffer===e.HEAPU8.buffer)),p=e=>{const t=e.map((e=>o(e))),r=t.reduce(((e,t)=>e+t)),a=n(r);c=new Uint8Array(y.buffer);let l=t[0];t[0]=a;for(let n=1;n<t.length;n++){const e=t[n];t[n]=t[n-1]+l,l=e}return t};i.getBlobInfo=e=>{const t=12,n=3,i=new Uint8Array(4*t),o=new Uint8Array(8*n),[u,f,h]=p([e.length,i.length,o.length]);c.set(e,u),c.set(i,f),c.set(o,h);let g=a(u,e.length,f,h,t,n);if(g)throw r(u),`lerc-getBlobInfo: error code is ${g}`;c=new Uint8Array(y.buffer),s(c,f,i),s(c,h,o);const d=new Uint32Array(i.buffer),b=new Float64Array(o.buffer),[m,A,w,U,x,T,C,V,z,,D]=d,F={version:m,dimCount:w,width:U,height:x,validPixelCount:C,bandCount:T,blobSize:V,maskCount:z,dataType:A,minValue:b[0],maxValue:b[1],maxZerror:b[2],statistics:[],bandCountWithNoData:D};if(D)return F;if(1===w&&1===T)return r(u),F.statistics.push({minValue:b[0],maxValue:b[1]}),F;const I=w*T*8,_=new Uint8Array(I),k=new Uint8Array(I);let B=u,v=0,S=0,O=!1;if(c.byteLength<u+2*I?(r(u),O=!0,[B,v,S]=p([e.length,I,I]),c.set(e,B)):[v,S]=p([I,I]),c.set(_,v),c.set(k,S),g=l(B,e.length,w,T,v,S),g)throw r(B),O||r(v),`lerc-getDataRanges: error code is ${g}`;c=new Uint8Array(y.buffer),s(c,v,_),s(c,S,k);const $=new Float64Array(_.buffer),j=new Float64Array(k.buffer),M=F.statistics;for(let r=0;r<T;r++)if(w>1){const e=$.slice(r*w,(r+1)*w),t=j.slice(r*w,(r+1)*w),n=Math.min.apply(null,e),a=Math.max.apply(null,t);M.push({minValue:n,maxValue:a,dimStats:{minValues:e,maxValues:t}})}else M.push({minValue:$[r],maxValue:j[r]});return r(B),O||r(v),F},i.decode=(e,n)=>{const{maskCount:a,dimCount:l,bandCount:i,width:o,height:f,dataType:h,bandCountWithNoData:g}=n,d=t[h],b=o*f,m=new Uint8Array(b*i),A=b*l*i*d.size,w=new Uint8Array(A),U=new Uint8Array(i),x=new Uint8Array(8*i),[T,C,V,z,D]=p([e.length,m.length,w.length,U.length,x.length]);c.set(e,T),c.set(m,C),c.set(w,V),c.set(U,z),c.set(x,D);const F=u(T,e.length,a,C,l,o,f,i,h,V,z,D);if(F)throw r(T),`lerc-decode: error code is ${F}`;c=new Uint8Array(y.buffer),s(c,V,w),s(c,C,m);let I=null;if(g){s(c,z,U),s(c,D,x),I=[];const e=new Float64Array(x.buffer);for(let t=0;t<U.length;t++)I.push(U[t]?e[t]:null)}return r(T),{data:w,maskData:m,noDataValues:I}}}function f(e,t,n,r,a){if(n<2)return e;const l=new r(t*n);if(a)for(let i=0,o=0;i<t;i++)for(let r=0,a=i;r<n;r++,a+=t)l[a]=e[o++];else for(let i=0,o=0;i<t;i++)for(let r=0,a=i;r<n;r++,a+=t)l[o++]=e[a];return l}function c(e,n={}){const r=n.inputOffset??0,a=e instanceof Uint8Array?e.subarray(r):new Uint8Array(e,r),l=i.getBlobInfo(a),{data:o,maskData:s}=i.decode(a,l),{width:u,height:c,bandCount:y,dimCount:p,dataType:h,maskCount:g,statistics:d}=l,b=t[h],m=new b.ctor(o.buffer),A=[],w=[],U=u*c,x=U*p;for(let t=0;t<y;t++){const e=m.subarray(t*x,(t+1)*x);if(n.returnPixelInterleavedDims)A.push(e);else{const t=f(e,U,p,b.ctor,!0);A.push(t)}w.push(s.subarray(t*x,(t+1)*x))}const T=0===g?null:1===g?w[0]:new Uint8Array(U);if(g>1){T.set(w[0]);for(let e=1;e<w.length;e++){const t=w[e];for(let e=0;e<U;e++)T[e]=T[e]&t[e]}}const{noDataValue:C}=n,V=null!=C&&b.range[0]<=C&&b.range[1]>=C;if(g>0&&V)for(let t=0;t<y;t++){const e=A[t],n=w[t]||T;for(let t=0;t<U;t++)0===n[t]&&(e[t]=C)}const z=g===y&&y>1?w:null;return{width:u,height:c,bandCount:y,pixelType:n.pixelType&&0===l.version?n.pixelType:b.pixelType,dimCount:p,statistics:d,pixels:A,mask:T,bandMasks:z}}function y(e,t={}){const n=e instanceof Uint8Array?e.subarray(t.inputOffset??0):new Uint8Array(e,t.inputOffset??0);return i.getBlobInfo(n)}export{c as decode,y as getBlobInfo,l as isLoaded,a as load};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/core",
|
|
3
|
-
"version": "4.24.0-next.
|
|
3
|
+
"version": "4.24.0-next.20220511",
|
|
4
4
|
"homepage": "https://js.arcgis.com",
|
|
5
5
|
"description": "ArcGIS API for JavaScript: A complete 2D and 3D mapping and data visualization API",
|
|
6
6
|
"keywords": [
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
"@esri/calcite-colors": "~6.0.1",
|
|
30
30
|
"@esri/calcite-components": "1.0.0-beta.81",
|
|
31
31
|
"@popperjs/core": "~2.11.5",
|
|
32
|
-
"focus-trap": "~6.9.
|
|
33
|
-
"luxon": "~2.
|
|
32
|
+
"focus-trap": "~6.9.1",
|
|
33
|
+
"luxon": "~2.4.0",
|
|
34
34
|
"sortablejs": "~1.15.0"
|
|
35
35
|
},
|
|
36
36
|
"type": "module"
|
package/request.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/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"./config.js";import{id as t}from"./kernel.js";import r from"./core/Error.js";import s from"./core/has.js";import{clone as o}from"./core/lang.js";import{unwrap as n}from"./core/maybe.js";import{onAbort as a,isAbortError as i,createAbortError as l,isAborted as u}from"./core/promiseUtils.js";import{isDataProtocol as c,isBlobProtocol as d,normalize as p,getInterceptor as m,isTrustedServer as h,getOrigin as f,toHTTPS as y,addQueryParameter as w,objectToQuery as g,getProxyRule as b,getProxyUrl as q,addQueryParameters as T,hasSameOrigin as k,getAppUrl as S,addProxyRule as O}from"./core/urlUtils.js";import{supportsApiKey as x}from"./support/apiKeyUtils.js";import{loadImageAsync as C}from"./support/requestUtils.js";async function v(e,t){const r=c(e),o=d(e);o||r||(e=p(e));const i={url:e,requestOptions:{...n(t)}};let l=m(e);if(l){const e=await K(l,i);if(null!=e)return{data:e,getHeader:_,requestOptions:i.requestOptions,url:i.url};l.after||l.error||(l=null)}if(e=i.url,"image"===(t=i.requestOptions).responseType){if(s("host-webworker")||s("host-node"))throw R("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),i)}else if(r)throw R("request:invalid-parameters",new Error("Data URLs are not supported for responseType = "+t.responseType),i);if("head"===t.method){if(t.body)throw R("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),i);if(r||o)throw R("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),i)}if(await H(),E)return E.execute(e,t);const u=new AbortController;a(t,(()=>u.abort()));const h={controller:u,credential:null,credentialToken:null,fetchOptions:null,hasToken:!1,interceptor:l,params:i,redoRequest:!1,useIdentity:L.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},f=await z(h);return l?.after?.(f),f}let E;const L=e.request,U="FormData"in globalThis,j=[499,498,403,401],P=["COM_0056","COM_0057","SB_0008"],D=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],_=()=>null,F=Symbol();function I(e){const t=f(e);t&&!v._corsServers.includes(t)&&v._corsServers.push(t)}function M(e){const t=f(e);return!t||t.endsWith(".arcgis.com")||v._corsServers.includes(t)||h(t)}function R(e,t,s,n){let a="Error";const u={url:s.url,requestOptions:s.requestOptions,getHeader:_,ssl:!1};if(t instanceof r)return t.details?(t.details=o(t.details),t.details.url=s.url,t.details.requestOptions=s.requestOptions):t.details=u,t;if(t){const e=n&&(e=>n.headers.get(e)),r=n&&n.status,s=t.message;s&&(a=s),e&&(u.getHeader=e),u.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||r||0,u.subCode=t.subcode,u.messageCode=t.messageCode,"string"==typeof t.details?u.messages=[t.details]:u.messages=t.details,u.raw=F in t?t[F]:t}return i(t)?l():new r(e,a,u)}async function H(){s("host-webworker")?E||(E=await import("./core/workers/request.js")):v._abortableFetch||(v._abortableFetch=globalThis.fetch.bind(globalThis))}async function A(){t||await import("./identity/IdentityManager.js")}async function B(r){const s=r.params.url,o=r.params.requestOptions,n=r.controller.signal,a=o.body;let i=null,l=null,c=null;if(U&&"HTMLFormElement"in globalThis&&(a instanceof FormData?i=a:a instanceof HTMLFormElement&&(l=a,i=new FormData(l))),"string"==typeof a&&(c=a),r.fetchOptions={cache:o.cacheBust&&!v._abortableFetch.polyfill?"no-cache":"default",credentials:"same-origin",headers:o.headers||{},method:"head"===o.method?"HEAD":"GET",mode:"cors",priority:L.priority,redirect:"follow",signal:n},(i||c)&&(r.fetchOptions.body=i||c),"anonymous"===o.authMode&&(r.useIdentity=!1),r.hasToken=!!(/token=/i.test(s)||o.query&&o.query.token||i&&i.get&&i.get("token")||l&&l.elements.token),!r.hasToken&&e.apiKey&&x(s)&&(o.query||(o.query={}),o.query.token=e.apiKey,r.hasToken=!0),r.useIdentity&&!r.hasToken&&!r.credentialToken&&!N(s)&&!u(n)){let e;"immediate"===o.authMode?(await A(),e=await t.getCredential(s,{signal:n}),r.credential=e):"no-prompt"===o.authMode?(await A(),e=await t.getCredential(s,{prompt:!1,signal:n}).catch((()=>{})),r.credential=e):t&&(e=t.findCredential(s)),e&&(r.credentialToken=e.token,r.useSSL=!!e.ssl)}}function N(e){return D.some((t=>t.test(e)))}async function $(e){let r=e.params.url;const o=e.params.requestOptions,n=e.fetchOptions,a=d(r)||c(r),i=o.responseType||"json",u=a?0:null!=o.timeout?o.timeout:L.timeout;let p=!1;if(!a){e.useSSL&&(r=y(r)),o.cacheBust&&"default"===n.cache&&(r=w(r,"request.preventCache",Date.now()));let a={...o.query};e.credentialToken&&(a.token=e.credentialToken);let i=g(a);s("esri-url-encodes-apostrophe")&&(i=i.replace(/'/g,"%27"));const l=r.length+1+i.length;let u;p="delete"===o.method||"post"===o.method||"put"===o.method||!!o.body||l>L.maxUrlLength;const c=o.useProxy||!!b(r);if(c){const e=q(r);u=e.path,!p&&u.length+1+l>L.maxUrlLength&&(p=!0),e.query&&(a={...e.query,...a})}if("HEAD"===n.method&&(p||c)){if(p){if(l>L.maxUrlLength)throw R("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params);throw R("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params)}if(c)throw R("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}if(p?(n.method="delete"===o.method?"DELETE":"put"===o.method?"PUT":"POST",o.body?r=T(r,a):(n.body=g(a),n.headers["Content-Type"]="application/x-www-form-urlencoded")):r=T(r,a),c&&(e.useProxy=!0,r=`${u}?${r}`),a.token&&U&&n.body instanceof FormData){const e=n.body;e.set?e.set("token",a.token):e.append("token",a.token)}if(o.hasOwnProperty("withCredentials"))e.withCredentials=o.withCredentials;else if(!k(r,S()))if(h(r))e.withCredentials=!0;else if(t){const s=t.findServerInfo(r);s&&s.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(n.credentials="include")}let m,x,C=0,E=!1;u>0&&(C=setTimeout((()=>{E=!0,e.controller.abort()}),u));try{if("native-request-init"===o.responseType)x=n,x.url=r;else if("image"!==o.responseType||"default"!==n.cache||"GET"!==n.method||p||W(o.headers)||!a&&!e.useProxy&&L.proxyUrl&&!M(r)){if(m=await v._abortableFetch(r,n),e.useProxy||I(r),"native"===o.responseType)x=m;else if("HEAD"!==n.method)if(m.ok){switch(i){case"array-buffer":x=await m.arrayBuffer();break;case"blob":case"image":x=await m.blob();break;default:x=await m.text()}if(C&&(clearTimeout(C),C=0),"json"===i||"xml"===i||"document"===i)if(x)switch(i){case"json":x=JSON.parse(x);break;case"xml":x=G(x,"application/xml");break;case"document":x=G(x,"text/html")}else x=null;if(x){if("array-buffer"===i||"blob"===i){const e=m.headers.get("Content-Type");if(/application\/json|text\/plain/i.test(e)&&x["blob"===i?"size":"byteLength"]<=750)try{const e=await new Response(x).json();e.error&&(x=e)}catch{}}"image"===i&&x instanceof Blob&&(x=await X(URL.createObjectURL(x),e,!0))}}else x=await m.text()}else x=await X(r,e)}catch(j){if("AbortError"===j.name){if(E)throw new Error("Timeout exceeded");throw l("Request canceled")}if(!(!m&&j instanceof TypeError&&L.proxyUrl)||o.body||"delete"===o.method||"head"===o.method||"post"===o.method||"put"===o.method||e.useProxy||M(r))throw j;e.redoRequest=!0,O({proxyUrl:L.proxyUrl,urlPrefix:f(r)})}finally{C&&clearTimeout(C)}return[m,x]}async function K(e,t){if(null!=e.responseData)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let o,n;try{n=await e.before(t)}catch(s){o=R("request:interceptor",s,t)}if((n instanceof Error||n instanceof r)&&(o=R("request:interceptor",n,t)),o)throw e.error&&e.error(o),o;return n}}function W(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}function G(e,t){let r;try{r=(new DOMParser).parseFromString(e,t)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}async function z(e){let r,s;await B(e);try{do{[r,s]=await $(e)}while(!await J(e,r,s))}catch(a){const t=R("request:server",a,e.params,r);throw t.details.ssl=e.useSSL,e.interceptor&&e.interceptor.error&&e.interceptor.error(t),t}const o=e.params.url;if(/\/sharing\/rest\/(accounts|portals)\/self/i.test(o)&&!e.hasToken&&!e.credentialToken&&s?.user?.username&&!h(o)){const e=f(o,!0);e&&L.trustedServers.push(e)}const n=e.credential;if(n&&t){const e=t.findServerInfo(n.server);let r=e&&e.owningSystemUrl;if(r){r=r.replace(/\/?$/,"/sharing");const e=t.findCredential(r,n.userId);e&&-1===t._getIdenticalSvcIdx(r,e)&&e.resources.unshift(r)}}return{data:s,getHeader:r?e=>r.headers.get(e):_,requestOptions:e.params.requestOptions,ssl:e.useSSL,url:e.params.url}}async function J(e,r,s){if(e.redoRequest)return e.redoRequest=!1,!1;const o=e.params.requestOptions;if(!r||"native"===o.responseType||"native-request-init"===o.responseType)return!0;let n,a,i,l;if(!r.ok)throw n=new Error(`Unable to load ${r.url} status: ${r.status}`),n[F]=s,n;s?.error&&(n=s.error),n&&(a=Number(n.code),i=n.hasOwnProperty("subcode")?Number(n.subcode):null,l=n.messageCode,l=l&&l.toUpperCase());const u=o.authMode;if(403===a&&(4===i||n.message&&n.message.toLowerCase().includes("ssl")&&!n.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==u||498===a)&&j.includes(a)&&!N(e.params.url)&&(403!==a||!P.includes(l)&&(null==i||2===i&&e.credentialToken))){await A();try{const r=await t.getCredential(e.params.url,{error:R("request:server",n,e.params),prompt:"no-prompt"!==u,signal:e.controller.signal,token:e.credentialToken});return e.credential=r,e.credentialToken=r.token,e.useSSL=e.useSSL||r.ssl,!1}catch(c){if("no-prompt"===u)return e.credential=null,e.credentialToken=null,!1;n=c}}if(n)throw n;return!0}function X(e,t,r=!1){const s=t.controller.signal,o=new Image;return t.withCredentials?o.crossOrigin="use-credentials":o.crossOrigin="anonymous",o.alt="",o.fetchpriority=L.priority,o.src=e,C(o,e,r,s)}v._abortableFetch=null,v._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"];export{v as default};
|
|
5
|
+
import e from"./config.js";import{id as t}from"./kernel.js";import r from"./core/Error.js";import s from"./core/has.js";import{clone as o}from"./core/lang.js";import{unwrap as n}from"./core/maybe.js";import{onAbort as a,isAbortError as i,createAbortError as l,isAborted as u}from"./core/promiseUtils.js";import{isDataProtocol as c,isBlobProtocol as d,normalize as p,getInterceptor as m,isTrustedServer as h,getOrigin as f,toHTTPS as y,addQueryParameter as w,objectToQuery as g,getProxyRule as b,getProxyUrl as q,addQueryParameters as T,hasSameOrigin as k,getAppUrl as O,addProxyRule as S}from"./core/urlUtils.js";import{supportsApiKey as C}from"./support/apiKeyUtils.js";import{registerNoCorsDomains as x,isNoCorsRequestRequired as v,sendNoCorsRequest as E,loadImageAsync as L}from"./support/requestUtils.js";async function U(e,t){const r=c(e),o=d(e);o||r||(e=p(e));const i={url:e,requestOptions:{...n(t)}};let l=m(e);if(l){const e=await G(l,i);if(null!=e)return{data:e,getHeader:M,requestOptions:i.requestOptions,url:i.url};l.after||l.error||(l=null)}if(e=i.url,"image"===(t=i.requestOptions).responseType){if(s("host-webworker")||s("host-node"))throw N("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),i)}else if(r)throw N("request:invalid-parameters",new Error("Data URLs are not supported for responseType = "+t.responseType),i);if("head"===t.method){if(t.body)throw N("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),i);if(r||o)throw N("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),i)}if(await B(),j)return j.execute(e,t);const u=new AbortController;a(t,(()=>u.abort()));const h={controller:u,credential:null,credentialToken:null,fetchOptions:null,hasToken:!1,interceptor:l,params:i,redoRequest:!1,useIdentity:D.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},f=await Q(h);return l?.after?.(f),f}let j;const D=e.request,P="FormData"in globalThis,_=[499,498,403,401],F=["COM_0056","COM_0057","SB_0008"],I=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],M=()=>null,R=Symbol();function H(e){const t=f(e);t&&!U._corsServers.includes(t)&&U._corsServers.push(t)}function A(e){const t=f(e);return!t||t.endsWith(".arcgis.com")||U._corsServers.includes(t)||h(t)}function N(e,t,s,n){let a="Error";const u={url:s.url,requestOptions:s.requestOptions,getHeader:M,ssl:!1};if(t instanceof r)return t.details?(t.details=o(t.details),t.details.url=s.url,t.details.requestOptions=s.requestOptions):t.details=u,t;if(t){const e=n&&(e=>n.headers.get(e)),r=n&&n.status,s=t.message;s&&(a=s),e&&(u.getHeader=e),u.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||r||0,u.subCode=t.subcode,u.messageCode=t.messageCode,"string"==typeof t.details?u.messages=[t.details]:u.messages=t.details,u.raw=R in t?t[R]:t}return i(t)?l():new r(e,a,u)}async function B(){s("host-webworker")?j||(j=await import("./core/workers/request.js")):U._abortableFetch||(U._abortableFetch=globalThis.fetch.bind(globalThis))}async function $(){t||await import("./identity/IdentityManager.js")}async function z(r){const s=r.params.url,o=r.params.requestOptions,n=r.controller.signal,a=o.body;let i=null,l=null,c=null;if(P&&"HTMLFormElement"in globalThis&&(a instanceof FormData?i=a:a instanceof HTMLFormElement&&(l=a,i=new FormData(l))),"string"==typeof a&&(c=a),r.fetchOptions={cache:o.cacheBust&&!U._abortableFetch.polyfill?"no-cache":"default",credentials:"same-origin",headers:o.headers||{},method:"head"===o.method?"HEAD":"GET",mode:"cors",priority:D.priority,redirect:"follow",signal:n},(i||c)&&(r.fetchOptions.body=i||c),"anonymous"===o.authMode&&(r.useIdentity=!1),r.hasToken=!!(/token=/i.test(s)||o.query&&o.query.token||i&&i.get&&i.get("token")||l&&l.elements.token),!r.hasToken&&e.apiKey&&C(s)&&(o.query||(o.query={}),o.query.token=e.apiKey,r.hasToken=!0),r.useIdentity&&!r.hasToken&&!r.credentialToken&&!K(s)&&!u(n)){let e;"immediate"===o.authMode?(await $(),e=await t.getCredential(s,{signal:n}),r.credential=e):"no-prompt"===o.authMode?(await $(),e=await t.getCredential(s,{prompt:!1,signal:n}).catch((()=>{})),r.credential=e):t&&(e=t.findCredential(s)),e&&(r.credentialToken=e.token,r.useSSL=!!e.ssl)}}function K(e){return I.some((t=>t.test(e)))}async function W(e){let r=e.params.url;const o=e.params.requestOptions,n=e.fetchOptions,a=d(r)||c(r),i=o.responseType||"json",u=a?0:null!=o.timeout?o.timeout:D.timeout;let p=!1;if(!a){e.useSSL&&(r=y(r)),o.cacheBust&&"default"===n.cache&&(r=w(r,"request.preventCache",Date.now()));let a={...o.query};e.credentialToken&&(a.token=e.credentialToken);let i=g(a);s("esri-url-encodes-apostrophe")&&(i=i.replace(/'/g,"%27"));const l=r.length+1+i.length;let u;p="delete"===o.method||"post"===o.method||"put"===o.method||!!o.body||l>D.maxUrlLength;const c=o.useProxy||!!b(r);if(c){const e=q(r);u=e.path,!p&&u.length+1+l>D.maxUrlLength&&(p=!0),e.query&&(a={...e.query,...a})}if("HEAD"===n.method&&(p||c)){if(p){if(l>D.maxUrlLength)throw N("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params);throw N("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params)}if(c)throw N("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}if(p?(n.method="delete"===o.method?"DELETE":"put"===o.method?"PUT":"POST",o.body?r=T(r,a):(n.body=g(a),n.headers["Content-Type"]="application/x-www-form-urlencoded")):r=T(r,a),c&&(e.useProxy=!0,r=`${u}?${r}`),a.token&&P&&n.body instanceof FormData){const e=n.body;e.set?e.set("token",a.token):e.append("token",a.token)}if(o.hasOwnProperty("withCredentials"))e.withCredentials=o.withCredentials;else if(!k(r,O()))if(h(r))e.withCredentials=!0;else if(t){const s=t.findServerInfo(r);s&&s.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(n.credentials="include",v(r)&&await E(p?T(r,a):r))}let m,C,x=0,L=!1;u>0&&(x=setTimeout((()=>{L=!0,e.controller.abort()}),u));try{if("native-request-init"===o.responseType)C=n,C.url=r;else if("image"!==o.responseType||"default"!==n.cache||"GET"!==n.method||p||J(o.headers)||!a&&!e.useProxy&&D.proxyUrl&&!A(r)){if(m=await U._abortableFetch(r,n),e.useProxy||H(r),"native"===o.responseType)C=m;else if("HEAD"!==n.method)if(m.ok){switch(i){case"array-buffer":C=await m.arrayBuffer();break;case"blob":case"image":C=await m.blob();break;default:C=await m.text()}if(x&&(clearTimeout(x),x=0),"json"===i||"xml"===i||"document"===i)if(C)switch(i){case"json":C=JSON.parse(C);break;case"xml":C=X(C,"application/xml");break;case"document":C=X(C,"text/html")}else C=null;if(C){if("array-buffer"===i||"blob"===i){const e=m.headers.get("Content-Type");if(/application\/json|text\/plain/i.test(e)&&C["blob"===i?"size":"byteLength"]<=750)try{const e=await new Response(C).json();e.error&&(C=e)}catch{}}"image"===i&&C instanceof Blob&&(C=await Y(URL.createObjectURL(C),e,!0))}}else C=await m.text()}else C=await Y(r,e)}catch(j){if("AbortError"===j.name){if(L)throw new Error("Timeout exceeded");throw l("Request canceled")}if(!(!m&&j instanceof TypeError&&D.proxyUrl)||o.body||"delete"===o.method||"head"===o.method||"post"===o.method||"put"===o.method||e.useProxy||A(r))throw j;e.redoRequest=!0,S({proxyUrl:D.proxyUrl,urlPrefix:f(r)})}finally{x&&clearTimeout(x)}return[m,C]}async function G(e,t){if(null!=e.responseData)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let o,n;try{n=await e.before(t)}catch(s){o=N("request:interceptor",s,t)}if((n instanceof Error||n instanceof r)&&(o=N("request:interceptor",n,t)),o)throw e.error&&e.error(o),o;return n}}function J(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}function X(e,t){let r;try{r=(new DOMParser).parseFromString(e,t)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}async function Q(e){let r,s;await z(e);try{do{[r,s]=await W(e)}while(!await V(e,r,s))}catch(a){const t=N("request:server",a,e.params,r);throw t.details.ssl=e.useSSL,e.interceptor&&e.interceptor.error&&e.interceptor.error(t),t}const o=e.params.url;if(s&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(o)){if(!e.hasToken&&!e.credentialToken&&s.user?.username&&!h(o)){const e=f(o,!0);e&&D.trustedServers.push(e)}Array.isArray(s.authorizedCrossOriginNoCorsDomains)&&x(s.authorizedCrossOriginNoCorsDomains)}const n=e.credential;if(n&&t){const e=t.findServerInfo(n.server);let r=e&&e.owningSystemUrl;if(r){r=r.replace(/\/?$/,"/sharing");const e=t.findCredential(r,n.userId);e&&-1===t._getIdenticalSvcIdx(r,e)&&e.resources.unshift(r)}}return{data:s,getHeader:r?e=>r.headers.get(e):M,requestOptions:e.params.requestOptions,ssl:e.useSSL,url:e.params.url}}async function V(e,r,s){if(e.redoRequest)return e.redoRequest=!1,!1;const o=e.params.requestOptions;if(!r||"native"===o.responseType||"native-request-init"===o.responseType)return!0;let n,a,i,l;if(!r.ok)throw n=new Error(`Unable to load ${r.url} status: ${r.status}`),n[R]=s,n;s?.error&&(n=s.error),n&&(a=Number(n.code),i=n.hasOwnProperty("subcode")?Number(n.subcode):null,l=n.messageCode,l=l&&l.toUpperCase());const u=o.authMode;if(403===a&&(4===i||n.message&&n.message.toLowerCase().includes("ssl")&&!n.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==u||498===a)&&_.includes(a)&&!K(e.params.url)&&(403!==a||!F.includes(l)&&(null==i||2===i&&e.credentialToken))){await $();try{const r=await t.getCredential(e.params.url,{error:N("request:server",n,e.params),prompt:"no-prompt"!==u,signal:e.controller.signal,token:e.credentialToken});return e.credential=r,e.credentialToken=r.token,e.useSSL=e.useSSL||r.ssl,!1}catch(c){if("no-prompt"===u)return e.credential=null,e.credentialToken=null,!1;n=c}}if(n)throw n;return!0}function Y(e,t,r=!1){const s=t.controller.signal,o=new Image;return t.withCredentials?o.crossOrigin="use-credentials":o.crossOrigin="anonymous",o.alt="",o.fetchpriority=D.priority,o.src=e,L(o,e,r,s)}U._abortableFetch=null,U._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"];export{U as default};
|
package/support/requestUtils.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/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../core/has.js";import{isSome as
|
|
5
|
+
import r from"../config.js";import e from"../core/has.js";import{isSome as o}from"../core/maybe.js";import{isAborted as t}from"../core/promiseUtils.js";import{getOrigin as n,hasSameOrigin as s,urlToObject as i,getAppUrl as c}from"../core/urlUtils.js";function a(r,n,s=!1,i){return new Promise(((c,a)=>{if(t(i))return void a(m());let u=()=>{l(),a(new Error(`Unable to load ${n}`))},d=()=>{const e=r;l(),c(e)},f=()=>{if(!r)return;const e=r;l(),e.src="",a(m())};const l=()=>{e("esri-image-decode")||(r.removeEventListener("error",u),r.removeEventListener("load",d)),u=null,d=null,r=null,o(i)&&i.removeEventListener("abort",f),f=null,s&&URL.revokeObjectURL(n)};o(i)&&i.addEventListener("abort",f),e("esri-image-decode")?r.decode().then(d,u):(r.addEventListener("error",u),r.addEventListener("load",d))}))}function m(){try{return new DOMException("Aborted","AbortError")}catch{const r=new Error;return r.name="AbortError",r}}function u(e){r.request.crossOriginNoCorsDomains||(r.request.crossOriginNoCorsDomains={});const o=r.request.crossOriginNoCorsDomains;for(let r of e)r=r.toLowerCase(),/^https?:\/\//.test(r)?o[n(r)]=0:(o[n("http://"+r)]=0,o[n("https://"+r)]=0)}function d(e){const o=r.request.crossOriginNoCorsDomains;if(o){let r=n(e);if(r)return r=r.toLowerCase(),!s(r,c())&&o[r]<Date.now()-36e5}return!1}async function f(e){const o=r.request.crossOriginNoCorsDomains;o&&(o[n(e).toLowerCase()]=Date.now());const t=i(e);e=t.path,"json"===t.query?.f&&(e+="?f=json");try{await fetch(e,{mode:"no-cors",credentials:"include"})}catch{}}export{d as isNoCorsRequestRequired,a as loadImageAsync,u as registerNoCorsDomains,f as sendNoCorsRequest};
|
package/support/revision.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/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
const
|
|
5
|
+
const a="20220511",b="a13be4bc9b31395a622720bcf52d19f4ad859a87";export{a as buildDate,b as commitHash};
|
package/symbols/Font.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/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../chunks/tslib.es6.js";import{JSONSupport as o}from"../core/JSONSupport.js";import{toPt as e}from"../core/screenUtils.js";import{property as r}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import"../core/has.js";import{cast as s}from"../core/accessorSupport/decorators/cast.js";import{subclass as i}from"../core/accessorSupport/decorators/subclass.js";import{
|
|
5
|
+
import{_ as t}from"../chunks/tslib.es6.js";import{JSONSupport as o}from"../core/JSONSupport.js";import{toPt as e}from"../core/screenUtils.js";import{property as r}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import"../core/has.js";import{cast as s}from"../core/accessorSupport/decorators/cast.js";import{subclass as i}from"../core/accessorSupport/decorators/subclass.js";import{fontDecorations as p,fontStyles as a,fontWeights as c}from"./support/textUtils.js";var n;let l=n=class extends o{constructor(t){super(t),this.decoration="none",this.family="sans-serif",this.size=9,this.style="normal",this.weight="normal"}castSize(t){return e(t)}clone(){return new n({decoration:this.decoration,family:this.family,size:this.size,style:this.style,weight:this.weight})}hash(){return`${this.decoration}.${this.family}.${this.size}.${this.style}.${this.weight}`}};t([r({type:p,json:{default:"none",write:!0}})],l.prototype,"decoration",void 0),t([r({type:String,json:{write:!0}})],l.prototype,"family",void 0),t([r({type:Number,json:{write:{overridePolicy:(t,o,e)=>({enabled:!e||!e.textSymbol3D})}}})],l.prototype,"size",void 0),t([s("size")],l.prototype,"castSize",null),t([r({type:a,json:{default:"normal",write:!0}})],l.prototype,"style",void 0),t([r({type:c,json:{default:"normal",write:!0}})],l.prototype,"weight",void 0),l=n=t([i("esri.symbols.Font")],l);const m=l;export{m as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{clamp as e}from"../../core/mathUtils.js";import{ensureNumber as o}from"../../core/accessorSupport/ensureType.js";const l=["none","underline","line-through"],t=["normal","italic","oblique"],r=["normal","lighter","bold","bolder"],n={type:Number,cast:l=>{const t=o(l);return 0===t?1:e(t,.1,4)},nonNullable:!0},i=["left","right","center"],a=["baseline","top","middle","bottom"],m={type:i,nonNullable:!0},p={type:a,nonNullable:!0};export{l as
|
|
5
|
+
import{clamp as e}from"../../core/mathUtils.js";import{ensureNumber as o}from"../../core/accessorSupport/ensureType.js";const l=["none","underline","line-through"],t=["normal","italic","oblique"],r=["normal","lighter","bold","bolder"],n={type:Number,cast:l=>{const t=o(l);return 0===t?1:e(t,.1,4)},nonNullable:!0},i=["left","right","center"],a=["baseline","top","middle","bottom"],m={type:i,nonNullable:!0},p={type:a,nonNullable:!0};export{l as fontDecorations,t as fontStyles,r as fontWeights,m as horizontalAlignmentProperty,i as horizontalAlignments,n as lineHeightProperty,p as verticalAlignmentProperty,a as verticalAlignments};
|