@arcgis/core 4.25.0-next.20220919 → 4.25.0-next.20220921

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 (604) hide show
  1. package/AggregateGraphic.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{9f31ab2247c9defb882c.js → 01ac91fc0bc6b4d4e3c6.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{d26108352874af0b6762.js → 053564e659222e8f0efb.js} +1 -1
  5. package/assets/esri/core/workers/chunks/1c65fd714f637ac1ee8c.js +1 -0
  6. package/assets/esri/core/workers/chunks/{8588cbecb8e808f451fe.js → 249e32af1f2d433fae4c.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{5b16b30ac3166f33e81e.js → 26690f4ec1f3cb8099c2.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{be93b0cef85665446944.js → 274b4cdf6c8d77e8a2e6.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{52dcfd6b8b1dfa864e44.js → 2cae0ec5f60ab42a49aa.js} +1 -1
  10. package/assets/esri/core/workers/chunks/43e4560d65e5ddeeef6f.js +1 -0
  11. package/assets/esri/core/workers/chunks/{f436c86f86236ea7ea04.js → 4641e10e0e8e9d257521.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{7a45333de9ded92619c2.js → 466008f793c2e11e854c.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{c9d655675552dcf6cef7.js → 4a699b41072ee88f0956.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{14ea96e398f4842abe4e.js → 4fdd18f5cdaa0d82ebc1.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{9662da3e1e37f3445186.js → 562b9619b8ee13734813.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{5c1a5615c865c10209c2.js → 5880fa48bad79a7c93ab.js} +1 -1
  17. package/assets/esri/core/workers/chunks/58824250492b89ec24ea.js +1 -0
  18. package/assets/esri/core/workers/chunks/64a6b837f1d5d7ad7619.js +1 -0
  19. package/assets/esri/core/workers/chunks/{421241543afbc9a619ea.js → 64de93865088bbe0398f.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{99d56a707039d645622c.js → 6a20d8740ec2a5b2c579.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{8bab21bc6164a593278f.js → 771b92e524802de840ba.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{dbb1bf97c85848bb8ce1.js → 7ce250cc6fbe68aef50d.js} +32 -32
  23. package/assets/esri/core/workers/chunks/{2c4938512dd726a177dd.js → 7fab18074b130b71a648.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{f67357b3c6c591c9da5e.js → 872f1cb3596fb80e387f.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{3ee81834b3217720cb48.js → 8874e69378a27d155f9d.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{31de71018575457155e5.js → 8ee3da8677255b8c8709.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{2e44aee22e70857b893c.js → 93631b10452b0e0189b3.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{cb2dc84d972469445da6.js → 95cd9edca50ea163d50f.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{d31bbb13af45ce8e45dc.js → acf9f753741b677afb44.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{1455944edeba1560eb07.js → afdafa77f5ca1b9e3acc.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{cf3e1ac63580bc495ea6.js → b4da35f1093f3731f9ac.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{09f4296dcb80e3ae4b3d.js → b8eba8c9d5424a7ae5f2.js} +1 -1
  33. package/assets/esri/core/workers/chunks/bb0d86937faf0cd7d16d.js +1 -0
  34. package/assets/esri/core/workers/chunks/bf3e80023e156d5906c7.js +1 -0
  35. package/assets/esri/core/workers/chunks/{8ba83fee56dd4f306d87.js → c2a6ac7046134f725cf3.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{5d3fabe66e1bce1b30fb.js → cc7569489b572b8b3b53.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{fddd4ea487788e003fb1.js → d09f06eb4157a7c2c8ab.js} +1 -1
  38. package/assets/esri/core/workers/chunks/d1be3ab7846e3a555b6c.js +1 -0
  39. package/assets/esri/core/workers/chunks/e064035f959d68e9603f.js +1 -0
  40. package/assets/esri/core/workers/chunks/{d92975e56a1290255252.js → e09df62cf35d636b0975.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{674fa5b93704ef08c9e8.js → e0c763e05feb1c2093ba.js} +1 -1
  42. package/assets/esri/core/workers/chunks/e20e99f8f76f5002437e.js +1 -0
  43. package/assets/esri/core/workers/chunks/{51289d2f5277af4023e9.js → ed33e019bc7775db2e50.js} +1 -1
  44. package/assets/esri/core/workers/chunks/ef95d6ab7b1c032ab4ad.js +1 -0
  45. package/assets/esri/core/workers/chunks/{48aa432e1bf60c68de14.js → f0c4b408a0b88adf6576.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{169f4354a375db5de121.js → ffcbcb928b6cb8c596ad.js} +1 -1
  47. package/assets/esri/t9n/common_ar.json +1 -1
  48. package/assets/esri/t9n/common_bg.json +1 -1
  49. package/assets/esri/t9n/common_bs.json +1 -1
  50. package/assets/esri/t9n/common_ca.json +1 -1
  51. package/assets/esri/t9n/common_cs.json +1 -1
  52. package/assets/esri/t9n/common_da.json +1 -1
  53. package/assets/esri/t9n/common_de.json +1 -1
  54. package/assets/esri/t9n/common_el.json +1 -1
  55. package/assets/esri/t9n/common_es.json +1 -1
  56. package/assets/esri/t9n/common_et.json +1 -1
  57. package/assets/esri/t9n/common_fi.json +1 -1
  58. package/assets/esri/t9n/common_fr.json +1 -1
  59. package/assets/esri/t9n/common_he.json +1 -1
  60. package/assets/esri/t9n/common_hr.json +1 -1
  61. package/assets/esri/t9n/common_hu.json +1 -1
  62. package/assets/esri/t9n/common_id.json +1 -1
  63. package/assets/esri/t9n/common_it.json +1 -1
  64. package/assets/esri/t9n/common_ja.json +1 -1
  65. package/assets/esri/t9n/common_ko.json +1 -1
  66. package/assets/esri/t9n/common_lt.json +1 -1
  67. package/assets/esri/t9n/common_lv.json +1 -1
  68. package/assets/esri/t9n/common_nb.json +1 -1
  69. package/assets/esri/t9n/common_nl.json +1 -1
  70. package/assets/esri/t9n/common_pl.json +1 -1
  71. package/assets/esri/t9n/common_pt-BR.json +1 -1
  72. package/assets/esri/t9n/common_pt-PT.json +1 -1
  73. package/assets/esri/t9n/common_ro.json +1 -1
  74. package/assets/esri/t9n/common_ru.json +1 -1
  75. package/assets/esri/t9n/common_sk.json +1 -1
  76. package/assets/esri/t9n/common_sl.json +1 -1
  77. package/assets/esri/t9n/common_sr.json +1 -1
  78. package/assets/esri/t9n/common_sv.json +1 -1
  79. package/assets/esri/t9n/common_th.json +1 -1
  80. package/assets/esri/t9n/common_tr.json +1 -1
  81. package/assets/esri/t9n/common_uk.json +1 -1
  82. package/assets/esri/t9n/common_vi.json +1 -1
  83. package/assets/esri/t9n/common_zh-CN.json +1 -1
  84. package/assets/esri/t9n/common_zh-HK.json +1 -1
  85. package/assets/esri/t9n/common_zh-TW.json +1 -1
  86. package/assets/esri/themes/base/widgets/_Daylight.scss +1 -0
  87. package/assets/esri/themes/base/widgets/_Directions.scss +1 -2
  88. package/assets/esri/themes/dark/main.css +1 -1
  89. package/assets/esri/themes/light/main.css +1 -1
  90. package/assets/esri/themes/light/view.css +1 -1
  91. package/assets/esri/widgets/Feature/t9n/Feature_ar.json +1 -1
  92. package/assets/esri/widgets/Feature/t9n/Feature_bg.json +1 -1
  93. package/assets/esri/widgets/Feature/t9n/Feature_bs.json +1 -1
  94. package/assets/esri/widgets/Feature/t9n/Feature_ca.json +1 -1
  95. package/assets/esri/widgets/Feature/t9n/Feature_cs.json +1 -1
  96. package/assets/esri/widgets/Feature/t9n/Feature_da.json +1 -1
  97. package/assets/esri/widgets/Feature/t9n/Feature_de.json +1 -1
  98. package/assets/esri/widgets/Feature/t9n/Feature_el.json +1 -1
  99. package/assets/esri/widgets/Feature/t9n/Feature_es.json +1 -1
  100. package/assets/esri/widgets/Feature/t9n/Feature_et.json +1 -1
  101. package/assets/esri/widgets/Feature/t9n/Feature_fi.json +1 -1
  102. package/assets/esri/widgets/Feature/t9n/Feature_fr.json +1 -1
  103. package/assets/esri/widgets/Feature/t9n/Feature_he.json +1 -1
  104. package/assets/esri/widgets/Feature/t9n/Feature_hr.json +1 -1
  105. package/assets/esri/widgets/Feature/t9n/Feature_hu.json +1 -1
  106. package/assets/esri/widgets/Feature/t9n/Feature_id.json +1 -1
  107. package/assets/esri/widgets/Feature/t9n/Feature_it.json +1 -1
  108. package/assets/esri/widgets/Feature/t9n/Feature_ja.json +1 -1
  109. package/assets/esri/widgets/Feature/t9n/Feature_ko.json +1 -1
  110. package/assets/esri/widgets/Feature/t9n/Feature_lt.json +1 -1
  111. package/assets/esri/widgets/Feature/t9n/Feature_lv.json +1 -1
  112. package/assets/esri/widgets/Feature/t9n/Feature_nb.json +1 -1
  113. package/assets/esri/widgets/Feature/t9n/Feature_nl.json +1 -1
  114. package/assets/esri/widgets/Feature/t9n/Feature_pl.json +1 -1
  115. package/assets/esri/widgets/Feature/t9n/Feature_pt-BR.json +1 -1
  116. package/assets/esri/widgets/Feature/t9n/Feature_pt-PT.json +1 -1
  117. package/assets/esri/widgets/Feature/t9n/Feature_ro.json +1 -1
  118. package/assets/esri/widgets/Feature/t9n/Feature_ru.json +1 -1
  119. package/assets/esri/widgets/Feature/t9n/Feature_sk.json +1 -1
  120. package/assets/esri/widgets/Feature/t9n/Feature_sl.json +1 -1
  121. package/assets/esri/widgets/Feature/t9n/Feature_sr.json +1 -1
  122. package/assets/esri/widgets/Feature/t9n/Feature_sv.json +1 -1
  123. package/assets/esri/widgets/Feature/t9n/Feature_th.json +1 -1
  124. package/assets/esri/widgets/Feature/t9n/Feature_tr.json +1 -1
  125. package/assets/esri/widgets/Feature/t9n/Feature_uk.json +1 -1
  126. package/assets/esri/widgets/Feature/t9n/Feature_vi.json +1 -1
  127. package/assets/esri/widgets/Feature/t9n/Feature_zh-CN.json +1 -1
  128. package/assets/esri/widgets/Feature/t9n/Feature_zh-HK.json +1 -1
  129. package/assets/esri/widgets/Feature/t9n/Feature_zh-TW.json +1 -1
  130. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ar.json +1 -1
  131. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bg.json +1 -1
  132. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bs.json +1 -1
  133. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ca.json +1 -1
  134. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_cs.json +1 -1
  135. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_da.json +1 -1
  136. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_de.json +1 -1
  137. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_el.json +1 -1
  138. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_es.json +1 -1
  139. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_et.json +1 -1
  140. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fi.json +1 -1
  141. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fr.json +1 -1
  142. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_he.json +1 -1
  143. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hr.json +1 -1
  144. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hu.json +1 -1
  145. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_id.json +1 -1
  146. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_it.json +1 -1
  147. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ja.json +1 -1
  148. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ko.json +1 -1
  149. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
  150. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lv.json +1 -1
  151. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nb.json +1 -1
  152. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nl.json +1 -1
  153. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pl.json +1 -1
  154. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-BR.json +1 -1
  155. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-PT.json +1 -1
  156. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ro.json +1 -1
  157. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ru.json +1 -1
  158. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sk.json +1 -1
  159. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sl.json +1 -1
  160. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sr.json +1 -1
  161. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sv.json +1 -1
  162. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_th.json +1 -1
  163. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_tr.json +1 -1
  164. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_uk.json +1 -1
  165. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_vi.json +1 -1
  166. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-CN.json +1 -1
  167. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-HK.json +1 -1
  168. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-TW.json +1 -1
  169. package/assets/esri/widgets/Popup/t9n/Popup_ar.json +1 -1
  170. package/assets/esri/widgets/Popup/t9n/Popup_bg.json +1 -1
  171. package/assets/esri/widgets/Popup/t9n/Popup_bs.json +1 -1
  172. package/assets/esri/widgets/Popup/t9n/Popup_ca.json +1 -1
  173. package/assets/esri/widgets/Popup/t9n/Popup_cs.json +1 -1
  174. package/assets/esri/widgets/Popup/t9n/Popup_da.json +1 -1
  175. package/assets/esri/widgets/Popup/t9n/Popup_de.json +1 -1
  176. package/assets/esri/widgets/Popup/t9n/Popup_el.json +1 -1
  177. package/assets/esri/widgets/Popup/t9n/Popup_es.json +1 -1
  178. package/assets/esri/widgets/Popup/t9n/Popup_et.json +1 -1
  179. package/assets/esri/widgets/Popup/t9n/Popup_fi.json +1 -1
  180. package/assets/esri/widgets/Popup/t9n/Popup_fr.json +1 -1
  181. package/assets/esri/widgets/Popup/t9n/Popup_he.json +1 -1
  182. package/assets/esri/widgets/Popup/t9n/Popup_hr.json +1 -1
  183. package/assets/esri/widgets/Popup/t9n/Popup_hu.json +1 -1
  184. package/assets/esri/widgets/Popup/t9n/Popup_id.json +1 -1
  185. package/assets/esri/widgets/Popup/t9n/Popup_it.json +1 -1
  186. package/assets/esri/widgets/Popup/t9n/Popup_ja.json +1 -1
  187. package/assets/esri/widgets/Popup/t9n/Popup_ko.json +1 -1
  188. package/assets/esri/widgets/Popup/t9n/Popup_lt.json +1 -1
  189. package/assets/esri/widgets/Popup/t9n/Popup_lv.json +1 -1
  190. package/assets/esri/widgets/Popup/t9n/Popup_nb.json +1 -1
  191. package/assets/esri/widgets/Popup/t9n/Popup_nl.json +1 -1
  192. package/assets/esri/widgets/Popup/t9n/Popup_pl.json +1 -1
  193. package/assets/esri/widgets/Popup/t9n/Popup_pt-BR.json +1 -1
  194. package/assets/esri/widgets/Popup/t9n/Popup_pt-PT.json +1 -1
  195. package/assets/esri/widgets/Popup/t9n/Popup_ro.json +1 -1
  196. package/assets/esri/widgets/Popup/t9n/Popup_ru.json +1 -1
  197. package/assets/esri/widgets/Popup/t9n/Popup_sk.json +1 -1
  198. package/assets/esri/widgets/Popup/t9n/Popup_sl.json +1 -1
  199. package/assets/esri/widgets/Popup/t9n/Popup_sr.json +1 -1
  200. package/assets/esri/widgets/Popup/t9n/Popup_sv.json +1 -1
  201. package/assets/esri/widgets/Popup/t9n/Popup_th.json +1 -1
  202. package/assets/esri/widgets/Popup/t9n/Popup_tr.json +1 -1
  203. package/assets/esri/widgets/Popup/t9n/Popup_uk.json +1 -1
  204. package/assets/esri/widgets/Popup/t9n/Popup_vi.json +1 -1
  205. package/assets/esri/widgets/Popup/t9n/Popup_zh-CN.json +1 -1
  206. package/assets/esri/widgets/Popup/t9n/Popup_zh-HK.json +1 -1
  207. package/assets/esri/widgets/Popup/t9n/Popup_zh-TW.json +1 -1
  208. package/assets/esri/widgets/support/t9n/DatePicker_ar.json +1 -1
  209. package/assets/esri/widgets/support/t9n/DatePicker_bg.json +1 -1
  210. package/assets/esri/widgets/support/t9n/DatePicker_bs.json +1 -1
  211. package/assets/esri/widgets/support/t9n/DatePicker_ca.json +1 -1
  212. package/assets/esri/widgets/support/t9n/DatePicker_cs.json +1 -1
  213. package/assets/esri/widgets/support/t9n/DatePicker_da.json +1 -1
  214. package/assets/esri/widgets/support/t9n/DatePicker_de.json +1 -1
  215. package/assets/esri/widgets/support/t9n/DatePicker_el.json +1 -1
  216. package/assets/esri/widgets/support/t9n/DatePicker_es.json +1 -1
  217. package/assets/esri/widgets/support/t9n/DatePicker_et.json +1 -1
  218. package/assets/esri/widgets/support/t9n/DatePicker_fi.json +1 -1
  219. package/assets/esri/widgets/support/t9n/DatePicker_fr.json +1 -1
  220. package/assets/esri/widgets/support/t9n/DatePicker_he.json +1 -1
  221. package/assets/esri/widgets/support/t9n/DatePicker_hr.json +1 -1
  222. package/assets/esri/widgets/support/t9n/DatePicker_hu.json +1 -1
  223. package/assets/esri/widgets/support/t9n/DatePicker_id.json +1 -1
  224. package/assets/esri/widgets/support/t9n/DatePicker_it.json +1 -1
  225. package/assets/esri/widgets/support/t9n/DatePicker_ja.json +1 -1
  226. package/assets/esri/widgets/support/t9n/DatePicker_ko.json +1 -1
  227. package/assets/esri/widgets/support/t9n/DatePicker_lt.json +1 -1
  228. package/assets/esri/widgets/support/t9n/DatePicker_lv.json +1 -1
  229. package/assets/esri/widgets/support/t9n/DatePicker_nb.json +1 -1
  230. package/assets/esri/widgets/support/t9n/DatePicker_nl.json +1 -1
  231. package/assets/esri/widgets/support/t9n/DatePicker_pl.json +1 -1
  232. package/assets/esri/widgets/support/t9n/DatePicker_pt-BR.json +1 -1
  233. package/assets/esri/widgets/support/t9n/DatePicker_pt-PT.json +1 -1
  234. package/assets/esri/widgets/support/t9n/DatePicker_ro.json +1 -1
  235. package/assets/esri/widgets/support/t9n/DatePicker_ru.json +1 -1
  236. package/assets/esri/widgets/support/t9n/DatePicker_sk.json +1 -1
  237. package/assets/esri/widgets/support/t9n/DatePicker_sl.json +1 -1
  238. package/assets/esri/widgets/support/t9n/DatePicker_sr.json +1 -1
  239. package/assets/esri/widgets/support/t9n/DatePicker_sv.json +1 -1
  240. package/assets/esri/widgets/support/t9n/DatePicker_th.json +1 -1
  241. package/assets/esri/widgets/support/t9n/DatePicker_tr.json +1 -1
  242. package/assets/esri/widgets/support/t9n/DatePicker_uk.json +1 -1
  243. package/assets/esri/widgets/support/t9n/DatePicker_vi.json +1 -1
  244. package/assets/esri/widgets/support/t9n/DatePicker_zh-CN.json +1 -1
  245. package/assets/esri/widgets/support/t9n/DatePicker_zh-HK.json +1 -1
  246. package/assets/esri/widgets/support/t9n/DatePicker_zh-TW.json +1 -1
  247. package/assets/esri/widgets/support/t9n/TimePicker_ar.json +1 -1
  248. package/assets/esri/widgets/support/t9n/TimePicker_bg.json +1 -1
  249. package/assets/esri/widgets/support/t9n/TimePicker_bs.json +1 -1
  250. package/assets/esri/widgets/support/t9n/TimePicker_ca.json +1 -1
  251. package/assets/esri/widgets/support/t9n/TimePicker_cs.json +1 -1
  252. package/assets/esri/widgets/support/t9n/TimePicker_da.json +1 -1
  253. package/assets/esri/widgets/support/t9n/TimePicker_de.json +1 -1
  254. package/assets/esri/widgets/support/t9n/TimePicker_el.json +1 -1
  255. package/assets/esri/widgets/support/t9n/TimePicker_es.json +1 -1
  256. package/assets/esri/widgets/support/t9n/TimePicker_et.json +1 -1
  257. package/assets/esri/widgets/support/t9n/TimePicker_fi.json +1 -1
  258. package/assets/esri/widgets/support/t9n/TimePicker_fr.json +1 -1
  259. package/assets/esri/widgets/support/t9n/TimePicker_he.json +1 -1
  260. package/assets/esri/widgets/support/t9n/TimePicker_hr.json +1 -1
  261. package/assets/esri/widgets/support/t9n/TimePicker_hu.json +1 -1
  262. package/assets/esri/widgets/support/t9n/TimePicker_id.json +1 -1
  263. package/assets/esri/widgets/support/t9n/TimePicker_it.json +1 -1
  264. package/assets/esri/widgets/support/t9n/TimePicker_ja.json +1 -1
  265. package/assets/esri/widgets/support/t9n/TimePicker_ko.json +1 -1
  266. package/assets/esri/widgets/support/t9n/TimePicker_lt.json +1 -1
  267. package/assets/esri/widgets/support/t9n/TimePicker_lv.json +1 -1
  268. package/assets/esri/widgets/support/t9n/TimePicker_nb.json +1 -1
  269. package/assets/esri/widgets/support/t9n/TimePicker_nl.json +1 -1
  270. package/assets/esri/widgets/support/t9n/TimePicker_pl.json +1 -1
  271. package/assets/esri/widgets/support/t9n/TimePicker_pt-BR.json +1 -1
  272. package/assets/esri/widgets/support/t9n/TimePicker_pt-PT.json +1 -1
  273. package/assets/esri/widgets/support/t9n/TimePicker_ro.json +1 -1
  274. package/assets/esri/widgets/support/t9n/TimePicker_ru.json +1 -1
  275. package/assets/esri/widgets/support/t9n/TimePicker_sk.json +1 -1
  276. package/assets/esri/widgets/support/t9n/TimePicker_sl.json +1 -1
  277. package/assets/esri/widgets/support/t9n/TimePicker_sr.json +1 -1
  278. package/assets/esri/widgets/support/t9n/TimePicker_sv.json +1 -1
  279. package/assets/esri/widgets/support/t9n/TimePicker_th.json +1 -1
  280. package/assets/esri/widgets/support/t9n/TimePicker_tr.json +1 -1
  281. package/assets/esri/widgets/support/t9n/TimePicker_uk.json +1 -1
  282. package/assets/esri/widgets/support/t9n/TimePicker_vi.json +1 -1
  283. package/assets/esri/widgets/support/t9n/TimePicker_zh-CN.json +1 -1
  284. package/assets/esri/widgets/support/t9n/TimePicker_zh-HK.json +1 -1
  285. package/assets/esri/widgets/support/t9n/TimePicker_zh-TW.json +1 -1
  286. package/chunks/CheckerBoard.glsl.js +3 -3
  287. package/chunks/ColorMaterial.glsl.js +5 -5
  288. package/chunks/ComponentShader.glsl.js +1 -1
  289. package/chunks/Compositing.glsl.js +4 -19
  290. package/chunks/DefaultMaterial.glsl.js +2 -2
  291. package/chunks/HUDCompositing.glsl.js +7 -0
  292. package/chunks/HeatmapDensity.glsl.js +4 -4
  293. package/chunks/ImageMaterial.glsl.js +1 -1
  294. package/chunks/Laserlines.glsl.js +5 -5
  295. package/chunks/LineMarker.glsl.js +1 -1
  296. package/chunks/MeasurementArrow.glsl.js +3 -3
  297. package/chunks/NativeLine.glsl.js +1 -1
  298. package/chunks/OITCompositing.glsl.js +13 -0
  299. package/chunks/OverlayCompositing.glsl.js +8 -0
  300. package/chunks/Path.glsl.js +3 -3
  301. package/chunks/Pattern.glsl.js +1 -1
  302. package/chunks/Precipitation.glsl.js +3 -3
  303. package/chunks/RealisticTree.glsl.js +2 -2
  304. package/chunks/RibbonLine.glsl.js +25 -25
  305. package/chunks/ShadedColorMaterial.glsl.js +1 -1
  306. package/chunks/ShadowHighlight.glsl.js +1 -1
  307. package/chunks/SlicePlaneMaterial.glsl.js +2 -2
  308. package/chunks/Terrain.glsl.js +4 -4
  309. package/chunks/WaterSurface.glsl.js +1 -1
  310. package/chunks/ar.js +1 -1
  311. package/chunks/bg_BG.js +1 -1
  312. package/chunks/boundedPlane.js +1 -1
  313. package/chunks/bs_BA.js +1 -1
  314. package/chunks/ca_ES.js +1 -1
  315. package/chunks/cameraUtilsPlanar.js +1 -1
  316. package/chunks/cameraUtilsSpherical.js +1 -1
  317. package/chunks/cs_CZ.js +1 -1
  318. package/chunks/da_DK.js +1 -1
  319. package/chunks/de_CH.js +1 -1
  320. package/chunks/de_DE.js +1 -1
  321. package/chunks/el_GR.js +1 -1
  322. package/chunks/en_CA.js +1 -1
  323. package/chunks/en_US.js +1 -1
  324. package/chunks/es_ES.js +1 -1
  325. package/chunks/et_EE.js +1 -1
  326. package/chunks/fi_FI.js +1 -1
  327. package/chunks/fr_FR.js +1 -1
  328. package/chunks/he_IL.js +1 -1
  329. package/chunks/hr_HR.js +1 -1
  330. package/chunks/hu_HU.js +1 -1
  331. package/chunks/id_ID.js +1 -1
  332. package/chunks/index.js +1 -1
  333. package/chunks/it_IT.js +1 -1
  334. package/chunks/ja_JP.js +1 -1
  335. package/chunks/ko_KR.js +1 -1
  336. package/chunks/lt_LT.js +1 -1
  337. package/chunks/lv_LV.js +1 -1
  338. package/chunks/mat3.js +1 -1
  339. package/chunks/nb_NO.js +1 -1
  340. package/chunks/nl_NL.js +1 -1
  341. package/chunks/pl_PL.js +1 -1
  342. package/chunks/pt_BR.js +1 -1
  343. package/chunks/pt_PT.js +1 -1
  344. package/chunks/quat.js +1 -1
  345. package/chunks/quat2.js +1 -1
  346. package/chunks/quatf64.js +1 -1
  347. package/chunks/ro_RO.js +1 -1
  348. package/chunks/ru_RU.js +1 -1
  349. package/chunks/sk_SK.js +1 -1
  350. package/chunks/sl_SL.js +1 -1
  351. package/chunks/sphere.js +1 -1
  352. package/chunks/sr_RS.js +1 -1
  353. package/chunks/sv_SE.js +1 -1
  354. package/chunks/th_TH.js +1 -1
  355. package/chunks/tr_TR.js +1 -1
  356. package/chunks/uk_UA.js +1 -1
  357. package/chunks/vec3.js +1 -1
  358. package/chunks/vec3f32.js +1 -1
  359. package/chunks/vec4f64.js +1 -1
  360. package/chunks/vi_VN.js +1 -1
  361. package/chunks/zh_Hans.js +1 -1
  362. package/chunks/zh_Hant.js +1 -1
  363. package/core/VectorStack.js +1 -1
  364. package/core/libs/gl-matrix-2/factories/quatf64.js +1 -1
  365. package/core/libs/gl-matrix-2/factories/vec3f32.js +1 -1
  366. package/core/libs/gl-matrix-2/factories/vec4f64.js +1 -1
  367. package/core/libs/gl-matrix-2/math/mat3.js +1 -1
  368. package/core/libs/gl-matrix-2/math/quat.js +1 -1
  369. package/core/libs/gl-matrix-2/math/vec3.js +1 -1
  370. package/core/perspectiveUtils.js +1 -1
  371. package/core/workers/workerFactory.js +1 -1
  372. package/geohash/GeohashTree.js +1 -1
  373. package/geometry/support/MeshTransform.js +1 -1
  374. package/geometry/support/axisAngle.js +1 -1
  375. package/geometry/support/axisAngleDegrees.js +1 -1
  376. package/geometry/support/lineSegment.js +1 -1
  377. package/geometry/support/meshUtils/exporters/gltf/gltf.js +1 -1
  378. package/geometry/support/meshUtils/exporters/gltf/node.js +1 -1
  379. package/geometry/support/meshUtils/georeference.js +1 -1
  380. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  381. package/geometry/support/meshUtils/projection.js +1 -1
  382. package/geometry/support/meshUtils/rotate.js +1 -1
  383. package/geometry/support/plane.js +1 -1
  384. package/interfaces.d.ts +70 -0
  385. package/layers/VoxelWasmPerSceneView.js +1 -1
  386. package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
  387. package/layers/graphics/featureConversionUtils.js +1 -1
  388. package/layers/mixins/EditBusLayer.js +1 -1
  389. package/layers/mixins/OperationalLayer.js +1 -1
  390. package/layers/support/AggregateField.js +1 -1
  391. package/layers/support/ControlPointsGeoreference.js +1 -1
  392. package/layers/support/ExportImageServiceParameters.js +1 -1
  393. package/layers/support/OutStatistic.js +1 -1
  394. package/layers/support/VoxelVolume.js +1 -1
  395. package/layers/support/voxelPlaneUtils.js +1 -1
  396. package/package.json +1 -1
  397. package/rest/support/AggregateFeatureSet.js +5 -0
  398. package/support/revision.js +1 -1
  399. package/views/2d/ViewState.js +1 -1
  400. package/views/2d/engine/flow/FlowDisplayObject.js +1 -1
  401. package/views/2d/engine/imagery/RasterVFTile.js +1 -1
  402. package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
  403. package/views/2d/engine/webgl/OverlayContainer.js +1 -1
  404. package/views/2d/engine/webgl/TiledDisplayObject.js +1 -1
  405. package/views/2d/engine/webgl/WGLTile.js +1 -1
  406. package/views/2d/engine/webgl/WorldExtentClipRenderer.js +1 -1
  407. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  408. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  409. package/views/2d/layers/LayerView2D.js +1 -1
  410. package/views/2d/layers/features/controllers/FeatureController2D.js +1 -1
  411. package/views/2d/layers/features/schemaUtils.js +1 -1
  412. package/views/2d/layers/features/support/BinStore.js +1 -1
  413. package/views/2d/layers/features/support/ClusterStore.js +1 -1
  414. package/views/2d/layers/graphics/GraphicBoundsRenderer.js +1 -1
  415. package/views/2d/layers/imagery/ImageryView2D.js +1 -1
  416. package/views/2d/layers/support/DebugOverlay.js +1 -1
  417. package/views/2d/layers/support/ExportStrategy.js +1 -1
  418. package/views/2d/layers/support/FeatureLayerProxy.js +1 -1
  419. package/views/2d/layers/support/clusterUtils.js +1 -1
  420. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  421. package/views/3d/analysis/Dimensioning/DimensioningTool.js +1 -1
  422. package/views/3d/analysis/Dimensioning/LengthDimensionComputation.js +1 -1
  423. package/views/3d/analysis/Dimensioning/LengthDimensionSubTool.js +1 -1
  424. package/views/3d/analysis/Dimensioning/LengthDimensionVisualization.js +1 -1
  425. package/views/3d/analysis/Dimensioning/lengthDimensionUtils.js +1 -1
  426. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  427. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  428. package/views/3d/analysis/Slice/sliceToolConfig.js +1 -1
  429. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  430. package/views/3d/camera/constraintUtils/distance.js +1 -1
  431. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  432. package/views/3d/environment/CloudsComposition.js +1 -1
  433. package/views/3d/environment/CloudsCompositionParameters.js +1 -1
  434. package/views/3d/environment/CloudsGenerator.js +1 -1
  435. package/views/3d/environment/CloudsPresets.js +1 -1
  436. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  437. package/views/3d/environment/Fog.js +1 -1
  438. package/views/3d/environment/PanoramicAtmosphere.js +1 -1
  439. package/views/3d/environment/Precipitation.js +1 -1
  440. package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
  441. package/views/3d/environment/SimpleAtmosphere.js +1 -1
  442. package/views/3d/environment/weatherUtils.js +1 -1
  443. package/views/3d/externalRenderers/ExternalRendererStore.js +1 -1
  444. package/views/3d/externalRenderers/RenderContext.js +1 -1
  445. package/views/3d/glTF/internal/Resource.js +1 -1
  446. package/views/3d/interactive/Manipulator3D.js +1 -1
  447. package/views/3d/interactive/editingTools/reshapeGraphic/edgeOffsetUtils.js +1 -1
  448. package/views/3d/interactive/editingTools/settings.js +1 -1
  449. package/views/3d/interactive/editingTools/transformGraphic/ExtentTransformTool.js +1 -1
  450. package/views/3d/interactive/editingTools/transformGraphic/GraphicScaleRotateTransform.js +1 -1
  451. package/views/3d/interactive/manipulatorUtils.js +1 -1
  452. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  453. package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
  454. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  455. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  456. package/views/3d/layers/I3SMeshView3D.js +1 -1
  457. package/views/3d/layers/ImageryLayerView3D.js +1 -1
  458. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  459. package/views/3d/layers/PointCloudWorker.js +1 -1
  460. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  461. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  462. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  463. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  464. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  465. package/views/3d/layers/graphics/Graphics3DLodInstanceGraphicLayer.js +1 -1
  466. package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
  467. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  468. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  469. package/views/3d/layers/graphics/elevationAlignPointsInFeatures.js +1 -1
  470. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  471. package/views/3d/layers/i3s/I3SElevationProvider.js +1 -1
  472. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  473. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  474. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  475. package/views/3d/layers/i3s/PointRenderer.js +1 -1
  476. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  477. package/views/3d/layers/support/I3STreeDebugger.js +1 -1
  478. package/views/3d/layers/support/edgeUtils.js +1 -1
  479. package/views/3d/layers/support/uvUtils.js +1 -1
  480. package/views/3d/state/Frustum.js +1 -1
  481. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  482. package/views/3d/state/controllers/RotateController.js +1 -1
  483. package/views/3d/state/controllers/global/PinchAndPanController.js +1 -1
  484. package/views/3d/state/controllers/local/PinchAndPanController.js +1 -1
  485. package/views/3d/state/controllers/local/ZoomController.js +1 -1
  486. package/views/3d/state/controllers/momentum/ZoomPlanarMomentumController.js +1 -1
  487. package/views/3d/state/utils/navigationUtils.js +1 -1
  488. package/views/3d/support/FrustumExtentIntersection.js +1 -1
  489. package/views/3d/support/orientedBoundingBox.js +1 -1
  490. package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
  491. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  492. package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
  493. package/views/3d/support/sunUtils.js +1 -1
  494. package/views/3d/terrain/OverlayManager.js +1 -1
  495. package/views/3d/terrain/OverlayRenderer.js +1 -1
  496. package/views/3d/terrain/PatchRenderData.js +1 -1
  497. package/views/3d/terrain/TerrainRenderer.js +1 -1
  498. package/views/3d/terrain/TerrainSurface.js +1 -1
  499. package/views/3d/terrain/Tile.js +1 -1
  500. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  501. package/views/3d/webgl-engine/collections/Component/DepthRange.js +1 -1
  502. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  503. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  504. package/views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js +1 -1
  505. package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +1 -1
  506. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +2 -2
  507. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +6 -6
  508. package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +2 -2
  509. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +13 -13
  510. package/views/3d/webgl-engine/core/shaderLibrary/shading/MainLighting.glsl.js +1 -1
  511. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +9 -9
  512. package/views/3d/webgl-engine/core/shaderLibrary/util/View.glsl.js +1 -1
  513. package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechniqueRepository.js +1 -1
  514. package/views/3d/webgl-engine/core/util/TwoVectorPosition.js +1 -1
  515. package/views/3d/webgl-engine/lib/AnimationTimer.js +1 -1
  516. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  517. package/views/3d/webgl-engine/lib/Camera.js +1 -1
  518. package/views/3d/webgl-engine/lib/CompositingHelper.js +1 -1
  519. package/views/3d/webgl-engine/lib/GeometryRecord.js +1 -1
  520. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  521. package/views/3d/webgl-engine/lib/Highlight.js +1 -1
  522. package/views/3d/webgl-engine/lib/Intersector.js +1 -1
  523. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  524. package/views/3d/webgl-engine/lib/ObjectAndLayerIdRenderHelper.js +1 -1
  525. package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
  526. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  527. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  528. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  529. package/views/3d/webgl-engine/lib/Update.js +5 -0
  530. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  531. package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
  532. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  533. package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
  534. package/views/3d/webgl-engine/lib/lodRendering/InstanceData.js +1 -1
  535. package/views/3d/webgl-engine/lib/lodRendering/InstanceOctree.js +1 -1
  536. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  537. package/views/3d/webgl-engine/lib/pathGeometryUtils.js +1 -1
  538. package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
  539. package/views/3d/webgl-engine/lighting/SceneLighting.js +1 -1
  540. package/views/3d/webgl-engine/lighting/SphericalHarmonics.js +1 -1
  541. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  542. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  543. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  544. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  545. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  546. package/views/3d/webgl-engine/materials/WaterGLMaterial.js +1 -1
  547. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  548. package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
  549. package/views/3d/webgl-engine/shaders/Compositing.glsl.js +1 -1
  550. package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
  551. package/views/3d/webgl-engine/shaders/CompositingTechniqueConfiguration.js +1 -1
  552. package/views/3d/webgl-engine/shaders/HUDCompositing.glsl.js +5 -0
  553. package/views/3d/webgl-engine/shaders/HUDCompositingTechnique.js +5 -0
  554. package/views/3d/webgl-engine/shaders/OITCompositing.glsl.js +5 -0
  555. package/views/3d/webgl-engine/shaders/OITCompositingTechnique.js +5 -0
  556. package/views/3d/webgl-engine/shaders/OverlayCompositing.glsl.js +5 -0
  557. package/views/3d/webgl-engine/shaders/OverlayCompositingTechnique.js +5 -0
  558. package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
  559. package/views/SceneView.js +1 -1
  560. package/views/draw/support/surfaceCoordinateSystems.js +1 -1
  561. package/views/interactive/coordinateHelper.js +1 -1
  562. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  563. package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
  564. package/views/interactive/snapping/LineSnapper.js +1 -1
  565. package/views/interactive/snapping/ParallelLineSnapper.js +1 -1
  566. package/views/interactive/snapping/RightAngleSnapper.js +1 -1
  567. package/views/interactive/snapping/RightAngleTriangleSnapper.js +1 -1
  568. package/views/interactive/snapping/SnappingAlgorithm.js +1 -1
  569. package/views/interactive/snapping/SnappingManager.js +1 -1
  570. package/views/interactive/snapping/featureSources/FeatureCollectionSnappingSource.js +1 -1
  571. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  572. package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
  573. package/views/interactive/snapping/featureSources/SnappingCandidateElevationAligner.js +1 -1
  574. package/views/interactive/snapping/featureSources/SnappingResultElevationFilter.js +1 -1
  575. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
  576. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorkerHandle.js +1 -1
  577. package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
  578. package/views/interactive/snapping/featureSources/snappingResultElevationUtils.js +5 -0
  579. package/views/interactive/snapping/snappingUtils.js +1 -1
  580. package/views/layers/FeatureLayerView.js +1 -1
  581. package/views/navigation/PanSphericalMomentumEstimator.js +1 -1
  582. package/views/support/Scheduler.js +1 -1
  583. package/views/support/euclideanAreaMeasurementUtils.js +1 -1
  584. package/views/support/geometry3dUtils.js +1 -1
  585. package/widgets/Directions/support/resources.js +1 -1
  586. package/widgets/Directions.js +1 -1
  587. package/widgets/ElevationProfile/support/ProfileLines3D.js +1 -1
  588. package/widgets/ElevationProfile/support/constants.js +1 -1
  589. package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
  590. package/widgets/Feature/FeatureRelationship.js +1 -1
  591. package/widgets/Legend/LegendViewModel.js +1 -1
  592. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  593. package/widgets/Weather/LabeledSlider.js +1 -1
  594. package/widgets/Weather.js +1 -1
  595. package/assets/esri/core/workers/chunks/0059699bf824f851d51c.js +0 -1
  596. package/assets/esri/core/workers/chunks/01a6005569d0820992a0.js +0 -1
  597. package/assets/esri/core/workers/chunks/2eb547a0be305f2c816c.js +0 -1
  598. package/assets/esri/core/workers/chunks/36dd5654df5c7f00406d.js +0 -1
  599. package/assets/esri/core/workers/chunks/36e0a0d5f86b2b4b88f9.js +0 -1
  600. package/assets/esri/core/workers/chunks/8b8a813f5e6d6551a816.js +0 -1
  601. package/assets/esri/core/workers/chunks/bf84189bd9bf3de81df9.js +0 -1
  602. package/assets/esri/core/workers/chunks/cd7f5c3d328166f28f59.js +0 -1
  603. package/assets/esri/core/workers/chunks/de128d8a643b4297940b.js +0 -1
  604. package/assets/esri/core/workers/chunks/e208d9c34f5db4481441.js +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{_ as i}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{lerp as s}from"../../../../core/mathUtils.js";import{isNone as e,isSome as r}from"../../../../core/maybe.js";import a from"../../../../core/PooledArray.js";import{property as o}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as c}from"../../../../core/accessorSupport/decorators/subclass.js";import{a as n}from"../../../../chunks/mat4.js";import{c as h}from"../../../../chunks/mat4f64.js";import{a as l}from"../../../../chunks/vec2f64.js";import{m as p,g as u,s as d,c as f}from"../../../../chunks/vec3.js";import{Z as _,c as m}from"../../../../chunks/vec3f64.js";import{s as g,t as b,b as v}from"../../../../chunks/vec4.js";import{c as y}from"../../../../chunks/vec4f64.js";import{getReferenceEllipsoid as G}from"../../../../geometry/projectionEllipsoid.js";import{create as S,empty as B,offset as w,width as D,height as N,expand as j,intersects as V}from"../../../../geometry/support/aaBoundingRect.js";import{a as I,c as P,e as C}from"../../../../chunks/boundedPlane.js";import{create as A}from"../../../../geometry/support/ray.js";import{d as x,g as O,i as M,c as T}from"../../../../chunks/sphere.js";import{drawAccelerationStruct as z,prepare as E,drawPoly as F}from"./deconflictorDebug.js";import{VisibilityGroup as X,VisibilityFlag as R}from"./enums.js";import L from"../../support/debugFlags.js";import{Camera as Y}from"../../webgl-engine/lib/Camera.js";import{applyPrecomputedScaleFactor as k}from"../../webgl-engine/lib/screenSizePerspectiveUtils.js";import{VertexAttribute as W}from"../../webgl-engine/lib/VertexAttribute.js";import{HUDMaterial as U}from"../../webgl-engine/materials/HUDMaterial.js";const H=m(),Z=y(),q=y(),J=m(),K=h(),Q=T(),$=A(),ii=m(),ti=S();class si{constructor(){this.aabr=S(),this.distance=0,this.culled=!1,this.visible=!1}}class ei{constructor(i,t,s={}){this.graphics3DGraphic=i,this.slicePlaneEnabled=t,this.info=s}}class ri{constructor(){this.active=new Map,this.visible=new Map}clear(){this.active.clear(),this.visible.clear()}}class ai{}class oi{constructor(){this.sortArray=new a({allocator:i=>i||new ai})}}var ci;!function(i){i[i.Idle=0]="Idle",i[i.Process=1]="Process",i[i.Sort=2]="Sort",i[i.Deconflict=3]="Deconflict",i[i.NumStates=4]="NumStates"}(ci||(ci={}));class ni{constructor(){this.camera=new Y,this.slicePlane=I(),this.slicePlaneEnabled=!1}copyFrom(i){this.camera.copyFrom(i.camera),P(i.slicePlane,this.slicePlane),this.slicePlaneEnabled=i.slicePlaneEnabled}}let hi=class extends t{constructor(i){super(i),this._dirty=!1,this._runningViewState=new ni,this._state=ci.Idle,this._graphics=new ri,this._iterators=new oi,this._accBinsNumX=15,this._accBinsNumY=20,this._accBinsSizeX=0,this._accBinsSizeY=0,this._accBins=null,this.accNumTests=0}get dirty(){return this._dirty}get state(){return this._state}destroy(){this._graphics.clear(),this._iterators=null}setDirty(){!this._dirty&&this._graphics.active.size>0&&(this._dirty=!0,this.notifyChange("updating"))}get updating(){return this._state!==ci.Idle||this._dirty}get updatingProgress(){if(!this.updating)return 1;const i=this._state/ci.NumStates;return this._dirty?.5*i:i}get running(){return this.view.ready&&null!=this.view.state&&this.updating}runTask(i){switch(this._state){case ci.Idle:this._startUpdate(),i.madeProgress();case ci.Process:if(this._state=ci.Process,!this._processActiveGraphics(i))return;case ci.Sort:if(this._state=ci.Sort,!this._sortVisibleGraphics(i))return;case ci.Deconflict:if(this._state=ci.Deconflict,!this._deconflictVisibleGraphics(i))return;default:z(this,this._graphics.visible),this._state=ci.Idle,this.notifyChange("updating")}}modifyGraphics(i,t){t?i.forEach((i=>this.addToActiveGraphics(i))):i.forEach((i=>this.removeFromActiveGraphics(i))),this.setDirty()}layerSupportsDeconfliction(i){if(e(i)||"object3d"!==i.type)return!1;const t=i.stageObject;if(1!==(t?t.geometryRecords.length:0))return!1;return t.geometryRecords[0].material instanceof U}_startUpdate(){E(this.view),this._dirty=!1,this._runningViewState.copyFrom(this.viewState);const{fullWidth:i,fullHeight:t}=this._runningViewState.camera;this._initBins(i,t),this._resetIterators()}addToActiveGraphics(i){i.info[this.visibilityGroup]=new si,this._graphics.active.set(i.graphics3DGraphic.graphic.uid,i),this.setDirty()}removeFromActiveGraphics(i){this._removeFromVisibleGraphics(i),li(i,this.visibilityGroup),delete i.info[this.visibilityGroup],this._graphics.active.delete(i.graphics3DGraphic.graphic.uid),this.setDirty()}_addToVisibleGraphics(i){this._graphics.visible.set(i.graphics3DGraphic.graphic.uid,i)}_removeFromVisibleGraphics(i){this._graphics.visible.delete(i.graphics3DGraphic.graphic.uid)}_processActiveGraphics(i){const t=this._ensureActiveGraphicsIterator(),s=n(K,this._runningViewState.camera.projectionMatrix),e="global"===this.view.viewingMode&&1===this.view.map.ground.opacity&&this._runningViewState.camera.relativeElevation>0?Q:null;let a=0;for(r(e)&&(p(e,_,this._runningViewState.camera.viewMatrix),e[3]=G(this.view.spatialReference).radius,a=x(e,_));!i.done;){i.madeProgress();const r=t.next();if(!0===r.done)return this._resetActiveGraphicsIterator(),!0;const o=r.value,c=o&&o.info[this.visibilityGroup];c&&(this._collectGraphics3DGraphics(o,s,e,a),c.culled?this._removeFromVisibleGraphics(o):this._addToVisibleGraphics(o))}return!1}_sortVisibleGraphics(i){const t=this._ensureSortGraphicsIterator();for(;!i.done;){const s=t.next();if(i.madeProgress(),!0===s.done)return this._resetSortGraphicsIterator(),!0}return!1}_deconflictVisibleGraphics(i){const t=this._ensureVisibleGraphicsIterator(),s=this.visibilityGroup===X.LABEL;for(;!i.done;){i.madeProgress();const e=t.next();if(!0===e.done)return this._resetVisibleGraphicsIterator(),!0;const r=e.value,a=r.info[this.visibilityGroup];if(!a||a.culled)continue;const o=r.graphics3DGraphic,c=(!s||o.isVisible())&&!this._isConflicted(r);c&&this._addToBins(r),a.visible=c,this._setGraphicVisibility(r,c),F(a,c)}return!1}_resetIterators(){this._iterators.active=null,this._iterators.visible=null,this._iterators.sort=null}_ensureActiveGraphicsIterator(){return this._iterators.active||(this._iterators.active=pi(this._graphics.active)),this._iterators.active}_resetActiveGraphicsIterator(){this._iterators.active=null}_ensureVisibleGraphicsIterator(){return this._iterators.visible||(this._iterators.visible=pi(this._graphics.visible)),this._iterators.visible}_resetVisibleGraphicsIterator(){this._iterators.visible=null}_ensureSortGraphicsIterator(){return this._iterators.sort||(this._iterators.sort=ui(this._graphics.visible,this._iterators.sortArray,this.visibilityGroup)),this._iterators.sort}_resetSortGraphicsIterator(){this._iterators.sort=null}_collectGraphics3DGraphics(i,t,s,a){const o=i.graphics3DGraphic;if(o.destroyed)return;const c=i.info[this.visibilityGroup];if(!o.isVisible(X.GRAPHIC,R.DECONFLICTION))return void(c.culled=!0);const n=this.getGraphicsLayers(o);B(c.aabr);let h=null;for(const l of n){if(!this.layerSupportsDeconfliction(l))continue;const o=l.stageObject.geometryRecords[0].material;if(e(h)){if(h=this._getProjectionInfo(l,t,_i),h.isOutsideScreen||this._isCulledBySlice(i,H)||r(s)&&this._isCulledByHorizon(h,s,a))return void(c.culled=!0);!L.TESTS_DISABLE_OPTIMIZATIONS&&c.visible&&(h.distance*=.7)}this._expandBoundingRect(c,l,o,h)}e(h)?c.culled=!0:(c.distance=h.distance,c.culled=!1)}_getProjectionInfo(i,t,s){const e=this._runningViewState.camera,r=i.stageObject,a=r.geometryRecords[0],o=a.material,c=O(r.boundingVolumeWorldSpace.bounds);p(H,c,e.viewMatrix);const n=a.geometry.vertexAttributes,h=n.get(W.NORMAL).data,l=n.get(W.AUXPOS1).data;return o.applyShaderOffsetsView(H,h,r.transformation,l,e,s.scaleInfo,H),g(Z,H[0],H[1],H[2],1),b(q,Z,e.projectionMatrix),u(s.positionNDC,q,1/q[3]),o.applyShaderOffsetsNDC(s.positionNDC,l,e,s.positionNDC,J),s.distanceWithoutPolygonOffset=e.depthNDCToWorld(J[2]),s.distance=J[2]===s.positionNDC[2]?s.distanceWithoutPolygonOffset:e.depthNDCToWorld(s.positionNDC[2]),g(q,s.positionNDC[0],s.positionNDC[1],s.positionNDC[2],1),b(Z,q,t),v(Z,Z,1/Z[3]),d(s.positionView,H[0],H[1],H[2]),s}_isCulledByHorizon(i,t,s){return f($.direction,i.positionView),d($.origin,0,0,0),!!M(t,$,ii)&&i.distanceWithoutPolygonOffset>s}_isCulledBySlice(i,t){return i.slicePlaneEnabled&&this._runningViewState.slicePlaneEnabled&&C(this._runningViewState.slicePlane,t)}_expandBoundingRect(i,t,e,{positionNDC:r,scaleInfo:a}){const o=this._runningViewState.camera,c=t.getScreenSize(di);k(c,a.factor,c),c[0]*=o.pixelRatio,c[1]*=o.pixelRatio;const n=w(e.calculateRelativeScreenBounds(c,a.factorAlignment.scale,ti),s(0,o.fullWidth,.5+.5*r[0]),s(0,o.fullHeight,.5+.5*r[1])),h=this.iconMarginFactor;if(0!==h){const i=h*Math.min(D(n),N(n));n[0]-=i,n[1]-=i,n[2]+=i,n[3]+=i}j(i.aabr,n,i.aabr)}_isConflicted(i){const t=i.graphics3DGraphic.graphic.uid,s=i.info[this.visibilityGroup];for(let e=Math.floor(s.aabr[0]/this._accBinsSizeX);e<=Math.floor(s.aabr[2]/this._accBinsSizeX);e++)if(!(e<0||e>=this._accBinsNumX))for(let i=Math.floor(s.aabr[1]/this._accBinsSizeY);i<=Math.floor(s.aabr[3]/this._accBinsSizeY);i++){if(i<0||i>=this._accBinsNumY)continue;const r=this._accBins[e][i];for(let i=0;i<r.length;i++){const e=r.data[i],a=e.info[this.visibilityGroup];if(a&&a.visible&&(e.graphics3DGraphic.graphic.uid!==t&&(this.accNumTests++,V(a.aabr,s.aabr))))return!0}}return!1}_initBins(i,t){if(null==this._accBins){this._accBins=[];for(let i=0;i<this._accBinsNumX;i++){this._accBins.push([]);const i=this._accBins[this._accBins.length-1];for(let t=0;t<this._accBinsNumY;t++)i.push(new a)}}else for(let s=0;s<this._accBinsNumX;s++)for(let i=0;i<this._accBinsNumY;i++)this._accBins[s][i].clear();this._accBinsSizeX=i/this._accBinsNumX,this._accBinsSizeY=t/this._accBinsNumY,this.accNumTests=0}_addToBins(i){const t=i.info[this.visibilityGroup],s=Math.floor(t.aabr[0]/this._accBinsSizeX),e=Math.floor(t.aabr[2]/this._accBinsSizeX),r=Math.floor(t.aabr[1]/this._accBinsSizeY),a=Math.floor(t.aabr[3]/this._accBinsSizeY);for(let o=s;o<=e;o++)if(!(o<0||o>=this._accBinsNumX))for(let t=r;t<=a;t++)t<0||t>=this._accBinsNumY||this._accBins[o][t].push(i)}_setGraphicVisibility(i,t){const s=i.graphics3DGraphic;s.destroyed||(s.setVisibilityFlag(R.DECONFLICTION,t,this.visibilityGroup),this.visibilityGroup===X.LABEL&&this.view.labeler.setLabelGraphicVisibility(s,t))}};function li(i,t){const s=i.graphics3DGraphic;s.destroyed||s.clearVisibilityFlag(R.DECONFLICTION,t)}function*pi(i){if(Map.prototype.entries){const t=i.entries();for(let i=t.next();!i.done;i=t.next())yield i.value[1]}else yield*i.values()}function*ui(i,t,s){t.clear(),i.forEach(((i,e)=>{const r=t.pushNew();r.id=e,r.prio=i.info?-i.info[s].distance:Number.MAX_VALUE})),yield;const e=t.iterableSort(((i,t)=>t.prio-i.prio));for(let r=e.next();!r.done;r=e.next())yield;t.forAll((t=>{const s=i.get(t.id);s&&(i.delete(t.id),i.set(t.id,s))})),t.clear()}i([o({constructOnly:!0})],hi.prototype,"view",void 0),i([o({type:Boolean,readOnly:!0})],hi.prototype,"updating",null),hi=i([c("esri.views.3d.layers.graphics.Deconflictor")],hi);const di=l();class fi{constructor(){this.positionView=m(),this.positionNDC=m(),this.distance=0,this.distanceWithoutPolygonOffset=0,this.scaleInfo={factor:{scale:0,factor:0,minPixelSize:0,paddingPixels:0},factorAlignment:{scale:0,factor:0,minPixelSize:0,paddingPixels:0}}}get isOutsideScreen(){const i=this.positionNDC;return i[0]<-1||i[1]<-1||i[2]<-1||i[0]>=1||i[1]>=1}}const _i=new fi;export{hi as Deconflictor,ei as DeconflictorGraphic,ni as DeconflictorViewState,ci as State};
5
+ import{_ as i}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{lerp as s}from"../../../../core/mathUtils.js";import{isNone as e,isSome as r}from"../../../../core/maybe.js";import a from"../../../../core/PooledArray.js";import{property as o}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as c}from"../../../../core/accessorSupport/decorators/subclass.js";import{a as n}from"../../../../chunks/mat4.js";import{c as h}from"../../../../chunks/mat4f64.js";import{a as l}from"../../../../chunks/vec2f64.js";import{v as p,g as u,s as d,c as f}from"../../../../chunks/vec3.js";import{Z as _,c as m}from"../../../../chunks/vec3f64.js";import{s as g,t as b,b as v}from"../../../../chunks/vec4.js";import{c as y}from"../../../../chunks/vec4f64.js";import{getReferenceEllipsoid as G}from"../../../../geometry/projectionEllipsoid.js";import{create as S,empty as B,offset as w,width as D,height as N,expand as j,intersects as V}from"../../../../geometry/support/aaBoundingRect.js";import{a as I,c as P,e as C}from"../../../../chunks/boundedPlane.js";import{create as A}from"../../../../geometry/support/ray.js";import{d as x,g as O,i as M,c as T}from"../../../../chunks/sphere.js";import{drawAccelerationStruct as z,prepare as E,drawPoly as F}from"./deconflictorDebug.js";import{VisibilityGroup as X,VisibilityFlag as R}from"./enums.js";import L from"../../support/debugFlags.js";import{Camera as Y}from"../../webgl-engine/lib/Camera.js";import{applyPrecomputedScaleFactor as k}from"../../webgl-engine/lib/screenSizePerspectiveUtils.js";import{VertexAttribute as W}from"../../webgl-engine/lib/VertexAttribute.js";import{HUDMaterial as U}from"../../webgl-engine/materials/HUDMaterial.js";const H=m(),Z=y(),q=y(),J=m(),K=h(),Q=T(),$=A(),ii=m(),ti=S();class si{constructor(){this.aabr=S(),this.distance=0,this.culled=!1,this.visible=!1}}class ei{constructor(i,t,s={}){this.graphics3DGraphic=i,this.slicePlaneEnabled=t,this.info=s}}class ri{constructor(){this.active=new Map,this.visible=new Map}clear(){this.active.clear(),this.visible.clear()}}class ai{}class oi{constructor(){this.sortArray=new a({allocator:i=>i||new ai})}}var ci;!function(i){i[i.Idle=0]="Idle",i[i.Process=1]="Process",i[i.Sort=2]="Sort",i[i.Deconflict=3]="Deconflict",i[i.NumStates=4]="NumStates"}(ci||(ci={}));class ni{constructor(){this.camera=new Y,this.slicePlane=I(),this.slicePlaneEnabled=!1}copyFrom(i){this.camera.copyFrom(i.camera),P(i.slicePlane,this.slicePlane),this.slicePlaneEnabled=i.slicePlaneEnabled}}let hi=class extends t{constructor(i){super(i),this._dirty=!1,this._runningViewState=new ni,this._state=ci.Idle,this._graphics=new ri,this._iterators=new oi,this._accBinsNumX=15,this._accBinsNumY=20,this._accBinsSizeX=0,this._accBinsSizeY=0,this._accBins=null,this.accNumTests=0}get dirty(){return this._dirty}get state(){return this._state}destroy(){this._graphics.clear(),this._iterators=null}setDirty(){!this._dirty&&this._graphics.active.size>0&&(this._dirty=!0,this.notifyChange("updating"))}get updating(){return this._state!==ci.Idle||this._dirty}get updatingProgress(){if(!this.updating)return 1;const i=this._state/ci.NumStates;return this._dirty?.5*i:i}get running(){return this.view.ready&&null!=this.view.state&&this.updating}runTask(i){switch(this._state){case ci.Idle:this._startUpdate(),i.madeProgress();case ci.Process:if(this._state=ci.Process,!this._processActiveGraphics(i))return;case ci.Sort:if(this._state=ci.Sort,!this._sortVisibleGraphics(i))return;case ci.Deconflict:if(this._state=ci.Deconflict,!this._deconflictVisibleGraphics(i))return;default:z(this,this._graphics.visible),this._state=ci.Idle,this.notifyChange("updating")}}modifyGraphics(i,t){t?i.forEach((i=>this.addToActiveGraphics(i))):i.forEach((i=>this.removeFromActiveGraphics(i))),this.setDirty()}layerSupportsDeconfliction(i){if(e(i)||"object3d"!==i.type)return!1;const t=i.stageObject;if(1!==(t?t.geometryRecords.length:0))return!1;return t.geometryRecords[0].material instanceof U}_startUpdate(){E(this.view),this._dirty=!1,this._runningViewState.copyFrom(this.viewState);const{fullWidth:i,fullHeight:t}=this._runningViewState.camera;this._initBins(i,t),this._resetIterators()}addToActiveGraphics(i){i.info[this.visibilityGroup]=new si,this._graphics.active.set(i.graphics3DGraphic.graphic.uid,i),this.setDirty()}removeFromActiveGraphics(i){this._removeFromVisibleGraphics(i),li(i,this.visibilityGroup),delete i.info[this.visibilityGroup],this._graphics.active.delete(i.graphics3DGraphic.graphic.uid),this.setDirty()}_addToVisibleGraphics(i){this._graphics.visible.set(i.graphics3DGraphic.graphic.uid,i)}_removeFromVisibleGraphics(i){this._graphics.visible.delete(i.graphics3DGraphic.graphic.uid)}_processActiveGraphics(i){const t=this._ensureActiveGraphicsIterator(),s=n(K,this._runningViewState.camera.projectionMatrix),e="global"===this.view.viewingMode&&1===this.view.map.ground.opacity&&this._runningViewState.camera.relativeElevation>0?Q:null;let a=0;for(r(e)&&(p(e,_,this._runningViewState.camera.viewMatrix),e[3]=G(this.view.spatialReference).radius,a=x(e,_));!i.done;){i.madeProgress();const r=t.next();if(!0===r.done)return this._resetActiveGraphicsIterator(),!0;const o=r.value,c=o&&o.info[this.visibilityGroup];c&&(this._collectGraphics3DGraphics(o,s,e,a),c.culled?this._removeFromVisibleGraphics(o):this._addToVisibleGraphics(o))}return!1}_sortVisibleGraphics(i){const t=this._ensureSortGraphicsIterator();for(;!i.done;){const s=t.next();if(i.madeProgress(),!0===s.done)return this._resetSortGraphicsIterator(),!0}return!1}_deconflictVisibleGraphics(i){const t=this._ensureVisibleGraphicsIterator(),s=this.visibilityGroup===X.LABEL;for(;!i.done;){i.madeProgress();const e=t.next();if(!0===e.done)return this._resetVisibleGraphicsIterator(),!0;const r=e.value,a=r.info[this.visibilityGroup];if(!a||a.culled)continue;const o=r.graphics3DGraphic,c=(!s||o.isVisible())&&!this._isConflicted(r);c&&this._addToBins(r),a.visible=c,this._setGraphicVisibility(r,c),F(a,c)}return!1}_resetIterators(){this._iterators.active=null,this._iterators.visible=null,this._iterators.sort=null}_ensureActiveGraphicsIterator(){return this._iterators.active||(this._iterators.active=pi(this._graphics.active)),this._iterators.active}_resetActiveGraphicsIterator(){this._iterators.active=null}_ensureVisibleGraphicsIterator(){return this._iterators.visible||(this._iterators.visible=pi(this._graphics.visible)),this._iterators.visible}_resetVisibleGraphicsIterator(){this._iterators.visible=null}_ensureSortGraphicsIterator(){return this._iterators.sort||(this._iterators.sort=ui(this._graphics.visible,this._iterators.sortArray,this.visibilityGroup)),this._iterators.sort}_resetSortGraphicsIterator(){this._iterators.sort=null}_collectGraphics3DGraphics(i,t,s,a){const o=i.graphics3DGraphic;if(o.destroyed)return;const c=i.info[this.visibilityGroup];if(!o.isVisible(X.GRAPHIC,R.DECONFLICTION))return void(c.culled=!0);const n=this.getGraphicsLayers(o);B(c.aabr);let h=null;for(const l of n){if(!this.layerSupportsDeconfliction(l))continue;const o=l.stageObject.geometryRecords[0].material;if(e(h)){if(h=this._getProjectionInfo(l,t,_i),h.isOutsideScreen||this._isCulledBySlice(i,H)||r(s)&&this._isCulledByHorizon(h,s,a))return void(c.culled=!0);!L.TESTS_DISABLE_OPTIMIZATIONS&&c.visible&&(h.distance*=.7)}this._expandBoundingRect(c,l,o,h)}e(h)?c.culled=!0:(c.distance=h.distance,c.culled=!1)}_getProjectionInfo(i,t,s){const e=this._runningViewState.camera,r=i.stageObject,a=r.geometryRecords[0],o=a.material,c=O(r.boundingVolumeWorldSpace.bounds);p(H,c,e.viewMatrix);const n=a.geometry.vertexAttributes,h=n.get(W.NORMAL).data,l=n.get(W.AUXPOS1).data;return o.applyShaderOffsetsView(H,h,r.transformation,l,e,s.scaleInfo,H),g(Z,H[0],H[1],H[2],1),b(q,Z,e.projectionMatrix),u(s.positionNDC,q,1/q[3]),o.applyShaderOffsetsNDC(s.positionNDC,l,e,s.positionNDC,J),s.distanceWithoutPolygonOffset=e.depthNDCToWorld(J[2]),s.distance=J[2]===s.positionNDC[2]?s.distanceWithoutPolygonOffset:e.depthNDCToWorld(s.positionNDC[2]),g(q,s.positionNDC[0],s.positionNDC[1],s.positionNDC[2],1),b(Z,q,t),v(Z,Z,1/Z[3]),d(s.positionView,H[0],H[1],H[2]),s}_isCulledByHorizon(i,t,s){return f($.direction,i.positionView),d($.origin,0,0,0),!!M(t,$,ii)&&i.distanceWithoutPolygonOffset>s}_isCulledBySlice(i,t){return i.slicePlaneEnabled&&this._runningViewState.slicePlaneEnabled&&C(this._runningViewState.slicePlane,t)}_expandBoundingRect(i,t,e,{positionNDC:r,scaleInfo:a}){const o=this._runningViewState.camera,c=t.getScreenSize(di);k(c,a.factor,c),c[0]*=o.pixelRatio,c[1]*=o.pixelRatio;const n=w(e.calculateRelativeScreenBounds(c,a.factorAlignment.scale,ti),s(0,o.fullWidth,.5+.5*r[0]),s(0,o.fullHeight,.5+.5*r[1])),h=this.iconMarginFactor;if(0!==h){const i=h*Math.min(D(n),N(n));n[0]-=i,n[1]-=i,n[2]+=i,n[3]+=i}j(i.aabr,n,i.aabr)}_isConflicted(i){const t=i.graphics3DGraphic.graphic.uid,s=i.info[this.visibilityGroup];for(let e=Math.floor(s.aabr[0]/this._accBinsSizeX);e<=Math.floor(s.aabr[2]/this._accBinsSizeX);e++)if(!(e<0||e>=this._accBinsNumX))for(let i=Math.floor(s.aabr[1]/this._accBinsSizeY);i<=Math.floor(s.aabr[3]/this._accBinsSizeY);i++){if(i<0||i>=this._accBinsNumY)continue;const r=this._accBins[e][i];for(let i=0;i<r.length;i++){const e=r.data[i],a=e.info[this.visibilityGroup];if(a&&a.visible&&(e.graphics3DGraphic.graphic.uid!==t&&(this.accNumTests++,V(a.aabr,s.aabr))))return!0}}return!1}_initBins(i,t){if(null==this._accBins){this._accBins=[];for(let i=0;i<this._accBinsNumX;i++){this._accBins.push([]);const i=this._accBins[this._accBins.length-1];for(let t=0;t<this._accBinsNumY;t++)i.push(new a)}}else for(let s=0;s<this._accBinsNumX;s++)for(let i=0;i<this._accBinsNumY;i++)this._accBins[s][i].clear();this._accBinsSizeX=i/this._accBinsNumX,this._accBinsSizeY=t/this._accBinsNumY,this.accNumTests=0}_addToBins(i){const t=i.info[this.visibilityGroup],s=Math.floor(t.aabr[0]/this._accBinsSizeX),e=Math.floor(t.aabr[2]/this._accBinsSizeX),r=Math.floor(t.aabr[1]/this._accBinsSizeY),a=Math.floor(t.aabr[3]/this._accBinsSizeY);for(let o=s;o<=e;o++)if(!(o<0||o>=this._accBinsNumX))for(let t=r;t<=a;t++)t<0||t>=this._accBinsNumY||this._accBins[o][t].push(i)}_setGraphicVisibility(i,t){const s=i.graphics3DGraphic;s.destroyed||(s.setVisibilityFlag(R.DECONFLICTION,t,this.visibilityGroup),this.visibilityGroup===X.LABEL&&this.view.labeler.setLabelGraphicVisibility(s,t))}};function li(i,t){const s=i.graphics3DGraphic;s.destroyed||s.clearVisibilityFlag(R.DECONFLICTION,t)}function*pi(i){if(Map.prototype.entries){const t=i.entries();for(let i=t.next();!i.done;i=t.next())yield i.value[1]}else yield*i.values()}function*ui(i,t,s){t.clear(),i.forEach(((i,e)=>{const r=t.pushNew();r.id=e,r.prio=i.info?-i.info[s].distance:Number.MAX_VALUE})),yield;const e=t.iterableSort(((i,t)=>t.prio-i.prio));for(let r=e.next();!r.done;r=e.next())yield;t.forAll((t=>{const s=i.get(t.id);s&&(i.delete(t.id),i.set(t.id,s))})),t.clear()}i([o({constructOnly:!0})],hi.prototype,"view",void 0),i([o({type:Boolean,readOnly:!0})],hi.prototype,"updating",null),hi=i([c("esri.views.3d.layers.graphics.Deconflictor")],hi);const di=l();class fi{constructor(){this.positionView=m(),this.positionNDC=m(),this.distance=0,this.distanceWithoutPolygonOffset=0,this.scaleInfo={factor:{scale:0,factor:0,minPixelSize:0,paddingPixels:0},factorAlignment:{scale:0,factor:0,minPixelSize:0,paddingPixels:0}}}get isOutsideScreen(){const i=this.positionNDC;return i[0]<-1||i[1]<-1||i[2]<-1||i[0]>=1||i[1]>=1}}const _i=new fi;export{hi as Deconflictor,ei as DeconflictorGraphic,ni as DeconflictorViewState,ci as State};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import"../../../../geometry.js";import"../../../../renderers/ClassBreaksRenderer.js";import"../../../../renderers/DictionaryRenderer.js";import"../../../../renderers/DotDensityRenderer.js";import"../../../../renderers/HeatmapRenderer.js";import"../../../../renderers/PieChartRenderer.js";import"../../../../renderers/Renderer.js";import"../../../../renderers/SimpleRenderer.js";import i from"../../../../renderers/UniqueValueRenderer.js";import"../../../../renderers/support/jsonUtils.js";import"../../../../symbols.js";import t from"../../../../core/Accessor.js";import has from"../../../../core/has.js";import r from"../../../../core/Error.js";import s from"../../../../core/Handles.js";import{makeHandle as a}from"../../../../core/handleUtils.js";import n from"../../../../core/Logger.js";import{someMap as o,findInMap as l}from"../../../../core/MapUtils.js";import{isSome as h,unwrapOr as d,isNone as c,destroyMaybe as p,removeMaybe as y,get as m,unwrap as g}from"../../../../core/maybe.js";import u from"../../../../core/PooledArray.js";import{throwIfAborted as b,eachAlways as _,createDeferred as f,isAbortError as v}from"../../../../core/promiseUtils.js";import{watch as C,when as S,on as G,syncAndInitial as w,whenOnce as x}from"../../../../core/reactiveUtils.js";import{schedule as R}from"../../../../core/scheduling.js";import{property as P}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as D}from"../../../../core/accessorSupport/decorators/subclass.js";import{diff as E,isEmpty as I}from"../../../../core/accessorSupport/diffUtils.js";import{s as A,a as U,g as j}from"../../../../chunks/vec3.js";import{c as O}from"../../../../chunks/vec3f64.js";import{projectVectorToVector as V,projectXYZToVector as L,canProjectWithoutEngine as F,projectBuffer as T}from"../../../../geometry/projection.js";import{create as k,center as z,fromRect as M,equals as W}from"../../../../geometry/support/aaBoundingBox.js";import{create as N}from"../../../../geometry/support/aaBoundingRect.js";import{equals as B}from"../../../../geometry/support/spatialReferenceUtils.js";import q from"../../../../layers/Layer.js";import{getObjectId as H,computeAABB as Y,hasGeometry as $}from"../../../../layers/graphics/dehydratedFeatures.js";import{hydrateGraphic as Z}from"../../../../layers/graphics/hydratedFeatures.js";import{isSupportedRenderer3D as J,validateTo3D as Q}from"../../../../renderers/support/rendererConversion.js";import{loadArcade as K}from"../../../../support/arcadeOnDemand.js";import{getDefaultSymbol3D as X}from"../../../../symbols/support/defaults3D.js";import{to3D as ee}from"../../../../symbols/support/symbolConversion.js";import{ViewElevationProvider as ie}from"./ElevationQuery.js";import{VisibilityFlag as te,VisibilityGroup as re}from"./enums.js";import{extractExpressionInfo as se,createContext as ae}from"./featureExpressionInfoUtils.js";import{Graphics3DFeatureStore as ne}from"./Graphics3DFeatureStore.js";import oe from"./Graphics3DGraphicCreationContext.js";import{Graphics3DSymbolCreationContext as le}from"./Graphics3DSymbolCreationContext.js";import{make as he}from"./Graphics3DSymbolFactory.js";import de from"./Graphics3DWebStyleSymbol.js";import{GraphicStateTracking as ce}from"./GraphicStateTracking.js";import{computeCentroid as pe}from"./graphicUtils.js";import{ApplyRendererDiffResult as ye}from"./interfaces.js";import{LoadStatus as me}from"./Loadable.js";import{SpatialIndex2D as ge}from"./SpatialIndex2D.js";import{averageSymbolComplexities as ue,defaultSymbolComplexity as be}from"./symbolComplexity.js";import{StageLayerElevationProvider as _e}from"../support/StageLayerElevationProvider.js";import{toBoundingRect as fe}from"../../support/extentUtils.js";import{PropertiesPool as ve}from"../../support/PropertiesPool.js";import{UpdatePolicy as Ce}from"../../webgl-engine/lib/basicInterfaces.js";import{GridLocalOriginFactory as Se}from"../../webgl-engine/lib/GridLocalOriginFactory.js";import{WebGLLayer as Ge}from"../../webgl-engine/lib/WebGLLayer.js";import{ImmediateTask as we,noBudget as xe,TaskPriority as Re}from"../../../support/Scheduler.js";import Pe from"../../../../geometry/Extent.js";import De from"../../../../geometry/Point.js";import Ee from"../../../../symbols/LabelSymbol3D.js";import Ie from"../../../../symbols/TextSymbol.js";import Ae from"../../../../symbols/WebStyleSymbol.js";var Ue;const je=O(),Oe=k(),Ve="esri.views.3d.layers.graphics.Graphics3DCore",Le=n.getLogger(Ve);let Fe=Ue=class extends t{constructor(e){super(e),this._propertiesPool=new ve({computedExtent:Pe},this),this.computedExtent=null,this.currentRenderer=null,this.rendererHasGeometryOperations=!1,this._graphicStateTracking=null,this.symbolCreationContext=new le(((e,i)=>this._frameTask.schedule(e,i))),this.graphics3DGraphics=new Map,this.stageLayer=null,this.stage=null,this._graphicsDrapedUids=new Set,this._graphicsBySymbol=new Map,this._symbolConversionCache=new Map,this._symbols=new Map,this._graphicsWithoutSymbol=new Map,this._graphicsWaitingForSymbol=new Map,this._graphicsUpdateId=0,this._handles=new s,this._frameTask=we,this._suspendSymbolCleanup=!1,this._viewSpatialReference=null,this._arcadeOnDemand=null,this._rendererChangeAbortController=null,this._elevationInfoChangeAbortController=null,this._initializeAbortController=null,this._scaleVisibility=null,this._filterVisibility=null,this._spatialIndex=null,this.extentPadding=0,this._updatingPendingLoadedGraphicsChange=null,this._featureStore=null,this._deconflictor=null,this._labeler=null,this._objectStates=null,this._viewElevationProvider=null,this._stageLayerElevationProvider=null,this._sharedSymbolResourcesOwnerHandle=null,this._whenGraphics3DGraphicRequests={},this._pendingUpdates=new Map,this._numberOfGraphics=0,this._numberOfGraphicsProvidingElevation=0,this._pendingAdds=0,this._pendingRemoves=0,this._loadingSymbols=0,this._pendingUpdatesPool=new u({allocator:e=>e||new ke,deallocator:e=>(e.clear(),e)}),this._symbolWarningLogged=!1,this._geometryWarningLogged=!1,this._objectIdInvisibleSet=new Set,this._whenSymbolRemoved=new u,this.preferredUpdatePolicy=Ce.SYNC,this.forcedUpdatePolicy=null,this.elevationFeatureExpressionEnabled=!0,this.owner=null,this.layer=null,this.graphicSymbolSupported=!0,this.getRenderingInfoWithoutRenderer=!1,this.hasZ=null,this.hasM=null,this._usedMemory=0,this._visible=void 0,this._startCreateGraphics=!1}get spatialIndex(){return this._spatialIndex||(this._spatialIndex=new ge({objectIdField:this.owner.layer?.objectIdField,spatialReference:this._viewSpatialReference,hasZ:this.hasZ,hasM:this.hasM}),this._spatialIndex.setup(Array.from(this.graphics3DGraphics.values()))),this._spatialIndex.update(),this._spatialIndex}get effectiveUpdatePolicy(){return h(this.currentRenderer)&&"dictionary"===this.currentRenderer.type?Ce.ASYNC:d(this.forcedUpdatePolicy,this.preferredUpdatePolicy)}get featureStore(){return this._featureStore}get initializePromise(){return this._initializePromise}get scaleVisibility(){return this._scaleVisibility}get elevationAlignment(){return this._elevationAlignment}get objectStates(){return this._objectStates}get filterVisibility(){return this._filterVisibility}get updating(){return!!(this._graphicsWaitingForSymbol.size>0||this.running||this._elevationAlignment?.updating||h(this._scaleVisibility)&&this._scaleVisibility.updating||h(this._filterVisibility)&&this._filterVisibility.updating||this._rendererChangeAbortController||this._elevationInfoChangeAbortController||this._updatingPendingLoadedGraphicsChange||this._frameTask.updating||this._loadingSymbols>0)}get running(){return this._pendingUpdates.size>0||!!this._spatialIndex?.updating}get suspendedOrOutsideOfView(){return this.owner.suspended||this.owner.suspendInfo?.outsideOfView}get updatingRemaining(){return this.updating?this._pendingUpdates.size+.1*(this._spatialIndex?.updatingRemaining||0)+.1*(this._elevationAlignment?.updatingRemaining||0):0}get displayFeatureLimit(){const e=this.owner&&this.owner.view&&this.owner.view.qualitySettings,i=e?e.graphics3D.minTotalNumberOfFeatures:0,t=e?e.graphics3D.maxTotalNumberOfFeatures:0,r=e?e.graphics3D.maxTotalNumberOfPrimitives:0,s=this.averageSymbolComplexity,a=Math.max(1,h(s)?s.primitivesPerFeature:1),n=h(s)&&s.drawCallsPerFeature>0?t/s.drawCallsPerFeature*.3:t,o=Math.ceil(r/a),l=Math.max(i,Math.min(t,o,n)),d=this._get("displayFeatureLimit");return d&&d.minimumTotalNumberOfFeatures===i&&d.maximumTotalNumberOfFeatures===t&&d.maximumTotalNumberOfPrimitives===r&&d.averageSymbolComplexity===s&&d.maximumNumberOfFeatures===l?d:{minimumTotalNumberOfFeatures:i,maximumTotalNumberOfFeatures:t,maximumTotalNumberOfPrimitives:r,averageSymbolComplexity:s,maximumNumberOfFeatures:l}}get averageSymbolComplexity(){const e=ue(this._symbolComplexities),i=this._get("averageSymbolComplexity");return 0===e.numComplexities||h(i)&&(e.estimated&&(i.primitivesPerFeature>=e.primitivesPerFeature||i.primitivesPerCoordinate>=e.primitivesPerCoordinate||i.drawCallsPerFeature>=e.drawCallsPerFeature)||i.primitivesPerFeature===e.primitivesPerFeature&&i.primitivesPerCoordinate===e.primitivesPerCoordinate&&i.drawCallsPerFeature===e.drawCallsPerFeature)?i:e}get usedMemory(){const e=h(this.averageSymbolComplexity)&&this.labelsEnabled?this.averageSymbolComplexity.memory.bytesPerFeatureLabel*this._numberOfGraphics:0,i=this._getSymbolComplexitiesUsed().reduce(((e,i)=>e+i.memory.resourceBytes),0);return this._usedMemory+e+i}get usedMemoryPerGraphic(){if(this._usedMemory&&this._numberOfGraphics)return Math.abs(this._pendingAdds-this._pendingRemoves)/this._numberOfGraphics>30?0:this._usedMemory/this._numberOfGraphics;if(h(this.averageSymbolComplexity)){const e=this.labelsEnabled?this.averageSymbolComplexity.memory.bytesPerFeatureLabel:0;return this.averageSymbolComplexity.memory.bytesPerFeature+e}return 0}get unprocessedMemoryEstimate(){return Math.max(0,(this._pendingAdds-this._pendingRemoves)*this.usedMemoryPerGraphic)}get _symbolComplexities(){return this.currentRenderer?this._getSymbolComplexitiesUsedOrRenderer(this.currentRenderer):this._getSymbolComplexitiesUsed()}_getConvertedSymbol(e){if("web-style"===e.type)return e.clone();const i=this._symbolConversionCache.get(e.id);if(h(i))return i;const t=ee(e,{geometryType:this.layer?.geometryType,retainId:!0,hasLabelingContext:this._hasLabelingContext(e)}),r=t.symbol||null;return c(r)&&t.error&&Le.error(t.error.message),this._symbolConversionCache.set(e.id,r),r}_getSymbolComplexitiesUsedOrRenderer(e){if(c(e))return[];const i=e.getSymbols(),t="backgroundFillSymbol"in e&&e.backgroundFillSymbol;if(!(t||i&&i.length))return[];const r=[],s=this._getSymbolComplexityUsedOrRenderer(t);h(s)&&r.push(s);for(const a of i){const e=this._getSymbolComplexityUsedOrRenderer(a);h(e)&&r.push(e)}return r}_getSymbolComplexityUsedOrRenderer(e){if(c(e))return null;const i=this._symbols.get(e.id);if(h(i))return i.complexity;const t=this._getConvertedSymbol(e);return h(t)?be(t):null}_getSymbolComplexitiesUsed(){const e=[];return this._symbols.forEach((i=>{h(i)&&e.push(i.complexity)})),e}get _objectIdField(){return this.layer.objectIdField}initialize(){this._viewSpatialReference=this.owner.view.spatialReference,this._featureStore=new ne({objectIdField:this.owner.layer&&this.owner.layer.objectIdField,hasZ:this.hasZ,hasM:this.hasM,viewSpatialReference:this._viewSpatialReference,featureSpatialReference:this.owner.featureSpatialReference,getSpatialIndex:()=>this.spatialIndex,forEach:e=>this.graphics3DGraphics.forEach(e),toArray:()=>Array.from(this.graphics3DGraphics.values())});const e=(e,i,t)=>this.spatialIndex.queryGraphicUIDsInExtent(e,i,t),{componentFactories:i}=this;if(h(i.elevationAlignment)){const t=i.elevationAlignment(this,e);this._elevationAlignment=t}if(h(i.scaleVisibility)){const t=i.scaleVisibility(this,e);this._scaleVisibility=t}if(h(i.filterVisibility)){const e=i.filterVisibility({featureStore:this._featureStore,getFeatureCount:()=>this.graphics3DGraphics.size,updateFeatureVisibilities:e=>this.modifyGraphics3DGraphicVisibilities((i=>i.setVisibilityFlag(te.FILTER,e(H(i.graphic,this._objectIdField)),re.GRAPHIC))),setAllFeaturesVisibility:e=>this.modifyGraphics3DGraphicVisibilities((i=>i.setVisibilityFlag(te.FILTER,e,re.GRAPHIC))),clearFeaturesVisibility:()=>this.modifyGraphics3DGraphicVisibilities((e=>e.clearVisibilityFlag(te.FILTER)))});this._filterVisibility=e}if(h(i.deconflictor)){const e=i.deconflictor(this);this._deconflictor=e}if(h(i.labeler)&&h(this._scaleVisibility)){const e=i.labeler(this,this._scaleVisibility);this._labeler=e}if(h(i.objectStates)){const e=i.objectStates(this);this._objectStates=e}this._initializeAbortController=new AbortController,this._initializePromise=this._initializeAsync()}async _initializeAsync(){const e=this._initializeAbortController.signal,i=this.owner.view;this._viewElevationProvider=new ie(this._viewSpatialReference,i),this._initializeStage(i,this.layer.uid),this.symbolCreationContext.sharedResources=i.sharedSymbolResources,this._sharedSymbolResourcesOwnerHandle=i.sharedSymbolResources.addGraphicsOwner(this.owner),h(this.currentRenderer)&&(this.symbolCreationContext.renderer=this.currentRenderer),this.symbolCreationContext.stage=this.stage,this.symbolCreationContext.streamDataRequester=i.sharedSymbolResources.streamDataRequester,this.symbolCreationContext.renderCoordsHelper=i.renderCoordsHelper,this.symbolCreationContext.layer=this.layer,this.symbolCreationContext.graphicsCoreOwner=this.owner,this.symbolCreationContext.localOriginFactory=new Se(i.renderSpatialReference),this.symbolCreationContext.elevationProvider=i.elevationProvider,this.symbolCreationContext.notifyGraphicGeometryChanged=e=>this.notifyGraphicGeometryChanged(e),this.symbolCreationContext.notifyGraphicVisibilityChanged=e=>this.notifyGraphicVisibilityChanged(e);const t=se(this.layer.elevationInfo,this.elevationFeatureExpressionEnabled);if(this.symbolCreationContext.featureExpressionInfoContext=await ae(t,this._viewSpatialReference,e,Le),b(e),this.symbolCreationContext.screenSizePerspectiveEnabled=i.screenSizePerspectiveEnabled&&this.layer.screenSizePerspectiveEnabled,this.symbolCreationContext.slicePlaneEnabled=!!this.owner.slicePlaneEnabled,this.symbolCreationContext.physicalBasedRenderingEnabled=!!this.owner.view.qualitySettings.physicallyBasedRenderingEnabled,"drapeSourceType"in this.owner){const{owner:e}=this;this.symbolCreationContext.drapeSourceRenderer=i.basemapTerrain.overlayManager.registerGeometryDrapeSource(e),this._handles.add(a((()=>i.basemapTerrain.overlayManager.unregisterDrapeSource(e))))}this._handles.add([C((()=>this.suspendedOrOutsideOfView),(()=>this._frameTask.reschedule((()=>this._updateLayerVisibility())))),C((()=>[this.layer?.screenSizePerspectiveEnabled,this.owner.view.screenSizePerspectiveEnabled]),(()=>{const e=i.screenSizePerspectiveEnabled&&this.layer.screenSizePerspectiveEnabled;e!==this.symbolCreationContext.screenSizePerspectiveEnabled&&(this.symbolCreationContext.screenSizePerspectiveEnabled=e,this._labeler?.reset(),this.recreateAllGraphicsAndSymbols())})),C((()=>this.owner.slicePlaneEnabled),(e=>this._slicePlaneEnabledChange(!!e))),C((()=>this.owner.view.state?.pixelRatio),(()=>this._pixelRatioChange())),C((()=>this.owner.view.qualitySettings?.physicallyBasedRenderingEnabled),(e=>this._physicalBasedRenderingChange(e))),S((()=>i.basemapTerrain?.tilingScheme),(e=>{if(!e.spatialReference.equals(this.symbolCreationContext.overlaySR)&&h(i.basemapTerrain.spatialReference)&&(this.symbolCreationContext.overlaySR=i.basemapTerrain.spatialReference),this._handles.has("loaded-graphics"))this.recreateAllGraphics();else{const e=()=>this.owner?.loadedGraphics;this._handles.add([G(e,"change",(e=>{this._graphicsCollectionChanged(e),this._signalUpdatingDuringAsyncLoadedGraphicsChange()}),{onListenerAdd:()=>{this.recreateAllGraphics(),this._signalUpdatingDuringAsyncLoadedGraphicsChange()}})],"loaded-graphics")}}),{initial:!0}),C((()=>this.effectiveUpdatePolicy),(e=>{h(this.stageLayer)&&(this.stageLayer.updatePolicy=e),this.symbolCreationContext.isAsync=this.effectiveUpdatePolicy===Ce.ASYNC,e===Ce.SYNC&&this.runTask(xe)}),w)]),this._frameTask=i.resourceController.scheduler.registerTask(Re.GRAPHICS_CORE,this),this.layer&&"featureReduction"in this.layer&&this._handles.add(C((()=>this.layer.featureReduction),(()=>this._deconflictor.featureReductionChange()))),this.notifyChange("averageSymbolComplexity"),this.rendererChange(this.owner.renderer).catch((()=>{})),this._initializeAbortController=null}_abortInitialize(){this._initializeAbortController&&(this._initializeAbortController.abort(),this._initializeAbortController=null)}destroy(){this._abortInitialize(),this._abortRendererChange(),this._abortElevationInfoChange(),this.owner.view.deconflictor.removeGraphicsOwner(this),this.owner.view.labeler.removeGraphicsOwner(this),this._elevationAlignment=p(this._elevationAlignment),this._scaleVisibility=p(this._scaleVisibility),this._filterVisibility=p(this._filterVisibility),this._deconflictor=null,this._labeler=null,this._objectStates=p(this._objectStates),this.clear(),this._featureStore=p(this._featureStore),this._updatingPendingLoadedGraphicsChange=y(this._updatingPendingLoadedGraphicsChange),this._graphicStateTracking=p(this._graphicStateTracking),this.stage&&(this.stage.remove(this.stageLayer),this.stageLayer=null,this.stage=null),this._handles=p(this._handles),this._frameTask.remove(),this._frameTask=we,this._viewSpatialReference=null,this._set("owner",null);for(const e in this._whenGraphics3DGraphicRequests)this._whenGraphics3DGraphicRequests[e].reject(new r("graphic:layer-destroyed","Layer has been destroyed"));this._whenGraphics3DGraphicRequests=null,this._sharedSymbolResourcesOwnerHandle=y(this._sharedSymbolResourcesOwnerHandle),this._propertiesPool=p(this._propertiesPool),this._pendingUpdatesPool=null,this._symbolConversionCache.clear(),this._objectIdInvisibleSet.clear(),this._spatialIndex=p(this._spatialIndex)}clear(){this._objectStates?.allGraphicsDeleted(),h(this._graphicStateTracking)&&this._graphicStateTracking.allGraphicsDeleted(),this.graphics3DGraphics.forEach((e=>e.destroy())),this._spatialIndex?.clear(),this.graphics3DGraphics.clear(),this._numberOfGraphics=0,this._usedMemory=0,this._updateLayerVisibility(),this._symbols.forEach(p),this._symbols.clear(),this._graphicsBySymbol.clear(),this._graphicsWithoutSymbol.clear(),this._graphicsWaitingForSymbol.clear(),this._pendingUpdates.clear(),this._pendingUpdatesPool.clear(),this._pendingAdds=0,this._pendingRemoves=0,this.notifyChange("updating"),this.notifyChange("running"),this.notifyChange("updatingRemaining"),this._featureStore.events.emit("changed")}_initializeStage(e,i){this.stage=e._stage,this.stageLayer=new Ge({isPickable:!this.suspendedOrOutsideOfView,updatePolicy:this.effectiveUpdatePolicy},i),this.stage.add(this.stageLayer);const t=this.stageLayer.events;t.on("objectTransformation",(e=>this.notifyGraphicGeometryChanged(e.metadata.graphicUid))),t.on("visibilityChanged",(e=>this.notifyGraphicVisibilityChanged(e.metadata.graphicUid))),t.on("objectGeometryAdded",(e=>this.notifyGraphicGeometryChanged(e.object.metadata.graphicUid))),t.on("objectGeometryRemoved",(e=>this.notifyGraphicGeometryChanged(e.object.metadata.graphicUid))),t.on("vertexAttrsUpdated",(e=>this.notifyGraphicGeometryChanged(e.object.metadata.graphicUid)))}notifyGraphicGeometryChanged(e){if(c(this._graphicStateTracking)||c(e))return;const i=this.graphics3DGraphics.get(e);i&&this._graphicStateTracking.updateGraphicGeometry(i)}notifyGraphicVisibilityChanged(e){if(c(this._graphicStateTracking)||c(e))return;const i=this.graphics3DGraphics.get(e);i&&this._graphicStateTracking.updateGraphicVisibility(i)}_updateLayerVisibility(){const e=this.displayFeatureLimit.maximumNumberOfFeatures,i=this._numberOfGraphics>e*ze,t=!this.suspendedOrOutsideOfView&&!i;t!==this._visible&&(this._visible=t,t?(this.stageLayer.isPickable=!0,this.updateAllGraphicsVisibility()):(this.stageLayer.isPickable=!1,this._hideAllGraphics()),this._updateStageLayerVisibility())}_updateStageLayerVisibility(){this.stageLayer.isVisible=this._visible&&(null==this.layer.opacity||this.layer.opacity>0)}getGraphics3DGraphicById(e){return this.graphics3DGraphics.get(e)}getGraphics3DGraphicByObjectId(e){return this.owner.layer?.objectIdField?this._findGraphics3DGraphicByObjectId(e):null}_getGraphicObjectID(e,i=this.owner.layer&&this.owner.layer.objectIdField){return H(e,i)}get graphics3DGraphicsByObjectID(){const e=this.owner.layer&&this.owner.layer.objectIdField;if(!e)return null;const i=new Map;return this.graphics3DGraphics.forEach((t=>{if(!t)return;const r=t.graphic,s=this._getGraphicObjectID(r,e);h(s)&&i.set(s,t)})),i}get labelsEnabled(){return!(!this._labeler||!this._labeler.layerLabelsEnabled())}async updateLabelingInfo(e){const i=this._deconflictor&&this._deconflictor.labelingInfoChange(e),t=this._labeler&&this._labeler.labelingInfoChange(e);await _([i,t])}updateVisibilityInfo(){this._deconflictor&&this._deconflictor.labelingInfoChange(),this._labeler&&this._labeler.visibilityInfoChange()}get symbolUpdateType(){if(this._pendingUpdates.size>0)return"unknown";let e=0,i=0;return o(this._symbols,((t,r)=>{if(h(t)){const s=t.getFastUpdateStatus();if(s.loading>0)return!0;this._graphicsBySymbol.has(r)&&(i+=s.fast,e+=s.slow)}return!1}))?"unknown":i>=0&&0===e?"fast":e>=0&&0===i?"slow":"mixed"}runTask(e){this._frameTask.processQueue(e),this._applyPendingUpdates(e),this.notifyChange("running"),this.running||this.notifyChange("updating"),this.notifyChange("updatingRemaining")}setObjectIdVisibility(e,i){i?this._objectIdInvisibleSet.delete(e):this._objectIdInvisibleSet.add(e);const t=this._findGraphics3DGraphicByObjectId(e);h(t)&&this._updateUserVisibility(t)}_findGraphics3DGraphicByObjectId(e){return l(this.graphics3DGraphics,(i=>this._getGraphicObjectID(i.graphic)===e))}_updateUserVisibility(e){if(c(e))return!1;const i=e.graphic,t=this._getGraphicObjectID(i),r=i.visible&&!this.owner.suspended&&(c(t)||!this._objectIdInvisibleSet.has(t));return e.setVisibilityFlag(te.USER_SETTING,r,re.GRAPHIC)}_whenGraphics3DGraphic(e){const i=this.graphics3DGraphics.get(e.uid);if(i)return Promise.resolve(i);const t=this._whenGraphics3DGraphicRequests[e.uid];if(t)return t.promise;const r=f();return this._whenGraphics3DGraphicRequests[e.uid]=r,r.promise}async _boundsForGraphics3DGraphic(e,i){const t=this._viewSpatialReference,r=this.owner.view.renderSpatialReference,s=this.owner.view.basemapTerrain.spatialReference,a=(e,i,s)=>T(e,r,i,e,t,i,s),n=(e,i,r)=>T(e,s,i,e,t,i,r),o=this._viewElevationProvider?{service:this._viewElevationProvider,useViewElevation:h(i)&&i.useViewElevation,minDemResolution:h(i)&&i.minDemResolution,minDemResolutionForPoints:this.owner.view.resolution}:null,l=await e.getProjectedBoundingBox(a,n,o,m(i,"signal"));if(!l)return null;const c=l.boundingBox;if(l.requiresDrapedElevation){const e=this.symbolCreationContext.elevationProvider;if(e){z(c,je);const i=d(e.getElevation(je[0],je[1],0,t,"ground"),0);c[2]=Math.min(c[2],i),c[5]=Math.max(c[5],i)}}return{boundingBox:c,screenSpaceObjects:l.screenSpaceObjects}}async whenGraphicBounds(e,i){await x((()=>this.owner?.loadedGraphics));const t=this.owner.layer&&this.owner.layer.objectIdField,s=this.owner.loadedGraphics.find((i=>i===e||t&&i.attributes&&e.attributes&&i.attributes[t]===e.attributes[t]));if(!s)throw new r("internal:graphic-not-part-of-view","Graphic is not part of this view");const a=await this._whenGraphics3DGraphic(s);return this._boundsForGraphics3DGraphic(a,i)}computeAttachmentOrigin(e,i){const t=this.graphics3DGraphics.get(e.uid);if(!t)return null;const r=t.computeAttachmentOrigin();if(0===r.render.num&&0===r.draped.num)return null;A(Me,0,0,0);let s=0;if(r.render.num>0){if(!V(r.render.origin,this.symbolCreationContext.renderCoordsHelper.spatialReference,We,i))return null;U(Me,Me,We),s++}if(r.draped.num>0){const[e,t]=r.draped.origin,a=d(this._viewElevationProvider.getElevation(e,t,"ground"),0);if(A(We,e,t,a),!V(We,this._viewElevationProvider.spatialReference,We,i))return null;U(Me,Me,We),s++}return s>1&&j(Me,Me,1/s),new De({x:Me[0],y:Me[1],z:Me[2],spatialReference:i})}getSymbolLayerSize(e,i){const t=this._symbols.get(e.id);if(c(t))throw new r("internal:symbol-not-part-of-view","Symbol is not part of this view");const s=e.symbolLayers.indexOf(i);if(-1===s)throw new r("internal:missing-symbol-layer","Symbol layer is not in symbol");const a=t.getSymbolLayerSize(s);if(null==a)throw new r("internal:missing-size","Symbol layer has no valid size");return a}_graphicsCollectionChanged(e){this._startCreateGraphics&&(this.add(e.added),this.remove(e.removed))}graphicUpdateHandler(e){const i=e.graphic.uid,t=this.graphics3DGraphics.get(i);if(!c(t)||!c(this._graphicsWithoutSymbol.get(i)))switch(e.property){case"visible":this._graphicUpdateVisibleHandler(t);break;case"geometry":this._graphicUpdateGeometryHandler(t,e);break;case"symbol":this._graphicUpdateSymbolHandler(t,e);break;case"attributes":break;case"transform":this._graphicUpdateTransformHandler(t,e)}}_graphicUpdateGeometryHandler(e,i){const t=i.graphic.geometry;if(c(t))return void this._recreateGraphic(i.graphic);if(c(e)){const e=i.graphic.symbol&&i.graphic.symbol.id;if(e){const i=this._symbols.get(e);if(h(i)&&i.loadStatus===me.LOADING)return}return void this._recreateGraphic(i.graphic)}const r=e.graphics3DSymbol;!c(i.newValue)&&r.updateGeometry(e,i.newValue)||this._recreateGraphic(e.graphic),this._expandComputedExtent(t)}_graphicUpdateSymbolHandler(e,i){const t=i.graphic,r=h(e)?e.graphics3DSymbol:h(i.oldValue)?this._symbols.get(i.oldValue.id):null;if(c(r)||c(i.newValue))return void this._recreateGraphic(t);const s=r.symbol,a=this._getConvertedSymbol(i.newValue);if(h(a)&&(a.type!==s.type||"web-style"===a.type)||"web-style"===s.type)return void this._recreateGraphic(t);const n=this._graphicsBySymbol.get(s.id);if(n&&1!==n.size)return void this._recreateGraphic(t);const o=E(s,a);if(c(o))return void this._updateSymbolMapping(s.id,a);const l={diff:o,graphics3DGraphicPatches:[],symbolStatePatches:[]};if(r.prepareSymbolPatch(l),!I(l.diff))return void this._recreateGraphic(t);const d=this._getRenderingInfo(t);if(c(d))return void this._recreateGraphic(t);const p=r.extentPadding;for(const h of l.symbolStatePatches)h();if(p!==r.extentPadding&&this._recomputeExtentPadding(),h(e))for(const h of l.graphics3DGraphicPatches)h(e,d);this._updateSymbolMapping(s.id,a)}_graphicUpdateVisibleHandler(e){this._updateUserVisibility(e)&&(this._labeler&&this.owner.view.labeler.setDirty(),this.owner.view.deconflictor.setDirty())}_graphicUpdateTransformHandler(e,i){}recreateGraphics(e){this._suspendSymbolCleanup=!0,this.remove(e),this.add(e),this._suspendSymbolCleanup=!1,this.effectiveUpdatePolicy===Ce.SYNC&&this._cleanupSymbols()}_recreateGraphic(e){this.recreateGraphics([e])}_beginGraphicUpdate(e){const i=this._graphicsUpdateId;return this._graphicsUpdateId++,this._graphicsWaitingForSymbol.set(e.uid,i),1===this._graphicsWaitingForSymbol.size&&this.notifyChange("updating"),i}_endGraphicUpdate(e){e&&(this._graphicsWaitingForSymbol.delete(e.uid),0===this._graphicsWaitingForSymbol.size&&(this._cleanupSymbols(),this.notifyChange("updating")))}_recomputeExtentPadding(){let e=0;this._symbols.forEach((i=>{h(i)&&(e=Math.max(e,i.extentPadding))})),this._set("extentPadding",e)}_expandComputedExtent(e){const i=Oe,t=e.spatialReference;Y(e,i);const r=this._viewSpatialReference,s=Ue.tmpVec;if(B(t,r)||L(i[0],i[1],0,t,s,r)&&(i[0]=s[0],i[1]=s[1],L(i[3],i[4],0,t,s,r),i[3]=s[0],i[4]=s[1]),!(isFinite(i[0])&&isFinite(i[3])&&isFinite(i[1])&&isFinite(i[4])))return;const a=this.computedExtent;let n=null;const o=isFinite(i[2])&&isFinite(i[5]),l=o&&(!a||null==a.zmin||i[2]<a.zmin),h=o&&(!a||null==a.zmax||i[5]>a.zmax);if(a){(i[0]<a.xmin||i[1]<a.ymin||i[3]>a.xmax||i[4]>a.ymax||l||h)&&(n=this._propertiesPool.get("computedExtent"),n.xmin=Math.min(i[0],a.xmin),n.ymin=Math.min(i[1],a.ymin),n.xmax=Math.max(i[3],a.xmax),n.ymax=Math.max(i[4],a.ymax),n.spatialReference=r)}else n=this._propertiesPool.get("computedExtent"),n.xmin=i[0],n.ymin=i[1],n.xmax=i[3],n.ymax=i[4],n.spatialReference=r;n&&(l&&(n.zmin=i[2]),h&&(n.zmax=i[5]),this._set("computedExtent",n))}_abortElevationInfoChange(){this._elevationInfoChangeAbortController&&(this._elevationInfoChangeAbortController.abort(),this._elevationInfoChangeAbortController=null)}async elevationInfoChange(){this._abortElevationInfoChange();const e=new AbortController;this._elevationInfoChangeAbortController=e;const i=se(this.layer.elevationInfo,this.elevationFeatureExpressionEnabled);this.symbolCreationContext.featureExpressionInfoContext=await ae(i,this._viewSpatialReference,e.signal,Le),b(e.signal),this._elevationInfoChangeAbortController=null,this._labeler?.elevationInfoChange(),this.forEachGraphics3DSymbol(((e,i,t)=>{e.globalPropertyChanged("elevationInfo",i)?i.forEach((e=>{const i=e.graphic,t=e.labelGraphics;for(const r of t){r.graphics3DSymbolLayer.updateGraphicElevationContext(i,r)}})):this._recreateSymbol(t)})),this.updateStageLayerElevationProvider(),this._elevationAlignment?.elevationInfoChange()}updateStageLayerElevationProvider(){this._stageLayerElevationProvider?(this.layer.elevationInfo&&"relative-to-scene"===this.layer.elevationInfo.mode||0===this._numberOfGraphicsProvidingElevation)&&(this.owner.view.elevationProvider.unregister(this._stageLayerElevationProvider),this._stageLayerElevationProvider.dispose(),this._stageLayerElevationProvider=null):(!this.layer.elevationInfo||this.layer.elevationInfo&&"relative-to-scene"!==this.layer.elevationInfo.mode)&&this._numberOfGraphicsProvidingElevation>0&&(this._stageLayerElevationProvider=new _e({layer:this.layer,stageLayer:this.stageLayer,view:this.owner.view}),this.owner.view.elevationProvider.register("scene",this._stageLayerElevationProvider))}_clearSymbolsAndGraphics(){this.clear(),h(this._filterVisibility)&&this._filterVisibility.clear(),this._labeler?.reset(),this._deconflictor?.clear(),this._elevationAlignment?.clear(),this.stageLayer?.invalidateSpatialQueryAccelerator(),this._stageLayerElevationProvider&&(this.owner.view.elevationProvider.unregister(this._stageLayerElevationProvider),this._stageLayerElevationProvider.dispose(),this._stageLayerElevationProvider=null)}startCreateGraphics(){this._startCreateGraphics=!0,this.recreateAllGraphics()}recreateAllGraphics(){this._recreateAllGraphics(!1)}recreateAllGraphicsAndSymbols(){this._recreateAllGraphics(!0)}_recreateAllGraphics(e=!1){if(!this._startCreateGraphics)return;const{loadedGraphics:i,view:t}=this.owner,r=t.basemapTerrain.tilingScheme&&i&&i.length?i.toArray():null;!e&&r||this._clearSymbolsAndGraphics(),this.symbolCreationContext.screenSizePerspectiveEnabled=this.owner.view.screenSizePerspectiveEnabled&&this.layer.screenSizePerspectiveEnabled,this.symbolCreationContext.slicePlaneEnabled=!!this.owner.slicePlaneEnabled,this._set("computedExtent",null),r&&(e?this.add(r):this.recreateGraphics(r))}_recreateSymbol(e){const i=this._graphicsBySymbol.get(e),t=[];i&&(i.forEach(((e,i)=>{const r=e.usedMemory;this._conditionalRemove(e,i),this._spatialIndex?.remove(e),t.push(e.graphic),e.destroy(),this._removeGraphics3DGraphic(i,r),this._updateLayerVisibility(),this._featureStore.events.emit("changed")})),this._graphicsBySymbol.set(e,new Map));const r=this._symbols.get(e);p(r),this._symbols.delete(e),this.add(t)}_recreateGraphicsForSymbol(e){const i=this._graphicsBySymbol.get(e);if(i){const e=[];i.forEach((i=>e.push(i.graphic))),this.recreateGraphics(e)}}_conditionalRemove(e,i){this._graphicsDrapedUids.delete(i),this._objectStates?.removeGraphic(e),this._labeler?.removeGraphic(e),this._deconflictor?.removeGraphic(e),h(this._graphicStateTracking)&&this._graphicStateTracking.removeGraphic(e)}add(e){e&&0!==e.length&&(this.owner.view.basemapTerrain&&this.owner.view.basemapTerrain.tilingScheme?(this._updatePolicyForGraphics(e)===Ce.ASYNC?this._addDelayed(e):this._addImmediate(e),this.notifyChange("updating")):Le.error("#add()","Cannot add graphics before terrain surface has been initialized"))}_updatePolicyForGraphics(e){if(this.effectiveUpdatePolicy===Ce.SYNC&&("mesh"===this.layer.geometryType||null==this.layer.geometryType))for(const i of e)if(h(i.geometry)&&"mesh"===i.geometry.type&&!i.geometry.loaded)return Ce.ASYNC;return this.effectiveUpdatePolicy}_addImmediate(e){this._geometryWarningLogged=!1,this._symbolWarningLogged=!1;for(const i of e)this._addGraphic(i,this._getRenderingInfo(i,Le),Ce.SYNC);this._cleanupSymbols(),this._labeler&&(this.owner.view.labeler.setDirty(),this._cleanupSymbols()),this.owner.view.deconflictor.setDirty()}_addDelayed(e){for(const i of e){const e=i.uid;let t=this._pendingUpdates.get(e);t?t.add?t.state!==Te.NEW&&t.abortController.abort():this._pendingAdds++:(t=this._pendingUpdatesPool.pushNew(),this._pendingAdds++,this._pendingUpdates.set(e,t)),t.add=i}this.notifyChange("running"),this.notifyChange("updatingRemaining")}remove(e){this.effectiveUpdatePolicy===Ce.ASYNC?this._removeDelayed(e):this._removeImmediate(e),this.notifyChange("updating")}_removeImmediate(e){for(const i of e)this._removeGraphic(i);this._cleanupSymbols(),this._labeler&&this.owner.view.labeler.setDirty(),this.owner.view.deconflictor.setDirty()}_removeDelayed(e){for(const i of e){const e=i.uid,t=this._pendingUpdates.get(e);if(t)t.add&&(t.remove?t.add=null:this._pendingUpdates.delete(e),t.state===Te.LOADING&&t.abortController.abort(),this._pendingAdds--);else{const t=this._pendingUpdatesPool.pushNew();t.remove=i,this._pendingUpdates.set(e,t),this._pendingRemoves++}}0===this._pendingUpdates.size&&this._finishPendingUpdates(),this.notifyChange("running"),this.notifyChange("updatingRemaining")}_finishPendingUpdates(){this._pendingUpdatesPool.clear(),this._cleanupSymbols(),(this._pendingAdds||this._pendingRemoves)&&Le.warn("pendingAdds/Removes in inconsistent state!"),this._pendingAdds=0,this._pendingRemoves=0}_applyPendingUpdates(e){if(this._geometryWarningLogged=!1,this._symbolWarningLogged=!1,0===this._pendingUpdates.size&&this._spatialIndex?.updating)this._spatialIndex.update();else{for(const[i,t]of this._pendingUpdates){if(e.done)break;t.add&&t.state===Te.NEW&&this._processPendingUpdateNew(t);let r=this.effectiveUpdatePolicy;if(!t.remove||t.add&&t.state!==Te.READY||(this._pendingRemoves--,e.madeProgress(),this._removeGraphic(t.remove),t.remove=null,r=Ce.SYNC),t.add)switch(t.state){case Te.READY:this._addGraphic(t.add,t.renderingInfo,r),t.add=null,this._pendingAdds--,e.madeProgress();break;case Te.REJECTED:t.add=null,this._pendingAdds--;case Te.LOADING:}null==t.remove&&null==t.add&&this._pendingUpdates.delete(i)}0===this._pendingUpdates.size&&(this._finishPendingUpdates(),this.notifyChange("running"))}}_processPendingUpdateNew(e){if(!e.add)return void(e.state=Te.READY);const i=e.add.geometry;h(i)&&"mesh"===i.type&&!i.loaded?this._processPendingUpdateNewMesh(e,i):this._processPendingUpdateNewRenderingInfo(e)}async _processPendingUpdateNewMesh(e,i){e.state=Te.LOADING,e.abortController=new AbortController;const t=e.abortController.signal;try{await i.load({signal:t})}catch(r){return this._processPendingUpdateNewError(e,r)}e.abortController=null,this._processPendingUpdateNewRenderingInfo(e)}_processPendingUpdateNewError(e,i){e.abortController=null,v(i)?e.state=Te.NEW:e.state=Te.REJECTED}async _processPendingUpdateNewRenderingInfo(e){if(c(this.layer.renderer)||"dictionary"!==this.layer.renderer.type)return e.renderingInfo=this._getRenderingInfo(e.add,Le),void(e.state=Te.READY);e.state=Te.LOADING,e.abortController=new AbortController;let i=null;try{i=await this._getRenderingInfoAsync(e.add,{signal:e.abortController.signal})}catch(t){return e.abortController=null,void(v(t)?e.state=Te.NEW:e.state=Te.REJECTED)}c(i)||c(i.symbol)?(Le&&!this._symbolWarningLogged&&(this._symbolWarningLogged=!0,Le.warn(`Graphic in layer ${this.layer.id} has no symbol and will not render`)),e.renderingInfo=null):e.renderingInfo=i,e.state=Te.READY}_addGraphic(e,i,t){if(this._graphicsWithoutSymbol.set(e.uid,e),c(i)||c(i.symbol)||!$(e))return;has("enable-feature:objectAndLayerId-rendering")&&this.stage.renderView._objectAndLayerIdRenderHelper.setUidToObjectAndLayerId(e.objectId,e.uid,this.layer.id,this.layer.uid);const r=i.symbol,s=this.getOrCreateGraphics3DSymbol(r,i.renderer);if(c(s))return;this._expandComputedExtent(e.geometry);const a=this._beginGraphicUpdate(e),n=new oe(e,i,this.layer);let o=!1;const l=e=>{e===s.symbol.id&&(o=!0)};this._whenSymbolRemoved.push(l);const d=()=>{if(--this._loadingSymbols,this.destroyed)return;this._whenSymbolRemoved.removeUnordered(l);if(this._graphicsWaitingForSymbol.get(e.uid)!==a||o||s.destroyed||this.graphicSymbolSupported&&e.symbol&&e.symbol.id!==s.symbol.id)--s.referenced,this._cleanupSymbols();else{const i=this._createGraphics3DGraphic(s,n);this._spatialIndex&&h(i)&&this._spatialIndex.add(i),--s.referenced,this._endGraphicUpdate(e)}this._featureStore.events.emit("changed"),this._labeler&&this.owner.view.labeler.setDirty()},p=i=>{--this._loadingSymbols,this.destroyed||(this._whenSymbolRemoved.removeUnordered(l),o||(v(i)?this.add([e]):s.destroyed||this._endGraphicUpdate(e)))};++this._loadingSymbols,t===Ce.ASYNC?s.load((()=>this._frameTask.schedule(d)),(e=>this._frameTask.schedule((()=>p(e))))):s.load(d,p)}_removeGraphic(e){const i=e.uid,t=this.graphics3DGraphics.get(i);if(t){t.graphics3DSymbol.onRemoveGraphic(t);const e=t.usedMemory,r=t.isElevationSource;this._conditionalRemove(t,i),this._spatialIndex?.remove(t);const s=t.graphics3DSymbol.symbol.id;this._graphicsBySymbol.get(s).delete(i),this._graphicsWithoutSymbol.delete(i),this._removeGraphics3DGraphic(i,e,r),t.destroy(),this._featureStore.events.emit("changed")}else this._graphicsWithoutSymbol.delete(i),this._graphicsWaitingForSymbol.delete(i),0===this._graphicsWaitingForSymbol.size&&(this._cleanupSymbols(),this.notifyChange("updating"))}_hasLabelingContext(e){if(e instanceof Ee||e instanceof Ie){const i=this.symbolCreationContext.layer;return!!i.labelingInfo&&i.labelingInfo.some((i=>i.symbol===e))}return!1}_hasValidSymbolCreationContext(e){return!(e instanceof Ee&&!this._hasLabelingContext(e))||(Le.error("LabelSymbol3D is only valid as part of a LabelClass. Using LabelSymbol3D as a renderer symbol is not supported."),!1)}_getRenderingInfo(e,i){const t=e.geometry;if(c(t))return i&&!this._geometryWarningLogged&&(this._geometryWarningLogged=!0,i.warn(`Graphic in layer ${this.layer.id} has no geometry and will not render`)),null;if(!F(t.spatialReference,this._viewSpatialReference))return i&&!this._geometryWarningLogged&&(this._geometryWarningLogged=!0,i.warn(`Graphic in layer ${this.layer.id} has incompatible spatial reference and will not render`)),null;if(!this.graphicSymbolSupported&&h(e.symbol))return i&&!this._symbolWarningLogged&&(this._symbolWarningLogged=!0,i.warn(`Graphic in layer ${this.layer.id} is not allowed to have a symbol, use a renderer instead`)),null;const r=this.rendererHasGeometryOperations?Z(e,this.layer):e;let s;if(this.owner.getRenderingInfo&&(this.getRenderingInfoWithoutRenderer||h(this.currentRenderer)))s=this.owner.getRenderingInfo(r,this.currentRenderer,g(this._arcadeOnDemand));else{s={symbol:r.symbol||X(r.geometry)}}return c(s)||c(s.symbol)?(i&&!this._symbolWarningLogged&&(this._symbolWarningLogged=!0,i.warn(`Graphic in layer ${this.layer.id} has no symbol and will not render`)),null):s}_getRenderingInfoAsync(e,i){const t=e.geometry;if(c(t))return Le&&!this._geometryWarningLogged&&(this._geometryWarningLogged=!0,Le.warn(`Graphic in layer ${this.layer.id} has no geometry and will not render`)),null;if(!this.graphicSymbolSupported&&h(e.symbol))return Le&&!this._symbolWarningLogged&&(this._symbolWarningLogged=!0,Le.warn(`Graphic in layer ${this.layer.id} is not allowed to have a symbol, use a renderer instead`)),null;const r=this.rendererHasGeometryOperations?Z(e,this.layer):e;return this.owner.getRenderingInfoAsync(r,g(this.currentRenderer),g(this._arcadeOnDemand),i)}_createGraphics3DSymbol(e,i){if(!this._hasValidSymbolCreationContext(e))return null;const t=this._getConvertedSymbol(e);if(!t)return null;let r;if(h(i)&&"backgroundFillSymbol"in i&&i.backgroundFillSymbol){const e=ee(i.backgroundFillSymbol,{ignoreDrivers:!0});h(e.symbol)&&"web-style"!==e.symbol.type&&"cim"!==e.symbol.type&&(r=e.symbol.symbolLayers)}const s=he(t,this.symbolCreationContext,r);return s.load((()=>{const e=s.extentPadding;e>this.extentPadding&&this._set("extentPadding",e),this.notifyChange("averageSymbolComplexity")}),(()=>{})),s}getOrCreateGraphics3DSymbol(e,i){let t=this._symbols.get(e.id);return void 0===t&&(t=e instanceof Ae?new de(e,(e=>this._frameTask.schedule(e)),(e=>this._createGraphics3DSymbol(e,i))):this._createGraphics3DSymbol(e,i),this._symbols.set(e.id,t)),h(t)&&++t.referenced,t}trackGraphicState(e){return c(this._graphicStateTracking)&&(this._graphicStateTracking=new ce(this)),this._graphicStateTracking.add(e)}_addGraphics3DGraphic(e){this._usedMemory+=e.usedMemory,this.graphics3DGraphics.set(e.graphic.uid,e),this._numberOfGraphics++,e.isElevationSource&&(this._numberOfGraphicsProvidingElevation++,this.updateStageLayerElevationProvider()),this._updateLayerVisibility()}_removeGraphics3DGraphic(e,i,t=!1){this._usedMemory-=i,this.graphics3DGraphics.delete(e),this._numberOfGraphics--,t&&(this._numberOfGraphicsProvidingElevation--,this.updateStageLayerElevationProvider()),this._updateLayerVisibility()}_createGraphics3DGraphic(e,i){const t=i.graphic;if(this._graphicsWithoutSymbol.delete(t.uid),!this._symbols.has(e.symbol.id))return this.add([t]),null;if(this.graphics3DGraphics.has(t.uid))return null;const r=e.createGraphics3DGraphic(i);if(c(r))return null;this._addGraphics3DGraphic(r);const s=e.symbol.id;this._graphicsBySymbol.has(s)||this._graphicsBySymbol.set(s,new Map),this._graphicsBySymbol.get(s).set(t.uid,r);if(r.isDraped&&this._graphicsDrapedUids.add(t.uid),r.centroid=null,h(t.geometry)&&"point"!==t.geometry.type&&(r.centroid=pe(t.geometry,this._viewSpatialReference)),this._updateUserVisibility(r),h(this._scaleVisibility)&&this._scaleVisibility.updateVisibility(r),h(this._filterVisibility)){const{defaultVisibility:e}=this._filterVisibility;r.setVisibilityFlag(te.FILTER,e,re.GRAPHIC),e||this._filterVisibility.reapply()}this._deconflictor?.addGraphic(r),this._labeler?.addGraphic(r),this._objectStates?.addGraphic(r),this._deconflictor&&this.owner.view.deconflictor.setInitialIconVisibilityFlag(this,r),r.initialize(this.stage,this.stageLayer,this.owner),h(this._graphicStateTracking)&&this._graphicStateTracking.addGraphic(r);const a=this._whenGraphics3DGraphicRequests[t.uid];return a&&(delete this._whenGraphics3DGraphicRequests[t.uid],a.resolve(r)),r}_abortRendererChange(){this._rendererChangeAbortController&&(this._rendererChangeAbortController.abort(),this._rendererChangeAbortController=null)}async rendererChange(e){if(this._abortRendererChange(),e!==this.currentRenderer)if(this._validateRenderer(e),c(e)&&this._currentRendererChange(null,!1),J(e))if(h(e)&&e.arcadeRequired){const i=new AbortController;this._rendererChangeAbortController=i;const{arcadeUtils:t}=await this._ensureArcade();b(i);const r=t.hasGeometryOperations(e);r&&(await t.enableGeometryOperations(),b(i)),this.effectiveUpdatePolicy===Ce.ASYNC?await this._frameTask.schedule((()=>this._currentRendererChange(e,r)),i.signal):this._currentRendererChange(e,r),this._rendererChangeAbortController=null}else if(this.effectiveUpdatePolicy===Ce.ASYNC){const i=new AbortController;this._rendererChangeAbortController=i,await this._frameTask.schedule((()=>this._currentRendererChange(e,!1)),i.signal),this._rendererChangeAbortController=null}else this._currentRendererChange(e,!1);else this._currentRendererChange(e,!1)}async _ensureArcade(){return c(this._arcadeOnDemand)?(this._arcadeOnDemand=await K(),this._arcadeOnDemand):this._arcadeOnDemand}_currentRendererChange(e,i){this.currentRenderer=e,this.rendererHasGeometryOperations=i,this.symbolCreationContext.arcade=g(this._arcadeOnDemand);const t=this.symbolCreationContext.renderer;if(e===t)return;if(this._symbolConversionCache.clear(),c(e))return this.symbolCreationContext.renderer=null,void this.recreateAllGraphicsAndSymbols();const r=E(t,e);this._updateUnchangedSymbolMappings(r,e,t),this.symbolCreationContext.renderer=e,c(r)||("complete"===r.type?this.recreateAllGraphicsAndSymbols():"partial"===r.type&&(this._applyRendererDiff(r,e,t)?this._volatileGraphicsUpdated():this.recreateAllGraphicsAndSymbols()),this.notifyChange("averageSymbolComplexity"))}_diffHasSymbolChange(e){for(const i in e.diff)switch(i){case"visualVariables":case"defaultSymbol":case"uniqueValueInfos":break;case"uniqueValueGroups":case"authoringInfo":case"fieldDelimiter":delete e.diff[i];break;default:return!0}return!1}_applySymbolSetDiff(e,i,t){e=e||[],i=i||[];const r=[];for(const s of i){const i=this._graphicsBySymbol.get(s.id);i&&i.forEach(((a,n)=>{const o=a.graphic,l=this.layer instanceof q?this.layer:null,h=g(this._arcadeOnDemand);if(s===t.defaultSymbol&&t.getSymbol(Z(o,l),{arcade:h})===t.defaultSymbol)return;const d=a.usedMemory;e.length||t.defaultSymbol?r.push(o):this._graphicsWithoutSymbol.set(n,o);const c=this.graphics3DGraphics.get(n);this._conditionalRemove(c,n),a.destroy(),i.delete(n),this._removeGraphics3DGraphic(n,d),this._updateLayerVisibility()})),this._whenSymbolRemoved.forAll((e=>e(s.id)))}(e.length||r.length)&&(this._graphicsWithoutSymbol.forEach((e=>r.push(e))),this._graphicsWithoutSymbol.clear(),this.add(r)),this._cleanupSymbols(),this._labeler&&this.owner.view.labeler.setDirty(),this.owner.view.deconflictor.setDirty()}_applyUniqueValueRendererDiff(e,i,t){const r=e.diff.defaultSymbol,s=e.diff.uniqueValueInfos;if(r||s){const a=s?s.added.map((e=>e.symbol)):[],n=s?s.removed.map((e=>e.symbol)):[];if(s)for(let e=0;e<s.changed.length;e++)a.push(s.changed[e].newValue.symbol),n.push(s.changed[e].oldValue.symbol);return r?(t.defaultSymbol&&n.push(t.defaultSymbol),i.defaultSymbol&&a.push(i.defaultSymbol)):t.defaultSymbol&&a.length&&n.push(i.defaultSymbol),this._applySymbolSetDiff(a,n,i),delete e.diff.defaultSymbol,delete e.diff.uniqueValueInfos,!0}return!1}_calculateUnchangedSymbolMapping(e,i,t){if("unique-value"!==i?.type||"unique-value"!==t?.type||h(e)&&"partial"!==e.type)return[];const r=e=>h(e)?e.id:null,s=e&&e.diff,a=s&&s.defaultSymbol,n=s&&s.uniqueValueInfos;let o;if(n)o=n.unchanged.map((e=>({oldId:r(e.oldValue.symbol),newId:r(e.newValue.symbol)})));else{o=[];for(const e of t.uniqueValueInfos){const t=r(e.symbol),s=i.uniqueValueInfos.find((i=>i.value===e.value));s&&t!==r(s.symbol)&&o.push({oldId:t,newId:r(s.symbol)})}}return!a&&t.defaultSymbol&&o.push({oldId:r(t.defaultSymbol),newId:r(i.defaultSymbol)}),o}_updateSymbolMapping(e,i){const t=h(i)&&i?"string"==typeof i?i:i.id:null;if(!e||e===t)return;const r=this._graphicsBySymbol.get(e);this._graphicsBySymbol.delete(e),void 0!==r&&this._graphicsBySymbol.set(t,r);const s=this._symbols.get(e);if(void 0!==s&&(this._symbols.delete(e),this._symbols.set(t,s),h(s))){const e="string"==typeof i?null:i;h(e)?s.symbol=e:s.symbol.id=t}}_updateUnchangedSymbolMappings(e,i,t){const r=this._calculateUnchangedSymbolMapping(e,i,t);for(const{oldId:s,newId:a}of r)this._updateSymbolMapping(s,a)}_applyRendererDiff(e,t,r){if(this._diffHasSymbolChange(e))return!1;if(t instanceof i&&r instanceof i&&this._applyUniqueValueRendererDiff(e,t,r)&&0===Object.keys(e.diff).length)return!0;for(const[i]of this._graphicsBySymbol){const r=this._symbols.get(i);if(h(r))switch(r.applyRendererDiff(e,t)){case ye.Recreate_Symbol:this._recreateSymbol(i);break;case ye.Recreate_Graphics:this._recreateGraphicsForSymbol(i);case ye.Fast_Update:}}return!0}opacityChange(){this.forEachGraphics3DSymbol(((e,i)=>e.globalPropertyChanged("opacity",i))),this._updateStageLayerVisibility()}_slicePlaneEnabledChange(e){e!==this.symbolCreationContext.slicePlaneEnabled&&(this.symbolCreationContext.slicePlaneEnabled=e,this.stageLayer.isSliceable=e,this.forEachGraphics3DSymbol(((e,i)=>e.globalPropertyChanged("slicePlaneEnabled",i))),this._deconflictor&&this._deconflictor.slicePlaneEnabledChange(),this._labeler&&this._labeler.slicePlaneEnabledChange())}_physicalBasedRenderingChange(e){e!==this.symbolCreationContext.physicalBasedRenderingEnabled&&(this.symbolCreationContext.physicalBasedRenderingEnabled=e,this.forEachGraphics3DSymbol(((e,i,t)=>{e.globalPropertyChanged("physicalBasedRenderingEnabled",i)||this._recreateSymbol(t)})))}_pixelRatioChange(){this.forEachGraphics3DSymbol(((e,i,t)=>{e.globalPropertyChanged("pixelRatio",i)||this._recreateSymbol(t)}))}_signalUpdatingDuringAsyncLoadedGraphicsChange(){this._updatingPendingLoadedGraphicsChange&&this._updatingPendingLoadedGraphicsChange.remove(),this._updatingPendingLoadedGraphicsChange=R((()=>{this._updatingPendingLoadedGraphicsChange=null}))}setClippingExtent(e,i){const t=this.symbolCreationContext.clippingExtent,r=N();return fe(e,r,i)?this.symbolCreationContext.clippingExtent=M(k(),r):this.symbolCreationContext.clippingExtent=null,!W(this.symbolCreationContext.clippingExtent,t)}modifyGraphics3DGraphicVisibilities(e){let i=!1;this.graphics3DGraphics.forEach((t=>{e(t)&&(i=!0)})),i&&(this.owner.view.labeler?.setDirty(),this.owner.view.deconflictor.setDirty())}forEachGraphics3DSymbol(e){for(const[i,t]of this._symbols){if(c(t))return;e(t,this._graphicsBySymbol.get(i)||Ne,i)}}updateAllGraphicsVisibility(){h(this._filterVisibility)&&this._filterVisibility.reapply(),this.modifyGraphics3DGraphicVisibilities((e=>{const i=this._updateUserVisibility(e),t=h(this._scaleVisibility)&&this._scaleVisibility.updateVisibility(e);return i||t}))}_hideAllGraphics(){this.modifyGraphics3DGraphicVisibilities((e=>e.setVisibilityFlag(te.USER_SETTING,!1,re.GRAPHIC)))}_validateRenderer(e){const i=Q(e,{geometryType:this.layer?.geometryType});if(i){const e=`Renderer for layer '${this.layer.title?`${this.layer.title}, `:""}, id:${this.layer.id}' is not supported in a SceneView`;Le.warn(e,i.message)}}_volatileGraphicsUpdated(){this._labeler?.reset(),this.stageLayer.shaderTransformationChanged(),this.notifyChange("updating")}_cleanupSymbols(){if(this._graphicsWaitingForSymbol.size>0||this._suspendSymbolCleanup)return;let e=!1;this._symbols.forEach(((i,t)=>{if(c(i)||i.referenced>0)return;const r=this._graphicsBySymbol.get(t);r&&0!==r.size||(this._graphicsBySymbol.delete(t),this._symbols.delete(t),p(i),e=!0)})),e&&(this._recomputeExtentPadding(),this.notifyChange("averageSymbolComplexity"))}get test(){return{snapshotInternals:()=>({graphics:[...this.graphics3DGraphics.keys()].sort(),symbols:[...this._symbols.keys()].sort(),graphicsBySymbol:[...this._graphicsBySymbol.keys()].sort().map((e=>({symbolId:e,graphics:[...this._graphicsBySymbol.get(e).keys()].sort()}))),graphicsWithoutSymbol:[...this._graphicsWithoutSymbol.keys()].sort(),graphicsDrapedUids:[...this._graphicsDrapedUids].sort(),pendingUpdates:this._pendingUpdates}),symbols:this._symbols,filterVisibility:this._filterVisibility,numPending:this._pendingUpdates.size,forceUpdatePolicy:e=>{this.forcedUpdatePolicy=e}}}get performanceInfo(){return{visible:this.graphics3DGraphics.size,missing:this._graphicsWithoutSymbol.size,pending:this._pendingUpdates.size}}};var Te;Fe.tmpVec=O(),e([P({readOnly:!0})],Fe.prototype,"computedExtent",void 0),e([P()],Fe.prototype,"currentRenderer",void 0),e([P()],Fe.prototype,"rendererHasGeometryOperations",void 0),e([P()],Fe.prototype,"_frameTask",void 0),e([P()],Fe.prototype,"_rendererChangeAbortController",void 0),e([P()],Fe.prototype,"_elevationInfoChangeAbortController",void 0),e([P()],Fe.prototype,"_initializeAbortController",void 0),e([P()],Fe.prototype,"_elevationAlignment",void 0),e([P()],Fe.prototype,"_scaleVisibility",void 0),e([P()],Fe.prototype,"_filterVisibility",void 0),e([P()],Fe.prototype,"_initializePromise",void 0),e([P()],Fe.prototype,"_spatialIndex",void 0),e([P({readOnly:!0})],Fe.prototype,"extentPadding",void 0),e([P()],Fe.prototype,"_updatingPendingLoadedGraphicsChange",void 0),e([P()],Fe.prototype,"_featureStore",void 0),e([P()],Fe.prototype,"_deconflictor",void 0),e([P()],Fe.prototype,"_labeler",void 0),e([P()],Fe.prototype,"_objectStates",void 0),e([P()],Fe.prototype,"_loadingSymbols",void 0),e([P()],Fe.prototype,"preferredUpdatePolicy",void 0),e([P()],Fe.prototype,"forcedUpdatePolicy",void 0),e([P({readOnly:!0})],Fe.prototype,"effectiveUpdatePolicy",null),e([P({constructOnly:!0})],Fe.prototype,"elevationFeatureExpressionEnabled",void 0),e([P({constructOnly:!0})],Fe.prototype,"owner",void 0),e([P({constructOnly:!0})],Fe.prototype,"layer",void 0),e([P({constructOnly:!0})],Fe.prototype,"graphicSymbolSupported",void 0),e([P({constructOnly:!0})],Fe.prototype,"getRenderingInfoWithoutRenderer",void 0),e([P({constructOnly:!0})],Fe.prototype,"componentFactories",void 0),e([P()],Fe.prototype,"featureStore",null),e([P()],Fe.prototype,"initializePromise",null),e([P()],Fe.prototype,"scaleVisibility",null),e([P()],Fe.prototype,"elevationAlignment",null),e([P()],Fe.prototype,"objectStates",null),e([P()],Fe.prototype,"filterVisibility",null),e([P({readOnly:!0})],Fe.prototype,"updating",null),e([P({readOnly:!0})],Fe.prototype,"running",null),e([P({readOnly:!0})],Fe.prototype,"suspendedOrOutsideOfView",null),e([P({readOnly:!0,dependsOn:[]})],Fe.prototype,"updatingRemaining",null),e([P({readOnly:!0,dependsOn:["owner.view.qualitySettings.graphics3D.maxTotalNumberOfPrimitives","owner.view.qualitySettings.graphics3D.maxTotalNumberOfFeatures","averageSymbolComplexity"]})],Fe.prototype,"displayFeatureLimit",null),e([P({readOnly:!0,dependsOn:[]})],Fe.prototype,"averageSymbolComplexity",null),e([P({constructOnly:!0})],Fe.prototype,"hasZ",void 0),e([P({constructOnly:!0})],Fe.prototype,"hasM",void 0),e([P()],Fe.prototype,"_objectIdField",null),Fe=Ue=e([D(Ve)],Fe),function(e){e[e.NEW=0]="NEW",e[e.LOADING=1]="LOADING",e[e.READY=2]="READY",e[e.REJECTED=3]="REJECTED"}(Te||(Te={}));class ke{constructor(){this.add=null,this.renderingInfo=null,this.state=Te.NEW,this.remove=null}clear(){this.add=null,this.renderingInfo=null,this.state=Te.NEW,this.abortController=null,this.remove=null}}const ze=10,Me=O(),We=O(),Ne=new Map;export{Fe as Graphics3DCore};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import"../../../../geometry.js";import"../../../../renderers/ClassBreaksRenderer.js";import"../../../../renderers/DictionaryRenderer.js";import"../../../../renderers/DotDensityRenderer.js";import"../../../../renderers/HeatmapRenderer.js";import"../../../../renderers/PieChartRenderer.js";import"../../../../renderers/Renderer.js";import"../../../../renderers/SimpleRenderer.js";import i from"../../../../renderers/UniqueValueRenderer.js";import"../../../../renderers/support/jsonUtils.js";import"../../../../symbols.js";import t from"../../../../core/Accessor.js";import has from"../../../../core/has.js";import r from"../../../../core/Error.js";import s from"../../../../core/Handles.js";import{makeHandle as a}from"../../../../core/handleUtils.js";import n from"../../../../core/Logger.js";import{someMap as o,findInMap as l}from"../../../../core/MapUtils.js";import{isSome as h,unwrapOr as d,isNone as c,destroyMaybe as p,removeMaybe as y,get as m,unwrap as g}from"../../../../core/maybe.js";import u from"../../../../core/PooledArray.js";import{throwIfAborted as b,eachAlways as _,createDeferred as f,isAbortError as v}from"../../../../core/promiseUtils.js";import{watch as C,when as S,on as G,syncAndInitial as w,whenOnce as x}from"../../../../core/reactiveUtils.js";import{schedule as R}from"../../../../core/scheduling.js";import{property as P}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as D}from"../../../../core/accessorSupport/decorators/subclass.js";import{diff as I,isEmpty as E}from"../../../../core/accessorSupport/diffUtils.js";import{s as A,a as U,g as O}from"../../../../chunks/vec3.js";import{c as j}from"../../../../chunks/vec3f64.js";import{projectVectorToVector as V,projectXYZToVector as L,canProjectWithoutEngine as F,projectBuffer as T}from"../../../../geometry/projection.js";import{create as k,center as z,fromRect as M,equals as W}from"../../../../geometry/support/aaBoundingBox.js";import{create as N}from"../../../../geometry/support/aaBoundingRect.js";import{equals as B}from"../../../../geometry/support/spatialReferenceUtils.js";import q from"../../../../layers/Layer.js";import{getObjectId as H,computeAABB as Y,hasGeometry as $}from"../../../../layers/graphics/dehydratedFeatures.js";import{hydrateGraphic as Z}from"../../../../layers/graphics/hydratedFeatures.js";import{isSupportedRenderer3D as J,validateTo3D as Q}from"../../../../renderers/support/rendererConversion.js";import{loadArcade as K}from"../../../../support/arcadeOnDemand.js";import{getDefaultSymbol3D as X}from"../../../../symbols/support/defaults3D.js";import{to3D as ee}from"../../../../symbols/support/symbolConversion.js";import{ViewElevationProvider as ie}from"./ElevationQuery.js";import{VisibilityFlag as te,VisibilityGroup as re}from"./enums.js";import{extractExpressionInfo as se,createContext as ae}from"./featureExpressionInfoUtils.js";import{Graphics3DFeatureStore as ne}from"./Graphics3DFeatureStore.js";import oe from"./Graphics3DGraphicCreationContext.js";import{Graphics3DSymbolCreationContext as le}from"./Graphics3DSymbolCreationContext.js";import{make as he}from"./Graphics3DSymbolFactory.js";import de from"./Graphics3DWebStyleSymbol.js";import{GraphicStateTracking as ce}from"./GraphicStateTracking.js";import{computeCentroid as pe}from"./graphicUtils.js";import{ApplyRendererDiffResult as ye}from"./interfaces.js";import{LoadStatus as me}from"./Loadable.js";import{SpatialIndex2D as ge}from"./SpatialIndex2D.js";import{averageSymbolComplexities as ue,defaultSymbolComplexity as be}from"./symbolComplexity.js";import{StageLayerElevationProvider as _e}from"../support/StageLayerElevationProvider.js";import{toBoundingRect as fe}from"../../support/extentUtils.js";import{PropertiesPool as ve}from"../../support/PropertiesPool.js";import{UpdatePolicy as Ce}from"../../webgl-engine/lib/basicInterfaces.js";import{GridLocalOriginFactory as Se}from"../../webgl-engine/lib/GridLocalOriginFactory.js";import{WebGLLayer as Ge}from"../../webgl-engine/lib/WebGLLayer.js";import{ImmediateTask as we,noBudget as xe,TaskPriority as Re}from"../../../support/Scheduler.js";import Pe from"../../../../geometry/Extent.js";import De from"../../../../geometry/Point.js";import Ie from"../../../../symbols/LabelSymbol3D.js";import Ee from"../../../../symbols/TextSymbol.js";import Ae from"../../../../symbols/WebStyleSymbol.js";var Ue;const Oe=j(),je=k(),Ve="esri.views.3d.layers.graphics.Graphics3DCore",Le=n.getLogger(Ve);let Fe=Ue=class extends t{constructor(e){super(e),this._propertiesPool=new ve({computedExtent:Pe},this),this.computedExtent=null,this.currentRenderer=null,this.rendererHasGeometryOperations=!1,this._graphicStateTracking=null,this.symbolCreationContext=new le(((e,i)=>this._frameTask.schedule(e,i))),this.graphics3DGraphics=new Map,this.stageLayer=null,this.stage=null,this._graphicsDrapedUids=new Set,this._graphicsBySymbol=new Map,this._symbolConversionCache=new Map,this._symbols=new Map,this._graphicsWithoutSymbol=new Map,this._graphicsWaitingForSymbol=new Map,this._graphicsUpdateId=0,this._handles=new s,this._frameTask=we,this._suspendSymbolCleanup=!1,this._viewSpatialReference=null,this._arcadeOnDemand=null,this._rendererChangeAbortController=null,this._elevationInfoChangeAbortController=null,this._initializeAbortController=null,this._scaleVisibility=null,this._filterVisibility=null,this._spatialIndex=null,this.extentPadding=0,this._updatingPendingLoadedGraphicsChange=null,this._featureStore=null,this._deconflictor=null,this._labeler=null,this._objectStates=null,this._viewElevationProvider=null,this._stageLayerElevationProvider=null,this._sharedSymbolResourcesOwnerHandle=null,this._whenGraphics3DGraphicRequests={},this._pendingUpdates=new Map,this._numberOfGraphics=0,this._numberOfGraphicsProvidingElevation=0,this._pendingAdds=0,this._pendingRemoves=0,this._loadingSymbols=0,this._pendingUpdatesPool=new u({allocator:e=>e||new ke,deallocator:e=>(e.clear(),e)}),this._symbolWarningLogged=!1,this._geometryWarningLogged=!1,this._objectIdInvisibleSet=new Set,this._whenSymbolRemoved=new u,this.preferredUpdatePolicy=Ce.SYNC,this.forcedUpdatePolicy=null,this.elevationFeatureExpressionEnabled=!0,this.owner=null,this.layer=null,this.graphicSymbolSupported=!0,this.getRenderingInfoWithoutRenderer=!1,this.setUidToIdOnAdd=!0,this.hasZ=null,this.hasM=null,this._usedMemory=0,this._visible=void 0,this._startCreateGraphics=!1}get spatialIndex(){return this._spatialIndex||(this._spatialIndex=new ge({objectIdField:this.owner.layer?.objectIdField,spatialReference:this._viewSpatialReference,hasZ:this.hasZ,hasM:this.hasM}),this._spatialIndex.setup(Array.from(this.graphics3DGraphics.values()))),this._spatialIndex.update(),this._spatialIndex}get effectiveUpdatePolicy(){return h(this.currentRenderer)&&"dictionary"===this.currentRenderer.type?Ce.ASYNC:d(this.forcedUpdatePolicy,this.preferredUpdatePolicy)}get featureStore(){return this._featureStore}get initializePromise(){return this._initializePromise}get scaleVisibility(){return this._scaleVisibility}get elevationAlignment(){return this._elevationAlignment}get objectStates(){return this._objectStates}get filterVisibility(){return this._filterVisibility}get updating(){return!!(this._graphicsWaitingForSymbol.size>0||this.running||this._elevationAlignment?.updating||h(this._scaleVisibility)&&this._scaleVisibility.updating||h(this._filterVisibility)&&this._filterVisibility.updating||this._rendererChangeAbortController||this._elevationInfoChangeAbortController||this._updatingPendingLoadedGraphicsChange||this._frameTask.updating||this._loadingSymbols>0)}get running(){return this._pendingUpdates.size>0||!!this._spatialIndex?.updating}get suspendedOrOutsideOfView(){return this.owner.suspended||this.owner.suspendInfo?.outsideOfView}get updatingRemaining(){return this.updating?this._pendingUpdates.size+.1*(this._spatialIndex?.updatingRemaining||0)+.1*(this._elevationAlignment?.updatingRemaining||0):0}get displayFeatureLimit(){const e=this.owner&&this.owner.view&&this.owner.view.qualitySettings,i=e?e.graphics3D.minTotalNumberOfFeatures:0,t=e?e.graphics3D.maxTotalNumberOfFeatures:0,r=e?e.graphics3D.maxTotalNumberOfPrimitives:0,s=this.averageSymbolComplexity,a=Math.max(1,h(s)?s.primitivesPerFeature:1),n=h(s)&&s.drawCallsPerFeature>0?t/s.drawCallsPerFeature*.3:t,o=Math.ceil(r/a),l=Math.max(i,Math.min(t,o,n)),d=this._get("displayFeatureLimit");return d&&d.minimumTotalNumberOfFeatures===i&&d.maximumTotalNumberOfFeatures===t&&d.maximumTotalNumberOfPrimitives===r&&d.averageSymbolComplexity===s&&d.maximumNumberOfFeatures===l?d:{minimumTotalNumberOfFeatures:i,maximumTotalNumberOfFeatures:t,maximumTotalNumberOfPrimitives:r,averageSymbolComplexity:s,maximumNumberOfFeatures:l}}get averageSymbolComplexity(){const e=ue(this._symbolComplexities),i=this._get("averageSymbolComplexity");return 0===e.numComplexities||h(i)&&(e.estimated&&(i.primitivesPerFeature>=e.primitivesPerFeature||i.primitivesPerCoordinate>=e.primitivesPerCoordinate||i.drawCallsPerFeature>=e.drawCallsPerFeature)||i.primitivesPerFeature===e.primitivesPerFeature&&i.primitivesPerCoordinate===e.primitivesPerCoordinate&&i.drawCallsPerFeature===e.drawCallsPerFeature)?i:e}get usedMemory(){const e=h(this.averageSymbolComplexity)&&this.labelsEnabled?this.averageSymbolComplexity.memory.bytesPerFeatureLabel*this._numberOfGraphics:0,i=this._getSymbolComplexitiesUsed().reduce(((e,i)=>e+i.memory.resourceBytes),0);return this._usedMemory+e+i}get usedMemoryPerGraphic(){if(this._usedMemory&&this._numberOfGraphics)return Math.abs(this._pendingAdds-this._pendingRemoves)/this._numberOfGraphics>30?0:this._usedMemory/this._numberOfGraphics;if(h(this.averageSymbolComplexity)){const e=this.labelsEnabled?this.averageSymbolComplexity.memory.bytesPerFeatureLabel:0;return this.averageSymbolComplexity.memory.bytesPerFeature+e}return 0}get unprocessedMemoryEstimate(){return Math.max(0,(this._pendingAdds-this._pendingRemoves)*this.usedMemoryPerGraphic)}get _symbolComplexities(){return this.currentRenderer?this._getSymbolComplexitiesUsedOrRenderer(this.currentRenderer):this._getSymbolComplexitiesUsed()}_getConvertedSymbol(e){if("web-style"===e.type)return e.clone();const i=this._symbolConversionCache.get(e.id);if(h(i))return i;const t=ee(e,{geometryType:this.layer?.geometryType,retainId:!0,hasLabelingContext:this._hasLabelingContext(e)}),r=t.symbol||null;return c(r)&&t.error&&Le.error(t.error.message),this._symbolConversionCache.set(e.id,r),r}_getSymbolComplexitiesUsedOrRenderer(e){if(c(e))return[];const i=e.getSymbols(),t="backgroundFillSymbol"in e&&e.backgroundFillSymbol;if(!(t||i&&i.length))return[];const r=[],s=this._getSymbolComplexityUsedOrRenderer(t);h(s)&&r.push(s);for(const a of i){const e=this._getSymbolComplexityUsedOrRenderer(a);h(e)&&r.push(e)}return r}_getSymbolComplexityUsedOrRenderer(e){if(c(e))return null;const i=this._symbols.get(e.id);if(h(i))return i.complexity;const t=this._getConvertedSymbol(e);return h(t)?be(t):null}_getSymbolComplexitiesUsed(){const e=[];return this._symbols.forEach((i=>{h(i)&&e.push(i.complexity)})),e}get _objectIdField(){return this.layer.objectIdField}initialize(){this._viewSpatialReference=this.owner.view.spatialReference,this._featureStore=new ne({objectIdField:this.owner.layer&&this.owner.layer.objectIdField,hasZ:this.hasZ,hasM:this.hasM,viewSpatialReference:this._viewSpatialReference,featureSpatialReference:this.owner.featureSpatialReference,getSpatialIndex:()=>this.spatialIndex,forEach:e=>this.graphics3DGraphics.forEach(e),toArray:()=>Array.from(this.graphics3DGraphics.values())});const e=(e,i,t)=>this.spatialIndex.queryGraphicUIDsInExtent(e,i,t),{componentFactories:i}=this;if(h(i.elevationAlignment)){const t=i.elevationAlignment(this,e);this._elevationAlignment=t}if(h(i.scaleVisibility)){const t=i.scaleVisibility(this,e);this._scaleVisibility=t}if(h(i.filterVisibility)){const e=i.filterVisibility({featureStore:this._featureStore,getFeatureCount:()=>this.graphics3DGraphics.size,updateFeatureVisibilities:e=>this.modifyGraphics3DGraphicVisibilities((i=>i.setVisibilityFlag(te.FILTER,e(H(i.graphic,this._objectIdField)),re.GRAPHIC))),setAllFeaturesVisibility:e=>this.modifyGraphics3DGraphicVisibilities((i=>i.setVisibilityFlag(te.FILTER,e,re.GRAPHIC))),clearFeaturesVisibility:()=>this.modifyGraphics3DGraphicVisibilities((e=>e.clearVisibilityFlag(te.FILTER)))});this._filterVisibility=e}if(h(i.deconflictor)){const e=i.deconflictor(this);this._deconflictor=e}if(h(i.labeler)&&h(this._scaleVisibility)){const e=i.labeler(this,this._scaleVisibility);this._labeler=e}if(h(i.objectStates)){const e=i.objectStates(this);this._objectStates=e}this._initializeAbortController=new AbortController,this._initializePromise=this._initializeAsync()}async _initializeAsync(){const e=this._initializeAbortController.signal,i=this.owner.view;this._viewElevationProvider=new ie(this._viewSpatialReference,i),this._initializeStage(i,this.layer.uid),this.symbolCreationContext.sharedResources=i.sharedSymbolResources,this._sharedSymbolResourcesOwnerHandle=i.sharedSymbolResources.addGraphicsOwner(this.owner),h(this.currentRenderer)&&(this.symbolCreationContext.renderer=this.currentRenderer),this.symbolCreationContext.stage=this.stage,this.symbolCreationContext.streamDataRequester=i.sharedSymbolResources.streamDataRequester,this.symbolCreationContext.renderCoordsHelper=i.renderCoordsHelper,this.symbolCreationContext.layer=this.layer,this.symbolCreationContext.graphicsCoreOwner=this.owner,this.symbolCreationContext.localOriginFactory=new Se(i.renderSpatialReference),this.symbolCreationContext.elevationProvider=i.elevationProvider,this.symbolCreationContext.notifyGraphicGeometryChanged=e=>this.notifyGraphicGeometryChanged(e),this.symbolCreationContext.notifyGraphicVisibilityChanged=e=>this.notifyGraphicVisibilityChanged(e);const t=se(this.layer.elevationInfo,this.elevationFeatureExpressionEnabled);if(this.symbolCreationContext.featureExpressionInfoContext=await ae(t,this._viewSpatialReference,e,Le),b(e),this.symbolCreationContext.screenSizePerspectiveEnabled=i.screenSizePerspectiveEnabled&&this.layer.screenSizePerspectiveEnabled,this.symbolCreationContext.slicePlaneEnabled=!!this.owner.slicePlaneEnabled,this.symbolCreationContext.physicalBasedRenderingEnabled=!!this.owner.view.qualitySettings.physicallyBasedRenderingEnabled,"drapeSourceType"in this.owner){const{owner:e}=this;this.symbolCreationContext.drapeSourceRenderer=i.basemapTerrain.overlayManager.registerGeometryDrapeSource(e),this._handles.add(a((()=>i.basemapTerrain.overlayManager.unregisterDrapeSource(e))))}this._handles.add([C((()=>this.suspendedOrOutsideOfView),(()=>this._frameTask.reschedule((()=>this._updateLayerVisibility())))),C((()=>[this.layer?.screenSizePerspectiveEnabled,this.owner.view.screenSizePerspectiveEnabled]),(()=>{const e=i.screenSizePerspectiveEnabled&&this.layer.screenSizePerspectiveEnabled;e!==this.symbolCreationContext.screenSizePerspectiveEnabled&&(this.symbolCreationContext.screenSizePerspectiveEnabled=e,this._labeler?.reset(),this.recreateAllGraphicsAndSymbols())})),C((()=>this.owner.slicePlaneEnabled),(e=>this._slicePlaneEnabledChange(!!e))),C((()=>this.owner.view.state?.pixelRatio),(()=>this._pixelRatioChange())),C((()=>this.owner.view.qualitySettings?.physicallyBasedRenderingEnabled),(e=>this._physicalBasedRenderingChange(e))),S((()=>i.basemapTerrain?.tilingScheme),(e=>{if(!e.spatialReference.equals(this.symbolCreationContext.overlaySR)&&h(i.basemapTerrain.spatialReference)&&(this.symbolCreationContext.overlaySR=i.basemapTerrain.spatialReference),this._handles.has("loaded-graphics"))this.recreateAllGraphics();else{const e=()=>this.owner?.loadedGraphics;this._handles.add([G(e,"change",(e=>{this._graphicsCollectionChanged(e),this._signalUpdatingDuringAsyncLoadedGraphicsChange()}),{onListenerAdd:()=>{this.recreateAllGraphics(),this._signalUpdatingDuringAsyncLoadedGraphicsChange()}})],"loaded-graphics")}}),{initial:!0}),C((()=>this.effectiveUpdatePolicy),(e=>{h(this.stageLayer)&&(this.stageLayer.updatePolicy=e),this.symbolCreationContext.isAsync=this.effectiveUpdatePolicy===Ce.ASYNC,e===Ce.SYNC&&this.runTask(xe)}),w)]),this._frameTask=i.resourceController.scheduler.registerTask(Re.GRAPHICS_CORE,this),this.layer&&"featureReduction"in this.layer&&this._handles.add(C((()=>this.layer.featureReduction),(()=>this._deconflictor.featureReductionChange()))),this.notifyChange("averageSymbolComplexity"),this.rendererChange(this.owner.renderer).catch((()=>{})),this._initializeAbortController=null}_abortInitialize(){this._initializeAbortController&&(this._initializeAbortController.abort(),this._initializeAbortController=null)}destroy(){this._abortInitialize(),this._abortRendererChange(),this._abortElevationInfoChange(),this.owner.view.deconflictor.removeGraphicsOwner(this),this.owner.view.labeler.removeGraphicsOwner(this),this._elevationAlignment=p(this._elevationAlignment),this._scaleVisibility=p(this._scaleVisibility),this._filterVisibility=p(this._filterVisibility),this._deconflictor=null,this._labeler=null,this._objectStates=p(this._objectStates),this.clear(),this._featureStore=p(this._featureStore),this._updatingPendingLoadedGraphicsChange=y(this._updatingPendingLoadedGraphicsChange),this._graphicStateTracking=p(this._graphicStateTracking),this.stage&&(this.stage.remove(this.stageLayer),this.stageLayer=null,this.stage=null),this._handles=p(this._handles),this._frameTask.remove(),this._frameTask=we,this._viewSpatialReference=null,this._set("owner",null);for(const e in this._whenGraphics3DGraphicRequests)this._whenGraphics3DGraphicRequests[e].reject(new r("graphic:layer-destroyed","Layer has been destroyed"));this._whenGraphics3DGraphicRequests=null,this._sharedSymbolResourcesOwnerHandle=y(this._sharedSymbolResourcesOwnerHandle),this._propertiesPool=p(this._propertiesPool),this._pendingUpdatesPool=null,this._symbolConversionCache.clear(),this._objectIdInvisibleSet.clear(),this._spatialIndex=p(this._spatialIndex)}clear(){this._objectStates?.allGraphicsDeleted(),h(this._graphicStateTracking)&&this._graphicStateTracking.allGraphicsDeleted(),this.graphics3DGraphics.forEach((e=>e.destroy())),this._spatialIndex?.clear(),this.graphics3DGraphics.clear(),this._numberOfGraphics=0,this._usedMemory=0,this._updateLayerVisibility(),this._symbols.forEach(p),this._symbols.clear(),this._graphicsBySymbol.clear(),this._graphicsWithoutSymbol.clear(),this._graphicsWaitingForSymbol.clear(),this._pendingUpdates.clear(),this._pendingUpdatesPool.clear(),this._pendingAdds=0,this._pendingRemoves=0,this.notifyChange("updating"),this.notifyChange("running"),this.notifyChange("updatingRemaining"),this._featureStore.events.emit("changed")}_initializeStage(e,i){this.stage=e._stage,this.stageLayer=new Ge({isPickable:!this.suspendedOrOutsideOfView,updatePolicy:this.effectiveUpdatePolicy},i),this.stage.add(this.stageLayer);const t=this.stageLayer.events;t.on("objectTransformation",(e=>this.notifyGraphicGeometryChanged(e.metadata.graphicUid))),t.on("visibilityChanged",(e=>this.notifyGraphicVisibilityChanged(e.metadata.graphicUid))),t.on("objectGeometryAdded",(e=>this.notifyGraphicGeometryChanged(e.object.metadata.graphicUid))),t.on("objectGeometryRemoved",(e=>this.notifyGraphicGeometryChanged(e.object.metadata.graphicUid))),t.on("vertexAttrsUpdated",(e=>this.notifyGraphicGeometryChanged(e.object.metadata.graphicUid)))}notifyGraphicGeometryChanged(e){if(c(this._graphicStateTracking)||c(e))return;const i=this.graphics3DGraphics.get(e);i&&this._graphicStateTracking.updateGraphicGeometry(i)}notifyGraphicVisibilityChanged(e){if(c(this._graphicStateTracking)||c(e))return;const i=this.graphics3DGraphics.get(e);i&&this._graphicStateTracking.updateGraphicVisibility(i)}_updateLayerVisibility(){const e=this.displayFeatureLimit.maximumNumberOfFeatures,i=this._numberOfGraphics>e*ze,t=!this.suspendedOrOutsideOfView&&!i;t!==this._visible&&(this._visible=t,t?(this.stageLayer.isPickable=!0,this.updateAllGraphicsVisibility()):(this.stageLayer.isPickable=!1,this._hideAllGraphics()),this._updateStageLayerVisibility())}_updateStageLayerVisibility(){this.stageLayer.isVisible=this._visible&&(null==this.layer.opacity||this.layer.opacity>0)}getGraphics3DGraphicById(e){return this.graphics3DGraphics.get(e)}getGraphics3DGraphicByObjectId(e){return this.owner.layer?.objectIdField?this._findGraphics3DGraphicByObjectId(e):null}_getGraphicObjectID(e,i=this.owner.layer&&this.owner.layer.objectIdField){return H(e,i)}get graphics3DGraphicsByObjectID(){const e=this.owner.layer&&this.owner.layer.objectIdField;if(!e)return null;const i=new Map;return this.graphics3DGraphics.forEach((t=>{if(!t)return;const r=t.graphic,s=this._getGraphicObjectID(r,e);h(s)&&i.set(s,t)})),i}get labelsEnabled(){return!(!this._labeler||!this._labeler.layerLabelsEnabled())}async updateLabelingInfo(e){const i=this._deconflictor&&this._deconflictor.labelingInfoChange(e),t=this._labeler&&this._labeler.labelingInfoChange(e);await _([i,t])}updateVisibilityInfo(){this._deconflictor&&this._deconflictor.labelingInfoChange(),this._labeler&&this._labeler.visibilityInfoChange()}get symbolUpdateType(){if(this._pendingUpdates.size>0)return"unknown";let e=0,i=0;return o(this._symbols,((t,r)=>{if(h(t)){const s=t.getFastUpdateStatus();if(s.loading>0)return!0;this._graphicsBySymbol.has(r)&&(i+=s.fast,e+=s.slow)}return!1}))?"unknown":i>=0&&0===e?"fast":e>=0&&0===i?"slow":"mixed"}runTask(e){this._frameTask.processQueue(e),this._applyPendingUpdates(e),this.notifyChange("running"),this.running||this.notifyChange("updating"),this.notifyChange("updatingRemaining")}setObjectIdVisibility(e,i){i?this._objectIdInvisibleSet.delete(e):this._objectIdInvisibleSet.add(e);const t=this._findGraphics3DGraphicByObjectId(e);h(t)&&this._updateUserVisibility(t)}_findGraphics3DGraphicByObjectId(e){return l(this.graphics3DGraphics,(i=>this._getGraphicObjectID(i.graphic)===e))}_updateUserVisibility(e){if(c(e))return!1;const i=e.graphic,t=this._getGraphicObjectID(i),r=i.visible&&!this.owner.suspended&&(c(t)||!this._objectIdInvisibleSet.has(t));return e.setVisibilityFlag(te.USER_SETTING,r,re.GRAPHIC)}_whenGraphics3DGraphic(e){const i=this.graphics3DGraphics.get(e.uid);if(i)return Promise.resolve(i);const t=this._whenGraphics3DGraphicRequests[e.uid];if(t)return t.promise;const r=f();return this._whenGraphics3DGraphicRequests[e.uid]=r,r.promise}async _boundsForGraphics3DGraphic(e,i){const t=this._viewSpatialReference,r=this.owner.view.renderSpatialReference,s=this.owner.view.basemapTerrain.spatialReference,a=(e,i,s)=>T(e,r,i,e,t,i,s),n=(e,i,r)=>T(e,s,i,e,t,i,r),o=this._viewElevationProvider?{service:this._viewElevationProvider,useViewElevation:h(i)&&i.useViewElevation,minDemResolution:h(i)&&i.minDemResolution,minDemResolutionForPoints:this.owner.view.resolution}:null,l=await e.getProjectedBoundingBox(a,n,o,m(i,"signal"));if(!l)return null;const c=l.boundingBox;if(l.requiresDrapedElevation){const e=this.symbolCreationContext.elevationProvider;if(e){z(c,Oe);const i=d(e.getElevation(Oe[0],Oe[1],0,t,"ground"),0);c[2]=Math.min(c[2],i),c[5]=Math.max(c[5],i)}}return{boundingBox:c,screenSpaceObjects:l.screenSpaceObjects}}async whenGraphicBounds(e,i){await x((()=>this.owner?.loadedGraphics));const t=this.owner.layer&&this.owner.layer.objectIdField,s=this.owner.loadedGraphics.find((i=>i===e||t&&i.attributes&&e.attributes&&i.attributes[t]===e.attributes[t]));if(!s)throw new r("internal:graphic-not-part-of-view","Graphic is not part of this view");const a=await this._whenGraphics3DGraphic(s);return this._boundsForGraphics3DGraphic(a,i)}computeAttachmentOrigin(e,i){const t=this.graphics3DGraphics.get(e.uid);if(!t)return null;const r=t.computeAttachmentOrigin();if(0===r.render.num&&0===r.draped.num)return null;A(Me,0,0,0);let s=0;if(r.render.num>0){if(!V(r.render.origin,this.symbolCreationContext.renderCoordsHelper.spatialReference,We,i))return null;U(Me,Me,We),s++}if(r.draped.num>0){const[e,t]=r.draped.origin,a=d(this._viewElevationProvider.getElevation(e,t,"ground"),0);if(A(We,e,t,a),!V(We,this._viewElevationProvider.spatialReference,We,i))return null;U(Me,Me,We),s++}return s>1&&O(Me,Me,1/s),new De({x:Me[0],y:Me[1],z:Me[2],spatialReference:i})}getSymbolLayerSize(e,i){const t=this._symbols.get(e.id);if(c(t))throw new r("internal:symbol-not-part-of-view","Symbol is not part of this view");const s=e.symbolLayers.indexOf(i);if(-1===s)throw new r("internal:missing-symbol-layer","Symbol layer is not in symbol");const a=t.getSymbolLayerSize(s);if(null==a)throw new r("internal:missing-size","Symbol layer has no valid size");return a}_graphicsCollectionChanged(e){this._startCreateGraphics&&(this.add(e.added),this.remove(e.removed))}graphicUpdateHandler(e){const i=e.graphic.uid,t=this.graphics3DGraphics.get(i);if(!c(t)||!c(this._graphicsWithoutSymbol.get(i)))switch(e.property){case"visible":this._graphicUpdateVisibleHandler(t);break;case"geometry":this._graphicUpdateGeometryHandler(t,e);break;case"symbol":this._graphicUpdateSymbolHandler(t,e);break;case"attributes":break;case"transform":this._graphicUpdateTransformHandler(t,e)}}_graphicUpdateGeometryHandler(e,i){const t=i.graphic.geometry;if(c(t))return void this._recreateGraphic(i.graphic);if(c(e)){const e=i.graphic.symbol&&i.graphic.symbol.id;if(e){const i=this._symbols.get(e);if(h(i)&&i.loadStatus===me.LOADING)return}return void this._recreateGraphic(i.graphic)}const r=e.graphics3DSymbol;!c(i.newValue)&&r.updateGeometry(e,i.newValue)||this._recreateGraphic(e.graphic),this._expandComputedExtent(t)}_graphicUpdateSymbolHandler(e,i){const t=i.graphic,r=h(e)?e.graphics3DSymbol:h(i.oldValue)?this._symbols.get(i.oldValue.id):null;if(c(r)||c(i.newValue))return void this._recreateGraphic(t);const s=r.symbol,a=this._getConvertedSymbol(i.newValue);if(h(a)&&(a.type!==s.type||"web-style"===a.type)||"web-style"===s.type)return void this._recreateGraphic(t);const n=this._graphicsBySymbol.get(s.id);if(n&&1!==n.size)return void this._recreateGraphic(t);const o=I(s,a);if(c(o))return void this._updateSymbolMapping(s.id,a);const l={diff:o,graphics3DGraphicPatches:[],symbolStatePatches:[]};if(r.prepareSymbolPatch(l),!E(l.diff))return void this._recreateGraphic(t);const d=this._getRenderingInfo(t);if(c(d))return void this._recreateGraphic(t);const p=r.extentPadding;for(const h of l.symbolStatePatches)h();if(p!==r.extentPadding&&this._recomputeExtentPadding(),h(e))for(const h of l.graphics3DGraphicPatches)h(e,d);this._updateSymbolMapping(s.id,a)}_graphicUpdateVisibleHandler(e){this._updateUserVisibility(e)&&(this._labeler&&this.owner.view.labeler.setDirty(),this.owner.view.deconflictor.setDirty())}_graphicUpdateTransformHandler(e,i){}recreateGraphics(e){this._suspendSymbolCleanup=!0,this.remove(e),this.add(e),this._suspendSymbolCleanup=!1,this.effectiveUpdatePolicy===Ce.SYNC&&this._cleanupSymbols()}_recreateGraphic(e){this.recreateGraphics([e])}_beginGraphicUpdate(e){const i=this._graphicsUpdateId;return this._graphicsUpdateId++,this._graphicsWaitingForSymbol.set(e.uid,i),1===this._graphicsWaitingForSymbol.size&&this.notifyChange("updating"),i}_endGraphicUpdate(e){e&&(this._graphicsWaitingForSymbol.delete(e.uid),0===this._graphicsWaitingForSymbol.size&&(this._cleanupSymbols(),this.notifyChange("updating")))}_recomputeExtentPadding(){let e=0;this._symbols.forEach((i=>{h(i)&&(e=Math.max(e,i.extentPadding))})),this._set("extentPadding",e)}_expandComputedExtent(e){const i=je,t=e.spatialReference;Y(e,i);const r=this._viewSpatialReference,s=Ue.tmpVec;if(B(t,r)||L(i[0],i[1],0,t,s,r)&&(i[0]=s[0],i[1]=s[1],L(i[3],i[4],0,t,s,r),i[3]=s[0],i[4]=s[1]),!(isFinite(i[0])&&isFinite(i[3])&&isFinite(i[1])&&isFinite(i[4])))return;const a=this.computedExtent;let n=null;const o=isFinite(i[2])&&isFinite(i[5]),l=o&&(!a||null==a.zmin||i[2]<a.zmin),h=o&&(!a||null==a.zmax||i[5]>a.zmax);if(a){(i[0]<a.xmin||i[1]<a.ymin||i[3]>a.xmax||i[4]>a.ymax||l||h)&&(n=this._propertiesPool.get("computedExtent"),n.xmin=Math.min(i[0],a.xmin),n.ymin=Math.min(i[1],a.ymin),n.xmax=Math.max(i[3],a.xmax),n.ymax=Math.max(i[4],a.ymax),n.spatialReference=r)}else n=this._propertiesPool.get("computedExtent"),n.xmin=i[0],n.ymin=i[1],n.xmax=i[3],n.ymax=i[4],n.spatialReference=r;n&&(l&&(n.zmin=i[2]),h&&(n.zmax=i[5]),this._set("computedExtent",n))}_abortElevationInfoChange(){this._elevationInfoChangeAbortController&&(this._elevationInfoChangeAbortController.abort(),this._elevationInfoChangeAbortController=null)}async elevationInfoChange(){this._abortElevationInfoChange();const e=new AbortController;this._elevationInfoChangeAbortController=e;const i=se(this.layer.elevationInfo,this.elevationFeatureExpressionEnabled);this.symbolCreationContext.featureExpressionInfoContext=await ae(i,this._viewSpatialReference,e.signal,Le),b(e.signal),this._elevationInfoChangeAbortController=null,this._labeler?.elevationInfoChange(),this.forEachGraphics3DSymbol(((e,i,t)=>{e.globalPropertyChanged("elevationInfo",i)?i.forEach((e=>{const i=e.graphic,t=e.labelGraphics;for(const r of t){r.graphics3DSymbolLayer.updateGraphicElevationContext(i,r)}})):this._recreateSymbol(t)})),this.updateStageLayerElevationProvider(),this._elevationAlignment?.elevationInfoChange()}updateStageLayerElevationProvider(){this._stageLayerElevationProvider?(this.layer.elevationInfo&&"relative-to-scene"===this.layer.elevationInfo.mode||0===this._numberOfGraphicsProvidingElevation)&&(this.owner.view.elevationProvider.unregister(this._stageLayerElevationProvider),this._stageLayerElevationProvider.dispose(),this._stageLayerElevationProvider=null):(!this.layer.elevationInfo||this.layer.elevationInfo&&"relative-to-scene"!==this.layer.elevationInfo.mode)&&this._numberOfGraphicsProvidingElevation>0&&(this._stageLayerElevationProvider=new _e({layer:this.layer,stageLayer:this.stageLayer,view:this.owner.view}),this.owner.view.elevationProvider.register("scene",this._stageLayerElevationProvider))}_clearSymbolsAndGraphics(){this.clear(),h(this._filterVisibility)&&this._filterVisibility.clear(),this._labeler?.reset(),this._deconflictor?.clear(),this._elevationAlignment?.clear(),this.stageLayer?.invalidateSpatialQueryAccelerator(),this._stageLayerElevationProvider&&(this.owner.view.elevationProvider.unregister(this._stageLayerElevationProvider),this._stageLayerElevationProvider.dispose(),this._stageLayerElevationProvider=null)}startCreateGraphics(){this._startCreateGraphics=!0,this.recreateAllGraphics()}recreateAllGraphics(){this._recreateAllGraphics(!1)}recreateAllGraphicsAndSymbols(){this._recreateAllGraphics(!0)}_recreateAllGraphics(e=!1){if(!this._startCreateGraphics)return;const{loadedGraphics:i,view:t}=this.owner,r=t.basemapTerrain.tilingScheme&&i&&i.length?i.toArray():null;!e&&r||this._clearSymbolsAndGraphics(),this.symbolCreationContext.screenSizePerspectiveEnabled=this.owner.view.screenSizePerspectiveEnabled&&this.layer.screenSizePerspectiveEnabled,this.symbolCreationContext.slicePlaneEnabled=!!this.owner.slicePlaneEnabled,this._set("computedExtent",null),r&&(e?this.add(r):this.recreateGraphics(r))}_recreateSymbol(e){const i=this._graphicsBySymbol.get(e),t=[];i&&(i.forEach(((e,i)=>{const r=e.usedMemory;this._conditionalRemove(e,i),this._spatialIndex?.remove(e),t.push(e.graphic),e.destroy(),this._removeGraphics3DGraphic(i,r),this._updateLayerVisibility(),this._featureStore.events.emit("changed")})),this._graphicsBySymbol.set(e,new Map));const r=this._symbols.get(e);p(r),this._symbols.delete(e),this.add(t)}_recreateGraphicsForSymbol(e){const i=this._graphicsBySymbol.get(e);if(i){const e=[];i.forEach((i=>e.push(i.graphic))),this.recreateGraphics(e)}}_conditionalRemove(e,i){this._graphicsDrapedUids.delete(i),this._objectStates?.removeGraphic(e),this._labeler?.removeGraphic(e),this._deconflictor?.removeGraphic(e),h(this._graphicStateTracking)&&this._graphicStateTracking.removeGraphic(e)}add(e){e&&0!==e.length&&(this.owner.view.basemapTerrain&&this.owner.view.basemapTerrain.tilingScheme?(this._updatePolicyForGraphics(e)===Ce.ASYNC?this._addDelayed(e):this._addImmediate(e),this.notifyChange("updating")):Le.error("#add()","Cannot add graphics before terrain surface has been initialized"))}_updatePolicyForGraphics(e){if(this.effectiveUpdatePolicy===Ce.SYNC&&("mesh"===this.layer.geometryType||null==this.layer.geometryType))for(const i of e)if(h(i.geometry)&&"mesh"===i.geometry.type&&!i.geometry.loaded)return Ce.ASYNC;return this.effectiveUpdatePolicy}_addImmediate(e){this._geometryWarningLogged=!1,this._symbolWarningLogged=!1;for(const i of e)this._addGraphic(i,this._getRenderingInfo(i,Le),Ce.SYNC);this._cleanupSymbols(),this._labeler&&(this.owner.view.labeler.setDirty(),this._cleanupSymbols()),this.owner.view.deconflictor.setDirty()}_addDelayed(e){for(const i of e){const e=i.uid;let t=this._pendingUpdates.get(e);t?t.add?t.state!==Te.NEW&&t.abortController.abort():this._pendingAdds++:(t=this._pendingUpdatesPool.pushNew(),this._pendingAdds++,this._pendingUpdates.set(e,t)),t.add=i}this.notifyChange("running"),this.notifyChange("updatingRemaining")}remove(e){this.effectiveUpdatePolicy===Ce.ASYNC?this._removeDelayed(e):this._removeImmediate(e),this.notifyChange("updating")}_removeImmediate(e){for(const i of e)this._removeGraphic(i);this._cleanupSymbols(),this._labeler&&this.owner.view.labeler.setDirty(),this.owner.view.deconflictor.setDirty()}_removeDelayed(e){for(const i of e){const e=i.uid,t=this._pendingUpdates.get(e);if(t)t.add&&(t.remove?t.add=null:this._pendingUpdates.delete(e),t.state===Te.LOADING&&t.abortController.abort(),this._pendingAdds--);else{const t=this._pendingUpdatesPool.pushNew();t.remove=i,this._pendingUpdates.set(e,t),this._pendingRemoves++}}0===this._pendingUpdates.size&&this._finishPendingUpdates(),this.notifyChange("running"),this.notifyChange("updatingRemaining")}_finishPendingUpdates(){this._pendingUpdatesPool.clear(),this._cleanupSymbols(),(this._pendingAdds||this._pendingRemoves)&&Le.warn("pendingAdds/Removes in inconsistent state!"),this._pendingAdds=0,this._pendingRemoves=0}_applyPendingUpdates(e){if(this._geometryWarningLogged=!1,this._symbolWarningLogged=!1,0===this._pendingUpdates.size&&this._spatialIndex?.updating)this._spatialIndex.update();else{for(const[i,t]of this._pendingUpdates){if(e.done)break;t.add&&t.state===Te.NEW&&this._processPendingUpdateNew(t);let r=this.effectiveUpdatePolicy;if(!t.remove||t.add&&t.state!==Te.READY||(this._pendingRemoves--,e.madeProgress(),this._removeGraphic(t.remove),t.remove=null,r=Ce.SYNC),t.add)switch(t.state){case Te.READY:this._addGraphic(t.add,t.renderingInfo,r),t.add=null,this._pendingAdds--,e.madeProgress();break;case Te.REJECTED:t.add=null,this._pendingAdds--;case Te.LOADING:}null==t.remove&&null==t.add&&this._pendingUpdates.delete(i)}0===this._pendingUpdates.size&&(this._finishPendingUpdates(),this.notifyChange("running"))}}_processPendingUpdateNew(e){if(!e.add)return void(e.state=Te.READY);const i=e.add.geometry;h(i)&&"mesh"===i.type&&!i.loaded?this._processPendingUpdateNewMesh(e,i):this._processPendingUpdateNewRenderingInfo(e)}async _processPendingUpdateNewMesh(e,i){e.state=Te.LOADING,e.abortController=new AbortController;const t=e.abortController.signal;try{await i.load({signal:t})}catch(r){return this._processPendingUpdateNewError(e,r)}e.abortController=null,this._processPendingUpdateNewRenderingInfo(e)}_processPendingUpdateNewError(e,i){e.abortController=null,v(i)?e.state=Te.NEW:e.state=Te.REJECTED}async _processPendingUpdateNewRenderingInfo(e){if(c(this.layer.renderer)||"dictionary"!==this.layer.renderer.type)return e.renderingInfo=this._getRenderingInfo(e.add,Le),void(e.state=Te.READY);e.state=Te.LOADING,e.abortController=new AbortController;let i=null;try{i=await this._getRenderingInfoAsync(e.add,{signal:e.abortController.signal})}catch(t){return e.abortController=null,void(v(t)?e.state=Te.NEW:e.state=Te.REJECTED)}c(i)||c(i.symbol)?(Le&&!this._symbolWarningLogged&&(this._symbolWarningLogged=!0,Le.warn(`Graphic in layer ${this.layer.id} has no symbol and will not render`)),e.renderingInfo=null):e.renderingInfo=i,e.state=Te.READY}_addGraphic(e,i,t){if(this._graphicsWithoutSymbol.set(e.uid,e),c(i)||c(i.symbol)||!$(e))return;has("enable-feature:objectAndLayerId-rendering")&&this.setUidToIdOnAdd&&this.stage.renderView._objectAndLayerIdRenderHelper.setUidToObjectAndLayerId(e.objectId,e.uid,this.layer.id,this.layer.uid);const r=i.symbol,s=this.getOrCreateGraphics3DSymbol(r,i.renderer);if(c(s))return;this._expandComputedExtent(e.geometry);const a=this._beginGraphicUpdate(e),n=new oe(e,i,this.layer);let o=!1;const l=e=>{e===s.symbol.id&&(o=!0)};this._whenSymbolRemoved.push(l);const d=()=>{if(--this._loadingSymbols,this.destroyed)return;this._whenSymbolRemoved.removeUnordered(l);if(this._graphicsWaitingForSymbol.get(e.uid)!==a||o||s.destroyed||this.graphicSymbolSupported&&e.symbol&&e.symbol.id!==s.symbol.id)--s.referenced,this._cleanupSymbols();else{const i=this._createGraphics3DGraphic(s,n);this._spatialIndex&&h(i)&&this._spatialIndex.add(i),--s.referenced,this._endGraphicUpdate(e)}this._featureStore.events.emit("changed"),this._labeler&&this.owner.view.labeler.setDirty()},p=i=>{--this._loadingSymbols,this.destroyed||(this._whenSymbolRemoved.removeUnordered(l),o||(v(i)?this.add([e]):s.destroyed||this._endGraphicUpdate(e)))};++this._loadingSymbols,t===Ce.ASYNC?s.load((()=>this._frameTask.schedule(d)),(e=>this._frameTask.schedule((()=>p(e))))):s.load(d,p)}_removeGraphic(e){const i=e.uid,t=this.graphics3DGraphics.get(i);if(t){t.graphics3DSymbol.onRemoveGraphic(t);const e=t.usedMemory,r=t.isElevationSource;this._conditionalRemove(t,i),this._spatialIndex?.remove(t);const s=t.graphics3DSymbol.symbol.id;this._graphicsBySymbol.get(s).delete(i),this._graphicsWithoutSymbol.delete(i),this._removeGraphics3DGraphic(i,e,r),t.destroy(),this._featureStore.events.emit("changed")}else this._graphicsWithoutSymbol.delete(i),this._graphicsWaitingForSymbol.delete(i),0===this._graphicsWaitingForSymbol.size&&(this._cleanupSymbols(),this.notifyChange("updating"))}_hasLabelingContext(e){if(e instanceof Ie||e instanceof Ee){const i=this.symbolCreationContext.layer;return!!i.labelingInfo&&i.labelingInfo.some((i=>i.symbol===e))}return!1}_hasValidSymbolCreationContext(e){return!(e instanceof Ie&&!this._hasLabelingContext(e))||(Le.error("LabelSymbol3D is only valid as part of a LabelClass. Using LabelSymbol3D as a renderer symbol is not supported."),!1)}_getRenderingInfo(e,i){const t=e.geometry;if(c(t))return i&&!this._geometryWarningLogged&&(this._geometryWarningLogged=!0,i.warn(`Graphic in layer ${this.layer.id} has no geometry and will not render`)),null;if(!F(t.spatialReference,this._viewSpatialReference))return i&&!this._geometryWarningLogged&&(this._geometryWarningLogged=!0,i.warn(`Graphic in layer ${this.layer.id} has incompatible spatial reference and will not render`)),null;if(!this.graphicSymbolSupported&&h(e.symbol))return i&&!this._symbolWarningLogged&&(this._symbolWarningLogged=!0,i.warn(`Graphic in layer ${this.layer.id} is not allowed to have a symbol, use a renderer instead`)),null;const r=this.rendererHasGeometryOperations?Z(e,this.layer):e;let s;if(this.owner.getRenderingInfo&&(this.getRenderingInfoWithoutRenderer||h(this.currentRenderer)))s=this.owner.getRenderingInfo(r,this.currentRenderer,g(this._arcadeOnDemand));else{s={symbol:r.symbol||X(r.geometry)}}return c(s)||c(s.symbol)?(i&&!this._symbolWarningLogged&&(this._symbolWarningLogged=!0,i.warn(`Graphic in layer ${this.layer.id} has no symbol and will not render`)),null):s}_getRenderingInfoAsync(e,i){const t=e.geometry;if(c(t))return Le&&!this._geometryWarningLogged&&(this._geometryWarningLogged=!0,Le.warn(`Graphic in layer ${this.layer.id} has no geometry and will not render`)),null;if(!this.graphicSymbolSupported&&h(e.symbol))return Le&&!this._symbolWarningLogged&&(this._symbolWarningLogged=!0,Le.warn(`Graphic in layer ${this.layer.id} is not allowed to have a symbol, use a renderer instead`)),null;const r=this.rendererHasGeometryOperations?Z(e,this.layer):e;return this.owner.getRenderingInfoAsync(r,g(this.currentRenderer),g(this._arcadeOnDemand),i)}_createGraphics3DSymbol(e,i){if(!this._hasValidSymbolCreationContext(e))return null;const t=this._getConvertedSymbol(e);if(!t)return null;let r;if(h(i)&&"backgroundFillSymbol"in i&&i.backgroundFillSymbol){const e=ee(i.backgroundFillSymbol,{ignoreDrivers:!0});h(e.symbol)&&"web-style"!==e.symbol.type&&"cim"!==e.symbol.type&&(r=e.symbol.symbolLayers)}const s=he(t,this.symbolCreationContext,r);return s.load((()=>{const e=s.extentPadding;e>this.extentPadding&&this._set("extentPadding",e),this.notifyChange("averageSymbolComplexity")}),(()=>{})),s}getOrCreateGraphics3DSymbol(e,i){let t=this._symbols.get(e.id);return void 0===t&&(t=e instanceof Ae?new de(e,(e=>this._frameTask.schedule(e)),(e=>this._createGraphics3DSymbol(e,i))):this._createGraphics3DSymbol(e,i),this._symbols.set(e.id,t)),h(t)&&++t.referenced,t}trackGraphicState(e){return c(this._graphicStateTracking)&&(this._graphicStateTracking=new ce(this)),this._graphicStateTracking.add(e)}_addGraphics3DGraphic(e){this._usedMemory+=e.usedMemory,this.graphics3DGraphics.set(e.graphic.uid,e),this._numberOfGraphics++,e.isElevationSource&&(this._numberOfGraphicsProvidingElevation++,this.updateStageLayerElevationProvider()),this._updateLayerVisibility()}_removeGraphics3DGraphic(e,i,t=!1){this._usedMemory-=i,this.graphics3DGraphics.delete(e),this._numberOfGraphics--,t&&(this._numberOfGraphicsProvidingElevation--,this.updateStageLayerElevationProvider()),this._updateLayerVisibility()}_createGraphics3DGraphic(e,i){const t=i.graphic;if(this._graphicsWithoutSymbol.delete(t.uid),!this._symbols.has(e.symbol.id))return this.add([t]),null;if(this.graphics3DGraphics.has(t.uid))return null;const r=e.createGraphics3DGraphic(i);if(c(r))return null;this._addGraphics3DGraphic(r);const s=e.symbol.id;this._graphicsBySymbol.has(s)||this._graphicsBySymbol.set(s,new Map),this._graphicsBySymbol.get(s).set(t.uid,r);if(r.isDraped&&this._graphicsDrapedUids.add(t.uid),r.centroid=null,h(t.geometry)&&"point"!==t.geometry.type&&(r.centroid=pe(t.geometry,this._viewSpatialReference)),this._updateUserVisibility(r),h(this._scaleVisibility)&&this._scaleVisibility.updateVisibility(r),h(this._filterVisibility)){const{defaultVisibility:e}=this._filterVisibility;r.setVisibilityFlag(te.FILTER,e,re.GRAPHIC),e||this._filterVisibility.reapply()}this._deconflictor?.addGraphic(r),this._labeler?.addGraphic(r),this._objectStates?.addGraphic(r),this._deconflictor&&this.owner.view.deconflictor.setInitialIconVisibilityFlag(this,r),r.initialize(this.stage,this.stageLayer,this.owner),h(this._graphicStateTracking)&&this._graphicStateTracking.addGraphic(r);const a=this._whenGraphics3DGraphicRequests[t.uid];return a&&(delete this._whenGraphics3DGraphicRequests[t.uid],a.resolve(r)),r}_abortRendererChange(){this._rendererChangeAbortController&&(this._rendererChangeAbortController.abort(),this._rendererChangeAbortController=null)}async rendererChange(e){if(this._abortRendererChange(),e!==this.currentRenderer)if(this._validateRenderer(e),c(e)&&this._currentRendererChange(null,!1),J(e))if(h(e)&&e.arcadeRequired){const i=new AbortController;this._rendererChangeAbortController=i;const{arcadeUtils:t}=await this._ensureArcade();b(i);const r=t.hasGeometryOperations(e);r&&(await t.enableGeometryOperations(),b(i)),this.effectiveUpdatePolicy===Ce.ASYNC?await this._frameTask.schedule((()=>this._currentRendererChange(e,r)),i.signal):this._currentRendererChange(e,r),this._rendererChangeAbortController=null}else if(this.effectiveUpdatePolicy===Ce.ASYNC){const i=new AbortController;this._rendererChangeAbortController=i,await this._frameTask.schedule((()=>this._currentRendererChange(e,!1)),i.signal),this._rendererChangeAbortController=null}else this._currentRendererChange(e,!1);else this._currentRendererChange(e,!1)}async _ensureArcade(){return c(this._arcadeOnDemand)?(this._arcadeOnDemand=await K(),this._arcadeOnDemand):this._arcadeOnDemand}_currentRendererChange(e,i){this.currentRenderer=e,this.rendererHasGeometryOperations=i,this.symbolCreationContext.arcade=g(this._arcadeOnDemand);const t=this.symbolCreationContext.renderer;if(e===t)return;if(this._symbolConversionCache.clear(),c(e))return this.symbolCreationContext.renderer=null,void this.recreateAllGraphicsAndSymbols();const r=I(t,e);this._updateUnchangedSymbolMappings(r,e,t),this.symbolCreationContext.renderer=e,c(r)||("complete"===r.type?this.recreateAllGraphicsAndSymbols():"partial"===r.type&&(this._applyRendererDiff(r,e,t)?this._volatileGraphicsUpdated():this.recreateAllGraphicsAndSymbols()),this.notifyChange("averageSymbolComplexity"))}_diffHasSymbolChange(e){for(const i in e.diff)switch(i){case"visualVariables":case"defaultSymbol":case"uniqueValueInfos":break;case"uniqueValueGroups":case"authoringInfo":case"fieldDelimiter":delete e.diff[i];break;default:return!0}return!1}_applySymbolSetDiff(e,i,t){e=e||[],i=i||[];const r=[];for(const s of i){const i=this._graphicsBySymbol.get(s.id);i&&i.forEach(((a,n)=>{const o=a.graphic,l=this.layer instanceof q?this.layer:null,h=g(this._arcadeOnDemand);if(s===t.defaultSymbol&&t.getSymbol(Z(o,l),{arcade:h})===t.defaultSymbol)return;const d=a.usedMemory;e.length||t.defaultSymbol?r.push(o):this._graphicsWithoutSymbol.set(n,o);const c=this.graphics3DGraphics.get(n);this._conditionalRemove(c,n),a.destroy(),i.delete(n),this._removeGraphics3DGraphic(n,d),this._updateLayerVisibility()})),this._whenSymbolRemoved.forAll((e=>e(s.id)))}(e.length||r.length)&&(this._graphicsWithoutSymbol.forEach((e=>r.push(e))),this._graphicsWithoutSymbol.clear(),this.add(r)),this._cleanupSymbols(),this._labeler&&this.owner.view.labeler.setDirty(),this.owner.view.deconflictor.setDirty()}_applyUniqueValueRendererDiff(e,i,t){const r=e.diff.defaultSymbol,s=e.diff.uniqueValueInfos;if(r||s){const a=s?s.added.map((e=>e.symbol)):[],n=s?s.removed.map((e=>e.symbol)):[];if(s)for(let e=0;e<s.changed.length;e++)a.push(s.changed[e].newValue.symbol),n.push(s.changed[e].oldValue.symbol);return r?(t.defaultSymbol&&n.push(t.defaultSymbol),i.defaultSymbol&&a.push(i.defaultSymbol)):t.defaultSymbol&&a.length&&n.push(i.defaultSymbol),this._applySymbolSetDiff(a,n,i),delete e.diff.defaultSymbol,delete e.diff.uniqueValueInfos,!0}return!1}_calculateUnchangedSymbolMapping(e,i,t){if("unique-value"!==i?.type||"unique-value"!==t?.type||h(e)&&"partial"!==e.type)return[];const r=e=>h(e)?e.id:null,s=e&&e.diff,a=s&&s.defaultSymbol,n=s&&s.uniqueValueInfos;let o;if(n)o=n.unchanged.map((e=>({oldId:r(e.oldValue.symbol),newId:r(e.newValue.symbol)})));else{o=[];for(const e of t.uniqueValueInfos){const t=r(e.symbol),s=i.uniqueValueInfos.find((i=>i.value===e.value));s&&t!==r(s.symbol)&&o.push({oldId:t,newId:r(s.symbol)})}}return!a&&t.defaultSymbol&&o.push({oldId:r(t.defaultSymbol),newId:r(i.defaultSymbol)}),o}_updateSymbolMapping(e,i){const t=h(i)&&i?"string"==typeof i?i:i.id:null;if(!e||e===t)return;const r=this._graphicsBySymbol.get(e);this._graphicsBySymbol.delete(e),void 0!==r&&this._graphicsBySymbol.set(t,r);const s=this._symbols.get(e);if(void 0!==s&&(this._symbols.delete(e),this._symbols.set(t,s),h(s))){const e="string"==typeof i?null:i;h(e)?s.symbol=e:s.symbol.id=t}}_updateUnchangedSymbolMappings(e,i,t){const r=this._calculateUnchangedSymbolMapping(e,i,t);for(const{oldId:s,newId:a}of r)this._updateSymbolMapping(s,a)}_applyRendererDiff(e,t,r){if(this._diffHasSymbolChange(e))return!1;if(t instanceof i&&r instanceof i&&this._applyUniqueValueRendererDiff(e,t,r)&&0===Object.keys(e.diff).length)return!0;for(const[i]of this._graphicsBySymbol){const r=this._symbols.get(i);if(h(r))switch(r.applyRendererDiff(e,t)){case ye.Recreate_Symbol:this._recreateSymbol(i);break;case ye.Recreate_Graphics:this._recreateGraphicsForSymbol(i);case ye.Fast_Update:}}return!0}opacityChange(){this.forEachGraphics3DSymbol(((e,i)=>e.globalPropertyChanged("opacity",i))),this._updateStageLayerVisibility()}_slicePlaneEnabledChange(e){e!==this.symbolCreationContext.slicePlaneEnabled&&(this.symbolCreationContext.slicePlaneEnabled=e,this.stageLayer.isSliceable=e,this.forEachGraphics3DSymbol(((e,i)=>e.globalPropertyChanged("slicePlaneEnabled",i))),this._deconflictor&&this._deconflictor.slicePlaneEnabledChange(),this._labeler&&this._labeler.slicePlaneEnabledChange())}_physicalBasedRenderingChange(e){e!==this.symbolCreationContext.physicalBasedRenderingEnabled&&(this.symbolCreationContext.physicalBasedRenderingEnabled=e,this.forEachGraphics3DSymbol(((e,i,t)=>{e.globalPropertyChanged("physicalBasedRenderingEnabled",i)||this._recreateSymbol(t)})))}_pixelRatioChange(){this.forEachGraphics3DSymbol(((e,i,t)=>{e.globalPropertyChanged("pixelRatio",i)||this._recreateSymbol(t)}))}_signalUpdatingDuringAsyncLoadedGraphicsChange(){this._updatingPendingLoadedGraphicsChange&&this._updatingPendingLoadedGraphicsChange.remove(),this._updatingPendingLoadedGraphicsChange=R((()=>{this._updatingPendingLoadedGraphicsChange=null}))}setClippingExtent(e,i){const t=this.symbolCreationContext.clippingExtent,r=N();return fe(e,r,i)?this.symbolCreationContext.clippingExtent=M(k(),r):this.symbolCreationContext.clippingExtent=null,!W(this.symbolCreationContext.clippingExtent,t)}modifyGraphics3DGraphicVisibilities(e){let i=!1;this.graphics3DGraphics.forEach((t=>{e(t)&&(i=!0)})),i&&(this.owner.view.labeler?.setDirty(),this.owner.view.deconflictor.setDirty())}forEachGraphics3DSymbol(e){for(const[i,t]of this._symbols){if(c(t))return;e(t,this._graphicsBySymbol.get(i)||Ne,i)}}updateAllGraphicsVisibility(){h(this._filterVisibility)&&this._filterVisibility.reapply(),this.modifyGraphics3DGraphicVisibilities((e=>{const i=this._updateUserVisibility(e),t=h(this._scaleVisibility)&&this._scaleVisibility.updateVisibility(e);return i||t}))}_hideAllGraphics(){this.modifyGraphics3DGraphicVisibilities((e=>e.setVisibilityFlag(te.USER_SETTING,!1,re.GRAPHIC)))}_validateRenderer(e){const i=Q(e,{geometryType:this.layer?.geometryType});if(i){const e=`Renderer for layer '${this.layer.title?`${this.layer.title}, `:""}, id:${this.layer.id}' is not supported in a SceneView`;Le.warn(e,i.message)}}_volatileGraphicsUpdated(){this._labeler?.reset(),this.stageLayer.shaderTransformationChanged(),this.notifyChange("updating")}_cleanupSymbols(){if(this._graphicsWaitingForSymbol.size>0||this._suspendSymbolCleanup)return;let e=!1;this._symbols.forEach(((i,t)=>{if(c(i)||i.referenced>0)return;const r=this._graphicsBySymbol.get(t);r&&0!==r.size||(this._graphicsBySymbol.delete(t),this._symbols.delete(t),p(i),e=!0)})),e&&(this._recomputeExtentPadding(),this.notifyChange("averageSymbolComplexity"))}get test(){return{snapshotInternals:()=>({graphics:[...this.graphics3DGraphics.keys()].sort(),symbols:[...this._symbols.keys()].sort(),graphicsBySymbol:[...this._graphicsBySymbol.keys()].sort().map((e=>({symbolId:e,graphics:[...this._graphicsBySymbol.get(e).keys()].sort()}))),graphicsWithoutSymbol:[...this._graphicsWithoutSymbol.keys()].sort(),graphicsDrapedUids:[...this._graphicsDrapedUids].sort(),pendingUpdates:this._pendingUpdates}),symbols:this._symbols,filterVisibility:this._filterVisibility,numPending:this._pendingUpdates.size,forceUpdatePolicy:e=>{this.forcedUpdatePolicy=e}}}get performanceInfo(){return{visible:this.graphics3DGraphics.size,missing:this._graphicsWithoutSymbol.size,pending:this._pendingUpdates.size}}};var Te;Fe.tmpVec=j(),e([P({readOnly:!0})],Fe.prototype,"computedExtent",void 0),e([P()],Fe.prototype,"currentRenderer",void 0),e([P()],Fe.prototype,"rendererHasGeometryOperations",void 0),e([P()],Fe.prototype,"_frameTask",void 0),e([P()],Fe.prototype,"_rendererChangeAbortController",void 0),e([P()],Fe.prototype,"_elevationInfoChangeAbortController",void 0),e([P()],Fe.prototype,"_initializeAbortController",void 0),e([P()],Fe.prototype,"_elevationAlignment",void 0),e([P()],Fe.prototype,"_scaleVisibility",void 0),e([P()],Fe.prototype,"_filterVisibility",void 0),e([P()],Fe.prototype,"_initializePromise",void 0),e([P()],Fe.prototype,"_spatialIndex",void 0),e([P({readOnly:!0})],Fe.prototype,"extentPadding",void 0),e([P()],Fe.prototype,"_updatingPendingLoadedGraphicsChange",void 0),e([P()],Fe.prototype,"_featureStore",void 0),e([P()],Fe.prototype,"_deconflictor",void 0),e([P()],Fe.prototype,"_labeler",void 0),e([P()],Fe.prototype,"_objectStates",void 0),e([P()],Fe.prototype,"_loadingSymbols",void 0),e([P()],Fe.prototype,"preferredUpdatePolicy",void 0),e([P()],Fe.prototype,"forcedUpdatePolicy",void 0),e([P({readOnly:!0})],Fe.prototype,"effectiveUpdatePolicy",null),e([P({constructOnly:!0})],Fe.prototype,"elevationFeatureExpressionEnabled",void 0),e([P({constructOnly:!0})],Fe.prototype,"owner",void 0),e([P({constructOnly:!0})],Fe.prototype,"layer",void 0),e([P({constructOnly:!0})],Fe.prototype,"graphicSymbolSupported",void 0),e([P({constructOnly:!0})],Fe.prototype,"getRenderingInfoWithoutRenderer",void 0),e([P({constructOnly:!0})],Fe.prototype,"componentFactories",void 0),e([P({constructOnly:!0})],Fe.prototype,"setUidToIdOnAdd",void 0),e([P()],Fe.prototype,"featureStore",null),e([P()],Fe.prototype,"initializePromise",null),e([P()],Fe.prototype,"scaleVisibility",null),e([P()],Fe.prototype,"elevationAlignment",null),e([P()],Fe.prototype,"objectStates",null),e([P()],Fe.prototype,"filterVisibility",null),e([P({readOnly:!0})],Fe.prototype,"updating",null),e([P({readOnly:!0})],Fe.prototype,"running",null),e([P({readOnly:!0})],Fe.prototype,"suspendedOrOutsideOfView",null),e([P({readOnly:!0,dependsOn:[]})],Fe.prototype,"updatingRemaining",null),e([P({readOnly:!0,dependsOn:["owner.view.qualitySettings.graphics3D.maxTotalNumberOfPrimitives","owner.view.qualitySettings.graphics3D.maxTotalNumberOfFeatures","averageSymbolComplexity"]})],Fe.prototype,"displayFeatureLimit",null),e([P({readOnly:!0,dependsOn:[]})],Fe.prototype,"averageSymbolComplexity",null),e([P({constructOnly:!0})],Fe.prototype,"hasZ",void 0),e([P({constructOnly:!0})],Fe.prototype,"hasM",void 0),e([P()],Fe.prototype,"_objectIdField",null),Fe=Ue=e([D(Ve)],Fe),function(e){e[e.NEW=0]="NEW",e[e.LOADING=1]="LOADING",e[e.READY=2]="READY",e[e.REJECTED=3]="REJECTED"}(Te||(Te={}));class ke{constructor(){this.add=null,this.renderingInfo=null,this.state=Te.NEW,this.remove=null}clear(){this.add=null,this.renderingInfo=null,this.state=Te.NEW,this.abortController=null,this.remove=null}}const ze=10,Me=j(),We=j(),Ne=new Map;export{Fe as Graphics3DCore};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../core/Error.js";import{get as t,isSome as r,isNone as s}from"../../../../core/maybe.js";import{e as n}from"../../../../chunks/earcut.js";import{b as i}from"../../../../chunks/mat3.js";import{c as a}from"../../../../chunks/mat3f64.js";import{a as o}from"../../../../chunks/mat4.js";import{I as l,c}from"../../../../chunks/mat4f64.js";import{c as h,n as m,s as p,b as d,f as g,m as u}from"../../../../chunks/vec3.js";import{d as f,c as y}from"../../../../chunks/vec3f64.js";import{computeTranslationToOriginAndRotation as _}from"../../../../geometry/projection.js";import{create as b,empty as E,expandWithBuffer as x,intersectsClippingArea as P}from"../../../../geometry/support/aaBoundingBox.js";import{BufferViewVec3f64 as S}from"../../../../geometry/support/buffer/BufferView.js";import{t as v,a as j}from"../../../../chunks/vec32.js";import{getDriverAxisSizeValue as w}from"../../../../renderers/support/renderingInfoUtils.js";import{ViewingMode as A}from"../../../ViewingMode.js";import{needsElevationUpdates3D as L,evaluateElevationInfoAtPoint as M,SampleElevationInfo as O}from"./elevationAlignmentUtils.js";import{ElevationContext as B}from"./ElevationContext.js";import{Graphics3DObject3DGraphicLayer as I}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as C}from"./Graphics3DSymbolLayer.js";import{validateSymbolLayerSize as R,computeCentroid as T}from"./graphicUtils.js";import{ApplyRendererDiffResult as z}from"./interfaces.js";import{geometryAsPolygon as D}from"./polygonUtils.js";import{createMaterial as G}from"../support/edgeUtils.js";import U from"../../support/debugFlags.js";import{SamplePosition as k}from"../../support/ElevationProvider.js";import{geometryToRenderInfo as N}from"../../support/renderInfoUtils/polygon.js";import{CullFaceOptions as F,PrimitiveType as V}from"../../webgl-engine/lib/basicInterfaces.js";import{Geometry as H}from"../../webgl-engine/lib/Geometry.js";import{Object3D as Y}from"../../webgl-engine/lib/Object3D.js";import{VertexAttribute as Z}from"../../webgl-engine/lib/VertexAttribute.js";import{DefaultMaterial as W}from"../../webgl-engine/materials/DefaultMaterial.js";const q=["polygon","extent"];class J extends C{constructor(e,t,r,s){super(e,t,r,s),this.ensureDrapedStatus(!1)}async doLoad(){if(!this._drivenProperties.size){const t=R(this._getSymbolSize());if(t)throw new e("graphics3dextrudesymbollayer:invalid-size",t)}const r=t(this.symbolLayer,"material","color"),s=this._getCombinedOpacityAndColor(r),n=f(s),i=s[3],a=i<1||this.needsDrivenTransparentPass,o={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0,diffuse:n,ambient:n,opacity:i,transparent:a,cullFace:a?F.None:F.Back,hasVertexColors:!0,hasSlicePlane:this._context.slicePlaneEnabled,castShadows:this.symbolLayer.castShadows,offsetTransparentBackfaces:!0};this._material=new W(o),this._bottomMaterial=new W({...o,cullFace:F.Back}),this._context.stage.add(this._material),this._context.stage.add(this._bottomMaterial)}destroy(){super.destroy(),this._material&&(this._context.stage.remove(this._material),this._context.stage.remove(this._bottomMaterial))}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry,q,this.symbolLayer.type))return null;const r=this._getVertexOpacityAndColor(e.renderingInfo,255),s=this.setGraphicElevationContext(t,new B);return this._createAs3DShape(t,e.renderingInfo,r,s,t.uid)}layerOpacityChanged(e,s){const n=t(this.symbolLayer,"material","color"),i=this._getCombinedOpacity(n),a=i<1||this.needsDrivenTransparentPass;this._material.setParameters({opacity:i,transparent:a}),this._bottomMaterial.setParameters({opacity:i,transparent:a});const o=this._getLayerOpacity();return e.forEach((e=>{const t=s(e);r(t)&&t.layerOpacityChanged(o,this._context.isAsync)})),!0}layerElevationInfoChanged(e,t){return this.updateGraphics3DGraphicElevationInfo(e,t,L)}slicePlaneEnabledChanged(e,t){return this._material.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),this._bottomMaterial.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),e.forEach((e=>{const s=t(e);r(s)&&s.slicePlaneEnabledChanged(this._context.slicePlaneEnabled,this._context.isAsync)})),!0}physicalBasedRenderingChanged(){return this._material.setParameters({usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0}),this._bottomMaterial.setParameters({usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0}),!0}pixelRatioChanged(){return!0}_getExtrusionSize(e){let t;return t=e.size&&this._drivenProperties.size?w(e.size,2)??0:this._getSymbolSize(),t/=this._context.renderCoordsHelper.unitInMeters,t}applyRendererDiff(e,t){return this._drivenPropertiesChanged(t)?z.Recreate_Symbol:z.Recreate_Graphics}_getSymbolSize(){return this.symbolLayer.size??1}_createAs3DShape(e,t,h,m,p){const d=D(e.geometry);if(s(d))return null;if(0===d.rings.length||!d.rings.some((e=>e.length>0)))return this._logGeometryValidationWarnings(d.rings,"rings","ExtrudeSymbol3DLayer"),null;const g=N(d,this._context.elevationProvider,this._context.renderCoordsHelper,m);this._logGeometryCreationWarnings(g,d.rings,"rings","ExtrudeSymbol3DLayer");const u=T(d);if(s(u))return null;const f=new Array,w=new Array,M=new Array,O=b(),B=c(),C=y(),R=this._context.renderCoordsHelper.viewingMode===A.Global;R||this._context.renderCoordsHelper.worldUpAtPosition(null,C),_(d.spatialReference,[u.x,u.y,0],B,this._context.renderCoordsHelper.spatialReference);const z=c();o(z,B);const U=a();i(U,z);const{polygons:k,mapPosition:F,position:V}=g,H=V.length/3,Z=new Float64Array(3*H*6),W=new Float64Array(3*H*6),q=new Float64Array(3*H*6),J=new Float64Array(1*H*6);let X=0;for(let r=0;r<k.length;++r){const e=k[r],s=e.count;if(this._context.clippingExtent&&(E(O),x(O,e.mapPosition),!P(O,this._context.clippingExtent)))continue;const i=n(e.mapPosition,e.holeIndices,3);if(0===i.length)continue;const a=3*s*2+i.length,o=new Array(a),c=new Array(i.length),m=6*s,d=3*Z.BYTES_PER_ELEMENT,g=new S(Z.buffer,X*d,d,(X+m)*d),u=3*W.BYTES_PER_ELEMENT,y=new S(W.buffer,X*u,u,(X+m)*u),_=new Float64Array(q.buffer,3*X*q.BYTES_PER_ELEMENT,3*m),b=new Float64Array(J.buffer,1*X*J.BYTES_PER_ELEMENT,1*m),A=this._getExtrusionSize(t);Q(V,F,i,e,g.typedBuffer,_,y.typedBuffer,b,o,c,A,C,R),v(g,g,z),j(y,y,U),X+=6*s;const L=this._context.stage.renderView._getObjectAndLayerIdColor({graphicUid:p,layerUid:this._context.layer.uid}),B=K(o,o.length-c.length,{positions:g.typedBuffer,elevation:_,normals:y.typedBuffer,heights:b},h,L);f.push(B),w.push(this._material),M.push(l);const I=K(c,0,{positions:g.typedBuffer,elevation:_,normals:y.typedBuffer,heights:b},h,L);f.push(I),w.push(this._bottomMaterial),M.push(l)}if(0===f.length)return null;const $=new Y({geometries:f,materials:w,transformations:M,metadata:{layerUid:this._context.layer.uid,graphicUid:p,isElevationSource:!0}});$.transformation=B;const ee=G(this.symbolLayer,{opacity:this._getLayerOpacity()}),te=r(ee)?{baseMaterial:this._material,edgeMaterials:[ee],properties:{mergeGeometries:!0,hasSlicePlane:this._context.slicePlaneEnabled}}:null,re=new I(this,$,f,null,null,ce,m,te);return re.alignedSampledElevation=g.sampledElevation,re.needsElevationUpdates=L(m.mode),re}}function K(e,t,r,s,n){const i=new Array(e.length).fill(0),a=[[Z.POSITION,{size:3,data:r.positions,exclusive:!0}],[Z.NORMAL,{size:3,data:r.normals,exclusive:!0}],[Z.COLOR,{size:4,data:s,exclusive:!0}],[Z.SIZE,{size:1,data:r.heights,exclusive:!0}]],o=[[Z.POSITION,e],[Z.NORMAL,e],[Z.COLOR,i]];return r.elevation&&(a.push([Z.MAPPOS,{size:3,data:r.elevation}]),o.push([Z.MAPPOS,e])),new H(a,o,V.Triangle,n,t)}function Q(e,t,r,s,n,i,a,o,l,c,h,m,p){const d=r.length/3;let g=0,u=2*s.count;X(e,t,s.index,s.count,r,0,d,n,i,a,o,l,c,u,h,m,p);let f=2*s.count;u=0,te(n,i,o,a,g,s.pathLengths[0],s.count,f,l,u,h),f+=4*s.pathLengths[0],u+=2*s.pathLengths[0],g+=s.pathLengths[0];for(let y=1;y<s.pathLengths.length;++y)te(n,i,o,a,g,s.pathLengths[y],s.count,f,l,u,h),f+=4*s.pathLengths[y],u+=2*s.pathLengths[y],g+=s.pathLengths[y]}function X(e,t,r,s,n,i,a,o,l,c,p,d,g,u,f,y,_){h(me,y);const b=f>0?1:-1;let E=3*r,x=0,P=3*x,S=s,v=3*S;for(let h=0;h<s;++h)_&&(me[0]=e[E+0],me[1]=e[E+1],me[2]=e[E+2],m(me,me)),o[P+0]=e[E+0],o[P+1]=e[E+1],o[P+2]=e[E+2],l[P+0]=t[E+0],l[P+1]=t[E+1],l[P+2]=t[E+2],c[P+0]=-b*me[0],c[P+1]=-b*me[1],c[P+2]=-b*me[2],p[x]=0,o[v+0]=e[E+0]+f*me[0],o[v+1]=e[E+1]+f*me[1],o[v+2]=e[E+2]+f*me[2],l[v+0]=t[E+0],l[v+1]=t[E+1],l[v+2]=t[E+2],c[v+0]=b*me[0],c[v+1]=b*me[1],c[v+2]=b*me[2],p[S]=f,P+=3,v+=3,E+=3,x+=1,S+=1;E=3*i,P=0,v=3*u;const j=f<0?ge:de,w=f<0?de:ge;for(let h=0;h<a;++h)g[P+0]=n[E+j[0]],g[P+1]=n[E+j[1]],g[P+2]=n[E+j[2]],d[v+0]=n[E+w[0]]+s,d[v+1]=n[E+w[1]]+s,d[v+2]=n[E+w[2]]+s,P+=3,v+=3,E+=3}function $(e,t,r,s,n,i,a){s[i]=s[a],a*=3,e[(i*=3)+0]=e[a+0],e[i+1]=e[a+1],e[i+2]=e[a+2],t[i+0]=t[a+0],t[i+1]=t[a+1],t[i+2]=t[a+2],r[i+0]=n[0],r[i+1]=n[1],r[i+2]=n[2]}const ee=y();function te(e,t,r,s,n,i,a,o,l,c,h){let m=n,p=n+1,d=n+a,g=n+a+1,u=o,f=o+1,y=o+2*i,_=o+2*i+1;h<0&&(m=n+a+1,g=n),c*=3;for(let b=0;b<i;++b)b===i-1&&(h>0?(p=n,g=n+a):(p=n,m=n+a)),oe(e,m,p,d,ee),$(e,t,s,r,ee,u,m),$(e,t,s,r,ee,f,p),$(e,t,s,r,ee,y,d),$(e,t,s,r,ee,_,g),l[c++]=u,l[c++]=y,l[c++]=_,l[c++]=u,l[c++]=_,l[c++]=f,m++,p++,d++,g++,u+=2,f+=2,y+=2,_+=2}const re=y(),se=y(),ne=y(),ie=y(),ae=y();function oe(e,t,r,s,n){t*=3,r*=3,s*=3,p(re,e[t++],e[t++],e[t++]),p(se,e[r++],e[r++],e[r++]),p(ne,e[s++],e[s++],e[s++]),d(ie,se,re),d(ae,ne,re),g(n,ae,ie),m(n,n)}const le=y();function ce(e,t,s,n){const i=e.stageObject,a=i.geometryRecords,l=a.length,h="absolute-height"!==t.mode;let m=0;const d=i.transformation,g=o(c(),d);for(let o=0;o<l;o+=2){const e=a[o].geometry,l=e.getMutableAttribute(Z.POSITION).data,c=e.vertexAttributes.get(Z.SIZE).data,f=e.vertexAttributes.get(Z.MAPPOS).data,y=new k(f),_=l.length/3;let b=0,E=!1,x=0;const P=s.spatialReference;for(let i=0;i<_;i++){le[0]=l[b],le[1]=l[b+1],le[2]=l[b+2],M(y,s,t,n,pe),h&&(x+=pe.sampledElevation),U.TESTS_DISABLE_OPTIMIZATIONS?(p(he,y.array[y.offset+0],y.array[y.offset+1],pe.z+c[b/3]),r(P)&&n.toRenderCoords(he,P,he),u(he,he,g)):(p(he,l[b+0],l[b+1],l[b+2]),u(he,he,d),n.setAltitude(he,pe.z+c[b/3]),u(he,he,g)),l[b]=he[0],l[b+1]=he[1],l[b+2]=he[2];const e=ue/n.unitInMeters;(Math.abs(le[0]-l[b])>=e||Math.abs(le[1]-l[b+1])>=e||Math.abs(le[2]-l[b+2])>=e)&&(E=!0),y.offset+=3,b+=3}E&&(e.invalidateBoundingInfo(),i.geometryVertexAttrsUpdated(a[o]),a[o+1].geometry.invalidateBoundingInfo(),i.geometryVertexAttrsUpdated(a[o+1])),m+=x/_}return m/l}const he=y(),me=y(),pe=new O,de=[0,2,1],ge=[0,1,2],ue=.01;export{J as Graphics3DExtrudeSymbolLayer};
5
+ import e from"../../../../core/Error.js";import{get as t,isSome as r,isNone as s}from"../../../../core/maybe.js";import{e as n}from"../../../../chunks/earcut.js";import{d as i}from"../../../../chunks/mat3.js";import{c as a}from"../../../../chunks/mat3f64.js";import{a as o}from"../../../../chunks/mat4.js";import{I as l,c}from"../../../../chunks/mat4f64.js";import{c as h,n as p,s as m,b as d,f as g,v as u}from"../../../../chunks/vec3.js";import{d as f,c as y}from"../../../../chunks/vec3f64.js";import{computeTranslationToOriginAndRotation as _}from"../../../../geometry/projection.js";import{create as b,empty as E,expandWithBuffer as x,intersectsClippingArea as P}from"../../../../geometry/support/aaBoundingBox.js";import{BufferViewVec3f64 as S}from"../../../../geometry/support/buffer/BufferView.js";import{t as v,a as j}from"../../../../chunks/vec32.js";import{getDriverAxisSizeValue as w}from"../../../../renderers/support/renderingInfoUtils.js";import{ViewingMode as A}from"../../../ViewingMode.js";import{needsElevationUpdates3D as L,evaluateElevationInfoAtPoint as M,SampleElevationInfo as O}from"./elevationAlignmentUtils.js";import{ElevationContext as B}from"./ElevationContext.js";import{Graphics3DObject3DGraphicLayer as I}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as C}from"./Graphics3DSymbolLayer.js";import{validateSymbolLayerSize as R,computeCentroid as T}from"./graphicUtils.js";import{ApplyRendererDiffResult as z}from"./interfaces.js";import{geometryAsPolygon as D}from"./polygonUtils.js";import{createMaterial as G}from"../support/edgeUtils.js";import U from"../../support/debugFlags.js";import{SamplePosition as k}from"../../support/ElevationProvider.js";import{geometryToRenderInfo as N}from"../../support/renderInfoUtils/polygon.js";import{CullFaceOptions as F,PrimitiveType as V}from"../../webgl-engine/lib/basicInterfaces.js";import{Geometry as H}from"../../webgl-engine/lib/Geometry.js";import{Object3D as Y}from"../../webgl-engine/lib/Object3D.js";import{VertexAttribute as Z}from"../../webgl-engine/lib/VertexAttribute.js";import{DefaultMaterial as W}from"../../webgl-engine/materials/DefaultMaterial.js";const q=["polygon","extent"];class J extends C{constructor(e,t,r,s){super(e,t,r,s),this.ensureDrapedStatus(!1)}async doLoad(){if(!this._drivenProperties.size){const t=R(this._getSymbolSize());if(t)throw new e("graphics3dextrudesymbollayer:invalid-size",t)}const r=t(this.symbolLayer,"material","color"),s=this._getCombinedOpacityAndColor(r),n=f(s),i=s[3],a=i<1||this.needsDrivenTransparentPass,o={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0,diffuse:n,ambient:n,opacity:i,transparent:a,cullFace:a?F.None:F.Back,hasVertexColors:!0,hasSlicePlane:this._context.slicePlaneEnabled,castShadows:this.symbolLayer.castShadows,offsetTransparentBackfaces:!0};this._material=new W(o),this._bottomMaterial=new W({...o,cullFace:F.Back}),this._context.stage.add(this._material),this._context.stage.add(this._bottomMaterial)}destroy(){super.destroy(),this._material&&(this._context.stage.remove(this._material),this._context.stage.remove(this._bottomMaterial))}createGraphics3DGraphic(e){const t=e.graphic;if(!this._validateGeometry(t.geometry,q,this.symbolLayer.type))return null;const r=this._getVertexOpacityAndColor(e.renderingInfo,255),s=this.setGraphicElevationContext(t,new B);return this._createAs3DShape(t,e.renderingInfo,r,s,t.uid)}layerOpacityChanged(e,s){const n=t(this.symbolLayer,"material","color"),i=this._getCombinedOpacity(n),a=i<1||this.needsDrivenTransparentPass;this._material.setParameters({opacity:i,transparent:a}),this._bottomMaterial.setParameters({opacity:i,transparent:a});const o=this._getLayerOpacity();return e.forEach((e=>{const t=s(e);r(t)&&t.layerOpacityChanged(o,this._context.isAsync)})),!0}layerElevationInfoChanged(e,t){return this.updateGraphics3DGraphicElevationInfo(e,t,L)}slicePlaneEnabledChanged(e,t){return this._material.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),this._bottomMaterial.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),e.forEach((e=>{const s=t(e);r(s)&&s.slicePlaneEnabledChanged(this._context.slicePlaneEnabled,this._context.isAsync)})),!0}physicalBasedRenderingChanged(){return this._material.setParameters({usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0}),this._bottomMaterial.setParameters({usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0}),!0}pixelRatioChanged(){return!0}_getExtrusionSize(e){let t;return t=e.size&&this._drivenProperties.size?w(e.size,2)??0:this._getSymbolSize(),t/=this._context.renderCoordsHelper.unitInMeters,t}applyRendererDiff(e,t){return this._drivenPropertiesChanged(t)?z.Recreate_Symbol:z.Recreate_Graphics}_getSymbolSize(){return this.symbolLayer.size??1}_createAs3DShape(e,t,h,p,m){const d=D(e.geometry);if(s(d))return null;if(0===d.rings.length||!d.rings.some((e=>e.length>0)))return this._logGeometryValidationWarnings(d.rings,"rings","ExtrudeSymbol3DLayer"),null;const g=N(d,this._context.elevationProvider,this._context.renderCoordsHelper,p);this._logGeometryCreationWarnings(g,d.rings,"rings","ExtrudeSymbol3DLayer");const u=T(d);if(s(u))return null;const f=new Array,w=new Array,M=new Array,O=b(),B=c(),C=y(),R=this._context.renderCoordsHelper.viewingMode===A.Global;R||this._context.renderCoordsHelper.worldUpAtPosition(null,C),_(d.spatialReference,[u.x,u.y,0],B,this._context.renderCoordsHelper.spatialReference);const z=c();o(z,B);const U=a();i(U,z);const{polygons:k,mapPosition:F,position:V}=g,H=V.length/3,Z=new Float64Array(3*H*6),W=new Float64Array(3*H*6),q=new Float64Array(3*H*6),J=new Float64Array(1*H*6);let X=0;for(let r=0;r<k.length;++r){const e=k[r],s=e.count;if(this._context.clippingExtent&&(E(O),x(O,e.mapPosition),!P(O,this._context.clippingExtent)))continue;const i=n(e.mapPosition,e.holeIndices,3);if(0===i.length)continue;const a=3*s*2+i.length,o=new Array(a),c=new Array(i.length),p=6*s,d=3*Z.BYTES_PER_ELEMENT,g=new S(Z.buffer,X*d,d,(X+p)*d),u=3*W.BYTES_PER_ELEMENT,y=new S(W.buffer,X*u,u,(X+p)*u),_=new Float64Array(q.buffer,3*X*q.BYTES_PER_ELEMENT,3*p),b=new Float64Array(J.buffer,1*X*J.BYTES_PER_ELEMENT,1*p),A=this._getExtrusionSize(t);Q(V,F,i,e,g.typedBuffer,_,y.typedBuffer,b,o,c,A,C,R),v(g,g,z),j(y,y,U),X+=6*s;const L=this._context.stage.renderView._getObjectAndLayerIdColor({graphicUid:m,layerUid:this._context.layer.uid}),B=K(o,o.length-c.length,{positions:g.typedBuffer,elevation:_,normals:y.typedBuffer,heights:b},h,L);f.push(B),w.push(this._material),M.push(l);const I=K(c,0,{positions:g.typedBuffer,elevation:_,normals:y.typedBuffer,heights:b},h,L);f.push(I),w.push(this._bottomMaterial),M.push(l)}if(0===f.length)return null;const $=new Y({geometries:f,materials:w,transformations:M,metadata:{layerUid:this._context.layer.uid,graphicUid:m,isElevationSource:!0}});$.transformation=B;const ee=G(this.symbolLayer,{opacity:this._getLayerOpacity()}),te=r(ee)?{baseMaterial:this._material,edgeMaterials:[ee],properties:{mergeGeometries:!0,hasSlicePlane:this._context.slicePlaneEnabled}}:null,re=new I(this,$,f,null,null,ce,p,te);return re.alignedSampledElevation=g.sampledElevation,re.needsElevationUpdates=L(p.mode),re}}function K(e,t,r,s,n){const i=new Array(e.length).fill(0),a=[[Z.POSITION,{size:3,data:r.positions,exclusive:!0}],[Z.NORMAL,{size:3,data:r.normals,exclusive:!0}],[Z.COLOR,{size:4,data:s,exclusive:!0}],[Z.SIZE,{size:1,data:r.heights,exclusive:!0}]],o=[[Z.POSITION,e],[Z.NORMAL,e],[Z.COLOR,i]];return r.elevation&&(a.push([Z.MAPPOS,{size:3,data:r.elevation}]),o.push([Z.MAPPOS,e])),new H(a,o,V.Triangle,n,t)}function Q(e,t,r,s,n,i,a,o,l,c,h,p,m){const d=r.length/3;let g=0,u=2*s.count;X(e,t,s.index,s.count,r,0,d,n,i,a,o,l,c,u,h,p,m);let f=2*s.count;u=0,te(n,i,o,a,g,s.pathLengths[0],s.count,f,l,u,h),f+=4*s.pathLengths[0],u+=2*s.pathLengths[0],g+=s.pathLengths[0];for(let y=1;y<s.pathLengths.length;++y)te(n,i,o,a,g,s.pathLengths[y],s.count,f,l,u,h),f+=4*s.pathLengths[y],u+=2*s.pathLengths[y],g+=s.pathLengths[y]}function X(e,t,r,s,n,i,a,o,l,c,m,d,g,u,f,y,_){h(pe,y);const b=f>0?1:-1;let E=3*r,x=0,P=3*x,S=s,v=3*S;for(let h=0;h<s;++h)_&&(pe[0]=e[E+0],pe[1]=e[E+1],pe[2]=e[E+2],p(pe,pe)),o[P+0]=e[E+0],o[P+1]=e[E+1],o[P+2]=e[E+2],l[P+0]=t[E+0],l[P+1]=t[E+1],l[P+2]=t[E+2],c[P+0]=-b*pe[0],c[P+1]=-b*pe[1],c[P+2]=-b*pe[2],m[x]=0,o[v+0]=e[E+0]+f*pe[0],o[v+1]=e[E+1]+f*pe[1],o[v+2]=e[E+2]+f*pe[2],l[v+0]=t[E+0],l[v+1]=t[E+1],l[v+2]=t[E+2],c[v+0]=b*pe[0],c[v+1]=b*pe[1],c[v+2]=b*pe[2],m[S]=f,P+=3,v+=3,E+=3,x+=1,S+=1;E=3*i,P=0,v=3*u;const j=f<0?ge:de,w=f<0?de:ge;for(let h=0;h<a;++h)g[P+0]=n[E+j[0]],g[P+1]=n[E+j[1]],g[P+2]=n[E+j[2]],d[v+0]=n[E+w[0]]+s,d[v+1]=n[E+w[1]]+s,d[v+2]=n[E+w[2]]+s,P+=3,v+=3,E+=3}function $(e,t,r,s,n,i,a){s[i]=s[a],a*=3,e[(i*=3)+0]=e[a+0],e[i+1]=e[a+1],e[i+2]=e[a+2],t[i+0]=t[a+0],t[i+1]=t[a+1],t[i+2]=t[a+2],r[i+0]=n[0],r[i+1]=n[1],r[i+2]=n[2]}const ee=y();function te(e,t,r,s,n,i,a,o,l,c,h){let p=n,m=n+1,d=n+a,g=n+a+1,u=o,f=o+1,y=o+2*i,_=o+2*i+1;h<0&&(p=n+a+1,g=n),c*=3;for(let b=0;b<i;++b)b===i-1&&(h>0?(m=n,g=n+a):(m=n,p=n+a)),oe(e,p,m,d,ee),$(e,t,s,r,ee,u,p),$(e,t,s,r,ee,f,m),$(e,t,s,r,ee,y,d),$(e,t,s,r,ee,_,g),l[c++]=u,l[c++]=y,l[c++]=_,l[c++]=u,l[c++]=_,l[c++]=f,p++,m++,d++,g++,u+=2,f+=2,y+=2,_+=2}const re=y(),se=y(),ne=y(),ie=y(),ae=y();function oe(e,t,r,s,n){t*=3,r*=3,s*=3,m(re,e[t++],e[t++],e[t++]),m(se,e[r++],e[r++],e[r++]),m(ne,e[s++],e[s++],e[s++]),d(ie,se,re),d(ae,ne,re),g(n,ae,ie),p(n,n)}const le=y();function ce(e,t,s,n){const i=e.stageObject,a=i.geometryRecords,l=a.length,h="absolute-height"!==t.mode;let p=0;const d=i.transformation,g=o(c(),d);for(let o=0;o<l;o+=2){const e=a[o].geometry,l=e.getMutableAttribute(Z.POSITION).data,c=e.vertexAttributes.get(Z.SIZE).data,f=e.vertexAttributes.get(Z.MAPPOS).data,y=new k(f),_=l.length/3;let b=0,E=!1,x=0;const P=s.spatialReference;for(let i=0;i<_;i++){le[0]=l[b],le[1]=l[b+1],le[2]=l[b+2],M(y,s,t,n,me),h&&(x+=me.sampledElevation),U.TESTS_DISABLE_OPTIMIZATIONS?(m(he,y.array[y.offset+0],y.array[y.offset+1],me.z+c[b/3]),r(P)&&n.toRenderCoords(he,P,he),u(he,he,g)):(m(he,l[b+0],l[b+1],l[b+2]),u(he,he,d),n.setAltitude(he,me.z+c[b/3]),u(he,he,g)),l[b]=he[0],l[b+1]=he[1],l[b+2]=he[2];const e=ue/n.unitInMeters;(Math.abs(le[0]-l[b])>=e||Math.abs(le[1]-l[b+1])>=e||Math.abs(le[2]-l[b+2])>=e)&&(E=!0),y.offset+=3,b+=3}E&&(e.invalidateBoundingInfo(),i.geometryVertexAttrsUpdated(a[o]),a[o+1].geometry.invalidateBoundingInfo(),i.geometryVertexAttrsUpdated(a[o+1])),p+=x/_}return p/l}const he=y(),pe=y(),me=new O,de=[0,2,1],ge=[0,1,2],ue=.01;export{J as Graphics3DExtrudeSymbolLayer};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../Graphic.js";import{XXH as i}from"../../../../arcade/functions/hash.js";import{neverReached as s}from"../../../../core/compilerUtils.js";import{HandleOwner as r}from"../../../../core/HandleOwner.js";import{destroyMaybe as n,isSome as a,isNone as o,unwrap as l}from"../../../../core/maybe.js";import{logOnError as p}from"../../../../core/promiseUtils.js";import{watch as u,initial as h,when as d}from"../../../../core/reactiveUtils.js";import{property as c}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as m}from"../../../../core/accessorSupport/decorators/subclass.js";import{diff as y}from"../../../../core/accessorSupport/diffUtils.js";import{canProject as g,project as f}from"../../../../geometry/support/webMercatorUtils.js";import{matchRandomRotationExpression as b}from"../../../../renderers/support/randomRotationExpression.js";import{getRenderingInfo as E,getRenderingInfoAsync as C}from"../../../../renderers/support/renderingInfoUtils.js";import x from"../../../../rest/support/Query.js";import{DrapeSourceType as v}from"../interfaces.js";import{SUSPEND_RESUME_EXTENT_OPTIMISM as w}from"./constants.js";import{Graphics3DCore as V}from"./Graphics3DCore.js";import S from"./Graphics3DElevationAlignment.js";import j from"./Graphics3DFrustumVisibility.js";import{Graphics3DObjectStates as R}from"./Graphics3DObjectStates.js";import O from"./Graphics3DScaleVisibility.js";import{enlargeExtent as _}from"./graphicUtils.js";import{attributeLookup as G}from"../support/attributeUtils.js";import{FeatureVisibilityFilter as I}from"../support/FeatureVisibilityFilter.js";import{UpdatePolicy as A,Object3DState as P}from"../../webgl-engine/lib/basicInterfaces.js";let F=class extends r{constructor(e){super(e),this.type="graphics-3d",this._randomRotationRenderers=null,this.elevationFeatureExpressionEnabled=!1,this.scaleVisibilityEnabled=!1,this.filterVisibilityEnabled=!1,this.frustumVisibilityEnabled=!1,this.elevationAlignmentEnabled=!1,this.timeExtentEnabled=!1,this.dataExtent=null,this.drapeSourceType=v.Features,this.preferredUpdatePolicy=A.ASYNC,this._suspendResumeExtent=null}initialize(){const e=this.owner,t=(this.filterVisibilityEnabled||this.timeExtentEnabled)&&"multipatch"!==e.layer.geometryType,i=new V({owner:this,layer:this.layer,preferredUpdatePolicy:this.preferredUpdatePolicy,elevationFeatureExpressionEnabled:this.elevationFeatureExpressionEnabled,graphicSymbolSupported:!1,hasZ:e.hasZ,hasM:e.hasM,componentFactories:{deconflictor:t=>e.view.deconflictor.addGraphicsOwner(t),labeler:(t,i)=>e.view.labeler.addGraphicsOwner(t,i),elevationAlignment:this.elevationAlignmentEnabled?(t,i)=>new S({graphicsCoreOwner:this,graphicsCore:t,queryGraphicUIDsInExtent:i,elevationProvider:e.view.elevationProvider}):null,scaleVisibility:this.scaleVisibilityEnabled?(t,i)=>new O({graphicsCoreOwner:this,layer:this.layer,queryGraphicUIDsInExtent:i,graphicsCore:t,basemapTerrain:e.view.basemapTerrain}):null,filterVisibility:t?t=>new I({context:{layerView:e,...t}}):null,objectStates:e=>new R(e)}});this._set("graphicsCore",i),this.frustumVisibilityEnabled&&this._set("frustumVisibility",new j({graphicsCoreOwner:this})),this.elevationAlignment&&this.updatingHandles.add((()=>this.layer.elevationInfo),((e,t)=>{y(e,t)&&this.updatingHandles.addPromise(this.graphicsCore.elevationInfoChange())})),this.updatingHandles.add((()=>this.layer.labelsVisible),(()=>this.graphicsCore.updateVisibilityInfo())),this.updatingHandles.add((()=>this.layer.labelingInfo),((e,t)=>{y(e,t)&&this.graphicsCore.updateLabelingInfo()})),this.updatingHandles.add((()=>this.preferredUpdatePolicy),(e=>this.graphicsCore.preferredUpdatePolicy=e)),this._set("initializePromise",this._initializeAsync()),this.updatingHandles.addPromise(this.initializePromise)}async _initializeAsync(){await p(this.graphicsCore.initializePromise);const e=this.owner;this.updatingHandles.add((()=>this.renderer),(e=>this.updatingHandles.addPromise(this.graphicsCore.rendererChange(e)))),this.updatingHandles.add((()=>e.fullOpacity),(()=>this.graphicsCore.opacityChange())),this._setupSuspendResumeExtent(),this.updateClippingExtent&&(this.updatingHandles.add((()=>e.view.clippingArea),(()=>this._updateClippingExtent())),this._updateClippingExtent()),this.graphicsCore.startCreateGraphics(),this.graphicsCore.labelsEnabled&&await p(this.graphicsCore.updateLabelingInfo())}destroy(){this.handles.removeAll(),this.updatingHandles.removeAll(),this._set("frustumVisibility",n(this.frustumVisibility)),this._set("graphicsCore",n(this.graphicsCore)),this._set("owner",null)}get layer(){return this.owner.layer}get renderer(){const{renderer:e,objectIdField:t}=this.layer;if(!e||!t||"heatmap"===e.type||!e.visualVariables)return e;const i=e.visualVariables.findIndex((e=>"rotation"===e.type&&null!=e.valueExpression&&b(e.valueExpression)===t&&(null==e.axis||"heading"===e.axis)&&"geographic"===e.rotationType));if(i<0)return e;const s=e.clone();return s.visualVariables.splice(i,1),this._randomRotationRenderers||(this._randomRotationRenderers=new WeakMap),this._randomRotationRenderers.set(s,t),s}get scaleVisibility(){return this.graphicsCore?.scaleVisibility}get filterVisibility(){return this.graphicsCore?.filterVisibility}get elevationAlignment(){return this.graphicsCore?.elevationAlignment}get objectStates(){return this.graphicsCore?.objectStates}get suspendResumeExtentMode(){return"suspendResumeExtentMode"in this.owner?this.owner.suspendResumeExtentMode:"computed"}get scaleVisibilitySuspended(){return a(this.scaleVisibility)&&this.scaleVisibility.suspended}get suspended(){return this.owner.suspended}get legendEnabled(){return o(this.frustumVisibility)||!this.frustumVisibility.suspended}get suspendInfo(){const e={};return this.scaleVisibilitySuspended&&(e.outsideScaleRange=!0),a(this.frustumVisibility)&&this.frustumVisibility.suspended&&(e.outsideOfView=!0),e}get updating(){return!!(this.graphicsCore?.updating||a(this.frustumVisibility)&&this.frustumVisibility.updating||this.updatingHandles?.updating)}get updatingRemaining(){return this.graphicsCore?.updatingRemaining??0}get featureStore(){return this.graphicsCore?.featureStore}get view(){return this.owner.view}get loadedGraphics(){return this.owner.loadedGraphics}get fullOpacity(){return this.owner?.fullOpacity}get filter(){return"filter"in this.owner?this.owner.filter:null}get slicePlaneEnabled(){return this.owner.slicePlaneEnabled}get updatePolicy(){return this.owner.updatePolicy}get featureSpatialReference(){return"featureSpatialReference"in this.owner?this.owner.featureSpatialReference:this.owner.view.spatialReference}get graphics3DGraphics(){return this.graphicsCore?.graphics3DGraphics}get graphics3DGraphicsByObjectID(){return this.graphicsCore?.graphics3DGraphicsByObjectID}get symbolUpdateType(){return this.graphicsCore?.symbolUpdateType}get displayFeatureLimit(){const e=this.view.resourceController.memoryController.memoryFactor,t=this.graphicsCore?.displayFeatureLimit;if(1===e)return t;const i=Math.ceil(t.maximumNumberOfFeatures*e),s=Math.ceil(t.maximumTotalNumberOfFeatures*e),r=Math.ceil(t.minimumTotalNumberOfFeatures*e);return{...t,maximumNumberOfFeatures:i,maximumTotalNumberOfFeatures:s,minimumTotalNumberOfFeatures:r}}get usedMemory(){return this.graphicsCore?.usedMemory??0}get usedMemoryPerFeature(){return this.graphicsCore?.usedMemoryPerGraphic??0}get unprocessedMemoryEstimate(){return this.graphicsCore?.unprocessedMemoryEstimate??0}get performanceInfo(){return{core:this.graphicsCore.performanceInfo,elevationUpdating:this.elevationAlignment.updating,visibilityFrustum:o(this.frustumVisibility)||!this.frustumVisibility.suspended,visibilityScale:!this.scaleVisibilitySuspended}}maskOccludee(e){const{set:t,handle:i}=this.objectStates.acquireSet(P.MaskOccludee,null);return this.objectStates.setUid(t,e.uid),i}highlight(e,i){if(e instanceof x){const{set:t,handle:s}=this.objectStates.acquireSet(P.Highlight,i);return this.owner.queryObjectIds(e).then((e=>this.objectStates.setObjectIds(t,e))),s}if("number"==typeof e||"string"==typeof e)return this.highlight([e],i);if(e instanceof t)return this.highlight([e],i);if("toArray"in e&&(e=e.toArray()),Array.isArray(e)&&e.length>0){if(e[0]instanceof t){const t=e;if(null==G(this.layer.fieldsIndex,t[0].attributes,i)){const e=t.map((e=>e.uid)),{set:i,handle:s}=this.objectStates.acquireSet(P.Highlight,null);return this.objectStates.setUids(i,e),s}e=t.map((e=>G(this.layer.fieldsIndex,e.attributes,i)))}if("number"==typeof e[0]||"string"==typeof e[0]){const t=e,{set:s,handle:r}=this.objectStates.acquireSet(P.Highlight,i);return this.objectStates.setObjectIds(s,t),r}}return H}whenGraphicBounds(e,t){return this.graphicsCore?.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.graphicsCore?.computeAttachmentOrigin(e,t)}notifyGraphicGeometryChanged(e){this.graphicsCore.notifyGraphicGeometryChanged(e)}notifyGraphicVisibilityChanged(e){this.graphicsCore.notifyGraphicVisibilityChanged(e)}getRenderingInfo(e,t,s){const r=E(e,{renderer:t,arcade:s});if(a(r)&&r.color){const e=r.color;e[0]=e[0]/255,e[1]=e[1]/255,e[2]=e[2]/255}if(a(r)&&a(t)&&this._randomRotationRenderers?.has(t)){const s=this._randomRotationRenderers.get(t),n=e.attributes[s],a=new i(0);a.updateFloatArray([n]),a.updateUint8Array([173]),r.heading=8.381e-8*a.digest()}return r}getRenderingInfoAsync(e,t,i,s){return C(e,{renderer:t,arcade:i,...s})}getSymbolLayerSize(e,t){return this.graphicsCore?.getSymbolLayerSize(e,t)}setObjectIdVisibility(e,t){this.graphicsCore?.setObjectIdVisibility(e,t)}refreshFilter(){a(this.filterVisibility)&&this.filterVisibility.reapply()}_updateClippingExtent(){const e=this.owner.view.clippingArea;this.graphicsCore.setClippingExtent(e,this.owner.view.spatialReference)&&(this.updateClippingExtent(e)||this.graphicsCore.recreateAllGraphics())}_setupSuspendResumeExtent(){(this.frustumVisibility||this.scaleVisibility)&&this.handles.add(u((()=>this.suspendResumeExtentMode),(()=>{switch(this.handles.remove(M),this.suspendResumeExtentMode){case"computed":this.handles.add([u((()=>this.graphicsCore.computedExtent),(e=>this._updateSuspendResumeExtent(e)),h),u((()=>this.graphicsCore.extentPadding),(()=>this._updateSuspendResumeExtent(this.graphicsCore.computedExtent)))],M);break;case"data":this.handles.add([d((()=>this.dataExtent),(e=>this._updateSuspendResumeExtent(e)),h),u((()=>this.graphicsCore.extentPadding),(()=>this._updateSuspendResumeExtent(l(this.dataExtent))))],M);break;default:s(this.suspendResumeExtentMode)}}),h))}_updateSuspendResumeExtent(e){e?this._suspendResumeExtentChanged(this._extentToSuspendResumeRect(e,this._suspendResumeExtent)):this._suspendResumeExtentChanged(null)}_extentToSuspendResumeRect(e,t){const i=this.owner.view.spatialReference;if(!e.spatialReference.equals(i)){if(!g(e,i))return;e=f(e,i)}return _(e,t,w,this.graphicsCore.extentPadding)}_suspendResumeExtentChanged(e){a(this.frustumVisibility)&&this.frustumVisibility.setExtent(e),a(this.scaleVisibility)&&this.scaleVisibility.setExtent(e)}};e([c()],F.prototype,"type",void 0),e([c({constructOnly:!0})],F.prototype,"owner",void 0),e([c()],F.prototype,"layer",null),e([c()],F.prototype,"renderer",null),e([c({constructOnly:!0})],F.prototype,"updateClippingExtent",void 0),e([c({constructOnly:!0})],F.prototype,"elevationFeatureExpressionEnabled",void 0),e([c({constructOnly:!0})],F.prototype,"graphicsCore",void 0),e([c({constructOnly:!0})],F.prototype,"scaleVisibilityEnabled",void 0),e([c({constructOnly:!0})],F.prototype,"filterVisibilityEnabled",void 0),e([c({constructOnly:!0})],F.prototype,"frustumVisibilityEnabled",void 0),e([c({constructOnly:!0})],F.prototype,"elevationAlignmentEnabled",void 0),e([c({constructOnly:!0})],F.prototype,"timeExtentEnabled",void 0),e([c()],F.prototype,"scaleVisibility",null),e([c()],F.prototype,"filterVisibility",null),e([c()],F.prototype,"elevationAlignment",null),e([c({constructOnly:!0})],F.prototype,"frustumVisibility",void 0),e([c()],F.prototype,"objectStates",null),e([c()],F.prototype,"initializePromise",void 0),e([c()],F.prototype,"suspendResumeExtentMode",null),e([c()],F.prototype,"dataExtent",void 0),e([c()],F.prototype,"scaleVisibilitySuspended",null),e([c()],F.prototype,"suspended",null),e([c()],F.prototype,"legendEnabled",null),e([c()],F.prototype,"suspendInfo",null),e([c()],F.prototype,"updating",null),e([c()],F.prototype,"updatingRemaining",null),e([c()],F.prototype,"featureStore",null),e([c()],F.prototype,"view",null),e([c()],F.prototype,"loadedGraphics",null),e([c()],F.prototype,"fullOpacity",null),e([c()],F.prototype,"filter",null),e([c()],F.prototype,"slicePlaneEnabled",null),e([c()],F.prototype,"drapeSourceType",void 0),e([c()],F.prototype,"updatePolicy",null),e([c()],F.prototype,"preferredUpdatePolicy",void 0),e([c()],F.prototype,"displayFeatureLimit",null),F=e([m("esri.views.3d.layers.graphics.Graphics3DFeatureProcessor")],F);const U=F,M="suspendResumeExtentMode",H={remove(){},pause(){},resume(){}};export{U as default};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../Graphic.js";import{XXH as i}from"../../../../arcade/functions/hash.js";import{neverReached as s}from"../../../../core/compilerUtils.js";import{HandleOwner as r}from"../../../../core/HandleOwner.js";import{destroyMaybe as n,isSome as a,isNone as o,unwrap as l}from"../../../../core/maybe.js";import{logOnError as p}from"../../../../core/promiseUtils.js";import{watch as u,initial as d,when as h}from"../../../../core/reactiveUtils.js";import{property as c}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as m}from"../../../../core/accessorSupport/decorators/subclass.js";import{diff as y}from"../../../../core/accessorSupport/diffUtils.js";import{canProject as g,project as f}from"../../../../geometry/support/webMercatorUtils.js";import{matchRandomRotationExpression as b}from"../../../../renderers/support/randomRotationExpression.js";import{getRenderingInfo as E,getRenderingInfoAsync as C}from"../../../../renderers/support/renderingInfoUtils.js";import x from"../../../../rest/support/Query.js";import{DrapeSourceType as v}from"../interfaces.js";import{SUSPEND_RESUME_EXTENT_OPTIMISM as w}from"./constants.js";import{Graphics3DCore as V}from"./Graphics3DCore.js";import S from"./Graphics3DElevationAlignment.js";import j from"./Graphics3DFrustumVisibility.js";import{Graphics3DObjectStates as R}from"./Graphics3DObjectStates.js";import O from"./Graphics3DScaleVisibility.js";import{enlargeExtent as I}from"./graphicUtils.js";import{attributeLookup as _}from"../support/attributeUtils.js";import{FeatureVisibilityFilter as A}from"../support/FeatureVisibilityFilter.js";import{UpdatePolicy as G,Object3DState as P}from"../../webgl-engine/lib/basicInterfaces.js";let U=class extends r{constructor(e){super(e),this.type="graphics-3d",this._randomRotationRenderers=null,this.elevationFeatureExpressionEnabled=!1,this.scaleVisibilityEnabled=!1,this.filterVisibilityEnabled=!1,this.frustumVisibilityEnabled=!1,this.elevationAlignmentEnabled=!1,this.timeExtentEnabled=!1,this.setUidToIdOnAdd=!0,this.dataExtent=null,this.drapeSourceType=v.Features,this.preferredUpdatePolicy=G.ASYNC,this._suspendResumeExtent=null}initialize(){const e=this.owner,t=(this.filterVisibilityEnabled||this.timeExtentEnabled)&&"multipatch"!==e.layer.geometryType,i=new V({owner:this,layer:this.layer,preferredUpdatePolicy:this.preferredUpdatePolicy,elevationFeatureExpressionEnabled:this.elevationFeatureExpressionEnabled,graphicSymbolSupported:!1,hasZ:e.hasZ,hasM:e.hasM,setUidToIdOnAdd:this.setUidToIdOnAdd,componentFactories:{deconflictor:t=>e.view.deconflictor.addGraphicsOwner(t),labeler:(t,i)=>e.view.labeler.addGraphicsOwner(t,i),elevationAlignment:this.elevationAlignmentEnabled?(t,i)=>new S({graphicsCoreOwner:this,graphicsCore:t,queryGraphicUIDsInExtent:i,elevationProvider:e.view.elevationProvider}):null,scaleVisibility:this.scaleVisibilityEnabled?(t,i)=>new O({graphicsCoreOwner:this,layer:this.layer,queryGraphicUIDsInExtent:i,graphicsCore:t,basemapTerrain:e.view.basemapTerrain}):null,filterVisibility:t?t=>new A({context:{layerView:e,...t}}):null,objectStates:e=>new R(e)}});this._set("graphicsCore",i),this.frustumVisibilityEnabled&&this._set("frustumVisibility",new j({graphicsCoreOwner:this})),this.elevationAlignment&&this.updatingHandles.add((()=>this.layer.elevationInfo),((e,t)=>{y(e,t)&&this.updatingHandles.addPromise(this.graphicsCore.elevationInfoChange())})),this.updatingHandles.add((()=>this.layer.labelsVisible),(()=>this.graphicsCore.updateVisibilityInfo())),this.updatingHandles.add((()=>this.layer.labelingInfo),((e,t)=>{y(e,t)&&this.graphicsCore.updateLabelingInfo()})),this.updatingHandles.add((()=>this.preferredUpdatePolicy),(e=>this.graphicsCore.preferredUpdatePolicy=e)),this._set("initializePromise",this._initializeAsync()),this.updatingHandles.addPromise(this.initializePromise)}async _initializeAsync(){await p(this.graphicsCore.initializePromise);const e=this.owner;this.updatingHandles.add((()=>this.renderer),(e=>this.updatingHandles.addPromise(this.graphicsCore.rendererChange(e)))),this.updatingHandles.add((()=>e.fullOpacity),(()=>this.graphicsCore.opacityChange())),this._setupSuspendResumeExtent(),this.updateClippingExtent&&(this.updatingHandles.add((()=>e.view.clippingArea),(()=>this._updateClippingExtent())),this._updateClippingExtent()),this.graphicsCore.startCreateGraphics(),this.graphicsCore.labelsEnabled&&await p(this.graphicsCore.updateLabelingInfo())}destroy(){this.handles.removeAll(),this.updatingHandles.removeAll(),this._set("frustumVisibility",n(this.frustumVisibility)),this._set("graphicsCore",n(this.graphicsCore)),this._set("owner",null)}get layer(){return this.owner.layer}get renderer(){const{renderer:e,objectIdField:t}=this.layer;if(!e||!t||"heatmap"===e.type||!e.visualVariables)return e;const i=e.visualVariables.findIndex((e=>"rotation"===e.type&&null!=e.valueExpression&&b(e.valueExpression)===t&&(null==e.axis||"heading"===e.axis)&&"geographic"===e.rotationType));if(i<0)return e;const s=e.clone();return s.visualVariables.splice(i,1),this._randomRotationRenderers||(this._randomRotationRenderers=new WeakMap),this._randomRotationRenderers.set(s,t),s}get scaleVisibility(){return this.graphicsCore?.scaleVisibility}get filterVisibility(){return this.graphicsCore?.filterVisibility}get elevationAlignment(){return this.graphicsCore?.elevationAlignment}get objectStates(){return this.graphicsCore?.objectStates}get suspendResumeExtentMode(){return"suspendResumeExtentMode"in this.owner?this.owner.suspendResumeExtentMode:"computed"}get scaleVisibilitySuspended(){return a(this.scaleVisibility)&&this.scaleVisibility.suspended}get suspended(){return this.owner.suspended}get legendEnabled(){return o(this.frustumVisibility)||!this.frustumVisibility.suspended}get suspendInfo(){const e={};return this.scaleVisibilitySuspended&&(e.outsideScaleRange=!0),a(this.frustumVisibility)&&this.frustumVisibility.suspended&&(e.outsideOfView=!0),e}get updating(){return!!(this.graphicsCore?.updating||a(this.frustumVisibility)&&this.frustumVisibility.updating||this.updatingHandles?.updating)}get updatingRemaining(){return this.graphicsCore?.updatingRemaining??0}get featureStore(){return this.graphicsCore?.featureStore}get view(){return this.owner.view}get loadedGraphics(){return this.owner.loadedGraphics}get fullOpacity(){return this.owner?.fullOpacity}get filter(){return"filter"in this.owner?this.owner.filter:null}get slicePlaneEnabled(){return this.owner.slicePlaneEnabled}get updatePolicy(){return this.owner.updatePolicy}get featureSpatialReference(){return"featureSpatialReference"in this.owner?this.owner.featureSpatialReference:this.owner.view.spatialReference}get graphics3DGraphics(){return this.graphicsCore?.graphics3DGraphics}get graphics3DGraphicsByObjectID(){return this.graphicsCore?.graphics3DGraphicsByObjectID}get symbolUpdateType(){return this.graphicsCore?.symbolUpdateType}get displayFeatureLimit(){const e=this.view.resourceController.memoryController.memoryFactor,t=this.graphicsCore?.displayFeatureLimit;if(1===e)return t;const i=Math.ceil(t.maximumNumberOfFeatures*e),s=Math.ceil(t.maximumTotalNumberOfFeatures*e),r=Math.ceil(t.minimumTotalNumberOfFeatures*e);return{...t,maximumNumberOfFeatures:i,maximumTotalNumberOfFeatures:s,minimumTotalNumberOfFeatures:r}}get usedMemory(){return this.graphicsCore?.usedMemory??0}get usedMemoryPerFeature(){return this.graphicsCore?.usedMemoryPerGraphic??0}get unprocessedMemoryEstimate(){return this.graphicsCore?.unprocessedMemoryEstimate??0}get performanceInfo(){return{core:this.graphicsCore.performanceInfo,elevationUpdating:this.elevationAlignment.updating,visibilityFrustum:o(this.frustumVisibility)||!this.frustumVisibility.suspended,visibilityScale:!this.scaleVisibilitySuspended}}maskOccludee(e){const{set:t,handle:i}=this.objectStates.acquireSet(P.MaskOccludee,null);return this.objectStates.setUid(t,e.uid),i}highlight(e,i){if(e instanceof x){const{set:t,handle:s}=this.objectStates.acquireSet(P.Highlight,i);return this.owner.queryObjectIds(e).then((e=>this.objectStates.setObjectIds(t,e))),s}if("number"==typeof e||"string"==typeof e)return this.highlight([e],i);if(e instanceof t)return this.highlight([e],i);if("toArray"in e&&(e=e.toArray()),Array.isArray(e)&&e.length>0){if(e[0]instanceof t){const t=e;if(null==_(this.layer.fieldsIndex,t[0].attributes,i)){const e=t.map((e=>e.uid)),{set:i,handle:s}=this.objectStates.acquireSet(P.Highlight,null);return this.objectStates.setUids(i,e),s}e=t.map((e=>_(this.layer.fieldsIndex,e.attributes,i)))}if("number"==typeof e[0]||"string"==typeof e[0]){const t=e,{set:s,handle:r}=this.objectStates.acquireSet(P.Highlight,i);return this.objectStates.setObjectIds(s,t),r}}return T}whenGraphicBounds(e,t){return this.graphicsCore?.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.graphicsCore?.computeAttachmentOrigin(e,t)}notifyGraphicGeometryChanged(e){this.graphicsCore.notifyGraphicGeometryChanged(e)}notifyGraphicVisibilityChanged(e){this.graphicsCore.notifyGraphicVisibilityChanged(e)}getRenderingInfo(e,t,s){const r=E(e,{renderer:t,arcade:s});if(a(r)&&r.color){const e=r.color;e[0]=e[0]/255,e[1]=e[1]/255,e[2]=e[2]/255}if(a(r)&&a(t)&&this._randomRotationRenderers?.has(t)){const s=this._randomRotationRenderers.get(t),n=e.attributes[s],a=new i(0);a.updateFloatArray([n]),a.updateUint8Array([173]),r.heading=8.381e-8*a.digest()}return r}getRenderingInfoAsync(e,t,i,s){return C(e,{renderer:t,arcade:i,...s})}getSymbolLayerSize(e,t){return this.graphicsCore?.getSymbolLayerSize(e,t)}setObjectIdVisibility(e,t){this.graphicsCore?.setObjectIdVisibility(e,t)}refreshFilter(){a(this.filterVisibility)&&this.filterVisibility.reapply()}_updateClippingExtent(){const e=this.owner.view.clippingArea;this.graphicsCore.setClippingExtent(e,this.owner.view.spatialReference)&&(this.updateClippingExtent(e)||this.graphicsCore.recreateAllGraphics())}_setupSuspendResumeExtent(){(this.frustumVisibility||this.scaleVisibility)&&this.handles.add(u((()=>this.suspendResumeExtentMode),(()=>{switch(this.handles.remove(M),this.suspendResumeExtentMode){case"computed":this.handles.add([u((()=>this.graphicsCore.computedExtent),(e=>this._updateSuspendResumeExtent(e)),d),u((()=>this.graphicsCore.extentPadding),(()=>this._updateSuspendResumeExtent(this.graphicsCore.computedExtent)))],M);break;case"data":this.handles.add([h((()=>this.dataExtent),(e=>this._updateSuspendResumeExtent(e)),d),u((()=>this.graphicsCore.extentPadding),(()=>this._updateSuspendResumeExtent(l(this.dataExtent))))],M);break;default:s(this.suspendResumeExtentMode)}}),d))}_updateSuspendResumeExtent(e){e?this._suspendResumeExtentChanged(this._extentToSuspendResumeRect(e,this._suspendResumeExtent)):this._suspendResumeExtentChanged(null)}_extentToSuspendResumeRect(e,t){const i=this.owner.view.spatialReference;if(!e.spatialReference.equals(i)){if(!g(e,i))return;e=f(e,i)}return I(e,t,w,this.graphicsCore.extentPadding)}_suspendResumeExtentChanged(e){a(this.frustumVisibility)&&this.frustumVisibility.setExtent(e),a(this.scaleVisibility)&&this.scaleVisibility.setExtent(e)}};e([c()],U.prototype,"type",void 0),e([c({constructOnly:!0})],U.prototype,"owner",void 0),e([c()],U.prototype,"layer",null),e([c()],U.prototype,"renderer",null),e([c({constructOnly:!0})],U.prototype,"updateClippingExtent",void 0),e([c({constructOnly:!0})],U.prototype,"elevationFeatureExpressionEnabled",void 0),e([c({constructOnly:!0})],U.prototype,"graphicsCore",void 0),e([c({constructOnly:!0})],U.prototype,"scaleVisibilityEnabled",void 0),e([c({constructOnly:!0})],U.prototype,"filterVisibilityEnabled",void 0),e([c({constructOnly:!0})],U.prototype,"frustumVisibilityEnabled",void 0),e([c({constructOnly:!0})],U.prototype,"elevationAlignmentEnabled",void 0),e([c({constructOnly:!0})],U.prototype,"timeExtentEnabled",void 0),e([c({constructOnly:!0})],U.prototype,"setUidToIdOnAdd",void 0),e([c()],U.prototype,"scaleVisibility",null),e([c()],U.prototype,"filterVisibility",null),e([c()],U.prototype,"elevationAlignment",null),e([c({constructOnly:!0})],U.prototype,"frustumVisibility",void 0),e([c()],U.prototype,"objectStates",null),e([c()],U.prototype,"initializePromise",void 0),e([c()],U.prototype,"suspendResumeExtentMode",null),e([c()],U.prototype,"dataExtent",void 0),e([c()],U.prototype,"scaleVisibilitySuspended",null),e([c()],U.prototype,"suspended",null),e([c()],U.prototype,"legendEnabled",null),e([c()],U.prototype,"suspendInfo",null),e([c()],U.prototype,"updating",null),e([c()],U.prototype,"updatingRemaining",null),e([c()],U.prototype,"featureStore",null),e([c()],U.prototype,"view",null),e([c()],U.prototype,"loadedGraphics",null),e([c()],U.prototype,"fullOpacity",null),e([c()],U.prototype,"filter",null),e([c()],U.prototype,"slicePlaneEnabled",null),e([c()],U.prototype,"drapeSourceType",void 0),e([c()],U.prototype,"updatePolicy",null),e([c()],U.prototype,"preferredUpdatePolicy",void 0),e([c()],U.prototype,"displayFeatureLimit",null),U=e([m("esri.views.3d.layers.graphics.Graphics3DFeatureProcessor")],U);const F=U,M="suspendResumeExtentMode",T={remove(){},pause(){},resume(){}};export{F as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{isSome as e}from"../../../../core/maybe.js";import{c as t}from"../../../../chunks/mat4f64.js";import{m as i,s as n}from"../../../../chunks/vec3.js";import{c as s}from"../../../../chunks/vec3f64.js";import{empty as a,expandWithVec3 as r,create as o,isPoint as h,center as l,offset as c}from"../../../../geometry/support/aaBoundingBox.js";import{setContextFeature as d}from"./featureExpressionInfoUtils.js";import{demResolutionForBoundingBox as g}from"./graphicUtils.js";import{Object3DState as m}from"../../webgl-engine/lib/basicInterfaces.js";import{Object3DStateID as u}from"../../webgl-engine/lib/Object3DStateID.js";class f{constructor(e,t,i,n){this.graphics3DSymbolLayer=e,this.instanceIndex=t,this.elevationAligner=i,this.elevationContext=n,this.type="lod-instance",this._highlights=new Set,this.alignedSampledElevation=0,this.isElevationSource=!1,this.needsElevationUpdates=!1}initialize(){}setVisibility(e){const t=this._lodRenderer.instanceData;e!==t.getVisible(this.instanceIndex)&&t.setVisible(this.instanceIndex,e)}destroy(){null!=this.instanceIndex&&(this._lodRenderer.instanceData.removeInstance(this.instanceIndex),this.graphics3DSymbolLayer.notifyDestroyGraphicLayer(this))}alignWithElevation(t,i,n){if(this.elevationAligner){d(this.elevationContext.featureExpressionInfoContext,n);const s=this.elevationAligner(this,this.elevationContext,t,i);e(s)&&(this.alignedSampledElevation=s)}}getCenterObjectSpace(e=s()){return this._lodRenderer.instanceData.getCombinedLocalTransform(this.instanceIndex,I),i(e,this._lodRenderer.baseBoundingSphere.center,I)}getBoundingBoxObjectSpace(e=o()){this._lodRenderer.instanceData.getCombinedLocalTransform(this.instanceIndex,I);const t=this._lodRenderer.baseBoundingBox;a(e);for(let s=0;s<8;++s)n(x,0==(1&s)?t[0]:t[3],0==(2&s)?t[1]:t[4],0==(4&s)?t[2]:t[5]),i(x,x,I),r(e,x);return e}computeAttachmentOrigin(e){this._lodRenderer.instanceData.getGlobalTransform(this.instanceIndex,I),e.render.origin[0]+=I[12],e.render.origin[1]+=I[13],e.render.origin[2]+=I[14],e.render.num++}async getProjectedBoundingBox(t,n,s,r,o){const d=this.getBoundingBoxObjectSpace(o),m=v,u=h(d)?1:m.length;this._lodRenderer.instanceData.getGlobalTransform(this.instanceIndex,I);for(let e=0;e<u;e++){const t=m[e];x[0]=d[t[0]],x[1]=d[t[1]],x[2]=d[t[2]],i(x,x,I),p[3*e+0]=x[0],p[3*e+1]=x[1],p[3*e+2]=x[2]}if(!t(p,0,u))return null;a(d);let f=null;this.calculateRelativeScreenBounds&&(f=this.calculateRelativeScreenBounds());for(let e=0;e<3*u;e+=3){for(let t=0;t<3;t++)d[t]=Math.min(d[t],p[e+t]),d[t+3]=Math.max(d[t+3],p[e+t]);f&&s.push({location:p.slice(e,e+3),screenSpaceBoundingRect:f})}if(n&&(l(d,b),"absolute-height"!==this.elevationContext.mode)){let t;const i=g(d,n.service.spatialReference,n);try{t=await n.service.queryElevation(b[0],b[1],r,i,"ground")}catch(_){}e(t)&&c(d,0,0,-this.alignedSampledElevation+t)}return d}addObjectState(e,t){if(e===m.Highlight){const i=new u(e);this._addHighlightId(i),t.addExternal((e=>{this._removeHighlightId(e)}),i)}}removeObjectState(e){this._highlights.forEach((t=>e.remove(t)))}_addHighlightId(e){this._highlights.add(e),this._lodRenderer.instanceData.setHighlight(this.instanceIndex,!0)}_removeHighlightId(e){this._highlights.delete(e),this._lodRenderer.instanceData.setHighlight(this.instanceIndex,this._highlights.size>0)}get _lodRenderer(){return this.graphics3DSymbolLayer.lodRenderer}}const p=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],x=s(),b=s(),v=[[0,1,2],[3,1,2],[0,4,2],[3,4,2],[0,1,5],[3,1,5],[0,4,5],[3,4,5]],I=t();export{f as default};
5
+ import{isSome as e}from"../../../../core/maybe.js";import{c as t}from"../../../../chunks/mat4f64.js";import{v as i,s as n}from"../../../../chunks/vec3.js";import{c as s}from"../../../../chunks/vec3f64.js";import{empty as a,expandWithVec3 as r,create as o,isPoint as h,center as l,offset as c}from"../../../../geometry/support/aaBoundingBox.js";import{setContextFeature as d}from"./featureExpressionInfoUtils.js";import{demResolutionForBoundingBox as g}from"./graphicUtils.js";import{Object3DState as m}from"../../webgl-engine/lib/basicInterfaces.js";import{Object3DStateID as u}from"../../webgl-engine/lib/Object3DStateID.js";class f{constructor(e,t,i,n){this.graphics3DSymbolLayer=e,this.instanceIndex=t,this.elevationAligner=i,this.elevationContext=n,this.type="lod-instance",this._highlights=new Set,this.alignedSampledElevation=0,this.isElevationSource=!1,this.needsElevationUpdates=!1}initialize(){}setVisibility(e){const t=this._lodRenderer.instanceData;e!==t.getVisible(this.instanceIndex)&&t.setVisible(this.instanceIndex,e)}destroy(){null!=this.instanceIndex&&(this._lodRenderer.instanceData.removeInstance(this.instanceIndex),this.graphics3DSymbolLayer.notifyDestroyGraphicLayer(this))}alignWithElevation(t,i,n){if(this.elevationAligner){d(this.elevationContext.featureExpressionInfoContext,n);const s=this.elevationAligner(this,this.elevationContext,t,i);e(s)&&(this.alignedSampledElevation=s)}}getCenterObjectSpace(e=s()){return this._lodRenderer.instanceData.getCombinedLocalTransform(this.instanceIndex,I),i(e,this._lodRenderer.baseBoundingSphere.center,I)}getBoundingBoxObjectSpace(e=o()){this._lodRenderer.instanceData.getCombinedLocalTransform(this.instanceIndex,I);const t=this._lodRenderer.baseBoundingBox;a(e);for(let s=0;s<8;++s)n(v,0==(1&s)?t[0]:t[3],0==(2&s)?t[1]:t[4],0==(4&s)?t[2]:t[5]),i(v,v,I),r(e,v);return e}computeAttachmentOrigin(e){this._lodRenderer.instanceData.getGlobalTransform(this.instanceIndex,I),e.render.origin[0]+=I[12],e.render.origin[1]+=I[13],e.render.origin[2]+=I[14],e.render.num++}async getProjectedBoundingBox(t,n,s,r,o){const d=this.getBoundingBoxObjectSpace(o),m=b,u=h(d)?1:m.length;this._lodRenderer.instanceData.getGlobalTransform(this.instanceIndex,I);for(let e=0;e<u;e++){const t=m[e];v[0]=d[t[0]],v[1]=d[t[1]],v[2]=d[t[2]],i(v,v,I),p[3*e+0]=v[0],p[3*e+1]=v[1],p[3*e+2]=v[2]}if(!t(p,0,u))return null;a(d);let f=null;this.calculateRelativeScreenBounds&&(f=this.calculateRelativeScreenBounds());for(let e=0;e<3*u;e+=3){for(let t=0;t<3;t++)d[t]=Math.min(d[t],p[e+t]),d[t+3]=Math.max(d[t+3],p[e+t]);f&&s.push({location:p.slice(e,e+3),screenSpaceBoundingRect:f})}if(n&&(l(d,x),"absolute-height"!==this.elevationContext.mode)){let t;const i=g(d,n.service.spatialReference,n);try{t=await n.service.queryElevation(x[0],x[1],r,i,"ground")}catch(_){}e(t)&&c(d,0,0,-this.alignedSampledElevation+t)}return d}addObjectState(e,t){if(e===m.Highlight){const i=new u(e);this._addHighlightId(i),t.addExternal((e=>{this._removeHighlightId(e)}),i)}}removeObjectState(e){this._highlights.forEach((t=>e.remove(t)))}_addHighlightId(e){this._highlights.add(e),this._lodRenderer.instanceData.setHighlight(this.instanceIndex,!0)}_removeHighlightId(e){this._highlights.delete(e),this._lodRenderer.instanceData.setHighlight(this.instanceIndex,this._highlights.size>0)}get _lodRenderer(){return this.graphics3DSymbolLayer.lodRenderer}}const p=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],v=s(),x=s(),b=[[0,1,2],[3,1,2],[0,4,2],[3,4,2],[0,1,5],[3,1,5],[0,4,5],[3,4,5]],I=t();export{f as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.25/esri/copyright.txt for details.
4
4
  */
5
- import{isSome as e,isNone as t,unwrapOr as s}from"../../../../core/maybe.js";import{c as i,m as a,a as r}from"../../../../chunks/vec3.js";import{c as n}from"../../../../chunks/vec3f64.js";import{setMin as o,setMax as c,create as h,isPoint as g,empty as d,center as l,offset as b}from"../../../../geometry/support/aaBoundingBox.js";import{g as u}from"../../../../chunks/sphere.js";import{setContextFeature as O}from"./featureExpressionInfoUtils.js";import{demResolutionForBoundingBox as j}from"./graphicUtils.js";import{Object3DState as m}from"../../webgl-engine/lib/basicInterfaces.js";import{Transparency as p}from"../../webgl-engine/lib/edgeRendering/interfaces.js";class _{constructor(e,t,s,i,a,r,n,o=null){this.graphics3DSymbolLayer=e,this.stageObject=t,this._uniqueGeometries=s,this._uniqueMaterials=i,this._sharedResource=a,this.elevationAligner=r,this.elevationContext=n,this._edgeState=o,this.type="object3d",this._stageLayer=null,this._stage=null,this._visible=!1,this._addedToStage=!1,this.alignedSampledElevation=0,this.needsElevationUpdates=!1,this.useObjectOriginAsAttachmentOrigin=!1,this.graphics3DSymbolLayer=e,this.stageObject=t}get isElevationSource(){return!(!this.stageObject.metadata||!this.stageObject.metadata.isElevationSource)}initialize(e,t){this._stageLayer=t,this._stage=e,e.addMany(this._uniqueMaterials),e.addMany(this._uniqueGeometries),e.add(this.stageObject)}destroy(){const t=this._stage;this._stageLayer&&(t.removeMany(this._uniqueMaterials),t.removeMany(this._uniqueGeometries)),t.remove(this.stageObject),this._addedToStage&&(this._stageLayer.remove(this.stageObject),this._addedToStage=!1);const s=this._stage.renderView.ensureEdgeView();s.hasObject(this.stageObject)&&s.removeObject(this.stageObject),this.stageObject.dispose(),e(this._sharedResource)&&this._sharedResource.release(),this._visible=!1,this._stageLayer=null,this._stage=null}layerOpacityChanged(e,s){if(t(this._edgeState))return;const i=v(this._edgeState.baseMaterial);let a=!1;for(const t of this._edgeState.edgeMaterials)t.objectTransparency!==i&&(t.objectTransparency=i,a=!0);a&&this._resetEdgeObject(s);this._stage.renderView.ensureEdgeView().updateAllComponentOpacities(this.stageObject,[e])}slicePlaneEnabledChanged(e,s){if(t(this._edgeState))return;this._stage.renderView.ensureEdgeView().updateAllComponentMaterials(this.stageObject,this._edgeState.edgeMaterials,{hasSlicePlane:e},!s),this._edgeState.properties.hasSlicePlane=e}setVisibility(t){if(null!=this._stage&&this._visible!==t&&(this._visible=t,this._visible?this._addedToStage?this.stageObject.setVisible(!0):(this._stageLayer.add(this.stageObject),this._addedToStage=!0):this.stageObject.setVisible(!1),e(this._edgeState))){const e=this._stage.renderView.ensureEdgeView();e.hasObject(this.stageObject)?e.updateObjectVisibility(this.stageObject,t):t&&this._addOrUpdateEdgeObject(e,!1)}}get visible(){return this._visible}alignWithElevation(t,s,i,a){null!=this.elevationAligner&&(e(i)&&O(this.elevationContext.featureExpressionInfoContext,i),this.alignedSampledElevation=this.elevationAligner(this,this.elevationContext,t,s),this._resetEdgeObject(a))}getCenterObjectSpace(e=n()){return i(e,u(this.stageObject.boundingVolumeObjectSpace.bounds))}getBoundingBoxObjectSpace(e=h()){const t=this.stageObject.boundingVolumeObjectSpace;return o(e,t.min),c(e,t.max),e}computeAttachmentOrigin(e){if(this.useObjectOriginAsAttachmentOrigin){const t=this.stageObject.transformation;e.render.origin[0]+=t[12],e.render.origin[1]+=t[13],e.render.origin[2]+=t[14],e.render.num++}else for(const t of this.stageObject.geometryRecords)t.computeAttachmentOrigin(y)&&(a(y,y,this.stageObject.transformation),r(e.render.origin,e.render.origin,y),e.render.num++)}async getProjectedBoundingBox(e,t,i,r,n){const o=this.getBoundingBoxObjectSpace(n),c=E,h=g(o)?1:c.length;for(let s=0;s<h;s++){const e=c[s];S[0]=o[e[0]],S[1]=o[e[1]],S[2]=o[e[2]],a(S,S,this.stageObject.transformation),f[3*s+0]=S[0],f[3*s+1]=S[1],f[3*s+2]=S[2]}if(!e(f,0,h))return null;d(o);let u=null;this.calculateRelativeScreenBounds&&(u=this.calculateRelativeScreenBounds());for(let s=0;s<3*h;s+=3){for(let e=0;e<3;e++)o[e]=Math.min(o[e],f[s+e]),o[e+3]=Math.max(o[e+3],f[s+e]);u&&i.push({location:f.slice(s,s+3),screenSpaceBoundingRect:u})}if(t&&t.service&&"absolute-height"!==this.elevationContext.mode){l(o,y);const e="relative-to-scene"===this.elevationContext.mode?"scene":"ground";let i=0;if(t.useViewElevation)i=s(t.service.getElevation(y[0],y[1],e),0);else try{const a=j(o,t.service.spatialReference,t);i=s(await t.service.queryElevation(y[0],y[1],r,a,e),0)}catch(O){}b(o,0,0,-this.alignedSampledElevation+i)}return o}addObjectState(e,t){e===m.Highlight&&t.addObject(this.stageObject,this.stageObject.highlight()),e===m.MaskOccludee&&t.addObject(this.stageObject,this.stageObject.maskOccludee())}removeObjectState(e){e.removeObject(this.stageObject)}_resetEdgeObject(e){if(t(this._edgeState))return;const s=this._stage.renderView.ensureEdgeView();this._visible?this._addOrUpdateEdgeObject(s,e):s.removeObject(this.stageObject)}_addOrUpdateEdgeObject(e,s){const i=this._edgeState;if(t(i))return;const a=v(i.baseMaterial);for(const t of i.edgeMaterials)t.objectTransparency=a;e.addOrUpdateObject3D(this.stageObject,i.edgeMaterials,i.properties,!s).then((()=>this._stageLayer?.sync()))}}function v(e){return e.isVisible?e.parameters.transparent?p.TRANSPARENT:p.OPAQUE:p.INVISIBLE}const f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],S=n(),y=n(),E=[[0,1,2],[3,1,2],[0,4,2],[3,4,2],[0,1,5],[3,1,5],[0,4,5],[3,4,5]];export{_ as Graphics3DObject3DGraphicLayer};
5
+ import{isSome as e,isNone as t,unwrapOr as s}from"../../../../core/maybe.js";import{c as i,v as a,a as r}from"../../../../chunks/vec3.js";import{c as n}from"../../../../chunks/vec3f64.js";import{setMin as o,setMax as c,create as h,isPoint as g,empty as d,center as l,offset as b}from"../../../../geometry/support/aaBoundingBox.js";import{g as u}from"../../../../chunks/sphere.js";import{setContextFeature as O}from"./featureExpressionInfoUtils.js";import{demResolutionForBoundingBox as j}from"./graphicUtils.js";import{Object3DState as m}from"../../webgl-engine/lib/basicInterfaces.js";import{Transparency as p}from"../../webgl-engine/lib/edgeRendering/interfaces.js";class _{constructor(e,t,s,i,a,r,n,o=null){this.graphics3DSymbolLayer=e,this.stageObject=t,this._uniqueGeometries=s,this._uniqueMaterials=i,this._sharedResource=a,this.elevationAligner=r,this.elevationContext=n,this._edgeState=o,this.type="object3d",this._stageLayer=null,this._stage=null,this._visible=!1,this._addedToStage=!1,this.alignedSampledElevation=0,this.needsElevationUpdates=!1,this.useObjectOriginAsAttachmentOrigin=!1,this.graphics3DSymbolLayer=e,this.stageObject=t}get isElevationSource(){return!(!this.stageObject.metadata||!this.stageObject.metadata.isElevationSource)}initialize(e,t){this._stageLayer=t,this._stage=e,e.addMany(this._uniqueMaterials),e.addMany(this._uniqueGeometries),e.add(this.stageObject)}destroy(){const t=this._stage;this._stageLayer&&(t.removeMany(this._uniqueMaterials),t.removeMany(this._uniqueGeometries)),t.remove(this.stageObject),this._addedToStage&&(this._stageLayer.remove(this.stageObject),this._addedToStage=!1);const s=this._stage.renderView.ensureEdgeView();s.hasObject(this.stageObject)&&s.removeObject(this.stageObject),this.stageObject.dispose(),e(this._sharedResource)&&this._sharedResource.release(),this._visible=!1,this._stageLayer=null,this._stage=null}layerOpacityChanged(e,s){if(t(this._edgeState))return;const i=v(this._edgeState.baseMaterial);let a=!1;for(const t of this._edgeState.edgeMaterials)t.objectTransparency!==i&&(t.objectTransparency=i,a=!0);a&&this._resetEdgeObject(s);this._stage.renderView.ensureEdgeView().updateAllComponentOpacities(this.stageObject,[e])}slicePlaneEnabledChanged(e,s){if(t(this._edgeState))return;this._stage.renderView.ensureEdgeView().updateAllComponentMaterials(this.stageObject,this._edgeState.edgeMaterials,{hasSlicePlane:e},!s),this._edgeState.properties.hasSlicePlane=e}setVisibility(t){if(null!=this._stage&&this._visible!==t&&(this._visible=t,this._visible?this._addedToStage?this.stageObject.setVisible(!0):(this._stageLayer.add(this.stageObject),this._addedToStage=!0):this.stageObject.setVisible(!1),e(this._edgeState))){const e=this._stage.renderView.ensureEdgeView();e.hasObject(this.stageObject)?e.updateObjectVisibility(this.stageObject,t):t&&this._addOrUpdateEdgeObject(e,!1)}}get visible(){return this._visible}alignWithElevation(t,s,i,a){null!=this.elevationAligner&&(e(i)&&O(this.elevationContext.featureExpressionInfoContext,i),this.alignedSampledElevation=this.elevationAligner(this,this.elevationContext,t,s),this._resetEdgeObject(a))}getCenterObjectSpace(e=n()){return i(e,u(this.stageObject.boundingVolumeObjectSpace.bounds))}getBoundingBoxObjectSpace(e=h()){const t=this.stageObject.boundingVolumeObjectSpace;return o(e,t.min),c(e,t.max),e}computeAttachmentOrigin(e){if(this.useObjectOriginAsAttachmentOrigin){const t=this.stageObject.transformation;e.render.origin[0]+=t[12],e.render.origin[1]+=t[13],e.render.origin[2]+=t[14],e.render.num++}else for(const t of this.stageObject.geometryRecords)t.computeAttachmentOrigin(y)&&(a(y,y,this.stageObject.transformation),r(e.render.origin,e.render.origin,y),e.render.num++)}async getProjectedBoundingBox(e,t,i,r,n){const o=this.getBoundingBoxObjectSpace(n),c=E,h=g(o)?1:c.length;for(let s=0;s<h;s++){const e=c[s];S[0]=o[e[0]],S[1]=o[e[1]],S[2]=o[e[2]],a(S,S,this.stageObject.transformation),f[3*s+0]=S[0],f[3*s+1]=S[1],f[3*s+2]=S[2]}if(!e(f,0,h))return null;d(o);let u=null;this.calculateRelativeScreenBounds&&(u=this.calculateRelativeScreenBounds());for(let s=0;s<3*h;s+=3){for(let e=0;e<3;e++)o[e]=Math.min(o[e],f[s+e]),o[e+3]=Math.max(o[e+3],f[s+e]);u&&i.push({location:f.slice(s,s+3),screenSpaceBoundingRect:u})}if(t&&t.service&&"absolute-height"!==this.elevationContext.mode){l(o,y);const e="relative-to-scene"===this.elevationContext.mode?"scene":"ground";let i=0;if(t.useViewElevation)i=s(t.service.getElevation(y[0],y[1],e),0);else try{const a=j(o,t.service.spatialReference,t);i=s(await t.service.queryElevation(y[0],y[1],r,a,e),0)}catch(O){}b(o,0,0,-this.alignedSampledElevation+i)}return o}addObjectState(e,t){e===m.Highlight&&t.addObject(this.stageObject,this.stageObject.highlight()),e===m.MaskOccludee&&t.addObject(this.stageObject,this.stageObject.maskOccludee())}removeObjectState(e){e.removeObject(this.stageObject)}_resetEdgeObject(e){if(t(this._edgeState))return;const s=this._stage.renderView.ensureEdgeView();this._visible?this._addOrUpdateEdgeObject(s,e):s.removeObject(this.stageObject)}_addOrUpdateEdgeObject(e,s){const i=this._edgeState;if(t(i))return;const a=v(i.baseMaterial);for(const t of i.edgeMaterials)t.objectTransparency=a;e.addOrUpdateObject3D(this.stageObject,i.edgeMaterials,i.properties,!s).then((()=>this._stageLayer?.sync()))}}function v(e){return e.isVisible?e.parameters.transparent?p.TRANSPARENT:p.OPAQUE:p.INVISIBLE}const f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],S=n(),y=n(),E=[[0,1,2],[3,1,2],[0,4,2],[3,4,2],[0,1,5],[3,1,5],[0,4,5],[3,4,5]];export{_ as Graphics3DObject3DGraphicLayer};