@arcgis/core 6.0.0-next.7 → 6.0.0-next.9

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.
Files changed (430) hide show
  1. package/arcade/featureSetUtils.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{85908e6e9c50749cee60.js → 037a8cc19debbaaa4e10.js} +1 -1
  4. package/assets/esri/core/workers/chunks/066550852483ab8f77bc.js +1 -0
  5. package/assets/esri/core/workers/chunks/0f725cf79ce00e790a7d.js +1 -0
  6. package/assets/esri/core/workers/chunks/12a7997a40c77f5c9160.js +1 -0
  7. package/assets/esri/core/workers/chunks/1b077c92345ffb5916c2.js +1 -0
  8. package/assets/esri/core/workers/chunks/{6dd0b79fa3a629ab4f27.js → 1bca39e0e651426bdbb5.js} +1 -1
  9. package/assets/esri/core/workers/chunks/1c0c5cb13c2590aae906.js +1 -0
  10. package/assets/esri/core/workers/chunks/1e0d2715d603f48a7e0b.js +1 -0
  11. package/assets/esri/core/workers/chunks/2686fe5b62dd0be699c0.js +1 -0
  12. package/assets/esri/core/workers/chunks/2a97268000c6d03ef720.js +1 -0
  13. package/assets/esri/core/workers/chunks/2d9a1f23ec6ce90723ac.js +1 -0
  14. package/assets/esri/core/workers/chunks/2e2e33ec50e97b91b178.js +1 -0
  15. package/assets/esri/core/workers/chunks/{7a05b18f655c1167ce0a.js → 2ef5237e4c876d6a4ee0.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{776ae25a34352d3468bc.js → 3081ee6d8019494fc21e.js} +1 -1
  17. package/assets/esri/core/workers/chunks/37d6a264a3f1d8072aa0.js +1 -0
  18. package/assets/esri/core/workers/chunks/3b3e519f15ed52c83f0c.js +1 -0
  19. package/assets/esri/core/workers/chunks/3c0ed15b544df6fb0903.js +1 -0
  20. package/assets/esri/core/workers/chunks/3df5500a85345577480a.js +1 -0
  21. package/assets/esri/core/workers/chunks/{801e9e66edb4961461eb.js → 40a584cb952e94326e9e.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{1ba0dfbe0958cdbd7c9f.js → 42fd2a7b22b03dacc6a7.js} +1 -1
  23. package/assets/esri/core/workers/chunks/444e5f214abce3d607cd.js +1 -0
  24. package/assets/esri/core/workers/chunks/{d201fbf3ceff946d2bd6.js → 44d5508042cacdfcac47.js} +1 -1
  25. package/assets/esri/core/workers/chunks/4503b20ca6a80fb63d72.js +1 -0
  26. package/assets/esri/core/workers/chunks/45367aa8e5c5d574de94.js +1 -0
  27. package/assets/esri/core/workers/chunks/45800373650fbc8262e6.js +1 -0
  28. package/assets/esri/core/workers/chunks/{6a7ab1ef9a37e87db5ae.js → 46a7da93a63663878583.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{f43a50d4bd9636e68ae5.js → 46b4fb6a7fe4877b0efc.js} +63 -61
  30. package/assets/esri/core/workers/chunks/47d074136a7f8e551a9a.js +1 -0
  31. package/assets/esri/core/workers/chunks/{257910cca66dc5df465e.js → 4911ce62421a6c3320b0.js} +1 -1
  32. package/assets/esri/core/workers/chunks/4a1e23e021bac37a88ab.js +1 -0
  33. package/assets/esri/core/workers/chunks/4a6b92ecbb1f1c55cc43.js +1 -0
  34. package/assets/esri/core/workers/chunks/4debf2d9c3465250ef7a.js +1 -0
  35. package/assets/esri/core/workers/chunks/4e544de61f07ca660236.js +1 -0
  36. package/assets/esri/core/workers/chunks/4e8e322b469657ac22e2.js +1 -0
  37. package/assets/esri/core/workers/chunks/54b18559280a7d2a8d93.js +1 -0
  38. package/assets/esri/core/workers/chunks/567a65f4203f6e81f4b4.js +1 -0
  39. package/assets/esri/core/workers/chunks/5c7780f804d789cb37f5.js +1 -0
  40. package/assets/esri/core/workers/chunks/606ea251075fe81a1206.js +1 -0
  41. package/assets/esri/core/workers/chunks/{ceb680688fe7e570a774.js → 608be1172a908e92b9f1.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{6f358116f79021ff9687.js → 612104dff305ff062dfa.js} +2 -2
  43. package/assets/esri/core/workers/chunks/6299be5e7e26bf3c6859.js +1 -0
  44. package/assets/esri/core/workers/chunks/6400446b7615b97c3521.js +1 -0
  45. package/assets/esri/core/workers/chunks/6431480ba0fa8c8d487f.js +1 -0
  46. package/assets/esri/core/workers/chunks/68be3fb88ca61f82fb90.js +1 -0
  47. package/assets/esri/core/workers/chunks/6c9266120d46e8c69dbf.js +1 -0
  48. package/assets/esri/core/workers/chunks/6c9acd9e4e201dc380e9.js +1 -0
  49. package/assets/esri/core/workers/chunks/709e019885822b1f6f3e.js +1 -0
  50. package/assets/esri/core/workers/chunks/7449568eb2305bf2d650.js +1 -0
  51. package/assets/esri/core/workers/chunks/745a153d0cd34faa124e.js +1 -0
  52. package/assets/esri/core/workers/chunks/7572c2bc5062e66f6330.js +1 -0
  53. package/assets/esri/core/workers/chunks/78472a57c2ba146fec65.js +1 -0
  54. package/assets/esri/core/workers/chunks/7f0f9dddc44b1f1600f0.js +1 -0
  55. package/assets/esri/core/workers/chunks/{56a24061589f4a968818.js → 814751e705c05099f864.js} +1 -1
  56. package/assets/esri/core/workers/chunks/8293600f94553afc8c38.js +1 -0
  57. package/assets/esri/core/workers/chunks/836bb3673ab30fc66f1e.js +1 -0
  58. package/assets/esri/core/workers/chunks/8487727f1197cf7dbf50.js +1 -0
  59. package/assets/esri/core/workers/chunks/{4d3f97a48046021713a6.js → 88e54449261ef94e390d.js} +1 -1
  60. package/assets/esri/core/workers/chunks/8b0d5551978ab0aac0d1.js +1 -0
  61. package/assets/esri/core/workers/chunks/8bea0d706ede6f84f8aa.js +1 -0
  62. package/assets/esri/core/workers/chunks/8d0c2de92770a1567536.js +1 -0
  63. package/assets/esri/core/workers/chunks/900181f68449d8f82eeb.js +1 -0
  64. package/assets/esri/core/workers/chunks/939942b00ba380e2957e.js +1 -0
  65. package/assets/esri/core/workers/chunks/{c76c42c74eedd43263d3.js → 9dd1fc56eb1ea6eb705e.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{86a051e9fe71aa356108.js → 9e3e442a9874ed23a043.js} +1 -1
  67. package/assets/esri/core/workers/chunks/a40b6d8b5c73e06e14d4.js +1 -0
  68. package/assets/esri/core/workers/chunks/{1ba1f705b6ce5c8ea702.js → a655ebdb4bf0660615a2.js} +1 -1
  69. package/assets/esri/core/workers/chunks/aaba33611753c6aada68.js +1 -0
  70. package/assets/esri/core/workers/chunks/aeaaff7a4b1a99540f52.js +1 -0
  71. package/assets/esri/core/workers/chunks/af349c7bc8ef41a0e1bd.js +1 -0
  72. package/assets/esri/core/workers/chunks/{ecaac39dde7ec4213264.js → af75747b06d79446a855.js} +1 -1
  73. package/assets/esri/core/workers/chunks/b564ec4e03478f5659db.js +1 -0
  74. package/assets/esri/core/workers/chunks/bc0f54a2c15502b630ec.js +1 -0
  75. package/assets/esri/core/workers/chunks/c1c534e08fc21842670b.js +1 -0
  76. package/assets/esri/core/workers/chunks/{9ab25ee06041f907b9a2.js → c2c1f51a4668055c2838.js} +1 -1
  77. package/assets/esri/core/workers/chunks/c337fc0e6dc69c233e6d.js +1 -0
  78. package/assets/esri/core/workers/chunks/{a7985d20fa6e8d4878e7.js → d0f5bee9db1ad51ae687.js} +1 -1
  79. package/assets/esri/core/workers/chunks/d6ad4390df576198e45b.js +1 -0
  80. package/assets/esri/core/workers/chunks/dba280c370df13196711.js +1 -0
  81. package/assets/esri/core/workers/chunks/{c18189710d6198516175.js → de5ecb567bd69c613e9d.js} +1 -1
  82. package/assets/esri/core/workers/chunks/{534186fc921a0ccf58dc.js → e1f5d00878f27e1d413e.js} +1 -1
  83. package/assets/esri/core/workers/chunks/e65dfa19f030ec298437.js +1 -0
  84. package/assets/esri/core/workers/chunks/e932951598499befabf5.js +1 -0
  85. package/assets/esri/core/workers/chunks/f122c18af10e56f9ec2b.js +1 -0
  86. package/assets/esri/core/workers/chunks/f1df76f098a3cc924832.js +1 -0
  87. package/assets/esri/core/workers/chunks/f1f90adae13b04898008.js +1 -0
  88. package/assets/esri/core/workers/chunks/f4f9d08b2df856e3b694.js +1 -0
  89. package/assets/esri/core/workers/chunks/{711cfb84659cb4437679.js → f528ac5c648ca6a98582.js} +1 -1
  90. package/assets/esri/core/workers/chunks/f92364afaefbac7e8f77.js +1 -0
  91. package/assets/esri/core/workers/chunks/fc44227c1756f65b95df.js +1 -0
  92. package/assets/esri/core/workers/chunks/{72019baeba520edb6bb0.js → fc44d45598a7476bc606.js} +1 -1
  93. package/assets/esri/themes/base/_mixins.scss +2 -2
  94. package/assets/esri/themes/base/widgets/_Attribution.scss +1 -1
  95. package/assets/esri/themes/base/widgets/_BasemapLayerList.scss +2 -2
  96. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +5 -5
  97. package/assets/esri/themes/base/widgets/_Bookmarks.scss +1 -1
  98. package/assets/esri/themes/base/widgets/_BuildingLevelPicker.scss +2 -2
  99. package/assets/esri/themes/base/widgets/_BuildingPhasePicker.scss +5 -5
  100. package/assets/esri/themes/base/widgets/_CatalogLayerList.scss +1 -1
  101. package/assets/esri/themes/base/widgets/_Compass.scss +0 -2
  102. package/assets/esri/themes/base/widgets/_DirectionalPad.scss +4 -10
  103. package/assets/esri/themes/base/widgets/_Directions.scss +40 -40
  104. package/assets/esri/themes/base/widgets/_Editor.scss +7 -7
  105. package/assets/esri/themes/base/widgets/_Expand.scss +1 -1
  106. package/assets/esri/themes/base/widgets/_Feature.scss +1 -1
  107. package/assets/esri/themes/base/widgets/_FeatureForm.scss +6 -6
  108. package/assets/esri/themes/base/widgets/_FeatureFormUtilityNetworkAssociationLayers.scss +1 -1
  109. package/assets/esri/themes/base/widgets/_FeatureFormUtilityNetworkAssociationList.scss +1 -1
  110. package/assets/esri/themes/base/widgets/_FeatureFormUtilityNetworkAssociationSettings.scss +3 -3
  111. package/assets/esri/themes/base/widgets/_FeatureTable.scss +27 -27
  112. package/assets/esri/themes/base/widgets/_FeatureTemplates.scss +1 -1
  113. package/assets/esri/themes/base/widgets/_Features.scss +5 -5
  114. package/assets/esri/themes/base/widgets/_FilterBuilder.scss +1 -1
  115. package/assets/esri/themes/base/widgets/_FilterCondition.scss +1 -1
  116. package/assets/esri/themes/base/widgets/_Grid.scss +18 -18
  117. package/assets/esri/themes/base/widgets/_GridControls.scss +11 -11
  118. package/assets/esri/themes/base/widgets/_LayerList.scss +1 -1
  119. package/assets/esri/themes/base/widgets/_Legend.scss +5 -5
  120. package/assets/esri/themes/base/widgets/_NavigationToggle.scss +4 -1
  121. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +18 -19
  122. package/assets/esri/themes/base/widgets/_ResponsiveToolbar.scss +0 -2
  123. package/assets/esri/themes/base/widgets/_SearchResultRenderer.scss +1 -1
  124. package/assets/esri/themes/base/widgets/_SelectionList.scss +15 -15
  125. package/assets/esri/themes/base/widgets/_SelectionToolbar.scss +2 -2
  126. package/assets/esri/themes/base/widgets/_ShadowCast.scss +11 -11
  127. package/assets/esri/themes/base/widgets/_Sketch.scss +1 -1
  128. package/assets/esri/themes/base/widgets/_Slice.scss +3 -3
  129. package/assets/esri/themes/base/widgets/_SnappingControls.scss +1 -1
  130. package/assets/esri/themes/base/widgets/_TimeSlider.scss +5 -5
  131. package/assets/esri/themes/base/widgets/_TimeZoneLabel.scss +5 -4
  132. package/assets/esri/themes/base/widgets/_Tooltip.scss +14 -17
  133. package/assets/esri/themes/base/widgets/_UtilityNetworkAssociations.scss +2 -2
  134. package/assets/esri/themes/base/widgets/_UtilityNetworkTrace.scss +1 -1
  135. package/assets/esri/themes/base/widgets/_UtilityNetworkValidateTopology.scss +2 -2
  136. package/assets/esri/themes/base/widgets/_ValuePicker.scss +2 -2
  137. package/assets/esri/themes/base/widgets/_VideoPlayer.scss +5 -5
  138. package/assets/esri/themes/base/widgets/_Widget.scss +5 -1
  139. package/assets/esri/themes/dark/main.css +1 -1
  140. package/assets/esri/themes/light/main.css +1 -1
  141. package/assets/esri/themes/light/view.css +1 -1
  142. package/chunks/AtmosphereCompositing.glsl.js +1 -1
  143. package/chunks/ChapmanAtmosphere.glsl.js +3 -3
  144. package/chunks/CloudsComposition.glsl.js +1 -1
  145. package/chunks/Component.glsl.js +41 -41
  146. package/chunks/DefaultMaterial.glsl.js +2 -2
  147. package/chunks/EdgeShader.glsl.js +9 -9
  148. package/chunks/Fog.glsl.js +5 -5
  149. package/chunks/GaussianSplat.glsl.js +2 -2
  150. package/chunks/GlobalIllumination.glsl.js +9 -9
  151. package/chunks/HUDMaterial.glsl.js +13 -13
  152. package/chunks/Haze.glsl.js +6 -6
  153. package/chunks/HazeCompositing.glsl.js +1 -1
  154. package/chunks/LaserlinePath.glsl.js +6 -6
  155. package/chunks/LineCallout.glsl.js +1 -1
  156. package/chunks/LineMarker.glsl.js +5 -5
  157. package/chunks/NavigationDepth.glsl.js +2 -2
  158. package/chunks/Path.glsl.js +1 -1
  159. package/chunks/Pattern.glsl.js +26 -26
  160. package/chunks/Precipitation.glsl.js +7 -7
  161. package/chunks/RealisticTree.glsl.js +2 -2
  162. package/chunks/RibbonLine.glsl.js +60 -60
  163. package/chunks/ShadowCastAccumulate.glsl.js +1 -1
  164. package/chunks/ShadowHighlight.glsl.js +5 -5
  165. package/chunks/ShadowHighlightBuffer.glsl.js +1 -1
  166. package/chunks/SimpleAtmosphere.glsl.js +4 -4
  167. package/chunks/Terrain.glsl.js +29 -32
  168. package/chunks/Viewshed.glsl.js +2 -2
  169. package/chunks/Water.glsl.js +2 -2
  170. package/config.js +1 -1
  171. package/core/Loadable.js +1 -1
  172. package/form/elements/inputs/DynamicChoiceInput.d.ts +35 -5
  173. package/geometry/HeightModelInfo.js +1 -1
  174. package/geometry/support/meshUtils.d.ts +1 -1
  175. package/geometry/support/scaleUtils.js +1 -1
  176. package/kernel.js +1 -1
  177. package/layers/BaseDynamicLayer.d.ts +1 -0
  178. package/layers/BaseElevationLayer.d.ts +2 -0
  179. package/layers/BaseTileLayer.d.ts +12 -9
  180. package/layers/CSVLayer.d.ts +0 -15
  181. package/layers/FeatureLayer.d.ts +2 -15
  182. package/layers/GeoJSONLayer.d.ts +0 -52
  183. package/layers/GeoRSSLayer.d.ts +0 -44
  184. package/layers/ParquetLayer.d.ts +93 -12
  185. package/layers/ParquetLayer.js +1 -1
  186. package/layers/SketchLayer.d.ts +0 -1
  187. package/layers/VectorTileLayer.d.ts +2 -12
  188. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  189. package/layers/mixins/PortalLayer.js +1 -1
  190. package/layers/mixins/RefreshableLayer.d.ts +1 -3
  191. package/layers/mixins/ScaleRangeLayer.js +1 -1
  192. package/layers/mixins/SublayersOwner.js +1 -1
  193. package/layers/raster/datasets/GeospatialPDFRaster.js +1 -1
  194. package/layers/raster/datasets/TIFFRaster.js +1 -1
  195. package/layers/raster/formats/tiffParser.js +1 -1
  196. package/layers/support/ParquetPortalItemData.d.ts +2 -0
  197. package/layers/support/ParquetPortalItemData.js +1 -1
  198. package/layers/support/PortalItemData.d.ts +21 -0
  199. package/layers/support/PortalItemData.js +1 -1
  200. package/layers/support/Sublayer.js +1 -1
  201. package/layers/support/SubtypeSublayer.js +1 -1
  202. package/layers/support/layersLoader.js +1 -1
  203. package/layers/support/parquetUtils.d.ts +1 -1
  204. package/layers/support/types.d.ts +1 -1
  205. package/package.json +2 -2
  206. package/popup/FeaturesModel.d.ts +27 -6
  207. package/popup/FeaturesModel.js +1 -1
  208. package/portal/support/layersLoader.js +1 -1
  209. package/portal/support/portalLayers.js +1 -1
  210. package/rest/print.js +1 -1
  211. package/rest/support/printTaskUtils.js +1 -1
  212. package/symbols/cim/CIMSymbolHelper.js +1 -1
  213. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/hittestUtils.js +1 -1
  214. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  215. package/views/2d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles2D.js +1 -1
  216. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  217. package/views/2d/layers/LayerView2D.js +1 -1
  218. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  219. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  220. package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
  221. package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
  222. package/views/3d/analysis/ShadowCast/ShadowCastTooltip.js +1 -1
  223. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  224. package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
  225. package/views/3d/analysis/Viewshed/types.d.ts +3 -1
  226. package/views/3d/environment/Environment.d.ts +2 -2
  227. package/views/3d/environment/Environment.js +1 -1
  228. package/views/3d/environment/EnvironmentView.js +2 -0
  229. package/views/3d/interactive/editingTools/originGeometryVisualElementUtils.js +1 -1
  230. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  231. package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
  232. package/views/3d/layers/DynamicLayerView3D.js +1 -1
  233. package/views/3d/layers/FeatureLikeLayerViewBase3D.js +1 -1
  234. package/views/3d/layers/FlowSubView3D.js +1 -1
  235. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  236. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  237. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  238. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  239. package/views/3d/layers/MediaLayerView3D.js +1 -1
  240. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  241. package/views/3d/layers/RouteLayerView3D.js +1 -1
  242. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  243. package/views/3d/layers/SceneLayerView3D.js +1 -1
  244. package/views/3d/layers/TiledLayerView3D.js +1 -1
  245. package/views/3d/layers/VoxelLayerView3D.js +1 -1
  246. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  247. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  248. package/views/3d/layers/graphics/Graphics3DBufferGraphicLayer.js +2 -0
  249. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  250. package/views/3d/layers/graphics/Graphics3DDrapedBufferGraphicLayer.js +2 -0
  251. package/views/3d/layers/graphics/Graphics3DDrapedGraphicLayer.js +1 -1
  252. package/views/3d/layers/graphics/Graphics3DDrapedGraphicLayerBase.js +2 -0
  253. package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
  254. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  255. package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
  256. package/views/3d/layers/graphics/Graphics3DScaleVisibility.js +1 -1
  257. package/views/3d/layers/graphics/Graphics3DStageObjectGraphicLayer.js +2 -0
  258. package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
  259. package/views/3d/layers/graphics/LabelInfo.js +1 -1
  260. package/views/3d/layers/graphics/Labeler.js +1 -1
  261. package/views/3d/layers/graphics/elevationAlignmentUtils.js +1 -1
  262. package/views/3d/layers/graphics/pointUtils.js +1 -1
  263. package/views/3d/layers/support/FeatureTile.js +1 -1
  264. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  265. package/views/3d/layers/support/SampledGeometryMaxDistanceRatio.js +1 -1
  266. package/views/3d/support/popupHitTest.js +1 -1
  267. package/views/3d/terrain/OverlayManager.js +1 -1
  268. package/views/3d/terrain/OverlayRenderer.js +1 -1
  269. package/views/3d/webgl-engine/collections/Component/Material/Component.glsl.js +1 -1
  270. package/views/3d/webgl-engine/core/shaderLibrary/Laserline.glsl.js +5 -5
  271. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +13 -13
  272. package/views/3d/webgl-engine/core/shaderLibrary/bindUniforms.js +2 -0
  273. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +2 -2
  274. package/views/3d/webgl-engine/core/shaderLibrary/lastFrameUniforms.js +2 -0
  275. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js +7 -7
  276. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +29 -27
  277. package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +4 -4
  278. package/views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js +2 -2
  279. package/views/3d/webgl-engine/core/shaderLibrary/shading/MarkerSizing.glsl.js +14 -14
  280. package/views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js +1 -1
  281. package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceRayMarching.glsl.js +5 -5
  282. package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterColor.glsl.js +8 -8
  283. package/views/3d/webgl-engine/core/shaderLibrary/shading/evaluateSceneLightingFragment.glsl.js +1 -1
  284. package/views/3d/webgl-engine/core/shaderLibrary/shading/lightingUniforms.js +2 -0
  285. package/views/3d/webgl-engine/core/shaderLibrary/shading/pbrGlobals.glsl.js +1 -1
  286. package/views/3d/webgl-engine/core/shaderLibrary/shading/readShadow.glsl.js +6 -6
  287. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +1 -1
  288. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +3 -3
  289. package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
  290. package/views/3d/webgl-engine/core/shaderLibrary/util/cameraUniforms.js +1 -1
  291. package/views/3d/webgl-engine/effects/WeatherFader.js +1 -1
  292. package/views/3d/webgl-engine/effects/atmosphere/ChapmanApproximation.glsl.js +3 -3
  293. package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.glsl.js +1 -1
  294. package/views/3d/webgl-engine/effects/atmosphere/ChapmanRaymarching.glsl.js +1 -1
  295. package/views/3d/webgl-engine/effects/atmosphere/SimpleAtmosphere.glsl.js +1 -1
  296. package/views/3d/webgl-engine/effects/clouds/CloudsComposition.glsl.js +1 -1
  297. package/views/3d/webgl-engine/effects/clouds/CloudsComposition.js +1 -1
  298. package/views/3d/webgl-engine/effects/fog/Fog.glsl.js +1 -1
  299. package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
  300. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
  301. package/views/3d/webgl-engine/effects/glow/applyEmissiveGlow.glsl.js +5 -5
  302. package/views/3d/webgl-engine/effects/haze/Haze.glsl.js +1 -1
  303. package/views/3d/webgl-engine/effects/haze/HazeCompositing.glsl.js +1 -1
  304. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.glsl.js +1 -1
  305. package/views/3d/webgl-engine/effects/highlight/ShadowHighlightBuffer.glsl.js +1 -1
  306. package/views/3d/webgl-engine/effects/laserlines/LaserlinePath.glsl.js +1 -1
  307. package/views/3d/webgl-engine/effects/raymarching/DistanceFalloff.glsl.js +1 -1
  308. package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowCastAccumulate.glsl.js +1 -1
  309. package/views/3d/webgl-engine/lib/BufferGeometry.js +1 -1
  310. package/views/3d/webgl-engine/lib/BufferObject3D.js +1 -1
  311. package/views/3d/webgl-engine/lib/EmissionComposite.js +1 -1
  312. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  313. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  314. package/views/3d/webgl-engine/lib/affectsGeometry.js +1 -1
  315. package/views/3d/webgl-engine/lib/bufferGeometryUtils.js +2 -0
  316. package/views/3d/webgl-engine/lib/edgeRendering/AdjustProjectedPosition.glsl.js +5 -5
  317. package/views/3d/webgl-engine/lib/edgeRendering/EdgeShader.glsl.js +1 -1
  318. package/views/3d/webgl-engine/lib/edgeRendering/EdgeUtil.glsl.js +11 -11
  319. package/views/3d/webgl-engine/materials/Path.glsl.js +1 -1
  320. package/views/3d/webgl-engine/materials/Water.glsl.js +1 -1
  321. package/views/3d/webgl-engine/shaders/AtmosphereCompositing.glsl.js +1 -1
  322. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  323. package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
  324. package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
  325. package/views/3d/webgl-engine/shaders/LineCallout.glsl.js +1 -1
  326. package/views/3d/webgl-engine/shaders/Pattern.glsl.js +1 -1
  327. package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
  328. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  329. package/views/3d/webgl-engine/shaders/SphereDepthInterpolate.glsl.js +1 -1
  330. package/views/3d/webgl-engine/shaders/Terrain.glsl.js +1 -1
  331. package/views/3d/webgl-engine/shaders/Viewshed.glsl.js +1 -1
  332. package/views/3d/webgl-engine/shaders/lineUniforms.js +2 -0
  333. package/views/DOMContainer.d.ts +27 -9
  334. package/views/DOMContainer.js +1 -1
  335. package/views/PopupView.d.ts +6 -0
  336. package/views/SceneView.js +1 -1
  337. package/views/VideoView.d.ts +27 -9
  338. package/views/View.d.ts +16 -7
  339. package/views/View.js +1 -1
  340. package/views/View2D.d.ts +1 -1
  341. package/views/interactive/snapping/FeatureSnappingSourceInfo.js +1 -1
  342. package/views/interactive/snapping/SnappingManagerPool.js +1 -1
  343. package/views/interactive/snapping/SnappingOptions.d.ts +1 -1
  344. package/views/interactive/tooltip/components/ElevationModeSelect.js +1 -1
  345. package/views/interactive/tooltip/components/TooltipEditableField.js +1 -1
  346. package/views/layers/FeatureLikeLayerView.d.ts +1 -2
  347. package/views/layers/LayerView.js +1 -1
  348. package/views/layers/LineOfSightLayerView.d.ts +3 -4
  349. package/views/layers/ParquetLayerView.d.ts +15 -0
  350. package/views/layers/ParquetLayerView.js +1 -1
  351. package/views/layers/ViewshedLayerView.d.ts +5 -6
  352. package/views/support/layerViewUtils.js +1 -1
  353. package/webdoc/support/saveUtils.js +1 -1
  354. package/webdoc/support/unsupportedErrors.js +1 -1
  355. package/widgets/Editor.d.ts +10 -0
  356. package/widgets/FeatureForm.d.ts +2 -2
  357. package/widgets/Legend.d.ts +1 -0
  358. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  359. package/widgets/support/SnappingControls.d.ts +1 -1
  360. package/assets/esri/core/workers/chunks/00a600c71ceebe7bfeee.js +0 -1
  361. package/assets/esri/core/workers/chunks/00d24415bdeb0adae3df.js +0 -1
  362. package/assets/esri/core/workers/chunks/0193df3f9fb23633da87.js +0 -1
  363. package/assets/esri/core/workers/chunks/05963f57cbe5a5249496.js +0 -1
  364. package/assets/esri/core/workers/chunks/06e7400f5ebe0719b81c.js +0 -1
  365. package/assets/esri/core/workers/chunks/07aa6d36f1006b6ab7ff.js +0 -1
  366. package/assets/esri/core/workers/chunks/0b36abcbf03037b4073d.js +0 -1
  367. package/assets/esri/core/workers/chunks/122111703528381539cc.js +0 -1
  368. package/assets/esri/core/workers/chunks/1ef39aef6b33c530cbe4.js +0 -1
  369. package/assets/esri/core/workers/chunks/2164fcaced72b0fda31f.js +0 -1
  370. package/assets/esri/core/workers/chunks/25b0885d3bc190b28c04.js +0 -1
  371. package/assets/esri/core/workers/chunks/25d6c674b1c4829f040f.js +0 -1
  372. package/assets/esri/core/workers/chunks/25e6013e2c095629b236.js +0 -1
  373. package/assets/esri/core/workers/chunks/27da9ece2afaeec39f59.js +0 -1
  374. package/assets/esri/core/workers/chunks/2c90f7a6432cd716db8b.js +0 -1
  375. package/assets/esri/core/workers/chunks/2e6a2f4d686b71249c0e.js +0 -1
  376. package/assets/esri/core/workers/chunks/2f9033890c465acff698.js +0 -1
  377. package/assets/esri/core/workers/chunks/303fde8f3459dde16555.js +0 -1
  378. package/assets/esri/core/workers/chunks/347bf269c2b1583d2dca.js +0 -1
  379. package/assets/esri/core/workers/chunks/350540770781b281c39a.js +0 -1
  380. package/assets/esri/core/workers/chunks/3b017b718ea2d4ed498f.js +0 -1
  381. package/assets/esri/core/workers/chunks/43fc42405167a5537039.js +0 -1
  382. package/assets/esri/core/workers/chunks/4cddd217383b9333f32e.js +0 -1
  383. package/assets/esri/core/workers/chunks/4d82db661365daa513a6.js +0 -1
  384. package/assets/esri/core/workers/chunks/4fa59f8ed3b7b6239548.js +0 -1
  385. package/assets/esri/core/workers/chunks/518e8883b6ed613bf451.js +0 -1
  386. package/assets/esri/core/workers/chunks/5e4d6c283c2fa28db022.js +0 -1
  387. package/assets/esri/core/workers/chunks/5ea8809b6519c05ad9f6.js +0 -1
  388. package/assets/esri/core/workers/chunks/604344e45c0f27497188.js +0 -1
  389. package/assets/esri/core/workers/chunks/633a9051580c5302d2f7.js +0 -1
  390. package/assets/esri/core/workers/chunks/6469c0d18d3663e7da4b.js +0 -1
  391. package/assets/esri/core/workers/chunks/64770e2cf41211b63fd2.js +0 -1
  392. package/assets/esri/core/workers/chunks/669e39c3437d7273f0c7.js +0 -1
  393. package/assets/esri/core/workers/chunks/7038ead1fa1674416ab3.js +0 -1
  394. package/assets/esri/core/workers/chunks/7165d6f6a5078768bebb.js +0 -1
  395. package/assets/esri/core/workers/chunks/71f739bb3f7350704af6.js +0 -1
  396. package/assets/esri/core/workers/chunks/798a63653f82c0e842c5.js +0 -1
  397. package/assets/esri/core/workers/chunks/8313c626596a76c7449d.js +0 -1
  398. package/assets/esri/core/workers/chunks/841f67baf6a1634ada48.js +0 -1
  399. package/assets/esri/core/workers/chunks/84e9258a57d8c365f361.js +0 -1
  400. package/assets/esri/core/workers/chunks/84fcbf7a1d04f01685d1.js +0 -1
  401. package/assets/esri/core/workers/chunks/87b4e916b2668203a6b0.js +0 -1
  402. package/assets/esri/core/workers/chunks/8e511079918e2fd9261f.js +0 -1
  403. package/assets/esri/core/workers/chunks/8fcfd515ee1b18c902e5.js +0 -1
  404. package/assets/esri/core/workers/chunks/9001e9a1e81bce175ddd.js +0 -1
  405. package/assets/esri/core/workers/chunks/95b82cbbe355266c65d7.js +0 -1
  406. package/assets/esri/core/workers/chunks/9673a9efec86040b8c13.js +0 -1
  407. package/assets/esri/core/workers/chunks/97dbbedea9fe03bd1306.js +0 -1
  408. package/assets/esri/core/workers/chunks/9a7fc93cc693fd12b5d8.js +0 -1
  409. package/assets/esri/core/workers/chunks/9c0fd8baa00ee9733ba4.js +0 -1
  410. package/assets/esri/core/workers/chunks/a010d2e4e34eb7bc1fec.js +0 -1
  411. package/assets/esri/core/workers/chunks/a20526996d01386ec3b7.js +0 -1
  412. package/assets/esri/core/workers/chunks/a7edf7541569fef77cb3.js +0 -1
  413. package/assets/esri/core/workers/chunks/ac4cc49104d26c384e98.js +0 -1
  414. package/assets/esri/core/workers/chunks/b05a41a60e30935644be.js +0 -1
  415. package/assets/esri/core/workers/chunks/b1008bdfca995ebf98ed.js +0 -1
  416. package/assets/esri/core/workers/chunks/bfd85e8d54062a590f0e.js +0 -1
  417. package/assets/esri/core/workers/chunks/d21257d2e2a37266c0f7.js +0 -1
  418. package/assets/esri/core/workers/chunks/d270cc9807161033686e.js +0 -1
  419. package/assets/esri/core/workers/chunks/d4926545193414cf2f16.js +0 -1
  420. package/assets/esri/core/workers/chunks/da18d96b35af20e73b3b.js +0 -1
  421. package/assets/esri/core/workers/chunks/df0481bcc1613ee4b7af.js +0 -1
  422. package/assets/esri/core/workers/chunks/ec28e18275d36e71b438.js +0 -1
  423. package/assets/esri/core/workers/chunks/ec9a2425b4a498054a19.js +0 -1
  424. package/assets/esri/core/workers/chunks/f05de08e194a3f9b96f2.js +0 -1
  425. package/assets/esri/core/workers/chunks/f0a68d2900d24f56afa0.js +0 -1
  426. package/assets/esri/core/workers/chunks/f762f70e7d39634ce797.js +0 -1
  427. package/assets/esri/core/workers/chunks/fb4ff0ac2bc445fec413.js +0 -1
  428. package/assets/esri/core/workers/chunks/fd0254c6fc6c03ec11ba.js +0 -1
  429. package/assets/esri/core/workers/chunks/fd0a5c243f3426f2a0b5.js +0 -1
  430. package/views/3d/environment/EnvironmentManager.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{byId as t,reparent as n}from"../core/domUtils.js";import{on as r}from"../core/events.js";import{makeHandle as i}from"../core/handleUtils.js";import a from"../core/Logger.js";import{destroyMaybe as o,removeMaybe as s}from"../core/maybe.js";import{watch as c,initial as l,syncAndInitial as u}from"../core/reactiveUtils.js";import{addFrameTask as d}from"../core/scheduling.js";import{property as f,subclass as p}from"../core/accessorSupport/decorators.js";import{Attribution as m}from"./Attribution.js";import h from"./overlay/FocusRegionOverlayItem.js";import g from"./overlay/ViewOverlay.js";const _=[0,0];function v(e){let t=(e.ownerDocument||window.document).defaultView,n=e.getBoundingClientRect();return _[0]=n.left+(t?.pageXOffset??0),_[1]=n.top+(t?.pageYOffset??0),_}function y(e){e&&(e.textContent=``,e.parentNode&&e.parentNode.removeChild(e))}const b=process.env.NODE_ENV===`test`,x=b?0:16,S=b?0:750,C=b?0:512,w={left:0,top:0,right:0,bottom:0},T={toggle:`KeyO`,resizeLarger:`ArrowUp`,resizeSmaller:`ArrowDown`,select:new Set([`Enter`,`Space`])},E=_=>{let b=_,E=class extends b{constructor(...e){super(...e),this._freqInfo={freq:x,time:S},this._overlayRenderTaskHandle=null,this._focusRegionOverlayItem=new h,this.aria={},this.attributionMode=null,this.height=0,this.focusRegionEnabled=!1,this.messagesCommon=null,this.overlay=null,this.position=null,this.resizing=!1,this.root=null,this.surface=null,this.suspended=!0,this.userContent=null,this.width=0,this.widthBreakpoint=null,this.addHandles([c(()=>[this.focusRegionEnabled,this.overlay,this.ready],()=>this._syncFocusRegionOverlayItemVisibility(this.focusRegionEnabled&&this.ready),{initial:!0}),c(()=>this.cursor,e=>{let{surface:t}=this;t&&t.setAttribute(`data-cursor`,e)}),c(()=>this.navigating,e=>{let{surface:t}=this;t&&t.setAttribute(`data-navigating`,e.toString())}),c(()=>[this.aria,this.surface],()=>this._updateAria(),{initial:!0}),c(()=>{let{left:e,top:t,right:n,bottom:r}=this.padding??w;return[this.width,this.height,e,t,n,r]},([e,t,n,r,i,a])=>{let{_focusRegionOverlayItem:o}=this;o.backgroundHeight=t,o.backgroundWidth=e,o.padding={left:n,top:r,right:i,bottom:a},o.updateBoxSize()})])}initialize(){let e=this;this.addHandles([c(()=>this.ui,(e,t)=>this._handleUIChange(e,t),l),e.on(`focus`,()=>this.notifyChange(`focused`)),e.on(`blur`,()=>this.notifyChange(`focused`)),e.on(`key-down`,t=>{let{shiftKey:n,altKey:r,code:i,defaultPrevented:a}=t.native,{toggle:o,resizeLarger:s,resizeSmaller:c,select:l}=T,u=this.focusRegionEnabled&&n&&r&&(i===s||i===c);if(!t.repeat||u){if(!a&&n&&r&&i===o)this._toggleFocusRegion(),t.preventDefault();else if(!a&&u){let{_focusRegionOverlayItem:e}=this;e.resizeBoxSize(i===s?50:-50),t.preventDefault(),t.native.stopPropagation(),t.stopPropagation()}else!a&&this.focusRegionEnabled&&l.has(i)&&this._selectFocusRegion(t,e)}})])}destroy(){this.destroyed||(this.focusRegionEnabled=!1,this._syncFocusRegionOverlayItemVisibility(!1),this.ui?.destroy(),this.container=null)}get attributionHeight(){return this._attribution?.height??0}get container(){return this._get(`container`)??null}set container(e){let r=this._get(`container`),i=t(e);if(!i&&typeof e==`string`&&a.getLogger(this).error(`#container`,`element with id '${e}' not found`),r===i)return;if(this._stopMeasuring(),this.removeHandles(`container`),r&&(r.classList.remove(`esri-view`),this._overlayRenderTaskHandle&&=(this._overlayRenderTaskHandle.remove(),null),this.overlay&&(this.overlay.destroy(),this._set(`overlay`,null)),this._attribution=o(this._attribution),this.root&&(y(this.root),this._set(`root`,null)),this.userContent&&(n(this.userContent,r),y(this.userContent),this._set(`userContent`,null))),!i){this._set(`width`,0),this._set(`height`,0),this._set(`position`,null),this._set(`suspended`,!0),this._set(`surface`,null),this._set(`container`,null);return}i.classList.add(`esri-view`);let f=document.createElement(`div`);f.className=`esri-view-user-storage`,n(i,f),i.appendChild(f),this._set(`userContent`,f);let p=document.createElement(`div`);p.className=`esri-view-root`,i.insertBefore(p,i.firstChild),this._set(`root`,p);let h=document.createElement(`div`);h.className=`esri-view-surface`,h.setAttribute(`role`,`application`),h.tabIndex=0,p.appendChild(h),this._set(`surface`,h);let _=new g;p.appendChild(_.surface),this._set(`overlay`,_),this._syncFocusRegionOverlayItemVisibility(!1),this.addHandles(c(()=>_.needsRender,e=>{this._overlayRenderTaskHandle=e&&!this._overlayRenderTaskHandle?d({render:()=>this.overlay?.render()}):s(this._overlayRenderTaskHandle)},l),`container`),this.addHandles([c(()=>({visible:this.attributionVisible,items:this.attributionItems,mode:this.attributionMode}),({visible:e,items:t,mode:n})=>{e?(this._attribution||=new m({attributionItems:this.attributionItems,mode:this.attributionMode}),this._attribution.appendBefore(p,this.ui?.container??null),this._attribution.attributionItems=t,this._attribution.mode=n):this._attribution=o(this._attribution)},u)],`container`),this.forceDOMReadyCycle(),this._set(`container`,i),this._startMeasuring()}get focused(){let e=document.activeElement===this.surface;return document.hasFocus()&&e}get focusRegion(){return this.focusRegionEnabled?this._focusRegionOverlayItem.getScreenRect():null}get size(){return[this.width,this.height]}get ui(){return this._get(`ui`)}set ui(e){let t=this._get(`ui`);t!==e&&t?.destroy(),this._set(`ui`,e)}blur(){this.surface?.blur()}focus(){this.surface?.focus()}pageToContainer(e,t,n){let r=this.position;return e-=r?r[0]:0,t-=r?r[1]:0,n?(n[0]=e,n[1]=t):n=[e,t],n}containerToPage(e,t,n){let r=this.position;return e+=r?r[0]:0,t+=r?r[1]:0,n?(n[0]=e,n[1]=t):n=[e,t],n}_updateAria(){let{surface:e,aria:t}=this;e&&(e.ariaLabelledByElements=t?.labelledByElements??null,e.ariaDescribedByElements=t?.describedByElements??null,e.ariaLabel=t?.label??null,e.ariaDescription=t?.description??null)}_selectFocusRegion(e,t){let n=this._makeFocusRegionSelectEvent(e);t.emit(`focus-region-select`,n),e.preventDefault()}_makeFocusRegionSelectEvent(e){let t={type:`focus-region-select`,native:e.native,defaultPrevented:!1,preventDefault:()=>{t.defaultPrevented=!0},stopPropagation:()=>{e.stopPropagation()}};return t}_toggleFocusRegion(){this.focusRegionEnabled=!this.focusRegionEnabled}_updateFocusRegionOverlayItem(){let{_focusRegionOverlayItem:e}=this;e.backgroundHeight=this.height,e.backgroundWidth=this.width,e.padding=this.padding??w,e.updateBoxSize()}_syncFocusRegionOverlayItemVisibility(e){let{_focusRegionOverlayItem:t,overlay:n}=this,r=e;t.visible=r,n&&(n.removeItem(t),r&&(this._updateFocusRegionOverlayItem(),n.addItem(t)))}_handleUIChange(e,t){this.removeHandles(`ui`),t&&t!==e&&t.destroy(),e&&(e.view=this,this.addHandles(c(()=>this.root,t=>{if(!t)e.container=null;else{let n=document.createElement(`div`);t.insertBefore(n,this._attribution?.surface??null),e.container=n}},l),`ui`)),this._set(`ui`,e)}_stopMeasuring(){this.removeHandles(`measuring`),this._get(`resizing`)&&this._set(`resizing`,!1)}_startMeasuring(){let e=this._freqInfo;e.freq=x,e.time=S;let t=d({prepare:e=>{let n=this._measure(),r=this._freqInfo;r.time+=e.deltaTime,n&&(r.freq=x,this._get(`resizing`)||this._set(`resizing`,!0)),!(r.time<r.freq)&&(r.time=0,r.freq=this._position()||n?x:Math.min(S,r.freq*2),!n&&r.freq>=C&&(t.pause(),this._get(`resizing`)&&this._set(`resizing`,!1)))}}),n=new ResizeObserver(n=>{e.freq=x,e.time=S,t.resume()});this.container!=null&&n.observe(this.container);let a=i(()=>n.disconnect());this.addHandles([r(window,`resize`,()=>{e.freq=x,e.time=S,t.resume()}),a,t],`measuring`),this._measure(),this._position()}_measure(){let e=this.container,t=e?e.clientWidth:0,n=e?e.clientHeight:0;if(t===0||n===0)return this.suspended||this._set(`suspended`,!0),!1;let r=this.width,i=this.height;return t===r&&n===i?(this.suspended&&this._set(`suspended`,!1),!1):(this._set(`width`,t),this._set(`height`,n),this.suspended&&this._set(`suspended`,!1),this.emit(`resize`,{oldWidth:r,oldHeight:i,width:t,height:n}),!0)}_position(){let e=this.container,t=this.position,n=e&&v(e);return n&&(!t||n[0]!==t[0]||n[1]!==t[1])?(this._set(`position`,[n[0],n[1]]),!0):!1}forceDOMReadyCycle(){}};return e([f()],E.prototype,`_attribution`,void 0),e([f()],E.prototype,`aria`,void 0),e([f()],E.prototype,`attributionHeight`,null),e([f()],E.prototype,`attributionMode`,void 0),e([f()],E.prototype,`container`,null),e([f({readOnly:!0})],E.prototype,`focused`,null),e([f({readOnly:!0})],E.prototype,`height`,void 0),e([f()],E.prototype,`focusRegionEnabled`,void 0),e([f()],E.prototype,`focusRegion`,null),e([f()],E.prototype,`messagesCommon`,void 0),e([f({type:g})],E.prototype,`overlay`,void 0),e([f({readOnly:!0})],E.prototype,`position`,void 0),e([f({readOnly:!0})],E.prototype,`resizing`,void 0),e([f({readOnly:!0})],E.prototype,`root`,void 0),e([f({value:null,readOnly:!0})],E.prototype,`size`,null),e([f({readOnly:!0})],E.prototype,`surface`,void 0),e([f({readOnly:!0})],E.prototype,`suspended`,void 0),e([f({nonNullable:!0})],E.prototype,`ui`,null),e([f({readOnly:!0})],E.prototype,`userContent`,void 0),e([f({readOnly:!0})],E.prototype,`width`,void 0),e([f()],E.prototype,`widthBreakpoint`,void 0),E=e([p(`esri.views.DOMContainer`)],E),E};export{E as DOMContainer};
2
+ import{__decorate as e}from"tslib";import{byId as t,reparent as n}from"../core/domUtils.js";import{on as r}from"../core/events.js";import{makeHandle as i}from"../core/handleUtils.js";import a from"../core/Logger.js";import{destroyMaybe as o,removeMaybe as s}from"../core/maybe.js";import{watch as c,initial as l,syncAndInitial as u}from"../core/reactiveUtils.js";import{addFrameTask as d}from"../core/scheduling.js";import{property as f,subclass as p}from"../core/accessorSupport/decorators.js";import{Attribution as m}from"./Attribution.js";import h from"./overlay/FocusRegionOverlayItem.js";import g from"./overlay/ViewOverlay.js";const _=[0,0];function v(e){let t=(e.ownerDocument||window.document).defaultView,n=e.getBoundingClientRect();return _[0]=n.left+(t?.pageXOffset??0),_[1]=n.top+(t?.pageYOffset??0),_}function y(e){e&&(e.textContent=``,e.parentNode&&e.parentNode.removeChild(e))}const b=process.env.NODE_ENV===`test`,x=b?0:16,S=b?0:750,C=b?0:512,w={left:0,top:0,right:0,bottom:0},T={toggle:`KeyO`,resizeLarger:`ArrowUp`,resizeSmaller:`ArrowDown`,select:new Set([`Enter`,`Space`])},E=_=>{let b=_,E=class extends b{constructor(...e){super(...e),this._freqInfo={freq:x,time:S},this._overlayRenderTaskHandle=null,this._focusRegionOverlayItem=new h,this.aria={},this.attributionMode=null,this.height=0,this.focusRegionVisible=!1,this.focusRegionShortcutEnabled=!1,this.messagesCommon=null,this.overlay=null,this.position=null,this.resizing=!1,this.root=null,this.surface=null,this.suspended=!0,this.userContent=null,this.width=0,this.widthBreakpoint=null,this.addHandles([c(()=>[this.focusRegionVisible,this.overlay,this.ready],()=>this._syncFocusRegionOverlayItemVisibility(this.focusRegionVisible&&this.ready),{initial:!0}),c(()=>this.cursor,e=>{let{surface:t}=this;t&&t.setAttribute(`data-cursor`,e)}),c(()=>this.navigating,e=>{let{surface:t}=this;t&&t.setAttribute(`data-navigating`,e.toString())}),c(()=>[this.aria,this.surface],()=>this._updateAria(),{initial:!0}),c(()=>{let{left:e,top:t,right:n,bottom:r}=this.padding??w;return[this.width,this.height,e,t,n,r]},([e,t,n,r,i,a])=>{let{_focusRegionOverlayItem:o}=this;o.backgroundHeight=t,o.backgroundWidth=e,o.padding={left:n,top:r,right:i,bottom:a},o.updateBoxSize()})])}initialize(){let e=this;this.addHandles([c(()=>this.ui,(e,t)=>this._handleUIChange(e,t),l),e.on(`focus`,()=>this.notifyChange(`focused`)),e.on(`blur`,()=>this.notifyChange(`focused`)),e.on(`key-down`,t=>{let{shiftKey:n,altKey:r,code:i,defaultPrevented:a}=t.native,{toggle:o,resizeLarger:s,resizeSmaller:c,select:l}=T,u=this.focusRegionVisible&&n&&r&&(i===s||i===c);if(!t.repeat||u){if(!a&&n&&r&&i===o&&this.focusRegionShortcutEnabled)this._toggleFocusRegion(),t.preventDefault();else if(!a&&u){let{_focusRegionOverlayItem:e}=this;e.resizeBoxSize(i===s?50:-50),t.preventDefault(),t.native.stopPropagation(),t.stopPropagation()}else!a&&this.focusRegionVisible&&l.has(i)&&this._selectFocusRegion(t,e)}})])}destroy(){this.destroyed||(this.focusRegionVisible=!1,this._syncFocusRegionOverlayItemVisibility(!1),this.ui?.destroy(),this.container=null)}get attributionHeight(){return this._attribution?.height??0}get container(){return this._get(`container`)??null}set container(e){let r=this._get(`container`),i=t(e);if(!i&&typeof e==`string`&&a.getLogger(this).error(`#container`,`element with id '${e}' not found`),r===i)return;if(this._stopMeasuring(),this.removeHandles(`container`),r&&(r.classList.remove(`esri-view`),this._overlayRenderTaskHandle&&=(this._overlayRenderTaskHandle.remove(),null),this.overlay&&(this.overlay.destroy(),this._set(`overlay`,null)),this._attribution=o(this._attribution),this.root&&(y(this.root),this._set(`root`,null)),this.userContent&&(n(this.userContent,r),y(this.userContent),this._set(`userContent`,null))),!i){this._set(`width`,0),this._set(`height`,0),this._set(`position`,null),this._set(`suspended`,!0),this._set(`surface`,null),this._set(`container`,null);return}i.classList.add(`esri-view`);let f=document.createElement(`div`);f.className=`esri-view-user-storage`,n(i,f),i.appendChild(f),this._set(`userContent`,f);let p=document.createElement(`div`);p.className=`esri-view-root`,i.insertBefore(p,i.firstChild),this._set(`root`,p);let h=document.createElement(`div`);h.className=`esri-view-surface`,h.setAttribute(`role`,`application`),h.tabIndex=0,p.appendChild(h),this._set(`surface`,h);let _=new g;p.appendChild(_.surface),this._set(`overlay`,_),this._syncFocusRegionOverlayItemVisibility(!1),this.addHandles(c(()=>_.needsRender,e=>{this._overlayRenderTaskHandle=e&&!this._overlayRenderTaskHandle?d({render:()=>this.overlay?.render()}):s(this._overlayRenderTaskHandle)},l),`container`),this.addHandles([c(()=>({visible:this.attributionVisible,items:this.attributionItems,mode:this.attributionMode}),({visible:e,items:t,mode:n})=>{e?(this._attribution||=new m({attributionItems:this.attributionItems,mode:this.attributionMode}),this._attribution.appendBefore(p,this.ui?.container??null),this._attribution.attributionItems=t,this._attribution.mode=n):this._attribution=o(this._attribution)},u)],`container`),this.forceDOMReadyCycle(),this._set(`container`,i),this._startMeasuring()}get focused(){let e=document.activeElement===this.surface;return document.hasFocus()&&e}get focusRegion(){return this.focusRegionVisible?this._focusRegionOverlayItem.getScreenRect():null}get size(){return[this.width,this.height]}get ui(){return this._get(`ui`)}set ui(e){let t=this._get(`ui`);t!==e&&t?.destroy(),this._set(`ui`,e)}blur(){this.surface?.blur()}focus(){this.surface?.focus()}pageToContainer(e,t,n){let r=this.position;return e-=r?r[0]:0,t-=r?r[1]:0,n?(n[0]=e,n[1]=t):n=[e,t],n}containerToPage(e,t,n){let r=this.position;return e+=r?r[0]:0,t+=r?r[1]:0,n?(n[0]=e,n[1]=t):n=[e,t],n}_updateAria(){let{surface:e,aria:t}=this;e&&(e.ariaLabelledByElements=t?.labelledByElements??null,e.ariaDescribedByElements=t?.describedByElements??null,e.ariaLabel=t?.label??null,e.ariaDescription=t?.description??null)}_selectFocusRegion(e,t){let n=this._makeFocusRegionSelectEvent(e);t.emit(`focus-region-select`,n),e.preventDefault()}_makeFocusRegionSelectEvent(e){let t={type:`focus-region-select`,native:e.native,defaultPrevented:!1,preventDefault:()=>{t.defaultPrevented=!0},stopPropagation:()=>{e.stopPropagation()}};return t}_toggleFocusRegion(){this.focusRegionVisible=!this.focusRegionVisible}_updateFocusRegionOverlayItem(){let{_focusRegionOverlayItem:e}=this;e.backgroundHeight=this.height,e.backgroundWidth=this.width,e.padding=this.padding??w,e.updateBoxSize()}_syncFocusRegionOverlayItemVisibility(e){let{_focusRegionOverlayItem:t,overlay:n}=this,r=e;t.visible=r,n&&(n.removeItem(t),r&&(this._updateFocusRegionOverlayItem(),n.addItem(t)))}_handleUIChange(e,t){this.removeHandles(`ui`),t&&t!==e&&t.destroy(),e&&(e.view=this,this.addHandles(c(()=>this.root,t=>{if(!t)e.container=null;else{let n=document.createElement(`div`);t.insertBefore(n,this._attribution?.surface??null),e.container=n}},l),`ui`)),this._set(`ui`,e)}_stopMeasuring(){this.removeHandles(`measuring`),this._get(`resizing`)&&this._set(`resizing`,!1)}_startMeasuring(){let e=this._freqInfo;e.freq=x,e.time=S;let t=d({prepare:e=>{let n=this._measure(),r=this._freqInfo;r.time+=e.deltaTime,n&&(r.freq=x,this._get(`resizing`)||this._set(`resizing`,!0)),!(r.time<r.freq)&&(r.time=0,r.freq=this._position()||n?x:Math.min(S,r.freq*2),!n&&r.freq>=C&&(t.pause(),this._get(`resizing`)&&this._set(`resizing`,!1)))}}),n=new ResizeObserver(n=>{e.freq=x,e.time=S,t.resume()});this.container!=null&&n.observe(this.container);let a=i(()=>n.disconnect());this.addHandles([r(window,`resize`,()=>{e.freq=x,e.time=S,t.resume()}),a,t],`measuring`),this._measure(),this._position()}_measure(){let e=this.container,t=e?e.clientWidth:0,n=e?e.clientHeight:0;if(t===0||n===0)return this.suspended||this._set(`suspended`,!0),!1;let r=this.width,i=this.height;return t===r&&n===i?(this.suspended&&this._set(`suspended`,!1),!1):(this._set(`width`,t),this._set(`height`,n),this.suspended&&this._set(`suspended`,!1),this.emit(`resize`,{oldWidth:r,oldHeight:i,width:t,height:n}),!0)}_position(){let e=this.container,t=this.position,n=e&&v(e);return n&&(!t||n[0]!==t[0]||n[1]!==t[1])?(this._set(`position`,[n[0],n[1]]),!0):!1}forceDOMReadyCycle(){}};return e([f()],E.prototype,`_attribution`,void 0),e([f()],E.prototype,`aria`,void 0),e([f()],E.prototype,`attributionHeight`,null),e([f()],E.prototype,`attributionMode`,void 0),e([f()],E.prototype,`container`,null),e([f({readOnly:!0})],E.prototype,`focused`,null),e([f({readOnly:!0})],E.prototype,`height`,void 0),e([f()],E.prototype,`focusRegionVisible`,void 0),e([f()],E.prototype,`focusRegionShortcutEnabled`,void 0),e([f()],E.prototype,`focusRegion`,null),e([f()],E.prototype,`messagesCommon`,void 0),e([f({type:g})],E.prototype,`overlay`,void 0),e([f({readOnly:!0})],E.prototype,`position`,void 0),e([f({readOnly:!0})],E.prototype,`resizing`,void 0),e([f({readOnly:!0})],E.prototype,`root`,void 0),e([f({value:null,readOnly:!0})],E.prototype,`size`,null),e([f({readOnly:!0})],E.prototype,`surface`,void 0),e([f({readOnly:!0})],E.prototype,`suspended`,void 0),e([f({nonNullable:!0})],E.prototype,`ui`,null),e([f({readOnly:!0})],E.prototype,`userContent`,void 0),e([f({readOnly:!0})],E.prototype,`width`,void 0),e([f()],E.prototype,`widthBreakpoint`,void 0),E=e([p(`esri.views.DOMContainer`)],E),E};export{E as DOMContainer};
@@ -17,6 +17,7 @@ export interface PopupViewProperties extends Partial<Pick<PopupView, "popupEnabl
17
17
  * when the user clicks on the view and [popupEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/PopupView/#popupEnabled) is `true`, when the [openPopup](https://developers.arcgis.com/javascript/latest/references/core/views/PopupView/#openPopup) method is called,
18
18
  * or when some widgets need the popup, such as [Search](https://developers.arcgis.com/javascript/latest/references/core/widgets/Search/). If [popup](https://developers.arcgis.com/javascript/latest/references/core/views/PopupView/#popup) is `null`, the popup instance will not be created.
19
19
  *
20
+ * @deprecated since version 5.2. Use the `popupElement` on the [Map](/references/map-components/components/arcgis-map/#popupElement), [Scene](/references/map-components/components/arcgis-scene/#popupElement), or [Link Chart](/references/map-components/components/arcgis-link-chart/#popupElement) components instead.
20
21
  * @see [popupEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/PopupView/#popupEnabled)
21
22
  * @see [openPopup()](https://developers.arcgis.com/javascript/latest/references/core/views/PopupView/#openPopup)
22
23
  * @see [Loading the Popup](https://developers.arcgis.com/javascript/latest/references/core/widgets/Popup/#loading-the-popup)
@@ -57,6 +58,7 @@ export abstract class PopupView {
57
58
  * when the user clicks on the view and [popupEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/PopupView/#popupEnabled) is `true`, when the [openPopup](https://developers.arcgis.com/javascript/latest/references/core/views/PopupView/#openPopup) method is called,
58
59
  * or when some widgets need the popup, such as [Search](https://developers.arcgis.com/javascript/latest/references/core/widgets/Search/). If [popup](https://developers.arcgis.com/javascript/latest/references/core/views/PopupView/#popup) is `null`, the popup instance will not be created.
59
60
  *
61
+ * @deprecated since version 5.2. Use the `popupElement` on the [Map](/references/map-components/components/arcgis-map/#popupElement), [Scene](/references/map-components/components/arcgis-scene/#popupElement), or [Link Chart](/references/map-components/components/arcgis-link-chart/#popupElement) components instead.
60
62
  * @see [popupEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/PopupView/#popupEnabled)
61
63
  * @see [openPopup()](https://developers.arcgis.com/javascript/latest/references/core/views/PopupView/#openPopup)
62
64
  * @see [Loading the Popup](https://developers.arcgis.com/javascript/latest/references/core/widgets/Popup/#loading-the-popup)
@@ -79,6 +81,7 @@ export abstract class PopupView {
79
81
  * view.popup = null;
80
82
  */
81
83
  get popup(): Popup | null | undefined;
84
+ /** @deprecated */
82
85
  set popup(value: Popup | PopupProperties | null | undefined);
83
86
  /**
84
87
  * Controls whether the popup opens when users click on the view.
@@ -90,6 +93,7 @@ export abstract class PopupView {
90
93
  * When `false`, the click event is ignored and [popup](https://developers.arcgis.com/javascript/latest/references/core/views/PopupView/#popup) is not created for features but will open for other
91
94
  * scenarios that use a popup, such as displaying Search results.
92
95
  *
96
+ * @deprecated since version 5.2. Use the `popupDisabled` property on the [Map](/references/map-components/components/arcgis-map/#popupDisabled), [Scene](/references/map-components/components/arcgis-scene/#popupDisabled), or [Link Chart](/references/map-components/components/arcgis-link-chart/#popupDisabled) components instead.
93
97
  * @default true
94
98
  * @since 4.27
95
99
  * @see [popup](https://developers.arcgis.com/javascript/latest/references/core/views/PopupView/#popup)
@@ -109,6 +113,7 @@ export abstract class PopupView {
109
113
  /**
110
114
  * Closes the popup.
111
115
  *
116
+ * @deprecated since version 5.2. Use the `closePopup()` method on the [Map](/references/map-components/components/arcgis-map/#closePopup), [Scene](/references/map-components/components/arcgis-scene/#closePopup), or [Link Chart](/references/map-components/components/arcgis-link-chart/#closePopup) components instead.
112
117
  * @since 4.27
113
118
  * @see [popup](https://developers.arcgis.com/javascript/latest/references/core/views/PopupView/#popup)
114
119
  * @see [openPopup()](https://developers.arcgis.com/javascript/latest/references/core/views/PopupView/#openPopup)
@@ -201,6 +206,7 @@ export abstract class PopupView {
201
206
  * > the view's size constraints in [dockOptions](https://developers.arcgis.com/javascript/latest/references/core/widgets/Popup/#dockOptions) are met or the [location](https://developers.arcgis.com/javascript/latest/references/core/widgets/Popup/#location)
202
207
  * > property is set to a geometry.
203
208
  *
209
+ * @deprecated since version 5.2. Use the `openPopup()` method on the [Map](/references/map-components/components/arcgis-map/#openPopup), [Scene](/references/map-components/components/arcgis-scene/#openPopup), or [Link Chart](/references/map-components/components/arcgis-link-chart/#openPopup) components instead.
204
210
  * @param options - Defines the location and content of the popup when opened.
205
211
  * @returns Resolves when the popup is opened. Calling `openPopup()` or `closePopup()` again rejects the Promise.
206
212
  * @since 4.27
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../Camera.js";import n from"../Viewpoint.js";import r from"../core/Collection.js";import{byId as i}from"../core/domUtils.js";import a from"../core/Error.js";import{on as o}from"../core/events.js";import{destroyHandle as s,makeHandle as c}from"../core/handleUtils.js";import has from"../core/has.js";import l from"../core/Logger.js";import{mapCollectionAsync as ee}from"../core/mapCollectionUtils.js";import{destroyMaybe as u,maybeProperty as te}from"../core/maybe.js";import{throwIfDestroyed as ne,throwIfAborted as d,createAbortError as re}from"../core/promiseUtils.js";import ie from"../core/ReactiveSet.js";import{on as f,watch as p,initial as m,sync as h,whenOnce as ae,syncAndInitial as g}from"../core/reactiveUtils.js";import{setFrameDuration as oe,cleanupScheduling as se}from"../core/scheduling.js";import{createScreenPoint as ce,createScreenPointArray as le}from"../core/screenUtils.js";import{cleanupWhereClauseCache as ue}from"../core/sql.js";import{getDefaultVerticalUnitStringForSR as de,getMetersPerUnitForSR as fe}from"../core/units.js";import{property as _,cast as v,subclass as pe}from"../core/accessorSupport/decorators.js";import{ensureType as y,ensureClass as b}from"../core/accessorSupport/ensureType.js";import{overrideDefaultsFrom as me}from"../core/accessorSupport/overrideDefaultsFrom.js";import{runUntracked as he}from"../core/accessorSupport/tracking.js";import{drainNotificationQueue as ge}from"../core/accessorSupport/trackingUtils.js";import{create as _e}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{cleanupPooledRBush as ve}from"../core/libs/rbush/PooledRBush.js";import{initialize as ye}from"../core/workers/workers.js";import x from"../geometry/Extent.js";import be from"../geometry/HeightModelInfo.js";import S from"../geometry/Point.js";import{project as C,canProjectWithoutEngine as xe}from"../geometry/projectionUtils.js";import w from"../geometry/SpatialReference.js";import{cleanupSpatialReferenceEllipsoidUtils as Se}from"../geometry/spatialReferenceEllipsoidUtils.js";import{projectBoundingRect as Ce}from"../geometry/projection/projectBoundingRect.js";import{projectPointToVector as T}from"../geometry/projection/projectPointToVector.js";import{toExtent as we,create as Te}from"../geometry/support/aaBoundingRect.js";import{renderSRFromViewSR as Ee}from"../geometry/support/coordinateSystem.js";import{getResolutionForScale as De}from"../geometry/support/scaleUtils.js";import{wgs84 as Oe,webMercator as ke}from"../geometry/support/spatialReferenceUtils.js";import{makeDehydratedPoint as Ae}from"../layers/graphics/dehydratedPoint.js";import{isImageryTileLayer as E,isTiledLayer as D,isVoxelLayer as O,isIntegratedMeshLayer as k,isGaussianSplatLayer as je}from"../layers/support/layerUtils.js";import{TilemapCache as Me}from"../layers/support/TilemapCache.js";import{clearDefaultPortalInstance as Ne}from"../portal/portalDefault.js";import{WebSceneTag as Pe}from"../support/tagSymbols.js";import{BreakpointsOwner as Fe}from"./BreakpointsOwner.js";import{DOMContainer as Ie}from"./DOMContainer.js";import{PopupView as Le}from"./PopupView.js";import A from"./View.js";import Re from"./ViewAnimation.js";import{stringFromViewingMode as j,viewingModeFromString as M}from"./ViewingMode.js";import{GroundView3D as ze}from"./3d/GroundView3D.js";import{layerView3DImporter as N}from"./3d/layerViewModuleImportUtils.js";import{importAnalysisViewModule as Be}from"./3d/analysis/analysisViewModuleImportUtils.js";import{cleanupIntersectionUtils as Ve}from"./3d/camera/intersectionUtils.js";import P from"./3d/constraints/Constraints.js";import F from"./3d/environment/Environment.js";import{EnvironmentManager as He}from"./3d/environment/EnvironmentManager.js";import Ue from"./3d/input/SceneInputManager.js";import{GraphicsDeconflictor as We}from"./3d/layers/graphics/GraphicsDeconflictor.js";import{Labeler as Ge}from"./3d/layers/graphics/Labeler.js";import Ke from"./3d/layers/i3s/I3SLodHandling.js";import{Navigation3D as qe}from"./3d/navigation/Navigation3D.js";import{ScreenSizePerspective as Je}from"./3d/state/ScreenSizePerspective.js";import I from"./3d/state/ViewState.js";import{ViewStateManager as Ye,cleanupViewStateManager as Xe}from"./3d/state/ViewStateManager.js";import{cleanupPointToPointAnimationController as Ze}from"./3d/state/controllers/PointToPointAnimationController.js";import{SceneIntersectionHelper as Qe}from"./3d/state/helpers/SceneIntersectionHelper.js";import{cleanupNavigationUtils as $e}from"./3d/state/utils/navigationUtils.js";import et from"./3d/support/Attribution3D.js";import{CombinedElevationProvider as tt}from"./3d/support/CombinedElevationProvider.js";import{debugFlags as L}from"./3d/support/debugFlags.js";import{getElevationAtPoint as nt}from"./3d/support/ElevationProvider.js";import{GroundAndIMSurface as rt}from"./3d/support/GroundAndIMSurface.js";import{toMap as it,hitTest as at}from"./3d/support/hitTest.js";import{popupHitTest as ot}from"./3d/support/popupHitTest.js";import{getDefaultQualityProfileName as st,getQualityProfileSettings as R}from"./3d/support/QualityProfile.js";import z from"./3d/support/QualitySettings.js";import{RenderCoordsHelper as ct}from"./3d/support/RenderCoordsHelper.js";import{newResourceController as lt}from"./3d/support/ResourceController.js";import ut from"./3d/support/SceneViewPerformanceInfo.js";import{SharedSymbolResources as dt}from"./3d/support/SharedSymbolResources.js";import{ViewSlice as ft}from"./3d/support/ViewSlice.js";import{PointsOfInterest as B}from"./3d/support/pointsOfInterest/PointsOfInterest.js";import V from"./3d/terrain/TerrainSurface.js";import{isSurfaceLayerView as pt,getTiledLayerInfo as mt,checkIfTileInfoSupportedForView as ht}from"./3d/terrain/terrainUtils.js";import{clearTilePerLayerInfo as gt}from"./3d/terrain/TilePerLayerInfo.js";import{cleanupTileRenderer as _t}from"./3d/terrain/TileRenderer.js";import{Stage as vt}from"./3d/webgl-engine/Stage.js";import{olidEnabled as yt}from"./3d/webgl-engine/effects/geometry/olidUtils.js";import{cleanupRenderOccluded as bt}from"./3d/webgl-engine/effects/geometry/RenderOccluded.js";import{defaultTolerance as H}from"./3d/webgl-engine/lib/Intersector.js";import{cleanupShadowmap as xt}from"./3d/webgl-engine/lib/ShadowMap.js";import{terrainId as U}from"./3d/webgl-engine/lib/verticalOffsetUtils.js";import{cleanupEdgeProcessing as St}from"./3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js";import W from"./interactive/options/ViewOptions.js";import Ct from"./support/AnalysisViewManager.js";import{cleanupDrapedUtils as wt}from"./support/drapedUtils.js";import{occludeesSupported as Tt}from"./support/layerViewUtils.js";import{isSupportedScreenPointEvent as G,createScreenPointFromSupportedEvent as K}from"./support/screenUtils.js";import{isSpatialReferenceSupported as Et}from"./support/spatialReferenceSupport.js";import{initializeTextureCompressionWorker as Dt,destroyTextureCompressionWorker as Ot}from"./support/TextureCompressionHelper.js";import kt from"./ui/DefaultUI.js";import At from"./ui/3d/DefaultUI3D.js";import jt from"../webscene/Environment.js";import{clearVNodeCache as Mt}from"../widgets/support/vnodeCache.js";var q;const Nt=Symbol(),J=Symbol();function Pt(e){let t=b(W,e);return t!==e&&e.snapping?.enabled==null&&(t.snapping.enabled=!0),t}let Y=class extends Fe(Le(Ie(A))){static{q=this}get timeZone(){return super.timeZone}set timeZone(e){super.timeZone=e}constructor(e){super(e),this.options=new W({snapping:{enabled:!0}}),this._userClippingArea=null,this._clippingArea=null,this._overrideDefaultEnvironmentOnly=!0,this._resolveWhenReady=[],this._resourceController=lt(this),this.deconflictor=new We({view:this}),this.attribution3D=new et({view:this}),this.labeler=new Ge({view:this,deconflictor:this.deconflictor.labels}),this.sharedSymbolResources=null,this.navigation=new qe({view:this}),this.basemapTerrain=null,this.elevationProvider=new tt({view:this}),this._canvas=null,this.constraints=new P,this._environment=new F,this.environmentManager=new He,this.floors=new r,this.fullOpacity=1,this.graphicsView=null,this.analysisViewManager=new Ct({importAnalysisViewModule:e=>Be(e),view:this}),this.groundView=null,this.groundAndIMSurface=null,this.map=null,this._featureTileTreeClients=new ie,this._featureTiles=null,this._featureTreeDebugger=null,this.state=new I({view:this}),this.slice=new ft,this.spatialReference=null,this.preserveDrawingBufferEnabled=!1,this.supersampleScreenshotsEnabled=!0,this.type=`3d`,this.ui=new At,this._numUpdating=0,this._lastUpdateTime=0,this.updatingProgress=.5,this._importControllers=new Map,ye();let t=()=>this._updatingChanged();this.addHandles(s(ee(()=>this.map?.allLayers,async e=>{try{await e.when()}catch{}finally{t()}}))),this.addHandles([f(()=>this.map?.allLayers,`after-changes`,t,{onListenerAdd:t,onListenerRemove:t,sync:!0}),this.allLayerViews.on(`after-changes`,e=>this._updateUpdatingMonitors(e)),p(()=>this.scene,e=>e?.load().catch(()=>{}))]),this.inputManager=new Ue({view:this}),this.stateManager=new Ye({view:this}),this.screenSizePerspective=new Je({view:this})}initialize(){if(has(`enable-feature:esri-compress-textures`)&&has(`wasm-simd`)){let e=Dt(this,this.resourceController);this.addResolvingPromise(e.promise)}this.groundView=new ze({view:this}),this.groundAndIMSurface=new rt({view:this}),this._updateUpdatingMonitors(),this.updatingHandles.add(()=>this.qualitySettings.memoryLimit,e=>{this.resourceController&&(this.resourceController.memoryController.maxMemory=e)},m),this.updatingHandles.add(()=>this.qualitySettings.additionalCacheMemory,e=>{this.resourceController&&(this.resourceController.memoryController.additionalCacheMemory=e)},m),this.updatingHandles.add(()=>this.qualitySettings.frameRate??0,e=>oe(e>0?1e3/Math.ceil(e):0),m),this.addHandles([p(()=>this.spatialReference,()=>this.notifyChange(`clippingArea`),h),p(()=>({plane:this.slice.plane,isDecoration:this.slice.isDecoration}),()=>this._updateSlice(),h)])}destroy(){this.destroyed||(Ot(this),this.updatingHandles.removeAll(),this.basemapTerrain?.clearHandles(),this.elevationProvider.destroy(),this.ui.removeAllHandles(),this.layerViewManager.clearHandles(),this.invalidate(),this.layerViewManager.clear(),this._set(`analysisViewManager`,u(this.analysisViewManager)),this._exitSurface(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this.sharedSymbolResources=u(this.sharedSymbolResources),this._set(`labeler`,u(this.labeler)),this._set(`deconflictor`,u(this.deconflictor)),this._resourceController=u(this._resourceController),this._set(`stateManager`,u(this.stateManager)),this._set(`inputManager`,u(this.inputManager)),this.state.destroy(),this.highlights.destroy(),this.removeHandles(`updatingMonitors`),this._set(`environmentManager`,u(this.environmentManager)),this._set(`environment`,u(this.environment)),this.groundView=u(this.groundView),this.groundAndIMSurface.destroy(),this.slice.destroy(),this._updatingObjectsWithProgress.length=0,this._updatingObjects.length=0,this.ui?.destroy(),this._set(`ui`,null),this._set(`renderCanvas`,null),this._set(`canvas`,null),this._canvas=null,this.screenSizePerspective.destroy(),this.attribution3D.destroy())}get stage(){return this._stage}get renderSpatialReference(){return this.renderCoordsHelper?.spatialReference}get groundSpatialReference(){return this.groundView?.spatialReference}get analyses(){return super.analyses}set analyses(e){super.analyses=e}get animation(){return this.state?.animation}get overlayManager(){return this.basemapTerrain?.overlayManager}get camera(){return this.stateManager?.camera}set camera(e){this.stateManager&&(this.stateManager.camera=e)}get contentCamera(){return this.stateManager?.contentCamera}set contentCamera(e){this.stateManager&&(this.stateManager.contentCamera=e)}installContentCameraReset(e={sticky:!1}){return this.stateManager.installContentCameraReset(e)}get canvas(){return this._canvas}get center(){return this.stateManager?.center}set center(e){this.stateManager&&(this.stateManager.center=y(S,e))}get clippingArea(){if(this.viewingMode===`global`)return null;let e=this.map,t=this._userClippingArea||te(e,`clippingArea`);return!(this._userClippingArea||te(e,`clippingEnabled`))||t==null?(this._clippingArea=null,null):t instanceof x?this.spatialReference&&(t=X(t,this.spatialReference),t==null)?(l.getLogger(this).error(`#clippingArea`,`setting clippingArea with incompatible SpatialReference`),this._clippingArea):(t=t.clone(),t.intersection(this._groundAndLayersExtent)??(t.xmin=t.xmax,t.ymin=t.ymax),t.zmin=void 0,t.zmax=void 0,t.equals(this._clippingArea)||(this._clippingArea=t),this._clippingArea):(l.getLogger(this).error(`#clippingArea`,`only clippingArea geometries of type Extent are supported`),this._clippingArea)}set clippingArea(e){this.ready&&this.viewingMode===`global`&&e!=null?l.getLogger(this).error(`#clippingArea=`,`Clipping area is only supported in local viewingMode`):this._userClippingArea=e}get renderDataExtent(){if(this.state.viewingMode===1)return null;let e=this.renderSpatialReference,t=this.dataExtent;return t==null||e==null||t.spatialReference.equals(e)?t:X(t,e)}get tileInfo(){return this.basemapTerrain?.tilingScheme?.toTileInfo()}get dataExtent(){let e=this._groundAndLayersExtent,t=this.spatialReference||w.WGS84,n=X(this.clippingArea,t);n!=null&&(e=e==null?n:e.intersection(n));let r=this._get(`dataExtent`);return e!=null&&e.equals(r)?r:e}get _groundAndLayersExtent(){let e=this.spatialReference||w.WGS84,t,n=n=>{let r=X(n,e);r!=null&&(t==null?t=r.clone():t.union(r))},{groundView:r}=this,i=r?.spatialReference,a=r?.fullGroundExtent;i&&a&&n(new x({xmin:a[0],ymin:a[1],zmin:0,xmax:a[2],ymax:a[3],zmax:0,spatialReference:i}));let o=e=>{e.fullExtent!=null&&(e.type!==`graphics`||!e.internal)&&n(e.fullExtent)};if(this.map?.allLayers.forEach(e=>o(e)),t==null)return null;t.hasZ?(t.zmin=Math.min(0,t.zmin??0),t.zmax=Math.max(0,t.zmax??0)):(t.zmin=0,t.zmax=0);let s=this._get(`_groundAndLayersExtent`);return t.equals(s)?s:t}get environment(){return this._environment}set environment(e){if(this._environment===e)return;let{_environment:t}=this;this._environment=null,t?.destroy(),this._environment=e,this.notifyChange(`environment`)}castEnvironment(e){return e?e instanceof F?e:e instanceof jt?this.environment?.cloneWithWebsceneEnvironment(e)??F.fromWebsceneEnvironment(e):y(F,e):new F}get extent(){return this.stateManager?.extent}set extent(e){this.stateManager&&(this.stateManager.extent=e)}get screenCenter(){return this.stateManager?.screenCenter}get frustum(){return this.stateManager?.frustum}get layerviewCollections(){return[this.basemapView?.baseLayerViews,this.basemapView?.groundLayerViews,this.groundView?.layerViews,this.layerViews,this.basemapView?.referenceLayerViews]}get _layerToLayerviewMapping(){return q._layerToLayerview}static{this._layerToLayerview=A._layerToLayerview.concat([[`view.map.ground.layers`,`view.groundView.layerViews`]])}get initialExtentRequired(){return this.stateManager&&!this.stateManager.hasInitialView}get defaultsFromMapSettings(){return{required:{tileInfo:!1,heightModelInfo:!0,extent:!1}}}get interacting(){return this.navigating||(this.toolViewManager?.interacting??!1)}get stationary(){return!this.animation&&!this.resizing&&(this.state?.stationary??!0)}get navigating(){return this.state?.navigating??!1}get scene(){return this.map&&Pe in this.map?this.map:null}get padding(){return this.stateManager?.padding}set padding(e){this.stateManager&&(this.stateManager.padding=e)}get featureTiles(){return this._featureTiles}set qualityProfile(e){let t=R(e);t&&this._get(`qualityProfile`)!==e&&(this.qualitySettings=new z(t),this.stage?.renderView.updateQualitySettings(this.qualitySettings),this._set(`qualityProfile`,e))}get qualityProfile(){return this._get(`qualityProfile`)||st()}_updateSlice(){this.stage!=null&&(this.stage.renderer.slice=this.slice)}get typeSpecificPreconditionsReady(){return this.viewingMode?!!this.stateManager?.preinit(this.spatialReference):!1}get resolution(){let{scale:e,spatialReference:t}=this;return t?he(()=>De(e,t)):0}get scale(){return this.stateManager?.scale}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get terrainLevel(){let e=this.basemapTerrain?.tilingScheme,t=this.scale;if(!e||!t)return null;let n=e.levelAtScale(t)+this.qualitySettings.tiledSurface.lodBias,r=e.getMaxLod();return n<=0?null:Math.max(0,Math.min(n,r||1/0))}get heightModelInfo(){let e=this.getDefaultHeightModelInfo();if(!e)return null;let t=de(this.spatialReference);if(t&&e.heightUnit!==t)return new be({heightModel:e.heightModel,heightUnit:t,vertCRS:e.vertCRS,associatedSpatialReference:e.associatedSpatialReference});if(!e.associatedSpatialReference){let t=e.clone();return t.associatedSpatialReference=this.spatialReference,t}return e}get alphaCompositingEnabled(){return this._get(`alphaCompositingEnabled`)}set alphaCompositingEnabled(e){this._stage&&l.getLogger(this).warn(`alphaCompositingEnabled cannot be changed after the view has become ready`),this._set(`alphaCompositingEnabled`,e)}get updating(){if(this.destroying||this.destroyed)return!1;if(!this.initialized)return!0;let e=0,t=this.layerViewManager.updating,n=t?this.layerViewManager.updatingRemaining:0;this.allLayerViews.forEach(r=>{if(!r.isFulfilled())++n;else if(r.updating){if(t=!0,r.suspended||pt(r))return;++n,e+=r.updatingProgress}});let r=.1;for(let t of this._updatingObjects)t?.updating&&(n+=r,e+=.5*r);for(let t of this._updatingObjectsWithProgress)t?.updating&&(++n,e+=t.updatingProgress);let i=!this.stateManager.test.updatingIgnoreRenderState&&this.state.updating;if(t=!!(t||n>0||this.updatingHandles.updating||!this.ready||!this.stationary||i||this._importControllers.size>0||this.inputManager?.updating||this.map?.allLayers?.some(e=>!e.isFulfilled())),t?(this._numUpdating=Math.max(n,this._numUpdating),e+=this._numUpdating-n):this._numUpdating=0,this._numUpdating>0?e/=this._numUpdating:e=+!t,this._get(`updatingProgress`)!==e){let n=performance.now();if(e<1){let t=Math.min((n-this._lastUpdateTime)/2e3,1);e=this.updatingProgress*(1-t)+e*t}this._set(`updatingProgress`,e),this._lastUpdateTime=t&&e<1?n:0}return L.UPDATING&&console.log(`Updating:`,this._updatingObjectsToDebug.filter(e=>e!=null&&e.updating).map(({declaredClass:e})=>e)),t}get _updatingObjects(){return[this.graphicsView,this.basemapView,this._resourceController,this.stage,this.featureTiles,this.pointsOfInterest,this.environmentManager,this.overlay,this._featureTreeDebugger,this.toolViewManager,this.analysisViewManager,this.focusAreasView]}get _updatingObjectsWithProgress(){return[this.deconflictor,this.labeler,this.basemapTerrain]}get _updatingObjectsToDebug(){return L.UPDATING?this._updatingObjects.concat(this._updatingObjectsWithProgress).concat(this.allLayerViews.toArray()):[]}get viewingMode(){let e=this._predeterminedViewingMode;if(e!=null)return j(e);let t=this.spatialReference;return t?this.defaultsFromMap?.viewingMode!=null&&t.equals(this.defaultsFromMap.spatialReference)?j(this.defaultsFromMap.viewingMode):Et(t,1)?`global`:`local`:`global`}set viewingMode(e){this.ready?l.getLogger(this).error(`#viewingMode`,`viewingMode cannot be set once view is ready`):this._overrideIfSome(`viewingMode`,e)}get viewpoint(){return this.stateManager?.viewpoint}set viewpoint(e){this.stateManager&&(this.stateManager.viewpoint=e)}get visibleArea(){return this.stateManager?.visibleArea}get zoom(){return this.stateManager.zoom}set zoom(e){this.stateManager&&(this.stateManager.zoom=e)}get resourceController(){return this._resourceController}get quality(){return this._resourceController?.memoryController?.memoryFactor??1}get resolutionScale(){return Math.sqrt(Math.min(1,this.quality/.75))}get performanceInfo(){return new ut(this)}on(e,t,n,r){return this.viewEvents.on(e,t,n,r)||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}toMap(e,t){if(!this.ready)return l.getLogger(this).error(`#toMap()`,`Scene view cannot be used before it is ready`),null;let n=G(e)?K(this,e):e;return it(this,n,t,this._defaultToMapOptions)}toScreen(e){if(!this.ready)return l.getLogger(this).error(`#toScreen()`,`Scene view cannot be used before it is ready`),null;let t=e;return e.z??(t=Ft,t.x=e.x,t.y=e.y,t.z=nt(this.elevationProvider,e)??0,t.spatialReference=e.spatialReference),T(t,Z,this.renderSpatialReference),this.state.camera.projectToScreen(Z,Q),ce(Q[0],Q[1])}pixelSizeAt(e,t){if(!this.ready)return l.getLogger(this).error(`#pixelSizeAt()`,`Scene view cannot be used before it is ready`),null;if(!e)return 0;let n=this.renderSpatialReference;T(e,Z,n);let r=this.state.camera.computeScreenPixelSizeAt(Z);return t&&n!==t?r*fe(n)/fe(t):r}overlayPixelSizeInMapUnits(e){return this.overlayManager?.overlayPixelSizeInMapUnits(e,()=>this.pixelSizeAt(e))??1}hitTest(e,t){if(!this.ready)return l.getLogger(this).error(`#hitTest()`,`Scene view cannot be used before it is ready`),null;let n=G(e)?K(this,e):e;return at(this,n,t,this._defaultHitTestOptions)}async popupHitTest(e){return ot(this,e)}goTo(e,t){return this.updatingHandles.addPromise(this.stateManager.goTo(e,t))}async zoomIn(){if(this.canZoomIn)return this.navigation.zoom(!0)}async zoomOut(){if(this.canZoomOut)return this.navigation.zoom(!1)}async whenAnalysisView(e){if(e.parent==null)throw new a(`view:no-analysisview-for-analysis`,`The analysis does not exist in view.analyses`,{analysis:e});switch(e.parent.type){case`line-of-sight`:case`dimension`:case`viewshed`:return(await this.whenLayerView(e.parent)).whenAnalysisView();default:return this.analysisViewManager.whenAnalysisView(e)}}whenLayerView(e){return super.whenLayerView(e)}async takeScreenshot(e){let t=await this._completeSettings(e);await this.whenReady();let n=(await this.stage.renderView.takeScreenshot(t))[0];return(await import(`./support/screenshotUtils.js`)).encode(n,t,this._pixelFormat())}async _takeScreenshot(e){let t=await this._completeSettings(e);await this.whenReady();let n=(await this.stage.renderView.takeScreenshot(t))[0];return(await import(`./support/screenshotUtils.js`)).encodeData(n,this._pixelFormat())}async _takeScreenshotWithObjectAndLayerId(e){let t=await this._completeSettings(e);t.olidColor=!0,await this.whenReady();let n=await this.stage.renderView.takeScreenshot(t),{encodeData:r}=await import(`./support/screenshotUtils.js`);return[r(n[0],this._pixelFormat()),r(n[1],this._pixelFormat())]}async _completeSettings(e){let{toRenderSettings:t,screenshotSuperSampleSettings:n}=await import(`./support/screenshotUtils.js`),r=t(e,this);return r.pixelRatio/=this.state.pixelRatio,n(r,this.supersampleScreenshotsEnabled,this.padding)}_pixelFormat(){return{flipY:!0,premultipliedAlpha:this.stage?.renderView.getAlpha()??!1}}get test(){}async takeScreenshotWithObjectAndLayerId(e){if(!yt())throw new a(`360vr:objectAndLayerId-rendering-disabled`,`has enable-feature:objectAndLayerId-rendering must be true`);let{encode:t}=await import(`./support/screenshotUtils.js`),n=await this._completeSettings(e);n.olidColor=!0,await this.whenReady();let r=await this.stage.renderView.takeScreenshot(n),i=t(r[0],n,this._pixelFormat()),o=await this._completeSettings(e);return o.format=`png`,[i,t(r[1],o,this._pixelFormat())]}getColorToObjectAndLayerIdMapping(){let e=this.stage.renderView.olidRenderHelper;if(e)return e.getColorToObjectAndLayerIdMapping();throw new a(`360vr:objectAndLayerId-rendering-disabled`,`has enable-feature:objectAndLayerId-rendering must be true`)}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}getAttributionItems(){return super.getAttributionItems().concat(this.attribution3D.attributionItems)}importLayerView(e){return N.importLayerView(e)}hasLayerViewModule(e){return N.hasLayerViewModule(e)}forceDOMReadyCycle(){this.forceReadyCycle()}getWebDocumentSpatialReference(){return this.scene?.initialViewProperties?.spatialReference}getDefaultTimeZone(){return this.scene?.initialViewProperties?.timeZone??null}getSurface(){return this.surface}get _predeterminedViewingMode(){let e=this._isOverridden(`viewingMode`)?this._get(`viewingMode`):this.scene?.initialViewProperties?.viewingMode;return e==null?null:M(e)}getSpatialReferenceSupport(e,t){let n=this._predeterminedViewingMode,r=r=>this._validateSpatialReferenceForViewingMode(e,t,r)?this._makeSpatialReferenceConstraints(e,t,r,n):null,i=n?r(n):[...r(1)??[],...r(2)??[]];return i?.length?{constraints:i}:null}_validateSpatialReferenceForViewingMode(e,t,n){return Et(e,n)?t==null||E(t)?!0:!(D(t)&&mt(t,e,n)==null||O(t)&&n===1):!1}_makeSpatialReferenceConstraints(e,t,n,r){if(t==null)return[{spatialReference:e,viewingMode:n}];let{isWebMercator:i,isWGS84:a,vcsWkid:o,latestVcsWkid:s}=e,c=()=>o==null?i?w.WGS84:w.WebMercator:new w({...i?Oe:ke,vcsWkid:o,latestVcsWkid:s});return E(t)&&(i||a)?!(a&&r!==2)||ht(t.tileInfo,t.fullExtent,e,1)===null?[{spatialReference:e,viewingMode:n},{spatialReference:c(),viewingMode:n}]:[{spatialReference:c(),viewingMode:n}]:!D(t)&&!O(t)&&(i||a)?[{spatialReference:e,viewingMode:n},{spatialReference:c(),viewingMode:n}]:D(t)&&i&&n!==1?[{spatialReference:e,viewingMode:n},{spatialReference:c(),viewingMode:2}]:[{spatialReference:e,viewingMode:n}]}_validateSpatialReference(e){let t=this.getSpatialReferenceSupport(e)!=null,n=this._predeterminedViewingMode;return t||(n==null?e.isGeographic&&l.getLogger(this).warnOnce(`Spatial reference is geographic but not supported.`):l.getLogger(this).warnOnce(`Spatial reference defined on view not supported in ${j(n)} viewing mode.`)),t}whenReady(){return new Promise(e=>{this.ready?e(this):this._resolveWhenReady.push(e)})}trackGraphicState(e){if(!e.graphic)return l.getLogger(this).error(`trackGraphicState`,`GraphicState.graphic must not be null or undefined to start tracking`),null;let t=this.getViewForGraphic(e.graphic),n=null,r=!1,i=t=>{!r&&t!=null&&`processor`in t&&t.processor?.type===`graphics-3d`&&t.processor.graphicsCore&&(n=t.processor.graphicsCore.trackGraphicState(e))};return t==null?this.whenViewForGraphic(e.graphic,{waitForLayer:!0}).then(e=>i(e),()=>{}).catch(()=>{}):i(t),c(()=>{r=!0,n!=null&&(n.remove(),n=null)})}maskOccludee(e){if(!e)return l.getLogger(this).error(`maskOccludee`,`GraphicState.graphic must not be null or undefined to mask an occludee`),null;let t=this.getViewForGraphic(e),n=null,r=!1,i=t=>{!r&&t!=null&&Tt(t)&&(n=t.maskOccludee(e))};return t==null?this.whenViewForGraphic(e,{waitForLayer:!0}).then(e=>i(e),()=>{}).catch(()=>{}):i(t),c(()=>{r=!0,n!=null&&(n.remove(),n=null)})}getViewForGraphic(e){return e.layer===this?this.graphicsView:e.layer?this.allLayerViews.filter(e=>e.type!==`media-3d`).find(t=>t.layer===e.layer):null}graphicChanged(e){this.graphicsView!=null&&this.graphicsView.graphicChanged(e)}async whenViewForGraphic(e,t){return e.layer===this?(await ae(()=>this.graphicsView),this.graphicsView):!e.layer||!this.map?null:!t||!t.waitForLayer||this.map.allLayers.includes(e.layer)?this.whenLayerView(e.layer):new Promise((t,n)=>{let r=this.map.allLayers.on(`change`,i=>{i.added.includes(e.layer)&&(r.remove(),this.whenLayerView(e.layer).then(t,n))})})}enableFeatureTiles(){let e=Symbol();return this._featureTileTreeClients.add(e),c(()=>this._featureTileTreeClients.delete(e))}async _importModule(e,t){let n=new AbortController;this._importControllers.set(e,n),this._updatingChanged();try{let r=await It[e]();if(t&&(ne(this),d(n.signal),await t(n.signal)),this.destroyed)throw re();return d(n.signal),r}catch{return null}finally{this._importControllers.delete(e),this._updatingChanged()}}_abortImport(e){this._importControllers.get(e)?.abort(),this._importControllers.delete(e),this._updatingChanged()}_initBasemapTerrain(){this._set(`basemapTerrain`,new V({view:this})),this.elevationProvider.register(0,this.basemapTerrain)}_exitBasemapTerrain(){let{basemapTerrain:e,elevationProvider:t}=this;e&&(this._set(`basemapTerrain`,null),t.unregister(e),e.destroy())}_initGlobe(){this._initCoordinateSystem(),this.state.createInitialCamera(),this._initBasemapTerrain(),this._set(`pointsOfInterest`,new B({view:this})),this.addHandles([this.updatingHandles.add(()=>L.FEATURE_TILE_TREE_SHOW_TILES,e=>{e&&!this._featureTreeDebugger?this.updatingHandles.addPromise(import(`./3d/layers/support/FeatureTileTree3DDebugger.js`)).then(({FeatureTileTree3DDebugger:e})=>{!this._featureTreeDebugger&&L.FEATURE_TILE_TREE_SHOW_TILES&&(this._featureTreeDebugger=new e({view:this}))}):e||(this._featureTreeDebugger=u(this._featureTreeDebugger))},g),this.updatingHandles.add(()=>({basemapExtent:this.groundView?.groundExtent,basemapSpatialReference:this.groundView?.spatialReference,clippingArea:this.clippingArea,featureTiles:this._featureTiles}),({basemapExtent:e,basemapSpatialReference:t,clippingArea:n,featureTiles:r})=>{if(!r)return;let i=!!e;if(!n&&!i)r.filterExtent=null;else if(!i||!t)r.filterExtent=n;else{let i=e&&t?C(we(e,t),this.spatialReference):null;r.filterExtent=n?n.intersection(i):i}},g),this.updatingHandles.add(()=>this._featureTileTreeClients.size>0,e=>{e?this.updatingHandles.consumePromise(this._ensureFeatureTileTree()):this._featureTiles=u(this._featureTiles)},h)],Nt),this.stateManager.init()}async _ensureFeatureTileTree(){if(this._featureTiles||this._importControllers.has(`FeatureTileTree3D`))return;let e=(await this.updatingHandles.addPromise(this._importModule(`FeatureTileTree3D`)))?.FeatureTileTree3D;e&&(this._featureTiles=new e({renderCoordsHelper:this.renderCoordsHelper,pointsOfInterest:this.pointsOfInterest,viewState:this.state,scheduler:this._resourceController.scheduler,terrain:this.basemapTerrain}),this._updatingChanged())}_exitTerrain(){this.stateManager.exit(),this.removeHandles(J),this.removeHandles(Nt),this._featureTiles=u(this.featureTiles),this._set(`pointsOfInterest`,u(this.pointsOfInterest)),this._exitBasemapTerrain(),this.state.reset(),this._exitCoordinateSystem()}_initCoordinateSystem(){if(this.spatialReference){let e=this.spatialReference,t=this.state.isGlobal,n=Ee(t,e);n!==this.renderSpatialReference&&(this._set(`renderCoordsHelper`,ct.create(this.state.viewingMode,n)),t||this.addHandles(p(()=>this.groundView?.groundExtent,e=>{let t=this.renderCoordsHelper.spatialReference;e!=null&&(e[0]!==0||e[1]!==0||e[2]!==0||e[3]!==0)&&Ce(e,this.groundView.spatialReference,$,t)&&(this.renderCoordsHelper.extent=$)},h),J),this.sceneIntersectionHelper&&this.sceneIntersectionHelper.setTolerance(H/this.renderCoordsHelper.unitInMeters))}else this._set(`renderCoordsHelper`,null)}_exitCoordinateSystem(){this.removeHandles(J),this._set(`renderCoordsHelper`,null)}_updatingChanged(){this.notifyChange(`updating`)}_updateUpdatingMonitors(e=null){(e==null||e.type!==4)&&(this.removeHandles(`updatingMonitors`),this.allLayerViews.forEach(e=>{e.destroyed||(this.addHandles(p(()=>[e.updating,e.updatingProgress],()=>this._updatingChanged(),h),`updatingMonitors`),e.when(()=>this._updatingChanged(),()=>this._updatingChanged()))}),this._updatingChanged())}async _prepareScreenshotOverlay(){this.overlay&&await this.overlay.prepare()}_renderScreenshotOverlay(e,t,n){if(!this.overlay||!this.overlay.hasVisibleItems)return n;let r=e.getContext(`2d`,{willReadFrequently:!0});return r.putImageData(n,0,0),this.overlay.renderCanvas(e,{disableDecorations:t}),r.getImageData(0,0,n.width,n.height)}_initStage(){let e={deactivatedWebGLExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions,alpha:this.alphaCompositingEnabled,preserveDrawingBuffer:this.preserveDrawingBufferEnabled,canvas:this.renderCanvas,screenshot:{prepareOverlay:()=>this._prepareScreenshotOverlay(),renderOverlay:(e,t,n)=>this._renderScreenshotOverlay(e,t,n)}},t=new Qe(this.state.viewingMode,e=>this.stage.layers.forEach(e),this);this._set(`sceneIntersectionHelper`,t);let n=i(this.surface);this._stage=new vt({view:this,options:e,container:n}),this.notifyChange(`stage`),this._updateSlice(),this.addHandles([this.on(`pointer-move`,()=>this.stage?.renderer.resetAnimation()),o(this.stage.renderView.canvas,`webglcontextlost`,e=>{this.fatalError=new a(`webgl-context-lost`,e.statusMessage||`WebGL context lost`)})],`stage`),this.renderCoordsHelper&&this.sceneIntersectionHelper.setTolerance(H/this.renderCoordsHelper.unitInMeters),this._set(`canvas`,this.stage.renderView.canvas)}_exitStage(){this.sceneIntersectionHelper?.destroy(),this._set(`sceneIntersectionHelper`,null),this._stage=u(this.stage),this._set(`stage`,null),this.removeHandles(`stage`),this._set(`canvas`,null)}_initSurface(){this._exitSurface(),this._initStage(),this._initGlobe(),this.sharedSymbolResources=new dt({view:this,resourceController:this._resourceController})}_exitSurface(){this.sharedSymbolResources&&(this.sharedSymbolResources.objectResourceCache.destroy(),this.sharedSymbolResources.destroy(),this.sharedSymbolResources=null,this._exitTerrain(),this._exitStage())}async _ensureGraphicsView(){if(this.graphicsView||this._importControllers.has(`GraphicsView3D`)||this.graphics.length===0)return;this.removeHandles(`GraphicsView3D`);let e=(await this.updatingHandles.addPromise(this._importModule(`GraphicsView3D`,e=>ae(()=>this.groundView?.ready,e))))?.default;e&&this._set(`graphicsView`,new e({view:this,getGraphics:()=>this.graphics})),this._updatingChanged()}_disposeGraphicsView(){this._abortImport(`GraphicsView3D`),this.removeHandles(`GraphicsView3D`),this.graphicsView&&(this.removeHandles(this.graphicsView.processor.layer.id),this.graphicsView.destroy(),this._set(`graphicsView`,null))}_disposeFocusAreasView(){this._abortImport(`FocusAreasView`),this.removeHandles(`FocusAreasView`),this.focusAreasView=u(this.focusAreasView)}async _ensureFocusAreasView(e){if(this.focusAreasView||this._importControllers.has(`FocusAreasView`)||e===0)return;this.removeHandles(`FocusAreasView`);let t=(await this.updatingHandles.addPromise(this._importModule(`FocusAreasView`)))?.FocusAreasView;t&&(this.focusAreasView=new t({view:this})),this._updatingChanged()}_startup(){M(this.viewingMode)===1&&(this._clippingArea=null),this._initSurface(),this._set(`ready`,!0),this.addHandles(f(()=>this.graphics,`after-changes`,()=>this._ensureGraphicsView()),`GraphicsView3D`),this._ensureGraphicsView(),this.addHandles(this.updatingHandles.add(()=>this.map?.focusAreas?.areas.length??0,e=>this._ensureFocusAreasView(e),{initial:!0}),`FocusAreasView`);let e=this.scene?.initialViewProperties??null,t=e?.environment;t&&(this._overrideDefaultEnvironmentOnly?me(this.environment,t):this.environment=this.environment.cloneWithWebsceneEnvironment(t)),this.timeExtent=e?.timeExtent,e?.analyses.applyTo(this),this.labeler.setup(),this.environmentManager.connectView(this),this.inputManager.connect();let n=this._resolveWhenReady;this._resolveWhenReady=[],n.forEach(e=>e(this))}_teardown(){this.inputManager.disconnect(),this.environmentManager.disconnectView(),this._overrideDefaultEnvironmentOnly=!1,this.labeler.dispose(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this._exitSurface(),this._set(`ready`,!1)}get _defaultToMapOptions(){let e={include:new Set};if(!this.map)return e;this.map.ground&&e.include.add(U);for(let t of this.allLayerViews)(k(t.layer)&&(!has(`enable-feature:im-as-ground`)||t.layer.isUsedAsGroundLayer)||je(t.layer))&&e.include.add(t.uid);return e}get _defaultHitTestOptions(){let e={exclude:new Set};if(!this.map)return e;this.map.ground&&this.map.ground.opacity<1&&e.exclude.add(U);for(let t of this.allLayerViews)(has(`enable-feature:im-as-ground`)?k(t.layer)&&t.layer.isUsedAsGroundLayer:k(t.layer))&&t.fullOpacity<1&&e.exclude.add(t.uid);return e}static{this.type=`3d`}static clearStatics(){Mt(),ge(),ue(),St(),Xe(),Ve(),Se(),wt(),Ne(),_t(),xt(),Ze(),$e(),ve(),se(),bt(),gt(),Ke.cleanupI3SLodHandling(),Me.cleanupTilemapCache(),I.cleanupViewstate(),V.cleanupTerrainSurface()}};e([_({nonNullable:!0}),v(Pt)],Y.prototype,`options`,void 0),e([_()],Y.prototype,`_userClippingArea`,void 0),e([_()],Y.prototype,`_resourceController`,void 0),e([_()],Y.prototype,`stage`,null),e([_({readOnly:!0})],Y.prototype,`deconflictor`,void 0),e([_({readOnly:!0})],Y.prototype,`labeler`,void 0),e([_()],Y.prototype,`navigation`,void 0),e([_({type:Re,readOnly:!0})],Y.prototype,`animation`,null),e([_({readOnly:!0})],Y.prototype,`basemapTerrain`,void 0),e([_({readOnly:!0})],Y.prototype,`overlayManager`,null),e([_({readOnly:!0})],Y.prototype,`elevationProvider`,void 0),e([_()],Y.prototype,`camera`,null),e([_({type:t})],Y.prototype,`contentCamera`,null),e([_({readOnly:!0})],Y.prototype,`canvas`,null),e([_({type:S,useTypeForAutocast:!1})],Y.prototype,`center`,null),e([_({type:x})],Y.prototype,`clippingArea`,null),e([_({type:P,nonNullable:!0})],Y.prototype,`constraints`,void 0),e([_({type:x,readOnly:!0})],Y.prototype,`renderDataExtent`,null),e([_({readOnly:!0})],Y.prototype,`tileInfo`,null),e([_({type:x,readOnly:!0})],Y.prototype,`dataExtent`,null),e([_({type:x,readOnly:!0})],Y.prototype,`_groundAndLayersExtent`,null),e([_({type:F})],Y.prototype,`environment`,null),e([v(`environment`)],Y.prototype,`castEnvironment`,null),e([_({readOnly:!0})],Y.prototype,`environmentManager`,void 0),e([_({type:x})],Y.prototype,`extent`,null),e([_({type:r})],Y.prototype,`floors`,void 0),e([_()],Y.prototype,`screenCenter`,null),e([_()],Y.prototype,`frustum`,null),e([_({type:Number,readOnly:!0})],Y.prototype,`fullOpacity`,void 0),e([_({readOnly:!0})],Y.prototype,`graphicsView`,void 0),e([_()],Y.prototype,`analysisViewManager`,void 0),e([_()],Y.prototype,`groundView`,void 0),e([_({readOnly:!0})],Y.prototype,`layerviewCollections`,null),e([_({type:Boolean})],Y.prototype,`initialExtentRequired`,null),e([_()],Y.prototype,`defaultsFromMapSettings`,null),e([_()],Y.prototype,`interacting`,null),e([_()],Y.prototype,`stationary`,null),e([_()],Y.prototype,`navigating`,null),e([_()],Y.prototype,`map`,void 0),e([_()],Y.prototype,`padding`,null),e([_({type:B,readOnly:!0})],Y.prototype,`pointsOfInterest`,void 0),e([_()],Y.prototype,`_featureTiles`,void 0),e([_()],Y.prototype,`featureTiles`,null),e([_()],Y.prototype,`_featureTreeDebugger`,void 0),e([_({constructOnly:!0})],Y.prototype,`deactivatedWebGLExtensions`,void 0),e([_({constructOnly:!0})],Y.prototype,`debugWebGLExtensions`,void 0),e([_({constructOnly:!0})],Y.prototype,`renderCanvas`,void 0),e([_({constructOnly:!0})],Y.prototype,`state`,void 0),e([_()],Y.prototype,`screenSizePerspective`,void 0),e([_({readOnly:!0})],Y.prototype,`inputManager`,void 0),e([_({readOnly:!0})],Y.prototype,`stateManager`,void 0),e([_({type:[`low`,`medium`,`high`]})],Y.prototype,`qualityProfile`,null),e([_({type:z,get(){let e=this._get(`qualitySettings`);if(!e){let t=R(this.qualityProfile);e=new z(t)}return e}})],Y.prototype,`qualitySettings`,void 0),e([_()],Y.prototype,`slice`,void 0),e([_({readOnly:!0})],Y.prototype,`typeSpecificPreconditionsReady`,null),e([_({readOnly:!0})],Y.prototype,`renderCoordsHelper`,void 0),e([_({readOnly:!0})],Y.prototype,`sceneIntersectionHelper`,void 0),e([_({type:Number,readOnly:!0})],Y.prototype,`resolution`,null),e([_({type:Number})],Y.prototype,`scale`,null),e([_({readOnly:!0,type:Number})],Y.prototype,`terrainLevel`,null),e([_()],Y.prototype,`heightModelInfo`,null),e([_({type:w})],Y.prototype,`spatialReference`,void 0),e([_({type:Boolean,value:!1})],Y.prototype,`alphaCompositingEnabled`,null),e([_({constructOnly:!0})],Y.prototype,`preserveDrawingBufferEnabled`,void 0),e([_({type:Boolean})],Y.prototype,`supersampleScreenshotsEnabled`,void 0),e([_({readOnly:!0})],Y.prototype,`type`,void 0),e([_(),v(e=>e instanceof kt?e:b(At,e))],Y.prototype,`ui`,void 0),e([_({type:Boolean,readOnly:!0})],Y.prototype,`updating`,null),e([_()],Y.prototype,`_updatingObjects`,null),e([_()],Y.prototype,`_updatingObjectsWithProgress`,null),e([_()],Y.prototype,`_updatingObjectsToDebug`,null),e([_({type:Number,readOnly:!0})],Y.prototype,`updatingProgress`,void 0),e([_({type:[`global`,`local`]})],Y.prototype,`viewingMode`,null),e([_({type:n})],Y.prototype,`viewpoint`,null),e([_({readOnly:!0})],Y.prototype,`visibleArea`,null),e([_({type:Number})],Y.prototype,`zoom`,null),e([_({readOnly:!0})],Y.prototype,`quality`,null),e([_({readOnly:!0})],Y.prototype,`resolutionScale`,null),e([_()],Y.prototype,`focusAreasView`,void 0),e([_()],Y.prototype,`_defaultToMapOptions`,null),e([_()],Y.prototype,`_defaultHitTestOptions`,null),Y=q=e([pe(`esri.views.SceneView`)],Y);function X(e,t){return e!=null&&xe(e.spatialReference,t)?C(e,t):null}const Z=_e(),Q=le(),$=Te(),Ft=Ae(0,0,0,w.WebMercator),It={GraphicsView3D:()=>import(`./3d/layers/GraphicsView3D.js`),FocusAreasView:()=>import(`./3d/FocusAreasView.js`),FeatureTileTree3D:()=>import(`./3d/layers/support/FeatureTileTree3D.js`)},Lt=Y;export{Lt as default};
2
+ import{__decorate as e}from"tslib";import t from"../Camera.js";import n from"../Viewpoint.js";import r from"../core/Collection.js";import{byId as i}from"../core/domUtils.js";import a from"../core/Error.js";import{on as o}from"../core/events.js";import{destroyHandle as s,makeHandle as c}from"../core/handleUtils.js";import has from"../core/has.js";import l from"../core/Logger.js";import{mapCollectionAsync as ee}from"../core/mapCollectionUtils.js";import{destroyMaybe as u,maybeProperty as te}from"../core/maybe.js";import{throwIfDestroyed as ne,throwIfAborted as d,createAbortError as re}from"../core/promiseUtils.js";import ie from"../core/ReactiveSet.js";import{on as f,watch as p,initial as m,sync as h,whenOnce as ae,syncAndInitial as g}from"../core/reactiveUtils.js";import{setFrameDuration as oe,cleanupScheduling as se}from"../core/scheduling.js";import{createScreenPoint as ce,createScreenPointArray as le}from"../core/screenUtils.js";import{cleanupWhereClauseCache as ue}from"../core/sql.js";import{getDefaultVerticalUnitStringForSR as de,getMetersPerUnitForSR as fe}from"../core/units.js";import{property as _,cast as v,subclass as pe}from"../core/accessorSupport/decorators.js";import{ensureType as y,ensureClass as b}from"../core/accessorSupport/ensureType.js";import{overrideDefaultsFrom as me}from"../core/accessorSupport/overrideDefaultsFrom.js";import{runUntracked as he}from"../core/accessorSupport/tracking.js";import{drainNotificationQueue as ge}from"../core/accessorSupport/trackingUtils.js";import{create as _e}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{cleanupPooledRBush as ve}from"../core/libs/rbush/PooledRBush.js";import{initialize as ye}from"../core/workers/workers.js";import x from"../geometry/Extent.js";import be from"../geometry/HeightModelInfo.js";import S from"../geometry/Point.js";import{project as C,canProjectWithoutEngine as xe}from"../geometry/projectionUtils.js";import w from"../geometry/SpatialReference.js";import{cleanupSpatialReferenceEllipsoidUtils as Se}from"../geometry/spatialReferenceEllipsoidUtils.js";import{projectBoundingRect as Ce}from"../geometry/projection/projectBoundingRect.js";import{projectPointToVector as T}from"../geometry/projection/projectPointToVector.js";import{toExtent as we,create as Te}from"../geometry/support/aaBoundingRect.js";import{renderSRFromViewSR as Ee}from"../geometry/support/coordinateSystem.js";import{getResolutionForScale as De}from"../geometry/support/scaleUtils.js";import{wgs84 as Oe,webMercator as ke}from"../geometry/support/spatialReferenceUtils.js";import{makeDehydratedPoint as Ae}from"../layers/graphics/dehydratedPoint.js";import{isImageryTileLayer as E,isTiledLayer as D,isVoxelLayer as O,isIntegratedMeshLayer as k,isGaussianSplatLayer as je}from"../layers/support/layerUtils.js";import{TilemapCache as Me}from"../layers/support/TilemapCache.js";import{clearDefaultPortalInstance as Ne}from"../portal/portalDefault.js";import{WebSceneTag as Pe}from"../support/tagSymbols.js";import{BreakpointsOwner as Fe}from"./BreakpointsOwner.js";import{DOMContainer as Ie}from"./DOMContainer.js";import{PopupView as Le}from"./PopupView.js";import A from"./View.js";import Re from"./ViewAnimation.js";import{stringFromViewingMode as j,viewingModeFromString as M}from"./ViewingMode.js";import{GroundView3D as ze}from"./3d/GroundView3D.js";import{layerView3DImporter as N}from"./3d/layerViewModuleImportUtils.js";import{importAnalysisViewModule as Be}from"./3d/analysis/analysisViewModuleImportUtils.js";import{cleanupIntersectionUtils as Ve}from"./3d/camera/intersectionUtils.js";import P from"./3d/constraints/Constraints.js";import F from"./3d/environment/Environment.js";import{EnvironmentView as He}from"./3d/environment/EnvironmentView.js";import Ue from"./3d/input/SceneInputManager.js";import{GraphicsDeconflictor as We}from"./3d/layers/graphics/GraphicsDeconflictor.js";import{Labeler as Ge}from"./3d/layers/graphics/Labeler.js";import Ke from"./3d/layers/i3s/I3SLodHandling.js";import{Navigation3D as qe}from"./3d/navigation/Navigation3D.js";import{ScreenSizePerspective as Je}from"./3d/state/ScreenSizePerspective.js";import I from"./3d/state/ViewState.js";import{ViewStateManager as Ye,cleanupViewStateManager as Xe}from"./3d/state/ViewStateManager.js";import{cleanupPointToPointAnimationController as Ze}from"./3d/state/controllers/PointToPointAnimationController.js";import{SceneIntersectionHelper as Qe}from"./3d/state/helpers/SceneIntersectionHelper.js";import{cleanupNavigationUtils as $e}from"./3d/state/utils/navigationUtils.js";import et from"./3d/support/Attribution3D.js";import{CombinedElevationProvider as tt}from"./3d/support/CombinedElevationProvider.js";import{debugFlags as L}from"./3d/support/debugFlags.js";import{getElevationAtPoint as nt}from"./3d/support/ElevationProvider.js";import{GroundAndIMSurface as rt}from"./3d/support/GroundAndIMSurface.js";import{toMap as it,hitTest as at}from"./3d/support/hitTest.js";import{popupHitTest as ot}from"./3d/support/popupHitTest.js";import{getDefaultQualityProfileName as st,getQualityProfileSettings as R}from"./3d/support/QualityProfile.js";import z from"./3d/support/QualitySettings.js";import{RenderCoordsHelper as ct}from"./3d/support/RenderCoordsHelper.js";import{newResourceController as lt}from"./3d/support/ResourceController.js";import ut from"./3d/support/SceneViewPerformanceInfo.js";import{SharedSymbolResources as dt}from"./3d/support/SharedSymbolResources.js";import{ViewSlice as ft}from"./3d/support/ViewSlice.js";import{PointsOfInterest as B}from"./3d/support/pointsOfInterest/PointsOfInterest.js";import V from"./3d/terrain/TerrainSurface.js";import{isSurfaceLayerView as pt,getTiledLayerInfo as mt,checkIfTileInfoSupportedForView as ht}from"./3d/terrain/terrainUtils.js";import{clearTilePerLayerInfo as gt}from"./3d/terrain/TilePerLayerInfo.js";import{cleanupTileRenderer as _t}from"./3d/terrain/TileRenderer.js";import{Stage as vt}from"./3d/webgl-engine/Stage.js";import{olidEnabled as yt}from"./3d/webgl-engine/effects/geometry/olidUtils.js";import{cleanupRenderOccluded as bt}from"./3d/webgl-engine/effects/geometry/RenderOccluded.js";import{defaultTolerance as H}from"./3d/webgl-engine/lib/Intersector.js";import{cleanupShadowmap as xt}from"./3d/webgl-engine/lib/ShadowMap.js";import{terrainId as U}from"./3d/webgl-engine/lib/verticalOffsetUtils.js";import{cleanupEdgeProcessing as St}from"./3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js";import W from"./interactive/options/ViewOptions.js";import Ct from"./support/AnalysisViewManager.js";import{cleanupDrapedUtils as wt}from"./support/drapedUtils.js";import{occludeesSupported as Tt}from"./support/layerViewUtils.js";import{isSupportedScreenPointEvent as G,createScreenPointFromSupportedEvent as K}from"./support/screenUtils.js";import{isSpatialReferenceSupported as Et}from"./support/spatialReferenceSupport.js";import{initializeTextureCompressionWorker as Dt,destroyTextureCompressionWorker as Ot}from"./support/TextureCompressionHelper.js";import kt from"./ui/DefaultUI.js";import At from"./ui/3d/DefaultUI3D.js";import jt from"../webscene/Environment.js";import{clearVNodeCache as Mt}from"../widgets/support/vnodeCache.js";var q;const Nt=Symbol(),J=Symbol();function Pt(e){let t=b(W,e);return t!==e&&e.snapping?.enabled==null&&(t.snapping.enabled=!0),t}let Y=class extends Fe(Le(Ie(A))){static{q=this}get timeZone(){return super.timeZone}set timeZone(e){super.timeZone=e}constructor(e){super(e),this.options=new W({snapping:{enabled:!0}}),this._userClippingArea=null,this._clippingArea=null,this._overrideDefaultEnvironmentOnly=!0,this._resolveWhenReady=[],this._resourceController=lt(this),this.deconflictor=new We({view:this}),this.attribution3D=new et({view:this}),this.labeler=new Ge({view:this,deconflictor:this.deconflictor.labels}),this.sharedSymbolResources=null,this.navigation=new qe({view:this}),this.basemapTerrain=null,this.elevationProvider=new tt({view:this}),this._canvas=null,this.constraints=new P,this._environment=new F,this.environmentView=new He,this.floors=new r,this.fullOpacity=1,this.graphicsView=null,this.analysisViewManager=new Ct({importAnalysisViewModule:e=>Be(e),view:this}),this.groundView=null,this.groundAndIMSurface=null,this.map=null,this._featureTileTreeClients=new ie,this._featureTiles=null,this._featureTreeDebugger=null,this.state=new I({view:this}),this.slice=new ft,this.spatialReference=null,this.preserveDrawingBufferEnabled=!1,this.supersampleScreenshotsEnabled=!0,this.type=`3d`,this.ui=new At,this._numUpdating=0,this._lastUpdateTime=0,this.updatingProgress=.5,this._importControllers=new Map,ye();let t=()=>this._updatingChanged();this.addHandles(s(ee(()=>this.map?.allLayers,async e=>{try{await e.when()}catch{}finally{t()}}))),this.addHandles([f(()=>this.map?.allLayers,`after-changes`,t,{onListenerAdd:t,onListenerRemove:t,sync:!0}),this.allLayerViews.on(`after-changes`,e=>this._updateUpdatingMonitors(e)),p(()=>this.scene,e=>e?.load().catch(()=>{}))]),this.inputManager=new Ue({view:this}),this.stateManager=new Ye({view:this}),this.screenSizePerspective=new Je({view:this})}initialize(){if(has(`enable-feature:esri-compress-textures`)&&has(`wasm-simd`)){let e=Dt(this,this.resourceController);this.addResolvingPromise(e.promise)}this.groundView=new ze({view:this}),this.groundAndIMSurface=new rt({view:this}),this._updateUpdatingMonitors(),this.updatingHandles.add(()=>this.qualitySettings.memoryLimit,e=>{this.resourceController&&(this.resourceController.memoryController.maxMemory=e)},m),this.updatingHandles.add(()=>this.qualitySettings.additionalCacheMemory,e=>{this.resourceController&&(this.resourceController.memoryController.additionalCacheMemory=e)},m),this.updatingHandles.add(()=>this.qualitySettings.frameRate??0,e=>oe(e>0?1e3/Math.ceil(e):0),m),this.addHandles([p(()=>this.spatialReference,()=>this.notifyChange(`clippingArea`),h),p(()=>({plane:this.slice.plane,isDecoration:this.slice.isDecoration}),()=>this._updateSlice(),h)])}destroy(){this.destroyed||(Ot(this),this.updatingHandles.removeAll(),this.basemapTerrain?.clearHandles(),this.elevationProvider.destroy(),this.ui.removeAllHandles(),this.layerViewManager.clearHandles(),this.invalidate(),this.layerViewManager.clear(),this._set(`analysisViewManager`,u(this.analysisViewManager)),this._exitSurface(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this.sharedSymbolResources=u(this.sharedSymbolResources),this._set(`labeler`,u(this.labeler)),this._set(`deconflictor`,u(this.deconflictor)),this._resourceController=u(this._resourceController),this._set(`stateManager`,u(this.stateManager)),this._set(`inputManager`,u(this.inputManager)),this.state.destroy(),this.highlights.destroy(),this.removeHandles(`updatingMonitors`),this._set(`environmentView`,u(this.environmentView)),this._set(`environment`,u(this.environment)),this.groundView=u(this.groundView),this.groundAndIMSurface.destroy(),this.slice.destroy(),this._updatingObjectsWithProgress.length=0,this._updatingObjects.length=0,this.ui?.destroy(),this._set(`ui`,null),this._set(`renderCanvas`,null),this._set(`canvas`,null),this._canvas=null,this.screenSizePerspective.destroy(),this.attribution3D.destroy())}get stage(){return this._stage}get renderSpatialReference(){return this.renderCoordsHelper?.spatialReference}get groundSpatialReference(){return this.groundView?.spatialReference}get analyses(){return super.analyses}set analyses(e){super.analyses=e}get animation(){return this.state?.animation}get overlayManager(){return this.basemapTerrain?.overlayManager}get camera(){return this.stateManager?.camera}set camera(e){this.stateManager&&(this.stateManager.camera=e)}get contentCamera(){return this.stateManager?.contentCamera}set contentCamera(e){this.stateManager&&(this.stateManager.contentCamera=e)}installContentCameraReset(e={sticky:!1}){return this.stateManager.installContentCameraReset(e)}get canvas(){return this._canvas}get center(){return this.stateManager?.center}set center(e){this.stateManager&&(this.stateManager.center=y(S,e))}get clippingArea(){if(this.viewingMode===`global`)return null;let e=this.map,t=this._userClippingArea||te(e,`clippingArea`);return!(this._userClippingArea||te(e,`clippingEnabled`))||t==null?(this._clippingArea=null,null):t instanceof x?this.spatialReference&&(t=X(t,this.spatialReference),t==null)?(l.getLogger(this).error(`#clippingArea`,`setting clippingArea with incompatible SpatialReference`),this._clippingArea):(t=t.clone(),t.intersection(this._groundAndLayersExtent)??(t.xmin=t.xmax,t.ymin=t.ymax),t.zmin=void 0,t.zmax=void 0,t.equals(this._clippingArea)||(this._clippingArea=t),this._clippingArea):(l.getLogger(this).error(`#clippingArea`,`only clippingArea geometries of type Extent are supported`),this._clippingArea)}set clippingArea(e){this.ready&&this.viewingMode===`global`&&e!=null?l.getLogger(this).error(`#clippingArea=`,`Clipping area is only supported in local viewingMode`):this._userClippingArea=e}get renderDataExtent(){if(this.state.viewingMode===1)return null;let e=this.renderSpatialReference,t=this.dataExtent;return t==null||e==null||t.spatialReference.equals(e)?t:X(t,e)}get tileInfo(){return this.basemapTerrain?.tilingScheme?.toTileInfo()}get dataExtent(){let e=this._groundAndLayersExtent,t=this.spatialReference||w.WGS84,n=X(this.clippingArea,t);n!=null&&(e=e==null?n:e.intersection(n));let r=this._get(`dataExtent`);return e!=null&&e.equals(r)?r:e}get _groundAndLayersExtent(){let e=this.spatialReference||w.WGS84,t,n=n=>{let r=X(n,e);r!=null&&(t==null?t=r.clone():t.union(r))},{groundView:r}=this,i=r?.spatialReference,a=r?.fullGroundExtent;i&&a&&n(new x({xmin:a[0],ymin:a[1],zmin:0,xmax:a[2],ymax:a[3],zmax:0,spatialReference:i}));let o=e=>{e.fullExtent!=null&&(e.type!==`graphics`||!e.internal)&&n(e.fullExtent)};if(this.map?.allLayers.forEach(e=>o(e)),t==null)return null;t.hasZ?(t.zmin=Math.min(0,t.zmin??0),t.zmax=Math.max(0,t.zmax??0)):(t.zmin=0,t.zmax=0);let s=this._get(`_groundAndLayersExtent`);return t.equals(s)?s:t}get environment(){return this._environment}set environment(e){if(this._environment===e)return;let{_environment:t}=this;this._environment=null,t?.destroy(),this._environment=e,this.notifyChange(`environment`)}castEnvironment(e){return e?e instanceof F?e:e instanceof jt?this.environment?.cloneWithWebsceneEnvironment(e)??F.fromWebsceneEnvironment(e):y(F,e):new F}get extent(){return this.stateManager?.extent}set extent(e){this.stateManager&&(this.stateManager.extent=e)}get screenCenter(){return this.stateManager?.screenCenter}get frustum(){return this.stateManager?.frustum}get layerviewCollections(){return[this.basemapView?.baseLayerViews,this.basemapView?.groundLayerViews,this.groundView?.layerViews,this.layerViews,this.basemapView?.referenceLayerViews]}get _layerToLayerviewMapping(){return q._layerToLayerview}static{this._layerToLayerview=A._layerToLayerview.concat([[`view.map.ground.layers`,`view.groundView.layerViews`]])}get initialExtentRequired(){return this.stateManager&&!this.stateManager.hasInitialView}get defaultsFromMapSettings(){return{required:{tileInfo:!1,heightModelInfo:!0,extent:!1}}}get interacting(){return this.navigating||(this.toolViewManager?.interacting??!1)}get stationary(){return!this.animation&&!this.resizing&&(this.state?.stationary??!0)}get navigating(){return this.state?.navigating??!1}get scene(){return this.map&&Pe in this.map?this.map:null}get padding(){return this.stateManager?.padding}set padding(e){this.stateManager&&(this.stateManager.padding=e)}get featureTiles(){return this._featureTiles}set qualityProfile(e){let t=R(e);t&&this._get(`qualityProfile`)!==e&&(this.qualitySettings=new z(t),this.stage?.renderView.updateQualitySettings(this.qualitySettings),this._set(`qualityProfile`,e))}get qualityProfile(){return this._get(`qualityProfile`)||st()}_updateSlice(){this.stage!=null&&(this.stage.renderer.slice=this.slice)}get typeSpecificPreconditionsReady(){return this.viewingMode?!!this.stateManager?.preinit(this.spatialReference):!1}get resolution(){let{scale:e,spatialReference:t}=this;return t?he(()=>De(e,t)):0}get scale(){return this.stateManager?.scale}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get terrainLevel(){let e=this.basemapTerrain?.tilingScheme,t=this.scale;if(!e||!t)return null;let n=e.levelAtScale(t)+this.qualitySettings.tiledSurface.lodBias,r=e.getMaxLod();return n<=0?null:Math.max(0,Math.min(n,r||1/0))}get heightModelInfo(){let e=this.getDefaultHeightModelInfo();if(!e)return null;let t=de(this.spatialReference);if(t&&e.heightUnit!==t)return new be({heightModel:e.heightModel,heightUnit:t,vertCRS:e.vertCRS,associatedSpatialReference:e.associatedSpatialReference});if(!e.associatedSpatialReference){let t=e.clone();return t.associatedSpatialReference=this.spatialReference,t}return e}get alphaCompositingEnabled(){return this._get(`alphaCompositingEnabled`)}set alphaCompositingEnabled(e){this._stage&&l.getLogger(this).warn(`alphaCompositingEnabled cannot be changed after the view has become ready`),this._set(`alphaCompositingEnabled`,e)}get updating(){if(this.destroying||this.destroyed)return!1;if(!this.initialized)return!0;let e=0,t=this.layerViewManager.updating,n=t?this.layerViewManager.updatingRemaining:0;this.allLayerViews.forEach(r=>{if(!r.isFulfilled())++n;else if(r.updating){if(t=!0,r.suspended||pt(r))return;++n,e+=r.updatingProgress}});let r=.1;for(let t of this._updatingObjects)t?.updating&&(n+=r,e+=.5*r);for(let t of this._updatingObjectsWithProgress)t?.updating&&(++n,e+=t.updatingProgress);let i=!this.stateManager.test.updatingIgnoreRenderState&&this.state.updating;if(t=!!(t||n>0||this.updatingHandles.updating||!this.ready||!this.stationary||i||this._importControllers.size>0||this.inputManager?.updating||this.map?.allLayers?.some(e=>!e.isFulfilled())),t?(this._numUpdating=Math.max(n,this._numUpdating),e+=this._numUpdating-n):this._numUpdating=0,this._numUpdating>0?e/=this._numUpdating:e=+!t,this._get(`updatingProgress`)!==e){let n=performance.now();if(e<1){let t=Math.min((n-this._lastUpdateTime)/2e3,1);e=this.updatingProgress*(1-t)+e*t}this._set(`updatingProgress`,e),this._lastUpdateTime=t&&e<1?n:0}return L.UPDATING&&console.log(`Updating:`,this._updatingObjectsToDebug.filter(e=>e!=null&&e.updating).map(({declaredClass:e})=>e)),t}get _updatingObjects(){return[this.graphicsView,this.basemapView,this._resourceController,this.stage,this.featureTiles,this.pointsOfInterest,this.environmentView,this.overlay,this._featureTreeDebugger,this.toolViewManager,this.analysisViewManager,this.focusAreasView]}get _updatingObjectsWithProgress(){return[this.deconflictor,this.labeler,this.basemapTerrain]}get _updatingObjectsToDebug(){return L.UPDATING?this._updatingObjects.concat(this._updatingObjectsWithProgress).concat(this.allLayerViews.toArray()):[]}get viewingMode(){let e=this._predeterminedViewingMode;if(e!=null)return j(e);let t=this.spatialReference;return t?this.defaultsFromMap?.viewingMode!=null&&t.equals(this.defaultsFromMap.spatialReference)?j(this.defaultsFromMap.viewingMode):Et(t,1)?`global`:`local`:`global`}set viewingMode(e){this.ready?l.getLogger(this).error(`#viewingMode`,`viewingMode cannot be set once view is ready`):this._overrideIfSome(`viewingMode`,e)}get viewpoint(){return this.stateManager?.viewpoint}set viewpoint(e){this.stateManager&&(this.stateManager.viewpoint=e)}get visibleArea(){return this.stateManager?.visibleArea}get zoom(){return this.stateManager.zoom}set zoom(e){this.stateManager&&(this.stateManager.zoom=e)}get resourceController(){return this._resourceController}get quality(){return this._resourceController?.memoryController?.memoryFactor??1}get resolutionScale(){return Math.sqrt(Math.min(1,this.quality/.75))}get performanceInfo(){return new ut(this)}on(e,t,n,r){return this.viewEvents.on(e,t,n,r)||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}toMap(e,t){if(!this.ready)return l.getLogger(this).error(`#toMap()`,`Scene view cannot be used before it is ready`),null;let n=G(e)?K(this,e):e;return it(this,n,t,this._defaultToMapOptions)}toScreen(e){if(!this.ready)return l.getLogger(this).error(`#toScreen()`,`Scene view cannot be used before it is ready`),null;let t=e;return e.z??(t=Ft,t.x=e.x,t.y=e.y,t.z=nt(this.elevationProvider,e)??0,t.spatialReference=e.spatialReference),T(t,Z,this.renderSpatialReference),this.state.camera.projectToScreen(Z,Q),ce(Q[0],Q[1])}pixelSizeAt(e,t){if(!this.ready)return l.getLogger(this).error(`#pixelSizeAt()`,`Scene view cannot be used before it is ready`),null;if(!e)return 0;let n=this.renderSpatialReference;T(e,Z,n);let r=this.state.camera.computeScreenPixelSizeAt(Z);return t&&n!==t?r*fe(n)/fe(t):r}overlayPixelSizeInMapUnits(e){return this.overlayManager?.overlayPixelSizeInMapUnits(e,()=>this.pixelSizeAt(e))??1}hitTest(e,t){if(!this.ready)return l.getLogger(this).error(`#hitTest()`,`Scene view cannot be used before it is ready`),null;let n=G(e)?K(this,e):e;return at(this,n,t,this._defaultHitTestOptions)}async popupHitTest(e){return ot(this,e)}goTo(e,t){return this.updatingHandles.addPromise(this.stateManager.goTo(e,t))}async zoomIn(){if(this.canZoomIn)return this.navigation.zoom(!0)}async zoomOut(){if(this.canZoomOut)return this.navigation.zoom(!1)}async whenAnalysisView(e){if(e.parent==null)throw new a(`view:no-analysisview-for-analysis`,`The analysis does not exist in view.analyses`,{analysis:e});switch(e.parent.type){case`line-of-sight`:case`dimension`:case`viewshed`:return(await this.whenLayerView(e.parent)).whenAnalysisView();default:return this.analysisViewManager.whenAnalysisView(e)}}whenLayerView(e){return super.whenLayerView(e)}async takeScreenshot(e){let t=await this._completeSettings(e);await this.whenReady();let n=(await this.stage.renderView.takeScreenshot(t))[0];return(await import(`./support/screenshotUtils.js`)).encode(n,t,this._pixelFormat())}async _takeScreenshot(e){let t=await this._completeSettings(e);await this.whenReady();let n=(await this.stage.renderView.takeScreenshot(t))[0];return(await import(`./support/screenshotUtils.js`)).encodeData(n,this._pixelFormat())}async _takeScreenshotWithObjectAndLayerId(e){let t=await this._completeSettings(e);t.olidColor=!0,await this.whenReady();let n=await this.stage.renderView.takeScreenshot(t),{encodeData:r}=await import(`./support/screenshotUtils.js`);return[r(n[0],this._pixelFormat()),r(n[1],this._pixelFormat())]}async _completeSettings(e){let{toRenderSettings:t,screenshotSuperSampleSettings:n}=await import(`./support/screenshotUtils.js`),r=t(e,this);return r.pixelRatio/=this.state.pixelRatio,n(r,this.supersampleScreenshotsEnabled,this.padding)}_pixelFormat(){return{flipY:!0,premultipliedAlpha:this.stage?.renderView.getAlpha()??!1}}get test(){}async takeScreenshotWithObjectAndLayerId(e){if(!yt())throw new a(`360vr:objectAndLayerId-rendering-disabled`,`has enable-feature:objectAndLayerId-rendering must be true`);let{encode:t}=await import(`./support/screenshotUtils.js`),n=await this._completeSettings(e);n.olidColor=!0,await this.whenReady();let r=await this.stage.renderView.takeScreenshot(n),i=t(r[0],n,this._pixelFormat()),o=await this._completeSettings(e);return o.format=`png`,[i,t(r[1],o,this._pixelFormat())]}getColorToObjectAndLayerIdMapping(){let e=this.stage.renderView.olidRenderHelper;if(e)return e.getColorToObjectAndLayerIdMapping();throw new a(`360vr:objectAndLayerId-rendering-disabled`,`has enable-feature:objectAndLayerId-rendering must be true`)}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}getAttributionItems(){return super.getAttributionItems().concat(this.attribution3D.attributionItems)}importLayerView(e){return N.importLayerView(e)}hasLayerViewModule(e){return N.hasLayerViewModule(e)}forceDOMReadyCycle(){this.forceReadyCycle()}getWebDocumentSpatialReference(){return this.scene?.initialViewProperties?.spatialReference}getDefaultTimeZone(){return this.scene?.initialViewProperties?.timeZone??null}getSurface(){return this.surface}get _predeterminedViewingMode(){let e=this._isOverridden(`viewingMode`)?this._get(`viewingMode`):this.scene?.initialViewProperties?.viewingMode;return e==null?null:M(e)}getSpatialReferenceSupport(e,t){let n=this._predeterminedViewingMode,r=r=>this._validateSpatialReferenceForViewingMode(e,t,r)?this._makeSpatialReferenceConstraints(e,t,r,n):null,i=n?r(n):[...r(1)??[],...r(2)??[]];return i?.length?{constraints:i}:null}_validateSpatialReferenceForViewingMode(e,t,n){return Et(e,n)?t==null||E(t)?!0:!(D(t)&&mt(t,e,n)==null||O(t)&&n===1):!1}_makeSpatialReferenceConstraints(e,t,n,r){if(t==null)return[{spatialReference:e,viewingMode:n}];let{isWebMercator:i,isWGS84:a,vcsWkid:o,latestVcsWkid:s}=e,c=()=>o==null?i?w.WGS84:w.WebMercator:new w({...i?Oe:ke,vcsWkid:o,latestVcsWkid:s});return E(t)&&(i||a)?!(a&&r!==2)||ht(t.tileInfo,t.fullExtent,e,1)===null?[{spatialReference:e,viewingMode:n},{spatialReference:c(),viewingMode:n}]:[{spatialReference:c(),viewingMode:n}]:!D(t)&&!O(t)&&(i||a)?[{spatialReference:e,viewingMode:n},{spatialReference:c(),viewingMode:n}]:D(t)&&i&&n!==1?[{spatialReference:e,viewingMode:n},{spatialReference:c(),viewingMode:2}]:[{spatialReference:e,viewingMode:n}]}_validateSpatialReference(e){let t=this.getSpatialReferenceSupport(e)!=null,n=this._predeterminedViewingMode;return t||(n==null?e.isGeographic&&l.getLogger(this).warnOnce(`Spatial reference is geographic but not supported.`):l.getLogger(this).warnOnce(`Spatial reference defined on view not supported in ${j(n)} viewing mode.`)),t}whenReady(){return new Promise(e=>{this.ready?e(this):this._resolveWhenReady.push(e)})}trackGraphicState(e){if(!e.graphic)return l.getLogger(this).error(`trackGraphicState`,`GraphicState.graphic must not be null or undefined to start tracking`),null;let t=this.getViewForGraphic(e.graphic),n=null,r=!1,i=t=>{!r&&t!=null&&`processor`in t&&t.processor?.type===`graphics-3d`&&t.processor.graphicsCore&&(n=t.processor.graphicsCore.trackGraphicState(e))};return t==null?this.whenViewForGraphic(e.graphic,{waitForLayer:!0}).then(e=>i(e),()=>{}).catch(()=>{}):i(t),c(()=>{r=!0,n!=null&&(n.remove(),n=null)})}maskOccludee(e){if(!e)return l.getLogger(this).error(`maskOccludee`,`GraphicState.graphic must not be null or undefined to mask an occludee`),null;let t=this.getViewForGraphic(e),n=null,r=!1,i=t=>{!r&&t!=null&&Tt(t)&&(n=t.maskOccludee(e))};return t==null?this.whenViewForGraphic(e,{waitForLayer:!0}).then(e=>i(e),()=>{}).catch(()=>{}):i(t),c(()=>{r=!0,n!=null&&(n.remove(),n=null)})}getViewForGraphic(e){return e.layer===this?this.graphicsView:e.layer?this.allLayerViews.filter(e=>e.type!==`media-3d`).find(t=>t.layer===e.layer):null}graphicChanged(e){this.graphicsView!=null&&this.graphicsView.graphicChanged(e)}async whenViewForGraphic(e,t){return e.layer===this?(await ae(()=>this.graphicsView),this.graphicsView):!e.layer||!this.map?null:!t||!t.waitForLayer||this.map.allLayers.includes(e.layer)?this.whenLayerView(e.layer):new Promise((t,n)=>{let r=this.map.allLayers.on(`change`,i=>{i.added.includes(e.layer)&&(r.remove(),this.whenLayerView(e.layer).then(t,n))})})}enableFeatureTiles(){let e=Symbol();return this._featureTileTreeClients.add(e),c(()=>this._featureTileTreeClients.delete(e))}async _importModule(e,t){let n=new AbortController;this._importControllers.set(e,n),this._updatingChanged();try{let r=await It[e]();if(t&&(ne(this),d(n.signal),await t(n.signal)),this.destroyed)throw re();return d(n.signal),r}catch{return null}finally{this._importControllers.delete(e),this._updatingChanged()}}_abortImport(e){this._importControllers.get(e)?.abort(),this._importControllers.delete(e),this._updatingChanged()}_initBasemapTerrain(){this._set(`basemapTerrain`,new V({view:this})),this.elevationProvider.register(0,this.basemapTerrain)}_exitBasemapTerrain(){let{basemapTerrain:e,elevationProvider:t}=this;e&&(this._set(`basemapTerrain`,null),t.unregister(e),e.destroy())}_initGlobe(){this._initCoordinateSystem(),this.state.createInitialCamera(),this._initBasemapTerrain(),this._set(`pointsOfInterest`,new B({view:this})),this.addHandles([this.updatingHandles.add(()=>L.FEATURE_TILE_TREE_SHOW_TILES,e=>{e&&!this._featureTreeDebugger?this.updatingHandles.addPromise(import(`./3d/layers/support/FeatureTileTree3DDebugger.js`)).then(({FeatureTileTree3DDebugger:e})=>{!this._featureTreeDebugger&&L.FEATURE_TILE_TREE_SHOW_TILES&&(this._featureTreeDebugger=new e({view:this}))}):e||(this._featureTreeDebugger=u(this._featureTreeDebugger))},g),this.updatingHandles.add(()=>({basemapExtent:this.groundView?.groundExtent,basemapSpatialReference:this.groundView?.spatialReference,clippingArea:this.clippingArea,featureTiles:this._featureTiles}),({basemapExtent:e,basemapSpatialReference:t,clippingArea:n,featureTiles:r})=>{if(!r)return;let i=!!e;if(!n&&!i)r.filterExtent=null;else if(!i||!t)r.filterExtent=n;else{let i=e&&t?C(we(e,t),this.spatialReference):null;r.filterExtent=n?n.intersection(i):i}},g),this.updatingHandles.add(()=>this._featureTileTreeClients.size>0,e=>{e?this.updatingHandles.consumePromise(this._ensureFeatureTileTree()):this._featureTiles=u(this._featureTiles)},h)],Nt),this.stateManager.init()}async _ensureFeatureTileTree(){if(this._featureTiles||this._importControllers.has(`FeatureTileTree3D`))return;let e=(await this.updatingHandles.addPromise(this._importModule(`FeatureTileTree3D`)))?.FeatureTileTree3D;e&&(this._featureTiles=new e({renderCoordsHelper:this.renderCoordsHelper,pointsOfInterest:this.pointsOfInterest,viewState:this.state,scheduler:this._resourceController.scheduler,terrain:this.basemapTerrain}),this._updatingChanged())}_exitTerrain(){this.stateManager.exit(),this.removeHandles(J),this.removeHandles(Nt),this._featureTiles=u(this.featureTiles),this._set(`pointsOfInterest`,u(this.pointsOfInterest)),this._exitBasemapTerrain(),this.state.reset(),this._exitCoordinateSystem()}_initCoordinateSystem(){if(this.spatialReference){let e=this.spatialReference,t=this.state.isGlobal,n=Ee(t,e);n!==this.renderSpatialReference&&(this._set(`renderCoordsHelper`,ct.create(this.state.viewingMode,n)),t||this.addHandles(p(()=>this.groundView?.groundExtent,e=>{let t=this.renderCoordsHelper.spatialReference;e!=null&&(e[0]!==0||e[1]!==0||e[2]!==0||e[3]!==0)&&Ce(e,this.groundView.spatialReference,$,t)&&(this.renderCoordsHelper.extent=$)},h),J),this.sceneIntersectionHelper&&this.sceneIntersectionHelper.setTolerance(H/this.renderCoordsHelper.unitInMeters))}else this._set(`renderCoordsHelper`,null)}_exitCoordinateSystem(){this.removeHandles(J),this._set(`renderCoordsHelper`,null)}_updatingChanged(){this.notifyChange(`updating`)}_updateUpdatingMonitors(e=null){(e==null||e.type!==4)&&(this.removeHandles(`updatingMonitors`),this.allLayerViews.forEach(e=>{e.destroyed||(this.addHandles(p(()=>[e.updating,e.updatingProgress],()=>this._updatingChanged(),h),`updatingMonitors`),e.when(()=>this._updatingChanged(),()=>this._updatingChanged()))}),this._updatingChanged())}async _prepareScreenshotOverlay(){this.overlay&&await this.overlay.prepare()}_renderScreenshotOverlay(e,t,n){if(!this.overlay||!this.overlay.hasVisibleItems)return n;let r=e.getContext(`2d`,{willReadFrequently:!0});return r.putImageData(n,0,0),this.overlay.renderCanvas(e,{disableDecorations:t}),r.getImageData(0,0,n.width,n.height)}_initStage(){let e={deactivatedWebGLExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions,alpha:this.alphaCompositingEnabled,preserveDrawingBuffer:this.preserveDrawingBufferEnabled,canvas:this.renderCanvas,screenshot:{prepareOverlay:()=>this._prepareScreenshotOverlay(),renderOverlay:(e,t,n)=>this._renderScreenshotOverlay(e,t,n)}},t=new Qe(this.state.viewingMode,e=>this.stage.layers.forEach(e),this);this._set(`sceneIntersectionHelper`,t);let n=i(this.surface);this._stage=new vt({view:this,options:e,container:n}),this.notifyChange(`stage`),this._updateSlice(),this.addHandles([this.on(`pointer-move`,()=>this.stage?.renderer.resetAnimation()),o(this.stage.renderView.canvas,`webglcontextlost`,e=>{this.fatalError=new a(`webgl-context-lost`,e.statusMessage||`WebGL context lost`)})],`stage`),this.renderCoordsHelper&&this.sceneIntersectionHelper.setTolerance(H/this.renderCoordsHelper.unitInMeters),this._set(`canvas`,this.stage.renderView.canvas)}_exitStage(){this.sceneIntersectionHelper?.destroy(),this._set(`sceneIntersectionHelper`,null),this._stage=u(this.stage),this._set(`stage`,null),this.removeHandles(`stage`),this._set(`canvas`,null)}_initSurface(){this._exitSurface(),this._initStage(),this._initGlobe(),this.sharedSymbolResources=new dt({view:this,resourceController:this._resourceController})}_exitSurface(){this.sharedSymbolResources&&(this.sharedSymbolResources.objectResourceCache.destroy(),this.sharedSymbolResources.destroy(),this.sharedSymbolResources=null,this._exitTerrain(),this._exitStage())}async _ensureGraphicsView(){if(this.graphicsView||this._importControllers.has(`GraphicsView3D`)||this.graphics.length===0)return;this.removeHandles(`GraphicsView3D`);let e=(await this.updatingHandles.addPromise(this._importModule(`GraphicsView3D`,e=>ae(()=>this.groundView?.ready,e))))?.default;e&&this._set(`graphicsView`,new e({view:this,getGraphics:()=>this.graphics})),this._updatingChanged()}_disposeGraphicsView(){this._abortImport(`GraphicsView3D`),this.removeHandles(`GraphicsView3D`),this.graphicsView&&(this.removeHandles(this.graphicsView.processor.layer.id),this.graphicsView.destroy(),this._set(`graphicsView`,null))}_disposeFocusAreasView(){this._abortImport(`FocusAreasView`),this.removeHandles(`FocusAreasView`),this.focusAreasView=u(this.focusAreasView)}async _ensureFocusAreasView(e){if(this.focusAreasView||this._importControllers.has(`FocusAreasView`)||e===0)return;this.removeHandles(`FocusAreasView`);let t=(await this.updatingHandles.addPromise(this._importModule(`FocusAreasView`)))?.FocusAreasView;t&&(this.focusAreasView=new t({view:this})),this._updatingChanged()}_startup(){M(this.viewingMode)===1&&(this._clippingArea=null),this._initSurface(),this._set(`ready`,!0),this.addHandles(f(()=>this.graphics,`after-changes`,()=>this._ensureGraphicsView()),`GraphicsView3D`),this._ensureGraphicsView(),this.addHandles(this.updatingHandles.add(()=>this.map?.focusAreas?.areas.length??0,e=>this._ensureFocusAreasView(e),{initial:!0}),`FocusAreasView`);let e=this.scene?.initialViewProperties??null,t=e?.environment;t&&(this._overrideDefaultEnvironmentOnly?me(this.environment,t):this.environment=this.environment.cloneWithWebsceneEnvironment(t)),this.timeExtent=e?.timeExtent,e?.analyses.applyTo(this),this.labeler.setup(),this.environmentView.connectView(this),this.inputManager.connect();let n=this._resolveWhenReady;this._resolveWhenReady=[],n.forEach(e=>e(this))}_teardown(){this.inputManager.disconnect(),this.environmentView.disconnectView(),this._overrideDefaultEnvironmentOnly=!1,this.labeler.dispose(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this._exitSurface(),this._set(`ready`,!1)}get _defaultToMapOptions(){let e={include:new Set};if(!this.map)return e;this.map.ground&&e.include.add(U);for(let t of this.allLayerViews)(k(t.layer)&&(!has(`enable-feature:im-as-ground`)||t.layer.isUsedAsGroundLayer)||je(t.layer))&&e.include.add(t.uid);return e}get _defaultHitTestOptions(){let e={exclude:new Set};if(!this.map)return e;this.map.ground&&this.map.ground.opacity<1&&e.exclude.add(U);for(let t of this.allLayerViews)(has(`enable-feature:im-as-ground`)?k(t.layer)&&t.layer.isUsedAsGroundLayer:k(t.layer))&&t.fullOpacity<1&&e.exclude.add(t.uid);return e}static{this.type=`3d`}static clearStatics(){Mt(),ge(),ue(),St(),Xe(),Ve(),Se(),wt(),Ne(),_t(),xt(),Ze(),$e(),ve(),se(),bt(),gt(),Ke.cleanupI3SLodHandling(),Me.cleanupTilemapCache(),I.cleanupViewstate(),V.cleanupTerrainSurface()}};e([_({nonNullable:!0}),v(Pt)],Y.prototype,`options`,void 0),e([_()],Y.prototype,`_userClippingArea`,void 0),e([_()],Y.prototype,`_resourceController`,void 0),e([_()],Y.prototype,`stage`,null),e([_({readOnly:!0})],Y.prototype,`deconflictor`,void 0),e([_({readOnly:!0})],Y.prototype,`labeler`,void 0),e([_()],Y.prototype,`navigation`,void 0),e([_({type:Re,readOnly:!0})],Y.prototype,`animation`,null),e([_({readOnly:!0})],Y.prototype,`basemapTerrain`,void 0),e([_({readOnly:!0})],Y.prototype,`overlayManager`,null),e([_({readOnly:!0})],Y.prototype,`elevationProvider`,void 0),e([_()],Y.prototype,`camera`,null),e([_({type:t})],Y.prototype,`contentCamera`,null),e([_({readOnly:!0})],Y.prototype,`canvas`,null),e([_({type:S,useTypeForAutocast:!1})],Y.prototype,`center`,null),e([_({type:x})],Y.prototype,`clippingArea`,null),e([_({type:P,nonNullable:!0})],Y.prototype,`constraints`,void 0),e([_({type:x,readOnly:!0})],Y.prototype,`renderDataExtent`,null),e([_({readOnly:!0})],Y.prototype,`tileInfo`,null),e([_({type:x,readOnly:!0})],Y.prototype,`dataExtent`,null),e([_({type:x,readOnly:!0})],Y.prototype,`_groundAndLayersExtent`,null),e([_({type:F})],Y.prototype,`environment`,null),e([v(`environment`)],Y.prototype,`castEnvironment`,null),e([_({readOnly:!0})],Y.prototype,`environmentView`,void 0),e([_({type:x})],Y.prototype,`extent`,null),e([_({type:r})],Y.prototype,`floors`,void 0),e([_()],Y.prototype,`screenCenter`,null),e([_()],Y.prototype,`frustum`,null),e([_({type:Number,readOnly:!0})],Y.prototype,`fullOpacity`,void 0),e([_({readOnly:!0})],Y.prototype,`graphicsView`,void 0),e([_()],Y.prototype,`analysisViewManager`,void 0),e([_()],Y.prototype,`groundView`,void 0),e([_({readOnly:!0})],Y.prototype,`layerviewCollections`,null),e([_({type:Boolean})],Y.prototype,`initialExtentRequired`,null),e([_()],Y.prototype,`defaultsFromMapSettings`,null),e([_()],Y.prototype,`interacting`,null),e([_()],Y.prototype,`stationary`,null),e([_()],Y.prototype,`navigating`,null),e([_()],Y.prototype,`map`,void 0),e([_()],Y.prototype,`padding`,null),e([_({type:B,readOnly:!0})],Y.prototype,`pointsOfInterest`,void 0),e([_()],Y.prototype,`_featureTiles`,void 0),e([_()],Y.prototype,`featureTiles`,null),e([_()],Y.prototype,`_featureTreeDebugger`,void 0),e([_({constructOnly:!0})],Y.prototype,`deactivatedWebGLExtensions`,void 0),e([_({constructOnly:!0})],Y.prototype,`debugWebGLExtensions`,void 0),e([_({constructOnly:!0})],Y.prototype,`renderCanvas`,void 0),e([_({constructOnly:!0})],Y.prototype,`state`,void 0),e([_()],Y.prototype,`screenSizePerspective`,void 0),e([_({readOnly:!0})],Y.prototype,`inputManager`,void 0),e([_({readOnly:!0})],Y.prototype,`stateManager`,void 0),e([_({type:[`low`,`medium`,`high`]})],Y.prototype,`qualityProfile`,null),e([_({type:z,get(){let e=this._get(`qualitySettings`);if(!e){let t=R(this.qualityProfile);e=new z(t)}return e}})],Y.prototype,`qualitySettings`,void 0),e([_()],Y.prototype,`slice`,void 0),e([_({readOnly:!0})],Y.prototype,`typeSpecificPreconditionsReady`,null),e([_({readOnly:!0})],Y.prototype,`renderCoordsHelper`,void 0),e([_({readOnly:!0})],Y.prototype,`sceneIntersectionHelper`,void 0),e([_({type:Number,readOnly:!0})],Y.prototype,`resolution`,null),e([_({type:Number})],Y.prototype,`scale`,null),e([_({readOnly:!0,type:Number})],Y.prototype,`terrainLevel`,null),e([_()],Y.prototype,`heightModelInfo`,null),e([_({type:w})],Y.prototype,`spatialReference`,void 0),e([_({type:Boolean,value:!1})],Y.prototype,`alphaCompositingEnabled`,null),e([_({constructOnly:!0})],Y.prototype,`preserveDrawingBufferEnabled`,void 0),e([_({type:Boolean})],Y.prototype,`supersampleScreenshotsEnabled`,void 0),e([_({readOnly:!0})],Y.prototype,`type`,void 0),e([_(),v(e=>e instanceof kt?e:b(At,e))],Y.prototype,`ui`,void 0),e([_({type:Boolean,readOnly:!0})],Y.prototype,`updating`,null),e([_()],Y.prototype,`_updatingObjects`,null),e([_()],Y.prototype,`_updatingObjectsWithProgress`,null),e([_()],Y.prototype,`_updatingObjectsToDebug`,null),e([_({type:Number,readOnly:!0})],Y.prototype,`updatingProgress`,void 0),e([_({type:[`global`,`local`]})],Y.prototype,`viewingMode`,null),e([_({type:n})],Y.prototype,`viewpoint`,null),e([_({readOnly:!0})],Y.prototype,`visibleArea`,null),e([_({type:Number})],Y.prototype,`zoom`,null),e([_({readOnly:!0})],Y.prototype,`quality`,null),e([_({readOnly:!0})],Y.prototype,`resolutionScale`,null),e([_()],Y.prototype,`focusAreasView`,void 0),e([_()],Y.prototype,`_defaultToMapOptions`,null),e([_()],Y.prototype,`_defaultHitTestOptions`,null),Y=q=e([pe(`esri.views.SceneView`)],Y);function X(e,t){return e!=null&&xe(e.spatialReference,t)?C(e,t):null}const Z=_e(),Q=le(),$=Te(),Ft=Ae(0,0,0,w.WebMercator),It={GraphicsView3D:()=>import(`./3d/layers/GraphicsView3D.js`),FocusAreasView:()=>import(`./3d/FocusAreasView.js`),FeatureTileTree3D:()=>import(`./3d/layers/support/FeatureTileTree3D.js`)},Lt=Y;export{Lt as default};
@@ -12,15 +12,24 @@ import type { NavigationProperties } from "./navigation/Navigation.js";
12
12
 
13
13
  export interface VideoViewProperties extends DOMContainerProperties, Partial<Pick<VideoView, "layer" | "map" | "operationalDataVisible" | "scale">> {
14
14
  /**
15
- * Indicates whether the [DOMContainer.focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegion) is enabled. Set this property to `true` to show the centered focus region, or `false` to hide it.
16
- * The focus region can also be enabled/disabled by pressing the `Shift` + `Alt`/`Option` + `O` keyboard shortcut when the view is in focus.
15
+ * Enables the keyboard shortcut for showing the focus region. Applications should enable
16
+ * this only when they handle focus-region selection. When false, the shortcut does not change
17
+ * focus-region visibility.
18
+ *
19
+ * @internal
20
+ * @since 5.2
21
+ */
22
+ focusRegionShortcutEnabled?: boolean;
23
+ /**
24
+ * Indicates whether the [DOMContainer.focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegion) is visible. Set this property to `true` to show the centered focus region, or `false` to hide it.
25
+ * When [DOMContainer.focusRegionShortcutEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionShortcutEnabled) is `true`, visibility can also be toggled by pressing the `Shift` + `Alt`/`Option` + `O` keyboard shortcut when the view is in focus.
17
26
  *
18
27
  * @internal
19
28
  * @since 5.2
20
29
  * @see [focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegion)
21
30
  * @see [focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select)
22
31
  */
23
- focusRegionEnabled?: boolean;
32
+ focusRegionVisible?: boolean;
24
33
  /**
25
34
  * Options to configure the navigation behavior of the View.
26
35
  *
@@ -70,32 +79,41 @@ export interface VideoViewProperties extends DOMContainerProperties, Partial<Pic
70
79
  export default class VideoView extends VideoViewSuperclass {
71
80
  constructor(properties?: VideoViewProperties);
72
81
  /**
73
- * The screen rectangle of the active focus region, or `null` when [DOMContainer.focusRegionEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionEnabled) is `false`.
82
+ * The screen rectangle of the active focus region, or `null` when [DOMContainer.focusRegionVisible](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionVisible) is `false`.
74
83
  * This screen rectangle represents the area of the view that is currently in focus and can be used with methods that require a screen rectangle as input, such as `hitTest()`.
75
84
  *
76
85
  * | Action | Keyboard Shortcut / Property |
77
86
  * |--------|----------------------------|
78
- * | Enable or disable focus region | Use the `Shift` + `Alt`/`Option` + `O` keyboard shortcut while the view component is in focus or set the [DOMContainer.focusRegionEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionEnabled) property to `true` or `false`. |
87
+ * | Enable or disable focus region | When [DOMContainer.focusRegionShortcutEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionShortcutEnabled) is `true`, use the `Shift` + `Alt`/`Option` + `O` keyboard shortcut while the view is in focus. Alternatively, set [DOMContainer.focusRegionVisible](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionVisible) to `true` or `false`. |
79
88
  * | Resize focus region | Use the `Shift` + `Alt`/`Option` + Up/Down arrow keys while the focus region is enabled. |
80
89
  *
81
90
  * To know when this focus region is selected, listen for the [focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select) event.
82
91
  *
83
92
  * @internal
84
93
  * @since 5.2
85
- * @see [focusRegionEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionEnabled)
94
+ * @see [focusRegionVisible](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionVisible)
86
95
  * @see [focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select)
87
96
  */
88
97
  get focusRegion(): ScreenRect | null;
89
98
  /**
90
- * Indicates whether the [DOMContainer.focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegion) is enabled. Set this property to `true` to show the centered focus region, or `false` to hide it.
91
- * The focus region can also be enabled/disabled by pressing the `Shift` + `Alt`/`Option` + `O` keyboard shortcut when the view is in focus.
99
+ * Enables the keyboard shortcut for showing the focus region. Applications should enable
100
+ * this only when they handle focus-region selection. When false, the shortcut does not change
101
+ * focus-region visibility.
102
+ *
103
+ * @internal
104
+ * @since 5.2
105
+ */
106
+ accessor focusRegionShortcutEnabled: boolean;
107
+ /**
108
+ * Indicates whether the [DOMContainer.focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegion) is visible. Set this property to `true` to show the centered focus region, or `false` to hide it.
109
+ * When [DOMContainer.focusRegionShortcutEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionShortcutEnabled) is `true`, visibility can also be toggled by pressing the `Shift` + `Alt`/`Option` + `O` keyboard shortcut when the view is in focus.
92
110
  *
93
111
  * @internal
94
112
  * @since 5.2
95
113
  * @see [focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegion)
96
114
  * @see [focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select)
97
115
  */
98
- accessor focusRegionEnabled: boolean;
116
+ accessor focusRegionVisible: boolean;
99
117
  /** The [VideoLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/VideoLayer/) to display in the view. */
100
118
  accessor layer: VideoLayer | null | undefined;
101
119
  /** A reference to the associated [Map](https://developers.arcgis.com/javascript/latest/references/core/Map/) or [WebMap](https://developers.arcgis.com/javascript/latest/references/core/WebMap/). */
package/views/View.d.ts CHANGED
@@ -31,7 +31,7 @@ import type { TimeExtentProperties } from "../time/TimeExtent.js";
31
31
  import type { NavigationProperties } from "./navigation/Navigation.js";
32
32
  import type { ThemeProperties } from "./Theme.js";
33
33
 
34
- export interface ViewProperties<TLayerView extends LayerView = LayerView> extends Partial<Pick<View<TLayerView>, "animation" | "animationsEnabled" | "attributionVisible" | "basemapView" | "displayFilterEnabled" | "fatalError" | "focusRegionEnabled" | "padding">> {
34
+ export interface ViewProperties<TLayerView extends LayerView = LayerView> extends Partial<Pick<View<TLayerView>, "animation" | "animationsEnabled" | "attributionVisible" | "basemapView" | "displayFilterEnabled" | "fatalError" | "focusRegionShortcutEnabled" | "focusRegionVisible" | "padding">> {
35
35
  /**
36
36
  * Allows for adding [graphics](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) directly to the default graphics in the View.
37
37
  *
@@ -405,31 +405,40 @@ export default abstract class View<TLayerView extends LayerView = LayerView> ext
405
405
  */
406
406
  accessor fatalError: EsriError | null | undefined;
407
407
  /**
408
- * The screen rectangle of the active focus region, or `null` when [focusRegionEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/View/#focusRegionEnabled) is `false`.
408
+ * The screen rectangle of the active focus region, or `null` when [focusRegionVisible](https://developers.arcgis.com/javascript/latest/references/core/views/View/#focusRegionVisible) is `false`.
409
409
  * This screen rectangle represents the area of the view that is currently in focus and can be used with methods that require a screen rectangle as input, such as `hitTest()`.
410
410
  *
411
411
  * | Action | Keyboard Shortcut / Property |
412
412
  * |--------|----------------------------|
413
- * | Enable or disable focus region | Use the `Shift` + `Alt`/`Option` + `O` keyboard shortcut while the view component is in focus or set the [focusRegionEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/View/#focusRegionEnabled) property to `true` or `false`. |
413
+ * | Enable or disable focus region | When [focusRegionShortcutEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/View/#focusRegionShortcutEnabled) is `true`, use the `Shift` + `Alt`/`Option` + `O` keyboard shortcut while the view is in focus. Alternatively, set [focusRegionVisible](https://developers.arcgis.com/javascript/latest/references/core/views/View/#focusRegionVisible) to `true` or `false`. |
414
414
  * | Resize focus region | Use the `Shift` + `Alt`/`Option` + Up/Down arrow keys while the focus region is enabled. |
415
415
  *
416
416
  * To know when this focus region is selected, listen for the [focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select) event.
417
417
  *
418
418
  * @since 5.2
419
- * @see [focusRegionEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/View/#focusRegionEnabled)
419
+ * @see [focusRegionVisible](https://developers.arcgis.com/javascript/latest/references/core/views/View/#focusRegionVisible)
420
420
  * @see [focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select)
421
421
  */
422
422
  get focusRegion(): ScreenRect | null;
423
423
  /**
424
- * Indicates whether the [focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/View/#focusRegion) is enabled. Set this property to `true` to show the centered focus region, or `false` to hide it.
425
- * The focus region can also be enabled/disabled by pressing the `Shift` + `Alt`/`Option` + `O` keyboard shortcut when the view is in focus.
424
+ * Enables the keyboard shortcut for showing the focus region. Applications should enable
425
+ * this only when they handle focus-region selection. When false, the shortcut does not change
426
+ * focus-region visibility.
427
+ *
428
+ * @default false
429
+ * @since 5.2
430
+ */
431
+ accessor focusRegionShortcutEnabled: boolean;
432
+ /**
433
+ * Indicates whether the [focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/View/#focusRegion) is visible. Set this property to `true` to show the centered focus region, or `false` to hide it.
434
+ * When [focusRegionShortcutEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/View/#focusRegionShortcutEnabled) is `true`, visibility can also be toggled by pressing the `Shift` + `Alt`/`Option` + `O` keyboard shortcut when the view is in focus.
426
435
  *
427
436
  * @default false
428
437
  * @since 5.2
429
438
  * @see [focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/View/#focusRegion)
430
439
  * @see [focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select)
431
440
  */
432
- accessor focusRegionEnabled: boolean;
441
+ accessor focusRegionVisible: boolean;
433
442
  /**
434
443
  * Allows for adding [graphics](https://developers.arcgis.com/javascript/latest/references/core/Graphic/) directly to the default graphics in the View.
435
444
  *
package/views/View.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../Map.js";import{createTask as n}from"../core/asyncUtils.js";import r from"../core/Collection.js";import i from"../core/CollectionFlattener.js";import{referenceSetter as a}from"../core/collectionUtils.js";import o from"../core/Error.js";import{EventedMixin as s}from"../core/Evented.js";import c from"../core/Handles.js";import{makeHandle as l}from"../core/handleUtils.js";import has from"../core/has.js";import{isLoadable as u}from"../core/Loadable.js";import d from"../core/Logger.js";import{destroyMaybe as f,abortMaybe as ee}from"../core/maybe.js";import{EsriPromise as te}from"../core/Promise.js";import{after as p}from"../core/promiseUtils.js";import m from"../core/ReactiveSet.js";import{watch as h,sync as g,whenOnce as _,when as v,syncAndInitial as y}from"../core/reactiveUtils.js";import{property as b,subclass as x}from"../core/accessorSupport/decorators.js";import{owningCollectionProperty as S}from"../core/support/OwningCollection.js";import{UpdatingHandles as C}from"../core/support/UpdatingHandles.js";import ne from"../geometry/Extent.js";import w from"../geometry/HeightModelInfo.js";import T from"../geometry/SpatialReference.js";import{equals as E}from"../geometry/support/spatialReferenceUtils.js";import{AnalysesCollection as D}from"../support/AnalysesCollection.js";import{GraphicsCollection as O}from"../support/GraphicsCollection.js";import{system as k}from"../time/constants.js";import A from"../time/TimeExtent.js";import{isTimeZoneValid as j}from"../time/timeZoneUtils.js";import M from"./BasemapView.js";import N from"./Magnifier.js";import P from"./SelectionManager.js";import F from"./Theme.js";import{ToolViewManager as I}from"./ToolViewManager.js";import{GlyphMosaic as L}from"./2d/engine/webgl/GlyphMosaic.js";import{makeDefaultHighlightOptions as R}from"./3d/support/DefaultHighlights.js";import z from"./input/Input.js";import{ViewEvents as B}from"./input/ViewEvents.js";import V from"./interactive/options/ViewOptions.js";import H from"./navigation/Navigation.js";import{deduplicateAttributionItems as U}from"./support/attributionUtils.js";import{DefaultsFromMap as W}from"./support/DefaultsFromMap.js";import{defaultHighlightName as G}from"./support/HighlightDefaults.js";import K from"./support/HighlightOptions.js";import q from"./support/LayerViewManager.js";import J from"./support/RequiredFieldsOptions.js";import{checkWebAssemblyRequirements as Y}from"./support/WebAssemblyRequirements.js";import{checkWebGLRequirements as X}from"./support/WebGLRequirements.js";var Z;let Q=class extends s(te){static{Z=this}constructor(e){super(e),this._userSpatialReference=null,this.handles=new c,this.updatingHandles=new C,this.allLayerViews=new i({getCollections:()=>this.layerviewCollections,getChildrenFunction:re}),this.animationsEnabled=!0,this.focusRegionEnabled=!1,this.attributionVisible=!0,this.basemapView=null,this.dependencies={popup:void 0},this.displayFilterEnabled=!0,this.fatalError=null,this.graphics=new O,this.typeSpecificPreconditionsReady=!0,this.layerViews=new r,this.magnifier=new N,this.options=new V,this.padding={left:0,top:0,right:0,bottom:0},this.ready=!1,this._readyStateWaitingTask=null,this.type=null,this.scale=null,this.updating=!1,this.initialExtentRequired=!0,this._lowPriorityCursorHandles=new r,this._highPriorityCursorHandles=new r,this.input=new z,this.navigation=new H,this.layerViewManager=null,this.analysisViewManager=null,this.isHeightModelInfoRequired=!1,this.width=null,this.height=null,this.resizing=!1,this.suspended=!1,this.viewEvents=new B(this),this.requiredFieldsOptions=new J,this._isValid=!1,this._readyCycleForced=!1,this._lockedSpatialReference=null,this._userTimeZone=null,this._lockedTimeZone=null,this._userTimeExtent=null,this._lockedTimeExtent=null,this._glyphMosaic=null,this.theme=null,this.registeredComponents=new m,this.handles.add(h(()=>this.preconditionsReady,e=>{let t=this.ready;if(e?(this._lockedSpatialReference=this.spatialReference,this._lockedTimeZone=this.timeZone,this._lockedTimeExtent=this.timeExtent,Z.views.add(this)):(this._lockedSpatialReference=null,Z.views.remove(this)),this.notifyChange(`spatialReference`),!e&&t)this.toolViewManager?.detach(),this.analysisViewManager?.detach(),this.layerViewManager?.clear(),this._glyphMosaic?.dispose(),this._teardown();else if(e&&!t){try{this._startup()}catch(e){queueMicrotask(()=>{this.fatalError=new o(`view:startup-error`,`View._startup failed`,e)});return}this._glyphMosaic=new L(1024,1024,!0),this.analysisViewManager?.attach(),this.toolViewManager.attach()}},g)),this.analyses=new D}initialize(){this.addResolvingPromise(Promise.all([this.loadAsyncDependencies(),this.validate()]).then(()=>(this._isValid=!0,_(()=>this.ready)))),this.basemapView=new M({view:this}),this.layerViewManager=new q({view:this,layerViewFilter:e=>this.layerViewFilter?.(e)??!0,layerViewImporter:{importLayerView:e=>this.importLayerView(e),hasLayerViewModule:e=>this.hasLayerViewModule(e)},layerviewMapping:this._layerToLayerviewMapping}),this.toolViewManager=new I({view:this}),this.selectionManager=new P({view:this}),this.addHandles([v(()=>this.readyState===`map-content-error`&&!this.spatialReference,()=>{d.getLogger(this).warn(`#spatialReference`,`no spatial reference could be derived from the currently added map layers`)}),h(()=>this.initialExtentRequired,e=>this.defaultsFromMap.required={...this.defaultsFromMap.required,extent:e},y),h(()=>this.ready,e=>{this.defaultsFromMap&&(this.defaultsFromMap.viewReady=e)},g),h(()=>this.defaultsFromMapInputSpatialReference(),e=>{this.defaultsFromMap&&(this.defaultsFromMap.inputSpatialReference=e)},y),h(()=>this.defaultsFromMapInputHeightModelInfo(),e=>{this.defaultsFromMap&&(this.defaultsFromMap.inputHeightModelInfo=e)},y)])}get _layerToLayerviewMapping(){return Z._layerToLayerview}static{this._layerToLayerview=[[`view.map.basemap.baseLayers`,`view.basemapView.baseLayerViews`],[`view.map.basemap.groundLayers`,`view.basemapView.groundLayerViews`],[`view.map.basemap.referenceLayers`,`view.basemapView.referenceLayerViews`],[`view.map.layers`,`view.layerViews`]]}destroy(){this.destroyed||(Z.views.remove(this),this.viewEvents.destroy(),this.allLayerViews.destroy(),this.navigation&&(this.navigation.destroy(),this._set(`navigation`,null)),this.graphics=f(this.graphics),this.analyses=f(this.analyses),this.defaultsFromMap.destroy(),this._set(`defaultsFromMap`,null),this.analysisViewManager=f(this.analysisViewManager),this.toolViewManager=f(this.toolViewManager),this.layerViewManager=f(this.layerViewManager),this.selectionManager=f(this.selectionManager),this.basemapView=f(this.basemapView),this.layerViews.destroyAll(),this.invalidate(),this.handles.destroy(),this.map=f(this.map),this.updatingHandles.destroy())}_startup(){this._set(`ready`,!0)}_teardown(){this._set(`ready`,!1)}whenReady(){return Promise.resolve(this)}toMap(){return d.getLogger(this).error(`#toMap()`,`Not implemented on this instance of View`),null}get activeTool(){return this.toolViewManager?.activeTool}set activeTool(e){this.toolViewManager&&(this.toolViewManager.activeTool=e)}get layerviewCollections(){return[this.basemapView?.baseLayerViews,this.basemapView?.groundLayerViews,this.layerViews,this.basemapView?.referenceLayerViews]}get analyses(){return this._get(`analyses`)}set analyses(e){this._set(`analyses`,e)}get animation(){return this._get(`animation`)}set animation(e){this._set(`animation`,e)}get focusRegion(){return null}get attributionItems(){return this.suspended?[]:U(this._get(`attributionItems`),this.getAttributionItems())}get center(){return null}get defaultsFromMapSettings(){return{}}get defaultsFromMap(){return new W({required:{tileInfo:!1,heightModelInfo:!1,extent:!1},map:()=>this.map,getSpatialReferenceSupport:(e,t)=>this.getSpatialReferenceSupport(e,t),...this.defaultsFromMapSettings})}get extent(){return this._get(`extent`)}set extent(e){this._set(`extent`,e)}get heightModelInfo(){return this.getDefaultHeightModelInfo()}glyphMosaic(){return this._glyphMosaic}get highlights(){return this._get(`highlights`)??R()}set highlights(e){this._set(`highlights`,a(e,this._get(`highlights`),r.ofType(K)))}get defaultHighlight(){return this.highlights.find(({name:e})=>e===G)}get interacting(){return this.navigating}get navigating(){return!1}get preconditionsReady(){if(this.destroying||this.destroyed)return!1;let{map:e,spatialReference:t}=this;return!!(!this.fatalError&&this._isValid&&!this._readyCycleForced&&e&&(!u(e)||e.loaded)&&this.width!==0&&this.height!==0&&t&&this._validateSpatialReference(t)&&(this._lockedSpatialReference||this.defaultsFromMap?.ready)&&this.typeSpecificPreconditionsReady)}get resolution(){return 0}set map(e){let t=this._get(`map`);e!==t&&(e?.destroyed&&(d.getLogger(this).warn(`#map`,`The provided map is already destroyed`,{map:e}),e=null),u(e)&&e.load().catch(()=>{}),this.constructed&&!this.destroyed&&(this.forceReadyCycle(),this._lockedSpatialReference=null),this._set(`map`,e))}get canZoomIn(){return!!this.ready}get canZoomOut(){return!!this.ready}get readyState(){if(this.destroyed)return this._get(`readyState`);if(!this.map)return`missing-map`;if(`container`in this&&!this.container)return`missing-container`;if(this.fatalError)return`rendering-error`;if((this.defaultsFromMap?.ready??!1)&&!this.spatialReference){let e=!(`loaded`in this.map)||this.map.loaded,t=this.map.ground.loaded,r=this.map.basemap?.loaded??!0;return e&&r&&t&&!this.map?.allLayers.length?`empty-map`:(this._readyStateWaitingTask||(this._readyStateWaitingTask=n(e=>p(has(`view-readyState-waiting-delay`),null,e)),this.addHandles(this._readyStateWaitingTask),this.addHandles(this._readyStateWaitingTask,`ready-state-task`)),this._readyStateWaitingTask?.finished?`map-content-error`:`loading`)}return this._readyStateWaitingTask=ee(this._readyStateWaitingTask),this.removeHandles(`ready-state-task`),this.ready?`ready`:`loading`}get spatialReference(){let{_userSpatialReference:e}=this;if(e&&e.vcsWkid!==null)return e;let t=e??this._lockedSpatialReference??this.getWebDocumentSpatialReference()??this.defaultsFromMap?.spatialReference??null,n=this.defaultsFromMap?.combinedHorizontalAndVerticalSpatialReference;return n?.equals(t)?n:t}set spatialReference(e){let t=!E(e,this._get(`spatialReference`));this._set(`_userSpatialReference`,e),t&&(this._set(`spatialReference`,e),this._spatialReferenceChanged(this.spatialReference))}_spatialReferenceChanged(e){}getWebDocumentSpatialReference(){return null}defaultsFromMapInputSpatialReference(){return this._userSpatialReference??this.getWebDocumentSpatialReference()??(this.ready?this._lockedSpatialReference:null)}defaultsFromMapInputHeightModelInfo(){return this.map?.heightModelInfo??null}get stationary(){return!this.animation&&!this.navigating&&!this.resizing}get timeExtent(){return this._userTimeExtent??this._lockedTimeExtent??this.getDefaultTimeExtent()??null}set timeExtent(e){this._userTimeExtent=e}get timeZone(){return this._userTimeZone??this._lockedTimeZone??this.getDefaultTimeZone()??k}set timeZone(e){this._userTimeZone=e,j(e)||d.getLogger(this).warn(`#timeZone`,`the parsed value '${e}' may not be a valid IANA time zone`)}get tools(){return this.toolViewManager?.tools}get initialExtent(){return this.defaultsFromMap?.extent}get cursor(){return this.toolViewManager?.cursor??this._highPriorityCursorHandles.at(-1)?.cursor??this._lowPriorityCursorHandles.at(-1)?.cursor??`default`}acquireCursor(e,t=`low`){let n=t===`high`?this._highPriorityCursorHandles:this._lowPriorityCursorHandles,r={cursor:e},i=l(()=>n.remove(r));return n.add(r),this.addHandles(i),i}get size(){return[this.width,this.height]}get effectiveTheme(){return this.theme??new F}registerComponent(e){this.registeredComponents.add(e)}unregisterComponent(e){this.registeredComponents.delete(e)}whenLayerView(e){return this.layerViewManager?.whenLayerView(e)??Promise.reject()}getAttributionItems(){return this.allLayerViews.items.flatMap(e=>e.attributionItems)}getDefaultHeightModelInfo(){return(this.map&&`heightModelInfo`in this.map?this.map.heightModelInfo:void 0)??this.defaultsFromMap?.heightModelInfo??null}getDefaultTimeZone(){return null}getDefaultTimeExtent(){return null}getSurface(){return null}importLayerView(e){throw new o(`view:importLayerView-missing`,`importLayerView() not implemented`)}hasLayerViewModule(e){return!1}async validate(){let e=X(this.type);if(e)throw this._displayWebGLError(),d.getLogger(this).warn(`#validate()`,e.message),e;let t=await Y();if(t)throw d.getLogger(this).warn(`#validate()`,t.message),t}async loadAsyncDependencies(){}invalidate(){this._isValid=!1}getSpatialReferenceSupport(){return{constraints:null}}_validateSpatialReference(e){return this.getSpatialReferenceSupport(e)!=null}when(e,t){return this.isResolved()&&!this.ready&&d.getLogger(this).warn(`#when()`,`Calling view.when() while the view is no longer ready but was already resolved once will resolve immediately. Use reactiveUtils.whenOnce(() => view.ready).then(...) instead.`),super.when(e,t)}forceReadyCycle(){this.ready&&(v(()=>this.destroyed||this.preconditionsReady===!1,()=>this._readyCycleForced=!1,{once:!0}),this._readyCycleForced=!0)}on(e,t){return super.on(e,t)}addAndActivateTool(e){this.toolViewManager.tools.add(e),this.activeTool=e}tryFatalErrorRecovery(){this.fatalError=null}static{this.views=new r}_displayWebGLError(){let e=document.createElement(`div`);e.setAttribute(`style`,`display: flex; flex-direction: column; gap: 8px; padding: 20px; height: 100%; justify-content: center; color: black; background: white; font-family: sans-serif;`);let t=document.createElement(`div`);t.innerHTML=`Unable to display map. WebGL2 support is required.`,t.setAttribute(`style`,`font-size: 24px; font-weight: bold;`);let n=document.createElement(`div`);n.innerHTML=`Ensure that your browser and hardware meet the minimum requirements.`,n.setAttribute(`style`,`font-size: 18px;`);let r=document.createElement(`a`);r.innerHTML=`https://esriurl.com/webgl-faq`,r.target=`_blank`,r.setAttribute(`style`,`font-size: 18px;`),r.href=`https://esriurl.com/webgl-faq`,e.appendChild(t),e.appendChild(n),e.appendChild(r);let i=this.getSurface();i&&i.appendChild(e)}};e([b()],Q.prototype,`_userSpatialReference`,void 0),e([b()],Q.prototype,`activeTool`,null),e([b({readOnly:!0})],Q.prototype,`allLayerViews`,void 0),e([b({readOnly:!0})],Q.prototype,`layerviewCollections`,null),e([b(S(D,`analyses`))],Q.prototype,`analyses`,null),e([b()],Q.prototype,`animation`,null),e([b()],Q.prototype,`animationsEnabled`,void 0),e([b()],Q.prototype,`focusRegionEnabled`,void 0),e([b()],Q.prototype,`focusRegion`,null),e([b({readOnly:!0})],Q.prototype,`attributionItems`,null),e([b()],Q.prototype,`attributionVisible`,void 0),e([b()],Q.prototype,`basemapView`,void 0),e([b()],Q.prototype,`center`,null),e([b()],Q.prototype,`defaultsFromMapSettings`,null),e([b()],Q.prototype,`defaultsFromMap`,null),e([b()],Q.prototype,`dependencies`,void 0),e([b()],Q.prototype,`displayFilterEnabled`,void 0),e([b({type:ne})],Q.prototype,`extent`,null),e([b()],Q.prototype,`fatalError`,void 0),e([b(S(O,`graphics`))],Q.prototype,`graphics`,void 0),e([b({readOnly:!0,type:w})],Q.prototype,`heightModelInfo`,null),e([b({type:r.ofType(K)})],Q.prototype,`highlights`,null),e([b({readOnly:!0})],Q.prototype,`interacting`,null),e([b({constructOnly:!0})],Q.prototype,`layerViewFilter`,void 0),e([b({readOnly:!0})],Q.prototype,`navigating`,null),e([b({readOnly:!0})],Q.prototype,`preconditionsReady`,null),e([b({readOnly:!0})],Q.prototype,`typeSpecificPreconditionsReady`,void 0),e([b({type:r,readOnly:!0})],Q.prototype,`layerViews`,void 0),e([b()],Q.prototype,`resolution`,null),e([b({type:N})],Q.prototype,`magnifier`,void 0),e([b({nonNullable:!0,type:V})],Q.prototype,`options`,void 0),e([b({value:null,type:t})],Q.prototype,`map`,null),e([b()],Q.prototype,`padding`,void 0),e([b({readOnly:!0})],Q.prototype,`ready`,void 0),e([b({readOnly:!0})],Q.prototype,`canZoomIn`,null),e([b({readOnly:!0})],Q.prototype,`canZoomOut`,null),e([b()],Q.prototype,`_readyStateWaitingTask`,void 0),e([b({readOnly:!0})],Q.prototype,`readyState`,null),e([b({type:T})],Q.prototype,`spatialReference`,null),e([b()],Q.prototype,`stationary`,null),e([b({type:A})],Q.prototype,`timeExtent`,null),e([b({type:String,nonNullable:!0})],Q.prototype,`timeZone`,null),e([b()],Q.prototype,`tools`,null),e([b()],Q.prototype,`toolViewManager`,void 0),e([b({readOnly:!0})],Q.prototype,`type`,void 0),e([b({type:Number})],Q.prototype,`scale`,void 0),e([b({readOnly:!0})],Q.prototype,`updating`,void 0),e([b({readOnly:!0})],Q.prototype,`initialExtentRequired`,void 0),e([b({readOnly:!0})],Q.prototype,`initialExtent`,null),e([b()],Q.prototype,`cursor`,null),e([b({readOnly:!0})],Q.prototype,`input`,void 0),e([b({type:H,nonNullable:!0})],Q.prototype,`navigation`,void 0),e([b()],Q.prototype,`layerViewManager`,void 0),e([b()],Q.prototype,`analysisViewManager`,void 0),e([b()],Q.prototype,`selectionManager`,void 0),e([b()],Q.prototype,`width`,void 0),e([b()],Q.prototype,`height`,void 0),e([b({readOnly:!0})],Q.prototype,`resizing`,void 0),e([b({value:null,readOnly:!0})],Q.prototype,`size`,null),e([b({readOnly:!0})],Q.prototype,`suspended`,void 0),e([b({readOnly:!0})],Q.prototype,`viewEvents`,void 0),e([b()],Q.prototype,`_isValid`,void 0),e([b()],Q.prototype,`_readyCycleForced`,void 0),e([b()],Q.prototype,`_lockedSpatialReference`,void 0),e([b()],Q.prototype,`_userTimeZone`,void 0),e([b()],Q.prototype,`_lockedTimeZone`,void 0),e([b()],Q.prototype,`_userTimeExtent`,void 0),e([b()],Q.prototype,`_lockedTimeExtent`,void 0),e([b({type:F})],Q.prototype,`theme`,void 0),e([b({readOnly:!0,type:F})],Q.prototype,`effectiveTheme`,null),e([b({readOnly:!0})],Q.prototype,`registeredComponents`,void 0),Q=Z=e([x(`esri.views.View`)],Q);const $=globalThis.$arcgis;$&&!$.views&&Object.defineProperty($,"views",{configurable:!1,enumerable:!0,writable:!1,value:Q.views});function re(e){return e.layerViews}export{Q as default};
2
+ import{__decorate as e}from"tslib";import t from"../Map.js";import{createTask as n}from"../core/asyncUtils.js";import r from"../core/Collection.js";import i from"../core/CollectionFlattener.js";import{referenceSetter as a}from"../core/collectionUtils.js";import o from"../core/Error.js";import{EventedMixin as s}from"../core/Evented.js";import c from"../core/Handles.js";import{makeHandle as l}from"../core/handleUtils.js";import has from"../core/has.js";import{isLoadable as u}from"../core/Loadable.js";import d from"../core/Logger.js";import{destroyMaybe as f,abortMaybe as ee}from"../core/maybe.js";import{EsriPromise as te}from"../core/Promise.js";import{after as p}from"../core/promiseUtils.js";import m from"../core/ReactiveSet.js";import{watch as h,sync as g,whenOnce as _,when as v,syncAndInitial as y}from"../core/reactiveUtils.js";import{property as b,subclass as x}from"../core/accessorSupport/decorators.js";import{owningCollectionProperty as S}from"../core/support/OwningCollection.js";import{UpdatingHandles as C}from"../core/support/UpdatingHandles.js";import ne from"../geometry/Extent.js";import w from"../geometry/HeightModelInfo.js";import T from"../geometry/SpatialReference.js";import{equals as E}from"../geometry/support/spatialReferenceUtils.js";import{AnalysesCollection as D}from"../support/AnalysesCollection.js";import{GraphicsCollection as O}from"../support/GraphicsCollection.js";import{system as k}from"../time/constants.js";import A from"../time/TimeExtent.js";import{isTimeZoneValid as j}from"../time/timeZoneUtils.js";import M from"./BasemapView.js";import N from"./Magnifier.js";import P from"./SelectionManager.js";import F from"./Theme.js";import{ToolViewManager as I}from"./ToolViewManager.js";import{GlyphMosaic as L}from"./2d/engine/webgl/GlyphMosaic.js";import{makeDefaultHighlightOptions as R}from"./3d/support/DefaultHighlights.js";import z from"./input/Input.js";import{ViewEvents as B}from"./input/ViewEvents.js";import V from"./interactive/options/ViewOptions.js";import H from"./navigation/Navigation.js";import{deduplicateAttributionItems as U}from"./support/attributionUtils.js";import{DefaultsFromMap as W}from"./support/DefaultsFromMap.js";import{defaultHighlightName as G}from"./support/HighlightDefaults.js";import K from"./support/HighlightOptions.js";import q from"./support/LayerViewManager.js";import J from"./support/RequiredFieldsOptions.js";import{checkWebAssemblyRequirements as Y}from"./support/WebAssemblyRequirements.js";import{checkWebGLRequirements as X}from"./support/WebGLRequirements.js";var Z;let Q=class extends s(te){static{Z=this}constructor(e){super(e),this._userSpatialReference=null,this.handles=new c,this.updatingHandles=new C,this.allLayerViews=new i({getCollections:()=>this.layerviewCollections,getChildrenFunction:re}),this.animationsEnabled=!0,this.focusRegionVisible=!1,this.focusRegionShortcutEnabled=!1,this.attributionVisible=!0,this.basemapView=null,this.dependencies={popup:void 0},this.displayFilterEnabled=!0,this.fatalError=null,this.graphics=new O,this.typeSpecificPreconditionsReady=!0,this.layerViews=new r,this.magnifier=new N,this.options=new V,this.padding={left:0,top:0,right:0,bottom:0},this.ready=!1,this._readyStateWaitingTask=null,this.type=null,this.scale=null,this.updating=!1,this.initialExtentRequired=!0,this._lowPriorityCursorHandles=new r,this._highPriorityCursorHandles=new r,this.input=new z,this.navigation=new H,this.layerViewManager=null,this.analysisViewManager=null,this.isHeightModelInfoRequired=!1,this.width=null,this.height=null,this.resizing=!1,this.suspended=!1,this.viewEvents=new B(this),this.requiredFieldsOptions=new J,this._isValid=!1,this._readyCycleForced=!1,this._lockedSpatialReference=null,this._userTimeZone=null,this._lockedTimeZone=null,this._userTimeExtent=null,this._lockedTimeExtent=null,this._glyphMosaic=null,this.theme=null,this.registeredComponents=new m,this.handles.add(h(()=>this.preconditionsReady,e=>{let t=this.ready;if(e?(this._lockedSpatialReference=this.spatialReference,this._lockedTimeZone=this.timeZone,this._lockedTimeExtent=this.timeExtent,Z.views.add(this)):(this._lockedSpatialReference=null,Z.views.remove(this)),this.notifyChange(`spatialReference`),!e&&t)this.toolViewManager?.detach(),this.analysisViewManager?.detach(),this.layerViewManager?.clear(),this._glyphMosaic?.dispose(),this._teardown();else if(e&&!t){try{this._startup()}catch(e){queueMicrotask(()=>{this.fatalError=new o(`view:startup-error`,`View._startup failed`,e)});return}this._glyphMosaic=new L(1024,1024,!0),this.analysisViewManager?.attach(),this.toolViewManager.attach()}},g)),this.analyses=new D}initialize(){this.addResolvingPromise(Promise.all([this.loadAsyncDependencies(),this.validate()]).then(()=>(this._isValid=!0,_(()=>this.ready)))),this.basemapView=new M({view:this}),this.layerViewManager=new q({view:this,layerViewFilter:e=>this.layerViewFilter?.(e)??!0,layerViewImporter:{importLayerView:e=>this.importLayerView(e),hasLayerViewModule:e=>this.hasLayerViewModule(e)},layerviewMapping:this._layerToLayerviewMapping}),this.toolViewManager=new I({view:this}),this.selectionManager=new P({view:this}),this.addHandles([v(()=>this.readyState===`map-content-error`&&!this.spatialReference,()=>{d.getLogger(this).warn(`#spatialReference`,`no spatial reference could be derived from the currently added map layers`)}),h(()=>this.initialExtentRequired,e=>this.defaultsFromMap.required={...this.defaultsFromMap.required,extent:e},y),h(()=>this.ready,e=>{this.defaultsFromMap&&(this.defaultsFromMap.viewReady=e)},g),h(()=>this.defaultsFromMapInputSpatialReference(),e=>{this.defaultsFromMap&&(this.defaultsFromMap.inputSpatialReference=e)},y),h(()=>this.defaultsFromMapInputHeightModelInfo(),e=>{this.defaultsFromMap&&(this.defaultsFromMap.inputHeightModelInfo=e)},y)])}get _layerToLayerviewMapping(){return Z._layerToLayerview}static{this._layerToLayerview=[[`view.map.basemap.baseLayers`,`view.basemapView.baseLayerViews`],[`view.map.basemap.groundLayers`,`view.basemapView.groundLayerViews`],[`view.map.basemap.referenceLayers`,`view.basemapView.referenceLayerViews`],[`view.map.layers`,`view.layerViews`]]}destroy(){this.destroyed||(Z.views.remove(this),this.viewEvents.destroy(),this.allLayerViews.destroy(),this.navigation&&(this.navigation.destroy(),this._set(`navigation`,null)),this.graphics=f(this.graphics),this.analyses=f(this.analyses),this.defaultsFromMap.destroy(),this._set(`defaultsFromMap`,null),this.analysisViewManager=f(this.analysisViewManager),this.toolViewManager=f(this.toolViewManager),this.layerViewManager=f(this.layerViewManager),this.selectionManager=f(this.selectionManager),this.basemapView=f(this.basemapView),this.layerViews.destroyAll(),this.invalidate(),this.handles.destroy(),this.map=f(this.map),this.updatingHandles.destroy())}_startup(){this._set(`ready`,!0)}_teardown(){this._set(`ready`,!1)}whenReady(){return Promise.resolve(this)}toMap(){return d.getLogger(this).error(`#toMap()`,`Not implemented on this instance of View`),null}get activeTool(){return this.toolViewManager?.activeTool}set activeTool(e){this.toolViewManager&&(this.toolViewManager.activeTool=e)}get layerviewCollections(){return[this.basemapView?.baseLayerViews,this.basemapView?.groundLayerViews,this.layerViews,this.basemapView?.referenceLayerViews]}get analyses(){return this._get(`analyses`)}set analyses(e){this._set(`analyses`,e)}get animation(){return this._get(`animation`)}set animation(e){this._set(`animation`,e)}get focusRegion(){return null}get attributionItems(){return this.suspended?[]:U(this._get(`attributionItems`),this.getAttributionItems())}get center(){return null}get defaultsFromMapSettings(){return{}}get defaultsFromMap(){return new W({required:{tileInfo:!1,heightModelInfo:!1,extent:!1},map:()=>this.map,getSpatialReferenceSupport:(e,t)=>this.getSpatialReferenceSupport(e,t),...this.defaultsFromMapSettings})}get extent(){return this._get(`extent`)}set extent(e){this._set(`extent`,e)}get heightModelInfo(){return this.getDefaultHeightModelInfo()}glyphMosaic(){return this._glyphMosaic}get highlights(){return this._get(`highlights`)??R()}set highlights(e){this._set(`highlights`,a(e,this._get(`highlights`),r.ofType(K)))}get defaultHighlight(){return this.highlights.find(({name:e})=>e===G)}get interacting(){return this.navigating}get navigating(){return!1}get preconditionsReady(){if(this.destroying||this.destroyed)return!1;let{map:e,spatialReference:t}=this;return!!(!this.fatalError&&this._isValid&&!this._readyCycleForced&&e&&(!u(e)||e.loaded)&&this.width!==0&&this.height!==0&&t&&this._validateSpatialReference(t)&&(this._lockedSpatialReference||this.defaultsFromMap?.ready)&&this.typeSpecificPreconditionsReady)}get resolution(){return 0}set map(e){let t=this._get(`map`);e!==t&&(e?.destroyed&&(d.getLogger(this).warn(`#map`,`The provided map is already destroyed`,{map:e}),e=null),u(e)&&e.load().catch(()=>{}),this.constructed&&!this.destroyed&&(this.forceReadyCycle(),this._lockedSpatialReference=null),this._set(`map`,e))}get canZoomIn(){return!!this.ready}get canZoomOut(){return!!this.ready}get readyState(){if(this.destroyed)return this._get(`readyState`);if(!this.map)return`missing-map`;if(`container`in this&&!this.container)return`missing-container`;if(this.fatalError)return`rendering-error`;if((this.defaultsFromMap?.ready??!1)&&!this.spatialReference){let e=!(`loaded`in this.map)||this.map.loaded,t=this.map.ground.loaded,r=this.map.basemap?.loaded??!0;return e&&r&&t&&!this.map?.allLayers.length?`empty-map`:(this._readyStateWaitingTask||(this._readyStateWaitingTask=n(e=>p(has(`view-readyState-waiting-delay`),null,e)),this.addHandles(this._readyStateWaitingTask),this.addHandles(this._readyStateWaitingTask,`ready-state-task`)),this._readyStateWaitingTask?.finished?`map-content-error`:`loading`)}return this._readyStateWaitingTask=ee(this._readyStateWaitingTask),this.removeHandles(`ready-state-task`),this.ready?`ready`:`loading`}get spatialReference(){let{_userSpatialReference:e}=this;if(e&&e.vcsWkid!==null)return e;let t=e??this._lockedSpatialReference??this.getWebDocumentSpatialReference()??this.defaultsFromMap?.spatialReference??null,n=this.defaultsFromMap?.combinedHorizontalAndVerticalSpatialReference;return n?.equals(t)?n:t}set spatialReference(e){let t=!E(e,this._get(`spatialReference`));this._set(`_userSpatialReference`,e),t&&(this._set(`spatialReference`,e),this._spatialReferenceChanged(this.spatialReference))}_spatialReferenceChanged(e){}getWebDocumentSpatialReference(){return null}defaultsFromMapInputSpatialReference(){return this._userSpatialReference??this.getWebDocumentSpatialReference()??(this.ready?this._lockedSpatialReference:null)}defaultsFromMapInputHeightModelInfo(){return this.map?.heightModelInfo??null}get stationary(){return!this.animation&&!this.navigating&&!this.resizing}get timeExtent(){return this._userTimeExtent??this._lockedTimeExtent??this.getDefaultTimeExtent()??null}set timeExtent(e){this._userTimeExtent=e}get timeZone(){return this._userTimeZone??this._lockedTimeZone??this.getDefaultTimeZone()??k}set timeZone(e){this._userTimeZone=e,j(e)||d.getLogger(this).warn(`#timeZone`,`the parsed value '${e}' may not be a valid IANA time zone`)}get tools(){return this.toolViewManager?.tools}get initialExtent(){return this.defaultsFromMap?.extent}get cursor(){return this.toolViewManager?.cursor??this._highPriorityCursorHandles.at(-1)?.cursor??this._lowPriorityCursorHandles.at(-1)?.cursor??`default`}acquireCursor(e,t=`low`){let n=t===`high`?this._highPriorityCursorHandles:this._lowPriorityCursorHandles,r={cursor:e},i=l(()=>n.remove(r));return n.add(r),this.addHandles(i),i}get size(){return[this.width,this.height]}get effectiveTheme(){return this.theme??new F}registerComponent(e){this.registeredComponents.add(e)}unregisterComponent(e){this.registeredComponents.delete(e)}whenLayerView(e){return this.layerViewManager?.whenLayerView(e)??Promise.reject()}getAttributionItems(){return this.allLayerViews.items.flatMap(e=>e.attributionItems)}getDefaultHeightModelInfo(){return(this.map&&`heightModelInfo`in this.map?this.map.heightModelInfo:void 0)??this.defaultsFromMap?.heightModelInfo??null}getDefaultTimeZone(){return null}getDefaultTimeExtent(){return null}getSurface(){return null}importLayerView(e){throw new o(`view:importLayerView-missing`,`importLayerView() not implemented`)}hasLayerViewModule(e){return!1}async validate(){let e=X(this.type);if(e)throw this._displayWebGLError(),d.getLogger(this).warn(`#validate()`,e.message),e;let t=await Y();if(t)throw d.getLogger(this).warn(`#validate()`,t.message),t}async loadAsyncDependencies(){}invalidate(){this._isValid=!1}getSpatialReferenceSupport(){return{constraints:null}}_validateSpatialReference(e){return this.getSpatialReferenceSupport(e)!=null}when(e,t){return this.isResolved()&&!this.ready&&d.getLogger(this).warn(`#when()`,`Calling view.when() while the view is no longer ready but was already resolved once will resolve immediately. Use reactiveUtils.whenOnce(() => view.ready).then(...) instead.`),super.when(e,t)}forceReadyCycle(){this.ready&&(v(()=>this.destroyed||this.preconditionsReady===!1,()=>this._readyCycleForced=!1,{once:!0}),this._readyCycleForced=!0)}on(e,t){return super.on(e,t)}addAndActivateTool(e){this.toolViewManager.tools.add(e),this.activeTool=e}tryFatalErrorRecovery(){this.fatalError=null}static{this.views=new r}_displayWebGLError(){let e=document.createElement(`div`);e.setAttribute(`style`,`display: flex; flex-direction: column; gap: 8px; padding: 20px; height: 100%; justify-content: center; color: black; background: white; font-family: sans-serif;`);let t=document.createElement(`div`);t.innerHTML=`Unable to display map. WebGL2 support is required.`,t.setAttribute(`style`,`font-size: 24px; font-weight: bold;`);let n=document.createElement(`div`);n.innerHTML=`Ensure that your browser and hardware meet the minimum requirements.`,n.setAttribute(`style`,`font-size: 18px;`);let r=document.createElement(`a`);r.innerHTML=`https://esriurl.com/webgl-faq`,r.target=`_blank`,r.setAttribute(`style`,`font-size: 18px;`),r.href=`https://esriurl.com/webgl-faq`,e.appendChild(t),e.appendChild(n),e.appendChild(r);let i=this.getSurface();i&&i.appendChild(e)}};e([b()],Q.prototype,`_userSpatialReference`,void 0),e([b()],Q.prototype,`activeTool`,null),e([b({readOnly:!0})],Q.prototype,`allLayerViews`,void 0),e([b({readOnly:!0})],Q.prototype,`layerviewCollections`,null),e([b(S(D,`analyses`))],Q.prototype,`analyses`,null),e([b()],Q.prototype,`animation`,null),e([b()],Q.prototype,`animationsEnabled`,void 0),e([b()],Q.prototype,`focusRegionVisible`,void 0),e([b()],Q.prototype,`focusRegionShortcutEnabled`,void 0),e([b()],Q.prototype,`focusRegion`,null),e([b({readOnly:!0})],Q.prototype,`attributionItems`,null),e([b()],Q.prototype,`attributionVisible`,void 0),e([b()],Q.prototype,`basemapView`,void 0),e([b()],Q.prototype,`center`,null),e([b()],Q.prototype,`defaultsFromMapSettings`,null),e([b()],Q.prototype,`defaultsFromMap`,null),e([b()],Q.prototype,`dependencies`,void 0),e([b()],Q.prototype,`displayFilterEnabled`,void 0),e([b({type:ne})],Q.prototype,`extent`,null),e([b()],Q.prototype,`fatalError`,void 0),e([b(S(O,`graphics`))],Q.prototype,`graphics`,void 0),e([b({readOnly:!0,type:w})],Q.prototype,`heightModelInfo`,null),e([b({type:r.ofType(K)})],Q.prototype,`highlights`,null),e([b({readOnly:!0})],Q.prototype,`interacting`,null),e([b({constructOnly:!0})],Q.prototype,`layerViewFilter`,void 0),e([b({readOnly:!0})],Q.prototype,`navigating`,null),e([b({readOnly:!0})],Q.prototype,`preconditionsReady`,null),e([b({readOnly:!0})],Q.prototype,`typeSpecificPreconditionsReady`,void 0),e([b({type:r,readOnly:!0})],Q.prototype,`layerViews`,void 0),e([b()],Q.prototype,`resolution`,null),e([b({type:N})],Q.prototype,`magnifier`,void 0),e([b({nonNullable:!0,type:V})],Q.prototype,`options`,void 0),e([b({value:null,type:t})],Q.prototype,`map`,null),e([b()],Q.prototype,`padding`,void 0),e([b({readOnly:!0})],Q.prototype,`ready`,void 0),e([b({readOnly:!0})],Q.prototype,`canZoomIn`,null),e([b({readOnly:!0})],Q.prototype,`canZoomOut`,null),e([b()],Q.prototype,`_readyStateWaitingTask`,void 0),e([b({readOnly:!0})],Q.prototype,`readyState`,null),e([b({type:T})],Q.prototype,`spatialReference`,null),e([b()],Q.prototype,`stationary`,null),e([b({type:A})],Q.prototype,`timeExtent`,null),e([b({type:String,nonNullable:!0})],Q.prototype,`timeZone`,null),e([b()],Q.prototype,`tools`,null),e([b()],Q.prototype,`toolViewManager`,void 0),e([b({readOnly:!0})],Q.prototype,`type`,void 0),e([b({type:Number})],Q.prototype,`scale`,void 0),e([b({readOnly:!0})],Q.prototype,`updating`,void 0),e([b({readOnly:!0})],Q.prototype,`initialExtentRequired`,void 0),e([b({readOnly:!0})],Q.prototype,`initialExtent`,null),e([b()],Q.prototype,`cursor`,null),e([b({readOnly:!0})],Q.prototype,`input`,void 0),e([b({type:H,nonNullable:!0})],Q.prototype,`navigation`,void 0),e([b()],Q.prototype,`layerViewManager`,void 0),e([b()],Q.prototype,`analysisViewManager`,void 0),e([b()],Q.prototype,`selectionManager`,void 0),e([b()],Q.prototype,`width`,void 0),e([b()],Q.prototype,`height`,void 0),e([b({readOnly:!0})],Q.prototype,`resizing`,void 0),e([b({value:null,readOnly:!0})],Q.prototype,`size`,null),e([b({readOnly:!0})],Q.prototype,`suspended`,void 0),e([b({readOnly:!0})],Q.prototype,`viewEvents`,void 0),e([b()],Q.prototype,`_isValid`,void 0),e([b()],Q.prototype,`_readyCycleForced`,void 0),e([b()],Q.prototype,`_lockedSpatialReference`,void 0),e([b()],Q.prototype,`_userTimeZone`,void 0),e([b()],Q.prototype,`_lockedTimeZone`,void 0),e([b()],Q.prototype,`_userTimeExtent`,void 0),e([b()],Q.prototype,`_lockedTimeExtent`,void 0),e([b({type:F})],Q.prototype,`theme`,void 0),e([b({readOnly:!0,type:F})],Q.prototype,`effectiveTheme`,null),e([b({readOnly:!0})],Q.prototype,`registeredComponents`,void 0),Q=Z=e([x(`esri.views.View`)],Q);const $=globalThis.$arcgis;$&&!$.views&&Object.defineProperty($,"views",{configurable:!1,enumerable:!0,writable:!1,value:Q.views});function re(e){return e.layerViews}export{Q as default};
package/views/View2D.d.ts CHANGED
@@ -903,7 +903,7 @@ export default abstract class View2D extends View2DSuperclass {
903
903
  * | Layer type | Hit test behavior |
904
904
  * | :--- | :--- |
905
905
  * | [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/), [CatalogFootprintLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/catalog/CatalogFootprintLayer/), [CSVLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/CSVLayer/), [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoJSONLayer/), [OGCFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/OGCFeatureLayer/), [OrientedImageryLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/OrientedImageryLayer/), [ParquetLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/), [StreamLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/StreamLayer/), [SubtypeGroupLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/SubtypeGroupLayer/), [WFSLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/WFSLayer/) | Returns all intersecting [features](https://developers.arcgis.com/javascript/latest/references/core/views/types/#GraphicHit) at the hit location. |
906
- * | [GeoRSSLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoRSSLayer/), [GraphicsLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GraphicsLayer/), [KMLLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/KMLLayer/), [MapNotesLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/MapNotesLayer/) | Returns all intersecting [features](https://developers.arcgis.com/javascript/latest/references/core/views/types/#GraphicHit) at the hit location. |
906
+ * | [GeoRSSLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoRSSLayer/), [GraphicsLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GraphicsLayer/), [KMLLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/KMLLayer/), [MapNotesLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/MapNotesLayer/), [SketchLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/SketchLayer/) | Returns all intersecting [features](https://developers.arcgis.com/javascript/latest/references/core/views/types/#GraphicHit) at the hit location. |
907
907
  * | [ImageryLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryLayer/), [ImageryTileLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryTileLayer/)| Returns [result](https://developers.arcgis.com/javascript/latest/references/core/views/types/#RasterHit) containing raster pixel value used in rendering and bandId info on intersecting pixels. Support was added in version 5.1. The `screenRect` hitTarget returns hit result at the center of the rectangle. |
908
908
  * | [VectorTileLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/VectorTileLayer/) | Returns a result for all intersecting [features](https://developers.arcgis.com/javascript/latest/references/core/views/types/#GraphicHit) containing attributes of style layers (as of version 4.29; in prior releases, only the topmost style layer result was returned). In addition, the graphic's [origin](https://developers.arcgis.com/javascript/latest/references/core/Graphic/#origin) contains the style layer's [id](https://maplibre.org/maplibre-style-spec/layers/#id) and layer index within the [vector tile style](https://doc.arcgis.com/en/arcgis-online/reference/tile-layers.htm#ESRI_SECTION1_8F68399EB47B48FF9EF46719FCC96978). Spatial information about the actual feature represented in the style layer is returned only if the style layer is a [symbol layer](https://maplibre.org/maplibre-style-spec/layers/#symbol). Otherwise, the graphic's geometry is `null`. |
909
909
  * | [MediaLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/MediaLayer/) | Returns [result](https://developers.arcgis.com/javascript/latest/references/core/views/types/#MediaHit) containing all media elements if the hit is made on intersecting elements. |
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import has from"../../../core/has.js";import n from"../../../core/Logger.js";import{watch as r,syncAndInitial as i}from"../../../core/reactiveUtils.js";import{sqlAnd as a}from"../../../core/sql.js";import{property as o,subclass as s}from"../../../core/accessorSupport/decorators.js";import c from"../../../layers/support/FeatureFilter.js";import{getFloorFilterClause as l}from"../../../layers/support/floorFilterUtils.js";import{isSubtypeGroupLayer as u,isFeatureLayer as d}from"../../../layers/support/layerUtils.js";import{isUtilityNetworkWebMap as f}from"./snappingUtils.js";import{scaleBoundsPredicate as p}from"../../support/layerViewUtils.js";let m=class extends t{set attributeRulesEnabled(e){this._set(`attributeRulesEnabled`,e),e&&this.loadRules()}get layerView(){return this.view?.allLayerViews?.find(e=>e.layer===this.layer)}get valid(){let{_valid:e,snappingSource:t,layer:n}=this;return!t||!n?!1:e}get subtypeFilter(){let{layer:e,snappingSource:t}=this;if(!u(e)||!e.subtypes?.length||!t)return{mode:`not-in-use`,filter:null};let n=t.layerSource.sublayerSources.filter(e=>e.enabled&&e.layer.visible&&p(this.view?.scale,e.layer.effectiveScaleRange.minScale,e.layer.effectiveScaleRange.maxScale)).map(e=>e.layer.subtypeCode);if(!n.length)return{mode:`none-visible`,filter:null};if(n.length===e.subtypes.length)return{mode:`all-visible`,filter:null};let r=e.fieldsIndex.get(e.subtypeField)?.name??e.subtypeField;return n.length===1?{mode:`in-use`,filter:`${r} = ${n.getItemAt(0)}`}:{mode:`in-use`,filter:`${r} IN (${n.join(`, `)})`}}get floorFilter(){let{view:e,layer:t}=this;return!e||!t?null:l({view:e,layer:t})}constructor(e){super(e),this.layer=null,this.snappingSource=null,this.rulesTable=null,this._valid=null}initialize(){if(!this.snappingSource||!this.layer){this._valid=!1;return}let{layer:e,snappingSource:t}=this;if(`refresh`in e){let n=e;this.addHandles(n.on(`refresh`,()=>t.refresh()))}this.loadRules(),this.addHandles([r(()=>t.updating,e=>t.layerSource.updating=e,i),r(()=>t.availability,e=>t.layerSource.availability=e,i)])}getFetchCandidatesParameters(e,t,n){if(!this.valid)return[];let{layer:r,layerView:i,floorFilter:o,rulesTable:s,subtypeFilter:l}=this,p={distance:n,mode:this.view?.type??`2d`,point:e,coordinateHelper:t.coordinateHelper,...h(),filter:i&&`filter`in i?i.filter:null};if(o&&(p.filter=g(p.filter,o)),l.mode!==`not-in-use`&&l.mode!==`all-visible`){if(l.mode===`none-visible`)return[];p.filter?p.filter.where=a(p.filter.where,l.mode):p.filter=new c({where:l.filter})}if(!this.attributeRulesEnabled)return[p];let m=t.feature,_=m?.sourceLayer?.type===`subtype-sublayer`?m.sourceLayer.parent:m?.sourceLayer;if(s&&m&&f(this.view?.map)&&(d(r)||u(r))&&(d(_)||u(_))&&this.view.map.utilityNetworks?.find(e=>e.isUtilityLayer(_))){if(s.loadStatus!==`loaded`)return[];let e=[],t=r.layerId,n=s.getFeatureSQL(_,m)?.[t];if(!n)return[];let i=n.anyVertex,a=n.endVertex;return a&&i&&a===i&&(a=``),a&&e.push({...p,returnEdge:!1,vertexMode:`ends`,filter:g(p.filter,a)}),i&&e.push({...p,returnEdge:has(`snapping-include-edges-when-applying-any-vertex-rule`)??!1,vertexMode:`all`,filter:g(p.filter,i)}),e}return[p]}async loadRules(){this._valid=null;let{layer:e,view:t,attributeRulesEnabled:r}=this;if(r&&e&&t&&f(t?.map)&&(d(e)||u(e)))try{await Promise.allSettled(t.map.utilityNetworks?.map(e=>e.load())??[]);let n=t.map.utilityNetworks?.find(t=>t.isUtilityLayer(e));n&&(this.rulesTable=await n.getRulesTable(),await this.rulesTable?.load())}catch{this._valid=!1,n.getLogger(`esri.views.interactive.snapping.FeatureSnappingSourceInfo`).error(`Failed to load rules table for snapping source`,e.title);return}this._valid=!0}remove(){this.destroy()}destroy(){this.snappingSource?.destroy()}};e([o({constructOnly:!0})],m.prototype,`layer`,void 0),e([o({constructOnly:!0})],m.prototype,`snappingSource`,void 0),e([o({constructOnly:!0})],m.prototype,`view`,void 0),e([o({value:!1})],m.prototype,`attributeRulesEnabled`,null),e([o()],m.prototype,`layerView`,null),e([o()],m.prototype,`rulesTable`,void 0),e([o()],m.prototype,`valid`,null),e([o()],m.prototype,`subtypeFilter`,null),e([o()],m.prototype,`floorFilter`,null),e([o()],m.prototype,`_valid`,void 0),m=e([s(`esri.views.interactive.snapping.FeatureSnappingSourceInfo`)],m);function h(){return{returnEdge:!0,vertexMode:`all`}}function g(e,t){return e==null?new c({where:t}):e.where?new c({where:a(e.where,t)}):new c({where:t})}export{m as FeatureSnappingSourceInfo};
2
+ import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import has from"../../../core/has.js";import n from"../../../core/Logger.js";import{watch as r,syncAndInitial as i}from"../../../core/reactiveUtils.js";import{sqlAnd as a}from"../../../core/sql.js";import{property as o,subclass as s}from"../../../core/accessorSupport/decorators.js";import{scaleBoundsPredicate as c}from"../../../geometry/support/scaleUtils.js";import l from"../../../layers/support/FeatureFilter.js";import{getFloorFilterClause as u}from"../../../layers/support/floorFilterUtils.js";import{isSubtypeGroupLayer as d,isFeatureLayer as f}from"../../../layers/support/layerUtils.js";import{isUtilityNetworkWebMap as p}from"./snappingUtils.js";let m=class extends t{set attributeRulesEnabled(e){this._set(`attributeRulesEnabled`,e),e&&this.loadRules()}get layerView(){return this.view?.allLayerViews?.find(e=>e.layer===this.layer)}get valid(){let{_valid:e,snappingSource:t,layer:n}=this;return!t||!n?!1:e}get subtypeFilter(){let{layer:e,snappingSource:t}=this;if(!d(e)||!e.subtypes?.length||!t)return{mode:`not-in-use`,filter:null};let n=t.layerSource.sublayerSources.filter(e=>e.enabled&&e.layer.visible&&c(this.view?.scale,e.layer.effectiveScaleRange.minScale,e.layer.effectiveScaleRange.maxScale)).map(e=>e.layer.subtypeCode);if(!n.length)return{mode:`none-visible`,filter:null};if(n.length===e.subtypes.length)return{mode:`all-visible`,filter:null};let r=e.fieldsIndex.get(e.subtypeField)?.name??e.subtypeField;return n.length===1?{mode:`in-use`,filter:`${r} = ${n.getItemAt(0)}`}:{mode:`in-use`,filter:`${r} IN (${n.join(`, `)})`}}get floorFilter(){let{view:e,layer:t}=this;return!e||!t?null:u({view:e,layer:t})}constructor(e){super(e),this.layer=null,this.snappingSource=null,this.rulesTable=null,this._valid=null}initialize(){if(!this.snappingSource||!this.layer){this._valid=!1;return}let{layer:e,snappingSource:t}=this;if(`refresh`in e){let n=e;this.addHandles(n.on(`refresh`,()=>t.refresh()))}this.loadRules(),this.addHandles([r(()=>t.updating,e=>t.layerSource.updating=e,i),r(()=>t.availability,e=>t.layerSource.availability=e,i)])}getFetchCandidatesParameters(e,t,n){if(!this.valid)return[];let{layer:r,layerView:i,floorFilter:o,rulesTable:s,subtypeFilter:c}=this,u={distance:n,mode:this.view?.type??`2d`,point:e,coordinateHelper:t.coordinateHelper,...h(),filter:i&&`filter`in i?i.filter:null};if(o&&(u.filter=g(u.filter,o)),c.mode!==`not-in-use`&&c.mode!==`all-visible`){if(c.mode===`none-visible`)return[];u.filter?u.filter.where=a(u.filter.where,c.mode):u.filter=new l({where:c.filter})}if(!this.attributeRulesEnabled)return[u];let m=t.feature,_=m?.sourceLayer?.type===`subtype-sublayer`?m.sourceLayer.parent:m?.sourceLayer;if(s&&m&&p(this.view?.map)&&(f(r)||d(r))&&(f(_)||d(_))&&this.view.map.utilityNetworks?.find(e=>e.isUtilityLayer(_))){if(s.loadStatus!==`loaded`)return[];let e=[],t=r.layerId,n=s.getFeatureSQL(_,m)?.[t];if(!n)return[];let i=n.anyVertex,a=n.endVertex;return a&&i&&a===i&&(a=``),a&&e.push({...u,returnEdge:!1,vertexMode:`ends`,filter:g(u.filter,a)}),i&&e.push({...u,returnEdge:has(`snapping-include-edges-when-applying-any-vertex-rule`)??!1,vertexMode:`all`,filter:g(u.filter,i)}),e}return[u]}async loadRules(){this._valid=null;let{layer:e,view:t,attributeRulesEnabled:r}=this;if(r&&e&&t&&p(t?.map)&&(f(e)||d(e)))try{await Promise.allSettled(t.map.utilityNetworks?.map(e=>e.load())??[]);let n=t.map.utilityNetworks?.find(t=>t.isUtilityLayer(e));n&&(this.rulesTable=await n.getRulesTable(),await this.rulesTable?.load())}catch{this._valid=!1,n.getLogger(`esri.views.interactive.snapping.FeatureSnappingSourceInfo`).error(`Failed to load rules table for snapping source`,e.title);return}this._valid=!0}remove(){this.destroy()}destroy(){this.snappingSource?.destroy()}};e([o({constructOnly:!0})],m.prototype,`layer`,void 0),e([o({constructOnly:!0})],m.prototype,`snappingSource`,void 0),e([o({constructOnly:!0})],m.prototype,`view`,void 0),e([o({value:!1})],m.prototype,`attributeRulesEnabled`,null),e([o()],m.prototype,`layerView`,null),e([o()],m.prototype,`rulesTable`,void 0),e([o()],m.prototype,`valid`,null),e([o()],m.prototype,`subtypeFilter`,null),e([o()],m.prototype,`floorFilter`,null),e([o()],m.prototype,`_valid`,void 0),m=e([s(`esri.views.interactive.snapping.FeatureSnappingSourceInfo`)],m);function h(){return{returnEdge:!0,vertexMode:`all`}}function g(e,t){return e==null?new l({where:t}):e.where?new l({where:a(e.where,t)}):new l({where:t})}export{m as FeatureSnappingSourceInfo};