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

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 (642) hide show
  1. package/assets/components/assets/calcite-date-picker/nls/bg.json +31 -0
  2. package/assets/components/assets/calcite-icon/centerAlign16.json +1 -0
  3. package/assets/components/assets/calcite-icon/centerAlign24.json +1 -0
  4. package/assets/components/assets/calcite-icon/centerAlign32.json +1 -0
  5. package/assets/components/assets/calcite-icon/checkSquareF16.json +1 -0
  6. package/assets/components/assets/calcite-icon/checkSquareF24.json +1 -0
  7. package/assets/components/assets/calcite-icon/checkSquareF32.json +1 -0
  8. package/assets/components/assets/calcite-icon/convert16.json +1 -0
  9. package/assets/components/assets/calcite-icon/convert24.json +1 -0
  10. package/assets/components/assets/calcite-icon/convert32.json +1 -0
  11. package/assets/components/assets/calcite-icon/explore16.json +1 -0
  12. package/assets/components/assets/calcite-icon/explore24.json +1 -0
  13. package/assets/components/assets/calcite-icon/explore32.json +1 -0
  14. package/assets/components/assets/calcite-icon/formDropdown16.json +1 -0
  15. package/assets/components/assets/calcite-icon/formDropdown24.json +1 -0
  16. package/assets/components/assets/calcite-icon/formDropdown32.json +1 -0
  17. package/assets/components/assets/calcite-icon/language16.json +1 -0
  18. package/assets/components/assets/calcite-icon/language24.json +1 -0
  19. package/assets/components/assets/calcite-icon/language32.json +1 -0
  20. package/assets/components/assets/calcite-icon/languageTranslate16.json +1 -0
  21. package/assets/components/assets/calcite-icon/languageTranslate24.json +1 -0
  22. package/assets/components/assets/calcite-icon/languageTranslate32.json +1 -0
  23. package/assets/components/assets/calcite-icon/leftAlign16.json +1 -0
  24. package/assets/components/assets/calcite-icon/leftAlign24.json +1 -0
  25. package/assets/components/assets/calcite-icon/leftAlign32.json +1 -0
  26. package/assets/components/assets/calcite-icon/lineSolid4.json +1 -0
  27. package/assets/components/assets/calcite-icon/partlyCloudy16.json +1 -0
  28. package/assets/components/assets/calcite-icon/partlyCloudy24.json +1 -0
  29. package/assets/components/assets/calcite-icon/partlyCloudy32.json +1 -0
  30. package/assets/components/assets/calcite-icon/rightAlign16.json +1 -0
  31. package/assets/components/assets/calcite-icon/rightAlign24.json +1 -0
  32. package/assets/components/assets/calcite-icon/rightAlign32.json +1 -0
  33. package/assets/components/assets/calcite-icon/screenshotMode16.json +1 -0
  34. package/assets/components/assets/calcite-icon/screenshotMode24.json +1 -0
  35. package/assets/components/assets/calcite-icon/screenshotMode32.json +1 -0
  36. package/assets/components/assets/calcite-icon/squareF16.json +1 -0
  37. package/assets/components/assets/calcite-icon/squareF24.json +1 -0
  38. package/assets/components/assets/calcite-icon/squareF32.json +1 -0
  39. package/assets/components/assets/calcite-icon/terminal16.json +1 -0
  40. package/assets/components/assets/calcite-icon/terminal24.json +1 -0
  41. package/assets/components/assets/calcite-icon/terminal32.json +1 -0
  42. package/assets/components/assets/calcite-icon/touch16.json +1 -0
  43. package/assets/components/assets/calcite-icon/touch24.json +1 -0
  44. package/assets/components/assets/calcite-icon/touch32.json +1 -0
  45. package/assets/components/assets/calcite-icon/xHexagon16.json +1 -0
  46. package/assets/components/assets/calcite-icon/xHexagon24.json +1 -0
  47. package/assets/components/assets/calcite-icon/xHexagon32.json +1 -0
  48. package/assets/components/assets/calcite-icon/xHexagonF16.json +1 -0
  49. package/assets/components/assets/calcite-icon/xHexagonF24.json +1 -0
  50. package/assets/components/assets/calcite-icon/xHexagonF32.json +1 -0
  51. package/assets/components/assets/calcite-icon/xOctagonF16.json +1 -0
  52. package/assets/components/assets/calcite-icon/xOctagonF24.json +1 -0
  53. package/assets/components/assets/calcite-icon/xOctagonF32.json +1 -0
  54. package/assets/esri/core/workers/RemoteClient.js +1 -1
  55. package/assets/esri/core/workers/chunks/09da224052976e290828.js +1 -0
  56. package/assets/esri/core/workers/chunks/0bf079e752ab79468478.js +1 -0
  57. package/assets/esri/core/workers/chunks/{ce5ca5e95b2378ec55b9.js → 1305ef8717da6e902a55.js} +1 -1
  58. package/assets/esri/core/workers/chunks/199670a3a564ebe3bd79.js +1 -0
  59. package/assets/esri/core/workers/chunks/1e4d37c2b9dc83d20a11.js +1 -0
  60. package/assets/esri/core/workers/chunks/20411bb8e04703962ce6.js +1 -0
  61. package/assets/esri/core/workers/chunks/2416f8bf8bbd2ec786ab.js +1 -0
  62. package/assets/esri/core/workers/chunks/25a3e9bc0b4c7e0d3165.js +1 -0
  63. package/assets/esri/core/workers/chunks/{99f0d896c17dd09cd285.js → 2629adf79e7fd9f25f07.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{9c417740bf3707a0d465.js → 2c607d30ff8ca1b61286.js} +1 -1
  65. package/assets/esri/core/workers/chunks/2e445a8735ea2adb641a.js +1 -0
  66. package/assets/esri/core/workers/chunks/37a7bd30352b1309b8f8.js +1 -0
  67. package/assets/esri/core/workers/chunks/390d9021169e65c10eb8.js +1 -0
  68. package/assets/esri/core/workers/chunks/{3d5169ea9810d10caf0d.js → 3a9740dccda6a733313c.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{8a250ec51097f16feb66.js → 40a1e713f63ec77110c0.js} +1 -1
  70. package/assets/esri/core/workers/chunks/43cdff2418325e163420.js +1 -0
  71. package/assets/esri/core/workers/chunks/4c9084a04948b6924749.js +1 -0
  72. package/assets/esri/core/workers/chunks/{4beba242e7540ee3182b.js → 5538639a49c7cc2eca63.js} +1 -1
  73. package/assets/esri/core/workers/chunks/57c67e260267a1dbc5e3.js +1 -0
  74. package/assets/esri/core/workers/chunks/5a4a5585ec8027079f32.js +1 -0
  75. package/assets/esri/core/workers/chunks/5ac4c1d54b94c7d87835.js +1 -0
  76. package/assets/esri/core/workers/chunks/60371c0f750cde87656d.js +1 -0
  77. package/assets/esri/core/workers/chunks/{ba6fdaed6c315dc13981.js → 625d2663daa8e0cf64b0.js} +1 -1
  78. package/assets/esri/core/workers/chunks/{3a2b2dc3e938d53faa30.js → 64276aacaafa4c8a15bd.js} +1 -1
  79. package/assets/esri/core/workers/chunks/{75466e0c8c8da499b150.js → 662d13f68cf3ec92439b.js} +1 -1
  80. package/assets/esri/core/workers/chunks/663ad15b86936eb06b69.js +1 -0
  81. package/assets/esri/core/workers/chunks/67162b3e2cc1b5dc6818.js +1 -0
  82. package/assets/esri/core/workers/chunks/68a59ce98177d8513337.js +1 -0
  83. package/assets/esri/core/workers/chunks/6cdfe175c965918b741b.js +1 -0
  84. package/assets/esri/core/workers/chunks/739e579150bf466d43ae.js +1 -0
  85. package/assets/esri/core/workers/chunks/74df1f3e1e2e524a89d2.js +1 -0
  86. package/assets/esri/core/workers/chunks/76eef4799f6c5fff7e2d.js +1 -0
  87. package/assets/esri/core/workers/chunks/{ea05f870dda27bca4fe8.js → 7a8764ae8a0041e1151d.js} +2 -2
  88. package/assets/esri/core/workers/chunks/{ea05f870dda27bca4fe8.js.LICENSE.txt → 7a8764ae8a0041e1151d.js.LICENSE.txt} +1 -1
  89. package/assets/esri/core/workers/chunks/7baf6b1f3f050aa67ae4.js +1 -0
  90. package/assets/esri/core/workers/chunks/{f52b6d5037e4205b035c.js → 7bc5cc5dbf1b7b70ddac.js} +1 -1
  91. package/assets/esri/core/workers/chunks/85e27fd949475f9a6bbc.js +1 -0
  92. package/assets/esri/core/workers/chunks/8967288145f8fbd20e7d.js +1 -0
  93. package/assets/esri/core/workers/chunks/8cbb04a9065aa3756638.js +1 -0
  94. package/assets/esri/core/workers/chunks/8fa0a14165d43ffe87a5.js +1 -0
  95. package/assets/esri/core/workers/chunks/94b8dbf859df71858d1c.js +1 -0
  96. package/assets/esri/core/workers/chunks/96ab518eb6ba11333dee.js +1 -0
  97. package/assets/esri/core/workers/chunks/99a777693e4539f0b03b.js +1 -0
  98. package/assets/esri/core/workers/chunks/9cb2ae42a8e328b1d98d.js +1 -0
  99. package/assets/esri/core/workers/chunks/9d3c58a0ef634d95b7bd.js +1 -0
  100. package/assets/esri/core/workers/chunks/9d77467aa71d345fc1b6.js +1 -0
  101. package/assets/esri/core/workers/chunks/9f8b7b6b4e95f9a794fc.js +1 -0
  102. package/assets/esri/core/workers/chunks/a78757b9c7e8cbea08fa.js +1 -0
  103. package/assets/esri/core/workers/chunks/{9b7c51ff3d2b42aa62f5.js → a7b1b75643ed31489495.js} +1 -1
  104. package/assets/esri/core/workers/chunks/a8b13fb804bb775e4967.js +1 -0
  105. package/assets/esri/core/workers/chunks/a8c13529367c037cdd94.js +1 -0
  106. package/assets/esri/core/workers/chunks/a96afc176041f698c7a1.js +1 -0
  107. package/assets/esri/core/workers/chunks/aa861b8eae6c85f3dad4.js +1 -0
  108. package/assets/esri/core/workers/chunks/ac8dca61ade28c542ae2.js +1 -0
  109. package/assets/esri/core/workers/chunks/ad081d8e49e7f90c3c26.js +1 -0
  110. package/assets/esri/core/workers/chunks/afa6912454f2a5ffadce.js +1 -0
  111. package/assets/esri/core/workers/chunks/b0b036ad3ad3cd956747.js +1 -0
  112. package/assets/esri/core/workers/chunks/{2a39d520b192b8e552b5.js → b2ae5fc4f787ea568b88.js} +1 -1
  113. package/assets/esri/core/workers/chunks/b2beb6e1fd2ee6503830.js +1 -0
  114. package/assets/esri/core/workers/chunks/{b87bc1481a49b38109f4.js → b9c177524b3e7de1ffd1.js} +1 -1
  115. package/assets/esri/core/workers/chunks/ba615f118a3a8970ef25.js +1 -0
  116. package/assets/esri/core/workers/chunks/{7c1b9ae141112a63b446.js → ba6654a885be4b7a43f0.js} +1 -1
  117. package/assets/esri/core/workers/chunks/bab1cfd0a901181622af.js +1 -0
  118. package/assets/esri/core/workers/chunks/be2b7cce79fd41627931.js +1 -0
  119. package/assets/esri/core/workers/chunks/bf6dda4a2af14c4b7716.js +1 -0
  120. package/assets/esri/core/workers/chunks/{ed0297fc61014e848c18.js → c080114a69fa95b88d22.js} +1 -1
  121. package/assets/esri/core/workers/chunks/c13dfdd548dcb1bdb294.js +1 -0
  122. package/assets/esri/core/workers/chunks/c36f84daa7736878418d.js +1 -0
  123. package/assets/esri/core/workers/chunks/c6f94b92e866b881d9b9.js +1 -0
  124. package/assets/esri/core/workers/chunks/{573dc3064e84ca86844d.js → c959e0d1cf7dce0421b9.js} +1 -1
  125. package/assets/esri/core/workers/chunks/{1fd48459afb58a6cf14f.js → ca2f5faa01d99c21ec14.js} +1 -1
  126. package/assets/esri/core/workers/chunks/cbb291412fd1a5261aa9.js +1 -0
  127. package/assets/esri/core/workers/chunks/{7aa543a97f055cddea99.js → cc146c57bbdac8029fd8.js} +1 -1
  128. package/assets/esri/core/workers/chunks/cd7d83d127e085d52584.js +1 -0
  129. package/assets/esri/core/workers/chunks/cef4af64860ebbfc1c47.js +1 -0
  130. package/assets/esri/core/workers/chunks/d1454155ee1b8a421cbb.js +1 -0
  131. package/assets/esri/core/workers/chunks/{0cd583c3233573cb8468.js → d24c4fbc567486b1188f.js} +1 -1
  132. package/assets/esri/core/workers/chunks/d52108864136c5a8a618.js +1 -0
  133. package/assets/esri/core/workers/chunks/d72488db62fcf39447b6.js +1 -0
  134. package/assets/esri/core/workers/chunks/de03439ca2c9782bf325.js +1 -0
  135. package/assets/esri/core/workers/chunks/de6cff7b6cbbf99b20d1.js +981 -0
  136. package/assets/esri/core/workers/chunks/e079cb1d53aca15b7df2.js +1 -0
  137. package/assets/esri/core/workers/chunks/e59764ee8cf25d4f74e2.js +1 -0
  138. package/assets/esri/core/workers/chunks/e6df9839b551569fbc62.js +1 -0
  139. package/assets/esri/core/workers/chunks/e97e986120aaadad7d4c.js +1 -0
  140. package/assets/esri/core/workers/chunks/{2f66fcb8670b108af549.js → ed0bcc66fb1e0ee75a4b.js} +1 -1
  141. package/assets/esri/core/workers/chunks/f8e7755240a94b499e1f.js +1 -0
  142. package/assets/esri/core/workers/chunks/{b4ed7856cd9c98434477.js → fe864d01e72aa24574b6.js} +1 -1
  143. package/assets/esri/libs/vxl/vxlLayer.wasm +0 -0
  144. package/assets/esri/themes/base/icons/fonts/CalciteWebCoreIcons.svg +1 -0
  145. package/assets/esri/themes/base/icons/fonts/CalciteWebCoreIcons.ttf +0 -0
  146. package/assets/esri/themes/base/icons/fonts/CalciteWebCoreIcons.woff +0 -0
  147. package/assets/esri/themes/base/icons/selection.json +1 -1
  148. package/assets/esri/themes/base/icons/style.css +4 -0
  149. package/assets/esri/themes/base/icons/style.scss +6 -0
  150. package/assets/esri/themes/base/icons/variables.scss +1 -0
  151. package/assets/esri/themes/base/widgets/_FeatureTable.scss +6 -0
  152. package/assets/esri/themes/base/widgets/_Weather.scss +1 -1
  153. package/assets/esri/themes/dark/main.css +1 -1
  154. package/assets/esri/themes/dark-blue/main.css +1 -1
  155. package/assets/esri/themes/dark-green/main.css +1 -1
  156. package/assets/esri/themes/dark-purple/main.css +1 -1
  157. package/assets/esri/themes/dark-red/main.css +1 -1
  158. package/assets/esri/themes/light/main.css +1 -1
  159. package/assets/esri/themes/light/view.css +1 -1
  160. package/assets/esri/themes/light-blue/main.css +1 -1
  161. package/assets/esri/themes/light-green/main.css +1 -1
  162. package/assets/esri/themes/light-purple/main.css +1 -1
  163. package/assets/esri/themes/light-red/main.css +1 -1
  164. package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
  165. package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
  166. package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
  167. package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
  168. package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
  169. package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
  170. package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
  171. package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
  172. package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
  173. package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
  174. package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
  175. package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
  176. package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
  177. package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
  178. package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
  179. package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
  180. package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
  181. package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
  182. package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
  183. package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
  184. package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
  185. package/assets/esri/widgets/Editor/t9n/Editor_nb.json +1 -1
  186. package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
  187. package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
  188. package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
  189. package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
  190. package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
  191. package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
  192. package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
  193. package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
  194. package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
  195. package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
  196. package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
  197. package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
  198. package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
  199. package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
  200. package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
  201. package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
  202. package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
  203. package/assets/esri/widgets/ElevationProfile/t9n/ElevationProfile_ja.json +1 -1
  204. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ar.json +1 -1
  205. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_bg.json +1 -1
  206. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_bs.json +1 -1
  207. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ca.json +1 -1
  208. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_cs.json +1 -1
  209. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_da.json +1 -1
  210. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_de.json +1 -1
  211. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_el.json +1 -1
  212. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_es.json +1 -1
  213. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_et.json +1 -1
  214. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_fi.json +1 -1
  215. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_fr.json +1 -1
  216. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_he.json +1 -1
  217. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_hr.json +1 -1
  218. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_hu.json +1 -1
  219. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_id.json +1 -1
  220. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_it.json +1 -1
  221. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ja.json +1 -1
  222. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ko.json +1 -1
  223. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_lt.json +1 -1
  224. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_lv.json +1 -1
  225. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_nb.json +1 -1
  226. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_nl.json +1 -1
  227. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_pl.json +1 -1
  228. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_pt-BR.json +1 -1
  229. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_pt-PT.json +1 -1
  230. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ro.json +1 -1
  231. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_ru.json +1 -1
  232. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_sk.json +1 -1
  233. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_sl.json +1 -1
  234. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_sr.json +1 -1
  235. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_sv.json +1 -1
  236. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_th.json +1 -1
  237. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_tr.json +1 -1
  238. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_uk.json +1 -1
  239. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_vi.json +1 -1
  240. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_zh-CN.json +1 -1
  241. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_zh-HK.json +1 -1
  242. package/assets/esri/widgets/FeatureTemplates/t9n/FeatureTemplates_zh-TW.json +1 -1
  243. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_cs.json +1 -1
  244. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_el.json +1 -1
  245. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_fr.json +1 -1
  246. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_lv.json +1 -1
  247. package/assets/esri/widgets/Weather/t9n/Weather_ar.json +1 -1
  248. package/assets/esri/widgets/Weather/t9n/Weather_bg.json +1 -1
  249. package/assets/esri/widgets/Weather/t9n/Weather_bs.json +1 -1
  250. package/assets/esri/widgets/Weather/t9n/Weather_ca.json +1 -1
  251. package/assets/esri/widgets/Weather/t9n/Weather_cs.json +1 -1
  252. package/assets/esri/widgets/Weather/t9n/Weather_da.json +1 -1
  253. package/assets/esri/widgets/Weather/t9n/Weather_de.json +1 -1
  254. package/assets/esri/widgets/Weather/t9n/Weather_el.json +1 -1
  255. package/assets/esri/widgets/Weather/t9n/Weather_es.json +1 -1
  256. package/assets/esri/widgets/Weather/t9n/Weather_et.json +1 -1
  257. package/assets/esri/widgets/Weather/t9n/Weather_fi.json +1 -1
  258. package/assets/esri/widgets/Weather/t9n/Weather_fr.json +1 -1
  259. package/assets/esri/widgets/Weather/t9n/Weather_he.json +1 -1
  260. package/assets/esri/widgets/Weather/t9n/Weather_hr.json +1 -1
  261. package/assets/esri/widgets/Weather/t9n/Weather_hu.json +1 -1
  262. package/assets/esri/widgets/Weather/t9n/Weather_id.json +1 -1
  263. package/assets/esri/widgets/Weather/t9n/Weather_it.json +1 -1
  264. package/assets/esri/widgets/Weather/t9n/Weather_ja.json +1 -1
  265. package/assets/esri/widgets/Weather/t9n/Weather_ko.json +1 -1
  266. package/assets/esri/widgets/Weather/t9n/Weather_lt.json +1 -1
  267. package/assets/esri/widgets/Weather/t9n/Weather_lv.json +1 -1
  268. package/assets/esri/widgets/Weather/t9n/Weather_nb.json +1 -1
  269. package/assets/esri/widgets/Weather/t9n/Weather_nl.json +1 -1
  270. package/assets/esri/widgets/Weather/t9n/Weather_pl.json +1 -1
  271. package/assets/esri/widgets/Weather/t9n/Weather_pt-BR.json +1 -1
  272. package/assets/esri/widgets/Weather/t9n/Weather_pt-PT.json +1 -1
  273. package/assets/esri/widgets/Weather/t9n/Weather_ro.json +1 -1
  274. package/assets/esri/widgets/Weather/t9n/Weather_ru.json +1 -1
  275. package/assets/esri/widgets/Weather/t9n/Weather_sk.json +1 -1
  276. package/assets/esri/widgets/Weather/t9n/Weather_sl.json +1 -1
  277. package/assets/esri/widgets/Weather/t9n/Weather_sr.json +1 -1
  278. package/assets/esri/widgets/Weather/t9n/Weather_sv.json +1 -1
  279. package/assets/esri/widgets/Weather/t9n/Weather_th.json +1 -1
  280. package/assets/esri/widgets/Weather/t9n/Weather_tr.json +1 -1
  281. package/assets/esri/widgets/Weather/t9n/Weather_uk.json +1 -1
  282. package/assets/esri/widgets/Weather/t9n/Weather_vi.json +1 -1
  283. package/assets/esri/widgets/Weather/t9n/Weather_zh-CN.json +1 -1
  284. package/assets/esri/widgets/Weather/t9n/Weather_zh-HK.json +1 -1
  285. package/assets/esri/widgets/Weather/t9n/Weather_zh-TW.json +1 -1
  286. package/chunks/Clouds.glsl.js +14 -14
  287. package/chunks/CloudsComposition.glsl.js +4 -4
  288. package/chunks/DefaultMaterial.glsl.js +2 -2
  289. package/chunks/HUDMaterial.glsl.js +22 -21
  290. package/chunks/RibbonLine.glsl.js +10 -14
  291. package/chunks/persistableUrlUtils.js +1 -1
  292. package/chunks/vec32.js +1 -1
  293. package/chunks/vec42.js +1 -1
  294. package/chunks/vxlLayer.js +1 -1
  295. package/core/accessorSupport/ensureType.js +1 -1
  296. package/core/accessorSupport/get.js +1 -1
  297. package/core/accessorSupport/set.js +1 -1
  298. package/core/has.js +1 -1
  299. package/core/urlUtils.js +1 -1
  300. package/core/workers/workerFactory.js +1 -1
  301. package/form/elements/FieldElement.js +1 -1
  302. package/geometry/support/buffer/math/common.js +1 -1
  303. package/geometry/support/heightModelInfoUtils.js +1 -1
  304. package/interfaces.d.ts +372 -126
  305. package/layers/FeatureLayer.js +1 -1
  306. package/layers/RouteLayer.js +1 -1
  307. package/layers/SubtypeGroupLayer.js +1 -1
  308. package/layers/VectorTileLayer.js +1 -1
  309. package/layers/VoxelLayer.js +1 -1
  310. package/layers/VoxelWasmPerScene.js +1 -1
  311. package/layers/WMSLayer.js +1 -1
  312. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  313. package/layers/graphics/data/QueryEngineCapabilities.js +1 -1
  314. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  315. package/layers/mixins/ArcGISImageService.js +1 -1
  316. package/layers/mixins/OperationalLayer.js +1 -1
  317. package/layers/ogc/crsUtils.js +5 -0
  318. package/layers/support/RasterFunction.js +1 -1
  319. package/layers/support/RasterWorker.js +1 -1
  320. package/layers/support/capabilities.js +1 -1
  321. package/layers/support/rasterDatasets/BaseRaster.js +1 -1
  322. package/layers/support/rasterDatasets/WCSRaster.js +1 -1
  323. package/layers/support/rasterDatasets/wcsCoverageParser.js +1 -1
  324. package/layers/support/rasterFunctions/rasterProjectionHelper.js +1 -1
  325. package/layers/support/vectorTileLayerLoader.js +1 -1
  326. package/layers/support/wmsUtils.js +1 -1
  327. package/layers/support/wmtsUtils.js +1 -1
  328. package/libs/vxl/enums.js +1 -1
  329. package/package.json +5 -5
  330. package/portal/schemas/buildingSceneLayerItem.js +1 -1
  331. package/portal/schemas/definitions.js +1 -1
  332. package/portal/schemas/integratedMeshLayerItem.js +1 -1
  333. package/portal/schemas/pointCloudLayerItem.js +1 -1
  334. package/portal/schemas/sceneLayerItem.js +1 -1
  335. package/portal/schemas/webScene.js +1 -1
  336. package/rasterRenderers.js +1 -1
  337. package/renderers/support/RasterSymbolizer.js +1 -1
  338. package/request.js +1 -1
  339. package/rest/find.js +1 -1
  340. package/rest/geometryService/generalize.js +1 -1
  341. package/rest/geometryService/lengths.js +1 -1
  342. package/rest/geometryService/offset.js +1 -1
  343. package/rest/geometryService/relation.js +1 -1
  344. package/rest/geometryService/trimExtend.js +1 -1
  345. package/rest/identify.js +1 -1
  346. package/{tasks → rest}/operations/find.js +0 -0
  347. package/{tasks → rest}/operations/generalize.js +0 -0
  348. package/rest/operations/identify.js +5 -0
  349. package/{tasks → rest}/operations/lengths.js +0 -0
  350. package/{tasks → rest}/operations/offset.js +0 -0
  351. package/{tasks → rest}/operations/relation.js +0 -0
  352. package/{tasks → rest}/operations/trimExtend.js +0 -0
  353. package/{tasks → rest}/operations/urlUtils.js +0 -0
  354. package/rest/print.js +1 -1
  355. package/rest/query/operations/query.js +1 -1
  356. package/rest/query/operations/queryAttachments.js +1 -1
  357. package/rest/query/operations/queryRelatedRecords.js +1 -1
  358. package/rest/query/operations/queryTopFeatures.js +1 -1
  359. package/rest/route/utils.js +1 -1
  360. package/rest/support/ImageIdentifyParameters.js +1 -1
  361. package/rest/support/NetworkServiceDescription.js +1 -1
  362. package/rest/support/RouteInfo.js +1 -1
  363. package/rest/support/RouteParameters.js +1 -1
  364. package/rest/support/RouteSettings.js +5 -0
  365. package/rest/support/StatisticDefinition.js +1 -1
  366. package/rest/support/Stop.js +1 -1
  367. package/rest/support/networkEnums.js +1 -1
  368. package/smartMapping/renderers/univariateColorSize.js +1 -1
  369. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  370. package/support/featureFlags.js +1 -1
  371. package/support/revision.js +1 -1
  372. package/symbols/ExtrudeSymbol3DLayer.js +1 -1
  373. package/symbols/Font.js +1 -1
  374. package/symbols/IconSymbol3DLayer.js +1 -1
  375. package/symbols/ObjectSymbol3DLayer.js +1 -1
  376. package/symbols/PathSymbol3DLayer.js +1 -1
  377. package/symbols/TextSymbol.js +1 -1
  378. package/symbols/TextSymbol3DLayer.js +1 -1
  379. package/symbols/cim/placements/PlacementAlongLineSameSize.js +1 -1
  380. package/symbols/support/Symbol3DHalo.js +1 -1
  381. package/symbols/support/Symbol3DMaterial.js +1 -1
  382. package/symbols/support/cimSymbolUtils.js +1 -1
  383. package/symbols/support/textUtils.js +5 -0
  384. package/symbols/support/utils.js +1 -1
  385. package/views/2d/engine/Stage.js +1 -1
  386. package/views/2d/engine/vectorTiles/TileHandler.js +1 -1
  387. package/views/2d/engine/vectorTiles/shaders/VTLMaterialManager.js +1 -1
  388. package/views/2d/engine/vectorTiles/style/VectorTileSource.js +1 -1
  389. package/views/2d/engine/vectorTiles/style/VectorTilesRequestManager.js +5 -0
  390. package/views/2d/engine/webgl/BitBlitRenderer.js +1 -1
  391. package/views/2d/engine/webgl/MaterialManager.js +1 -1
  392. package/views/2d/engine/webgl/alignmentUtils.js +1 -1
  393. package/views/2d/engine/webgl/effects/BlendEffect.js +1 -1
  394. package/views/2d/engine/webgl/materialKey/MaterialKey.js +1 -1
  395. package/views/2d/engine/webgl/mesh/templates/WGLLabelTemplate.js +1 -1
  396. package/views/2d/engine/webgl/shaders/BlendPrograms.js +1 -1
  397. package/views/2d/engine/webgl/shaders/MaterialPrograms.js +1 -1
  398. package/views/2d/layers/BaseLayerView2D.js +1 -1
  399. package/views/2d/layers/BaseLayerViewGL2D.js +1 -1
  400. package/views/2d/layers/GraphicsLayerView2D.js +1 -1
  401. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  402. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  403. package/views/2d/layers/LayerView2D.js +1 -1
  404. package/views/2d/layers/MapNotesLayerView2D.js +1 -1
  405. package/views/2d/layers/RouteLayerView2D.js +1 -1
  406. package/views/2d/layers/TileLayerView2D.js +1 -1
  407. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  408. package/views/2d/layers/WMSLayerView2D.js +1 -1
  409. package/views/2d/layers/WMTSLayerView2D.js +1 -1
  410. package/views/2d/layers/features/sources/BaseFeatureSource.js +1 -1
  411. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  412. package/views/2d/layers/graphics/GraphicBoundsRenderer.js +1 -1
  413. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  414. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  415. package/views/2d/support/engineHelpers.js +1 -1
  416. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  417. package/views/3d/environment/CloudsComposition.glsl.js +1 -1
  418. package/views/3d/environment/CloudsComposition.js +1 -1
  419. package/views/3d/environment/CloudsGenerator.js +1 -1
  420. package/views/3d/environment/CloudyWeather.js +1 -1
  421. package/views/3d/environment/Fog.js +1 -1
  422. package/views/3d/environment/FoggyWeather.js +1 -1
  423. package/views/3d/environment/NoiseTextureAtlas.js +1 -1
  424. package/views/3d/environment/RainyWeather.js +1 -1
  425. package/views/3d/environment/Stars.js +1 -1
  426. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  427. package/views/3d/layers/DynamicLayerView3D.js +1 -1
  428. package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
  429. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  430. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  431. package/views/3d/layers/GraphicsView3D.js +1 -1
  432. package/views/3d/layers/I3SMeshView3D.js +1 -1
  433. package/views/3d/layers/ImageryLayerView3D.js +1 -1
  434. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  435. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  436. package/views/3d/layers/MapImageLayerView3D.js +1 -1
  437. package/views/3d/layers/OGCFeatureLayerView3D.js +1 -1
  438. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  439. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  440. package/views/3d/layers/SceneLayerView3D.js +1 -1
  441. package/views/3d/layers/VectorTileLayerView3D.js +1 -1
  442. package/views/3d/layers/VoxelLayerView3D.js +1 -1
  443. package/views/3d/layers/WMSLayerView3D.js +1 -1
  444. package/views/3d/layers/WMTSLayerView3D.js +1 -1
  445. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  446. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  447. package/views/3d/layers/graphics/Graphics3DDrapedGraphicLayer.js +1 -1
  448. package/views/3d/layers/graphics/Graphics3DElevationAlignment.js +1 -1
  449. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +5 -0
  450. package/views/3d/layers/graphics/Graphics3DFrustumVisibility.js +1 -1
  451. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  452. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  453. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  454. package/views/3d/layers/graphics/Graphics3DPointSymbol.js +1 -1
  455. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  456. package/views/3d/layers/graphics/Graphics3DScaleVisibility.js +1 -1
  457. package/views/3d/layers/graphics/Graphics3DSymbolCreationContext.js +1 -1
  458. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  459. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  460. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  461. package/views/3d/layers/graphics/GraphicsProcessor.js +5 -0
  462. package/views/3d/layers/graphics/IGraphics3DFeatureProcessor.js +4 -0
  463. package/views/3d/layers/graphics/Labeler.js +1 -1
  464. package/views/3d/layers/graphics/QueryEngine.js +1 -1
  465. package/views/3d/layers/support/FeatureTileTree3DDebugger.js +1 -1
  466. package/views/3d/state/controllers/RotateController.js +1 -1
  467. package/views/3d/state/controllers/global/PinchAndPanController.js +1 -1
  468. package/views/3d/state/controllers/global/ZoomController.js +1 -1
  469. package/views/3d/state/controllers/global/ZoomStepController.js +1 -1
  470. package/views/3d/state/controllers/local/PinchAndPanController.js +1 -1
  471. package/views/3d/state/controllers/local/ZoomStepController.js +1 -1
  472. package/views/3d/support/debugFlags.js +1 -1
  473. package/views/3d/support/sunUtils.js +1 -1
  474. package/views/3d/terrain/Overlay.js +1 -1
  475. package/views/3d/terrain/OverlayManager.js +1 -1
  476. package/views/3d/terrain/OverlayRenderer.js +1 -1
  477. package/views/3d/terrain/TerrainSurface.js +1 -1
  478. package/views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js +7 -1
  479. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +28 -24
  480. package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +19 -14
  481. package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +12 -14
  482. package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
  483. package/views/3d/webgl-engine/lib/InstanceParameters.js +5 -0
  484. package/views/3d/webgl-engine/lib/{localOrigin.js → LocalOriginFactory.js} +0 -0
  485. package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
  486. package/views/3d/webgl-engine/lib/Program.js +1 -1
  487. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  488. package/views/3d/webgl-engine/lib/RenderTargetHelper.js +1 -1
  489. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  490. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  491. package/views/3d/webgl-engine/lib/SSAOHelper.js +1 -1
  492. package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
  493. package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
  494. package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
  495. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  496. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  497. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  498. package/views/3d/webgl-engine/parts/Model.js +1 -1
  499. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  500. package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
  501. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  502. package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
  503. package/views/3d/webgl-engine/shaders/RealisticTreeTechnique.js +1 -1
  504. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  505. package/views/LayerViewManager.js +1 -1
  506. package/views/MapView.js +1 -1
  507. package/views/SceneView.js +1 -1
  508. package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
  509. package/views/interactive/snapping/featureSources/FeatureServiceSnappingSource.js +1 -1
  510. package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
  511. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiledFetcher.js +1 -1
  512. package/views/layers/ImageryTileLayerView.js +1 -1
  513. package/views/layers/LayerView.js +1 -1
  514. package/views/layers/OGCFeatureLayerView.js +1 -1
  515. package/views/layers/RefreshableLayerView.js +1 -1
  516. package/views/overlay/ViewOverlay.js +1 -1
  517. package/views/support/DefaultsFromMap.js +1 -1
  518. package/views/support/WatchUpdatingTracking.js +1 -1
  519. package/views/support/imageReprojection.js +1 -1
  520. package/views/webgl/BufferObject.js +1 -1
  521. package/views/webgl/ContextState.js +1 -1
  522. package/views/webgl/FramebufferObject.js +1 -1
  523. package/views/webgl/Program.js +1 -1
  524. package/views/webgl/ProgramCache.js +1 -1
  525. package/views/webgl/ProgramTemplate.js +1 -1
  526. package/views/webgl/Renderbuffer.js +1 -1
  527. package/views/webgl/RenderingContext.js +1 -1
  528. package/views/webgl/ShaderTranspiler.js +1 -1
  529. package/views/webgl/Texture.js +1 -1
  530. package/views/webgl/UniformBufferLayout.js +5 -0
  531. package/views/webgl/UniformBufferObject.js +5 -0
  532. package/views/webgl/Util.js +1 -1
  533. package/views/webgl/enums.js +1 -1
  534. package/views/webgl/rasterUtils.js +1 -1
  535. package/views/webgl/storageLayouts.js +5 -0
  536. package/views/webgl/testDoublePrecisionArithmetic.js +1 -1
  537. package/views/webgl/testFloatBufferBlend.js +1 -1
  538. package/views/webgl/testSVGPremultipliedAlpha.js +1 -1
  539. package/views/webgl/testSamplerPrecision.js +1 -1
  540. package/views/webgl/tests/SimpleDraw.js +1 -1
  541. package/widgets/BasemapLayerList.js +1 -1
  542. package/widgets/BuildingExplorer/BuildingDisciplinesViewModel.js +1 -1
  543. package/widgets/Editor/BatchCreateWorkflow.js +1 -1
  544. package/widgets/Editor/CreateWorkflow.js +1 -1
  545. package/widgets/Editor/UpdateWorkflow.js +1 -1
  546. package/widgets/Editor/workflowUtils.js +1 -1
  547. package/widgets/ElevationProfile/components/SettingsButton.js +1 -1
  548. package/widgets/ElevationProfile.js +1 -1
  549. package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
  550. package/widgets/Feature/FeatureExpression.js +1 -1
  551. package/widgets/Feature/FeatureMedia/FeatureMediaViewModel.js +1 -1
  552. package/widgets/Feature/FeatureMedia.js +1 -1
  553. package/widgets/Feature/FeatureViewModel.js +1 -1
  554. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  555. package/widgets/FeatureForm/InputField.js +1 -1
  556. package/widgets/FeatureForm/InputFieldGroup.js +1 -1
  557. package/widgets/FeatureForm.js +1 -1
  558. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  559. package/widgets/FeatureTable.js +1 -1
  560. package/widgets/FeatureTemplates.js +1 -1
  561. package/widgets/FloorFilter.js +1 -1
  562. package/widgets/LayerList/LayerListViewModel.js +1 -1
  563. package/widgets/LayerList/ListItemPanel.js +1 -1
  564. package/widgets/LayerList/support/layerListUtils.js +1 -1
  565. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  566. package/widgets/Popup.js +1 -1
  567. package/widgets/Print.js +1 -1
  568. package/widgets/Search.js +1 -1
  569. package/widgets/Sketch/SketchViewModel.js +1 -1
  570. package/widgets/Weather/CoverageSlider.js +5 -0
  571. package/widgets/Weather/WeatherViewModel.js +1 -1
  572. package/widgets/Weather/css.js +1 -1
  573. package/widgets/Weather.js +1 -1
  574. package/widgets/support/geolocationUtils.js +1 -1
  575. package/assets/esri/core/workers/chunks/0881ce46b10362861f87.js +0 -1
  576. package/assets/esri/core/workers/chunks/0c0a02770eeeb3e28ea1.js +0 -1
  577. package/assets/esri/core/workers/chunks/0d2effbd84a9482eb639.js +0 -1
  578. package/assets/esri/core/workers/chunks/0f04246c1b591a3ac74d.js +0 -1
  579. package/assets/esri/core/workers/chunks/1ac6be0dc25e16c75d06.js +0 -1
  580. package/assets/esri/core/workers/chunks/1f8110ea12d65ca94b55.js +0 -1
  581. package/assets/esri/core/workers/chunks/2025d0fd61a64876c81b.js +0 -1
  582. package/assets/esri/core/workers/chunks/241859d74c0daac62e11.js +0 -1
  583. package/assets/esri/core/workers/chunks/2c9af2ebd72d9b55329b.js +0 -1
  584. package/assets/esri/core/workers/chunks/331be347c1b1ca0be2d2.js +0 -1
  585. package/assets/esri/core/workers/chunks/39af317388ecebb4387d.js +0 -1
  586. package/assets/esri/core/workers/chunks/39be2893a7dbdecfd65a.js +0 -1
  587. package/assets/esri/core/workers/chunks/3a20f66b0b7d08064e34.js +0 -1
  588. package/assets/esri/core/workers/chunks/445099d037affd139ed0.js +0 -1
  589. package/assets/esri/core/workers/chunks/45848fecec88ed2da33d.js +0 -1
  590. package/assets/esri/core/workers/chunks/48d3a3abc53abe6a4017.js +0 -1
  591. package/assets/esri/core/workers/chunks/5005b8c1fdd5cb9a4c19.js +0 -1
  592. package/assets/esri/core/workers/chunks/52e4c367c72ea7cc3457.js +0 -1
  593. package/assets/esri/core/workers/chunks/5d8170f6207dbeb4de1b.js +0 -1
  594. package/assets/esri/core/workers/chunks/615aa2d3ecafe30c80c0.js +0 -1
  595. package/assets/esri/core/workers/chunks/642c38ac00a962f35d44.js +0 -1
  596. package/assets/esri/core/workers/chunks/64459604505647e9c714.js +0 -1
  597. package/assets/esri/core/workers/chunks/653d1550dd1a4867a9fc.js +0 -1
  598. package/assets/esri/core/workers/chunks/65f73fbbc3c7c60c6d3d.js +0 -1
  599. package/assets/esri/core/workers/chunks/6db7081d344bea26ef64.js +0 -1
  600. package/assets/esri/core/workers/chunks/6deac533bb455be4004b.js +0 -1
  601. package/assets/esri/core/workers/chunks/6e13dab8ec43f7494297.js +0 -1
  602. package/assets/esri/core/workers/chunks/722a10c65456844d72b9.js +0 -1
  603. package/assets/esri/core/workers/chunks/7bd4c3ee43fb038b88d8.js +0 -1
  604. package/assets/esri/core/workers/chunks/803de5097a8a2c4b58a8.js +0 -1
  605. package/assets/esri/core/workers/chunks/8298231a0fd0129b0d5c.js +0 -1
  606. package/assets/esri/core/workers/chunks/8500c6c011400af1b7bd.js +0 -1
  607. package/assets/esri/core/workers/chunks/8b322a2a47dfdbb59b45.js +0 -1
  608. package/assets/esri/core/workers/chunks/8f83bebef9174c3f15da.js +0 -1
  609. package/assets/esri/core/workers/chunks/904332faa22bc0e876cb.js +0 -1
  610. package/assets/esri/core/workers/chunks/950565d1e682fc4072e1.js +0 -1
  611. package/assets/esri/core/workers/chunks/9846098704ee38bf6350.js +0 -1
  612. package/assets/esri/core/workers/chunks/a247ddd84245c81112c8.js +0 -1
  613. package/assets/esri/core/workers/chunks/a721342a32541717324d.js +0 -1
  614. package/assets/esri/core/workers/chunks/a9ffa806df20130ecfb6.js +0 -1
  615. package/assets/esri/core/workers/chunks/af13e534e4160636bd3d.js +0 -1
  616. package/assets/esri/core/workers/chunks/b2f62234ebb8b6158baa.js +0 -1
  617. package/assets/esri/core/workers/chunks/b51261a9a9ab62388839.js +0 -971
  618. package/assets/esri/core/workers/chunks/b58eba403bd517a7bb15.js +0 -1
  619. package/assets/esri/core/workers/chunks/b5bb7cfa26b1f0cec67a.js +0 -1
  620. package/assets/esri/core/workers/chunks/b8666d1a4e4fff7a4703.js +0 -1
  621. package/assets/esri/core/workers/chunks/bea1da9e3f878e0e2c83.js +0 -1
  622. package/assets/esri/core/workers/chunks/c1b6c31fa3ec1542f996.js +0 -1
  623. package/assets/esri/core/workers/chunks/c32a4fbdc87225f84019.js +0 -1
  624. package/assets/esri/core/workers/chunks/c67fea81f69a60c0eaef.js +0 -1
  625. package/assets/esri/core/workers/chunks/cb68db7169b9dfd1c3ff.js +0 -1
  626. package/assets/esri/core/workers/chunks/cc96608b2802fbfe7a08.js +0 -1
  627. package/assets/esri/core/workers/chunks/cd02fe27eb07681cb366.js +0 -1
  628. package/assets/esri/core/workers/chunks/d336afd5890dcdbf5341.js +0 -1
  629. package/assets/esri/core/workers/chunks/da69e3e5949fe1716e34.js +0 -1
  630. package/assets/esri/core/workers/chunks/daa9c450b2e2a5371249.js +0 -1
  631. package/assets/esri/core/workers/chunks/dd63ba77b7e4c3c9c594.js +0 -1
  632. package/assets/esri/core/workers/chunks/dfa57982d28c9aeb97b9.js +0 -1
  633. package/assets/esri/core/workers/chunks/e01812116b27874948f0.js +0 -1
  634. package/assets/esri/core/workers/chunks/e5c9d8482b913cf3580a.js +0 -1
  635. package/assets/esri/core/workers/chunks/eeadd92f0bede9fc8745.js +0 -1
  636. package/assets/esri/core/workers/chunks/fbb67cb6224aed2cce16.js +0 -1
  637. package/assets/esri/core/workers/chunks/feeaf61424336e9eac88.js +0 -1
  638. package/assets/esri/core/workers/chunks/ff02295329a8986d0568.js +0 -1
  639. package/tasks/operations/identify.js +0 -5
  640. package/views/2d/engine/webgl/mesh/templates/meshUtils.js +0 -5
  641. package/views/3d/layers/graphics/Graphics3DFeatureLikeLayerView.js +0 -5
  642. package/views/3d/layers/graphics/Graphics3DGraphicLikeLayerView.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{forEach as s,result as l}from"../../../../core/asyncUtils.js";import a from"../../../../core/Handles.js";import i from"../../../../core/Logger.js";import{someMap as r}from"../../../../core/MapUtils.js";import{destroyMaybe as o,disposeMaybe as n,isNone as c,unwrap as h}from"../../../../core/maybe.js";import{throwIfAborted as b,isAbortError as d}from"../../../../core/promiseUtils.js";import{property as p}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as u}from"../../../../core/accessorSupport/decorators/subclass.js";import{hydrateGraphic as g}from"../../../../layers/graphics/hydratedFeatures.js";import{createLabelFunction as y}from"../../../../layers/support/labelFormatUtils.js";import{areLabelsVisible as f}from"../../../../layers/support/layerUtils.js";import{isCalloutSupport as _}from"../../../../symbols/callouts/calloutUtils.js";import{VisibilityFlag as m,VisibilityGroup as C}from"./enums.js";import{make as x}from"./Graphics3DCalloutSymbolLayerFactory.js";import v from"./Graphics3DGraphicCreationContext.js";import{getGraphics3DSymbol as T}from"./graphicSymbolUtils.js";import{get as L}from"./labelPlacement.js";import G from"../../support/debugFlags.js";import{MaterialCollection as D}from"../../webgl-engine/lib/MaterialCollection.js";import{TextRenderer as R}from"../../webgl-engine/lib/TextRenderer.js";import{TextRenderParameters as A}from"../../webgl-engine/lib/TextRenderParameters.js";import w from"../../webgl-engine/lib/TextTextureAtlas.js";import{WebGLLayer as S}from"../../webgl-engine/lib/WebGLLayer.js";import{TaskPriority as I}from"../../../support/Scheduler.js";const O=i.getLogger("esri.views.3d.layers.graphics.Labeler");let j=class extends t{constructor(){super(...arguments),this._dirty=!1,this._labels=new Map,this._labelsToAdd=new Map,this._labelsToRemove=new Map,this._labelingContexts=new Array}setup(){this.dispose(),this._handles=new a,this._handles.add([this.view.watch("state.camera",(()=>this.setDirty())),this.view.watch("pixelRatio",(()=>this._resetAllLabels())),this.view.resourceController.scheduler.registerTask(I.LABELER,this)]),this._textTextureAtlas=new w({view:this.view}),this._hudMaterialCollection=new D(this.view._stage),this._calloutMaterialCollection=new D(this.view._stage)}dispose(){this._handles=o(this._handles),this._textTextureAtlas=n(this._textTextureAtlas),this._hudMaterialCollection=n(this._hudMaterialCollection),this._calloutMaterialCollection=n(this._calloutMaterialCollection),this._labelingContexts.length=0,this._labels.clear(),this._labelsToAdd.clear(),this._labelsToRemove.clear()}_activateLabelingContext(e){e.labels.forEach(((e,t)=>{this._labels.set(t,e),e.graphics3DGraphic.setVisibilityFlag(m.USER_SETTING,!0,C.LABEL)})),e.active=!0}_deactivateLabelingContext(e){e.labels.forEach(((e,t)=>{e.graphics3DGraphic.setVisibilityFlag(m.USER_SETTING,!1,C.LABEL),this.setLabelGraphicVisibility(e.graphics3DGraphic,!1),this._labels.delete(t)})),e.active=!1}_addLabelTextureToAtlas(e){for(const t of e.graphics3DGraphic.labelGraphics){if(!t._labelClass)continue;const s=e.textRenderers[t._labelIndex];s&&this._textTextureAtlas.addTextTexture(s,t.stageObject)}e.rendered=!0}_removeLabelTextureFromAtlas(e){for(const t of e.graphics3DGraphic.labelGraphics){if(!t._labelClass)continue;const s=e.textRenderers[t._labelIndex];s&&this._textTextureAtlas.removeTextTexture(s,t.stageObject)}e.rendered=!1}get running(){var e;return this.view.ready&&(this._dirty||(null==(e=this._textTextureAtlas)?void 0:e.updating)||this.deconflictor.running)}runTask(e){this._updateLabels(e),!this._dirty&&this.deconflictor.running&&this.deconflictor.runTask(e)}_updateLabels(e){if(this._dirty){this._dirty=!1;for(const t of this._labelingContexts)if(E(t)){if(!V(t)){if(F(t)){this._deactivateLabelingContext(t);continue}if(this._createLabelClassContext(t),P(t)){this._dirty=!0;continue}if(!V(t))continue}r(t.labelsToInitialize,((s,l)=>(this._ensureGraphics3DResources(s)&&(this._labels.set(l,s),this.deconflictor.setDirty(),e.madeProgress()),(s.visible&&s.hasTextTextureResources||!s.visible&&s.hasGraphics3DResources)&&(t.labelsToInitialize.delete(l),e.madeProgress()),e.done)))&&(this._dirty=!0)}this._labelsToRemove.forEach((e=>this._removeLabelTextureFromAtlas(e))),this._labelsToAdd.forEach((e=>this._addLabelTextureToAtlas(e))),this._labelsToRemove.clear(),this._labelsToAdd.clear(),this._dirty||this.notifyChange("updating")}}async _createLabelClassContextAsync(e){const t=e.labelClassAbortController.signal;await e.layer.when(),b(t),e.scaleVisibility&&e.scaleVisibility.updateScaleRangeActive();const a=e.graphics3DCore,i=a.layer,r=i.labelingInfo&&i.labelingInfo.filter((e=>!!e.symbol));if(!r||0===r.length)return;const o=new Array(r.length);let n=!1;await s(r,(async(s,i)=>{const r=s.symbol,h=T(a.getOrCreateGraphics3DSymbol(r));if(c(h))return void O.error("Failed to create Graphics3DSymbol for label");await h.load(),b(t);let d=null;_(r)&&r.hasVisibleCallout()&&(d=x(r,a.symbolCreationContext),await d.load(),b(t));const p=await l(y(s,e.layer.fieldsIndex,this.view.spatialReference));b(t),!0===p.ok?o[i]={labelClass:s,labelFunction:p.value,graphics3DSymbol:h,graphics3DCalloutSymbolLayer:d,calloutSymbolLayerIndex:0,textRenderParameters:this._createTextRenderParameters(h.symbol)}:(O.error(`Label expression failed to evaluate: ${p.error}`),n=!0)})),b(t),n||(e.labelClassContexts=o)}async _createLabelClassContext(e){return e.labelClassPromise||(e.labelClassPromise=this._createLabelClassContextAsync(e).catch((t=>{if(d(t))throw t;e.labelClassContexts=null})).then((()=>{e.labelClassAbortController=null,this.notifyChange("updating")})).catch((()=>{})),this.notifyChange("updating")),e.labelClassPromise}_createTextRenderParameters(e){const t=e.symbolLayers.getItemAt(0);return t&&"text"===t.type?A.fromSymbol(t,this.view.pixelRatio):null}_destroyLabelClassContext(e){for(const s of e.labelClassContexts)--s.graphics3DSymbol.referenced,s.graphics3DSymbol=null;const t=e.labelClassAbortController;e.labelClassAbortController=new AbortController,t&&t.abort(),e.labelClassContexts=[],e.labelClassPromise=null,this.notifyChange("updating")}_createTextSymbolGraphic(e,t,s,l,a){const i={text:e.text,centerOffset:s.centerOffset,translation:s.translation,elevationOffset:s.elevationOffset,screenOffset:s.screenOffset,anchor:s.anchor,centerOffsetUnits:s.centerOffsetUnits,verticalOffset:s.verticalOffset,debugDrawBorder:G.LABELS_SHOW_BORDER,displayWidth:e.displayWidth,displayHeight:e.displayHeight};return M.graphic=t,M.renderingInfo=null,M.layer=l,a.createLabel(M,i,this._hudMaterialCollection,this._textTextureAtlas)}_createLineCalloutGraphic(e,t,s,l,a){const i={symbol:t,translation:l.translation,elevationOffset:l.elevationOffset,screenOffset:l.screenOffset,centerOffset:l.centerOffset,centerOffsetUnits:l.centerOffsetUnits,materialCollection:this._calloutMaterialCollection};return M.graphic=e,M.renderingInfo=i,M.layer=a,s.createGraphics3DGraphic(M)}_ensureGraphics3DResources(e){if(e.hasGraphics3DResources)return!1;const t=e.graphics3DGraphic;if(t.destroyed)return!1;this._ensureTextTextureResources(e);const s=e.labelingContext,l=s.labelClassContexts;if(!l||0===l.length||!s.emptySymbolLabelSupported&&0===t.graphics.length)return!1;let a=!1;const i=t.graphic,r=s.layer,o=f(s.layer),n=this.view._stage;for(let h=0;h<l.length;h++){const b=e.textRenderers[h];if(!b)continue;const d=l[h],p=d.graphics3DSymbol;let u=null;p.symbol&&"label-3d"===p.symbol.type&&(u=p.symbol);const g=p.symbolLayers[0];if(!g)continue;const y=d.labelClass,f=s.disablePlacement,_=L({graphics3DGraphic:t,labelSymbol:u,labelClass:y,disablePlacement:f});if(c(_))continue;g.setElevationInfoOverride(s.elevationInfoOverride);const x=this._createTextSymbolGraphic(b,i,_,r,g);if(!x)return!1;x._labelClass=y,x._labelIndex=h,t.addLabelGraphic(x,n,s.stageLayer),t.setVisibilityFlag(m.USER_SETTING,o,C.LABEL),t.clearVisibilityFlag(m.SCALE_RANGE,C.LABEL),t.setVisibilityFlag(m.DECONFLICTION,!1,C.LABEL),a=!0;const v=d.graphics3DCalloutSymbolLayer;if(v&&_.hasLabelVerticalOffset){v.setElevationInfoOverride(s.elevationInfoOverride);const e=this._createLineCalloutGraphic(i,u,v,_,r);e&&(d.calloutSymbolLayerIndex=t.labelGraphics.length,t.addLabelGraphic(e,n,s.stageLayer))}break}return s.scaleVisibility&&a&&s.scaleVisibility.updateGraphicLabelScaleVisibility(t),e.hasGraphics3DResources=!0,!0}_destroyGraphics3DResources(e){const t=e.labelingContext.labelClassContexts;for(const s of e.graphics3DGraphic.labelGraphics){if(null==s._labelClass)continue;const e=t[s._labelIndex].graphics3DSymbol.symbolLayers[0];null!=e&&e.onRemoveGraphic(s)}e.graphics3DGraphic.clearLabelGraphics(),e.hasGraphics3DResources=!1}_ensureTextTextureResources(e){if(e.hasTextTextureResources)return;const t=e.labelingContext,s=t.labelClassContexts;if(!s||0===s.length)return;const l=e.graphics3DGraphic.graphic;for(let i=0;i<s.length;i++){const r=s[i];if(e.textRenderers[i]=null,!r.textRenderParameters)continue;const o=r.labelFunction;let n;if("arcade"===o.type)try{const e=o.needsHydrationToEvaluate()?g(l,t.layer):l;n=o.evaluate(e)}catch(a){n=null}else n=o.evaluate(l);c(n)||""===n||/^\s+$/.test(n)||(e.textRenderers[i]=new R(n,r.textRenderParameters))}e.hasTextTextureResources=!0}_destroyTextTextureResources(e){e.textRenderers=[],e.hasTextTextureResources=!1}_addGraphic(e,t){const s={hasGraphics3DResources:!1,hasTextTextureResources:!1,visible:!1,rendered:!1,labelingContext:e,graphics3DGraphic:t,textRenderers:[]},l=t.graphic.uid;e.labels.set(l,s),e.labelsToInitialize.set(l,s),this.setDirty(),this.deconflictor.setDirty()}_removeGraphic(e,t){const s=t.graphic.uid,l=e.labels.get(s);l&&(this._destroyGraphic(l,s),e.labels.delete(s),e.labelsToInitialize.delete(s),this.setDirty(),this.deconflictor.setDirty())}_destroyGraphic(e,t){this._labels.has(t)&&(this._labels.delete(t),this._labelsToAdd.delete(t),this._labelsToRemove.delete(t)),e.hasTextTextureResources&&(this._removeLabelTextureFromAtlas(e),this._destroyTextTextureResources(e)),e.hasGraphics3DResources&&this._destroyGraphics3DResources(e)}async _labelingInfoChange(e,t){if(!t)return this._visibilityInfoChange(e),this._resetLabels(e),this._createLabelClassContext(e);for(const s of t){const t=e.labels.get(s);t&&(this._removeGraphic(e,t.graphics3DGraphic),this._addGraphic(e,t.graphics3DGraphic))}}_globalPropertyChanged(e,t){for(const s of t.labelClassContexts){const l=new Map;t.labels.forEach((e=>{const t=e.graphics3DGraphic;l.set(t.graphic.uid,t)}));const a=e=>e.labelGraphics[0];if(h(s.graphics3DSymbol.symbolLayers[0]).globalPropertyChanged(e,l,a),s.graphics3DCalloutSymbolLayer){const t=e=>e.labelGraphics[s.calloutSymbolLayerIndex];s.graphics3DCalloutSymbolLayer.globalPropertyChanged(e,l,t)}}}_visibilityInfoChange(e){const t=e.layer.labelsVisible;t&&!e.active&&this._activateLabelingContext(e),!t&&e.active&&this._deactivateLabelingContext(e),this.setDirty()}_resetAllLabels(){for(const e of this._labelingContexts)this._resetLabels(e)}_resetLabels(e){e.labels.forEach(((t,s)=>{this._destroyGraphic(t,s),t.visible=!1,t.rendered=!1,e.labelsToInitialize.set(s,t)})),this._destroyLabelClassContext(e),this.setDirty(),this.deconflictor.setDirty()}_findLabelingContext(e){for(const t of this._labelingContexts)if(t.graphics3DCore===e)return t;return null}addGraphicsOwner(e,t,s){const l=s&&s.emptySymbolLabelSupported||!1,a=s&&s.elevationInfoOverride||null,i=s&&s.disablePlacement||null;if(this._findLabelingContext(e))return;const r=e.layer,o={graphics3DCore:e,layer:r,scaleVisibility:t,emptySymbolLabelSupported:l,elevationInfoOverride:a,disablePlacement:i,active:r.labelsVisible,labelClassPromise:null,labelClassAbortController:new AbortController,labelClassContexts:[],labels:new Map,labelsToInitialize:new Map,stageLayer:new S({isPickable:!0},r.uid)};return this.view._stage.add(o.stageLayer),this._labelingContexts.push(o),this.setDirty(),{addGraphic:e=>this._addGraphic(o,e),removeGraphic:e=>this._removeGraphic(o,e),featureReductionChange:()=>{},layerLabelsEnabled:()=>f(o.layer),labelingInfoChange:e=>this._labelingInfoChange(o,e),elevationInfoChange:()=>this._globalPropertyChanged("elevationInfo",o),slicePlaneEnabledChange:()=>this._globalPropertyChanged("slicePlaneEnabled",o),visibilityInfoChange:()=>this._visibilityInfoChange(o),reset:()=>this._resetLabels(o),clear:()=>{}}}removeGraphicsOwner(e){const t=this._findLabelingContext(e);if(!t)return;const s=this._labelingContexts.indexOf(t);this._labelingContexts.splice(s,1),t.labels.forEach((e=>this._removeGraphic(t,e.graphics3DGraphic))),this.view._stage.remove(t.stageLayer),t.stageLayer=null,this.setDirty()}setLabelGraphicVisibility(e,t){const s=e.graphic.uid,l=this._labels.get(s);l&&l.visible!==t&&(t&&!l.rendered?(this._labelsToAdd.set(s,l),this._labelsToRemove.delete(s),l.hasTextTextureResources||l.labelingContext.labelsToInitialize.set(s,l)):!t&&l.rendered&&(this._labelsToRemove.set(s,l),this._labelsToAdd.delete(s)),l.visible=t,this.setDirty())}setDirty(){!this._dirty&&this._labelingContexts.length>0&&(this._dirty=!0,this.notifyChange("updating"))}get updating(){var e;return this._dirty||(null==(e=this._textTextureAtlas)?void 0:e.updating)||this.deconflictor.updating||this._labelingContexts.some((e=>P(e)))}get updatingProgress(){if(!this.updating||!this._textTextureAtlas)return 1;const e=this._labelingContexts.length>0?this._labelingContexts.reduce(((e,t)=>e+(P(t)?0:1)),0)/this._labelingContexts.length:1;return(this._dirty?0:.3)+(this._textTextureAtlas.updating?0:.1)+.1*e+.5*this.deconflictor.updatingProgress}get test(){return{textTextureAtlas:this._textTextureAtlas,resetAllLabels:()=>this._resetAllLabels()}}};function E(e){return e.active&&f(e.layer)}function P(e){return e.labelClassPromise&&!!e.labelClassAbortController}function V(e){return e.labelClassContexts&&e.labelClassContexts.length}function F(e){return null===e.labelClassContexts}e([p({constructOnly:!0})],j.prototype,"view",void 0),e([p({constructOnly:!0})],j.prototype,"deconflictor",void 0),e([p()],j.prototype,"_textTextureAtlas",void 0),e([p({type:Boolean,readOnly:!0})],j.prototype,"updating",null),j=e([u("esri.views.3d.layers.graphics.Labeler")],j);const M=new v(null,null,null);export{j as Labeler};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{forEach as s,result as l}from"../../../../core/asyncUtils.js";import a from"../../../../core/Handles.js";import i from"../../../../core/Logger.js";import{someMap as r}from"../../../../core/MapUtils.js";import{destroyMaybe as o,disposeMaybe as n,isNone as c,isSome as h,unwrap as b}from"../../../../core/maybe.js";import{throwIfAborted as d,isAbortError as p}from"../../../../core/promiseUtils.js";import{property as u}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as g}from"../../../../core/accessorSupport/decorators/subclass.js";import{hydrateGraphic as y}from"../../../../layers/graphics/hydratedFeatures.js";import{createLabelFunction as f}from"../../../../layers/support/labelFormatUtils.js";import{areLabelsVisible as _}from"../../../../layers/support/layerUtils.js";import{isCalloutSupport as m}from"../../../../symbols/callouts/calloutUtils.js";import{VisibilityFlag as C,VisibilityGroup as x}from"./enums.js";import{make as v}from"./Graphics3DCalloutSymbolLayerFactory.js";import T from"./Graphics3DGraphicCreationContext.js";import{getGraphics3DSymbol as L}from"./graphicSymbolUtils.js";import{get as G}from"./labelPlacement.js";import D from"../../support/debugFlags.js";import{MaterialCollection as R}from"../../webgl-engine/lib/MaterialCollection.js";import{TextRenderer as A}from"../../webgl-engine/lib/TextRenderer.js";import{TextRenderParameters as w}from"../../webgl-engine/lib/TextRenderParameters.js";import S from"../../webgl-engine/lib/TextTextureAtlas.js";import{WebGLLayer as I}from"../../webgl-engine/lib/WebGLLayer.js";import{TaskPriority as O}from"../../../support/Scheduler.js";const j=i.getLogger("esri.views.3d.layers.graphics.Labeler");let E=class extends t{constructor(){super(...arguments),this._dirty=!1,this._labels=new Map,this._labelsToAdd=new Map,this._labelsToRemove=new Map,this._labelingContexts=new Array}setup(){this.dispose(),this._handles=new a,this._handles.add([this.view.watch("state.camera",(()=>this.setDirty())),this.view.watch("pixelRatio",(()=>this._resetAllLabels())),this.view.resourceController.scheduler.registerTask(O.LABELER,this)]),this._textTextureAtlas=new S({view:this.view}),this._hudMaterialCollection=new R(this.view._stage),this._calloutMaterialCollection=new R(this.view._stage)}dispose(){this._handles=o(this._handles),this._textTextureAtlas=n(this._textTextureAtlas),this._hudMaterialCollection=n(this._hudMaterialCollection),this._calloutMaterialCollection=n(this._calloutMaterialCollection),this._labelingContexts.length=0,this._labels.clear(),this._labelsToAdd.clear(),this._labelsToRemove.clear()}_activateLabelingContext(e){e.labels.forEach(((e,t)=>{this._labels.set(t,e),e.graphics3DGraphic.setVisibilityFlag(C.USER_SETTING,!0,x.LABEL)})),e.active=!0}_deactivateLabelingContext(e){e.labels.forEach(((e,t)=>{e.graphics3DGraphic.setVisibilityFlag(C.USER_SETTING,!1,x.LABEL),this.setLabelGraphicVisibility(e.graphics3DGraphic,!1),this._labels.delete(t)})),e.active=!1}_addLabelTextureToAtlas(e){for(const t of e.graphics3DGraphic.labelGraphics){if(!t._labelClass)continue;const s=e.textRenderers[t._labelIndex];s&&this._textTextureAtlas.addTextTexture(s,t.stageObject)}e.rendered=!0}_removeLabelTextureFromAtlas(e){for(const t of e.graphics3DGraphic.labelGraphics){if(!t._labelClass)continue;const s=e.textRenderers[t._labelIndex];s&&this._textTextureAtlas.removeTextTexture(s,t.stageObject)}e.rendered=!1}get running(){var e;return this.view.ready&&(this._dirty||(null==(e=this._textTextureAtlas)?void 0:e.updating)||this.deconflictor.running)}runTask(e){this._updateLabels(e),!this._dirty&&this.deconflictor.running&&this.deconflictor.runTask(e)}_updateLabels(e){if(this._dirty){this._dirty=!1;for(const t of this._labelingContexts)if(P(t)){if(!F(t)){if(M(t)){this._deactivateLabelingContext(t);continue}if(this._createLabelClassContext(t),V(t)){this._dirty=!0;continue}if(!F(t))continue}r(t.labelsToInitialize,((s,l)=>(this._ensureGraphics3DResources(s)&&(this._labels.set(l,s),this.deconflictor.setDirty(),e.madeProgress()),(s.visible&&s.hasTextTextureResources||!s.visible&&s.hasGraphics3DResources)&&(t.labelsToInitialize.delete(l),e.madeProgress()),e.done)))&&(this._dirty=!0)}this._labelsToRemove.forEach((e=>this._removeLabelTextureFromAtlas(e))),this._labelsToAdd.forEach((e=>this._addLabelTextureToAtlas(e))),this._labelsToRemove.clear(),this._labelsToAdd.clear(),this._dirty||this.notifyChange("updating")}}async _createLabelClassContextAsync(e){const t=e.labelClassAbortController.signal;await e.layer.when(),d(t),e.scaleVisibility&&e.scaleVisibility.updateScaleRangeActive();const a=e.graphics3DCore,i=a.layer,r=i.labelingInfo&&i.labelingInfo.filter((e=>!!e.symbol));if(!r||0===r.length)return;const o=new Array(r.length);let n=!1;await s(r,(async(s,i)=>{const r=s.symbol,h=L(a.getOrCreateGraphics3DSymbol(r));if(c(h))return void j.error("Failed to create Graphics3DSymbol for label");await h.load(),d(t);let b=null;m(r)&&r.hasVisibleCallout()&&(b=v(r,a.symbolCreationContext),await b.load(),d(t));const p=await l(f(s,e.layer.fieldsIndex,this.view.spatialReference));if(d(t),!0===p.ok){const e=await this._createTextRenderParameters(h.symbol);d(t),o[i]={labelClass:s,labelFunction:p.value,graphics3DSymbol:h,graphics3DCalloutSymbolLayer:b,calloutSymbolLayerIndex:0,textRenderParameters:e}}else j.error(`Label expression failed to evaluate: ${p.error}`),n=!0})),d(t),n||(e.labelClassContexts=o)}async _createLabelClassContext(e){return e.labelClassPromise||(e.labelClassPromise=this._createLabelClassContextAsync(e).catch((t=>{if(p(t))throw t;e.labelClassContexts=null})).then((()=>{e.labelClassAbortController=null,this.notifyChange("updating")})).catch((()=>{})),this.notifyChange("updating")),e.labelClassPromise}async _createTextRenderParameters(e){const t=e.symbolLayers.getItemAt(0);return t&&"text"===t.type?w.fromSymbol(t,this.view.pixelRatio):null}_destroyLabelClassContext(e){for(const s of e.labelClassContexts)--s.graphics3DSymbol.referenced,s.graphics3DSymbol=null;const t=e.labelClassAbortController;e.labelClassAbortController=new AbortController,t&&t.abort(),e.labelClassContexts=[],e.labelClassPromise=null,this.notifyChange("updating")}_createTextSymbolGraphic(e,t,s,l,a){const i={text:e.text,centerOffset:s.centerOffset,translation:s.translation,elevationOffset:s.elevationOffset,screenOffset:s.screenOffset,anchor:s.anchor,centerOffsetUnits:s.centerOffsetUnits,verticalOffset:s.verticalOffset,debugDrawLabelBorder:D.LABELS_SHOW_BORDER,displayWidth:e.displayWidth,displayHeight:e.displayHeight};return U.graphic=t,U.renderingInfo=null,U.layer=l,a.createLabel(U,i,this._hudMaterialCollection,this._textTextureAtlas)}_createLineCalloutGraphic(e,t,s,l,a){const i={symbol:t,translation:l.translation,elevationOffset:l.elevationOffset,screenOffset:l.screenOffset,centerOffset:l.centerOffset,centerOffsetUnits:l.centerOffsetUnits,materialCollection:this._calloutMaterialCollection};return U.graphic=e,U.renderingInfo=i,U.layer=a,s.createGraphics3DGraphic(U)}_ensureGraphics3DResources(e){if(e.hasGraphics3DResources)return!1;const t=e.graphics3DGraphic;if(t.destroyed)return!1;this._ensureTextTextureResources(e);const s=e.labelingContext,l=s.labelClassContexts;if(!l||0===l.length||!s.emptySymbolLabelSupported&&0===t.graphics.length)return!1;let a=!1;const i=t.graphic,r=s.layer,o=_(s.layer),n=this.view._stage;for(let b=0;b<l.length;b++){const d=e.textRenderers[b];if(!d)continue;const p=l[b],u=p.graphics3DSymbol;let g=null;u.symbol&&"label-3d"===u.symbol.type&&(g=u.symbol);const y=u.symbolLayers[0];if(!y)continue;const f=p.labelClass,_=s.disablePlacement,m=G({graphics3DGraphic:t,labelSymbol:g,labelClass:f,disablePlacement:_});if(c(m))continue;y.setElevationInfoOverride(s.elevationInfoOverride);const v=this._createTextSymbolGraphic(d,i,m,r,y);if(!v)return!1;v._labelClass=f,v._labelIndex=b,t.addLabelGraphic(v,n,s.stageLayer),t.setVisibilityFlag(C.USER_SETTING,o,x.LABEL),t.clearVisibilityFlag(C.SCALE_RANGE,x.LABEL),t.setVisibilityFlag(C.DECONFLICTION,!1,x.LABEL),a=!0;const T=p.graphics3DCalloutSymbolLayer;if(T&&m.hasLabelVerticalOffset){T.setElevationInfoOverride(s.elevationInfoOverride);const e=this._createLineCalloutGraphic(i,g,T,m,r);h(e)&&(p.calloutSymbolLayerIndex=t.labelGraphics.length,t.addLabelGraphic(e,n,s.stageLayer))}break}return s.scaleVisibility&&a&&s.scaleVisibility.updateGraphicLabelScaleVisibility(t),e.hasGraphics3DResources=!0,!0}_destroyGraphics3DResources(e){const t=e.labelingContext.labelClassContexts;for(const s of e.graphics3DGraphic.labelGraphics){if(null==s._labelClass)continue;const e=t[s._labelIndex].graphics3DSymbol.symbolLayers[0];null!=e&&e.onRemoveGraphic(s)}e.graphics3DGraphic.clearLabelGraphics(),e.hasGraphics3DResources=!1}_ensureTextTextureResources(e){if(e.hasTextTextureResources)return;const t=e.labelingContext,s=t.labelClassContexts;if(!s||0===s.length)return;const l=e.graphics3DGraphic.graphic;for(let i=0;i<s.length;i++){const r=s[i];if(e.textRenderers[i]=null,!r.textRenderParameters)continue;const o=r.labelFunction;let n;if("arcade"===o.type)try{const e=o.needsHydrationToEvaluate()?y(l,t.layer):l;n=o.evaluate(e)}catch(a){n=null}else n=o.evaluate(l);c(n)||""===n||/^\s+$/.test(n)||(e.textRenderers[i]=new A(n,r.textRenderParameters))}e.hasTextTextureResources=!0}_destroyTextTextureResources(e){e.textRenderers=[],e.hasTextTextureResources=!1}_addGraphic(e,t){const s={hasGraphics3DResources:!1,hasTextTextureResources:!1,visible:!1,rendered:!1,labelingContext:e,graphics3DGraphic:t,textRenderers:[]},l=t.graphic.uid;e.labels.set(l,s),e.labelsToInitialize.set(l,s),this.setDirty(),this.deconflictor.setDirty()}_removeGraphic(e,t){const s=t.graphic.uid,l=e.labels.get(s);l&&(this._destroyGraphic(l,s),e.labels.delete(s),e.labelsToInitialize.delete(s),this.setDirty(),this.deconflictor.setDirty())}_destroyGraphic(e,t){this._labels.has(t)&&(this._labels.delete(t),this._labelsToAdd.delete(t),this._labelsToRemove.delete(t)),e.hasTextTextureResources&&(this._removeLabelTextureFromAtlas(e),this._destroyTextTextureResources(e)),e.hasGraphics3DResources&&this._destroyGraphics3DResources(e)}async _labelingInfoChange(e,t){if(!t)return this._visibilityInfoChange(e),this._resetLabels(e),this._createLabelClassContext(e);for(const s of t){const t=e.labels.get(s);t&&(this._removeGraphic(e,t.graphics3DGraphic),this._addGraphic(e,t.graphics3DGraphic))}}_globalPropertyChanged(e,t){for(const s of t.labelClassContexts){const l=new Map;t.labels.forEach((e=>{const t=e.graphics3DGraphic;l.set(t.graphic.uid,t)}));const a=e=>e.labelGraphics[0];if(b(s.graphics3DSymbol.symbolLayers[0]).globalPropertyChanged(e,l,a),s.graphics3DCalloutSymbolLayer){const t=e=>e.labelGraphics[s.calloutSymbolLayerIndex];s.graphics3DCalloutSymbolLayer.globalPropertyChanged(e,l,t)}}}_visibilityInfoChange(e){const t=e.layer.labelsVisible;t&&!e.active&&this._activateLabelingContext(e),!t&&e.active&&this._deactivateLabelingContext(e),this.setDirty()}_resetAllLabels(){for(const e of this._labelingContexts)this._resetLabels(e)}_resetLabels(e){e.labels.forEach(((t,s)=>{this._destroyGraphic(t,s),t.visible=!1,t.rendered=!1,e.labelsToInitialize.set(s,t)})),this._destroyLabelClassContext(e),this.setDirty(),this.deconflictor.setDirty()}_findLabelingContext(e){for(const t of this._labelingContexts)if(t.graphics3DCore===e)return t;return null}addGraphicsOwner(e,t,s){const l=s&&s.emptySymbolLabelSupported||!1,a=s&&s.elevationInfoOverride||null,i=s&&s.disablePlacement||null;if(this._findLabelingContext(e))return;const r=e.layer,o={graphics3DCore:e,layer:r,scaleVisibility:t,emptySymbolLabelSupported:l,elevationInfoOverride:a,disablePlacement:i,active:r.labelsVisible,labelClassPromise:null,labelClassAbortController:new AbortController,labelClassContexts:[],labels:new Map,labelsToInitialize:new Map,stageLayer:new I({isPickable:!0},r.uid)};return this.view._stage.add(o.stageLayer),this._labelingContexts.push(o),this.setDirty(),{addGraphic:e=>this._addGraphic(o,e),removeGraphic:e=>this._removeGraphic(o,e),featureReductionChange:()=>{},layerLabelsEnabled:()=>_(o.layer),labelingInfoChange:e=>this._labelingInfoChange(o,e),elevationInfoChange:()=>this._globalPropertyChanged("elevationInfo",o),slicePlaneEnabledChange:()=>this._globalPropertyChanged("slicePlaneEnabled",o),visibilityInfoChange:()=>this._visibilityInfoChange(o),reset:()=>this._resetLabels(o),clear:()=>{}}}removeGraphicsOwner(e){const t=this._findLabelingContext(e);if(!t)return;const s=this._labelingContexts.indexOf(t);this._labelingContexts.splice(s,1),t.labels.forEach((e=>this._removeGraphic(t,e.graphics3DGraphic))),this.view._stage.remove(t.stageLayer),t.stageLayer=null,this.setDirty()}setLabelGraphicVisibility(e,t){const s=e.graphic.uid,l=this._labels.get(s);l&&l.visible!==t&&(t&&!l.rendered?(this._labelsToAdd.set(s,l),this._labelsToRemove.delete(s),l.hasTextTextureResources||l.labelingContext.labelsToInitialize.set(s,l)):!t&&l.rendered&&(this._labelsToRemove.set(s,l),this._labelsToAdd.delete(s)),l.visible=t,this.setDirty())}setDirty(){!this._dirty&&this._labelingContexts.length>0&&(this._dirty=!0,this.notifyChange("updating"))}get updating(){var e;return this._dirty||(null==(e=this._textTextureAtlas)?void 0:e.updating)||this.deconflictor.updating||this._labelingContexts.some((e=>V(e)))}get updatingProgress(){if(!this.updating||!this._textTextureAtlas)return 1;const e=this._labelingContexts.length>0?this._labelingContexts.reduce(((e,t)=>e+(V(t)?0:1)),0)/this._labelingContexts.length:1;return(this._dirty?0:.3)+(this._textTextureAtlas.updating?0:.1)+.1*e+.5*this.deconflictor.updatingProgress}get test(){return{textTextureAtlas:this._textTextureAtlas,resetAllLabels:()=>this._resetAllLabels()}}};function P(e){return e.active&&_(e.layer)}function V(e){return e.labelClassPromise&&!!e.labelClassAbortController}function F(e){return e.labelClassContexts&&e.labelClassContexts.length}function M(e){return null===e.labelClassContexts}e([u({constructOnly:!0})],E.prototype,"view",void 0),e([u({constructOnly:!0})],E.prototype,"deconflictor",void 0),e([u()],E.prototype,"_textTextureAtlas",void 0),e([u({type:Boolean,readOnly:!0})],E.prototype,"updating",null),E=e([g("esri.views.3d.layers.graphics.Labeler")],E);const U=new T(null,null,null);export{E as Labeler};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import"../../../../geometry.js";import r from"../../../../core/Accessor.js";import{isNone as t}from"../../../../core/maybe.js";import{property as s}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as a}from"../../../../core/accessorSupport/decorators/subclass.js";import n from"../../../../geometry/Extent.js";import o from"../../../../layers/graphics/data/QueryEngine.js";import i from"../../../../rest/support/FeatureSet.js";import u from"../../../../rest/support/Query.js";import{featureGeometryTypeKebabDictionary as y}from"../../../../geometry/support/typeUtils.js";const c=o;let l=class extends r{constructor(e){super(e),this._dataQueryEngineInstance=null}get queryGeometryType(){switch(this.layer.geometryType){case"multipoint":case"point":case"polygon":case"polyline":return this.layer.geometryType;case"mesh":return"polygon";default:return}}get defaultQueryJSON(){return new u({outSpatialReference:this.spatialReference}).toJSON()}get dataQueryEngine(){return this._ensureDataQueryEngine()}destroy(){this.clear()}clear(){return!!this._dataQueryEngineInstance&&(this._dataQueryEngineInstance.destroy(),this._dataQueryEngineInstance=null,!0)}async executeQueryForIdSet(e,r){return this.dataQueryEngine.executeQueryForIdSet(this._ensureQueryJSON(e),r)}async executeQueryForCount(e,r){return this.dataQueryEngine.executeQueryForCount(this._ensureQueryJSON(e),r)}async executeQueryForExtent(e,r){const{count:t,extent:s}=await this.dataQueryEngine.executeQueryForExtent(this._ensureQueryJSON(e),r);return{count:t,extent:n.fromJSON(s)}}async executeQueryForIds(e,r){return this.dataQueryEngine.executeQueryForIds(this._ensureQueryJSON(e),r)}async executeQueryForLatestObservations(e,r){const t=await this.dataQueryEngine.executeQueryForLatestObservations(this._ensureQueryJSON(e),r),s=i.fromJSON(t);return s.features.forEach((e=>{e.layer=this.layer,e.sourceLayer=this.layer})),s}async executeQuery(e,r){const t=await this.dataQueryEngine.executeQuery(this._ensureQueryJSON(e),r),s=i.fromJSON(t);return s.features.forEach((e=>{e.layer=this.layer,e.sourceLayer=this.layer})),s}_ensureQueryJSON(e){return t(e)?this.defaultQueryJSON:("outSpatialReference"in e&&!e.outSpatialReference&&(e.outSpatialReference=this.spatialReference),e.toJSON())}_ensureDataQueryEngine(){if(this._dataQueryEngineInstance)return this._dataQueryEngineInstance;const e="timeInfo"in this.layer&&this.layer.timeInfo&&this.layer.timeInfo.toJSON()||null,r=this.layer.objectIdField,t=y.toJSON(this.queryGeometryType),s=this.layer.fields.map((e=>e.toJSON())),a=this.layerView.view.resourceController.scheduler,n=this.priority,o=this.spatialReference.toJSON(),i=this.layerView.graphics3d.graphicsCore.featureStore,{hasZ:u,hasM:l}=this.layerView;return this._dataQueryEngineInstance=new c({hasZ:u,hasM:l,geometryType:t,fields:s,timeInfo:e,spatialReference:o,objectIdField:r,featureStore:i,scheduler:a,priority:n}),this._dataQueryEngineInstance}};e([s({constructOnly:!0})],l.prototype,"layerView",void 0),e([s({constructOnly:!0})],l.prototype,"priority",void 0),e([s({readOnly:!0,aliasOf:"layerView.view.spatialReference"})],l.prototype,"spatialReference",void 0),e([s({readOnly:!0,aliasOf:"layerView.layer"})],l.prototype,"layer",void 0),e([s({readOnly:!0})],l.prototype,"queryGeometryType",null),e([s({readOnly:!0})],l.prototype,"defaultQueryJSON",null),l=e([a("esri.views.3d.layers.graphics.QueryEngine")],l);const p=l;export{l as QueryEngine,p as default};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import"../../../../geometry.js";import r from"../../../../core/Accessor.js";import{isNone as t}from"../../../../core/maybe.js";import{property as s}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as a}from"../../../../core/accessorSupport/decorators/subclass.js";import n from"../../../../geometry/Extent.js";import o from"../../../../layers/graphics/data/QueryEngine.js";import i from"../../../../rest/support/FeatureSet.js";import u from"../../../../rest/support/Query.js";import{featureGeometryTypeKebabDictionary as y}from"../../../../geometry/support/typeUtils.js";const c=o;let l=class extends r{constructor(e){super(e),this._dataQueryEngineInstance=null}get queryGeometryType(){switch(this.layer.geometryType){case"multipoint":case"point":case"polygon":case"polyline":return this.layer.geometryType;case"mesh":return"polygon";default:return}}get defaultQueryJSON(){return new u({outSpatialReference:this.spatialReference}).toJSON()}get dataQueryEngine(){return this._ensureDataQueryEngine()}destroy(){this.clear()}clear(){return!!this._dataQueryEngineInstance&&(this._dataQueryEngineInstance.destroy(),this._dataQueryEngineInstance=null,!0)}async executeQueryForIdSet(e,r){return this.dataQueryEngine.executeQueryForIdSet(this._ensureQueryJSON(e),r)}async executeQueryForCount(e,r){return this.dataQueryEngine.executeQueryForCount(this._ensureQueryJSON(e),r)}async executeQueryForExtent(e,r){const{count:t,extent:s}=await this.dataQueryEngine.executeQueryForExtent(this._ensureQueryJSON(e),r);return{count:t,extent:n.fromJSON(s)}}async executeQueryForIds(e,r){return this.dataQueryEngine.executeQueryForIds(this._ensureQueryJSON(e),r)}async executeQueryForLatestObservations(e,r){const t=await this.dataQueryEngine.executeQueryForLatestObservations(this._ensureQueryJSON(e),r),s=i.fromJSON(t);return s.features.forEach((e=>{e.layer=this.layer,e.sourceLayer=this.layer})),s}async executeQuery(e,r){const t=await this.dataQueryEngine.executeQuery(this._ensureQueryJSON(e),r),s=i.fromJSON(t);return s.features.forEach((e=>{e.layer=this.layer,e.sourceLayer=this.layer})),s}_ensureQueryJSON(e){return t(e)?this.defaultQueryJSON:("outSpatialReference"in e&&!e.outSpatialReference&&(e.outSpatialReference=this.spatialReference),e.toJSON())}_ensureDataQueryEngine(){if(this._dataQueryEngineInstance)return this._dataQueryEngineInstance;const e="timeInfo"in this.layer&&this.layer.timeInfo&&this.layer.timeInfo.toJSON()||null,r=this.layer.objectIdField,t=y.toJSON(this.queryGeometryType),s=this.layer.fields.map((e=>e.toJSON())),a=this.layerView.view.resourceController.scheduler,n=this.priority,o=this.spatialReference.toJSON(),i=this.layerView.processor.featureStore,{hasZ:u,hasM:l}=this.layerView;return this._dataQueryEngineInstance=new c({hasZ:u,hasM:l,geometryType:t,fields:s,timeInfo:e,spatialReference:o,objectIdField:r,featureStore:i,scheduler:a,priority:n}),this._dataQueryEngineInstance}};e([s({constructOnly:!0})],l.prototype,"layerView",void 0),e([s({constructOnly:!0})],l.prototype,"priority",void 0),e([s({readOnly:!0,aliasOf:"layerView.view.spatialReference"})],l.prototype,"spatialReference",void 0),e([s({readOnly:!0,aliasOf:"layerView.layer"})],l.prototype,"layer",void 0),e([s({readOnly:!0})],l.prototype,"queryGeometryType",null),e([s({readOnly:!0})],l.prototype,"defaultQueryJSON",null),l=e([a("esri.views.3d.layers.graphics.QueryEngine")],l);const p=l;export{l as QueryEngine,p as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../../chunks/tslib.es6.js";import"../../../../geometry.js";import e from"../../../../core/Handles.js";import{property as r}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{TileTreeDebugger as i}from"../../../support/TileTreeDebugger.js";import{WatchUpdatingTracking as o,WatchFlags as a}from"../../../support/WatchUpdatingTracking.js";import n from"../../../../geometry/Polygon.js";let p=class extends i{constructor(t){super(t),this.watchUpdatingTracking=new o,this.handles=new e}initialize(){this.handles.add(this.view.featureTiles.addClient()),this.watchUpdatingTracking.addOnCollectionPropertyChange(this.view.featureTiles,"tiles",(()=>this.update()),a.INIT)}destroy(){this.handles&&(this.handles.destroy(),this.handles=null),this.watchUpdatingTracking.destroy()}getTiles(){const t=t=>{const[e,r,s]=t.lij;return n.fromExtent(this.view.featureTiles.tilingScheme.getExtentGeometry(e,r,s))};return this.view.featureTiles.tiles.toArray().sort(((t,e)=>t.loadPriority-e.loadPriority)).map((e=>({...e,geometry:t(e)})))}};t([r({readOnly:!0})],p.prototype,"watchUpdatingTracking",void 0),t([r({readOnly:!0,aliasOf:"watchUpdatingTracking.updating"})],p.prototype,"updating",void 0),p=t([s("esri.views.3d.layers.support.FeatureTileTree3DDebugger")],p);const c=p;export{p as FeatureTileTree3DDebugger,c as default};
5
+ import{_ as t}from"../../../../chunks/tslib.es6.js";import"../../../../geometry.js";import e from"../../../../core/Handles.js";import{initial as r}from"../../../../core/reactiveUtils.js";import{property as o}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as s}from"../../../../core/accessorSupport/decorators/subclass.js";import{TileTreeDebugger as i}from"../../../support/TileTreeDebugger.js";import{WatchUpdatingTracking as a}from"../../../support/WatchUpdatingTracking.js";import n from"../../../../geometry/Polygon.js";let p=class extends i{constructor(t){super(t),this.watchUpdatingTracking=new a,this.handles=new e}initialize(){const{featureTiles:t}=this.view;this.handles.add(t.addClient()),this.watchUpdatingTracking.addOnCollectionChange((()=>null==t?void 0:t.tiles),(()=>this.update()),r)}destroy(){this.handles&&(this.handles.destroy(),this.handles=null),this.watchUpdatingTracking.destroy()}getTiles(){const t=t=>{const[e,r,o]=t.lij;return n.fromExtent(this.view.featureTiles.tilingScheme.getExtentGeometry(e,r,o))};return this.view.featureTiles.tiles.toArray().sort(((t,e)=>t.loadPriority-e.loadPriority)).map((e=>({...e,geometry:t(e)})))}};t([o({readOnly:!0})],p.prototype,"watchUpdatingTracking",void 0),t([o({readOnly:!0,aliasOf:"watchUpdatingTracking.updating"})],p.prototype,"updating",void 0),t([o()],p.prototype,"view",void 0),p=t([s("esri.views.3d.layers.support.FeatureTileTree3DDebugger")],p);const c=p;export{p as FeatureTileTree3DDebugger,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.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../../chunks/tslib.es6.js";import i from"../../../../core/has.js";import{acosClamped as s,clamp as o}from"../../../../core/mathUtils.js";import{createScreenPointArray as e}from"../../../../core/screenUtils.js";import{property as r}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as a}from"../../../../core/accessorSupport/decorators/subclass.js";import{d as n,e as h}from"../../../../chunks/mat4.js";import{c as p}from"../../../../chunks/mat4f64.js";import{c}from"../../../../chunks/vec2.js";import{a as m}from"../../../../chunks/vec2f64.js";import{g as l,f as v,l as u,n as f,b as C,a as P,d as E,c as d,m as w}from"../../../../chunks/vec3.js";import{c as R}from"../../../../chunks/vec3f64.js";import{getReferenceEllipsoid as T}from"../../../../geometry/projectionEllipsoid.js";import{applyAll as j}from"../../camera/constraintUtils.js";import{ConstraintTypes as y,InteractionType as O,TiltMode as U}from"../../camera/constraintUtils/common.js";import{TiltDefault as M}from"../Constraints.js";import{InteractiveController as g}from"./InteractiveController.js";import{normalizeCoordinate as x,decideNavigationMode as D,NavigationMode as V}from"../utils/navigationUtils.js";var N;!function(t){t[t.CENTER=0]="CENTER",t[t.EYE=1]="EYE"}(N||(N={}));const A=7,S=90;let k=class extends g{constructor(t){super(t),this.view=null,this.pivot=N.CENTER,this.lastPoint=m(),this.tmpWorldUp=R(),this.tmpViewDir=R(),this.tmpRotCurPoint=m(),this.tmpTransf=p(),this.tmpAxis=R(),this.tmpPivotPoint=R(),this.pivotPos=R(),this.constraintOptions={selection:y.ALL,interactionType:O.TUMBLE,interactionFactor:0,interactionStartCamera:null,interactionDirection:null,tiltMode:U.TUMBLE}}get intersectionHelper(){return this.view.sceneIntersectionHelper}initialize(){this.rotScale=this.pivot===N.CENTER?3:1.5}begin(t){if(this.active){switch(this.pivot){case N.EYE:l(this.pivotPos,this.startCamera.eye),this.constraintOptions.interactionType=O.LOOK_AROUND,this.constraintOptions.tiltMode=U.LOOK_AROUND,this.constraintOptions.selection=y.NONE;break;case N.CENTER:this.intersectionHelper.intersectRayFreePointFallback(this.startCamera.ray,this.pivotPos)||l(this.pivotPos,this.startCamera.center),i("disable-feature:context-navigation")||this._constrainPivotPoint(t),this.startCamera.center=this.pivotPos,this.constraintOptions.interactionType=O.TUMBLE,this.constraintOptions.tiltMode=U.TUMBLE,this.constraintOptions.selection=y.ALL&~y.DISTANCE}this.constraintOptions.interactionStartCamera=this.startCamera,x(this.startCamera,t,this.lastPoint)}}_constrainPivotPoint(t){const i=this.startCamera,s=R();v(s,this.pivotPos,i.eye);let o=u(s);this.view.camera.position.hasZ&&(o=Math.min(o,A*Math.abs(this.view.camera.position.z)));const r=T(this.view.spatialReference),a=e(i.width/i.pixelRatio*.5,i.height/i.pixelRatio*.5),n=D(this.startCamera,a,!0,r);let h=this.view._stage.renderView.getMinimalDepthForArea(this.view.getVoxelWasmPerSceneView(),i.fullWidth/i.pixelRatio*.5,i.fullHeight/i.pixelRatio*.5,i,2.5*S,S),p=this.view._stage.renderView.getMinimalDepthForArea(this.view.getVoxelWasmPerSceneView(),t[0],t[1],i,S);void 0===h&&void 0===p||(h=void 0===h?p:h,p=void 0===p||n===V.Horizontal?h:p,o=h>p?p:h),f(s,s),l(this.pivotPos,C(this.tmpPivotPoint,i.eye,P(this.tmpPivotPoint,s,o)))}update(t){if(this.active){switch(this.pivot){case N.EYE:this.currentCamera.center=this._applyRotation(this.currentCamera,t,this.currentCamera.center,this.pivotPos);break;case N.CENTER:this.currentCamera.center=this.pivotPos,this.currentCamera.eye=this._applyRotation(this.currentCamera,t,this.currentCamera.eye,this.pivotPos)}j(this.view,this.currentCamera,this.constraintOptions)}}end(){this.active&&this.finishController()}_applyRotation(t,i,e,r){this.view.renderCoordsHelper.worldUpAtPosition(r,this.tmpWorldUp),x(t,i,this.tmpRotCurPoint);let a=(this.lastPoint[1]-this.tmpRotCurPoint[1])*this.rotScale,p=(this.tmpRotCurPoint[0]-this.lastPoint[0])*this.rotScale;v(this.tmpViewDir,e,r);const m=u(this.tmpViewDir),l=s(E(this.tmpViewDir,this.tmpWorldUp)/m);if(this.pivot===N.EYE){a*=-.5;const t=.5*Math.PI-l,i=.5*Math.PI*.99;a=t-Math.max(-i,Math.min(i,t+a))}return a=o(a+l,M.min,M.max)-l,d(this.tmpAxis,t.up,this.tmpViewDir),this.pivot===N.CENTER&&(p=-p),n(this.tmpTransf,p,this.tmpWorldUp),h(this.tmpTransf,this.tmpTransf,a,this.tmpAxis),w(this.tmpViewDir,this.tmpViewDir,this.tmpTransf),t.up=w(L,t.up,this.tmpTransf),C(L,r,this.tmpViewDir),c(this.lastPoint,this.tmpRotCurPoint),L}};t([r({constructOnly:!0})],k.prototype,"view",void 0),t([r()],k.prototype,"pivot",void 0),k=t([a("esri.views.3d.state.controllers.RotateController")],k);const L=R();export{N as PivotPoint,k as RotateController};
5
+ import{_ as t}from"../../../../chunks/tslib.es6.js";import{acosClamped as i,clamp as s}from"../../../../core/mathUtils.js";import{createScreenPointArray as o}from"../../../../core/screenUtils.js";import{property as e}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as r}from"../../../../core/accessorSupport/decorators/subclass.js";import{d as a,e as n}from"../../../../chunks/mat4.js";import{c as h}from"../../../../chunks/mat4f64.js";import{c as p}from"../../../../chunks/vec2.js";import{a as c}from"../../../../chunks/vec2f64.js";import{g as m,f as l,l as v,n as u,b as C,a as P,d as f,c as E,m as d}from"../../../../chunks/vec3.js";import{c as w}from"../../../../chunks/vec3f64.js";import{getReferenceEllipsoid as R}from"../../../../geometry/projectionEllipsoid.js";import{applyAll as T}from"../../camera/constraintUtils.js";import{ConstraintTypes as j,InteractionType as y,TiltMode as O}from"../../camera/constraintUtils/common.js";import{TiltDefault as U}from"../Constraints.js";import{InteractiveController as M}from"./InteractiveController.js";import{normalizeCoordinate as D,decideNavigationMode as V,NavigationMode as g}from"../utils/navigationUtils.js";var x;!function(t){t[t.CENTER=0]="CENTER",t[t.EYE=1]="EYE"}(x||(x={}));const N=7,A=90;let S=class extends M{constructor(t){super(t),this.view=null,this.pivot=x.CENTER,this.lastPoint=c(),this.tmpWorldUp=w(),this.tmpViewDir=w(),this.tmpRotCurPoint=c(),this.tmpTransf=h(),this.tmpAxis=w(),this.tmpPivotPoint=w(),this.pivotPos=w(),this.constraintOptions={selection:j.ALL,interactionType:y.TUMBLE,interactionFactor:0,interactionStartCamera:null,interactionDirection:null,tiltMode:O.TUMBLE}}get intersectionHelper(){return this.view.sceneIntersectionHelper}initialize(){this.rotScale=this.pivot===x.CENTER?3:1.5}begin(t){if(this.active){switch(this.pivot){case x.EYE:m(this.pivotPos,this.startCamera.eye),this.constraintOptions.interactionType=y.LOOK_AROUND,this.constraintOptions.tiltMode=O.LOOK_AROUND,this.constraintOptions.selection=j.NONE;break;case x.CENTER:this.intersectionHelper.intersectRayFreePointFallback(this.startCamera.ray,this.pivotPos)||m(this.pivotPos,this.startCamera.center),this._constrainPivotPoint(t),this.startCamera.center=this.pivotPos,this.constraintOptions.interactionType=y.TUMBLE,this.constraintOptions.tiltMode=O.TUMBLE,this.constraintOptions.selection=j.ALL&~j.DISTANCE}this.constraintOptions.interactionStartCamera=this.startCamera,D(this.startCamera,t,this.lastPoint)}}_constrainPivotPoint(t){const i=this.startCamera,s=w();l(s,this.pivotPos,i.eye);let e=v(s);this.view.camera.position.hasZ&&(e=Math.min(e,N*Math.abs(this.view.camera.position.z)));const r=R(this.view.spatialReference),a=o(i.width/i.pixelRatio*.5,i.height/i.pixelRatio*.5),n=V(this.startCamera,a,!0,r);let h=this.view._stage.renderView.getMinimalDepthForArea(this.view.getVoxelWasmPerSceneView(),i.fullWidth/i.pixelRatio*.5,i.fullHeight/i.pixelRatio*.5,i,2.5*A,A),p=this.view._stage.renderView.getMinimalDepthForArea(this.view.getVoxelWasmPerSceneView(),t[0],t[1],i,A);void 0===h&&void 0===p||(h=void 0===h?p:h,p=void 0===p||n===g.Horizontal?h:p,e=h>p?p:h),u(s,s),m(this.pivotPos,C(this.tmpPivotPoint,i.eye,P(this.tmpPivotPoint,s,e)))}update(t){if(this.active){switch(this.pivot){case x.EYE:this.currentCamera.center=this._applyRotation(this.currentCamera,t,this.currentCamera.center,this.pivotPos);break;case x.CENTER:this.currentCamera.center=this.pivotPos,this.currentCamera.eye=this._applyRotation(this.currentCamera,t,this.currentCamera.eye,this.pivotPos)}T(this.view,this.currentCamera,this.constraintOptions)}}end(){this.active&&this.finishController()}_applyRotation(t,o,e,r){this.view.renderCoordsHelper.worldUpAtPosition(r,this.tmpWorldUp),D(t,o,this.tmpRotCurPoint);let h=(this.lastPoint[1]-this.tmpRotCurPoint[1])*this.rotScale,c=(this.tmpRotCurPoint[0]-this.lastPoint[0])*this.rotScale;l(this.tmpViewDir,e,r);const m=v(this.tmpViewDir),u=i(f(this.tmpViewDir,this.tmpWorldUp)/m);if(this.pivot===x.EYE){h*=-.5;const t=.5*Math.PI-u,i=.5*Math.PI*.99;h=t-Math.max(-i,Math.min(i,t+h))}return h=s(h+u,U.min,U.max)-u,E(this.tmpAxis,t.up,this.tmpViewDir),this.pivot===x.CENTER&&(c=-c),a(this.tmpTransf,c,this.tmpWorldUp),n(this.tmpTransf,this.tmpTransf,h,this.tmpAxis),d(this.tmpViewDir,this.tmpViewDir,this.tmpTransf),t.up=d(k,t.up,this.tmpTransf),C(k,r,this.tmpViewDir),p(this.lastPoint,this.tmpRotCurPoint),k}};t([e({constructOnly:!0})],S.prototype,"view",void 0),t([e()],S.prototype,"pivot",void 0),S=t([r("esri.views.3d.state.controllers.RotateController")],S);const k=w();export{x as PivotPoint,S as RotateController};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../../../chunks/tslib.es6.js";import{deg2rad as i}from"../../../../../core/mathUtils.js";import{createScreenPointArray as e,screenPointObjectToArray as n,createRenderScreenPointArray3 as s}from"../../../../../core/screenUtils.js";import{property as o}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import"../../../../../core/accessorSupport/ensureType.js";import{subclass as r}from"../../../../../core/accessorSupport/decorators/subclass.js";import{c as a}from"../../../../../chunks/vec2.js";import{g as m,o as h,l as c,f as p,n as u,b as l,a as P,d}from"../../../../../chunks/vec3.js";import{c as g}from"../../../../../chunks/vec3f64.js";import{getReferenceEllipsoid as v}from"../../../../../geometry/projectionEllipsoid.js";import{wrapAxisAngle as M}from"../../../../../geometry/support/axisAngle.js";import{create as C,fromPositionAndNormal as S,normal as w}from"../../../../../geometry/support/plane.js";import{c as b}from"../../../../../chunks/sphere.js";import{disableContextNavigation as f}from"../../../../../support/featureFlags.js";import{pixelDistanceToInteractionFactor as j,applyAll as E}from"../../../camera/constraintUtils.js";import{ConstraintTypes as O,InteractionType as y,TiltMode as k}from"../../../camera/constraintUtils/common.js";import{ExponentialFalloff as A}from"../../../input/util.js";import{InteractiveController as z}from"../InteractiveController.js";import{PanPlanarMomentumController as R}from"../momentum/PanPlanarMomentumController.js";import{PanSphericalMomentumController as x}from"../momentum/PanSphericalMomentumController.js";import{RotationMomentumController as _}from"../momentum/RotationMomentumController.js";import{ZoomPlanarMomentumController as H}from"../momentum/ZoomPlanarMomentumController.js";import{ZoomSphericalMomentumController as F}from"../momentum/ZoomSphericalMomentumController.js";import{NavigationMode as T,pickPointAndInitSphere as U,decideNavigationMode as D,sphereOrPlanePointFromScreenPoint as I,intersectPlaneFromScreenPointAtEye as L,applyZoomOnSphere as Z,preserveHeadingThreshold as N,applyPanSphericalPreserveHeading as B,applyPanSphericalDirectRotation as G,normalizeRotationDelta as V,applyRotation as q,applyPanPlanar as J,applyZoomToPoint as K}from"../../utils/navigationUtils.js";import{cyclicalPI as Q}from"../../../support/mathUtils.js";import W from"../../../webgl-engine/lib/Camera.js";import{PanPlanarMomentumEstimator as X}from"../../../../navigation/PanPlanarMomentumEstimator.js";import{PanSphericalMomentumEstimator as Y}from"../../../../navigation/PanSphericalMomentumEstimator.js";import{RotationMomentumEstimator as $}from"../../../../navigation/RotationMomentumEstimator.js";import{ZoomMomentumEstimator as tt}from"../../../../navigation/ZoomMomentumEstimator.js";let it=class extends z{constructor(t){super(t),this.view=null,this.smoothRotation=new A(.05),this.rotationAxis=g(),this.panningPlane=C(),this.smoothScaling=new A(.05),this.zoomCenterScreen=e(),this.zoomMomentumEstimator=new tt,this.rotationMomentumEstimator=new $,this.panSphericalMomentumEstimator=new Y,this.panPlanarMomentumEstimator=new X,this.adjustedSphere=b(),this.tmp3d=g(),this.tmpScreenPointArray=e(),this.beginScreenPoint=e(),this.beginScenePoint=g(),this.screenPickPoint=e(),this.navMode=T.Horizontal,this.tmpInteractionDirection=g(),this.constraintOptions={selection:O.ALL,interactionType:y.NONE,interactionFactor:0,interactionStartCamera:new W,interactionDirection:null,tiltMode:k.TUMBLE}}get intersectionHelper(){return this.view.sceneIntersectionHelper}begin(t){if(!this.active)return;const e=this.view.navigation.momentumEnabled;this.zoomMomentumEstimator.enabled=e,this.rotationMomentumEstimator.enabled=e,this.panPlanarMomentumEstimator.enabled=e,this.panSphericalMomentumEstimator.enabled=e,this.beginHeading=-Q.normalize(i(this.view.camera.heading)),this.beginRadius=t.radius,this.pointerCount=t.pointers.size,this.beginAngle=t.angle,this.smoothRotation.reset(),n(t.center,this.screenPickPoint),a(this.beginScreenPoint,this.screenPickPoint);const s=v(this.view.spatialReference),o=U(this.intersectionHelper,this.startCamera,this.screenPickPoint,!0,s);this.scenePickPoint=o.scenePickPoint,this.sphere=o.sphere,m(this.beginScenePoint,this.scenePickPoint),this.navMode=D(this.startCamera,this.screenPickPoint,o.hasGeometryIntersection,s),this.navMode===T.Vertical&&this._preparePlanarPanMode(t),this.constraintOptions.interactionStartCamera.copyFrom(this.startCamera)}_preparePlanarPanMode(t){const i=h(this.tmp3d,this.startCamera.viewForward);S(this.scenePickPoint,i,this.panningPlane);const o=e(this.screenPickPoint[0],0),r=g(),a=c(this.startCamera.eye);this.adjustedSphere[3]=a<this.sphere[3]?a-100:this.sphere[3],I(this.adjustedSphere,this.startCamera,o,r);const v=s();this.startCamera.projectToRenderScreen(r,v);const M=.9*v[1];if(this.screenPickPoint[1]=Math.min(this.screenPickPoint[1],M),this.intersectionHelper.intersectScreen(this.screenPickPoint,this.scenePickPoint)&&S(this.scenePickPoint,w(this.panningPlane),this.panningPlane),!f()){const t=g(),i=g(),e=g(),n=80,s=5,o=50;p(t,this.scenePickPoint,this.currentCamera.eye),u(t,t);const r=s*Math.max(Math.abs(this.view.camera.position.z),o),a=this.view._stage.renderView.getMinimalDepthForArea(null,this.screenPickPoint[0],this.screenPickPoint[1],this.view.state.camera,n),h=a?Math.min(a,r):r;m(e,l(i,this.currentCamera.eye,P(i,t,h))),this.panningPlane[3]=-d(this.panningPlane,e),this.startCamera.center=l(i,this.startCamera.eye,P(i,this.startCamera.viewForward,h))}const C=n(t.center,this.tmpScreenPointArray);L(this.panningPlane,this.startCamera,C,this.beginScenePoint)}update(t){if(!this.active)return;this.currentCamera.copyFrom(this.startCamera);const i=t.pointers.size>1;this.navMode===T.Horizontal?(i&&this._zoomSpherical(t),this._panningSpherical(t),i&&this._rotateSpherical(t)):(i&&this._zoomPlanar(t),this._panningPlanar(t),i&&this._rotatePlanar(t))}end(t){t.pointers.size===this.pointerCount&&this.update(t),this.finishController();const i=this.zoomMomentumEstimator.evaluateMomentum();if(i)return this.navMode===T.Horizontal?new F({view:this.view,momentum:i,screenCenter:this.zoomCenterScreen,sceneCenter:this.beginScenePoint,radius:this.sphere[3]}):new H({view:this.view,momentum:i,zoomCenter:this.beginScenePoint});const e=this.rotationMomentumEstimator.evaluateMomentum();if(e)return new _({view:this.view,momentum:e,center:this.sphere,axis:this.rotationAxis});if(this.navMode===T.Horizontal){const t=this.panSphericalMomentumEstimator.evaluateMomentum();if(t)return new x({view:this.view,momentum:t})}else{const t=this.panPlanarMomentumEstimator.evaluateMomentum();if(t)return new R({view:this.view,momentum:t})}return null}_zoomSpherical(t){const i=this.beginRadius/t.radius,e=.001875*Math.min(Math.max(t.radius,40),120);this.smoothScaling.gain=e,this.smoothScaling.update(i),Z(this.sphere,this.currentCamera,this.smoothScaling.value),n(t.center,this.zoomCenterScreen),this.zoomMomentumEstimator.add(this.smoothScaling.value,.001*t.timestamp),this.constraintOptions.interactionType=y.ZOOM,this.constraintOptions.interactionFactor=j(t.radius-this.beginRadius),E(this.view,this.currentCamera,this.constraintOptions)}_panningSpherical(t){const i=n(t.center,this.tmpScreenPointArray);I(this.sphere,this.currentCamera,i,this.tmp3d),N(this.beginScenePoint,d(this.currentCamera.up,this.beginScenePoint),this.sphere[3],this.beginHeading,this.view.camera.tilt,this.startCamera)?(B(this.sphere,this.currentCamera,this.beginScenePoint,this.tmp3d,this.beginHeading,this.view.camera.tilt,!1),this.panSphericalMomentumEstimator.addMomentumPreserveHeading(i,this.tmp3d,.001*t.timestamp,this.startCamera,this.sphere,this.beginHeading,this.view.camera.tilt)):(G(this.sphere,this.currentCamera,this.beginScenePoint,this.tmp3d,this.view.camera.tilt,!1),this.panSphericalMomentumEstimator.addMomentumDirectRotation(i,this.tmp3d,.001*t.timestamp,this.startCamera,this.sphere[3],this.view.camera.tilt)),this.constraintOptions.interactionType=y.PAN,this.constraintOptions.interactionFactor=j(this.screenPickPoint,i),E(this.view,this.currentCamera,this.constraintOptions)}_rotateSpherical(t){u(this.rotationAxis,this.scenePickPoint),this.currentCamera.aboveGround||h(this.rotationAxis,this.rotationAxis);const i=this.smoothRotation.value,e=i+V(t.angle-i),n=.00125*Math.min(Math.max(t.radius,40),120);this.smoothRotation.gain=n,this.smoothRotation.update(e);const s=this.smoothRotation.value-this.beginAngle;this.rotationMomentumEstimator.add(s,.001*t.timestamp),q(this.currentCamera,this.sphere,M(this.rotationAxis,s)),this.constraintOptions.interactionType=y.TUMBLE,this.constraintOptions.interactionFactor=j(t.radius*e),E(this.view,this.currentCamera,this.constraintOptions)}_panningPlanar(t){const i=n(t.center,this.tmpScreenPointArray);L(this.panningPlane,this.currentCamera,i,this.tmp3d)&&(J(this.currentCamera,this.beginScenePoint,this.tmp3d),this.panPlanarMomentumEstimator.add(i,this.tmp3d,.001*t.timestamp),this.constraintOptions.interactionType=y.PAN,this.constraintOptions.interactionFactor=j(this.beginScreenPoint,i),this.constraintOptions.interactionDirection=this.view.renderCoordsHelper.worldUpAtPosition(this.currentCamera.eye,this.tmpInteractionDirection),E(this.view,this.currentCamera,this.constraintOptions),this.constraintOptions.interactionDirection=null)}_zoomPlanar(t){const i=this.beginRadius/t.radius,e=.001875*Math.min(Math.max(t.radius,40),120);this.smoothScaling.gain=e,this.smoothScaling.update(i),this.zoomMomentumEstimator.add(this.smoothScaling.value,.001*t.timestamp),K(this.currentCamera,this.beginScenePoint,this.smoothScaling.value,this.view.state.constraints.minimumPoiDistance),this.constraintOptions.interactionType=y.ZOOM,this.constraintOptions.interactionFactor=j(t.radius-this.beginRadius),E(this.view,this.currentCamera,this.constraintOptions)}_rotatePlanar(t){m(this.rotationAxis,this.beginScenePoint),this.currentCamera.aboveGround||h(this.rotationAxis,this.rotationAxis);const i=this.smoothRotation.value;let e=t.angle-i;e=V(e);const n=i+e,s=.00125*Math.min(Math.max(t.radius,40),120);this.smoothRotation.gain=s,this.smoothRotation.update(n);const o=this.smoothRotation.value-this.beginAngle;this.rotationMomentumEstimator.add(o,.001*t.timestamp),q(this.currentCamera,this.sphere,M(this.rotationAxis,o)),this.constraintOptions.interactionType=y.TUMBLE,this.constraintOptions.interactionFactor=j(t.radius*o),E(this.view,this.currentCamera,this.constraintOptions)}};t([o({constructOnly:!0})],it.prototype,"view",void 0),it=t([r("esri.views.3d.state.controllers.global.PinchAndPanController")],it);export{it as PinchAndPanController};
5
+ import{_ as t}from"../../../../../chunks/tslib.es6.js";import{deg2rad as i}from"../../../../../core/mathUtils.js";import{createScreenPointArray as e,screenPointObjectToArray as n,createRenderScreenPointArray3 as s}from"../../../../../core/screenUtils.js";import{property as o}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import"../../../../../core/accessorSupport/ensureType.js";import{subclass as r}from"../../../../../core/accessorSupport/decorators/subclass.js";import{c as a}from"../../../../../chunks/vec2.js";import{g as m,o as h,l as c,f as p,n as l,b as u,a as P,d}from"../../../../../chunks/vec3.js";import{c as g}from"../../../../../chunks/vec3f64.js";import{getReferenceEllipsoid as v}from"../../../../../geometry/projectionEllipsoid.js";import{wrapAxisAngle as M}from"../../../../../geometry/support/axisAngle.js";import{create as C,fromPositionAndNormal as S,normal as w}from"../../../../../geometry/support/plane.js";import{c as b}from"../../../../../chunks/sphere.js";import{pixelDistanceToInteractionFactor as f,applyAll as j}from"../../../camera/constraintUtils.js";import{ConstraintTypes as E,InteractionType as O,TiltMode as y}from"../../../camera/constraintUtils/common.js";import{ExponentialFalloff as k}from"../../../input/util.js";import{InteractiveController as A}from"../InteractiveController.js";import{PanPlanarMomentumController as z}from"../momentum/PanPlanarMomentumController.js";import{PanSphericalMomentumController as R}from"../momentum/PanSphericalMomentumController.js";import{RotationMomentumController as x}from"../momentum/RotationMomentumController.js";import{ZoomPlanarMomentumController as _}from"../momentum/ZoomPlanarMomentumController.js";import{ZoomSphericalMomentumController as H}from"../momentum/ZoomSphericalMomentumController.js";import{NavigationMode as F,pickPointAndInitSphere as T,decideNavigationMode as U,sphereOrPlanePointFromScreenPoint as D,intersectPlaneFromScreenPointAtEye as I,applyZoomOnSphere as L,preserveHeadingThreshold as Z,applyPanSphericalPreserveHeading as N,applyPanSphericalDirectRotation as B,normalizeRotationDelta as G,applyRotation as V,applyPanPlanar as q,applyZoomToPoint as J}from"../../utils/navigationUtils.js";import{cyclicalPI as K}from"../../../support/mathUtils.js";import Q from"../../../webgl-engine/lib/Camera.js";import{PanPlanarMomentumEstimator as W}from"../../../../navigation/PanPlanarMomentumEstimator.js";import{PanSphericalMomentumEstimator as X}from"../../../../navigation/PanSphericalMomentumEstimator.js";import{RotationMomentumEstimator as Y}from"../../../../navigation/RotationMomentumEstimator.js";import{ZoomMomentumEstimator as $}from"../../../../navigation/ZoomMomentumEstimator.js";let tt=class extends A{constructor(t){super(t),this.view=null,this.smoothRotation=new k(.05),this.rotationAxis=g(),this.panningPlane=C(),this.smoothScaling=new k(.05),this.zoomCenterScreen=e(),this.zoomMomentumEstimator=new $,this.rotationMomentumEstimator=new Y,this.panSphericalMomentumEstimator=new X,this.panPlanarMomentumEstimator=new W,this.adjustedSphere=b(),this.tmp3d=g(),this.tmpScreenPointArray=e(),this.beginScreenPoint=e(),this.beginScenePoint=g(),this.screenPickPoint=e(),this.navMode=F.Horizontal,this.tmpInteractionDirection=g(),this.constraintOptions={selection:E.ALL,interactionType:O.NONE,interactionFactor:0,interactionStartCamera:new Q,interactionDirection:null,tiltMode:y.TUMBLE}}get intersectionHelper(){return this.view.sceneIntersectionHelper}begin(t){if(!this.active)return;const e=this.view.navigation.momentumEnabled;this.zoomMomentumEstimator.enabled=e,this.rotationMomentumEstimator.enabled=e,this.panPlanarMomentumEstimator.enabled=e,this.panSphericalMomentumEstimator.enabled=e,this.beginHeading=-K.normalize(i(this.view.camera.heading)),this.beginRadius=t.radius,this.pointerCount=t.pointers.size,this.beginAngle=t.angle,this.smoothRotation.reset(),n(t.center,this.screenPickPoint),a(this.beginScreenPoint,this.screenPickPoint);const s=v(this.view.spatialReference),o=T(this.intersectionHelper,this.startCamera,this.screenPickPoint,!0,s);this.scenePickPoint=o.scenePickPoint,this.sphere=o.sphere,m(this.beginScenePoint,this.scenePickPoint),this.navMode=U(this.startCamera,this.screenPickPoint,o.hasGeometryIntersection,s),this.navMode===F.Vertical&&this._preparePlanarPanMode(t),this.constraintOptions.interactionStartCamera.copyFrom(this.startCamera)}_preparePlanarPanMode(t){const i=h(this.tmp3d,this.startCamera.viewForward);S(this.scenePickPoint,i,this.panningPlane);const o=e(this.screenPickPoint[0],0),r=g(),a=c(this.startCamera.eye);this.adjustedSphere[3]=a<this.sphere[3]?a-100:this.sphere[3],D(this.adjustedSphere,this.startCamera,o,r);const v=s();this.startCamera.projectToRenderScreen(r,v);const M=.9*v[1];this.screenPickPoint[1]=Math.min(this.screenPickPoint[1],M),this.intersectionHelper.intersectScreen(this.screenPickPoint,this.scenePickPoint)&&S(this.scenePickPoint,w(this.panningPlane),this.panningPlane);const C=g(),b=g(),f=g(),j=80,E=5,O=50;p(C,this.scenePickPoint,this.currentCamera.eye),l(C,C);const y=E*Math.max(Math.abs(this.view.camera.position.z),O),k=this.view._stage.renderView.getMinimalDepthForArea(null,this.screenPickPoint[0],this.screenPickPoint[1],this.view.state.camera,j),A=k?Math.min(k,y):y;m(f,u(b,this.currentCamera.eye,P(b,C,A))),this.panningPlane[3]=-d(this.panningPlane,f),this.startCamera.center=u(b,this.startCamera.eye,P(b,this.startCamera.viewForward,A));const z=n(t.center,this.tmpScreenPointArray);I(this.panningPlane,this.startCamera,z,this.beginScenePoint)}update(t){if(!this.active)return;this.currentCamera.copyFrom(this.startCamera);const i=t.pointers.size>1;this.navMode===F.Horizontal?(i&&this._zoomSpherical(t),this._panningSpherical(t),i&&this._rotateSpherical(t)):(i&&this._zoomPlanar(t),this._panningPlanar(t),i&&this._rotatePlanar(t))}end(t){t.pointers.size===this.pointerCount&&this.update(t),this.finishController();const i=this.zoomMomentumEstimator.evaluateMomentum();if(i)return this.navMode===F.Horizontal?new H({view:this.view,momentum:i,screenCenter:this.zoomCenterScreen,sceneCenter:this.beginScenePoint,radius:this.sphere[3]}):new _({view:this.view,momentum:i,zoomCenter:this.beginScenePoint});const e=this.rotationMomentumEstimator.evaluateMomentum();if(e)return new x({view:this.view,momentum:e,center:this.sphere,axis:this.rotationAxis});if(this.navMode===F.Horizontal){const t=this.panSphericalMomentumEstimator.evaluateMomentum();if(t)return new R({view:this.view,momentum:t})}else{const t=this.panPlanarMomentumEstimator.evaluateMomentum();if(t)return new z({view:this.view,momentum:t})}return null}_zoomSpherical(t){const i=this.beginRadius/t.radius,e=.001875*Math.min(Math.max(t.radius,40),120);this.smoothScaling.gain=e,this.smoothScaling.update(i),L(this.sphere,this.currentCamera,this.smoothScaling.value),n(t.center,this.zoomCenterScreen),this.zoomMomentumEstimator.add(this.smoothScaling.value,.001*t.timestamp),this.constraintOptions.interactionType=O.ZOOM,this.constraintOptions.interactionFactor=f(t.radius-this.beginRadius),j(this.view,this.currentCamera,this.constraintOptions)}_panningSpherical(t){const i=n(t.center,this.tmpScreenPointArray);D(this.sphere,this.currentCamera,i,this.tmp3d),Z(this.beginScenePoint,d(this.currentCamera.up,this.beginScenePoint),this.sphere[3],this.beginHeading,this.view.camera.tilt,this.startCamera)?(N(this.sphere,this.currentCamera,this.beginScenePoint,this.tmp3d,this.beginHeading,this.view.camera.tilt,!1),this.panSphericalMomentumEstimator.addMomentumPreserveHeading(i,this.tmp3d,.001*t.timestamp,this.startCamera,this.sphere,this.beginHeading,this.view.camera.tilt)):(B(this.sphere,this.currentCamera,this.beginScenePoint,this.tmp3d,this.view.camera.tilt,!1),this.panSphericalMomentumEstimator.addMomentumDirectRotation(i,this.tmp3d,.001*t.timestamp,this.startCamera,this.sphere[3],this.view.camera.tilt)),this.constraintOptions.interactionType=O.PAN,this.constraintOptions.interactionFactor=f(this.screenPickPoint,i),j(this.view,this.currentCamera,this.constraintOptions)}_rotateSpherical(t){l(this.rotationAxis,this.scenePickPoint),this.currentCamera.aboveGround||h(this.rotationAxis,this.rotationAxis);const i=this.smoothRotation.value,e=i+G(t.angle-i),n=.00125*Math.min(Math.max(t.radius,40),120);this.smoothRotation.gain=n,this.smoothRotation.update(e);const s=this.smoothRotation.value-this.beginAngle;this.rotationMomentumEstimator.add(s,.001*t.timestamp),V(this.currentCamera,this.sphere,M(this.rotationAxis,s)),this.constraintOptions.interactionType=O.TUMBLE,this.constraintOptions.interactionFactor=f(t.radius*e),j(this.view,this.currentCamera,this.constraintOptions)}_panningPlanar(t){const i=n(t.center,this.tmpScreenPointArray);I(this.panningPlane,this.currentCamera,i,this.tmp3d)&&(q(this.currentCamera,this.beginScenePoint,this.tmp3d),this.panPlanarMomentumEstimator.add(i,this.tmp3d,.001*t.timestamp),this.constraintOptions.interactionType=O.PAN,this.constraintOptions.interactionFactor=f(this.beginScreenPoint,i),this.constraintOptions.interactionDirection=this.view.renderCoordsHelper.worldUpAtPosition(this.currentCamera.eye,this.tmpInteractionDirection),j(this.view,this.currentCamera,this.constraintOptions),this.constraintOptions.interactionDirection=null)}_zoomPlanar(t){const i=this.beginRadius/t.radius,e=.001875*Math.min(Math.max(t.radius,40),120);this.smoothScaling.gain=e,this.smoothScaling.update(i),this.zoomMomentumEstimator.add(this.smoothScaling.value,.001*t.timestamp),J(this.currentCamera,this.beginScenePoint,this.smoothScaling.value,this.view.state.constraints.minimumPoiDistance),this.constraintOptions.interactionType=O.ZOOM,this.constraintOptions.interactionFactor=f(t.radius-this.beginRadius),j(this.view,this.currentCamera,this.constraintOptions)}_rotatePlanar(t){m(this.rotationAxis,this.beginScenePoint),this.currentCamera.aboveGround||h(this.rotationAxis,this.rotationAxis);const i=this.smoothRotation.value;let e=t.angle-i;e=G(e);const n=i+e,s=.00125*Math.min(Math.max(t.radius,40),120);this.smoothRotation.gain=s,this.smoothRotation.update(n);const o=this.smoothRotation.value-this.beginAngle;this.rotationMomentumEstimator.add(o,.001*t.timestamp),V(this.currentCamera,this.sphere,M(this.rotationAxis,o)),this.constraintOptions.interactionType=O.TUMBLE,this.constraintOptions.interactionFactor=f(t.radius*o),j(this.view,this.currentCamera,this.constraintOptions)}};t([o({constructOnly:!0})],tt.prototype,"view",void 0),tt=t([r("esri.views.3d.state.controllers.global.PinchAndPanController")],tt);export{tt as PinchAndPanController};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../../../chunks/tslib.es6.js";import i from"../../../../../core/has.js";import{clamp as e}from"../../../../../core/mathUtils.js";import{createScreenPointArray as r}from"../../../../../core/screenUtils.js";import{property as s}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/accessorSupport/ensureType.js";import{subclass as a}from"../../../../../core/accessorSupport/decorators/subclass.js";import{c as n}from"../../../../../chunks/vec2.js";import{a as o}from"../../../../../chunks/vec2f64.js";import{n as c,a as h,b as m,f as p,l}from"../../../../../chunks/vec3.js";import{c as u}from"../../../../../chunks/vec3f64.js";import{getReferenceEllipsoid as y}from"../../../../../geometry/projectionEllipsoid.js";import{create as C,fromPoints as f}from"../../../../../geometry/support/axisAngle.js";import{c as P}from"../../../../../chunks/sphere.js";import{pixelDistanceToInteractionFactor as d,applyAll as g}from"../../../camera/constraintUtils.js";import{ConstraintTypes as v,InteractionType as j,TiltMode as R}from"../../../camera/constraintUtils/common.js";import{InteractiveController as k}from"../InteractiveController.js";import{normalizeCoordinate as w,pickPointAndInitSphere as A,decideNavigationMode as D,NavigationMode as O,DISTANCE_CLAMP_VALUES as b,PIVOT_DISTANCE_MODIFIER as M,SCREEN_PIXEL_AREA as S,sphereOrPlanePointFromScreenPoint as U,applyRotation as x}from"../../utils/navigationUtils.js";import{fromScreenAtEye as z}from"../../../support/geometryUtils/ray.js";import{applySurfaceCollisionConstraint as B}from"../../../camera/constraintUtils/surfaceCollision.js";let H=class extends k{constructor(t){super(t),this.view=null,this.pickPoint=u(),this.tmpP0=o(),this.panAxisAngle=C(),this.tmpRayDir=u(),this.targetOnSphere=u(),this.tmpRay={origin:u(),direction:u()},this.dragBeginPoint=r(),this.normalizedAnchorPoint=o(),this.constraintOptions={selection:v.ALL_EXCEPT_COLLISION,interactionType:j.ZOOM,interactionFactor:0,interactionStartCamera:null,interactionDirection:null,tiltMode:R.TUMBLE},this.sphere=P(),this.hasPickPoint=!1}get intersectionHelper(){return this.view.sceneIntersectionHelper}begin(t){if(!this.active)return;n(this.dragBeginPoint,t),w(this.startCamera,t,this.normalizedAnchorPoint);const r=y(this.view.spatialReference),s=A(this.intersectionHelper,this.startCamera,t,!1,r);if(this.navMode=D(this.startCamera,t,s.hasGeometryIntersection,r),this.navMode===O.Horizontal||i("disable-feature:context-navigation"))this.hasPickPoint=!!s.scenePickPoint,this.pickPoint=s.scenePickPoint,this.sphere=s.sphere;else{let i;z(this.startCamera,t,this.tmpRay),c(this.tmpRay.direction,this.tmpRay.direction),this.view.camera.position.hasZ&&(i=Math.abs(this.view.camera.position.z));let r=e(M*i,b[0],b[1]);const s=this.view._stage.renderView.getMinimalDepthForArea(null,t[0],t[1],this.view.state.camera,S);r=r>s?s:r,this.hasPickPoint=!0,h(this.tmpRay.direction,this.tmpRay.direction,r),m(this.pickPoint,this.tmpRay.origin,this.tmpRay.direction)}this.constraintOptions.interactionStartCamera=this.startCamera}update(t){if(this.active){if(this.currentCamera.eye=this.startCamera.eye,this.currentCamera.center=this.startCamera.center,this.currentCamera.up=this.startCamera.up,this.navMode===O.Horizontal||i("disable-feature:context-navigation")){p(this.tmpRayDir,this.currentCamera.center,this.currentCamera.eye);const i=l(this.tmpRayDir);w(this.currentCamera,t,this.tmpP0);const e=12*(this.normalizedAnchorPoint[1]-this.tmpP0[1]);let r=i*2**e;const s=this.view.state.constraints.minimumPoiDistance;if(e<0&&r<s&&(r=s),Math.abs(i-r)<1e-6)return;if(this.hasPickPoint&&r<i){const t=1-(1-r/i)*(1-this.sphere[3]/l(this.currentCamera.center));this.currentCamera.center=h(I,this.currentCamera.center,t)}h(this.tmpRayDir,this.tmpRayDir,-r/i),this.currentCamera.eye=m(I,this.currentCamera.center,this.tmpRayDir),this.constraintOptions.interactionFactor=d(this.dragBeginPoint,t),g(this.view,this.currentCamera,this.constraintOptions),this.hasPickPoint&&(U(this.sphere,this.currentCamera,this.dragBeginPoint,this.targetOnSphere),f(this.pickPoint,this.targetOnSphere,this.panAxisAngle),x(this.currentCamera,this.sphere,this.panAxisAngle))}else{const i=l(this.tmpRay.direction);w(this.currentCamera,t,this.tmpP0);const e=12*(this.normalizedAnchorPoint[1]-this.tmpP0[1]);let r=i*2**e;const s=this.view.state.constraints.minimumPoiDistance;if(e<0&&r<s&&(r=s),Math.abs(i-r)<1e-6)return;h(this.tmpRayDir,this.tmpRay.direction,1-r/i),this.currentCamera.eye=m(I,this.currentCamera.eye,this.tmpRayDir),this.currentCamera.center=m(I,this.currentCamera.center,this.tmpRayDir)}B(this.view,this.currentCamera)}}end(){this.active&&this.finishController()}};t([s({constructOnly:!0})],H.prototype,"view",void 0),H=t([a("esri.views.3d.state.controllers.global.ZoomController")],H);const I=u();export{H as ZoomController};
5
+ import{_ as t}from"../../../../../chunks/tslib.es6.js";import{clamp as i}from"../../../../../core/mathUtils.js";import{createScreenPointArray as r}from"../../../../../core/screenUtils.js";import{property as e}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import"../../../../../core/accessorSupport/ensureType.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators/subclass.js";import{c as a}from"../../../../../chunks/vec2.js";import{a as n}from"../../../../../chunks/vec2f64.js";import{n as o,a as c,b as h,f as m,l as p}from"../../../../../chunks/vec3.js";import{c as l}from"../../../../../chunks/vec3f64.js";import{getReferenceEllipsoid as u}from"../../../../../geometry/projectionEllipsoid.js";import{create as y,fromPoints as C}from"../../../../../geometry/support/axisAngle.js";import{c as P}from"../../../../../chunks/sphere.js";import{pixelDistanceToInteractionFactor as f,applyAll as d}from"../../../camera/constraintUtils.js";import{ConstraintTypes as g,InteractionType as v,TiltMode as j}from"../../../camera/constraintUtils/common.js";import{InteractiveController as R}from"../InteractiveController.js";import{normalizeCoordinate as k,pickPointAndInitSphere as w,decideNavigationMode as A,NavigationMode as D,DISTANCE_CLAMP_VALUES as O,PIVOT_DISTANCE_MODIFIER as M,SCREEN_PIXEL_AREA as S,sphereOrPlanePointFromScreenPoint as U,applyRotation as b}from"../../utils/navigationUtils.js";import{fromScreenAtEye as z}from"../../../support/geometryUtils/ray.js";import{applySurfaceCollisionConstraint as x}from"../../../camera/constraintUtils/surfaceCollision.js";let B=class extends R{constructor(t){super(t),this.view=null,this.pickPoint=l(),this.tmpP0=n(),this.panAxisAngle=y(),this.tmpRayDir=l(),this.targetOnSphere=l(),this.tmpRay={origin:l(),direction:l()},this.dragBeginPoint=r(),this.normalizedAnchorPoint=n(),this.constraintOptions={selection:g.ALL_EXCEPT_COLLISION,interactionType:v.ZOOM,interactionFactor:0,interactionStartCamera:null,interactionDirection:null,tiltMode:j.TUMBLE},this.sphere=P(),this.hasPickPoint=!1}get intersectionHelper(){return this.view.sceneIntersectionHelper}begin(t){if(!this.active)return;a(this.dragBeginPoint,t),k(this.startCamera,t,this.normalizedAnchorPoint);const r=u(this.view.spatialReference),e=w(this.intersectionHelper,this.startCamera,t,!1,r);if(this.navMode=A(this.startCamera,t,e.hasGeometryIntersection,r),this.navMode===D.Horizontal)this.hasPickPoint=!!e.scenePickPoint,this.pickPoint=e.scenePickPoint,this.sphere=e.sphere;else{let r;z(this.startCamera,t,this.tmpRay),o(this.tmpRay.direction,this.tmpRay.direction),this.view.camera.position.hasZ&&(r=Math.abs(this.view.camera.position.z));let e=i(M*r,O[0],O[1]);const s=this.view._stage.renderView.getMinimalDepthForArea(null,t[0],t[1],this.view.state.camera,S);e=e>s?s:e,this.hasPickPoint=!0,c(this.tmpRay.direction,this.tmpRay.direction,e),h(this.pickPoint,this.tmpRay.origin,this.tmpRay.direction)}this.constraintOptions.interactionStartCamera=this.startCamera}update(t){if(this.active){if(this.currentCamera.eye=this.startCamera.eye,this.currentCamera.center=this.startCamera.center,this.currentCamera.up=this.startCamera.up,this.navMode===D.Horizontal){m(this.tmpRayDir,this.currentCamera.center,this.currentCamera.eye);const i=p(this.tmpRayDir);k(this.currentCamera,t,this.tmpP0);const r=12*(this.normalizedAnchorPoint[1]-this.tmpP0[1]);let e=i*2**r;const s=this.view.state.constraints.minimumPoiDistance;if(r<0&&e<s&&(e=s),Math.abs(i-e)<1e-6)return;if(this.hasPickPoint&&e<i){const t=1-(1-e/i)*(1-this.sphere[3]/p(this.currentCamera.center));this.currentCamera.center=c(H,this.currentCamera.center,t)}c(this.tmpRayDir,this.tmpRayDir,-e/i),this.currentCamera.eye=h(H,this.currentCamera.center,this.tmpRayDir),this.constraintOptions.interactionFactor=f(this.dragBeginPoint,t),d(this.view,this.currentCamera,this.constraintOptions),this.hasPickPoint&&(U(this.sphere,this.currentCamera,this.dragBeginPoint,this.targetOnSphere),C(this.pickPoint,this.targetOnSphere,this.panAxisAngle),b(this.currentCamera,this.sphere,this.panAxisAngle))}else{const i=p(this.tmpRay.direction);k(this.currentCamera,t,this.tmpP0);const r=12*(this.normalizedAnchorPoint[1]-this.tmpP0[1]);let e=i*2**r;const s=this.view.state.constraints.minimumPoiDistance;if(r<0&&e<s&&(e=s),Math.abs(i-e)<1e-6)return;c(this.tmpRayDir,this.tmpRay.direction,1-e/i),this.currentCamera.eye=h(H,this.currentCamera.eye,this.tmpRayDir),this.currentCamera.center=h(H,this.currentCamera.center,this.tmpRayDir)}x(this.view,this.currentCamera)}}end(){this.active&&this.finishController()}};t([e({constructOnly:!0})],B.prototype,"view",void 0),B=t([s("esri.views.3d.state.controllers.global.ZoomController")],B);const H=l();export{B as ZoomController};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../../../chunks/tslib.es6.js";import i from"../../../../../core/has.js";import{Milliseconds as e}from"../../../../../core/time.js";import"../../../../../core/Logger.js";import"../../../../../core/accessorSupport/ensureType.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/accessorSupport/set.js";import{subclass as r}from"../../../../../core/accessorSupport/decorators/subclass.js";import{g as s,l as o,f as a,a as n,b as m,h as c,n as h}from"../../../../../chunks/vec3.js";import{c as p}from"../../../../../chunks/vec3f64.js";import{getReferenceEllipsoid as l}from"../../../../../geometry/projectionEllipsoid.js";import{c as f}from"../../../../../chunks/sphere.js";import{applyAll as y}from"../../../camera/constraintUtils.js";import{ConstraintTypes as u,InteractionType as g,TiltMode as w}from"../../../camera/constraintUtils/common.js";import{PointToPointAnimationController as d}from"../PointToPointAnimationController.js";import{decideNavigationMode as j,NavigationMode as C,panToPosition as D}from"../../utils/navigationUtils.js";import{fromScreenAtEye as v}from"../../../support/geometryUtils/ray.js";import{intersectScreen as R}from"../../../support/geometryUtils/sphere.js";import b from"../../../webgl-engine/lib/Camera.js";import{newIntersector as S}from"../../../webgl-engine/lib/Intersector.js";import{outExpo as L}from"../../../../animation/easing.js";import{applySurfaceCollisionConstraint as M}from"../../../camera/constraintUtils/surfaceCollision.js";const z=.6,O=4,U=12,V=60,x=20;let _=class extends d{constructor(){super(...arguments),this.zoomLocation=p(),this.tmpCamera=new b,this.tmpViewDir=p(),this.tmpRayDir={origin:p(),direction:p()},this.targetOnSphere=p(),this.tmpCenter=p(),this.constraintOptions={selection:u.ALL_EXCEPT_COLLISION,interactionType:g.ZOOM,interactionFactor:null,interactionStartCamera:new b,interactionDirection:null,tiltMode:w.TUMBLE},this.sphere=f()}initialize(){this.intersector=S(this.view.state.viewingMode)}zoomStep(t,i){if(!this.active)return;const e=this.view.state,{interactionStartCamera:r}=this.constraintOptions;this.animation.finished?r.copyFrom(e.camera):this.animation.cameraAt(1,r);let o=!1,a=!1;this.intersectionHelper.intersectScreen(i,this.zoomLocation)&&(o=t>0,a=!0),this.tmpCamera.copyFrom(e.camera),o?this.intersectionHelper.intersectRay(this.tmpCamera.ray,this.intersector,this.tmpCenter)&&(this.tmpCamera.center=this.tmpCenter):this.intersectionHelper.intersectRay(this.tmpCamera.ray,this.intersector,this.zoomLocation)?this.tmpCamera.center=this.zoomLocation:s(this.zoomLocation,this.tmpCamera.center),this._updateCamera(this.tmpCamera,t,this.zoomLocation,i,a),this.begin(this.tmpCamera)}animationSettings(){return{apex:null,duration:e(600),easing:L}}_updateCamera(t,e,r,s,p){const f=l(this.view.spatialReference);if(j(t,s,p,f)===C.Horizontal||i("disable-feature:context-navigation")){let i=z**e;this.sphere[3]=o(r),a(this.tmpViewDir,t.center,t.eye);const h=o(this.tmpViewDir);let p=h*i;if(i<=1&&p<O&&(p=O,i=p/h),Math.abs(h-p)<1e-6)return;const l=o(t.center);if(this.sphere[3]!==l){const e=this.sphere[3]+i*(l-this.sphere[3]);t.center=n(F,t.center,e/l)}n(this.tmpViewDir,this.tmpViewDir,-i),t.eye=m(F,t.center,this.tmpViewDir),y(this.view,t,this.constraintOptions),c(r,t.center)>1e-12&&R(this.sphere,t,s,this.targetOnSphere)&&D(this.sphere,t,r,this.targetOnSphere,this.view.camera.heading,this.view.camera.tilt,!0)}else{let i=z**Math.abs(e);const o=e>0?1:-1;let a;v(t,s,this.tmpRayDir),h(this.tmpRayDir.direction,this.tmpRayDir.direction),this.view.camera.position.hasZ&&(a=Math.abs(this.view.camera.position.z));let c=Math.max(U*a,x);const p=this.view._stage.renderView.getMinimalDepthForArea(null,s[0],s[1],this.view.state.camera,V);c=c>p?p:c,n(this.tmpRayDir.direction,this.tmpRayDir.direction,c),m(r,this.tmpRayDir.origin,this.tmpRayDir.direction);let l=c*i;const f=Math.max(O,1.01*t.nearFar[0]);if(e>0&&l<f&&(l=f,i=l/c),Math.abs(c-l)<1e-6)return;n(this.tmpRayDir.direction,this.tmpRayDir.direction,o*(1-i)),t.eye=m(F,t.eye,this.tmpRayDir.direction),t.center=m(F,t.center,this.tmpRayDir.direction)}M(this.view,t)}};_=t([r("esri.views.3d.state.controllers.global.ZoomStepController")],_);const F=p();export{_ as ZoomStepController};
5
+ import{_ as t}from"../../../../../chunks/tslib.es6.js";import{Milliseconds as i}from"../../../../../core/time.js";import"../../../../../core/Logger.js";import"../../../../../core/accessorSupport/ensureType.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import"../../../../../core/accessorSupport/set.js";import{subclass as e}from"../../../../../core/accessorSupport/decorators/subclass.js";import{g as r,l as s,f as o,a,b as n,h as m,n as c}from"../../../../../chunks/vec3.js";import{c as h}from"../../../../../chunks/vec3f64.js";import{getReferenceEllipsoid as p}from"../../../../../geometry/projectionEllipsoid.js";import{c as l}from"../../../../../chunks/sphere.js";import{applyAll as y}from"../../../camera/constraintUtils.js";import{ConstraintTypes as f,InteractionType as u,TiltMode as g}from"../../../camera/constraintUtils/common.js";import{PointToPointAnimationController as w}from"../PointToPointAnimationController.js";import{decideNavigationMode as j,NavigationMode as d,panToPosition as C}from"../../utils/navigationUtils.js";import{fromScreenAtEye as D}from"../../../support/geometryUtils/ray.js";import{intersectScreen as v}from"../../../support/geometryUtils/sphere.js";import R from"../../../webgl-engine/lib/Camera.js";import{newIntersector as b}from"../../../webgl-engine/lib/Intersector.js";import{outExpo as S}from"../../../../animation/easing.js";import{applySurfaceCollisionConstraint as L}from"../../../camera/constraintUtils/surfaceCollision.js";const M=.6,z=4,O=12,U=60,V=20;let _=class extends w{constructor(){super(...arguments),this.zoomLocation=h(),this.tmpCamera=new R,this.tmpViewDir=h(),this.tmpRayDir={origin:h(),direction:h()},this.targetOnSphere=h(),this.tmpCenter=h(),this.constraintOptions={selection:f.ALL_EXCEPT_COLLISION,interactionType:u.ZOOM,interactionFactor:null,interactionStartCamera:new R,interactionDirection:null,tiltMode:g.TUMBLE},this.sphere=l()}initialize(){this.intersector=b(this.view.state.viewingMode)}zoomStep(t,i){if(!this.active)return;const e=this.view.state,{interactionStartCamera:s}=this.constraintOptions;this.animation.finished?s.copyFrom(e.camera):this.animation.cameraAt(1,s);let o=!1,a=!1;this.intersectionHelper.intersectScreen(i,this.zoomLocation)&&(o=t>0,a=!0),this.tmpCamera.copyFrom(e.camera),o?this.intersectionHelper.intersectRay(this.tmpCamera.ray,this.intersector,this.tmpCenter)&&(this.tmpCamera.center=this.tmpCenter):this.intersectionHelper.intersectRay(this.tmpCamera.ray,this.intersector,this.zoomLocation)?this.tmpCamera.center=this.zoomLocation:r(this.zoomLocation,this.tmpCamera.center),this._updateCamera(this.tmpCamera,t,this.zoomLocation,i,a),this.begin(this.tmpCamera)}animationSettings(){return{apex:null,duration:i(600),easing:S}}_updateCamera(t,i,e,r,h){const l=p(this.view.spatialReference);if(j(t,r,h,l)===d.Horizontal){let c=M**i;this.sphere[3]=s(e),o(this.tmpViewDir,t.center,t.eye);const h=s(this.tmpViewDir);let p=h*c;if(c<=1&&p<z&&(p=z,c=p/h),Math.abs(h-p)<1e-6)return;const l=s(t.center);if(this.sphere[3]!==l){const i=this.sphere[3]+c*(l-this.sphere[3]);t.center=a(x,t.center,i/l)}a(this.tmpViewDir,this.tmpViewDir,-c),t.eye=n(x,t.center,this.tmpViewDir),y(this.view,t,this.constraintOptions),m(e,t.center)>1e-12&&v(this.sphere,t,r,this.targetOnSphere)&&C(this.sphere,t,e,this.targetOnSphere,this.view.camera.heading,this.view.camera.tilt,!0)}else{let s=M**Math.abs(i);const o=i>0?1:-1;let m;D(t,r,this.tmpRayDir),c(this.tmpRayDir.direction,this.tmpRayDir.direction),this.view.camera.position.hasZ&&(m=Math.abs(this.view.camera.position.z));let h=Math.max(O*m,V);const p=this.view._stage.renderView.getMinimalDepthForArea(null,r[0],r[1],this.view.state.camera,U);h=h>p?p:h,a(this.tmpRayDir.direction,this.tmpRayDir.direction,h),n(e,this.tmpRayDir.origin,this.tmpRayDir.direction);let l=h*s;const y=Math.max(z,1.01*t.nearFar[0]);if(i>0&&l<y&&(l=y,s=l/h),Math.abs(h-l)<1e-6)return;a(this.tmpRayDir.direction,this.tmpRayDir.direction,o*(1-s)),t.eye=n(x,t.eye,this.tmpRayDir.direction),t.center=n(x,t.center,this.tmpRayDir.direction)}L(this.view,t)}};_=t([e("esri.views.3d.state.controllers.global.ZoomStepController")],_);const x=h();export{_ as ZoomStepController};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../../../chunks/tslib.es6.js";import{asinClamped as i}from"../../../../../core/mathUtils.js";import{createScreenPointArray as e,screenPointObjectToArray as n}from"../../../../../core/screenUtils.js";import{property as o}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import"../../../../../core/accessorSupport/ensureType.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators/subclass.js";import{o as r,g as a,d as m,a as h,f as c,n as l,b as p}from"../../../../../chunks/vec3.js";import{c as u,f as d}from"../../../../../chunks/vec3f64.js";import{wrapAxisAngle as g}from"../../../../../geometry/support/axisAngle.js";import{create as C,fromNormalAndOffset as v,setOffsetFromPoint as M,negate as f,normal as w}from"../../../../../geometry/support/plane.js";import{disableContextNavigation as b}from"../../../../../support/featureFlags.js";import{pixelDistanceToInteractionFactor as S,applyAll as V}from"../../../camera/constraintUtils.js";import{ConstraintTypes as E,InteractionType as P,TiltMode as j}from"../../../camera/constraintUtils/common.js";import{ExponentialFalloff as z}from"../../../input/util.js";import{InteractiveController as H}from"../InteractiveController.js";import{PanPlanarMomentumController as O}from"../momentum/PanPlanarMomentumController.js";import{RotationMomentumController as y}from"../momentum/RotationMomentumController.js";import{ZoomPlanarMomentumController as F}from"../momentum/ZoomPlanarMomentumController.js";import{NavigationMode as T,centroid as A,applyZoomToPoint as L,applyPanPlanar as x,normalizeRotationDelta as R,applyRotation as U,intersectPlaneFromScreenPointAtEye as D}from"../../utils/navigationUtils.js";import N from"../../../webgl-engine/lib/Camera.js";import{PanPlanarMomentumEstimator as _}from"../../../../navigation/PanPlanarMomentumEstimator.js";import{RotationMomentumEstimator as k}from"../../../../navigation/RotationMomentumEstimator.js";import{ZoomMomentumEstimator as I}from"../../../../navigation/ZoomMomentumEstimator.js";const G=d(0,0,1),Z={ELEVATION_THRESHOLD:3e4,ANGLE_THRESHOLD:16/180*Math.PI},B=80;let W=class extends H{constructor(t){super(t),this.view=null,this.rotationValueSmooth=new z(.05),this.scalingValueSmooth=new z(.05),this.planeHorizontal=C(),this.planeVertical=C(),this.rotationMomentumEstimator=new k,this.panMomentumEstimator=new _(300,12,.9),this.zoomMomentumEstimator=new I,this.beginCenter=u(),this.tmpPoints=[],this.beginCenterScreen=e(),this.tmpCentroid3d=u(),this.tmpCentroid2d=e(),this.tmp2d=e(),this.constraintOptions={selection:E.ALL,interactionType:P.NONE,interactionFactor:0,interactionStartCamera:new N,interactionDirection:null,tiltMode:j.TUMBLE}}get intersectionHelper(){return this.view.sceneIntersectionHelper}begin(t){if(!this.active)return;const e=this.view.navigation.momentumEnabled;this.zoomMomentumEstimator.enabled=e,this.rotationMomentumEstimator.enabled=e,this.panMomentumEstimator.enabled=e,this.beginRadius=t.radius,this.pointerCount=t.pointers.size,this.beginAngle=t.angle,this.rotationValueSmooth.reset(),this.scalingValueSmooth.reset(),n(t.center,this.beginCenterScreen),v(G,0,this.planeHorizontal);const o=u();this.intersectionHelper.intersectScreenFreePointFallback(this.beginCenterScreen,o);const s=u();r(s,this.startCamera.viewForward);const d=u();a(d,G);const g=m(s,d),C=i(g<0?-g:g);if(this.panMode=C>=Z.ANGLE_THRESHOLD?T.Horizontal:T.Vertical,M(this.planeHorizontal,o,this.planeHorizontal),this.startCamera.aboveGround||f(this.planeHorizontal,this.planeHorizontal),this.panMode===T.Vertical){if(h(d,d,g),c(this.planeVertical,s,d),l(this.planeVertical,this.planeVertical),M(this.planeVertical,o,this.planeVertical),!b()){const t=u(),i=u(),e=u();c(t,o,this.currentCamera.eye),l(t,t);const n=5*Math.max(Math.abs(this.view.camera.position.z),50),s=this.view._stage.renderView.getMinimalDepthForArea(this.view.getVoxelWasmPerSceneView(),this.beginCenterScreen[0],this.beginCenterScreen[1],this.view.state.camera,B),r=s?Math.min(s,n):n;a(e,p(i,this.currentCamera.eye,h(i,t,r))),this.planeVertical[3]=-m(this.planeVertical,e)}this.computePlanePoints(t.pointers,this.planeVertical,this.startCamera,this.tmpPoints),A(this.tmpPoints,this.beginCenter)}else this.computePlanePoints(t.pointers,this.planeHorizontal,this.startCamera,this.tmpPoints),A(this.tmpPoints,this.beginCenter);this.constraintOptions.interactionStartCamera.copyFrom(this.startCamera)}update(t){if(!this.active)return;this.currentCamera.copyFrom(this.startCamera);const i=t.pointers.size>1,e=this.panMode===T.Horizontal?this.planeHorizontal:this.planeVertical,o=this.beginCenter;if(i){const i=this.beginRadius/t.radius,e=.001875*Math.min(Math.max(t.radius,40),120);this.scalingValueSmooth.gain=e,this.scalingValueSmooth.update(i),L(this.currentCamera,o,this.scalingValueSmooth.value,this.view.state.constraints.minimumPoiDistance),this.zoomMomentumEstimator.add(this.scalingValueSmooth.value,.001*t.timestamp),this.constraintOptions.interactionType=P.ZOOM,this.constraintOptions.interactionFactor=S(Math.abs(t.radius-this.beginRadius)),V(this.view,this.currentCamera,this.constraintOptions)}if(this.computePlanePoints(t.pointers,e,this.currentCamera,this.tmpPoints),A(this.tmpPoints,this.tmpCentroid3d),n(t.center,this.tmpCentroid2d),x(this.currentCamera,o,this.tmpCentroid3d),this.panMomentumEstimator.add(this.tmpCentroid2d,this.tmpCentroid3d,.001*t.timestamp),this.constraintOptions.interactionType=P.PAN,this.constraintOptions.interactionFactor=S(this.beginCenterScreen,this.tmpCentroid2d),V(this.view,this.currentCamera,this.constraintOptions),i){const i=this.planeHorizontal,e=o,n=this.rotationValueSmooth.value,s=n+R(t.angle-n),r=.00125*Math.min(Math.max(t.radius,40),120);this.rotationValueSmooth.gain=r,this.rotationValueSmooth.update(s);const a=this.rotationValueSmooth.value-this.beginAngle;this.rotationMomentumEstimator.add(a,.001*t.timestamp),U(this.currentCamera,e,g(i,a)),this.constraintOptions.interactionType=P.TUMBLE,this.constraintOptions.interactionFactor=S(Math.abs(t.radius*a)),V(this.view,this.currentCamera,this.constraintOptions)}}end(t){t.pointers.size===this.pointerCount&&this.update(t),this.finishController();const i=this.zoomMomentumEstimator.evaluateMomentum();if(i)return new F({view:this.view,momentum:i,zoomCenter:this.beginCenter});const e=this.rotationMomentumEstimator.evaluateMomentum();if(e)return new y({view:this.view,momentum:e,center:this.beginCenter,axis:w(this.planeHorizontal)});const n=this.panMomentumEstimator.evaluateMomentum();return n?new O({view:this.view,momentum:n}):null}computePlanePoints(t,i,e,n){n.length=t.size;const o=this.tmp2d;let s=0;return t.forEach((t=>{o[0]=t.x,o[1]=t.y,void 0===n[s]&&(n[s]=u()),D(i,e,o,n[s]),s+=1})),n}};t([o({constructOnly:!0})],W.prototype,"view",void 0),W=t([s("esri.views.3d.state.controllers.local.PinchAndPanController")],W);export{W as PinchAndPanController};
5
+ import{_ as t}from"../../../../../chunks/tslib.es6.js";import{asinClamped as i}from"../../../../../core/mathUtils.js";import{createScreenPointArray as e,screenPointObjectToArray as n}from"../../../../../core/screenUtils.js";import{property as o}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import"../../../../../core/accessorSupport/ensureType.js";import{subclass as s}from"../../../../../core/accessorSupport/decorators/subclass.js";import{o as r,g as a,d as m,a as h,f as c,n as l,b as p}from"../../../../../chunks/vec3.js";import{c as u,f as d}from"../../../../../chunks/vec3f64.js";import{wrapAxisAngle as C}from"../../../../../geometry/support/axisAngle.js";import{create as g,fromNormalAndOffset as v,setOffsetFromPoint as M,negate as f,normal as w}from"../../../../../geometry/support/plane.js";import{pixelDistanceToInteractionFactor as b,applyAll as S}from"../../../camera/constraintUtils.js";import{ConstraintTypes as V,InteractionType as E,TiltMode as P}from"../../../camera/constraintUtils/common.js";import{ExponentialFalloff as j}from"../../../input/util.js";import{InteractiveController as z}from"../InteractiveController.js";import{PanPlanarMomentumController as H}from"../momentum/PanPlanarMomentumController.js";import{RotationMomentumController as O}from"../momentum/RotationMomentumController.js";import{ZoomPlanarMomentumController as y}from"../momentum/ZoomPlanarMomentumController.js";import{NavigationMode as T,centroid as A,applyZoomToPoint as F,applyPanPlanar as L,normalizeRotationDelta as x,applyRotation as R,intersectPlaneFromScreenPointAtEye as U}from"../../utils/navigationUtils.js";import D from"../../../webgl-engine/lib/Camera.js";import{PanPlanarMomentumEstimator as N}from"../../../../navigation/PanPlanarMomentumEstimator.js";import{RotationMomentumEstimator as _}from"../../../../navigation/RotationMomentumEstimator.js";import{ZoomMomentumEstimator as k}from"../../../../navigation/ZoomMomentumEstimator.js";const I=d(0,0,1),G={ELEVATION_THRESHOLD:3e4,ANGLE_THRESHOLD:16/180*Math.PI},Z=80;let B=class extends z{constructor(t){super(t),this.view=null,this.rotationValueSmooth=new j(.05),this.scalingValueSmooth=new j(.05),this.planeHorizontal=g(),this.planeVertical=g(),this.rotationMomentumEstimator=new _,this.panMomentumEstimator=new N(300,12,.9),this.zoomMomentumEstimator=new k,this.beginCenter=u(),this.tmpPoints=[],this.beginCenterScreen=e(),this.tmpCentroid3d=u(),this.tmpCentroid2d=e(),this.tmp2d=e(),this.constraintOptions={selection:V.ALL,interactionType:E.NONE,interactionFactor:0,interactionStartCamera:new D,interactionDirection:null,tiltMode:P.TUMBLE}}get intersectionHelper(){return this.view.sceneIntersectionHelper}begin(t){if(!this.active)return;const e=this.view.navigation.momentumEnabled;this.zoomMomentumEstimator.enabled=e,this.rotationMomentumEstimator.enabled=e,this.panMomentumEstimator.enabled=e,this.beginRadius=t.radius,this.pointerCount=t.pointers.size,this.beginAngle=t.angle,this.rotationValueSmooth.reset(),this.scalingValueSmooth.reset(),n(t.center,this.beginCenterScreen),v(I,0,this.planeHorizontal);const o=u();this.intersectionHelper.intersectScreenFreePointFallback(this.beginCenterScreen,o);const s=u();r(s,this.startCamera.viewForward);const d=u();a(d,I);const C=m(s,d),g=i(C<0?-C:C);if(this.panMode=g>=G.ANGLE_THRESHOLD?T.Horizontal:T.Vertical,M(this.planeHorizontal,o,this.planeHorizontal),this.startCamera.aboveGround||f(this.planeHorizontal,this.planeHorizontal),this.panMode===T.Vertical){h(d,d,C),c(this.planeVertical,s,d),l(this.planeVertical,this.planeVertical),M(this.planeVertical,o,this.planeVertical);const i=u(),e=u(),n=u();c(i,o,this.currentCamera.eye),l(i,i);const r=5*Math.max(Math.abs(this.view.camera.position.z),50),g=this.view._stage.renderView.getMinimalDepthForArea(this.view.getVoxelWasmPerSceneView(),this.beginCenterScreen[0],this.beginCenterScreen[1],this.view.state.camera,Z),v=g?Math.min(g,r):r;a(n,p(e,this.currentCamera.eye,h(e,i,v))),this.planeVertical[3]=-m(this.planeVertical,n),this.computePlanePoints(t.pointers,this.planeVertical,this.startCamera,this.tmpPoints),A(this.tmpPoints,this.beginCenter)}else this.computePlanePoints(t.pointers,this.planeHorizontal,this.startCamera,this.tmpPoints),A(this.tmpPoints,this.beginCenter);this.constraintOptions.interactionStartCamera.copyFrom(this.startCamera)}update(t){if(!this.active)return;this.currentCamera.copyFrom(this.startCamera);const i=t.pointers.size>1,e=this.panMode===T.Horizontal?this.planeHorizontal:this.planeVertical,o=this.beginCenter;if(i){const i=this.beginRadius/t.radius,e=.001875*Math.min(Math.max(t.radius,40),120);this.scalingValueSmooth.gain=e,this.scalingValueSmooth.update(i),F(this.currentCamera,o,this.scalingValueSmooth.value,this.view.state.constraints.minimumPoiDistance),this.zoomMomentumEstimator.add(this.scalingValueSmooth.value,.001*t.timestamp),this.constraintOptions.interactionType=E.ZOOM,this.constraintOptions.interactionFactor=b(Math.abs(t.radius-this.beginRadius)),S(this.view,this.currentCamera,this.constraintOptions)}if(this.computePlanePoints(t.pointers,e,this.currentCamera,this.tmpPoints),A(this.tmpPoints,this.tmpCentroid3d),n(t.center,this.tmpCentroid2d),L(this.currentCamera,o,this.tmpCentroid3d),this.panMomentumEstimator.add(this.tmpCentroid2d,this.tmpCentroid3d,.001*t.timestamp),this.constraintOptions.interactionType=E.PAN,this.constraintOptions.interactionFactor=b(this.beginCenterScreen,this.tmpCentroid2d),S(this.view,this.currentCamera,this.constraintOptions),i){const i=this.planeHorizontal,e=o,n=this.rotationValueSmooth.value,s=n+x(t.angle-n),r=.00125*Math.min(Math.max(t.radius,40),120);this.rotationValueSmooth.gain=r,this.rotationValueSmooth.update(s);const a=this.rotationValueSmooth.value-this.beginAngle;this.rotationMomentumEstimator.add(a,.001*t.timestamp),R(this.currentCamera,e,C(i,a)),this.constraintOptions.interactionType=E.TUMBLE,this.constraintOptions.interactionFactor=b(Math.abs(t.radius*a)),S(this.view,this.currentCamera,this.constraintOptions)}}end(t){t.pointers.size===this.pointerCount&&this.update(t),this.finishController();const i=this.zoomMomentumEstimator.evaluateMomentum();if(i)return new y({view:this.view,momentum:i,zoomCenter:this.beginCenter});const e=this.rotationMomentumEstimator.evaluateMomentum();if(e)return new O({view:this.view,momentum:e,center:this.beginCenter,axis:w(this.planeHorizontal)});const n=this.panMomentumEstimator.evaluateMomentum();return n?new H({view:this.view,momentum:n}):null}computePlanePoints(t,i,e,n){n.length=t.size;const o=this.tmp2d;let s=0;return t.forEach((t=>{o[0]=t.x,o[1]=t.y,void 0===n[s]&&(n[s]=u()),U(i,e,o,n[s]),s+=1})),n}};t([o({constructOnly:!0})],B.prototype,"view",void 0),B=t([s("esri.views.3d.state.controllers.local.PinchAndPanController")],B);export{B as PinchAndPanController};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../../../chunks/tslib.es6.js";import{Milliseconds as e}from"../../../../../core/time.js";import"../../../../../core/Logger.js";import"../../../../../core/accessorSupport/ensureType.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import"../../../../../core/accessorSupport/set.js";import{subclass as i}from"../../../../../core/accessorSupport/decorators/subclass.js";import{g as o,f as r,l as s,n as a,b as n,a as m,e as c}from"../../../../../chunks/vec3.js";import{c as p}from"../../../../../chunks/vec3f64.js";import{disableContextNavigation as h}from"../../../../../support/featureFlags.js";import{applyAll as l}from"../../../camera/constraintUtils.js";import{ConstraintTypes as C,InteractionType as u,TiltMode as f}from"../../../camera/constraintUtils/common.js";import{PointToPointAnimationController as y}from"../PointToPointAnimationController.js";import j from"../../../webgl-engine/lib/Camera.js";import{newIntersector as g}from"../../../webgl-engine/lib/Intersector.js";import{outExpo as w}from"../../../../animation/easing.js";const v=.6,L=4,b=60,d=14,z=20;let M=class extends y{constructor(){super(...arguments),this.zoomLocation=p(),this.tmpCamera=new j,this.tmpRayDir=p(),this.tmpCenter=p(),this.constraintOptions={selection:C.ALL,interactionType:u.ZOOM,interactionFactor:null,interactionStartCamera:new j,interactionDirection:null,tiltMode:f.TUMBLE}}zoomStep(t,e){if(!this.active)return;const i=this.view.state,{interactionStartCamera:c}=this.constraintOptions;this.animation.finished?c.copyFrom(i.camera):this.animation.cameraAt(1,c),this.tmpCamera.copyFrom(i.camera);const l=g(this.view.state.viewingMode);t>0?(this.intersectionHelper.intersectScreenFreePointFallback(e,this.zoomLocation),this.intersectionHelper.intersectRay(this.tmpCamera.ray,l,this.tmpCenter)&&(this.tmpCamera.center=this.tmpCenter)):this.intersectionHelper.intersectRay(this.tmpCamera.ray,l,this.zoomLocation)?this.tmpCamera.center=this.zoomLocation:o(this.zoomLocation,this.tmpCamera.center);const C=v**t;if(!h()){let t=this.view._stage.renderView.getMinimalDepthForArea(this.view.getVoxelWasmPerSceneView(),e[0],e[1],this.view.state.camera,b);const i=Math.max(d*Math.abs(this.view.camera.position.z),z);if(t=t?Math.min(t,i):i,t){const e=p();r(e,this.zoomLocation,this.tmpCamera.eye),t<s(e)&&(a(e,e),n(this.zoomLocation,this.tmpCamera.eye,m(e,e,t)))}}this._updateCamera(this.tmpCamera,C,this.zoomLocation),this.begin(this.tmpCamera)}animationSettings(){return{apex:null,duration:e(600),easing:w}}_updateCamera(t,e,i){r(this.tmpRayDir,i,t.eye);const o=s(this.tmpRayDir);let a=o*e;const n=e<=1,p=Math.max(L,1.01*t.nearFar[0]);n&&a<p&&(a=p,e=a/o),Math.abs(o-a)<1e-6||(m(this.tmpRayDir,this.tmpRayDir,e),t.eye=r(S,i,this.tmpRayDir),t.center=c(S,t.center,i,1-e),l(this.view,t,this.constraintOptions))}};M=t([i("esri.views.3d.state.controllers.local.ZoomStepController")],M);const S=p();export{M as ZoomStepController};
5
+ import{_ as t}from"../../../../../chunks/tslib.es6.js";import{Milliseconds as e}from"../../../../../core/time.js";import"../../../../../core/Logger.js";import"../../../../../core/accessorSupport/ensureType.js";import"../../../../../core/arrayUtils.js";import"../../../../../core/has.js";import"../../../../../core/accessorSupport/set.js";import{subclass as i}from"../../../../../core/accessorSupport/decorators/subclass.js";import{g as o,f as s,l as r,n as a,b as n,a as m,e as c}from"../../../../../chunks/vec3.js";import{c as p}from"../../../../../chunks/vec3f64.js";import{applyAll as h}from"../../../camera/constraintUtils.js";import{ConstraintTypes as l,InteractionType as C,TiltMode as y}from"../../../camera/constraintUtils/common.js";import{PointToPointAnimationController as u}from"../PointToPointAnimationController.js";import f from"../../../webgl-engine/lib/Camera.js";import{newIntersector as j}from"../../../webgl-engine/lib/Intersector.js";import{outExpo as g}from"../../../../animation/easing.js";const w=.6,v=4,L=60,b=14,d=20;let z=class extends u{constructor(){super(...arguments),this.zoomLocation=p(),this.tmpCamera=new f,this.tmpRayDir=p(),this.tmpCenter=p(),this.constraintOptions={selection:l.ALL,interactionType:C.ZOOM,interactionFactor:null,interactionStartCamera:new f,interactionDirection:null,tiltMode:y.TUMBLE}}zoomStep(t,e){if(!this.active)return;const i=this.view.state,{interactionStartCamera:c}=this.constraintOptions;this.animation.finished?c.copyFrom(i.camera):this.animation.cameraAt(1,c),this.tmpCamera.copyFrom(i.camera);const h=j(this.view.state.viewingMode);t>0?(this.intersectionHelper.intersectScreenFreePointFallback(e,this.zoomLocation),this.intersectionHelper.intersectRay(this.tmpCamera.ray,h,this.tmpCenter)&&(this.tmpCamera.center=this.tmpCenter)):this.intersectionHelper.intersectRay(this.tmpCamera.ray,h,this.zoomLocation)?this.tmpCamera.center=this.zoomLocation:o(this.zoomLocation,this.tmpCamera.center);const l=w**t;let C=this.view._stage.renderView.getMinimalDepthForArea(this.view.getVoxelWasmPerSceneView(),e[0],e[1],this.view.state.camera,L);const y=Math.max(b*Math.abs(this.view.camera.position.z),d);if(C=C?Math.min(C,y):y,C){const t=p();s(t,this.zoomLocation,this.tmpCamera.eye),C<r(t)&&(a(t,t),n(this.zoomLocation,this.tmpCamera.eye,m(t,t,C)))}this._updateCamera(this.tmpCamera,l,this.zoomLocation),this.begin(this.tmpCamera)}animationSettings(){return{apex:null,duration:e(600),easing:g}}_updateCamera(t,e,i){s(this.tmpRayDir,i,t.eye);const o=r(this.tmpRayDir);let a=o*e;const n=e<=1,p=Math.max(v,1.01*t.nearFar[0]);n&&a<p&&(a=p,e=a/o),Math.abs(o-a)<1e-6||(m(this.tmpRayDir,this.tmpRayDir,e),t.eye=s(M,i,this.tmpRayDir),t.center=c(M,t.center,i,1-e),h(this.view,t,this.constraintOptions))}};z=t([i("esri.views.3d.state.controllers.local.ZoomStepController")],z);const M=p();export{z as ZoomStepController};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as E}from"../../../chunks/tslib.es6.js";import _ from"../../../core/Accessor.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as S}from"../../../core/accessorSupport/decorators/subclass.js";let I=class extends _{constructor(){super(...arguments),this.SCENEVIEW_HITTEST_RETURN_INTERSECTOR=!1,this.SCENEVIEW_LOCKING_LOG=!1,this.HIGHLIGHTS_GRID_OPTIMIZATION_ENABLED=!0,this.HIGHLIGHTS_PROFILE_TO_CONSOLE=!1,this.DECONFLICTOR_SHOW_VISIBLE=!1,this.DECONFLICTOR_SHOW_INVISIBLE=!1,this.DECONFLICTOR_SHOW_GRID=!1,this.LABELS_SHOW_BORDER=!1,this.OVERLAY_DRAW_DEBUG_TEXTURE=!1,this.OVERLAY_SHOW_CENTER=!1,this.SHOW_POI=!1,this.TESTS_DISABLE_OPTIMIZATIONS=!1,this.TESTS_DISABLE_FAST_UPDATES=!1,this.DRAW_MESH_GEOMETRY_NORMALS=!1,this.FEATURE_TILE_FETCH_SHOW_TILES=!1,this.FEATURE_TILE_TREE_SHOW_TILES=!1,this.TERRAIN_TILE_TREE_SHOW_TILES=!1,this.I3S_TREE_SHOW_TILES=!1,this.I3S_SHOW_MODIFICATIONS=!1,this.LOD_INSTANCE_RENDERER_DISABLE_UPDATES=!1,this.LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL=!1,this.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES=!1,this.LINE_WIREFRAMES=!1}};E([o()],I.prototype,"SCENEVIEW_HITTEST_RETURN_INTERSECTOR",void 0),E([o()],I.prototype,"SCENEVIEW_LOCKING_LOG",void 0),E([o()],I.prototype,"HIGHLIGHTS_GRID_OPTIMIZATION_ENABLED",void 0),E([o()],I.prototype,"HIGHLIGHTS_PROFILE_TO_CONSOLE",void 0),E([o()],I.prototype,"DECONFLICTOR_SHOW_VISIBLE",void 0),E([o()],I.prototype,"DECONFLICTOR_SHOW_INVISIBLE",void 0),E([o()],I.prototype,"DECONFLICTOR_SHOW_GRID",void 0),E([o()],I.prototype,"LABELS_SHOW_BORDER",void 0),E([o()],I.prototype,"OVERLAY_DRAW_DEBUG_TEXTURE",void 0),E([o()],I.prototype,"OVERLAY_SHOW_CENTER",void 0),E([o()],I.prototype,"SHOW_POI",void 0),E([o()],I.prototype,"TESTS_DISABLE_OPTIMIZATIONS",void 0),E([o()],I.prototype,"TESTS_DISABLE_FAST_UPDATES",void 0),E([o()],I.prototype,"DRAW_MESH_GEOMETRY_NORMALS",void 0),E([o()],I.prototype,"FEATURE_TILE_FETCH_SHOW_TILES",void 0),E([o()],I.prototype,"FEATURE_TILE_TREE_SHOW_TILES",void 0),E([o()],I.prototype,"TERRAIN_TILE_TREE_SHOW_TILES",void 0),E([o()],I.prototype,"I3S_TREE_SHOW_TILES",void 0),E([o()],I.prototype,"I3S_SHOW_MODIFICATIONS",void 0),E([o()],I.prototype,"LOD_INSTANCE_RENDERER_DISABLE_UPDATES",void 0),E([o()],I.prototype,"LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL",void 0),E([o()],I.prototype,"EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES",void 0),E([o()],I.prototype,"LINE_WIREFRAMES",void 0),I=E([S("esri.views.3d.support.DebugFlags")],I);const T=new I;export{T as default};
5
+ import{_ as E}from"../../../chunks/tslib.es6.js";import _ from"../../../core/Accessor.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as S}from"../../../core/accessorSupport/decorators/subclass.js";let T=class extends _{constructor(){super(...arguments),this.SCENEVIEW_HITTEST_RETURN_INTERSECTOR=!1,this.SCENEVIEW_LOCKING_LOG=!1,this.HIGHLIGHTS_GRID_OPTIMIZATION_ENABLED=!0,this.HIGHLIGHTS_PROFILE_TO_CONSOLE=!1,this.DECONFLICTOR_SHOW_VISIBLE=!1,this.DECONFLICTOR_SHOW_INVISIBLE=!1,this.DECONFLICTOR_SHOW_GRID=!1,this.LABELS_SHOW_BORDER=!1,this.TEXT_SHOW_BASELINE=!1,this.TEXT_SHOW_BORDER=!1,this.OVERLAY_DRAW_DEBUG_TEXTURE=!1,this.OVERLAY_SHOW_CENTER=!1,this.SHOW_POI=!1,this.TESTS_DISABLE_OPTIMIZATIONS=!1,this.TESTS_DISABLE_FAST_UPDATES=!1,this.DRAW_MESH_GEOMETRY_NORMALS=!1,this.FEATURE_TILE_FETCH_SHOW_TILES=!1,this.FEATURE_TILE_TREE_SHOW_TILES=!1,this.TERRAIN_TILE_TREE_SHOW_TILES=!1,this.I3S_TREE_SHOW_TILES=!1,this.I3S_SHOW_MODIFICATIONS=!1,this.LOD_INSTANCE_RENDERER_DISABLE_UPDATES=!1,this.LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL=!1,this.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES=!1,this.LINE_WIREFRAMES=!1}};E([o()],T.prototype,"SCENEVIEW_HITTEST_RETURN_INTERSECTOR",void 0),E([o()],T.prototype,"SCENEVIEW_LOCKING_LOG",void 0),E([o()],T.prototype,"HIGHLIGHTS_GRID_OPTIMIZATION_ENABLED",void 0),E([o()],T.prototype,"HIGHLIGHTS_PROFILE_TO_CONSOLE",void 0),E([o()],T.prototype,"DECONFLICTOR_SHOW_VISIBLE",void 0),E([o()],T.prototype,"DECONFLICTOR_SHOW_INVISIBLE",void 0),E([o()],T.prototype,"DECONFLICTOR_SHOW_GRID",void 0),E([o()],T.prototype,"LABELS_SHOW_BORDER",void 0),E([o()],T.prototype,"TEXT_SHOW_BASELINE",void 0),E([o()],T.prototype,"TEXT_SHOW_BORDER",void 0),E([o()],T.prototype,"OVERLAY_DRAW_DEBUG_TEXTURE",void 0),E([o()],T.prototype,"OVERLAY_SHOW_CENTER",void 0),E([o()],T.prototype,"SHOW_POI",void 0),E([o()],T.prototype,"TESTS_DISABLE_OPTIMIZATIONS",void 0),E([o()],T.prototype,"TESTS_DISABLE_FAST_UPDATES",void 0),E([o()],T.prototype,"DRAW_MESH_GEOMETRY_NORMALS",void 0),E([o()],T.prototype,"FEATURE_TILE_FETCH_SHOW_TILES",void 0),E([o()],T.prototype,"FEATURE_TILE_TREE_SHOW_TILES",void 0),E([o()],T.prototype,"TERRAIN_TILE_TREE_SHOW_TILES",void 0),E([o()],T.prototype,"I3S_TREE_SHOW_TILES",void 0),E([o()],T.prototype,"I3S_SHOW_MODIFICATIONS",void 0),E([o()],T.prototype,"LOD_INSTANCE_RENDERER_DISABLE_UPDATES",void 0),E([o()],T.prototype,"LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL",void 0),E([o()],T.prototype,"EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES",void 0),E([o()],T.prototype,"LINE_WIREFRAMES",void 0),T=E([S("esri.views.3d.support.DebugFlags")],T);const I=new T;export{I as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{lerp as t,clamp as i}from"../../../core/mathUtils.js";import{i as e,r as n,o,g as a}from"../../../chunks/mat4.js";import{c as l}from"../../../chunks/mat4f64.js";import{s as r,e as c,m as s}from"../../../chunks/vec3.js";import{c as u,f as m,a as d}from"../../../chunks/vec3f64.js";import{ViewingMode as b}from"../../ViewingMode.js";import{S as g}from"../../../chunks/SunCalc.js";const h={local:{altitude:1500,ambientAtNight:.1,ambientAtNoon:.45,ambientAtTwilight:.2,directAtNoon:.65,directAtTwilight:.7},global:{altitude:8e5,ambient:.015,direct:.75},planarDirection:{localAltitude:1e4,globalAltitude:1e6,globalAngles:{azimuth:1.3*Math.PI,altitude:.6*Math.PI}}};function f(e,n,o,a,l){const s=n[2];r(a.ambient.color,1,1,1),a.ambient.intensity=h.global.ambient,r(a.direct.color,1,1,1),a.direct.intensity=h.global.direct;const u=i((Math.abs(s)-h.local.altitude)/(h.global.altitude-h.local.altitude),0,1);a.globalFactor=u;const m=g.getTimes(e,n[1],n[0]);if(u<1){const i=O(e,m,l);c(a.ambient.color,i.ambient.color,a.ambient.color,u),a.ambient.intensity=t(i.ambient.intensity,a.ambient.intensity,u),c(a.direct.color,i.direct.color,a.direct.color,u),a.direct.intensity=t(i.direct.intensity,a.direct.intensity,u)}a.noonFactor=x(e,m),p(e,n,o,a.direct.directionToLightSource)}function p(t,l,c,u){const m=P,d=e(M);if(c===b.Global)g.getPosition(t,0,0,m),r(u,0,0,-1),n(d,d,-m.azimuth),o(d,d,-m.altitude),s(u,u,d);else{const e=h.planarDirection,o=e.globalAngles,c=l[2];let b=(Math.abs(c)-e.localAltitude)/(e.globalAltitude-e.localAltitude);b=i(b,0,1),b<1?(g.getPosition(t,l[1],l[0],m),m.azimuth=(1-b)*m.azimuth+b*o.azimuth,m.altitude=(1-b)*m.altitude+b*o.altitude):(m.azimuth=o.azimuth,m.altitude=o.altitude),r(u,0,-1,0),a(d,d,-m.azimuth),n(d,d,-m.altitude),s(u,u,d)}}function A(t,i){if(i===b.Global)return!0;const e=h.planarDirection;return Math.abs(t)<e.localAltitude}function y(t,i,e,n,o){const a=t.getTime(),l=i.getTime()-a,r=Math.floor(l/e)+1,c=new Array(r);for(let s=0;s<r;++s)w.setTime(a+e*s),c[s]=u(),p(w,n,o,c[s]);return c}const N=m(.5773502691896258,-.5773502691896258,.5773502691896258);class T{constructor(){this.ambient={color:m(1,1,1),intensity:.55},this.direct={color:m(1,1,1),intensity:.55,directionToLightSource:d(N)},this.noonFactor=.5,this.globalFactor=0}}const M=l(),P={azimuth:0,altitude:0};function x(t,e){const n=t.valueOf();let o,a;e.polarException===g.PolarException.MIDNIGHT_SUN?(o=n-60*(t.getHours()+48)*60*1e3-60*t.getMinutes()*1e3,a=o+432e6):e.polarException===g.PolarException.POLAR_NIGHT?(o=n-2,a=n-1):(o=e.sunrise.valueOf(),a=e.sunset.valueOf());const l=o+(a-o)/2;return 1-i(Math.abs(n-l)/432e5,0,1)}function z(t){switch(t){case"disabled":case"sunny":return{direct:1,ambient:1};case"cloudy":return{direct:.8,ambient:1.1};case"rainy":return{direct:.4,ambient:1};case"foggy":return{direct:.3,ambient:1.6}}}function O(t,i,e){const n=t.valueOf();let o,a;i.polarException===g.PolarException.MIDNIGHT_SUN?(o=n-60*(t.getHours()+48)*60*1e3-60*t.getMinutes()*1e3,a=o+432e6):i.polarException===g.PolarException.POLAR_NIGHT?(o=n-2,a=n-1):(o=i.sunrise.valueOf(),a=i.sunset.valueOf());const l=a-o,r=o+l/2,c=l/4,s=r-c,u=r+c,d=.06*l,b=o-d/2,f=o+d/2,p=a-d/2,A=a+d/2,y=h.local,N=[.01,y.ambientAtNight],T=[.8,.8,1],M=[.01,.01,.01],P=[y.directAtTwilight,y.ambientAtTwilight],x=[1,.6,.5],O=[.8,.8,1],w=[.9*y.directAtNoon,y.ambientAtNoon],E=[1,.98,.98],I=[.98,.98,1],j=[y.directAtNoon,y.ambientAtNoon],D=[1,1,1],G=[1,1,1],H=w,S=E,k=I,F=P,L=x,_=O;let U,R,C=[0,0],V=[0,0,0],q=[0,0,0];n<b||n>A?(C=N,V=M,q=T,R="night"):n<f?(U=f-b,C=v(n-b,U,N,P),V=v(n-b,U,M,x),q=v(n-b,U,T,O),R="sun rising"):n<s?(U=s-f,C=v(n-f,U,P,w),V=v(n-f,U,x,E),q=v(n-f,U,O,I),R="early morning"):n<r?(U=r-s,C=v(n-s,U,w,j),V=v(n-s,U,E,D),q=v(n-s,U,I,G),R="late morning"):n<u?(U=u-r,C=v(n-r,U,j,H),V=v(n-r,U,D,S),q=v(n-r,U,G,k),R="early afternoon"):n<p?(U=p-u,C=v(n-u,U,H,F),V=v(n-u,U,S,L),q=v(n-u,U,k,_),R="late afternoon"):n<A&&(U=A-p,C=v(n-p,U,F,N),V=v(n-p,U,L,M),q=v(n-p,U,_,T),R="sun setting");const B=m(V[0],V[1],V[2]),J=m(q[0],q[1],q[2]),K=z(e);return{direct:{intensity:C[0]*K.direct,color:B},ambient:{intensity:C[1]*K.ambient,color:J},timeOfDay:R}}function v(t,i,e,n){const o=[];for(let a=0;a<e.length;a++)o[a]=(n[a]-e[a])*t/i+e[a];return o}const w=new Date(0);export{T as ColorAndIntensity,f as computeColorAndIntensity,y as computeDirectionsOverTime,A as computeShadowsEnabled};
5
+ import t from"../../../core/has.js";import{lerp as e,clamp as i,smoothstep as n}from"../../../core/mathUtils.js";import{i as o,r as a,o as r,g as l}from"../../../chunks/mat4.js";import{c}from"../../../chunks/mat4f64.js";import{s,e as u,m}from"../../../chunks/vec3.js";import{c as d,f as b,a as g}from"../../../chunks/vec3f64.js";import{ViewingMode as h}from"../../ViewingMode.js";import{S as f}from"../../../chunks/SunCalc.js";const p={local:{altitude:1500,ambientAtNight:.1,ambientAtNoon:.45,ambientAtTwilight:.2,directAtNoon:.65,directAtTwilight:.7},global:{altitude:8e5,ambient:.015,direct:.75},planarDirection:{localAltitude:1e4,globalAltitude:1e6,globalAngles:{azimuth:1.3*Math.PI,altitude:.6*Math.PI}}};function A(t,n,o,a,r){const l=n[2];s(a.ambient.color,1,1,1),a.ambient.intensity=p.global.ambient,s(a.direct.color,1,1,1),a.direct.intensity=p.global.direct;const c=i((Math.abs(l)-p.local.altitude)/(p.global.altitude-p.local.altitude),0,1);a.globalFactor=c;const m=f.getTimes(t,n[1],n[0]);if(c<1){const i=v(t,m,r);u(a.ambient.color,i.ambient.color,a.ambient.color,c),a.ambient.intensity=e(i.ambient.intensity,a.ambient.intensity,c),u(a.direct.color,i.direct.color,a.direct.color,c),a.direct.intensity=e(i.direct.intensity,a.direct.intensity,c)}a.noonFactor=O(t,m),y(t,n,o,a.direct.directionToLightSource)}function y(e,c,d,b){const g=z,A=o(x);if(d===h.Global){if(f.getPosition(e,0,0,g),s(b,0,0,-1),a(A,A,-g.azimuth),r(A,A,-g.altitude),m(b,b,A),t("enable-feature:pole-lights")){const t=Math.sign(c[1]),e=n(t*G,t*H,c[1])*n(S,k,c[2]);u(b,b,1===t?I:D,e)}}else{const t=p.planarDirection,n=t.globalAngles,o=c[2];let r=(Math.abs(o)-t.localAltitude)/(t.globalAltitude-t.localAltitude);r=i(r,0,1),r<1?(f.getPosition(e,c[1],c[0],g),g.azimuth=(1-r)*g.azimuth+r*n.azimuth,g.altitude=(1-r)*g.altitude+r*n.altitude):(g.azimuth=n.azimuth,g.altitude=n.altitude),s(b,0,-1,0),l(A,A,-g.azimuth),a(A,A,-g.altitude),m(b,b,A)}}function N(t,e){if(e===h.Global)return!0;const i=p.planarDirection;return Math.abs(t)<i.localAltitude}function T(t,e,i,n,o){const a=t.getTime(),r=e.getTime()-a,l=Math.floor(r/i)+1,c=new Array(l);for(let s=0;s<l;++s)E.setTime(a+i*s),c[s]=d(),y(E,n,o,c[s]);return c}const M=b(.5773502691896258,-.5773502691896258,.5773502691896258);class P{constructor(){this.ambient={color:b(1,1,1),intensity:.55},this.direct={color:b(1,1,1),intensity:.55,directionToLightSource:g(M)},this.noonFactor=.5,this.globalFactor=0}}const x=c(),z={azimuth:0,altitude:0};function O(t,e){const n=t.valueOf();let o,a;e.polarException===f.PolarException.MIDNIGHT_SUN?(o=n-60*(t.getHours()+48)*60*1e3-60*t.getMinutes()*1e3,a=o+432e6):e.polarException===f.PolarException.POLAR_NIGHT?(o=n-2,a=n-1):(o=e.sunrise.valueOf(),a=e.sunset.valueOf());const r=o+(a-o)/2;return 1-i(Math.abs(n-r)/432e5,0,1)}function j(t){switch(t){case"disabled":case"sunny":return{direct:1,ambient:1};case"cloudy":return{direct:.8,ambient:1.1};case"rainy":return{direct:.4,ambient:1};case"foggy":return{direct:.3,ambient:1.6}}}function v(t,e,i){const n=t.valueOf();let o,a;e.polarException===f.PolarException.MIDNIGHT_SUN?(o=n-60*(t.getHours()+48)*60*1e3-60*t.getMinutes()*1e3,a=o+432e6):e.polarException===f.PolarException.POLAR_NIGHT?(o=n-2,a=n-1):(o=e.sunrise.valueOf(),a=e.sunset.valueOf());const r=a-o,l=o+r/2,c=r/4,s=l-c,u=l+c,m=.06*r,d=o-m/2,g=o+m/2,h=a-m/2,A=a+m/2,y=p.local,N=[.01,y.ambientAtNight],T=[.8,.8,1],M=[.01,.01,.01],P=[y.directAtTwilight,y.ambientAtTwilight],x=[1,.6,.5],z=[.8,.8,1],O=[.9*y.directAtNoon,y.ambientAtNoon],v=[1,.98,.98],E=[.98,.98,1],I=[y.directAtNoon,y.ambientAtNoon],D=[1,1,1],G=[1,1,1],H=O,S=v,k=E,F=P,L=x,_=z;let U,R,C=[0,0],V=[0,0,0],q=[0,0,0];n<d||n>A?(C=N,V=M,q=T,R="night"):n<g?(U=g-d,C=w(n-d,U,N,P),V=w(n-d,U,M,x),q=w(n-d,U,T,z),R="sun rising"):n<s?(U=s-g,C=w(n-g,U,P,O),V=w(n-g,U,x,v),q=w(n-g,U,z,E),R="early morning"):n<l?(U=l-s,C=w(n-s,U,O,I),V=w(n-s,U,v,D),q=w(n-s,U,E,G),R="late morning"):n<u?(U=u-l,C=w(n-l,U,I,H),V=w(n-l,U,D,S),q=w(n-l,U,G,k),R="early afternoon"):n<h?(U=h-u,C=w(n-u,U,H,F),V=w(n-u,U,S,L),q=w(n-u,U,k,_),R="late afternoon"):n<A&&(U=A-h,C=w(n-h,U,F,N),V=w(n-h,U,L,M),q=w(n-h,U,_,T),R="sun setting");const B=b(V[0],V[1],V[2]),J=b(q[0],q[1],q[2]),K=j(i);return{direct:{intensity:C[0]*K.direct,color:B},ambient:{intensity:C[1]*K.ambient,color:J},timeOfDay:R}}function w(t,e,i,n){const o=[];for(let a=0;a<i.length;a++)o[a]=(n[a]-i[a])*t/e+i[a];return o}const E=new Date(0),I=b(0,0,1),D=b(0,0,-1),G=55,H=70,S=15e6,k=1e7;export{P as ColorAndIntensity,A as computeColorAndIntensity,T as computeDirectionsOverTime,N as computeShadowsEnabled};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{nextHighestPowerOfTwo as e}from"../../../core/mathUtils.js";import{create as t,offset as r,copy as s}from"../../../geometry/support/aaBoundingRect.js";import{RenderTargetType as i,OverlayIndex as a}from"./interfaces.js";import{ValidationState as n}from"../webgl-engine/lib/basicInterfaces.js";import{fromValues as o}from"../webgl-engine/lib/localOrigin.js";var h;!function(e){e[e.None=0]="None",e[e.ColorAndWater=1]="ColorAndWater",e[e.Highlight=2]="Highlight",e[e.Occluded=3]="Occluded"}(h||(h={}));class g{constructor(e,r){this.index=e,this.renderTargets=r,this.extent=t(),this.resolution=0,this.renderLocalOrigin=o(0,0,0,"O"),this.pixelRatio=1,this.mapUnitsPerPixel=1,this.canvasGeometries={extents:[t(),t(),t()],numViews:0},this.validTargets=null,this.hasDrapedFeatureSource=!1,this.hasDrapedRasterSource=!1,this.hasTargetWithoutRasterImage=!1,this.index=e,this.validTargets=new Array(r.renderTargets.length).fill(!1)}getValidTarget(e){return this.validTargets[e]?this.renderTargets.getTarget(e):null}get needsColorWithoutRasterImage(){return this.hasDrapedRasterSource&&this.hasDrapedFeatureSource&&this.hasTargetWithoutRasterImage}getColorTexture(e){const t=e===h.ColorAndWater?this.renderTargets.getTarget(i.Color):e===h.Highlight?this.renderTargets.getTarget(i.Highlight):this.renderTargets.getTarget(i.Occluded);return t?t.getTexture():null}getNormalTexture(e){const t=e===h.ColorAndWater?this.renderTargets.getTarget(i.Water):null;return t?t.getTexture():null}draw(e,t){const r=this.computeRenderTargetValidityBitfield(),s=this.needsColorWithoutRasterImage;for(const a of this.renderTargets.renderTargets)a.type===i.ColorNoRasterImage&&!1===s?this.validTargets[a.type]=!1:this.validTargets[a.type]=e.drawTarget(this,a,t);return r^this.computeRenderTargetValidityBitfield()?n.CHANGED:n.UNCHANGED}computeRenderTargetValidityBitfield(){const e=this.validTargets;return+e[i.Color]|+e[i.ColorNoRasterImage]<<1|+e[i.Highlight]<<2|+e[i.Water]<<3|+e[i.Occluded]<<4}setupGeometryViewsCyclical(e){this.setupGeometryViewsDirect();const t=.001*e.range;if(this.extent[0]-t<=e.min){const t=this.canvasGeometries.extents[this.canvasGeometries.numViews++];r(this.extent,e.range,0,t)}if(this.extent[2]+t>=e.max){const t=this.canvasGeometries.extents[this.canvasGeometries.numViews++];r(this.extent,-e.range,0,t)}}setupGeometryViewsDirect(){this.canvasGeometries.numViews=1,s(this.canvasGeometries.extents[0],this.extent)}hasSomeSizedView(){for(let e=0;e<this.canvasGeometries.numViews;e++){const t=this.canvasGeometries.extents[e];if(t[0]!==t[2]&&t[1]!==t[3])return!0}return!1}applyViewport(e){e.setViewport(this.index===a.INNER?0:this.resolution,0,this.resolution,this.resolution)}}function l(t,r,s){return Math.min(e(Math.max(t,r)+256),s)}export{g as Overlay,h as OverlaySource,l as computeOverlayResolution};
5
+ import{nextHighestPowerOfTwo as e}from"../../../core/mathUtils.js";import{create as t,offset as r,copy as s}from"../../../geometry/support/aaBoundingRect.js";import{RenderTargetType as i,OverlayIndex as a}from"./interfaces.js";import{ValidationState as n}from"../webgl-engine/lib/basicInterfaces.js";import{fromValues as o}from"../webgl-engine/lib/LocalOriginFactory.js";var h;!function(e){e[e.None=0]="None",e[e.ColorAndWater=1]="ColorAndWater",e[e.Highlight=2]="Highlight",e[e.Occluded=3]="Occluded"}(h||(h={}));class g{constructor(e,r){this.index=e,this.renderTargets=r,this.extent=t(),this.resolution=0,this.renderLocalOrigin=o(0,0,0,"O"),this.pixelRatio=1,this.mapUnitsPerPixel=1,this.canvasGeometries=new c,this.validTargets=null,this.hasDrapedFeatureSource=!1,this.hasDrapedRasterSource=!1,this.hasTargetWithoutRasterImage=!1,this.index=e,this.validTargets=new Array(r.renderTargets.length).fill(!1)}getValidTarget(e){return this.validTargets[e]?this.renderTargets.getTarget(e):null}get needsColorWithoutRasterImage(){return this.hasDrapedRasterSource&&this.hasDrapedFeatureSource&&this.hasTargetWithoutRasterImage}getColorTexture(e){const t=e===h.ColorAndWater?this.renderTargets.getTarget(i.Color):e===h.Highlight?this.renderTargets.getTarget(i.Highlight):this.renderTargets.getTarget(i.Occluded);return t?t.getTexture():null}getNormalTexture(e){const t=e===h.ColorAndWater?this.renderTargets.getTarget(i.Water):null;return t?t.getTexture():null}draw(e,t){const r=this.computeRenderTargetValidityBitfield(),s=this.needsColorWithoutRasterImage;for(const a of this.renderTargets.renderTargets)a.type===i.ColorNoRasterImage&&!1===s?this.validTargets[a.type]=!1:this.validTargets[a.type]=e.drawTarget(this,a,t);return r^this.computeRenderTargetValidityBitfield()?n.CHANGED:n.UNCHANGED}computeRenderTargetValidityBitfield(){const e=this.validTargets;return+e[i.Color]|+e[i.ColorNoRasterImage]<<1|+e[i.Highlight]<<2|+e[i.Water]<<3|+e[i.Occluded]<<4}setupGeometryViewsCyclical(e){this.setupGeometryViewsDirect();const t=.001*e.range;if(this.extent[0]-t<=e.min){const t=this.canvasGeometries.extents[this.canvasGeometries.numViews++];r(this.extent,e.range,0,t)}if(this.extent[2]+t>=e.max){const t=this.canvasGeometries.extents[this.canvasGeometries.numViews++];r(this.extent,-e.range,0,t)}}setupGeometryViewsDirect(){this.canvasGeometries.numViews=1,s(this.canvasGeometries.extents[0],this.extent)}hasSomeSizedView(){for(let e=0;e<this.canvasGeometries.numViews;e++){const t=this.canvasGeometries.extents[e];if(t[0]!==t[2]&&t[1]!==t[3])return!0}return!1}applyViewport(e){e.setViewport(this.index===a.INNER?0:this.resolution,0,this.resolution,this.resolution)}}function l(t,r,s){return Math.min(e(Math.max(t,r)+256),s)}class c{constructor(){this.extents=[t(),t(),t()],this.numViews=0}}export{g as Overlay,h as OverlaySource,l as computeOverlayResolution};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.23/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import r from"../../../core/Handles.js";import s from"../../../core/has.js";import{clamp as i,deg2rad as a}from"../../../core/mathUtils.js";import{isSome as n,isNone as o,unwrap as h}from"../../../core/maybe.js";import{addFrameTask as l}from"../../../core/scheduling.js";import{Milliseconds as c}from"../../../core/time.js";import{property as d}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import{f as u}from"../../../chunks/vec2.js";import{b as _,f as y,x as g,g as m,i as f}from"../../../chunks/vec3.js";import{c as v}from"../../../chunks/vec3f64.js";import{t as T,b as R,a as w}from"../../../chunks/vec4.js";import{c as D,f as O}from"../../../chunks/vec4f64.js";import{projectVectorToVector as E}from"../../../geometry/projection.js";import{getReferenceEllipsoid as x}from"../../../geometry/projectionEllipsoid.js";import{create as S,width as P,copy as U,center as M,intersection as I,height as C,contains as j,intersects as N,offset as b}from"../../../geometry/support/aaBoundingRect.js";import{create as A,wrap as V}from"../../../geometry/support/ray.js";import{h as L,j as G}from"../../../chunks/sphere.js";import{angleAroundAxis as H}from"../../../geometry/support/vector.js";import{y2lat as k}from"../../../geometry/support/webMercatorUtils.js";import{DrapeSourceRegistration as B}from"../layers/interfaces.js";import{viewAngle as q}from"../state/utils/viewUtils.js";import F from"../support/debugFlags.js";import{PointGraphics as W}from"../support/debugUtils.js";import{Cyclical as Y,cyclicalPI as z}from"../support/mathUtils.js";import{OverlayIndex as X}from"./interfaces.js";import{computeOverlayResolution as K}from"./Overlay.js";import{OverlayRenderer as Z}from"./OverlayRenderer.js";import{RenderRequestType as J,ValidationState as Q}from"../webgl-engine/lib/basicInterfaces.js";import{newIntersector as $}from"../webgl-engine/lib/Intersector.js";import{fromValues as ee}from"../webgl-engine/lib/localOrigin.js";import{removeLoadedShaderModules as te}from"../webgl-engine/parts/requireUtils.js";import{TaskPriority as re}from"../../support/Scheduler.js";const se=[[-.1,-2,3.9,2],[-.1,-3.9,3.9,.1],[-2,-3.9,2,.1],[-3.9,-3.9,.1,.1],[-3.9,-2,.1,2],[-3.9,-.1,.1,3.9],[-2,-.1,2,3.9],[-.1,-.1,3.9,3.9]];let ie,ae=class extends t{constructor(e){super(e),this._handles=new r,this._spatialReference=null,this._renderSR=null,this._overlaySREqualsRenderSR=!0,this._drapeSources=new Map,this._drapeTargets=new Set,this._placementDirty=!1,this._contentUpdated=!1,this._drawTexturesDirty=!1,this._drawTexturesAnimateDirty=!1,this._layerViewsDirty=!0,this._hasUnusedRenderTargets=!1,this._longitudeCyclical=null,this._latestOriginId=0,this._maxResolution=s("esri-mobile")?2048:4096,this._animationTimeLast=0}get running(){return(this._placementDirty||this._layerViewsDirty)&&(this._drapeSources.size>0||this.view.graphics.length>0||F.OVERLAY_DRAW_DEBUG_TEXTURE)&&!!this._spatialReference&&!this.suspended&&this.surface.ready}get _isSpherical(){return this.view.state.isGlobal}get _worldToPCSRatio(){return n(this._spatialReference)&&this._spatialReference.isGeographic&&!this.view.state.isLocal?x(this._spatialReference).metersPerDegree:1}get view(){return this.surface.view}get updating(){return this.running||this.renderer.updating||this._contentUpdated}get hasHighlights(){return this.renderer.hasHighlights}get rendersOccluded(){return this.renderer.rendersOccluded}initialize(){const e=this.view;this.renderer=new Z({view:e,worldToPCSRatio:this._worldToPCSRatio,spatialReference:this._spatialReference}),this._groundIntersector=$(this.view.state.viewingMode),this._groundIntersector.options.backfacesTerrain=!0,this._groundIntersector.options.invisibleTerrain=!0,this._groundIntersector.options.hud=!1,this._handles.add([this.renderer.events.on("has-highlights",(()=>{this._setDrawTexturesDirty(),this.notifyChange("hasHighlights")})),this.renderer.events.on("has-water",(t=>{var r;return null==(r=e._stage)?void 0:r.renderView.setRenderParameters({hasOverlayWater:t})})),this.renderer.events.on("renders-occluded",(()=>{this._setDrawTexturesDirty(),this.notifyChange("rendersOccluded")})),this.renderer.events.on("content-changed",(()=>this._setDrawTexturesDirty())),this.renderer.events.on("textures-disposed",(()=>this.updateDrapeTargets())),e.watch(["pointsOfInterest.renderPointOfView","pointsOfInterest.centerOnSurfaceFrequent.location","pixelRatio"],(()=>this.setPlacementDirty())),this.surface.on("elevation-change",(()=>this.setPlacementDirty())),e.allLayerViews.on("after-changes",(()=>this._layerViewsDirty=!0)),e.watch("graphicsView",(()=>this._layerViewsDirty=!0)),e.on("resize",(()=>this.setPlacementDirty())),l({preRender:e=>{this._contentUpdated=!1,this.renderer.processSyncLayers(),this._updateLayerViews(),this.renderer.hasOverlays&&(this._dispatchAnimationUpdate(e),this._drawOverlayTextures(this.renderer.overlays,J.UPDATE)),this._hasUnusedRenderTargets&&this._collectUnusedRenderTargetMemory()}}),e.resourceController.scheduler.registerTask(re.OVERLAY,this),e._stage.renderView.events.on("force-camera-for-screenshot",(e=>{this._updateOverlays(e,J.BACKGROUND),this.renderer.hasOverlays&&this._drawOverlayTextures(this.renderer.overlays,J.BACKGROUND,e)}))]),this._updateLayerViews()}destroy(){this._drapeSources.forEach(((e,t)=>this.unregisterDrapeSource(t))),this._drapeTargets.forEach((e=>this._unregisterDrapeTarget(e))),this.renderer.dispose(),this._handles&&(this._handles.destroy(),this._handles=null),n(ie)&&(ie.hide(),ie=null)}get hasOverlays(){return this.renderer.hasOverlays}setSpatialReference(e){this._spatialReference=e,this.renderer.spatialReference=e,this._longitudeCyclical=null;const t=this.view.renderSpatialReference;n(e)&&n(t)?(this._renderSR=t,this._overlaySREqualsRenderSR=e.equals(this._renderSR),this._isSpherical&&(this._longitudeCyclical=e.isWebMercator?new Y(-20037508.342787,20037508.342787):new Y(-180,180),this.renderer.longitudeCyclical=this._longitudeCyclical),this.renderer&&(this.renderer.worldToPCSRatio=this._worldToPCSRatio)):this.renderer.disposeOverlays()}get gpuMemoryUsage(){return this.renderer.gpuMemoryUsage}_updateLayerViews(){if(!this._layerViewsDirty)return;const e=new Set;for(const r of this.view.allLayerViews.items)e.add(r.uid),"drapeSourceType"in r&&!this._drapeSources.has(r)&&this._registerDrapeSource(r,B.LAYER_VIEW),"drapeTargetType"in r&&!this._drapeTargets.has(r)&&this._registerDrapeTarget(r);const t=this.view.graphicsView;n(t)&&!this._drapeSources.has(t)&&(this._registerDrapeSource(t,B.LAYER_VIEW),e.add(t.uid)),this._drapeSources.forEach(((t,r)=>{t!==B.LAYER_VIEW||e.has(r.uid)||this.unregisterDrapeSource(r)})),this._drapeTargets.forEach((t=>{e.has(t.uid)||this._unregisterDrapeTarget(t)})),this.renderer.updateLayerOrder(),this._setDrawTexturesDirty(),this._layerViewsDirty=!1}registerDrapeSource(e){this._registerDrapeSource(e,B.EXTERNAL)}_registerDrapeSource(e,t){this._drapeSources.set(e,t),this.renderer.ensureOverlays(this._drapeTargets,this._drapeSources),this._updateDrapeSourceExtent(e),this._setContentDirty(),this.notifyChange("running")}_updateDrapeSourceExtent(e){2===this.renderer.overlays.length&&n(e.setDrapingExtent)&&n(this._spatialReference)&&e.setDrapingExtent(this.renderer.overlays,this._spatialReference)}unregisterDrapeSource(e){this._drapeSources.has(e)&&(this._drapeSources.delete(e),this.renderer.ensureDrapeSources(this._drapeSources),this._setContentDirty(),this.notifyChange("running"))}_registerDrapeTarget(e){this._drapeTargets.add(e),this._updateDrapeTarget(e),this.renderer.ensureOverlays(this._drapeTargets,this._drapeSources)}updateDrapeTargets(){this._drapeTargets.forEach((e=>this._updateDrapeTarget(e)))}_updateDrapeTarget(e){e.setDrapingTextures(this.renderer.overlays)}_unregisterDrapeTarget(e){this._drapeTargets.delete(e),this.renderer.ensureDrapeTargets(this._drapeTargets)}_setContentDirty(){this.setPlacementDirty(),this._setDrawTexturesDirty()}setPlacementDirty(){this._placementDirty=!0}runTask(){this._updateOverlays(this.view.state.camera,J.UPDATE)}_updateOverlays(e,t){if(!this._spatialReference)return;this._updateLayerViews();const r=K(e.fullWidth,e.fullHeight,this._maxResolution);this._computeOverlayExtents(e,r,le);const s=P(le.inner)/P(le.outer);this.renderer.ensureOverlays(this._drapeTargets,this._drapeSources);const i=this._updateOverlay(X.INNER,le.inner,r,1*le.pixelRatioAdjustment,le.mapUnitsPerPixel),a=this._updateOverlay(X.OUTER,le.outer,r,s*le.pixelRatioAdjustment,le.mapUnitsPerPixel);i!==ue.EXTENT&&a!==ue.EXTENT||(this._drapeSources.forEach(((e,t)=>this._updateDrapeSourceExtent(t))),this.surface.updateTileOverlayParams(t)),i===ue.NONE&&a===ue.NONE||this._setDrawTexturesDirty(),this._placementDirty=!1}_updateOverlay(e,t,r,s,i){if(0===this.renderer.overlays.length)return ue.NONE;const a=this.renderer.overlays[e],n=a.mapUnitsPerPixel;if(a.mapUnitsPerPixel=i,a.pixelRatio=s,ne(t,a.extent)&&r===a.resolution)return n===i?ue.NONE:ue.RERENDER_ONLY;U(a.extent,t),a.resolution=r;const o=M(a.extent);return a.renderLocalOrigin=ee(o[0],o[1],0,"OV_"+this._latestOriginId++),ue.EXTENT}setTileParameters(e){const t=e.renderData.overlay;if(this.renderer.overlays.length>0){const r=this.renderer.overlays[X.INNER],s=this.renderer.overlays[X.OUTER],i=I(e.extent,this.surface.extent,ce);this._rectInsideRect(r.extent,i)||this._rectanglesOverlap(i,r.extent)||this._rectanglesOverlap(i,s.extent)?(this._setTileOverlayData(i,X.INNER,t),this._setTileOverlayData(i,X.OUTER,t)):(this._clearTileOverlayData(X.INNER,t),this._clearTileOverlayData(X.OUTER,t))}else this._clearTileOverlayData(X.INNER,t),this._clearTileOverlayData(X.OUTER,t)}overlayPixelSizeInMapUnits(e){if(0===this.renderer.overlays.length)return 0;const t=this.renderer.overlays[X.INNER],r=this.renderer.overlays[X.OUTER],s=this._pointIsInExtent(e,t.extent)?t:r;return(s.extent[2]-s.extent[0])/s.resolution}_setTileOverlayData(e,t,r){if(0===this.renderer.overlays.length)return;const s=this.renderer.overlays[t].extent,i=P(s),a=C(s);let n=e[0];if(this._longitudeCyclical){n=this._longitudeCyclical.minimalMonotonic(s[0],n);const t=this._longitudeCyclical.minimalMonotonic(s[0],e[2]);n>t&&(n=t-(e[2]-e[0]))}r.setScale(t,P(e)/i,C(e)/a),r.setOffset(t,(n-s[0])/i,(e[1]-s[1])/a)}_clearTileOverlayData(e,t){t.setScale(e,-1,-1),t.setOffset(e,-1,-1)}async reloadShaders(){te(),await this.renderer.reloadShaders(),this._setDrawTexturesDirty(),this.runTask()}_dispatchAnimationUpdate(e){const t=c(e.time-this._animationTimeLast);(t>=this.surface.view._stage.renderView.animationTimestep||n(this.forcedAnimationTime)||this._drawTexturesDirty||this._drawTexturesAnimateDirty)&&(this.renderer.updateAnimation({dt:t,forcedTime:this.forcedAnimationTime,camera:this.view.state.camera})&&(this._drawTexturesAnimateDirty=!0),this._animationTimeLast=e.time)}_setDrawTexturesDirty(){this.renderer.hasOverlays?(this._contentUpdated=!0,this._drawTexturesDirty=!0):this.setPlacementDirty()}_intersectGroundFromView(e,t,r,s){const i=this.view.sceneIntersectionHelper.getCenterRayWithSubpixelOffset(e,pe,t,r);if(o(i))return!1;const a=i.origin,n=_(he,i.origin,i.direction);return this._groundIntersector.reset(a,n,e),this._groundIntersector.intersect([],null),this.view.basemapTerrain.intersect(this._groundIntersector,null,a,n),this._groundIntersector.results.min.getIntersectionPoint(s)}_findHorizonBasedPointOfInterest(e,t){let r=.5;const s=.55,a=this.view.renderCoordsHelper.getAltitude(e.eye),n=this.view.pointsOfInterest.centerOnSurfaceFrequent,o=1e-5,h=i(n.estimatedSurfaceAltitude,e.aboveGround?-1/0:a+o,e.aboveGround?a-o:1/0),l=e.aboveGround;if("global"===this.view.viewingMode){const t=he;L(G(x(this.view.spatialReference).radius+h),V(e.eye,e.viewForward),t),y(t,t,e.eye);const i=z.normalize(H(e.viewForward,t,e.viewRight))/e.fovY+.5,a=i<=0||i>=1?.5:s;r=l?a*i:i+a*(1-i)}else{const t=.5*Math.PI-Math.acos(-e.viewForward[2]),a=Math.tan(t),n=O(0,a,1,0),o=T(n,n,e.projectionMatrix)[1],h=i(.5+.5*o,0,1);r=1===h||0===h?.5:l?h*s:1-(1-h)*s}return!!this._intersectGroundFromView(e,.5,r,t)&&g(t,e.eye)<n.distance*n.distance}_computeOverlayExtents(e,t,r){const s=this.view.pointsOfInterest.centerOnSurfaceFrequent.renderLocation,i=v();this._findHorizonBasedPointOfInterest(e,i)||m(i,s);const l=Math.max(.1,f(e.eye,i)),c=q(this.view.renderCoordsHelper,s,e.eye),d=Math.PI/2-Math.abs(c-Math.PI/2);F.OVERLAY_SHOW_CENTER?(o(ie)&&(ie=new W(this.view.graphics,"red")),ie.show(i,this._renderSR)):n(ie)&&ie.hide(),this._overlaySREqualsRenderSR||E(i,this._renderSR,i,this._spatialReference);const p=this.surface.extent,_=!this._isSpherical&&n(this._spatialReference)&&this._spatialReference.isGeographic,y=_&&n(this._spatialReference)?1/x(this._spatialReference).metersPerDegree:1,g=e.perRenderPixelRatio*l*y;r.mapUnitsPerPixel=g/this._worldToPCSRatio;let T=t*g/2,D=!1,O=_?90:1/0;this._isSpherical&&n(p)&&n(this._spatialReference)&&(this._spatialReference.isWebMercator?(T/=Math.cos(k(i[1])),O=p[3]):(D=!0,T/=x(this._spatialReference).metersPerDegree,O=90),T>=O&&(T=O,i[1]=0,this._spatialReference.isWebMercator&&(i[0]=0)));let S=1;D&&(S=1/Math.max(.2,Math.cos(Math.abs(a(i[1])))),T*S>180&&(S=180/T),r.mapUnitsPerPixel*=S);const M=Math.log(2)/12;T=Math.exp(Math.round(Math.log(T)/M)*M);const C=T*S,N=32,b=.5*t/(N*C),A=.5*t/(N*T);i[0]=Math.round(i[0]*b)/b,i[1]=Math.round(i[1]*A)/A;const V=r.inner;V[0]=i[0]-C,V[1]=i[1]-T,V[2]=i[0]+C,V[3]=i[1]+T,this._isSpherical&&this._shiftExtentToFitBounds(V,1/0,O);const L=r.outer;if(6*C>P(p))U(L,h(p));else if(d<=.25*Math.PI)L[0]=V[0]-C,L[1]=V[1]-T,L[2]=V[2]+C,L[3]=V[3]+T;else{E(e.eye,this._renderSR,he,this._spatialReference),u(oe,i,he);let t=-Math.atan2(oe[1],oe[0])+.125*Math.PI;t<0&&(t+=2*Math.PI);const r=Math.floor(t/(.25*Math.PI));R(oe,se[r],2*T),oe[0]*=S,oe[2]*=S,w(L,V,oe)}if(this._isSpherical)L[0]=this._longitudeCyclical.clamp(L[0]),L[2]=this._longitudeCyclical.clamp(L[2]),L[1]=Math.max(L[1],-O),L[3]=Math.min(L[3],O);else{const e=I(V,p,ce),t=I(L,p,de);j(e,t)&&(L[2]=L[0],L[3]=L[1])}const G=Math.abs(V[2]-V[0])/t;r.mapUnitsPerPixel=Math.max(r.mapUnitsPerPixel,G),r.pixelRatioAdjustment=r.mapUnitsPerPixel/G}_drawOverlayTextures(e,t,r=this.view.state.camera){if(0===e.length||!this._drawTexturesDirty&&!this._drawTexturesAnimateDirty)return;const s=this._drawTexturesDirty;this._drawTexturesDirty=!1,this._drawTexturesAnimateDirty=!1;const i=this._drawOverlay(e[X.INNER],r),a=this._drawOverlay(e[X.OUTER],r);i!==Q.CHANGED&&a!==Q.CHANGED||this.surface.updateTileOverlayParams(J.UPDATE),this._collectUnusedRenderTargetMemory(),this.updateDrapeTargets(),s?(this.surface.requestRender(t),t===J.UPDATE&&this.surface.requestUpdate()):this.surface.requestRender(J.BACKGROUND)}_drawOverlay(e,t){return this._longitudeCyclical?e.setupGeometryViewsCyclical(this._longitudeCyclical):e.setupGeometryViewsDirect(),e.draw(this.renderer,t.pixelRatio)}_collectUnusedRenderTargetMemory(){if(this._hasUnusedRenderTargets=!1,this.renderer.hasOverlays){const e=performance.now();this._hasUnusedRenderTargets=this.renderer.collectUnusedRenderTargetMemory(e)}}_rectanglesOverlap(e,t){return!o(e)&&(this._longitudeCyclical?(this._longitudeCyclical.contains(t[0],t[2],e[0])||this._longitudeCyclical.contains(t[0],t[2],e[2])||this._longitudeCyclical.contains(e[0],e[2],t[0]))&&!(e[1]>t[3]||e[3]<t[1]):N(e,t))}_rectInsideRect(e,t){return!o(t)&&(this._longitudeCyclical?this._longitudeCyclical.contains(e[0],e[2],t[0])&&this._longitudeCyclical.contains(e[0],e[2],t[2])&&t[1]>e[1]&&t[3]<e[3]:j(e,t))}_pointIsInExtent(e,t){if(this._longitudeCyclical)return this._longitudeCyclical.contains(t[0],t[2],e.x)&&e.y>=t[1]&&e.y<=t[3];const r=e.x,s=e.y;return r>t[0]&&r<t[2]&&s>t[1]&&s<t[3]}_shiftExtentToFitBounds(e,t,r){let s=0,i=0;e[0]<-t?s=e[0]+t:e[2]>t&&(s=t-e[2]),e[1]<-r?i=e[1]+r:e[3]>r&&(i=r-e[3]),b(e,s,i)}get test(){return{renderer:this.renderer,update:()=>this.runTask()}}};function ne(e,t){const r=1e-5,s=F.TESTS_DISABLE_OPTIMIZATIONS?0:r*Math.max(e[2]-e[0],e[3]-e[1],t[2]-t[0],t[3]-t[1]);return Math.abs(t[0]-e[0])<=s&&Math.abs(t[1]-e[1])<=s&&Math.abs(t[2]-e[2])<=s&&Math.abs(t[3]-e[3])<=s}e([d()],ae.prototype,"_spatialReference",void 0),e([d({readOnly:!0})],ae.prototype,"running",null),e([d()],ae.prototype,"_placementDirty",void 0),e([d()],ae.prototype,"_contentUpdated",void 0),e([d()],ae.prototype,"_layerViewsDirty",void 0),e([d()],ae.prototype,"_isSpherical",null),e([d()],ae.prototype,"_worldToPCSRatio",null),e([d()],ae.prototype,"renderer",void 0),e([d({constructOnly:!0})],ae.prototype,"surface",void 0),e([d({readOnly:!0,aliasOf:"surface.suspended"})],ae.prototype,"suspended",void 0),e([d({readOnly:!0})],ae.prototype,"updating",null),e([d({type:Boolean})],ae.prototype,"hasHighlights",null),e([d({type:Boolean})],ae.prototype,"rendersOccluded",null),ae=e([p("esri.views.3d.terrain.OverlayManager")],ae);const oe=D(),he=v(),le={inner:S(),outer:S(),mapUnitsPerPixel:0,pixelRatioAdjustment:1},ce=S(),de=S(),pe=A();var ue;!function(e){e[e.NONE=0]="NONE",e[e.EXTENT=1]="EXTENT",e[e.RERENDER_ONLY=2]="RERENDER_ONLY"}(ue||(ue={}));export{ae as OverlayManager};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../core/Accessor.js";import r from"../../../core/Handles.js";import s from"../../../core/has.js";import{clamp as i,deg2rad as a}from"../../../core/mathUtils.js";import{isSome as n,isNone as o,unwrap as h}from"../../../core/maybe.js";import{addFrameTask as l}from"../../../core/scheduling.js";import{Milliseconds as c}from"../../../core/time.js";import{property as d}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import{f as u}from"../../../chunks/vec2.js";import{b as _,f as y,x as g,g as m,i as f}from"../../../chunks/vec3.js";import{c as v}from"../../../chunks/vec3f64.js";import{t as T,b as R,a as w}from"../../../chunks/vec4.js";import{c as D,f as O}from"../../../chunks/vec4f64.js";import{projectVectorToVector as E}from"../../../geometry/projection.js";import{getReferenceEllipsoid as x}from"../../../geometry/projectionEllipsoid.js";import{create as S,width as P,copy as U,center as M,intersection as I,height as C,contains as j,intersects as N,offset as b}from"../../../geometry/support/aaBoundingRect.js";import{create as A,wrap as V}from"../../../geometry/support/ray.js";import{h as L,j as G}from"../../../chunks/sphere.js";import{angleAroundAxis as H}from"../../../geometry/support/vector.js";import{y2lat as k}from"../../../geometry/support/webMercatorUtils.js";import{DrapeSourceRegistration as B}from"../layers/interfaces.js";import{viewAngle as F}from"../state/utils/viewUtils.js";import q from"../support/debugFlags.js";import{PointGraphics as W}from"../support/debugUtils.js";import{Cyclical as Y,cyclicalPI as z}from"../support/mathUtils.js";import{OverlayIndex as X}from"./interfaces.js";import{computeOverlayResolution as K}from"./Overlay.js";import{OverlayRenderer as Z}from"./OverlayRenderer.js";import{RenderRequestType as J,ValidationState as Q}from"../webgl-engine/lib/basicInterfaces.js";import{newIntersector as $}from"../webgl-engine/lib/Intersector.js";import{fromValues as ee}from"../webgl-engine/lib/LocalOriginFactory.js";import{removeLoadedShaderModules as te}from"../webgl-engine/parts/requireUtils.js";import{TaskPriority as re}from"../../support/Scheduler.js";const se=[[-.1,-2,3.9,2],[-.1,-3.9,3.9,.1],[-2,-3.9,2,.1],[-3.9,-3.9,.1,.1],[-3.9,-2,.1,2],[-3.9,-.1,.1,3.9],[-2,-.1,2,3.9],[-.1,-.1,3.9,3.9]];let ie,ae=class extends t{constructor(e){super(e),this._handles=new r,this._spatialReference=null,this._renderSR=null,this._overlaySREqualsRenderSR=!0,this._drapeSources=new Map,this._drapeTargets=new Set,this._placementDirty=!1,this._contentUpdated=!1,this._drawTexturesDirty=!1,this._drawTexturesAnimateDirty=!1,this._layerViewsDirty=!0,this._hasUnusedRenderTargets=!1,this._longitudeCyclical=null,this._latestOriginId=0,this._maxResolution=s("esri-mobile")?2048:4096,this._animationTimeLast=0}get running(){return(this._placementDirty||this._layerViewsDirty)&&(this._drapeSources.size>0||this.view.graphics.length>0||q.OVERLAY_DRAW_DEBUG_TEXTURE)&&!!this._spatialReference&&!this.suspended&&this.surface.ready}get _isSpherical(){return this.view.state.isGlobal}get _worldToPCSRatio(){return n(this._spatialReference)&&this._spatialReference.isGeographic&&!this.view.state.isLocal?x(this._spatialReference).metersPerDegree:1}get view(){return this.surface.view}get updating(){return this.running||this.renderer.updating||this._contentUpdated}get hasHighlights(){return this.renderer.hasHighlights}get rendersOccluded(){return this.renderer.rendersOccluded}initialize(){const e=this.view;this.renderer=new Z({view:e,worldToPCSRatio:this._worldToPCSRatio,spatialReference:this._spatialReference}),this._groundIntersector=$(this.view.state.viewingMode),this._groundIntersector.options.backfacesTerrain=!0,this._groundIntersector.options.invisibleTerrain=!0,this._groundIntersector.options.hud=!1,this._handles.add([this.renderer.events.on("has-highlights",(()=>{this._setDrawTexturesDirty(),this.notifyChange("hasHighlights")})),this.renderer.events.on("has-water",(t=>{var r;return null==(r=e._stage)?void 0:r.renderView.setRenderParameters({hasOverlayWater:t})})),this.renderer.events.on("renders-occluded",(()=>{this._setDrawTexturesDirty(),this.notifyChange("rendersOccluded")})),this.renderer.events.on("content-changed",(()=>this._setDrawTexturesDirty())),this.renderer.events.on("textures-disposed",(()=>this.updateDrapeTargets())),e.watch(["pointsOfInterest.renderPointOfView","pointsOfInterest.centerOnSurfaceFrequent.location","pixelRatio"],(()=>this.setPlacementDirty())),this.surface.on("elevation-change",(()=>this.setPlacementDirty())),e.allLayerViews.on("after-changes",(()=>this._layerViewsDirty=!0)),e.watch("graphicsView",(()=>this._layerViewsDirty=!0)),e.on("resize",(()=>this.setPlacementDirty())),l({preRender:e=>{this._contentUpdated=!1,this.renderer.processSyncLayers(),this._updateLayerViews(),this.renderer.hasOverlays&&(this._dispatchAnimationUpdate(e),this._drawOverlayTextures(this.renderer.overlays,J.UPDATE)),this._hasUnusedRenderTargets&&this._collectUnusedRenderTargetMemory()}}),e.resourceController.scheduler.registerTask(re.OVERLAY,this),e._stage.renderView.events.on("force-camera-for-screenshot",(e=>{this._updateOverlays(e,J.BACKGROUND),this.renderer.hasOverlays&&this._drawOverlayTextures(this.renderer.overlays,J.BACKGROUND,e)}))]),this._updateLayerViews()}destroy(){this._drapeSources.forEach(((e,t)=>this.unregisterDrapeSource(t))),this._drapeTargets.forEach((e=>this._unregisterDrapeTarget(e))),this.renderer.dispose(),this._handles&&(this._handles.destroy(),this._handles=null),n(ie)&&(ie.hide(),ie=null)}get hasOverlays(){return this.renderer.hasOverlays}setSpatialReference(e){this._spatialReference=e,this.renderer.spatialReference=e,this._longitudeCyclical=null;const t=this.view.renderSpatialReference;n(e)&&n(t)?(this._renderSR=t,this._overlaySREqualsRenderSR=e.equals(this._renderSR),this._isSpherical&&(this._longitudeCyclical=e.isWebMercator?new Y(-20037508.342787,20037508.342787):new Y(-180,180),this.renderer.longitudeCyclical=this._longitudeCyclical),this.renderer&&(this.renderer.worldToPCSRatio=this._worldToPCSRatio)):this.renderer.disposeOverlays()}get gpuMemoryUsage(){return this.renderer.gpuMemoryUsage}_updateLayerViews(){if(!this._layerViewsDirty)return;const e=new Set;for(const r of this.view.allLayerViews.items)e.add(r.uid),"drapeSourceType"in r&&!this._drapeSources.has(r)&&this._registerDrapeSource(r,B.LAYER_VIEW),"drapeTargetType"in r&&!this._drapeTargets.has(r)&&this._registerDrapeTarget(r);const t=this.view.graphicsView;n(t)&&!this._drapeSources.has(t)&&(this._registerDrapeSource(t,B.LAYER_VIEW),e.add(t.uid)),this._drapeSources.forEach(((t,r)=>{t!==B.LAYER_VIEW||e.has(r.uid)||this.unregisterDrapeSource(r)})),this._drapeTargets.forEach((t=>{e.has(t.uid)||this._unregisterDrapeTarget(t)})),this.renderer.updateLayerOrder(),this._setDrawTexturesDirty(),this._layerViewsDirty=!1}registerDrapeSource(e){this._registerDrapeSource(e,B.EXTERNAL)}_registerDrapeSource(e,t){this._drapeSources.set(e,t),this.renderer.ensureOverlays(this._drapeTargets,this._drapeSources),this._updateDrapeSourceExtent(e),this._setContentDirty(),this.notifyChange("running")}_updateDrapeSourceExtent(e){2===this.renderer.overlays.length&&n(e.setDrapingExtent)&&n(this._spatialReference)&&e.setDrapingExtent(this.renderer.overlays,this._spatialReference)}unregisterDrapeSource(e){this._drapeSources.has(e)&&(this._drapeSources.delete(e),this.renderer.ensureDrapeSources(this._drapeSources),this._setContentDirty(),this.notifyChange("running"))}_registerDrapeTarget(e){this._drapeTargets.add(e),this._updateDrapeTarget(e),this.renderer.ensureOverlays(this._drapeTargets,this._drapeSources)}updateDrapeTargets(){this._drapeTargets.forEach((e=>this._updateDrapeTarget(e)))}_updateDrapeTarget(e){e.setDrapingTextures(this.renderer.overlays)}_unregisterDrapeTarget(e){this._drapeTargets.delete(e),this.renderer.ensureDrapeTargets(this._drapeTargets)}_setContentDirty(){this.setPlacementDirty(),this._setDrawTexturesDirty()}setPlacementDirty(){this._placementDirty=!0}runTask(){this._updateOverlays(this.view.state.camera,J.UPDATE)}_updateOverlays(e,t){if(!this._spatialReference)return;this._updateLayerViews();const r=K(e.fullWidth,e.fullHeight,this._maxResolution);this._computeOverlayExtents(e,r,le);const s=P(le.inner)/P(le.outer);this.renderer.ensureOverlays(this._drapeTargets,this._drapeSources);const i=this._updateOverlay(X.INNER,le.inner,r,1*le.pixelRatioAdjustment,le.mapUnitsPerPixel),a=this._updateOverlay(X.OUTER,le.outer,r,s*le.pixelRatioAdjustment,le.mapUnitsPerPixel);i!==ue.EXTENT&&a!==ue.EXTENT||(this._drapeSources.forEach(((e,t)=>this._updateDrapeSourceExtent(t))),this.surface.updateTileOverlayParams(t)),i===ue.NONE&&a===ue.NONE||this._setDrawTexturesDirty(),this._placementDirty=!1}_updateOverlay(e,t,r,s,i){if(0===this.renderer.overlays.length)return ue.NONE;const a=this.renderer.overlays[e],n=a.mapUnitsPerPixel;if(a.mapUnitsPerPixel=i,a.pixelRatio=s,ne(t,a.extent)&&r===a.resolution)return n===i?ue.NONE:ue.RERENDER_ONLY;U(a.extent,t),a.resolution=r;const o=M(a.extent);return a.renderLocalOrigin=ee(o[0],o[1],0,"OV_"+this._latestOriginId++),ue.EXTENT}setTileParameters(e){const t=e.renderData.overlay;if(this.renderer.overlays.length>0){const r=this.renderer.overlays[X.INNER],s=this.renderer.overlays[X.OUTER],i=I(e.extent,this.surface.extent,ce);this._rectInsideRect(r.extent,i)||this._rectanglesOverlap(i,r.extent)||this._rectanglesOverlap(i,s.extent)?(this._setTileOverlayData(i,X.INNER,t),this._setTileOverlayData(i,X.OUTER,t)):(this._clearTileOverlayData(X.INNER,t),this._clearTileOverlayData(X.OUTER,t))}else this._clearTileOverlayData(X.INNER,t),this._clearTileOverlayData(X.OUTER,t)}overlayPixelSizeInMapUnits(e){if(0===this.renderer.overlays.length)return 0;const t=this.renderer.overlays[X.INNER],r=this.renderer.overlays[X.OUTER],s=this._pointIsInExtent(e,t.extent)?t:r;return(s.extent[2]-s.extent[0])/s.resolution}_setTileOverlayData(e,t,r){if(0===this.renderer.overlays.length)return;const s=this.renderer.overlays[t].extent,i=P(s),a=C(s);let n=e[0];if(this._longitudeCyclical){n=this._longitudeCyclical.minimalMonotonic(s[0],n);const t=this._longitudeCyclical.minimalMonotonic(s[0],e[2]);n>t&&(n=t-(e[2]-e[0]))}r.setScale(t,P(e)/i,C(e)/a),r.setOffset(t,(n-s[0])/i,(e[1]-s[1])/a)}_clearTileOverlayData(e,t){t.setScale(e,-1,-1),t.setOffset(e,-1,-1)}async reloadShaders(){te(),await this.renderer.reloadShaders(),this._setDrawTexturesDirty(),this.runTask()}_dispatchAnimationUpdate(e){const t=c(e.time-this._animationTimeLast);(t>=this.surface.view._stage.renderView.animationTimestep||n(this.forcedAnimationTime)||this._drawTexturesDirty||this._drawTexturesAnimateDirty)&&(this.renderer.updateAnimation({dt:t,forcedTime:this.forcedAnimationTime,camera:this.view.state.camera})&&(this._drawTexturesAnimateDirty=!0),this._animationTimeLast=e.time)}_setDrawTexturesDirty(){this.renderer.hasOverlays?(this._contentUpdated=!0,this._drawTexturesDirty=!0):this.setPlacementDirty()}_intersectGroundFromView(e,t,r,s){const i=this.view.sceneIntersectionHelper.getCenterRayWithSubpixelOffset(e,pe,t,r);if(o(i))return!1;const a=i.origin,n=_(he,i.origin,i.direction);return this._groundIntersector.reset(a,n,e),this._groundIntersector.intersect([],null),this.view.basemapTerrain.intersect(this._groundIntersector,null,a,n),this._groundIntersector.results.min.getIntersectionPoint(s)}_findHorizonBasedPointOfInterest(e,t){let r=.5;const s=.55,a=this.view.renderCoordsHelper.getAltitude(e.eye),n=this.view.pointsOfInterest.centerOnSurfaceFrequent,o=1e-5,h=i(n.estimatedSurfaceAltitude,e.aboveGround?-1/0:a+o,e.aboveGround?a-o:1/0),l=e.aboveGround;if("global"===this.view.viewingMode){const t=he;L(G(x(this.view.spatialReference).radius+h),V(e.eye,e.viewForward),t),y(t,t,e.eye);const i=z.normalize(H(e.viewForward,t,e.viewRight))/e.fovY+.5,a=i<=0||i>=1?.5:s;r=l?a*i:i+a*(1-i)}else{const t=.5*Math.PI-Math.acos(-e.viewForward[2]),a=Math.tan(t),n=O(0,a,1,0),o=T(n,n,e.projectionMatrix)[1],h=i(.5+.5*o,0,1);r=1===h||0===h?.5:l?h*s:1-(1-h)*s}return!!this._intersectGroundFromView(e,.5,r,t)&&g(t,e.eye)<n.distance*n.distance}_computeOverlayExtents(e,t,r){const s=this.view.pointsOfInterest.centerOnSurfaceFrequent.renderLocation,i=v();this._findHorizonBasedPointOfInterest(e,i)||m(i,s);const l=Math.max(.1,f(e.eye,i)),c=F(this.view.renderCoordsHelper,s,e.eye),d=Math.PI/2-Math.abs(c-Math.PI/2);q.OVERLAY_SHOW_CENTER?(o(ie)&&(ie=new W(this.view.graphics,"red")),ie.show(i,this._renderSR)):n(ie)&&ie.hide(),this._overlaySREqualsRenderSR||E(i,this._renderSR,i,this._spatialReference);const p=this.surface.extent,_=!this._isSpherical&&n(this._spatialReference)&&this._spatialReference.isGeographic,y=_&&n(this._spatialReference)?1/x(this._spatialReference).metersPerDegree:1,g=e.perRenderPixelRatio*l*y;r.mapUnitsPerPixel=g/this._worldToPCSRatio;let T=t*g/2,D=!1,O=_?90:1/0;this._isSpherical&&n(p)&&n(this._spatialReference)&&(this._spatialReference.isWebMercator?(T/=Math.cos(k(i[1])),O=p[3]):(D=!0,T/=x(this._spatialReference).metersPerDegree,O=90),T>=O&&(T=O,i[1]=0,this._spatialReference.isWebMercator&&(i[0]=0)));let S=1;D&&(S=1/Math.max(.2,Math.cos(Math.abs(a(i[1])))),T*S>180&&(S=180/T),r.mapUnitsPerPixel*=S);const M=Math.log(2)/12;T=Math.exp(Math.round(Math.log(T)/M)*M);const C=T*S,N=32,b=.5*t/(N*C),A=.5*t/(N*T);i[0]=Math.round(i[0]*b)/b,i[1]=Math.round(i[1]*A)/A;const V=r.inner;V[0]=i[0]-C,V[1]=i[1]-T,V[2]=i[0]+C,V[3]=i[1]+T,this._isSpherical&&this._shiftExtentToFitBounds(V,1/0,O);const L=r.outer;if(6*C>P(p))U(L,h(p));else if(d<=.25*Math.PI)L[0]=V[0]-C,L[1]=V[1]-T,L[2]=V[2]+C,L[3]=V[3]+T;else{E(e.eye,this._renderSR,he,this._spatialReference),u(oe,i,he);let t=-Math.atan2(oe[1],oe[0])+.125*Math.PI;t<0&&(t+=2*Math.PI);const r=Math.floor(t/(.25*Math.PI));R(oe,se[r],2*T),oe[0]*=S,oe[2]*=S,w(L,V,oe)}if(this._isSpherical)L[0]=this._longitudeCyclical.clamp(L[0]),L[2]=this._longitudeCyclical.clamp(L[2]),L[1]=Math.max(L[1],-O),L[3]=Math.min(L[3],O);else{const e=I(V,p,ce),t=I(L,p,de);j(e,t)&&(L[2]=L[0],L[3]=L[1])}const G=Math.abs(V[2]-V[0])/t;r.mapUnitsPerPixel=Math.max(r.mapUnitsPerPixel,G),r.pixelRatioAdjustment=r.mapUnitsPerPixel/G}_drawOverlayTextures(e,t,r=this.view.state.camera){if(0===e.length||!this._drawTexturesDirty&&!this._drawTexturesAnimateDirty)return;const s=this._drawTexturesDirty;this._drawTexturesDirty=!1,this._drawTexturesAnimateDirty=!1;const i=this._drawOverlay(e[X.INNER],r),a=this._drawOverlay(e[X.OUTER],r);i!==Q.CHANGED&&a!==Q.CHANGED||this.surface.updateTileOverlayParams(J.UPDATE),this._collectUnusedRenderTargetMemory(),this.updateDrapeTargets(),s?(this.surface.requestRender(t),t===J.UPDATE&&this.surface.requestUpdate()):this.surface.requestRender(J.BACKGROUND)}_drawOverlay(e,t){return this._longitudeCyclical?e.setupGeometryViewsCyclical(this._longitudeCyclical):e.setupGeometryViewsDirect(),e.draw(this.renderer,t.pixelRatio)}_collectUnusedRenderTargetMemory(){if(this._hasUnusedRenderTargets=!1,this.renderer.hasOverlays){const e=performance.now();this._hasUnusedRenderTargets=this.renderer.collectUnusedRenderTargetMemory(e)}}_rectanglesOverlap(e,t){return!o(e)&&(this._longitudeCyclical?(this._longitudeCyclical.contains(t[0],t[2],e[0])||this._longitudeCyclical.contains(t[0],t[2],e[2])||this._longitudeCyclical.contains(e[0],e[2],t[0]))&&!(e[1]>t[3]||e[3]<t[1]):N(e,t))}_rectInsideRect(e,t){return!o(t)&&(this._longitudeCyclical?this._longitudeCyclical.contains(e[0],e[2],t[0])&&this._longitudeCyclical.contains(e[0],e[2],t[2])&&t[1]>e[1]&&t[3]<e[3]:j(e,t))}_pointIsInExtent(e,t){if(this._longitudeCyclical)return this._longitudeCyclical.contains(t[0],t[2],e.x)&&e.y>=t[1]&&e.y<=t[3];const r=e.x,s=e.y;return r>t[0]&&r<t[2]&&s>t[1]&&s<t[3]}_shiftExtentToFitBounds(e,t,r){let s=0,i=0;e[0]<-t?s=e[0]+t:e[2]>t&&(s=t-e[2]),e[1]<-r?i=e[1]+r:e[3]>r&&(i=r-e[3]),b(e,s,i)}get test(){return{renderer:this.renderer,update:()=>this.runTask()}}};function ne(e,t){const r=1e-5,s=q.TESTS_DISABLE_OPTIMIZATIONS?0:r*Math.max(e[2]-e[0],e[3]-e[1],t[2]-t[0],t[3]-t[1]);return Math.abs(t[0]-e[0])<=s&&Math.abs(t[1]-e[1])<=s&&Math.abs(t[2]-e[2])<=s&&Math.abs(t[3]-e[3])<=s}e([d()],ae.prototype,"_spatialReference",void 0),e([d({readOnly:!0})],ae.prototype,"running",null),e([d()],ae.prototype,"_placementDirty",void 0),e([d()],ae.prototype,"_contentUpdated",void 0),e([d()],ae.prototype,"_layerViewsDirty",void 0),e([d()],ae.prototype,"_isSpherical",null),e([d()],ae.prototype,"_worldToPCSRatio",null),e([d()],ae.prototype,"renderer",void 0),e([d({constructOnly:!0})],ae.prototype,"surface",void 0),e([d({readOnly:!0,aliasOf:"surface.suspended"})],ae.prototype,"suspended",void 0),e([d({readOnly:!0})],ae.prototype,"updating",null),e([d({type:Boolean})],ae.prototype,"hasHighlights",null),e([d({type:Boolean})],ae.prototype,"rendersOccluded",null),ae=e([p("esri.views.3d.terrain.OverlayManager")],ae);const oe=D(),he=v(),le={inner:S(),outer:S(),mapUnitsPerPixel:0,pixelRatioAdjustment:1},ce=S(),de=S(),pe=A();var ue;!function(e){e[e.NONE=0]="NONE",e[e.EXTENT=1]="EXTENT",e[e.RERENDER_ONLY=2]="RERENDER_ONLY"}(ue||(ue={}));export{ae as OverlayManager};