@arcgis/core 4.23.0-next.20220123 → 4.23.0-next.20220128
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/Graphic.js +1 -1
- package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/02fbc76dfdc20e628c61.js +1 -0
- package/assets/esri/core/workers/chunks/0453fad5cb819797b4f6.js +1 -0
- package/assets/esri/core/workers/chunks/0463ba46df855a92b9c0.js +1 -0
- package/assets/esri/core/workers/chunks/0cd0a6eef51fc5b9ea61.js +1 -0
- package/assets/esri/core/workers/chunks/{d1454155ee1b8a421cbb.js → 0d02c6ad1f4688bfa374.js} +1 -1
- package/assets/esri/core/workers/chunks/0d684f16f37d5dc385dd.js +1 -0
- package/assets/esri/core/workers/chunks/0e17691520d890d34efb.js +1 -0
- package/assets/esri/core/workers/chunks/16b6d0f8378582c051c3.js +1 -0
- package/assets/esri/core/workers/chunks/{0ce1dc14280d6f188468.js → 17de7a324dfa7f57ad5d.js} +1 -1
- package/assets/esri/core/workers/chunks/{b313ab14a643273e7d09.js → 1877ab1b6a115dbba1c5.js} +1 -1
- package/assets/esri/core/workers/chunks/{c36f84daa7736878418d.js → 197ec52641aed20029c6.js} +1 -1
- package/assets/esri/core/workers/chunks/1b2a961f776a0b57e57a.js +1 -0
- package/assets/esri/core/workers/chunks/1b3fd66577b19aa5f2b6.js +1 -0
- package/assets/esri/core/workers/chunks/1c733b7db092a2a88ef3.js +1 -0
- package/assets/esri/core/workers/chunks/1f8c6a179e39fd4c5e6f.js +1 -0
- package/assets/esri/core/workers/chunks/2076fcbae63f1bfb7143.js +1 -0
- package/assets/esri/core/workers/chunks/{9387db408f496e7dd003.js → 214910032945dd2d86b0.js} +1 -1
- package/assets/esri/core/workers/chunks/{b2ae5fc4f787ea568b88.js → 2460f3b6ada6ae900dec.js} +1 -1
- package/assets/esri/core/workers/chunks/27474b007988855bea9d.js +1 -0
- package/assets/esri/core/workers/chunks/281b89dbf5574fc642ae.js +1 -0
- package/assets/esri/core/workers/chunks/{4d539878bfbd7c549e60.js → 2c8fe9bc988c3c5760a5.js} +1 -1
- package/assets/esri/core/workers/chunks/2e899ef5881b4ec6fa55.js +1 -0
- package/assets/esri/core/workers/chunks/34b59d7099904dcb28b5.js +1 -0
- package/assets/esri/core/workers/chunks/357033117dfe61eb81ea.js +1 -0
- package/assets/esri/core/workers/chunks/37c03cfc19086ce631c6.js +1 -0
- package/assets/esri/core/workers/chunks/391e96192d1ec4e55ce2.js +1 -0
- package/assets/esri/core/workers/chunks/3c673495e5f507c4a9e5.js +1 -0
- package/assets/esri/core/workers/chunks/422537fc3df707bb62c9.js +1 -0
- package/assets/esri/core/workers/chunks/44f0c3663b293afbd172.js +1 -0
- package/assets/esri/core/workers/chunks/483d5d8593d96d0f0b15.js +1 -0
- package/assets/esri/core/workers/chunks/{c959e0d1cf7dce0421b9.js → 48fa8aed6c24877b44c4.js} +1 -1
- package/assets/esri/core/workers/chunks/{44b01d42d4ec72913229.js → 4954fd86b48cc68b737c.js} +1 -1
- package/assets/esri/core/workers/chunks/49a1a633bb0d93764aae.js +1 -0
- package/assets/esri/core/workers/chunks/4ba6de8aa7e2960bad49.js +1 -0
- package/assets/esri/core/workers/chunks/4be35af7d6babbfe9d84.js +1 -0
- package/assets/esri/core/workers/chunks/5457962a70bd3c557a75.js +1 -0
- package/assets/esri/core/workers/chunks/57856b4a9b8784a69844.js +1 -0
- package/assets/esri/core/workers/chunks/{b9c177524b3e7de1ffd1.js → 5790d171072b3c7d108f.js} +1 -1
- package/assets/esri/core/workers/chunks/57b349d1dbc0bed75b79.js +1 -0
- package/assets/esri/core/workers/chunks/5bcb3240b3c005e5fe72.js +1 -0
- package/assets/esri/core/workers/chunks/5d11b97b667921d67ae7.js +1 -0
- package/assets/esri/core/workers/chunks/5dbe555a5a662ff3d9ce.js +1 -0
- package/assets/esri/core/workers/chunks/5ec98f4ddac707d0fbd1.js +1 -0
- package/assets/esri/core/workers/chunks/64b7e8d812ea8fcf269e.js +1 -0
- package/assets/esri/core/workers/chunks/{4c9084a04948b6924749.js → 655b55ac0cd533d7e9d7.js} +1 -1
- package/assets/esri/core/workers/chunks/{b0b036ad3ad3cd956747.js → 69fd99b7c76e9992ccf3.js} +1 -1
- package/assets/esri/core/workers/chunks/{9cdaba126ac7fa5f33f0.js → 6cd5e4380d29b9a3c344.js} +1 -1
- package/assets/esri/core/workers/chunks/75d812955a473d0e8960.js +1 -0
- package/assets/esri/core/workers/chunks/7903a3e2e0faff0f86c0.js +1 -0
- package/assets/esri/core/workers/chunks/{cc146c57bbdac8029fd8.js → 7a5f5acfbd4ca1a5c1f3.js} +1 -1
- package/assets/esri/core/workers/chunks/{64276aacaafa4c8a15bd.js → 7dcf52d3db3903c8eb9f.js} +1 -1
- package/assets/esri/core/workers/chunks/83d00afae4406ec78bc9.js +1 -0
- package/assets/esri/core/workers/chunks/{625d2663daa8e0cf64b0.js → 85b1f36790df95b17659.js} +1 -1
- package/assets/esri/core/workers/chunks/89820b200ee44e678af5.js +1 -0
- package/assets/esri/core/workers/chunks/918bb7a7d901544a7367.js +1 -0
- package/assets/esri/core/workers/chunks/{94b8dbf859df71858d1c.js → 929c9b7cdab7c4ca3d87.js} +1 -1
- package/assets/esri/core/workers/chunks/94515fb3ef38067eeadd.js +1 -0
- package/assets/esri/core/workers/chunks/949b2269457302ffc64b.js +1 -0
- package/assets/esri/core/workers/chunks/952980635afc7ec81804.js +1 -0
- package/assets/esri/core/workers/chunks/9876a1bae350795fab36.js +1 -0
- package/assets/esri/core/workers/chunks/99619fcb772807c74f3b.js +1 -0
- package/assets/esri/core/workers/chunks/{010a71c2aa1b7681e191.js → 9d11f84e6c893b9d0019.js} +1 -1
- package/assets/esri/core/workers/chunks/a1930e4f035bc9aa1ae5.js +1 -0
- package/assets/esri/core/workers/chunks/a8692bffb76444c34760.js +1 -0
- package/assets/esri/core/workers/chunks/aa04b90b82bf70caaae4.js +1 -0
- package/assets/esri/core/workers/chunks/aeaa1667c2d9f1b3366b.js +1 -0
- package/assets/esri/core/workers/chunks/b2d2de935487257c568b.js +1 -0
- package/assets/esri/core/workers/chunks/b3f5e91116112b0b612a.js +1 -0
- package/assets/esri/core/workers/chunks/b97953694f42bfec1b3c.js +1 -0
- package/assets/esri/core/workers/chunks/b9e9cb354822c6d995a4.js +1 -0
- package/assets/esri/core/workers/chunks/ba762bcfd74af0bb8218.js +1 -0
- package/assets/esri/core/workers/chunks/bac9fc90e6756e211160.js +1 -0
- package/assets/esri/core/workers/chunks/be588873c16770ceb9ef.js +1 -0
- package/assets/esri/core/workers/chunks/bf97a933ea3b220115e1.js +1 -0
- package/assets/esri/core/workers/chunks/bfedd6ebff817c9b31c0.js +1 -0
- package/assets/esri/core/workers/chunks/c093dff4592832ac0973.js +1 -0
- package/assets/esri/core/workers/chunks/c1135cb02ec46c491459.js +1 -0
- package/assets/esri/core/workers/chunks/c2253a9f29c1aabb2b75.js +1 -0
- package/assets/esri/core/workers/chunks/{d39b7983b68d6e5b404d.js → cdbc005eebec1503b99d.js} +1 -1
- package/assets/esri/core/workers/chunks/d04fca5d46cca02500b7.js +1 -0
- package/assets/esri/core/workers/chunks/d08efbc349dd9f999497.js +1 -0
- package/assets/esri/core/workers/chunks/d1fe53b597351dc58305.js +1 -0
- package/assets/esri/core/workers/chunks/{a8b13fb804bb775e4967.js → db3c729ce0c0b2690dc9.js} +1 -1
- package/assets/esri/core/workers/chunks/dd13772a5e2eccc6a2bc.js +1 -0
- package/assets/esri/core/workers/chunks/dedc333a61081772ca7b.js +1 -0
- package/assets/esri/core/workers/chunks/{a7b1b75643ed31489495.js → e0c8d61c7a85ce15499a.js} +1 -1
- package/assets/esri/core/workers/chunks/{199670a3a564ebe3bd79.js → e218bde41ffbcc5194f5.js} +1 -1
- package/assets/esri/core/workers/chunks/e21b211913aefde47e30.js +1 -0
- package/assets/esri/core/workers/chunks/e287f49184d076af17e2.js +1 -0
- package/assets/esri/core/workers/chunks/{bde1d5b0a7717350986e.js → e4019b63a1fe74e2c842.js} +1 -1
- package/assets/esri/core/workers/chunks/e8e775758b79c5a084c8.js +1 -0
- package/assets/esri/core/workers/chunks/e93dfdede0532a89ffa5.js +1 -0
- package/assets/esri/core/workers/chunks/e9e5196b44b6923be1a3.js +1 -0
- package/assets/esri/core/workers/chunks/ea595b0df5050eda2a13.js +1 -0
- package/assets/esri/core/workers/chunks/eb82ff10cef2bde6e57f.js +1 -0
- package/assets/esri/core/workers/chunks/ebc6f4764b82d4104c65.js +1 -0
- package/assets/esri/core/workers/chunks/{1305ef8717da6e902a55.js → ec10151a2a95e95a0bb5.js} +1 -1
- package/assets/esri/core/workers/chunks/eccba071ced2d922bb85.js +1 -0
- package/assets/esri/core/workers/chunks/ee6e0db58dc64410e687.js +1 -0
- package/assets/esri/core/workers/chunks/f0a9f161805fc7a30fc5.js +1 -0
- package/assets/esri/core/workers/chunks/f2124f4d0f2b8a91f0ea.js +1 -0
- package/assets/esri/core/workers/chunks/ff6abdc72076f3994659.js +981 -0
- package/assets/esri/libs/vxl/vxlLayer.wasm +0 -0
- package/assets/esri/themes/base/_mixins.scss +4 -1
- package/assets/esri/themes/base/icons/style.scss +11 -2
- package/assets/esri/themes/base/widgets/_BasemapLayerList.scss +13 -10
- package/assets/esri/themes/base/widgets/_CoordinateConversion.scss +4 -2
- package/assets/esri/themes/base/widgets/_Directions.scss +5 -3
- package/assets/esri/themes/base/widgets/_Editor.scss +5 -2
- package/assets/esri/themes/base/widgets/_ElevationProfile.scss +6 -4
- package/assets/esri/themes/base/widgets/_FeatureTable.scss +6 -0
- package/assets/esri/themes/base/widgets/_ItemList.scss +1 -1
- package/assets/esri/themes/base/widgets/_LayerList.scss +13 -9
- package/assets/esri/themes/base/widgets/_Popup.scss +4 -2
- package/assets/esri/themes/base/widgets/_Print.scss +24 -11
- package/assets/esri/themes/base/widgets/_Search.scss +4 -2
- package/assets/esri/themes/base/widgets/_TableList.scss +9 -7
- package/assets/esri/themes/base/widgets/_Weather.scss +12 -0
- package/assets/esri/themes/base/widgets/_Widget.scss +18 -9
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/dark-blue/main.css +1 -1
- package/assets/esri/themes/dark-green/main.css +1 -1
- package/assets/esri/themes/dark-purple/main.css +1 -1
- package/assets/esri/themes/dark-red/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/themes/light-blue/main.css +1 -1
- package/assets/esri/themes/light-green/main.css +1 -1
- package/assets/esri/themes/light-purple/main.css +1 -1
- package/assets/esri/themes/light-red/main.css +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ar.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_bg.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_bs.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ca.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_cs.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_da.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_de.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_el.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_en.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_es.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_et.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_fi.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_fr.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_he.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_hr.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_hu.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_id.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_it.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ja.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ko.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_lt.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_lv.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_nb.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_nl.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_pl.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_pt-BR.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_pt-PT.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ro.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_ru.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_sk.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_sl.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_sr.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_sv.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_th.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_tr.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_uk.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_vi.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_zh-CN.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_zh-HK.json +1 -1
- package/assets/esri/widgets/Weather/t9n/Weather_zh-TW.json +1 -1
- package/chunks/BlendLayers.glsl.js +2 -2
- package/chunks/ChapmanAtmosphere.glsl.js +17 -17
- package/chunks/CheckerBoard.glsl.js +3 -3
- package/chunks/Clouds.glsl.js +2 -2
- package/chunks/CloudsComposition.glsl.js +1 -1
- package/chunks/ColorMaterial.glsl.js +12 -12
- package/chunks/ComponentShader.glsl.js +21 -21
- package/chunks/Compositing.glsl.js +1 -1
- package/chunks/DefaultMaterial.glsl.js +33 -33
- package/chunks/EdgeShaderProgram.glsl.js +7 -7
- package/chunks/Fog.glsl.js +10 -12
- package/chunks/HUDMaterial.glsl.js +2 -2
- package/chunks/HighlightComposition.glsl.js +5 -5
- package/chunks/ImageMaterial.glsl.js +6 -6
- package/chunks/LaserlinePath.glsl.js +8 -8
- package/chunks/LineCallout.glsl.js +6 -6
- package/chunks/MeasurementArrow.glsl.js +1 -1
- package/chunks/NativeLine.glsl.js +1 -1
- package/chunks/Path.glsl.js +5 -5
- package/chunks/Pattern.glsl.js +9 -9
- package/chunks/PointRenderer.glsl.js +14 -14
- package/chunks/Precipitation.glsl.js +91 -0
- package/chunks/RealisticTree.glsl.js +21 -21
- package/chunks/RibbonLine.glsl.js +11 -11
- package/chunks/SMAA.glsl.js +40 -40
- package/chunks/ShadedColorMaterial.glsl.js +12 -12
- package/chunks/ShadowCast.glsl.js +6 -6
- package/chunks/ShadowHighlight.glsl.js +4 -4
- package/chunks/SimpleAtmosphere.glsl.js +3 -3
- package/chunks/SlicePlaneMaterial.glsl.js +3 -3
- package/chunks/Stars.glsl.js +3 -3
- package/chunks/Terrain.glsl.js +3 -3
- package/chunks/TextureOnly.glsl.js +2 -2
- package/chunks/WaterSurface.glsl.js +22 -22
- package/chunks/boundedPlane.js +1 -1
- package/chunks/pe.js +1 -1
- package/chunks/vec3.js +1 -1
- package/chunks/vxlLayer.js +1 -1
- package/core/accessorSupport/ensureType.js +1 -1
- package/core/accessorSupport/get.js +1 -1
- package/core/accessorSupport/read.js +1 -1
- package/core/accessorSupport/set.js +1 -1
- package/core/accessorSupport/watch.js +1 -1
- package/core/accessorSupport/write.js +1 -1
- package/core/clock.js +1 -1
- package/core/jsonMap.js +1 -1
- package/core/libs/gl-matrix-2/math/vec3.js +1 -1
- package/core/loadAll.js +1 -1
- package/core/promiseUtils.js +1 -1
- package/core/reactiveUtils.js +1 -1
- package/form/ExpressionInfo.js +1 -1
- package/geometry/pe.js +1 -1
- package/geometry/support/axisAngleDegrees.js +1 -1
- package/geometry/support/frustum.js +1 -1
- package/geometry/support/plane.js +1 -1
- package/interfaces.d.ts +263 -35
- package/layers/VectorTileLayer.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/featureConversionUtils.js +1 -1
- package/layers/support/LayerContingentValuesCache.js +1 -1
- package/layers/support/TileInfo.js +1 -1
- package/layers/support/rasterDatasets/BaseRaster.js +1 -1
- package/layers/support/rasterFunctions/rasterProjectionHelper.js +1 -1
- package/package.json +2 -2
- package/popup/content/AttachmentsContent.js +1 -1
- package/popup/content/support/mediaInfoTypes.js +1 -1
- package/rest/print.js +1 -1
- package/smartMapping/statistics/support/predominanceUtils.d.ts +4 -0
- package/support/arcadeOnDemand.js +1 -1
- package/support/featureFlags.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/FillSymbol3DLayer.js +1 -1
- package/symbols/IconSymbol3DLayer.js +1 -1
- package/symbols/LabelSymbol3D.js +1 -1
- package/symbols/ObjectSymbol3DLayer.js +1 -1
- package/symbols/PointSymbol3D.js +1 -1
- package/symbols/Symbol3D.js +1 -1
- package/symbols/WebStyleSymbol.js +1 -1
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/symbols/cim/CIMSymbolRasterizer.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/support/IconSymbol3DLayerResource.js +1 -1
- package/symbols/support/ObjectSymbol3DLayerResource.js +1 -1
- package/symbols/support/Symbol3DAnchorPosition2D.js +1 -1
- package/symbols/support/Symbol3DAnchorPosition3D.js +1 -1
- package/symbols/support/Symbol3DFillMaterial.js +1 -1
- package/symbols/support/Symbol3DIconOutline.js +1 -1
- package/symbols/support/Symbol3DOutline.js +1 -1
- package/symbols/support/Symbol3DVerticalOffset.js +1 -1
- package/symbols/support/Thumbnail.js +1 -1
- package/symbols/support/previewCIMSymbol.js +1 -1
- package/symbols/support/previewSymbol2D.js +1 -1
- package/symbols/support/previewSymbol3D.js +1 -1
- package/symbols/support/previewWebStyleSymbol.js +1 -1
- package/symbols/support/svgUtils.js +1 -1
- package/symbols/support/webStyleSymbolUtils.js +1 -1
- package/symbols.js +1 -1
- package/views/2d/MapViewConstraints.js +1 -1
- package/views/2d/engine/vectorTiles/SchemaHelper.js +1 -1
- package/views/2d/engine/webgl/brushes/raster/BrushRasterBitmap.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/WGLFillTemplate.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/viewpointUtils.js +1 -1
- package/views/3d/environment/ChapmanAtmosphere.glsl.js +1 -1
- package/views/3d/environment/ChapmanAtmosphere.js +1 -1
- package/views/3d/environment/CloudsComposition.glsl.js +1 -1
- package/views/3d/environment/CloudsComposition.js +1 -1
- package/views/3d/environment/CloudsGenerator.js +1 -1
- package/views/3d/environment/CloudsPresets.js +1 -1
- package/views/3d/environment/EnvironmentRenderer.js +1 -1
- package/views/3d/environment/Fog.glsl.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/environment/PanoramicAtmosphere.js +1 -1
- package/views/3d/environment/Precipitation.glsl.js +5 -0
- package/views/3d/environment/Precipitation.js +5 -0
- package/views/3d/environment/PrecipitationTechnique.js +5 -0
- package/views/3d/environment/RainyWeather.js +1 -1
- package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
- package/views/3d/environment/SimpleAtmosphere.glsl.js +1 -1
- package/views/3d/environment/SimpleAtmosphere.js +1 -1
- package/views/3d/environment/SnowyWeather.js +5 -0
- package/views/3d/environment/Stars.glsl.js +1 -1
- package/views/3d/environment/Stars.js +1 -1
- package/views/3d/environment/weather.js +1 -1
- package/views/3d/interactive/analysisTools/slice/SliceTool.js +1 -1
- package/views/3d/interactive/analysisTools/slice/sliceToolUtils.js +1 -1
- package/views/3d/interactive/editingTools/transformGraphic/ScaleRotateMeshAdapter.js +1 -1
- package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
- package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/GraphicsLayerView3D.js +1 -1
- package/views/3d/layers/GraphicsView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/VectorTileLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/ElevationAligners.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
- package/views/3d/layers/graphics/graphicUtils.js +1 -1
- package/views/3d/layers/graphics/lineUtils.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/graphics/polygonUtils.js +1 -1
- package/views/3d/layers/graphics/symbolComplexity.js +1 -1
- package/views/3d/layers/i3s/I3SBinaryReader.js +1 -1
- package/views/3d/layers/i3s/PointRenderer.js +1 -1
- package/views/3d/layers/support/HeatmapFeatureProcessor.js +5 -0
- package/views/3d/layers/support/overlayImageUtils.js +1 -1
- package/views/3d/layers/support/patternUtils.js +1 -1
- package/views/3d/state/controllers/local/PinchAndPanController.js +1 -1
- package/views/3d/support/FrustumExtentIntersection.js +1 -1
- package/views/3d/support/LaserLineRenderer.js +1 -1
- package/views/3d/support/LaserlinePathData.js +1 -1
- package/views/3d/support/pointsOfInterest/Focus.js +1 -1
- package/views/3d/support/sunUtils.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/PatchGeometryFactory.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/terrain/terrainUtils.js +1 -1
- package/views/3d/terrain/tileUtils.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.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/collections/Component/Material/shader/ComponentData.glsl.js +10 -10
- package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
- package/views/3d/webgl-engine/collections/Component/SourceGeometry.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/ScreenSizeScaling.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PositionAttribute.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +12 -12
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexTextureCoordinates.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +16 -16
- package/views/3d/webgl-engine/core/shaderLibrary/default/RealisticTree.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +5 -5
- package/views/3d/webgl-engine/core/shaderLibrary/hud/HUDOcclusionPass.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/raster/BasicGrid.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeMaterialColor.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeShadingNormal.glsl.js +10 -11
- package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/MultipassGeometryTest.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/MultipassTerrainTest.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +6 -6
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Reprojection.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceReflections.glsl.js +5 -5
- package/views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +22 -14
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Terrain.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/BlendLayers.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/Camera.js +1 -1
- package/views/3d/webgl-engine/lib/DefaultVertexAttributeLocations.js +1 -1
- package/views/3d/webgl-engine/lib/DefaultVertexBufferLayouts.js +1 -1
- package/views/3d/webgl-engine/lib/Geometry.js +1 -1
- package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
- package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
- package/views/3d/webgl-engine/lib/MagnifierHelper.js +1 -1
- package/views/3d/webgl-engine/lib/Material.js +1 -1
- package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
- package/views/3d/webgl-engine/lib/RenderPluginManager.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/SSAOHelper.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/SmaaRenderPass.js +1 -1
- package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/lib/Texture.js +1 -1
- package/views/3d/{layers/graphics/IGraphics3DFeatureProcessor.js → webgl-engine/lib/TextureUniformName.js} +0 -0
- package/views/3d/webgl-engine/lib/UniformName.js +4 -0
- package/views/3d/webgl-engine/lib/VertexAttribute.js +5 -0
- package/views/3d/webgl-engine/lib/basicInterfaces.js +1 -1
- package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/bufferLayouts.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/InstanceData.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/RenderInstanceData.js +1 -1
- package/views/3d/webgl-engine/lib/pathGeometryUtils.js +1 -1
- package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/SlicePlaneMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/VisualVariableMaterialParameters.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/internal/DefaultBufferWriter.js +1 -1
- package/views/3d/webgl-engine/materials/internal/MaterialUtil.js +1 -1
- package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
- package/views/3d/webgl-engine/materials/internal/waterMaterialUtils.js +1 -1
- package/views/3d/webgl-engine/parts/Model.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoard.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HighlightComposition.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/HighlightTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LaserlinePath.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LaserlinePathTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineCallout.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineCalloutTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/Magnifier.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/MeasurementArrow.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/Pattern.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/PointRenderer.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RealisticTreeTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/SMAA.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowHighlightTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/SlicePlaneMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/AdjustProjectedPosition.glsl.js +10 -10
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/DiscardShortEdges.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeShaderProgram.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +21 -21
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineAmplitude.glsl.js +6 -6
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineOffset.glsl.js +13 -13
- package/views/3d/webgl-engine/shaders/sources/edgeRenderer/UnpackAttributes.glsl.js +6 -6
- package/views/MapView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/View.js +1 -1
- package/views/input/recognizers/DoubleTapDrag.js +1 -1
- package/views/input/recognizers/ImmediateDoubleClick.js +1 -1
- package/views/input/recognizers/PointerClickHoldAndDrag.js +1 -1
- package/views/input/recognizers/SingleAndDoubleClick.js +1 -1
- package/views/interactive/dragEventPipeline.js +1 -1
- package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
- package/views/support/DefaultsFromMap.js +1 -1
- package/views/support/WatchUpdatingTracking.js +1 -1
- package/views/support/projectionUtils.js +5 -0
- package/views/webgl/BufferObject.js +1 -1
- package/views/webgl/InstanceCounter.js +1 -1
- package/views/webgl/Program.js +1 -1
- package/views/webgl/rasterUtils.js +1 -1
- package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.js +1 -1
- package/widgets/Attachments.js +1 -1
- package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
- package/widgets/BasemapGallery/support/BasemapGalleryItem.js +1 -1
- package/widgets/BasemapGallery/support/basemapCompatibilityUtils.js +1 -1
- package/widgets/BasemapGallery.js +1 -1
- package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.js +1 -1
- package/widgets/FeatureForm/InputField.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
- package/widgets/LineOfSight/LineOfSightViewModel.js +1 -1
- package/widgets/Popup/PopupViewModel.js +1 -1
- package/widgets/Popup/actionUtils.js +1 -1
- package/widgets/Search/support/locatorUtils.js +1 -1
- package/widgets/Search.js +1 -1
- package/widgets/Slice/SliceViewModel.js +1 -1
- package/widgets/Slider/SliderViewModel.js +1 -1
- package/widgets/Slider.js +1 -1
- package/widgets/Weather/WeatherViewModel.js +1 -1
- package/widgets/Weather/css.js +1 -1
- package/widgets/Weather/enums.js +5 -0
- package/widgets/Weather.js +1 -1
- package/widgets/support/InteractiveAnalysisViewModel.js +1 -1
- package/widgets/support/InteractiveToolViewModel.js +1 -1
- package/assets/components/assets/calcite-icon/checkSquareF16.json +0 -1
- package/assets/components/assets/calcite-icon/checkSquareF24.json +0 -1
- package/assets/components/assets/calcite-icon/checkSquareF32.json +0 -1
- package/assets/components/assets/calcite-icon/lineSolid4.json +0 -1
- package/assets/components/assets/calcite-icon/squareF16.json +0 -1
- package/assets/components/assets/calcite-icon/squareF24.json +0 -1
- package/assets/components/assets/calcite-icon/squareF32.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagon16.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagon24.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagon32.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagonF16.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagonF24.json +0 -1
- package/assets/components/assets/calcite-icon/xHexagonF32.json +0 -1
- package/assets/components/assets/calcite-icon/xOctagonF16.json +0 -1
- package/assets/components/assets/calcite-icon/xOctagonF24.json +0 -1
- package/assets/components/assets/calcite-icon/xOctagonF32.json +0 -1
- package/assets/esri/core/workers/chunks/09da224052976e290828.js +0 -1
- package/assets/esri/core/workers/chunks/0bf079e752ab79468478.js +0 -1
- package/assets/esri/core/workers/chunks/0c3e3a5baf54bd5e210c.js +0 -1
- package/assets/esri/core/workers/chunks/14bef72154b3a19561a7.js +0 -1
- package/assets/esri/core/workers/chunks/18668dc45eb9e35530df.js +0 -1
- package/assets/esri/core/workers/chunks/1e4d37c2b9dc83d20a11.js +0 -1
- package/assets/esri/core/workers/chunks/20411bb8e04703962ce6.js +0 -1
- package/assets/esri/core/workers/chunks/208a7e24e19fc5633dd7.js +0 -1
- package/assets/esri/core/workers/chunks/22b09e276c9b9f22f0f8.js +0 -1
- package/assets/esri/core/workers/chunks/23745a5ab47c840dc452.js +0 -1
- package/assets/esri/core/workers/chunks/2416f8bf8bbd2ec786ab.js +0 -1
- package/assets/esri/core/workers/chunks/25a3e9bc0b4c7e0d3165.js +0 -1
- package/assets/esri/core/workers/chunks/2e445a8735ea2adb641a.js +0 -1
- package/assets/esri/core/workers/chunks/32f8c4af7e70ebdcb19e.js +0 -1
- package/assets/esri/core/workers/chunks/36a3f6fb4d1d18fcb642.js +0 -1
- package/assets/esri/core/workers/chunks/390d9021169e65c10eb8.js +0 -1
- package/assets/esri/core/workers/chunks/3a9740dccda6a733313c.js +0 -1
- package/assets/esri/core/workers/chunks/3aa4194dc5497c57647f.js +0 -1
- package/assets/esri/core/workers/chunks/40a1e713f63ec77110c0.js +0 -1
- package/assets/esri/core/workers/chunks/43cdff2418325e163420.js +0 -1
- package/assets/esri/core/workers/chunks/4bfbf5a34c9207fdcf44.js +0 -1
- package/assets/esri/core/workers/chunks/5383a8f3e4ec1a8a4fcd.js +0 -1
- package/assets/esri/core/workers/chunks/5538639a49c7cc2eca63.js +0 -1
- package/assets/esri/core/workers/chunks/5a4a5585ec8027079f32.js +0 -1
- package/assets/esri/core/workers/chunks/5d4863a92b03bebc1b54.js +0 -1
- package/assets/esri/core/workers/chunks/60371c0f750cde87656d.js +0 -1
- package/assets/esri/core/workers/chunks/634b5ccd7a3ac67f855d.js +0 -1
- package/assets/esri/core/workers/chunks/662d13f68cf3ec92439b.js +0 -1
- package/assets/esri/core/workers/chunks/663ad15b86936eb06b69.js +0 -1
- package/assets/esri/core/workers/chunks/67162b3e2cc1b5dc6818.js +0 -1
- package/assets/esri/core/workers/chunks/739e579150bf466d43ae.js +0 -1
- package/assets/esri/core/workers/chunks/74df1f3e1e2e524a89d2.js +0 -1
- package/assets/esri/core/workers/chunks/76eef4799f6c5fff7e2d.js +0 -1
- package/assets/esri/core/workers/chunks/7baf6b1f3f050aa67ae4.js +0 -1
- package/assets/esri/core/workers/chunks/7bc5cc5dbf1b7b70ddac.js +0 -1
- package/assets/esri/core/workers/chunks/85e27fd949475f9a6bbc.js +0 -1
- package/assets/esri/core/workers/chunks/8967288145f8fbd20e7d.js +0 -1
- package/assets/esri/core/workers/chunks/8b6ab6202a40fe622833.js +0 -1
- package/assets/esri/core/workers/chunks/96ab518eb6ba11333dee.js +0 -1
- package/assets/esri/core/workers/chunks/9796d54ff12b6429164a.js +0 -1
- package/assets/esri/core/workers/chunks/99a777693e4539f0b03b.js +0 -1
- package/assets/esri/core/workers/chunks/9cb2ae42a8e328b1d98d.js +0 -1
- package/assets/esri/core/workers/chunks/9d3c58a0ef634d95b7bd.js +0 -1
- package/assets/esri/core/workers/chunks/a6ff3db3493543df81bc.js +0 -1
- package/assets/esri/core/workers/chunks/a8c13529367c037cdd94.js +0 -1
- package/assets/esri/core/workers/chunks/a96afc176041f698c7a1.js +0 -1
- package/assets/esri/core/workers/chunks/aa861b8eae6c85f3dad4.js +0 -1
- package/assets/esri/core/workers/chunks/ac8dca61ade28c542ae2.js +0 -1
- package/assets/esri/core/workers/chunks/ad081d8e49e7f90c3c26.js +0 -1
- package/assets/esri/core/workers/chunks/afa6912454f2a5ffadce.js +0 -1
- package/assets/esri/core/workers/chunks/b2beb6e1fd2ee6503830.js +0 -1
- package/assets/esri/core/workers/chunks/ba615f118a3a8970ef25.js +0 -1
- package/assets/esri/core/workers/chunks/ba6654a885be4b7a43f0.js +0 -1
- package/assets/esri/core/workers/chunks/bab1cfd0a901181622af.js +0 -1
- package/assets/esri/core/workers/chunks/be2b7cce79fd41627931.js +0 -1
- package/assets/esri/core/workers/chunks/c080114a69fa95b88d22.js +0 -1
- package/assets/esri/core/workers/chunks/c11474b702dfb94e8e87.js +0 -1
- package/assets/esri/core/workers/chunks/c13dfdd548dcb1bdb294.js +0 -1
- package/assets/esri/core/workers/chunks/c6bd943fe8fd13bb4806.js +0 -1
- package/assets/esri/core/workers/chunks/c6f94b92e866b881d9b9.js +0 -1
- package/assets/esri/core/workers/chunks/ca2f5faa01d99c21ec14.js +0 -1
- package/assets/esri/core/workers/chunks/cd7d83d127e085d52584.js +0 -1
- package/assets/esri/core/workers/chunks/cef4af64860ebbfc1c47.js +0 -1
- package/assets/esri/core/workers/chunks/cfbffa429d88e7709c3f.js +0 -1
- package/assets/esri/core/workers/chunks/d24c4fbc567486b1188f.js +0 -1
- package/assets/esri/core/workers/chunks/d52108864136c5a8a618.js +0 -1
- package/assets/esri/core/workers/chunks/da1c2873bdbc0956dca0.js +0 -1
- package/assets/esri/core/workers/chunks/de03439ca2c9782bf325.js +0 -1
- package/assets/esri/core/workers/chunks/de6cff7b6cbbf99b20d1.js +0 -981
- package/assets/esri/core/workers/chunks/e079cb1d53aca15b7df2.js +0 -1
- package/assets/esri/core/workers/chunks/e59764ee8cf25d4f74e2.js +0 -1
- package/assets/esri/core/workers/chunks/e6df9839b551569fbc62.js +0 -1
- package/assets/esri/core/workers/chunks/e97e986120aaadad7d4c.js +0 -1
- package/assets/esri/core/workers/chunks/f467c8f1fce22f6f599c.js +0 -1
- package/assets/esri/core/workers/chunks/f678293de9a6d8f5b5db.js +0 -1
- package/assets/esri/core/workers/chunks/f8e7755240a94b499e1f.js +0 -1
- package/assets/esri/core/workers/chunks/fd3e5d823dc7917f4b8f.js +0 -1
- package/assets/esri/core/workers/chunks/ffaf091c6023225cf5aa.js +0 -1
package/views/SceneView.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import t from"../Camera.js";import"../geometry.js";import i from"../Graphic.js";import r from"../Ground.js";import s from"../Viewpoint.js";import n from"../core/Collection.js";import{byId as a}from"../core/domUtils.js";import o from"../core/Error.js";import{on as l}from"../core/events.js";import{handlesGroup as p,makeHandle as h}from"../core/handleUtils.js";import d from"../core/has.js";import{isIterable as c}from"../core/iteratorUtils.js";import u from"../core/Logger.js";import{destroyMaybe as g,isNone as m,isSome as f,unwrapOr as y}from"../core/maybe.js";import{ObservableChangesType as w}from"../core/ObservableChangesType.js";import{throwIfAborted as v}from"../core/promiseUtils.js";import{initial as _,syncAndInitial as b}from"../core/reactiveUtils.js";import{setFrameDuration as M}from"../core/scheduling.js";import{on as R,whenOnce as S,init as x,whenTrueOnce as V}from"../core/watchUtils.js";import{initialize as C}from"../core/workers/workers.js";import{screenPointObjectToArray as T,createScreenPoint as O,createScreenPointArray as P}from"../core/screenUtils.js";import{property as E}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import{cast as j}from"../core/accessorSupport/decorators/cast.js";import{subclass as I}from"../core/accessorSupport/decorators/subclass.js";import{ensureType as G}from"../core/accessorSupport/ensureType.js";import{c as H}from"../chunks/vec3f64.js";import L from"../geometry/HeightModelInfo.js";import{canProjectWithoutEngine as U,project as A,projectPointToVector as D,projectVectorToVector as F,projectBoundingRect as W}from"../geometry/projection.js";import{create as q,toExtent as z}from"../geometry/support/aaBoundingRect.js";import{B as k,a as N}from"../chunks/boundedPlane.js";import{renderSRFromViewSR as B}from"../geometry/support/coordinateSystem.js";import{getResolutionForScale as Q}from"../geometry/support/scaleUtils.js";import $ from"../layers/VoxelWasmManager.js";import{isTiledLayer as X}from"../layers/support/layerUtils.js";import{BreakpointsOwner as K}from"./BreakpointsOwner.js";import{DOMContainer as Z}from"./DOMContainer.js";import J from"./GroundView.js";import{PopupView as Y}from"./PopupView.js";import ee from"./View.js";import te from"./ViewAnimation.js";import{ViewingMode as ie,stringFromViewingMode as re,viewingModeFromString as se}from"./ViewingMode.js";import{layerView3DImporter as ne}from"./3d/layerViewModuleImportUtils.js";import ae from"./3d/analysis/AnalysisViewManager3D.js";import oe from"./3d/constraints/Constraints.js";import le from"./3d/environment/SceneViewEnvironment.js";import{SceneViewEnvironmentManager as pe}from"./3d/environment/SceneViewEnvironmentManager.js";import he from"./3d/input/SceneInputManager.js";import{GraphicsDeconflictor as de}from"./3d/layers/graphics/GraphicsDeconflictor.js";import{Labeler as ce}from"./3d/layers/graphics/Labeler.js";import{ObjectResourceCache as ue}from"./3d/layers/graphics/ObjectResourceCache.js";import ge from"./3d/layers/support/FeatureTileTree3D.js";import me from"./3d/state/ViewState.js";import fe from"./3d/state/ViewStateManager.js";import{SceneIntersectionHelper as ye}from"./3d/state/helpers/SceneIntersectionHelper.js";import{CombinedElevationProvider as we}from"./3d/support/CombinedElevationProvider.js";import ve from"./3d/support/debugFlags.js";import _e from"./3d/support/DisplayQualityProfile.js";import{getElevationAtPoint as be}from"./3d/support/ElevationProvider.js";import Me from"./3d/support/HighlightOptions.js";import{MapCoordsHelper as Re}from"./3d/support/MapCoordsHelper.js";import{PropertiesPool as Se}from"./3d/support/PropertiesPool.js";import xe from"./3d/support/QualitySettings.js";import{RenderCoordsHelper as Ve}from"./3d/support/RenderCoordsHelper.js";import{newResourceController as Ce}from"./3d/support/ResourceController.js";import Te from"./3d/support/SceneViewPerformanceInfo.js";import{SharedSymbolResources as Oe}from"./3d/support/SharedSymbolResources.js";import Pe from"./3d/support/pointsOfInterest/PointsOfInterest.js";import Ee from"./3d/terrain/TerrainSurface.js";import{isSurfaceLayerView as je,getTiledLayerInfo as Ie}from"./3d/terrain/terrainUtils.js";import{Stage as Ge}from"./3d/webgl-engine/Stage.js";import{newIntersector as He,DEFAULT_TOLERANCE as Le}from"./3d/webgl-engine/lib/Intersector.js";import{StoreResults as Ue,IntersectorType as Ae}from"./3d/webgl-engine/lib/IntersectorInterfaces.js";import{isValidIntersectorResult as De}from"./3d/webgl-engine/lib/intersectorUtils.js";import{toGraphic as Fe,toOwner as We}from"./3d/webgl-engine/lib/intersectorUtilsConversions.js";import{TERRAIN_ID as qe}from"./3d/webgl-engine/lib/verticalOffsetUtils.js";import{hitTestSelectSameDistance as ze}from"./support/hitTestSelectUtils.js";import{occludeesSupported as ke}from"./support/layerViewUtils.js";import{toRenderSettings as Ne,screenshotSuperSampleSettings as Be}from"./support/screenshotUtils.js";import{isSupportedScreenPointEvent as Qe,createScreenPointFromSupportedEvent as $e}from"./support/screenUtils.js";import{isSpatialReferenceSupported as Xe}from"./support/spatialReferenceSupport.js";import{check as Ke}from"./support/WebGLRequirements.js";import Ze from"./ui/3d/DefaultUI3D.js";import Je from"../webscene/Environment.js";import Ye from"../geometry/Extent.js";import et from"../geometry/SpatialReference.js";import tt from"../geometry/Point.js";const it=u.getLogger("esri.views.SceneView");let rt=class extends(K(Z(Y(ee)))){constructor(e){super(e),this._userClippingArea=null,this._clippingArea=null,this._initialDefaultSpatialReference=null,this._defaults={},this._externallySet={environment:!1},this._createGraphicsViewController=null,this._resolveWhenReady=[],this.propertiesPool=new Se({slicePlane:k},this),this._resourceController=Ce(this),this._defaultToMapOptions={include:new Set},this._defaultHitTestOptions={exclude:new Set},this.deconflictor=new de({view:this}),this.labeler=new ce({view:this,deconflictor:this.deconflictor.labels}),this.sharedSymbolResources=null,this.basemapTerrain=null,this.elevationProvider=null,this.camera=null,this.canvas=null,this.center=null,this.constraints=new oe,this.environmentManager=new pe,this.extent=null,this.floors=new n,this.windowDevicePixelRatio=1,this.fullOpacity=1,this.graphicsView=null,this.analysisViewManager=new ae({view:this}),this.groundView=null,this.navigating=!1,this.map=null,this.screenSizePerspectiveEnabled=!0,this.state=new me,this.scale=null,this.spatialReference=null,this.alphaCompositingEnabled=!1,this.supersampleScreenshotsEnabled=!0,this.type="3d",this.ui=new Ze,this._numUpdating=0,this._lastUpdateTime=0,this.updatingProgress=.5,this.viewpoint=null,this.zoom=null,this.highlightOptions=new Me,C(),e&&e.environment||(this._defaults.environment=new le,this.environment=this._defaults.environment);const t=e=>{f(e)&&e.type===w.MOVE||(this._updatingChanged(),this.map&&this.map.allLayers.forEach((async e=>{try{await e.when()}catch{}this._updatingChanged()})))};this.handles.add([R(this,"map.allLayers","after-changes",t,t,t,!0),this.allLayerViews.on("after-changes",(e=>this._updateUpdatingMonitors(e))),this.watch("map",(e=>{e&&e.load&&e.load().catch((()=>{}))}))]),this.inputManager=new he({view:this});const i=()=>{const e=window.devicePixelRatio;e!==this.windowDevicePixelRatio&&(this.windowDevicePixelRatio=e,this.notifyChange("pixelRatio"))};this.stateManager=new fe({view:this,updateDevicePixelRatio:i})}initialize(){this.groundView=new J({view:this}),this._updateUpdatingMonitors();const e=()=>this._updateDefaultToMapOptions();this.handles.add(R(this,"map.allLayers","after-changes",e,e,e)),this.updatingHandles.add((()=>this.qualitySettings.memoryLimit),(e=>{this.resourceController&&(this.resourceController.memoryController.maxMemory=e)}),_),this.updatingHandles.add((()=>this.qualitySettings.additionalCacheMemory),(e=>{this.resourceController&&(this.resourceController.memoryController.additionalCacheMemory=e)}),_),this.updatingHandles.add((()=>this.qualitySettings.frameRate),(e=>M(e>0?1e3/Math.ceil(e):0)),_),this.updatingHandles.add((()=>ve.SCENEVIEW_LOCKING_LOG),(e=>this.defaultsFromMap.logDebugInformation=e),_),this.updatingHandles.add((()=>{var e;return null==(e=this.map)?void 0:e.ground}),e,b),this.updatingHandles.add((()=>{var e,t;return null==(e=this.map)||null==(t=e.ground)?void 0:t.opacity}),(()=>this._updateDefaultHitTestOptions()),b),this.handles.add(this.watch("spatialReference",(()=>this.notifyChange("clippingArea")),!0))}destroy(){this.destroyed||(this.invalidate(),this.activeTool=null,this.layerViewManager.clear(),this._exitSurface(),this._disposeGraphicsView(),this.sharedSymbolResources=g(this.sharedSymbolResources),this.labeler.destroy(),this._set("labeler",null),this.deconflictor.destroy(),this._set("deconflictor",null),this._resourceController=g(this._resourceController),this.stateManager.destroy(),this._set("stateManager",null),this.inputManager.destroy(),this._set("inputManager",null),this.propertiesPool.destroy(),this.handles.remove("updatingMonitors"),this.environmentManager.destroy(),this._set("environmentManager",null),this.groundView=g(this.groundView))}get renderSpatialReference(){return this.renderCoordsHelper&&this.renderCoordsHelper.spatialReference}get basemapSpatialReference(){return this.basemapTerrain&&this.basemapTerrain.spatialReference}installContentCameraReset(e={sticky:!1}){return this.stateManager.installContentCameraReset(e)}get clippingArea(){if("global"===this.viewingMode)return null;let e=this._userClippingArea||this.get("map.clippingArea");return!(!!this._userClippingArea||this.get("map.clippingEnabled"))||m(e)?(this._clippingArea=null,null):e instanceof Ye?this.spatialReference&&(e=at(e,this.spatialReference),m(e))?(it.error("#clippingArea","setting clippingArea with incompatible SpatialReference"),this._clippingArea):(e=e.clone(),m(e.intersection(this.groundAndLayersExtent))&&(e.xmin=e.xmax,e.ymin=e.ymax),e.zmin=void 0,e.zmax=void 0,e.equals(this._clippingArea)||(this._clippingArea=e),this._clippingArea):(it.error("#clippingArea","only clippingArea geometries of type Extent are supported"),this._clippingArea)}set clippingArea(e){this.ready&&"global"===this.viewingMode&&f(e)?it.error("#clippingArea=","Clipping area is only supported in local viewingMode"):this._userClippingArea=e}get renderDataExtent(){if(this.state.viewingMode===ie.Global)return null;const e=this.renderSpatialReference,t=this.dataExtent;return m(t)||m(e)||t.spatialReference.equals(e)?t:at(t,e)}get dataExtent(){let e=this.groundAndLayersExtent;const t=this.spatialReference||et.WGS84,i=at(this.clippingArea,t);f(i)&&(e=f(e)?e.intersection(i):i);const r=this._get("dataExtent");return f(e)&&e.equals(r)?r:e}get groundAndLayersExtent(){const e=this.spatialReference||et.WGS84;let t;const i=i=>{const r=at(i,e);m(r)||(f(t)?t.union(r):t=r.clone())},r=this.basemapTerrain;if(null!=r&&r.spatialReference){const e=r.groundExtent;i(new Ye({xmin:e[0],ymin:e[1],zmin:0,xmax:e[2],ymax:e[3],zmax:0,spatialReference:r.spatialReference}))}if(this.map){const e=e=>{!f(e.fullExtent)||"graphics"===e.type&&e.internal||i(e.fullExtent)};this.map.allLayers.forEach((t=>e(t)))}if(m(t))return null;t.hasZ?(t.zmin=Math.min(0,t.zmin),t.zmax=Math.max(0,t.zmax)):(t.zmin=0,t.zmax=0);const s=this._get("groundAndLayersExtent");return t.equals(s)?s:t}set environment(e){e!==this._defaults.environment&&(this._externallySet.environment=!0),this._set("environment",e)}castEnvironment(e){return e?e instanceof le?e:e instanceof Je?null!=this.environment?this.environment.cloneWithWebsceneEnvironment(e):le.fromWebsceneEnvironment(e):G(le,e):new le}get pixelRatio(){return Math.min(this.windowDevicePixelRatio,this.maximumPixelRatio)}set pixelRatio(e){f(e)?this._override("pixelRatio",e):this._clearOverride("pixelRatio")}get maximumPixelRatio(){let e=1/0;const{maximumPixelRatio:t,maximumRenderResolution:i}=this.qualitySettings;if(null!=t&&(e=Math.min(e,t)),null!=i){const t=i/Math.max(this.width,this.height);e=Math.min(e,t)}return e}set maximumPixelRatio(e){f(e)?this._override("maximumPixelRatio",e):this._clearOverride("maximumPixelRatio")}get initialExtentRequired(){return this.stateManager&&!this.stateManager.hasInitialView}get _defaultsFromMapSettings(){return{required:{tileInfo:!1,heightModelInfo:!0,extent:!1}}}get interacting(){return this.navigating||f(this.activeTool)}get stationary(){return!this.animation&&!this.resizing&&(m(this.state)||this.state.stationary)}set qualityProfile(e){_e.isValidProfile(e)&&(_e.apply(e,this.qualitySettings),this._set("qualityProfile",e))}get qualityProfile(){return this._get("qualityProfile")||_e.getDefaultProfile()}set slicePlane(e){if(f(this._stage)&&this._stage.renderView.setRenderParameters({slicePlane:e}),m(e))return void this._set("slicePlane",null);const t=this.propertiesPool.get("slicePlane");N(e,t),this._set("slicePlane",t)}get typeSpecificPreconditionsReady(){return!!this.viewingMode}get resolution(){return null!=this.spatialReference?Q(this.scale,this.spatialReference):0}get heightModelInfo(){const e=this.getDefaultHeightModelInfo();return null!=e?L.deriveUnitFromSR(e,this.spatialReference):null}get updating(){var e,t,i;if(this.destroyed)return!1;let r=0,s=this.layerViewManager.updating,n=s?this.layerViewManager.updatingRemaining:0;this.allLayerViews.forEach((e=>{if(e.isFulfilled()){if(e.updating){if(s=!0,e.suspended||je(e))return;++n,r+=e.updatingProgress}}else++n}));for(const a of[this.graphicsView,this.basemapView,this._resourceController,this._stage,this.featureTiles,this.pointsOfInterest,this.environmentManager,this.overlay,this.featureTreeDebugger,this.toolViewManager,this.analysisViewManager])if(f(a)&&a.updating){const e=.1;n+=e,r+=.5*e}for(const a of[this.deconflictor,this.labeler,this.basemapTerrain])f(a)&&a.updating&&(++n,r+=a.updatingProgress);if(s=!!(s||n>0||this.updatingHandles.updating||!this.ready||!this.stationary||this._createGraphicsViewController||null!=(e=this.inputManager)&&e.hasPendingInputs||null!=(t=this.map)&&null!=(i=t.allLayers)&&i.some((e=>!e.isFulfilled()))),s?(this._numUpdating=Math.max(n,this._numUpdating),r+=this._numUpdating-n):this._numUpdating=0,this._numUpdating>0?r/=this._numUpdating:r=s?0:1,this._get("updatingProgress")!==r){const e=this._resourceController.scheduler.now;if(r<1){const t=Math.min((e-this._lastUpdateTime)/2e3,1);r=this.updatingProgress*(1-t)+r*t}this._set("updatingProgress",r),this._lastUpdateTime=s&&r<1?e:0}return s}get viewingMode(){var e;const t=this._predeterminedViewingMode;if(f(t))return re(t);const i=this.spatialReference;return f(null==(e=this.defaultsFromMap)?void 0:e.viewingMode)&&i&&i.equals(this.defaultsFromMap.spatialReference)?re(this.defaultsFromMap.viewingMode):!i||Xe(i,ie.Global)?"global":"local"}set viewingMode(e){this.ready?it.error("#viewingMode","viewingMode cannot be set once view is ready"):e?this._override("viewingMode",e):void 0===e&&this._clearOverride("viewingMode")}get resourceController(){return this._resourceController}get performanceInfo(){return new Te(this)}forceAnimationTime(e){this._stage.renderView.forcedAnimationTime=this.basemapTerrain.overlayManager.forcedAnimationTime=e}on(e,t,i,r){const s=this.viewEvents.on(e,t,i,r);return s||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}toMap(e,t){if(!this.ready)return it.error("#toMap()","Scene view cannot be used before it is ready"),null;const i=t?this.externalToInternalIntersectOptions(t):this._defaultToMapOptions,r=f(i.graphics)&&(f(i.graphics.include)||f(i.graphics.exclude)),s=Qe(e)?$e(this,e):e,n=T(s);i.enableDraped=i.include&&!i.include.has(qe)||i.exclude&&i.exclude.has(qe);const a=this.sceneIntersectionHelper,o=He(this.state.viewingMode);if(o.options.selectionMode=!0,o.options.store=r?Ue.ALL:Ue.MIN,a.intersectIntersectorScreen(n,o,i),r){for(const e of o.results.all){const t=Fe(e,this);if(m(t))return this._intersectResultToMapPoint(e);if(this._testGraphicUidFilter(i.graphics,t))return this._intersectResultToMapPoint(e)}return null}return this._intersectResultToMapPoint(o.results.min)}toScreen(e){if(!this.ready)return it.error("#toScreen()","Scene view cannot be used before it is ready"),null;const t=y(null==e.z&&be(this.elevationProvider,e),0);return D(e,lt,this.renderSpatialReference,t),this.state.camera.projectToScreen(lt,pt),O(pt[0],pt[1])}pixelSizeAt(e){return this.ready?e?(D(e,lt,this.renderSpatialReference),this.state.camera.computeScreenPixelSizeAt(lt)):0:(it.error("#pixelSizeAt()","Scene view cannot be used before it is ready"),null)}overlayPixelSizeInMapUnits(e){const t=this.basemapTerrain.overlayManager;return t?t.overlayPixelSizeInMapUnits(e):1}hitTest(e,t){if(!this.ready)return it.error("#hitTest()","Scene view cannot be used before it is ready"),null;const i=Qe(e)?$e(this,e):e,r=P(i.x,i.y),s=t?this.externalToInternalIntersectOptions(t):this._defaultHitTestOptions;s.requiresGroundFeedback=!0,s.enableDraped=!0;const n=He(this.state.viewingMode);n.options.selectionMode=!0,n.options.store=Ue.ALL,this.sceneIntersectionHelper.intersectIntersectorScreen(r,n,s);const a=this._intersectResultsToHits(n.results.all,s.graphics),o=n.results.ground,l=We(o,this),p=f(l)&&"type"in l&&"integrated-mesh"===l.type?l:null,h={screenPoint:i,results:a,ground:{mapPoint:this._intersectResultToMapPoint(o),distance:De(o)?o.distanceInRenderSpace:0,layer:p}};return ve.SCENEVIEW_HITTEST_RETURN_INTERSECTOR&&(h.intersector=n),Promise.resolve(h)}popupHitTest(e){return ze(this,e).then((({results:t,ground:i})=>{let r=null;return!(0===t.length||Math.abs(y(t[0].distance,0)-i.distance)<1e-5)||i.layer&&"integrated-mesh"===i.layer.type||(r=i.mapPoint),{results:t,screenPoint:e,mapPoint:r}}))}goTo(e,t){return this.updatingHandles.addPromise(this.stateManager.goTo(e,t))}async whenAnalysisView(e){if(m(e.parent))throw new o("view:no-analysisview-for-analysis","The analysis has not been added to an AnalysisLayer or SceneView.analyses",{analysis:e});if("analysis"===e.parent.type){return(await this.whenLayerView(e.parent)).whenAnalysisView(e)}return this.analysisViewManager.whenAnalysisView(e)}whenLayerView(e){return super.whenLayerView(e)}takeScreenshot(e){return this.whenReady().then((()=>{const t=Ne(e,this);return t.pixelRatio/=this.pixelRatio,this._stage.renderView.takeScreenshot(Be(t,this.supersampleScreenshotsEnabled,this.padding))}))}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}importLayerView(e){return ne.importLayerView(e)}hasLayerViewModule(e){return ne.hasLayerViewModule(e)}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){var e,t,i,r;return this.map&&"initialViewProperties"in this.map&&(null==(e=this.map)||null==(t=e.initialViewProperties)?void 0:t.spatialReference)||(null==(i=this.defaultsFromMap)?void 0:i.spatialReference)||(null==(r=this.defaultsFromMap)?void 0:r.ready)&&this._initialDefaultSpatialReference||null}async validate(){let e=Ke(this.type);if(d("safari")&&d("safari")<9&&(e=new o("sceneview:browser-not-supported","This browser is not supported by SceneView (Safari < 9)",{type:"safari",requiredVersion:9,detectedVersion:d("safari")})),f(e))throw it.warn("#validate()",e.message),e}get _predeterminedViewingMode(){var e,t;const i=this._isOverridden("viewingMode")?this._get("viewingMode"):null!=(e=this.map&&"initialViewProperties"in this.map?null==(t=this.map.initialViewProperties)?void 0:t.viewingMode:null)?e:null;return f(i)?se(i):null}getSpatialReferenceSupport({spatialReference:e,layer:t}){const i=this._predeterminedViewingMode;if(f(i))return this._validateSpatialReferenceForViewingMode(e,t,i)?{constraints:this._makeSpatialReferenceConstraints(e,t,i)}:null;const r=this._validateSpatialReferenceForViewingMode(e,t,ie.Local),s=this._validateSpatialReferenceForViewingMode(e,t,ie.Global);return r||s?r&&s?{constraints:this._makeSpatialReferenceConstraints(e,t,null)}:r?{constraints:this._makeSpatialReferenceConstraints(e,t,ie.Local)}:{constraints:this._makeSpatialReferenceConstraints(e,t,ie.Global)}:null}_validateSpatialReferenceForViewingMode(e,t,i){return!!Xe(e,i)&&(!!m(t)||(!X(t)||!m(Ie(t,e,i)))&&("voxel"!==t.type||i===ie.Local))}_makeSpatialReferenceConstraints(e,t,i){return t&&!X(t)&&"voxel"!==t.type&&(e.isWebMercator||e.isWGS84)?[{spatialReference:e,viewingMode:i},{spatialReference:e.isWebMercator?et.WGS84:et.WebMercator,viewingMode:i}]:t&&X(t)&&e.isWebMercator&&i!==ie.Global?[{spatialReference:e,viewingMode:i},{spatialReference:et.WGS84,viewingMode:ie.Local}]:[{spatialReference:e,viewingMode:i}]}_validateSpatialReference(e){const t=f(this.getSpatialReferenceSupport({spatialReference:e})),i=this._predeterminedViewingMode;return t||(f(i)?it.warnOnce(`Spatial reference defined on view not supported in ${re(i)} viewing mode.`):e.isGeographic&&it.warnOnce("Spatial reference is geographic but not supported.")),t}whenReady(){return new Promise((e=>{this.ready?e(this):this._resolveWhenReady.push(e)}))}computeMapPointFromVec3d(e,t){let i=this.spatialReference||et.WGS84;return F(e,this.renderSpatialReference,e,i)||(i=et.WGS84,F(e,this.renderSpatialReference,e,i)),t?(t.x=e[0],t.y=e[1],t.z=e[2],t.spatialReference=i):t=new tt(e,i),t}trackGraphicState(e){if(!e.graphic)return it.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&&f(t)&&"processor"in t&&t.processor&&t.processor.graphicsCore&&(i=t.processor.graphicsCore.trackGraphicState(e))};return f(t)?s(t):this.whenViewForGraphic(e.graphic,{waitForLayer:!0}).then((e=>s(e)),(()=>{})).catch((()=>{})),{remove:()=>{r=!0,f(i)&&(i.remove(),i=null)}}}highlight(e){if(Array.isArray(e))return p(e.map((e=>this.highlight(e))));if(n.isCollection(e))return p(e.toArray().map((e=>this.highlight(e))));const t=this.getViewForGraphic(e);return t&&"highlight"in t?t.highlight(e):h()}maskOccludee(e){if(!e)return it.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&&f(t)&&ke(t)&&(i=t.maskOccludee(e))};return f(t)?s(t):this.whenViewForGraphic(e,{waitForLayer:!0}).then((e=>s(e)),(()=>{})).catch((()=>{})),{remove:()=>{r=!0,f(i)&&(i.remove(),i=null)}}}getViewForGraphic(e){return e.layer===this.graphics?this.graphicsView:e.layer?this.allLayerViews.find((t=>t.layer===e.layer)):null}graphicChanged(e){f(this.graphicsView)&&this.graphicsView.graphicChanged(e)}async whenViewForGraphic(e,t){if(e.layer===this)return await S(this,"graphicsView"),this.graphicsView;if(!e.layer||!this.map)throw new o("no-view-for-graphic");return t&&t.waitForLayer&&!this.map.allLayers.includes(e.layer)?new Promise(((t,i)=>{const r=this.map.allLayers.on("change",(s=>{-1!==s.added.indexOf(e.layer)&&(r.remove(),this.whenLayerView(e.layer).then(t,i))}))})):this.whenLayerView(e.layer)}externalToInternalIntersectOptions(e){const t=this._externalToInternalRenderItems(e.include,ot.INCLUDE),i=this._externalToInternalRenderItems(e.exclude,ot.EXCLUDE);return{include:t.layerUids,exclude:i.layerUids,graphics:{include:t.graphicUids,exclude:i.graphicUids}}}_intersectResultToMapPoint(e,t){return e.getIntersectionPoint(lt)?(t=this.computeMapPointFromVec3d(lt,t),e.intersector===Ae.TERRAIN&&this.basemapTerrain&&(t.z=y(be(this.basemapTerrain,t),0)),t):null}_intersectResultsToHits(e,t){const i=new Array;let r=null;for(let s=0;s<e.length;s++){const n=e[s],a=We(n,this);if(f(a)&&(a===this.map.ground||"type"in a&&"integrated-mesh"===a.type))break;const o=Fe(n,this);if(!f(o))continue;if(m(r)&&s!==e.length-1&&(r=new Set),f(r)){const e=this._getGraphicFilterUid(o);if(r.has(e))continue;r.add(e)}if(!this._testGraphicUidFilter(t,o))continue;const l=this._intersectResultToMapPoint(n),p=n.distanceInRenderSpace;i.push({graphic:o,mapPoint:l,distance:p})}return i}_getGraphicFilterUid(e){if(e.layer&&"objectIdField"in e.layer){const t=e.attributes[e.layer.objectIdField];if(t)return`o-${e.layer.id}-${t}`}return`u-${e.uid}`}_testGraphicUidFilter(e,t){const i=this._getGraphicFilterUid(t);return m(e)||(m(e.include)||e.include.has(i))&&(m(e.exclude)||!e.exclude.has(i))}_externalToInternalRenderItems(e,t,s={layerUids:null,graphicUids:null}){if(!e)return s;if(e instanceof i)nt(s,this._getGraphicFilterUid(e)),t===ot.INCLUDE&&(f(this.graphicsView)&&e.layer===this?st(s,this.graphicsView.processor.layer.id):e.layer&&st(s,e.layer.uid));else if(c(e))for(const i of e)i===this.graphics&&f(this.graphicsView)?st(s,this.graphicsView.processor.layer.id):i instanceof r?i===this.map.ground&&st(s,qe):this._externalToInternalRenderItems(i,t,s);else st(s,e.uid);return s}_initBasemapTerrain(){this._set("basemapTerrain",new Ee({view:this})),this._set("elevationProvider",new we({view:this})),this.elevationProvider.register("ground",this.basemapTerrain)}_exitBasemapTerrain(){this.basemapTerrain&&(this.elevationProvider.unregister(this.basemapTerrain),this.elevationProvider.destroy(),this._set("elevationProvider",null),this.basemapTerrain.destroy(),this._set("basemapTerrain",null))}_initGlobe(){this._initCoordinateSystem(),this.state.createInitialCamera(),this._initBasemapTerrain(),this._set("pointsOfInterest",new Pe({view:this})),this._set("featureTiles",new ge({renderCoordsHelper:this.renderCoordsHelper,cameraOnSurface:this.pointsOfInterest.contentCameraOnSurface,focus:this.pointsOfInterest.focus,tilingSchemeOwner:this.basemapTerrain,viewState:this.state,scheduler:this._resourceController.scheduler,terrain:this.basemapTerrain}));const e=()=>{const e=this.basemapTerrain&&this.basemapTerrain.extent;if(this.clippingArea||e)if(e&&this.basemapTerrain.spatialReference){const e=f(this.basemapTerrain.extent)?A(z(this.basemapTerrain.extent,this.basemapTerrain.spatialReference),this.spatialReference):null;f(this.clippingArea)?this.featureTiles.filterExtent=this.clippingArea.intersection(e):this.featureTiles.filterExtent=e}else this.featureTiles.filterExtent=this.clippingArea;else this.featureTiles.filterExtent=null};this.handles.add([this.updatingHandles.add((()=>ve.FEATURE_TILE_TREE_SHOW_TILES),(e=>{e&&this.featureTiles&&!this.featureTreeDebugger?this.updatingHandles.addPromise(import("./3d/layers/support/FeatureTileTree3DDebugger.js")).then((({FeatureTileTree3DDebugger:e})=>{!this.featureTreeDebugger&&ve.FEATURE_TILE_TREE_SHOW_TILES&&(this.featureTreeDebugger=new e({view:this}))})):e||!this.featureTreeDebugger||ve.FEATURE_TILE_TREE_SHOW_TILES||(this.featureTreeDebugger.destroy(),this.featureTreeDebugger=null)}),b),this.updatingHandles.add((()=>this.clippingArea),e,b),this.updatingHandles.add((()=>this.basemapTerrain.extent),e,b)],"feature-tiles"),this.stateManager.init()}_exitGlobe(){this.state&&(this.stateManager.deinit(),this.handles.remove("render-coords-helper"),this.handles.remove("feature-tiles"),this.featureTiles.destroy(),this._set("featureTiles",null),this.pointsOfInterest.destroy(),this._set("pointsOfInterest",null),this._exitBasemapTerrain(),this.state.exit(),this._exitCoordinateSystem())}_initCoordinateSystem(){if(this.spatialReference){const e=this.spatialReference;this.mapCoordsHelper&&this.mapCoordsHelper.spatialReference.equals(e)||this._set("mapCoordsHelper",new Re(this.map,e));const t=this.state.isGlobal,i=B(t,e);i!==this.renderSpatialReference&&(this._set("renderCoordsHelper",Ve.create(this.state.viewingMode,i)),t||this.handles.add(this.watch("basemapTerrain.extent",(e=>{const t=this.renderCoordsHelper.spatialReference;0===e[0]&&0===e[1]&&0===e[2]&&0===e[3]||!W(e,this.basemapTerrain.spatialReference,ht,t)||(this.renderCoordsHelper.extent=ht)}),!0),"render-coords-helper"),this.sceneIntersectionHelper&&this.sceneIntersectionHelper.setTolerance(Le/this.renderCoordsHelper.unitInMeters))}else this._set("mapCoordsHelper",null),this._set("renderCoordsHelper",null)}_exitCoordinateSystem(){this.mapCoordsHelper&&(this.handles.remove("render-coords-helper"),this._set("renderCoordsHelper",null),this._set("mapCoordsHelper",null))}_updatingChanged(){this.notifyChange("updating")}_updateUpdatingMonitors(e=null){f(e)&&e.type===w.MOVE||(this.handles.remove("updatingMonitors"),this.allLayerViews.forEach((e=>{e.destroyed||(this.handles.add([e.watch(["updating","updatingProgress"],(()=>this._updatingChanged()),!0)],"updatingMonitors"),e.when((()=>this._updatingChanged()),(()=>this._updatingChanged())))})),this._updatingChanged())}_renderScreenshotOverlay(e,t){if(!this.overlay||!this.overlay.hasVisibleItems)return t;const i=e.getContext("2d");return i.putImageData(t,0,0),this.overlay.renderCanvas(e),i.getImageData(0,0,t.width,t.height)}_initStage(){const e={deactivatedWebGLExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions,alpha:this.alphaCompositingEnabled,canvas:this.renderCanvas,screenshot:{renderOverlay:(e,t)=>this._renderScreenshotOverlay(e,t)}},t=new ye(this.state.viewingMode,(e=>this._stage.layers.forAll(e)),this);this._set("sceneIntersectionHelper",t);const i=a(this.surface),{resourceController:r,state:s,renderSpatialReference:n}=this;this._stage=new Ge({options:e,container:i,resourceController:r,state:s,sceneIntersectionHelper:t,renderSR:n}),this._stage.renderView.setRenderParameters({slicePlane:this.slicePlane}),this._lostWebGLContextHandle=l(this._stage.renderView.canvas,"webglcontextlost",(()=>this.fatalError=new o("webgl-context-lost"))),this.handles.add([this.updatingHandles.add((()=>this.qualitySettings.antialiasingEnabled),(()=>this._stage.renderView.setRenderParameters({antialiasingEnabled:this.qualitySettings.antialiasingEnabled})),_),this.updatingHandles.add((()=>this.qualitySettings.highQualityTransparency),(()=>this._stage.renderView.setRenderParameters({highQualityTransparency:this.qualitySettings.highQualityTransparency})),_),x(this,"magnifier",(e=>this._stage.renderView.magnifier=e),!0)],"stage");const p=()=>{this._stage.renderView.setRenderParameters({defaultHighlightOptions:Me.toEngineOptions(this.highlightOptions)})};this.handles.add(this.updatingHandles.add((()=>[this.highlightOptions.color,this.highlightOptions.haloColor,this.highlightOptions.haloOpacity,this.highlightOptions.fillOpacity,this.highlightOptions.shadowOpacity,this.highlightOptions.shadowColor,this.highlightOptions.shadowDifference]),p),"stage"),p(),this.renderCoordsHelper&&this.sceneIntersectionHelper.setTolerance(Le/this.renderCoordsHelper.unitInMeters),this._set("canvas",this._stage.renderView.canvas)}_exitStage(){this._set("sceneIntersectionHelper",null),this._stage.destroy(),this._stage=null,this._lostWebGLContextHandle.remove(),this._lostWebGLContextHandle=null,this.handles.remove("stage"),this._set("canvas",null)}_initSurface(e){this._exitSurface(),this.state.init(e,this.spatialReference),this._initStage(),this._initGlobe(),this.sharedSymbolResources=new Oe({view:this,viewingMode:e,resourceController:this._resourceController,pointsOfInterest:this.pointsOfInterest,viewState:this.state,objectResourceCache:new ue})}_exitSurface(){this.sharedSymbolResources&&(this.sharedSymbolResources.objectResourceCache.destroy(),this.sharedSymbolResources.destroy(),this.sharedSymbolResources=null,this._exitGlobe(),this._exitStage())}_createGraphicsViewIfNeeded(){if(this.graphicsView||this._createGraphicsViewController)return;if(0===this.graphics.length)return;this.handles.remove("graphics-view"),this._createGraphicsViewController=new AbortController;const e=()=>{this._createGraphicsViewController=null,this._updatingChanged()};this._createGraphicsViewAsync(this._createGraphicsViewController.signal).then(e,e),this._updatingChanged()}async _createGraphicsViewAsync(e){const t=(await import("./3d/layers/GraphicsView3D.js")).default;v(e),await V(this.basemapTerrain,"ready",e),this._set("graphicsView",new t({view:this}))}_disposeGraphicsView(){this._createGraphicsViewController&&(this._createGraphicsViewController.abort(),this._createGraphicsViewController=null),this.handles.remove("graphics-view"),f(this.graphicsView)&&(this.handles.remove(this.graphicsView.processor.layer.id),this.graphicsView.destroy(),this._set("graphicsView",null))}_startup(){const e=se(this.viewingMode);if(e===ie.Global&&(this._clippingArea=null),this._initSurface(e),this._set("ready",!0),this.handles.add(R(this,"graphics","after-changes",(()=>this._createGraphicsViewIfNeeded())),"graphics-view"),this._createGraphicsViewIfNeeded(),!this._externallySet.environment){const e=this.get("map.initialViewProperties.environment");e&&(this.environment=e)}this.labeler.setup(),this.environmentManager.connectView(this),this.inputManager.connect();const t=this._resolveWhenReady;this._resolveWhenReady=[],t.forEach((e=>e(this)))}_teardown(){this._initialDefaultSpatialReference=null,this.inputManager.disconnect(),this.environmentManager.disconnectView(),this.labeler.dispose(),this._disposeGraphicsView(),this.handles.remove("graphics-view"),this._exitSurface(),this._set("ready",!1)}_updateDefaultToMapOptions(){if(this._defaultToMapOptions.include.clear(),this.map){this.map.ground&&this._defaultToMapOptions.include.add(qe);for(const e of this.map.allLayers.items)"integrated-mesh"===e.type&&this._defaultToMapOptions.include.add(e.uid)}}_updateDefaultHitTestOptions(){if(this._defaultHitTestOptions.exclude.clear(),this.map){this.map.ground&&this.map.ground.opacity<1&&this._defaultHitTestOptions.exclude.add(qe);for(const e of this.map.allLayers.items)"integrated-mesh"===e.type&&e.opacity<1&&this._defaultToMapOptions.exclude.add(e.uid)}}getVoxelWasmPerSceneView(){return $.getInstance().getVoxelWasmPerSceneView(this)}};function st(e,t){e.layerUids||(e.layerUids=new Set),e.layerUids.add(t)}function nt(e,t){e.graphicUids||(e.graphicUids=new Set),e.graphicUids.add(t)}function at(e,t){return f(e)&&U(e.spatialReference,t)?A(e,t):null}var ot;e([E()],rt.prototype,"_userClippingArea",void 0),e([E()],rt.prototype,"_resourceController",void 0),e([E()],rt.prototype,"_stage",void 0),e([E({readOnly:!0})],rt.prototype,"deconflictor",void 0),e([E({readOnly:!0})],rt.prototype,"labeler",void 0),e([E({type:te,readOnly:!0,aliasOf:"state.animation"})],rt.prototype,"animation",void 0),e([E({readOnly:!0})],rt.prototype,"basemapTerrain",void 0),e([E({readOnly:!0})],rt.prototype,"elevationProvider",void 0),e([E({type:t,aliasOf:"stateManager.camera"})],rt.prototype,"camera",void 0),e([E({type:t,aliasOf:"stateManager.contentCamera"})],rt.prototype,"contentCamera",void 0),e([E({readOnly:!0})],rt.prototype,"canvas",void 0),e([E({type:tt,aliasOf:"stateManager.center"})],rt.prototype,"center",void 0),e([E({type:Ye})],rt.prototype,"clippingArea",null),e([E({type:oe})],rt.prototype,"constraints",void 0),e([E({type:Ye,readOnly:!0})],rt.prototype,"renderDataExtent",null),e([E({type:Ye,readOnly:!0})],rt.prototype,"dataExtent",null),e([E({type:Ye,readOnly:!0})],rt.prototype,"groundAndLayersExtent",null),e([E({value:null,type:le})],rt.prototype,"environment",null),e([j("environment")],rt.prototype,"castEnvironment",null),e([E({readOnly:!0})],rt.prototype,"environmentManager",void 0),e([E({type:Ye,aliasOf:"stateManager.extent"})],rt.prototype,"extent",void 0),e([E()],rt.prototype,"floors",void 0),e([E({readOnly:!0,aliasOf:"stateManager.screenCenter"})],rt.prototype,"screenCenter",void 0),e([E({type:Number})],rt.prototype,"pixelRatio",null),e([E({type:Number,dependsOn:["qualitySettings.maximumPixelRatio","qualitySettings.maximumRenderResolution","size"]})],rt.prototype,"maximumPixelRatio",null),e([E({aliasOf:"stateManager.frustum"})],rt.prototype,"frustum",void 0),e([E({type:Number,readOnly:!0})],rt.prototype,"fullOpacity",void 0),e([E({readOnly:!0})],rt.prototype,"graphicsView",void 0),e([E({readOnly:!0})],rt.prototype,"analysisViewManager",void 0),e([E()],rt.prototype,"groundView",void 0),e([E({type:Boolean})],rt.prototype,"initialExtentRequired",null),e([E()],rt.prototype,"_defaultsFromMapSettings",null),e([E({type:Boolean,readOnly:!0})],rt.prototype,"interacting",null),e([E()],rt.prototype,"stationary",null),e([E({aliasOf:"state.navigating"})],rt.prototype,"navigating",void 0),e([E()],rt.prototype,"map",void 0),e([E({readOnly:!0})],rt.prototype,"mapCoordsHelper",void 0),e([E({aliasOf:"stateManager.padding"})],rt.prototype,"padding",void 0),e([E({type:Pe,readOnly:!0})],rt.prototype,"pointsOfInterest",void 0),e([E({type:ge,readOnly:!0})],rt.prototype,"featureTiles",void 0),e([E()],rt.prototype,"featureTreeDebugger",void 0),e([E({type:Boolean})],rt.prototype,"screenSizePerspectiveEnabled",void 0),e([E({constructOnly:!0})],rt.prototype,"deactivatedWebGLExtensions",void 0),e([E({constructOnly:!0})],rt.prototype,"debugWebGLExtensions",void 0),e([E({constructOnly:!0})],rt.prototype,"renderCanvas",void 0),e([E({constructOnly:!0})],rt.prototype,"state",void 0),e([E({readOnly:!0})],rt.prototype,"inputManager",void 0),e([E({readOnly:!0})],rt.prototype,"stateManager",void 0),e([E({type:["low","medium","high"]})],rt.prototype,"qualityProfile",null),e([E({type:xe,get(){let e=this._get("qualitySettings");return e||(e=new xe,_e.apply(this.qualityProfile,e)),e}})],rt.prototype,"qualitySettings",void 0),e([E()],rt.prototype,"slicePlane",null),e([E({readOnly:!0})],rt.prototype,"typeSpecificPreconditionsReady",null),e([E({readOnly:!0})],rt.prototype,"renderCoordsHelper",void 0),e([E({readOnly:!0})],rt.prototype,"sceneIntersectionHelper",void 0),e([E({type:Number,dependsOn:["scale","spatialReference"],readOnly:!0})],rt.prototype,"resolution",null),e([E({type:Number,aliasOf:"stateManager.scale"})],rt.prototype,"scale",void 0),e([E()],rt.prototype,"heightModelInfo",null),e([E()],rt.prototype,"spatialReference",void 0),e([E({type:Boolean,constructOnly:!0})],rt.prototype,"alphaCompositingEnabled",void 0),e([E({type:Boolean})],rt.prototype,"supersampleScreenshotsEnabled",void 0),e([E({readOnly:!0})],rt.prototype,"type",void 0),e([E({type:Ze})],rt.prototype,"ui",void 0),e([E({type:Boolean,readOnly:!0,dependsOn:["graphicsView.updating","basemapView.updating","basemapTerrain.updating","layerViewManager.updating","layerViewManager.updatingRemaining","_resourceController.updating","_stage.updating","featureTiles.updating","pointsOfInterest.updating","environmentManager.updating","overlay.updating","updatingHandles.updating","featureTreeDebugger.updating","labeler.updating","deconflictor.updating","ready","stationary","inputManager.hasPendingInputs","toolViewManager.updating","analysisViewManager.updating"]})],rt.prototype,"updating",null),e([E({type:Number,readOnly:!0,dependsOn:["updating"]})],rt.prototype,"updatingProgress",void 0),e([E({type:["global","local"]})],rt.prototype,"viewingMode",null),e([E({type:s,aliasOf:"stateManager.viewpoint"})],rt.prototype,"viewpoint",void 0),e([E({type:Number,aliasOf:"stateManager.zoom"})],rt.prototype,"zoom",void 0),e([E({type:Me})],rt.prototype,"highlightOptions",void 0),rt=e([I("esri.views.SceneView")],rt),function(e){e[e.INCLUDE=0]="INCLUDE",e[e.EXCLUDE=1]="EXCLUDE"}(ot||(ot={}));const lt=H(),pt=P(),ht=q(),dt=rt;export{dt as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import t from"../Camera.js";import"../geometry.js";import i from"../Graphic.js";import r from"../Ground.js";import s from"../Viewpoint.js";import n from"../core/Collection.js";import{byId as a}from"../core/domUtils.js";import o from"../core/Error.js";import{on as l}from"../core/events.js";import{handlesGroup as p,makeHandle as h}from"../core/handleUtils.js";import d from"../core/has.js";import{isIterable as c}from"../core/iteratorUtils.js";import u from"../core/Logger.js";import{destroyMaybe as g,isNone as m,isSome as f,unwrapOr as y}from"../core/maybe.js";import{ObservableChangesType as w}from"../core/ObservableChangesType.js";import{throwIfAborted as v}from"../core/promiseUtils.js";import{initial as _,syncAndInitial as b}from"../core/reactiveUtils.js";import{setFrameDuration as M}from"../core/scheduling.js";import{on as R,whenOnce as S,init as x,whenTrueOnce as V}from"../core/watchUtils.js";import{initialize as C}from"../core/workers/workers.js";import{screenPointObjectToArray as T,createScreenPoint as O,createScreenPointArray as P}from"../core/screenUtils.js";import{property as E}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import{cast as j}from"../core/accessorSupport/decorators/cast.js";import{subclass as I}from"../core/accessorSupport/decorators/subclass.js";import{ensureType as G}from"../core/accessorSupport/ensureType.js";import{c as H}from"../chunks/vec3f64.js";import L from"../geometry/HeightModelInfo.js";import{canProjectWithoutEngine as U,project as A,projectPointToVector as D,projectVectorToVector as F,projectBoundingRect as W}from"../geometry/projection.js";import{create as q,toExtent as z}from"../geometry/support/aaBoundingRect.js";import{B as k,a as N}from"../chunks/boundedPlane.js";import{renderSRFromViewSR as B}from"../geometry/support/coordinateSystem.js";import{getResolutionForScale as Q}from"../geometry/support/scaleUtils.js";import $ from"../layers/VoxelWasmManager.js";import{isTiledLayer as X}from"../layers/support/layerUtils.js";import{BreakpointsOwner as K}from"./BreakpointsOwner.js";import{DOMContainer as Z}from"./DOMContainer.js";import J from"./GroundView.js";import{PopupView as Y}from"./PopupView.js";import ee from"./View.js";import te from"./ViewAnimation.js";import{ViewingMode as ie,stringFromViewingMode as re,viewingModeFromString as se}from"./ViewingMode.js";import{layerView3DImporter as ne}from"./3d/layerViewModuleImportUtils.js";import ae from"./3d/analysis/AnalysisViewManager3D.js";import oe from"./3d/constraints/Constraints.js";import le from"./3d/environment/SceneViewEnvironment.js";import{SceneViewEnvironmentManager as pe}from"./3d/environment/SceneViewEnvironmentManager.js";import he from"./3d/input/SceneInputManager.js";import{GraphicsDeconflictor as de}from"./3d/layers/graphics/GraphicsDeconflictor.js";import{Labeler as ce}from"./3d/layers/graphics/Labeler.js";import{ObjectResourceCache as ue}from"./3d/layers/graphics/ObjectResourceCache.js";import ge from"./3d/layers/support/FeatureTileTree3D.js";import me from"./3d/state/ViewState.js";import fe from"./3d/state/ViewStateManager.js";import{SceneIntersectionHelper as ye}from"./3d/state/helpers/SceneIntersectionHelper.js";import{CombinedElevationProvider as we}from"./3d/support/CombinedElevationProvider.js";import ve from"./3d/support/debugFlags.js";import _e from"./3d/support/DisplayQualityProfile.js";import{getElevationAtPoint as be}from"./3d/support/ElevationProvider.js";import Me from"./3d/support/HighlightOptions.js";import{MapCoordsHelper as Re}from"./3d/support/MapCoordsHelper.js";import{PropertiesPool as Se}from"./3d/support/PropertiesPool.js";import xe from"./3d/support/QualitySettings.js";import{RenderCoordsHelper as Ve}from"./3d/support/RenderCoordsHelper.js";import{newResourceController as Ce}from"./3d/support/ResourceController.js";import Te from"./3d/support/SceneViewPerformanceInfo.js";import{SharedSymbolResources as Oe}from"./3d/support/SharedSymbolResources.js";import Pe from"./3d/support/pointsOfInterest/PointsOfInterest.js";import Ee from"./3d/terrain/TerrainSurface.js";import{isSurfaceLayerView as je,getTiledLayerInfo as Ie}from"./3d/terrain/terrainUtils.js";import{Stage as Ge}from"./3d/webgl-engine/Stage.js";import{newIntersector as He,DEFAULT_TOLERANCE as Le}from"./3d/webgl-engine/lib/Intersector.js";import{StoreResults as Ue,IntersectorType as Ae}from"./3d/webgl-engine/lib/IntersectorInterfaces.js";import{isValidIntersectorResult as De}from"./3d/webgl-engine/lib/intersectorUtils.js";import{toGraphic as Fe,toOwner as We}from"./3d/webgl-engine/lib/intersectorUtilsConversions.js";import{TERRAIN_ID as qe}from"./3d/webgl-engine/lib/verticalOffsetUtils.js";import{hitTestSelectSameDistance as ze}from"./support/hitTestSelectUtils.js";import{occludeesSupported as ke}from"./support/layerViewUtils.js";import{toRenderSettings as Ne,screenshotSuperSampleSettings as Be}from"./support/screenshotUtils.js";import{isSupportedScreenPointEvent as Qe,createScreenPointFromSupportedEvent as $e}from"./support/screenUtils.js";import{isSpatialReferenceSupported as Xe}from"./support/spatialReferenceSupport.js";import{check as Ke}from"./support/WebGLRequirements.js";import Ze from"./ui/3d/DefaultUI3D.js";import Je from"../webscene/Environment.js";import Ye from"../geometry/Extent.js";import et from"../geometry/SpatialReference.js";import tt from"../geometry/Point.js";const it=u.getLogger("esri.views.SceneView");let rt=class extends(K(Z(Y(ee)))){constructor(e){super(e),this._userClippingArea=null,this._clippingArea=null,this._initialDefaultSpatialReference=null,this._defaults={},this._externallySet={environment:!1},this._createGraphicsViewController=null,this._resolveWhenReady=[],this.propertiesPool=new Se({slicePlane:k},this),this._resourceController=Ce(this),this._defaultToMapOptions={include:new Set},this._defaultHitTestOptions={exclude:new Set},this.deconflictor=new de({view:this}),this.labeler=new ce({view:this,deconflictor:this.deconflictor.labels}),this.sharedSymbolResources=null,this.basemapTerrain=null,this.elevationProvider=null,this.camera=null,this.canvas=null,this.center=null,this.constraints=new oe,this.environmentManager=new pe,this.extent=null,this.floors=new n,this.windowDevicePixelRatio=1,this.fullOpacity=1,this.graphicsView=null,this.analysisViewManager=new ae({view:this}),this.groundView=null,this.navigating=!1,this.map=null,this.screenSizePerspectiveEnabled=!0,this.state=new me,this.scale=null,this.spatialReference=null,this.alphaCompositingEnabled=!1,this.supersampleScreenshotsEnabled=!0,this.type="3d",this.ui=new Ze,this._numUpdating=0,this._lastUpdateTime=0,this.updatingProgress=.5,this.viewpoint=null,this.zoom=null,this.highlightOptions=new Me,C(),e&&e.environment||(this._defaults.environment=new le,this.environment=this._defaults.environment);const t=e=>{f(e)&&e.type===w.MOVE||(this._updatingChanged(),this.map&&this.map.allLayers.forEach((async e=>{try{await e.when()}catch{}this._updatingChanged()})))};this.handles.add([R(this,"map.allLayers","after-changes",t,t,t,!0),this.allLayerViews.on("after-changes",(e=>this._updateUpdatingMonitors(e))),this.watch("map",(e=>{e&&e.load&&e.load().catch((()=>{}))}))]),this.inputManager=new he({view:this});const i=()=>{const e=window.devicePixelRatio;e!==this.windowDevicePixelRatio&&(this.windowDevicePixelRatio=e,this.notifyChange("pixelRatio"))};this.stateManager=new fe({view:this,updateDevicePixelRatio:i})}initialize(){this.groundView=new J({view:this}),this._updateUpdatingMonitors();const e=()=>this._updateDefaultToMapOptions();this.handles.add(R(this,"map.allLayers","after-changes",e,e,e)),this.updatingHandles.add((()=>this.qualitySettings.memoryLimit),(e=>{this.resourceController&&(this.resourceController.memoryController.maxMemory=e)}),_),this.updatingHandles.add((()=>this.qualitySettings.additionalCacheMemory),(e=>{this.resourceController&&(this.resourceController.memoryController.additionalCacheMemory=e)}),_),this.updatingHandles.add((()=>this.qualitySettings.frameRate),(e=>M(e>0?1e3/Math.ceil(e):0)),_),this.updatingHandles.add((()=>ve.SCENEVIEW_LOCKING_LOG),(e=>this.defaultsFromMap.logDebugInformation=e),_),this.updatingHandles.add((()=>{var e;return null==(e=this.map)?void 0:e.ground}),e,b),this.updatingHandles.add((()=>{var e,t;return null==(e=this.map)||null==(t=e.ground)?void 0:t.opacity}),(()=>this._updateDefaultHitTestOptions()),b),this.handles.add(this.watch("spatialReference",(()=>this.notifyChange("clippingArea")),!0))}destroy(){this.destroyed||(this.invalidate(),this.activeTool=null,this.layerViewManager.clear(),this._exitSurface(),this._disposeGraphicsView(),this.sharedSymbolResources=g(this.sharedSymbolResources),this.labeler.destroy(),this._set("labeler",null),this.deconflictor.destroy(),this._set("deconflictor",null),this._resourceController=g(this._resourceController),this.stateManager.destroy(),this._set("stateManager",null),this.inputManager.destroy(),this._set("inputManager",null),this.propertiesPool.destroy(),this.handles.remove("updatingMonitors"),this.environmentManager.destroy(),this._set("environmentManager",null),this.groundView=g(this.groundView))}get renderSpatialReference(){return this.renderCoordsHelper&&this.renderCoordsHelper.spatialReference}get basemapSpatialReference(){return this.basemapTerrain&&this.basemapTerrain.spatialReference}installContentCameraReset(e={sticky:!1}){return this.stateManager.installContentCameraReset(e)}get clippingArea(){if("global"===this.viewingMode)return null;let e=this._userClippingArea||this.get("map.clippingArea");return!(!!this._userClippingArea||this.get("map.clippingEnabled"))||m(e)?(this._clippingArea=null,null):e instanceof Ye?this.spatialReference&&(e=at(e,this.spatialReference),m(e))?(it.error("#clippingArea","setting clippingArea with incompatible SpatialReference"),this._clippingArea):(e=e.clone(),m(e.intersection(this.groundAndLayersExtent))&&(e.xmin=e.xmax,e.ymin=e.ymax),e.zmin=void 0,e.zmax=void 0,e.equals(this._clippingArea)||(this._clippingArea=e),this._clippingArea):(it.error("#clippingArea","only clippingArea geometries of type Extent are supported"),this._clippingArea)}set clippingArea(e){this.ready&&"global"===this.viewingMode&&f(e)?it.error("#clippingArea=","Clipping area is only supported in local viewingMode"):this._userClippingArea=e}get renderDataExtent(){if(this.state.viewingMode===ie.Global)return null;const e=this.renderSpatialReference,t=this.dataExtent;return m(t)||m(e)||t.spatialReference.equals(e)?t:at(t,e)}get dataExtent(){let e=this.groundAndLayersExtent;const t=this.spatialReference||et.WGS84,i=at(this.clippingArea,t);f(i)&&(e=f(e)?e.intersection(i):i);const r=this._get("dataExtent");return f(e)&&e.equals(r)?r:e}get groundAndLayersExtent(){const e=this.spatialReference||et.WGS84;let t;const i=i=>{const r=at(i,e);m(r)||(f(t)?t.union(r):t=r.clone())},r=this.basemapTerrain;if(null!=r&&r.spatialReference){const e=r.groundExtent;i(new Ye({xmin:e[0],ymin:e[1],zmin:0,xmax:e[2],ymax:e[3],zmax:0,spatialReference:r.spatialReference}))}if(this.map){const e=e=>{!f(e.fullExtent)||"graphics"===e.type&&e.internal||i(e.fullExtent)};this.map.allLayers.forEach((t=>e(t)))}if(m(t))return null;t.hasZ?(t.zmin=Math.min(0,t.zmin),t.zmax=Math.max(0,t.zmax)):(t.zmin=0,t.zmax=0);const s=this._get("groundAndLayersExtent");return t.equals(s)?s:t}set environment(e){e!==this._defaults.environment&&(this._externallySet.environment=!0),this._set("environment",e)}castEnvironment(e){return e?e instanceof le?e:e instanceof Je?null!=this.environment?this.environment.cloneWithWebsceneEnvironment(e):le.fromWebsceneEnvironment(e):G(le,e):new le}get pixelRatio(){return Math.min(this.windowDevicePixelRatio,this.maximumPixelRatio)}set pixelRatio(e){f(e)?this._override("pixelRatio",e):this._clearOverride("pixelRatio")}get maximumPixelRatio(){let e=1/0;const{maximumPixelRatio:t,maximumRenderResolution:i}=this.qualitySettings;if(null!=t&&(e=Math.min(e,t)),null!=i){const t=i/Math.max(this.width,this.height);e=Math.min(e,t)}return e}set maximumPixelRatio(e){f(e)?this._override("maximumPixelRatio",e):this._clearOverride("maximumPixelRatio")}get initialExtentRequired(){return this.stateManager&&!this.stateManager.hasInitialView}get _defaultsFromMapSettings(){return{required:{tileInfo:!1,heightModelInfo:!0,extent:!1}}}get interacting(){return this.navigating||f(this.activeTool)}get stationary(){return!this.animation&&!this.resizing&&(m(this.state)||this.state.stationary)}set qualityProfile(e){_e.isValidProfile(e)&&(_e.apply(e,this.qualitySettings),this._set("qualityProfile",e))}get qualityProfile(){return this._get("qualityProfile")||_e.getDefaultProfile()}set slicePlane(e){if(f(this._stage)&&this._stage.renderView.setRenderParameters({slicePlane:e}),m(e))return void this._set("slicePlane",null);const t=this.propertiesPool.get("slicePlane");N(e,t),this._set("slicePlane",t)}get typeSpecificPreconditionsReady(){return!!this.viewingMode}get resolution(){return null!=this.spatialReference?Q(this.scale,this.spatialReference):0}get heightModelInfo(){const e=this.getDefaultHeightModelInfo();return null!=e?L.deriveUnitFromSR(e,this.spatialReference):null}get updating(){var e,t,i;if(this.destroyed)return!1;let r=0,s=this.layerViewManager.updating,n=s?this.layerViewManager.updatingRemaining:0;this.allLayerViews.forEach((e=>{if(e.isFulfilled()){if(e.updating){if(s=!0,e.suspended||je(e))return;++n,r+=e.updatingProgress}}else++n}));for(const a of[this.graphicsView,this.basemapView,this._resourceController,this._stage,this.featureTiles,this.pointsOfInterest,this.environmentManager,this.overlay,this.featureTreeDebugger,this.toolViewManager,this.analysisViewManager])if(f(a)&&a.updating){const e=.1;n+=e,r+=.5*e}for(const a of[this.deconflictor,this.labeler,this.basemapTerrain])f(a)&&a.updating&&(++n,r+=a.updatingProgress);if(s=!!(s||n>0||this.updatingHandles.updating||!this.ready||!this.stationary||this._createGraphicsViewController||null!=(e=this.inputManager)&&e.hasPendingInputs||null!=(t=this.map)&&null!=(i=t.allLayers)&&i.some((e=>!e.isFulfilled()))),s?(this._numUpdating=Math.max(n,this._numUpdating),r+=this._numUpdating-n):this._numUpdating=0,this._numUpdating>0?r/=this._numUpdating:r=s?0:1,this._get("updatingProgress")!==r){const e=this._resourceController.scheduler.now;if(r<1){const t=Math.min((e-this._lastUpdateTime)/2e3,1);r=this.updatingProgress*(1-t)+r*t}this._set("updatingProgress",r),this._lastUpdateTime=s&&r<1?e:0}return s}get viewingMode(){var e;const t=this._predeterminedViewingMode;if(f(t))return re(t);const i=this.spatialReference;return f(null==(e=this.defaultsFromMap)?void 0:e.viewingMode)&&i&&i.equals(this.defaultsFromMap.spatialReference)?re(this.defaultsFromMap.viewingMode):!i||Xe(i,ie.Global)?"global":"local"}set viewingMode(e){this.ready?it.error("#viewingMode","viewingMode cannot be set once view is ready"):e?this._override("viewingMode",e):void 0===e&&this._clearOverride("viewingMode")}get resourceController(){return this._resourceController}get performanceInfo(){return new Te(this)}forceAnimationTime(e){this._stage.renderView.forcedAnimationTime=this.basemapTerrain.overlayManager.forcedAnimationTime=e}on(e,t,i,r){const s=this.viewEvents.on(e,t,i,r);return s||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}toMap(e,t){if(!this.ready)return it.error("#toMap()","Scene view cannot be used before it is ready"),null;const i=t?this.externalToInternalIntersectOptions(t):this._defaultToMapOptions,r=f(i.graphics)&&(f(i.graphics.include)||f(i.graphics.exclude)),s=Qe(e)?$e(this,e):e,n=T(s);i.enableDraped=i.include&&!i.include.has(qe)||i.exclude&&i.exclude.has(qe);const a=this.sceneIntersectionHelper,o=He(this.state.viewingMode);if(o.options.selectionMode=!0,o.options.store=r?Ue.ALL:Ue.MIN,a.intersectIntersectorScreen(n,o,i),r){for(const e of o.results.all){const t=Fe(e,this);if(m(t))return this._intersectResultToMapPoint(e);if(this._testGraphicUidFilter(i.graphics,t))return this._intersectResultToMapPoint(e)}return null}return this._intersectResultToMapPoint(o.results.min)}toScreen(e){if(!this.ready)return it.error("#toScreen()","Scene view cannot be used before it is ready"),null;const t=y(null==e.z&&be(this.elevationProvider,e),0);return D(e,lt,this.renderSpatialReference,t),this.state.camera.projectToScreen(lt,pt),O(pt[0],pt[1])}pixelSizeAt(e){return this.ready?e?(D(e,lt,this.renderSpatialReference),this.state.camera.computeScreenPixelSizeAt(lt)):0:(it.error("#pixelSizeAt()","Scene view cannot be used before it is ready"),null)}overlayPixelSizeInMapUnits(e){const t=this.basemapTerrain.overlayManager;return t?t.overlayPixelSizeInMapUnits(e):1}hitTest(e,t){if(!this.ready)return it.error("#hitTest()","Scene view cannot be used before it is ready"),null;const i=Qe(e)?$e(this,e):e,r=P(i.x,i.y),s=t?this.externalToInternalIntersectOptions(t):this._defaultHitTestOptions;s.requiresGroundFeedback=!0,s.enableDraped=!0;const n=He(this.state.viewingMode);n.options.selectionMode=!0,n.options.store=Ue.ALL,this.sceneIntersectionHelper.intersectIntersectorScreen(r,n,s);const a=this._intersectResultsToHits(n.results.all,s.graphics),o=n.results.ground,l=We(o,this),p=f(l)&&"type"in l&&"integrated-mesh"===l.type?l:null,h={screenPoint:i,results:a,ground:{mapPoint:this._intersectResultToMapPoint(o),distance:De(o)?o.distanceInRenderSpace:0,layer:p}};return ve.SCENEVIEW_HITTEST_RETURN_INTERSECTOR&&(h.intersector=n),Promise.resolve(h)}popupHitTest(e){return ze(this,e).then((({results:t,ground:i})=>{let r=null;return!(0===t.length||Math.abs(y(t[0].distance,0)-i.distance)<1e-5)||i.layer&&"integrated-mesh"===i.layer.type||(r=i.mapPoint),{results:t,screenPoint:e,mapPoint:r}}))}goTo(e,t){return this.updatingHandles.addPromise(this.stateManager.goTo(e,t))}async whenAnalysisView(e){if(m(e.parent))throw new o("view:no-analysisview-for-analysis","The analysis has not been added to an AnalysisLayer or SceneView.analyses",{analysis:e});if("analysis"===e.parent.type){return(await this.whenLayerView(e.parent)).whenAnalysisView(e)}return this.analysisViewManager.whenAnalysisView(e)}whenLayerView(e){return super.whenLayerView(e)}takeScreenshot(e){return this.whenReady().then((()=>{const t=Ne(e,this);return t.pixelRatio/=this.pixelRatio,this._stage.renderView.takeScreenshot(Be(t,this.supersampleScreenshotsEnabled,this.padding))}))}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}importLayerView(e){return ne.importLayerView(e)}hasLayerViewModule(e){return ne.hasLayerViewModule(e)}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){var e,t,i,r;return this.map&&"initialViewProperties"in this.map&&(null==(e=this.map)||null==(t=e.initialViewProperties)?void 0:t.spatialReference)||(null==(i=this.defaultsFromMap)?void 0:i.spatialReference)||(null==(r=this.defaultsFromMap)?void 0:r.ready)&&this._initialDefaultSpatialReference||null}async validate(){let e=Ke(this.type);if(d("safari")&&d("safari")<9&&(e=new o("sceneview:browser-not-supported","This browser is not supported by SceneView (Safari < 9)",{type:"safari",requiredVersion:9,detectedVersion:d("safari")})),f(e))throw it.warn("#validate()",e.message),e}get _predeterminedViewingMode(){var e,t;const i=this._isOverridden("viewingMode")?this._get("viewingMode"):null!=(e=this.map&&"initialViewProperties"in this.map?null==(t=this.map.initialViewProperties)?void 0:t.viewingMode:null)?e:null;return f(i)?se(i):null}getSpatialReferenceSupport({spatialReference:e,layer:t}){const i=this._predeterminedViewingMode;if(f(i))return this._validateSpatialReferenceForViewingMode(e,t,i)?{constraints:this._makeSpatialReferenceConstraints(e,t,i)}:null;const r=this._validateSpatialReferenceForViewingMode(e,t,ie.Local),s=this._validateSpatialReferenceForViewingMode(e,t,ie.Global);return r||s?r&&s?{constraints:this._makeSpatialReferenceConstraints(e,t,null)}:r?{constraints:this._makeSpatialReferenceConstraints(e,t,ie.Local)}:{constraints:this._makeSpatialReferenceConstraints(e,t,ie.Global)}:null}_validateSpatialReferenceForViewingMode(e,t,i){return!!Xe(e,i)&&(!!m(t)||(!X(t)||!m(Ie(t,e,i)))&&("voxel"!==t.type||i===ie.Local))}_makeSpatialReferenceConstraints(e,t,i){return t&&!X(t)&&"voxel"!==t.type&&(e.isWebMercator||e.isWGS84)?[{spatialReference:e,viewingMode:i},{spatialReference:e.isWebMercator?et.WGS84:et.WebMercator,viewingMode:i}]:t&&X(t)&&e.isWebMercator&&i!==ie.Global?[{spatialReference:e,viewingMode:i},{spatialReference:et.WGS84,viewingMode:ie.Local}]:[{spatialReference:e,viewingMode:i}]}_validateSpatialReference(e){const t=f(this.getSpatialReferenceSupport({spatialReference:e})),i=this._predeterminedViewingMode;return t||(f(i)?it.warnOnce(`Spatial reference defined on view not supported in ${re(i)} viewing mode.`):e.isGeographic&&it.warnOnce("Spatial reference is geographic but not supported.")),t}whenReady(){return new Promise((e=>{this.ready?e(this):this._resolveWhenReady.push(e)}))}computeMapPointFromVec3d(e,t){let i=this.spatialReference||et.WGS84;return F(e,this.renderSpatialReference,e,i)||(i=et.WGS84,F(e,this.renderSpatialReference,e,i)),t?(t.x=e[0],t.y=e[1],t.z=e[2],t.spatialReference=i):t=new tt(e,i),t}trackGraphicState(e){if(!e.graphic)return it.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=>{var s;!r&&f(t)&&"processor"in t&&"graphics-3d"===(null==(s=t.processor)?void 0:s.type)&&t.processor.graphicsCore&&(i=t.processor.graphicsCore.trackGraphicState(e))};return f(t)?s(t):this.whenViewForGraphic(e.graphic,{waitForLayer:!0}).then((e=>s(e)),(()=>{})).catch((()=>{})),{remove:()=>{r=!0,f(i)&&(i.remove(),i=null)}}}highlight(e){if(Array.isArray(e))return p(e.map((e=>this.highlight(e))));if(n.isCollection(e))return p(e.toArray().map((e=>this.highlight(e))));const t=this.getViewForGraphic(e);return t&&"highlight"in t?t.highlight(e):h()}maskOccludee(e){if(!e)return it.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&&f(t)&&ke(t)&&(i=t.maskOccludee(e))};return f(t)?s(t):this.whenViewForGraphic(e,{waitForLayer:!0}).then((e=>s(e)),(()=>{})).catch((()=>{})),{remove:()=>{r=!0,f(i)&&(i.remove(),i=null)}}}getViewForGraphic(e){return e.layer===this.graphics?this.graphicsView:e.layer?this.allLayerViews.find((t=>t.layer===e.layer)):null}graphicChanged(e){f(this.graphicsView)&&this.graphicsView.graphicChanged(e)}async whenViewForGraphic(e,t){if(e.layer===this)return await S(this,"graphicsView"),this.graphicsView;if(!e.layer||!this.map)throw new o("no-view-for-graphic");return t&&t.waitForLayer&&!this.map.allLayers.includes(e.layer)?new Promise(((t,i)=>{const r=this.map.allLayers.on("change",(s=>{-1!==s.added.indexOf(e.layer)&&(r.remove(),this.whenLayerView(e.layer).then(t,i))}))})):this.whenLayerView(e.layer)}externalToInternalIntersectOptions(e){const t=this._externalToInternalRenderItems(e.include,ot.INCLUDE),i=this._externalToInternalRenderItems(e.exclude,ot.EXCLUDE);return{include:t.layerUids,exclude:i.layerUids,graphics:{include:t.graphicUids,exclude:i.graphicUids}}}_intersectResultToMapPoint(e,t){return e.getIntersectionPoint(lt)?(t=this.computeMapPointFromVec3d(lt,t),e.intersector===Ae.TERRAIN&&this.basemapTerrain&&(t.z=y(be(this.basemapTerrain,t),0)),t):null}_intersectResultsToHits(e,t){const i=new Array;let r=null;for(let s=0;s<e.length;s++){const n=e[s],a=We(n,this);if(f(a)&&(a===this.map.ground||"type"in a&&"integrated-mesh"===a.type))break;const o=Fe(n,this);if(!f(o))continue;if(m(r)&&s!==e.length-1&&(r=new Set),f(r)){const e=this._getGraphicFilterUid(o);if(r.has(e))continue;r.add(e)}if(!this._testGraphicUidFilter(t,o))continue;const l=this._intersectResultToMapPoint(n),p=n.distanceInRenderSpace;i.push({graphic:o,mapPoint:l,distance:p})}return i}_getGraphicFilterUid(e){if(e.layer&&"objectIdField"in e.layer){const t=e.attributes[e.layer.objectIdField];if(t)return`o-${e.layer.id}-${t}`}return`u-${e.uid}`}_testGraphicUidFilter(e,t){const i=this._getGraphicFilterUid(t);return m(e)||(m(e.include)||e.include.has(i))&&(m(e.exclude)||!e.exclude.has(i))}_externalToInternalRenderItems(e,t,s={layerUids:null,graphicUids:null}){if(!e)return s;if(e instanceof i)nt(s,this._getGraphicFilterUid(e)),t===ot.INCLUDE&&(f(this.graphicsView)&&e.layer===this?st(s,this.graphicsView.processor.layer.id):e.layer&&st(s,e.layer.uid));else if(c(e))for(const i of e)i===this.graphics&&f(this.graphicsView)?st(s,this.graphicsView.processor.layer.id):i instanceof r?i===this.map.ground&&st(s,qe):this._externalToInternalRenderItems(i,t,s);else st(s,e.uid);return s}_initBasemapTerrain(){this._set("basemapTerrain",new Ee({view:this})),this._set("elevationProvider",new we({view:this})),this.elevationProvider.register("ground",this.basemapTerrain)}_exitBasemapTerrain(){this.basemapTerrain&&(this.elevationProvider.unregister(this.basemapTerrain),this.elevationProvider.destroy(),this._set("elevationProvider",null),this.basemapTerrain.destroy(),this._set("basemapTerrain",null))}_initGlobe(){this._initCoordinateSystem(),this.state.createInitialCamera(),this._initBasemapTerrain(),this._set("pointsOfInterest",new Pe({view:this})),this._set("featureTiles",new ge({renderCoordsHelper:this.renderCoordsHelper,cameraOnSurface:this.pointsOfInterest.contentCameraOnSurface,focus:this.pointsOfInterest.focus,tilingSchemeOwner:this.basemapTerrain,viewState:this.state,scheduler:this._resourceController.scheduler,terrain:this.basemapTerrain}));const e=()=>{const e=this.basemapTerrain&&this.basemapTerrain.extent;if(this.clippingArea||e)if(e&&this.basemapTerrain.spatialReference){const e=f(this.basemapTerrain.extent)?A(z(this.basemapTerrain.extent,this.basemapTerrain.spatialReference),this.spatialReference):null;f(this.clippingArea)?this.featureTiles.filterExtent=this.clippingArea.intersection(e):this.featureTiles.filterExtent=e}else this.featureTiles.filterExtent=this.clippingArea;else this.featureTiles.filterExtent=null};this.handles.add([this.updatingHandles.add((()=>ve.FEATURE_TILE_TREE_SHOW_TILES),(e=>{e&&this.featureTiles&&!this.featureTreeDebugger?this.updatingHandles.addPromise(import("./3d/layers/support/FeatureTileTree3DDebugger.js")).then((({FeatureTileTree3DDebugger:e})=>{!this.featureTreeDebugger&&ve.FEATURE_TILE_TREE_SHOW_TILES&&(this.featureTreeDebugger=new e({view:this}))})):e||!this.featureTreeDebugger||ve.FEATURE_TILE_TREE_SHOW_TILES||(this.featureTreeDebugger.destroy(),this.featureTreeDebugger=null)}),b),this.updatingHandles.add((()=>this.clippingArea),e,b),this.updatingHandles.add((()=>this.basemapTerrain.extent),e,b)],"feature-tiles"),this.stateManager.init()}_exitGlobe(){this.state&&(this.stateManager.deinit(),this.handles.remove("render-coords-helper"),this.handles.remove("feature-tiles"),this.featureTiles.destroy(),this._set("featureTiles",null),this.pointsOfInterest.destroy(),this._set("pointsOfInterest",null),this._exitBasemapTerrain(),this.state.exit(),this._exitCoordinateSystem())}_initCoordinateSystem(){if(this.spatialReference){const e=this.spatialReference;this.mapCoordsHelper&&this.mapCoordsHelper.spatialReference.equals(e)||this._set("mapCoordsHelper",new Re(this.map,e));const t=this.state.isGlobal,i=B(t,e);i!==this.renderSpatialReference&&(this._set("renderCoordsHelper",Ve.create(this.state.viewingMode,i)),t||this.handles.add(this.watch("basemapTerrain.extent",(e=>{const t=this.renderCoordsHelper.spatialReference;0===e[0]&&0===e[1]&&0===e[2]&&0===e[3]||!W(e,this.basemapTerrain.spatialReference,ht,t)||(this.renderCoordsHelper.extent=ht)}),!0),"render-coords-helper"),this.sceneIntersectionHelper&&this.sceneIntersectionHelper.setTolerance(Le/this.renderCoordsHelper.unitInMeters))}else this._set("mapCoordsHelper",null),this._set("renderCoordsHelper",null)}_exitCoordinateSystem(){this.mapCoordsHelper&&(this.handles.remove("render-coords-helper"),this._set("renderCoordsHelper",null),this._set("mapCoordsHelper",null))}_updatingChanged(){this.notifyChange("updating")}_updateUpdatingMonitors(e=null){f(e)&&e.type===w.MOVE||(this.handles.remove("updatingMonitors"),this.allLayerViews.forEach((e=>{e.destroyed||(this.handles.add([e.watch(["updating","updatingProgress"],(()=>this._updatingChanged()),!0)],"updatingMonitors"),e.when((()=>this._updatingChanged()),(()=>this._updatingChanged())))})),this._updatingChanged())}_renderScreenshotOverlay(e,t){if(!this.overlay||!this.overlay.hasVisibleItems)return t;const i=e.getContext("2d");return i.putImageData(t,0,0),this.overlay.renderCanvas(e),i.getImageData(0,0,t.width,t.height)}_initStage(){const e={deactivatedWebGLExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions,alpha:this.alphaCompositingEnabled,canvas:this.renderCanvas,screenshot:{renderOverlay:(e,t)=>this._renderScreenshotOverlay(e,t)}},t=new ye(this.state.viewingMode,(e=>this._stage.layers.forAll(e)),this);this._set("sceneIntersectionHelper",t);const i=a(this.surface),{resourceController:r,state:s,renderSpatialReference:n}=this;this._stage=new Ge({options:e,container:i,resourceController:r,state:s,sceneIntersectionHelper:t,renderSR:n}),this._stage.renderView.setRenderParameters({slicePlane:this.slicePlane}),this._lostWebGLContextHandle=l(this._stage.renderView.canvas,"webglcontextlost",(()=>this.fatalError=new o("webgl-context-lost"))),this.handles.add([this.updatingHandles.add((()=>this.qualitySettings.antialiasingEnabled),(()=>this._stage.renderView.setRenderParameters({antialiasingEnabled:this.qualitySettings.antialiasingEnabled})),_),this.updatingHandles.add((()=>this.qualitySettings.highQualityTransparency),(()=>this._stage.renderView.setRenderParameters({highQualityTransparency:this.qualitySettings.highQualityTransparency})),_),x(this,"magnifier",(e=>this._stage.renderView.magnifier=e),!0)],"stage");const p=()=>{this._stage.renderView.setRenderParameters({defaultHighlightOptions:Me.toEngineOptions(this.highlightOptions)})};this.handles.add(this.updatingHandles.add((()=>[this.highlightOptions.color,this.highlightOptions.haloColor,this.highlightOptions.haloOpacity,this.highlightOptions.fillOpacity,this.highlightOptions.shadowOpacity,this.highlightOptions.shadowColor,this.highlightOptions.shadowDifference]),p),"stage"),p(),this.renderCoordsHelper&&this.sceneIntersectionHelper.setTolerance(Le/this.renderCoordsHelper.unitInMeters),this._set("canvas",this._stage.renderView.canvas)}_exitStage(){this._set("sceneIntersectionHelper",null),this._stage.destroy(),this._stage=null,this._lostWebGLContextHandle.remove(),this._lostWebGLContextHandle=null,this.handles.remove("stage"),this._set("canvas",null)}_initSurface(e){this._exitSurface(),this.state.init(e,this.spatialReference),this._initStage(),this._initGlobe(),this.sharedSymbolResources=new Oe({view:this,viewingMode:e,resourceController:this._resourceController,pointsOfInterest:this.pointsOfInterest,viewState:this.state,objectResourceCache:new ue})}_exitSurface(){this.sharedSymbolResources&&(this.sharedSymbolResources.objectResourceCache.destroy(),this.sharedSymbolResources.destroy(),this.sharedSymbolResources=null,this._exitGlobe(),this._exitStage())}_createGraphicsViewIfNeeded(){if(this.graphicsView||this._createGraphicsViewController)return;if(0===this.graphics.length)return;this.handles.remove("graphics-view"),this._createGraphicsViewController=new AbortController;const e=()=>{this._createGraphicsViewController=null,this._updatingChanged()};this._createGraphicsViewAsync(this._createGraphicsViewController.signal).then(e,e),this._updatingChanged()}async _createGraphicsViewAsync(e){const t=(await import("./3d/layers/GraphicsView3D.js")).default;v(e),await V(this.basemapTerrain,"ready",e),this._set("graphicsView",new t({view:this}))}_disposeGraphicsView(){this._createGraphicsViewController&&(this._createGraphicsViewController.abort(),this._createGraphicsViewController=null),this.handles.remove("graphics-view"),f(this.graphicsView)&&(this.handles.remove(this.graphicsView.processor.layer.id),this.graphicsView.destroy(),this._set("graphicsView",null))}_startup(){const e=se(this.viewingMode);if(e===ie.Global&&(this._clippingArea=null),this._initSurface(e),this._set("ready",!0),this.handles.add(R(this,"graphics","after-changes",(()=>this._createGraphicsViewIfNeeded())),"graphics-view"),this._createGraphicsViewIfNeeded(),!this._externallySet.environment){const e=this.get("map.initialViewProperties.environment");e&&(this.environment=e)}this.labeler.setup(),this.environmentManager.connectView(this),this.inputManager.connect();const t=this._resolveWhenReady;this._resolveWhenReady=[],t.forEach((e=>e(this)))}_teardown(){this._initialDefaultSpatialReference=null,this.inputManager.disconnect(),this.environmentManager.disconnectView(),this.labeler.dispose(),this._disposeGraphicsView(),this.handles.remove("graphics-view"),this._exitSurface(),this._set("ready",!1)}_updateDefaultToMapOptions(){if(this._defaultToMapOptions.include.clear(),this.map){this.map.ground&&this._defaultToMapOptions.include.add(qe);for(const e of this.map.allLayers.items)"integrated-mesh"===e.type&&this._defaultToMapOptions.include.add(e.uid)}}_updateDefaultHitTestOptions(){if(this._defaultHitTestOptions.exclude.clear(),this.map){this.map.ground&&this.map.ground.opacity<1&&this._defaultHitTestOptions.exclude.add(qe);for(const e of this.map.allLayers.items)"integrated-mesh"===e.type&&e.opacity<1&&this._defaultToMapOptions.exclude.add(e.uid)}}getVoxelWasmPerSceneView(){return $.getInstance().getVoxelWasmPerSceneView(this)}};function st(e,t){e.layerUids||(e.layerUids=new Set),e.layerUids.add(t)}function nt(e,t){e.graphicUids||(e.graphicUids=new Set),e.graphicUids.add(t)}function at(e,t){return f(e)&&U(e.spatialReference,t)?A(e,t):null}var ot;e([E()],rt.prototype,"_userClippingArea",void 0),e([E()],rt.prototype,"_resourceController",void 0),e([E()],rt.prototype,"_stage",void 0),e([E({readOnly:!0})],rt.prototype,"deconflictor",void 0),e([E({readOnly:!0})],rt.prototype,"labeler",void 0),e([E({type:te,readOnly:!0,aliasOf:"state.animation"})],rt.prototype,"animation",void 0),e([E({readOnly:!0})],rt.prototype,"basemapTerrain",void 0),e([E({readOnly:!0})],rt.prototype,"elevationProvider",void 0),e([E({type:t,aliasOf:"stateManager.camera"})],rt.prototype,"camera",void 0),e([E({type:t,aliasOf:"stateManager.contentCamera"})],rt.prototype,"contentCamera",void 0),e([E({readOnly:!0})],rt.prototype,"canvas",void 0),e([E({type:tt,aliasOf:"stateManager.center"})],rt.prototype,"center",void 0),e([E({type:Ye})],rt.prototype,"clippingArea",null),e([E({type:oe})],rt.prototype,"constraints",void 0),e([E({type:Ye,readOnly:!0})],rt.prototype,"renderDataExtent",null),e([E({type:Ye,readOnly:!0})],rt.prototype,"dataExtent",null),e([E({type:Ye,readOnly:!0})],rt.prototype,"groundAndLayersExtent",null),e([E({value:null,type:le})],rt.prototype,"environment",null),e([j("environment")],rt.prototype,"castEnvironment",null),e([E({readOnly:!0})],rt.prototype,"environmentManager",void 0),e([E({type:Ye,aliasOf:"stateManager.extent"})],rt.prototype,"extent",void 0),e([E()],rt.prototype,"floors",void 0),e([E({readOnly:!0,aliasOf:"stateManager.screenCenter"})],rt.prototype,"screenCenter",void 0),e([E({type:Number})],rt.prototype,"pixelRatio",null),e([E({type:Number,dependsOn:["qualitySettings.maximumPixelRatio","qualitySettings.maximumRenderResolution","size"]})],rt.prototype,"maximumPixelRatio",null),e([E({aliasOf:"stateManager.frustum"})],rt.prototype,"frustum",void 0),e([E({type:Number,readOnly:!0})],rt.prototype,"fullOpacity",void 0),e([E({readOnly:!0})],rt.prototype,"graphicsView",void 0),e([E({readOnly:!0})],rt.prototype,"analysisViewManager",void 0),e([E()],rt.prototype,"groundView",void 0),e([E({type:Boolean})],rt.prototype,"initialExtentRequired",null),e([E()],rt.prototype,"_defaultsFromMapSettings",null),e([E({type:Boolean,readOnly:!0})],rt.prototype,"interacting",null),e([E()],rt.prototype,"stationary",null),e([E({aliasOf:"state.navigating"})],rt.prototype,"navigating",void 0),e([E()],rt.prototype,"map",void 0),e([E({readOnly:!0})],rt.prototype,"mapCoordsHelper",void 0),e([E({aliasOf:"stateManager.padding"})],rt.prototype,"padding",void 0),e([E({type:Pe,readOnly:!0})],rt.prototype,"pointsOfInterest",void 0),e([E({type:ge,readOnly:!0})],rt.prototype,"featureTiles",void 0),e([E()],rt.prototype,"featureTreeDebugger",void 0),e([E({type:Boolean})],rt.prototype,"screenSizePerspectiveEnabled",void 0),e([E({constructOnly:!0})],rt.prototype,"deactivatedWebGLExtensions",void 0),e([E({constructOnly:!0})],rt.prototype,"debugWebGLExtensions",void 0),e([E({constructOnly:!0})],rt.prototype,"renderCanvas",void 0),e([E({constructOnly:!0})],rt.prototype,"state",void 0),e([E({readOnly:!0})],rt.prototype,"inputManager",void 0),e([E({readOnly:!0})],rt.prototype,"stateManager",void 0),e([E({type:["low","medium","high"]})],rt.prototype,"qualityProfile",null),e([E({type:xe,get(){let e=this._get("qualitySettings");return e||(e=new xe,_e.apply(this.qualityProfile,e)),e}})],rt.prototype,"qualitySettings",void 0),e([E()],rt.prototype,"slicePlane",null),e([E({readOnly:!0})],rt.prototype,"typeSpecificPreconditionsReady",null),e([E({readOnly:!0})],rt.prototype,"renderCoordsHelper",void 0),e([E({readOnly:!0})],rt.prototype,"sceneIntersectionHelper",void 0),e([E({type:Number,dependsOn:["scale","spatialReference"],readOnly:!0})],rt.prototype,"resolution",null),e([E({type:Number,aliasOf:"stateManager.scale"})],rt.prototype,"scale",void 0),e([E()],rt.prototype,"heightModelInfo",null),e([E()],rt.prototype,"spatialReference",void 0),e([E({type:Boolean,constructOnly:!0})],rt.prototype,"alphaCompositingEnabled",void 0),e([E({type:Boolean})],rt.prototype,"supersampleScreenshotsEnabled",void 0),e([E({readOnly:!0})],rt.prototype,"type",void 0),e([E({type:Ze})],rt.prototype,"ui",void 0),e([E({type:Boolean,readOnly:!0,dependsOn:["graphicsView.updating","basemapView.updating","basemapTerrain.updating","layerViewManager.updating","layerViewManager.updatingRemaining","_resourceController.updating","_stage.updating","featureTiles.updating","pointsOfInterest.updating","environmentManager.updating","overlay.updating","updatingHandles.updating","featureTreeDebugger.updating","labeler.updating","deconflictor.updating","ready","stationary","inputManager.hasPendingInputs","toolViewManager.updating","analysisViewManager.updating"]})],rt.prototype,"updating",null),e([E({type:Number,readOnly:!0,dependsOn:["updating"]})],rt.prototype,"updatingProgress",void 0),e([E({type:["global","local"]})],rt.prototype,"viewingMode",null),e([E({type:s,aliasOf:"stateManager.viewpoint"})],rt.prototype,"viewpoint",void 0),e([E({type:Number,aliasOf:"stateManager.zoom"})],rt.prototype,"zoom",void 0),e([E({type:Me})],rt.prototype,"highlightOptions",void 0),rt=e([I("esri.views.SceneView")],rt),function(e){e[e.INCLUDE=0]="INCLUDE",e[e.EXCLUDE=1]="EXCLUDE"}(ot||(ot={}));const lt=H(),pt=P(),ht=q(),dt=rt;export{dt 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/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import t from"../Map.js";import i from"../TimeExtent.js";import r from"../core/Accessor.js";import a from"../core/Collection.js";import s from"../core/CollectionFlattener.js";import o from"../core/Error.js";import n from"../core/Evented.js";import{HandleOwnerMixin as l}from"../core/HandleOwner.js";import{makeHandle as p}from"../core/handleUtils.js";import d from"../core/Loadable.js";import h from"../core/Logger.js";import{isSome as y,destroyMaybe as u,abortMaybe as c}from"../core/maybe.js";import{EsriPromiseMixin as m}from"../core/Promise.js";import{createTask as f,after as g}from"../core/promiseUtils.js";import{watch as w}from"../core/reactiveUtils.js";import{whenOnce as v,whenFalseOnce as M}from"../core/watchUtils.js";import{aliasOf as V}from"../core/accessorSupport/decorators/aliasOf.js";import"../core/arrayUtils.js";import"../core/has.js";import"../core/accessorSupport/ensureType.js";import{property as R}from"../core/accessorSupport/decorators/property.js";import{subclass as _}from"../core/accessorSupport/decorators/subclass.js";import{owningCollectionProperty as S}from"../core/support/OwningCollection.js";import j from"../geometry/Extent.js";import F from"../geometry/HeightModelInfo.js";import O from"../geometry/SpatialReference.js";import{AnalysesCollection as L}from"../support/AnalysesCollection.js";import{GraphicsCollection as E}from"../support/GraphicsCollection.js";import{BasemapView as b}from"./BasemapView.js";import C from"./LayerViewManager.js";import x from"./Magnifier.js";import I from"./ToolViewManager.js";import q from"./input/Input.js";import{ViewEvents as D}from"./input/ViewEvents.js";import T from"./navigation/Navigation.js";import k from"./support/DefaultsFromMap.js";var z;const P=h.getLogger("esri.views.View");let U=z=class extends(l(n.EventedMixin(m(r)))){constructor(e){super(e),this._userSpatialReference=null,this._cursor=null,this.allLayerViews=new s({getCollections:()=>{var e,t,i;return[null==(e=this.basemapView)?void 0:e.baseLayerViews,null==(t=this.groundView)?void 0:t.layerViews,this.layerViews,null==(i=this.basemapView)?void 0:i.referenceLayerViews]},getChildrenFunction:e=>e.layerViews}),this.groundView=null,this.animation=null,this.basemapView=null,this.fatalError=null,this.extent=null,this.graphics=new E,this.analyses=new L,this.navigating=!1,this.typeSpecificPreconditionsReady=!0,this.layerViews=new a,this.magnifier=new x,this.padding={left:0,top:0,right:0,bottom:0},this.ready=!1,this.spatialReferenceWarningDelay=1e3,this.supportsGround=!0,this.timeExtent=null,this.type=null,this.scale=null,this.updating=!1,this.initialExtentRequired=!0,this.input=new q,this.navigation=new T,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 a,this._isValid=!1,this._readyCycleForced=!1,this.handles.add(this.watch("preconditionsReady",(e=>{var t,i;(e?(this._currentSpatialReference=this.spatialReference,z.views.add(this)):(this._currentSpatialReference=null,z.views.remove(this)),this.notifyChange("spatialReference"),!e&&this.ready)?(null==(t=this.layerViewManager)||t.clear(),null==(i=this.toolViewManager)||i.detach(),y(this.analysisViewManager)&&this.analysisViewManager.detach(),this._teardown()):e&&!this.ready&&(y(this.analysisViewManager)&&this.analysisViewManager.attach(),this._startup(),this.toolViewManager.attach())}),!0))}initialize(){this.addResolvingPromise(this.validate().then((()=>(this._isValid=!0,v(this,"ready"))))),this.basemapView=new b({view:this}),this.layerViewManager=new C({view:this,layerViewImporter:{importLayerView:e=>this.importLayerView(e),hasLayerViewModule:e=>this.hasLayerViewModule(e)},supportsGround:this.supportsGround}),this.toolViewManager=new I({view:this}),this._setupSpatialReferenceLogger(),this.handles.add([w((()=>this.initialExtentRequired),(e=>this.defaultsFromMap.required={...this.defaultsFromMap.required,extent:e}),{sync:!0,initial:!0}),w((()=>this.ready),(e=>{this.defaultsFromMap&&(this.defaultsFromMap.suspended=e,this.defaultsFromMap.userSpatialReference=e?this.spatialReference:this._userSpatialReference)}),{sync:!0}),w((()=>this._userSpatialReference),(e=>{this.defaultsFromMap&&(this.defaultsFromMap.userSpatialReference=e)}),{sync:!0,initial:!0})])}_setupSpatialReferenceLogger(){let e=null;this.handles.add([w((()=>{var e;return null==(e=this.defaultsFromMap)?void 0:e.ready}),(t=>{var i;const r=(null==(i=this.map)?void 0:i.allLayers.length)>0;if(t&&!this.spatialReference&&r){if(y(e))return;const t=p((()=>e=c(e)));e=f((async t=>{try{await g(this.spatialReferenceWarningDelay,null,t)}catch{return}finally{e=null}P.warn("#spatialReference","no spatial reference could be derived from the currently added map layers")})),this.handles.add(t,"spatial-reference-logger-task")}else this.handles.remove("spatial-reference-logger-task")}),{sync:!0})])}destroy(){if(this.destroyed)return;this.viewEvents.destroy(),this.allLayerViews.destroy(),this.navigation&&(this.navigation.destroy(),this._set("navigation",null)),this.graphics=u(this.graphics),this.analyses=u(this.analyses),this.handles.remove("defaultsFromMap"),this.defaultsFromMap.destroy(),this._set("defaultsFromMap",null),this.toolViewManager=u(this.toolViewManager),this.layerViewManager=u(this.layerViewManager),this.basemapView=u(this.basemapView),this.invalidate(),this._emitter.clear(),this.handles.removeAll();const e=this.map;this.map=null,null==e||e.destroy()}_startup(){this._set("ready",!0)}_teardown(){this._set("ready",!1)}whenReady(){return Promise.resolve(this)}toMap(){return P.error("#toMap()","Not implemented on this instance of View"),null}get _defaultsFromMapSettings(){return{}}get defaultsFromMap(){return new k({required:{tileInfo:!1,heightModelInfo:!1,extent:!1},map:()=>this.map,getSpatialReferenceSupport:e=>this.getSpatialReferenceSupport(e),...this._defaultsFromMapSettings})}get heightModelInfo(){return this.getDefaultHeightModelInfo()}get interacting(){return this.navigating}get preconditionsReady(){var e;return!(this.fatalError||!this._isValid||this._readyCycleForced||!this.map||d.isLoadable(this.map)&&!this.map.loaded||0===this.width||0===this.height||!this.spatialReference||!this.typeSpecificPreconditionsReady||!this._validateSpatialReference(this.spatialReference)||!(this._currentSpatialReference||null!=(e=this.defaultsFromMap)&&e.ready))}set map(e){var t;e!==this._get("map")&&(null!=(t=e)&&t.destroyed&&(P.warn("#map","The provided map is already destroyed",{map:e}),e=null),d.isLoadable(e)&&e.load().catch((()=>{})),this.initialized&&(this.forceReadyCycle(),this._currentSpatialReference=null),this._set("map",e))}get spatialReference(){var e,t;let i=this._userSpatialReference||this._currentSpatialReference||this.getDefaultSpatialReference()||null;return i&&null!=(e=this.defaultsFromMap)&&null!=(t=e.required)&&t.heightModelInfo&&(i=i.clone(),i.vcsWkid=this.defaultsFromMap.vcsWkid,i.latestVcsWkid=this.defaultsFromMap.latestVcsWkid),i}set spatialReference(e){this._userSpatialReference=e,this._set("spatialReference",e)}get stationary(){return!this.animation&&!this.navigating&&!this.resizing}get initialExtent(){var e;return null==(e=this.defaultsFromMap)?void 0:e.extent}get cursor(){const e=this.toolViewManager?this.toolViewManager.cursor:null;return y(e)?e:this._cursor||"default"}set cursor(e){this._cursor=e,this.notifyChange("cursor")}get size(){return[this.width,this.height]}whenLayerView(e){return this.layerViewManager.whenLayerView(e)}getDefaultSpatialReference(){var e;return null==(e=this.defaultsFromMap)?void 0:e.spatialReference}getDefaultHeightModelInfo(){var e,t,i;return null!=(e=null!=(t=this.map&&"heightModelInfo"in this.map?this.map.heightModelInfo:void 0)?t:null==(i=this.defaultsFromMap)?void 0:i.heightModelInfo)?e:null}importLayerView(e){throw new o("importLayerView() not implemented")}hasLayerViewModule(e){return!1}async validate(){}invalidate(){this._isValid=!1}getSpatialReferenceSupport(){return{}}_validateSpatialReference(e){return y(this.getSpatialReferenceSupport({spatialReference:e}))}when(e,t){return this.isResolved()&&!this.ready&&P.warn("#when()",'Calling view.when() while the view is no longer ready but was already resolved once will resolve immediately. Use watchUtils.whenOnce(view, "ready").then(...) instead.'),super.when(e,t)}forceReadyCycle(){this.ready&&(M(this,"preconditionsReady",(()=>this._readyCycleForced=!1)),this._readyCycleForced=!0)}addAndActivateTool(e){this.toolViewManager.tools.add(e),this.activeTool=e}tryFatalErrorRecovery(){this.fatalError=null}};U.views=new a,e([R()],U.prototype,"_userSpatialReference",void 0),e([V("toolViewManager.activeTool")],U.prototype,"activeTool",void 0),e([R({readOnly:!0})],U.prototype,"allLayerViews",void 0),e([R()],U.prototype,"groundView",void 0),e([R()],U.prototype,"animation",void 0),e([R()],U.prototype,"basemapView",void 0),e([R({readOnly:!0})],U.prototype,"_defaultsFromMapSettings",null),e([R()],U.prototype,"defaultsFromMap",null),e([R()],U.prototype,"fatalError",void 0),e([R({type:j})],U.prototype,"extent",void 0),e([R(S(E,"graphics"))],U.prototype,"graphics",void 0),e([R(S(L,"analyses"))],U.prototype,"analyses",void 0),e([R({readOnly:!0,type:F})],U.prototype,"heightModelInfo",null),e([R({readOnly:!0})],U.prototype,"interacting",null),e([R({readOnly:!0})],U.prototype,"navigating",void 0),e([R({readOnly:!0,dependsOn:["fatalError","_isValid","_readyCycleForced","map","map.loaded?","width","height","spatialReference","_currentSpatialReference","defaultsFromMap.ready","typeSpecificPreconditionsReady"]})],U.prototype,"preconditionsReady",null),e([R({readOnly:!0})],U.prototype,"typeSpecificPreconditionsReady",void 0),e([R({type:a,readOnly:!0})],U.prototype,"layerViews",void 0),e([R({type:x})],U.prototype,"magnifier",void 0),e([R({value:null,type:t})],U.prototype,"map",null),e([R()],U.prototype,"padding",void 0),e([R({readOnly:!0})],U.prototype,"ready",void 0),e([R({type:O})],U.prototype,"spatialReference",null),e([R()],U.prototype,"spatialReferenceWarningDelay",void 0),e([R()],U.prototype,"stationary",null),e([R({readOnly:!0})],U.prototype,"supportsGround",void 0),e([R({type:i})],U.prototype,"timeExtent",void 0),e([V("toolViewManager.tools")],U.prototype,"tools",void 0),e([R()],U.prototype,"toolViewManager",void 0),e([R({readOnly:!0})],U.prototype,"type",void 0),e([R({type:Number})],U.prototype,"scale",void 0),e([R({readOnly:!0})],U.prototype,"updating",void 0),e([R({readOnly:!0})],U.prototype,"initialExtentRequired",void 0),e([R({readOnly:!0})],U.prototype,"initialExtent",null),e([R()],U.prototype,"cursor",null),e([R({readOnly:!0})],U.prototype,"input",void 0),e([R({type:T,nonNullable:!0})],U.prototype,"navigation",void 0),e([R()],U.prototype,"layerViewManager",void 0),e([R()],U.prototype,"analysisViewManager",void 0),e([R()],U.prototype,"width",void 0),e([R()],U.prototype,"height",void 0),e([R({readOnly:!0})],U.prototype,"resizing",void 0),e([R({value:null,readOnly:!0})],U.prototype,"size",null),e([R({readOnly:!0})],U.prototype,"suspended",void 0),e([R({readOnly:!0})],U.prototype,"viewEvents",void 0),e([R({readOnly:!0})],U.prototype,"persistableViewModels",void 0),e([R()],U.prototype,"_isValid",void 0),e([R()],U.prototype,"_readyCycleForced",void 0),e([R()],U.prototype,"_currentSpatialReference",void 0),U=z=e([_("esri.views.View")],U);const W=U;export{W as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import t from"../Map.js";import i from"../TimeExtent.js";import r from"../core/Accessor.js";import a from"../core/Collection.js";import s from"../core/CollectionFlattener.js";import o from"../core/Error.js";import n from"../core/Evented.js";import{HandleOwnerMixin as l}from"../core/HandleOwner.js";import{makeHandle as p}from"../core/handleUtils.js";import d from"../core/Loadable.js";import h from"../core/Logger.js";import{isSome as y,destroyMaybe as u,abortMaybe as c}from"../core/maybe.js";import{EsriPromiseMixin as m}from"../core/Promise.js";import{createTask as f,after as g}from"../core/promiseUtils.js";import{watch as w}from"../core/reactiveUtils.js";import{whenOnce as v,whenFalseOnce as M}from"../core/watchUtils.js";import{aliasOf as V}from"../core/accessorSupport/decorators/aliasOf.js";import"../core/arrayUtils.js";import"../core/has.js";import"../core/accessorSupport/ensureType.js";import{property as R}from"../core/accessorSupport/decorators/property.js";import{subclass as _}from"../core/accessorSupport/decorators/subclass.js";import{owningCollectionProperty as S}from"../core/support/OwningCollection.js";import j from"../geometry/Extent.js";import F from"../geometry/HeightModelInfo.js";import O from"../geometry/SpatialReference.js";import{AnalysesCollection as L}from"../support/AnalysesCollection.js";import{GraphicsCollection as E}from"../support/GraphicsCollection.js";import{BasemapView as b}from"./BasemapView.js";import C from"./LayerViewManager.js";import x from"./Magnifier.js";import I from"./ToolViewManager.js";import q from"./input/Input.js";import{ViewEvents as D}from"./input/ViewEvents.js";import T from"./navigation/Navigation.js";import k from"./support/DefaultsFromMap.js";var z;const P=h.getLogger("esri.views.View");let U=z=class extends(l(n.EventedMixin(m(r)))){constructor(e){super(e),this._userSpatialReference=null,this._cursor=null,this.allLayerViews=new s({getCollections:()=>{var e,t,i;return[null==(e=this.basemapView)?void 0:e.baseLayerViews,null==(t=this.groundView)?void 0:t.layerViews,this.layerViews,null==(i=this.basemapView)?void 0:i.referenceLayerViews]},getChildrenFunction:e=>e.layerViews}),this.groundView=null,this.animation=null,this.basemapView=null,this.fatalError=null,this.extent=null,this.graphics=new E,this.analyses=new L,this.navigating=!1,this.typeSpecificPreconditionsReady=!0,this.layerViews=new a,this.magnifier=new x,this.padding={left:0,top:0,right:0,bottom:0},this.ready=!1,this.spatialReferenceWarningDelay=1e3,this.supportsGround=!0,this.timeExtent=null,this.type=null,this.scale=null,this.updating=!1,this.initialExtentRequired=!0,this.input=new q,this.navigation=new T,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 a,this._isValid=!1,this._readyCycleForced=!1,this.handles.add(this.watch("preconditionsReady",(e=>{var t,i;(e?(this._currentSpatialReference=this.spatialReference,z.views.add(this)):(this._currentSpatialReference=null,z.views.remove(this)),this.notifyChange("spatialReference"),!e&&this.ready)?(null==(t=this.layerViewManager)||t.clear(),null==(i=this.toolViewManager)||i.detach(),y(this.analysisViewManager)&&this.analysisViewManager.detach(),this._teardown()):e&&!this.ready&&(y(this.analysisViewManager)&&this.analysisViewManager.attach(),this._startup(),this.toolViewManager.attach())}),!0))}initialize(){this.addResolvingPromise(this.validate().then((()=>(this._isValid=!0,v(this,"ready"))))),this.basemapView=new b({view:this}),this.layerViewManager=new C({view:this,layerViewImporter:{importLayerView:e=>this.importLayerView(e),hasLayerViewModule:e=>this.hasLayerViewModule(e)},supportsGround:this.supportsGround}),this.toolViewManager=new I({view:this}),this._setupSpatialReferenceLogger(),this.handles.add([w((()=>this.initialExtentRequired),(e=>this.defaultsFromMap.required={...this.defaultsFromMap.required,extent:e}),{sync:!0,initial:!0}),w((()=>this.ready),(e=>{this.defaultsFromMap&&(this.defaultsFromMap.suspended=e,this.defaultsFromMap.userSpatialReference=e?this.spatialReference:this._userSpatialReference)}),{sync:!0}),w((()=>this._userSpatialReference),(e=>{this.defaultsFromMap&&(this.defaultsFromMap.userSpatialReference=e)}),{sync:!0,initial:!0})])}_setupSpatialReferenceLogger(){let e=null;this.handles.add([w((()=>{var e;return null==(e=this.defaultsFromMap)?void 0:e.ready}),(t=>{var i;const r=(null==(i=this.map)?void 0:i.allLayers.length)>0;if(t&&!this.spatialReference&&r){if(y(e))return;const t=p((()=>e=c(e)));e=f((async t=>{try{await g(this.spatialReferenceWarningDelay,null,t)}catch{return}finally{e=null}P.warn("#spatialReference","no spatial reference could be derived from the currently added map layers")})),this.handles.add(t,"spatial-reference-logger-task")}else this.handles.remove("spatial-reference-logger-task")}),{sync:!0})])}destroy(){if(this.destroyed)return;this.viewEvents.destroy(),this.allLayerViews.destroy(),this.navigation&&(this.navigation.destroy(),this._set("navigation",null)),this.graphics=u(this.graphics),this.analyses=u(this.analyses),this.handles.remove("defaultsFromMap"),this.defaultsFromMap.destroy(),this._set("defaultsFromMap",null),this.toolViewManager=u(this.toolViewManager),this.layerViewManager=u(this.layerViewManager),this.basemapView=u(this.basemapView),this.invalidate(),this._emitter.clear(),this.handles.removeAll();const e=this.map;this.map=null,null==e||e.destroy()}_startup(){this._set("ready",!0)}_teardown(){this._set("ready",!1)}whenReady(){return Promise.resolve(this)}toMap(){return P.error("#toMap()","Not implemented on this instance of View"),null}get _defaultsFromMapSettings(){return{}}get defaultsFromMap(){return new k({required:{tileInfo:!1,heightModelInfo:!1,extent:!1},map:()=>this.map,getSpatialReferenceSupport:e=>this.getSpatialReferenceSupport(e),...this._defaultsFromMapSettings})}get heightModelInfo(){return this.getDefaultHeightModelInfo()}get interacting(){return this.navigating}get preconditionsReady(){var e;return!(this.fatalError||!this._isValid||this._readyCycleForced||!this.map||d.isLoadable(this.map)&&!this.map.loaded||0===this.width||0===this.height||!this.spatialReference||!this._validateSpatialReference(this.spatialReference)||!(this._currentSpatialReference||null!=(e=this.defaultsFromMap)&&e.ready)||!this.typeSpecificPreconditionsReady)}set map(e){var t;e!==this._get("map")&&(null!=(t=e)&&t.destroyed&&(P.warn("#map","The provided map is already destroyed",{map:e}),e=null),d.isLoadable(e)&&e.load().catch((()=>{})),this.initialized&&(this.forceReadyCycle(),this._currentSpatialReference=null),this._set("map",e))}get spatialReference(){var e,t;let i=this._userSpatialReference||this._currentSpatialReference||this.getDefaultSpatialReference()||null;return i&&null!=(e=this.defaultsFromMap)&&null!=(t=e.required)&&t.heightModelInfo&&(i=i.clone(),i.vcsWkid=this.defaultsFromMap.vcsWkid,i.latestVcsWkid=this.defaultsFromMap.latestVcsWkid),i}set spatialReference(e){this._userSpatialReference=e,this._set("spatialReference",e)}get stationary(){return!this.animation&&!this.navigating&&!this.resizing}get initialExtent(){var e;return null==(e=this.defaultsFromMap)?void 0:e.extent}get cursor(){const e=this.toolViewManager?this.toolViewManager.cursor:null;return y(e)?e:this._cursor||"default"}set cursor(e){this._cursor=e,this.notifyChange("cursor")}get size(){return[this.width,this.height]}whenLayerView(e){return this.layerViewManager.whenLayerView(e)}getDefaultSpatialReference(){var e;return null==(e=this.defaultsFromMap)?void 0:e.spatialReference}getDefaultHeightModelInfo(){var e,t,i;return null!=(e=null!=(t=this.map&&"heightModelInfo"in this.map?this.map.heightModelInfo:void 0)?t:null==(i=this.defaultsFromMap)?void 0:i.heightModelInfo)?e:null}importLayerView(e){throw new o("importLayerView() not implemented")}hasLayerViewModule(e){return!1}async validate(){}invalidate(){this._isValid=!1}getSpatialReferenceSupport(){return{}}_validateSpatialReference(e){return y(this.getSpatialReferenceSupport({spatialReference:e}))}when(e,t){return this.isResolved()&&!this.ready&&P.warn("#when()",'Calling view.when() while the view is no longer ready but was already resolved once will resolve immediately. Use watchUtils.whenOnce(view, "ready").then(...) instead.'),super.when(e,t)}forceReadyCycle(){this.ready&&(M(this,"preconditionsReady",(()=>this._readyCycleForced=!1)),this._readyCycleForced=!0)}addAndActivateTool(e){this.toolViewManager.tools.add(e),this.activeTool=e}tryFatalErrorRecovery(){this.fatalError=null}};U.views=new a,e([R()],U.prototype,"_userSpatialReference",void 0),e([V("toolViewManager.activeTool")],U.prototype,"activeTool",void 0),e([R({readOnly:!0})],U.prototype,"allLayerViews",void 0),e([R()],U.prototype,"groundView",void 0),e([R()],U.prototype,"animation",void 0),e([R()],U.prototype,"basemapView",void 0),e([R({readOnly:!0})],U.prototype,"_defaultsFromMapSettings",null),e([R()],U.prototype,"defaultsFromMap",null),e([R()],U.prototype,"fatalError",void 0),e([R({type:j})],U.prototype,"extent",void 0),e([R(S(E,"graphics"))],U.prototype,"graphics",void 0),e([R(S(L,"analyses"))],U.prototype,"analyses",void 0),e([R({readOnly:!0,type:F})],U.prototype,"heightModelInfo",null),e([R({readOnly:!0})],U.prototype,"interacting",null),e([R({readOnly:!0})],U.prototype,"navigating",void 0),e([R({readOnly:!0,dependsOn:["fatalError","_isValid","_readyCycleForced","map","map.loaded?","width","height","spatialReference","_currentSpatialReference","defaultsFromMap.ready","typeSpecificPreconditionsReady"]})],U.prototype,"preconditionsReady",null),e([R({readOnly:!0})],U.prototype,"typeSpecificPreconditionsReady",void 0),e([R({type:a,readOnly:!0})],U.prototype,"layerViews",void 0),e([R({type:x})],U.prototype,"magnifier",void 0),e([R({value:null,type:t})],U.prototype,"map",null),e([R()],U.prototype,"padding",void 0),e([R({readOnly:!0})],U.prototype,"ready",void 0),e([R({type:O})],U.prototype,"spatialReference",null),e([R()],U.prototype,"spatialReferenceWarningDelay",void 0),e([R()],U.prototype,"stationary",null),e([R({readOnly:!0})],U.prototype,"supportsGround",void 0),e([R({type:i})],U.prototype,"timeExtent",void 0),e([V("toolViewManager.tools")],U.prototype,"tools",void 0),e([R()],U.prototype,"toolViewManager",void 0),e([R({readOnly:!0})],U.prototype,"type",void 0),e([R({type:Number})],U.prototype,"scale",void 0),e([R({readOnly:!0})],U.prototype,"updating",void 0),e([R({readOnly:!0})],U.prototype,"initialExtentRequired",void 0),e([R({readOnly:!0})],U.prototype,"initialExtent",null),e([R()],U.prototype,"cursor",null),e([R({readOnly:!0})],U.prototype,"input",void 0),e([R({type:T,nonNullable:!0})],U.prototype,"navigation",void 0),e([R()],U.prototype,"layerViewManager",void 0),e([R()],U.prototype,"analysisViewManager",void 0),e([R()],U.prototype,"width",void 0),e([R()],U.prototype,"height",void 0),e([R({readOnly:!0})],U.prototype,"resizing",void 0),e([R({value:null,readOnly:!0})],U.prototype,"size",null),e([R({readOnly:!0})],U.prototype,"suspended",void 0),e([R({readOnly:!0})],U.prototype,"viewEvents",void 0),e([R({readOnly:!0})],U.prototype,"persistableViewModels",void 0),e([R()],U.prototype,"_isValid",void 0),e([R()],U.prototype,"_readyCycleForced",void 0),e([R()],U.prototype,"_currentSpatialReference",void 0),U=z=e([_("esri.views.View")],U);const W=U;export{W as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t
|
|
5
|
+
import{clock as t}from"../../../core/clock.js";import{someMap as e}from"../../../core/MapUtils.js";import{createScreenPoint as i}from"../../../core/screenUtils.js";import{DragEventSeparator as a}from"../DragEventSeparator.js";import{InputHandler as o}from"../InputHandler.js";import{DefaultParameters as r}from"./SingleAndDoubleClick.js";import{manhattanDistance as n}from"./support.js";class s extends o{constructor(e=r.maximumDoubleClickDelay,o=r.maximumDoubleClickDistance,n=r.maximumDoubleTouchDelay,s=r.maximumDoubleTouchDistance,u=t){super(!1),this.maximumDoubleClickDelay=e,this.maximumDoubleClickDistance=o,this.maximumDoubleTouchDelay=n,this.maximumDoubleTouchDistance=s,this._clock=u,this._doubleTapDragReady=!1,this._doubleTapDragActive=!1,this._dragStartCenter=i(0,0),this._pointerState=new Map,this._doubleTapDrag=this.registerOutgoing("double-tap-drag"),this._dragEventSeparator=new a({start:(t,e)=>this._dragStart(t,e),update:(t,e)=>this._dragUpdate(e),end:(t,e)=>this._dragEnd(e)}),this.registerIncoming("drag",(t=>this._dragEventSeparator.handle(t))),this.registerIncoming("pointer-down",(t=>this._handlePointerDown(t))),this.registerIncoming("pointer-up",(()=>this._handlePointerUp()))}onUninstall(){this._pointerState.forEach((t=>{null!=t.doubleTapTimeout&&(t.doubleTapTimeout.remove(),t.doubleTapTimeout=null)}))}get hasPendingInputs(){return e(this._pointerState,(t=>null!=t.doubleTapTimeout))}_clearPointerDown(t){const e=this._pointerState.get(t);e&&(e.doubleTapTimeout.remove(),e.doubleTapTimeout=null,this._pointerState.delete(t),this.refreshHasPendingInputs())}_createDoubleTapDragData(t,e,i){const{button:a,buttons:o,pointer:r,pointers:n,pointerType:s,timestamp:u}=i;return{action:t,delta:e,button:a,buttons:o,pointer:r,pointers:n,pointerType:s,timestamp:u}}_dragStart(t,e){if(!this._doubleTapDragReady||1!==t)return;this._doubleTapDragReady=!1,this._doubleTapDragActive=!0;const{data:a,modifiers:o}=e,{center:r}=a;this._dragStartCenter=r;const n=this._createDoubleTapDragData("begin",i(0,0),a);this._doubleTapDrag.emit(n,void 0,o),e.stopPropagation()}_dragUpdate(t){if(!this._doubleTapDragActive)return;const{data:e,modifiers:a}=t,{center:o}=e,r=i(o.x-this._dragStartCenter.x,o.y-this._dragStartCenter.y),n=this._createDoubleTapDragData("update",r,e);this._doubleTapDrag.emit(n,void 0,a),t.stopPropagation()}_dragEnd(t){if(!this._doubleTapDragActive)return;const{data:e,modifiers:a}=t,{center:o}=e,r=i(o.x-this._dragStartCenter.x,o.y-this._dragStartCenter.y),n=this._createDoubleTapDragData("end",r,e);this._doubleTapDrag.emit(n,void 0,a),this._doubleTapDragActive=!1,t.stopPropagation()}_handlePointerDown(t){const{data:e}=t,i=this._pointerId(e),a=this._pointerState.get(i),{pointerType:o}=e.native;if(a){const r="touch"===o?this.maximumDoubleTouchDistance:this.maximumDoubleClickDistance;this._clearPointerDown(i),n(a.event.data,e)>r?this._storePointerDown(t):this._doubleTapDragReady=!0}else this._storePointerDown(t)}_handlePointerUp(){this._doubleTapDragReady=!1}_pointerId(t){const{native:e}=t,{pointerId:i,button:a,pointerType:o}=e;return"mouse"===o?`${i}:${a}`:`${o}`}_storePointerDown(t){const{data:e}=t,{pointerType:i}=e.native,a=this._pointerId(e),o="touch"===i?this.maximumDoubleTouchDelay:this.maximumDoubleClickDelay,r=this._clock.setTimeout((()=>this._clearPointerDown(a)),o);this._pointerState.set(a,{event:t,doubleTapTimeout:r}),this.refreshHasPendingInputs()}}export{s as DoubleTapDrag};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t
|
|
5
|
+
import{clock as t}from"../../../core/clock.js";import{InputHandler as e}from"../InputHandler.js";import{DefaultParameters as i}from"./SingleAndDoubleClick.js";import{manhattanDistance as o}from"./support.js";class n extends e{constructor(e=i.maximumDoubleClickDelay,o=i.maximumDoubleClickDistance,n=i.maximumDoubleTouchDelay,a=i.maximumDoubleTouchDistance,s=t){super(!1),this.maximumDoubleClickDelay=e,this.maximumDoubleClickDistance=o,this.maximumDoubleTouchDelay=n,this.maximumDoubleTouchDistance=a,this._clock=s,this._pointerState=new Map,this._immediateDoubleClick=this.registerOutgoing("immediate-double-click"),this.registerIncoming("pointer-down",this._handlePointerDown.bind(this)),this.registerIncoming("pointer-up",(t=>{this._handlePointerLoss(t,"pointer-up")})),this.registerIncoming("pointer-capture-lost",(t=>{this._handlePointerLoss(t,"pointer-capture-lost")})),this.registerIncoming("pointer-cancel",(t=>{this._handlePointerLoss(t,"pointer-cancel")}))}onUninstall(){this._pointerState.forEach((t=>{t.immediateDoubleClick&&t.immediateDoubleClick.timeoutHandle.remove()})),super.onUninstall()}_handlePointerDown(t){const e=t.data,i=this._pointerId(e);if(!this._pointerState.has(i)){const t={downButton:e.native.button,immediateDoubleClick:null};this._pointerState.set(i,t),this.startCapturingPointer(e.native)}}_handlePointerLoss(t,e){const i=t.data,n=this._pointerId(i),a=this._pointerState.get(n);if(a&&"pointer-up"===e&&a.downButton===i.native.button){const e=a.immediateDoubleClick;if(e){e.timeoutHandle.remove();const n="touch"===t.data.native.pointerType?this.maximumDoubleTouchDistance:this.maximumDoubleClickDistance;o(e,t.data)>n?this._startImmediateDoubleClick(t,a):(this._immediateDoubleClick.emit(t.data,void 0,e.modifiers),this._removeState(i))}else this._startImmediateDoubleClick(t,a)}}_startImmediateDoubleClick(t,e){const i="touch"===t.data.native.pointerType?this.maximumDoubleTouchDelay:this.maximumDoubleClickDelay;e.immediateDoubleClick={x:t.data.x,y:t.data.y,modifiers:t.modifiers,timeoutHandle:this._clock.setTimeout((()=>this._removeState(t.data)),i)}}_pointerId(t){const e=t.native;return"mouse"===e.pointerType?`${e.pointerId}:${e.button}`:`${e.pointerType}`}_removeState(t){const e=this._pointerId(t);this._pointerState.delete(e),this.stopCapturingPointer(t.native),this.refreshHasPendingInputs()}}export{n as ImmediateDoubleClick};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t
|
|
5
|
+
import{clock as t}from"../../../core/clock.js";import{InputHandler as e}from"../InputHandler.js";import{euclideanDistance as i}from"./support.js";const n={maximumClickDelay:300,movementUntilMouseDrag:1.5,movementUntilPenDrag:6,movementUntilTouchDrag:6,holdDelay:500};class o extends e{constructor(e=n.maximumClickDelay,i=n.movementUntilMouseDrag,o=n.movementUntilPenDrag,r=n.movementUntilTouchDrag,s=n.holdDelay,a=t){super(!1),this.maximumClickDelay=e,this.movementUntilMouseDrag=i,this.movementUntilPenDrag=o,this.movementUntilTouchDrag=r,this.holdDelay=s,this._clock=a,this._pointerState=new Map,this._pointerDrag=this.registerOutgoing("pointer-drag"),this._immediateClick=this.registerOutgoing("immediate-click"),this._pointerHold=this.registerOutgoing("hold"),this.registerIncoming("pointer-down",this._handlePointerDown.bind(this)),this.registerIncoming("pointer-up",(t=>{this._handlePointerLoss(t,"pointer-up")})),this.registerIncoming("pointer-capture-lost",(t=>{this._handlePointerLoss(t,"pointer-capture-lost")})),this.registerIncoming("pointer-cancel",(t=>{this._handlePointerLoss(t,"pointer-cancel")})),this._moveHandle=this.registerIncoming("pointer-move",this._handlePointerMove.bind(this)),this._moveHandle.pause()}onUninstall(){this._pointerState.forEach((t=>{null!=t.holdTimeout&&(t.holdTimeout.remove(),t.holdTimeout=null)})),super.onUninstall()}_handlePointerDown(t){const e=t.data,i=e.native.pointerId;let n=null;0===this._pointerState.size&&(n=this._clock.setTimeout((()=>{const e=this._pointerState.get(i);if(e){if(!e.isDragging){const i=e.previousEvent;this._pointerHold.emit(i,void 0,t.modifiers),e.holdEmitted=!0}e.holdTimeout=null}}),this.holdDelay));const o={startEvent:e,previousEvent:e,startTimestamp:t.timestamp,isDragging:!1,downButton:e.native.button,holdTimeout:n,modifiers:new Set};this._pointerState.set(i,o),this.startCapturingPointer(e.native),this._moveHandle.resume(),this._pointerState.size>1&&this._startDragging(t)}_createPointerDragData(t,e,i){return{action:t,startEvent:e.startEvent,previousEvent:e.previousEvent,currentEvent:i}}_handlePointerMove(t){const e=t.data,n=e.native.pointerId,o=this._pointerState.get(n);if(o){if(o.isDragging)this._pointerDrag.emit(this._createPointerDragData("update",o,e),void 0,o.modifiers);else{i(e,o.startEvent)>this._getDragThreshold(e.native.pointerType)&&this._startDragging(t)}o.previousEvent=e}}_getDragThreshold(t){switch(t){case"touch":return this.movementUntilTouchDrag;case"pen":return this.movementUntilPenDrag;default:return this.movementUntilMouseDrag}}_startDragging(t){const e=t.data,i=e.native.pointerId;this._pointerState.forEach((n=>{null!=n.holdTimeout&&(n.holdTimeout.remove(),n.holdTimeout=null),n.isDragging||(n.modifiers=t.modifiers,n.isDragging=!0,i===n.startEvent.native.pointerId?this._pointerDrag.emit(this._createPointerDragData("start",n,e)):this._pointerDrag.emit(this._createPointerDragData("start",n,n.previousEvent),t.timestamp))}))}_handlePointerLoss(t,e){const i=t.data,n=i.native.pointerId,o=this._pointerState.get(n);if(o){if(null!=o.holdTimeout&&(o.holdTimeout.remove(),o.holdTimeout=null),o.isDragging)this._pointerDrag.emit(this._createPointerDragData("end",o,"pointer-up"===e?i:o.previousEvent),void 0,o.modifiers);else if("pointer-up"===e&&o.downButton===i.native.button){t.timestamp-o.startTimestamp<=this.maximumClickDelay&&!o.holdEmitted&&this._immediateClick.emit(i)}this._pointerState.delete(n),this.stopCapturingPointer(i.native),0===this._pointerState.size&&this._moveHandle.pause()}}}export{n as DefaultParameters,o as PointerClickHoldAndDrag};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e
|
|
5
|
+
import{clock as e}from"../../../core/clock.js";import{someMap as t}from"../../../core/MapUtils.js";import{removeMaybe as i}from"../../../core/maybe.js";import{InputHandler as o}from"../InputHandler.js";import{manhattanDistance as l}from"./support.js";const s={maximumDoubleClickDelay:250,maximumDoubleClickDistance:10,maximumDoubleTouchDelay:350,maximumDoubleTouchDistance:35};class a extends o{constructor(t=s.maximumDoubleClickDelay,i=s.maximumDoubleClickDistance,o=s.maximumDoubleTouchDelay,l=s.maximumDoubleTouchDistance,a=e){super(!1),this.maximumDoubleClickDelay=t,this.maximumDoubleClickDistance=i,this.maximumDoubleTouchDelay=o,this.maximumDoubleTouchDistance=l,this._clock=a,this._pointerState=new Map,this._click=this.registerOutgoing("click"),this._doubleClick=this.registerOutgoing("double-click"),this.registerIncoming("immediate-click",this._handleImmediateClick.bind(this)),this.registerIncoming("pointer-drag",this._handlePointerDrag.bind(this)),this.registerIncoming("drag",this._handleDrag.bind(this))}onUninstall(){this._pointerState.forEach((e=>e.doubleClickTimeout=i(e.doubleClickTimeout)))}get hasPendingInputs(){return t(this._pointerState,(e=>null!=e.doubleClickTimeout))}_pointerId(e){const t=e.native;return"mouse"===t.pointerType?`${t.pointerId}:${t.button}`:`${t.pointerType}`}_handleImmediateClick(e){const t=e.data,i=this._pointerId(t),o=this._pointerState.get(i);if(o){const s="touch"===t.native.pointerType?this.maximumDoubleTouchDistance:this.maximumDoubleClickDistance;l(o.event.data,t)>s?(this._clearDoubleClickTimeout(i,!0),this._startClick(e)):(this._clearDoubleClickTimeout(i,!1),this._doubleClick.emit(o.event.data,void 0,o.event.modifiers))}else this._startClick(e)}_startClick(e){const t=this._pointerId(e.data),i="touch"===e.data.native.pointerType?this.maximumDoubleTouchDelay:this.maximumDoubleClickDelay;this._pointerState.set(t,{event:e,doubleClickTimeout:this._clock.setTimeout((()=>this._doubleClickTimeoutExceeded(t)),i)}),this.refreshHasPendingInputs()}_handlePointerDrag(e){const t=this._pointerId(e.data.currentEvent);this._clearDoubleClickTimeout(t,!0)}_handleDrag(e){const t=this._pointerId(e.data.pointer);this._clearDoubleClickTimeout(t,!0)}_clearDoubleClickTimeout(e,t){const i=this._pointerState.get(e);i&&(i.doubleClickTimeout.remove(),i.doubleClickTimeout=null,t&&this._doubleClickTimeoutExceeded(e),this._pointerState.delete(e),this.refreshHasPendingInputs())}_doubleClickTimeoutExceeded(e){const t=this._pointerState.get(e);this._click.emit(t.event.data,void 0,t.event.modifiers),t.doubleClickTimeout=null,this._pointerState.delete(e),this.refreshHasPendingInputs()}}export{s as DefaultParameters,a as SingleAndDoubleClick};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../geometry.js";import{handlesGroup as t}from"../../core/handleUtils.js";import{clone as n}from"../../core/lang.js";import{clamp as e}from"../../core/mathUtils.js";import{isSome as r,isNone as o,unwrap as a}from"../../core/maybe.js";import{createScreenPoint as c}from"../../core/screenUtils.js";import{f as s}from"../../chunks/vec3f64.js";import{project as i}from"../../geometry/projection.js";import{ViewingMode as l}from"../ViewingMode.js";import{move as u}from"../draw/support/drawUtils.js";import m from"../../geometry/Point.js";function f(t,n){let e=null,a=null;return c=>{if("cancel"===c.action)return void(r(a)&&(a.execute({action:"cancel"}),e=null,a=null));const s={action:c.action,screenStart:c.start,screenEnd:c.screenPoint};"start"===c.action&&o(e)&&(e=new
|
|
5
|
+
import"../../geometry.js";import{handlesGroup as t}from"../../core/handleUtils.js";import{clone as n}from"../../core/lang.js";import{clamp as e}from"../../core/mathUtils.js";import{isSome as r,isNone as o,unwrap as a}from"../../core/maybe.js";import{createScreenPoint as c}from"../../core/screenUtils.js";import{f as s}from"../../chunks/vec3f64.js";import{project as i}from"../../geometry/projection.js";import{ViewingMode as l}from"../ViewingMode.js";import{move as u}from"../draw/support/drawUtils.js";import m from"../../geometry/Point.js";function f(t,n){let e=null,a=null;return c=>{if("cancel"===c.action)return void(r(a)&&(a.execute({action:"cancel"}),e=null,a=null));const s={action:c.action,screenStart:c.start,screenEnd:c.screenPoint};"start"===c.action&&o(e)&&(e=new G,a=new G,n(t,e,a,c.pointerType,s)),r(e)&&e.execute(s),"end"===c.action&&r(e)&&(e=null,a=null)}}function p(t,n){return t.events.on("drag",f(t,n))}function y(n,e){const r=[];for(const t of n)r.push(p(t,e));return t(r)}function d(t,n){const e=[t.x,t.y,t.z],r=n,o=[Math.cos(r),Math.sin(r)],a=Math.sqrt(o[0]*o[0]+o[1]*o[1]);if(0===a)return null;o[0]/=a,o[1]/=a;const c=t=>{const n=(t.x-e[0])*o[0]+(t.y-e[1])*o[1];t.x=e[0]+n*o[0],t.y=e[1]+n*o[1]};return t=>(c(t.mapStart),c(t.mapEnd),t)}function x(t,n){let e=null;return r=>{if("start"===r.action&&(e=h(t,r.mapStart.spatialReference,n)),o(e))return null;const a=r.mapEnd.x-r.mapStart.x,c=r.mapEnd.y-r.mapStart.y,s=r.mapEnd.z-r.mapStart.z;return e.move(a,c,s),{...r,translationX:a,translationY:c,translationZ:s}}}function g(t,n){return o(t)?null:t.spatialReference.equals(n)?t.clone():i(t,n)}function h(t,n,e){const r=t.geometry;if(o(r))return null;if("mesh"===r.type)return E(t,r,n,e);const a=g(r,n),c=r.spatialReference;return o(a)?null:{move:(n,e,r)=>{const o=u(a.clone(),n,e,r);o.spatialReference.equals(c)?t.geometry=o:t.geometry=i(o,c)}}}function E(t,n,e,o){if(r(n.transform))return S(t,n,n.transform,e);if(!n.spatialReference.equals(e))return null;let a=0,c=0,s=0;return{move:(e,r,i)=>{const u=e-a,f=r-c,p=i-s;if(u||f||p){const y=new m(n.origin.x+u,n.origin.y+f,n.origin.z+p,n.origin.spatialReference);n.centerAt(y,{geographic:o===l.Global}),t.notifyGeometryChanged(),a=e,c=r,s=i}}}}function S(t,n,e,a){const c=g(e.getOriginPoint(n.spatialReference),a),l=n.spatialReference;return o(c)?null:{move:(n,o,a)=>{const m=u(c.clone(),n,o,a);if(m.spatialReference.equals(l))e.origin=s(m.x,m.y,m.z);else{const t=i(m,l);r(t)&&(e.origin=s(t.x,t.y,t.z))}t.notifyMeshTransformChanged(),t.notifyGeometryChanged()}}}function j(t,n=null,e){let a=null;const c=r(n)&&!t.spatialReference.equals(n)?t=>r(t)?i(t,n):t:t=>t,s={exclude:[],...e};return n=>{if("start"===n.action&&(a=c(t.toMap(n.screenStart,s))),o(a))return null;const e=c(t.toMap(n.screenEnd,s));return r(e)?{...n,mapStart:a,mapEnd:e}:null}}function R(t,n){const e=t.map((t=>a(x(t,n)))).filter((t=>r(t)));return t=>{const n=t.mapEnd.x-t.mapStart.x,r=t.mapEnd.y-t.mapStart.y,o=t.mapEnd.z-t.mapStart.z;return e.forEach((n=>n(t))),{...t,translationX:n,translationY:r,translationZ:o}}}function z(t,e){const r=new Map;for(const o of e)r.set(o,n(t[o]));return n=>(r.forEach(((n,e)=>{t[e]=n})),n)}function w(t){return r(t.geometry)&&"mesh"===t.geometry.type?v(t,t.geometry):z(t,["geometry"])}function v(t,n){const e=r(n.transform)?n.transform.clone():null,o=n.vertexAttributes.clonePositional();return r=>(n.transform=e,n.vertexAttributes=o,t.notifyGeometryChanged(),r)}function M(t){const n=t.map((t=>a(w(t)))).filter((t=>r(t)));return t=>(n.forEach((n=>n(t))),t)}function q(t){return z(t,["symbol"])}function D(){let t=0,n=0,e=0;return r=>{"start"===r.action&&(t=r.mapStart.x,n=r.mapStart.y,e=r.mapStart.z);const o=r.mapEnd.x-t,a=r.mapEnd.y-n,c=r.mapEnd.z-e;return t=r.mapEnd.x,n=r.mapEnd.y,e=r.mapEnd.z,{...r,mapDeltaX:o,mapDeltaY:a,mapDeltaZ:c,mapDeltaSpatialReference:r.mapStart.spatialReference}}}function b(){let t=0,n=0;return e=>{"start"===e.action&&(t=e.screenStart.x,n=e.screenStart.y);const r=e.screenEnd.x-t,o=e.screenEnd.y-n;return t=e.screenEnd.x,n=e.screenEnd.y,{...e,screenDeltaX:r,screenDeltaY:o}}}function C(t,n){let r=null,o=0,a=0;return s=>{if("start"===s.action&&(r=t.toScreen(n),r.x<0||r.x>t.width||r.y<0||r.y>t.height?r=null:(o=s.screenStart.x-r.x,a=s.screenStart.y-r.y)),null==r)return null;const i=e(s.screenEnd.x-o,0,t.width),l=e(s.screenEnd.y-a,0,t.height),u=c(i,l);return s.screenStart=r,s.screenEnd=u,s}}class G{constructor(){this.execute=()=>{}}next(t,n=new G){return r(t)&&(this.execute=e=>{const o=t(e);r(o)&&n.execute(o)}),n}}export{G as EventPipeline,D as addMapDelta,b as addScreenDelta,d as constrainToMapAxis,f as createDragEventPipelineCallback,p as createManipulatorDragEventPipeline,y as createManipulatorDragEventPipelineMany,C as dragAtLocation,x as dragGraphic,R as dragGraphicMany,w as resetGraphic,M as resetGraphicMany,z as resetProperties,q as resetSymbol,j as screenToMap};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{deg2rad as t}from"../../../../core/mathUtils.js";import{isSome as i,isNone as e}from"../../../../core/maybe.js";import{f as s,i as n,k as r}from"../../../../chunks/vec2.js";import{a as h}from"../../../../chunks/vec2f64.js";import{r as a,d as o,o as c,c as _,n as l,b as p,a as d,
|
|
5
|
+
import{deg2rad as t}from"../../../../core/mathUtils.js";import{isSome as i,isNone as e}from"../../../../core/maybe.js";import{f as s,i as n,k as r}from"../../../../chunks/vec2.js";import{a as h}from"../../../../chunks/vec2f64.js";import{r as a,d as o,o as c,c as _,n as l,b as p,a as d,y as g,g as f}from"../../../../chunks/vec3.js";import{c as u,f as m}from"../../../../chunks/vec3f64.js";import{create as D,fromPositionAndNormal as E,signedDistance as x,copy as b,intersectLine as I,normal as V}from"../../../../geometry/support/plane.js";import{angle as M,projectPointSignedLength as y}from"../../../../geometry/support/vector.js";import{intersectLineAndRay as N,LineType as P}from"../../../support/geometry2dUtils.js";class X{constructor(t,i,e,s=0,n=v.IMMEDIATE){this.helper=t,this.planeType=i,this.edge=e,this.distance=s,this._plane=D(),this._offsetPlane=D(),this._minDistance=-1/0,this._maxDistance=1/0,n===v.IMMEDIATE&&this._initialize()}get plane(){return this._plane}get requiresSplitEdgeLeft(){return!this._left.isOriginalDirection}get requiresSplitEdgeRight(){return!this._right.isOriginalDirection}get edgeDirection(){return this._edgeDirection}_initialize(){this._initializeNeighbors(),this._initializePlane(),this._initializeDistanceConstraints()}_initializeNeighbors(){var t,i,e,s;const n=this._toXYZ(this.edge.leftVertex.pos),r=this._toXYZ(null==(t=this.edge.leftVertex.leftEdge)||null==(i=t.leftVertex)?void 0:i.pos),h=this._toXYZ(this.edge.rightVertex.pos),o=this._toXYZ(null==(e=this.edge.rightVertex.rightEdge)||null==(s=e.rightVertex)?void 0:s.pos);this._edgeDirection=a(u(),n,h),this._left=this._computeNeighbor(n,r,this._edgeDirection),this._right=this._computeNeighbor(h,o,this._edgeDirection)}_toXYZ(t){return i(t)?this.helper.toXYZ(t):null}_computeNeighbor(t,i,s){if(e(i))return{start:t,end:i,direction:m(-s[1],s[0],0),isOriginalDirection:!0};const n=a(u(),t,i),r=!this._passesBisectingAngleThreshold(n,s);return{start:t,end:i,direction:r?this._bisectVectorsPerpendicular(s,n):n,isOriginalDirection:!r}}_passesBisectingAngleThreshold(t,i){const e=Math.abs(M(i,t));return e>=Y&&e<=Math.PI-Y}_bisectVectorsPerpendicular(t,i){const e=o(t,i)<0?t:c(u(),t),s=Math.abs(o(e,i));if(!(s<.001||s>.999))return this._bisectDirection(e,i);const n=_(u(),e,[0,0,1]);return l(n,n)}_bisectDirection(t,i){const e=p(u(),t,i);return l(e,e)}_initializePlane(){const t=this._computeNormalDirection(this._left),i=this._computeNormalDirection(this._right);o(t,i)<0&&c(i,i),E(this._left.start,this._bisectDirection(t,i),this._plane)}_computeNormalDirection(t){const i=_(u(),t.direction,this._edgeDirection);l(i,i);const e=_(u(),this._edgeDirection,i);return this.planeType===T.XY&&(e[2]=0),l(e,e)}_initializeDistanceConstraints(){i(this._left.end)&&!this.requiresSplitEdgeLeft&&this._updateDistanceConstraint(x(this._plane,this._left.end)),i(this._right.end)&&!this.requiresSplitEdgeRight&&this._updateDistanceConstraint(x(this._plane,this._right.end)),this._updateIntersectDistanceConstraint(this._plane)}_updateDistanceConstraint(t){t<=0&&(this._minDistance=Math.max(this._minDistance,t)),t>=0&&(this._maxDistance=Math.min(this._maxDistance,t))}_updateIntersectDistanceConstraint(t){const i=V(t),e=this._edgeDirection,a=p(u(),this._left.start,this._left.direction),o=p(u(),this._right.start,this._right.direction),c=this._pointInBasis2D(h(),i,e,this._left.start),_=this._pointInBasis2D(h(),i,e,a),l=this._pointInBasis2D(h(),i,e,this._right.start),g=this._pointInBasis2D(h(),i,e,o),[f]=N({start:_,end:c,type:P.LINE},{start:g,end:l,type:P.LINE});if(!f)return;const m=s(h(),c,_);n(m,m);const D=s(h(),f,_),E=r(m,D),b=p(u(),a,d(u(),this._left.direction,-E)),I=x(t,b);this._updateDistanceConstraint(I)}_pointInBasis2D(t,i,e,s){return t[0]=y(i,s),t[1]=y(e,s),t}_offset(t,e){Number.isFinite(this._minDistance)&&(e=Math.max(this._minDistance,e)),Number.isFinite(this._maxDistance)&&(e=Math.min(this._maxDistance,e)),b(this._offsetPlane,this._plane),this._offsetPlane[3]-=e;const s=(t,e,s)=>i(e)&&I(this._offsetPlane,t,p(u(),t,e),s),n=u();(t===this.edge.leftVertex?s(this._left.start,this._left.direction,n):s(this._right.start,this._right.direction,n))&&this.helper.copy(this.helper.fromXYZ(n,void 0,this.helper.getM(t.pos)),t.pos)}signedDistanceToPoint(t){return x(this.plane,this.helper.toXYZ(this.helper.pointToVector(t)))}apply(t){this._offset(t,this.distance)}undo(t){this._offset(t,0)}canAccumulate(t){return t instanceof X&&this.edge.leftVertex.index===t.edge.leftVertex.index&&this.edge.rightVertex.index===t.edge.rightVertex.index&&this.edge.component===t.edge.component&&this._maybeEqualsVec3(this._left.direction,t._left.direction)&&this._maybeEqualsVec3(this._right.direction,t._right.direction)&&g(V(this._plane),V(t._plane))}accumulate(t,i){const e=this._plane[3]-i._plane[3]+i.distance;this._offset(t,e)}accumulateParams(t){const i=t.distance-t._plane[3];this.distance=i+this._plane[3]}clone(){const t=new X(this.helper,this.planeType,this.edge,this.distance,v.DEFERRED);return b(t._plane,this._plane),b(t._offsetPlane,this._offsetPlane),t._maxDistance=this._maxDistance,t._minDistance=this._minDistance,t._left=this._cloneNeighbor(this._left),t._right=this._cloneNeighbor(this._right),t._edgeDirection=f(u(),this._edgeDirection),t}_maybeEqualsVec3(t,s){return e(t)&&e(s)||i(t)&&i(s)&&g(t,s)}_cloneNeighbor({start:t,end:e,direction:s,isOriginalDirection:n}){return{start:f(u(),t),end:i(e)?f(u(),e):null,direction:f(u(),s),isOriginalDirection:n}}}const Y=t(15);var T,v;!function(t){t[t.XYZ=0]="XYZ",t[t.XY=1]="XY"}(T||(T={})),function(t){t[t.IMMEDIATE=0]="IMMEDIATE",t[t.DEFERRED=1]="DEFERRED"}(v||(v={}));export{X as OffsetEdgeVertex,T as PlaneType};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Accessor.js";import a from"../../core/Handles.js";import i from"../../core/Logger.js";import{destroyMaybe as n,abortMaybe as s,isSome as l,unwrap as r,isNone as o}from"../../core/maybe.js";import{createTask as p,whenOrAbort as d,isAborted as u}from"../../core/promiseUtils.js";import{property as c}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as f}from"../../core/accessorSupport/decorators/subclass.js";import{project as h,canProjectWithoutEngine as g,isLoaded as y}from"../../geometry/projection.js";import{mayHaveHeightModelInfo as _,deriveHeightModelInfoFromLayer as k}from"../../geometry/support/heightModelInfoUtils.js";import{stringFromViewingMode as v,ViewingMode as R}from"../ViewingMode.js";const m=10,x=i.getLogger("esri.views.support.DefaultsFromMap");x.level="info";let T=class extends t{constructor(e){super(e),this._handles=new a,this.required={tileInfo:!1,heightModelInfo:!1,extent:!1},this.defaultSpatialReference=null,this.userSpatialReference=null,this.priorityCollection=null,this.logDebugInformation=!1,this.suspended=!1,this._projectExtentTask={task:null,input:null,output:null,spatialReference:null}}destroy(){this._handles=n(this._handles),this._projectExtentTask.task&&(this._debug("Aborting project extent task"),this._projectExtentTask.task=s(this._projectExtentTask.task)),this._set("map",null)}get ready(){return!this._spatialReferenceTask.updating&&!this._tileInfoTask.updating&&!this._extentTask.updating}get heightModelInfoReady(){return!this._heightModelInfoTask.updating}get spatialReference(){return l(this.userSpatialReference)?this.userSpatialReference:r(this._spatialReferenceTask.spatialReference)}get extent(){return r(this._extentTask.extent)}get heightModelInfo(){return r(this._heightModelInfoTask.heightModelInfo)}get vcsWkid(){return r(this._heightModelInfoTask.vcsWkid)}get latestVcsWkid(){return r(this._heightModelInfoTask.latestVcsWkid)}get viewingMode(){return o(this.userSpatialReference)||this.userSpatialReference.equals(r(this._spatialReferenceTask.spatialReference))?r(this._spatialReferenceTask.viewingMode):null}get tileInfo(){return r(this._tileInfoTask.tileInfo)}get mapCollections(){var e,t,a,i;const n=null==(e=this.map)?void 0:e.call(this),s=[];return l(this.priorityCollection)&&s.push(this.priorityCollection),s.push({parent:null==n?void 0:n.basemap,layers:null==n||null==(t=n.basemap)?void 0:t.baseLayers},{layers:null==n?void 0:n.layers},{parent:null==n?void 0:n.ground,layers:null==n||null==(a=n.ground)?void 0:a.layers},{parent:null==n?void 0:n.basemap,layers:null==n||null==(i=n.basemap)?void 0:i.referenceLayers}),s}get _allLayers(){var e,t;const a=this._collectLayers(this.mapCollections);return this._debug("Collected",null!=(e=null==(t=a.layers)?void 0:t.length)?e:0,"layers, updating",a.updating),a}get _spatialReferenceTask(){var e,t;if(this.suspended)return null!=(t=this._get("_spatialReferenceTask"))?t:{updating:!1};const{layers:a,updating:i}=this._allLayers,n={candidates:null};for(const l of a)if(this._processSpatialReferenceCandidates(l,n),n.candidates&&1===n.candidates.length)break;if(1!==(null==(e=n.candidates)?void 0:e.length)&&i)return{updating:!0};const s=this._pickSpatialReferenceCandidate(n.candidates);return this._debug("Finished spatial reference",l(s)?`${s.spatialReference.wkid}:${l(s.viewingMode)?v(s.viewingMode):"global/local"}`:"none available"),{spatialReference:l(s)?s.spatialReference:null,viewingMode:l(s)?s.viewingMode:null,updating:!1}}get _tileInfoTask(){var e,t,a,i,n,s,l,r;if(!this.required.tileInfo)return null!=(r=this._get("_tileInfoTask"))?r:{updating:!1};if(!this.spatialReference)return{updating:this._spatialReferenceTask.updating};const{layers:o,updating:p}=this._collectLayers([{parent:null==(e=this.map)||null==(t=e.call(this))?void 0:t.basemap,layers:null==(a=this.map)||null==(i=a.call(this))||null==(n=i.basemap)?void 0:n.baseLayers},{layers:null==(s=this.map)||null==(l=s.call(this))?void 0:l.layers}]);if(o&&o.length>0&&"tileInfo"in o[0]){const e=o[0].tileInfo;return{tileInfo:e&&e.spatialReference.equals(this.spatialReference)?e:null,updating:!1}}return{updating:p}}get _heightModelInfoTask(){var e,t;if(!this.required.heightModelInfo||this.suspended&&null!=(e=this._get("_heightModelInfoTask"))&&e.heightModelInfo)return null!=(t=this._get("_heightModelInfoTask"))?t:{updating:!1};const{layers:a,updating:i}=this._allLayers;for(const o of a){var n,s;if(this._debug("Considering",null!=(n=null!=(s=o.title)?s:o.id)?n:o.declaredClass,"for height model info"),_(o)){const e=k(o);var l,r;if(e)return this._debug("Derived height model info",e),{heightModelInfo:e,vcsWkid:null==(l=o.spatialReference)?void 0:l.vcsWkid,latestVcsWkid:null==(r=o.spatialReference)?void 0:r.latestVcsWkid,updating:!1}}this._debug("Layer does not support height models")}return this._debug("No height model info found,","updating",i),{updating:i}}get _extentCandidatesTask(){var e;if(this.suspended||!this.required.extent)return null!=(e=this._get("_extentCandidatesTask"))?e:{updating:!1};if(!this.spatialReference)return{updating:this._spatialReferenceTask.updating};const t=this._allLayers,a=t.updating,i=[];for(const n of t.layers){const e="fullExtents"in n&&n.fullExtents||(l(n.fullExtent)?[n.fullExtent]:[]),t=e.find((e=>e.spatialReference.equals(this.spatialReference)));if(t)return{candidates:[{extent:t,layer:n}],updating:!1};if(this._getSupportedSpatialReferences(n).length>0)for(const a of e)i.push({extent:a,layer:n})}return{candidates:i,updating:a}}get _extentTask(){const{candidates:e,updating:t}=this._extentCandidatesTask;if(t)return{updating:t};if(o(e)||0===e.length)return{updating:!1};if(!this.spatialReference)return{updating:this._spatialReferenceTask.updating};const{candidate:a,requiresGeometryService:i}=this._pickExtentCandidate(e),n=this.spatialReference;if(a.extent.equals(this._projectExtentTask.input)&&n.equals(this._projectExtentTask.spatialReference))return{extent:this._projectExtentTask.output,updating:l(this._projectExtentTask.task)&&!this._projectExtentTask.task.finished};if(l(this._projectExtentTask.task)&&(this._debug("Aborting project extent task"),this._projectExtentTask.task=s(this._projectExtentTask.task)),!i){this._projectExtentTask={input:null,output:null,task:null,spatialReference:null};try{return{extent:h(a.extent,n),updating:!1}}catch{return{updating:!1}}}return this._debug("Starting project extent task for",a.extent),this._projectExtentTask={input:a.extent.clone(),output:null,spatialReference:n.clone(),task:p((async e=>{try{const t=await d(import("../../portal/support/geometryServiceUtils.js"),e),i=await t.projectGeometry(a.extent,n,a.layer.portalItem,e);this._debug("Project extent task finished",i),this._projectExtentTask={...this._projectExtentTask,task:null,output:i}}catch(t){if(u(e))return;this._projectExtentTask={...this._projectExtentTask,task:null}}}))},{updating:!0}}_processSpatialReferenceCandidates(e,t){var a;const i=this._getSupportedSpatialReferences(e);if(0!==i.length)if(this._debug("Spatial reference candidates from",null!=(a=e.title)?a:e.id,":",i.map((e=>`${e.spatialReference.wkid}:${l(e.viewingMode)?v(e.viewingMode):"global/local"}`)).join(", ")),t.candidates){const e=[],a=(e,t)=>o(e.viewingMode)?t.viewingMode:(o(t.viewingMode)||e.viewingMode===t.viewingMode)&&e.viewingMode;for(const n of t.candidates)for(const t of i){if(!n.spatialReference.equals(t.spatialReference))continue;const i=a(n,t);if(!1!==i){e.push({spatialReference:n.spatialReference,viewingMode:i});break}}e.length>0&&(t.candidates=e)}else t.candidates=i}_pickSpatialReferenceCandidate(e){const t=this.defaultSpatialReference;return!e||e.length<1?l(t)?{spatialReference:t,viewingMode:null}:null:(l(t)&&e.length>1&&e.some((({spatialReference:e})=>e.equals(t)))&&(e=e.filter((({spatialReference:e})=>e.equals(t)))),e.length>1&&e.some((({viewingMode:e})=>e!==R.Local))&&(e=e.filter((({viewingMode:e})=>e!==R.Local))),e[0])}_getSupportedSpatialReferences(e){const t="supportedSpatialReferences"in e&&e.supportedSpatialReferences||(e.spatialReference?[e.spatialReference]:[]);if(0===t.length)return[];const a=[];for(const i of t){const t=this.getSpatialReferenceSupport({spatialReference:i,layer:e});if(l(t)){const e=l(t.constraints)?t.constraints:[{spatialReference:i}];for(const{spatialReference:t,viewingMode:i}of e)(o(this.userSpatialReference)||t.equals(this.userSpatialReference))&&a.push({spatialReference:t,viewingMode:i})}}return a}_pickExtentCandidate(e){const t=this.spatialReference,a=e.find((({extent:e})=>g(e.spatialReference,t)||y()));return l(a)?{candidate:a,requiresGeometryService:!1}:{candidate:e[0],requiresGeometryService:!0}}_collectLayers(e){var t;if("loaded"!==this._loadMaybe(null==(t=this.map)?void 0:t.call(this)))return{layers:[],updating:!0};const a={layers:[],preloading:-1,updating:!1};for(const i of e)if(this._collectCollection(i,a),a.preloading===m)break;return{layers:a.layers,updating:a.updating}}_collectCollection(e,t){if(e.layers){switch(this._loadMaybe(e.parent)){case"loading":return t.updating=!0,void++t.preloading;case"failed":return}for(const n of e.layers){switch(this._loadMaybe(n)){case"failed":continue;case"loading":t.updating=!0,++t.preloading;break;case"loaded":var a,i;if(!t.updating)this._debug("Considering layer",null!=(a=null!=(i=n.title)?i:n.id)?a:n.declaredClass),t.layers.push(n);"layers"in n&&this._collectCollection({layers:n.layers},t)}if(t.preloading===m)break}}}_loadMaybe(e){return e&&"loadStatus"in e?"not-loaded"===e.loadStatus?(this._debug("Triggering load",null!=(t=null!=(a=e.title)?a:e.id)?t:e.declaredClass),e.load(),"loading"):e.loadStatus:"loaded";var t,a}_debug(...e){this.logDebugInformation&&x.info(...e)}};e([c()],T.prototype,"required",void 0),e([c({constructOnly:!0})],T.prototype,"map",void 0),e([c({constructOnly:!0})],T.prototype,"getSpatialReferenceSupport",void 0),e([c()],T.prototype,"defaultSpatialReference",void 0),e([c()],T.prototype,"userSpatialReference",void 0),e([c()],T.prototype,"priorityCollection",void 0),e([c()],T.prototype,"logDebugInformation",void 0),e([c()],T.prototype,"suspended",void 0),e([c({readOnly:!0})],T.prototype,"ready",null),e([c({readOnly:!0})],T.prototype,"heightModelInfoReady",null),e([c({readOnly:!0})],T.prototype,"spatialReference",null),e([c({readOnly:!0})],T.prototype,"extent",null),e([c({readOnly:!0})],T.prototype,"heightModelInfo",null),e([c({readOnly:!0})],T.prototype,"vcsWkid",null),e([c({readOnly:!0})],T.prototype,"latestVcsWkid",null),e([c({readOnly:!0})],T.prototype,"viewingMode",null),e([c({readOnly:!0})],T.prototype,"tileInfo",null),e([c({readOnly:!0})],T.prototype,"mapCollections",null),e([c({readOnly:!0})],T.prototype,"_allLayers",null),e([c({readOnly:!0})],T.prototype,"_spatialReferenceTask",null),e([c({readOnly:!0})],T.prototype,"_tileInfoTask",null),e([c({readOnly:!0})],T.prototype,"_heightModelInfoTask",null),e([c({readOnly:!0})],T.prototype,"_extentCandidatesTask",null),e([c()],T.prototype,"_extentTask",null),e([c()],T.prototype,"_projectExtentTask",void 0),T=e([f("esri.views.support.DefaultsFromMap")],T);const M=T;export{M as default};
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Accessor.js";import a from"../../core/Logger.js";import{abortMaybe as i,isSome as n,unwrap as s,isNone as l}from"../../core/maybe.js";import{createTask as r,isAborted as o}from"../../core/promiseUtils.js";import{property as p}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as d}from"../../core/accessorSupport/decorators/subclass.js";import{mayHaveHeightModelInfo as u,deriveHeightModelInfoFromLayer as c}from"../../geometry/support/heightModelInfoUtils.js";import{stringFromViewingMode as f,ViewingMode as h}from"../ViewingMode.js";import{projectWithEngineOrService as g}from"./projectionUtils.js";const y=a.getLogger("esri.views.support.DefaultsFromMap");y.level="info";let _=class extends t{constructor(e){super(e),this.required={tileInfo:!1,heightModelInfo:!1,extent:!1},this.defaultSpatialReference=null,this.userSpatialReference=null,this.sourcePreloadCount=10,this.priorityCollection=null,this.logDebugInformation=!1,this.requiresExtentInSpatialReference=!0,this.suspended=!1,this._projectExtentTask={task:null,input:null,output:null,spatialReference:null}}destroy(){this._projectExtentTask.task&&(this._debug("Aborting project extent task"),this._projectExtentTask.task=i(this._projectExtentTask.task)),this._set("map",null)}get ready(){return!this._spatialReferenceTask.updating&&!this._tileInfoTask.updating&&!this._extentTask.updating}get heightModelInfoReady(){return!this._heightModelInfoTask.updating}get spatialReference(){return n(this.userSpatialReference)?this.userSpatialReference:s(this._spatialReferenceTask.spatialReference)}get extent(){return s(this._extentTask.extent)}get heightModelInfo(){return s(this._heightModelInfoTask.heightModelInfo)}get vcsWkid(){return s(this._heightModelInfoTask.vcsWkid)}get latestVcsWkid(){return s(this._heightModelInfoTask.latestVcsWkid)}get viewingMode(){return l(this.userSpatialReference)||this.userSpatialReference.equals(s(this._spatialReferenceTask.spatialReference))?s(this._spatialReferenceTask.viewingMode):null}get tileInfo(){return s(this._tileInfoTask.tileInfo)}get mapCollections(){var e,t,a,i;const s=null==(e=this.map)?void 0:e.call(this),l=[];return n(this.priorityCollection)&&l.push(this.priorityCollection),l.push({parent:null==s?void 0:s.basemap,layers:null==s||null==(t=s.basemap)?void 0:t.baseLayers},{layers:null==s?void 0:s.layers},{parent:null==s?void 0:s.ground,layers:null==s||null==(a=s.ground)?void 0:a.layers},{parent:null==s?void 0:s.basemap,layers:null==s||null==(i=s.basemap)?void 0:i.referenceLayers}),l}get _allLayers(){var e,t;const a=this._collectLayers(this.mapCollections);return this._debug("Collected",null!=(e=null==(t=a.layers)?void 0:t.length)?e:0,"layers, updating",a.updating),a}get _spatialReferenceTask(){var e,t;if(this.suspended)return null!=(t=this._get("_spatialReferenceTask"))?t:{updating:!1};const{layers:a,updating:i}=this._allLayers,s={candidates:null};for(const n of a)if(this._processSpatialReferenceCandidates(n,s),s.candidates&&1===s.candidates.length)break;if(1!==(null==(e=s.candidates)?void 0:e.length)&&i)return{updating:!0};const l=this._pickSpatialReferenceCandidate(s.candidates);return this._debug("Finished spatial reference",n(l)?`${l.spatialReference.wkid}:${n(l.viewingMode)?f(l.viewingMode):"global/local"}`:"none available"),{spatialReference:n(l)?l.spatialReference:null,viewingMode:n(l)?l.viewingMode:null,updating:!1}}get _tileInfoTask(){var e,t,a,i,n,s,l,r;if(!this.required.tileInfo)return null!=(r=this._get("_tileInfoTask"))?r:{updating:!1};if(!this.spatialReference)return{updating:this._spatialReferenceTask.updating};const{layers:o,updating:p}=this._collectLayers([{parent:null==(e=this.map)||null==(t=e.call(this))?void 0:t.basemap,layers:null==(a=this.map)||null==(i=a.call(this))||null==(n=i.basemap)?void 0:n.baseLayers},{layers:null==(s=this.map)||null==(l=s.call(this))?void 0:l.layers}]);if(o&&o.length>0&&"tileInfo"in o[0]){const e=o[0].tileInfo;return{tileInfo:e&&e.spatialReference.equals(this.spatialReference)?e:null,updating:!1}}return{updating:p}}get _heightModelInfoTask(){var e,t;if(!this.required.heightModelInfo||this.suspended&&null!=(e=this._get("_heightModelInfoTask"))&&e.heightModelInfo)return null!=(t=this._get("_heightModelInfoTask"))?t:{updating:!1};const{layers:a,updating:i}=this._allLayers;for(const o of a){var n,s;if(this._debug("Considering",null!=(n=null!=(s=o.title)?s:o.id)?n:o.declaredClass,"for height model info"),u(o)){const e=c(o);var l,r;if(e)return this._debug("Derived height model info",e),{heightModelInfo:e,vcsWkid:null==(l=o.spatialReference)?void 0:l.vcsWkid,latestVcsWkid:null==(r=o.spatialReference)?void 0:r.latestVcsWkid,updating:!1}}this._debug("Layer does not support height models")}return this._debug("No height model info found,","updating",i),{updating:i}}get _extentCandidatesTask(){var e;if(this.suspended||!this.required.extent)return null!=(e=this._get("_extentCandidatesTask"))?e:{updating:!1};if(!this.spatialReference)return{updating:this._spatialReferenceTask.updating};const t=this._allLayers,a=t.updating,i=[];for(const l of t.layers){var s;const e="fullExtents"in l&&l.fullExtents||(n(l.fullExtent)?[l.fullExtent]:[]),t=this.requiresExtentInSpatialReference?null:e[0],a=null!=(s=e.find((e=>e.spatialReference.equals(this.spatialReference))))?s:t;if(a)return{candidates:[{extent:a,layer:l}],updating:!1};if(this._getSupportedSpatialReferences(l).length>0)for(const n of e)i.push({extent:n,layer:l})}return{candidates:i,updating:a}}get _extentTask(){const{candidates:e,updating:t}=this._extentCandidatesTask;if(t)return{updating:t};if(l(e)||0===e.length)return{updating:!1};if(!this.spatialReference)return{updating:this._spatialReferenceTask.updating};const a=this._pickExtentCandidate(e),s=this.spatialReference;return a.extent.equals(this._projectExtentTask.input)&&s.equals(this._projectExtentTask.spatialReference)?{extent:this._projectExtentTask.output,updating:n(this._projectExtentTask.task)&&!this._projectExtentTask.task.finished}:(n(this._projectExtentTask.task)&&(this._debug("Aborting project extent task"),this._projectExtentTask.task=i(this._projectExtentTask.task)),this._debug("Starting project extent task for",a.extent),this._projectExtentTask={input:a.extent.clone(),output:null,spatialReference:s.clone(),task:r((async e=>{try{const t=await g(a.extent,s,a.layer.portalItem,e);this._debug("Project extent task finished",t),this._projectExtentTask={...this._projectExtentTask,task:null,output:t}}catch(t){if(o(e))return;this._projectExtentTask={...this._projectExtentTask,task:null}}}))},{updating:!0})}_processSpatialReferenceCandidates(e,t){var a;const i=this._getSupportedSpatialReferences(e);if(0!==i.length)if(this._debug("Spatial reference candidates from",null!=(a=e.title)?a:e.id,":",i.map((e=>`${e.spatialReference.wkid}:${n(e.viewingMode)?f(e.viewingMode):"global/local"}`)).join(", ")),t.candidates){const e=[],a=(e,t)=>l(e.viewingMode)?t.viewingMode:(l(t.viewingMode)||e.viewingMode===t.viewingMode)&&e.viewingMode;for(const n of t.candidates)for(const t of i){if(!n.spatialReference.equals(t.spatialReference))continue;const i=a(n,t);if(!1!==i){e.push({spatialReference:n.spatialReference,viewingMode:i});break}}e.length>0&&(t.candidates=e)}else t.candidates=i}_pickSpatialReferenceCandidate(e){const t=this.defaultSpatialReference;return!e||e.length<1?n(t)?{spatialReference:t,viewingMode:null}:null:(n(t)&&e.length>1&&e.some((({spatialReference:e})=>e.equals(t)))&&(e=e.filter((({spatialReference:e})=>e.equals(t)))),e.length>1&&e.some((({viewingMode:e})=>e!==h.Local))&&(e=e.filter((({viewingMode:e})=>e!==h.Local))),e[0])}_getSupportedSpatialReferences(e){const t="supportedSpatialReferences"in e&&e.supportedSpatialReferences||(e.spatialReference?[e.spatialReference]:[]);if(0===t.length)return[];const a=[];for(const i of t){const t=this.getSpatialReferenceSupport({spatialReference:i,layer:e});if(n(t)){const e=n(t.constraints)?t.constraints:[{spatialReference:i}];for(const{spatialReference:t,viewingMode:i}of e)(!this.requiresExtentInSpatialReference||l(this.userSpatialReference)||t.equals(this.userSpatialReference))&&a.push({spatialReference:t,viewingMode:i})}}return a}_pickExtentCandidate(e){const t=this.spatialReference;return e.find((({extent:e})=>t.equals(e.spatialReference)))||e[0]}_collectLayers(e){var t;if("loaded"!==this._loadMaybe(null==(t=this.map)?void 0:t.call(this)))return{layers:[],updating:!0};const a={layers:[],preloading:-1,updating:!1};for(const i of e)if(this._collectCollection(i,a),a.preloading===this.sourcePreloadCount)break;return{layers:a.layers,updating:a.updating}}_collectCollection(e,t){if(e.layers){switch(this._loadMaybe(e.parent)){case"loading":return t.updating=!0,void++t.preloading;case"failed":return}for(const n of e.layers){switch(this._loadMaybe(n)){case"failed":continue;case"loading":t.updating=!0,++t.preloading;break;case"loaded":var a,i;if(!t.updating)this._debug("Considering layer",null!=(a=null!=(i=n.title)?i:n.id)?a:n.declaredClass),t.layers.push(n);"layers"in n&&this._collectCollection({layers:n.layers},t)}if(t.preloading===this.sourcePreloadCount)break}}}_loadMaybe(e){return e&&"loadStatus"in e?"not-loaded"===e.loadStatus?(this._debug("Triggering load",null!=(t=null!=(a=e.title)?a:e.id)?t:e.declaredClass),e.load(),"loading"):e.loadStatus:"loaded";var t,a}_debug(...e){this.logDebugInformation&&y.info(...e)}};e([p()],_.prototype,"required",void 0),e([p({constructOnly:!0})],_.prototype,"map",void 0),e([p({constructOnly:!0})],_.prototype,"getSpatialReferenceSupport",void 0),e([p()],_.prototype,"defaultSpatialReference",void 0),e([p()],_.prototype,"userSpatialReference",void 0),e([p()],_.prototype,"sourcePreloadCount",void 0),e([p()],_.prototype,"priorityCollection",void 0),e([p()],_.prototype,"logDebugInformation",void 0),e([p()],_.prototype,"requiresExtentInSpatialReference",void 0),e([p()],_.prototype,"suspended",void 0),e([p({readOnly:!0})],_.prototype,"ready",null),e([p({readOnly:!0})],_.prototype,"heightModelInfoReady",null),e([p({readOnly:!0})],_.prototype,"spatialReference",null),e([p({readOnly:!0})],_.prototype,"extent",null),e([p({readOnly:!0})],_.prototype,"heightModelInfo",null),e([p({readOnly:!0})],_.prototype,"vcsWkid",null),e([p({readOnly:!0})],_.prototype,"latestVcsWkid",null),e([p({readOnly:!0})],_.prototype,"viewingMode",null),e([p({readOnly:!0})],_.prototype,"tileInfo",null),e([p({readOnly:!0})],_.prototype,"mapCollections",null),e([p({readOnly:!0})],_.prototype,"_allLayers",null),e([p({readOnly:!0})],_.prototype,"_spatialReferenceTask",null),e([p({readOnly:!0})],_.prototype,"_tileInfoTask",null),e([p({readOnly:!0})],_.prototype,"_heightModelInfoTask",null),e([p({readOnly:!0})],_.prototype,"_extentCandidatesTask",null),e([p()],_.prototype,"_extentTask",null),e([p()],_.prototype,"_projectExtentTask",void 0),_=e([d("esri.views.support.DefaultsFromMap")],_);const k=_;export{k as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import s from"../../core/Accessor.js";import t from"../../core/Handles.js";import{isNone as i}from"../../core/maybe.js";import{watch as n,on as d,sync as r}from"../../core/reactiveUtils.js";import{schedule as a}from"../../core/scheduling.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import{subclass as h}from"../../core/accessorSupport/decorators/subclass.js";let c=class extends s{constructor(){super(...arguments),this.updating=!1,this.handleId=0,this.handles=new t,this.scheduleHandleId=0,this.pendingPromises=new Set}destroy(){this.removeAll(),this.handles.destroy()}add(e,s,t={}){const i=++this.handleId;t.sync||this._installSyncUpdatingWatch(e,i);const d=n(e,s,t);return this.handles.add(d,i),{remove:()=>this.handles.remove(i)}}addOnCollectionChange(e,s,{initial:t=!1}={}){const i=++this.handleId;return this.handles.add([d(e,"after-changes",this._createSyncUpdatingCallback(),r),d(e,"change",s,{onListenerAdd:t?e=>s({added:e.
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import s from"../../core/Accessor.js";import t from"../../core/Handles.js";import{isNone as i}from"../../core/maybe.js";import{watch as n,on as d,sync as r}from"../../core/reactiveUtils.js";import{schedule as a}from"../../core/scheduling.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import{subclass as h}from"../../core/accessorSupport/decorators/subclass.js";let c=class extends s{constructor(){super(...arguments),this.updating=!1,this.handleId=0,this.handles=new t,this.scheduleHandleId=0,this.pendingPromises=new Set}destroy(){this.removeAll(),this.handles.destroy()}add(e,s,t={}){const i=++this.handleId;t.sync||this._installSyncUpdatingWatch(e,i);const d=n(e,s,t);return this.handles.add(d,i),{remove:()=>this.handles.remove(i)}}addOnCollectionChange(e,s,{initial:t=!1}={}){const i=++this.handleId;return this.handles.add([d(e,"after-changes",this._createSyncUpdatingCallback(),r),d(e,"change",s,{onListenerAdd:t?e=>s({added:e.toArray(),removed:[]}):void 0})],i),{remove:()=>this.handles.remove(i)}}addPromise(e){if(i(e))return e;const s=++this.handleId;this.handles.add({remove:()=>{this.pendingPromises.delete(e)&&(0!==this.pendingPromises.size||this.handles.has(l)||this._set("updating",!1))}},s),this.pendingPromises.add(e),this._set("updating",!0);const t=()=>this.handles.remove(s);return e.then(t,t),e}removeAll(){this.pendingPromises.clear(),this.handles.removeAll(),this._set("updating",!1)}_installSyncUpdatingWatch(e,s){const t=this._createSyncUpdatingCallback(),i=n(e,t,{sync:!0,equals:()=>!1});return this.handles.add(i,s),i}_createSyncUpdatingCallback(){return()=>{this.handles.remove(l),++this.scheduleHandleId;const e=this.scheduleHandleId;this._get("updating")||this._set("updating",!0),this.handles.add(a((()=>{e===this.scheduleHandleId&&(this._set("updating",this.pendingPromises.size>0),this.handles.remove(l))})),l)}}};e([o({readOnly:!0})],c.prototype,"updating",void 0),c=e([h("esri.views.support.WatchUpdatingTracking")],c);const l=-42;var p;!function(e){e[e.NONE=0]="NONE",e[e.SYNC=1]="SYNC",e[e.INIT=2]="INIT"}(p||(p={}));export{p as WatchFlags,c as WatchUpdatingTracking};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{throwIfAborted as r}from"../../core/promiseUtils.js";import{i as e}from"../../chunks/pe.js";import{canProjectWithoutEngine as t,project as o,load as i}from"../../geometry/projection.js";let n,s=null;async function p(e){s||(s=import("../../portal/support/geometryServiceUtils.js").then((r=>n=r))),await s,r(e)}async function c(r,s,m,a){if(!r)return null;const l=r.spatialReference;return e()||t(l,s)?o(r,s):n?n.projectGeometry(r,s,m,a):(await Promise.race([p(a),i(a)]),c(r,s,m,a))}export{c as projectWithEngineOrService};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import t from"../../core/Logger.js";import{isSome as
|
|
5
|
+
import{isArrayLike as e}from"../../core/arrayUtils.js";import t from"../../core/Logger.js";import{isSome as r}from"../../core/maybe.js";import{isUint16Array as i,isUint32Array as s}from"../../core/typedArrayUtil.js";import{checkWebGLError as n}from"./checkWebGLError.js";import{ContextType as o}from"./context-util.js";import{BufferType as f,ResourceType as a,Usage as u,DataType as h}from"./enums.js";const _=t.getLogger("esri.views.webgl.BufferObject");function b(t){return e(t)}class c{constructor(e,t,r,i){this._context=e,this.bufferType=t,this.usage=r,this._glName=null,this._size=-1,this._indexType=void 0,e.instanceCounter.increment(a.Buffer,this),this._glName=this._context.gl.createBuffer(),n(this._context.gl),i&&this.setData(i)}static createIndex(e,t,r){return new c(e,f.ELEMENT_ARRAY_BUFFER,t,r)}static createVertex(e,t,r){return new c(e,f.ARRAY_BUFFER,t,r)}static createUniform(e,t,r){if(e.type!==o.WEBGL2)throw new Error("Uniform buffers are supported in WebGL2 only!");return new c(e,f.UNIFORM_BUFFER,t,r)}static createPixelPack(e,t=u.STREAM_READ,r){if(e.type!==o.WEBGL2)throw new Error("Pixel pack buffers are supported in WebGL2 only!");const i=new c(e,f.PIXEL_PACK_BUFFER,t);return r&&i.setSize(r),i}static createPixelUnpack(e,t=u.STREAM_DRAW,r){if(e.type!==o.WEBGL2)throw new Error("Pixel unpack buffers are supported in WebGL2 only!");return new c(e,f.PIXEL_UNPACK_BUFFER,t,r)}get glName(){return this._glName}get size(){return this._size}get indexType(){return this._indexType}get byteSize(){return this.bufferType===f.ELEMENT_ARRAY_BUFFER?this._indexType===h.UNSIGNED_INT?4*this._size:2*this._size:this._size}get _isVAOAware(){return this.bufferType===f.ELEMENT_ARRAY_BUFFER||this.bufferType===f.ARRAY_BUFFER}dispose(){var e;if(null!=(e=this._context)&&e.gl){if(this._glName){this._context.gl.deleteBuffer(this._glName),this._glName=null}this._context.instanceCounter.decrement(a.Buffer,this),this._context=null}else this._glName&&_.warn("Leaked WebGL buffer object")}setSize(e,t=null){if(e<=0&&_.error("Buffer size needs to be positive!"),this.bufferType===f.ELEMENT_ARRAY_BUFFER&&r(t))switch(this._indexType=t,t){case h.UNSIGNED_SHORT:e*=2;break;case h.UNSIGNED_INT:e*=4}this._setBufferData(e)}setData(e){if(!e)return;let t=e.byteLength;this.bufferType===f.ELEMENT_ARRAY_BUFFER&&(i(e)&&(t/=2,this._indexType=h.UNSIGNED_SHORT),s(e)&&(t/=4,this._indexType=h.UNSIGNED_INT)),this._setBufferData(t,e)}_setBufferData(e,t=null){this._size=e;const i=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const s=this._context.gl;r(t)?s.bufferData(this.bufferType,t,this.usage):s.bufferData(this.bufferType,e,this.usage),n(s),this._isVAOAware&&this._context.bindVAO(i)}setSubData(e,t=0,r=0,o=e.byteLength){if(!e)return;(t<0||t>=this._size)&&_.error("offset is out of range!");let a=t,u=r,h=o,b=e.byteLength;this.bufferType===f.ELEMENT_ARRAY_BUFFER&&(i(e)?(b/=2,a*=2,u*=2,h*=2):s(e)&&(b/=4,a*=4,u*=4,h*=4)),void 0===o&&(o=b-1),r>=o&&_.error("end must be bigger than start!"),t+r-o>this._size&&_.error("An attempt to write beyond the end of the buffer!");const c=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const E=this._context.gl,l=ArrayBuffer.isView(e)?e.buffer:e,d=0===u&&h===e.byteLength?l:l.slice(u,h);E.bufferSubData(this.bufferType,a,d),n(E),this._isVAOAware&&this._context.bindVAO(c)}setSubDataFromView(e,t,r,i){if(!e)return;(t<0||t>=this._size)&&_.error("offset is out of range!"),r>=i&&_.error("end must be bigger than start!"),t+r-i>this._size&&_.error("An attempt to write beyond the end of the buffer!");const s=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const f=this._context.gl;if(this._context.type===o.WEBGL2)f.bufferSubData(this.bufferType,t*e.BYTES_PER_ELEMENT,e,r,i-r);else{const s=0===r&&i===e.length?e:e.subarray(r,i);f.bufferSubData(this.bufferType,t*e.BYTES_PER_ELEMENT,s)}n(f),this._isVAOAware&&this._context.bindVAO(s)}getSubData(e,t=0,r,i){if(this._context.type!==o.WEBGL2)return void _.error("Get buffer subdata is supported in WebGL2 only!");if(r<0||i<0)return void _.error("Problem getting subdata: offset and length were less than zero!");const s=b(e)?e.BYTES_PER_ELEMENT:1;if(s*((null!=r?r:0)+(null!=i?i:0))>e.byteLength)return void _.error("Problem getting subdata: offset and length exceeded destination size!");t+s*(null!=i?i:0)>this.byteSize&&_.warn("Potential problem getting subdata: requested data exceeds buffer size!");const n=this._context.gl;this._context.bindBuffer(this,f.COPY_READ_BUFFER),n.getBufferSubData(f.COPY_READ_BUFFER,t,e,r,i),this._context.unbindBuffer(f.COPY_READ_BUFFER)}async getSubDataAsync(e,t=0,r,i){this._context.type===o.WEBGL2?(await this._context.clientWaitAsync(),this.getSubData(e,t,r,i)):_.error("Get buffer subdata is supported in WebGL2 only!")}}export{c as BufferObject};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{AllocationTracer as t}from"../support/AllocationTracer.js";import{ResourceType as r}from"./enums.js";const e
|
|
5
|
+
import{AllocationTracer as t}from"../support/AllocationTracer.js";import{ResourceType as r}from"./enums.js";class s{constructor(){this.RECORD_ALLOCATIONS=!1}}const e=new s;class n{constructor(){for(this._current=new Array,this._max=new Array,this._allocations=new t(e.RECORD_ALLOCATIONS);this._current.length<r.COUNT;)this._current.push(0),this._max.push(0)}resetMax(){for(this._max.length=0;this._max.length<this._current.length;)this._max.push(0)}increment(t,r){const s=++this._current[t];this._max[t]=Math.max(s,this._max[t]),this._allocations.add(r)}decrement(t,r){--this._current[t],this._allocations.remove(r)}get max(){return this._max}get current(){return this._current}get total(){return this.current.reduce(((t,r)=>t+r),0)}printResourceCount(){if(this.total>0){console.log("Live objects:");for(let t=0;t<r.COUNT;++t){const s=this._current[t];s>0&&console.log(`${r[t]}: ${s}`)}}this._allocations.print()}}export{n as InstanceCounter,e as test};
|