@arcgis/core 6.0.0-next.41 → 6.0.0-next.43

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 (636) hide show
  1. package/Basemap.js +1 -1
  2. package/Camera.js +1 -1
  3. package/Graphic.js +1 -1
  4. package/Ground.js +1 -1
  5. package/WebDocument2D.js +1 -1
  6. package/WebScene.js +1 -1
  7. package/analysis/ElevationProfile/ElevationProfileLineScene.d.ts +1 -0
  8. package/analysis/ElevationProfileAnalysis.d.ts +15 -0
  9. package/analysis/LineOfSightAnalysis.d.ts +6 -1
  10. package/analysis/ShadowCastAnalysis.d.ts +18 -22
  11. package/analysis/ShadowCastAnalysis.js +1 -1
  12. package/analysis/ViewshedAnalysis.d.ts +6 -1
  13. package/applications/Components/analysisUtils.d.ts +6 -0
  14. package/applications/Components/analysisUtils.js +1 -1
  15. package/arcade/ArcadeModuleResolver.js +1 -1
  16. package/arcade/arcadeCompiler.js +1 -1
  17. package/arcade/featureset/actions/Adapted.js +1 -1
  18. package/arcade/featureset/sources/FeatureLayerMemory.js +1 -1
  19. package/arcade/featureset/support/FeatureSet.js +1 -1
  20. package/arcade/featureset/support/shared.js +1 -1
  21. package/arcade/featureset/support/sqlUtils.js +1 -1
  22. package/arcade/functions/knowledgegraph.js +1 -1
  23. package/arcade/functions/maths.js +1 -1
  24. package/arcgisGlobal.d.ts +0 -2
  25. package/assets/esri/core/workers/RemoteClient.js +1 -1
  26. package/assets/esri/core/workers/chunks/{2f54e4feb554c1a7b9c4.js → 02debe67e6fef9d88bdd.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{bd046399e05e759e0bc2.js → 035204000954973b0ebc.js} +1 -1
  28. package/assets/esri/core/workers/chunks/05225506fdba0c827407.js +1 -0
  29. package/assets/esri/core/workers/chunks/075fe33152fd79fe6d72.js +1 -0
  30. package/assets/esri/core/workers/chunks/077b755688346e0dc8d3.js +1 -0
  31. package/assets/esri/core/workers/chunks/0c1d8e0c2eae21f97fc0.js +1 -0
  32. package/assets/esri/core/workers/chunks/105865a4d8cb4ddf8a8a.js +1 -0
  33. package/assets/esri/core/workers/chunks/11877d4dc97f756e4711.js +1 -0
  34. package/assets/esri/core/workers/chunks/{afe3e89737fb45189a99.js → 14ed0c34b910eba3434e.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{f67b37253d6d05d1e339.js → 14ef986665b4a1f6ccdc.js} +1 -1
  36. package/assets/esri/core/workers/chunks/158cbf4075d3eca83a6a.js +1 -0
  37. package/assets/esri/core/workers/chunks/{a03f15f2cbc3fed291c2.js → 15f2b27b8edc0d53e399.js} +1 -1
  38. package/assets/esri/core/workers/chunks/181d24ced5ef6b1f959b.js +1 -0
  39. package/assets/esri/core/workers/chunks/18dbee576b7b9dbe69fb.js +1 -0
  40. package/assets/esri/core/workers/chunks/1aebb8fe0692058bf2fb.js +1 -0
  41. package/assets/esri/core/workers/chunks/1cdb55d9a5ab1a5e3f08.js +1 -0
  42. package/assets/esri/core/workers/chunks/{cf2e5f827cea7d7319ce.js → 1e5c5029b0653047a769.js} +1 -1
  43. package/assets/esri/core/workers/chunks/20db6e844708d3e71437.js +1 -0
  44. package/assets/esri/core/workers/chunks/21a4c3d8265aca775616.js +1 -0
  45. package/assets/esri/core/workers/chunks/23fff0505e02fd364909.js +1 -0
  46. package/assets/esri/core/workers/chunks/{14d81280807a3d3c1b7e.js → 244ffdb91237d1cbade3.js} +1 -1
  47. package/assets/esri/core/workers/chunks/286e3e050b29e6158e6f.js +1 -0
  48. package/assets/esri/core/workers/chunks/29ef9d357e30082d267a.js +1 -0
  49. package/assets/esri/core/workers/chunks/29feef121b0916fb90bf.js +1 -0
  50. package/assets/esri/core/workers/chunks/2ef91e8da260454f46d8.js +1 -0
  51. package/assets/esri/core/workers/chunks/32b9bedd4bb0504f0b1d.js +1 -0
  52. package/assets/esri/core/workers/chunks/348f28d7ab46df878c6f.js +1 -0
  53. package/assets/esri/core/workers/chunks/{279089a6a3f08022c678.js → 361d620b3f91868b1490.js} +1 -1
  54. package/assets/esri/core/workers/chunks/37c16e20f022ca27cdae.js +1 -0
  55. package/assets/esri/core/workers/chunks/380aefa522dfeccb8c65.js +1 -0
  56. package/assets/esri/core/workers/chunks/394ae3199c78a94c6a2a.js +1 -0
  57. package/assets/esri/core/workers/chunks/39c23a52d7c3e1ee121c.js +1 -0
  58. package/assets/esri/core/workers/chunks/{fdd2b35388f9fe42b623.js → 3a90b6eafa92f1a68ac5.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{6a65fc1a2931230fe994.js → 3bb1e06861cd0563ed9f.js} +1 -1
  60. package/assets/esri/core/workers/chunks/3f92afa58c895bf87e62.js +1 -0
  61. package/assets/esri/core/workers/chunks/422784ceae0d511868a0.js +1 -0
  62. package/assets/esri/core/workers/chunks/44782e8318dc47cb08a0.js +1 -0
  63. package/assets/esri/core/workers/chunks/{5882f349f3771868e67f.js → 4521f72ab0ea872e5d7c.js} +1 -1
  64. package/assets/esri/core/workers/chunks/45b5a61c4e9fbd9ca0b3.js +1 -0
  65. package/assets/esri/core/workers/chunks/47af220003adfca2167e.js +1 -0
  66. package/assets/esri/core/workers/chunks/487500443a6037d3599f.js +1 -0
  67. package/assets/esri/core/workers/chunks/4a4fab74442c3d914505.js +1 -0
  68. package/assets/esri/core/workers/chunks/4a8903fb1a5d30a68df9.js +1 -0
  69. package/assets/esri/core/workers/chunks/{46504fc81f357bc7465a.js → 4d62877f521cc9663535.js} +1 -1
  70. package/assets/esri/core/workers/chunks/4d818b231e6d1fa73cc5.js +1 -0
  71. package/assets/esri/core/workers/chunks/{e0cf6e1e21d0ee739009.js → 4e03aa5518d46a36661c.js} +1 -1
  72. package/assets/esri/core/workers/chunks/{1a614bac5db42c6263f8.js → 4fe10650ba3cd30aa9a2.js} +1 -1
  73. package/assets/esri/core/workers/chunks/50b8b1cce0a5f77c8372.js +1 -0
  74. package/assets/esri/core/workers/chunks/5470a29a69010c8361c4.js +1 -0
  75. package/assets/esri/core/workers/chunks/564d7f2e58fbc16853c0.js +1 -0
  76. package/assets/esri/core/workers/chunks/5c2e79f2ca401741bf3e.js +1 -0
  77. package/assets/esri/core/workers/chunks/5c9ab86bec07264dc9f2.js +1 -0
  78. package/assets/esri/core/workers/chunks/{04d55ed51e8b2683c4b4.js → 5d908a823b324bafda1e.js} +1 -1
  79. package/assets/esri/core/workers/chunks/{54de7dc0597fc80d7a52.js → 5dea74fe52583e77f3ce.js} +1 -1
  80. package/assets/esri/core/workers/chunks/5e6d6676a5c47c0e132a.js +1 -0
  81. package/assets/esri/core/workers/chunks/5fd4d3cb3c9350131a59.js +1 -0
  82. package/assets/esri/core/workers/chunks/60637f38159e9bf68d4e.js +1 -0
  83. package/assets/esri/core/workers/chunks/69b73251257088ce7099.js +1 -0
  84. package/assets/esri/core/workers/chunks/6cd17c3a254a0b5c2476.js +1 -0
  85. package/assets/esri/core/workers/chunks/{06102715e9a8f218e07c.js → 6f3732e7ba2d031ba789.js} +1 -1
  86. package/assets/esri/core/workers/chunks/7191ab31fa040a7c561e.js +1 -0
  87. package/assets/esri/core/workers/chunks/71ba848c3352ea3ff96f.js +1 -0
  88. package/assets/esri/core/workers/chunks/76dc8e3264a456f33e61.js +1 -0
  89. package/assets/esri/core/workers/chunks/77d80b6d65d761214a7c.js +1 -0
  90. package/assets/esri/core/workers/chunks/{e2430bc3a1edeb5c3266.js → 78a69594c82d37aecbfb.js} +1 -1
  91. package/assets/esri/core/workers/chunks/{1ec772eaa63eb6937231.js → 8140ed6e44c3d8536d3e.js} +1 -1
  92. package/assets/esri/core/workers/chunks/{787c1a8bda7d745633f2.js → 81b9894e81cce3490984.js} +1 -1
  93. package/assets/esri/core/workers/chunks/85cd525705eec6803dd3.js +1 -0
  94. package/assets/esri/core/workers/chunks/863f04cacdc843d3f208.js +1 -0
  95. package/assets/esri/core/workers/chunks/8766832c7253557da8fe.js +1 -0
  96. package/assets/esri/core/workers/chunks/87992070008812f8ae6f.js +1 -0
  97. package/assets/esri/core/workers/chunks/892fd2c3533ce46a9258.js +1 -0
  98. package/assets/esri/core/workers/chunks/89b9d716d96135d4f057.js +1 -0
  99. package/assets/esri/core/workers/chunks/{4b2d392ad8e381bfd6b3.js → 89e9ebc8d5c1022cb265.js} +1 -1
  100. package/assets/esri/core/workers/chunks/8b38798ac6d774185238.js +1 -0
  101. package/assets/esri/core/workers/chunks/8b53369cace136ed1329.js +1 -0
  102. package/assets/esri/core/workers/chunks/8ba4f5e1912edf397947.js +1 -0
  103. package/assets/esri/core/workers/chunks/{987424121cf30b0f3c50.js → 8d3e92a3367a3ddc02bd.js} +1 -1
  104. package/assets/esri/core/workers/chunks/8e7a3b1b088c160f4db7.js +1 -0
  105. package/assets/esri/core/workers/chunks/8f4fba4d2339c91c8b3f.js +1 -0
  106. package/assets/esri/core/workers/chunks/{45aaefbdffe5e15dfb24.js → 919a6aedf38e9631ee09.js} +1 -1
  107. package/assets/esri/core/workers/chunks/{487c46d5245cfb35c4bb.js → 921917e53bac82693ec8.js} +1 -1
  108. package/assets/esri/core/workers/chunks/92809b209b68abcb97ee.js +1 -0
  109. package/assets/esri/core/workers/chunks/{beccbfff549902733c4e.js → 9869c696e6321c8db0a9.js} +1 -1
  110. package/assets/esri/core/workers/chunks/98957dba728c93506e50.js +1 -0
  111. package/assets/esri/core/workers/chunks/99ffb839407cb3c26ad8.js +1 -0
  112. package/assets/esri/core/workers/chunks/9b517c8d26a86dedb921.js +1 -0
  113. package/assets/esri/core/workers/chunks/{cb2329d1ea72ce5cc057.js → 9c3f56f22e9baa80a387.js} +1 -1
  114. package/assets/esri/core/workers/chunks/9d0976f5979c4f9154dc.js +1 -0
  115. package/assets/esri/core/workers/chunks/9fe1812aad6e566aea31.js +1 -0
  116. package/assets/esri/core/workers/chunks/a1602995ef96beb7df29.js +1 -0
  117. package/assets/esri/core/workers/chunks/{dff845574c0037a1dca6.js → a332e31165b65a6fb92e.js} +1 -1
  118. package/assets/esri/core/workers/chunks/a553478664a688f32488.js +1 -0
  119. package/assets/esri/core/workers/chunks/a7937b06f4b0860c7671.js +1 -0
  120. package/assets/esri/core/workers/chunks/a95186214f1206efd8ed.js +1 -0
  121. package/assets/esri/core/workers/chunks/{853563c66ecf58d53d36.js → ab60e8fbe0f92340616a.js} +1 -1
  122. package/assets/esri/core/workers/chunks/acea0946049136578354.js +1 -0
  123. package/assets/esri/core/workers/chunks/{342a97974a78007b25e0.js → ad94f54b4c88b3a047bc.js} +1 -1
  124. package/assets/esri/core/workers/chunks/ae29fec228e70a93ced1.js +1 -0
  125. package/assets/esri/core/workers/chunks/ae6dc159be974ca0e8da.js +1 -0
  126. package/assets/esri/core/workers/chunks/ae70972bf88d586fd453.js +1 -0
  127. package/assets/esri/core/workers/chunks/b021fa4654ede1d04279.js +1 -0
  128. package/assets/esri/core/workers/chunks/b03f32f02858244c6cd0.js +1 -0
  129. package/assets/esri/core/workers/chunks/b2d922ecc2c4899dbee1.js +1 -0
  130. package/assets/esri/core/workers/chunks/b42e50ec6b819f669400.js +1 -0
  131. package/assets/esri/core/workers/chunks/b6a82775b83d20599635.js +1 -0
  132. package/assets/esri/core/workers/chunks/b6d365b9198b74b05338.js +1 -0
  133. package/assets/esri/core/workers/chunks/bc21241bc9acb83d1b1c.js +1 -0
  134. package/assets/esri/core/workers/chunks/bd02d927b0b4991b61c5.js +1 -0
  135. package/assets/esri/core/workers/chunks/bdf1c4c038d556527483.js +1 -0
  136. package/assets/esri/core/workers/chunks/c1273f14a5ef3d81de0d.js +1 -0
  137. package/assets/esri/core/workers/chunks/c752f1e732bb019f657d.js +1 -0
  138. package/assets/esri/core/workers/chunks/{5504ec9bd9ee4d10af07.js → c7f49493bd548d5dc1e0.js} +1 -1
  139. package/assets/esri/core/workers/chunks/c86d3af148b28ded5875.js +1121 -0
  140. package/assets/esri/core/workers/chunks/{692f0093c444fcc752b5.js → cadd60fa4370284c7ae3.js} +1 -1
  141. package/assets/esri/core/workers/chunks/{947f3a1cad976bba9738.js → cb62326b6526cde429c1.js} +1 -1
  142. package/assets/esri/core/workers/chunks/cd8304b1db83d48c57db.js +1 -0
  143. package/assets/esri/core/workers/chunks/cdf0c7706d3e1221f49b.js +1 -0
  144. package/assets/esri/core/workers/chunks/d00dd961a5b79f563123.js +1 -0
  145. package/assets/esri/core/workers/chunks/d893c3bb093104d3db95.js +1 -0
  146. package/assets/esri/core/workers/chunks/d8fb1d9da16492574a11.js +1 -0
  147. package/assets/esri/core/workers/chunks/{520f499d79fa71f262c7.js → dd7e4c94a88452425750.js} +1 -1
  148. package/assets/esri/core/workers/chunks/ddb4689624d091922471.js +1 -0
  149. package/assets/esri/core/workers/chunks/df32a3fe81d60f0d7462.js +1 -0
  150. package/assets/esri/core/workers/chunks/dfc6b33f51dc81f3a7be.js +1 -0
  151. package/assets/esri/core/workers/chunks/e55934eb4a17a5b24c94.js +1 -0
  152. package/assets/esri/core/workers/chunks/{5473409fee59db80f87d.js → e5bdfef7c2cc5354be52.js} +1 -1
  153. package/assets/esri/core/workers/chunks/e8cdec961e9cff1cb73b.js +1 -0
  154. package/assets/esri/core/workers/chunks/{6738b3d6bce34a1e8be2.js → eaf720dfdf6ceca31249.js} +1 -1
  155. package/assets/esri/core/workers/chunks/ef274db3fa260eadf371.js +1 -0
  156. package/assets/esri/core/workers/chunks/efca82a4dc494f57380b.js +1 -0
  157. package/assets/esri/core/workers/chunks/f05990e6fb378e2e1a3b.js +1 -0
  158. package/assets/esri/core/workers/chunks/f0fc89cdf50a40913c02.js +1 -0
  159. package/assets/esri/core/workers/chunks/{8b5dcc4282772bf6b675.js → f11eaab5354cc6aa9569.js} +1 -1
  160. package/assets/esri/core/workers/chunks/f1c2f7c7ce4bd4096eb0.js +1 -0
  161. package/assets/esri/core/workers/chunks/f4e63c5f82b8c2bbfacb.js +1 -0
  162. package/assets/esri/core/workers/chunks/f86ff791a10c802879ec.js +1 -0
  163. package/assets/esri/core/workers/chunks/{7452b5ae971a9ff2e6e9.js → fdffefd7de540272a8a6.js} +1 -1
  164. package/assets/esri/core/workers/chunks/fe0248af95d3f37e099e.js +1 -0
  165. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  166. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  167. package/assets/esri/themes/base/_core.scss +0 -2
  168. package/assets/esri/themes/dark/main.css +1 -1
  169. package/assets/esri/themes/light/main.css +1 -1
  170. package/assets/esri/themes/light/view.css +1 -1
  171. package/chunks/languageUtils.js +1 -1
  172. package/chunks/lyr3DMain.js +1 -1
  173. package/chunks/lyr3DWorker.js +1 -1
  174. package/config.js +1 -1
  175. package/core/Accessor.js +1 -1
  176. package/core/Collection.js +1 -1
  177. package/core/LRUCache.js +1 -1
  178. package/core/Logger.js +1 -1
  179. package/core/MapUtils.js +1 -1
  180. package/core/Version.js +1 -1
  181. package/core/asyncUtils.js +1 -1
  182. package/core/deprecate.js +1 -1
  183. package/core/fontUtils.js +1 -1
  184. package/core/has.js +1 -1
  185. package/core/sql/SqlInterval.js +1 -1
  186. package/core/sql/WhereClause.js +1 -1
  187. package/core/sql/writeUtils.js +1 -1
  188. package/core/sql.js +1 -1
  189. package/core/types.d.ts +0 -5
  190. package/core/urlUtils.js +1 -1
  191. package/editing/sharedTemplates/executor/builders/pointAtIntersectionVerticesOfLine.js +1 -1
  192. package/editing/sharedTemplates/executor/builders/polygonBoundary.js +1 -1
  193. package/editing/sharedTemplates/executor/builders/support/builderUtils.js +1 -1
  194. package/editing/sharedTemplates/executor/support/createFeatureServiceEdit.js +1 -1
  195. package/geometry/Point.js +1 -1
  196. package/geometry/Polygon.js +1 -1
  197. package/geometry/SpatialReference.js +1 -1
  198. package/geometry/support/webMercatorUtils.js +1 -1
  199. package/interfaces.d.ts +0 -17
  200. package/kernel.js +1 -1
  201. package/layers/BuildingSceneLayer.js +1 -1
  202. package/layers/ElevationLayer.d.ts +1 -1
  203. package/layers/ElevationLayer.js +1 -1
  204. package/layers/FeatureLayer.js +1 -1
  205. package/layers/GeoJSONLayer.d.ts +5 -1
  206. package/layers/GeoRSSLayer.js +1 -1
  207. package/layers/GeospatialPDFLayer.js +1 -1
  208. package/layers/ImageryLayer.js +1 -1
  209. package/layers/ImageryTileLayer.js +1 -1
  210. package/layers/IntegratedMesh3DTilesLayer.d.ts +4 -3
  211. package/layers/IntegratedMeshLayer.d.ts +4 -3
  212. package/layers/IntegratedMeshLayer.js +1 -1
  213. package/layers/KMLLayer.js +1 -1
  214. package/layers/KnowledgeGraphLayer.js +1 -1
  215. package/layers/LineOfSightLayer.d.ts +6 -1
  216. package/layers/LinkChartLayer.js +1 -1
  217. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  218. package/layers/MapImageLayer.js +1 -1
  219. package/layers/PointCloudLayer.js +1 -1
  220. package/layers/SceneLayer.js +1 -1
  221. package/layers/StreamLayer.js +1 -1
  222. package/layers/SubtypeGroupLayer.js +1 -1
  223. package/layers/TileLayer.js +1 -1
  224. package/layers/VectorTileLayer.d.ts +53 -0
  225. package/layers/VectorTileLayer.js +1 -1
  226. package/layers/VideoLayer.js +1 -1
  227. package/layers/ViewshedLayer.d.ts +6 -1
  228. package/layers/VoxelLayer.js +1 -1
  229. package/layers/WCSLayer.js +1 -1
  230. package/layers/WMSLayer.js +1 -1
  231. package/layers/WMTSLayer.js +1 -1
  232. package/layers/WebTileLayer.js +1 -1
  233. package/layers/effects/jsonUtils.js +1 -1
  234. package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +1 -1
  235. package/layers/geospatialPDF/GeospatialPDFWorkerClient.js +1 -1
  236. package/layers/graphics/data/QueryEngineResult.js +1 -1
  237. package/layers/graphics/data/projectionSupport.js +1 -1
  238. package/layers/graphics/sources/connections/WebSocketConnection.js +1 -1
  239. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  240. package/layers/graphics/sources/geojson/geojson.js +1 -1
  241. package/layers/graphics/sources/parquet/FileProvider.js +1 -1
  242. package/layers/graphics/sources/support/QueryTask.js +1 -1
  243. package/layers/graphics/sources/support/uploads.js +1 -1
  244. package/layers/knowledgeGraph/cypherUtils.js +1 -1
  245. package/layers/mixins/refresh.js +1 -1
  246. package/layers/ogc/ogcFeatureUtils.js +1 -1
  247. package/layers/ogc/wfsUtils.js +1 -1
  248. package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
  249. package/layers/parquet.js +1 -1
  250. package/layers/raster/datasets/BaseRaster.js +1 -1
  251. package/layers/raster/datasets/GeospatialPDFRaster.js +1 -1
  252. package/layers/raster/datasets/ImageServerRaster.js +1 -1
  253. package/layers/raster/datasets/RasterFactory.js +1 -1
  254. package/layers/raster/datasets/TIFFRaster.js +1 -1
  255. package/layers/raster/datasets/ZarrRaster.js +2 -0
  256. package/layers/raster/datasets/datasetUtils.js +1 -1
  257. package/layers/raster/datasets/wcsCoverageParser.js +1 -1
  258. package/layers/raster/datasets/zarrParser.js +2 -0
  259. package/layers/raster/datasets/zarrUtils.js +2 -0
  260. package/layers/raster/formats/Lerc.js +1 -1
  261. package/layers/raster/formats/pixelRangeUtils.js +1 -1
  262. package/layers/support/ClientSideConnection.js +1 -1
  263. package/layers/support/ElevationSampler.js +1 -1
  264. package/layers/support/MultidimensionalSubset.js +1 -1
  265. package/layers/support/SceneModifications.d.ts +1 -3
  266. package/layers/support/SceneModifications.js +1 -1
  267. package/layers/support/SpriteSource.js +1 -1
  268. package/layers/support/TileInfo.js +1 -1
  269. package/layers/support/fieldUtils.js +1 -1
  270. package/layers/support/infoFor3D.js +1 -1
  271. package/layers/support/vectorTileLayerLoader.js +1 -1
  272. package/layers/support/wmsUtils.js +1 -1
  273. package/layers/support/wmtsUtils.js +1 -1
  274. package/layers/video/videoUtils.js +1 -1
  275. package/legend/ActiveLayerInfo.js +1 -1
  276. package/libs/lyr3d/Lyr3DModule.js +1 -1
  277. package/linkChart/utils.js +1 -1
  278. package/networks/support/Circuit.js +1 -1
  279. package/networks/support/CircuitSection.js +1 -1
  280. package/package.json +3 -3
  281. package/portal/Portal.js +1 -1
  282. package/portal/PortalItemResource.js +1 -1
  283. package/portal/PortalQueryParams.js +1 -1
  284. package/renderers/HeatmapRenderer.js +1 -1
  285. package/renderers/UniqueValueRenderer.js +1 -1
  286. package/rest/knowledgeGraphService.js +1 -1
  287. package/rest/query/operations/pbfFeatureServiceParser.js +1 -1
  288. package/rest/query/operations/queryAttachments.js +1 -1
  289. package/support/LayersMixin.d.ts +2 -2
  290. package/symbols/PictureFillSymbol.js +1 -1
  291. package/symbols/PictureMarkerSymbol.js +1 -1
  292. package/symbols/SimpleFillSymbol.js +1 -1
  293. package/symbols/SimpleLineSymbol.js +1 -1
  294. package/symbols/SimpleMarkerSymbol.js +1 -1
  295. package/symbols/Symbol3D.js +1 -1
  296. package/symbols/TextSymbol.js +1 -1
  297. package/symbols/cim/placements/PlacementInsidePolygon.js +1 -1
  298. package/symbols/cim/types.d.ts +15 -11
  299. package/symbols/support/previewSymbol3D.js +1 -1
  300. package/tables/support/templateUtils.js +1 -1
  301. package/views/2d/engine/vectorTiles/SourceLayerData.js +1 -1
  302. package/views/2d/engine/vectorTiles/SpriteMosaic.js +1 -1
  303. package/views/2d/engine/vectorTiles/TileHandler.js +1 -1
  304. package/views/2d/engine/vectorTiles/TileHandler3D.js +1 -1
  305. package/views/2d/engine/vectorTiles/TileManager.js +1 -1
  306. package/views/2d/engine/vectorTiles/TileParser.js +1 -1
  307. package/views/2d/engine/vectorTiles/VectorTileFeatureIndex.js +1 -1
  308. package/views/2d/engine/vectorTiles/VectorTileSourceData.js +2 -0
  309. package/views/2d/engine/vectorTiles/WorkerTile.js +1 -1
  310. package/views/2d/engine/vectorTiles/WorkerTileHandler.js +1 -1
  311. package/views/2d/engine/vectorTiles/buckets/SymbolBucket.js +1 -1
  312. package/views/2d/engine/vectorTiles/expression/expression.js +1 -1
  313. package/views/2d/engine/vectorTiles/style/Filter.js +1 -1
  314. package/views/2d/engine/vectorTiles/style/GeoJSONVectorTileSourceWorker.js +1 -1
  315. package/views/2d/engine/vectorTiles/style/StyleProperty.js +1 -1
  316. package/views/2d/engine/webgl/mesh/MeshData.js +1 -1
  317. package/views/2d/engine/webgl/mesh/factories/MeshWriterGroupCoordinator.js +1 -1
  318. package/views/2d/engine/webgl/shaderGraph/graph/ShaderGraphContext.js +4 -4
  319. package/views/2d/interactive/editingTools/draw/DrawGraphicTool2D.js +1 -1
  320. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  321. package/views/2d/layers/features/Processor.js +1 -1
  322. package/views/2d/layers/features/support/TileStore.js +1 -1
  323. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  324. package/views/2d/tiling/TileKey.js +1 -1
  325. package/views/2d/tiling/TileStrategy.js +1 -1
  326. package/views/3d/analysis/Dimension/LengthDimensionComputation.js +1 -1
  327. package/views/3d/analysis/LineOfSight/LineOfSightManipulators.js +1 -1
  328. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  329. package/views/3d/analysis/images/generateTextures.js +1 -1
  330. package/views/3d/environment/EnvironmentView.js +1 -1
  331. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  332. package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
  333. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  334. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  335. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  336. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  337. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  338. package/views/3d/interactive/visualElements/VisualElementResources.js +1 -1
  339. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  340. package/views/3d/layers/I3SMeshView3D.js +1 -1
  341. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  342. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  343. package/views/3d/layers/VectorTileLayerView3D.js +1 -1
  344. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  345. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  346. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  347. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  348. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  349. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  350. package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
  351. package/views/3d/layers/graphics/Graphics3DSymbolCreationContext.js +1 -1
  352. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  353. package/views/3d/layers/graphics/MeshFastUpdateProcessor.js +1 -1
  354. package/views/3d/layers/graphics/defaultSymbolComplexity.js +1 -1
  355. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  356. package/views/3d/layers/graphics/polygonUtils.js +1 -1
  357. package/views/3d/layers/graphics/wosrLoader.js +1 -1
  358. package/views/3d/layers/i3s/I3SAsyncElevationUpdater.js +1 -1
  359. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  360. package/views/3d/layers/i3s/I3SQueryEngine.js +1 -1
  361. package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
  362. package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
  363. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  364. package/views/3d/layers/support/Tiles3DLayerViewRegistration.js +2 -0
  365. package/views/3d/layers/support/Tiles3DMeshIntersectionHandler.js +1 -1
  366. package/views/3d/layers/support/createTileBVHForLayer.js +2 -0
  367. package/views/3d/layers/support/tileBoundingVolumeUtils.js +2 -0
  368. package/views/3d/state/ConstraintsManager.js +1 -1
  369. package/views/3d/state/controllers/GroundNavigationController.js +1 -1
  370. package/views/3d/support/GaussianSplatSortWorker.js +1 -1
  371. package/views/3d/support/QualityProfile.js +1 -1
  372. package/views/3d/support/TextureCollection.js +1 -1
  373. package/views/3d/support/engineContent/line.js +1 -1
  374. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  375. package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
  376. package/views/3d/support/gaussianSplatting/GaussianSplatSortCoordinator.js +2 -0
  377. package/views/3d/support/gaussianSplatting/GaussianTile.js +1 -1
  378. package/views/3d/terrain/PatchGeometryFactory.js +1 -1
  379. package/views/3d/terrain/TerrainRenderer.js +1 -1
  380. package/views/3d/terrain/Tile.js +1 -1
  381. package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
  382. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  383. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
  384. package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
  385. package/views/3d/webgl-engine/effects/laserlines/LaserlinePathTechniqueConfiguration.js +1 -1
  386. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  387. package/views/3d/webgl-engine/lib/CutFill.js +1 -1
  388. package/views/3d/webgl-engine/lib/GaussianSplatRenderer.js +1 -1
  389. package/views/3d/webgl-engine/lib/LineMaterial.js +1 -1
  390. package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
  391. package/views/3d/webgl-engine/lib/TextureRepository.js +1 -1
  392. package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
  393. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  394. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  395. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  396. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  397. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  398. package/views/3d/webgl-engine/materials/TriangleMaterial.js +1 -1
  399. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  400. package/views/3d/webgl-engine/materials/WaterTechniqueConfiguration.js +1 -1
  401. package/views/3d/webgl-engine/materials/intersectWithPolygonOffset.js +1 -1
  402. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  403. package/views/3d/webgl-engine/shaders/ShadedMaterialConfiguration.js +2 -0
  404. package/views/SceneView.d.ts +2 -4
  405. package/views/SceneView.js +1 -1
  406. package/views/SelectionManager.js +1 -1
  407. package/views/View.d.ts +1 -3
  408. package/views/View2D.d.ts +2 -2
  409. package/views/analysis/ElevationProfile/ElevationProfileChart.js +2 -2
  410. package/views/analysis/ElevationProfile/elevationProfileChartBoundsUtils.js +1 -1
  411. package/views/draw/DrawAction.js +1 -1
  412. package/views/draw/support/PluginContext.js +1 -1
  413. package/views/interactive/options/ViewOptions.d.ts +0 -2
  414. package/views/interactive/sketch/normalizedPoint.js +1 -1
  415. package/views/interactive/tooltip/fields/TooltipFieldElevation.js +1 -1
  416. package/views/interactive/tooltip/fields/TooltipFieldOrientation.js +1 -1
  417. package/views/interactive/tooltip/fields/TooltipFieldSize.js +1 -1
  418. package/widgets/AreaMeasurement2D/AreaMeasurement2DViewModel.js +1 -1
  419. package/widgets/Attachments.js +1 -1
  420. package/widgets/Attribution/AttributionViewModel.js +1 -1
  421. package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
  422. package/widgets/BasemapLayerList/BasemapLayerListViewModel.js +1 -1
  423. package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
  424. package/widgets/BatchAttributeForm/ReactiveContingentValuesManager.js +1 -1
  425. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
  426. package/widgets/BatchAttributeForm.js +1 -1
  427. package/widgets/Bookmarks/BookmarksViewModel.js +1 -1
  428. package/widgets/BuildingExplorer/BuildingExplorerViewModel.js +1 -1
  429. package/widgets/BuildingExplorer/BuildingNumericFilterViewModel.js +1 -1
  430. package/widgets/CatalogLayerList/CatalogLayerListViewModel.js +1 -1
  431. package/widgets/CatalogLayerList.js +1 -1
  432. package/widgets/Compass/CompassViewModel.js +1 -1
  433. package/widgets/CoordinateConversion/support/Format.js +1 -1
  434. package/widgets/CoordinateConversion/support/formatUtils.js +1 -1
  435. package/widgets/Daylight/DaylightViewModel.js +1 -1
  436. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DViewModel.js +1 -1
  437. package/widgets/Editor/EditorViewModel.d.ts +0 -1
  438. package/widgets/Editor/support/SketchController.js +1 -1
  439. package/widgets/Editor.d.ts +0 -1
  440. package/widgets/ElevationProfile/ElevationProfileLine.js +1 -1
  441. package/widgets/ElevationProfile/ElevationProfileViewModel.js +1 -1
  442. package/widgets/ElevationProfile/support/chartUtils.js +1 -1
  443. package/widgets/Expand/ExpandViewModel.js +1 -1
  444. package/widgets/Expand.js +1 -1
  445. package/widgets/Feature/FeatureMedia.js +1 -1
  446. package/widgets/Feature/FeatureViewModel.js +1 -1
  447. package/widgets/Feature.js +1 -1
  448. package/widgets/FeatureForm.js +1 -1
  449. package/widgets/FeatureTemplates.js +1 -1
  450. package/widgets/Features/FeaturesViewModel.js +1 -1
  451. package/widgets/Features.js +1 -1
  452. package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
  453. package/widgets/Fullscreen/FullscreenViewModel.js +1 -1
  454. package/widgets/Histogram/HistogramViewModel.js +1 -1
  455. package/widgets/Histogram.js +1 -1
  456. package/widgets/HistogramRangeSlider/HistogramRangeSliderViewModel.js +1 -1
  457. package/widgets/Home/HomeViewModel.js +1 -1
  458. package/widgets/LayerList/LayerListViewModel.js +1 -1
  459. package/widgets/Legend/LegendViewModel.js +1 -1
  460. package/widgets/Legend/styles/card/CardView.js +1 -1
  461. package/widgets/Legend/styles/classic/ClassicView.js +1 -1
  462. package/widgets/Locate/LocateViewModel.js +1 -1
  463. package/widgets/Locate.js +1 -1
  464. package/widgets/NavigationToggle/NavigationToggleViewModel.js +1 -1
  465. package/widgets/NavigationToggle.js +1 -1
  466. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  467. package/widgets/OrientedImageryViewer/galleryUtils.js +1 -1
  468. package/widgets/OrientedImageryViewer/services/SuperimposeService.js +1 -1
  469. package/widgets/OrientedImageryViewer/support/urlUtils.js +1 -1
  470. package/widgets/ScaleRangeSlider/ScaleRangeSliderViewModel.js +1 -1
  471. package/widgets/Search.js +1 -1
  472. package/widgets/ShadowCast/DiscreteOptions.js +1 -1
  473. package/widgets/ShadowCast/DurationOptions.js +1 -1
  474. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  475. package/widgets/ShadowCast/ThresholdOptions.js +1 -1
  476. package/widgets/Sketch/SketchViewModel.d.ts +0 -1
  477. package/widgets/Sketch.d.ts +0 -1
  478. package/widgets/Sketch.js +1 -1
  479. package/widgets/Slider/SliderViewModel.js +1 -1
  480. package/widgets/Slider.js +1 -1
  481. package/widgets/TableList/TableListViewModel.js +1 -1
  482. package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
  483. package/widgets/Weather/WeatherViewModel.js +1 -1
  484. package/widgets/Widget.js +1 -1
  485. package/widgets/Zoom/ZoomViewModel.js +1 -1
  486. package/widgets/support/AnalysisViewModelMixin.js +1 -1
  487. package/widgets/support/GridControls.js +1 -1
  488. package/widgets/support/dateUtils.js +1 -1
  489. package/assets/esri/core/workers/chunks/00d43f02119167531d1b.js +0 -1
  490. package/assets/esri/core/workers/chunks/059cda6f11a91dbc9e28.js +0 -1
  491. package/assets/esri/core/workers/chunks/0696fa44a04b99738d7b.js +0 -1
  492. package/assets/esri/core/workers/chunks/073f0232135f71b6c7a5.js +0 -1
  493. package/assets/esri/core/workers/chunks/091ec4fe83038f3558f4.js +0 -1
  494. package/assets/esri/core/workers/chunks/098ac10877d92fde1006.js +0 -1
  495. package/assets/esri/core/workers/chunks/0a29d87b6e58a3c6df8f.js +0 -1
  496. package/assets/esri/core/workers/chunks/0bf43d80cb40c2b43333.js +0 -1
  497. package/assets/esri/core/workers/chunks/0d04353843ccb7440342.js +0 -1
  498. package/assets/esri/core/workers/chunks/1132e28aaa5825b10b6e.js +0 -1
  499. package/assets/esri/core/workers/chunks/123541f79be7adff0818.js +0 -1
  500. package/assets/esri/core/workers/chunks/1380cec385426673f294.js +0 -1
  501. package/assets/esri/core/workers/chunks/1866f832e5f52958bc97.js +0 -1
  502. package/assets/esri/core/workers/chunks/19e51cbb354954ddafbd.js +0 -1
  503. package/assets/esri/core/workers/chunks/1b24a40c0fa197014873.js +0 -1
  504. package/assets/esri/core/workers/chunks/1c7096eb48a3a7f27d4f.js +0 -1
  505. package/assets/esri/core/workers/chunks/1cc03067f8405285057c.js +0 -1
  506. package/assets/esri/core/workers/chunks/1deca3de77b1a9a07da4.js +0 -1
  507. package/assets/esri/core/workers/chunks/1f76f6dcdae9f55389cb.js +0 -1
  508. package/assets/esri/core/workers/chunks/1fd82fcba2758741996a.js +0 -1
  509. package/assets/esri/core/workers/chunks/21e1d423ee33f916547e.js +0 -1
  510. package/assets/esri/core/workers/chunks/23f3692c7426173e8352.js +0 -1
  511. package/assets/esri/core/workers/chunks/247617c0dbae2386ab3b.js +0 -1
  512. package/assets/esri/core/workers/chunks/25657f70c5f04a4ed978.js +0 -1
  513. package/assets/esri/core/workers/chunks/2853606099602f73d379.js +0 -1
  514. package/assets/esri/core/workers/chunks/28ed020d9995b6577be5.js +0 -1
  515. package/assets/esri/core/workers/chunks/2b27d3bc492e000bbe58.js +0 -1
  516. package/assets/esri/core/workers/chunks/2d64a13c2303e9cae613.js +0 -1
  517. package/assets/esri/core/workers/chunks/2dfe6af28cd1b29d5ebc.js +0 -1
  518. package/assets/esri/core/workers/chunks/305eeaac0b4d5b79ebde.js +0 -1
  519. package/assets/esri/core/workers/chunks/353976c812ebf0c98549.js +0 -1
  520. package/assets/esri/core/workers/chunks/3b5e9e0b180dc10491ec.js +0 -1
  521. package/assets/esri/core/workers/chunks/46edd6c9ed6701e6b975.js +0 -1
  522. package/assets/esri/core/workers/chunks/4caebb64a365da18453f.js +0 -1
  523. package/assets/esri/core/workers/chunks/4d8833f48348cbbcc947.js +0 -1
  524. package/assets/esri/core/workers/chunks/4e17665dd9048c300d87.js +0 -1
  525. package/assets/esri/core/workers/chunks/4e4f747de424941a0bfa.js +0 -1
  526. package/assets/esri/core/workers/chunks/4e8e322b469657ac22e2.js +0 -1
  527. package/assets/esri/core/workers/chunks/5396b6e99a0546a25d19.js +0 -1
  528. package/assets/esri/core/workers/chunks/553a8bf5bc5c56d1bcaf.js +0 -1
  529. package/assets/esri/core/workers/chunks/55c0c074e4afe05f5d4d.js +0 -1
  530. package/assets/esri/core/workers/chunks/598ba405e93ebccf7b2d.js +0 -1
  531. package/assets/esri/core/workers/chunks/5bfb962ca192f90a2724.js +0 -1
  532. package/assets/esri/core/workers/chunks/60c8eedd06080edab3e3.js +0 -1
  533. package/assets/esri/core/workers/chunks/61d36730564c5ac5edab.js +0 -1
  534. package/assets/esri/core/workers/chunks/6588725275c75fae0d9c.js +0 -1
  535. package/assets/esri/core/workers/chunks/661c6324529dd17b297e.js +0 -1
  536. package/assets/esri/core/workers/chunks/6699fac01ccd842851ba.js +0 -1
  537. package/assets/esri/core/workers/chunks/672a5390182b20d632be.js +0 -1
  538. package/assets/esri/core/workers/chunks/67caef2ecf0dc5f2eed3.js +0 -1
  539. package/assets/esri/core/workers/chunks/68dd1fd2025c7125ead1.js +0 -1
  540. package/assets/esri/core/workers/chunks/68fd7b314377d27aaa54.js +0 -1
  541. package/assets/esri/core/workers/chunks/69627b2634da64dd885f.js +0 -1
  542. package/assets/esri/core/workers/chunks/6f2e7e663229b223b4df.js +0 -1
  543. package/assets/esri/core/workers/chunks/7390af96250e89194332.js +0 -1
  544. package/assets/esri/core/workers/chunks/7b45ac83e279fe9516a5.js +0 -1
  545. package/assets/esri/core/workers/chunks/7e0ed6e8f7b77e43f628.js +0 -1
  546. package/assets/esri/core/workers/chunks/832c887fdc5af4c08cf2.js +0 -1
  547. package/assets/esri/core/workers/chunks/84fb27e3425515cd0e3f.js +0 -1
  548. package/assets/esri/core/workers/chunks/8502274806ea52308822.js +0 -1
  549. package/assets/esri/core/workers/chunks/8b0be232723424dda320.js +0 -1
  550. package/assets/esri/core/workers/chunks/8b0efcc30184593a0812.js +0 -1121
  551. package/assets/esri/core/workers/chunks/8b38fad017c4c0d9e1ec.js +0 -1
  552. package/assets/esri/core/workers/chunks/8c3779de09291170497f.js +0 -1
  553. package/assets/esri/core/workers/chunks/8e391b5b82429f39791e.js +0 -1
  554. package/assets/esri/core/workers/chunks/8e6276ddd8d094c61f08.js +0 -1
  555. package/assets/esri/core/workers/chunks/90d797ab82d4a68ba32f.js +0 -1
  556. package/assets/esri/core/workers/chunks/96f87c8efd4b11b37686.js +0 -1
  557. package/assets/esri/core/workers/chunks/9826baa3c15ea2062669.js +0 -1
  558. package/assets/esri/core/workers/chunks/98958203a5ca45b24d72.js +0 -1
  559. package/assets/esri/core/workers/chunks/9c3de54513bf8619271c.js +0 -1
  560. package/assets/esri/core/workers/chunks/a125650edbed802e419a.js +0 -1
  561. package/assets/esri/core/workers/chunks/a18c3cbe505a19d29569.js +0 -1
  562. package/assets/esri/core/workers/chunks/a5f17e9a025ac2b6e1bf.js +0 -1
  563. package/assets/esri/core/workers/chunks/a6e846361bf5dd3a11c7.js +0 -1
  564. package/assets/esri/core/workers/chunks/ac107079342251a984dd.js +0 -1
  565. package/assets/esri/core/workers/chunks/acf4737ba509cbd73cce.js +0 -1
  566. package/assets/esri/core/workers/chunks/af2087b75225d7d7dbd8.js +0 -1
  567. package/assets/esri/core/workers/chunks/b386e921c273de3ac7a5.js +0 -1
  568. package/assets/esri/core/workers/chunks/b3aa29589dcfb5b93106.js +0 -1
  569. package/assets/esri/core/workers/chunks/b7205620ca248f4efc88.js +0 -1
  570. package/assets/esri/core/workers/chunks/c0eb27263f608dc3684b.js +0 -1
  571. package/assets/esri/core/workers/chunks/c5364ff8dd1358af3603.js +0 -1
  572. package/assets/esri/core/workers/chunks/ca21786e519c914fc9e1.js +0 -1
  573. package/assets/esri/core/workers/chunks/cd46d9b4a8de644e7332.js +0 -1
  574. package/assets/esri/core/workers/chunks/da1e6962ba0c85c37953.js +0 -1
  575. package/assets/esri/core/workers/chunks/dcdf837a452dc0cac582.js +0 -1
  576. package/assets/esri/core/workers/chunks/e0864ca82ffa3c9a0776.js +0 -1
  577. package/assets/esri/core/workers/chunks/e69cd62f824ce7a22fa0.js +0 -1
  578. package/assets/esri/core/workers/chunks/e9457a67befc61e11095.js +0 -1
  579. package/assets/esri/core/workers/chunks/efc1a90742813b55602e.js +0 -1
  580. package/assets/esri/core/workers/chunks/f190a3124d6d03417d73.js +0 -1
  581. package/assets/esri/core/workers/chunks/f4135779bfdaf349352a.js +0 -1
  582. package/assets/esri/core/workers/chunks/f6bd7b52745b82ba73dc.js +0 -1
  583. package/assets/esri/core/workers/chunks/f6f5937a1308f28bb959.js +0 -1
  584. package/assets/esri/core/workers/chunks/fc77eb7683e708774168.js +0 -1
  585. package/assets/esri/core/workers/chunks/fd967a9f3cf0e2890dbb.js +0 -1
  586. package/assets/esri/core/workers/chunks/fe24e039385473bf77f9.js +0 -1
  587. package/assets/esri/core/workers/chunks/fecaf0bc28aeea4d15db.js +0 -1
  588. package/assets/esri/themes/base/widgets/_UtilityNetworkValidateTopology.scss +0 -46
  589. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.ar.json +0 -1
  590. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.bg.json +0 -1
  591. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.bs.json +0 -1
  592. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.ca.json +0 -1
  593. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.cs.json +0 -1
  594. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.da.json +0 -1
  595. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.de.json +0 -1
  596. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.el.json +0 -1
  597. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.en.json +0 -1
  598. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.es.json +0 -1
  599. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.et.json +0 -1
  600. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.fi.json +0 -1
  601. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.fr.json +0 -1
  602. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.he.json +0 -1
  603. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.hr.json +0 -1
  604. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.hu.json +0 -1
  605. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.id.json +0 -1
  606. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.it.json +0 -1
  607. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.ja.json +0 -1
  608. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.ko.json +0 -1
  609. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.lt.json +0 -1
  610. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.lv.json +0 -1
  611. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.nl.json +0 -1
  612. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.no.json +0 -1
  613. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.pl.json +0 -1
  614. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.pt-BR.json +0 -1
  615. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.pt-PT.json +0 -1
  616. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.ro.json +0 -1
  617. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.ru.json +0 -1
  618. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.sk.json +0 -1
  619. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.sl.json +0 -1
  620. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.sr.json +0 -1
  621. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.sv.json +0 -1
  622. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.th.json +0 -1
  623. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.tr.json +0 -1
  624. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.uk.json +0 -1
  625. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.vi.json +0 -1
  626. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.zh-CN.json +0 -1
  627. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.zh-HK.json +0 -1
  628. package/assets/esri/widgets/UtilityNetworkValidateTopology/t9n/messages.zh-TW.json +0 -1
  629. package/views/2d/engine/vectorTiles/style/VectorTilePbfWriter.js +0 -2
  630. package/views/2d/engine/vectorTiles/style/encodeVectorTileFeatures.js +0 -2
  631. package/views/2d/layers/features/support/FeatureSetReaderVectorTileFeatureCursor.js +0 -2
  632. package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.d.ts +0 -72
  633. package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +0 -2
  634. package/widgets/UtilityNetworkValidateTopology.d.ts +0 -130
  635. package/widgets/UtilityNetworkValidateTopology.js +0 -2
  636. /package/views/2d/engine/vectorTiles/{Feature.js → PbfFeature.js} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{BufferViewUint32 as e,BufferViewVec3f as t,BufferViewVec2Snorm16 as n,BufferViewSnorm16 as r,BufferViewFloat16 as i,BufferViewFloat as a,BufferViewVec2f as o,BufferViewVec4Unorm8 as s,BufferViewUnorm8 as c}from"../../../../geometry/support/buffer/BufferView.js";import{maxPathFrameIndex as l}from"../../layers/graphics/Graphics3DPathSymbolLayerConstants.js";import{isShadowLike as u,is3DGeometry as d,isColor as f}from"../core/shaderLibrary/ShaderOutput.js";import{olidEnabled as p}from"../effects/geometry/olidUtils.js";import m from"../lib/GLMaterial.js";import{pathVertexInfoPacking as h}from"../lib/PathVertexInfo.js";import{intersectTriangleGeometry as g}from"../lib/RayIntersections.js";import{intersectTriangleGeometryWithScreenPolygon as _}from"../lib/screenPolygonTriangleIntersections.js";import{assert as v}from"../lib/Util.js";import{applyPolygonOffsetToHit as y}from"./intersectWithPolygonOffset.js";import{getLayout as b,getTextureLayout as x}from"./PathLayouts.js";import{PathPassParameters as S,PathTechnique as C}from"./PathTechnique.js";import{PathTechniqueConfiguration as w}from"./PathTechniqueConfiguration.js";import{TriangleMaterial as T}from"./TriangleMaterial.js";import{writeAttributes as E,writePosition as D,writeBufferVec2 as O,writeBufferInt16 as k,writeBufferFloat16 as A,writeBufferFloat as j,writeColor as M,writeBufferUint8 as N}from"./internal/bufferWriterUtils.js";import{hasShadowHighlights as P}from"../shaders/ReceiveShadowsConfiguration.js";import{alphaCutoff as F}from"../../../../webscene/support/AlphaCutoff.js";class I extends T{constructor(e,t){super(e,R),this.supportsEdges=!0,this.produces=new Map([[2,e=>(this.parameters.castShadows&&u(e)||d(e))&&!this.transparent],[4,e=>(this.parameters.castShadows&&u(e)||d(e))&&this.transparent]]),this._configuration=new w(t.spherical)}get emissions(){return this.parameters.emissiveStrength>0?this.transparent?2:1:0}updateConfiguration(e){super.updateConfiguration(e),this._configuration.hasVVSize=this.parameters.hasVVSize,this._configuration.hasVVColor=this.parameters.hasVVColor,this._configuration.hasVVOpacity=this.parameters.hasVVOpacity,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.transparent=this.transparent,this._configuration.hasOccludees=e.hasOccludees,this._configuration.cullFace=this.parameters.hasSlicePlane?0:this.parameters.cullFace,this._configuration.pathJoinType=this.parameters.pathJoinType,this._configuration.offsetBackfaces=this.transparent,f(e.output)?(this._configuration.receiveShadows=e.shadowMap.enabled,this._configuration.hasShadowHighlights=P(this._configuration,e),this._configuration.receiveAmbientOcclusion=e.ssao!=null,this._configuration.receiveGlobalIllumination=e.globalIlluminationEnabled):this._configuration.receiveShadows=this._configuration.hasShadowHighlights=this._configuration.receiveAmbientOcclusion=this._configuration.receiveGlobalIllumination=!1,this._configuration.pbrMode=this.parameters.usePBR?2:0,this._configuration.emissionSource=+!!this.emissions,this._configuration.snowCover=e.snowCover>0,this._configuration.upVectorAlignment=this.parameters.upVectorAlignment,this._configuration.pathCapType=this.parameters.pathCapType,this._configuration.pathProfileType=this.parameters.profile.type,this._configuration.hasPathSize=this.parameters.hasPathSize,this._configuration.hasPathColor=this.parameters.hasPathColor,this._configuration.hasPathOpacity=this.parameters.hasPathOpacity}isVisibleForOutput(e){return e===5||e===7||e===6?this.parameters.castShadows:!0}get visible(){return this.parameters.opacity>=F}intersectRay(e,t,n,r,i,a){g(e,n,r,i,null,a)}intersectRayDraped(){}intersectScreenPolygonDraped(){return null}intersectScreenPolygon(e,t,n,r){return y(_(e,n,t,r,null),this._configuration,n.camera.eye)}createBufferWriter(){return new z(b(),x(this.parameters))}createGLMaterial(e){return new L(e)}get transparent(){return this.parameters.drivenOpacity||this.parameters.opacity<1}}class L extends m{beginSlot(e){return this.getTechnique(C,e)}}class R extends S{constructor(){super(...arguments),this.polygonOffset=0,this.castShadows=!0,this.hasSlicePlane=!1,this.drivenOpacity=!1,this.usePBR=!1,this.upVectorAlignment=0,this.pathCapType=1,this.cullFace=2,this.pathJoinType=1}}class z{constructor(e,t){this.layout=e,this.textureBufferLayout=t,this.maxTextureBufferItemIndex=l}elementCount(e){return e.get(`pathVertexInfo`)?.indices.length??0}elementCountTextureBuffer(e){return e.get(`position`)?.indices.length??0}write(e,t,n,r,i,a){r!=null&&this._writeVertexBuffer(e,t,n,r,i),a!=null&&this._writeTextureBuffer(e,n,a)}_writeVertexBuffer(t,n,r,i,a){E(r,this.layout,t,n,i);let o=a?.from??0,s=i.buffer.getField(`pathVertexInfo`,e),c=r.get(`pathVertexInfo`);if(s&&c){v(c.size===1);let{data:e,stride:t,indices:n}=c,r=h.getField(0);for(let a=0;a<n.length;++a){let c=e[t*n[a]],l=r.get(c)+o;v(l>=0&&l<=r.max,`Path frame index out of range`),s.set(i.offset+a,r.set(c,l))}}}_writeTextureBuffer(e,l,u){let d=u.offset,f=u.buffer.getField(`position`,t),m=l.get(`position`);f&&m&&(v(m.size===3),D(m,e,f,d));let h=u.buffer.getField(`profileRight`,n),g=l.get(`profileRight`);h&&g&&(v(g.size===2),O(g,h,d));let _=u.buffer.getField(`profileUp`,n),y=l.get(`profileUp`);_&&y&&(v(y.size===2),O(y,_,d));let b=u.buffer.getField(`profileRotation`,r),x=l.get(`profileRotation`);b&&x&&(v(x.size===1),k(x,b,d));let S=u.buffer.getField(`pathRotationUp`,n),C=l.get(`pathRotationUp`);S&&C&&(v(C.size===2),O(C,S,d));let w=u.buffer.getField(`pathMaxStretchDistance`,i),T=l.get(`pathMaxStretchDistance`);w&&T&&(v(T.size===1),A(T,w,d));let E=u.buffer.getField(`sizeFeatureAttribute`,a),P=l.get(`sizeFeatureAttribute`);E&&P&&j(P,E,d);let F=u.buffer.getField(`size`,o),I=l.get(`size`);F&&I&&(v(I.size===2),O(I,F,d));let L=u.buffer.getField(`colorFeatureAttribute`,a),R=l.get(`colorFeatureAttribute`);L&&R&&j(R,L,d);let z=u.buffer.getField(`color`,s),B=l.get(`color`);z&&B&&M(B,4,z,d);let V=u.buffer.getField(`opacityFeatureAttribute`,a),H=l.get(`opacityFeatureAttribute`);V&&H&&j(H,V,d);let U=u.buffer.getField(`opacity`,c),W=l.get(`opacity`);if(U&&W&&(v(W.size===1),N(W,U,d)),p()){let e=u.buffer.getField(`olidColor`,s),t=m?.indices.length??0,n=l.get(`olidColor`);n&&e&&t&&M(n,4,e,d)}}}export{R as Parameters,z as PathBufferWriter,I as PathMaterial};
2
+ import{BufferViewUint32 as e,BufferViewVec3f as t,BufferViewVec2Snorm16 as n,BufferViewSnorm16 as r,BufferViewFloat16 as i,BufferViewFloat as a,BufferViewVec2f as o,BufferViewVec4Unorm8 as s,BufferViewUnorm8 as c}from"../../../../geometry/support/buffer/BufferView.js";import{maxPathFrameIndex as l}from"../../layers/graphics/Graphics3DPathSymbolLayerConstants.js";import{isShadowLike as u,is3DGeometry as d}from"../core/shaderLibrary/ShaderOutput.js";import{olidEnabled as f}from"../effects/geometry/olidUtils.js";import p from"../lib/GLMaterial.js";import{pathVertexInfoPacking as m}from"../lib/PathVertexInfo.js";import{intersectTriangleGeometry as h}from"../lib/RayIntersections.js";import{intersectTriangleGeometryWithScreenPolygon as g}from"../lib/screenPolygonTriangleIntersections.js";import{assert as _}from"../lib/Util.js";import{applyPolygonOffsetToHit as v}from"./intersectWithPolygonOffset.js";import{getLayout as y,getTextureLayout as b}from"./PathLayouts.js";import{PathPassParameters as x,PathTechnique as S}from"./PathTechnique.js";import{PathTechniqueConfiguration as C}from"./PathTechniqueConfiguration.js";import{TriangleMaterial as w}from"./TriangleMaterial.js";import{writeAttributes as T,writePosition as E,writeBufferVec2 as D,writeBufferInt16 as O,writeBufferFloat16 as k,writeBufferFloat as A,writeColor as j,writeBufferUint8 as M}from"./internal/bufferWriterUtils.js";import{configureShadedMaterial as N}from"../shaders/ShadedMaterialConfiguration.js";import{alphaCutoff as P}from"../../../../webscene/support/AlphaCutoff.js";class F extends w{constructor(e,t){super(e,L),this.supportsEdges=!0,this.produces=new Map([[2,e=>(this.parameters.castShadows&&u(e)||d(e))&&!this.transparent],[4,e=>(this.parameters.castShadows&&u(e)||d(e))&&this.transparent]]),this._configuration=new C(t.spherical)}get emissions(){return this.parameters.emissiveStrength>0?this.transparent?2:1:0}updateConfiguration(e){super.updateConfiguration(e),N(this._configuration,e,this.parameters),this._configuration.hasVVSize=this.parameters.hasVVSize,this._configuration.hasVVColor=this.parameters.hasVVColor,this._configuration.hasVVOpacity=this.parameters.hasVVOpacity,this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.transparent=this.transparent,this._configuration.hasOccludees=e.hasOccludees,this._configuration.cullFace=this.parameters.hasSlicePlane?0:this.parameters.cullFace,this._configuration.pathJoinType=this.parameters.pathJoinType,this._configuration.offsetBackfaces=this.transparent,this._configuration.pbrMode=this.parameters.usePBR?2:0,this._configuration.emissionSource=+!!this.emissions,this._configuration.snowCover=e.snowCover>0,this._configuration.upVectorAlignment=this.parameters.upVectorAlignment,this._configuration.pathCapType=this.parameters.pathCapType,this._configuration.pathProfileType=this.parameters.profile.type,this._configuration.hasPathSize=this.parameters.hasPathSize,this._configuration.hasPathColor=this.parameters.hasPathColor,this._configuration.hasPathOpacity=this.parameters.hasPathOpacity}isVisibleForOutput(e){return e===5||e===7||e===6?this.parameters.castShadows:!0}get visible(){return this.parameters.opacity>=P}intersectRay(e,t,n,r,i,a){h(e,n,r,i,null,a)}intersectRayDraped(){}intersectScreenPolygonDraped(){return null}intersectScreenPolygon(e,t,n,r){return v(g(e,n,t,r,null),this._configuration,n.camera)}createBufferWriter(){return new R(y(),b(this.parameters))}createGLMaterial(e){return new I(e)}get transparent(){return this.parameters.drivenOpacity||this.parameters.opacity<1}}class I extends p{beginSlot(e){return this.getTechnique(S,e)}}class L extends x{constructor(){super(...arguments),this.polygonOffset=0,this.shadingEnabled=!0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.hasSlicePlane=!1,this.drivenOpacity=!1,this.usePBR=!1,this.upVectorAlignment=0,this.pathCapType=1,this.cullFace=2,this.pathJoinType=1}}class R{constructor(e,t){this.layout=e,this.textureBufferLayout=t,this.maxTextureBufferItemIndex=l}elementCount(e){return e.get(`pathVertexInfo`)?.indices.length??0}elementCountTextureBuffer(e){return e.get(`position`)?.indices.length??0}write(e,t,n,r,i,a){r!=null&&this._writeVertexBuffer(e,t,n,r,i),a!=null&&this._writeTextureBuffer(e,n,a)}_writeVertexBuffer(t,n,r,i,a){T(r,this.layout,t,n,i);let o=a?.from??0,s=i.buffer.getField(`pathVertexInfo`,e),c=r.get(`pathVertexInfo`);if(s&&c){_(c.size===1);let{data:e,stride:t,indices:n}=c,r=m.getField(0);for(let a=0;a<n.length;++a){let c=e[t*n[a]],l=r.get(c)+o;_(l>=0&&l<=r.max,`Path frame index out of range`),s.set(i.offset+a,r.set(c,l))}}}_writeTextureBuffer(e,l,u){let d=u.offset,p=u.buffer.getField(`position`,t),m=l.get(`position`);p&&m&&(_(m.size===3),E(m,e,p,d));let h=u.buffer.getField(`profileRight`,n),g=l.get(`profileRight`);h&&g&&(_(g.size===2),D(g,h,d));let v=u.buffer.getField(`profileUp`,n),y=l.get(`profileUp`);v&&y&&(_(y.size===2),D(y,v,d));let b=u.buffer.getField(`profileRotation`,r),x=l.get(`profileRotation`);b&&x&&(_(x.size===1),O(x,b,d));let S=u.buffer.getField(`pathRotationUp`,n),C=l.get(`pathRotationUp`);S&&C&&(_(C.size===2),D(C,S,d));let w=u.buffer.getField(`pathMaxStretchDistance`,i),T=l.get(`pathMaxStretchDistance`);w&&T&&(_(T.size===1),k(T,w,d));let N=u.buffer.getField(`sizeFeatureAttribute`,a),P=l.get(`sizeFeatureAttribute`);N&&P&&A(P,N,d);let F=u.buffer.getField(`size`,o),I=l.get(`size`);F&&I&&(_(I.size===2),D(I,F,d));let L=u.buffer.getField(`colorFeatureAttribute`,a),R=l.get(`colorFeatureAttribute`);L&&R&&A(R,L,d);let z=u.buffer.getField(`color`,s),B=l.get(`color`);z&&B&&j(B,4,z,d);let V=u.buffer.getField(`opacityFeatureAttribute`,a),H=l.get(`opacityFeatureAttribute`);V&&H&&A(H,V,d);let U=u.buffer.getField(`opacity`,c),W=l.get(`opacity`);if(U&&W&&(_(W.size===1),M(W,U,d)),f()){let e=u.buffer.getField(`olidColor`,s),t=m?.indices.length??0,n=l.get(`olidColor`);n&&e&&t&&j(n,4,e,d)}}}export{L as Parameters,R as PathBufferWriter,F as PathMaterial};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import e from"../../../../core/Logger.js";import{clamp as t}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as n,createScreenPointArray as r}from"../../../../core/screenUtils.js";import{secondsFromMilliseconds as i,Seconds as a}from"../../../../core/time.js";import{copy as o,set as s}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{set as l,subtract as u,dot as d,scale as f,add as p,copy as m,length as h,distance as g,lerp as _,transformMat4 as v,normalize as y,applyTranslation as b}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as x}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as ee}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{fromPoints as S,distance2 as te,closestLineSegmentPoint as ne,projectPoint as re,projectPointFraction as ie,create as ae}from"../../../../geometry/support/lineSegment.js";import{fromPoints as C,signedDistance as w,getNormal as oe,create as T}from"../../../../geometry/support/plane.js";import{BufferViewUint32 as E,BufferViewVec3f as se}from"../../../../geometry/support/buffer/BufferView.js";import{isHighlightOrOLID as ce,isColor as D,isDepth as le,isColorHighlightOLIDOrDepth as ue,is2DGeometryOutput as de}from"../core/shaderLibrary/ShaderOutput.js";import{getScalarAttributeView as fe}from"../lib/attributeViewUtils.js";import pe from"../lib/GLMaterial.js";import{LineMaterial as me}from"../lib/LineMaterial.js";import{ribbonLineVertexInfoPacking as O}from"../lib/RibbonLineVertexInfo.js";import{projectWorldLineSegmentToRenderScreen as he,screenPolygonIntersectsBufferedSegment as ge}from"../lib/screenPolygonOverlapUtils.js";import{Hit as _e,DrapedHit as ve}from"../lib/screenPolygonTriangleIntersections.js";import{ScreenSizePerspectiveEvaluator as ye}from"../lib/screenSizePerspectiveUtils.js";import{isTranslationMatrix as be,assert as k}from"../lib/Util.js";import{createVerticesView as xe}from"../lib/VerticesView.js";import{isImagePattern as Se}from"./lineStippleUtils.js";import{VisualVariablePassParameters as Ce}from"./VisualVariablePassParameters.js";import{getNumJoinSubdivisions as we,getRibbonLinePositions as A,isClosed as j,ribbonLineVertexCount as Te,writeRibbonLineTextureBuffer as Ee,writeRibbonLineVertices as De}from"./internal/ribbonLineBufferUtils.js";import{intersectRayWithWorldSizedLineSegment as Oe,intersectScreenPolygonWithWorldSizedLineSegment as ke}from"./internal/worldSizedRibbonLineIntersectionUtils.js";import{getLayout as Ae,getTextureBufferLayout as je}from"../shaders/RibbonLineLayouts.js";import{RibbonLineTechnique as Me}from"../shaders/RibbonLineTechnique.js";import{RibbonLineTechniqueConfiguration as Ne}from"../shaders/RibbonLineTechniqueConfiguration.js";import{alphaCutoff as Pe}from"../../../../webscene/support/AlphaCutoff.js";class Fe extends me{constructor(e,t){super(e,Le),this.produces=new Map([[2,e=>ce(e)||D(e)&&this.parameters.renderOccluded===8],[3,e=>le(e)],[10,e=>ue(e)&&this.parameters.renderOccluded===8],[11,e=>ue(e)&&this.parameters.renderOccluded===8],[4,e=>D(e)&&this.parameters.writeDepth&&this.parameters.renderOccluded!==8],[8,e=>D(e)&&!this.parameters.writeDepth&&this.parameters.renderOccluded!==8],[18,e=>de(e)]]),this._configuration=new Ne(t.state.isGlobal),this._isAssumedMetalDriver=t.stage.renderer.renderContext.rctx.isAssumedMetalDriver}updateConfiguration(e){super.updateConfiguration(e),this._configuration.useFlatJoinVarying=!this._isAssumedMetalDriver;let t=this.parameters.stipplePattern!=null&&this.parameters.stippleTexture!=null&&e.output!==10,n=t&&this.parameters.isImagePattern()&&this._configuration.draped,r=this.parameters.usesWorldSizedWidth(n);this._configuration.polygonOffset=this.parameters.polygonOffset,this._configuration.stippleEnabled=t,this._configuration.stippleOffColorEnabled=t&&this.parameters.stippleOffColor!=null,this._configuration.stipplePreferContinuous=t&&this.parameters.stipplePreferContinuous,this._configuration.numJoinSubdivisions=we(this.parameters.join,t),this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.roundJoins=this.parameters.join===`round`,this._configuration.capType=this.parameters.cap,this._configuration.applyMarkerOffset=this.parameters.markerParameters!=null&&Be(this.parameters.markerParameters),this._configuration.polygonOffsetIndex=this.parameters.polygonOffsetIndex,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.innerColorEnabled=this.parameters.innerWidth>0&&this.parameters.innerColor!=null,this._configuration.falloffEnabled=this.parameters.falloff>0,this._configuration.wireframe=this.parameters.wireframe,this._configuration.animation=this.parameters.animation,this._configuration.emissionSource=+!!this.emissions,this._configuration.hasScreenSizePerspective=!!this.parameters.screenSizePerspective&&!r,this._configuration.worldSized=r,this._configuration.imagePattern=n,this._configuration.hasVertexColor=this.parameters.hasVertexColor,this._configuration.hasVertexSize=this.parameters.hasVertexSize,this._configuration.hasLineDistance=this.parameters.hasLineDistance}get visible(){return this.parameters.color[3]>=Pe||this.parameters.stipplePattern!=null&&(this.parameters.stippleOffColor?.[3]??0)>Pe}get emissions(){return this.parameters.emissiveStrength>0?this.parameters.renderOccluded===8?1:2:0}setParameters(e,t){e.animation=this.parameters.animation,super.setParameters(e,t)}intersectRayDraped(e,n,r,i,a,o,s){if(!n.options.selectionMode)return;let c=this._getLineSize(e,!0),l=A(e,!!this.parameters.isClosed),u=r[0],d=r[1],f=M(c,o,s,this.parameters.usesWorldSizedWidth()),p=Number.MAX_VALUE,m=0;for(let e of ze(F,I,l,j(this.parameters,l.count))){let n=u-F[0],r=d-F[1],i=I[0]-F[0],a=I[1]-F[1],o=i*n+a*r,s=i*i+a*a,c=t(o/s,0,1),l=i*c-n,f=a*c-r,h=l*l+f*f;h<p&&(p=h,m=e)}p<f*f&&i(a.distance,a.renderDistance,a.normal,m)}intersectRay(t,n,r,i,a,o){let{options:s,camera:c}=r;if(!s.selectionMode||!t.visible||!c)return;if(!be(n)){e.getLogger(`esri.views.3d.webgl-engine.materials.RibbonLineMaterial`).error(`intersection assumes a translation-only matrix`);return}let l=this._getLineSize(t);this.parameters.worldSized?this._intersectRayWithWorldSizedLine(t,n,r,l,o):this._intersectRayWithScreenSizedLine(t,n,r,l,o)}_intersectRayWithScreenSizedLine(e,t,n,r,i){let{camera:a}=n,s=A(e,!!this.parameters.isClosed),c=V;o(c,n.point);let _=r*a.pixelRatio,v=$*a.pixelRatio,y=_/2+v;l(q[0],c[0]-y,c[1]+y,0),l(q[1],c[0]+y,c[1]+y,0),l(q[2],c[0]+y,c[1]-y,0),l(q[3],c[0]-y,c[1]-y,0);for(let e=0;e<4;e++)if(!a.unprojectFromRenderScreen(q[e],J[e]))return;C(a.eye,J[0],J[1],Y),C(a.eye,J[1],J[2],X),C(a.eye,J[2],J[3],Z),C(a.eye,J[3],J[0],Q);let b=Number.MAX_VALUE,x=0;for(let e of this._forEachTransformedLineSegment(N,P,s,t,j(this.parameters,s.count))){if(w(Y,N)<0&&w(Y,P)<0||w(X,N)<0&&w(X,P)<0||w(Z,N)<0&&w(Z,P)<0||w(Q,N)<0&&w(Q,P)<0)continue;let t=a.projectToRenderScreen(N,H),n=a.projectToRenderScreen(P,U);if(t==null||n==null)continue;if(t[2]<0&&n[2]>0){u(z,N,P);let e=a.frustum,n=-w(e[4],N)/d(z,oe(e[4]));if(f(z,z,n),p(N,N,z),!a.projectToRenderScreen(N,t))continue}else if(t[2]>0&&n[2]<0){u(z,P,N);let e=a.frustum,t=-w(e[4],P)/d(z,oe(e[4]));if(f(z,z,t),p(P,P,z),!a.projectToRenderScreen(P,n))continue}else if(t[2]<0&&n[2]<0)continue;t[2]=0,n[2]=0;let i=S(t,n,G),o=te(i,c);if(!(o>=b)){if(this.parameters.screenSizePerspective){let e=this.computeScreenSizePerspectiveWidth(i,N,P,c,a,r,v);if(o>=e*e)continue}b=o,m(Ge,N),m(Ke,P),x=e}}if(b<y*y){let{rayBegin:e,rayEnd:t}=n,r=Number.MAX_VALUE;if(ne(S(Ge,Ke,G),S(e,t,K),B)){u(B,B,e);let n=h(B);f(B,B,1/n),r=n/g(e,t)}i(r,r,B,x)}}_intersectRayWithWorldSizedLine(e,t,n,r,i){let{camera:a,ray:o,metersPerRenderUnit:s}=n,c=A(e,!!this.parameters.isClosed),l=r/(2*s),u=1/0,d=0;for(let e of this._forEachTransformedLineSegment(N,P,c,t,j(this.parameters,c.count))){let t=Oe(N,P,l,a,o,W);if(t!=null&&t<u&&(u=t,d=e,m(B,W),t===0))break}u<1/0&&i(u,u,B,d)}intersectScreenPolygon(t,n,r,i){let{options:a}=r;if(!a.selectionMode||!t.visible)return null;if(!be(n))return e.getLogger(`esri.views.3d.webgl-engine.materials.RibbonLineMaterial`).error(`intersection assumes a translation-only matrix`),null;let o=this._getLineSize(t);return this.parameters.worldSized?this._intersectWorldSizedPolygon(t,n,r,i,o):this._intersectScreenSizedPolygon(t,n,r,i,o)}_intersectScreenSizedPolygon(e,t,n,r,i){let{camera:a,screenPolygonPrimitiveProcessor:o}=n,s=A(e,!!this.parameters.isClosed),c=$,l=c*a.pixelRatio,u=new _e(4);for(let e of this._forEachTransformedLineSegment(N,P,s,t,j(this.parameters,s.count)))for(let[t,n]of o.processLineSegment(Je,N,P)){if(!he(a,t,n,H,U))continue;let o=S(H,U,G),s=i/2+c;this.parameters.screenSizePerspective&&(_(V,H,U,.5),s=Math.max(s,this.computeScreenSizePerspectiveWidth(o,t,n,V,a,i,l)/a.pixelRatio)),a.renderToScreen(H,Ue),a.renderToScreen(U,We),ge(r,Ue,We,s)&&(re(S(t,n,K),a.eye,L),u.updateIfCloserFromValues(g(a.eye,L),e,L,null))}return u}_intersectWorldSizedPolygon(e,t,n,r,i){let{camera:a,screenPolygonPrimitiveProcessor:o,metersPerRenderUnit:s}=n,c=A(e,!!this.parameters.isClosed),l=i/(2*s),u=new _e(4);for(let e of this._forEachTransformedLineSegment(N,P,c,t,j(this.parameters,c.count)))for(let[t,n]of o.processLineSegment(Je,N,P)){re(S(t,n,K),a.eye,L);let i=g(a.eye,L);u.valid&&i>=u.distance||ke(t,n,l,a,r)&&u.updateIfCloserFromValues(i,e,L,null)}return u}intersectScreenPolygonDraped(e,t,n,r,i,a){if(!n.options.selectionMode)return null;let o=this._getLineSize(e,!0),s=A(e,!!this.parameters.isClosed),c=M(o,i,a,this.parameters.usesWorldSizedWidth());for(let e of ze(F,I,s,j(this.parameters,s.count),t))if(ge(r,F,I,c))return new ve(e);return null}createPrimitivePositionReader(e){let t=e.vertex.getField(`ribbonLineVertexInfo`,E),n=e.storage.getField(`position`,se),r=O.getField(0);return(e,i)=>n.getVec(r.get(t.get(i)),e)}computeAttachmentOrigin(e,t,n){return!this.parameters.wireframe&&super.computeAttachmentOrigin(e,t,n)}createBufferWriter(){return new Re(Ae(this.parameters),je(this.parameters),this.parameters)}createGLMaterial(e){return new Ie(e)}validateParameters(e){k(e.hasLineDistance||e.stipplePattern==null,`Patterned ribbon lines require line distances`),e.join!==`miter`&&(e.miterLimit=0),e.markerParameters!=null&&(e.markerScale=e.markerParameters.width/e.width)}update(e){return this.parameters.hasAnimation?(this.setParameters({timeElapsed:i(e.time)},!1),e.dt!==0):!1}computeScreenSizePerspectiveWidth(e,t,n,r,i,a,o){let s=ie(e,r);_(L,t,n,s),v(He,L,i.viewMatrix);let c=h(He),l=this.computeCameraAbsCosAngle(L,i,this._configuration.spherical);return Ve.update(l,c,this.parameters.screenSizePerspective,this.parameters.screenSizePerspectiveMinPixelReferenceSize),Ve.apply(a)*i.pixelRatio/2+o}computeCameraAbsCosAngle(e,t,n){return n?y(B,e):l(B,0,0,1),u(R,e,t.eye),y(R,R),Math.abs(d(B,R))}_getLineSize(e,n=!1){let r=this.parameters.width;if(this.parameters.vvSize){let i=fe(e,`sizeFeatureAttribute`).get(0);Number.isNaN(i)?n&&(r*=this.parameters.vvSize.fallback[0]):r*=t(this.parameters.vvSize.offset[0]+i*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0])}else if(this.parameters.hasVertexSize){let t=fe(e,`size`);t!=null&&(r*=t.get(0))}return r}*_forEachTransformedLineSegment(e,t,n,r,i){let a=i?n.count:n.count-1;for(let i=0;i<a;i++)n.getVec(i,e),b(e,e,r),n.getVec((i+1)%n.count,t),b(t,t,r),yield i}}class Ie extends pe{constructor(){super(...arguments),this._stipplePattern=null}dispose(){super.dispose(),this._stippleTextures?.release(this._stipplePattern),this._stipplePattern=null}beginSlot(e){let{stipplePattern:t}=this._material.parameters;return this._stipplePattern!==t&&(this._material.setParameters({stippleTexture:this._stippleTextures.swap(t,this._stipplePattern)}),this._stipplePattern=t),this.getTechnique(Me,e)}}class Le extends Ce{constructor(){super(...arguments),this._width=0,this.color=ee,this.hasVertexColor=!0,this.hasVertexSize=!0,this.hasLineDistance=!0,this.join=`miter`,this.cap=0,this.miterLimit=5,this.shadingEnabled=!1,this.writeDepth=!0,this.polygonOffset=0,this.polygonOffsetIndex=0,this.stippleTexture=null,this.stipplePreferContinuous=!0,this.markerParameters=null,this.markerScale=1,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.isClosed=!1,this.falloff=0,this.innerWidth=0,this.wireframe=!1,this.timeElapsed=a(0),this.animation=0,this.animationSpeed=1,this.trailLength=1,this.startTime=a(0),this.endTime=a(1/0),this.worldSized=!1}get width(){return this.isImagePattern()?this.stipplePattern.width:this._width}set width(e){this._width=e}get transparent(){return this.color[3]<1||this.hasAnimation||this.stipplePattern!=null&&(this.stippleOffColor?.[3]??0)<1}get hasAnimation(){return this.animation!==0}usesWorldSizedWidth(e=this.isImagePattern()){return this.worldSized||e}isImagePattern(){return Se(this.stipplePattern)&&this.stippleTexture!=null}}class Re{constructor(e,t,n){this.layout=e,this.textureBufferLayout=t,this._parameters=n,this.maxTextureBufferItemIndex=O.getField(0).max}_isClosed(e){return j(this._parameters,e)}allocate(e){return this.layout.createBuffer(e)}elementCountTextureBuffer(e){let t=e.get(`position`);return t.data.length/3+(this._isClosed(t.data.length/t.stride)?3:2)}elementCount(e){let t=e.get(`position`),n=t.indices.length/2+1;return Te(n,this._isClosed(t.data.length/t.stride),this._parameters)}rebaseBuffers(e,t,n,r){if(r?.buffer.copyFrom(e.storage,0,r.offset),t!=null){let r=n.from,i=e.vertex.getField(`ribbonLineVertexInfo`,E),a=t.buffer.getField(`ribbonLineVertexInfo`,E),o=O.getField(0);for(let e=0;e<i.count;e++){let n=i.get(e),s=o.get(n)+r;a.set(t.offset+e,n===0?0:o.set(n,s))}}}write(e,t,n,r,i,a){a!=null&&this._writeTextureBuffer(e,n,a),r!=null&&this._writeVertexBuffer(n,r,i)}_writeTextureBuffer(e,t,n){let r=xe(t.get(`position`),3),i=t.get(`timeStamps`);i!=null&&n.buffer.layout.fields.has(`timeStamps`)&&k(i.size===4),Ee({position:r,color:t.get(`color`)?.data,size:t.get(`size`)?.data,colorFeature:t.get(`colorFeatureAttribute`)?.data,sizeFeature:t.get(`sizeFeatureAttribute`)?.data,opacityFeature:t.get(`opacityFeatureAttribute`)?.data,distancesToStart:t.get(`distanceToStart`)?.data,timeStamps:i?.data,olidColor:t.get(`olidColor`)?.data},this._isClosed(r.count),n,e)}_writeVertexBuffer(e,t,n){let r=e.get(`position`),i=r.indices,a=r.data.length/3,o=this._isClosed(r.data.length/r.stride),s=a+(o?3:2);i&&i.length!==2*(a-1)&&console.warn(`RibbonLineMaterial does not support indices`),k(n!=null,`Using a texture layout, but the texture range for this instance was not provided`);let c=n.from;k(n.numElements===s,`Expected number of elements in TextureBuffer to equal number of points`),De(a,o,this._parameters,t,c)}}function M(e,t,n,r){return r?e/(2*n)+$*t:(e/2+$)*t}function*ze(e,t,n,r,i){let a=r?n.count:n.count-1,c=i?.[0]??0,l=i?.[1]??0;s(e,n.get(0,0)+c,n.get(0,1)+l);for(let r=1;r<=a;r++){let i=r%n.count;s(t,n.get(i,0)+c,n.get(i,1)+l),yield r,o(e,t)}}function Be(e){return e.anchor===1&&e.hideOnShortSegments&&e.placement===`begin-end`&&e.worldSpace}const Ve=new ye,N=x(),P=x(),F=c(),I=c(),L=x(),He=x(),R=x(),z=x(),B=x(),V=x(),H=n(),U=n(),Ue=r(),We=r(),Ge=x(),Ke=x(),W=x(),G=ae(),K=ae(),q=[n(),n(),n(),n()],J=[x(),x(),x(),x()],Y=T(),X=T(),Z=T(),Q=T(),$=4,qe={getDrapedRibbonLineMaxDistance:M},Je=[x(),x()];export{Le as Parameters,Fe as RibbonLineMaterial,qe as test};
2
+ import e from"../../../../core/Logger.js";import{clamp as t}from"../../../../core/mathUtils.js";import{createRenderScreenPointArray3 as n,createScreenPointArray as r}from"../../../../core/screenUtils.js";import{secondsFromMilliseconds as i,Seconds as a}from"../../../../core/time.js";import{copy as o,set as s}from"../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{set as l,subtract as u,dot as d,scale as f,add as p,copy as m,length as h,distance as g,lerp as _,transformMat4 as v,normalize as y,applyTranslation as b}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as x}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ONES as ee}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{fromPoints as S,distance2 as te,closestLineSegmentPoint as ne,projectPoint as re,projectPointFraction as ie,create as ae}from"../../../../geometry/support/lineSegment.js";import{fromPoints as C,signedDistance as w,getNormal as oe,create as T}from"../../../../geometry/support/plane.js";import{BufferViewUint32 as E,BufferViewVec3f as se}from"../../../../geometry/support/buffer/BufferView.js";import{isHighlightOrOLID as ce,isColor as D,isDepth as le,isColorHighlightOLIDOrDepth as ue,is2DGeometryOutput as de}from"../core/shaderLibrary/ShaderOutput.js";import{getScalarAttributeView as fe}from"../lib/attributeViewUtils.js";import pe from"../lib/GLMaterial.js";import{LineMaterial as me}from"../lib/LineMaterial.js";import{ribbonLineVertexInfoPacking as O}from"../lib/RibbonLineVertexInfo.js";import{projectWorldLineSegmentToRenderScreen as he,screenPolygonIntersectsBufferedSegment as ge}from"../lib/screenPolygonOverlapUtils.js";import{Hit as _e,DrapedHit as ve}from"../lib/screenPolygonTriangleIntersections.js";import{ScreenSizePerspectiveEvaluator as ye}from"../lib/screenSizePerspectiveUtils.js";import{isTranslationMatrix as be,assert as k}from"../lib/Util.js";import{createVerticesView as xe}from"../lib/VerticesView.js";import{isImagePattern as Se}from"./lineStippleUtils.js";import{VisualVariablePassParameters as Ce}from"./VisualVariablePassParameters.js";import{getNumJoinSubdivisions as we,getRibbonLinePositions as A,isClosed as j,ribbonLineVertexCount as Te,writeRibbonLineTextureBuffer as Ee,writeRibbonLineVertices as De}from"./internal/ribbonLineBufferUtils.js";import{intersectRayWithWorldSizedLineSegment as Oe,intersectScreenPolygonWithWorldSizedLineSegment as ke}from"./internal/worldSizedRibbonLineIntersectionUtils.js";import{getLayout as Ae,getTextureBufferLayout as je}from"../shaders/RibbonLineLayouts.js";import{RibbonLineTechnique as Me}from"../shaders/RibbonLineTechnique.js";import{RibbonLineTechniqueConfiguration as Ne}from"../shaders/RibbonLineTechniqueConfiguration.js";import{alphaCutoff as Pe}from"../../../../webscene/support/AlphaCutoff.js";class Fe extends me{constructor(e,t){super(e,Le),this.produces=new Map([[2,e=>ce(e)||D(e)&&this.parameters.renderOccluded===8],[3,e=>le(e)],[10,e=>ue(e)&&this.parameters.renderOccluded===8],[11,e=>ue(e)&&this.parameters.renderOccluded===8],[4,e=>D(e)&&this.parameters.writeDepth&&this.parameters.renderOccluded!==8],[8,e=>D(e)&&!this.parameters.writeDepth&&this.parameters.renderOccluded!==8],[18,e=>de(e)]]),this._configuration=new Ne(t.state.isGlobal),this._isAssumedMetalDriver=t.stage.renderer.renderContext.rctx.isAssumedMetalDriver}updateConfiguration(e){super.updateConfiguration(e),this._configuration.useFlatJoinVarying=!this._isAssumedMetalDriver;let t=this.parameters.stipplePattern!=null&&this.parameters.stippleTexture!=null&&e.output!==10,n=t&&this.parameters.isImagePattern()&&this._configuration.draped,r=this.parameters.usesWorldSizedWidth(n);this._configuration.polygonOffset=this.parameters.polygonOffset,this._configuration.stippleEnabled=t,this._configuration.stippleOffColorEnabled=t&&this.parameters.stippleOffColor!=null,this._configuration.stipplePreferContinuous=t&&this.parameters.stipplePreferContinuous,this._configuration.numJoinSubdivisions=we(this.parameters.join,t),this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.roundJoins=this.parameters.join===`round`,this._configuration.capType=this.parameters.cap,this._configuration.applyMarkerOffset=this.parameters.markerParameters!=null&&Be(this.parameters.markerParameters),this._configuration.polygonOffsetIndex=this.parameters.polygonOffsetIndex,this._configuration.writeDepth=this.parameters.writeDepth,this._configuration.innerColorEnabled=this.parameters.innerWidth>0&&this.parameters.innerColor!=null,this._configuration.falloffEnabled=this.parameters.falloff>0,this._configuration.wireframe=this.parameters.wireframe,this._configuration.animation=this.parameters.animation,this._configuration.emissionSource=+!!this.emissions,this._configuration.hasScreenSizePerspective=!!this.parameters.screenSizePerspective&&!r,this._configuration.worldSized=r,this._configuration.imagePattern=n,this._configuration.hasVertexColor=this.parameters.hasVertexColor,this._configuration.hasVertexSize=this.parameters.hasVertexSize,this._configuration.hasLineDistance=this.parameters.hasLineDistance}get visible(){return this.parameters.color[3]>=Pe||this.parameters.stipplePattern!=null&&(this.parameters.stippleOffColor?.[3]??0)>Pe}get emissions(){return this.parameters.emissiveStrength>0?this.parameters.renderOccluded===8?1:2:0}setParameters(e,t){e.animation=this.parameters.animation,super.setParameters(e,t)}intersectRayDraped(e,n,r,i,a,o,s){if(!n.options.selectionMode)return;let c=this._getLineSize(e,!0),l=A(e,!!this.parameters.isClosed),u=r[0],d=r[1],f=M(c,o,s,this.parameters.usesWorldSizedWidth()),p=Number.MAX_VALUE,m=0;for(let e of ze(F,I,l,j(this.parameters,l.count))){let n=u-F[0],r=d-F[1],i=I[0]-F[0],a=I[1]-F[1],o=i*n+a*r,s=i*i+a*a,c=t(o/s,0,1),l=i*c-n,f=a*c-r,h=l*l+f*f;h<p&&(p=h,m=e)}p<f*f&&i(a.distance,a.renderDistance,a.normal,m)}intersectRay(t,n,r,i,a,o){let{options:s,camera:c}=r;if(!s.selectionMode||!t.visible||!c)return;if(!be(n)){e.getLogger(`esri.views.3d.webgl-engine.materials.RibbonLineMaterial`).error(`intersection assumes a translation-only matrix`);return}let l=this._getLineSize(t);this.parameters.worldSized?this._intersectRayWithWorldSizedLine(t,n,r,l,o):this._intersectRayWithScreenSizedLine(t,n,r,l,o)}_intersectRayWithScreenSizedLine(e,t,n,r,i){let{camera:a}=n,s=A(e,!!this.parameters.isClosed),c=V;o(c,n.point);let _=r*a.pixelRatio,v=$*a.pixelRatio,y=_/2+v;l(q[0],c[0]-y,c[1]+y,0),l(q[1],c[0]+y,c[1]+y,0),l(q[2],c[0]+y,c[1]-y,0),l(q[3],c[0]-y,c[1]-y,0);for(let e=0;e<4;e++)if(!a.unprojectFromRenderScreen(q[e],J[e]))return;C(a.eye,J[0],J[1],Y),C(a.eye,J[1],J[2],X),C(a.eye,J[2],J[3],Z),C(a.eye,J[3],J[0],Q);let b=Number.MAX_VALUE,x=0;for(let e of this._forEachTransformedLineSegment(N,P,s,t,j(this.parameters,s.count))){if(w(Y,N)<0&&w(Y,P)<0||w(X,N)<0&&w(X,P)<0||w(Z,N)<0&&w(Z,P)<0||w(Q,N)<0&&w(Q,P)<0)continue;let t=a.projectToRenderScreen(N,H),n=a.projectToRenderScreen(P,U);if(t==null||n==null)continue;if(t[2]<0&&n[2]>0){u(z,N,P);let e=a.frustum,n=-w(e[4],N)/d(z,oe(e[4]));if(f(z,z,n),p(N,N,z),!a.projectToRenderScreen(N,t))continue}else if(t[2]>0&&n[2]<0){u(z,P,N);let e=a.frustum,t=-w(e[4],P)/d(z,oe(e[4]));if(f(z,z,t),p(P,P,z),!a.projectToRenderScreen(P,n))continue}else if(t[2]<0&&n[2]<0)continue;t[2]=0,n[2]=0;let i=S(t,n,G),o=te(i,c);if(!(o>=b)){if(this.parameters.screenSizePerspective){let e=this.computeScreenSizePerspectiveWidth(i,N,P,c,a,r,v);if(o>=e*e)continue}b=o,m(Ge,N),m(Ke,P),x=e}}if(b<y*y){let{rayBegin:e,rayEnd:t}=n,r=Number.MAX_VALUE;if(ne(S(Ge,Ke,G),S(e,t,K),B)){u(B,B,e);let n=h(B);f(B,B,1/n),r=n/g(e,t)}i(r,r,B,x)}}_intersectRayWithWorldSizedLine(e,t,n,r,i){let{camera:a,ray:o,metersPerRenderUnit:s}=n,c=A(e,!!this.parameters.isClosed),l=r/(2*s),u=1/0,d=0;for(let e of this._forEachTransformedLineSegment(N,P,c,t,j(this.parameters,c.count))){let t=Oe(N,P,l,a,o,W);if(t!=null&&t<u&&(u=t,d=e,m(B,W),t===0))break}u<1/0&&i(u,u,B,d)}intersectScreenPolygon(t,n,r,i){let{options:a}=r;if(!a.selectionMode||!t.visible)return null;if(!be(n))return e.getLogger(`esri.views.3d.webgl-engine.materials.RibbonLineMaterial`).error(`intersection assumes a translation-only matrix`),null;let o=this._getLineSize(t);return this.parameters.worldSized?this._intersectWorldSizedPolygon(t,n,r,i,o):this._intersectScreenSizedPolygon(t,n,r,i,o)}_intersectScreenSizedPolygon(e,t,n,r,i){let{camera:a,screenPolygonPrimitiveProcessor:o}=n,s=A(e,!!this.parameters.isClosed),c=$,l=c*a.pixelRatio,u=new _e(4);for(let e of this._forEachTransformedLineSegment(N,P,s,t,j(this.parameters,s.count)))for(let[t,n]of o.processLineSegment(Je,N,P)){if(!he(a,t,n,H,U))continue;let o=S(H,U,G),s=i/2+c;this.parameters.screenSizePerspective&&(_(V,H,U,.5),s=Math.max(s,this.computeScreenSizePerspectiveWidth(o,t,n,V,a,i,l)/a.pixelRatio)),a.renderToScreen(H,Ue),a.renderToScreen(U,We),ge(r,Ue,We,s)&&(re(S(t,n,K),a.eye,L),u.updateIfCloserFromValues(g(a.eye,L),e,L,null))}return u}_intersectWorldSizedPolygon(e,t,n,r,i){let{camera:a,screenPolygonPrimitiveProcessor:o,metersPerRenderUnit:s}=n,c=A(e,!!this.parameters.isClosed),l=i/(2*s),u=new _e(4);for(let e of this._forEachTransformedLineSegment(N,P,c,t,j(this.parameters,c.count)))for(let[t,n]of o.processLineSegment(Je,N,P)){re(S(t,n,K),a.eye,L);let i=g(a.eye,L);u.valid&&i>=u.distance||ke(t,n,l,a,r)&&u.updateIfCloserFromValues(i,e,L,null)}return u}intersectScreenPolygonDraped(e,t,n,r,i,a){if(!n.options.selectionMode)return null;let o=this._getLineSize(e,!0),s=A(e,!!this.parameters.isClosed),c=M(o,i,a,this.parameters.usesWorldSizedWidth());for(let e of ze(F,I,s,j(this.parameters,s.count),t))if(ge(r,F,I,c))return new ve(e);return null}createPrimitivePositionReader(e){let t=e.vertex.getField(`ribbonLineVertexInfo`,E),n=e.storage.getField(`position`,se),r=O.getField(0);return(e,i)=>n.getVec(r.get(t.get(i)),e)}computeAttachmentOrigin(e,t,n){return!this.parameters.wireframe&&super.computeAttachmentOrigin(e,t,n)}createBufferWriter(){return new Re(Ae(this.parameters),je(this.parameters),this.parameters)}createGLMaterial(e){return new Ie(e)}validateParameters(e){k(e.hasLineDistance||e.stipplePattern==null,`Patterned ribbon lines require line distances`),e.join!==`miter`&&(e.miterLimit=0),e.markerParameters!=null&&(e.markerScale=e.markerParameters.width/e.width)}update(e){return this.parameters.hasAnimation?(this.setParameters({timeElapsed:i(e.time)},!1),e.dt!==0):!1}computeScreenSizePerspectiveWidth(e,t,n,r,i,a,o){let s=ie(e,r);_(L,t,n,s),v(He,L,i.viewMatrix);let c=h(He),l=this.computeCameraAbsCosAngle(L,i,this._configuration.spherical);return Ve.update(l,c,this.parameters.screenSizePerspective,this.parameters.screenSizePerspectiveMinPixelReferenceSize),Ve.apply(a)*i.pixelRatio/2+o}computeCameraAbsCosAngle(e,t,n){return n?y(B,e):l(B,0,0,1),u(R,e,t.eye),y(R,R),Math.abs(d(B,R))}_getLineSize(e,n=!1){let r=this.parameters.width;if(this.parameters.vvSize){let i=fe(e,`sizeFeatureAttribute`).get(0);Number.isNaN(i)?n&&(r*=this.parameters.vvSize.fallback[0]):r*=t(this.parameters.vvSize.offset[0]+i*this.parameters.vvSize.factor[0],this.parameters.vvSize.minSize[0],this.parameters.vvSize.maxSize[0])}else if(this.parameters.hasVertexSize){let t=fe(e,`size`);t!=null&&(r*=t.get(0))}return r}*_forEachTransformedLineSegment(e,t,n,r,i){let a=i?n.count:n.count-1;for(let i=0;i<a;i++)n.getVec(i,e),b(e,e,r),n.getVec((i+1)%n.count,t),b(t,t,r),yield i}}class Ie extends pe{constructor(){super(...arguments),this._stipplePattern=null}dispose(){super.dispose(),this._stippleTextures?.release(this._stipplePattern),this._stipplePattern=null}beginSlot(e){let{stipplePattern:t}=this._material.parameters;return this._stipplePattern!==t&&(this._material.setParameters({stippleTexture:this._stippleTextures.swap(t,this._stipplePattern)}),this._stipplePattern=t),this.getTechnique(Me,e)}}class Le extends Ce{constructor(){super(...arguments),this._width=0,this.color=ee,this.hasVertexColor=!0,this.hasVertexSize=!0,this.hasLineDistance=!0,this.join=`miter`,this.cap=0,this.miterLimit=5,this.shadingEnabled=!1,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.writeDepth=!0,this.polygonOffset=0,this.polygonOffsetIndex=0,this.stippleTexture=null,this.stipplePreferContinuous=!0,this.markerParameters=null,this.markerScale=1,this.hasSlicePlane=!1,this.vvFastUpdate=!1,this.isClosed=!1,this.falloff=0,this.innerWidth=0,this.wireframe=!1,this.timeElapsed=a(0),this.animation=0,this.animationSpeed=1,this.trailLength=1,this.startTime=a(0),this.endTime=a(1/0),this.worldSized=!1}get width(){return this.isImagePattern()?this.stipplePattern.width:this._width}set width(e){this._width=e}get transparent(){return this.color[3]<1||this.hasAnimation||this.stipplePattern!=null&&(this.stippleOffColor?.[3]??0)<1}get hasAnimation(){return this.animation!==0}usesWorldSizedWidth(e=this.isImagePattern()){return this.worldSized||e}isImagePattern(){return Se(this.stipplePattern)&&this.stippleTexture!=null}}class Re{constructor(e,t,n){this.layout=e,this.textureBufferLayout=t,this._parameters=n,this.maxTextureBufferItemIndex=O.getField(0).max}_isClosed(e){return j(this._parameters,e)}allocate(e){return this.layout.createBuffer(e)}elementCountTextureBuffer(e){let t=e.get(`position`);return t.data.length/3+(this._isClosed(t.data.length/t.stride)?3:2)}elementCount(e){let t=e.get(`position`),n=t.indices.length/2+1;return Te(n,this._isClosed(t.data.length/t.stride),this._parameters)}rebaseBuffers(e,t,n,r){if(r?.buffer.copyFrom(e.storage,0,r.offset),t!=null){let r=n.from,i=e.vertex.getField(`ribbonLineVertexInfo`,E),a=t.buffer.getField(`ribbonLineVertexInfo`,E),o=O.getField(0);for(let e=0;e<i.count;e++){let n=i.get(e),s=o.get(n)+r;a.set(t.offset+e,n===0?0:o.set(n,s))}}}write(e,t,n,r,i,a){a!=null&&this._writeTextureBuffer(e,n,a),r!=null&&this._writeVertexBuffer(n,r,i)}_writeTextureBuffer(e,t,n){let r=xe(t.get(`position`),3),i=t.get(`timeStamps`);i!=null&&n.buffer.layout.fields.has(`timeStamps`)&&k(i.size===4),Ee({position:r,color:t.get(`color`)?.data,size:t.get(`size`)?.data,colorFeature:t.get(`colorFeatureAttribute`)?.data,sizeFeature:t.get(`sizeFeatureAttribute`)?.data,opacityFeature:t.get(`opacityFeatureAttribute`)?.data,distancesToStart:t.get(`distanceToStart`)?.data,timeStamps:i?.data,olidColor:t.get(`olidColor`)?.data},this._isClosed(r.count),n,e)}_writeVertexBuffer(e,t,n){let r=e.get(`position`),i=r.indices,a=r.data.length/3,o=this._isClosed(r.data.length/r.stride),s=a+(o?3:2);i&&i.length!==2*(a-1)&&console.warn(`RibbonLineMaterial does not support indices`),k(n!=null,`Using a texture layout, but the texture range for this instance was not provided`);let c=n.from;k(n.numElements===s,`Expected number of elements in TextureBuffer to equal number of points`),De(a,o,this._parameters,t,c)}}function M(e,t,n,r){return r?e/(2*n)+$*t:(e/2+$)*t}function*ze(e,t,n,r,i){let a=r?n.count:n.count-1,c=i?.[0]??0,l=i?.[1]??0;s(e,n.get(0,0)+c,n.get(0,1)+l);for(let r=1;r<=a;r++){let i=r%n.count;s(t,n.get(i,0)+c,n.get(i,1)+l),yield r,o(e,t)}}function Be(e){return e.anchor===1&&e.hideOnShortSegments&&e.placement===`begin-end`&&e.worldSpace}const Ve=new ye,N=x(),P=x(),F=c(),I=c(),L=x(),He=x(),R=x(),z=x(),B=x(),V=x(),H=n(),U=n(),Ue=r(),We=r(),Ge=x(),Ke=x(),W=x(),G=ae(),K=ae(),q=[n(),n(),n(),n()],J=[x(),x(),x(),x()],Y=T(),X=T(),Z=T(),Q=T(),$=4,qe={getDrapedRibbonLineMaxDistance:M},Je=[x(),x()];export{Le as Parameters,Fe as RibbonLineMaterial,qe as test};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{Material as e,MaterialParameters as t}from"../lib/Material.js";import{intersectTriangleGeometryPolygon2D as n}from"../lib/PolygonIntersections2D.js";import{intersectTriangleGeometry as r,intersectTriangleGeometry2D as i}from"../lib/RayIntersections.js";import{intersectTriangleGeometryWithScreenPolygon as a,DrapedHit as o}from"../lib/screenPolygonTriangleIntersections.js";import{intersectWithPolygonOffset as s,applyPolygonOffsetToHit as c}from"./intersectWithPolygonOffset.js";class l extends e{updateConfiguration(e){super.updateConfiguration(e),this._configuration.transparent=this.transparent,this._configuration.enableOITOffset=e.enableOITOffset,this._configuration.polygonOffset=this.parameters.polygonOffset}intersectRay(e,t,n,i,a,o){return o=s(o,this._configuration,i,a),r(e,n,i,a,null,o)}intersectRayDraped(e,t,n,r){return i(n[0],n[1],e,r)}intersectScreenPolygon(e,t,n,r){return c(a(e,n,t,r,null),this._configuration,n.camera.eye)}intersectScreenPolygonDraped(e,t,r,i){let a=n(i,t,e);return a===null?null:new o(a)}}class u extends t{constructor(){super(...arguments),this.polygonOffset=0}}export{l as TriangleMaterial,u as TriangleMaterialParameters};
2
+ import{Material as e,MaterialParameters as t}from"../lib/Material.js";import{intersectTriangleGeometryPolygon2D as n}from"../lib/PolygonIntersections2D.js";import{intersectTriangleGeometry as r,intersectTriangleGeometry2D as i}from"../lib/RayIntersections.js";import{intersectTriangleGeometryWithScreenPolygon as a,DrapedHit as o}from"../lib/screenPolygonTriangleIntersections.js";import{intersectWithPolygonOffset as s,applyPolygonOffsetToHit as c}from"./intersectWithPolygonOffset.js";class l extends e{updateConfiguration(e){super.updateConfiguration(e),this._configuration.transparent=this.transparent,this._configuration.enableOITOffset=e.enableOITOffset,this._configuration.polygonOffset=this.parameters.polygonOffset}intersectRay(e,t,n,i,a,o){return o=s(o,this._configuration,n.camera,i,a),r(e,n,i,a,null,o)}intersectRayDraped(e,t,n,r){return i(n[0],n[1],e,r)}intersectScreenPolygon(e,t,n,r){return c(a(e,n,t,r,null),this._configuration,n.camera)}intersectScreenPolygonDraped(e,t,r,i){let a=n(i,t,e);return a===null?null:new o(a)}}class u extends t{constructor(){super(...arguments),this.polygonOffset=0}}export{l as TriangleMaterial,u as TriangleMaterialParameters};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import"../../../../core/has.js";import{secondsFromMilliseconds as e}from"../../../../core/time.js";import{fromValues as t}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as r}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{BufferViewVec3f as i}from"../../../../geometry/support/buffer/BufferView.js";import{is3DGeometry as a,isColor as o,isNormals as s}from"../core/shaderLibrary/ShaderOutput.js";import{olidEnabled as c}from"../effects/geometry/olidUtils.js";import{createPositionReader as l}from"../lib/PositionReader.js";import{PositionUvf32OlidLayout as u,PositionUvf32Layout as d}from"./DefaultLayouts.js";import{TriangleMaterialParameters as f,TriangleMaterial as p}from"./TriangleMaterial.js";import{WaterGLMaterial as m}from"./WaterGLMaterial.js";import{WaterTechniqueConfiguration as h}from"./WaterTechniqueConfiguration.js";import{hasShadowHighlights as g}from"../shaders/ReceiveShadowsConfiguration.js";class _ extends p{constructor(e,t){super(e,v),this.visible=!0,this.produces=new Map([[2,e=>a(e)&&!this.transparent],[4,e=>a(e)&&this.transparent],[18,e=>this.parameters.draped&&a(e)],[19,e=>e===4]]),this._configuration=new h(t.spherical)}updateConfiguration(e){super.updateConfiguration(e),this._configuration.receiveShadows=o(e.output)&&e.shadowMap.enabled,this._configuration.hasShadowHighlights=g(this._configuration,e),this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.screenSpaceReflections=e.hasScreenSpaceReflections,this._configuration.cloudReflections=e.clouds.data!=null,this._configuration.draped=this.parameters.draped,this._configuration.drapedNormals=s(e.output)&&e.slot===19}update(t){return this.setParameters({timeElapsed:e(t.time)*this.parameters.animationSpeed},!1),this._animationEnabled(t.camera)&&t.dt>0}_animationEnabled(e){let t=Math.min(e.relativeElevation,e.distance);return Math.sqrt(this.parameters.waveTextureRepeat/this.parameters.waveStrength)*t<y}get transparent(){return this.parameters.transparent}createGLMaterial(e){return new m(e)}createBufferWriter(){return new x}createPrimitivePositionReader(e){let t=e.vertex.getField(`position`,i);return l(t.typedBuffer,e.index,t.typedBufferStride)}get test(){}}class v extends f{constructor(){super(...arguments),this.waveStrength=.06,this.waveTextureRepeat=32,this.waveDirection=t(1,0),this.waveVelocity=.05,this.flowStrength=.015,this.flowOffset=-.5,this.animationSpeed=.35,this.timeElapsed=0,this.color=r(0,0,0,0),this.transparent=!0,this.hasSlicePlane=!1,this.draped=!1,this.origin=n(),this.modelTransformation=null}}const y=35e3;function b(){return c()?u:d}class x{constructor(){this.layout=b()}elementCount(){throw Error(`WaterMaterial only supports BufferGeometry`)}write(){throw Error(`WaterMaterial only supports BufferGeometry`)}rebaseBuffers(e,t){t?.buffer.copyFrom(e.vertex,0,t.offset)}}export{v as Parameters,_ as WaterMaterial,b as getWaterLayout};
2
+ import"../../../../core/has.js";import{secondsFromMilliseconds as e}from"../../../../core/time.js";import{fromValues as t}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as r}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{BufferViewVec3f as i}from"../../../../geometry/support/buffer/BufferView.js";import{is3DGeometry as a,isNormals as o}from"../core/shaderLibrary/ShaderOutput.js";import{olidEnabled as s}from"../effects/geometry/olidUtils.js";import{createPositionReader as c}from"../lib/PositionReader.js";import{PositionUvf32OlidLayout as l,PositionUvf32Layout as u}from"./DefaultLayouts.js";import{TriangleMaterialParameters as d,TriangleMaterial as f}from"./TriangleMaterial.js";import{WaterGLMaterial as p}from"./WaterGLMaterial.js";import{WaterTechniqueConfiguration as m}from"./WaterTechniqueConfiguration.js";import{configureShadedMaterial as h}from"../shaders/ShadedMaterialConfiguration.js";class g extends f{constructor(e,t){super(e,_),this.visible=!0,this.produces=new Map([[2,e=>a(e)&&!this.transparent],[4,e=>a(e)&&this.transparent],[18,e=>this.parameters.draped&&a(e)],[19,e=>e===4]]),this._configuration=new m(t.spherical)}updateConfiguration(e){super.updateConfiguration(e),h(this._configuration,e,this.parameters),this._configuration.hasSlicePlane=this.parameters.hasSlicePlane,this._configuration.screenSpaceReflections=e.hasScreenSpaceReflections,this._configuration.cloudReflections=e.clouds.data!=null,this._configuration.draped=this.parameters.draped,this._configuration.drapedNormals=o(e.output)&&e.slot===19}update(t){return this.setParameters({timeElapsed:e(t.time)*this.parameters.animationSpeed},!1),this._animationEnabled(t.camera)&&t.dt>0}_animationEnabled(e){let t=Math.min(e.relativeElevation,e.distance);return Math.sqrt(this.parameters.waveTextureRepeat/this.parameters.waveStrength)*t<v}get transparent(){return this.parameters.transparent}createGLMaterial(e){return new p(e)}createBufferWriter(){return new b}createPrimitivePositionReader(e){let t=e.vertex.getField(`position`,i);return c(t.typedBuffer,e.index,t.typedBufferStride)}get test(){}}class _ extends d{constructor(){super(...arguments),this.waveStrength=.06,this.waveTextureRepeat=32,this.waveDirection=t(1,0),this.waveVelocity=.05,this.flowStrength=.015,this.flowOffset=-.5,this.animationSpeed=.35,this.timeElapsed=0,this.color=r(0,0,0,0),this.transparent=!0,this.hasSlicePlane=!1,this.draped=!1,this.origin=n(),this.modelTransformation=null,this.shadingEnabled=!0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0}}const v=35e3;function y(){return s()?l:u}class b{constructor(){this.layout=y()}elementCount(){throw Error(`WaterMaterial only supports BufferGeometry`)}write(){throw Error(`WaterMaterial only supports BufferGeometry`)}rebaseBuffers(e,t){t?.buffer.copyFrom(e.vertex,0,t.offset)}}export{_ as Parameters,g as WaterMaterial,y as getWaterLayout};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TriangleTechniqueConfiguration as n}from"./TriangleTechniqueConfiguration.js";class r extends n{constructor(e){super(),this.spherical=e,this.receiveGlobalIllumination=!1,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.screenSpaceReflections=!1,this.cloudReflections=!1,this.draped=!1,this.drapedNormals=!1,this.textureCoordinateType=0,this.emissionSource=0,this.pbrMode=3,this.occlusionPass=!1,this.useCustomDTRExponentForWater=!0,this.rayMarchMaxReach=1,this.rayMarchMaxSteps=150,this.useProjectedRayLength=!1,this.clampRayToScreen=!0,this.useFillLights=!1,this.overlayEnabled=!1,this.snowCover=!1,this.renderOccluded=!1}}e([t()],r.prototype,`receiveGlobalIllumination`,void 0),e([t()],r.prototype,`receiveShadows`,void 0),e([t()],r.prototype,`hasShadowHighlights`,void 0),e([t()],r.prototype,`screenSpaceReflections`,void 0),e([t()],r.prototype,`cloudReflections`,void 0),e([t()],r.prototype,`draped`,void 0),e([t()],r.prototype,`drapedNormals`,void 0);export{r as WaterTechniqueConfiguration};
2
+ import{__decorate as e}from"tslib";import{parameter as t}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{TriangleTechniqueConfiguration as n}from"./TriangleTechniqueConfiguration.js";class r extends n{constructor(e){super(),this.spherical=e,this.receiveGlobalIllumination=!1,this.receiveShadows=!1,this.hasShadowHighlights=!1,this.screenSpaceReflections=!1,this.cloudReflections=!1,this.draped=!1,this.drapedNormals=!1,this.textureCoordinateType=0,this.emissionSource=0,this.pbrMode=3,this.occlusionPass=!1,this.useCustomDTRExponentForWater=!0,this.rayMarchMaxReach=1,this.rayMarchMaxSteps=150,this.useProjectedRayLength=!1,this.clampRayToScreen=!0,this.useFillLights=!1,this.overlayEnabled=!1,this.snowCover=!1,this.renderOccluded=!1,this.receiveAmbientOcclusion=!1}}e([t()],r.prototype,`receiveGlobalIllumination`,void 0),e([t()],r.prototype,`receiveShadows`,void 0),e([t()],r.prototype,`hasShadowHighlights`,void 0),e([t()],r.prototype,`screenSpaceReflections`,void 0),e([t()],r.prototype,`cloudReflections`,void 0),e([t()],r.prototype,`draped`,void 0),e([t()],r.prototype,`drapedNormals`,void 0);export{r as WaterTechniqueConfiguration};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{direction as e,dot as t}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{polygonOffset as r}from"./PolygonOffset.js";import{TriangleTechniqueConfiguration as i}from"./TriangleTechniqueConfiguration.js";function a(t,n,r,i){let a=c(n);if(!a)return t;let o=e(p,i,r);return(e,n,r,i)=>t(e,l(a,o,n,r),r,i)}function o(t,n,r,i,a){let o=c(r);return o?l(o,e(p,a,i),t,n):t}function s(e,t,n){return e==null?null:(e.renderDistance=o(e.renderDistance,e.hasNormal?e.normal:null,t,n,e.point),e)}function c(e){return u.output=+!!e.transparent,u.polygonOffset=e.polygonOffset,u.enableOITOffset=e.enableOITOffset,r(u)}function l({units:e,factor:n},r,i,a){let o=f*e;return i+((a?1-Math.abs(t(r,a)):0)*n*d+o)}const u=new i,d=2e-5,f=2e-6,p=n();export{o as applyPolygonOffsetToDistance,s as applyPolygonOffsetToHit,a as intersectWithPolygonOffset};
2
+ import{direction as e,dot as t}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{enableOITOffset as r}from"../lib/OrderIndependentTransparency.js";import{polygonOffset as i}from"./PolygonOffset.js";import{TriangleTechniqueConfiguration as a}from"./TriangleTechniqueConfiguration.js";function o(t,n,r,i,a){let o=l(n,r);if(!o)return t;let s=e(m,a,i);return(e,n,r,i)=>t(e,u(o,s,n,r),r,i)}function s(t,n,r,i,a){let o=l(r,i);return o?u(o,e(m,a,i.eye),t,n):t}function c(e,t,n){return e==null?null:(e.renderDistance=s(e.renderDistance,e.hasNormal?e.normal:null,t,n,e.point),e)}function l(e,t){return d.output=+!!e.transparent,d.polygonOffset=e.polygonOffset,d.enableOITOffset=r(d.output,t),i(d)}function u({units:e,factor:n},r,i,a){let o=p*e;return i+((a?1-Math.abs(t(r,a)):0)*n*f+o)}const d=new a,f=2e-5,p=2e-6,m=n();export{c as applyPolygonOffsetToHit,o as intersectWithPolygonOffset};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{ZEROS as n,freeze as r,create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as a}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{glLayout as o}from"../../support/buffer/glUtil.js";import{newLayout as s}from"../../support/buffer/InterleavedLayout.js";import{VertexNormalPassParameters as c,VertexNormalDrawParameters as l}from"../core/shaderLibrary/attributes/VertexNormal.glsl.js";import{ReloadableShader as u}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as d}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as f}from"../effects/geometry/olidUtils.js";import{depthWrite as p,depthTest as m,blending as h}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBase as g,stencilBaseAllZeros as _,stencilWriteMaskOn as v}from"../lib/StencilUtils.js";import{getRenderInstanceDataLayout as y}from"../lib/lodRendering/RenderInstanceData.js";import{advancedMRRFactors as b}from"../materials/pbrUtils.js";import{polygonOffset as x}from"../materials/PolygonOffset.js";import{D as S}from"../../../../chunks/DefaultMaterial.glsl.js";import{makePipelineState as C,defaultColorWrite as w,cullingParams as T}from"../../../webgl/renderState.js";import{alphaCutoff as E}from"../../../../webscene/support/AlphaCutoff.js";class D extends c{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=b,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType=`normal`,this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrengthFromSymbol=0,this.emissiveStrengthKHR=1,this.emissiveSource=1,this.emissiveBaseColor=n,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=r(.2,.2,.2),this.diffuse=r(.8,.8,.8),this.externalColor=a(1,1,1,1),this.colorMixMode=`multiply`,this.opacity=1,this.layerOpacity=1,this.origin=i(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.modelTransformation=null,this.drivenOpacity=!1,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=E,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}get emissiveStrength(){return this.emissiveStrengthFromSymbol*this.emissiveStrengthKHR}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}class O extends l{constructor(){super(...arguments),this.origin=i(),this.slicePlaneLocalOrigin=this.origin}get localOrigin(){return this.origin}}let k=class extends d{constructor(e,t){let n=o(M(t));t.instanced&&t.instancedDoublePrecision&&(n=n.concat(o(y(t)))),super(e,t,n),this.shader=new u(S,()=>import(`./DefaultMaterial.glsl.js`)),this.ignoreUnused=!0}_makePipeline(e,t){let{output:n,transparent:r,cullFace:i,customDepthTest:a,hasOccludees:o}=e;return C({blending:r?h(n,!1,e.emissionDimmingPass):null,culling:j(e)?T(i):null,depthTest:m(n,A(a)),depthWrite:p(e),colorWrite:w,stencilWrite:o?v:null,stencilTest:o?t?g:_:null,polygonOffset:x(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e,t,n){return n?this._occludeePipelineState:super.getPipeline(e,t,n)}};k=e([t(`esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique`)],k);function A(e){switch(e){case 1:return 515;case 0:return 513;case 2:return 516;case 3:return 514;case 4:return 513}}function j(e){return e.cullFace!==0||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}function M(e){let t=s().vec3f(`position`);return e.normalType===1?t.vec2i16(`normalCompressed`,{glNormalized:!0}):t.vec3f(`normal`),e.hasVertexTangents&&t.vec4f(`tangent`),e.hasTextures&&t.vec2f16(`uv0`),e.hasVertexColors&&t.vec4u8(`color`,{glNormalized:!0}),e.hasSymbolColors&&t.vec4u8(`symbolColor`),!e.instanced&&f()&&t.vec4u8(`olidColor`),t}export{O as DefaultMaterialDrawParameters,D as DefaultMaterialPassParameters,k as DefaultMaterialTechnique,M as getLayout,j as isCullingRequired};
2
+ import{__decorate as e}from"tslib";import{subclass as t}from"../../../../core/accessorSupport/decorators.js";import{ZEROS as n,freeze as r,create as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as a}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{glLayout as o}from"../../support/buffer/glUtil.js";import{newLayout as s}from"../../support/buffer/InterleavedLayout.js";import{VertexNormalPassParameters as c,VertexNormalDrawParameters as l}from"../core/shaderLibrary/attributes/VertexNormal.glsl.js";import{ReloadableShader as u}from"../core/shaderTechnique/ReloadableShader.js";import{ShaderTechnique as d}from"../core/shaderTechnique/ShaderTechnique.js";import{olidEnabled as f}from"../effects/geometry/olidUtils.js";import{depthWrite as p,depthTest as m,blending as h}from"../lib/OrderIndependentTransparency.js";import{stencilToolMaskBase as g,stencilBaseAllZeros as _,stencilWriteMaskOn as v}from"../lib/StencilUtils.js";import{getRenderInstanceDataLayout as y}from"../lib/lodRendering/RenderInstanceData.js";import{advancedMRRFactors as b}from"../materials/pbrUtils.js";import{polygonOffset as x}from"../materials/PolygonOffset.js";import{D as S}from"../../../../chunks/DefaultMaterial.glsl.js";import{makePipelineState as C,defaultColorWrite as w,cullingParams as T}from"../../../webgl/renderState.js";import{alphaCutoff as E}from"../../../../webscene/support/AlphaCutoff.js";class D extends c{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=b,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType=`normal`,this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrengthFromSymbol=0,this.emissiveStrengthKHR=1,this.emissiveSource=1,this.emissiveBaseColor=n,this.instancedDoublePrecision=!1,this.normalType=0,this.shadingEnabled=!0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=r(.2,.2,.2),this.diffuse=r(.8,.8,.8),this.externalColor=a(1,1,1,1),this.colorMixMode=`multiply`,this.opacity=1,this.layerOpacity=1,this.origin=i(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.modelTransformation=null,this.drivenOpacity=!1,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=E,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}get emissiveStrength(){return this.emissiveStrengthFromSymbol*this.emissiveStrengthKHR}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}class O extends l{constructor(){super(...arguments),this.origin=i(),this.slicePlaneLocalOrigin=this.origin}get localOrigin(){return this.origin}}let k=class extends d{constructor(e,t){let n=o(N(t));t.instanced&&t.instancedDoublePrecision&&(n=n.concat(o(y(t)))),super(e,t,n),this.shader=new u(S,()=>import(`./DefaultMaterial.glsl.js`)),this.ignoreUnused=!0}_makePipeline(e,t){let{output:n,transparent:r,cullFace:i,customDepthTest:a,hasOccludees:o}=e;return C({blending:r?h(n,!1,e.emissionDimmingPass):null,culling:j(e)?T(i):null,depthTest:m(n,A(a)),depthWrite:p(e),colorWrite:w,stencilWrite:o?v:null,stencilTest:o?t?g:_:null,polygonOffset:x(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e,t,n){return n?this._occludeePipelineState:super.getPipeline(e,t,n)}};k=e([t(`esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique`)],k);function A(e){switch(e){case 1:return 515;case 0:return 513;case 2:return 516;case 3:return 514;case 4:return 513}}function j(e){return e.cullFace!==0||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}function M(e){return e.hasNormalTexture&&e.hasVertexTangents}function N(e){let t=s().vec3f(`position`);return e.normalType===1?t.vec2i16(`normalCompressed`,{glNormalized:!0}):t.vec3f(`normal`),M(e)&&t.vec4f(`tangent`),e.hasTextures&&t.vec2f16(`uv0`),e.hasVertexColors&&t.vec4u8(`color`,{glNormalized:!0}),e.hasSymbolColors&&t.vec4u8(`symbolColor`),!e.instanced&&f()&&t.vec4u8(`olidColor`),t}export{O as DefaultMaterialDrawParameters,D as DefaultMaterialPassParameters,k as DefaultMaterialTechnique,N as getLayout,j as isCullingRequired,M as usesVertexTangents};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{__decorate as e}from"tslib";import{isColor as t}from"../core/shaderLibrary/ShaderOutput.js";import{ReadShadowMapConfiguration as n}from"../core/shaderLibrary/shading/readShadow.glsl.js";import{parameter as r}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{MaterialParameters as i}from"../lib/Material.js";import{hasShadowHighlights as a}from"./ReceiveShadowsConfiguration.js";class o extends n{constructor(){super(...arguments),this.receiveAmbientOcclusion=!1,this.receiveGlobalIllumination=!1}}e([r()],o.prototype,`receiveAmbientOcclusion`,void 0),e([r()],o.prototype,`receiveGlobalIllumination`,void 0);class s extends i{constructor(){super(...arguments),this.shadingEnabled=!0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0}}function c(e,n,r,i=!0){i&&t(n.output)&&r.shadingEnabled?(e.receiveShadows=r.receiveShadows&&n.shadowMap.enabled,e.hasShadowHighlights=a(e,n),e.receiveAmbientOcclusion=r.receiveAmbientOcclusion&&n.ssao!=null,e.receiveGlobalIllumination=r.receiveAmbientOcclusion&&n.globalIlluminationEnabled):e.receiveShadows=e.hasShadowHighlights=e.receiveAmbientOcclusion=e.receiveGlobalIllumination=!1}export{o as ShadedMaterialConfiguration,s as ShadedMaterialParameters,c as configureShadedMaterial};
@@ -307,7 +307,6 @@ export interface SceneViewProperties extends ViewProperties, DOMContainerPropert
307
307
  * >
308
308
  * > These options are not saved in a [WebScene](https://developers.arcgis.com/javascript/latest/references/core/WebScene/).
309
309
  *
310
- * @beta
311
310
  * @since 5.2
312
311
  */
313
312
  options?: ViewOptions;
@@ -1127,7 +1126,6 @@ export default class SceneView extends SceneViewSuperclass {
1127
1126
  * >
1128
1127
  * > These options are not saved in a [WebScene](https://developers.arcgis.com/javascript/latest/references/core/WebScene/).
1129
1128
  *
1130
- * @beta
1131
1129
  * @since 5.2
1132
1130
  */
1133
1131
  accessor options: ViewOptions;
@@ -1722,7 +1720,7 @@ export default class SceneView extends SceneViewSuperclass {
1722
1720
  * @see [Sample - StreamLayer](https://developers.arcgis.com/javascript/latest/sample-code/layers-streamlayer/)
1723
1721
  * @example
1724
1722
  * // Create a feature layer from a url pointing to a Feature Service
1725
- * let layer = new FeatureLayer(url);
1723
+ * let layer = new FeatureLayer({ url });
1726
1724
  *
1727
1725
  * map.add(layer);
1728
1726
  *
@@ -1736,7 +1734,7 @@ export default class SceneView extends SceneViewSuperclass {
1736
1734
  * @see [Sample - StreamLayer](https://developers.arcgis.com/javascript/latest/sample-code/layers-streamlayer/)
1737
1735
  * @example
1738
1736
  * // Create a feature layer from a url pointing to a Feature Service
1739
- * let layer = new FeatureLayer(url);
1737
+ * let layer = new FeatureLayer({ url });
1740
1738
  *
1741
1739
  * map.add(layer);
1742
1740
  *
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../Camera.js";import n from"../Viewpoint.js";import r from"../core/Collection.js";import{byId as i}from"../core/domUtils.js";import a from"../core/Error.js";import{on as o}from"../core/events.js";import{destroyHandle as s,makeHandle as c}from"../core/handleUtils.js";import has from"../core/has.js";import l from"../core/Logger.js";import{mapCollectionAsync as ee}from"../core/mapCollectionUtils.js";import{destroyMaybe as u,maybeProperty as d}from"../core/maybe.js";import{throwIfDestroyed as te,throwIfAborted as ne,createAbortError as re}from"../core/promiseUtils.js";import ie from"../core/ReactiveSet.js";import{on as f,watch as p,initial as m,sync as h,whenOnce as g,syncAndInitial as _}from"../core/reactiveUtils.js";import{setFrameDuration as ae,cleanupScheduling as oe}from"../core/scheduling.js";import{createScreenPoint as se,createScreenPointArray as ce}from"../core/screenUtils.js";import{cleanupWhereClauseCache as le}from"../core/sql.js";import{getDefaultVerticalUnitStringForSR as ue,getMetersPerUnitForSR as de}from"../core/units.js";import{property as v,cast as y,subclass as fe}from"../core/accessorSupport/decorators.js";import{ensureType as b,ensureClass as x}from"../core/accessorSupport/ensureType.js";import{overrideDefaultsFrom as pe}from"../core/accessorSupport/overrideDefaultsFrom.js";import{runUntracked as me}from"../core/accessorSupport/tracking.js";import{drainNotificationQueue as he}from"../core/accessorSupport/trackingUtils.js";import{create as ge}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{cleanupPooledRBush as _e}from"../core/libs/rbush/PooledRBush.js";import{initialize as ve}from"../core/workers/workers.js";import S from"../geometry/Extent.js";import ye from"../geometry/HeightModelInfo.js";import C from"../geometry/Point.js";import{project as w,canProjectWithoutEngine as be}from"../geometry/projectionUtils.js";import T from"../geometry/SpatialReference.js";import{cleanupSpatialReferenceEllipsoidUtils as xe}from"../geometry/spatialReferenceEllipsoidUtils.js";import{projectBoundingRect as Se}from"../geometry/projection/projectBoundingRect.js";import{projectPointToVector as E}from"../geometry/projection/projectPointToVector.js";import{toExtent as Ce,create as we}from"../geometry/support/aaBoundingRect.js";import{renderSRFromViewSR as Te}from"../geometry/support/coordinateSystem.js";import{getResolutionForScale as Ee}from"../geometry/support/scaleUtils.js";import{wgs84 as De,webMercator as Oe}from"../geometry/support/spatialReferenceUtils.js";import{makeDehydratedPoint as ke}from"../layers/graphics/dehydratedPoint.js";import{isImageryTileLayer as D,isTiledLayer as O,isVoxelLayer as k,isIntegratedMeshLayer as A,isGaussianSplatLayer as Ae}from"../layers/support/layerUtils.js";import{TilemapCache as je}from"../layers/support/TilemapCache.js";import{clearDefaultPortalInstance as Me}from"../portal/portalDefault.js";import{WebSceneTag as Ne}from"../support/tagSymbols.js";import{BreakpointsOwner as Pe}from"./BreakpointsOwner.js";import{DOMContainer as Fe}from"./DOMContainer.js";import{PopupView as Ie}from"./PopupView.js";import j from"./View.js";import Le from"./ViewAnimation.js";import{stringFromViewingMode as M,viewingModeFromString as N}from"./ViewingMode.js";import{GroundView3D as Re}from"./3d/GroundView3D.js";import{layerView3DImporter as P}from"./3d/layerViewModuleImportUtils.js";import{importAnalysisViewModule as ze}from"./3d/analysis/analysisViewModuleImportUtils.js";import{cleanupIntersectionUtils as Be}from"./3d/camera/intersectionUtils.js";import F from"./3d/constraints/Constraints.js";import I from"./3d/environment/Environment.js";import{EnvironmentView as Ve}from"./3d/environment/EnvironmentView.js";import He from"./3d/input/SceneInputManager.js";import{GraphicsDeconflictor as Ue}from"./3d/layers/graphics/GraphicsDeconflictor.js";import{Labeler as We}from"./3d/layers/graphics/Labeler.js";import Ge from"./3d/layers/i3s/I3SLodHandling.js";import{Navigation3D as Ke}from"./3d/navigation/Navigation3D.js";import{ScreenSizePerspective as qe}from"./3d/state/ScreenSizePerspective.js";import L from"./3d/state/ViewState.js";import{ViewStateManager as Je,cleanupViewStateManager as Ye}from"./3d/state/ViewStateManager.js";import{cleanupPointToPointAnimationController as Xe}from"./3d/state/controllers/PointToPointAnimationController.js";import{SceneIntersectionHelper as Ze}from"./3d/state/helpers/SceneIntersectionHelper.js";import{cleanupNavigationUtils as Qe}from"./3d/state/utils/navigationUtils.js";import $e from"./3d/support/Attribution3D.js";import{CombinedElevationProvider as et}from"./3d/support/CombinedElevationProvider.js";import{debugFlags as R}from"./3d/support/debugFlags.js";import{getElevationAtPoint as tt}from"./3d/support/ElevationProvider.js";import{GroundAndIMSurface as nt}from"./3d/support/GroundAndIMSurface.js";import{toMap as rt,hitTest as it}from"./3d/support/hitTest.js";import{popupHitTest as at}from"./3d/support/popupHitTest.js";import{getDefaultQualityProfileName as ot,getQualityProfileSettings as z}from"./3d/support/QualityProfile.js";import B from"./3d/support/QualitySettings.js";import{RenderCoordsHelper as st}from"./3d/support/RenderCoordsHelper.js";import{newResourceController as ct}from"./3d/support/ResourceController.js";import lt from"./3d/support/SceneViewPerformanceInfo.js";import{SharedSymbolResources as ut}from"./3d/support/SharedSymbolResources.js";import{ViewSlice as dt}from"./3d/support/ViewSlice.js";import{PointsOfInterest as V}from"./3d/support/pointsOfInterest/PointsOfInterest.js";import H from"./3d/terrain/TerrainSurface.js";import{isSurfaceLayerView as ft,getTiledLayerInfo as pt,checkIfTileInfoSupportedForView as mt}from"./3d/terrain/terrainUtils.js";import{clearTilePerLayerInfo as ht}from"./3d/terrain/TilePerLayerInfo.js";import{cleanupTileRenderer as gt}from"./3d/terrain/TileRenderer.js";import{createWebGLContext as _t}from"./3d/webgl-engine/createWebGLContext.js";import{Stage as vt}from"./3d/webgl-engine/Stage.js";import{olidEnabled as yt}from"./3d/webgl-engine/effects/geometry/olidUtils.js";import{cleanupRenderOccluded as bt}from"./3d/webgl-engine/effects/geometry/RenderOccluded.js";import{defaultTolerance as U}from"./3d/webgl-engine/lib/Intersector.js";import{cleanupShadowmap as xt}from"./3d/webgl-engine/lib/ShadowMap.js";import{terrainId as W}from"./3d/webgl-engine/lib/verticalOffsetUtils.js";import{cleanupEdgeProcessing as St}from"./3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js";import G from"./interactive/options/ViewOptions.js";import Ct from"./support/AnalysisViewManager.js";import{cleanupDrapedUtils as wt}from"./support/drapedUtils.js";import{occludeesSupported as Tt}from"./support/layerViewUtils.js";import{isSupportedScreenPointEvent as K,createScreenPointFromSupportedEvent as Et}from"./support/screenUtils.js";import{isSpatialReferenceSupported as Dt}from"./support/spatialReferenceSupport.js";import{initializeTextureCompressionWorker as Ot,destroyTextureCompressionWorker as kt}from"./support/TextureCompressionHelper.js";import At from"./ui/DefaultUI.js";import jt from"./ui/3d/DefaultUI3D.js";import Mt from"../webscene/Environment.js";import{clearVNodeCache as Nt}from"../widgets/support/vnodeCache.js";var q;const Pt=Symbol(),J=Symbol();function Ft(e){let t=x(G,e);return t!==e&&e.snapping?.enabled==null&&(t.snapping.enabled=!0),t}let Y=class extends Pe(Ie(Fe(j))){static{q=this}get timeZone(){return super.timeZone}set timeZone(e){super.timeZone=e}constructor(e){super(e),this.options=new G({snapping:{enabled:!0}}),this._userClippingArea=null,this._clippingArea=null,this._overrideDefaultEnvironmentOnly=!0,this._resolveWhenReady=[],this._resourceController=ct(this),this.deconflictor=new Ue({view:this}),this.attribution3D=new $e({view:this}),this.labeler=new We({view:this,deconflictor:this.deconflictor.labels}),this.sharedSymbolResources=null,this.navigation=new Ke({view:this}),this.basemapTerrain=null,this.elevationProvider=new et({view:this}),this._canvas=null,this.constraints=new F,this._environment=new I,this.environmentView=new Ve,this.floors=new r,this.fullOpacity=1,this.graphicsView=null,this.analysisViewManager=new Ct({importAnalysisViewModule:e=>ze(e),view:this}),this.groundView=null,this.groundAndIMSurface=null,this.map=null,this._featureTileTreeClients=new ie,this._featureTiles=null,this._featureTreeDebugger=null,this.state=new L({view:this}),this.slice=new dt,this.renderCoordsHelper=new st,this.spatialReference=null,this.preserveDrawingBufferEnabled=!1,this.supersampleScreenshotsEnabled=!0,this.type=`3d`,this.ui=new jt,this._numUpdating=0,this._lastUpdateTime=0,this.updatingProgress=.5,this._importControllers=new Map,ve();let t=()=>this._updatingChanged();this.addHandles(s(ee(()=>this.map?.allLayers,async e=>{try{await e.when()}catch{}finally{t()}}))),this.addHandles([f(()=>this.map?.allLayers,`after-changes`,t,{onListenerAdd:t,onListenerRemove:t,sync:!0}),this.allLayerViews.on(`after-changes`,e=>this._updateUpdatingMonitors(e)),p(()=>this.scene,e=>e?.load().catch(()=>{}))]),this.inputManager=new He({view:this}),this.stateManager=new Je({view:this}),this.screenSizePerspective=new qe({view:this})}initialize(){if(has(`enable-feature:esri-compress-textures`)&&has(`wasm-simd`)){let e=Ot(this,this.resourceController);this.addResolvingPromise(e.promise)}this.groundView=new Re({view:this}),this.groundAndIMSurface=new nt({view:this}),this._updateUpdatingMonitors(),this.updatingHandles.add(()=>this.qualitySettings.memoryLimit,e=>{this.resourceController&&(this.resourceController.memoryController.maxMemory=e)},m),this.updatingHandles.add(()=>this.qualitySettings.additionalCacheMemory,e=>{this.resourceController&&(this.resourceController.memoryController.additionalCacheMemory=e)},m),this.updatingHandles.add(()=>this.qualitySettings.frameRate??0,e=>ae(e>0?1e3/Math.ceil(e):0),m),this.addHandles([p(()=>this.spatialReference,()=>this.notifyChange(`clippingArea`),h),p(()=>({plane:this.slice.plane,isDecoration:this.slice.isDecoration}),()=>this._updateSlice(),h)])}destroy(){this.destroyed||(kt(this),this.updatingHandles.removeAll(),this.basemapTerrain?.clearHandles(),this.elevationProvider.destroy(),this.ui.removeAllHandles(),this.layerViewManager.clearHandles(),this.invalidate(),this.layerViewManager.clear(),this._set(`analysisViewManager`,u(this.analysisViewManager)),this._exitSurface(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this.sharedSymbolResources=u(this.sharedSymbolResources),this._set(`labeler`,u(this.labeler)),this._set(`deconflictor`,u(this.deconflictor)),this._resourceController=u(this._resourceController),this._set(`stateManager`,u(this.stateManager)),this._set(`inputManager`,u(this.inputManager)),this.state.destroy(),this.highlights.destroy(),this.removeHandles(`updatingMonitors`),this._set(`environmentView`,u(this.environmentView)),this._set(`environment`,u(this.environment)),this.groundView=u(this.groundView),this.groundAndIMSurface.destroy(),this.slice.destroy(),this._updatingObjectsWithProgress.length=0,this._updatingObjects.length=0,this.ui?.destroy(),this._set(`ui`,null),this._set(`renderCanvas`,null),this._set(`canvas`,null),this._canvas=null,this.screenSizePerspective.destroy(),this.attribution3D.destroy())}get stage(){return this._stage}get renderSpatialReference(){return this.renderCoordsHelper.spatialReference}get groundSpatialReference(){return this.groundView?.spatialReference}get analyses(){return super.analyses}set analyses(e){super.analyses=e}get animation(){return this.state?.animation}get overlayManager(){return this.basemapTerrain?.overlayManager}get camera(){return this.stateManager?.camera}set camera(e){this.stateManager&&(this.stateManager.camera=e)}get contentCamera(){return this.stateManager?.contentCamera}set contentCamera(e){this.stateManager&&(this.stateManager.contentCamera=e)}installContentCameraReset(e={sticky:!1}){return this.stateManager.installContentCameraReset(e)}get canvas(){return this._canvas}get center(){return this.stateManager?.center}set center(e){this.stateManager&&(this.stateManager.center=b(C,e))}get clippingArea(){if(this.viewingMode===`global`)return null;let e=this.map,t=this._userClippingArea||d(e,`clippingArea`);return!(this._userClippingArea||d(e,`clippingEnabled`))||t==null?(this._clippingArea=null,null):t instanceof S?this.spatialReference&&(t=X(t,this.spatialReference),t==null)?(l.getLogger(this).error(`#clippingArea`,`setting clippingArea with incompatible SpatialReference`),this._clippingArea):(t=t.clone(),t.intersection(this._groundAndLayersExtent)??(t.xmin=t.xmax,t.ymin=t.ymax),t.zmin=void 0,t.zmax=void 0,t.equals(this._clippingArea)||(this._clippingArea=t),this._clippingArea):(l.getLogger(this).error(`#clippingArea`,`only clippingArea geometries of type Extent are supported`),this._clippingArea)}set clippingArea(e){this.ready&&this.viewingMode===`global`&&e!=null?l.getLogger(this).error(`#clippingArea=`,`Clipping area is only supported in local viewingMode`):this._userClippingArea=e}get renderDataExtent(){if(this.state.viewingMode===1)return null;let e=this.renderSpatialReference,t=this.dataExtent;return t==null||e==null||t.spatialReference.equals(e)?t:X(t,e)}get tileInfo(){return this.basemapTerrain?.tilingScheme?.toTileInfo()}get dataExtent(){let e=this._groundAndLayersExtent,t=this.spatialReference||T.WGS84,n=X(this.clippingArea,t);n!=null&&(e=e==null?n:e.intersection(n));let r=this._get(`dataExtent`);return e!=null&&e.equals(r)?r:e}get _groundAndLayersExtent(){let e=this.spatialReference||T.WGS84,t,n=n=>{let r=X(n,e);r!=null&&(t==null?t=r.clone():t.union(r))},{groundView:r}=this,i=r?.spatialReference,a=r?.fullGroundExtent;i&&a&&n(new S({xmin:a[0],ymin:a[1],zmin:0,xmax:a[2],ymax:a[3],zmax:0,spatialReference:i}));let o=e=>{e.fullExtent==null||e.type===`graphics`&&e.internal||n(e.fullExtent)};if(this.map?.allLayers.forEach(e=>o(e)),t==null)return null;t.hasZ?(t.zmin=Math.min(0,t.zmin??0),t.zmax=Math.max(0,t.zmax??0)):(t.zmin=0,t.zmax=0);let s=this._get(`_groundAndLayersExtent`);return t.equals(s)?s:t}get environment(){return this._environment}set environment(e){if(this._environment===e)return;let{_environment:t}=this;this._environment=null,t?.destroy(),this._environment=e,this.notifyChange(`environment`)}castEnvironment(e){return e?e instanceof I?e:e instanceof Mt?this.environment?.cloneWithWebsceneEnvironment(e)??I.fromWebsceneEnvironment(e):b(I,e):new I}get extent(){return this.stateManager?.extent}set extent(e){this.stateManager&&(this.stateManager.extent=e)}get screenCenter(){return this.stateManager?.screenCenter}get frustum(){return this.stateManager?.frustum}get layerviewCollections(){return[this.basemapView?.baseLayerViews,this.basemapView?.groundLayerViews,this.groundView?.layerViews,this.layerViews,this.basemapView?.referenceLayerViews]}get _layerToLayerviewMapping(){return q._layerToLayerview}static{this._layerToLayerview=j._layerToLayerview.concat([[`view.map.ground.layers`,`view.groundView.layerViews`]])}get initialExtentRequired(){return this.stateManager&&!this.stateManager.hasInitialView}get defaultsFromMapSettings(){return{required:{tileInfo:!1,heightModelInfo:!0,extent:!1}}}get interacting(){return this.navigating||(this.toolViewManager?.interacting??!1)}get stationary(){return!this.animation&&!this.resizing&&(this.state?.stationary??!0)}get navigating(){return this.state?.navigating??!1}get scene(){return this.map&&Ne in this.map?this.map:null}get padding(){return this.stateManager?.padding}set padding(e){this.stateManager&&(this.stateManager.padding=e)}get featureTiles(){return this._featureTiles}set qualityProfile(e){let t=z(e);t&&this._get(`qualityProfile`)!==e&&(this.qualitySettings=new B(t),this.stage?.renderView.updateQualitySettings(this.qualitySettings),this._set(`qualityProfile`,e))}get qualityProfile(){return this._get(`qualityProfile`)||ot()}_updateSlice(){this.stage!=null&&(this.stage.renderer.slice=this.slice)}get typeSpecificPreconditionsReady(){return this.viewingMode?!!this.stateManager?.preinit(this.spatialReference):!1}get resolution(){let{scale:e,spatialReference:t}=this;return t?me(()=>Ee(e,t)):0}get scale(){return this.stateManager?.scale}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get terrainLevel(){let e=this.basemapTerrain?.tilingScheme,t=this.scale;if(!e||!t)return null;let n=e.levelAtScale(t)+this.qualitySettings.tiledSurface.lodBias,r=e.getMaxLod();return n<=0?null:Math.max(0,Math.min(n,r||1/0))}get heightModelInfo(){let e=this.getDefaultHeightModelInfo();if(!e)return null;let t=ue(this.spatialReference);if(t&&e.heightUnit!==t)return new ye({heightModel:e.heightModel,heightUnit:t,vertCRS:e.vertCRS,associatedSpatialReference:e.associatedSpatialReference});if(!e.associatedSpatialReference){let t=e.clone();return t.associatedSpatialReference=this.spatialReference,t}return e}get alphaCompositingEnabled(){return this._get(`alphaCompositingEnabled`)}set alphaCompositingEnabled(e){this._stage&&l.getLogger(this).warn(`alphaCompositingEnabled cannot be changed after the view has become ready`),this._set(`alphaCompositingEnabled`,e)}get updating(){if(this.destroying||this.destroyed)return!1;if(!this.initialized)return!0;let e=0,t=this.layerViewManager.updating,n=t?this.layerViewManager.updatingRemaining:0;this.allLayerViews.forEach(r=>{if(!r.isFulfilled())++n;else if(r.updating){if(t=!0,r.suspended||ft(r))return;++n,e+=r.updatingProgress}});let r=.1;for(let t of this._updatingObjects)t?.updating&&(n+=r,e+=.5*r);for(let t of this._updatingObjectsWithProgress)t?.updating&&(++n,e+=t.updatingProgress);let i=!this.stateManager.test.updatingIgnoreRenderState&&this.state.updating;if(t=!!(t||n>0||this.updatingHandles.updating||!this.ready||!this.stationary||i||this._importControllers.size>0||this.inputManager?.updating||this.map?.allLayers?.some(e=>!e.isFulfilled())),t?(this._numUpdating=Math.max(n,this._numUpdating),e+=this._numUpdating-n):this._numUpdating=0,this._numUpdating>0?e/=this._numUpdating:e=+!t,this._get(`updatingProgress`)!==e){let n=performance.now();if(e<1){let t=Math.min((n-this._lastUpdateTime)/2e3,1);e=this.updatingProgress*(1-t)+e*t}this._set(`updatingProgress`,e),this._lastUpdateTime=t&&e<1?n:0}return R.UPDATING&&console.log(`Updating:`,this._updatingObjectsToDebug.filter(e=>e!=null&&e.updating).map(({declaredClass:e})=>e)),t}get _updatingObjects(){return[this.graphicsView,this.basemapView,this.groundView,this._resourceController,this.stage,this.featureTiles,this.pointsOfInterest,this.environmentView,this.overlay,this._featureTreeDebugger,this.toolViewManager,this.analysisViewManager,this.focusAreasView]}get _updatingObjectsWithProgress(){return[this.deconflictor,this.labeler,this.basemapTerrain]}get _updatingObjectsToDebug(){return R.UPDATING?this._updatingObjects.concat(this._updatingObjectsWithProgress).concat(this.allLayerViews.toArray()):[]}get viewingMode(){let e=this._predeterminedViewingMode;if(e!=null)return M(e);let t=this.spatialReference;return t?this.defaultsFromMap?.viewingMode!=null&&t.equals(this.defaultsFromMap.spatialReference)?M(this.defaultsFromMap.viewingMode):Dt(t,1)?`global`:`local`:`global`}set viewingMode(e){this.ready?l.getLogger(this).error(`#viewingMode`,`viewingMode cannot be set once view is ready`):this._overrideIfSome(`viewingMode`,e)}get viewpoint(){return this.stateManager?.viewpoint}set viewpoint(e){this.stateManager&&(this.stateManager.viewpoint=e)}get visibleArea(){return this.stateManager?.visibleArea}get zoom(){return this.stateManager.zoom}set zoom(e){this.stateManager&&(this.stateManager.zoom=e)}get resourceController(){return this._resourceController}get quality(){return this._resourceController?.memoryController?.memoryFactor??1}get resolutionScale(){return Math.sqrt(Math.min(1,this.quality/.75))}get performanceInfo(){return new lt(this)}on(e,t,n,r){return this.viewEvents.on(e,t,n,r)||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}toMap(e,t){if(!this.ready)return l.getLogger(this).error(`#toMap()`,`Scene view cannot be used before it is ready`),null;let n=K(e)?Et(this,e):e;return rt(this,n,t,this._defaultToMapOptions)}toScreen(e){if(!this.ready)return l.getLogger(this).error(`#toScreen()`,`Scene view cannot be used before it is ready`),null;let t=e;return e.z??(t=It,t.x=e.x,t.y=e.y,t.z=tt(this.elevationProvider,e)??0,t.spatialReference=e.spatialReference),E(t,Z,this.renderSpatialReference),this.state.camera.projectToScreen(Z,Q),se(Q[0],Q[1])}pixelSizeAt(e,t){if(!this.ready)return l.getLogger(this).error(`#pixelSizeAt()`,`Scene view cannot be used before it is ready`),null;if(!e)return 0;let n=this.renderSpatialReference;E(e,Z,n);let r=this.state.camera.computeScreenPixelSizeAt(Z);return t&&n!==t?r*de(n)/de(t):r}overlayPixelSizeInMapUnits(e){return this.overlayManager?.overlayPixelSizeInMapUnits(e,()=>this.pixelSizeAt(e))??1}hitTest(e,t){if(!this.ready)return l.getLogger(this).error(`#hitTest()`,`Scene view cannot be used before it is ready`),null;let n=K(e)?Et(this,e):e;return it(this,n,t,this._defaultHitTestOptions)}async popupHitTest(e){return at(this,e)}goTo(e,t){return this.updatingHandles.addPromise(this.stateManager.goTo(e,t))}async zoomIn(){if(this.canZoomIn)return this.navigation.zoom(!0)}async zoomOut(){if(this.canZoomOut)return this.navigation.zoom(!1)}async whenAnalysisView(e){if(e.parent==null)throw new a(`view:no-analysisview-for-analysis`,`The analysis does not exist in view.analyses`,{analysis:e});switch(e.parent.type){case`line-of-sight`:case`dimension`:case`viewshed`:return(await this.whenLayerView(e.parent)).whenAnalysisView();default:return this.analysisViewManager.whenAnalysisView(e)}}whenLayerView(e){return super.whenLayerView(e)}async takeScreenshot(e){let t=await this._completeSettings(e);await this.whenReady();let n=(await this.stage.renderView.takeScreenshot(t))[0];return(await import(`./support/screenshotUtils.js`)).encode(n,t,this._pixelFormat())}async _takeScreenshot(e){let t=await this._completeSettings(e);await this.whenReady();let n=(await this.stage.renderView.takeScreenshot(t))[0];return(await import(`./support/screenshotUtils.js`)).encodeData(n,this._pixelFormat())}async _takeScreenshotWithObjectAndLayerId(e){let t=await this._completeSettings(e);t.olidColor=!0,await this.whenReady();let n=await this.stage.renderView.takeScreenshot(t),{encodeData:r}=await import(`./support/screenshotUtils.js`);return[r(n[0],this._pixelFormat()),r(n[1],this._pixelFormat())]}async _completeSettings(e){let{toRenderSettings:t,screenshotSuperSampleSettings:n}=await import(`./support/screenshotUtils.js`),r=t(e,this);return r.pixelRatio/=this.state.pixelRatio,n(r,this.supersampleScreenshotsEnabled,this.padding)}_pixelFormat(){return{flipY:!0,premultipliedAlpha:this.stage?.renderView.getAlpha()??!1}}get test(){}async takeScreenshotWithObjectAndLayerId(e){if(!yt())throw new a(`360vr:objectAndLayerId-rendering-disabled`,`has enable-feature:objectAndLayerId-rendering must be true`);let{encode:t}=await import(`./support/screenshotUtils.js`),n=await this._completeSettings(e);n.olidColor=!0,await this.whenReady();let r=await this.stage.renderView.takeScreenshot(n),i=t(r[0],n,this._pixelFormat()),o=await this._completeSettings(e);return o.format=`png`,[i,t(r[1],o,this._pixelFormat())]}getColorToObjectAndLayerIdMapping(){let e=this.stage.renderView.olidRenderHelper;if(e)return e.getColorToObjectAndLayerIdMapping();throw new a(`360vr:objectAndLayerId-rendering-disabled`,`has enable-feature:objectAndLayerId-rendering must be true`)}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}getAttributionItems(){return super.getAttributionItems().concat(this.attribution3D.attributionItems)}importLayerView(e){return P.importLayerView(e)}hasLayerViewModule(e){return P.hasLayerViewModule(e)}forceDOMReadyCycle(){this.forceReadyCycle()}getWebDocumentSpatialReference(){return this.scene?.initialViewProperties?.spatialReference}getDefaultTimeZone(){return this.scene?.initialViewProperties?.timeZone??null}getSurface(){return this.surface}get _predeterminedViewingMode(){let e=this._isOverridden(`viewingMode`)?this._get(`viewingMode`):this.scene?.initialViewProperties?.viewingMode;return e==null?null:N(e)}getSpatialReferenceSupport(e,t){let n=this._predeterminedViewingMode,r=r=>this._validateSpatialReferenceForViewingMode(e,t,r)?this._makeSpatialReferenceConstraints(e,t,r,n):null,i=n?r(n):[...r(1)??[],...r(2)??[]];return i?.length?{constraints:i}:null}_validateSpatialReferenceForViewingMode(e,t,n){return Dt(e,n)?t==null||D(t)?!0:!(O(t)&&pt(t,e,n)==null||k(t)&&n===1):!1}_makeSpatialReferenceConstraints(e,t,n,r){if(t==null)return[{spatialReference:e,viewingMode:n}];let{isWebMercator:i,isWGS84:a,vcsWkid:o,latestVcsWkid:s}=e,c=()=>o==null?i?T.WGS84:T.WebMercator:new T({...i?De:Oe,vcsWkid:o,latestVcsWkid:s});return D(t)&&(i||a)?!(a&&r!==2)||mt(t.tileInfo,t.fullExtent,e,1)===null?[{spatialReference:e,viewingMode:n},{spatialReference:c(),viewingMode:n}]:[{spatialReference:c(),viewingMode:n}]:!O(t)&&!k(t)&&(i||a)?[{spatialReference:e,viewingMode:n},{spatialReference:c(),viewingMode:n}]:O(t)&&i&&n!==1?[{spatialReference:e,viewingMode:n},{spatialReference:c(),viewingMode:2}]:[{spatialReference:e,viewingMode:n}]}_validateSpatialReference(e){let t=this.getSpatialReferenceSupport(e)!=null,n=this._predeterminedViewingMode;return t||(n==null?e.isGeographic&&l.getLogger(this).warnOnce(`Spatial reference is geographic but not supported.`):l.getLogger(this).warnOnce(`Spatial reference defined on view not supported in ${M(n)} viewing mode.`)),t}whenReady(){return new Promise(e=>{this.ready?e(this):this._resolveWhenReady.push(e)})}trackGraphicState(e){if(!e.graphic)return l.getLogger(this).error(`trackGraphicState`,`GraphicState.graphic must not be null or undefined to start tracking`),null;let t=this.getViewForGraphic(e.graphic),n=null,r=!1,i=t=>{!r&&t!=null&&`processor`in t&&t.processor?.type===`graphics-3d`&&t.processor.graphicsCore&&(n=t.processor.graphicsCore.trackGraphicState(e))};return t==null?this.whenViewForGraphic(e.graphic,{waitForLayer:!0}).then(e=>i(e),()=>{}).catch(()=>{}):i(t),c(()=>{r=!0,n!=null&&(n.remove(),n=null)})}maskOccludee(e){if(!e)return l.getLogger(this).error(`maskOccludee`,`GraphicState.graphic must not be null or undefined to mask an occludee`),null;let t=this.getViewForGraphic(e),n=null,r=!1,i=t=>{!r&&t!=null&&Tt(t)&&(n=t.maskOccludee(e))};return t==null?this.whenViewForGraphic(e,{waitForLayer:!0}).then(e=>i(e),()=>{}).catch(()=>{}):i(t),c(()=>{r=!0,n!=null&&(n.remove(),n=null)})}getViewForGraphic(e){return e.layer===this?this.graphicsView:e.layer?this.allLayerViews.filter(e=>e.type!==`media-3d`).find(t=>t.layer===e.layer):null}graphicChanged(e){this.graphicsView!=null&&this.graphicsView.graphicChanged(e)}async whenViewForGraphic(e,t){return e.layer===this?(await g(()=>this.graphicsView),this.graphicsView):!e.layer||!this.map?null:!t||!t.waitForLayer||this.map.allLayers.includes(e.layer)?this.whenLayerView(e.layer):new Promise((t,n)=>{let r=this.map.allLayers.on(`change`,i=>{i.added.includes(e.layer)&&(r.remove(),this.whenLayerView(e.layer).then(t,n))})})}enableFeatureTiles(){let e=Symbol();return this._featureTileTreeClients.add(e),c(()=>this._featureTileTreeClients.delete(e))}async _importModule(e,t){let n=new AbortController;this._importControllers.set(e,n),this._updatingChanged();try{let r=await Lt[e]();if(t&&(te(this),ne(n.signal),await t(n.signal)),this.destroyed)throw re();return ne(n.signal),r}catch{return null}finally{this._importControllers.delete(e),this._updatingChanged()}}_abortImport(e){this._importControllers.get(e)?.abort(),this._importControllers.delete(e),this._updatingChanged()}_initBasemapTerrain(){this._set(`basemapTerrain`,new H({view:this})),this.elevationProvider.register(0,this.basemapTerrain)}_exitBasemapTerrain(){let{basemapTerrain:e,elevationProvider:t}=this;e&&(this._set(`basemapTerrain`,null),t.unregister(e),e.destroy())}_initGlobe(){this._initCoordinateSystem(),this.state.createInitialCamera(),this._initBasemapTerrain(),this._set(`pointsOfInterest`,new V({view:this})),this.addHandles([this.updatingHandles.add(()=>R.FEATURE_TILE_TREE_SHOW_TILES,e=>{e&&!this._featureTreeDebugger?this.updatingHandles.addPromise(import(`./3d/layers/support/FeatureTileTree3DDebugger.js`)).then(({FeatureTileTree3DDebugger:e})=>{!this._featureTreeDebugger&&R.FEATURE_TILE_TREE_SHOW_TILES&&(this._featureTreeDebugger=new e({view:this}))}):e||(this._featureTreeDebugger=u(this._featureTreeDebugger))},_),this.updatingHandles.add(()=>({basemapExtent:this.groundView?.groundExtent,basemapSpatialReference:this.groundView?.spatialReference,clippingArea:this.clippingArea,featureTiles:this._featureTiles}),({basemapExtent:e,basemapSpatialReference:t,clippingArea:n,featureTiles:r})=>{if(!r)return;let i=!!e;if(!n&&!i)r.filterExtent=null;else if(!i||!t)r.filterExtent=n;else{let i=e&&t?w(Ce(e,t),this.spatialReference):null;r.filterExtent=n?n.intersection(i):i}},_),this.updatingHandles.add(()=>this._featureTileTreeClients.size>0,e=>{e?this.updatingHandles.consumePromise(this._ensureFeatureTileTree()):this._featureTiles=u(this._featureTiles)},h)],Pt),this.stateManager.init()}async _ensureFeatureTileTree(){if(this._featureTiles||this._importControllers.has(`FeatureTileTree3D`))return;let e=(await this.updatingHandles.addPromise(this._importModule(`FeatureTileTree3D`)))?.FeatureTileTree3D;e&&(this._featureTiles=new e({renderCoordsHelper:this.renderCoordsHelper,pointsOfInterest:this.pointsOfInterest,viewState:this.state,scheduler:this._resourceController.scheduler,terrain:this.basemapTerrain}),this._updatingChanged())}_exitTerrain(){this.stateManager.exit(),this.removeHandles(J),this.removeHandles(Pt),this._featureTiles=u(this.featureTiles),this._set(`pointsOfInterest`,u(this.pointsOfInterest)),this._exitBasemapTerrain(),this.state.reset(),this._exitCoordinateSystem()}_initCoordinateSystem(){if(this.spatialReference){let e=this.spatialReference,t=this.state.isGlobal,n=Te(t,e);n!==this.renderSpatialReference&&(this.renderCoordsHelper.viewingMode=this.state.viewingMode,this.renderCoordsHelper.spatialReference=n,t||this.addHandles(p(()=>this.groundView?.groundExtent,e=>{let t=this.renderCoordsHelper.spatialReference;e!=null&&(e[0]!==0||e[1]!==0||e[2]!==0||e[3]!==0)&&Se(e,this.groundView.spatialReference,$,t)&&(this.renderCoordsHelper.extent=$)},h),J),this.sceneIntersectionHelper?.setTolerance(U/this.renderCoordsHelper.unitInMeters))}}_exitCoordinateSystem(){this.removeHandles(J)}_updatingChanged(){this.notifyChange(`updating`)}_updateUpdatingMonitors(e=null){(e==null||e.type!==4)&&(this.removeHandles(`updatingMonitors`),this.allLayerViews.forEach(e=>{e.destroyed||(this.addHandles(p(()=>[e.updating,e.updatingProgress],()=>this._updatingChanged(),h),`updatingMonitors`),e.when(()=>this._updatingChanged(),()=>this._updatingChanged()))}),this._updatingChanged())}async _prepareScreenshotOverlay(){this.overlay&&await this.overlay.prepare()}_renderScreenshotOverlay(e,t,n){if(!this.overlay||!this.overlay.hasVisibleItems)return n;let r=e.getContext(`2d`,{willReadFrequently:!0});return r.putImageData(n,0,0),this.overlay.renderCanvas(e,{disableDecorations:t}),r.getImageData(0,0,n.width,n.height)}_initStage(e){let t={deactivatedWebGLExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions,context:e,screenshot:{prepareOverlay:()=>this._prepareScreenshotOverlay(),renderOverlay:(e,t,n)=>this._renderScreenshotOverlay(e,t,n)}},n=new Ze(this.state.viewingMode,e=>this.stage.layers.forEach(e),this);this._set(`sceneIntersectionHelper`,n);let r=i(this.surface);this._stage=new vt({view:this,options:t,container:r}),this.notifyChange(`stage`),this._updateSlice(),this.addHandles([this.on(`pointer-move`,()=>this.stage?.renderer.resetAnimation()),o(this.stage.renderView.canvas,`webglcontextlost`,e=>{this.fatalError=new a(`webgl-context-lost`,e.statusMessage||`WebGL context lost`)})],`stage`),this.sceneIntersectionHelper.setTolerance(U/this.renderCoordsHelper.unitInMeters),this._set(`canvas`,this.stage.renderView.canvas)}_exitStage(){this.sceneIntersectionHelper?.destroy(),this._set(`sceneIntersectionHelper`,null),this._stage=u(this.stage),this._set(`stage`,null),this.removeHandles(`stage`),this._set(`canvas`,null)}_initSurface(){this._exitSurface();let e=_t(this.renderCanvas,{alpha:this.alphaCompositingEnabled,preserveDrawingBuffer:this.preserveDrawingBufferEnabled});this._initStage(e),this._initGlobe(),this.sharedSymbolResources=new ut({view:this,resourceController:this._resourceController})}_exitSurface(){this.sharedSymbolResources&&(this.sharedSymbolResources.objectResourceCache.destroy(),this.sharedSymbolResources.destroy(),this.sharedSymbolResources=null,this._exitTerrain(),this._exitStage())}async _ensureGraphicsView(){if(this.graphicsView||this._importControllers.has(`GraphicsView3D`)||this.graphics.length===0)return;this.removeHandles(`GraphicsView3D`);let e=(await this.updatingHandles.addPromise(this._importModule(`GraphicsView3D`,e=>g(()=>this.groundView?.ready,e))))?.default;e&&this._set(`graphicsView`,new e({view:this,getGraphics:()=>this.graphics})),this._updatingChanged()}_disposeGraphicsView(){this._abortImport(`GraphicsView3D`),this.removeHandles(`GraphicsView3D`),this.graphicsView&&(this.removeHandles(this.graphicsView.processor.layer.id),this.graphicsView.destroy(),this._set(`graphicsView`,null))}_disposeFocusAreasView(){this._abortImport(`FocusAreasView`),this.removeHandles(`FocusAreasView`),this.focusAreasView=u(this.focusAreasView)}async _ensureFocusAreasView(e){if(this.focusAreasView||this._importControllers.has(`FocusAreasView`)||e===0)return;this.removeHandles(`FocusAreasView`);let t=(await this.updatingHandles.addPromise(this._importModule(`FocusAreasView`)))?.FocusAreasView;t&&(this.focusAreasView=new t({view:this})),this._updatingChanged()}_startup(){N(this.viewingMode)===1&&(this._clippingArea=null),this._initSurface(),this._set(`ready`,!0),this.addHandles(f(()=>this.graphics,`after-changes`,()=>this._ensureGraphicsView()),`GraphicsView3D`),this._ensureGraphicsView(),this.addHandles(this.updatingHandles.add(()=>this.map?.focusAreas?.areas.length??0,e=>this._ensureFocusAreasView(e),{initial:!0}),`FocusAreasView`);let e=this.scene?.initialViewProperties??null,t=e?.environment;t&&(this._overrideDefaultEnvironmentOnly?pe(this.environment,t):this.environment=this.environment.cloneWithWebsceneEnvironment(t)),this.timeExtent=e?.timeExtent,e?.analyses.applyTo(this),this.labeler.setup(),this.environmentView.connectView(this),this.inputManager.connect();let n=this._resolveWhenReady;this._resolveWhenReady=[],n.forEach(e=>e(this))}_teardown(){this.inputManager.disconnect(),this.environmentView.disconnectView(),this._overrideDefaultEnvironmentOnly=!1,this.labeler.dispose(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this._exitSurface(),this._set(`ready`,!1)}get _defaultToMapOptions(){let e={include:new Set};if(!this.map)return e;this.map.ground&&e.include.add(W);for(let t of this.allLayerViews)(A(t.layer)&&(!has(`enable-feature:im-as-ground`)||t.layer.isUsedAsGroundLayer)||Ae(t.layer))&&e.include.add(t.uid);return e}get _defaultHitTestOptions(){let e={exclude:new Set};if(!this.map)return e;this.map.ground&&this.map.ground.opacity<1&&e.exclude.add(W);for(let t of this.allLayerViews)(has(`enable-feature:im-as-ground`)?A(t.layer)&&t.layer.isUsedAsGroundLayer:A(t.layer))&&t.fullOpacity<1&&e.exclude.add(t.uid);return e}static{this.type=`3d`}static clearStatics(){Nt(),he(),le(),St(),Ye(),Be(),xe(),wt(),Me(),gt(),xt(),Xe(),Qe(),_e(),oe(),bt(),ht(),Ge.cleanupI3SLodHandling(),je.cleanupTilemapCache(),L.cleanupViewstate(),H.cleanupTerrainSurface()}};e([v({nonNullable:!0}),y(Ft)],Y.prototype,`options`,void 0),e([v()],Y.prototype,`_userClippingArea`,void 0),e([v()],Y.prototype,`_resourceController`,void 0),e([v()],Y.prototype,`stage`,null),e([v({readOnly:!0})],Y.prototype,`deconflictor`,void 0),e([v({readOnly:!0})],Y.prototype,`labeler`,void 0),e([v()],Y.prototype,`navigation`,void 0),e([v({type:Le,readOnly:!0})],Y.prototype,`animation`,null),e([v({readOnly:!0})],Y.prototype,`basemapTerrain`,void 0),e([v({readOnly:!0})],Y.prototype,`overlayManager`,null),e([v({readOnly:!0})],Y.prototype,`elevationProvider`,void 0),e([v()],Y.prototype,`camera`,null),e([v({type:t})],Y.prototype,`contentCamera`,null),e([v({readOnly:!0})],Y.prototype,`canvas`,null),e([v({type:C,useTypeForAutocast:!1})],Y.prototype,`center`,null),e([v({type:S})],Y.prototype,`clippingArea`,null),e([v({type:F,nonNullable:!0})],Y.prototype,`constraints`,void 0),e([v({type:S,readOnly:!0})],Y.prototype,`renderDataExtent`,null),e([v({readOnly:!0})],Y.prototype,`tileInfo`,null),e([v({type:S,readOnly:!0})],Y.prototype,`dataExtent`,null),e([v({type:S,readOnly:!0})],Y.prototype,`_groundAndLayersExtent`,null),e([v({type:I})],Y.prototype,`environment`,null),e([y(`environment`)],Y.prototype,`castEnvironment`,null),e([v({readOnly:!0})],Y.prototype,`environmentView`,void 0),e([v({type:S})],Y.prototype,`extent`,null),e([v({type:r})],Y.prototype,`floors`,void 0),e([v()],Y.prototype,`screenCenter`,null),e([v()],Y.prototype,`frustum`,null),e([v({type:Number,readOnly:!0})],Y.prototype,`fullOpacity`,void 0),e([v({readOnly:!0})],Y.prototype,`graphicsView`,void 0),e([v()],Y.prototype,`analysisViewManager`,void 0),e([v()],Y.prototype,`groundView`,void 0),e([v({readOnly:!0})],Y.prototype,`layerviewCollections`,null),e([v({type:Boolean})],Y.prototype,`initialExtentRequired`,null),e([v()],Y.prototype,`defaultsFromMapSettings`,null),e([v()],Y.prototype,`interacting`,null),e([v()],Y.prototype,`stationary`,null),e([v()],Y.prototype,`navigating`,null),e([v()],Y.prototype,`map`,void 0),e([v()],Y.prototype,`padding`,null),e([v({type:V,readOnly:!0})],Y.prototype,`pointsOfInterest`,void 0),e([v()],Y.prototype,`_featureTiles`,void 0),e([v()],Y.prototype,`featureTiles`,null),e([v()],Y.prototype,`_featureTreeDebugger`,void 0),e([v({constructOnly:!0})],Y.prototype,`deactivatedWebGLExtensions`,void 0),e([v({constructOnly:!0})],Y.prototype,`debugWebGLExtensions`,void 0),e([v({constructOnly:!0})],Y.prototype,`renderCanvas`,void 0),e([v({constructOnly:!0})],Y.prototype,`state`,void 0),e([v()],Y.prototype,`screenSizePerspective`,void 0),e([v({readOnly:!0})],Y.prototype,`inputManager`,void 0),e([v({readOnly:!0})],Y.prototype,`stateManager`,void 0),e([v({type:[`low`,`medium`,`high`]})],Y.prototype,`qualityProfile`,null),e([v({type:B,get(){let e=this._get(`qualitySettings`);if(!e){let t=z(this.qualityProfile);e=new B(t)}return e}})],Y.prototype,`qualitySettings`,void 0),e([v()],Y.prototype,`slice`,void 0),e([v({readOnly:!0})],Y.prototype,`typeSpecificPreconditionsReady`,null),e([v({readOnly:!0})],Y.prototype,`sceneIntersectionHelper`,void 0),e([v({type:Number,readOnly:!0})],Y.prototype,`resolution`,null),e([v({type:Number})],Y.prototype,`scale`,null),e([v({readOnly:!0,type:Number})],Y.prototype,`terrainLevel`,null),e([v()],Y.prototype,`heightModelInfo`,null),e([v({type:T})],Y.prototype,`spatialReference`,void 0),e([v({type:Boolean,value:!1})],Y.prototype,`alphaCompositingEnabled`,null),e([v({constructOnly:!0})],Y.prototype,`preserveDrawingBufferEnabled`,void 0),e([v({type:Boolean})],Y.prototype,`supersampleScreenshotsEnabled`,void 0),e([v({readOnly:!0})],Y.prototype,`type`,void 0),e([v(),y(e=>e instanceof At?e:x(jt,e))],Y.prototype,`ui`,void 0),e([v({type:Boolean,readOnly:!0})],Y.prototype,`updating`,null),e([v()],Y.prototype,`_updatingObjects`,null),e([v()],Y.prototype,`_updatingObjectsWithProgress`,null),e([v()],Y.prototype,`_updatingObjectsToDebug`,null),e([v({type:Number,readOnly:!0})],Y.prototype,`updatingProgress`,void 0),e([v({type:[`global`,`local`]})],Y.prototype,`viewingMode`,null),e([v({type:n})],Y.prototype,`viewpoint`,null),e([v({readOnly:!0})],Y.prototype,`visibleArea`,null),e([v({type:Number})],Y.prototype,`zoom`,null),e([v({readOnly:!0})],Y.prototype,`quality`,null),e([v({readOnly:!0})],Y.prototype,`resolutionScale`,null),e([v()],Y.prototype,`focusAreasView`,void 0),e([v()],Y.prototype,`_defaultToMapOptions`,null),e([v()],Y.prototype,`_defaultHitTestOptions`,null),Y=q=e([fe(`esri.views.SceneView`)],Y);function X(e,t){return e!=null&&be(e.spatialReference,t)?w(e,t):null}const Z=ge(),Q=ce(),$=we(),It=ke(0,0,0,T.WebMercator),Lt={GraphicsView3D:()=>import(`./3d/layers/GraphicsView3D.js`),FocusAreasView:()=>import(`./3d/FocusAreasView.js`),FeatureTileTree3D:()=>import(`./3d/layers/support/FeatureTileTree3D.js`)},Rt=Y;export{Rt as default};
2
+ import{__decorate as e}from"tslib";import t from"../Camera.js";import n from"../Viewpoint.js";import r from"../core/Collection.js";import{byId as i}from"../core/domUtils.js";import a from"../core/Error.js";import{on as o}from"../core/events.js";import{destroyHandle as s,makeHandle as c}from"../core/handleUtils.js";import has from"../core/has.js";import l from"../core/Logger.js";import{mapCollectionAsync as ee}from"../core/mapCollectionUtils.js";import{destroyMaybe as u,maybeProperty as d}from"../core/maybe.js";import{throwIfDestroyed as te,throwIfAborted as ne,createAbortError as re}from"../core/promiseUtils.js";import ie from"../core/ReactiveSet.js";import{on as f,watch as p,initial as m,sync as h,whenOnce as g,syncAndInitial as _}from"../core/reactiveUtils.js";import{setFrameDuration as ae,cleanupScheduling as oe}from"../core/scheduling.js";import{createScreenPoint as se,createScreenPointArray as ce}from"../core/screenUtils.js";import{cleanupWhereClauseCache as le}from"../core/sql.js";import{getDefaultVerticalUnitStringForSR as ue,getMetersPerUnitForSR as de}from"../core/units.js";import{property as v,cast as y,subclass as fe}from"../core/accessorSupport/decorators.js";import{ensureType as b,ensureClass as x}from"../core/accessorSupport/ensureType.js";import{overrideDefaultsFrom as pe}from"../core/accessorSupport/overrideDefaultsFrom.js";import{runUntracked as me}from"../core/accessorSupport/tracking.js";import{drainNotificationQueue as he}from"../core/accessorSupport/trackingUtils.js";import{create as ge}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{cleanupPooledRBush as _e}from"../core/libs/rbush/PooledRBush.js";import{initialize as ve}from"../core/workers/workers.js";import S from"../geometry/Extent.js";import ye from"../geometry/HeightModelInfo.js";import C from"../geometry/Point.js";import{project as w,canProjectWithoutEngine as be}from"../geometry/projectionUtils.js";import T from"../geometry/SpatialReference.js";import{cleanupSpatialReferenceEllipsoidUtils as xe}from"../geometry/spatialReferenceEllipsoidUtils.js";import{projectBoundingRect as Se}from"../geometry/projection/projectBoundingRect.js";import{projectPointToVector as E}from"../geometry/projection/projectPointToVector.js";import{toExtent as Ce,create as we}from"../geometry/support/aaBoundingRect.js";import{renderSRFromViewSR as Te}from"../geometry/support/coordinateSystem.js";import{getResolutionForScale as Ee}from"../geometry/support/scaleUtils.js";import{wgs84 as De,webMercator as Oe}from"../geometry/support/spatialReferenceUtils.js";import{makeDehydratedPoint as ke}from"../layers/graphics/dehydratedPoint.js";import{isImageryTileLayer as D,isTiledLayer as O,isVoxelLayer as k,isIntegratedMeshLayer as A,isGaussianSplatLayer as Ae}from"../layers/support/layerUtils.js";import{TilemapCache as je}from"../layers/support/TilemapCache.js";import{clearDefaultPortalInstance as Me}from"../portal/portalDefault.js";import{WebSceneTag as Ne}from"../support/tagSymbols.js";import{BreakpointsOwner as Pe}from"./BreakpointsOwner.js";import{DOMContainer as Fe}from"./DOMContainer.js";import{PopupView as Ie}from"./PopupView.js";import j from"./View.js";import Le from"./ViewAnimation.js";import{stringFromViewingMode as M,viewingModeFromString as N}from"./ViewingMode.js";import{GroundView3D as Re}from"./3d/GroundView3D.js";import{layerView3DImporter as P}from"./3d/layerViewModuleImportUtils.js";import{importAnalysisViewModule as ze}from"./3d/analysis/analysisViewModuleImportUtils.js";import{cleanupIntersectionUtils as Be}from"./3d/camera/intersectionUtils.js";import F from"./3d/constraints/Constraints.js";import I from"./3d/environment/Environment.js";import{EnvironmentView as Ve}from"./3d/environment/EnvironmentView.js";import He from"./3d/input/SceneInputManager.js";import{GraphicsDeconflictor as Ue}from"./3d/layers/graphics/GraphicsDeconflictor.js";import{Labeler as We}from"./3d/layers/graphics/Labeler.js";import Ge from"./3d/layers/i3s/I3SLodHandling.js";import{Navigation3D as Ke}from"./3d/navigation/Navigation3D.js";import{ScreenSizePerspective as qe}from"./3d/state/ScreenSizePerspective.js";import L from"./3d/state/ViewState.js";import{ViewStateManager as Je,cleanupViewStateManager as Ye}from"./3d/state/ViewStateManager.js";import{cleanupPointToPointAnimationController as Xe}from"./3d/state/controllers/PointToPointAnimationController.js";import{SceneIntersectionHelper as Ze}from"./3d/state/helpers/SceneIntersectionHelper.js";import{cleanupNavigationUtils as Qe}from"./3d/state/utils/navigationUtils.js";import $e from"./3d/support/Attribution3D.js";import{CombinedElevationProvider as et}from"./3d/support/CombinedElevationProvider.js";import{debugFlags as R}from"./3d/support/debugFlags.js";import{getElevationAtPoint as tt}from"./3d/support/ElevationProvider.js";import{GroundAndIMSurface as nt}from"./3d/support/GroundAndIMSurface.js";import{toMap as rt,hitTest as it}from"./3d/support/hitTest.js";import{popupHitTest as at}from"./3d/support/popupHitTest.js";import{getDefaultQualityProfileName as ot,getQualityProfileSettings as z}from"./3d/support/QualityProfile.js";import B from"./3d/support/QualitySettings.js";import{RenderCoordsHelper as st}from"./3d/support/RenderCoordsHelper.js";import{newResourceController as ct}from"./3d/support/ResourceController.js";import lt from"./3d/support/SceneViewPerformanceInfo.js";import{SharedSymbolResources as ut}from"./3d/support/SharedSymbolResources.js";import{ViewSlice as dt}from"./3d/support/ViewSlice.js";import{PointsOfInterest as V}from"./3d/support/pointsOfInterest/PointsOfInterest.js";import H from"./3d/terrain/TerrainSurface.js";import{isSurfaceLayerView as ft,getTiledLayerInfo as pt,checkIfTileInfoSupportedForView as mt}from"./3d/terrain/terrainUtils.js";import{clearTilePerLayerInfo as ht}from"./3d/terrain/TilePerLayerInfo.js";import{cleanupTileRenderer as gt}from"./3d/terrain/TileRenderer.js";import{createWebGLContext as _t}from"./3d/webgl-engine/createWebGLContext.js";import{Stage as vt}from"./3d/webgl-engine/Stage.js";import{olidEnabled as yt}from"./3d/webgl-engine/effects/geometry/olidUtils.js";import{cleanupRenderOccluded as bt}from"./3d/webgl-engine/effects/geometry/RenderOccluded.js";import{defaultTolerance as U}from"./3d/webgl-engine/lib/Intersector.js";import{cleanupShadowmap as xt}from"./3d/webgl-engine/lib/ShadowMap.js";import{terrainId as W}from"./3d/webgl-engine/lib/verticalOffsetUtils.js";import{cleanupEdgeProcessing as St}from"./3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js";import G from"./interactive/options/ViewOptions.js";import Ct from"./support/AnalysisViewManager.js";import{cleanupDrapedUtils as wt}from"./support/drapedUtils.js";import{occludeesSupported as Tt}from"./support/layerViewUtils.js";import{isSupportedScreenPointEvent as K,createScreenPointFromSupportedEvent as Et}from"./support/screenUtils.js";import{isSpatialReferenceSupported as Dt}from"./support/spatialReferenceSupport.js";import{initializeTextureCompressionWorker as Ot,destroyTextureCompressionWorker as kt}from"./support/TextureCompressionHelper.js";import At from"./ui/DefaultUI.js";import jt from"./ui/3d/DefaultUI3D.js";import Mt from"../webscene/Environment.js";import{clearVNodeCache as Nt}from"../widgets/support/vnodeCache.js";var q;const Pt=Symbol(),J=Symbol();function Ft(e){let t=x(G,e);return t!==e&&e.snapping?.enabled==null&&(t.snapping.enabled=!0),t}let Y=class extends Pe(Ie(Fe(j))){static{q=this}get timeZone(){return super.timeZone}set timeZone(e){super.timeZone=e}constructor(e){super(e),this.options=new G({snapping:{enabled:!0}}),this._userClippingArea=null,this._clippingArea=null,this._overrideDefaultEnvironmentOnly=!0,this._resolveWhenReady=[],this._resourceController=ct(this),this.deconflictor=new Ue({view:this}),this.attribution3D=new $e({view:this}),this.labeler=new We({view:this,deconflictor:this.deconflictor.labels}),this.sharedSymbolResources=null,this.navigation=new Ke({view:this}),this.basemapTerrain=null,this.elevationProvider=new et({view:this}),this._canvas=null,this.constraints=new F,this._environment=new I,this.environmentView=new Ve,this.floors=new r,this.fullOpacity=1,this.graphicsView=null,this.analysisViewManager=new Ct({importAnalysisViewModule:e=>ze(e),view:this}),this.groundView=null,this.groundAndIMSurface=null,this.map=null,this._featureTileTreeClients=new ie,this._featureTiles=null,this._featureTreeDebugger=null,this.state=new L({view:this}),this.slice=new dt,this.renderCoordsHelper=new st,this.spatialReference=null,this.preserveDrawingBufferEnabled=!1,this.supersampleScreenshotsEnabled=!0,this.type=`3d`,this.ui=new jt,this._numUpdating=0,this._lastUpdateTime=0,this.updatingProgress=.5,this._importControllers=new Map,ve();let t=()=>this._updatingChanged();this.addHandles(s(ee(()=>this.map?.allLayers,async e=>{try{await e.when()}catch{}finally{t()}}))),this.addHandles([f(()=>this.map?.allLayers,`after-changes`,t,{onListenerAdd:t,onListenerRemove:t,sync:!0}),this.allLayerViews.on(`after-changes`,e=>this._updateUpdatingMonitors(e)),p(()=>this.scene,e=>e?.load().catch(()=>{}))]),this.inputManager=new He({view:this}),this.stateManager=new Je({view:this}),this.screenSizePerspective=new qe({view:this})}initialize(){if(has(`enable-feature:esri-compress-textures`)&&has(`wasm-simd`)){let e=Ot(this,this.resourceController);this.addResolvingPromise(e.promise)}this.groundView=new Re({view:this}),this.groundAndIMSurface=new nt({view:this}),this._updateUpdatingMonitors(),this.updatingHandles.add(()=>this.qualitySettings.memoryLimit,e=>{this.resourceController&&(this.resourceController.memoryController.maxMemory=e)},m),this.updatingHandles.add(()=>this.qualitySettings.additionalCacheMemory,e=>{this.resourceController&&(this.resourceController.memoryController.additionalCacheMemory=e)},m),this.updatingHandles.add(()=>this.qualitySettings.frameRate??0,e=>ae(e>0?1e3/Math.ceil(e):0),m),this.addHandles([p(()=>this.spatialReference,()=>this.notifyChange(`clippingArea`),h),p(()=>({plane:this.slice.plane,isDecoration:this.slice.isDecoration}),()=>this._updateSlice(),h)])}destroy(){this.destroyed||(kt(this),this.updatingHandles.removeAll(),this.basemapTerrain?.clearHandles(),this.elevationProvider.destroy(),this.ui.removeAllHandles(),this.layerViewManager.clearHandles(),this.invalidate(),this.layerViewManager.clear(),this._set(`analysisViewManager`,u(this.analysisViewManager)),this._exitSurface(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this.sharedSymbolResources=u(this.sharedSymbolResources),this._set(`labeler`,u(this.labeler)),this._set(`deconflictor`,u(this.deconflictor)),this._resourceController=u(this._resourceController),this._set(`stateManager`,u(this.stateManager)),this._set(`inputManager`,u(this.inputManager)),this.state.destroy(),this.highlights.destroy(),this.removeHandles(`updatingMonitors`),this._set(`environmentView`,u(this.environmentView)),this._set(`environment`,u(this.environment)),this.groundView=u(this.groundView),this.groundAndIMSurface.destroy(),this.slice.destroy(),this._updatingObjectsWithProgress.length=0,this._updatingObjects.length=0,this.ui?.destroy(),this._set(`ui`,null),this._set(`renderCanvas`,null),this._set(`canvas`,null),this._canvas=null,this.screenSizePerspective.destroy(),this.attribution3D.destroy())}get stage(){return this._stage}get renderSpatialReference(){return this.renderCoordsHelper.spatialReference}get groundSpatialReference(){return this.groundView?.spatialReference}get analyses(){return super.analyses}set analyses(e){super.analyses=e}get animation(){return this.state?.animation}get overlayManager(){return this.basemapTerrain?.overlayManager}get camera(){return this.stateManager?.camera}set camera(e){this.stateManager&&(this.stateManager.camera=e)}get contentCamera(){return this.stateManager?.contentCamera}set contentCamera(e){this.stateManager&&(this.stateManager.contentCamera=e)}installContentCameraReset(e={sticky:!1}){return this.stateManager.installContentCameraReset(e)}get canvas(){return this._canvas}get center(){return this.stateManager?.center}set center(e){this.stateManager&&(this.stateManager.center=b(C,e))}get clippingArea(){if(this.viewingMode===`global`)return null;let e=this.map,t=this._userClippingArea||d(e,`clippingArea`);return!(this._userClippingArea||d(e,`clippingEnabled`))||t==null?(this._clippingArea=null,null):t instanceof S?this.spatialReference&&(t=X(t,this.spatialReference),t==null)?(l.getLogger(this).error(`#clippingArea`,`setting clippingArea with incompatible SpatialReference`),this._clippingArea):(t=t.clone(),t.intersection(this._groundAndLayersExtent)??(t.xmin=t.xmax,t.ymin=t.ymax),t.zmin=void 0,t.zmax=void 0,t.equals(this._clippingArea)||(this._clippingArea=t),this._clippingArea):(l.getLogger(this).error(`#clippingArea`,`only clippingArea geometries of type Extent are supported`),this._clippingArea)}set clippingArea(e){this.ready&&this.viewingMode===`global`&&e!=null?l.getLogger(this).error(`#clippingArea=`,`Clipping area is only supported in local viewingMode`):this._userClippingArea=e}get renderDataExtent(){if(this.state.isGlobal)return null;let e=this.renderSpatialReference,t=this.dataExtent;return t==null||e==null||t.spatialReference.equals(e)?t:X(t,e)}get tileInfo(){return this.basemapTerrain?.tilingScheme?.toTileInfo()}get dataExtent(){let e=this._groundAndLayersExtent,t=this.spatialReference||T.WGS84,n=X(this.clippingArea,t);n!=null&&(e=e==null?n:e.intersection(n));let r=this._get(`dataExtent`);return e!=null&&e.equals(r)?r:e}get _groundAndLayersExtent(){let e=this.spatialReference||T.WGS84,t,n=n=>{let r=X(n,e);r!=null&&(t==null?t=r.clone():t.union(r))},{groundView:r}=this,i=r?.spatialReference,a=r?.fullGroundExtent;i&&a&&n(new S({xmin:a[0],ymin:a[1],zmin:0,xmax:a[2],ymax:a[3],zmax:0,spatialReference:i}));let o=e=>{e.fullExtent==null||e.type===`graphics`&&e.internal||n(e.fullExtent)};if(this.map?.allLayers.forEach(e=>o(e)),t==null)return null;t.hasZ?(t.zmin=Math.min(0,t.zmin??0),t.zmax=Math.max(0,t.zmax??0)):(t.zmin=0,t.zmax=0);let s=this._get(`_groundAndLayersExtent`);return t.equals(s)?s:t}get environment(){return this._environment}set environment(e){if(this._environment===e)return;let{_environment:t}=this;this._environment=null,t?.destroy(),this._environment=e,this.notifyChange(`environment`)}castEnvironment(e){return e?e instanceof I?e:e instanceof Mt?this.environment?.cloneWithWebsceneEnvironment(e)??I.fromWebsceneEnvironment(e):b(I,e):new I}get extent(){return this.stateManager?.extent}set extent(e){this.stateManager&&(this.stateManager.extent=e)}get screenCenter(){return this.stateManager?.screenCenter}get frustum(){return this.stateManager?.frustum}get layerviewCollections(){return[this.basemapView?.baseLayerViews,this.basemapView?.groundLayerViews,this.groundView?.layerViews,this.layerViews,this.basemapView?.referenceLayerViews]}get _layerToLayerviewMapping(){return q._layerToLayerview}static{this._layerToLayerview=j._layerToLayerview.concat([[`view.map.ground.layers`,`view.groundView.layerViews`]])}get initialExtentRequired(){return this.stateManager&&!this.stateManager.hasInitialView}get defaultsFromMapSettings(){return{required:{tileInfo:!1,heightModelInfo:!0,extent:!1}}}get interacting(){return this.navigating||(this.toolViewManager?.interacting??!1)}get stationary(){return!this.animation&&!this.resizing&&(this.state?.stationary??!0)}get navigating(){return this.state?.navigating??!1}get scene(){return this.map&&Ne in this.map?this.map:null}get padding(){return this.stateManager?.padding}set padding(e){this.stateManager&&(this.stateManager.padding=e)}get featureTiles(){return this._featureTiles}set qualityProfile(e){let t=z(e);t&&this._get(`qualityProfile`)!==e&&(this.qualitySettings=new B(t),this.stage?.renderView.updateQualitySettings(this.qualitySettings),this._set(`qualityProfile`,e))}get qualityProfile(){return this._get(`qualityProfile`)||ot()}_updateSlice(){this.stage!=null&&(this.stage.renderer.slice=this.slice)}get typeSpecificPreconditionsReady(){return this.viewingMode?!!this.stateManager?.preinit(this.spatialReference):!1}get resolution(){let{scale:e,spatialReference:t}=this;return t?me(()=>Ee(e,t)):0}get scale(){return this.stateManager?.scale}set scale(e){this.stateManager&&(this.stateManager.scale=e)}get terrainLevel(){let e=this.basemapTerrain?.tilingScheme,t=this.scale;if(!e||!t)return null;let n=e.levelAtScale(t)+this.qualitySettings.tiledSurface.lodBias,r=e.getMaxLod();return n<=0?null:Math.max(0,Math.min(n,r||1/0))}get heightModelInfo(){let e=this.getDefaultHeightModelInfo();if(!e)return null;let t=ue(this.spatialReference);if(t&&e.heightUnit!==t)return new ye({heightModel:e.heightModel,heightUnit:t,vertCRS:e.vertCRS,associatedSpatialReference:e.associatedSpatialReference});if(!e.associatedSpatialReference){let t=e.clone();return t.associatedSpatialReference=this.spatialReference,t}return e}get alphaCompositingEnabled(){return this._get(`alphaCompositingEnabled`)}set alphaCompositingEnabled(e){this._stage&&l.getLogger(this).warn(`alphaCompositingEnabled cannot be changed after the view has become ready`),this._set(`alphaCompositingEnabled`,e)}get updating(){if(this.destroying||this.destroyed)return!1;if(!this.initialized)return!0;let e=0,t=this.layerViewManager.updating,n=t?this.layerViewManager.updatingRemaining:0;this.allLayerViews.forEach(r=>{if(!r.isFulfilled())++n;else if(r.updating){if(t=!0,r.suspended||ft(r))return;++n,e+=r.updatingProgress}});let r=.1;for(let t of this._updatingObjects)t?.updating&&(n+=r,e+=.5*r);for(let t of this._updatingObjectsWithProgress)t?.updating&&(++n,e+=t.updatingProgress);let i=!this.stateManager.test.updatingIgnoreRenderState&&this.state.updating;if(t=!!(t||n>0||this.updatingHandles.updating||!this.ready||!this.stationary||i||this._importControllers.size>0||this.inputManager?.updating||this.map?.allLayers?.some(e=>!e.isFulfilled())),t?(this._numUpdating=Math.max(n,this._numUpdating),e+=this._numUpdating-n):this._numUpdating=0,this._numUpdating>0?e/=this._numUpdating:e=+!t,this._get(`updatingProgress`)!==e){let n=performance.now();if(e<1){let t=Math.min((n-this._lastUpdateTime)/2e3,1);e=this.updatingProgress*(1-t)+e*t}this._set(`updatingProgress`,e),this._lastUpdateTime=t&&e<1?n:0}return R.UPDATING&&console.log(`Updating:`,this._updatingObjectsToDebug.filter(e=>e!=null&&e.updating).map(({declaredClass:e})=>e)),t}get _updatingObjects(){return[this.graphicsView,this.basemapView,this.groundView,this._resourceController,this.stage,this.featureTiles,this.pointsOfInterest,this.environmentView,this.overlay,this._featureTreeDebugger,this.toolViewManager,this.analysisViewManager,this.focusAreasView]}get _updatingObjectsWithProgress(){return[this.deconflictor,this.labeler,this.basemapTerrain]}get _updatingObjectsToDebug(){return R.UPDATING?this._updatingObjects.concat(this._updatingObjectsWithProgress).concat(this.allLayerViews.toArray()):[]}get viewingMode(){let e=this._predeterminedViewingMode;if(e!=null)return M(e);let t=this.spatialReference;return t?this.defaultsFromMap?.viewingMode!=null&&t.equals(this.defaultsFromMap.spatialReference)?M(this.defaultsFromMap.viewingMode):Dt(t,1)?`global`:`local`:`global`}set viewingMode(e){this.ready?l.getLogger(this).error(`#viewingMode`,`viewingMode cannot be set once view is ready`):this._overrideIfSome(`viewingMode`,e)}get viewpoint(){return this.stateManager?.viewpoint}set viewpoint(e){this.stateManager&&(this.stateManager.viewpoint=e)}get visibleArea(){return this.stateManager?.visibleArea}get zoom(){return this.stateManager.zoom}set zoom(e){this.stateManager&&(this.stateManager.zoom=e)}get resourceController(){return this._resourceController}get quality(){return this._resourceController?.memoryController?.memoryFactor??1}get resolutionScale(){return Math.sqrt(Math.min(1,this.quality/.75))}get performanceInfo(){return new lt(this)}on(e,t,n,r){return this.viewEvents.on(e,t,n,r)||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}toMap(e,t){if(!this.ready)return l.getLogger(this).error(`#toMap()`,`Scene view cannot be used before it is ready`),null;let n=K(e)?Et(this,e):e;return rt(this,n,t,this._defaultToMapOptions)}toScreen(e){if(!this.ready)return l.getLogger(this).error(`#toScreen()`,`Scene view cannot be used before it is ready`),null;let t=e;return e.z??(t=It,t.x=e.x,t.y=e.y,t.z=tt(this.elevationProvider,e)??0,t.spatialReference=e.spatialReference),E(t,Z,this.renderSpatialReference),this.state.camera.projectToScreen(Z,Q),se(Q[0],Q[1])}pixelSizeAt(e,t){if(!this.ready)return l.getLogger(this).error(`#pixelSizeAt()`,`Scene view cannot be used before it is ready`),null;if(!e)return 0;let n=this.renderSpatialReference;E(e,Z,n);let r=this.state.camera.computeScreenPixelSizeAt(Z);return t&&n!==t?r*de(n)/de(t):r}overlayPixelSizeInMapUnits(e){return this.overlayManager?.overlayPixelSizeInMapUnits(e,()=>this.pixelSizeAt(e))??1}hitTest(e,t){if(!this.ready)return l.getLogger(this).error(`#hitTest()`,`Scene view cannot be used before it is ready`),null;let n=K(e)?Et(this,e):e;return it(this,n,t,this._defaultHitTestOptions)}async popupHitTest(e){return at(this,e)}goTo(e,t){return this.updatingHandles.addPromise(this.stateManager.goTo(e,t))}async zoomIn(){if(this.canZoomIn)return this.navigation.zoom(!0)}async zoomOut(){if(this.canZoomOut)return this.navigation.zoom(!1)}async whenAnalysisView(e){if(e.parent==null)throw new a(`view:no-analysisview-for-analysis`,`The analysis does not exist in view.analyses`,{analysis:e});switch(e.parent.type){case`line-of-sight`:case`dimension`:case`viewshed`:return(await this.whenLayerView(e.parent)).whenAnalysisView();default:return this.analysisViewManager.whenAnalysisView(e)}}whenLayerView(e){return super.whenLayerView(e)}async takeScreenshot(e){let t=await this._completeSettings(e);await this.whenReady();let n=(await this.stage.renderView.takeScreenshot(t))[0];return(await import(`./support/screenshotUtils.js`)).encode(n,t,this._pixelFormat())}async _takeScreenshot(e){let t=await this._completeSettings(e);await this.whenReady();let n=(await this.stage.renderView.takeScreenshot(t))[0];return(await import(`./support/screenshotUtils.js`)).encodeData(n,this._pixelFormat())}async _takeScreenshotWithObjectAndLayerId(e){let t=await this._completeSettings(e);t.olidColor=!0,await this.whenReady();let n=await this.stage.renderView.takeScreenshot(t),{encodeData:r}=await import(`./support/screenshotUtils.js`);return[r(n[0],this._pixelFormat()),r(n[1],this._pixelFormat())]}async _completeSettings(e){let{toRenderSettings:t,screenshotSuperSampleSettings:n}=await import(`./support/screenshotUtils.js`),r=t(e,this);return r.pixelRatio/=this.state.pixelRatio,n(r,this.supersampleScreenshotsEnabled,this.padding)}_pixelFormat(){return{flipY:!0,premultipliedAlpha:this.stage?.renderView.getAlpha()??!1}}get test(){}async takeScreenshotWithObjectAndLayerId(e){if(!yt())throw new a(`360vr:objectAndLayerId-rendering-disabled`,`has enable-feature:objectAndLayerId-rendering must be true`);let{encode:t}=await import(`./support/screenshotUtils.js`),n=await this._completeSettings(e);n.olidColor=!0,await this.whenReady();let r=await this.stage.renderView.takeScreenshot(n),i=t(r[0],n,this._pixelFormat()),o=await this._completeSettings(e);return o.format=`png`,[i,t(r[1],o,this._pixelFormat())]}getColorToObjectAndLayerIdMapping(){let e=this.stage.renderView.olidRenderHelper;if(e)return e.getColorToObjectAndLayerIdMapping();throw new a(`360vr:objectAndLayerId-rendering-disabled`,`has enable-feature:objectAndLayerId-rendering must be true`)}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}getAttributionItems(){return super.getAttributionItems().concat(this.attribution3D.attributionItems)}importLayerView(e){return P.importLayerView(e)}hasLayerViewModule(e){return P.hasLayerViewModule(e)}forceDOMReadyCycle(){this.forceReadyCycle()}getWebDocumentSpatialReference(){return this.scene?.initialViewProperties?.spatialReference}getDefaultTimeZone(){return this.scene?.initialViewProperties?.timeZone??null}getSurface(){return this.surface}get _predeterminedViewingMode(){let e=this._isOverridden(`viewingMode`)?this._get(`viewingMode`):this.scene?.initialViewProperties?.viewingMode;return e==null?null:N(e)}getSpatialReferenceSupport(e,t){let n=this._predeterminedViewingMode,r=r=>this._validateSpatialReferenceForViewingMode(e,t,r)?this._makeSpatialReferenceConstraints(e,t,r,n):null,i=n?r(n):[...r(1)??[],...r(2)??[]];return i?.length?{constraints:i}:null}_validateSpatialReferenceForViewingMode(e,t,n){return Dt(e,n)?t==null||D(t)?!0:!(O(t)&&pt(t,e,n)==null||k(t)&&n===1):!1}_makeSpatialReferenceConstraints(e,t,n,r){if(t==null)return[{spatialReference:e,viewingMode:n}];let{isWebMercator:i,isWGS84:a,vcsWkid:o,latestVcsWkid:s}=e,c=()=>o==null?i?T.WGS84:T.WebMercator:new T({...i?De:Oe,vcsWkid:o,latestVcsWkid:s});return D(t)&&(i||a)?!(a&&r!==2)||mt(t.tileInfo,t.fullExtent,e,1)===null?[{spatialReference:e,viewingMode:n},{spatialReference:c(),viewingMode:n}]:[{spatialReference:c(),viewingMode:n}]:!O(t)&&!k(t)&&(i||a)?[{spatialReference:e,viewingMode:n},{spatialReference:c(),viewingMode:n}]:O(t)&&i&&n!==1?[{spatialReference:e,viewingMode:n},{spatialReference:c(),viewingMode:2}]:[{spatialReference:e,viewingMode:n}]}_validateSpatialReference(e){let t=this.getSpatialReferenceSupport(e)!=null,n=this._predeterminedViewingMode;return t||(n==null?e.isGeographic&&l.getLogger(this).warnOnce(`Spatial reference is geographic but not supported.`):l.getLogger(this).warnOnce(`Spatial reference defined on view not supported in ${M(n)} viewing mode.`)),t}whenReady(){return new Promise(e=>{this.ready?e(this):this._resolveWhenReady.push(e)})}trackGraphicState(e){if(!e.graphic)return l.getLogger(this).error(`trackGraphicState`,`GraphicState.graphic must not be null or undefined to start tracking`),null;let t=this.getViewForGraphic(e.graphic),n=null,r=!1,i=t=>{!r&&t!=null&&`processor`in t&&t.processor?.type===`graphics-3d`&&t.processor.graphicsCore&&(n=t.processor.graphicsCore.trackGraphicState(e))};return t==null?this.whenViewForGraphic(e.graphic,{waitForLayer:!0}).then(e=>i(e),()=>{}).catch(()=>{}):i(t),c(()=>{r=!0,n!=null&&(n.remove(),n=null)})}maskOccludee(e){if(!e)return l.getLogger(this).error(`maskOccludee`,`GraphicState.graphic must not be null or undefined to mask an occludee`),null;let t=this.getViewForGraphic(e),n=null,r=!1,i=t=>{!r&&t!=null&&Tt(t)&&(n=t.maskOccludee(e))};return t==null?this.whenViewForGraphic(e,{waitForLayer:!0}).then(e=>i(e),()=>{}).catch(()=>{}):i(t),c(()=>{r=!0,n!=null&&(n.remove(),n=null)})}getViewForGraphic(e){return e.layer===this?this.graphicsView:e.layer?this.allLayerViews.filter(e=>e.type!==`media-3d`).find(t=>t.layer===e.layer):null}graphicChanged(e){this.graphicsView!=null&&this.graphicsView.graphicChanged(e)}async whenViewForGraphic(e,t){return e.layer===this?(await g(()=>this.graphicsView),this.graphicsView):!e.layer||!this.map?null:!t||!t.waitForLayer||this.map.allLayers.includes(e.layer)?this.whenLayerView(e.layer):new Promise((t,n)=>{let r=this.map.allLayers.on(`change`,i=>{i.added.includes(e.layer)&&(r.remove(),this.whenLayerView(e.layer).then(t,n))})})}enableFeatureTiles(){let e=Symbol();return this._featureTileTreeClients.add(e),c(()=>this._featureTileTreeClients.delete(e))}async _importModule(e,t){let n=new AbortController;this._importControllers.set(e,n),this._updatingChanged();try{let r=await Lt[e]();if(t&&(te(this),ne(n.signal),await t(n.signal)),this.destroyed)throw re();return ne(n.signal),r}catch{return null}finally{this._importControllers.delete(e),this._updatingChanged()}}_abortImport(e){this._importControllers.get(e)?.abort(),this._importControllers.delete(e),this._updatingChanged()}_initBasemapTerrain(){this._set(`basemapTerrain`,new H({view:this})),this.elevationProvider.register(0,this.basemapTerrain)}_exitBasemapTerrain(){let{basemapTerrain:e,elevationProvider:t}=this;e&&(this._set(`basemapTerrain`,null),t.unregister(e),e.destroy())}_initGlobe(){this._initCoordinateSystem(),this.state.createInitialCamera(),this._initBasemapTerrain(),this._set(`pointsOfInterest`,new V({view:this})),this.addHandles([this.updatingHandles.add(()=>R.FEATURE_TILE_TREE_SHOW_TILES,e=>{e&&!this._featureTreeDebugger?this.updatingHandles.addPromise(import(`./3d/layers/support/FeatureTileTree3DDebugger.js`)).then(({FeatureTileTree3DDebugger:e})=>{!this._featureTreeDebugger&&R.FEATURE_TILE_TREE_SHOW_TILES&&(this._featureTreeDebugger=new e({view:this}))}):e||(this._featureTreeDebugger=u(this._featureTreeDebugger))},_),this.updatingHandles.add(()=>({basemapExtent:this.groundView?.groundExtent,basemapSpatialReference:this.groundView?.spatialReference,clippingArea:this.clippingArea,featureTiles:this._featureTiles}),({basemapExtent:e,basemapSpatialReference:t,clippingArea:n,featureTiles:r})=>{if(!r)return;let i=!!e;if(!n&&!i)r.filterExtent=null;else if(!i||!t)r.filterExtent=n;else{let i=e&&t?w(Ce(e,t),this.spatialReference):null;r.filterExtent=n?n.intersection(i):i}},_),this.updatingHandles.add(()=>this._featureTileTreeClients.size>0,e=>{e?this.updatingHandles.consumePromise(this._ensureFeatureTileTree()):this._featureTiles=u(this._featureTiles)},h)],Pt),this.stateManager.init()}async _ensureFeatureTileTree(){if(this._featureTiles||this._importControllers.has(`FeatureTileTree3D`))return;let e=(await this.updatingHandles.addPromise(this._importModule(`FeatureTileTree3D`)))?.FeatureTileTree3D;e&&(this._featureTiles=new e({renderCoordsHelper:this.renderCoordsHelper,pointsOfInterest:this.pointsOfInterest,viewState:this.state,scheduler:this._resourceController.scheduler,terrain:this.basemapTerrain}),this._updatingChanged())}_exitTerrain(){this.stateManager.exit(),this.removeHandles(J),this.removeHandles(Pt),this._featureTiles=u(this.featureTiles),this._set(`pointsOfInterest`,u(this.pointsOfInterest)),this._exitBasemapTerrain(),this.state.reset(),this._exitCoordinateSystem()}_initCoordinateSystem(){if(this.spatialReference){let e=this.spatialReference,t=this.state.isGlobal,n=Te(t,e);n!==this.renderSpatialReference&&(this.renderCoordsHelper.viewingMode=this.state.viewingMode,this.renderCoordsHelper.spatialReference=n,t||this.addHandles(p(()=>this.groundView?.groundExtent,e=>{let t=this.renderCoordsHelper.spatialReference;e!=null&&(e[0]!==0||e[1]!==0||e[2]!==0||e[3]!==0)&&Se(e,this.groundView.spatialReference,$,t)&&(this.renderCoordsHelper.extent=$)},h),J),this.sceneIntersectionHelper?.setTolerance(U/this.renderCoordsHelper.unitInMeters))}}_exitCoordinateSystem(){this.removeHandles(J)}_updatingChanged(){this.notifyChange(`updating`)}_updateUpdatingMonitors(e=null){(e==null||e.type!==4)&&(this.removeHandles(`updatingMonitors`),this.allLayerViews.forEach(e=>{e.destroyed||(this.addHandles(p(()=>[e.updating,e.updatingProgress],()=>this._updatingChanged(),h),`updatingMonitors`),e.when(()=>this._updatingChanged(),()=>this._updatingChanged()))}),this._updatingChanged())}async _prepareScreenshotOverlay(){this.overlay&&await this.overlay.prepare()}_renderScreenshotOverlay(e,t,n){if(!this.overlay||!this.overlay.hasVisibleItems)return n;let r=e.getContext(`2d`,{willReadFrequently:!0});return r.putImageData(n,0,0),this.overlay.renderCanvas(e,{disableDecorations:t}),r.getImageData(0,0,n.width,n.height)}_initStage(e){let t={deactivatedWebGLExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions,context:e,screenshot:{prepareOverlay:()=>this._prepareScreenshotOverlay(),renderOverlay:(e,t,n)=>this._renderScreenshotOverlay(e,t,n)}},n=new Ze(this.state.viewingMode,e=>this.stage.layers.forEach(e),this);this._set(`sceneIntersectionHelper`,n);let r=i(this.surface);this._stage=new vt({view:this,options:t,container:r}),this.notifyChange(`stage`),this._updateSlice(),this.addHandles([this.on(`pointer-move`,()=>this.stage?.renderer.resetAnimation()),o(this.stage.renderView.canvas,`webglcontextlost`,e=>{this.fatalError=new a(`webgl-context-lost`,e.statusMessage||`WebGL context lost`)})],`stage`),this.sceneIntersectionHelper.setTolerance(U/this.renderCoordsHelper.unitInMeters),this._set(`canvas`,this.stage.renderView.canvas)}_exitStage(){this.sceneIntersectionHelper?.destroy(),this._set(`sceneIntersectionHelper`,null),this._stage=u(this.stage),this._set(`stage`,null),this.removeHandles(`stage`),this._set(`canvas`,null)}_initSurface(){this._exitSurface();let e=_t(this.renderCanvas,{alpha:this.alphaCompositingEnabled,preserveDrawingBuffer:this.preserveDrawingBufferEnabled});this._initStage(e),this._initGlobe(),this.sharedSymbolResources=new ut({view:this,resourceController:this._resourceController})}_exitSurface(){this.sharedSymbolResources&&(this.sharedSymbolResources.objectResourceCache.destroy(),this.sharedSymbolResources.destroy(),this.sharedSymbolResources=null,this._exitTerrain(),this._exitStage())}async _ensureGraphicsView(){if(this.graphicsView||this._importControllers.has(`GraphicsView3D`)||this.graphics.length===0)return;this.removeHandles(`GraphicsView3D`);let e=(await this.updatingHandles.addPromise(this._importModule(`GraphicsView3D`,e=>g(()=>this.groundView?.ready,e))))?.default;e&&this._set(`graphicsView`,new e({view:this,getGraphics:()=>this.graphics})),this._updatingChanged()}_disposeGraphicsView(){this._abortImport(`GraphicsView3D`),this.removeHandles(`GraphicsView3D`),this.graphicsView&&(this.removeHandles(this.graphicsView.processor.layer.id),this.graphicsView.destroy(),this._set(`graphicsView`,null))}_disposeFocusAreasView(){this._abortImport(`FocusAreasView`),this.removeHandles(`FocusAreasView`),this.focusAreasView=u(this.focusAreasView)}async _ensureFocusAreasView(e){if(this.focusAreasView||this._importControllers.has(`FocusAreasView`)||e===0)return;this.removeHandles(`FocusAreasView`);let t=(await this.updatingHandles.addPromise(this._importModule(`FocusAreasView`)))?.FocusAreasView;t&&(this.focusAreasView=new t({view:this})),this._updatingChanged()}_startup(){N(this.viewingMode)===1&&(this._clippingArea=null),this._initSurface(),this._set(`ready`,!0),this.addHandles(f(()=>this.graphics,`after-changes`,()=>this._ensureGraphicsView()),`GraphicsView3D`),this._ensureGraphicsView(),this.addHandles(this.updatingHandles.add(()=>this.map?.focusAreas?.areas.length??0,e=>this._ensureFocusAreasView(e),{initial:!0}),`FocusAreasView`);let e=this.scene?.initialViewProperties??null,t=e?.environment;t&&(this._overrideDefaultEnvironmentOnly?pe(this.environment,t):this.environment=this.environment.cloneWithWebsceneEnvironment(t)),this.timeExtent=e?.timeExtent,e?.analyses.applyTo(this),this.labeler.setup(),this.environmentView.connectView(this),this.inputManager.connect();let n=this._resolveWhenReady;this._resolveWhenReady=[],n.forEach(e=>e(this))}_teardown(){this.inputManager.disconnect(),this.environmentView.disconnectView(),this._overrideDefaultEnvironmentOnly=!1,this.labeler.dispose(),this._disposeGraphicsView(),this._disposeFocusAreasView(),this._exitSurface(),this._set(`ready`,!1)}get _defaultToMapOptions(){let e={include:new Set};if(!this.map)return e;this.map.ground&&e.include.add(W);for(let t of this.allLayerViews)(A(t.layer)&&(!has(`enable-feature:im-as-ground`)||t.layer.isUsedAsGroundLayer)||Ae(t.layer))&&e.include.add(t.uid);return e}get _defaultHitTestOptions(){let e={exclude:new Set};if(!this.map)return e;this.map.ground&&this.map.ground.opacity<1&&e.exclude.add(W);for(let t of this.allLayerViews)(has(`enable-feature:im-as-ground`)?A(t.layer)&&t.layer.isUsedAsGroundLayer:A(t.layer))&&t.fullOpacity<1&&e.exclude.add(t.uid);return e}static{this.type=`3d`}static clearStatics(){Nt(),he(),le(),St(),Ye(),Be(),xe(),wt(),Me(),gt(),xt(),Xe(),Qe(),_e(),oe(),bt(),ht(),Ge.cleanupI3SLodHandling(),je.cleanupTilemapCache(),L.cleanupViewstate(),H.cleanupTerrainSurface()}};e([v({nonNullable:!0}),y(Ft)],Y.prototype,`options`,void 0),e([v()],Y.prototype,`_userClippingArea`,void 0),e([v()],Y.prototype,`_resourceController`,void 0),e([v()],Y.prototype,`stage`,null),e([v({readOnly:!0})],Y.prototype,`deconflictor`,void 0),e([v({readOnly:!0})],Y.prototype,`labeler`,void 0),e([v()],Y.prototype,`navigation`,void 0),e([v({type:Le,readOnly:!0})],Y.prototype,`animation`,null),e([v({readOnly:!0})],Y.prototype,`basemapTerrain`,void 0),e([v({readOnly:!0})],Y.prototype,`overlayManager`,null),e([v({readOnly:!0})],Y.prototype,`elevationProvider`,void 0),e([v()],Y.prototype,`camera`,null),e([v({type:t})],Y.prototype,`contentCamera`,null),e([v({readOnly:!0})],Y.prototype,`canvas`,null),e([v({type:C,useTypeForAutocast:!1})],Y.prototype,`center`,null),e([v({type:S})],Y.prototype,`clippingArea`,null),e([v({type:F,nonNullable:!0})],Y.prototype,`constraints`,void 0),e([v({type:S,readOnly:!0})],Y.prototype,`renderDataExtent`,null),e([v({readOnly:!0})],Y.prototype,`tileInfo`,null),e([v({type:S,readOnly:!0})],Y.prototype,`dataExtent`,null),e([v({type:S,readOnly:!0})],Y.prototype,`_groundAndLayersExtent`,null),e([v({type:I})],Y.prototype,`environment`,null),e([y(`environment`)],Y.prototype,`castEnvironment`,null),e([v({readOnly:!0})],Y.prototype,`environmentView`,void 0),e([v({type:S})],Y.prototype,`extent`,null),e([v({type:r})],Y.prototype,`floors`,void 0),e([v()],Y.prototype,`screenCenter`,null),e([v()],Y.prototype,`frustum`,null),e([v({type:Number,readOnly:!0})],Y.prototype,`fullOpacity`,void 0),e([v({readOnly:!0})],Y.prototype,`graphicsView`,void 0),e([v()],Y.prototype,`analysisViewManager`,void 0),e([v()],Y.prototype,`groundView`,void 0),e([v({readOnly:!0})],Y.prototype,`layerviewCollections`,null),e([v({type:Boolean})],Y.prototype,`initialExtentRequired`,null),e([v()],Y.prototype,`defaultsFromMapSettings`,null),e([v()],Y.prototype,`interacting`,null),e([v()],Y.prototype,`stationary`,null),e([v()],Y.prototype,`navigating`,null),e([v()],Y.prototype,`map`,void 0),e([v()],Y.prototype,`padding`,null),e([v({type:V,readOnly:!0})],Y.prototype,`pointsOfInterest`,void 0),e([v()],Y.prototype,`_featureTiles`,void 0),e([v()],Y.prototype,`featureTiles`,null),e([v()],Y.prototype,`_featureTreeDebugger`,void 0),e([v({constructOnly:!0})],Y.prototype,`deactivatedWebGLExtensions`,void 0),e([v({constructOnly:!0})],Y.prototype,`debugWebGLExtensions`,void 0),e([v({constructOnly:!0})],Y.prototype,`renderCanvas`,void 0),e([v({constructOnly:!0})],Y.prototype,`state`,void 0),e([v()],Y.prototype,`screenSizePerspective`,void 0),e([v({readOnly:!0})],Y.prototype,`inputManager`,void 0),e([v({readOnly:!0})],Y.prototype,`stateManager`,void 0),e([v({type:[`low`,`medium`,`high`]})],Y.prototype,`qualityProfile`,null),e([v({type:B,get(){let e=this._get(`qualitySettings`);if(!e){let t=z(this.qualityProfile);e=new B(t)}return e}})],Y.prototype,`qualitySettings`,void 0),e([v()],Y.prototype,`slice`,void 0),e([v({readOnly:!0})],Y.prototype,`typeSpecificPreconditionsReady`,null),e([v({readOnly:!0})],Y.prototype,`sceneIntersectionHelper`,void 0),e([v({type:Number,readOnly:!0})],Y.prototype,`resolution`,null),e([v({type:Number})],Y.prototype,`scale`,null),e([v({readOnly:!0,type:Number})],Y.prototype,`terrainLevel`,null),e([v()],Y.prototype,`heightModelInfo`,null),e([v({type:T})],Y.prototype,`spatialReference`,void 0),e([v({type:Boolean,value:!1})],Y.prototype,`alphaCompositingEnabled`,null),e([v({constructOnly:!0})],Y.prototype,`preserveDrawingBufferEnabled`,void 0),e([v({type:Boolean})],Y.prototype,`supersampleScreenshotsEnabled`,void 0),e([v({readOnly:!0})],Y.prototype,`type`,void 0),e([v(),y(e=>e instanceof At?e:x(jt,e))],Y.prototype,`ui`,void 0),e([v({type:Boolean,readOnly:!0})],Y.prototype,`updating`,null),e([v()],Y.prototype,`_updatingObjects`,null),e([v()],Y.prototype,`_updatingObjectsWithProgress`,null),e([v()],Y.prototype,`_updatingObjectsToDebug`,null),e([v({type:Number,readOnly:!0})],Y.prototype,`updatingProgress`,void 0),e([v({type:[`global`,`local`]})],Y.prototype,`viewingMode`,null),e([v({type:n})],Y.prototype,`viewpoint`,null),e([v({readOnly:!0})],Y.prototype,`visibleArea`,null),e([v({type:Number})],Y.prototype,`zoom`,null),e([v({readOnly:!0})],Y.prototype,`quality`,null),e([v({readOnly:!0})],Y.prototype,`resolutionScale`,null),e([v()],Y.prototype,`focusAreasView`,void 0),e([v()],Y.prototype,`_defaultToMapOptions`,null),e([v()],Y.prototype,`_defaultHitTestOptions`,null),Y=q=e([fe(`esri.views.SceneView`)],Y);function X(e,t){return e!=null&&be(e.spatialReference,t)?w(e,t):null}const Z=ge(),Q=ce(),$=we(),It=ke(0,0,0,T.WebMercator),Lt={GraphicsView3D:()=>import(`./3d/layers/GraphicsView3D.js`),FocusAreasView:()=>import(`./3d/FocusAreasView.js`),FeatureTileTree3D:()=>import(`./3d/layers/support/FeatureTileTree3D.js`)},Rt=Y;export{Rt as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{isSome as t,difference as n}from"../core/arrayUtils.js";import r from"../core/Collection.js";import{referenceSetter as i}from"../core/collectionUtils.js";import{deprecatedProperty as a,deprecatedFunction as o}from"../core/deprecate.js";import{EventedAccessor as s}from"../core/Evented.js";import{makeHandle as c}from"../core/handleUtils.js";import l from"../core/Logger.js";import{getOrCreateMapValue as u}from"../core/MapUtils.js";import{destroyMaybe as d}from"../core/maybe.js";import f from"../core/ReactiveMap.js";import{watch as p,initial as m,on as h}from"../core/reactiveUtils.js";import{addMany as g,symmetricDifference as _}from"../core/SetUtils.js";import{property as v,subclass as y}from"../core/accessorSupport/decorators.js";import{UpdatingHandles as b}from"../core/support/UpdatingHandles.js";import{getGraphicLayer as x}from"../graphic/graphicOriginUtils.js";import{isMapImageGraphicOrigin as S}from"../graphic/isMapImageGraphicOrigin.js";import{isMapNotesGraphicOrigin as C}from"../graphic/isMapNotesGraphicOrigin.js";import{isMapImageLayer as w,isMapNotesLayer as T,isSubtypeGroupLayer as E,isSublayer as D,isSubtypeSublayer as O,isGraphicsLayer as k,isKnowledgeGraphLayer as A}from"../layers/support/layerUtils.js";import j from"../rest/support/Query.js";import{isGraphic as M}from"../support/graphicInstanceUtils.js";import{isHighlightableLayerView as N}from"./layers/support/highlightUtils.js";import{isSelectableLayerWithObjectIds as P,isSelectableLayerViewWithObjectIds as F,isSelectableLayer as I,isSelectableLayerView as L,isTableLayer as R,isSelectableLayerViewWithHighlights as z,isSelectableLayerWithGraphics as B,isSelectableLayerBaseWithEditing as V}from"./support/selectionUtils.js";let H=class extends s{constructor(e){super(e),this._layerEditHandles=new r,this._selectionMap=new f,this._sources=new r,this._trashCan=[],this._updatingHandles=new b,this._vizTaskId=0,this.highlightEnabled=!0,this.highlightName=`default`,this.layerViewMap=new WeakMap,this.view=null}initialize(){this.addHandles([p(()=>[this.view,this.highlightEnabled],()=>void this._refreshVisualization()),p(()=>this.view,e=>{e?.when().then(()=>this.syncSources()).catch(()=>{})},m),h(()=>this.sources,`change`,e=>{let t=this._selectionMap,n=[];for(let r of e.removed){let e=t.get(r);e&&(t.delete(r),e.highlightHandle?.remove(),n.push({layer:r,selection:[],added:[],removed:[...e.selection]}))}this._refreshListeners(),n.length&&this._onSelectionChange(n)},{onListenerAdd:()=>this._refreshListeners()})])}destroy(){this.clear(),this._layerEditHandles.destroyAll(),this._updatingHandles.destroy(),d(this._layerEditHandles),d(this._sources)}get count(){let e=0;for(let t of this._selectionMap.values())e+=t.selection.length;return e}get hasSelection(){return this.count>0}get selections(){return Array.from(this._selectionMap.entries()).map(e=>{let[t,n]=e;return{layer:t,selection:[...n.selection]}})}get showHighlight(){return this.highlightEnabled}set showHighlight(e){a(l.getLogger(this),`showHighlight`,{replacement:`highlightEnabled`}),this.highlightEnabled=e}get sources(){return this._sources}set sources(e){i(e,this._sources)}get updating(){return this._updatingHandles.updating}add(e,t){let n=new Set;g(n,this._selectionMap.get(e)?.selection);for(let r of t)n.add(U(e,r));this._setSelection(e,Array.from(n))}clear(){let e=this._selectionMap.values();this._trashCan.push(...e);let t=[];for(let[e,n]of this._selectionMap.entries())t.push({layer:e,added:[],removed:[...n.selection],selection:[]});this._selectionMap.clear(),this._onSelectionChange(t)}getSelection(e){return this._selectionMap.get(e)?.selection}syncSources(){let e=new Set,t=this.view?.map;if(!t)return;let n=t=>{k(t)&&t.internal||(A(t)?(t.layers?.forEach(n),t.tables?.forEach(n)):w(t)?(t.sublayers?.forEach(n),t.subtables?.forEach(n)):T(t)||E(t)?t.sublayers?.forEach(n):I(t)&&e.add(t))};t.allLayers.forEach(n),t.allTables.forEach(n),this.sources=[...e]}async getSelectedFeatures(e,n={},r=`layerView`){let{view:i,selections:a}=this;if(!i&&r===`layerView`)return l.getLogger(this).warn(`Cannot query layer views without a view.`),[];let o=a.map(async t=>{let{layer:a,selection:o}=t;if(o.length&&P(a)&&(!e||e.includes(a))){if(i&&r===`layerView`&&!a.isTable){let e=await this._findLayerView(a);if(F(e))return G(e,o,n)}return G(a,o,n)}}).filter(t);return(await Promise.all(o)).filter(t)}updateSelection(e){let t=new Map;for(let[e,n]of this._selectionMap)t.set(e,new Set(n.selection));let r=!1,i=e.current.concat(e.added);for(let e of i){let n=this._getGraphicSource(e);if(I(n)&&this.sources.includes(n)){let i=u(t,n,()=>new Set),a=U(n,e);a!=null&&(i.add(a),r=!0)}}for(let n of e.removed){let e=this._getGraphicSource(n);if(I(e)&&this.sources.includes(e)){let i=t.get(e),a=U(e,n);a&&i&&(i.delete(a),r=!0)}}if(r){let{_selectionMap:e,_trashCan:r}=this,i=[];for(let[a,o]of t){let t=e.get(a),s=Array.from(o);t!==void 0&&r.push(t),e.set(a,{selection:s}),i.push({layer:a,selection:s,...n(t===void 0?[]:t.selection,s)})}this._onSelectionChange(i)}}setSelection(e,t){o(l.getLogger(this),`SelectionManager.setSelection is deprecated. Use SelectionManager.replace instead.`,{replacement:`SelectionManager.replace`,warnOnce:!0}),this.replace(e,t)}appendToSelection(e,t){o(l.getLogger(this),`SelectionManager.appendToSelection is deprecated. Use SelectionManager.add instead.`,{replacement:`SelectionManager.add`,warnOnce:!0}),this.add(e,t)}remove(e,t){let n=this._selectionMap.get(e);if(!n)return;let r=[],i=new Set(t.map(t=>U(e,t)));for(let e of n.selection)i.has(e)||r.push(e);this._setSelection(e,r)}replace(e,t){this._setSelection(e,t.map(t=>U(e,t)))}removeFromSelection(e,t){o(l.getLogger(this),`SelectionManager.removeFromSelection is deprecated. Use SelectionManager.remove instead.`,{replacement:`SelectionManager.remove`,warnOnce:!0}),this.remove(e,t)}toggle(e,t){let n=this._selectionMap.get(e),r=t.map(t=>U(e,t));if(!n||n.selection.length===0){this._setSelection(e,r);return}let i=new Set(n.selection),a=new Set(r),o=_(i,a);this._setSelection(e,Array.from(o))}toggleInSelection(e,t){o(l.getLogger(this),`SelectionManager.toggleInSelection is deprecated. Use SelectionManager.toggle instead.`,{replacement:`SelectionManager.toggle`,warnOnce:!0}),this.toggle(e,t)}_getGraphicSource(e){let t=e.origin;return C(t)||S(t)?t.sublayer:x(e)}_getLayerViewSource(e){return w(e.parent)?e.parent:T(e.layer)?e.layer:E(e.parent)?e.parent:e}async _findLayerView(e){let t=this.layerViewMap.get(e);if(t||!this.view)return t;let n=this._getLayerViewSource(e),r=await this.view.whenLayerView(n).catch(()=>void 0);if(L(r)||N(r))return this.layerViewMap.set(e,r),r.addHandles(c(()=>this.layerViewMap.delete(e))),r}_onSelectionChange(e){this._refreshVisualization(),this.emit(`selection-change`,{view:this.view,changes:e})}async _refreshVisualization(){await this._updatingHandles.addPromise(this._updateVisualization())}async _updateVisualization(){for(this._vizTaskId++;this._trashCan.length>0;)this._trashCan.pop()?.highlightHandle?.remove();let{_selectionMap:e,highlightName:t,sources:n,view:r}=this,i=r&&this.highlightEnabled,a=this._vizTaskId;for(let o of n){let n=e.get(o);if(n?.highlightHandle?.remove(),i&&n?.selection.length&&!R(o,r)){let e=await this._findLayerView(o);if(z(e)&&a===this._vizTaskId){if(D(o)&&w(o.parent)&&!n.selection.every(e=>M(e)))return;let r=n.selection;n.highlightHandle=e.highlight(r,{name:t})}}}}_refreshListeners(){this._layerEditHandles.destroyAll();let e=new Set(this.sources.map(e=>O(e)?e.parent:e));for(let t of e)I(t)&&(B(t)?this._layerEditHandles.push(t.graphics.on(`change`,e=>this._onGraphicsLayerEdit(t,e))):V(t)&&this._layerEditHandles.push(t.on(`edits`,e=>this._onLayerEdit(t,e))))}_onLayerEdit(e,t){if(E(e))this._onParentLayerEdit(e,t);else if(t.deletedFeatures.length&&this._selectionMap.has(e)){let n=[];t.deletedFeatures.forEach(({error:e,objectId:t})=>{t!=null&&e==null&&n.push(t)}),this.remove(e,n)}}_onGraphicsLayerEdit(e,t){let{removed:n}=t;n.length&&this._selectionMap.has(e)&&this.remove(e,n)}_onParentLayerEdit(e,t){let{deletedFeatures:n,edits:r,updatedFeatures:i}=t;if(r?.updateFeatures?.forEach(t=>{let n=t.getObjectId()??t.attributes[e.objectIdField];if(n==null||i.find(e=>e.objectId===n)?.error)return;let r=e.findSublayerForFeature(t);if(!I(r))return;let a=e.sublayers.find(e=>!!(I(e)&&this.getSelection(e)?.includes(n)));I(a)&&a!==r&&(this.remove(a,[n]),this.add(r,[n]))}),n.length){let t=[];n.forEach(({error:e,objectId:n})=>{n!=null&&e==null&&t.push(n)}),e.sublayers.forEach(e=>{I(e)&&this._selectionMap.has(e)&&this.remove(e,t)})}}_setSelection(e,t){if(!this.sources.includes(e))throw Error(`Cannot set selection on layer ${e.title} because it is not in 'sources'`);let r=this._selectionMap.get(e);if(!r||!W(r,{selection:t})){r&&this._trashCan.push(r),this._selectionMap.set(e,{selection:[...t]});let i=r?n(r.selection,t):{};this._onSelectionChange([{layer:e,selection:[...t],...i}])}}};e([v()],H.prototype,`_layerEditHandles`,void 0),e([v()],H.prototype,`_selectionMap`,void 0),e([v()],H.prototype,`_sources`,void 0),e([v()],H.prototype,`_updatingHandles`,void 0),e([v({readOnly:!0,nonNullable:!0})],H.prototype,`count`,null),e([v({readOnly:!0,nonNullable:!0})],H.prototype,`hasSelection`,null),e([v()],H.prototype,`highlightEnabled`,void 0),e([v()],H.prototype,`highlightName`,void 0),e([v()],H.prototype,`layerViewMap`,void 0),e([v({readOnly:!0,nonNullable:!0})],H.prototype,`selections`,null),e([v()],H.prototype,`showHighlight`,null),e([v()],H.prototype,`sources`,null),e([v()],H.prototype,`updating`,null),e([v()],H.prototype,`view`,void 0),H=e([y(`esri.views.SelectionManager`)],H);const U=(e,t)=>{if(P(e)&&M(t)){let e=t.getObjectId();if(e!=null)return e}return t},W=(e,t)=>{if(e==null&&t==null)return!0;if(e!=null&&t==null||e==null&&t!=null)return!1;if(e!=null&&t!=null&&e.selection!=null&&t.selection!=null){let n=[...e.selection],r=[...t.selection];if(n.length!==r.length)return!1;n.sort(),r.sort();for(let e=0;e<n.length;e++)if(n[e]!==r[e])return!1}return!0},G=async(e,t,n={})=>e.queryFeatures(new j({...n,objectIds:t})).then(t=>({data:t,layer:L(e)?e.layer:e})),K=H;export{K as default};
2
+ import{__decorate as e}from"tslib";import{isSome as t,difference as n}from"../core/arrayUtils.js";import r from"../core/Collection.js";import{referenceSetter as i}from"../core/collectionUtils.js";import{deprecatedProperty as a,deprecatedFunction as o}from"../core/deprecate.js";import{EventedAccessor as s}from"../core/Evented.js";import{makeHandle as c}from"../core/handleUtils.js";import l from"../core/Logger.js";import{getOrCreateMapValue as u}from"../core/MapUtils.js";import{destroyMaybe as d}from"../core/maybe.js";import f from"../core/ReactiveMap.js";import{watch as p,initial as m,on as h}from"../core/reactiveUtils.js";import{addMany as g,symmetricDifference as _}from"../core/SetUtils.js";import{property as v,subclass as y}from"../core/accessorSupport/decorators.js";import{UpdatingHandles as b}from"../core/support/UpdatingHandles.js";import{getGraphicLayer as x}from"../graphic/graphicOriginUtils.js";import{isMapImageGraphicOrigin as S}from"../graphic/isMapImageGraphicOrigin.js";import{isMapNotesGraphicOrigin as C}from"../graphic/isMapNotesGraphicOrigin.js";import{isMapImageLayer as w,isMapNotesLayer as T,isSubtypeGroupLayer as E,isSublayer as D,isSubtypeSublayer as O,isGraphicsLayer as k,isKnowledgeGraphLayer as A}from"../layers/support/layerUtils.js";import j from"../rest/support/Query.js";import{isGraphic as M}from"../support/graphicInstanceUtils.js";import{isHighlightableLayerView as N}from"./layers/support/highlightUtils.js";import{isSelectableLayerWithObjectIds as P,isSelectableLayerViewWithObjectIds as F,isSelectableLayer as I,isSelectableLayerView as L,isTableLayer as R,isSelectableLayerViewWithHighlights as z,isSelectableLayerWithGraphics as B,isSelectableLayerBaseWithEditing as V}from"./support/selectionUtils.js";let H=class extends s{constructor(e){super(e),this._layerEditHandles=new r,this._selectionMap=new f,this._sources=new r,this._trashCan=[],this._updatingHandles=new b,this._vizTaskId=0,this.highlightEnabled=!0,this.highlightName=`default`,this.layerViewMap=new WeakMap,this.view=null}initialize(){this.addHandles([p(()=>[this.view,this.highlightEnabled],()=>void this._refreshVisualization()),p(()=>this.view,e=>{e?.when().then(()=>this.syncSources()).catch(()=>{})},m),h(()=>this.sources,`change`,e=>{let t=this._selectionMap,n=[];for(let r of e.removed){let e=t.get(r);e&&(t.delete(r),e.highlightHandle?.remove(),n.push({layer:r,selection:[],added:[],removed:[...e.selection]}))}this._refreshListeners(),n.length&&this._onSelectionChange(n)},{onListenerAdd:()=>this._refreshListeners()})])}destroy(){this.clear(),this._layerEditHandles.destroyAll(),this._updatingHandles.destroy(),d(this._layerEditHandles),d(this._sources)}get count(){let e=0;for(let t of this._selectionMap.values())e+=t.selection.length;return e}get hasSelection(){return this.count>0}get selections(){return Array.from(this._selectionMap.entries()).map(e=>{let[t,n]=e;return{layer:t,selection:[...n.selection]}})}get showHighlight(){return this.highlightEnabled}set showHighlight(e){a(l.getLogger(this),`showHighlight`,{replacement:`highlightEnabled`}),this.highlightEnabled=e}get sources(){return this._sources}set sources(e){i(e,this._sources)}get updating(){return this._updatingHandles.updating}add(e,t){let n=new Set;g(n,this._selectionMap.get(e)?.selection);for(let r of t)n.add(U(e,r));this._setSelection(e,Array.from(n))}clear(){let e=this._selectionMap.values();this._trashCan.push(...e);let t=Array.from(this._selectionMap.entries(),([e,t])=>({layer:e,added:[],removed:[...t.selection],selection:[]}));this._selectionMap.clear(),this._onSelectionChange(t)}getSelection(e){return this._selectionMap.get(e)?.selection}syncSources(){let e=new Set,t=this.view?.map;if(!t)return;let n=t=>{k(t)&&t.internal||(A(t)?(t.layers?.forEach(n),t.tables?.forEach(n)):w(t)?(t.sublayers?.forEach(n),t.subtables?.forEach(n)):T(t)||E(t)?t.sublayers?.forEach(n):I(t)&&e.add(t))};t.allLayers.forEach(n),t.allTables.forEach(n),this.sources=[...e]}async getSelectedFeatures(e,n={},r=`layerView`){let{view:i,selections:a}=this;if(!i&&r===`layerView`)return l.getLogger(this).warn(`Cannot query layer views without a view.`),[];let o=a.map(async t=>{let{layer:a,selection:o}=t;if(o.length&&P(a)&&(!e||e.includes(a))){if(i&&r===`layerView`&&!a.isTable){let e=await this._findLayerView(a);if(F(e))return G(e,o,n)}return G(a,o,n)}}).filter(t);return(await Promise.all(o)).filter(t)}updateSelection(e){let t=new Map;for(let[e,n]of this._selectionMap)t.set(e,new Set(n.selection));let r=!1,i=e.current.concat(e.added);for(let e of i){let n=this._getGraphicSource(e);if(I(n)&&this.sources.includes(n)){let i=u(t,n,()=>new Set),a=U(n,e);a!=null&&(i.add(a),r=!0)}}for(let n of e.removed){let e=this._getGraphicSource(n);if(I(e)&&this.sources.includes(e)){let i=t.get(e),a=U(e,n);a&&i&&(i.delete(a),r=!0)}}if(r){let{_selectionMap:e,_trashCan:r}=this,i=[];for(let[a,o]of t){let t=e.get(a),s=Array.from(o);t!==void 0&&r.push(t),e.set(a,{selection:s}),i.push({layer:a,selection:s,...n(t===void 0?[]:t.selection,s)})}this._onSelectionChange(i)}}setSelection(e,t){o(l.getLogger(this),`SelectionManager.setSelection is deprecated. Use SelectionManager.replace instead.`,{replacement:`SelectionManager.replace`,warnOnce:!0}),this.replace(e,t)}appendToSelection(e,t){o(l.getLogger(this),`SelectionManager.appendToSelection is deprecated. Use SelectionManager.add instead.`,{replacement:`SelectionManager.add`,warnOnce:!0}),this.add(e,t)}remove(e,t){let n=this._selectionMap.get(e);if(!n)return;let r=[],i=new Set(t.map(t=>U(e,t)));for(let e of n.selection)i.has(e)||r.push(e);this._setSelection(e,r)}replace(e,t){this._setSelection(e,t.map(t=>U(e,t)))}removeFromSelection(e,t){o(l.getLogger(this),`SelectionManager.removeFromSelection is deprecated. Use SelectionManager.remove instead.`,{replacement:`SelectionManager.remove`,warnOnce:!0}),this.remove(e,t)}toggle(e,t){let n=this._selectionMap.get(e),r=t.map(t=>U(e,t));if(!n||n.selection.length===0){this._setSelection(e,r);return}let i=new Set(n.selection),a=new Set(r),o=_(i,a);this._setSelection(e,Array.from(o))}toggleInSelection(e,t){o(l.getLogger(this),`SelectionManager.toggleInSelection is deprecated. Use SelectionManager.toggle instead.`,{replacement:`SelectionManager.toggle`,warnOnce:!0}),this.toggle(e,t)}_getGraphicSource(e){let t=e.origin;return C(t)||S(t)?t.sublayer:x(e)}_getLayerViewSource(e){return w(e.parent)?e.parent:T(e.layer)?e.layer:E(e.parent)?e.parent:e}async _findLayerView(e){let t=this.layerViewMap.get(e);if(t||!this.view)return t;let n=this._getLayerViewSource(e),r=await this.view.whenLayerView(n).catch(()=>void 0);if(L(r)||N(r))return this.layerViewMap.set(e,r),r.addHandles(c(()=>this.layerViewMap.delete(e))),r}_onSelectionChange(e){this._refreshVisualization(),this.emit(`selection-change`,{view:this.view,changes:e})}async _refreshVisualization(){await this._updatingHandles.addPromise(this._updateVisualization())}async _updateVisualization(){for(this._vizTaskId++;this._trashCan.length>0;)this._trashCan.pop()?.highlightHandle?.remove();let{_selectionMap:e,highlightName:t,sources:n,view:r}=this,i=r&&this.highlightEnabled,a=this._vizTaskId;for(let o of n){let n=e.get(o);if(n?.highlightHandle?.remove(),i&&n?.selection.length&&!R(o,r)){let e=await this._findLayerView(o);if(z(e)&&a===this._vizTaskId){if(D(o)&&w(o.parent)&&!n.selection.every(e=>M(e)))return;let r=n.selection;n.highlightHandle=e.highlight(r,{name:t})}}}}_refreshListeners(){this._layerEditHandles.destroyAll();let e=new Set(this.sources.map(e=>O(e)?e.parent:e));for(let t of e)I(t)&&(B(t)?this._layerEditHandles.push(t.graphics.on(`change`,e=>this._onGraphicsLayerEdit(t,e))):V(t)&&this._layerEditHandles.push(t.on(`edits`,e=>this._onLayerEdit(t,e))))}_onLayerEdit(e,t){if(E(e))this._onParentLayerEdit(e,t);else if(t.deletedFeatures.length&&this._selectionMap.has(e)){let n=[];t.deletedFeatures.forEach(({error:e,objectId:t})=>{t!=null&&e==null&&n.push(t)}),this.remove(e,n)}}_onGraphicsLayerEdit(e,t){let{removed:n}=t;n.length&&this._selectionMap.has(e)&&this.remove(e,n)}_onParentLayerEdit(e,t){let{deletedFeatures:n,edits:r,updatedFeatures:i}=t;if(r?.updateFeatures?.forEach(t=>{let n=t.getObjectId()??t.attributes[e.objectIdField];if(n==null||i.find(e=>e.objectId===n)?.error)return;let r=e.findSublayerForFeature(t);if(!I(r))return;let a=e.sublayers.find(e=>!!(I(e)&&this.getSelection(e)?.includes(n)));I(a)&&a!==r&&(this.remove(a,[n]),this.add(r,[n]))}),n.length){let t=[];n.forEach(({error:e,objectId:n})=>{n!=null&&e==null&&t.push(n)}),e.sublayers.forEach(e=>{I(e)&&this._selectionMap.has(e)&&this.remove(e,t)})}}_setSelection(e,t){if(!this.sources.includes(e))throw Error(`Cannot set selection on layer ${e.title} because it is not in 'sources'`);let r=this._selectionMap.get(e);if(!r||!W(r,{selection:t})){r&&this._trashCan.push(r),this._selectionMap.set(e,{selection:[...t]});let i=r?n(r.selection,t):{};this._onSelectionChange([{layer:e,selection:[...t],...i}])}}};e([v()],H.prototype,`_layerEditHandles`,void 0),e([v()],H.prototype,`_selectionMap`,void 0),e([v()],H.prototype,`_sources`,void 0),e([v()],H.prototype,`_updatingHandles`,void 0),e([v({readOnly:!0,nonNullable:!0})],H.prototype,`count`,null),e([v({readOnly:!0,nonNullable:!0})],H.prototype,`hasSelection`,null),e([v()],H.prototype,`highlightEnabled`,void 0),e([v()],H.prototype,`highlightName`,void 0),e([v()],H.prototype,`layerViewMap`,void 0),e([v({readOnly:!0,nonNullable:!0})],H.prototype,`selections`,null),e([v()],H.prototype,`showHighlight`,null),e([v()],H.prototype,`sources`,null),e([v()],H.prototype,`updating`,null),e([v()],H.prototype,`view`,void 0),H=e([y(`esri.views.SelectionManager`)],H);const U=(e,t)=>{if(P(e)&&M(t)){let e=t.getObjectId();if(e!=null)return e}return t},W=(e,t)=>{if(e==null&&t==null)return!0;if(e!=null&&t==null||e==null&&t!=null)return!1;if(e!=null&&t!=null&&e.selection!=null&&t.selection!=null){let n=[...e.selection],r=[...t.selection];if(n.length!==r.length)return!1;n.sort(),r.sort();for(let e=0;e<n.length;e++)if(n[e]!==r[e])return!1}return!0},G=async(e,t,n={})=>e.queryFeatures(new j({...n,objectIds:t})).then(t=>({data:t,layer:L(e)?e.layer:e})),K=H;export{K as default};
package/views/View.d.ts CHANGED
@@ -169,7 +169,6 @@ export interface ViewProperties<TLayerView extends LayerView = LayerView> extend
169
169
  * >
170
170
  * > These options are not saved in a [WebMap](https://developers.arcgis.com/javascript/latest/references/core/WebMap/) or [WebScene](https://developers.arcgis.com/javascript/latest/references/core/WebScene/).
171
171
  *
172
- * @beta
173
172
  * @since 5.2
174
173
  */
175
174
  options?: ViewOptionsProperties;
@@ -616,7 +615,6 @@ export default abstract class View<TLayerView extends LayerView = LayerView> ext
616
615
  * >
617
616
  * > These options are not saved in a [WebMap](https://developers.arcgis.com/javascript/latest/references/core/WebMap/) or [WebScene](https://developers.arcgis.com/javascript/latest/references/core/WebScene/).
618
617
  *
619
- * @beta
620
618
  * @since 5.2
621
619
  */
622
620
  get options(): ViewOptions;
@@ -857,7 +855,7 @@ export default abstract class View<TLayerView extends LayerView = LayerView> ext
857
855
  * @see [Sample - StreamLayer](https://developers.arcgis.com/javascript/latest/sample-code/layers-streamlayer/)
858
856
  * @example
859
857
  * // Create a feature layer from a url pointing to a Feature Service
860
- * let layer = new FeatureLayer(url);
858
+ * let layer = new FeatureLayer({ url });
861
859
  *
862
860
  * map.add(layer);
863
861
  *
package/views/View2D.d.ts CHANGED
@@ -1098,7 +1098,7 @@ export default abstract class View2D extends View2DSuperclass {
1098
1098
  * [LayerView](https://developers.arcgis.com/javascript/latest/references/core/views/layers/LayerView/) for the specified layer.
1099
1099
  * @example
1100
1100
  * // Create a feature layer from a url pointing to a Feature Service
1101
- * let layer = new FeatureLayer(url);
1101
+ * let layer = new FeatureLayer({ url });
1102
1102
  *
1103
1103
  * map.add(layer);
1104
1104
  *
@@ -1112,7 +1112,7 @@ export default abstract class View2D extends View2DSuperclass {
1112
1112
  * @see [Sample - StreamLayer](https://developers.arcgis.com/javascript/latest/sample-code/layers-streamlayer/)
1113
1113
  * @example
1114
1114
  * // Create a feature layer from a url pointing to a Feature Service
1115
- * let layer = new FeatureLayer(url);
1115
+ * let layer = new FeatureLayer({ url });
1116
1116
  *
1117
1117
  * map.add(layer);
1118
1118
  *