@arcgis/core 5.0.0-next.30 → 5.0.0-next.32
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/Basemap.js +1 -1
- package/applications/SceneViewer/sceneViewerUtils.d.ts +3 -0
- package/applications/SceneViewer/sceneViewerUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{406d270ae2b3cf9e1f1b.js → 05e55118dc0023d500fc.js} +1 -1
- package/assets/esri/core/workers/chunks/{93fe46be3c7fe34b5361.js → 1432e789aa4cba627337.js} +1 -1
- package/assets/esri/core/workers/chunks/1dd867fa7c58c06b79ea.js +1 -0
- package/assets/esri/core/workers/chunks/{6e9d731cb20307b83ab0.js → 1e55f152b60145f33b61.js} +1 -1
- package/assets/esri/core/workers/chunks/22d66d1c8dfccdbbcf30.js +1 -0
- package/assets/esri/core/workers/chunks/27bd88e1101873d4ce12.js +1 -0
- package/assets/esri/core/workers/chunks/{5f2cf73fb2944f82661d.js → 433d249c35c56bf15806.js} +34 -34
- package/assets/esri/core/workers/chunks/444026d1938c1078ca97.js +1 -0
- package/assets/esri/core/workers/chunks/{a425ffec91d07bbfeb80.js → 565358ea8d1bdc4d1ebc.js} +1 -1
- package/assets/esri/core/workers/chunks/{b2fbb44e219232e61cbd.js → 794960ec36e11f4416c2.js} +1 -1
- package/assets/esri/core/workers/chunks/{0bfb7db0a151a5e85dd1.js → 8ad6595ad44c2d60c1ce.js} +1 -1
- package/assets/esri/core/workers/chunks/{11bb437437272d8f3e2c.js → 9252854b512237b6a0ef.js} +1 -1
- package/assets/esri/core/workers/chunks/{e615983fab688d515205.js → 944dfa9309da8f49a616.js} +1 -1
- package/assets/esri/core/workers/chunks/{f2f4e34247882eceb50d.js → a2cee5ac0d4df0108425.js} +3 -3
- package/assets/esri/core/workers/chunks/a4b7ba8aec109beb5b4d.js +1 -0
- package/assets/esri/core/workers/chunks/{d769c1b18e2710e0388b.js → a6324f5f560ffadc6e5d.js} +1 -1
- package/assets/esri/core/workers/chunks/{a091623bbfb3d771c8d8.js → d8db2c51b2fb42f37b2a.js} +1 -1
- package/assets/esri/core/workers/chunks/da517b4b07d4d27ce94c.js +1 -0
- package/assets/esri/core/workers/chunks/{984bb0943d07c86b7e77.js → ded3ef385d5a3a2ec8ca.js} +1 -1
- package/assets/esri/core/workers/chunks/defc6b50df5018bd9e86.js +1 -0
- package/assets/esri/core/workers/chunks/ed1dabed10ff9f4e0369.js +1 -0
- package/assets/esri/core/workers/chunks/{14dc21fe66c7b98fb456.js → f3127bdf28a1d9b8db27.js} +1 -1
- package/assets/esri/core/workers/chunks/fee942ef802a162e0248.js +1 -0
- package/assets/esri/themes/base/widgets/_Attribution.scss +8 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/BlendLayers.glsl.js +1 -1
- package/config.js +1 -1
- package/core/Message.js +1 -1
- package/core/deprecate.js +1 -1
- package/core/keyboard.js +5 -0
- package/geometry/Circle.js +1 -1
- package/geometry/Extent.js +1 -1
- package/geometry/geodesicUtils.js +5 -0
- package/geometry/support/geodesicUtils.js +1 -1
- package/interfaces.d.ts +482 -190
- package/kernel.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/graphics/OptimizedGeometry.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/knowledgeGraph/SessionMemoryStorage.js +1 -1
- package/layers/support/BuildingFilterBlock.js +1 -1
- package/package.json +2 -2
- package/rest/support/QueryMixin.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/analysis/AreaMeasurement/AreaMeasurementController.js +1 -1
- package/views/2d/analysis/DistanceMeasurement/DistanceMeasurementController.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/SymbolRepository.js +1 -1
- package/views/2d/engine/vectorTiles/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/grid/gridUtils.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/OGCFeatureLayerView2D.js +1 -1
- package/views/2d/layers/StreamLayerView2D.js +1 -1
- package/views/3d/GroundView3D.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/environment/SceneViewEnvironment.js +1 -1
- package/views/3d/interactive/editingTools/reshape/edgeOffsetUtils.js +1 -1
- package/views/3d/layers/DimensionLayerView3D.js +1 -1
- package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/ImageryLayerView3D.js +1 -1
- package/views/3d/layers/LineOfSightLayerView3D.js +1 -1
- package/views/3d/layers/MediaLayerView3D.js +1 -1
- package/views/3d/layers/OGCFeatureLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/StreamLayerView3D.js +1 -1
- package/views/3d/layers/ViewshedLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DElevationAlignment.js +1 -1
- package/views/3d/layers/graphics/LabelDeconflictor.js +1 -1
- package/views/3d/layers/i3s/I3SOverrides.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
- package/views/3d/support/Attribution3D.js +5 -0
- package/views/3d/terrain/TileBlendTechniqueConfiguration.js +1 -1
- package/views/3d/terrain/TileCompositor.js +1 -1
- package/views/3d/terrain/TileRenderer.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileBackground.glsl.js +4 -4
- package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/AdjustProjectedPosition.glsl.js +4 -4
- package/views/Attribution.js +5 -0
- package/views/DOMContainer.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/View.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileGeometryUtils.js +1 -1
- package/views/draw/support/managers/DrawTooltipManager.js +5 -0
- package/views/interactive/sketch/constraintUtils.js +1 -1
- package/views/interactive/sketch/constraints.js +1 -1
- package/views/interactive/tooltip/content/TooltipContentDynamic.js +5 -0
- package/views/interactive/tooltip/content/tooltipContentFactory.js +1 -1
- package/views/interactive/tooltip/fields/TooltipField.js +1 -1
- package/views/interactive/tooltip/infos/DynamicTooltipInfo.js +5 -0
- package/views/layers/DimensionLayerView.js +1 -1
- package/views/layers/DimensionLayerViewMixin.js +5 -0
- package/views/layers/FeatureLayerView.js +1 -1
- package/views/layers/FeatureLayerViewMixin.d.ts +2 -2
- package/views/layers/FeatureLayerViewMixin.js +5 -0
- package/views/layers/ImageryLayerView.js +1 -1
- package/views/layers/ImageryLayerViewMixin.js +5 -0
- package/views/layers/LayerView.js +1 -1
- package/views/layers/LineOfSightLayerView.js +1 -1
- package/views/layers/LineOfSightLayerViewMixin.js +5 -0
- package/views/layers/MediaLayerView.js +1 -1
- package/views/layers/MediaLayerViewMixin.js +5 -0
- package/views/layers/OGCFeatureLayerView.js +1 -1
- package/views/layers/PointCloudLayerView.js +1 -1
- package/views/layers/StreamLayerView.js +1 -1
- package/views/layers/ViewshedLayerView.js +1 -1
- package/views/layers/ViewshedLayerViewMixin.js +5 -0
- package/views/support/AttributionItem.d.ts +4 -0
- package/views/support/AttributionItem.js +5 -0
- package/views/support/LayerLayerViewInfo.js +1 -1
- package/views/support/LayerViewManager.js +1 -1
- package/views/support/PromiseQueue.js +1 -1
- package/views/support/angularMeasurementUtils.js +1 -1
- package/views/support/attributionUtils.js +5 -0
- package/views/support/drapedUtils.js +1 -1
- package/views/support/geodesicAreaMeasurementUtils.js +1 -1
- package/views/support/geodesicLengthMeasurementUtils.js +1 -1
- package/views/support/geodesicMeasurementUtils.js +1 -1
- package/views/ui/2d/DefaultUI2D.js +1 -1
- package/views/ui/3d/DefaultUI3D.js +1 -1
- package/webscene/Environment.js +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
- package/widgets/Attribution/AttributionViewModel.js +1 -1
- package/widgets/Attribution.js +1 -1
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileLine.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileViewModel.js +1 -1
- package/widgets/ElevationProfile/support/geometryUtils.js +1 -1
- package/widgets/ElevationProfile.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
- package/widgets/PanoramicViewer/PanoramicVideoViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
- package/widgets/Popup.js +1 -1
- package/widgets/ScaleBar/ScaleBarViewModel.js +1 -1
- package/widgets/Sketch/support/ResponsiveToolbar/ResponsiveToolbar.js +1 -1
- package/widgets/Widget.js +1 -1
- package/widgets/support/decorators/accessibleHandler.js +1 -1
- package/widgets/support/forms/expressions/FormExpressionArcadeExecutor.js +1 -1
- package/widgets/support/jsxWidgetSupport.js +1 -1
- package/widgets/support/widget.js +1 -1
- package/widgets/support/widgetUtils.js +1 -1
- package/assets/esri/core/workers/chunks/25143b919e75d5d2da05.js +0 -1
- package/assets/esri/core/workers/chunks/2d17ed5321ca05acb8e3.js +0 -1
- package/assets/esri/core/workers/chunks/447b53a9280b2b19b7a6.js +0 -1
- package/assets/esri/core/workers/chunks/6ce7ca6bebdc61d8eada.js +0 -1
- package/assets/esri/core/workers/chunks/8fbda0b85731ac77e1d8.js +0 -1
- package/assets/esri/core/workers/chunks/98c32d10a2344cd7a50b.js +0 -1
- package/assets/esri/core/workers/chunks/b66e41d626a7d1b81d48.js +0 -1
- package/assets/esri/core/workers/chunks/d5b464ff83ce29b51968.js +0 -1
- package/assets/esri/core/workers/chunks/d777d7cb8df3f21ac97e.js +0 -1
- package/layers/support/attributionUtils.js +0 -5
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/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import t from"../Camera.js";import i from"../Viewpoint.js";import r from"../core/Collection.js";import{byId as s}from"../core/domUtils.js";import n from"../core/Error.js";import{on as a}from"../core/events.js";import{makeHandle as o}from"../core/handleUtils.js";import has from"../core/has.js";import l from"../core/Logger.js";import{destroyMaybe as p,maybeProperty as h}from"../core/maybe.js";import{throwIfDestroyed as d,throwIfAborted as u,createAbortError as c}from"../core/promiseUtils.js";import g from"../core/ReactiveSet.js";import{on as m,watch as y,initial as f,sync as w,whenOnce as v,syncAndInitial as _}from"../core/reactiveUtils.js";import{setFrameDuration as b,cleanupScheduling as M}from"../core/scheduling.js";import{createScreenPointArray as S,createScreenPoint as V}from"../core/screenUtils.js";import{cleanupWhereClauseCache as j}from"../core/sql.js";import{getMetersPerUnitForSR as C}from"../core/units.js";import{property as T,cast as R,subclass as x}from"../core/accessorSupport/decorators.js";import{ensureType as O,ensureClass as A}from"../core/accessorSupport/ensureType.js";import{overrideDefaultsFrom as E}from"../core/accessorSupport/overrideDefaultsFrom.js";import{drainNotificationQueue as L}from"../core/accessorSupport/trackingUtils.js";import{create as H}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{cleanupPooledRBush as I}from"../core/libs/rbush/PooledRBush.js";import{owningCollectionProperty as P}from"../core/support/OwningCollection.js";import{initialize as F}from"../core/workers/workers.js";import D from"../geometry/Extent.js";import U from"../geometry/HeightModelInfo.js";import G from"../geometry/Point.js";import{project as W,canProjectWithoutEngine as q}from"../geometry/projectionUtils.js";import z from"../geometry/SpatialReference.js";import{cleanupSpatialReferenceEllipsoidUtils as k}from"../geometry/spatialReferenceEllipsoidUtils.js";import{projectBoundingRect as B}from"../geometry/projection/projectBoundingRect.js";import{projectPointToVector as N}from"../geometry/projection/projectPointToVector.js";import{toExtent as Q,create as Y}from"../geometry/support/aaBoundingRect.js";import{renderSRFromViewSR as Z}from"../geometry/support/coordinateSystem.js";import{getResolutionForScale as $}from"../geometry/support/scaleUtils.js";import{makeDehydratedPoint as J}from"../layers/graphics/dehydratedPoint.js";import{isImageryTileLayer as K,isTiledLayer as X,isVoxelLayer as ee,isIntegratedMeshLayer as te}from"../layers/support/layerUtils.js";import{TilemapCache as ie}from"../layers/support/TilemapCache.js";import{clearDefaultPortalInstance as re}from"../portal/portalDefault.js";import{AnalysesCollection as se}from"../support/AnalysesCollection.js";import{WebSceneTag as ne}from"../support/tagSymbols.js";import{BreakpointsOwner as ae}from"./BreakpointsOwner.js";import{DOMContainer as oe}from"./DOMContainer.js";import{PopupView as le}from"./PopupView.js";import pe from"./View.js";import he from"./ViewAnimation.js";import{stringFromViewingMode as de,viewingModeFromString as ue}from"./ViewingMode.js";import{GroundView3D as ce}from"./3d/GroundView3D.js";import{layerView3DImporter as ge}from"./3d/layerViewModuleImportUtils.js";import{importAnalysisViewModule as me}from"./3d/analysis/analysisViewModuleImportUtils.js";import{cleanupIntersectionUtils as ye}from"./3d/camera/intersectionUtils.js";import{Constraints as fe}from"./3d/constraints/Constraints.js";import{EnvironmentManager as we}from"./3d/environment/EnvironmentManager.js";import ve from"./3d/environment/SceneViewEnvironment.js";import _e from"./3d/input/SceneInputManager.js";import{GraphicsDeconflictor as be}from"./3d/layers/graphics/GraphicsDeconflictor.js";import{Labeler as Me}from"./3d/layers/graphics/Labeler.js";import Se from"./3d/layers/i3s/I3SLodHandling.js";import{cleanupStageLayerElevationProvider as Ve}from"./3d/layers/support/StageLayerElevationProvider.js";import{ScreenSizePerspective as je}from"./3d/state/ScreenSizePerspective.js";import Ce from"./3d/state/ViewState.js";import{ViewStateManager as Te,cleanupViewStateManager as Re}from"./3d/state/ViewStateManager.js";import{cleanupPointToPointAnimationController as xe}from"./3d/state/controllers/PointToPointAnimationController.js";import{SceneIntersectionHelper as Oe}from"./3d/state/helpers/SceneIntersectionHelper.js";import{cleanupNavigationUtils as Ae}from"./3d/state/utils/navigationUtils.js";import{CombinedElevationProvider as Ee}from"./3d/support/CombinedElevationProvider.js";import{debugFlags as Le}from"./3d/support/debugFlags.js";import{getElevationAtPoint as He}from"./3d/support/ElevationProvider.js";import{toMap as Ie,hitTest as Pe}from"./3d/support/hitTest.js";import{popupHitTest as Fe}from"./3d/support/popupHitTest.js";import{getQualityProfileSettings as De,getDefaultQualityProfileName as Ue}from"./3d/support/QualityProfile.js";import Ge from"./3d/support/QualitySettings.js";import{RenderCoordsHelper as We}from"./3d/support/RenderCoordsHelper.js";import{newResourceController as qe}from"./3d/support/ResourceController.js";import ze from"./3d/support/SceneViewPerformanceInfo.js";import{SharedSymbolResources as ke}from"./3d/support/SharedSymbolResources.js";import{ViewSlice as Be}from"./3d/support/ViewSlice.js";import{PointsOfInterest as Ne}from"./3d/support/pointsOfInterest/PointsOfInterest.js";import Qe from"./3d/terrain/TerrainSurface.js";import{isSurfaceLayerView as Ye,getTiledLayerInfo as Ze,checkIfTileInfoSupportedForView as $e}from"./3d/terrain/terrainUtils.js";import{clearTilePerLayerInfo as Je}from"./3d/terrain/TilePerLayerInfo.js";import{cleanupTileRenderer as Ke}from"./3d/terrain/TileRenderer.js";import{Stage as Xe}from"./3d/webgl-engine/Stage.js";import{olidEnabled as et}from"./3d/webgl-engine/effects/geometry/olidUtils.js";import{cleanupRenderOccluded as tt}from"./3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js";import{defaultTolerance as it}from"./3d/webgl-engine/lib/Intersector.js";import{cleanupShadowmap as rt}from"./3d/webgl-engine/lib/ShadowMap.js";import{terrainId as st}from"./3d/webgl-engine/lib/verticalOffsetUtils.js";import{cleanupEdgeProcessing as nt}from"./3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js";import at from"./support/AnalysisViewManager.js";import{cleanupDrapedUtils as ot}from"./support/drapedUtils.js";import{defaultHighlightName as lt}from"./support/HighlightDefaults.js";import pt from"./support/HighlightOptions.js";import{occludeesSupported as ht}from"./support/layerViewUtils.js";import{isSupportedScreenPointEvent as dt,createScreenPointFromSupportedEvent as ut}from"./support/screenUtils.js";import{isSpatialReferenceSupported as ct}from"./support/spatialReferenceSupport.js";import{initializeTextureCompressionWorker as gt,destroyTextureCompressionWorker as mt}from"./support/TextureCompressionHelper.js";import{check as yt}from"./support/WebGLRequirements.js";import ft from"./ui/DefaultUI.js";import wt from"./ui/3d/DefaultUI3D.js";import vt from"../webscene/Environment.js";import{clearVNodeCache as _t}from"../widgets/support/vnodeCache.js";var bt;const Mt=Symbol(),St=Symbol();let Vt=class extends(ae(le(oe(pe)))){static{bt=this}constructor(e){super(e),this._userClippingArea=null,this._clippingArea=null,this._initialDefaultSpatialReference=null,this._overrideDefaultEnvironmentOnly=!0,this._resolveWhenReady=[],this._resourceController=qe(this),this.deconflictor=new be({view:this}),this.labeler=new Me({view:this,deconflictor:this.deconflictor.labels}),this.sharedSymbolResources=null,this.analyses=new se,this.basemapTerrain=null,this.elevationProvider=new Ee({view:this}),this._canvas=null,this.constraints=new fe,this._environment=new ve,this.environmentManager=new we,this.floors=new r,this.fullOpacity=1,this.graphicsView=null,this.analysisViewManager=new at({importAnalysisViewModule:e=>me(e),view:this}),this.groundView=null,this.map=null,this._featureTileTreeClients=new g,this._featureTiles=null,this._featureTreeDebugger=null,this.state=new Ce({view:this}),this.slice=new Be,this.spatialReference=null,this.preserveDrawingBufferEnabled=!1,this.supersampleScreenshotsEnabled=!0,this.type="3d",this.ui=new wt,this._numUpdating=0,this._lastUpdateTime=0,this.updatingProgress=.5,this._importControllers=new Map,F();const t=(e=null)=>{null!=e&&4===e.type||(this._updatingChanged(),this.map?.allLayers.forEach(async e=>{try{await e.when()}catch(t){}this._updatingChanged()}))};this.addHandles([m(()=>this.map?.allLayers,"after-changes",e=>t(e),{onListenerAdd:()=>t(),onListenerRemove:()=>t(),sync:!0}),this.allLayerViews.on("after-changes",e=>this._updateUpdatingMonitors(e)),y(()=>this.scene,e=>e?.load().catch(()=>{}))]),this.inputManager=new _e({view:this}),this.stateManager=new Te({view:this}),this.screenSizePerspective=new je({view:this})}initialize(){if(has("enable-feature:esri-compress-textures")&&has("wasm-simd")){const e=gt(this,this.resourceController);this.addResolvingPromise(e.promise)}this.groundView=new ce({view:this}),this._updateUpdatingMonitors(),this.updatingHandles.add(()=>this.qualitySettings.memoryLimit,e=>{this.resourceController&&(this.resourceController.memoryController.maxMemory=e)},f),this.updatingHandles.add(()=>this.qualitySettings.additionalCacheMemory,e=>{this.resourceController&&(this.resourceController.memoryController.additionalCacheMemory=e)},f),this.updatingHandles.add(()=>this.qualitySettings.frameRate??0,e=>b(e>0?1e3/Math.ceil(e):0),f),this.addHandles([y(()=>this.spatialReference,()=>this.notifyChange("clippingArea"),w),y(()=>({plane:this.slice.plane,isDecoration:this.slice.isDecoration}),()=>this._updateSlice(),w)])}destroy(){this.destroyed||(mt(this),this.updatingHandles.removeAll(),this.basemapTerrain?.clearHandles(),this.elevationProvider.destroy(),this.ui.removeAllHandles(),this.layerViewManager.clearHandles(),this.invalidate(),this.activeTool=null,this.layerViewManager.clear(),this._set("analysisViewManager",p(this.analysisViewManager)),this._exitSurface(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this.sharedSymbolResources=p(this.sharedSymbolResources),this._set("labeler",p(this.labeler)),this._set("deconflictor",p(this.deconflictor)),this._resourceController=p(this._resourceController),this._set("stateManager",p(this.stateManager)),this._set("inputManager",p(this.inputManager)),this.state.destroy(),this.highlights.destroy(),this.removeHandles("updatingMonitors"),this._set("environmentManager",p(this.environmentManager)),this._set("environment",p(this.environment)),this.groundView=p(this.groundView),this.slice.destroy(),this._updatingObjectsWithProgress.length=0,this._updatingObjects.length=0,this.ui?.destroy(),this._set("ui",null),this._set("renderCanvas",null),this._set("canvas",null),this._canvas=null,this.screenSizePerspective.destroy())}get stage(){return this._stage}get renderSpatialReference(){return this.renderCoordsHelper?.spatialReference}get basemapSpatialReference(){return this.basemapTerrain?.spatialReference}get animation(){return this.state?.animation}get overlayManager(){return this.basemapTerrain?.overlayManager}get camera(){return this.stateManager?.camera}set camera(e){this.stateManager&&(this.stateManager.camera=e)}get contentCamera(){return this.stateManager?.contentCamera}set contentCamera(e){this.stateManager&&(this.stateManager.contentCamera=e)}installContentCameraReset(e={sticky:!1}){return this.stateManager.installContentCameraReset(e)}get canvas(){return this._canvas}get center(){return this.stateManager?.center}set center(e){this.stateManager&&(this.stateManager.center=O(G,e))}get clippingArea(){if("global"===this.viewingMode)return null;const e=this.map;let t=this._userClippingArea||h(e,"clippingArea");return!this._userClippingArea&&!h(e,"clippingEnabled")||null==t?(this._clippingArea=null,null):t instanceof D?this.spatialReference&&(t=jt(t,this.spatialReference),null==t)?(l.getLogger(this).error("#clippingArea","setting clippingArea with incompatible SpatialReference"),this._clippingArea):(t=t.clone(),null==t.intersection(this._groundAndLayersExtent)&&(t.xmin=t.xmax,t.ymin=t.ymax),t.zmin=void 0,t.zmax=void 0,t.equals(this._clippingArea)||(this._clippingArea=t),this._clippingArea):(l.getLogger(this).error("#clippingArea","only clippingArea geometries of type Extent are supported"),this._clippingArea)}set clippingArea(e){this.ready&&"global"===this.viewingMode&&null!=e?l.getLogger(this).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 null==t||null==e||t.spatialReference.equals(e)?t:jt(t,e)}get tileInfo(){return this.basemapTerrain?.tilingScheme?.toTileInfo()}get dataExtent(){let e=this._groundAndLayersExtent;const t=this.spatialReference||z.WGS84,i=jt(this.clippingArea,t);null!=i&&(e=null!=e?e.intersection(i):i);const r=this._get("dataExtent");return null!=e&&e.equals(r)?r:e}get _groundAndLayersExtent(){const e=this.spatialReference||z.WGS84;let t;const i=i=>{const r=jt(i,e);null!=r&&(null!=t?t.union(r):t=r.clone())},{basemapTerrain:r}=this;if(r?.spatialReference){const e=r.groundExtent;i(new D({xmin:e[0],ymin:e[1],zmin:0,xmax:e[2],ymax:e[3],zmax:0,spatialReference:r.spatialReference}))}const s=e=>{null==e.fullExtent||"graphics"===e.type&&e.internal||i(e.fullExtent)};if(this.map?.allLayers.forEach(e=>s(e)),null==t)return null;t.hasZ?(t.zmin=Math.min(0,t.zmin??0),t.zmax=Math.max(0,t.zmax??0)):(t.zmin=0,t.zmax=0);const n=this._get("_groundAndLayersExtent");return t.equals(n)?n:t}get environment(){return this._environment}set environment(e){if(this._environment===e)return;const{_environment:t}=this;this._environment=null,t?.destroy(),this._environment=e,this.notifyChange("environment")}castEnvironment(e){return e?e instanceof ve?e:e instanceof vt?this.environment?.cloneWithWebsceneEnvironment(e)??ve.fromWebsceneEnvironment(e):O(ve,e):new ve}get extent(){return this.stateManager?.extent}set extent(e){this.stateManager&&(this.stateManager.extent=e)}get screenCenter(){return this.stateManager?.screenCenter}get frustum(){return this.stateManager?.frustum}get layerviewCollections(){return[this.basemapView?.baseLayerViews,this.basemapView?.groundLayerViews,this.groundView?.layerViews,this.layerViews,this.basemapView?.referenceLayerViews]}get _layerToLayerviewMapping(){return bt._layerToLayerview}static{this._layerToLayerview=pe._layerToLayerview.concat([["view.map.ground.layers","view.groundView.layerViews"]])}get initialExtentRequired(){return this.stateManager&&!this.stateManager.hasInitialView}get defaultsFromMapSettings(){return{required:{tileInfo:!1,heightModelInfo:!0,extent:!1}}}get interacting(){return this.navigating||(this.toolViewManager?.interacting??!1)}get stationary(){return!this.animation&&!this.resizing&&(this.state?.stationary??!0)}get navigating(){return this.state?.navigating??!1}get scene(){return this.map&&ne in this.map?this.map:null}get padding(){return this.stateManager?.padding}set padding(e){this.stateManager&&(this.stateManager.padding=e)}get featureTiles(){return this._featureTiles}set qualityProfile(e){const t=De(e);t&&this._get("qualityProfile")!==e&&(this.qualitySettings=new Ge(t),this.stage?.renderView.updateQualitySettings(this.qualitySettings),this._set("qualityProfile",e))}get qualityProfile(){return this._get("qualityProfile")||Ue()}_updateSlice(){null!=this.stage&&(this.stage.renderer.slice=this.slice)}get typeSpecificPreconditionsReady(){return!!this.viewingMode&&!!this.stateManager?.preinit(this.spatialReference)}get resolution(){return null!=this.spatialReference?$(this.scale,this.spatialReference):0}get scale(){return this.stateManager?.scale}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get terrainLevel(){const e=this.basemapTerrain?.tilingScheme,t=this.scale;if(!e||!t)return null;const i=e.levelAtScale(t)+this.qualitySettings.tiledSurface.lodBias,r=e.getMaxLod();return i<=0?null:Math.max(0,Math.min(i,r||1/0))}get heightModelInfo(){const e=this.getDefaultHeightModelInfo();return null!=e?U.deriveUnitFromSR(e,this.spatialReference):null}get alphaCompositingEnabled(){return this._get("alphaCompositingEnabled")}set alphaCompositingEnabled(e){this._stage&&l.getLogger(this).warn("alphaCompositingEnabled cannot be changed after the view has become ready"),this._set("alphaCompositingEnabled",e)}get updating(){if(this.destroying||this.destroyed)return!1;let e=0,t=this.layerViewManager.updating,i=t?this.layerViewManager.updatingRemaining:0;this.allLayerViews.forEach(r=>{if(r.isFulfilled()){if(r.updating){if(t=!0,r.suspended||Ye(r))return;++i,e+=r.updatingProgress}}else++i});for(const s of this._updatingObjects)if(null!=s&&s.updating){const t=.1;i+=t,e+=.5*t}for(const s of this._updatingObjectsWithProgress)null!=s&&s.updating&&(++i,e+=s.updatingProgress);const r=!this.stateManager.test.updatingIgnoreRenderState&&this.state.updating;if(t=!!(t||i>0||this.updatingHandles.updating||!this.ready||!this.stationary||r||this._importControllers.size>0||this.inputManager?.updating||this.map?.allLayers?.some(e=>!e.isFulfilled())),t?(this._numUpdating=Math.max(i,this._numUpdating),e+=this._numUpdating-i):this._numUpdating=0,this._numUpdating>0?e/=this._numUpdating:e=t?0:1,this._get("updatingProgress")!==e){const i=performance.now();if(e<1){const t=Math.min((i-this._lastUpdateTime)/2e3,1);e=this.updatingProgress*(1-t)+e*t}this._set("updatingProgress",e),this._lastUpdateTime=t&&e<1?i:0}return t}get _updatingObjects(){return[this.graphicsView,this.basemapView,this._resourceController,this.stage,this.featureTiles,this.pointsOfInterest,this.environmentManager,this.overlay,this._featureTreeDebugger,this.toolViewManager,this.analysisViewManager]}get _updatingObjectsWithProgress(){return[this.deconflictor,this.labeler,this.basemapTerrain]}get viewingMode(){const e=this._predeterminedViewingMode;if(null!=e)return de(e);const t=this.spatialReference;return t?null!=this.defaultsFromMap?.viewingMode&&t.equals(this.defaultsFromMap.spatialReference)?de(this.defaultsFromMap.viewingMode):ct(t,1)?"global":"local":"global"}set viewingMode(e){this.ready?l.getLogger(this).error("#viewingMode","viewingMode cannot be set once view is ready"):this._overrideIfSome("viewingMode",e)}get viewpoint(){return this.stateManager?.viewpoint}set viewpoint(e){this.stateManager&&(this.stateManager.viewpoint=e)}get visibleArea(){return this.stateManager?.visibleArea}get zoom(){return this.stateManager.zoom}set zoom(e){this.stateManager&&(this.stateManager.zoom=e)}get highlightOptions(){return this.highlights.find(({name:e})=>e===lt)??new pt}set highlightOptions(e){for(let t=0;t<this.highlights.length;++t){if(this.highlights.at(t).name===lt)return void this.highlights.items[t].assignFrom(e)}}get resourceController(){return this._resourceController}get quality(){return this._resourceController?.memoryController?.memoryFactor??1}get resolutionScale(){return Math.sqrt(Math.min(1,this.quality/.75))}get performanceInfo(){return new ze(this)}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 l.getLogger(this).error("#toMap()","Scene view cannot be used before it is ready"),null;const i=dt(e)?ut(this,e):e;return Ie(this,i,t,this._defaultToMapOptions)}toScreen(e){if(!this.ready)return l.getLogger(this).error("#toScreen()","Scene view cannot be used before it is ready"),null;let t=e;return null==e.z&&(t=xt,t.x=e.x,t.y=e.y,t.z=He(this.elevationProvider,e)??0,t.spatialReference=e.spatialReference),N(t,Ct,this.renderSpatialReference),this.state.camera.projectToScreen(Ct,Tt),V(Tt[0],Tt[1])}pixelSizeAt(e,t){if(!this.ready)return l.getLogger(this).error("#pixelSizeAt()","Scene view cannot be used before it is ready"),null;if(!e)return 0;const i=this.renderSpatialReference;N(e,Ct,i);const r=this.state.camera.computeScreenPixelSizeAt(Ct);return t&&i!==t?r*C(i)/C(t):r}overlayPixelSizeInMapUnits(e){return this.overlayManager?.overlayPixelSizeInMapUnits(e,()=>this.pixelSizeAt(e))??1}hitTest(e,t){if(!this.ready)return l.getLogger(this).error("#hitTest()","Scene view cannot be used before it is ready"),null;const i=dt(e)?ut(this,e):e;return Pe(this,i,t,this._defaultHitTestOptions)}async popupHitTest(e){return Fe(this,e)}goTo(e,t){return this.updatingHandles.addPromise(this.stateManager.goTo(e,t))}async whenAnalysisView(e){if(null==e.parent)throw new n("view:no-analysisview-for-analysis","The analysis does not exist in view.analyses",{analysis:e});switch(e.parent.type){case"line-of-sight":case"dimension":case"viewshed":return(await this.whenLayerView(e.parent)).whenAnalysisView();default:return this.analysisViewManager.whenAnalysisView(e)}}whenLayerView(e){return super.whenLayerView(e)}async takeScreenshot(e){const t=await this._completeSettings(e);await this.whenReady();const i=(await this.stage.renderView.takeScreenshot(t))[0];return(await import("./support/screenshotUtils.js")).encode(i,t,this._pixelFormat())}async _takeScreenshot(e){const t=await this._completeSettings(e);await this.whenReady();const i=(await this.stage.renderView.takeScreenshot(t))[0];return(await import("./support/screenshotUtils.js")).encodeData(i,this._pixelFormat())}async _takeScreenshotWithObjectAndLayerId(e){const t=await this._completeSettings(e);t.olidColor=!0,await this.whenReady();const i=await this.stage.renderView.takeScreenshot(t),{encodeData:r}=await import("./support/screenshotUtils.js");return[r(i[0],this._pixelFormat()),r(i[1],this._pixelFormat())]}async _completeSettings(e){const{toRenderSettings:t,screenshotSuperSampleSettings:i}=await import("./support/screenshotUtils.js"),r=t(e,this);return r.pixelRatio/=this.state.pixelRatio,i(r,this.supersampleScreenshotsEnabled,this.padding)}_pixelFormat(){return{flipY:!0,premultipliedAlpha:this.stage?.renderView.getAlpha()??!1}}get test(){}async takeScreenshotWithObjectAndLayerId(e){if(!et())throw new n("360vr:objectAndLayerId-rendering-disabled","has enable-feature:objectAndLayerId-rendering must be true");const{encode:t}=await import("./support/screenshotUtils.js"),i=await this._completeSettings(e);i.olidColor=!0,await this.whenReady();const r=await this.stage.renderView.takeScreenshot(i),s=t(r[0],i,this._pixelFormat()),a=await this._completeSettings(e);a.format="png";return[s,t(r[1],a,this._pixelFormat())]}getColorToObjectAndLayerIdMapping(){const e=this.stage.renderView.olidRenderHelper;if(e)return e.getColorToObjectAndLayerIdMapping();throw new n("360vr:objectAndLayerId-rendering-disabled","has enable-feature:objectAndLayerId-rendering must be true")}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}importLayerView(e){return ge.importLayerView(e)}hasLayerViewModule(e){return ge.hasLayerViewModule(e)}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){return this.scene?.initialViewProperties?.spatialReference||this.defaultsFromMap?.spatialReference||this.defaultsFromMap?.ready&&this._initialDefaultSpatialReference||null}getSurface(){return this.surface}async validate(){let e=yt(this.type);const t=has("safari");if(t&&t<9&&(e=new n("sceneview:browser-not-supported","This browser is not supported by SceneView (Safari < 9)",{type:"safari",requiredVersion:9,detectedVersion:t})),null!=e)throw l.getLogger(this).warn("#validate()",e.message),e}get _predeterminedViewingMode(){const e=this._isOverridden("viewingMode")?this._get("viewingMode"):this.scene?.initialViewProperties?.viewingMode;return null!=e?ue(e):null}getSpatialReferenceSupport(e,t){const i=this._predeterminedViewingMode;if(null!=i)return this._validateSpatialReferenceForViewingMode(e,t,i)?{constraints:this._makeSpatialReferenceConstraints(e,t,i)}:null;const r=this._validateSpatialReferenceForViewingMode(e,t,2),s=this._validateSpatialReferenceForViewingMode(e,t,1);return r||s?r&&s?{constraints:this._makeSpatialReferenceConstraints(e,t,null)}:r?{constraints:this._makeSpatialReferenceConstraints(e,t,2)}:{constraints:this._makeSpatialReferenceConstraints(e,t,1)}:null}_validateSpatialReferenceForViewingMode(e,t,i){return!!ct(e,i)&&(null==t||(!!K(t)||(!X(t)||null!=Ze(t,e,i))&&(!ee(t)||1!==i)))}_makeSpatialReferenceConstraints(e,t,i){if(null==t)return[{spatialReference:e,viewingMode:i}];const{isWebMercator:r,isWGS84:s}=e;if(K(t)&&(r||s)){return!s||2===i||null===$e(t.tileInfo,t.fullExtent,e,1)?[{spatialReference:e,viewingMode:i},{spatialReference:z.WebMercator,viewingMode:i}]:[{spatialReference:r?z.WGS84:z.WebMercator,viewingMode:i}]}return X(t)||ee(t)||!r&&!s?X(t)&&r&&1!==i?[{spatialReference:e,viewingMode:i},{spatialReference:z.WGS84,viewingMode:2}]:[{spatialReference:e,viewingMode:i}]:[{spatialReference:e,viewingMode:i},{spatialReference:r?z.WGS84:z.WebMercator,viewingMode:i}]}_validateSpatialReference(e){const t=null!=this.getSpatialReferenceSupport(e),i=this._predeterminedViewingMode;return t||(null!=i?l.getLogger(this).warnOnce(`Spatial reference defined on view not supported in ${de(i)} viewing mode.`):e.isGeographic&&l.getLogger(this).warnOnce("Spatial reference is geographic but not supported.")),t}whenReady(){return new Promise(e=>{this.ready?e(this):this._resolveWhenReady.push(e)})}trackGraphicState(e){if(!e.graphic)return l.getLogger(this).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&&null!=t&&"processor"in t&&"graphics-3d"===t.processor?.type&&t.processor.graphicsCore&&(i=t.processor.graphicsCore.trackGraphicState(e))};return null!=t?s(t):this.whenViewForGraphic(e.graphic,{waitForLayer:!0}).then(e=>s(e),()=>{}).catch(()=>{}),o(()=>{r=!0,null!=i&&(i.remove(),i=null)})}maskOccludee(e){if(!e)return l.getLogger(this).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&&null!=t&&ht(t)&&(i=t.maskOccludee(e))};return null!=t?s(t):this.whenViewForGraphic(e,{waitForLayer:!0}).then(e=>s(e),()=>{}).catch(()=>{}),o(()=>{r=!0,null!=i&&(i.remove(),i=null)})}getViewForGraphic(e){return e.layer===this?this.graphicsView:e.layer?this.allLayerViews.filter(e=>"media-3d"!==e.type).find(t=>t.layer===e.layer):null}graphicChanged(e){null!=this.graphicsView&&this.graphicsView.graphicChanged(e)}async whenViewForGraphic(e,t){return e.layer===this?(await v(()=>this.graphicsView),this.graphicsView):e.layer&&this.map?t&&t.waitForLayer&&!this.map.allLayers.includes(e.layer)?new Promise((t,i)=>{const r=this.map.allLayers.on("change",s=>{s.added.includes(e.layer)&&(r.remove(),this.whenLayerView(e.layer).then(t,i))})}):this.whenLayerView(e.layer):null}enableFeatureTiles(){const e=Symbol();return this._featureTileTreeClients.add(e),o(()=>this._featureTileTreeClients.delete(e))}async _importModule(e,t){const i=new AbortController;this._importControllers.set(e,i),this._updatingChanged();try{const r=await Ot[e]();if(t&&(d(this),u(i.signal),await t(i.signal)),this.destroyed)throw c();return u(i.signal),r}catch{return null}finally{this._importControllers.delete(e),this._updatingChanged()}}_abortImport(e){this._importControllers.get(e)?.abort(),this._importControllers.delete(e),this._updatingChanged()}_initBasemapTerrain(){this._set("basemapTerrain",new Qe({view:this})),this.elevationProvider.register(0,this.basemapTerrain)}_exitBasemapTerrain(){const{basemapTerrain:e,elevationProvider:t}=this;e&&(this._set("basemapTerrain",null),t.unregister(e),e.destroy())}_initGlobe(){this._initCoordinateSystem(),this.state.createInitialCamera(),this._initBasemapTerrain(),this._set("pointsOfInterest",new Ne({view:this})),this.addHandles([this.updatingHandles.add(()=>Le.FEATURE_TILE_TREE_SHOW_TILES,e=>{e&&!this._featureTreeDebugger?this.updatingHandles.addPromise(import("./3d/layers/support/FeatureTileTree3DDebugger.js")).then(({FeatureTileTree3DDebugger:e})=>{!this._featureTreeDebugger&&Le.FEATURE_TILE_TREE_SHOW_TILES&&(this._featureTreeDebugger=new e({view:this}))}):e||(this._featureTreeDebugger=p(this._featureTreeDebugger))},_),this.updatingHandles.add(()=>({basemapExtent:this.basemapTerrain?.extent,basemapSpatialReference:this.basemapTerrain?.spatialReference,clippingArea:this.clippingArea,featureTiles:this._featureTiles}),({basemapExtent:e,basemapSpatialReference:t,clippingArea:i,featureTiles:r})=>{if(!r)return;const s=!!e;if(i||s)if(s&&t){const s=e&&t?W(Q(e,t),this.spatialReference):null;r.filterExtent=i?i.intersection(s):s}else r.filterExtent=i;else r.filterExtent=null},_),this.updatingHandles.add(()=>this._featureTileTreeClients.size>0,e=>{e?this.updatingHandles.addPromise(this._ensureFeatureTileTree()):this._featureTiles=p(this._featureTiles)},w)],Mt),this.stateManager.init()}async _ensureFeatureTileTree(){if(this._featureTiles||this._importControllers.has("FeatureTileTree3D"))return;const e=(await this.updatingHandles.addPromise(this._importModule("FeatureTileTree3D")))?.FeatureTileTree3D;e&&(this._featureTiles=new e({renderCoordsHelper:this.renderCoordsHelper,pointsOfInterest:this.pointsOfInterest,viewState:this.state,scheduler:this._resourceController.scheduler,terrain:this.basemapTerrain}),this._updatingChanged())}_exitTerrain(){this.stateManager.exit(),this.removeHandles(St),this.removeHandles(Mt),this._featureTiles=p(this.featureTiles),this._set("pointsOfInterest",p(this.pointsOfInterest)),this._exitBasemapTerrain(),this.state.reset(),this._exitCoordinateSystem()}_initCoordinateSystem(){if(this.spatialReference){const e=this.spatialReference,t=this.state.isGlobal,i=Z(t,e);i!==this.renderSpatialReference&&(this._set("renderCoordsHelper",We.create(this.state.viewingMode,i)),t||this.addHandles(y(()=>this.basemapTerrain?.extent,e=>{const t=this.renderCoordsHelper.spatialReference;null==e||0===e[0]&&0===e[1]&&0===e[2]&&0===e[3]||!B(e,this.basemapTerrain.spatialReference,Rt,t)||(this.renderCoordsHelper.extent=Rt)},w),St),this.sceneIntersectionHelper&&this.sceneIntersectionHelper.setTolerance(it/this.renderCoordsHelper.unitInMeters))}else this._set("renderCoordsHelper",null)}_exitCoordinateSystem(){this.removeHandles(St),this._set("renderCoordsHelper",null)}_updatingChanged(){this.notifyChange("updating")}_updateUpdatingMonitors(e=null){null!=e&&4===e.type||(this.removeHandles("updatingMonitors"),this.allLayerViews.forEach(e=>{e.destroyed||(this.addHandles(y(()=>[e.updating,e.updatingProgress],()=>this._updatingChanged(),w),"updatingMonitors"),e.when(()=>this._updatingChanged(),()=>this._updatingChanged()))}),this._updatingChanged())}async _prepareScreenshotOverlay(){this.overlay&&await this.overlay.prepare()}_renderScreenshotOverlay(e,t,i){if(!this.overlay||!this.overlay.hasVisibleItems)return i;const r=e.getContext("2d",{willReadFrequently:!0});return r.putImageData(i,0,0),this.overlay.renderCanvas(e,{disableDecorations:t}),r.getImageData(0,0,i.width,i.height)}_initStage(){const e={deactivatedWebGLExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions,alpha:this.alphaCompositingEnabled,preserveDrawingBuffer:this.preserveDrawingBufferEnabled,canvas:this.renderCanvas,screenshot:{prepareOverlay:()=>this._prepareScreenshotOverlay(),renderOverlay:(e,t,i)=>this._renderScreenshotOverlay(e,t,i)}},t=new Oe(this.state.viewingMode,e=>this.stage.layers.forEach(e),this);this._set("sceneIntersectionHelper",t);const i=s(this.surface);this._stage=new Xe({view:this,options:e,container:i}),this.notifyChange("stage"),this._updateSlice(),this.addHandles([this.on("pointer-move",()=>this.stage?.renderer.resetAnimation()),a(this.stage.renderView.canvas,"webglcontextlost",e=>{this.fatalError=new n("webgl-context-lost",e.statusMessage)})],"stage"),this.renderCoordsHelper&&this.sceneIntersectionHelper.setTolerance(it/this.renderCoordsHelper.unitInMeters),this._set("canvas",this.stage.renderView.canvas)}_exitStage(){this.sceneIntersectionHelper?.destroy(),this._set("sceneIntersectionHelper",null),this._stage=p(this.stage),this._set("stage",null),this.removeHandles("stage"),this._set("canvas",null)}_initSurface(){this._exitSurface(),this._initStage(),this._initGlobe(),this.sharedSymbolResources=new ke({view:this,resourceController:this._resourceController})}_exitSurface(){this.sharedSymbolResources&&(this.sharedSymbolResources.objectResourceCache.destroy(),this.sharedSymbolResources.destroy(),this.sharedSymbolResources=null,this._exitTerrain(),this._exitStage())}async _ensureGraphicsView(){if(this.graphicsView||this._importControllers.has("GraphicsView3D")||0===this.graphics.length)return;this.removeHandles("GraphicsView3D");const e=(await this.updatingHandles.addPromise(this._importModule("GraphicsView3D",e=>v(()=>this.basemapTerrain?.ready,e))))?.default;e&&this._set("graphicsView",new e({view:this,getGraphics:()=>this.graphics})),this._updatingChanged()}_disposeGraphicsView(){this._abortImport("GraphicsView3D"),this.removeHandles("GraphicsView3D"),this.graphicsView&&(this.removeHandles(this.graphicsView.processor.layer.id),this.graphicsView.destroy(),this._set("graphicsView",null))}_disposeFocusAreasView(){this._abortImport("FocusAreasView"),this.removeHandles("FocusAreasView"),this.focusAreasView=p(this.focusAreasView)}async _ensureFocusAreasView(e){if(this.focusAreasView||this._importControllers.has("FocusAreasView")||0===e)return;this.removeHandles("FocusAreasView");const t=(await this.updatingHandles.addPromise(this._importModule("FocusAreasView")))?.FocusAreasView;t&&(this.focusAreasView=new t({view:this})),this._updatingChanged()}_startup(){1===ue(this.viewingMode)&&(this._clippingArea=null),this._initSurface(),this._set("ready",!0),this.addHandles(m(()=>this.graphics,"after-changes",()=>this._ensureGraphicsView()),"GraphicsView3D"),this._ensureGraphicsView(),this.addHandles(y(()=>this.map?.focusAreas?.areas.length??0,e=>this._ensureFocusAreasView(e),{initial:!0}),"FocusAreasView");const e=this.scene?.initialViewProperties??null,t=e?.environment;t&&(this._overrideDefaultEnvironmentOnly?E(this.environment,t):this.environment=this.environment.cloneWithWebsceneEnvironment(t)),this.timeExtent=e?.timeExtent,e?.analyses.applyTo(this),this.labeler.setup(),this.environmentManager.connectView(this),this.inputManager.connect();const i=this._resolveWhenReady;this._resolveWhenReady=[],i.forEach(e=>e(this))}_teardown(){this._initialDefaultSpatialReference=null,this.inputManager.disconnect(),this.environmentManager.disconnectView(),this._overrideDefaultEnvironmentOnly=!1,this.labeler.dispose(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this._exitSurface(),this._set("ready",!1)}get _defaultToMapOptions(){const e={include:new Set};if(!this.map)return e;this.map.ground&&e.include.add(st);for(const t of this.allLayerViews)te(t.layer)&&e.include.add(t.uid);return e}get _defaultHitTestOptions(){const e={exclude:new Set};if(!this.map)return e;this.map.ground&&this.map.ground.opacity<1&&e.exclude.add(st);for(const t of this.allLayerViews)te(t.layer)&&t.layer.opacity<1&&e.exclude.add(t.uid);return e}static{this.type="3d"}static clearStatics(){_t(),L(),j(),nt(),Re(),ye(),Ve(),k(),ot(),re(),Ke(),rt(),xe(),Ae(),I(),M(),tt(),Je(),Se.cleanupI3SLodHandling(),ie.cleanupTilemapCache(),Ce.cleanupViewstate(),Qe.cleanupTerrainSurface()}};function jt(e,t){return null!=e&&q(e.spatialReference,t)?W(e,t):null}e([T()],Vt.prototype,"_userClippingArea",void 0),e([T()],Vt.prototype,"_resourceController",void 0),e([T()],Vt.prototype,"stage",null),e([T({readOnly:!0})],Vt.prototype,"deconflictor",void 0),e([T({readOnly:!0})],Vt.prototype,"labeler",void 0),e([T(P(se,"analyses"))],Vt.prototype,"analyses",void 0),e([T({type:he,readOnly:!0})],Vt.prototype,"animation",null),e([T({readOnly:!0})],Vt.prototype,"basemapTerrain",void 0),e([T({readOnly:!0})],Vt.prototype,"overlayManager",null),e([T({readOnly:!0})],Vt.prototype,"elevationProvider",void 0),e([T()],Vt.prototype,"camera",null),e([T({type:t})],Vt.prototype,"contentCamera",null),e([T({readOnly:!0})],Vt.prototype,"canvas",null),e([T({type:G,useTypeForAutocast:!1})],Vt.prototype,"center",null),e([T({type:D})],Vt.prototype,"clippingArea",null),e([T({type:fe,nonNullable:!0})],Vt.prototype,"constraints",void 0),e([T({type:D,readOnly:!0})],Vt.prototype,"renderDataExtent",null),e([T({readOnly:!0})],Vt.prototype,"tileInfo",null),e([T({type:D,readOnly:!0})],Vt.prototype,"dataExtent",null),e([T({type:D,readOnly:!0})],Vt.prototype,"_groundAndLayersExtent",null),e([T({type:ve})],Vt.prototype,"environment",null),e([R("environment")],Vt.prototype,"castEnvironment",null),e([T({readOnly:!0})],Vt.prototype,"environmentManager",void 0),e([T({type:D})],Vt.prototype,"extent",null),e([T({type:r})],Vt.prototype,"floors",void 0),e([T()],Vt.prototype,"screenCenter",null),e([T()],Vt.prototype,"frustum",null),e([T({type:Number,readOnly:!0})],Vt.prototype,"fullOpacity",void 0),e([T({readOnly:!0})],Vt.prototype,"graphicsView",void 0),e([T()],Vt.prototype,"analysisViewManager",void 0),e([T()],Vt.prototype,"groundView",void 0),e([T({readOnly:!0})],Vt.prototype,"layerviewCollections",null),e([T({type:Boolean})],Vt.prototype,"initialExtentRequired",null),e([T()],Vt.prototype,"defaultsFromMapSettings",null),e([T()],Vt.prototype,"interacting",null),e([T()],Vt.prototype,"stationary",null),e([T()],Vt.prototype,"navigating",null),e([T()],Vt.prototype,"map",void 0),e([T()],Vt.prototype,"padding",null),e([T({type:Ne,readOnly:!0})],Vt.prototype,"pointsOfInterest",void 0),e([T()],Vt.prototype,"_featureTiles",void 0),e([T()],Vt.prototype,"featureTiles",null),e([T()],Vt.prototype,"_featureTreeDebugger",void 0),e([T({constructOnly:!0})],Vt.prototype,"deactivatedWebGLExtensions",void 0),e([T({constructOnly:!0})],Vt.prototype,"debugWebGLExtensions",void 0),e([T({constructOnly:!0})],Vt.prototype,"renderCanvas",void 0),e([T({constructOnly:!0})],Vt.prototype,"state",void 0),e([T()],Vt.prototype,"screenSizePerspective",void 0),e([T({readOnly:!0})],Vt.prototype,"inputManager",void 0),e([T({readOnly:!0})],Vt.prototype,"stateManager",void 0),e([T({type:["low","medium","high"]})],Vt.prototype,"qualityProfile",null),e([T({type:Ge,get(){let e=this._get("qualitySettings");if(!e){const t=De(this.qualityProfile);e=new Ge(t)}return e}})],Vt.prototype,"qualitySettings",void 0),e([T()],Vt.prototype,"slice",void 0),e([T({readOnly:!0})],Vt.prototype,"typeSpecificPreconditionsReady",null),e([T({readOnly:!0})],Vt.prototype,"renderCoordsHelper",void 0),e([T({readOnly:!0})],Vt.prototype,"sceneIntersectionHelper",void 0),e([T({type:Number,dependsOn:["scale","spatialReference"],readOnly:!0})],Vt.prototype,"resolution",null),e([T({type:Number})],Vt.prototype,"scale",null),e([T({readOnly:!0,type:Number})],Vt.prototype,"terrainLevel",null),e([T()],Vt.prototype,"heightModelInfo",null),e([T()],Vt.prototype,"spatialReference",void 0),e([T({type:Boolean,value:!1})],Vt.prototype,"alphaCompositingEnabled",null),e([T({constructOnly:!0})],Vt.prototype,"preserveDrawingBufferEnabled",void 0),e([T({type:Boolean})],Vt.prototype,"supersampleScreenshotsEnabled",void 0),e([T({readOnly:!0})],Vt.prototype,"type",void 0),e([T(),R(e=>e instanceof ft?e:A(wt,e))],Vt.prototype,"ui",void 0),e([T({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.updating","toolViewManager.updating","analysisViewManager.updating","state.updating","textures.updating"]})],Vt.prototype,"updating",null),e([T()],Vt.prototype,"_updatingObjects",null),e([T()],Vt.prototype,"_updatingObjectsWithProgress",null),e([T({type:Number,readOnly:!0,dependsOn:["updating"]})],Vt.prototype,"updatingProgress",void 0),e([T({type:["global","local"]})],Vt.prototype,"viewingMode",null),e([T({type:i})],Vt.prototype,"viewpoint",null),e([T({readOnly:!0})],Vt.prototype,"visibleArea",null),e([T({type:Number})],Vt.prototype,"zoom",null),e([T({type:pt})],Vt.prototype,"highlightOptions",null),e([T({readOnly:!0})],Vt.prototype,"quality",null),e([T({readOnly:!0})],Vt.prototype,"resolutionScale",null),e([T()],Vt.prototype,"focusAreasView",void 0),e([T()],Vt.prototype,"_defaultToMapOptions",null),e([T()],Vt.prototype,"_defaultHitTestOptions",null),Vt=bt=e([x("esri.views.SceneView")],Vt);const Ct=H(),Tt=S(),Rt=Y(),xt=J(0,0,0,z.WebMercator),Ot={GraphicsView3D:()=>import("./3d/layers/GraphicsView3D.js"),FocusAreasView:()=>import("./3d/FocusAreasView.js"),FeatureTileTree3D:()=>import("./3d/layers/support/FeatureTileTree3D.js")},At=Vt;export{At as default};
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../Camera.js";import i from"../Viewpoint.js";import r from"../core/Collection.js";import{byId as s}from"../core/domUtils.js";import n from"../core/Error.js";import{on as a}from"../core/events.js";import{makeHandle as o}from"../core/handleUtils.js";import has from"../core/has.js";import l from"../core/Logger.js";import{destroyMaybe as p,maybeProperty as h}from"../core/maybe.js";import{throwIfDestroyed as d,throwIfAborted as u,createAbortError as c}from"../core/promiseUtils.js";import g from"../core/ReactiveSet.js";import{on as m,watch as y,initial as f,sync as w,whenOnce as v,syncAndInitial as _}from"../core/reactiveUtils.js";import{setFrameDuration as b,cleanupScheduling as M}from"../core/scheduling.js";import{createScreenPointArray as S,createScreenPoint as V}from"../core/screenUtils.js";import{cleanupWhereClauseCache as j}from"../core/sql.js";import{getMetersPerUnitForSR as C}from"../core/units.js";import{property as T,cast as R,subclass as x}from"../core/accessorSupport/decorators.js";import{ensureType as O,ensureClass as A}from"../core/accessorSupport/ensureType.js";import{overrideDefaultsFrom as E}from"../core/accessorSupport/overrideDefaultsFrom.js";import{drainNotificationQueue as L}from"../core/accessorSupport/trackingUtils.js";import{create as H}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{cleanupPooledRBush as I}from"../core/libs/rbush/PooledRBush.js";import{owningCollectionProperty as P}from"../core/support/OwningCollection.js";import{initialize as F}from"../core/workers/workers.js";import D from"../geometry/Extent.js";import U from"../geometry/HeightModelInfo.js";import G from"../geometry/Point.js";import{project as W,canProjectWithoutEngine as q}from"../geometry/projectionUtils.js";import z from"../geometry/SpatialReference.js";import{cleanupSpatialReferenceEllipsoidUtils as k}from"../geometry/spatialReferenceEllipsoidUtils.js";import{projectBoundingRect as B}from"../geometry/projection/projectBoundingRect.js";import{projectPointToVector as N}from"../geometry/projection/projectPointToVector.js";import{toExtent as Q,create as Y}from"../geometry/support/aaBoundingRect.js";import{renderSRFromViewSR as Z}from"../geometry/support/coordinateSystem.js";import{getResolutionForScale as $}from"../geometry/support/scaleUtils.js";import{makeDehydratedPoint as J}from"../layers/graphics/dehydratedPoint.js";import{isImageryTileLayer as K,isTiledLayer as X,isVoxelLayer as ee,isIntegratedMeshLayer as te}from"../layers/support/layerUtils.js";import{TilemapCache as ie}from"../layers/support/TilemapCache.js";import{clearDefaultPortalInstance as re}from"../portal/portalDefault.js";import{AnalysesCollection as se}from"../support/AnalysesCollection.js";import{WebSceneTag as ne}from"../support/tagSymbols.js";import{BreakpointsOwner as ae}from"./BreakpointsOwner.js";import{DOMContainer as oe}from"./DOMContainer.js";import{PopupView as le}from"./PopupView.js";import pe from"./View.js";import he from"./ViewAnimation.js";import{stringFromViewingMode as de,viewingModeFromString as ue}from"./ViewingMode.js";import{GroundView3D as ce}from"./3d/GroundView3D.js";import{layerView3DImporter as ge}from"./3d/layerViewModuleImportUtils.js";import{importAnalysisViewModule as me}from"./3d/analysis/analysisViewModuleImportUtils.js";import{cleanupIntersectionUtils as ye}from"./3d/camera/intersectionUtils.js";import{Constraints as fe}from"./3d/constraints/Constraints.js";import{EnvironmentManager as we}from"./3d/environment/EnvironmentManager.js";import ve from"./3d/environment/SceneViewEnvironment.js";import _e from"./3d/input/SceneInputManager.js";import{GraphicsDeconflictor as be}from"./3d/layers/graphics/GraphicsDeconflictor.js";import{Labeler as Me}from"./3d/layers/graphics/Labeler.js";import Se from"./3d/layers/i3s/I3SLodHandling.js";import{cleanupStageLayerElevationProvider as Ve}from"./3d/layers/support/StageLayerElevationProvider.js";import{ScreenSizePerspective as je}from"./3d/state/ScreenSizePerspective.js";import Ce from"./3d/state/ViewState.js";import{ViewStateManager as Te,cleanupViewStateManager as Re}from"./3d/state/ViewStateManager.js";import{cleanupPointToPointAnimationController as xe}from"./3d/state/controllers/PointToPointAnimationController.js";import{SceneIntersectionHelper as Oe}from"./3d/state/helpers/SceneIntersectionHelper.js";import{cleanupNavigationUtils as Ae}from"./3d/state/utils/navigationUtils.js";import Ee from"./3d/support/Attribution3D.js";import{CombinedElevationProvider as Le}from"./3d/support/CombinedElevationProvider.js";import{debugFlags as He}from"./3d/support/debugFlags.js";import{getElevationAtPoint as Ie}from"./3d/support/ElevationProvider.js";import{toMap as Pe,hitTest as Fe}from"./3d/support/hitTest.js";import{popupHitTest as De}from"./3d/support/popupHitTest.js";import{getQualityProfileSettings as Ue,getDefaultQualityProfileName as Ge}from"./3d/support/QualityProfile.js";import We from"./3d/support/QualitySettings.js";import{RenderCoordsHelper as qe}from"./3d/support/RenderCoordsHelper.js";import{newResourceController as ze}from"./3d/support/ResourceController.js";import ke from"./3d/support/SceneViewPerformanceInfo.js";import{SharedSymbolResources as Be}from"./3d/support/SharedSymbolResources.js";import{ViewSlice as Ne}from"./3d/support/ViewSlice.js";import{PointsOfInterest as Qe}from"./3d/support/pointsOfInterest/PointsOfInterest.js";import Ye from"./3d/terrain/TerrainSurface.js";import{isSurfaceLayerView as Ze,getTiledLayerInfo as $e,checkIfTileInfoSupportedForView as Je}from"./3d/terrain/terrainUtils.js";import{clearTilePerLayerInfo as Ke}from"./3d/terrain/TilePerLayerInfo.js";import{cleanupTileRenderer as Xe}from"./3d/terrain/TileRenderer.js";import{Stage as et}from"./3d/webgl-engine/Stage.js";import{olidEnabled as tt}from"./3d/webgl-engine/effects/geometry/olidUtils.js";import{cleanupRenderOccluded as it}from"./3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js";import{defaultTolerance as rt}from"./3d/webgl-engine/lib/Intersector.js";import{cleanupShadowmap as st}from"./3d/webgl-engine/lib/ShadowMap.js";import{terrainId as nt}from"./3d/webgl-engine/lib/verticalOffsetUtils.js";import{cleanupEdgeProcessing as at}from"./3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js";import ot from"./support/AnalysisViewManager.js";import{cleanupDrapedUtils as lt}from"./support/drapedUtils.js";import{defaultHighlightName as pt}from"./support/HighlightDefaults.js";import ht from"./support/HighlightOptions.js";import{occludeesSupported as dt}from"./support/layerViewUtils.js";import{isSupportedScreenPointEvent as ut,createScreenPointFromSupportedEvent as ct}from"./support/screenUtils.js";import{isSpatialReferenceSupported as gt}from"./support/spatialReferenceSupport.js";import{initializeTextureCompressionWorker as mt,destroyTextureCompressionWorker as yt}from"./support/TextureCompressionHelper.js";import{check as ft}from"./support/WebGLRequirements.js";import wt from"./ui/DefaultUI.js";import vt from"./ui/3d/DefaultUI3D.js";import _t from"../webscene/Environment.js";import{clearVNodeCache as bt}from"../widgets/support/vnodeCache.js";var Mt;const St=Symbol(),Vt=Symbol();let jt=class extends(ae(le(oe(pe)))){static{Mt=this}constructor(e){super(e),this._userClippingArea=null,this._clippingArea=null,this._initialDefaultSpatialReference=null,this._overrideDefaultEnvironmentOnly=!0,this._resolveWhenReady=[],this._resourceController=ze(this),this.deconflictor=new be({view:this}),this.attribution3D=new Ee({view:this}),this.labeler=new Me({view:this,deconflictor:this.deconflictor.labels}),this.sharedSymbolResources=null,this.analyses=new se,this.basemapTerrain=null,this.elevationProvider=new Le({view:this}),this._canvas=null,this.constraints=new fe,this._environment=new ve,this.environmentManager=new we,this.floors=new r,this.fullOpacity=1,this.graphicsView=null,this.analysisViewManager=new ot({importAnalysisViewModule:e=>me(e),view:this}),this.groundView=null,this.map=null,this._featureTileTreeClients=new g,this._featureTiles=null,this._featureTreeDebugger=null,this.state=new Ce({view:this}),this.slice=new Ne,this.spatialReference=null,this.preserveDrawingBufferEnabled=!1,this.supersampleScreenshotsEnabled=!0,this.type="3d",this.ui=new vt,this._numUpdating=0,this._lastUpdateTime=0,this.updatingProgress=.5,this._importControllers=new Map,F();const t=(e=null)=>{null!=e&&4===e.type||(this._updatingChanged(),this.map?.allLayers.forEach(async e=>{try{await e.when()}catch(t){}this._updatingChanged()}))};this.addHandles([m(()=>this.map?.allLayers,"after-changes",e=>t(e),{onListenerAdd:()=>t(),onListenerRemove:()=>t(),sync:!0}),this.allLayerViews.on("after-changes",e=>this._updateUpdatingMonitors(e)),y(()=>this.scene,e=>e?.load().catch(()=>{}))]),this.inputManager=new _e({view:this}),this.stateManager=new Te({view:this}),this.screenSizePerspective=new je({view:this})}initialize(){if(has("enable-feature:esri-compress-textures")&&has("wasm-simd")){const e=mt(this,this.resourceController);this.addResolvingPromise(e.promise)}this.groundView=new ce({view:this}),this._updateUpdatingMonitors(),this.updatingHandles.add(()=>this.qualitySettings.memoryLimit,e=>{this.resourceController&&(this.resourceController.memoryController.maxMemory=e)},f),this.updatingHandles.add(()=>this.qualitySettings.additionalCacheMemory,e=>{this.resourceController&&(this.resourceController.memoryController.additionalCacheMemory=e)},f),this.updatingHandles.add(()=>this.qualitySettings.frameRate??0,e=>b(e>0?1e3/Math.ceil(e):0),f),this.addHandles([y(()=>this.spatialReference,()=>this.notifyChange("clippingArea"),w),y(()=>({plane:this.slice.plane,isDecoration:this.slice.isDecoration}),()=>this._updateSlice(),w)])}destroy(){this.destroyed||(yt(this),this.updatingHandles.removeAll(),this.basemapTerrain?.clearHandles(),this.elevationProvider.destroy(),this.ui.removeAllHandles(),this.layerViewManager.clearHandles(),this.invalidate(),this.activeTool=null,this.layerViewManager.clear(),this._set("analysisViewManager",p(this.analysisViewManager)),this._exitSurface(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this.sharedSymbolResources=p(this.sharedSymbolResources),this._set("labeler",p(this.labeler)),this._set("deconflictor",p(this.deconflictor)),this._resourceController=p(this._resourceController),this._set("stateManager",p(this.stateManager)),this._set("inputManager",p(this.inputManager)),this.state.destroy(),this.highlights.destroy(),this.removeHandles("updatingMonitors"),this._set("environmentManager",p(this.environmentManager)),this._set("environment",p(this.environment)),this.groundView=p(this.groundView),this.slice.destroy(),this._updatingObjectsWithProgress.length=0,this._updatingObjects.length=0,this.ui?.destroy(),this._set("ui",null),this._set("renderCanvas",null),this._set("canvas",null),this._canvas=null,this.screenSizePerspective.destroy(),this.attribution3D.destroy())}get stage(){return this._stage}get renderSpatialReference(){return this.renderCoordsHelper?.spatialReference}get groundSpatialReference(){return this.basemapTerrain?.spatialReference}get animation(){return this.state?.animation}get overlayManager(){return this.basemapTerrain?.overlayManager}get camera(){return this.stateManager?.camera}set camera(e){this.stateManager&&(this.stateManager.camera=e)}get contentCamera(){return this.stateManager?.contentCamera}set contentCamera(e){this.stateManager&&(this.stateManager.contentCamera=e)}installContentCameraReset(e={sticky:!1}){return this.stateManager.installContentCameraReset(e)}get canvas(){return this._canvas}get center(){return this.stateManager?.center}set center(e){this.stateManager&&(this.stateManager.center=O(G,e))}get clippingArea(){if("global"===this.viewingMode)return null;const e=this.map;let t=this._userClippingArea||h(e,"clippingArea");return!this._userClippingArea&&!h(e,"clippingEnabled")||null==t?(this._clippingArea=null,null):t instanceof D?this.spatialReference&&(t=Ct(t,this.spatialReference),null==t)?(l.getLogger(this).error("#clippingArea","setting clippingArea with incompatible SpatialReference"),this._clippingArea):(t=t.clone(),null==t.intersection(this._groundAndLayersExtent)&&(t.xmin=t.xmax,t.ymin=t.ymax),t.zmin=void 0,t.zmax=void 0,t.equals(this._clippingArea)||(this._clippingArea=t),this._clippingArea):(l.getLogger(this).error("#clippingArea","only clippingArea geometries of type Extent are supported"),this._clippingArea)}set clippingArea(e){this.ready&&"global"===this.viewingMode&&null!=e?l.getLogger(this).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 null==t||null==e||t.spatialReference.equals(e)?t:Ct(t,e)}get tileInfo(){return this.basemapTerrain?.tilingScheme?.toTileInfo()}get dataExtent(){let e=this._groundAndLayersExtent;const t=this.spatialReference||z.WGS84,i=Ct(this.clippingArea,t);null!=i&&(e=null!=e?e.intersection(i):i);const r=this._get("dataExtent");return null!=e&&e.equals(r)?r:e}get _groundAndLayersExtent(){const e=this.spatialReference||z.WGS84;let t;const i=i=>{const r=Ct(i,e);null!=r&&(null!=t?t.union(r):t=r.clone())},{basemapTerrain:r}=this;if(r?.spatialReference){const e=r.groundExtent;i(new D({xmin:e[0],ymin:e[1],zmin:0,xmax:e[2],ymax:e[3],zmax:0,spatialReference:r.spatialReference}))}const s=e=>{null==e.fullExtent||"graphics"===e.type&&e.internal||i(e.fullExtent)};if(this.map?.allLayers.forEach(e=>s(e)),null==t)return null;t.hasZ?(t.zmin=Math.min(0,t.zmin??0),t.zmax=Math.max(0,t.zmax??0)):(t.zmin=0,t.zmax=0);const n=this._get("_groundAndLayersExtent");return t.equals(n)?n:t}get environment(){return this._environment}set environment(e){if(this._environment===e)return;const{_environment:t}=this;this._environment=null,t?.destroy(),this._environment=e,this.notifyChange("environment")}castEnvironment(e){return e?e instanceof ve?e:e instanceof _t?this.environment?.cloneWithWebsceneEnvironment(e)??ve.fromWebsceneEnvironment(e):O(ve,e):new ve}get extent(){return this.stateManager?.extent}set extent(e){this.stateManager&&(this.stateManager.extent=e)}get screenCenter(){return this.stateManager?.screenCenter}get frustum(){return this.stateManager?.frustum}get layerviewCollections(){return[this.basemapView?.baseLayerViews,this.basemapView?.groundLayerViews,this.groundView?.layerViews,this.layerViews,this.basemapView?.referenceLayerViews]}get _layerToLayerviewMapping(){return Mt._layerToLayerview}static{this._layerToLayerview=pe._layerToLayerview.concat([["view.map.ground.layers","view.groundView.layerViews"]])}get initialExtentRequired(){return this.stateManager&&!this.stateManager.hasInitialView}get defaultsFromMapSettings(){return{required:{tileInfo:!1,heightModelInfo:!0,extent:!1}}}get interacting(){return this.navigating||(this.toolViewManager?.interacting??!1)}get stationary(){return!this.animation&&!this.resizing&&(this.state?.stationary??!0)}get navigating(){return this.state?.navigating??!1}get scene(){return this.map&&ne in this.map?this.map:null}get padding(){return this.stateManager?.padding}set padding(e){this.stateManager&&(this.stateManager.padding=e)}get featureTiles(){return this._featureTiles}set qualityProfile(e){const t=Ue(e);t&&this._get("qualityProfile")!==e&&(this.qualitySettings=new We(t),this.stage?.renderView.updateQualitySettings(this.qualitySettings),this._set("qualityProfile",e))}get qualityProfile(){return this._get("qualityProfile")||Ge()}_updateSlice(){null!=this.stage&&(this.stage.renderer.slice=this.slice)}get typeSpecificPreconditionsReady(){return!!this.viewingMode&&!!this.stateManager?.preinit(this.spatialReference)}get resolution(){return null!=this.spatialReference?$(this.scale,this.spatialReference):0}get scale(){return this.stateManager?.scale}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get terrainLevel(){const e=this.basemapTerrain?.tilingScheme,t=this.scale;if(!e||!t)return null;const i=e.levelAtScale(t)+this.qualitySettings.tiledSurface.lodBias,r=e.getMaxLod();return i<=0?null:Math.max(0,Math.min(i,r||1/0))}get heightModelInfo(){const e=this.getDefaultHeightModelInfo();return null!=e?U.deriveUnitFromSR(e,this.spatialReference):null}get alphaCompositingEnabled(){return this._get("alphaCompositingEnabled")}set alphaCompositingEnabled(e){this._stage&&l.getLogger(this).warn("alphaCompositingEnabled cannot be changed after the view has become ready"),this._set("alphaCompositingEnabled",e)}get updating(){if(this.destroying||this.destroyed)return!1;let e=0,t=this.layerViewManager.updating,i=t?this.layerViewManager.updatingRemaining:0;this.allLayerViews.forEach(r=>{if(r.isFulfilled()){if(r.updating){if(t=!0,r.suspended||Ze(r))return;++i,e+=r.updatingProgress}}else++i});for(const s of this._updatingObjects)if(null!=s&&s.updating){const t=.1;i+=t,e+=.5*t}for(const s of this._updatingObjectsWithProgress)null!=s&&s.updating&&(++i,e+=s.updatingProgress);const r=!this.stateManager.test.updatingIgnoreRenderState&&this.state.updating;if(t=!!(t||i>0||this.updatingHandles.updating||!this.ready||!this.stationary||r||this._importControllers.size>0||this.inputManager?.updating||this.map?.allLayers?.some(e=>!e.isFulfilled())),t?(this._numUpdating=Math.max(i,this._numUpdating),e+=this._numUpdating-i):this._numUpdating=0,this._numUpdating>0?e/=this._numUpdating:e=t?0:1,this._get("updatingProgress")!==e){const i=performance.now();if(e<1){const t=Math.min((i-this._lastUpdateTime)/2e3,1);e=this.updatingProgress*(1-t)+e*t}this._set("updatingProgress",e),this._lastUpdateTime=t&&e<1?i:0}return t}get _updatingObjects(){return[this.graphicsView,this.basemapView,this._resourceController,this.stage,this.featureTiles,this.pointsOfInterest,this.environmentManager,this.overlay,this._featureTreeDebugger,this.toolViewManager,this.analysisViewManager]}get _updatingObjectsWithProgress(){return[this.deconflictor,this.labeler,this.basemapTerrain]}get viewingMode(){const e=this._predeterminedViewingMode;if(null!=e)return de(e);const t=this.spatialReference;return t?null!=this.defaultsFromMap?.viewingMode&&t.equals(this.defaultsFromMap.spatialReference)?de(this.defaultsFromMap.viewingMode):gt(t,1)?"global":"local":"global"}set viewingMode(e){this.ready?l.getLogger(this).error("#viewingMode","viewingMode cannot be set once view is ready"):this._overrideIfSome("viewingMode",e)}get viewpoint(){return this.stateManager?.viewpoint}set viewpoint(e){this.stateManager&&(this.stateManager.viewpoint=e)}get visibleArea(){return this.stateManager?.visibleArea}get zoom(){return this.stateManager.zoom}set zoom(e){this.stateManager&&(this.stateManager.zoom=e)}get highlightOptions(){return this.highlights.find(({name:e})=>e===pt)??new ht}set highlightOptions(e){for(let t=0;t<this.highlights.length;++t){if(this.highlights.at(t).name===pt)return void this.highlights.items[t].assignFrom(e)}}get resourceController(){return this._resourceController}get quality(){return this._resourceController?.memoryController?.memoryFactor??1}get resolutionScale(){return Math.sqrt(Math.min(1,this.quality/.75))}get performanceInfo(){return new ke(this)}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 l.getLogger(this).error("#toMap()","Scene view cannot be used before it is ready"),null;const i=ut(e)?ct(this,e):e;return Pe(this,i,t,this._defaultToMapOptions)}toScreen(e){if(!this.ready)return l.getLogger(this).error("#toScreen()","Scene view cannot be used before it is ready"),null;let t=e;return null==e.z&&(t=Ot,t.x=e.x,t.y=e.y,t.z=Ie(this.elevationProvider,e)??0,t.spatialReference=e.spatialReference),N(t,Tt,this.renderSpatialReference),this.state.camera.projectToScreen(Tt,Rt),V(Rt[0],Rt[1])}pixelSizeAt(e,t){if(!this.ready)return l.getLogger(this).error("#pixelSizeAt()","Scene view cannot be used before it is ready"),null;if(!e)return 0;const i=this.renderSpatialReference;N(e,Tt,i);const r=this.state.camera.computeScreenPixelSizeAt(Tt);return t&&i!==t?r*C(i)/C(t):r}overlayPixelSizeInMapUnits(e){return this.overlayManager?.overlayPixelSizeInMapUnits(e,()=>this.pixelSizeAt(e))??1}hitTest(e,t){if(!this.ready)return l.getLogger(this).error("#hitTest()","Scene view cannot be used before it is ready"),null;const i=ut(e)?ct(this,e):e;return Fe(this,i,t,this._defaultHitTestOptions)}async popupHitTest(e){return De(this,e)}goTo(e,t){return this.updatingHandles.addPromise(this.stateManager.goTo(e,t))}async whenAnalysisView(e){if(null==e.parent)throw new n("view:no-analysisview-for-analysis","The analysis does not exist in view.analyses",{analysis:e});switch(e.parent.type){case"line-of-sight":case"dimension":case"viewshed":return(await this.whenLayerView(e.parent)).whenAnalysisView();default:return this.analysisViewManager.whenAnalysisView(e)}}whenLayerView(e){return super.whenLayerView(e)}async takeScreenshot(e){const t=await this._completeSettings(e);await this.whenReady();const i=(await this.stage.renderView.takeScreenshot(t))[0];return(await import("./support/screenshotUtils.js")).encode(i,t,this._pixelFormat())}async _takeScreenshot(e){const t=await this._completeSettings(e);await this.whenReady();const i=(await this.stage.renderView.takeScreenshot(t))[0];return(await import("./support/screenshotUtils.js")).encodeData(i,this._pixelFormat())}async _takeScreenshotWithObjectAndLayerId(e){const t=await this._completeSettings(e);t.olidColor=!0,await this.whenReady();const i=await this.stage.renderView.takeScreenshot(t),{encodeData:r}=await import("./support/screenshotUtils.js");return[r(i[0],this._pixelFormat()),r(i[1],this._pixelFormat())]}async _completeSettings(e){const{toRenderSettings:t,screenshotSuperSampleSettings:i}=await import("./support/screenshotUtils.js"),r=t(e,this);return r.pixelRatio/=this.state.pixelRatio,i(r,this.supersampleScreenshotsEnabled,this.padding)}_pixelFormat(){return{flipY:!0,premultipliedAlpha:this.stage?.renderView.getAlpha()??!1}}get test(){}async takeScreenshotWithObjectAndLayerId(e){if(!tt())throw new n("360vr:objectAndLayerId-rendering-disabled","has enable-feature:objectAndLayerId-rendering must be true");const{encode:t}=await import("./support/screenshotUtils.js"),i=await this._completeSettings(e);i.olidColor=!0,await this.whenReady();const r=await this.stage.renderView.takeScreenshot(i),s=t(r[0],i,this._pixelFormat()),a=await this._completeSettings(e);a.format="png";return[s,t(r[1],a,this._pixelFormat())]}getColorToObjectAndLayerIdMapping(){const e=this.stage.renderView.olidRenderHelper;if(e)return e.getColorToObjectAndLayerIdMapping();throw new n("360vr:objectAndLayerId-rendering-disabled","has enable-feature:objectAndLayerId-rendering must be true")}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}getAttributionItems(){return super.getAttributionItems().concat(this.attribution3D.attributionItems)}importLayerView(e){return ge.importLayerView(e)}hasLayerViewModule(e){return ge.hasLayerViewModule(e)}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){return this.scene?.initialViewProperties?.spatialReference||this.defaultsFromMap?.spatialReference||this.defaultsFromMap?.ready&&this._initialDefaultSpatialReference||null}getSurface(){return this.surface}async validate(){let e=ft(this.type);const t=has("safari");if(t&&t<9&&(e=new n("sceneview:browser-not-supported","This browser is not supported by SceneView (Safari < 9)",{type:"safari",requiredVersion:9,detectedVersion:t})),null!=e)throw l.getLogger(this).warn("#validate()",e.message),e}get _predeterminedViewingMode(){const e=this._isOverridden("viewingMode")?this._get("viewingMode"):this.scene?.initialViewProperties?.viewingMode;return null!=e?ue(e):null}getSpatialReferenceSupport(e,t){const i=this._predeterminedViewingMode;if(null!=i)return this._validateSpatialReferenceForViewingMode(e,t,i)?{constraints:this._makeSpatialReferenceConstraints(e,t,i)}:null;const r=this._validateSpatialReferenceForViewingMode(e,t,2),s=this._validateSpatialReferenceForViewingMode(e,t,1);return r||s?r&&s?{constraints:this._makeSpatialReferenceConstraints(e,t,null)}:r?{constraints:this._makeSpatialReferenceConstraints(e,t,2)}:{constraints:this._makeSpatialReferenceConstraints(e,t,1)}:null}_validateSpatialReferenceForViewingMode(e,t,i){return!!gt(e,i)&&(null==t||(!!K(t)||(!X(t)||null!=$e(t,e,i))&&(!ee(t)||1!==i)))}_makeSpatialReferenceConstraints(e,t,i){if(null==t)return[{spatialReference:e,viewingMode:i}];const{isWebMercator:r,isWGS84:s}=e;if(K(t)&&(r||s)){return!s||2===i||null===Je(t.tileInfo,t.fullExtent,e,1)?[{spatialReference:e,viewingMode:i},{spatialReference:z.WebMercator,viewingMode:i}]:[{spatialReference:r?z.WGS84:z.WebMercator,viewingMode:i}]}return X(t)||ee(t)||!r&&!s?X(t)&&r&&1!==i?[{spatialReference:e,viewingMode:i},{spatialReference:z.WGS84,viewingMode:2}]:[{spatialReference:e,viewingMode:i}]:[{spatialReference:e,viewingMode:i},{spatialReference:r?z.WGS84:z.WebMercator,viewingMode:i}]}_validateSpatialReference(e){const t=null!=this.getSpatialReferenceSupport(e),i=this._predeterminedViewingMode;return t||(null!=i?l.getLogger(this).warnOnce(`Spatial reference defined on view not supported in ${de(i)} viewing mode.`):e.isGeographic&&l.getLogger(this).warnOnce("Spatial reference is geographic but not supported.")),t}whenReady(){return new Promise(e=>{this.ready?e(this):this._resolveWhenReady.push(e)})}trackGraphicState(e){if(!e.graphic)return l.getLogger(this).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&&null!=t&&"processor"in t&&"graphics-3d"===t.processor?.type&&t.processor.graphicsCore&&(i=t.processor.graphicsCore.trackGraphicState(e))};return null!=t?s(t):this.whenViewForGraphic(e.graphic,{waitForLayer:!0}).then(e=>s(e),()=>{}).catch(()=>{}),o(()=>{r=!0,null!=i&&(i.remove(),i=null)})}maskOccludee(e){if(!e)return l.getLogger(this).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&&null!=t&&dt(t)&&(i=t.maskOccludee(e))};return null!=t?s(t):this.whenViewForGraphic(e,{waitForLayer:!0}).then(e=>s(e),()=>{}).catch(()=>{}),o(()=>{r=!0,null!=i&&(i.remove(),i=null)})}getViewForGraphic(e){return e.layer===this?this.graphicsView:e.layer?this.allLayerViews.filter(e=>"media-3d"!==e.type).find(t=>t.layer===e.layer):null}graphicChanged(e){null!=this.graphicsView&&this.graphicsView.graphicChanged(e)}async whenViewForGraphic(e,t){return e.layer===this?(await v(()=>this.graphicsView),this.graphicsView):e.layer&&this.map?t&&t.waitForLayer&&!this.map.allLayers.includes(e.layer)?new Promise((t,i)=>{const r=this.map.allLayers.on("change",s=>{s.added.includes(e.layer)&&(r.remove(),this.whenLayerView(e.layer).then(t,i))})}):this.whenLayerView(e.layer):null}enableFeatureTiles(){const e=Symbol();return this._featureTileTreeClients.add(e),o(()=>this._featureTileTreeClients.delete(e))}async _importModule(e,t){const i=new AbortController;this._importControllers.set(e,i),this._updatingChanged();try{const r=await At[e]();if(t&&(d(this),u(i.signal),await t(i.signal)),this.destroyed)throw c();return u(i.signal),r}catch{return null}finally{this._importControllers.delete(e),this._updatingChanged()}}_abortImport(e){this._importControllers.get(e)?.abort(),this._importControllers.delete(e),this._updatingChanged()}_initBasemapTerrain(){this._set("basemapTerrain",new Ye({view:this})),this.elevationProvider.register(0,this.basemapTerrain)}_exitBasemapTerrain(){const{basemapTerrain:e,elevationProvider:t}=this;e&&(this._set("basemapTerrain",null),t.unregister(e),e.destroy())}_initGlobe(){this._initCoordinateSystem(),this.state.createInitialCamera(),this._initBasemapTerrain(),this._set("pointsOfInterest",new Qe({view:this})),this.addHandles([this.updatingHandles.add(()=>He.FEATURE_TILE_TREE_SHOW_TILES,e=>{e&&!this._featureTreeDebugger?this.updatingHandles.addPromise(import("./3d/layers/support/FeatureTileTree3DDebugger.js")).then(({FeatureTileTree3DDebugger:e})=>{!this._featureTreeDebugger&&He.FEATURE_TILE_TREE_SHOW_TILES&&(this._featureTreeDebugger=new e({view:this}))}):e||(this._featureTreeDebugger=p(this._featureTreeDebugger))},_),this.updatingHandles.add(()=>({basemapExtent:this.basemapTerrain?.extent,basemapSpatialReference:this.basemapTerrain?.spatialReference,clippingArea:this.clippingArea,featureTiles:this._featureTiles}),({basemapExtent:e,basemapSpatialReference:t,clippingArea:i,featureTiles:r})=>{if(!r)return;const s=!!e;if(i||s)if(s&&t){const s=e&&t?W(Q(e,t),this.spatialReference):null;r.filterExtent=i?i.intersection(s):s}else r.filterExtent=i;else r.filterExtent=null},_),this.updatingHandles.add(()=>this._featureTileTreeClients.size>0,e=>{e?this.updatingHandles.addPromise(this._ensureFeatureTileTree()):this._featureTiles=p(this._featureTiles)},w)],St),this.stateManager.init()}async _ensureFeatureTileTree(){if(this._featureTiles||this._importControllers.has("FeatureTileTree3D"))return;const e=(await this.updatingHandles.addPromise(this._importModule("FeatureTileTree3D")))?.FeatureTileTree3D;e&&(this._featureTiles=new e({renderCoordsHelper:this.renderCoordsHelper,pointsOfInterest:this.pointsOfInterest,viewState:this.state,scheduler:this._resourceController.scheduler,terrain:this.basemapTerrain}),this._updatingChanged())}_exitTerrain(){this.stateManager.exit(),this.removeHandles(Vt),this.removeHandles(St),this._featureTiles=p(this.featureTiles),this._set("pointsOfInterest",p(this.pointsOfInterest)),this._exitBasemapTerrain(),this.state.reset(),this._exitCoordinateSystem()}_initCoordinateSystem(){if(this.spatialReference){const e=this.spatialReference,t=this.state.isGlobal,i=Z(t,e);i!==this.renderSpatialReference&&(this._set("renderCoordsHelper",qe.create(this.state.viewingMode,i)),t||this.addHandles(y(()=>this.basemapTerrain?.extent,e=>{const t=this.renderCoordsHelper.spatialReference;null==e||0===e[0]&&0===e[1]&&0===e[2]&&0===e[3]||!B(e,this.basemapTerrain.spatialReference,xt,t)||(this.renderCoordsHelper.extent=xt)},w),Vt),this.sceneIntersectionHelper&&this.sceneIntersectionHelper.setTolerance(rt/this.renderCoordsHelper.unitInMeters))}else this._set("renderCoordsHelper",null)}_exitCoordinateSystem(){this.removeHandles(Vt),this._set("renderCoordsHelper",null)}_updatingChanged(){this.notifyChange("updating")}_updateUpdatingMonitors(e=null){null!=e&&4===e.type||(this.removeHandles("updatingMonitors"),this.allLayerViews.forEach(e=>{e.destroyed||(this.addHandles(y(()=>[e.updating,e.updatingProgress],()=>this._updatingChanged(),w),"updatingMonitors"),e.when(()=>this._updatingChanged(),()=>this._updatingChanged()))}),this._updatingChanged())}async _prepareScreenshotOverlay(){this.overlay&&await this.overlay.prepare()}_renderScreenshotOverlay(e,t,i){if(!this.overlay||!this.overlay.hasVisibleItems)return i;const r=e.getContext("2d",{willReadFrequently:!0});return r.putImageData(i,0,0),this.overlay.renderCanvas(e,{disableDecorations:t}),r.getImageData(0,0,i.width,i.height)}_initStage(){const e={deactivatedWebGLExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions,alpha:this.alphaCompositingEnabled,preserveDrawingBuffer:this.preserveDrawingBufferEnabled,canvas:this.renderCanvas,screenshot:{prepareOverlay:()=>this._prepareScreenshotOverlay(),renderOverlay:(e,t,i)=>this._renderScreenshotOverlay(e,t,i)}},t=new Oe(this.state.viewingMode,e=>this.stage.layers.forEach(e),this);this._set("sceneIntersectionHelper",t);const i=s(this.surface);this._stage=new et({view:this,options:e,container:i}),this.notifyChange("stage"),this._updateSlice(),this.addHandles([this.on("pointer-move",()=>this.stage?.renderer.resetAnimation()),a(this.stage.renderView.canvas,"webglcontextlost",e=>{this.fatalError=new n("webgl-context-lost",e.statusMessage)})],"stage"),this.renderCoordsHelper&&this.sceneIntersectionHelper.setTolerance(rt/this.renderCoordsHelper.unitInMeters),this._set("canvas",this.stage.renderView.canvas)}_exitStage(){this.sceneIntersectionHelper?.destroy(),this._set("sceneIntersectionHelper",null),this._stage=p(this.stage),this._set("stage",null),this.removeHandles("stage"),this._set("canvas",null)}_initSurface(){this._exitSurface(),this._initStage(),this._initGlobe(),this.sharedSymbolResources=new Be({view:this,resourceController:this._resourceController})}_exitSurface(){this.sharedSymbolResources&&(this.sharedSymbolResources.objectResourceCache.destroy(),this.sharedSymbolResources.destroy(),this.sharedSymbolResources=null,this._exitTerrain(),this._exitStage())}async _ensureGraphicsView(){if(this.graphicsView||this._importControllers.has("GraphicsView3D")||0===this.graphics.length)return;this.removeHandles("GraphicsView3D");const e=(await this.updatingHandles.addPromise(this._importModule("GraphicsView3D",e=>v(()=>this.basemapTerrain?.ready,e))))?.default;e&&this._set("graphicsView",new e({view:this,getGraphics:()=>this.graphics})),this._updatingChanged()}_disposeGraphicsView(){this._abortImport("GraphicsView3D"),this.removeHandles("GraphicsView3D"),this.graphicsView&&(this.removeHandles(this.graphicsView.processor.layer.id),this.graphicsView.destroy(),this._set("graphicsView",null))}_disposeFocusAreasView(){this._abortImport("FocusAreasView"),this.removeHandles("FocusAreasView"),this.focusAreasView=p(this.focusAreasView)}async _ensureFocusAreasView(e){if(this.focusAreasView||this._importControllers.has("FocusAreasView")||0===e)return;this.removeHandles("FocusAreasView");const t=(await this.updatingHandles.addPromise(this._importModule("FocusAreasView")))?.FocusAreasView;t&&(this.focusAreasView=new t({view:this})),this._updatingChanged()}_startup(){1===ue(this.viewingMode)&&(this._clippingArea=null),this._initSurface(),this._set("ready",!0),this.addHandles(m(()=>this.graphics,"after-changes",()=>this._ensureGraphicsView()),"GraphicsView3D"),this._ensureGraphicsView(),this.addHandles(y(()=>this.map?.focusAreas?.areas.length??0,e=>this._ensureFocusAreasView(e),{initial:!0}),"FocusAreasView");const e=this.scene?.initialViewProperties??null,t=e?.environment;t&&(this._overrideDefaultEnvironmentOnly?E(this.environment,t):this.environment=this.environment.cloneWithWebsceneEnvironment(t)),this.timeExtent=e?.timeExtent,e?.analyses.applyTo(this),this.labeler.setup(),this.environmentManager.connectView(this),this.inputManager.connect();const i=this._resolveWhenReady;this._resolveWhenReady=[],i.forEach(e=>e(this))}_teardown(){this._initialDefaultSpatialReference=null,this.inputManager.disconnect(),this.environmentManager.disconnectView(),this._overrideDefaultEnvironmentOnly=!1,this.labeler.dispose(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this._exitSurface(),this._set("ready",!1)}get _defaultToMapOptions(){const e={include:new Set};if(!this.map)return e;this.map.ground&&e.include.add(nt);for(const t of this.allLayerViews)te(t.layer)&&e.include.add(t.uid);return e}get _defaultHitTestOptions(){const e={exclude:new Set};if(!this.map)return e;this.map.ground&&this.map.ground.opacity<1&&e.exclude.add(nt);for(const t of this.allLayerViews)te(t.layer)&&t.layer.opacity<1&&e.exclude.add(t.uid);return e}static{this.type="3d"}static clearStatics(){bt(),L(),j(),at(),Re(),ye(),Ve(),k(),lt(),re(),Xe(),st(),xe(),Ae(),I(),M(),it(),Ke(),Se.cleanupI3SLodHandling(),ie.cleanupTilemapCache(),Ce.cleanupViewstate(),Ye.cleanupTerrainSurface()}};function Ct(e,t){return null!=e&&q(e.spatialReference,t)?W(e,t):null}e([T()],jt.prototype,"_userClippingArea",void 0),e([T()],jt.prototype,"_resourceController",void 0),e([T()],jt.prototype,"stage",null),e([T({readOnly:!0})],jt.prototype,"deconflictor",void 0),e([T({readOnly:!0})],jt.prototype,"labeler",void 0),e([T(P(se,"analyses"))],jt.prototype,"analyses",void 0),e([T({type:he,readOnly:!0})],jt.prototype,"animation",null),e([T({readOnly:!0})],jt.prototype,"basemapTerrain",void 0),e([T({readOnly:!0})],jt.prototype,"overlayManager",null),e([T({readOnly:!0})],jt.prototype,"elevationProvider",void 0),e([T()],jt.prototype,"camera",null),e([T({type:t})],jt.prototype,"contentCamera",null),e([T({readOnly:!0})],jt.prototype,"canvas",null),e([T({type:G,useTypeForAutocast:!1})],jt.prototype,"center",null),e([T({type:D})],jt.prototype,"clippingArea",null),e([T({type:fe,nonNullable:!0})],jt.prototype,"constraints",void 0),e([T({type:D,readOnly:!0})],jt.prototype,"renderDataExtent",null),e([T({readOnly:!0})],jt.prototype,"tileInfo",null),e([T({type:D,readOnly:!0})],jt.prototype,"dataExtent",null),e([T({type:D,readOnly:!0})],jt.prototype,"_groundAndLayersExtent",null),e([T({type:ve})],jt.prototype,"environment",null),e([R("environment")],jt.prototype,"castEnvironment",null),e([T({readOnly:!0})],jt.prototype,"environmentManager",void 0),e([T({type:D})],jt.prototype,"extent",null),e([T({type:r})],jt.prototype,"floors",void 0),e([T()],jt.prototype,"screenCenter",null),e([T()],jt.prototype,"frustum",null),e([T({type:Number,readOnly:!0})],jt.prototype,"fullOpacity",void 0),e([T({readOnly:!0})],jt.prototype,"graphicsView",void 0),e([T()],jt.prototype,"analysisViewManager",void 0),e([T()],jt.prototype,"groundView",void 0),e([T({readOnly:!0})],jt.prototype,"layerviewCollections",null),e([T({type:Boolean})],jt.prototype,"initialExtentRequired",null),e([T()],jt.prototype,"defaultsFromMapSettings",null),e([T()],jt.prototype,"interacting",null),e([T()],jt.prototype,"stationary",null),e([T()],jt.prototype,"navigating",null),e([T()],jt.prototype,"map",void 0),e([T()],jt.prototype,"padding",null),e([T({type:Qe,readOnly:!0})],jt.prototype,"pointsOfInterest",void 0),e([T()],jt.prototype,"_featureTiles",void 0),e([T()],jt.prototype,"featureTiles",null),e([T()],jt.prototype,"_featureTreeDebugger",void 0),e([T({constructOnly:!0})],jt.prototype,"deactivatedWebGLExtensions",void 0),e([T({constructOnly:!0})],jt.prototype,"debugWebGLExtensions",void 0),e([T({constructOnly:!0})],jt.prototype,"renderCanvas",void 0),e([T({constructOnly:!0})],jt.prototype,"state",void 0),e([T()],jt.prototype,"screenSizePerspective",void 0),e([T({readOnly:!0})],jt.prototype,"inputManager",void 0),e([T({readOnly:!0})],jt.prototype,"stateManager",void 0),e([T({type:["low","medium","high"]})],jt.prototype,"qualityProfile",null),e([T({type:We,get(){let e=this._get("qualitySettings");if(!e){const t=Ue(this.qualityProfile);e=new We(t)}return e}})],jt.prototype,"qualitySettings",void 0),e([T()],jt.prototype,"slice",void 0),e([T({readOnly:!0})],jt.prototype,"typeSpecificPreconditionsReady",null),e([T({readOnly:!0})],jt.prototype,"renderCoordsHelper",void 0),e([T({readOnly:!0})],jt.prototype,"sceneIntersectionHelper",void 0),e([T({type:Number,dependsOn:["scale","spatialReference"],readOnly:!0})],jt.prototype,"resolution",null),e([T({type:Number})],jt.prototype,"scale",null),e([T({readOnly:!0,type:Number})],jt.prototype,"terrainLevel",null),e([T()],jt.prototype,"heightModelInfo",null),e([T()],jt.prototype,"spatialReference",void 0),e([T({type:Boolean,value:!1})],jt.prototype,"alphaCompositingEnabled",null),e([T({constructOnly:!0})],jt.prototype,"preserveDrawingBufferEnabled",void 0),e([T({type:Boolean})],jt.prototype,"supersampleScreenshotsEnabled",void 0),e([T({readOnly:!0})],jt.prototype,"type",void 0),e([T(),R(e=>e instanceof wt?e:A(vt,e))],jt.prototype,"ui",void 0),e([T({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.updating","toolViewManager.updating","analysisViewManager.updating","state.updating","textures.updating"]})],jt.prototype,"updating",null),e([T()],jt.prototype,"_updatingObjects",null),e([T()],jt.prototype,"_updatingObjectsWithProgress",null),e([T({type:Number,readOnly:!0,dependsOn:["updating"]})],jt.prototype,"updatingProgress",void 0),e([T({type:["global","local"]})],jt.prototype,"viewingMode",null),e([T({type:i})],jt.prototype,"viewpoint",null),e([T({readOnly:!0})],jt.prototype,"visibleArea",null),e([T({type:Number})],jt.prototype,"zoom",null),e([T({type:ht})],jt.prototype,"highlightOptions",null),e([T({readOnly:!0})],jt.prototype,"quality",null),e([T({readOnly:!0})],jt.prototype,"resolutionScale",null),e([T()],jt.prototype,"focusAreasView",void 0),e([T()],jt.prototype,"_defaultToMapOptions",null),e([T()],jt.prototype,"_defaultHitTestOptions",null),jt=Mt=e([x("esri.views.SceneView")],jt);const Tt=H(),Rt=S(),xt=Y(),Ot=J(0,0,0,z.WebMercator),At={GraphicsView3D:()=>import("./3d/layers/GraphicsView3D.js"),FocusAreasView:()=>import("./3d/FocusAreasView.js"),FeatureTileTree3D:()=>import("./3d/layers/support/FeatureTileTree3D.js")},Et=jt;export{Et as default};
|
package/views/View.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import t from"../Map.js";import{createTask as i}from"../core/asyncUtils.js";import r from"../core/Collection.js";import a from"../core/CollectionFlattener.js";import{referenceSetter as s}from"../core/collectionUtils.js";import o from"../core/Error.js";import{EventedMixin as n}from"../core/Evented.js";import l from"../core/Handles.js";import{makeHandle as p}from"../core/handleUtils.js";import has from"../core/has.js";import{isLoadable as d}from"../core/Loadable.js";import h from"../core/Logger.js";import{destroyMaybe as y,abortMaybe as u}from"../core/maybe.js";import{EsriPromise as m}from"../core/Promise.js";import{after as c}from"../core/promiseUtils.js";import{watch as g,sync as f,whenOnce as w,when as v,syncAndInitial as _}from"../core/reactiveUtils.js";import{property as M,subclass as V}from"../core/accessorSupport/decorators.js";import{owningCollectionProperty as R}from"../core/support/OwningCollection.js";import{UpdatingHandles as S}from"../core/support/UpdatingHandles.js";import b from"../geometry/Extent.js";import T from"../geometry/HeightModelInfo.js";import E from"../geometry/SpatialReference.js";import{equals as j}from"../geometry/support/spatialReferenceUtils.js";import{AnalysesCollection as F}from"../support/AnalysesCollection.js";import{GraphicsCollection as L}from"../support/GraphicsCollection.js";import{system as x}from"../time/constants.js";import k from"../time/TimeExtent.js";import{isTimeZoneValid as C}from"../time/timeZoneUtils.js";import O from"./BasemapView.js";import H from"./Magnifier.js";import q from"./SelectionManager.js";import P from"./Theme.js";import{ToolViewManager as W}from"./ToolViewManager.js";import{makeDefaultHighlightOptions as Z}from"./3d/support/DefaultHighlights.js";import I from"./input/Input.js";import{ViewEvents as D}from"./input/ViewEvents.js";import A from"./navigation/Navigation.js";import{DefaultsFromMap as U}from"./support/DefaultsFromMap.js";import z from"./support/HighlightOptions.js";import N from"./support/LayerViewManager.js";import G from"./support/RequiredFieldsOptions.js";var $;let B=class extends(n(m)){static{$=this}constructor(e){super(e),this._userSpatialReference=null,this.handles=new l,this.updatingHandles=new S,this.allLayerViews=new a({getCollections:()=>this.layerviewCollections,getChildrenFunction:Q}),this.analyses=new F,this.animationsEnabled=!0,this.basemapView=null,this.dependencies={popup:void 0},this.displayFilterEnabled=!0,this.fatalError=null,this.graphics=new L,this.typeSpecificPreconditionsReady=!0,this.layerViews=new r,this.magnifier=new H,this.padding={left:0,top:0,right:0,bottom:0},this.ready=!1,this._readyStateWaitingTask=null,this.type=null,this.scale=null,this.updating=!1,this.initialExtentRequired=!0,this._lowPriorityCursorHandles=new r,this._highPriorityCursorHandles=new r,this.input=new I,this.navigation=new A,this.layerViewManager=null,this.analysisViewManager=null,this.isHeightModelInfoRequired=!1,this.width=null,this.height=null,this.resizing=!1,this.suspended=!1,this.viewEvents=new D(this),this.persistableViewModels=new r,this.requiredFieldsOptions=new G,this._isValid=!1,this._readyCycleForced=!1,this._lockedSpatialReference=null,this._userTimeZone=null,this._lockedTimeZone=null,this._userTimeExtent=null,this._lockedTimeExtent=null,this.theme=null,this.handles.add(g(()=>this.preconditionsReady,e=>{const t=this.ready;if(e?(this._lockedSpatialReference=this.spatialReference,this._lockedTimeZone=this.timeZone,this._lockedTimeExtent=this.timeExtent,$.views.add(this)):(this._lockedSpatialReference=null,$.views.remove(this)),this.notifyChange("spatialReference"),!e&&t)this.toolViewManager?.detach(),this.analysisViewManager?.detach(),this.layerViewManager?.clear(),this._teardown();else if(e&&!t){try{this._startup()}catch(i){return void queueMicrotask(()=>{this.fatalError=new o("view:startup-error","View._startup failed",i)})}this.analysisViewManager?.attach(),this.toolViewManager.attach()}},f))}initialize(){this.addResolvingPromise(Promise.all([this.loadAsyncDependencies(),this._validateWithErrorDisplay()]).then(()=>(this._isValid=!0,w(()=>this.ready)))),this.basemapView=new O({view:this}),this.layerViewManager=new N({view:this,layerViewFilter:e=>this.layerViewFilter?.(e)??!0,layerViewImporter:{importLayerView:e=>this.importLayerView(e),hasLayerViewModule:e=>this.hasLayerViewModule(e)},layerviewMapping:this._layerToLayerviewMapping}),this.toolViewManager=new W({view:this}),this.selectionManager=new q({view:this}),this.addHandles([v(()=>"map-content-error"===this.readyState&&!this.spatialReference,()=>{h.getLogger(this).warn("#spatialReference","no spatial reference could be derived from the currently added map layers")}),g(()=>this.initialExtentRequired,e=>this.defaultsFromMap.required={...this.defaultsFromMap.required,extent:e},_),g(()=>this.ready,e=>{this.defaultsFromMap&&(this.defaultsFromMap.suspended=e,this.defaultsFromMap.userSpatialReference=e?this.spatialReference:this._userSpatialReference)},f),g(()=>this._userSpatialReference,e=>{this.defaultsFromMap&&(this.defaultsFromMap.userSpatialReference=e)},_)])}get _layerToLayerviewMapping(){return $._layerToLayerview}static{this._layerToLayerview=[["view.map.basemap.baseLayers","view.basemapView.baseLayerViews"],["view.map.basemap.groundLayers","view.basemapView.groundLayerViews"],["view.map.basemap.referenceLayers","view.basemapView.referenceLayerViews"],["view.map.layers","view.layerViews"]]}destroy(){this.destroyed||($.views.remove(this),this.viewEvents.destroy(),this.allLayerViews.destroy(),this.navigation&&(this.navigation.destroy(),this._set("navigation",null)),this.graphics=y(this.graphics),this.analyses=y(this.analyses),this.defaultsFromMap.destroy(),this._set("defaultsFromMap",null),this.analysisViewManager=y(this.analysisViewManager),this.toolViewManager=y(this.toolViewManager),this.layerViewManager=y(this.layerViewManager),this.selectionManager=y(this.selectionManager),this.basemapView=y(this.basemapView),this.layerViews?.forEach(e=>e.destroy()),this.layerViews.length=0,this.invalidate(),this.handles.destroy(),this.map=y(this.map),this.updatingHandles.destroy())}_startup(){this._set("ready",!0)}_teardown(){this._set("ready",!1)}whenReady(){return Promise.resolve(this)}toMap(){return h.getLogger(this).error("#toMap()","Not implemented on this instance of View"),null}get activeTool(){return this.toolViewManager?.activeTool}set activeTool(e){this.toolViewManager&&(this.toolViewManager.activeTool=e)}get layerviewCollections(){return[this.basemapView?.baseLayerViews,this.basemapView?.groundLayerViews,this.layerViews,this.basemapView?.referenceLayerViews]}get animation(){return this._get("animation")}set animation(e){this._set("animation",e)}get center(){return null}get defaultsFromMapSettings(){return{}}get defaultsFromMap(){return new U({required:{tileInfo:!1,heightModelInfo:!1,extent:!1},map:()=>this.map,getSpatialReferenceSupport:(e,t)=>this.getSpatialReferenceSupport(e,t),...this.defaultsFromMapSettings})}get extent(){return this._get("extent")}set extent(e){this._set("extent",e)}get heightModelInfo(){return this.getDefaultHeightModelInfo()}get highlights(){return this._get("highlights")??Z()}set highlights(e){this._set("highlights",s(e,this._get("highlights"),r.ofType(z)))}get interacting(){return this.navigating}get navigating(){return!1}get preconditionsReady(){return!this.destroying&&!this.destroyed&&!(this.fatalError||!this._isValid||this._readyCycleForced||!this.map||d(this.map)&&!this.map.loaded||0===this.width||0===this.height||!this.spatialReference||!this._validateSpatialReference(this.spatialReference)||!this._lockedSpatialReference&&!this.defaultsFromMap?.ready||!this.typeSpecificPreconditionsReady)}get resolution(){return 0}set map(e){e!==this._get("map")&&(e?.destroyed&&(h.getLogger(this).warn("#map","The provided map is already destroyed",{map:e}),e=null),d(e)&&e.load().catch(()=>{}),this.constructed&&!this.destroyed&&(this.forceReadyCycle(),this._lockedSpatialReference=null),this._set("map",e))}get readyState(){if(this.destroyed)return this._get("readyState");if(!this.map)return"missing-map";if("container"in this&&!this.container)return"missing-container";if(this.fatalError)return"rendering-error";if((this.defaultsFromMap?.ready??!1)&&!this.spatialReference){const e=!("loaded"in this.map)||this.map.loaded,t=this.map.ground.loaded,r=this.map.basemap?.loaded??!0;return e&&r&&t&&!this.map?.allLayers.length?"empty-map":(this._readyStateWaitingTask||(this._readyStateWaitingTask=i(e=>c(has("view-readyState-waiting-delay"),null,e)),this.addHandles(this._readyStateWaitingTask),this.addHandles(this._readyStateWaitingTask,"ready-state-task")),this._readyStateWaitingTask?.finished?"map-content-error":"loading")}return this._readyStateWaitingTask=u(this._readyStateWaitingTask),this.removeHandles("ready-state-task"),this.ready?"ready":"loading"}get spatialReference(){const e=this._userSpatialReference||this._lockedSpatialReference||this.getDefaultSpatialReference()||null;if(e&&this.defaultsFromMap?.required?.heightModelInfo){const t=e.clone();return t.vcsWkid=this.defaultsFromMap.vcsWkid,t.latestVcsWkid=this.defaultsFromMap.latestVcsWkid,t}return e}set spatialReference(e){const t=!j(e,this._get("spatialReference"));this._set("_userSpatialReference",e),t&&(this._set("spatialReference",e),this._spatialReferenceChanged(e))}_spatialReferenceChanged(e){}get stationary(){return!this.animation&&!this.navigating&&!this.resizing}get timeExtent(){return this._userTimeExtent??this._lockedTimeExtent??this.getDefaultTimeExtent()??null}set timeExtent(e){this._userTimeExtent=e}get timeZone(){return this._userTimeZone??this._lockedTimeZone??this.getDefaultTimeZone()??x}set timeZone(e){this._userTimeZone=e,C(e)||h.getLogger(this).warn("#timeZone",`the parsed value '${e}' may not be a valid IANA time zone`)}get tools(){return this.toolViewManager?.tools}get initialExtent(){return this.defaultsFromMap?.extent}get cursor(){return this.toolViewManager?.cursor??this._highPriorityCursorHandles.at(-1)?.cursor??this._lowPriorityCursorHandles.at(-1)?.cursor??"default"}acquireCursor(e,t="low"){const i="high"===t?this._highPriorityCursorHandles:this._lowPriorityCursorHandles,r={cursor:e},a=p(()=>i.remove(r));return i.add(r),this.addHandles(a),a}get size(){return[this.width,this.height]}get effectiveTheme(){return this.theme??new P}whenLayerView(e){return this.layerViewManager?.whenLayerView(e)??Promise.reject()}getDefaultSpatialReference(){return this.defaultsFromMap?.spatialReference}getDefaultHeightModelInfo(){return(this.map&&"heightModelInfo"in this.map?this.map.heightModelInfo:void 0)??this.defaultsFromMap?.heightModelInfo??null}getDefaultTimeZone(){return null}getDefaultTimeExtent(){return null}getSurface(){return null}importLayerView(e){throw new o("view:importLayerView-missing","importLayerView() not implemented")}hasLayerViewModule(e){return!1}async validate(){}async loadAsyncDependencies(){}invalidate(){this._isValid=!1}getSpatialReferenceSupport(){return{constraints:null}}_validateSpatialReference(e){return null!=this.getSpatialReferenceSupport(e)}when(e,t){return this.isResolved()&&!this.ready&&h.getLogger(this).warn("#when()","Calling view.when() while the view is no longer ready but was already resolved once will resolve immediately. Use reactiveUtils.whenOnce(() => view.ready).then(...) instead."),super.when(e,t)}forceReadyCycle(){this.ready&&(v(()=>this.destroyed||!1===this.preconditionsReady,()=>this._readyCycleForced=!1,{once:!0}),this._readyCycleForced=!0)}on(e,t){return super.on(e,t)}addAndActivateTool(e){this.toolViewManager.tools.add(e),this.activeTool=e}tryFatalErrorRecovery(){this.fatalError=null}static{this.views=new r}async _validateWithErrorDisplay(){try{await this.validate()}catch(e){const t=document.createElement("div");t.setAttribute("style","display: flex; flex-direction: column; gap: 8px; padding: 20px; height: 100%; justify-content: center; color: black; background: white; font-family: sans-serif;");const i=document.createElement("div");i.innerHTML="Unable to display map. WebGL2 support is required.",i.setAttribute("style","font-size: 24px; font-weight: bold;");const r=document.createElement("div");r.innerHTML="Ensure that your browser and hardware meet the minimum requirements.",r.setAttribute("style","font-size: 18px;");const a=document.createElement("a");a.innerHTML="https://esriurl.com/webgl-faq",a.target="_blank",a.setAttribute("style","font-size: 18px;"),a.href="https://esriurl.com/webgl-faq",t.appendChild(i),t.appendChild(r),t.appendChild(a);const s=this.getSurface();throw s&&s.appendChild(t),e}}};e([M()],B.prototype,"_userSpatialReference",void 0),e([M()],B.prototype,"activeTool",null),e([M({readOnly:!0})],B.prototype,"allLayerViews",void 0),e([M({readOnly:!0})],B.prototype,"layerviewCollections",null),e([M(R(F,"analyses"))],B.prototype,"analyses",void 0),e([M()],B.prototype,"animation",null),e([M()],B.prototype,"animationsEnabled",void 0),e([M()],B.prototype,"basemapView",void 0),e([M()],B.prototype,"center",null),e([M()],B.prototype,"defaultsFromMapSettings",null),e([M()],B.prototype,"defaultsFromMap",null),e([M()],B.prototype,"dependencies",void 0),e([M()],B.prototype,"displayFilterEnabled",void 0),e([M({type:b})],B.prototype,"extent",null),e([M()],B.prototype,"fatalError",void 0),e([M(R(L,"graphics"))],B.prototype,"graphics",void 0),e([M({readOnly:!0,type:T})],B.prototype,"heightModelInfo",null),e([M({type:r.ofType(z)})],B.prototype,"highlights",null),e([M({readOnly:!0})],B.prototype,"interacting",null),e([M({constructOnly:!0})],B.prototype,"layerViewFilter",void 0),e([M({readOnly:!0})],B.prototype,"navigating",null),e([M({readOnly:!0,dependsOn:["fatalError","_isValid","_readyCycleForced","map","map.loaded?","width","height","spatialReference","_lockedSpatialReference","defaultsFromMap.ready","typeSpecificPreconditionsReady"]})],B.prototype,"preconditionsReady",null),e([M({readOnly:!0})],B.prototype,"typeSpecificPreconditionsReady",void 0),e([M({type:r,readOnly:!0})],B.prototype,"layerViews",void 0),e([M()],B.prototype,"resolution",null),e([M({type:H})],B.prototype,"magnifier",void 0),e([M({value:null,type:t})],B.prototype,"map",null),e([M()],B.prototype,"padding",void 0),e([M({readOnly:!0})],B.prototype,"ready",void 0),e([M()],B.prototype,"_readyStateWaitingTask",void 0),e([M({readOnly:!0})],B.prototype,"readyState",null),e([M({type:E})],B.prototype,"spatialReference",null),e([M()],B.prototype,"stationary",null),e([M({type:k})],B.prototype,"timeExtent",null),e([M({type:String,nonNullable:!0})],B.prototype,"timeZone",null),e([M()],B.prototype,"tools",null),e([M()],B.prototype,"toolViewManager",void 0),e([M({readOnly:!0})],B.prototype,"type",void 0),e([M({type:Number})],B.prototype,"scale",void 0),e([M({readOnly:!0})],B.prototype,"updating",void 0),e([M({readOnly:!0})],B.prototype,"initialExtentRequired",void 0),e([M({readOnly:!0})],B.prototype,"initialExtent",null),e([M()],B.prototype,"cursor",null),e([M({readOnly:!0})],B.prototype,"input",void 0),e([M({type:A,nonNullable:!0})],B.prototype,"navigation",void 0),e([M()],B.prototype,"layerViewManager",void 0),e([M()],B.prototype,"analysisViewManager",void 0),e([M()],B.prototype,"selectionManager",void 0),e([M()],B.prototype,"width",void 0),e([M()],B.prototype,"height",void 0),e([M({readOnly:!0})],B.prototype,"resizing",void 0),e([M({value:null,readOnly:!0})],B.prototype,"size",null),e([M({readOnly:!0})],B.prototype,"suspended",void 0),e([M({readOnly:!0})],B.prototype,"viewEvents",void 0),e([M({readOnly:!0})],B.prototype,"persistableViewModels",void 0),e([M()],B.prototype,"_isValid",void 0),e([M()],B.prototype,"_readyCycleForced",void 0),e([M()],B.prototype,"_lockedSpatialReference",void 0),e([M()],B.prototype,"_userTimeZone",void 0),e([M()],B.prototype,"_lockedTimeZone",void 0),e([M()],B.prototype,"_userTimeExtent",void 0),e([M()],B.prototype,"_lockedTimeExtent",void 0),e([M({type:P})],B.prototype,"theme",void 0),e([M({readOnly:!0,type:P})],B.prototype,"effectiveTheme",null),B=$=e([V("esri.views.View")],B);const J=globalThis.$arcgis;J&&!J.views&&Object.defineProperty(J,"views",{configurable:!1,enumerable:!0,writable:!1,value:B.views});const K=B;function Q(e){return e.layerViews}export{K as default};
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../Map.js";import{createTask as i}from"../core/asyncUtils.js";import r from"../core/Collection.js";import a from"../core/CollectionFlattener.js";import{referenceSetter as s}from"../core/collectionUtils.js";import o from"../core/Error.js";import{EventedMixin as n}from"../core/Evented.js";import l from"../core/Handles.js";import{makeHandle as p}from"../core/handleUtils.js";import has from"../core/has.js";import{isLoadable as d}from"../core/Loadable.js";import h from"../core/Logger.js";import{destroyMaybe as y,abortMaybe as u}from"../core/maybe.js";import{EsriPromise as m}from"../core/Promise.js";import{after as c}from"../core/promiseUtils.js";import{watch as g,sync as f,whenOnce as w,when as v,syncAndInitial as _}from"../core/reactiveUtils.js";import{property as V,subclass as M}from"../core/accessorSupport/decorators.js";import{owningCollectionProperty as b}from"../core/support/OwningCollection.js";import{UpdatingHandles as R}from"../core/support/UpdatingHandles.js";import S from"../geometry/Extent.js";import T from"../geometry/HeightModelInfo.js";import E from"../geometry/SpatialReference.js";import{equals as j}from"../geometry/support/spatialReferenceUtils.js";import{AnalysesCollection as F}from"../support/AnalysesCollection.js";import{GraphicsCollection as L}from"../support/GraphicsCollection.js";import{system as x}from"../time/constants.js";import k from"../time/TimeExtent.js";import{isTimeZoneValid as C}from"../time/timeZoneUtils.js";import O from"./BasemapView.js";import H from"./Magnifier.js";import I from"./SelectionManager.js";import q from"./Theme.js";import{ToolViewManager as P}from"./ToolViewManager.js";import{makeDefaultHighlightOptions as W}from"./3d/support/DefaultHighlights.js";import Z from"./input/Input.js";import{ViewEvents as D}from"./input/ViewEvents.js";import A from"./navigation/Navigation.js";import{deduplicateAttributionItems as U}from"./support/attributionUtils.js";import{DefaultsFromMap as z}from"./support/DefaultsFromMap.js";import N from"./support/HighlightOptions.js";import G from"./support/LayerViewManager.js";import $ from"./support/RequiredFieldsOptions.js";var B;let J=class extends(n(m)){static{B=this}constructor(e){super(e),this._userSpatialReference=null,this.handles=new l,this.updatingHandles=new R,this.allLayerViews=new a({getCollections:()=>this.layerviewCollections,getChildrenFunction:X}),this.analyses=new F,this.animationsEnabled=!0,this.attributionVisible=!0,this.basemapView=null,this.dependencies={popup:void 0},this.displayFilterEnabled=!0,this.fatalError=null,this.graphics=new L,this.typeSpecificPreconditionsReady=!0,this.layerViews=new r,this.magnifier=new H,this.padding={left:0,top:0,right:0,bottom:0},this.ready=!1,this._readyStateWaitingTask=null,this.type=null,this.scale=null,this.updating=!1,this.initialExtentRequired=!0,this._lowPriorityCursorHandles=new r,this._highPriorityCursorHandles=new r,this.input=new Z,this.navigation=new A,this.layerViewManager=null,this.analysisViewManager=null,this.isHeightModelInfoRequired=!1,this.width=null,this.height=null,this.resizing=!1,this.suspended=!1,this.viewEvents=new D(this),this.persistableViewModels=new r,this.requiredFieldsOptions=new $,this._isValid=!1,this._readyCycleForced=!1,this._lockedSpatialReference=null,this._userTimeZone=null,this._lockedTimeZone=null,this._userTimeExtent=null,this._lockedTimeExtent=null,this.theme=null,this.handles.add(g(()=>this.preconditionsReady,e=>{const t=this.ready;if(e?(this._lockedSpatialReference=this.spatialReference,this._lockedTimeZone=this.timeZone,this._lockedTimeExtent=this.timeExtent,B.views.add(this)):(this._lockedSpatialReference=null,B.views.remove(this)),this.notifyChange("spatialReference"),!e&&t)this.toolViewManager?.detach(),this.analysisViewManager?.detach(),this.layerViewManager?.clear(),this._teardown();else if(e&&!t){try{this._startup()}catch(i){return void queueMicrotask(()=>{this.fatalError=new o("view:startup-error","View._startup failed",i)})}this.analysisViewManager?.attach(),this.toolViewManager.attach()}},f))}initialize(){this.addResolvingPromise(Promise.all([this.loadAsyncDependencies(),this._validateWithErrorDisplay()]).then(()=>(this._isValid=!0,w(()=>this.ready)))),this.basemapView=new O({view:this}),this.layerViewManager=new G({view:this,layerViewFilter:e=>this.layerViewFilter?.(e)??!0,layerViewImporter:{importLayerView:e=>this.importLayerView(e),hasLayerViewModule:e=>this.hasLayerViewModule(e)},layerviewMapping:this._layerToLayerviewMapping}),this.toolViewManager=new P({view:this}),this.selectionManager=new I({view:this}),this.addHandles([v(()=>"map-content-error"===this.readyState&&!this.spatialReference,()=>{h.getLogger(this).warn("#spatialReference","no spatial reference could be derived from the currently added map layers")}),g(()=>this.initialExtentRequired,e=>this.defaultsFromMap.required={...this.defaultsFromMap.required,extent:e},_),g(()=>this.ready,e=>{this.defaultsFromMap&&(this.defaultsFromMap.suspended=e,this.defaultsFromMap.userSpatialReference=e?this.spatialReference:this._userSpatialReference)},f),g(()=>this._userSpatialReference,e=>{this.defaultsFromMap&&(this.defaultsFromMap.userSpatialReference=e)},_)])}get _layerToLayerviewMapping(){return B._layerToLayerview}static{this._layerToLayerview=[["view.map.basemap.baseLayers","view.basemapView.baseLayerViews"],["view.map.basemap.groundLayers","view.basemapView.groundLayerViews"],["view.map.basemap.referenceLayers","view.basemapView.referenceLayerViews"],["view.map.layers","view.layerViews"]]}destroy(){this.destroyed||(B.views.remove(this),this.viewEvents.destroy(),this.allLayerViews.destroy(),this.navigation&&(this.navigation.destroy(),this._set("navigation",null)),this.graphics=y(this.graphics),this.analyses=y(this.analyses),this.defaultsFromMap.destroy(),this._set("defaultsFromMap",null),this.analysisViewManager=y(this.analysisViewManager),this.toolViewManager=y(this.toolViewManager),this.layerViewManager=y(this.layerViewManager),this.selectionManager=y(this.selectionManager),this.basemapView=y(this.basemapView),this.layerViews?.forEach(e=>e.destroy()),this.layerViews.length=0,this.invalidate(),this.handles.destroy(),this.map=y(this.map),this.updatingHandles.destroy())}_startup(){this._set("ready",!0)}_teardown(){this._set("ready",!1)}whenReady(){return Promise.resolve(this)}toMap(){return h.getLogger(this).error("#toMap()","Not implemented on this instance of View"),null}get activeTool(){return this.toolViewManager?.activeTool}set activeTool(e){this.toolViewManager&&(this.toolViewManager.activeTool=e)}get layerviewCollections(){return[this.basemapView?.baseLayerViews,this.basemapView?.groundLayerViews,this.layerViews,this.basemapView?.referenceLayerViews]}get animation(){return this._get("animation")}set animation(e){this._set("animation",e)}get attributionItems(){return U(this._get("attributionItems"),this.getAttributionItems())}get center(){return null}get defaultsFromMapSettings(){return{}}get defaultsFromMap(){return new z({required:{tileInfo:!1,heightModelInfo:!1,extent:!1},map:()=>this.map,getSpatialReferenceSupport:(e,t)=>this.getSpatialReferenceSupport(e,t),...this.defaultsFromMapSettings})}get extent(){return this._get("extent")}set extent(e){this._set("extent",e)}get heightModelInfo(){return this.getDefaultHeightModelInfo()}get highlights(){return this._get("highlights")??W()}set highlights(e){this._set("highlights",s(e,this._get("highlights"),r.ofType(N)))}get interacting(){return this.navigating}get navigating(){return!1}get preconditionsReady(){return!this.destroying&&!this.destroyed&&!(this.fatalError||!this._isValid||this._readyCycleForced||!this.map||d(this.map)&&!this.map.loaded||0===this.width||0===this.height||!this.spatialReference||!this._validateSpatialReference(this.spatialReference)||!this._lockedSpatialReference&&!this.defaultsFromMap?.ready||!this.typeSpecificPreconditionsReady)}get resolution(){return 0}set map(e){e!==this._get("map")&&(e?.destroyed&&(h.getLogger(this).warn("#map","The provided map is already destroyed",{map:e}),e=null),d(e)&&e.load().catch(()=>{}),this.constructed&&!this.destroyed&&(this.forceReadyCycle(),this._lockedSpatialReference=null),this._set("map",e))}get readyState(){if(this.destroyed)return this._get("readyState");if(!this.map)return"missing-map";if("container"in this&&!this.container)return"missing-container";if(this.fatalError)return"rendering-error";if((this.defaultsFromMap?.ready??!1)&&!this.spatialReference){const e=!("loaded"in this.map)||this.map.loaded,t=this.map.ground.loaded,r=this.map.basemap?.loaded??!0;return e&&r&&t&&!this.map?.allLayers.length?"empty-map":(this._readyStateWaitingTask||(this._readyStateWaitingTask=i(e=>c(has("view-readyState-waiting-delay"),null,e)),this.addHandles(this._readyStateWaitingTask),this.addHandles(this._readyStateWaitingTask,"ready-state-task")),this._readyStateWaitingTask?.finished?"map-content-error":"loading")}return this._readyStateWaitingTask=u(this._readyStateWaitingTask),this.removeHandles("ready-state-task"),this.ready?"ready":"loading"}get spatialReference(){const e=this._userSpatialReference||this._lockedSpatialReference||this.getDefaultSpatialReference()||null;if(e&&this.defaultsFromMap?.required?.heightModelInfo){const t=e.clone();return t.vcsWkid=this.defaultsFromMap.vcsWkid,t.latestVcsWkid=this.defaultsFromMap.latestVcsWkid,t}return e}set spatialReference(e){const t=!j(e,this._get("spatialReference"));this._set("_userSpatialReference",e),t&&(this._set("spatialReference",e),this._spatialReferenceChanged(e))}_spatialReferenceChanged(e){}get stationary(){return!this.animation&&!this.navigating&&!this.resizing}get timeExtent(){return this._userTimeExtent??this._lockedTimeExtent??this.getDefaultTimeExtent()??null}set timeExtent(e){this._userTimeExtent=e}get timeZone(){return this._userTimeZone??this._lockedTimeZone??this.getDefaultTimeZone()??x}set timeZone(e){this._userTimeZone=e,C(e)||h.getLogger(this).warn("#timeZone",`the parsed value '${e}' may not be a valid IANA time zone`)}get tools(){return this.toolViewManager?.tools}get initialExtent(){return this.defaultsFromMap?.extent}get cursor(){return this.toolViewManager?.cursor??this._highPriorityCursorHandles.at(-1)?.cursor??this._lowPriorityCursorHandles.at(-1)?.cursor??"default"}acquireCursor(e,t="low"){const i="high"===t?this._highPriorityCursorHandles:this._lowPriorityCursorHandles,r={cursor:e},a=p(()=>i.remove(r));return i.add(r),this.addHandles(a),a}get size(){return[this.width,this.height]}get effectiveTheme(){return this.theme??new q}whenLayerView(e){return this.layerViewManager?.whenLayerView(e)??Promise.reject()}getAttributionItems(){return this.allLayerViews.items.flatMap(e=>e.attributionItems)}getDefaultSpatialReference(){return this.defaultsFromMap?.spatialReference}getDefaultHeightModelInfo(){return(this.map&&"heightModelInfo"in this.map?this.map.heightModelInfo:void 0)??this.defaultsFromMap?.heightModelInfo??null}getDefaultTimeZone(){return null}getDefaultTimeExtent(){return null}getSurface(){return null}importLayerView(e){throw new o("view:importLayerView-missing","importLayerView() not implemented")}hasLayerViewModule(e){return!1}async validate(){}async loadAsyncDependencies(){}invalidate(){this._isValid=!1}getSpatialReferenceSupport(){return{constraints:null}}_validateSpatialReference(e){return null!=this.getSpatialReferenceSupport(e)}when(e,t){return this.isResolved()&&!this.ready&&h.getLogger(this).warn("#when()","Calling view.when() while the view is no longer ready but was already resolved once will resolve immediately. Use reactiveUtils.whenOnce(() => view.ready).then(...) instead."),super.when(e,t)}forceReadyCycle(){this.ready&&(v(()=>this.destroyed||!1===this.preconditionsReady,()=>this._readyCycleForced=!1,{once:!0}),this._readyCycleForced=!0)}on(e,t){return super.on(e,t)}addAndActivateTool(e){this.toolViewManager.tools.add(e),this.activeTool=e}tryFatalErrorRecovery(){this.fatalError=null}static{this.views=new r}async _validateWithErrorDisplay(){try{await this.validate()}catch(e){const t=document.createElement("div");t.setAttribute("style","display: flex; flex-direction: column; gap: 8px; padding: 20px; height: 100%; justify-content: center; color: black; background: white; font-family: sans-serif;");const i=document.createElement("div");i.innerHTML="Unable to display map. WebGL2 support is required.",i.setAttribute("style","font-size: 24px; font-weight: bold;");const r=document.createElement("div");r.innerHTML="Ensure that your browser and hardware meet the minimum requirements.",r.setAttribute("style","font-size: 18px;");const a=document.createElement("a");a.innerHTML="https://esriurl.com/webgl-faq",a.target="_blank",a.setAttribute("style","font-size: 18px;"),a.href="https://esriurl.com/webgl-faq",t.appendChild(i),t.appendChild(r),t.appendChild(a);const s=this.getSurface();throw s&&s.appendChild(t),e}}};e([V()],J.prototype,"_userSpatialReference",void 0),e([V()],J.prototype,"activeTool",null),e([V({readOnly:!0})],J.prototype,"allLayerViews",void 0),e([V({readOnly:!0})],J.prototype,"layerviewCollections",null),e([V(b(F,"analyses"))],J.prototype,"analyses",void 0),e([V()],J.prototype,"animation",null),e([V()],J.prototype,"animationsEnabled",void 0),e([V({readOnly:!0})],J.prototype,"attributionItems",null),e([V()],J.prototype,"attributionVisible",void 0),e([V()],J.prototype,"basemapView",void 0),e([V()],J.prototype,"center",null),e([V()],J.prototype,"defaultsFromMapSettings",null),e([V()],J.prototype,"defaultsFromMap",null),e([V()],J.prototype,"dependencies",void 0),e([V()],J.prototype,"displayFilterEnabled",void 0),e([V({type:S})],J.prototype,"extent",null),e([V()],J.prototype,"fatalError",void 0),e([V(b(L,"graphics"))],J.prototype,"graphics",void 0),e([V({readOnly:!0,type:T})],J.prototype,"heightModelInfo",null),e([V({type:r.ofType(N)})],J.prototype,"highlights",null),e([V({readOnly:!0})],J.prototype,"interacting",null),e([V({constructOnly:!0})],J.prototype,"layerViewFilter",void 0),e([V({readOnly:!0})],J.prototype,"navigating",null),e([V({readOnly:!0,dependsOn:["fatalError","_isValid","_readyCycleForced","map","map.loaded?","width","height","spatialReference","_lockedSpatialReference","defaultsFromMap.ready","typeSpecificPreconditionsReady"]})],J.prototype,"preconditionsReady",null),e([V({readOnly:!0})],J.prototype,"typeSpecificPreconditionsReady",void 0),e([V({type:r,readOnly:!0})],J.prototype,"layerViews",void 0),e([V()],J.prototype,"resolution",null),e([V({type:H})],J.prototype,"magnifier",void 0),e([V({value:null,type:t})],J.prototype,"map",null),e([V()],J.prototype,"padding",void 0),e([V({readOnly:!0})],J.prototype,"ready",void 0),e([V()],J.prototype,"_readyStateWaitingTask",void 0),e([V({readOnly:!0})],J.prototype,"readyState",null),e([V({type:E})],J.prototype,"spatialReference",null),e([V()],J.prototype,"stationary",null),e([V({type:k})],J.prototype,"timeExtent",null),e([V({type:String,nonNullable:!0})],J.prototype,"timeZone",null),e([V()],J.prototype,"tools",null),e([V()],J.prototype,"toolViewManager",void 0),e([V({readOnly:!0})],J.prototype,"type",void 0),e([V({type:Number})],J.prototype,"scale",void 0),e([V({readOnly:!0})],J.prototype,"updating",void 0),e([V({readOnly:!0})],J.prototype,"initialExtentRequired",void 0),e([V({readOnly:!0})],J.prototype,"initialExtent",null),e([V()],J.prototype,"cursor",null),e([V({readOnly:!0})],J.prototype,"input",void 0),e([V({type:A,nonNullable:!0})],J.prototype,"navigation",void 0),e([V()],J.prototype,"layerViewManager",void 0),e([V()],J.prototype,"analysisViewManager",void 0),e([V()],J.prototype,"selectionManager",void 0),e([V()],J.prototype,"width",void 0),e([V()],J.prototype,"height",void 0),e([V({readOnly:!0})],J.prototype,"resizing",void 0),e([V({value:null,readOnly:!0})],J.prototype,"size",null),e([V({readOnly:!0})],J.prototype,"suspended",void 0),e([V({readOnly:!0})],J.prototype,"viewEvents",void 0),e([V({readOnly:!0})],J.prototype,"persistableViewModels",void 0),e([V()],J.prototype,"_isValid",void 0),e([V()],J.prototype,"_readyCycleForced",void 0),e([V()],J.prototype,"_lockedSpatialReference",void 0),e([V()],J.prototype,"_userTimeZone",void 0),e([V()],J.prototype,"_lockedTimeZone",void 0),e([V()],J.prototype,"_userTimeExtent",void 0),e([V()],J.prototype,"_lockedTimeExtent",void 0),e([V({type:q})],J.prototype,"theme",void 0),e([V({readOnly:!0,type:q})],J.prototype,"effectiveTheme",null),J=B=e([M("esri.views.View")],J);const K=globalThis.$arcgis;K&&!K.views&&Object.defineProperty(K,"views",{configurable:!1,enumerable:!0,writable:!1,value:J.views});const Q=J;function X(e){return e.layerViews}export{Q 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/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{floatEqualUlp as e,lerp as t}from"../../../core/mathUtils.js";import{throwIfAborted as n}from"../../../core/promiseUtils.js";import{getMetersPerUnitForSR as r}from"../../../core/units.js";import{distance as s,lerp as o}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{l as i}from"../../../chunks/vec32.js";import a
|
|
5
|
+
import{floatEqualUlp as e,lerp as t}from"../../../core/mathUtils.js";import{throwIfAborted as n}from"../../../core/promiseUtils.js";import{getMetersPerUnitForSR as r}from"../../../core/units.js";import{distance as s,lerp as o}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{l as i}from"../../../chunks/vec32.js";import{geodesicLengths as a,isSupported as c,inverseGeodeticSolver as u,directGeodeticSolver as l}from"../../../geometry/geodesicUtils.js";import f from"../../../geometry/Polyline.js";import{initializeProjection as h,project as p}from"../../../geometry/projectionUtils.js";import m from"../../../geometry/SpatialReference.js";import{getElevationOffset as d}from"../../../support/elevationInfoUtils.js";import{TooComplexError as g}from"./elevationProfileErrors.js";async function y(e,t,s,o,i,c,u){let l,f,d;const y=e.spatialReference,j=y.isGeographic||y.isWebMercator;let v=0;if(!j){const{execute:t}=await import("../../../geometry/operators/lengthOperator.js");n(u),v=t(e,{unit:"meters"}),n(u)}const P=1/r(o);if(j){await h([{source:y,dest:o},{source:y,dest:m.WGS84}],u);const n=q(e);l=a([n],"meters")[0];const r=w(l,i);if(C(e,l,r)>c)throw new g;const j=R(n,t,s);({densifiedPath:f,distances:d}=W(j,r,P)),f=p(f,o)}else{await h([{source:y,dest:o}],u),l=v;const r=w(l,i);if(C(e,l,r)>c)throw new g;const a=R(e,t,s);({densifiedPath:f,distances:d}=G(a,r,P)),n(u),f=p(f,o)}return{densifiedPath:f,pathLength:l*P,distances:d}}function w(e,t){const n=e/t.densificationMaxSamples;return Math.max(t.samplingDistance,n)}function R(e,t,n){if(null==t)return P(e);const r=e.spatialReference,s=t.mode,o=d(t,r);let i=null;switch(n.type){case"2d":i=j(e,s,o);break;case"3d":i=v(e,s,o,n)}return null==i?P(e):new f({hasZ:!0,hasM:!1,spatialReference:r,paths:Z(e.paths,i)})}function j({hasZ:e},t,n){return"absolute-height"===t?e?([e,t,r])=>[e,t,r+n]:([e,t])=>[e,t,n]:null}function v({spatialReference:e,hasZ:t},n,r,{elevationProvider:s}){const o=(t,n,r,o)=>s?.getElevation(t,n,r,e,o)??0;switch(n){case"on-the-ground":return([e,t])=>[e,t,o(e,t,0,"ground")];case"absolute-height":return t?([e,t,n])=>[e,t,n+r]:([e,t])=>[e,t,r];case"relative-to-ground":return t?([e,t,n])=>[e,t,n+o(e,t,n,"ground")+r]:([e,t])=>[e,t,o(e,t,0,"ground")+r];case"relative-to-scene":return t?([e,t,n])=>[e,t,n+o(e,t,n,"scene")+r]:([e,t])=>[e,t,o(e,t,0,"scene")+r];default:return null}}function P(e){return e.hasZ?new f({hasZ:!1,hasM:!1,spatialReference:e.spatialReference,paths:Z(e.paths,([e,t])=>[e,t])}):e}function Z(e,t){const n=e.length,r=new Array(n);for(let s=0;s<n;++s){const n=e[s],o=n.length,i=new Array(n.length);r[s]=i;for(let e=0;e<o;++e)i[e]=t(n[e])}return r}function M(e){return b(e)&&e.paths.some(e=>e.length>1)}function x(e){return S(e)&&M(e.geometry)}function S(e){return A(e)&&b(e?.geometry)}function b(e){return!A(e)&&null!=e&&"polyline"===e.type}function A(e){return null!=e&&"geometry"in e}function U(e){const t=e?.layer;return null!=t&&"graphics"===t.type&&t.internal}function z(t,n,s,o,i){const{spatialReference:a,hasZ:c}=t,u={from:null,to:null,distance:0,azimuth:0,reverseAzimuth:0,spatialReference:a,metersPerSR:r(a)},l=[],h=[];let p=0;for(let r=0;r<t.paths.length;++r){const a=t.paths[r],c=new Array,f=new Array;let m=0;for(let t=1;t<a.length;++t){const r=a[t-1],l=a[t],h=o(u,r,l);let d;for(d=m;d<h.distance&&!e(d,h.distance);d+=n)c.push(i(h,d)),f.push((p+d)*s);m=d-h.distance,p+=h.distance,c.push(l),f.push(p*s)}l[r]=c,h[r]=f}return{densifiedPath:new f({spatialReference:a,hasZ:c,paths:l}),distances:h}}function G(e,t,n){const{hasZ:r}=e;return z(e,t,n,E,r?O:L)}function W(e,t,n){const{hasZ:r}=e;return z(e,t,n,k,r?I:D)}function k(e,t,n){return e.distance=0,u(e,t,n,e.spatialReference),e.from=t,e.to=n,e}function E(e,t,n){return e.from=t,e.to=n,e.distance=s(n,t)*e.metersPerSR,e}function D({from:e,azimuth:t,spatialReference:n},r){return l([0,0],e,t,r,n)}function I({from:e,to:n,azimuth:r,distance:s,spatialReference:o},i){const a=i/s,c=[0,0,t(e[2],n[2],a)];return l(c,e,r,i,o),c}function L({from:e,to:t,distance:n},r){return o([0,0],e,t,r/n)}function O({from:e,to:t,distance:n},r){return i([0,0,0],e,t,r/n)}function q(e){return c(e.spatialReference)?e:p(e,m.WGS84)}function B(e){return e.paths.reduce((e,t)=>e+t.length,0)}function C(e,t,n){return B(e)+Math.floor(t/n)+Math.max(0,e.paths.reduce(e=>1+e,0)-1)}export{B as countPoints,y as densifyPath,A as isGraphic,U as isInternalGraphic,b as isPolyline,S as isPolylineGraphic,x as isValidInputGraphic,M as isValidInputPath,R as toAbsoluteHeightElevation};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{__decorate as t}from"tslib";import o from"../../../../core/Accessor.js";import{createTask as e}from"../../../../core/asyncUtils.js";import{makeHandle as i}from"../../../../core/handleUtils.js";import{destroyMaybe as s}from"../../../../core/maybe.js";import{throwIfAborted as n}from"../../../../core/promiseUtils.js";import{watch as r,when as a,syncAndInitial as l}from"../../../../core/reactiveUtils.js";import{property as p}from"../../../../core/accessorSupport/decorators.js";import{subclass as c}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as m}from"../../../../core/support/UpdatingHandles.js";import{absoluteHeightElevationInfo as u}from"../../../../support/elevationInfoUtils.js";import{getConstraintContext as d}from"../../../interactive/sketch/constraintUtils.js";import{makeTooltip as h}from"../../../interactive/tooltip/tooltipCommonUtils.js";import{DynamicTooltipInfo as f}from"../../../interactive/tooltip/infos/DynamicTooltipInfo.js";import{loadAutomaticAreaMeasurementUtils as g}from"../../../support/automaticAreaMeasurementUtils.js";import{loadAutomaticLengthMeasurementUtils as _}from"../../../support/automaticLengthMeasurementUtils.js";let y=class extends o{constructor(t){super(t),this.constraintsEnabled=!0,this._updatingHandles=new m,this._measurementUtilsLoadTask=null}initialize(){this.addHandles([r(()=>!!this.context?.sketchOptions?.tooltips.enabled,t=>{const{context:o}=this;t&&o?.view&&o.sketchOptions?(this._tooltipInfo??=new f({sketchOptions:o.sketchOptions,getAllFields:this.getAllFields,viewType:o.view.type}),this._tooltip??=h(()=>({view:o.view,options:o.sketchOptions.tooltips,info:this.tooltipInfo}))):(this._tooltip=s(this._tooltip),this._tooltipInfo=s(this._tooltipInfo))},l),a(()=>this._needsMeasurement,()=>{const t=e(async t=>{const[o,e]=await Promise.all([g(),_()]);n(t),this._automaticAreaMeasurementUtils=o,this._automaticLengthMeasurementUtils=e});this.addHandles(i(()=>t.abort())),this._updatingHandles.addPromise(t.promise)},{once:!0,initial:!0})])}destroy(){this._measurementUtilsLoadTask?.abort(),this._tooltip=s(this._tooltip),this._tooltipInfo=s(this._tooltipInfo)}set getAllFields(t){this._set("getAllFields",t),this.tooltipInfo&&(this.tooltipInfo.getAllFields=t)}get context(){return this.getDependencies?.()}get updating(){return this._updatingHandles.updating}get tooltip(){return this._tooltip}get tooltipInfo(){return this._tooltipInfo}get automaticLengthMeasurementUtils(){return this._automaticLengthMeasurementUtils}get automaticAreaMeasurementUtils(){return this._automaticAreaMeasurementUtils}get constraints(){const{tooltipInfo:t,context:o}=this,{view:e,editGeometryOperations:i,elevationInfo:s,sketchOptions:n}=o??{},r=this.getLastScreenPosition?.();if(!(r&&e&&t&&i&&n))return null;const{coordinateHelper:a,spatialReference:l}=i.data,p=e.toMap(r);if(!p)return null;const c=d(p,e,l,s??u,a.hasZ(),n.values.effectiveDirectionMode),m=t.knownConstraintFields,h={context:c};for(const u of m)switch(u.name){case"direction":case"distance":case"elevation":h[u.name]=u.committed;break;case"x":h[u.name]=U(u.committed),h.longitude=v(u.committed);break;case"y":h[u.name]=U(u.committed),h.latitude=v(u.committed)}return h}get _needsMeasurement(){return!!this.context?.sketchOptions.tooltips.enabled}};function v(t){return null!=t&&"unit"in t&&"rotationType"in t?t:null}function U(t){return null==t||"rotationType"in t?null:t}t([p()],y.prototype,"getDependencies",void 0),t([p()],y.prototype,"getLastScreenPosition",void 0),t([p()],y.prototype,"getAllFields",null),t([p()],y.prototype,"context",null),t([p()],y.prototype,"updating",null),t([p()],y.prototype,"tooltip",null),t([p()],y.prototype,"tooltipInfo",null),t([p()],y.prototype,"automaticLengthMeasurementUtils",null),t([p()],y.prototype,"automaticAreaMeasurementUtils",null),t([p()],y.prototype,"constraintsEnabled",void 0),t([p()],y.prototype,"constraints",null),t([p()],y.prototype,"_updatingHandles",void 0),t([p()],y.prototype,"_tooltip",void 0),t([p()],y.prototype,"_tooltipInfo",void 0),t([p()],y.prototype,"_automaticLengthMeasurementUtils",void 0),t([p()],y.prototype,"_automaticAreaMeasurementUtils",void 0),t([p()],y.prototype,"_needsMeasurement",null),y=t([c("esri.views.draw.support.managers.DrawTooltipManager")],y);export{y as DrawTooltipManager};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{valueInUnit as e,createAngle as n,createLength as t}from"../../../core/quantity.js";import{lengthUnitFromSpatialReference as r,verticalLengthUnitFromSpatialReference as o}from"../../../core/units.js";import{e as i,d as l,i as u}from"../../../chunks/vec32.js";import s
|
|
5
|
+
import{valueInUnit as e,createAngle as n,createLength as t}from"../../../core/quantity.js";import{lengthUnitFromSpatialReference as r,verticalLengthUnitFromSpatialReference as o}from"../../../core/units.js";import{e as i,d as l,i as u}from"../../../chunks/vec32.js";import{geodesicCompatibleSpatialReference as s}from"../../../geometry/geodesicUtils.js";import c from"../../../geometry/SpatialReference.js";import{projectVectorToVector as a}from"../../../geometry/projection/projectVectorToVector.js";import{makeDehydratedPoint as f}from"../../../layers/graphics/dehydratedPoint.js";import{getConvertedElevationFromXYZ as m}from"../../../support/elevationInfoUtils.js";import{CoordinateConstraint as d,VerticalCylinderConstraint as v,constraintOrSet as p,HorizontalPlaneConstraint as g,VerticalHalfPlaneConstraint as R,GeodesicConstraint as w,PointConstraint as j}from"./constraints.js";import{createWritable as y,fromPoint as h,toElevationAlignedDehydratedPoint as x}from"./normalizedPoint.js";import{getDegreesGeographic as S,directionBetweenPoints as I,pointFromDistanceAlongAzimuth as b}from"../../support/angularMeasurementUtils.js";function M(e,n,t,r,o,i){let l="geodesic",u=s(t);const c=y();return h(e,n,r,c),c[2]=0,u&&a(c,t,c,u)||(l="euclidean",u=t),{mode:l,view:n,elevationInfo:r,hasZ:o,directionMode:i,spatialReference:e.spatialReference,measurementSR:u,origin:c}}function U(n,t,o){if(null==t||null==n)return;const i=r(o.measurementSR);if(null==i)return;const l=W(n,o);if(null==l)return;const u=e(t,i);return new v(l,u)}function Z(e,t,r,o){if(null==r||null==e)return;const i=W(e,o);if(null==i)return;const l=S(r),u=10,s=e=>{if(null==e)return;const t=y(),r=n(e,"degrees","geographic");return b(t,i,o.measurementSR,u,r,o.mode)?new R(i,t):void 0},c=()=>{if(null!=t&&null!=e)return S(I(t,e))};switch(o.directionMode){case"absolute":return s(l);case"relative":{const e=c();if(null==e)return;return s(e+l)}case"relative-bilateral":{const e=c();if(null==e)return;return p([s(e+l),s(e-l)])}}}function P(e,n){const t=B(e,n);return null!=t?new g(t):void 0}function T(e,n,t){const{context:r,longitude:o,latitude:i,direction:l,distance:u,elevation:s}=t;if(null!=o||null!=i||null!=u||null!=s||null!=l){if(null!=o||null!=i){const e=S(o),n=S(i),t=B(s,r);return new d(e,n,t)}return V(e,n,t)}}function V(n,t,{context:r,direction:o,distance:i,elevation:l}){if(null==t)return P(l,r);const{view:u,elevationInfo:s,measurementSR:c}=r,f=h(t,u,s);if(!c||!a(f,t.spatialReference,D,c))return;const[m,d]=D,v=null!=i?e(i,"meters"):void 0,g=S(o),R=B(l,r),y=e=>{const n=new w([m,d],c,v,R,e);return null==v||null==e||null==R&&r.hasZ?n:new j(n.closestTo(f))};if(null==g)return y(void 0);const x=()=>{if(null!=n&&null!=t)return S(I(n,t))};switch(r.directionMode){case"absolute":return y(g);case"relative":{const e=x();if(null==e)return;return y(e+g)}case"relative-bilateral":{const e=x();if(null==e)return;return p([y(e+g),y(e-g)])}}}function k(e){return"geodesic"===e.context.mode?T(null,null,e):z(e)}function q(e,n,t){const{context:r,x:o,y:i,distance:l,direction:u,elevation:s}=t;return"geodesic"===r.mode?T(n,e,t):null!=o||null!=i?z(t):G([U(e,l,r),Z(e,n,u,r),P(s,r)])}function z({x:e,y:n,elevation:t,context:r}){H.x=e?.value??0,H.y=n?.value??0,H.spatialReference=r.spatialReference;const o=W(H,r,E);return new d(null!=e&&null!=o?o[0]:void 0,null!=n&&null!=o?o[1]:void 0,B(t,r))}function G(e){let n;for(const t of e)t&&(n=n?.intersect(t)??t);return n}function W(e,n,t=y()){const{view:r,elevationInfo:o,measurementSR:l,origin:u,mode:s}=n;if(h(e,r,o,t),a(t,e.spatialReference,t,l))return"geodesic"!==s&&i(t,t,u),t}function A(e,n,t,r){const{view:o,measurementSR:i,spatialReference:s,origin:c,mode:f}=t;if("geodesic"===f?l(F,e):u(F,e,c),a(F,i,F,s))return x(F,o,n,t,r)}function B(e,n){return C(e,n)?.value??void 0}function C(n,{view:r,origin:i,elevationInfo:l,hasZ:u,measurementSR:s}){if(null==n||!u)return;const c=o(s);if(null==c)return;const[a,f]=i,d=e(n,c),v="3d"===r?.type?m(r,a,f,d,s,l):d;return null!=v?t(v,c):void 0}const D=y(),E=y(),F=y(),H=f(0,0,0,c.WGS84);export{A as constraintSpaceToPoint,M as getConstraintContext,T as getGeodesicConstraint,k as getPointConstraint,q as getPolylineOrPolygonConstraint,G as intersectAll,W as pointToConstraintSpace};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{isSome as t,equals as e}from"../../../core/arrayUtils.js";import{asinClamped as s}from"../../../core/mathUtils.js";import{dot as r,subtract as n,squaredDistance as i,exactEquals as o,set as c}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{create as u}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{m as a,d as h,h as f,e as l,F as d,c as p,s as m,a as g,E as _,g as k,f as L,n as x}from"../../../chunks/vec32.js";import{create as y,UNIT_Z as z,fromValues as M,clone as P}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{s as T,g as q}from"../../../chunks/vec42.js";import{create as w}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{toRadians as j}from"../../../geometry/support/geodesicConstants.js";import{directGeodeticSolver as v,inverseGeodeticSolver as D,InverseGeodeticSolverResult as b}from"../../../geometry/support/geodesicUtils.js";import{create as R,fromPoints as A,fromPositionAndNormal as Z,intersectLine as U,signedDistance as E,projectPoint as I,getNormal as S,distance as C}from"../../../geometry/support/plane.js";import{Sphere as G}from"../../../geometry/support/sphere.js";import{tangentFrame as O}from"../../3d/support/mathUtils.js";import{clone as F,asVec2 as V,createWritable as B,create as H,fromValues as J,fromVec3 as K}from"./normalizedPoint.js";import{projectPointToVerticalPlane as N,isClose as Q,projectPointToVerticalCylinder as W,projectPointToLineLike as X,intersectLineLikes as Y,intersectVerticalPlaneAndLineLike as $,intersectLineLikeAndVerticalCylinder as tt,intersectLineLikeAndCircle as et,intersectVerticalPlanes as st,intersectVerticalPlaneAndVerticalCylinder as rt,intersectVerticalCylinders as nt,intersectVerticalPlaneAndPoint as it,vectorsHaveCloseZ as ot,isPointInsidePlane as ct,pointsInsidePlane as ut}from"../../support/geometry3dUtils.js";class at{intersect(t){return St(this,t)}closestPoints(t){return[this.closestTo(t)]}}class ht extends at{constructor(t){super(),this.point=t}equals(t){return this===t||le(t)&&a(this.point,t.point)}closestTo(){return F(this.point)}}class ft extends at{constructor(t,e,s){super(),this.start=t,this.end=e,this.lineLike={start:t,end:e,type:s}}equals(t){return this===t||de(t)&&this.lineLike.type===t.lineLike.type&&a(this.start,t.start)&&a(this.end,t.end)}closestTo(t){const e=B();return X(t,this.lineLike,e),e}}class lt extends ft{constructor(t,e){super(t,e,1)}}class dt extends ft{constructor(t,e){super(t,e,0)}}class pt extends at{constructor(t){super(),this.constraints=t}equals(t){return this===t||fe(t)&&e(this.constraints,t.constraints,(t,e)=>t.equals(e))}closestTo(t){let e,s=1/0;for(const r of this.constraints){const n=r.closestTo(t),i=m(t,n);i<s&&(s=i,e=n)}return F(e??t)}closestPoints(t){return this.constraints.flatMap(e=>e===this?[]:e.closestPoints(t))}}class mt extends at{constructor(t,e){super(),this.center=t,this.radius=e}equals(t){return this===t||ge(t)&&this.center[0]===t.center[0]&&this.center[1]===t.center[1]&&this.radius===t.radius}closestTo(t){const e=B();return W(t,this.center,this.radius,e),e}}class gt extends at{constructor(t,e){super(),this.center=t,this.radius=e}equals(t){return this===t||_e(t)&&a(this.center,t.center)&&this.radius===t.radius}closestTo(t){const e=B();return W(t,this.center,this.radius,e),e[2]=this.center[2],e}asCircle(){return new _t(F(this.center),this.radius,J(0,0,1))}}class _t extends at{constructor(t,e,s,r=void 0){super(),this.center=t,this.radius=e,this.normal=s,this.slicePlane=r}equals(t){return this===t||ke(t)&&a(this.center,t.center)&&a(this.normal,t.normal)&&this.radius===t.radius}closestTo(t){const{center:e,radius:s}=this;I(this.getPlane(Lt),t,kt);const r=g(kt,kt,e),n=_(r);if(Q(n,0))return F(t);const i=s/Math.sqrt(n),o=B();p(o,e,r,i);const{slicePlane:c}=this;if(c&&!ct(c,o)){const e=Ft(c,this);return e?.closestTo(t)??F(t)}return o}getPlane(t=R()){return Z(this.center,this.normal,t)}}const kt=y(),Lt=R();class xt extends at{constructor(t){super(),this.z=t}equals(t){return this===t||pe(t)&&this.z===t.z}closestTo(t){return J(t[0],t[1],this.z)}getPlane(t=R()){return f(yt,0,0,this.z),Z(yt,z,t)}}const yt=y();class zt extends at{constructor(t,e,s){super(),this.start=t,this.end=e,this.planeLike={start:V(t),end:V(e),type:s}}equals(t){return this===t||me(t)&&this.planeLike.type===t.planeLike.type&&a(this.start,t.start)&&a(this.end,t.end)}closestTo(t){const e=B();return N(t,this.planeLike,e),e}closestEndTo(t){const{start:e,end:s}=this.planeLike;return Math.sign(r(n(Mt,s,e),n(Pt,V(t),e)))>0?this.end:this.start}getPlane(t=R()){const e=h(Tt,this.end);return e[2]+=1,A(this.start,this.end,e,t)}getSlicePlane(t=R()){const{start:e,end:s,type:r}=this.planeLike;if(0===r)return;const n=f(Tt,e[0],e[1],0),i=f(qt,s[0],s[1],0),o=l(qt,i,n);return Z(n,o,t),t}}const Mt=u(),Pt=u(),Tt=y(),qt=y();class wt extends zt{constructor(t,e){super(t,e,1)}}class jt extends zt{constructor(t,e){super(t,e,0)}}class vt extends at{constructor(t,e){super(),this.sphere=new G(t,e),this._center=P(t)}equals(t){return this===t||Le(t)&&this.sphere.exactEquals(t.sphere)}closestTo(t){const e=B();return this.sphere.projectPoint(t,e),e}get center(){return this._center}get radius(){return this.sphere.radius}}class Dt extends at{constructor(t,e,s){super(),this.start=t,this.end=e,this.getZ=s,this.planeLike={start:V(t),end:V(e),type:0}}equals(t){return this===t||xe(t)&&a(this.start,t.start)&&a(this.end,t.end)&&this.getZ===t.getZ}closestTo(t){return It(this,t)}addIfOnTheGround(t,e){for(const s of e){const e=this.getZ(s[0],s[1])??0;Q(s[2],e)&&(s[2]=e,t.push(s))}}}class bt extends at{constructor(t,e,s){super(),this._x=t,this._y=e,this._z=s}equals(t){return this===t||ze(t)&&this._x===t._x&&this._y===t._y&&this._z===t._z}closestTo([t,e,s]){return H(this._x??t,this._y??e,this._z??s)}}class Rt extends at{constructor(t,e,s,r,n){super(),this._origin=t,this._spatialReference=e,this._distanceMeters=s,this._z=r,this._directionDegrees=n}equals(t){return this===t||ye(t)&&o(this._origin,t._origin)&&this._spatialReference===t._spatialReference&&this._distanceMeters===t._distanceMeters&&this._z===t._z&&this._directionDegrees===t._directionDegrees}closestTo([t,e,s]){return c(At,t,e),o(At,this._origin)||this._applyDirectionAndDistance(At),H(At[0],At[1],this._z??s)}_applyDirectionAndDistance(t){if(null!=this._directionDegrees&&null!=this._distanceMeters)v(t,this._origin,this._directionDegrees,this._distanceMeters,this._spatialReference);else if(null!=this._directionDegrees)Ut(t,this._origin,this._directionDegrees,t,this._spatialReference);else if(null!=this._distanceMeters){const{azimuth:e}=D(Zt,this._origin,t,this._spatialReference);v(t,this._origin,e??0,this._distanceMeters,this._spatialReference)}}}const At=[0,0],Zt=new b;function Ut(t,e,s,r,n){let{azimuth:i,distance:o}=D(Et,e,r,n);i??=0;let c=o*Math.cos((i-s)*j);c=Math.max(0,c),v(t,e,s,c,n)}const Et=new b;function It(t,e){const s=B();return N(e,t.planeLike,s),s[2]=t.getZ(s[0],s[1])??Me,s}function St(t,e){if(fe(t)){const s=[];for(const r of t.constraints){const t=r.intersect(e);t&&s.push(t)}return he(s)}if(fe(e))return St(e,t);if(xe(t))return oe(t,e);if(xe(e))return oe(e,t);if(le(t)){const{point:s}=t;if(le(e))return a(s,e.point)?t:void 0;const r=e.closestTo(s);return d(r,s)?t:void 0}if(de(t)){if(le(e))return St(e,t);if(de(e))return ue(Y(t.lineLike,e.lineLike));if(pe(e))return Ct(t,e);if(me(e))return ue($(e.planeLike,t.lineLike));if(ge(e))return ue(tt(t.lineLike,e.center,e.radius));if(ke(e))return ue(et(t.lineLike,e));if(_e(e))return Gt(t,e);if(Le(e))return Ot(t,e)}else if(pe(t)){if(le(e)||de(e))return St(e,t);if(pe(e))return Vt(t,e);if(me(e))return Bt(t,e);if(ge(e))return Ht(t,e);if(ke(e))return Kt(t,e);if(_e(e))return Jt(t,e);if(Le(e))return Nt(t,e)}else if(me(t)){if(le(e)||de(e)||pe(e))return St(e,t);if(me(e))return ce(st(t.planeLike,e.planeLike));if(ge(e))return ce(rt(t.planeLike,e.center,e.radius));if(ke(e))return Wt(t,e);if(_e(e))return Qt(t,e);if(Le(e))return Xt(t,e)}else if(ge(t)){if(le(e)||de(e)||pe(e)||me(e))return St(e,t);if(ge(e))return ce(nt(V(t.center),t.radius,V(e.center),e.radius));if(ke(e))return Yt();if(_e(e))return $t(t,e);if(Le(e))return te()}else if(ke(t)){if(le(e)||de(e)||pe(e)||me(e)||ge(e))return St(e,t);if(ke(e))return ee();if(_e(e))return ee(e.asCircle());if(Le(e))return se()}else if(_e(t)){if(le(e)||de(e)||pe(e)||me(e)||ge(e)||ke(e))return St(e,t);if(_e(e))return re(e,t);if(Le(e))return ne()}else if(Le(t)){if(le(e)||de(e)||pe(e)||me(e)||ge(e)||_e(e))return St(e,t);if(Le(e))return ie()}}const Ct=(()=>{const t=R();return(e,s)=>{const{start:r,end:n}=e;if(ot(r,n)&&Q(r[2],s.z))return e;const i=B();return U(s.getPlane(t),r,n,i)?new ht(i):void 0}})();function Gt({lineLike:t},{center:e,radius:s}){const r=e[2];return ue(tt(t,e,s).filter(t=>Q(t[2],r)))}function Ot({lineLike:t},{sphere:e}){return ue(e.intersectLine(t.start,t.end))}const Ft=(()=>{const t=w(),e=y(),r=y();return(n,i,o)=>{const{normal:c,center:u,radius:a}=i;O(c,e,r);const h=S(n),f=a*k(h,e),l=a*k(h,r);T(t,u[0],u[1],u[2],1);const d=q(n,t),m=Math.hypot(f,l),g=Q(m,0);if(Q(C(n,u),0)){if(g)return i;if(Q(a,0))return!o||ct(o,u)?new ht(F(u)):void 0;L(e,h,c),x(e,e);const t=new Array,s=P(u);p(s,s,e,a),o&&!ct(o,s)||t.push(s);const r=P(u);return p(r,r,e,-a),o&&!ct(o,r)||t.push(r),ue(t)}if(g)return;const _=-d/m;if(Math.abs(_)>1||Q(_,1))return;const z=Math.atan(f/l),M=s(_)-z,w=Math.PI-M,j=new Array,v=y();p(v,u,e,a*Math.cos(M)),p(v,v,r,a*Math.sin(M)),j.push(v);const D=y();return p(D,u,e,a*Math.cos(w)),p(D,D,r,a*Math.sin(w)),j.push(D),ue(o?ut(o,j):j)}})();function Vt(t,e){return Q(t.z,e.z)?t:void 0}function Bt({z:t},{planeLike:e}){const[s,r]=e.start,[n,i]=e.end,o=J(s,r,t),c=J(n,i,t);return 0===e.type?new lt(o,c):new dt(o,c)}function Ht(t,e){const[s,r]=e.center;return new gt(J(s,r,t.z),e.radius)}function Jt(t,e){return Q(e.center[2],t.z)?e:void 0}const Kt=(()=>{const t=R();return(e,s)=>Ft(e.getPlane(t),s,s.slicePlane)})();function Nt(t,{center:e,radius:s}){const r=Math.abs(e[2]-t.z);if(r>s&&!Q(r,s))return;const n=J(e[0],e[1],t.z),i=Math.sqrt(s**2-r**2);return Q(i,0)?void 0:new gt(n,i)}const Qt=(()=>{const t=R();return(e,{center:s,radius:r})=>{const n=rt(e.planeLike,s,r),i=s[2];e.getSlicePlane(t);const o=new Array;for(const[c,u]of n){const e=[c,u,i];ct(t,e)&&o.push(e)}return ue(o)}})(),Wt=(()=>{const t=R(),e=R();return(s,r)=>Ft(s.getPlane(t),r,s.getSlicePlane(e))})(),Xt=(()=>{const t=R();return(e,{center:s,radius:r})=>{const n=e.getPlane(t),i=E(n,s),o=Math.abs(i);if(o>r&&!Q(o,r))return;const c=Math.sqrt(r**2-i**2);if(Q(c,0)){const t=B();return I(n,s,t),new ht(t)}const u=B(),a=P(S(n));return p(u,s,a,i),new _t(u,c,a,e.getSlicePlane())}})();function Yt(t,e){}function $t(t,e){const s=i(V(t.center),V(e.center));if(Q(s,0)&&Q(t.radius,e.radius))return e;return ae(nt(V(t.center),t.radius,V(e.center),e.radius),e.center[2])}function te(t,e){}function ee(t,e){}function se(t,e){}function re(t,e){if(!ot(t.center,e.center))return;const s=i(V(t.center),V(e.center));if(Q(s,0)&&Q(t.radius,e.radius))return t;return ae(nt(V(t.center),t.radius,V(e.center),e.radius),t.center[2])}function ne(t,e){}function ie(t,e){}function oe(t,e){const{planeLike:s,getZ:r}=t,n=new Array;if(le(e))t.addIfOnTheGround(n,it(s,e.point));else if(de(e))t.addIfOnTheGround(n,$(s,e.lineLike));else if(ge(e))for(const[i,o]of rt(s,e.center,e.radius)){const t=r(i,o);null!=t&&n.push(M(i,o,t))}else if(me(e)||xe(e))for(const[i,o]of st(s,e.planeLike)){const t=r(i,o)??Me;n.push(M(i,o,t))}return ue(n)}function ce(t){return he(t.map(([t,e])=>{const s=J(t,e,0),r=J(t,e,1);return new lt(s,r)}))}function ue(t){return he(t.map(t=>t?new ht(K(t)):void 0))}function ae(t,e){return ue(t.map(([t,s])=>[t,s,e]))}function he(e){if(0!==e.length)return 1===e.length?e[0]??void 0:new pt(e.filter(t))}function fe(t){return t instanceof pt}function le(t){return t instanceof ht}function de(t){return t instanceof ft}function pe(t){return t instanceof xt}function me(t){return t instanceof zt}function ge(t){return t instanceof mt}function _e(t){return t instanceof gt}function ke(t){return t instanceof _t}function Le(t){return t instanceof vt}function xe(t){return t instanceof Dt}function ye(t){return t instanceof Rt}function ze(t){return t instanceof bt}const Me=0;export{_t as CircleConstraint,at as Constraint,bt as CoordinateConstraint,Dt as DrapedLineConstraint,Rt as GeodesicConstraint,gt as HorizontalCircleConstraint,xt as HorizontalPlaneConstraint,lt as LineConstraint,ft as LineLikeConstraint,ht as PointConstraint,dt as RayConstraint,pt as SetConstraint,vt as SphereConstraint,mt as VerticalCylinderConstraint,wt as VerticalHalfPlaneConstraint,jt as VerticalPlaneConstraint,zt as VerticalPlaneLikeConstraint,he as constraintOrSet,le as isPoint};
|
|
5
|
+
import{isSome as t,equals as e}from"../../../core/arrayUtils.js";import{asinClamped as s}from"../../../core/mathUtils.js";import{dot as r,subtract as n,squaredDistance as i,exactEquals as o,set as c}from"../../../core/libs/gl-matrix-2/math/vec2.js";import{create as u}from"../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{m as a,d as h,h as f,e as l,F as d,c as p,s as m,a as g,E as _,g as k,f as L,n as x}from"../../../chunks/vec32.js";import{create as y,UNIT_Z as z,fromValues as M,clone as P}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{s as T,g as q}from"../../../chunks/vec42.js";import{create as w}from"../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{directGeodeticSolver as j,inverseGeodeticSolver as v,InverseGeodeticSolverResult as D}from"../../../geometry/geodesicUtils.js";import{toRadians as b}from"../../../geometry/support/geodesicConstants.js";import{create as R,fromPoints as A,fromPositionAndNormal as Z,intersectLine as U,signedDistance as E,projectPoint as I,getNormal as S,distance as C}from"../../../geometry/support/plane.js";import{Sphere as G}from"../../../geometry/support/sphere.js";import{tangentFrame as O}from"../../3d/support/mathUtils.js";import{clone as F,asVec2 as V,createWritable as B,create as H,fromValues as J,fromVec3 as K}from"./normalizedPoint.js";import{projectPointToVerticalPlane as N,isClose as Q,projectPointToVerticalCylinder as W,projectPointToLineLike as X,intersectLineLikes as Y,intersectVerticalPlaneAndLineLike as $,intersectLineLikeAndVerticalCylinder as tt,intersectLineLikeAndCircle as et,intersectVerticalPlanes as st,intersectVerticalPlaneAndVerticalCylinder as rt,intersectVerticalCylinders as nt,intersectVerticalPlaneAndPoint as it,vectorsHaveCloseZ as ot,isPointInsidePlane as ct,pointsInsidePlane as ut}from"../../support/geometry3dUtils.js";class at{intersect(t){return St(this,t)}closestPoints(t){return[this.closestTo(t)]}}class ht extends at{constructor(t){super(),this.point=t}equals(t){return this===t||le(t)&&a(this.point,t.point)}closestTo(){return F(this.point)}}class ft extends at{constructor(t,e,s){super(),this.start=t,this.end=e,this.lineLike={start:t,end:e,type:s}}equals(t){return this===t||de(t)&&this.lineLike.type===t.lineLike.type&&a(this.start,t.start)&&a(this.end,t.end)}closestTo(t){const e=B();return X(t,this.lineLike,e),e}}class lt extends ft{constructor(t,e){super(t,e,1)}}class dt extends ft{constructor(t,e){super(t,e,0)}}class pt extends at{constructor(t){super(),this.constraints=t}equals(t){return this===t||fe(t)&&e(this.constraints,t.constraints,(t,e)=>t.equals(e))}closestTo(t){let e,s=1/0;for(const r of this.constraints){const n=r.closestTo(t),i=m(t,n);i<s&&(s=i,e=n)}return F(e??t)}closestPoints(t){return this.constraints.flatMap(e=>e===this?[]:e.closestPoints(t))}}class mt extends at{constructor(t,e){super(),this.center=t,this.radius=e}equals(t){return this===t||ge(t)&&this.center[0]===t.center[0]&&this.center[1]===t.center[1]&&this.radius===t.radius}closestTo(t){const e=B();return W(t,this.center,this.radius,e),e}}class gt extends at{constructor(t,e){super(),this.center=t,this.radius=e}equals(t){return this===t||_e(t)&&a(this.center,t.center)&&this.radius===t.radius}closestTo(t){const e=B();return W(t,this.center,this.radius,e),e[2]=this.center[2],e}asCircle(){return new _t(F(this.center),this.radius,J(0,0,1))}}class _t extends at{constructor(t,e,s,r){super(),this.center=t,this.radius=e,this.normal=s,this.slicePlane=r}equals(t){return this===t||ke(t)&&a(this.center,t.center)&&a(this.normal,t.normal)&&this.radius===t.radius}closestTo(t){const{center:e,radius:s}=this;I(this.getPlane(Lt),t,kt);const r=g(kt,kt,e),n=_(r);if(Q(n,0))return F(t);const i=s/Math.sqrt(n),o=B();p(o,e,r,i);const{slicePlane:c}=this;if(c&&!ct(c,o)){const e=Ft(c,this);return e?.closestTo(t)??F(t)}return o}getPlane(t=R()){return Z(this.center,this.normal,t)}}const kt=y(),Lt=R();class xt extends at{constructor(t){super(),this.z=t}equals(t){return this===t||pe(t)&&this.z===t.z}closestTo(t){return J(t[0],t[1],this.z)}getPlane(t=R()){return f(yt,0,0,this.z),Z(yt,z,t)}}const yt=y();class zt extends at{constructor(t,e,s){super(),this.start=t,this.end=e,this.planeLike={start:V(t),end:V(e),type:s}}equals(t){return this===t||me(t)&&this.planeLike.type===t.planeLike.type&&a(this.start,t.start)&&a(this.end,t.end)}closestTo(t){const e=B();return N(t,this.planeLike,e),e}closestEndTo(t){const{start:e,end:s}=this.planeLike;return Math.sign(r(n(Mt,s,e),n(Pt,V(t),e)))>0?this.end:this.start}getPlane(t=R()){const e=h(Tt,this.end);return e[2]+=1,A(this.start,this.end,e,t)}getSlicePlane(t=R()){const{start:e,end:s,type:r}=this.planeLike;if(0===r)return;const n=f(Tt,e[0],e[1],0),i=f(qt,s[0],s[1],0),o=l(qt,i,n);return Z(n,o,t),t}}const Mt=u(),Pt=u(),Tt=y(),qt=y();class wt extends zt{constructor(t,e){super(t,e,1)}}class jt extends zt{constructor(t,e){super(t,e,0)}}class vt extends at{constructor(t,e){super(),this.sphere=new G(t,e),this._center=P(t)}equals(t){return this===t||Le(t)&&this.sphere.exactEquals(t.sphere)}closestTo(t){const e=B();return this.sphere.projectPoint(t,e),e}get center(){return this._center}get radius(){return this.sphere.radius}}class Dt extends at{constructor(t,e,s){super(),this.start=t,this.end=e,this.getZ=s,this.planeLike={start:V(t),end:V(e),type:0}}equals(t){return this===t||xe(t)&&a(this.start,t.start)&&a(this.end,t.end)&&this.getZ===t.getZ}closestTo(t){return It(this,t)}addIfOnTheGround(t,e){for(const s of e){const e=this.getZ(s[0],s[1])??0;Q(s[2],e)&&(s[2]=e,t.push(s))}}}class bt extends at{constructor(t,e,s){super(),this._x=t,this._y=e,this._z=s}equals(t){return this===t||ze(t)&&this._x===t._x&&this._y===t._y&&this._z===t._z}closestTo([t,e,s]){return H(this._x??t,this._y??e,this._z??s)}}class Rt extends at{constructor(t,e,s,r,n){super(),this._origin=t,this._spatialReference=e,this._distanceMeters=s,this._z=r,this._directionDegrees=n}equals(t){return this===t||ye(t)&&o(this._origin,t._origin)&&this._spatialReference===t._spatialReference&&this._distanceMeters===t._distanceMeters&&this._z===t._z&&this._directionDegrees===t._directionDegrees}closestTo([t,e,s]){return c(At,t,e),o(At,this._origin)||this._applyDirectionAndDistance(At),H(At[0],At[1],this._z??s)}_applyDirectionAndDistance(t){if(null!=this._directionDegrees&&null!=this._distanceMeters)j(t,this._origin,this._directionDegrees,this._distanceMeters,this._spatialReference);else if(null!=this._directionDegrees)Ut(t,this._origin,this._directionDegrees,t,this._spatialReference);else if(null!=this._distanceMeters){const{azimuth:e}=v(Zt,this._origin,t,this._spatialReference);j(t,this._origin,e??0,this._distanceMeters,this._spatialReference)}}}const At=[0,0],Zt=new D;function Ut(t,e,s,r,n){let{azimuth:i,distance:o}=v(Et,e,r,n);i??=0;let c=o*Math.cos((i-s)*b);c=Math.max(0,c),j(t,e,s,c,n)}const Et=new D;function It(t,e){const s=B();return N(e,t.planeLike,s),s[2]=t.getZ(s[0],s[1])??Me,s}function St(t,e){if(fe(t)){const s=[];for(const r of t.constraints){const t=r.intersect(e);t&&s.push(t)}return he(s)}if(fe(e))return St(e,t);if(xe(t))return oe(t,e);if(xe(e))return oe(e,t);if(le(t)){const{point:s}=t;if(le(e))return a(s,e.point)?t:void 0;const r=e.closestTo(s);return d(r,s)?t:void 0}if(de(t)){if(le(e))return St(e,t);if(de(e))return ue(Y(t.lineLike,e.lineLike));if(pe(e))return Ct(t,e);if(me(e))return ue($(e.planeLike,t.lineLike));if(ge(e))return ue(tt(t.lineLike,e.center,e.radius));if(ke(e))return ue(et(t.lineLike,e));if(_e(e))return Gt(t,e);if(Le(e))return Ot(t,e)}else if(pe(t)){if(le(e)||de(e))return St(e,t);if(pe(e))return Vt(t,e);if(me(e))return Bt(t,e);if(ge(e))return Ht(t,e);if(ke(e))return Kt(t,e);if(_e(e))return Jt(t,e);if(Le(e))return Nt(t,e)}else if(me(t)){if(le(e)||de(e)||pe(e))return St(e,t);if(me(e))return ce(st(t.planeLike,e.planeLike));if(ge(e))return ce(rt(t.planeLike,e.center,e.radius));if(ke(e))return Wt(t,e);if(_e(e))return Qt(t,e);if(Le(e))return Xt(t,e)}else if(ge(t)){if(le(e)||de(e)||pe(e)||me(e))return St(e,t);if(ge(e))return ce(nt(V(t.center),t.radius,V(e.center),e.radius));if(ke(e))return Yt();if(_e(e))return $t(t,e);if(Le(e))return te()}else if(ke(t)){if(le(e)||de(e)||pe(e)||me(e)||ge(e))return St(e,t);if(ke(e))return ee();if(_e(e))return ee(e.asCircle());if(Le(e))return se()}else if(_e(t)){if(le(e)||de(e)||pe(e)||me(e)||ge(e)||ke(e))return St(e,t);if(_e(e))return re(e,t);if(Le(e))return ne()}else if(Le(t)){if(le(e)||de(e)||pe(e)||me(e)||ge(e)||_e(e))return St(e,t);if(Le(e))return ie()}}const Ct=(()=>{const t=R();return(e,s)=>{const{start:r,end:n}=e;if(ot(r,n)&&Q(r[2],s.z))return e;const i=B();return U(s.getPlane(t),r,n,i)?new ht(i):void 0}})();function Gt({lineLike:t},{center:e,radius:s}){const r=e[2];return ue(tt(t,e,s).filter(t=>Q(t[2],r)))}function Ot({lineLike:t},{sphere:e}){return ue(e.intersectLine(t.start,t.end))}const Ft=(()=>{const t=w(),e=y(),r=y();return(n,i,o)=>{const{normal:c,center:u,radius:a}=i;O(c,e,r);const h=S(n),f=a*k(h,e),l=a*k(h,r);T(t,u[0],u[1],u[2],1);const d=q(n,t),m=Math.hypot(f,l),g=Q(m,0);if(Q(C(n,u),0)){if(g)return i;if(Q(a,0))return!o||ct(o,u)?new ht(F(u)):void 0;L(e,h,c),x(e,e);const t=new Array,s=P(u);p(s,s,e,a),o&&!ct(o,s)||t.push(s);const r=P(u);return p(r,r,e,-a),o&&!ct(o,r)||t.push(r),ue(t)}if(g)return;const _=-d/m;if(Math.abs(_)>1||Q(_,1))return;const z=Math.atan(f/l),M=s(_)-z,w=Math.PI-M,j=new Array,v=y();p(v,u,e,a*Math.cos(M)),p(v,v,r,a*Math.sin(M)),j.push(v);const D=y();return p(D,u,e,a*Math.cos(w)),p(D,D,r,a*Math.sin(w)),j.push(D),ue(o?ut(o,j):j)}})();function Vt(t,e){return Q(t.z,e.z)?t:void 0}function Bt({z:t},{planeLike:e}){const[s,r]=e.start,[n,i]=e.end,o=J(s,r,t),c=J(n,i,t);return 0===e.type?new lt(o,c):new dt(o,c)}function Ht(t,e){const[s,r]=e.center;return new gt(J(s,r,t.z),e.radius)}function Jt(t,e){return Q(e.center[2],t.z)?e:void 0}const Kt=(()=>{const t=R();return(e,s)=>Ft(e.getPlane(t),s,s.slicePlane)})();function Nt(t,{center:e,radius:s}){const r=Math.abs(e[2]-t.z);if(r>s&&!Q(r,s))return;const n=J(e[0],e[1],t.z),i=Math.sqrt(s**2-r**2);return Q(i,0)?void 0:new gt(n,i)}const Qt=(()=>{const t=R();return(e,{center:s,radius:r})=>{const n=rt(e.planeLike,s,r),i=s[2];e.getSlicePlane(t);const o=new Array;for(const[c,u]of n){const e=[c,u,i];ct(t,e)&&o.push(e)}return ue(o)}})(),Wt=(()=>{const t=R(),e=R();return(s,r)=>Ft(s.getPlane(t),r,s.getSlicePlane(e))})(),Xt=(()=>{const t=R();return(e,{center:s,radius:r})=>{const n=e.getPlane(t),i=E(n,s),o=Math.abs(i);if(o>r&&!Q(o,r))return;const c=Math.sqrt(r**2-i**2);if(Q(c,0)){const t=B();return I(n,s,t),new ht(t)}const u=B(),a=P(S(n));return p(u,s,a,i),new _t(u,c,a,e.getSlicePlane())}})();function Yt(t,e){}function $t(t,e){const s=i(V(t.center),V(e.center));if(Q(s,0)&&Q(t.radius,e.radius))return e;return ae(nt(V(t.center),t.radius,V(e.center),e.radius),e.center[2])}function te(t,e){}function ee(t,e){}function se(t,e){}function re(t,e){if(!ot(t.center,e.center))return;const s=i(V(t.center),V(e.center));if(Q(s,0)&&Q(t.radius,e.radius))return t;return ae(nt(V(t.center),t.radius,V(e.center),e.radius),t.center[2])}function ne(t,e){}function ie(t,e){}function oe(t,e){const{planeLike:s,getZ:r}=t,n=new Array;if(le(e))t.addIfOnTheGround(n,it(s,e.point));else if(de(e))t.addIfOnTheGround(n,$(s,e.lineLike));else if(ge(e))for(const[i,o]of rt(s,e.center,e.radius)){const t=r(i,o);null!=t&&n.push(M(i,o,t))}else if(me(e)||xe(e))for(const[i,o]of st(s,e.planeLike)){const t=r(i,o)??Me;n.push(M(i,o,t))}return ue(n)}function ce(t){return he(t.map(([t,e])=>{const s=J(t,e,0),r=J(t,e,1);return new lt(s,r)}))}function ue(t){return he(t.map(t=>t?new ht(K(t)):void 0))}function ae(t,e){return ue(t.map(([t,s])=>[t,s,e]))}function he(e){if(0!==e.length)return 1===e.length?e[0]??void 0:new pt(e.filter(t))}function fe(t){return t instanceof pt}function le(t){return t instanceof ht}function de(t){return t instanceof ft}function pe(t){return t instanceof xt}function me(t){return t instanceof zt}function ge(t){return t instanceof mt}function _e(t){return t instanceof gt}function ke(t){return t instanceof _t}function Le(t){return t instanceof vt}function xe(t){return t instanceof Dt}function ye(t){return t instanceof Rt}function ze(t){return t instanceof bt}const Me=0;export{_t as CircleConstraint,at as Constraint,bt as CoordinateConstraint,Dt as DrapedLineConstraint,Rt as GeodesicConstraint,gt as HorizontalCircleConstraint,xt as HorizontalPlaneConstraint,lt as LineConstraint,ft as LineLikeConstraint,ht as PointConstraint,dt as RayConstraint,pt as SetConstraint,vt as SphereConstraint,mt as VerticalCylinderConstraint,wt as VerticalHalfPlaneConstraint,jt as VerticalPlaneConstraint,zt as VerticalPlaneLikeConstraint,he as constraintOrSet,le as isPoint};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{__decorate as t}from"tslib";import{subclass as o}from"../../../../core/accessorSupport/decorators.js";import{DrawHeaderActions as e}from"../components/DrawHeaderActions.js";import{Fields as i}from"./Fields.js";import{TooltipContent as s}from"./TooltipContent.js";import{tsx as n}from"../../../../widgets/support/widget.js";let r=class extends s{_renderContent(){const{fieldContext:t,info:o,mode:e}=this;return n(i,{context:t,fields:o.allFields,mode:e})}_renderActions(){const{xyMode:t,sketchOptions:o}=this.info,i=this.info.allFields.some(t=>"direction"===t.name);return n(e,{sketchOptions:o,visibleElements:{direction:"direction-distance"===t&&i}})}};r=t([o("esri.views.interactive.tooltip.content.TooltipContentDynamic")],r);export{r as TooltipContentDynamic};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{TooltipContentDrawCircle as t}from"./TooltipContentDrawCircle.js";import{TooltipContentDrawMesh as o}from"./TooltipContentDrawMesh.js";import{TooltipContentDrawPoint as n}from"./TooltipContentDrawPoint.js";import{TooltipContentDrawPolygon as e}from"./TooltipContentDrawPolygon.js";import{TooltipContentDrawPolyline as r}from"./TooltipContentDrawPolyline.js";import{TooltipContentDrawRectangle as i}from"./TooltipContentDrawRectangle.js";import{
|
|
5
|
+
import{TooltipContentDrawCircle as t}from"./TooltipContentDrawCircle.js";import{TooltipContentDrawMesh as o}from"./TooltipContentDrawMesh.js";import{TooltipContentDrawPoint as n}from"./TooltipContentDrawPoint.js";import{TooltipContentDrawPolygon as e}from"./TooltipContentDrawPolygon.js";import{TooltipContentDrawPolyline as r}from"./TooltipContentDrawPolyline.js";import{TooltipContentDrawRectangle as i}from"./TooltipContentDrawRectangle.js";import{TooltipContentDynamic as a}from"./TooltipContentDynamic.js";import{TooltipContentElevation as l}from"./TooltipContentElevation.js";import{TooltipContentExtentRotate as p}from"./TooltipContentExtentRotate.js";import{TooltipContentExtentScale as s}from"./TooltipContentExtentScale.js";import{TooltipContentMovePoint as c}from"./TooltipContentMovePoint.js";import{TooltipContentReshapeEdgeOffset as m}from"./TooltipContentReshapeEdgeOffset.js";import{TooltipContentSelectedVertex as f}from"./TooltipContentSelectedVertex.js";import{TooltipContentTransformMesh as w}from"./TooltipContentTransformMesh.js";import{TooltipContentTransformPoint as u}from"./TooltipContentTransformPoint.js";import{TooltipContentTranslate as T}from"./TooltipContentTranslate.js";import{TooltipContentTranslateVertex as C}from"./TooltipContentTranslateVertex.js";import{TooltipContentTranslateXY as j}from"./TooltipContentTranslateXY.js";import{TooltipContentTranslateZ as d}from"./TooltipContentTranslateZ.js";function x(x,y){if(null==y)return null;const h=document.createElement("div");switch(y.type){case"dynamic":return new a({tooltip:x,info:y,container:h});case"draw-point":case"draw-multipoint":return new n({tooltip:x,info:y,container:h});case"draw-polygon":return new e({tooltip:x,info:y,container:h});case"draw-polyline":return new r({tooltip:x,info:y,container:h});case"draw-mesh":return new o({tooltip:x,info:y,container:h});case"draw-rectangle":return new i({tooltip:x,info:y,container:h});case"draw-circle":return new t({tooltip:x,info:y,container:h});case"elevation":return new l({tooltip:x,info:y,container:h});case"extent-rotate":return new p({tooltip:x,info:y,container:h});case"extent-scale":return new s({tooltip:x,info:y,container:h});case"move-point":return new c({tooltip:x,info:y,container:h});case"selected-vertex":return new f({tooltip:x,info:y,container:h});case"transform-point":return new u({tooltip:x,info:y,container:h});case"transform-mesh":return new w({tooltip:x,info:y,container:h});case"translate":return new T({tooltip:x,info:y,container:h});case"translate-vertex":return new C({tooltip:x,info:y,container:h});case"translate-z":return new d({tooltip:x,info:y,container:h});case"translate-xy":return new j({tooltip:x,info:y,container:h});case"reshape-edge-offset":return new m({tooltip:x,info:y,container:h})}}export{x as tooltipContentFactory};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import
|
|
5
|
+
import{__decorate as t}from"tslib";import i from"../../../../core/Accessor.js";import{generateUUID as l}from"../../../../core/uuid.js";import{property as o,subclass as e}from"../../../../core/accessorSupport/decorators.js";let s=class extends i{constructor(t){super(t),this.actual=null,this.lockable=!0,this.id=l(),this.inputValue=null,this.readOnly=!1,this.suffix=null,this.visible=!0,this.invalid=!1,this.unlockOnVertexPlacement=!0,this.displayOrder=0}get committed(){return this.lockable?this._get("committed"):null}set committed(t){this.lockable&&this._set("committed",t)}get dirty(){return null!=this.inputValue}get disabled(){return null==this.actual&&!this.dirty&&!this.locked}get locked(){return this.lockable&&null!=this.committed}onInput(t){this.inputValue=t,this.invalid=!1}onCommit(t,i,l){this.lockable?this._onCommitLockable(t,l):this._onCommitNonLockable(l),this.invalid&&"commit-and-exit"===t||l.onCommit(i,t)}_onCommitLockable(t,i){const{inputValue:l,locked:o}=this;o&&n(l)?this.unlock():("commit-and-exit"===t&&!o||null!=l)&&this._parseInputAndLock(i)}_onCommitNonLockable(t){const{inputValue:i}=this;n(i)?this.lockable?this.setActual(null):this.clearInputValue():null!=i&&this._parseInputAndSetActual(t)}applyValue(t){this.lockable?this.lock(t):this.setActual(t)}clearInputValue(){this.inputValue=null,this.invalid=!1}setActual(t){this.actual=t,this.clearInputValue()}lock(t){this.lockable&&(this.committed=t??this.actual,this.clearInputValue())}unlock(){this.lockable&&(this.committed=null,this.clearInputValue())}toggleLock(t){this.lockable&&(this.locked?this.unlock():this._parseInputAndLock(t))}getSuffix(t){const{suffix:i}=this;return"function"==typeof i?i(t):i}getFormattedValue(t){const{actual:i,committed:l,format:o}=this;return null!=l?o(l,t):null!=i?o(i,t):null}getRawDisplayValue(t){const{actual:i,committed:l,inputValue:o}=this;return null!=o?o:this.lockable&&null!=l?this.formatForInputMode(l,t):null!=i?this.formatForInputMode(i,t):null}_parseInputAndSetActual(t){const{inputValue:i}=this;if(null==i||n(i))return this.setActual(null);const l=this.parse(i,t);null!=l?this.setActual(l):this.invalid=!0}_parseInputAndLock(t){const{inputValue:i,actual:l}=this;if(n(i))return this.unlock();if(null==i)return this.lock(l);const o=this.parse(i,t);null!=o?this.lock(o):this.invalid=!0}};function n(t){return null!=t&&""===t.trim()}t([o()],s.prototype,"actual",void 0),t([o()],s.prototype,"committed",null),t([o()],s.prototype,"dirty",null),t([o()],s.prototype,"disabled",null),t([o()],s.prototype,"format",void 0),t([o()],s.prototype,"formatForInputMode",void 0),t([o()],s.prototype,"lockable",void 0),t([o()],s.prototype,"locked",null),t([o()],s.prototype,"id",void 0),t([o()],s.prototype,"inputValue",void 0),t([o()],s.prototype,"name",void 0),t([o()],s.prototype,"parse",void 0),t([o()],s.prototype,"readOnly",void 0),t([o()],s.prototype,"suffix",void 0),t([o()],s.prototype,"title",void 0),t([o()],s.prototype,"visible",void 0),t([o()],s.prototype,"invalid",void 0),t([o()],s.prototype,"unlockOnVertexPlacement",void 0),t([o()],s.prototype,"displayOrder",void 0),s=t([e("esri.views.interactive.tooltip.fields.TooltipField")],s);export{s as TooltipField};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{__decorate as e}from"tslib";import{property as t,subclass as i}from"../../../../core/accessorSupport/decorators.js";import{SketchTooltipInfo as s}from"./SketchTooltipInfo.js";let n=class extends s{constructor(e){super(e),this.type="dynamic",this.xyMode="direction-distance",this._isVisibleField=e=>{switch(e.name){case"x":case"y":return this.visibleElements.coordinates;default:return this.visibleElements[e.name]}}}get availableFields(){return this.getAllFields?.()??[]}get elevation(){return this.allFields.find(e=>"elevation"===e.name)}get allFields(){const{availableFields:e,_useCoordinateDisplay:t,_useDirectionDistanceDisplay:i}=this;return(t?e.filter(l):i?e.filter(r):e).filter(this._isVisibleField).sort(o)}get knownConstraintFields(){return this.allFields.filter(a)}get _useCoordinateDisplay(){const{availableFields:e,xyMode:t}=this;return"coordinates"===t&&e.some(e=>"x"===e.name)&&e.some(e=>"y"===e.name)}get _useDirectionDistanceDisplay(){const{availableFields:e,xyMode:t}=this;return"direction-distance"===t&&e.some(e=>"distance"===e.name)&&e.some(e=>"direction"===e.name)}};function o(e,t){return e.displayOrder-t.displayOrder}function l(e){return"direction"!==e.name&&"distance"!==e.name}function r(e){return"x"!==e.name&&"y"!==e.name}function a(e){switch(e.name){case"direction":case"distance":case"elevation":case"x":case"y":return!0;default:return!1}}e([t()],n.prototype,"type",void 0),e([t()],n.prototype,"xyMode",void 0),e([t()],n.prototype,"getAllFields",void 0),e([t()],n.prototype,"availableFields",null),e([t()],n.prototype,"elevation",null),e([t()],n.prototype,"allFields",null),e([t()],n.prototype,"knownConstraintFields",null),e([t()],n.prototype,"_useCoordinateDisplay",null),e([t()],n.prototype,"_useDirectionDistanceDisplay",null),n=e([i("esri.views.interactive.tooltip.infos.DynamicTooltipInfo")],n);export{n as DynamicTooltipInfo};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{
|
|
5
|
+
import{DimensionLayerViewMixin as e}from"./DimensionLayerViewMixin.js";import i from"./LayerView.js";class r extends(e(i)){}export{r as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{__decorate as e}from"tslib";import s from"../../core/Collection.js";import{createAbortError as i}from"../../core/promiseUtils.js";import{property as t,subclass as n}from"../../core/accessorSupport/decorators.js";const l=l=>{const r=l;let a=class extends r{constructor(...e){super(...e),this.layer=null}get interactive(){return null!=this.analysisView&&this.analysisView.interactive}set interactive(e){null!=this.analysisView&&(this.analysisView.interactive=e)}get results(){return this.analysisView?.results??new s}get selectedDimension(){return null!=this.analysisView?this.analysisView.selectedDimension:null}set selectedDimension(e){null!=this.analysisView&&(this.analysisView.selectedDimension=e)}async createLengthDimensions(e){await(this.analysisView?.createLengthDimensions(e))}place(e){if(null!=this.analysisView)return this.analysisView?.place(e);throw i()}};return e([t()],a.prototype,"layer",void 0),e([t()],a.prototype,"interactive",null),e([t({readOnly:!0})],a.prototype,"results",null),e([t()],a.prototype,"selectedDimension",null),a=e([n("esri.views.layers.DimensionLayerViewMixin")],a),a};export{l as DimensionLayerViewMixin};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import"../../core/has.js";import t from"../../core/Logger.js";import{throwIfAborted as i}from"../../core/promiseUtils.js";import{watch as r,on as l,syncAndInitial as s}from"../../core/reactiveUtils.js";import{sqlOr as n,sqlIn as o,sqlAnd as a}from"../../core/sql.js";import{property as u,subclass as d}from"../../core/accessorSupport/decorators.js";import{getPopupProvider as f}from"../../graphic/getPopupProvider.js";import{getFeatureIdInfoFieldNames as p}from"../../layers/graphics/data/FeatureIdInfo.js";import{systemIsSpatialFieldName as y}from"../../layers/knowledgeGraph/constants.js";import{getEffectiveDisplayFilter as h}from"../../layers/support/displayFilterUtils.js";import m from"../../layers/support/FeatureEffect.js";import c from"../../layers/support/FeatureFilter.js";import{getSignedInUser as F}from"../../layers/support/featureLayerUtils.js";import{fetchFeaturePopupFeatures as g,loadFeaturePopupArcadeModules as I}from"../../layers/support/featurePopupQueryUtils.js";import{fixFields as w,unpackFieldNames as b,collectLabelingFields as v,collectElevationFields as E,collectFilterFields as x,collectFeatureReductionFields as q,collectOrderByInfos as R,collectFields as j,collectTrackInfoFields as _,collectDisplayFilterFields as C,collectField as O,featureHasFields as k}from"../../layers/support/fieldUtils.js";import{getFloorFilterClause as P}from"../../layers/support/floorFilterUtils.js";import{getUtilityNetworkFields as U}from"../../networks/support/networkFieldUtils.js";import L from"../../rest/support/Query.js";import{createFeatureIdInfo as S}from"../2d/layers/features/layerAdapters/featureServiceUtils.js";import{getFetchPopupTemplate as T,getRequiredFields as D}from"./support/popupUtils.js";import{WhereClauseVisitor as N}from"./support/WhereClauseVisitor.js";const Q=Q=>{const G=Q;let A=class extends G{constructor(...e){super(...e),this._updatingRequiredPromise=null,this.filter=null,this.layer=null,this.requiresCurrentUser=!1,this.requiredFields=[],this.view=null}initialize(){this.addHandles([r(()=>{const e=this.layer,t=this.view;return[e&&"elevationInfo"in e?e.elevationInfo?.featureExpressionInfo:null,e&&"displayField"in e?e.displayField:null,e&&"timeInfo"in e&&e.timeInfo,e&&"renderer"in e&&e.renderer,e&&"labelingInfo"in e&&e.labelingInfo,e&&"floorInfo"in e&&e.floorInfo,t?.requiredFieldsOptions?.featureTitleFields&&e&&"featureTitleFields"in e&&e.featureTitleFields,t?.requiredFieldsOptions?.utilityNetworkFields&&U(t,e),e.displayFilterInfo,this.displayFilterEnabled,this.filter,this.featureEffect,this.timeExtent,"knowledge-graph-sublayer"===e?.type&&"link-chart"===e.parentCompositeLayer.type&&e.parentCompositeLayer.linkChart?.linkChartProperties.nonspatialDataDisplay?.mode]},()=>this._handleChange(),s),l(()=>this.view?.floors,"change",()=>this._handleChange()),l(()=>this.layer.displayFilterInfo?.filters,"change",()=>this._handleChange()),l(()=>this.layer&&"sublayers"in this.layer?this.layer.sublayers:null,"change",()=>this._handleChange())])}get availableFields(){if(!this.layer)return[];const{layer:e,layer:{fieldsIndex:t},requiredFields:i}=this;return"outFields"in e&&e.outFields?w(t,[...b(t,e.outFields),...i]):w(t,i)}get displayFilterEnabled(){return(this.view?.displayFilterEnabled??!0)&&(!("displayFilterEnabled"in this.layer)||(this.layer?.displayFilterEnabled??!0))}get effectiveDisplayFilter(){const e=this.layer;return this.displayFilterEnabled&&e.displayFilterInfo?h(e.displayFilterInfo,this.view):null}get effectiveDisplayFilterClause(){const e=this.effectiveDisplayFilter?.where??null;return e&&this.hasHighlight?n(e,o(this.layer.objectIdField,this.highlightIds)):e}get featureEffect(){return this.layer&&"featureEffect"in this.layer?this.layer.featureEffect:null}set featureEffect(e){this._override("featureEffect",e)}get maximumNumberOfFeatures(){return 0}set maximumNumberOfFeatures(e){t.getLogger(this).error("#maximumNumberOfFeatures=","Setting maximum number of features is not supported")}get maximumNumberOfFeaturesExceeded(){return!1}get signedInUser(){return this.layer?.url?F(this.layer.url):Promise.resolve(null)}highlight(e,t){throw new Error("missing implementation")}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference},t=null!=this.filter?this.filter.createQuery(e):new L(e);return"floorInfo"in this.layer&&this.layer.floorInfo&&(t.where=a(t.where,P(this))),this.displayFilterEnabled&&(t.where=a(t.where,this.effectiveDisplayFilter?.where)),null!=this.timeExtent&&(t.timeExtent=null!=t.timeExtent?t.timeExtent.intersection(this.timeExtent):this.timeExtent.clone()),t}createAggregateQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return new L(e)}queryFeatures(e,t){throw new Error("missing implementation")}queryObjectIds(e,t){throw new Error("missing implementation")}queryFeatureCount(e,t){throw new Error("missing implementation")}queryExtent(e,t){throw new Error("missing implementation")}async fetchPopupFeaturesFromGraphics(e,t){const i=[],r=new Set;for(const s of e){const e=f(s.origin),l=T(e,{...t,checkPopupEnabled:!0});l&&(i.push(s),r.add(l))}if(0===i.length||0===r.size)return[];const l=await this._createPopupQuery(r,t);return await g(this.layer,i,l,{hasRequiredFields:(e,t)=>this._popupFeatureHasRequiredFields(e,t),...t})}_handleChange(){const e=Promise.all([this._updateRequiredFields(),this._updateClientWhereClauseRequirements()]).then(()=>{});return this._set("_updatingRequiredPromise",e),e.then(()=>{this._updatingRequiredPromise===e&&this._set("_updatingRequiredPromise",null)}),e}async _updateClientWhereClauseRequirements(){if(!this.layer||!this.view)return;const{layer:e}=this,i=new N(e.fieldsIndex);if(i.visitFilter(this.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"labelingInfo"in e&&i.visitLabelingInfo(e.labelsVisible,e.labelingInfo),"trackInfo"in e&&i.visitTrackInfo(e.trackInfo),"2d"===this.view.type&&(i.visitFilter(this.featureEffect?.filter),i.visitDisplayFilter(this.displayFilterEnabled,e.displayFilterInfo),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction)),"subtype-group"===e.type)for(const t of e.sublayers)i.visitLabelingInfo(t.labelsVisible,t.labelingInfo);try{const e=await i.finish();this._set("requiresCurrentUser",e.requiresCurrentUser)}catch(r){t.getLogger(this).error(r)}}async _updateRequiredFields(){if(!this.layer||!this.view)return;const e="3d"===this.view.type,{layer:i,layer:{fieldsIndex:r}}=this,l="renderer"in i&&i.renderer,s="orderBy"in i&&i.orderBy,n="featureReduction"in i?i.featureReduction:null,o=new Set,a=[l?l.collectRequiredFields(o,r):null,v(o,i),e&&"elevationInfo"in i?E(o,i):null,null!=this.filter?x(o,i,this.filter):null,e||null==this.featureEffect?null:x(o,i,this.featureEffect.filter),!e&&n?q(o,i,n):null,!e&&s?R(o,i,s):null];if("timeInfo"in i&&i.timeInfo&&this.timeExtent&&j(o,i.fieldsIndex,[i.timeInfo.startField,i.timeInfo.endField]),"timeInfo"in i&&i.timeInfo&&"trackInfo"in i&&i.trackInfo){const{trackInfo:e}=i;j(o,i.fieldsIndex,[i.timeInfo.trackIdField]),"feature"!==i.type&&"startTimeField"!==e.timeField||j(o,i.fieldsIndex,[i.timeInfo.startField]),"endTimeField"===e.timeField&&j(o,i.fieldsIndex,[i.timeInfo.endField]),await _(o,i)}if("floorInfo"in i&&i.floorInfo&&j(o,i.fieldsIndex,[i.floorInfo.floorField]),"featureTitleFields"in i&&this.view?.requiredFieldsOptions?.featureTitleFields&&i.featureTitleFields&&j(o,i.fieldsIndex,i.featureTitleFields),"feature"===i.type&&i.globalIdField&&this.view?.requiredFieldsOptions?.globalIdField&&j(o,i.fieldsIndex,[i.globalIdField]),this.displayFilterEnabled&&a.push(C(o,i,i.displayFilterInfo)),"feature"===i.type&&e&&null!=i.infoFor3D&&(null==i.globalIdField&&t.getLogger(this).error("globalIdField missing on 3DObjectFeatureLayer"),j(o,i.fieldsIndex,[i.globalIdField])),"subtype-group"===i.type){O(o,r,i.subtypeField);const e=i.sublayers.map(e=>Promise.all([e.renderer?.collectRequiredFields(o,r),v(o,e)]));a.push(Promise.all(e))}if("catalog-footprint"===i.type&&i.parent){const e=i.parent;j(o,r,[e.itemNameField,e.itemSourceField,e.itemTypeField,e.maxScaleField,e.minScaleField])}"knowledge-graph-sublayer"===i.type&&"link-chart"===i.parentCompositeLayer.type&&O(o,r,y);const u=await Promise.allSettled(a);if(e)O(o,r,i.objectIdField);else for(const t of p(S(i)))O(o,r,t);e&&"displayField"in i&&i.displayField&&O(o,r,i.displayField);for(const f of u)"rejected"===f.status&&t.getLogger(this).error(f.reason);const d=Array.from(o).sort();this._set("requiredFields",d)}_popupFeatureHasRequiredFields(e,t){return k(e,t)}async _createPopupQuery(e,t){const r=this.layer.createQuery(),l=new Set;let s="point"===this.layer.geometryType;for(const n of e){if(!s){const e=await I(n);i(t),s=(e&&e.arcadeUtils.hasGeometryOperations(n))??!1}const e=await D(this.layer,n);i(t);for(const t of e)l.add(t)}return r.returnGeometry=s,r.returnZ=s,r.returnM=s,r.outFields=Array.from(l),r.outSpatialReference=this.view.spatialReference,"floorInfo"in this.layer&&this.layer.floorInfo&&(r.where=a(r.where,P(this))),r}canResume(){return!!super.canResume()&&(null==this.timeExtent||!this.timeExtent.isEmpty)}getTest(){}get test(){}};return e([u()],A.prototype,"_updatingRequiredPromise",void 0),e([u({readOnly:!0})],A.prototype,"availableFields",null),e([u({readOnly:!0})],A.prototype,"displayFilterEnabled",null),e([u({readOnly:!0})],A.prototype,"effectiveDisplayFilter",null),e([u({readOnly:!0})],A.prototype,"effectiveDisplayFilterClause",null),e([u({type:m})],A.prototype,"featureEffect",null),e([u({type:c})],A.prototype,"filter",void 0),e([u()],A.prototype,"layer",void 0),e([u({type:Number})],A.prototype,"maximumNumberOfFeatures",null),e([u({readOnly:!0,type:Boolean})],A.prototype,"maximumNumberOfFeaturesExceeded",null),e([u()],A.prototype,"requiresCurrentUser",void 0),e([u({readOnly:!0})],A.prototype,"requiredFields",void 0),e([u({readOnly:!0})],A.prototype,"signedInUser",null),e([u()],A.prototype,"suspended",void 0),e([u()],A.prototype,"view",void 0),A=e([d("esri.views.layers.FeatureLayerView")],A),A};export{Q as default};
|
|
5
|
+
import{FeatureLayerViewMixin as e}from"./FeatureLayerViewMixin.js";import r from"./LayerView.js";class a extends(e(r)){}export{a as default};
|