@arcgis/core 5.0.0-next.123 → 5.0.0-next.124

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 (718) hide show
  1. package/Camera.d.ts +1 -1
  2. package/Ground.d.ts +7 -7
  3. package/PopupTemplate.d.ts +6 -6
  4. package/WebScene.d.ts +1 -1
  5. package/analysis/AreaMeasurementAnalysis.d.ts +1 -1
  6. package/analysis/DirectLineMeasurementAnalysis.d.ts +1 -1
  7. package/analysis/LengthDimension.d.ts +4 -4
  8. package/analysis/ShadowCastAnalysis.d.ts +3 -3
  9. package/analysis/SliceAnalysis.d.ts +1 -1
  10. package/analysis/SlicePlane.d.ts +1 -1
  11. package/assets/esri/core/t9n/Units_ar.json +1 -1
  12. package/assets/esri/core/t9n/Units_bg.json +1 -1
  13. package/assets/esri/core/t9n/Units_bs.json +1 -1
  14. package/assets/esri/core/t9n/Units_ca.json +1 -1
  15. package/assets/esri/core/t9n/Units_cs.json +1 -1
  16. package/assets/esri/core/t9n/Units_da.json +1 -1
  17. package/assets/esri/core/t9n/Units_de.json +1 -1
  18. package/assets/esri/core/t9n/Units_el.json +1 -1
  19. package/assets/esri/core/t9n/Units_es.json +1 -1
  20. package/assets/esri/core/t9n/Units_et.json +1 -1
  21. package/assets/esri/core/t9n/Units_fi.json +1 -1
  22. package/assets/esri/core/t9n/Units_fr.json +1 -1
  23. package/assets/esri/core/t9n/Units_he.json +1 -1
  24. package/assets/esri/core/t9n/Units_hr.json +1 -1
  25. package/assets/esri/core/t9n/Units_hu.json +1 -1
  26. package/assets/esri/core/t9n/Units_id.json +1 -1
  27. package/assets/esri/core/t9n/Units_it.json +1 -1
  28. package/assets/esri/core/t9n/Units_ja.json +1 -1
  29. package/assets/esri/core/t9n/Units_ko.json +1 -1
  30. package/assets/esri/core/t9n/Units_lt.json +1 -1
  31. package/assets/esri/core/t9n/Units_lv.json +1 -1
  32. package/assets/esri/core/t9n/Units_nl.json +1 -1
  33. package/assets/esri/core/t9n/Units_no.json +1 -1
  34. package/assets/esri/core/t9n/Units_pl.json +1 -1
  35. package/assets/esri/core/t9n/Units_pt-BR.json +1 -1
  36. package/assets/esri/core/t9n/Units_pt-PT.json +1 -1
  37. package/assets/esri/core/t9n/Units_ro.json +1 -1
  38. package/assets/esri/core/t9n/Units_ru.json +1 -1
  39. package/assets/esri/core/t9n/Units_sk.json +1 -1
  40. package/assets/esri/core/t9n/Units_sl.json +1 -1
  41. package/assets/esri/core/t9n/Units_sr.json +1 -1
  42. package/assets/esri/core/t9n/Units_sv.json +1 -1
  43. package/assets/esri/core/t9n/Units_th.json +1 -1
  44. package/assets/esri/core/t9n/Units_tr.json +1 -1
  45. package/assets/esri/core/t9n/Units_uk.json +1 -1
  46. package/assets/esri/core/t9n/Units_vi.json +1 -1
  47. package/assets/esri/core/t9n/Units_zh-CN.json +1 -1
  48. package/assets/esri/core/t9n/Units_zh-HK.json +1 -1
  49. package/assets/esri/core/t9n/Units_zh-TW.json +1 -1
  50. package/assets/esri/core/workers/RemoteClient.js +1 -1
  51. package/assets/esri/core/workers/chunks/05d6cd51ca970705e46a.js +1 -0
  52. package/assets/esri/core/workers/chunks/128cdb4a02549abc68b5.js +1 -0
  53. package/assets/esri/core/workers/chunks/1701d9c50610f0b2dd38.js +1 -0
  54. package/assets/esri/core/workers/chunks/1794db88a2006711eff3.js +1 -0
  55. package/assets/esri/core/workers/chunks/2011da6dfc4bb89829c6.js +1 -0
  56. package/assets/esri/core/workers/chunks/22045f85e503ae0ec8f4.js +1 -0
  57. package/assets/esri/core/workers/chunks/231602adad900fc024f0.js +1 -0
  58. package/assets/esri/core/workers/chunks/25861560a6ec1ffedfad.js +1 -0
  59. package/assets/esri/core/workers/chunks/2cd56b7ab70f908bbbd4.js +1 -0
  60. package/assets/esri/core/workers/chunks/2e9d280f51ab43e6f102.js +1 -0
  61. package/assets/esri/core/workers/chunks/32a1ccc145c9f6091e13.js +1 -0
  62. package/assets/esri/core/workers/chunks/34691b147318b2cfdd45.js +1 -0
  63. package/assets/esri/core/workers/chunks/38124ee5119e614645c9.js +1 -0
  64. package/assets/esri/core/workers/chunks/394aa478c29599b08bf5.js +1 -0
  65. package/assets/esri/core/workers/chunks/43780090ae85b21ef3fd.js +1 -0
  66. package/assets/esri/core/workers/chunks/43c797bfc2191b51875b.js +1 -0
  67. package/assets/esri/core/workers/chunks/460a82f3e4838b13e3b4.js +1 -0
  68. package/assets/esri/core/workers/chunks/4ad6f80488aa218b95e3.js +1 -0
  69. package/assets/esri/core/workers/chunks/{a115984b794a7f90b2c0.js → 4d45c51ff32dd75299ac.js} +1 -1
  70. package/assets/esri/core/workers/chunks/4e9863a11d09900baf30.js +1 -0
  71. package/assets/esri/core/workers/chunks/4fdc838f4c3efab6cd61.js +1 -0
  72. package/assets/esri/core/workers/chunks/5028de543cc1b8e60e65.js +1 -0
  73. package/assets/esri/core/workers/chunks/51a2da9faccf204d0817.js +1 -0
  74. package/assets/esri/core/workers/chunks/{17b39b88547968048113.js → 531c55f3b8e708ccf767.js} +1 -1
  75. package/assets/esri/core/workers/chunks/{ec4e2f18453e1cb68fed.js → 5f10f39835cb40179000.js} +1 -1
  76. package/assets/esri/core/workers/chunks/{7b1964255722e756eba3.js → 5f9eeab833a6c08c76c4.js} +1 -1
  77. package/assets/esri/core/workers/chunks/65f86594c42ff82095fe.js +1 -0
  78. package/assets/esri/core/workers/chunks/677f5e444ff588ab670f.js +1 -0
  79. package/assets/esri/core/workers/chunks/{6e0cfb76f9c2a9ec6530.js → 6b02919373bd4da7ff73.js} +1 -1
  80. package/assets/esri/core/workers/chunks/6cd370c716e4fe87b684.js +1 -0
  81. package/assets/esri/core/workers/chunks/7382c9882525101eddad.js +1 -0
  82. package/assets/esri/core/workers/chunks/7477a4d08414b561d03b.js +1 -0
  83. package/assets/esri/core/workers/chunks/778ab9e4c3928b0d7d74.js +1 -0
  84. package/assets/esri/core/workers/chunks/{0420fb4b3592f8a26b1f.js → 7d2b1e5402a88b6bee85.js} +1 -1
  85. package/assets/esri/core/workers/chunks/8161deb139b24ad6c287.js +1 -0
  86. package/assets/esri/core/workers/chunks/81a45d7e9dadf678b584.js +1 -0
  87. package/assets/esri/core/workers/chunks/86f2ec2692363abc97d1.js +1 -0
  88. package/assets/esri/core/workers/chunks/{18b0776aef1536867ab8.js → 89274b81a2a8b7cd5c49.js} +1 -1
  89. package/assets/esri/core/workers/chunks/8c3bf66f8543cedc72ef.js +1 -0
  90. package/assets/esri/core/workers/chunks/920d6330df72e2f01d19.js +1 -0
  91. package/assets/esri/core/workers/chunks/9dc7abca1d1eb9ba5b58.js +1 -0
  92. package/assets/esri/core/workers/chunks/9e054c264b17f04b7efa.js +1 -0
  93. package/assets/esri/core/workers/chunks/a49f1172b17c14527acf.js +1 -0
  94. package/assets/esri/core/workers/chunks/{ab9156be67332338bbe4.js → aceec85ce64a3e6d8761.js} +1 -1
  95. package/assets/esri/core/workers/chunks/b10b3eb8c2ed9be14ab2.js +1 -0
  96. package/assets/esri/core/workers/chunks/b40e4ed067da65c3d7ce.js +1 -0
  97. package/assets/esri/core/workers/chunks/b5f68e1fdbaca3cd9c8d.js +1 -0
  98. package/assets/esri/core/workers/chunks/{a32b274404dfd2fb70ee.js → bcfa9f2e54f6777d0855.js} +1 -1
  99. package/assets/esri/core/workers/chunks/c409b8d39c0a40dafa06.js +1 -0
  100. package/assets/esri/core/workers/chunks/c80c82acec04ee0ade04.js +1 -0
  101. package/assets/esri/core/workers/chunks/c873ac660e7d5dc88781.js +1 -0
  102. package/assets/esri/core/workers/chunks/cfdb17522112c52f81ad.js +1 -0
  103. package/assets/esri/core/workers/chunks/d03d50f3247327257d8b.js +1 -0
  104. package/assets/esri/core/workers/chunks/d27a542a406ac3fe2ad9.js +1 -0
  105. package/assets/esri/core/workers/chunks/d2d9c1f32a75befe168b.js +1 -0
  106. package/assets/esri/core/workers/chunks/d76dfac06299cbd4f00e.js +1 -0
  107. package/assets/esri/core/workers/chunks/d9dc8d9fc8ab2706f96b.js +1 -0
  108. package/assets/esri/core/workers/chunks/{09cf8aed89a1ea1f8b28.js → da42da04a9df651b06cc.js} +1 -1
  109. package/assets/esri/core/workers/chunks/dd24cddc406f610d2483.js +1 -0
  110. package/assets/esri/core/workers/chunks/ded71a656e2626a411f9.js +1 -0
  111. package/assets/esri/core/workers/chunks/df1fa0f7e8f7e2bcc2e6.js +1 -0
  112. package/assets/esri/core/workers/chunks/{a5af20f3d484d2d3bafe.js → e2dc7e6b84e9b38ef9fe.js} +1 -1
  113. package/assets/esri/core/workers/chunks/{f7e25a85a79c4e3c1c9f.js → ec63c0fa21cd3c872633.js} +1 -1
  114. package/assets/esri/core/workers/chunks/ef9106ee818ec732b670.js +1 -0
  115. package/assets/esri/core/workers/chunks/f0582d8111ec825e1f9a.js +1 -0
  116. package/assets/esri/core/workers/chunks/{2e7d4a437717606bc39c.js → f104823f3b31a204bacb.js} +1 -1
  117. package/assets/esri/core/workers/chunks/{12fd2e26e949d90abfbd.js → f114da7ef2b891184e77.js} +1 -1
  118. package/assets/esri/core/workers/chunks/f121a0bf33c03abfa0b6.js +1 -0
  119. package/assets/esri/core/workers/chunks/fab7e3e07d700d7bb651.js +1 -0
  120. package/assets/esri/core/workers/chunks/{bc9997d15ec0a86793c6.js → fd47dc60646260c5633c.js} +1 -1
  121. package/assets/esri/core/workers/chunks/fe5aec7e2da4465422b4.js +1 -0
  122. package/assets/esri/core/workers/chunks/{0e8b4543e895b615c254.js → ffb73b4e8f2f7ffd2db4.js} +1 -1
  123. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  124. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  125. package/assets/esri/widgets/Directions/t9n/Directions_ar.json +1 -1
  126. package/assets/esri/widgets/Directions/t9n/Directions_bg.json +1 -1
  127. package/assets/esri/widgets/Directions/t9n/Directions_bs.json +1 -1
  128. package/assets/esri/widgets/Directions/t9n/Directions_ca.json +1 -1
  129. package/assets/esri/widgets/Directions/t9n/Directions_cs.json +1 -1
  130. package/assets/esri/widgets/Directions/t9n/Directions_da.json +1 -1
  131. package/assets/esri/widgets/Directions/t9n/Directions_de.json +1 -1
  132. package/assets/esri/widgets/Directions/t9n/Directions_el.json +1 -1
  133. package/assets/esri/widgets/Directions/t9n/Directions_es.json +1 -1
  134. package/assets/esri/widgets/Directions/t9n/Directions_et.json +1 -1
  135. package/assets/esri/widgets/Directions/t9n/Directions_fi.json +1 -1
  136. package/assets/esri/widgets/Directions/t9n/Directions_fr.json +1 -1
  137. package/assets/esri/widgets/Directions/t9n/Directions_he.json +1 -1
  138. package/assets/esri/widgets/Directions/t9n/Directions_hr.json +1 -1
  139. package/assets/esri/widgets/Directions/t9n/Directions_hu.json +1 -1
  140. package/assets/esri/widgets/Directions/t9n/Directions_id.json +1 -1
  141. package/assets/esri/widgets/Directions/t9n/Directions_it.json +1 -1
  142. package/assets/esri/widgets/Directions/t9n/Directions_ja.json +1 -1
  143. package/assets/esri/widgets/Directions/t9n/Directions_ko.json +1 -1
  144. package/assets/esri/widgets/Directions/t9n/Directions_lt.json +1 -1
  145. package/assets/esri/widgets/Directions/t9n/Directions_lv.json +1 -1
  146. package/assets/esri/widgets/Directions/t9n/Directions_nl.json +1 -1
  147. package/assets/esri/widgets/Directions/t9n/Directions_no.json +1 -1
  148. package/assets/esri/widgets/Directions/t9n/Directions_pl.json +1 -1
  149. package/assets/esri/widgets/Directions/t9n/Directions_pt-BR.json +1 -1
  150. package/assets/esri/widgets/Directions/t9n/Directions_pt-PT.json +1 -1
  151. package/assets/esri/widgets/Directions/t9n/Directions_ro.json +1 -1
  152. package/assets/esri/widgets/Directions/t9n/Directions_ru.json +1 -1
  153. package/assets/esri/widgets/Directions/t9n/Directions_sk.json +1 -1
  154. package/assets/esri/widgets/Directions/t9n/Directions_sl.json +1 -1
  155. package/assets/esri/widgets/Directions/t9n/Directions_sr.json +1 -1
  156. package/assets/esri/widgets/Directions/t9n/Directions_sv.json +1 -1
  157. package/assets/esri/widgets/Directions/t9n/Directions_th.json +1 -1
  158. package/assets/esri/widgets/Directions/t9n/Directions_tr.json +1 -1
  159. package/assets/esri/widgets/Directions/t9n/Directions_uk.json +1 -1
  160. package/assets/esri/widgets/Directions/t9n/Directions_vi.json +1 -1
  161. package/assets/esri/widgets/Directions/t9n/Directions_zh-CN.json +1 -1
  162. package/assets/esri/widgets/Directions/t9n/Directions_zh-HK.json +1 -1
  163. package/assets/esri/widgets/Directions/t9n/Directions_zh-TW.json +1 -1
  164. package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
  165. package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
  166. package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
  167. package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
  168. package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
  169. package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
  170. package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
  171. package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
  172. package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
  173. package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
  174. package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
  175. package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
  176. package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
  177. package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
  178. package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
  179. package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
  180. package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
  181. package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
  182. package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
  183. package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
  184. package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
  185. package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
  186. package/assets/esri/widgets/Editor/t9n/Editor_no.json +1 -1
  187. package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
  188. package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
  189. package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
  190. package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
  191. package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
  192. package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
  193. package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
  194. package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
  195. package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
  196. package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
  197. package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
  198. package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
  199. package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
  200. package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
  201. package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
  202. package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
  203. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ar.json +1 -1
  204. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bg.json +1 -1
  205. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bs.json +1 -1
  206. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ca.json +1 -1
  207. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_cs.json +1 -1
  208. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_da.json +1 -1
  209. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_de.json +1 -1
  210. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_el.json +1 -1
  211. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_es.json +1 -1
  212. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_et.json +1 -1
  213. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fi.json +1 -1
  214. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fr.json +1 -1
  215. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_he.json +1 -1
  216. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hr.json +1 -1
  217. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hu.json +1 -1
  218. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_id.json +1 -1
  219. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_it.json +1 -1
  220. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ja.json +1 -1
  221. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ko.json +1 -1
  222. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
  223. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lv.json +1 -1
  224. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nl.json +1 -1
  225. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_no.json +1 -1
  226. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pl.json +1 -1
  227. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-BR.json +1 -1
  228. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-PT.json +1 -1
  229. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ro.json +1 -1
  230. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ru.json +1 -1
  231. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sk.json +1 -1
  232. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sl.json +1 -1
  233. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sr.json +1 -1
  234. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sv.json +1 -1
  235. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_th.json +1 -1
  236. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_tr.json +1 -1
  237. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_uk.json +1 -1
  238. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_vi.json +1 -1
  239. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-CN.json +1 -1
  240. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-HK.json +1 -1
  241. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-TW.json +1 -1
  242. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  243. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  244. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  245. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  246. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  247. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  248. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  249. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  250. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  251. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  252. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  253. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  254. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  255. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  256. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  257. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  258. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  259. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  260. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  261. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  262. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  263. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  264. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
  265. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  266. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  267. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  268. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  269. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  270. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  271. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  272. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  273. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  274. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  275. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  276. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  277. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  278. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  279. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  280. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  281. package/assets/esri/widgets/Sketch/t9n/Sketch_ar.json +1 -1
  282. package/assets/esri/widgets/Sketch/t9n/Sketch_bg.json +1 -1
  283. package/assets/esri/widgets/Sketch/t9n/Sketch_bs.json +1 -1
  284. package/assets/esri/widgets/Sketch/t9n/Sketch_ca.json +1 -1
  285. package/assets/esri/widgets/Sketch/t9n/Sketch_cs.json +1 -1
  286. package/assets/esri/widgets/Sketch/t9n/Sketch_da.json +1 -1
  287. package/assets/esri/widgets/Sketch/t9n/Sketch_de.json +1 -1
  288. package/assets/esri/widgets/Sketch/t9n/Sketch_el.json +1 -1
  289. package/assets/esri/widgets/Sketch/t9n/Sketch_es.json +1 -1
  290. package/assets/esri/widgets/Sketch/t9n/Sketch_et.json +1 -1
  291. package/assets/esri/widgets/Sketch/t9n/Sketch_fi.json +1 -1
  292. package/assets/esri/widgets/Sketch/t9n/Sketch_fr.json +1 -1
  293. package/assets/esri/widgets/Sketch/t9n/Sketch_he.json +1 -1
  294. package/assets/esri/widgets/Sketch/t9n/Sketch_hr.json +1 -1
  295. package/assets/esri/widgets/Sketch/t9n/Sketch_hu.json +1 -1
  296. package/assets/esri/widgets/Sketch/t9n/Sketch_id.json +1 -1
  297. package/assets/esri/widgets/Sketch/t9n/Sketch_it.json +1 -1
  298. package/assets/esri/widgets/Sketch/t9n/Sketch_ja.json +1 -1
  299. package/assets/esri/widgets/Sketch/t9n/Sketch_ko.json +1 -1
  300. package/assets/esri/widgets/Sketch/t9n/Sketch_lt.json +1 -1
  301. package/assets/esri/widgets/Sketch/t9n/Sketch_lv.json +1 -1
  302. package/assets/esri/widgets/Sketch/t9n/Sketch_nl.json +1 -1
  303. package/assets/esri/widgets/Sketch/t9n/Sketch_no.json +1 -1
  304. package/assets/esri/widgets/Sketch/t9n/Sketch_pl.json +1 -1
  305. package/assets/esri/widgets/Sketch/t9n/Sketch_pt-BR.json +1 -1
  306. package/assets/esri/widgets/Sketch/t9n/Sketch_pt-PT.json +1 -1
  307. package/assets/esri/widgets/Sketch/t9n/Sketch_ro.json +1 -1
  308. package/assets/esri/widgets/Sketch/t9n/Sketch_ru.json +1 -1
  309. package/assets/esri/widgets/Sketch/t9n/Sketch_sk.json +1 -1
  310. package/assets/esri/widgets/Sketch/t9n/Sketch_sl.json +1 -1
  311. package/assets/esri/widgets/Sketch/t9n/Sketch_sr.json +1 -1
  312. package/assets/esri/widgets/Sketch/t9n/Sketch_sv.json +1 -1
  313. package/assets/esri/widgets/Sketch/t9n/Sketch_th.json +1 -1
  314. package/assets/esri/widgets/Sketch/t9n/Sketch_tr.json +1 -1
  315. package/assets/esri/widgets/Sketch/t9n/Sketch_uk.json +1 -1
  316. package/assets/esri/widgets/Sketch/t9n/Sketch_vi.json +1 -1
  317. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-CN.json +1 -1
  318. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-HK.json +1 -1
  319. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-TW.json +1 -1
  320. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ar.json +1 -1
  321. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_bg.json +1 -1
  322. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_bs.json +1 -1
  323. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ca.json +1 -1
  324. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_cs.json +1 -1
  325. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_da.json +1 -1
  326. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_de.json +1 -1
  327. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_el.json +1 -1
  328. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_es.json +1 -1
  329. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_et.json +1 -1
  330. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_fi.json +1 -1
  331. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_fr.json +1 -1
  332. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_he.json +1 -1
  333. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_hr.json +1 -1
  334. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_hu.json +1 -1
  335. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_id.json +1 -1
  336. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_it.json +1 -1
  337. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ja.json +1 -1
  338. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ko.json +1 -1
  339. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_lt.json +1 -1
  340. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_lv.json +1 -1
  341. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_nl.json +1 -1
  342. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_no.json +1 -1
  343. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_pl.json +1 -1
  344. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_pt-BR.json +1 -1
  345. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_pt-PT.json +1 -1
  346. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ro.json +1 -1
  347. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ru.json +1 -1
  348. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_sk.json +1 -1
  349. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_sl.json +1 -1
  350. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_sr.json +1 -1
  351. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_sv.json +1 -1
  352. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_th.json +1 -1
  353. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_tr.json +1 -1
  354. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_uk.json +1 -1
  355. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_vi.json +1 -1
  356. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_zh-CN.json +1 -1
  357. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_zh-HK.json +1 -1
  358. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_zh-TW.json +1 -1
  359. package/chunks/Fog.glsl.js +1 -1
  360. package/config.js +1 -1
  361. package/core/sql/types.d.ts +398 -86
  362. package/effects/FocusAreas.d.ts +1 -1
  363. package/form/elements/FieldElement.d.ts +1 -1
  364. package/form/elements/GroupElement.d.ts +1 -1
  365. package/form/elements/TextElement.d.ts +1 -1
  366. package/form/elements/inputs/ComboBoxInput.d.ts +1 -1
  367. package/form/elements/inputs/RadioButtonsInput.d.ts +1 -1
  368. package/form/elements/inputs/SwitchInput.d.ts +1 -1
  369. package/geometry/Mesh.d.ts +7 -7
  370. package/geometry/operators/alphaShapeOperator.d.ts +1 -1
  371. package/geometry/operators/areaOperator.d.ts +1 -1
  372. package/geometry/operators/bufferOperator.d.ts +1 -1
  373. package/geometry/operators/centroidOperator.d.ts +1 -1
  374. package/geometry/operators/clipOperator.d.ts +1 -1
  375. package/geometry/operators/containsOperator.d.ts +1 -1
  376. package/geometry/operators/convexHullOperator.d.ts +1 -1
  377. package/geometry/operators/crossesOperator.d.ts +1 -1
  378. package/geometry/operators/cutOperator.d.ts +1 -1
  379. package/geometry/operators/densifyOperator.d.ts +1 -1
  380. package/geometry/operators/differenceOperator.d.ts +1 -1
  381. package/geometry/operators/disjointOperator.d.ts +1 -1
  382. package/geometry/operators/distanceOperator.d.ts +1 -1
  383. package/geometry/operators/generalizeOperator.d.ts +1 -1
  384. package/geometry/operators/geodesicProximityOperator.d.ts +1 -1
  385. package/geometry/operators/geodeticDistanceOperator.d.ts +1 -1
  386. package/geometry/operators/geodeticUtilsOperator.d.ts +2 -2
  387. package/geometry/operators/graphicBufferOperator.d.ts +1 -1
  388. package/geometry/operators/intersectionOperator.d.ts +1 -1
  389. package/geometry/operators/intersectsOperator.d.ts +1 -1
  390. package/geometry/operators/isNearOperator.d.ts +1 -1
  391. package/geometry/operators/lengthOperator.d.ts +1 -1
  392. package/geometry/operators/locateBetweenOperator.d.ts +1 -1
  393. package/geometry/operators/multiPartToSinglePartOperator.d.ts +1 -1
  394. package/geometry/operators/offsetOperator.d.ts +5 -5
  395. package/geometry/operators/overlapsOperator.d.ts +1 -1
  396. package/geometry/operators/proximityOperator.d.ts +1 -1
  397. package/geometry/operators/simplifyOGCOperator.d.ts +1 -1
  398. package/geometry/operators/simplifyOperator.d.ts +1 -1
  399. package/geometry/operators/support/GeographicTransformation.d.ts +6 -4
  400. package/geometry/operators/support/GeographicTransformation.js +1 -1
  401. package/geometry/operators/support/GeographicTransformationStep.d.ts +5 -3
  402. package/geometry/operators/support/GeographicTransformationStep.js +1 -1
  403. package/geometry/operators/support/Transformation.d.ts +6 -6
  404. package/geometry/operators/symmetricDifferenceOperator.d.ts +1 -1
  405. package/geometry/operators/touchesOperator.d.ts +1 -1
  406. package/geometry/operators/unionOperator.d.ts +1 -1
  407. package/geometry/operators/withinOperator.d.ts +1 -1
  408. package/geometry/support/MeshMaterialMetallicRoughness.d.ts +1 -1
  409. package/kernel.js +1 -1
  410. package/layers/BuildingSceneLayer.d.ts +4 -4
  411. package/layers/CSVLayer.d.ts +4 -4
  412. package/layers/CatalogLayer.d.ts +2 -2
  413. package/layers/ElevationLayer.d.ts +1 -1
  414. package/layers/FeatureLayer.d.ts +2 -2
  415. package/layers/GaussianSplatLayer.d.ts +77 -10
  416. package/layers/GeoJSONLayer.d.ts +3 -3
  417. package/layers/GeoRSSLayer.d.ts +1 -1
  418. package/layers/GraphicsLayer.d.ts +2 -2
  419. package/layers/ImageryLayer.d.ts +3 -3
  420. package/layers/ImageryTileLayer.d.ts +2 -2
  421. package/layers/IntegratedMesh3DTilesLayer.d.ts +6 -6
  422. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  423. package/layers/IntegratedMeshLayer.d.ts +7 -7
  424. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  425. package/layers/MapImageLayer.d.ts +1 -1
  426. package/layers/MediaLayer.d.ts +1 -1
  427. package/layers/OGCFeatureLayer.d.ts +2 -2
  428. package/layers/PointCloudLayer.d.ts +1 -1
  429. package/layers/SceneLayer.d.ts +9 -9
  430. package/layers/StreamLayer.d.ts +2 -2
  431. package/layers/VectorTileLayer.d.ts +2 -2
  432. package/layers/VideoLayer.d.ts +1 -1
  433. package/layers/VoxelLayer.d.ts +8 -8
  434. package/layers/WFSLayer.d.ts +6 -6
  435. package/layers/catalog/CatalogFootprintLayer.d.ts +1 -1
  436. package/layers/mixins/BlendLayer.d.ts +6 -6
  437. package/layers/pointCloudFilters/PointCloudReturnFilter.d.ts +1 -1
  438. package/layers/pointCloudFilters/PointCloudValueFilter.d.ts +1 -1
  439. package/layers/support/DimensionalDefinition.d.ts +2 -2
  440. package/layers/support/FeatureEffect.d.ts +4 -4
  441. package/layers/support/FeatureFilter.d.ts +17 -17
  442. package/layers/support/FeatureReductionBinning.d.ts +1 -1
  443. package/layers/support/FeatureReductionCluster.d.ts +9 -9
  444. package/layers/support/FeatureReductionSelection.d.ts +1 -1
  445. package/layers/support/LabelClass.d.ts +2 -2
  446. package/layers/support/RasterFunction.d.ts +1 -1
  447. package/layers/support/SceneFilter.d.ts +2 -2
  448. package/layers/support/SceneModification.d.ts +3 -3
  449. package/layers/support/arcgisLayerUrl.js +1 -1
  450. package/layers/support/featurePopupQueryUtils.js +1 -1
  451. package/layers/types.d.ts +24 -10
  452. package/package.json +1 -1
  453. package/popup/content/AttachmentsContent.d.ts +1 -1
  454. package/popup/content/BarChartMediaInfo.d.ts +1 -1
  455. package/popup/content/ColumnChartMediaInfo.d.ts +1 -1
  456. package/popup/content/FieldsContent.d.ts +1 -1
  457. package/popup/content/ImageMediaInfo.d.ts +1 -1
  458. package/popup/content/LineChartMediaInfo.d.ts +1 -1
  459. package/popup/content/MediaContent.d.ts +1 -1
  460. package/popup/content/PieChartMediaInfo.d.ts +1 -1
  461. package/popup/content/RelationshipContent.d.ts +1 -1
  462. package/popup/content/TextContent.d.ts +1 -1
  463. package/portal/support/urlUtils.js +1 -1
  464. package/renderers/ClassBreaksRenderer.d.ts +1 -1
  465. package/renderers/DictionaryRenderer.d.ts +1 -1
  466. package/renderers/DotDensityRenderer.d.ts +3 -3
  467. package/renderers/FlowRenderer.d.ts +6 -6
  468. package/renderers/HeatmapRenderer.d.ts +3 -3
  469. package/renderers/PieChartRenderer.d.ts +1 -1
  470. package/renderers/RasterShadedReliefRenderer.d.ts +1 -1
  471. package/renderers/Renderer.d.ts +4 -4
  472. package/renderers/SimpleRenderer.d.ts +2 -2
  473. package/renderers/UniqueValueRenderer.d.ts +2 -2
  474. package/renderers/VectorFieldRenderer.d.ts +1 -1
  475. package/renderers/mixins/VisualVariablesMixin.d.ts +12 -12
  476. package/renderers/visualVariables/ColorVariable.d.ts +1 -1
  477. package/renderers/visualVariables/OpacityVariable.d.ts +1 -1
  478. package/renderers/visualVariables/RotationVariable.d.ts +1 -1
  479. package/renderers/visualVariables/SizeVariable.d.ts +1 -1
  480. package/renderers/visualVariables/VisualVariable.d.ts +1 -1
  481. package/rest/query/support/AttachmentInfo.d.ts +1 -1
  482. package/rest/support/AutoIntervalBinParameters.d.ts +1 -1
  483. package/rest/support/DateBinParameters.d.ts +1 -1
  484. package/rest/support/FixedBoundariesBinParameters.d.ts +1 -1
  485. package/rest/support/FixedIntervalBinParameters.d.ts +1 -1
  486. package/rest/support/Query.d.ts +3 -2
  487. package/rest/types.d.ts +1 -3
  488. package/smartMapping/labels/clusters.d.ts +1 -1
  489. package/smartMapping/popup/clusters.d.ts +2 -2
  490. package/smartMapping/popup/templates.d.ts +1 -1
  491. package/smartMapping/raster/renderers/flow.d.ts +2 -2
  492. package/smartMapping/renderers/color.d.ts +12 -12
  493. package/smartMapping/renderers/predominance.d.ts +3 -3
  494. package/smartMapping/renderers/relationship.d.ts +15 -15
  495. package/smartMapping/renderers/univariateColorSize.d.ts +4 -4
  496. package/smartMapping/symbology/color.d.ts +4 -4
  497. package/smartMapping/symbology/flow.d.ts +2 -2
  498. package/smartMapping/symbology/types.d.ts +18 -18
  499. package/support/actions/ActionButton.d.ts +1 -1
  500. package/support/revision.js +1 -1
  501. package/symbols/CIMSymbol.d.ts +1 -1
  502. package/symbols/ExtrudeSymbol3DLayer.d.ts +1 -1
  503. package/symbols/FillSymbol3DLayer.d.ts +3 -3
  504. package/symbols/IconSymbol3DLayer.d.ts +1 -1
  505. package/symbols/LabelSymbol3D.d.ts +2 -2
  506. package/symbols/LineStyleMarker3D.d.ts +7 -7
  507. package/symbols/LineSymbol3D.d.ts +2 -2
  508. package/symbols/LineSymbol3DLayer.d.ts +7 -7
  509. package/symbols/LineSymbolMarker.d.ts +6 -6
  510. package/symbols/MarkerSymbol.d.ts +1 -1
  511. package/symbols/MeshSymbol3D.d.ts +2 -2
  512. package/symbols/ObjectSymbol3DLayer.d.ts +1 -1
  513. package/symbols/PathSymbol3DLayer.d.ts +14 -14
  514. package/symbols/PictureFillSymbol.d.ts +1 -1
  515. package/symbols/PictureMarkerSymbol.d.ts +1 -1
  516. package/symbols/PointSymbol3D.d.ts +3 -3
  517. package/symbols/PolygonSymbol3D.d.ts +7 -7
  518. package/symbols/SimpleFillSymbol.d.ts +8 -8
  519. package/symbols/SimpleLineSymbol.d.ts +20 -20
  520. package/symbols/SimpleMarkerSymbol.d.ts +7 -7
  521. package/symbols/Symbol3DLayer.d.ts +16 -16
  522. package/symbols/TextSymbol.d.ts +1 -1
  523. package/symbols/TextSymbol3DLayer.d.ts +1 -1
  524. package/symbols/WaterSymbol3DLayer.d.ts +3 -3
  525. package/symbols/WebStyleSymbol.d.ts +1 -1
  526. package/symbols/callouts/Callout3D.d.ts +1 -1
  527. package/symbols/callouts/LineCallout3D.d.ts +3 -3
  528. package/symbols/cim/types.d.ts +23 -23
  529. package/symbols/edges/Edges3D.d.ts +1 -1
  530. package/symbols/edges/SolidEdges3D.d.ts +1 -1
  531. package/symbols/patterns/LineStylePattern3D.d.ts +11 -11
  532. package/symbols/patterns/StylePattern3D.d.ts +8 -8
  533. package/symbols/support/ElevationInfo.d.ts +2 -2
  534. package/symbols/support/IconSymbol3DLayerResource.d.ts +6 -6
  535. package/symbols/support/ObjectSymbol3DLayerResource.d.ts +7 -7
  536. package/symbols/support/Symbol3DEmissive.d.ts +19 -6
  537. package/symbols/support/Symbol3DVerticalOffset.d.ts +2 -2
  538. package/versionManagement/VersionManagementService.d.ts +4 -0
  539. package/views/2d/layers/BaseLayerViewGL2D.d.ts +1 -1
  540. package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
  541. package/views/2d/types.d.ts +3 -3
  542. package/views/3d/environment/CloudyWeather.d.ts +1 -1
  543. package/views/3d/environment/Environment.d.ts +4 -4
  544. package/views/3d/environment/FoggyWeather.d.ts +1 -1
  545. package/views/3d/environment/RainyWeather.d.ts +1 -1
  546. package/views/3d/environment/SnowyWeather.d.ts +1 -1
  547. package/views/3d/environment/SunLighting.d.ts +1 -1
  548. package/views/3d/environment/SunnyWeather.d.ts +1 -1
  549. package/views/3d/environment/VirtualLighting.d.ts +1 -1
  550. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  551. package/views/3d/layers/graphics/polygonUtils.js +1 -1
  552. package/views/3d/webgl/RenderNode.d.ts +2 -2
  553. package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
  554. package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
  555. package/views/3d/webgl.d.ts +1 -1
  556. package/views/Magnifier.d.ts +3 -3
  557. package/views/MapView.d.ts +7 -7
  558. package/views/SceneView.d.ts +16 -16
  559. package/views/View.d.ts +2 -2
  560. package/views/interactive/sketch/SketchLabelOptions.d.ts +1 -1
  561. package/views/interactive/sketch/SketchTooltipOptions.d.ts +1 -1
  562. package/views/interactive/snapping/SnappingOptions.d.ts +7 -7
  563. package/views/layers/FeatureLikeLayerView.js +1 -1
  564. package/views/support/HighlightOptions.d.ts +1 -1
  565. package/views/ui/DefaultUI.d.ts +2 -2
  566. package/views/webgl/RenderingContext.js +1 -1
  567. package/webscene/Environment.d.ts +16 -11
  568. package/webscene/Glow.d.ts +4 -2
  569. package/webscene/background/ColorBackground.d.ts +1 -1
  570. package/widgets/AreaMeasurement2D.d.ts +1 -1
  571. package/widgets/AreaMeasurement3D.d.ts +2 -2
  572. package/widgets/Attachments.d.ts +1 -1
  573. package/widgets/Attribution.d.ts +1 -1
  574. package/widgets/BasemapGallery.d.ts +1 -1
  575. package/widgets/BasemapLayerList.d.ts +3 -3
  576. package/widgets/BasemapToggle.d.ts +1 -1
  577. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +1 -2
  578. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.d.ts +0 -1
  579. package/widgets/BatchAttributeForm.d.ts +0 -2
  580. package/widgets/Bookmarks/BookmarksVisibleElements.d.ts +1 -1
  581. package/widgets/Bookmarks.d.ts +2 -2
  582. package/widgets/BuildingExplorer.d.ts +1 -1
  583. package/widgets/CatalogLayerList.d.ts +3 -3
  584. package/widgets/Compass.d.ts +2 -2
  585. package/widgets/CoordinateConversion.d.ts +1 -1
  586. package/widgets/Daylight.d.ts +5 -5
  587. package/widgets/DirectLineMeasurement3D.d.ts +2 -2
  588. package/widgets/Directions/DirectionsViewModel.d.ts +12 -0
  589. package/widgets/Directions/DirectionsViewModel.js +1 -1
  590. package/widgets/Directions.d.ts +4 -4
  591. package/widgets/DistanceMeasurement2D.d.ts +1 -1
  592. package/widgets/Editor/CreateFeaturesWorkflow.d.ts +1 -1
  593. package/widgets/Editor/EditorViewModel.js +1 -1
  594. package/widgets/Editor.d.ts +8 -8
  595. package/widgets/ElevationProfile/ElevationProfileLineGround.d.ts +1 -1
  596. package/widgets/ElevationProfile/ElevationProfileLineInput.d.ts +1 -1
  597. package/widgets/ElevationProfile/ElevationProfileLineView.d.ts +1 -1
  598. package/widgets/ElevationProfile.d.ts +3 -3
  599. package/widgets/Expand.d.ts +1 -1
  600. package/widgets/FeatureForm.d.ts +1 -1
  601. package/widgets/FeatureTable/ActionColumn.d.ts +2 -2
  602. package/widgets/FeatureTable/AttachmentsColumn.d.ts +1 -1
  603. package/widgets/FeatureTable/FeatureTableViewModel.d.ts +3 -3
  604. package/widgets/FeatureTable/Grid/GroupColumn.d.ts +1 -1
  605. package/widgets/FeatureTable/RelationshipColumn.d.ts +1 -1
  606. package/widgets/FeatureTable/VisibleElements.d.ts +1 -1
  607. package/widgets/FeatureTable.d.ts +10 -10
  608. package/widgets/FeatureTemplates/FeatureTemplatesViewModel.d.ts +5 -5
  609. package/widgets/FeatureTemplates.d.ts +8 -8
  610. package/widgets/Features/FeaturesViewModel.d.ts +2 -2
  611. package/widgets/Features/FeaturesVisibleElements.d.ts +2 -2
  612. package/widgets/Features.d.ts +1 -1
  613. package/widgets/Histogram.d.ts +2 -2
  614. package/widgets/HistogramRangeSlider.d.ts +1 -1
  615. package/widgets/Home.d.ts +1 -1
  616. package/widgets/LayerList/ListItemPanel.d.ts +1 -1
  617. package/widgets/LayerList.d.ts +4 -4
  618. package/widgets/Legend.d.ts +8 -8
  619. package/widgets/LineOfSight.d.ts +1 -1
  620. package/widgets/Locate.d.ts +2 -2
  621. package/widgets/Measurement.d.ts +1 -1
  622. package/widgets/NavigationToggle/NavigationToggleViewModel.d.ts +1 -1
  623. package/widgets/NavigationToggle.d.ts +3 -3
  624. package/widgets/Popup/PopupVisibleElements.d.ts +2 -2
  625. package/widgets/Popup.d.ts +5 -5
  626. package/widgets/Print/CustomTemplate.d.ts +1 -1
  627. package/widgets/Print/TemplateOptions.d.ts +4 -4
  628. package/widgets/ScaleRangeSlider.d.ts +1 -1
  629. package/widgets/Search/SearchViewModel.d.ts +4 -4
  630. package/widgets/Search.d.ts +5 -5
  631. package/widgets/ShadowCast.d.ts +3 -3
  632. package/widgets/Sketch/SketchViewModel.d.ts +39 -39
  633. package/widgets/Sketch.d.ts +43 -43
  634. package/widgets/Slice.d.ts +2 -2
  635. package/widgets/Slider/SliderViewModel.d.ts +2 -2
  636. package/widgets/Slider.d.ts +9 -9
  637. package/widgets/Swipe/SwipeViewModel.d.ts +1 -1
  638. package/widgets/Swipe.d.ts +2 -2
  639. package/widgets/TableList/ListItemPanel.d.ts +1 -1
  640. package/widgets/TableList.d.ts +1 -1
  641. package/widgets/TimeSlider/TimeSliderViewModel.d.ts +8 -9
  642. package/widgets/TimeSlider/types.d.ts +1 -1
  643. package/widgets/TimeSlider.d.ts +11 -12
  644. package/widgets/Track.d.ts +2 -2
  645. package/widgets/UtilityNetworkAssociations.d.ts +3 -3
  646. package/widgets/UtilityNetworkTrace.d.ts +4 -4
  647. package/widgets/UtilityNetworkValidateTopology.d.ts +1 -1
  648. package/widgets/ValuePicker.d.ts +5 -5
  649. package/widgets/VideoPlayer.d.ts +1 -1
  650. package/widgets/smartMapping/ClassedColorSlider.d.ts +1 -1
  651. package/widgets/smartMapping/ClassedSizeSlider.d.ts +1 -1
  652. package/widgets/smartMapping/ColorSizeSlider.d.ts +2 -2
  653. package/widgets/smartMapping/ColorSlider.d.ts +1 -1
  654. package/widgets/smartMapping/HeatmapSlider.d.ts +1 -1
  655. package/widgets/smartMapping/OpacitySlider.d.ts +1 -1
  656. package/widgets/smartMapping/SizeSlider.d.ts +1 -1
  657. package/widgets/smartMapping/SmartMappingSliderBase.d.ts +4 -4
  658. package/widgets/smartMapping/SmartMappingSliderViewModel.d.ts +6 -6
  659. package/widgets/support/GridControls.d.ts +1 -1
  660. package/widgets/support/SnappingControls/VisibleElements.d.ts +1 -1
  661. package/widgets/support/SnappingControls.d.ts +6 -6
  662. package/assets/esri/core/workers/chunks/08616877b58b518e7461.js +0 -1
  663. package/assets/esri/core/workers/chunks/089cef7124173a5cd5f9.js +0 -1
  664. package/assets/esri/core/workers/chunks/0baa0d66003d23cc76a7.js +0 -1
  665. package/assets/esri/core/workers/chunks/0baf2cf9d8998045a605.js +0 -1
  666. package/assets/esri/core/workers/chunks/0cc68540194bd9f7aa3c.js +0 -1
  667. package/assets/esri/core/workers/chunks/0e216f0075fd531c3a2b.js +0 -1
  668. package/assets/esri/core/workers/chunks/1219b588f983b4f35033.js +0 -1
  669. package/assets/esri/core/workers/chunks/13e913aa5f5113fceb16.js +0 -1
  670. package/assets/esri/core/workers/chunks/1458ef3857be3b76be95.js +0 -1
  671. package/assets/esri/core/workers/chunks/15e5471277a48f482383.js +0 -1
  672. package/assets/esri/core/workers/chunks/16abc548724e428c325a.js +0 -1
  673. package/assets/esri/core/workers/chunks/1d124a55f6804be19e09.js +0 -1
  674. package/assets/esri/core/workers/chunks/1ede5fa7a16839ed9444.js +0 -1
  675. package/assets/esri/core/workers/chunks/25b815ef26cf2fa26fc8.js +0 -1
  676. package/assets/esri/core/workers/chunks/27d1f8279df34d8b15b5.js +0 -1
  677. package/assets/esri/core/workers/chunks/2bb7bb7901bd343201fc.js +0 -1
  678. package/assets/esri/core/workers/chunks/2c7e5b78d94e5850537b.js +0 -1
  679. package/assets/esri/core/workers/chunks/2d52b137ee64469a46b2.js +0 -1
  680. package/assets/esri/core/workers/chunks/395ee51a863757ea8124.js +0 -1
  681. package/assets/esri/core/workers/chunks/454150571b5b664b576a.js +0 -1
  682. package/assets/esri/core/workers/chunks/4740d319f233b7f528fe.js +0 -1
  683. package/assets/esri/core/workers/chunks/49d58bacb5b397246978.js +0 -1
  684. package/assets/esri/core/workers/chunks/5062ed46edb88c0d343c.js +0 -1
  685. package/assets/esri/core/workers/chunks/59f955c7d6b0589e7cc6.js +0 -1
  686. package/assets/esri/core/workers/chunks/5a347b1d87eb6f710136.js +0 -1
  687. package/assets/esri/core/workers/chunks/5b97cdeb5949822fbef3.js +0 -1
  688. package/assets/esri/core/workers/chunks/620d7cd0b0885122aa0f.js +0 -1
  689. package/assets/esri/core/workers/chunks/6e8989d61204b0b5ff52.js +0 -1
  690. package/assets/esri/core/workers/chunks/7017c2e621236c7a7da4.js +0 -1
  691. package/assets/esri/core/workers/chunks/7407a1e0cef508116a0b.js +0 -1
  692. package/assets/esri/core/workers/chunks/78936c591fd49ff955a9.js +0 -1
  693. package/assets/esri/core/workers/chunks/796f5265747ce8be910e.js +0 -1
  694. package/assets/esri/core/workers/chunks/7b7288c431933a75daca.js +0 -1
  695. package/assets/esri/core/workers/chunks/7c01e5eaab97a9ae80ad.js +0 -1
  696. package/assets/esri/core/workers/chunks/7f9b0ef7f9b3f3fd3df9.js +0 -1
  697. package/assets/esri/core/workers/chunks/8177e95596b71bf020aa.js +0 -1
  698. package/assets/esri/core/workers/chunks/a4b422dbb6d3cb2505e1.js +0 -1
  699. package/assets/esri/core/workers/chunks/a5e91cf150f6cf6a5d2a.js +0 -1
  700. package/assets/esri/core/workers/chunks/aef2832902b270f1a594.js +0 -1
  701. package/assets/esri/core/workers/chunks/b0b24fb60a21b995b348.js +0 -1
  702. package/assets/esri/core/workers/chunks/bb830d93e97dceac350f.js +0 -1
  703. package/assets/esri/core/workers/chunks/bc32a4baeb0ecabb68cc.js +0 -1
  704. package/assets/esri/core/workers/chunks/bd05e68b00b9878d0266.js +0 -1
  705. package/assets/esri/core/workers/chunks/bd12ca39198e6efbefbb.js +0 -1
  706. package/assets/esri/core/workers/chunks/c15f0769a64863cccef0.js +0 -1
  707. package/assets/esri/core/workers/chunks/c516b185b099bf69c0ed.js +0 -1
  708. package/assets/esri/core/workers/chunks/c693e8eb96ab8a4b9cbe.js +0 -1
  709. package/assets/esri/core/workers/chunks/cf09408cb7729126caae.js +0 -1
  710. package/assets/esri/core/workers/chunks/e0565849281ffbe8269e.js +0 -1
  711. package/assets/esri/core/workers/chunks/e4f1e584f89ffb86206b.js +0 -1
  712. package/assets/esri/core/workers/chunks/e60684918100666bb892.js +0 -1
  713. package/assets/esri/core/workers/chunks/e94448b371cd17d7a472.js +0 -1
  714. package/assets/esri/core/workers/chunks/ed78e19b1e400c0db309.js +0 -1
  715. package/assets/esri/core/workers/chunks/ede1d1cc2f315a34f4ca.js +0 -1
  716. package/assets/esri/core/workers/chunks/fc98b8351be567d3eb62.js +0 -1
  717. package/assets/esri/core/workers/chunks/fe52117fe6982046c9e3.js +0 -1
  718. package/assets/esri/core/workers/chunks/ff961bb6d29ab3fe129d.js +0 -1
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{nextHighestPowerOfTwo as t}from"../../../../../core/mathUtils.js";import{disposeMaybe as e}from"../../../../../core/maybe.js";import{copy as r,invert as o,transpose as s}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as n}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{glLayout as a}from"../../../support/buffer/glUtil.js";import{VertexArrayObject as f}from"../../lib/VertexArrayObject.js";import{getMaxItemCount as i,getMaxByteSize as u}from"../../lib/TextureBackedBuffer/TextureBackedBufferUtils.js";import{TextureBuffer as c}from"../../lib/TextureBackedBuffer/TextureBuffer.js";import{bufferRangePool as m}from"./BufferRange.js";import{DrawCommand as g}from"./DrawCommand.js";import{BaseInstanceData as l}from"./PerBaseInstanceData.js";import{VertexBuffer as h}from"../../../../webgl/VertexBuffer.js";class y{constructor(t,e){this._rctx=e;const r=t.createBufferWriter();this._bufferWriter=r,this._vaoCache=e.getVaoCache(a(r.layout));const o=["geometry"];"textureBufferLayout"in r&&null!=r.textureBufferLayout&&o.push("texture"),this.targetBuffers=o}maxElements(t){if("texture"===t){const t=this._targetLayout("texture");return null==t?0:i(this._rctx,t)}return Math.floor(x/this._targetStrideBytes(t))}_targetStrideBytes(t){return this._targetLayout(t)?.stride??0}_targetLayout(t){return"geometry"===t?this._bufferWriter.layout:"baseInstance"===t?this._bufferWriter.baseInstanceLayout:this._bufferWriter.textureBufferLayout}evaluateBufferAllocation(t,e,r,o){const s=this._targetStrideBytes("geometry"),n=e.reduce((t,{geometry:e})=>t+this.vertexElementCount(e),0),a=r.reduce((t,{geometry:e})=>t+this.vertexElementCount(e),0),f=Math.min((t+n-a)*s,x),i=o.vao?.buffer("geometry"),u=i?.sizeBytes??0;return f>b&&f<u/2?0:f>u?1:2}deleteBuffer(t){if(t.isInstanced)return t.instancedCommandVAOs?.dispose(),t.vao?.buffer("geometry")?.dispose(),t.vao?.disposeVAOOnly(),void(t.vao=null);this._vaoCache.deleteVao(t.vao),t.vaoEndElement=0,t.textureBuffer=e(t.textureBuffer),t.textureEndElement=0}createBaseInstanceData(t){const{_bufferWriter:e}=this;if(null==t||null==e.baseInstanceLayout||null==e.writeBaseInstance||null==e.elementCountBaseInstance)return null;const r=this._targetLayout("baseInstance"),o=e.elementCountBaseInstance(t.attributes),s=o*r.stride,n=new h(this._rctx,a(r));n.setSize(Math.ceil(s));const f=S(s),i=r.createView(f.buffer);e.writeBaseInstance(t.attributes,i),n.setSubData(f,0,0,s);const u=new g;return u.first=0,u.count=o,new l(t,n,u)}_allocateInstanceBuffer(t){const e=this._bufferWriter.layout,r=t*this._targetStrideBytes("geometry"),o=new h(this._rctx,a(e,1));return o.setSize(v(r)),o}_createInstancedVao(t,e){return new f(this._rctx,new Map([["baseInstance",t],["geometry",e]]))}reallocateBuffer(t,e,r){if(this.deleteBuffer(e),null!=t){const o=t.baseInstanceBuffer,s=this._allocateInstanceBuffer(r.geometry);e.vao=this._createInstancedVao(o,s)}else{const t=r.geometry*this._targetStrideBytes("geometry");e.vao=this._vaoCache.newVao(v(t))}const o=this._targetLayout("texture");if(null!=o){const t=v(r.texture*o.stride),s=Math.ceil(t/o.stride);e.textureBuffer=new c(this._rctx,o,s)}e.vaoEndElement=Math.floor((e.vao?.getByteLength("geometry")??0)/this._targetStrideBytes("geometry")),e.textureEndElement=e.textureBuffer?.itemCount??0}elementCount(t,e){const{attributes:r}=t;return"geometry"===e?this._bufferWriter.elementCount(r):"baseInstance"===e?this._bufferWriter.elementCountBaseInstance?.(r)??0:this._bufferWriter.elementCountTextureBuffer?.(r)??0}vertexElementCount(t){return this._bufferWriter.elementCount(t.attributes)}textureElementCount(t){return this._bufferWriter.elementCountTextureBuffer?.(t.attributes)??0}canGrow(t,e){const r=this.targetBuffers.map(r=>this._evaluateTargetBufferGrowth(r,t,e));return r.every(({canGrow:t})=>t)&&r.some(({needsToGrow:t})=>t)}_evaluateTargetBufferGrowth(t,e,r){const o=this._targetLayout(t),s=e.getTargetBuffer(t);if(null==o||null==s)return{needsToGrow:null!=o,canGrow:!0};return{needsToGrow:r[t]*o.stride>s.sizeBytes,canGrow:"geometry"===t?s.sizeBytes<v(x-b):s.sizeBytes<u(this._rctx,o)}}clearHoles(t,e){for(const r of this.targetBuffers){const o=this._targetStrideBytes(r),s=t[r],n=s.reduce((t,e)=>Math.max(t,e.numElements),0)*o,a=S(n);a.fill(0,0,n);for(const t of s)this._setTargetSubData(r,e,o,t,a)}}clearHolesMetal(t,e,r){const{targetBuffers:o}=this,s={};let n=0;for(const i of o){const t=e[i].numElements*this._targetStrideBytes(i);s[i]=n,n+=t}const a=S(n);a.fill(0,0,n);const f={};for(const i of o)f[i]=this._targetLayout(i)?.createView(a.buffer,s[i]);for(const i of t){const t=i.targetRanges.geometry;if(!(t.from>=e.geometry.from&&t.to<=e.geometry.to))continue;const r={};for(const s of o)r[s]=i.targetRanges[s].from-e[s].from;this._writeGeometry(i.geometry,f,r,i.targetRanges)}for(const i of o)this._setTargetSubData(i,r,this._targetStrideBytes(i),e[i],a,s[i])}writeRandomInstances(t,e,r){const{targetBuffers:o}=this,s={},n={},a={},f={};let i=0;for(const g of o)s[g]=t[g]*this._targetStrideBytes(g),n[g]=i,a[g]=0,f[g]=m.acquire(0,0),i+=s[g];const u=S(i),c={};for(const m of o)c[m]=this._targetLayout(m)?.createView(u.buffer,n[m]);for(const m of e){for(const t of o){const e=m.targetRanges[t],o=f[t];o.to===e.from||(o.numElements>0&&this._setTargetSubData(t,r,this._targetStrideBytes(t),f[t],u,n[t]),o.from=e.from,a[t]=0)}this._writeGeometry(m.geometry,c,a,m.targetRanges);for(const t of o){const e=m.targetRanges[t];a[t]+=e.numElements,f[t].to=e.to}}for(const g of o){const t=f[g];t.numElements>0&&this._setTargetSubData(g,r,this._targetStrideBytes(g),t,u,n[g]),m.release(f[g])}}writeInstanceRangeMetal(t,e,r){const{targetBuffers:o}=this,s={},n={};let a=0;for(const u of o)s[u]=t[u].numElements*this._targetStrideBytes(u),n[u]=a,a+=s[u];const f=S(a),i={};for(const u of o)i[u]=this._targetLayout(u)?.createView(f.buffer,n[u]);f.fill(0,0,a);for(const u of e){const e=u.targetRanges.geometry;if(!(e.from>=t.geometry.from&&e.to<=t.geometry.to))continue;const r={},s={};for(const n of o){const e=u.targetRanges[n];r[n]=e.from-t[n].from,s[n]=e}this._writeGeometry(u.geometry,i,r,s)}for(const u of o)t[u].numElements>0&&this._setTargetSubData(u,r,this._targetStrideBytes(u),t[u],f,n[u])}rebuildInstances(t,e,r){const{targetBuffers:o}=this,s={},n={},a={};let f=0;for(const c of o)s[c]=t[c]*this._targetStrideBytes(c),n[c]=f,f+=s[c],a[c]=0;const i=S(f),u={};for(const c of o)u[c]=this._targetLayout(c)?.createView(i.buffer,n[c]);for(const c of e){const t={},e={};for(const r of o){t[r]=a[r],a[r]+=this.elementCount(c.geometry.geometry,r);const o=c.targetRanges[r];o.from=t[r],o.to=a[r],e[r]=o}this._writeGeometry(c.geometry,u,t,e)}for(const c of o){const t=m.acquire(0,a[c]);this._setTargetSubData(c,r,this._targetStrideBytes(c),t,i,n[c]),m.release(t)}return a}updateInstance(t,e){const{targetBuffers:r}=this,o={},s={};let n=0;for(const u of r){const e=this._targetStrideBytes(u);o[u]=this.elementCount(t.geometry.geometry,u)*e,s[u]=n,n+=o[u]}const a=S(n),f={},i={};for(const u of r)i[u]=0,f[u]=this._targetLayout(u)?.createView(a.buffer,s[u]);this._writeGeometry(t.geometry,f,i,t.targetRanges);for(const u of r)this._setTargetSubData(u,e,this._targetStrideBytes(u),t.targetRanges[u],a,s[u])}updateInstancesMetal(t){const{targetBuffers:e}=this;for(const[r,o]of t){const t={};for(const r of e)t[r]=m.acquire(1/0,-1/0);for(const r of o)for(const o of e){const e=t[o],s=r.targetRanges[o];e.from=Math.min(e.from,s.from),e.to=Math.max(e.to,s.to)}this.writeInstanceRangeMetal(t,r.instances.values(),r);for(const r of e)m.release(t[r])}}_writeGeometry(t,e,n,a){const{_bufferWriter:f}=this;null!=f&&(r(B,t.transformation),B[12]-=t.localOrigin.vec3[0],B[13]-=t.localOrigin.vec3[1],B[14]-=t.localOrigin.vec3[2],o(_,B),s(_,_),f.write(B,_,t.geometry.attributes,t.geometry.olidColor,e.geometry,n.geometry,a.texture),null!=e.texture&&f.writeTextureBuffer&&f.writeTextureBuffer(B,_,t.geometry.attributes,e.texture,n.texture))}_setTargetSubData(t,e,r,o,s,n=0){if("geometry"===t){const a=e.getTargetBuffer(t);a?.setSubData(s,o.from*r,n,o.numElements*r)}else if("texture"===t){const r=e.getTargetBuffer(t);r?.setSubData(s.buffer,o.from,n,o.numElements)}}static prune(){w=new Uint8Array(b)}}const B=n(),_=n(),b=262144,d=1024,x=16777216;let w=new Uint8Array(b);function S(t){return w.byteLength<t&&(w=new Uint8Array(t)),w}function v(e){return e<=d?d:e<b?t(e):Math.max(Math.min(Math.ceil(1.5*e/b)*b,x),e)}export{y as VaoWriter};
2
+ import{nextHighestPowerOfTwo as t}from"../../../../../core/mathUtils.js";import{disposeMaybe as e}from"../../../../../core/maybe.js";import{copy as r,invert as o,transpose as s}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as n}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{glLayout as a}from"../../../support/buffer/glUtil.js";import{VertexArrayObject as f}from"../../lib/VertexArrayObject.js";import{getMaxItemCount as i,getMaxByteSize as u}from"../../lib/TextureBackedBuffer/TextureBackedBufferUtils.js";import{TextureBuffer as c}from"../../lib/TextureBackedBuffer/TextureBuffer.js";import{bufferRangePool as m}from"./BufferRange.js";import{DrawCommand as l}from"./DrawCommand.js";import{BaseInstanceData as g}from"./PerBaseInstanceData.js";import{VertexBuffer as h}from"../../../../webgl/VertexBuffer.js";class y{constructor(t,e){this._rctx=e;const r=t.createBufferWriter();this._bufferWriter=r,this._vaoCache=e.getVaoCache(a(r.layout));const o=["geometry"];"textureBufferLayout"in r&&null!=r.textureBufferLayout&&o.push("texture"),this.targetBuffers=o}maxElements(t){if("texture"===t){const t=this._targetLayout("texture");return null==t?0:i(this._rctx,t)}return Math.floor(x/this._targetStrideBytes(t))}_targetStrideBytes(t){return this._targetLayout(t)?.stride??0}_targetLayout(t){return"geometry"===t?this._bufferWriter.layout:"baseInstance"===t?this._bufferWriter.baseInstanceLayout:this._bufferWriter.textureBufferLayout}evaluateBufferAllocation(t,e,r,o){const s=this._targetStrideBytes("geometry"),n=e.reduce((t,{geometry:e})=>t+this.vertexElementCount(e),0),a=r.reduce((t,{geometry:e})=>t+this.vertexElementCount(e),0),f=Math.min((t+n-a)*s,x),i=o.vao?.buffer("geometry"),u=i?.sizeBytes??0;return f>b&&f<u/2?0:f>u?1:2}deleteBuffer(t){if(t.isInstanced)return t.instancedCommandVAOs?.dispose(),t.vao?.buffer("geometry")?.dispose(),t.vao?.disposeVAOOnly(),void(t.vao=null);this._vaoCache.deleteVao(t.vao),t.vaoEndElement=0,t.textureBuffer=e(t.textureBuffer),t.textureEndElement=0}createBaseInstanceData(t){const{_bufferWriter:e}=this;if(null==t||null==e.baseInstanceLayout||null==e.writeBaseInstance||null==e.elementCountBaseInstance)return null;const r=this._targetLayout("baseInstance"),o=e.elementCountBaseInstance(t.attributes),s=o*r.stride,n=new h(this._rctx,a(r));n.setSize(Math.ceil(s));const f=S(s),i=r.createView(f.buffer);e.writeBaseInstance(t.attributes,i),n.setSubData(f,0,0,s);const u=new l;return u.first=0,u.count=o,new g(t,n,u)}_allocateInstanceBuffer(t){const e=this._bufferWriter.layout,r=t*this._targetStrideBytes("geometry"),o=new h(this._rctx,a(e,1));return o.setSize(I(r)),o}_createInstancedVao(t,e){return new f(this._rctx,new Map([["baseInstance",t],["geometry",e]]))}reallocateBuffer(t,e,r){if(this.deleteBuffer(e),null!=t){const o=t.baseInstanceBuffer,s=this._allocateInstanceBuffer(r.geometry);e.vao=this._createInstancedVao(o,s)}else{const t=r.geometry*this._targetStrideBytes("geometry");e.vao=this._vaoCache.newVao(I(t))}const o=this._targetLayout("texture");if(null!=o){const t=I(r.texture*o.stride),s=Math.ceil(t/o.stride);e.textureBuffer=new c(this._rctx,o,s)}e.vaoEndElement=Math.floor((e.vao?.getByteLength("geometry")??0)/this._targetStrideBytes("geometry")),e.textureEndElement=e.textureBuffer?.itemCount??0}elementCount(t,e){const{attributes:r}=t;return"geometry"===e?this._bufferWriter.elementCount(r):"baseInstance"===e?this._bufferWriter.elementCountBaseInstance?.(r)??0:this._bufferWriter.elementCountTextureBuffer?.(r)??0}vertexElementCount(t){return this._bufferWriter.elementCount(t.attributes)}textureElementCount(t){return this._bufferWriter.elementCountTextureBuffer?.(t.attributes)??0}canGrow(t,e){const r=this.targetBuffers.map(r=>this._evaluateTargetBufferGrowth(r,t,e));return r.every(({canGrow:t})=>t)&&r.some(({needsToGrow:t})=>t)}_evaluateTargetBufferGrowth(t,e,r){const o=this._targetLayout(t),s=e.getTargetBuffer(t);if(null==o||null==s)return{needsToGrow:null!=o,canGrow:!0};return{needsToGrow:r[t]*o.stride>s.sizeBytes,canGrow:"geometry"===t?s.sizeBytes<I(x-b):s.sizeBytes<u(this._rctx,o)}}clearHoles(t,e){for(const r of this.targetBuffers){const o=this._targetStrideBytes(r),s=t[r],n=s.reduce((t,e)=>Math.max(t,e.numElements),0)*o,a=S(n);a.fill(0,0,n);for(const t of s)this._setTargetSubData(r,e,o,t,a)}}clearHolesMetal(t,e,r){const{targetBuffers:o}=this,s={};let n=0;for(const i of o){const t=e[i].numElements*this._targetStrideBytes(i);s[i]=n,n+=v(t)}const a=S(n);a.fill(0,0,n);const f={};for(const i of o)f[i]=this._targetLayout(i)?.createView(a.buffer,s[i]);for(const i of t){const t=i.targetRanges.geometry;if(!(t.from>=e.geometry.from&&t.to<=e.geometry.to))continue;const r={};for(const s of o)r[s]=i.targetRanges[s].from-e[s].from;this._writeGeometry(i.geometry,f,r,i.targetRanges)}for(const i of o)this._setTargetSubData(i,r,this._targetStrideBytes(i),e[i],a,s[i])}writeRandomInstances(t,e,r){const{targetBuffers:o}=this,s={},n={},a={},f={};let i=0;for(const l of o)s[l]=t[l]*this._targetStrideBytes(l),n[l]=i,a[l]=0,f[l]=m.acquire(0,0),i+=v(s[l]);const u=S(i),c={};for(const m of o)c[m]=this._targetLayout(m)?.createView(u.buffer,n[m]);for(const m of e){for(const t of o){const e=m.targetRanges[t],o=f[t];o.to===e.from||(o.numElements>0&&this._setTargetSubData(t,r,this._targetStrideBytes(t),f[t],u,n[t]),o.from=e.from,a[t]=0)}this._writeGeometry(m.geometry,c,a,m.targetRanges);for(const t of o){const e=m.targetRanges[t];a[t]+=e.numElements,f[t].to=e.to}}for(const l of o){const t=f[l];t.numElements>0&&this._setTargetSubData(l,r,this._targetStrideBytes(l),t,u,n[l]),m.release(f[l])}}writeInstanceRangeMetal(t,e,r){const{targetBuffers:o}=this,s={},n={};let a=0;for(const u of o)s[u]=t[u].numElements*this._targetStrideBytes(u),n[u]=a,a+=v(s[u]);const f=S(a),i={};for(const u of o)i[u]=this._targetLayout(u)?.createView(f.buffer,n[u]);f.fill(0,0,a);for(const u of e){const e=u.targetRanges.geometry;if(!(e.from>=t.geometry.from&&e.to<=t.geometry.to))continue;const r={},s={};for(const n of o){const e=u.targetRanges[n];r[n]=e.from-t[n].from,s[n]=e}this._writeGeometry(u.geometry,i,r,s)}for(const u of o)t[u].numElements>0&&this._setTargetSubData(u,r,this._targetStrideBytes(u),t[u],f,n[u])}rebuildInstances(t,e,r){const{targetBuffers:o}=this,s={},n={},a={};let f=0;for(const c of o)s[c]=t[c]*this._targetStrideBytes(c),n[c]=f,f+=v(s[c]),a[c]=0;const i=S(f),u={};for(const c of o)u[c]=this._targetLayout(c)?.createView(i.buffer,n[c]);for(const c of e){const t={},e={};for(const r of o){t[r]=a[r],a[r]+=this.elementCount(c.geometry.geometry,r);const o=c.targetRanges[r];o.from=t[r],o.to=a[r],e[r]=o}this._writeGeometry(c.geometry,u,t,e)}for(const c of o){const t=m.acquire(0,a[c]);this._setTargetSubData(c,r,this._targetStrideBytes(c),t,i,n[c]),m.release(t)}return a}updateInstance(t,e){const{targetBuffers:r}=this,o={},s={};let n=0;for(const u of r){const e=this._targetStrideBytes(u);o[u]=this.elementCount(t.geometry.geometry,u)*e,s[u]=n,n+=v(o[u])}const a=S(n),f={},i={};for(const u of r)i[u]=0,f[u]=this._targetLayout(u)?.createView(a.buffer,s[u]);this._writeGeometry(t.geometry,f,i,t.targetRanges);for(const u of r)this._setTargetSubData(u,e,this._targetStrideBytes(u),t.targetRanges[u],a,s[u])}updateInstancesMetal(t){const{targetBuffers:e}=this;for(const[r,o]of t){const t={};for(const r of e)t[r]=m.acquire(1/0,-1/0);for(const r of o)for(const o of e){const e=t[o],s=r.targetRanges[o];e.from=Math.min(e.from,s.from),e.to=Math.max(e.to,s.to)}this.writeInstanceRangeMetal(t,r.instances.values(),r);for(const r of e)m.release(t[r])}}_writeGeometry(t,e,n,a){const{_bufferWriter:f}=this;null!=f&&(r(B,t.transformation),B[12]-=t.localOrigin.vec3[0],B[13]-=t.localOrigin.vec3[1],B[14]-=t.localOrigin.vec3[2],o(_,B),s(_,_),f.write(B,_,t.geometry.attributes,t.geometry.olidColor,e.geometry,n.geometry,a.texture),null!=e.texture&&f.writeTextureBuffer&&f.writeTextureBuffer(B,_,t.geometry.attributes,e.texture,n.texture))}_setTargetSubData(t,e,r,o,s,n=0){if("geometry"===t){const a=e.getTargetBuffer(t);a?.setSubData(s,o.from*r,n,o.numElements*r)}else if("texture"===t){const r=e.getTargetBuffer(t);r?.setSubData(s.buffer,o.from,n,o.numElements)}}static prune(){w=new Uint8Array(b)}}const B=n(),_=n(),b=262144,d=1024,x=16777216;let w=new Uint8Array(b);function S(t){return w.byteLength<t&&(w=new Uint8Array(t)),w}function v(t){return 4*Math.ceil(t/4)}function I(e){return e<=d?d:e<b?t(e):Math.max(Math.min(Math.ceil(1.5*e/b)*b,x),e)}export{y as VaoWriter};
@@ -161,7 +161,7 @@ export function fromRenderCoordinates<T1 extends ArrayLike<number>, T2 extends A
161
161
  * * Y: Northing
162
162
  * * Z: Elevation
163
163
  *
164
- * ![externalRenderers-renderCoordinateTransformAt](https://developers.arcgis.com/javascript/latest/assets/img/apiref/views/3d/externalRenderers-renderCoordinateTransformAt.png)
164
+ * ![externalRenderers-renderCoordinateTransformAt](https://developers.arcgis.com/javascript/latest/assets/images/apiref/views/3d/externalRenderers-renderCoordinateTransformAt.png)
165
165
  *
166
166
  * When [view.viewingMode](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#viewingMode) is `global`, a linear
167
167
  * transformation does not take the curvature of the globe or other non-linear projection aspects into account. Thus,
@@ -8,19 +8,19 @@ export interface MagnifierProperties extends Partial<Pick<Magnifier, "factor" |
8
8
  * as a magnified image. An instance of this class can be accessed through
9
9
  * either [MapView.magnifier](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#magnifier) or [SceneView.magnifier](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#magnifier).
10
10
  *
11
- * ![magnifier-overlay](https://developers.arcgis.com/javascript/latest/assets/img/apiref/views/magnifier/magnifier-overlay.png)
11
+ * ![magnifier-overlay](https://developers.arcgis.com/javascript/latest/assets/images/apiref/views/magnifier/magnifier-overlay.png)
12
12
  *
13
13
  * As you can see in the screenshot above, the Magnifier utilizes a default overlay image of a magnifier
14
14
  * glass. The overlay image is set using the [overlayUrl](https://developers.arcgis.com/javascript/latest/references/core/views/Magnifier/#overlayUrl) property. You can disable the overlay image by setting the [overlayEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/Magnifier/#overlayEnabled) to `false`. The following
15
15
  * demonstrates using a Magnifier without an overlay image.
16
16
  *
17
- * ![magnifier-no-overlay](https://developers.arcgis.com/javascript/latest/assets/img/apiref/views/magnifier/magnifier-no-overlay.png)
17
+ * ![magnifier-no-overlay](https://developers.arcgis.com/javascript/latest/assets/images/apiref/views/magnifier/magnifier-no-overlay.png)
18
18
  *
19
19
  * The Magnifier contains a default mask image, which is set using the [maskUrl](https://developers.arcgis.com/javascript/latest/references/core/views/Magnifier/#maskUrl), and determines the visible area of the magnified image. Be default, the magnified area
20
20
  * is in the shape of a circle. The following demonstrates an example of a mask image set in the shape of a square. Note that the `overlayEnabled` was set
21
21
  * to `false` in this example as well to hide the overlay image, and only display the magnified area.
22
22
  *
23
- * ![magnifier-maskUrl](https://developers.arcgis.com/javascript/latest/assets/img/apiref/views/magnifier/magnifier-maskUrl.png)
23
+ * ![magnifier-maskUrl](https://developers.arcgis.com/javascript/latest/assets/images/apiref/views/magnifier/magnifier-maskUrl.png)
24
24
  *
25
25
  * @since 4.19
26
26
  * @see [MapView.magnifier](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#magnifier)
@@ -247,7 +247,7 @@ export interface MapViewProperties extends View2DProperties {}
247
247
  * is set to `true` (default). To enable zooming in MapView, `view.constraints.snapToZoom` must be set to `false` (default is `true`).
248
248
  * Please see [GamepadInputDevice](https://developers.arcgis.com/javascript/latest/references/core/views/input/gamepad/GamepadInputDevice/) for supported devices.
249
249
  *
250
- * ![Gamepad](https://developers.arcgis.com/javascript/latest/assets/img/apiref/views/input/standard-gamepad.png)
250
+ * ![Gamepad](https://developers.arcgis.com/javascript/latest/assets/images/apiref/views/input/standard-gamepad.png)
251
251
  *
252
252
  * Gamepad Action | MapView behavior
253
253
  * ------|------------
@@ -258,11 +258,11 @@ export interface MapViewProperties extends View2DProperties {}
258
258
  *
259
259
  * Action Image | SpaceMouse Action | MapView behavior
260
260
  * ------|------|------------
261
- * ![3DMousePan](https://developers.arcgis.com/javascript/latest/assets/img/apiref/views/input/3dmouse-pan.png) | Push (left/right/forward/backward) | Pan the view
262
- * ![3DMousePan](https://developers.arcgis.com/javascript/latest/assets/img/apiref/views/input/pull-up.png) | Pull up | Zoom out
263
- * ![3DMousePan](https://developers.arcgis.com/javascript/latest/assets/img/apiref/views/input/push-down.png) | Push down | Zoom in
264
- * ![3DMousePan](https://developers.arcgis.com/javascript/latest/assets/img/apiref/views/input/rotate-clockwise.png) | Rotate clockwise | Rotate the view clockwise
265
- * ![3DMousePan](https://developers.arcgis.com/javascript/latest/assets/img/apiref/views/input/rotate-counterclockwise.png) | Rotate counterclockwise | Rotate the view counterclockwise
261
+ * ![3DMousePan](https://developers.arcgis.com/javascript/latest/assets/images/apiref/views/input/3dmouse-pan.png) | Push (left/right/forward/backward) | Pan the view
262
+ * ![3DMousePan](https://developers.arcgis.com/javascript/latest/assets/images/apiref/views/input/pull-up.png) | Pull up | Zoom out
263
+ * ![3DMousePan](https://developers.arcgis.com/javascript/latest/assets/images/apiref/views/input/push-down.png) | Push down | Zoom in
264
+ * ![3DMousePan](https://developers.arcgis.com/javascript/latest/assets/images/apiref/views/input/rotate-clockwise.png) | Rotate clockwise | Rotate the view clockwise
265
+ * ![3DMousePan](https://developers.arcgis.com/javascript/latest/assets/images/apiref/views/input/rotate-counterclockwise.png) | Rotate counterclockwise | Rotate the view counterclockwise
266
266
  *
267
267
  * To disable gamepad navigation, you can set `view.navigation.gamepad.enabled` to `false`.
268
268
  *
@@ -295,7 +295,7 @@ export interface MapViewProperties extends View2DProperties {}
295
295
  * to user interaction without delay. The [@click](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#event-click) event is only triggered after making sure that the
296
296
  * user doesn't click a second time (in which case it would trigger a [@double-click](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#event-double-click) event).
297
297
  *
298
- * ![Various events](https://developers.arcgis.com/javascript/latest/assets/img/apiref/views/events.png "Click and double-click events")
298
+ * ![Various events](https://developers.arcgis.com/javascript/latest/assets/images/apiref/views/events.png "Click and double-click events")
299
299
  *
300
300
  * In the case of a double-click, the same event chain is repeated after the first click. However, if the user clicks
301
301
  * a second time within a close time range, then the [@click](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/#event-click) event is not emitted anymore, but the
@@ -180,7 +180,7 @@ export interface SceneViewProperties extends ViewProperties, DOMContainerPropert
180
180
  *
181
181
  * The `clippingArea` property only applies to [local](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#viewingMode) scenes.
182
182
  *
183
- * ![scene-clipping-area](https://developers.arcgis.com/javascript/latest/assets/img/apiref/views/scene-clipping-area.png "Local scene with clippingArea")
183
+ * ![scene-clipping-area](https://developers.arcgis.com/javascript/latest/assets/images/apiref/views/scene-clipping-area.png "Local scene with clippingArea")
184
184
  *
185
185
  * The clippingArea property contains an internal reference which may be modified in the future. To persist or
186
186
  * modify the clippingArea, create a clone using [clippingArea.clone()](https://developers.arcgis.com/javascript/latest/references/core/geometry/Extent/#clone).
@@ -328,8 +328,8 @@ export interface SceneViewProperties extends ViewProperties, DOMContainerPropert
328
328
  *
329
329
  * Value | Example | Description
330
330
  * ------|-------|------------
331
- * global | ![scene-global](https://developers.arcgis.com/javascript/latest/assets/img/apiref/views/scene-global.png) | Global scenes allow the entire globe to render in the view, showing the curvature of the earth.
332
- * local | ![scene-local](https://developers.arcgis.com/javascript/latest/assets/img/apiref/views/scene-local.png) | Local scenes render the earth on a flat surface. They can be constrained to only show a "local" area by setting the [clippingArea](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#clippingArea) property. Local scenes also allow for displaying and exploring data that would otherwise be hidden by the surface of the earth.
331
+ * global | ![scene-global](https://developers.arcgis.com/javascript/latest/assets/images/apiref/views/scene-global.png) | Global scenes allow the entire globe to render in the view, showing the curvature of the earth.
332
+ * local | ![scene-local](https://developers.arcgis.com/javascript/latest/assets/images/apiref/views/scene-local.png) | Local scenes render the earth on a flat surface. They can be constrained to only show a "local" area by setting the [clippingArea](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#clippingArea) property. Local scenes also allow for displaying and exploring data that would otherwise be hidden by the surface of the earth.
333
333
  *
334
334
  * Depending on the viewing mode different [supported coordinate systems](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#supported-coordinate-systems) are available.
335
335
  *
@@ -377,7 +377,7 @@ export interface SceneViewProperties extends ViewProperties, DOMContainerPropert
377
377
  * for [MapView](https://developers.arcgis.com/javascript/latest/references/core/views/MapView/). For a general overview of views,
378
378
  * see [View](https://developers.arcgis.com/javascript/latest/references/core/views/View/).
379
379
  *
380
- * ![Various scenes](https://developers.arcgis.com/javascript/latest/assets/img/apiref/views/scene-mosaic.png "Various example scenes")
380
+ * ![Various scenes](https://developers.arcgis.com/javascript/latest/assets/images/apiref/views/scene-mosaic.png "Various example scenes")
381
381
  *
382
382
  * For a map to be visible to the user in the DOM, a SceneView must have both a
383
383
  * valid [Map instance](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#map) and a [DOM element](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#container) with a non-zero
@@ -502,7 +502,7 @@ export interface SceneViewProperties extends ViewProperties, DOMContainerPropert
502
502
  * <details>
503
503
  * <summary>Read More</summary>
504
504
  *
505
- * ![Gamepad](https://developers.arcgis.com/javascript/latest/assets/img/apiref/views/input/standard-gamepad.png)
505
+ * ![Gamepad](https://developers.arcgis.com/javascript/latest/assets/images/apiref/views/input/standard-gamepad.png)
506
506
  *
507
507
  * Gamepad Action | SceneView behavior
508
508
  * ------|------------
@@ -513,12 +513,12 @@ export interface SceneViewProperties extends ViewProperties, DOMContainerPropert
513
513
  *
514
514
  * Action Image | SpaceMouse Action | SceneView behavior
515
515
  * -------|------|------------
516
- * ![3DMousePan](https://developers.arcgis.com/javascript/latest/assets/img/apiref/views/input/3dmouse-pan.png) | Push (left/right/forward/backward)| Pan
517
- * ![3DMousePan](https://developers.arcgis.com/javascript/latest/assets/img/apiref/views/input/pull-up.png) | Pull up | Ascend
518
- * ![3DMousePan](https://developers.arcgis.com/javascript/latest/assets/img/apiref/views/input/push-down.png) | Push down | Descend
519
- * ![3DMousePan](https://developers.arcgis.com/javascript/latest/assets/img/apiref/views/input/rotate-clockwise.png) | Rotate clockwise | Rotate the view clockwise
520
- * ![3DMousePan](https://developers.arcgis.com/javascript/latest/assets/img/apiref/views/input/rotate-counterclockwise.png) | Rotate counterclockwise | Rotate the view counterclockwise
521
- * ![3DMousePan](https://developers.arcgis.com/javascript/latest/assets/img/apiref/views/input/tilt.png) | Tilt | Tilt the scene
516
+ * ![3DMousePan](https://developers.arcgis.com/javascript/latest/assets/images/apiref/views/input/3dmouse-pan.png) | Push (left/right/forward/backward)| Pan
517
+ * ![3DMousePan](https://developers.arcgis.com/javascript/latest/assets/images/apiref/views/input/pull-up.png) | Pull up | Ascend
518
+ * ![3DMousePan](https://developers.arcgis.com/javascript/latest/assets/images/apiref/views/input/push-down.png) | Push down | Descend
519
+ * ![3DMousePan](https://developers.arcgis.com/javascript/latest/assets/images/apiref/views/input/rotate-clockwise.png) | Rotate clockwise | Rotate the view clockwise
520
+ * ![3DMousePan](https://developers.arcgis.com/javascript/latest/assets/images/apiref/views/input/rotate-counterclockwise.png) | Rotate counterclockwise | Rotate the view counterclockwise
521
+ * ![3DMousePan](https://developers.arcgis.com/javascript/latest/assets/images/apiref/views/input/tilt.png) | Tilt | Tilt the scene
522
522
  *
523
523
  * To disable gamepad navigation, you can set `view.navigation.gamepad.enabled` to `false`.
524
524
  *
@@ -625,7 +625,7 @@ export interface SceneViewProperties extends ViewProperties, DOMContainerPropert
625
625
  * <span id="viewing-modes"></span>
626
626
  * ## Viewing modes
627
627
  *
628
- * ![global vs local](https://developers.arcgis.com/javascript/latest/assets/img/apiref/views/scene-global-vs-local.png "Showing global scene vs local scene")
628
+ * ![global vs local](https://developers.arcgis.com/javascript/latest/assets/images/apiref/views/scene-global-vs-local.png "Showing global scene vs local scene")
629
629
  *
630
630
  * The SceneView supports two different viewing modes, `global` (left picture above) and `local` (right picture above),
631
631
  * specified by the [viewingMode](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#viewingMode) property. Global scenes render the
@@ -722,7 +722,7 @@ export interface SceneViewProperties extends ViewProperties, DOMContainerPropert
722
722
  * to user interaction without delay. The [@click](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#event-click) event is only triggered after making sure that the
723
723
  * user doesn't click a second time (in which case it would trigger a [@double-click](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#event-double-click) event).
724
724
  *
725
- * ![Various events](https://developers.arcgis.com/javascript/latest/assets/img/apiref/views/events.png "Click and double-click events")
725
+ * ![Various events](https://developers.arcgis.com/javascript/latest/assets/images/apiref/views/events.png "Click and double-click events")
726
726
  *
727
727
  * In the case of a double-click, the same event chain is repeated after the first click. However, if the user clicks
728
728
  * a second time within a close time range, then the [@click](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#event-click) event is not emitted anymore, but the
@@ -966,7 +966,7 @@ export default class SceneView extends SceneViewSuperclass {
966
966
  *
967
967
  * The `clippingArea` property only applies to [local](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#viewingMode) scenes.
968
968
  *
969
- * ![scene-clipping-area](https://developers.arcgis.com/javascript/latest/assets/img/apiref/views/scene-clipping-area.png "Local scene with clippingArea")
969
+ * ![scene-clipping-area](https://developers.arcgis.com/javascript/latest/assets/images/apiref/views/scene-clipping-area.png "Local scene with clippingArea")
970
970
  *
971
971
  * The clippingArea property contains an internal reference which may be modified in the future. To persist or
972
972
  * modify the clippingArea, create a clone using [clippingArea.clone()](https://developers.arcgis.com/javascript/latest/references/core/geometry/Extent/#clone).
@@ -1207,8 +1207,8 @@ export default class SceneView extends SceneViewSuperclass {
1207
1207
  *
1208
1208
  * Value | Example | Description
1209
1209
  * ------|-------|------------
1210
- * global | ![scene-global](https://developers.arcgis.com/javascript/latest/assets/img/apiref/views/scene-global.png) | Global scenes allow the entire globe to render in the view, showing the curvature of the earth.
1211
- * local | ![scene-local](https://developers.arcgis.com/javascript/latest/assets/img/apiref/views/scene-local.png) | Local scenes render the earth on a flat surface. They can be constrained to only show a "local" area by setting the [clippingArea](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#clippingArea) property. Local scenes also allow for displaying and exploring data that would otherwise be hidden by the surface of the earth.
1210
+ * global | ![scene-global](https://developers.arcgis.com/javascript/latest/assets/images/apiref/views/scene-global.png) | Global scenes allow the entire globe to render in the view, showing the curvature of the earth.
1211
+ * local | ![scene-local](https://developers.arcgis.com/javascript/latest/assets/images/apiref/views/scene-local.png) | Local scenes render the earth on a flat surface. They can be constrained to only show a "local" area by setting the [clippingArea](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#clippingArea) property. Local scenes also allow for displaying and exploring data that would otherwise be hidden by the surface of the earth.
1212
1212
  *
1213
1213
  * Depending on the viewing mode different [supported coordinate systems](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#supported-coordinate-systems) are available.
1214
1214
  *
package/views/View.d.ts CHANGED
@@ -221,7 +221,7 @@ export type ViewEvents = SceneViewEventTypes;
221
221
  *
222
222
  * | MapView (2D) | SceneView (3D) |
223
223
  * |--------------|----------------|
224
- * | [![mapview](https://developers.arcgis.com/javascript/latest/assets/img/apiref/views/mapview.png)](https://developers.arcgis.com/javascript/latest/sample-code/intro-mapview/) | [![sceneview](https://developers.arcgis.com/javascript/latest/assets/img/apiref/views/sceneview.png)](https://developers.arcgis.com/javascript/latest/sample-code/intro-sceneview/) |
224
+ * | [![mapview](https://developers.arcgis.com/javascript/latest/assets/images/apiref/views/mapview.png)](https://developers.arcgis.com/javascript/latest/sample-code/intro-mapview/) | [![sceneview](https://developers.arcgis.com/javascript/latest/assets/images/apiref/views/sceneview.png)](https://developers.arcgis.com/javascript/latest/sample-code/intro-sceneview/) |
225
225
  *
226
226
  * To associate a view with a map, you must set the [map](https://developers.arcgis.com/javascript/latest/references/core/views/View/#map) property to an instance of [Map](https://developers.arcgis.com/javascript/latest/references/core/Map/).
227
227
  *
@@ -319,7 +319,7 @@ export default abstract class View<TLayerView extends LayerView = LayerView> ext
319
319
  /**
320
320
  * The array of attribution items to be displayed in the view's attribution.
321
321
  *
322
- * ![attribution](https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/attribution.png)
322
+ * ![attribution](https://developers.arcgis.com/javascript/latest/assets/images/apiref/widgets/attribution.png)
323
323
  *
324
324
  * @since 5.0
325
325
  */
@@ -7,7 +7,7 @@ export interface SketchLabelOptionsProperties extends Partial<Pick<SketchLabelOp
7
7
  * segment of a graphic while sketching and editing. The labels display each segment's
8
8
  * horizontal length and are not shown for non-planar polygons and polylines.
9
9
  *
10
- * [![sketch-3d](https://developers.arcgis.com/javascript/latest/assets/img/apiref/views/interactive/sketch/sketchlabels.png)](https://developers.arcgis.com/javascript/latest/sample-code/sketch-3d/)
10
+ * [![sketch-3d](https://developers.arcgis.com/javascript/latest/assets/images/apiref/views/interactive/sketch/sketchlabels.png)](https://developers.arcgis.com/javascript/latest/sample-code/sketch-3d/)
11
11
  *
12
12
  * How the segment lengths are computed depends on the view's spatial reference. In geographic coordinate systems (GCS)
13
13
  * and in Web Mercator, the lengths are computed geodetically. In projected coordinate systems (PCS),
@@ -15,7 +15,7 @@ export interface SketchTooltipOptionsProperties extends Partial<Pick<SketchToolt
15
15
  * To enter the tooltip UI's [input mode](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/sketch/SketchTooltipOptions/#inputEnabled),
16
16
  * press the `Tab` key while drawing a new feature, or when editing a point, mesh, or a selected vertex.
17
17
  *
18
- * [![sketch-3d-with-constraints](https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/editor/editing-constraints.gif)](https://developers.arcgis.com/javascript/latest/sample-code/sketch-3d/)
18
+ * [![sketch-3d-with-constraints](https://developers.arcgis.com/javascript/latest/assets/images/apiref/widgets/editor/editing-constraints.gif)](https://developers.arcgis.com/javascript/latest/sample-code/sketch-3d/)
19
19
  *
20
20
  * #### Available tooltip inputs and constraints
21
21
  *
@@ -19,15 +19,15 @@ export interface SnappingOptionsProperties extends Partial<Pick<SnappingOptions,
19
19
  * #### Self snapping (Geometry guides)
20
20
  * Self snapping is set via the [selfEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/snapping/SnappingOptions/#selfEnabled) property. This means that while a user is actively creating or updating a feature or graphic, they will see visualizations to help identify perpendicular and parallel lines, in addition to visualizations which aid in snapping to an extension of an existing feature. The following briefly demonstrates what self snapping looks like in a 2D application. Although this is shown for 2D, the same premise applies for 3D as well.
21
21
  *
22
- * ![self-snapping](https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/sketch/snapping-self-2d.gif)
22
+ * ![self-snapping](https://developers.arcgis.com/javascript/latest/assets/images/apiref/widgets/sketch/snapping-self-2d.gif)
23
23
  * #### Feature snapping
24
24
  * Feature snapping is set via the [featureEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/snapping/SnappingOptions/#featureEnabled) property. It provides the ability to snap vertices of a graphic or feature that is currently being drawn or reshaped to that of an existing feature's vertex, edge, or end point. These existing features belong to layers within the [Map](https://developers.arcgis.com/javascript/latest/references/core/Map/) and must be specified in the [featureSources](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/snapping/SnappingOptions/#featureSources) property. The following two images demonstrate feature snapping in a 2D application. Similar to self snapping, the same premise applies for 3D as well.
25
25
  *
26
- * ![feature-snapping-create](https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/sketch/snapping-feature-2d.gif)
26
+ * ![feature-snapping-create](https://developers.arcgis.com/javascript/latest/assets/images/apiref/widgets/sketch/snapping-feature-2d.gif)
27
27
  *
28
28
  * The above shows feature snapping to an existing feature's vertex endpoint and edge while creating a new feature. The bottom demonstrates taking an existing feature and reshaping its geometry to snap to another feature's vertex points.
29
29
  *
30
- * ![feature-snapping-update](https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/sketch/snapping-reshape-2d.gif)
30
+ * ![feature-snapping-update](https://developers.arcgis.com/javascript/latest/assets/images/apiref/widgets/sketch/snapping-reshape-2d.gif)
31
31
  *
32
32
  * > [!WARNING]
33
33
  * >
@@ -41,10 +41,10 @@ export interface SnappingOptionsProperties extends Partial<Pick<SnappingOptions,
41
41
  *
42
42
  * Name | Details | 3D Example | 2D Example |
43
43
  * ---------|---------|----------|:-----------:|
44
- * Rectangle | Snap lines that are perpendicular to each other | <img alt="Rectangle" src="https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/sketch/snapping-rectangle.png" width="268px"> | <img alt="Rectangle-2d" src="https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/sketch/snapping-rectangle-2d.png" width="268px"> |
45
- * Parallel | Snap to all parallel lines | <img alt="Parallel" src="https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/sketch/snapping-parallel.png" width="268px"> | <img alt="Parallel-2d" src="https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/sketch/snapping-parallel-2.png" width="268px"> |
46
- * Extension | Snap to an extension of the current shape | <img alt="Extension" src="https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/sketch/snapping-extension.png" width="268px"> | <img alt="Extension-2" src="https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/sketch/snapping-extension-2.png" width="268px"> |
47
- * Vertex (as seen when updating geometries)| Snap vertices to an existing vertex | <img alt="Vertex" src="https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/sketch/snapping-vertex-3d.png" width="143px"> | <img alt="Vertex-2" src="https://developers.arcgis.com/javascript/latest/assets/img/apiref/widgets/sketch/snapping-vertex-2.png" width="143px"> |
44
+ * Rectangle | Snap lines that are perpendicular to each other | <img alt="Rectangle" src="https://developers.arcgis.com/javascript/latest/assets/images/apiref/widgets/sketch/snapping-rectangle.png" width="268px"> | <img alt="Rectangle-2d" src="https://developers.arcgis.com/javascript/latest/assets/images/apiref/widgets/sketch/snapping-rectangle-2d.png" width="268px"> |
45
+ * Parallel | Snap to all parallel lines | <img alt="Parallel" src="https://developers.arcgis.com/javascript/latest/assets/images/apiref/widgets/sketch/snapping-parallel.png" width="268px"> | <img alt="Parallel-2d" src="https://developers.arcgis.com/javascript/latest/assets/images/apiref/widgets/sketch/snapping-parallel-2.png" width="268px"> |
46
+ * Extension | Snap to an extension of the current shape | <img alt="Extension" src="https://developers.arcgis.com/javascript/latest/assets/images/apiref/widgets/sketch/snapping-extension.png" width="268px"> | <img alt="Extension-2" src="https://developers.arcgis.com/javascript/latest/assets/images/apiref/widgets/sketch/snapping-extension-2.png" width="268px"> |
47
+ * Vertex (as seen when updating geometries)| Snap vertices to an existing vertex | <img alt="Vertex" src="https://developers.arcgis.com/javascript/latest/assets/images/apiref/widgets/sketch/snapping-vertex-3d.png" width="143px"> | <img alt="Vertex-2" src="https://developers.arcgis.com/javascript/latest/assets/images/apiref/widgets/sketch/snapping-vertex-2.png" width="143px"> |
48
48
  *
49
49
  * @since 4.19
50
50
  * @see [FeatureSnappingLayerSource](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/snapping/FeatureSnappingLayerSource/)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import"../../core/has.js";import t from"../../core/Logger.js";import{throwIfAborted as i}from"../../core/promiseUtils.js";import{watch as r,syncAndInitial as l,on as s}from"../../core/reactiveUtils.js";import{sqlOr as n,sqlIn as o,sqlAnd as a}from"../../core/sql.js";import{property as u,subclass as d}from"../../core/accessorSupport/decorators.js";import{getPopupProvider as f}from"../../graphic/getPopupProvider.js";import{getFeatureIdInfoFieldNames as p}from"../../layers/graphics/data/FeatureIdInfo.js";import{systemIsSpatialFieldName as y}from"../../layers/knowledgeGraph/constants.js";import{getEffectiveDisplayFilter as h}from"../../layers/support/displayFilterUtils.js";import m from"../../layers/support/FeatureEffect.js";import c from"../../layers/support/FeatureFilter.js";import{getSignedInUser as F}from"../../layers/support/featureLayerUtils.js";import{fetchFeaturePopupFeatures as g,loadFeaturePopupArcadeModules as I}from"../../layers/support/featurePopupQueryUtils.js";import{fixFields as b,unpackFieldNames as v,collectLabelingFields as w,collectElevationFields as E,collectFilterFields as x,collectFeatureReductionFields as R,collectOrderByInfos as q,collectFields as j,collectTrackInfoFields as C,collectDisplayFilterFields as O,collectField as _,featureHasFields as k}from"../../layers/support/fieldUtils.js";import{getFloorFilterClause as P}from"../../layers/support/floorFilterUtils.js";import{collectRelativeTimeFields as U}from"../../layers/support/relativeTimeQueryUtils.js";import{getUtilityNetworkFields as T}from"../../networks/support/networkFieldUtils.js";import L from"../../rest/support/Query.js";import{createFeatureIdInfo as S}from"../2d/layers/features/layerAdapters/featureServiceUtils.js";import D from"./LayerView.js";import{getFetchPopupTemplate as Q,getRequiredFields as N}from"./support/popupUtils.js";import{WhereClauseVisitor as G}from"./support/WhereClauseVisitor.js";let B=class extends D{constructor(){super(...arguments),this._updatingRequiredPromise=null,this.filter=null,this.layer=null,this.requiresCurrentUser=!1,this.requiredFields=[],this.view=null}initialize(){this.addHandles([r(()=>{const e=this.layer,t=this.view;return[e&&"elevationInfo"in e?e.elevationInfo?.featureExpressionInfo:null,e&&"displayField"in e?e.displayField:null,e&&"timeInfo"in e&&e.timeInfo,e&&"renderer"in e&&e.renderer,e&&"labelingInfo"in e&&e.labelingInfo,e&&"floorInfo"in e&&e.floorInfo,t?.requiredFieldsOptions?.featureTitleFields&&e&&"featureTitleFields"in e&&e.featureTitleFields,t?.requiredFieldsOptions?.utilityNetworkFields&&T(t,e),e&&"displayFilterInfo"in e&&e.displayFilterInfo,this.displayFilterEnabled,this.filter,this.featureEffect,this.timeExtent,"knowledge-graph-sublayer"===e?.type&&"link-chart"===e.parentCompositeLayer.type&&e.parentCompositeLayer.linkChart?.linkChartProperties.nonspatialDataDisplay?.mode]},()=>this._handleChange(),l),s(()=>this.view?.floors,"change",()=>this._handleChange()),s(()=>(this.layer&&"displayFilterInfo"in this.layer?this.layer.displayFilterInfo:null)?.filters,"change",()=>this._handleChange()),s(()=>this.layer&&"sublayers"in this.layer?this.layer.sublayers:null,"change",()=>this._handleChange())])}get availableFields(){if(!this.layer)return[];const{layer:e,layer:{fieldsIndex:t},requiredFields:i}=this;return"outFields"in e&&e.outFields?b(t,[...v(t,e.outFields),...i]):b(t,i)}get displayFilterEnabled(){return(this.view?.displayFilterEnabled??!0)&&(!("displayFilterEnabled"in this.layer)||(this.layer?.displayFilterEnabled??!0))}get effectiveDisplayFilter(){const e=this.layer;return"displayFilterInfo"in e&&this.displayFilterEnabled&&e.displayFilterInfo?h(e.displayFilterInfo,this.view):null}get effectiveDisplayFilterClause(){const e=this.effectiveDisplayFilter?.where??null;return e&&this.hasHighlight?n(e,o(this.layer.objectIdField,this.highlightIds)):e}get featureEffect(){return this.layer&&"featureEffect"in this.layer?this.layer.featureEffect:null}set featureEffect(e){this._override("featureEffect",e)}get highlightOptions(){}set highlightOptions(e){}get maximumNumberOfFeatures(){return 0}set maximumNumberOfFeatures(e){t.getLogger(this).error("#maximumNumberOfFeatures=","Setting maximum number of features is not supported")}get maximumNumberOfFeaturesExceeded(){return!1}get signedInUser(){return this.layer?.url?F(this.layer.url):Promise.resolve(null)}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference},t=null!=this.filter?this.filter.createQuery(e):new L(e);return"floorInfo"in this.layer&&this.layer.floorInfo&&(t.where=a(t.where,P(this))),this.displayFilterEnabled&&(t.where=a(t.where,this.effectiveDisplayFilter?.where)),null!=this.timeExtent&&(t.timeExtent=null!=t.timeExtent?t.timeExtent.intersection(this.timeExtent):this.timeExtent.clone()),t}createAggregateQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return new L(e)}async fetchPopupFeaturesFromGraphics(e,t){const i=[],r=new Set;for(const s of e){const e=f(s.origin),l=Q(e,{...t,checkPopupEnabled:!0});l&&(i.push(s),r.add(l))}if(0===i.length||0===r.size)return[];const l=await this._createPopupQuery(r,t);return await g(this.layer,i,l,{hasRequiredFields:(e,t)=>this._popupFeatureHasRequiredFields(e,t),...t})}_handleChange(){const e=Promise.all([this._updateRequiredFields(),this._updateClientWhereClauseRequirements()]).then(()=>{});return this._updatingRequiredPromise=e,e.then(()=>{this._updatingRequiredPromise===e&&(this._updatingRequiredPromise=null)}),e}async _updateClientWhereClauseRequirements(){if(!this.layer||!this.view)return;const{layer:e}=this,i=new G(e.fieldsIndex);if(i.visitFilter(this.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"labelingInfo"in e&&i.visitLabelingInfo(e.labelsVisible,e.labelingInfo),"trackInfo"in e&&i.visitTrackInfo(e.trackInfo),"2d"===this.view.type&&(i.visitFilter(this.featureEffect?.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"displayFilterInfo"in e&&i.visitDisplayFilter(this.displayFilterEnabled,e.displayFilterInfo)),"subtype-group"===e.type)for(const t of e.sublayers)i.visitLabelingInfo(t.labelsVisible,t.labelingInfo);"definitionExpression"in e&&"capabilities"in e&&e.capabilities?.query.relativeTimeBinWindow&&i.visitRelativeTimeQuery(e.definitionExpression);try{const e=await i.finish();this._set("requiresCurrentUser",e.requiresCurrentUser)}catch(r){t.getLogger(this).error(r)}}async _updateRequiredFields(){if(!this.layer||!this.view)return;const e="3d"===this.view.type,{layer:i,layer:{fieldsIndex:r}}=this,l="renderer"in i&&i.renderer,s="orderBy"in i&&i.orderBy,n="featureReduction"in i?i.featureReduction:null,o=new Set,a=[l?l.collectRequiredFields(o,r):null,w(o,i),e&&"elevationInfo"in i?E(o,i):null,null!=this.filter?x(o,i,this.filter):null,e||null==this.featureEffect?null:x(o,i,this.featureEffect.filter),!e&&n?R(o,i,n):null,!e&&s?q(o,i,s):null,"definitionExpression"in i&&"capabilities"in i&&i.capabilities?.query.relativeTimeBinWindow?U(o,i.fieldsIndex,i.definitionExpression):null];if("timeInfo"in i&&i.timeInfo&&this.timeExtent&&j(o,i.fieldsIndex,[i.timeInfo.startField,i.timeInfo.endField]),"timeInfo"in i&&i.timeInfo&&"trackInfo"in i&&i.trackInfo){const{trackInfo:e}=i;j(o,i.fieldsIndex,[i.timeInfo.trackIdField]),"feature"!==i.type&&"startTimeField"!==e.timeField||j(o,i.fieldsIndex,[i.timeInfo.startField]),"endTimeField"===e.timeField&&j(o,i.fieldsIndex,[i.timeInfo.endField]),await C(o,i)}if("floorInfo"in i&&i.floorInfo&&j(o,i.fieldsIndex,[i.floorInfo.floorField]),"featureTitleFields"in i&&this.view?.requiredFieldsOptions?.featureTitleFields&&i.featureTitleFields&&j(o,i.fieldsIndex,i.featureTitleFields),"feature"===i.type&&i.globalIdField&&this.view?.requiredFieldsOptions?.globalIdField&&j(o,i.fieldsIndex,[i.globalIdField]),this.displayFilterEnabled&&"displayFilterInfo"in i&&a.push(O(o,i,i.displayFilterInfo)),"feature"===i.type&&e&&null!=i.infoFor3D&&(null==i.globalIdField&&t.getLogger(this).error("globalIdField missing on 3DObjectFeatureLayer"),j(o,i.fieldsIndex,[i.globalIdField])),"subtype-group"===i.type){_(o,r,i.subtypeField);const e=i.sublayers.map(e=>Promise.all([e.renderer?.collectRequiredFields(o,r),w(o,e)]));a.push(Promise.all(e))}if("catalog-footprint"===i.type&&i.parent){const e=i.parent;j(o,r,[e.itemNameField,e.itemSourceField,e.itemTypeField,e.maxScaleField,e.minScaleField])}"knowledge-graph-sublayer"===i.type&&"link-chart"===i.parentCompositeLayer.type&&_(o,r,y);const u=await Promise.allSettled(a);if(e)_(o,r,i.objectIdField);else for(const t of p(S(i)))_(o,r,t);e&&"displayField"in i&&i.displayField&&_(o,r,i.displayField);for(const f of u)"rejected"===f.status&&t.getLogger(this).error(f.reason);const d=Array.from(o).sort();this._set("requiredFields",d)}_popupFeatureHasRequiredFields(e,t){return k(e,t)}async _createPopupQuery(e,t){const r=this.layer.createQuery(),l=new Set;let s="point"===this.layer.geometryType;for(const n of e){if(!s){const e=await I(n);i(t),s=(e&&e.arcadeUtils.hasGeometryOperations(n))??!1}const e=await N(this.layer,n);i(t);for(const t of e)l.add(t)}return r.returnGeometry=s,r.returnZ=s,r.returnM=s,r.outFields=Array.from(l),r.outSpatialReference=this.view.spatialReference,"floorInfo"in this.layer&&this.layer.floorInfo&&(r.where=a(r.where,P(this))),r}canResume(){return!!super.canResume()&&(null==this.timeExtent||!this.timeExtent.isEmpty)}getTest(){}get test(){}};e([u()],B.prototype,"_updatingRequiredPromise",void 0),e([u({readOnly:!0})],B.prototype,"availableFields",null),e([u({readOnly:!0})],B.prototype,"displayFilterEnabled",null),e([u({readOnly:!0})],B.prototype,"effectiveDisplayFilter",null),e([u({readOnly:!0})],B.prototype,"effectiveDisplayFilterClause",null),e([u({type:m})],B.prototype,"featureEffect",null),e([u({type:c})],B.prototype,"filter",void 0),e([u()],B.prototype,"layer",void 0),e([u({type:Number})],B.prototype,"maximumNumberOfFeatures",null),e([u({readOnly:!0,type:Boolean})],B.prototype,"maximumNumberOfFeaturesExceeded",null),e([u()],B.prototype,"requiresCurrentUser",void 0),e([u({readOnly:!0})],B.prototype,"requiredFields",void 0),e([u({readOnly:!0})],B.prototype,"signedInUser",null),e([u()],B.prototype,"view",void 0),B=e([d("esri.views.layers.FeatureLikeLayerView")],B);export{B as default};
2
+ import{__decorate as e}from"tslib";import"../../core/has.js";import t from"../../core/Logger.js";import{throwIfAborted as i}from"../../core/promiseUtils.js";import{watch as r,syncAndInitial as l,on as s}from"../../core/reactiveUtils.js";import{sqlOr as n,sqlIn as o,sqlAnd as a}from"../../core/sql.js";import{property as u,subclass as d}from"../../core/accessorSupport/decorators.js";import{getPopupProvider as f}from"../../graphic/getPopupProvider.js";import{getFeatureIdInfoFieldNames as p}from"../../layers/graphics/data/FeatureIdInfo.js";import{systemIsSpatialFieldName as y}from"../../layers/knowledgeGraph/constants.js";import{getEffectiveDisplayFilter as h}from"../../layers/support/displayFilterUtils.js";import m from"../../layers/support/FeatureEffect.js";import c from"../../layers/support/FeatureFilter.js";import{getSignedInUser as F}from"../../layers/support/featureLayerUtils.js";import{fetchFeaturePopupFeatures as g,loadFeaturePopupArcadeModules as I}from"../../layers/support/featurePopupQueryUtils.js";import{fixFields as b,unpackFieldNames as v,collectLabelingFields as w,collectElevationFields as E,collectFilterFields as x,collectFeatureReductionFields as R,collectOrderByInfos as q,collectFields as j,collectTrackInfoFields as C,collectDisplayFilterFields as O,collectField as _,featureHasFields as k}from"../../layers/support/fieldUtils.js";import{getFloorFilterClause as P}from"../../layers/support/floorFilterUtils.js";import{collectRelativeTimeFields as U}from"../../layers/support/relativeTimeQueryUtils.js";import{getUtilityNetworkFields as T}from"../../networks/support/networkFieldUtils.js";import L from"../../rest/support/Query.js";import{createFeatureIdInfo as S}from"../2d/layers/features/layerAdapters/featureServiceUtils.js";import D from"./LayerView.js";import{getFetchPopupTemplate as Q,getRequiredFields as N}from"./support/popupUtils.js";import{WhereClauseVisitor as G}from"./support/WhereClauseVisitor.js";let B=class extends D{constructor(){super(...arguments),this._updatingRequiredPromise=null,this.filter=null,this.layer=null,this.requiresCurrentUser=!1,this.requiredFields=[],this.view=null}initialize(){this.addHandles([r(()=>{const e=this.layer,t=this.view;return[e&&"elevationInfo"in e?e.elevationInfo?.featureExpressionInfo:null,e&&"displayField"in e?e.displayField:null,e&&"timeInfo"in e&&e.timeInfo,e&&"renderer"in e&&e.renderer,e&&"labelingInfo"in e&&e.labelingInfo,e&&"floorInfo"in e&&e.floorInfo,t?.requiredFieldsOptions?.featureTitleFields&&e&&"featureTitleFields"in e&&e.featureTitleFields,t?.requiredFieldsOptions?.utilityNetworkFields&&T(t,e),e&&"displayFilterInfo"in e&&e.displayFilterInfo,this.displayFilterEnabled,this.filter,this.featureEffect,this.timeExtent,"knowledge-graph-sublayer"===e?.type&&"link-chart"===e.parentCompositeLayer.type&&e.parentCompositeLayer.linkChart?.linkChartProperties.nonspatialDataDisplay?.mode]},()=>this._handleChange(),l),s(()=>this.view?.floors,"change",()=>this._handleChange()),s(()=>(this.layer&&"displayFilterInfo"in this.layer?this.layer.displayFilterInfo:null)?.filters,"change",()=>this._handleChange()),s(()=>this.layer&&"sublayers"in this.layer?this.layer.sublayers:null,"change",()=>this._handleChange())])}get availableFields(){if(!this.layer)return[];const{layer:e,layer:{fieldsIndex:t},requiredFields:i}=this;return"outFields"in e&&e.outFields?b(t,[...v(t,e.outFields),...i]):b(t,i)}get displayFilterEnabled(){return(this.view?.displayFilterEnabled??!0)&&(!("displayFilterEnabled"in this.layer)||(this.layer?.displayFilterEnabled??!0))}get effectiveDisplayFilter(){const e=this.layer;return"displayFilterInfo"in e&&this.displayFilterEnabled&&e.displayFilterInfo?h(e.displayFilterInfo,this.view):null}get effectiveDisplayFilterClause(){const e=this.effectiveDisplayFilter?.where??null;return e&&this.hasHighlight?n(e,o(this.layer.objectIdField,this.highlightIds)):e}get featureEffect(){return this.layer&&"featureEffect"in this.layer?this.layer.featureEffect:null}set featureEffect(e){this._override("featureEffect",e)}get highlightOptions(){}set highlightOptions(e){}get maximumNumberOfFeatures(){return 0}set maximumNumberOfFeatures(e){t.getLogger(this).error("#maximumNumberOfFeatures=","Setting maximum number of features is not supported")}get maximumNumberOfFeaturesExceeded(){return!1}get signedInUser(){return this.layer?.url?F(this.layer.url):Promise.resolve(null)}createQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference},t=null!=this.filter?this.filter.createQuery(e):new L(e);return"floorInfo"in this.layer&&this.layer.floorInfo&&(t.where=a(t.where,P(this))),this.displayFilterEnabled&&(t.where=a(t.where,this.effectiveDisplayFilter?.where)),null!=this.timeExtent&&(t.timeExtent=null!=t.timeExtent?t.timeExtent.intersection(this.timeExtent):this.timeExtent.clone()),t}createAggregateQuery(){const e={outFields:["*"],returnGeometry:!0,outSpatialReference:this.view.spatialReference};return new L(e)}async fetchPopupFeaturesFromGraphics(e,t){const i=[],r=new Set;for(const s of e){const e=f(s.origin),l=Q(e,{...t,checkPopupEnabled:!0});l&&(i.push(s),r.add(l))}if(0===i.length||0===r.size)return[];const l=await this._createPopupQuery(r,t);return await g(this.layer,i,l,{hasRequiredFields:(e,t)=>this._popupFeatureHasRequiredFields(e,t),...t})}_handleChange(){const e=Promise.all([this._updateRequiredFields(),this._updateClientWhereClauseRequirements()]).then(()=>{});return this._updatingRequiredPromise=e,e.then(()=>{this._updatingRequiredPromise===e&&(this._updatingRequiredPromise=null)}),e}async _updateClientWhereClauseRequirements(){if(!this.layer||!this.view)return;const{layer:e}=this,i=new G(e.fieldsIndex);if(i.visitFilter(this.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"labelingInfo"in e&&i.visitLabelingInfo(e.labelsVisible,e.labelingInfo),"trackInfo"in e&&i.visitTrackInfo(e.trackInfo),"2d"===this.view.type&&(i.visitFilter(this.featureEffect?.filter),"featureReduction"in e&&i.visitFeatureReduction(e.featureReduction),"displayFilterInfo"in e&&i.visitDisplayFilter(this.displayFilterEnabled,e.displayFilterInfo)),"subtype-group"===e.type)for(const t of e.sublayers)i.visitLabelingInfo(t.labelsVisible,t.labelingInfo);"definitionExpression"in e&&"capabilities"in e&&e.capabilities?.query.relativeTimeBinWindow&&i.visitRelativeTimeQuery(e.definitionExpression);try{const e=await i.finish();this._set("requiresCurrentUser",e.requiresCurrentUser)}catch(r){t.getLogger(this).error(r)}}async _updateRequiredFields(){if(!this.layer||!this.view)return;const e="3d"===this.view.type,{layer:i,layer:{fieldsIndex:r}}=this,l="renderer"in i&&i.renderer,s="orderBy"in i&&i.orderBy,n="featureReduction"in i?i.featureReduction:null,o=new Set,a=[l?l.collectRequiredFields(o,r):null,w(o,i),e&&"elevationInfo"in i?E(o,i):null,null!=this.filter?x(o,i,this.filter):null,e||null==this.featureEffect?null:x(o,i,this.featureEffect.filter),!e&&n?R(o,i,n):null,!e&&s?q(o,i,s):null,"definitionExpression"in i&&"capabilities"in i&&i.capabilities?.query.relativeTimeBinWindow?U(o,i.fieldsIndex,i.definitionExpression):null];if("timeInfo"in i&&i.timeInfo&&this.timeExtent&&j(o,i.fieldsIndex,[i.timeInfo.startField,i.timeInfo.endField]),"timeInfo"in i&&i.timeInfo&&"trackInfo"in i&&i.trackInfo){const{trackInfo:e}=i;j(o,i.fieldsIndex,[i.timeInfo.trackIdField]),"feature"!==i.type&&"startTimeField"!==e.timeField||j(o,i.fieldsIndex,[i.timeInfo.startField]),"endTimeField"===e.timeField&&j(o,i.fieldsIndex,[i.timeInfo.endField]),await C(o,i)}if("floorInfo"in i&&i.floorInfo&&j(o,i.fieldsIndex,[i.floorInfo.floorField]),"featureTitleFields"in i&&this.view?.requiredFieldsOptions?.featureTitleFields&&i.featureTitleFields&&j(o,i.fieldsIndex,i.featureTitleFields),"feature"===i.type&&i.globalIdField&&this.view?.requiredFieldsOptions?.globalIdField&&j(o,i.fieldsIndex,[i.globalIdField]),this.displayFilterEnabled&&"displayFilterInfo"in i&&a.push(O(o,i,i.displayFilterInfo)),"feature"===i.type&&e&&null!=i.infoFor3D&&(null==i.globalIdField&&t.getLogger(this).error("globalIdField missing on 3DObjectFeatureLayer"),j(o,i.fieldsIndex,[i.globalIdField])),"subtype-group"===i.type){_(o,r,i.subtypeField);const e=i.sublayers.map(e=>Promise.all([e.renderer?.collectRequiredFields(o,r),w(o,e)]));a.push(Promise.all(e))}if("catalog-footprint"===i.type&&i.parent){const e=i.parent;j(o,r,[e.itemNameField,e.itemSourceField,e.itemTypeField,e.maxScaleField,e.minScaleField])}"knowledge-graph-sublayer"===i.type&&"link-chart"===i.parentCompositeLayer.type&&_(o,r,y);const u=await Promise.allSettled(a);if(e)_(o,r,i.objectIdField);else for(const t of p(S(i)))_(o,r,t);e&&"displayField"in i&&i.displayField&&_(o,r,i.displayField);for(const f of u)"rejected"===f.status&&t.getLogger(this).error(f.reason);const d=Array.from(o).sort();this._set("requiredFields",d)}_popupFeatureHasRequiredFields(e,t){return k(e,t)}async _createPopupQuery(e,t){const r=this.layer.createQuery(),l=new Set;let s="point"===this.layer.geometryType;for(const n of e){if(!s){const e=await I(n);i(t),s=(e&&e.arcadeUtils.hasGeometryOperations(n))??!1}const e=await N(this.layer,n);i(t);for(const t of e)l.add(t)}return r.where="1=1",r.returnGeometry=s,r.returnZ=s,r.returnM=s,r.outFields=Array.from(l),r.outSpatialReference=this.view.spatialReference,"floorInfo"in this.layer&&this.layer.floorInfo&&(r.where=a(r.where,P(this))),r}canResume(){return!!super.canResume()&&(null==this.timeExtent||!this.timeExtent.isEmpty)}getTest(){}get test(){}};e([u()],B.prototype,"_updatingRequiredPromise",void 0),e([u({readOnly:!0})],B.prototype,"availableFields",null),e([u({readOnly:!0})],B.prototype,"displayFilterEnabled",null),e([u({readOnly:!0})],B.prototype,"effectiveDisplayFilter",null),e([u({readOnly:!0})],B.prototype,"effectiveDisplayFilterClause",null),e([u({type:m})],B.prototype,"featureEffect",null),e([u({type:c})],B.prototype,"filter",void 0),e([u()],B.prototype,"layer",void 0),e([u({type:Number})],B.prototype,"maximumNumberOfFeatures",null),e([u({readOnly:!0,type:Boolean})],B.prototype,"maximumNumberOfFeaturesExceeded",null),e([u()],B.prototype,"requiresCurrentUser",void 0),e([u({readOnly:!0})],B.prototype,"requiredFields",void 0),e([u({readOnly:!0})],B.prototype,"signedInUser",null),e([u()],B.prototype,"view",void 0),B=e([d("esri.views.layers.FeatureLikeLayerView")],B);export{B as default};
@@ -180,7 +180,7 @@ export default class HighlightOptions extends Accessor {
180
180
  * highlights only the difference between the shadow areas, so the overlapping shadow areas aren't highlighted at
181
181
  * all. Here is an example of what the shadow highlight looks like with different values:
182
182
  *
183
- * ![shadow-highlight](https://developers.arcgis.com/javascript/latest/assets/img/apiref/views/shadow-highlight.png)
183
+ * ![shadow-highlight](https://developers.arcgis.com/javascript/latest/assets/images/apiref/views/shadow-highlight.png)
184
184
  *
185
185
  * > [!WARNING]
186
186
  * >
@@ -19,7 +19,7 @@ export interface DefaultUIProperties extends UIProperties, Partial<Pick<DefaultU
19
19
  * the upper region are stacked vertically, while widgets in the lower region are stacked horizontally.
20
20
  * The available positions are indicated in the image below.
21
21
  *
22
- * ![views-ui-layout](https://developers.arcgis.com/javascript/latest/assets/img/apiref/views/views-ui-layout.jpg)
22
+ * ![views-ui-layout](https://developers.arcgis.com/javascript/latest/assets/images/apiref/views/views-ui-layout.jpg)
23
23
  *
24
24
  * Methods, such as [add()](https://developers.arcgis.com/javascript/latest/references/core/views/ui/DefaultUI/#add) and [move()](https://developers.arcgis.com/javascript/latest/references/core/views/ui/DefaultUI/#move) can be used to place widgets in specific
25
25
  * positions of the UI. In the image below, the [Search](https://developers.arcgis.com/javascript/latest/references/core/widgets/Search/) and
@@ -37,7 +37,7 @@ export interface DefaultUIProperties extends UIProperties, Partial<Pick<DefaultU
37
37
  * view.ui.add(bmToggleWidget, "bottom-right");
38
38
  * ```
39
39
  *
40
- * ![views-ui-demo](https://developers.arcgis.com/javascript/latest/assets/img/apiref/views/views-ui-demo.png)
40
+ * ![views-ui-demo](https://developers.arcgis.com/javascript/latest/assets/images/apiref/views/views-ui-demo.png)
41
41
  *
42
42
  * If you dive into the doc of the methods [add()](https://developers.arcgis.com/javascript/latest/references/core/views/ui/DefaultUI/#add), [empty()](https://developers.arcgis.com/javascript/latest/references/core/views/ui/DefaultUI/#empty) and [move()](https://developers.arcgis.com/javascript/latest/references/core/views/ui/DefaultUI/#move), you'll notice some of the
43
43
  * possible values include "leading" and "trailing". That's because the ArcGIS Maps SDK for JavaScript provides
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import has from"../../core/has.js";import t from"../../core/Logger.js";import{disposeMaybe as e}from"../../core/maybe.js";import{after as s}from"../../core/promiseUtils.js";import{Milliseconds as i}from"../../core/time.js";import{webglDebugEnabled as a,checkWebGLError as r,getErrorMessage as n}from"./checkWebGLError.js";import{ContextState as l}from"./ContextState.js";import{DrawBufferBack as h,DrawBufferNone as f,ColorAttachment0 as o,baseTextureUnit as u,ResourceType as c,PrimitiveType as d}from"./enums.js";import{InstanceCounter as _}from"./InstanceCounter.js";import{Parameters as b}from"./Parameters.js";import{ProgramCache as g}from"./ProgramCache.js";import{StateTracker as p}from"./renderState.js";import m from"./Texture.js";import{WebGLDriverTest as B}from"./WebGLDriverTest.js";import{Capabilities as F}from"./capabilities/Capabilities.js";const T=()=>t.getLogger("esri.views.webgl.RenderingContext");let x=class{constructor(t,e){this.gl=t,this.instanceCounter=new _,this._programCache=new g(this),this._transformFeedbackRequestInfo=null,this._state=new l,this._numOfDrawCalls=0,this._numOfTriangles=0,this._options=e,this.configure(e)}configure(t){this._options=t,this._capabilities=new F(this.gl,t),this._parameters=new b(this.gl,this._capabilities,t),m.TEXTURE_UNIT_FOR_UPDATES=this._parameters.maxTextureImageUnits-1;const s=this.gl.getParameter(this.gl.VIEWPORT);this._state=new l,this._state.viewport={x:s[0],y:s[1],width:s[2],height:s[3]},this._stateTracker=new p({setBlending:t=>{if(t){this.setBlendingEnabled(!0),this.setBlendEquationSeparate(t.opRgb,t.opAlpha),this.setBlendFunctionSeparate(t.srcRgb,t.dstRgb,t.srcAlpha,t.dstAlpha);const e=t.color;this.setBlendColor(e.r,e.g,e.b,e.a)}else this.setBlendingEnabled(!1)},setCulling:t=>{t?(this.setFaceCullingEnabled(!0),this.setCullFace(t.face),this.setFrontFace(t.mode)):this.setFaceCullingEnabled(!1)},setPolygonOffset:t=>{t?(this.setPolygonOffsetFillEnabled(!0),this.setPolygonOffset(t.factor,t.units)):this.setPolygonOffsetFillEnabled(!1)},setDepthTest:t=>{t?(this.setDepthTestEnabled(!0),this.setDepthFunction(t.func)):this.setDepthTestEnabled(!1)},setStencilTest:t=>{if(t){this.setStencilTestEnabled(!0);const e=t.function;this.setStencilFunction(e.func,e.ref,e.mask);const s=t.operation;this.setStencilOp(s.fail,s.zFail,s.zPass)}else this.setStencilTestEnabled(!1)},setDepthWrite:t=>{t?(this.setDepthWriteEnabled(!0),this.setDepthRange(t.zNear,t.zFar)):this.setDepthWriteEnabled(!1)},setColorWrite:t=>{t?this.setColorMask(t.r,t.g,t.b,t.a):this.setColorMask(!1,!1,!1,!1)},setStencilWrite:t=>{t?this.setStencilWriteMask(t.mask):this.setStencilWriteMask(0)},setDrawBuffers:t=>{if(t)this.setDrawBuffers(t.buffers);else{const{drawFramebuffer:t}=this._state;null===t?this.setDrawBuffers([h]):0===t.colorAttachments.length?this.setDrawBuffers([f]):this.setDrawBuffers([o])}}}),this.enforceState(),e(this._driverTest),this._driverTest=new B(this)}updateOptions(t){this._options={...this._options,...t},this._parameters=new b(this.gl,this._capabilities,this._options)}dispose(){this._driverTest=e(this._driverTest),this._programCache=e(this._programCache),this.bindVAO(null),this.unbindBuffer(34962),this.unbindBuffer(34963),this.unbindBuffer(35345),this._state.uniformBufferBindingPoints.length=0,this.unbindBuffer(35051),this.unbindBuffer(35052),this.unbindBuffer(36662),this.unbindBuffer(36663),this._state.textureUnitMap.length=0,this._state=null,this._capabilities=null,this._stateTracker=null,a()&&console.log(this.instanceCounter.resourceInformation)}get driverTest(){return this._driverTest}get contextAttributes(){return this.gl.getContextAttributes()}get parameters(){return this._parameters}get programCache(){return this._programCache}setPipelineState(t){this._stateTracker.setPipeline(t)}getPipelineState(){return this._stateTracker.getPipelineState()}setBlendingEnabled(t){this._state.blend!==t&&(!0===t?this.gl.enable(this.gl.BLEND):this.gl.disable(this.gl.BLEND),this._state.blend=t,this._stateTracker.invalidateBlending())}externalProgramUpdate(){this._state.program?.stop(),this._state.program=null}externalTextureUnitUpdate(t,e){for(let s=0;s<t.length;++s)this._state.textureUnitMap[t[s]]=null;e>=0&&(this._state.activeTexture=e)}externalVertexArrayObjectUpdate(){this.gl.bindVertexArray(null),this._state.vertexArrayObject=null,this._state.vertexBuffer=null,this._state.indexBuffer=null}externalVertexBufferUpdate(){this._state.vertexBuffer=null}externalIndexBufferUpdate(){this._state.indexBuffer=null}setBlendColor(t,e,s,i){t===this._state.blendColor.r&&e===this._state.blendColor.g&&s===this._state.blendColor.b&&i===this._state.blendColor.a||(this.gl.blendColor(t,e,s,i),this._state.blendColor.r=t,this._state.blendColor.g=e,this._state.blendColor.b=s,this._state.blendColor.a=i,this._stateTracker.invalidateBlending())}setBlendFunction(t,e){t===this._state.blendFunction.srcRGB&&e===this._state.blendFunction.dstRGB||(this.gl.blendFunc(t,e),this._state.blendFunction.srcRGB=t,this._state.blendFunction.srcAlpha=t,this._state.blendFunction.dstRGB=e,this._state.blendFunction.dstAlpha=e,this._stateTracker.invalidateBlending())}setBlendFunctionSeparate(t,e,s,i){this._state.blendFunction.srcRGB===t&&this._state.blendFunction.srcAlpha===s&&this._state.blendFunction.dstRGB===e&&this._state.blendFunction.dstAlpha===i||(this.gl.blendFuncSeparate(t,e,s,i),this._state.blendFunction.srcRGB=t,this._state.blendFunction.srcAlpha=s,this._state.blendFunction.dstRGB=e,this._state.blendFunction.dstAlpha=i,this._stateTracker.invalidateBlending())}setBlendEquation(t){this._state.blendEquation.mode!==t&&(this.gl.blendEquation(t),this._state.blendEquation.mode=t,this._state.blendEquation.modeAlpha=t,this._stateTracker.invalidateBlending())}setBlendEquationSeparate(t,e){this._state.blendEquation.mode===t&&this._state.blendEquation.modeAlpha===e||(this.gl.blendEquationSeparate(t,e),this._state.blendEquation.mode=t,this._state.blendEquation.modeAlpha=e,this._stateTracker.invalidateBlending())}setColorMask(t,e,s,i){this._state.colorMask.r===t&&this._state.colorMask.g===e&&this._state.colorMask.b===s&&this._state.colorMask.a===i||(this.gl.colorMask(t,e,s,i),this._state.colorMask.r=t,this._state.colorMask.g=e,this._state.colorMask.b=s,this._state.colorMask.a=i,this._stateTracker.invalidateColorWrite())}setClearColor(t,e,s,i){this._state.clearColor.r===t&&this._state.clearColor.g===e&&this._state.clearColor.b===s&&this._state.clearColor.a===i||(this.gl.clearColor(t,e,s,i),this._state.clearColor.r=t,this._state.clearColor.g=e,this._state.clearColor.b=s,this._state.clearColor.a=i)}setFaceCullingEnabled(t){this._state.faceCulling!==t&&(!0===t?this.gl.enable(this.gl.CULL_FACE):this.gl.disable(this.gl.CULL_FACE),this._state.faceCulling=t,this._stateTracker.invalidateCulling())}setPolygonOffsetFillEnabled(t){this._state.polygonOffsetFill!==t&&(!0===t?this.gl.enable(this.gl.POLYGON_OFFSET_FILL):this.gl.disable(this.gl.POLYGON_OFFSET_FILL),this._state.polygonOffsetFill=t,this._stateTracker.invalidatePolygonOffset())}setPolygonOffset(t,e){this._state.polygonOffset[0]===t&&this._state.polygonOffset[1]===e||(this._state.polygonOffset[0]=t,this._state.polygonOffset[1]=e,this.gl.polygonOffset(t,e),this._stateTracker.invalidatePolygonOffset())}setCullFace(t){this._state.cullFace!==t&&(this.gl.cullFace(t),this._state.cullFace=t,this._stateTracker.invalidateCulling())}setFrontFace(t){this._state.frontFace!==t&&(this.gl.frontFace(t),this._state.frontFace=t,this._stateTracker.invalidateCulling())}setScissorTestEnabled(t){this._state.scissorTest!==t&&(!0===t?this.gl.enable(this.gl.SCISSOR_TEST):this.gl.disable(this.gl.SCISSOR_TEST),this._state.scissorTest=t)}setScissorRect(t,e,s,i){this._state.scissorRect.x===t&&this._state.scissorRect.y===e&&this._state.scissorRect.width===s&&this._state.scissorRect.height===i||(this.gl.scissor(t,e,s,i),this._state.scissorRect.x=t,this._state.scissorRect.y=e,this._state.scissorRect.width=s,this._state.scissorRect.height=i)}setDepthTestEnabled(t){this._state.depthTest!==t&&(!0===t?this.gl.enable(this.gl.DEPTH_TEST):this.gl.disable(this.gl.DEPTH_TEST),this._state.depthTest=t,this._stateTracker.invalidateDepthTest())}setClearDepth(t){this._state.clearDepth!==t&&(this.gl.clearDepth(t),this._state.clearDepth=t)}setDepthFunction(t){this._state.depthFunction!==t&&(this.gl.depthFunc(t),this._state.depthFunction=t,this._stateTracker.invalidateDepthTest())}setDepthWriteEnabled(t){this._state.depthWrite!==t&&(this.gl.depthMask(t),this._state.depthWrite=t,this._stateTracker.invalidateDepthWrite())}setDepthRange(t,e){this._state.depthRange.zNear===t&&this._state.depthRange.zFar===e||(this.gl.depthRange(t,e),this._state.depthRange.zNear=t,this._state.depthRange.zFar=e,this._stateTracker.invalidateDepthWrite())}setStencilTestEnabled(t){this._state.stencilTest!==t&&(!0===t?this.gl.enable(this.gl.STENCIL_TEST):this.gl.disable(this.gl.STENCIL_TEST),this._state.stencilTest=t,this._stateTracker.invalidateStencilTest())}setClearStencil(t){t!==this._state.clearStencil&&(this.gl.clearStencil(t),this._state.clearStencil=t)}setStencilFunction(t,e,s){this._state.stencilFunction.func===t&&this._state.stencilFunction.ref===e&&this._state.stencilFunction.mask===s||(this.gl.stencilFunc(t,e,s),this._state.stencilFunction.face=1032,this._state.stencilFunction.func=t,this._state.stencilFunction.ref=e,this._state.stencilFunction.mask=s,this._stateTracker.invalidateStencilTest())}setStencilFunctionSeparate(t,e,s,i){this._state.stencilFunction.face===t&&this._state.stencilFunction.func===e&&this._state.stencilFunction.ref===s&&this._state.stencilFunction.mask===i||(this.gl.stencilFuncSeparate(t,e,s,i),this._state.stencilFunction.face=t,this._state.stencilFunction.func=e,this._state.stencilFunction.ref=s,this._state.stencilFunction.mask=i,this._stateTracker.invalidateStencilTest())}setStencilWriteMask(t){this._state.stencilWriteMask!==t&&(this.gl.stencilMask(t),this._state.stencilWriteMask=t,this._stateTracker.invalidateStencilWrite())}setStencilOp(t,e,s){1032===this._state.stencilOperation.face&&this._state.stencilOperation.fail===t&&this._state.stencilOperation.zFail===e&&this._state.stencilOperation.zPass===s||(this.gl.stencilOp(t,e,s),this._state.stencilOperation.face=1032,this._state.stencilOperation.fail=t,this._state.stencilOperation.zFail=e,this._state.stencilOperation.zPass=s,this._stateTracker.invalidateStencilTest())}setStencilOpSeparate(t,e,s,i){this._state.stencilOperation.face===t&&this._state.stencilOperation.fail===e&&this._state.stencilOperation.zFail===s&&this._state.stencilOperation.zPass===i||(this.gl.stencilOpSeparate(t,e,s,i),this._state.stencilOperation.face=t,this._state.stencilOperation.fail=e,this._state.stencilOperation.zFail=s,this._state.stencilOperation.zPass=i,this._stateTracker.invalidateStencilTest())}setActiveTexture(t,e=!1){const s=this._state.activeTexture;return t>=0&&(e||t!==this._state.activeTexture)&&(this.gl.activeTexture(u+t),this._state.activeTexture=t),s}setDrawBuffers(t){const{drawFramebuffer:e}=this._state,s=null===e,i=s?this._state.drawBuffers.defaultFramebuffer:this._state.drawBuffers.fbos.get(e);if(i?.length!==t.length||!i.every((e,s)=>e===t[s]))if(t.length>this.parameters.maxDrawBuffers)T().error(`Setting more active draw buffers (${t.length}) than GL.MAX_DRAW_BUFFERS allows ( ${this.parameters.maxDrawBuffers}).`);else{if(s){if(t.length>1)return void T().error(`The default framebuffer can only have 1 active draw buffer but was requested with ${t.length}.`);if(t[0]!==h&&t[0]!==f)return void T().error(`The default framebuffer can only use the constants GL.BACK or GL.NONE as draw buffers but got ${t[0]}`)}s||!t.includes(h)?(this.gl.drawBuffers(t),r(this.gl),s?this._state.drawBuffers.defaultFramebuffer=t:this._state.drawBuffers.fbos.set(e,t),this._stateTracker.invalidateDrawBuffers()):T().error("A framebuffer object can only use the constants GL.COLOR_ATTACHMENTi or GL.NONE as draw buffers.")}}clear(t,e=255){if(t){if(16384&t){const t=this._state.drawFramebuffer?.colorAttachments;t&&this.setDrawBuffers(t),this.setColorMask(!0,!0,!0,!0)}256&t&&this.setDepthWriteEnabled(!0),1024&t&&this.setStencilWriteMask(e),this.gl.clear(t)}}clearFramebuffer(t,e=!1,s=!1){let i=0;if(t){const e=1e-13,s=Math.max(e,t[3]);this.setClearColor(t[0],t[1],t[2],s),i|=16384}e&&(i|=256),!1===s?s=0:(!0===s&&(s=255),i|=1024),i&&this.clear(i,s)}clearBuffer(t,e,s=6144,i=void 0){this.gl.clearBufferfv(s,t,e,i)}clearBufferInteger(t,e,s=6144,i=void 0){this.gl.clearBufferiv(s,t,e,i)}clearBufferUnsignedInteger(t,e,s=6144,i=void 0){this.gl.clearBufferuiv(s,t,e,i)}drawArrays(t,e,s){if(this._transformFeedbackRequestInfo){if(t!==this._transformFeedbackRequestInfo.primitiveType)throw new Error("DrawArrays called during transform feedback, but primitiveType does not match that of the current transform feedback request");if(null==this._state.program?.hasTransformFeedbackVaryings)throw new Error("DrawArrays called during transform feedback, but the shader program was not linked with a transform feedback varying")}if(a()&&(this._numOfDrawCalls++,this._numOfTriangles+=k(t,s),has("enable-feature:webgl-debug:textureReadWrite"))){const t=this._state.textureUnitMap;for(let e=0;e<t.length;e++){const s=t[e];if(null!=s&&s===this._state.drawFramebuffer?.colorTexture)throw new Error(`Detected readWrite. Texture already bound at index ${e}`)}}this.gl.drawArrays(t,e,s),r(this.gl)}drawArraysInstanced(t,e,s,i){this.gl.drawArraysInstanced(t,e,s,i),r(this.gl)}drawElements(t,e,s,i){if(this._transformFeedbackRequestInfo)throw new Error("Cannot called drawElements during a transform feedback request");if(a()&&(this._numOfDrawCalls++,this._numOfTriangles+=k(t,e)),this.gl.drawElements(t,e,s,i),a()){const a=n(this.gl);if(a){const r=this.getBoundVAO(),n=r?.indexBuffer,l=r?.buffers,h={indexBuffer:n,vertexBuffers:l},f={mode:t,count:e,type:s,offset:i},o=n?.size??0,u=i+e,c=o<u?`. Buffer is too small. Attempted to draw index ${u} of ${o}`:"";T().error(`drawElements: ${a}${c}`,{args:f,vao:h})}}}drawElementsInstanced(t,e,s,i,a){this.gl.drawElementsInstanced(t,e,s,i,a),r(this.gl)}logInfo(){a()&&console.log(`DrawCalls: ${this._numOfDrawCalls}, Triangles: ${this._numOfTriangles}`)}resetInfo(){a()&&(this._numOfDrawCalls=0,this._numOfTriangles=0)}get capabilities(){return this._capabilities}setViewport(t,e,s,i){s=Math.max(Math.round(s),1),i=Math.max(Math.round(i),1);const a=this._state.viewport;a.x===t&&a.y===e&&a.width===s&&a.height===i||(a.x=t,a.y=e,a.width=s,a.height=i,this.gl.viewport(t,e,s,i))}setViewport4fv(t){this.setViewport(t[0],t[1],t[2],t[3])}restoreViewport({x:t,y:e,width:s,height:i}){this.setViewport(t,e,s,i)}getViewport(){const t=this._state.viewport;return{x:t.x,y:t.y,width:t.width,height:t.height}}useProgram(t){this._state.program!==t&&(this._state.program?.stop(),this._state.program=t,this.gl.useProgram(t?.glName??null))}bindTexture(t,e,s=!1){(e>=this.parameters.maxTextureImageUnits||e<0)&&T().error(`Input texture unit (${e}) is out of range of available units (0...${this.parameters.maxTextureImageUnits})\n `);const i=this._state.textureUnitMap[e];return null==t?.glName?(null!=i&&(this.setActiveTexture(e,s),this.gl.bindTexture(i.descriptor.target,null)),this._state.textureUnitMap[e]=null,i):s||i!==t?(this.setActiveTexture(e,s),this.gl.bindTexture(t.descriptor.target,t.glName),t.applyChanges(),this._state.textureUnitMap[e]=t,i):(t.isDirty&&(this.setActiveTexture(e,s),t.applyChanges()),i)}unbindTexture(t){if(null!=t)for(let e=0;e<this.parameters.maxTextureImageUnits;e++)this._state.textureUnitMap[e]===t&&(this.bindTexture(null,e),this._state.textureUnitMap[e]=null)}bindFramebuffer(t,e=!1){if(e||this._state.readFramebuffer!==t||this._state.drawFramebuffer!==t){if(this._stateTracker.invalidateDrawBuffers(),null==t)return this.gl.bindFramebuffer(36160,null),void(this._state.readFramebuffer=this._state.drawFramebuffer=null);t.initializeAndBind(36160),this._state.readFramebuffer=t,this._state.drawFramebuffer=t}}bindFramebufferSeparate(t,e,s=!1){const i=36008===e,a=i?this._state.readFramebuffer:this._state.drawFramebuffer;(s||a!==t)&&(null==t?this.gl.bindFramebuffer(e,null):t.initializeAndBind(e),i?this._state.readFramebuffer=t??null:(this._stateTracker.invalidateDrawBuffers(),this._state.drawFramebuffer=t??null))}blitFramebuffer(t,e,s=16384,i=9728,a=0,r=0,n=t.width,l=t.height,h=0,f=0,o=e.width,u=e.height){this.bindFramebufferSeparate(t,36008,!0),this.bindFramebufferSeparate(e,36009,!0),this.gl.blitFramebuffer(a,r,n,l,h,f,o,u,s,i)}bindBuffer(t,e){if(t)switch(e??=t.bufferType,e){case 34962:this._state.vertexBuffer=w(this.gl,t,e,this._state.vertexBuffer);break;case 34963:this._state.indexBuffer=w(this.gl,t,e,this._state.indexBuffer);break;case 35345:this._state.uniformBuffer=w(this.gl,t,e,this._state.uniformBuffer);break;case 35051:this._state.pixelPackBuffer=w(this.gl,t,e,this._state.pixelPackBuffer);break;case 35052:this._state.pixelUnpackBuffer=w(this.gl,t,e,this._state.pixelUnpackBuffer);break;case 36662:this._state.copyReadBuffer=w(this.gl,t,e,this._state.copyReadBuffer);break;case 36663:this._state.copyWriteBuffer=w(this.gl,t,e,this._state.copyWriteBuffer);break;case 35982:this._state.transformFeedbackBuffer=w(this.gl,t,e,this._state.transformFeedbackBuffer)}}bindRenderbuffer(t){const e=this.gl;t||(e.bindRenderbuffer(e.RENDERBUFFER,null),this._state.renderbuffer=null),this._state.renderbuffer!==t&&(e.bindRenderbuffer(e.RENDERBUFFER,t.glName),this._state.renderbuffer=t)}_getBufferBinding(t,e){if(e>=this.parameters.maxUniformBufferBindings||e<0)return T().error(`Uniform buffer binding point (${e}) is out of range (0...${this.parameters.maxUniformBufferBindings})\n `),null;const s=35345===t?this._state.uniformBufferBindingPoints:this._state.transformBufferBindingPoints;let i=s[e];return null==i&&(i={buffer:null,offset:0,size:0},s[e]=i),i}bindBufferBase(t,e,s){const i=this._getBufferBinding(t,e);null!=i&&(i.buffer===s&&0===i.offset&&0===i.size||(this.gl.bindBufferBase(t,e,s?s.glName:null),i.buffer=s,i.offset=0,i.size=0))}bindBufferRange(t,e,s,i,a){const r=this._getBufferBinding(t,e);null!=r&&(r.buffer===s&&r.offset===i&&r.size===a||(i%this._parameters.uniformBufferOffsetAlignment===0?(this.gl.bindBufferRange(t,e,s.glName,i,a),r.buffer=s,r.offset=i,r.size=a):T().error("Uniform buffer binding offset is not a multiple of the context offset alignment")))}bindUBO(t,e,s,i){null!=e?(a()&&(i??e.byteLength)>this._parameters.maxUniformBlockSize&&T().error("Attempting to bind more data than the maximum uniform block size"),e.initialize(),void 0!==s&&void 0!==i?this.bindBufferRange(35345,t,e.buffer,s,i):this.bindBufferBase(35345,t,e.buffer)):this.bindBufferBase(35345,t,null)}unbindUBO(t){for(let e=0,s=this._state.uniformBufferBindingPoints.length;e<s;e++){const s=this._state.uniformBufferBindingPoints[e];null!=s&&s.buffer===t.buffer&&this.bindBufferBase(35345,e,null)}}unbindBuffer(t){switch(t){case 34962:this._state.vertexBuffer=w(this.gl,null,t,this._state.vertexBuffer);break;case 34963:this._state.indexBuffer=w(this.gl,null,t,this._state.indexBuffer);break;case 35345:this._state.uniformBuffer=w(this.gl,null,t,this._state.uniformBuffer);break;case 35051:this._state.pixelPackBuffer=w(this.gl,null,t,this._state.pixelPackBuffer);break;case 35052:this._state.pixelUnpackBuffer=w(this.gl,null,t,this._state.pixelUnpackBuffer);break;case 36662:this._state.copyReadBuffer=w(this.gl,null,t,this._state.copyReadBuffer);break;case 36663:this._state.copyWriteBuffer=w(this.gl,null,t,this._state.copyWriteBuffer)}}bindVAO(t,e){if(null==t)return this._state.vertexArrayObject?.unbind(),void(this._state.vertexArrayObject=null);this._state.vertexArrayObject!==t&&(t.bind(e),this._state.vertexArrayObject=t)}bindTransformFeedback(t){const{gl:e}=this;e.bindTransformFeedback(e.TRANSFORM_FEEDBACK,t.glName)}beginTransformFeedback(t,e){if(this._transformFeedbackRequestInfo)throw new Error("Already in a transform feedback request");const{gl:s}=this;s.bindTransformFeedback(s.TRANSFORM_FEEDBACK,t.glName),s.beginTransformFeedback(e),this._transformFeedbackRequestInfo={primitiveType:e}}endTransformFeedback(){if(!this._transformFeedbackRequestInfo)throw new Error("Not in a transform feedback request");const{gl:t}=this;t.endTransformFeedback(),t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,null),this._transformFeedbackRequestInfo=null}async clientWaitAsync(t=i(10)){const{gl:e}=this,a=e.fenceSync(37143,0);if(!a)throw new Error("Client wait failed, could not create sync object");let r;this.instanceCounter.increment(c.Sync,a),e.flush();do{await s(t),r=e.clientWaitSync(a,0,0)}while(37147===r);if(this.instanceCounter.decrement(c.Sync,a),e.deleteSync(a),37149===r)throw new Error("Client wait failed")}getBoundFramebufferObject(t=36160){return 36008===t?this._state.readFramebuffer:this._state.drawFramebuffer}temporaryBindFramebufferObject(t,e,s=!1){const i=this.getBoundFramebufferObject();try{this.bindFramebuffer(t,s),e()}finally{this.bindFramebuffer(i,s)}}getBoundVAO(){return this._state.vertexArrayObject}resetState(){this.useProgram(null),this.bindVAO(null),this.bindFramebuffer(null,!0),this.unbindBuffer(34962),this.unbindBuffer(34963),this.unbindBuffer(35345),this._state.uniformBufferBindingPoints.length=0,this.unbindBuffer(35051),this.unbindBuffer(35052),this.unbindBuffer(36662),this.unbindBuffer(36663);for(let t=0;t<this.parameters.maxTextureImageUnits;++t)this.bindTexture(null,t);this.setBlendingEnabled(!1),this.setBlendFunction(1,0),this.setBlendEquation(32774),this.setBlendColor(0,0,0,0),this.setFaceCullingEnabled(!1),this.setCullFace(1029),this.setFrontFace(2305),this.setPolygonOffsetFillEnabled(!1),this.setPolygonOffset(0,0),this.setScissorTestEnabled(!1),this.setScissorRect(0,0,this.gl.canvas.width,this.gl.canvas.height),this.setDepthTestEnabled(!1),this.setDepthFunction(513),this.setDepthRange(0,1),this.setStencilTestEnabled(!1),this.setStencilFunction(519,0,0),this.setStencilOp(7680,7680,7680),this.setClearColor(0,0,0,0),this.setClearDepth(1),this.setClearStencil(0),this.setColorMask(!0,!0,!0,!0),this.setStencilWriteMask(4294967295),this.setDepthWriteEnabled(!0),this.setDrawBuffers([h]),this.setViewport(0,0,this.gl.canvas.width,this.gl.canvas.height)}enforceState(){const{gl:t}=this;t.bindVertexArray(null);for(let s=0;s<this.parameters.maxVertexAttributes;s++)t.disableVertexAttribArray(s);this._state.vertexBuffer?t.bindBuffer(this._state.vertexBuffer.bufferType,this._state.vertexBuffer.glName):t.bindBuffer(34962,null),this._state.indexBuffer?t.bindBuffer(this._state.indexBuffer.bufferType,this._state.indexBuffer.glName):t.bindBuffer(34963,null),this._state.uniformBuffer?t.bindBuffer(this._state.uniformBuffer.bufferType,this._state.uniformBuffer.glName):t.bindBuffer(35345,null);for(let s=0;s<this._parameters.maxUniformBufferBindings;s++){const e=this._state.uniformBufferBindingPoints[s];if(null!=e){const{buffer:i,offset:a,size:r}=e;null!==i?0===a&&0===r?t.bindBufferBase(35345,s,i.glName):t.bindBufferRange(35345,s,i.glName,a,r):t.bindBufferBase(35345,s,null)}}if(this._state.pixelPackBuffer?t.bindBuffer(this._state.pixelPackBuffer.bufferType,this._state.pixelPackBuffer.glName):t.bindBuffer(35051,null),this._state.pixelUnpackBuffer?t.bindBuffer(this._state.pixelUnpackBuffer.bufferType,this._state.pixelUnpackBuffer.glName):t.bindBuffer(35052,null),this._state.copyReadBuffer?t.bindBuffer(this._state.copyReadBuffer.bufferType,this._state.copyReadBuffer.glName):t.bindBuffer(36662,null),this._state.copyWriteBuffer?t.bindBuffer(this._state.copyWriteBuffer.bufferType,this._state.copyWriteBuffer.glName):t.bindBuffer(36663,null),t.bindFramebuffer(36008,null),t.readBuffer(t.BACK),this._state.readFramebuffer&&(t.bindFramebuffer(36008,this._state.readFramebuffer.glName),t.readBuffer(o)),t.bindFramebuffer(36009,this._state.drawFramebuffer?.glName??null),null===this._state.drawFramebuffer){const e=this._state.drawBuffers.defaultFramebuffer;t.drawBuffers(e??[h])}else{const e=this._state.drawBuffers.fbos.get(this._state.drawFramebuffer);t.drawBuffers(e??[o])}if(this._state.vertexArrayObject){const t=this._state.vertexArrayObject;this._state.vertexArrayObject&&(this._state.vertexArrayObject.unbind(),this._state.vertexArrayObject=null),this.bindVAO(t)}t.useProgram(this._state.program?.glName??null),t.blendColor(this._state.blendColor.r,this._state.blendColor.g,this._state.blendColor.b,this._state.blendColor.a),t.bindRenderbuffer(t.RENDERBUFFER,this._state.renderbuffer?.glName??null),!0===this._state.blend?t.enable(this.gl.BLEND):t.disable(this.gl.BLEND),t.blendEquationSeparate(this._state.blendEquation.mode,this._state.blendEquation.modeAlpha),t.blendFuncSeparate(this._state.blendFunction.srcRGB,this._state.blendFunction.dstRGB,this._state.blendFunction.srcAlpha,this._state.blendFunction.dstAlpha),t.clearColor(this._state.clearColor.r,this._state.clearColor.g,this._state.clearColor.b,this._state.clearColor.a),t.clearDepth(this._state.clearDepth),t.clearStencil(this._state.clearStencil),t.colorMask(this._state.colorMask.r,this._state.colorMask.g,this._state.colorMask.b,this._state.colorMask.a),t.cullFace(this._state.cullFace),t.depthFunc(this._state.depthFunction),t.depthRange(this._state.depthRange.zNear,this._state.depthRange.zFar),!0===this._state.depthTest?t.enable(t.DEPTH_TEST):t.disable(t.DEPTH_TEST),t.depthMask(this._state.depthWrite),t.frontFace(this._state.frontFace),t.lineWidth(1),!0===this._state.faceCulling?t.enable(t.CULL_FACE):t.disable(t.CULL_FACE),t.polygonOffset(this._state.polygonOffset[0],this._state.polygonOffset[1]),!0===this._state.polygonOffsetFill?t.enable(t.POLYGON_OFFSET_FILL):t.disable(t.POLYGON_OFFSET_FILL),t.scissor(this._state.scissorRect.x,this._state.scissorRect.y,this._state.scissorRect.width,this._state.scissorRect.height),!0===this._state.scissorTest?t.enable(t.SCISSOR_TEST):t.disable(t.SCISSOR_TEST),t.stencilFunc(this._state.stencilFunction.func,this._state.stencilFunction.ref,this._state.stencilFunction.mask),t.stencilOpSeparate(this._state.stencilOperation.face,this._state.stencilOperation.fail,this._state.stencilOperation.zFail,this._state.stencilOperation.zPass),!0===this._state.stencilTest?t.enable(t.STENCIL_TEST):t.disable(t.STENCIL_TEST),t.stencilMask(this._state.stencilWriteMask);for(let s=0;s<this.parameters.maxTextureImageUnits;s++){t.activeTexture(u+s),t.bindTexture(3553,null),t.bindTexture(34067,null),t.bindTexture(32879,null),t.bindTexture(35866,null);const e=this._state.textureUnitMap[s];null!=e&&t.bindTexture(e.descriptor.target,e.glName)}t.activeTexture(u+this._state.activeTexture);const e=this._state.viewport;t.viewport(e.x,e.y,e.width,e.height),this.resetInfo()}};function w(t,e,s,i){return e?i!==e&&t.bindBuffer(s,e.glName):t.bindBuffer(s,null),e}function k(t,e){switch(t){case d.POINTS:return 2*e;case d.TRIANGLES:return e/3;case d.TRIANGLE_STRIP:case d.TRIANGLE_FAN:return e-2;default:return 0}}export{x as RenderingContext};
2
+ import has from"../../core/has.js";import t from"../../core/Logger.js";import{disposeMaybe as e}from"../../core/maybe.js";import{after as s}from"../../core/promiseUtils.js";import{Milliseconds as i}from"../../core/time.js";import{webglDebugEnabled as a,checkWebGLError as r,getErrorMessage as n}from"./checkWebGLError.js";import{ContextState as l}from"./ContextState.js";import{DrawBufferBack as h,DrawBufferNone as f,ColorAttachment0 as o,baseTextureUnit as u,ResourceType as c,PrimitiveType as d}from"./enums.js";import{InstanceCounter as _}from"./InstanceCounter.js";import{Parameters as b}from"./Parameters.js";import{ProgramCache as g}from"./ProgramCache.js";import{StateTracker as p}from"./renderState.js";import m from"./Texture.js";import{WebGLDriverTest as B}from"./WebGLDriverTest.js";import{Capabilities as F}from"./capabilities/Capabilities.js";const T=()=>t.getLogger("esri.views.webgl.RenderingContext");let x=class{constructor(t,e){this.gl=t,this.instanceCounter=new _,this._programCache=new g(this),this._transformFeedbackRequestInfo=null,this._state=new l,this._numOfDrawCalls=0,this._numOfTriangles=0,this._options=e,this.configure(e)}configure(t){this._options=t,this._capabilities=new F(this.gl,t),this._parameters=new b(this.gl,this._capabilities,t),m.TEXTURE_UNIT_FOR_UPDATES=this._parameters.maxTextureImageUnits-1;const s=this.gl.getParameter(this.gl.VIEWPORT);this._state=new l,this._state.viewport={x:s[0],y:s[1],width:s[2],height:s[3]},this._stateTracker=new p({setBlending:t=>{if(t){this.setBlendingEnabled(!0),this.setBlendEquationSeparate(t.opRgb,t.opAlpha),this.setBlendFunctionSeparate(t.srcRgb,t.dstRgb,t.srcAlpha,t.dstAlpha);const e=t.color;this.setBlendColor(e.r,e.g,e.b,e.a)}else this.setBlendingEnabled(!1)},setCulling:t=>{t?(this.setFaceCullingEnabled(!0),this.setCullFace(t.face),this.setFrontFace(t.mode)):this.setFaceCullingEnabled(!1)},setPolygonOffset:t=>{t?(this.setPolygonOffsetFillEnabled(!0),this.setPolygonOffset(t.factor,t.units)):this.setPolygonOffsetFillEnabled(!1)},setDepthTest:t=>{t?(this.setDepthTestEnabled(!0),this.setDepthFunction(t.func)):this.setDepthTestEnabled(!1)},setStencilTest:t=>{if(t){this.setStencilTestEnabled(!0);const e=t.function;this.setStencilFunction(e.func,e.ref,e.mask);const s=t.operation;this.setStencilOp(s.fail,s.zFail,s.zPass)}else this.setStencilTestEnabled(!1)},setDepthWrite:t=>{t?(this.setDepthWriteEnabled(!0),this.setDepthRange(t.zNear,t.zFar)):this.setDepthWriteEnabled(!1)},setColorWrite:t=>{t?this.setColorMask(t.r,t.g,t.b,t.a):this.setColorMask(!1,!1,!1,!1)},setStencilWrite:t=>{t?this.setStencilWriteMask(t.mask):this.setStencilWriteMask(0)},setDrawBuffers:t=>{if(t)this.setDrawBuffers(t.buffers);else{const{drawFramebuffer:t}=this._state;null===t?this.setDrawBuffers([h]):0===t.colorAttachments.length?this.setDrawBuffers([f]):this.setDrawBuffers([o])}}}),this.enforceState(),e(this._driverTest),this._driverTest=new B(this)}updateOptions(t){this._options={...this._options,...t},this._parameters=new b(this.gl,this._capabilities,this._options)}dispose(){this._driverTest=e(this._driverTest),this._programCache=e(this._programCache),this.bindVAO(null),this.unbindBuffer(34962),this.unbindBuffer(34963),this.unbindBuffer(35345),this._state.uniformBufferBindingPoints.length=0,this.unbindBuffer(35051),this.unbindBuffer(35052),this.unbindBuffer(36662),this.unbindBuffer(36663),this._state.textureUnitMap.length=0,this._state=null,this._capabilities=null,this._stateTracker=null,a()&&console.log(this.instanceCounter.resourceInformation)}get driverTest(){return this._driverTest}get contextAttributes(){return this.gl.getContextAttributes()}get parameters(){return this._parameters}get programCache(){return this._programCache}setPipelineState(t){this._stateTracker.setPipeline(t)}getPipelineState(){return this._stateTracker.getPipelineState()}setBlendingEnabled(t){this._state.blend!==t&&(!0===t?this.gl.enable(this.gl.BLEND):this.gl.disable(this.gl.BLEND),this._state.blend=t,this._stateTracker.invalidateBlending())}externalProgramUpdate(){this._state.program?.stop(),this._state.program=null}externalTextureUnitUpdate(t,e){for(let s=0;s<t.length;++s)this._state.textureUnitMap[t[s]]=null;e>=0&&(this._state.activeTexture=e)}externalVertexArrayObjectUpdate(){this.gl.bindVertexArray(null),this._state.vertexArrayObject=null,this._state.vertexBuffer=null,this._state.indexBuffer=null}externalVertexBufferUpdate(){this._state.vertexBuffer=null}externalIndexBufferUpdate(){this._state.indexBuffer=null}setBlendColor(t,e,s,i){t===this._state.blendColor.r&&e===this._state.blendColor.g&&s===this._state.blendColor.b&&i===this._state.blendColor.a||(this.gl.blendColor(t,e,s,i),this._state.blendColor.r=t,this._state.blendColor.g=e,this._state.blendColor.b=s,this._state.blendColor.a=i,this._stateTracker.invalidateBlending())}setBlendFunction(t,e){t===this._state.blendFunction.srcRGB&&e===this._state.blendFunction.dstRGB||(this.gl.blendFunc(t,e),this._state.blendFunction.srcRGB=t,this._state.blendFunction.srcAlpha=t,this._state.blendFunction.dstRGB=e,this._state.blendFunction.dstAlpha=e,this._stateTracker.invalidateBlending())}setBlendFunctionSeparate(t,e,s,i){this._state.blendFunction.srcRGB===t&&this._state.blendFunction.srcAlpha===s&&this._state.blendFunction.dstRGB===e&&this._state.blendFunction.dstAlpha===i||(this.gl.blendFuncSeparate(t,e,s,i),this._state.blendFunction.srcRGB=t,this._state.blendFunction.srcAlpha=s,this._state.blendFunction.dstRGB=e,this._state.blendFunction.dstAlpha=i,this._stateTracker.invalidateBlending())}setBlendEquation(t){this._state.blendEquation.mode!==t&&(this.gl.blendEquation(t),this._state.blendEquation.mode=t,this._state.blendEquation.modeAlpha=t,this._stateTracker.invalidateBlending())}setBlendEquationSeparate(t,e){this._state.blendEquation.mode===t&&this._state.blendEquation.modeAlpha===e||(this.gl.blendEquationSeparate(t,e),this._state.blendEquation.mode=t,this._state.blendEquation.modeAlpha=e,this._stateTracker.invalidateBlending())}setColorMask(t,e,s,i){this._state.colorMask.r===t&&this._state.colorMask.g===e&&this._state.colorMask.b===s&&this._state.colorMask.a===i||(this.gl.colorMask(t,e,s,i),this._state.colorMask.r=t,this._state.colorMask.g=e,this._state.colorMask.b=s,this._state.colorMask.a=i,this._stateTracker.invalidateColorWrite())}setClearColor(t,e,s,i){this._state.clearColor.r===t&&this._state.clearColor.g===e&&this._state.clearColor.b===s&&this._state.clearColor.a===i||(this.gl.clearColor(t,e,s,i),this._state.clearColor.r=t,this._state.clearColor.g=e,this._state.clearColor.b=s,this._state.clearColor.a=i)}setFaceCullingEnabled(t){this._state.faceCulling!==t&&(!0===t?this.gl.enable(this.gl.CULL_FACE):this.gl.disable(this.gl.CULL_FACE),this._state.faceCulling=t,this._stateTracker.invalidateCulling())}setPolygonOffsetFillEnabled(t){this._state.polygonOffsetFill!==t&&(!0===t?this.gl.enable(this.gl.POLYGON_OFFSET_FILL):this.gl.disable(this.gl.POLYGON_OFFSET_FILL),this._state.polygonOffsetFill=t,this._stateTracker.invalidatePolygonOffset())}setPolygonOffset(t,e){this._state.polygonOffset[0]===t&&this._state.polygonOffset[1]===e||(this._state.polygonOffset[0]=t,this._state.polygonOffset[1]=e,this.gl.polygonOffset(t,e),this._stateTracker.invalidatePolygonOffset())}setCullFace(t){this._state.cullFace!==t&&(this.gl.cullFace(t),this._state.cullFace=t,this._stateTracker.invalidateCulling())}setFrontFace(t){this._state.frontFace!==t&&(this.gl.frontFace(t),this._state.frontFace=t,this._stateTracker.invalidateCulling())}setScissorTestEnabled(t){this._state.scissorTest!==t&&(!0===t?this.gl.enable(this.gl.SCISSOR_TEST):this.gl.disable(this.gl.SCISSOR_TEST),this._state.scissorTest=t)}setScissorRect(t,e,s,i){this._state.scissorRect.x===t&&this._state.scissorRect.y===e&&this._state.scissorRect.width===s&&this._state.scissorRect.height===i||(this.gl.scissor(t,e,s,i),this._state.scissorRect.x=t,this._state.scissorRect.y=e,this._state.scissorRect.width=s,this._state.scissorRect.height=i)}setDepthTestEnabled(t){this._state.depthTest!==t&&(!0===t?this.gl.enable(this.gl.DEPTH_TEST):this.gl.disable(this.gl.DEPTH_TEST),this._state.depthTest=t,this._stateTracker.invalidateDepthTest())}setClearDepth(t){this._state.clearDepth!==t&&(this.gl.clearDepth(t),this._state.clearDepth=t)}setDepthFunction(t){this._state.depthFunction!==t&&(this.gl.depthFunc(t),this._state.depthFunction=t,this._stateTracker.invalidateDepthTest())}setDepthWriteEnabled(t){this._state.depthWrite!==t&&(this.gl.depthMask(t),this._state.depthWrite=t,this._stateTracker.invalidateDepthWrite())}setDepthRange(t,e){this._state.depthRange.zNear===t&&this._state.depthRange.zFar===e||(this.gl.depthRange(t,e),this._state.depthRange.zNear=t,this._state.depthRange.zFar=e,this._stateTracker.invalidateDepthWrite())}setStencilTestEnabled(t){this._state.stencilTest!==t&&(!0===t?this.gl.enable(this.gl.STENCIL_TEST):this.gl.disable(this.gl.STENCIL_TEST),this._state.stencilTest=t,this._stateTracker.invalidateStencilTest())}setClearStencil(t){t!==this._state.clearStencil&&(this.gl.clearStencil(t),this._state.clearStencil=t)}setStencilFunction(t,e,s){this._state.stencilFunction.func===t&&this._state.stencilFunction.ref===e&&this._state.stencilFunction.mask===s||(this.gl.stencilFunc(t,e,s),this._state.stencilFunction.face=1032,this._state.stencilFunction.func=t,this._state.stencilFunction.ref=e,this._state.stencilFunction.mask=s,this._stateTracker.invalidateStencilTest())}setStencilFunctionSeparate(t,e,s,i){this._state.stencilFunction.face===t&&this._state.stencilFunction.func===e&&this._state.stencilFunction.ref===s&&this._state.stencilFunction.mask===i||(this.gl.stencilFuncSeparate(t,e,s,i),this._state.stencilFunction.face=t,this._state.stencilFunction.func=e,this._state.stencilFunction.ref=s,this._state.stencilFunction.mask=i,this._stateTracker.invalidateStencilTest())}setStencilWriteMask(t){this._state.stencilWriteMask!==t&&(this.gl.stencilMask(t),this._state.stencilWriteMask=t,this._stateTracker.invalidateStencilWrite())}setStencilOp(t,e,s){1032===this._state.stencilOperation.face&&this._state.stencilOperation.fail===t&&this._state.stencilOperation.zFail===e&&this._state.stencilOperation.zPass===s||(this.gl.stencilOp(t,e,s),this._state.stencilOperation.face=1032,this._state.stencilOperation.fail=t,this._state.stencilOperation.zFail=e,this._state.stencilOperation.zPass=s,this._stateTracker.invalidateStencilTest())}setStencilOpSeparate(t,e,s,i){this._state.stencilOperation.face===t&&this._state.stencilOperation.fail===e&&this._state.stencilOperation.zFail===s&&this._state.stencilOperation.zPass===i||(this.gl.stencilOpSeparate(t,e,s,i),this._state.stencilOperation.face=t,this._state.stencilOperation.fail=e,this._state.stencilOperation.zFail=s,this._state.stencilOperation.zPass=i,this._stateTracker.invalidateStencilTest())}setActiveTexture(t,e=!1){const s=this._state.activeTexture;return t>=0&&(e||t!==this._state.activeTexture)&&(this.gl.activeTexture(u+t),this._state.activeTexture=t),s}setDrawBuffers(t){const{drawFramebuffer:e}=this._state,s=null===e,i=s?this._state.drawBuffers.defaultFramebuffer:this._state.drawBuffers.fbos.get(e);if(i?.length!==t.length||!i.every((e,s)=>e===t[s]))if(t.length>this.parameters.maxDrawBuffers)T().error(`Setting more active draw buffers (${t.length}) than GL.MAX_DRAW_BUFFERS allows ( ${this.parameters.maxDrawBuffers}).`);else{if(s){if(t.length>1)return void T().error(`The default framebuffer can only have 1 active draw buffer but was requested with ${t.length}.`);if(t[0]!==h&&t[0]!==f)return void T().error(`The default framebuffer can only use the constants GL.BACK or GL.NONE as draw buffers but got ${t[0]}`)}s||!t.includes(h)?(this.gl.drawBuffers(t),r(this.gl),s?this._state.drawBuffers.defaultFramebuffer=t:this._state.drawBuffers.fbos.set(e,t),this._stateTracker.invalidateDrawBuffers()):T().error("A framebuffer object can only use the constants GL.COLOR_ATTACHMENTx or GL.NONE as draw buffers.")}}clear(t,e=255){if(t){if(16384&t){const t=this._state.drawFramebuffer?.colorAttachments;t&&this.setDrawBuffers(t),this.setColorMask(!0,!0,!0,!0)}256&t&&this.setDepthWriteEnabled(!0),1024&t&&this.setStencilWriteMask(e),this.gl.clear(t)}}clearFramebuffer(t,e=!1,s=!1){let i=0;if(t){const e=1e-13,s=Math.max(e,t[3]);this.setClearColor(t[0],t[1],t[2],s),i|=16384}e&&(i|=256),!1===s?s=0:(!0===s&&(s=255),i|=1024),i&&this.clear(i,s)}clearBuffer(t,e,s=6144,i=void 0){this.gl.clearBufferfv(s,t,e,i)}clearBufferInteger(t,e,s=6144,i=void 0){this.gl.clearBufferiv(s,t,e,i)}clearBufferUnsignedInteger(t,e,s=6144,i=void 0){this.gl.clearBufferuiv(s,t,e,i)}drawArrays(t,e,s){if(this._transformFeedbackRequestInfo){if(t!==this._transformFeedbackRequestInfo.primitiveType)throw new Error("DrawArrays called during transform feedback, but primitiveType does not match that of the current transform feedback request");if(null==this._state.program?.hasTransformFeedbackVaryings)throw new Error("DrawArrays called during transform feedback, but the shader program was not linked with a transform feedback varying")}if(a()&&(this._numOfDrawCalls++,this._numOfTriangles+=k(t,s),has("enable-feature:webgl-debug:textureReadWrite"))){const t=this._state.textureUnitMap;for(let e=0;e<t.length;e++){const s=t[e];if(null!=s&&s===this._state.drawFramebuffer?.colorTexture)throw new Error(`Detected readWrite. Texture already bound at index ${e}`)}}this.gl.drawArrays(t,e,s),r(this.gl)}drawArraysInstanced(t,e,s,i){this.gl.drawArraysInstanced(t,e,s,i),r(this.gl)}drawElements(t,e,s,i){if(this._transformFeedbackRequestInfo)throw new Error("Cannot called drawElements during a transform feedback request");if(a()&&(this._numOfDrawCalls++,this._numOfTriangles+=k(t,e)),this.gl.drawElements(t,e,s,i),a()){const a=n(this.gl);if(a){const r=this.getBoundVAO(),n=r?.indexBuffer,l=r?.buffers,h={indexBuffer:n,vertexBuffers:l},f={mode:t,count:e,type:s,offset:i},o=n?.size??0,u=i+e,c=o<u?`. Buffer is too small. Attempted to draw index ${u} of ${o}`:"";T().error(`drawElements: ${a}${c}`,{args:f,vao:h})}}}drawElementsInstanced(t,e,s,i,a){this.gl.drawElementsInstanced(t,e,s,i,a),r(this.gl)}logInfo(){a()&&console.log(`DrawCalls: ${this._numOfDrawCalls}, Triangles: ${this._numOfTriangles}`)}resetInfo(){a()&&(this._numOfDrawCalls=0,this._numOfTriangles=0)}get capabilities(){return this._capabilities}setViewport(t,e,s,i){s=Math.max(Math.round(s),1),i=Math.max(Math.round(i),1);const a=this._state.viewport;a.x===t&&a.y===e&&a.width===s&&a.height===i||(a.x=t,a.y=e,a.width=s,a.height=i,this.gl.viewport(t,e,s,i))}setViewport4fv(t){this.setViewport(t[0],t[1],t[2],t[3])}restoreViewport({x:t,y:e,width:s,height:i}){this.setViewport(t,e,s,i)}getViewport(){const t=this._state.viewport;return{x:t.x,y:t.y,width:t.width,height:t.height}}useProgram(t){this._state.program!==t&&(this._state.program?.stop(),this._state.program=t,this.gl.useProgram(t?.glName??null))}bindTexture(t,e,s=!1){(e>=this.parameters.maxTextureImageUnits||e<0)&&T().error(`Input texture unit (${e}) is out of range of available units (0...${this.parameters.maxTextureImageUnits})\n `);const i=this._state.textureUnitMap[e];return null==t?.glName?(null!=i&&(this.setActiveTexture(e,s),this.gl.bindTexture(i.descriptor.target,null)),this._state.textureUnitMap[e]=null,i):s||i!==t?(this.setActiveTexture(e,s),this.gl.bindTexture(t.descriptor.target,t.glName),t.applyChanges(),this._state.textureUnitMap[e]=t,i):(t.isDirty&&(this.setActiveTexture(e,s),t.applyChanges()),i)}unbindTexture(t){if(null!=t)for(let e=0;e<this.parameters.maxTextureImageUnits;e++)this._state.textureUnitMap[e]===t&&(this.bindTexture(null,e),this._state.textureUnitMap[e]=null)}bindFramebuffer(t,e=!1){if(e||this._state.readFramebuffer!==t||this._state.drawFramebuffer!==t){if(this._stateTracker.invalidateDrawBuffers(),null==t)return this.gl.bindFramebuffer(36160,null),void(this._state.readFramebuffer=this._state.drawFramebuffer=null);t.initializeAndBind(36160),this._state.readFramebuffer=t,this._state.drawFramebuffer=t}}bindFramebufferSeparate(t,e,s=!1){const i=36008===e,a=i?this._state.readFramebuffer:this._state.drawFramebuffer;(s||a!==t)&&(null==t?this.gl.bindFramebuffer(e,null):t.initializeAndBind(e),i?this._state.readFramebuffer=t??null:(this._stateTracker.invalidateDrawBuffers(),this._state.drawFramebuffer=t??null))}blitFramebuffer(t,e,s=16384,i=9728,a=0,r=0,n=t.width,l=t.height,h=0,f=0,o=e.width,u=e.height){this.bindFramebufferSeparate(t,36008,!0),this.bindFramebufferSeparate(e,36009,!0),this.gl.blitFramebuffer(a,r,n,l,h,f,o,u,s,i)}bindBuffer(t,e){if(t)switch(e??=t.bufferType,e){case 34962:this._state.vertexBuffer=w(this.gl,t,e,this._state.vertexBuffer);break;case 34963:this._state.indexBuffer=w(this.gl,t,e,this._state.indexBuffer);break;case 35345:this._state.uniformBuffer=w(this.gl,t,e,this._state.uniformBuffer);break;case 35051:this._state.pixelPackBuffer=w(this.gl,t,e,this._state.pixelPackBuffer);break;case 35052:this._state.pixelUnpackBuffer=w(this.gl,t,e,this._state.pixelUnpackBuffer);break;case 36662:this._state.copyReadBuffer=w(this.gl,t,e,this._state.copyReadBuffer);break;case 36663:this._state.copyWriteBuffer=w(this.gl,t,e,this._state.copyWriteBuffer);break;case 35982:this._state.transformFeedbackBuffer=w(this.gl,t,e,this._state.transformFeedbackBuffer)}}bindRenderbuffer(t){const e=this.gl;t||(e.bindRenderbuffer(e.RENDERBUFFER,null),this._state.renderbuffer=null),this._state.renderbuffer!==t&&(e.bindRenderbuffer(e.RENDERBUFFER,t.glName),this._state.renderbuffer=t)}_getBufferBinding(t,e){if(e>=this.parameters.maxUniformBufferBindings||e<0)return T().error(`Uniform buffer binding point (${e}) is out of range (0...${this.parameters.maxUniformBufferBindings})\n `),null;const s=35345===t?this._state.uniformBufferBindingPoints:this._state.transformBufferBindingPoints;let i=s[e];return null==i&&(i={buffer:null,offset:0,size:0},s[e]=i),i}bindBufferBase(t,e,s){const i=this._getBufferBinding(t,e);null!=i&&(i.buffer===s&&0===i.offset&&0===i.size||(this.gl.bindBufferBase(t,e,s?s.glName:null),i.buffer=s,i.offset=0,i.size=0))}bindBufferRange(t,e,s,i,a){const r=this._getBufferBinding(t,e);null!=r&&(r.buffer===s&&r.offset===i&&r.size===a||(i%this._parameters.uniformBufferOffsetAlignment===0?(this.gl.bindBufferRange(t,e,s.glName,i,a),r.buffer=s,r.offset=i,r.size=a):T().error("Uniform buffer binding offset is not a multiple of the context offset alignment")))}bindUBO(t,e,s,i){null!=e?(a()&&(i??e.byteLength)>this._parameters.maxUniformBlockSize&&T().error("Attempting to bind more data than the maximum uniform block size"),e.initialize(),void 0!==s&&void 0!==i?this.bindBufferRange(35345,t,e.buffer,s,i):this.bindBufferBase(35345,t,e.buffer)):this.bindBufferBase(35345,t,null)}unbindUBO(t){for(let e=0,s=this._state.uniformBufferBindingPoints.length;e<s;e++){const s=this._state.uniformBufferBindingPoints[e];null!=s&&s.buffer===t.buffer&&this.bindBufferBase(35345,e,null)}}unbindBuffer(t){switch(t){case 34962:this._state.vertexBuffer=w(this.gl,null,t,this._state.vertexBuffer);break;case 34963:this._state.indexBuffer=w(this.gl,null,t,this._state.indexBuffer);break;case 35345:this._state.uniformBuffer=w(this.gl,null,t,this._state.uniformBuffer);break;case 35051:this._state.pixelPackBuffer=w(this.gl,null,t,this._state.pixelPackBuffer);break;case 35052:this._state.pixelUnpackBuffer=w(this.gl,null,t,this._state.pixelUnpackBuffer);break;case 36662:this._state.copyReadBuffer=w(this.gl,null,t,this._state.copyReadBuffer);break;case 36663:this._state.copyWriteBuffer=w(this.gl,null,t,this._state.copyWriteBuffer)}}bindVAO(t,e){if(null==t)return this._state.vertexArrayObject?.unbind(),void(this._state.vertexArrayObject=null);this._state.vertexArrayObject!==t&&(t.bind(e),this._state.vertexArrayObject=t)}bindTransformFeedback(t){const{gl:e}=this;e.bindTransformFeedback(e.TRANSFORM_FEEDBACK,t.glName)}beginTransformFeedback(t,e){if(this._transformFeedbackRequestInfo)throw new Error("Already in a transform feedback request");const{gl:s}=this;s.bindTransformFeedback(s.TRANSFORM_FEEDBACK,t.glName),s.beginTransformFeedback(e),this._transformFeedbackRequestInfo={primitiveType:e}}endTransformFeedback(){if(!this._transformFeedbackRequestInfo)throw new Error("Not in a transform feedback request");const{gl:t}=this;t.endTransformFeedback(),t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,null),this._transformFeedbackRequestInfo=null}async clientWaitAsync(t=i(10)){const{gl:e}=this,a=e.fenceSync(37143,0);if(!a)throw new Error("Client wait failed, could not create sync object");let r;this.instanceCounter.increment(c.Sync,a),e.flush();do{await s(t),r=e.clientWaitSync(a,0,0)}while(37147===r);if(this.instanceCounter.decrement(c.Sync,a),e.deleteSync(a),37149===r)throw new Error("Client wait failed")}getBoundFramebufferObject(t=36160){return 36008===t?this._state.readFramebuffer:this._state.drawFramebuffer}temporaryBindFramebufferObject(t,e,s=!1){const i=this.getBoundFramebufferObject();try{this.bindFramebuffer(t,s),e()}finally{this.bindFramebuffer(i,s)}}getBoundVAO(){return this._state.vertexArrayObject}resetState(){this.useProgram(null),this.bindVAO(null),this.bindFramebuffer(null,!0),this.unbindBuffer(34962),this.unbindBuffer(34963),this.unbindBuffer(35345),this._state.uniformBufferBindingPoints.length=0,this.unbindBuffer(35051),this.unbindBuffer(35052),this.unbindBuffer(36662),this.unbindBuffer(36663);for(let t=0;t<this.parameters.maxTextureImageUnits;++t)this.bindTexture(null,t);this.setBlendingEnabled(!1),this.setBlendFunction(1,0),this.setBlendEquation(32774),this.setBlendColor(0,0,0,0),this.setFaceCullingEnabled(!1),this.setCullFace(1029),this.setFrontFace(2305),this.setPolygonOffsetFillEnabled(!1),this.setPolygonOffset(0,0),this.setScissorTestEnabled(!1),this.setScissorRect(0,0,this.gl.canvas.width,this.gl.canvas.height),this.setDepthTestEnabled(!1),this.setDepthFunction(513),this.setDepthRange(0,1),this.setStencilTestEnabled(!1),this.setStencilFunction(519,0,0),this.setStencilOp(7680,7680,7680),this.setClearColor(0,0,0,0),this.setClearDepth(1),this.setClearStencil(0),this.setColorMask(!0,!0,!0,!0),this.setStencilWriteMask(4294967295),this.setDepthWriteEnabled(!0),this.setDrawBuffers([h]),this.setViewport(0,0,this.gl.canvas.width,this.gl.canvas.height)}enforceState(){const{gl:t}=this;t.bindVertexArray(null);for(let s=0;s<this.parameters.maxVertexAttributes;s++)t.disableVertexAttribArray(s);this._state.vertexBuffer?t.bindBuffer(this._state.vertexBuffer.bufferType,this._state.vertexBuffer.glName):t.bindBuffer(34962,null),this._state.indexBuffer?t.bindBuffer(this._state.indexBuffer.bufferType,this._state.indexBuffer.glName):t.bindBuffer(34963,null),this._state.uniformBuffer?t.bindBuffer(this._state.uniformBuffer.bufferType,this._state.uniformBuffer.glName):t.bindBuffer(35345,null);for(let s=0;s<this._parameters.maxUniformBufferBindings;s++){const e=this._state.uniformBufferBindingPoints[s];if(null!=e){const{buffer:i,offset:a,size:r}=e;null!==i?0===a&&0===r?t.bindBufferBase(35345,s,i.glName):t.bindBufferRange(35345,s,i.glName,a,r):t.bindBufferBase(35345,s,null)}}if(this._state.pixelPackBuffer?t.bindBuffer(this._state.pixelPackBuffer.bufferType,this._state.pixelPackBuffer.glName):t.bindBuffer(35051,null),this._state.pixelUnpackBuffer?t.bindBuffer(this._state.pixelUnpackBuffer.bufferType,this._state.pixelUnpackBuffer.glName):t.bindBuffer(35052,null),this._state.copyReadBuffer?t.bindBuffer(this._state.copyReadBuffer.bufferType,this._state.copyReadBuffer.glName):t.bindBuffer(36662,null),this._state.copyWriteBuffer?t.bindBuffer(this._state.copyWriteBuffer.bufferType,this._state.copyWriteBuffer.glName):t.bindBuffer(36663,null),t.bindFramebuffer(36008,null),t.readBuffer(t.BACK),this._state.readFramebuffer&&(t.bindFramebuffer(36008,this._state.readFramebuffer.glName),t.readBuffer(o)),t.bindFramebuffer(36009,this._state.drawFramebuffer?.glName??null),null===this._state.drawFramebuffer){const e=this._state.drawBuffers.defaultFramebuffer;t.drawBuffers(e??[h])}else{const e=this._state.drawBuffers.fbos.get(this._state.drawFramebuffer);t.drawBuffers(e??[o])}if(this._state.vertexArrayObject){const t=this._state.vertexArrayObject;this._state.vertexArrayObject&&(this._state.vertexArrayObject.unbind(),this._state.vertexArrayObject=null),this.bindVAO(t)}t.useProgram(this._state.program?.glName??null),t.blendColor(this._state.blendColor.r,this._state.blendColor.g,this._state.blendColor.b,this._state.blendColor.a),t.bindRenderbuffer(t.RENDERBUFFER,this._state.renderbuffer?.glName??null),!0===this._state.blend?t.enable(this.gl.BLEND):t.disable(this.gl.BLEND),t.blendEquationSeparate(this._state.blendEquation.mode,this._state.blendEquation.modeAlpha),t.blendFuncSeparate(this._state.blendFunction.srcRGB,this._state.blendFunction.dstRGB,this._state.blendFunction.srcAlpha,this._state.blendFunction.dstAlpha),t.clearColor(this._state.clearColor.r,this._state.clearColor.g,this._state.clearColor.b,this._state.clearColor.a),t.clearDepth(this._state.clearDepth),t.clearStencil(this._state.clearStencil),t.colorMask(this._state.colorMask.r,this._state.colorMask.g,this._state.colorMask.b,this._state.colorMask.a),t.cullFace(this._state.cullFace),t.depthFunc(this._state.depthFunction),t.depthRange(this._state.depthRange.zNear,this._state.depthRange.zFar),!0===this._state.depthTest?t.enable(t.DEPTH_TEST):t.disable(t.DEPTH_TEST),t.depthMask(this._state.depthWrite),t.frontFace(this._state.frontFace),t.lineWidth(1),!0===this._state.faceCulling?t.enable(t.CULL_FACE):t.disable(t.CULL_FACE),t.polygonOffset(this._state.polygonOffset[0],this._state.polygonOffset[1]),!0===this._state.polygonOffsetFill?t.enable(t.POLYGON_OFFSET_FILL):t.disable(t.POLYGON_OFFSET_FILL),t.scissor(this._state.scissorRect.x,this._state.scissorRect.y,this._state.scissorRect.width,this._state.scissorRect.height),!0===this._state.scissorTest?t.enable(t.SCISSOR_TEST):t.disable(t.SCISSOR_TEST),t.stencilFunc(this._state.stencilFunction.func,this._state.stencilFunction.ref,this._state.stencilFunction.mask),t.stencilOpSeparate(this._state.stencilOperation.face,this._state.stencilOperation.fail,this._state.stencilOperation.zFail,this._state.stencilOperation.zPass),!0===this._state.stencilTest?t.enable(t.STENCIL_TEST):t.disable(t.STENCIL_TEST),t.stencilMask(this._state.stencilWriteMask);for(let s=0;s<this.parameters.maxTextureImageUnits;s++){t.activeTexture(u+s),t.bindTexture(3553,null),t.bindTexture(34067,null),t.bindTexture(32879,null),t.bindTexture(35866,null);const e=this._state.textureUnitMap[s];null!=e&&t.bindTexture(e.descriptor.target,e.glName)}t.activeTexture(u+this._state.activeTexture);const e=this._state.viewport;t.viewport(e.x,e.y,e.width,e.height),this.resetInfo()}};function w(t,e,s,i){return e?i!==e&&t.bindBuffer(s,e.glName):t.bindBuffer(s,null),e}function k(t,e){switch(t){case d.POINTS:return 2*e;case d.TRIANGLES:return e/3;case d.TRIANGLE_STRIP:case d.TRIANGLE_FAN:return e-2;default:return 0}}export{x as RenderingContext};