@arcgis/core 4.23.0-next.20220127 → 4.23.0-next.20220131

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 (404) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/0463ba46df855a92b9c0.js +1 -0
  3. package/assets/esri/core/workers/chunks/{8001b0e514bfffe9d7f8.js → 0c15d77d8e817cf45a9a.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{e657ba0cab29f05d02da.js → 0cd0a6eef51fc5b9ea61.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{e4896cf85fb2da8a9cc7.js → 17de7a324dfa7f57ad5d.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{c36f84daa7736878418d.js → 197ec52641aed20029c6.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{0317f37b6c8705b363fd.js → 1c733b7db092a2a88ef3.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{9387db408f496e7dd003.js → 214910032945dd2d86b0.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{d835b2a683fcd8aeeed8.js → 27474b007988855bea9d.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{e93dfdede0532a89ffa5.js → 2b25fc7945a187c2bb9d.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{5948923e07bd1662c24a.js → 37c03cfc19086ce631c6.js} +1 -1
  12. package/assets/esri/core/workers/chunks/44f0c3663b293afbd172.js +1 -0
  13. package/assets/esri/core/workers/chunks/483d5d8593d96d0f0b15.js +1 -0
  14. package/assets/esri/core/workers/chunks/49a1a633bb0d93764aae.js +1 -0
  15. package/assets/esri/core/workers/chunks/{5f1dcb6556820cd0aa31.js → 4be35af7d6babbfe9d84.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{f9ff3eaf4eb324429fbd.js → 5457962a70bd3c557a75.js} +1 -1
  17. package/assets/esri/core/workers/chunks/56657f890e0f79f5d2ad.js +1 -0
  18. package/assets/esri/core/workers/chunks/57856b4a9b8784a69844.js +1 -0
  19. package/assets/esri/core/workers/chunks/{56274b37ff74ca0d68a6.js → 5d11b97b667921d67ae7.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{ba5eb394f098968c22d2.js → 655b55ac0cd533d7e9d7.js} +1 -1
  21. package/assets/esri/core/workers/chunks/70d6bb3c7112cb702389.js +1 -0
  22. package/assets/esri/core/workers/chunks/810a763373d7f78ae398.js +1 -0
  23. package/assets/esri/core/workers/chunks/918bb7a7d901544a7367.js +1 -0
  24. package/assets/esri/core/workers/chunks/949b2269457302ffc64b.js +1 -0
  25. package/assets/esri/core/workers/chunks/{601e697dc7414bda128a.js → 952980635afc7ec81804.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{e8741bf421f80213f1d3.js → 9876a1bae350795fab36.js} +1 -1
  27. package/assets/esri/core/workers/chunks/99619fcb772807c74f3b.js +1 -0
  28. package/assets/esri/core/workers/chunks/{3f343f792fd9f44d6f25.js → b3f5e91116112b0b612a.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{9d77467aa71d345fc1b6.js → bcc01bbffaa3bb5f60a8.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{4c76146014dc15143ba3.js → be588873c16770ceb9ef.js} +1 -1
  31. package/assets/esri/core/workers/chunks/d1fe53b597351dc58305.js +1 -0
  32. package/assets/esri/core/workers/chunks/d98dab12b71912fa397b.js +1 -0
  33. package/assets/esri/core/workers/chunks/{b62e3dccd9f662c0afeb.js → db3c729ce0c0b2690dc9.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{199670a3a564ebe3bd79.js → e218bde41ffbcc5194f5.js} +1 -1
  35. package/assets/esri/core/workers/chunks/e21b211913aefde47e30.js +1 -0
  36. package/assets/esri/core/workers/chunks/{c9cbf8135e95f0f42cd9.js → e287f49184d076af17e2.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{bde1d5b0a7717350986e.js → e4019b63a1fe74e2c842.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{6e6a3c5866e8d8820457.js → eb82ff10cef2bde6e57f.js} +1 -1
  39. package/assets/esri/core/workers/chunks/ebc6f4764b82d4104c65.js +1 -0
  40. package/assets/esri/core/workers/chunks/{842db82733635dbf25cb.js → ee6e0db58dc64410e687.js} +1 -1
  41. package/assets/esri/core/workers/chunks/f0a9f161805fc7a30fc5.js +1 -0
  42. package/assets/esri/core/workers/chunks/f7150547d7e3259a0f29.js +981 -0
  43. package/assets/esri/core/workers/chunks/fc046a15466c25d081ff.js +1 -0
  44. package/assets/esri/images/portal/mediaservice16.png +0 -0
  45. package/assets/esri/libs/vxl/vxlLayer.wasm +0 -0
  46. package/assets/esri/widgets/Directions/t9n/Directions.json +1 -1
  47. package/assets/esri/widgets/Directions/t9n/Directions_ar.json +1 -1
  48. package/assets/esri/widgets/Directions/t9n/Directions_bg.json +1 -1
  49. package/assets/esri/widgets/Directions/t9n/Directions_bs.json +1 -1
  50. package/assets/esri/widgets/Directions/t9n/Directions_ca.json +1 -1
  51. package/assets/esri/widgets/Directions/t9n/Directions_cs.json +1 -1
  52. package/assets/esri/widgets/Directions/t9n/Directions_da.json +1 -1
  53. package/assets/esri/widgets/Directions/t9n/Directions_de.json +1 -1
  54. package/assets/esri/widgets/Directions/t9n/Directions_el.json +1 -1
  55. package/assets/esri/widgets/Directions/t9n/Directions_en.json +1 -1
  56. package/assets/esri/widgets/Directions/t9n/Directions_es.json +1 -1
  57. package/assets/esri/widgets/Directions/t9n/Directions_et.json +1 -1
  58. package/assets/esri/widgets/Directions/t9n/Directions_fi.json +1 -1
  59. package/assets/esri/widgets/Directions/t9n/Directions_fr.json +1 -1
  60. package/assets/esri/widgets/Directions/t9n/Directions_he.json +1 -1
  61. package/assets/esri/widgets/Directions/t9n/Directions_hr.json +1 -1
  62. package/assets/esri/widgets/Directions/t9n/Directions_hu.json +1 -1
  63. package/assets/esri/widgets/Directions/t9n/Directions_id.json +1 -1
  64. package/assets/esri/widgets/Directions/t9n/Directions_it.json +1 -1
  65. package/assets/esri/widgets/Directions/t9n/Directions_ja.json +1 -1
  66. package/assets/esri/widgets/Directions/t9n/Directions_ko.json +1 -1
  67. package/assets/esri/widgets/Directions/t9n/Directions_lt.json +1 -1
  68. package/assets/esri/widgets/Directions/t9n/Directions_lv.json +1 -1
  69. package/assets/esri/widgets/Directions/t9n/Directions_nb.json +1 -1
  70. package/assets/esri/widgets/Directions/t9n/Directions_nl.json +1 -1
  71. package/assets/esri/widgets/Directions/t9n/Directions_pl.json +1 -1
  72. package/assets/esri/widgets/Directions/t9n/Directions_pt-BR.json +1 -1
  73. package/assets/esri/widgets/Directions/t9n/Directions_pt-PT.json +1 -1
  74. package/assets/esri/widgets/Directions/t9n/Directions_ro.json +1 -1
  75. package/assets/esri/widgets/Directions/t9n/Directions_ru.json +1 -1
  76. package/assets/esri/widgets/Directions/t9n/Directions_sk.json +1 -1
  77. package/assets/esri/widgets/Directions/t9n/Directions_sl.json +1 -1
  78. package/assets/esri/widgets/Directions/t9n/Directions_sr.json +1 -1
  79. package/assets/esri/widgets/Directions/t9n/Directions_sv.json +1 -1
  80. package/assets/esri/widgets/Directions/t9n/Directions_th.json +1 -1
  81. package/assets/esri/widgets/Directions/t9n/Directions_tr.json +1 -1
  82. package/assets/esri/widgets/Directions/t9n/Directions_uk.json +1 -1
  83. package/assets/esri/widgets/Directions/t9n/Directions_vi.json +1 -1
  84. package/assets/esri/widgets/Directions/t9n/Directions_zh-CN.json +1 -1
  85. package/assets/esri/widgets/Directions/t9n/Directions_zh-HK.json +1 -1
  86. package/assets/esri/widgets/Directions/t9n/Directions_zh-TW.json +1 -1
  87. package/chunks/BlendLayers.glsl.js +2 -2
  88. package/chunks/ChapmanAtmosphere.glsl.js +17 -17
  89. package/chunks/CheckerBoard.glsl.js +3 -3
  90. package/chunks/Clouds.glsl.js +2 -2
  91. package/chunks/CloudsComposition.glsl.js +1 -1
  92. package/chunks/ColorMaterial.glsl.js +12 -12
  93. package/chunks/ComponentShader.glsl.js +3 -3
  94. package/chunks/Compositing.glsl.js +1 -1
  95. package/chunks/DefaultMaterial.glsl.js +33 -33
  96. package/chunks/EdgeShaderProgram.glsl.js +7 -7
  97. package/chunks/Fog.glsl.js +10 -12
  98. package/chunks/HUDMaterial.glsl.js +2 -2
  99. package/chunks/HighlightComposition.glsl.js +5 -5
  100. package/chunks/ImageMaterial.glsl.js +6 -6
  101. package/chunks/LaserlinePath.glsl.js +8 -8
  102. package/chunks/LineCallout.glsl.js +6 -6
  103. package/chunks/MeasurementArrow.glsl.js +1 -1
  104. package/chunks/NativeLine.glsl.js +1 -1
  105. package/chunks/Path.glsl.js +5 -5
  106. package/chunks/Pattern.glsl.js +9 -9
  107. package/chunks/PointRenderer.glsl.js +14 -14
  108. package/chunks/Precipitation.glsl.js +2 -2
  109. package/chunks/RealisticTree.glsl.js +21 -21
  110. package/chunks/RibbonLine.glsl.js +11 -11
  111. package/chunks/SMAA.glsl.js +40 -40
  112. package/chunks/ShadedColorMaterial.glsl.js +12 -12
  113. package/chunks/ShadowCast.glsl.js +6 -6
  114. package/chunks/ShadowHighlight.glsl.js +4 -4
  115. package/chunks/SimpleAtmosphere.glsl.js +3 -3
  116. package/chunks/SlicePlaneMaterial.glsl.js +3 -3
  117. package/chunks/Stars.glsl.js +3 -3
  118. package/chunks/Terrain.glsl.js +11 -11
  119. package/chunks/TextureOnly.glsl.js +2 -2
  120. package/chunks/WaterSurface.glsl.js +5 -5
  121. package/chunks/boundedPlane.js +1 -1
  122. package/core/accessorSupport/watch.js +1 -1
  123. package/core/loadAll.js +1 -1
  124. package/geometry/support/frustum.js +1 -1
  125. package/geometry/support/plane.js +1 -1
  126. package/interfaces.d.ts +653 -55
  127. package/layers/RouteLayer.d.ts +4 -0
  128. package/layers/RouteLayer.js +1 -1
  129. package/layers/VectorTileLayer.js +1 -1
  130. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  131. package/layers/graphics/featureConversionUtils.js +1 -1
  132. package/layers/support/LayerContingentValuesCache.js +1 -1
  133. package/layers/support/TileInfo.js +1 -1
  134. package/package.json +1 -1
  135. package/portal/PortalItem.js +1 -1
  136. package/rest/support/DirectionLine.d.ts +4 -0
  137. package/rest/support/DirectionPoint.d.ts +4 -0
  138. package/rest/support/RouteInfo.d.ts +4 -0
  139. package/rest/support/RouteInfo.js +1 -1
  140. package/rest/support/RouteSolveResult.d.ts +4 -0
  141. package/smartMapping/statistics/support/predominanceUtils.d.ts +4 -0
  142. package/support/revision.js +1 -1
  143. package/symbols/FillSymbol3DLayer.js +1 -1
  144. package/symbols/IconSymbol3DLayer.js +1 -1
  145. package/symbols/ObjectSymbol3DLayer.js +1 -1
  146. package/symbols/Symbol3D.js +1 -1
  147. package/symbols/WebStyleSymbol.js +1 -1
  148. package/symbols/cim/CIMSymbolRasterizer.js +1 -1
  149. package/symbols/support/IconSymbol3DLayerResource.js +1 -1
  150. package/symbols/support/ObjectSymbol3DLayerResource.js +1 -1
  151. package/symbols/support/Symbol3DAnchorPosition2D.js +1 -1
  152. package/symbols/support/Symbol3DAnchorPosition3D.js +1 -1
  153. package/symbols/support/Symbol3DFillMaterial.js +1 -1
  154. package/symbols/support/Symbol3DIconOutline.js +1 -1
  155. package/symbols/support/Symbol3DOutline.js +1 -1
  156. package/symbols/support/Thumbnail.js +1 -1
  157. package/symbols/support/webStyleSymbolUtils.js +1 -1
  158. package/views/2d/engine/vectorTiles/SchemaHelper.js +1 -1
  159. package/views/2d/layers/RouteLayerView2D.js +1 -1
  160. package/views/3d/environment/ChapmanAtmosphere.glsl.js +1 -1
  161. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  162. package/views/3d/environment/CloudsComposition.glsl.js +1 -1
  163. package/views/3d/environment/CloudsComposition.js +1 -1
  164. package/views/3d/environment/CloudsGenerator.js +1 -1
  165. package/views/3d/environment/Fog.glsl.js +1 -1
  166. package/views/3d/environment/Fog.js +1 -1
  167. package/views/3d/environment/NoiseTextureAtlas.js +1 -1
  168. package/views/3d/environment/PanoramicAtmosphere.js +1 -1
  169. package/views/3d/environment/Precipitation.glsl.js +1 -1
  170. package/views/3d/environment/Precipitation.js +1 -1
  171. package/views/3d/environment/PrecipitationTechnique.js +1 -1
  172. package/views/3d/environment/SimpleAtmosphere.glsl.js +1 -1
  173. package/views/3d/environment/SimpleAtmosphere.js +1 -1
  174. package/views/3d/environment/Stars.glsl.js +1 -1
  175. package/views/3d/environment/Stars.js +1 -1
  176. package/views/3d/interactive/analysisTools/slice/sliceToolUtils.js +1 -1
  177. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  178. package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
  179. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  180. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  181. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  182. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  183. package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
  184. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  185. package/views/3d/layers/I3SMeshView3D.js +1 -1
  186. package/views/3d/layers/VectorTileLayerView3D.js +1 -1
  187. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  188. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  189. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  190. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  191. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  192. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  193. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  194. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  195. package/views/3d/layers/graphics/graphicUtils.js +1 -1
  196. package/views/3d/layers/graphics/lineUtils.js +1 -1
  197. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  198. package/views/3d/layers/graphics/polygonUtils.js +1 -1
  199. package/views/3d/layers/graphics/symbolComplexity.js +1 -1
  200. package/views/3d/layers/i3s/I3SBinaryReader.js +1 -1
  201. package/views/3d/layers/i3s/I3SCrossfadeHelper.js +1 -1
  202. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  203. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  204. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  205. package/views/3d/layers/i3s/PointRenderer.js +1 -1
  206. package/views/3d/layers/support/HeatmapFeatureProcessor.js +5 -0
  207. package/views/3d/layers/support/overlayImageUtils.js +1 -1
  208. package/views/3d/layers/support/patternUtils.js +1 -1
  209. package/views/3d/state/controllers/local/PinchAndPanController.js +1 -1
  210. package/views/3d/support/FrustumExtentIntersection.js +1 -1
  211. package/views/3d/support/LaserLineRenderer.js +1 -1
  212. package/views/3d/support/LaserlinePathData.js +1 -1
  213. package/views/3d/terrain/OverlayRenderer.js +1 -1
  214. package/views/3d/terrain/PatchGeometryFactory.js +1 -1
  215. package/views/3d/terrain/TerrainRenderer.js +1 -1
  216. package/views/3d/terrain/TerrainSurface.js +1 -1
  217. package/views/3d/terrain/Tile.js +1 -1
  218. package/views/3d/terrain/TileRenderer.js +1 -1
  219. package/views/3d/terrain/terrainUtils.js +1 -1
  220. package/views/3d/terrain/tileUtils.js +1 -1
  221. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  222. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  223. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  224. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js +10 -10
  225. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
  226. package/views/3d/webgl-engine/collections/Component/SourceGeometry.js +1 -1
  227. package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
  228. package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
  229. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  230. package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js +2 -2
  231. package/views/3d/webgl-engine/core/shaderLibrary/ScreenSizeScaling.glsl.js +2 -2
  232. package/views/3d/webgl-engine/core/shaderLibrary/ScreenSpacePass.js +2 -2
  233. package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +2 -2
  234. package/views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js +4 -4
  235. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +1 -1
  236. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PositionAttribute.glsl.js +1 -1
  237. package/views/3d/webgl-engine/core/shaderLibrary/attributes/RibbonVertexPosition.glsl.js +1 -1
  238. package/views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js +1 -1
  239. package/views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js +3 -3
  240. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexColor.glsl.js +1 -1
  241. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +6 -6
  242. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +12 -12
  243. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexTextureCoordinates.glsl.js +4 -4
  244. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VerticalOffset.glsl.js +1 -1
  245. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +16 -16
  246. package/views/3d/webgl-engine/core/shaderLibrary/default/RealisticTree.glsl.js +1 -1
  247. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +5 -5
  248. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUDOcclusionPass.glsl.js +3 -3
  249. package/views/3d/webgl-engine/core/shaderLibrary/raster/BasicGrid.glsl.js +2 -2
  250. package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeMaterialColor.glsl.js +6 -6
  251. package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeNormalTexture.glsl.js +2 -2
  252. package/views/3d/webgl-engine/core/shaderLibrary/shading/ComputeShadingNormal.glsl.js +10 -11
  253. package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +2 -2
  254. package/views/3d/webgl-engine/core/shaderLibrary/shading/MultipassGeometryTest.glsl.js +2 -2
  255. package/views/3d/webgl-engine/core/shaderLibrary/shading/MultipassTerrainTest.glsl.js +2 -2
  256. package/views/3d/webgl-engine/core/shaderLibrary/shading/Normals.glsl.js +6 -6
  257. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadBaseColorTexture.glsl.js +4 -4
  258. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +6 -6
  259. package/views/3d/webgl-engine/core/shaderLibrary/shading/Reprojection.glsl.js +4 -4
  260. package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceReflections.glsl.js +5 -5
  261. package/views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js +1 -1
  262. package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +10 -10
  263. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Terrain.glsl.js +1 -1
  264. package/views/3d/webgl-engine/core/shaderLibrary/util/BlendLayers.glsl.js +1 -1
  265. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +4 -4
  266. package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
  267. package/views/3d/webgl-engine/lib/Camera.js +1 -1
  268. package/views/3d/webgl-engine/lib/CompositingHelper.js +1 -1
  269. package/views/3d/webgl-engine/lib/DefaultVertexAttributeLocations.js +1 -1
  270. package/views/3d/webgl-engine/lib/DefaultVertexBufferLayouts.js +1 -1
  271. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  272. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  273. package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
  274. package/views/3d/webgl-engine/lib/HighlightHelper.js +1 -1
  275. package/views/3d/webgl-engine/lib/MagnifierHelper.js +1 -1
  276. package/views/3d/webgl-engine/lib/Material.js +1 -1
  277. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  278. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  279. package/views/3d/webgl-engine/lib/SSAOHelper.js +1 -1
  280. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  281. package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
  282. package/views/3d/webgl-engine/lib/ShadowHighlightHelper.js +1 -1
  283. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  284. package/views/3d/webgl-engine/lib/SmaaRenderPass.js +1 -1
  285. package/views/3d/webgl-engine/lib/TextTextureAtlas.js +1 -1
  286. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  287. package/views/3d/webgl-engine/lib/TextureUniformName.js +4 -0
  288. package/views/3d/webgl-engine/lib/UniformName.js +4 -0
  289. package/views/3d/webgl-engine/lib/VertexAttribute.js +5 -0
  290. package/views/3d/webgl-engine/lib/basicInterfaces.js +1 -1
  291. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  292. package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
  293. package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderTechnique.js +1 -1
  294. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  295. package/views/3d/webgl-engine/lib/edgeRendering/bufferLayouts.js +1 -1
  296. package/views/3d/webgl-engine/lib/lodRendering/InstanceData.js +1 -1
  297. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  298. package/views/3d/webgl-engine/lib/lodRendering/RenderInstanceData.js +1 -1
  299. package/views/3d/webgl-engine/lib/pathGeometryUtils.js +1 -1
  300. package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
  301. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  302. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  303. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  304. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  305. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  306. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  307. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  308. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  309. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  310. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  311. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  312. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  313. package/views/3d/webgl-engine/materials/SlicePlaneMaterial.js +1 -1
  314. package/views/3d/webgl-engine/materials/VisualVariableMaterialParameters.js +1 -1
  315. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  316. package/views/3d/webgl-engine/materials/internal/DefaultBufferWriter.js +1 -1
  317. package/views/3d/webgl-engine/materials/internal/MaterialUtil.js +1 -1
  318. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  319. package/views/3d/webgl-engine/materials/internal/waterMaterialUtils.js +1 -1
  320. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  321. package/views/3d/webgl-engine/shaders/CheckerBoard.glsl.js +1 -1
  322. package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
  323. package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
  324. package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
  325. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  326. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  327. package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
  328. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  329. package/views/3d/webgl-engine/shaders/HighlightComposition.glsl.js +1 -1
  330. package/views/3d/webgl-engine/shaders/HighlightTechnique.js +1 -1
  331. package/views/3d/webgl-engine/shaders/ImageMaterial.glsl.js +1 -1
  332. package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
  333. package/views/3d/webgl-engine/shaders/LaserlinePath.glsl.js +1 -1
  334. package/views/3d/webgl-engine/shaders/LaserlinePathTechnique.js +1 -1
  335. package/views/3d/webgl-engine/shaders/LineCallout.glsl.js +1 -1
  336. package/views/3d/webgl-engine/shaders/LineCalloutTechnique.js +1 -1
  337. package/views/3d/webgl-engine/shaders/Magnifier.glsl.js +1 -1
  338. package/views/3d/webgl-engine/shaders/MeasurementArrow.glsl.js +1 -1
  339. package/views/3d/webgl-engine/shaders/NativeLine.glsl.js +1 -1
  340. package/views/3d/webgl-engine/shaders/Pattern.glsl.js +1 -1
  341. package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
  342. package/views/3d/webgl-engine/shaders/PointRenderer.glsl.js +1 -1
  343. package/views/3d/webgl-engine/shaders/RealisticTreeTechnique.js +1 -1
  344. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  345. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  346. package/views/3d/webgl-engine/shaders/SMAA.glsl.js +1 -1
  347. package/views/3d/webgl-engine/shaders/ShadedColorMaterial.glsl.js +1 -1
  348. package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
  349. package/views/3d/webgl-engine/shaders/ShadowCastTechnique.js +1 -1
  350. package/views/3d/webgl-engine/shaders/ShadowHighlightTechnique.js +1 -1
  351. package/views/3d/webgl-engine/shaders/SlicePlaneMaterial.glsl.js +1 -1
  352. package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
  353. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/AdjustProjectedPosition.glsl.js +10 -10
  354. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/DiscardShortEdges.glsl.js +1 -1
  355. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeShaderProgram.glsl.js +1 -1
  356. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/EdgeUtil.glsl.js +21 -21
  357. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineAmplitude.glsl.js +6 -6
  358. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/LineOffset.glsl.js +13 -13
  359. package/views/3d/webgl-engine/shaders/sources/edgeRenderer/UnpackAttributes.glsl.js +6 -6
  360. package/views/SceneView.js +1 -1
  361. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  362. package/views/support/WatchUpdatingTracking.js +1 -1
  363. package/views/webgl/BufferObject.js +1 -1
  364. package/views/webgl/InstanceCounter.js +1 -1
  365. package/views/webgl/Program.js +1 -1
  366. package/webdoc/support/{Thumbnail.js → SlideThumbnail.js} +1 -1
  367. package/webmap/Bookmark.js +1 -1
  368. package/webmap/Version.js +1 -1
  369. package/webscene/Slide.js +1 -1
  370. package/webscene/Version.js +1 -1
  371. package/webscene/support/SlideVisibleLayer.js +1 -1
  372. package/widgets/BasemapGallery/support/basemapCompatibilityUtils.js +1 -1
  373. package/widgets/Bookmarks/BookmarksViewModel.js +1 -1
  374. package/widgets/Bookmarks.js +1 -1
  375. package/widgets/Directions/DirectionsViewModel.js +1 -1
  376. package/widgets/Directions/support/directionsUtils.js +1 -1
  377. package/widgets/Directions/support/resources.js +1 -1
  378. package/widgets/Directions.js +1 -1
  379. package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
  380. package/widgets/Search/support/locatorUtils.js +1 -1
  381. package/widgets/Search.js +1 -1
  382. package/widgets/TimeSlider.js +1 -1
  383. package/assets/esri/core/workers/chunks/12c0cabb6c59e65d8546.js +0 -1
  384. package/assets/esri/core/workers/chunks/322d917e8cb398816a93.js +0 -1
  385. package/assets/esri/core/workers/chunks/392b6382e06652dd4c80.js +0 -1
  386. package/assets/esri/core/workers/chunks/3aa73119b055e05bbbeb.js +0 -1
  387. package/assets/esri/core/workers/chunks/52ea678ba1da0e349919.js +0 -1
  388. package/assets/esri/core/workers/chunks/5ee497d5d7b0e580526a.js +0 -1
  389. package/assets/esri/core/workers/chunks/663ad15b86936eb06b69.js +0 -1
  390. package/assets/esri/core/workers/chunks/83b8fec1650e061aaa56.js +0 -1
  391. package/assets/esri/core/workers/chunks/9796d54ff12b6429164a.js +0 -1
  392. package/assets/esri/core/workers/chunks/c093dff4592832ac0973.js +0 -1
  393. package/assets/esri/core/workers/chunks/d07440469fe7d181c4fd.js +0 -1
  394. package/assets/esri/core/workers/chunks/dbf192b4ce7e608610f6.js +0 -1
  395. package/assets/esri/core/workers/chunks/de6cff7b6cbbf99b20d1.js +0 -981
  396. package/assets/esri/core/workers/chunks/dee9929d95e9fe26929c.js +0 -1
  397. package/assets/esri/core/workers/chunks/e12d91ef44d6f879a02a.js +0 -1
  398. package/assets/esri/core/workers/chunks/e59764ee8cf25d4f74e2.js +0 -1
  399. package/assets/esri/core/workers/chunks/fc7e31d87555beb63291.js +0 -1
  400. package/assets/esri/core/workers/chunks/fff6b0338f06dad0c45d.js +0 -1
  401. package/widgets/Directions/support/CostSummary.js +0 -5
  402. package/widgets/Directions/support/RouteSection.js +0 -5
  403. package/widgets/Directions/support/RouteSections.js +0 -5
  404. package/widgets/Directions/support/maneuverUtils.js +0 -5
@@ -2,18 +2,18 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{glsl as e}from"../../../core/shaderModules/interfaces.js";import{VertexAttribute as t}from"../../../lib/basicInterfaces.js";import{EdgeUtil as n}from"./EdgeUtil.glsl.js";function s(s,i){const o=s.vertex;switch(s.include(n,i),s.attributes.add(t.SIDENESS,"vec2"),i.mode===n.Mode.MIXED?o.code.add(e`struct UnpackedAttributes {
5
+ import{neverReached as e}from"../../../../../../core/compilerUtils.js";import{glsl as t}from"../../../core/shaderModules/interfaces.js";import{VertexAttribute as n}from"../../../lib/VertexAttribute.js";import{EdgeUtil as s,EdgeUtilMode as i}from"./EdgeUtil.glsl.js";function o(o,d){const r=o.vertex;switch(o.include(s,d),o.attributes.add(n.SIDENESS,"vec2"),d.mode===i.MIXED?r.code.add(t`struct UnpackedAttributes {
6
6
  vec2 sideness;
7
7
  vec2 sidenessNorm;
8
8
  float lineWidthPixels;
9
9
  float extensionLengthPixels;
10
10
  float type;
11
- };`):o.code.add(e`struct UnpackedAttributes {
11
+ };`):r.code.add(t`struct UnpackedAttributes {
12
12
  vec2 sideness;
13
13
  vec2 sidenessNorm;
14
14
  float lineWidthPixels;
15
15
  float extensionLengthPixels;
16
- };`),i.mode){case n.Mode.MIXED:o.code.add(e`UnpackedAttributes unpackAttributes(ComponentData component) {
16
+ };`),d.mode){case i.MIXED:r.code.add(t`UnpackedAttributes unpackAttributes(ComponentData component) {
17
17
  vec2 sidenessNorm = sideness;
18
18
  vec2 sideness = sidenessNorm * 2.0 - 1.0;
19
19
  float fType = component.type;
@@ -23,17 +23,17 @@ if (fType <= 0.0) {
23
23
  extensionLengthPixels *= variantExtension * 2.0 - 1.0;
24
24
  }
25
25
  return UnpackedAttributes(sideness, sidenessNorm, lineWidth, extensionLengthPixels, fType);
26
- }`);break;case n.Mode.SKETCH:o.code.add(e`UnpackedAttributes unpackAttributes(ComponentData component) {
26
+ }`);break;case i.SKETCH:r.code.add(t`UnpackedAttributes unpackAttributes(ComponentData component) {
27
27
  vec2 sidenessNorm = sideness;
28
28
  vec2 sideness = sidenessNorm * 2.0 - 1.0;
29
29
  float extensionLengthPixels = component.extensionLength;
30
30
  extensionLengthPixels *= variantExtension * 2.0 - 1.0;
31
31
  float lineWidth = component.lineWidth;
32
32
  return UnpackedAttributes(sideness, sidenessNorm, lineWidth, extensionLengthPixels);
33
- }`);break;case n.Mode.SOLID:o.code.add(e`UnpackedAttributes unpackAttributes(ComponentData component) {
33
+ }`);break;case i.SOLID:r.code.add(t`UnpackedAttributes unpackAttributes(ComponentData component) {
34
34
  vec2 sidenessNorm = sideness;
35
35
  vec2 sideness = sidenessNorm * 2.0 - 1.0;
36
36
  float extensionLengthPixels = component.extensionLength;
37
37
  float lineWidth = component.lineWidth;
38
38
  return UnpackedAttributes(sideness, sidenessNorm, lineWidth, extensionLengthPixels);
39
- }`)}}export{s as UnpackAttributes};
39
+ }`);break;case i.COUNT:break;default:e(d.mode)}}export{o as UnpackAttributes};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../Camera.js";import"../geometry.js";import i from"../Graphic.js";import r from"../Ground.js";import s from"../Viewpoint.js";import n from"../core/Collection.js";import{byId as a}from"../core/domUtils.js";import o from"../core/Error.js";import{on as l}from"../core/events.js";import{handlesGroup as p,makeHandle as h}from"../core/handleUtils.js";import d from"../core/has.js";import{isIterable as c}from"../core/iteratorUtils.js";import u from"../core/Logger.js";import{destroyMaybe as g,isNone as m,isSome as f,unwrapOr as y}from"../core/maybe.js";import{ObservableChangesType as w}from"../core/ObservableChangesType.js";import{throwIfAborted as v}from"../core/promiseUtils.js";import{initial as _,syncAndInitial as b}from"../core/reactiveUtils.js";import{setFrameDuration as M}from"../core/scheduling.js";import{on as R,whenOnce as S,init as x,whenTrueOnce as V}from"../core/watchUtils.js";import{initialize as C}from"../core/workers/workers.js";import{screenPointObjectToArray as T,createScreenPoint as O,createScreenPointArray as P}from"../core/screenUtils.js";import{property as E}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import{cast as j}from"../core/accessorSupport/decorators/cast.js";import{subclass as I}from"../core/accessorSupport/decorators/subclass.js";import{ensureType as G}from"../core/accessorSupport/ensureType.js";import{c as H}from"../chunks/vec3f64.js";import L from"../geometry/HeightModelInfo.js";import{canProjectWithoutEngine as U,project as A,projectPointToVector as D,projectVectorToVector as F,projectBoundingRect as W}from"../geometry/projection.js";import{create as q,toExtent as z}from"../geometry/support/aaBoundingRect.js";import{B as k,a as N}from"../chunks/boundedPlane.js";import{renderSRFromViewSR as B}from"../geometry/support/coordinateSystem.js";import{getResolutionForScale as Q}from"../geometry/support/scaleUtils.js";import $ from"../layers/VoxelWasmManager.js";import{isTiledLayer as X}from"../layers/support/layerUtils.js";import{BreakpointsOwner as K}from"./BreakpointsOwner.js";import{DOMContainer as Z}from"./DOMContainer.js";import J from"./GroundView.js";import{PopupView as Y}from"./PopupView.js";import ee from"./View.js";import te from"./ViewAnimation.js";import{ViewingMode as ie,stringFromViewingMode as re,viewingModeFromString as se}from"./ViewingMode.js";import{layerView3DImporter as ne}from"./3d/layerViewModuleImportUtils.js";import ae from"./3d/analysis/AnalysisViewManager3D.js";import oe from"./3d/constraints/Constraints.js";import le from"./3d/environment/SceneViewEnvironment.js";import{SceneViewEnvironmentManager as pe}from"./3d/environment/SceneViewEnvironmentManager.js";import he from"./3d/input/SceneInputManager.js";import{GraphicsDeconflictor as de}from"./3d/layers/graphics/GraphicsDeconflictor.js";import{Labeler as ce}from"./3d/layers/graphics/Labeler.js";import{ObjectResourceCache as ue}from"./3d/layers/graphics/ObjectResourceCache.js";import ge from"./3d/layers/support/FeatureTileTree3D.js";import me from"./3d/state/ViewState.js";import fe from"./3d/state/ViewStateManager.js";import{SceneIntersectionHelper as ye}from"./3d/state/helpers/SceneIntersectionHelper.js";import{CombinedElevationProvider as we}from"./3d/support/CombinedElevationProvider.js";import ve from"./3d/support/debugFlags.js";import _e from"./3d/support/DisplayQualityProfile.js";import{getElevationAtPoint as be}from"./3d/support/ElevationProvider.js";import Me from"./3d/support/HighlightOptions.js";import{MapCoordsHelper as Re}from"./3d/support/MapCoordsHelper.js";import{PropertiesPool as Se}from"./3d/support/PropertiesPool.js";import xe from"./3d/support/QualitySettings.js";import{RenderCoordsHelper as Ve}from"./3d/support/RenderCoordsHelper.js";import{newResourceController as Ce}from"./3d/support/ResourceController.js";import Te from"./3d/support/SceneViewPerformanceInfo.js";import{SharedSymbolResources as Oe}from"./3d/support/SharedSymbolResources.js";import Pe from"./3d/support/pointsOfInterest/PointsOfInterest.js";import Ee from"./3d/terrain/TerrainSurface.js";import{isSurfaceLayerView as je,getTiledLayerInfo as Ie}from"./3d/terrain/terrainUtils.js";import{Stage as Ge}from"./3d/webgl-engine/Stage.js";import{newIntersector as He,DEFAULT_TOLERANCE as Le}from"./3d/webgl-engine/lib/Intersector.js";import{StoreResults as Ue,IntersectorType as Ae}from"./3d/webgl-engine/lib/IntersectorInterfaces.js";import{isValidIntersectorResult as De}from"./3d/webgl-engine/lib/intersectorUtils.js";import{toGraphic as Fe,toOwner as We}from"./3d/webgl-engine/lib/intersectorUtilsConversions.js";import{TERRAIN_ID as qe}from"./3d/webgl-engine/lib/verticalOffsetUtils.js";import{hitTestSelectSameDistance as ze}from"./support/hitTestSelectUtils.js";import{occludeesSupported as ke}from"./support/layerViewUtils.js";import{toRenderSettings as Ne,screenshotSuperSampleSettings as Be}from"./support/screenshotUtils.js";import{isSupportedScreenPointEvent as Qe,createScreenPointFromSupportedEvent as $e}from"./support/screenUtils.js";import{isSpatialReferenceSupported as Xe}from"./support/spatialReferenceSupport.js";import{check as Ke}from"./support/WebGLRequirements.js";import Ze from"./ui/3d/DefaultUI3D.js";import Je from"../webscene/Environment.js";import Ye from"../geometry/Extent.js";import et from"../geometry/SpatialReference.js";import tt from"../geometry/Point.js";const it=u.getLogger("esri.views.SceneView");let rt=class extends(K(Z(Y(ee)))){constructor(e){super(e),this._userClippingArea=null,this._clippingArea=null,this._initialDefaultSpatialReference=null,this._defaults={},this._externallySet={environment:!1},this._createGraphicsViewController=null,this._resolveWhenReady=[],this.propertiesPool=new Se({slicePlane:k},this),this._resourceController=Ce(this),this._defaultToMapOptions={include:new Set},this._defaultHitTestOptions={exclude:new Set},this.deconflictor=new de({view:this}),this.labeler=new ce({view:this,deconflictor:this.deconflictor.labels}),this.sharedSymbolResources=null,this.basemapTerrain=null,this.elevationProvider=null,this.camera=null,this.canvas=null,this.center=null,this.constraints=new oe,this.environmentManager=new pe,this.extent=null,this.floors=new n,this.windowDevicePixelRatio=1,this.fullOpacity=1,this.graphicsView=null,this.analysisViewManager=new ae({view:this}),this.groundView=null,this.navigating=!1,this.map=null,this.screenSizePerspectiveEnabled=!0,this.state=new me,this.scale=null,this.spatialReference=null,this.alphaCompositingEnabled=!1,this.supersampleScreenshotsEnabled=!0,this.type="3d",this.ui=new Ze,this._numUpdating=0,this._lastUpdateTime=0,this.updatingProgress=.5,this.viewpoint=null,this.zoom=null,this.highlightOptions=new Me,C(),e&&e.environment||(this._defaults.environment=new le,this.environment=this._defaults.environment);const t=e=>{f(e)&&e.type===w.MOVE||(this._updatingChanged(),this.map&&this.map.allLayers.forEach((async e=>{try{await e.when()}catch{}this._updatingChanged()})))};this.handles.add([R(this,"map.allLayers","after-changes",t,t,t,!0),this.allLayerViews.on("after-changes",(e=>this._updateUpdatingMonitors(e))),this.watch("map",(e=>{e&&e.load&&e.load().catch((()=>{}))}))]),this.inputManager=new he({view:this});const i=()=>{const e=window.devicePixelRatio;e!==this.windowDevicePixelRatio&&(this.windowDevicePixelRatio=e,this.notifyChange("pixelRatio"))};this.stateManager=new fe({view:this,updateDevicePixelRatio:i})}initialize(){this.groundView=new J({view:this}),this._updateUpdatingMonitors();const e=()=>this._updateDefaultToMapOptions();this.handles.add(R(this,"map.allLayers","after-changes",e,e,e)),this.updatingHandles.add((()=>this.qualitySettings.memoryLimit),(e=>{this.resourceController&&(this.resourceController.memoryController.maxMemory=e)}),_),this.updatingHandles.add((()=>this.qualitySettings.additionalCacheMemory),(e=>{this.resourceController&&(this.resourceController.memoryController.additionalCacheMemory=e)}),_),this.updatingHandles.add((()=>this.qualitySettings.frameRate),(e=>M(e>0?1e3/Math.ceil(e):0)),_),this.updatingHandles.add((()=>ve.SCENEVIEW_LOCKING_LOG),(e=>this.defaultsFromMap.logDebugInformation=e),_),this.updatingHandles.add((()=>{var e;return null==(e=this.map)?void 0:e.ground}),e,b),this.updatingHandles.add((()=>{var e,t;return null==(e=this.map)||null==(t=e.ground)?void 0:t.opacity}),(()=>this._updateDefaultHitTestOptions()),b),this.handles.add(this.watch("spatialReference",(()=>this.notifyChange("clippingArea")),!0))}destroy(){this.destroyed||(this.invalidate(),this.activeTool=null,this.layerViewManager.clear(),this._exitSurface(),this._disposeGraphicsView(),this.sharedSymbolResources=g(this.sharedSymbolResources),this.labeler.destroy(),this._set("labeler",null),this.deconflictor.destroy(),this._set("deconflictor",null),this._resourceController=g(this._resourceController),this.stateManager.destroy(),this._set("stateManager",null),this.inputManager.destroy(),this._set("inputManager",null),this.propertiesPool.destroy(),this.handles.remove("updatingMonitors"),this.environmentManager.destroy(),this._set("environmentManager",null),this.groundView=g(this.groundView))}get renderSpatialReference(){return this.renderCoordsHelper&&this.renderCoordsHelper.spatialReference}get basemapSpatialReference(){return this.basemapTerrain&&this.basemapTerrain.spatialReference}installContentCameraReset(e={sticky:!1}){return this.stateManager.installContentCameraReset(e)}get clippingArea(){if("global"===this.viewingMode)return null;let e=this._userClippingArea||this.get("map.clippingArea");return!(!!this._userClippingArea||this.get("map.clippingEnabled"))||m(e)?(this._clippingArea=null,null):e instanceof Ye?this.spatialReference&&(e=at(e,this.spatialReference),m(e))?(it.error("#clippingArea","setting clippingArea with incompatible SpatialReference"),this._clippingArea):(e=e.clone(),m(e.intersection(this.groundAndLayersExtent))&&(e.xmin=e.xmax,e.ymin=e.ymax),e.zmin=void 0,e.zmax=void 0,e.equals(this._clippingArea)||(this._clippingArea=e),this._clippingArea):(it.error("#clippingArea","only clippingArea geometries of type Extent are supported"),this._clippingArea)}set clippingArea(e){this.ready&&"global"===this.viewingMode&&f(e)?it.error("#clippingArea=","Clipping area is only supported in local viewingMode"):this._userClippingArea=e}get renderDataExtent(){if(this.state.viewingMode===ie.Global)return null;const e=this.renderSpatialReference,t=this.dataExtent;return m(t)||m(e)||t.spatialReference.equals(e)?t:at(t,e)}get dataExtent(){let e=this.groundAndLayersExtent;const t=this.spatialReference||et.WGS84,i=at(this.clippingArea,t);f(i)&&(e=f(e)?e.intersection(i):i);const r=this._get("dataExtent");return f(e)&&e.equals(r)?r:e}get groundAndLayersExtent(){const e=this.spatialReference||et.WGS84;let t;const i=i=>{const r=at(i,e);m(r)||(f(t)?t.union(r):t=r.clone())},r=this.basemapTerrain;if(null!=r&&r.spatialReference){const e=r.groundExtent;i(new Ye({xmin:e[0],ymin:e[1],zmin:0,xmax:e[2],ymax:e[3],zmax:0,spatialReference:r.spatialReference}))}if(this.map){const e=e=>{!f(e.fullExtent)||"graphics"===e.type&&e.internal||i(e.fullExtent)};this.map.allLayers.forEach((t=>e(t)))}if(m(t))return null;t.hasZ?(t.zmin=Math.min(0,t.zmin),t.zmax=Math.max(0,t.zmax)):(t.zmin=0,t.zmax=0);const s=this._get("groundAndLayersExtent");return t.equals(s)?s:t}set environment(e){e!==this._defaults.environment&&(this._externallySet.environment=!0),this._set("environment",e)}castEnvironment(e){return e?e instanceof le?e:e instanceof Je?null!=this.environment?this.environment.cloneWithWebsceneEnvironment(e):le.fromWebsceneEnvironment(e):G(le,e):new le}get pixelRatio(){return Math.min(this.windowDevicePixelRatio,this.maximumPixelRatio)}set pixelRatio(e){f(e)?this._override("pixelRatio",e):this._clearOverride("pixelRatio")}get maximumPixelRatio(){let e=1/0;const{maximumPixelRatio:t,maximumRenderResolution:i}=this.qualitySettings;if(null!=t&&(e=Math.min(e,t)),null!=i){const t=i/Math.max(this.width,this.height);e=Math.min(e,t)}return e}set maximumPixelRatio(e){f(e)?this._override("maximumPixelRatio",e):this._clearOverride("maximumPixelRatio")}get initialExtentRequired(){return this.stateManager&&!this.stateManager.hasInitialView}get _defaultsFromMapSettings(){return{required:{tileInfo:!1,heightModelInfo:!0,extent:!1}}}get interacting(){return this.navigating||f(this.activeTool)}get stationary(){return!this.animation&&!this.resizing&&(m(this.state)||this.state.stationary)}set qualityProfile(e){_e.isValidProfile(e)&&(_e.apply(e,this.qualitySettings),this._set("qualityProfile",e))}get qualityProfile(){return this._get("qualityProfile")||_e.getDefaultProfile()}set slicePlane(e){if(f(this._stage)&&this._stage.renderView.setRenderParameters({slicePlane:e}),m(e))return void this._set("slicePlane",null);const t=this.propertiesPool.get("slicePlane");N(e,t),this._set("slicePlane",t)}get typeSpecificPreconditionsReady(){return!!this.viewingMode}get resolution(){return null!=this.spatialReference?Q(this.scale,this.spatialReference):0}get heightModelInfo(){const e=this.getDefaultHeightModelInfo();return null!=e?L.deriveUnitFromSR(e,this.spatialReference):null}get updating(){var e,t,i;if(this.destroyed)return!1;let r=0,s=this.layerViewManager.updating,n=s?this.layerViewManager.updatingRemaining:0;this.allLayerViews.forEach((e=>{if(e.isFulfilled()){if(e.updating){if(s=!0,e.suspended||je(e))return;++n,r+=e.updatingProgress}}else++n}));for(const a of[this.graphicsView,this.basemapView,this._resourceController,this._stage,this.featureTiles,this.pointsOfInterest,this.environmentManager,this.overlay,this.featureTreeDebugger,this.toolViewManager,this.analysisViewManager])if(f(a)&&a.updating){const e=.1;n+=e,r+=.5*e}for(const a of[this.deconflictor,this.labeler,this.basemapTerrain])f(a)&&a.updating&&(++n,r+=a.updatingProgress);if(s=!!(s||n>0||this.updatingHandles.updating||!this.ready||!this.stationary||this._createGraphicsViewController||null!=(e=this.inputManager)&&e.hasPendingInputs||null!=(t=this.map)&&null!=(i=t.allLayers)&&i.some((e=>!e.isFulfilled()))),s?(this._numUpdating=Math.max(n,this._numUpdating),r+=this._numUpdating-n):this._numUpdating=0,this._numUpdating>0?r/=this._numUpdating:r=s?0:1,this._get("updatingProgress")!==r){const e=this._resourceController.scheduler.now;if(r<1){const t=Math.min((e-this._lastUpdateTime)/2e3,1);r=this.updatingProgress*(1-t)+r*t}this._set("updatingProgress",r),this._lastUpdateTime=s&&r<1?e:0}return s}get viewingMode(){var e;const t=this._predeterminedViewingMode;if(f(t))return re(t);const i=this.spatialReference;return f(null==(e=this.defaultsFromMap)?void 0:e.viewingMode)&&i&&i.equals(this.defaultsFromMap.spatialReference)?re(this.defaultsFromMap.viewingMode):!i||Xe(i,ie.Global)?"global":"local"}set viewingMode(e){this.ready?it.error("#viewingMode","viewingMode cannot be set once view is ready"):e?this._override("viewingMode",e):void 0===e&&this._clearOverride("viewingMode")}get resourceController(){return this._resourceController}get performanceInfo(){return new Te(this)}forceAnimationTime(e){this._stage.renderView.forcedAnimationTime=this.basemapTerrain.overlayManager.forcedAnimationTime=e}on(e,t,i,r){const s=this.viewEvents.on(e,t,i,r);return s||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}toMap(e,t){if(!this.ready)return it.error("#toMap()","Scene view cannot be used before it is ready"),null;const i=t?this.externalToInternalIntersectOptions(t):this._defaultToMapOptions,r=f(i.graphics)&&(f(i.graphics.include)||f(i.graphics.exclude)),s=Qe(e)?$e(this,e):e,n=T(s);i.enableDraped=i.include&&!i.include.has(qe)||i.exclude&&i.exclude.has(qe);const a=this.sceneIntersectionHelper,o=He(this.state.viewingMode);if(o.options.selectionMode=!0,o.options.store=r?Ue.ALL:Ue.MIN,a.intersectIntersectorScreen(n,o,i),r){for(const e of o.results.all){const t=Fe(e,this);if(m(t))return this._intersectResultToMapPoint(e);if(this._testGraphicUidFilter(i.graphics,t))return this._intersectResultToMapPoint(e)}return null}return this._intersectResultToMapPoint(o.results.min)}toScreen(e){if(!this.ready)return it.error("#toScreen()","Scene view cannot be used before it is ready"),null;const t=y(null==e.z&&be(this.elevationProvider,e),0);return D(e,lt,this.renderSpatialReference,t),this.state.camera.projectToScreen(lt,pt),O(pt[0],pt[1])}pixelSizeAt(e){return this.ready?e?(D(e,lt,this.renderSpatialReference),this.state.camera.computeScreenPixelSizeAt(lt)):0:(it.error("#pixelSizeAt()","Scene view cannot be used before it is ready"),null)}overlayPixelSizeInMapUnits(e){const t=this.basemapTerrain.overlayManager;return t?t.overlayPixelSizeInMapUnits(e):1}hitTest(e,t){if(!this.ready)return it.error("#hitTest()","Scene view cannot be used before it is ready"),null;const i=Qe(e)?$e(this,e):e,r=P(i.x,i.y),s=t?this.externalToInternalIntersectOptions(t):this._defaultHitTestOptions;s.requiresGroundFeedback=!0,s.enableDraped=!0;const n=He(this.state.viewingMode);n.options.selectionMode=!0,n.options.store=Ue.ALL,this.sceneIntersectionHelper.intersectIntersectorScreen(r,n,s);const a=this._intersectResultsToHits(n.results.all,s.graphics),o=n.results.ground,l=We(o,this),p=f(l)&&"type"in l&&"integrated-mesh"===l.type?l:null,h={screenPoint:i,results:a,ground:{mapPoint:this._intersectResultToMapPoint(o),distance:De(o)?o.distanceInRenderSpace:0,layer:p}};return ve.SCENEVIEW_HITTEST_RETURN_INTERSECTOR&&(h.intersector=n),Promise.resolve(h)}popupHitTest(e){return ze(this,e).then((({results:t,ground:i})=>{let r=null;return!(0===t.length||Math.abs(y(t[0].distance,0)-i.distance)<1e-5)||i.layer&&"integrated-mesh"===i.layer.type||(r=i.mapPoint),{results:t,screenPoint:e,mapPoint:r}}))}goTo(e,t){return this.updatingHandles.addPromise(this.stateManager.goTo(e,t))}async whenAnalysisView(e){if(m(e.parent))throw new o("view:no-analysisview-for-analysis","The analysis has not been added to an AnalysisLayer or SceneView.analyses",{analysis:e});if("analysis"===e.parent.type){return(await this.whenLayerView(e.parent)).whenAnalysisView(e)}return this.analysisViewManager.whenAnalysisView(e)}whenLayerView(e){return super.whenLayerView(e)}takeScreenshot(e){return this.whenReady().then((()=>{const t=Ne(e,this);return t.pixelRatio/=this.pixelRatio,this._stage.renderView.takeScreenshot(Be(t,this.supersampleScreenshotsEnabled,this.padding))}))}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}importLayerView(e){return ne.importLayerView(e)}hasLayerViewModule(e){return ne.hasLayerViewModule(e)}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){var e,t,i,r;return this.map&&"initialViewProperties"in this.map&&(null==(e=this.map)||null==(t=e.initialViewProperties)?void 0:t.spatialReference)||(null==(i=this.defaultsFromMap)?void 0:i.spatialReference)||(null==(r=this.defaultsFromMap)?void 0:r.ready)&&this._initialDefaultSpatialReference||null}async validate(){let e=Ke(this.type);if(d("safari")&&d("safari")<9&&(e=new o("sceneview:browser-not-supported","This browser is not supported by SceneView (Safari < 9)",{type:"safari",requiredVersion:9,detectedVersion:d("safari")})),f(e))throw it.warn("#validate()",e.message),e}get _predeterminedViewingMode(){var e,t;const i=this._isOverridden("viewingMode")?this._get("viewingMode"):null!=(e=this.map&&"initialViewProperties"in this.map?null==(t=this.map.initialViewProperties)?void 0:t.viewingMode:null)?e:null;return f(i)?se(i):null}getSpatialReferenceSupport({spatialReference:e,layer:t}){const i=this._predeterminedViewingMode;if(f(i))return this._validateSpatialReferenceForViewingMode(e,t,i)?{constraints:this._makeSpatialReferenceConstraints(e,t,i)}:null;const r=this._validateSpatialReferenceForViewingMode(e,t,ie.Local),s=this._validateSpatialReferenceForViewingMode(e,t,ie.Global);return r||s?r&&s?{constraints:this._makeSpatialReferenceConstraints(e,t,null)}:r?{constraints:this._makeSpatialReferenceConstraints(e,t,ie.Local)}:{constraints:this._makeSpatialReferenceConstraints(e,t,ie.Global)}:null}_validateSpatialReferenceForViewingMode(e,t,i){return!!Xe(e,i)&&(!!m(t)||(!X(t)||!m(Ie(t,e,i)))&&("voxel"!==t.type||i===ie.Local))}_makeSpatialReferenceConstraints(e,t,i){return t&&!X(t)&&"voxel"!==t.type&&(e.isWebMercator||e.isWGS84)?[{spatialReference:e,viewingMode:i},{spatialReference:e.isWebMercator?et.WGS84:et.WebMercator,viewingMode:i}]:t&&X(t)&&e.isWebMercator&&i!==ie.Global?[{spatialReference:e,viewingMode:i},{spatialReference:et.WGS84,viewingMode:ie.Local}]:[{spatialReference:e,viewingMode:i}]}_validateSpatialReference(e){const t=f(this.getSpatialReferenceSupport({spatialReference:e})),i=this._predeterminedViewingMode;return t||(f(i)?it.warnOnce(`Spatial reference defined on view not supported in ${re(i)} viewing mode.`):e.isGeographic&&it.warnOnce("Spatial reference is geographic but not supported.")),t}whenReady(){return new Promise((e=>{this.ready?e(this):this._resolveWhenReady.push(e)}))}computeMapPointFromVec3d(e,t){let i=this.spatialReference||et.WGS84;return F(e,this.renderSpatialReference,e,i)||(i=et.WGS84,F(e,this.renderSpatialReference,e,i)),t?(t.x=e[0],t.y=e[1],t.z=e[2],t.spatialReference=i):t=new tt(e,i),t}trackGraphicState(e){if(!e.graphic)return it.error("trackGraphicState","GraphicState.graphic must not be null or undefined to start tracking"),null;const t=this.getViewForGraphic(e.graphic);let i=null,r=!1;const s=t=>{!r&&f(t)&&"processor"in t&&t.processor&&t.processor.graphicsCore&&(i=t.processor.graphicsCore.trackGraphicState(e))};return f(t)?s(t):this.whenViewForGraphic(e.graphic,{waitForLayer:!0}).then((e=>s(e)),(()=>{})).catch((()=>{})),{remove:()=>{r=!0,f(i)&&(i.remove(),i=null)}}}highlight(e){if(Array.isArray(e))return p(e.map((e=>this.highlight(e))));if(n.isCollection(e))return p(e.toArray().map((e=>this.highlight(e))));const t=this.getViewForGraphic(e);return t&&"highlight"in t?t.highlight(e):h()}maskOccludee(e){if(!e)return it.error("maskOccludee","GraphicState.graphic must not be null or undefined to mask an occludee"),null;const t=this.getViewForGraphic(e);let i=null,r=!1;const s=t=>{!r&&f(t)&&ke(t)&&(i=t.maskOccludee(e))};return f(t)?s(t):this.whenViewForGraphic(e,{waitForLayer:!0}).then((e=>s(e)),(()=>{})).catch((()=>{})),{remove:()=>{r=!0,f(i)&&(i.remove(),i=null)}}}getViewForGraphic(e){return e.layer===this.graphics?this.graphicsView:e.layer?this.allLayerViews.find((t=>t.layer===e.layer)):null}graphicChanged(e){f(this.graphicsView)&&this.graphicsView.graphicChanged(e)}async whenViewForGraphic(e,t){if(e.layer===this)return await S(this,"graphicsView"),this.graphicsView;if(!e.layer||!this.map)throw new o("no-view-for-graphic");return t&&t.waitForLayer&&!this.map.allLayers.includes(e.layer)?new Promise(((t,i)=>{const r=this.map.allLayers.on("change",(s=>{-1!==s.added.indexOf(e.layer)&&(r.remove(),this.whenLayerView(e.layer).then(t,i))}))})):this.whenLayerView(e.layer)}externalToInternalIntersectOptions(e){const t=this._externalToInternalRenderItems(e.include,ot.INCLUDE),i=this._externalToInternalRenderItems(e.exclude,ot.EXCLUDE);return{include:t.layerUids,exclude:i.layerUids,graphics:{include:t.graphicUids,exclude:i.graphicUids}}}_intersectResultToMapPoint(e,t){return e.getIntersectionPoint(lt)?(t=this.computeMapPointFromVec3d(lt,t),e.intersector===Ae.TERRAIN&&this.basemapTerrain&&(t.z=y(be(this.basemapTerrain,t),0)),t):null}_intersectResultsToHits(e,t){const i=new Array;let r=null;for(let s=0;s<e.length;s++){const n=e[s],a=We(n,this);if(f(a)&&(a===this.map.ground||"type"in a&&"integrated-mesh"===a.type))break;const o=Fe(n,this);if(!f(o))continue;if(m(r)&&s!==e.length-1&&(r=new Set),f(r)){const e=this._getGraphicFilterUid(o);if(r.has(e))continue;r.add(e)}if(!this._testGraphicUidFilter(t,o))continue;const l=this._intersectResultToMapPoint(n),p=n.distanceInRenderSpace;i.push({graphic:o,mapPoint:l,distance:p})}return i}_getGraphicFilterUid(e){if(e.layer&&"objectIdField"in e.layer){const t=e.attributes[e.layer.objectIdField];if(t)return`o-${e.layer.id}-${t}`}return`u-${e.uid}`}_testGraphicUidFilter(e,t){const i=this._getGraphicFilterUid(t);return m(e)||(m(e.include)||e.include.has(i))&&(m(e.exclude)||!e.exclude.has(i))}_externalToInternalRenderItems(e,t,s={layerUids:null,graphicUids:null}){if(!e)return s;if(e instanceof i)nt(s,this._getGraphicFilterUid(e)),t===ot.INCLUDE&&(f(this.graphicsView)&&e.layer===this?st(s,this.graphicsView.processor.layer.id):e.layer&&st(s,e.layer.uid));else if(c(e))for(const i of e)i===this.graphics&&f(this.graphicsView)?st(s,this.graphicsView.processor.layer.id):i instanceof r?i===this.map.ground&&st(s,qe):this._externalToInternalRenderItems(i,t,s);else st(s,e.uid);return s}_initBasemapTerrain(){this._set("basemapTerrain",new Ee({view:this})),this._set("elevationProvider",new we({view:this})),this.elevationProvider.register("ground",this.basemapTerrain)}_exitBasemapTerrain(){this.basemapTerrain&&(this.elevationProvider.unregister(this.basemapTerrain),this.elevationProvider.destroy(),this._set("elevationProvider",null),this.basemapTerrain.destroy(),this._set("basemapTerrain",null))}_initGlobe(){this._initCoordinateSystem(),this.state.createInitialCamera(),this._initBasemapTerrain(),this._set("pointsOfInterest",new Pe({view:this})),this._set("featureTiles",new ge({renderCoordsHelper:this.renderCoordsHelper,cameraOnSurface:this.pointsOfInterest.contentCameraOnSurface,focus:this.pointsOfInterest.focus,tilingSchemeOwner:this.basemapTerrain,viewState:this.state,scheduler:this._resourceController.scheduler,terrain:this.basemapTerrain}));const e=()=>{const e=this.basemapTerrain&&this.basemapTerrain.extent;if(this.clippingArea||e)if(e&&this.basemapTerrain.spatialReference){const e=f(this.basemapTerrain.extent)?A(z(this.basemapTerrain.extent,this.basemapTerrain.spatialReference),this.spatialReference):null;f(this.clippingArea)?this.featureTiles.filterExtent=this.clippingArea.intersection(e):this.featureTiles.filterExtent=e}else this.featureTiles.filterExtent=this.clippingArea;else this.featureTiles.filterExtent=null};this.handles.add([this.updatingHandles.add((()=>ve.FEATURE_TILE_TREE_SHOW_TILES),(e=>{e&&this.featureTiles&&!this.featureTreeDebugger?this.updatingHandles.addPromise(import("./3d/layers/support/FeatureTileTree3DDebugger.js")).then((({FeatureTileTree3DDebugger:e})=>{!this.featureTreeDebugger&&ve.FEATURE_TILE_TREE_SHOW_TILES&&(this.featureTreeDebugger=new e({view:this}))})):e||!this.featureTreeDebugger||ve.FEATURE_TILE_TREE_SHOW_TILES||(this.featureTreeDebugger.destroy(),this.featureTreeDebugger=null)}),b),this.updatingHandles.add((()=>this.clippingArea),e,b),this.updatingHandles.add((()=>this.basemapTerrain.extent),e,b)],"feature-tiles"),this.stateManager.init()}_exitGlobe(){this.state&&(this.stateManager.deinit(),this.handles.remove("render-coords-helper"),this.handles.remove("feature-tiles"),this.featureTiles.destroy(),this._set("featureTiles",null),this.pointsOfInterest.destroy(),this._set("pointsOfInterest",null),this._exitBasemapTerrain(),this.state.exit(),this._exitCoordinateSystem())}_initCoordinateSystem(){if(this.spatialReference){const e=this.spatialReference;this.mapCoordsHelper&&this.mapCoordsHelper.spatialReference.equals(e)||this._set("mapCoordsHelper",new Re(this.map,e));const t=this.state.isGlobal,i=B(t,e);i!==this.renderSpatialReference&&(this._set("renderCoordsHelper",Ve.create(this.state.viewingMode,i)),t||this.handles.add(this.watch("basemapTerrain.extent",(e=>{const t=this.renderCoordsHelper.spatialReference;0===e[0]&&0===e[1]&&0===e[2]&&0===e[3]||!W(e,this.basemapTerrain.spatialReference,ht,t)||(this.renderCoordsHelper.extent=ht)}),!0),"render-coords-helper"),this.sceneIntersectionHelper&&this.sceneIntersectionHelper.setTolerance(Le/this.renderCoordsHelper.unitInMeters))}else this._set("mapCoordsHelper",null),this._set("renderCoordsHelper",null)}_exitCoordinateSystem(){this.mapCoordsHelper&&(this.handles.remove("render-coords-helper"),this._set("renderCoordsHelper",null),this._set("mapCoordsHelper",null))}_updatingChanged(){this.notifyChange("updating")}_updateUpdatingMonitors(e=null){f(e)&&e.type===w.MOVE||(this.handles.remove("updatingMonitors"),this.allLayerViews.forEach((e=>{e.destroyed||(this.handles.add([e.watch(["updating","updatingProgress"],(()=>this._updatingChanged()),!0)],"updatingMonitors"),e.when((()=>this._updatingChanged()),(()=>this._updatingChanged())))})),this._updatingChanged())}_renderScreenshotOverlay(e,t){if(!this.overlay||!this.overlay.hasVisibleItems)return t;const i=e.getContext("2d");return i.putImageData(t,0,0),this.overlay.renderCanvas(e),i.getImageData(0,0,t.width,t.height)}_initStage(){const e={deactivatedWebGLExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions,alpha:this.alphaCompositingEnabled,canvas:this.renderCanvas,screenshot:{renderOverlay:(e,t)=>this._renderScreenshotOverlay(e,t)}},t=new ye(this.state.viewingMode,(e=>this._stage.layers.forAll(e)),this);this._set("sceneIntersectionHelper",t);const i=a(this.surface),{resourceController:r,state:s,renderSpatialReference:n}=this;this._stage=new Ge({options:e,container:i,resourceController:r,state:s,sceneIntersectionHelper:t,renderSR:n}),this._stage.renderView.setRenderParameters({slicePlane:this.slicePlane}),this._lostWebGLContextHandle=l(this._stage.renderView.canvas,"webglcontextlost",(()=>this.fatalError=new o("webgl-context-lost"))),this.handles.add([this.updatingHandles.add((()=>this.qualitySettings.antialiasingEnabled),(()=>this._stage.renderView.setRenderParameters({antialiasingEnabled:this.qualitySettings.antialiasingEnabled})),_),this.updatingHandles.add((()=>this.qualitySettings.highQualityTransparency),(()=>this._stage.renderView.setRenderParameters({highQualityTransparency:this.qualitySettings.highQualityTransparency})),_),x(this,"magnifier",(e=>this._stage.renderView.magnifier=e),!0)],"stage");const p=()=>{this._stage.renderView.setRenderParameters({defaultHighlightOptions:Me.toEngineOptions(this.highlightOptions)})};this.handles.add(this.updatingHandles.add((()=>[this.highlightOptions.color,this.highlightOptions.haloColor,this.highlightOptions.haloOpacity,this.highlightOptions.fillOpacity,this.highlightOptions.shadowOpacity,this.highlightOptions.shadowColor,this.highlightOptions.shadowDifference]),p),"stage"),p(),this.renderCoordsHelper&&this.sceneIntersectionHelper.setTolerance(Le/this.renderCoordsHelper.unitInMeters),this._set("canvas",this._stage.renderView.canvas)}_exitStage(){this._set("sceneIntersectionHelper",null),this._stage.destroy(),this._stage=null,this._lostWebGLContextHandle.remove(),this._lostWebGLContextHandle=null,this.handles.remove("stage"),this._set("canvas",null)}_initSurface(e){this._exitSurface(),this.state.init(e,this.spatialReference),this._initStage(),this._initGlobe(),this.sharedSymbolResources=new Oe({view:this,viewingMode:e,resourceController:this._resourceController,pointsOfInterest:this.pointsOfInterest,viewState:this.state,objectResourceCache:new ue})}_exitSurface(){this.sharedSymbolResources&&(this.sharedSymbolResources.objectResourceCache.destroy(),this.sharedSymbolResources.destroy(),this.sharedSymbolResources=null,this._exitGlobe(),this._exitStage())}_createGraphicsViewIfNeeded(){if(this.graphicsView||this._createGraphicsViewController)return;if(0===this.graphics.length)return;this.handles.remove("graphics-view"),this._createGraphicsViewController=new AbortController;const e=()=>{this._createGraphicsViewController=null,this._updatingChanged()};this._createGraphicsViewAsync(this._createGraphicsViewController.signal).then(e,e),this._updatingChanged()}async _createGraphicsViewAsync(e){const t=(await import("./3d/layers/GraphicsView3D.js")).default;v(e),await V(this.basemapTerrain,"ready",e),this._set("graphicsView",new t({view:this}))}_disposeGraphicsView(){this._createGraphicsViewController&&(this._createGraphicsViewController.abort(),this._createGraphicsViewController=null),this.handles.remove("graphics-view"),f(this.graphicsView)&&(this.handles.remove(this.graphicsView.processor.layer.id),this.graphicsView.destroy(),this._set("graphicsView",null))}_startup(){const e=se(this.viewingMode);if(e===ie.Global&&(this._clippingArea=null),this._initSurface(e),this._set("ready",!0),this.handles.add(R(this,"graphics","after-changes",(()=>this._createGraphicsViewIfNeeded())),"graphics-view"),this._createGraphicsViewIfNeeded(),!this._externallySet.environment){const e=this.get("map.initialViewProperties.environment");e&&(this.environment=e)}this.labeler.setup(),this.environmentManager.connectView(this),this.inputManager.connect();const t=this._resolveWhenReady;this._resolveWhenReady=[],t.forEach((e=>e(this)))}_teardown(){this._initialDefaultSpatialReference=null,this.inputManager.disconnect(),this.environmentManager.disconnectView(),this.labeler.dispose(),this._disposeGraphicsView(),this.handles.remove("graphics-view"),this._exitSurface(),this._set("ready",!1)}_updateDefaultToMapOptions(){if(this._defaultToMapOptions.include.clear(),this.map){this.map.ground&&this._defaultToMapOptions.include.add(qe);for(const e of this.map.allLayers.items)"integrated-mesh"===e.type&&this._defaultToMapOptions.include.add(e.uid)}}_updateDefaultHitTestOptions(){if(this._defaultHitTestOptions.exclude.clear(),this.map){this.map.ground&&this.map.ground.opacity<1&&this._defaultHitTestOptions.exclude.add(qe);for(const e of this.map.allLayers.items)"integrated-mesh"===e.type&&e.opacity<1&&this._defaultToMapOptions.exclude.add(e.uid)}}getVoxelWasmPerSceneView(){return $.getInstance().getVoxelWasmPerSceneView(this)}};function st(e,t){e.layerUids||(e.layerUids=new Set),e.layerUids.add(t)}function nt(e,t){e.graphicUids||(e.graphicUids=new Set),e.graphicUids.add(t)}function at(e,t){return f(e)&&U(e.spatialReference,t)?A(e,t):null}var ot;e([E()],rt.prototype,"_userClippingArea",void 0),e([E()],rt.prototype,"_resourceController",void 0),e([E()],rt.prototype,"_stage",void 0),e([E({readOnly:!0})],rt.prototype,"deconflictor",void 0),e([E({readOnly:!0})],rt.prototype,"labeler",void 0),e([E({type:te,readOnly:!0,aliasOf:"state.animation"})],rt.prototype,"animation",void 0),e([E({readOnly:!0})],rt.prototype,"basemapTerrain",void 0),e([E({readOnly:!0})],rt.prototype,"elevationProvider",void 0),e([E({type:t,aliasOf:"stateManager.camera"})],rt.prototype,"camera",void 0),e([E({type:t,aliasOf:"stateManager.contentCamera"})],rt.prototype,"contentCamera",void 0),e([E({readOnly:!0})],rt.prototype,"canvas",void 0),e([E({type:tt,aliasOf:"stateManager.center"})],rt.prototype,"center",void 0),e([E({type:Ye})],rt.prototype,"clippingArea",null),e([E({type:oe})],rt.prototype,"constraints",void 0),e([E({type:Ye,readOnly:!0})],rt.prototype,"renderDataExtent",null),e([E({type:Ye,readOnly:!0})],rt.prototype,"dataExtent",null),e([E({type:Ye,readOnly:!0})],rt.prototype,"groundAndLayersExtent",null),e([E({value:null,type:le})],rt.prototype,"environment",null),e([j("environment")],rt.prototype,"castEnvironment",null),e([E({readOnly:!0})],rt.prototype,"environmentManager",void 0),e([E({type:Ye,aliasOf:"stateManager.extent"})],rt.prototype,"extent",void 0),e([E()],rt.prototype,"floors",void 0),e([E({readOnly:!0,aliasOf:"stateManager.screenCenter"})],rt.prototype,"screenCenter",void 0),e([E({type:Number})],rt.prototype,"pixelRatio",null),e([E({type:Number,dependsOn:["qualitySettings.maximumPixelRatio","qualitySettings.maximumRenderResolution","size"]})],rt.prototype,"maximumPixelRatio",null),e([E({aliasOf:"stateManager.frustum"})],rt.prototype,"frustum",void 0),e([E({type:Number,readOnly:!0})],rt.prototype,"fullOpacity",void 0),e([E({readOnly:!0})],rt.prototype,"graphicsView",void 0),e([E({readOnly:!0})],rt.prototype,"analysisViewManager",void 0),e([E()],rt.prototype,"groundView",void 0),e([E({type:Boolean})],rt.prototype,"initialExtentRequired",null),e([E()],rt.prototype,"_defaultsFromMapSettings",null),e([E({type:Boolean,readOnly:!0})],rt.prototype,"interacting",null),e([E()],rt.prototype,"stationary",null),e([E({aliasOf:"state.navigating"})],rt.prototype,"navigating",void 0),e([E()],rt.prototype,"map",void 0),e([E({readOnly:!0})],rt.prototype,"mapCoordsHelper",void 0),e([E({aliasOf:"stateManager.padding"})],rt.prototype,"padding",void 0),e([E({type:Pe,readOnly:!0})],rt.prototype,"pointsOfInterest",void 0),e([E({type:ge,readOnly:!0})],rt.prototype,"featureTiles",void 0),e([E()],rt.prototype,"featureTreeDebugger",void 0),e([E({type:Boolean})],rt.prototype,"screenSizePerspectiveEnabled",void 0),e([E({constructOnly:!0})],rt.prototype,"deactivatedWebGLExtensions",void 0),e([E({constructOnly:!0})],rt.prototype,"debugWebGLExtensions",void 0),e([E({constructOnly:!0})],rt.prototype,"renderCanvas",void 0),e([E({constructOnly:!0})],rt.prototype,"state",void 0),e([E({readOnly:!0})],rt.prototype,"inputManager",void 0),e([E({readOnly:!0})],rt.prototype,"stateManager",void 0),e([E({type:["low","medium","high"]})],rt.prototype,"qualityProfile",null),e([E({type:xe,get(){let e=this._get("qualitySettings");return e||(e=new xe,_e.apply(this.qualityProfile,e)),e}})],rt.prototype,"qualitySettings",void 0),e([E()],rt.prototype,"slicePlane",null),e([E({readOnly:!0})],rt.prototype,"typeSpecificPreconditionsReady",null),e([E({readOnly:!0})],rt.prototype,"renderCoordsHelper",void 0),e([E({readOnly:!0})],rt.prototype,"sceneIntersectionHelper",void 0),e([E({type:Number,dependsOn:["scale","spatialReference"],readOnly:!0})],rt.prototype,"resolution",null),e([E({type:Number,aliasOf:"stateManager.scale"})],rt.prototype,"scale",void 0),e([E()],rt.prototype,"heightModelInfo",null),e([E()],rt.prototype,"spatialReference",void 0),e([E({type:Boolean,constructOnly:!0})],rt.prototype,"alphaCompositingEnabled",void 0),e([E({type:Boolean})],rt.prototype,"supersampleScreenshotsEnabled",void 0),e([E({readOnly:!0})],rt.prototype,"type",void 0),e([E({type:Ze})],rt.prototype,"ui",void 0),e([E({type:Boolean,readOnly:!0,dependsOn:["graphicsView.updating","basemapView.updating","basemapTerrain.updating","layerViewManager.updating","layerViewManager.updatingRemaining","_resourceController.updating","_stage.updating","featureTiles.updating","pointsOfInterest.updating","environmentManager.updating","overlay.updating","updatingHandles.updating","featureTreeDebugger.updating","labeler.updating","deconflictor.updating","ready","stationary","inputManager.hasPendingInputs","toolViewManager.updating","analysisViewManager.updating"]})],rt.prototype,"updating",null),e([E({type:Number,readOnly:!0,dependsOn:["updating"]})],rt.prototype,"updatingProgress",void 0),e([E({type:["global","local"]})],rt.prototype,"viewingMode",null),e([E({type:s,aliasOf:"stateManager.viewpoint"})],rt.prototype,"viewpoint",void 0),e([E({type:Number,aliasOf:"stateManager.zoom"})],rt.prototype,"zoom",void 0),e([E({type:Me})],rt.prototype,"highlightOptions",void 0),rt=e([I("esri.views.SceneView")],rt),function(e){e[e.INCLUDE=0]="INCLUDE",e[e.EXCLUDE=1]="EXCLUDE"}(ot||(ot={}));const lt=H(),pt=P(),ht=q(),dt=rt;export{dt as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../Camera.js";import"../geometry.js";import i from"../Graphic.js";import r from"../Ground.js";import s from"../Viewpoint.js";import n from"../core/Collection.js";import{byId as a}from"../core/domUtils.js";import o from"../core/Error.js";import{on as l}from"../core/events.js";import{handlesGroup as p,makeHandle as h}from"../core/handleUtils.js";import d from"../core/has.js";import{isIterable as c}from"../core/iteratorUtils.js";import u from"../core/Logger.js";import{destroyMaybe as g,isNone as m,isSome as f,unwrapOr as y}from"../core/maybe.js";import{ObservableChangesType as w}from"../core/ObservableChangesType.js";import{throwIfAborted as v}from"../core/promiseUtils.js";import{initial as _,syncAndInitial as b}from"../core/reactiveUtils.js";import{setFrameDuration as M}from"../core/scheduling.js";import{on as R,whenOnce as S,init as x,whenTrueOnce as V}from"../core/watchUtils.js";import{initialize as C}from"../core/workers/workers.js";import{screenPointObjectToArray as T,createScreenPoint as O,createScreenPointArray as P}from"../core/screenUtils.js";import{property as E}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import{cast as j}from"../core/accessorSupport/decorators/cast.js";import{subclass as I}from"../core/accessorSupport/decorators/subclass.js";import{ensureType as G}from"../core/accessorSupport/ensureType.js";import{c as H}from"../chunks/vec3f64.js";import L from"../geometry/HeightModelInfo.js";import{canProjectWithoutEngine as U,project as A,projectPointToVector as D,projectVectorToVector as F,projectBoundingRect as W}from"../geometry/projection.js";import{create as q,toExtent as z}from"../geometry/support/aaBoundingRect.js";import{B as k,a as N}from"../chunks/boundedPlane.js";import{renderSRFromViewSR as B}from"../geometry/support/coordinateSystem.js";import{getResolutionForScale as Q}from"../geometry/support/scaleUtils.js";import $ from"../layers/VoxelWasmManager.js";import{isTiledLayer as X}from"../layers/support/layerUtils.js";import{BreakpointsOwner as K}from"./BreakpointsOwner.js";import{DOMContainer as Z}from"./DOMContainer.js";import J from"./GroundView.js";import{PopupView as Y}from"./PopupView.js";import ee from"./View.js";import te from"./ViewAnimation.js";import{ViewingMode as ie,stringFromViewingMode as re,viewingModeFromString as se}from"./ViewingMode.js";import{layerView3DImporter as ne}from"./3d/layerViewModuleImportUtils.js";import ae from"./3d/analysis/AnalysisViewManager3D.js";import oe from"./3d/constraints/Constraints.js";import le from"./3d/environment/SceneViewEnvironment.js";import{SceneViewEnvironmentManager as pe}from"./3d/environment/SceneViewEnvironmentManager.js";import he from"./3d/input/SceneInputManager.js";import{GraphicsDeconflictor as de}from"./3d/layers/graphics/GraphicsDeconflictor.js";import{Labeler as ce}from"./3d/layers/graphics/Labeler.js";import{ObjectResourceCache as ue}from"./3d/layers/graphics/ObjectResourceCache.js";import ge from"./3d/layers/support/FeatureTileTree3D.js";import me from"./3d/state/ViewState.js";import fe from"./3d/state/ViewStateManager.js";import{SceneIntersectionHelper as ye}from"./3d/state/helpers/SceneIntersectionHelper.js";import{CombinedElevationProvider as we}from"./3d/support/CombinedElevationProvider.js";import ve from"./3d/support/debugFlags.js";import _e from"./3d/support/DisplayQualityProfile.js";import{getElevationAtPoint as be}from"./3d/support/ElevationProvider.js";import Me from"./3d/support/HighlightOptions.js";import{MapCoordsHelper as Re}from"./3d/support/MapCoordsHelper.js";import{PropertiesPool as Se}from"./3d/support/PropertiesPool.js";import xe from"./3d/support/QualitySettings.js";import{RenderCoordsHelper as Ve}from"./3d/support/RenderCoordsHelper.js";import{newResourceController as Ce}from"./3d/support/ResourceController.js";import Te from"./3d/support/SceneViewPerformanceInfo.js";import{SharedSymbolResources as Oe}from"./3d/support/SharedSymbolResources.js";import Pe from"./3d/support/pointsOfInterest/PointsOfInterest.js";import Ee from"./3d/terrain/TerrainSurface.js";import{isSurfaceLayerView as je,getTiledLayerInfo as Ie}from"./3d/terrain/terrainUtils.js";import{Stage as Ge}from"./3d/webgl-engine/Stage.js";import{newIntersector as He,DEFAULT_TOLERANCE as Le}from"./3d/webgl-engine/lib/Intersector.js";import{StoreResults as Ue,IntersectorType as Ae}from"./3d/webgl-engine/lib/IntersectorInterfaces.js";import{isValidIntersectorResult as De}from"./3d/webgl-engine/lib/intersectorUtils.js";import{toGraphic as Fe,toOwner as We}from"./3d/webgl-engine/lib/intersectorUtilsConversions.js";import{TERRAIN_ID as qe}from"./3d/webgl-engine/lib/verticalOffsetUtils.js";import{hitTestSelectSameDistance as ze}from"./support/hitTestSelectUtils.js";import{occludeesSupported as ke}from"./support/layerViewUtils.js";import{toRenderSettings as Ne,screenshotSuperSampleSettings as Be}from"./support/screenshotUtils.js";import{isSupportedScreenPointEvent as Qe,createScreenPointFromSupportedEvent as $e}from"./support/screenUtils.js";import{isSpatialReferenceSupported as Xe}from"./support/spatialReferenceSupport.js";import{check as Ke}from"./support/WebGLRequirements.js";import Ze from"./ui/3d/DefaultUI3D.js";import Je from"../webscene/Environment.js";import Ye from"../geometry/Extent.js";import et from"../geometry/SpatialReference.js";import tt from"../geometry/Point.js";const it=u.getLogger("esri.views.SceneView");let rt=class extends(K(Z(Y(ee)))){constructor(e){super(e),this._userClippingArea=null,this._clippingArea=null,this._initialDefaultSpatialReference=null,this._defaults={},this._externallySet={environment:!1},this._createGraphicsViewController=null,this._resolveWhenReady=[],this.propertiesPool=new Se({slicePlane:k},this),this._resourceController=Ce(this),this._defaultToMapOptions={include:new Set},this._defaultHitTestOptions={exclude:new Set},this.deconflictor=new de({view:this}),this.labeler=new ce({view:this,deconflictor:this.deconflictor.labels}),this.sharedSymbolResources=null,this.basemapTerrain=null,this.elevationProvider=null,this.camera=null,this.canvas=null,this.center=null,this.constraints=new oe,this.environmentManager=new pe,this.extent=null,this.floors=new n,this.windowDevicePixelRatio=1,this.fullOpacity=1,this.graphicsView=null,this.analysisViewManager=new ae({view:this}),this.groundView=null,this.navigating=!1,this.map=null,this.screenSizePerspectiveEnabled=!0,this.state=new me,this.scale=null,this.spatialReference=null,this.alphaCompositingEnabled=!1,this.supersampleScreenshotsEnabled=!0,this.type="3d",this.ui=new Ze,this._numUpdating=0,this._lastUpdateTime=0,this.updatingProgress=.5,this.viewpoint=null,this.zoom=null,this.highlightOptions=new Me,C(),e&&e.environment||(this._defaults.environment=new le,this.environment=this._defaults.environment);const t=e=>{f(e)&&e.type===w.MOVE||(this._updatingChanged(),this.map&&this.map.allLayers.forEach((async e=>{try{await e.when()}catch{}this._updatingChanged()})))};this.handles.add([R(this,"map.allLayers","after-changes",t,t,t,!0),this.allLayerViews.on("after-changes",(e=>this._updateUpdatingMonitors(e))),this.watch("map",(e=>{e&&e.load&&e.load().catch((()=>{}))}))]),this.inputManager=new he({view:this});const i=()=>{const e=window.devicePixelRatio;e!==this.windowDevicePixelRatio&&(this.windowDevicePixelRatio=e,this.notifyChange("pixelRatio"))};this.stateManager=new fe({view:this,updateDevicePixelRatio:i})}initialize(){this.groundView=new J({view:this}),this._updateUpdatingMonitors();const e=()=>this._updateDefaultToMapOptions();this.handles.add(R(this,"map.allLayers","after-changes",e,e,e)),this.updatingHandles.add((()=>this.qualitySettings.memoryLimit),(e=>{this.resourceController&&(this.resourceController.memoryController.maxMemory=e)}),_),this.updatingHandles.add((()=>this.qualitySettings.additionalCacheMemory),(e=>{this.resourceController&&(this.resourceController.memoryController.additionalCacheMemory=e)}),_),this.updatingHandles.add((()=>this.qualitySettings.frameRate),(e=>M(e>0?1e3/Math.ceil(e):0)),_),this.updatingHandles.add((()=>ve.SCENEVIEW_LOCKING_LOG),(e=>this.defaultsFromMap.logDebugInformation=e),_),this.updatingHandles.add((()=>{var e;return null==(e=this.map)?void 0:e.ground}),e,b),this.updatingHandles.add((()=>{var e,t;return null==(e=this.map)||null==(t=e.ground)?void 0:t.opacity}),(()=>this._updateDefaultHitTestOptions()),b),this.handles.add(this.watch("spatialReference",(()=>this.notifyChange("clippingArea")),!0))}destroy(){this.destroyed||(this.invalidate(),this.activeTool=null,this.layerViewManager.clear(),this._exitSurface(),this._disposeGraphicsView(),this.sharedSymbolResources=g(this.sharedSymbolResources),this.labeler.destroy(),this._set("labeler",null),this.deconflictor.destroy(),this._set("deconflictor",null),this._resourceController=g(this._resourceController),this.stateManager.destroy(),this._set("stateManager",null),this.inputManager.destroy(),this._set("inputManager",null),this.propertiesPool.destroy(),this.handles.remove("updatingMonitors"),this.environmentManager.destroy(),this._set("environmentManager",null),this.groundView=g(this.groundView))}get renderSpatialReference(){return this.renderCoordsHelper&&this.renderCoordsHelper.spatialReference}get basemapSpatialReference(){return this.basemapTerrain&&this.basemapTerrain.spatialReference}installContentCameraReset(e={sticky:!1}){return this.stateManager.installContentCameraReset(e)}get clippingArea(){if("global"===this.viewingMode)return null;let e=this._userClippingArea||this.get("map.clippingArea");return!(!!this._userClippingArea||this.get("map.clippingEnabled"))||m(e)?(this._clippingArea=null,null):e instanceof Ye?this.spatialReference&&(e=at(e,this.spatialReference),m(e))?(it.error("#clippingArea","setting clippingArea with incompatible SpatialReference"),this._clippingArea):(e=e.clone(),m(e.intersection(this.groundAndLayersExtent))&&(e.xmin=e.xmax,e.ymin=e.ymax),e.zmin=void 0,e.zmax=void 0,e.equals(this._clippingArea)||(this._clippingArea=e),this._clippingArea):(it.error("#clippingArea","only clippingArea geometries of type Extent are supported"),this._clippingArea)}set clippingArea(e){this.ready&&"global"===this.viewingMode&&f(e)?it.error("#clippingArea=","Clipping area is only supported in local viewingMode"):this._userClippingArea=e}get renderDataExtent(){if(this.state.viewingMode===ie.Global)return null;const e=this.renderSpatialReference,t=this.dataExtent;return m(t)||m(e)||t.spatialReference.equals(e)?t:at(t,e)}get dataExtent(){let e=this.groundAndLayersExtent;const t=this.spatialReference||et.WGS84,i=at(this.clippingArea,t);f(i)&&(e=f(e)?e.intersection(i):i);const r=this._get("dataExtent");return f(e)&&e.equals(r)?r:e}get groundAndLayersExtent(){const e=this.spatialReference||et.WGS84;let t;const i=i=>{const r=at(i,e);m(r)||(f(t)?t.union(r):t=r.clone())},r=this.basemapTerrain;if(null!=r&&r.spatialReference){const e=r.groundExtent;i(new Ye({xmin:e[0],ymin:e[1],zmin:0,xmax:e[2],ymax:e[3],zmax:0,spatialReference:r.spatialReference}))}if(this.map){const e=e=>{!f(e.fullExtent)||"graphics"===e.type&&e.internal||i(e.fullExtent)};this.map.allLayers.forEach((t=>e(t)))}if(m(t))return null;t.hasZ?(t.zmin=Math.min(0,t.zmin),t.zmax=Math.max(0,t.zmax)):(t.zmin=0,t.zmax=0);const s=this._get("groundAndLayersExtent");return t.equals(s)?s:t}set environment(e){e!==this._defaults.environment&&(this._externallySet.environment=!0),this._set("environment",e)}castEnvironment(e){return e?e instanceof le?e:e instanceof Je?null!=this.environment?this.environment.cloneWithWebsceneEnvironment(e):le.fromWebsceneEnvironment(e):G(le,e):new le}get pixelRatio(){return Math.min(this.windowDevicePixelRatio,this.maximumPixelRatio)}set pixelRatio(e){f(e)?this._override("pixelRatio",e):this._clearOverride("pixelRatio")}get maximumPixelRatio(){let e=1/0;const{maximumPixelRatio:t,maximumRenderResolution:i}=this.qualitySettings;if(null!=t&&(e=Math.min(e,t)),null!=i){const t=i/Math.max(this.width,this.height);e=Math.min(e,t)}return e}set maximumPixelRatio(e){f(e)?this._override("maximumPixelRatio",e):this._clearOverride("maximumPixelRatio")}get initialExtentRequired(){return this.stateManager&&!this.stateManager.hasInitialView}get _defaultsFromMapSettings(){return{required:{tileInfo:!1,heightModelInfo:!0,extent:!1}}}get interacting(){return this.navigating||f(this.activeTool)}get stationary(){return!this.animation&&!this.resizing&&(m(this.state)||this.state.stationary)}set qualityProfile(e){_e.isValidProfile(e)&&(_e.apply(e,this.qualitySettings),this._set("qualityProfile",e))}get qualityProfile(){return this._get("qualityProfile")||_e.getDefaultProfile()}set slicePlane(e){if(f(this._stage)&&this._stage.renderView.setRenderParameters({slicePlane:e}),m(e))return void this._set("slicePlane",null);const t=this.propertiesPool.get("slicePlane");N(e,t),this._set("slicePlane",t)}get typeSpecificPreconditionsReady(){return!!this.viewingMode}get resolution(){return null!=this.spatialReference?Q(this.scale,this.spatialReference):0}get heightModelInfo(){const e=this.getDefaultHeightModelInfo();return null!=e?L.deriveUnitFromSR(e,this.spatialReference):null}get updating(){var e,t,i;if(this.destroyed)return!1;let r=0,s=this.layerViewManager.updating,n=s?this.layerViewManager.updatingRemaining:0;this.allLayerViews.forEach((e=>{if(e.isFulfilled()){if(e.updating){if(s=!0,e.suspended||je(e))return;++n,r+=e.updatingProgress}}else++n}));for(const a of[this.graphicsView,this.basemapView,this._resourceController,this._stage,this.featureTiles,this.pointsOfInterest,this.environmentManager,this.overlay,this.featureTreeDebugger,this.toolViewManager,this.analysisViewManager])if(f(a)&&a.updating){const e=.1;n+=e,r+=.5*e}for(const a of[this.deconflictor,this.labeler,this.basemapTerrain])f(a)&&a.updating&&(++n,r+=a.updatingProgress);if(s=!!(s||n>0||this.updatingHandles.updating||!this.ready||!this.stationary||this._createGraphicsViewController||null!=(e=this.inputManager)&&e.hasPendingInputs||null!=(t=this.map)&&null!=(i=t.allLayers)&&i.some((e=>!e.isFulfilled()))),s?(this._numUpdating=Math.max(n,this._numUpdating),r+=this._numUpdating-n):this._numUpdating=0,this._numUpdating>0?r/=this._numUpdating:r=s?0:1,this._get("updatingProgress")!==r){const e=this._resourceController.scheduler.now;if(r<1){const t=Math.min((e-this._lastUpdateTime)/2e3,1);r=this.updatingProgress*(1-t)+r*t}this._set("updatingProgress",r),this._lastUpdateTime=s&&r<1?e:0}return s}get viewingMode(){var e;const t=this._predeterminedViewingMode;if(f(t))return re(t);const i=this.spatialReference;return f(null==(e=this.defaultsFromMap)?void 0:e.viewingMode)&&i&&i.equals(this.defaultsFromMap.spatialReference)?re(this.defaultsFromMap.viewingMode):!i||Xe(i,ie.Global)?"global":"local"}set viewingMode(e){this.ready?it.error("#viewingMode","viewingMode cannot be set once view is ready"):e?this._override("viewingMode",e):void 0===e&&this._clearOverride("viewingMode")}get resourceController(){return this._resourceController}get performanceInfo(){return new Te(this)}forceAnimationTime(e){this._stage.renderView.forcedAnimationTime=this.basemapTerrain.overlayManager.forcedAnimationTime=e}on(e,t,i,r){const s=this.viewEvents.on(e,t,i,r);return s||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}toMap(e,t){if(!this.ready)return it.error("#toMap()","Scene view cannot be used before it is ready"),null;const i=t?this.externalToInternalIntersectOptions(t):this._defaultToMapOptions,r=f(i.graphics)&&(f(i.graphics.include)||f(i.graphics.exclude)),s=Qe(e)?$e(this,e):e,n=T(s);i.enableDraped=i.include&&!i.include.has(qe)||i.exclude&&i.exclude.has(qe);const a=this.sceneIntersectionHelper,o=He(this.state.viewingMode);if(o.options.selectionMode=!0,o.options.store=r?Ue.ALL:Ue.MIN,a.intersectIntersectorScreen(n,o,i),r){for(const e of o.results.all){const t=Fe(e,this);if(m(t))return this._intersectResultToMapPoint(e);if(this._testGraphicUidFilter(i.graphics,t))return this._intersectResultToMapPoint(e)}return null}return this._intersectResultToMapPoint(o.results.min)}toScreen(e){if(!this.ready)return it.error("#toScreen()","Scene view cannot be used before it is ready"),null;const t=y(null==e.z&&be(this.elevationProvider,e),0);return D(e,lt,this.renderSpatialReference,t),this.state.camera.projectToScreen(lt,pt),O(pt[0],pt[1])}pixelSizeAt(e){return this.ready?e?(D(e,lt,this.renderSpatialReference),this.state.camera.computeScreenPixelSizeAt(lt)):0:(it.error("#pixelSizeAt()","Scene view cannot be used before it is ready"),null)}overlayPixelSizeInMapUnits(e){const t=this.basemapTerrain.overlayManager;return t?t.overlayPixelSizeInMapUnits(e):1}hitTest(e,t){if(!this.ready)return it.error("#hitTest()","Scene view cannot be used before it is ready"),null;const i=Qe(e)?$e(this,e):e,r=P(i.x,i.y),s=t?this.externalToInternalIntersectOptions(t):this._defaultHitTestOptions;s.requiresGroundFeedback=!0,s.enableDraped=!0;const n=He(this.state.viewingMode);n.options.selectionMode=!0,n.options.store=Ue.ALL,this.sceneIntersectionHelper.intersectIntersectorScreen(r,n,s);const a=this._intersectResultsToHits(n.results.all,s.graphics),o=n.results.ground,l=We(o,this),p=f(l)&&"type"in l&&"integrated-mesh"===l.type?l:null,h={screenPoint:i,results:a,ground:{mapPoint:this._intersectResultToMapPoint(o),distance:De(o)?o.distanceInRenderSpace:0,layer:p}};return ve.SCENEVIEW_HITTEST_RETURN_INTERSECTOR&&(h.intersector=n),Promise.resolve(h)}popupHitTest(e){return ze(this,e).then((({results:t,ground:i})=>{let r=null;return!(0===t.length||Math.abs(y(t[0].distance,0)-i.distance)<1e-5)||i.layer&&"integrated-mesh"===i.layer.type||(r=i.mapPoint),{results:t,screenPoint:e,mapPoint:r}}))}goTo(e,t){return this.updatingHandles.addPromise(this.stateManager.goTo(e,t))}async whenAnalysisView(e){if(m(e.parent))throw new o("view:no-analysisview-for-analysis","The analysis has not been added to an AnalysisLayer or SceneView.analyses",{analysis:e});if("analysis"===e.parent.type){return(await this.whenLayerView(e.parent)).whenAnalysisView(e)}return this.analysisViewManager.whenAnalysisView(e)}whenLayerView(e){return super.whenLayerView(e)}takeScreenshot(e){return this.whenReady().then((()=>{const t=Ne(e,this);return t.pixelRatio/=this.pixelRatio,this._stage.renderView.takeScreenshot(Be(t,this.supersampleScreenshotsEnabled,this.padding))}))}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}importLayerView(e){return ne.importLayerView(e)}hasLayerViewModule(e){return ne.hasLayerViewModule(e)}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){var e,t,i,r;return this.map&&"initialViewProperties"in this.map&&(null==(e=this.map)||null==(t=e.initialViewProperties)?void 0:t.spatialReference)||(null==(i=this.defaultsFromMap)?void 0:i.spatialReference)||(null==(r=this.defaultsFromMap)?void 0:r.ready)&&this._initialDefaultSpatialReference||null}async validate(){let e=Ke(this.type);if(d("safari")&&d("safari")<9&&(e=new o("sceneview:browser-not-supported","This browser is not supported by SceneView (Safari < 9)",{type:"safari",requiredVersion:9,detectedVersion:d("safari")})),f(e))throw it.warn("#validate()",e.message),e}get _predeterminedViewingMode(){var e,t;const i=this._isOverridden("viewingMode")?this._get("viewingMode"):null!=(e=this.map&&"initialViewProperties"in this.map?null==(t=this.map.initialViewProperties)?void 0:t.viewingMode:null)?e:null;return f(i)?se(i):null}getSpatialReferenceSupport({spatialReference:e,layer:t}){const i=this._predeterminedViewingMode;if(f(i))return this._validateSpatialReferenceForViewingMode(e,t,i)?{constraints:this._makeSpatialReferenceConstraints(e,t,i)}:null;const r=this._validateSpatialReferenceForViewingMode(e,t,ie.Local),s=this._validateSpatialReferenceForViewingMode(e,t,ie.Global);return r||s?r&&s?{constraints:this._makeSpatialReferenceConstraints(e,t,null)}:r?{constraints:this._makeSpatialReferenceConstraints(e,t,ie.Local)}:{constraints:this._makeSpatialReferenceConstraints(e,t,ie.Global)}:null}_validateSpatialReferenceForViewingMode(e,t,i){return!!Xe(e,i)&&(!!m(t)||(!X(t)||!m(Ie(t,e,i)))&&("voxel"!==t.type||i===ie.Local))}_makeSpatialReferenceConstraints(e,t,i){return t&&!X(t)&&"voxel"!==t.type&&(e.isWebMercator||e.isWGS84)?[{spatialReference:e,viewingMode:i},{spatialReference:e.isWebMercator?et.WGS84:et.WebMercator,viewingMode:i}]:t&&X(t)&&e.isWebMercator&&i!==ie.Global?[{spatialReference:e,viewingMode:i},{spatialReference:et.WGS84,viewingMode:ie.Local}]:[{spatialReference:e,viewingMode:i}]}_validateSpatialReference(e){const t=f(this.getSpatialReferenceSupport({spatialReference:e})),i=this._predeterminedViewingMode;return t||(f(i)?it.warnOnce(`Spatial reference defined on view not supported in ${re(i)} viewing mode.`):e.isGeographic&&it.warnOnce("Spatial reference is geographic but not supported.")),t}whenReady(){return new Promise((e=>{this.ready?e(this):this._resolveWhenReady.push(e)}))}computeMapPointFromVec3d(e,t){let i=this.spatialReference||et.WGS84;return F(e,this.renderSpatialReference,e,i)||(i=et.WGS84,F(e,this.renderSpatialReference,e,i)),t?(t.x=e[0],t.y=e[1],t.z=e[2],t.spatialReference=i):t=new tt(e,i),t}trackGraphicState(e){if(!e.graphic)return it.error("trackGraphicState","GraphicState.graphic must not be null or undefined to start tracking"),null;const t=this.getViewForGraphic(e.graphic);let i=null,r=!1;const s=t=>{var s;!r&&f(t)&&"processor"in t&&"graphics-3d"===(null==(s=t.processor)?void 0:s.type)&&t.processor.graphicsCore&&(i=t.processor.graphicsCore.trackGraphicState(e))};return f(t)?s(t):this.whenViewForGraphic(e.graphic,{waitForLayer:!0}).then((e=>s(e)),(()=>{})).catch((()=>{})),{remove:()=>{r=!0,f(i)&&(i.remove(),i=null)}}}highlight(e){if(Array.isArray(e))return p(e.map((e=>this.highlight(e))));if(n.isCollection(e))return p(e.toArray().map((e=>this.highlight(e))));const t=this.getViewForGraphic(e);return t&&"highlight"in t?t.highlight(e):h()}maskOccludee(e){if(!e)return it.error("maskOccludee","GraphicState.graphic must not be null or undefined to mask an occludee"),null;const t=this.getViewForGraphic(e);let i=null,r=!1;const s=t=>{!r&&f(t)&&ke(t)&&(i=t.maskOccludee(e))};return f(t)?s(t):this.whenViewForGraphic(e,{waitForLayer:!0}).then((e=>s(e)),(()=>{})).catch((()=>{})),{remove:()=>{r=!0,f(i)&&(i.remove(),i=null)}}}getViewForGraphic(e){return e.layer===this.graphics?this.graphicsView:e.layer?this.allLayerViews.find((t=>t.layer===e.layer)):null}graphicChanged(e){f(this.graphicsView)&&this.graphicsView.graphicChanged(e)}async whenViewForGraphic(e,t){if(e.layer===this)return await S(this,"graphicsView"),this.graphicsView;if(!e.layer||!this.map)throw new o("no-view-for-graphic");return t&&t.waitForLayer&&!this.map.allLayers.includes(e.layer)?new Promise(((t,i)=>{const r=this.map.allLayers.on("change",(s=>{-1!==s.added.indexOf(e.layer)&&(r.remove(),this.whenLayerView(e.layer).then(t,i))}))})):this.whenLayerView(e.layer)}externalToInternalIntersectOptions(e){const t=this._externalToInternalRenderItems(e.include,ot.INCLUDE),i=this._externalToInternalRenderItems(e.exclude,ot.EXCLUDE);return{include:t.layerUids,exclude:i.layerUids,graphics:{include:t.graphicUids,exclude:i.graphicUids}}}_intersectResultToMapPoint(e,t){return e.getIntersectionPoint(lt)?(t=this.computeMapPointFromVec3d(lt,t),e.intersector===Ae.TERRAIN&&this.basemapTerrain&&(t.z=y(be(this.basemapTerrain,t),0)),t):null}_intersectResultsToHits(e,t){const i=new Array;let r=null;for(let s=0;s<e.length;s++){const n=e[s],a=We(n,this);if(f(a)&&(a===this.map.ground||"type"in a&&"integrated-mesh"===a.type))break;const o=Fe(n,this);if(!f(o))continue;if(m(r)&&s!==e.length-1&&(r=new Set),f(r)){const e=this._getGraphicFilterUid(o);if(r.has(e))continue;r.add(e)}if(!this._testGraphicUidFilter(t,o))continue;const l=this._intersectResultToMapPoint(n),p=n.distanceInRenderSpace;i.push({graphic:o,mapPoint:l,distance:p})}return i}_getGraphicFilterUid(e){if(e.layer&&"objectIdField"in e.layer){const t=e.attributes[e.layer.objectIdField];if(t)return`o-${e.layer.id}-${t}`}return`u-${e.uid}`}_testGraphicUidFilter(e,t){const i=this._getGraphicFilterUid(t);return m(e)||(m(e.include)||e.include.has(i))&&(m(e.exclude)||!e.exclude.has(i))}_externalToInternalRenderItems(e,t,s={layerUids:null,graphicUids:null}){if(!e)return s;if(e instanceof i)nt(s,this._getGraphicFilterUid(e)),t===ot.INCLUDE&&(f(this.graphicsView)&&e.layer===this?st(s,this.graphicsView.processor.layer.id):e.layer&&st(s,e.layer.uid));else if(c(e))for(const i of e)i===this.graphics&&f(this.graphicsView)?st(s,this.graphicsView.processor.layer.id):i instanceof r?i===this.map.ground&&st(s,qe):this._externalToInternalRenderItems(i,t,s);else st(s,e.uid);return s}_initBasemapTerrain(){this._set("basemapTerrain",new Ee({view:this})),this._set("elevationProvider",new we({view:this})),this.elevationProvider.register("ground",this.basemapTerrain)}_exitBasemapTerrain(){this.basemapTerrain&&(this.elevationProvider.unregister(this.basemapTerrain),this.elevationProvider.destroy(),this._set("elevationProvider",null),this.basemapTerrain.destroy(),this._set("basemapTerrain",null))}_initGlobe(){this._initCoordinateSystem(),this.state.createInitialCamera(),this._initBasemapTerrain(),this._set("pointsOfInterest",new Pe({view:this})),this._set("featureTiles",new ge({renderCoordsHelper:this.renderCoordsHelper,cameraOnSurface:this.pointsOfInterest.contentCameraOnSurface,focus:this.pointsOfInterest.focus,tilingSchemeOwner:this.basemapTerrain,viewState:this.state,scheduler:this._resourceController.scheduler,terrain:this.basemapTerrain}));const e=()=>{const e=this.basemapTerrain&&this.basemapTerrain.extent;if(this.clippingArea||e)if(e&&this.basemapTerrain.spatialReference){const e=f(this.basemapTerrain.extent)?A(z(this.basemapTerrain.extent,this.basemapTerrain.spatialReference),this.spatialReference):null;f(this.clippingArea)?this.featureTiles.filterExtent=this.clippingArea.intersection(e):this.featureTiles.filterExtent=e}else this.featureTiles.filterExtent=this.clippingArea;else this.featureTiles.filterExtent=null};this.handles.add([this.updatingHandles.add((()=>ve.FEATURE_TILE_TREE_SHOW_TILES),(e=>{e&&this.featureTiles&&!this.featureTreeDebugger?this.updatingHandles.addPromise(import("./3d/layers/support/FeatureTileTree3DDebugger.js")).then((({FeatureTileTree3DDebugger:e})=>{!this.featureTreeDebugger&&ve.FEATURE_TILE_TREE_SHOW_TILES&&(this.featureTreeDebugger=new e({view:this}))})):e||!this.featureTreeDebugger||ve.FEATURE_TILE_TREE_SHOW_TILES||(this.featureTreeDebugger.destroy(),this.featureTreeDebugger=null)}),b),this.updatingHandles.add((()=>this.clippingArea),e,b),this.updatingHandles.add((()=>this.basemapTerrain.extent),e,b)],"feature-tiles"),this.stateManager.init()}_exitGlobe(){this.state&&(this.stateManager.deinit(),this.handles.remove("render-coords-helper"),this.handles.remove("feature-tiles"),this.featureTiles.destroy(),this._set("featureTiles",null),this.pointsOfInterest.destroy(),this._set("pointsOfInterest",null),this._exitBasemapTerrain(),this.state.exit(),this._exitCoordinateSystem())}_initCoordinateSystem(){if(this.spatialReference){const e=this.spatialReference;this.mapCoordsHelper&&this.mapCoordsHelper.spatialReference.equals(e)||this._set("mapCoordsHelper",new Re(this.map,e));const t=this.state.isGlobal,i=B(t,e);i!==this.renderSpatialReference&&(this._set("renderCoordsHelper",Ve.create(this.state.viewingMode,i)),t||this.handles.add(this.watch("basemapTerrain.extent",(e=>{const t=this.renderCoordsHelper.spatialReference;0===e[0]&&0===e[1]&&0===e[2]&&0===e[3]||!W(e,this.basemapTerrain.spatialReference,ht,t)||(this.renderCoordsHelper.extent=ht)}),!0),"render-coords-helper"),this.sceneIntersectionHelper&&this.sceneIntersectionHelper.setTolerance(Le/this.renderCoordsHelper.unitInMeters))}else this._set("mapCoordsHelper",null),this._set("renderCoordsHelper",null)}_exitCoordinateSystem(){this.mapCoordsHelper&&(this.handles.remove("render-coords-helper"),this._set("renderCoordsHelper",null),this._set("mapCoordsHelper",null))}_updatingChanged(){this.notifyChange("updating")}_updateUpdatingMonitors(e=null){f(e)&&e.type===w.MOVE||(this.handles.remove("updatingMonitors"),this.allLayerViews.forEach((e=>{e.destroyed||(this.handles.add([e.watch(["updating","updatingProgress"],(()=>this._updatingChanged()),!0)],"updatingMonitors"),e.when((()=>this._updatingChanged()),(()=>this._updatingChanged())))})),this._updatingChanged())}_renderScreenshotOverlay(e,t){if(!this.overlay||!this.overlay.hasVisibleItems)return t;const i=e.getContext("2d");return i.putImageData(t,0,0),this.overlay.renderCanvas(e),i.getImageData(0,0,t.width,t.height)}_initStage(){const e={deactivatedWebGLExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions,alpha:this.alphaCompositingEnabled,canvas:this.renderCanvas,screenshot:{renderOverlay:(e,t)=>this._renderScreenshotOverlay(e,t)}},t=new ye(this.state.viewingMode,(e=>this._stage.layers.forAll(e)),this);this._set("sceneIntersectionHelper",t);const i=a(this.surface),{resourceController:r,state:s,renderSpatialReference:n}=this;this._stage=new Ge({options:e,container:i,resourceController:r,state:s,sceneIntersectionHelper:t,renderSR:n}),this._stage.renderView.setRenderParameters({slicePlane:this.slicePlane}),this._lostWebGLContextHandle=l(this._stage.renderView.canvas,"webglcontextlost",(()=>this.fatalError=new o("webgl-context-lost"))),this.handles.add([this.updatingHandles.add((()=>this.qualitySettings.antialiasingEnabled),(()=>this._stage.renderView.setRenderParameters({antialiasingEnabled:this.qualitySettings.antialiasingEnabled})),_),this.updatingHandles.add((()=>this.qualitySettings.highQualityTransparency),(()=>this._stage.renderView.setRenderParameters({highQualityTransparency:this.qualitySettings.highQualityTransparency})),_),x(this,"magnifier",(e=>this._stage.renderView.magnifier=e),!0)],"stage");const p=()=>{this._stage.renderView.setRenderParameters({defaultHighlightOptions:Me.toEngineOptions(this.highlightOptions)})};this.handles.add(this.updatingHandles.add((()=>[this.highlightOptions.color,this.highlightOptions.haloColor,this.highlightOptions.haloOpacity,this.highlightOptions.fillOpacity,this.highlightOptions.shadowOpacity,this.highlightOptions.shadowColor,this.highlightOptions.shadowDifference]),p),"stage"),p(),this.renderCoordsHelper&&this.sceneIntersectionHelper.setTolerance(Le/this.renderCoordsHelper.unitInMeters),this._set("canvas",this._stage.renderView.canvas)}_exitStage(){this._set("sceneIntersectionHelper",null),this._stage.destroy(),this._stage=null,this._lostWebGLContextHandle.remove(),this._lostWebGLContextHandle=null,this.handles.remove("stage"),this._set("canvas",null)}_initSurface(e){this._exitSurface(),this.state.init(e,this.spatialReference),this._initStage(),this._initGlobe(),this.sharedSymbolResources=new Oe({view:this,viewingMode:e,resourceController:this._resourceController,pointsOfInterest:this.pointsOfInterest,viewState:this.state,objectResourceCache:new ue})}_exitSurface(){this.sharedSymbolResources&&(this.sharedSymbolResources.objectResourceCache.destroy(),this.sharedSymbolResources.destroy(),this.sharedSymbolResources=null,this._exitGlobe(),this._exitStage())}_createGraphicsViewIfNeeded(){if(this.graphicsView||this._createGraphicsViewController)return;if(0===this.graphics.length)return;this.handles.remove("graphics-view"),this._createGraphicsViewController=new AbortController;const e=()=>{this._createGraphicsViewController=null,this._updatingChanged()};this._createGraphicsViewAsync(this._createGraphicsViewController.signal).then(e,e),this._updatingChanged()}async _createGraphicsViewAsync(e){const t=(await import("./3d/layers/GraphicsView3D.js")).default;v(e),await V(this.basemapTerrain,"ready",e),this._set("graphicsView",new t({view:this}))}_disposeGraphicsView(){this._createGraphicsViewController&&(this._createGraphicsViewController.abort(),this._createGraphicsViewController=null),this.handles.remove("graphics-view"),f(this.graphicsView)&&(this.handles.remove(this.graphicsView.processor.layer.id),this.graphicsView.destroy(),this._set("graphicsView",null))}_startup(){const e=se(this.viewingMode);if(e===ie.Global&&(this._clippingArea=null),this._initSurface(e),this._set("ready",!0),this.handles.add(R(this,"graphics","after-changes",(()=>this._createGraphicsViewIfNeeded())),"graphics-view"),this._createGraphicsViewIfNeeded(),!this._externallySet.environment){const e=this.get("map.initialViewProperties.environment");e&&(this.environment=e)}this.labeler.setup(),this.environmentManager.connectView(this),this.inputManager.connect();const t=this._resolveWhenReady;this._resolveWhenReady=[],t.forEach((e=>e(this)))}_teardown(){this._initialDefaultSpatialReference=null,this.inputManager.disconnect(),this.environmentManager.disconnectView(),this.labeler.dispose(),this._disposeGraphicsView(),this.handles.remove("graphics-view"),this._exitSurface(),this._set("ready",!1)}_updateDefaultToMapOptions(){if(this._defaultToMapOptions.include.clear(),this.map){this.map.ground&&this._defaultToMapOptions.include.add(qe);for(const e of this.map.allLayers.items)"integrated-mesh"===e.type&&this._defaultToMapOptions.include.add(e.uid)}}_updateDefaultHitTestOptions(){if(this._defaultHitTestOptions.exclude.clear(),this.map){this.map.ground&&this.map.ground.opacity<1&&this._defaultHitTestOptions.exclude.add(qe);for(const e of this.map.allLayers.items)"integrated-mesh"===e.type&&e.opacity<1&&this._defaultToMapOptions.exclude.add(e.uid)}}getVoxelWasmPerSceneView(){return $.getInstance().getVoxelWasmPerSceneView(this)}};function st(e,t){e.layerUids||(e.layerUids=new Set),e.layerUids.add(t)}function nt(e,t){e.graphicUids||(e.graphicUids=new Set),e.graphicUids.add(t)}function at(e,t){return f(e)&&U(e.spatialReference,t)?A(e,t):null}var ot;e([E()],rt.prototype,"_userClippingArea",void 0),e([E()],rt.prototype,"_resourceController",void 0),e([E()],rt.prototype,"_stage",void 0),e([E({readOnly:!0})],rt.prototype,"deconflictor",void 0),e([E({readOnly:!0})],rt.prototype,"labeler",void 0),e([E({type:te,readOnly:!0,aliasOf:"state.animation"})],rt.prototype,"animation",void 0),e([E({readOnly:!0})],rt.prototype,"basemapTerrain",void 0),e([E({readOnly:!0})],rt.prototype,"elevationProvider",void 0),e([E({type:t,aliasOf:"stateManager.camera"})],rt.prototype,"camera",void 0),e([E({type:t,aliasOf:"stateManager.contentCamera"})],rt.prototype,"contentCamera",void 0),e([E({readOnly:!0})],rt.prototype,"canvas",void 0),e([E({type:tt,aliasOf:"stateManager.center"})],rt.prototype,"center",void 0),e([E({type:Ye})],rt.prototype,"clippingArea",null),e([E({type:oe})],rt.prototype,"constraints",void 0),e([E({type:Ye,readOnly:!0})],rt.prototype,"renderDataExtent",null),e([E({type:Ye,readOnly:!0})],rt.prototype,"dataExtent",null),e([E({type:Ye,readOnly:!0})],rt.prototype,"groundAndLayersExtent",null),e([E({value:null,type:le})],rt.prototype,"environment",null),e([j("environment")],rt.prototype,"castEnvironment",null),e([E({readOnly:!0})],rt.prototype,"environmentManager",void 0),e([E({type:Ye,aliasOf:"stateManager.extent"})],rt.prototype,"extent",void 0),e([E()],rt.prototype,"floors",void 0),e([E({readOnly:!0,aliasOf:"stateManager.screenCenter"})],rt.prototype,"screenCenter",void 0),e([E({type:Number})],rt.prototype,"pixelRatio",null),e([E({type:Number,dependsOn:["qualitySettings.maximumPixelRatio","qualitySettings.maximumRenderResolution","size"]})],rt.prototype,"maximumPixelRatio",null),e([E({aliasOf:"stateManager.frustum"})],rt.prototype,"frustum",void 0),e([E({type:Number,readOnly:!0})],rt.prototype,"fullOpacity",void 0),e([E({readOnly:!0})],rt.prototype,"graphicsView",void 0),e([E({readOnly:!0})],rt.prototype,"analysisViewManager",void 0),e([E()],rt.prototype,"groundView",void 0),e([E({type:Boolean})],rt.prototype,"initialExtentRequired",null),e([E()],rt.prototype,"_defaultsFromMapSettings",null),e([E({type:Boolean,readOnly:!0})],rt.prototype,"interacting",null),e([E()],rt.prototype,"stationary",null),e([E({aliasOf:"state.navigating"})],rt.prototype,"navigating",void 0),e([E()],rt.prototype,"map",void 0),e([E({readOnly:!0})],rt.prototype,"mapCoordsHelper",void 0),e([E({aliasOf:"stateManager.padding"})],rt.prototype,"padding",void 0),e([E({type:Pe,readOnly:!0})],rt.prototype,"pointsOfInterest",void 0),e([E({type:ge,readOnly:!0})],rt.prototype,"featureTiles",void 0),e([E()],rt.prototype,"featureTreeDebugger",void 0),e([E({type:Boolean})],rt.prototype,"screenSizePerspectiveEnabled",void 0),e([E({constructOnly:!0})],rt.prototype,"deactivatedWebGLExtensions",void 0),e([E({constructOnly:!0})],rt.prototype,"debugWebGLExtensions",void 0),e([E({constructOnly:!0})],rt.prototype,"renderCanvas",void 0),e([E({constructOnly:!0})],rt.prototype,"state",void 0),e([E({readOnly:!0})],rt.prototype,"inputManager",void 0),e([E({readOnly:!0})],rt.prototype,"stateManager",void 0),e([E({type:["low","medium","high"]})],rt.prototype,"qualityProfile",null),e([E({type:xe,get(){let e=this._get("qualitySettings");return e||(e=new xe,_e.apply(this.qualityProfile,e)),e}})],rt.prototype,"qualitySettings",void 0),e([E()],rt.prototype,"slicePlane",null),e([E({readOnly:!0})],rt.prototype,"typeSpecificPreconditionsReady",null),e([E({readOnly:!0})],rt.prototype,"renderCoordsHelper",void 0),e([E({readOnly:!0})],rt.prototype,"sceneIntersectionHelper",void 0),e([E({type:Number,dependsOn:["scale","spatialReference"],readOnly:!0})],rt.prototype,"resolution",null),e([E({type:Number,aliasOf:"stateManager.scale"})],rt.prototype,"scale",void 0),e([E()],rt.prototype,"heightModelInfo",null),e([E()],rt.prototype,"spatialReference",void 0),e([E({type:Boolean,constructOnly:!0})],rt.prototype,"alphaCompositingEnabled",void 0),e([E({type:Boolean})],rt.prototype,"supersampleScreenshotsEnabled",void 0),e([E({readOnly:!0})],rt.prototype,"type",void 0),e([E({type:Ze})],rt.prototype,"ui",void 0),e([E({type:Boolean,readOnly:!0,dependsOn:["graphicsView.updating","basemapView.updating","basemapTerrain.updating","layerViewManager.updating","layerViewManager.updatingRemaining","_resourceController.updating","_stage.updating","featureTiles.updating","pointsOfInterest.updating","environmentManager.updating","overlay.updating","updatingHandles.updating","featureTreeDebugger.updating","labeler.updating","deconflictor.updating","ready","stationary","inputManager.hasPendingInputs","toolViewManager.updating","analysisViewManager.updating"]})],rt.prototype,"updating",null),e([E({type:Number,readOnly:!0,dependsOn:["updating"]})],rt.prototype,"updatingProgress",void 0),e([E({type:["global","local"]})],rt.prototype,"viewingMode",null),e([E({type:s,aliasOf:"stateManager.viewpoint"})],rt.prototype,"viewpoint",void 0),e([E({type:Number,aliasOf:"stateManager.zoom"})],rt.prototype,"zoom",void 0),e([E({type:Me})],rt.prototype,"highlightOptions",void 0),rt=e([I("esri.views.SceneView")],rt),function(e){e[e.INCLUDE=0]="INCLUDE",e[e.EXCLUDE=1]="EXCLUDE"}(ot||(ot={}));const lt=H(),pt=P(),ht=q(),dt=rt;export{dt as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{deg2rad as t}from"../../../../core/mathUtils.js";import{isSome as i,isNone as e}from"../../../../core/maybe.js";import{f as s,i as n,k as r}from"../../../../chunks/vec2.js";import{a as h}from"../../../../chunks/vec2f64.js";import{r as a,d as o,o as c,c as _,n as l,b as p,a as d,y as g,g as f}from"../../../../chunks/vec3.js";import{c as u,f as m}from"../../../../chunks/vec3f64.js";import{create as D,fromPositionAndNormal as E,signedDistance as x,copy as b,intersectLine as I,normal as V}from"../../../../geometry/support/plane.js";import{angle as M,projectPointSignedLength as y}from"../../../../geometry/support/vector.js";import{intersectLineAndRay as N,LineType as P}from"../../../support/geometry2dUtils.js";class X{constructor(t,i,e,s=0,n=v.IMMEDIATE){this.helper=t,this.planeType=i,this.edge=e,this.distance=s,this._plane=D(),this._offsetPlane=D(),this._minDistance=-1/0,this._maxDistance=1/0,n===v.IMMEDIATE&&this._initialize()}get plane(){return this._plane}get requiresSplitEdgeLeft(){return!this._left.isOriginalDirection}get requiresSplitEdgeRight(){return!this._right.isOriginalDirection}get edgeDirection(){return this._edgeDirection}_initialize(){this._initializeNeighbors(),this._initializePlane(),this._initializeDistanceConstraints()}_initializeNeighbors(){var t,i,e,s;const n=this._toXYZ(this.edge.leftVertex.pos),r=this._toXYZ(null==(t=this.edge.leftVertex.leftEdge)||null==(i=t.leftVertex)?void 0:i.pos),h=this._toXYZ(this.edge.rightVertex.pos),o=this._toXYZ(null==(e=this.edge.rightVertex.rightEdge)||null==(s=e.rightVertex)?void 0:s.pos);this._edgeDirection=a(u(),n,h),this._left=this._computeNeighbor(n,r,this._edgeDirection),this._right=this._computeNeighbor(h,o,this._edgeDirection)}_toXYZ(t){return i(t)?this.helper.toXYZ(t):null}_computeNeighbor(t,i,s){if(e(i))return{start:t,end:i,direction:m(-s[1],s[0],0),isOriginalDirection:!0};const n=a(u(),t,i),r=!this._passesBisectingAngleThreshold(n,s);return{start:t,end:i,direction:r?this._bisectVectorsPerpendicular(s,n):n,isOriginalDirection:!r}}_passesBisectingAngleThreshold(t,i){const e=Math.abs(M(i,t));return e>=Y&&e<=Math.PI-Y}_bisectVectorsPerpendicular(t,i){const e=o(t,i)<0?t:c(u(),t),s=Math.abs(o(e,i));if(!(s<.001||s>.999))return this._bisectDirection(e,i);const n=_(u(),e,[0,0,1]);return l(n,n)}_bisectDirection(t,i){const e=p(u(),t,i);return l(e,e)}_initializePlane(){const t=this._computeNormalDirection(this._left),i=this._computeNormalDirection(this._right);o(t,i)<0&&c(i,i),E(this._left.start,this._bisectDirection(t,i),this._plane)}_computeNormalDirection(t){const i=_(u(),t.direction,this._edgeDirection);l(i,i);const e=_(u(),this._edgeDirection,i);return this.planeType===T.XY&&(e[2]=0),l(e,e)}_initializeDistanceConstraints(){i(this._left.end)&&!this.requiresSplitEdgeLeft&&this._updateDistanceConstraint(x(this._plane,this._left.end)),i(this._right.end)&&!this.requiresSplitEdgeRight&&this._updateDistanceConstraint(x(this._plane,this._right.end)),this._updateIntersectDistanceConstraint(this._plane)}_updateDistanceConstraint(t){t<=0&&(this._minDistance=Math.max(this._minDistance,t)),t>=0&&(this._maxDistance=Math.min(this._maxDistance,t))}_updateIntersectDistanceConstraint(t){const i=V(t),e=this._edgeDirection,a=p(u(),this._left.start,this._left.direction),o=p(u(),this._right.start,this._right.direction),c=this._pointInBasis2D(h(),i,e,this._left.start),_=this._pointInBasis2D(h(),i,e,a),l=this._pointInBasis2D(h(),i,e,this._right.start),g=this._pointInBasis2D(h(),i,e,o),[f]=N({start:_,end:c,type:P.LINE},{start:g,end:l,type:P.LINE});if(!f)return;const m=s(h(),c,_);n(m,m);const D=s(h(),f,_),E=r(m,D),b=p(u(),a,d(u(),this._left.direction,-E)),I=x(t,b);this._updateDistanceConstraint(I)}_pointInBasis2D(t,i,e,s){return t[0]=y(i,s),t[1]=y(e,s),t}_offset(t,e){Number.isFinite(this._minDistance)&&(e=Math.max(this._minDistance,e)),Number.isFinite(this._maxDistance)&&(e=Math.min(this._maxDistance,e)),b(this._plane,this._offsetPlane),this._offsetPlane[3]-=e;const s=(t,e,s)=>i(e)&&I(this._offsetPlane,t,p(u(),t,e),s),n=u();(t===this.edge.leftVertex?s(this._left.start,this._left.direction,n):s(this._right.start,this._right.direction,n))&&this.helper.copy(this.helper.fromXYZ(n,void 0,this.helper.getM(t.pos)),t.pos)}signedDistanceToPoint(t){return x(this.plane,this.helper.toXYZ(this.helper.pointToVector(t)))}apply(t){this._offset(t,this.distance)}undo(t){this._offset(t,0)}canAccumulate(t){return t instanceof X&&this.edge.leftVertex.index===t.edge.leftVertex.index&&this.edge.rightVertex.index===t.edge.rightVertex.index&&this.edge.component===t.edge.component&&this._maybeEqualsVec3(this._left.direction,t._left.direction)&&this._maybeEqualsVec3(this._right.direction,t._right.direction)&&g(V(this._plane),V(t._plane))}accumulate(t,i){const e=this._plane[3]-i._plane[3]+i.distance;this._offset(t,e)}accumulateParams(t){const i=t.distance-t._plane[3];this.distance=i+this._plane[3]}clone(){const t=new X(this.helper,this.planeType,this.edge,this.distance,v.DEFERRED);return b(this._plane,t._plane),b(this._offsetPlane,t._offsetPlane),t._maxDistance=this._maxDistance,t._minDistance=this._minDistance,t._left=this._cloneNeighbor(this._left),t._right=this._cloneNeighbor(this._right),t._edgeDirection=f(u(),this._edgeDirection),t}_maybeEqualsVec3(t,s){return e(t)&&e(s)||i(t)&&i(s)&&g(t,s)}_cloneNeighbor({start:t,end:e,direction:s,isOriginalDirection:n}){return{start:f(u(),t),end:i(e)?f(u(),e):null,direction:f(u(),s),isOriginalDirection:n}}}const Y=t(15);var T,v;!function(t){t[t.XYZ=0]="XYZ",t[t.XY=1]="XY"}(T||(T={})),function(t){t[t.IMMEDIATE=0]="IMMEDIATE",t[t.DEFERRED=1]="DEFERRED"}(v||(v={}));export{X as OffsetEdgeVertex,T as PlaneType};
5
+ import{deg2rad as t}from"../../../../core/mathUtils.js";import{isSome as i,isNone as e}from"../../../../core/maybe.js";import{f as s,i as n,k as r}from"../../../../chunks/vec2.js";import{a as h}from"../../../../chunks/vec2f64.js";import{r as a,d as o,o as c,c as _,n as l,b as p,a as d,y as g,g as f}from"../../../../chunks/vec3.js";import{c as u,f as m}from"../../../../chunks/vec3f64.js";import{create as D,fromPositionAndNormal as E,signedDistance as x,copy as b,intersectLine as I,normal as V}from"../../../../geometry/support/plane.js";import{angle as M,projectPointSignedLength as y}from"../../../../geometry/support/vector.js";import{intersectLineAndRay as N,LineType as P}from"../../../support/geometry2dUtils.js";class X{constructor(t,i,e,s=0,n=v.IMMEDIATE){this.helper=t,this.planeType=i,this.edge=e,this.distance=s,this._plane=D(),this._offsetPlane=D(),this._minDistance=-1/0,this._maxDistance=1/0,n===v.IMMEDIATE&&this._initialize()}get plane(){return this._plane}get requiresSplitEdgeLeft(){return!this._left.isOriginalDirection}get requiresSplitEdgeRight(){return!this._right.isOriginalDirection}get edgeDirection(){return this._edgeDirection}_initialize(){this._initializeNeighbors(),this._initializePlane(),this._initializeDistanceConstraints()}_initializeNeighbors(){var t,i,e,s;const n=this._toXYZ(this.edge.leftVertex.pos),r=this._toXYZ(null==(t=this.edge.leftVertex.leftEdge)||null==(i=t.leftVertex)?void 0:i.pos),h=this._toXYZ(this.edge.rightVertex.pos),o=this._toXYZ(null==(e=this.edge.rightVertex.rightEdge)||null==(s=e.rightVertex)?void 0:s.pos);this._edgeDirection=a(u(),n,h),this._left=this._computeNeighbor(n,r,this._edgeDirection),this._right=this._computeNeighbor(h,o,this._edgeDirection)}_toXYZ(t){return i(t)?this.helper.toXYZ(t):null}_computeNeighbor(t,i,s){if(e(i))return{start:t,end:i,direction:m(-s[1],s[0],0),isOriginalDirection:!0};const n=a(u(),t,i),r=!this._passesBisectingAngleThreshold(n,s);return{start:t,end:i,direction:r?this._bisectVectorsPerpendicular(s,n):n,isOriginalDirection:!r}}_passesBisectingAngleThreshold(t,i){const e=Math.abs(M(i,t));return e>=Y&&e<=Math.PI-Y}_bisectVectorsPerpendicular(t,i){const e=o(t,i)<0?t:c(u(),t),s=Math.abs(o(e,i));if(!(s<.001||s>.999))return this._bisectDirection(e,i);const n=_(u(),e,[0,0,1]);return l(n,n)}_bisectDirection(t,i){const e=p(u(),t,i);return l(e,e)}_initializePlane(){const t=this._computeNormalDirection(this._left),i=this._computeNormalDirection(this._right);o(t,i)<0&&c(i,i),E(this._left.start,this._bisectDirection(t,i),this._plane)}_computeNormalDirection(t){const i=_(u(),t.direction,this._edgeDirection);l(i,i);const e=_(u(),this._edgeDirection,i);return this.planeType===T.XY&&(e[2]=0),l(e,e)}_initializeDistanceConstraints(){i(this._left.end)&&!this.requiresSplitEdgeLeft&&this._updateDistanceConstraint(x(this._plane,this._left.end)),i(this._right.end)&&!this.requiresSplitEdgeRight&&this._updateDistanceConstraint(x(this._plane,this._right.end)),this._updateIntersectDistanceConstraint(this._plane)}_updateDistanceConstraint(t){t<=0&&(this._minDistance=Math.max(this._minDistance,t)),t>=0&&(this._maxDistance=Math.min(this._maxDistance,t))}_updateIntersectDistanceConstraint(t){const i=V(t),e=this._edgeDirection,a=p(u(),this._left.start,this._left.direction),o=p(u(),this._right.start,this._right.direction),c=this._pointInBasis2D(h(),i,e,this._left.start),_=this._pointInBasis2D(h(),i,e,a),l=this._pointInBasis2D(h(),i,e,this._right.start),g=this._pointInBasis2D(h(),i,e,o),[f]=N({start:_,end:c,type:P.LINE},{start:g,end:l,type:P.LINE});if(!f)return;const m=s(h(),c,_);n(m,m);const D=s(h(),f,_),E=r(m,D),b=p(u(),a,d(u(),this._left.direction,-E)),I=x(t,b);this._updateDistanceConstraint(I)}_pointInBasis2D(t,i,e,s){return t[0]=y(i,s),t[1]=y(e,s),t}_offset(t,e){Number.isFinite(this._minDistance)&&(e=Math.max(this._minDistance,e)),Number.isFinite(this._maxDistance)&&(e=Math.min(this._maxDistance,e)),b(this._offsetPlane,this._plane),this._offsetPlane[3]-=e;const s=(t,e,s)=>i(e)&&I(this._offsetPlane,t,p(u(),t,e),s),n=u();(t===this.edge.leftVertex?s(this._left.start,this._left.direction,n):s(this._right.start,this._right.direction,n))&&this.helper.copy(this.helper.fromXYZ(n,void 0,this.helper.getM(t.pos)),t.pos)}signedDistanceToPoint(t){return x(this.plane,this.helper.toXYZ(this.helper.pointToVector(t)))}apply(t){this._offset(t,this.distance)}undo(t){this._offset(t,0)}canAccumulate(t){return t instanceof X&&this.edge.leftVertex.index===t.edge.leftVertex.index&&this.edge.rightVertex.index===t.edge.rightVertex.index&&this.edge.component===t.edge.component&&this._maybeEqualsVec3(this._left.direction,t._left.direction)&&this._maybeEqualsVec3(this._right.direction,t._right.direction)&&g(V(this._plane),V(t._plane))}accumulate(t,i){const e=this._plane[3]-i._plane[3]+i.distance;this._offset(t,e)}accumulateParams(t){const i=t.distance-t._plane[3];this.distance=i+this._plane[3]}clone(){const t=new X(this.helper,this.planeType,this.edge,this.distance,v.DEFERRED);return b(t._plane,this._plane),b(t._offsetPlane,this._offsetPlane),t._maxDistance=this._maxDistance,t._minDistance=this._minDistance,t._left=this._cloneNeighbor(this._left),t._right=this._cloneNeighbor(this._right),t._edgeDirection=f(u(),this._edgeDirection),t}_maybeEqualsVec3(t,s){return e(t)&&e(s)||i(t)&&i(s)&&g(t,s)}_cloneNeighbor({start:t,end:e,direction:s,isOriginalDirection:n}){return{start:f(u(),t),end:i(e)?f(u(),e):null,direction:f(u(),s),isOriginalDirection:n}}}const Y=t(15);var T,v;!function(t){t[t.XYZ=0]="XYZ",t[t.XY=1]="XY"}(T||(T={})),function(t){t[t.IMMEDIATE=0]="IMMEDIATE",t[t.DEFERRED=1]="DEFERRED"}(v||(v={}));export{X as OffsetEdgeVertex,T as PlaneType};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import s from"../../core/Accessor.js";import t from"../../core/Handles.js";import{isNone as i}from"../../core/maybe.js";import{watch as n,on as d,sync as r}from"../../core/reactiveUtils.js";import{schedule as a}from"../../core/scheduling.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import{subclass as h}from"../../core/accessorSupport/decorators/subclass.js";let c=class extends s{constructor(){super(...arguments),this.updating=!1,this.handleId=0,this.handles=new t,this.scheduleHandleId=0,this.pendingPromises=new Set}destroy(){this.removeAll(),this.handles.destroy()}add(e,s,t={}){const i=++this.handleId;t.sync||this._installSyncUpdatingWatch(e,i);const d=n(e,s,t);return this.handles.add(d,i),{remove:()=>this.handles.remove(i)}}addOnCollectionChange(e,s,{initial:t=!1}={}){const i=++this.handleId;return this.handles.add([d(e,"after-changes",this._createSyncUpdatingCallback(),r),d(e,"change",s,{onListenerAdd:t?e=>s({added:e.items,removed:[],moved:[],target:e}):void 0})],i),{remove:()=>this.handles.remove(i)}}addPromise(e){if(i(e))return e;const s=++this.handleId;this.handles.add({remove:()=>{this.pendingPromises.delete(e)&&(0!==this.pendingPromises.size||this.handles.has(l)||this._set("updating",!1))}},s),this.pendingPromises.add(e),this._set("updating",!0);const t=()=>this.handles.remove(s);return e.then(t,t),e}removeAll(){this.pendingPromises.clear(),this.handles.removeAll(),this._set("updating",!1)}_installSyncUpdatingWatch(e,s){const t=this._createSyncUpdatingCallback(),i=n(e,t,{sync:!0,equals:()=>!1});return this.handles.add(i,s),i}_createSyncUpdatingCallback(){return()=>{this.handles.remove(l),++this.scheduleHandleId;const e=this.scheduleHandleId;this._get("updating")||this._set("updating",!0),this.handles.add(a((()=>{e===this.scheduleHandleId&&(this._set("updating",this.pendingPromises.size>0),this.handles.remove(l))})),l)}}};e([o({readOnly:!0})],c.prototype,"updating",void 0),c=e([h("esri.views.support.WatchUpdatingTracking")],c);const l=-42;var p;!function(e){e[e.NONE=0]="NONE",e[e.SYNC=1]="SYNC",e[e.INIT=2]="INIT"}(p||(p={}));export{p as WatchFlags,c as WatchUpdatingTracking};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import s from"../../core/Accessor.js";import t from"../../core/Handles.js";import{isNone as i}from"../../core/maybe.js";import{watch as n,on as d,sync as r}from"../../core/reactiveUtils.js";import{schedule as a}from"../../core/scheduling.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import{subclass as h}from"../../core/accessorSupport/decorators/subclass.js";let c=class extends s{constructor(){super(...arguments),this.updating=!1,this.handleId=0,this.handles=new t,this.scheduleHandleId=0,this.pendingPromises=new Set}destroy(){this.removeAll(),this.handles.destroy()}add(e,s,t={}){const i=++this.handleId;t.sync||this._installSyncUpdatingWatch(e,i);const d=n(e,s,t);return this.handles.add(d,i),{remove:()=>this.handles.remove(i)}}addOnCollectionChange(e,s,{initial:t=!1}={}){const i=++this.handleId;return this.handles.add([d(e,"after-changes",this._createSyncUpdatingCallback(),r),d(e,"change",s,{onListenerAdd:t?e=>s({added:e.toArray(),removed:[]}):void 0})],i),{remove:()=>this.handles.remove(i)}}addPromise(e){if(i(e))return e;const s=++this.handleId;this.handles.add({remove:()=>{this.pendingPromises.delete(e)&&(0!==this.pendingPromises.size||this.handles.has(l)||this._set("updating",!1))}},s),this.pendingPromises.add(e),this._set("updating",!0);const t=()=>this.handles.remove(s);return e.then(t,t),e}removeAll(){this.pendingPromises.clear(),this.handles.removeAll(),this._set("updating",!1)}_installSyncUpdatingWatch(e,s){const t=this._createSyncUpdatingCallback(),i=n(e,t,{sync:!0,equals:()=>!1});return this.handles.add(i,s),i}_createSyncUpdatingCallback(){return()=>{this.handles.remove(l),++this.scheduleHandleId;const e=this.scheduleHandleId;this._get("updating")||this._set("updating",!0),this.handles.add(a((()=>{e===this.scheduleHandleId&&(this._set("updating",this.pendingPromises.size>0),this.handles.remove(l))})),l)}}};e([o({readOnly:!0})],c.prototype,"updating",void 0),c=e([h("esri.views.support.WatchUpdatingTracking")],c);const l=-42;var p;!function(e){e[e.NONE=0]="NONE",e[e.SYNC=1]="SYNC",e[e.INIT=2]="INIT"}(p||(p={}));export{p as WatchFlags,c as WatchUpdatingTracking};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../core/Logger.js";import{isSome as e}from"../../core/maybe.js";import{isUint16Array as i,isUint32Array as s}from"../../core/typedArrayUtil.js";import{checkWebGLError as r}from"./checkWebGLError.js";import{ContextType as n}from"./context-util.js";import{BufferType as f,ResourceType as o,Usage as _,DataType as h}from"./enums.js";const a=t.getLogger("esri.views.webgl.BufferObject");class u{constructor(t,e,i,s){this._context=t,this.bufferType=e,this.usage=i,this._glName=null,this._size=-1,this._indexType=void 0,t.instanceCounter.increment(o.Buffer,this),this._glName=this._context.gl.createBuffer(),r(this._context.gl),s&&this.setData(s)}static createIndex(t,e,i){return new u(t,f.ELEMENT_ARRAY_BUFFER,e,i)}static createVertex(t,e,i){return new u(t,f.ARRAY_BUFFER,e,i)}static createUniform(t,e,i){return new u(t,f.UNIFORM_BUFFER,e,i)}static createPixelPack(t,e=_.STREAM_READ,i){const s=new u(t,f.PIXEL_PACK_BUFFER,e);return i&&s.setSize(i),s}static createPixelUnpack(t,e=_.STREAM_DRAW,i){return new u(t,f.PIXEL_UNPACK_BUFFER,e,i)}get glName(){return this._glName}get size(){return this._size}get indexType(){return this._indexType}get byteSize(){return this.bufferType===f.ELEMENT_ARRAY_BUFFER?this._indexType===h.UNSIGNED_INT?4*this._size:2*this._size:this._size}get _isVAOAware(){return this.bufferType===f.ELEMENT_ARRAY_BUFFER||this.bufferType===f.ARRAY_BUFFER}dispose(){var t;if(null!=(t=this._context)&&t.gl){if(this._glName){this._context.gl.deleteBuffer(this._glName),this._glName=null}this._context.instanceCounter.decrement(o.Buffer,this),this._context=null}else this._glName&&a.warn("Leaked WebGL buffer object")}setSize(t,i=null){if(t<=0&&a.error("Buffer size needs to be positive!"),this.bufferType===f.ELEMENT_ARRAY_BUFFER&&e(i))switch(this._indexType=i,i){case h.UNSIGNED_SHORT:t*=2;break;case h.UNSIGNED_INT:t*=4}this._setBufferData(t)}setData(t){if(!t)return;let e=t.byteLength;this.bufferType===f.ELEMENT_ARRAY_BUFFER&&(i(t)&&(e/=2,this._indexType=h.UNSIGNED_SHORT),s(t)&&(e/=4,this._indexType=h.UNSIGNED_INT)),this._setBufferData(e,t)}_setBufferData(t,i=null){this._size=t;const s=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const n=this._context.gl;e(i)?n.bufferData(this.bufferType,i,this.usage):n.bufferData(this.bufferType,t,this.usage),r(n),this._isVAOAware&&this._context.bindVAO(s)}setSubData(t,e=0,n=0,o=t.byteLength){if(!t)return;(e<0||e>=this._size)&&a.error("offset is out of range!");let _=e,h=n,u=o,c=t.byteLength;this.bufferType===f.ELEMENT_ARRAY_BUFFER&&(i(t)?(c/=2,_*=2,h*=2,u*=2):s(t)&&(c/=4,_*=4,h*=4,u*=4)),void 0===o&&(o=c-1),n>=o&&a.error("end must be bigger than start!"),e+n-o>this._size&&a.error("An attempt to write beyond the end of the buffer!");const b=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const E=this._context.gl,A=ArrayBuffer.isView(t)?t.buffer:t,l=0===h&&u===t.byteLength?A:A.slice(h,u);E.bufferSubData(this.bufferType,_,l),r(E),this._isVAOAware&&this._context.bindVAO(b)}setSubDataFromView(t,e,i,s){if(!t)return;(e<0||e>=this._size)&&a.error("offset is out of range!"),i>=s&&a.error("end must be bigger than start!"),e+i-s>this._size&&a.error("An attempt to write beyond the end of the buffer!");const f=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const o=this._context.gl;if(this._context.type===n.WEBGL2)o.bufferSubData(this.bufferType,e*t.BYTES_PER_ELEMENT,t,i,s-i);else{const r=0===i&&s===t.length?t:t.subarray(i,s);o.bufferSubData(this.bufferType,e*t.BYTES_PER_ELEMENT,r)}r(o),this._isVAOAware&&this._context.bindVAO(f)}getSubData(t,e=0,i,s){if(this._context.type!==n.WEBGL2)return void a.error("Get buffer subdata is only supported in WebGL2!");const r=this._context.gl;this._context.bindBuffer(this,f.COPY_READ_BUFFER),r.getBufferSubData(f.COPY_READ_BUFFER,e,t,i,s),this._context.unbindBuffer(f.COPY_READ_BUFFER)}async getSubDataAsync(t,e=0,i,s){this._context.type===n.WEBGL2?(await this._context.clientWaitAsync(),this.getSubData(t,e,i,s)):a.error("Get buffer subdata is only supported in WebGL2!")}}export{u as BufferObject};
5
+ import{isArrayLike as e}from"../../core/arrayUtils.js";import t from"../../core/Logger.js";import{isSome as r}from"../../core/maybe.js";import{isUint16Array as i,isUint32Array as s}from"../../core/typedArrayUtil.js";import{checkWebGLError as n}from"./checkWebGLError.js";import{ContextType as o}from"./context-util.js";import{BufferType as f,ResourceType as a,Usage as u,DataType as h}from"./enums.js";const _=t.getLogger("esri.views.webgl.BufferObject");function b(t){return e(t)}class c{constructor(e,t,r,i){this._context=e,this.bufferType=t,this.usage=r,this._glName=null,this._size=-1,this._indexType=void 0,e.instanceCounter.increment(a.Buffer,this),this._glName=this._context.gl.createBuffer(),n(this._context.gl),i&&this.setData(i)}static createIndex(e,t,r){return new c(e,f.ELEMENT_ARRAY_BUFFER,t,r)}static createVertex(e,t,r){return new c(e,f.ARRAY_BUFFER,t,r)}static createUniform(e,t,r){if(e.type!==o.WEBGL2)throw new Error("Uniform buffers are supported in WebGL2 only!");return new c(e,f.UNIFORM_BUFFER,t,r)}static createPixelPack(e,t=u.STREAM_READ,r){if(e.type!==o.WEBGL2)throw new Error("Pixel pack buffers are supported in WebGL2 only!");const i=new c(e,f.PIXEL_PACK_BUFFER,t);return r&&i.setSize(r),i}static createPixelUnpack(e,t=u.STREAM_DRAW,r){if(e.type!==o.WEBGL2)throw new Error("Pixel unpack buffers are supported in WebGL2 only!");return new c(e,f.PIXEL_UNPACK_BUFFER,t,r)}get glName(){return this._glName}get size(){return this._size}get indexType(){return this._indexType}get byteSize(){return this.bufferType===f.ELEMENT_ARRAY_BUFFER?this._indexType===h.UNSIGNED_INT?4*this._size:2*this._size:this._size}get _isVAOAware(){return this.bufferType===f.ELEMENT_ARRAY_BUFFER||this.bufferType===f.ARRAY_BUFFER}dispose(){var e;if(null!=(e=this._context)&&e.gl){if(this._glName){this._context.gl.deleteBuffer(this._glName),this._glName=null}this._context.instanceCounter.decrement(a.Buffer,this),this._context=null}else this._glName&&_.warn("Leaked WebGL buffer object")}setSize(e,t=null){if(e<=0&&_.error("Buffer size needs to be positive!"),this.bufferType===f.ELEMENT_ARRAY_BUFFER&&r(t))switch(this._indexType=t,t){case h.UNSIGNED_SHORT:e*=2;break;case h.UNSIGNED_INT:e*=4}this._setBufferData(e)}setData(e){if(!e)return;let t=e.byteLength;this.bufferType===f.ELEMENT_ARRAY_BUFFER&&(i(e)&&(t/=2,this._indexType=h.UNSIGNED_SHORT),s(e)&&(t/=4,this._indexType=h.UNSIGNED_INT)),this._setBufferData(t,e)}_setBufferData(e,t=null){this._size=e;const i=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const s=this._context.gl;r(t)?s.bufferData(this.bufferType,t,this.usage):s.bufferData(this.bufferType,e,this.usage),n(s),this._isVAOAware&&this._context.bindVAO(i)}setSubData(e,t=0,r=0,o=e.byteLength){if(!e)return;(t<0||t>=this._size)&&_.error("offset is out of range!");let a=t,u=r,h=o,b=e.byteLength;this.bufferType===f.ELEMENT_ARRAY_BUFFER&&(i(e)?(b/=2,a*=2,u*=2,h*=2):s(e)&&(b/=4,a*=4,u*=4,h*=4)),void 0===o&&(o=b-1),r>=o&&_.error("end must be bigger than start!"),t+r-o>this._size&&_.error("An attempt to write beyond the end of the buffer!");const c=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const E=this._context.gl,l=ArrayBuffer.isView(e)?e.buffer:e,d=0===u&&h===e.byteLength?l:l.slice(u,h);E.bufferSubData(this.bufferType,a,d),n(E),this._isVAOAware&&this._context.bindVAO(c)}setSubDataFromView(e,t,r,i){if(!e)return;(t<0||t>=this._size)&&_.error("offset is out of range!"),r>=i&&_.error("end must be bigger than start!"),t+r-i>this._size&&_.error("An attempt to write beyond the end of the buffer!");const s=this._context.getBoundVAO();this._isVAOAware&&this._context.bindVAO(null),this._context.bindBuffer(this);const f=this._context.gl;if(this._context.type===o.WEBGL2)f.bufferSubData(this.bufferType,t*e.BYTES_PER_ELEMENT,e,r,i-r);else{const s=0===r&&i===e.length?e:e.subarray(r,i);f.bufferSubData(this.bufferType,t*e.BYTES_PER_ELEMENT,s)}n(f),this._isVAOAware&&this._context.bindVAO(s)}getSubData(e,t=0,r,i){if(this._context.type!==o.WEBGL2)return void _.error("Get buffer subdata is supported in WebGL2 only!");if(r<0||i<0)return void _.error("Problem getting subdata: offset and length were less than zero!");const s=b(e)?e.BYTES_PER_ELEMENT:1;if(s*((null!=r?r:0)+(null!=i?i:0))>e.byteLength)return void _.error("Problem getting subdata: offset and length exceeded destination size!");t+s*(null!=i?i:0)>this.byteSize&&_.warn("Potential problem getting subdata: requested data exceeds buffer size!");const n=this._context.gl;this._context.bindBuffer(this,f.COPY_READ_BUFFER),n.getBufferSubData(f.COPY_READ_BUFFER,t,e,r,i),this._context.unbindBuffer(f.COPY_READ_BUFFER)}async getSubDataAsync(e,t=0,r,i){this._context.type===o.WEBGL2?(await this._context.clientWaitAsync(),this.getSubData(e,t,r,i)):_.error("Get buffer subdata is supported in WebGL2 only!")}}export{c as BufferObject};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{AllocationTracer as t}from"../support/AllocationTracer.js";import{ResourceType as r}from"./enums.js";const e=!1;class s{constructor(){for(this._current=new Array,this._max=new Array,this._allocations=new t(e);this._current.length<r.COUNT;)this._current.push(0),this._max.push(0)}resetMax(){for(this._max.length=0;this._max.length<this._current.length;)this._max.push(0)}increment(t,r){const e=++this._current[t];this._max[t]=Math.max(e,this._max[t]),this._allocations.add(r)}decrement(t,r){--this._current[t],this._allocations.remove(r)}get max(){return this._max}get current(){return this._current}get total(){return this.current.reduce(((t,r)=>t+r),0)}printResourceCount(){if(this.total>0){console.log("Live objects:");for(let t=0;t<r.COUNT;++t){const e=this._current[t];e>0&&console.log(`${r[t]}: ${e}`)}}this._allocations.print()}}export{s as InstanceCounter};
5
+ import{AllocationTracer as t}from"../support/AllocationTracer.js";import{ResourceType as r}from"./enums.js";class s{constructor(){this.RECORD_ALLOCATIONS=!1}}const e=new s;class n{constructor(){for(this._current=new Array,this._max=new Array,this._allocations=new t(e.RECORD_ALLOCATIONS);this._current.length<r.COUNT;)this._current.push(0),this._max.push(0)}resetMax(){for(this._max.length=0;this._max.length<this._current.length;)this._max.push(0)}increment(t,r){const s=++this._current[t];this._max[t]=Math.max(s,this._max[t]),this._allocations.add(r)}decrement(t,r){--this._current[t],this._allocations.remove(r)}get max(){return this._max}get current(){return this._current}get total(){return this.current.reduce(((t,r)=>t+r),0)}printResourceCount(){if(this.total>0){console.log("Live objects:");for(let t=0;t<r.COUNT;++t){const s=this._current[t];s>0&&console.log(`${r[t]}: ${s}`)}}this._allocations.print()}}export{n as InstanceCounter,e as test};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import"../../core/has.js";import{isSome as t,isNone as o}from"../../core/maybe.js";import{webglValidateShadersEnabled as i}from"./checkWebGLError.js";import{ContextType as n}from"./context-util.js";import{ShaderType as r,ResourceType as e}from"./enums.js";import{transpileShader as s}from"./ShaderTranspiler.js";const m=4294967295;class f{constructor(t,o,i,n,s=new Map){this._context=t,this._locations=n,this._uniformBlockBindings=s,this._refCount=1,this._nameToUniformLocation={},this._nameToUniform1={},this._nameToUniform1v={},this._nameToUniform2={},this._nameToUniform3={},this._nameToUniform4={},this._nameToUniformMatrix3={},this._nameToUniformMatrix4={},t||console.error("RenderingContext isn't initialized!"),0===o.length&&console.error("Shaders source should not be empty!"),this._vShader=h(this._context,r.VERTEX_SHADER,o),this._fShader=h(this._context,r.FRAGMENT_SHADER,i),this._vShader&&this._fShader||console.error("Error loading shaders!"),this._context.instanceCounter.increment(e.Shader,this)}get glName(){if(t(this._glName))return this._glName;if(o(this._vShader))return null;const r=this._context.gl,s=r.createProgram();if(r.attachShader(s,this._vShader),r.attachShader(s,this._fShader),this._locations.forEach(((t,o)=>r.bindAttribLocation(s,t,o))),r.linkProgram(s),i()&&!r.getProgramParameter(s,r.LINK_STATUS)&&console.error(`Could not link shader\nvalidated: ${r.getProgramParameter(s,r.VALIDATE_STATUS)}, gl error ${r.getError()}, vertex: ${r.getShaderParameter(this._vShader,r.COMPILE_STATUS)}, fragment: ${r.getShaderParameter(this._fShader,r.COMPILE_STATUS)}, info log: ${r.getProgramInfoLog(s)}`),this._context.type===n.WEBGL2){const t=r;for(const[o,i]of this._uniformBlockBindings){const n=t.getUniformBlockIndex(s,o);n<m&&t.uniformBlockBinding(s,n,i)}}return this._glName=s,this._context.instanceCounter.increment(e.Program,this),s}get hasGLName(){return t(this._glName)}dispose(){if(--this._refCount>0)return;const t=this._context.gl;this._vShader&&(t.deleteShader(this._vShader),this._vShader=null,this._context.instanceCounter.decrement(e.Shader,this)),this._fShader&&(t.deleteShader(this._fShader),this._fShader=null),this._glName&&(t.deleteProgram(this._glName),this._glName=null,this._context.instanceCounter.decrement(e.Program,this))}ref(){++this._refCount}_getUniformLocation(t){return void 0===this._nameToUniformLocation[t]&&(this._nameToUniformLocation[t]=this._context.gl.getUniformLocation(this.glName,t)),this._nameToUniformLocation[t]}hasUniform(t){return null!==this._getUniformLocation(t)}setUniform1i(t,o){const i=this._nameToUniform1[t];if(void 0===i||o!==i){this._context.gl.uniform1i(this._getUniformLocation(t),o),this._nameToUniform1[t]=o}}setUniform1iv(t,o){const i=this._nameToUniform1v[t];if(a(i,o)){this._context.gl.uniform1iv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform1v[t]=Array.from(o):g(o,i)}}setUniform2iv(t,o){const i=this._nameToUniform2[t];if(a(i,o)){this._context.gl.uniform2iv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform2[t]=Array.from(o):g(o,i)}}setUniform3iv(t,o){const i=this._nameToUniform3[t];if(a(i,o)){this._context.gl.uniform3iv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform3[t]=Array.from(o):g(o,i)}}setUniform4iv(t,o){const i=this._nameToUniform4[t];if(a(i,o)){this._context.gl.uniform4iv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform4[t]=Array.from(o):g(o,i)}}setUniform1f(t,o){const i=this._nameToUniform1[t];if(void 0===i||o!==i){this._context.gl.uniform1f(this._getUniformLocation(t),o),this._nameToUniform1[t]=o}}setUniform1fv(t,o){const i=this._nameToUniform1v[t];if(a(i,o)){this._context.gl.uniform1fv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform1v[t]=Array.from(o):g(o,i)}}setUniform2f(t,o,i){const n=this._nameToUniform2[t];if(void 0===n||o!==n[0]||i!==n[1]){this._context.gl.uniform2f(this._getUniformLocation(t),o,i),void 0===n?this._nameToUniform2[t]=[o,i]:(n[0]=o,n[1]=i)}}setUniform2fv(t,o){const i=this._nameToUniform2[t];if(a(i,o)){this._context.gl.uniform2fv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform2[t]=Array.from(o):g(o,i)}}setUniform3f(t,o,i,n){const r=this._nameToUniform3[t];if(void 0===r||o!==r[0]||i!==r[1]||n!==r[2]){this._context.gl.uniform3f(this._getUniformLocation(t),o,i,n),void 0===r?this._nameToUniform3[t]=[o,i,n]:(r[0]=o,r[1]=i,r[2]=n)}}setUniform3fv(t,o){const i=this._nameToUniform3[t];if(a(i,o)){this._context.gl.uniform3fv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform3[t]=Array.from(o):g(o,i)}}setUniform4f(t,o,i,n,r){const e=this._nameToUniform4[t];if(void 0===e||o!==e[0]||i!==e[1]||n!==e[2]||r!==e[3]){this._context.gl.uniform4f(this._getUniformLocation(t),o,i,n,r),void 0===e?this._nameToUniform4[t]=[o,i,n,r]:(e[0]=o,e[1]=i,e[2]=n,e[3]=r)}}setUniform4fv(t,o){const i=this._nameToUniform4[t];if(a(i,o)){this._context.gl.uniform4fv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform4[t]=Array.from(o):g(o,i)}}setUniformMatrix3fv(t,o,i=!1){const n=this._nameToUniformMatrix3[t];if(l(n,o)){this._context.gl.uniformMatrix3fv(this._getUniformLocation(t),i,o),void 0===n?this._nameToUniformMatrix3[t]=Array.from(o):g(o,n)}}setUniformMatrix4fv(t,o,i=!1){const n=this._nameToUniformMatrix4[t];if(U(n,o)){this._context.gl.uniformMatrix4fv(this._getUniformLocation(t),i,o),void 0===n?this._nameToUniformMatrix4[t]=Array.from(o):g(o,n)}}stop(){}}function a(t,i){if(o(t)||t.length!==i.length)return!0;for(let o=0;o<t.length;++o)if(t[o]!==i[o])return!0;return!1}function h(t,o,e){const m=t.type===n.WEBGL2?s(e,o):e,f=t.gl,a=f.createShader(o);return f.shaderSource(a,m),f.compileShader(a),i()&&!f.getShaderParameter(a,f.COMPILE_STATUS)&&(console.error("Compile error in ".concat(o===r.VERTEX_SHADER?"vertex":"fragment"," shader")),console.error(f.getShaderInfoLog(a)),console.error(c(m)),t.type===n.WEBGL2&&(console.log("Shader source before transpilation:"),console.log(e))),a}function c(t){let o=2;return t.replace(/\n/g,(()=>"\n"+_(o++)+":"))}function _(t){return t>=1e3?t.toString():(" "+t).slice(-3)}function g(t,o){for(let i=0;i<t.length;++i)o[i]=t[i]}function l(t,i){return!!o(t)||(9!==t.length?a(t,i):9!==t.length||t[0]!==i[0]||t[1]!==i[1]||t[2]!==i[2]||t[3]!==i[3]||t[4]!==i[4]||t[5]!==i[5]||t[6]!==i[6]||t[7]!==i[7]||t[8]!==i[8])}function U(t,i){return!!o(t)||(16!==t.length?a(t,i):16!==t.length||t[0]!==i[0]||t[1]!==i[1]||t[2]!==i[2]||t[3]!==i[3]||t[4]!==i[4]||t[5]!==i[5]||t[6]!==i[6]||t[7]!==i[7]||t[8]!==i[8]||t[9]!==i[9]||t[10]!==i[10]||t[11]!==i[11]||t[12]!==i[12]||t[13]!==i[13]||t[14]!==i[14]||t[15]!==i[15])}export{f as Program};
5
+ import"../../core/has.js";import{isSome as t,isNone as o}from"../../core/maybe.js";import{webglValidateShadersEnabled as i}from"./checkWebGLError.js";import{ContextType as n}from"./context-util.js";import{ShaderType as r,ResourceType as e}from"./enums.js";import{transpileShader as s}from"./ShaderTranspiler.js";const m=4294967295;class a{constructor(t,o,m,a,f=new Map){this._context=t,this._locations=a,this._uniformBlockBindings=f,this._refCount=1,this._nameToUniformLocation={},this._nameToUniform1={},this._nameToUniform1v={},this._nameToUniform2={},this._nameToUniform3={},this._nameToUniform4={},this._nameToUniformMatrix3={},this._nameToUniformMatrix4={},t||console.error("RenderingContext isn't initialized!"),0===o.length&&console.error("Shaders source should not be empty!"),this._context.type===n.WEBGL2&&(o=s(o,r.VERTEX_SHADER),m=s(m,r.FRAGMENT_SHADER)),this._vShader=h(this._context,r.VERTEX_SHADER,o),this._fShader=h(this._context,r.FRAGMENT_SHADER,m),this._vShader&&this._fShader||console.error("Error loading shaders!"),this._context.instanceCounter.increment(e.Shader,this),i()&&(this.vertexShader=o,this.fragmentShader=m)}get glName(){if(t(this._glName))return this._glName;if(o(this._vShader))return null;const r=this._context.gl,s=r.createProgram();if(r.attachShader(s,this._vShader),r.attachShader(s,this._fShader),this._locations.forEach(((t,o)=>r.bindAttribLocation(s,t,o))),r.linkProgram(s),i()&&!r.getProgramParameter(s,r.LINK_STATUS)&&console.error(`Could not link shader\nvalidated: ${r.getProgramParameter(s,r.VALIDATE_STATUS)}, gl error ${r.getError()}, vertex: ${r.getShaderParameter(this._vShader,r.COMPILE_STATUS)}, fragment: ${r.getShaderParameter(this._fShader,r.COMPILE_STATUS)}, info log: ${r.getProgramInfoLog(s)}, vertex source: ${this.vertexShader}, fragment source: ${this.fragmentShader}`),this._context.type===n.WEBGL2){const t=r;for(const[o,i]of this._uniformBlockBindings){const n=t.getUniformBlockIndex(s,o);n<m&&t.uniformBlockBinding(s,n,i)}}return this._glName=s,this._context.instanceCounter.increment(e.Program,this),s}get hasGLName(){return t(this._glName)}dispose(){if(--this._refCount>0)return;const t=this._context.gl;this._vShader&&(t.deleteShader(this._vShader),this._vShader=null,this._context.instanceCounter.decrement(e.Shader,this)),this._fShader&&(t.deleteShader(this._fShader),this._fShader=null),this._glName&&(t.deleteProgram(this._glName),this._glName=null,this._context.instanceCounter.decrement(e.Program,this))}ref(){++this._refCount}_getUniformLocation(t){return void 0===this._nameToUniformLocation[t]&&(this._nameToUniformLocation[t]=this._context.gl.getUniformLocation(this.glName,t)),this._nameToUniformLocation[t]}hasUniform(t){return null!==this._getUniformLocation(t)}setUniform1i(t,o){const i=this._nameToUniform1[t];if(void 0===i||o!==i){this._context.gl.uniform1i(this._getUniformLocation(t),o),this._nameToUniform1[t]=o}}setUniform1iv(t,o){const i=this._nameToUniform1v[t];if(f(i,o)){this._context.gl.uniform1iv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform1v[t]=Array.from(o):g(o,i)}}setUniform2iv(t,o){const i=this._nameToUniform2[t];if(f(i,o)){this._context.gl.uniform2iv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform2[t]=Array.from(o):g(o,i)}}setUniform3iv(t,o){const i=this._nameToUniform3[t];if(f(i,o)){this._context.gl.uniform3iv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform3[t]=Array.from(o):g(o,i)}}setUniform4iv(t,o){const i=this._nameToUniform4[t];if(f(i,o)){this._context.gl.uniform4iv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform4[t]=Array.from(o):g(o,i)}}setUniform1f(t,o){const i=this._nameToUniform1[t];if(void 0===i||o!==i){this._context.gl.uniform1f(this._getUniformLocation(t),o),this._nameToUniform1[t]=o}}setUniform1fv(t,o){const i=this._nameToUniform1v[t];if(f(i,o)){this._context.gl.uniform1fv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform1v[t]=Array.from(o):g(o,i)}}setUniform2f(t,o,i){const n=this._nameToUniform2[t];if(void 0===n||o!==n[0]||i!==n[1]){this._context.gl.uniform2f(this._getUniformLocation(t),o,i),void 0===n?this._nameToUniform2[t]=[o,i]:(n[0]=o,n[1]=i)}}setUniform2fv(t,o){const i=this._nameToUniform2[t];if(f(i,o)){this._context.gl.uniform2fv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform2[t]=Array.from(o):g(o,i)}}setUniform3f(t,o,i,n){const r=this._nameToUniform3[t];if(void 0===r||o!==r[0]||i!==r[1]||n!==r[2]){this._context.gl.uniform3f(this._getUniformLocation(t),o,i,n),void 0===r?this._nameToUniform3[t]=[o,i,n]:(r[0]=o,r[1]=i,r[2]=n)}}setUniform3fv(t,o){const i=this._nameToUniform3[t];if(f(i,o)){this._context.gl.uniform3fv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform3[t]=Array.from(o):g(o,i)}}setUniform4f(t,o,i,n,r){const e=this._nameToUniform4[t];if(void 0===e||o!==e[0]||i!==e[1]||n!==e[2]||r!==e[3]){this._context.gl.uniform4f(this._getUniformLocation(t),o,i,n,r),void 0===e?this._nameToUniform4[t]=[o,i,n,r]:(e[0]=o,e[1]=i,e[2]=n,e[3]=r)}}setUniform4fv(t,o){const i=this._nameToUniform4[t];if(f(i,o)){this._context.gl.uniform4fv(this._getUniformLocation(t),o),void 0===i?this._nameToUniform4[t]=Array.from(o):g(o,i)}}setUniformMatrix3fv(t,o,i=!1){const n=this._nameToUniformMatrix3[t];if(l(n,o)){this._context.gl.uniformMatrix3fv(this._getUniformLocation(t),i,o),void 0===n?this._nameToUniformMatrix3[t]=Array.from(o):g(o,n)}}setUniformMatrix4fv(t,o,i=!1){const n=this._nameToUniformMatrix4[t];if(U(n,o)){this._context.gl.uniformMatrix4fv(this._getUniformLocation(t),i,o),void 0===n?this._nameToUniformMatrix4[t]=Array.from(o):g(o,n)}}stop(){}}function f(t,i){if(o(t)||t.length!==i.length)return!0;for(let o=0;o<t.length;++o)if(t[o]!==i[o])return!0;return!1}function h(t,o,e){const s=t.gl,m=s.createShader(o);return s.shaderSource(m,e),s.compileShader(m),i()&&!s.getShaderParameter(m,s.COMPILE_STATUS)&&(console.error("Compile error in ".concat(o===r.VERTEX_SHADER?"vertex":"fragment"," shader")),console.error(s.getShaderInfoLog(m)),console.error(c(e)),t.type===n.WEBGL2&&(console.log("Shader source before transpilation:"),console.log(e))),m}function c(t){let o=2;return t.replace(/\n/g,(()=>"\n"+_(o++)+":"))}function _(t){return t>=1e3?t.toString():(" "+t).slice(-3)}function g(t,o){for(let i=0;i<t.length;++i)o[i]=t[i]}function l(t,i){return!!o(t)||(9!==t.length?f(t,i):9!==t.length||t[0]!==i[0]||t[1]!==i[1]||t[2]!==i[2]||t[3]!==i[3]||t[4]!==i[4]||t[5]!==i[5]||t[6]!==i[6]||t[7]!==i[7]||t[8]!==i[8])}function U(t,i){return!!o(t)||(16!==t.length?f(t,i):16!==t.length||t[0]!==i[0]||t[1]!==i[1]||t[2]!==i[2]||t[3]!==i[3]||t[4]!==i[4]||t[5]!==i[5]||t[6]!==i[6]||t[7]!==i[7]||t[8]!==i[8]||t[9]!==i[9]||t[10]!==i[10]||t[11]!==i[11]||t[12]!==i[12]||t[13]!==i[13]||t[14]!==i[14]||t[15]!==i[15])}export{a as Program};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as r}from"../../chunks/tslib.es6.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as t}from"../../core/accessorSupport/decorators/subclass.js";var e;let p=e=class extends o{constructor(){super(...arguments),this.url=""}destroy(){this.url=""}clone(){return new e({url:this.url})}};r([s({type:String,json:{write:{isRequired:!0}}})],p.prototype,"url",void 0),p=e=r([t("esri.webdoc.support.Thumbnail")],p);const c=p;export{c as default};
5
+ import{_ as r}from"../../chunks/tslib.es6.js";import{JSONSupport as o}from"../../core/JSONSupport.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as e}from"../../core/accessorSupport/decorators/subclass.js";var t;let p=t=class extends o{constructor(){super(...arguments),this.url=""}destroy(){this.url=""}clone(){return new t({url:this.url})}};r([s({type:String,json:{write:{isRequired:!0}}})],p.prototype,"url",void 0),p=t=r([e("esri.webdoc.support.SlideThumbnail")],p);export{p as SlideThumbnail};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../TimeExtent.js";import o from"../Viewpoint.js";import{deprecatedProperty as r}from"../core/deprecate.js";import i from"../core/Error.js";import{IdentifiableMixin as n}from"../core/Identifiable.js";import{JSONSupport as s}from"../core/JSONSupport.js";import{clone as p}from"../core/lang.js";import m from"../core/Logger.js";import{isSome as a,isNone as c}from"../core/maybe.js";import{property as l}from"../core/accessorSupport/decorators/property.js";import{cast as u}from"../core/accessorSupport/decorators/cast.js";import{reader as w}from"../core/accessorSupport/decorators/reader.js";import{subclass as y}from"../core/accessorSupport/decorators/subclass.js";import{writer as h}from"../core/accessorSupport/decorators/writer.js";import{ensureType as d}from"../core/accessorSupport/ensureType.js";import f from"../geometry/Extent.js";import j from"../webdoc/support/Thumbnail.js";var v;const b="esri.webmap.Bookmark",x=m.getLogger(b);let g=v=class extends(n(s)){constructor(e){super(e),this.name=null,this.thumbnail=new j,this.timeExtent=null}set extent(e){r(x,"extent",{replacement:"viewpoint",version:"4.17"}),this._set("viewpoint",new o({targetGeometry:e.clone()})),this._set("extent",e)}castThumbnail(e){return"string"==typeof e?new j({url:e}):d(j,e)}set viewpoint(e){const{targetGeometry:t,scale:o}=e;a(t)&&("extent"===t.type?this._set("extent",t.clone()):"point"===t.type&&c(o)&&x.warn("Bookmark.viewpoint should include 'scale' when its targetGeometry is a point.",e)),this._set("viewpoint",e)}readViewpoint(e,t){const{extent:r,viewpoint:i}=t;return o.fromJSON(i||{targetGeometry:r})}writeViewpoint(e,t,o,r){if(!e)return;const{targetGeometry:n}=e;if(a(n)&&"extent"!==n.type){const e="Bookmark.viewpoint cannot be written to JSON when the viewpoint's targetGeometry is not an extent.";null!=r&&r.messages?r.messages.push(new i("property:unsupported",e)):x.error(e)}else t[o]=e.toJSON()}clone(){return new v(p({name:this.name,thumbnail:this.thumbnail,timeExtent:this.timeExtent,viewpoint:this.viewpoint}))}};e([l({type:f,nonNullable:!0,json:{read:!1,write:{isRequired:!0}}})],g.prototype,"extent",null),e([l({type:String,nonNullable:!0,json:{write:{isRequired:!0}}})],g.prototype,"name",void 0),e([l({type:j,json:{write:{overridePolicy:e=>({enabled:!(!e||!e.url)})}}})],g.prototype,"thumbnail",void 0),e([u("thumbnail")],g.prototype,"castThumbnail",null),e([l({type:t,json:{write:!0}})],g.prototype,"timeExtent",void 0),e([l({type:o,nonNullable:!0,json:{write:!0}})],g.prototype,"viewpoint",null),e([w("viewpoint",["extent","viewpoint"])],g.prototype,"readViewpoint",null),e([h("viewpoint")],g.prototype,"writeViewpoint",null),g=v=e([y(b)],g);const S=g;export{S as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../TimeExtent.js";import o from"../Viewpoint.js";import{deprecatedProperty as r}from"../core/deprecate.js";import i from"../core/Error.js";import{IdentifiableMixin as n}from"../core/Identifiable.js";import{JSONSupport as s}from"../core/JSONSupport.js";import{clone as p}from"../core/lang.js";import m from"../core/Logger.js";import{isSome as a,isNone as c}from"../core/maybe.js";import{property as l}from"../core/accessorSupport/decorators/property.js";import{cast as u}from"../core/accessorSupport/decorators/cast.js";import{reader as w}from"../core/accessorSupport/decorators/reader.js";import{subclass as y}from"../core/accessorSupport/decorators/subclass.js";import{writer as d}from"../core/accessorSupport/decorators/writer.js";import{ensureType as h}from"../core/accessorSupport/ensureType.js";import f from"../geometry/Extent.js";import{SlideThumbnail as j}from"../webdoc/support/SlideThumbnail.js";var v;const b="esri.webmap.Bookmark",x=m.getLogger(b);let g=v=class extends(n(s)){constructor(e){super(e),this.name=null,this.thumbnail=new j,this.timeExtent=null}set extent(e){r(x,"extent",{replacement:"viewpoint",version:"4.17"}),this._set("viewpoint",new o({targetGeometry:e.clone()})),this._set("extent",e)}castThumbnail(e){return"string"==typeof e?new j({url:e}):h(j,e)}set viewpoint(e){const{targetGeometry:t,scale:o}=e;a(t)&&("extent"===t.type?this._set("extent",t.clone()):"point"===t.type&&c(o)&&x.warn("Bookmark.viewpoint should include 'scale' when its targetGeometry is a point.",e)),this._set("viewpoint",e)}readViewpoint(e,t){const{extent:r,viewpoint:i}=t;return o.fromJSON(i||{targetGeometry:r})}writeViewpoint(e,t,o,r){if(!e)return;const{targetGeometry:n}=e;if(a(n)&&"extent"!==n.type){const e="Bookmark.viewpoint cannot be written to JSON when the viewpoint's targetGeometry is not an extent.";null!=r&&r.messages?r.messages.push(new i("property:unsupported",e)):x.error(e)}else t[o]=e.toJSON()}clone(){return new v(p({name:this.name,thumbnail:this.thumbnail,timeExtent:this.timeExtent,viewpoint:this.viewpoint}))}};e([l({type:f,nonNullable:!0,json:{read:!1,write:{isRequired:!0}}})],g.prototype,"extent",null),e([l({type:String,nonNullable:!0,json:{write:{isRequired:!0}}})],g.prototype,"name",void 0),e([l({type:j,json:{write:{overridePolicy:e=>({enabled:!(!e||!e.url)})}}})],g.prototype,"thumbnail",void 0),e([u("thumbnail")],g.prototype,"castThumbnail",null),e([l({type:t,json:{write:!0}})],g.prototype,"timeExtent",void 0),e([l({type:o,nonNullable:!0,json:{write:!0}})],g.prototype,"viewpoint",null),e([w("viewpoint",["extent","viewpoint"])],g.prototype,"readViewpoint",null),e([d("viewpoint")],g.prototype,"writeViewpoint",null),g=v=e([y(b)],g);const S=g;export{S as default};
package/webmap/Version.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{Version as s}from"../core/Version.js";class e extends s{constructor(s,e){super(s,e,"webmap")}}export{e as Version,e as default};
5
+ import{Version as r}from"../core/Version.js";class s extends r{constructor(r,s){super(r,s,"webmap")}}export{s as Version};
package/webscene/Slide.js CHANGED
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../Basemap.js";import i from"../Viewpoint.js";import{result as r}from"../core/asyncUtils.js";import s from"../core/Collection.js";import{referenceSetter as n}from"../core/collectionUtils.js";import{JSONSupport as o}from"../core/JSONSupport.js";import a from"../core/Logger.js";import{isSome as l}from"../core/maybe.js";import{eachAlways as p,onAbortOrThrow as m,isAbortError as h,all as c}from"../core/promiseUtils.js";import{property as u}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import"../core/has.js";import{cast as d}from"../core/accessorSupport/decorators/cast.js";import{subclass as y}from"../core/accessorSupport/decorators/subclass.js";import{ensureType as g}from"../core/accessorSupport/ensureType.js";import{h as v}from"../chunks/vec3.js";import{c as b}from"../chunks/vec3f64.js";import w from"../layers/Layer.js";import{isOperationalLayer as f}from"../layers/mixins/OperationalLayer.js";import{ensureType as L,clonePreservingTiledLayers as j}from"../support/basemapUtils.js";import{moduloPositive as T}from"../views/3d/support/mathUtils.js";import{toCamera as _}from"../views/3d/support/viewpointUtils.js";import{TaskPriority as C}from"../views/support/Scheduler.js";import S from"../webdoc/support/Thumbnail.js";import U from"./Lighting.js";import V from"./support/Description.js";import{SlideEnvironment as x}from"./support/SlideEnvironment.js";import D from"./support/SlideGround.js";import E from"./support/SlideVisibleLayer.js";import I from"./support/Title.js";let k=0;const O=s.ofType(E),R=a.getLogger("esri.webscene.Slide");let A=class extends o{constructor(e){super(e),this.id=Date.now().toString(16)+"-slide-"+k++,this.title=new I,this.description=new V,this.thumbnail=new S,this.viewpoint=null,this.basemap=null,this.ground=null,this.environment=new x,this.visibleLayers=new O}destroy(){this.visibleLayers.removeAll(),this.basemap=null,this.thumbnail&&this.thumbnail.destroy(),this.description=null,this.title=null,this.thumbnail=null}castTitle(e){return"string"==typeof e?new I({text:e}):g(I,e)}castDescription(e){return"string"==typeof e?new V({text:e}):g(V,e)}castThumbnail(e){return"string"==typeof e?new S({url:e}):g(S,e)}castBasemap(e){return L(e)}set visibleLayers(e){this._set("visibleLayers",n(e,this._get("visibleLayers"),O))}castVisibleLayers(e){return e&&"function"==typeof e.map?e.map((e=>{if("string"==typeof e)return{id:e};if(e instanceof w){const t=M(e);return{id:e.id,sublayerIds:t}}return e.id?{id:e.id,sublayerIds:e.sublayerIds}:(R.warn('Invalid visible layer, expected { id }, Layer or "id"'),e)})):null}clone(){return new(0,this.constructor)({id:this.id,title:this.title.clone(),thumbnail:this.thumbnail.clone(),description:this.description&&this.description.clone()||null,viewpoint:this.viewpoint&&this.viewpoint.clone()||null,basemap:this.basemap&&this.basemap.clone()||null,ground:this.ground&&this.ground.clone()||null,visibleLayers:this.visibleLayers.clone(),environment:this.environment&&this.environment.clone()||null})}_updateVisibleLayersFrom(e){const t=[];return p(this._getLayers(e.map).map((i=>e.whenLayerView(i).then((e=>{if(e.visible){const r=M(i);t.push(new E({id:e.layer.id,sublayerIds:r}))}})))).toArray()).then((()=>{this.visibleLayers.removeAll(),this.visibleLayers.addMany(t)}))}updateFrom(e,t){return t={screenshot:{format:"png",quality:80,width:120,height:75,disableDecorations:!0,...t&&t.screenshot}},e.when((()=>(this.viewpoint=e.viewpoint.clone(),this.environment.lighting=U.prototype.clone.apply(e.environment.lighting),this.basemap=e.map.basemap&&e.map.basemap.clone()||null,this.ground=e.map.ground?D.fromGround(e.map.ground):null,this._updateVisibleLayersFrom(e)))).then((()=>e.takeScreenshot(t.screenshot))).then((e=>(this.thumbnail=new S({url:e.dataUrl}),this)))}async applyTo(e,t){l(this._applyToController)&&this._applyToController.abort();let i=new AbortController;this._applyToController=i;const s=m(t,(()=>i.abort())),n=e.resourceController.scheduler.registerTask(C.SLIDE);let o=!1;t={animate:!0,...t,signal:this._applyToController.signal};const a=async()=>{await c([n.schedule((()=>o=this._setViewpointOfInterest(e,t))),n.schedule((()=>this._applyBasemap(e,t)),t.signal)]),await c([n.schedule((()=>this._applyLayerVisibility(e)),t.signal),n.schedule((()=>this._applyGround(e)),t.signal),n.schedule((()=>this._applyViewpoint(e,t)),t.signal)])},p=await r(e.addUpdatingPromise(a()));if(o&&(e.contentCamera=null),n.remove(),this._applyToController===i&&(this._applyToController=null),i=null,null==s||s.remove(),!1===p.ok)throw p.error;return this}async _applyBasemap(e,t){if(this.basemap){try{await this.basemap.load(t)}catch(i){if(h(i))throw i}e.map.basemap=j(this.basemap,e.map.basemap)}}_applyGround(e){this.ground&&(e.map.ground=this.ground.cloneAndApplyTo(e.map.ground))}_getLayers(e){const t=new s;return this._collectLayers(e,t),this._collectLayers(e.ground,t),t}_collectLayers(e,t){e.layers.forEach((e=>{f(e)&&(t.add(e),"layers"in e&&this._collectLayers(e,t))}))}_applyLayerVisibility(e){if(!this.visibleLayers)return;this._getLayers(e.map).forEach((e=>{const t=this.visibleLayers.find((t=>t.id===e.id));e.visible=null!=t;const i=t&&t.sublayerIds,r=q(e);i&&r&&r.forEach((e=>e.visible=i.indexOf(e.id)>=0))}))}_setViewpointOfInterest(e,t){if(e.state.fixedContentCamera||!this.viewpoint||t.ignoreViewpoint||!t.useDestinationCamera)return!1;const i=_(e,this.viewpoint);return e.contentCamera=i,l(i)}async _applyViewpoint(e,t){if(this.viewpoint&&!t.ignoreViewpoint){if(l(this.viewpoint.camera)&&(this.viewpoint.camera.fov=e.camera.fov),t.animate&&this.get("environment.lighting.date"))return void await this._animateToLighting(e,t);t.animate&&(e.environment.applyLighting(this.environment.lighting.clone()),await e.goTo(this.viewpoint,t)),e.viewpoint=this.viewpoint}e.environment.applyLighting(this.environment.lighting.clone())}async _animateToLighting(e,t){let i=null;"global"===e.viewingMode&&(i=this._animateLightingWithCamera(e)),e.environment.lighting.cameraTrackingEnabled=!1,e.environment.lighting.directShadowsEnabled=this.environment.lighting.directShadowsEnabled,null!=this.environment.lighting.displayUTCOffset&&(e.environment.lighting.displayUTCOffset=this.environment.lighting.displayUTCOffset);const r=e.goTo(this.viewpoint,t),s=()=>{i&&i.remove(),e.environment.lighting.cameraTrackingEnabled=!0};return r.then((()=>{e.environment.applyLighting(this.environment.lighting.clone()),s()}),(e=>{throw s(),e}))}_getTime(e){return[e.getTime(),3600*e.getUTCHours()+60*e.getUTCMinutes()+e.getUTCSeconds()]}_setTime(e,t,i){return e.setTime(t),e.setUTCHours(i/3600),e.setUTCMinutes(i%3600/60),e.setUTCSeconds(i%3600%60),e}_animateLightingWithCamera(e){const t=new Date(e.environment.lighting.date.toString()),[i,r]=this._getTime(t),[s,n]=this._getTime(this.environment.lighting.date),o=G(r,n),a=e.renderCoordsHelper,p=b();a.toRenderCoords(e.camera.position,p);const m=b(),h=b();l(this.viewpoint.camera)&&a.toRenderCoords(this.viewpoint.camera.position,m);const c=new Date;return e.watch("camera",(t=>{a.toRenderCoords(t.position,h);const n=v(p,h),l=v(m,h);let u=0;n+l!==0&&(u=n/(n+l));const d=i+(s-i)*u,y=H(r,o*u);e.environment.lighting.date=this._setTime(c,d,y)}))}static createFrom(e,t){return(new this).updateFrom(e,t)}};function q(e){if("building-scene"===e.type||"map-image"===e.type)return e.allSublayers.toArray()}function M(e){const t=q(e);if(t)return t.filter((e=>e.visible)).map((e=>e.id))}e([u({type:String,json:{write:{isRequired:!0}}})],A.prototype,"id",void 0),e([u({type:I,json:{default:()=>new I({text:""}),write:{isRequired:!0}}})],A.prototype,"title",void 0),e([d("title")],A.prototype,"castTitle",null),e([u({type:V,json:{write:{overridePolicy:e=>({enabled:!(!e||!e.text)})}}})],A.prototype,"description",void 0),e([d("description")],A.prototype,"castDescription",null),e([u({type:S,json:{default:()=>new S({url:""}),write:{isRequired:!0}}})],A.prototype,"thumbnail",void 0),e([d("thumbnail")],A.prototype,"castThumbnail",null),e([u({type:i,nonNullable:!0,json:{write:{isRequired:!0}}})],A.prototype,"viewpoint",void 0),e([u({type:t,json:{read:{source:"baseMap"},write:{target:"baseMap"}}})],A.prototype,"basemap",void 0),e([d("basemap")],A.prototype,"castBasemap",null),e([u({type:D,json:{write:!0}})],A.prototype,"ground",void 0),e([u({type:O,json:{write:{isRequired:!0}}})],A.prototype,"visibleLayers",null),e([d("visibleLayers")],A.prototype,"castVisibleLayers",null),e([u({type:x,json:{write:!0}})],A.prototype,"environment",void 0),A=e([y("esri.webscene.Slide")],A);const B=86400,F=43200;function G(e,t){let i=t-e;return i>F&&(i-=B),i<-F&&(i+=B),i}function H(e,t){return T(e+t,B)}const N=A;export{N as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../Basemap.js";import i from"../Viewpoint.js";import{result as r}from"../core/asyncUtils.js";import s from"../core/Collection.js";import{referenceSetter as n}from"../core/collectionUtils.js";import{JSONSupport as o}from"../core/JSONSupport.js";import a from"../core/Logger.js";import{isSome as l}from"../core/maybe.js";import{eachAlways as p,onAbortOrThrow as m,isAbortError as h,all as c}from"../core/promiseUtils.js";import{property as u}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import"../core/has.js";import{cast as d}from"../core/accessorSupport/decorators/cast.js";import{subclass as y}from"../core/accessorSupport/decorators/subclass.js";import{ensureType as g}from"../core/accessorSupport/ensureType.js";import{h as v}from"../chunks/vec3.js";import{c as b}from"../chunks/vec3f64.js";import w from"../layers/Layer.js";import{isOperationalLayer as f}from"../layers/mixins/OperationalLayer.js";import{ensureType as L,clonePreservingTiledLayers as j}from"../support/basemapUtils.js";import{moduloPositive as T}from"../views/3d/support/mathUtils.js";import{toCamera as _}from"../views/3d/support/viewpointUtils.js";import{TaskPriority as C}from"../views/support/Scheduler.js";import{SlideThumbnail as S}from"../webdoc/support/SlideThumbnail.js";import U from"./Lighting.js";import V from"./support/Description.js";import{SlideEnvironment as x}from"./support/SlideEnvironment.js";import D from"./support/SlideGround.js";import{SlideVisibleLayer as E}from"./support/SlideVisibleLayer.js";import I from"./support/Title.js";let k=0;const O=s.ofType(E),R=a.getLogger("esri.webscene.Slide");let A=class extends o{constructor(e){super(e),this.id=Date.now().toString(16)+"-slide-"+k++,this.title=new I,this.description=new V,this.thumbnail=new S,this.viewpoint=null,this.basemap=null,this.ground=null,this.environment=new x,this.visibleLayers=new O}destroy(){this.visibleLayers.removeAll(),this.basemap=null,this.thumbnail&&this.thumbnail.destroy(),this.description=null,this.title=null,this.thumbnail=null}castTitle(e){return"string"==typeof e?new I({text:e}):g(I,e)}castDescription(e){return"string"==typeof e?new V({text:e}):g(V,e)}castThumbnail(e){return"string"==typeof e?new S({url:e}):g(S,e)}castBasemap(e){return L(e)}set visibleLayers(e){this._set("visibleLayers",n(e,this._get("visibleLayers"),O))}castVisibleLayers(e){return e&&"function"==typeof e.map?e.map((e=>{if("string"==typeof e)return{id:e};if(e instanceof w){const t=M(e);return{id:e.id,sublayerIds:t}}return e.id?{id:e.id,sublayerIds:e.sublayerIds}:(R.warn('Invalid visible layer, expected { id }, Layer or "id"'),e)})):null}clone(){return new(0,this.constructor)({id:this.id,title:this.title.clone(),thumbnail:this.thumbnail.clone(),description:this.description&&this.description.clone()||null,viewpoint:this.viewpoint&&this.viewpoint.clone()||null,basemap:this.basemap&&this.basemap.clone()||null,ground:this.ground&&this.ground.clone()||null,visibleLayers:this.visibleLayers.clone(),environment:this.environment&&this.environment.clone()||null})}_updateVisibleLayersFrom(e){const t=[];return p(this._getLayers(e.map).map((i=>e.whenLayerView(i).then((e=>{if(e.visible){const r=M(i);t.push(new E({id:e.layer.id,sublayerIds:r}))}})))).toArray()).then((()=>{this.visibleLayers.removeAll(),this.visibleLayers.addMany(t)}))}updateFrom(e,t){return t={screenshot:{format:"png",quality:80,width:120,height:75,disableDecorations:!0,...t&&t.screenshot}},e.when((()=>(this.viewpoint=e.viewpoint.clone(),this.environment.lighting=U.prototype.clone.apply(e.environment.lighting),this.basemap=e.map.basemap&&e.map.basemap.clone()||null,this.ground=e.map.ground?D.fromGround(e.map.ground):null,this._updateVisibleLayersFrom(e)))).then((()=>e.takeScreenshot(t.screenshot))).then((e=>(this.thumbnail=new S({url:e.dataUrl}),this)))}async applyTo(e,t){l(this._applyToController)&&this._applyToController.abort();let i=new AbortController;this._applyToController=i;const s=m(t,(()=>i.abort())),n=e.resourceController.scheduler.registerTask(C.SLIDE);let o=!1;t={animate:!0,...t,signal:this._applyToController.signal};const a=async()=>{await c([n.schedule((()=>o=this._setViewpointOfInterest(e,t))),n.schedule((()=>this._applyBasemap(e,t)),t.signal)]),await c([n.schedule((()=>this._applyLayerVisibility(e)),t.signal),n.schedule((()=>this._applyGround(e)),t.signal),n.schedule((()=>this._applyViewpoint(e,t)),t.signal)])},p=await r(e.addUpdatingPromise(a()));if(o&&(e.contentCamera=null),n.remove(),this._applyToController===i&&(this._applyToController=null),i=null,null==s||s.remove(),!1===p.ok)throw p.error;return this}async _applyBasemap(e,t){if(this.basemap){try{await this.basemap.load(t)}catch(i){if(h(i))throw i}e.map.basemap=j(this.basemap,e.map.basemap)}}_applyGround(e){this.ground&&(e.map.ground=this.ground.cloneAndApplyTo(e.map.ground))}_getLayers(e){const t=new s;return this._collectLayers(e,t),this._collectLayers(e.ground,t),t}_collectLayers(e,t){e.layers.forEach((e=>{f(e)&&(t.add(e),"layers"in e&&this._collectLayers(e,t))}))}_applyLayerVisibility(e){if(!this.visibleLayers)return;this._getLayers(e.map).forEach((e=>{const t=this.visibleLayers.find((t=>t.id===e.id));e.visible=null!=t;const i=t&&t.sublayerIds,r=q(e);i&&r&&r.forEach((e=>e.visible=i.indexOf(e.id)>=0))}))}_setViewpointOfInterest(e,t){if(e.state.fixedContentCamera||!this.viewpoint||t.ignoreViewpoint||!t.useDestinationCamera)return!1;const i=_(e,this.viewpoint);return e.contentCamera=i,l(i)}async _applyViewpoint(e,t){if(this.viewpoint&&!t.ignoreViewpoint){if(l(this.viewpoint.camera)&&(this.viewpoint.camera.fov=e.camera.fov),t.animate&&this.get("environment.lighting.date"))return void await this._animateToLighting(e,t);t.animate&&(e.environment.applyLighting(this.environment.lighting.clone()),await e.goTo(this.viewpoint,t)),e.viewpoint=this.viewpoint}e.environment.applyLighting(this.environment.lighting.clone())}async _animateToLighting(e,t){let i=null;"global"===e.viewingMode&&(i=this._animateLightingWithCamera(e)),e.environment.lighting.cameraTrackingEnabled=!1,e.environment.lighting.directShadowsEnabled=this.environment.lighting.directShadowsEnabled,null!=this.environment.lighting.displayUTCOffset&&(e.environment.lighting.displayUTCOffset=this.environment.lighting.displayUTCOffset);const r=e.goTo(this.viewpoint,t),s=()=>{i&&i.remove(),e.environment.lighting.cameraTrackingEnabled=!0};return r.then((()=>{e.environment.applyLighting(this.environment.lighting.clone()),s()}),(e=>{throw s(),e}))}_getTime(e){return[e.getTime(),3600*e.getUTCHours()+60*e.getUTCMinutes()+e.getUTCSeconds()]}_setTime(e,t,i){return e.setTime(t),e.setUTCHours(i/3600),e.setUTCMinutes(i%3600/60),e.setUTCSeconds(i%3600%60),e}_animateLightingWithCamera(e){const t=new Date(e.environment.lighting.date.toString()),[i,r]=this._getTime(t),[s,n]=this._getTime(this.environment.lighting.date),o=G(r,n),a=e.renderCoordsHelper,p=b();a.toRenderCoords(e.camera.position,p);const m=b(),h=b();l(this.viewpoint.camera)&&a.toRenderCoords(this.viewpoint.camera.position,m);const c=new Date;return e.watch("camera",(t=>{a.toRenderCoords(t.position,h);const n=v(p,h),l=v(m,h);let u=0;n+l!==0&&(u=n/(n+l));const d=i+(s-i)*u,y=H(r,o*u);e.environment.lighting.date=this._setTime(c,d,y)}))}static createFrom(e,t){return(new this).updateFrom(e,t)}};function q(e){if("building-scene"===e.type||"map-image"===e.type)return e.allSublayers.toArray()}function M(e){const t=q(e);if(t)return t.filter((e=>e.visible)).map((e=>e.id))}e([u({type:String,json:{write:{isRequired:!0}}})],A.prototype,"id",void 0),e([u({type:I,json:{default:()=>new I({text:""}),write:{isRequired:!0}}})],A.prototype,"title",void 0),e([d("title")],A.prototype,"castTitle",null),e([u({type:V,json:{write:{overridePolicy:e=>({enabled:!(!e||!e.text)})}}})],A.prototype,"description",void 0),e([d("description")],A.prototype,"castDescription",null),e([u({type:S,json:{default:()=>new S({url:""}),write:{isRequired:!0}}})],A.prototype,"thumbnail",void 0),e([d("thumbnail")],A.prototype,"castThumbnail",null),e([u({type:i,nonNullable:!0,json:{write:{isRequired:!0}}})],A.prototype,"viewpoint",void 0),e([u({type:t,json:{read:{source:"baseMap"},write:{target:"baseMap"}}})],A.prototype,"basemap",void 0),e([d("basemap")],A.prototype,"castBasemap",null),e([u({type:D,json:{write:!0}})],A.prototype,"ground",void 0),e([u({type:O,json:{write:{isRequired:!0}}})],A.prototype,"visibleLayers",null),e([d("visibleLayers")],A.prototype,"castVisibleLayers",null),e([u({type:x,json:{write:!0}})],A.prototype,"environment",void 0),A=e([y("esri.webscene.Slide")],A);const B=86400,F=43200;function G(e,t){let i=t-e;return i>F&&(i-=B),i<-F&&(i+=B),i}function H(e,t){return T(e+t,B)}const N=A;export{N as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{Version as s}from"../core/Version.js";class e extends s{constructor(s,e){super(s,e,"webscene")}get supportsGround(){return this.since(1,8)}get supportsVisibleElevationLayersInSlides(){return this.lessThan(1,8)}}export{e as Version,e as default};
5
+ import{Version as s}from"../core/Version.js";class e extends s{constructor(s,e){super(s,e,"webscene")}get supportsGround(){return this.since(1,8)}get supportsVisibleElevationLayersInSlides(){return this.lessThan(1,8)}}export{e as Version};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as r}from"../../chunks/tslib.es6.js";import{JSONSupport as s}from"../../core/JSONSupport.js";import{clone as e}from"../../core/lang.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import{Integer as t}from"../../core/accessorSupport/ensureType.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";var i;let c=i=class extends s{constructor(r){super(r),this.id="",this.sublayerIds=null}clone(){return new i({id:this.id,sublayerIds:e(this.sublayerIds)})}};r([o({type:String,json:{write:!0}})],c.prototype,"id",void 0),r([o({type:[t],json:{read:{source:"subLayerIds"},write:{target:"subLayerIds"}}})],c.prototype,"sublayerIds",void 0),c=i=r([p("esri.webscene.support.SlideVisibleLayer")],c);const a=c;export{c as SlideVisibleLayer,a as default};
5
+ import{_ as r}from"../../chunks/tslib.es6.js";import{JSONSupport as s}from"../../core/JSONSupport.js";import{clone as e}from"../../core/lang.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import{Integer as t}from"../../core/accessorSupport/ensureType.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";var i;let c=i=class extends s{constructor(r){super(r),this.id="",this.sublayerIds=null}clone(){return new i({id:this.id,sublayerIds:e(this.sublayerIds)})}};r([o({type:String,json:{write:!0}})],c.prototype,"id",void 0),r([o({type:[t],json:{read:{source:"subLayerIds"},write:{target:"subLayerIds"}}})],c.prototype,"sublayerIds",void 0),c=i=r([p("esri.webscene.support.SlideVisibleLayer")],c);export{c as SlideVisibleLayer};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../core/Error.js";import{throwIfAborted as a}from"../../../core/promiseUtils.js";import{isTiledLayer as t}from"../../../layers/support/layerUtils.js";import{stringFromViewingMode as i,ViewingMode as r}from"../../../views/ViewingMode.js";import{checkIfTileInfoSupportedForView as n}from"../../../views/3d/terrain/terrainUtils.js";import o from"../../../views/3d/terrain/TilingScheme.js";import{isSpatialReferenceSupported as l}from"../../../views/support/spatialReferenceSupport.js";async function s(e,t={}){await m(e,t),a(t)}async function p(e,i={}){const{basemap:r,view:n}=e;if("spatialReferenceLocked"in n&&!n.spatialReferenceLocked)return;if(await r.load(i),a(i),0===r.baseLayers.length)return;const o=r.baseLayers.getItemAt(0);if(!t(o))return;if(r.spatialReference){if(n.spatialReference.equals(r.spatialReference))return;c()}await o.load(i),a(i);const l=(("supportedSpatialReferences"in o?o.supportedSpatialReferences:null)||["tileInfo"in o?o.tileInfo.spatialReference:null]).filter(Boolean);0!==l.length&&l.every((e=>!n.spatialReference.equals(e)))&&c()}function c(){throw new e("basemap-compatibility:incompatible-spatial-reference","Basemap spatial reference is not compatible with the view")}async function m(a,t){const{basemap:i,view:r}=a;if(await i.load(t),0===i.baseLayers.length)return;const n=f(i.baseLayers.concat(i.referenceLayers));if(n.length)throw n[0];const o=i.baseLayers.getItemAt(0);try{await o.load(t)}catch(l){const a="basemap-compatibility:unknown-error",t="Unknown basemap compatibility error",{name:i=a,message:r=t,details:n}=l;throw new e(i,r,n)}u(o,r)}function f(a){const t=["ArcGISTiledImageServiceLayer","ArcGISTiledMapServiceLayer","OpenStreetMap","VectorTileLayer","WebTiledLayer"];return a.toArray().filter((e=>-1===t.indexOf(e.operationalLayerType))).map((a=>new e("basemap-compatibility:unsupported-basemap-layer-type","Unsupported basemap layer type ${operationalLayerType}",{layer:a,operationalLayerType:a.operationalLayerType||"unknown"})))}function u(a,t){const s=a.tileInfo;if(!s)return;const p=t.state.viewingMode;if(!p)return;if(!l(s.spatialReference,p))throw new e(`basemapgalleryitem:spatial-reference-unsupported-${i(p)}`,`Basemap spatial reference is unsupported in ${i(p)} mode`);if(p===r.Global){let t=n(s,a.fullExtent,null,r.Global);if(t&&a.compatibleTileInfo256&&!n(a.compatibleTileInfo256,a.fullExtent,null,r.Global)&&(t=null),t){const a=s.spatialReference.isWebMercator?"web-mercator":"wgs84";throw new e(`basemapgalleryitem:tiling-scheme-unsupported-${a}-global`,"Basemap tiling scheme is unsupported in global mode",{error:t})}}else if(o.checkUnsupported(s))throw new e("basemapgalleryitem:tiling-scheme-unsupported-local","Basemap tiling scheme is unsupported in local mode");const c=t.get("basemapTerrain.tilingScheme");if(c&&!c.compatibleWith(s)&&(!a.compatibleTileInfo256||!c.compatibleWith(a.compatibleTileInfo256)))throw new e("basemapgalleryitem:tiling-scheme-incompatible","Basemap tiling scheme is incompatible with the view")}export{p as default2DCompatibility,s as default3DCompatibility};
5
+ import e from"../../../core/Error.js";import{throwIfAborted as t}from"../../../core/promiseUtils.js";import{isTiledLayer as a}from"../../../layers/support/layerUtils.js";import{stringFromViewingMode as i,ViewingMode as r}from"../../../views/ViewingMode.js";import{checkIfTileInfoSupportedForView as n}from"../../../views/3d/terrain/terrainUtils.js";import o from"../../../views/3d/terrain/TilingScheme.js";import{isSpatialReferenceSupported as l}from"../../../views/support/spatialReferenceSupport.js";async function s(e,a={}){await m(e,a),t(a)}async function p(e,i={}){const{basemap:r,view:n}=e;if("spatialReferenceLocked"in n&&!n.spatialReferenceLocked)return;if(await r.load(i),t(i),0===r.baseLayers.length)return;const o=r.baseLayers.getItemAt(0);if(!a(o))return;if(r.spatialReference){if(n.spatialReference.equals(r.spatialReference))return;c()}await o.load(i),t(i);const l=(("supportedSpatialReferences"in o?o.supportedSpatialReferences:null)||["tileInfo"in o?o.tileInfo.spatialReference:null]).filter(Boolean);0!==l.length&&l.every((e=>!n.spatialReference.equals(e)))&&c()}function c(){throw new e("basemap-compatibility:incompatible-spatial-reference","Basemap spatial reference is not compatible with the view")}async function m(t,a){const{basemap:i,view:r}=t;if(await i.load(a),0===i.baseLayers.length)return;const n=f(i.baseLayers.concat(i.referenceLayers));if(n.length)throw n[0];const o=i.baseLayers.getItemAt(0);try{await o.load(a)}catch(l){const t="basemap-compatibility:unknown-error",a="Unknown basemap compatibility error",{name:i=t,message:r=a,details:n}=l;throw new e(i,r,n)}u(o,r)}function f(t){const a=["ArcGISTiledImageServiceLayer","ArcGISTiledMapServiceLayer","OpenStreetMap","VectorTileLayer","WebTiledLayer"];return t.toArray().filter((e=>-1===a.indexOf(e.operationalLayerType))).map((t=>new e("basemap-compatibility:unsupported-basemap-layer-type","Unsupported basemap layer type ${operationalLayerType}",{layer:t,operationalLayerType:t.operationalLayerType||"unknown"})))}function u(t,a){const s=t.tileInfo;if(!s)return;const p=a.state.viewingMode;if(!p)return;if(!l(s.spatialReference,p))throw new e(`basemapgalleryitem:spatial-reference-unsupported-${i(p)}`,`Basemap spatial reference is unsupported in ${i(p)} mode`);if(p===r.Global){let a=n(s,t.fullExtent,null,r.Global);if(a&&t.tileInfo.getOrCreateCompatible(256)&&!n(t.tileInfo.getOrCreateCompatible(256),t.fullExtent,null,r.Global)&&(a=null),a){const t=s.spatialReference.isWebMercator?"web-mercator":"wgs84";throw new e(`basemapgalleryitem:tiling-scheme-unsupported-${t}-global`,"Basemap tiling scheme is unsupported in global mode",{error:a})}}else if(o.checkUnsupported(s))throw new e("basemapgalleryitem:tiling-scheme-unsupported-local","Basemap tiling scheme is unsupported in local mode");const c=a.get("basemapTerrain.tilingScheme");if(c&&!c.compatibleWith(s)&&(!t.tileInfo.getOrCreateCompatible(256)||!c.compatibleWith(t.tileInfo.getOrCreateCompatible(256))))throw new e("basemapgalleryitem:tiling-scheme-incompatible","Basemap tiling scheme is incompatible with the view")}export{p as default2DCompatibility,s as default3DCompatibility};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../Viewpoint.js";import o from"../../core/Collection.js";import i from"../../core/Error.js";import r from"../../core/Evented.js";import a from"../../core/Logger.js";import{isSome as s}from"../../core/maybe.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{cast as c}from"../../core/accessorSupport/decorators/cast.js";import{subclass as l}from"../../core/accessorSupport/decorators/subclass.js";import p from"../../webdoc/support/Thumbnail.js";import m from"../../webmap/Bookmark.js";import{GoToMixin as u}from"../support/GoTo.js";const k="esri.widgets.Bookmarks.BookmarksViewModel",d=a.getLogger(k),v=o.ofType(m),w={width:128,height:128,format:"png"},h={takeScreenshot:!0,captureViewpoint:!0,captureRotation:!0,captureScale:!0,captureTimeExtent:!0},b={time:!0};let f=class extends(u(r.EventedAccessor)){constructor(t){super(t),this.abilities={...b},this.activeBookmark=null}destroy(){this.view=null,this._set("activeBookmark",null)}castAbilities(t){return{...b,...t}}set bookmarks(t){void 0!==t?this._override("bookmarks",t):this._clearOverride("bookmarks")}get bookmarks(){return this.get("view.map.bookmarks")||new v}set defaultCreateOptions(t){this._set("defaultCreateOptions",{...h,...t})}get defaultCreateOptions(){return h}set defaultEditOptions(t){this._set("defaultEditOptions",{...h,...t})}get defaultEditOptions(){return h}get state(){const t=this.get("view");return t&&!t.ready?"loading":"ready"}get view(){return this._get("view")}set view(t){t&&"2d"!==t.type&&d.error(new i("view:invalid-view","SceneView is not supported",{view:t})),this._set("view",t)}async createBookmark(t){const{view:e,defaultCreateOptions:o,abilities:r}=this;if(!e){const t=new i("create-bookmark:invalid-view","Cannot create a bookmark without a view.");return d.error(t),Promise.reject(t)}const{takeScreenshot:a,screenshotSettings:n,captureViewpoint:c,captureRotation:l,captureScale:p,captureTimeExtent:u}={...o,...t},k=a?await this._createThumbnail(n):void 0,v=r.time&&u&&s(e.timeExtent)?e.timeExtent.clone():void 0;return new m({...k&&{thumbnail:k},...u&&{timeExtent:v},...c&&{viewpoint:this._createViewpoint({view:e,captureScale:p,captureRotation:l})}})}async editBookmark(t,e){const{view:o,defaultEditOptions:r}=this;if(!o){const t=new i("edit-bookmark:invalid-view","Cannot edit a bookmark without a view.");return d.error(t),Promise.reject(t)}const{takeScreenshot:a,screenshotSettings:n,captureViewpoint:c,captureRotation:l,captureScale:p,captureTimeExtent:m}={...r,...e},u=a?await this._createThumbnail(n):void 0;return u&&(t.thumbnail=u),c&&(t.viewpoint=this._createViewpoint({view:o,captureScale:p,captureRotation:l})),m&&s(o.timeExtent)&&(t.timeExtent=o.timeExtent.clone()),this.emit("bookmark-edit",{bookmark:t}),t}goTo(t){const{abilities:e,view:o}=this;if(!o){const t=new i("go-to:invalid-view","Cannot go to a bookmark without a view");return d.error(t),Promise.reject(t)}const r=null==t?void 0:t.viewpoint;if(!r){const e=new i("go-to:invalid-bookmark","Cannot go to a bookmark that does not contain a 'viewpoint'.",{bookmark:t});return d.error(e),Promise.reject(e)}this._set("activeBookmark",t);const a={target:r},s=this.callGoTo(a),n=null==t?void 0:t.timeExtent;return e.time&&n&&(o.timeExtent=n),this.emit("bookmark-select",{bookmark:t}),s.catch((()=>{})).then((()=>this._set("activeBookmark",null))),s}async _createThumbnail(t){const e=await this.view.takeScreenshot({...w,...t});return new p({url:e.dataUrl})}_createViewpoint({view:t,captureRotation:o,captureScale:i}){var r,a;const s=null==(r=t.viewpoint)?void 0:r.clone();return new e({targetGeometry:null==(a=t.extent)?void 0:a.clone(),rotation:o&&(null==s?void 0:s.rotation)||0,scale:i&&(null==s?void 0:s.scale)||0})}};t([n()],f.prototype,"abilities",void 0),t([c("abilities")],f.prototype,"castAbilities",null),t([n({readOnly:!0})],f.prototype,"activeBookmark",void 0),t([n({type:v})],f.prototype,"bookmarks",null),t([n()],f.prototype,"defaultCreateOptions",null),t([n()],f.prototype,"defaultEditOptions",null),t([n({readOnly:!0})],f.prototype,"state",null),t([n({value:null})],f.prototype,"view",null),f=t([l(k)],f);const g=f;export{g as default};
5
+ import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../Viewpoint.js";import o from"../../core/Collection.js";import i from"../../core/Error.js";import r from"../../core/Evented.js";import a from"../../core/Logger.js";import{isSome as s}from"../../core/maybe.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{cast as c}from"../../core/accessorSupport/decorators/cast.js";import{subclass as l}from"../../core/accessorSupport/decorators/subclass.js";import{SlideThumbnail as p}from"../../webdoc/support/SlideThumbnail.js";import m from"../../webmap/Bookmark.js";import{GoToMixin as u}from"../support/GoTo.js";const k="esri.widgets.Bookmarks.BookmarksViewModel",d=a.getLogger(k),v=o.ofType(m),w={width:128,height:128,format:"png"},h={takeScreenshot:!0,captureViewpoint:!0,captureRotation:!0,captureScale:!0,captureTimeExtent:!0},b={time:!0};let f=class extends(u(r.EventedAccessor)){constructor(t){super(t),this.abilities={...b},this.activeBookmark=null}destroy(){this.view=null,this._set("activeBookmark",null)}castAbilities(t){return{...b,...t}}set bookmarks(t){void 0!==t?this._override("bookmarks",t):this._clearOverride("bookmarks")}get bookmarks(){return this.get("view.map.bookmarks")||new v}set defaultCreateOptions(t){this._set("defaultCreateOptions",{...h,...t})}get defaultCreateOptions(){return h}set defaultEditOptions(t){this._set("defaultEditOptions",{...h,...t})}get defaultEditOptions(){return h}get state(){const t=this.get("view");return t&&!t.ready?"loading":"ready"}get view(){return this._get("view")}set view(t){t&&"2d"!==t.type&&d.error(new i("view:invalid-view","SceneView is not supported",{view:t})),this._set("view",t)}async createBookmark(t){const{view:e,defaultCreateOptions:o,abilities:r}=this;if(!e){const t=new i("create-bookmark:invalid-view","Cannot create a bookmark without a view.");return d.error(t),Promise.reject(t)}const{takeScreenshot:a,screenshotSettings:n,captureViewpoint:c,captureRotation:l,captureScale:p,captureTimeExtent:u}={...o,...t},k=a?await this._createThumbnail(n):void 0,v=r.time&&u&&s(e.timeExtent)?e.timeExtent.clone():void 0;return new m({...k&&{thumbnail:k},...u&&{timeExtent:v},...c&&{viewpoint:this._createViewpoint({view:e,captureScale:p,captureRotation:l})}})}async editBookmark(t,e){const{view:o,defaultEditOptions:r}=this;if(!o){const t=new i("edit-bookmark:invalid-view","Cannot edit a bookmark without a view.");return d.error(t),Promise.reject(t)}const{takeScreenshot:a,screenshotSettings:n,captureViewpoint:c,captureRotation:l,captureScale:p,captureTimeExtent:m}={...r,...e},u=a?await this._createThumbnail(n):void 0;return u&&(t.thumbnail=u),c&&(t.viewpoint=this._createViewpoint({view:o,captureScale:p,captureRotation:l})),m&&s(o.timeExtent)&&(t.timeExtent=o.timeExtent.clone()),this.emit("bookmark-edit",{bookmark:t}),t}goTo(t){const{abilities:e,view:o}=this;if(!o){const t=new i("go-to:invalid-view","Cannot go to a bookmark without a view");return d.error(t),Promise.reject(t)}const r=null==t?void 0:t.viewpoint;if(!r){const e=new i("go-to:invalid-bookmark","Cannot go to a bookmark that does not contain a 'viewpoint'.",{bookmark:t});return d.error(e),Promise.reject(e)}this._set("activeBookmark",t);const a={target:r},s=this.callGoTo(a),n=null==t?void 0:t.timeExtent;return e.time&&n&&(o.timeExtent=n),this.emit("bookmark-select",{bookmark:t}),s.catch((()=>{})).then((()=>this._set("activeBookmark",null))),s}async _createThumbnail(t){const e=await this.view.takeScreenshot({...w,...t});return new p({url:e.dataUrl})}_createViewpoint({view:t,captureRotation:o,captureScale:i}){var r,a;const s=null==(r=t.viewpoint)?void 0:r.clone();return new e({targetGeometry:null==(a=t.extent)?void 0:a.clone(),rotation:o&&(null==s?void 0:s.rotation)||0,scale:i&&(null==s?void 0:s.scale)||0})}};t([n()],f.prototype,"abilities",void 0),t([c("abilities")],f.prototype,"castAbilities",null),t([n({readOnly:!0})],f.prototype,"activeBookmark",void 0),t([n({type:v})],f.prototype,"bookmarks",null),t([n()],f.prototype,"defaultCreateOptions",null),t([n()],f.prototype,"defaultEditOptions",null),t([n({readOnly:!0})],f.prototype,"state",null),t([n({value:null})],f.prototype,"view",null),f=t([l(k)],f);const g=f;export{g as default};