@arcgis/core 4.34.0-next.89 → 4.34.0-next.90

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 (380) hide show
  1. package/applications/Components/featureUtils.d.ts +2 -0
  2. package/applications/Components/featureUtils.js +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/{eada3483116a5ea8baed.js → 004c2a1a37b99a184b13.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{23f54b49742098def8ae.js → 00ee2a605c30744f415a.js} +1 -1
  6. package/assets/esri/core/workers/chunks/024063fe2bbb27899094.js +1 -0
  7. package/assets/esri/core/workers/chunks/0271a2ca4e9b1e4fd284.js +1 -0
  8. package/assets/esri/core/workers/chunks/0328eaea66c1db98da1c.js +1 -0
  9. package/assets/esri/core/workers/chunks/04bac7bb3f794b33e2e4.js +1 -0
  10. package/assets/esri/core/workers/chunks/{8380a092ffc8e92ede7a.js → 05072093e0209ef5db20.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{b53008c1461dd6bacc63.js → 06221ebadab32111e2c6.js} +1 -1
  12. package/assets/esri/core/workers/chunks/06aed0a5464965be8d52.js +1 -0
  13. package/assets/esri/core/workers/chunks/{67fdc8074cdcf374af9a.js → 07a7ca89ef2ca4fc090b.js} +1 -1
  14. package/assets/esri/core/workers/chunks/0810dbbf348a927392e7.js +1 -0
  15. package/assets/esri/core/workers/chunks/08374e5805fcedc1cb57.js +1 -0
  16. package/assets/esri/core/workers/chunks/0856cd281efd71bfe3c4.js +1 -0
  17. package/assets/esri/core/workers/chunks/08957e462d06c4dc8ab5.js +1 -0
  18. package/assets/esri/core/workers/chunks/0aaaf4d1c4a5d284216e.js +1 -0
  19. package/assets/esri/core/workers/chunks/{3c0990c4be06a2fd51e9.js → 0ca5060c81a1a05b8be3.js} +1 -1
  20. package/assets/esri/core/workers/chunks/0ceb68ff73e5d39e837a.js +1 -0
  21. package/assets/esri/core/workers/chunks/{998d164b3e0b99a0ff1e.js → 0e5e565df6ec71445f2e.js} +1 -1
  22. package/assets/esri/core/workers/chunks/0f4e9846d074864b39c2.js +1 -0
  23. package/assets/esri/core/workers/chunks/100a0041ee42b0b2fa32.js +1 -0
  24. package/assets/esri/core/workers/chunks/1194c2432c31def87db1.js +1 -0
  25. package/assets/esri/core/workers/chunks/{2896ada406074f754b00.js → 1214c126af0de25a4b4a.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{978ffde9ebebf5c83aea.js → 14114be3afd6d292f89c.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{4dd4b19c410026233999.js → 142c45ad68eecaf3fc7c.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{2b2f1fcd50dea017d891.js → 147f6e7b147beaa4ed29.js} +1 -1
  29. package/assets/esri/core/workers/chunks/155dcbd957f8787a45c3.js +1 -0
  30. package/assets/esri/core/workers/chunks/{d5363e5637d37e89a25f.js → 18e9cb71fa020e93d139.js} +1 -1
  31. package/assets/esri/core/workers/chunks/19bd0b56d82446dbb7c5.js +1 -0
  32. package/assets/esri/core/workers/chunks/{96de78f9994207aa7201.js → 1bbc0dfad4cd72a1c42b.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{914eaed113dda727eb47.js → 20988e116f3723228f36.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{831a69e5a87e92830fbe.js → 21f37a4b8d1857369203.js} +1 -1
  35. package/assets/esri/core/workers/chunks/22c3a21bc9f32c429c48.js +1 -0
  36. package/assets/esri/core/workers/chunks/282c4f3484c605ce7d5e.js +1 -0
  37. package/assets/esri/core/workers/chunks/2870723d57aa7b885896.js +1 -0
  38. package/assets/esri/core/workers/chunks/28bb6896c5fd353ca5e9.js +1 -0
  39. package/assets/esri/core/workers/chunks/2b867cec6ada339f1c8f.js +1 -0
  40. package/assets/esri/core/workers/chunks/{709dc98379f4ce18a0b5.js → 31186e83fe009aa0fd36.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{c779c8b98e07fa881c1d.js → 348c871657b0af621c33.js} +1 -1
  42. package/assets/esri/core/workers/chunks/35ca317490540fae437c.js +1 -0
  43. package/assets/esri/core/workers/chunks/{c5fe356fc5b8b7be0d31.js → 375f20f2e91d6a7507e8.js} +1 -1
  44. package/assets/esri/core/workers/chunks/3807d0b9b1894731174d.js +1 -0
  45. package/assets/esri/core/workers/chunks/38d874d7f815f5329420.js +1 -0
  46. package/assets/esri/core/workers/chunks/393274af1804e5b6046a.js +1 -0
  47. package/assets/esri/core/workers/chunks/3c3b1dc95f03082e4d5b.js +1 -0
  48. package/assets/esri/core/workers/chunks/3dcdbba706a8034b6ba3.js +1 -0
  49. package/assets/esri/core/workers/chunks/{834985ec601623df34a1.js → 3e11a893271caa11a881.js} +1 -1
  50. package/assets/esri/core/workers/chunks/4133ab8720e7e4afa9a6.js +1 -0
  51. package/assets/esri/core/workers/chunks/{b246ed6d86c2c8df56fb.js → 41f275401e1cde7eee20.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{595593dd03bcfba795c8.js → 4660798b3b45dcb5cecb.js} +2 -2
  53. package/assets/esri/core/workers/chunks/{69ae235423f0b1bdfcb4.js → 48c8ef4170e803a564d6.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{c90830ee562b5ddc4f8b.js → 49e6219dd08cb6c27023.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{00bbd37910c70989b54d.js → 4d0e099f34639cda3a9b.js} +1 -1
  56. package/assets/esri/core/workers/chunks/4d807bfe75108438db83.js +1 -0
  57. package/assets/esri/core/workers/chunks/{d1fc2c6e95fe2572d297.js → 50d9f69d5255af4b29bb.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{300b96f0f8e34b4a5d8b.js → 56de25a6fe659a5b5c2b.js} +1 -1
  59. package/assets/esri/core/workers/chunks/57c08ccb75e3135978d1.js +1 -0
  60. package/assets/esri/core/workers/chunks/5ad1985a9e66fb2232ae.js +1 -0
  61. package/assets/esri/core/workers/chunks/{d8494617cebc68e50d35.js → 5b7a2ee44883b1fb2a5f.js} +1 -1
  62. package/assets/esri/core/workers/chunks/5caf49e679ed0c27e0bd.js +1 -0
  63. package/assets/esri/core/workers/chunks/{f5c821ca2911a5103c9a.js → 5d15ca055071d7db6de8.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{59139347495988b19061.js → 61a9ffd4cf07d8bb7a9b.js} +1 -1
  65. package/assets/esri/core/workers/chunks/61e8e159f1f336569b27.js +1 -0
  66. package/assets/esri/core/workers/chunks/{88b8f33ce1cbf8a0f855.js → 633faa9cec8988ab06af.js} +4 -4
  67. package/assets/esri/core/workers/chunks/648c91a9822bc9d6ee47.js +1 -0
  68. package/assets/esri/core/workers/chunks/6aa349e1adf844df4b5b.js +1 -0
  69. package/assets/esri/core/workers/chunks/{d2371f5034b2a32e2523.js → 6cfa0967045068ce8a8b.js} +1 -1
  70. package/assets/esri/core/workers/chunks/{28d30be414e59eabd963.js → 70c8f69eed14d55c5cf6.js} +1 -1
  71. package/assets/esri/core/workers/chunks/{fdc8300b6374ef2b8b3e.js → 74881340e040bfd0580f.js} +1 -1
  72. package/assets/esri/core/workers/chunks/{8be81e1530b952c97936.js → 768ae52b4e5c3e571ef5.js} +1 -1
  73. package/assets/esri/core/workers/chunks/{b43473e84b3f7fa2634d.js → 77e611724a499d36eacc.js} +1 -1
  74. package/assets/esri/core/workers/chunks/7f8b85de079614b9c336.js +1 -0
  75. package/assets/esri/core/workers/chunks/{9280edff80fd87860a5e.js → 80a155496deef2c02a3e.js} +1 -1
  76. package/assets/esri/core/workers/chunks/{7db105f6b688b6da8106.js → 82ba4140e30f083fbc87.js} +1 -1
  77. package/assets/esri/core/workers/chunks/{672c04d48aa51f16e9b7.js → 8a6052b4d163d5088e11.js} +1 -1
  78. package/assets/esri/core/workers/chunks/{5b35b30495145bf8dd5d.js → 8ff2daef892881ff2019.js} +1 -1
  79. package/assets/esri/core/workers/chunks/9a855a10798348a21bab.js +1 -0
  80. package/assets/esri/core/workers/chunks/9bb6984f24cd5461a754.js +1 -0
  81. package/assets/esri/core/workers/chunks/9d9a639f7388a29e7c96.js +1 -0
  82. package/assets/esri/core/workers/chunks/{813efde41e90e652b7db.js → 9f2a3f37fe9b19ef1209.js} +1 -1
  83. package/assets/esri/core/workers/chunks/a1a7b0e7ca488c895cb7.js +1 -0
  84. package/assets/esri/core/workers/chunks/a6a2d4602dfeb62e0ecc.js +1 -0
  85. package/assets/esri/core/workers/chunks/{d3fd11da3a823e148957.js → ab88577987cf2fe1cb32.js} +1 -1
  86. package/assets/esri/core/workers/chunks/{a6767d75e718f2e1e714.js → ad9606164c694af0c61f.js} +1 -1
  87. package/assets/esri/core/workers/chunks/b18887a6dc86f0c8324a.js +1 -0
  88. package/assets/esri/core/workers/chunks/b240298b8b643a323d34.js +1 -0
  89. package/assets/esri/core/workers/chunks/{481c2b01e2fe92249698.js → b265472ac3f949a7f40c.js} +1 -1
  90. package/assets/esri/core/workers/chunks/b47f26d6aa9a2848a677.js +1 -0
  91. package/assets/esri/core/workers/chunks/{4094cebc4b92c52f4e27.js → b48abbf877e26ed1a4f8.js} +1 -1
  92. package/assets/esri/core/workers/chunks/b510c07dfd0d31683b08.js +1 -0
  93. package/assets/esri/core/workers/chunks/b661ea374fe38c8e29ca.js +1 -0
  94. package/assets/esri/core/workers/chunks/b8f55ee77ab6ea4c289e.js +1 -0
  95. package/assets/esri/core/workers/chunks/{ccd157ede169b93eea65.js → bb0a1be03bb9d621432c.js} +1 -1
  96. package/assets/esri/core/workers/chunks/{fdae43a97537093e4b97.js → bdf0ab95401c6d8fbc7d.js} +1 -1
  97. package/assets/esri/core/workers/chunks/c20862fe15295a294bbd.js +1 -0
  98. package/assets/esri/core/workers/chunks/{365d63c2aed3a49918f2.js → c27783ce7ea51a5e49c5.js} +1 -1
  99. package/assets/esri/core/workers/chunks/{ce937ff0dd1147ea297e.js → c3020747f9001ca6a6e7.js} +1 -1
  100. package/assets/esri/core/workers/chunks/{516864fb68025acc7db6.js → c547692862df95d22818.js} +1 -1
  101. package/assets/esri/core/workers/chunks/c5c6a32a24005478c976.js +1 -0
  102. package/assets/esri/core/workers/chunks/{e4acc3c2b6d865ed1940.js → c7c76a8a1c47eb62bef1.js} +1 -1
  103. package/assets/esri/core/workers/chunks/{58422c616a824ab49218.js → c84665db250b05e2829d.js} +1 -1
  104. package/assets/esri/core/workers/chunks/cb6a9b43406f4fbe10b2.js +1 -0
  105. package/assets/esri/core/workers/chunks/{cef9ff811221a7c3812c.js → cb90cfa35d77ab561939.js} +1 -1
  106. package/assets/esri/core/workers/chunks/ced12ad98f8f48d0dc00.js +1 -0
  107. package/assets/esri/core/workers/chunks/{bd451668c4ce9f7d7128.js → d56548a994753b08403c.js} +1 -1
  108. package/assets/esri/core/workers/chunks/{251b7f2e295ce191eb62.js → da4163b4f9b34e83c92d.js} +1 -1
  109. package/assets/esri/core/workers/chunks/{43fba9d6be5971ec20a9.js → e0017c6739d2532793e6.js} +1 -1
  110. package/assets/esri/core/workers/chunks/e22b400636094fc7b6c0.js +1 -0
  111. package/assets/esri/core/workers/chunks/{0296ebe8e37e30af771c.js → e2fdc4dc1ab9decd731e.js} +1 -1
  112. package/assets/esri/core/workers/chunks/e34136ad9d620cb845fd.js +1 -0
  113. package/assets/esri/core/workers/chunks/e537e1d37f3fcb14fce2.js +1 -0
  114. package/assets/esri/core/workers/chunks/e5baa30944061418cb13.js +1 -0
  115. package/assets/esri/core/workers/chunks/edef1e2254c992459c63.js +1 -0
  116. package/assets/esri/core/workers/chunks/{109149c378aa4c5f8526.js → eea9d49d55c2d1355497.js} +1 -1
  117. package/assets/esri/core/workers/chunks/{3245663da75e168bf85c.js → ef75cad6570b14a42b62.js} +1 -1
  118. package/assets/esri/core/workers/chunks/{2a2a925c45d5fd58628b.js → f3284d4e0d41efb0b4a0.js} +1 -1
  119. package/assets/esri/core/workers/chunks/f62717338075df626eda.js +1 -0
  120. package/assets/esri/core/workers/chunks/{d07d3b0e06f12aee4a8b.js → f6ce485c082d0d640b01.js} +1 -1
  121. package/assets/esri/core/workers/chunks/fb6ebb780bb59e252887.js +1 -0
  122. package/assets/esri/core/workers/chunks/{69e6000044bfb03776ac.js → fd34c033ce7f16835368.js} +1 -1
  123. package/assets/esri/core/workers/chunks/fdadf11f31384c09db9f.js +1 -0
  124. package/assets/esri/core/workers/chunks/{80bd5988180f4618fd61.js → ff6d189ba78980d40bb5.js} +1 -1
  125. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  126. package/assets/esri/widgets/Sketch/t9n/Sketch_ar.json +1 -1
  127. package/assets/esri/widgets/Sketch/t9n/Sketch_bg.json +1 -1
  128. package/assets/esri/widgets/Sketch/t9n/Sketch_bs.json +1 -1
  129. package/assets/esri/widgets/Sketch/t9n/Sketch_ca.json +1 -1
  130. package/assets/esri/widgets/Sketch/t9n/Sketch_cs.json +1 -1
  131. package/assets/esri/widgets/Sketch/t9n/Sketch_da.json +1 -1
  132. package/assets/esri/widgets/Sketch/t9n/Sketch_de.json +1 -1
  133. package/assets/esri/widgets/Sketch/t9n/Sketch_el.json +1 -1
  134. package/assets/esri/widgets/Sketch/t9n/Sketch_es.json +1 -1
  135. package/assets/esri/widgets/Sketch/t9n/Sketch_et.json +1 -1
  136. package/assets/esri/widgets/Sketch/t9n/Sketch_fi.json +1 -1
  137. package/assets/esri/widgets/Sketch/t9n/Sketch_fr.json +1 -1
  138. package/assets/esri/widgets/Sketch/t9n/Sketch_he.json +1 -1
  139. package/assets/esri/widgets/Sketch/t9n/Sketch_hr.json +1 -1
  140. package/assets/esri/widgets/Sketch/t9n/Sketch_hu.json +1 -1
  141. package/assets/esri/widgets/Sketch/t9n/Sketch_id.json +1 -1
  142. package/assets/esri/widgets/Sketch/t9n/Sketch_it.json +1 -1
  143. package/assets/esri/widgets/Sketch/t9n/Sketch_ja.json +1 -1
  144. package/assets/esri/widgets/Sketch/t9n/Sketch_ko.json +1 -1
  145. package/assets/esri/widgets/Sketch/t9n/Sketch_lt.json +1 -1
  146. package/assets/esri/widgets/Sketch/t9n/Sketch_lv.json +1 -1
  147. package/assets/esri/widgets/Sketch/t9n/Sketch_nl.json +1 -1
  148. package/assets/esri/widgets/Sketch/t9n/Sketch_no.json +1 -1
  149. package/assets/esri/widgets/Sketch/t9n/Sketch_pl.json +1 -1
  150. package/assets/esri/widgets/Sketch/t9n/Sketch_pt-BR.json +1 -1
  151. package/assets/esri/widgets/Sketch/t9n/Sketch_pt-PT.json +1 -1
  152. package/assets/esri/widgets/Sketch/t9n/Sketch_ro.json +1 -1
  153. package/assets/esri/widgets/Sketch/t9n/Sketch_ru.json +1 -1
  154. package/assets/esri/widgets/Sketch/t9n/Sketch_sk.json +1 -1
  155. package/assets/esri/widgets/Sketch/t9n/Sketch_sl.json +1 -1
  156. package/assets/esri/widgets/Sketch/t9n/Sketch_sr.json +1 -1
  157. package/assets/esri/widgets/Sketch/t9n/Sketch_sv.json +1 -1
  158. package/assets/esri/widgets/Sketch/t9n/Sketch_th.json +1 -1
  159. package/assets/esri/widgets/Sketch/t9n/Sketch_tr.json +1 -1
  160. package/assets/esri/widgets/Sketch/t9n/Sketch_uk.json +1 -1
  161. package/assets/esri/widgets/Sketch/t9n/Sketch_vi.json +1 -1
  162. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-CN.json +1 -1
  163. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-HK.json +1 -1
  164. package/assets/esri/widgets/Sketch/t9n/Sketch_zh-TW.json +1 -1
  165. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ar.json +1 -1
  166. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_bg.json +1 -1
  167. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_bs.json +1 -1
  168. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ca.json +1 -1
  169. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_cs.json +1 -1
  170. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_da.json +1 -1
  171. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_de.json +1 -1
  172. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_el.json +1 -1
  173. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_es.json +1 -1
  174. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_et.json +1 -1
  175. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_fi.json +1 -1
  176. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_fr.json +1 -1
  177. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_he.json +1 -1
  178. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_hr.json +1 -1
  179. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_hu.json +1 -1
  180. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_id.json +1 -1
  181. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_it.json +1 -1
  182. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ja.json +1 -1
  183. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ko.json +1 -1
  184. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_lt.json +1 -1
  185. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_lv.json +1 -1
  186. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_nl.json +1 -1
  187. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_no.json +1 -1
  188. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_pl.json +1 -1
  189. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_pt-BR.json +1 -1
  190. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_pt-PT.json +1 -1
  191. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ro.json +1 -1
  192. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ru.json +1 -1
  193. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_sk.json +1 -1
  194. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_sl.json +1 -1
  195. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_sr.json +1 -1
  196. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_sv.json +1 -1
  197. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_th.json +1 -1
  198. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_tr.json +1 -1
  199. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_uk.json +1 -1
  200. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_vi.json +1 -1
  201. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_zh-CN.json +1 -1
  202. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_zh-HK.json +1 -1
  203. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_zh-TW.json +1 -1
  204. package/chunks/Bufferer-Dw9Qi4T1.js +1 -1
  205. package/chunks/Distance2DCalculator-CXhBP-8I.js +1 -1
  206. package/chunks/GaussianSplat.glsl.js +2 -2
  207. package/chunks/GeodeticDistanceCalculator-Ce-woMPw.js +1 -1
  208. package/chunks/GeodeticUtils.js +1 -1
  209. package/chunks/GlowBlur.glsl.js +5 -5
  210. package/chunks/MultiPathImpl.js +1 -1
  211. package/chunks/OITBlend.glsl.js +9 -7
  212. package/chunks/OperatorCrosses.js +1 -1
  213. package/chunks/OperatorCut.js +1 -1
  214. package/chunks/OperatorGeodesicBuffer.js +1 -1
  215. package/chunks/OperatorGeodeticArea.js +1 -1
  216. package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
  217. package/chunks/OperatorGeodeticLength.js +1 -1
  218. package/chunks/OperatorIntersects.js +1 -1
  219. package/chunks/OperatorMultiPartToSinglePart.js +1 -1
  220. package/chunks/OperatorOverlaps.js +1 -1
  221. package/chunks/OperatorProximity.js +1 -1
  222. package/chunks/OperatorProximityGeodesic.js +1 -1
  223. package/chunks/OperatorShapePreservingLength.js +1 -1
  224. package/chunks/OperatorShapePreservingProject.js +1 -1
  225. package/chunks/OperatorSimplifyOGC.js +1 -1
  226. package/chunks/OperatorTouches.js +1 -1
  227. package/chunks/OperatorWithin.js +1 -1
  228. package/chunks/Point2D.js +1 -1
  229. package/chunks/ProjectionTransformation.js +1 -1
  230. package/chunks/SideCalculator2D-BNwb5gvz.js +1 -1
  231. package/chunks/UnitFactory.js +1 -1
  232. package/chunks/containsOperator.js +1 -1
  233. package/chunks/disjointOperator.js +1 -1
  234. package/chunks/equalsOperator.js +1 -1
  235. package/chunks/relateOperator.js +1 -1
  236. package/config.js +1 -1
  237. package/geohash/geohashUtils.js +1 -1
  238. package/geometry/operators/gx/operatorAutoComplete.js +1 -1
  239. package/geometry/operators/gx/operatorBuffer.js +1 -1
  240. package/geometry/operators/gx/operatorDifference.js +1 -1
  241. package/geometry/operators/gx/operatorGraphicBuffer.js +1 -1
  242. package/geometry/operators/gx/operatorIntegrate.js +1 -1
  243. package/geometry/operators/gx/operatorIntersection.js +1 -1
  244. package/geometry/operators/gx/operatorLabelPoint.js +1 -1
  245. package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
  246. package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
  247. package/geometry/operators/gx/operatorSimplify.js +1 -1
  248. package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
  249. package/geometry/operators/gx/operatorUnion.js +1 -1
  250. package/geometry/operators/json/containsOperator.js +1 -1
  251. package/geometry/operators/json/disjointOperator.js +1 -1
  252. package/geometry/operators/json/projectOperator.js +5 -0
  253. package/geometry/operators/projectOperator.js +1 -1
  254. package/geometry/operators/reshapeOperator.js +1 -1
  255. package/geometry/operators/shapePreservingProjectOperator.js +1 -1
  256. package/geometry/operators/support/geographicTransformationUtils.js +1 -1
  257. package/geometry/operators/support/initNoPeFactory.js +1 -1
  258. package/geometry/operators/support/jsonConverter.js +1 -1
  259. package/geometry/operators/support/projectionTransformation.js +5 -0
  260. package/geometry/projectionUtils.js +1 -1
  261. package/geometry/support/GeographicTransformation.js +1 -1
  262. package/geometry/support/GeographicTransformationStep.js +1 -1
  263. package/interfaces.d.ts +359 -0
  264. package/intl/date.js +1 -1
  265. package/kernel.js +1 -1
  266. package/layers/graphics/data/QueryEngine.js +1 -1
  267. package/layers/graphics/data/projectionSupport.js +1 -1
  268. package/layers/graphics/data/queryUtils.js +1 -1
  269. package/layers/graphics/sources/support/CSVSourceWorker.js +1 -1
  270. package/layers/support/DateTimeFieldFormat.d.ts +4 -0
  271. package/layers/support/FieldConfiguration.d.ts +4 -0
  272. package/layers/support/NumberFieldFormat.d.ts +4 -0
  273. package/layers/support/vectorTileLayerLoader.js +1 -1
  274. package/package.json +2 -2
  275. package/support/revision.js +1 -1
  276. package/views/2d/engine/flow/dataUtils.js +1 -1
  277. package/views/2d/engine/flow/utils.js +1 -1
  278. package/views/2d/layers/MediaLayerView2D.js +1 -1
  279. package/views/2d/layers/TileLayerView2D.js +1 -1
  280. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementError.d.ts +4 -0
  281. package/views/3d/{support/flow/VisualQuery3D.js → analysis/VolumeMeasurement/VolumeMeasurementError.js} +1 -1
  282. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
  283. package/views/3d/layers/FlowSubView3D.js +1 -1
  284. package/views/3d/state/ViewState.js +1 -1
  285. package/views/3d/state/controllers/SurfaceCollisionCorrectionController.js +1 -1
  286. package/views/3d/support/DisplayQualityProfile.js +1 -1
  287. package/views/3d/support/QualitySettings.js +1 -1
  288. package/views/3d/support/flow/FlowQuery3D.js +5 -0
  289. package/views/3d/support/flow/FlowSubViewExtent3D.js +1 -1
  290. package/views/3d/support/flow/FlowSubViewTiles3D.js +1 -1
  291. package/views/3d/support/flow/FlowWorker.js +1 -1
  292. package/views/3d/support/flow/StreamlineResources3D.js +1 -1
  293. package/views/3d/support/flow/geometryUtils.js +1 -1
  294. package/views/3d/support/flow/loadUtils.js +1 -1
  295. package/views/3d/support/pointsOfInterest/StableSurfaceCenter.js +1 -1
  296. package/views/3d/webgl-engine/core/shaderLibrary/output/Emissions.glsl.js +2 -2
  297. package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
  298. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  299. package/views/3d/webgl-engine/effects/transparency/OITBlendTechnique.js +1 -1
  300. package/views/3d/webgl-engine/effects/transparency/OITBlendTechniqueConfiguration.js +1 -1
  301. package/views/3d/webgl-engine/lib/CutFillColor.js +1 -1
  302. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  303. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  304. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  305. package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
  306. package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
  307. package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
  308. package/views/VideoView.js +1 -1
  309. package/views/webgl/enums.js +1 -1
  310. package/views/webgl/renderState.js +1 -1
  311. package/webmap/utils.js +1 -1
  312. package/widgets/Editor/Upload.js +1 -1
  313. package/widgets/FeatureTable/FieldColumn.js +1 -1
  314. package/widgets/FeatureTable/support/tableUtils.js +1 -1
  315. package/widgets/OrientedImageryViewer.js +1 -1
  316. package/assets/esri/core/workers/chunks/0103b70126bc5dffc55e.js +0 -1
  317. package/assets/esri/core/workers/chunks/03ef19f0753d68770444.js +0 -1
  318. package/assets/esri/core/workers/chunks/050429f516149ce3b517.js +0 -1
  319. package/assets/esri/core/workers/chunks/09f1a27442bdd52cdeb7.js +0 -1
  320. package/assets/esri/core/workers/chunks/0fadd1defbb6743dacdc.js +0 -1
  321. package/assets/esri/core/workers/chunks/124f8757ea18bfd158ec.js +0 -1
  322. package/assets/esri/core/workers/chunks/135142f3cbfaf24949bc.js +0 -1
  323. package/assets/esri/core/workers/chunks/138c11b5eca621e51396.js +0 -1
  324. package/assets/esri/core/workers/chunks/14743a962e661babe0a4.js +0 -1
  325. package/assets/esri/core/workers/chunks/1bf17c6548ac4cd5a166.js +0 -1
  326. package/assets/esri/core/workers/chunks/1d9212a70df68a508dca.js +0 -1
  327. package/assets/esri/core/workers/chunks/213e82a7e3fa5b253ec1.js +0 -1
  328. package/assets/esri/core/workers/chunks/3b23c37e5bc552dc81d4.js +0 -1
  329. package/assets/esri/core/workers/chunks/3d68a650a1f944ec5171.js +0 -1
  330. package/assets/esri/core/workers/chunks/451555af283b32a10fef.js +0 -1
  331. package/assets/esri/core/workers/chunks/48913b944c28343816ac.js +0 -1
  332. package/assets/esri/core/workers/chunks/4e6e8dda6c12f6fbed8e.js +0 -1
  333. package/assets/esri/core/workers/chunks/4e77b9cc1d9437bcbb0c.js +0 -1
  334. package/assets/esri/core/workers/chunks/5019f1b8186a65a0313b.js +0 -1
  335. package/assets/esri/core/workers/chunks/547af4ffbeeccba9d187.js +0 -1
  336. package/assets/esri/core/workers/chunks/589a0e244ef5f1b84ab6.js +0 -1
  337. package/assets/esri/core/workers/chunks/59e27818cb68f0285d54.js +0 -1
  338. package/assets/esri/core/workers/chunks/5e1d6704ee0aa41b1d06.js +0 -1
  339. package/assets/esri/core/workers/chunks/6b0baecbd35d26393dcf.js +0 -1
  340. package/assets/esri/core/workers/chunks/6dafb2b95bae552c1cc2.js +0 -1
  341. package/assets/esri/core/workers/chunks/71df48968d6cdc736458.js +0 -1
  342. package/assets/esri/core/workers/chunks/773d106f60f7dad1493d.js +0 -1
  343. package/assets/esri/core/workers/chunks/79c4f10da8360ee60cd2.js +0 -1
  344. package/assets/esri/core/workers/chunks/7aa7aff6d42be7c2d1d2.js +0 -1
  345. package/assets/esri/core/workers/chunks/82404ff7c298493ff6f4.js +0 -1
  346. package/assets/esri/core/workers/chunks/84a556dafd583635ad5e.js +0 -1
  347. package/assets/esri/core/workers/chunks/885a398de8a33d36c59e.js +0 -1
  348. package/assets/esri/core/workers/chunks/8bd6c27a93a697a7fa3d.js +0 -1
  349. package/assets/esri/core/workers/chunks/8be9fa12e854a83062c3.js +0 -1
  350. package/assets/esri/core/workers/chunks/9386a0ebff78b6303ed2.js +0 -1
  351. package/assets/esri/core/workers/chunks/9673e25114fc1897460d.js +0 -1
  352. package/assets/esri/core/workers/chunks/96a14689815bec741308.js +0 -1
  353. package/assets/esri/core/workers/chunks/977582cb3c8f17a2cb4c.js +0 -1
  354. package/assets/esri/core/workers/chunks/97d71459ad72b4b780a3.js +0 -1
  355. package/assets/esri/core/workers/chunks/a1abe9865d66789bd5af.js +0 -1
  356. package/assets/esri/core/workers/chunks/a7ea2e3895046e566bc6.js +0 -1
  357. package/assets/esri/core/workers/chunks/a96e58ed9a4a2329ee53.js +0 -1
  358. package/assets/esri/core/workers/chunks/aa778e5d7db40d9b9b4a.js +0 -1
  359. package/assets/esri/core/workers/chunks/acb49f3d2b783e81a215.js +0 -1
  360. package/assets/esri/core/workers/chunks/b0a03b6edbcf6e933431.js +0 -1
  361. package/assets/esri/core/workers/chunks/bc83bcfe123525d21884.js +0 -1
  362. package/assets/esri/core/workers/chunks/bd028badc07270eda3d0.js +0 -1
  363. package/assets/esri/core/workers/chunks/be8dd8e68c8805300ad1.js +0 -1
  364. package/assets/esri/core/workers/chunks/c1d75c48558ed23c5b2b.js +0 -1
  365. package/assets/esri/core/workers/chunks/c24214666d10cb648428.js +0 -1
  366. package/assets/esri/core/workers/chunks/c3010d783506f8410f99.js +0 -1
  367. package/assets/esri/core/workers/chunks/d0296368ae143de4d5ce.js +0 -1
  368. package/assets/esri/core/workers/chunks/d51aabb9b950f49df183.js +0 -1
  369. package/assets/esri/core/workers/chunks/d8a0eb143b2079d7b6b7.js +0 -1
  370. package/assets/esri/core/workers/chunks/dca2b487152cde45fb65.js +0 -1
  371. package/assets/esri/core/workers/chunks/e760b8ca64d67c04d98a.js +0 -1
  372. package/assets/esri/core/workers/chunks/ee78a38a0cacb19b2fd4.js +0 -1
  373. package/assets/esri/core/workers/chunks/f5710ced8d38f9a90fc5.js +0 -1
  374. package/assets/esri/core/workers/chunks/f592c4e5e1746d4619db.js +0 -1
  375. package/assets/esri/core/workers/chunks/f8d2c52cc51d5f1bbce2.js +0 -1
  376. package/assets/esri/core/workers/chunks/f9decc88561c03aca3c9.js +0 -1
  377. package/assets/esri/core/workers/chunks/fd1fdb97a294a1b7041d.js +0 -1
  378. package/assets/esri/core/workers/chunks/ffee8cc83d703c1dc0c0.js +0 -1
  379. package/chunks/CompositeGeographicTransformation.js +0 -5
  380. package/chunks/GeographicTransformation.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.34/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../request.js";import{createTask as t}from"../../../../core/asyncUtils.js";import{parseDate as i}from"../../../../core/date.js";import n from"../../../../core/Error.js";import r from"../../../../core/Logger.js";import{isAbortError as s}from"../../../../core/promiseUtils.js";import{urlToObject as o,getFilename as a}from"../../../../core/urlUtils.js";import{projectMany as l}from"../../../../geometry/projectionUtils.js";import m from"../../../../geometry/SpatialReference.js";import{jsonAdapter as c}from"../../../../geometry/geometryAdapters/json.js";import{equals as d,isWebMercator as u,wgs84 as f}from"../../../../geometry/support/spatialReferenceUtils.js";import{lngLatToXY as p}from"../../../../geometry/support/webMercatorUtils.js";import{OptimizedFeature as y}from"../../OptimizedFeature.js";import h from"../../OptimizedGeometry.js";import g from"../../data/FeatureStore.js";import{checkProjectionSupport as I}from"../../data/projectionSupport.js";import{QueryEngine as _}from"../../data/QueryEngine.js";import{parseRows as F,parseNumber as w,severSlicedString as E,readRows as j,inferDelimiterAndLocationInfo as T,extractFieldNamesAndAliasesFromRow as x,inferFields as N}from"../csv/csv.js";import{createDefaultAttributesFunction as S,createDrawingInfo as q}from"./clientSideDefaults.js";import b from"../../../support/FieldsIndex.js";import{getFieldDefaultValue as C}from"../../../support/fieldUtils.js";import{isNumber as O}from"../../../../support/guards.js";import{utc as v}from"../../../../time/constants.js";const D=q("esriGeometryPoint"),k=["csv"],P=[0,0];class R{constructor(e,t){this.x=e,this.y=t}}class V{constructor(){this._queryEngine=null,this._snapshotFeatures=async e=>{const t=await this._fetch(e);return this._createFeatures(t)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(e,t={}){this._loadOptions=e;const[i]=await Promise.all([this._fetch(t.signal),this._checkProjection(e?.parsingOptions?.spatialReference)]),n=A(i,e);this._locationInfo=n.locationInfo,this._delimiter=n.delimiter,this._queryEngine=this._createQueryEngine(n);const r=this._createFeatures(i);this._queryEngine.featureStore.addMany(r);const{fullExtent:s,timeExtent:o}=await this._queryEngine.fetchRecomputedExtents();if(n.layerDefinition.extent=s,o){const{start:e,end:t}=o;n.layerDefinition.timeInfo.timeExtent=[e,t]}return n}async applyEdits(){throw new n("csv-layer:editing-not-supported","applyEdits() is not supported on CSVLayer")}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){await this._waitSnapshotComplete();return(await this._queryEngine.executeQueryForIds(e,t.signal)).filter(O)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),await this._queryEngine.executeQueryForSnapping(e,t.signal)}async queryAttributeBins(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeAttributeBinsQuery(e,t.signal)}async refresh(e){this._loadOptions.customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=t(this._snapshotFeatures),this._snapshotTask.promise.then(e=>{this._queryEngine.featureStore.clear(),e&&this._queryEngine.featureStore.addMany(e)},e=>{this._queryEngine.featureStore.clear(),s(e)||r.getLogger("esri.layers.CSVLayer").error(new n("csv-layer:refresh","An error occurred during refresh",{error:e}))}),await this._waitSnapshotComplete();const{fullExtent:i,timeExtent:o}=await this._queryEngine.fetchRecomputedExtents();return{extent:i,timeExtent:o}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(t){const{url:i,customParameters:r}=this._loadOptions;if(!i)throw new n("csv-layer:invalid-source","url not defined");const s=o(i);return(await e(s.path,{query:{...s.query,...r},responseType:"text",signal:t})).data}_createQueryEngine(e){const{objectIdField:t,fields:i,extent:n,timeInfo:r}=e.layerDefinition,s=new g({geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1}),o={type:"object-id",fieldName:t};return new _({fieldsIndex:b.fromLayerJSON({fields:i,dateFieldsTimeReference:{timeZoneIANA:v}}),geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1,timeInfo:r,featureIdInfo:o,spatialReference:n.spatialReference||{wkid:4326},featureStore:s})}_createFeatures(e){const{latitudeFieldName:t,longitudeFieldName:n}=this._locationInfo,{objectIdField:r,fieldsIndex:s,spatialReference:o}=this._queryEngine;let a=[];const f=[],g=s.fields.filter(e=>e.name!==r).map(e=>e.name);let I=0;const _={};for(const i of s.fields)if("esriFieldTypeOID"!==i.type&&"esriFieldTypeGlobalID"!==i.type){const e=C(i);void 0!==e&&(_[i.name]=e)}const j=F(e,g,this._delimiter,S(_,r));for(const l of j){const e=this._parseCoordinateValue(l[t]),o=this._parseCoordinateValue(l[n]);if(null!=o&&null!=e&&!isNaN(e)&&!isNaN(o)){l[t]=e,l[n]=o;for(const e in l)if(e!==t&&e!==n)if(s.isDateField(e))l[e]=i(l[e]);else if(s.isNumericField(e)){const t=w(l[e]);isNaN(t)?l[e]=null:l[e]=t}else null!=l[e]&&(l[e]=E(l[e]));l[r]=I,I++,a.push(new R(o,e)),f.push(l)}}if(!d({wkid:4326},o))if(u(o))for(const i of a)[i.x,i.y]=p(i.x,i.y,P);else a=l(c,a,m.WGS84,o,null,null);const T=[];for(let i=0;i<a.length;i++){const{x:e,y:t}=a[i],n=f[i];n[r]=i+1,T.push(new y(new h([],[e,t]),n,null,n[r]))}return T}_parseCoordinateValue(e){if(null==e||""===e)return null;let t=w(e);return(isNaN(t)||Math.abs(t)>181)&&(t=parseFloat(e)),t}async _checkProjection(e){try{await I(f,e)}catch{throw new n("csv-layer:projection-not-supported","Projection not supported")}}}function A(e,t){const i=t.parsingOptions||{},r={delimiter:i.delimiter,layerDefinition:null,locationInfo:{latitudeFieldName:i.latitudeField,longitudeFieldName:i.longitudeField}},s=r.layerDefinition={name:a(t.url,k)||"csv",dateFieldsTimeReference:{timeZoneIANA:v},drawingInfo:D,geometryType:"esriGeometryPoint",objectIdField:null,fields:[],timeInfo:i.timeInfo,extent:{xmin:Number.POSITIVE_INFINITY,ymin:Number.POSITIVE_INFINITY,xmax:Number.NEGATIVE_INFINITY,ymax:Number.NEGATIVE_INFINITY,spatialReference:i.spatialReference||{wkid:4326}}},o=j(e),l=o.next().value?.trim(),m=o.next().value?.trim();if(!l)throw new n("csv-layer:empty-csv","CSV is empty",{csv:e});const{delimiter:c,locationInfo:d}=T(l,m,i);if(!c)throw new n("csv-layer:invalid-delimiter","Unable to detect the delimiter from CSV",{firstLine:l,secondLine:m,parsingOptions:i});if(!d)throw new n("csv-layer:location-fields-not-found","Unable to identify latitude and longitude fields from the CSV file",{firstLine:l,secondLine:m,parsingOptions:i});r.locationInfo=d,r.delimiter=c;const{names:u,aliases:f}=x(l,c),p=N(e,r.delimiter,u,f,r.locationInfo);if(i.fields?.length){const e=new b(i.fields);for(const t of p){const i=e.get(t.name);i&&Object.assign(t,i)}}if(!p.some(e=>"esriFieldTypeOID"===e.type&&(s.objectIdField=e.name,!0))){const e={name:"__OBJECTID",alias:"__OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1};s.objectIdField=e.name,p.unshift(e)}s.fields=p;const y=new b(s.fields);if(r.locationInfo&&(r.locationInfo.latitudeFieldName=y.get(r.locationInfo.latitudeFieldName).name,r.locationInfo.longitudeFieldName=y.get(r.locationInfo.longitudeFieldName).name),s.timeInfo){const e=s.timeInfo;if(e.startTimeField){const t=y.get(e.startTimeField);t?(e.startTimeField=t.name,t.type="esriFieldTypeDate"):e.startTimeField=null}if(e.endTimeField){const t=y.get(e.endTimeField);t?(e.endTimeField=t.name,t.type="esriFieldTypeDate"):e.endTimeField=null}if(e.trackIdField){const t=y.get(e.trackIdField);e.trackIdField=t?t.name:null}e.startTimeField||e.endTimeField||(s.timeInfo=null)}return r}export{V as default};
5
+ import e from"../../../../request.js";import{createTask as t}from"../../../../core/asyncUtils.js";import{parseDate as i}from"../../../../core/date.js";import n from"../../../../core/Error.js";import r from"../../../../core/Logger.js";import{isAbortError as s}from"../../../../core/promiseUtils.js";import{urlToObject as o,getFilename as a}from"../../../../core/urlUtils.js";import{projectMany as l}from"../../../../geometry/projectionUtils.js";import c from"../../../../geometry/SpatialReference.js";import{equals as m,isWebMercator as d,wgs84 as u}from"../../../../geometry/support/spatialReferenceUtils.js";import{lngLatToXY as f}from"../../../../geometry/support/webMercatorUtils.js";import{OptimizedFeature as p}from"../../OptimizedFeature.js";import y from"../../OptimizedGeometry.js";import h from"../../data/FeatureStore.js";import{checkProjectionSupport as g}from"../../data/projectionSupport.js";import{QueryEngine as I}from"../../data/QueryEngine.js";import{parseRows as _,parseNumber as F,severSlicedString as w,readRows as E,inferDelimiterAndLocationInfo as T,extractFieldNamesAndAliasesFromRow as j,inferFields as x}from"../csv/csv.js";import{createDefaultAttributesFunction as N,createDrawingInfo as S}from"./clientSideDefaults.js";import q from"../../../support/FieldsIndex.js";import{getFieldDefaultValue as b}from"../../../support/fieldUtils.js";import{isNumber as C}from"../../../../support/guards.js";import{utc as O}from"../../../../time/constants.js";const v=S("esriGeometryPoint"),D=["csv"],k=[0,0];class P{constructor(e,t){this.x=e,this.y=t}}class R{constructor(){this._queryEngine=null,this._snapshotFeatures=async e=>{const t=await this._fetch(e);return this._createFeatures(t)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(e,t={}){this._loadOptions=e;const[i]=await Promise.all([this._fetch(t.signal),this._checkProjection(e?.parsingOptions?.spatialReference)]),n=V(i,e);this._locationInfo=n.locationInfo,this._delimiter=n.delimiter,this._queryEngine=this._createQueryEngine(n);const r=this._createFeatures(i);this._queryEngine.featureStore.addMany(r);const{fullExtent:s,timeExtent:o}=await this._queryEngine.fetchRecomputedExtents();if(n.layerDefinition.extent=s,o){const{start:e,end:t}=o;n.layerDefinition.timeInfo.timeExtent=[e,t]}return n}async applyEdits(){throw new n("csv-layer:editing-not-supported","applyEdits() is not supported on CSVLayer")}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){await this._waitSnapshotComplete();return(await this._queryEngine.executeQueryForIds(e,t.signal)).filter(C)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),await this._queryEngine.executeQueryForSnapping(e,t.signal)}async queryAttributeBins(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeAttributeBinsQuery(e,t.signal)}async refresh(e){this._loadOptions.customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=t(this._snapshotFeatures),this._snapshotTask.promise.then(e=>{this._queryEngine.featureStore.clear(),e&&this._queryEngine.featureStore.addMany(e)},e=>{this._queryEngine.featureStore.clear(),s(e)||r.getLogger("esri.layers.CSVLayer").error(new n("csv-layer:refresh","An error occurred during refresh",{error:e}))}),await this._waitSnapshotComplete();const{fullExtent:i,timeExtent:o}=await this._queryEngine.fetchRecomputedExtents();return{extent:i,timeExtent:o}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(t){const{url:i,customParameters:r}=this._loadOptions;if(!i)throw new n("csv-layer:invalid-source","url not defined");const s=o(i);return(await e(s.path,{query:{...s.query,...r},responseType:"text",signal:t})).data}_createQueryEngine(e){const{objectIdField:t,fields:i,extent:n,timeInfo:r}=e.layerDefinition,s=new h({geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1}),o={type:"object-id",fieldName:t};return new I({fieldsIndex:q.fromLayerJSON({fields:i,dateFieldsTimeReference:{timeZoneIANA:O}}),geometryType:"esriGeometryPoint",hasM:!1,hasZ:!1,timeInfo:r,featureIdInfo:o,spatialReference:n.spatialReference||{wkid:4326},featureStore:s})}_createFeatures(e){const{latitudeFieldName:t,longitudeFieldName:n}=this._locationInfo,{objectIdField:r,fieldsIndex:s,spatialReference:o}=this._queryEngine;let a=[];const u=[],h=s.fields.filter(e=>e.name!==r).map(e=>e.name);let g=0;const I={};for(const i of s.fields)if("esriFieldTypeOID"!==i.type&&"esriFieldTypeGlobalID"!==i.type){const e=b(i);void 0!==e&&(I[i.name]=e)}const E=_(e,h,this._delimiter,N(I,r));for(const l of E){const e=this._parseCoordinateValue(l[t]),o=this._parseCoordinateValue(l[n]);if(null!=o&&null!=e&&!isNaN(e)&&!isNaN(o)){l[t]=e,l[n]=o;for(const e in l)if(e!==t&&e!==n)if(s.isDateField(e))l[e]=i(l[e]);else if(s.isNumericField(e)){const t=F(l[e]);isNaN(t)?l[e]=null:l[e]=t}else null!=l[e]&&(l[e]=w(l[e]));l[r]=g,g++,a.push(new P(o,e)),u.push(l)}}if(!m({wkid:4326},o))if(d(o))for(const i of a)[i.x,i.y]=f(i.x,i.y,k);else a=l(a,c.WGS84,o);const T=[];for(let i=0;i<a.length;i++){const{x:e,y:t}=a[i],n=u[i];n[r]=i+1,T.push(new p(new y([],[e,t]),n,null,n[r]))}return T}_parseCoordinateValue(e){if(null==e||""===e)return null;let t=F(e);return(isNaN(t)||Math.abs(t)>181)&&(t=parseFloat(e)),t}async _checkProjection(e){try{await g(u,e)}catch{throw new n("csv-layer:projection-not-supported","Projection not supported")}}}function V(e,t){const i=t.parsingOptions||{},r={delimiter:i.delimiter,layerDefinition:null,locationInfo:{latitudeFieldName:i.latitudeField,longitudeFieldName:i.longitudeField}},s=r.layerDefinition={name:a(t.url,D)||"csv",dateFieldsTimeReference:{timeZoneIANA:O},drawingInfo:v,geometryType:"esriGeometryPoint",objectIdField:null,fields:[],timeInfo:i.timeInfo,extent:{xmin:Number.POSITIVE_INFINITY,ymin:Number.POSITIVE_INFINITY,xmax:Number.NEGATIVE_INFINITY,ymax:Number.NEGATIVE_INFINITY,spatialReference:i.spatialReference||{wkid:4326}}},o=E(e),l=o.next().value?.trim(),c=o.next().value?.trim();if(!l)throw new n("csv-layer:empty-csv","CSV is empty",{csv:e});const{delimiter:m,locationInfo:d}=T(l,c,i);if(!m)throw new n("csv-layer:invalid-delimiter","Unable to detect the delimiter from CSV",{firstLine:l,secondLine:c,parsingOptions:i});if(!d)throw new n("csv-layer:location-fields-not-found","Unable to identify latitude and longitude fields from the CSV file",{firstLine:l,secondLine:c,parsingOptions:i});r.locationInfo=d,r.delimiter=m;const{names:u,aliases:f}=j(l,m),p=x(e,r.delimiter,u,f,r.locationInfo);if(i.fields?.length){const e=new q(i.fields);for(const t of p){const i=e.get(t.name);i&&Object.assign(t,i)}}if(!p.some(e=>"esriFieldTypeOID"===e.type&&(s.objectIdField=e.name,!0))){const e={name:"__OBJECTID",alias:"__OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1};s.objectIdField=e.name,p.unshift(e)}s.fields=p;const y=new q(s.fields);if(r.locationInfo&&(r.locationInfo.latitudeFieldName=y.get(r.locationInfo.latitudeFieldName).name,r.locationInfo.longitudeFieldName=y.get(r.locationInfo.longitudeFieldName).name),s.timeInfo){const e=s.timeInfo;if(e.startTimeField){const t=y.get(e.startTimeField);t?(e.startTimeField=t.name,t.type="esriFieldTypeDate"):e.startTimeField=null}if(e.endTimeField){const t=y.get(e.endTimeField);t?(e.endTimeField=t.name,t.type="esriFieldTypeDate"):e.endTimeField=null}if(e.trackIdField){const t=y.get(e.trackIdField);e.trackIdField=t?t.name:null}e.startTimeField||e.endTimeField||(s.timeInfo=null)}return r}export{R as default};
@@ -0,0 +1,4 @@
1
+ import "../../interfaces";
2
+
3
+ import DateTimeFieldFormat = __esri.DateTimeFieldFormat;
4
+ export default DateTimeFieldFormat;
@@ -0,0 +1,4 @@
1
+ import "../../interfaces";
2
+
3
+ import FieldConfiguration = __esri.FieldConfiguration;
4
+ export default FieldConfiguration;
@@ -0,0 +1,4 @@
1
+ import "../../interfaces";
2
+
3
+ import NumberFieldFormat = __esri.NumberFieldFormat;
4
+ export default NumberFieldFormat;
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../request.js";import{clone as t}from"../../core/lang.js";import{throwIfAborted as o}from"../../core/promiseUtils.js";import{normalize as r,removeFile as l,getAppBaseUrl as s,removeTrailingSlash as n,addQueryParameters as i,isProtocolRelative as u,isAbsolute as c,join as a}from"../../core/urlUtils.js";import{wgs84 as f,webMercator as y}from"../../geometry/support/spatialReferenceUtils.js";import{geographicToWebMercator as p}from"../../geometry/support/webMercatorUtils.js";import m from"../../views/2d/engine/vectorTiles/style/VectorTileSource.js";async function d(e,t){const o={source:null,sourceBase:null,sourceUrl:null,validatedSource:null,style:null,styleBase:null,styleUrl:null,sourceNameToSource:{},primarySourceName:"",spriteFormat:"png"},[r,l]="string"==typeof e?[e,null]:[null,e.jsonUrl];await x(o,"esri",e,l,t);return{layerDefinition:o.validatedSource,url:r,serviceUrl:o.sourceUrl,style:o.style,styleUrl:o.styleUrl,spriteUrl:o.style?.sprite&&h(o.styleBase,o.style.sprite),spriteFormat:o.spriteFormat,glyphsUrl:o.style?.glyphs&&h(o.styleBase,o.style.glyphs),sourceNameToSource:o.sourceNameToSource,primarySourceName:o.primarySourceName}}function h(...e){let t;for(const o of e)if(null!=o)if(u(o)){if(t){const e=t.split("://")[0];t=e+":"+o.trim()}}else t=c(o)?o:a(t,o);return t?n(t):void 0}async function x(t,l,s,n,i){let u,c,a;if(o(i),"string"==typeof s){const t=r(s);a=await e(t,{...i,responseType:"json",query:{f:"json",...i?.query}}),a.ssl&&(u&&(u=u.replace(/^http:/i,"https:")),c&&(c=c.replace(/^http:/i,"https:"))),u=t,c=t}else null!=s&&(a={data:s},u=s.jsonUrl||null,c=n);const f=a?.data;if(g(f))return t.styleUrl=u||null,w(t,f,c,i);if(j(f))return t.sourceUrl?U(t,f,c,!1,l,i):(t.sourceUrl=u||null,S(f)&&null==t.style&&(l="tilejson"),U(t,f,c,!0,l,i));throw new Error("You must specify the URL or the JSON for a service or for a style.")}function S(e){return"object"==typeof e&&!!e&&"tilejson"in e&&null!=e.tilejson}function g(e){return!!e&&"sources"in e&&!!e.sources}function j(e){return!g(e)}async function w(e,t,o,r){const n=o?l(o):s();e.styleBase=n,e.style=t,t["sprite-format"]&&"webp"===t["sprite-format"].toLowerCase()&&(e.spriteFormat="webp");const i=[];if(t.sources&&t.sources.esri){const o=t.sources.esri;o.url?await x(e,"esri",h(n,o.url),void 0,r):i.push(x(e,"esri",o,n,r))}for(const l of Object.keys(t.sources))"esri"!==l&&"tilejson"!==l&&"vector"===t.sources[l].type&&(t.sources[l].url?i.push(x(e,l,h(n,t.sources[l].url),void 0,r)):t.sources[l].tiles&&i.push(x(e,l,t.sources[l],n,r)));await Promise.all(i)}async function U(e,t,o,r,l,u){const c=o?n(o)+"/":s(),a=v(t),f=new m(l,i(c,u?.query??{}),a);if(!r&&e.primarySourceName in e.sourceNameToSource){const t=e.sourceNameToSource[e.primarySourceName];if(!t.isCompatibleWith(f))return;null!=f.fullExtent&&(null!=t.fullExtent?t.fullExtent.union(f.fullExtent):t.fullExtent=f.fullExtent.clone()),t.tileInfo&&f.tileInfo&&t.tileInfo.lods.length<f.tileInfo.lods.length&&(t.tileInfo=f.tileInfo)}if(r&&(e.sourceBase=c,e.source=t,e.validatedSource=a,e.primarySourceName=l),e.sourceNameToSource[l]=f,!S(e)&&"defaultStyles"in t&&!e.style){if(null==t.defaultStyles)throw new Error;return"string"==typeof t.defaultStyles?x(e,"",h(c,t.defaultStyles,"root.json"),void 0,u):x(e,"",t.defaultStyles,h(c,"root.json"),u)}if(S(t)&&null==e.style&&a.defaultStyles)return x(e,"",a.defaultStyles,h(c,"root.json"),u)}function v(e){const o=512;if(N(e)){const t=e?.tileInfo;return null!=t&&(null==t.rows&&(t.rows=o),null==t.cols&&(t.cols=o)),e}const r={xmin:-20037507.067161843,ymin:-20037507.067161843,xmax:20037507.067161843,ymax:20037507.067161843,spatialReference:{wkid:102100,latestWkid:3857}};let l,s=null;if(S(e)){const{bounds:o,vector_layers:r}=e;if(o){const e=p({x:o[0],y:o[1],spatialReference:t(f)}),r=p({x:o[2],y:o[3],spatialReference:t(f)});s={xmin:e.x,ymin:e.y,xmax:r.x,ymax:r.y,spatialReference:t(y)}}r&&r.length>0&&(l={version:8,sprite:"",glyphs:"",sources:{tilejson:{type:"vector",url:e.tilejson}},layers:b(r)})}null===s&&(s=r);let n=78271.51696400007,i=295828763.7957775;const u=[],c=e.hasOwnProperty("maxzoom")&&null!=e.maxzoom?Math.abs(+e.maxzoom):22,a=0,m=0;for(let t=0;t<=c;t++)u.push({level:t,scale:i,resolution:n}),n/=2,i/=2;return{capabilities:"TilesOnly",initialExtent:s,fullExtent:r,minScale:a,maxScale:m,tiles:e.tiles,tileInfo:{rows:o,cols:o,dpi:96,format:"pbf",origin:{x:-20037508.342787,y:20037508.342787},lods:u,spatialReference:t(y)},defaultStyles:l}}function N(e){return e.hasOwnProperty("tileInfo")}function b(e){const t=[];for(const o of e)o.geometry_type?t.push(E(o.geometry_type.toLowerCase(),o,!1)):(t.push(E("polygon",o,!0)),t.push(E("line",o,!0)),t.push(E("circle",o,!0)));return t}function E(e,t,o){const{id:r,minzoom:l,maxzoom:s}=t,n={type:"polygon"===e?"fill":"line"===e?"line":"circle",id:r,source:"tilejson","source-layer":r,minzoom:l,maxzoom:s};switch(e){case"polygon":case"fill":o&&(n.id+="_polygon",n.filter='(["==", "$type", "Polygon"])'),n.paint={"fill-color":"#808080"};break;case"line":o&&(n.id+="_line",n.filter='(["==", "$type", "LineString"])');break;case"circle":case"point":o&&(n.id+="_point",n.filter='(["==", "$type", "Point"])')}return n}export{d as loadMetadata};
5
+ import e from"../../request.js";import{clone as t}from"../../core/lang.js";import{throwIfAborted as o}from"../../core/promiseUtils.js";import{normalize as r,removeFile as l,getAppBaseUrl as s,removeTrailingSlash as n,addQueryParameters as i,isProtocolRelative as u,isAbsolute as c,join as a}from"../../core/urlUtils.js";import{wgs84 as f,webMercator as y}from"../../geometry/support/spatialReferenceUtils.js";import{geographicToWebMercator as p}from"../../geometry/support/webMercatorUtils.js";import m from"../../views/2d/engine/vectorTiles/style/VectorTileSource.js";async function d(e,t){const o={source:null,sourceBase:null,sourceUrl:null,validatedSource:null,style:null,styleBase:null,styleUrl:null,sourceNameToSource:{},primarySourceName:"",spriteFormat:"png"},[r,l]="string"==typeof e?[e,null]:[null,e.jsonUrl];await S(o,"esri",e,l,t);return{layerDefinition:o.validatedSource,url:r,serviceUrl:o.sourceUrl,style:o.style,styleUrl:o.styleUrl,spriteUrl:o.style?.sprite&&h(o.styleBase,o.style.sprite),spriteFormat:o.spriteFormat,glyphsUrl:o.style?.glyphs&&h(o.styleBase,o.style.glyphs),sourceNameToSource:o.sourceNameToSource,primarySourceName:o.primarySourceName}}function h(...e){let t;for(const o of e)if(null!=o)if(u(o)){if(t){const e=t.split("://")[0];t=e+":"+o.trim()}}else t=c(o)?o:a(t,o);return t?n(t):void 0}async function S(t,l,s,n,i){let u,c,a;if(o(i),"string"==typeof s){const t=r(s);a=await e(t,{...i,responseType:"json",query:{f:"json",...i?.query}}),a.ssl&&(u&&(u=u.replace(/^http:/i,"https:")),c&&(c=c.replace(/^http:/i,"https:"))),u=t,c=t}else null!=s&&(a={data:s},u=s.jsonUrl||null,c=n);const f=a?.data;if(g(f))return t.styleUrl=u||null,j(t,f,c,i);if(w(f))return t.sourceUrl?U(t,f,c,!1,l,i):(t.sourceUrl=u||null,x(f)&&null==t.style&&(l="tilejson"),U(t,f,c,!0,l,i));throw new Error("You must specify the URL or the JSON for a service or for a style.")}function x(e){return"object"==typeof e&&!!e&&"tilejson"in e&&null!=e.tilejson}function g(e){return!!e&&"sources"in e&&!!e.sources}function w(e){return!g(e)}async function j(e,t,o,r){const n=o?l(o):s();e.styleBase=n,e.style=t,t["sprite-format"]&&"webp"===t["sprite-format"].toLowerCase()&&(e.spriteFormat="webp");const i=[];if(t.sources&&t.sources.esri){const o=t.sources.esri;o.url?await S(e,"esri",h(n,o.url),void 0,r):i.push(S(e,"esri",o,n,r))}for(const l of Object.keys(t.sources))"esri"!==l&&"tilejson"!==l&&"vector"===t.sources[l].type&&(t.sources[l].url?i.push(S(e,l,h(n,t.sources[l].url),void 0,r)):t.sources[l].tiles&&i.push(S(e,l,t.sources[l],n,r)));await Promise.all(i)}async function U(e,t,o,r,l,u){const c=o?n(o)+"/":s(),a=v(t,e),f=new m(l,i(c,u?.query??{}),a);if(!r&&e.primarySourceName in e.sourceNameToSource){const t=e.sourceNameToSource[e.primarySourceName];if(!t.isCompatibleWith(f))return;null!=f.fullExtent&&(null!=t.fullExtent?t.fullExtent.union(f.fullExtent):t.fullExtent=f.fullExtent.clone()),t.tileInfo&&f.tileInfo&&t.tileInfo.lods.length<f.tileInfo.lods.length&&(t.tileInfo=f.tileInfo)}if(r&&(e.sourceBase=c,e.source=t,e.validatedSource=a,e.primarySourceName=l),e.sourceNameToSource[l]=f,!x(e)&&"defaultStyles"in t&&!e.style){if(null==t.defaultStyles)throw new Error;return"string"==typeof t.defaultStyles?S(e,"",h(c,t.defaultStyles,"root.json"),void 0,u):S(e,"",t.defaultStyles,h(c,"root.json"),u)}if(x(t)&&null==e.style&&a.defaultStyles)return S(e,"",a.defaultStyles,h(c,"root.json"),u)}function v(e,o){const r=512;if(N(e)){const t=e?.tileInfo;return null!=t&&(null==t.rows&&(t.rows=r),null==t.cols&&(t.cols=r)),e}const l={xmin:-20037507.067161843,ymin:-20037507.067161843,xmax:20037507.067161843,ymax:20037507.067161843,spatialReference:{wkid:102100,latestWkid:3857}};let s,n=null;if(x(e)){const{bounds:r,vector_layers:l}=e;if(r){const e=p({x:r[0],y:r[1],spatialReference:t(f)}),o=p({x:r[2],y:r[3],spatialReference:t(f)});n={xmin:e.x,ymin:e.y,xmax:o.x,ymax:o.y,spatialReference:t(y)}}if(l&&l.length>0)s={version:8,sprite:"",glyphs:"",sources:{tilejson:{type:"vector",url:e.tilejson}},layers:T(l)};else if(null==o.style)throw new Error("The TileJSON source does not contain any vector_layers. This VectorTileLayer cannot be loaded.")}null===n&&(n=l);let i=78271.51696400007,u=295828763.7957775;const c=[],a=e.hasOwnProperty("maxzoom")&&null!=e.maxzoom?Math.abs(+e.maxzoom):22,m=0,d=0;for(let t=0;t<=a;t++)c.push({level:t,scale:u,resolution:i}),i/=2,u/=2;return{capabilities:"TilesOnly",initialExtent:n,fullExtent:l,minScale:m,maxScale:d,tiles:e.tiles,tileInfo:{rows:r,cols:r,dpi:96,format:"pbf",origin:{x:-20037508.342787,y:20037508.342787},lods:c,spatialReference:t(y)},defaultStyles:s}}function N(e){return e.hasOwnProperty("tileInfo")}function T(e){const t=[];for(const o of e)o.geometry_type?t.push(b(o.geometry_type.toLowerCase(),o,!1)):(t.push(b("polygon",o,!0)),t.push(b("line",o,!0)),t.push(b("circle",o,!0)));return t}function b(e,t,o){const{id:r,minzoom:l,maxzoom:s}=t,n={type:"polygon"===e||"polygons"===e?"fill":"line"===e||"lines"===e?"line":"circle",id:r,source:"tilejson","source-layer":r,minzoom:l,maxzoom:s};switch(e){case"fill":o&&(n.id+="_polygon",n.filter='(["==", "$type", "Polygon"])'),n.paint={"fill-color":"#808080"};break;case"line":o&&(n.id+="_line",n.filter='(["==", "$type", "LineString"])');break;case"circle":o&&(n.id+="_point",n.filter='(["==", "$type", "Point"])')}return n}export{d as loadMetadata};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "4.34.0-next.89",
3
+ "version": "4.34.0-next.90",
4
4
  "homepage": "https://js.arcgis.com",
5
5
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
6
6
  "keywords": [
@@ -18,7 +18,7 @@
18
18
  ],
19
19
  "license": "SEE LICENSE IN copyright.txt",
20
20
  "dependencies": {
21
- "@arcgis/toolkit": "^4.34.0-next.133",
21
+ "@arcgis/toolkit": "^4.34.0-next.138",
22
22
  "@esri/arcgis-html-sanitizer": "~4.1.0",
23
23
  "@esri/calcite-components": "^3.3.0",
24
24
  "@vaadin/grid": "~24.9.0",
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- const b="20250919",c="2fb8bd684afb127a92e865bc1998d986b6cd7afc";export{b as buildDate,c as commitHash};
5
+ const c="20250920",d="5c5be205c3bfc5a6d482cebdd09cadc899dd3fe8";export{c as buildDate,d as commitHash};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import has from"../../../../core/has.js";import t from"../../../../core/Logger.js";import{deg2rad as e}from"../../../../core/mathUtils.js";import{throwIfAborted as n}from"../../../../core/promiseUtils.js";import r from"../../../../core/RandomLCG.js";import o from"../../../../geometry/Extent.js";import{getInfo as i}from"../../../../geometry/support/spatialReferenceUtils.js";const s=()=>t.getLogger("esri.views.2d.engine.flow.dataUtils"),l=10;async function a(t,e,r,o){const i=performance.now(),a=c(e,r),f=performance.now(),h=u(e,a,r.width,r.height),d=performance.now(),g=m(h,!0),y=performance.now(),x="Streamlines"===t?w(g,l):p(g),M=performance.now();return has("esri-2d-profiler")&&(s().info("I.1","_createFlowFieldFromData (ms)",Math.round(f-i)),s().info("I.2","_getStreamlines (ms)",Math.round(d-f)),s().info("I.3","createAnimatedLinesData (ms)",Math.round(y-d)),s().info("I.4","create{Streamlines|Particles}Mesh (ms)",Math.round(M-y)),s().info("I.5","createFlowMesh (ms)",Math.round(M-i)),s().info("I.6","Mesh size (bytes)",x.vertexData.buffer.byteLength+x.indexData.buffer.byteLength)),await Promise.resolve(),n(o),x}function c(t,e){const n=d(e.data,e.width,e.height,t.smoothing);if(t.interpolate){return(t,r)=>{const o=Math.floor(t),i=Math.floor(r);if(o<0||o>=e.width)return[0,0];if(i<0||i>=e.height)return[0,0];const s=t-o,l=r-i,a=o,c=i,f=o<e.width-1?o+1:o,h=i<e.height-1?i+1:i,u=n[2*(c*e.width+a)],d=n[2*(c*e.width+f)],m=n[2*(h*e.width+a)],w=n[2*(h*e.width+f)],p=n[2*(c*e.width+a)+1],g=n[2*(c*e.width+f)+1];return[(u*(1-l)+m*l)*(1-s)+(d*(1-l)+w*l)*s,(p*(1-l)+n[2*(h*e.width+a)+1]*l)*(1-s)+(g*(1-l)+n[2*(h*e.width+f)+1]*l)*s]}}return(t,r)=>{const o=Math.round(t),i=Math.round(r);return o<0||o>=e.width||i<0||i>=e.height?[0,0]:[n[2*(i*e.width+o)],n[2*(i*e.width+o)+1]]}}function f(t,e,n,r,o,i,s){const l=[],{raster:a,width:c,height:f,resolutionFactor:h}=s;let u=r,d=o,m=0,[w,p]=n(u,d);w*=e.velocityScale,p*=e.velocityScale;const g=Math.sqrt(w*w+p*p);let y,x;l.push({x:u,y:d,t:m,speed:g});for(let M=0;M<e.verticesPerLine;M++){let[r,o]=n(u,d);r*=e.velocityScale,o*=e.velocityScale;const s=Math.sqrt(r*r+o*o);if(s<e.minSpeedThreshold)return l;const w=t*r/s,p=t*o/s;u+=w*e.segmentLength,d+=p*e.segmentLength;if(m+=t*e.segmentLength/s,Math.acos(w*y+p*x)>e.maxTurnAngle)return l;if(e.collisions){const t=Math.round(u*h),e=Math.round(d*h);if(t<0||t>c-1||e<0||e>f-1)return l;const n=a[e*c+t];if(-1!==n&&n!==i)return l;a[e*c+t]=i}l.push({x:u,y:d,t:m,speed:s}),y=w,x=p}return l}function h(t,e,n,r,o,i,s){const l=Math.round((.2+.8*i.getFloat())*t.verticesPerLine),a=t.verticesPerLine-l,c=f(-1,{...t,verticesPerLine:a},e,n,r,o,s),h=f(1,{...t,verticesPerLine:l},e,n,r,o,s),u=c.reverse();u.splice(-1,1);return u.concat(h)}function u(t,e,n,o,i={positions:[]}){const{positions:s}=i,l=[],a=new r,c=1/Math.max(t.lineCollisionWidth,1),u=Math.round(n*c),d=Math.round(o*c),m=new Int32Array(u*d);for(let r=0;r<m.length;r++)m[r]=-1;const w={raster:m,width:u,height:d,resolutionFactor:c},p={},g=t.lineSpacing/Math.sqrt(t.density),y=Math.floor(o/g),x=Math.floor(n/g);for(let r=0;r<y;r++){const t=r*g;for(let e=0;e<x;e++){const n=e*g;p[`${e}-${r}`]={x:n,y:t,positions:[]}}}for(const{x:r,y:f}of s){const t=p[`${Math.floor(r/g)}-${Math.floor(f/g)}`];t&&t.positions.push([r,f])}const M=[];for(const r in p){const t=p[r];if(0===t.positions.length)M.push({x:t.x,y:t.y,sort:.66+.33*a.getFloat(),stage:0});else{const[e]=t.positions.splice(0,1);M.push({x:e[0],y:e[1],sort:.33*a.getFloat(),stage:1});for(const[n,r]of t.positions)M.push({x:n,y:r,sort:.33+.33*a.getFloat(),stage:2})}}M.sort((t,e)=>t.sort-e.sort);for(const{x:r,y:v,stage:F}of M){const n=t.onlyForwardTracing?f(1,t,e,r,v,l.length,w):h(t,e,r,v,l.length,a,w);n.length<2||l.push({stage:F,vertices:n})}return l}function d(t,e,n,r){if(0===r)return t;const o=Math.round(3*r),i=new Array(2*o+1);let s=0;for(let c=-o;c<=o;c++){const t=Math.exp(-c*c/(r*r));i[c+o]=t,s+=t}for(let c=-o;c<=o;c++)i[c+o]/=s;const l=new Float32Array(t.length);for(let c=0;c<n;c++)for(let n=0;n<e;n++){let r=0,s=0;for(let l=-o;l<=o;l++){if(n+l<0||n+l>=e)continue;const a=i[l+o];r+=a*t[2*(c*e+(n+l))],s+=a*t[2*(c*e+(n+l))+1]}l[2*(c*e+n)]=r,l[2*(c*e+n)+1]=s}const a=new Float32Array(t.length);for(let c=0;c<e;c++)for(let t=0;t<n;t++){let r=0,s=0;for(let a=-o;a<=o;a++){if(t+a<0||t+a>=n)continue;const f=i[a+o];r+=f*l[2*((t+a)*e+c)],s+=f*l[2*((t+a)*e+c)+1]}a[2*(t*e+c)]=r,a[2*(t*e+c)+1]=s}return a}function m(t,e){const n=new r,o=t.reduce((t,e)=>t+e.vertices.length,0),i=new Float32Array(4*o),s=new Array(t.length);let l=0,a=0;for(const{vertices:r}of t){const t=l;for(const e of r)i[4*l]=e.x,i[4*l+1]=e.y,i[4*l+2]=e.t,i[4*l+3]=e.speed,l++;s[a++]={startVertex:t,numberOfVertices:r.length,totalTime:r[r.length-1].t,timeSeed:e?n.getFloat():0}}return{lineVertices:i,lineDescriptors:s}}function w(t,e){const n=9,{lineVertices:r,lineDescriptors:o}=t;let i=0,s=0;for(const d of o){i+=2*d.numberOfVertices;s+=6*(d.numberOfVertices-1)}const l=new Float32Array(i*n),a=new Uint32Array(s);let c=0,f=0;function h(){a[f++]=c-2,a[f++]=c,a[f++]=c-1,a[f++]=c,a[f++]=c+1,a[f++]=c-1}function u(t,e,r,o,i,s,a,f){const h=c*n;let u=0;l[h+u++]=t,l[h+u++]=e,l[h+u++]=1,l[h+u++]=r,l[h+u++]=s,l[h+u++]=a,l[h+u++]=o/2,l[h+u++]=i/2,l[h+u++]=f,c++,l[h+u++]=t,l[h+u++]=e,l[h+u++]=-1,l[h+u++]=r,l[h+u++]=s,l[h+u++]=a,l[h+u++]=-o/2,l[h+u++]=-i/2,l[h+u++]=f,c++}for(const d of o){const{totalTime:t,timeSeed:n}=d;let o=null,i=null,s=null,l=null,a=null,c=null;for(let f=0;f<d.numberOfVertices;f++){const m=r[4*(d.startVertex+f)],w=r[4*(d.startVertex+f)+1],p=r[4*(d.startVertex+f)+2],g=r[4*(d.startVertex+f)+3];let y=null,x=null,M=null,v=null;if(f>0){y=m-o,x=w-i;const r=Math.sqrt(y*y+x*x);if(y/=r,x/=r,f>1){let t=y+a,n=x+c;const r=Math.sqrt(t*t+n*n);t/=r,n/=r;const o=Math.min(1/(t*y+n*x),e);t*=o,n*=o,M=-n,v=t}else M=-x,v=y;null!==M&&null!==v&&(u(o,i,s,M,v,t,n,g),h())}o=m,i=w,s=p,a=y,c=x,l=g}u(o,i,s,-c,a,t,n,l)}return{vertexData:l,indexData:a}}function p(t){const e=16,n=1,r=2,{lineVertices:o,lineDescriptors:i}=t;let s=0,l=0;for(const S of i){const t=S.numberOfVertices-1;s+=4*t*2,l+=6*t*2}const a=new Float32Array(s*e),c=new Uint32Array(l);let f,h,u,d,m,w,p,g,y,x,M,v,F,A,I=0,V=0;function L(){c[V++]=I-8,c[V++]=I-7,c[V++]=I-6,c[V++]=I-7,c[V++]=I-5,c[V++]=I-6,c[V++]=I-4,c[V++]=I-3,c[V++]=I-2,c[V++]=I-3,c[V++]=I-1,c[V++]=I-2}function D(t,o,i,s,l,c,f,h,u,d,m,w,p,g){const y=I*e;let x=0;for(const e of[n,r])for(const n of[1,2,3,4])a[y+x++]=t,a[y+x++]=o,a[y+x++]=i,a[y+x++]=s,a[y+x++]=f,a[y+x++]=h,a[y+x++]=u,a[y+x++]=d,a[y+x++]=e,a[y+x++]=n,a[y+x++]=p,a[y+x++]=g,a[y+x++]=l/2,a[y+x++]=c/2,a[y+x++]=m/2,a[y+x++]=w/2,I++}function b(t,e){let n=y+M,r=x+v;const o=Math.sqrt(n*n+r*r);n/=o,r/=o;const i=y*n+x*r;n/=i,r/=i;let s=M+F,l=v+A;const a=Math.sqrt(s*s+l*l);s/=a,l/=a;const c=M*s+v*l;s/=c,l/=c,D(f,h,u,d,-r,n,m,w,p,g,-l,s,t,e),L()}function P(t,e,n,r,o,i){if(y=M,x=v,M=F,v=A,null==y&&null==x&&(y=M,x=v),null!=m&&null!=w){F=t-m,A=e-w;const n=Math.sqrt(F*F+A*A);F/=n,A/=n}null!=y&&null!=x&&b(o,i),f=m,h=w,u=p,d=g,m=t,w=e,p=n,g=r}function k(t,e){y=M,x=v,M=F,v=A,null==y&&null==x&&(y=M,x=v),null!=y&&null!=x&&b(t,e)}for(const S of i){f=null,h=null,u=null,d=null,m=null,w=null,p=null,g=null,y=null,x=null,M=null,v=null,F=null,A=null;const{totalTime:t,timeSeed:e}=S;for(let n=0;n<S.numberOfVertices;n++){P(o[4*(S.startVertex+n)],o[4*(S.startVertex+n)+1],o[4*(S.startVertex+n)+2],o[4*(S.startVertex+n)+3],t,e)}k(t,e)}return{vertexData:a,indexData:c}}function g(t,n){const r=n.pixels,{width:o,height:i}=n,s=new Float32Array(o*i*2),l=n.mask??new Uint8Array(o*i*2);if(n.mask||l.fill(255),"vector-uv"===t)for(let e=0;e<o*i;e++)s[2*e]=r[0][e],s[2*e+1]=-r[1][e];else if("vector-magdir"===t)for(let a=0;a<o*i;a++){const t=r[0][a],n=e(r[1][a]),o=Math.cos(n-Math.PI/2),i=Math.sin(n-Math.PI/2);s[2*a]=o*t,s[2*a+1]=i*t}return{data:s,mask:l,width:o,height:i}}async function y(t,e,n,r,l,a){const c=performance.now(),f=i(e.spatialReference);if(!f){const o=await x(t,e,n,r,l,a);return has("esri-2d-profiler")&&s().info("I.7","loadImagery, early exit (ms)",Math.round(performance.now()-c)),has("esri-2d-profiler")&&s().info("I.9","Number of parts",1),o}const[h,u]=f.valid,d=u-h,m=Math.ceil(e.width/d),w=e.width/m,p=Math.round(n/m);let g=e.xmin;const y=[],M=performance.now();for(let i=0;i<m;i++){const n=new o({xmin:g,xmax:g+w,ymin:e.ymin,ymax:e.ymax,spatialReference:e.spatialReference});y.push(x(t,n,p,r,l,a)),g+=w}const v=await Promise.all(y);has("esri-2d-profiler")&&s().info("I.8","All calls to _fetchPart (ms)",Math.round(performance.now()-M)),has("esri-2d-profiler")&&s().info("I.9","Number of parts",v.length);const F={data:new Float32Array(n*r*2),mask:new Uint8Array(n*r),width:n,height:r};let A=0;for(const o of v){for(let t=0;t<o.height;t++)for(let e=0;e<o.width;e++)A+e>=n||(F.data[2*(t*n+A+e)]=o.data[2*(t*o.width+e)],F.data[2*(t*n+A+e)+1]=o.data[2*(t*o.width+e)+1],F.mask[t*n+A+e]=o.mask[t*o.width+e]);A+=o.width}return has("esri-2d-profiler")&&s().info("I.10","loadImagery, general exit (ms)",Math.round(performance.now()-c)),F}async function x(t,e,n,r,o,i){const s={requestProjectedLocalDirections:!0,signal:i};if(null!=o&&(s.timeExtent=o),"imagery"===t.type){await t.load({signal:i});const o=await t.internalFetchImage(e,n,r,s);if(null==o?.pixelData?.pixelBlock)return{data:new Float32Array(n*r*2),mask:new Uint8Array(n*r),width:n,height:r};return g(t.rasterInfo.dataType,o.pixelData.pixelBlock)}await t.load({signal:i});const l=await t.fetchPixels(e,n,r,s);if(null==l?.pixelBlock)return{data:new Float32Array(n*r*2),mask:new Uint8Array(n*r),width:n,height:r};return g(t.serviceRasterInfo.dataType,l.pixelBlock)}export{m as createAnimatedLinesData,c as createFlowFieldFromData,a as createFlowMesh,p as createParticlesMesh,w as createStreamlinesMesh,y as loadImagery,g as toFlowData,u as traceFlowPaths};
5
+ import has from"../../../../core/has.js";import t from"../../../../core/Logger.js";import{moduloPositive as e,deg2rad as n}from"../../../../core/mathUtils.js";import{throwIfAborted as r}from"../../../../core/promiseUtils.js";import o from"../../../../core/RandomLCG.js";import i from"../../../../geometry/Extent.js";import{getInfo as s}from"../../../../geometry/support/spatialReferenceUtils.js";const l=()=>t.getLogger("esri.views.2d.engine.flow.dataUtils"),a=10;async function c(t,e,n,o){const i=performance.now(),s=f(e,n),c=performance.now(),h=d(e,s,n.width,n.height),u=performance.now(),m=w(h,!0),y=performance.now(),x="Streamlines"===t?p(m,a):g(m),M=performance.now();return has("esri-2d-profiler")&&(l().info("I.1","_createFlowFieldFromData (ms)",Math.round(c-i)),l().info("I.2","_getStreamlines (ms)",Math.round(u-c)),l().info("I.3","createAnimatedLinesData (ms)",Math.round(y-u)),l().info("I.4","create{Streamlines|Particles}Mesh (ms)",Math.round(M-y)),l().info("I.5","createFlowMesh (ms)",Math.round(M-i)),l().info("I.6","Mesh size (bytes)",x.vertexData.buffer.byteLength+x.indexData.buffer.byteLength)),await Promise.resolve(),r(o),x}function f(t,e){const n=m(e.data,e.width,e.height,t.smoothing);if(t.interpolate){return(t,r)=>{const o=Math.floor(t),i=Math.floor(r);if(o<0||o>=e.width)return[0,0];if(i<0||i>=e.height)return[0,0];const s=t-o,l=r-i,a=o,c=i,f=o<e.width-1?o+1:o,h=i<e.height-1?i+1:i,u=n[2*(c*e.width+a)],d=n[2*(c*e.width+f)],m=n[2*(h*e.width+a)],w=n[2*(h*e.width+f)],p=n[2*(c*e.width+a)+1],g=n[2*(c*e.width+f)+1];return[(u*(1-l)+m*l)*(1-s)+(d*(1-l)+w*l)*s,(p*(1-l)+n[2*(h*e.width+a)+1]*l)*(1-s)+(g*(1-l)+n[2*(h*e.width+f)+1]*l)*s]}}return(t,r)=>{const o=Math.round(t),i=Math.round(r);return o<0||o>=e.width||i<0||i>=e.height?[0,0]:[n[2*(i*e.width+o)],n[2*(i*e.width+o)+1]]}}function h(t,n,r,o,i,s,l,a){const c=[],{raster:f,width:h,height:u,resolutionFactor:d}=a;let m=o,w=i,p=0,[g,y]=r(m,w);g*=n.velocityScale,y*=n.velocityScale;const x=Math.sqrt(g*g+y*y);let M,v;c.push({x:m,y:w,t:p,speed:x});for(let A=0;A<n.verticesPerLine;A++){let[o,i]=r(m,w);o*=n.velocityScale,i*=n.velocityScale;const a=Math.sqrt(o*o+i*i);if(a<n.minSpeedThreshold)return c;const g=t*o/a,y=t*i/a;m+=g*n.segmentLength,w+=y*n.segmentLength,n.wrapAround&&(m=e(m,s[0]));if(p+=t*n.segmentLength/a,Math.acos(g*M+y*v)>n.maxTurnAngle)return c;if(n.collisions){let t=Math.round(m*d);const r=Math.round(w*d);if(n.wrapAround&&(t=e(t,h)),t<0||t>h-1||r<0||r>u-1)return c;const o=f[r*h+t];if(-1!==o&&o!==l)return c;f[r*h+t]=l}c.push({x:m,y:w,t:p,speed:a}),M=g,v=y}return c}function u(t,e,n,r,o,i,s,l){const a=Math.round((.2+.6*s.getFloat())*t.verticesPerLine),c=t.verticesPerLine-a,f=h(-1,{...t,verticesPerLine:c},e,n,r,o,i,l),u=h(1,{...t,verticesPerLine:a},e,n,r,o,i,l),d=f.reverse();d.splice(-1,1);return d.concat(u)}function d(t,e,n,r,i={positions:[]}){const{positions:s}=i,l=[],a=new o,c=1/Math.max(t.lineCollisionWidth,1),f=Math.round(n*c),d=Math.round(r*c),m=new Int32Array(f*d);for(let o=0;o<m.length;o++)m[o]=-1;const w={raster:m,width:f,height:d,resolutionFactor:c},p={},g=t.lineSpacing/Math.sqrt(t.density),y=Math.floor(r/g),x=Math.floor(n/g);for(let o=0;o<y;o++){const t=o*g;for(let e=0;e<x;e++){const n=e*g;p[`${e}-${o}`]={x:n,y:t,positions:[]}}}for(const{x:o,y:h}of s){const t=p[`${Math.floor(o/g)}-${Math.floor(h/g)}`];t&&t.positions.push([o,h])}const M=[];for(const o in p){const t=p[o];if(0===t.positions.length)M.push({x:t.x,y:t.y,sort:.66+.33*a.getFloat(),stage:0});else{const[e]=t.positions.splice(0,1);M.push({x:e[0],y:e[1],sort:.33*a.getFloat(),stage:1});for(const[n,r]of t.positions)M.push({x:n,y:r,sort:.33+.33*a.getFloat(),stage:2})}}M.sort((t,e)=>t.sort-e.sort);for(const{x:o,y:v,stage:A}of M){const i=t.onlyForwardTracing?h(1,t,e,o,v,[n,r],l.length,w):u(t,e,o,v,[n,r],l.length,a,w);i.length<2||l.push({stage:A,vertices:i})}return l}function m(t,e,n,r){if(0===r)return t;const o=Math.round(3*r),i=new Array(2*o+1);let s=0;for(let c=-o;c<=o;c++){const t=Math.exp(-c*c/(r*r));i[c+o]=t,s+=t}for(let c=-o;c<=o;c++)i[c+o]/=s;const l=new Float32Array(t.length);for(let c=0;c<n;c++)for(let n=0;n<e;n++){let r=0,s=0;for(let l=-o;l<=o;l++){if(n+l<0||n+l>=e)continue;const a=i[l+o];r+=a*t[2*(c*e+(n+l))],s+=a*t[2*(c*e+(n+l))+1]}l[2*(c*e+n)]=r,l[2*(c*e+n)+1]=s}const a=new Float32Array(t.length);for(let c=0;c<e;c++)for(let t=0;t<n;t++){let r=0,s=0;for(let a=-o;a<=o;a++){if(t+a<0||t+a>=n)continue;const f=i[a+o];r+=f*l[2*((t+a)*e+c)],s+=f*l[2*((t+a)*e+c)+1]}a[2*(t*e+c)]=r,a[2*(t*e+c)+1]=s}return a}function w(t,e){const n=new o,r=t.reduce((t,e)=>t+e.vertices.length,0),i=new Float32Array(4*r),s=new Array(t.length);let l=0,a=0;for(const{vertices:o}of t){const t=l;for(const e of o)i[4*l]=e.x,i[4*l+1]=e.y,i[4*l+2]=e.t,i[4*l+3]=e.speed,l++;s[a++]={startVertex:t,numberOfVertices:o.length,totalTime:o[o.length-1].t,timeSeed:e?n.getFloat():0}}return{lineVertices:i,lineDescriptors:s}}function p(t,e){const n=9,{lineVertices:r,lineDescriptors:o}=t;let i=0,s=0;for(const d of o){i+=2*d.numberOfVertices;s+=6*(d.numberOfVertices-1)}const l=new Float32Array(i*n),a=new Uint32Array(s);let c=0,f=0;function h(){a[f++]=c-2,a[f++]=c,a[f++]=c-1,a[f++]=c,a[f++]=c+1,a[f++]=c-1}function u(t,e,r,o,i,s,a,f){const h=c*n;let u=0;l[h+u++]=t,l[h+u++]=e,l[h+u++]=1,l[h+u++]=r,l[h+u++]=s,l[h+u++]=a,l[h+u++]=o/2,l[h+u++]=i/2,l[h+u++]=f,c++,l[h+u++]=t,l[h+u++]=e,l[h+u++]=-1,l[h+u++]=r,l[h+u++]=s,l[h+u++]=a,l[h+u++]=-o/2,l[h+u++]=-i/2,l[h+u++]=f,c++}for(const d of o){const{totalTime:t,timeSeed:n}=d;let o=null,i=null,s=null,l=null,a=null,c=null;for(let f=0;f<d.numberOfVertices;f++){const m=r[4*(d.startVertex+f)],w=r[4*(d.startVertex+f)+1],p=r[4*(d.startVertex+f)+2],g=r[4*(d.startVertex+f)+3];let y=null,x=null,M=null,v=null;if(f>0){y=m-o,x=w-i;const r=Math.sqrt(y*y+x*x);if(y/=r,x/=r,f>1){let t=y+a,n=x+c;const r=Math.sqrt(t*t+n*n);t/=r,n/=r;const o=Math.min(1/(t*y+n*x),e);t*=o,n*=o,M=-n,v=t}else M=-x,v=y;null!==M&&null!==v&&(u(o,i,s,M,v,t,n,g),h())}o=m,i=w,s=p,a=y,c=x,l=g}u(o,i,s,-c,a,t,n,l)}return{vertexData:l,indexData:a}}function g(t){const e=16,n=1,r=2,{lineVertices:o,lineDescriptors:i}=t;let s=0,l=0;for(const S of i){const t=S.numberOfVertices-1;s+=4*t*2,l+=6*t*2}const a=new Float32Array(s*e),c=new Uint32Array(l);let f,h,u,d,m,w,p,g,y,x,M,v,A,F,I=0,V=0;function L(){c[V++]=I-8,c[V++]=I-7,c[V++]=I-6,c[V++]=I-7,c[V++]=I-5,c[V++]=I-6,c[V++]=I-4,c[V++]=I-3,c[V++]=I-2,c[V++]=I-3,c[V++]=I-1,c[V++]=I-2}function b(t,o,i,s,l,c,f,h,u,d,m,w,p,g){const y=I*e;let x=0;for(const e of[n,r])for(const n of[1,2,3,4])a[y+x++]=t,a[y+x++]=o,a[y+x++]=i,a[y+x++]=s,a[y+x++]=f,a[y+x++]=h,a[y+x++]=u,a[y+x++]=d,a[y+x++]=e,a[y+x++]=n,a[y+x++]=p,a[y+x++]=g,a[y+x++]=l/2,a[y+x++]=c/2,a[y+x++]=m/2,a[y+x++]=w/2,I++}function D(t,e){let n=y+M,r=x+v;const o=Math.sqrt(n*n+r*r);n/=o,r/=o;const i=y*n+x*r;n/=i,r/=i;let s=M+A,l=v+F;const a=Math.sqrt(s*s+l*l);s/=a,l/=a;const c=M*s+v*l;s/=c,l/=c,b(f,h,u,d,-r,n,m,w,p,g,-l,s,t,e),L()}function k(t,e,n,r,o,i){if(y=M,x=v,M=A,v=F,null==y&&null==x&&(y=M,x=v),null!=m&&null!=w){A=t-m,F=e-w;const n=Math.sqrt(A*A+F*F);A/=n,F/=n}null!=y&&null!=x&&D(o,i),f=m,h=w,u=p,d=g,m=t,w=e,p=n,g=r}function P(t,e){y=M,x=v,M=A,v=F,null==y&&null==x&&(y=M,x=v),null!=y&&null!=x&&D(t,e)}for(const S of i){f=null,h=null,u=null,d=null,m=null,w=null,p=null,g=null,y=null,x=null,M=null,v=null,A=null,F=null;const{totalTime:t,timeSeed:e}=S;for(let n=0;n<S.numberOfVertices;n++){k(o[4*(S.startVertex+n)],o[4*(S.startVertex+n)+1],o[4*(S.startVertex+n)+2],o[4*(S.startVertex+n)+3],t,e)}P(t,e)}return{vertexData:a,indexData:c}}function y(t,e){const r=e.pixels,{width:o,height:i}=e,s=new Float32Array(o*i*2),l=e.mask??new Uint8Array(o*i*2);if(e.mask||l.fill(255),"vector-uv"===t)for(let n=0;n<o*i;n++)s[2*n]=r[0][n],s[2*n+1]=-r[1][n];else if("vector-magdir"===t)for(let a=0;a<o*i;a++){const t=r[0][a],e=n(r[1][a]),o=Math.cos(e-Math.PI/2),i=Math.sin(e-Math.PI/2);s[2*a]=o*t,s[2*a+1]=i*t}return{data:s,mask:l,width:o,height:i}}async function x(t,e,n,r,o,a){const c=performance.now(),f=s(e.spatialReference);if(!f){const i=await M(t,e,n,r,o,a);return has("esri-2d-profiler")&&l().info("I.7","loadImagery, early exit (ms)",Math.round(performance.now()-c)),has("esri-2d-profiler")&&l().info("I.9","Number of parts",1),i}const[h,u]=f.valid,d=u-h,m=Math.ceil(e.width/d),w=e.width/m,p=Math.round(n/m);let g=e.xmin;const y=[],x=performance.now();for(let s=0;s<m;s++){const n=new i({xmin:g,xmax:g+w,ymin:e.ymin,ymax:e.ymax,spatialReference:e.spatialReference});y.push(M(t,n,p,r,o,a)),g+=w}const v=await Promise.all(y);if(has("esri-2d-profiler")&&l().info("I.8","All calls to _fetchPart (ms)",Math.round(performance.now()-x)),has("esri-2d-profiler")&&l().info("I.9","Number of parts",v.length),1===v.length)return has("esri-2d-profiler")&&l().info("I.10","loadImagery, general exit without stitching back (ms)",Math.round(performance.now()-c)),v[0];const A={data:new Float32Array(n*r*2),mask:new Uint8Array(n*r),width:n,height:r};let F=0;for(const i of v){for(let t=0;t<i.height;t++)for(let e=0;e<i.width;e++)F+e>=n||(A.data[2*(t*n+F+e)]=i.data[2*(t*i.width+e)],A.data[2*(t*n+F+e)+1]=i.data[2*(t*i.width+e)+1],A.mask[t*n+F+e]=i.mask[t*i.width+e]);F+=i.width}return has("esri-2d-profiler")&&l().info("I.10","loadImagery, general exit (ms)",Math.round(performance.now()-c)),A}async function M(t,e,n,r,o,i){const s={requestProjectedLocalDirections:!0,signal:i};if(null!=o&&(s.timeExtent=o),"imagery"===t.type){await t.load({signal:i});const o=await t.internalFetchImage(e,n,r,s);if(null==o?.pixelData?.pixelBlock)return{data:new Float32Array(n*r*2),mask:new Uint8Array(n*r),width:n,height:r};return y(t.rasterInfo.dataType,o.pixelData.pixelBlock)}await t.load({signal:i});const l=await t.fetchPixels(e,n,r,s);if(null==l?.pixelBlock)return{data:new Float32Array(n*r*2),mask:new Uint8Array(n*r),width:n,height:r};return y(t.serviceRasterInfo.dataType,l.pixelBlock)}export{w as createAnimatedLinesData,f as createFlowFieldFromData,c as createFlowMesh,g as createParticlesMesh,p as createStreamlinesMesh,x as loadImagery,y as toFlowData,d as traceFlowPaths};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{pt2px as e}from"../../../../core/screenUtils.js";import{isFlowPathBuffer as t,valuesPerFlowVertex as n}from"../../../3d/support/flow/loadUtils.js";function i(t){const n=o(r(t)),i=n,s=!0,a=Math.max(n/2,5),l=Math.round(e(t.maxPathLength)/a)+1,u=10,{density:c}=t;return{smoothing:e(t.smoothing),interpolate:!0,velocityScale:"flow-from"===t.flowRepresentation?1:-1,verticesPerLine:l,minSpeedThreshold:.001,segmentLength:a,maxTurnAngle:1,collisions:s,lineCollisionWidth:i,lineSpacing:u,density:c,onlyForwardTracing:!0}}function o(e){return"constant"===e.kind?e.value[0]:e.values[e.values.length-1]}function s(e){const t=e.toRgba();return[t[0]/255,t[1]/255,t[2]/255,t[3]]}function a(e){return{kind:"constant",value:[.1,.1,.1,1]}}function r(t){if(!t.hasVisualVariables("size"))return{kind:"constant",value:[e(t.trailWidth)]};const n=t.getVisualVariablesForType("size")[0],i=[],o=[];let s;if(n.stops){for(const t of n.stops)i.push(t.value),o.push(e(t.size));s=n.stops.length}else i.push(n.minDataValue,n.maxDataValue),o.push(e(n.minSize),e(n.maxSize)),s=2;return{kind:"ramp",stops:i,values:o,count:s}}function l(e){if(!e.hasVisualVariables("color"))return{kind:"constant",value:s(e.color)};const t=e.getVisualVariablesForType("color")[0],n=[],i=[];for(const o of t.stops)n.push(o.value),Array.prototype.push.apply(i,s(o.color));return{kind:"ramp",stops:n,values:i,count:t.stops.length}}function u(e){if(!e.hasVisualVariables("opacity"))return{kind:"constant",value:[1]};const t=e.getVisualVariablesForType("opacity")[0],n=[],i=[];for(const o of t.stops)n.push(o.value),i.push(o.opacity);return{kind:"ramp",stops:n,values:i,count:t.stops.length}}function c(e,t,n,i){switch(t){case"int":e.setUniform1iv(n,i);break;case"float":e.setUniform1fv(n,i);break;case"vec2":e.setUniform2fv(n,i);break;case"vec3":e.setUniform3fv(n,i);break;case"vec4":e.setUniform4fv(n,i)}}function m(e,t,n,i){"constant"===i.kind?c(e,n,`u_${t}`,i.value):(c(e,"float",`u_${t}_stops`,i.stops),c(e,n,`u_${t}_values`,i.values),e.setUniform1i(`u_${t}_count`,i.count))}function p(e,t){let n=!0;return n=n&&e.collisions===t.collisions,n=n&&e.density===t.density,n=n&&e.interpolate===t.interpolate,n=n&&e.lineCollisionWidth===t.lineCollisionWidth,n=n&&e.lineSpacing===t.lineSpacing,n=n&&e.maxTurnAngle===t.maxTurnAngle,n=n&&e.minSpeedThreshold===t.minSpeedThreshold,n=n&&e.segmentLength===t.segmentLength,n=n&&e.smoothing===t.smoothing,n=n&&e.velocityScale===t.velocityScale,n=n&&e.verticesPerLine===t.verticesPerLine,n}function f(e,t){return e===t||null!=e&&null!=t&&e.equals(t)}function h(e,t){if(!p(e.simulationSettings,t.simulationSettings))return!1;if(!f(e.timeExtent,t.timeExtent))return!1;let n=!0;return n=n&&e.loadImagery===t.loadImagery,n=n&&e.createFlowMesh===t.createFlowMesh,n=n&&e.color.kind===t.color.kind,n=n&&e.opacity.kind===t.opacity.kind,n=n&&e.size.kind===t.size.kind,n}function d(e,t,n,i){return e/=n.size[0],t=1-(t/=n.size[1]),e*=n.extent.xmax-n.extent.xmin,t*=n.extent.ymax-n.extent.ymin,e+=n.extent.xmin,t+=n.extent.ymin,e-=i.extent.xmin,t-=i.extent.ymin,e/=i.extent.xmax-i.extent.xmin,t=1-(t/=i.extent.ymax-i.extent.ymin),{x:e*=i.size[0],y:t*=i.size[1]}}function x(e,i,o,s){const a=[],r=o.time-i.time,l=t(e),u=l?n(e[0].hasMagnitude):1,c=l?({vertices:e},t)=>{const n=e,i=t*u;return{x:n[i],y:n[i+1],t:n[i+2],speed:0}}:({vertices:e},t)=>e[t];for(const t of e){const{stage:e,vertices:n}=t;if(2===e)continue;const l=n.length/u,m=c(t,0),p=m.t,f=(r*s-p)%(c(t,l-1).t-p)+p;let h,x=m.x,g=m.y,v=m.t;for(h=1;h<l&&v<f;h++){const e=c(t,h),n=Math.min(e.t,f)-v,i=e.t-v;x+=(e.x-x)*(n/i),g+=(e.y-g)*(n/i),v+=n}a.push(d(x,g,i,o))}return a}export{h as areStreamlinesCompatible,d as changeQuery,l as getColor,i as getFlowSimulationSettings,a as getForegroundColor,o as getMax,u as getOpacity,x as getPositions,r as getSize,c as setUniform,m as setUniforms,p as simulationSettingsEqual,f as timeExtentsEqual,s as toRgba};
5
+ import{pt2px as e}from"../../../../core/screenUtils.js";import{isFlowPathBuffer as t,valuesPerFlowVertex as n}from"../../../3d/support/flow/loadUtils.js";function i(t){const n=o(r(t)),i=n,s=!0,a=Math.max(n/2,5),l=Math.round(e(t.maxPathLength)/a)+1,u=10,{density:c}=t;return{smoothing:e(t.smoothing),interpolate:!0,velocityScale:"flow-from"===t.flowRepresentation?1:-1,verticesPerLine:l,minSpeedThreshold:.001,segmentLength:a,maxTurnAngle:1,collisions:s,lineCollisionWidth:i,lineSpacing:u,density:c,onlyForwardTracing:!0,wrapAround:!1}}function o(e){return"constant"===e.kind?e.value[0]:e.values[e.values.length-1]}function s(e){const t=e.toRgba();return[t[0]/255,t[1]/255,t[2]/255,t[3]]}function a(e){return{kind:"constant",value:[.1,.1,.1,1]}}function r(t){if(!t.hasVisualVariables("size"))return{kind:"constant",value:[e(t.trailWidth)]};const n=t.getVisualVariablesForType("size")[0],i=[],o=[];let s;if(n.stops){for(const t of n.stops)i.push(t.value),o.push(e(t.size));s=n.stops.length}else i.push(n.minDataValue,n.maxDataValue),o.push(e(n.minSize),e(n.maxSize)),s=2;return{kind:"ramp",stops:i,values:o,count:s}}function l(e){if(!e.hasVisualVariables("color"))return{kind:"constant",value:s(e.color)};const t=e.getVisualVariablesForType("color")[0],n=[],i=[];for(const o of t.stops)n.push(o.value),Array.prototype.push.apply(i,s(o.color));return{kind:"ramp",stops:n,values:i,count:t.stops.length}}function u(e){if(!e.hasVisualVariables("opacity"))return{kind:"constant",value:[1]};const t=e.getVisualVariablesForType("opacity")[0],n=[],i=[];for(const o of t.stops)n.push(o.value),i.push(o.opacity);return{kind:"ramp",stops:n,values:i,count:t.stops.length}}function c(e,t,n,i){switch(t){case"int":e.setUniform1iv(n,i);break;case"float":e.setUniform1fv(n,i);break;case"vec2":e.setUniform2fv(n,i);break;case"vec3":e.setUniform3fv(n,i);break;case"vec4":e.setUniform4fv(n,i)}}function m(e,t,n,i){"constant"===i.kind?c(e,n,`u_${t}`,i.value):(c(e,"float",`u_${t}_stops`,i.stops),c(e,n,`u_${t}_values`,i.values),e.setUniform1i(`u_${t}_count`,i.count))}function p(e,t){let n=!0;return n=n&&e.collisions===t.collisions,n=n&&e.density===t.density,n=n&&e.interpolate===t.interpolate,n=n&&e.lineCollisionWidth===t.lineCollisionWidth,n=n&&e.lineSpacing===t.lineSpacing,n=n&&e.maxTurnAngle===t.maxTurnAngle,n=n&&e.minSpeedThreshold===t.minSpeedThreshold,n=n&&e.segmentLength===t.segmentLength,n=n&&e.smoothing===t.smoothing,n=n&&e.velocityScale===t.velocityScale,n=n&&e.verticesPerLine===t.verticesPerLine,n}function f(e,t){return e===t||null!=e&&null!=t&&e.equals(t)}function h(e,t){if(!p(e.simulationSettings,t.simulationSettings))return!1;if(!f(e.timeExtent,t.timeExtent))return!1;let n=!0;return n=n&&e.loadImagery===t.loadImagery,n=n&&e.createFlowMesh===t.createFlowMesh,n=n&&e.color.kind===t.color.kind,n=n&&e.opacity.kind===t.opacity.kind,n=n&&e.size.kind===t.size.kind,n}function d(e,t,n,i){return e/=n.size[0],t=1-(t/=n.size[1]),e*=n.extent.xmax-n.extent.xmin,t*=n.extent.ymax-n.extent.ymin,e+=n.extent.xmin,t+=n.extent.ymin,e-=i.extent.xmin,t-=i.extent.ymin,e/=i.extent.xmax-i.extent.xmin,t=1-(t/=i.extent.ymax-i.extent.ymin),{x:e*=i.size[0],y:t*=i.size[1]}}function x(e,i,o,s){const a=[],r=o.time-i.time,l=t(e),u=l?n(e[0].hasMagnitude):1,c=l?({vertices:e},t)=>{const n=e,i=t*u;return{x:n[i],y:n[i+1],t:n[i+2],speed:0}}:({vertices:e},t)=>e[t];for(const t of e){const{stage:e,vertices:n}=t;if(2===e)continue;const l=n.length/u,m=c(t,0),p=m.t,f=(r*s-p)%(c(t,l-1).t-p)+p;let h,x=m.x,g=m.y,v=m.t;for(h=1;h<l&&v<f;h++){const e=c(t,h),n=Math.min(e.t,f)-v,i=e.t-v;x+=(e.x-x)*(n/i),g+=(e.y-g)*(n/i),v+=n}a.push(d(x,g,i,o))}return a}export{h as areStreamlinesCompatible,d as changeQuery,l as getColor,i as getFlowSimulationSettings,a as getForegroundColor,o as getMax,u as getOpacity,x as getPositions,r as getSize,c as setUniform,m as setUniforms,p as simulationSettingsEqual,f as timeExtentsEqual,s as toRgba};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import"../../../Graphic.js";import t from"../../../core/Collection.js";import i from"../../../core/Error.js";import"../../../core/has.js";import s from"../../../core/Logger.js";import{getOrCreateMapValue as r}from"../../../core/MapUtils.js";import{isAbortError as o}from"../../../core/promiseUtils.js";import{watch as n,syncAndInitial as l,on as m}from"../../../core/reactiveUtils.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/RandomLCG.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import c from"../../../geometry/Extent.js";import{create as h}from"../../../geometry/support/aaBoundingRect.js";import{ringsContainsCoords as d}from"../../../geometry/support/contains.js";import{extentIntersectsPolygon as f}from"../../../geometry/support/intersectsBase.js";import{MediaElementView as g}from"../../../layers/support/MediaElementView.js";import"../../../renderers/SimpleRenderer.js";import"../../../symbols/SimpleFillSymbol.js";import"../../../core/scheduling.js";import"../../../Color.js";import"../../../core/mathUtils.js";import"../../../config.js";import"../../../symbols/cim/defaultCIMValues.js";import"../../../core/floatRGBA.js";import"../../../geometry/Geometry.js";import"../../../geometry/Multipoint.js";import"../../../geometry/Point.js";import"../../../geometry/Polygon.js";import"../../../geometry/Polyline.js";import"../../../symbols/Font.js";import"../../../core/ObjectPool.js";import"../../../geometry/support/spatialReferenceUtils.js";import"../../../symbols/cim/effects/EffectAddControlPoints.js";import"../../../symbols/cim/effects/EffectArrow.js";import"../../../symbols/cim/effects/EffectBuffer.js";import"../../../symbols/cim/effects/EffectControlMeasureLine.js";import"../../../symbols/cim/effects/EffectCut.js";import"../../../symbols/cim/effects/EffectDashes.js";import"../../../symbols/cim/effects/EffectDonut.js";import"../../../symbols/cim/effects/EffectEnclosingPolygon.js";import"../../../symbols/cim/effects/EffectJog.js";import"../../../symbols/cim/effects/EffectMove.js";import"../../../symbols/cim/effects/EffectOffset.js";import"../../../symbols/cim/effects/EffectRadial.js";import"../../../symbols/cim/effects/EffectReverse.js";import"../../../symbols/cim/effects/EffectRotate.js";import"../../../symbols/cim/effects/EffectScale.js";import"../../../symbols/cim/effects/EffectSuppress.js";import"../../../symbols/cim/effects/EffectTaperedPolygon.js";import"../../../symbols/cim/effects/EffectWave.js";import"../../../symbols/cim/placements/PlacementAlongLineSameSize.js";import"../../../symbols/cim/placements/PlacementAtExtremities.js";import"../../../symbols/cim/placements/PlacementAtRatioPositions.js";import"../../../symbols/cim/placements/PlacementInsidePolygon.js";import"../../../symbols/cim/placements/PlacementOnLine.js";import"../../../symbols/cim/placements/PlacementOnVertices.js";import"../../../symbols/cim/placements/PlacementPolygonCenter.js";import"../../../symbols/cim/constants.js";import"../../../core/libs/gl-matrix-2/factories/vec2f32.js";import"../../../symbols/support/defaults.js";import"../../../symbols/cim/OverrideHelper.js";import"../../../layers/effects/EffectView.js";import"../../../core/Accessor.js";import"../engine/transitions/FadeTransition.js";import"../../../core/libs/gl-matrix-2/factories/vec4f32.js";import"../../webgl/enums.js";import"../engine/webgl/shaders/BackgroundPrograms.js";import"../../webgl/Program.js";import"../../webgl/checkWebGLError.js";import"../../webgl/VertexAttributeLayouts.js";import"../../webgl/BufferObject.js";import"../engine/webgl/AFeatureTile.js";import"../engine/webgl/DisplayEntity.js";import"../engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js";import"../engine/webgl/cpuMapped/MappedMesh.js";import"../engine/webgl/number.js";import"../engine/webgl/shaders/TileInfoPrograms.js";import"../../webgl/Texture.js";import"../engine/webgl/shaders/BitBlitPrograms.js";import"../../../request.js";import"../../../core/urlUtils.js";import"../../../core/pbf.js";import"../engine/webgl/shaders/StencilPrograms.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlendShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js";import"../engine/webgl/shaders/HighlightPrograms.js";import"../../webgl/FramebufferObject.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlitShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/BloomShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlurShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/ColorizeShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/DropShadowShader.js";import"../engine/webgl/meshing/SimpleMesh.js";import"../../webgl/Renderbuffer.js";import"../engine/webgl/PooledUint32Array.js";import"../engine/webgl/Profiler.js";import"../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import"../engine/webgl/shaderGraph/techniques/animated/attributes.js";import"../engine/webgl/mesh/templates/templateUtils.js";import"../engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/heatmap/HeatmapMeshWriter.js";import"../../../geometry/support/aaBoundingBox.js";import"../engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js";import"../../../core/sql/UnknownTimeZone.js";import"luxon";import"../../../intl/locale.js";import"../../../layers/support/fieldUtils.js";import"../../../time/constants.js";import"../engine/webgl/animations/instructions.js";import"../engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js";import"../../webgl/renderState.js";import"../../3d/webgl-engine/core/shaderModules/glsl.js";import"../../webgl/testSVGPremultipliedAlpha.js";import"../../../chunks/pe.js";import"../engine/webgl/meshing/definitions.js";import"../engine/webgl/shaderGraph/techniques/shaders/VideoScreenShader.js";import"../LabelManager.js";import"./graphics/GraphicsView2D.js";import"../../../chunks/earcut.js";import"../../../core/libs/gl-matrix-2/factories/vec3f32.js";import"../../../geometry/support/normalizeUtils.js";import"./support/util.js";import"../navigation/MapViewNavigation.js";import"../../../core/asyncUtils.js";import"../../../core/support/UpdatingHandles.js";import"../engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js";import"../../../core/unitUtils.js";import"../../../geometry/ellipsoidUtils.js";import"../../../geometry/SpatialReference.js";import"../../../geometry/projection/projectors.js";import"../engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../../../geometry/support/geodesicConstants.js";import"../../../geometry/support/Ellipsoid.js";import"../tiling/TileInfoView.js";import"../tiling/TileKey.js";import u from"../tiling/TileQueue.js";import j from"../tiling/TileStrategy.js";import y from"../engine/webgl/Overlay.js";import b from"../engine/webgl/OverlayContainer.js";import{LayerView2DMixin as w}from"./LayerView2D.js";import _ from"../../layers/LayerView.js";import v from"../../layers/MediaLayerView.js";import{TaskPriority as E}from"../../support/Scheduler.js";let G=class extends(w(v(_))){constructor(){super(...arguments),this._overlayContainer=null,this._fetchQueue=null,this._tileStrategy=null,this._elementReferences=new Map,this._debugGraphicsView=null,this._interaction=null,this.layer=null,this.elements=new t}initialize(){this.addHandles([n(()=>[this.interactive,this.suspended],async()=>{if(this.interactive&&!this._interaction){const{MediaLayerInteraction:e}=await import("./support/MediaLayerInteraction.js");this._interaction=new e({view:this.view,layer:this.layer}),this.selectedElement!==this._interaction.selectedElement&&(this._interaction.selectedElement=this.selectedElement),this.interactionOptions!==this._interaction.options&&(this._interaction.options=this.interactionOptions)}this._interaction&&(this._interaction.enabled=!this.suspended&&this.interactive)},l),n(()=>this.interactionOptions,e=>{this._interaction&&(this._interaction.options=e)},l),n(()=>this.selectedElement,e=>{this._interaction&&(this._interaction.selectedElement=e)},l)])}attach(){this.addAttachHandles([m(()=>this.layer.effectiveSource,"refresh",()=>{this._tileStrategy.refresh(e=>this._updateTile(e)),this.requestUpdate()}),m(()=>this.layer.effectiveSource,"change",({element:e})=>this._elementUpdateHandler(e))]),this._overlayContainer=new b,this.container.addChild(this._overlayContainer),this._fetchQueue=new u({tileInfoView:this.view.featuresTilingScheme,concurrency:10,process:(e,t)=>this._queryElements(e,t),scheduler:this.scheduler,priority:E.MAPVIEW_FETCH_QUEUE}),this._tileStrategy=new j({cachePolicy:"purge",resampling:!0,acquireTile:e=>this._acquireTile(e),releaseTile:e=>this._releaseTile(e),tileInfoView:this.view.featuresTilingScheme}),this.requestUpdate()}detach(){this.elements.removeAll(),this._tileStrategy.destroy(),this._fetchQueue.destroy(),this._overlayContainer.removeAllChildren(),this.container.removeAllChildren(),this._elementReferences.clear(),this._debugGraphicsView?.destroy()}supportsSpatialReference(e){return!0}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}update(e){this._tileStrategy.update(e),this._debugGraphicsView?.update(e)}async hitTest(e,t){const i=[],s=e.normalize(),r=[s.x,s.y];for(const{elementView:{normalizedCoords:o,element:n}}of this._elementReferences.values())null!=o&&d(o.rings,r)&&i.push({type:"media",element:n,layer:this.layer,mapPoint:e,sourcePoint:n.toSource(e)});return i.reverse()}canResume(){return null!=this.layer.source&&super.canResume()}async doRefresh(){this._fetchQueue.reset(),this._tileStrategy.refresh(e=>this._updateTile(e))}_acquireTile(e){const t=new P(e.clone());return this._updateTile(t),t}_updateTile(e){this._updatingHandles.addPromise(this._fetchQueue.push(e.key).then(t=>{const[i,s]=e.setElements(t);this._referenceElements(e,i),this._dereferenceElements(e,s),this.requestUpdate()},e=>{o(e)||s.getLogger(this).error(e)}))}_releaseTile(e){this._fetchQueue.abort(e.key.id),e.elements&&this._dereferenceElements(e,e.elements),this.requestUpdate()}async _queryElements(e,t){const i=this.layer.effectiveSource;if(null==i)return[];this.view.featuresTilingScheme.getTileBounds(S,e,!0);const s=new c({xmin:S[0],ymin:S[1],xmax:S[2],ymax:S[3],spatialReference:this.view.spatialReference});return i.queryElements(s,t)}_referenceElements(e,t){if(null!=this.layer.source)for(const i of t)this._referenceElement(e,i)}_referenceElement(e,t){r(this._elementReferences,t.uid,()=>{const e=new g({element:t,spatialReference:this.view.spatialReference}),r=new y(e);return this._overlayContainer.addChild(r),this.elements.add(t),this._updatingHandles.addPromise(t.load().catch(e=>{s.getLogger("esri.views.2d.layers.MediaLayerView2D").error(new i("element-load-error","Element cannot be displayed",{element:t,error:e}))})),{debugGraphic:null,elementView:e,overlay:r,tiles:new Set}}).tiles.add(e)}_dereferenceElements(e,t){for(const i of t)this._dereferenceElement(e,i)}_dereferenceElement(e,t){const i=this._elementReferences.get(t.uid);i.tiles.delete(e),i.tiles.size||(this._overlayContainer.removeChild(i.overlay),i.overlay.destroy(),i.elementView.destroy(),this._elementReferences.delete(t.uid),this.elements.remove(t),this._debugGraphicsView?.graphics.remove(i.debugGraphic))}_elementUpdateHandler(e){let t=this._elementReferences.get(e.uid);if(t){const i=t.elementView.normalizedCoords;if(null==i)return this._overlayContainer.removeChild(t.overlay),t.overlay.destroy(),t.elementView.destroy(),this._elementReferences.delete(e.uid),this.elements.remove(e),void this._debugGraphicsView?.graphics.remove(t.debugGraphic);const s=[],r=[];for(const e of this._tileStrategy.tiles){const o=M(this.view.featuresTilingScheme,e,i);t.tiles.has(e)?o||r.push(e):o&&s.push(e)}for(const t of s)this._referenceElement(t,e);for(const t of r)this._dereferenceElement(t,e);return t=this._elementReferences.get(e.uid),void(t?.debugGraphic&&(t.debugGraphic.geometry=t.elementView.normalizedCoords,this._debugGraphicsView.graphicUpdateHandler({graphic:t.debugGraphic,property:"geometry"})))}const i=new g({element:e,spatialReference:this.view.spatialReference}).normalizedCoords;if(null!=i)for(const s of this._tileStrategy.tiles){M(this.view.featuresTilingScheme,s,i)&&this._referenceElement(s,e)}}};e([a()],G.prototype,"layer",void 0),e([a({readOnly:!0})],G.prototype,"elements",void 0),G=e([p("esri.views.2d.layers.MediaLayerView2D")],G);const S=h(),q={xmin:0,ymin:0,xmax:0,ymax:0};function M(e,t,i){return e.getTileBounds(S,t.key,!0),q.xmin=S[0],q.ymin=S[1],q.xmax=S[2],q.ymax=S[3],f(q,i)}class P{constructor(e){this.key=e,this.elements=null,this.isReady=!1,this.visible=!0}setElements(e){const t=[],i=new Set(this.elements);this.elements=e;for(const s of e)i.has(s)?i.delete(s):t.push(s);return this.isReady=!0,[t,Array.from(i)]}destroy(){}}const C=G;export{C as default};
5
+ import{__decorate as e}from"tslib";import"../../../Graphic.js";import t from"../../../core/Collection.js";import i from"../../../core/Error.js";import"../../../core/has.js";import s from"../../../core/Logger.js";import{getOrCreateMapValue as r}from"../../../core/MapUtils.js";import{isAbortError as o}from"../../../core/promiseUtils.js";import{watch as n,syncAndInitial as l,on as m}from"../../../core/reactiveUtils.js";import{property as a}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/RandomLCG.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import c from"../../../geometry/Extent.js";import{create as h}from"../../../geometry/support/aaBoundingRect.js";import{ringsContainsCoords as d}from"../../../geometry/support/contains.js";import{extentIntersectsPolygon as g}from"../../../geometry/support/intersectsBase.js";import{MediaElementView as f}from"../../../layers/support/MediaElementView.js";import"../../../renderers/SimpleRenderer.js";import"../../../symbols/SimpleFillSymbol.js";import"../../../core/scheduling.js";import"../../../Color.js";import"../../../core/mathUtils.js";import"../../../config.js";import"../../../symbols/cim/defaultCIMValues.js";import"../../../core/floatRGBA.js";import"../../../geometry/Geometry.js";import"../../../geometry/Multipoint.js";import"../../../geometry/Point.js";import"../../../geometry/Polygon.js";import"../../../geometry/Polyline.js";import"../../../symbols/Font.js";import"../../../core/ObjectPool.js";import"../../../geometry/support/spatialReferenceUtils.js";import"../../../symbols/cim/effects/EffectAddControlPoints.js";import"../../../symbols/cim/effects/EffectArrow.js";import"../../../symbols/cim/effects/EffectBuffer.js";import"../../../symbols/cim/effects/EffectControlMeasureLine.js";import"../../../symbols/cim/effects/EffectCut.js";import"../../../symbols/cim/effects/EffectDashes.js";import"../../../symbols/cim/effects/EffectDonut.js";import"../../../symbols/cim/effects/EffectEnclosingPolygon.js";import"../../../symbols/cim/effects/EffectJog.js";import"../../../symbols/cim/effects/EffectMove.js";import"../../../symbols/cim/effects/EffectOffset.js";import"../../../symbols/cim/effects/EffectRadial.js";import"../../../symbols/cim/effects/EffectReverse.js";import"../../../symbols/cim/effects/EffectRotate.js";import"../../../symbols/cim/effects/EffectScale.js";import"../../../symbols/cim/effects/EffectSuppress.js";import"../../../symbols/cim/effects/EffectTaperedPolygon.js";import"../../../symbols/cim/effects/EffectWave.js";import"../../../symbols/cim/placements/PlacementAlongLineSameSize.js";import"../../../symbols/cim/placements/PlacementAtExtremities.js";import"../../../symbols/cim/placements/PlacementAtRatioPositions.js";import"../../../symbols/cim/placements/PlacementInsidePolygon.js";import"../../../symbols/cim/placements/PlacementOnLine.js";import"../../../symbols/cim/placements/PlacementOnVertices.js";import"../../../symbols/cim/placements/PlacementPolygonCenter.js";import"../../../symbols/cim/constants.js";import"../../../core/libs/gl-matrix-2/factories/vec2f32.js";import"../../../symbols/support/defaults.js";import"../../../symbols/cim/OverrideHelper.js";import"../../../layers/effects/EffectView.js";import"../../../core/Accessor.js";import"../engine/transitions/FadeTransition.js";import"../../../core/libs/gl-matrix-2/factories/vec4f32.js";import"../../webgl/enums.js";import"../engine/webgl/shaders/BackgroundPrograms.js";import"../../webgl/Program.js";import"../../webgl/checkWebGLError.js";import"../../webgl/VertexAttributeLayouts.js";import"../../webgl/BufferObject.js";import"../engine/webgl/AFeatureTile.js";import"../engine/webgl/DisplayEntity.js";import"../engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js";import"../engine/webgl/cpuMapped/MappedMesh.js";import"../engine/webgl/number.js";import"../engine/webgl/shaders/TileInfoPrograms.js";import"../../webgl/Texture.js";import"../engine/webgl/shaders/BitBlitPrograms.js";import"../../../request.js";import"../../../core/urlUtils.js";import"../../../core/pbf.js";import"../engine/webgl/shaders/StencilPrograms.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlendShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js";import"../engine/webgl/shaders/HighlightPrograms.js";import"../../webgl/FramebufferObject.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlitShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/BloomShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlurShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/ColorizeShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/DropShadowShader.js";import"../engine/webgl/meshing/SimpleMesh.js";import"../../webgl/Renderbuffer.js";import"../engine/webgl/PooledUint32Array.js";import"../engine/webgl/Profiler.js";import"../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import"../engine/webgl/shaderGraph/techniques/animated/attributes.js";import"../engine/webgl/mesh/templates/templateUtils.js";import"../engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/heatmap/HeatmapMeshWriter.js";import"../../../geometry/support/aaBoundingBox.js";import"../engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js";import"../../../core/sql/UnknownTimeZone.js";import"luxon";import"../../../intl/locale.js";import"../../../layers/support/fieldUtils.js";import"../../../time/constants.js";import"../engine/webgl/animations/instructions.js";import"../engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js";import"../../webgl/renderState.js";import"../../3d/webgl-engine/core/shaderModules/glsl.js";import"../../webgl/testSVGPremultipliedAlpha.js";import"../../../chunks/pe.js";import"../engine/webgl/meshing/definitions.js";import"../engine/webgl/shaderGraph/techniques/shaders/VideoScreenShader.js";import"../LabelManager.js";import"./graphics/GraphicsView2D.js";import"../../../chunks/earcut.js";import"../../../core/libs/gl-matrix-2/factories/vec3f32.js";import"../../../geometry/support/normalizeUtils.js";import"./support/util.js";import"../navigation/MapViewNavigation.js";import"../../../core/asyncUtils.js";import"../../../core/support/UpdatingHandles.js";import"../engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js";import"../../../core/unitUtils.js";import"../../../geometry/ellipsoidUtils.js";import"../../../geometry/SpatialReference.js";import"../../../geometry/operators/support/GeographicTransformation.js";import"../../../geometry/projection/projectors.js";import"../engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../../../geometry/support/geodesicConstants.js";import"../../../geometry/support/Ellipsoid.js";import"../tiling/TileInfoView.js";import"../tiling/TileKey.js";import u from"../tiling/TileQueue.js";import j from"../tiling/TileStrategy.js";import y from"../engine/webgl/Overlay.js";import b from"../engine/webgl/OverlayContainer.js";import{LayerView2DMixin as w}from"./LayerView2D.js";import _ from"../../layers/LayerView.js";import v from"../../layers/MediaLayerView.js";import{TaskPriority as E}from"../../support/Scheduler.js";let G=class extends(w(v(_))){constructor(){super(...arguments),this._overlayContainer=null,this._fetchQueue=null,this._tileStrategy=null,this._elementReferences=new Map,this._debugGraphicsView=null,this._interaction=null,this.layer=null,this.elements=new t}initialize(){this.addHandles([n(()=>[this.interactive,this.suspended],async()=>{if(this.interactive&&!this._interaction){const{MediaLayerInteraction:e}=await import("./support/MediaLayerInteraction.js");this._interaction=new e({view:this.view,layer:this.layer}),this.selectedElement!==this._interaction.selectedElement&&(this._interaction.selectedElement=this.selectedElement),this.interactionOptions!==this._interaction.options&&(this._interaction.options=this.interactionOptions)}this._interaction&&(this._interaction.enabled=!this.suspended&&this.interactive)},l),n(()=>this.interactionOptions,e=>{this._interaction&&(this._interaction.options=e)},l),n(()=>this.selectedElement,e=>{this._interaction&&(this._interaction.selectedElement=e)},l)])}attach(){this.addAttachHandles([m(()=>this.layer.effectiveSource,"refresh",()=>{this._tileStrategy.refresh(e=>this._updateTile(e)),this.requestUpdate()}),m(()=>this.layer.effectiveSource,"change",({element:e})=>this._elementUpdateHandler(e))]),this._overlayContainer=new b,this.container.addChild(this._overlayContainer),this._fetchQueue=new u({tileInfoView:this.view.featuresTilingScheme,concurrency:10,process:(e,t)=>this._queryElements(e,t),scheduler:this.scheduler,priority:E.MAPVIEW_FETCH_QUEUE}),this._tileStrategy=new j({cachePolicy:"purge",resampling:!0,acquireTile:e=>this._acquireTile(e),releaseTile:e=>this._releaseTile(e),tileInfoView:this.view.featuresTilingScheme}),this.requestUpdate()}detach(){this.elements.removeAll(),this._tileStrategy.destroy(),this._fetchQueue.destroy(),this._overlayContainer.removeAllChildren(),this.container.removeAllChildren(),this._elementReferences.clear(),this._debugGraphicsView?.destroy()}supportsSpatialReference(e){return!0}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}update(e){this._tileStrategy.update(e),this._debugGraphicsView?.update(e)}async hitTest(e,t){const i=[],s=e.normalize(),r=[s.x,s.y];for(const{elementView:{normalizedCoords:o,element:n}}of this._elementReferences.values())null!=o&&d(o.rings,r)&&i.push({type:"media",element:n,layer:this.layer,mapPoint:e,sourcePoint:n.toSource(e)});return i.reverse()}canResume(){return null!=this.layer.source&&super.canResume()}async doRefresh(){this._fetchQueue.reset(),this._tileStrategy.refresh(e=>this._updateTile(e))}_acquireTile(e){const t=new P(e.clone());return this._updateTile(t),t}_updateTile(e){this._updatingHandles.addPromise(this._fetchQueue.push(e.key).then(t=>{const[i,s]=e.setElements(t);this._referenceElements(e,i),this._dereferenceElements(e,s),this.requestUpdate()},e=>{o(e)||s.getLogger(this).error(e)}))}_releaseTile(e){this._fetchQueue.abort(e.key.id),e.elements&&this._dereferenceElements(e,e.elements),this.requestUpdate()}async _queryElements(e,t){const i=this.layer.effectiveSource;if(null==i)return[];this.view.featuresTilingScheme.getTileBounds(S,e,!0);const s=new c({xmin:S[0],ymin:S[1],xmax:S[2],ymax:S[3],spatialReference:this.view.spatialReference});return i.queryElements(s,t)}_referenceElements(e,t){if(null!=this.layer.source)for(const i of t)this._referenceElement(e,i)}_referenceElement(e,t){r(this._elementReferences,t.uid,()=>{const e=new f({element:t,spatialReference:this.view.spatialReference}),r=new y(e);return this._overlayContainer.addChild(r),this.elements.add(t),this._updatingHandles.addPromise(t.load().catch(e=>{s.getLogger("esri.views.2d.layers.MediaLayerView2D").error(new i("element-load-error","Element cannot be displayed",{element:t,error:e}))})),{debugGraphic:null,elementView:e,overlay:r,tiles:new Set}}).tiles.add(e)}_dereferenceElements(e,t){for(const i of t)this._dereferenceElement(e,i)}_dereferenceElement(e,t){const i=this._elementReferences.get(t.uid);i.tiles.delete(e),i.tiles.size||(this._overlayContainer.removeChild(i.overlay),i.overlay.destroy(),i.elementView.destroy(),this._elementReferences.delete(t.uid),this.elements.remove(t),this._debugGraphicsView?.graphics.remove(i.debugGraphic))}_elementUpdateHandler(e){let t=this._elementReferences.get(e.uid);if(t){const i=t.elementView.normalizedCoords;if(null==i)return this._overlayContainer.removeChild(t.overlay),t.overlay.destroy(),t.elementView.destroy(),this._elementReferences.delete(e.uid),this.elements.remove(e),void this._debugGraphicsView?.graphics.remove(t.debugGraphic);const s=[],r=[];for(const e of this._tileStrategy.tiles){const o=M(this.view.featuresTilingScheme,e,i);t.tiles.has(e)?o||r.push(e):o&&s.push(e)}for(const t of s)this._referenceElement(t,e);for(const t of r)this._dereferenceElement(t,e);return t=this._elementReferences.get(e.uid),void(t?.debugGraphic&&(t.debugGraphic.geometry=t.elementView.normalizedCoords,this._debugGraphicsView.graphicUpdateHandler({graphic:t.debugGraphic,property:"geometry"})))}const i=new f({element:e,spatialReference:this.view.spatialReference}).normalizedCoords;if(null!=i)for(const s of this._tileStrategy.tiles){M(this.view.featuresTilingScheme,s,i)&&this._referenceElement(s,e)}}};e([a()],G.prototype,"layer",void 0),e([a({readOnly:!0})],G.prototype,"elements",void 0),G=e([p("esri.views.2d.layers.MediaLayerView2D")],G);const S=h(),q={xmin:0,ymin:0,xmax:0,ymax:0};function M(e,t,i){return e.getTileBounds(S,t.key,!0),q.xmin=S[0],q.ymin=S[1],q.xmax=S[2],q.ymax=S[3],g(q,i)}class P{constructor(e){this.key=e,this.elements=null,this.isReady=!1,this.visible=!0}setElements(e){const t=[],i=new Set(this.elements);this.elements=e;for(const s of e)i.has(s)?i.delete(s):t.push(s);return this.isReady=!0,[t,Array.from(i)]}destroy(){}}const C=G;export{C as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{makeHandle as i}from"../../../core/handleUtils.js";import t from"../../../core/Logger.js";import{isAbortError as s,waitTick as r}from"../../../core/promiseUtils.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{equals as h}from"../../../geometry/support/spatialReferenceUtils.js";import{GraphicsCollection as a}from"../../../support/GraphicsCollection.js";import"../../../core/Error.js";import"../../../core/scheduling.js";import"../../../Color.js";import"../../../core/mathUtils.js";import"../../../config.js";import"../../../symbols/cim/defaultCIMValues.js";import"../../../core/floatRGBA.js";import"../../../geometry/Extent.js";import"../../../geometry/Geometry.js";import"../../../geometry/Multipoint.js";import"../../../geometry/Point.js";import"../../../geometry/Polygon.js";import"../../../geometry/Polyline.js";import"../../../symbols/Font.js";import"../../../core/ObjectPool.js";import"../../../symbols/cim/effects/EffectAddControlPoints.js";import"../../../symbols/cim/effects/EffectArrow.js";import"../../../symbols/cim/effects/EffectBuffer.js";import"../../../symbols/cim/effects/EffectControlMeasureLine.js";import"../../../symbols/cim/effects/EffectCut.js";import"../../../symbols/cim/effects/EffectDashes.js";import"../../../symbols/cim/effects/EffectDonut.js";import"../../../symbols/cim/effects/EffectEnclosingPolygon.js";import"../../../symbols/cim/effects/EffectJog.js";import"../../../symbols/cim/effects/EffectMove.js";import"../../../symbols/cim/effects/EffectOffset.js";import"../../../symbols/cim/effects/EffectRadial.js";import"../../../symbols/cim/effects/EffectReverse.js";import"../../../symbols/cim/effects/EffectRotate.js";import"../../../symbols/cim/effects/EffectScale.js";import"../../../symbols/cim/effects/EffectSuppress.js";import"../../../symbols/cim/effects/EffectTaperedPolygon.js";import"../../../symbols/cim/effects/EffectWave.js";import"../../../symbols/cim/placements/PlacementAlongLineSameSize.js";import"../../../symbols/cim/placements/PlacementAtExtremities.js";import"../../../symbols/cim/placements/PlacementAtRatioPositions.js";import"../../../symbols/cim/placements/PlacementInsidePolygon.js";import"../../../symbols/cim/placements/PlacementOnLine.js";import"../../../symbols/cim/placements/PlacementOnVertices.js";import"../../../symbols/cim/placements/PlacementPolygonCenter.js";import"../../../symbols/cim/constants.js";import"../../../core/libs/gl-matrix-2/factories/vec2f32.js";import"../../../symbols/support/defaults.js";import"../../../symbols/cim/OverrideHelper.js";import"../../../layers/effects/EffectView.js";import"../../../core/Accessor.js";import"../engine/transitions/FadeTransition.js";import"../../../core/libs/gl-matrix-2/factories/vec4f32.js";import"../../webgl/enums.js";import"../engine/webgl/shaders/BackgroundPrograms.js";import"../../webgl/Program.js";import"../../webgl/checkWebGLError.js";import"../../webgl/VertexAttributeLayouts.js";import"../../webgl/BufferObject.js";import"../engine/webgl/AFeatureTile.js";import"../engine/webgl/DisplayEntity.js";import"../engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js";import"../engine/webgl/cpuMapped/MappedMesh.js";import"../engine/webgl/number.js";import"../engine/webgl/shaders/TileInfoPrograms.js";import"../../webgl/Texture.js";import"../engine/webgl/shaders/BitBlitPrograms.js";import"../../../request.js";import"../../../core/urlUtils.js";import"../../../core/pbf.js";import"../engine/webgl/shaders/StencilPrograms.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlendShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js";import"../engine/webgl/shaders/HighlightPrograms.js";import"../../webgl/FramebufferObject.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlitShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/BloomShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlurShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/ColorizeShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/DropShadowShader.js";import"../engine/webgl/meshing/SimpleMesh.js";import"../../webgl/Renderbuffer.js";import"../engine/webgl/PooledUint32Array.js";import"../engine/webgl/Profiler.js";import"../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import"../engine/webgl/shaderGraph/techniques/animated/attributes.js";import"../engine/webgl/mesh/templates/templateUtils.js";import"../engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/heatmap/HeatmapMeshWriter.js";import"../../../geometry/support/aaBoundingBox.js";import"../engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js";import"../../../core/sql/UnknownTimeZone.js";import"luxon";import"../../../intl/locale.js";import"../../../layers/support/fieldUtils.js";import"../../../time/constants.js";import"../engine/webgl/animations/instructions.js";import"../engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js";import"../../webgl/renderState.js";import"../../3d/webgl-engine/core/shaderModules/glsl.js";import"../../webgl/testSVGPremultipliedAlpha.js";import"../../../chunks/pe.js";import"../engine/webgl/meshing/definitions.js";import"../engine/webgl/shaderGraph/techniques/shaders/VideoScreenShader.js";import"../LabelManager.js";import p from"./graphics/GraphicsView2D.js";import"../../../core/accessorSupport/watch.js";import"../../../core/accessorSupport/tracking/SimpleTrackingTarget.js";import"../../../chunks/earcut.js";import"../../../core/libs/gl-matrix-2/factories/vec3f32.js";import"../../../geometry/support/normalizeUtils.js";import"./support/util.js";import"../navigation/MapViewNavigation.js";import"../../../core/asyncUtils.js";import"../../../core/support/UpdatingHandles.js";import"../engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js";import"../../../core/unitUtils.js";import"../../../geometry/ellipsoidUtils.js";import"../../../geometry/SpatialReference.js";import"../../../geometry/projection/projectors.js";import"../engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../../../geometry/support/geodesicConstants.js";import"../../../geometry/support/Ellipsoid.js";import{BitmapTileLayerView2D as n}from"./BitmapTileLayerView2D.js";import{LayerView2DMixin as m}from"./LayerView2D.js";import c from"./graphics/HighlightGraphicContainer.js";import{createBlankImage as g,resampleImage as f}from"./support/imageUtils.js";import u from"../tiling/TileInfoView.js";import d from"../tiling/TileKey.js";import j from"../tiling/TileQueue.js";import y from"../tiling/TileStrategy.js";import w from"../../layers/LayerView.js";import{RefreshableLayerView as b}from"../../layers/RefreshableLayerView.js";import{getHighlightGraphics as _}from"../../layers/support/highlightUtils.js";import{isMapServiceLayerView as G,MapServiceLayerViewHelper as T}from"../../layers/support/MapServiceLayerViewHelper.js";import{createQueryGeometry as q}from"../../support/drapedUtils.js";import{getHighlightName as V}from"../../support/highlightOptionsUtils.js";import{TaskPriority as S}from"../../support/Scheduler.js";const I=[0,0];let P=class extends(b(n(m(w)))){constructor(){super(...arguments),this._fetchQueue=null,this._highlightGraphics=new a,this._highlightView=null,this._popupHighlightHelper=null,this._tileStrategy=null,this.layer=null}get resampling(){return!("resampling"in this.layer)||!1!==this.layer.resampling}get tilemapCache(){return"tilemapCache"in this.layer?this.layer.tilemapCache:null}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume(),this._highlightView?.processUpdate(e)}attach(){const e="tileServers"in this.layer?this.layer.tileServers:null,i=this.tilemapCache;if(this._tileInfoView=new u(this.layer.tileInfo,this.layer.fullExtent,i?.effectiveMinLOD,i?.effectiveMaxLOD),this._fetchQueue=new j({tileInfoView:this._tileInfoView,concurrency:e&&10*e.length||10,process:(e,i)=>this.fetchTile(e,i),scheduler:this.scheduler,priority:S.MAPVIEW_FETCH_QUEUE}),this._tileStrategy=new y({cachePolicy:"keep",resampling:this.resampling,acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView}),G(this,this.layer)){const e=this._highlightView=new p({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new c(this.view.featuresTilingScheme),defaultPointSymbolEnabled:!1});this.container.addChild(this._highlightView.container),this._popupHighlightHelper=new T({createFetchPopupFeaturesQueryGeometry:(e,i)=>q(e,i,this.view),highlightGraphics:this._highlightGraphics,highlightGraphicUpdated:({graphic:i,property:t})=>e.graphicUpdateHandler({graphic:i,property:t}),layerView:this,updatingHandles:this._updatingHandles})}this.requestUpdate(),this.addAttachHandles(this._updatingHandles.add(()=>this.resampling,()=>{this.doRefresh()})),super.attach()}detach(){super.detach(),this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._popupHighlightHelper?.destroy(),this._highlightView?.destroy(),this._fetchQueue=this._tileStrategy=this._tileInfoView=this._popupHighlightHelper=null}async fetchPopupFeaturesAtLocation(e,i){return this._popupHighlightHelper?this._popupHighlightHelper.fetchPopupFeaturesAtLocation(e,i):[]}highlight(e,t){const s=_(e);if(0===s.length)return i();const r=V(t);return this._addHighlightGraphics(s,r),i(()=>!this.destroyed&&this._removeHighlightGraphics(s,r))}_processHighlight(){const e=this._getHighlights();this._highlightView?.setHighlight(e)}_addHighlightGraphics(e,i){this._highlightGraphics.addMany(e),this._addHighlights(e.map(e=>e.uid),i)}_removeHighlightGraphics(e,i){this._highlightGraphics.removeMany(e),this._removeHighlights(e.map(e=>e.uid),i)}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}supportsSpatialReference(e){return h(this.layer.tileInfo?.spatialReference,e)}async doRefresh(){if(this.attached){if(this.suspended)return this._tileStrategy.clear(),void this.requestUpdate();this._fetchQueue.reset(),this._tileStrategy.refresh(e=>this._updatingHandles.addPromise(this._enqueueTileFetch(e)))}}acquireTile(e){const i=this._bitmapView.createTile(e),t=i.bitmap;return[t.x,t.y]=this._tileInfoView.getTileCoords(I,i.key),t.resolution=this._tileInfoView.getTileResolution(i.key),[t.width,t.height]=this._tileInfoView.tileInfo.size,this._updatingHandles.addPromise(this._enqueueTileFetch(i)),this._bitmapView.addChild(i),this.requestUpdate(),i}releaseTile(e){this._fetchQueue.abort(e.key.id),this._bitmapView.removeChild(e),e.once("detach",()=>e.destroy()),this.requestUpdate()}async fetchTile(e,i={}){return this.tilemapCache?this._fetchTileWithTilemapCache(e,i):this._fetchTileWithoutTilemapCache(e,i)}async _fetchTileWithoutTilemapCache(e,i={}){const{signal:t,resamplingLevel:r=0}=i;try{return await this._fetchImage(e,t)}catch(o){if(s(o))throw o;if(!this.resampling)return g(this._tileInfoView.tileInfo.size);if(r<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){const s=new d(t),o=await this._fetchTileWithoutTilemapCache(s,{...i,resamplingLevel:r+1});return f(this._tileInfoView,o,s,e)}}return g(this._tileInfoView.tileInfo.size)}}async _fetchTileWithTilemapCache(e,i={}){const t=this.tilemapCache,{signal:o,resamplingLevel:l=0}=i,h=new d(0,0,0,0);let a,p=null;try{if(p=await t.fetchAvailabilityUpsample(e.level,e.row,e.col,h,{signal:o}),!this.resampling&&h.level!==e.level)return await r(i),g(this._tileInfoView.tileInfo.size);a=await this._fetchImage(h,o)}catch(n){if(s(n))throw n;if(this.resampling&&"unknown"===p&&l<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){h.set(t);try{a=await this._fetchTileWithTilemapCache(h,{...i,resamplingLevel:l+1})}catch{}}}}return a?this.resampling?f(this._tileInfoView,a,h,e):a:g(this._tileInfoView.tileInfo.size)}async _enqueueTileFetch(e){if(!this._fetchQueue.has(e.key.id)){try{const i=await this._fetchQueue.push(e.key);e.bitmap.source=i,e.bitmap.width=this._tileInfoView.tileInfo.size[0],e.bitmap.height=this._tileInfoView.tileInfo.size[1],e.once("attach",()=>this.requestUpdate())}catch(i){s(i)||t.getLogger(this).error(i)}this.requestUpdate()}}async _fetchImage(e,i){return this.layer.fetchImageBitmapTile(e.level,e.row,e.col,{signal:i})}};e([o()],P.prototype,"resampling",null),e([o()],P.prototype,"tilemapCache",null),P=e([l("esri.views.2d.layers.TileLayerView2D")],P);const v=P;export{v as default};
5
+ import{__decorate as e}from"tslib";import{makeHandle as i}from"../../../core/handleUtils.js";import t from"../../../core/Logger.js";import{isAbortError as s,waitTick as r}from"../../../core/promiseUtils.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{equals as h}from"../../../geometry/support/spatialReferenceUtils.js";import{GraphicsCollection as a}from"../../../support/GraphicsCollection.js";import"../../../core/Error.js";import"../../../core/scheduling.js";import"../../../Color.js";import"../../../core/mathUtils.js";import"../../../config.js";import"../../../symbols/cim/defaultCIMValues.js";import"../../../core/floatRGBA.js";import"../../../geometry/Extent.js";import"../../../geometry/Geometry.js";import"../../../geometry/Multipoint.js";import"../../../geometry/Point.js";import"../../../geometry/Polygon.js";import"../../../geometry/Polyline.js";import"../../../symbols/Font.js";import"../../../core/ObjectPool.js";import"../../../symbols/cim/effects/EffectAddControlPoints.js";import"../../../symbols/cim/effects/EffectArrow.js";import"../../../symbols/cim/effects/EffectBuffer.js";import"../../../symbols/cim/effects/EffectControlMeasureLine.js";import"../../../symbols/cim/effects/EffectCut.js";import"../../../symbols/cim/effects/EffectDashes.js";import"../../../symbols/cim/effects/EffectDonut.js";import"../../../symbols/cim/effects/EffectEnclosingPolygon.js";import"../../../symbols/cim/effects/EffectJog.js";import"../../../symbols/cim/effects/EffectMove.js";import"../../../symbols/cim/effects/EffectOffset.js";import"../../../symbols/cim/effects/EffectRadial.js";import"../../../symbols/cim/effects/EffectReverse.js";import"../../../symbols/cim/effects/EffectRotate.js";import"../../../symbols/cim/effects/EffectScale.js";import"../../../symbols/cim/effects/EffectSuppress.js";import"../../../symbols/cim/effects/EffectTaperedPolygon.js";import"../../../symbols/cim/effects/EffectWave.js";import"../../../symbols/cim/placements/PlacementAlongLineSameSize.js";import"../../../symbols/cim/placements/PlacementAtExtremities.js";import"../../../symbols/cim/placements/PlacementAtRatioPositions.js";import"../../../symbols/cim/placements/PlacementInsidePolygon.js";import"../../../symbols/cim/placements/PlacementOnLine.js";import"../../../symbols/cim/placements/PlacementOnVertices.js";import"../../../symbols/cim/placements/PlacementPolygonCenter.js";import"../../../symbols/cim/constants.js";import"../../../core/libs/gl-matrix-2/factories/vec2f32.js";import"../../../symbols/support/defaults.js";import"../../../symbols/cim/OverrideHelper.js";import"../../../layers/effects/EffectView.js";import"../../../core/Accessor.js";import"../engine/transitions/FadeTransition.js";import"../../../core/libs/gl-matrix-2/factories/vec4f32.js";import"../../webgl/enums.js";import"../engine/webgl/shaders/BackgroundPrograms.js";import"../../webgl/Program.js";import"../../webgl/checkWebGLError.js";import"../../webgl/VertexAttributeLayouts.js";import"../../webgl/BufferObject.js";import"../engine/webgl/AFeatureTile.js";import"../engine/webgl/DisplayEntity.js";import"../engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js";import"../engine/webgl/cpuMapped/MappedMesh.js";import"../engine/webgl/number.js";import"../engine/webgl/shaders/TileInfoPrograms.js";import"../../webgl/Texture.js";import"../engine/webgl/shaders/BitBlitPrograms.js";import"../../../request.js";import"../../../core/urlUtils.js";import"../../../core/pbf.js";import"../engine/webgl/shaders/StencilPrograms.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlendShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/OpacityShader.js";import"../engine/webgl/shaders/HighlightPrograms.js";import"../../webgl/FramebufferObject.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlitShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/BloomShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/BlurShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/ColorizeShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/DropShadowShader.js";import"../engine/webgl/meshing/SimpleMesh.js";import"../../webgl/Renderbuffer.js";import"../engine/webgl/PooledUint32Array.js";import"../engine/webgl/Profiler.js";import"../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import"../engine/webgl/shaderGraph/techniques/animated/attributes.js";import"../engine/webgl/mesh/templates/templateUtils.js";import"../engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/dotDensity/DotDensityMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/FillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/heatmap/HeatmapMeshWriter.js";import"../../../geometry/support/aaBoundingBox.js";import"../engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js";import"../engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js";import"../../../core/sql/UnknownTimeZone.js";import"luxon";import"../../../intl/locale.js";import"../../../layers/support/fieldUtils.js";import"../../../time/constants.js";import"../engine/webgl/animations/instructions.js";import"../engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js";import"../../webgl/renderState.js";import"../../3d/webgl-engine/core/shaderModules/glsl.js";import"../../webgl/testSVGPremultipliedAlpha.js";import"../../../chunks/pe.js";import"../engine/webgl/meshing/definitions.js";import"../engine/webgl/shaderGraph/techniques/shaders/VideoScreenShader.js";import"../LabelManager.js";import p from"./graphics/GraphicsView2D.js";import"../../../core/accessorSupport/watch.js";import"../../../core/accessorSupport/tracking/SimpleTrackingTarget.js";import"../../../chunks/earcut.js";import"../../../core/libs/gl-matrix-2/factories/vec3f32.js";import"../../../geometry/support/normalizeUtils.js";import"./support/util.js";import"../navigation/MapViewNavigation.js";import"../../../core/asyncUtils.js";import"../../../core/support/UpdatingHandles.js";import"../engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js";import"../../../core/unitUtils.js";import"../../../geometry/ellipsoidUtils.js";import"../../../geometry/SpatialReference.js";import"../../../geometry/operators/support/GeographicTransformation.js";import"../../../geometry/projection/projectors.js";import"../engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../../../geometry/support/geodesicConstants.js";import"../../../geometry/support/Ellipsoid.js";import{BitmapTileLayerView2D as n}from"./BitmapTileLayerView2D.js";import{LayerView2DMixin as m}from"./LayerView2D.js";import c from"./graphics/HighlightGraphicContainer.js";import{createBlankImage as g,resampleImage as f}from"./support/imageUtils.js";import u from"../tiling/TileInfoView.js";import d from"../tiling/TileKey.js";import j from"../tiling/TileQueue.js";import y from"../tiling/TileStrategy.js";import w from"../../layers/LayerView.js";import{RefreshableLayerView as b}from"../../layers/RefreshableLayerView.js";import{getHighlightGraphics as _}from"../../layers/support/highlightUtils.js";import{isMapServiceLayerView as G,MapServiceLayerViewHelper as T}from"../../layers/support/MapServiceLayerViewHelper.js";import{createQueryGeometry as q}from"../../support/drapedUtils.js";import{getHighlightName as V}from"../../support/highlightOptionsUtils.js";import{TaskPriority as S}from"../../support/Scheduler.js";const I=[0,0];let P=class extends(b(n(m(w)))){constructor(){super(...arguments),this._fetchQueue=null,this._highlightGraphics=new a,this._highlightView=null,this._popupHighlightHelper=null,this._tileStrategy=null,this.layer=null}get resampling(){return!("resampling"in this.layer)||!1!==this.layer.resampling}get tilemapCache(){return"tilemapCache"in this.layer?this.layer.tilemapCache:null}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume(),this._highlightView?.processUpdate(e)}attach(){const e="tileServers"in this.layer?this.layer.tileServers:null,i=this.tilemapCache;if(this._tileInfoView=new u(this.layer.tileInfo,this.layer.fullExtent,i?.effectiveMinLOD,i?.effectiveMaxLOD),this._fetchQueue=new j({tileInfoView:this._tileInfoView,concurrency:e&&10*e.length||10,process:(e,i)=>this.fetchTile(e,i),scheduler:this.scheduler,priority:S.MAPVIEW_FETCH_QUEUE}),this._tileStrategy=new y({cachePolicy:"keep",resampling:this.resampling,acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView}),G(this,this.layer)){const e=this._highlightView=new p({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new c(this.view.featuresTilingScheme),defaultPointSymbolEnabled:!1});this.container.addChild(this._highlightView.container),this._popupHighlightHelper=new T({createFetchPopupFeaturesQueryGeometry:(e,i)=>q(e,i,this.view),highlightGraphics:this._highlightGraphics,highlightGraphicUpdated:({graphic:i,property:t})=>e.graphicUpdateHandler({graphic:i,property:t}),layerView:this,updatingHandles:this._updatingHandles})}this.requestUpdate(),this.addAttachHandles(this._updatingHandles.add(()=>this.resampling,()=>{this.doRefresh()})),super.attach()}detach(){super.detach(),this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._popupHighlightHelper?.destroy(),this._highlightView?.destroy(),this._fetchQueue=this._tileStrategy=this._tileInfoView=this._popupHighlightHelper=null}async fetchPopupFeaturesAtLocation(e,i){return this._popupHighlightHelper?this._popupHighlightHelper.fetchPopupFeaturesAtLocation(e,i):[]}highlight(e,t){const s=_(e);if(0===s.length)return i();const r=V(t);return this._addHighlightGraphics(s,r),i(()=>!this.destroyed&&this._removeHighlightGraphics(s,r))}_processHighlight(){const e=this._getHighlights();this._highlightView?.setHighlight(e)}_addHighlightGraphics(e,i){this._highlightGraphics.addMany(e),this._addHighlights(e.map(e=>e.uid),i)}_removeHighlightGraphics(e,i){this._highlightGraphics.removeMany(e),this._removeHighlights(e.map(e=>e.uid),i)}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}supportsSpatialReference(e){return h(this.layer.tileInfo?.spatialReference,e)}async doRefresh(){if(this.attached){if(this.suspended)return this._tileStrategy.clear(),void this.requestUpdate();this._fetchQueue.reset(),this._tileStrategy.refresh(e=>this._updatingHandles.addPromise(this._enqueueTileFetch(e)))}}acquireTile(e){const i=this._bitmapView.createTile(e),t=i.bitmap;return[t.x,t.y]=this._tileInfoView.getTileCoords(I,i.key),t.resolution=this._tileInfoView.getTileResolution(i.key),[t.width,t.height]=this._tileInfoView.tileInfo.size,this._updatingHandles.addPromise(this._enqueueTileFetch(i)),this._bitmapView.addChild(i),this.requestUpdate(),i}releaseTile(e){this._fetchQueue.abort(e.key.id),this._bitmapView.removeChild(e),e.once("detach",()=>e.destroy()),this.requestUpdate()}async fetchTile(e,i={}){return this.tilemapCache?this._fetchTileWithTilemapCache(e,i):this._fetchTileWithoutTilemapCache(e,i)}async _fetchTileWithoutTilemapCache(e,i={}){const{signal:t,resamplingLevel:r=0}=i;try{return await this._fetchImage(e,t)}catch(o){if(s(o))throw o;if(!this.resampling)return g(this._tileInfoView.tileInfo.size);if(r<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){const s=new d(t),o=await this._fetchTileWithoutTilemapCache(s,{...i,resamplingLevel:r+1});return f(this._tileInfoView,o,s,e)}}return g(this._tileInfoView.tileInfo.size)}}async _fetchTileWithTilemapCache(e,i={}){const t=this.tilemapCache,{signal:o,resamplingLevel:l=0}=i,h=new d(0,0,0,0);let a,p=null;try{if(p=await t.fetchAvailabilityUpsample(e.level,e.row,e.col,h,{signal:o}),!this.resampling&&h.level!==e.level)return await r(i),g(this._tileInfoView.tileInfo.size);a=await this._fetchImage(h,o)}catch(n){if(s(n))throw n;if(this.resampling&&"unknown"===p&&l<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){h.set(t);try{a=await this._fetchTileWithTilemapCache(h,{...i,resamplingLevel:l+1})}catch{}}}}return a?this.resampling?f(this._tileInfoView,a,h,e):a:g(this._tileInfoView.tileInfo.size)}async _enqueueTileFetch(e){if(!this._fetchQueue.has(e.key.id)){try{const i=await this._fetchQueue.push(e.key);e.bitmap.source=i,e.bitmap.width=this._tileInfoView.tileInfo.size[0],e.bitmap.height=this._tileInfoView.tileInfo.size[1],e.once("attach",()=>this.requestUpdate())}catch(i){s(i)||t.getLogger(this).error(i)}this.requestUpdate()}}async _fetchImage(e,i){return this.layer.fetchImageBitmapTile(e.level,e.row,e.col,{signal:i})}};e([o()],P.prototype,"resampling",null),e([o()],P.prototype,"tilemapCache",null),P=e([l("esri.views.2d.layers.TileLayerView2D")],P);const v=P;export{v as default};
@@ -0,0 +1,4 @@
1
+ import "../../../../interfaces";
2
+
3
+ import VolumeMeasurementError = __esri.VolumeMeasurementError;
4
+ export default VolumeMeasurementError;
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- class t{constructor(t,i,s,e,h){this.extent=t,this.timeExtent=i,this.size=s,this.pixelRatio=e,this.time=h}}export{t as default};
5
+ import r from"../../../../core/Error.js";class o extends r{constructor(r,o,s){super(r,o,s)}}export{o 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.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import"../../../core/has.js";import{destroyMaybe as t}from"../../../core/maybe.js";import{verticalLengthUnitFromSpatialReference as i,convertUnit as s}from"../../../core/unitUtils.js";import{property as l}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{create as r}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import n from"../../../geometry/Point.js";import{getDefaultUnitForView as a}from"../../../support/getDefaultUnitForView.js";import{AnalysisView3D as u}from"./AnalysisView3D.js";import{VolumeMeasurementCutFillController as p}from"./VolumeMeasurement/VolumeMeasurementCutFillController.js";import{VolumeMeasurementCutFillVisualization as m}from"./VolumeMeasurement/VolumeMeasurementCutFillVisualization.js";import y from"./VolumeMeasurement/VolumeMeasurementTool.js";let c=class extends u{constructor(e){super(e),this.type="volume-measurement-view-3d",this.analysis=null,this.elevationAlignedGeometry=null,this.targetGeometry=null}initialize(){const{analysis:e,view:t}=this;this._analysisController=new p({view:t,analysis:e,analysisViewData:this}),this._analysisTool=new y({analysis:e,view:t,analysisViewData:this}),this._analysisVisualization=new m({view:t,analysis:e,analysisViewData:this})}destroy(){this._analysisController=t(this._analysisController),this._analysisVisualization=t(this._analysisVisualization),this._analysisTool.destroy()}get result(){return this._analysisController?.result}get interactive(){return super.interactive}set interactive(e){super.interactive=e}get visible(){return super.visible}set visible(e){super.visible=e}get effectiveTargetElevation(){const{cutFillOptions:e,inputUnits:t}=this.analysis,{targetElevation:l}=e,o=t?.elevation??"meters",r=i(this.view.spatialReference);if(null!=l&&null!=r)return s(l,o,r);const n=this.elevationAlignedGeometry?.extent;return null==n?.zmin||null==n?.zmax?null:(n.zmax+n.zmin)/2}get effectiveDisplayUnits(){const{displayUnits:e}=this.analysis,t=a(this.view);return{elevation:e.elevation??t,volume:e.volume??t}}get labelAnchors(){const{elevationAlignedGeometry:e,view:t}=this,{renderCoordsHelper:i}=t;if(!e)return{cut:null,fill:null};let s=e.rings[0][0],l=e.rings[0][0];e.rings[0].forEach(e=>{e[2]>s[2]&&(s=e),e[2]<l[2]&&(l=e)});const{spatialReference:o}=e,a=new n({x:s[0],y:s[1],z:s[2],spatialReference:o}),u=new n({x:l[0],y:l[1],z:l[2],spatialReference:o}),p=r(),m=r();return i.toRenderCoords(a,p),i.toRenderCoords(u,m),{cut:p,fill:m}}get updating(){return null!=this._analysisController&&this._analysisController.updating||this._analysisTool.updating||this._analysisVisualization.updating}place(e){return this._analysisTool.place(e)}get test(){}};e([l({readOnly:!0})],c.prototype,"type",void 0),e([l({constructOnly:!0,nonNullable:!0})],c.prototype,"analysis",void 0),e([l({readOnly:!0})],c.prototype,"result",null),e([l()],c.prototype,"elevationAlignedGeometry",void 0),e([l({type:Number})],c.prototype,"effectiveTargetElevation",null),e([l()],c.prototype,"targetGeometry",void 0),e([l()],c.prototype,"effectiveDisplayUnits",null),e([l()],c.prototype,"labelAnchors",null),e([l()],c.prototype,"updating",null),c=e([o("esri.views.3d.analysis.VolumeMeasurementAnalysisView3D")],c);const v=c;export{v as default};
5
+ import{__decorate as e}from"tslib";import"../../../core/has.js";import{destroyMaybe as t}from"../../../core/maybe.js";import{verticalLengthUnitFromSpatialReference as i,convertUnit as s}from"../../../core/unitUtils.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{create as l}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import n from"../../../geometry/Point.js";import{getDefaultUnitForView as a}from"../../../support/getDefaultUnitForView.js";import{AnalysisView3D as u}from"./AnalysisView3D.js";import{VolumeMeasurementCutFillController as p}from"./VolumeMeasurement/VolumeMeasurementCutFillController.js";import{VolumeMeasurementCutFillVisualization as m}from"./VolumeMeasurement/VolumeMeasurementCutFillVisualization.js";import y from"./VolumeMeasurement/VolumeMeasurementTool.js";let c=class extends u{constructor(e){super(e),this.error=null,this.type="volume-measurement-view-3d",this.analysis=null,this.elevationAlignedGeometry=null,this.targetGeometry=null}initialize(){const{analysis:e,view:t}=this;this._analysisController=new p({view:t,analysis:e,analysisViewData:this}),this._analysisTool=new y({analysis:e,view:t,analysisViewData:this}),this._analysisVisualization=new m({view:t,analysis:e,analysisViewData:this})}destroy(){this._analysisController=t(this._analysisController),this._analysisVisualization=t(this._analysisVisualization),this._analysisTool.destroy()}get result(){return this._analysisController?.result}get interactive(){return super.interactive}set interactive(e){super.interactive=e}get visible(){return super.visible}set visible(e){super.visible=e}get effectiveTargetElevation(){const{cutFillOptions:e,inputUnits:t}=this.analysis,{targetElevation:r}=e,o=t?.elevation??"meters",l=i(this.view.spatialReference);if(null!=r&&null!=l)return s(r,o,l);const n=this.elevationAlignedGeometry?.extent;return null==n?.zmin||null==n?.zmax?null:(n.zmax+n.zmin)/2}get effectiveDisplayUnits(){const{displayUnits:e}=this.analysis,t=a(this.view);return{elevation:e.elevation??t,volume:e.volume??t}}get labelAnchors(){const{elevationAlignedGeometry:e,view:t}=this,{renderCoordsHelper:i}=t;if(!e)return{cut:null,fill:null};let s=e.rings[0][0],r=e.rings[0][0];e.rings[0].forEach(e=>{e[2]>s[2]&&(s=e),e[2]<r[2]&&(r=e)});const{spatialReference:o}=e,a=new n({x:s[0],y:s[1],z:s[2],spatialReference:o}),u=new n({x:r[0],y:r[1],z:r[2],spatialReference:o}),p=l(),m=l();return i.toRenderCoords(a,p),i.toRenderCoords(u,m),{cut:p,fill:m}}get updating(){return null!=this._analysisController&&this._analysisController.updating||this._analysisTool.updating||this._analysisVisualization.updating}place(e){return this._analysisTool.place(e)}get test(){}};e([r()],c.prototype,"error",void 0),e([r({readOnly:!0})],c.prototype,"type",void 0),e([r({constructOnly:!0,nonNullable:!0})],c.prototype,"analysis",void 0),e([r({readOnly:!0})],c.prototype,"result",null),e([r()],c.prototype,"elevationAlignedGeometry",void 0),e([r({type:Number})],c.prototype,"effectiveTargetElevation",null),e([r()],c.prototype,"targetGeometry",void 0),e([r()],c.prototype,"effectiveDisplayUnits",null),e([r()],c.prototype,"labelAnchors",null),e([r()],c.prototype,"updating",null),c=e([o("esri.views.3d.analysis.VolumeMeasurementAnalysisView3D")],c);const v=c;export{v 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.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{equals as t}from"../../../core/arrayUtils.js";import"../../../core/has.js";import{removeMaybe as i,abortMaybe as r}from"../../../core/maybe.js";import{debounce as s,ignoreAbortErrors as o,throwIfAborted as l}from"../../../core/promiseUtils.js";import{watch as a,when as n,sync as u,whenOnce as d}from"../../../core/reactiveUtils.js";import{addFrameTask as p}from"../../../core/scheduling.js";import{Seconds as h,secondsFromMilliseconds as c}from"../../../core/time.js";import{getMetersPerVerticalUnitForSR as m}from"../../../core/unitUtils.js";import{property as _}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import{subclass as f}from"../../../core/accessorSupport/decorators/subclass.js";import{getReferenceEllipsoid as g}from"../../../geometry/ellipsoidUtils.js";import{projectOrLoad as y}from"../../../geometry/projectionUtils.js";import{fromExtent as w,intersection as v,toExtent as T,intersects as b}from"../../../geometry/support/aaBoundingRect.js";import R from"../../../symbols/support/ElevationInfo.js";import{simulationSettingsEqual as S,getPositions as j,getFlowSimulationSettings as L}from"../../2d/engine/flow/utils.js";import A from"./SubView3D.js";import{makeScheduleFunction as P}from"./support/makeScheduleFunction.js";import{thresholdForLoadingAllTiles as U,fadeOutTime as E,fadeInTime as x,defaultTransitionDuration as I,transitionDurationFactor as V,averageLoadingTimeSmoothingFactor as k}from"../support/flow/constants.js";import{FlowWorkerHandle as C}from"../support/flow/FlowWorkerHandle.js";import{materialParametersFromRenderer as q,createStreamlineGeometry as z}from"../support/flow/geometryUtils.js";import{boundingRectOfTiles as M}from"../support/flow/loadUtils.js";import{StreamlineResources3DOverlay as D}from"../support/flow/StreamlineResources3DOverlay.js";import{StreamlineResources3DShape as F}from"../support/flow/StreamlineResources3DShape.js";import B from"../support/flow/VisualQuery3D.js";import{tilesAreRelated as W}from"../terrain/tileUtils.js";import{isScreenSizePerspectiveEnabled as G}from"../webgl-engine/lib/screenSizePerspectiveUtils.js";import{RibbonLineMaterial as H}from"../webgl-engine/materials/RibbonLineMaterial.js";import{isInEffectiveScaleRange as O,hasLayerBasedScaleVisibility as N}from"../../support/layerViewUtils.js";import{TaskPriority as Q}from"../../support/Scheduler.js";let J=class extends A{constructor(e){super(e),this.type="flow",this.renderedTiles=null,this.requireLoad=!1,this.workerHandle=null,this._averageLoadingTime=h(0),this._abortController=null,this._frameTask=null,this._tilesUpdateIsWaiting=!1,this._transitionEnabled=!0,this._debugAllowAutoLoading=!0,this.emissiveStrength=0,this._overrideMaterialParameters=null,this._overrideSimulationSettings=null,this._updateTask=null,this._debouncedTileUpdate=s(async()=>{const{allTiles:e}=this.surface,t=this._getTileFilterFunction(),i=new Set;function*r(r){for(let s=0;s<e.length;++s){const o=e.at(s);t(o)&&i.add(o),r.madeProgress(),r.done&&(r=yield)}}await this._frameTask.scheduleGenerator(r),this.renderedTiles=i}),this._transitionEnabled=!0}initialize(){const{surface:e,view:t}=this,{resourceController:i}=t;this.workerHandle=new C(P(i)),this._frameTask=i.scheduler.registerTask(Q.FLOW_GENERATOR),this._updateTask=p({update:this._update.bind(this)}),this.addHandles([a(()=>this.simulationSettings,()=>this.triggerLoad(),{sync:!0,equals:(e,t)=>null==e&&null==t||null!=e&&null!=t&&S(e,t)}),a(()=>{const{elevationInfo:e}=this;return[this._clippingArea,this._visible,this._draped,this.view.state.contentPixelRatio,e?.mode,e?.offset,e?.unit]},()=>this.triggerLoad(),u),a(()=>this._materialParameters,e=>{this._resources?.setMaterialParameters(e),this._lastResources?.setMaterialParameters(e)}),e.on("tiles-changed",()=>this._triggerTilesUpdate()),t.enableFeatureTiles(),a(()=>[this._dataBounds,this._featureTilesBounds,this._loadAllTiles],()=>this._triggerTilesUpdate()),a(()=>this._flowRenderer,(e,t)=>{const i=t?.visualVariables??[],r=e?.visualVariables??[];r.length===i.length&&r.every((e,t)=>e.type===i[t].type)||this.clear()}),n(()=>!t.featureTiles?.updating,()=>this._triggerTilesUpdate())]),this._triggerTilesUpdate()}destroy(){this._updateTask=i(this._updateTask),this.abort(),this.clear()}abort(){this._abortController=r(this._abortController),this.requireLoad=!1}get _clippingArea(){const e=y(this.view.clippingArea,this.surface.spatialReference).geometry;return null==e?null:w(e)}get _dataBounds(){const e=y(this.layer.fullExtent,this.surface.spatialReference).geometry;return null==e?null:w(e)}get _draped(){return"on-the-ground"===this.elevationInfo.mode}get _ellipsoidRadius(){return g(this.view.spatialReference).radius}get _loadAllTiles(){const{position:e}=this.view.camera,t=e.z;if(null==t)return!1;return t*m(e.spatialReference)/this._ellipsoidRadius>=U}get _featureTilesBounds(){const e=this.view.featureTiles?.filterExtent,t=y(e,this.surface.spatialReference).geometry;return null==t?null:w(t)}get _flowRenderer(){const e=this.layer.renderer;return"flow"!==e?.type?null:e}get _materialParameters(){return{...q(this._flowRenderer,this.layerView.fullOpacity,this.emissiveStrength),fadeInTime:x,fadeOutTime:E,...this._overrideMaterialParameters,hasSlicePlane:this.layerView.slicePlaneEnabled,screenSizePerspective:!this._draped&&G(this.layer.screenSizePerspectiveEnabled)?this.view.screenSizePerspective.parameters:null}}get _opacity(){return this.layerView.fullOpacity}get _transitionDuration(){const{_averageLoadingTime:e}=this;return h(0===e?I:this._averageLoadingTime*V)}get _visible(){const e=this._flowRenderer?.color;return this.visibleAtCurrentScale&&this.layer.effectiveVisible&&this._opacity>0&&(null==e||e.a>0)}get elevationInfo(){return this.layer.elevationInfo??K}startPositions(e){if(!this._transitionEnabled)return[];const{_flowRenderer:t,_resources:i}=this;return null==t||null==i?[]:j(i.streamlines,i.query,e,t.flowSpeed)}get needsMagnitude(){return this._flowRenderer?.hasVisualVariables()??!1}get layer(){return this.layerView.layer}get updating(){return this.updatingHandles.updating||this.requireLoad}get visibleAtCurrentScale(){return!N()||O(this.layer.effectiveScaleRange,this.view.scale)}get simulationSettings(){const{_flowRenderer:e,_overrideSimulationSettings:t}=this;if(null==e)return null;let i=L(e);return i.segmentLength=i.lineCollisionWidth/2,i.onlyForwardTracing=!1,null!=t&&(i={...i,...t}),i}get surface(){return this.view.basemapTerrain}doRefresh(){this.triggerLoad()}clear(){this._resources?.detach(),this._resources=null,this._lastResources?.detach(),this._lastResources=null}_update(e){if(!this.requireLoad||this.updatingHandles.updating)return;const t=c(e.time);if(this._transitionEnabled&&!this._lastResourceIsTransitioned(t))return;const{renderedTiles:i}=this;if(null==i||0===i.size)return;const r=async()=>{const e=performance.now();await this._load(i,t,this._transitionDuration);const r=h((performance.now()-e)/1e3);this._updateAverageLoadingTime(r)};this.updatingHandles.addPromise(o(r())),this.requireLoad=!1}_updateAverageLoadingTime(e){const t=k;this._averageLoadingTime=h(t*e+(1-t)*this._averageLoadingTime)}triggerLoad(){this._debugAllowAutoLoading&&(this.requireLoad=!0)}async _load(e,t,i){const{view:r}=this;if(!this._visible)return void this.clear();if(0===e.size)return;const s=this._computeExtent(e);if(null==s)return;const o=this._transitionEnabled&&null!=this._resources?h(t+i):t,a=new B(s,this.layerView.timeExtent,this._viewSizeWithEqualRatio(s),r.state.contentPixelRatio,o);null==this._abortController&&(this._abortController=new AbortController);const n=this._abortController,u=await this._loadStreamlines(a,n.signal);if(l(n.signal),this._visible&&null!=u){u.attach(),this._lastResources?.detach(),this._transitionEnabled?this._lastResources=this._resources:this._resources?.detach(),this._resources=u;const e=performance.now()/1e3,t=this._transitionEnabled&&e>o?e:o;null!=this._lastResources&&(this._lastResources.endTime=t),this._resources.startTime=t}}async _loadStreamlines(e,t){const i=await this.fetchDataAndGenerateStreamlines(e,t);if(null==i||0===i.length)return null;const{geometries:r,material:s}=await this._createGeometry(e,i);return this._draped?new D(e,i,s,r,this.view.overlayManager):new F(e,i,s,r,this.view.stage)}async fetchDataAndGenerateStreamlines(e,t){return null}async _createGeometry(e,t){const i=new H(this._materialParameters,this.view.state.isGlobal),r=new Array,{elevationInfo:s,_draped:o,view:l}=this;function*a(a){for(let n=0;n<t.length;++n)r.push(z(l,e,t[n],s,i,o)),a.madeProgress(),a.done&&(a=yield)}return await this._frameTask.scheduleGenerator(a),{geometries:r,material:i}}_computeExtent(e){const{spatialReference:t}=this.surface;if(null==t)return null;const i=M(e);return null==i?null:(v(i,this._clippingArea,i),T(i,t))}_triggerTilesUpdate(){if(this._tilesUpdateIsWaiting)return;this._tilesUpdateIsWaiting=!0;const e=async()=>{await d(()=>this.view.stationary),this._tilesUpdateIsWaiting=!1,await this._debouncedTileUpdate()};this.updatingHandles.addPromise(o(e()))}_getTileFilterFunction(){const{_dataBounds:e,view:i,_featureTilesBounds:r}=this;if(this._loadAllTiles)return t=>t.leaf&&X(e,t.extent);const s=t=>t.rendered&&t.visible&&X(e,t.extent),{featureTiles:o}=i;if(!o)return s;const l=o.tiles.filter(e=>e.measures.visible);return e=>s(e)&&X(r,e.extent)&&l.some(({lij:i})=>t(i,e.lij)||W(i,e.lij))}_viewSizeWithEqualRatio(e){const t=(e.xmax-e.xmin)/(e.ymax-e.ymin),[i,r]=this.view.size;return i<r?[i,Math.floor(i/t)]:[Math.floor(r*t),r]}_lastResourceIsTransitioned(e){const{_lastResources:t,_resources:i,_flowRenderer:r}=this;if(null==t||null==i||null==r)return!0;return i.startTime+E<e}get test(){}};e([_()],J.prototype,"type",void 0),e([_()],J.prototype,"renderedTiles",void 0),e([_()],J.prototype,"_resources",void 0),e([_()],J.prototype,"_lastResources",void 0),e([_()],J.prototype,"requireLoad",void 0),e([_()],J.prototype,"_averageLoadingTime",void 0),e([_()],J.prototype,"emissiveStrength",void 0),e([_()],J.prototype,"_clippingArea",null),e([_()],J.prototype,"_dataBounds",null),e([_()],J.prototype,"_draped",null),e([_()],J.prototype,"_ellipsoidRadius",null),e([_()],J.prototype,"_loadAllTiles",null),e([_()],J.prototype,"_featureTilesBounds",null),e([_()],J.prototype,"_flowRenderer",null),e([_()],J.prototype,"_materialParameters",null),e([_()],J.prototype,"_opacity",null),e([_()],J.prototype,"_transitionDuration",null),e([_()],J.prototype,"_visible",null),e([_()],J.prototype,"elevationInfo",null),e([_()],J.prototype,"needsMagnitude",null),e([_()],J.prototype,"layer",null),e([_()],J.prototype,"updating",null),e([_()],J.prototype,"visibleAtCurrentScale",null),e([_()],J.prototype,"_overrideMaterialParameters",void 0),e([_()],J.prototype,"_overrideSimulationSettings",void 0),e([_()],J.prototype,"simulationSettings",null),e([_()],J.prototype,"surface",null),J=e([f("esri.views.3d.layers.FlowSubView3D")],J);const K=new R({mode:"on-the-ground"});function X(e,t){return null==e||null==t||b(e,t)}export{J as default};
5
+ import{__decorate as e}from"tslib";import{equals as t}from"../../../core/arrayUtils.js";import"../../../core/has.js";import{removeMaybe as i,abortMaybe as r}from"../../../core/maybe.js";import{debounce as s,ignoreAbortErrors as o,throwIfAborted as n}from"../../../core/promiseUtils.js";import{watch as l,when as a,sync as u,whenOnce as p}from"../../../core/reactiveUtils.js";import{addFrameTask as d}from"../../../core/scheduling.js";import{Seconds as h,secondsFromMilliseconds as c}from"../../../core/time.js";import{getMetersPerVerticalUnitForSR as m}from"../../../core/unitUtils.js";import{property as f}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/Logger.js";import{subclass as _}from"../../../core/accessorSupport/decorators/subclass.js";import{getReferenceEllipsoid as g}from"../../../geometry/ellipsoidUtils.js";import{projectOrLoad as y}from"../../../geometry/projectionUtils.js";import{fromExtent as w,intersection as v,toExtent as T,intersects as b}from"../../../geometry/support/aaBoundingRect.js";import{getInfo as R}from"../../../geometry/support/spatialReferenceUtils.js";import S from"../../../symbols/support/ElevationInfo.js";import{simulationSettingsEqual as j,getPositions as L,getFlowSimulationSettings as A}from"../../2d/engine/flow/utils.js";import U from"./SubView3D.js";import{makeScheduleFunction as P}from"./support/makeScheduleFunction.js";import{thresholdForLoadingAllTiles as x,fadeOutTime as E,fadeInTime as I,defaultTransitionDuration as k,transitionDurationFactor as M,averageLoadingTimeSmoothingFactor as V}from"../support/flow/constants.js";import{isFullExtent as C,FlowQuery3D as q,wrappedWidth as z}from"../support/flow/FlowQuery3D.js";import{FlowWorkerHandle as F}from"../support/flow/FlowWorkerHandle.js";import{materialParametersFromRenderer as D,createStreamlineGeometry as B}from"../support/flow/geometryUtils.js";import{boundingRectOfTiles as W}from"../support/flow/loadUtils.js";import{StreamlineResources3DOverlay as G}from"../support/flow/StreamlineResources3DOverlay.js";import{StreamlineResources3DShape as H}from"../support/flow/StreamlineResources3DShape.js";import{tilesAreRelated as O}from"../terrain/tileUtils.js";import{isScreenSizePerspectiveEnabled as N}from"../webgl-engine/lib/screenSizePerspectiveUtils.js";import{RibbonLineMaterial as Q}from"../webgl-engine/materials/RibbonLineMaterial.js";import{isInEffectiveScaleRange as J,hasLayerBasedScaleVisibility as K}from"../../support/layerViewUtils.js";import{TaskPriority as X}from"../../support/Scheduler.js";let Y=class extends U{constructor(e){super(e),this.type="flow",this.renderedTiles=null,this.requireLoad=!1,this.workerHandle=null,this._averageLoadingTime=h(0),this._abortController=null,this._frameTask=null,this._tilesUpdateIsWaiting=!1,this._transitionEnabled=!0,this._debugAllowAutoLoading=!0,this.emissiveStrength=0,this._overrideMaterialParameters=null,this._overrideSimulationSettings=null,this._updateTask=null,this._debouncedTileUpdate=s(async()=>{const{allTiles:e}=this.surface,t=this._getTileFilterFunction(),i=new Set;function*r(r){for(let s=0;s<e.length;++s){const o=e.at(s);t(o)&&i.add(o),r.madeProgress(),r.done&&(r=yield)}}await this._frameTask.scheduleGenerator(r),this.renderedTiles=i}),this._transitionEnabled=!0}initialize(){const{surface:e,view:t}=this,{resourceController:i}=t;this.workerHandle=new F(P(i)),this._frameTask=i.scheduler.registerTask(X.FLOW_GENERATOR),this._updateTask=d({update:this._update.bind(this)}),this.addHandles([l(()=>this._simulationSettings,()=>this.triggerLoad(),{sync:!0,equals:(e,t)=>null==e&&null==t||null!=e&&null!=t&&j(e,t)}),l(()=>{const{elevationInfo:e}=this;return[this._clippingArea,this._visible,this._draped,this.view.state.contentPixelRatio,this.view.viewingMode,e?.mode,e?.offset,e?.unit]},()=>this.triggerLoad(),u),l(()=>this._materialParameters,e=>{this._resources?.setMaterialParameters(e),this._lastResources?.setMaterialParameters(e)}),e.on("tiles-changed",()=>this._triggerTilesUpdate()),t.enableFeatureTiles(),l(()=>[this._dataBounds,this._featureTilesBounds,this._loadAllTiles],()=>this._triggerTilesUpdate()),l(()=>this._flowRenderer,(e,t)=>{const i=t?.visualVariables??[],r=e?.visualVariables??[];r.length===i.length&&r.every((e,t)=>e.type===i[t].type)||this.clear()}),a(()=>!t.featureTiles?.updating,()=>this._triggerTilesUpdate())]),this._triggerTilesUpdate()}destroy(){this._updateTask=i(this._updateTask),this.abort(),this.clear()}abort(){this._abortController=r(this._abortController),this.requireLoad=!1}get _clippingArea(){const e=y(this.view.clippingArea,this.surface.spatialReference).geometry;return null==e?null:w(e)}get _dataBounds(){const e=y(this.layer.fullExtent,this.surface.spatialReference).geometry;return null==e?null:w(e)}get _draped(){return"on-the-ground"===this.elevationInfo.mode}get _ellipsoidRadius(){return g(this.view.spatialReference).radius}get _loadAllTiles(){const{position:e}=this.view.camera,t=e.z;if(null==t)return!1;return t*m(e.spatialReference)/this._ellipsoidRadius>=x}get _featureTilesBounds(){const e=this.view.featureTiles?.filterExtent,t=y(e,this.surface.spatialReference).geometry;return null==t?null:w(t)}get _flowRenderer(){const e=this.layer.renderer;return"flow"!==e?.type?null:e}get _materialParameters(){return{...D(this._flowRenderer,this.layerView.fullOpacity,this.emissiveStrength),fadeInTime:I,fadeOutTime:E,...this._overrideMaterialParameters,hasSlicePlane:this.layerView.slicePlaneEnabled,screenSizePerspective:!this._draped&&N(this.layer.screenSizePerspectiveEnabled)?this.view.screenSizePerspective.parameters:null}}get _opacity(){return this.layerView.fullOpacity}get _transitionDuration(){const{_averageLoadingTime:e}=this;return h(0===e?k:this._averageLoadingTime*M)}get _visible(){const e=this._flowRenderer?.color;return this.visibleAtCurrentScale&&this.layer.effectiveVisible&&this._opacity>0&&(null==e||e.a>0)}get elevationInfo(){return this.layer.elevationInfo??Z}startPositions(e){if(!this._transitionEnabled)return[];const{_flowRenderer:t,_resources:i}=this;return null==t||null==i?[]:L(i.streamlines,i.query,e,t.flowSpeed)}get needsMagnitude(){return this._flowRenderer?.hasVisualVariables()??!1}get spatialReferenceInfo(){return R(this.surface.spatialReference)}get layer(){return this.layerView.layer}get updating(){return this.updatingHandles.updating||this.requireLoad}get visibleAtCurrentScale(){return!K()||J(this.layer.effectiveScaleRange,this.view.scale)}get _simulationSettings(){const{_flowRenderer:e,_overrideSimulationSettings:t}=this;if(null==e)return null;let i=A(e);return i.segmentLength=i.lineCollisionWidth/2,i.onlyForwardTracing=!1,null!=t&&(i={...i,...t}),i}getSimulationSettings(e){const{_simulationSettings:t,spatialReferenceInfo:i}=this;if(null==t)return null;const r="global"===this.view.viewingMode&&null!=i&&C(e.extent.xmin,e.extent.xmax,i);return{...t,wrapAround:r}}get surface(){return this.view.basemapTerrain}doRefresh(){this.triggerLoad()}clear(){this._resources?.detach(),this._resources=null,this._lastResources?.detach(),this._lastResources=null}_update(e){if(!this.requireLoad||this.updatingHandles.updating)return;const t=c(e.time);if(this._transitionEnabled&&!this._lastResourceIsTransitioned(t))return;const{renderedTiles:i}=this;if(null==i||0===i.size)return;const r=async()=>{const e=performance.now();await this._load(i,t,this._transitionDuration);const r=h((performance.now()-e)/1e3);this._updateAverageLoadingTime(r)};this.updatingHandles.addPromise(o(r())),this.requireLoad=!1}_updateAverageLoadingTime(e){const t=V;this._averageLoadingTime=h(t*e+(1-t)*this._averageLoadingTime)}triggerLoad(){this._debugAllowAutoLoading&&(this.requireLoad=!0)}async _load(e,t,i){const{view:r}=this;if(!this._visible)return void this.clear();if(0===e.size)return;const s=this._computeExtent(e);if(null==s)return;const o=this._transitionEnabled&&null!=this._resources?h(t+i):t,l=new q(s,this.layerView.timeExtent,this._viewSizeWithEqualRatio(s),r.state.contentPixelRatio,o);null==this._abortController&&(this._abortController=new AbortController);const a=this._abortController,u=await this._loadStreamlines(l,a.signal);if(n(a.signal),this._visible&&null!=u){u.attach(),this._lastResources?.detach(),this._transitionEnabled?this._lastResources=this._resources:this._resources?.detach(),this._resources=u;const e=performance.now()/1e3,t=this._transitionEnabled&&e>o?e:o;null!=this._lastResources&&(this._lastResources.endTime=t),this._resources.startTime=t}}async _loadStreamlines(e,t){const i=await this.fetchDataAndGenerateStreamlines(e,t);if(null==i||0===i.length)return null;const{geometries:r,material:s}=await this._createGeometry(e,i);return this._draped?new G(e,i,s,r,this.view.overlayManager):new H(e,i,s,r,this.view.stage)}async fetchDataAndGenerateStreamlines(e,t){return null}async _createGeometry(e,t){const i=new Q(this._materialParameters,this.view.state.isGlobal),r=new Array,{elevationInfo:s,_draped:o,view:n}=this;function*l(l){for(let a=0;a<t.length;++a)r.push(B(n,e,t[a],s,i,o)),l.madeProgress(),l.done&&(l=yield)}return await this._frameTask.scheduleGenerator(l),{geometries:r,material:i}}_computeExtent(e){const{spatialReference:t}=this.surface;if(null==t)return null;const i=W(e,this.spatialReferenceInfo);return null==i?null:(v(i,this._clippingArea,i),T(i,t))}_triggerTilesUpdate(){if(this._tilesUpdateIsWaiting)return;this._tilesUpdateIsWaiting=!0;const e=async()=>{await p(()=>this.view.stationary),this._tilesUpdateIsWaiting=!1,await this._debouncedTileUpdate()};this.updatingHandles.addPromise(o(e()))}_getTileFilterFunction(){const{_dataBounds:e,view:i,_featureTilesBounds:r}=this;if(this._loadAllTiles)return t=>t.leaf&&$(e,t.extent);const s=t=>t.rendered&&t.visible&&$(e,t.extent),{featureTiles:o}=i;if(!o)return s;const n=o.tiles.filter(e=>e.measures.visible);return e=>s(e)&&$(r,e.extent)&&n.some(({lij:i})=>t(i,e.lij)||O(i,e.lij))}_viewSizeWithEqualRatio(e){const t=z(e.xmin,e.xmax,this.spatialReferenceInfo?.valid)/(e.ymax-e.ymin),[i,r]=this.view.size;return i<r?[i,Math.floor(i/t)]:[Math.floor(r*t),r]}_lastResourceIsTransitioned(e){const{_lastResources:t,_resources:i,_flowRenderer:r}=this;if(null==t||null==i||null==r)return!0;return i.startTime+E<e}get test(){}};e([f()],Y.prototype,"type",void 0),e([f()],Y.prototype,"renderedTiles",void 0),e([f()],Y.prototype,"_resources",void 0),e([f()],Y.prototype,"_lastResources",void 0),e([f()],Y.prototype,"requireLoad",void 0),e([f()],Y.prototype,"_averageLoadingTime",void 0),e([f()],Y.prototype,"emissiveStrength",void 0),e([f()],Y.prototype,"_clippingArea",null),e([f()],Y.prototype,"_dataBounds",null),e([f()],Y.prototype,"_draped",null),e([f()],Y.prototype,"_ellipsoidRadius",null),e([f()],Y.prototype,"_loadAllTiles",null),e([f()],Y.prototype,"_featureTilesBounds",null),e([f()],Y.prototype,"_flowRenderer",null),e([f()],Y.prototype,"_materialParameters",null),e([f()],Y.prototype,"_opacity",null),e([f()],Y.prototype,"_transitionDuration",null),e([f()],Y.prototype,"_visible",null),e([f()],Y.prototype,"elevationInfo",null),e([f()],Y.prototype,"needsMagnitude",null),e([f()],Y.prototype,"spatialReferenceInfo",null),e([f()],Y.prototype,"layer",null),e([f()],Y.prototype,"updating",null),e([f()],Y.prototype,"visibleAtCurrentScale",null),e([f()],Y.prototype,"_overrideMaterialParameters",void 0),e([f()],Y.prototype,"_overrideSimulationSettings",void 0),e([f()],Y.prototype,"_simulationSettings",null),e([f()],Y.prototype,"surface",null),Y=e([_("esri.views.3d.layers.FlowSubView3D")],Y);const Z=new S({mode:"on-the-ground"});function $(e,t){return null==e||null==t||b(e,t)}export{Y 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.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import{EventEmitter as r}from"../../../core/Evented.js";import{destroyMaybe as o}from"../../../core/maybe.js";import{when as a}from"../../../core/reactiveUtils.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import{afterDispatch as n}from"../../../core/accessorSupport/watch.js";import{fromValues as l}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as p}from"../../../geometry/ellipsoidUtils.js";import c from"../../ViewAnimation.js";import{viewingModeFromString as m}from"../../ViewingMode.js";import{Constraints as h}from"./Constraints.js";import{AnimationController as d}from"./controllers/AnimationController.js";import u from"../webgl/RenderCamera.js";import{DepthRange as g}from"../webgl-engine/lib/DepthRange.js";import{maximumHighlights as y}from"../../support/HighlightDefaults.js";import{PropertiesPool as C}from"../../support/PropertiesPool.js";let f=class extends t{constructor(e){super(e),this._propertiesPool=new C({camera:()=>new u},this),this._lastSeenCameraProjectionValues=new u,this.mode=0,this._cssCamera=new u,this._camera=new u,this.rasterPixelRatio=1,this.contentPixelRatio=1,this.constraints=new h({state:this}),this.events=new r,this.fading=!1,this._cameraChanged=!1,this._updateQueue=new Array,this._processingUpdates=!1}reset(){this.cameraController=null,this._propertiesPool.destroy(),this._propertiesPool=new C({camera:()=>new u},this)}destroy(){this.cameraController=o(this.cameraController),this._propertiesPool=o(this._propertiesPool)}createInitialCamera(){if(1===this.viewingMode){const e=p(this.spatialReference).radius;this.camera=new u({eye:l(4*e,0,0),center:l(e,0,0),up:l(0,0,1)})}else this.camera=new u({eye:l(0,0,100),center:l(0,0,0),up:l(0,1,0)})}get animation(){return this.cameraController instanceof d&&null!=this.cameraController.viewAnimation?this.cameraController.viewAnimation:null}get cssCamera(){const e=this._cssCamera.copyFrom(this.camera),{height:t,width:r,pixelRatio:o}=this.camera;return e.pixelRatio=1,e.height=Math.round(t/o),e.width=Math.round(r/o),e}get camera(){return this._camera}set camera(e){e!==_&&_.copyFrom(e),_.computeUp(this.viewingMode),this.events.emit("before-camera-change",{camera:_});const t=this._camera;if(v(this._lastSeenCameraProjectionValues,_)&&(this._lastSeenCameraProjectionValues.copyFrom(_),this.events.emit("camera-projection-changed",this._lastSeenCameraProjectionValues)),!t.equals(_)&&(this._camera=this._propertiesPool.get("camera").copyFrom(_),this._cameraChanged=!t.almostEquals(_),this._cameraChanged)){const e=n(()=>{this._cameraChanged=!1,e.remove()})}}get pixelRatio(){return this.camera.pixelRatio}get alignPixelEnabled(){return this.pixelRatio===this.rasterPixelRatio&&2===this.mode}get updating(){return 2!==this.mode}get contentCamera(){return this._contentCamera??this.camera}set contentCamera(e){if(null==e)return void(this._contentCamera=null);const t=e.clone();this.events.emit("before-camera-change",{camera:t,sceneDepthRange:g.Infinite}),this._contentCamera=t}get fixedContentCamera(){return null!=this._contentCamera}get isGlobal(){return 1===this.viewingMode}get isLocal(){return 2===this.viewingMode}get viewingMode(){return m(this.view.viewingMode)}get spatialReference(){return this.view.spatialReference}get highlights(){const e=this.view.highlights.items.slice(0,y);for(let t=0;t<e.length;){const r=e[t],o=e.findIndex(e=>e.name===r.name);o>=0&&t>o?e.splice(t,1):++t}return e}get highlightOrderMap(){const e=new Map;return this.highlights.forEach((t,r)=>e.set(t.name,r)),e}get navigating(){return!!this.cameraController?.isInteractive}get stationary(){return!this._cameraChanged&&!this.navigating}get cameraController(){return this._get("cameraController")}set cameraController(e){this.stopActiveCameraController()?(this.removeHandles(j),this.cameraController?.destroy(),e&&(this.addHandles(a(()=>4===e.state||3===e.state,()=>{const{cameraController:t}=this;this._set("cameraController",null),this.updateCamera(t=>e.onControllerEnd(t)),t?.destroy()},{sync:!0,once:!0}),j),e.onControllerStart(this.camera)),this._set("cameraController",e)):e&&(e.state=1)}switchCameraController(e){this.cameraController=e}stopActiveCameraController(){return!this.cameraController||this.cameraController.stopController()}updateCamera(e){this._updateQueue.push(e),this._processUpdateQueue()}_processUpdateQueue(){if(0===this._updateQueue.length||this._processingUpdates)return;this._processingUpdates=!0;const e=this._updateQueue.shift();_.copyFrom(this.camera),e(_),this.camera=_,this._processingUpdates=!1,this._processUpdateQueue()}static cleanupViewstate(){_=new u}};e([i({constructOnly:!0})],f.prototype,"view",void 0),e([i()],f.prototype,"mode",void 0),e([i({readOnly:!0,type:c})],f.prototype,"animation",null),e([i({type:u})],f.prototype,"cssCamera",null),e([i()],f.prototype,"_cssCamera",void 0),e([i({type:u})],f.prototype,"camera",null),e([i()],f.prototype,"_camera",void 0),e([i({readOnly:!0})],f.prototype,"pixelRatio",null),e([i()],f.prototype,"rasterPixelRatio",void 0),e([i()],f.prototype,"contentPixelRatio",void 0),e([i({readOnly:!0})],f.prototype,"alignPixelEnabled",null),e([i({readOnly:!0})],f.prototype,"updating",null),e([i({})],f.prototype,"_contentCamera",void 0),e([i({type:u})],f.prototype,"contentCamera",null),e([i({readOnly:!0})],f.prototype,"fixedContentCamera",null),e([i({readOnly:!0})],f.prototype,"events",void 0),e([i({readOnly:!0})],f.prototype,"isGlobal",null),e([i({readOnly:!0})],f.prototype,"isLocal",null),e([i({readOnly:!0})],f.prototype,"viewingMode",null),e([i({readOnly:!0})],f.prototype,"highlights",null),e([i({readOnly:!0})],f.prototype,"highlightOrderMap",null),e([i({readOnly:!0})],f.prototype,"navigating",null),e([i()],f.prototype,"fading",void 0),e([i({readOnly:!0})],f.prototype,"stationary",null),e([i()],f.prototype,"_cameraChanged",void 0),e([i()],f.prototype,"cameraController",null),f=e([s("esri.views.3d.state.ViewState")],f);const w=f;function v(e,t){return e.fov!==t.fov||(e.fullViewport[0]!==t.fullViewport[0]||e.fullViewport[1]!==t.fullViewport[1]||e.fullViewport[2]!==t.fullViewport[2]||e.fullViewport[3]!==t.fullViewport[3]||(e.padding[0]!==t.padding[0]||e.padding[1]!==t.padding[1]||e.padding[2]!==t.padding[2]||e.padding[3]!==t.padding[3]))}let _=new u;const j="ViewStateHandles";export{w as default};
5
+ import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import{EventEmitter as r}from"../../../core/Evented.js";import{destroyMaybe as o}from"../../../core/maybe.js";import{when as a}from"../../../core/reactiveUtils.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import{afterDispatch as n}from"../../../core/accessorSupport/watch.js";import{fromValues as l}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as p}from"../../../geometry/ellipsoidUtils.js";import c from"../../ViewAnimation.js";import{viewingModeFromString as m}from"../../ViewingMode.js";import{Constraints as h}from"./Constraints.js";import{AnimationController as d}from"./controllers/AnimationController.js";import u from"../webgl/RenderCamera.js";import{DepthRange as g}from"../webgl-engine/lib/DepthRange.js";import{maximumHighlights as y}from"../../support/HighlightDefaults.js";import{PropertiesPool as C}from"../../support/PropertiesPool.js";let f=class extends t{constructor(e){super(e),this._propertiesPool=new C({camera:()=>new u},this),this._lastSeenCameraProjectionValues=new u,this.mode=0,this._cssCamera=new u,this._camera=new u,this.rasterPixelRatio=1,this.contentPixelRatio=1,this.constraints=new h({state:this}),this.events=new r,this.fading=!1,this._cameraChanged=!1,this._updateQueue=new Array,this._processingUpdates=!1}reset(){this.cameraController=null,this._propertiesPool.destroy(),this._propertiesPool=new C({camera:()=>new u},this)}destroy(){this.cameraController=o(this.cameraController),this._propertiesPool=o(this._propertiesPool)}createInitialCamera(){if(1===this.viewingMode){const e=p(this.spatialReference).radius;this.camera=new u({eye:l(4*e,0,0),center:l(e,0,0),up:l(0,0,1)})}else this.camera=new u({eye:l(0,0,100),center:l(0,0,0),up:l(0,1,0)})}get animation(){return this.cameraController instanceof d&&null!=this.cameraController.viewAnimation?this.cameraController.viewAnimation:null}get cssCamera(){const e=this._cssCamera.copyFrom(this.camera),{height:t,width:r,pixelRatio:o}=this.camera;return e.pixelRatio=1,e.height=Math.round(t/o),e.width=Math.round(r/o),e}get camera(){return this._camera}set camera(e){e!==_&&_.copyFrom(e),_.computeUp(this.viewingMode),this.events.emit("before-camera-change",{camera:_});const t=this._camera;if(v(this._lastSeenCameraProjectionValues,_)&&(this._lastSeenCameraProjectionValues.copyFrom(_),this.events.emit("camera-projection-changed",this._lastSeenCameraProjectionValues)),!t.equals(_)&&(this._camera=this._propertiesPool.get("camera").copyFrom(_),this._cameraChanged=!t.almostEquals(_),this._cameraChanged)){const e=n(()=>{this._cameraChanged=!1,e.remove()})}}get pixelRatio(){return this.camera.pixelRatio}get alignPixelEnabled(){return this.pixelRatio===this.rasterPixelRatio&&2===this.mode}get updating(){return 2!==this.mode}get contentCamera(){return this._contentCamera??this.camera}set contentCamera(e){if(null==e)return void(this._contentCamera=null);const t=e.clone();this.events.emit("before-camera-change",{camera:t,sceneDepthRange:g.Infinite}),this._contentCamera=t}get fixedContentCamera(){return null!=this._contentCamera}get isGlobal(){return 1===this.viewingMode}get isLocal(){return 2===this.viewingMode}get viewingMode(){return m(this.view.viewingMode)}get spatialReference(){return this.view.spatialReference}get highlights(){const e=this.view.highlights.items.slice(0,y);for(let t=0;t<e.length;){const r=e[t],o=e.findIndex(e=>e.name===r.name);o>=0&&t>o?e.splice(t,1):++t}return e}get highlightOrderMap(){const e=new Map;return this.highlights.forEach((t,r)=>e.set(t.name,r)),e}get navigating(){return!!this.cameraController?.isInteractive}get stationary(){return!this._cameraChanged&&!this.navigating}get cameraController(){return this._get("cameraController")}set cameraController(e){this.stopActiveCameraController()?(this.removeHandles(j),this.cameraController?.destroy(),e&&(this.addHandles(a(()=>4===e.state||3===e.state,()=>{this.updateCamera(t=>e.onControllerEnd(t)),this.cameraController===e&&(this._set("cameraController",null),e.destroy())},{sync:!0,once:!0}),j),e.onControllerStart(this.camera)),this._set("cameraController",e)):e&&(e.state=1)}switchCameraController(e){this.cameraController=e}stopActiveCameraController(){return!this.cameraController||this.cameraController.stopController()}updateCamera(e){this._updateQueue.push(e),this._processUpdateQueue()}_processUpdateQueue(){if(0===this._updateQueue.length||this._processingUpdates)return;this._processingUpdates=!0;const e=this._updateQueue.shift();_.copyFrom(this.camera),e(_),this.camera=_,this._processingUpdates=!1,this._processUpdateQueue()}static cleanupViewstate(){_=new u}};e([i({constructOnly:!0})],f.prototype,"view",void 0),e([i()],f.prototype,"mode",void 0),e([i({readOnly:!0,type:c})],f.prototype,"animation",null),e([i({type:u})],f.prototype,"cssCamera",null),e([i()],f.prototype,"_cssCamera",void 0),e([i({type:u})],f.prototype,"camera",null),e([i()],f.prototype,"_camera",void 0),e([i({readOnly:!0})],f.prototype,"pixelRatio",null),e([i()],f.prototype,"rasterPixelRatio",void 0),e([i()],f.prototype,"contentPixelRatio",void 0),e([i({readOnly:!0})],f.prototype,"alignPixelEnabled",null),e([i({readOnly:!0})],f.prototype,"updating",null),e([i({})],f.prototype,"_contentCamera",void 0),e([i({type:u})],f.prototype,"contentCamera",null),e([i({readOnly:!0})],f.prototype,"fixedContentCamera",null),e([i({readOnly:!0})],f.prototype,"events",void 0),e([i({readOnly:!0})],f.prototype,"isGlobal",null),e([i({readOnly:!0})],f.prototype,"isLocal",null),e([i({readOnly:!0})],f.prototype,"viewingMode",null),e([i({readOnly:!0})],f.prototype,"highlights",null),e([i({readOnly:!0})],f.prototype,"highlightOrderMap",null),e([i({readOnly:!0})],f.prototype,"navigating",null),e([i()],f.prototype,"fading",void 0),e([i({readOnly:!0})],f.prototype,"stationary",null),e([i()],f.prototype,"_cameraChanged",void 0),e([i()],f.prototype,"cameraController",null),f=e([s("esri.views.3d.state.ViewState")],f);const w=f;function v(e,t){return e.fov!==t.fov||(e.fullViewport[0]!==t.fullViewport[0]||e.fullViewport[1]!==t.fullViewport[1]||e.fullViewport[2]!==t.fullViewport[2]||e.fullViewport[3]!==t.fullViewport[3]||(e.padding[0]!==t.padding[0]||e.padding[1]!==t.padding[1]||e.padding[2]!==t.padding[2]||e.padding[3]!==t.padding[3]))}let _=new u;const j="ViewStateHandles";export{w 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.34/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{property as t}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as r}from"../../../../core/accessorSupport/decorators/subclass.js";import{eyeWithinExtent as o}from"../../camera/intersectionUtils.js";import{applySurfaceCollisionConstraint as s}from"../../camera/constraintUtils/surfaceCollision.js";import{CameraController as i}from"./CameraController.js";let a=class extends i{set desiredCamera(e){this._set("desiredCamera",e.clone())}constructor(e){super(e)}get canStop(){return!0}get constraintEnabled(){return this.view.state.constraints.collision.enabled}onControllerStart(){this.state=2,this.addHandles(this.view.elevationProvider.on("elevation-change",e=>this._elevationChangeEvent(e))),this._applyCorrection()}onControllerEnd(){this.removeAllHandles()}_elevationChangeEvent(e){null!=e.spatialReference&&!o(this.view,this.desiredCamera,e.extent,e.spatialReference)||"ground"!==e.context||this._applyCorrection()}_applyCorrection(){this.view.state.updateCamera(e=>{e.copyViewFrom(this.desiredCamera),s(this.view,e,1)||this.constraintEnabled||(this.state=3)})}};e([t({constructOnly:!0})],a.prototype,"desiredCamera",null),a=e([r("esri.views.3d.state.controllers.SurfaceCollisionCorrectionController")],a);export{a as SurfaceCollisionCorrectionController};
5
+ import{__decorate as e}from"tslib";import{property as t}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as r}from"../../../../core/accessorSupport/decorators/subclass.js";import{eyeWithinExtent as o}from"../../camera/intersectionUtils.js";import{applySurfaceCollisionConstraint as s}from"../../camera/constraintUtils/surfaceCollision.js";import{CameraController as i}from"./CameraController.js";let a=class extends i{constructor(e){super(e)}set desiredCamera(e){this._set("desiredCamera",e.clone())}get canStop(){return!0}get constraintEnabled(){return this.view.state.constraints.collision.enabled}onControllerStart(){this.state=2,this.addHandles(this.view.elevationProvider.on("elevation-change",e=>this._elevationChangeEvent(e))),this._applyCorrection()}onControllerEnd(){this.removeAllHandles()}_elevationChangeEvent(e){null!=e.spatialReference&&!o(this.view,this.desiredCamera,e.extent,e.spatialReference)||"ground"!==e.context||this._applyCorrection()}_applyCorrection(){this.view.state.updateCamera(e=>{e.copyViewFrom(this.desiredCamera),s(this.view,e,1)||this.constraintEnabled||(this.state=3)})}};e([t({constructOnly:!0})],a.prototype,"desiredCamera",null),a=e([r("esri.views.3d.state.controllers.SurfaceCollisionCorrectionController")],a);export{a as SurfaceCollisionCorrectionController};