@arcgis/core 4.33.0-next.20250520 → 4.33.0-next.20250522

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 (624) hide show
  1. package/Graphic.js +1 -1
  2. package/applications/Components/analysisUtils.d.ts +2 -0
  3. package/applications/Components/analysisUtils.js +1 -1
  4. package/arcade/Feature.js +1 -1
  5. package/arcade/featureset/actions/GroupBy.js +1 -1
  6. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  7. package/assets/esri/core/workers/RemoteClient.js +1 -1
  8. package/assets/esri/core/workers/chunks/0a770f283eb77c8dc97a.js +1 -0
  9. package/assets/esri/core/workers/chunks/0dcab04dd1feeb5521cf.js +1 -0
  10. package/assets/esri/core/workers/chunks/{8a2cee726b7843c7408a.js → 0fb5de3f8a4d69b2d514.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{91cd29f53f07bc38fe75.js → 14b3c18581b31c93af82.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{7c819b3e6d69c526f4b2.js → 1c86aa3802d9ae0230ae.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{b53a7040a71b0f1f3854.js → 23f6e98ef22f099f846c.js} +1 -1
  14. package/assets/esri/core/workers/chunks/28b1819bf744ce957dfd.js +2 -0
  15. package/assets/esri/core/workers/chunks/28b1819bf744ce957dfd.js.LICENSE.txt +33 -0
  16. package/assets/esri/core/workers/chunks/{234117cc5cb7c6863313.js → 2d90806faa4269828948.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{e2cada6644c49b1b6e79.js → 36b0d6b4089a96475201.js} +1 -1
  18. package/assets/esri/core/workers/chunks/40f54c4f8ae63c6f3df9.js +1 -0
  19. package/assets/esri/core/workers/chunks/4193c52799aa3b6337c9.js +2 -0
  20. package/assets/esri/core/workers/chunks/{9588328d4ed6b0f04166.js.LICENSE.txt → 4193c52799aa3b6337c9.js.LICENSE.txt} +0 -34
  21. package/assets/esri/core/workers/chunks/42d9989b2aad3ac28d4d.js +1 -0
  22. package/assets/esri/core/workers/chunks/{8a6aac37b3133de74cce.js → 51c31e6d014005107d42.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{66a1b92358344dd28ee1.js → 571252c9822d73cf7b01.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{5c8d52b72a3bea4202ac.js → 634a418310e44e2436e0.js} +1 -1
  25. package/assets/esri/core/workers/chunks/6ee41e9c92ed8ba4c763.js +1 -0
  26. package/assets/esri/core/workers/chunks/{2adf558cd8d8155d07d7.js → 80b596496800e8d60eb8.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{83fcc6f770ad084b8ab9.js → 86023cc5ccbc7ac43479.js} +1 -1
  28. package/assets/esri/core/workers/chunks/a0c35521e677459f6fa3.js +1 -0
  29. package/assets/esri/core/workers/chunks/{2113da9429f6272339d7.js → ac2607f1e8cd2e99907c.js} +3 -3
  30. package/assets/esri/core/workers/chunks/{0a4cece5e96fb7e8a57b.js → b893012bff5dc55e542d.js} +1 -1
  31. package/assets/esri/core/workers/chunks/bf3555f91492a1a3b613.js +1 -0
  32. package/assets/esri/core/workers/chunks/d2ebb72a43d995ed368a.js +1 -0
  33. package/assets/esri/core/workers/chunks/dbe10c20df7e0e563a0b.js +1 -0
  34. package/assets/esri/core/workers/chunks/df933eac03dc63064723.js +1 -0
  35. package/assets/esri/core/workers/chunks/e77371ddbaf4b2d9be8d.js +1 -0
  36. package/assets/esri/core/workers/chunks/{19a58adc75a34f84b0ef.js → ee6240636d04d7d37b7b.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{f74f8ed3f17713a208c3.js → fa63b0f7fa799cb2f81d.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{6c29a768f02dc7ce0ed6.js → fb9e9b9e567e32f37042.js} +1 -1
  39. package/assets/esri/core/workers/chunks/fc61d02286b6ff5447cc.js +1 -0
  40. package/assets/esri/themes/base/_core.scss +2 -0
  41. package/assets/esri/themes/base/widgets/_Editor.scss +40 -2
  42. package/assets/esri/themes/base/widgets/_FeatureForm.scss +4 -0
  43. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +1 -1
  44. package/assets/esri/themes/base/widgets/_OrientedImageryViewerNavigationSettingsUI.scss +16 -0
  45. package/assets/esri/themes/base/widgets/_SelectionList.scss +21 -15
  46. package/assets/esri/themes/base/widgets/_SelectionToolbar.scss +1 -0
  47. package/assets/esri/themes/dark/main.css +1 -1
  48. package/assets/esri/themes/light/main.css +1 -1
  49. package/assets/esri/themes/light/view.css +1 -1
  50. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ar.json +1 -1
  51. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_bg.json +1 -1
  52. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_bs.json +1 -1
  53. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ca.json +1 -1
  54. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_cs.json +1 -1
  55. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_da.json +1 -1
  56. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_de.json +1 -1
  57. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_el.json +1 -1
  58. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_es.json +1 -1
  59. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_et.json +1 -1
  60. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_fi.json +1 -1
  61. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_fr.json +1 -1
  62. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_he.json +1 -1
  63. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_hr.json +1 -1
  64. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_hu.json +1 -1
  65. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_id.json +1 -1
  66. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_it.json +1 -1
  67. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ja.json +1 -1
  68. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ko.json +1 -1
  69. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_lt.json +1 -1
  70. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_lv.json +1 -1
  71. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_nl.json +1 -1
  72. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_no.json +1 -1
  73. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pl.json +1 -1
  74. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pt-BR.json +1 -1
  75. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pt-PT.json +1 -1
  76. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ro.json +1 -1
  77. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ru.json +1 -1
  78. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sk.json +1 -1
  79. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sl.json +1 -1
  80. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sr.json +1 -1
  81. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sv.json +1 -1
  82. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_th.json +1 -1
  83. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_tr.json +1 -1
  84. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_uk.json +1 -1
  85. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_vi.json +1 -1
  86. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-CN.json +1 -1
  87. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-HK.json +1 -1
  88. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-TW.json +1 -1
  89. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm.json +1 -1
  90. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ar.json +1 -1
  91. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bg.json +1 -1
  92. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bs.json +1 -1
  93. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ca.json +1 -1
  94. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_cs.json +1 -1
  95. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_da.json +1 -1
  96. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_de.json +1 -1
  97. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_el.json +1 -1
  98. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_en.json +1 -1
  99. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_es.json +1 -1
  100. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_et.json +1 -1
  101. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fi.json +1 -1
  102. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fr.json +1 -1
  103. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_he.json +1 -1
  104. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hr.json +1 -1
  105. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hu.json +1 -1
  106. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_id.json +1 -1
  107. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_it.json +1 -1
  108. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ja.json +1 -1
  109. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ko.json +1 -1
  110. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lt.json +1 -1
  111. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lv.json +1 -1
  112. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_nl.json +1 -1
  113. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_no.json +1 -1
  114. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pl.json +1 -1
  115. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-BR.json +1 -1
  116. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-PT.json +1 -1
  117. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ro.json +1 -1
  118. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ru.json +1 -1
  119. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sk.json +1 -1
  120. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sl.json +1 -1
  121. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sr.json +1 -1
  122. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sv.json +1 -1
  123. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_th.json +1 -1
  124. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_tr.json +1 -1
  125. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_uk.json +1 -1
  126. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_vi.json +1 -1
  127. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-CN.json +1 -1
  128. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-HK.json +1 -1
  129. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-TW.json +1 -1
  130. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ar.json +1 -1
  131. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_bg.json +1 -1
  132. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_bs.json +1 -1
  133. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ca.json +1 -1
  134. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_cs.json +1 -1
  135. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_da.json +1 -1
  136. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_de.json +1 -1
  137. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_el.json +1 -1
  138. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_es.json +1 -1
  139. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_et.json +1 -1
  140. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_fi.json +1 -1
  141. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_fr.json +1 -1
  142. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_he.json +1 -1
  143. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_hr.json +1 -1
  144. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_hu.json +1 -1
  145. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_id.json +1 -1
  146. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_it.json +1 -1
  147. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ja.json +1 -1
  148. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ko.json +1 -1
  149. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_lt.json +1 -1
  150. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_lv.json +1 -1
  151. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_nl.json +1 -1
  152. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_no.json +1 -1
  153. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_pl.json +1 -1
  154. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_pt-BR.json +1 -1
  155. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_pt-PT.json +1 -1
  156. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ro.json +1 -1
  157. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ru.json +1 -1
  158. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_sk.json +1 -1
  159. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_sl.json +1 -1
  160. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_sr.json +1 -1
  161. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_sv.json +1 -1
  162. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_th.json +1 -1
  163. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_tr.json +1 -1
  164. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_uk.json +1 -1
  165. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_vi.json +1 -1
  166. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_zh-CN.json +1 -1
  167. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_zh-HK.json +1 -1
  168. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_zh-TW.json +1 -1
  169. package/assets/esri/widgets/Editor/t9n/Editor.json +1 -1
  170. package/assets/esri/widgets/Editor/t9n/Editor_en.json +1 -1
  171. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm.json +1 -1
  172. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_en.json +1 -1
  173. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ar.json +1 -1
  174. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bg.json +1 -1
  175. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bs.json +1 -1
  176. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ca.json +1 -1
  177. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_cs.json +1 -1
  178. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_da.json +1 -1
  179. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_de.json +1 -1
  180. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_el.json +1 -1
  181. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_es.json +1 -1
  182. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_et.json +1 -1
  183. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fi.json +1 -1
  184. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fr.json +1 -1
  185. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_he.json +1 -1
  186. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hr.json +1 -1
  187. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hu.json +1 -1
  188. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_id.json +1 -1
  189. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_it.json +1 -1
  190. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ja.json +1 -1
  191. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ko.json +1 -1
  192. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
  193. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lv.json +1 -1
  194. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nl.json +1 -1
  195. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_no.json +1 -1
  196. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pl.json +1 -1
  197. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-BR.json +1 -1
  198. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-PT.json +1 -1
  199. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ro.json +1 -1
  200. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ru.json +1 -1
  201. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sk.json +1 -1
  202. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sl.json +1 -1
  203. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sr.json +1 -1
  204. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sv.json +1 -1
  205. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_th.json +1 -1
  206. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_tr.json +1 -1
  207. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_uk.json +1 -1
  208. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_vi.json +1 -1
  209. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-CN.json +1 -1
  210. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-HK.json +1 -1
  211. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-TW.json +1 -1
  212. package/assets/esri/widgets/Home/t9n/Home_pt-BR.json +1 -1
  213. package/assets/esri/widgets/LayerList/t9n/LayerList_ar.json +1 -1
  214. package/assets/esri/widgets/LayerList/t9n/LayerList_bg.json +1 -1
  215. package/assets/esri/widgets/LayerList/t9n/LayerList_bs.json +1 -1
  216. package/assets/esri/widgets/LayerList/t9n/LayerList_ca.json +1 -1
  217. package/assets/esri/widgets/LayerList/t9n/LayerList_cs.json +1 -1
  218. package/assets/esri/widgets/LayerList/t9n/LayerList_da.json +1 -1
  219. package/assets/esri/widgets/LayerList/t9n/LayerList_de.json +1 -1
  220. package/assets/esri/widgets/LayerList/t9n/LayerList_el.json +1 -1
  221. package/assets/esri/widgets/LayerList/t9n/LayerList_es.json +1 -1
  222. package/assets/esri/widgets/LayerList/t9n/LayerList_et.json +1 -1
  223. package/assets/esri/widgets/LayerList/t9n/LayerList_fi.json +1 -1
  224. package/assets/esri/widgets/LayerList/t9n/LayerList_fr.json +1 -1
  225. package/assets/esri/widgets/LayerList/t9n/LayerList_he.json +1 -1
  226. package/assets/esri/widgets/LayerList/t9n/LayerList_hr.json +1 -1
  227. package/assets/esri/widgets/LayerList/t9n/LayerList_hu.json +1 -1
  228. package/assets/esri/widgets/LayerList/t9n/LayerList_id.json +1 -1
  229. package/assets/esri/widgets/LayerList/t9n/LayerList_it.json +1 -1
  230. package/assets/esri/widgets/LayerList/t9n/LayerList_ja.json +1 -1
  231. package/assets/esri/widgets/LayerList/t9n/LayerList_ko.json +1 -1
  232. package/assets/esri/widgets/LayerList/t9n/LayerList_lt.json +1 -1
  233. package/assets/esri/widgets/LayerList/t9n/LayerList_lv.json +1 -1
  234. package/assets/esri/widgets/LayerList/t9n/LayerList_nl.json +1 -1
  235. package/assets/esri/widgets/LayerList/t9n/LayerList_no.json +1 -1
  236. package/assets/esri/widgets/LayerList/t9n/LayerList_pl.json +1 -1
  237. package/assets/esri/widgets/LayerList/t9n/LayerList_pt-BR.json +1 -1
  238. package/assets/esri/widgets/LayerList/t9n/LayerList_pt-PT.json +1 -1
  239. package/assets/esri/widgets/LayerList/t9n/LayerList_ro.json +1 -1
  240. package/assets/esri/widgets/LayerList/t9n/LayerList_ru.json +1 -1
  241. package/assets/esri/widgets/LayerList/t9n/LayerList_sk.json +1 -1
  242. package/assets/esri/widgets/LayerList/t9n/LayerList_sl.json +1 -1
  243. package/assets/esri/widgets/LayerList/t9n/LayerList_sr.json +1 -1
  244. package/assets/esri/widgets/LayerList/t9n/LayerList_sv.json +1 -1
  245. package/assets/esri/widgets/LayerList/t9n/LayerList_th.json +1 -1
  246. package/assets/esri/widgets/LayerList/t9n/LayerList_tr.json +1 -1
  247. package/assets/esri/widgets/LayerList/t9n/LayerList_uk.json +1 -1
  248. package/assets/esri/widgets/LayerList/t9n/LayerList_vi.json +1 -1
  249. package/assets/esri/widgets/LayerList/t9n/LayerList_zh-CN.json +1 -1
  250. package/assets/esri/widgets/LayerList/t9n/LayerList_zh-HK.json +1 -1
  251. package/assets/esri/widgets/LayerList/t9n/LayerList_zh-TW.json +1 -1
  252. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
  253. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  254. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  255. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  256. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  257. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  258. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  259. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  260. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  261. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
  262. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  263. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  264. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  265. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  266. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  267. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  268. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  269. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  270. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  271. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  272. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  273. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  274. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  275. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  276. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
  277. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  278. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  279. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  280. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  281. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  282. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  283. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  284. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  285. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  286. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  287. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  288. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  289. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  290. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  291. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  292. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  293. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ar.json +1 -1
  294. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_bg.json +1 -1
  295. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_bs.json +1 -1
  296. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ca.json +1 -1
  297. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_cs.json +1 -1
  298. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_da.json +1 -1
  299. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_de.json +1 -1
  300. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_el.json +1 -1
  301. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_es.json +1 -1
  302. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_et.json +1 -1
  303. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_fi.json +1 -1
  304. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_fr.json +1 -1
  305. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_he.json +1 -1
  306. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_hr.json +1 -1
  307. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_hu.json +1 -1
  308. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_id.json +1 -1
  309. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_it.json +1 -1
  310. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ja.json +1 -1
  311. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ko.json +1 -1
  312. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_lt.json +1 -1
  313. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_lv.json +1 -1
  314. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_nl.json +1 -1
  315. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_no.json +1 -1
  316. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pl.json +1 -1
  317. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pt-BR.json +1 -1
  318. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pt-PT.json +1 -1
  319. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ro.json +1 -1
  320. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ru.json +1 -1
  321. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sk.json +1 -1
  322. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sl.json +1 -1
  323. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sr.json +1 -1
  324. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sv.json +1 -1
  325. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_th.json +1 -1
  326. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_tr.json +1 -1
  327. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_uk.json +1 -1
  328. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_vi.json +1 -1
  329. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-CN.json +1 -1
  330. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-HK.json +1 -1
  331. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-TW.json +1 -1
  332. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ar.json +1 -1
  333. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_bg.json +1 -1
  334. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_bs.json +1 -1
  335. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ca.json +1 -1
  336. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_cs.json +1 -1
  337. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_da.json +1 -1
  338. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_de.json +1 -1
  339. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_el.json +1 -1
  340. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_es.json +1 -1
  341. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_et.json +1 -1
  342. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_fi.json +1 -1
  343. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_fr.json +1 -1
  344. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_he.json +1 -1
  345. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_hr.json +1 -1
  346. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_hu.json +1 -1
  347. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_id.json +1 -1
  348. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_it.json +1 -1
  349. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ja.json +1 -1
  350. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ko.json +1 -1
  351. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_lt.json +1 -1
  352. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_lv.json +1 -1
  353. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_nl.json +1 -1
  354. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_no.json +1 -1
  355. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_pl.json +1 -1
  356. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_pt-BR.json +1 -1
  357. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_pt-PT.json +1 -1
  358. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ro.json +1 -1
  359. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ru.json +1 -1
  360. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_sk.json +1 -1
  361. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_sl.json +1 -1
  362. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_sr.json +1 -1
  363. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_sv.json +1 -1
  364. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_th.json +1 -1
  365. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_tr.json +1 -1
  366. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_uk.json +1 -1
  367. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_vi.json +1 -1
  368. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_zh-CN.json +1 -1
  369. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_zh-HK.json +1 -1
  370. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_zh-TW.json +1 -1
  371. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ar.json +1 -1
  372. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_bg.json +1 -1
  373. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_bs.json +1 -1
  374. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ca.json +1 -1
  375. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_cs.json +1 -1
  376. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_da.json +1 -1
  377. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_de.json +1 -1
  378. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_el.json +1 -1
  379. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_es.json +1 -1
  380. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_et.json +1 -1
  381. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_fi.json +1 -1
  382. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_fr.json +1 -1
  383. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_he.json +1 -1
  384. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_hr.json +1 -1
  385. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_hu.json +1 -1
  386. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_id.json +1 -1
  387. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_it.json +1 -1
  388. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ja.json +1 -1
  389. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ko.json +1 -1
  390. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_lt.json +1 -1
  391. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_lv.json +1 -1
  392. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_nl.json +1 -1
  393. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_no.json +1 -1
  394. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_pl.json +1 -1
  395. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_pt-BR.json +1 -1
  396. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_pt-PT.json +1 -1
  397. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ro.json +1 -1
  398. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ru.json +1 -1
  399. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_sk.json +1 -1
  400. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_sl.json +1 -1
  401. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_sr.json +1 -1
  402. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_sv.json +1 -1
  403. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_th.json +1 -1
  404. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_tr.json +1 -1
  405. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_uk.json +1 -1
  406. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_vi.json +1 -1
  407. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_zh-CN.json +1 -1
  408. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_zh-HK.json +1 -1
  409. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_zh-TW.json +1 -1
  410. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ar.json +1 -1
  411. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_bg.json +1 -1
  412. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_bs.json +1 -1
  413. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ca.json +1 -1
  414. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_cs.json +1 -1
  415. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_da.json +1 -1
  416. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_de.json +1 -1
  417. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_el.json +1 -1
  418. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_es.json +1 -1
  419. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_et.json +1 -1
  420. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_fi.json +1 -1
  421. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_fr.json +1 -1
  422. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_he.json +1 -1
  423. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_hr.json +1 -1
  424. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_hu.json +1 -1
  425. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_id.json +1 -1
  426. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_it.json +1 -1
  427. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ja.json +1 -1
  428. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ko.json +1 -1
  429. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_lt.json +1 -1
  430. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_lv.json +1 -1
  431. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_nl.json +1 -1
  432. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_no.json +1 -1
  433. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_pl.json +1 -1
  434. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_pt-BR.json +1 -1
  435. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_pt-PT.json +1 -1
  436. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ro.json +1 -1
  437. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ru.json +1 -1
  438. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_sk.json +1 -1
  439. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_sl.json +1 -1
  440. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_sr.json +1 -1
  441. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_sv.json +1 -1
  442. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_th.json +1 -1
  443. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_tr.json +1 -1
  444. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_uk.json +1 -1
  445. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_vi.json +1 -1
  446. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_zh-CN.json +1 -1
  447. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_zh-HK.json +1 -1
  448. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_zh-TW.json +1 -1
  449. package/chunks/ComponentShader.glsl.js +24 -15
  450. package/core/sanitizerUtils.js +5 -0
  451. package/editing/sharedTemplates/SharedTemplate.js +1 -1
  452. package/editing/sharedTemplates/templateDefinitions/FeatureTemplateDefinition.js +1 -1
  453. package/editing/sharedTemplates/templateDefinitions/GroupTemplateDefinition.js +1 -1
  454. package/editing/sharedTemplates/templateDefinitions/PresetTemplateDefinition.js +1 -1
  455. package/editing/sharedTemplates/templateDefinitions/parts/FeatureTemplateRelationshipPart.js +1 -1
  456. package/editing/sharedTemplates/templateDefinitions/parts/GroupTemplatePart.js +1 -1
  457. package/editing/sharedTemplates/templateDefinitions/parts/PresetTemplatePart.js +1 -1
  458. package/interfaces.d.ts +242 -4
  459. package/layers/IntegratedMeshLayer.js +1 -1
  460. package/layers/OrientedImageryLayer.js +1 -1
  461. package/layers/WMSLayer.js +1 -1
  462. package/layers/graphics/data/QueryEngineCapabilities.js +1 -1
  463. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  464. package/layers/mixins/ArcGISImageService.js +1 -1
  465. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  466. package/layers/support/VideoElement.js +1 -1
  467. package/layers/support/capabilities.js +1 -1
  468. package/layers/support/rasterFunctions/clipUtils.js +1 -1
  469. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  470. package/libs/maquette/projection.js +1 -1
  471. package/networks/CircuitManager.js +5 -0
  472. package/networks/UnitIdentifierManager.js +5 -0
  473. package/networks/support/UNTraceConfiguration.js +1 -1
  474. package/package.json +2 -2
  475. package/request.js +1 -1
  476. package/rest/featureService/FeatureService.js +1 -1
  477. package/rest/knowledgeGraph/GraphAddNamedTypesResult.d.ts +4 -0
  478. package/rest/knowledgeGraph/GraphDeleteNamedTypeResult.d.ts +4 -0
  479. package/rest/knowledgeGraphService.d.ts +2 -0
  480. package/rest/networks/circuits/exportCircuits.js +5 -0
  481. package/rest/networks/circuits/queryCircuits.js +1 -1
  482. package/rest/networks/circuits/support/ExportCircuitsParameters.js +5 -0
  483. package/rest/networks/circuits/support/ExportCircuitsResult.js +5 -0
  484. package/rest/networks/circuits/support/QueryCircuitsParameters.js +1 -1
  485. package/rest/networks/circuits/support/QueryCircuitsResult.js +1 -1
  486. package/rest/networks/circuits/support/VerifyCircuitsResult.js +1 -1
  487. package/rest/networks/unitIdentifiers/support/UnitQueryResult.js +1 -1
  488. package/rest/query/executeQuery.js +1 -1
  489. package/rest/query/executeQueryJSON.js +1 -1
  490. package/rest/query/executeQueryPBF.js +1 -1
  491. package/rest/query.js +1 -1
  492. package/smartMapping/renderers/support/spikeUtils.js +1 -1
  493. package/support/revision.js +1 -1
  494. package/views/2d/LabelManager.js +1 -1
  495. package/views/2d/engine/imagery/RasterBitmap.js +1 -1
  496. package/views/2d/engine/vectorTiles/VectorTileFeatureIndex.js +1 -1
  497. package/views/2d/engine/vectorTiles/decluttering/SymbolDeclutterer.js +1 -1
  498. package/views/2d/engine/vectorTiles/decluttering/core.js +1 -1
  499. package/views/2d/engine/webgl/FeatureTile.js +1 -1
  500. package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
  501. package/views/2d/engine/webgl/collisions/LabelMetric.js +1 -1
  502. package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapTechnique.js +1 -1
  503. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  504. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
  505. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/ReprojectTechnique.js +1 -1
  506. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/BaseRasterColorizerShader.js +1 -1
  507. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  508. package/views/2d/layers/features/FeatureContainer.js +1 -1
  509. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  510. package/views/2d/layers/support/vectorTileDebugUtils.js +1 -1
  511. package/views/3d/FocusAreasView.js +1 -1
  512. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
  513. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  514. package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
  515. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
  516. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
  517. package/views/3d/layers/I3SMeshView3D.js +1 -1
  518. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  519. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  520. package/views/3d/layers/SceneLayerView3D.js +1 -1
  521. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  522. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  523. package/views/3d/layers/i3s/enums.js +1 -1
  524. package/views/3d/terrain/TerrainRenderer.js +1 -1
  525. package/views/3d/terrain/TileRenderer.js +1 -1
  526. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  527. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
  528. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  529. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  530. package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
  531. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  532. package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
  533. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  534. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
  535. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  536. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  537. package/views/3d/webgl-engine/lib/Material.js +1 -1
  538. package/views/3d/webgl-engine/lib/RenderSlot.js +1 -1
  539. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  540. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  541. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  542. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  543. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  544. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  545. package/views/FocusArea.js +1 -1
  546. package/views/FocusAreaOutline.js +1 -1
  547. package/views/FocusAreaOutlineItem.js +1 -1
  548. package/views/support/LayerLayerViewInfo.js +1 -1
  549. package/views/support/LayerViewManager.js +1 -1
  550. package/views/support/TextureCompressionWorker.js +1 -1
  551. package/views/support/TextureCompressionWorkerHandle.js +1 -1
  552. package/views/ui/UI.js +1 -1
  553. package/views/webgl/RenderingContext.js +1 -1
  554. package/views/webgl/Texture.js +1 -1
  555. package/views/webgl/rasterUtils.js +1 -1
  556. package/webscene/Slide.js +1 -1
  557. package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.js +1 -1
  558. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  559. package/widgets/BatchAttributeForm.js +1 -1
  560. package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.js +1 -1
  561. package/widgets/DirectionalPad.js +1 -1
  562. package/widgets/Editor/EditorViewModel.js +1 -1
  563. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  564. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  565. package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
  566. package/widgets/Editor/UpdateWorkflow.js +1 -1
  567. package/widgets/Editor/VisibleElements.js +1 -1
  568. package/widgets/Editor/components/FooterActions.js +1 -1
  569. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  570. package/widgets/Editor/css.js +1 -1
  571. package/widgets/Editor.js +1 -1
  572. package/widgets/FeatureForm/TextElementInput.js +1 -1
  573. package/widgets/FeatureForm/css.js +1 -1
  574. package/widgets/FeatureForm.js +1 -1
  575. package/widgets/FeatureTable/AttachmentsColumn.js +1 -1
  576. package/widgets/FeatureTable/FieldColumn.js +1 -1
  577. package/widgets/FeatureTable/Grid/Column.js +1 -1
  578. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  579. package/widgets/FeatureTable/Grid/support/ButtonMenu.js +1 -1
  580. package/widgets/FeatureTable/support/exportUtils.js +1 -1
  581. package/widgets/FeatureTable.js +1 -1
  582. package/widgets/LineOfSight/LineOfSightViewModel.js +1 -1
  583. package/widgets/NavigationToggle/NavigationToggleViewModel.js +1 -1
  584. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  585. package/widgets/OrientedImageryViewer/components/Alert.js +5 -0
  586. package/widgets/OrientedImageryViewer/components/ImageViewer.js +1 -1
  587. package/widgets/OrientedImageryViewer/components/NavigationActions.js +5 -0
  588. package/widgets/OrientedImageryViewer/components/NavigationSettings.js +5 -0
  589. package/widgets/OrientedImageryViewer/components/NavigationUI.js +1 -1
  590. package/widgets/OrientedImageryViewer/components/SequentialNavigationUI.js +5 -0
  591. package/widgets/OrientedImageryViewer/css.js +1 -1
  592. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  593. package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +1 -1
  594. package/widgets/OrientedImageryViewer/navigation/errors.js +1 -1
  595. package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
  596. package/widgets/OrientedImageryViewer.js +1 -1
  597. package/widgets/PanoramicViewer.js +1 -1
  598. package/widgets/ScaleRangeSlider/ScaleRangeSliderViewModel.js +1 -1
  599. package/widgets/Sketch.js +1 -1
  600. package/widgets/Slice/SliceViewModel.js +1 -1
  601. package/widgets/Weather/WeatherViewModel.js +1 -1
  602. package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
  603. package/widgets/support/SelectionList/VisibleElements.js +1 -1
  604. package/widgets/support/SelectionList.js +1 -1
  605. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  606. package/widgets/support/SelectionToolbar/VisibleElements.js +1 -1
  607. package/widgets/support/SelectionToolbar.js +1 -1
  608. package/widgets/support/Selector2D/SelectionOperation.js +1 -1
  609. package/widgets/support/Selector2D/selectorUtils.js +1 -1
  610. package/widgets/support/widget.js +1 -1
  611. package/widgets/support/widgetUtils.js +1 -1
  612. package/assets/esri/core/workers/chunks/0c50ee1f3cdd30d96479.js +0 -1
  613. package/assets/esri/core/workers/chunks/133e4bde346828d4510b.js +0 -1
  614. package/assets/esri/core/workers/chunks/47fe2379f2214bf50036.js +0 -1
  615. package/assets/esri/core/workers/chunks/5228d39c05d660a135b6.js +0 -1
  616. package/assets/esri/core/workers/chunks/5f4ca51b82daf0e51010.js +0 -1
  617. package/assets/esri/core/workers/chunks/7a9a0383f27f4967bcfa.js +0 -1
  618. package/assets/esri/core/workers/chunks/8fda0a5b247385e68dc0.js +0 -1
  619. package/assets/esri/core/workers/chunks/938f1eebc48871be64e9.js +0 -1
  620. package/assets/esri/core/workers/chunks/9588328d4ed6b0f04166.js +0 -2
  621. package/assets/esri/core/workers/chunks/9839309d0cd804fe52c2.js +0 -1
  622. package/assets/esri/core/workers/chunks/be2c8c0a8b2bce7979b6.js +0 -1
  623. package/assets/esri/core/workers/chunks/f218a190015de1444018.js +0 -1
  624. package/assets/esri/core/workers/chunks/f9567108862629f25c8b.js +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{on as t}from"../../../../core/events.js";import e from"../../../../core/Handles.js";import{disposeMaybe as r}from"../../../../core/maybe.js";import{when as i,initial as o}from"../../../../core/reactiveUtils.js";import{createScreenPoint as s}from"../../../../core/screenUtils.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import a from"../../../../geometry/Point.js";import h from"../../../../geometry/Polygon.js";import{project as l}from"../../../../geometry/projection.js";import{DisplayObject as u}from"../DisplayObject.js";import m from"../../../layers/support/Geometry.js";import{TextureWrapMode as d}from"../../../webgl/enums.js";import{Texture as c}from"../../../webgl/Texture.js";import{TextureDescriptor as p}from"../../../webgl/TextureDescriptor.js";const f=2;class x extends u{constructor(r){super(),this.element=r,this._handles=new e,this.isWrapAround=!1,this.perspectiveTransform=n(),this.wrapAroundShift=0,this.clipGeometry=null,this._handles.add(i((()=>this.element),(()=>{const e=this.element;this.ready(),e&&this._handles.add(t(e,"play",(()=>this.requestRender())))}),o))}getMesh(t){throw new Error("Method not implemented.")}destroy(){this._handles.destroy(),this.texture=r(this.texture)}get textureSize(){if(!this.texture)return[1,1];const t=this.texture.descriptor;return[t.width,t.height]}get dvsMat3(){return this.parent.dvsMat3}beforeRender(t){const e=this.element;if(null==e)return;const{context:r}=t,{videoWidth:i,videoHeight:o}=e;if(0!==i&&0!==o){if(this.texture)e.paused||this.texture.setData(e);else{const t=new p;t.wrapMode=d.CLAMP_TO_EDGE,t.preMultiplyAlpha=!0,t.width=i,t.height=o,this.texture=new c(r,t,e)}e.paused||(this.texture.generateMipmap(),this.requestRender()),super.beforeRender(t)}}_createTransforms(){return null}updateDrawCoords(t,e,r,i){const o=this.element,s=this._getFrameInfo();if(!o||!s)return;this._initializeData(t,s,r);const{controlPoints:n,horizon:a}=s,u=Math.sqrt(n.length),d=u,{x:c,y:p}=t,x=this._vertices,y=n[0],g=n[u-1],P=n[(d-1)*u],w=n[(d-1)*u+u-1],_=l(a?a[0].mapPoint:y.mapPoint,r),v=l(a?a[1].mapPoint:g.mapPoint,r),j=l(P.mapPoint,r),A=l(w.mapPoint,r);this.clipGeometry=a?new m({geometry:h.fromJSON({rings:[[[j.x,j.y],[A.x,A.y],[v.x,v.y],[_.x,_.y],[j.x,j.y]]],spatialReference:r})}):null;for(let h=0;h<n.length;h++){const t=n[h],{sourcePoint:e,mapPoint:i}=t;if(null==e||null==i)continue;const o=l(i,r);x[h*f+0]=o.x-c,x[h*f+1]=o.y-p}let M=e;if(i){const t=Math.min(_.x,v.x,j.x,A.x),e=Math.max(_.x,v.x,j.x,A.x),{worldWidth:r,xBounds:o}=i,[s,n]=o;t<s&&e>s?M=r:e>n&&t<n&&(M=-r)}this.wrapAroundShift=M,this.isWrapAround=0!==M}draw(t,e){this.isReady&&this._vertices&&this._indices&&this._texCoords?e.render(t,{transform:{dvs:this.dvsMat3},config:{perspective:this.perspectiveTransform,texSize:this.textureSize,wrapAroundShift:this.wrapAroundShift,isWrapAround:this.isWrapAround,opacity:this.opacity,texture:{texture:this.texture,unit:0}},position:this._vertices,tex:this._texCoords,index:this._indices}):this.requestRender()}_initializeData(t,e,r){if(null!=this._vertices&&null!=this._indices)return;const{controlPoints:i}=e,o=Math.sqrt(i.length),s=o,n=new Float32Array(f*i.length),a=new Uint16Array(2*i.length);for(let m=0;m<i.length;m++){const e=i[m],{sourcePoint:o,mapPoint:s}=e;if(null==o||null==s)continue;const h=l(s,r);n[m*f+0]=h.x-t.x,n[m*f+1]=h.y-t.y,a[2*m+0]=o.x,a[2*m+1]=o.y}const h=new Uint16Array(s*o+(s-2)*(o+2));let u=0;for(let l=0;l<s;l++){for(let t=0;t<o;t++)h[u++]=l*o+t,h[u++]=(l+1)*o+t;l<s-2&&(h[u++]=(l+1)*o+(o-1),h[u++]=(l+1)*o)}this._vertices=n,this._texCoords=a,this._indices=h}_getFrameInfo(){if(!this.groundControlPoints)return null;const t=this._getFrameControlPoints(),e=this.frameHorizonPoints;let r=null;if(e){const t=e.startX,i=e.startY,o=e.endX,n=e.endY;r=[{sourcePoint:s(t,i),mapPoint:new a(e.startLongitude,e.startLatitude)},{sourcePoint:s(o,n),mapPoint:new a(e.endLongitude,e.endLatitude)}]}return{controlPoints:t,horizon:r}}_getFrameControlPoints(){const t=this.groundControlPoints,e=t?.length;if(!e)return[];const r=new Array(e),i=Math.max(...t.map((({x:t})=>t))),o=this.element.videoWidth/i;for(let n=0;n<e;n++){const{x:e,y:i,lat:h,lon:l}=t[n];r[n]={sourcePoint:s(e*o,-i*o),mapPoint:new a(l,h)}}return r}}export{x as default};
5
+ import{on as t}from"../../../../core/events.js";import e from"../../../../core/Handles.js";import{disposeMaybe as r}from"../../../../core/maybe.js";import{when as i,initial as s}from"../../../../core/reactiveUtils.js";import{createScreenPoint as o}from"../../../../core/screenUtils.js";import{create as n}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import a from"../../../../geometry/Point.js";import h from"../../../../geometry/Polygon.js";import{project as l}from"../../../../geometry/projection.js";import{DisplayObject as u}from"../DisplayObject.js";import m from"../../../layers/support/Geometry.js";import{TextureWrapMode as d}from"../../../webgl/enums.js";import{Texture as c}from"../../../webgl/Texture.js";import{TextureDescriptor as p}from"../../../webgl/TextureDescriptor.js";const f=2;class x extends u{constructor(r){super(),this.element=r,this._handles=new e,this.isWrapAround=!1,this.perspectiveTransform=n(),this.wrapAroundShift=0,this.clipGeometry=null,this._handles.add(i((()=>this.element),(()=>{const e=this.element;this.ready(),e&&this._handles.add(t(e,"play",(()=>this.requestRender())))}),s))}getMesh(t){throw new Error("Method not implemented.")}destroy(){this._handles.destroy(),this.texture=r(this.texture)}get textureSize(){if(!this.texture)return[1,1];const t=this.texture.descriptor;return[t.width,t.height]}get dvsMat3(){return this.parent.dvsMat3}beforeRender(t){const e=this.element;if(null==e)return;const{context:r}=t,{videoWidth:i,videoHeight:s}=e;if(0!==i&&0!==s){if(this.texture)e.paused||this.texture.setData(e);else{const t=new p;t.wrapMode=d.CLAMP_TO_EDGE,t.preMultiplyAlpha=!0,t.width=i,t.height=s,this.texture=new c(r,t,e)}e.paused||(this.texture.generateMipmap(),this.requestRender()),super.beforeRender(t)}}_createTransforms(){return null}updateDrawCoords(t,e,r,i){const s=this.element,o=this._getFrameInfo();if(!s||!o)return;this._initializeData(t,o,r);const{controlPoints:n,horizon:a}=o,u=Math.sqrt(n.length),d=u,{x:c,y:p}=t,x=this._vertices,y=n[0],g=n[u-1],P=n[(d-1)*u],w=n[(d-1)*u+u-1],_=l(a?a[0].mapPoint:y.mapPoint,r),v=l(a?a[1].mapPoint:g.mapPoint,r),j=l(P.mapPoint,r),A=l(w.mapPoint,r);this.clipGeometry=a?new m({geometry:h.fromJSON({rings:[[[j.x,j.y],[A.x,A.y],[v.x,v.y],[_.x,_.y],[j.x,j.y]]],spatialReference:r})}):null;for(let h=0;h<n.length;h++){const t=n[h],{sourcePoint:e,mapPoint:i}=t;if(null==e||null==i)continue;const s=l(i,r);x[h*f+0]=s.x-c,x[h*f+1]=s.y-p}let M=e;if(i){const t=Math.min(_.x,v.x,j.x,A.x),e=Math.max(_.x,v.x,j.x,A.x),{worldWidth:r,xBounds:s}=i,[o,n]=s;t<o&&e>o?M=r:e>n&&t<n&&(M=-r)}this.wrapAroundShift=M,this.isWrapAround=0!==M}draw(t,e){this.visible&&(this.isReady&&this._vertices&&this._indices&&this._texCoords?e.render(t,{transform:{dvs:this.dvsMat3},config:{perspective:this.perspectiveTransform,texSize:this.textureSize,wrapAroundShift:this.wrapAroundShift,isWrapAround:this.isWrapAround,opacity:this.opacity,texture:{texture:this.texture,unit:0}},position:this._vertices,tex:this._texCoords,index:this._indices}):this.requestRender())}_initializeData(t,e,r){if(null!=this._vertices&&null!=this._indices)return;const{controlPoints:i}=e,s=Math.sqrt(i.length),o=s,n=new Float32Array(f*i.length),a=new Uint16Array(2*i.length);for(let m=0;m<i.length;m++){const e=i[m],{sourcePoint:s,mapPoint:o}=e;if(null==s||null==o)continue;const h=l(o,r);n[m*f+0]=h.x-t.x,n[m*f+1]=h.y-t.y,a[2*m+0]=s.x,a[2*m+1]=s.y}const h=new Uint16Array(o*s+(o-2)*(s+2));let u=0;for(let l=0;l<o;l++){for(let t=0;t<s;t++)h[u++]=l*s+t,h[u++]=(l+1)*s+t;l<o-2&&(h[u++]=(l+1)*s+(s-1),h[u++]=(l+1)*s)}this._vertices=n,this._texCoords=a,this._indices=h}_getFrameInfo(){if(!this.groundControlPoints)return null;const t=this._getFrameControlPoints(),e=this.frameHorizonPoints;let r=null;if(e){const t=e.startX,i=e.startY,s=e.endX,n=e.endY;r=[{sourcePoint:o(t,i),mapPoint:new a(e.startLongitude,e.startLatitude)},{sourcePoint:o(s,n),mapPoint:new a(e.endLongitude,e.endLatitude)}]}return{controlPoints:t,horizon:r}}_getFrameControlPoints(){const t=this.groundControlPoints,e=t?.length;if(!e)return[];const r=new Array(e),i=Math.max(...t.map((({x:t})=>t))),s=this.element.videoWidth/i;for(let n=0;n<e;n++){const{x:e,y:i,lat:h,lon:l}=t[n];r[n]={sourcePoint:o(e*s,-i*s),mapPoint:new a(l,h)}}return r}}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.33/esri/copyright.txt for details.
4
4
  */
5
- import{numericHash as e}from"../../../../../core/string.js";import{labelPlacementOffsetPadding as i}from"../definitions.js";import{VVBinding as t}from"../enums.js";import s from"./BoundingBox.js";import{serializeList as r,deserializeList as n}from"../util/serializationUtils.js";const a=2;class h{constructor(i,t,s,r,n,a,h,o,l,d,c=[],u=0,f=0){this.displayId=i,this.labelId=t,this.labelClassId=s,this.anchorX=r,this.anchorY=n,this.directionX=a,this.directionY=h,this.maxScale=o,this.minScale=l,this.referenceBounds=d,this.bounds=c,this.recordStart=u,this.recordCount=f,this.priority=0,this._colliders=null,this.uniqueSymbol=null,this.selectedForRendering=!1,this.hash=e(`${i}${t}${s}`)}get xTile(){return this.anchorX}get yTile(){return this.anchorY}colliders(e){if(!this._colliders){const s=e.attributeView,r=i;let n=this.referenceBounds?.size??0;const h=e.layerView.labelingCollisionInfos[0].vvEvaluators[0];if(null!=h){const e=h(s.getVisualVariableData(this.displayId,t.SIZE));n=isNaN(e)||null==e||e===1/0?n:e}const o=this.minScale?e.layerView.view.featuresTilingScheme.scaleToZoom(this.minScale):0,l=this.maxScale?e.layerView.view.featuresTilingScheme.scaleToZoom(this.maxScale):25,d=this.directionX*(r+n/2),c=this.directionY*(r+n/2);this._colliders=this.bounds.map((e=>({xTile:this.anchorX,yTile:this.anchorY,dxPixels:e.x-e.halfWidth+d,dyPixels:e.y-e.halfHeight+c,hard:!0,partIndex:1,width:e.width+a,height:e.height+a,angle:0,xScreen:0,yScreen:0,dxScreen:0,dyScreen:0,enabled:!0,minLod:o,maxLod:l})))}return this._colliders}get featureID(){return this.displayId}serialize(e){e.push(this.displayId),e.push(this.labelId),e.push(this.labelClassId),e.push(this.recordStart),e.push(this.recordCount),e.writeF32(this.anchorX),e.writeF32(this.anchorY),e.writeF32(this.directionX),e.writeF32(this.directionY),e.writeF32(this.maxScale),e.writeF32(this.minScale),this.referenceBounds?(e.writeF32(this.referenceBounds.size),e.writeF32(this.referenceBounds.offsetX),e.writeF32(this.referenceBounds.offsetY)):(e.writeF32(0),e.writeF32(0),e.writeF32(0)),r(e,this.bounds)}static deserialize(e){const i=e.readInt32(),t=e.readInt32(),r=e.readInt32(),a=e.readInt32(),o=e.readInt32(),l=e.readF32(),d=e.readF32(),c=e.readF32(),u=e.readF32(),f=e.readF32(),m=e.readF32(),F=e.readF32(),w=e.readF32(),p=e.readF32(),S=n(e,s)??[];return new h(i,t,r,l,d,c,u,f,m,{size:F,offsetX:w,offsetY:p},S,a,o)}}export{h as LabelMetric};
5
+ import{labelPlacementOffsetPadding as e}from"../definitions.js";import{VVBinding as i}from"../enums.js";import t from"./BoundingBox.js";import{serializeList as s,deserializeList as r}from"../util/serializationUtils.js";const h=2;class n{constructor(e,i,t,s,r,h,n,a,o,l,d=[],c=0,u=0){this.displayId=e,this.labelClassId=i,this.hash=t,this.anchorX=s,this.anchorY=r,this.directionX=h,this.directionY=n,this.maxScale=a,this.minScale=o,this.referenceBounds=l,this.bounds=d,this.recordStart=c,this.recordCount=u,this.priority=0,this._colliders=null,this.uniqueSymbol=null,this.selectedForRendering=!1}get xTile(){return this.anchorX}get yTile(){return this.anchorY}colliders(t){if(!this._colliders){const s=t.attributeView,r=e;let n=this.referenceBounds?.size??0;const a=t.layerView.labelingCollisionInfos[0].vvEvaluators[0];if(null!=a){const e=a(s.getVisualVariableData(this.displayId,i.SIZE));n=isNaN(e)||null==e||e===1/0?n:e}const o=this.minScale?t.layerView.view.featuresTilingScheme.scaleToZoom(this.minScale):0,l=this.maxScale?t.layerView.view.featuresTilingScheme.scaleToZoom(this.maxScale):25,d=this.directionX*(r+n/2),c=this.directionY*(r+n/2);this._colliders=this.bounds.map((e=>({xTile:this.anchorX,yTile:this.anchorY,dxPixels:e.x-e.halfWidth+d,dyPixels:e.y-e.halfHeight+c,hard:!0,partIndex:1,width:e.width+h,height:e.height+h,angle:0,xScreen:0,yScreen:0,dxScreen:0,dyScreen:0,enabled:!0,minLod:o,maxLod:l})))}return this._colliders}get id(){return this.displayId}serialize(e){e.push(this.displayId),e.push(this.labelClassId),e.push(this.hash),e.push(this.recordStart),e.push(this.recordCount),e.writeF32(this.anchorX),e.writeF32(this.anchorY),e.writeF32(this.directionX),e.writeF32(this.directionY),e.writeF32(this.maxScale),e.writeF32(this.minScale),this.referenceBounds?(e.writeF32(this.referenceBounds.size),e.writeF32(this.referenceBounds.offsetX),e.writeF32(this.referenceBounds.offsetY)):(e.writeF32(0),e.writeF32(0),e.writeF32(0)),s(e,this.bounds)}static deserialize(e){const i=e.readInt32(),s=e.readInt32(),h=e.readInt32(),a=e.readInt32(),o=e.readInt32(),l=e.readF32(),d=e.readF32(),c=e.readF32(),u=e.readF32(),f=e.readF32(),m=e.readF32(),F=e.readF32(),w=e.readF32(),S=e.readF32(),p=r(e,t)??[];return new n(i,s,h,l,d,c,u,f,m,{size:F,offsetX:w,offsetY:S},p,a,o)}}export{n as LabelMetric};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{WGLDrawPhase as e}from"../../../enums.js";import{FeatureTechnique as t}from"../FeatureTechnique.js";import{isHittest as r,getSelectionDefines as s,getFeatureUniforms as i}from"../featureTechniqueUtils.js";import{TechniqueType as n}from"../TechniqueType.js";import{HeatmapResources as o}from"./HeatmapResources.js";import{HeatmapAccumulateShader as u}from"../shaders/HeatmapAccumulateShader.js";import{HeatmapResolveShader as a}from"../shaders/HeatmapResolveShader.js";import{StencilOperation as d,CompareFunction as l,FramebufferBit as h,TextureSamplingMode as c}from"../../../../../../webgl/enums.js";class p extends t{constructor(){super(...arguments),this.type=n.Heatmap,this.drawPhase=e.MAP|e.HITTEST|e.DEBUG,this.shaders={accumulate:new u,resolve:new a},this._isBound=!1,this._resources=new Map}shutdown(e){super.shutdown(e),this._resources.get(e)?.destroy(),this._resources.delete(e),this._prevFBO=null,this._unbind()}render(e,t){const{context:n,painter:o,state:u}=e,a=t.instance.getInput(),{isFieldActive:d}=a.uniforms,l=this._getOrCreateResourcesRecord(n),h=l.loadQualityProfile(n);r(e)||this._bind(e,l,a),o.setShader({shader:this.shaders.accumulate,uniforms:{...i(e,t.target),kernelControls:{radius:g(a,u),isFieldActive:d?1:0}},defines:{...s(e),...h.defines},optionalAttributes:{},useComputeBuffer:r(e)});const c=r(e)?w:_;o.setPipelineState(c),o.submitDraw(e,t)}getStencilReference(e){return f(e)}renderResolvePass(e,t){if(r(e))return;const{context:s,painter:i}=e,n=this._resources.get(s);if(null==this._prevFBO||null==this._prevViewport||!n?.initialized)return;const{defines:o}=n.loadQualityProfile(s),{minDensity:u,maxDensity:a,radius:d}=t.getInput().uniforms,l=8,h=9,c=n.accumulateFramebuffer,p=n.resolveGradientTexture,m={shader:this.shaders.resolve,uniforms:{accumulatedDensity:{texture:{unit:l,texture:c.colorTexture},minAndInvRange:[u,1/(a-u)],normalization:3/(d*d*Math.PI)},gradient:{texture:{unit:h,texture:p}}},defines:o,optionalAttributes:{},useComputeBuffer:!1};s.bindFramebuffer(this._prevFBO),s.setViewport(0,0,this._prevViewport.width,this._prevViewport.height),s.bindTexture(c.colorTexture,l),s.bindTexture(p,h),i.setPipelineState(b),i.submitDrawMesh(s,m,i.quadMesh),this._unbind()}_getOrCreateResourcesRecord(e){let t=this._resources.get(e);return null==t&&(t=new o,this._resources.set(e,t)),t}_unbind(){this._prevFBO=null,this._prevViewport=null,this._isBound=!1}_bind(e,t,r){if(this._isBound)return;const{context:s,state:i,pixelRatio:n}=e,o=s.getBoundFramebufferObject(),u=s.getViewport();this._prevFBO=o,this._prevViewport=u;const{gradient:a,gradientHash:d}=r.uniforms;t.ensureResolveGradientTexture(s,d,a);const{width:l,height:p}=u,f=m(g(r,i),n),_=l*f,w=p*f,b=t.ensureAccumulateFBO(s,_,w);s.blitFramebuffer(o,b,0,0,o.width,o.height,0,0,b.width,b.height,h.STENCIL,c.NEAREST),s.bindFramebuffer(b),s.setViewport(0,0,b.width,b.height),s.setColorMask(!0,!0,!0,!0),s.setClearColor(0,0,0,0),s.clear(h.COLOR),this._isBound=!0}}function m(e,t){const r=t>1.5?.25:.5;return e<1/(2*r)?1:r}function f(e){return e.key.level+1}const _={color:{write:[!0,!0,!0,!0],blendMode:"additive"},depth:!1,stencil:{write:!1,test:{ref:f,compare:l.GEQUAL,mask:255,op:{fail:d.KEEP,zFail:d.KEEP,zPass:d.REPLACE}}}},w={..._,stencil:!1},b={color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:!1};function g(e,t){const{referenceScale:r,radius:s}=e.uniforms;return s*(0!==r?r/t.scale:1)}export{p as HeatmapTechnique};
5
+ import{WGLDrawPhase as e}from"../../../enums.js";import{FeatureTechnique as t}from"../FeatureTechnique.js";import{isHittest as r,getSelectionDefines as s,getFeatureUniforms as i}from"../featureTechniqueUtils.js";import{TechniqueType as n}from"../TechniqueType.js";import{HeatmapResources as o}from"./HeatmapResources.js";import{HeatmapAccumulateShader as u}from"../shaders/HeatmapAccumulateShader.js";import{HeatmapResolveShader as a}from"../shaders/HeatmapResolveShader.js";import{StencilOperation as l,CompareFunction as d,FramebufferBit as c}from"../../../../../../webgl/enums.js";class h extends t{constructor(){super(...arguments),this.type=n.Heatmap,this.drawPhase=e.MAP|e.HITTEST|e.DEBUG,this.shaders={accumulate:new u,resolve:new a},this._isBound=!1,this._resources=new Map}shutdown(e){super.shutdown(e),this._resources.get(e)?.destroy(),this._resources.delete(e),this._prevFBO=null,this._unbind()}render(e,t){const{context:n,painter:o,state:u}=e,a=t.instance.getInput(),{isFieldActive:l}=a.uniforms,d=this._getOrCreateResourcesRecord(n),c=d.loadQualityProfile(n);r(e)||this._bind(e,d,a),o.setShader({shader:this.shaders.accumulate,uniforms:{...i(e,t.target),kernelControls:{radius:b(a,u),isFieldActive:l?1:0}},defines:{...s(e),...c.defines},optionalAttributes:{},useComputeBuffer:r(e)});const h=r(e)?_:f;o.setPipelineState(h),o.submitDraw(e,t)}getStencilReference(e){return m(e)}renderResolvePass(e,t){if(r(e))return;const{context:s,painter:i}=e,n=this._resources.get(s);if(null==this._prevFBO||null==this._prevViewport||!n?.initialized)return;const{defines:o}=n.loadQualityProfile(s),{minDensity:u,maxDensity:a,radius:l}=t.getInput().uniforms,d=8,c=9,h=n.accumulateFramebuffer,p=n.resolveGradientTexture,m={shader:this.shaders.resolve,uniforms:{accumulatedDensity:{texture:{unit:d,texture:h.colorTexture},minAndInvRange:[u,1/(a-u)],normalization:3/(l*l*Math.PI)},gradient:{texture:{unit:c,texture:p}}},defines:o,optionalAttributes:{},useComputeBuffer:!1};s.bindFramebuffer(this._prevFBO),s.setViewport(0,0,this._prevViewport.width,this._prevViewport.height),s.bindTexture(h.colorTexture,d),s.bindTexture(p,c),i.setPipelineState(w),i.submitDrawMesh(s,m,i.quadMesh),this._unbind()}_getOrCreateResourcesRecord(e){let t=this._resources.get(e);return null==t&&(t=new o,this._resources.set(e,t)),t}_unbind(){this._prevFBO=null,this._prevViewport=null,this._isBound=!1}_bind(e,t,r){if(this._isBound)return;const{context:s,state:i,pixelRatio:n}=e,o=s.getBoundFramebufferObject(),u=s.getViewport();this._prevFBO=o,this._prevViewport=u;const{gradient:a,gradientHash:l}=r.uniforms;t.ensureResolveGradientTexture(s,l,a);const{width:d,height:h}=u,m=p(b(r,i),n),f=d*m,_=h*m,w=t.ensureAccumulateFBO(s,f,_);s.blitFramebuffer(o,w,c.STENCIL),s.bindFramebuffer(w),s.setViewport(0,0,w.width,w.height),s.setColorMask(!0,!0,!0,!0),s.setClearColor(0,0,0,0),s.clear(c.COLOR),this._isBound=!0}}function p(e,t){const r=t>1.5?.25:.5;return e<1/(2*r)?1:r}function m(e){return e.key.level+1}const f={color:{write:[!0,!0,!0,!0],blendMode:"additive"},depth:!1,stencil:{write:!1,test:{ref:m,compare:d.GEQUAL,mask:255,op:{fail:l.KEEP,zFail:l.KEEP,zPass:l.REPLACE}}}},_={...f,stencil:!1},w={color:{write:[!0,!0,!0,!0],blendMode:"composite"},depth:!1,stencil:!1};function b(e,t){const{referenceScale:r,radius:s}=e.uniforms;return s*(0!==r?r/t.scale:1)}export{h as HeatmapTechnique};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{memoize as e}from"../../../../../../../core/MapUtils.js";import{pt2px as t}from"../../../../../../../core/screenUtils.js";import{fromRotation as i,translate as s}from"../../../../../../../core/libs/gl-matrix-2/math/mat2d.js";import{create as r}from"../../../../../../../core/libs/gl-matrix-2/factories/mat2df32.js";import{transformMat2d as o,set as n,sub as a,normalize as l,add as c,scale as h}from"../../../../../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as m}from"../../../../../../../core/libs/gl-matrix-2/factories/vec2f32.js";import{create as d}from"../../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{GeometryCursor as u}from"../../../../../../../geometry/GeometryCursor.js";import{generalizeOptimizedGeometry as f,convertToGeometry as g}from"../../../../../../../layers/graphics/featureConversionUtils.js";import _ from"../../../../../../../layers/graphics/OptimizedGeometry.js";import{tileSize as p,minMaxZoomPrecisionFactor as b}from"../../../definitions.js";import x from"../../../collisions/BoundingBox.js";import{LabelMetric as M}from"../../../collisions/LabelMetric.js";import{smoothPaths as v,pathDivide as y}from"../../../mesh/templates/segmentUtils.js";import{getMinMaxZoom as P,processColorInput as w}from"../fill/meshWriterUtils.js";import{TextMeshWriter as L,maxLabelZoom as B}from"../text/TextMeshWriter.js";const S=1,z=0,A=128,D=e((e=>{let t=0;if(0===e)return 1/0;for(;!(e%2);)t++,e/=2;return t}));class I extends L{constructor(){super(...arguments),this._zoomLevel=0}_write(e,t,i,s){if(this._zoomLevel=s||0,null!=i)throw new Error("InternalError: EffectGeometry not support for LabelMeshWriter");switch(t.geometryType){case"esriGeometryPoint":{const i=t.readXForDisplay(),s=t.readYForDisplay();this._writePoint(e,i,s,0,t);break}case"esriGeometryEnvelope":case"esriGeometryPolygon":{const i=t.readCentroidForDisplay();if(!i)return;const[s,r]=i.coords;this._writePoint(e,s,r,0,t);break}case"esriGeometryMultipoint":{let i=0;const s=u.fromFeatureSetReader(t);if(s?.nextPath())for(;s.nextPoint();)this._writePoint(e,s.x,s.y,i++,t);break}case"esriGeometryPolyline":this._writeLines(e,t)}}_getMetricDir(){const{horizontalAlignment:e,verticalAlignment:t}=this.evaluatedMeshParams;return["center"===e?0:"right"===e?-1:1,"middle"===t?0:"bottom"===t?-1:1]}_createLineLabelMetric(e,t,i,s){const[r,o]=this._getMetricDir(),n=this.evaluatedMeshParams.scaleInfo?.maxScale??0,a=this.evaluatedMeshParams.scaleInfo?.minScale??0,l=this.evaluatedMeshParams.labelClassId;return new M(e,0,l,t,i,r,o,n,a,s)}_writePoint(e,t,i,s,r){if(t<0||t>p||i<0||i>p)return;const o=this._getShaping();if(!o)return;const n=r.getDisplayId(),a=this.evaluatedMeshParams.labelClassId,[l,c]=this._getMetricDir(),h=this.evaluatedMeshParams.scaleInfo?.maxScale??0,m=this.evaluatedMeshParams.scaleInfo?.minScale??0,d=this._getPointReferenceBounds()||{offsetX:0,offsetY:0,size:0};e.metricStart(new M(n,s,a,t,i,l,c,h,m,d)),this._writeGlyphs(e,n,t,i,o,0,d,void 0,!1),e.metricBoxWrite(o.boundsT),e.metricEnd()}_getPointReferenceBounds(){if(!this._references)return null;for(const e of this._references){const t=e.getBoundsInfo();if(t)return t}return null}_writeLines(e,t){const{scaleInfo:i,verticalAlignment:s}=this.evaluatedMeshParams,r=this.evaluatedMeshParams.repeatLabelDistance||128,o=this._getShaping("middle");if(!o)return;const n=(e,t,i,s)=>this._placeSubdivGlyphs(e,t,i,s),a=(o.bounds.width+r)/(1<<S);this._current={out:e,id:t.getDisplayId(),shaping:o,zoomRange:P(i,this.getTileInfo()),referenceBounds:this._getPointReferenceBounds()||{offsetX:0,offsetY:0,size:0},offsetDirection:null},this._verticalPlacement="bottom"===s?"above":"top"===s?"below":null,this._verticalPlacement?this._writeAboveAndBelowAlong(t,n,a):this._writeCenterAlong(t,n,a)}_writeAboveAndBelowAlong(e,t,i){const{repeatLabel:s}=this.evaluatedMeshParams,{shaping:r}=this._current,o=r.bounds.halfHeight,n=e.readGeometryForDisplay();if(!n)return;const a=new _;f(a,n,!1,!1,"esriGeometryPolyline",1);const l=G(new _,a,o),c=G(new _,a,-o),h=g(c,"esriGeometryPolyline",!1,!1),m=g(l,"esriGeometryPolyline",!1,!1),d=v(m.paths,r.bounds.width),u=v(h.paths,r.bounds.width);this._current.offsetDirection="above";for(const f of d)y(f,i,t,!!s);this._current.offsetDirection="below";for(const f of u)y(f,i,t,!!s)}_writeCenterAlong(e,t,i){const{repeatLabel:s}=this.evaluatedMeshParams,{shaping:r}=this._current,o=v(e.readLegacyGeometryForDisplay().paths,r.bounds.width);for(const n of o)y(n,i,t,!!s)}_placeSubdivGlyphs(e,t,i,s){const{allowOverrun:r,labelPosition:o,repeatLabelDistance:n}=this.evaluatedMeshParams,a=this._current.zoomRange[0],l=D(t),c=this._current.shaping.bounds.width/(1<<S),h=Math.sqrt(n||A)/(1<<S),m=Math.min(i,s-i),d=this._current.shaping.isMultiline?B:Math.log2(m/(h+c/2)),u=0===t?d:Math.min(l,d),f=Math.max(a,this._zoomLevel+S-u),g=this._zoomLevel-f,_=this._current.shaping.bounds.width/2*2**g;this._current.shaping.isMultiline?0===t&&this._placeStraight(e,f):r&&g<0?this._placeStraightAlong(e,a):"parallel"===o?this._placeStraightAlong(e,f):"curved"===o&&this._placeCurved(e,f,_)}_placeStraight(e,t){const{out:i,id:s,shaping:r,referenceBounds:o}=this._current,{x:n,y:a}=e;i.metricStart(this._createLineLabelMetric(s,n,a)),i.metricBoxWrite(r.boundsT);const l=e.angle*(180/Math.PI)%360,c=(e.angle*(180/Math.PI)+180)%360,h={clipAngle:l,mapAligned:!0,isLineLabel:!0,minZoom:t};this._writeGlyphs(i,s,n,a,r,0,o,h,!1);const m={clipAngle:c,mapAligned:!0,isLineLabel:!0,minZoom:t};this._writeGlyphs(i,s,n,a,r,0,o,m,!1),i.metricEnd()}_placeCurved(e,t,i){const{out:s,id:r}=this._current;s.metricStart(this._createLineLabelMetric(r,e.x,e.y));const o=e.clone(),n=e.angle*(180/Math.PI)%360,a=(e.angle*(180/Math.PI)+180)%360;this._verticalPlacement&&this._verticalPlacement!==this._current.offsetDirection||(this._placeFirst(o,t,1,n),this._placeBack(e,o,t,i,1,n),this._placeForward(e,o,t,i,1,n)),this._verticalPlacement&&this._verticalPlacement===this._current.offsetDirection||(this._placeFirst(o,t,0,a),this._placeBack(e,o,t,i,0,a),this._placeForward(e,o,t,i,0,a)),s.metricEnd()}_placeStraightAlong(e,o){const{out:n,id:a,shaping:l,zoomRange:c,referenceBounds:h}=this._current,{boxBorderLineColor:d,boxBackgroundColor:u}=this.evaluatedMeshParams,f=e.clone(),g=e.angle*(180/Math.PI)%360,_=(e.angle*(180/Math.PI)+180)%360,p=l.glyphs.length>0&&!(!d&&!u);if(n.metricStart(this._createLineLabelMetric(a,e.x,e.y)),p){const d=Math.max(o,c[0],0),u=Math.min(B,c[1]),f=i(r(),-e.angle),p={minZoom:d,maxZoom:u,clipAngle:g,mapAligned:!0,isLineLabel:!0},b=t(this.evaluatedMeshParams.offsetX),x=t(this.evaluatedMeshParams.offsetY);if(!this._verticalPlacement||this._verticalPlacement===this._current.offsetDirection){const t=m(b,-1*x),[i,o]=l.shapeBackground(s(r(),f,t));n.recordStart(this.instanceId,this.attributeLayout,l.glyphs[0].textureBinding),this._writeTextBox(n,a,e.x,e.y,o,h,p),n.recordEnd()}if(!this._verticalPlacement||this._verticalPlacement!==this._current.offsetDirection){const t=m(b,x),[i,o]=l.shapeBackground(s(r(),f,t));p.clipAngle=_,n.recordStart(this.instanceId,this.attributeLayout,l.glyphs[0].textureBinding),this._writeTextBox(n,a,e.x,e.y,o,h,p),n.recordEnd()}}this._verticalPlacement&&this._verticalPlacement!==this._current.offsetDirection||this._placeFirst(f,o,1,g,!0),this._verticalPlacement&&this._verticalPlacement===this._current.offsetDirection||this._placeFirst(f,o,0,_,!0),n.metricEnd()}_placeBack(e,t,i,s,r,o){const n=e.clone();let a=e.backwardLength+z;for(;n.prev()&&!(a>=s);)this._placeOnSegment(n,t,a,i,-1,r,o),a+=n.length+z}_placeForward(e,t,i,s,r,o){const n=e.clone();let a=e.remainingLength+z;for(;n.next()&&!(a>=s);)this._placeOnSegment(n,t,a,i,1,r,o),a+=n.length+z}_placeFirst(e,s,n,a,l=!1){const{out:c,id:h,shaping:d,zoomRange:u,referenceBounds:f}=this._current,g=d.glyphs,_=t(this.evaluatedMeshParams.offsetX),p=t(this.evaluatedMeshParams.offsetY),b=m(_,p),M=i(r(),-e.angle);o(b,b,M);for(const t of g){const i=t.x>d.bounds.x?n:1-n,r=i*e.remainingLength+(1-i)*e.backwardLength,o=Math.abs(t.x+t.width/2-d.bounds.x),m=Math.max(0,this._zoomLevel+Math.log2(o/(r+z))),g=Math.max(s,l?0:m);if(t.maxZoom=Math.min(u[1],B),t.angle=e.angle+(1-n)*Math.PI,t.minZoom=Math.max(u[0],g),this._writeLineGlyph(c,h,e.x,e.y,t,a,f,!0),(n||this._current.offsetDirection)&&this._isVisible(t.minZoom,t.maxZoom)){const e=new x(t.bounds.x+b[0],t.bounds.y+b[1],t.bounds.width,t.bounds.height);c.metricBoxWrite(e)}}}_placeOnSegment(e,s,n,a,l,c,h){const{out:d,id:u,shaping:f,referenceBounds:g}=this._current,_=f.glyphs,p=e.dx/e.length,b=e.dy/e.length,M={x:e.x+n*-l*p,y:e.y+n*-l*b},v=t(this.evaluatedMeshParams.offsetX),y=t(this.evaluatedMeshParams.offsetY),P=m(v,y),w=i(r(),-e.angle);o(P,P,w);for(const t of _){const i=t.x>f.bounds.x?c:1-c;if(!(i&&1===l||!i&&-1===l))continue;const s=Math.abs(t.x+t.width/2-f.bounds.x),r=Math.max(0,this._zoomLevel+Math.log2(s/n)-.1),o=Math.max(a,this._zoomLevel+Math.log2(s/(n+e.length+z)));if(0!==r&&(t.angle=e.angle+(1-c)*Math.PI,t.minZoom=o,t.maxZoom=r,this._writeLineGlyph(d,u,M.x,M.y,t,h,g,!0),(c||this._current.offsetDirection)&&this._isVisible(t.minZoom,t.maxZoom))){const e=new x(t.bounds.x+P[0],t.bounds.y+P[1],t.bounds.width,t.bounds.height);d.metricBoxWrite(e)}}}_writeLineGlyph(e,t,i,s,r,o,n,a){if(i<0||i>p||s<0||s>p)return;e.recordStart(this.instanceId,this.attributeLayout,r.textureBinding);const{texcoords:l,offsets:c}=r,{fontSize:h,haloSize:m,outlineSize:d}=this._textMeshTransformProps;this._writeQuad(e,t,i,s,{texcoords:l,offsets:c,fontSize:h,haloSize:m,outlineSize:d,color:w(this.evaluatedMeshParams.color),isBackground:!1,referenceBounds:n,minZoom:Math.max(this._current.zoomRange[0],r.minZoom),maxZoom:Math.min(this._current.zoomRange[1],r.maxZoom),clipAngle:o,mapAligned:a,isLineLabel:!0}),e.recordEnd()}_packedZoom(e){return Math.floor(e*b)/b}_isVisible(e,t){let i=Math.max(this._current.zoomRange[0],e),s=Math.min(this._current.zoomRange[1],t);i=this._packedZoom(i),s=this._packedZoom(s);const r=this._packedZoom(this._zoomLevel);return i<=r&&r<=s}}function G(e,t,i){const{coords:s,lengths:r}=t,o=d(),m=d(),u=d(),f=d(),g=d(),_=d(),p=2;let b=0;for(let d=0;d<r.length;d++){const t=r[d];for(let r=0;r<t;r++){const d=p*(r+b-1),x=p*(r+b),M=p*(r+b+1);r>0?n(o,s[d],s[d+1]):n(o,0,0),n(m,s[x],s[x+1]),r<t-1?n(u,s[M],s[M+1]):n(u,0,0),0===r?n(f,0,0):(a(f,m,o),l(f,f),n(f,f[1],-f[0])),r===t-1?n(g,0,0):(a(g,u,m),l(g,g),n(g,g[1],-g[0])),c(_,f,g),l(_,_);const v=_[0]*g[0]+_[1]*g[1];0!==v&&h(_,_,v),h(_,_,i),e.coords.push(m[0]+_[0],m[1]+_[1])}e.lengths.push(t),b+=t}return e}export{I as LabelMeshWriter};
5
+ import{memoize as e}from"../../../../../../../core/MapUtils.js";import{pt2px as t}from"../../../../../../../core/screenUtils.js";import{numericHash as i}from"../../../../../../../core/string.js";import{fromRotation as r,translate as s}from"../../../../../../../core/libs/gl-matrix-2/math/mat2d.js";import{create as o}from"../../../../../../../core/libs/gl-matrix-2/factories/mat2df32.js";import{transformMat2d as n,set as a,sub as l,normalize as h,add as c,scale as m}from"../../../../../../../core/libs/gl-matrix-2/math/vec2.js";import{fromValues as d}from"../../../../../../../core/libs/gl-matrix-2/factories/vec2f32.js";import{create as u}from"../../../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{GeometryCursor as f}from"../../../../../../../geometry/GeometryCursor.js";import{generalizeOptimizedGeometry as g,convertToGeometry as _}from"../../../../../../../layers/graphics/featureConversionUtils.js";import p from"../../../../../../../layers/graphics/OptimizedGeometry.js";import{tileSize as b,minMaxZoomPrecisionFactor as x}from"../../../definitions.js";import M from"../../../collisions/BoundingBox.js";import{LabelMetric as v}from"../../../collisions/LabelMetric.js";import{smoothPaths as y,pathDivide as P}from"../../../mesh/templates/segmentUtils.js";import{getMinMaxZoom as w,processColorInput as L}from"../fill/meshWriterUtils.js";import{TextMeshWriter as I,maxLabelZoom as B}from"../text/TextMeshWriter.js";const S=1,z=0,A=128;function D(e,t,r){return i(`${e}${t}${r}`)}function j(e,t,r,s,o){return i(`${e}${o}${t}${r*2**(B-s)}`)}const G=e((e=>{let t=0;if(0===e)return 1/0;for(;!(e%2);)t++,e/=2;return t}));class Z extends I{constructor(){super(...arguments),this._zoomLevel=0}_write(e,t,i,r){if(this._zoomLevel=r||0,null!=i)throw new Error("InternalError: EffectGeometry not support for LabelMeshWriter");switch(t.geometryType){case"esriGeometryPoint":{const i=t.readXForDisplay(),r=t.readYForDisplay();this._writePoint(e,i,r,0,t);break}case"esriGeometryEnvelope":case"esriGeometryPolygon":{const i=t.readCentroidForDisplay();if(!i)return;const[r,s]=i.coords;this._writePoint(e,r,s,0,t);break}case"esriGeometryMultipoint":{let i=0;const r=f.fromFeatureSetReader(t);if(r?.nextPath())for(;r.nextPoint();)this._writePoint(e,r.x,r.y,i++,t);break}case"esriGeometryPolyline":this._writeLines(e,t)}}_getMetricDir(){const{horizontalAlignment:e,verticalAlignment:t}=this.evaluatedMeshParams;return["center"===e?0:"right"===e?-1:1,"middle"===t?0:"bottom"===t?-1:1]}_createLineLabelMetric(e,t,i,r,s){const[o,n]=this._getMetricDir(),a=this.evaluatedMeshParams.scaleInfo?.maxScale??0,l=this.evaluatedMeshParams.scaleInfo?.minScale??0,h=this.evaluatedMeshParams.labelClassId;return new v(e,h,t,i,r,o,n,a,l,s)}_writePoint(e,t,i,r,s){if(t<0||t>b||i<0||i>b)return;const o=this._getShaping();if(!o)return;const n=s.getDisplayId(),a=this.evaluatedMeshParams.labelClassId,l=D(s.getObjectId(),a,r),[h,c]=this._getMetricDir(),m=this.evaluatedMeshParams.scaleInfo?.maxScale??0,d=this.evaluatedMeshParams.scaleInfo?.minScale??0,u=this._getPointReferenceBounds()||{offsetX:0,offsetY:0,size:0};e.metricStart(new v(n,a,l,t,i,h,c,m,d,u)),this._writeGlyphs(e,n,t,i,o,0,u,void 0,!1),e.metricBoxWrite(o.boundsT),e.metricEnd()}_getPointReferenceBounds(){if(!this._references)return null;for(const e of this._references){const t=e.getBoundsInfo();if(t)return t}return null}_writeLines(e,t){const{scaleInfo:i,verticalAlignment:r}=this.evaluatedMeshParams,s=this.evaluatedMeshParams.repeatLabelDistance||128,o=this._getShaping("middle");if(!o)return;const n=(e,t,i,r)=>this._placeSubdivGlyphs(e,t,i,r),a=(o.bounds.width+s)/(1<<S);this._current={out:e,id:t.getDisplayId(),objId:t.getObjectId(),shaping:o,zoomRange:w(i,this.getTileInfo()),referenceBounds:this._getPointReferenceBounds()||{offsetX:0,offsetY:0,size:0},offsetDirection:null,pathIndex:0},this._verticalPlacement="bottom"===r?"above":"top"===r?"below":null,this._verticalPlacement?this._writeAboveAndBelowAlong(t,n,a):this._writeCenterAlong(t,n,a)}_writeAboveAndBelowAlong(e,t,i){const{repeatLabel:r}=this.evaluatedMeshParams,{shaping:s}=this._current,o=s.bounds.halfHeight,n=e.readGeometryForDisplay();if(!n)return;const a=new p;g(a,n,!1,!1,"esriGeometryPolyline",1);const l=k(new p,a,o),h=k(new p,a,-o),c=_(h,"esriGeometryPolyline",!1,!1),m=_(l,"esriGeometryPolyline",!1,!1),d=y(m.paths,s.bounds.width),u=y(c.paths,s.bounds.width);this._current.offsetDirection="above";for(let f=0;f<d.length;f++)this._current.pathIndex=f,P(d[f],i,t,!!r);this._current.offsetDirection="below";for(let f=0;f<u.length;f++)this._current.pathIndex=f,P(u[f],i,t,!!r)}_writeCenterAlong(e,t,i){const{repeatLabel:r}=this.evaluatedMeshParams,{shaping:s}=this._current,o=y(e.readLegacyGeometryForDisplay().paths,s.bounds.width);for(let n=0;n<o.length;n++)this._current.pathIndex=n,P(o[n],i,t,!!r)}_placeSubdivGlyphs(e,t,i,r){const{allowOverrun:s,labelPosition:o,repeatLabelDistance:n}=this.evaluatedMeshParams,a=this._current.zoomRange[0],l=G(t),h=this._current.shaping.bounds.width/(1<<S),c=Math.sqrt(n||A)/(1<<S),m=Math.min(i,r-i),d=this._current.shaping.isMultiline?B:Math.log2(m/(c+h/2)),u=0===t?d:Math.min(l,d),f=Math.max(a,this._zoomLevel+S-u),g=this._zoomLevel-f,_=this._current.shaping.bounds.width/2*2**g,p=j(this._current.objId,this._current.pathIndex,t,this._zoomLevel,this.evaluatedMeshParams.labelClassId);this._current.shaping.isMultiline?0===t&&this._placeStraight(e,f,p):s&&g<0?this._placeStraightAlong(e,a,p):"parallel"===o?this._placeStraightAlong(e,f,p):"curved"===o&&this._placeCurved(e,f,_,p)}_placeStraight(e,t,i){const{out:r,id:s,shaping:o,referenceBounds:n}=this._current,{x:a,y:l}=e;r.metricStart(this._createLineLabelMetric(s,i,a,l)),r.metricBoxWrite(o.boundsT);const h=e.angle*(180/Math.PI)%360,c=(e.angle*(180/Math.PI)+180)%360,m={clipAngle:h,mapAligned:!0,isLineLabel:!0,minZoom:t};this._writeGlyphs(r,s,a,l,o,0,n,m,!1);const d={clipAngle:c,mapAligned:!0,isLineLabel:!0,minZoom:t};this._writeGlyphs(r,s,a,l,o,0,n,d,!1),r.metricEnd()}_placeCurved(e,t,i,r){const{out:s,id:o}=this._current;s.metricStart(this._createLineLabelMetric(o,r,e.x,e.y));const n=e.clone(),a=e.angle*(180/Math.PI)%360,l=(e.angle*(180/Math.PI)+180)%360;this._verticalPlacement&&this._verticalPlacement!==this._current.offsetDirection||(this._placeFirst(n,t,1,a),this._placeBack(e,n,t,i,1,a),this._placeForward(e,n,t,i,1,a)),this._verticalPlacement&&this._verticalPlacement===this._current.offsetDirection||(this._placeFirst(n,t,0,l),this._placeBack(e,n,t,i,0,l),this._placeForward(e,n,t,i,0,l)),s.metricEnd()}_placeStraightAlong(e,i,n){const{out:a,id:l,shaping:h,zoomRange:c,referenceBounds:m}=this._current,{boxBorderLineColor:u,boxBackgroundColor:f}=this.evaluatedMeshParams,g=e.clone(),_=e.angle*(180/Math.PI)%360,p=(e.angle*(180/Math.PI)+180)%360,b=h.glyphs.length>0&&!(!u&&!f);if(a.metricStart(this._createLineLabelMetric(l,n,e.x,e.y)),b){const n=Math.max(i,c[0],0),u=Math.min(B,c[1]),f=r(o(),-e.angle),g={minZoom:n,maxZoom:u,clipAngle:_,mapAligned:!0,isLineLabel:!0},b=t(this.evaluatedMeshParams.offsetX),x=t(this.evaluatedMeshParams.offsetY);if(!this._verticalPlacement||this._verticalPlacement===this._current.offsetDirection){const t=d(b,-1*x),[i,r]=h.shapeBackground(s(o(),f,t));a.recordStart(this.instanceId,this.attributeLayout,h.glyphs[0].textureBinding),this._writeTextBox(a,l,e.x,e.y,r,m,g),a.recordEnd()}if(!this._verticalPlacement||this._verticalPlacement!==this._current.offsetDirection){const t=d(b,x),[i,r]=h.shapeBackground(s(o(),f,t));g.clipAngle=p,a.recordStart(this.instanceId,this.attributeLayout,h.glyphs[0].textureBinding),this._writeTextBox(a,l,e.x,e.y,r,m,g),a.recordEnd()}}this._verticalPlacement&&this._verticalPlacement!==this._current.offsetDirection||this._placeFirst(g,i,1,_,!0),this._verticalPlacement&&this._verticalPlacement===this._current.offsetDirection||this._placeFirst(g,i,0,p,!0),a.metricEnd()}_placeBack(e,t,i,r,s,o){const n=e.clone();let a=e.backwardLength+z;for(;n.prev()&&!(a>=r);)this._placeOnSegment(n,t,a,i,-1,s,o),a+=n.length+z}_placeForward(e,t,i,r,s,o){const n=e.clone();let a=e.remainingLength+z;for(;n.next()&&!(a>=r);)this._placeOnSegment(n,t,a,i,1,s,o),a+=n.length+z}_placeFirst(e,i,s,a,l=!1){const{out:h,id:c,shaping:m,zoomRange:u,referenceBounds:f}=this._current,g=m.glyphs,_=t(this.evaluatedMeshParams.offsetX),p=t(this.evaluatedMeshParams.offsetY),b=d(_,p),x=r(o(),-e.angle);n(b,b,x);for(const t of g){const r=t.x>m.bounds.x?s:1-s,o=r*e.remainingLength+(1-r)*e.backwardLength,n=Math.abs(t.x+t.width/2-m.bounds.x),d=Math.max(0,this._zoomLevel+Math.log2(n/(o+z))),g=Math.max(i,l?0:d);if(t.maxZoom=Math.min(u[1],B),t.angle=e.angle+(1-s)*Math.PI,t.minZoom=Math.max(u[0],g),this._writeLineGlyph(h,c,e.x,e.y,t,a,f,!0),(s||this._current.offsetDirection)&&this._isVisible(t.minZoom,t.maxZoom)){const e=new M(t.bounds.x+b[0],t.bounds.y+b[1],t.bounds.width,t.bounds.height);h.metricBoxWrite(e)}}}_placeOnSegment(e,i,s,a,l,h,c){const{out:m,id:u,shaping:f,referenceBounds:g}=this._current,_=f.glyphs,p=e.dx/e.length,b=e.dy/e.length,x={x:e.x+s*-l*p,y:e.y+s*-l*b},v=t(this.evaluatedMeshParams.offsetX),y=t(this.evaluatedMeshParams.offsetY),P=d(v,y),w=r(o(),-e.angle);n(P,P,w);for(const t of _){const i=t.x>f.bounds.x?h:1-h;if(!(i&&1===l||!i&&-1===l))continue;const r=Math.abs(t.x+t.width/2-f.bounds.x),o=Math.max(0,this._zoomLevel+Math.log2(r/s)-.1),n=Math.max(a,this._zoomLevel+Math.log2(r/(s+e.length+z)));if(0!==o&&(t.angle=e.angle+(1-h)*Math.PI,t.minZoom=n,t.maxZoom=o,this._writeLineGlyph(m,u,x.x,x.y,t,c,g,!0),(h||this._current.offsetDirection)&&this._isVisible(t.minZoom,t.maxZoom))){const e=new M(t.bounds.x+P[0],t.bounds.y+P[1],t.bounds.width,t.bounds.height);m.metricBoxWrite(e)}}}_writeLineGlyph(e,t,i,r,s,o,n,a){if(i<0||i>b||r<0||r>b)return;e.recordStart(this.instanceId,this.attributeLayout,s.textureBinding);const{texcoords:l,offsets:h}=s,{fontSize:c,haloSize:m,outlineSize:d}=this._textMeshTransformProps;this._writeQuad(e,t,i,r,{texcoords:l,offsets:h,fontSize:c,haloSize:m,outlineSize:d,color:L(this.evaluatedMeshParams.color),isBackground:!1,referenceBounds:n,minZoom:Math.max(this._current.zoomRange[0],s.minZoom),maxZoom:Math.min(this._current.zoomRange[1],s.maxZoom),clipAngle:o,mapAligned:a,isLineLabel:!0}),e.recordEnd()}_packedZoom(e){return Math.floor(e*x)/x}_isVisible(e,t){let i=Math.max(this._current.zoomRange[0],e),r=Math.min(this._current.zoomRange[1],t);i=this._packedZoom(i),r=this._packedZoom(r);const s=this._packedZoom(this._zoomLevel);return i<=s&&s<=r}}function k(e,t,i){const{coords:r,lengths:s}=t,o=u(),n=u(),d=u(),f=u(),g=u(),_=u(),p=2;let b=0;for(let u=0;u<s.length;u++){const t=s[u];for(let s=0;s<t;s++){const u=p*(s+b-1),x=p*(s+b),M=p*(s+b+1);s>0?a(o,r[u],r[u+1]):a(o,0,0),a(n,r[x],r[x+1]),s<t-1?a(d,r[M],r[M+1]):a(d,0,0),0===s?a(f,0,0):(l(f,n,o),h(f,f),a(f,f[1],-f[0])),s===t-1?a(g,0,0):(l(g,d,n),h(g,g),a(g,g[1],-g[0])),c(_,f,g),h(_,_);const v=_[0]*g[0]+_[1]*g[1];0!==v&&m(_,_,v),m(_,_,i),e.coords.push(n[0]+_[0],n[1]+_[1])}e.lengths.push(t),b+=t}return e}export{Z as LabelMeshWriter,D as labelMetricHash,j as lineLabelMetricHash};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{Technique as e}from"../Technique.js";import{RasterTechniqueType as t}from"../TechniqueType.js";import{RasterColorizerLUTShader as o}from"../shaders/raster/RasterColorizerLUTShader.js";import{RasterColorizerShadedReliefShader as r}from"../shaders/raster/RasterColorizerShadedReliefShader.js";import{RasterColorizerStretchShader as i}from"../shaders/raster/RasterColorizerStretchShader.js";import{StencilOperation as n,CompareFunction as s}from"../../../../../../webgl/enums.js";class a extends e{constructor(){super(...arguments),this.name="BrushRasterColorizer",this.type=t.RasterColorizer,this.shaders={lut:new o,stretch:new i,shadedRelief:new r}}render(e,t){for(const o of t.bitmaps){if(!o.source||o.suspended)continue;e.timeline.begin(this.name);const{painter:t}=e;t.setPipelineState({depth:!1,stencil:{test:{mask:255,ref:o.stencilRef,compare:s.EQUAL,op:{fail:n.KEEP,zFail:n.KEEP,zPass:n.KEEP}},write:!1},color:{write:[!0,!0,!0,!0],blendMode:"composite"}}),o.updateTexture(e),o.processedTexture||o.updateProcessedTexture();const{type:r}=o.symbolizerParameters,i="stretch"===r?this._getStretchOptions(o):"lut"===r?this._getLutOptions(o):this._getShadedReliefOptions(o);"bilinear"!==o.interpolation||e.context.capabilities.textureFloatLinear||(i.defines.bilinear=!0),t.submitDrawMesh(e.context,i,t.quadMesh),e.timeline.end(this.name)}}_getLutOptions(e){const{config:t,projectionConfig:o,colormapConfig:r,projectionDefines:i}=this._getCommonConfig(e),n=this._getInterpolationDefines("nearest",!1);return{shader:this.shaders.lut,uniforms:{projectionConfig:o,config:t,colormapConfig:r},defines:{...i,...n},optionalAttributes:null,useComputeBuffer:!1}}_getStretchOptions(e){const t=e.symbolizerParameters,{config:o,projectionConfig:r,colormapConfig:i,projectionDefines:n}=this._getCommonConfig(e),s=this._getInterpolationDefines(e.interpolation,1===t.bandCount);return{shader:this.shaders.stretch,uniforms:{projectionConfig:r,config:o,stretchConfig:t,colormapConfig:i},defines:{...n,...s,isMultiband:t.bandCount>1,applyColormap:!!i,useGamma:t.useGamma,noOp:e.isRendereredSource&&!e.processed},optionalAttributes:null,useComputeBuffer:!1}}_getShadedReliefOptions(e){const t=e.symbolizerParameters,{config:o,projectionConfig:r,colormapConfig:i,projectionDefines:n}=this._getCommonConfig(e),s=this._getInterpolationDefines(e.interpolation,!0);return{shader:this.shaders.shadedRelief,uniforms:{projectionConfig:r,config:o,hillshadeConfig:t,colormapConfig:i},defines:{...n,...s,isMultidirectional:t.hillshadeType>0,applyColormap:!!i},optionalAttributes:null,useComputeBuffer:!1}}_getCommonConfig(e){const{coordScale:t,computedOpacity:o,transforms:r}=e,{names:i,textures:n}=e.getTextures({useProcessedTexture:e.processed}),s=n[i.indexOf("u_image")],a=e.getRasterTextureSize(),c={texture:{texture:s,unit:0},dvsMat3:r.displayViewScreenMat3,coordScale:t,srcImageSize:a,opacity:o},p=n[i.indexOf("u_transformGrid")],{transformGrid:l}=e,f=!(!p||!l),m=f?{transformTexture:{texture:p,unit:2},targetImageSize:[e.width,e.height],transformSpacing:l.spacing,transformGridSize:l.size}:void 0,u=n[i.indexOf("u_colormap")],{colormap:d,colormapOffset:h}=e.symbolizerParameters;return{config:c,projectionConfig:m,colormapConfig:u&&d?{colormapTexture:{texture:u,unit:1},colormapOffset:h??0,colormapMaxIndex:d.length/4-1}:void 0,projectionDefines:{applyProjection:f,lookupProjection:f&&1===l.spacing[0]}}}_getInterpolationDefines(e,t){const o="bilinear"===e&&t;return{bilinear:o,bicubic:"cubic"===e,nearestOnEdge:o}}}export{a as RasterColorizerTechnique};
5
+ import{Technique as e}from"../Technique.js";import{RasterTechniqueType as t}from"../TechniqueType.js";import{RasterColorizerLUTShader as o}from"../shaders/raster/RasterColorizerLUTShader.js";import{RasterColorizerShadedReliefShader as i}from"../shaders/raster/RasterColorizerShadedReliefShader.js";import{RasterColorizerStretchShader as r}from"../shaders/raster/RasterColorizerStretchShader.js";import{StencilOperation as s,CompareFunction as n}from"../../../../../../webgl/enums.js";class a extends e{constructor(){super(...arguments),this.name="BrushRasterColorizer",this.type=t.RasterColorizer,this.shaders={lut:new o,stretch:new r,shadedRelief:new i}}render(e,t){for(const o of t.bitmaps){if(!o.source||o.suspended)continue;e.timeline.begin(this.name);const{painter:t}=e;t.setPipelineState({depth:!1,stencil:{test:{mask:255,ref:o.stencilRef,compare:n.EQUAL,op:{fail:s.KEEP,zFail:s.KEEP,zPass:s.KEEP}},write:!1},color:{write:[!0,!0,!0,!0],blendMode:"composite"}}),o.updateTexture(e),o.processedTexture||o.updateProcessedTexture();const{type:i}=o.symbolizerParameters,r="stretch"===i?this._getStretchOptions(o):"lut"===i?this._getLutOptions(o):this._getShadedReliefOptions(o);"bilinear"!==o.interpolation||e.context.capabilities.textureFloatLinear||(r.defines.bilinear=!0),t.submitDrawMesh(e.context,r,t.quadMesh),e.timeline.end(this.name)}}_getLutOptions(e){const{config:t,projectionConfig:o,colormapConfig:i,pixelMaskConfig:r,projectionDefines:s}=this._getCommonConfig(e),n=this._getInterpolationDefines("nearest",!1);return{shader:this.shaders.lut,uniforms:{projectionConfig:o,config:t,colormapConfig:i,pixelMaskConfig:r},defines:{...s,...n,applyPixelMask:!!r},optionalAttributes:null,useComputeBuffer:!1}}_getStretchOptions(e){const t=e.symbolizerParameters,{config:o,projectionConfig:i,colormapConfig:r,pixelMaskConfig:s,projectionDefines:n}=this._getCommonConfig(e),a=this._getInterpolationDefines(e.interpolation,1===t.bandCount);return{shader:this.shaders.stretch,uniforms:{projectionConfig:i,config:o,stretchConfig:t,colormapConfig:r,pixelMaskConfig:s},defines:{...n,...a,isMultiband:t.bandCount>1,applyColormap:!!r,useGamma:t.useGamma,noOp:e.isRendereredSource&&!e.processed,applyPixelMask:!!s},optionalAttributes:null,useComputeBuffer:!1}}_getShadedReliefOptions(e){const t=e.symbolizerParameters,{config:o,projectionConfig:i,colormapConfig:r,pixelMaskConfig:s,projectionDefines:n}=this._getCommonConfig(e),a=this._getInterpolationDefines(e.interpolation,!0);return{shader:this.shaders.shadedRelief,uniforms:{projectionConfig:i,config:o,hillshadeConfig:t,colormapConfig:r,pixelMaskConfig:s},defines:{...n,...a,isMultidirectional:t.hillshadeType>0,applyColormap:!!r,applyPixelMask:!!s},optionalAttributes:null,useComputeBuffer:!1}}_getCommonConfig(e){const{coordScale:t,computedOpacity:o,transforms:i}=e,{names:r,textures:s}=e.getTextures({useProcessedTexture:e.processed}),n=s[r.indexOf("u_image")],a=e.getRasterTextureSize(),p={texture:{texture:n,unit:0},dvsMat3:i.displayViewScreenMat3,coordScale:t,srcImageSize:a,opacity:o},l=s[r.indexOf("u_transformGrid")],{transformGrid:c}=e,f=!(!l||!c),m=f?{transformTexture:{texture:l,unit:2},targetImageSize:[e.width,e.height],transformSpacing:c.spacing,transformGridSize:c.size}:void 0,u=s[r.indexOf("u_colormap")],{colormap:d,colormapOffset:g}=e.symbolizerParameters,h=u&&d?{colormapTexture:{texture:u,unit:1},colormapOffset:g??0,colormapMaxIndex:d.length/4-1}:void 0,C=s[r.indexOf("u_mask")];return{config:p,projectionConfig:m,colormapConfig:h,pixelMaskConfig:C?{maskTexture:{texture:C,unit:3}}:void 0,projectionDefines:{applyProjection:f,lookupProjection:f&&1===c.spacing[0]}}}_getInterpolationDefines(e,t){const o="bilinear"===e&&t;return{bilinear:o,bicubic:"cubic"===e,nearestOnEdge:o}}}export{a as RasterColorizerTechnique};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{RasterTechniqueType as e}from"../../TechniqueType.js";import{BaseRasterProcessorTechnique as r}from"./BaseRasterProcessorTechnique.js";import{ReprojectShader as t}from"../../shaders/raster/processor/ReprojectShader.js";class o extends r{constructor(){super(...arguments),this.name="RasterReprojectProcessor",this.type=e.Reproject,this.shaders={reproject:new t}}_process(e,r){const t=e.rasterFunction.parameters,o=this._getInterpolationDefines(r.interpolation,!!t.requireNNEdge),{config:i,projectionConfig:n,projectionDefines:s}=this._getReprojectConfig(r),a={shader:this.shaders.reproject,uniforms:{config:i,projectionConfig:n},defines:{...s,...o},optionalAttributes:null,useComputeBuffer:!1},{interpolation:c}=r;r.interpolation="nearest";const{painter:p,context:u}=e;p.submitDrawMesh(u,a,p.quadMesh),r.interpolation=c,r.projected=!0}_getReprojectConfig(e){const{source:r}=e,{names:t,textures:o}=e.getTextures({forProcessing:!0}),i={texture:{texture:o[t.indexOf("u_image")],unit:0},dvsMat3:new Float32Array([2,0,0,0,2,0,-1,-1,0]),coordScale:[1,1],srcImageSize:[r.width,r.height],opacity:1},n=o[t.indexOf("u_transformGrid")],{transformGrid:s}=e,a=!(!n||!s);return{config:i,projectionConfig:a?{transformTexture:{texture:n,unit:1},targetImageSize:[e.width,e.height],transformSpacing:s.spacing,transformGridSize:s.size}:void 0,projectionDefines:{applyProjection:a,lookupProjection:a&&1===s.spacing[0]}}}_getInterpolationDefines(e,r){const t="bilinear"===e&&r;return{bilinear:t,bicubic:"cubic"===e,nearestOnEdge:t}}}export{o as ReprojectTechnique};
5
+ import{RasterTechniqueType as e}from"../../TechniqueType.js";import{BaseRasterProcessorTechnique as r}from"./BaseRasterProcessorTechnique.js";import{ReprojectShader as t}from"../../shaders/raster/processor/ReprojectShader.js";class o extends r{constructor(){super(...arguments),this.name="RasterReprojectProcessor",this.type=e.Reproject,this.shaders={reproject:new t}}_process(e,r){const t=e.rasterFunction.parameters,o=this._getInterpolationDefines(r.interpolation,!!t.requireNNEdge),{config:i,projectionConfig:n,projectionDefines:s}=this._getReprojectConfig(r),a={shader:this.shaders.reproject,uniforms:{config:i,projectionConfig:n},defines:{...s,...o,applyPixelMask:!1},optionalAttributes:null,useComputeBuffer:!1},{interpolation:c}=r;r.interpolation="nearest";const{painter:p,context:u}=e;p.submitDrawMesh(u,a,p.quadMesh),r.interpolation=c,r.projected=!0}_getReprojectConfig(e){const{source:r}=e,{names:t,textures:o}=e.getTextures({forProcessing:!0}),i={texture:{texture:o[t.indexOf("u_image")],unit:0},dvsMat3:new Float32Array([2,0,0,0,2,0,-1,-1,0]),coordScale:[1,1],srcImageSize:[r.width,r.height],opacity:1},n=o[t.indexOf("u_transformGrid")],{transformGrid:s}=e,a=!(!n||!s);return{config:i,projectionConfig:a?{transformTexture:{texture:n,unit:1},targetImageSize:[e.width,e.height],transformSpacing:s.spacing,transformGridSize:s.size}:void 0,projectionDefines:{applyProjection:a,lookupProjection:a&&1===s.spacing[0]}}}_getInterpolationDefines(e,r){const t="bilinear"===e&&r;return{bilinear:t,bicubic:"cubic"===e,nearestOnEdge:t}}}export{o as ReprojectTechnique};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as o,a as t}from"../../../../../../../../chunks/tslib.es6.js";import{GraphShaderModule as i,FragmentOutput as e,location as r,uniform as p,define as n,option as s,input as c,VertexInput as l,UniformGroup as a,FragmentInput as d}from"../../../GraphShaderModule.js";import{Vec3 as y,Vec4 as u,ifElse as v,Vec2 as g,Sampler2D as h,Mat3 as m,Float as b}from"../../../graph/glsl.js";import{getPixelLocation as f,isOutside as j,getPixel as x,ProjectionConfig as P}from"./projection.js";class w extends l{}o([r(0,g)],w.prototype,"position",void 0);class k extends d{}class E extends a{}o([p(h)],E.prototype,"texture",void 0),o([p(m)],E.prototype,"dvsMat3",void 0),o([p(g)],E.prototype,"coordScale",void 0),o([p(g)],E.prototype,"srcImageSize",void 0),o([p(b)],E.prototype,"opacity",void 0);class O extends i{constructor(){super(...arguments),this.applyProjection=!0,this.lookupProjection=!1,this.bilinear=!1,this.bicubic=!1,this.nearestOnEdge=!1}vertex(o){const t=o.position,{dvsMat3:i,coordScale:e}=this.config,r=i.multiply(new y(t.multiply(e),1));return{uv:t,glPosition:new u(r,1)}}fragment(o){const t=new e,i=f(o.uv,this.applyProjection?this.projectionConfig:void 0,this.lookupProjection),r=v(j(i),new u(0,0,0,0),this._colorize(i)),p=r.a.multiply(this.config.opacity);return t.fragColor=new u(r.rgb,1).multiply(p),t}_getPixel(o){const{config:t,bicubic:i,bilinear:e,nearestOnEdge:r}=this;return x(o,t,{bicubic:i,bilinear:e,nearestOnEdge:r})}}o([n],O.prototype,"applyProjection",void 0),o([n],O.prototype,"lookupProjection",void 0),o([n],O.prototype,"bilinear",void 0),o([n],O.prototype,"bicubic",void 0),o([n],O.prototype,"nearestOnEdge",void 0),o([p(E)],O.prototype,"config",void 0),o([s(P)],O.prototype,"projectionConfig",void 0),o([t(0,c(w))],O.prototype,"vertex",null),o([t(0,c(k))],O.prototype,"fragment",null);export{O as BaseRasterColorizerShader,k as RasterColorizerFragmentInput,E as RasterConfig};
5
+ import{_ as o,a as t}from"../../../../../../../../chunks/tslib.es6.js";import{GraphShaderModule as e,FragmentOutput as i,location as p,uniform as r,define as s,option as n,input as l,VertexInput as a,UniformGroup as c,FragmentInput as d}from"../../../GraphShaderModule.js";import{Vec3 as y,Vec4 as u,ifElse as v,texture2D as g,sign as h,Vec2 as x,Sampler2D as m,Mat3 as f,Float as b}from"../../../graph/glsl.js";import{getPixelLocation as j,isOutside as k,getPixel as P,ProjectionConfig as M}from"./projection.js";class w extends a{}o([p(0,x)],w.prototype,"position",void 0);class C extends d{}class _ extends c{}o([r(m)],_.prototype,"texture",void 0),o([r(f)],_.prototype,"dvsMat3",void 0),o([r(x)],_.prototype,"coordScale",void 0),o([r(x)],_.prototype,"srcImageSize",void 0),o([r(b)],_.prototype,"opacity",void 0);class E extends c{}o([r(m)],E.prototype,"maskTexture",void 0);class O extends e{constructor(){super(...arguments),this.applyProjection=!0,this.lookupProjection=!1,this.bilinear=!1,this.bicubic=!1,this.nearestOnEdge=!1,this.applyPixelMask=!1}vertex(o){const t=o.position,{dvsMat3:e,coordScale:i}=this.config,p=e.multiply(new y(t.multiply(i),1));return{uv:t,glPosition:new u(p,1)}}fragment(o){const t=new i,e=j(o.uv,this.applyProjection?this.projectionConfig:void 0,this.lookupProjection),p=v(k(e),new u(0,0,0,0),this._colorize(e));let r=p.a.multiply(this.config.opacity);if(this.applyPixelMask){const t=this._getPixelMask(o.uv);r=r.multiply(t)}return t.fragColor=new u(p.rgb,1).multiply(r),t}_getPixel(o){const{config:t,bicubic:e,bilinear:i,nearestOnEdge:p}=this;return P(o,t,{bicubic:e,bilinear:i,nearestOnEdge:p})}_getPixelMask(o){const{maskTexture:t}=this.pixelMaskConfig,e=g(t,o);return h(e.a)}}o([s],O.prototype,"applyProjection",void 0),o([s],O.prototype,"lookupProjection",void 0),o([s],O.prototype,"bilinear",void 0),o([s],O.prototype,"bicubic",void 0),o([s],O.prototype,"nearestOnEdge",void 0),o([s],O.prototype,"applyPixelMask",void 0),o([r(_)],O.prototype,"config",void 0),o([n(M)],O.prototype,"projectionConfig",void 0),o([n(E)],O.prototype,"pixelMaskConfig",void 0),o([t(0,l(w))],O.prototype,"vertex",null),o([t(0,l(C))],O.prototype,"fragment",null);export{O as BaseRasterColorizerShader,E as PixelMaskConfig,C as RasterColorizerFragmentInput,_ as RasterConfig};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import{clone as t}from"../../../core/lang.js";import i from"../../../core/Logger.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{isAbortError as r}from"../../../core/promiseUtils.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{diff as n,hasDiff as o}from"../../../core/accessorSupport/diffUtils.js";import h from"../../../geometry/Point.js";import{create as u}from"../../../geometry/support/aaBoundingRect.js";import{equals as y}from"../../../geometry/support/spatialReferenceUtils.js";import{StyleUpdateType as c}from"../engine/vectorTiles/enums.js";import{TileHandler as d}from"../engine/vectorTiles/TileHandler.js";import{TileManager as _}from"../engine/vectorTiles/TileManager.js";import{VectorTile as p}from"../engine/vectorTiles/VectorTile.js";import{VectorTileContainer as f}from"../engine/vectorTiles/VectorTileContainer.js";import g from"../engine/vectorTiles/VectorTileFeatureIndex.js";import{StyleLayerType as m}from"../engine/vectorTiles/style/StyleDefinition.js";import T from"../engine/vectorTiles/style/StyleRepository.js";import{LayerView2DMixin as C}from"./LayerView2D.js";import R from"../tiling/TileInfoViewPOT.js";import v from"../tiling/TileQueue.js";import H from"../../layers/LayerView.js";import w from"../../layers/RefreshableLayerView.js";import{TaskPriority as I}from"../../support/Scheduler.js";const S=2,D=8,P=512;let Q=class extends(w(C(H))){constructor(){super(...arguments),this._styleChanges=[],this._fetchQueue=null,this._parseQueue=null,this._tileHandlerPromise=null,this._isTileHandlerReady=!1,this._styeChanged=!1,this._spriteSourceChanged=!1}get fading(){return this._vectorTileContainer?.fading??!1}get hasVisibleFeatures(){const e=this._vectorTileContainer.children;for(const t of e)if(t.hasFeatures())return!0;return!1}get spriteSourceChanged(){return this._spriteSourceChanged}get styleChanged(){return this._styeChanged}async hitTest(e,t){const i=this._tileHandlerPromise,s=this._vectorTileContainer?.symbolFader;if(!i||!this._isTileHandlerReady||!s)return;await i;let r=null;const a=this._vectorTileContainer?.symbolRepository;a&&(r=a.querySymbols(t,S,s.decluttererOffset,{}));const l=this.view.state,n=this._tileManager.getIntersectingTiles(t.x,t.y,S,l,r);if((!n||0===n.length)&&0===r?.length)return null;e=e.clone().normalize();const o=[],h=[];for(const u of n)o.push(this._queryTile(h,e,S,this.view.state.rotation,u,r?.filter((e=>e.tileKey.id===u.id))));return await Promise.all(o),h}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._pauseQueues(),this._fetchQueue.state=e.state,this._parseQueue.state=e.state,this._tileManager.update(e)||this.requestUpdate(),this._resumeQueues()))}attach(){const{style:e}=this.layer.currentStyleInfo;this._styleRepository=new T(e),this._tileInfoView=new R(this.layer.tileInfo,this.layer.fullExtent),this._vectorTileContainer=new f(this._tileInfoView),this._tileHandler=new d(this.layer,this._styleRepository,window.devicePixelRatio||1,this.layer.tileInfo.lods.length-1),this.container.addChild(this._vectorTileContainer),this._start(),this.addAttachHandles([this.layer.on("paint-change",(e=>{if(this._styeChanged=!0,e.isDataDriven)this._styleChanges.push({type:c.PAINTER_CHANGED,data:e}),this.requestUpdate();else{const t=this._styleRepository,i=t.getLayerById(e.layer);if(!i)return;const s=i.type===m.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;this._styeChanged=!0;const s=n(i.layout,e.layout);if(null!=s){if(o(s,"visibility")&&1===E(s))return t.setLayoutProperties(e.layer,e.layout),i.type===m.SYMBOL&&this._vectorTileContainer?.restartDeclutter(),void this._vectorTileContainer?.requestRender();this._styleChanges.push({type:c.LAYOUT_CHANGED,data:e}),this.requestUpdate()}})),this.layer.on("style-layer-visibility-change",(e=>{const t=this._styleRepository,i=t.getLayerById(e.layer);i&&(this._styeChanged=!0,t.setStyleLayerVisibility(e.layer,e.visibility),i.type===m.SYMBOL&&this._vectorTileContainer?.restartDeclutter(),this._vectorTileContainer?.requestRender())})),this.layer.on("style-layer-change",(e=>{this._styleChanges.push({type:c.LAYER_CHANGED,data:e}),this._styeChanged=!0,this.requestUpdate()})),this.layer.on("delete-style-layer",(e=>{this._styleChanges.push({type:c.LAYER_REMOVED,data:e}),this._styeChanged=!0,this.requestUpdate()})),this.layer.on("load-style",(()=>this._loadStyle())),this.layer.on("spriteSource-change",(e=>{this._spriteSourceChanged=!0,this._styleChanges.push({type:c.SPRITES_CHANGED,data:e});const t=this._styleRepository.layers;for(const i of t)switch(i.type){case m.SYMBOL:i.getLayoutProperty("icon-image")&&this._styleChanges.push({type:c.LAYOUT_CHANGED,data:{layer:i.id,layout:i.layout}});break;case m.LINE:i.getPaintProperty("line-pattern")&&this._styleChanges.push({type:c.PAINTER_CHANGED,data:{layer:i.id,paint:i.paint,isDataDriven:i.isPainterDataDriven()}});break;case m.FILL:i.getLayoutProperty("fill-pattern")&&this._styleChanges.push({type:c.PAINTER_CHANGED,data:{layer:i.id,paint:i.paint,isDataDriven:i.isPainterDataDriven()}})}this.requestUpdate()}))])}detach(){this._stop(),this.container.removeAllChildren(),this._vectorTileContainer=s(this._vectorTileContainer),this._tileHandler=s(this._tileHandler)}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}supportsSpatialReference(e){return y(this.layer.tileInfo?.spatialReference,e)}canResume(){let e=super.canResume();const{currentStyleInfo:t}=this.layer;if(e&&t?.layerDefinition){const i=this.view.scale,{minScale:s,maxScale:r}=t.layerDefinition;t?.layerDefinition&&(s&&s<i&&(e=!1),r&&r>i&&(e=!1))}return e}isUpdating(){return this.fading}acquireTile(e){const t=this._createVectorTile(e);return this._updatingHandles.addPromise(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()})).catch((e=>{r(e)||i.getLogger(this).error(e)}))),t}releaseTile(e){const t=e.key.id;this._fetchQueue.abort(t),this._parseQueue.abort(t),this.requestUpdate()}async doRefresh(){if(!this.attached)return;if(this.suspended)return this._tileManager.clear(),void this.requestUpdate();this._isTileHandlerReady=!1,this._pauseQueues(),this._clearQueues(),this._tileManager.clearCache(),this._resumeQueues();const e=this._vectorTileContainer.children,t=[];try{for(const i of e){const e=this._updatingHandles.addPromise(this._fetchQueue.push(i.key).then((e=>this._parseQueue.push({key:i.key,data:e}))).then((e=>i.setData(e))).finally((()=>i.featureIndex=null)));t.push(e)}await Promise.all(t)}catch(s){i.getLogger(this).error("error refreshing vector-tiles layer-view",s),this._resumeQueues(),this._isTileHandlerReady=!0}this._isTileHandlerReady=!0,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 v({tileInfoView:this._tileInfoView,process:(e,t)=>this._getTileData(e,t),concurrency:15,scheduler:this.scheduler,priority:I.MAPVIEW_FETCH_QUEUE}),this._parseQueue=new v({tileInfoView:this._tileInfoView,process:(e,t)=>this._parseTileData(e,t),concurrency:8,scheduler:this.scheduler,priority:I.MAPVIEW_VECTOR_TILE_PARSING_QUEUE}),this.requestUpdate(),this._isTileHandlerReady=!0}));this._tileHandler.spriteMosaic.then((e=>{this._vectorTileContainer.setStyleResources(e,this._tileHandler.glyphMosaic,this._styleRepository,this._tileInfoView),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=s(this._fetchQueue),this._parseQueue=s(this._parseQueue),this._tileManager=s(this._tileManager),this._vectorTileContainer.removeAllChildren()}async _getTileData(e,t){return this._tileHandler.fetchTileData(e,t)}async _parseTileData(e,t){return this._tileHandler.parseTileData(e,t)}async _applyStyleChanges(){this._isTileHandlerReady=!1,this._pauseQueues(),this._clearQueues(),this._tileManager.clearCache();const e=this._styleChanges;try{await this._tileHandler.updateStyle(e)}catch(l){i.getLogger(this).error("error applying vector-tiles style update",l.message),this._resumeQueues(),this._isTileHandlerReady=!0}const t=this._styleRepository,s=new Set;e.forEach((e=>{if(e.type!==c.LAYER_REMOVED)return;const i=e.data,r=t.getLayerById(i.layer);r&&s.add(r.uid)}));const r=new Set;e.forEach((e=>{let i;switch(e.type){case c.PAINTER_CHANGED:t.setPaintProperties(e.data.layer,e.data.paint),i=e.data.layer;break;case c.LAYOUT_CHANGED:t.setLayoutProperties(e.data.layer,e.data.layout),i=e.data.layer;break;case c.LAYER_REMOVED:return void t.deleteStyleLayer(e.data.layer);case c.LAYER_CHANGED:t.setStyleLayer(e.data.layer,e.data.index),i=e.data.layer.id;break;case c.SPRITES_CHANGED:this._vectorTileContainer.setSpriteMosaic(this._tileHandler.setSpriteSource(e.data.spriteSource))}if(i){const e=t.getLayerById(i);e&&r.add(e.uid)}}));const a=this._vectorTileContainer.children;if(s.size>0){const e=Array.from(s);this._vectorTileContainer.deleteStyleLayers(e);for(const t of a)t.deleteLayerData(e)}if(this._resumeQueues(),r.size>0){const e=Array.from(r),t=[];for(const i of a){const s=this._updatingHandles.addPromise(this._fetchQueue.push(i.key).then((t=>this._parseQueue.push({key:i.key,data:t,styleLayerUIDs:e}))).then((e=>i.setData(e))).finally((()=>i.featureIndex=null)));t.push(s)}await Promise.all(t)}this._styleChanges=[],this._isTileHandlerReady=!0,this.requestUpdate()}async _loadStyle(){const{style:e}=this.layer.currentStyleInfo,i=t(e);this._isTileHandlerReady=!1,this._pauseQueues(),this._clearQueues(),this._styleRepository=new T(i),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,i,this.layer.tileInfo.lods.length-1),await this._tileHandlerPromise}catch(n){if(!r(n))throw n}if(s.aborted)return this._resumeQueues(),this._isTileHandlerReady=!0,this._styeChanged=!1,this._spriteSourceChanged=!1,void this.requestUpdate();const a=await this._tileHandler.spriteMosaic,l=this._vectorTileContainer;this._tileInfoView=new R(this.layer.tileInfo,this.layer.fullExtent),l.setStyleResources(a,this._tileHandler.glyphMosaic,this._styleRepository,this._tileInfoView),this._tileManager=new _({acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView},this._vectorTileContainer),this._resumeQueues(),this._isTileHandlerReady=!0,this.requestUpdate(),this._styeChanged=!1,this._spriteSourceChanged=!1}_createVectorTile(e){const t=this._tileInfoView.getTileBounds(u(),e),i=this._tileInfoView.getTileResolution(e.level);return new p(e,i,t[0],t[3],512,512,this._styleRepository)}async _queryTile(e,t,i,s,r,a){if(0===r.layerData.size)return;const l=this._ensureTileIndex(r),n=this._tileInfoView.getTileBounds(u(),r.key,!0),o=D*P*((t.x-n[0])/(n[2]-n[0])),h=D*P*(1-(t.y-n[1])/(n[3]-n[1])),y=await l.queryAttributes(o,h,i,s,a);for(const u of y)u.graphic.geometry=this._tileToMapPoint(u.tilePoint,r.transforms.tileUnitsToPixels),e.push({type:"graphic",layer:this.layer,graphic:u.graphic,mapPoint:t.clone()});e.sort(((e,t)=>t.graphic.origin.layerIndex-e.graphic.origin.layerIndex))}_tileToMapPoint(e,t){if(!e)return null;const i=e[0]*t[0]+e[1]*t[3]+t[6],s=e[0]*t[1]+e[1]*t[4]+t[7],r=this.view.state,a=[0,0];return r.toMap(a,[i,s]),new h({x:a[0],y:a[1],spatialReference:r.spatialReference})}_ensureTileIndex(e){let t=e.featureIndex;return t||(t=g.create(e.key,e.layerData,this._styleRepository,this._tileHandler,this.layer),e.featureIndex=t),t}_pauseQueues(){this._fetchQueue.pause(),this._parseQueue.pause()}_resumeQueues(){this._fetchQueue.resume(),this._parseQueue.resume()}_clearQueues(){this._fetchQueue.clear(),this._parseQueue.clear()}};function E(e){if(null==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([a()],Q.prototype,"_isTileHandlerReady",void 0),Q=e([l("esri.views.2d.layers.VectorTileLayerView2D")],Q);const A=Q;export{A as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import{clone as t}from"../../../core/lang.js";import i from"../../../core/Logger.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{isAbortError as r}from"../../../core/promiseUtils.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{diff as n,hasDiff as o}from"../../../core/accessorSupport/diffUtils.js";import h from"../../../geometry/Point.js";import{create as u}from"../../../geometry/support/aaBoundingRect.js";import{equals as y}from"../../../geometry/support/spatialReferenceUtils.js";import{StyleUpdateType as c}from"../engine/vectorTiles/enums.js";import{TileHandler as d}from"../engine/vectorTiles/TileHandler.js";import{TileManager as _}from"../engine/vectorTiles/TileManager.js";import{VectorTile as p}from"../engine/vectorTiles/VectorTile.js";import{VectorTileContainer as f}from"../engine/vectorTiles/VectorTileContainer.js";import g from"../engine/vectorTiles/VectorTileFeatureIndex.js";import{StyleLayerType as m}from"../engine/vectorTiles/style/StyleDefinition.js";import T from"../engine/vectorTiles/style/StyleRepository.js";import{LayerView2DMixin as C}from"./LayerView2D.js";import R from"../tiling/TileInfoViewPOT.js";import v from"../tiling/TileQueue.js";import H from"../../layers/LayerView.js";import w from"../../layers/RefreshableLayerView.js";import{TaskPriority as I}from"../../support/Scheduler.js";const S=2,D=8,P=512;let Q=class extends(w(C(H))){constructor(){super(...arguments),this._styleChanges=[],this._fetchQueue=null,this._parseQueue=null,this._tileHandlerPromise=null,this._isTileHandlerReady=!1,this._styeChanged=!1,this._spriteSourceChanged=!1}get fading(){return this._vectorTileContainer?.fading??!1}get hasVisibleFeatures(){const e=this._vectorTileContainer.children;for(const t of e)if(t.hasFeatures())return!0;return!1}get spriteSourceChanged(){return this._spriteSourceChanged}get styleChanged(){return this._styeChanged}async hitTest(e,t){const i=this._tileHandlerPromise,s=this._vectorTileContainer?.symbolFader;if(!i||!this._isTileHandlerReady||!s)return;await i;let r=null;const a=this._vectorTileContainer?.symbolRepository;a&&(r=a.querySymbols(t,S,s.decluttererOffset,{}));const l=this.view.state,n=this._tileManager.getIntersectingTiles(t.x,t.y,S,l,r);if((!n||0===n.length)&&0===r?.length)return null;e=e.clone().normalize();const o=[],h=[];for(const u of n)o.push(this._queryTile(h,e,S,this.view.state.rotation,u,r?.filter((e=>e.tileKey.id===u.id))));return await Promise.all(o),h}update(e){if(this._tileHandlerPromise&&this._isTileHandlerReady)return e.pixelRatio!==this._tileHandler.devicePixelRatio?(this._tileHandler.devicePixelRatio=e.pixelRatio,void this._loadStyle()):void(this._styleChanges.length>0?this._tileHandlerPromise=this._applyStyleChanges():(this._pauseQueues(),this._fetchQueue.state=e.state,this._parseQueue.state=e.state,this._tileManager.update(e)||this.requestUpdate(),this._resumeQueues()))}attach(){const{style:e}=this.layer.currentStyleInfo;this._styleRepository=new T(e),this._tileInfoView=new R(this.layer.tileInfo,this.layer.fullExtent),this._vectorTileContainer=new f(this._tileInfoView),this._tileHandler=new d(this.layer,this._styleRepository,window.devicePixelRatio||1,this.layer.tileInfo.lods.length-1),this.container.addChild(this._vectorTileContainer),this._start(),this.addAttachHandles([this.layer.on("paint-change",(e=>{if(this._styeChanged=!0,e.isDataDriven)this._styleChanges.push({type:c.PAINTER_CHANGED,data:e}),this.requestUpdate();else{const t=this._styleRepository,i=t.getLayerById(e.layer);if(!i)return;const s=i.type===m.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;this._styeChanged=!0;const s=n(i.layout,e.layout);if(null!=s){if(o(s,"visibility")&&1===E(s))return t.setLayoutProperties(e.layer,e.layout),i.type===m.SYMBOL&&this._vectorTileContainer?.restartDeclutter(),void this._vectorTileContainer?.requestRender();this._styleChanges.push({type:c.LAYOUT_CHANGED,data:e}),this.requestUpdate()}})),this.layer.on("style-layer-visibility-change",(e=>{const t=this._styleRepository,i=t.getLayerById(e.layer);i&&(this._styeChanged=!0,t.setStyleLayerVisibility(e.layer,e.visibility),i.type===m.SYMBOL&&this._vectorTileContainer?.restartDeclutter(),this._vectorTileContainer?.requestRender())})),this.layer.on("style-layer-change",(e=>{this._styleChanges.push({type:c.LAYER_CHANGED,data:e}),this._styeChanged=!0,this.requestUpdate()})),this.layer.on("delete-style-layer",(e=>{this._styleChanges.push({type:c.LAYER_REMOVED,data:e}),this._styeChanged=!0,this.requestUpdate()})),this.layer.on("load-style",(()=>this._loadStyle())),this.layer.on("spriteSource-change",(e=>{this._spriteSourceChanged=!0,this._styleChanges.push({type:c.SPRITES_CHANGED,data:e});const t=this._styleRepository.layers;for(const i of t)switch(i.type){case m.SYMBOL:i.getLayoutProperty("icon-image")&&this._styleChanges.push({type:c.LAYOUT_CHANGED,data:{layer:i.id,layout:i.layout}});break;case m.LINE:i.getPaintProperty("line-pattern")&&this._styleChanges.push({type:c.PAINTER_CHANGED,data:{layer:i.id,paint:i.paint,isDataDriven:i.isPainterDataDriven()}});break;case m.FILL:i.getLayoutProperty("fill-pattern")&&this._styleChanges.push({type:c.PAINTER_CHANGED,data:{layer:i.id,paint:i.paint,isDataDriven:i.isPainterDataDriven()}})}this.requestUpdate()}))])}detach(){this._stop(),this.container.removeAllChildren(),this._vectorTileContainer=s(this._vectorTileContainer),this._tileHandler=s(this._tileHandler)}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}supportsSpatialReference(e){return y(this.layer.tileInfo?.spatialReference,e)}canResume(){let e=super.canResume();const{currentStyleInfo:t}=this.layer;if(e&&t?.layerDefinition){const i=this.view.scale,{minScale:s,maxScale:r}=t.layerDefinition;t?.layerDefinition&&(s&&s<i&&(e=!1),r&&r>i&&(e=!1))}return e}isUpdating(){return this.fading}acquireTile(e){const t=this._createVectorTile(e);return this._updatingHandles.addPromise(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()})).catch((e=>{r(e)||i.getLogger(this).error(e)}))),t}releaseTile(e){const t=e.key.id;this._fetchQueue.abort(t),this._parseQueue.abort(t),this.requestUpdate()}async doRefresh(){if(!this.attached)return;if(this.suspended)return this._tileManager.clear(),void this.requestUpdate();this._isTileHandlerReady=!1,this._pauseQueues(),this._clearQueues(),this._tileManager.clearCache(),this._resumeQueues();const e=this._vectorTileContainer.children,t=[];try{for(const i of e){const e=this._updatingHandles.addPromise(this._fetchQueue.push(i.key).then((e=>this._parseQueue.push({key:i.key,data:e}))).then((e=>i.setData(e))).finally((()=>i.featureIndex=null)));t.push(e)}await Promise.all(t)}catch(s){i.getLogger(this).error("error refreshing vector-tiles layer-view",s),this._resumeQueues(),this._isTileHandlerReady=!0}this._isTileHandlerReady=!0,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 v({tileInfoView:this._tileInfoView,process:(e,t)=>this._getTileData(e,t),concurrency:15,scheduler:this.scheduler,priority:I.MAPVIEW_FETCH_QUEUE}),this._parseQueue=new v({tileInfoView:this._tileInfoView,process:(e,t)=>this._parseTileData(e,t),concurrency:8,scheduler:this.scheduler,priority:I.MAPVIEW_VECTOR_TILE_PARSING_QUEUE}),this.requestUpdate(),this._isTileHandlerReady=!0}));this._tileHandler.spriteMosaic.then((e=>{this._vectorTileContainer.setStyleResources(e,this._tileHandler.glyphMosaic,this._styleRepository,this._tileInfoView),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=s(this._fetchQueue),this._parseQueue=s(this._parseQueue),this._tileManager=s(this._tileManager),this._vectorTileContainer.removeAllChildren()}async _getTileData(e,t){return this._tileHandler.fetchTileData(e,t)}async _parseTileData(e,t){return this._tileHandler.parseTileData(e,t)}async _applyStyleChanges(){this._isTileHandlerReady=!1,this._pauseQueues(),this._clearQueues(),this._tileManager.clearCache();const e=this._styleChanges;try{await this._tileHandler.updateStyle(e)}catch(l){i.getLogger(this).error("error applying vector-tiles style update",l.message),this._resumeQueues(),this._isTileHandlerReady=!0}const t=this._styleRepository,s=new Set;e.forEach((e=>{if(e.type!==c.LAYER_REMOVED)return;const i=e.data,r=t.getLayerById(i.layer);r&&s.add(r.uid)}));const r=new Set;e.forEach((e=>{let i;switch(e.type){case c.PAINTER_CHANGED:t.setPaintProperties(e.data.layer,e.data.paint),i=e.data.layer;break;case c.LAYOUT_CHANGED:t.setLayoutProperties(e.data.layer,e.data.layout),i=e.data.layer;break;case c.LAYER_REMOVED:return void t.deleteStyleLayer(e.data.layer);case c.LAYER_CHANGED:t.setStyleLayer(e.data.layer,e.data.index),i=e.data.layer.id;break;case c.SPRITES_CHANGED:this._vectorTileContainer.setSpriteMosaic(this._tileHandler.setSpriteSource(e.data.spriteSource))}if(i){const e=t.getLayerById(i);e&&r.add(e.uid)}}));const a=this._vectorTileContainer.children;if(s.size>0){const e=Array.from(s);this._vectorTileContainer.deleteStyleLayers(e);for(const t of a)t.deleteLayerData(e)}if(this._resumeQueues(),r.size>0){const e=Array.from(r),t=[];for(const i of a){const s=this._updatingHandles.addPromise(this._fetchQueue.push(i.key).then((t=>this._parseQueue.push({key:i.key,data:t,styleLayerUIDs:e}))).then((e=>i.setData(e))).finally((()=>i.featureIndex=null)));t.push(s)}await Promise.all(t)}this._styleChanges=[],this._isTileHandlerReady=!0,this.requestUpdate()}async _loadStyle(){const{style:e}=this.layer.currentStyleInfo,i=t(e);this._isTileHandlerReady=!1,this._pauseQueues(),this._clearQueues(),this._styleRepository=new T(i),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,i,this.layer.tileInfo.lods.length-1),await this._tileHandlerPromise}catch(n){if(!r(n))throw n}if(s.aborted)return this._resumeQueues(),this._isTileHandlerReady=!0,this._styeChanged=!1,this._spriteSourceChanged=!1,void this.requestUpdate();const a=await this._tileHandler.spriteMosaic,l=this._vectorTileContainer;this._tileInfoView=new R(this.layer.tileInfo,this.layer.fullExtent),l.setStyleResources(a,this._tileHandler.glyphMosaic,this._styleRepository,this._tileInfoView),this._tileManager=new _({acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView},this._vectorTileContainer),this._resumeQueues(),this._isTileHandlerReady=!0,this.requestUpdate(),this._styeChanged=!1,this._spriteSourceChanged=!1}_createVectorTile(e){const t=this._tileInfoView.getTileBounds(u(),e),i=this._tileInfoView.getTileResolution(e.level);return new p(e,i,t[0],t[3],512,512,this._styleRepository)}async _queryTile(e,t,i,s,r,a){if(0===r.layerData.size)return;const l=this._ensureTileIndex(r),n=this._tileInfoView.getTileBounds(u(),r.key,!0),o=D*P*((t.x-n[0])/(n[2]-n[0])),h=D*P*(1-(t.y-n[1])/(n[3]-n[1])),y=await l.queryAttributes(o,h,i,s,a);for(const u of y)u.graphic.geometry=this._tileToMapPoint(u.tilePoint,r.transforms.tileUnitsToPixels),e.push({type:"graphic",layer:this.layer,graphic:u.graphic,mapPoint:t.clone()});e.sort(((e,t)=>t.graphic.origin.layerIndex-e.graphic.origin.layerIndex))}_tileToMapPoint(e,t){if(!e)return null;const i=e[0]*t[0]+e[1]*t[3]+t[6],s=e[0]*t[1]+e[1]*t[4]+t[7],r=this.view.state,a=[0,0];return r.toMap(a,[i,s]),new h({x:a[0],y:a[1],spatialReference:r.spatialReference})}_ensureTileIndex(e){let t=e.featureIndex;return t||(t=g.create(e.key,e.layerData,this._styleRepository,this._tileHandler,this.layer),e.featureIndex=t),t}_pauseQueues(){this._fetchQueue.pause(),this._parseQueue.pause()}_resumeQueues(){this._fetchQueue.resume(),this._parseQueue.resume()}_clearQueues(){this._fetchQueue.clear(),this._parseQueue.clear()}};function E(e){if(null==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([a()],Q.prototype,"_isTileHandlerReady",void 0),Q=e([l("esri.views.2d.layers.VectorTileLayerView2D")],Q);const A=Q;export{A 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.33/esri/copyright.txt for details.
4
4
  */
5
- import has from"../../../../core/has.js";import{throwIfAborted as e,createResolver as t}from"../../../../core/promiseUtils.js";import{UpdatingHandles as s}from"../../../../core/support/UpdatingHandles.js";import{AFeatureContainer as r}from"../../engine/AFeatureContainer.js";import{WGLDrawPhase as i,FeatureSelection as n,FeatureBatchingStrategy as a}from"../../engine/webgl/enums.js";import o from"../../engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js";import{Techniques as h}from"../../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import{TechniqueType as d}from"../../engine/webgl/shaderGraph/techniques/TechniqueType.js";import{RenderState as l}from"./RenderState.js";import{renderHighlight as u}from"../support/util.js";class c{constructor(e,s){this.id=e,this.version=s,this._resolver=t(),this._done=!1}get done(){return this._done}get promise(){return this._resolver.promise}end(){this._resolver.resolve(),this._done=!0}destroy(){this._resolver.reject()}}class _ extends r{constructor(e){super(e.view.featuresTilingScheme),this.updatingHandles=new s,this._hitTestsRequests=[],this._store=new o,this._visibleTiles=new Set,this._subscriptions=new Map,this._updateStatisticsRequests=[],this._lockStatisticUpdates=!1,this._shouldUnlockAttributeView=!1,this._layerView=e,this.addTransitionable(this._layerView.featureEffectView)}renderChildren(e){if(this._updateAttributeView(),this._renderState?.update(this.attributeView.currentEpoch),this._layerView.requestUpdate(),this._renderState){const e=Array.from(this._renderState.tiles()).filter((e=>e.needsUpload));if(e.length){e[Math.floor(Math.random()*e.length)].upload(),e.length>=2&&this.requestRender()}for(const t of this._renderState.tiles())t.tryReady(this.attributeView.currentEpoch)&&(this._subscriptions.get(t.key.id)?.end(),this._layerView.requestUpdate(),this.hasLabels&&this._layerView.view.labelManager.requestUpdate(),this._layerView.view.labelManager.symbolFader.restartDeclutter(),this.requestRender())}const t=this._layerView.subscriptionManager.updateVisibility();this.setVisibleTiles(t);for(const s of this.children)s.setTransform(e.state);switch(super.renderChildren(e),e.drawPhase){case i.MAP:return this._renderMapPhase(e);case i.HIGHLIGHT:return this._renderHighlightPhase(e);case i.LABEL:return this._renderLabelPhase(e)}}subscriptions(){return this._subscriptions.values()}get _instanceStore(){return this._store}get instanceStore(){return this._store}get layerView(){return this._layerView}get hasLabels(){return this._layerView.labelingCollisionInfos.length>0}get hasHighlight(){return this._layerView.hasHighlight}get _layer(){return this._layerView.layer}_getHeatmapInstance(e){if(null==this._instanceStore||!(e.drawPhase&h.heatmap.drawPhase))return null;for(const t of this._instanceStore.values())if(p(t))return t;return null}get tiles(){return this._renderState?.tiles()}get children(){return this._renderState?Array.from(this._renderState.tiles()).filter((e=>this._visibleTiles.has(e.key.id))):[]}updateAttributeView(e){this.requestRender(),this.attributeView.requestUpdate(e),this.hasLabels&&(this._layerView.view.labelManager.requestUpdate(),this._layerView.view.labelManager.symbolFader.restartDeclutter())}updateSubscriptions(e){for(const{tileId:t,version:s}of e.subscribe)if(this._subscriptions.has(t))this._subscriptions.get(t).version=s;else{const e=new c(t,s);this._subscriptions.set(t,e),this.updatingHandles.addPromise(e.promise)}for(const t of e.unsubscribe){const e=this._subscriptions.get(t);e?.destroy(),this._subscriptions.delete(t),this.removeTile(t)}}isDone(e){return!!this._renderState&&this._renderState.isTileDone(e)}async updateRenderState(e){has("esri-2d-update-debug")&&console.debug(`Version[${e}] FeatureContainer.updateRenderState`),this._renderStateNext=new l((()=>this._stage),(e=>this._subscriptions.get(e)?.version),e,this.layerView.view.labelManager.symbolFader,this,this.tileInfoView)}getDisplayStatistics(e,t){const s=this._statisticsByLevel.get(e);return s?s.get(t):null}updateStatistics(e,t){if(this._lockStatisticUpdates)return void this._updateStatisticsRequests.push({level:e,statistics:t});let s=this._statisticsByLevel.get(e);s||(s=new Map,this._statisticsByLevel.set(e,s));for(const r of t)s.set(r.fieldName,{minValue:r.minValue,maxValue:r.maxValue})}lockForOverrides(){this._renderState?.lockUploads(),this._lockStatisticUpdates=!0,this.attributeView.locked||(this.attributeView.lockTextureUploads(),this._shouldUnlockAttributeView=!0)}unlockForOverrides(){this._renderState?.unlockUploads(),this._shouldUnlockAttributeView&&(this.attributeView.unlockTextureUploads(),this._shouldUnlockAttributeView=!1),this._lockStatisticUpdates=!1;for(const e of this._updateStatisticsRequests)this.updateStatistics(e.level,e.statistics);this._updateStatisticsRequests=[],this._renderState?.flush(),this.requestRender()}trySwapRenderState(){this._renderStateNext&&(has("esri-2d-update-debug")&&console.debug(`Version[${this._renderStateNext.version}] FeatureContainer.update.swapRenderState`),this._renderState?.destroy(),this._renderState=this._renderStateNext,this._renderState.flush(),this._renderStateNext=null),this.requestRender()}setVisibleTiles(e){this._visibleTiles=e;for(const t of this.tiles??[])t.rendering=e.has(t.key.id)}async onMessage(t,s){e(s);const r=t.inner;if(!this._subscriptions.has(r.id))return;const i=this._subscriptions.get(r.id);if(i.version!==r.subscriptionVesrion){if(has("esri-2d-update-debug")){const e=`${r.subscriptionVesrion} != ${i.version}`;console.debug(`Version[${e}] Tile[${r.id}] FeatureContainer - Dropping message, outdated version]`,r)}return}const n=this._renderStateNext??this._renderState;if(!n)throw new Error("InternalError: No renderState defined");n.version!==r.version&&console.error(`InternalError: Version mismatch. [renderState: ${n.version}, message: ${r.version}]`),n.enqueueUpdate(t),this.requestRender(),this._layerView.view.labelManager.requestUpdate(),this._layerView.requestUpdate()}removeTile(e){(this._renderState||this._renderStateNext)&&(this._renderState&&this._renderState.removeTile(e),this._renderStateNext&&this._renderStateNext.removeTile(e))}hitTest(e){let s=this._hitTestsRequests.find((({x:t,y:s})=>t===e.x&&s===e.y));const r=t();return s?s.resolvers.push(r):(s={x:e.x,y:e.y,resolvers:[r]},this._hitTestsRequests.push(s)),this.requestRender(),r.promise}getSortKeys(e){const t=new Set(e),s=new Map;for(const r of this.children)if(r.getSortKeys(t).forEach(((e,t)=>s.set(t,e))),s.size===t.size)break;return s}get hasAnimation(){return this.hasLabels}doRender(e){const{minScale:t,maxScale:s}=this._layer.effectiveScaleRange,r=e.state.scale;r<=(t||1/0)&&r>=s&&super.doRender(e)}afterRender(e){super.afterRender(e),this._hitTestsRequests.length&&this.requestRender()}setStencilReference(e){if(null==this._getHeatmapInstance(e))super.setStencilReference(e);else for(const t of this.children)t.stencilRef=h.heatmap.getStencilReference(t)}_renderMapPhase(e){this._layerView.featureEffectView.hasEffects?(this._renderOutsideEffect(e),this._renderInsideEffect(e)):this._renderFeatures(e,n.All),this._hitTestsRequests.length>0&&this._renderHittest(e)}_renderHighlightPhase(e){this.hasHighlight&&u(e,!1,(e=>{this._renderFeatures(e,n.Highlight)}))}_renderLabelPhase(e){this._renderFeatures(e,n.All)}_renderInsideEffect(e){const t=e.painter.effects.insideEffect;t.bind(e),this._renderFeatures(e,n.InsideEffect),t.draw(e,this._layerView.featureEffectView.includedEffects),t.unbind()}_renderOutsideEffect(e){const t=e.painter.effects.outsideEffect;t.bind(e),this._renderFeatures(e,n.OutsideEffect),t.draw(e,this._layerView.featureEffectView.excludedEffects),t.unbind()}_renderHittest(e){const{context:t}=e,s=e.painter.effects.hittest,r=t.getBoundFramebufferObject(),a=t.getViewport(),o=e.passOptions,h=e.drawPhase;s.bind(e),e.passOptions=s.createOptions(e,this._hitTestsRequests),e.drawPhase=i.HITTEST;const{distance:d,smallSymbolDistance:l}=e.passOptions,u=Math.max(d,l);for(const i of this.children)i.visible&&i.containsScreenPoint(e.state,e.passOptions.position,2*u)&&this._renderTile(i,e,n.All);s.draw(e),s.unbind(),t.bindFramebuffer(r),t.restoreViewport(a),e.passOptions=o,e.drawPhase=h}_renderFeatures(e,t){const s=this._getHeatmapInstance(e);null!=s?this._renderHeatmapFeatures(e,t,s):this._renderGeometryFeatures(e,t)}_renderGeometryFeatures(e,t){for(const s of this.children)s.visible&&this._renderTile(s,e,t)}_renderHeatmapFeatures(e,t,s){for(const r of this.children)r.visible&&this._renderTile(r,e,t,d.Heatmap);s.techniqueRef.renderResolvePass(e,s)}_renderTile(e,t,s,r){const i=has("featurelayer-strict-draw-order")?a.STRICT_ORDER:has("featurelayer-force-marker-text-draw-order")?a.STRICT_MARKERS_AND_TEXT:a.BATCHING,n=e.getDisplayList(this._instanceStore,i);t.selection=s,n?.render(t,r)}}function p(e){return e.techniqueRef.type===d.Heatmap}export{_ as FeatureContainer};
5
+ import has from"../../../../core/has.js";import{throwIfAborted as e,createResolver as t}from"../../../../core/promiseUtils.js";import{UpdatingHandles as s}from"../../../../core/support/UpdatingHandles.js";import{AFeatureContainer as i}from"../../engine/AFeatureContainer.js";import{WGLDrawPhase as r,FeatureSelection as n,FeatureBatchingStrategy as a}from"../../engine/webgl/enums.js";import o from"../../engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js";import{Techniques as h}from"../../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import{TechniqueType as d}from"../../engine/webgl/shaderGraph/techniques/TechniqueType.js";import{RenderState as l}from"./RenderState.js";import{renderHighlight as u}from"../support/util.js";class c{constructor(e,s){this.id=e,this.version=s,this._resolver=t(),this._done=!1}get done(){return this._done}get promise(){return this._resolver.promise}end(){this._resolver.resolve(),this._done=!0}destroy(){this._resolver.reject()}}class _ extends i{constructor(e){super(e.view.featuresTilingScheme),this.updatingHandles=new s,this._hitTestsRequests=[],this._store=new o,this._visibleTiles=new Set,this._subscriptions=new Map,this._updateStatisticsRequests=[],this._lockStatisticUpdates=!1,this._shouldUnlockAttributeView=!1,this._layerView=e,this.addTransitionable(this._layerView.featureEffectView)}renderChildren(e){if(this._updateAttributeView(),this._renderState?.update(this.attributeView.currentEpoch),this._layerView.requestUpdate(),this._renderState){const e=Array.from(this._renderState.tiles()).filter((e=>e.needsUpload));if(e.length){e[Math.floor(Math.random()*e.length)].upload(),e.length>=2&&this.requestRender()}for(const t of this._renderState.tiles())t.tryReady(this.attributeView.currentEpoch)&&(this._subscriptions.get(t.key.id)?.end(),this._layerView.requestUpdate(),this.hasLabels&&this._layerView.view.labelManager.requestUpdate(),this._layerView.view.labelManager.symbolFader.restartDeclutter(),this.requestRender())}const t=this._layerView.subscriptionManager.updateVisibility();this.setVisibleTiles(t);for(const s of this.children)s.setTransform(e.state);switch(super.renderChildren(e),e.drawPhase){case r.MAP:return this._renderMapPhase(e);case r.HIGHLIGHT:return this._renderHighlightPhase(e);case r.LABEL:return this._renderLabelPhase(e)}}subscriptions(){return this._subscriptions.values()}get _instanceStore(){return this._store}get instanceStore(){return this._store}get layerView(){return this._layerView}get hasLabels(){return this._layerView.labelingCollisionInfos.length>0}get hasHighlight(){return this._layerView.hasHighlight}get _layer(){return this._layerView.layer}_getHeatmapInstance(e){if(null==this._instanceStore||!(e.drawPhase&h.heatmap.drawPhase))return null;for(const t of this._instanceStore.values())if(p(t))return t;return null}get tiles(){return this._renderState?.tiles()}get children(){return this._renderState?Array.from(this._renderState.tiles()).filter((e=>this._visibleTiles.has(e.key.id))):[]}updateAttributeView(e){this.requestRender(),this.attributeView.requestUpdate(e),this.hasLabels&&(this._layerView.view.labelManager.requestUpdate(),this._layerView.view.labelManager.symbolFader.restartDeclutter())}updateSubscriptions(e){for(const{tileId:t,version:s}of e.subscribe)if(this._subscriptions.has(t))this._subscriptions.get(t).version=s;else{const e=new c(t,s);this._subscriptions.set(t,e),this.updatingHandles.addPromise(e.promise)}for(const t of e.unsubscribe){const e=this._subscriptions.get(t);e?.destroy(),this._subscriptions.delete(t),this.removeTile(t)}}isDone(e){return!!this._renderState&&this._renderState.isTileDone(e)}async updateRenderState(e){has("esri-2d-update-debug")&&console.debug(`Version[${e}] FeatureContainer.updateRenderState`),this._renderStateNext=new l((()=>this._stage),(e=>this._subscriptions.get(e)?.version),e,this.layerView.view.labelManager.symbolFader,this,this.tileInfoView)}getDisplayStatistics(e,t){const s=this._statisticsByLevel.get(e);return s?s.get(t):null}updateStatistics(e,t){if(this._lockStatisticUpdates)return void this._updateStatisticsRequests.push({level:e,statistics:t});let s=this._statisticsByLevel.get(e);s||(s=new Map,this._statisticsByLevel.set(e,s));for(const i of t)s.set(i.fieldName,{minValue:i.minValue,maxValue:i.maxValue})}lockForOverrides(){this._renderState?.lockUploads(),this._lockStatisticUpdates=!0,this.attributeView.locked||(this.attributeView.lockTextureUploads(),this._shouldUnlockAttributeView=!0)}unlockForOverrides(){this._renderState?.unlockUploads(),this._shouldUnlockAttributeView&&(this.attributeView.unlockTextureUploads(),this._shouldUnlockAttributeView=!1),this._lockStatisticUpdates=!1;for(const e of this._updateStatisticsRequests)this.updateStatistics(e.level,e.statistics);this._updateStatisticsRequests=[],this._renderState?.flush(),this.requestRender()}trySwapRenderState(){if(this._renderStateNext){has("esri-2d-update-debug")&&console.debug(`Version[${this._renderStateNext.version}] FeatureContainer.update.swapRenderState`);const e=new Map;for(const t of this._renderState?.tiles()||[])e.set(t.id,t.metricsVisibility);this._renderState?.destroy(),this._renderState=this._renderStateNext,this._renderState.flush();for(const t of this._renderState.tiles())t.copyMetricsVisibility(e.get(t.id)||new Set);this._renderStateNext=null}this.requestRender()}setVisibleTiles(e){this._visibleTiles=e;for(const t of this.tiles??[])t.rendering=e.has(t.key.id)}async onMessage(t,s){e(s);const i=t.inner;if(!this._subscriptions.has(i.id))return;const r=this._subscriptions.get(i.id);if(r.version!==i.subscriptionVesrion){if(has("esri-2d-update-debug")){const e=`${i.subscriptionVesrion} != ${r.version}`;console.debug(`Version[${e}] Tile[${i.id}] FeatureContainer - Dropping message, outdated version]`,i)}return}const n=this._renderStateNext??this._renderState;if(!n)throw new Error("InternalError: No renderState defined");n.version!==i.version&&console.error(`InternalError: Version mismatch. [renderState: ${n.version}, message: ${i.version}]`),n.enqueueUpdate(t),this.requestRender(),this._layerView.view.labelManager.requestUpdate(),this._layerView.requestUpdate()}removeTile(e){(this._renderState||this._renderStateNext)&&(this._renderState&&this._renderState.removeTile(e),this._renderStateNext&&this._renderStateNext.removeTile(e))}hitTest(e){let s=this._hitTestsRequests.find((({x:t,y:s})=>t===e.x&&s===e.y));const i=t();return s?s.resolvers.push(i):(s={x:e.x,y:e.y,resolvers:[i]},this._hitTestsRequests.push(s)),this.requestRender(),i.promise}getSortKeys(e){const t=new Set(e),s=new Map;for(const i of this.children)if(i.getSortKeys(t).forEach(((e,t)=>s.set(t,e))),s.size===t.size)break;return s}get hasAnimation(){return this.hasLabels}doRender(e){const{minScale:t,maxScale:s}=this._layer.effectiveScaleRange,i=e.state.scale;i<=(t||1/0)&&i>=s&&super.doRender(e)}afterRender(e){super.afterRender(e),this._hitTestsRequests.length&&this.requestRender()}setStencilReference(e){if(null==this._getHeatmapInstance(e))super.setStencilReference(e);else for(const t of this.children)t.stencilRef=h.heatmap.getStencilReference(t)}_renderMapPhase(e){this._layerView.featureEffectView.hasEffects?(this._renderOutsideEffect(e),this._renderInsideEffect(e)):this._renderFeatures(e,n.All),this._hitTestsRequests.length>0&&this._renderHittest(e)}_renderHighlightPhase(e){this.hasHighlight&&u(e,!1,(e=>{this._renderFeatures(e,n.Highlight)}))}_renderLabelPhase(e){this._renderFeatures(e,n.All)}_renderInsideEffect(e){const t=e.painter.effects.insideEffect;t.bind(e),this._renderFeatures(e,n.InsideEffect),t.draw(e,this._layerView.featureEffectView.includedEffects),t.unbind()}_renderOutsideEffect(e){const t=e.painter.effects.outsideEffect;t.bind(e),this._renderFeatures(e,n.OutsideEffect),t.draw(e,this._layerView.featureEffectView.excludedEffects),t.unbind()}_renderHittest(e){const{context:t}=e,s=e.painter.effects.hittest,i=t.getBoundFramebufferObject(),a=t.getViewport(),o=e.passOptions,h=e.drawPhase;s.bind(e),e.passOptions=s.createOptions(e,this._hitTestsRequests),e.drawPhase=r.HITTEST;const{distance:d,smallSymbolDistance:l}=e.passOptions,u=Math.max(d,l);for(const r of this.children)r.visible&&r.containsScreenPoint(e.state,e.passOptions.position,2*u)&&this._renderTile(r,e,n.All);s.draw(e),s.unbind(),t.bindFramebuffer(i),t.restoreViewport(a),e.passOptions=o,e.drawPhase=h}_renderFeatures(e,t){const s=this._getHeatmapInstance(e);null!=s?this._renderHeatmapFeatures(e,t,s):this._renderGeometryFeatures(e,t)}_renderGeometryFeatures(e,t){for(const s of this.children)s.visible&&this._renderTile(s,e,t)}_renderHeatmapFeatures(e,t,s){for(const i of this.children)i.visible&&this._renderTile(i,e,t,d.Heatmap);s.techniqueRef.renderResolvePass(e,s)}_renderTile(e,t,s,i){const r=has("featurelayer-strict-draw-order")?a.STRICT_ORDER:has("featurelayer-force-marker-text-draw-order")?a.STRICT_MARKERS_AND_TEXT:a.BATCHING,n=e.getDisplayList(this._instanceStore,r);t.selection=s,n?.render(t,i)}}function p(e){return e.techniqueRef.type===d.Heatmap}export{_ as FeatureContainer};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import has from"../../../../core/has.js";import{property as t}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as r}from"../../../../core/accessorSupport/decorators/subclass.js";import{isFunctionRaster as s}from"../../../../layers/support/rasterDatasets/datasetUtils.js";import{getBytesPerPixel as i}from"../../../../layers/support/rasterFormats/pixelRangeUtils.js";import{RasterTileContainer as o}from"../../engine/imagery/RasterTileContainer.js";import{BaseImageryTileSubView2D as n}from"./BaseImageryTileSubView2D.js";import{canUseMajorityInterpolationOnDataSource as a}from"../support/util.js";import l from"../../../layers/support/Geometry.js";let c=class extends n{constructor(){super(...arguments),this.type="raster"}get canUseWebGLForProcessing(){const{loaded:e,symbolizer:t}=this.layer;if(!e||!t)return!1;const r=t.lookup.colormapLut?.indexedColormap,s=r&&r.length>this._maxIndexedColormapSize,o=i(this.layer.serviceRasterInfo);return!(has("ios")&&o>4)&&this.useWebGLForProcessing&&t.canRenderInWebGL&&!s&&!("majority"===this.layer.interpolation&&a(this.layer))}attach(){super.attach(),this.container=new o(this._tileInfoView),this.container.isCustomTilingScheme=this._isCustomTilingScheme,this.updateRasterFunctionParameters()}detach(){super.detach(),this.container.removeAllChildren(),this.container=null}fetchTile(e,t){return this.layer.fetchTile(e.level,e.row,e.col,t)}updateRasterFunctionParameters(){const{clips:e,view:t}=this.layerView;null!=this._geometry&&e.remove(this._geometry);const{raster:r,type:i}=this.layer;if(s(r)){const s=r.getClippingGeometry(t.spatialReference);if(s){const t=new l({geometry:s});e.add(t),this._geometry=t}}const{container:o}=this;if("Function"!==r.datasetFormat||"wcs"===i)return o.rasterFunctionChain=null,o.children.forEach((e=>{const{bitmap:t}=e;t&&(t.suspended=!0,t.processed=!1,t.projected&&(t.invalidateTexture(),t.rasterTexture=null))})),void(this._rasterFunctionState="na");const n=this._rasterFunctionState,{rasterFunction:a,primaryRasters:c}=r,p=a.supportsGPU&&(!c||c.rasters.length<=1),u=p?a.flatWebGLFunctionChain:null,{renderer:d}=this.layer,h=!p||!u?.functions.length||"raster-stretch"===d?.type&&d.dynamicRangeAdjustment||!this.canUseWebGLForProcessing;o.rasterFunctionChain=h?null:this._addProjection(u);const m=null==a?"na":o.rasterFunctionChain?"gpu":"cpu",y=n===m||"na"===n&&"cpu"===m&&0===u?.functions?.length;o.children.forEach((e=>{const{bitmap:t}=e;t&&(t.suspended=!y,t.processed=!1,t.processedTexture=null)})),this._rasterFunctionState=m}async updateTileSource(e,t){const r=this._getBandIds(),s=this._getLayerInterpolation(),{canUseWebGLForProcessing:i}=this,{source:o,globalSymbolizerParams:n,suspended:a,coords:l,resolution:c}=t,p=this.layerView.hasTilingEffects?n:t.symbolizerParams,{bitmap:u}=e;if([u.x,u.y]=l,u.resolution=c,null!=o?.pixelBlock){const e={extent:o.extent,pixelBlock:o.pixelBlock,srcPixelSize:o.srcTilePixelSize};if(u.rawPixelData=e,i)u.source=o.pixelBlock,u.isRendereredSource=!1;else{const t=await this.layer.applyRenderer(e,"stretch"===n?.type?n:void 0);u.source=t,u.isRendereredSource=!0}u.symbolizerParameters=i?p:null,u.transformGrid=i?o.transformGrid:null}else{const e=this.createEmptyTilePixelBlock();u.source=e,u.symbolizerParameters=i?p:null,u.transformGrid=null}u.bandIds=i?r:null,u.width=this._tileInfoView.tileInfo.size[0],u.height=this._tileInfoView.tileInfo.size[1],u.interpolation=s,u.suspended=a,u.invalidateTexture()}async updateTileSymbolizerParameters(e,t){const{local:r,global:s}=t,i=this._getBandIds(),o=this._getLayerInterpolation(),{canUseWebGLForProcessing:n}=this,{bitmap:a}=e,{rawPixelData:l}=a;n||null==l?(a.isRendereredSource&&null!=l&&(a.source=l.pixelBlock),a.isRendereredSource=!1):(a.source=await this.layer.applyRenderer(l,"stretch"===s?.type?s:void 0),a.isRendereredSource=!0),a.symbolizerParameters=n?this.layerView.hasTilingEffects?s:r:null,a.bandIds=n?i:null,a.interpolation=o,a.suspended=!1}_getLayerInterpolation(){const{interpolation:e,renderer:t}=this.layer;if(!t)return e;const r=t.type;return"raster-colormap"===r||"unique-value"===r?"nearest":"raster-stretch"===t.type&&null!=t.colorRamp?"bilinear"===e||"cubic"===e?"bilinear":"nearest":e}_addProjection(e){return e?.functions?.length&&!e.hasFocalFunction&&e.functions.unshift({name:"Reproject",parameters:{targetImageSize:this._tileInfoView.tileInfo.size,requireNNEdge:e.isSourceSingleBand},pixelType:"f32",id:0,isNoopProcess:!1}),e}};e([t()],c.prototype,"canUseWebGLForProcessing",null),e([t()],c.prototype,"container",void 0),e([t()],c.prototype,"layer",void 0),e([t()],c.prototype,"type",void 0),c=e([r("esri.views.2d.layers.imagery.ImageryTileView2D")],c);export{c as default};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import has from"../../../../core/has.js";import{property as t}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as r}from"../../../../core/accessorSupport/decorators/subclass.js";import{isFunctionRaster as s}from"../../../../layers/support/rasterDatasets/datasetUtils.js";import{getBytesPerPixel as i}from"../../../../layers/support/rasterFormats/pixelRangeUtils.js";import{convertGeometryToMask as o}from"../../../../layers/support/rasterFunctions/clipUtils.js";import{RasterTileContainer as n}from"../../engine/imagery/RasterTileContainer.js";import{BaseImageryTileSubView2D as a}from"./BaseImageryTileSubView2D.js";import{canUseMajorityInterpolationOnDataSource as l}from"../support/util.js";let c=class extends a{constructor(){super(...arguments),this.type="raster"}get canUseWebGLForProcessing(){const{loaded:e,symbolizer:t}=this.layer;if(!e||!t)return!1;const r=t.lookup.colormapLut?.indexedColormap,s=r&&r.length>this._maxIndexedColormapSize,o=i(this.layer.serviceRasterInfo);return!(has("ios")&&o>4)&&this.useWebGLForProcessing&&t.canRenderInWebGL&&!s&&!("majority"===this.layer.interpolation&&l(this.layer))}attach(){super.attach(),this.container=new n(this._tileInfoView),this.container.isCustomTilingScheme=this._isCustomTilingScheme,this.updateRasterFunctionParameters()}detach(){super.detach(),this.container.removeAllChildren(),this.container=null}fetchTile(e,t){return this.layer.fetchTile(e.level,e.row,e.col,t)}updateRasterFunctionParameters(){const{raster:e,type:t}=this.layer,{container:r}=this;if("Function"!==e.datasetFormat||"wcs"===t)return r.rasterFunctionChain=null,r.children.forEach((e=>{const{bitmap:t}=e;t&&(t.suspended=!0,t.processed=!1,t.projected&&(t.invalidateTexture(),t.rasterTexture=null))})),void(this._rasterFunctionState="na");const s=this._rasterFunctionState,{rasterFunction:i,primaryRasters:o}=e,n=i.supportsGPU&&(!o||o.rasters.length<=1),a=n?i.flatWebGLFunctionChain:null,{renderer:l}=this.layer,c=!n||!a?.functions.length||"raster-stretch"===l?.type&&l.dynamicRangeAdjustment||!this.canUseWebGLForProcessing;r.rasterFunctionChain=c?null:this._addProjection(a);const p=null==i?"na":r.rasterFunctionChain?"gpu":"cpu",u=s===p||"na"===s&&"cpu"===p&&0===a?.functions?.length;r.children.forEach((e=>{const{bitmap:t}=e;t&&(t.suspended=!u,t.processed=!1,t.processedTexture=null)})),this._rasterFunctionState=p}async updateTileSource(e,t){const r=this._getBandIds(),i=this._getLayerInterpolation(),{canUseWebGLForProcessing:n}=this,{source:a,globalSymbolizerParams:l,suspended:c,coords:p,resolution:u}=t,d=this.layerView.hasTilingEffects?l:t.symbolizerParams,{bitmap:h}=e;if([h.x,h.y]=p,h.resolution=u,null!=a?.pixelBlock){const e={extent:a.extent,pixelBlock:a.pixelBlock,srcPixelSize:a.srcTilePixelSize};if(h.rawPixelData=e,n)h.source=a.pixelBlock,h.isRendereredSource=!1;else{const t=await this.layer.applyRenderer(e,"stretch"===l?.type?l:void 0);h.source=t,h.isRendereredSource=!0}h.symbolizerParameters=n?d:null,h.transformGrid=n?a.transformGrid:null}else{const e=this.createEmptyTilePixelBlock();h.source=e,h.symbolizerParameters=n?d:null,h.transformGrid=null}h.bandIds=n?r:null,h.width=this._tileInfoView.tileInfo.size[0],h.height=this._tileInfoView.tileInfo.size[1],h.interpolation=i,h.suspended=c;const{raster:m}=this.layer;if(s(m)){const t=m.getClippingGeometry(this.layerView.view.spatialReference);if(t){const r=m.getTileExtentFromTileInfo(e.key.level,e.key.row,e.key.col,this._tileInfoView.tileInfo);h.mask=o({srcExtent:r,geometry:t,size:[h.width,h.height]})}}h.invalidateTexture()}async updateTileSymbolizerParameters(e,t){const{local:r,global:s}=t,i=this._getBandIds(),o=this._getLayerInterpolation(),{canUseWebGLForProcessing:n}=this,{bitmap:a}=e,{rawPixelData:l}=a;n||null==l?(a.isRendereredSource&&null!=l&&(a.source=l.pixelBlock),a.isRendereredSource=!1):(a.source=await this.layer.applyRenderer(l,"stretch"===s?.type?s:void 0),a.isRendereredSource=!0),a.symbolizerParameters=n?this.layerView.hasTilingEffects?s:r:null,a.bandIds=n?i:null,a.interpolation=o,a.suspended=!1}_getLayerInterpolation(){const{interpolation:e,renderer:t}=this.layer;if(!t)return e;const r=t.type;return"raster-colormap"===r||"unique-value"===r?"nearest":"raster-stretch"===t.type&&null!=t.colorRamp?"bilinear"===e||"cubic"===e?"bilinear":"nearest":e}_addProjection(e){return e?.functions?.length&&!e.hasFocalFunction&&e.functions.unshift({name:"Reproject",parameters:{targetImageSize:this._tileInfoView.tileInfo.size,requireNNEdge:e.isSourceSingleBand},pixelType:"f32",id:0,isNoopProcess:!1}),e}};e([t()],c.prototype,"canUseWebGLForProcessing",null),e([t()],c.prototype,"container",void 0),e([t()],c.prototype,"layer",void 0),e([t()],c.prototype,"type",void 0),c=e([r("esri.views.2d.layers.imagery.ImageryTileView2D")],c);export{c 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.33/esri/copyright.txt for details.
4
4
  */
5
- import e from"./DebugOverlay.js";function t(t,a){t.container.addChild(new e({getMesh:e=>"feature"===t.layer.type?n(t,e,a):o(t,e,a),getColors:s,getOpacities:i}))}const a=(t,a,r)=>{let n=0;const o=[],s=[];for(const i of t.children)if(i.symbols)for(const u of i.symbols.values())for(const i of u)for(const u of i.colliders(t)){const t=(u.xScreen+u.dxScreen)*a,x=(u.yScreen+u.dyScreen)*a,c=u.width*a,l=u.height*a,p=i.unique?.parts[u.partIndex].targetOpacity>.5;if(!p&&"all"!==r)continue;const d=3,f=1,h=3,v=0,D=p?2:0,y=p?3:0,g=e.makeFlags(D,y);o.push(t,x,g,t+c,x,g,t,x+l,g,t+c,x+l,g),s.push(n,n+1,n+2,n+1,n+3,n+2),n+=4;const C=p?d:f,m=p?h:v,w=e.makeFlags(C,m);o.push(t,x,w,t+c,x,w,t,x+1,w,t+c,x+1,w),s.push(n,n+1,n+2,n+1,n+3,n+2),n+=4,o.push(t,x+l-1,w,t+c,x+l-1,w,t,x+l,w,t+c,x+l,w),s.push(n,n+1,n+2,n+1,n+3,n+2),n+=4,o.push(t,x,w,t+1,x,w,t,x+l,w,t+1,x+l,w),s.push(n,n+1,n+2,n+1,n+3,n+2),n+=4,o.push(t+c-1,x,w,t+c,x,w,t+c-1,x+l,w,t+c,x+l,w),s.push(n,n+1,n+2,n+1,n+3,n+2),n+=4}return{vertexData:o,indexData:s,vertexCount:n}},r=(t,a)=>{let{vertexData:r,indexData:n,vertexCount:o}=a;const[s,i]=t.decluttererOffset,u=e.makeFlags(2,3),x=256,c=256,l=x+s,p=c+i;for(const e of[-3,3])for(const t of[-3,3])r.push(x,c,u,x+e,c+t,u,l,p,u,l+e,p+t,u),n.push(o,o+1,o+2,o+1,o+3,o+2),o+=4},n=(e,t,n)=>{const{pixelRatio:o}=t.state,{vertexData:s,indexData:i,vertexCount:u}=a(e.featureContainer,o,n),x=e.view.labelManager.symbolFader;return x&&r(x,{vertexData:s,indexData:i,vertexCount:u}),{vertexData:new Int16Array(s),indexData:new Uint32Array(i)}},o=(e,t,n)=>{const{pixelRatio:o}=t.state,s=e._vectorTileContainer,{vertexData:i,indexData:u,vertexCount:x}=a(s,o,n),{symbolFader:c}=s;return c&&r(c,{vertexData:i,indexData:u,vertexCount:x}),{vertexData:new Int16Array(i),indexData:new Uint32Array(u)}},s=()=>[1,.5,0,1,1,0,0,1,0,1,.5,1,0,.5,0,1],i=()=>[.05,.01,.15,.2];export{t as showCollisionBoxes};
5
+ import e from"./DebugOverlay.js";function t(t,a){t.container.addChild(new e({getMesh:e=>"vector-tile"===t.layer.type?o(t,e,a):n(t,e,a),getColors:s,getOpacities:i}))}const a=(t,a,r)=>{let n=0;const o=[],s=[];for(const i of t.children)if(i.symbols)for(const u of i.symbols.values())for(const i of u)for(const u of i.colliders(t)){const t=(u.xScreen+u.dxScreen)*a,c=(u.yScreen+u.dyScreen)*a,x=u.width*a,l=u.height*a,p=i.uniqueSymbol?.parts[u.partIndex].targetOpacity>.5;if(!p&&"all"!==r)continue;const d=3,f=1,v=3,h=0,D=p?2:0,y=p?3:0,g=e.makeFlags(D,y);o.push(t,c,g,t+x,c,g,t,c+l,g,t+x,c+l,g),s.push(n,n+1,n+2,n+1,n+3,n+2),n+=4;const m=p?d:f,C=p?v:h,b=e.makeFlags(m,C);o.push(t,c,b,t+x,c,b,t,c+1,b,t+x,c+1,b),s.push(n,n+1,n+2,n+1,n+3,n+2),n+=4,o.push(t,c+l-1,b,t+x,c+l-1,b,t,c+l,b,t+x,c+l,b),s.push(n,n+1,n+2,n+1,n+3,n+2),n+=4,o.push(t,c,b,t+1,c,b,t,c+l,b,t+1,c+l,b),s.push(n,n+1,n+2,n+1,n+3,n+2),n+=4,o.push(t+x-1,c,b,t+x,c,b,t+x-1,c+l,b,t+x,c+l,b),s.push(n,n+1,n+2,n+1,n+3,n+2),n+=4}return{vertexData:o,indexData:s,vertexCount:n}},r=(t,a)=>{let{vertexData:r,indexData:n,vertexCount:o}=a;const[s,i]=t.decluttererOffset,u=e.makeFlags(2,3),c=256,x=256,l=c+s,p=x+i;for(const e of[-3,3])for(const t of[-3,3])r.push(c,x,u,c+e,x+t,u,l,p,u,l+e,p+t,u),n.push(o,o+1,o+2,o+1,o+3,o+2),o+=4},n=(e,t,n)=>{const{pixelRatio:o}=t.state,{vertexData:s,indexData:i,vertexCount:u}=a(e.featureContainer,o,n),c=e.view.labelManager.symbolFader;return c&&r(c,{vertexData:s,indexData:i,vertexCount:u}),{vertexData:new Int16Array(s),indexData:new Uint32Array(i)}},o=(e,t,n)=>{const{pixelRatio:o}=t.state,s=e._vectorTileContainer,{vertexData:i,indexData:u,vertexCount:c}=a(s,o,n),{symbolFader:x}=s;return x&&r(x,{vertexData:i,indexData:u,vertexCount:c}),{vertexData:new Int16Array(i),indexData:new Uint32Array(u)}},s=()=>[1,.5,0,1,1,0,0,1,0,1,.5,1,0,.5,0,1],i=()=>[.05,.01,.15,.2];export{t as showCollisionBoxes};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import o from"../../core/Accessor.js";import{equals as s}from"../../core/arrayUtils.js";import r from"../../core/Collection.js";import{mapCollection as t}from"../../core/mapCollectionUtils.js";import{destroyMaybe as i}from"../../core/maybe.js";import{watch as n,syncAndInitial as a}from"../../core/reactiveUtils.js";import{property as l}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{subclass as m}from"../../core/accessorSupport/decorators/subclass.js";import{e as c}from"../../chunks/earcut.js";import{create as p}from"../../core/libs/gl-matrix-2/factories/mat4f64.js";import{create as d}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as u}from"../../geometry/ellipsoidUtils.js";import h from"../../geometry/Point.js";import{e as f}from"../../chunks/densifyOperator.js";import{computeTranslationToOriginAndRotation as y}from"../../geometry/projection/computeTranslationToOriginAndRotation.js";import{newDoubleArray as g}from"../../geometry/support/DoubleArray.js";import{earth as v}from"../../geometry/support/Ellipsoid.js";import{newIndexArray as w}from"../../geometry/support/Indices.js";import{t as j}from"../../chunks/vec3.js";import{FocusAreaOutlineItem as _}from"../FocusAreaOutlineItem.js";import{ViewingMode as A}from"../ViewingMode.js";import{ElevationContext as R}from"./layers/graphics/ElevationContext.js";import{extrudePolygon as b}from"./layers/graphics/Graphics3DExtrudeSymbolLayer.js";import{computeCentroid as C}from"./layers/graphics/graphicUtils.js";import{geometryToRenderInfo as N}from"./support/renderInfoUtils/polygon.js";import{FocusAreaColorNode as x}from"./webgl-engine/effects/focusArea/FocusAreaColorNode.js";import{FocusAreaGeometry as k,FocusAreaMaskNode as H}from"./webgl-engine/effects/focusArea/FocusAreaMaskNode.js";const M=-2e4,U=65e5;let P=class extends o{constructor(e){super(e),this._volumes=new Map,this._elevationContext=new R,this._outlineMap=new r}initialize(){this.addHandles([n((()=>this.areas?.style??"none"),(e=>this._ensureRenderNodes(e)),a)]),this.addHandles([n((()=>this.polygons),(e=>this._updateVolumes(e)),a)]),this._outlineMap=t((()=>this.areas?.areas),(e=>new _({area:e,view:this.view})),{recycleItems:!0})}destroy(){this.removeAllHandles(),this._outlineMap.forEach((e=>e.destroy()))}get areas(){return this.view.map?.focusAreas}get enabledAreas(){return this.areas?.areas.toArray().filter((({enabled:e})=>e))??[]}get style(){return this.areas?.style??"none"}get polygons(){return this.enabledAreas.reduce(((e,o)=>e.concat(o.geometries.toArray())),new Array)}containsGeometry(e){if(0===this.polygons.length)return!0;const o=new h(e);return this.polygons.some((e=>e.contains(o)))}_updateVolumes(e){this._extrude(e),this._ensureRenderNodes(this.style)}_extrude(e){if(!this.view.renderCoordsHelper||s(Array.from(this._volumes.keys()),e))return;const o=U-M,r=d(),t=this.view.renderCoordsHelper.viewingMode===A.Global,i=p(),n=p();t||this.view.renderCoordsHelper.worldUpAtPosition([0,0,0],r);const a=new Map;for(const s of e){const e=this._volumes.get(s);if(e){a.set(s,e);continue}const l=C(s);if(null==l)continue;const m=f(s,u(this.view.spatialReference).radius/v.radius*5e5,{unit:"meters"});y(m.spatialReference,[l.x,l.y,0],i,this.view.renderCoordsHelper.spatialReference);const p=this.view.renderCoordsHelper.worldUpAtPosition([i[12],i[13],i[14]],V);n[12]=-i[12],n[13]=-i[13],n[14]=-i[14];const d=N(m,this.view.elevationProvider,this.view.renderCoordsHelper,this._elevationContext),{polygons:h,mapPositions:_,position:A}=d,R=new Array;for(const s of h){const e=s.count,a=c(s.mapPositions,s.holeIndices,3);if(0===a.length)continue;const l=a.length,m=6*e,d=w(m+l),u=w(l),h=g(3*m);b(A,_,a,s,h,null,null,null,d,u,o,r,t),j(h,h,n);const f=new k(h,u,d,o,[i[12]+M*p[0],i[13]+M*p[1],i[14]+M*p[2]]);R.push(f)}a.set(s,R)}this._volumes=a,this._maskRenderNode?.updateGeometries()}_ensureRenderNodes(e){this.view.stage&&("none"===e||0===this.volumes.size?(this._maskRenderNode=i(this._maskRenderNode),this._colorRenderNode=i(this._colorRenderNode)):(this._maskRenderNode??=new H({focusAreasView:this}),this._colorRenderNode??=new x({focusAreasView:this})))}get volumes(){return this._volumes}};e([l()],P.prototype,"_volumes",void 0),e([l({constructOnly:!0})],P.prototype,"view",void 0),P=e([m("esri.views.3d.FocusAreasView")],P);const V=d();export{P as FocusAreasView};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import o from"../../core/Accessor.js";import{equals as s}from"../../core/arrayUtils.js";import r from"../../core/Collection.js";import{mapCollection as t}from"../../core/mapCollectionUtils.js";import{destroyMaybe as i}from"../../core/maybe.js";import{watch as n,syncAndInitial as a}from"../../core/reactiveUtils.js";import{property as l}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import{subclass as m}from"../../core/accessorSupport/decorators/subclass.js";import{e as c}from"../../chunks/earcut.js";import{create as p}from"../../core/libs/gl-matrix-2/factories/mat4f64.js";import{create as d}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as u}from"../../geometry/ellipsoidUtils.js";import h from"../../geometry/Point.js";import{e as f}from"../../chunks/densifyOperator.js";import{computeTranslationToOriginAndRotation as y}from"../../geometry/projection/computeTranslationToOriginAndRotation.js";import{newDoubleArray as g}from"../../geometry/support/DoubleArray.js";import{earth as w}from"../../geometry/support/Ellipsoid.js";import{newIndexArray as v}from"../../geometry/support/Indices.js";import{t as j}from"../../chunks/vec3.js";import{FocusAreaOutlineItem as _}from"../FocusAreaOutlineItem.js";import{ViewingMode as A}from"../ViewingMode.js";import{ElevationContext as R}from"./layers/graphics/ElevationContext.js";import{extrudePolygon as b}from"./layers/graphics/Graphics3DExtrudeSymbolLayer.js";import{computeCentroid as C}from"./layers/graphics/graphicUtils.js";import{geometryToRenderInfo as N}from"./support/renderInfoUtils/polygon.js";import{FocusAreaColorNode as x}from"./webgl-engine/effects/focusArea/FocusAreaColorNode.js";import{FocusAreaGeometry as k,FocusAreaMaskNode as H}from"./webgl-engine/effects/focusArea/FocusAreaMaskNode.js";const M=-2e4,U=65e5;let V=class extends o{constructor(e){super(e),this._volumes=new Map,this._elevationContext=new R,this._outlineMap=new r}initialize(){this.addHandles([n((()=>this.areas?.style??"none"),(e=>this._ensureRenderNodes(e)),a)]),this.addHandles([n((()=>this.polygons),(e=>this._updateVolumes(e)),a)]),this._outlineMap=t((()=>this.areas?.areas),(e=>new _({area:e,view:this.view})),{recycleItems:!0})}destroy(){this.removeAllHandles(),this._outlineMap.destroy()}get areas(){return this.view.map?.focusAreas}get enabledAreas(){return this.areas?.areas.toArray().filter((({enabled:e})=>e))??[]}get style(){return this.areas?.style??"none"}get polygons(){return this.enabledAreas.reduce(((e,o)=>e.concat(o.geometries.toArray())),new Array)}containsGeometry(e){if(0===this.polygons.length)return!0;const o=new h(e);return this.polygons.some((e=>e.contains(o)))}_updateVolumes(e){this._extrude(e),this._ensureRenderNodes(this.style)}_extrude(e){if(!this.view.renderCoordsHelper||s(Array.from(this._volumes.keys()),e))return;const o=U-M,r=d(),t=this.view.renderCoordsHelper.viewingMode===A.Global,i=p(),n=p();t||this.view.renderCoordsHelper.worldUpAtPosition([0,0,0],r);const a=new Map;for(const s of e){const e=this._volumes.get(s);if(e){a.set(s,e);continue}const l=C(s);if(null==l)continue;const m=f(s,u(this.view.spatialReference).radius/w.radius*5e5,{unit:"meters"});y(m.spatialReference,[l.x,l.y,0],i,this.view.renderCoordsHelper.spatialReference);const p=this.view.renderCoordsHelper.worldUpAtPosition([i[12],i[13],i[14]],P);n[12]=-i[12],n[13]=-i[13],n[14]=-i[14];const d=N(m,this.view.elevationProvider,this.view.renderCoordsHelper,this._elevationContext),{polygons:h,mapPositions:_,position:A}=d,R=new Array;for(const s of h){const e=s.count,a=c(s.mapPositions,s.holeIndices,3);if(0===a.length)continue;const l=a.length,m=6*e,d=m+l,u=g(3*m),h=v(d),f=v(l);b(A,_,a,s,u,null,null,null,h,f,o,r,t),j(u,u,n);const y=new k(u,f,h,o,[i[12]+M*p[0],i[13]+M*p[1],i[14]+M*p[2]]);R.push(y)}a.set(s,R)}this._volumes=a,this._maskRenderNode?.updateGeometries()}_ensureRenderNodes(e){this.view.stage&&("none"===e||0===this.volumes.size?(this._maskRenderNode=i(this._maskRenderNode),this._colorRenderNode=i(this._colorRenderNode)):(this._maskRenderNode??=new H({focusAreasView:this}),this._colorRenderNode??=new x({focusAreasView:this}),this.view.stage.renderView.requestRender()))}get volumes(){return this._volumes}};e([l()],V.prototype,"_volumes",void 0),e([l({constructOnly:!0})],V.prototype,"view",void 0),V=e([m("esri.views.3d.FocusAreasView")],V);const P=d();export{V as FocusAreasView};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../../chunks/tslib.es6.js";import"../../../../../intl.js";import t from"../../../../../core/Accessor.js";import{unitRGBAFromColor as i,multiplyOpacityToUnitRGBA as s,getContrast as r,BrightnessThreshold as n,multiplyOpacity as a}from"../../../../../core/colorUtils.js";import"../../../../../core/has.js";import{nextHighestPowerOfTen as o}from"../../../../../core/mathUtils.js";import{destroyMaybe as l}from"../../../../../core/maybe.js";import{formatDecimal as h}from"../../../../../core/quantityFormatUtils.js";import{watch as m,syncAndInitial as c,initial as p}from"../../../../../core/reactiveUtils.js";import{lengthUnitFromSpatialReference as d,convertUnit as u,adaptiveAreaUnit as g}from"../../../../../core/unitUtils.js";import{property as _}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as L}from"../../../../../core/accessorSupport/decorators/subclass.js";import{fromTranslation as v}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as b}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{d as f}from"../../../../../chunks/vec32.js";import{create as w}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{toPreferredAreaUnit as S,preferredLengthUnit as y}from"./utils.js";import{LabelVisualElement as j}from"../../../interactive/visualElements/LabelVisualElement.js";import{LineVisualElement as C}from"../../../interactive/visualElements/LineVisualElement.js";import{MeasurementAreaVisualElement as A}from"../../../interactive/visualElements/MeasurementAreaVisualElement.js";import{GeodesicSegment as D,EuclideanSegment as M}from"../../../interactive/visualElements/support/Segment.js";import{midpoint3d as V}from"../../../support/mathUtils.js";import{RenderOccludedFlag as x}from"../../../webgl-engine/lib/Material.js";import{createStipplePatternSimple as P}from"../../../webgl-engine/materials/lineStippleUtils.js";import{onLocaleChange as O}from"../../../../../intl/locale.js";import{fetchMessageBundle as R}from"../../../../../intl/messages.js";let F=class extends t{get _parameters(){const{accentColor:e,textColor:t}=this.view.effectiveTheme,o=i(e),l=s(e,.5),h=s(r(e),.5),m=r(t,n.Low);return{accentColor:o,transparentAccentColor:l,transparentContrastColor:h,intersectingLineColor:[1,.2,0,1],textColor:t,textBackgroundColor:a(m,.6),textCalloutColor:a(m,.5),pathLineWidth:3,perimeterLineWidth:2,projectionLineWidth:2,projectionLineStippleSize:5,labelDistance:25}}get visible(){return this.analysisViewData.visible}get _renderUnits(){const e=this.view.renderCoordsHelper.spatialReference;return d(e)??"meters"}get testData(){}constructor(e){super(e),this._path=null,this._intersectedPath=null,this._perimeter=null,this._intersectedPerimeter=null,this._projectionLines=null,this._measurementArea=null,this._areaLabel=null,this._perimeterLengthLabel=null,this._pathSegments=[],this._perimeterSegments=[],this._origin=w(),this._originTransform=b(),this.messages=null,this.viewData=W,this.areaLabel=null,this.perimeterLengthLabel=null,this.loadingMessages=!0}initialize(){const{analysisViewData:e,_parameters:t,view:i}=this;this._path=new C({view:i,attached:!0,width:t.pathLineWidth,polygonOffset:!0,renderOccluded:x.OccludeAndTransparent,isDecoration:!0}),this._intersectedPath=new C({view:i,attached:!0,width:t.pathLineWidth,polygonOffset:!0,renderOccluded:x.OccludeAndTransparent,isDecoration:!0}),this._perimeter=new C({view:i,attached:!0,width:t.perimeterLineWidth,polygonOffset:!0,renderOccluded:x.OccludeAndTransparent,isDecoration:!0}),this._intersectedPerimeter=new C({view:i,attached:!0,width:t.perimeterLineWidth,color:t.intersectingLineColor,polygonOffset:!0,renderOccluded:x.OccludeAndTransparent,isDecoration:!0}),this._projectionLines=new C({view:i,attached:!0,width:t.projectionLineWidth,stipplePattern:P(t.projectionLineStippleSize),polygonOffset:!0,renderOccluded:x.OccludeAndTransparent,isDecoration:!0}),this._measurementArea=new A({view:i,attached:!0,isDecoration:!0});const s={attached:!0,view:i,isDecoration:!0};this._areaLabel=new j({...s,fontSize:k.Large}),this._perimeterLengthLabel=new j({...s,fontSize:k.Small}),this.addHandles([m((()=>[e.mode,this.visible,e.unit,e.measurementData,e.stagedPoint]),(()=>this._update()),c),m((()=>i.state?.camera),(()=>this._updateLabels()),c),O((()=>this._updateMessageBundle())),m((()=>this._parameters),(({accentColor:e,transparentAccentColor:t,transparentContrastColor:i,textColor:s,textBackgroundColor:r,textCalloutColor:n})=>{const{_path:a,_intersectedPath:o,_perimeter:l,_projectionLines:h,_measurementArea:m,_areaLabel:c,_perimeterLengthLabel:p}=this;a.color=e,o.color=e,l.color=e,h.color=e,m.color1=t,m.color2=i,c.textColor=s,c.backgroundColor=r,c.calloutColor=n,p.textColor=s,p.backgroundColor=r,p.calloutColor=n}),p)]),this._updateMessageBundle()}destroy(){this._measurementArea=l(this._measurementArea),this._path=l(this._path),this._intersectedPath=l(this._intersectedPath),this._perimeter=l(this._perimeter),this._intersectedPerimeter=l(this._intersectedPerimeter),this._areaLabel=l(this._areaLabel),this._perimeterLengthLabel=l(this._perimeterLengthLabel),this._projectionLines=l(this._projectionLines),this.set("view",null)}_update(){if(this.destroyed||!this.view.ready||!this.view.renderCoordsHelper)return;const{analysisViewData:{measurementData:e},analysisViewData:t}=this;null!=e&&(this._updateViewData(e,t.path),this._updateOrigin(),this._updatePathSegments(),this._updatePerimeterSegments(),this._updateArea(),this._updateProjectionLines(),this._updateLabels())}_updateViewData(e,t){const i=e.validMeasurement,s="geodesic"===e.actualMeasurementMode,r=s?e.geodesicArea:e.area;let n=1;if(r){const e=S(r,this.analysisViewData.unit);n=o(Math.sqrt(e.value)/Math.sqrt(300)),n*=Math.sqrt(u(1,e.unit,"square-meters")),n=u(n,"meters",this._renderUnits)}const a={validMeasurement:i,numVertices:e.numVertices,hasStagedVertex:e.hasStagedVertex,path:t,mode:e.actualMeasurementMode,positionsRender:e.positionsRender,positionsFittedWorld:e.positionsFittedWorld,positionsFittedRender:e.positionsFittedRender,intersectingSegments:s?e.geodesicIntersectingSegments:e.intersectingSegments,triangleIndices:s?e.geodesicTriangleIndices:e.triangleIndices,areaCentroid:s?e.geodesicAreaCentroidRenderCoords:e.areaCentroidRenderCoords,perimeterLengthLabelSegmentIndex:0,area:s?e.geodesicArea:e.area,pathLength:s?e.geodesicPathLength:e.pathLength,perimeterLength:e.perimeterLength,checkerSize:n};this._set("viewData",a)}_updateOrigin(){const e=this.viewData;V(e.positionsRender,this._origin),v(this._originTransform,this._origin),this._measurementArea.transform=this._originTransform,this._projectionLines.transform=this._originTransform}_createSegments(e){const t=this.viewData,i=this.view.renderCoordsHelper.spatialReference,s=t.mode,r=[],n=[],a=[],o=t.numVertices,l=t.validMeasurement?o:o-1;for(let m=0;m<l;++m){const l=t[e][m],h=t[e][(m+1)%o];let c=null;switch(s){case"euclidean":c=new M(l,h);break;case"geodesic":c=new D(l,h,i)}t.intersectingSegments.has(m)?a.push(c):n.push(c),r.push(c)}let h=null;return t.validMeasurement&&t.hasStagedVertex&&l>=2?h=r[r.length-2]:t.hasStagedVertex&&l>=1&&(h=r[r.length-1]),{all:r,nonIntersecting:n,intersecting:a,stagedSegment:h}}_updatePathSegments(){const{visible:e}=this,t=this._createSegments("positionsRender");this._path.setGeometryFromSegments(t.nonIntersecting,this._origin),this._path.visible=e,this._intersectedPath.setGeometryFromSegments(t.intersecting,this._origin),this._intersectedPath.visible=e,this._pathSegments=t.all}_updatePerimeterSegments(){const e=this.visible&&"euclidean"===this.viewData.mode,t=this._createSegments("positionsFittedRender");this._perimeter.setGeometryFromSegments(t.nonIntersecting,this._origin),this._perimeter.visible=e,this._intersectedPerimeter.setGeometryFromSegments(t.intersecting,this._origin),this._intersectedPerimeter.visible=e,this._perimeterSegments=t.all}_updateArea(){const e=this.viewData;switch(e.mode){case"euclidean":this._updateAreaEuclidean(e);break;case"geodesic":this._updateAreaGeodesic()}}_updateAreaEuclidean(e){const t=this.visible;e.validMeasurement&&0===e.intersectingSegments.size&&e.triangleIndices?(this._measurementArea.geometry={uv:e.positionsFittedWorld,position:e.positionsFittedRender,triangleIndices:e.triangleIndices},this._measurementArea.size=[e.checkerSize,e.checkerSize],this._measurementArea.visible=t):this._measurementArea.visible=!1}_updateAreaGeodesic(){this._measurementArea.visible=!1}_updateProjectionLines(){const e=this.viewData,t=this.visible,i=e.mode,s=e.numVertices;if(s>0&&e.validMeasurement&&"euclidean"===i){const i=[];for(let t=0;t<s;++t){const s=w();f(s,e.positionsRender[t],this._origin);const r=w();f(r,e.positionsFittedRender[t],this._origin),i.push([s,r])}this._projectionLines.geometry=i,this._projectionLines.visible=t}else this._projectionLines.geometry=null,this._projectionLines.visible=!1}_updateLabels(){if(this.destroyed)return;const{viewData:e}=this,{area:t,path:i}=e;if(!i)return;const s=this.visible,r=z(this.messages,t,this.analysisViewData.unit);if(null!=r?(this._areaLabel.geometry={type:"point",point:e.areaCentroid},this._areaLabel.text=r,this._areaLabel.visible=e.validMeasurement&&0===e.intersectingSegments.size&&s):this._areaLabel.visible=!1,this._set("areaLabel",r),e.validMeasurement&&0===e.intersectingSegments.size){const t="geodesic"===e.mode||!e.validMeasurement,i=t?e.pathLength:e.perimeterLength,r=I(this.messages,i,this.analysisViewData.unit);this._set("perimeterLengthLabel",r),this._perimeterLengthLabel.distance=this._parameters.labelDistance,this._perimeterLengthLabel.anchor="top",this._perimeterLengthLabel.text=r,this._perimeterLengthLabel.visible=!0;let n=!0;for(let s=0;s<e.numVertices;++s){const i=(e.perimeterLengthLabelSegmentIndex+s)%e.numVertices,r=t?this._pathSegments[i]:this._perimeterSegments[i];if(n=!0,this._perimeterLengthLabel.geometry={type:"segment",segment:r,sampleLocation:"center"},!this._perimeterLengthLabel.overlaps(this._areaLabel))break;n=!1}this._perimeterLengthLabel.visible=n&&s}else this._perimeterLengthLabel.visible=!1}_updateMessageBundle(){this.loadingMessages=!0,R("esri/core/t9n/Units").then((e=>{this.messages=e,this.view&&this._update()})).finally((()=>{this.loadingMessages=!1}))}};function z(e,t,i){return e&&t&&h(e,t,g(t.value,t.unit,i))}function I(e,t,i){return e&&t&&h(e,t,y(t,i))}var k;e([_()],F.prototype,"_parameters",null),e([_()],F.prototype,"view",void 0),e([_()],F.prototype,"messages",void 0),e([_()],F.prototype,"analysis",void 0),e([_()],F.prototype,"viewData",void 0),e([_()],F.prototype,"analysisViewData",void 0),e([_({readOnly:!0})],F.prototype,"areaLabel",void 0),e([_({readOnly:!0})],F.prototype,"perimeterLengthLabel",void 0),e([_()],F.prototype,"loadingMessages",void 0),e([_()],F.prototype,"visible",null),e([_()],F.prototype,"_renderUnits",null),F=e([L("esri.views.3d.analysis.AreaMeasurement.support.AreaMeasurementVisualization")],F),function(e){e[e.Small=12]="Small",e[e.Large=16]="Large"}(k||(k={}));const W={validMeasurement:!1,numVertices:0,hasStagedVertex:!1,path:null,mode:null,positionsRender:null,positionsFittedWorld:null,positionsFittedRender:null,intersectingSegments:null,triangleIndices:null,areaCentroid:null,perimeterLengthLabelSegmentIndex:null,checkerSize:null,area:null,pathLength:null,perimeterLength:null};export{F as AreaMeasurementVisualization};
5
+ import{_ as e}from"../../../../../chunks/tslib.es6.js";import"../../../../../intl.js";import t from"../../../../../core/Accessor.js";import{unitRGBAFromColor as i,multiplyOpacityToUnitRGBA as s,getContrast as r,BrightnessThreshold as n,multiplyOpacity as a}from"../../../../../core/colorUtils.js";import"../../../../../core/has.js";import{nextHighestPowerOfTen as o}from"../../../../../core/mathUtils.js";import{destroyMaybe as l}from"../../../../../core/maybe.js";import{formatDecimal as h}from"../../../../../core/quantityFormatUtils.js";import{watch as c,syncAndInitial as m,initial as d}from"../../../../../core/reactiveUtils.js";import{lengthUnitFromSpatialReference as p,convertUnit as u,adaptiveAreaUnit as g}from"../../../../../core/unitUtils.js";import{property as _}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as v}from"../../../../../core/accessorSupport/decorators/subclass.js";import{fromTranslation as L}from"../../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as b}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{d as f}from"../../../../../chunks/vec32.js";import{create as w}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{toPreferredAreaUnit as S,preferredLengthUnit as y}from"./utils.js";import{LabelVisualElement as j}from"../../../interactive/visualElements/LabelVisualElement.js";import{LineVisualElement as C}from"../../../interactive/visualElements/LineVisualElement.js";import{MeasurementAreaVisualElement as D}from"../../../interactive/visualElements/MeasurementAreaVisualElement.js";import{GeodesicSegment as A,EuclideanSegment as M}from"../../../interactive/visualElements/support/Segment.js";import{midpoint3d as V}from"../../../support/mathUtils.js";import{RenderOccludedFlag as x}from"../../../webgl-engine/lib/Material.js";import{createStipplePatternSimple as P}from"../../../webgl-engine/materials/lineStippleUtils.js";import{onLocaleChange as O}from"../../../../../intl/locale.js";import{fetchMessageBundle as R}from"../../../../../intl/messages.js";let F=class extends t{get _parameters(){const{accentColor:e,textColor:t}=this.view.effectiveTheme,o=i(e),l=s(e,.5),h=s(r(e),.5),c=r(t,n.Low);return{accentColor:o,transparentAccentColor:l,transparentContrastColor:h,intersectingLineColor:[1,.2,0,1],textColor:t,textBackgroundColor:a(c,.6),textCalloutColor:a(c,.5),pathLineWidth:3,perimeterLineWidth:2,projectionLineWidth:2,projectionLineStippleSize:5,labelDistance:25}}get visible(){return this.analysisViewData.visible}get _renderUnits(){const e=this.view.renderCoordsHelper.spatialReference;return p(e)??"meters"}get testData(){}constructor(e){super(e),this._path=null,this._intersectedPath=null,this._perimeter=null,this._intersectedPerimeter=null,this._projectionLines=null,this._measurementArea=null,this._areaLabel=null,this._perimeterLengthLabel=null,this._pathSegments=[],this._perimeterSegments=[],this._origin=w(),this._originTransform=b(),this.messages=null,this.viewData=W,this.areaLabel=null,this.perimeterLengthLabel=null,this.loadingMessages=!0}initialize(){const{analysisViewData:e,_parameters:t,view:i}=this;this._path=new C({view:i,attached:!0,width:t.pathLineWidth,polygonOffset:!0,renderOccluded:x.OccludeAndTransparent,isDecoration:!0}),this._intersectedPath=new C({view:i,attached:!0,width:t.pathLineWidth,polygonOffset:!0,renderOccluded:x.OccludeAndTransparent,isDecoration:!0}),this._perimeter=new C({view:i,attached:!0,width:t.perimeterLineWidth,polygonOffset:!0,renderOccluded:x.OccludeAndTransparent,isDecoration:!0}),this._intersectedPerimeter=new C({view:i,attached:!0,width:t.perimeterLineWidth,color:t.intersectingLineColor,polygonOffset:!0,renderOccluded:x.OccludeAndTransparent,isDecoration:!0}),this._projectionLines=new C({view:i,attached:!0,width:t.projectionLineWidth,stipplePattern:P(t.projectionLineStippleSize),polygonOffset:!0,renderOccluded:x.OccludeAndTransparent,isDecoration:!0}),this._measurementArea=new D({view:i,attached:!0,isDecoration:!0});const s={attached:!0,view:i,isDecoration:!0};this._areaLabel=new j({...s,fontSize:k.Large}),this._perimeterLengthLabel=new j({...s,fontSize:k.Small}),this.addHandles([c((()=>[e.mode,this.visible,e.unit,e.measurementData,e.stagedPoint]),(()=>this._update()),m),c((()=>i.state?.camera),(()=>this._updateLabels()),m),O((()=>this._updateMessageBundle())),c((()=>this._parameters),(({accentColor:e,transparentAccentColor:t,transparentContrastColor:i,textColor:s,textBackgroundColor:r,textCalloutColor:n})=>{const{_path:a,_intersectedPath:o,_perimeter:l,_projectionLines:h,_measurementArea:c,_areaLabel:m,_perimeterLengthLabel:d}=this;a.color=e,o.color=e,l.color=e,h.color=e,c.color1=t,c.color2=i,m.textColor=s,m.backgroundColor=r,m.calloutColor=n,d.textColor=s,d.backgroundColor=r,d.calloutColor=n}),d)]),this._updateMessageBundle()}destroy(){this._measurementArea=l(this._measurementArea),this._path=l(this._path),this._intersectedPath=l(this._intersectedPath),this._perimeter=l(this._perimeter),this._intersectedPerimeter=l(this._intersectedPerimeter),this._areaLabel=l(this._areaLabel),this._perimeterLengthLabel=l(this._perimeterLengthLabel),this._projectionLines=l(this._projectionLines),this.set("view",null)}_update(){if(this.destroyed||!this.view.ready||!this.view.renderCoordsHelper)return;const{analysisViewData:{measurementData:e},analysisViewData:t}=this;null!=e&&(this._updateViewData(e,t.path),this._updateOrigin(),this._updatePathSegments(),this._updatePerimeterSegments(),this._updateArea(),this._updateProjectionLines(),this._updateLabels())}_updateViewData(e,t){const i=e.validMeasurement,s="geodesic"===e.actualMeasurementMode,r=s?e.geodesicArea:e.area;let n=1;if(r){const e=S(r,this.analysisViewData.unit);n=o(Math.sqrt(e.value)/Math.sqrt(300)),n*=Math.sqrt(u(1,e.unit,"square-meters")),n=u(n,"meters",this._renderUnits)}const a={validMeasurement:i,numVertices:e.numVertices,hasStagedVertex:e.hasStagedVertex,path:t,mode:e.actualMeasurementMode,positionsRender:e.positionsRender,positionsFittedWorld:e.positionsFittedWorld,positionsFittedRender:e.positionsFittedRender,intersectingSegments:s?e.geodesicIntersectingSegments:e.intersectingSegments,triangleIndices:s?e.geodesicTriangleIndices:e.triangleIndices,areaCentroid:s?e.geodesicAreaCentroidRenderCoords:e.areaCentroidRenderCoords,perimeterLengthLabelSegmentIndex:0,area:s?e.geodesicArea:e.area,pathLength:s?e.geodesicPathLength:e.pathLength,perimeterLength:e.perimeterLength,checkerSize:n};this._set("viewData",a)}_updateOrigin(){const e=this.viewData;V(e.positionsRender,this._origin),L(this._originTransform,this._origin),this._measurementArea.transform=this._originTransform,this._projectionLines.transform=this._originTransform}_createSegments(e){const t=this.viewData,i=this.view.renderCoordsHelper.spatialReference,s=t.mode,r=[],n=[],a=[],o=t.numVertices,l=t.validMeasurement?o:o-1;for(let c=0;c<l;++c){const l=t[e][c],h=t[e][(c+1)%o];let m=null;switch(s){case"euclidean":m=new M(l,h);break;case"geodesic":m=new A(l,h,i)}t.intersectingSegments.has(c)?a.push(m):n.push(m),r.push(m)}let h=null;return t.validMeasurement&&t.hasStagedVertex&&l>=2?h=r[r.length-2]:t.hasStagedVertex&&l>=1&&(h=r[r.length-1]),{all:r,nonIntersecting:n,intersecting:a,stagedSegment:h}}_updatePathSegments(){const{visible:e}=this,t=this._createSegments("positionsRender");this._path.setGeometryFromSegments(t.nonIntersecting,this._origin),this._path.visible=e,this._intersectedPath.setGeometryFromSegments(t.intersecting,this._origin),this._intersectedPath.visible=e,this._pathSegments=t.all}_updatePerimeterSegments(){const e=this.visible&&"euclidean"===this.viewData.mode&&this.viewData.path.numVertices>2,t=this._createSegments("positionsFittedRender");this._perimeter.setGeometryFromSegments(t.nonIntersecting,this._origin),this._perimeter.visible=e,this._intersectedPerimeter.setGeometryFromSegments(t.intersecting,this._origin),this._intersectedPerimeter.visible=e,this._perimeterSegments=t.all}_updateArea(){const e=this.viewData;switch(e.mode){case"euclidean":this._updateAreaEuclidean(e);break;case"geodesic":this._updateAreaGeodesic()}}_updateAreaEuclidean(e){const t=this.visible;e.validMeasurement&&0===e.intersectingSegments.size&&e.triangleIndices?(this._measurementArea.geometry={uv:e.positionsFittedWorld,position:e.positionsFittedRender,triangleIndices:e.triangleIndices},this._measurementArea.size=[e.checkerSize,e.checkerSize],this._measurementArea.visible=t):this._measurementArea.visible=!1}_updateAreaGeodesic(){this._measurementArea.visible=!1}_updateProjectionLines(){const e=this.viewData,t=this.visible,i=e.mode,s=e.numVertices;if(s>0&&e.validMeasurement&&"euclidean"===i){const i=[];for(let t=0;t<s;++t){const s=w();f(s,e.positionsRender[t],this._origin);const r=w();f(r,e.positionsFittedRender[t],this._origin),i.push([s,r])}this._projectionLines.geometry=i,this._projectionLines.visible=t}else this._projectionLines.geometry=null,this._projectionLines.visible=!1}_updateLabels(){if(this.destroyed)return;const{viewData:e}=this,{area:t,path:i}=e;if(!i)return;const s=this.visible,r=this._areaLabel,n=this._perimeterLengthLabel,a=e.validMeasurement;r.visible=!0,n.visible=!0;let o=!1;const l=z(this.messages,t,this.analysisViewData.unit);if(null!=l&&s&&(r.geometry={type:"point",point:e.areaCentroid},r.text=l,o=e.validMeasurement&&0===e.intersectingSegments.size),this._set("areaLabel",l),s&&a&&0===e.intersectingSegments.size){const t="geodesic"===e.mode,i=t?e.pathLength:e.perimeterLength,s=I(this.messages,i,this.analysisViewData.unit);this._set("perimeterLengthLabel",s),n.distance=this._parameters.labelDistance,n.anchor="top",n.text=s;let r=!0;for(let a=0;a<e.numVertices;++a){const i=(e.perimeterLengthLabelSegmentIndex+a)%e.numVertices,s=t?this._pathSegments[i]:this._perimeterSegments[i];if(r=!0,n.geometry={type:"segment",segment:s,sampleLocation:"center"},!n.overlaps(this._areaLabel))break;r=!1}n.visible=r}else n.visible=!1;r.visible=o}_updateMessageBundle(){this.loadingMessages=!0,R("esri/core/t9n/Units").then((e=>{this.messages=e,this.view&&this._update()})).finally((()=>{this.loadingMessages=!1}))}};function z(e,t,i){return e&&t&&h(e,t,g(t.value,t.unit,i))}function I(e,t,i){return e&&t&&h(e,t,y(t,i))}var k;e([_()],F.prototype,"_parameters",null),e([_()],F.prototype,"view",void 0),e([_()],F.prototype,"messages",void 0),e([_()],F.prototype,"analysis",void 0),e([_()],F.prototype,"viewData",void 0),e([_()],F.prototype,"analysisViewData",void 0),e([_({readOnly:!0})],F.prototype,"areaLabel",void 0),e([_({readOnly:!0})],F.prototype,"perimeterLengthLabel",void 0),e([_()],F.prototype,"loadingMessages",void 0),e([_()],F.prototype,"visible",null),e([_()],F.prototype,"_renderUnits",null),F=e([v("esri.views.3d.analysis.AreaMeasurement.support.AreaMeasurementVisualization")],F),function(e){e[e.Small=12]="Small",e[e.Large=16]="Large"}(k||(k={}));const W={validMeasurement:!1,numVertices:0,hasStagedVertex:!1,path:null,mode:null,positionsRender:null,positionsFittedWorld:null,positionsFittedRender:null,intersectingSegments:null,triangleIndices:null,areaCentroid:null,perimeterLengthLabelSegmentIndex:null,checkerSize:null,area:null,pathLength:null,perimeterLength:null};export{F as AreaMeasurementVisualization};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{deg2rad as e}from"../../../../../core/mathUtils.js";import{createLength as t,toUnit as s,createArea as i}from"../../../../../core/quantityUtils.js";import{lengthUnitFromSpatialReference as o,areaUnitFromSpatialReference as n}from"../../../../../core/unitUtils.js";import{set as r,distance as h}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as a}from"../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{j as l,c as d,h as g,u as c,d as p,e as m,g as u,f as _,n as f}from"../../../../../chunks/vec32.js";import{create as S}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as L}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{getReferenceEllipsoid as M}from"../../../../../geometry/ellipsoidUtils.js";import{canProjectWithoutEngine as C}from"../../../../../geometry/projection.js";import{getSphericalPCPF as P}from"../../../../../geometry/spatialReferenceEllipsoidUtils.js";import{projectDirection as j}from"../../../../../geometry/projection/projectDirection.js";import{projectPointToVector as R}from"../../../../../geometry/projection/projectPointToVector.js";import{projectVectorToVector as U}from"../../../../../geometry/projection/projectVectorToVector.js";import{Axis as A}from"../../../../../geometry/support/Axis.js";import{compactIndices as v}from"../../../../../geometry/support/Indices.js";import{segmentIntersects as V}from"../../../../../geometry/support/intersectsBase.js";import{c as I}from"../../../../../chunks/sphere.js";import{areaPoints2d as w}from"../../../../../geometry/support/triangle.js";import{MeasurementMode as W}from"../../interfaces.js";import{bestFitPlane as F,fitHemisphere as y,triangleAreaGeodesic as G,planePointDistance as x,boundingSphere as T}from"../../support/measurementUtils.js";import{getElevationAtPoint as z}from"../../../support/ElevationProvider.js";import{midpoint3d as b,makeOrthonormal as q,tangentFrame as E}from"../../../support/mathUtils.js";import{triangulate as D}from"../../../../support/euclideanAreaMeasurementUtils.js";import{euclideanDistanceBetweenPoints as B}from"../../../../support/euclideanLengthMeasurementUtils.js";import{supportsGeodesicMeasurement as k}from"../../../../support/geodesicMeasurementUtils.js";import{computeEuclideanMeasurementSR as H}from"../../../../support/measurementUtils.js";class X{get numVertices(){return this._length}get hasStagedVertex(){return this._hasCursorPoint}constructor(e,t,s){this._sceneView=e,this._geodesicAreaMeasurementUtils=t,this._geodesicLengthMeasurementUtils=s,this.validMeasurement=!1,this.positionsWorld=[],this.positionsRender=[],this.positionsFittedWorld=[],this.positionsFittedRender=[],this.positionsGeodesic=[],this.positionsSpherical=[],this.positionsStereographic=[],this.pathSegmentLengths=[],this.geodesicPathSegmentLengths=[],this.perimeterSegmentLengths=[],this.intersectingSegments=new Set,this.geodesicIntersectingSegments=new Set,this.triangleIndices=null,this.geodesicTriangleIndices=null,this.areaCentroidWorldCoords=S(),this.areaCentroidRenderCoords=S(),this.geodesicAreaCentroidRenderCoords=S(),this.fittingMode=null,this.area=null,this.geodesicArea=null,this.pathLength=null,this.geodesicPathLength=null,this.perimeterLength=null,this._length=0,this._centroidRenderCoords=S(),this._planeWorldCoords=L(),this._worldUp=S(),this._worldTangent=S(),this._frame=[S(),S(),S()],this._pathVersion=-1,this._hasCursorPoint=!1,this._mode=null,this._tempU=S(),this._tempV=S(),this._tempVec3=S(),this._tempSphere=I();const i=H(e.spatialReference);this._measurementSR=i,this._lengthMeasurementUnit=o(i)??"meters",this._areaMeasurementUnit=n(i)??"square-meters"}update(e,t,s,i,o,n){const r=null!=t,h=this._pathVersion===e.version,a=this._hasCursorPoint===r,l=this._mode===o;return!(h&&!n&&a&&l&&e.isValidPolygon)&&(this._pathVersion=e.version,this._hasCursorPoint=r,this._updateCursorSegmentLength(e,t),this._update(e,t,s,i,o),!0)}_update(e,s,i,o,n){const r=this._sceneView.renderSpatialReference,h=this._measurementSR,a=i.spatialReference;let l=e.numVertices;const d=!(null==s||s.equals(e.lastPoint)||l>2&&s.equals(e.firstPoint));d&&(l+=1);const g=!e.polygonIsClosed&&l>2,c=e.polygonIsClosed||g;this._resize(l);const p=P(a),m=null!=a&&k(a)?a:null,u=null!=m&&C(a,p),{positionsGeodesic:_,positionsWorld:S,positionsRender:L,positionsSpherical:M}=this,j=(e,t)=>{Z(i.elevationProvider,e),R(e,S[t],h),R(e,L[t],r),u&&(R(e,_[t],m),R(e,M[t],p),f(M[t],M[t]))};e.forEachVertexPosition(((e,t)=>j(e,t))),d&&j(s,l-1);const U=this._updatePathLengths(c);if(this.pathLength=this._length>1?t(U,this._lengthMeasurementUnit):null,u){const e=this._updateGeodesicPathLengths(c,m);this.geodesicPathLength=null!=e&&this._length>1?e:null}else this.geodesicPathLength=null;if(this._updateMode(n),!c)return this.area=null,this.geodesicArea=null,this.perimeterLength=null,this.triangleIndices=null,this.geodesicTriangleIndices=null,this.intersectingSegments.clear(),this.geodesicIntersectingSegments.clear(),void(this.validMeasurement=!1);this._updateAreaAndPerimeterLength(i,r,h,o),u&&this._updateGeodesicArea(i,m),this.validMeasurement=!0}getData(){return{validMeasurement:this.validMeasurement,numVertices:this.numVertices,hasStagedVertex:this.hasStagedVertex,positionsRender:this.positionsRender,positionsFittedWorld:this.positionsFittedWorld,positionsFittedRender:this.positionsFittedRender,intersectingSegments:this.intersectingSegments,geodesicIntersectingSegments:this.geodesicIntersectingSegments,triangleIndices:this.triangleIndices,geodesicTriangleIndices:this.geodesicTriangleIndices,areaCentroidRenderCoords:this.areaCentroidRenderCoords,geodesicAreaCentroidRenderCoords:this.geodesicAreaCentroidRenderCoords,area:this.area,geodesicArea:this.geodesicArea,pathLength:this.pathLength,geodesicPathLength:this.geodesicPathLength,perimeterLength:this.perimeterLength,actualMeasurementMode:this.actualMeasurementMode}}_resize(e){for(e<this._length&&(this.positionsWorld.length=e,this.positionsRender.length=e,this.positionsFittedWorld.length=e,this.positionsFittedRender.length=e,this.positionsGeodesic.length=e,this.positionsSpherical.length=e,this.positionsStereographic.length=e,this.pathSegmentLengths.length=e,this.geodesicPathSegmentLengths.length=e,this.perimeterSegmentLengths.length=e,this._length=e);this._length<e;)this.positionsWorld.push(S()),this.positionsRender.push(S()),this.positionsFittedWorld.push(a()),this.positionsFittedRender.push(S()),this.positionsGeodesic.push(S()),this.positionsSpherical.push(S()),this.positionsStereographic.push(a()),this.pathSegmentLengths.push(0),this.geodesicPathSegmentLengths.push(0),this.perimeterSegmentLengths.push(0),++this._length}_updatePathLengths(e){const t=this.positionsWorld,s=this.pathSegmentLengths;let i=0;const o=this._length;for(let n=0;n<o;++n){const r=s[n]=l(t[n],t[(n+1)%o]);(n<o-1||e)&&(i+=r)}return i}_updateGeodesicPathLengths(e,i){const o=this.positionsGeodesic,n=this.geodesicPathSegmentLengths;let r=0;const h=this._length;for(let t=0;t<h;++t){const a=this._geodesicLengthMeasurementUtils.geodesicDistance(o[t],o[(t+1)%h],i);if(null==a)return null;const l=s(a,"meters").value,d=n[t]=l;(t<h-1||e)&&(r+=d)}return t(r,"meters")}_updateAreaAndPerimeterLength(e,t,s,i){const o=e.renderCoordsHelper,n=this.positionsWorld,h=this.positionsRender,a=this.positionsFittedWorld,l=this.positionsFittedRender,f=this._planeWorldCoords,S=this._centroidRenderCoords;b(h,S),o.worldUpAtPosition(S,this._worldUp),o.worldBasisAtPosition(S,A.X,this._worldTangent),j(S,this._worldUp,t,this._worldUp,s),j(S,this._worldTangent,t,this._worldTangent,s),n.length>2&&F(n,f),this.fittingMode=this._selectFittingMode(f,n,this._worldUp,i);let L=0;if("horizontal"===this.fittingMode){let e=-1/0;h.forEach(((t,s)=>{const i=o.getAltitude(h[s]);i>e&&(e=i,L=s)}))}const M=n[L];let C=f,P=this._worldTangent;"horizontal"===this.fittingMode?C=this._worldUp:"vertical"===this.fittingMode&&(C=this._tempVec3,P=this._worldUp,q(f,this._worldUp,C)),d(this._frame[2],C),q(P,C,this._frame[0]),g(this._frame[1],this._frame[0],this._frame[2]),c(this._frame[1],this._frame[1]);const R=this._tempVec3,v=this._tempU,V=this._tempV;for(let d=0;d<this._length;++d){const e=a[d],i=l[d];p(R,n[d],M),r(e,m(this._frame[0],R),m(this._frame[1],R)),u(v,this._frame[0],e[0]),u(V,this._frame[1],e[1]),_(R,v,V),_(R,R,M),U(R,s,i,t)}this.perimeterLength=this._length>0?this._updatePerimeterLengths():null,b(l,this.areaCentroidRenderCoords),U(this.areaCentroidRenderCoords,t,this.areaCentroidWorldCoords,s),this._updateIntersectingSegments(),this.area=0===this.intersectingSegments.size?this._computeArea():null}_updateGeodesicArea(e,t){const{renderCoordsHelper:s,spatialReference:i}=e,{positionsSpherical:o,positionsStereographic:n}=this,h=this._tempVec3,a=y(o,h);if(!a)return void(this.geodesicArea=null);const l=this._tempU,d=this._tempV;E(h,l,d);for(let g=0;g<this._length;++g){const e=m(o[g],l),t=m(o[g],d),s=m(o[g],h);r(n[g],e/s,t/s)}u(h,h,M(i).radius),s.toRenderCoords(h,P(i),this.geodesicAreaCentroidRenderCoords),this._updateGeodesicIntersectingSegments(),this.geodesicArea=a&&0===this.geodesicIntersectingSegments.size?this._computeGeodesicArea(t):null}_updatePerimeterLengths(){const e=this.positionsFittedWorld,s=this.perimeterSegmentLengths;let i=0;for(let t=0;t<this._length;++t){i+=s[t]=h(e[t],e[(t+1)%this._length])}return t(i,this._lengthMeasurementUnit)}_updateIntersectingSegments(){const e=this.positionsFittedWorld,t=this.intersectingSegments;t.clear();for(let s=0;s<this._length;++s)for(let i=s+2;i<this._length;++i){if((i+1)%this._length===s)continue;const o=e[s],n=e[(s+1)%this._length],r=e[i],h=e[(i+1)%this._length];V(o,n,r,h)&&(t.add(s),t.add(i))}}_computeArea(){const e=this.positionsFittedWorld,t=this.triangleIndices=v(D(e));let s=0;for(let i=0;i<t.length;i+=3)s+=w(e[t[i]],e[t[i+1]],e[t[i+2]]);return i(s,this._areaMeasurementUnit)}_updateGeodesicIntersectingSegments(){const e=this.positionsStereographic,t=this.geodesicIntersectingSegments;t.clear();for(let s=0;s<this._length;++s)for(let i=s+2;i<this._length;++i){if((i+1)%this._length===s)continue;const o=e[s],n=e[(s+1)%this._length],r=e[i],h=e[(i+1)%this._length];V(o,n,r,h)&&(t.add(s),t.add(i))}}_computeGeodesicArea(e){const t=this.positionsGeodesic,o=this.positionsStereographic,n=this.geodesicTriangleIndices=v(D(o));let r=0;for(let i=0;i<n.length;i+=3){const o=G(t[n[i]],t[n[i+1]],t[n[i+2]],e,this._geodesicAreaMeasurementUtils);if(null==o)return null;r+=s(o,"square-meters").value}return i(r,"square-meters")}_selectFittingMode(t,s,i,o){const n=s.map((e=>Math.abs(x(t,e)))).reduce(((e,t)=>Math.max(e,t)),0);T(s,this._tempSphere);const r=n/(2*this._tempSphere[3]),h=r<o.maxRelativeErrorCoplanar,a=r<o.maxRelativeErrorAlmostCoplanar;let l="horizontal";if(h)l="oblique";else if(a){l=Math.abs(m(i,t))>Math.cos(e(o.verticalAngleThreshold))?"horizontal":"vertical"}return l}_updateCursorSegmentLength(e,t){const s=e.lastPoint;e.isValidPolygon||null==s||null==t?(this.geodesicStagedSegmentLength=null,this.stagedSegmentLength=null):(this.geodesicStagedSegmentLength=this._geodesicLengthMeasurementUtils.geodesicDistanceBetweenPoints(s,t),this.stagedSegmentLength=B(s,t)?.direct)}_updateMode(e){if(e===W.Auto){this.actualMeasurementMode="euclidean";let e=0;null!=this.geodesicPathLength&&(e+=this.geodesicPathLength.value),e>J&&(this.actualMeasurementMode="geodesic")}else this.actualMeasurementMode=e===W.Euclidean?"euclidean":"geodesic";null==this.geodesicPathLength&&(this.actualMeasurementMode="euclidean"),this._mode=e}}function Z(e,t){t.hasZ||(t.z=z(e,t,"ground")??0)}const J=1e5;export{X as MeasurementDataManager};
5
+ import{deg2rad as e}from"../../../../../core/mathUtils.js";import{createLength as t,toUnit as s,createArea as i}from"../../../../../core/quantityUtils.js";import{lengthUnitFromSpatialReference as o,areaUnitFromSpatialReference as n}from"../../../../../core/unitUtils.js";import{set as r,distance as h}from"../../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as a}from"../../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{j as l,c as d,h as g,u as c,d as p,e as m,g as u,f as _,n as f}from"../../../../../chunks/vec32.js";import{create as S}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as L}from"../../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{getReferenceEllipsoid as M}from"../../../../../geometry/ellipsoidUtils.js";import{canProjectWithoutEngine as C}from"../../../../../geometry/projection.js";import{getSphericalPCPF as P}from"../../../../../geometry/spatialReferenceEllipsoidUtils.js";import{projectDirection as j}from"../../../../../geometry/projection/projectDirection.js";import{projectPointToVector as R}from"../../../../../geometry/projection/projectPointToVector.js";import{projectVectorToVector as U}from"../../../../../geometry/projection/projectVectorToVector.js";import{Axis as A}from"../../../../../geometry/support/Axis.js";import{compactIndices as v}from"../../../../../geometry/support/Indices.js";import{segmentIntersects as I}from"../../../../../geometry/support/intersectsBase.js";import{c as V}from"../../../../../chunks/sphere.js";import{areaPoints2d as w}from"../../../../../geometry/support/triangle.js";import{MeasurementMode as W}from"../../interfaces.js";import{bestFitPlane as F,fitHemisphere as y,triangleAreaGeodesic as G,planePointDistance as x,boundingSphere as T}from"../../support/measurementUtils.js";import{getElevationAtPoint as z}from"../../../support/ElevationProvider.js";import{midpoint3d as q,makeOrthonormal as b,tangentFrame as E}from"../../../support/mathUtils.js";import{triangulate as D}from"../../../../support/euclideanAreaMeasurementUtils.js";import{euclideanDistanceBetweenPoints as B}from"../../../../support/euclideanLengthMeasurementUtils.js";import{supportsGeodesicMeasurement as k}from"../../../../support/geodesicMeasurementUtils.js";import{computeEuclideanMeasurementSR as H}from"../../../../support/measurementUtils.js";class X{get numVertices(){return this._length}get hasStagedVertex(){return null!=this._lastCursorPoint}constructor(e,t,s){this._sceneView=e,this._geodesicAreaMeasurementUtils=t,this._geodesicLengthMeasurementUtils=s,this.validMeasurement=!1,this.positionsWorld=[],this.positionsRender=[],this.positionsFittedWorld=[],this.positionsFittedRender=[],this.positionsGeodesic=[],this.positionsSpherical=[],this.positionsStereographic=[],this.pathSegmentLengths=[],this.geodesicPathSegmentLengths=[],this.perimeterSegmentLengths=[],this.intersectingSegments=new Set,this.geodesicIntersectingSegments=new Set,this.triangleIndices=null,this.geodesicTriangleIndices=null,this.areaCentroidWorldCoords=S(),this.areaCentroidRenderCoords=S(),this.geodesicAreaCentroidRenderCoords=S(),this.fittingMode=null,this.area=null,this.geodesicArea=null,this.pathLength=null,this.geodesicPathLength=null,this.perimeterLength=null,this._length=0,this._centroidRenderCoords=S(),this._planeWorldCoords=L(),this._worldUp=S(),this._worldTangent=S(),this._frame=[S(),S(),S()],this._lastPathVersion=-1,this._lastCursorPoint=null,this._mode=null,this._tempU=S(),this._tempV=S(),this._tempVec3=S(),this._tempSphere=V();const i=H(e.spatialReference);this._measurementSR=i,this._lengthMeasurementUnit=o(i)??"meters",this._areaMeasurementUnit=n(i)??"square-meters"}update(e,t,s,i,o,n){const r=this._lastPathVersion===e.version,h=t?t.equals(this._lastCursorPoint):null==this._lastCursorPoint,a=this._mode===o;return!(r&&!n&&a&&h)&&(this._lastPathVersion=e.version,this._lastCursorPoint=t,this._updateCursorSegmentLength(e,t),this._update(e,t,s,i,o),!0)}_update(e,s,i,o,n){const r=this._sceneView.renderSpatialReference,h=this._measurementSR,a=i.spatialReference;let l=e.numVertices;const d=!(null==s||s.equals(e.lastPoint)||l>2&&s.equals(e.firstPoint)||e.polygonIsClosed);d&&(l+=1);const g=!e.polygonIsClosed&&l>2,c=e.polygonIsClosed||g;this._resize(l);const p=P(a),m=null!=a&&k(a)?a:null,u=null!=m&&C(a,p),{positionsGeodesic:_,positionsWorld:S,positionsRender:L,positionsSpherical:M}=this,j=(e,t)=>{Z(i.elevationProvider,e),R(e,S[t],h),R(e,L[t],r),u&&(R(e,_[t],m),R(e,M[t],p),f(M[t],M[t]))};e.forEachVertexPosition(((e,t)=>j(e,t))),d&&j(s,l-1);const U=this._updatePathLengths(c);if(this.pathLength=this._length>1?t(U,this._lengthMeasurementUnit):null,u){const e=this._updateGeodesicPathLengths(c,m);this.geodesicPathLength=null!=e&&this._length>1?e:null}else this.geodesicPathLength=null;if(this._updateMode(n),!c)return this.area=null,this.geodesicArea=null,this.perimeterLength=null,this.triangleIndices=null,this.geodesicTriangleIndices=null,this.intersectingSegments.clear(),this.geodesicIntersectingSegments.clear(),void(this.validMeasurement=!1);this._updateAreaAndPerimeterLength(i,r,h,o),u&&this._updateGeodesicArea(i,m),this.validMeasurement=!0}getData(){return{validMeasurement:this.validMeasurement,numVertices:this.numVertices,hasStagedVertex:this.hasStagedVertex,positionsRender:this.positionsRender,positionsFittedWorld:this.positionsFittedWorld,positionsFittedRender:this.positionsFittedRender,intersectingSegments:this.intersectingSegments,geodesicIntersectingSegments:this.geodesicIntersectingSegments,triangleIndices:this.triangleIndices,geodesicTriangleIndices:this.geodesicTriangleIndices,areaCentroidRenderCoords:this.areaCentroidRenderCoords,geodesicAreaCentroidRenderCoords:this.geodesicAreaCentroidRenderCoords,area:this.area,geodesicArea:this.geodesicArea,pathLength:this.pathLength,geodesicPathLength:this.geodesicPathLength,perimeterLength:this.perimeterLength,actualMeasurementMode:this.actualMeasurementMode}}_resize(e){for(e<this._length&&(this.positionsWorld.length=e,this.positionsRender.length=e,this.positionsFittedWorld.length=e,this.positionsFittedRender.length=e,this.positionsGeodesic.length=e,this.positionsSpherical.length=e,this.positionsStereographic.length=e,this.pathSegmentLengths.length=e,this.geodesicPathSegmentLengths.length=e,this.perimeterSegmentLengths.length=e,this._length=e);this._length<e;)this.positionsWorld.push(S()),this.positionsRender.push(S()),this.positionsFittedWorld.push(a()),this.positionsFittedRender.push(S()),this.positionsGeodesic.push(S()),this.positionsSpherical.push(S()),this.positionsStereographic.push(a()),this.pathSegmentLengths.push(0),this.geodesicPathSegmentLengths.push(0),this.perimeterSegmentLengths.push(0),++this._length}_updatePathLengths(e){const t=this.positionsWorld,s=this.pathSegmentLengths;let i=0;const o=this._length;for(let n=0;n<o;++n){const r=s[n]=l(t[n],t[(n+1)%o]);(n<o-1||e)&&(i+=r)}return i}_updateGeodesicPathLengths(e,i){const o=this.positionsGeodesic,n=this.geodesicPathSegmentLengths;let r=0;const h=this._length;for(let t=0;t<h;++t){const a=this._geodesicLengthMeasurementUtils.geodesicDistance(o[t],o[(t+1)%h],i);if(null==a)return null;const l=s(a,"meters").value,d=n[t]=l;(t<h-1||e)&&(r+=d)}return t(r,"meters")}_updateAreaAndPerimeterLength(e,t,s,i){const o=e.renderCoordsHelper,n=this.positionsWorld,h=this.positionsRender,a=this.positionsFittedWorld,l=this.positionsFittedRender,f=this._planeWorldCoords,S=this._centroidRenderCoords;q(h,S),o.worldUpAtPosition(S,this._worldUp),o.worldBasisAtPosition(S,A.X,this._worldTangent),j(S,this._worldUp,t,this._worldUp,s),j(S,this._worldTangent,t,this._worldTangent,s),n.length>2&&F(n,f),this.fittingMode=this._selectFittingMode(f,n,this._worldUp,i);let L=0;if("horizontal"===this.fittingMode){let e=-1/0;h.forEach(((t,s)=>{const i=o.getAltitude(h[s]);i>e&&(e=i,L=s)}))}const M=n[L];let C=f,P=this._worldTangent;"horizontal"===this.fittingMode?C=this._worldUp:"vertical"===this.fittingMode&&(C=this._tempVec3,P=this._worldUp,b(f,this._worldUp,C)),d(this._frame[2],C),b(P,C,this._frame[0]),g(this._frame[1],this._frame[0],this._frame[2]),c(this._frame[1],this._frame[1]);const R=this._tempVec3,v=this._tempU,I=this._tempV;for(let d=0;d<this._length;++d){const e=a[d],i=l[d];p(R,n[d],M),r(e,m(this._frame[0],R),m(this._frame[1],R)),u(v,this._frame[0],e[0]),u(I,this._frame[1],e[1]),_(R,v,I),_(R,R,M),U(R,s,i,t)}this.perimeterLength=this._length>0?this._updatePerimeterLengths():null,q(l,this.areaCentroidRenderCoords),U(this.areaCentroidRenderCoords,t,this.areaCentroidWorldCoords,s),this._updateIntersectingSegments(),this.area=0===this.intersectingSegments.size?this._computeArea():null}_updateGeodesicArea(e,t){const{renderCoordsHelper:s,spatialReference:i}=e,{positionsSpherical:o,positionsStereographic:n}=this,h=this._tempVec3,a=y(o,h);if(!a)return void(this.geodesicArea=null);const l=this._tempU,d=this._tempV;E(h,l,d);for(let g=0;g<this._length;++g){const e=m(o[g],l),t=m(o[g],d),s=m(o[g],h);r(n[g],e/s,t/s)}u(h,h,M(i).radius),s.toRenderCoords(h,P(i),this.geodesicAreaCentroidRenderCoords),this._updateGeodesicIntersectingSegments(),this.geodesicArea=a&&0===this.geodesicIntersectingSegments.size?this._computeGeodesicArea(t):null}_updatePerimeterLengths(){const e=this.positionsFittedWorld,s=this.perimeterSegmentLengths;let i=0;for(let t=0;t<this._length;++t){i+=s[t]=h(e[t],e[(t+1)%this._length])}return t(i,this._lengthMeasurementUnit)}_updateIntersectingSegments(){const e=this.positionsFittedWorld,t=this.intersectingSegments;t.clear();for(let s=0;s<this._length;++s)for(let i=s+2;i<this._length;++i){if((i+1)%this._length===s)continue;const o=e[s],n=e[(s+1)%this._length],r=e[i],h=e[(i+1)%this._length];I(o,n,r,h)&&(t.add(s),t.add(i))}}_computeArea(){const e=this.positionsFittedWorld,t=this.triangleIndices=v(D(e));let s=0;for(let i=0;i<t.length;i+=3)s+=w(e[t[i]],e[t[i+1]],e[t[i+2]]);return i(s,this._areaMeasurementUnit)}_updateGeodesicIntersectingSegments(){const e=this.positionsStereographic,t=this.geodesicIntersectingSegments;t.clear();for(let s=0;s<this._length;++s)for(let i=s+2;i<this._length;++i){if((i+1)%this._length===s)continue;const o=e[s],n=e[(s+1)%this._length],r=e[i],h=e[(i+1)%this._length];I(o,n,r,h)&&(t.add(s),t.add(i))}}_computeGeodesicArea(e){const t=this.positionsGeodesic,o=this.positionsStereographic,n=this.geodesicTriangleIndices=v(D(o));let r=0;for(let i=0;i<n.length;i+=3){const o=G(t[n[i]],t[n[i+1]],t[n[i+2]],e,this._geodesicAreaMeasurementUtils);if(null==o)return null;r+=s(o,"square-meters").value}return i(r,"square-meters")}_selectFittingMode(t,s,i,o){const n=s.map((e=>Math.abs(x(t,e)))).reduce(((e,t)=>Math.max(e,t)),0);T(s,this._tempSphere);const r=n/(2*this._tempSphere[3]),h=r<o.maxRelativeErrorCoplanar,a=r<o.maxRelativeErrorAlmostCoplanar;let l="horizontal";if(h)l="oblique";else if(a){l=Math.abs(m(i,t))>Math.cos(e(o.verticalAngleThreshold))?"horizontal":"vertical"}return l}_updateCursorSegmentLength(e,t){const s=e.lastPoint;e.isValidPolygon||null==s||null==t?(this.geodesicStagedSegmentLength=null,this.stagedSegmentLength=null):(this.geodesicStagedSegmentLength=this._geodesicLengthMeasurementUtils.geodesicDistanceBetweenPoints(s,t),this.stagedSegmentLength=B(s,t)?.direct)}_updateMode(e){if(e===W.Auto){this.actualMeasurementMode="euclidean";let e=0;null!=this.geodesicPathLength&&(e+=this.geodesicPathLength.value),e>J&&(this.actualMeasurementMode="geodesic")}else this.actualMeasurementMode=e===W.Euclidean?"euclidean":"geodesic";null==this.geodesicPathLength&&(this.actualMeasurementMode="euclidean"),this._mode=e}}function Z(e,t){t.hasZ||(t.z=z(e,t,"ground")??0)}const J=1e5;export{X as MeasurementDataManager};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import s from"../../../core/Error.js";import"../../../core/has.js";import{abortMaybe as a,destroyMaybe as r}from"../../../core/maybe.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{getDefaultUnitForView as n}from"../../../support/getDefaultUnitForView.js";import{AnalysisView3D as l}from"./AnalysisView3D.js";import{MeasurementMode as p}from"./interfaces.js";import{AreaMeasurementController as u}from"./AreaMeasurement/support/AreaMeasurementController.js";import{AreaMeasurement3DPathHelper as m}from"./AreaMeasurement/support/AreaMeasurementPathHelper.js";import{AreaMeasurementVisualization as h}from"./AreaMeasurement/support/AreaMeasurementVisualization.js";import{toPreferredLengthUnit as y,toPreferredAreaUnit as d}from"./AreaMeasurement/support/utils.js";import c from"../interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js";import{connectAnalysisViewToTool as g,removeAnalysisViewTool as v,startExclusiveInteractiveOperation as f}from"../../analysis/analysisViewUtils.js";import{loadGeodesicAreaMeasurementUtils as w}from"../../support/geodesicAreaMeasurementUtils.js";import{loadGeodesicLengthMeasurementUtils as j}from"../../support/geodesicLengthMeasurementUtils.js";let M=class extends(l(t)){constructor(e){super(e),this.type="area-measurement-view-3d",this.analysis=null,this.measurementData=null,this.lastDraggedVertex=null,this.stagedPoint=null,this.mode=p.Auto,this.tool=null,this.userOperation=null}initialize(){const{analysis:e,view:t}=this;this.path=new m({view:t,areaMeasurement:e}),this._analysisVisualization=new h({view:t,analysis:e,analysisViewData:this}),this.addResolvingPromise(Promise.all([w(),j()]).then((([s,a])=>{this.destroyed||(this._analysisController=new u({view:t,analysis:e,analysisViewData:this,geodesicAreaMeasurementUtils:s,geodesicLengthMeasurementUtils:a}))}))),this.addHandles(g(this,c))}destroy(){v(this),this.userOperation=a(this.userOperation),this._analysisController=r(this._analysisController),this._analysisVisualization=r(this._analysisVisualization),this.path.destroy()}get updating(){return!!this._analysisVisualization?.loadingMessages}get result(){const{measurementData:e}=this;if(null==e)return{area:null,mode:null,perimeter:null};const{unit:t}=this;if("euclidean"===e.actualMeasurementMode){const{area:s,perimeterLength:a}=e;return{area:null!=s?d(s,t):null,perimeter:null!=a?y(a,t):null,mode:"euclidean"}}const{geodesicArea:s,pathLength:a}=e;return{area:null!=s?d(s,t):null,perimeter:null!=a?y(a,t):null,mode:"geodesic"}}get viewData(){return this._analysisVisualization.viewData}get areaLabel(){return this._analysisVisualization.areaLabel}get perimeterLengthLabel(){return this._analysisVisualization.perimeterLengthLabel}get validMeasurement(){return this.path.isValidPolygon}get unit(){return this.analysis.unit??n(this.view)}get testData(){}place(e){if(this.analysis.valid)throw new s("AreaMeasurementAnalysisView3D:place","Cannot place an area measurement when the analysis already has a valid polygon.");return f(this,{abortOptions:e,shouldRejectOnCancel:()=>!this.analysis.valid})}};e([i()],M.prototype,"_analysisVisualization",void 0),e([i()],M.prototype,"_analysisController",void 0),e([i({readOnly:!0})],M.prototype,"type",void 0),e([i({constructOnly:!0,nonNullable:!0})],M.prototype,"analysis",void 0),e([i()],M.prototype,"updating",null),e([i()],M.prototype,"result",null),e([i()],M.prototype,"measurementData",void 0),e([i()],M.prototype,"viewData",null),e([i()],M.prototype,"areaLabel",null),e([i()],M.prototype,"perimeterLengthLabel",null),e([i()],M.prototype,"validMeasurement",null),e([i()],M.prototype,"path",void 0),e([i()],M.prototype,"lastDraggedVertex",void 0),e([i()],M.prototype,"stagedPoint",void 0),e([i()],M.prototype,"mode",void 0),e([i()],M.prototype,"unit",null),e([i()],M.prototype,"tool",void 0),e([i()],M.prototype,"userOperation",void 0),M=e([o("esri.views.3d.analysis.AreaMeasurementAnalysisView3D")],M);const V=M;export{V as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import"../../../core/has.js";import{abortMaybe as s,destroyMaybe as r}from"../../../core/maybe.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import{getDefaultUnitForView as o}from"../../../support/getDefaultUnitForView.js";import{AnalysisView3D as n}from"./AnalysisView3D.js";import{MeasurementMode as l}from"./interfaces.js";import{AreaMeasurementController as u}from"./AreaMeasurement/support/AreaMeasurementController.js";import{AreaMeasurement3DPathHelper as p}from"./AreaMeasurement/support/AreaMeasurementPathHelper.js";import{AreaMeasurementVisualization as m}from"./AreaMeasurement/support/AreaMeasurementVisualization.js";import{toPreferredLengthUnit as d,toPreferredAreaUnit as h}from"./AreaMeasurement/support/utils.js";import y from"../interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js";import{connectAnalysisViewToTool as c,removeAnalysisViewTool as g,startExclusiveInteractiveOperation as v}from"../../analysis/analysisViewUtils.js";import{loadGeodesicAreaMeasurementUtils as f}from"../../support/geodesicAreaMeasurementUtils.js";import{loadGeodesicLengthMeasurementUtils as j}from"../../support/geodesicLengthMeasurementUtils.js";let M=class extends(n(t)){constructor(e){super(e),this.type="area-measurement-view-3d",this.analysis=null,this.measurementData=null,this.lastDraggedVertex=null,this.stagedPoint=null,this.mode=l.Auto,this.tool=null,this.userOperation=null}initialize(){const{analysis:e,view:t}=this;this.path=new p({view:t,areaMeasurement:e}),this._analysisVisualization=new m({view:t,analysis:e,analysisViewData:this}),this.addResolvingPromise(Promise.all([f(),j()]).then((([s,r])=>{this.destroyed||(this._analysisController=new u({view:t,analysis:e,analysisViewData:this,geodesicAreaMeasurementUtils:s,geodesicLengthMeasurementUtils:r}))}))),this.addHandles(c(this,y))}destroy(){g(this),this.userOperation=s(this.userOperation),this._analysisController=r(this._analysisController),this._analysisVisualization=r(this._analysisVisualization),this.path.destroy()}get updating(){return!!this._analysisVisualization?.loadingMessages}get result(){const{measurementData:e}=this;if(null==e)return{area:null,mode:null,perimeter:null};const{unit:t}=this;if("euclidean"===e.actualMeasurementMode){const{area:s,perimeterLength:r}=e;return{area:null!=s?h(s,t):null,perimeter:null!=r?d(r,t):null,mode:"euclidean"}}const{geodesicArea:s,pathLength:r}=e;return{area:null!=s?h(s,t):null,perimeter:null!=r?d(r,t):null,mode:"geodesic"}}get viewData(){return this._analysisVisualization.viewData}get areaLabel(){return this._analysisVisualization.areaLabel}get perimeterLengthLabel(){return this._analysisVisualization.perimeterLengthLabel}get validMeasurement(){return this.path.isValidPolygon}get unit(){return this.analysis.unit??o(this.view)}get testData(){}place(e){return v(this,{abortOptions:e,shouldRejectOnCancel:()=>!0})}};e([a()],M.prototype,"_analysisVisualization",void 0),e([a()],M.prototype,"_analysisController",void 0),e([a({readOnly:!0})],M.prototype,"type",void 0),e([a({constructOnly:!0,nonNullable:!0})],M.prototype,"analysis",void 0),e([a()],M.prototype,"updating",null),e([a()],M.prototype,"result",null),e([a()],M.prototype,"measurementData",void 0),e([a()],M.prototype,"viewData",null),e([a()],M.prototype,"areaLabel",null),e([a()],M.prototype,"perimeterLengthLabel",null),e([a()],M.prototype,"validMeasurement",null),e([a()],M.prototype,"path",void 0),e([a()],M.prototype,"lastDraggedVertex",void 0),e([a()],M.prototype,"stagedPoint",void 0),e([a()],M.prototype,"mode",void 0),e([a()],M.prototype,"unit",null),e([a()],M.prototype,"tool",void 0),e([a()],M.prototype,"userOperation",void 0),M=e([i("esri.views.3d.analysis.AreaMeasurementAnalysisView3D")],M);const w=M;export{w as default};