@arcgis/core 4.23.0-next.20220106 → 4.23.0-next.20220118

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 (522) hide show
  1. package/assets/components/assets/calcite-date-picker/nls/bg.json +31 -0
  2. package/assets/components/assets/calcite-icon/centerAlign16.json +1 -0
  3. package/assets/components/assets/calcite-icon/centerAlign24.json +1 -0
  4. package/assets/components/assets/calcite-icon/centerAlign32.json +1 -0
  5. package/assets/components/assets/calcite-icon/checkSquareF16.json +1 -0
  6. package/assets/components/assets/calcite-icon/checkSquareF24.json +1 -0
  7. package/assets/components/assets/calcite-icon/checkSquareF32.json +1 -0
  8. package/assets/components/assets/calcite-icon/convert16.json +1 -0
  9. package/assets/components/assets/calcite-icon/convert24.json +1 -0
  10. package/assets/components/assets/calcite-icon/convert32.json +1 -0
  11. package/assets/components/assets/calcite-icon/explore16.json +1 -0
  12. package/assets/components/assets/calcite-icon/explore24.json +1 -0
  13. package/assets/components/assets/calcite-icon/explore32.json +1 -0
  14. package/assets/components/assets/calcite-icon/formDropdown16.json +1 -0
  15. package/assets/components/assets/calcite-icon/formDropdown24.json +1 -0
  16. package/assets/components/assets/calcite-icon/formDropdown32.json +1 -0
  17. package/assets/components/assets/calcite-icon/language16.json +1 -0
  18. package/assets/components/assets/calcite-icon/language24.json +1 -0
  19. package/assets/components/assets/calcite-icon/language32.json +1 -0
  20. package/assets/components/assets/calcite-icon/languageTranslate16.json +1 -0
  21. package/assets/components/assets/calcite-icon/languageTranslate24.json +1 -0
  22. package/assets/components/assets/calcite-icon/languageTranslate32.json +1 -0
  23. package/assets/components/assets/calcite-icon/leftAlign16.json +1 -0
  24. package/assets/components/assets/calcite-icon/leftAlign24.json +1 -0
  25. package/assets/components/assets/calcite-icon/leftAlign32.json +1 -0
  26. package/assets/components/assets/calcite-icon/lineSolid4.json +1 -0
  27. package/assets/components/assets/calcite-icon/partlyCloudy16.json +1 -0
  28. package/assets/components/assets/calcite-icon/partlyCloudy24.json +1 -0
  29. package/assets/components/assets/calcite-icon/partlyCloudy32.json +1 -0
  30. package/assets/components/assets/calcite-icon/rightAlign16.json +1 -0
  31. package/assets/components/assets/calcite-icon/rightAlign24.json +1 -0
  32. package/assets/components/assets/calcite-icon/rightAlign32.json +1 -0
  33. package/assets/components/assets/calcite-icon/screenshotMode16.json +1 -0
  34. package/assets/components/assets/calcite-icon/screenshotMode24.json +1 -0
  35. package/assets/components/assets/calcite-icon/screenshotMode32.json +1 -0
  36. package/assets/components/assets/calcite-icon/squareF16.json +1 -0
  37. package/assets/components/assets/calcite-icon/squareF24.json +1 -0
  38. package/assets/components/assets/calcite-icon/squareF32.json +1 -0
  39. package/assets/components/assets/calcite-icon/terminal16.json +1 -0
  40. package/assets/components/assets/calcite-icon/terminal24.json +1 -0
  41. package/assets/components/assets/calcite-icon/terminal32.json +1 -0
  42. package/assets/components/assets/calcite-icon/touch16.json +1 -0
  43. package/assets/components/assets/calcite-icon/touch24.json +1 -0
  44. package/assets/components/assets/calcite-icon/touch32.json +1 -0
  45. package/assets/components/assets/calcite-icon/xHexagon16.json +1 -0
  46. package/assets/components/assets/calcite-icon/xHexagon24.json +1 -0
  47. package/assets/components/assets/calcite-icon/xHexagon32.json +1 -0
  48. package/assets/components/assets/calcite-icon/xHexagonF16.json +1 -0
  49. package/assets/components/assets/calcite-icon/xHexagonF24.json +1 -0
  50. package/assets/components/assets/calcite-icon/xHexagonF32.json +1 -0
  51. package/assets/components/assets/calcite-icon/xOctagonF16.json +1 -0
  52. package/assets/components/assets/calcite-icon/xOctagonF24.json +1 -0
  53. package/assets/components/assets/calcite-icon/xOctagonF32.json +1 -0
  54. package/assets/esri/core/workers/RemoteClient.js +1 -1
  55. package/assets/esri/core/workers/chunks/01ef8de7f76a8c61b464.js +1 -0
  56. package/assets/esri/core/workers/chunks/09da224052976e290828.js +1 -0
  57. package/assets/esri/core/workers/chunks/{2c9af2ebd72d9b55329b.js → 0f254c3e91e8fee55f28.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{ce5ca5e95b2378ec55b9.js → 1305ef8717da6e902a55.js} +1 -1
  59. package/assets/esri/core/workers/chunks/20411bb8e04703962ce6.js +1 -0
  60. package/assets/esri/core/workers/chunks/21a77eed1a4ef5b0ff08.js +1 -0
  61. package/assets/esri/core/workers/chunks/2416f8bf8bbd2ec786ab.js +1 -0
  62. package/assets/esri/core/workers/chunks/25a3e9bc0b4c7e0d3165.js +1 -0
  63. package/assets/esri/core/workers/chunks/{9c417740bf3707a0d465.js → 2c607d30ff8ca1b61286.js} +1 -1
  64. package/assets/esri/core/workers/chunks/2d947080a27db6ce0d75.js +1 -0
  65. package/assets/esri/core/workers/chunks/2e445a8735ea2adb641a.js +1 -0
  66. package/assets/esri/core/workers/chunks/3564e14010953def6df9.js +1 -0
  67. package/assets/esri/core/workers/chunks/37a7bd30352b1309b8f8.js +1 -0
  68. package/assets/esri/core/workers/chunks/390d9021169e65c10eb8.js +1 -0
  69. package/assets/esri/core/workers/chunks/{3d5169ea9810d10caf0d.js → 3a9740dccda6a733313c.js} +1 -1
  70. package/assets/esri/core/workers/chunks/403c7d64f12f00330d88.js +1 -0
  71. package/assets/esri/core/workers/chunks/4409d77c9734de4e82a7.js +1 -0
  72. package/assets/esri/core/workers/chunks/{f52b6d5037e4205b035c.js → 47395d225229d237f0ac.js} +1 -1
  73. package/assets/esri/core/workers/chunks/4b69129c0557852d9b3d.js +1 -0
  74. package/assets/esri/core/workers/chunks/4c301ca9c493b96df746.js +1 -0
  75. package/assets/esri/core/workers/chunks/57c67e260267a1dbc5e3.js +1 -0
  76. package/assets/esri/core/workers/chunks/5ac4c1d54b94c7d87835.js +1 -0
  77. package/assets/esri/core/workers/chunks/60371c0f750cde87656d.js +1 -0
  78. package/assets/esri/core/workers/chunks/631c5b514bb73782c570.js +1 -0
  79. package/assets/esri/core/workers/chunks/{3a2b2dc3e938d53faa30.js → 64276aacaafa4c8a15bd.js} +1 -1
  80. package/assets/esri/core/workers/chunks/{75466e0c8c8da499b150.js → 662d13f68cf3ec92439b.js} +1 -1
  81. package/assets/esri/core/workers/chunks/6c1e92ff4c732dfda756.js +1 -0
  82. package/assets/esri/core/workers/chunks/6cdfe175c965918b741b.js +1 -0
  83. package/assets/esri/core/workers/chunks/75d53b28afe732c459b2.js +1 -0
  84. package/assets/esri/core/workers/chunks/{ea05f870dda27bca4fe8.js → 7a8764ae8a0041e1151d.js} +2 -2
  85. package/assets/esri/core/workers/chunks/{ea05f870dda27bca4fe8.js.LICENSE.txt → 7a8764ae8a0041e1151d.js.LICENSE.txt} +1 -1
  86. package/assets/esri/core/workers/chunks/{b4ed7856cd9c98434477.js → 7c9d2638693d5f798b23.js} +1 -1
  87. package/assets/esri/core/workers/chunks/7e596478507466953e65.js +1 -0
  88. package/assets/esri/core/workers/chunks/85b34d91cf07567d6873.js +1 -0
  89. package/assets/esri/core/workers/chunks/85e27fd949475f9a6bbc.js +1 -0
  90. package/assets/esri/core/workers/chunks/8967288145f8fbd20e7d.js +1 -0
  91. package/assets/esri/core/workers/chunks/89de05207744149fb58b.js +1 -0
  92. package/assets/esri/core/workers/chunks/8cbb04a9065aa3756638.js +1 -0
  93. package/assets/esri/core/workers/chunks/{9846098704ee38bf6350.js → 8fdd5bca3716816d359b.js} +1 -1
  94. package/assets/esri/core/workers/chunks/96ab518eb6ba11333dee.js +1 -0
  95. package/assets/esri/core/workers/chunks/987182b3a578fc7de251.js +1 -0
  96. package/assets/esri/core/workers/chunks/99a777693e4539f0b03b.js +1 -0
  97. package/assets/esri/core/workers/chunks/9d77467aa71d345fc1b6.js +1 -0
  98. package/assets/esri/core/workers/chunks/{4beba242e7540ee3182b.js → 9d9dffc8884d66a258e4.js} +1 -1
  99. package/assets/esri/core/workers/chunks/9f8b7b6b4e95f9a794fc.js +1 -0
  100. package/assets/esri/core/workers/chunks/{a721342a32541717324d.js → a28b53c61bddefb6616e.js} +1 -1
  101. package/assets/esri/core/workers/chunks/{9b7c51ff3d2b42aa62f5.js → a7b1b75643ed31489495.js} +1 -1
  102. package/assets/esri/core/workers/chunks/a8b13fb804bb775e4967.js +1 -0
  103. package/assets/esri/core/workers/chunks/a8c13529367c037cdd94.js +1 -0
  104. package/assets/esri/core/workers/chunks/a960074644c3722be71e.js +1 -0
  105. package/assets/esri/core/workers/chunks/ac8dca61ade28c542ae2.js +1 -0
  106. package/assets/esri/core/workers/chunks/ad081d8e49e7f90c3c26.js +1 -0
  107. package/assets/esri/core/workers/chunks/b10fcbe1393c812fc219.js +1 -0
  108. package/assets/esri/core/workers/chunks/{2a39d520b192b8e552b5.js → b2ae5fc4f787ea568b88.js} +1 -1
  109. package/assets/esri/core/workers/chunks/{b51261a9a9ab62388839.js → b99e69302ea701fff0ea.js} +1 -1
  110. package/assets/esri/core/workers/chunks/{b87bc1481a49b38109f4.js → b9c177524b3e7de1ffd1.js} +1 -1
  111. package/assets/esri/core/workers/chunks/b9de831ac379cf1d2969.js +1 -0
  112. package/assets/esri/core/workers/chunks/ba615f118a3a8970ef25.js +1 -0
  113. package/assets/esri/core/workers/chunks/{7c1b9ae141112a63b446.js → ba6654a885be4b7a43f0.js} +1 -1
  114. package/assets/esri/core/workers/chunks/bc790b2f964144d10abe.js +1 -0
  115. package/assets/esri/core/workers/chunks/be2b7cce79fd41627931.js +1 -0
  116. package/assets/esri/core/workers/chunks/c13dfdd548dcb1bdb294.js +1 -0
  117. package/assets/esri/core/workers/chunks/c36f84daa7736878418d.js +1 -0
  118. package/assets/esri/core/workers/chunks/{b58eba403bd517a7bb15.js → c3eca92d02958732e141.js} +1 -1
  119. package/assets/esri/core/workers/chunks/c6f94b92e866b881d9b9.js +1 -0
  120. package/assets/esri/core/workers/chunks/cbb291412fd1a5261aa9.js +1 -0
  121. package/assets/esri/core/workers/chunks/d1454155ee1b8a421cbb.js +1 -0
  122. package/assets/esri/core/workers/chunks/{0cd583c3233573cb8468.js → d24c4fbc567486b1188f.js} +1 -1
  123. package/assets/esri/core/workers/chunks/d52108864136c5a8a618.js +1 -0
  124. package/assets/esri/core/workers/chunks/dd433c160f7a0c120b82.js +1 -0
  125. package/assets/esri/core/workers/chunks/de03439ca2c9782bf325.js +1 -0
  126. package/assets/esri/core/workers/chunks/e2d68bcd2f99a65387bf.js +1 -0
  127. package/assets/esri/core/workers/chunks/e59764ee8cf25d4f74e2.js +1 -0
  128. package/assets/esri/core/workers/chunks/{2f66fcb8670b108af549.js → ed0bcc66fb1e0ee75a4b.js} +1 -1
  129. package/assets/esri/core/workers/chunks/{6deac533bb455be4004b.js → ef8b75b92cf549e0507e.js} +1 -1
  130. package/assets/esri/core/workers/chunks/f7fc4c993536e62f7f3e.js +1 -0
  131. package/assets/esri/themes/base/icons/fonts/CalciteWebCoreIcons.svg +1 -0
  132. package/assets/esri/themes/base/icons/fonts/CalciteWebCoreIcons.ttf +0 -0
  133. package/assets/esri/themes/base/icons/fonts/CalciteWebCoreIcons.woff +0 -0
  134. package/assets/esri/themes/base/icons/selection.json +1 -1
  135. package/assets/esri/themes/base/icons/style.css +4 -0
  136. package/assets/esri/themes/base/icons/style.scss +6 -0
  137. package/assets/esri/themes/base/icons/variables.scss +1 -0
  138. package/assets/esri/themes/base/widgets/_Weather.scss +1 -1
  139. package/assets/esri/themes/dark/main.css +1 -1
  140. package/assets/esri/themes/dark-blue/main.css +1 -1
  141. package/assets/esri/themes/dark-green/main.css +1 -1
  142. package/assets/esri/themes/dark-purple/main.css +1 -1
  143. package/assets/esri/themes/dark-red/main.css +1 -1
  144. package/assets/esri/themes/light/main.css +1 -1
  145. package/assets/esri/themes/light/view.css +1 -1
  146. package/assets/esri/themes/light-blue/main.css +1 -1
  147. package/assets/esri/themes/light-green/main.css +1 -1
  148. package/assets/esri/themes/light-purple/main.css +1 -1
  149. package/assets/esri/themes/light-red/main.css +1 -1
  150. package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
  151. package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
  152. package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
  153. package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
  154. package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
  155. package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
  156. package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
  157. package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
  158. package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
  159. package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
  160. package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
  161. package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
  162. package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
  163. package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
  164. package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
  165. package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
  166. package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
  167. package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
  168. package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
  169. package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
  170. package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
  171. package/assets/esri/widgets/Editor/t9n/Editor_nb.json +1 -1
  172. package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
  173. package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
  174. package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
  175. package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
  176. package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
  177. package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
  178. package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
  179. package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
  180. package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
  181. package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
  182. package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
  183. package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
  184. package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
  185. package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
  186. package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
  187. package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
  188. package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
  189. package/assets/esri/widgets/ElevationProfile/t9n/ElevationProfile_ja.json +1 -1
  190. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ar.json +1 -1
  191. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_bg.json +1 -1
  192. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_bs.json +1 -1
  193. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ca.json +1 -1
  194. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_cs.json +1 -1
  195. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_da.json +1 -1
  196. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_de.json +1 -1
  197. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_el.json +1 -1
  198. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_es.json +1 -1
  199. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_et.json +1 -1
  200. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_fi.json +1 -1
  201. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_fr.json +1 -1
  202. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_he.json +1 -1
  203. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_hr.json +1 -1
  204. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_hu.json +1 -1
  205. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_id.json +1 -1
  206. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_it.json +1 -1
  207. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ja.json +1 -1
  208. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ko.json +1 -1
  209. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_lt.json +1 -1
  210. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_lv.json +1 -1
  211. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_nb.json +1 -1
  212. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_nl.json +1 -1
  213. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_pl.json +1 -1
  214. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_pt-BR.json +1 -1
  215. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_pt-PT.json +1 -1
  216. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ro.json +1 -1
  217. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ru.json +1 -1
  218. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_sk.json +1 -1
  219. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_sl.json +1 -1
  220. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_sr.json +1 -1
  221. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_sv.json +1 -1
  222. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_th.json +1 -1
  223. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_tr.json +1 -1
  224. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_uk.json +1 -1
  225. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_vi.json +1 -1
  226. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_zh-CN.json +1 -1
  227. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_zh-HK.json +1 -1
  228. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_zh-TW.json +1 -1
  229. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_cs.json +1 -1
  230. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_el.json +1 -1
  231. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_fr.json +1 -1
  232. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_lv.json +1 -1
  233. package/assets/esri/widgets/Weather/t9n/Weather_ar.json +1 -1
  234. package/assets/esri/widgets/Weather/t9n/Weather_bg.json +1 -1
  235. package/assets/esri/widgets/Weather/t9n/Weather_bs.json +1 -1
  236. package/assets/esri/widgets/Weather/t9n/Weather_ca.json +1 -1
  237. package/assets/esri/widgets/Weather/t9n/Weather_cs.json +1 -1
  238. package/assets/esri/widgets/Weather/t9n/Weather_da.json +1 -1
  239. package/assets/esri/widgets/Weather/t9n/Weather_de.json +1 -1
  240. package/assets/esri/widgets/Weather/t9n/Weather_el.json +1 -1
  241. package/assets/esri/widgets/Weather/t9n/Weather_es.json +1 -1
  242. package/assets/esri/widgets/Weather/t9n/Weather_et.json +1 -1
  243. package/assets/esri/widgets/Weather/t9n/Weather_fi.json +1 -1
  244. package/assets/esri/widgets/Weather/t9n/Weather_fr.json +1 -1
  245. package/assets/esri/widgets/Weather/t9n/Weather_he.json +1 -1
  246. package/assets/esri/widgets/Weather/t9n/Weather_hr.json +1 -1
  247. package/assets/esri/widgets/Weather/t9n/Weather_hu.json +1 -1
  248. package/assets/esri/widgets/Weather/t9n/Weather_id.json +1 -1
  249. package/assets/esri/widgets/Weather/t9n/Weather_it.json +1 -1
  250. package/assets/esri/widgets/Weather/t9n/Weather_ja.json +1 -1
  251. package/assets/esri/widgets/Weather/t9n/Weather_ko.json +1 -1
  252. package/assets/esri/widgets/Weather/t9n/Weather_lt.json +1 -1
  253. package/assets/esri/widgets/Weather/t9n/Weather_lv.json +1 -1
  254. package/assets/esri/widgets/Weather/t9n/Weather_nb.json +1 -1
  255. package/assets/esri/widgets/Weather/t9n/Weather_nl.json +1 -1
  256. package/assets/esri/widgets/Weather/t9n/Weather_pl.json +1 -1
  257. package/assets/esri/widgets/Weather/t9n/Weather_pt-BR.json +1 -1
  258. package/assets/esri/widgets/Weather/t9n/Weather_pt-PT.json +1 -1
  259. package/assets/esri/widgets/Weather/t9n/Weather_ro.json +1 -1
  260. package/assets/esri/widgets/Weather/t9n/Weather_ru.json +1 -1
  261. package/assets/esri/widgets/Weather/t9n/Weather_sk.json +1 -1
  262. package/assets/esri/widgets/Weather/t9n/Weather_sl.json +1 -1
  263. package/assets/esri/widgets/Weather/t9n/Weather_sr.json +1 -1
  264. package/assets/esri/widgets/Weather/t9n/Weather_sv.json +1 -1
  265. package/assets/esri/widgets/Weather/t9n/Weather_th.json +1 -1
  266. package/assets/esri/widgets/Weather/t9n/Weather_tr.json +1 -1
  267. package/assets/esri/widgets/Weather/t9n/Weather_uk.json +1 -1
  268. package/assets/esri/widgets/Weather/t9n/Weather_vi.json +1 -1
  269. package/assets/esri/widgets/Weather/t9n/Weather_zh-CN.json +1 -1
  270. package/assets/esri/widgets/Weather/t9n/Weather_zh-HK.json +1 -1
  271. package/assets/esri/widgets/Weather/t9n/Weather_zh-TW.json +1 -1
  272. package/chunks/Clouds.glsl.js +14 -14
  273. package/chunks/HUDMaterial.glsl.js +22 -21
  274. package/chunks/RibbonLine.glsl.js +10 -14
  275. package/chunks/persistableUrlUtils.js +1 -1
  276. package/chunks/vec32.js +1 -1
  277. package/chunks/vec42.js +1 -1
  278. package/core/typedArrayUtil.js +1 -1
  279. package/core/urlUtils.js +1 -1
  280. package/form/elements/FieldElement.js +1 -1
  281. package/geometry/support/buffer/math/common.js +1 -1
  282. package/interfaces.d.ts +99 -56
  283. package/layers/FeatureLayer.js +1 -1
  284. package/layers/SubtypeGroupLayer.js +1 -1
  285. package/layers/VectorTileLayer.js +1 -1
  286. package/layers/WMSLayer.js +1 -1
  287. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  288. package/layers/graphics/data/QueryEngineCapabilities.js +1 -1
  289. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  290. package/layers/mixins/ArcGISImageService.js +1 -1
  291. package/layers/ogc/crsUtils.js +5 -0
  292. package/layers/support/RasterFunction.js +1 -1
  293. package/layers/support/capabilities.js +1 -1
  294. package/layers/support/rasterDatasets/WCSRaster.js +1 -1
  295. package/layers/support/rasterDatasets/wcsCoverageParser.js +1 -1
  296. package/layers/support/vectorTileLayerLoader.js +1 -1
  297. package/layers/support/wmsUtils.js +1 -1
  298. package/layers/support/wmtsUtils.js +1 -1
  299. package/package.json +5 -5
  300. package/renderers/support/RasterSymbolizer.js +1 -1
  301. package/request.js +1 -1
  302. package/rest/print.js +1 -1
  303. package/rest/support/ImageIdentifyParameters.js +1 -1
  304. package/rest/support/StatisticDefinition.js +1 -1
  305. package/smartMapping/renderers/univariateColorSize.js +1 -1
  306. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  307. package/support/featureFlags.js +1 -1
  308. package/support/revision.js +1 -1
  309. package/symbols/ExtrudeSymbol3DLayer.js +1 -1
  310. package/symbols/Font.js +1 -1
  311. package/symbols/IconSymbol3DLayer.js +1 -1
  312. package/symbols/ObjectSymbol3DLayer.js +1 -1
  313. package/symbols/PathSymbol3DLayer.js +1 -1
  314. package/symbols/TextSymbol.js +1 -1
  315. package/symbols/TextSymbol3DLayer.js +1 -1
  316. package/symbols/support/Symbol3DHalo.js +1 -1
  317. package/symbols/support/Symbol3DMaterial.js +1 -1
  318. package/symbols/support/constants.js +5 -0
  319. package/symbols/support/utils.js +1 -1
  320. package/views/2d/engine/Stage.js +1 -1
  321. package/views/2d/engine/vectorTiles/TileHandler.js +1 -1
  322. package/views/2d/engine/vectorTiles/shaders/VTLMaterialManager.js +1 -1
  323. package/views/2d/engine/vectorTiles/style/VectorTileSource.js +1 -1
  324. package/views/2d/engine/vectorTiles/style/VectorTilesRequestManager.js +5 -0
  325. package/views/2d/engine/webgl/BitBlitRenderer.js +1 -1
  326. package/views/2d/engine/webgl/MaterialManager.js +1 -1
  327. package/views/2d/engine/webgl/alignmentUtils.js +1 -1
  328. package/views/2d/engine/webgl/effects/BlendEffect.js +1 -1
  329. package/views/2d/engine/webgl/materialKey/MaterialKey.js +1 -1
  330. package/views/2d/engine/webgl/mesh/templates/WGLLabelTemplate.js +1 -1
  331. package/views/2d/engine/webgl/shaders/BlendPrograms.js +1 -1
  332. package/views/2d/engine/webgl/shaders/MaterialPrograms.js +1 -1
  333. package/views/2d/layers/BaseLayerView2D.js +1 -1
  334. package/views/2d/layers/BaseLayerViewGL2D.js +1 -1
  335. package/views/2d/layers/GraphicsLayerView2D.js +1 -1
  336. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  337. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  338. package/views/2d/layers/LayerView2D.js +1 -1
  339. package/views/2d/layers/MapNotesLayerView2D.js +1 -1
  340. package/views/2d/layers/RouteLayerView2D.js +1 -1
  341. package/views/2d/layers/TileLayerView2D.js +1 -1
  342. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  343. package/views/2d/layers/WMSLayerView2D.js +1 -1
  344. package/views/2d/layers/WMTSLayerView2D.js +1 -1
  345. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  346. package/views/2d/layers/graphics/GraphicBoundsRenderer.js +1 -1
  347. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  348. package/views/2d/support/engineHelpers.js +1 -1
  349. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  350. package/views/3d/environment/CloudyWeather.js +1 -1
  351. package/views/3d/environment/Fog.js +1 -1
  352. package/views/3d/environment/FoggyWeather.js +1 -1
  353. package/views/3d/environment/NoiseTextureAtlas.js +1 -1
  354. package/views/3d/environment/RainyWeather.js +1 -1
  355. package/views/3d/environment/Stars.js +1 -1
  356. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  357. package/views/3d/layers/DynamicLayerView3D.js +1 -1
  358. package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
  359. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  360. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  361. package/views/3d/layers/GraphicsView3D.js +1 -1
  362. package/views/3d/layers/I3SMeshView3D.js +1 -1
  363. package/views/3d/layers/ImageryLayerView3D.js +1 -1
  364. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  365. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  366. package/views/3d/layers/MapImageLayerView3D.js +1 -1
  367. package/views/3d/layers/OGCFeatureLayerView3D.js +1 -1
  368. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  369. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  370. package/views/3d/layers/SceneLayerView3D.js +1 -1
  371. package/views/3d/layers/VectorTileLayerView3D.js +1 -1
  372. package/views/3d/layers/WMSLayerView3D.js +1 -1
  373. package/views/3d/layers/WMTSLayerView3D.js +1 -1
  374. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  375. package/views/3d/layers/graphics/Graphics3DFeatureLikeLayerView.js +1 -1
  376. package/views/3d/layers/graphics/Graphics3DGraphicLikeLayerView.js +1 -1
  377. package/views/3d/layers/graphics/Graphics3DPointSymbol.js +1 -1
  378. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  379. package/views/3d/layers/graphics/Labeler.js +1 -1
  380. package/views/3d/layers/graphics/QueryEngine.js +1 -1
  381. package/views/3d/layers/support/FeatureTileTree3DDebugger.js +1 -1
  382. package/views/3d/state/controllers/RotateController.js +1 -1
  383. package/views/3d/state/controllers/global/PinchAndPanController.js +1 -1
  384. package/views/3d/state/controllers/global/ZoomController.js +1 -1
  385. package/views/3d/state/controllers/global/ZoomStepController.js +1 -1
  386. package/views/3d/state/controllers/local/PinchAndPanController.js +1 -1
  387. package/views/3d/state/controllers/local/ZoomStepController.js +1 -1
  388. package/views/3d/support/debugFlags.js +1 -1
  389. package/views/3d/support/sunUtils.js +1 -1
  390. package/views/3d/terrain/Overlay.js +1 -1
  391. package/views/3d/terrain/OverlayManager.js +1 -1
  392. package/views/3d/terrain/TerrainSurface.js +1 -1
  393. package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +19 -14
  394. package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
  395. package/views/3d/webgl-engine/lib/InstanceParameters.js +5 -0
  396. package/views/3d/webgl-engine/lib/{localOrigin.js → LocalOriginFactory.js} +0 -0
  397. package/views/3d/webgl-engine/lib/Program.js +1 -1
  398. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  399. package/views/3d/webgl-engine/lib/RenderTargetHelper.js +1 -1
  400. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  401. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  402. package/views/3d/webgl-engine/lib/SSAOHelper.js +1 -1
  403. package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
  404. package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
  405. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  406. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  407. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  408. package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
  409. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  410. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  411. package/views/LayerViewManager.js +1 -1
  412. package/views/MapView.js +1 -1
  413. package/views/SceneView.js +1 -1
  414. package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
  415. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  416. package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
  417. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
  418. package/views/layers/ImageryTileLayerView.js +1 -1
  419. package/views/layers/LayerView.js +1 -1
  420. package/views/layers/OGCFeatureLayerView.js +1 -1
  421. package/views/layers/RefreshableLayerView.js +1 -1
  422. package/views/overlay/ViewOverlay.js +1 -1
  423. package/views/support/WatchUpdatingTracking.js +1 -1
  424. package/views/support/imageReprojection.js +1 -1
  425. package/views/webgl/BufferObject.js +1 -1
  426. package/views/webgl/ContextState.js +1 -1
  427. package/views/webgl/FramebufferObject.js +1 -1
  428. package/views/webgl/Program.js +1 -1
  429. package/views/webgl/ProgramCache.js +1 -1
  430. package/views/webgl/ProgramTemplate.js +1 -1
  431. package/views/webgl/RenderingContext.js +1 -1
  432. package/views/webgl/ShaderTranspiler.js +1 -1
  433. package/views/webgl/UniformBufferLayout.js +5 -0
  434. package/views/webgl/UniformBufferObject.js +5 -0
  435. package/views/webgl/enums.js +1 -1
  436. package/views/webgl/rasterUtils.js +1 -1
  437. package/views/webgl/storageLayouts.js +5 -0
  438. package/views/webgl/testDoublePrecisionArithmetic.js +1 -1
  439. package/views/webgl/testFloatBufferBlend.js +1 -1
  440. package/views/webgl/testSVGPremultipliedAlpha.js +1 -1
  441. package/views/webgl/testSamplerPrecision.js +1 -1
  442. package/views/webgl/tests/SimpleDraw.js +1 -1
  443. package/widgets/BasemapLayerList.js +1 -1
  444. package/widgets/BuildingExplorer/BuildingDisciplinesViewModel.js +1 -1
  445. package/widgets/Editor/BatchCreateWorkflow.js +1 -1
  446. package/widgets/Editor/CreateWorkflow.js +1 -1
  447. package/widgets/Editor/UpdateWorkflow.js +1 -1
  448. package/widgets/ElevationProfile/components/SettingsButton.js +1 -1
  449. package/widgets/ElevationProfile.js +1 -1
  450. package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
  451. package/widgets/Feature/FeatureMedia.js +1 -1
  452. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  453. package/widgets/FeatureForm/InputField.js +1 -1
  454. package/widgets/FeatureForm/InputFieldGroup.js +1 -1
  455. package/widgets/FeatureForm.js +1 -1
  456. package/widgets/FeatureTemplates.js +1 -1
  457. package/widgets/FloorFilter.js +1 -1
  458. package/widgets/LayerList/ListItemPanel.js +1 -1
  459. package/widgets/LayerList/support/layerListUtils.js +1 -1
  460. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  461. package/widgets/Popup.js +1 -1
  462. package/widgets/Print.js +1 -1
  463. package/widgets/Search.js +1 -1
  464. package/widgets/Sketch/SketchViewModel.js +1 -1
  465. package/widgets/Weather/CoverageSlider.js +5 -0
  466. package/widgets/Weather/WeatherViewModel.js +1 -1
  467. package/widgets/Weather/css.js +1 -1
  468. package/widgets/Weather.js +1 -1
  469. package/assets/esri/core/workers/chunks/0881ce46b10362861f87.js +0 -1
  470. package/assets/esri/core/workers/chunks/0c0a02770eeeb3e28ea1.js +0 -1
  471. package/assets/esri/core/workers/chunks/0d2effbd84a9482eb639.js +0 -1
  472. package/assets/esri/core/workers/chunks/0f04246c1b591a3ac74d.js +0 -1
  473. package/assets/esri/core/workers/chunks/1ac6be0dc25e16c75d06.js +0 -1
  474. package/assets/esri/core/workers/chunks/1f8110ea12d65ca94b55.js +0 -1
  475. package/assets/esri/core/workers/chunks/2025d0fd61a64876c81b.js +0 -1
  476. package/assets/esri/core/workers/chunks/241859d74c0daac62e11.js +0 -1
  477. package/assets/esri/core/workers/chunks/331be347c1b1ca0be2d2.js +0 -1
  478. package/assets/esri/core/workers/chunks/39af317388ecebb4387d.js +0 -1
  479. package/assets/esri/core/workers/chunks/39be2893a7dbdecfd65a.js +0 -1
  480. package/assets/esri/core/workers/chunks/3a20f66b0b7d08064e34.js +0 -1
  481. package/assets/esri/core/workers/chunks/445099d037affd139ed0.js +0 -1
  482. package/assets/esri/core/workers/chunks/45848fecec88ed2da33d.js +0 -1
  483. package/assets/esri/core/workers/chunks/48d3a3abc53abe6a4017.js +0 -1
  484. package/assets/esri/core/workers/chunks/5005b8c1fdd5cb9a4c19.js +0 -1
  485. package/assets/esri/core/workers/chunks/52e4c367c72ea7cc3457.js +0 -1
  486. package/assets/esri/core/workers/chunks/5d8170f6207dbeb4de1b.js +0 -1
  487. package/assets/esri/core/workers/chunks/642c38ac00a962f35d44.js +0 -1
  488. package/assets/esri/core/workers/chunks/64459604505647e9c714.js +0 -1
  489. package/assets/esri/core/workers/chunks/653d1550dd1a4867a9fc.js +0 -1
  490. package/assets/esri/core/workers/chunks/65f73fbbc3c7c60c6d3d.js +0 -1
  491. package/assets/esri/core/workers/chunks/6db7081d344bea26ef64.js +0 -1
  492. package/assets/esri/core/workers/chunks/6e13dab8ec43f7494297.js +0 -1
  493. package/assets/esri/core/workers/chunks/7bd4c3ee43fb038b88d8.js +0 -1
  494. package/assets/esri/core/workers/chunks/803de5097a8a2c4b58a8.js +0 -1
  495. package/assets/esri/core/workers/chunks/8298231a0fd0129b0d5c.js +0 -1
  496. package/assets/esri/core/workers/chunks/8500c6c011400af1b7bd.js +0 -1
  497. package/assets/esri/core/workers/chunks/8b322a2a47dfdbb59b45.js +0 -1
  498. package/assets/esri/core/workers/chunks/8f83bebef9174c3f15da.js +0 -1
  499. package/assets/esri/core/workers/chunks/904332faa22bc0e876cb.js +0 -1
  500. package/assets/esri/core/workers/chunks/950565d1e682fc4072e1.js +0 -1
  501. package/assets/esri/core/workers/chunks/a247ddd84245c81112c8.js +0 -1
  502. package/assets/esri/core/workers/chunks/a9ffa806df20130ecfb6.js +0 -1
  503. package/assets/esri/core/workers/chunks/af13e534e4160636bd3d.js +0 -1
  504. package/assets/esri/core/workers/chunks/b2f62234ebb8b6158baa.js +0 -1
  505. package/assets/esri/core/workers/chunks/b5bb7cfa26b1f0cec67a.js +0 -1
  506. package/assets/esri/core/workers/chunks/b8666d1a4e4fff7a4703.js +0 -1
  507. package/assets/esri/core/workers/chunks/bea1da9e3f878e0e2c83.js +0 -1
  508. package/assets/esri/core/workers/chunks/c1b6c31fa3ec1542f996.js +0 -1
  509. package/assets/esri/core/workers/chunks/c32a4fbdc87225f84019.js +0 -1
  510. package/assets/esri/core/workers/chunks/c67fea81f69a60c0eaef.js +0 -1
  511. package/assets/esri/core/workers/chunks/d336afd5890dcdbf5341.js +0 -1
  512. package/assets/esri/core/workers/chunks/da69e3e5949fe1716e34.js +0 -1
  513. package/assets/esri/core/workers/chunks/daa9c450b2e2a5371249.js +0 -1
  514. package/assets/esri/core/workers/chunks/dd63ba77b7e4c3c9c594.js +0 -1
  515. package/assets/esri/core/workers/chunks/dfa57982d28c9aeb97b9.js +0 -1
  516. package/assets/esri/core/workers/chunks/e01812116b27874948f0.js +0 -1
  517. package/assets/esri/core/workers/chunks/e5c9d8482b913cf3580a.js +0 -1
  518. package/assets/esri/core/workers/chunks/eeadd92f0bede9fc8745.js +0 -1
  519. package/assets/esri/core/workers/chunks/fbb67cb6224aed2cce16.js +0 -1
  520. package/assets/esri/core/workers/chunks/feeaf61424336e9eac88.js +0 -1
  521. package/assets/esri/core/workers/chunks/ff02295329a8986d0568.js +0 -1
  522. package/views/2d/engine/webgl/mesh/templates/meshUtils.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import{e as r}from"../../../chunks/earcut.js";import{create as o}from"../../../geometry/support/aaBoundingRect.js";import{closeRings as i}from"../../../geometry/support/coordsUtils.js";import{normalizeCentralMeridianSync as n}from"../../../geometry/support/normalizeUtilsSync.js";import{checkProjectionSupport as a,project as c}from"../../../layers/graphics/data/projectionSupport.js";import"../tiling/PagedTileQueue.js";import l from"../tiling/TileInfoView.js";import"../tiling/TileKey.js";import"../tiling/TileQueue.js";import"../tiling/TileStrategy.js";import{THIN_LINE_HALF_WIDTH_THRESHOLD as p}from"../engine/webgl/definitions.js";import{LineTessellation as h}from"../engine/webgl/TurboLine.js";import{LayerView2DMixin as f}from"./LayerView2D.js";import{DisplayGL as d}from"./support/DisplayGL.js";import{analyzeRings as u}from"./support/util.js";import m from"../../layers/LayerView.js";import{RefreshableLayerView as y}from"../../layers/RefreshableLayerView.js";const x=new Set,g=[],v=[];class T{constructor(e,t,s,r,i,n,a,c=[0,0],l=o()){this.id=e,this.level=t,this.row=s,this.col=r,this.world=i,this.resolution=n,this.scale=a,this.coords=c,this.bounds=l}}let w=class extends(y(f(m))){constructor(e){super(e),this._tileMap=new Map,this.container=new d(this),this.layer=null,this.tiles=[],this._renderTarget={framebuffer:null,viewport:[0,0,0,0]}}get _tileInfoView(){const e=this.layer&&this.layer.tileInfo;return e?new l(e):null}get context(){return this.view._stage.context.gl}attach(){}detach(){}requestRender(){this.container.requestRender()}tilesChanged(e,t){}async doRefresh(){}isUpdating(){return!1}update(e){const t=this._tileInfoView,s=this.tiles;if(t){const r=t.getTileCoverage(e.state,0),{spans:o,lodInfo:i}=r,{level:n}=i;if(o.length)for(const{row:e,colFrom:t,colTo:a}of o)for(let r=t;r<=a;r++){const t=i.normalizeCol(r),o=i.getWorldForColumn(r),a=`${n}/${e}/${t}/${o}`;if(!this._tileMap.has(a)){const r=new T(a,n,e,t,o,i.resolution,i.scale);i.getTileCoords(r.coords,r,!1),i.getTileBounds(r.bounds,r,!0),this._tileMap.set(a,r),s.push(r),g.push(r)}x.add(a)}}for(let r=s.length-1;r>=0;r--){const e=s[r];x.has(e.id)||(s.splice(r,1),v.push(e),this._tileMap.delete(e.id))}(g.length||v.length)&&(this.tilesChanged(g,v),g.length=v.length=0),x.clear(),this.requestRender()}moveStart(){}viewChange(){this.requestUpdate()}moveEnd(){}bindRenderTarget(){this.context.bindFramebuffer(this.context.FRAMEBUFFER,this._renderTarget.framebuffer),this.context.viewport(this._renderTarget.viewport[0],this._renderTarget.viewport[1],this._renderTarget.viewport[2],this._renderTarget.viewport[3])}getRenderTarget(){return this._renderTarget}async tessellateExtent(e){const t={vertices:[],indices:[]},s=await this._projectAndNormalizeGeometry(e),r=t.vertices.length;return t.vertices.push({x:s.xmin,y:s.ymin,xOffset:0,yOffset:0,uTexcoord:0,vTexcoord:0,distance:0}),t.vertices.push({x:s.xmax,y:s.ymin,xOffset:0,yOffset:0,uTexcoord:1,vTexcoord:0,distance:0}),t.vertices.push({x:s.xmin,y:s.ymax,xOffset:0,yOffset:0,uTexcoord:0,vTexcoord:1,distance:0}),t.vertices.push({x:s.xmax,y:s.ymax,xOffset:0,yOffset:0,uTexcoord:1,vTexcoord:1,distance:0}),t.indices.push(r+0,r+1,r+2,r+1,r+3,r+2),t}async tessellatePoint(e,t){const s=await this._projectAndNormalizeGeometry(e);return this._tessellatePoints([s],t)}async tessellateMultipoint(e,t){const s=await this._projectAndNormalizeGeometry(e),r=s.points.map((e=>({x:e[0],y:e[1],spatialReference:s.spatialReference})));return this._tessellatePoints(r,t)}async _tessellatePoints(e,t){const s={vertices:[],indices:[]};for(const r of e){const e=s.vertices.length;s.vertices.push({x:r.x,y:r.y,xOffset:t.x,yOffset:t.y+t.height,uTexcoord:0,vTexcoord:0,distance:0}),s.vertices.push({x:r.x,y:r.y,xOffset:t.x+t.width,yOffset:t.y+t.height,uTexcoord:1,vTexcoord:0,distance:0}),s.vertices.push({x:r.x,y:r.y,xOffset:t.x,yOffset:t.y,uTexcoord:0,vTexcoord:1,distance:0}),s.vertices.push({x:r.x,y:r.y,xOffset:t.x+t.width,yOffset:t.y,uTexcoord:1,vTexcoord:1,distance:0}),s.indices.push(e+0,e+1,e+2,e+1,e+3,e+2)}return s}async tessellatePolyline(e,t){const s={vertices:[],indices:[]},r=(await this._projectAndNormalizeGeometry(e)).paths;if(!r||!r.length)return s;let o;const i=new h(((e,r,i,n,a,c,l,p,h,f,d)=>{const u=s.vertices.length;return s.vertices.push({x:e,y:-r,xOffset:l*t/2,yOffset:p*t/2,uTexcoord:d/o,vTexcoord:(f+1)/2,distance:d}),u}),((e,t,r)=>{s.indices.push(e,t,r)}),!0);for(const n of r){o=0;for(let t=1;t<n.length;++t){const e=n[t][0]-n[t-1][0],s=n[t][1]-n[t-1][1];o+=Math.sqrt(e*e+s*s)}const e=n.map((e=>({x:e[0],y:-e[1]})));i.tessellate(e,j)}return s}async tessellatePolygon(e){const t={vertices:[],indices:[]},s=await this._projectAndNormalizeGeometry(e),r=s.rings;if(!r||!r.length)return t;i(s);for(const i of s.rings)for(const e of i)e[1]=-e[1];let o=1/0,n=1/0,a=-1/0,c=-1/0;return u(s.rings,(()=>{}),((e,t,s)=>{for(let r=e;r<t;r+=2)o=Math.min(o,s[r]),n=Math.min(n,s[r+1]),a=Math.max(a,s[r]),c=Math.max(c,s[r+1])})),u(s.rings,(()=>{}),((e,s,r,i)=>{this._invokeEarcut(t,e,s,r,i,[o,n,a,c])})),t}_invokeEarcut(e,t,s,o,i,n){const a=o.slice(t,s),c=r(a,i,2),l=e.vertices.length;for(let r=0;r<a.length;r+=2){const t=a[r],s=a[r+1];e.vertices.push({x:t,y:-s,xOffset:0,yOffset:0,uTexcoord:(t-n[0])/(n[2]-n[0]),vTexcoord:1-(s-n[1])/(n[3]-n[1]),distance:0})}for(let r=0;r<c.length;++r)e.indices.push(l+c[r])}async _projectAndNormalizeGeometry(e){await a(e.spatialReference,this.view.spatialReference);const t=n(e);return c(t,e.spatialReference,this.view.spatialReference)}};e([t()],w.prototype,"_tileInfoView",null),e([t()],w.prototype,"layer",void 0),e([t()],w.prototype,"context",null),w=e([s("esri.views.2d.layers.BaseLayerViewGL2D")],w);const j={pixelCoordRatio:1,wrapDistance:1e11,halfWidth:p+1,initialDistance:0,textured:!0,offset:0},_=w;export{_ as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import{e as r}from"../../../chunks/earcut.js";import{create as o}from"../../../geometry/support/aaBoundingRect.js";import{closeRings as i}from"../../../geometry/support/coordsUtils.js";import{normalizeCentralMeridianSync as n}from"../../../geometry/support/normalizeUtilsSync.js";import{checkProjectionSupport as a,project as c}from"../../../layers/graphics/data/projectionSupport.js";import"../tiling/PagedTileQueue.js";import l from"../tiling/TileInfoView.js";import"../tiling/TileKey.js";import"../tiling/TileQueue.js";import"../tiling/TileStrategy.js";import{THIN_LINE_HALF_WIDTH_THRESHOLD as p}from"../engine/webgl/definitions.js";import{LineTessellation as f}from"../engine/webgl/TurboLine.js";import{LayerView2DMixin as h}from"./LayerView2D.js";import{DisplayGL as d}from"./support/DisplayGL.js";import{analyzeRings as u}from"./support/util.js";import m from"../../layers/LayerView.js";import{RefreshableLayerView as y}from"../../layers/RefreshableLayerView.js";const x=new Set,g=[],v=[];class T{constructor(e,t,s,r,i,n,a,c=[0,0],l=o()){this.id=e,this.level=t,this.row=s,this.col=r,this.world=i,this.resolution=n,this.scale=a,this.coords=c,this.bounds=l}}let w=class extends(y(h(m))){constructor(e){super(e),this._tileMap=new Map,this.container=new d(this),this.layer=null,this.tiles=[],this._renderTarget={framebuffer:null,viewport:[0,0,0,0]}}get _tileInfoView(){const e=this.layer&&this.layer.tileInfo;return e?new l(e):null}get context(){return this.view._stage.context.gl}attach(){}detach(){}requestRender(){this.container.requestRender()}tilesChanged(e,t){}supportsSpatialReference(e){var t;const s=null==(t=this.layer)?void 0:t.tileInfo;if(s){const t=s.spatialReference;return e.equals(t)}return!0}async doRefresh(){}isUpdating(){return!1}update(e){const t=this._tileInfoView,s=this.tiles;if(t){const r=t.getTileCoverage(e.state,0),{spans:o,lodInfo:i}=r,{level:n}=i;if(o.length)for(const{row:e,colFrom:t,colTo:a}of o)for(let r=t;r<=a;r++){const t=i.normalizeCol(r),o=i.getWorldForColumn(r),a=`${n}/${e}/${t}/${o}`;if(!this._tileMap.has(a)){const r=new T(a,n,e,t,o,i.resolution,i.scale);i.getTileCoords(r.coords,r,!1),i.getTileBounds(r.bounds,r,!0),this._tileMap.set(a,r),s.push(r),g.push(r)}x.add(a)}}for(let r=s.length-1;r>=0;r--){const e=s[r];x.has(e.id)||(s.splice(r,1),v.push(e),this._tileMap.delete(e.id))}(g.length||v.length)&&(this.tilesChanged(g,v),g.length=v.length=0),x.clear(),this.requestRender()}moveStart(){}viewChange(){this.requestUpdate()}moveEnd(){}bindRenderTarget(){this.context.bindFramebuffer(this.context.FRAMEBUFFER,this._renderTarget.framebuffer),this.context.viewport(this._renderTarget.viewport[0],this._renderTarget.viewport[1],this._renderTarget.viewport[2],this._renderTarget.viewport[3])}getRenderTarget(){return this._renderTarget}async tessellateExtent(e){const t={vertices:[],indices:[]},s=await this._projectAndNormalizeGeometry(e),r=t.vertices.length;return t.vertices.push({x:s.xmin,y:s.ymin,xOffset:0,yOffset:0,uTexcoord:0,vTexcoord:0,distance:0}),t.vertices.push({x:s.xmax,y:s.ymin,xOffset:0,yOffset:0,uTexcoord:1,vTexcoord:0,distance:0}),t.vertices.push({x:s.xmin,y:s.ymax,xOffset:0,yOffset:0,uTexcoord:0,vTexcoord:1,distance:0}),t.vertices.push({x:s.xmax,y:s.ymax,xOffset:0,yOffset:0,uTexcoord:1,vTexcoord:1,distance:0}),t.indices.push(r+0,r+1,r+2,r+1,r+3,r+2),t}async tessellatePoint(e,t){const s=await this._projectAndNormalizeGeometry(e);return this._tessellatePoints([s],t)}async tessellateMultipoint(e,t){const s=await this._projectAndNormalizeGeometry(e),r=s.points.map((e=>({x:e[0],y:e[1],spatialReference:s.spatialReference})));return this._tessellatePoints(r,t)}async _tessellatePoints(e,t){const s={vertices:[],indices:[]};for(const r of e){const e=s.vertices.length;s.vertices.push({x:r.x,y:r.y,xOffset:t.x,yOffset:t.y+t.height,uTexcoord:0,vTexcoord:0,distance:0}),s.vertices.push({x:r.x,y:r.y,xOffset:t.x+t.width,yOffset:t.y+t.height,uTexcoord:1,vTexcoord:0,distance:0}),s.vertices.push({x:r.x,y:r.y,xOffset:t.x,yOffset:t.y,uTexcoord:0,vTexcoord:1,distance:0}),s.vertices.push({x:r.x,y:r.y,xOffset:t.x+t.width,yOffset:t.y,uTexcoord:1,vTexcoord:1,distance:0}),s.indices.push(e+0,e+1,e+2,e+1,e+3,e+2)}return s}async tessellatePolyline(e,t){const s={vertices:[],indices:[]},r=(await this._projectAndNormalizeGeometry(e)).paths;if(!r||!r.length)return s;let o;const i=new f(((e,r,i,n,a,c,l,p,f,h,d)=>{const u=s.vertices.length;return s.vertices.push({x:e,y:-r,xOffset:l*t/2,yOffset:p*t/2,uTexcoord:d/o,vTexcoord:(h+1)/2,distance:d}),u}),((e,t,r)=>{s.indices.push(e,t,r)}),!0);for(const n of r){o=0;for(let t=1;t<n.length;++t){const e=n[t][0]-n[t-1][0],s=n[t][1]-n[t-1][1];o+=Math.sqrt(e*e+s*s)}const e=n.map((e=>({x:e[0],y:-e[1]})));i.tessellate(e,j)}return s}async tessellatePolygon(e){const t={vertices:[],indices:[]},s=await this._projectAndNormalizeGeometry(e),r=s.rings;if(!r||!r.length)return t;i(s);for(const i of s.rings)for(const e of i)e[1]=-e[1];let o=1/0,n=1/0,a=-1/0,c=-1/0;return u(s.rings,(()=>{}),((e,t,s)=>{for(let r=e;r<t;r+=2)o=Math.min(o,s[r]),n=Math.min(n,s[r+1]),a=Math.max(a,s[r]),c=Math.max(c,s[r+1])})),u(s.rings,(()=>{}),((e,s,r,i)=>{this._invokeEarcut(t,e,s,r,i,[o,n,a,c])})),t}_invokeEarcut(e,t,s,o,i,n){const a=o.slice(t,s),c=r(a,i,2),l=e.vertices.length;for(let r=0;r<a.length;r+=2){const t=a[r],s=a[r+1];e.vertices.push({x:t,y:-s,xOffset:0,yOffset:0,uTexcoord:(t-n[0])/(n[2]-n[0]),vTexcoord:1-(s-n[1])/(n[3]-n[1]),distance:0})}for(let r=0;r<c.length;++r)e.indices.push(l+c[r])}async _projectAndNormalizeGeometry(e){await a(e.spatialReference,this.view.spatialReference);const t=n(e);return c(t,e.spatialReference,this.view.spatialReference)}};e([t()],w.prototype,"_tileInfoView",null),e([t()],w.prototype,"layer",void 0),e([t()],w.prototype,"context",null),w=e([s("esri.views.2d.layers.BaseLayerViewGL2D")],w);const j={pixelCoordRatio:1,wrapDistance:1e11,halfWidth:p+1,initialDistance:0,textured:!0,offset:0},_=w;export{_ as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import i from"../../../Graphic.js";import r from"../../../core/Collection.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as t}from"../../../core/accessorSupport/decorators/subclass.js";import{LayerView2DMixin as a}from"./LayerView2D.js";import h from"./graphics/GraphicContainer.js";import p from"./graphics/GraphicsView2D.js";import o from"../../layers/LayerView.js";const c={remove(){},pause(){},resume(){}};let n=class extends(a(o)){initialize(){this.graphicsView=new p({requestUpdateCallback:()=>this.requestUpdate(),view:this.view,graphics:this.layer.graphics,container:new h(this.view.featuresTilingScheme)})}attach(){this.container.addChild(this.graphicsView.container),this.handles.add(this.layer.on("graphic-update",this.graphicsView.graphicUpdateHandler),"graphicslayerview2d")}detach(){this.container.removeAllChildren(),this.graphicsView.destroy(),this.handles.remove("graphicslayerview2d")}async hitTest(e){return this.graphicsView?this.graphicsView.hitTest(e):null}async fetchPopupFeatures(e){if(this.graphicsView)return this.graphicsView.hitTest(e).filter((e=>!!e.popupTemplate))}update(e){this.graphicsView.processUpdate(e)}moveStart(){}viewChange(){this.graphicsView.viewChange()}moveEnd(){}isUpdating(){return!this.graphicsView||this.graphicsView.updating}highlight(e){var s;let t;return"number"==typeof e?t=[e]:e instanceof i?t=[e.uid]:Array.isArray(e)&&e.length>0?t="number"==typeof e[0]?e:e.map((e=>e&&e.uid)):r.isCollection(e)&&e.length>0&&(t=e.map((e=>e&&e.uid)).toArray()),t=null==(s=t)?void 0:s.filter((e=>null!=e)),t.length?(this.graphicsView.addHighlight(t),{remove:()=>this.graphicsView.removeHighlight(t)}):c}queryGraphics(){return Promise.resolve(this.graphicsView.graphics)}};e([s()],n.prototype,"graphicsView",void 0),n=e([t("esri.views.2d.layers.GraphicsLayerView2D")],n);const l=n;export{l as default};
5
+ import{_ as i}from"../../../chunks/tslib.es6.js";import t from"../../../Graphic.js";import e from"../../../core/Collection.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as h}from"../../../core/accessorSupport/decorators/subclass.js";import{LayerView2DMixin as r}from"./LayerView2D.js";import a from"./graphics/GraphicContainer.js";import o from"./graphics/GraphicsView2D.js";import p from"../../layers/LayerView.js";const g={remove(){},pause(){},resume(){}};let c=class extends(r(p)){constructor(){super(...arguments),this._highlightIds=new Map}attach(){this.graphicsView=new o({requestUpdateCallback:()=>this.requestUpdate(),view:this.view,graphics:this.layer.graphics,container:new a(this.view.featuresTilingScheme)}),this._updateHighlight(),this.container.addChild(this.graphicsView.container),this.handles.add(this.layer.on("graphic-update",this.graphicsView.graphicUpdateHandler),"graphicslayerview2d")}detach(){this.container.removeAllChildren(),this.graphicsView.destroy(),this.graphicsView=null,this.handles.remove("graphicslayerview2d")}async hitTest(i){return this.graphicsView?this.graphicsView.hitTest(i):null}async fetchPopupFeatures(i){if(this.graphicsView)return this.graphicsView.hitTest(i).filter((i=>!!i.popupTemplate))}update(i){this.graphicsView.processUpdate(i)}moveStart(){}viewChange(){this.graphicsView.viewChange()}moveEnd(){}isUpdating(){return!this.graphicsView||this.graphicsView.updating}highlight(i){var s;let h;return"number"==typeof i?h=[i]:i instanceof t?h=[i.uid]:Array.isArray(i)&&i.length>0?h="number"==typeof i[0]?i:i.map((i=>i&&i.uid)):e.isCollection(i)&&i.length>0&&(h=i.map((i=>i&&i.uid)).toArray()),h=null==(s=h)?void 0:s.filter((i=>null!=i)),h.length?(this._addHighlight(h),{remove:()=>this._removeHighlight(h)}):g}_addHighlight(i){for(const t of i)if(this._highlightIds.has(t)){const i=this._highlightIds.get(t);this._highlightIds.set(t,i+1)}else this._highlightIds.set(t,1);this._updateHighlight()}_removeHighlight(i){for(const t of i)if(this._highlightIds.has(t)){const i=this._highlightIds.get(t)-1;0===i?this._highlightIds.delete(t):this._highlightIds.set(t,i)}this._updateHighlight()}_updateHighlight(){var i;null==(i=this.graphicsView)||i.setHighlight(Array.from(this._highlightIds.keys()))}};i([s()],c.prototype,"graphicsView",void 0),c=i([h("esri.views.2d.layers.GraphicsLayerView2D")],c);const l=c;export{l as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import i from"../../../Graphic.js";import t from"../../../core/Collection.js";import{init as s,watch as r}from"../../../core/watchUtils.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as h}from"../../../core/accessorSupport/decorators/subclass.js";import{GraphicsCollection as o}from"../../../support/GraphicsCollection.js";import n from"../engine/flow/AnimatedFlowView2D.js";import{LayerView2DMixin as l}from"./LayerView2D.js";import p from"./graphics/GraphicsView2D.js";import u from"./graphics/HighlightGraphicContainer.js";import c from"./imagery/ImageryGraphicsView2D.js";import w from"./imagery/ImageryView2D.js";import{ImageryLayerView as d}from"../../layers/ImageryLayerView.js";import m from"../../layers/LayerView.js";import{RefreshableLayerView as y}from"../../layers/RefreshableLayerView.js";let g=class extends(d(y(l(m)))){constructor(){super(...arguments),this._exportImageVersion=-1}initialize(){this.handles.add([s(this,["layer.blendMode","layer.effects"],(e=>{this.subview&&(this.subview.container.blendMode=e)}),!0),s(this,"layer.effect",(e=>{this.subview&&(this.subview.container.effect=e)}),!0)])}get pixelData(){return this.updating?null:"getPixelData"in this.subview?this.subview.getPixelData():null}get updating(){return!!(!this.subview||"updating"in this.subview&&this.subview.updating)}async hitTest(e,i){return this.subview?[this.subview.hitTest(e)]:null}update(e){var i;null==(i=this.subview)||i.update(e)}attach(){this.layer.increaseRasterJobHandlerUsage(),this._setSubView(),this.handles.add([s(this,"layer.exportImageServiceParameters.version",(e=>{this._exportImageVersion!==e&&(this._exportImageVersion=e,this.requestUpdate())})),this.watch("timeExtent",(()=>{"timeExtent"in this.subview&&(this.subview.timeExtent=this.timeExtent),this.requestUpdate()})),this.layer.on("redraw",(()=>{"redraw"in this.subview?this.subview.redraw():this.subview.redrawOrRefetch()})),r(this.layer,"renderer",(()=>this._setSubView()))],"imagerylayerview-update")}detach(){var e,i;this.layer.decreaseRasterJobHandlerUsage(),this.subview.destroy(),null==(e=this._highlightGraphics)||e.destroy(),null==(i=this._highlightView)||i.destroy(),this.handles.remove("imagerylayerview-update"),this._exportImageVersion=-1}moveStart(){}viewChange(){}moveEnd(){this.requestUpdate()}highlight(e,s){if(!((Array.isArray(e)?e[0]:t.isCollection(e)?e.getItemAt(0):e)instanceof i))return{remove:()=>{}};let r=[];return Array.isArray(e)||t.isCollection(e)?r=e.map((e=>e.clone())):e instanceof i&&(r=[e.clone()]),this._highlightGraphics.addMany(r),{remove:()=>{this._highlightGraphics.removeMany(r)}}}async doRefresh(){this.requestUpdate()}isUpdating(){return!this.subview||!this.suspended&&this.subview.updating}_setSubView(){var e,i;let t="Imagery";"vector-field"===(null==(e=this.layer.renderer)?void 0:e.type)&&"lerc"===this.layer.format&&(t="Graphics");var s,r,a;("animated-flow"===(null==(i=this.layer.renderer)?void 0:i.type)&&(t="Flow"),this.subview&&this.subview.type===t)||(null==(s=this.subview)||s.uninstall(this.container),null==(r=this.subview)||r.destroy(),null==(a=this._highlightGraphics)||a.destroy(),this._highlightView&&(this._highlightView.destroy(),this.container.removeChild(this._highlightView.container)),this.subview="Imagery"===t?new w({layer:this.layer,view:this.view,timeExtent:this.timeExtent}):"Graphics"===t?new c({layer:this.layer,view:this.view,timeExtent:this.timeExtent}):new n({layer:this.layer,layerView:this}),this.subview.attach(),this.subview.install(this.container),this.subview.container.blendMode=this.layer.blendMode,this.subview.container.effect=this.layer.effect);this._highlightGraphics=new o,this._highlightView=new p({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new u(this.view.featuresTilingScheme)}),this.container.addChild(this._highlightView.container),this.requestUpdate()}};e([a()],g.prototype,"pixelData",null),e([a({readOnly:!0})],g.prototype,"updating",null),e([a()],g.prototype,"subview",void 0),g=e([h("esri.views.2d.layers.ImageryLayerView2D")],g);const v=g;export{v as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import i from"../../../Graphic.js";import t from"../../../core/Collection.js";import{watch as r,syncAndInitial as s,sync as a}from"../../../core/reactiveUtils.js";import{property as h}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{GraphicsCollection as l}from"../../../support/GraphicsCollection.js";import n from"../engine/flow/AnimatedFlowView2D.js";import{LayerView2DMixin as u}from"./LayerView2D.js";import p from"./graphics/GraphicsView2D.js";import w from"./graphics/HighlightGraphicContainer.js";import c from"./imagery/ImageryGraphicsView2D.js";import d from"./imagery/ImageryView2D.js";import{ImageryLayerView as m}from"../../layers/ImageryLayerView.js";import v from"../../layers/LayerView.js";import{RefreshableLayerView as y}from"../../layers/RefreshableLayerView.js";let g=class extends(m(y(u(v)))){constructor(){super(...arguments),this._exportImageVersion=-1}get pixelData(){return this.updating?null:"getPixelData"in this.subview?this.subview.getPixelData():null}get updating(){return!!(!this.subview||"updating"in this.subview&&this.subview.updating)}async hitTest(e,i){return this.subview?[this.subview.hitTest(e)]:null}update(e){var i;null==(i=this.subview)||i.update(e)}attach(){this.layer.increaseRasterJobHandlerUsage(),this._setSubView(),this.handles.add([r((()=>{var e,i;return this.subview&&null!=(e=null==(i=this.layer)?void 0:i.blendMode)?e:"normal"}),(e=>{this.subview&&(this.subview.container.blendMode=e)}),s),r((()=>{var e,i;return this.subview&&null!=(e=null==(i=this.layer)?void 0:i.effect)?e:null}),(e=>{this.subview&&(this.subview.container.effect=e)}),s),r((()=>{var e,i;return null==(e=this.layer)||null==(i=e.exportImageServiceParameters)?void 0:i.version}),(e=>{e&&this._exportImageVersion!==e&&(this._exportImageVersion=e,this.requestUpdate())}),a),r((()=>this.layer.timeExtent),(e=>{"timeExtent"in this.subview&&(this.subview.timeExtent=e),this.requestUpdate()})),this.layer.on("redraw",(()=>{"redraw"in this.subview?this.subview.redraw():this.subview.redrawOrRefetch()})),r((()=>this.layer.renderer),(()=>this._setSubView()))],"imagerylayerview-update")}detach(){var e,i;this.layer.decreaseRasterJobHandlerUsage(),this.subview.destroy(),null==(e=this._highlightGraphics)||e.destroy(),null==(i=this._highlightView)||i.destroy(),this.handles.remove("imagerylayerview-update"),this._exportImageVersion=-1}moveStart(){}viewChange(){}moveEnd(){this.requestUpdate()}highlight(e,r){if(!((Array.isArray(e)?e[0]:t.isCollection(e)?e.getItemAt(0):e)instanceof i))return{remove:()=>{}};let s=[];return Array.isArray(e)||t.isCollection(e)?s=e.map((e=>e.clone())):e instanceof i&&(s=[e.clone()]),this._highlightGraphics.addMany(s),{remove:()=>{this._highlightGraphics.removeMany(s)}}}async doRefresh(){this.requestUpdate()}isUpdating(){return!this.subview||!this.suspended&&this.subview.updating}_setSubView(){var e,i;let t="Imagery";"vector-field"===(null==(e=this.layer.renderer)?void 0:e.type)&&"lerc"===this.layer.format&&(t="Graphics");var r,s,a;("animated-flow"===(null==(i=this.layer.renderer)?void 0:i.type)&&(t="Flow"),this.subview&&this.subview.type===t)||(null==(r=this.subview)||r.uninstall(this.container),null==(s=this.subview)||s.destroy(),null==(a=this._highlightGraphics)||a.destroy(),this._highlightView&&(this._highlightView.destroy(),this.container.removeChild(this._highlightView.container)),this.subview="Imagery"===t?new d({layer:this.layer,view:this.view,timeExtent:this.timeExtent}):"Graphics"===t?new c({layer:this.layer,view:this.view,timeExtent:this.timeExtent}):new n({layer:this.layer,layerView:this}),this.subview.attach(),this.subview.install(this.container),this.subview.container.blendMode=this.layer.blendMode,this.subview.container.effect=this.layer.effect);this._highlightGraphics=new l,this._highlightView=new p({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new w(this.view.featuresTilingScheme)}),this.container.addChild(this._highlightView.container),this.requestUpdate()}};e([h()],g.prototype,"pixelData",null),e([h({readOnly:!0})],g.prototype,"updating",null),e([h()],g.prototype,"subview",void 0),g=e([o("esri.views.2d.layers.ImageryLayerView2D")],g);const b=g;export{b as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import s from"../../../Graphic.js";import r from"../../../core/Logger.js";import{isAbortError as i}from"../../../core/promiseUtils.js";import{watch as t,init as o}from"../../../core/watchUtils.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as n}from"../../../core/accessorSupport/decorators/subclass.js";import u from"../engine/flow/AnimatedFlowView2D.js";import{LayerView2DMixin as h}from"./LayerView2D.js";import l from"./imagery/ImageryTileView2D.js";import p from"./imagery/VectorFieldTileView2D.js";import{canUseMajorityInterpolationOnDataSource as c}from"./support/util.js";import{ImageryTileLayerView as d}from"../../layers/ImageryTileLayerView.js";import m from"../../layers/LayerView.js";import{RefreshableLayerView as w}from"../../layers/RefreshableLayerView.js";const v=r.getLogger("esri.views.2d.layers.ImageryTileLayerView2D");let b=class extends(d(w(h(m)))){constructor(){super(...arguments),this._useWebGLForProcessing=!0,this._useProgressiveUpdate=!0,this.subview=null}initialize(){const e=this.updateFullExtent();this.addResolvingPromise(e)}get useWebGLForProcessing(){return this._useWebGLForProcessing}set useWebGLForProcessing(e){this._useWebGLForProcessing=e,this.subview&&"useWebGLForProcessing"in this.subview&&(this.subview.useWebGLForProcessing=e)}get useProgressiveUpdate(){return this._useWebGLForProcessing}set useProgressiveUpdate(e){this._useProgressiveUpdate=e,this.subview&&"useProgressiveUpdate"in this.subview&&(this.subview.useProgressiveUpdate=e)}update(e){this.subview.update(e),this.notifyChange("updating")}isUpdating(){return!this.subview||this.subview.updating}attach(){this.layer.increaseRasterJobHandlerUsage(),this._updateSubview(),this.handles.add([t(this.layer,["bandIds","renderer","interpolation","multidimensionalDefinition"],((e,s,r)=>{const t="multidimensionalDefinition"===r,o="interpolation"===r&&("majority"===e||"majority"===s)&&c(this.layer),a="renderer"===r&&s.type!==e.type;a&&this._updateSubview();const n=t||o||a;this.subview.redrawOrRefetch(n).catch((e=>{i(e)||v.error(e)})),this.notifyChange("updating")})),o(this,["layer.blendMode"],(e=>{this.subview&&(this.subview.container.blendMode=e)}),!0),o(this,["layer.effect"],(e=>{this.subview&&(this.subview.container.effect=e)}),!0),o(this,"timeExtent",(()=>{this.subview.redrawOrRefetch(!0).catch((e=>{i(e)||v.error(e)}))}))],"attach")}detach(){this.handles.remove("attach"),this.layer.decreaseRasterJobHandlerUsage(),this.subview.uninstall()}moveStart(){this.requestUpdate()}viewChange(){this.requestUpdate()}moveEnd(){this.subview.moveEnd()}async hitTest(e,r){return[new s({attributes:{},geometry:e.clone()})]}doRefresh(){return this.subview.doRefresh()}_updateSubview(){const e="vector-field"===this.layer.renderer.type?"rasterVF":"animated-flow"===this.layer.renderer.type?"rasterAnimatedFlow":"raster";if(this.subview){if(this.subview.type===e)return;this.subview.uninstall()}const{layer:s}=this;let r;r="rasterVF"===e?new p({layer:s,layerView:this}):"rasterAnimatedFlow"===e?new u({layer:s,layerView:this}):new l({layer:s,layerView:this}),"useWebGLForProcessing"in r&&(r.useWebGLForProcessing=this._useWebGLForProcessing),"useProgressiveUpdate"in r&&(r.useProgressiveUpdate=this._useProgressiveUpdate),"previousLOD"in r&&(r.previousLOD=this.subview&&"previousLOD"in this.subview&&this.subview.previousLOD),r.attach(),r.install(this.container),r.container.blendMode=s.blendMode,r.container.effect=s.effect,this.subview=r,this.requestUpdate()}};e([a()],b.prototype,"subview",void 0),e([a()],b.prototype,"useWebGLForProcessing",null),e([a()],b.prototype,"useProgressiveUpdate",null),b=e([n("esri.views.2d.layers.ImageryTileLayerView2D")],b);const y=b;export{y as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import s from"../../../Graphic.js";import r from"../../../core/Logger.js";import{isAbortError as i}from"../../../core/promiseUtils.js";import{watch as t,syncAndInitial as o,initial as a}from"../../../core/reactiveUtils.js";import{watch as n}from"../../../core/watchUtils.js";import{property as u}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as h}from"../../../core/accessorSupport/decorators/subclass.js";import l from"../engine/flow/AnimatedFlowView2D.js";import{LayerView2DMixin as p}from"./LayerView2D.js";import c from"./imagery/ImageryTileView2D.js";import d from"./imagery/VectorFieldTileView2D.js";import{canUseMajorityInterpolationOnDataSource as v}from"./support/util.js";import{ImageryTileLayerView as w}from"../../layers/ImageryTileLayerView.js";import m from"../../layers/LayerView.js";import{RefreshableLayerView as b}from"../../layers/RefreshableLayerView.js";const y=r.getLogger("esri.views.2d.layers.ImageryTileLayerView2D");let g=class extends(w(b(p(m)))){constructor(){super(...arguments),this._useWebGLForProcessing=!0,this._useProgressiveUpdate=!0,this.subview=null}get useWebGLForProcessing(){return this._useWebGLForProcessing}set useWebGLForProcessing(e){this._useWebGLForProcessing=e,this.subview&&"useWebGLForProcessing"in this.subview&&(this.subview.useWebGLForProcessing=e)}get useProgressiveUpdate(){return this._useWebGLForProcessing}set useProgressiveUpdate(e){this._useProgressiveUpdate=e,this.subview&&"useProgressiveUpdate"in this.subview&&(this.subview.useProgressiveUpdate=e)}update(e){this.subview.update(e),this.notifyChange("updating")}isUpdating(){return!this.subview||this.subview.updating}attach(){this.layer.increaseRasterJobHandlerUsage(),this._updateSubview(),this.handles.add([n(this.layer,["bandIds","renderer","interpolation","multidimensionalDefinition"],((e,s,r)=>{const t="multidimensionalDefinition"===r,o="interpolation"===r&&("majority"===e||"majority"===s)&&v(this.layer),a="renderer"===r&&s.type!==e.type;a&&this._updateSubview();const n=t||o||a;this.subview.redrawOrRefetch(n).catch((e=>{i(e)||y.error(e)})),this.notifyChange("updating")})),t((()=>{var e,s;return this.subview&&null!=(e=null==(s=this.layer)?void 0:s.blendMode)?e:"normal"}),(e=>{this.subview&&(this.subview.container.blendMode=e)}),o),t((()=>{var e,s;return this.subview&&null!=(e=null==(s=this.layer)?void 0:s.effect)?e:null}),(e=>{this.subview&&(this.subview.container.effect=e)}),o),t((()=>this.timeExtent),(()=>{this.subview.redrawOrRefetch(!0).catch((e=>{i(e)||y.error(e)}))}),a)],"attach")}detach(){this.handles.remove("attach"),this.layer.decreaseRasterJobHandlerUsage(),this.subview.uninstall()}moveStart(){this.requestUpdate()}viewChange(){this.requestUpdate()}moveEnd(){this.subview.moveEnd()}async hitTest(e,r){return[new s({attributes:{},geometry:e.clone()})]}doRefresh(){return this.subview.doRefresh()}_updateSubview(){const e="vector-field"===this.layer.renderer.type?"rasterVF":"animated-flow"===this.layer.renderer.type?"rasterAnimatedFlow":"raster";if(this.subview){if(this.subview.type===e)return;this.subview.uninstall()}const{layer:s}=this;let r;r="rasterVF"===e?new d({layer:s,layerView:this}):"rasterAnimatedFlow"===e?new l({layer:s,layerView:this}):new c({layer:s,layerView:this}),"useWebGLForProcessing"in r&&(r.useWebGLForProcessing=this._useWebGLForProcessing),"useProgressiveUpdate"in r&&(r.useProgressiveUpdate=this._useProgressiveUpdate),"previousLOD"in r&&(r.previousLOD=this.subview&&"previousLOD"in this.subview&&this.subview.previousLOD),r.attach(),r.install(this.container),r.container.blendMode=s.blendMode,r.container.effect=s.effect,this.subview=r,this.requestUpdate()}};e([u()],g.prototype,"subview",void 0),e([u()],g.prototype,"useWebGLForProcessing",null),e([u()],g.prototype,"useProgressiveUpdate",null),g=e([h("esri.views.2d.layers.ImageryTileLayerView2D")],g);const f=g;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.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../chunks/tslib.es6.js";import e from"../../../core/Collection.js";import{referenceSetter as s}from"../../../core/collectionUtils.js";import{init as i}from"../../../core/watchUtils.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import{Container as o}from"../engine/Container.js";import p from"../../layers/support/ClipArea.js";import h from"../../layers/support/ClipRect.js";import n from"../../layers/support/Geometry.js";import d from"../../layers/support/Path.js";const c=e.ofType({key:"type",base:p,typeMap:{rect:h,path:d,geometry:n}}),l=e=>{let p=class extends e{constructor(){super(...arguments),this.clips=new c,this.moving=!1,this.attached=!1,this.lastUpdateId=-1,this.updateRequested=!1}initialize(){var t;this.container||(this.container=new o),this.container.fadeTransitionEnabled=!0,this.container.opacity=0,this.container.clips=this.clips,this.handles.add([i(this,"suspended",(t=>{this.container&&(this.container.visible=!t),this.view&&!t&&this.updateRequested&&this.view.requestUpdate()}),!0),i(this,["layer.opacity","container"],(()=>{var t,e;this.container&&(this.container.opacity=null!=(t=null==(e=this.layer)?void 0:e.opacity)?t:1)}),!0),i(this,["layer.blendMode"],(t=>{this.container&&(this.container.blendMode=t)}),!0),i(this,["layer.effect"],(t=>{this.container&&(this.container.effect=t)}),!0),this.clips.on("change",(()=>{this.container.clips=this.clips,this.notifyChange("clips")}))]),null!=(t=this.view)&&t.whenLayerView?this.view.whenLayerView(this.layer).then((t=>{t!==this||this.attached||this.destroyed||(this.attach(),this.requestUpdate(),this.attached=!0)}),(()=>{})):this.when().then((()=>{this.attached||this.destroyed||(this.attach(),this.requestUpdate(),this.attached=!0)}),(()=>{}))}destroy(){this.attached&&(this.detach(),this.attached=!1),this.handles.remove("initialize"),this.updateRequested=!1}get updating(){return!this.attached||!this.suspended&&(this.updateRequested||this.isUpdating())||!(!this.updatingHandles||!this.updatingHandles.updating)}isVisibleAtScale(t){let e=!0;const s=this.layer,i=s.minScale,r=s.maxScale;if(null!=i&&null!=r){let s=!i,a=!r;!s&&t<=i&&(s=!0),!a&&t>=r&&(a=!0),e=s&&a}return e}requestUpdate(){this.destroyed||this.updateRequested||(this.updateRequested=!0,this.suspended||this.view.requestUpdate())}processUpdate(t){!this.isFulfilled()||this.isResolved()?(this._set("updateParameters",t),this.updateRequested&&!this.suspended&&(this.updateRequested=!1,this.update(t))):this.updateRequested=!1}hitTest(t,e){return Promise.resolve(null)}isUpdating(){return!1}isRendering(){return!1}canResume(){return!!super.canResume()&&this.isVisibleAtScale(this.view.scale)}};return t([r({type:c,set(t){const e=s(t,this._get("clips"),c);this._set("clips",e)}})],p.prototype,"clips",void 0),t([r()],p.prototype,"moving",void 0),t([r()],p.prototype,"attached",void 0),t([r()],p.prototype,"container",void 0),t([r()],p.prototype,"suspended",void 0),t([r({readOnly:!0})],p.prototype,"updateParameters",void 0),t([r()],p.prototype,"updateRequested",void 0),t([r()],p.prototype,"updating",null),t([r()],p.prototype,"view",void 0),p=t([a("esri.views.2d.layers.LayerView2D")],p),p};export{l as LayerView2DMixin};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Collection.js";import{referenceSetter as s}from"../../../core/collectionUtils.js";import i from"../../../core/Error.js";import{watch as r,syncAndInitial as a,on as o}from"../../../core/reactiveUtils.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import{Container as l}from"../engine/Container.js";import h from"../../layers/support/ClipArea.js";import c from"../../layers/support/ClipRect.js";import d from"../../layers/support/Geometry.js";import u from"../../layers/support/Path.js";const y=t.ofType({key:"type",base:h,typeMap:{rect:c,path:u,geometry:d}}),m=t=>{let h=class extends t{constructor(){super(...arguments),this.attached=!1,this.clips=new y,this.lastUpdateId=-1,this.moving=!1,this.updateRequested=!1}initialize(){var e,t,s,n;const p=null==(e=null==(t=this.view)?void 0:t.spatialReferenceLocked)||e;(null==(s=this.view)?void 0:s.spatialReference)&&p&&!this.spatialReferenceSupported?this.addResolvingPromise(Promise.reject(new i("layerview:spatial-reference-incompatible","The spatial reference of this layer does not meet the requirements of the view",{layer:this.layer}))):(this.container||(this.container=new l),this.container.fadeTransitionEnabled=!0,this.container.opacity=0,this.container.clips=this.clips,this.handles.add([r((()=>this.suspended),(e=>{this.container&&(this.container.visible=!e),this.view&&!e&&this.updateRequested&&this.view.requestUpdate()}),a),r((()=>{var e,t;return null!=(e=null==(t=this.layer)?void 0:t.opacity)?e:1}),(e=>{this.container&&(this.container.opacity=e)}),a),r((()=>this.layer&&"blendMode"in this.layer?this.layer.blendMode:"normal"),(e=>{this.container&&(this.container.blendMode=e)}),a),r((()=>this.layer&&"effect"in this.layer?this.layer.effect:null),(e=>{this.container&&(this.container.effect=e)}),a),o((()=>this.clips),"change",(()=>{this.container&&(this.container.clips=this.clips)}))]),null!=(n=this.view)&&n.whenLayerView?this.view.whenLayerView(this.layer).then((e=>{e!==this||this.attached||this.destroyed||(this.attach(),this.requestUpdate(),this.attached=!0)}),(()=>{})):this.when().then((()=>{this.attached||this.destroyed||(this.attach(),this.requestUpdate(),this.attached=!0)}),(()=>{})))}destroy(){this.attached&&(this.detach(),this.attached=!1),this.updateRequested=!1}get spatialReferenceSupported(){var e;const t=null==(e=this.view)?void 0:e.spatialReference;return null==t||this.supportsSpatialReference(t)}get updating(){var e;return!this.attached||!this.suspended&&(this.updateRequested||this.isUpdating())||!(null==(e=this.updatingHandles)||!e.updating)}get visibleAtCurrentScale(){return this.isVisibleAtScale(this.view.scale)}isVisibleAtScale(e){const t=this.layer&&"effectiveScaleRange"in this.layer?this.layer.effectiveScaleRange:null;if(!t)return!0;const{minScale:s,maxScale:i}=t;return(0===s||e<=s)&&(0===i||e>=i)}requestUpdate(){this.destroyed||this.updateRequested||(this.updateRequested=!0,this.suspended||this.view.requestUpdate())}processUpdate(e){!this.isFulfilled()||this.isResolved()?(this._set("updateParameters",e),this.updateRequested&&!this.suspended&&(this.updateRequested=!1,this.update(e))):this.updateRequested=!1}hitTest(e,t){return Promise.resolve(null)}supportsSpatialReference(e){return!0}isUpdating(){return!1}canResume(){return!!this.spatialReferenceSupported&&(!!super.canResume()&&this.visibleAtCurrentScale)}getSuspendInfo(){const e=super.getSuspendInfo(),t=!this.spatialReferenceSupported,s=this.visibleAtCurrentScale;return t&&(e.spatialReferenceNotSupported=t),s&&(e.outsideScaleRange=s),e}};return e([n()],h.prototype,"attached",void 0),e([n({type:y,set(e){const t=s(e,this._get("clips"),y);this._set("clips",t)}})],h.prototype,"clips",void 0),e([n()],h.prototype,"container",void 0),e([n()],h.prototype,"moving",void 0),e([n({readOnly:!0})],h.prototype,"spatialReferenceSupported",null),e([n({readOnly:!0})],h.prototype,"updateParameters",void 0),e([n()],h.prototype,"updateRequested",void 0),e([n()],h.prototype,"updating",null),e([n()],h.prototype,"view",void 0),e([n({readOnly:!0})],h.prototype,"visibleAtCurrentScale",null),h=e([p("esri.views.2d.layers.LayerView2D")],h),h};export{m as LayerView2DMixin};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import s from"../../../Graphic.js";import i from"../../../core/Collection.js";import{isSome as t,isNone as r}from"../../../core/maybe.js";import{init as a,on as o}from"../../../core/watchUtils.js";import"../../../core/Logger.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/set.js";import{subclass as h}from"../../../core/accessorSupport/decorators/subclass.js";import{LayerView2DMixin as c}from"./LayerView2D.js";import p from"./graphics/GraphicContainer.js";import n from"./graphics/GraphicsView2D.js";import l from"../../layers/LayerView.js";const u="sublayers",d="layerView",f=Object.freeze({remove(){},pause(){},resume(){}});let g=class extends(c(l)){async fetchPopupFeatures(e){return Array.from(this.graphicsViews(),(s=>s.hitTest(e).filter((e=>!!e.popupTemplate)))).flat()}*graphicsViews(){t(this._graphicsViewsFeatureCollectionMap)?yield*this._graphicsViewsFeatureCollectionMap.keys():t(this._graphicsViews)?yield*this._graphicsViews:yield*[]}async hitTest(e,s){const i=Array.from(this.graphicsViews(),(async s=>{const i=await s.hitTest(e);if(t(this._graphicsViewsFeatureCollectionMap)){const e=this._graphicsViewsFeatureCollectionMap.get(s);for(const s of i)!s.popupTemplate&&e.popupTemplate&&(s.popupTemplate=e.popupTemplate)}return i}));return(await Promise.all(i)).flat()}highlight(e){let t;if("number"==typeof e?t=[e]:e instanceof s?t=[e.uid]:Array.isArray(e)&&e.length>0?t="number"==typeof e[0]?e:e.map((e=>e&&e.uid)):i.isCollection(e)&&(t=e.map((e=>e&&e.uid)).toArray()),t=t.filter((e=>null!=e)),!t.length)return f;for(const s of this.graphicsViews())s.addHighlight(t);return{remove:()=>{for(const e of this.graphicsViews())e.removeHighlight(t)}}}update(e){for(const s of this.graphicsViews())s.processUpdate(e)}attach(){const e=this.view,s=()=>this.requestUpdate(),i=this.layer.featureCollections;if(t(i)&&i.length){this._graphicsViewsFeatureCollectionMap=new Map;for(const t of i){const i=new p(this.view.featuresTilingScheme);i.fadeTransitionEnabled=!0;const r=new n({view:e,graphics:t.source,renderer:t.renderer,requestUpdateCallback:s,container:i});this._graphicsViewsFeatureCollectionMap.set(r,t),this.container.addChild(r.container),this.handles.add([a(t,"visible",(e=>r.container.visible=e)),a(r,"updating",(()=>this.notifyChange("updating")))],d)}}else t(this.layer.sublayers)&&this.handles.add(o(this.layer,"sublayers","change",(()=>this._createGraphicsViews()),(()=>this._createGraphicsViews()),(()=>this._destroyGraphicsViews())),u)}detach(){this._destroyGraphicsViews(),this.handles.remove(u)}moveStart(){}moveEnd(){}viewChange(){for(const e of this.graphicsViews())e.viewChange()}isUpdating(){for(const e of this.graphicsViews())if(e.updating)return!0;return!1}_destroyGraphicsViews(){this.container.removeAllChildren(),this.handles.remove(d);for(const e of this.graphicsViews())e.destroy();this._graphicsViews=null,this._graphicsViewsFeatureCollectionMap=null}_createGraphicsViews(){if(this._destroyGraphicsViews(),r(this.layer.sublayers))return;const e=[],s=this.view,i=()=>this.requestUpdate();for(const t of this.layer.sublayers){const r=new p(this.view.featuresTilingScheme);r.fadeTransitionEnabled=!0;const o=new n({view:s,graphics:t.graphics,requestUpdateCallback:i,container:r});this.handles.add([t.on("graphic-update",o.graphicUpdateHandler),a(t,"visible",(e=>o.container.visible=e)),a(o,"updating",(()=>this.notifyChange("updating")))],d),this.container.addChild(o.container),e.push(o)}this._graphicsViews=e}};g=e([h("esri.views.2d.layers.MapNotesLayerView2D")],g);const m=g;export{m as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import i from"../../../Graphic.js";import s from"../../../core/Collection.js";import{isSome as t,isNone as r}from"../../../core/maybe.js";import{init as h,on as a}from"../../../core/watchUtils.js";import"../../../core/Logger.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/set.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{LayerView2DMixin as c}from"./LayerView2D.js";import p from"./graphics/GraphicContainer.js";import n from"./graphics/GraphicsView2D.js";import l from"../../layers/LayerView.js";const g="sublayers",d="layerView",u=Object.freeze({remove(){},pause(){},resume(){}});let f=class extends(c(l)){constructor(){super(...arguments),this._highlightIds=new Map}async fetchPopupFeatures(e){return Array.from(this.graphicsViews(),(i=>i.hitTest(e).filter((e=>!!e.popupTemplate)))).flat()}*graphicsViews(){t(this._graphicsViewsFeatureCollectionMap)?yield*this._graphicsViewsFeatureCollectionMap.keys():t(this._graphicsViews)?yield*this._graphicsViews:yield*[]}async hitTest(e,i){const s=Array.from(this.graphicsViews(),(async i=>{const s=await i.hitTest(e);if(t(this._graphicsViewsFeatureCollectionMap)){const e=this._graphicsViewsFeatureCollectionMap.get(i);for(const i of s)!i.popupTemplate&&e.popupTemplate&&(i.popupTemplate=e.popupTemplate)}return s}));return(await Promise.all(s)).flat()}highlight(e){let t;return"number"==typeof e?t=[e]:e instanceof i?t=[e.uid]:Array.isArray(e)&&e.length>0?t="number"==typeof e[0]?e:e.map((e=>e&&e.uid)):s.isCollection(e)&&(t=e.map((e=>e&&e.uid)).toArray()),t=t.filter((e=>null!=e)),t.length?(this._addHighlight(t),{remove:()=>{this._removeHighlight(t)}}):u}update(e){for(const i of this.graphicsViews())i.processUpdate(e)}attach(){const e=this.view,i=()=>this.requestUpdate(),s=this.layer.featureCollections;if(t(s)&&s.length){this._graphicsViewsFeatureCollectionMap=new Map;for(const t of s){const s=new p(this.view.featuresTilingScheme);s.fadeTransitionEnabled=!0;const r=new n({view:e,graphics:t.source,renderer:t.renderer,requestUpdateCallback:i,container:s});this._graphicsViewsFeatureCollectionMap.set(r,t),this.container.addChild(r.container),this.handles.add([h(t,"visible",(e=>r.container.visible=e)),h(r,"updating",(()=>this.notifyChange("updating")))],d)}this._updateHighlight()}else t(this.layer.sublayers)&&this.handles.add(a(this.layer,"sublayers","change",(()=>this._createGraphicsViews()),(()=>this._createGraphicsViews()),(()=>this._destroyGraphicsViews())),g)}detach(){this._destroyGraphicsViews(),this.handles.remove(g)}moveStart(){}moveEnd(){}viewChange(){for(const e of this.graphicsViews())e.viewChange()}isUpdating(){for(const e of this.graphicsViews())if(e.updating)return!0;return!1}_destroyGraphicsViews(){this.container.removeAllChildren(),this.handles.remove(d);for(const e of this.graphicsViews())e.destroy();this._graphicsViews=null,this._graphicsViewsFeatureCollectionMap=null}_createGraphicsViews(){if(this._destroyGraphicsViews(),r(this.layer.sublayers))return;const e=[],i=this.view,s=()=>this.requestUpdate();for(const t of this.layer.sublayers){const r=new p(this.view.featuresTilingScheme);r.fadeTransitionEnabled=!0;const a=new n({view:i,graphics:t.graphics,requestUpdateCallback:s,container:r});this.handles.add([t.on("graphic-update",a.graphicUpdateHandler),h(t,"visible",(e=>a.container.visible=e)),h(a,"updating",(()=>this.notifyChange("updating")))],d),this.container.addChild(a.container),e.push(a)}this._graphicsViews=e,this._updateHighlight()}_addHighlight(e){for(const i of e)if(this._highlightIds.has(i)){const e=this._highlightIds.get(i);this._highlightIds.set(i,e+1)}else this._highlightIds.set(i,1);this._updateHighlight()}_removeHighlight(e){for(const i of e)if(this._highlightIds.has(i)){const e=this._highlightIds.get(i)-1;0===e?this._highlightIds.delete(i):this._highlightIds.set(i,e)}this._updateHighlight()}_updateHighlight(){const e=Array.from(this._highlightIds.keys());for(const i of this.graphicsViews())i.setHighlight(e)}};f=e([o("esri.views.2d.layers.MapNotesLayerView2D")],f);const m=f;export{m as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import s from"../../../Graphic.js";import r from"../../../core/Collection.js";import{isSome as i,unwrap as t}from"../../../core/maybe.js";import{watch as o}from"../../../core/reactiveUtils.js";import"../../../core/Logger.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/set.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import{LayerView2DMixin as h}from"./LayerView2D.js";import n from"./graphics/GraphicContainer.js";import c from"./graphics/GraphicsView2D.js";import p from"../../layers/LayerView.js";const l=["routeInfo","directionLines","directionPoints","polygonBarriers","polylineBarriers","pointBarriers","stops"],m=Object.freeze({remove(){},pause(){},resume(){}});let u=class extends(h(p)){constructor(){super(...arguments),this._graphicsViews=new Map}attach(){for(const e of l)this.handles.add(o((()=>i(this.layer[e])?"routeInfo"===e?[t(this.layer[e])]:t(this.layer[e]).items:null),(s=>this._createGraphicsView(e,s)),{initial:!0}),e)}detach(){this._destroyGraphicsViews()}highlight(e){let i;if("number"==typeof e?i=[e]:e instanceof s?i=[e.uid]:Array.isArray(e)&&e.length>0?i="number"==typeof e[0]?e:e.map((e=>e&&e.uid)):r.isCollection(e)&&(i=e.map((e=>e&&e.uid)).toArray()),i=i.filter((e=>null!=e)),!i.length)return m;for(const s of this._graphicsViews.values())s.addHighlight(i);return{remove:()=>{for(const e of this._graphicsViews.values())e.removeHighlight(i)}}}async hitTest(e,s){if(this.suspended||!this._graphicsViews.size)return Promise.resolve(null);const r=Array.from(this._graphicsViews.values()).reverse().map((s=>s.hitTest(e))).flat().filter((e=>!!e));for(const i of r)i.layer=this.layer,i.sourceLayer=this.layer;return r}moveStart(){}moveEnd(){}update(e){for(const s of this._graphicsViews.values())s.processUpdate(e)}viewChange(){for(const e of this._graphicsViews.values())e.viewChange()}isUpdating(){for(const e of this._graphicsViews.values())if(e.updating)return!0;return!1}_createGraphicsView(e,t){this._destroyGraphicsView(e);const a=this.view,h=()=>this.requestUpdate(),p=new r(i(t)?t.map((e=>{const{attributes:r,geometry:i,symbol:t,popupInfo:o}=e.toPortalJSON();return s.fromJSON({attributes:r,geometry:i,symbol:t,popupTemplate:o})})):[]),m=new n(a.featuresTilingScheme),u=new c({container:m,graphics:p,requestUpdateCallback:h,view:a});this._graphicsViews.set(e,u),this.container.addChildAt(m,l.indexOf(e)),this.handles.add([o((()=>u.updating),(()=>this.notifyChange("updating")),{initial:!0})],`updating-${e}`)}_destroyGraphicsView(e){if(!this._graphicsViews.has(e))return;const s=this._graphicsViews.get(e);this.container.removeChild(s.container),s.destroy(),this.handles.remove(`updating-${e}`),this._graphicsViews.delete(e)}_destroyGraphicsViews(){this.container.removeAllChildren();for(const[e,s]of this._graphicsViews.entries())this.handles.remove(e),s.destroy();this._graphicsViews.clear()}};u=e([a("esri.views.2d.layers.RouteLayerView2D")],u);const d=u;export{d as default};
5
+ import{_ as i}from"../../../chunks/tslib.es6.js";import e from"../../../Graphic.js";import s from"../../../core/Collection.js";import{isSome as t,unwrap as r}from"../../../core/maybe.js";import{watch as h}from"../../../core/reactiveUtils.js";import"../../../core/Logger.js";import"../../../core/accessorSupport/ensureType.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/set.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{LayerView2DMixin as a}from"./LayerView2D.js";import n from"./graphics/GraphicContainer.js";import c from"./graphics/GraphicsView2D.js";import p from"../../layers/LayerView.js";const l=["routeInfo","directionLines","directionPoints","polygonBarriers","polylineBarriers","pointBarriers","stops"],g=Object.freeze({remove(){},pause(){},resume(){}});let d=class extends(a(p)){constructor(){super(...arguments),this._graphicsViews=new Map,this._highlightIds=new Map}attach(){for(const i of l)this.handles.add(h((()=>t(this.layer[i])?"routeInfo"===i?[r(this.layer[i])]:r(this.layer[i]).items:null),(e=>this._createGraphicsView(i,e)),{initial:!0}),i)}detach(){this._destroyGraphicsViews()}highlight(i){let t;return"number"==typeof i?t=[i]:i instanceof e?t=[i.uid]:Array.isArray(i)&&i.length>0?t="number"==typeof i[0]?i:i.map((i=>i&&i.uid)):s.isCollection(i)&&(t=i.map((i=>i&&i.uid)).toArray()),t=t.filter((i=>null!=i)),t.length?(this._addHighlight(t),{remove:()=>this._removeHighlight(t)}):g}async hitTest(i,e){if(this.suspended||!this._graphicsViews.size)return Promise.resolve(null);const s=Array.from(this._graphicsViews.values()).reverse().map((e=>e.hitTest(i))).flat().filter((i=>!!i));for(const t of s)t.layer=this.layer,t.sourceLayer=this.layer;return s}moveStart(){}moveEnd(){}update(i){for(const e of this._graphicsViews.values())e.processUpdate(i)}viewChange(){for(const i of this._graphicsViews.values())i.viewChange()}isUpdating(){for(const i of this._graphicsViews.values())if(i.updating)return!0;return!1}_createGraphicsView(i,r){this._destroyGraphicsView(i);const o=this.view,a=()=>this.requestUpdate(),p=new s(t(r)?r.map((i=>{const{attributes:s,geometry:t,symbol:r,popupInfo:h}=i.toPortalJSON();return e.fromJSON({attributes:s,geometry:t,symbol:r,popupTemplate:h})})):[]),g=new n(o.featuresTilingScheme),d=new c({container:g,graphics:p,requestUpdateCallback:a,view:o});this._graphicsViews.set(i,d),this.container.addChildAt(g,l.indexOf(i)),this._updateHighlight(),this.handles.add([h((()=>d.updating),(()=>this.notifyChange("updating")),{initial:!0})],`updating-${i}`)}_destroyGraphicsView(i){if(!this._graphicsViews.has(i))return;const e=this._graphicsViews.get(i);this.container.removeChild(e.container),e.destroy(),this.handles.remove(`updating-${i}`),this._graphicsViews.delete(i)}_destroyGraphicsViews(){this.container.removeAllChildren();for(const[i,e]of this._graphicsViews.entries())this.handles.remove(i),e.destroy();this._graphicsViews.clear()}_addHighlight(i){for(const e of i)if(this._highlightIds.has(e)){const i=this._highlightIds.get(e);this._highlightIds.set(e,i+1)}else this._highlightIds.set(e,1);this._updateHighlight()}_removeHighlight(i){for(const e of i)if(this._highlightIds.has(e)){const i=this._highlightIds.get(e)-1;0===i?this._highlightIds.delete(e):this._highlightIds.set(e,i)}this._updateHighlight()}_updateHighlight(){const i=Array.from(this._highlightIds.keys());for(const e of this._graphicsViews.values())e.setHighlight(i)}};d=i([o("esri.views.2d.layers.RouteLayerView2D")],d);const m=d;export{m as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Error.js";import i from"../../../core/Logger.js";import{isAbortError as s}from"../../../core/promiseUtils.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import{BitmapTileLayerView2D as l}from"./BitmapTileLayerView2D.js";import{LayerView2DMixin as o}from"./LayerView2D.js";import{createBlankImage as h,resampleImage as n}from"./support/imageUtils.js";import c from"../tiling/TileInfoView.js";import u from"../tiling/TileKey.js";import p from"../tiling/TileQueue.js";import f from"../tiling/TileStrategy.js";import m from"../../layers/LayerView.js";import{RefreshableLayerView as y}from"../../layers/RefreshableLayerView.js";import{TileLayerView as w}from"../../layers/TileLayerView.js";import{createQueryGeometry as g}from"../../support/drapedUtils.js";const d=i.getLogger("esri.views.2d.layers.TileLayerView2D"),_=[0,0];let I=class extends(w(y(l(o(m))))){constructor(){super(...arguments),this._tileStrategy=null,this._fetchQueue=null,this.layer=null}initialize(){const e=this.layer.tileInfo,i=e&&e.spatialReference;let s;i||(s=new t("layerview:tiling-information-missing","The layer doesn't provide tiling information",{layer:this.layer})),i.equals(this.view.spatialReference)||(s=new t("layerview:spatial-reference-incompatible","The spatial reference of this layer does not meet the requirements of the view",{layer:this.layer})),this.watch("resampling",(()=>{this.doRefresh()})),s&&this.addResolvingPromise(Promise.reject(s))}get resampling(){return!("resampling"in this.layer)||!1!==this.layer.resampling}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume(),this.notifyChange("updating")}attach(){const e="tileServers"in this.layer?this.layer.tileServers:null;this._tileInfoView=new c(this.layer.tileInfo,this.layer.fullExtent),this._fetchQueue=new p({tileInfoView:this._tileInfoView,concurrency:e&&10*e.length||10,process:(e,t)=>this.fetchTile(e,t)}),this._tileStrategy=new f({cachePolicy:"keep",resampling:this.resampling,acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView}),this.requestUpdate(),this.container.requestRender(),super.attach()}detach(){super.detach(),this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._fetchQueue=this._tileStrategy=this._tileInfoView=null}moveStart(){this.requestUpdate()}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}createFetchPopupFeaturesQueryGeometry(e,t){return g(e,t,this.view)}async doRefresh(){this.updateRequested||this.suspended||(this._fetchQueue.reset(),this._tileStrategy.tiles.forEach((e=>this._enqueueTileFetch(e))),this.notifyChange("updating"))}isUpdating(){var e;return(null==(e=this._fetchQueue)?void 0:e.length)>0}acquireTile(e){const t=this._bitmapView.createTile(e),i=t.bitmap;return[i.x,i.y]=this._tileInfoView.getTileCoords(_,t.key),i.resolution=this._tileInfoView.getTileResolution(t.key),[i.width,i.height]=this._tileInfoView.tileInfo.size,this._enqueueTileFetch(t),this._bitmapView.addChild(t),this.requestUpdate(),t}releaseTile(e){this._fetchQueue.abort(e.key.id),this._bitmapView.removeChild(e),e.once("detach",(()=>e.destroy())),this.requestUpdate()}async fetchTile(e,t={}){const i="tilemapCache"in this.layer?this.layer.tilemapCache:null,{signal:r,resamplingLevel:a=0}=t;if(!i)try{return await this._fetchImage(e,r)}catch(c){if(!s(c)&&!this.resampling)return h(this._tileInfoView.tileInfo.size);if(a<3){const i=this._tileInfoView.getTileParentId(e.id);if(i){const s=new u(i),r=await this.fetchTile(s,{...t,resamplingLevel:a+1});return n(this._tileInfoView,r,s,e)}}throw c}const l=new u(0,0,0,0);let o;try{if(await i.fetchAvailabilityUpsample(e.level,e.row,e.col,l,{signal:r}),l.level!==e.level&&!this.resampling)return h(this._tileInfoView.tileInfo.size);o=await this._fetchImage(l,r)}catch(c){if(s(c))throw c;o=await this._fetchImage(e,r)}return this.resampling?n(this._tileInfoView,o,l,e):o}async _enqueueTileFetch(e){if(!this._fetchQueue.has(e.key.id)){try{const t=await this._fetchQueue.push(e.key);e.bitmap.source=t,e.bitmap.width=this._tileInfoView.tileInfo.size[0],e.bitmap.height=this._tileInfoView.tileInfo.size[1],e.once("attach",(()=>this.requestUpdate()))}catch(t){s(t)||d.error(t)}this.requestUpdate()}}async _fetchImage(e,t){return this.layer.fetchTile(e.level,e.row,e.col,{signal:t})}};e([r()],I.prototype,"resampling",null),I=e([a("esri.views.2d.layers.TileLayerView2D")],I);const T=I;export{T as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Logger.js";import{isAbortError as i}from"../../../core/promiseUtils.js";import{watch as s}from"../../../core/reactiveUtils.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{BitmapTileLayerView2D as a}from"./BitmapTileLayerView2D.js";import{LayerView2DMixin as h}from"./LayerView2D.js";import{createBlankImage as o,resampleImage as n}from"./support/imageUtils.js";import c from"../tiling/TileInfoView.js";import u from"../tiling/TileKey.js";import p from"../tiling/TileQueue.js";import f from"../tiling/TileStrategy.js";import m from"../../layers/LayerView.js";import{RefreshableLayerView as y}from"../../layers/RefreshableLayerView.js";import{TileLayerView as d}from"../../layers/TileLayerView.js";import{createQueryGeometry as g}from"../../support/drapedUtils.js";const w=[0,0];let _=class extends(d(y(a(h(m))))){constructor(){super(...arguments),this._tileStrategy=null,this._fetchQueue=null,this.layer=null}get resampling(){return!("resampling"in this.layer)||!1!==this.layer.resampling}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume(),this.notifyChange("updating")}attach(){const e="tileServers"in this.layer?this.layer.tileServers:null;this._tileInfoView=new c(this.layer.tileInfo,this.layer.fullExtent),this._fetchQueue=new p({tileInfoView:this._tileInfoView,concurrency:e&&10*e.length||10,process:(e,t)=>this.fetchTile(e,t)}),this._tileStrategy=new f({cachePolicy:"keep",resampling:this.resampling,acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView}),this.requestUpdate(),this.container.requestRender(),this.handles.add(s((()=>this.resampling),(()=>{this.doRefresh()}))),super.attach()}detach(){super.detach(),this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._fetchQueue=this._tileStrategy=this._tileInfoView=null}moveStart(){this.requestUpdate()}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}supportsSpatialReference(e){var t;const i=null==(t=this.layer.tileInfo)?void 0:t.spatialReference;return e.equals(i)}createFetchPopupFeaturesQueryGeometry(e,t){return g(e,t,this.view)}async doRefresh(){this.updateRequested||this.suspended||(this._fetchQueue.reset(),this._tileStrategy.tiles.forEach((e=>this._enqueueTileFetch(e))),this.notifyChange("updating"))}isUpdating(){var e;return(null==(e=this._fetchQueue)?void 0:e.length)>0}acquireTile(e){const t=this._bitmapView.createTile(e),i=t.bitmap;return[i.x,i.y]=this._tileInfoView.getTileCoords(w,t.key),i.resolution=this._tileInfoView.getTileResolution(t.key),[i.width,i.height]=this._tileInfoView.tileInfo.size,this._enqueueTileFetch(t),this._bitmapView.addChild(t),this.requestUpdate(),t}releaseTile(e){this._fetchQueue.abort(e.key.id),this._bitmapView.removeChild(e),e.once("detach",(()=>e.destroy())),this.requestUpdate()}async fetchTile(e,t={}){const s="tilemapCache"in this.layer?this.layer.tilemapCache:null,{signal:r,resamplingLevel:l=0}=t;if(!s)try{return await this._fetchImage(e,r)}catch(c){if(!i(c)&&!this.resampling)return o(this._tileInfoView.tileInfo.size);if(l<3){const i=this._tileInfoView.getTileParentId(e.id);if(i){const s=new u(i),r=await this.fetchTile(s,{...t,resamplingLevel:l+1});return n(this._tileInfoView,r,s,e)}}throw c}const a=new u(0,0,0,0);let h;try{if(await s.fetchAvailabilityUpsample(e.level,e.row,e.col,a,{signal:r}),a.level!==e.level&&!this.resampling)return o(this._tileInfoView.tileInfo.size);h=await this._fetchImage(a,r)}catch(c){if(i(c))throw c;h=await this._fetchImage(e,r)}return this.resampling?n(this._tileInfoView,h,a,e):h}async _enqueueTileFetch(e){if(!this._fetchQueue.has(e.key.id)){try{const t=await this._fetchQueue.push(e.key);e.bitmap.source=t,e.bitmap.width=this._tileInfoView.tileInfo.size[0],e.bitmap.height=this._tileInfoView.tileInfo.size[1],e.once("attach",(()=>this.requestUpdate()))}catch(s){i(s)||t.getLogger(this.declaredClass).error(s)}this.requestUpdate()}}async _fetchImage(e,t){return this.layer.fetchTile(e.level,e.row,e.col,{signal:t})}};e([r()],_.prototype,"resampling",null),_=e([l("esri.views.2d.layers.TileLayerView2D")],_);const I=_;export{I as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Graphic.js";import i from"../../../core/Error.js";import{clone as s}from"../../../core/lang.js";import r from"../../../core/Logger.js";import{isNone as a}from"../../../core/maybe.js";import{isAbortError as l}from"../../../core/promiseUtils.js";import{init as o}from"../../../core/watchUtils.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as h}from"../../../core/accessorSupport/decorators/subclass.js";import{diff as u,hasDiff as c}from"../../../core/accessorSupport/diffUtils.js";import{create as y}from"../../../geometry/support/aaBoundingRect.js";import{StyleUpdateType as d}from"../engine/vectorTiles/enums.js";import{TileHandler as p}from"../engine/vectorTiles/TileHandler.js";import{TileManager as _}from"../engine/vectorTiles/TileManager.js";import{VectorTile as f}from"../engine/vectorTiles/VectorTile.js";import{VectorTileContainer as g}from"../engine/vectorTiles/VectorTileContainer.js";import{drawColliders as m}from"../engine/vectorTiles/decluttering/debugging.js";import{StyleLayerType as T}from"../engine/vectorTiles/style/StyleDefinition.js";import C from"../engine/vectorTiles/style/StyleRepository.js";import{LayerView2DMixin as v}from"./LayerView2D.js";import{Display as R}from"./support/Display.js";import w from"../tiling/TileInfoViewPOT.js";import H from"../tiling/TileQueue.js";import Q from"../../layers/LayerView.js";const D=r.getLogger("esri.views.2d.layers.VectorTileLayerView2D");let b=class extends(v(Q)){constructor(){super(...arguments),this._styleChanges=[],this._fetchQueue=null,this._parseQueue=null,this._isTileHandlerReady=!1,this.fading=!1}initialize(){const e=this.layer.tileInfo;if(!(e&&e.spatialReference).equals(this.view.spatialReference))return void this.addResolvingPromise(Promise.reject(new i("layerview:spatial-reference-incompatible","The spatial reference of this layer does not meet the requirements of the view",{layer:this.layer})));const{style:t}=this.layer.currentStyleInfo;this._styleRepository=new C(t),this._tileInfoView=new w(this.layer.tileInfo,this.layer.fullExtent),this._vectorTileContainer=new g(this._tileInfoView),this._tileHandler=new p(this.layer,this._styleRepository,window.devicePixelRatio||1),this.container.addChild(this._vectorTileContainer),this.handles.add([this._vectorTileContainer.on("fade-start",(()=>{this.fading=!0,this.notifyChange("updating"),this.requestUpdate()})),this._vectorTileContainer.on("fade-complete",(()=>{this._collisionBoxesDisplay&&this._collisionBoxesDisplay.requestRender(),this.fading=!1,this.notifyChange("updating"),this.requestUpdate()})),o(this.layer,"symbolCollisionBoxesVisible",(e=>{e?(this._collisionBoxesDisplay=new R({render:e=>this._renderCollisionBoxes(e.context)}),this.container.addChild(this._collisionBoxesDisplay)):(this.container.removeChild(this._collisionBoxesDisplay),this._collisionBoxesDisplay=null)}))])}destroy(){var e;this._stop(),this.container.removeAllChildren(),this._vectorTileContainer&&(this._vectorTileContainer.destroy(),this._vectorTileContainer=null),null==(e=this._tileHandler)||e.destroy(),this._tileHandler=null}async hitTest(e,i){if(!this._tileHandlerPromise)return null;await this._tileHandlerPromise;const s=await this._vectorTileContainer.hitTest(i);if(!s||0===s.length)return null;const r=s[0]-1,a=this._styleRepository,l=a.getStyleLayerByUID(r);if(!l)return null;const o=a.getStyleLayerIndex(l.id),n=new t({attributes:{layerId:o,layerName:l.id,layerUID:r}});return n.layer=this.layer,n.sourceLayer=this.layer,[n]}update(e){if(this._tileHandlerPromise&&this._isTileHandlerReady)return e.pixelRatio!==this._tileHandler.devicePixelRatio?(this._start(),void(this._tileHandler.devicePixelRatio=e.pixelRatio)):void(this._styleChanges.length>0?this._tileHandlerPromise=this._applyStyleChanges():(this._fetchQueue.pause(),this._parseQueue.pause(),this._fetchQueue.state=e.state,this._parseQueue.state=e.state,this._tileManager.update(e)||this.requestUpdate(),this._parseQueue.resume(),this._fetchQueue.resume()))}attach(){this._start(),this.handles.add([this.layer.on("paint-change",(e=>{if(e.isDataDriven)this._styleChanges.push({type:d.PAINTER_CHANGED,data:e}),this.notifyChange("updating"),this.requestUpdate();else{const t=this._styleRepository,i=t.getLayerById(e.layer);if(!i)return;const s=i.type===T.SYMBOL;t.setPaintProperties(e.layer,e.paint),s&&this._vectorTileContainer.restartDeclutter(),this._vectorTileContainer.requestRender()}})),this.layer.on("layout-change",(e=>{const t=this._styleRepository,i=t.getLayerById(e.layer);if(!i)return;const s=u(i.layout,e.layout);if(!a(s)){if(c(s,"visibility")&&1===j(s))return t.setLayoutProperties(e.layer,e.layout),i.type===T.SYMBOL&&this._vectorTileContainer.restartDeclutter(),void this._vectorTileContainer.requestRender();this._styleChanges.push({type:d.LAYOUT_CHANGED,data:e}),this.notifyChange("updating"),this.requestUpdate()}})),this.layer.on("style-layer-visibility-change",(e=>{const t=this._styleRepository,i=t.getLayerById(e.layer);i&&(t.setStyleLayerVisibility(e.layer,e.visibility),i.type===T.SYMBOL&&this._vectorTileContainer.restartDeclutter(),this._vectorTileContainer.requestRender())})),this.layer.on("style-layer-change",(e=>{this._styleChanges.push({type:d.LAYER_CHANGED,data:e}),this.notifyChange("updating"),this.requestUpdate()})),this.layer.on("delete-style-layer",(e=>{this._styleChanges.push({type:d.LAYER_REMOVED,data:e}),this.notifyChange("updating"),this.requestUpdate()})),this.layer.on("load-style",(()=>this._loadStyle()))],this.declaredClass)}detach(){this._stop(),this.handles.remove(this.declaredClass)}moveStart(){this.requestUpdate()}viewChange(){this.requestUpdate()}moveEnd(){this._collisionBoxesDisplay&&this._vectorTileContainer.restartDeclutter(),this.requestUpdate()}canResume(){let e=super.canResume();const t=this.layer;if(e&&t.currentStyleInfo){const i=this.view.scale,s=t.currentStyleInfo;if(s&&s.layerDefinition){const t=s.layerDefinition;t.minScale&&t.minScale<i&&(e=!1),t.maxScale&&t.maxScale>i&&(e=!1)}}return e}isUpdating(){const e=this._vectorTileContainer.children;return!this._isTileHandlerReady||!this._fetchQueue||!this._parseQueue||this._fetchQueue.updating||this._parseQueue.updating||e.length>0&&e.filter((e=>e.invalidating)).length>0||this.fading}acquireTile(e){const t=this._createVectorTile(e);return this._tileHandlerPromise.then((()=>{this._fetchQueue.push(t.key).then((e=>this._parseQueue.push({key:t.key,data:e}))).then((e=>{t.once("attach",(()=>this.requestUpdate())),t.setData(e),this.requestUpdate(),this.notifyChange("updating")})).catch((e=>{this.notifyChange("updating"),l(e)||D.error(e)}))})),t}releaseTile(e){const t=e.key.id;this._fetchQueue.abort(t),this._parseQueue.abort(t),this.requestUpdate()}_start(){if(this._stop(),this._tileManager=new _({acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView},this._vectorTileContainer),!this.layer.currentStyleInfo)return;const e=new AbortController,t=this._tileHandler.start({signal:e.signal}).then((()=>{this._fetchQueue=new H({tileInfoView:this._tileInfoView,process:(e,t)=>this._getTileData(e,t),concurrency:15}),this._parseQueue=new H({tileInfoView:this._tileInfoView,process:(e,t)=>this._parseTileData(e,t),concurrency:8}),this.requestUpdate(),this._isTileHandlerReady=!0}));this._tileHandler.spriteMosaic.then((e=>{this._vectorTileContainer.setStyleResources(e,this._tileHandler.glyphMosaic,this._styleRepository),this.requestUpdate()})),this._tileHandlerAbortController=e,this._tileHandlerPromise=t}_stop(){if(!this._tileHandlerAbortController||!this._vectorTileContainer)return;const e=this._tileHandlerAbortController;e&&e.abort(),this._tileHandlerPromise=null,this._isTileHandlerReady=!1,this._fetchQueue&&(this._fetchQueue.destroy(),this._fetchQueue=null),this._parseQueue&&(this._parseQueue.destroy(),this._parseQueue=null),this._tileManager&&(this._tileManager.destroy(),this._tileManager=null),this._vectorTileContainer.removeAllChildren()}async _getTileData(e,t){const i=await this._tileHandler.fetchTileData(e,t);return this.notifyChange("updating"),i}async _parseTileData(e,t){return this._tileHandler.parseTileData(e,t)}async _applyStyleChanges(){this._isTileHandlerReady=!1,this._fetchQueue.pause(),this._parseQueue.pause(),this._fetchQueue.clear(),this._parseQueue.clear(),this._tileManager.clearCache();const e=this._styleChanges;try{await this._tileHandler.updateStyle(e)}catch(l){D.error("error applying vector-tiles style update",l.message),this._fetchQueue.resume(),this._parseQueue.resume(),this._isTileHandlerReady=!0}const t=this._styleRepository,i=[];e.forEach((e=>{if(e.type!==d.LAYER_REMOVED)return;const s=e.data,r=t.getLayerById(s.layer);r&&i.push(r.uid)}));const s=[];let r;e.forEach((e=>{const i=e.type,a=e.data;switch(i){case d.PAINTER_CHANGED:t.setPaintProperties(a.layer,a.paint),r=a.layer;break;case d.LAYOUT_CHANGED:t.setLayoutProperties(a.layer,a.layout),r=a.layer;break;case d.LAYER_REMOVED:return void t.deleteStyleLayer(a.layer);case d.LAYER_CHANGED:t.setStyleLayer(a.layer,a.index),r=a.layer.id}const l=t.getLayerById(r);l&&s.push(l.uid)}));const a=this._vectorTileContainer.children;if(i.length>0){this._vectorTileContainer.deleteStyleLayers(i);for(const e of a)e.deleteLayerData(i)}if(this._fetchQueue.resume(),this._parseQueue.resume(),s.length>0){const e=[];for(const t of a){const i=this._fetchQueue.push(t.key).then((e=>this._parseQueue.push({key:t.key,data:e,styleLayerUIDs:s}))).then((e=>t.setData(e)));e.push(i)}await Promise.all(e)}this._styleChanges=[],this._isTileHandlerReady=!0,this.notifyChange("updating"),this.requestUpdate()}async _loadStyle(){const{style:e}=this.layer.currentStyleInfo,t=s(e);this._isTileHandlerReady=!1,this._fetchQueue.pause(),this._parseQueue.pause(),this._fetchQueue.clear(),this._parseQueue.clear(),this.notifyChange("updating"),this._styleRepository=new C(t),this._vectorTileContainer.destroy(),this._tileManager.clear(),this._tileHandlerAbortController.abort(),this._tileHandlerAbortController=new AbortController;const{signal:i}=this._tileHandlerAbortController;try{this._tileHandlerPromise=this._tileHandler.setStyle(this._styleRepository,t),await this._tileHandlerPromise}catch(a){if(!l(a))throw a}if(i.aborted)return this._fetchQueue.resume(),this._parseQueue.resume(),this._isTileHandlerReady=!0,this.notifyChange("updating"),void this.requestUpdate();const r=await this._tileHandler.spriteMosaic;this._vectorTileContainer.setStyleResources(r,this._tileHandler.glyphMosaic,this._styleRepository),this._fetchQueue.resume(),this._parseQueue.resume(),this._isTileHandlerReady=!0,this.notifyChange("updating"),this.requestUpdate()}_createVectorTile(e){const t=this._tileInfoView.getTileBounds(y(),e);return new f(e,t[0],t[3],512,512,this._styleRepository)}_renderCollisionBoxes(e){for(const t of this._vectorTileContainer.children)if(t.symbols){const i=[];for(const[e,s]of t.symbols)i.push(...s);m(e,i)}}};function j(e){if(a(e))return 0;switch(e.type){case"partial":return Object.keys(e.diff).length;case"complete":return Math.max(Object.keys(e.oldValue).length,Object.keys(e.newValue).length);case"collection":return Object.keys(e.added).length+Object.keys(e.changed).length+Object.keys(e.removed).length}}e([n()],b.prototype,"_fetchQueue",void 0),e([n()],b.prototype,"_parseQueue",void 0),e([n()],b.prototype,"_isTileHandlerReady",void 0),e([n()],b.prototype,"fading",void 0),b=e([h("esri.views.2d.layers.VectorTileLayerView2D")],b);const S=b;export{S as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Graphic.js";import{clone as i}from"../../../core/lang.js";import s from"../../../core/Logger.js";import{isNone as r}from"../../../core/maybe.js";import{isAbortError as a}from"../../../core/promiseUtils.js";import{watch as l,initial as n}from"../../../core/reactiveUtils.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as h}from"../../../core/accessorSupport/decorators/subclass.js";import{diff as u,hasDiff as c}from"../../../core/accessorSupport/diffUtils.js";import{create as y}from"../../../geometry/support/aaBoundingRect.js";import{StyleUpdateType as d}from"../engine/vectorTiles/enums.js";import{TileHandler as p}from"../engine/vectorTiles/TileHandler.js";import{TileManager as _}from"../engine/vectorTiles/TileManager.js";import{VectorTile as f}from"../engine/vectorTiles/VectorTile.js";import{VectorTileContainer as g}from"../engine/vectorTiles/VectorTileContainer.js";import{drawColliders as m}from"../engine/vectorTiles/decluttering/debugging.js";import{StyleLayerType as T}from"../engine/vectorTiles/style/StyleDefinition.js";import C from"../engine/vectorTiles/style/StyleRepository.js";import{LayerView2DMixin as v}from"./LayerView2D.js";import{Display as R}from"./support/Display.js";import H from"../tiling/TileInfoViewPOT.js";import Q from"../tiling/TileQueue.js";import w from"../../layers/LayerView.js";const D=s.getLogger("esri.views.2d.layers.VectorTileLayerView2D");let b=class extends(v(w)){constructor(){super(...arguments),this._styleChanges=[],this._fetchQueue=null,this._parseQueue=null,this._isTileHandlerReady=!1,this.fading=!1}async hitTest(e,i){if(!this._tileHandlerPromise)return null;await this._tileHandlerPromise;const s=await this._vectorTileContainer.hitTest(i);if(!s||0===s.length)return null;const r=s[0]-1,a=this._styleRepository,l=a.getStyleLayerByUID(r);if(!l)return null;const n=a.getStyleLayerIndex(l.id),o=new t({attributes:{layerId:n,layerName:l.id,layerUID:r}});return o.layer=this.layer,o.sourceLayer=this.layer,[o]}update(e){if(this._tileHandlerPromise&&this._isTileHandlerReady)return e.pixelRatio!==this._tileHandler.devicePixelRatio?(this._start(),void(this._tileHandler.devicePixelRatio=e.pixelRatio)):void(this._styleChanges.length>0?this._tileHandlerPromise=this._applyStyleChanges():(this._fetchQueue.pause(),this._parseQueue.pause(),this._fetchQueue.state=e.state,this._parseQueue.state=e.state,this._tileManager.update(e)||this.requestUpdate(),this._parseQueue.resume(),this._fetchQueue.resume()))}attach(){const{style:e}=this.layer.currentStyleInfo;this._styleRepository=new C(e),this._tileInfoView=new H(this.layer.tileInfo,this.layer.fullExtent),this._vectorTileContainer=new g(this._tileInfoView),this._tileHandler=new p(this.layer,this._styleRepository,window.devicePixelRatio||1),this.container.addChild(this._vectorTileContainer),this._start(),this.handles.add([this._vectorTileContainer.on("fade-start",(()=>{this.fading=!0,this.notifyChange("updating"),this.requestUpdate()})),this._vectorTileContainer.on("fade-complete",(()=>{var e;null==(e=this._collisionBoxesDisplay)||e.requestRender(),this.fading=!1,this.notifyChange("updating"),this.requestUpdate()})),l((()=>this.layer.symbolCollisionBoxesVisible),(e=>{e?(this._collisionBoxesDisplay=new R({render:e=>this._renderCollisionBoxes(e.context)}),this.container.addChild(this._collisionBoxesDisplay)):(this.container.removeChild(this._collisionBoxesDisplay),this._collisionBoxesDisplay=null)}),n),this.layer.on("paint-change",(e=>{if(e.isDataDriven)this._styleChanges.push({type:d.PAINTER_CHANGED,data:e}),this.notifyChange("updating"),this.requestUpdate();else{const t=this._styleRepository,i=t.getLayerById(e.layer);if(!i)return;const s=i.type===T.SYMBOL;t.setPaintProperties(e.layer,e.paint),s&&this._vectorTileContainer.restartDeclutter(),this._vectorTileContainer.requestRender()}})),this.layer.on("layout-change",(e=>{const t=this._styleRepository,i=t.getLayerById(e.layer);if(!i)return;const s=u(i.layout,e.layout);if(!r(s)){if(c(s,"visibility")&&1===L(s))return t.setLayoutProperties(e.layer,e.layout),i.type===T.SYMBOL&&this._vectorTileContainer.restartDeclutter(),void this._vectorTileContainer.requestRender();this._styleChanges.push({type:d.LAYOUT_CHANGED,data:e}),this.notifyChange("updating"),this.requestUpdate()}})),this.layer.on("style-layer-visibility-change",(e=>{const t=this._styleRepository,i=t.getLayerById(e.layer);i&&(t.setStyleLayerVisibility(e.layer,e.visibility),i.type===T.SYMBOL&&this._vectorTileContainer.restartDeclutter(),this._vectorTileContainer.requestRender())})),this.layer.on("style-layer-change",(e=>{this._styleChanges.push({type:d.LAYER_CHANGED,data:e}),this.notifyChange("updating"),this.requestUpdate()})),this.layer.on("delete-style-layer",(e=>{this._styleChanges.push({type:d.LAYER_REMOVED,data:e}),this.notifyChange("updating"),this.requestUpdate()})),this.layer.on("load-style",(()=>this._loadStyle()))],this.declaredClass)}detach(){var e,t;this._stop(),this.container.removeAllChildren(),null==(e=this._vectorTileContainer)||e.destroy(),this._vectorTileContainer=null,null==(t=this._tileHandler)||t.destroy(),this._tileHandler=null,this.handles.remove(this.declaredClass)}moveStart(){this.requestUpdate()}viewChange(){this.requestUpdate()}moveEnd(){this._collisionBoxesDisplay&&this._vectorTileContainer.restartDeclutter(),this.requestUpdate()}supportsSpatialReference(e){var t;const i=null==(t=this.layer.tileInfo)?void 0:t.spatialReference;return e.equals(i)}canResume(){let e=super.canResume();const{currentStyleInfo:t}=this.layer;if(e&&null!=t&&t.layerDefinition){const i=this.view.scale,{minScale:s,maxScale:r}=t.layerDefinition;t&&t.layerDefinition&&(s&&s<i&&(e=!1),r&&r>i&&(e=!1))}return e}isUpdating(){const e=this._vectorTileContainer.children;return!this._isTileHandlerReady||!this._fetchQueue||!this._parseQueue||this._fetchQueue.updating||this._parseQueue.updating||e.length>0&&e.filter((e=>e.invalidating)).length>0||this.fading}acquireTile(e){const t=this._createVectorTile(e);return this._tileHandlerPromise.then((()=>{this._fetchQueue.push(t.key).then((e=>this._parseQueue.push({key:t.key,data:e}))).then((e=>{t.once("attach",(()=>this.requestUpdate())),t.setData(e),this.requestUpdate(),this.notifyChange("updating")})).catch((e=>{this.notifyChange("updating"),a(e)||D.error(e)}))})),t}releaseTile(e){const t=e.key.id;this._fetchQueue.abort(t),this._parseQueue.abort(t),this.requestUpdate()}_start(){if(this._stop(),this._tileManager=new _({acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView},this._vectorTileContainer),!this.layer.currentStyleInfo)return;const e=new AbortController,t=this._tileHandler.start({signal:e.signal}).then((()=>{this._fetchQueue=new Q({tileInfoView:this._tileInfoView,process:(e,t)=>this._getTileData(e,t),concurrency:15}),this._parseQueue=new Q({tileInfoView:this._tileInfoView,process:(e,t)=>this._parseTileData(e,t),concurrency:8}),this.requestUpdate(),this._isTileHandlerReady=!0}));this._tileHandler.spriteMosaic.then((e=>{this._vectorTileContainer.setStyleResources(e,this._tileHandler.glyphMosaic,this._styleRepository),this.requestUpdate()})),this._tileHandlerAbortController=e,this._tileHandlerPromise=t}_stop(){if(!this._tileHandlerAbortController||!this._vectorTileContainer)return;const e=this._tileHandlerAbortController;e&&e.abort(),this._tileHandlerPromise=null,this._isTileHandlerReady=!1,this._fetchQueue&&(this._fetchQueue.destroy(),this._fetchQueue=null),this._parseQueue&&(this._parseQueue.destroy(),this._parseQueue=null),this._tileManager&&(this._tileManager.destroy(),this._tileManager=null),this._vectorTileContainer.removeAllChildren()}async _getTileData(e,t){const i=await this._tileHandler.fetchTileData(e,t);return this.notifyChange("updating"),i}async _parseTileData(e,t){return this._tileHandler.parseTileData(e,t)}async _applyStyleChanges(){this._isTileHandlerReady=!1,this._fetchQueue.pause(),this._parseQueue.pause(),this._fetchQueue.clear(),this._parseQueue.clear(),this._tileManager.clearCache();const e=this._styleChanges;try{await this._tileHandler.updateStyle(e)}catch(l){D.error("error applying vector-tiles style update",l.message),this._fetchQueue.resume(),this._parseQueue.resume(),this._isTileHandlerReady=!0}const t=this._styleRepository,i=[];e.forEach((e=>{if(e.type!==d.LAYER_REMOVED)return;const s=e.data,r=t.getLayerById(s.layer);r&&i.push(r.uid)}));const s=[];let r;e.forEach((e=>{const i=e.type,a=e.data;switch(i){case d.PAINTER_CHANGED:t.setPaintProperties(a.layer,a.paint),r=a.layer;break;case d.LAYOUT_CHANGED:t.setLayoutProperties(a.layer,a.layout),r=a.layer;break;case d.LAYER_REMOVED:return void t.deleteStyleLayer(a.layer);case d.LAYER_CHANGED:t.setStyleLayer(a.layer,a.index),r=a.layer.id}const l=t.getLayerById(r);l&&s.push(l.uid)}));const a=this._vectorTileContainer.children;if(i.length>0){this._vectorTileContainer.deleteStyleLayers(i);for(const e of a)e.deleteLayerData(i)}if(this._fetchQueue.resume(),this._parseQueue.resume(),s.length>0){const e=[];for(const t of a){const i=this._fetchQueue.push(t.key).then((e=>this._parseQueue.push({key:t.key,data:e,styleLayerUIDs:s}))).then((e=>t.setData(e)));e.push(i)}await Promise.all(e)}this._styleChanges=[],this._isTileHandlerReady=!0,this.notifyChange("updating"),this.requestUpdate()}async _loadStyle(){const{style:e}=this.layer.currentStyleInfo,t=i(e);this._isTileHandlerReady=!1,this._fetchQueue.pause(),this._parseQueue.pause(),this._fetchQueue.clear(),this._parseQueue.clear(),this.notifyChange("updating"),this._styleRepository=new C(t),this._vectorTileContainer.destroy(),this._tileManager.clear(),this._tileHandlerAbortController.abort(),this._tileHandlerAbortController=new AbortController;const{signal:s}=this._tileHandlerAbortController;try{this._tileHandlerPromise=this._tileHandler.setStyle(this._styleRepository,t),await this._tileHandlerPromise}catch(l){if(!a(l))throw l}if(s.aborted)return this._fetchQueue.resume(),this._parseQueue.resume(),this._isTileHandlerReady=!0,this.notifyChange("updating"),void this.requestUpdate();const r=await this._tileHandler.spriteMosaic;this._vectorTileContainer.setStyleResources(r,this._tileHandler.glyphMosaic,this._styleRepository),this._fetchQueue.resume(),this._parseQueue.resume(),this._isTileHandlerReady=!0,this.notifyChange("updating"),this.requestUpdate()}_createVectorTile(e){const t=this._tileInfoView.getTileBounds(y(),e);return new f(e,t[0],t[3],512,512,this._styleRepository)}_renderCollisionBoxes(e){for(const t of this._vectorTileContainer.children)if(t.symbols){const i=[];for(const[e,s]of t.symbols)i.push(...s);m(e,i)}}};function L(e){if(r(e))return 0;switch(e.type){case"partial":return Object.keys(e.diff).length;case"complete":return Math.max(Object.keys(e.oldValue).length,Object.keys(e.newValue).length);case"collection":return Object.keys(e.added).length+Object.keys(e.changed).length+Object.keys(e.removed).length}}e([o()],b.prototype,"_fetchQueue",void 0),e([o()],b.prototype,"_parseQueue",void 0),e([o()],b.prototype,"_isTileHandlerReady",void 0),e([o()],b.prototype,"fading",void 0),b=e([h("esri.views.2d.layers.VectorTileLayerView2D")],b);const j=b;export{j as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Error.js";import r from"../../../core/Logger.js";import{isAbortError as i}from"../../../core/promiseUtils.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as a}from"../../../core/accessorSupport/decorators/subclass.js";import o from"../../../geometry/Extent.js";import{BitmapContainer as n}from"../engine/BitmapContainer.js";import{LayerView2DMixin as p}from"./LayerView2D.js";import m from"./support/ExportStrategy.js";import h from"../../layers/LayerView.js";import{RefreshableLayerView as c}from"../../layers/RefreshableLayerView.js";import{WMSLayerView as d}from"../../layers/WMSLayerView.js";const l=r.getLogger("esri.views.2d.layers.WMSLayerView2D");let y=class extends(d(c(p(h)))){initialize(){const{layer:e,view:r}=this;e.supportsSpatialReference(r.spatialReference)||this.addResolvingPromise(Promise.reject(new t("layerview:spatial-reference-incompatible","The spatial references supported by this WMS layer are incompatible with the spatial reference of the view",{layer:e})))}update(e){this.strategy.update(e).catch((e=>{i(e)||l.error(e)}))}attach(){const{layer:e}=this,{imageMaxHeight:t,imageMaxWidth:r}=e;this._bitmapContainer=new n,this.container.addChild(this._bitmapContainer),this.strategy=new m({container:this._bitmapContainer,fetchSource:this.fetchImage.bind(this),requestUpdate:this.requestUpdate.bind(this),imageMaxHeight:t,imageMaxWidth:r,imageRotationSupported:!1,imageNormalizationSupported:!1,hidpi:!1}),this.handles.add(this.watch("exportImageVersion",(()=>this.requestUpdate())),"exportImageVersion")}detach(){this.handles.remove("exportImageVersion"),this.strategy.destroy(),this.container.removeChild(this._bitmapContainer),this._bitmapContainer.removeAllChildren()}moveStart(){}viewChange(){}moveEnd(){this.requestUpdate()}createFetchPopupFeaturesQuery(e){const{view:t}=this,r=this._bitmapContainer,{x:i,y:s}=e,{spatialReference:a}=t;let n=null,p=0,m=0;if(r.children.some((e=>{const{width:t,height:r,resolution:h,x:c,y:d}=e,l=c+h*t,y=d-h*r;return i>=c&&i<=l&&s<=d&&s>=y&&(n=new o({xmin:c,ymin:y,xmax:l,ymax:d,spatialReference:a}),p=t,m=r,!0)})),!n)return null;const h=n.width/p,c=Math.round((i-n.xmin)/h),d=Math.round((n.ymax-s)/h);return{extent:n,width:p,height:m,x:c,y:d}}async doRefresh(){this.requestUpdate()}isUpdating(){return this.strategy.updating||this.updateRequested}fetchImage(e,t,r,i){return this.layer.fetchImage(e,t,r,{timeExtent:this.timeExtent,...i})}};e([s()],y.prototype,"strategy",void 0),e([s()],y.prototype,"updating",void 0),y=e([a("esri.views.2d.layers.WMSLayerView2D")],y);const u=y;export{u as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Logger.js";import{isAbortError as r}from"../../../core/promiseUtils.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import a from"../../../geometry/Extent.js";import{BitmapContainer as o}from"../engine/BitmapContainer.js";import{LayerView2DMixin as n}from"./LayerView2D.js";import p from"./support/ExportStrategy.js";import m from"../../layers/LayerView.js";import{RefreshableLayerView as h}from"../../layers/RefreshableLayerView.js";import{WMSLayerView as d}from"../../layers/WMSLayerView.js";const c=t.getLogger("esri.views.2d.layers.WMSLayerView2D");let u=class extends(d(h(n(m)))){supportsSpatialReference(e){return this.layer.supportsSpatialReference(e)}update(e){this.strategy.update(e).catch((e=>{r(e)||c.error(e)}))}attach(){const{layer:e}=this,{imageMaxHeight:t,imageMaxWidth:r}=e;this._bitmapContainer=new o,this.container.addChild(this._bitmapContainer),this.strategy=new p({container:this._bitmapContainer,fetchSource:this.fetchImage.bind(this),requestUpdate:this.requestUpdate.bind(this),imageMaxHeight:t,imageMaxWidth:r,imageRotationSupported:!1,imageNormalizationSupported:!1,hidpi:!1}),this.handles.add(this.watch("exportImageVersion",(()=>this.requestUpdate())),"exportImageVersion")}detach(){this.handles.remove("exportImageVersion"),this.strategy.destroy(),this.container.removeChild(this._bitmapContainer),this._bitmapContainer.removeAllChildren()}moveStart(){}viewChange(){}moveEnd(){this.requestUpdate()}createFetchPopupFeaturesQuery(e){const{view:t}=this,r=this._bitmapContainer,{x:i,y:s}=e,{spatialReference:o}=t;let n=null,p=0,m=0;if(r.children.some((e=>{const{width:t,height:r,resolution:h,x:d,y:c}=e,u=d+h*t,l=c-h*r;return i>=d&&i<=u&&s<=c&&s>=l&&(n=new a({xmin:d,ymin:l,xmax:u,ymax:c,spatialReference:o}),p=t,m=r,!0)})),!n)return null;const h=n.width/p,d=Math.round((i-n.xmin)/h),c=Math.round((n.ymax-s)/h);return{extent:n,width:p,height:m,x:d,y:c}}async doRefresh(){this.requestUpdate()}isUpdating(){return this.strategy.updating||this.updateRequested}fetchImage(e,t,r,i){return this.layer.fetchImage(e,t,r,{timeExtent:this.timeExtent,...i})}};e([i()],u.prototype,"strategy",void 0),e([i()],u.prototype,"updating",void 0),u=e([s("esri.views.2d.layers.WMSLayerView2D")],u);const l=u;export{l as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Logger.js";import{isAbortError as i}from"../../../core/promiseUtils.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as r}from"../../../core/accessorSupport/decorators/subclass.js";import{BitmapTileLayerView2D as a}from"./BitmapTileLayerView2D.js";import{LayerView2DMixin as l}from"./LayerView2D.js";import{resampleImage as h}from"./support/imageUtils.js";import o from"../tiling/TileInfoView.js";import n from"../tiling/TileKey.js";import c from"../tiling/TileQueue.js";import u from"../tiling/TileStrategy.js";import f from"../../layers/LayerView.js";import{RefreshableLayerView as p}from"../../layers/RefreshableLayerView.js";const d=[102113,102100,3857,3785,900913],y=[0,0],m=t.getLogger("esri.views.2d.layers.WMTSLayerView2D");let w=class extends(p(a(l(f)))){constructor(){super(...arguments),this._tileStrategy=null,this._fetchQueue=null,this._tileRequests=new Map,this.layer=null}get tileMatrixSet(){if(this.layer.activeLayer.tileMatrixSetId)return this.layer.activeLayer.tileMatrixSet;const e=this._getTileMatrixSetBySpatialReference(this.layer.activeLayer);return e?(this.layer.activeLayer.tileMatrixSetId=e.id,e):null}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume(),this.notifyChange("updating")}attach(){if(!this.tileMatrixSet)return;const{tileInfo:e}=this.tileMatrixSet;this._tileInfoView=new o(e),this._fetchQueue=new c({tileInfoView:this._tileInfoView,concurrency:16,process:(e,t)=>this.fetchTile(e,t)}),this._tileStrategy=new u({cachePolicy:"keep",resampling:!0,acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView}),this.handles.add(this.watch(["layer.activeLayer.styleId","tileMatrixSet"],(()=>this._refresh())),this.declaredClass),super.attach()}detach(){var e,t;super.detach(),this.handles.remove(this.declaredClass),null==(e=this._tileStrategy)||e.destroy(),null==(t=this._fetchQueue)||t.destroy(),this._fetchQueue=this._tileStrategy=this._tileInfoView=null}moveStart(){this.requestUpdate()}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}releaseTile(e){this._fetchQueue.abort(e.key.id),this._bitmapView.removeChild(e),e.once("detach",(()=>e.destroy())),this.requestUpdate()}acquireTile(e){const t=this._bitmapView.createTile(e),i=t.bitmap;return[i.x,i.y]=this._tileInfoView.getTileCoords(y,t.key),i.resolution=this._tileInfoView.getTileResolution(t.key),[i.width,i.height]=this._tileInfoView.tileInfo.size,this._enqueueTileFetch(t),this._bitmapView.addChild(t),this.requestUpdate(),t}async doRefresh(){this.updateRequested||this.suspended||this._refresh()}isUpdating(){return this._fetchQueue.length>0}async fetchTile(e,t={}){const s="tilemapCache"in this.layer?this.layer.tilemapCache:null,{signal:r,resamplingLevel:a=0}=t;if(!s)return this._fetchImage(e,r);const l=new n(0,0,0,0);let o;try{await s.fetchAvailabilityUpsample(e.level,e.row,e.col,l,{signal:r}),o=await this._fetchImage(l,r)}catch(c){if(i(c))throw c;if(a<3){const i=this._tileInfoView.getTileParentId(e.id);if(i){const s=new n(i),r=await this.fetchTile(s,{...t,resamplingLevel:a+1});return h(this._tileInfoView,r,s,e)}}throw c}return h(this._tileInfoView,o,l,e)}canResume(){const e=super.canResume();return e?null!==this.tileMatrixSet:e}async _enqueueTileFetch(e){if(!this._fetchQueue.has(e.key.id)){try{const t=await this._fetchQueue.push(e.key);e.bitmap.source=t,e.bitmap.width=this._tileInfoView.tileInfo.size[0],e.bitmap.height=this._tileInfoView.tileInfo.size[1],e.once("attach",(()=>this.requestUpdate()))}catch(t){i(t)||m.error(t)}this.requestUpdate()}}async _fetchImage(e,t){return this.layer.fetchTile(e.level,e.row,e.col,{signal:t})}_refresh(){this._fetchQueue.reset(),this._tileStrategy.tiles.forEach((e=>{if(!e.bitmap.source)return;const t={id:e.key.id,fulfilled:!1,promise:this._fetchQueue.push(e.key).then((t=>{e.bitmap.source=t})).catch((t=>{i(t)||(e.bitmap.source=null)})).finally((()=>{e.requestRender(),this.notifyChange("updating"),t.fulfilled=!0}))};this._tileRequests.set(e,t)})),this.notifyChange("updating")}_getTileMatrixSetBySpatialReference(e){const t=this.view.spatialReference;if(!e.tileMatrixSets)return null;let i=e.tileMatrixSets.find((e=>e.tileInfo.spatialReference.wkid===t.wkid));return!i&&t.isWebMercator&&(i=e.tileMatrixSets.find((e=>d.indexOf(e.tileInfo.spatialReference.wkid)>-1))),i}};e([s()],w.prototype,"suspended",void 0),e([s({readOnly:!0})],w.prototype,"tileMatrixSet",null),w=e([r("esri.views.2d.layers.WMTSLayerView2D")],w);const _=w;export{_ as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Logger.js";import{isAbortError as i}from"../../../core/promiseUtils.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as r}from"../../../core/accessorSupport/decorators/subclass.js";import{BitmapTileLayerView2D as a}from"./BitmapTileLayerView2D.js";import{LayerView2DMixin as l}from"./LayerView2D.js";import{resampleImage as h}from"./support/imageUtils.js";import o from"../tiling/TileInfoView.js";import n from"../tiling/TileKey.js";import c from"../tiling/TileQueue.js";import u from"../tiling/TileStrategy.js";import f from"../../layers/LayerView.js";import{RefreshableLayerView as p}from"../../layers/RefreshableLayerView.js";const d=[102113,102100,3857,3785,900913],y=[0,0],m=t.getLogger("esri.views.2d.layers.WMTSLayerView2D");let w=class extends(p(a(l(f)))){constructor(){super(...arguments),this._tileStrategy=null,this._fetchQueue=null,this._tileRequests=new Map,this.layer=null}get tileMatrixSet(){if(this.layer.activeLayer.tileMatrixSetId)return this.layer.activeLayer.tileMatrixSet;const e=this._getTileMatrixSetBySpatialReference(this.layer.activeLayer);return e?(this.layer.activeLayer.tileMatrixSetId=e.id,e):null}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume(),this.notifyChange("updating")}attach(){if(!this.tileMatrixSet)return;const{tileInfo:e}=this.tileMatrixSet;this._tileInfoView=new o(e),this._fetchQueue=new c({tileInfoView:this._tileInfoView,concurrency:16,process:(e,t)=>this.fetchTile(e,t)}),this._tileStrategy=new u({cachePolicy:"keep",resampling:!0,acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView}),this.handles.add(this.watch(["layer.activeLayer.styleId","tileMatrixSet"],(()=>this._refresh())),this.declaredClass),super.attach()}detach(){var e,t;super.detach(),this.handles.remove(this.declaredClass),null==(e=this._tileStrategy)||e.destroy(),null==(t=this._fetchQueue)||t.destroy(),this._fetchQueue=this._tileStrategy=this._tileInfoView=null}moveStart(){this.requestUpdate()}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}releaseTile(e){this._fetchQueue.abort(e.key.id),this._bitmapView.removeChild(e),e.once("detach",(()=>e.destroy())),this.requestUpdate()}acquireTile(e){const t=this._bitmapView.createTile(e),i=t.bitmap;return[i.x,i.y]=this._tileInfoView.getTileCoords(y,t.key),i.resolution=this._tileInfoView.getTileResolution(t.key),[i.width,i.height]=this._tileInfoView.tileInfo.size,this._enqueueTileFetch(t),this._bitmapView.addChild(t),this.requestUpdate(),t}async doRefresh(){this.updateRequested||this.suspended||this._refresh()}isUpdating(){return this._fetchQueue.length>0}async fetchTile(e,t={}){const s="tilemapCache"in this.layer?this.layer.tilemapCache:null,{signal:r,resamplingLevel:a=0}=t;if(!s)return this._fetchImage(e,r);const l=new n(0,0,0,0);let o;try{await s.fetchAvailabilityUpsample(e.level,e.row,e.col,l,{signal:r}),o=await this._fetchImage(l,r)}catch(c){if(i(c))throw c;if(a<3){const i=this._tileInfoView.getTileParentId(e.id);if(i){const s=new n(i),r=await this.fetchTile(s,{...t,resamplingLevel:a+1});return h(this._tileInfoView,r,s,e)}}throw c}return h(this._tileInfoView,o,l,e)}canResume(){const e=super.canResume();return e?null!==this.tileMatrixSet:e}async _enqueueTileFetch(e){if(!this._fetchQueue.has(e.key.id)){try{const t=await this._fetchQueue.push(e.key);e.bitmap.source=t,e.bitmap.width=this._tileInfoView.tileInfo.size[0],e.bitmap.height=this._tileInfoView.tileInfo.size[1],e.once("attach",(()=>this.requestUpdate()))}catch(t){i(t)||m.error(t)}this.requestUpdate()}}async _fetchImage(e,t){return this.layer.fetchTile(e.level,e.row,e.col,{signal:t})}_refresh(){this._fetchQueue.reset(),this._tileStrategy.tiles.forEach((e=>{if(!e.bitmap.source)return;const t={id:e.key.id,fulfilled:!1,promise:this._fetchQueue.push(e.key).then((t=>{e.bitmap.source=t})).catch((t=>{i(t)||(e.bitmap.source=null)})).finally((()=>{e.requestRender(),this.notifyChange("updating"),t.fulfilled=!0}))};this._tileRequests.set(e,t)})),this.notifyChange("updating")}_getTileMatrixSetBySpatialReference(e){const t=this.view.spatialReference;if(!e.tileMatrixSets)return null;let i=e.tileMatrixSets.find((e=>e.tileInfo.spatialReference.wkid===t.wkid));return!i&&t.isWebMercator&&(i=e.tileMatrixSets.find((e=>d.indexOf(e.tileInfo.spatialReference.wkid)>-1))),i}};e([s({readOnly:!0})],w.prototype,"tileMatrixSet",null),w=e([r("esri.views.2d.layers.WMTSLayerView2D")],w);const _=w;export{_ as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../../../../core/Error.js";import e from"../../../../../core/has.js";import i from"../../../../../core/Logger.js";import{clamp as s}from"../../../../../core/mathUtils.js";import{isNone as r,isSome as a,mapMany as o,forEachSome as n,andThen as l,unwrap as h}from"../../../../../core/maybe.js";import{createResolver as c,isAbortError as u}from"../../../../../core/promiseUtils.js";import{diff as d}from"../../../../../core/accessorSupport/diffUtils.js";import p from"../../../../../layers/support/FieldsIndex.js";import{MAX_FILTERS as _,HIGHLIGHT_FLAG as g,ATTRIBUTE_DATA_VV as f,NAN_MAGIC_NUMBER as m,ATTRIBUTE_DATA_ANIMATION as y}from"../../../engine/webgl/definitions.js";import{DISPLAY_ID_TYPE_AGGREGATE as x,DISPLAY_ID_TYPE_FEATURE as b,getDisplayIdTexel as T,getDisplayIdType as z,getDisplayIdFilterMask as S}from"../../../engine/webgl/DisplayId.js";import{getPixelArrayCtor as w}from"../../../engine/webgl/Utils.js";import{createDebugLogger as A,DEBUG_ATTR_UPDATES as E}from"../../../engine/webgl/util/debug.js";import{getVisualVariableSizeValueRepresentationRatio as D}from"../tileRenderers/support/visualVariablesUtils.js";import{PixelType as k}from"../../../../webgl/enums.js";const U=i.getLogger("esri.views.layers.2d.features.support.AttributeStore"),F=A(E,U),B={sharedArrayBuffer:e("esri-shared-array-buffer"),atomics:e("esri-atomics")};function C(t,e){return i=>e(t(i))}class R{constructor(t,e,i,s){this.size=0,this.texelSize=4;const{pixelType:r,layout:a,textureOnly:o}=s;this.textureOnly=o||!1,this.pixelType=r,this._ctype=e,this.layout=a,this._resetRange(),this._shared=t,this.size=i,o||(this.data=this._initData(r,i,t,e))}get buffer(){return l(this.data,(t=>t.buffer))}unsetComponentAllTexels(t,e){const i=h(this.data);for(let s=0;s<this.size*this.size;s++)i[s*this.texelSize+t]&=~e;this.dirtyStart=0,this.dirtyEnd=this.size*this.size-1}setComponentAllTexels(t,e){const i=h(this.data);for(let s=0;s<this.size*this.size;s++)i[s*this.texelSize+t]|=255&e;this.dirtyStart=0,this.dirtyEnd=this.size*this.size-1}setComponent(t,e,i){const s=h(this.data);for(const r of i)s[r*this.texelSize+t]|=e,this.dirtyStart=Math.min(this.dirtyStart,r),this.dirtyEnd=Math.max(this.dirtyEnd,r)}setComponentTexel(t,e,i){h(this.data)[i*this.texelSize+t]|=e,this.dirtyStart=Math.min(this.dirtyStart,i),this.dirtyEnd=Math.max(this.dirtyEnd,i)}unsetComponentTexel(t,e,i){h(this.data)[i*this.texelSize+t]&=~e,this.dirtyStart=Math.min(this.dirtyStart,i),this.dirtyEnd=Math.max(this.dirtyEnd,i)}getData(t,e){const i=T(t);return h(this.data)[i*this.texelSize+e]}setData(t,e,i){const s=T(t),r=1<<e;0!=(this.layout&r)?(this.data[s*this.texelSize+e]=i,this.dirtyStart=Math.min(this.dirtyStart,s),this.dirtyEnd=Math.max(this.dirtyEnd,s)):U.error("mapview-attributes-store","Tried to set a value for a texel's readonly component")}lock(){this.pixelType===k.UNSIGNED_BYTE&&this._shared&&B.atomics&&"local"!==this._ctype&&Atomics.store(this.data,0,1)}unlock(){this.pixelType===k.UNSIGNED_BYTE&&this._shared&&B.atomics&&"local"!==this._ctype&&Atomics.store(this.data,0,0)}expand(t){if(this.size=t,!this.textureOnly){const e=this._initData(this.pixelType,t,this._shared,this._ctype),i=h(this.data);e.set(i),this.data=e}}toMessage(){const t=this.dirtyStart,e=this.dirtyEnd,i=this.texelSize;if(t>e)return null;this._resetRange();const s=!(this._shared||"local"===this._ctype),r=this.pixelType,a=this.layout,o=h(this.data);return{start:t,end:e,data:s&&o.slice(t*i,(e+1)*i)||null,pixelType:r,layout:a}}_initData(t,e,i,s){const r=i&&"local"!==s?SharedArrayBuffer:ArrayBuffer,a=w(t),o=new a(new r(e*e*4*a.BYTES_PER_ELEMENT));for(let n=0;n<o.length;n+=4)o[n+1]=255;return o}_resetRange(){this.dirtyStart=2147483647,this.dirtyEnd=0}}class M{constructor(t,e){this._client=t,this.config=e,this._attributeComputeMap=new Map,this._blocks=new Array,this._filters=new Array(_),this._targetType=0,this._abortController=new AbortController,this._hasScaleExpr=!1,this._size=32,this._idsToHighlight=new Set;const i=e.supportsTextureFloat?k.FLOAT:k.UNSIGNED_BYTE;F(`Creating AttributeStore ${B.sharedArrayBuffer?"with":"without"} shared memory`),this._blockDescriptors=[{pixelType:k.UNSIGNED_BYTE,layout:1},{pixelType:k.UNSIGNED_BYTE,layout:15,textureOnly:!0},{pixelType:i,layout:15},{pixelType:i,layout:15}],this._blocks=this._blockDescriptors.map((()=>null))}destroy(){this._abortController.abort()}get hasScaleExpr(){return this._hasScaleExpr}get _signal(){return this._abortController.signal}update(t,i){this.config=i;const s=i.schema.processors[0].storage,o=d(this._schema,s);if((t.targets.feature||t.targets.aggregate)&&(t.storage.data=!0),o&&(e("esri-2d-update-debug")&&console.debug("Applying Update - AttributeStore:",o),t.storage.data=!0,this._schema=s,this._attributeComputeMap.clear(),!r(s))){switch(s.target){case"feature":this._targetType=b;break;case"aggregate":this._targetType=x}if("subtype"===s.type)for(const t in s.mapping){const e=s.mapping[t];if(a(e))for(const t of e.mapping)this._bindAttribute(t)}else for(const t of s.mapping)this._bindAttribute(t)}}onTileData(t,e){if(r(e.addOrUpdate))return;const i=e.addOrUpdate.getCursor();for(;i.next();){const t=i.getDisplayId();this.setAttributeData(t,i)}}invalidateResources(){this._createResourcesPromise=null,this._abortController.abort(),this._abortController=new AbortController}async setHighlight(t,e){const i=1,s=this._getBlock(0),r=e.map((t=>T(t)));s.lock(),s.unsetComponentAllTexels(0,i),s.setComponent(0,i,r),s.unlock(),this._idsToHighlight.clear();for(const a of t)this._idsToHighlight.add(a);await this.sendUpdates()}async updateFilters(t,i){const{config:s,service:r,spatialReference:a}=i,{filters:o}=s,n=o.map(((t,e)=>this._updateFilter(t,e,r,a)));(await Promise.all(n)).some((t=>t))&&(t.storage.filters=!0,e("esri-2d-update-debug")&&console.debug("Applying Update - AttributeStore:","Filters changed"))}setData(t,e,i,s){const r=T(t);this._ensureSizeForTexel(r),this._getBlock(e).setData(t,i,s)}getData(t,e,i){return this._getBlock(e).getData(t,i)}getHighlightFlag(t){return this._idsToHighlight.has(t)?g:0}unsetAttributeData(t){const e=T(t);this._getBlock(0).setData(e,0,0)}setAttributeData(t,e){const i=T(t);if(this._ensureSizeForTexel(i),this._getBlock(0).setData(i,0,this.getFilterFlags(e)),this._targetType!==z(t))return;const r=this._attributeComputeMap,a=this.config.supportsTextureFloat?1:2,o=4;r.size&&r.forEach(((t,r)=>{const n=r*a%o,l=Math.floor(r*a/o),h=this._getBlock(l+f),c=t(e);if(this.config.supportsTextureFloat)h.setData(i,n,c);else if(c===m)h.setData(i,n,255),h.setData(i,n+1,255);else{const t=s(Math.round(c),-32767,32766)+32768,e=255&t,r=(65280&t)>>8;h.setData(i,n,e),h.setData(i,n+1,r)}}))}sendUpdates(){if(this._nextUpdate)return this._nextUpdate.promise;if(this._currUpdate)return this._nextUpdate=c(),this._nextUpdate.promise;const e={blocks:this._blocks.map((t=>a(t)?t.toMessage():null))};return this._currUpdate=this._createResources().then((()=>{const t=()=>{if(this._currUpdate=null,this._nextUpdate){const t=this._nextUpdate;this._nextUpdate=null,this.sendUpdates().then((()=>t.resolve()))}},i=this._client.update(e,this._signal).then(t).catch(t);return this._client.render(this._signal),i})).catch((e=>u(e)?(this._createResourcesPromise=null,this._createResources()):(U.error(new t("mapview-attribute-store","Encountered an error during client update",e)),Promise.resolve()))),this._currUpdate}_ensureSizeForTexel(t){for(;t>=this._size*this._size;)if(this._expand())return}_bindAttribute(t){function e(){return t.normalizationField?e=>{const i=e.readAttribute(t.normalizationField);if(!i)return null;return e.readAttribute(t.field)/i}:e=>e.readAttribute(t.field)}function i(){return t.normalizationField&&U.warn("mapview-arcade","Ignoring normalizationField specified with an arcade expression which is not supported."),e=>e.getComputedNumericAtIndex(t.fieldIndex)}let s;if(null!=t.fieldIndex)s=i();else{if(!t.field)return;s=e()}if(t.valueRepresentation){s=C(s,(e=>D(e,t.valueRepresentation)))}const r=t=>null===t||isNaN(t)||t===1/0?m:t;this._attributeComputeMap.set(t.binding,C(s,r))}_createResources(){if(a(this._createResourcesPromise))return this._createResourcesPromise;this._getBlock(y),F("Initializing AttributeStore");const e={shared:B.sharedArrayBuffer&&!("local"===this._client.type),size:this._size,blocks:o(this._blocks,(t=>({textureOnly:t.textureOnly,buffer:t.buffer,pixelType:t.pixelType})))},i=this._client.initialize(e,this._signal).catch((e=>{u(e)?this._createResourcesPromise=null:U.error(new t("mapview-attribute-store","Encountered an error during client initialization",e))}));return this._createResourcesPromise=i,i.then((()=>r(this._createResourcesPromise)?this._createResources():void 0)),i}_getBlock(t){const e=this._blocks[t];if(a(e))return e;F(`Initializing AttributeBlock at index ${t}`);const i=B.sharedArrayBuffer,s=this._client.type,r=new R(i,s,this._size,this._blockDescriptors[t]);return this._blocks[t]=r,this._createResourcesPromise=null,r}_expand(){if(this._size<this.config.maxTextureSize){const t=this._size<<=1;return F("Expanding block size to",t,this._blocks),n(this._blocks,(e=>e.expand(t))),this._createResourcesPromise=null,this._size=t,0}return U.error(new t("mapview-limitations","Maximum number of onscreen features exceeded.")),-1}async _updateFilter(t,e,i,s){const o=this._filters[e],n=a(o)&&o.hash;if(!o&&!t)return!1;if(n===JSON.stringify(t))return!1;if(r(t)){if(!o)return!1;const t=1<<e+1,i=this._getBlock(0);return this._filters[e]=null,i.setComponentAllTexels(0,t),this.sendUpdates(),!0}const l=await this._getFilter(e,i);return await l.update(t,s),!0}async _getFilter(t,e){const i=this._filters[t];if(a(i))return i;const{default:s}=await import("./FeatureFilter.js"),r=new s({geometryType:e.geometryType,hasM:!1,hasZ:!1,timeInfo:e.timeInfo,fieldsIndex:new p(e.fields)});return this._filters[t]=r,r}isVisible(t){return!!(2&this._getBlock(0).getData(t,0))}getFilterFlags(t){let e=0;const i=S(t.getDisplayId());for(let a=0;a<this._filters.length;a++){const s=!!(i&1<<a),o=this._filters[a];e|=(!s||r(o)||o.check(t)?1:0)<<a}let s=0;if(this._idsToHighlight.size){const e=t.getObjectId();s=this.getHighlightFlag(e)}return e<<1|s}}export{M as default};
5
+ import t from"../../../../../core/Error.js";import e from"../../../../../core/has.js";import i from"../../../../../core/Logger.js";import{clamp as s}from"../../../../../core/mathUtils.js";import{isNone as r,isSome as a,mapMany as o,forEachSome as n,andThen as l,unwrap as h}from"../../../../../core/maybe.js";import{createResolver as c,isAbortError as u}from"../../../../../core/promiseUtils.js";import{diff as d}from"../../../../../core/accessorSupport/diffUtils.js";import p from"../../../../../layers/support/FieldsIndex.js";import{MAX_FILTERS as _,HIGHLIGHT_FLAG as g,ATTRIBUTE_DATA_VV as f,NAN_MAGIC_NUMBER as m,ATTRIBUTE_DATA_ANIMATION as y}from"../../../engine/webgl/definitions.js";import{DISPLAY_ID_TYPE_AGGREGATE as x,DISPLAY_ID_TYPE_FEATURE as b,getDisplayIdTexel as T,getDisplayIdType as z,getDisplayIdFilterMask as S}from"../../../engine/webgl/DisplayId.js";import{getPixelArrayCtor as w}from"../../../engine/webgl/Utils.js";import{createDebugLogger as A,DEBUG_ATTR_UPDATES as E}from"../../../engine/webgl/util/debug.js";import{getVisualVariableSizeValueRepresentationRatio as D}from"../tileRenderers/support/visualVariablesUtils.js";import{PixelType as k}from"../../../../webgl/enums.js";const U=i.getLogger("esri.views.layers.2d.features.support.AttributeStore"),F=A(E,U),B={sharedArrayBuffer:e("esri-shared-array-buffer"),atomics:e("esri-atomics")};function C(t,e){return i=>e(t(i))}class R{constructor(t,e,i,s){this.size=0,this.texelSize=4;const{pixelType:r,layout:a,textureOnly:o}=s;this.textureOnly=o||!1,this.pixelType=r,this._ctype=e,this.layout=a,this._resetRange(),this._shared=t,this.size=i,o||(this.data=this._initData(r,i,t,e))}get buffer(){return l(this.data,(t=>t.buffer))}unsetComponentAllTexels(t,e){const i=h(this.data);for(let s=0;s<this.size*this.size;s++)i[s*this.texelSize+t]&=~e;this.dirtyStart=0,this.dirtyEnd=this.size*this.size-1}setComponentAllTexels(t,e){const i=h(this.data);for(let s=0;s<this.size*this.size;s++)i[s*this.texelSize+t]|=255&e;this.dirtyStart=0,this.dirtyEnd=this.size*this.size-1}setComponent(t,e,i){const s=h(this.data);for(const r of i)s[r*this.texelSize+t]|=e,this.dirtyStart=Math.min(this.dirtyStart,r),this.dirtyEnd=Math.max(this.dirtyEnd,r)}setComponentTexel(t,e,i){h(this.data)[i*this.texelSize+t]|=e,this.dirtyStart=Math.min(this.dirtyStart,i),this.dirtyEnd=Math.max(this.dirtyEnd,i)}unsetComponentTexel(t,e,i){h(this.data)[i*this.texelSize+t]&=~e,this.dirtyStart=Math.min(this.dirtyStart,i),this.dirtyEnd=Math.max(this.dirtyEnd,i)}getData(t,e){const i=T(t);return h(this.data)[i*this.texelSize+e]}setData(t,e,i){const s=T(t),r=1<<e;0!=(this.layout&r)?(this.data[s*this.texelSize+e]=i,this.dirtyStart=Math.min(this.dirtyStart,s),this.dirtyEnd=Math.max(this.dirtyEnd,s)):U.error("mapview-attributes-store","Tried to set a value for a texel's readonly component")}lock(){this.pixelType===k.UNSIGNED_BYTE&&this._shared&&B.atomics&&"local"!==this._ctype&&Atomics.store(this.data,0,1)}unlock(){this.pixelType===k.UNSIGNED_BYTE&&this._shared&&B.atomics&&"local"!==this._ctype&&Atomics.store(this.data,0,0)}expand(t){if(this.size=t,!this.textureOnly){const e=this._initData(this.pixelType,t,this._shared,this._ctype),i=h(this.data);e.set(i),this.data=e}}toMessage(){const t=this.dirtyStart,e=this.dirtyEnd,i=this.texelSize;if(t>e)return null;this._resetRange();const s=!(this._shared||"local"===this._ctype),r=this.pixelType,a=this.layout,o=h(this.data);return{start:t,end:e,data:s&&o.slice(t*i,(e+1)*i)||null,pixelType:r,layout:a}}_initData(t,e,i,s){const r=i&&"local"!==s?SharedArrayBuffer:ArrayBuffer,a=w(t),o=new a(new r(e*e*4*a.BYTES_PER_ELEMENT));for(let n=0;n<o.length;n+=4)o[n+1]=255;return o}_resetRange(){this.dirtyStart=2147483647,this.dirtyEnd=0}}class M{constructor(t,e){this._client=t,this.config=e,this._attributeComputeMap=new Map,this._blocks=new Array,this._filters=new Array(_),this._targetType=0,this._abortController=new AbortController,this._hasScaleExpr=!1,this._size=32,this._idsToHighlight=new Set;const i=e.supportsTextureFloat?k.FLOAT:k.UNSIGNED_BYTE;F(`Creating AttributeStore ${B.sharedArrayBuffer?"with":"without"} shared memory`),this._blockDescriptors=[{pixelType:k.UNSIGNED_BYTE,layout:1},{pixelType:k.UNSIGNED_BYTE,layout:15,textureOnly:!0},{pixelType:i,layout:15},{pixelType:i,layout:15}],this._blocks=this._blockDescriptors.map((()=>null))}destroy(){this._abortController.abort()}get hasScaleExpr(){return this._hasScaleExpr}get _signal(){return this._abortController.signal}get hasHighlight(){return this._idsToHighlight.size>0}update(t,i){this.config=i;const s=i.schema.processors[0].storage,o=d(this._schema,s);if((t.targets.feature||t.targets.aggregate)&&(t.storage.data=!0),o&&(e("esri-2d-update-debug")&&console.debug("Applying Update - AttributeStore:",o),t.storage.data=!0,this._schema=s,this._attributeComputeMap.clear(),!r(s))){switch(s.target){case"feature":this._targetType=b;break;case"aggregate":this._targetType=x}if("subtype"===s.type)for(const t in s.mapping){const e=s.mapping[t];if(a(e))for(const t of e.mapping)this._bindAttribute(t)}else for(const t of s.mapping)this._bindAttribute(t)}}onTileData(t,e){if(r(e.addOrUpdate))return;const i=e.addOrUpdate.getCursor();for(;i.next();){const t=i.getDisplayId();this.setAttributeData(t,i)}}invalidateResources(){this._createResourcesPromise=null,this._abortController.abort(),this._abortController=new AbortController}async setHighlight(t,e){const i=1,s=this._getBlock(0),r=e.map((t=>T(t)));s.lock(),s.unsetComponentAllTexels(0,i),s.setComponent(0,i,r),s.unlock(),this._idsToHighlight.clear();for(const a of t)this._idsToHighlight.add(a);await this.sendUpdates()}async updateFilters(t,i){const{config:s,service:r,spatialReference:a}=i,{filters:o}=s,n=o.map(((t,e)=>this._updateFilter(t,e,r,a)));(await Promise.all(n)).some((t=>t))&&(t.storage.filters=!0,e("esri-2d-update-debug")&&console.debug("Applying Update - AttributeStore:","Filters changed"))}setData(t,e,i,s){const r=T(t);this._ensureSizeForTexel(r),this._getBlock(e).setData(t,i,s)}getData(t,e,i){return this._getBlock(e).getData(t,i)}getHighlightFlag(t){return this._idsToHighlight.has(t)?g:0}unsetAttributeData(t){const e=T(t);this._getBlock(0).setData(e,0,0)}setAttributeData(t,e){const i=T(t);if(this._ensureSizeForTexel(i),this._getBlock(0).setData(i,0,this.getFilterFlags(e)),this._targetType!==z(t))return;const r=this._attributeComputeMap,a=this.config.supportsTextureFloat?1:2,o=4;r.size&&r.forEach(((t,r)=>{const n=r*a%o,l=Math.floor(r*a/o),h=this._getBlock(l+f),c=t(e);if(this.config.supportsTextureFloat)h.setData(i,n,c);else if(c===m)h.setData(i,n,255),h.setData(i,n+1,255);else{const t=s(Math.round(c),-32767,32766)+32768,e=255&t,r=(65280&t)>>8;h.setData(i,n,e),h.setData(i,n+1,r)}}))}sendUpdates(){if(this._nextUpdate)return this._nextUpdate.promise;if(this._currUpdate)return this._nextUpdate=c(),this._nextUpdate.promise;const e={blocks:this._blocks.map((t=>a(t)?t.toMessage():null))};return this._currUpdate=this._createResources().then((()=>{const t=()=>{if(this._currUpdate=null,this._nextUpdate){const t=this._nextUpdate;this._nextUpdate=null,this.sendUpdates().then((()=>t.resolve()))}},i=this._client.update(e,this._signal).then(t).catch(t);return this._client.render(this._signal),i})).catch((e=>u(e)?(this._createResourcesPromise=null,this._createResources()):(U.error(new t("mapview-attribute-store","Encountered an error during client update",e)),Promise.resolve()))),this._currUpdate}_ensureSizeForTexel(t){for(;t>=this._size*this._size;)if(this._expand())return}_bindAttribute(t){function e(){return t.normalizationField?e=>{const i=e.readAttribute(t.normalizationField);if(!i)return null;return e.readAttribute(t.field)/i}:e=>e.readAttribute(t.field)}function i(){return t.normalizationField&&U.warn("mapview-arcade","Ignoring normalizationField specified with an arcade expression which is not supported."),e=>e.getComputedNumericAtIndex(t.fieldIndex)}let s;if(null!=t.fieldIndex)s=i();else{if(!t.field)return;s=e()}if(t.valueRepresentation){s=C(s,(e=>D(e,t.valueRepresentation)))}const r=t=>null===t||isNaN(t)||t===1/0?m:t;this._attributeComputeMap.set(t.binding,C(s,r))}_createResources(){if(a(this._createResourcesPromise))return this._createResourcesPromise;this._getBlock(y),F("Initializing AttributeStore");const e={shared:B.sharedArrayBuffer&&!("local"===this._client.type),size:this._size,blocks:o(this._blocks,(t=>({textureOnly:t.textureOnly,buffer:t.buffer,pixelType:t.pixelType})))},i=this._client.initialize(e,this._signal).catch((e=>{u(e)?this._createResourcesPromise=null:U.error(new t("mapview-attribute-store","Encountered an error during client initialization",e))}));return this._createResourcesPromise=i,i.then((()=>r(this._createResourcesPromise)?this._createResources():void 0)),i}_getBlock(t){const e=this._blocks[t];if(a(e))return e;F(`Initializing AttributeBlock at index ${t}`);const i=B.sharedArrayBuffer,s=this._client.type,r=new R(i,s,this._size,this._blockDescriptors[t]);return this._blocks[t]=r,this._createResourcesPromise=null,r}_expand(){if(this._size<this.config.maxTextureSize){const t=this._size<<=1;return F("Expanding block size to",t,this._blocks),n(this._blocks,(e=>e.expand(t))),this._createResourcesPromise=null,this._size=t,0}return U.error(new t("mapview-limitations","Maximum number of onscreen features exceeded.")),-1}async _updateFilter(t,e,i,s){const o=this._filters[e],n=a(o)&&o.hash;if(!o&&!t)return!1;if(n===JSON.stringify(t))return!1;if(r(t)){if(!o)return!1;const t=1<<e+1,i=this._getBlock(0);return this._filters[e]=null,i.setComponentAllTexels(0,t),this.sendUpdates(),!0}const l=await this._getFilter(e,i);return await l.update(t,s),!0}async _getFilter(t,e){const i=this._filters[t];if(a(i))return i;const{default:s}=await import("./FeatureFilter.js"),r=new s({geometryType:e.geometryType,hasM:!1,hasZ:!1,timeInfo:e.timeInfo,fieldsIndex:new p(e.fields)});return this._filters[t]=r,r}isVisible(t){return!!(2&this._getBlock(0).getData(t,0))}getFilterFlags(t){let e=0;const i=S(t.getDisplayId());for(let a=0;a<this._filters.length;a++){const s=!!(i&1<<a),o=this._filters[a];e|=(!s||r(o)||o.check(t)?1:0)<<a}let s=0;if(this._idsToHighlight.size){const e=t.getObjectId();s=this.getHighlightFlag(e)}return e<<1|s}}export{M as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{b as t,m as e,c as s,d as r,r as i}from"../../../../chunks/mat3.js";import{c as o}from"../../../../chunks/mat3f32.js";import{f as a}from"../../../../chunks/vec2f32.js";import{f as n}from"../../../../chunks/vec3f32.js";import{normalizeMapX as f}from"../../../../geometry/support/normalizeUtils.js";import{DisplayObject as l}from"../../engine/DisplayObject.js";import{createProgramDescriptor as m}from"../../engine/webgl/Utils.js";import{BufferObject as u}from"../../../webgl/BufferObject.js";import{BlendFactor as _,PrimitiveType as c,DataType as h,Usage as d}from"../../../webgl/enums.js";import{Program as p}from"../../../webgl/Program.js";import{VertexArrayObject as g}from"../../../webgl/VertexArrayObject.js";const v=Math.PI/180,x=4;class b extends l{constructor(t){super(),this._dvsMat3=o(),this._localOrigin={x:0,y:0},this._getBounds=t}destroy(){this._vao&&(this._vao.dispose(!0),this._vao=null,this._vertexBuffer=null,this._indexBuffer=null),this._program&&(this._program.dispose(),this._program=null)}doRender(t){const{context:e}=t,s=this._getBounds();if(s.length<1)return;this._createShaderProgram(e),this._updateMatricesAndLocalOrigin(t),this._updateBufferData(e,s),e.setBlendingEnabled(!0),e.setDepthTestEnabled(!1),e.setStencilWriteMask(0),e.setStencilTestEnabled(!1),e.setBlendFunction(_.ONE,_.ONE_MINUS_SRC_ALPHA),e.setColorMask(!0,!0,!0,!0);const r=this._program;e.bindVAO(this._vao),e.useProgram(r),r.setUniformMatrix3fv("u_dvsMat3",this._dvsMat3),e.gl.lineWidth(1),e.drawElements(c.LINES,8*s.length,h.UNSIGNED_INT,0),e.bindVAO()}_createTransforms(){return{dvs:o()}}_createShaderProgram(t){if(this._program)return;const e="precision highp float;\n uniform mat3 u_dvsMat3;\n\n attribute vec2 a_position;\n\n void main() {\n mediump vec3 pos = u_dvsMat3 * vec3(a_position, 1.0);\n gl_Position = vec4(pos.xy, 0.0, 1.0);\n }",s="precision mediump float;\n void main() {\n gl_FragColor = vec4(0.75, 0.0, 0.0, 0.75);\n }";this._program=new p(t,e,s,y().attributes)}_updateMatricesAndLocalOrigin(o){const{state:l}=o,{displayMat3:m,size:u,resolution:_,pixelRatio:c,rotation:h,viewpoint:d}=l,p=v*h,{x:g,y:x}=d.targetGeometry,b=f(g,l.spatialReference);this._localOrigin.x=b,this._localOrigin.y=x;const y=c*u[0],B=c*u[1],M=_*y,j=_*B,A=t(this._dvsMat3);e(A,A,m),s(A,A,a(y/2,B/2)),r(A,A,n(u[0]/M,-B/j,1)),i(A,A,-p)}_updateBufferData(t,e){const{x:s,y:r}=this._localOrigin,i=2*x*e.length,o=new Float32Array(i),a=new Uint32Array(8*e.length);let n=0,f=0;for(const l of e)l&&(o[2*n+0]=l[0]-s,o[2*n+1]=l[1]-r,o[2*n+2]=l[0]-s,o[2*n+3]=l[3]-r,o[2*n+4]=l[2]-s,o[2*n+5]=l[3]-r,o[2*n+6]=l[2]-s,o[2*n+7]=l[1]-r,a[f+0]=n+0,a[f+1]=n+3,a[f+2]=n+3,a[f+3]=n+2,a[f+4]=n+2,a[f+5]=n+1,a[f+6]=n+1,a[f+7]=n+0,n+=4,f+=8);if(this._vertexBuffer?this._vertexBuffer.setData(o.buffer):this._vertexBuffer=u.createVertex(t,d.DYNAMIC_DRAW,o.buffer),this._indexBuffer?this._indexBuffer.setData(a):this._indexBuffer=u.createIndex(t,d.DYNAMIC_DRAW,a),!this._vao){const e=y();this._vao=new g(t,e.attributes,e.bufferLayouts,{geometry:this._vertexBuffer},this._indexBuffer)}}}const y=()=>m("bounds",{geometry:[{location:0,name:"a_position",count:2,type:h.FLOAT}]});export{b as default};
5
+ import{b as t,m as e,c as s,d as r,r as i}from"../../../../chunks/mat3.js";import{c as o}from"../../../../chunks/mat3f32.js";import{f as a}from"../../../../chunks/vec2f32.js";import{f as n}from"../../../../chunks/vec3f32.js";import{normalizeMapX as f}from"../../../../geometry/support/normalizeUtils.js";import{DisplayObject as l}from"../../engine/DisplayObject.js";import{createProgramDescriptor as u}from"../../engine/webgl/Utils.js";import{BufferObject as c}from"../../../webgl/BufferObject.js";import{BlendFactor as _,PrimitiveType as m,DataType as h,Usage as d}from"../../../webgl/enums.js";import{VertexArrayObject as p}from"../../../webgl/VertexArrayObject.js";const g=Math.PI/180,v=4;class x extends l{constructor(t){super(),this._dvsMat3=o(),this._localOrigin={x:0,y:0},this._getBounds=t}destroy(){this._vao&&(this._vao.dispose(!0),this._vao=null,this._vertexBuffer=null,this._indexBuffer=null),this._program&&(this._program.dispose(),this._program=null)}doRender(t){const{context:e}=t,s=this._getBounds();if(s.length<1)return;this._createShaderProgram(e),this._updateMatricesAndLocalOrigin(t),this._updateBufferData(e,s),e.setBlendingEnabled(!0),e.setDepthTestEnabled(!1),e.setStencilWriteMask(0),e.setStencilTestEnabled(!1),e.setBlendFunction(_.ONE,_.ONE_MINUS_SRC_ALPHA),e.setColorMask(!0,!0,!0,!0);const r=this._program;e.bindVAO(this._vao),e.useProgram(r),r.setUniformMatrix3fv("u_dvsMat3",this._dvsMat3),e.gl.lineWidth(1),e.drawElements(m.LINES,8*s.length,h.UNSIGNED_INT,0),e.bindVAO()}_createTransforms(){return{dvs:o()}}_createShaderProgram(t){if(this._program)return;const e="precision highp float;\n uniform mat3 u_dvsMat3;\n\n attribute vec2 a_position;\n\n void main() {\n mediump vec3 pos = u_dvsMat3 * vec3(a_position, 1.0);\n gl_Position = vec4(pos.xy, 0.0, 1.0);\n }",s="precision mediump float;\n void main() {\n gl_FragColor = vec4(0.75, 0.0, 0.0, 0.75);\n }";this._program=t.programCache.acquire(e,s,b().attributes)}_updateMatricesAndLocalOrigin(o){const{state:l}=o,{displayMat3:u,size:c,resolution:_,pixelRatio:m,rotation:h,viewpoint:d}=l,p=g*h,{x:v,y:x}=d.targetGeometry,b=f(v,l.spatialReference);this._localOrigin.x=b,this._localOrigin.y=x;const y=m*c[0],B=m*c[1],M=_*y,A=_*B,O=t(this._dvsMat3);e(O,O,u),s(O,O,a(y/2,B/2)),r(O,O,n(c[0]/M,-B/A,1)),i(O,O,-p)}_updateBufferData(t,e){const{x:s,y:r}=this._localOrigin,i=2*v*e.length,o=new Float32Array(i),a=new Uint32Array(8*e.length);let n=0,f=0;for(const l of e)l&&(o[2*n+0]=l[0]-s,o[2*n+1]=l[1]-r,o[2*n+2]=l[0]-s,o[2*n+3]=l[3]-r,o[2*n+4]=l[2]-s,o[2*n+5]=l[3]-r,o[2*n+6]=l[2]-s,o[2*n+7]=l[1]-r,a[f+0]=n+0,a[f+1]=n+3,a[f+2]=n+3,a[f+3]=n+2,a[f+4]=n+2,a[f+5]=n+1,a[f+6]=n+1,a[f+7]=n+0,n+=4,f+=8);if(this._vertexBuffer?this._vertexBuffer.setData(o.buffer):this._vertexBuffer=c.createVertex(t,d.DYNAMIC_DRAW,o.buffer),this._indexBuffer?this._indexBuffer.setData(a):this._indexBuffer=c.createIndex(t,d.DYNAMIC_DRAW,a),!this._vao){const e=b();this._vao=new p(t,e.attributes,e.bufferLayouts,{geometry:this._vertexBuffer},this._indexBuffer)}}}const b=()=>u("bounds",{geometry:[{location:0,name:"a_position",count:2,type:h.FLOAT}]});export{x as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../../chunks/tslib.es6.js";import e from"../../../../core/Accessor.js";import{bidiText as s}from"../../../../core/BidiText.js";import{HandleOwnerMixin as i}from"../../../../core/HandleOwner.js";import r from"../../../../core/has.js";import{isSome as o,isNone as a}from"../../../../core/maybe.js";import{throwIfAborted as h,isAbortError as n,throwIfAbortError as l}from"../../../../core/promiseUtils.js";import{property as d}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as p}from"../../../../core/accessorSupport/decorators/subclass.js";import c from"../../../../geometry/SpatialReference.js";import{width as g,height as u,create as m}from"../../../../geometry/support/aaBoundingRect.js";import{closeRingsAndFixWinding as _}from"../../../../geometry/support/coordsUtils.js";import{getJsonType as f,isPolygon as y,isPolyline as b,isExtent as S,isPoint as w,isMultipoint as T}from"../../../../geometry/support/jsonUtils.js";import{normalizeCentralMeridianSync as I}from"../../../../geometry/support/normalizeUtilsSync.js";import{getInfo as v}from"../../../../geometry/support/spatialReferenceUtils.js";import{checkProjectionSupport as G,project as M}from"../../../../layers/graphics/data/projectionSupport.js";import{symbolToCIM as U}from"../../../../symbols/cim/CIMSymbolHelper.js";import{errorPolylineSymbol2D as C,errorPolygonSymbol2D as j,errorPointSymbol2D as P}from"../../../../symbols/support/defaults.js";import{FILTER_FLAG_0 as x}from"../../engine/webgl/definitions.js";import{GraphicTile as A}from"../../engine/webgl/GraphicTile.js";import{TileData as R}from"../../engine/webgl/TileData.js";import q from"../../engine/webgl/WGLDisplayObject.js";import{MeshData as z}from"../../engine/webgl/mesh/MeshData.js";import{WGLMeshFactory as D}from"../../engine/webgl/mesh/factories/WGLMeshFactory.js";import{WGLTemplateStore as H}from"../../engine/webgl/mesh/templates/WGLTemplateStore.js";import{createMatcher as O}from"../../engine/webgl/util/Matcher.js";import{createMatcherSchema as F,createSymbolSchema as k}from"../features/schemaUtils.js";import E from"../features/support/AttributeStore.js";import{ComputedAttributeStorage as N}from"../features/support/ComputedAttributeStorage.js";import{GraphicsReader as V}from"../features/support/GraphicsReader.js";import B from"./GraphicStore.js";import{intersectingInternationalDateline as L,isMarkerSymbol as W,isTextSymbol as J,polygonFromExtent as Z,TILE_SIZE as K,PIXEL_BUFFER as Q}from"./graphicsUtils.js";import{expandSymbol as X}from"../support/cimSymbolUtils.js";import{GraphicsView as Y}from"../../../layers/GraphicsView.js";import{getWebGL1Capabilities as $}from"../../../webgl/capabilities.js";const tt=r("esri-2d-graphic-debug");function et(t,e,s){if(s.has(t))return s.get(t);const i={tile:e,addedOrModified:[],removed:[]};return s.set(t,i),i}let st=class extends(Y(i(e))){constructor(t){super(t),this._storage=new N,this._displayIds=new Map,this._controller=new AbortController,this._tiles=new Map,this._graphicStoreUpdate=!1,this._graphicsSet=new Set,this._matcher=Promise.resolve(null),this._tileUpdateSet=new Set,this._tilesToUpdate=new Map,this._graphicIdToAbortController=new Map,this._attached=!1,this._highlightIds=new Map,this._updatingGraphicsTimer=null,this._hashToExpandedSymbol=new Map,this._hashToExpandedSymbolPromise=new Map,this._hashToCIMSymbolPromise=new Map,this._hashToCIM=new Map,this._processing=!1,this._needsProcessing=!1,this._pendingUpdate={added:new Set,updated:new Set,removed:new Set},this.lastUpdateId=-1,this.updateRequested=!1,this.graphicUpdateHandler=this.graphicUpdateHandler.bind(this)}_createMatcher(t,e,s){if(t){const i=F({indexCount:0,fields:{}},"feature",t);this._matcher=O(i,e,null,s)}}_createDisplayId(t){return this._displayIds.has(t)||this._displayIds.set(t,this._storage.createDisplayId()),this._displayIds.get(t)}initialize(){this._attributeStore=new E({type:"local",initialize:t=>Promise.resolve(this.container.attributeView.initialize(t)),update:t=>this.container.attributeView.requestUpdate(t),render:()=>this.container.requestRender()},$()),this.container.hasHighlight=()=>!!this._highlightIds.size;const t=t=>{this._createDisplayId(t.uid),this._setFilterState(t.uid,t.visible)},e=t=>{const e=this._displayIds.get(t.uid);this._displayIds.delete(t.uid),this._storage.releaseDisplayId(e)},s=new H(this.container.getMaterialItems.bind(this.container),this.view.featuresTilingScheme.tileInfo);this._graphicStore=new B(this.view.featuresTilingScheme,this.view.state.scale,this.uid,this.graphics,t,e,this._hashToCIM),this._meshFactory=new D(null,this.uid,s),this._templateStore=s,this.handles.add([this.watch("renderer",(t=>{this._createMatcher(t,s,this.container.stage.resourceManager);for(const e of this.graphics)this._pendingUpdate.updated.add(e);this.requestUpdate()})),this.view.graphicsTileStore.on("update",(t=>this._onTileUpdate(t))),this.container.on("attach",(()=>{tt&&this.container.enableRenderingBounds((()=>this._graphicStore.getAllBounds())),this.graphics.items.length>0&&this._graphicsChangeHandler({target:this.graphics,added:this.graphics.items,removed:[],moved:[]}),this.handles.add(this.graphics.on("change",(t=>this._graphicsChangeHandler(t))),"graphics");const t=this.container.stage.resourceManager;this._createMatcher(this.renderer,s,t),this._graphicStore.setResourceManager(t),this._attached=!0,this.notifyChange("updating")}))]);const i=this.view.graphicsTileStore.tiles;this._onTileUpdate({added:i,removed:[]})}destroy(){this._updatingGraphicsTimer&&(clearTimeout(this._updatingGraphicsTimer),this._updatingGraphicsTimer=null,this.notifyChange("updating")),this._controller.abort(),this.container.destroy(),this._set("graphics",null),this._graphicStore.clear(),this._attributeStore=null,this._hashToExpandedSymbol.clear(),this.view=null,this.renderer=null,this._hashToCIM.clear(),this._hashToCIMSymbolPromise.clear(),this._hashToExpandedSymbolPromise.clear()}get updating(){return!this._attached||null!==this._updatingGraphicsTimer||this._tileUpdateSet.size>0||this._tilesToUpdate.size>0}hitTest(t){if(!this.view||!this.view.position)return null;const{resolution:e,rotation:s}=this.view.state;return this._graphicStore.hitTest(t.x,t.y,2,e,s)}update(t){h(this._controller.signal);const e=t.state,{resolution:s}=e;if(this._graphicStore.updateLevel(s),this._graphicStoreUpdate=!0,this.updateRequested=!1,this._pendingUpdate.updated.size>0){if(!this._processing)return void this._updateGraphics();this._needsProcessing=!0}}viewChange(){this.requestUpdate()}requestUpdate(){this.updateRequested||(this.updateRequested=!0,this.requestUpdateCallback())}processUpdate(t){this.updateRequested&&(this.updateRequested=!1,this.update(t))}graphicUpdateHandler(t){const{graphic:e,property:s,newValue:i}=t;switch(s){case"attributes":break;case"geometry":case"symbol":this._pendingUpdate.updated.add(e),this.requestUpdate();break;case"visible":this._setFilterState(e.uid,i),this._attributeStore.sendUpdates()}}addHighlight(t){for(const e of t)if(this._highlightIds.has(e)){const t=this._highlightIds.get(e);this._highlightIds.set(e,t+1)}else this._highlightIds.set(e,1);this._updateHighlight()}removeHighlight(t){for(const e of t)if(this._highlightIds.has(e)){const t=this._highlightIds.get(e)-1;0===t?this._highlightIds.delete(e):this._highlightIds.set(e,t)}this._updateHighlight()}_updateHighlight(){const t=Array.from(this._highlightIds.keys()),e=t.map((t=>this._displayIds.get(t)));this._attributeStore.setHighlight(t,e)}_getIntersectingTiles(t){const e=this._graphicStore.getBounds(t);if(!e||0===g(e)||0===u(e))return[];const s=L(e,this.view.spatialReference);return o(s)?[...new Set([...this.view.graphicsTileStore.boundsIntersections(s[0]),...this.view.graphicsTileStore.boundsIntersections(s[1])])]:this.view.graphicsTileStore.boundsIntersections(e)}async _updateTile(t){h(this._controller.signal);const e=t.tile,s=this._getGraphicsData(this._templateStore,e,t.addedOrModified),i=await this._processGraphics(e,s);return h(this._controller.signal),this._patchTile(e.key,{type:"update",addOrUpdate:i,remove:t.removed,end:!0,clear:!1,sort:!1}),i}_patchTile(t,e){if(!this._tiles.has(t))return;const s=this._tiles.get(t);this.container.onTileData(s,e),this.container.requestRender()}_graphicsChangeHandler(t){const e=this._pendingUpdate;for(const s of t.added)e.added.add(s);for(const s of t.moved)e.updated.add(s);for(const s of t.removed)this._pendingUpdate.added.has(s)?e.added.delete(s):e.removed.add(s);this._processing?this._needsProcessing=!0:this._updateGraphics()}_getGraphicsToUpdate(){const t={added:[],removed:[],updated:[]};if(!this.graphics)return t;const e=this._pendingUpdate;for(const s of this.graphics.items)e.added.has(s)?t.added.push(s):e.updated.has(s)&&t.updated.push(s);for(const s of e.removed)this._graphicStore.has(s)&&t.removed.push(s);return e.added.clear(),e.removed.clear(),e.updated.clear(),t}async _updateGraphics(){this._processing=!0;const{added:t,removed:e,updated:s}=this._getGraphicsToUpdate(),i=this._tilesToUpdate;let r;try{if(!this._graphicStoreUpdate){const t=this.view.state,{resolution:e}=t;this._graphicStore.updateLevel(e)}const o=[],a=new Array(t.length+e.length);for(let t=0;t<s.length;t++){const e=s[t],h=this._getIntersectingTiles(e);for(const t of h){r=t.id;et(r,t,i).removed.push(this._displayIds.get(e.uid))}o.push(this._updateGraphic(e,null)),a[t]=e}const h=s.length;for(let e=0;e<t.length;e++){const s=t[e];a[h+e]=s,this._graphicsSet.add(s),o.push(this._addGraphic(s))}for(const t of e){this._abortProcessingGraphic(t.uid);const e=this._getIntersectingTiles(t);for(const s of e){r=s.id;et(r,s,i).removed.push(this._displayIds.get(t.uid))}this._graphicsSet.delete(t),this._graphicStore.remove(t)}let n;this._flipUpdatingGraphics(),await Promise.all(o);for(let t=0;t<a.length;t++){n=a[t];const e=this._getIntersectingTiles(n);for(const t of e){r=t.id;et(r,t,i).addedOrModified.push(n)}}this._graphicStore.updateZ();const l=[];for(const[t,e]of i)l.push(this._updateTile(e));await Promise.all(l)}catch(o){n(o),0}for(const a of e)try{const t=await this._getSymbolForGraphic(a,{});if(t){const e=t.hash();this._hashToExpandedSymbol.delete(e)}}catch(o){n(o),0}i.clear(),this.notifyChange("updating"),this._processing=!1,this._needsProcessing&&(this._needsProcessing=!1,this._updateGraphics())}_getArcadeInfo(t){const e=(t.attributes?Object.keys(t.attributes):[]).map((e=>({name:e,alias:e,type:"string"==typeof t.attributes[e]?"esriFieldTypeString":"esriFieldTypeDouble"})));return a(t.geometry)?null:{geometryType:f(t.geometry),spatialReference:c.fromJSON(t.geometry.spatialReference),fields:e}}_getSymbolForGraphic(t,e){return h(this._controller.signal),o(t.symbol)?Promise.resolve(t.symbol):o(this.renderer)?this.renderer.getSymbolAsync(t,{scale:this.view.scale,abortOptions:e}):Promise.resolve(this._getNullSymbol(t))}_getCIMSymbol(t,e,s){let i=this._hashToCIM.get(e);if(i)return Promise.resolve(i);const r=U(t);if(o(r)){if("CIMSymbolReference"===r.type)return i=r,this._hashToCIM.set(e,i),Promise.resolve(i);let t=this._hashToCIMSymbolPromise.get(e);return t||(t=r.fetchCIMSymbol(s).then((t=>(this._hashToCIM.set(e,t.data),this._hashToCIMSymbolPromise.delete(e),t))).catch((t=>(this._hashToCIMSymbolPromise.delete(e),l(t),null))),this._hashToCIMSymbolPromise.set(e,t),t)}return Promise.resolve(null)}_expandCIMSymbol(t,e,s,i){const r=this._hashToExpandedSymbol.get(s);if(r)return Promise.resolve(r);let o=this._hashToExpandedSymbolPromise.get(s);if(o)return o;const a=this.container.stage,h=this._getArcadeInfo(e),n=k(t);return o=X(n,h,a.resourceManager,i),this._hashToExpandedSymbolPromise.set(s,o),o.then((t=>(this._hashToExpandedSymbol.set(s,t),this._hashToExpandedSymbolPromise.delete(s),t))),o}async _getSymbolResources(t,e){h(this._controller.signal);return this.container.stage?this._getSymbolForGraphic(t,e).then((i=>{const r=i.hash();return this._getCIMSymbol(i,r,e).then((i=>a(i)?null:this._expandCIMSymbol(i,t,r,e).then((t=>{const e=t.layers.filter((t=>"text"===t.type&&"string"==typeof t.text));if(e&&e.length>0){const i=new Array(e.length);for(let t=0;t<e.length;t++){const r=e[t],o=[],[a]=s(r.text);for(let t=0;t<a.length;t++)o.push(a.charCodeAt(t));i[t]={symbol:r,id:t,glyphIds:o}}const o=new Map;return this.container.getMaterialItems(i).then((s=>{for(let t=0;t<e.length;t++){const i=e[t];o.set(i.cim,{text:i.text,mosaicItem:s[t].mosaicItem})}return{symbol:t,textInfo:o,hash:r}}))}return{symbol:t,hash:r}}))))})).catch((t=>(l(t),null))):null}async _projectAndNormalizeGeometry(t,e){if(h(this._controller.signal),a(t.geometry)||"mesh"===t.geometry.type)return null;let s=t.geometry;if(y(s)){const t=s.rings;s.rings=t}else if(b(s)){const t=s.paths;s.paths=t}else if(S(s)){const i=await this._getSymbolForGraphic(t,e);if(h(this._controller.signal),W(i.type)||J(i.type)){s=s.center}else s=Z(s)}await G(s.spatialReference,this.view.spatialReference);const i=I(s),r=M(i,s.spatialReference,this.view.spatialReference);return _(r),r}_onTileUpdate(t){const e=v(this.view.spatialReference);if(t.added&&t.added.length>0)for(const s of t.added)this._addNewTile(s,e);if(t.removed&&t.removed.length>0)for(const s of t.removed)this._removeTile(s.key)}async _addGraphic(t){this._abortProcessingGraphic(t.uid),h(this._controller.signal);const e=new AbortController;this._graphicIdToAbortController.set(t.uid,e);const s={signal:e.signal};try{await this._addOrUpdateGraphic(t,s),h(this._controller.signal),this._graphicIdToAbortController.delete(t.uid)}catch(i){if(this._graphicIdToAbortController.delete(t.uid),!n(i))throw i}}_updateGraphic(t,e){h(this._controller.signal);const s=this._projectAndNormalizeGeometry(t,e),i=this._getSymbolResources(t,e);return Promise.all([s,i]).then((([e,s])=>{h(this._controller.signal),this._graphicStore.addOrModify(t,s,e)}))}_addOrUpdateGraphic(t,e){h(this._controller.signal);const s=this._projectAndNormalizeGeometry(t,e),i=this._getSymbolResources(t,e);return Promise.all([s,i]).then((([e,s])=>{h(this._controller.signal),this._graphicsSet.has(t)&&this._graphicStore.addOrModify(t,s,e)}))}_addTile(t){const e=this.view.featuresTilingScheme.getTileBounds(m(),t),s=new A(t,e[0],e[3]);return this._tiles.set(t,s),this.container.addChild(s),s}async _addNewTile(t,e){const s=this._addTile(t.key),i=this._graphicStore.queryTileData(this._templateStore,t);if(0===i.length)return;if(e){const s=Math.round((e.valid[1]-e.valid[0])/t.resolution);for(const t of i)t.geometry&&(w(t.geometry)||T(t.geometry))&&this._wrapPoints(t,s)}const r=t.key;this._tileUpdateSet.add(t.key),this.notifyChange("updating");try{const e={type:"update",clear:!1,addOrUpdate:await this._processGraphics(t,i),remove:[],end:!0,sort:!1};s.patch(e),this._tileUpdateSet.delete(r),this.notifyChange("updating")}catch(o){if(this._tileUpdateSet.delete(r),this.notifyChange("updating"),!n(o))throw o}}_removeTile(t){if(!this._tiles.has(t))return;const e=this._tiles.get(t);this.container.removeChild(e),e.destroy(),this._tiles.delete(t)}_setFilterState(t,e){const s=this._displayIds.get(t),i=this._attributeStore.getHighlightFlag(t);this._attributeStore.setData(s,0,0,i|(e?x:0))}_getGraphicsData(t,e,s){const i=this.view,r=v(i.spatialReference),o=this._graphicStore.getGraphicsData(t,e,s);if(r){const t=Math.round((r.valid[1]-r.valid[0])/e.resolution);for(const e of o)e.geometry&&(w(e.geometry)||T(e.geometry))&&this._wrapPoints(e,t)}return o}_wrapPoints(t,e){const s=t.geometry;T(s)?this._wrapMultipoint(s,e):this._wrapPoint(t,e)}_wrapMultipoint(t,e){const s=t.points,i=[];let r=0,o=0;for(const[a,h]of s){if(i.push([a+r,h]),r=0,e===K){const t=5*Q;a+o<t?(i.push([e,0]),r=-e):a+o>K-t&&(i.push([-e,0]),r=e)}else a+o<-Q?(i.push([e,0]),r=-e):a+o>K+Q&&(i.push([-e,0]),r=e);o+=a}t.points=i}_wrapPoint(t,e){const s=t.geometry;if(e===K){const i=5*Q;s.x<i?t.geometry={points:[[s.x,s.y],[e,0]]}:s.x>K-i&&(t.geometry={points:[[s.x,s.y],[-e,0]]})}else s.x<-Q?t.geometry={points:[[s.x,s.y],[e,0]]}:s.x>K+Q&&(t.geometry={points:[[s.x,s.y],[-e,0]]})}_processGraphics(t,e,s){if(!(e&&e.length)||!this._meshFactory)return null;const i=V.from(e),r=this._meshFactory;return this._matcher.then((e=>r.analyzeGraphics(i,this.container.stage.resourceManager,e,null,null,s).then((()=>(this._attributeStore.sendUpdates(),this._processAnalyzedGraphics(t,i))))))}_processAnalyzedGraphics(t,e){const s=this._meshFactory,i=e.getSize(),r=e.getCursor(),o={features:i,records:i,metrics:0},a=new z(t.key.id,o,{fill:"default"},!1,!1),h=[];for(;r.next();){const e=r.readGraphic();e.insertAfter=-1===e.insertAfter?-1:this._displayIds.get(e.insertAfter),e.displayId=this._displayIds.get(e.attributes[this.uid]);const i=new q(e.displayId);i.insertAfter=e.insertAfter,h.push(i),s.writeGraphic(a,r,t.level,this.container.stage.resourceManager)}const n=t.tileInfoView.tileInfo.isWrappable,l=a.serialize(n);if(1!==l.length)return new R;const d=l[0].message;return R.fromVertexData(d,h)}_abortProcessingGraphic(t){if(this._graphicIdToAbortController.has(t)){this._graphicIdToAbortController.get(t).abort()}}_getNullSymbol(t){const e=t.geometry;return b(e)?C:y(e)||S(e)?j:P}_flipUpdatingGraphics(){this._updatingGraphicsTimer&&clearTimeout(this._updatingGraphicsTimer),this._updatingGraphicsTimer=setTimeout((()=>{this._updatingGraphicsTimer=null,this.notifyChange("updating")}),160),this.notifyChange("updating")}};t([d({constructOnly:!0})],st.prototype,"requestUpdateCallback",void 0),t([d()],st.prototype,"container",void 0),t([d({constructOnly:!0})],st.prototype,"graphics",void 0),t([d()],st.prototype,"updating",null),t([d()],st.prototype,"view",void 0),t([d()],st.prototype,"updateRequested",void 0),st=t([p("esri.views.2d.layers.support.GraphicsView2D")],st);const it=st;export{it as default};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{bidiText as s}from"../../../../core/BidiText.js";import{HandleOwnerMixin as i}from"../../../../core/HandleOwner.js";import r from"../../../../core/has.js";import{isSome as o,isNone as a}from"../../../../core/maybe.js";import{throwIfAborted as h,isAbortError as n,throwIfAbortError as l}from"../../../../core/promiseUtils.js";import{property as d}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as p}from"../../../../core/accessorSupport/decorators/subclass.js";import c from"../../../../geometry/SpatialReference.js";import{width as g,height as u,create as m}from"../../../../geometry/support/aaBoundingRect.js";import{closeRingsAndFixWinding as _}from"../../../../geometry/support/coordsUtils.js";import{getJsonType as f,isPolygon as y,isPolyline as b,isExtent as S,isPoint as w,isMultipoint as T}from"../../../../geometry/support/jsonUtils.js";import{normalizeCentralMeridianSync as v}from"../../../../geometry/support/normalizeUtilsSync.js";import{getInfo as I}from"../../../../geometry/support/spatialReferenceUtils.js";import{checkProjectionSupport as G,project as U}from"../../../../layers/graphics/data/projectionSupport.js";import{symbolToCIM as M}from"../../../../symbols/cim/CIMSymbolHelper.js";import{errorPolylineSymbol2D as C,errorPolygonSymbol2D as j,errorPointSymbol2D as P}from"../../../../symbols/support/defaults.js";import{FILTER_FLAG_0 as x}from"../../engine/webgl/definitions.js";import{GraphicTile as A}from"../../engine/webgl/GraphicTile.js";import{TileData as R}from"../../engine/webgl/TileData.js";import q from"../../engine/webgl/WGLDisplayObject.js";import{MeshData as D}from"../../engine/webgl/mesh/MeshData.js";import{WGLMeshFactory as O}from"../../engine/webgl/mesh/factories/WGLMeshFactory.js";import{WGLTemplateStore as z}from"../../engine/webgl/mesh/templates/WGLTemplateStore.js";import{createMatcher as F}from"../../engine/webgl/util/Matcher.js";import{createMatcherSchema as H,createSymbolSchema as k}from"../features/schemaUtils.js";import E from"../features/support/AttributeStore.js";import{ComputedAttributeStorage as N}from"../features/support/ComputedAttributeStorage.js";import{GraphicsReader as V}from"../features/support/GraphicsReader.js";import B from"./GraphicStore.js";import{intersectingInternationalDateline as L,isMarkerSymbol as W,isTextSymbol as J,polygonFromExtent as Z,TILE_SIZE as K,PIXEL_BUFFER as Q}from"./graphicsUtils.js";import{expandSymbol as X}from"../support/cimSymbolUtils.js";import{GraphicsView as Y}from"../../../layers/GraphicsView.js";import{getWebGL1Capabilities as $}from"../../../webgl/capabilities.js";const ee=r("esri-2d-graphic-debug");function te(e,t,s){if(s.has(e))return s.get(e);const i={tile:t,addedOrModified:[],removed:[]};return s.set(e,i),i}let se=class extends(Y(i(t))){constructor(e){super(e),this._storage=new N,this._displayIds=new Map,this._controller=new AbortController,this._tiles=new Map,this._graphicStoreUpdate=!1,this._graphicsSet=new Set,this._matcher=Promise.resolve(null),this._tileUpdateSet=new Set,this._tilesToUpdate=new Map,this._graphicIdToAbortController=new Map,this._attached=!1,this._updatingGraphicsTimer=null,this._hashToExpandedSymbol=new Map,this._hashToExpandedSymbolPromise=new Map,this._hashToCIMSymbolPromise=new Map,this._hashToCIM=new Map,this._processing=!1,this._needsProcessing=!1,this._pendingUpdate={added:new Set,updated:new Set,removed:new Set},this.lastUpdateId=-1,this.updateRequested=!1,this.graphicUpdateHandler=this.graphicUpdateHandler.bind(this)}destroy(){this._updatingGraphicsTimer&&(clearTimeout(this._updatingGraphicsTimer),this._updatingGraphicsTimer=null,this.notifyChange("updating")),this._controller.abort(),this.container.destroy(),this._set("graphics",null),this._graphicStore.clear(),this._attributeStore=null,this._hashToExpandedSymbol.clear(),this.view=null,this.renderer=null,this._hashToCIM.clear(),this._hashToCIMSymbolPromise.clear(),this._hashToExpandedSymbolPromise.clear()}_createMatcher(e,t,s){if(e){const i=H({indexCount:0,fields:{}},"feature",e);this._matcher=F(i,t,null,s)}}_createDisplayId(e){return this._displayIds.has(e)||this._displayIds.set(e,this._storage.createDisplayId()),this._displayIds.get(e)}initialize(){this._attributeStore=new E({type:"local",initialize:e=>Promise.resolve(this.container.attributeView.initialize(e)),update:e=>this.container.attributeView.requestUpdate(e),render:()=>this.container.requestRender()},$()),this.container.hasHighlight=()=>this._attributeStore.hasHighlight;const e=e=>{this._createDisplayId(e.uid),this._setFilterState(e.uid,e.visible)},t=e=>{const t=this._displayIds.get(e.uid);this._displayIds.delete(e.uid),this._storage.releaseDisplayId(t)},s=new z(this.container.getMaterialItems.bind(this.container),this.view.featuresTilingScheme.tileInfo);this._graphicStore=new B(this.view.featuresTilingScheme,this.view.state.scale,this.uid,this.graphics,e,t,this._hashToCIM),this._meshFactory=new O(null,this.uid,s),this._templateStore=s,this.handles.add([this.watch("renderer",(e=>{this._createMatcher(e,s,this.container.stage.resourceManager);for(const t of this.graphics)this._pendingUpdate.updated.add(t);this.requestUpdate()})),this.view.graphicsTileStore.on("update",(e=>this._onTileUpdate(e))),this.container.on("attach",(()=>{ee&&this.container.enableRenderingBounds((()=>this._graphicStore.getAllBounds())),this.graphics.items.length>0&&this._graphicsChangeHandler({target:this.graphics,added:this.graphics.items,removed:[],moved:[]}),this.handles.add(this.graphics.on("change",(e=>this._graphicsChangeHandler(e))),"graphics");const e=this.container.stage.resourceManager;this._createMatcher(this.renderer,s,e),this._graphicStore.setResourceManager(e),this._attached=!0,this.notifyChange("updating")}))]);const i=this.view.graphicsTileStore.tiles;this._onTileUpdate({added:i,removed:[]})}get updating(){return!this._attached||null!==this._updatingGraphicsTimer||this._tileUpdateSet.size>0||this._tilesToUpdate.size>0}hitTest(e){if(!this.view||!this.view.position)return null;const{resolution:t,rotation:s}=this.view.state;return this._graphicStore.hitTest(e.x,e.y,2,t,s)}update(e){h(this._controller.signal);const t=e.state,{resolution:s}=t;if(this._graphicStore.updateLevel(s),this._graphicStoreUpdate=!0,this.updateRequested=!1,this._pendingUpdate.updated.size>0){if(!this._processing)return void this._updateGraphics();this._needsProcessing=!0}}viewChange(){this.requestUpdate()}requestUpdate(){this.updateRequested||(this.updateRequested=!0,this.requestUpdateCallback())}processUpdate(e){this.updateRequested&&(this.updateRequested=!1,this.update(e))}graphicUpdateHandler(e){const{graphic:t,property:s,newValue:i}=e;switch(s){case"attributes":break;case"geometry":case"symbol":this._pendingUpdate.updated.add(t),this.requestUpdate();break;case"visible":this._setFilterState(t.uid,i),this._attributeStore.sendUpdates()}}setHighlight(e){const t=e.map((e=>this._displayIds.get(e)));this._attributeStore.setHighlight(e,t)}_getIntersectingTiles(e){const t=this._graphicStore.getBounds(e);if(!t||0===g(t)||0===u(t))return[];const s=L(t,this.view.spatialReference);return o(s)?[...new Set([...this.view.graphicsTileStore.boundsIntersections(s[0]),...this.view.graphicsTileStore.boundsIntersections(s[1])])]:this.view.graphicsTileStore.boundsIntersections(t)}async _updateTile(e){h(this._controller.signal);const t=e.tile,s=this._getGraphicsData(this._templateStore,t,e.addedOrModified),i=await this._processGraphics(t,s);return h(this._controller.signal),this._patchTile(t.key,{type:"update",addOrUpdate:i,remove:e.removed,end:!0,clear:!1,sort:!1}),i}_patchTile(e,t){if(!this._tiles.has(e))return;const s=this._tiles.get(e);this.container.onTileData(s,t),this.container.requestRender()}_graphicsChangeHandler(e){const t=this._pendingUpdate;for(const s of e.added)t.added.add(s);for(const s of e.moved)t.updated.add(s);for(const s of e.removed)this._pendingUpdate.added.has(s)?t.added.delete(s):t.removed.add(s);this._processing?this._needsProcessing=!0:this._updateGraphics()}_getGraphicsToUpdate(){const e={added:[],removed:[],updated:[]};if(!this.graphics)return e;const t=this._pendingUpdate;for(const s of this.graphics.items)t.added.has(s)?e.added.push(s):t.updated.has(s)&&e.updated.push(s);for(const s of t.removed)this._graphicStore.has(s)&&e.removed.push(s);return t.added.clear(),t.removed.clear(),t.updated.clear(),e}async _updateGraphics(){this._processing=!0;const{added:e,removed:t,updated:s}=this._getGraphicsToUpdate(),i=this._tilesToUpdate;let r;try{if(!this._graphicStoreUpdate){const e=this.view.state,{resolution:t}=e;this._graphicStore.updateLevel(t)}const o=[],a=new Array(e.length+t.length);for(let e=0;e<s.length;e++){const t=s[e],h=this._getIntersectingTiles(t);for(const e of h){r=e.id;te(r,e,i).removed.push(this._displayIds.get(t.uid))}o.push(this._updateGraphic(t,null)),a[e]=t}const h=s.length;for(let t=0;t<e.length;t++){const s=e[t];a[h+t]=s,this._graphicsSet.add(s),o.push(this._addGraphic(s))}for(const e of t){this._abortProcessingGraphic(e.uid);const t=this._getIntersectingTiles(e);for(const s of t){r=s.id;te(r,s,i).removed.push(this._displayIds.get(e.uid))}this._graphicsSet.delete(e),this._graphicStore.remove(e)}let n;this._flipUpdatingGraphics(),await Promise.all(o);for(let e=0;e<a.length;e++){n=a[e];const t=this._getIntersectingTiles(n);for(const e of t){r=e.id;te(r,e,i).addedOrModified.push(n)}}this._graphicStore.updateZ();const l=[];for(const[e,t]of i)l.push(this._updateTile(t));await Promise.all(l)}catch(o){n(o),0}for(const a of t)try{const e=await this._getSymbolForGraphic(a,{});if(e){const t=e.hash();this._hashToExpandedSymbol.delete(t)}}catch(o){n(o),0}i.clear(),this.notifyChange("updating"),this._processing=!1,this._needsProcessing&&(this._needsProcessing=!1,this._updateGraphics())}_getArcadeInfo(e){const t=(e.attributes?Object.keys(e.attributes):[]).map((t=>({name:t,alias:t,type:"string"==typeof e.attributes[t]?"esriFieldTypeString":"esriFieldTypeDouble"})));return a(e.geometry)?null:{geometryType:f(e.geometry),spatialReference:c.fromJSON(e.geometry.spatialReference),fields:t}}_getSymbolForGraphic(e,t){return h(this._controller.signal),o(e.symbol)?Promise.resolve(e.symbol):o(this.renderer)?this.renderer.getSymbolAsync(e,{scale:this.view.scale,abortOptions:t}):Promise.resolve(this._getNullSymbol(e))}_getCIMSymbol(e,t,s){let i=this._hashToCIM.get(t);if(i)return Promise.resolve(i);const r=M(e);if(o(r)){if("CIMSymbolReference"===r.type)return i=r,this._hashToCIM.set(t,i),Promise.resolve(i);let e=this._hashToCIMSymbolPromise.get(t);return e||(e=r.fetchCIMSymbol(s).then((e=>(this._hashToCIM.set(t,e.data),this._hashToCIMSymbolPromise.delete(t),e))).catch((e=>(this._hashToCIMSymbolPromise.delete(t),l(e),null))),this._hashToCIMSymbolPromise.set(t,e),e)}return Promise.resolve(null)}_expandCIMSymbol(e,t,s,i){const r=this._hashToExpandedSymbol.get(s);if(r)return Promise.resolve(r);let o=this._hashToExpandedSymbolPromise.get(s);if(o)return o;const a=this.container.stage,h=this._getArcadeInfo(t),n=k(e);return o=X(n,h,a.resourceManager,i),this._hashToExpandedSymbolPromise.set(s,o),o.then((e=>(this._hashToExpandedSymbol.set(s,e),this._hashToExpandedSymbolPromise.delete(s),e))),o}async _getSymbolResources(e,t){h(this._controller.signal);return this.container.stage?this._getSymbolForGraphic(e,t).then((i=>{const r=i.hash();return this._getCIMSymbol(i,r,t).then((i=>a(i)?null:this._expandCIMSymbol(i,e,r,t).then((e=>{const t=e.layers.filter((e=>"text"===e.type&&"string"==typeof e.text));if(t&&t.length>0){const i=new Array(t.length);for(let e=0;e<t.length;e++){const r=t[e],o=[],[a]=s(r.text);for(let e=0;e<a.length;e++)o.push(a.charCodeAt(e));i[e]={symbol:r,id:e,glyphIds:o}}const o=new Map;return this.container.getMaterialItems(i).then((s=>{for(let e=0;e<t.length;e++){const i=t[e];o.set(i.cim,{text:i.text,mosaicItem:s[e].mosaicItem})}return{symbol:e,textInfo:o,hash:r}}))}return{symbol:e,hash:r}}))))})).catch((e=>(l(e),null))):null}async _projectAndNormalizeGeometry(e,t){if(h(this._controller.signal),a(e.geometry)||"mesh"===e.geometry.type)return null;let s=e.geometry;if(y(s)){const e=s.rings;s.rings=e}else if(b(s)){const e=s.paths;s.paths=e}else if(S(s)){const i=await this._getSymbolForGraphic(e,t);if(h(this._controller.signal),W(i.type)||J(i.type)){s=s.center}else s=Z(s)}await G(s.spatialReference,this.view.spatialReference);const i=v(s),r=U(i,s.spatialReference,this.view.spatialReference);return _(r),r}_onTileUpdate(e){const t=I(this.view.spatialReference);if(e.added&&e.added.length>0)for(const s of e.added)this._addNewTile(s,t);if(e.removed&&e.removed.length>0)for(const s of e.removed)this._removeTile(s.key)}async _addGraphic(e){this._abortProcessingGraphic(e.uid),h(this._controller.signal);const t=new AbortController;this._graphicIdToAbortController.set(e.uid,t);const s={signal:t.signal};try{await this._addOrUpdateGraphic(e,s),h(this._controller.signal),this._graphicIdToAbortController.delete(e.uid)}catch(i){if(this._graphicIdToAbortController.delete(e.uid),!n(i))throw i}}_updateGraphic(e,t){h(this._controller.signal);const s=this._projectAndNormalizeGeometry(e,t),i=this._getSymbolResources(e,t);return Promise.all([s,i]).then((([t,s])=>{h(this._controller.signal),this._graphicStore.addOrModify(e,s,t)}))}_addOrUpdateGraphic(e,t){h(this._controller.signal);const s=this._projectAndNormalizeGeometry(e,t),i=this._getSymbolResources(e,t);return Promise.all([s,i]).then((([t,s])=>{h(this._controller.signal),this._graphicsSet.has(e)&&this._graphicStore.addOrModify(e,s,t)}))}_addTile(e){const t=this.view.featuresTilingScheme.getTileBounds(m(),e),s=new A(e,t[0],t[3]);return this._tiles.set(e,s),this.container.addChild(s),s}async _addNewTile(e,t){const s=this._addTile(e.key),i=this._graphicStore.queryTileData(this._templateStore,e);if(0===i.length)return;if(t){const s=Math.round((t.valid[1]-t.valid[0])/e.resolution);for(const e of i)e.geometry&&(w(e.geometry)||T(e.geometry))&&this._wrapPoints(e,s)}const r=e.key;this._tileUpdateSet.add(e.key),this.notifyChange("updating");try{const t={type:"update",clear:!1,addOrUpdate:await this._processGraphics(e,i),remove:[],end:!0,sort:!1};s.patch(t),this._tileUpdateSet.delete(r),this.notifyChange("updating")}catch(o){if(this._tileUpdateSet.delete(r),this.notifyChange("updating"),!n(o))throw o}}_removeTile(e){if(!this._tiles.has(e))return;const t=this._tiles.get(e);this.container.removeChild(t),t.destroy(),this._tiles.delete(e)}_setFilterState(e,t){const s=this._displayIds.get(e),i=this._attributeStore.getHighlightFlag(e);this._attributeStore.setData(s,0,0,i|(t?x:0))}_getGraphicsData(e,t,s){const i=this.view,r=I(i.spatialReference),o=this._graphicStore.getGraphicsData(e,t,s);if(r){const e=Math.round((r.valid[1]-r.valid[0])/t.resolution);for(const t of o)t.geometry&&(w(t.geometry)||T(t.geometry))&&this._wrapPoints(t,e)}return o}_wrapPoints(e,t){const s=e.geometry;T(s)?this._wrapMultipoint(s,t):this._wrapPoint(e,t)}_wrapMultipoint(e,t){const s=e.points,i=[];let r=0,o=0;for(const[a,h]of s){if(i.push([a+r,h]),r=0,t===K){const e=5*Q;a+o<e?(i.push([t,0]),r=-t):a+o>K-e&&(i.push([-t,0]),r=t)}else a+o<-Q?(i.push([t,0]),r=-t):a+o>K+Q&&(i.push([-t,0]),r=t);o+=a}e.points=i}_wrapPoint(e,t){const s=e.geometry;if(t===K){const i=5*Q;s.x<i?e.geometry={points:[[s.x,s.y],[t,0]]}:s.x>K-i&&(e.geometry={points:[[s.x,s.y],[-t,0]]})}else s.x<-Q?e.geometry={points:[[s.x,s.y],[t,0]]}:s.x>K+Q&&(e.geometry={points:[[s.x,s.y],[-t,0]]})}_processGraphics(e,t,s){if(!(t&&t.length)||!this._meshFactory)return null;const i=V.from(t),r=this._meshFactory;return this._matcher.then((t=>r.analyzeGraphics(i,this.container.stage.resourceManager,t,null,null,s).then((()=>(this._attributeStore.sendUpdates(),this._processAnalyzedGraphics(e,i))))))}_processAnalyzedGraphics(e,t){const s=this._meshFactory,i=t.getSize(),r=t.getCursor(),o={features:i,records:i,metrics:0},a=new D(e.key.id,o,{fill:"default"},!1,!1),h=[];for(;r.next();){const t=r.readGraphic();t.insertAfter=-1===t.insertAfter?-1:this._displayIds.get(t.insertAfter),t.displayId=this._displayIds.get(t.attributes[this.uid]);const i=new q(t.displayId);i.insertAfter=t.insertAfter,h.push(i),s.writeGraphic(a,r,e.level,this.container.stage.resourceManager)}const n=e.tileInfoView.tileInfo.isWrappable,l=a.serialize(n);if(1!==l.length)return new R;const d=l[0].message;return R.fromVertexData(d,h)}_abortProcessingGraphic(e){if(this._graphicIdToAbortController.has(e)){this._graphicIdToAbortController.get(e).abort()}}_getNullSymbol(e){const t=e.geometry;return b(t)?C:y(t)||S(t)?j:P}_flipUpdatingGraphics(){this._updatingGraphicsTimer&&clearTimeout(this._updatingGraphicsTimer),this._updatingGraphicsTimer=setTimeout((()=>{this._updatingGraphicsTimer=null,this.notifyChange("updating")}),160),this.notifyChange("updating")}};e([d({constructOnly:!0})],se.prototype,"requestUpdateCallback",void 0),e([d()],se.prototype,"container",void 0),e([d({constructOnly:!0})],se.prototype,"graphics",void 0),e([d()],se.prototype,"updating",null),e([d()],se.prototype,"view",void 0),e([d()],se.prototype,"updateRequested",void 0),se=e([p("esri.views.2d.layers.support.GraphicsView2D")],se);const ie=se;export{ie as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{bidiText as e}from"../../../core/BidiText.js";import{pt2px as t}from"../../../core/screenUtils.js";import{getXAnchorDirection as i,getYAnchorDirection as n}from"../engine/webgl/alignmentUtils.js";import{MAGIC_LABEL_LINE_HEIGHT as o,GLYPH_SIZE as l}from"../engine/webgl/definitions.js";import{shapeGlyphs as a}from"../engine/webgl/mesh/templates/shapingUtils.js";async function s(s,r,m){var f,g,h;const c=i("center"),d=n("middle"),x=r.textureManager.rasterizeItem(s.toJSON(),window.devicePixelRatio||1,null,m),[,p]=e(s.text),u=(await x).glyphMosaicItems;return a(u,p,{angle:null!=(f=s.angle)?f:0,xOffset:t(null!=(g=s.xoffset)?g:0),yOffset:t(null!=(h=s.yoffset)?h:0),lineHeight:o*Math.max(.25,Math.min(s.lineHeight,4)),maxLineWidth:Math.max(32,Math.min(t(s.lineWidth),512)),decoration:s.font.decoration,scale:Math.min(Math.round(t(s.font.size)),127)/l,hAlign:c,vAlign:d,isCIM:!1}).boundsT}export{s as getTextBounds};
5
+ import{bidiText as e}from"../../../core/BidiText.js";import{pt2px as t}from"../../../core/screenUtils.js";import{getXAnchorDirection as n,getYAnchorDirection as i}from"../engine/webgl/alignmentUtils.js";import{MAGIC_LABEL_LINE_HEIGHT as o,GLYPH_SIZE as s}from"../engine/webgl/definitions.js";import{shapeGlyphs as r}from"../engine/webgl/mesh/templates/shapingUtils.js";async function l(l,a,m){var f,g,c;const d=n("center"),h=i("middle"),u=a.textureManager.rasterizeItem(l.toJSON(),window.devicePixelRatio||1,null,m),[,x]=e(l.text),p=(await u).glyphMosaicItems;return r(p,x,{angle:null!=(f=l.angle)?f:0,xOffset:t(null!=(g=l.xoffset)?g:0),yOffset:t(null!=(c=l.yoffset)?c:0),lineHeight:o*Math.max(.25,Math.min(l.lineHeight,4)),maxLineWidth:Math.max(32,Math.min(t(l.lineWidth),512)),decoration:l.font.decoration,scale:Math.min(Math.round(t(l.font.size)),127)/s,hAlign:d,vAlign:h,isCIM:!1}).boundsT}let a=l;async function m(e,t,n){return a(e,t,n)}const f={stubGetTextBounds:e=>a=e,restoreGetTextBounds:()=>a=l};export{m as getTextBounds,f as test};