@arcgis/core 4.22.0-next.20211021 → 4.22.0-next.20211025
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/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/00ac1ce56f9885a8be83.js +1 -0
- package/assets/esri/core/workers/chunks/01c9afe41ab4ccc597c9.js +1 -0
- package/assets/esri/core/workers/chunks/02a3d14adc504a51fa24.js +1 -0
- package/assets/esri/core/workers/chunks/035a9ab0202d5386b782.js +1 -0
- package/assets/esri/core/workers/chunks/062bace5505f13689c7d.js +1 -0
- package/assets/esri/core/workers/chunks/06c7745d813bcb540ce8.js +1 -0
- package/assets/esri/core/workers/chunks/0950b488a60b2abc21fc.js +1 -0
- package/assets/esri/core/workers/chunks/0af396f2e0de681113ef.js +1 -0
- package/assets/esri/core/workers/chunks/131838059f0f81d8eaee.js +1 -0
- package/assets/esri/core/workers/chunks/146cba0d172ec2f4eba2.js +1 -0
- package/assets/esri/core/workers/chunks/17e49c0dfa5a5a6213e2.js +1 -0
- package/assets/esri/core/workers/chunks/1a0b08190274725dc956.js +1 -0
- package/assets/esri/core/workers/chunks/1add7f0779accdf8d204.js +1 -0
- package/assets/esri/core/workers/chunks/20b81d11e6286d347bfc.js +1 -0
- package/assets/esri/core/workers/chunks/{e596bd3de960d1dc1c57.js → 2207580a78ee292ed9b8.js} +1 -1
- package/assets/esri/core/workers/chunks/2d3646a83465c75986f9.js +1 -0
- package/assets/esri/core/workers/chunks/2d38ee3ef3ebe32a1194.js +1 -0
- package/assets/esri/core/workers/chunks/3737dcc3c0dea3ca05d5.js +1 -0
- package/assets/esri/core/workers/chunks/3e2042e70647c1afa6aa.js +1 -0
- package/assets/esri/core/workers/chunks/3ebfaab2855a2236a95d.js +1 -0
- package/assets/esri/core/workers/chunks/{d6fe616192a8efbfbc3e.js → 440f8101402a4c0d7019.js} +1 -1
- package/assets/esri/core/workers/chunks/4587d770767966985e22.js +1 -0
- package/assets/esri/core/workers/chunks/487b8892fae85810a8c0.js +1 -0
- package/assets/esri/core/workers/chunks/4901a78f32c3ea6b823b.js +1 -0
- package/assets/esri/core/workers/chunks/496fe47fc4d28e1a716d.js +1 -0
- package/assets/esri/core/workers/chunks/{9f22f47d4b2e72d7bdcf.js → 4c010119c24510ea31bb.js} +2 -2
- package/assets/esri/core/workers/chunks/{9f22f47d4b2e72d7bdcf.js.LICENSE.txt → 4c010119c24510ea31bb.js.LICENSE.txt} +0 -0
- package/assets/esri/core/workers/chunks/4f5076e1f2b18ce8156d.js +1 -0
- package/assets/esri/core/workers/chunks/{f291ebc4b089bd1f0a3f.js → 50e86a6bb13042b1dbac.js} +1 -1
- package/assets/esri/core/workers/chunks/{64d9a062c1f1ac08a3ac.js → 565020b1c02a8cb33c2b.js} +1 -1
- package/assets/esri/core/workers/chunks/{d78c60a22f76df7c48c7.js → 59640d78295e2e363f18.js} +1 -1
- package/assets/esri/core/workers/chunks/{a0356f320a1b2fbd03f0.js → 5ac2b2598245aa17cdbd.js} +1 -1
- package/assets/esri/core/workers/chunks/5b4a8cce5601cc92c8a3.js +1 -0
- package/assets/esri/core/workers/chunks/5b92d5d4049622531109.js +1 -0
- package/assets/esri/core/workers/chunks/{751c1a2838b54a74a9a6.js → 5f3caa0ddb215342c728.js} +2 -2
- package/assets/esri/core/workers/chunks/615e995d5ce8fa044b09.js +1 -0
- package/assets/esri/core/workers/chunks/62a2453699e0dd2393b9.js +1 -0
- package/assets/esri/core/workers/chunks/67013547be1a7ae1670a.js +1 -0
- package/assets/esri/core/workers/chunks/67eddf4808f8888faeb4.js +1 -0
- package/assets/esri/core/workers/chunks/695dbedff2340aa019ba.js +1 -0
- package/assets/esri/core/workers/chunks/6a7e388c94206d2f61ff.js +1 -0
- package/assets/esri/core/workers/chunks/6e22b69d55e791ab3d9a.js +1 -0
- package/assets/esri/core/workers/chunks/71e6c0c5ef0aa7eb1703.js +1 -0
- package/assets/esri/core/workers/chunks/7a74e230439c5111f852.js +1 -0
- package/assets/esri/core/workers/chunks/7e76a8e6fa67e607d09e.js +1 -0
- package/assets/esri/core/workers/chunks/7fe4985ca0cb3e6d35c6.js +1 -0
- package/assets/esri/core/workers/chunks/8027330714ff5ffb020e.js +1 -0
- package/assets/esri/core/workers/chunks/844b564d1a422a17f6ac.js +1 -0
- package/assets/esri/core/workers/chunks/856f9281a08cb032238e.js +1 -0
- package/assets/esri/core/workers/chunks/89b4983de872780e9aa1.js +1 -0
- package/assets/esri/core/workers/chunks/8f3bc0cd2c2b01ab80cd.js +1 -0
- package/assets/esri/core/workers/chunks/8fd912e325ccd48b98a9.js +1 -0
- package/assets/esri/core/workers/chunks/901907a5c01f0fd1478f.js +1 -0
- package/assets/esri/core/workers/chunks/92a0b88a14c92239df8a.js +1 -0
- package/assets/esri/core/workers/chunks/972e9aeb3c29c9bf441a.js +1 -0
- package/assets/esri/core/workers/chunks/9758c34ce61c3714515a.js +1 -0
- package/assets/esri/core/workers/chunks/{457ea4feaa006d60c6b1.js → 9a04d087a29f0f3937a3.js} +1 -1
- package/assets/esri/core/workers/chunks/9b0bb171224b35ce2031.js +1 -0
- package/assets/esri/core/workers/chunks/9cbe7afdaef8720dfc8d.js +1 -0
- package/assets/esri/core/workers/chunks/9ccde5b6562f0007fe45.js +1 -0
- package/assets/esri/core/workers/chunks/9d320bbeedeea15522ab.js +1 -0
- package/assets/esri/core/workers/chunks/a001b3b4527817548094.js +1 -0
- package/assets/esri/core/workers/chunks/{197b72bca45065e0eb4a.js → a0c580d4a1915ddd3fe4.js} +1 -1
- package/assets/esri/core/workers/chunks/a4a9c15929b43d83701f.js +1 -0
- package/assets/esri/core/workers/chunks/a54d11f44721f808b82f.js +1 -0
- package/assets/esri/core/workers/chunks/a646a11673d513c00e7a.js +1 -0
- package/assets/esri/core/workers/chunks/a792e2bc7cafdc29f05e.js +1 -0
- package/assets/esri/core/workers/chunks/acae1771697034f265b1.js +1 -0
- package/assets/esri/core/workers/chunks/af2ee804a9c63eea610c.js +1 -0
- package/assets/esri/core/workers/chunks/b28b487047da3aeef3fd.js +1 -0
- package/assets/esri/core/workers/chunks/b3e57824a5855cb37a96.js +1 -0
- package/assets/esri/core/workers/chunks/b89449ead32e4cd21edd.js +1 -0
- package/assets/esri/core/workers/chunks/b99891ed5a02cab02173.js +1 -0
- package/assets/esri/core/workers/chunks/bac84bc621be73a7a4bc.js +1 -0
- package/assets/esri/core/workers/chunks/{25037dcf8a0c72b7b647.js → bbe068388167e9dd0c11.js} +1 -1
- package/assets/esri/core/workers/chunks/c271a1857bcc4e9a36dd.js +1 -0
- package/assets/esri/core/workers/chunks/{eb3035e49a45ecc82575.js → c5030664720fcdc6d85e.js} +1 -1
- package/assets/esri/core/workers/chunks/c534ed122f8a1202d3a3.js +1 -0
- package/assets/esri/core/workers/chunks/c5ef2e28b0c539ddb6a7.js +1 -0
- package/assets/esri/core/workers/chunks/c65e5ccfae03d148d82b.js +1 -0
- package/assets/esri/core/workers/chunks/c91660f3982be4e03705.js +1 -0
- package/assets/esri/core/workers/chunks/ce93113b99bdbeddd07b.js +1 -0
- package/assets/esri/core/workers/chunks/cf2d408e669cfa2c65be.js +1 -0
- package/assets/esri/core/workers/chunks/d08f63ffeecefa02ad91.js +1 -0
- package/assets/esri/core/workers/chunks/{8d33644192c01e5416b4.js → d1a71b58ef62e71979c5.js} +1 -1
- package/assets/esri/core/workers/chunks/d30eade5afecd334f6cb.js +1 -0
- package/assets/esri/core/workers/chunks/d8782d0856b9d815cb6c.js +1 -0
- package/assets/esri/core/workers/chunks/db16c21b650001502e6c.js +1 -0
- package/assets/esri/core/workers/chunks/db18110c57253a31ac96.js +1 -0
- package/assets/esri/core/workers/chunks/dbaa5fb466d6c0214f24.js +1 -0
- package/assets/esri/core/workers/chunks/deae370788a7aacf4dd5.js +1 -0
- package/assets/esri/core/workers/chunks/e6ca132e1eeea3aa174e.js +1 -0
- package/assets/esri/core/workers/chunks/e878ccc431729ef3360f.js +1 -0
- package/assets/esri/core/workers/chunks/eb124f15ad4b9193f00a.js +1 -0
- package/assets/esri/core/workers/chunks/ebc71c06c1c22aaef54e.js +1 -0
- package/assets/esri/core/workers/chunks/f183da283af0836421ab.js +1 -0
- package/assets/esri/core/workers/chunks/f42bdc2a134833d33b4e.js +1 -0
- package/assets/esri/core/workers/chunks/{736d628cda4e02d40337.js → f8612c2fc5739e98be58.js} +1 -1
- package/assets/esri/core/workers/chunks/f965e3e5f6f4f9ba54ac.js +1 -0
- package/assets/esri/core/workers/chunks/fa4089640f480b69962e.js +1 -0
- package/assets/esri/core/workers/chunks/fb219563e5169ea67d68.js +1 -0
- package/assets/esri/libs/i3s/i3s.wasm +0 -0
- package/chunks/ChapmanAtmosphere.glsl.js +56 -77
- package/chunks/Clouds.glsl.js +1 -1
- package/chunks/Pattern.glsl.js +9 -11
- package/chunks/RibbonLine.glsl.js +60 -68
- package/chunks/i3s.js +1 -1
- package/chunks/mat4.js +1 -1
- package/chunks/vec3.js +1 -1
- package/core/Collection.js +1 -1
- package/core/Loadable.js +1 -1
- package/core/accessorSupport/ensureType.js +1 -1
- package/core/promiseUtils.js +1 -1
- package/core/support/OwningCollection.js +1 -1
- package/core/workers/RemoteClient.js +1 -1
- package/core/workers/WorkerOwner.js +1 -1
- package/core/workers/workers.js +2 -2
- package/geometry/projection.js +1 -1
- package/identity/IdentityManagerBase.js +1 -1
- package/interfaces.d.ts +205 -497
- package/layers/ElevationLayer.js +1 -1
- package/layers/GeoJSONLayer.js +1 -1
- package/layers/ImageryTileLayer.js +1 -1
- package/layers/VectorTileLayer.js +1 -1
- package/layers/VoxelWasmPerScene.js +1 -1
- package/layers/WCSLayer.js +1 -1
- package/layers/analyses/AreaMeasurement3D.js +1 -1
- package/layers/analyses/DirectLineMeasurement3D.js +1 -1
- package/layers/analyses/Slice.js +1 -1
- package/layers/effects/EffectList.js +1 -1
- package/layers/effects/effects.js +1 -1
- package/layers/effects/jsonUtils.js +1 -1
- package/layers/effects/parser.js +1 -1
- package/layers/effects/utils.js +5 -0
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/data/QueryEngine.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/sources/connections/GeoEventConnection.js +1 -1
- package/layers/mixins/ImageryTileMixin.js +1 -1
- package/layers/support/RasterWorker.js +1 -1
- package/layers/support/TilemapCache.js +1 -1
- package/layers/support/rasterDatasets/BaseRaster.js +1 -1
- package/layers/support/rasterDatasets/ImageServerRaster.js +1 -1
- package/layers/support/rasterDatasets/WCSRaster.js +1 -1
- package/layers/support/rasterFunctions/pixelUtils.js +1 -1
- package/layers/support/rasterFunctions/rasterProjectionHelper.js +1 -1
- package/package.json +2 -2
- package/portal/support/portalLayers.js +1 -1
- package/request.js +1 -1
- package/smartMapping/renderers/support/utils.js +1 -1
- package/smartMapping/statistics/support/WorkerClient.js +1 -1
- package/smartMapping/statistics/support/statsWorker.js +1 -1
- package/smartMapping/statistics/support/utils.js +1 -1
- package/smartMapping/support/adapters/CSVLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/SceneLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/support/utils.js +1 -1
- package/statistics/utils.js +1 -1
- package/support/GraphicsCollection.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/FillSymbol3DLayer.js +1 -1
- package/symbols/IconSymbol3DLayer.js +1 -1
- package/symbols/LineSymbol3DLayer.js +1 -1
- package/symbols/patterns/LinePattern3D.js +5 -0
- package/symbols/patterns/LineStylePattern3D.d.ts +4 -0
- package/symbols/patterns/LineStylePattern3D.js +5 -0
- package/symbols/patterns/StylePattern3D.js +1 -1
- package/symbols/patterns/lineStyles.js +5 -0
- package/symbols/patterns/utils.js +1 -1
- package/symbols/support/Symbol3DFillMaterial.js +1 -1
- package/symbols/support/Symbol3DIconOutline.js +5 -0
- package/symbols/support/Symbol3DMaterial.js +1 -1
- package/symbols/support/Symbol3DOutline.js +1 -1
- package/symbols/support/defaults3D.js +1 -1
- package/symbols/support/previewSymbol3D.js +1 -1
- package/symbols/support/symbolLayerUtils3D.js +1 -1
- package/views/2d/engine/vectorTiles/TileParser.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
- package/views/2d/engine/vectorTiles/style/StyleRepository.js +1 -1
- package/views/2d/engine/webgl/effects/HittestEffect.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/VectorTileLayerView2D.js +1 -1
- package/views/2d/layers/features/controllers/EditsQueue.js +1 -1
- package/views/2d/layers/features/controllers/FeatureController2D.js +1 -1
- package/views/2d/layers/features/support/AttributeStore.js +1 -1
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/2d/layers/support/FeatureLayerProxy.js +1 -1
- package/views/3d/environment/ChapmanAtmosphere.js +1 -1
- package/views/3d/environment/ChapmanAtmosphereTechnique.js +1 -1
- package/views/3d/environment/CloudsGenerator.js +1 -1
- package/views/3d/environment/EnvironmentRenderer.js +1 -1
- package/views/3d/environment/PanoramicAtmosphere.js +1 -1
- package/views/3d/environment/SimpleAtmosphere.js +1 -1
- package/views/3d/externalRenderers/ExternalRendererStore.js +1 -1
- package/views/3d/externalRenderers.js +1 -1
- package/views/3d/interactive/Manipulator3D.js +1 -1
- package/views/3d/interactive/analysisTools/slice/SliceTool.js +1 -1
- package/views/3d/interactive/analysisTools/slice/images/Factory.js +5 -0
- package/views/3d/interactive/analysisTools/slice/sliceToolConfig.js +1 -1
- package/views/3d/interactive/analysisTools/slice/sliceToolUtils.js +1 -1
- package/views/3d/interactive/editingTools/settings.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ExtentTransformTool.js +1 -1
- package/views/3d/interactive/graphics/Slice/SliceController.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
- package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/LaserlineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/MeasurementArrowVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/SlicePlaneVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/VerticesVisualElement.js +1 -1
- package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
- package/views/3d/layers/DynamicLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/VectorTileLayerView3D.js +1 -1
- package/views/3d/layers/analyses/AreaMeasurement3D/AreaMeasurementView3D.js +1 -1
- package/views/3d/layers/analyses/AreaMeasurement3D/support/AreaMeasurementPathHelper.js +1 -1
- package/views/3d/layers/analyses/AreaMeasurement3D/support/AreaMeasurementVisualization.js +1 -1
- package/views/3d/layers/analyses/DirectLineMeasurement3D/DirectLineMeasurementView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/ElevationAligners.js +1 -1
- package/views/3d/layers/graphics/ElevationQuery.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLodInstanceGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
- package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWebStyleSymbol.js +1 -1
- package/views/3d/layers/graphics/Labeler.js +1 -1
- package/views/3d/layers/graphics/Loadable.js +1 -1
- package/views/3d/layers/graphics/ObjectResourceCache.js +1 -1
- package/views/3d/layers/graphics/elevationAlignmentUtils.js +1 -1
- package/views/3d/layers/graphics/graphicUtils.js +1 -1
- package/views/3d/layers/graphics/labelPlacement.js +1 -1
- package/views/3d/layers/graphics/pointUtils.js +1 -1
- package/views/3d/layers/i3s/I3SAttributeOverrides.js +1 -1
- package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
- package/views/3d/layers/i3s/I3SStreamDataController.js +1 -1
- package/views/3d/layers/i3s/PointRenderer.js +1 -1
- package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
- package/views/3d/layers/support/patternUtils.js +1 -1
- package/views/3d/state/GoToOperation.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/support/LaserLineRenderer.js +1 -1
- package/views/3d/support/SharedSymbolResources.js +1 -1
- package/views/3d/support/StreamDataLoader.js +1 -1
- package/views/3d/support/StreamTextureCollection.js +5 -0
- package/views/3d/support/TextureCollection.js +1 -1
- package/views/3d/support/debugFlags.js +1 -1
- package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
- package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
- package/views/3d/support/pointsOfInterest/StableSurfaceCenter.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/OverlayRenderTarget.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/webgl-engine/Stage.js +1 -1
- package/views/3d/webgl-engine/core/material/RenderTexture.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +13 -12
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Reprojection.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +10 -3
- package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueRepository.js +1 -1
- package/views/3d/webgl-engine/lib/Camera.js +1 -1
- package/views/3d/webgl-engine/lib/GLMaterialRepository.js +1 -1
- package/views/3d/webgl-engine/lib/GLMaterialTexture.js +1 -1
- package/views/3d/webgl-engine/lib/GLMaterials.js +1 -1
- package/views/3d/webgl-engine/lib/Material.js +1 -1
- package/views/3d/webgl-engine/lib/ModelDirtySet.js +1 -1
- package/views/3d/webgl-engine/lib/Object3D.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/SmaaRenderPass.js +1 -1
- package/views/3d/webgl-engine/lib/TextTexture.js +1 -1
- package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/lib/Texture.js +1 -1
- package/views/3d/webgl-engine/lib/TextureRepository.js +1 -1
- package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodComponentData.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodLevel.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodResources.js +1 -1
- package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/SlicePlaneMaterial.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/lineStippleUtils.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/views/3d/webgl-engine/parts/Model.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/LayerViewManager.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/ToolViewManager.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
- package/views/support/AllocationTracer.js +1 -1
- package/views/support/DefaultsFromMap.js +1 -1
- package/views/support/QueueProcessor.js +1 -1
- package/views/webgl/capabilities/load.js +1 -1
- package/webscene/Slide.js +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
- package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.js +1 -1
- package/widgets/BuildingExplorer/support/layerUtils.js +1 -1
- package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.js +1 -1
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/Home/HomeViewModel.js +1 -1
- package/widgets/Locate/LocateViewModel.js +1 -1
- package/widgets/Popup/PopupViewModel.js +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/widgets/Search.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Slice/SliceViewModel.js +1 -1
- package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/0283801d442984997abe.js +0 -1
- package/assets/esri/core/workers/chunks/0419e14a520b8fcf3e7a.js +0 -1
- package/assets/esri/core/workers/chunks/05318446b6a40caea361.js +0 -1
- package/assets/esri/core/workers/chunks/09e714d4381649348ac9.js +0 -1
- package/assets/esri/core/workers/chunks/0cecd668b9d5d3f83293.js +0 -1
- package/assets/esri/core/workers/chunks/13a73a88efd4f464173e.js +0 -1
- package/assets/esri/core/workers/chunks/1576727e8174d672555b.js +0 -1
- package/assets/esri/core/workers/chunks/1a3cbeb0a53d03a51dad.js +0 -1
- package/assets/esri/core/workers/chunks/1b8524b617bfc6fe422c.js +0 -1
- package/assets/esri/core/workers/chunks/1dc1d750046912ff6cef.js +0 -1
- package/assets/esri/core/workers/chunks/21fa174c114640be5e40.js +0 -1
- package/assets/esri/core/workers/chunks/2a3f6e56079620421a02.js +0 -1
- package/assets/esri/core/workers/chunks/2a5bcc73e55986ad93fe.js +0 -1
- package/assets/esri/core/workers/chunks/2a6f2e3d639aae491171.js +0 -1
- package/assets/esri/core/workers/chunks/2c17d1bad17bcee53f7d.js +0 -1
- package/assets/esri/core/workers/chunks/2cea27a0d07aa9a88ad4.js +0 -1
- package/assets/esri/core/workers/chunks/2e193d97d199b29b00c2.js +0 -1
- package/assets/esri/core/workers/chunks/2eb41fdf0d0a3b0c3232.js +0 -1
- package/assets/esri/core/workers/chunks/2f09ea639ca5d1d6ca7e.js +0 -1
- package/assets/esri/core/workers/chunks/2fb847ab1440bd1bdf15.js +0 -1
- package/assets/esri/core/workers/chunks/402d22ebbae608760b4f.js +0 -1
- package/assets/esri/core/workers/chunks/44daef7f0cbc6f6af09f.js +0 -1
- package/assets/esri/core/workers/chunks/46899156159e398c693f.js +0 -1
- package/assets/esri/core/workers/chunks/46bf8921db25845c63c0.js +0 -1
- package/assets/esri/core/workers/chunks/4eb23554e375350f73b5.js +0 -1
- package/assets/esri/core/workers/chunks/551917be63a513dfa4de.js +0 -1
- package/assets/esri/core/workers/chunks/564f6f5484bcb13ebb2b.js +0 -1
- package/assets/esri/core/workers/chunks/61df67ae47b7fb5875d9.js +0 -1
- package/assets/esri/core/workers/chunks/62642a8fc7bafe339984.js +0 -1
- package/assets/esri/core/workers/chunks/6304f4e53027df04eb8f.js +0 -1
- package/assets/esri/core/workers/chunks/6331987617ad166ea098.js +0 -1
- package/assets/esri/core/workers/chunks/6b13fcbc71c0088d317e.js +0 -1
- package/assets/esri/core/workers/chunks/6f7a6841e7269d2764ad.js +0 -1
- package/assets/esri/core/workers/chunks/70110efd2de23d9a5263.js +0 -1
- package/assets/esri/core/workers/chunks/7eae3f0588cde44fce39.js +0 -1
- package/assets/esri/core/workers/chunks/80d3c7a429c6412f1a8d.js +0 -1
- package/assets/esri/core/workers/chunks/80deebdf54bea04a0889.js +0 -1
- package/assets/esri/core/workers/chunks/81aa5fe7dcb4fdeb0974.js +0 -1
- package/assets/esri/core/workers/chunks/840d08b41913cad4df89.js +0 -1
- package/assets/esri/core/workers/chunks/85d154aeb511c5d70bb1.js +0 -1
- package/assets/esri/core/workers/chunks/8681e99e2bc9ece61c43.js +0 -1
- package/assets/esri/core/workers/chunks/8e5ef967f6518f4c93b1.js +0 -1
- package/assets/esri/core/workers/chunks/8edd7f70c8b95c34125c.js +0 -1
- package/assets/esri/core/workers/chunks/9044a7b90a53312b6392.js +0 -1
- package/assets/esri/core/workers/chunks/905b4dfc1ce57a225fa4.js +0 -1
- package/assets/esri/core/workers/chunks/945f90b31ebfae623ea0.js +0 -1
- package/assets/esri/core/workers/chunks/9943fd69b67cd1871d68.js +0 -1
- package/assets/esri/core/workers/chunks/9ad91c23480ffb656030.js +0 -1
- package/assets/esri/core/workers/chunks/9d103681372ab01a4147.js +0 -1
- package/assets/esri/core/workers/chunks/9d3230f59b4c4d1b2713.js +0 -1
- package/assets/esri/core/workers/chunks/9db75bc0980d16b730a1.js +0 -1
- package/assets/esri/core/workers/chunks/a0659b8bdc067da7badd.js +0 -1
- package/assets/esri/core/workers/chunks/a480ee9a994410177961.js +0 -1
- package/assets/esri/core/workers/chunks/a9b279975d7df0f295d7.js +0 -1
- package/assets/esri/core/workers/chunks/aa3abaa5ad4a5a3bcb84.js +0 -1
- package/assets/esri/core/workers/chunks/aa8e607f908297786675.js +0 -1
- package/assets/esri/core/workers/chunks/ab5a302b5f62d38293f9.js +0 -1
- package/assets/esri/core/workers/chunks/abd6a84396e0eb3f01ad.js +0 -1
- package/assets/esri/core/workers/chunks/abe9f8516b03a3fb0477.js +0 -1
- package/assets/esri/core/workers/chunks/aff6aa5c7f75f8e052d9.js +0 -1
- package/assets/esri/core/workers/chunks/b601cc5304b132536239.js +0 -1
- package/assets/esri/core/workers/chunks/b85f614ddbddd3c3007e.js +0 -1
- package/assets/esri/core/workers/chunks/b944f4ab25a691b3e611.js +0 -1
- package/assets/esri/core/workers/chunks/bbdacddb61e651ca0098.js +0 -1
- package/assets/esri/core/workers/chunks/c2fa728e805637a1783e.js +0 -1
- package/assets/esri/core/workers/chunks/c901f5f85d962254fc2c.js +0 -1
- package/assets/esri/core/workers/chunks/ca173b908d89a4e334f6.js +0 -1
- package/assets/esri/core/workers/chunks/cc2ef3bfa1f614d7452c.js +0 -1
- package/assets/esri/core/workers/chunks/cdb32a9ac9f5804c4212.js +0 -1
- package/assets/esri/core/workers/chunks/ce9a4997973da80141a5.js +0 -1
- package/assets/esri/core/workers/chunks/d0674b50a358d3bb9db2.js +0 -1
- package/assets/esri/core/workers/chunks/d18b7b4b3b9bea7204b0.js +0 -1
- package/assets/esri/core/workers/chunks/d2ce983f7babdf18a0ed.js +0 -1
- package/assets/esri/core/workers/chunks/d38a0d867dc6cecdc551.js +0 -1
- package/assets/esri/core/workers/chunks/e39ca33e9e463c1d6060.js +0 -1
- package/assets/esri/core/workers/chunks/e471d103205018a5cf7f.js +0 -1
- package/assets/esri/core/workers/chunks/e542fb044fc96f7e8af2.js +0 -1
- package/assets/esri/core/workers/chunks/e94e00a28591337b2def.js +0 -1
- package/assets/esri/core/workers/chunks/eb2709ccbc001f42ac1b.js +0 -1
- package/assets/esri/core/workers/chunks/f905511ca5f9b59fc17f.js +0 -1
- package/assets/esri/core/workers/chunks/f910e80dd87727af5184.js +0 -1
- package/assets/esri/core/workers/chunks/f9300a24305b0af1d227.js +0 -1
- package/assets/esri/core/workers/chunks/fa1e1ac5b3ef7bdf8a78.js +0 -1
- package/assets/esri/core/workers/chunks/fce76a84c7d25d8d47e8.js +0 -1
- package/assets/esri/core/workers/chunks/fef4f97fbe861a1b60e8.js +0 -1
- package/layers/AreaMeasurementLayer.d.ts +0 -4
- package/layers/DirectLineMeasurementLayer.d.ts +0 -4
- package/symbols/support/symbolPreview.d.ts +0 -4
- package/symbols/support/symbolPreview.js +0 -5
- package/views/3d/layers/AreaMeasurementLayerView3D.d.ts +0 -4
- package/views/3d/layers/DirectLineMeasurementLayerView3D.d.ts +0 -4
package/views/SceneView.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.22/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import t from"../Camera.js";import"../geometry.js";import i from"../Graphic.js";import r from"../Ground.js";import s from"../Viewpoint.js";import n from"../core/Collection.js";import{byId as a}from"../core/domUtils.js";import o from"../core/Error.js";import{on as l}from"../core/events.js";import{handlesGroup as p,makeHandle as h}from"../core/handleUtils.js";import d from"../core/has.js";import c from"../core/Logger.js";import{destroyMaybe as u,isNone as g,isSome as m,unwrapOr as f}from"../core/maybe.js";import{createAbortController as y,throwIfAborted as w}from"../core/promiseUtils.js";import{setFrameDuration as v}from"../core/scheduling.js";import{on as _,whenOnce as b,init as R,whenTrueOnce as S}from"../core/watchUtils.js";import{initialize as x}from"../core/workers/workers.js";import{screenPointObjectToArray as T,createScreenPoint as M,createScreenPointArray as O}from"../core/screenUtils.js";import{property as C}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import{cast as V}from"../core/accessorSupport/decorators/cast.js";import{subclass as P}from"../core/accessorSupport/decorators/subclass.js";import{ensureType as E}from"../core/accessorSupport/ensureType.js";import{c as j}from"../chunks/vec3f64.js";import I from"../geometry/HeightModelInfo.js";import{canProjectWithoutEngine as H,project as G,projectPointToVector as L,projectVectorToVector as A,projectBoundingRect as U}from"../geometry/projection.js";import{getSphericalPCPF as D}from"../geometry/projectionEllipsoid.js";import{create as F,toExtent as q}from"../geometry/support/aaBoundingRect.js";import{B as W,c as z}from"../chunks/boundedPlane.js";import{getResolutionForScale as k}from"../geometry/support/scaleUtils.js";import{isTiledLayer as N}from"../layers/support/layerUtils.js";import{BreakpointsOwner as B}from"./BreakpointsOwner.js";import{DOMContainer as $}from"./DOMContainer.js";import Q from"./GroundView.js";import{PopupView as K}from"./PopupView.js";import Z from"./View.js";import J from"./ViewAnimation.js";import{viewingModeFromString as X}from"./ViewingMode.js";import{layerView3DImporter as Y}from"./3d/layerViewModuleImportUtils.js";import ee from"./3d/constraints/Constraints.js";import te from"./3d/environment/SceneViewEnvironment.js";import{SceneViewEnvironmentManager as ie}from"./3d/environment/SceneViewEnvironmentManager.js";import re from"./3d/input/SceneInputManager.js";import{GraphicsDeconflictor as se}from"./3d/layers/graphics/GraphicsDeconflictor.js";import{Labeler as ne}from"./3d/layers/graphics/Labeler.js";import{ObjectResourceCache as ae}from"./3d/layers/graphics/ObjectResourceCache.js";import oe from"./3d/layers/support/FeatureTileTree3D.js";import le from"./3d/state/ViewState.js";import pe from"./3d/state/ViewStateManager.js";import{SceneIntersectionHelper as he}from"./3d/state/helpers/SceneIntersectionHelper.js";import{CombinedElevationProvider as de}from"./3d/support/CombinedElevationProvider.js";import ce from"./3d/support/debugFlags.js";import ue from"./3d/support/DisplayQualityProfile.js";import{getElevationAtPoint as ge}from"./3d/support/ElevationProvider.js";import me from"./3d/support/HighlightOptions.js";import{MapCoordsHelper as fe}from"./3d/support/MapCoordsHelper.js";import{PropertiesPool as ye}from"./3d/support/PropertiesPool.js";import we from"./3d/support/QualitySettings.js";import{RenderCoordsHelper as ve}from"./3d/support/RenderCoordsHelper.js";import{newResourceController as _e}from"./3d/support/ResourceController.js";import be from"./3d/support/SceneViewPerformanceInfo.js";import{SharedSymbolResources as Re}from"./3d/support/SharedSymbolResources.js";import Se from"./3d/support/pointsOfInterest/PointsOfInterest.js";import xe from"./3d/terrain/TerrainSurface.js";import{isSurfaceLayerView as Te,getTiledLayerInfo as Me}from"./3d/terrain/terrainUtils.js";import{Stage as Oe}from"./3d/webgl-engine/Stage.js";import{Intersector as Ce}from"./3d/webgl-engine/lib/Intersector.js";import{toGraphic as Ve,toOwner as Pe}from"./3d/webgl-engine/lib/intersectorUtilsConversions.js";import{TERRAIN_ID as Ee}from"./3d/webgl-engine/lib/verticalOffsetUtils.js";import{hitTestSelectSameDistance as je}from"./support/hitTestSelectUtils.js";import{occludeesSupported as Ie}from"./support/layerViewUtils.js";import{toRenderSettings as He,screenshotSuperSampleSettings as Ge}from"./support/screenshotUtils.js";import{isSupportedScreenPointEvent as Le,createScreenPointFromSupportedEvent as Ae}from"./support/screenUtils.js";import{isSpatialReferenceSupported as Ue}from"./support/spatialReferenceSupport.js";import{check as De}from"./support/WebGLRequirements.js";import Fe from"./ui/3d/DefaultUI3D.js";import qe from"../webscene/Environment.js";import We from"../geometry/Extent.js";import ze from"../geometry/SpatialReference.js";import ke from"../geometry/Point.js";const Ne=c.getLogger("esri.views.SceneView");let Be=class extends(B($(K(Z)))){constructor(e){super(e),this._userClippingArea=null,this._clippingArea=null,this._initialDefaultSpatialReference=null,this._defaults={},this._externallySet={environment:!1},this._createGraphicsViewController=null,this._resolveWhenReady=[],this.propertiesPool=new ye({slicePlane:W},this),this._resourceController=_e(this),this._defaultToMapOptions={include:new Set},this._defaultHitTestOptions={exclude:new Set},this.deconflictor=new se({view:this}),this.labeler=new ne({view:this,deconflictor:this.deconflictor.labels}),this.sharedSymbolResources=null,this.basemapTerrain=null,this.elevationProvider=null,this.camera=null,this.canvas=null,this.center=null,this.constraints=new ee,this.environmentManager=new ie,this.extent=null,this.floors=new n,this.windowDevicePixelRatio=1,this.fullOpacity=1,this.graphicsView=null,this.groundView=null,this.navigating=!1,this.map=null,this.screenSizePerspectiveEnabled=!0,this.state=new le,this.scale=null,this.spatialReference=null,this.isHeightModelInfoRequired=!0,this.alphaCompositingEnabled=!1,this.supersampleScreenshotsEnabled=!0,this.type="3d",this.ui=new Fe,this._numUpdating=0,this._lastUpdateTime=0,this.updatingProgress=.5,this.viewpoint=null,this.zoom=null,this.highlightOptions=new me,x(),e&&e.environment||(this._defaults.environment=new te,this.environment=this._defaults.environment);const t=e=>{m(e)&&4===e.type||(this.updatingChanged(),this.map&&this.map.allLayers.forEach((async e=>{try{await e.when()}catch{}this.updatingChanged()})))};this.handles.add([_(this,"map.allLayers","after-changes",t,t,t,!0),this.allLayerViews.on("after-changes",(e=>this._updateUpdatingMonitors(e))),this.watch("map",(e=>{e&&e.load&&e.load().catch((()=>{}))}))]),this.inputManager=new re({view:this});const i=()=>{const e=window.devicePixelRatio;e!==this.windowDevicePixelRatio&&(this.windowDevicePixelRatio=e,this.notifyChange("pixelRatio"))};this.stateManager=new pe({view:this,updateDevicePixelRatio:i})}initialize(){this.groundView=new Q({view:this}),this._updateUpdatingMonitors();const e=()=>this._updateDefaultToMapOptions();this.handles.add(_(this,"map.allLayers","after-changes",e,e,e)),this.updatingHandles.add(this.qualitySettings,"memoryLimit",(e=>{this.resourceController&&(this.resourceController.memoryController.maxMemory=e)}),2),this.updatingHandles.add(this.qualitySettings,"additionalCacheMemory",(e=>{this.resourceController&&(this.resourceController.memoryController.additionalCacheMemory=e)}),2),this.updatingHandles.add(this.qualitySettings,"frameRate",(e=>v(e>0?1e3/Math.ceil(e):0)),2),this.updatingHandles.add(ce,"SCENEVIEW_LOCKING_LOG",(e=>this.defaultsFromMap.logDebugInformation=e),2),this.updatingHandles.add(this,"map.ground",e,3),this.updatingHandles.add(this,"map.ground.opacity",(()=>this._updateDefaultHitTestOptions()),3),this.handles.add(this.watch("spatialReference",(()=>this.notifyChange("clippingArea")),!0))}destroy(){this.destroyed||(this.invalidate(),this.activeTool=null,this.layerViewManager.clear(),this._exitSurface(),this._disposeGraphicsView(),this.sharedSymbolResources=u(this.sharedSymbolResources),this.labeler.destroy(),this._set("labeler",null),this.deconflictor.destroy(),this._set("deconflictor",null),this._resourceController=u(this._resourceController),this.stateManager.destroy(),this._set("stateManager",null),this.inputManager.destroy(),this._set("inputManager",null),this.propertiesPool.destroy(),this.handles.remove("updatingMonitors"),this.environmentManager.destroy(),this._set("environmentManager",null),this.groundView=u(this.groundView))}get renderSpatialReference(){return this.renderCoordsHelper&&this.renderCoordsHelper.spatialReference}get basemapSpatialReference(){return this.basemapTerrain&&this.basemapTerrain.spatialReference}installContentCameraReset(e={sticky:!1}){return this.stateManager.installContentCameraReset(e)}get clippingArea(){if("global"===this.viewingMode)return null;let e=this._userClippingArea||this.get("map.clippingArea");return!(!!this._userClippingArea||this.get("map.clippingEnabled"))||g(e)?(this._clippingArea=null,null):e instanceof We?this.spatialReference&&(e=Ke(e,this.spatialReference),g(e))?(Ne.error("#clippingArea","setting clippingArea with incompatible SpatialReference"),this._clippingArea):(e=e.clone(),g(e.intersection(this.groundAndLayersExtent))&&(e.xmin=e.xmax,e.ymin=e.ymax),e.zmin=void 0,e.zmax=void 0,e.equals(this._clippingArea)||(this._clippingArea=e),this._clippingArea):(Ne.error("#clippingArea","only clippingArea geometries of type Extent are supported"),this._clippingArea)}set clippingArea(e){this.ready&&"global"===this.viewingMode&&m(e)?Ne.error("#clippingArea=","Clipping area is only supported in local viewingMode"):this._userClippingArea=e}get renderDataExtent(){if(1===this.state.viewingMode)return null;const e=this.renderSpatialReference,t=this.dataExtent;return g(t)||g(e)||t.spatialReference.equals(e)?t:Ke(t,e)}get dataExtent(){let e=this.groundAndLayersExtent;const t=this.spatialReference||ze.WGS84,i=Ke(this.clippingArea,t);m(i)&&(e=m(e)?e.intersection(i):i);const r=this._get("dataExtent");return m(e)&&e.equals(r)?r:e}get groundAndLayersExtent(){const e=this.spatialReference||ze.WGS84;let t;const i=i=>{const r=Ke(i,e);g(r)||(m(t)?t.union(r):t=r.clone())},r=this.basemapTerrain;if(null!=r&&r.spatialReference){const e=r.groundExtent;i(new We({xmin:e[0],ymin:e[1],zmin:0,xmax:e[2],ymax:e[3],zmax:0,spatialReference:r.spatialReference}))}if(this.map){const e=e=>{!m(e.fullExtent)||"graphics"===e.type&&e.internal||i(e.fullExtent)};this.map.allLayers.forEach((t=>e(t)))}if(g(t))return null;t.hasZ?(t.zmin=Math.min(0,t.zmin),t.zmax=Math.max(0,t.zmax)):(t.zmin=0,t.zmax=0);const s=this._get("groundAndLayersExtent");return t.equals(s)?s:t}set environment(e){e!==this._defaults.environment&&(this._externallySet.environment=!0),this._set("environment",e)}castEnvironment(e){return e?e instanceof te?e:e instanceof qe?null!=this.environment?this.environment.cloneWithWebsceneEnvironment(e):te.fromWebsceneEnvironment(e):E(te,e):new te}get pixelRatio(){return Math.min(this.windowDevicePixelRatio,this.maximumPixelRatio)}set pixelRatio(e){m(e)?this._override("pixelRatio",e):this._clearOverride("pixelRatio")}get maximumPixelRatio(){let e=1/0;const{maximumPixelRatio:t,maximumRenderResolution:i}=this.qualitySettings;if(null!=t&&(e=Math.min(e,t)),null!=i){const t=i/Math.max(this.width,this.height);e=Math.min(e,t)}return e}set maximumPixelRatio(e){m(e)?this._override("maximumPixelRatio",e):this._clearOverride("maximumPixelRatio")}get initialExtentRequired(){return this.stateManager&&!this.stateManager.hasInitialView}get interacting(){return this.navigating||m(this.activeTool)}get stationary(){return!this.animation&&!this.resizing&&(g(this.state)||this.state.stationary)}set qualityProfile(e){ue.isValidProfile(e)&&(ue.apply(e,this.qualitySettings),this._set("qualityProfile",e))}get qualityProfile(){return this._get("qualityProfile")||ue.getDefaultProfile()}set slicePlane(e){if(this._stage.renderView.setRenderParameters({slicePlane:e}),g(e))return void this._set("slicePlane",null);const t=this.propertiesPool.get("slicePlane");z(e,t),this._set("slicePlane",t)}get resolution(){return null!=this.spatialReference?k(this.scale,this.spatialReference):0}get heightModelInfo(){const e=this.getDefaultHeightModelInfo();return null!=e?I.deriveUnitFromSR(e,this.spatialReference):null}get updating(){var e,t,i;if(this.destroyed)return!1;let r=0,s=this.layerViewManager.updating,n=s?this.layerViewManager.updatingRemaining:0;this.allLayerViews.forEach((e=>{if(e.isFulfilled()){if(e.updating){if(s=!0,e.suspended||Te(e))return;++n,r+=e.updatingProgress}}else++n}));for(const a of[this.graphicsView,this.basemapView,this._resourceController,this._stage,this.featureTiles,this.pointsOfInterest,this.environmentManager,this.overlay,this.featureTreeDebugger,this.toolViewManager])if(m(a)&&a.updating){const e=.1;n+=e,r+=.5*e}for(const a of[this.deconflictor,this.labeler,this.basemapTerrain])m(a)&&a.updating&&(++n,r+=a.updatingProgress);if(s=!!(s||n>0||this.updatingHandles.updating||!this.ready||!this.stationary||this._createGraphicsViewController||null!=(e=this.inputManager)&&e.hasPendingInputs||null!=(t=this.map)&&null!=(i=t.allLayers)&&i.some((e=>!e.isFulfilled()))),s?(this._numUpdating=Math.max(n,this._numUpdating),r+=this._numUpdating-n):this._numUpdating=0,this._numUpdating>0?r/=this._numUpdating:r=s?0:1,this._get("updatingProgress")!==r){const e=this._resourceController.scheduler.now;if(r<1){const t=Math.min((e-this._lastUpdateTime)/2e3,1);r=this.updatingProgress*(1-t)+r*t}this._set("updatingProgress",r),this._lastUpdateTime=s&&r<1?e:0}return s}get viewingMode(){const e=this.get("map.initialViewProperties.viewingMode");if(e)return e;const t=this.spatialReference;return!t||Ue(t,"global")?"global":"local"}set viewingMode(e){if(this.ready)Ne.error("#viewingMode","viewingMode cannot be set once view is ready");else{["local","global"].indexOf(e)>=0?this._override("viewingMode",e):void 0===e&&this._clearOverride("viewingMode")}}get resourceController(){return this._resourceController}get performanceInfo(){return new be(this)}forceAnimationTime(e){this._stage.renderView.forcedAnimationTime=this.basemapTerrain.overlayManager.forcedAnimationTime=e}on(e,t,i,r){const s=this.viewEvents.on(e,t,i,r);return s||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}toMap(e,t){if(!this.ready)return Ne.error("#toMap()","Scene view cannot be used before it is ready"),null;const i=t?this.externalToInternalIntersectOptions(t):this._defaultToMapOptions,r=m(i.graphics)&&(m(i.graphics.include)||m(i.graphics.exclude)),s=Le(e)?Ae(this,e):e,n=T(s);i.enableDraped=i.include&&!i.include.has(Ee)||i.exclude&&i.exclude.has(Ee);const a=this.sceneIntersectionHelper,o=new Ce(this.state.viewingMode);if(o.options.selectionMode=!0,o.options.store=r?2:0,a.intersectIntersectorScreen(n,o,i),r){for(const e of o.results.all){const t=Ve(e,this);if(g(t))return this._intersectResultToMapPoint(e);if(this._testGraphicUidFilter(i.graphics,t))return this._intersectResultToMapPoint(e)}return null}return this._intersectResultToMapPoint(o.results.min)}toScreen(e){if(!this.ready)return Ne.error("#toScreen()","Scene view cannot be used before it is ready"),null;const t=f(null==e.z&&ge(this.elevationProvider,e),0);return L(e,Ze,this.renderSpatialReference,t),this.state.camera.projectToScreen(Ze,Je),M(Je[0],Je[1])}pixelSizeAt(e){return this.ready?e?(L(e,Ze,this.renderSpatialReference),this.state.camera.computeScreenPixelSizeAt(Ze)):0:(Ne.error("#pixelSizeAt()","Scene view cannot be used before it is ready"),null)}overlayPixelSizeInMapUnits(e){const t=this.basemapTerrain.overlayManager;return t?t.overlayPixelSizeInMapUnits(e):1}hitTest(e,t){if(!this.ready)return Ne.error("#hitTest()","Scene view cannot be used before it is ready"),null;const i=Le(e)?Ae(this,e):e,r=O(i.x,i.y),s=t?this.externalToInternalIntersectOptions(t):this._defaultHitTestOptions;s.requiresGroundFeedback=!0,s.enableDraped=!0;const n=new Ce(this.state.viewingMode);n.options.selectionMode=!0,n.options.store=2,this.sceneIntersectionHelper.intersectIntersectorScreen(r,n,s);const a=this._intersectResultsToHits(n.results.all,s.graphics),o=n.results.ground,l=Pe(o,this),p=m(l)&&"type"in l&&"integrated-mesh"===l.type?l:null,h={screenPoint:i,results:a,ground:{mapPoint:this._intersectResultToMapPoint(o),distance:o.hasIntersectionPoint?o.distanceInRenderSpace:0,layer:p}};return ce.SCENEVIEW_HITTEST_RETURN_INTERSECTOR&&(h.intersector=n),Promise.resolve(h)}popupHitTest(e){return je(this,e).then((({results:t,ground:i})=>{let r=null;return!(0===t.length||Math.abs(t[0].distance-i.distance)<1e-5)||i.layer&&"integrated-mesh"===i.layer.type||(r=i.mapPoint),{results:t,screenPoint:e,mapPoint:r}}))}goTo(e,t){return this.updatingHandles.addPromise(this.stateManager.goTo(e,t))}async whenAnalysisView(e){if(g(e.parent))throw new o("view:no-analysisview-for-analysis","The analysis has not been added to an AnalysisLayer",{analysis:e});return(await this.whenLayerView(e.parent)).whenAnalysisView(e)}whenLayerView(e){return super.whenLayerView(e)}takeScreenshot(e){return this.whenReady().then((()=>{const t=He(e,this);return t.pixelRatio/=this.pixelRatio,this._stage.renderView.takeScreenshot(Ge(t,this.supersampleScreenshotsEnabled,this.padding))}))}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}importLayerView(e){return Y.importLayerView(e)}hasLayerViewModule(e){return Y.hasLayerViewModule(e)}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){return this.get("map.initialViewProperties.spatialReference")||this.get("defaultsFromMap.spatialReference")||this.get("defaultsFromMap.isSpatialReferenceDone")&&this._initialDefaultSpatialReference||null}async validate(){let e=De();if(d("safari")&&d("safari")<9&&(e=new o("sceneview:browser-not-supported","This browser is not supported by SceneView (Safari < 9)",{type:"safari",requiredVersion:9,detectedVersion:d("safari")})),m(e))throw Ne.warn("#validate()",e.message),e}isSpatialReferenceSupported(e,t,i){const r=e.isGeographic,s=e.isWebMercator,n=Ue(e,"global"),a="local"===this.viewingMode,o=!(!this._isOverridden("viewingMode")&&!this.get("map.initialViewProperties.viewingMode"));if(o){if(a&&r&&!Ue(e,"local"))return i?i(`Layer ${t.id} is ignored because its spatial reference is not supported in local viewing mode`):Ne.warnOnce("Spatial reference defined on view not supported in local viewing mode."),!1;if(!a&&!n)return i?i(`Layer ${t.id} is ignored because its spatial reference is not supported in global viewing mode`):Ne.warnOnce("Spatial reference defined on view not supported in global viewing mode."),!1}else if(r&&!n)return i?i(`Layer ${t.id} is ignored because its spatial reference is geographic but unsupported`):Ne.warnOnce("Spatial reference is geographic but not supported."),!1;if(t)if(N(t)){let r;if(o){r=null!=Me(t,e,X(this.viewingMode)).tileInfo}else{let i=Me(t,e,1);null==i.tileInfo&&(i=Me(t,e,2),null!=i.tileInfo&&s&&!this.ready&&(this.viewingMode="local")),r=null!=i.tileInfo}if(!r)return i&&i(`Layer ${t.id} is ignored because it is tiled but\n its tiling scheme is not supported or compatible with the viewing mode`),!1}else if((e.isWGS84||s)&&!a)return null==this._initialDefaultSpatialReference&&(this._initialDefaultSpatialReference=e),o||this.ready||(this.viewingMode="global",i&&i(`Viewing mode locked to global due to reprojectable layer ${t.id}`)),i&&i(`Layer ${t.id} is ignored because it supports server-side reprojection`),!1;return!0}whenReady(){return new Promise((e=>{this.ready?e(this):this._resolveWhenReady.push(e)}))}computeMapPointFromVec3d(e,t){let i=this.spatialReference||ze.WGS84;return A(e,this.renderSpatialReference,e,i)||(i=ze.WGS84,A(e,this.renderSpatialReference,e,i)),t?(t.x=e[0],t.y=e[1],t.z=e[2],t.spatialReference=i):t=new ke(e,i),t}trackGraphicState(e){if(!e.graphic)return Ne.error("trackGraphicState","GraphicState.graphic must not be null or undefined to start tracking"),null;const t=this.getViewForGraphic(e.graphic);let i=null,r=!1;const s=t=>{!r&&m(t)&&"graphics3d"in t&&t.graphics3d&&t.graphics3d.graphicsCore&&(i=t.graphics3d.graphicsCore.trackGraphicState(e))};return m(t)?s(t):this.whenViewForGraphic(e.graphic,{waitForLayer:!0}).then((e=>s(e)),(()=>{})).catch((()=>{})),{remove:()=>{r=!0,m(i)&&(i.remove(),i=null)}}}highlight(e){if(Array.isArray(e))return p(e.map((e=>this.highlight(e))));if(n.isCollection(e))return p(e.toArray().map((e=>this.highlight(e))));const t=this.getViewForGraphic(e);return t&&"highlight"in t?t.highlight(e):h()}maskOccludee(e){if(!e)return Ne.error("maskOccludee","GraphicState.graphic must not be null or undefined to mask an occludee"),null;const t=this.getViewForGraphic(e);let i=null,r=!1;const s=t=>{!r&&m(t)&&"graphics3d"in t&&Ie(t)&&(i=t.maskOccludee(e))};return m(t)?s(t):this.whenViewForGraphic(e,{waitForLayer:!0}).then((e=>s(e)),(()=>{})).catch((()=>{})),{remove:()=>{r=!0,m(i)&&(i.remove(),i=null)}}}getViewForGraphic(e){return e.layer===this.graphics?this.graphicsView:e.layer?this.allLayerViews.find((t=>t.layer===e.layer)):null}graphicChanged(e){m(this.graphicsView)&&this.graphicsView.graphicChanged(e)}async whenViewForGraphic(e,t){if(e.layer===this)return await b(this,"graphicsView"),this.graphicsView;if(!e.layer||!this.map)throw new o("no-view-for-graphic");return t&&t.waitForLayer&&!this.map.allLayers.includes(e.layer)?new Promise(((t,i)=>{const r=this.map.allLayers.on("change",(s=>{-1!==s.added.indexOf(e.layer)&&(r.remove(),this.whenLayerView(e.layer).then(t,i))}))})):this.whenLayerView(e.layer)}externalToInternalIntersectOptions(e){const t=this._externalToInternalRenderItems(e.include,0),i=this._externalToInternalRenderItems(e.exclude,1);return{include:t.layerUids,exclude:i.layerUids,graphics:{include:t.graphicUids,exclude:i.graphicUids}}}_intersectResultToMapPoint(e,t){return e.getIntersectionPoint(Ze)?(t=this.computeMapPointFromVec3d(Ze,t),"TerrainRenderer"===e.intersector&&this.basemapTerrain&&(t.z=f(ge(this.basemapTerrain,t),0)),t):null}_intersectResultsToHits(e,t){const i=new Array;let r=null;for(let s=0;s<e.length;s++){const n=e[s],a=Pe(n,this);if(m(a)&&(a===this.map.ground||"type"in a&&"integrated-mesh"===a.type))break;const o=Ve(n,this);if(!m(o))continue;if(g(r)&&s!==e.length-1&&(r=new Set),m(r)){const e=this._getGraphicFilterUid(o);if(r.has(e))continue;r.add(e)}if(!this._testGraphicUidFilter(t,o))continue;const l=this._intersectResultToMapPoint(n),p=n.distanceInRenderSpace;i.push({graphic:o,mapPoint:l,distance:p})}return i}_getGraphicFilterUid(e){if(e.layer&&"objectIdField"in e.layer){const t=e.attributes[e.layer.objectIdField];if(t)return`o-${e.layer.id}-${t}`}return`u-${e.uid}`}_testGraphicUidFilter(e,t){const i=this._getGraphicFilterUid(t);return g(e)||(g(e.include)||e.include.has(i))&&(g(e.exclude)||!e.exclude.has(i))}_externalToInternalRenderItems(e,t,s={layerUids:null,graphicUids:null}){return e?(e instanceof i?(Qe(s,this._getGraphicFilterUid(e)),0===t&&(m(this.graphicsView)&&e.layer===this?$e(s,this.graphicsView.graphics3d.layer.id):e.layer&&$e(s,e.layer.uid))):"forEach"in e?e.forEach((e=>{Array.isArray(e)?this._externalToInternalRenderItems(e,t,s):n.isCollection(e)?e===this.graphics&&m(this.graphicsView)?$e(s,this.graphicsView.graphics3d.layer.id):this._externalToInternalRenderItems(e,t,s):e instanceof r?e===this.map.ground&&$e(s,Ee):this._externalToInternalRenderItems(e,t,s)})):$e(s,e.uid),s):s}_initBasemapTerrain(){this._set("basemapTerrain",new xe({view:this})),this._set("elevationProvider",new de({view:this})),this.elevationProvider.register("ground",this.basemapTerrain)}_exitBasemapTerrain(){this.basemapTerrain&&(this.elevationProvider.unregister(this.basemapTerrain),this.elevationProvider.destroy(),this._set("elevationProvider",null),this.basemapTerrain.destroy(),this._set("basemapTerrain",null))}_initGlobe(){this._initCoordinateSystem(),this.state.createInitialCamera(),this._initBasemapTerrain(),this._set("pointsOfInterest",new Se({view:this})),this._set("featureTiles",new oe({renderCoordsHelper:this.renderCoordsHelper,cameraOnSurface:this.pointsOfInterest.contentCameraOnSurface,focus:this.pointsOfInterest.focus,tilingSchemeOwner:this.basemapTerrain,viewState:this.state,scheduler:this._resourceController.scheduler,terrain:this.basemapTerrain}));const e=()=>{const e=this.basemapTerrain&&this.basemapTerrain.extent;if(this.clippingArea||e)if(e&&this.basemapTerrain.spatialReference){const e=m(this.basemapTerrain.extent)?G(q(this.basemapTerrain.extent,this.basemapTerrain.spatialReference),this.spatialReference):null;m(this.clippingArea)?this.featureTiles.filterExtent=this.clippingArea.intersection(e):this.featureTiles.filterExtent=e}else this.featureTiles.filterExtent=this.clippingArea;else this.featureTiles.filterExtent=null};this.handles.add([this.updatingHandles.add(ce,"FEATURE_TILE_TREE_SHOW_TILES",(e=>{e&&this.featureTiles&&!this.featureTreeDebugger?this.updatingHandles.addPromise(import("./3d/layers/support/FeatureTileTree3DDebugger.js")).then((({FeatureTileTree3DDebugger:e})=>{!this.featureTreeDebugger&&ce.FEATURE_TILE_TREE_SHOW_TILES&&(this.featureTreeDebugger=new e({view:this}))})):e||!this.featureTreeDebugger||ce.FEATURE_TILE_TREE_SHOW_TILES||(this.featureTreeDebugger.destroy(),this.featureTreeDebugger=null)}),3),this.updatingHandles.add(this,"clippingArea",e,3),this.updatingHandles.add(this,"basemapTerrain.extent",e,3)],"feature-tiles"),this.stateManager.init()}_exitGlobe(){this.state&&(this.stateManager.deinit(),this.handles.remove("render-coords-helper"),this.handles.remove("feature-tiles"),this.featureTiles.destroy(),this._set("featureTiles",null),this.pointsOfInterest.destroy(),this._set("pointsOfInterest",null),this._exitBasemapTerrain(),this.state.exit(),this._exitCoordinateSystem())}_initCoordinateSystem(){if(this.spatialReference){const e=this.spatialReference;this.mapCoordsHelper&&this.mapCoordsHelper.spatialReference.equals(e)||this._set("mapCoordsHelper",new fe(this.map,e));const t=this.state.isGlobal,i=t?D(e):e.isGeographic?ze.PlateCarree:e;i!==this.renderSpatialReference&&(this._set("renderCoordsHelper",ve.create(this.state.viewingMode,i)),t||this.handles.add(this.watch("basemapTerrain.extent",(e=>{const t=this.renderCoordsHelper.spatialReference;0===e[0]&&0===e[1]&&0===e[2]&&0===e[3]||!U(e,this.basemapTerrain.spatialReference,Xe,t)||(this.renderCoordsHelper.extent=Xe)}),!0),"render-coords-helper"),this.sceneIntersectionHelper&&this.sceneIntersectionHelper.setTolerance(Ce.DEFAULT_TOLERANCE/this.renderCoordsHelper.unitInMeters))}else this._set("mapCoordsHelper",null),this._set("renderCoordsHelper",null)}_exitCoordinateSystem(){this.mapCoordsHelper&&(this.handles.remove("render-coords-helper"),this._set("renderCoordsHelper",null),this._set("mapCoordsHelper",null))}updatingChanged(){this.notifyChange("updating")}_updateUpdatingMonitors(e=null){m(e)&&4===e.type||(this.handles.remove("updatingMonitors"),this.allLayerViews.forEach((e=>{e.destroyed||(this.handles.add([e.watch(["updating","updatingProgress"],(()=>this.updatingChanged()),!0)],"updatingMonitors"),e.when((()=>this.updatingChanged()),(()=>this.updatingChanged())))})),this.updatingChanged())}_renderScreenshotOverlay(e,t){if(!this.overlay||!this.overlay.hasVisibleItems)return t;const i=e.getContext("2d");return i.putImageData(t,0,0),this.overlay.renderCanvas(e),i.getImageData(0,0,t.width,t.height)}_initStage(){const e={deactivatedWebGLExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions,alpha:this.alphaCompositingEnabled,canvas:this.renderCanvas,screenshot:{renderOverlay:(e,t)=>this._renderScreenshotOverlay(e,t)}},t=new he(this.state.viewingMode,(e=>this._stage.layers.forAll(e)),this);this._set("sceneIntersectionHelper",t);const i=a(this.surface),{resourceController:r,state:s,renderSpatialReference:n}=this;this._stage=new Oe({options:e,container:i,resourceController:r,state:s,sceneIntersectionHelper:t,renderSR:n}),this._lostWebGLContextHandle=l(this._stage.renderView.canvas,"webglcontextlost",(()=>this.fatalError=new o("webgl-context-lost"))),this.handles.add([this.updatingHandles.add(this.qualitySettings,"antialiasingEnabled",(()=>{this._stage.renderView.setRenderParameters({antialiasingEnabled:this.qualitySettings.antialiasingEnabled})}),2),this.updatingHandles.add(this.qualitySettings,"highQualityTransparency",(()=>{this._stage.renderView.setRenderParameters({highQualityTransparency:this.qualitySettings.highQualityTransparency})}),2),R(this,"magnifier",(e=>this._stage.renderView.magnifier=e),!0)],"stage");const p=()=>{this._stage.renderView.setRenderParameters({defaultHighlightOptions:me.toEngineOptions(this.highlightOptions)})};for(const a of["highlightOptions","highlightOptions.color","highlightOptions.haloColor","highlightOptions.haloOpacity","highlightOptions.fillOpacity","highlightOptions.shadowOpacity","highlightOptions.shadowColor","highlightOptions.shadowDifference"])this.handles.add(this.updatingHandles.add(this,a,p),"stage");p(),this.renderCoordsHelper&&this.sceneIntersectionHelper.setTolerance(Ce.DEFAULT_TOLERANCE/this.renderCoordsHelper.unitInMeters),this._set("canvas",this._stage.renderView.canvas)}_exitStage(){this._set("sceneIntersectionHelper",null),this._stage.destroy(),this._stage=null,this._lostWebGLContextHandle.remove(),this._lostWebGLContextHandle=null,this.handles.remove("stage"),this._set("canvas",null)}_initSurface(e){this._exitSurface(),this.state.init(e,this.spatialReference),this._initStage(),this._initGlobe(),this.sharedSymbolResources=new Re({view:this,viewingMode:e,resourceController:this._resourceController,pointsOfInterest:this.pointsOfInterest,viewState:this.state,objectResourceCache:new ae})}_exitSurface(){this.sharedSymbolResources&&(this.sharedSymbolResources.objectResourceCache.destroy(),this.sharedSymbolResources.destroy(),this.sharedSymbolResources=null,this._exitGlobe(),this._exitStage())}_createGraphicsViewIfNeeded(){if(this.graphicsView||this._createGraphicsViewController)return;if(0===this.graphics.length)return;this.handles.remove("graphics-view"),this._createGraphicsViewController=y();const e=()=>{this._createGraphicsViewController=null,this.updatingChanged()};this._createGraphicsViewAsync(this._createGraphicsViewController.signal).then(e,e),this.updatingChanged()}async _createGraphicsViewAsync(e){const t=(await import("./3d/layers/GraphicsView3D.js")).default;w(e),await S(this.basemapTerrain,"ready",e),this._set("graphicsView",new t({view:this}))}_disposeGraphicsView(){this._createGraphicsViewController&&(this._createGraphicsViewController.abort(),this._createGraphicsViewController=null),this.handles.remove("graphics-view"),m(this.graphicsView)&&(this.handles.remove(this.graphicsView.graphics3d.layer.id),this.graphicsView.destroy(),this._set("graphicsView",null))}_startup(){const e=X(this.viewingMode);if(1===e&&(this._clippingArea=null),this._set("ready",!0),this._initSurface(e),this.handles.add(_(this,"graphics","after-changes",(()=>this._createGraphicsViewIfNeeded())),"graphics-view"),this._createGraphicsViewIfNeeded(),!this._externallySet.environment){const e=this.get("map.initialViewProperties.environment");e&&(this.environment=e)}this.labeler.setup(),this.environmentManager.connectView(this),this.inputManager.connect();const t=this._resolveWhenReady;this._resolveWhenReady=[],t.forEach((e=>e(this)))}_teardown(){this._initialDefaultSpatialReference=null,this.inputManager.disconnect(),this.environmentManager.disconnectView(),this.labeler.dispose(),this._disposeGraphicsView(),this.handles.remove("graphics-view"),this._exitSurface(),this._set("ready",!1)}_updateDefaultToMapOptions(){if(this._defaultToMapOptions.include.clear(),this.map){this.map.ground&&this._defaultToMapOptions.include.add(Ee);for(const e of this.map.allLayers.items)"integrated-mesh"===e.type&&this._defaultToMapOptions.include.add(e.uid)}}_updateDefaultHitTestOptions(){if(this._defaultHitTestOptions.exclude.clear(),this.map){this.map.ground&&this.map.ground.opacity<1&&this._defaultHitTestOptions.exclude.add(Ee);for(const e of this.map.allLayers.items)"integrated-mesh"===e.type&&e.opacity<1&&this._defaultToMapOptions.exclude.add(e.uid)}}};function $e(e,t){e.layerUids||(e.layerUids=new Set),e.layerUids.add(t)}function Qe(e,t){e.graphicUids||(e.graphicUids=new Set),e.graphicUids.add(t)}function Ke(e,t){return m(e)&&H(e.spatialReference,t)?G(e,t):null}e([C()],Be.prototype,"_userClippingArea",void 0),e([C()],Be.prototype,"_resourceController",void 0),e([C()],Be.prototype,"_stage",void 0),e([C({readOnly:!0})],Be.prototype,"deconflictor",void 0),e([C({readOnly:!0})],Be.prototype,"labeler",void 0),e([C({type:J,readOnly:!0,aliasOf:"state.animation"})],Be.prototype,"animation",void 0),e([C({readOnly:!0})],Be.prototype,"basemapTerrain",void 0),e([C({readOnly:!0})],Be.prototype,"elevationProvider",void 0),e([C({type:t,aliasOf:"stateManager.camera"})],Be.prototype,"camera",void 0),e([C({type:t,aliasOf:"stateManager.contentCamera"})],Be.prototype,"contentCamera",void 0),e([C({readOnly:!0})],Be.prototype,"canvas",void 0),e([C({type:ke,aliasOf:"stateManager.center"})],Be.prototype,"center",void 0),e([C({type:We})],Be.prototype,"clippingArea",null),e([C({type:ee})],Be.prototype,"constraints",void 0),e([C({type:We,readOnly:!0})],Be.prototype,"renderDataExtent",null),e([C({type:We,readOnly:!0})],Be.prototype,"dataExtent",null),e([C({type:We,readOnly:!0})],Be.prototype,"groundAndLayersExtent",null),e([C({value:null,type:te})],Be.prototype,"environment",null),e([V("environment")],Be.prototype,"castEnvironment",null),e([C({readOnly:!0})],Be.prototype,"environmentManager",void 0),e([C({type:We,aliasOf:"stateManager.extent"})],Be.prototype,"extent",void 0),e([C()],Be.prototype,"floors",void 0),e([C({readOnly:!0,aliasOf:"stateManager.screenCenter"})],Be.prototype,"screenCenter",void 0),e([C({type:Number})],Be.prototype,"pixelRatio",null),e([C({type:Number,dependsOn:["qualitySettings.maximumPixelRatio","qualitySettings.maximumRenderResolution","size"]})],Be.prototype,"maximumPixelRatio",null),e([C({aliasOf:"stateManager.frustum"})],Be.prototype,"frustum",void 0),e([C({type:Number,readOnly:!0})],Be.prototype,"fullOpacity",void 0),e([C({readOnly:!0})],Be.prototype,"graphicsView",void 0),e([C()],Be.prototype,"groundView",void 0),e([C({type:Boolean})],Be.prototype,"initialExtentRequired",null),e([C({type:Boolean,readOnly:!0})],Be.prototype,"interacting",null),e([C()],Be.prototype,"stationary",null),e([C({aliasOf:"state.navigating"})],Be.prototype,"navigating",void 0),e([C()],Be.prototype,"map",void 0),e([C({readOnly:!0})],Be.prototype,"mapCoordsHelper",void 0),e([C({aliasOf:"stateManager.padding"})],Be.prototype,"padding",void 0),e([C({type:Se,readOnly:!0})],Be.prototype,"pointsOfInterest",void 0),e([C({type:oe,readOnly:!0})],Be.prototype,"featureTiles",void 0),e([C()],Be.prototype,"featureTreeDebugger",void 0),e([C({type:Boolean})],Be.prototype,"screenSizePerspectiveEnabled",void 0),e([C({constructOnly:!0})],Be.prototype,"deactivatedWebGLExtensions",void 0),e([C({constructOnly:!0})],Be.prototype,"debugWebGLExtensions",void 0),e([C({constructOnly:!0})],Be.prototype,"renderCanvas",void 0),e([C({constructOnly:!0})],Be.prototype,"state",void 0),e([C({readOnly:!0})],Be.prototype,"inputManager",void 0),e([C({readOnly:!0})],Be.prototype,"stateManager",void 0),e([C({type:["low","medium","high"]})],Be.prototype,"qualityProfile",null),e([C({type:we,get(){let e=this._get("qualitySettings");return e||(e=new we,ue.apply(this.qualityProfile,e)),e}})],Be.prototype,"qualitySettings",void 0),e([C()],Be.prototype,"slicePlane",null),e([C({dependsOn:["viewingMode"]})],Be.prototype,"preconditionsReady",void 0),e([C({readOnly:!0})],Be.prototype,"renderCoordsHelper",void 0),e([C({readOnly:!0})],Be.prototype,"sceneIntersectionHelper",void 0),e([C({type:Number,dependsOn:["scale","spatialReference"],readOnly:!0})],Be.prototype,"resolution",null),e([C({type:Number,aliasOf:"stateManager.scale"})],Be.prototype,"scale",void 0),e([C({dependsOn:[]})],Be.prototype,"heightModelInfo",null),e([C({dependsOn:["map.initialViewProperties?.spatialReference","defaultsFromMap.isSpatialReferenceDone"]})],Be.prototype,"spatialReference",void 0),e([C({type:Boolean,constructOnly:!0})],Be.prototype,"alphaCompositingEnabled",void 0),e([C({type:Boolean})],Be.prototype,"supersampleScreenshotsEnabled",void 0),e([C({readOnly:!0})],Be.prototype,"type",void 0),e([C({type:Fe})],Be.prototype,"ui",void 0),e([C({type:Boolean,readOnly:!0,dependsOn:["graphicsView.updating","basemapView.updating","basemapTerrain.updating","layerViewManager.updating","layerViewManager.updatingRemaining","_resourceController.updating","_stage.updating","featureTiles.updating","pointsOfInterest.updating","environmentManager.updating","overlay.updating","updatingHandles.updating","featureTreeDebugger.updating","labeler.updating","deconflictor.updating","ready","stationary","inputManager.hasPendingInputs","toolViewManager.updating"]})],Be.prototype,"updating",null),e([C({type:Number,readOnly:!0,dependsOn:["updating"]})],Be.prototype,"updatingProgress",void 0),e([C({type:["global","local"],dependsOn:["map.initialViewProperties?.viewingMode","spatialReference"]})],Be.prototype,"viewingMode",null),e([C({type:s,aliasOf:"stateManager.viewpoint"})],Be.prototype,"viewpoint",void 0),e([C({type:Number,aliasOf:"stateManager.zoom"})],Be.prototype,"zoom",void 0),e([C({type:me})],Be.prototype,"highlightOptions",void 0),Be=e([P("esri.views.SceneView")],Be);const Ze=j(),Je=O(),Xe=F(),Ye=Be;export{Ye as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import t from"../Camera.js";import"../geometry.js";import i from"../Graphic.js";import r from"../Ground.js";import s from"../Viewpoint.js";import n from"../core/Collection.js";import{byId as a}from"../core/domUtils.js";import o from"../core/Error.js";import{on as l}from"../core/events.js";import{handlesGroup as p,makeHandle as h}from"../core/handleUtils.js";import d from"../core/has.js";import c from"../core/Logger.js";import{destroyMaybe as u,isNone as g,isSome as m,unwrapOr as f}from"../core/maybe.js";import{throwIfAborted as y}from"../core/promiseUtils.js";import{setFrameDuration as w}from"../core/scheduling.js";import{on as v,whenOnce as _,init as b,whenTrueOnce as R}from"../core/watchUtils.js";import{initialize as S}from"../core/workers/workers.js";import{screenPointObjectToArray as x,createScreenPoint as T,createScreenPointArray as M}from"../core/screenUtils.js";import{property as O}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import{cast as C}from"../core/accessorSupport/decorators/cast.js";import{subclass as V}from"../core/accessorSupport/decorators/subclass.js";import{ensureType as P}from"../core/accessorSupport/ensureType.js";import{c as E}from"../chunks/vec3f64.js";import j from"../geometry/HeightModelInfo.js";import{canProjectWithoutEngine as I,project as H,projectPointToVector as G,projectVectorToVector as L,projectBoundingRect as A}from"../geometry/projection.js";import{getSphericalPCPF as U}from"../geometry/projectionEllipsoid.js";import{create as D,toExtent as F}from"../geometry/support/aaBoundingRect.js";import{B as q,c as W}from"../chunks/boundedPlane.js";import{getResolutionForScale as z}from"../geometry/support/scaleUtils.js";import{isTiledLayer as k}from"../layers/support/layerUtils.js";import{BreakpointsOwner as N}from"./BreakpointsOwner.js";import{DOMContainer as B}from"./DOMContainer.js";import $ from"./GroundView.js";import{PopupView as Q}from"./PopupView.js";import K from"./View.js";import Z from"./ViewAnimation.js";import{viewingModeFromString as J}from"./ViewingMode.js";import{layerView3DImporter as X}from"./3d/layerViewModuleImportUtils.js";import Y from"./3d/constraints/Constraints.js";import ee from"./3d/environment/SceneViewEnvironment.js";import{SceneViewEnvironmentManager as te}from"./3d/environment/SceneViewEnvironmentManager.js";import ie from"./3d/input/SceneInputManager.js";import{GraphicsDeconflictor as re}from"./3d/layers/graphics/GraphicsDeconflictor.js";import{Labeler as se}from"./3d/layers/graphics/Labeler.js";import{ObjectResourceCache as ne}from"./3d/layers/graphics/ObjectResourceCache.js";import ae from"./3d/layers/support/FeatureTileTree3D.js";import oe from"./3d/state/ViewState.js";import le from"./3d/state/ViewStateManager.js";import{SceneIntersectionHelper as pe}from"./3d/state/helpers/SceneIntersectionHelper.js";import{CombinedElevationProvider as he}from"./3d/support/CombinedElevationProvider.js";import de from"./3d/support/debugFlags.js";import ce from"./3d/support/DisplayQualityProfile.js";import{getElevationAtPoint as ue}from"./3d/support/ElevationProvider.js";import ge from"./3d/support/HighlightOptions.js";import{MapCoordsHelper as me}from"./3d/support/MapCoordsHelper.js";import{PropertiesPool as fe}from"./3d/support/PropertiesPool.js";import ye from"./3d/support/QualitySettings.js";import{RenderCoordsHelper as we}from"./3d/support/RenderCoordsHelper.js";import{newResourceController as ve}from"./3d/support/ResourceController.js";import _e from"./3d/support/SceneViewPerformanceInfo.js";import{SharedSymbolResources as be}from"./3d/support/SharedSymbolResources.js";import Re from"./3d/support/pointsOfInterest/PointsOfInterest.js";import Se from"./3d/terrain/TerrainSurface.js";import{isSurfaceLayerView as xe,getTiledLayerInfo as Te}from"./3d/terrain/terrainUtils.js";import{Stage as Me}from"./3d/webgl-engine/Stage.js";import{Intersector as Oe}from"./3d/webgl-engine/lib/Intersector.js";import{toGraphic as Ce,toOwner as Ve}from"./3d/webgl-engine/lib/intersectorUtilsConversions.js";import{TERRAIN_ID as Pe}from"./3d/webgl-engine/lib/verticalOffsetUtils.js";import{hitTestSelectSameDistance as Ee}from"./support/hitTestSelectUtils.js";import{occludeesSupported as je}from"./support/layerViewUtils.js";import{toRenderSettings as Ie,screenshotSuperSampleSettings as He}from"./support/screenshotUtils.js";import{isSupportedScreenPointEvent as Ge,createScreenPointFromSupportedEvent as Le}from"./support/screenUtils.js";import{isSpatialReferenceSupported as Ae}from"./support/spatialReferenceSupport.js";import{check as Ue}from"./support/WebGLRequirements.js";import De from"./ui/3d/DefaultUI3D.js";import Fe from"../webscene/Environment.js";import qe from"../geometry/Extent.js";import We from"../geometry/SpatialReference.js";import ze from"../geometry/Point.js";const ke=c.getLogger("esri.views.SceneView");let Ne=class extends(N(B(Q(K)))){constructor(e){super(e),this._userClippingArea=null,this._clippingArea=null,this._initialDefaultSpatialReference=null,this._defaults={},this._externallySet={environment:!1},this._createGraphicsViewController=null,this._resolveWhenReady=[],this.propertiesPool=new fe({slicePlane:q},this),this._resourceController=ve(this),this._defaultToMapOptions={include:new Set},this._defaultHitTestOptions={exclude:new Set},this.deconflictor=new re({view:this}),this.labeler=new se({view:this,deconflictor:this.deconflictor.labels}),this.sharedSymbolResources=null,this.basemapTerrain=null,this.elevationProvider=null,this.camera=null,this.canvas=null,this.center=null,this.constraints=new Y,this.environmentManager=new te,this.extent=null,this.floors=new n,this.windowDevicePixelRatio=1,this.fullOpacity=1,this.graphicsView=null,this.groundView=null,this.navigating=!1,this.map=null,this.screenSizePerspectiveEnabled=!0,this.state=new oe,this.scale=null,this.spatialReference=null,this.isHeightModelInfoRequired=!0,this.alphaCompositingEnabled=!1,this.supersampleScreenshotsEnabled=!0,this.type="3d",this.ui=new De,this._numUpdating=0,this._lastUpdateTime=0,this.updatingProgress=.5,this.viewpoint=null,this.zoom=null,this.highlightOptions=new ge,S(),e&&e.environment||(this._defaults.environment=new ee,this.environment=this._defaults.environment);const t=e=>{m(e)&&4===e.type||(this.updatingChanged(),this.map&&this.map.allLayers.forEach((async e=>{try{await e.when()}catch{}this.updatingChanged()})))};this.handles.add([v(this,"map.allLayers","after-changes",t,t,t,!0),this.allLayerViews.on("after-changes",(e=>this._updateUpdatingMonitors(e))),this.watch("map",(e=>{e&&e.load&&e.load().catch((()=>{}))}))]),this.inputManager=new ie({view:this});const i=()=>{const e=window.devicePixelRatio;e!==this.windowDevicePixelRatio&&(this.windowDevicePixelRatio=e,this.notifyChange("pixelRatio"))};this.stateManager=new le({view:this,updateDevicePixelRatio:i})}initialize(){this.groundView=new $({view:this}),this._updateUpdatingMonitors();const e=()=>this._updateDefaultToMapOptions();this.handles.add(v(this,"map.allLayers","after-changes",e,e,e)),this.updatingHandles.add(this.qualitySettings,"memoryLimit",(e=>{this.resourceController&&(this.resourceController.memoryController.maxMemory=e)}),2),this.updatingHandles.add(this.qualitySettings,"additionalCacheMemory",(e=>{this.resourceController&&(this.resourceController.memoryController.additionalCacheMemory=e)}),2),this.updatingHandles.add(this.qualitySettings,"frameRate",(e=>w(e>0?1e3/Math.ceil(e):0)),2),this.updatingHandles.add(de,"SCENEVIEW_LOCKING_LOG",(e=>this.defaultsFromMap.logDebugInformation=e),2),this.updatingHandles.add(this,"map.ground",e,3),this.updatingHandles.add(this,"map.ground.opacity",(()=>this._updateDefaultHitTestOptions()),3),this.handles.add(this.watch("spatialReference",(()=>this.notifyChange("clippingArea")),!0))}destroy(){this.destroyed||(this.invalidate(),this.activeTool=null,this.layerViewManager.clear(),this._exitSurface(),this._disposeGraphicsView(),this.sharedSymbolResources=u(this.sharedSymbolResources),this.labeler.destroy(),this._set("labeler",null),this.deconflictor.destroy(),this._set("deconflictor",null),this._resourceController=u(this._resourceController),this.stateManager.destroy(),this._set("stateManager",null),this.inputManager.destroy(),this._set("inputManager",null),this.propertiesPool.destroy(),this.handles.remove("updatingMonitors"),this.environmentManager.destroy(),this._set("environmentManager",null),this.groundView=u(this.groundView))}get renderSpatialReference(){return this.renderCoordsHelper&&this.renderCoordsHelper.spatialReference}get basemapSpatialReference(){return this.basemapTerrain&&this.basemapTerrain.spatialReference}installContentCameraReset(e={sticky:!1}){return this.stateManager.installContentCameraReset(e)}get clippingArea(){if("global"===this.viewingMode)return null;let e=this._userClippingArea||this.get("map.clippingArea");return!(!!this._userClippingArea||this.get("map.clippingEnabled"))||g(e)?(this._clippingArea=null,null):e instanceof qe?this.spatialReference&&(e=Qe(e,this.spatialReference),g(e))?(ke.error("#clippingArea","setting clippingArea with incompatible SpatialReference"),this._clippingArea):(e=e.clone(),g(e.intersection(this.groundAndLayersExtent))&&(e.xmin=e.xmax,e.ymin=e.ymax),e.zmin=void 0,e.zmax=void 0,e.equals(this._clippingArea)||(this._clippingArea=e),this._clippingArea):(ke.error("#clippingArea","only clippingArea geometries of type Extent are supported"),this._clippingArea)}set clippingArea(e){this.ready&&"global"===this.viewingMode&&m(e)?ke.error("#clippingArea=","Clipping area is only supported in local viewingMode"):this._userClippingArea=e}get renderDataExtent(){if(1===this.state.viewingMode)return null;const e=this.renderSpatialReference,t=this.dataExtent;return g(t)||g(e)||t.spatialReference.equals(e)?t:Qe(t,e)}get dataExtent(){let e=this.groundAndLayersExtent;const t=this.spatialReference||We.WGS84,i=Qe(this.clippingArea,t);m(i)&&(e=m(e)?e.intersection(i):i);const r=this._get("dataExtent");return m(e)&&e.equals(r)?r:e}get groundAndLayersExtent(){const e=this.spatialReference||We.WGS84;let t;const i=i=>{const r=Qe(i,e);g(r)||(m(t)?t.union(r):t=r.clone())},r=this.basemapTerrain;if(null!=r&&r.spatialReference){const e=r.groundExtent;i(new qe({xmin:e[0],ymin:e[1],zmin:0,xmax:e[2],ymax:e[3],zmax:0,spatialReference:r.spatialReference}))}if(this.map){const e=e=>{!m(e.fullExtent)||"graphics"===e.type&&e.internal||i(e.fullExtent)};this.map.allLayers.forEach((t=>e(t)))}if(g(t))return null;t.hasZ?(t.zmin=Math.min(0,t.zmin),t.zmax=Math.max(0,t.zmax)):(t.zmin=0,t.zmax=0);const s=this._get("groundAndLayersExtent");return t.equals(s)?s:t}set environment(e){e!==this._defaults.environment&&(this._externallySet.environment=!0),this._set("environment",e)}castEnvironment(e){return e?e instanceof ee?e:e instanceof Fe?null!=this.environment?this.environment.cloneWithWebsceneEnvironment(e):ee.fromWebsceneEnvironment(e):P(ee,e):new ee}get pixelRatio(){return Math.min(this.windowDevicePixelRatio,this.maximumPixelRatio)}set pixelRatio(e){m(e)?this._override("pixelRatio",e):this._clearOverride("pixelRatio")}get maximumPixelRatio(){let e=1/0;const{maximumPixelRatio:t,maximumRenderResolution:i}=this.qualitySettings;if(null!=t&&(e=Math.min(e,t)),null!=i){const t=i/Math.max(this.width,this.height);e=Math.min(e,t)}return e}set maximumPixelRatio(e){m(e)?this._override("maximumPixelRatio",e):this._clearOverride("maximumPixelRatio")}get initialExtentRequired(){return this.stateManager&&!this.stateManager.hasInitialView}get interacting(){return this.navigating||m(this.activeTool)}get stationary(){return!this.animation&&!this.resizing&&(g(this.state)||this.state.stationary)}set qualityProfile(e){ce.isValidProfile(e)&&(ce.apply(e,this.qualitySettings),this._set("qualityProfile",e))}get qualityProfile(){return this._get("qualityProfile")||ce.getDefaultProfile()}set slicePlane(e){if(this._stage.renderView.setRenderParameters({slicePlane:e}),g(e))return void this._set("slicePlane",null);const t=this.propertiesPool.get("slicePlane");W(e,t),this._set("slicePlane",t)}get resolution(){return null!=this.spatialReference?z(this.scale,this.spatialReference):0}get heightModelInfo(){const e=this.getDefaultHeightModelInfo();return null!=e?j.deriveUnitFromSR(e,this.spatialReference):null}get updating(){var e,t,i;if(this.destroyed)return!1;let r=0,s=this.layerViewManager.updating,n=s?this.layerViewManager.updatingRemaining:0;this.allLayerViews.forEach((e=>{if(e.isFulfilled()){if(e.updating){if(s=!0,e.suspended||xe(e))return;++n,r+=e.updatingProgress}}else++n}));for(const a of[this.graphicsView,this.basemapView,this._resourceController,this._stage,this.featureTiles,this.pointsOfInterest,this.environmentManager,this.overlay,this.featureTreeDebugger,this.toolViewManager])if(m(a)&&a.updating){const e=.1;n+=e,r+=.5*e}for(const a of[this.deconflictor,this.labeler,this.basemapTerrain])m(a)&&a.updating&&(++n,r+=a.updatingProgress);if(s=!!(s||n>0||this.updatingHandles.updating||!this.ready||!this.stationary||this._createGraphicsViewController||null!=(e=this.inputManager)&&e.hasPendingInputs||null!=(t=this.map)&&null!=(i=t.allLayers)&&i.some((e=>!e.isFulfilled()))),s?(this._numUpdating=Math.max(n,this._numUpdating),r+=this._numUpdating-n):this._numUpdating=0,this._numUpdating>0?r/=this._numUpdating:r=s?0:1,this._get("updatingProgress")!==r){const e=this._resourceController.scheduler.now;if(r<1){const t=Math.min((e-this._lastUpdateTime)/2e3,1);r=this.updatingProgress*(1-t)+r*t}this._set("updatingProgress",r),this._lastUpdateTime=s&&r<1?e:0}return s}get viewingMode(){const e=this.get("map.initialViewProperties.viewingMode");if(e)return e;const t=this.spatialReference;return!t||Ae(t,"global")?"global":"local"}set viewingMode(e){if(this.ready)ke.error("#viewingMode","viewingMode cannot be set once view is ready");else{["local","global"].indexOf(e)>=0?this._override("viewingMode",e):void 0===e&&this._clearOverride("viewingMode")}}get resourceController(){return this._resourceController}get performanceInfo(){return new _e(this)}forceAnimationTime(e){this._stage.renderView.forcedAnimationTime=this.basemapTerrain.overlayManager.forcedAnimationTime=e}on(e,t,i,r){const s=this.viewEvents.on(e,t,i,r);return s||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}toMap(e,t){if(!this.ready)return ke.error("#toMap()","Scene view cannot be used before it is ready"),null;const i=t?this.externalToInternalIntersectOptions(t):this._defaultToMapOptions,r=m(i.graphics)&&(m(i.graphics.include)||m(i.graphics.exclude)),s=Ge(e)?Le(this,e):e,n=x(s);i.enableDraped=i.include&&!i.include.has(Pe)||i.exclude&&i.exclude.has(Pe);const a=this.sceneIntersectionHelper,o=new Oe(this.state.viewingMode);if(o.options.selectionMode=!0,o.options.store=r?2:0,a.intersectIntersectorScreen(n,o,i),r){for(const e of o.results.all){const t=Ce(e,this);if(g(t))return this._intersectResultToMapPoint(e);if(this._testGraphicUidFilter(i.graphics,t))return this._intersectResultToMapPoint(e)}return null}return this._intersectResultToMapPoint(o.results.min)}toScreen(e){if(!this.ready)return ke.error("#toScreen()","Scene view cannot be used before it is ready"),null;const t=f(null==e.z&&ue(this.elevationProvider,e),0);return G(e,Ke,this.renderSpatialReference,t),this.state.camera.projectToScreen(Ke,Ze),T(Ze[0],Ze[1])}pixelSizeAt(e){return this.ready?e?(G(e,Ke,this.renderSpatialReference),this.state.camera.computeScreenPixelSizeAt(Ke)):0:(ke.error("#pixelSizeAt()","Scene view cannot be used before it is ready"),null)}overlayPixelSizeInMapUnits(e){const t=this.basemapTerrain.overlayManager;return t?t.overlayPixelSizeInMapUnits(e):1}hitTest(e,t){if(!this.ready)return ke.error("#hitTest()","Scene view cannot be used before it is ready"),null;const i=Ge(e)?Le(this,e):e,r=M(i.x,i.y),s=t?this.externalToInternalIntersectOptions(t):this._defaultHitTestOptions;s.requiresGroundFeedback=!0,s.enableDraped=!0;const n=new Oe(this.state.viewingMode);n.options.selectionMode=!0,n.options.store=2,this.sceneIntersectionHelper.intersectIntersectorScreen(r,n,s);const a=this._intersectResultsToHits(n.results.all,s.graphics),o=n.results.ground,l=Ve(o,this),p=m(l)&&"type"in l&&"integrated-mesh"===l.type?l:null,h={screenPoint:i,results:a,ground:{mapPoint:this._intersectResultToMapPoint(o),distance:o.hasIntersectionPoint?o.distanceInRenderSpace:0,layer:p}};return de.SCENEVIEW_HITTEST_RETURN_INTERSECTOR&&(h.intersector=n),Promise.resolve(h)}popupHitTest(e){return Ee(this,e).then((({results:t,ground:i})=>{let r=null;return!(0===t.length||Math.abs(t[0].distance-i.distance)<1e-5)||i.layer&&"integrated-mesh"===i.layer.type||(r=i.mapPoint),{results:t,screenPoint:e,mapPoint:r}}))}goTo(e,t){return this.updatingHandles.addPromise(this.stateManager.goTo(e,t))}async whenAnalysisView(e){if(g(e.parent))throw new o("view:no-analysisview-for-analysis","The analysis has not been added to an AnalysisLayer",{analysis:e});return(await this.whenLayerView(e.parent)).whenAnalysisView(e)}whenLayerView(e){return super.whenLayerView(e)}takeScreenshot(e){return this.whenReady().then((()=>{const t=Ie(e,this);return t.pixelRatio/=this.pixelRatio,this._stage.renderView.takeScreenshot(He(t,this.supersampleScreenshotsEnabled,this.padding))}))}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}importLayerView(e){return X.importLayerView(e)}hasLayerViewModule(e){return X.hasLayerViewModule(e)}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){return this.get("map.initialViewProperties.spatialReference")||this.get("defaultsFromMap.spatialReference")||this.get("defaultsFromMap.isSpatialReferenceDone")&&this._initialDefaultSpatialReference||null}async validate(){let e=Ue();if(d("safari")&&d("safari")<9&&(e=new o("sceneview:browser-not-supported","This browser is not supported by SceneView (Safari < 9)",{type:"safari",requiredVersion:9,detectedVersion:d("safari")})),m(e))throw ke.warn("#validate()",e.message),e}isSpatialReferenceSupported(e,t,i){const r=e.isGeographic,s=e.isWebMercator,n=Ae(e,"global"),a="local"===this.viewingMode,o=!(!this._isOverridden("viewingMode")&&!this.get("map.initialViewProperties.viewingMode"));if(o){if(a&&r&&!Ae(e,"local"))return i?i(`Layer ${t.id} is ignored because its spatial reference is not supported in local viewing mode`):ke.warnOnce("Spatial reference defined on view not supported in local viewing mode."),!1;if(!a&&!n)return i?i(`Layer ${t.id} is ignored because its spatial reference is not supported in global viewing mode`):ke.warnOnce("Spatial reference defined on view not supported in global viewing mode."),!1}else if(r&&!n)return i?i(`Layer ${t.id} is ignored because its spatial reference is geographic but unsupported`):ke.warnOnce("Spatial reference is geographic but not supported."),!1;if(t)if(k(t)){let r;if(o){r=null!=Te(t,e,J(this.viewingMode)).tileInfo}else{let i=Te(t,e,1);null==i.tileInfo&&(i=Te(t,e,2),null!=i.tileInfo&&s&&!this.ready&&(this.viewingMode="local")),r=null!=i.tileInfo}if(!r)return i&&i(`Layer ${t.id} is ignored because it is tiled but\n its tiling scheme is not supported or compatible with the viewing mode`),!1}else if((e.isWGS84||s)&&!a)return null==this._initialDefaultSpatialReference&&(this._initialDefaultSpatialReference=e),o||this.ready||(this.viewingMode="global",i&&i(`Viewing mode locked to global due to reprojectable layer ${t.id}`)),i&&i(`Layer ${t.id} is ignored because it supports server-side reprojection`),!1;return!0}whenReady(){return new Promise((e=>{this.ready?e(this):this._resolveWhenReady.push(e)}))}computeMapPointFromVec3d(e,t){let i=this.spatialReference||We.WGS84;return L(e,this.renderSpatialReference,e,i)||(i=We.WGS84,L(e,this.renderSpatialReference,e,i)),t?(t.x=e[0],t.y=e[1],t.z=e[2],t.spatialReference=i):t=new ze(e,i),t}trackGraphicState(e){if(!e.graphic)return ke.error("trackGraphicState","GraphicState.graphic must not be null or undefined to start tracking"),null;const t=this.getViewForGraphic(e.graphic);let i=null,r=!1;const s=t=>{!r&&m(t)&&"graphics3d"in t&&t.graphics3d&&t.graphics3d.graphicsCore&&(i=t.graphics3d.graphicsCore.trackGraphicState(e))};return m(t)?s(t):this.whenViewForGraphic(e.graphic,{waitForLayer:!0}).then((e=>s(e)),(()=>{})).catch((()=>{})),{remove:()=>{r=!0,m(i)&&(i.remove(),i=null)}}}highlight(e){if(Array.isArray(e))return p(e.map((e=>this.highlight(e))));if(n.isCollection(e))return p(e.toArray().map((e=>this.highlight(e))));const t=this.getViewForGraphic(e);return t&&"highlight"in t?t.highlight(e):h()}maskOccludee(e){if(!e)return ke.error("maskOccludee","GraphicState.graphic must not be null or undefined to mask an occludee"),null;const t=this.getViewForGraphic(e);let i=null,r=!1;const s=t=>{!r&&m(t)&&"graphics3d"in t&&je(t)&&(i=t.maskOccludee(e))};return m(t)?s(t):this.whenViewForGraphic(e,{waitForLayer:!0}).then((e=>s(e)),(()=>{})).catch((()=>{})),{remove:()=>{r=!0,m(i)&&(i.remove(),i=null)}}}getViewForGraphic(e){return e.layer===this.graphics?this.graphicsView:e.layer?this.allLayerViews.find((t=>t.layer===e.layer)):null}graphicChanged(e){m(this.graphicsView)&&this.graphicsView.graphicChanged(e)}async whenViewForGraphic(e,t){if(e.layer===this)return await _(this,"graphicsView"),this.graphicsView;if(!e.layer||!this.map)throw new o("no-view-for-graphic");return t&&t.waitForLayer&&!this.map.allLayers.includes(e.layer)?new Promise(((t,i)=>{const r=this.map.allLayers.on("change",(s=>{-1!==s.added.indexOf(e.layer)&&(r.remove(),this.whenLayerView(e.layer).then(t,i))}))})):this.whenLayerView(e.layer)}externalToInternalIntersectOptions(e){const t=this._externalToInternalRenderItems(e.include,0),i=this._externalToInternalRenderItems(e.exclude,1);return{include:t.layerUids,exclude:i.layerUids,graphics:{include:t.graphicUids,exclude:i.graphicUids}}}_intersectResultToMapPoint(e,t){return e.getIntersectionPoint(Ke)?(t=this.computeMapPointFromVec3d(Ke,t),"TerrainRenderer"===e.intersector&&this.basemapTerrain&&(t.z=f(ue(this.basemapTerrain,t),0)),t):null}_intersectResultsToHits(e,t){const i=new Array;let r=null;for(let s=0;s<e.length;s++){const n=e[s],a=Ve(n,this);if(m(a)&&(a===this.map.ground||"type"in a&&"integrated-mesh"===a.type))break;const o=Ce(n,this);if(!m(o))continue;if(g(r)&&s!==e.length-1&&(r=new Set),m(r)){const e=this._getGraphicFilterUid(o);if(r.has(e))continue;r.add(e)}if(!this._testGraphicUidFilter(t,o))continue;const l=this._intersectResultToMapPoint(n),p=n.distanceInRenderSpace;i.push({graphic:o,mapPoint:l,distance:p})}return i}_getGraphicFilterUid(e){if(e.layer&&"objectIdField"in e.layer){const t=e.attributes[e.layer.objectIdField];if(t)return`o-${e.layer.id}-${t}`}return`u-${e.uid}`}_testGraphicUidFilter(e,t){const i=this._getGraphicFilterUid(t);return g(e)||(g(e.include)||e.include.has(i))&&(g(e.exclude)||!e.exclude.has(i))}_externalToInternalRenderItems(e,t,s={layerUids:null,graphicUids:null}){return e?(e instanceof i?($e(s,this._getGraphicFilterUid(e)),0===t&&(m(this.graphicsView)&&e.layer===this?Be(s,this.graphicsView.graphics3d.layer.id):e.layer&&Be(s,e.layer.uid))):"forEach"in e?e.forEach((e=>{Array.isArray(e)?this._externalToInternalRenderItems(e,t,s):n.isCollection(e)?e===this.graphics&&m(this.graphicsView)?Be(s,this.graphicsView.graphics3d.layer.id):this._externalToInternalRenderItems(e,t,s):e instanceof r?e===this.map.ground&&Be(s,Pe):this._externalToInternalRenderItems(e,t,s)})):Be(s,e.uid),s):s}_initBasemapTerrain(){this._set("basemapTerrain",new Se({view:this})),this._set("elevationProvider",new he({view:this})),this.elevationProvider.register("ground",this.basemapTerrain)}_exitBasemapTerrain(){this.basemapTerrain&&(this.elevationProvider.unregister(this.basemapTerrain),this.elevationProvider.destroy(),this._set("elevationProvider",null),this.basemapTerrain.destroy(),this._set("basemapTerrain",null))}_initGlobe(){this._initCoordinateSystem(),this.state.createInitialCamera(),this._initBasemapTerrain(),this._set("pointsOfInterest",new Re({view:this})),this._set("featureTiles",new ae({renderCoordsHelper:this.renderCoordsHelper,cameraOnSurface:this.pointsOfInterest.contentCameraOnSurface,focus:this.pointsOfInterest.focus,tilingSchemeOwner:this.basemapTerrain,viewState:this.state,scheduler:this._resourceController.scheduler,terrain:this.basemapTerrain}));const e=()=>{const e=this.basemapTerrain&&this.basemapTerrain.extent;if(this.clippingArea||e)if(e&&this.basemapTerrain.spatialReference){const e=m(this.basemapTerrain.extent)?H(F(this.basemapTerrain.extent,this.basemapTerrain.spatialReference),this.spatialReference):null;m(this.clippingArea)?this.featureTiles.filterExtent=this.clippingArea.intersection(e):this.featureTiles.filterExtent=e}else this.featureTiles.filterExtent=this.clippingArea;else this.featureTiles.filterExtent=null};this.handles.add([this.updatingHandles.add(de,"FEATURE_TILE_TREE_SHOW_TILES",(e=>{e&&this.featureTiles&&!this.featureTreeDebugger?this.updatingHandles.addPromise(import("./3d/layers/support/FeatureTileTree3DDebugger.js")).then((({FeatureTileTree3DDebugger:e})=>{!this.featureTreeDebugger&&de.FEATURE_TILE_TREE_SHOW_TILES&&(this.featureTreeDebugger=new e({view:this}))})):e||!this.featureTreeDebugger||de.FEATURE_TILE_TREE_SHOW_TILES||(this.featureTreeDebugger.destroy(),this.featureTreeDebugger=null)}),3),this.updatingHandles.add(this,"clippingArea",e,3),this.updatingHandles.add(this,"basemapTerrain.extent",e,3)],"feature-tiles"),this.stateManager.init()}_exitGlobe(){this.state&&(this.stateManager.deinit(),this.handles.remove("render-coords-helper"),this.handles.remove("feature-tiles"),this.featureTiles.destroy(),this._set("featureTiles",null),this.pointsOfInterest.destroy(),this._set("pointsOfInterest",null),this._exitBasemapTerrain(),this.state.exit(),this._exitCoordinateSystem())}_initCoordinateSystem(){if(this.spatialReference){const e=this.spatialReference;this.mapCoordsHelper&&this.mapCoordsHelper.spatialReference.equals(e)||this._set("mapCoordsHelper",new me(this.map,e));const t=this.state.isGlobal,i=t?U(e):e.isGeographic?We.PlateCarree:e;i!==this.renderSpatialReference&&(this._set("renderCoordsHelper",we.create(this.state.viewingMode,i)),t||this.handles.add(this.watch("basemapTerrain.extent",(e=>{const t=this.renderCoordsHelper.spatialReference;0===e[0]&&0===e[1]&&0===e[2]&&0===e[3]||!A(e,this.basemapTerrain.spatialReference,Je,t)||(this.renderCoordsHelper.extent=Je)}),!0),"render-coords-helper"),this.sceneIntersectionHelper&&this.sceneIntersectionHelper.setTolerance(Oe.DEFAULT_TOLERANCE/this.renderCoordsHelper.unitInMeters))}else this._set("mapCoordsHelper",null),this._set("renderCoordsHelper",null)}_exitCoordinateSystem(){this.mapCoordsHelper&&(this.handles.remove("render-coords-helper"),this._set("renderCoordsHelper",null),this._set("mapCoordsHelper",null))}updatingChanged(){this.notifyChange("updating")}_updateUpdatingMonitors(e=null){m(e)&&4===e.type||(this.handles.remove("updatingMonitors"),this.allLayerViews.forEach((e=>{e.destroyed||(this.handles.add([e.watch(["updating","updatingProgress"],(()=>this.updatingChanged()),!0)],"updatingMonitors"),e.when((()=>this.updatingChanged()),(()=>this.updatingChanged())))})),this.updatingChanged())}_renderScreenshotOverlay(e,t){if(!this.overlay||!this.overlay.hasVisibleItems)return t;const i=e.getContext("2d");return i.putImageData(t,0,0),this.overlay.renderCanvas(e),i.getImageData(0,0,t.width,t.height)}_initStage(){const e={deactivatedWebGLExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions,alpha:this.alphaCompositingEnabled,canvas:this.renderCanvas,screenshot:{renderOverlay:(e,t)=>this._renderScreenshotOverlay(e,t)}},t=new pe(this.state.viewingMode,(e=>this._stage.layers.forAll(e)),this);this._set("sceneIntersectionHelper",t);const i=a(this.surface),{resourceController:r,state:s,renderSpatialReference:n}=this;this._stage=new Me({options:e,container:i,resourceController:r,state:s,sceneIntersectionHelper:t,renderSR:n}),this._lostWebGLContextHandle=l(this._stage.renderView.canvas,"webglcontextlost",(()=>this.fatalError=new o("webgl-context-lost"))),this.handles.add([this.updatingHandles.add(this.qualitySettings,"antialiasingEnabled",(()=>{this._stage.renderView.setRenderParameters({antialiasingEnabled:this.qualitySettings.antialiasingEnabled})}),2),this.updatingHandles.add(this.qualitySettings,"highQualityTransparency",(()=>{this._stage.renderView.setRenderParameters({highQualityTransparency:this.qualitySettings.highQualityTransparency})}),2),b(this,"magnifier",(e=>this._stage.renderView.magnifier=e),!0)],"stage");const p=()=>{this._stage.renderView.setRenderParameters({defaultHighlightOptions:ge.toEngineOptions(this.highlightOptions)})};for(const a of["highlightOptions","highlightOptions.color","highlightOptions.haloColor","highlightOptions.haloOpacity","highlightOptions.fillOpacity","highlightOptions.shadowOpacity","highlightOptions.shadowColor","highlightOptions.shadowDifference"])this.handles.add(this.updatingHandles.add(this,a,p),"stage");p(),this.renderCoordsHelper&&this.sceneIntersectionHelper.setTolerance(Oe.DEFAULT_TOLERANCE/this.renderCoordsHelper.unitInMeters),this._set("canvas",this._stage.renderView.canvas)}_exitStage(){this._set("sceneIntersectionHelper",null),this._stage.destroy(),this._stage=null,this._lostWebGLContextHandle.remove(),this._lostWebGLContextHandle=null,this.handles.remove("stage"),this._set("canvas",null)}_initSurface(e){this._exitSurface(),this.state.init(e,this.spatialReference),this._initStage(),this._initGlobe(),this.sharedSymbolResources=new be({view:this,viewingMode:e,resourceController:this._resourceController,pointsOfInterest:this.pointsOfInterest,viewState:this.state,objectResourceCache:new ne})}_exitSurface(){this.sharedSymbolResources&&(this.sharedSymbolResources.objectResourceCache.destroy(),this.sharedSymbolResources.destroy(),this.sharedSymbolResources=null,this._exitGlobe(),this._exitStage())}_createGraphicsViewIfNeeded(){if(this.graphicsView||this._createGraphicsViewController)return;if(0===this.graphics.length)return;this.handles.remove("graphics-view"),this._createGraphicsViewController=new AbortController;const e=()=>{this._createGraphicsViewController=null,this.updatingChanged()};this._createGraphicsViewAsync(this._createGraphicsViewController.signal).then(e,e),this.updatingChanged()}async _createGraphicsViewAsync(e){const t=(await import("./3d/layers/GraphicsView3D.js")).default;y(e),await R(this.basemapTerrain,"ready",e),this._set("graphicsView",new t({view:this}))}_disposeGraphicsView(){this._createGraphicsViewController&&(this._createGraphicsViewController.abort(),this._createGraphicsViewController=null),this.handles.remove("graphics-view"),m(this.graphicsView)&&(this.handles.remove(this.graphicsView.graphics3d.layer.id),this.graphicsView.destroy(),this._set("graphicsView",null))}_startup(){const e=J(this.viewingMode);if(1===e&&(this._clippingArea=null),this._set("ready",!0),this._initSurface(e),this.handles.add(v(this,"graphics","after-changes",(()=>this._createGraphicsViewIfNeeded())),"graphics-view"),this._createGraphicsViewIfNeeded(),!this._externallySet.environment){const e=this.get("map.initialViewProperties.environment");e&&(this.environment=e)}this.labeler.setup(),this.environmentManager.connectView(this),this.inputManager.connect();const t=this._resolveWhenReady;this._resolveWhenReady=[],t.forEach((e=>e(this)))}_teardown(){this._initialDefaultSpatialReference=null,this.inputManager.disconnect(),this.environmentManager.disconnectView(),this.labeler.dispose(),this._disposeGraphicsView(),this.handles.remove("graphics-view"),this._exitSurface(),this._set("ready",!1)}_updateDefaultToMapOptions(){if(this._defaultToMapOptions.include.clear(),this.map){this.map.ground&&this._defaultToMapOptions.include.add(Pe);for(const e of this.map.allLayers.items)"integrated-mesh"===e.type&&this._defaultToMapOptions.include.add(e.uid)}}_updateDefaultHitTestOptions(){if(this._defaultHitTestOptions.exclude.clear(),this.map){this.map.ground&&this.map.ground.opacity<1&&this._defaultHitTestOptions.exclude.add(Pe);for(const e of this.map.allLayers.items)"integrated-mesh"===e.type&&e.opacity<1&&this._defaultToMapOptions.exclude.add(e.uid)}}};function Be(e,t){e.layerUids||(e.layerUids=new Set),e.layerUids.add(t)}function $e(e,t){e.graphicUids||(e.graphicUids=new Set),e.graphicUids.add(t)}function Qe(e,t){return m(e)&&I(e.spatialReference,t)?H(e,t):null}e([O()],Ne.prototype,"_userClippingArea",void 0),e([O()],Ne.prototype,"_resourceController",void 0),e([O()],Ne.prototype,"_stage",void 0),e([O({readOnly:!0})],Ne.prototype,"deconflictor",void 0),e([O({readOnly:!0})],Ne.prototype,"labeler",void 0),e([O({type:Z,readOnly:!0,aliasOf:"state.animation"})],Ne.prototype,"animation",void 0),e([O({readOnly:!0})],Ne.prototype,"basemapTerrain",void 0),e([O({readOnly:!0})],Ne.prototype,"elevationProvider",void 0),e([O({type:t,aliasOf:"stateManager.camera"})],Ne.prototype,"camera",void 0),e([O({type:t,aliasOf:"stateManager.contentCamera"})],Ne.prototype,"contentCamera",void 0),e([O({readOnly:!0})],Ne.prototype,"canvas",void 0),e([O({type:ze,aliasOf:"stateManager.center"})],Ne.prototype,"center",void 0),e([O({type:qe})],Ne.prototype,"clippingArea",null),e([O({type:Y})],Ne.prototype,"constraints",void 0),e([O({type:qe,readOnly:!0})],Ne.prototype,"renderDataExtent",null),e([O({type:qe,readOnly:!0})],Ne.prototype,"dataExtent",null),e([O({type:qe,readOnly:!0})],Ne.prototype,"groundAndLayersExtent",null),e([O({value:null,type:ee})],Ne.prototype,"environment",null),e([C("environment")],Ne.prototype,"castEnvironment",null),e([O({readOnly:!0})],Ne.prototype,"environmentManager",void 0),e([O({type:qe,aliasOf:"stateManager.extent"})],Ne.prototype,"extent",void 0),e([O()],Ne.prototype,"floors",void 0),e([O({readOnly:!0,aliasOf:"stateManager.screenCenter"})],Ne.prototype,"screenCenter",void 0),e([O({type:Number})],Ne.prototype,"pixelRatio",null),e([O({type:Number,dependsOn:["qualitySettings.maximumPixelRatio","qualitySettings.maximumRenderResolution","size"]})],Ne.prototype,"maximumPixelRatio",null),e([O({aliasOf:"stateManager.frustum"})],Ne.prototype,"frustum",void 0),e([O({type:Number,readOnly:!0})],Ne.prototype,"fullOpacity",void 0),e([O({readOnly:!0})],Ne.prototype,"graphicsView",void 0),e([O()],Ne.prototype,"groundView",void 0),e([O({type:Boolean})],Ne.prototype,"initialExtentRequired",null),e([O({type:Boolean,readOnly:!0})],Ne.prototype,"interacting",null),e([O()],Ne.prototype,"stationary",null),e([O({aliasOf:"state.navigating"})],Ne.prototype,"navigating",void 0),e([O()],Ne.prototype,"map",void 0),e([O({readOnly:!0})],Ne.prototype,"mapCoordsHelper",void 0),e([O({aliasOf:"stateManager.padding"})],Ne.prototype,"padding",void 0),e([O({type:Re,readOnly:!0})],Ne.prototype,"pointsOfInterest",void 0),e([O({type:ae,readOnly:!0})],Ne.prototype,"featureTiles",void 0),e([O()],Ne.prototype,"featureTreeDebugger",void 0),e([O({type:Boolean})],Ne.prototype,"screenSizePerspectiveEnabled",void 0),e([O({constructOnly:!0})],Ne.prototype,"deactivatedWebGLExtensions",void 0),e([O({constructOnly:!0})],Ne.prototype,"debugWebGLExtensions",void 0),e([O({constructOnly:!0})],Ne.prototype,"renderCanvas",void 0),e([O({constructOnly:!0})],Ne.prototype,"state",void 0),e([O({readOnly:!0})],Ne.prototype,"inputManager",void 0),e([O({readOnly:!0})],Ne.prototype,"stateManager",void 0),e([O({type:["low","medium","high"]})],Ne.prototype,"qualityProfile",null),e([O({type:ye,get(){let e=this._get("qualitySettings");return e||(e=new ye,ce.apply(this.qualityProfile,e)),e}})],Ne.prototype,"qualitySettings",void 0),e([O()],Ne.prototype,"slicePlane",null),e([O({dependsOn:["viewingMode"]})],Ne.prototype,"preconditionsReady",void 0),e([O({readOnly:!0})],Ne.prototype,"renderCoordsHelper",void 0),e([O({readOnly:!0})],Ne.prototype,"sceneIntersectionHelper",void 0),e([O({type:Number,dependsOn:["scale","spatialReference"],readOnly:!0})],Ne.prototype,"resolution",null),e([O({type:Number,aliasOf:"stateManager.scale"})],Ne.prototype,"scale",void 0),e([O({dependsOn:[]})],Ne.prototype,"heightModelInfo",null),e([O({dependsOn:["map.initialViewProperties?.spatialReference","defaultsFromMap.isSpatialReferenceDone"]})],Ne.prototype,"spatialReference",void 0),e([O({type:Boolean,constructOnly:!0})],Ne.prototype,"alphaCompositingEnabled",void 0),e([O({type:Boolean})],Ne.prototype,"supersampleScreenshotsEnabled",void 0),e([O({readOnly:!0})],Ne.prototype,"type",void 0),e([O({type:De})],Ne.prototype,"ui",void 0),e([O({type:Boolean,readOnly:!0,dependsOn:["graphicsView.updating","basemapView.updating","basemapTerrain.updating","layerViewManager.updating","layerViewManager.updatingRemaining","_resourceController.updating","_stage.updating","featureTiles.updating","pointsOfInterest.updating","environmentManager.updating","overlay.updating","updatingHandles.updating","featureTreeDebugger.updating","labeler.updating","deconflictor.updating","ready","stationary","inputManager.hasPendingInputs","toolViewManager.updating"]})],Ne.prototype,"updating",null),e([O({type:Number,readOnly:!0,dependsOn:["updating"]})],Ne.prototype,"updatingProgress",void 0),e([O({type:["global","local"],dependsOn:["map.initialViewProperties?.viewingMode","spatialReference"]})],Ne.prototype,"viewingMode",null),e([O({type:s,aliasOf:"stateManager.viewpoint"})],Ne.prototype,"viewpoint",void 0),e([O({type:Number,aliasOf:"stateManager.zoom"})],Ne.prototype,"zoom",void 0),e([O({type:ge})],Ne.prototype,"highlightOptions",void 0),Ne=e([V("esri.views.SceneView")],Ne);const Ke=E(),Ze=M(),Je=D(),Xe=Ne;export{Xe as default};
|
package/views/ToolViewManager.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.22/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as
|
|
5
|
+
import{_ as t}from"../chunks/tslib.es6.js";import o from"../core/Accessor.js";import e from"../core/Collection.js";import{HandleOwner as i}from"../core/HandleOwner.js";import r from"../core/Logger.js";import{isSome as s,isNone as a}from"../core/maybe.js";import{watch as l}from"../core/watchUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import"../core/has.js";import"../core/accessorSupport/ensureType.js";import{subclass as h}from"../core/accessorSupport/decorators/subclass.js";import{TextureCollection as c}from"./3d/support/TextureCollection.js";import{ViewEventPriorities as p}from"./input/InputManager.js";import{eventTypes as u}from"./input/ViewEvents.js";import{getToolAttachDetachHandles as d,areToolManipulatorsEditable as v}from"./interactive/interactiveToolUtils.js";import m from"./interactive/ToolViewManagerManipulatorState.js";const f=r.getLogger("esri.views.ToolViewManager"),T="manipulators",_="tools";let E=class extends i{constructor(t){super(t),this._manipulatorState=new m,this.tools=new e,this.cursor=null,this._forEachTool=t=>{for(const o of this.tools.items)if(t(o))return}}initialize(){this.handles.add([this.view.on(u,(t=>{this._handleInputEvent(t)}),p.TOOL),...d(this.tools),this.tools.on("before-add",(t=>{const o=t.item;if(null==o||this.tools.includes(o))return f.warn("Tool is either already in the list of tools or tool is `null`. Not adding tool."),void t.preventDefault()})),this.tools.on("before-remove",(({item:t})=>{this._manipulatorState.clearPointers(t,this._forEachTool)})),this.tools.on("change",(()=>{this._refreshToolWatchers()}))])}destroy(){this._forEachTool((t=>t.destroy()))}set activeTool(t){if(s(t)&&!this.view.ready)return void f.error("Cannot set active tool while view is not ready.");if(t===this.activeTool)return void(s(t)&&f.warn("Tool is already active - ignoring activation request."));s(this.activeTool)&&this.activeTool.deactivate(),s(t)&&t.activate(),this._set("activeTool",t),this._removeIncompleteTools(t);const o=a(this.activeTool);for(const e of this.tools){e.setEditableFlag(1,o||e===this.activeTool);const t=v(e);!o&&t||this._manipulatorState.clearPointers(e,this._forEachTool,!t)}this._updateCursor()}get updating(){return this.updatingHandles.updating||this.tools.some((t=>t.updating))}attach(){this._forEachTool((t=>t.attach())),"3d"===this.view.type?(this._set("textures",new c(this.view._stage,this.view.resourceController.scheduler)),this.handles.add([this.view.state.watch("camera",(()=>{this._forEachManipulator((t=>{null!=t.onViewChange&&t.onViewChange()}))})),this.view.elevationProvider.on("elevation-change",(t=>{this._forEachManipulator((o=>{null!=o.onElevationChange&&o.onElevationChange(t)}))}))],T)):this.handles.add(this.view.watch("extent",(()=>{this._forEachManipulator((t=>{null!=t.onViewChange&&t.onViewChange()}))})))}detach(){s(this.activeTool)&&(this.activeTool=null),this._forEachTool((t=>{t.detach(),t.destroy()})),this.tools.removeAll(),this.handles.remove(T)}_forEachManipulator(t){this._forEachTool((o=>{o.manipulators&&o.manipulators.forEach((({manipulator:e})=>t(e,o)))}))}_handleInputEvent(t){let o=!1;const e={...t,stopPropagation:()=>{o=!0,t.stopPropagation()}};s(this.activeTool)?this.activeTool.handleInputEvent&&this.activeTool.handleInputEvent(e):this._forEachTool((t=>{!o&&t.attached&&t.visible&&t.handleInputEvent(e)})),!o&&"key-down"===t.type&&"Escape"===t.key&&this.activeTool&&(t.stopPropagation(),this.activeTool=null),this._manipulatorState.handleInputEvent(e,{forEachTool:this._forEachTool,activeTool:this.activeTool,setActiveTool:t=>{this.activeTool=t},view:this.view}),!o&&s(this.activeTool)&&this.activeTool.handleInputEventAfter(e),this._manipulatorState.handleHoverEvent(e,this._forEachTool),this._updateCursor()}_refreshToolWatchers(){this.handles.remove(_),this._forEachTool((t=>{if(t instanceof o){const o=l(t,["cursor","visible","editable"],(()=>{v(t)||this._manipulatorState.clearPointers(t,this._forEachTool),this._updateCursor()}));this.handles.add(o,_)}t.manipulators&&this.handles.add(t.manipulators.on("change",(o=>{o.removed.forEach((({id:o})=>{this._manipulatorState.clearPointers(t,this._forEachTool,!0,o)})),this._manipulatorState.updateHoveredStateFromKnownPointers(this._forEachTool),this._updateCursor()})),_)})),this._manipulatorState.updateHoveredStateFromKnownPointers(this._forEachTool),this._updateCursor()}_updateCursor(){let t=this._manipulatorState.cursor;this._forEachTool((o=>!(!s(o.cursor)||!o.visible)&&(t=o.cursor,!0))),this._get("cursor")!==t&&this._set("cursor",t)}_removeIncompleteTools(t){this.tools.filter((o=>(a(t)||o!==t)&&!o.completed)).forEach((t=>{this.tools.remove(t),t.destroy()}))}};t([n({constructOnly:!0,nonNullable:!0})],E.prototype,"view",void 0),t([n({readOnly:!0,nonNullable:!0})],E.prototype,"textures",void 0),t([n({value:null})],E.prototype,"activeTool",null),t([n({readOnly:!0,type:e})],E.prototype,"tools",void 0),t([n({readOnly:!0})],E.prototype,"cursor",void 0),t([n({readOnly:!0})],E.prototype,"updating",null),E=t([h("esri.views.ToolViewManager")],E);const w=E;export{w as default};
|
package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.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.22/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../../chunks/tslib.es6.js";import{equals as t}from"../../../../../core/arrayUtils.js";import{AsyncSequence as i}from"../../../../../core/AsyncSequence.js";import{HandleOwner as s}from"../../../../../core/HandleOwner.js";import{makeHandle as r}from"../../../../../core/handleUtils.js";import o from"../../../../../core/Logger.js";import{isSome as n,isNone as a,unwrap as l}from"../../../../../core/maybe.js";import{createAbortController as u,createTask as c,throwIfAbortError as d}from"../../../../../core/promiseUtils.js";import{property as h}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/accessorSupport/ensureType.js";import{subclass as p}from"../../../../../core/accessorSupport/decorators/subclass.js";import f from"../../../../../geometry/Extent.js";import{toExtent as y}from"../../../../../geometry/support/aaBoundingRect.js";import{unquantizeOptimizedFeatureSet as g,convertFromFeatureSet as m}from"../../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeatureSetParserContext as b}from"../../../../../rest/query/operations/pbfOptimizedFeatureSet.js";import{executeQueryForExtent as F,executeQueryPBF as T,executeQuery as v}from"../../../../../rest/query/operations/query.js";import P from"../../../../../rest/support/Query.js";import{PendingFeatureTile as I}from"./PendingFeatureTile.js";const S=o.getLogger("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher");let O=class extends s{constructor(e){super(e),this.tilesOfInterest=[],this.availability=0,this.pendingTiles=new Map,this.pendingEdits=new i,this.pendingEditsAbortController=u()}get minimumVerticesPerFeature(){var e;switch(null==(e=this.store)?void 0:e.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}set filter(e){const t=this._get("filter"),i=this.filterProperties(e);JSON.stringify(t)!==JSON.stringify(i)&&this._set("filter",i)}set customParameters(e){const t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){const t=this._get("tileInfo");t!==e&&(n(e)&&n(t)&&JSON.stringify(e)===JSON.stringify(t)||(this._set("tileInfo",e),this.store.tileInfo=e))}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this.updatingHandles.updating||this.pendingEdits.updating}initialize(){this.initializeFetchExtent(),this.updatingHandles.add(this,"configuration",(()=>this.refresh())),this.updatingHandles.add(this,"tilesOfInterest",((e,i)=>{t(e,i,(({id:e},{id:t})=>e===t))||this.process()}),1)}destroy(){this.pendingTiles.forEach((e=>this.deletePendingTile(e))),this.pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this.pendingEditsAbortController.abort(),this.pendingEditsAbortController=null}refresh(){this.store.refresh(),this.pendingTiles.forEach((e=>this.deletePendingTile(e))),this.process()}applyEdits(e){this.pendingEdits.push(e,(async e=>{if(0===e.addedFeatures.length&&0===e.updatedFeatures.length&&0===e.deletedFeatures.length)return;for(const[,i]of this.pendingTiles)i.reset();const t={...e,deletedFeatures:e.deletedFeatures.map((({objectId:e,globalId:t})=>e&&-1!==e?e:this.lookupObjectIdByGlobalId(t)))};await this.updatingHandles.addPromise(this.store.processEdits(t,((e,t)=>this.queryFeaturesById(e,t)),this.pendingEditsAbortController.signal)),this.processPendingTiles()}))}initializeFetchExtent(){if(!this.capabilities.query.supportsExtent)return;const e=c((async e=>{try{var t;const i=await F(this.url,new P({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:!!this.capabilities.query.supportsCacheHint||void 0}),{query:this.configuration.customParameters,signal:e});this.store.extent=f.fromJSON(null==(t=i.data)?void 0:t.extent)}catch(i){d(i),S.warn("Failed to fetch data extent",i)}}));this.updatingHandles.addPromise(e.promise.then((()=>this.process()))),this.handles.add(r((()=>e.abort())))}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this.pendingTiles.values()).map((e=>e.debugInfo)),storedTiles:this.store.debugInfo}}process(){this.markTilesNotAlive(),this.createPendingTiles(),this.deletePendingTiles(),this.processPendingTiles()}markTilesNotAlive(){for(const[,e]of this.pendingTiles)e.alive=!1}createPendingTiles(){const e=this.collectMissingTilesInfo();if(this.setAvailability(a(e)?1:e.coveredArea/e.fullArea),!a(e))for(const{data:t,resolution:i}of e.missingTiles){const e=this.pendingTiles.get(t.id);e?(e.resolution=i,e.alive=!0):this.createPendingTile(t,i)}}collectMissingTilesInfo(){let e=null;for(let t=this.tilesOfInterest.length-1;t>=0;t--){const i=this.tilesOfInterest[t],s=this.store.process(i,((e,t)=>this.verifyTileComplexity(e,t)));a(e)?e=s:e.prepend(s)}return e}deletePendingTiles(){for(const[,e]of this.pendingTiles)e.alive||this.deletePendingTile(e)}processPendingTiles(){const e={fetchCount:(e,t)=>this.fetchCount(e,t),fetchFeatures:(e,t,i)=>this.fetchFeatures(e,t,i),finish:(e,t)=>this.finishPendingTile(e,t),resume:()=>this.processPendingTiles()};if(this.ensureFetchAllCounts(e))for(const[,t]of this.pendingTiles)this.verifyTileComplexity(this.store.getFeatureCount(t.data),t.resolution)&&this.updatingHandles.addPromise(t.process(e))}verifyTileComplexity(e,t){return this.verifyVertexComplexity(e)&&this.verifyFeatureDensity(e,t)}verifyVertexComplexity(e){return e*this.minimumVerticesPerFeature<j}verifyFeatureDensity(e,t){if(a(this.tileInfo))return!1;const i=this.tileSize*t;return e*(w/(i*i))<E}ensureFetchAllCounts(e){let t=!0;for(const[,i]of this.pendingTiles)i.state.type<2&&this.updatingHandles.addPromise(i.process(e)),i.state.type<=1&&(t=!1);return t}finishPendingTile(e,t){this.store.add(e.data,t),this.deletePendingTile(e),this.updateAvailability()}updateAvailability(){const e=this.collectMissingTilesInfo();this.setAvailability(a(e)?1:e.coveredArea/e.fullArea)}setAvailability(e){this._set("availability",e)}createPendingTile(e,t){const i=new I(e,t);return this.pendingTiles.set(e.id,i),i}deletePendingTile(e){e.reset(),this.pendingTiles.delete(e.data.id)}async fetchCount(e,t){return this.store.fetchCount(e.data,this.url,this.createCountQuery(e),{query:this.customParameters,timeout:x,signal:t})}async fetchFeatures(e,t,i){let s,r=0,o=0,n=t;for(;;){const a=this.createFeaturesQuery(e),u=this.setPagingParameters(a,r,n),{features:c,exceededTransferLimit:d}=await this.queryFeatures(a,i);if(u&&(r+=l(a.num)),o+=c.length,s=s?s.concat(c):c,n=t-o,!u||!d||n<=0)return s}}filterProperties(e){return a(e)?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}lookupObjectIdByGlobalId(e){const t=this.globalIdField,i=this.objectIdField;if(a(t))throw new Error("Expected globalIdField to be defined");let s=null;if(this.store.featureStore.forEach((r=>{var o;e===r.attributes[t]&&(s=null!=(o=r.objectId)?o:r.attributes[i])})),a(s))throw new Error(`Expected to find a feature with globalId ${e}`);return s}queryFeaturesById(e,t){const i=this.createFeaturesQuery(null);return i.objectIds=e,this.queryFeatures(i,t)}queryFeatures(e,t){return this.capabilities.query.supportsFormatPBF?this.queryFeaturesPBF(e,t):this.queryFeaturesJSON(e,t)}async queryFeaturesPBF(e,t){const{sourceSpatialReference:i}=this,{data:s}=await T(this.url,e,new b({sourceSpatialReference:i}),{query:this.configuration.customParameters,timeout:x,signal:t});return g(s)}async queryFeaturesJSON(e,t){const{sourceSpatialReference:i}=this,{data:s}=await v(this.url,e,i,{query:this.configuration.customParameters,timeout:x,signal:t});return m(s,this.objectIdField)}createCountQuery(e){const t=this.createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}createFeaturesQuery(e){const t=this.createBaseQuery(e);return t.outFields=this.globalIdField?[this.globalIdField,this.objectIdField]:[this.objectIdField],t.returnGeometry=!0,n(e)&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}createBaseQuery(e){const t=new P({returnZ:!1,returnM:!1,geometry:n(this.tileInfo)&&n(e)?y(e.data.extent,this.tileInfo.spatialReference):void 0}),i=this.configuration.filter;return n(i)&&(t.where=i.where,t.gdbVersion=i.gdbVersion,t.timeExtent=i.timeExtent),t.outSpatialReference=this.spatialReference,t}setPagingParameters(e,t,i){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:s,supportsCacheHint:r,tileMaxRecordCount:o,maxRecordCount:n,supportsResultType:a}=this.capabilities.query,l=s?P.MAX_MAX_RECORD_COUNT_FACTOR:1,u=l*((a||r)&&o?o:n||C);return e.start=t,s?(e.maxRecordCountFactor=Math.min(l,Math.ceil(i/u)),e.num=Math.min(i,e.maxRecordCountFactor*u)):e.num=Math.min(i,u),!0}};e([h({constructOnly:!0})],O.prototype,"url",void 0),e([h({constructOnly:!0})],O.prototype,"objectIdField",void 0),e([h({constructOnly:!0})],O.prototype,"globalIdField",void 0),e([h({constructOnly:!0})],O.prototype,"capabilities",void 0),e([h({constructOnly:!0})],O.prototype,"sourceSpatialReference",void 0),e([h({constructOnly:!0})],O.prototype,"spatialReference",void 0),e([h({constructOnly:!0})],O.prototype,"store",void 0),e([h({readOnly:!0})],O.prototype,"minimumVerticesPerFeature",null),e([h()],O.prototype,"filter",null),e([h()],O.prototype,"customParameters",null),e([h({readOnly:!0})],O.prototype,"configuration",null),e([h()],O.prototype,"tileInfo",null),e([h()],O.prototype,"tileSize",null),e([h()],O.prototype,"tilesOfInterest",void 0),e([h({readOnly:!0})],O.prototype,"updating",null),e([h({readOnly:!0})],O.prototype,"availability",void 0),O=e([p("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],O);const C=2e3,x=6e5,j=1e6,w=25,E=1;export{O as FeatureServiceTiledFetcher};
|
|
5
|
+
import{_ as e}from"../../../../../chunks/tslib.es6.js";import{equals as t}from"../../../../../core/arrayUtils.js";import{AsyncSequence as i}from"../../../../../core/AsyncSequence.js";import{HandleOwner as s}from"../../../../../core/HandleOwner.js";import{makeHandle as r}from"../../../../../core/handleUtils.js";import o from"../../../../../core/Logger.js";import{isSome as n,isNone as a,unwrap as l}from"../../../../../core/maybe.js";import{createTask as u,throwIfAbortError as c}from"../../../../../core/promiseUtils.js";import{property as d}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/accessorSupport/ensureType.js";import{subclass as h}from"../../../../../core/accessorSupport/decorators/subclass.js";import p from"../../../../../geometry/Extent.js";import{toExtent as f}from"../../../../../geometry/support/aaBoundingRect.js";import{unquantizeOptimizedFeatureSet as y,convertFromFeatureSet as g}from"../../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeatureSetParserContext as m}from"../../../../../rest/query/operations/pbfOptimizedFeatureSet.js";import{executeQueryForExtent as b,executeQueryPBF as F,executeQuery as T}from"../../../../../rest/query/operations/query.js";import v from"../../../../../rest/support/Query.js";import{PendingFeatureTile as P}from"./PendingFeatureTile.js";const I=o.getLogger("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher");let S=class extends s{constructor(e){super(e),this.tilesOfInterest=[],this.availability=0,this.pendingTiles=new Map,this.pendingEdits=new i,this.pendingEditsAbortController=new AbortController}get minimumVerticesPerFeature(){var e;switch(null==(e=this.store)?void 0:e.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}set filter(e){const t=this._get("filter"),i=this.filterProperties(e);JSON.stringify(t)!==JSON.stringify(i)&&this._set("filter",i)}set customParameters(e){const t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){const t=this._get("tileInfo");t!==e&&(n(e)&&n(t)&&JSON.stringify(e)===JSON.stringify(t)||(this._set("tileInfo",e),this.store.tileInfo=e))}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this.updatingHandles.updating||this.pendingEdits.updating}initialize(){this.initializeFetchExtent(),this.updatingHandles.add(this,"configuration",(()=>this.refresh())),this.updatingHandles.add(this,"tilesOfInterest",((e,i)=>{t(e,i,(({id:e},{id:t})=>e===t))||this.process()}),1)}destroy(){this.pendingTiles.forEach((e=>this.deletePendingTile(e))),this.pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this.pendingEditsAbortController.abort(),this.pendingEditsAbortController=null}refresh(){this.store.refresh(),this.pendingTiles.forEach((e=>this.deletePendingTile(e))),this.process()}applyEdits(e){this.pendingEdits.push(e,(async e=>{if(0===e.addedFeatures.length&&0===e.updatedFeatures.length&&0===e.deletedFeatures.length)return;for(const[,i]of this.pendingTiles)i.reset();const t={...e,deletedFeatures:e.deletedFeatures.map((({objectId:e,globalId:t})=>e&&-1!==e?e:this.lookupObjectIdByGlobalId(t)))};await this.updatingHandles.addPromise(this.store.processEdits(t,((e,t)=>this.queryFeaturesById(e,t)),this.pendingEditsAbortController.signal)),this.processPendingTiles()}))}initializeFetchExtent(){if(!this.capabilities.query.supportsExtent)return;const e=u((async e=>{try{var t;const i=await b(this.url,new v({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:!!this.capabilities.query.supportsCacheHint||void 0}),{query:this.configuration.customParameters,signal:e});this.store.extent=p.fromJSON(null==(t=i.data)?void 0:t.extent)}catch(i){c(i),I.warn("Failed to fetch data extent",i)}}));this.updatingHandles.addPromise(e.promise.then((()=>this.process()))),this.handles.add(r((()=>e.abort())))}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this.pendingTiles.values()).map((e=>e.debugInfo)),storedTiles:this.store.debugInfo}}process(){this.markTilesNotAlive(),this.createPendingTiles(),this.deletePendingTiles(),this.processPendingTiles()}markTilesNotAlive(){for(const[,e]of this.pendingTiles)e.alive=!1}createPendingTiles(){const e=this.collectMissingTilesInfo();if(this.setAvailability(a(e)?1:e.coveredArea/e.fullArea),!a(e))for(const{data:t,resolution:i}of e.missingTiles){const e=this.pendingTiles.get(t.id);e?(e.resolution=i,e.alive=!0):this.createPendingTile(t,i)}}collectMissingTilesInfo(){let e=null;for(let t=this.tilesOfInterest.length-1;t>=0;t--){const i=this.tilesOfInterest[t],s=this.store.process(i,((e,t)=>this.verifyTileComplexity(e,t)));a(e)?e=s:e.prepend(s)}return e}deletePendingTiles(){for(const[,e]of this.pendingTiles)e.alive||this.deletePendingTile(e)}processPendingTiles(){const e={fetchCount:(e,t)=>this.fetchCount(e,t),fetchFeatures:(e,t,i)=>this.fetchFeatures(e,t,i),finish:(e,t)=>this.finishPendingTile(e,t),resume:()=>this.processPendingTiles()};if(this.ensureFetchAllCounts(e))for(const[,t]of this.pendingTiles)this.verifyTileComplexity(this.store.getFeatureCount(t.data),t.resolution)&&this.updatingHandles.addPromise(t.process(e))}verifyTileComplexity(e,t){return this.verifyVertexComplexity(e)&&this.verifyFeatureDensity(e,t)}verifyVertexComplexity(e){return e*this.minimumVerticesPerFeature<x}verifyFeatureDensity(e,t){if(a(this.tileInfo))return!1;const i=this.tileSize*t;return e*(j/(i*i))<w}ensureFetchAllCounts(e){let t=!0;for(const[,i]of this.pendingTiles)i.state.type<2&&this.updatingHandles.addPromise(i.process(e)),i.state.type<=1&&(t=!1);return t}finishPendingTile(e,t){this.store.add(e.data,t),this.deletePendingTile(e),this.updateAvailability()}updateAvailability(){const e=this.collectMissingTilesInfo();this.setAvailability(a(e)?1:e.coveredArea/e.fullArea)}setAvailability(e){this._set("availability",e)}createPendingTile(e,t){const i=new P(e,t);return this.pendingTiles.set(e.id,i),i}deletePendingTile(e){e.reset(),this.pendingTiles.delete(e.data.id)}async fetchCount(e,t){return this.store.fetchCount(e.data,this.url,this.createCountQuery(e),{query:this.customParameters,timeout:C,signal:t})}async fetchFeatures(e,t,i){let s,r=0,o=0,n=t;for(;;){const a=this.createFeaturesQuery(e),u=this.setPagingParameters(a,r,n),{features:c,exceededTransferLimit:d}=await this.queryFeatures(a,i);if(u&&(r+=l(a.num)),o+=c.length,s=s?s.concat(c):c,n=t-o,!u||!d||n<=0)return s}}filterProperties(e){return a(e)?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}lookupObjectIdByGlobalId(e){const t=this.globalIdField,i=this.objectIdField;if(a(t))throw new Error("Expected globalIdField to be defined");let s=null;if(this.store.featureStore.forEach((r=>{var o;e===r.attributes[t]&&(s=null!=(o=r.objectId)?o:r.attributes[i])})),a(s))throw new Error(`Expected to find a feature with globalId ${e}`);return s}queryFeaturesById(e,t){const i=this.createFeaturesQuery(null);return i.objectIds=e,this.queryFeatures(i,t)}queryFeatures(e,t){return this.capabilities.query.supportsFormatPBF?this.queryFeaturesPBF(e,t):this.queryFeaturesJSON(e,t)}async queryFeaturesPBF(e,t){const{sourceSpatialReference:i}=this,{data:s}=await F(this.url,e,new m({sourceSpatialReference:i}),{query:this.configuration.customParameters,timeout:C,signal:t});return y(s)}async queryFeaturesJSON(e,t){const{sourceSpatialReference:i}=this,{data:s}=await T(this.url,e,i,{query:this.configuration.customParameters,timeout:C,signal:t});return g(s,this.objectIdField)}createCountQuery(e){const t=this.createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}createFeaturesQuery(e){const t=this.createBaseQuery(e);return t.outFields=this.globalIdField?[this.globalIdField,this.objectIdField]:[this.objectIdField],t.returnGeometry=!0,n(e)&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}createBaseQuery(e){const t=new v({returnZ:!1,returnM:!1,geometry:n(this.tileInfo)&&n(e)?f(e.data.extent,this.tileInfo.spatialReference):void 0}),i=this.configuration.filter;return n(i)&&(t.where=i.where,t.gdbVersion=i.gdbVersion,t.timeExtent=i.timeExtent),t.outSpatialReference=this.spatialReference,t}setPagingParameters(e,t,i){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:s,supportsCacheHint:r,tileMaxRecordCount:o,maxRecordCount:n,supportsResultType:a}=this.capabilities.query,l=s?v.MAX_MAX_RECORD_COUNT_FACTOR:1,u=l*((a||r)&&o?o:n||O);return e.start=t,s?(e.maxRecordCountFactor=Math.min(l,Math.ceil(i/u)),e.num=Math.min(i,e.maxRecordCountFactor*u)):e.num=Math.min(i,u),!0}};e([d({constructOnly:!0})],S.prototype,"url",void 0),e([d({constructOnly:!0})],S.prototype,"objectIdField",void 0),e([d({constructOnly:!0})],S.prototype,"globalIdField",void 0),e([d({constructOnly:!0})],S.prototype,"capabilities",void 0),e([d({constructOnly:!0})],S.prototype,"sourceSpatialReference",void 0),e([d({constructOnly:!0})],S.prototype,"spatialReference",void 0),e([d({constructOnly:!0})],S.prototype,"store",void 0),e([d({readOnly:!0})],S.prototype,"minimumVerticesPerFeature",null),e([d()],S.prototype,"filter",null),e([d()],S.prototype,"customParameters",null),e([d({readOnly:!0})],S.prototype,"configuration",null),e([d()],S.prototype,"tileInfo",null),e([d()],S.prototype,"tileSize",null),e([d()],S.prototype,"tilesOfInterest",void 0),e([d({readOnly:!0})],S.prototype,"updating",null),e([d({readOnly:!0})],S.prototype,"availability",void 0),S=e([h("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],S);const O=2e3,C=6e5,x=1e6,j=25,w=1;export{S as FeatureServiceTiledFetcher};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.22/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
class o{constructor(o){this.
|
|
5
|
+
class o{constructor(o){this._allocations=new Map,o?Error.stackTraceLimit=1/0:(this.add=()=>{},this.remove=()=>{})}add(o){this._allocations.set(o,(new Error).stack)}remove(o){this._allocations.delete(o)}print(){if(this._allocations.size>0){console.log(`${this._allocations.size} live object allocations:`);const o=new Map;this._allocations.forEach((s=>{var t;o.set(s,(null!=(t=o.get(s))?t:0)+1)})),o.forEach(((o,s)=>{const t=s.split("\n");t.shift(),t.shift(),console.log(`${o}: ${t.shift()}`),t.forEach((o=>console.log(" ",o)))}))}}}export{o as AllocationTracer};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.22/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Accessor.js";import{intersect as i}from"../../core/arrayUtils.js";import s from"../../core/Handles.js";import o from"../../core/Logger.js";import{destroyMaybe as n,isSome as a,unwrap as l}from"../../core/maybe.js";import{createAbortController as r}from"../../core/promiseUtils.js";import{on as d,when as h}from"../../core/watchUtils.js";import{property as c}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import{mayHaveHeightModelInfo as u,deriveHeightModelInfoFromLayer as f}from"../../geometry/support/heightModelInfoUtils.js";import{canProject as g,project as _}from"../../geometry/support/webMercatorUtils.js";var m;const S=o.getLogger("esri.views.support.DefaultsFromMap"),y=10;let I=m=class extends t{constructor(){super(...arguments),this._handles=new s,this._waitTask=null,this._extentProjectController=null,this._spatialReferenceCandidates=null,this._extentCandidates=null,this.logDebugInformation=!1,this.isSpatialReferenceDone=!1,this.isTileInfoDone=!1,this.isHeightModelInfoSearching=!1,this.spatialReference=null,this.extent=null,this.heightModelInfo=null,this.vcsWkid=null,this.latestVcsWkid=null,this.mapCollectionPaths=m.DefaultMapCollectionPaths.slice(),this.tileInfo=null}initialize(){this.watch("mapCollectionPaths",(()=>{this._running&&(this.reset(),this.start())}))}destroy(){this._set("view",null),this._handles=n(this._handles),this._cancelLoading()}get _running(){return!!(this._handles&&this._handles.size>0)}reset(){this._handles.removeAll(),this._set("isSpatialReferenceDone",!1),this._set("isTileInfoDone",!1),this._set("isHeightModelInfoSearching",!1),this._set("spatialReference",null),this._set("extent",null),this._set("heightModelInfo",null),this._set("vcsWkid",null),this._set("latestVcsWkid",null),this._set("tileInfo",null),this._spatialReferenceCandidates=null,this._extentCandidates=null}start(){this._handles.removeAll();const e=this._updateLayerChange.bind(this);for(const t of this.mapCollectionPaths)this._handles.add(d(this.view,`map.${t}`,"change",e,e,e,!0));this._handles.add(h(this,"isSpatialReferenceDone",(()=>this._updateTileInfo()),!0))}_ownerNameFromCollectionName(e){const t=e.lastIndexOf(".");return-1===t?"view":"view."+e.slice(0,t)}_ensureLoadedOwnersFromCollectionName(e){const t=this._ownerNameFromCollectionName(e).split(".");let i;for(let s=0;s<t.length&&(i=this.get(t.slice(0,s+1).join(".")),i);s++)if(i.load&&!i.isFulfilled())return{collectionName:e,owner:null,loading:i.load().catch((()=>{}))};return{collectionName:e,owner:i}}_cancelLoading(){this._waitTask=null,this._extentProjectController&&(this._extentProjectController.abort(),this._extentProjectController=null)}_updateWhen(e){let t=!0,i=!1;const s=e.catch((()=>{})).then((()=>{t?i=!0:s===this._waitTask&&this._update()}));return t=!1,i||(this._waitTask=s),i}_updateLayerChange(){this.isSpatialReferenceDone&&!this.spatialReference&&this._set("isSpatialReferenceDone",!1),this._update()}_update(){if(this._cancelLoading(),this.view){if(!this.isSpatialReferenceDone){this._debugLog("Starting search for spatial reference...");const e=this._processMapCollections((e=>this._processSpatialReferenceSource(e)));if(this._debugLog(`Search ended with status '${R(e)}'`),0!==e){let e=null,t=this._spatialReferenceCandidates;if(!t||t.length<1?(e=this.defaultSpatialReference,this._debugLog(`No spatial reference found, locking to default (${b(e)})`)):(this.defaultSpatialReference&&t.length>1&&t.findIndex((e=>e.equals(this.defaultSpatialReference)))>-1&&(t=[this.defaultSpatialReference]),e=t[0],this._debugLog(`Locking to ${b(e)}`)),this._set("spatialReference",e),e)if(this.extent)this._set("isSpatialReferenceDone",!0);else{const t=this.logDebugInformation;this.logDebugInformation=!1,this._processMapCollections((t=>this._findExtent(t,e))),this.logDebugInformation=t,this._projectExtentCandidate().catch((()=>{})).then((()=>this._set("isSpatialReferenceDone",!0)))}else this._set("isSpatialReferenceDone",!0)}}if(null==this.heightModelInfo&&this.view.isHeightModelInfoRequired){this._debugLog("Starting search for height model info...");const e=this._processMapCollections((e=>this._processHeightModelInfoSource(e)),(e=>u(e)));this._debugLog(`Search ended with status ${R(e)}`),this._set("isHeightModelInfoSearching",0===e)}this._updateTileInfo()}}_processMapCollections(e,t){this._preloadMapCollections(t);let i=2;return this._forAllMapCollectionSources((e=>{if(2!==i)return!1;const{collectionName:t}=e;return this._debugLog(`Processing collection ${t}...`),!(e.loading&&!this._updateWhen(e.loading))||(this._debugLog(`Collection ${e.collectionName} owner is loading -> wait`),i=0,!1)}),(s=>{if(2!==i)return!1;return null!=t&&!t(s)?(this._debugLog(`Source ${s.id} is skipped due to predicate`),!1):!s.load||s.isFulfilled()||this._updateWhen(s.load())?!((!s.load||s.isResolved())&&e(s))||(i=1,!1):(this._debugLog(`Source ${s.id} is loading -> wait`),i=0,!1)})),i}_preloadMapCollections(e){let t=y;const i=this.logDebugInformation;this.logDebugInformation=!1,this._forAllMapCollectionSources((()=>!0),(s=>{if(0===t)return!1;return!(null!=e&&!e(s))&&(s.load&&!s.isFulfilled()&&(this.logDebugInformation=i,this._debugLog(`Pre-loading source ${s.id}`),this.logDebugInformation=!1,s.load().catch((()=>{})),t--),!0)})),this.logDebugInformation=i}_forAllMapCollectionSources(e,t){for(const i of this.mapCollectionPaths){const s=`map.${i}`,o=this._ensureLoadedOwnersFromCollectionName(s);if(!1===e(o))continue;const n=o.owner;if(!n||n.isRejected&&n.isRejected()){this._debugLog(`Collection ${s} owner is invalid or rejected -> skip`);continue}const a=this.view.get(s);a?this._forEachSource(a,t):this._debugLog(`Collection ${s} does not exist -> skip`)}}_forEachSource(e,t){for(const i of e.items)!1!==t(i)&&"layers"in i&&i.layers&&this._forEachSource(i.layers,t)}_processSpatialReferenceSource(e){let t=this._getSupportedSpatialReferences(e);return 0!==t.length&&(this._spatialReferenceCandidates?(t=i(t,this._spatialReferenceCandidates,((e,t)=>e.equals(t))),t.length>0?this._spatialReferenceCandidates=t:this._debugLog(`Layer ${e.id} is ignored because its supported spatial\n references are not compatible with the previous candidates`)):this._spatialReferenceCandidates=t,1===this._spatialReferenceCandidates.length)}_findExtent(e,t){const i="fullExtents"in e&&e.fullExtents||(a(e.fullExtent)?[e.fullExtent]:[]),s=i.find((e=>e.spatialReference.equals(t)));if(s)return this._set("extent",s),!0;if(this._getSupportedSpatialReferences(e).length>0){const t=i.map((t=>({extent:t,layer:e}))),s=this._extentCandidates||[];this._extentCandidates=s.concat(t)}return!1}async _projectExtentCandidate(){if(!this._extentCandidates||!this._extentCandidates.length)return;const e=this.spatialReference,t=this._extentCandidates.find((t=>g(t.extent.spatialReference,e)));if(a(t))this._set("extent",l(_(t.extent,e)));else{const t=this._extentCandidates[0];this._extentProjectController=r();const i=await import("../../portal/support/geometryServiceUtils.js");try{const s=await i.projectGeometry(t.extent,e,t.layer.portalItem,this._extentProjectController.signal);this._set("extent",s)}catch{}this._extentProjectController=null}}_getSupportedSpatialReferences(e){const t="supportedSpatialReferences"in e&&e.supportedSpatialReferences||(e.spatialReference?[e.spatialReference]:[]);if(0===t.length)return this._debugLog(`Layer ${e.id} is ignored because it does not have any spatial references`),[];const i=t.filter((t=>this.view.isSpatialReferenceSupported(t,e,(e=>this._debugLog(e)))));return 0===i.length?this._debugLog(`Layer ${e.id} has spatial references but none of them are supported (or layer doesn't require locking)`):this._debugLog(`Layer ${e.id} has spatial references. Resulting candidate set: ${i.map(b).join(", ")}`),i}_processHeightModelInfoSource(e){const t=f(e);return!!t&&(this._set("heightModelInfo",t),this._set("isHeightModelInfoSearching",!1),e.spatialReference&&(this._set("vcsWkid",e.spatialReference.vcsWkid),this._set("latestVcsWkid",e.spatialReference.latestVcsWkid)),!0)}_updateTileInfo(){if(null!=this.tileInfo)return;if(!this.view.isTileInfoRequired())return void this._set("isTileInfoDone",!0);if(!this.isSpatialReferenceDone)return;const e=this.get("view.map");if(!e)return void this._debugLog("updateTileInfo: no map");const t=e.basemap,i=e.get("layers.0");let s=null;if(t&&"failed"!==t.loadStatus){if(!t.loaded)return this._updateWhen(t.load()),void this._debugLog("updateTileInfo: basemap still loading");const e=t&&t.get("baseLayers.0");if(e&&"failed"!==e.loadStatus){if(!e.loaded)return this._updateWhen(e.load()),void this._debugLog("updateTileInfo: first basemap layer still loading");s="tileInfo"in e&&e.tileInfo}else{if(!i||"failed"===i.loadStatus)return this._debugLog("updateTileInfo: no tileInfo"),void this._set("isTileInfoDone",!0);if(!i.loaded)return this._updateWhen(i.load()),void this._debugLog("updateTileInfo: first operational layer still loading");s="tileInfo"in i&&i.tileInfo}}else if(i&&"failed"!==i.loadStatus){if(!i.loaded)return this._updateWhen(i.load()),void this._debugLog("updateTileInfo: first operational layer still loading");s="tileInfo"in i&&i.tileInfo}s&&!s.spatialReference.equals(this.spatialReference)&&(s=null),this._debugLog(`updateTileInfo: setting ${s}`),this._set("tileInfo",s),this._set("isTileInfoDone",!0)}_debugLog(e){this.logDebugInformation&&S.info(e)}};function b(e){return e?JSON.stringify(e.toJSON()):"undefined"}function R(e){switch(e){case 0:return"Waiting";case 1:return"Found";case 2:return"Exhausted"}}I.DefaultMapCollectionPaths=["basemap.baseLayers","layers","ground.layers","basemap.referenceLayers"],e([c()],I.prototype,"logDebugInformation",void 0),e([c({readOnly:!0})],I.prototype,"isSpatialReferenceDone",void 0),e([c({readOnly:!0})],I.prototype,"isTileInfoDone",void 0),e([c({readOnly:!0})],I.prototype,"isHeightModelInfoSearching",void 0),e([c({constructOnly:!0})],I.prototype,"view",void 0),e([c({readOnly:!0})],I.prototype,"spatialReference",void 0),e([c({readOnly:!0})],I.prototype,"extent",void 0),e([c({readOnly:!0})],I.prototype,"heightModelInfo",void 0),e([c({readOnly:!0})],I.prototype,"vcsWkid",void 0),e([c({readOnly:!0})],I.prototype,"latestVcsWkid",void 0),e([c()],I.prototype,"mapCollectionPaths",void 0),e([c()],I.prototype,"defaultSpatialReference",void 0),e([c({readOnly:!0})],I.prototype,"tileInfo",void 0),I=m=e([p("esri.views.support.DefaultsFromMap")],I);const C=I;export{C as default};
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Accessor.js";import{intersect as i}from"../../core/arrayUtils.js";import s from"../../core/Handles.js";import o from"../../core/Logger.js";import{destroyMaybe as n,isSome as a,unwrap as l}from"../../core/maybe.js";import{on as r,when as d}from"../../core/watchUtils.js";import{property as h}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as c}from"../../core/accessorSupport/decorators/subclass.js";import{mayHaveHeightModelInfo as p,deriveHeightModelInfoFromLayer as u}from"../../geometry/support/heightModelInfoUtils.js";import{canProject as f,project as g}from"../../geometry/support/webMercatorUtils.js";var _;const m=o.getLogger("esri.views.support.DefaultsFromMap"),S=10;let y=_=class extends t{constructor(){super(...arguments),this._handles=new s,this._waitTask=null,this._extentProjectController=null,this._spatialReferenceCandidates=null,this._extentCandidates=null,this.logDebugInformation=!1,this.isSpatialReferenceDone=!1,this.isTileInfoDone=!1,this.isHeightModelInfoSearching=!1,this.spatialReference=null,this.extent=null,this.heightModelInfo=null,this.vcsWkid=null,this.latestVcsWkid=null,this.mapCollectionPaths=_.DefaultMapCollectionPaths.slice(),this.tileInfo=null}initialize(){this.watch("mapCollectionPaths",(()=>{this._running&&(this.reset(),this.start())}))}destroy(){this._set("view",null),this._handles=n(this._handles),this._cancelLoading()}get _running(){return!!(this._handles&&this._handles.size>0)}reset(){this._handles.removeAll(),this._set("isSpatialReferenceDone",!1),this._set("isTileInfoDone",!1),this._set("isHeightModelInfoSearching",!1),this._set("spatialReference",null),this._set("extent",null),this._set("heightModelInfo",null),this._set("vcsWkid",null),this._set("latestVcsWkid",null),this._set("tileInfo",null),this._spatialReferenceCandidates=null,this._extentCandidates=null}start(){this._handles.removeAll();const e=this._updateLayerChange.bind(this);for(const t of this.mapCollectionPaths)this._handles.add(r(this.view,`map.${t}`,"change",e,e,e,!0));this._handles.add(d(this,"isSpatialReferenceDone",(()=>this._updateTileInfo()),!0))}_ownerNameFromCollectionName(e){const t=e.lastIndexOf(".");return-1===t?"view":"view."+e.slice(0,t)}_ensureLoadedOwnersFromCollectionName(e){const t=this._ownerNameFromCollectionName(e).split(".");let i;for(let s=0;s<t.length&&(i=this.get(t.slice(0,s+1).join(".")),i);s++)if(i.load&&!i.isFulfilled())return{collectionName:e,owner:null,loading:i.load().catch((()=>{}))};return{collectionName:e,owner:i}}_cancelLoading(){this._waitTask=null,this._extentProjectController&&(this._extentProjectController.abort(),this._extentProjectController=null)}_updateWhen(e){let t=!0,i=!1;const s=e.catch((()=>{})).then((()=>{t?i=!0:s===this._waitTask&&this._update()}));return t=!1,i||(this._waitTask=s),i}_updateLayerChange(){this.isSpatialReferenceDone&&!this.spatialReference&&this._set("isSpatialReferenceDone",!1),this._update()}_update(){if(this._cancelLoading(),this.view){if(!this.isSpatialReferenceDone){this._debugLog("Starting search for spatial reference...");const e=this._processMapCollections((e=>this._processSpatialReferenceSource(e)));if(this._debugLog(`Search ended with status '${b(e)}'`),0!==e){let e=null,t=this._spatialReferenceCandidates;if(!t||t.length<1?(e=this.defaultSpatialReference,this._debugLog(`No spatial reference found, locking to default (${I(e)})`)):(this.defaultSpatialReference&&t.length>1&&t.findIndex((e=>e.equals(this.defaultSpatialReference)))>-1&&(t=[this.defaultSpatialReference]),e=t[0],this._debugLog(`Locking to ${I(e)}`)),this._set("spatialReference",e),e)if(this.extent)this._set("isSpatialReferenceDone",!0);else{const t=this.logDebugInformation;this.logDebugInformation=!1,this._processMapCollections((t=>this._findExtent(t,e))),this.logDebugInformation=t,this._projectExtentCandidate().catch((()=>{})).then((()=>this._set("isSpatialReferenceDone",!0)))}else this._set("isSpatialReferenceDone",!0)}}if(null==this.heightModelInfo&&this.view.isHeightModelInfoRequired){this._debugLog("Starting search for height model info...");const e=this._processMapCollections((e=>this._processHeightModelInfoSource(e)),(e=>p(e)));this._debugLog(`Search ended with status ${b(e)}`),this._set("isHeightModelInfoSearching",0===e)}this._updateTileInfo()}}_processMapCollections(e,t){this._preloadMapCollections(t);let i=2;return this._forAllMapCollectionSources((e=>{if(2!==i)return!1;const{collectionName:t}=e;return this._debugLog(`Processing collection ${t}...`),!(e.loading&&!this._updateWhen(e.loading))||(this._debugLog(`Collection ${e.collectionName} owner is loading -> wait`),i=0,!1)}),(s=>{if(2!==i)return!1;return null!=t&&!t(s)?(this._debugLog(`Source ${s.id} is skipped due to predicate`),!1):!s.load||s.isFulfilled()||this._updateWhen(s.load())?!((!s.load||s.isResolved())&&e(s))||(i=1,!1):(this._debugLog(`Source ${s.id} is loading -> wait`),i=0,!1)})),i}_preloadMapCollections(e){let t=S;const i=this.logDebugInformation;this.logDebugInformation=!1,this._forAllMapCollectionSources((()=>!0),(s=>{if(0===t)return!1;return!(null!=e&&!e(s))&&(s.load&&!s.isFulfilled()&&(this.logDebugInformation=i,this._debugLog(`Pre-loading source ${s.id}`),this.logDebugInformation=!1,s.load().catch((()=>{})),t--),!0)})),this.logDebugInformation=i}_forAllMapCollectionSources(e,t){for(const i of this.mapCollectionPaths){const s=`map.${i}`,o=this._ensureLoadedOwnersFromCollectionName(s);if(!1===e(o))continue;const n=o.owner;if(!n||n.isRejected&&n.isRejected()){this._debugLog(`Collection ${s} owner is invalid or rejected -> skip`);continue}const a=this.view.get(s);a?this._forEachSource(a,t):this._debugLog(`Collection ${s} does not exist -> skip`)}}_forEachSource(e,t){for(const i of e.items)!1!==t(i)&&"layers"in i&&i.layers&&this._forEachSource(i.layers,t)}_processSpatialReferenceSource(e){let t=this._getSupportedSpatialReferences(e);return 0!==t.length&&(this._spatialReferenceCandidates?(t=i(t,this._spatialReferenceCandidates,((e,t)=>e.equals(t))),t.length>0?this._spatialReferenceCandidates=t:this._debugLog(`Layer ${e.id} is ignored because its supported spatial\n references are not compatible with the previous candidates`)):this._spatialReferenceCandidates=t,1===this._spatialReferenceCandidates.length)}_findExtent(e,t){const i="fullExtents"in e&&e.fullExtents||(a(e.fullExtent)?[e.fullExtent]:[]),s=i.find((e=>e.spatialReference.equals(t)));if(s)return this._set("extent",s),!0;if(this._getSupportedSpatialReferences(e).length>0){const t=i.map((t=>({extent:t,layer:e}))),s=this._extentCandidates||[];this._extentCandidates=s.concat(t)}return!1}async _projectExtentCandidate(){if(!this._extentCandidates||!this._extentCandidates.length)return;const e=this.spatialReference,t=this._extentCandidates.find((t=>f(t.extent.spatialReference,e)));if(a(t))this._set("extent",l(g(t.extent,e)));else{const t=this._extentCandidates[0];this._extentProjectController=new AbortController;const i=await import("../../portal/support/geometryServiceUtils.js");try{const s=await i.projectGeometry(t.extent,e,t.layer.portalItem,this._extentProjectController.signal);this._set("extent",s)}catch{}this._extentProjectController=null}}_getSupportedSpatialReferences(e){const t="supportedSpatialReferences"in e&&e.supportedSpatialReferences||(e.spatialReference?[e.spatialReference]:[]);if(0===t.length)return this._debugLog(`Layer ${e.id} is ignored because it does not have any spatial references`),[];const i=t.filter((t=>this.view.isSpatialReferenceSupported(t,e,(e=>this._debugLog(e)))));return 0===i.length?this._debugLog(`Layer ${e.id} has spatial references but none of them are supported (or layer doesn't require locking)`):this._debugLog(`Layer ${e.id} has spatial references. Resulting candidate set: ${i.map(I).join(", ")}`),i}_processHeightModelInfoSource(e){const t=u(e);return!!t&&(this._set("heightModelInfo",t),this._set("isHeightModelInfoSearching",!1),e.spatialReference&&(this._set("vcsWkid",e.spatialReference.vcsWkid),this._set("latestVcsWkid",e.spatialReference.latestVcsWkid)),!0)}_updateTileInfo(){if(null!=this.tileInfo)return;if(!this.view.isTileInfoRequired())return void this._set("isTileInfoDone",!0);if(!this.isSpatialReferenceDone)return;const e=this.get("view.map");if(!e)return void this._debugLog("updateTileInfo: no map");const t=e.basemap,i=e.get("layers.0");let s=null;if(t&&"failed"!==t.loadStatus){if(!t.loaded)return this._updateWhen(t.load()),void this._debugLog("updateTileInfo: basemap still loading");const e=t&&t.get("baseLayers.0");if(e&&"failed"!==e.loadStatus){if(!e.loaded)return this._updateWhen(e.load()),void this._debugLog("updateTileInfo: first basemap layer still loading");s="tileInfo"in e&&e.tileInfo}else{if(!i||"failed"===i.loadStatus)return this._debugLog("updateTileInfo: no tileInfo"),void this._set("isTileInfoDone",!0);if(!i.loaded)return this._updateWhen(i.load()),void this._debugLog("updateTileInfo: first operational layer still loading");s="tileInfo"in i&&i.tileInfo}}else if(i&&"failed"!==i.loadStatus){if(!i.loaded)return this._updateWhen(i.load()),void this._debugLog("updateTileInfo: first operational layer still loading");s="tileInfo"in i&&i.tileInfo}s&&!s.spatialReference.equals(this.spatialReference)&&(s=null),this._debugLog(`updateTileInfo: setting ${s}`),this._set("tileInfo",s),this._set("isTileInfoDone",!0)}_debugLog(e){this.logDebugInformation&&m.info(e)}};function I(e){return e?JSON.stringify(e.toJSON()):"undefined"}function b(e){switch(e){case 0:return"Waiting";case 1:return"Found";case 2:return"Exhausted"}}y.DefaultMapCollectionPaths=["basemap.baseLayers","layers","ground.layers","basemap.referenceLayers"],e([h()],y.prototype,"logDebugInformation",void 0),e([h({readOnly:!0})],y.prototype,"isSpatialReferenceDone",void 0),e([h({readOnly:!0})],y.prototype,"isTileInfoDone",void 0),e([h({readOnly:!0})],y.prototype,"isHeightModelInfoSearching",void 0),e([h({constructOnly:!0})],y.prototype,"view",void 0),e([h({readOnly:!0})],y.prototype,"spatialReference",void 0),e([h({readOnly:!0})],y.prototype,"extent",void 0),e([h({readOnly:!0})],y.prototype,"heightModelInfo",void 0),e([h({readOnly:!0})],y.prototype,"vcsWkid",void 0),e([h({readOnly:!0})],y.prototype,"latestVcsWkid",void 0),e([h()],y.prototype,"mapCollectionPaths",void 0),e([h()],y.prototype,"defaultSpatialReference",void 0),e([h({readOnly:!0})],y.prototype,"tileInfo",void 0),y=_=e([c("esri.views.support.DefaultsFromMap")],y);const R=y;export{R as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.22/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{isSome as e,isNone as s}from"../../core/maybe.js";import{
|
|
5
|
+
import{isSome as e,isNone as s}from"../../core/maybe.js";import{onAbort as t,onAbortOrThrow as r,createDeferred as i,isPromiseLike as h,createAbortError as o}from"../../core/promiseUtils.js";import c from"../../core/Queue.js";import{schedule as n}from"../../core/scheduling.js";class u{constructor(e,s){this.item=e,this.controller=s,this.promise=null}}class l{constructor(s){this._deferreds=new Map,this._controllers=new Map,this._processingItems=new Map,this._isPaused=!1,this._schedule=null,this._task=null,this.concurrency=1,s.concurrency&&(this.concurrency=s.concurrency),this._queue=new c(s.peeker),this.process=s.process;const t=s.scheduler;s.priority&&e(t)&&(this._task=t.registerTask(s.priority,this))}destroy(){this.clear(),this._schedule&&(this._schedule.remove(),this._schedule=null),this._task&&(this._task.remove(),this._task=null)}get length(){return this._processingItems.size+this._queue.length}abort(e){const s=this._controllers.get(e);s&&s.abort()}clear(){this._queue.clear();const e=[];this._controllers.forEach((s=>e.push(s))),this._controllers.clear(),e.forEach((e=>e.abort())),this._processingItems.clear(),this._cancelNext()}forEach(e){this._deferreds.forEach(((s,t)=>e(t)))}get(e){const s=this._deferreds.get(e);return s?s.promise:void 0}isOngoing(e){return this._processingItems.has(e)}has(e){return this._deferreds.has(e)}pause(){this._isPaused||(this._isPaused=!0,this._cancelNext())}push(s,h){const c=this.get(s);if(c)return c;const n=new AbortController;let u=null;h&&(u=t(h,(()=>n.abort())));const l=()=>{const e=this._processingItems.get(s);e&&e.controller.abort(),_(),a.reject(o())},_=()=>{p.remove(),e(u)&&u.remove(),this._deferreds.delete(s),this._controllers.delete(s),this._queue.remove(s),this._processingItems.delete(s),this._scheduleNext()},p=r(n.signal,l),a=i();return this._deferreds.set(s,a),this._controllers.set(s,n),a.promise.then(_,_),this._queue.push(s),this._scheduleNext(),a.promise}last(){return this._queue.last()}peek(){return this._queue.peek()}popLast(){return this._queue.popLast()}reset(){const e=[];this._processingItems.forEach((s=>e.push(s))),this._processingItems.clear();for(const s of e)this._queue.push(s.item),s.controller.abort();this._scheduleNext()}resume(){this._isPaused&&(this._isPaused=!1,this._scheduleNext())}takeAll(){const e=[];for(;this._queue.length;)e.push(this._queue.pop());return this.clear(),e}get running(){return!this._isPaused&&this._queue.length>0&&this._processingItems.size<this.concurrency}runTask(e){for(;!e.done&&this._queue.length>0&&this._processingItems.size<this.concurrency;)this._process(this._queue.pop()),e.madeProgress()}_scheduleNext(){this._task||this._isPaused||this._schedule||(this._schedule=n((()=>{this._schedule=null,this._next()})))}_next(){for(;this._queue.length>0&&this._processingItems.size<this.concurrency;)this._process(this._queue.pop())}_cancelNext(){this._schedule&&(this._schedule.remove(),this._schedule=null)}_processResult(e,s){this._canProcessFulfillment(e)&&(this._scheduleNext(),this._deferreds.get(e.item).resolve(s))}_processError(e,s){this._canProcessFulfillment(e)&&(this._scheduleNext(),this._deferreds.get(e.item).reject(s))}_canProcessFulfillment(e){return!!this._deferreds.get(e.item)&&this._processingItems.get(e.item)===e}_process(e){if(s(e))return;let t;const r=new AbortController,i=new u(e,r);this._processingItems.set(e,i);try{t=this.process(e,r.signal)}catch(o){this._processError(i,o)}h(t)?(i.promise=t,t.then((e=>this._processResult(i,e)),(e=>this._processError(i,e)))):this._processResult(i,t)}get test(){return{update:e=>this.runTask(e)}}}export{l as QueueProcessor};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.22/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{createDisjointTimerQuery as t}from"./DisjointTimerQuery.js";import{load as e}from"./DrawBuffers.js";import{load as r}from"./Instancing.js";import _ from"./isWebGL2Context.js";import{load as n}from"./LoseContext.js";import{load as
|
|
5
|
+
import{createDisjointTimerQuery as t}from"./DisjointTimerQuery.js";import{load as e}from"./DrawBuffers.js";import{load as r}from"./Instancing.js";import _ from"./isWebGL2Context.js";import{load as n}from"./LoseContext.js";import{load as o}from"./VertexArrayObjects.js";function E(_,E){const s=E.disabledExtensions||{},x=E.debugWebGLExtensions||{};let C,G,A,O,F,B,M,c,D,X,d,g,P=null,L=null,H=null,p=null;return{get drawBuffers(){return d||(d=e(_,s)),d},get instancing(){return C||(C=r(_)),C},get vao(){return G||(G=o(_,s)),G},get compressedTextureETC(){return A||(A=l(_,s)),A},get compressedTextureS3TC(){return O||(O=u(_,s)),O},get textureFilterAnisotropic(){return F||(F=i(_,s)),F},get disjointTimerQuery(){return B||(B=t(_,s)),B},get textureFloat(){return M||(M=a(_,s)),M},get colorBufferFloat(){return c||(c=S(_,s)),c},get blendMinMax(){return D||(D=R(_,s)),D},get depthTexture(){return null===P&&(P=f(_,s,"depthTexture",!0,["WEBGL_depth_texture","MOZ_WEBGL_depth_texture","WEBKIT_WEBGL_depth_texture"])),P},get standardDerivatives(){return null===L&&(L=f(_,s,"standardDerivatives",!0,["OES_standard_derivatives"])),L},get shaderTextureLOD(){return null===H&&(H=f(_,s,"shaderTextureLOD",!0,["EXT_shader_texture_lod"])),H},get fragDepth(){return null===p&&(p=f(_,s,"fragDepth",!0,["EXT_frag_depth"])),p},get loseContext(){return X||(X=n(_,x)),X},get textureNorm16(){return g||(g=T(_,s)),g},enable(t){return this[t]}}}function l(t,e){if(e.compressedTextureETC)return null;const r=t.getExtension("WEBGL_compressed_texture_etc");return r?{COMPRESSED_R11_EAC:r.COMPRESSED_R11_EAC,COMPRESSED_SIGNED_R11_EAC:r.COMPRESSED_SIGNED_R11_EAC,COMPRESSED_RG11_EAC:r.COMPRESSED_RG11_EAC,COMPRESSED_SIGNED_RG11_EAC:r.COMPRESSED_SIGNED_RG11_EAC,COMPRESSED_RGB8_ETC2:r.COMPRESSED_RGB8_ETC2,COMPRESSED_SRGB8_ETC2:r.COMPRESSED_SRGB8_ETC2,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:r.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:r.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,COMPRESSED_RGBA8_ETC2_EAC:r.COMPRESSED_RGBA8_ETC2_EAC,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:r.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}:null}function u(t,e){if(e.compressedTextureS3TC)return null;const r=t.getExtension("WEBGL_compressed_texture_s3tc");return r?{COMPRESSED_RGB_S3TC_DXT1:r.COMPRESSED_RGB_S3TC_DXT1_EXT,COMPRESSED_RGBA_S3TC_DXT1:r.COMPRESSED_RGBA_S3TC_DXT1_EXT,COMPRESSED_RGBA_S3TC_DXT3:r.COMPRESSED_RGBA_S3TC_DXT3_EXT,COMPRESSED_RGBA_S3TC_DXT5:r.COMPRESSED_RGBA_S3TC_DXT5_EXT}:null}function R(t,e){if(_(t))return{MIN:t.MIN,MAX:t.MAX};if(e.blendMinMax)return null;{const e=t.getExtension("EXT_blend_minmax");return e?{MIN:e.MIN_EXT,MAX:e.MAX_EXT}:null}}function i(t,e){if(e.textureFilterAnisotropic)return null;const r=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");return r?{MAX_TEXTURE_MAX_ANISOTROPY:r.MAX_TEXTURE_MAX_ANISOTROPY_EXT,TEXTURE_MAX_ANISOTROPY:r.TEXTURE_MAX_ANISOTROPY_EXT}:null}function a(t,e){if(_(t))return{textureFloat:!0,textureFloatLinear:!e.textureFloatLinear&&!!t.getExtension("OES_texture_float_linear"),textureHalfFloat:!0,textureHalfFloatLinear:!e.textureHalfFloatLinear&&!!t.getExtension("OES_texture_half_float_linear"),HALF_FLOAT:t.HALF_FLOAT};if(t instanceof WebGLRenderingContext){const r=!e.textureHalfFloat&&t.getExtension("OES_texture_half_float");return{textureFloat:!e.textureFloat&&!!t.getExtension("OES_texture_float"),textureFloatLinear:!e.textureFloatLinear&&!!t.getExtension("OES_texture_float_linear"),textureHalfFloat:!!r,textureHalfFloatLinear:!e.textureHalfFloatLinear&&!!t.getExtension("OES_texture_half_float_linear"),HALF_FLOAT:r?r.HALF_FLOAT_OES:void 0}}return null}function S(t,e){if(_(t)){const r=!e.colorBufferFloat&&t.getExtension("EXT_color_buffer_half_float"),_=!e.colorBufferFloat&&t.getExtension("EXT_color_buffer_float"),n=!e.colorBufferFloat&&t.getExtension("EXT_float_blend");return r||_||n?{textureFloat:!!_,textureHalfFloat:!!r,floatBlend:!!n,R16F:t.R16F,RG16F:t.RG16F,RGBA16F:t.RGBA16F,R32F:t.R32F,RG32F:t.RG32F,RGBA32F:t.RGBA32F,R11F_G11F_B10F:t.R11F_G11F_B10F,RGB16F:t.RGB16F}:null}if(t instanceof WebGLRenderingContext){const r=!e.colorBufferFloat&&t.getExtension("EXT_color_buffer_half_float"),_=!e.colorBufferFloat&&t.getExtension("WEBGL_color_buffer_float"),n=!e.colorBufferFloat&&t.getExtension("EXT_float_blend");return r||_||n?{textureFloat:!!_,textureHalfFloat:!!r,floatBlend:!!n,RGBA16F:r?r.RGBA16F_EXT:void 0,RGB16F:r?r.RGB16F_EXT:void 0,RGBA32F:_?_.RGBA32F_EXT:void 0}:null}return null}function f(t,e,r,n,o){if(n&&_(t))return!0;if(e[r])return!1;for(const _ of o)if(t.getExtension(_))return!0;return!1}function T(t,e){if(!_(t))return null;if(e.textureNorm16)return null;const r=t.getExtension("EXT_texture_norm16");return r?{R16:r.R16,RG16:r.RG16,RGB16:r.RGB16,RGBA16:r.RGBA16,R16_SNORM:r.R16_SNORM,RG16_SNORM:r.RG16_SNORM,RGB16_SNORM:r.RGB16_SNORM,RGBA16_SNORM:r.RGBA16_SNORM}:null}export{E as loadCapabilities};
|
package/webscene/Slide.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.22/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import t from"../Basemap.js";import i from"../Viewpoint.js";import{result as n}from"../core/asyncUtils.js";import
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import t from"../Basemap.js";import i from"../Viewpoint.js";import{result as n}from"../core/asyncUtils.js";import o from"../core/Collection.js";import{referenceSetter as s}from"../core/collectionUtils.js";import{JSONSupport as r}from"../core/JSONSupport.js";import{clone as a}from"../core/lang.js";import l from"../core/Logger.js";import{isSome as p}from"../core/maybe.js";import{eachAlways as m,onAbortOrThrow as h,isAbortError as c,all as u}from"../core/promiseUtils.js";import{property as d}from"../core/accessorSupport/decorators/property.js";import{cast as y}from"../core/accessorSupport/decorators/cast.js";import{subclass as g}from"../core/accessorSupport/decorators/subclass.js";import{ensureType as v}from"../core/accessorSupport/ensureType.js";import{h as b}from"../chunks/vec3.js";import{c as w}from"../chunks/vec3f64.js";import f from"../layers/Layer.js";import{isOperationalLayer as L}from"../layers/mixins/OperationalLayer.js";import{ensureType as T,clonePreservingTiledLayers as j}from"../support/basemapUtils.js";import{moduloPositive as _}from"../views/3d/support/mathUtils.js";import{toCamera as C}from"../views/3d/support/viewpointUtils.js";import{TaskPriority as S}from"../views/support/Scheduler.js";import U from"../webdoc/support/Thumbnail.js";import V from"./Lighting.js";import x from"./support/Description.js";import{SlideEnvironment as D}from"./support/SlideEnvironment.js";import E from"./support/SlideGround.js";import I from"./support/SlideVisibleLayer.js";import k from"./support/Title.js";let O=0;const R=o.ofType(I),A=l.getLogger("esri.webscene.Slide");let q=class extends r{constructor(e){super(e),this.id=Date.now().toString(16)+"-slide-"+O++,this.title=new k,this.description=new x,this.thumbnail=new U,this.viewpoint=null,this.basemap=null,this.ground=null,this.environment=new D,this.visibleLayers=new R}destroy(){this.visibleLayers.removeAll(),this.basemap=null,this.thumbnail&&this.thumbnail.destroy(),this.description=null,this.title=null,this.thumbnail=null}castTitle(e){return"string"==typeof e?new k({text:e}):v(k,e)}castDescription(e){return"string"==typeof e?new x({text:e}):v(x,e)}castThumbnail(e){return"string"==typeof e?new U({url:e}):v(U,e)}castBasemap(e){return T(e)}set visibleLayers(e){this._set("visibleLayers",s(e,this._get("visibleLayers"),R))}castVisibleLayers(e){return e&&"function"==typeof e.map?e.map((e=>{if("string"==typeof e)return{id:e};if(e instanceof f){const t=B(e);return{id:e.id,sublayerIds:t}}return e.id?{id:e.id,sublayerIds:e.sublayerIds}:(A.warn('Invalid visible layer, expected { id }, Layer or "id"'),e)})):null}clone(){return new(0,this.constructor)({id:this.id,title:this.title.clone(),thumbnail:this.thumbnail.clone(),description:this.description&&this.description.clone()||null,viewpoint:this.viewpoint&&this.viewpoint.clone()||null,basemap:this.basemap&&this.basemap.clone()||null,ground:this.ground&&this.ground.clone()||null,visibleLayers:this.visibleLayers.clone(),environment:this.environment&&this.environment.clone()||null})}_updateVisibleLayersFrom(e){const t=[];return m(this._getLayers(e.map).map((i=>e.whenLayerView(i).then((e=>{if(e.visible){const n=B(i);t.push(new I({id:e.layer.id,sublayerIds:n}))}})))).toArray()).then((()=>{this.visibleLayers.removeAll(),this.visibleLayers.addMany(t)}))}updateFrom(e,t){return t={screenshot:{format:"png",quality:80,width:120,height:75,disableDecorations:!0,...t&&t.screenshot}},e.when((()=>(this.viewpoint=e.viewpoint.clone(),this.environment.lighting=V.prototype.clone.apply(e.environment.lighting),this.environment.clouds=e.environment.clouds?e.environment.clouds.clone():null,this.basemap=e.map.basemap&&e.map.basemap.clone()||null,this.ground=e.map.ground?E.fromGround(e.map.ground):null,this._updateVisibleLayersFrom(e)))).then((()=>e.takeScreenshot(t.screenshot))).then((e=>(this.thumbnail=new U({url:e.dataUrl}),this)))}async applyTo(e,t){p(this._applyToController)&&this._applyToController.abort();let i=new AbortController;this._applyToController=i;const o=h(t,(()=>i.abort())),s=e.resourceController.scheduler.registerTask(S.SLIDE);let r=!1;t={animate:!0,...t,signal:this._applyToController.signal};const a=async()=>{await u([s.schedule((()=>r=this._setViewpointOfInterest(e,t))),s.schedule((()=>this._applyBasemap(e,t)),t.signal)]),await u([s.schedule((()=>this._applyLayerVisibility(e)),t.signal),s.schedule((()=>this._applyGround(e)),t.signal),s.schedule((()=>this._applyClouds(e)),t.signal),s.schedule((()=>this._applyViewpoint(e,t)),t.signal)])},l=await n(e.addUpdatingPromise(a()));if(r&&(e.contentCamera=null),s.remove(),this._applyToController===i&&(this._applyToController=null),i=null,null==o||o.remove(),!1===l.ok)throw l.error;return this}async _applyBasemap(e,t){if(this.basemap){try{await this.basemap.load(t)}catch(i){if(c(i))throw i}e.map.basemap=j(this.basemap,e.map.basemap)}}_applyGround(e){this.ground&&(e.map.ground=this.ground.cloneAndApplyTo(e.map.ground))}_getLayers(e){const t=new o;return this._collectLayers(e,t),this._collectLayers(e.ground,t),t}_collectLayers(e,t){e.layers.forEach((e=>{L(e)&&(t.add(e),"layers"in e&&this._collectLayers(e,t))}))}_applyLayerVisibility(e){if(!this.visibleLayers)return;this._getLayers(e.map).forEach((e=>{const t=this.visibleLayers.find((t=>t.id===e.id));e.visible=null!=t;const i=t&&t.sublayerIds,n=M(e);i&&n&&n.forEach((e=>e.visible=i.indexOf(e.id)>=0))}))}_setViewpointOfInterest(e,t){if(e.state.fixedContentCamera||!this.viewpoint||t.ignoreViewpoint||!t.useDestinationCamera)return!1;const i=C(e,this.viewpoint);return e.contentCamera=i,p(i)}_applyClouds(e){e.environment.clouds!==this.environment.clouds&&(e.environment.clouds=a(this.environment.clouds))}async _applyViewpoint(e,t){if(this.viewpoint&&!t.ignoreViewpoint){if(p(this.viewpoint.camera)&&(this.viewpoint.camera.fov=e.camera.fov),t.animate&&this.get("environment.lighting.date"))return void await this._animateToLighting(e,t);t.animate&&(e.environment.applyLighting(this.environment.lighting.clone()),await e.goTo(this.viewpoint,t)),e.viewpoint=this.viewpoint}e.environment.applyLighting(this.environment.lighting.clone())}async _animateToLighting(e,t){let i=null;"global"===e.viewingMode&&(i=this._animateLightingWithCamera(e)),e.environment.lighting.cameraTrackingEnabled=!1,e.environment.lighting.directShadowsEnabled=this.environment.lighting.directShadowsEnabled,null!=this.environment.lighting.displayUTCOffset&&(e.environment.lighting.displayUTCOffset=this.environment.lighting.displayUTCOffset);const n=e.goTo(this.viewpoint,t),o=()=>{i&&i.remove(),e.environment.lighting.cameraTrackingEnabled=!0};return n.then((()=>{e.environment.applyLighting(this.environment.lighting.clone()),o()}),(e=>{throw o(),e}))}_getTime(e){return[e.getTime(),3600*e.getUTCHours()+60*e.getUTCMinutes()+e.getUTCSeconds()]}_setTime(e,t,i){return e.setTime(t),e.setUTCHours(i/3600),e.setUTCMinutes(i%3600/60),e.setUTCSeconds(i%3600%60),e}_animateLightingWithCamera(e){const t=new Date(e.environment.lighting.date.toString()),[i,n]=this._getTime(t),[o,s]=this._getTime(this.environment.lighting.date),r=H(n,s),a=e.renderCoordsHelper,l=w();a.toRenderCoords(e.camera.position,l);const m=w(),h=w();p(this.viewpoint.camera)&&a.toRenderCoords(this.viewpoint.camera.position,m);const c=new Date;return e.watch("camera",(t=>{a.toRenderCoords(t.position,h);const s=b(l,h),p=b(m,h);let u=0;s+p!==0&&(u=s/(s+p));const d=i+(o-i)*u,y=N(n,r*u);e.environment.lighting.date=this._setTime(c,d,y)}))}static createFrom(e,t){return(new this).updateFrom(e,t)}};function M(e){if("building-scene"===e.type||"map-image"===e.type)return e.allSublayers.toArray()}function B(e){const t=M(e);if(t)return t.filter((e=>e.visible)).map((e=>e.id))}e([d({type:String,json:{write:{isRequired:!0}}})],q.prototype,"id",void 0),e([d({type:k,json:{default:()=>new k({text:""}),write:{isRequired:!0}}})],q.prototype,"title",void 0),e([y("title")],q.prototype,"castTitle",null),e([d({type:x,json:{write:{overridePolicy:e=>({enabled:!(!e||!e.text)})}}})],q.prototype,"description",void 0),e([y("description")],q.prototype,"castDescription",null),e([d({type:U,json:{default:()=>new U({url:""}),write:{isRequired:!0}}})],q.prototype,"thumbnail",void 0),e([y("thumbnail")],q.prototype,"castThumbnail",null),e([d({type:i,nonNullable:!0,json:{write:{isRequired:!0}}})],q.prototype,"viewpoint",void 0),e([d({type:t,json:{read:{source:"baseMap"},write:{target:"baseMap"}}})],q.prototype,"basemap",void 0),e([y("basemap")],q.prototype,"castBasemap",null),e([d({type:E,json:{write:!0}})],q.prototype,"ground",void 0),e([d({type:R,json:{write:{isRequired:!0}}})],q.prototype,"visibleLayers",null),e([y("visibleLayers")],q.prototype,"castVisibleLayers",null),e([d({type:D,json:{write:!0}})],q.prototype,"environment",void 0),q=e([g("esri.webscene.Slide")],q);const F=86400,G=43200;function H(e,t){let i=t-e;return i>G&&(i-=F),i<-G&&(i+=F),i}function N(e,t){return _(e+t,F)}const P=q;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.22/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import"../../geometry.js";import t from"../../Graphic.js";import"../../intl.js";import"../../symbols.js";import r from"../../core/Handles.js";import{destroyMaybe as s}from"../../core/maybe.js";import{formatDecimal as i,formatImperialArea as o,formatMetricArea as a,formatImperialLength as n,formatMetricLength as l}from"../../core/unitFormatUtils.js";import{convertUnit as m}from"../../core/unitUtils.js";import{init as c}from"../../core/watchUtils.js";import{property as h}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{geodesicDensify as u,planarLength as d,simplify as y,geodesicLength as f,geodesicArea as v,planarArea as _}from"../../geometry/geometryEngine.js";import{isLoaded as g,load as w,project as b
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import"../../geometry.js";import t from"../../Graphic.js";import"../../intl.js";import"../../symbols.js";import r from"../../core/Handles.js";import{destroyMaybe as s}from"../../core/maybe.js";import{formatDecimal as i,formatImperialArea as o,formatMetricArea as a,formatImperialLength as n,formatMetricLength as l}from"../../core/unitFormatUtils.js";import{convertUnit as m}from"../../core/unitUtils.js";import{init as c}from"../../core/watchUtils.js";import{property as h}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{geodesicDensify as u,planarLength as d,simplify as y,geodesicLength as f,geodesicArea as v,planarArea as _}from"../../geometry/geometryEngine.js";import{isLoaded as g,load as w,project as b}from"../../geometry/projection.js";import{isSupported as j,geodesicDensify as S,geodesicLengths as L,geodesicAreas as A}from"../../geometry/support/geodesicUtils.js";import G from"../../layers/GraphicsLayer.js";import k from"../../layers/GroupLayer.js";import q from"../../views/draw/Draw.js";import{createManipulatorDragEventPipeline as x,screenToMap as T,dragGraphic as W}from"../../views/interactive/dragEventPipeline.js";import{GraphicManipulator as R}from"../../views/interactive/GraphicManipulator.js";import{InteractiveToolBase as D}from"../../views/interactive/InteractiveToolBase.js";import{fetchMessageBundle as I}from"../../intl/messages.js";import{onLocaleChange as M}from"../../intl/locale.js";import C from"../../geometry/Point.js";import U from"../../symbols/SimpleFillSymbol.js";import z from"../../symbols/SimpleLineSymbol.js";import E from"../../symbols/TextSymbol.js";import P from"../../symbols/Font.js";import F from"../../symbols/SimpleMarkerSymbol.js";import O from"../../geometry/Polyline.js";import B from"../../geometry/SpatialReference.js";import H from"../../geometry/Polygon.js";const N=1e5;let J=class extends D{constructor(){super(...arguments),this._drawActive=!1,this._handles=new r,this._graphicsLayer=new G,this._manipulatorLayer=new G,this._groupLayer=new k({layers:[this._graphicsLayer,this._manipulatorLayer],listMode:"hide",visible:!1}),this._vertices=[],this.geodesicDistanceThreshold=1e5,this.measurement=null,this.measurementLabel=null}initialize(){I("esri/core/t9n/Units").then((e=>{this.messages=e})),this._handles.add(M((async()=>{this.messages=await I("esri/core/t9n/Units")}))),this.startToolCreation()}destroy(){this._draw=s(this._draw),this._handles=s(this._handles),this._graphicsLayer=s(this._graphicsLayer),this._manipulatorLayer=s(this._manipulatorLayer)}get cursor(){return this._drawActive?"crosshair":null}set editable(e){this._set("editable",e),e||this._draw.reset()}onActivate(){this._drawActive||0!==this._vertices.length||this._startSketch()}onAttach(){const e=this.view;this._draw=new q({view:e}),e.map.add(this._groupLayer),e.focus(),this._handles.add([c(this,["unit","geodesicDistanceThreshold","palette","messages"],(()=>{this._vertices.length>0&&this._updateGraphics()})),c(this,"view.spatialReference",(e=>{X(e)&&!g()&&w()}))]),this.finishToolCreation()}onDetach(){const{map:e}=this.view;this._draw.view=null,this._draw=s(this._draw),e.remove(this._groupLayer),this._handles.removeAll(),this._graphicsLayer.removeAll(),this._manipulatorLayer.removeAll(),this._set("measurement",null),this._set("measurementLabel",null)}onShow(){this._groupLayer.visible=!0}onHide(){this._groupLayer.visible=!1}reset(){this._vertices=[],this._graphicsLayer.removeAll(),this._set("measurement",null),this._set("measurementLabel",null),this._draw.reset(),this._drawActive=!1,this._updateSketch([])}_startSketch(){this._drawActive=!0;const e=this._draw.create("polyline",{mode:"click"});e.on(["vertex-add","vertex-update","vertex-remove","cursor-update","undo","redo"],(e=>this._updateSketch(e.vertices))),e.on("draw-complete",(()=>this._stopSketch()))}_stopSketch(){if(this._vertices.length<3)return this.reset(),void this._startSketch();this.manipulators.forEach((e=>{e.manipulator.interactive=!0})),this._drawActive=!1,this.complete()}_updateSketch(e){if(X(this.view.spatialReference)&&!g())return;if(e.length<2)return this._vertices=[],this.manipulators.removeAll(),void this._graphicsLayer.removeAll();this.finishToolCreation();const t=this.view.spatialReference;for(;this._vertices.length>e.length;){const{manipulatorId:e}=this._vertices.pop();this.manipulators.remove(e)}for(let n=this._vertices.length;n<e.length;n++){const[r,s]=e[n],i=K(new C({x:r,y:s,spatialReference:t}),this.view,this._manipulatorLayer,this.palette),o=this.manipulators.add(i);x(i,((e,t)=>{t.next(T(this.view)).next(W(e.graphic,2)).next((()=>{const t=e.graphic.geometry;this._vertices[n].coord=[t.x,t.y],this._updateGraphics()}))})),this._vertices.push({manipulatorId:o,coord:[r,s]})}const r=this._vertices.length-1,s=this._vertices[r],[i,o]=e[r];if(s.coord[0]!==i||s.coord[1]!==o){s.coord=[i,o];const e=new C({x:i,y:o,spatialReference:t});this.manipulators.findById(s.manipulatorId).graphic.geometry=e}const a=this._drawActive?this._vertices[r].manipulatorId:null;this.manipulators.forEach((e=>{e.manipulator.interactive=null==a||e.id!==a})),this._updateGraphics()}_updateGraphics(){const e=Q(this._vertices.map((e=>e.coord)),this.view.spatialReference,this.geodesicDistanceThreshold);if(!e)return;const{measurement:r,fillGeometry:s,outlineGeometry:i}=e;this._set("measurement",r);const o=r?Y(this.messages,r,this.unit):null;if(this._set("measurementLabel",o),!s&&!i)return;let a,n,l;const{graphics:m}=this._graphicsLayer;if(3===m.length)a=m.getItemAt(0),n=m.getItemAt(1),l=m.getItemAt(2);else{const{fillColor:e,pathColor:r,pathWidth:s}=this.palette;a=new t({symbol:new U({color:e,outline:null})}),n=new t({symbol:new z({color:r,width:s})}),l=new t({symbol:new E({color:[255,255,255,1],font:new P({size:14,family:"sans-serif"}),haloColor:[0,0,0,.5],haloSize:2})}),m.removeAll(),m.addMany([a,n,l])}a.geometry=s,n.geometry=i,l.geometry=null==s?void 0:s.centroid,l.symbol.text=null==o?void 0:o.area}};function K(e,r,s,i){const o=new F({style:"circle",color:i.handleColor,size:i.handleWidth,outline:{type:"simple-line",width:0}}),a=new F({style:"circle",color:i.handleColor,size:1.5*i.handleWidth,outline:{type:"simple-line",width:0}}),n=new t({geometry:e,symbol:o});return new R({view:r,layer:s,graphic:n,focusedSymbol:a})}function Q(e,t,r){if(2===e.length){const s=new O({paths:e,spatialReference:t});let i;if(t.isGeographic)if(j(t))i=S(s,N);else{const e=b(s,B.WGS84),r=S(e,N);i=b(r,t)}else if(t.isWebMercator)i=u(s,N,"meters");else{if(d(s,"meters")>=r){const e=b(s,B.WGS84),r=S(e,N);i=b(r,t)}else i=s}return{measurement:null,fillGeometry:null,outlineGeometry:i}}e.push(e[0]);const s=new O({paths:[e],spatialReference:t}),i=new H({rings:[e],spatialReference:t});let o,a,n=null,l=null;if(t.isGeographic)if(j(t)){if(n=S(s,N),l=S(i,N),l=y(l),!l)return null;o=L([s],"meters")[0],a=A([l],"square-meters")[0]}else{const e=B.WGS84,r=b(s,e),m=b(i,e);if(n=S(r,N),l=S(m,N),l=y(l),!l)return null;o=L([r],"meters")[0],a=A([l],"square-meters")[0],n=b(n,t),l=b(l,t)}else if(t.isWebMercator){if(n=u(s,N,"meters"),l=u(i,N,"meters"),l=y(l),!l)return null;o=f(s,"meters"),a=v(l,"square-meters")}else{const e=d(s,"meters");if(e>=r){const e=B.WGS84,r=b(s,e),m=b(i,e);if(n=S(r,N),l=S(m,N),l=y(l),!l)return null;o=L([r],"meters")[0],a=A([l],"square-meters")[0],n=b(n,t),l=b(l,t)}else{if(n=s,l=y(i),!l)return null;o=e,a=_(l,"square-meters")}}return{measurement:{geometry:l,area:a,perimeter:o},fillGeometry:l,outlineGeometry:n}}function V(e){return null!=e}function X(e){if(!e)return!1;const{isGeographic:t,isWebMercator:r,isWGS84:s}=e;return t&&!s&&!j(e)||!t&&!r}function Y(e,t,r){if(!t||!e)return null;const s={area:null,perimeter:null},{area:c,perimeter:h}=t;switch(r){case"metric":s.area=a(e,c,"square-meters");break;case"imperial":s.area=o(e,c,"square-meters");break;default:{const t=m(c,"square-meters",r);s.area=i(e,t,r);break}}const p=Z(r);if(p)switch(p){case"metric":s.perimeter=l(e,h,"meters");break;case"imperial":s.perimeter=n(e,h,"meters");break;default:{const t=m(h,"meters",p);s.perimeter=i(e,t,p);break}}else s.perimeter="";return s}function Z(e){switch(e){case"metric":case"ares":case"hectares":return"metric";case"imperial":case"acres":return"imperial";case"square-inches":return"inches";case"square-feet":return"feet";case"square-yards":return"yards";case"square-miles":return"miles";case"square-us-feet":return"us-feet";case"square-meters":return"meters";case"square-kilometers":return"kilometers";case"square-millimeters":return"millimeters";case"square-centimeters":return"centimeters";case"square-decimeters":return"decimeters";default:return null}}e([h()],J.prototype,"_drawActive",void 0),e([h()],J.prototype,"cursor",null),e([h({value:!0})],J.prototype,"editable",null),e([h({type:Number})],J.prototype,"geodesicDistanceThreshold",void 0),e([h({readOnly:!0})],J.prototype,"measurement",void 0),e([h({readOnly:!0})],J.prototype,"measurementLabel",void 0),e([h()],J.prototype,"messages",void 0),e([h()],J.prototype,"palette",void 0),e([h()],J.prototype,"unit",void 0),e([h({constructOnly:!0})],J.prototype,"view",void 0),J=e([p("esri.widgets.AreaMeasurement2D.AreaMeasurement2DTool")],J);const $=J;export{Q as createAreaMeasurementInfo2D,Y as createAreaMeasurementLabel,$ as default,V as isSupported};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.22/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../core/Logger.js";import{isSome as s,isNone as i}from"../../core/maybe.js";import{measurementAreaUnits as r}from"../../core/unitUtils.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 n}from"../../core/accessorSupport/decorators/subclass.js";import
|
|
5
|
+
import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../core/Logger.js";import{isSome as s,isNone as i}from"../../core/maybe.js";import{measurementAreaUnits as r}from"../../core/unitUtils.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 n}from"../../core/accessorSupport/decorators/subclass.js";import a from"../../layers/analyses/AreaMeasurement3D.js";import{defaultUnitPropertyMetadata as l}from"../../properties/defaultUnit.js";import u from"../../views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js";import{InteractiveToolViewModel as p}from"../support/InteractiveToolViewModel.js";const d=e.getLogger("esri.widgets.AreaMeasurement3D.AreaMeasurement3DViewModel");let h=class extends p{constructor(t){super(t),this.logger=d,this.supportedViewType="3d",this.unsupportedErrorMessage="AreaMeasurement3DViewModel is only supported in 3D views.",this._userUnitOptions=null,this._userUnit=null,this.ready=!1,this.analysis=new a,this.usesAnalysisLayer=!0}initialize(){s(this.tool)&&(this.tool.unit=this.unit)}destroy(){this.analysis.destroy()}get state(){return this.disabled?"disabled":i(this.tool)?"ready":this.tool.state}get measurement(){if(i(this.tool)||this.disabled||this.tool.destroyed||"pending"===this.tool.toolState)return null;const t=this.tool.measurementView;if("pending"===t.state||"destroyed"===t.state)return null;const e=t.analysisVisualization,s=e.viewData,r=s.measurementData,o=s.validMeasurement,n=1===s.mode,a=0===(n?r.intersectingSegments:r.geodesicIntersectingSegments).size,l=a?o?"available":"unavailable":"invalid";return{mode:n?"euclidean":"geodesic",area:{text:a&&o?e.areaLabel:null,state:l},perimeterLength:{text:a&&o?e.perimeterLengthLabel:null,state:l}}}set unitOptions(t){this._userUnitOptions=t,this._set("unitOptions",this._filteredOrAllUnits(this._userUnitOptions))}get unitOptions(){return this._filteredOrAllUnits(this._userUnitOptions)}set unit(t){this._userUnit=t?this._findSelectableUnit(t,this._userUnit):null,s(this.tool)&&(this.tool.unit=this._userUnit),this.notifyChange("unit")}get unit(){return this._userUnit?(this._userUnit=this._findSelectableUnit(this._userUnit,this.defaultUnit),this._userUnit):this._findSelectableUnit(this.defaultUnit)}start(){return this.createTool()}clear(){this.removeTool()}createToolParams(){return{toolConstructor:u,constructorArguments:()=>({unit:this.unit})}}_findSelectableUnit(t,e){const s=this.unitOptions;return-1!==s.indexOf(t)?t:e?this._findSelectableUnit(e):s[0]}_filteredOrAllUnits(t){if(!t)return r.slice();const e=t.filter((t=>-1!==r.indexOf(t)));return 0===e.length?r.slice():e}async onConnectToAnalysisView(){s(this.view)&&this.view.ready&&(this.ready=!0)}onDisconnectFromAnalysisView(){this.ready=!1}};t([o()],h.prototype,"ready",void 0),t([o({readOnly:!0})],h.prototype,"state",null),t([o({readOnly:!0})],h.prototype,"measurement",null),t([o(l)],h.prototype,"defaultUnit",void 0),t([o()],h.prototype,"unitOptions",null),t([o()],h.prototype,"unit",null),t([o()],h.prototype,"analysis",void 0),h=t([n("esri.widgets.AreaMeasurement3D.AreaMeasurement3DViewModel")],h);const m=h;export{m as default};
|