@arcgis/core 5.2.0-next.6 → 5.2.0-next.8

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 (712) hide show
  1. package/WebLinkChart.d.ts +1 -1
  2. package/WebMap.d.ts +2 -2
  3. package/WebScene.d.ts +3 -3
  4. package/arcade.d.ts +9 -9
  5. package/arcgisGlobal.d.ts +8 -0
  6. package/assets/esri/core/workers/RemoteClient.js +1 -1
  7. package/assets/esri/core/workers/chunks/07cc5743cb6a9fd68adb.js +1 -0
  8. package/assets/esri/core/workers/chunks/09d0e430c66788a2626f.js +640 -0
  9. package/assets/esri/core/workers/chunks/{829a0583b8a228c65379.js → 0b169bb1969f86232a1a.js} +1 -1
  10. package/assets/esri/core/workers/chunks/0cbd7f5fe24271942abd.js +1 -0
  11. package/assets/esri/core/workers/chunks/{20e2d11f6de438ee883e.js → 0ded58ccb83f624f1460.js} +1 -1
  12. package/assets/esri/core/workers/chunks/0ecc1bc1686844cdd60e.js +1 -0
  13. package/assets/esri/core/workers/chunks/{d1ac98f48bb6d43d97c8.js → 0f3654c8157ec8f22869.js} +3 -3
  14. package/assets/esri/core/workers/chunks/0f75c19d8e296a32e329.js +1 -0
  15. package/assets/esri/core/workers/chunks/174cc2e69e5b5a13d880.js +1 -0
  16. package/assets/esri/core/workers/chunks/18f980465db5a86153d1.js +1 -0
  17. package/assets/esri/core/workers/chunks/1996f0a930abdd97b855.js +1 -0
  18. package/assets/esri/core/workers/chunks/1c8436b27a3d3cde5cfc.js +1 -0
  19. package/assets/esri/core/workers/chunks/1cb1f125dccbf8c8cac9.js +1 -0
  20. package/assets/esri/core/workers/chunks/1dd06335bb2d35c66339.js +1 -0
  21. package/assets/esri/core/workers/chunks/1f289aa69dd6b6be534a.js +1 -0
  22. package/assets/esri/core/workers/chunks/2185e8a52c5e29d46680.js +1 -0
  23. package/assets/esri/core/workers/chunks/{bf706a5d065a357de51b.js → 2413b383b7f2bdcd4ced.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{da29cf0e64065631a470.js → 24810c36ae09bb4e83dc.js} +1 -1
  25. package/assets/esri/core/workers/chunks/26583db2af1a1cc456e5.js +1 -0
  26. package/assets/esri/core/workers/chunks/274b82cb183ddd0042f3.js +1 -0
  27. package/assets/esri/core/workers/chunks/277718031c903da2b3b9.js +1 -0
  28. package/assets/esri/core/workers/chunks/27c6def22c2b0791ce9e.js +1 -0
  29. package/assets/esri/core/workers/chunks/{7ed5b669010db58845f8.js → 294f2803aac000c99693.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{093f27e4e4781870b431.js → 297ae764445e6f73a5ea.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{be0eab592db0e651b023.js → 2b814bb51704a5b4fdc2.js} +6 -6
  32. package/assets/esri/core/workers/chunks/2c9ba638d1f31c82f9f5.js +1 -0
  33. package/assets/esri/core/workers/chunks/2d2895f1fdf44d212a4d.js +1 -0
  34. package/assets/esri/core/workers/chunks/2dbc2fd0f2dde505c465.js +1 -0
  35. package/assets/esri/core/workers/chunks/2dbcdfdf000226bfe746.js +1 -0
  36. package/assets/esri/core/workers/chunks/2e6382d50bf012064eae.js +1 -0
  37. package/assets/esri/core/workers/chunks/30f1909c5ef1835b8507.js +1 -0
  38. package/assets/esri/core/workers/chunks/3172d7fc23787a287191.js +1 -0
  39. package/assets/esri/core/workers/chunks/31918a0d9886dedf385f.js +1 -0
  40. package/assets/esri/core/workers/chunks/{1c029b03ed836f393a50.js → 3248001d9dfb9153699e.js} +1 -1
  41. package/assets/esri/core/workers/chunks/3297658ccd8d4b9ce733.js +1 -0
  42. package/assets/esri/core/workers/chunks/{716a4d7e8b908b81870b.js → 32f26757e36704923286.js} +1 -1
  43. package/assets/esri/core/workers/chunks/3529afab0c2444275d91.js +1 -0
  44. package/assets/esri/core/workers/chunks/36dac6ab51d9dbdd091d.js +1 -0
  45. package/assets/esri/core/workers/chunks/{a2159df718a7f2f59271.js → 38a2f34661563c7c29c1.js} +1 -1
  46. package/assets/esri/core/workers/chunks/390fda094fa8695d98cf.js +1 -0
  47. package/assets/esri/core/workers/chunks/39596715e84d0da2f803.js +30 -0
  48. package/assets/esri/core/workers/chunks/398eb3100a282e4736bb.js +1 -0
  49. package/assets/esri/core/workers/chunks/{6af77529c977d034d287.js → 3b15933f65f59625a650.js} +1 -1
  50. package/assets/esri/core/workers/chunks/3b3f91a61e3f29af1fb2.js +1 -0
  51. package/assets/esri/core/workers/chunks/{f815106d439ff1f76e51.js → 3b837b512999e6ab24bc.js} +1 -1
  52. package/assets/esri/core/workers/chunks/3d20c86f1fe877bf884b.js +1 -0
  53. package/assets/esri/core/workers/chunks/{a96c7432ca97cbeef4b8.js → 3db898a38a7c5f0efb48.js} +1 -1
  54. package/assets/esri/core/workers/chunks/3dc5fbecc427df1fd827.js +1 -0
  55. package/assets/esri/core/workers/chunks/3e65b4b18760bde8ceee.js +1 -0
  56. package/assets/esri/core/workers/chunks/3ff7aa216cd794d951e8.js +1 -0
  57. package/assets/esri/core/workers/chunks/{8e1865392681d390ab2e.js → 401ee7fa500adad77db1.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{60915a3708a34da1977e.js → 426156137f279d979ddd.js} +1 -1
  59. package/assets/esri/core/workers/chunks/4517630bf869205bab87.js +1 -0
  60. package/assets/esri/core/workers/chunks/{b002304a45856b024b46.js → 4714241189c13d0db897.js} +1 -1
  61. package/assets/esri/core/workers/chunks/48f1c3a7c9f16d6896f6.js +1 -0
  62. package/assets/esri/core/workers/chunks/49308bdc36373555f1af.js +1 -0
  63. package/assets/esri/core/workers/chunks/5075e85e1eafd431a8c0.js +1 -0
  64. package/assets/esri/core/workers/chunks/5121768c70f1e03b685c.js +1 -0
  65. package/assets/esri/core/workers/chunks/5201105ca11a2d450460.js +1 -0
  66. package/assets/esri/core/workers/chunks/{0e774f14ba274832f390.js → 520e0e5307eef27becc6.js} +1 -1
  67. package/assets/esri/core/workers/chunks/528ed0bd8dc149ead023.js +1 -0
  68. package/assets/esri/core/workers/chunks/52f354bf80ee5ab0379a.js +1 -0
  69. package/assets/esri/core/workers/chunks/538537f9bc866d9caa75.js +1 -0
  70. package/assets/esri/core/workers/chunks/53d165b4f30fd64e5d8a.js +1 -0
  71. package/assets/esri/core/workers/chunks/58a7cdebc3d182c15ec6.js +1 -0
  72. package/assets/esri/core/workers/chunks/58ac245ff7fb57c1004f.js +1 -0
  73. package/assets/esri/core/workers/chunks/58acc18b92533166135d.js +1 -0
  74. package/assets/esri/core/workers/chunks/597aa39cdb5366ef9a74.js +1 -0
  75. package/assets/esri/core/workers/chunks/5bfae465872760e7af6d.js +1 -0
  76. package/assets/esri/core/workers/chunks/{cda99b543a0e1979346c.js → 5cb1b950249d651f3837.js} +1 -1
  77. package/assets/esri/core/workers/chunks/5cb274e5759f7ca0d4ed.js +1 -0
  78. package/assets/esri/core/workers/chunks/5d3ddbf94539cb4f493e.js +1 -0
  79. package/assets/esri/core/workers/chunks/{c83fea0d0ebd0d8e43fd.js → 5d62d1920e3e35fc0192.js} +1 -1
  80. package/assets/esri/core/workers/chunks/5dd441db1e74dc9b56e9.js +1 -0
  81. package/assets/esri/core/workers/chunks/{c216cd5d6b5d4fe4bab3.js → 62e77e3c5ca9b4887923.js} +2 -2
  82. package/assets/esri/core/workers/chunks/630ad47857de3cf726d1.js +1 -0
  83. package/assets/esri/core/workers/chunks/64114a7d2da162987958.js +1 -0
  84. package/assets/esri/core/workers/chunks/6821462e5c1e9c76010a.js +1 -0
  85. package/assets/esri/core/workers/chunks/684d3cb4fb233180b2d0.js +1 -0
  86. package/assets/esri/core/workers/chunks/686c51fd2144e132783e.js +1 -0
  87. package/assets/esri/core/workers/chunks/68f9b2da1fd08785320f.js +2 -0
  88. package/assets/esri/core/workers/chunks/69e98de578f467a35054.js +1 -0
  89. package/assets/esri/core/workers/chunks/6a3d207308b29651f397.js +1 -0
  90. package/assets/esri/core/workers/chunks/6aabde21b0b376d95888.js +1 -0
  91. package/assets/esri/core/workers/chunks/6c6396bfcdab12e68deb.js +1 -0
  92. package/assets/esri/core/workers/chunks/6d616b66fb32904b55a1.js +1 -0
  93. package/assets/esri/core/workers/chunks/{bcb021a167580bb1619f.js → 6ef3b8d67b498d655a99.js} +1 -1
  94. package/assets/esri/core/workers/chunks/6f125b4ed06c0022dee6.js +1 -0
  95. package/assets/esri/core/workers/chunks/6f4825c3ef1fe202ab82.js +1 -0
  96. package/assets/esri/core/workers/chunks/6f5d61f734ec40dafabb.js +1 -0
  97. package/assets/esri/core/workers/chunks/{fce7995c26953bfd8d3d.js → 70229007d594536ba6a3.js} +1 -1
  98. package/assets/esri/core/workers/chunks/71e55381fdff3fc2542e.js +1 -0
  99. package/assets/esri/core/workers/chunks/{5abe34bb0110694f7b42.js → 72cfb186e50537bcdd19.js} +1 -1
  100. package/assets/esri/core/workers/chunks/72d67cc3a382e83bf1a2.js +1 -0
  101. package/assets/esri/core/workers/chunks/7748743d4be047094d67.js +1 -0
  102. package/assets/esri/core/workers/chunks/77a4f6f224d7ca4b69f4.js +1 -0
  103. package/assets/esri/core/workers/chunks/78c53aeb0a408ab3c80c.js +1 -0
  104. package/assets/esri/core/workers/chunks/7b5c1030a7cf0f382cc4.js +1 -0
  105. package/assets/esri/core/workers/chunks/7cee81c5aa1e6b7d2452.js +1 -0
  106. package/assets/esri/core/workers/chunks/7e89cb9ff615742e0894.js +1 -0
  107. package/assets/esri/core/workers/chunks/80f4f686ce403cb2693f.js +1 -0
  108. package/assets/esri/core/workers/chunks/{8477b5fdd99c6ac5c27b.js → 851705cf276eae8d4d37.js} +1 -1
  109. package/assets/esri/core/workers/chunks/{c319c3b85cdec73a9f45.js → 877c848beaf9a939862c.js} +1 -1
  110. package/assets/esri/core/workers/chunks/{ae74f722fb385e45fcf1.js → 893c0d28a5bf3f9f29f1.js} +1 -1
  111. package/assets/esri/core/workers/chunks/89e09276086745aa21fa.js +1 -0
  112. package/assets/esri/core/workers/chunks/{16b90d8f628a412ba4ba.js → 8a8c5e5ce457ca004687.js} +1 -1
  113. package/assets/esri/core/workers/chunks/{1f55d60d3adc31283296.js → 8b0a01ebc86ab226f01f.js} +1 -1
  114. package/assets/esri/core/workers/chunks/{452c01cecbbd1e370098.js → 8f93e6fc11a158d4f1ee.js} +1 -1
  115. package/assets/esri/core/workers/chunks/93bd56396b8cd020f965.js +1 -0
  116. package/assets/esri/core/workers/chunks/{359d3acb3953e64e5a78.js → 93ceb74ac88ef460fe5f.js} +1 -1
  117. package/assets/esri/core/workers/chunks/{4e676e888a935c507d90.js → 93d4bda22bde33fafa57.js} +1 -1
  118. package/assets/esri/core/workers/chunks/957f7b8de4aecb6f644e.js +1 -0
  119. package/assets/esri/core/workers/chunks/{50dc9893e13396f5e35d.js → 9629601de5e44ffe90ea.js} +2 -2
  120. package/assets/esri/core/workers/chunks/976ab2be6c244768c08a.js +1 -0
  121. package/assets/esri/core/workers/chunks/{e785f76c1a75cb1d1e1f.js → 99101789035f1787c630.js} +1 -1
  122. package/assets/esri/core/workers/chunks/{fbb23db01f3cf629d32e.js → 992a90ecbab931198fd0.js} +1 -1
  123. package/assets/esri/core/workers/chunks/99e5296192ab98fd0d99.js +1 -0
  124. package/assets/esri/core/workers/chunks/9d5f7573bfe3b051daf1.js +1 -0
  125. package/assets/esri/core/workers/chunks/a0c00c6fe60db49b3ab9.js +1 -0
  126. package/assets/esri/core/workers/chunks/a2247f4c3116efb16c4f.js +1 -0
  127. package/assets/esri/core/workers/chunks/a4245bd4e67a428fd835.js +1 -0
  128. package/assets/esri/core/workers/chunks/a442534ac0956a68b769.js +1 -0
  129. package/assets/esri/core/workers/chunks/a4d3cbc02dc1186a9a6d.js +1 -0
  130. package/assets/esri/core/workers/chunks/a4e9a17dacbb52444d75.js +1 -0
  131. package/assets/esri/core/workers/chunks/{8bdca6f06c8b5fedd917.js → a5abba59e738c3240c22.js} +1 -1
  132. package/assets/esri/core/workers/chunks/a8ec5b85c2fa6fb4f391.js +1 -0
  133. package/assets/esri/core/workers/chunks/{f5a2c28dc26c065ea355.js → a9a1293b1d5302fb3b54.js} +28 -30
  134. package/assets/esri/core/workers/chunks/a9fc53ae040320e49834.js +1 -0
  135. package/assets/esri/core/workers/chunks/aa118c1bcd922b8ac328.js +1 -0
  136. package/assets/esri/core/workers/chunks/aae0049c2c3e15a813e8.js +1 -0
  137. package/assets/esri/core/workers/chunks/ac33b10fe65f9e9e824f.js +1 -0
  138. package/assets/esri/core/workers/chunks/adc32f6b45ea3026fc34.js +1 -0
  139. package/assets/esri/core/workers/chunks/af31e62499d45bdab3c3.js +1 -0
  140. package/assets/esri/core/workers/chunks/b22a1c98271c2e4d8808.js +1 -0
  141. package/assets/esri/core/workers/chunks/{9f4681713f03365a2a53.js → b666027b9022fa346a79.js} +1 -1
  142. package/assets/esri/core/workers/chunks/b73c146d3e550eaf07eb.js +1 -0
  143. package/assets/esri/core/workers/chunks/b9bdb1f05e904c3655e4.js +1 -0
  144. package/assets/esri/core/workers/chunks/c0cbc50e5afd68bd485c.js +1 -0
  145. package/assets/esri/core/workers/chunks/c2a65de34f6a6c89c652.js +1 -0
  146. package/assets/esri/core/workers/chunks/c357c0a08b99c1e7f290.js +1 -0
  147. package/assets/esri/core/workers/chunks/{4a23b27bfbcfa08fd9a7.js → c3cf9e6e91f71c9cc5f3.js} +1 -1
  148. package/assets/esri/core/workers/chunks/c3ff2ff0a86a9143d7a5.js +1 -0
  149. package/assets/esri/core/workers/chunks/{3e3134e4bc34d4e07179.js → c424a66f1546275e2bcb.js} +1 -1
  150. package/assets/esri/core/workers/chunks/c4fc85281ca83af7abaf.js +1 -0
  151. package/assets/esri/core/workers/chunks/c60b4f2dd5fccdf362a7.js +1 -0
  152. package/assets/esri/core/workers/chunks/c6d0b4875b6b8d6bc25a.js +1 -0
  153. package/assets/esri/core/workers/chunks/c911f0b5bdd43b66b731.js +1 -0
  154. package/assets/esri/core/workers/chunks/c983e5ce0ff952b65d7f.js +1 -0
  155. package/assets/esri/core/workers/chunks/c9a4601073e1a3eee9d0.js +1 -0
  156. package/assets/esri/core/workers/chunks/ccffaba50674adba7a0f.js +1 -0
  157. package/assets/esri/core/workers/chunks/{24646a1176ce34039155.js → cdf6ad970dc1893dac58.js} +1 -1
  158. package/assets/esri/core/workers/chunks/d13e003c9293cb7e2852.js +1 -0
  159. package/assets/esri/core/workers/chunks/d24e027bb8b2c09f25c8.js +1 -0
  160. package/assets/esri/core/workers/chunks/d2df8c328054dc6cb7b7.js +1 -0
  161. package/assets/esri/core/workers/chunks/d5c35a75fd4c41def420.js +1 -0
  162. package/assets/esri/core/workers/chunks/{ace1899a8e5162b4018d.js → d6bb8db22ba85ad05fd7.js} +1 -1
  163. package/assets/esri/core/workers/chunks/{7601278ebced0c0c31cf.js → d78b7cac322755e87eb8.js} +1 -1
  164. package/assets/esri/core/workers/chunks/d7be278aed1fb37ad5ec.js +1 -0
  165. package/assets/esri/core/workers/chunks/d9695794cfaa014a55b1.js +1 -0
  166. package/assets/esri/core/workers/chunks/{8244b74e9c3a30d8d2f6.js → d9d4754062758789f186.js} +2 -2
  167. package/assets/esri/core/workers/chunks/da1e8b338ab9fe9e0a8e.js +1 -0
  168. package/assets/esri/core/workers/chunks/e1bf87077541da6853c6.js +1 -0
  169. package/assets/esri/core/workers/chunks/e279bcbe4f10e87bde6c.js +1 -0
  170. package/assets/esri/core/workers/chunks/e33d2ede6c9f1527d51b.js +1 -0
  171. package/assets/esri/core/workers/chunks/e4406baf206b9e4c7e4f.js +1 -0
  172. package/assets/esri/core/workers/chunks/e499252cb52f7aed49a0.js +1 -0
  173. package/assets/esri/core/workers/chunks/{e178cd0e9178d6716410.js → e5837e5ac6ef761f26a2.js} +1 -1
  174. package/assets/esri/core/workers/chunks/e6a7272b59a4c2e34dca.js +1 -0
  175. package/assets/esri/core/workers/chunks/e912b515704e20313e53.js +1 -0
  176. package/assets/esri/core/workers/chunks/eac683a37339aa558455.js +1 -0
  177. package/assets/esri/core/workers/chunks/ec1841e6e498d54012eb.js +1 -0
  178. package/assets/esri/core/workers/chunks/ed3d16a5b4084ef61f8a.js +1 -0
  179. package/assets/esri/core/workers/chunks/ee07f54bc77fe9f8575a.js +1 -0
  180. package/assets/esri/core/workers/chunks/{d35c475f004367e333eb.js → eeea5710275c967e8d51.js} +1 -1
  181. package/assets/esri/core/workers/chunks/ef46ef4f0ee9f2aeaa4a.js +1 -0
  182. package/assets/esri/core/workers/chunks/efb4aa5886730ea377bd.js +1 -0
  183. package/assets/esri/core/workers/chunks/f2a268c69f2a5566381b.js +1 -0
  184. package/assets/esri/core/workers/chunks/{d1ccc5f2d8892328ab01.js → f5731ad4cfbbf1cc569a.js} +2 -2
  185. package/assets/esri/core/workers/chunks/f590db684d88e72bd79b.js +1 -0
  186. package/assets/esri/core/workers/chunks/f69df22a5c64389ebe28.js +1 -0
  187. package/assets/esri/core/workers/chunks/{f60292d97bcdbf19165b.js → f6d047358d14328f3622.js} +1 -1
  188. package/assets/esri/core/workers/chunks/f7fca88d120d45bb782a.js +1 -0
  189. package/assets/esri/core/workers/chunks/f819854098d63fe4ccdb.js +1 -0
  190. package/assets/esri/core/workers/chunks/f8f3579d0c1b65762902.js +1 -0
  191. package/assets/esri/core/workers/chunks/f98118127469449ca145.js +1 -0
  192. package/assets/esri/core/workers/chunks/f9ed05d4ad1f44d033bb.js +1 -0
  193. package/assets/esri/core/workers/chunks/fb6605be0c5e36785543.js +1 -0
  194. package/assets/esri/core/workers/chunks/fbe7dae0b4bf2d172487.js +1 -0
  195. package/assets/esri/core/workers/chunks/fc4d9be62cf5e9758842.js +1 -0
  196. package/assets/esri/core/workers/chunks/fd70a25ffdf2cc6c5be2.js +1 -0
  197. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  198. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  199. package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
  200. package/assets/esri/libs/vxl/vxlLayer.wasm +0 -0
  201. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +38 -8
  202. package/assets/esri/themes/base/widgets/_DatePicker.scss +1 -1
  203. package/assets/esri/themes/dark/main.css +1 -1
  204. package/assets/esri/themes/light/main.css +1 -1
  205. package/assets/esri/themes/light/view.css +1 -1
  206. package/chunks/GlowComposition.glsl.js +2 -2
  207. package/chunks/RealisticTree.glsl.js +17 -15
  208. package/chunks/bundle2.js +1 -1
  209. package/chunks/lyr3DMain.js +1 -1
  210. package/chunks/lyr3DWorker.js +1 -1
  211. package/chunks/vxlLayer.js +1 -1
  212. package/config.d.ts +2 -2
  213. package/config.js +1 -1
  214. package/core/Collection.d.ts +25 -25
  215. package/core/Error.d.ts +1 -1
  216. package/core/JSONSupport.d.ts +1 -1
  217. package/core/promiseUtils.d.ts +3 -3
  218. package/core/reactiveUtils.d.ts +4 -4
  219. package/core/screenUtils.js +1 -1
  220. package/core/sql/WhereClause.d.ts +1 -1
  221. package/core/sql.d.ts +1 -1
  222. package/core/timeUtils.d.ts +1 -1
  223. package/core/workers/Connection.d.ts +9 -9
  224. package/core/workers.d.ts +1 -1
  225. package/editing/types.d.ts +3 -3
  226. package/geometry/Extent.d.ts +0 -13
  227. package/geometry/Geometry.d.ts +10 -8
  228. package/geometry/Mesh.d.ts +9 -2
  229. package/geometry/Mesh.js +1 -1
  230. package/geometry/Multipoint.d.ts +9 -0
  231. package/geometry/Multipoint.js +1 -1
  232. package/geometry/Point.d.ts +15 -71
  233. package/geometry/Polygon.js +1 -1
  234. package/geometry/support/MeshMaterial.d.ts +5 -5
  235. package/geometry/support/MeshTexture.d.ts +19 -19
  236. package/geometry/support/geometryUtils.js +1 -1
  237. package/geometry/support/jsonUtils.d.ts +1 -1
  238. package/geometry/support/meshUtils.d.ts +130 -2
  239. package/geometry/support/meshUtils.js +1 -1
  240. package/graphic/AnnotationGraphicOrigin.d.ts +34 -0
  241. package/graphic/AnnotationGraphicOrigin.js +2 -0
  242. package/graphic/DimensionFeatureGraphicOrigin.d.ts +34 -0
  243. package/graphic/DimensionFeatureGraphicOrigin.js +2 -0
  244. package/identity/Credential.d.ts +1 -1
  245. package/identity/IdentityManager.d.ts +1 -1
  246. package/identity/IdentityManagerBase.js +1 -1
  247. package/identity/OAuthInfo.d.ts +1 -1
  248. package/identity/ServerInfo.d.ts +2 -2
  249. package/interfaces.d.ts +23 -0
  250. package/intl/number.d.ts +3 -3
  251. package/intl/substitute.d.ts +2 -2
  252. package/intl.d.ts +28 -28
  253. package/kernel.js +1 -1
  254. package/layers/AnnotationLayer.d.ts +263 -32
  255. package/layers/AnnotationLayer.js +1 -1
  256. package/layers/BaseDynamicLayer.d.ts +5 -5
  257. package/layers/BaseTileLayer.d.ts +4 -4
  258. package/layers/BuildingSceneLayer.d.ts +1 -1
  259. package/layers/CSVLayer.d.ts +7 -1
  260. package/layers/CatalogLayer.d.ts +6 -0
  261. package/layers/DimensionFeatureLayer.d.ts +263 -32
  262. package/layers/DimensionFeatureLayer.js +1 -1
  263. package/layers/FeatureLayer.d.ts +45 -8
  264. package/layers/FeatureLayer.js +1 -1
  265. package/layers/GeoJSONLayer.d.ts +14 -8
  266. package/layers/LinkChartLayer.js +1 -1
  267. package/layers/MapImageLayer.d.ts +5 -5
  268. package/layers/MediaLayer.d.ts +2 -2
  269. package/layers/OrientedImageryLayer.d.ts +29 -2
  270. package/layers/ParquetLayer.d.ts +7 -1
  271. package/layers/SceneLayer.d.ts +5 -3
  272. package/layers/SceneLayer.js +1 -1
  273. package/layers/StreamLayer.d.ts +1 -1
  274. package/layers/SubtypeGroupLayer.d.ts +7 -1
  275. package/layers/TileLayer.d.ts +2 -2
  276. package/layers/VideoLayer.d.ts +8 -2
  277. package/layers/VideoLayer.js +1 -1
  278. package/layers/VoxelLayer.d.ts +4 -4
  279. package/layers/WCSLayer.d.ts +2 -2
  280. package/layers/WFSLayer.d.ts +6 -0
  281. package/layers/WebTileLayer.d.ts +1 -1
  282. package/layers/catalog/CatalogFootprintLayer.d.ts +60 -11
  283. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  284. package/layers/graphics/sources/parquet/FileProvider.js +1 -1
  285. package/layers/graphics/sources/parquet/ParquetFileInfo.js +2 -0
  286. package/layers/graphics/sources/parquet/ParquetFileStatistics.js +2 -0
  287. package/layers/graphics/sources/parquet/PortalParquetFileProvider.js +1 -1
  288. package/layers/graphics/sources/parquet/PortalParquetLayerFileProvider.js +1 -1
  289. package/layers/graphics/sources/parquet/UrlsFileProvider.js +1 -1
  290. package/layers/graphics/sources/parquet/createFileProvider.js +1 -1
  291. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  292. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +6 -0
  293. package/layers/mixins/ArcGISImageService.d.ts +7 -1
  294. package/layers/mixins/BlendLayer.d.ts +1 -1
  295. package/layers/mixins/DataSeriesLayer.d.ts +161 -0
  296. package/layers/mixins/DataSeriesLayer.js +2 -0
  297. package/layers/mixins/FeatureLayerBase.d.ts +43 -19
  298. package/layers/mixins/TemporalLayer.d.ts +4 -2
  299. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  300. package/layers/support/AnnotationSublayer.d.ts +44 -0
  301. package/layers/support/AnnotationSublayer.js +2 -0
  302. package/layers/support/DateTimeFieldFormat.d.ts +10 -10
  303. package/layers/support/FeatureEffect.d.ts +22 -22
  304. package/layers/support/FeatureReductionBinning.d.ts +12 -0
  305. package/layers/support/FeatureReductionCluster.d.ts +12 -0
  306. package/layers/support/Field.d.ts +2 -2
  307. package/layers/support/ImageElement.d.ts +1 -1
  308. package/layers/support/MosaicRule.d.ts +0 -2
  309. package/layers/support/NumberFieldFormat.d.ts +5 -5
  310. package/layers/support/StreamConnection.d.ts +1 -1
  311. package/layers/support/Sublayer.d.ts +2 -2
  312. package/layers/support/SubtypeSublayer.d.ts +14 -1
  313. package/layers/support/TimeSeriesFieldTimeMapping.d.ts +30 -0
  314. package/layers/support/TimeSeriesFieldTimeMapping.js +2 -0
  315. package/layers/support/TimeSeriesInfo.d.ts +149 -0
  316. package/layers/support/TimeSeriesInfo.js +2 -0
  317. package/layers/support/VideoElement.d.ts +1 -1
  318. package/layers/support/commonProperties.js +1 -1
  319. package/layers/support/dataSeriesUtils.d.ts +18 -0
  320. package/layers/support/dataSeriesUtils.js +2 -0
  321. package/layers/support/featureLayerUtils.js +1 -1
  322. package/layers/support/kmlUtils.js +1 -1
  323. package/layers/support/layerUtils.js +1 -1
  324. package/layers/support/parquetUtils.js +1 -1
  325. package/layers/support/tiles3DUtils.js +1 -1
  326. package/layers/support/timeSeriesUtils.d.ts +27 -0
  327. package/layers/support/timeSeriesUtils.js +2 -0
  328. package/layers/types.d.ts +1 -1
  329. package/layers/video/types.d.ts +61 -1
  330. package/libs/parquet/parquet.js +1 -1
  331. package/linkChart/ChronologicalLayoutSettings.d.ts +1 -1
  332. package/networks/CircuitManager.d.ts +1 -1
  333. package/networks/Network.d.ts +1 -1
  334. package/networks/UnitIdentifierManager.d.ts +1 -1
  335. package/networks/support/NamedTraceConfiguration.d.ts +1 -1
  336. package/networks/support/TraceConfiguration.d.ts +2 -2
  337. package/networks/support/UNTraceConfiguration.d.ts +3 -3
  338. package/networks/support/jsonTypes.d.ts +7 -1
  339. package/networks/support/utils.js +1 -1
  340. package/package.json +3 -3
  341. package/popup/content/CustomContent.d.ts +1 -1
  342. package/portal/Portal.d.ts +2 -2
  343. package/portal/jsonTypes.d.ts +2 -2
  344. package/renderers/support/AuthoringInfo.d.ts +14 -1
  345. package/renderers/support/AuthoringInfo.js +1 -1
  346. package/renderers/support/AuthoringInfoVisualVariable.d.ts +14 -1
  347. package/renderers/support/AuthoringInfoVisualVariable.js +1 -1
  348. package/renderers/support/jsonUtils.d.ts +1 -1
  349. package/renderers/support/utils.d.ts +1 -1
  350. package/renderers/visualVariables/RotationVariable.d.ts +16 -1
  351. package/renderers/visualVariables/RotationVariable.js +1 -1
  352. package/request/types.d.ts +41 -43
  353. package/rest/geometryService.d.ts +1 -1
  354. package/rest/knowledgeGraph/CreateReplicaResponse.d.ts +1 -1
  355. package/rest/knowledgeGraph/GraphApplyEdits.d.ts +1 -1
  356. package/rest/knowledgeGraph/GraphProperty.d.ts +5 -1
  357. package/rest/knowledgeGraph/GraphQueryStreamingResult.d.ts +2 -2
  358. package/rest/knowledgeGraph/wasmInterface/wasmToDataModelFactories.js +1 -1
  359. package/rest/knowledgeGraph/wasmInterface/wasmToQueryResponseObjFactories.js +1 -1
  360. package/rest/knowledgeGraph/wasmInterface/wasmToReplicaFactories.js +1 -1
  361. package/rest/knowledgeGraphService.d.ts +13 -13
  362. package/rest/layerSources/DynamicDataLayer.d.ts +1 -1
  363. package/rest/print.d.ts +1 -1
  364. package/rest/support/AttributeBinsQuery.d.ts +16 -2
  365. package/rest/support/ClosestFacilityParameters.d.ts +6 -6
  366. package/rest/support/LastMileDeliveryParameters.d.ts +4 -4
  367. package/rest/support/LocationToAddressParameters.d.ts +1 -1
  368. package/rest/support/PrintTemplate.d.ts +5 -5
  369. package/rest/support/Query.d.ts +18 -4
  370. package/rest/support/RouteParameters.d.ts +5 -5
  371. package/rest/support/ServiceAreaParameters.d.ts +6 -6
  372. package/rest/support/TopFeaturesQuery.d.ts +16 -2
  373. package/rest/support/meshFeatureSet.js +1 -1
  374. package/smartMapping/renderers/color.d.ts +40 -0
  375. package/smartMapping/renderers/color.js +1 -1
  376. package/smartMapping/renderers/opacity.d.ts +8 -0
  377. package/smartMapping/renderers/opacity.js +1 -1
  378. package/smartMapping/renderers/size.d.ts +38 -0
  379. package/smartMapping/renderers/size.js +1 -1
  380. package/smartMapping/renderers/support/regenerateUtils.js +1 -1
  381. package/smartMapping/renderers/support/timeSeriesUtils.js +2 -0
  382. package/smartMapping/renderers/type.d.ts +20 -1
  383. package/smartMapping/renderers/type.js +1 -1
  384. package/smartMapping/renderers/univariateColorSize.d.ts +19 -0
  385. package/smartMapping/renderers/univariateColorSize.js +1 -1
  386. package/support/revision.js +1 -1
  387. package/support/tests/setupServiceMocksMesh.js +1 -1
  388. package/support/timeUtils.d.ts +3 -3
  389. package/symbols/Font.d.ts +7 -7
  390. package/symbols/WebStyleSymbol.d.ts +11 -11
  391. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  392. package/symbols/cim/effects/EffectControlMeasureLine.js +1 -1
  393. package/symbols/support/Symbol3DEmissive.d.ts +8 -2
  394. package/symbols/support/jsonUtils.d.ts +1 -1
  395. package/time/TimeExtent.d.ts +2 -2
  396. package/versionManagement/VersionManagementService.d.ts +8 -8
  397. package/versionManagement/VersionManager.d.ts +13 -3
  398. package/versionManagement/VersioningState.d.ts +4 -4
  399. package/views/2d/MapViewConstraints.d.ts +29 -25
  400. package/views/2d/engine/flow/styles/Imagery.js +1 -1
  401. package/views/2d/engine/flow/styles/Particles.js +1 -1
  402. package/views/2d/engine/flow/styles/Streamlines.js +1 -1
  403. package/views/2d/engine/vectorTiles/VectorTileFeatureIndex.js +1 -1
  404. package/views/2d/engine/vectorTiles/style/StyleLayer.js +1 -1
  405. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerShader.js +1 -1
  406. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPolygonShader.js +1 -1
  407. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
  408. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ComplexOutlineFillShader.js +1 -1
  409. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/HeatmapAccumulateShader.js +1 -1
  410. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OutlineFillShader.js +1 -1
  411. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/hittestUtils.js +1 -1
  412. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  413. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  414. package/views/2d/layers/BaseLayerView2D.d.ts +4 -20
  415. package/views/2d/layers/BaseLayerViewGL2D.d.ts +6 -22
  416. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  417. package/views/2d/layers/GeoRSSLayerView2D.js +1 -1
  418. package/views/2d/layers/GraphicsLayerView2D.js +1 -1
  419. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  420. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  421. package/views/2d/layers/KMLLayerView2D.js +1 -1
  422. package/views/2d/layers/MapNotesLayerView2D.js +1 -1
  423. package/views/2d/layers/MediaLayerView2D.js +1 -1
  424. package/views/2d/layers/RouteLayerView2D.js +1 -1
  425. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  426. package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +1 -1
  427. package/views/2d/layers/features/layerAdapters/DimensionLayerAdapter.js +1 -1
  428. package/views/2d/layers/features/sources/strategies/ParquetSnapshotLoadStrategy.js +1 -1
  429. package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
  430. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  431. package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
  432. package/views/2d/layers/graphics/GraphicStore.js +1 -1
  433. package/views/2d/support/hitTestUtils.js +1 -1
  434. package/views/3d/analysis/LineOfSight/LineOfSightAggregateManipulatedObject3D.js +2 -0
  435. package/views/3d/analysis/LineOfSight/LineOfSightAuthoringUtils.js +1 -1
  436. package/views/3d/analysis/LineOfSight/LineOfSightConfiguration.js +1 -1
  437. package/views/3d/analysis/LineOfSight/LineOfSightManipulators.js +1 -1
  438. package/views/3d/analysis/LineOfSight/LineOfSightObserverPlugin.js +1 -1
  439. package/views/3d/analysis/LineOfSight/LineOfSightPlacementLeafPlugin.js +2 -0
  440. package/views/3d/analysis/LineOfSight/LineOfSightPlacementTool.js +1 -1
  441. package/views/3d/analysis/LineOfSight/LineOfSightReshapeTool3D.js +2 -0
  442. package/views/3d/analysis/LineOfSight/LineOfSightRootPlugin.js +1 -1
  443. package/views/3d/analysis/LineOfSight/LineOfSightTargetPlugin.js +1 -1
  444. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  445. package/views/3d/analysis/LineOfSight/LineOfSightTool2.js +1 -1
  446. package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
  447. package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
  448. package/views/3d/analysis/Viewshed/ViewshedSnappingController.js +1 -1
  449. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  450. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementError.d.ts +1 -1
  451. package/views/3d/glTF/internal/resourceUtils.js +1 -1
  452. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  453. package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
  454. package/views/3d/interactive/editingTools/reshape/isSupportedObject.js +1 -1
  455. package/views/3d/interactive/editingTools/reshape/reshapeTooltipUtils3D.js +1 -1
  456. package/views/3d/interactive/editingTools/visualElementUtils.js +1 -1
  457. package/views/3d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles3D.js +1 -1
  458. package/views/3d/layers/FlowSubView3D.js +1 -1
  459. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  460. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  461. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  462. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  463. package/views/3d/terrain/OverlayManager.js +1 -1
  464. package/views/3d/webgl/RenderNode.d.ts +32 -11
  465. package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
  466. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  467. package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
  468. package/views/3d/webgl-engine/shaders/ToneMapping.glsl.js +6 -10
  469. package/views/BreakpointsOwner.d.ts +1 -1
  470. package/views/DOMContainer.d.ts +6 -6
  471. package/views/Magnifier.d.ts +1 -1
  472. package/views/MapView.d.ts +1 -1
  473. package/views/SceneView.d.ts +2 -2
  474. package/views/View2D.d.ts +62 -54
  475. package/views/Viewport2DMixin.d.ts +1 -1
  476. package/views/analysis/ElevationProfile/ElevationProfileError.d.ts +1 -1
  477. package/views/draw/plugins/PolygonPlugin.js +1 -1
  478. package/views/input/gamepad/GamepadInputDevice.d.ts +1 -1
  479. package/views/input/types.d.ts +15 -15
  480. package/views/interactive/interactiveToolUtils.js +1 -1
  481. package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
  482. package/views/interactive/snapping/LineSnapper.js +1 -1
  483. package/views/interactive/snapping/ParallelLineSnapper.js +1 -1
  484. package/views/interactive/snapping/RightAngleSnapper.js +1 -1
  485. package/views/interactive/snapping/RightAngleTriangleSnapper.js +1 -1
  486. package/views/interactive/snapping/SnappingAlgorithm.js +1 -1
  487. package/views/interactive/snapping/SnappingManager.js +1 -1
  488. package/views/interactive/snapping/snappingUtils.js +1 -1
  489. package/views/layers/FeatureLikeLayerView.d.ts +32 -5
  490. package/views/layers/FeatureLikeLayerView.js +1 -1
  491. package/views/layers/GraphicsLayerView.d.ts +6 -3
  492. package/views/layers/ImageryLayerView.d.ts +4 -0
  493. package/views/navigation/Navigation.d.ts +1 -1
  494. package/views/support/WebAssemblyRequirements.js +1 -1
  495. package/views/types.d.ts +5 -5
  496. package/webdoc/support/webdocSaveUtils.js +1 -1
  497. package/webscene/Glow.d.ts +0 -4
  498. package/widgets/BasemapGallery.d.ts +1 -1
  499. package/widgets/BasemapLayerList.d.ts +1 -1
  500. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +10 -2
  501. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  502. package/widgets/BatchAttributeForm/ReactiveContingentValuesManager.js +1 -1
  503. package/widgets/BatchAttributeForm/attachmentUtils.d.ts +14 -0
  504. package/widgets/BatchAttributeForm/attachmentUtils.js +1 -1
  505. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  506. package/widgets/BatchAttributeForm/css.js +1 -1
  507. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +8 -6
  508. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
  509. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  510. package/widgets/BatchAttributeForm/inputs/RelationshipElementInput.js +1 -1
  511. package/widgets/BatchAttributeForm/inputs/support/attachmentValidationCriteriaState.d.ts +5 -0
  512. package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
  513. package/widgets/BatchAttributeForm/inputs/types.d.ts +8 -1
  514. package/widgets/BatchAttributeForm/interfaceUtils.js +1 -1
  515. package/widgets/BatchAttributeForm/rendered-content/RelationshipDetails.js +1 -1
  516. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  517. package/widgets/BatchAttributeForm.d.ts +10 -2
  518. package/widgets/BatchAttributeForm.js +1 -1
  519. package/widgets/Bookmarks.d.ts +1 -1
  520. package/widgets/BuildingExplorer.d.ts +1 -1
  521. package/widgets/CoordinateConversion/CoordinateConversionViewModel.d.ts +2 -2
  522. package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
  523. package/widgets/CoordinateConversion.d.ts +2 -2
  524. package/widgets/Daylight.d.ts +1 -1
  525. package/widgets/Directions.d.ts +1 -1
  526. package/widgets/Editor.d.ts +1 -1
  527. package/widgets/Feature.d.ts +1 -1
  528. package/widgets/FeatureForm.d.ts +1 -1
  529. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  530. package/widgets/FeatureTable/FieldColumn.d.ts +1 -14
  531. package/widgets/FeatureTable/Grid/Column.d.ts +1 -1
  532. package/widgets/FeatureTable/Grid/Column.js +1 -1
  533. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  534. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  535. package/widgets/FeatureTable/Grid/GroupColumn.js +1 -1
  536. package/widgets/FeatureTable/support/ColumnTemplateBase.d.ts +1 -1
  537. package/widgets/FeatureTable.js +1 -1
  538. package/widgets/FeatureTemplates.d.ts +1 -1
  539. package/widgets/FloorFilter.d.ts +1 -1
  540. package/widgets/Fullscreen/FullscreenViewModel.d.ts +3 -3
  541. package/widgets/Fullscreen/FullscreenViewModel.js +1 -1
  542. package/widgets/Fullscreen.d.ts +3 -3
  543. package/widgets/LayerList/ListItemPanel.d.ts +5 -5
  544. package/widgets/Legend.d.ts +1 -1
  545. package/widgets/Locate/LocateViewModel.d.ts +2 -2
  546. package/widgets/Locate.d.ts +1 -1
  547. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  548. package/widgets/PanoramicViewer/utils.js +1 -1
  549. package/widgets/Popup.d.ts +1 -1
  550. package/widgets/Print/PrintViewModel.d.ts +2 -2
  551. package/widgets/Print/PrintViewModel.js +1 -1
  552. package/widgets/Print/TemplateOptions.d.ts +4 -4
  553. package/widgets/Print.d.ts +6 -6
  554. package/widgets/Search/SearchViewModel.d.ts +5 -5
  555. package/widgets/Search.d.ts +4 -4
  556. package/widgets/ShadowCast.d.ts +1 -1
  557. package/widgets/Sketch/SketchViewModel.d.ts +1 -1
  558. package/widgets/Slice.d.ts +1 -1
  559. package/widgets/TableList/ListItemPanel.d.ts +5 -5
  560. package/widgets/Track/TrackViewModel.d.ts +3 -3
  561. package/widgets/Track.d.ts +3 -3
  562. package/widgets/UtilityNetworkTrace.d.ts +1 -1
  563. package/widgets/VersionManagement/VersionManagementViewModel.d.ts +2 -2
  564. package/widgets/VideoPlayer/VideoPlayerViewModel.d.ts +7 -1
  565. package/widgets/VideoPlayer/VideoPlayerViewModel.js +1 -1
  566. package/widgets/Weather.d.ts +1 -1
  567. package/widgets/Widget.d.ts +1 -1
  568. package/widgets/support/ContingentValuesManager.js +1 -1
  569. package/widgets/support/forms/formUtils.js +1 -1
  570. package/widgets/support/types.d.ts +1 -1
  571. package/widgets/support/widget.d.ts +6 -6
  572. package/assets/esri/core/workers/chunks/02aaeaa988e9e7d65a7f.js +0 -1
  573. package/assets/esri/core/workers/chunks/07a242ea908aa8e2ba28.js +0 -1
  574. package/assets/esri/core/workers/chunks/0a780a883abfcdf0b900.js +0 -1
  575. package/assets/esri/core/workers/chunks/0fbf9bf52ecb4cd8293b.js +0 -1
  576. package/assets/esri/core/workers/chunks/119d352dd586f2bb61ec.js +0 -1
  577. package/assets/esri/core/workers/chunks/130784a27661de6b52a5.js +0 -1
  578. package/assets/esri/core/workers/chunks/145364aa20b4435294c2.js +0 -1
  579. package/assets/esri/core/workers/chunks/14c6419568d8a7a15cd6.js +0 -1
  580. package/assets/esri/core/workers/chunks/153dc2a0b08a0e44a881.js +0 -1
  581. package/assets/esri/core/workers/chunks/1595dc499a06b23b6a96.js +0 -1
  582. package/assets/esri/core/workers/chunks/16713986893adfbc9331.js +0 -1
  583. package/assets/esri/core/workers/chunks/1765042635084f75d2b3.js +0 -1
  584. package/assets/esri/core/workers/chunks/179c9fe4ac83b42e5976.js +0 -1
  585. package/assets/esri/core/workers/chunks/1c1515e020e32e177b54.js +0 -1
  586. package/assets/esri/core/workers/chunks/1c64e10f966e26af6fed.js +0 -1
  587. package/assets/esri/core/workers/chunks/1ddbf5f507ac153234be.js +0 -1
  588. package/assets/esri/core/workers/chunks/201007cf1a91e2b126fc.js +0 -1
  589. package/assets/esri/core/workers/chunks/20d0adc678f11981059c.js +0 -1
  590. package/assets/esri/core/workers/chunks/227eff8aa4a6f5f03bc2.js +0 -1
  591. package/assets/esri/core/workers/chunks/233ff588798c8a5eedf4.js +0 -1
  592. package/assets/esri/core/workers/chunks/24647e7424798dccdaf5.js +0 -1
  593. package/assets/esri/core/workers/chunks/249616ea2d90d40a8299.js +0 -1
  594. package/assets/esri/core/workers/chunks/24d9e4f1c7b8ff0d2cce.js +0 -1
  595. package/assets/esri/core/workers/chunks/24eaf1349ffe10e616e6.js +0 -1
  596. package/assets/esri/core/workers/chunks/29615df388a0df022d8c.js +0 -1
  597. package/assets/esri/core/workers/chunks/2bcd4d395bfe6a19ccc8.js +0 -1
  598. package/assets/esri/core/workers/chunks/2bd334f9ab89334df713.js +0 -1
  599. package/assets/esri/core/workers/chunks/2c8584ec1c3c9fd5aba2.js +0 -1
  600. package/assets/esri/core/workers/chunks/2d374cc8c54a722a7afe.js +0 -1
  601. package/assets/esri/core/workers/chunks/2e11b4e9d66474a60064.js +0 -1
  602. package/assets/esri/core/workers/chunks/2fa080539d039c92ce08.js +0 -1
  603. package/assets/esri/core/workers/chunks/3109b05fe4fc40d4f25b.js +0 -1
  604. package/assets/esri/core/workers/chunks/31442f25d550ead58fc4.js +0 -1
  605. package/assets/esri/core/workers/chunks/319ff04282dc8ae38b56.js +0 -2
  606. package/assets/esri/core/workers/chunks/32323b0e0fcecd8f640e.js +0 -1
  607. package/assets/esri/core/workers/chunks/330da3828eefd8d72d3f.js +0 -1
  608. package/assets/esri/core/workers/chunks/3402fb9c596b582311c7.js +0 -1
  609. package/assets/esri/core/workers/chunks/388e71e8f2ec41bfa5a9.js +0 -1
  610. package/assets/esri/core/workers/chunks/3a6678ee9990d7e83e15.js +0 -1
  611. package/assets/esri/core/workers/chunks/3aacaa1be5efeac23a37.js +0 -1
  612. package/assets/esri/core/workers/chunks/3b3986276e70297d573b.js +0 -1
  613. package/assets/esri/core/workers/chunks/3b765a8cac9e92f644f2.js +0 -1
  614. package/assets/esri/core/workers/chunks/3bf6d55511cd7722eb93.js +0 -1
  615. package/assets/esri/core/workers/chunks/3e012cd3ca4451f89f59.js +0 -1
  616. package/assets/esri/core/workers/chunks/40910c69307e2d2d3f28.js +0 -1
  617. package/assets/esri/core/workers/chunks/423a9882abd4a6dadf86.js +0 -1
  618. package/assets/esri/core/workers/chunks/428561df7ba6f02e2d80.js +0 -1
  619. package/assets/esri/core/workers/chunks/45323491f9005629c602.js +0 -1
  620. package/assets/esri/core/workers/chunks/46d0a25d33b5b328cfce.js +0 -1
  621. package/assets/esri/core/workers/chunks/46fbd519cc1a37923bfc.js +0 -1
  622. package/assets/esri/core/workers/chunks/47dd2bfecc5c4b5f10f0.js +0 -1
  623. package/assets/esri/core/workers/chunks/4845df00f6ebcce6ea3e.js +0 -1
  624. package/assets/esri/core/workers/chunks/48fcc10768d93e95a04e.js +0 -1
  625. package/assets/esri/core/workers/chunks/49f6c9e9980b8c624fd7.js +0 -1
  626. package/assets/esri/core/workers/chunks/4a9dd9f8aa98882218f3.js +0 -1
  627. package/assets/esri/core/workers/chunks/4bfffdfbe6d467f143a4.js +0 -1
  628. package/assets/esri/core/workers/chunks/4ef53455c8bc6efee80e.js +0 -1
  629. package/assets/esri/core/workers/chunks/518046d2b95a7590a092.js +0 -1
  630. package/assets/esri/core/workers/chunks/51ee6102f5f4840a5b47.js +0 -1
  631. package/assets/esri/core/workers/chunks/54dad475dc806a38c287.js +0 -1
  632. package/assets/esri/core/workers/chunks/552945a73a95cd2a9f54.js +0 -1
  633. package/assets/esri/core/workers/chunks/58155f24f8ed6aca7a21.js +0 -1
  634. package/assets/esri/core/workers/chunks/5838f46d341d2fde42ee.js +0 -1
  635. package/assets/esri/core/workers/chunks/58994b6bfcda5f2ada80.js +0 -1
  636. package/assets/esri/core/workers/chunks/592a599f514de373dead.js +0 -1
  637. package/assets/esri/core/workers/chunks/5aba23584e0b230c75f5.js +0 -1
  638. package/assets/esri/core/workers/chunks/5f9bacee6fbf9ac1bca0.js +0 -1
  639. package/assets/esri/core/workers/chunks/62206d5d497b95fc4caf.js +0 -1
  640. package/assets/esri/core/workers/chunks/624b1bb269744142b835.js +0 -1
  641. package/assets/esri/core/workers/chunks/64daa2a714e59d22bbd4.js +0 -1
  642. package/assets/esri/core/workers/chunks/65621650a53f69f7b05a.js +0 -1
  643. package/assets/esri/core/workers/chunks/6637f19b82555738a1d5.js +0 -1
  644. package/assets/esri/core/workers/chunks/6c9933f948efd7923aa1.js +0 -1
  645. package/assets/esri/core/workers/chunks/6cab67fc7044ee9b863b.js +0 -1
  646. package/assets/esri/core/workers/chunks/6db274f6767102a39021.js +0 -1
  647. package/assets/esri/core/workers/chunks/7014e73dfd3c8baa704c.js +0 -1
  648. package/assets/esri/core/workers/chunks/76589434d573111a8fb4.js +0 -1
  649. package/assets/esri/core/workers/chunks/767ea5b455b3823afd09.js +0 -1
  650. package/assets/esri/core/workers/chunks/77769663cd712822d33e.js +0 -1
  651. package/assets/esri/core/workers/chunks/77859a61d059738d057f.js +0 -1
  652. package/assets/esri/core/workers/chunks/7b564226def99fcf79d8.js +0 -1
  653. package/assets/esri/core/workers/chunks/7bbffe07e62897928773.js +0 -1
  654. package/assets/esri/core/workers/chunks/7cadfd7444a2a05cf2fb.js +0 -1
  655. package/assets/esri/core/workers/chunks/823789261ca3338f0fa8.js +0 -1
  656. package/assets/esri/core/workers/chunks/84b0b6e099d949e0fea5.js +0 -1
  657. package/assets/esri/core/workers/chunks/8c5a41ae68775bac3446.js +0 -1
  658. package/assets/esri/core/workers/chunks/8f94c90fdb0333da2d0f.js +0 -1
  659. package/assets/esri/core/workers/chunks/9133c1b7cc1c9da27deb.js +0 -1
  660. package/assets/esri/core/workers/chunks/9a6e62ef984e9c5babc4.js +0 -1
  661. package/assets/esri/core/workers/chunks/9d27cc631bab8aa7479e.js +0 -1
  662. package/assets/esri/core/workers/chunks/9dcfaca1f4fa8c8026ac.js +0 -1
  663. package/assets/esri/core/workers/chunks/9f23a61c60949459c14f.js +0 -30
  664. package/assets/esri/core/workers/chunks/a03c4c0bf138734a002e.js +0 -1
  665. package/assets/esri/core/workers/chunks/a0fa60a24e58f7a47e41.js +0 -1
  666. package/assets/esri/core/workers/chunks/a806ac351ef5da04c250.js +0 -1
  667. package/assets/esri/core/workers/chunks/ab94c9f62462d7a98f6a.js +0 -1
  668. package/assets/esri/core/workers/chunks/abdb05754c50776c3edd.js +0 -1
  669. package/assets/esri/core/workers/chunks/ad488985824fbb830ed6.js +0 -1
  670. package/assets/esri/core/workers/chunks/b08a1255dacf6cfcf139.js +0 -640
  671. package/assets/esri/core/workers/chunks/b098469e0010a6b44df9.js +0 -1
  672. package/assets/esri/core/workers/chunks/b0ac4b0b7aec70cfe6eb.js +0 -1
  673. package/assets/esri/core/workers/chunks/b1f1271434af302938e8.js +0 -1
  674. package/assets/esri/core/workers/chunks/bfbd1ca28ed2f263e58f.js +0 -1
  675. package/assets/esri/core/workers/chunks/c1b6de0d728d25d7905a.js +0 -1
  676. package/assets/esri/core/workers/chunks/c27cb2a83a1d2e004501.js +0 -1
  677. package/assets/esri/core/workers/chunks/c44be4aaba829e6d149d.js +0 -1
  678. package/assets/esri/core/workers/chunks/ca1b0cb14ea9ae1bf2a3.js +0 -1
  679. package/assets/esri/core/workers/chunks/ca4245414d8ecd217f9d.js +0 -1
  680. package/assets/esri/core/workers/chunks/cc479daacd2cf715baa8.js +0 -1
  681. package/assets/esri/core/workers/chunks/ce0e627a5e1cb78adce8.js +0 -1
  682. package/assets/esri/core/workers/chunks/cf7acf5acb6d322fd996.js +0 -1
  683. package/assets/esri/core/workers/chunks/d3af51a6d9014ff46170.js +0 -1
  684. package/assets/esri/core/workers/chunks/d561dc933d8fe1672d85.js +0 -1
  685. package/assets/esri/core/workers/chunks/d81291dac1932350eccd.js +0 -1
  686. package/assets/esri/core/workers/chunks/da3c54e27a808f4fcc18.js +0 -1
  687. package/assets/esri/core/workers/chunks/dc6d50e1097a920ff820.js +0 -1
  688. package/assets/esri/core/workers/chunks/dd58286dde3b20356f84.js +0 -1
  689. package/assets/esri/core/workers/chunks/dfeddb7b17fa9eaae64c.js +0 -1
  690. package/assets/esri/core/workers/chunks/e38836bfcc7a15a2fd1f.js +0 -1
  691. package/assets/esri/core/workers/chunks/e4e0c5a45cf32973d5d5.js +0 -1
  692. package/assets/esri/core/workers/chunks/e638391801ad83fe4a68.js +0 -1
  693. package/assets/esri/core/workers/chunks/e645f992ec6f935ee3a5.js +0 -1
  694. package/assets/esri/core/workers/chunks/e755477dc78e9d6038d4.js +0 -1
  695. package/assets/esri/core/workers/chunks/e7712467db46e1385cf4.js +0 -1
  696. package/assets/esri/core/workers/chunks/e9dcc3e9dbafe9bbed84.js +0 -1
  697. package/assets/esri/core/workers/chunks/ea8f642b1db933d2c26f.js +0 -1
  698. package/assets/esri/core/workers/chunks/eabd4a78221b7e733793.js +0 -1
  699. package/assets/esri/core/workers/chunks/ed2cb60e4f17f46fb78d.js +0 -1
  700. package/assets/esri/core/workers/chunks/edb55329305becdb204f.js +0 -1
  701. package/assets/esri/core/workers/chunks/eedee0af459e6b8a6116.js +0 -1
  702. package/assets/esri/core/workers/chunks/f05932aea4eb267cba4d.js +0 -1
  703. package/assets/esri/core/workers/chunks/f1fb2f12371f4c562079.js +0 -1
  704. package/assets/esri/core/workers/chunks/f3dfe1bd1146a6927407.js +0 -1
  705. package/assets/esri/core/workers/chunks/f79bd469b25099a31274.js +0 -1
  706. package/assets/esri/core/workers/chunks/ff48334528d2554db4fe.js +0 -1
  707. package/views/3d/analysis/LineOfSight/LineOfSightAuthoringStore.js +0 -2
  708. /package/assets/esri/core/workers/chunks/{50dc9893e13396f5e35d.js.LICENSE.txt → 62e77e3c5ca9b4887923.js.LICENSE.txt} +0 -0
  709. /package/assets/esri/core/workers/chunks/{319ff04282dc8ae38b56.js.LICENSE.txt → 68f9b2da1fd08785320f.js.LICENSE.txt} +0 -0
  710. /package/assets/esri/core/workers/chunks/{c216cd5d6b5d4fe4bab3.js.LICENSE.txt → 9629601de5e44ffe90ea.js.LICENSE.txt} +0 -0
  711. /package/assets/esri/core/workers/chunks/{8244b74e9c3a30d8d2f6.js.LICENSE.txt → d9d4754062758789f186.js.LICENSE.txt} +0 -0
  712. /package/assets/esri/core/workers/chunks/{d1ccc5f2d8892328ab01.js.LICENSE.txt → f5731ad4cfbbf1cc569a.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../core/Collection.js";import"../../../../core/has.js";import{mapCollection as i}from"../../../../core/mapCollectionUtils.js";import{destroyMaybe as o,removeMaybe as s}from"../../../../core/maybe.js";import{watch as n,sync as l,initial as r}from"../../../../core/reactiveUtils.js";import{property as a,subclass as p}from"../../../../core/accessorSupport/decorators.js";import{ViewshedInteractionVisuals as c}from"./ViewshedInteractionVisuals.js";import{ViewshedObserverManipulatedObject3D as d}from"./ViewshedObserverManipulatedObject3D.js";import{ViewshedSnappingController as u}from"./ViewshedSnappingController.js";import{ViewshedSubTool as h}from"./ViewshedSubTool.js";import{findSubTool as b}from"./viewshedSubToolUtils.js";import{connectTooltipToManipulatedObject as v}from"../../interactive/editingTools/tooltipUtils3D.js";import{InteractiveToolBase as T}from"../../../interactive/InteractiveToolBase.js";import{sketchKeys as _}from"../../../interactive/keybindings.js";import g from"../../../interactive/sketch/SketchOptions.js";import{enterInputModeIfAvailable as m,makeTooltip as w}from"../../../interactive/tooltip/tooltipCommonUtils.js";import{MovePointTooltipInfo as V}from"../../../interactive/tooltip/infos/MovePointTooltipInfo.js";let y=class extends T{constructor(e){super(e),this.subToolHandles=new t,this.removeIncompleteOnCancel=!1,this.automaticManipulatorSelection=!1,this.creating=!1,this.isPlacingTarget=!1,this._selectedManipulator=null,this._observerTooltipSketchOptions=new g({tooltips:{enabled:!0}}),this._observerTooltipConnectionHandle=null,this._observerTooltipObject=null}initialize(){const{view:e}=this;this._interactionVisuals=new c({view:e}),this._snappingController=new u({view:e}),this._initializeObserverTooltip(e);const t=this.analysisViewData.viewshedComputedDataHandles;this.subToolHandles=i(()=>t,({viewshedComputedData:e})=>{const t=new h({analysis:this.analysis,analysisViewData:this.analysisViewData,parentTool:this,view:this.view,viewshedComputedData:e});return{subTool:t,remove:()=>{this.selectedViewshed===e.viewshed&&(this.selectedViewshed=null),t.destroy()}}}),this.addHandles([n(()=>this.firstGrabbedManipulator,e=>{if(null!=e){const t=this._findSubTool(e)?.viewshed;this.selectedViewshed=t,this._selectManipulator(e)}else this._selectedSubTool?.onManipulatorSelectionChanged()},l),n(()=>{const e=this.selectedViewshedComputedData;return null==e?null:{subTool:this._selectedSubTool,observer:e.elevationAlignedObserverRenderSpace,target:e.elevationAlignedTargetRenderSpace}},e=>{if(null==e)return;const{subTool:t,observer:i,target:o}=e;t?.moveInteractionState.dragging?this._updateInteractionVisualsLocation(i,!0):t?.scaleOrientInteractionState.dragging&&this._updateInteractionVisualsLocation(o,!1)},r),n(()=>this.analysisViewData.visible,()=>this.updateInteractionVisualsVisibility(),r),n(()=>this.selectedViewshed,e=>{const t=this._selectedManipulator,i=this._selectedSubTool;this._connectObserverTooltip(i),null==e?this._selectManipulator(null):null!=t&&i.hasManipulator(t)||this._selectManipulator(i.discManipulator)},r)])}destroy(){this._selectManipulator(null),this._disconnectObserverTooltip(),o(this.subToolHandles),o(this._interactionVisuals),o(this._snappingController),o(this._observerTooltip)}get updating(){return this.subToolHandles.some(({subTool:e})=>e.updating)||this._snappingController?.updating}get grabbing(){return this.subToolHandles.some(({subTool:e})=>e.grabbing)}get cursor(){return null}get selectedViewshed(){return this.analysisViewData.selectedViewshed}set selectedViewshed(e){this.analysisViewData.selectedViewshed=e}get selectedViewshedComputedData(){return this._selectedSubTool?.viewshedComputedData}onManipulatorSelectionChanged(){this.subToolHandles.forEach(({subTool:e})=>e.onManipulatorSelectionChanged())}updateInteractionVisualsVisibility(e=!1){const t=this._selectedSubTool,i=this.selectedViewshedComputedData;if(null==t||null==i)return void this._interactionVisuals?.setVisibility(!1);const o=t.moveInteractionState,s=e?o.grabbing:o.dragging,n=t.scaleOrientInteractionState,l=e?n.grabbing:n.dragging;if(!(this.analysisViewData.visible&&(s||l)))return void this._interactionVisuals?.setVisibility(!1);const r=s?i.elevationAlignedObserverRenderSpace:i.elevationAlignedTargetRenderSpace;this._interactionVisuals?.update({location:r,laserlineVisible:!0,verticalLineVisible:s,intersectsWorldUp:s})}createObserverMoveSnappingPipeline(e,t,i){return this._snappingController.createObserverMoveSnappingPipeline(e,t,i)}onActivate(){this.updateInteractionVisualsVisibility()}onDeactivate(){this.updateInteractionVisualsVisibility()}onInputEvent(e){if(!this.destroyed&&!m(e,this._observerTooltip))switch(e.type){case"key-down":this._onKeyDown(e);break;case"hold":this.updateInteractionVisualsVisibility(!0)}}_updateInteractionVisualsLocation(e,t){this._interactionVisuals?.updateLocation(e,t)}_initializeObserverTooltip(e){const t=this._observerTooltipSketchOptions;this._observerTooltip=w(()=>({view:e,options:t.tooltips})),this._observerTooltipInfo=new V({sketchOptions:t,viewType:e.type})}_connectObserverTooltip(e){if(this._disconnectObserverTooltip(),null==e)return void this._observerTooltip.clear();const t=new d({view:this.view,subTool:e});this._observerTooltipObject=t,this._observerTooltipConnectionHandle=v(this._observerTooltip,t,()=>({sketchOptions:this._observerTooltipSketchOptions,activeTooltipInfo:this._observerTooltipInfo,callbacks:{onBeforeUpdate:()=>this.updateInteractionVisualsVisibility(),onMoveStart:()=>{},onMove:()=>{},onMoveStop:()=>{},onRotateStart:()=>{},onRotate:()=>{},onRotateStop:()=>{},onScaleStart:()=>{},onScale:()=>{},onScaleStop:()=>{}}}))}_disconnectObserverTooltip(){this._observerTooltipConnectionHandle=s(this._observerTooltipConnectionHandle),this._observerTooltipObject=o(this._observerTooltipObject)}_onKeyDown(e){_.cancel===e.key&&(this.grabbing||(this.selectedViewshed=null,e.stopPropagation()))}get _selectedSubTool(){return this._findSubTool(this.selectedViewshed)}_findSubTool(e){return b(this.subToolHandles,e)}_selectManipulator(e){const t=this._selectedManipulator;t!==e&&(this._selectedManipulator=e,null!=t&&(t.selected=!1),null!=e&&(e.selected=!0),this._findSubTool(t)?.onManipulatorSelectionChanged(),this._selectedSubTool?.onManipulatorSelectionChanged())}get test(){}};e([a({constructOnly:!0})],y.prototype,"analysis",void 0),e([a({constructOnly:!0})],y.prototype,"analysisViewData",void 0),e([a({constructOnly:!0})],y.prototype,"view",void 0),e([a()],y.prototype,"subToolHandles",void 0),e([a()],y.prototype,"removeIncompleteOnCancel",void 0),e([a()],y.prototype,"automaticManipulatorSelection",void 0),e([a()],y.prototype,"creating",void 0),e([a()],y.prototype,"isPlacingTarget",void 0),e([a()],y.prototype,"_selectedManipulator",void 0),e([a()],y.prototype,"_interactionVisuals",void 0),e([a()],y.prototype,"_snappingController",void 0),e([a()],y.prototype,"_observerTooltip",void 0),e([a()],y.prototype,"_observerTooltipInfo",void 0),e([a()],y.prototype,"updating",null),e([a()],y.prototype,"grabbing",null),e([a()],y.prototype,"cursor",null),e([a()],y.prototype,"selectedViewshed",null),e([a()],y.prototype,"selectedViewshedComputedData",null),e([a()],y.prototype,"_selectedSubTool",null),y=e([p("esri.views.3d.analysis.Viewshed.ViewshedEditTool")],y);export{y as ViewshedEditTool};
2
+ import{__decorate as e}from"tslib";import t from"../../../../core/Collection.js";import"../../../../core/has.js";import{mapCollection as i}from"../../../../core/mapCollectionUtils.js";import{destroyMaybe as o,removeMaybe as s}from"../../../../core/maybe.js";import{watch as n,sync as l,initial as r}from"../../../../core/reactiveUtils.js";import{property as a,subclass as p}from"../../../../core/accessorSupport/decorators.js";import{ViewshedInteractionVisuals as c}from"./ViewshedInteractionVisuals.js";import{ViewshedObserverManipulatedObject3D as d}from"./ViewshedObserverManipulatedObject3D.js";import{ViewshedSnappingController as u}from"./ViewshedSnappingController.js";import{ViewshedSubTool as h}from"./ViewshedSubTool.js";import{findSubTool as b}from"./viewshedSubToolUtils.js";import{connectTooltipToManipulatedObject as v}from"../../interactive/editingTools/tooltipUtils3D.js";import{InteractiveToolBase as _}from"../../../interactive/InteractiveToolBase.js";import{sketchKeys as T}from"../../../interactive/keybindings.js";import g from"../../../interactive/sketch/SketchOptions.js";import{enterInputModeIfAvailable as m,makeTooltip as w}from"../../../interactive/tooltip/tooltipCommonUtils.js";import{MovePointTooltipInfo as y}from"../../../interactive/tooltip/infos/MovePointTooltipInfo.js";let V=class extends _{constructor(e){super(e),this.subToolHandles=new t,this.removeIncompleteOnCancel=!1,this.automaticManipulatorSelection=!1,this.creating=!1,this.isPlacingTarget=!1,this._selectedManipulator=null,this._observerTooltipSketchOptions=new g({tooltips:{enabled:!0}}),this._observerTooltipConnectionHandle=null,this._observerTooltipObject=null}initialize(){const{view:e}=this;this._interactionVisuals=new c({view:e}),this._snappingController=new u({view:e}),this._initializeObserverTooltip(e);const t=this.analysisViewData.viewshedComputedDataHandles;this.subToolHandles=i(()=>t,({viewshedComputedData:e})=>{const t=new h({analysis:this.analysis,analysisViewData:this.analysisViewData,parentTool:this,view:this.view,viewshedComputedData:e});return{subTool:t,remove:()=>{this.selectedViewshed===e.viewshed&&(this.selectedViewshed=null),t.destroy()}}}),this.addHandles([n(()=>this.firstGrabbedManipulator,e=>{if(null!=e){const t=this._findSubTool(e)?.viewshed;this.selectedViewshed=t,this._selectManipulator(e)}else this._selectedSubTool?.onManipulatorSelectionChanged()},l),n(()=>{const e=this.selectedViewshedComputedData;return null==e?null:{subTool:this._selectedSubTool,observer:e.elevationAlignedObserverRenderSpace,target:e.elevationAlignedTargetRenderSpace}},e=>{if(null==e)return;const{subTool:t,observer:i,target:o}=e;t?.moveInteractionState.dragging?this._updateInteractionVisualsLocation(i,!0):t?.scaleOrientInteractionState.dragging&&this._updateInteractionVisualsLocation(o,!1)},r),n(()=>this.analysisViewData.visible,()=>this.updateInteractionVisualsVisibility(),r),n(()=>this.selectedViewshed,e=>{const t=this._selectedManipulator,i=this._selectedSubTool;this._connectObserverTooltip(i),null==e?this._selectManipulator(null):null!=t&&i.hasManipulator(t)||this._selectManipulator(i.discManipulator)},r)])}destroy(){this._selectManipulator(null),this._disconnectObserverTooltip(),o(this.subToolHandles),o(this._interactionVisuals),o(this._snappingController),o(this._observerTooltip)}get updating(){return this.subToolHandles.some(({subTool:e})=>e.updating)||this._snappingController?.updating}get grabbing(){return this.subToolHandles.some(({subTool:e})=>e.grabbing)}get cursor(){return null}get selectedViewshed(){return this.analysisViewData.selectedViewshed}set selectedViewshed(e){this.analysisViewData.selectedViewshed=e}get selectedViewshedComputedData(){return this._selectedSubTool?.viewshedComputedData}onManipulatorSelectionChanged(){this.subToolHandles.forEach(({subTool:e})=>e.onManipulatorSelectionChanged())}updateInteractionVisualsVisibility(e=!1){const t=this._selectedSubTool,i=this.selectedViewshedComputedData;if(null==t||null==i)return void this._interactionVisuals?.setVisibility(!1);const o=t.moveInteractionState,s=e?o.grabbing:o.dragging,n=t.scaleOrientInteractionState,l=e?n.grabbing:n.dragging;if(!(this.analysisViewData.visible&&(s||l)))return void this._interactionVisuals?.setVisibility(!1);const r=s?i.elevationAlignedObserverRenderSpace:i.elevationAlignedTargetRenderSpace;this._interactionVisuals?.update({location:r,laserlineVisible:!0,verticalLineVisible:s,intersectsWorldUp:s})}createObserverMoveSnappingPipeline(e,t,i){return this._snappingController.createObserverMoveSnappingPipeline(e,t,i)}onActivate(){this.updateInteractionVisualsVisibility()}onDeactivate(){this.updateInteractionVisualsVisibility()}onInputEvent(e){if(!this.destroyed&&!m(e,this._observerTooltip))switch(e.type){case"key-down":T.cancel===e.key?this._cancelKeyHandler(e):T.delete.includes(e.key)&&this._deleteKeyHandler(e);break;case"hold":this.updateInteractionVisualsVisibility(!0)}}_updateInteractionVisualsLocation(e,t){this._interactionVisuals?.updateLocation(e,t)}_initializeObserverTooltip(e){const t=this._observerTooltipSketchOptions;this._observerTooltip=w(()=>({view:e,options:t.tooltips})),this._observerTooltipInfo=new y({sketchOptions:t,viewType:e.type})}_connectObserverTooltip(e){if(this._disconnectObserverTooltip(),null==e)return void this._observerTooltip.clear();const t=new d({view:this.view,subTool:e});this._observerTooltipObject=t,this._observerTooltipConnectionHandle=v(this._observerTooltip,t,()=>({sketchOptions:this._observerTooltipSketchOptions,activeTooltipInfo:this._observerTooltipInfo,callbacks:{onBeforeUpdate:()=>this.updateInteractionVisualsVisibility(),onMoveStart:()=>{},onMove:()=>{},onMoveStop:()=>{},onRotateStart:()=>{},onRotate:()=>{},onRotateStop:()=>{},onScaleStart:()=>{},onScale:()=>{},onScaleStop:()=>{}}}))}_disconnectObserverTooltip(){this._observerTooltipConnectionHandle=s(this._observerTooltipConnectionHandle),this._observerTooltipObject=o(this._observerTooltipObject)}_cancelKeyHandler(e){this.grabbing||(this.selectedViewshed=null,e.stopPropagation())}_deleteKeyHandler(e){const t=this.selectedViewshed;null!=t&&(this.analysis.viewsheds.remove(t),e.stopPropagation())}get _selectedSubTool(){return this._findSubTool(this.selectedViewshed)}_findSubTool(e){return b(this.subToolHandles,e)}_selectManipulator(e){const t=this._selectedManipulator;t!==e&&(this._selectedManipulator=e,null!=t&&(t.selected=!1),null!=e&&(e.selected=!0),this._findSubTool(t)?.onManipulatorSelectionChanged(),this._selectedSubTool?.onManipulatorSelectionChanged())}get test(){}};e([a({constructOnly:!0})],V.prototype,"analysis",void 0),e([a({constructOnly:!0})],V.prototype,"analysisViewData",void 0),e([a({constructOnly:!0})],V.prototype,"view",void 0),e([a()],V.prototype,"subToolHandles",void 0),e([a()],V.prototype,"removeIncompleteOnCancel",void 0),e([a()],V.prototype,"automaticManipulatorSelection",void 0),e([a()],V.prototype,"creating",void 0),e([a()],V.prototype,"isPlacingTarget",void 0),e([a()],V.prototype,"_selectedManipulator",void 0),e([a()],V.prototype,"_interactionVisuals",void 0),e([a()],V.prototype,"_snappingController",void 0),e([a()],V.prototype,"_observerTooltip",void 0),e([a()],V.prototype,"_observerTooltipInfo",void 0),e([a()],V.prototype,"updating",null),e([a()],V.prototype,"grabbing",null),e([a()],V.prototype,"cursor",null),e([a()],V.prototype,"selectedViewshed",null),e([a()],V.prototype,"selectedViewshedComputedData",null),e([a()],V.prototype,"_selectedSubTool",null),V=e([p("esri.views.3d.analysis.Viewshed.ViewshedEditTool")],V);export{V as ViewshedEditTool};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../analysis/Viewshed.js";import i from"../../../../core/Accessor.js";import"../../../../core/has.js";import{createAbortError as a,throwIfAborted as o,onAbort as s}from"../../../../core/promiseUtils.js";import{watch as n,sync as r}from"../../../../core/reactiveUtils.js";import{getMetersPerVerticalUnitForSR as l}from"../../../../core/units.js";import{property as c,subclass as h}from"../../../../core/accessorSupport/decorators.js";import{createDrawTool as d,createPlacementResult as p}from"./placementUtils.js";import{detachToolFromView as m}from"./toolLifecycleUtils.js";import{creationVerticalOffset as _}from"./ViewshedConfiguration.js";import u from"./ViewshedPlacementOperation.js";import{createViewshedPlacementRootPluginConfiguration as w}from"./ViewshedPlacementRootPlugin.js";import{computeParametersFromTargetPoint as v}from"./viewshedToolUtils.js";import{DrawManipulator3D as P}from"../../../draw/DrawManipulator3D.js";import{ViewEventPriorities as g}from"../../../input/InputManager.js";import{sketchKeys as y}from"../../../interactive/keybindings.js";import O from"../../../interactive/sketch/SketchOptions.js";const b="multiple",C=new O({tooltips:{enabled:!0}}),T=Symbol("hiddenManipulatorHandle");let f=class extends i{constructor(e){super(e),this.placementMode=b,this.creationState=null,this.stagedViewshed=null,this._placeOperation=null,this._drawTool=null,this._renderer=null}initialize(){this.addHandles([this.view.on("key-down",e=>this._handleKeyDown(e),g.DEFAULT),n(()=>{const{stagedViewshed:e}=this;return{stagedViewshed:e,stagedViewshedInAnalysis:null!=e&&this.analysis.viewsheds.includes(e)}},({stagedViewshed:e,stagedViewshedInAnalysis:t})=>{null==e||t||this.analysis.viewsheds.add(e)},r)])}destroy(){this._cancelPlacementOperation()}get updating(){return!!this._drawTool?.updating}get active(){return!!this._drawTool?.active}startPlaceOperation(e,t){this._removeStaged(),this.creationState=null,this._rejectPlaceOperation(a()),o(t);const{resolve:i,reject:n,promise:r}=Promise.withResolvers(),l=s(t,()=>this._cancelPlacementOperation());return this._placeOperation=new u({abortHandle:l,reject:n,resolve:i}),this.place(e),r}place(e){this.callbacks.setSelectedViewshed(null),this.placementMode=e,this._startObserverPlacement()}cancelPlaceOperation(){null==this.creationState&&null==this._placeOperation||(this._cancelPlacementOperation(),this.callbacks.cancelTool())}_handleDeleteDuringCreation(){return null!=this.creationState&&(this._destroyDrawTool(),this._removeStaged(),this.callbacks.setSelectedViewshed(null),this._startObserverPlacement(),!0)}_handleKeyDown(e){null!=this.creationState&&(y.cancel===e.key?(this._handleCancelDuringCreation(),e.stopPropagation(),e.preventDefault()):y.delete.includes(e.key)&&(this._handleDeleteDuringCreation(),e.stopPropagation(),e.preventDefault()))}_handleCancelDuringCreation(){if(this._removeStaged()&&"multiple"===this.placementMode)return this.callbacks.setSelectedViewshed(null),void this._startObserverPlacement();this._destroyDrawTool(),this._abortCreation()}_removeStaged(){const{stagedViewshed:e}=this;return this.stagedViewshed=null,!!e&&(this.analysis.viewsheds.remove(e),!0)}_cancelPlacementOperation(){this._destroyDrawTool(),this._removeStaged(),this.creationState=null,this._finishPlaceOperation()}_abortCreation(){this.callbacks.cancelTool(),this.creationState=null,this._finishPlaceOperation()}_handleObserverPlacementComplete(e){const i=l(e.mapPoint.spatialReference);e.mapPoint.z=(e.mapPoint.z??0)+_/i;const a=new t({observer:e.mapPoint.clone(),feature:e.feature});this.analysis.viewsheds.add(a),this.stagedViewshed=a,this.creationState="placing-target",this._updateStagedViewshed(e.scenePoint),this.callbacks.setSelectedViewshed(null)}_onCancel(e){const t=this._removeStaged();return"placing-observer"===this.creationState?t&&"multiple"===this.placementMode?(this.callbacks.setSelectedViewshed(null),void this._startObserverPlacement()):(this._destroyDrawTool(e),void this._abortCreation()):t?(this.creationState="placing-observer",this.callbacks.setSelectedViewshed(null),void("multiple"!==this.placementMode?(this._destroyDrawTool(e),this._abortCreation()):this._startPointPlacement())):(this._destroyDrawTool(e),void this._abortCreation())}_handleTargetPlacementComplete(e){this._updateStagedViewshed(e.scenePoint);const t=this.stagedViewshed;this._placeOperation?.markPlacedViewshed(),this.stagedViewshed=null,this.callbacks.setSelectedViewshed(t),"multiple"!==this.placementMode||(this.creationState="placing-observer")}_handleTargetPlacementPreview(e){this._updateStagedViewshed(e.scenePoint)}_resolvePlaceOperation(){this._clearPlaceOperationAndRun(e=>e?.resolve())}_finishPlaceOperation(){this._clearPlaceOperationAndRun(e=>e?.finish())}_rejectPlaceOperation(e){this._clearPlaceOperationAndRun(t=>t?.reject(e))}_clearPlaceOperationAndRun(e){const t=this._placeOperation;this._placeOperation=null,e(t)}_startObserverPlacement(){this.creationState="placing-observer",this._startPointPlacement()}_startPointPlacement(){this._drawTool&&this._destroyDrawTool(this._drawTool);const{drawTool:e,intersector:t,renderer:i}=d({analysisViewData:this.analysisViewData,view:this.view,sketchOptions:C,onCancel:e=>this._onCancel(e),onComplete:e=>this._onComplete(e),onManipulatorCountChange:e=>this._onManipulatorCountChange(e),isPlacingObserver:()=>"placing-observer"===this.creationState});this._drawTool=e,this._renderer=i;try{this.view.addAndActivateTool(e),e.begin([w({mode:this.placementMode,onObserverComplete:i=>this._onObserverMapPointComplete(e,t,i),onTargetComplete:i=>this._onTargetMapPointComplete(e,t,i),onTargetPreview:i=>this._onTargetMapPointPreview(e,t,i)})])}catch(a){this._destroyDrawTool(e),this._rejectPlaceOperation(a instanceof Error?a:new Error(String(a)))}}_onComplete(e){this._removeStaged(),this._resolvePlaceOperation(),this._destroyDrawTool(e),this.creationState=null}_onObserverMapPointComplete(e,t,i){const a=p({drawTool:e,intersector:t,mapPoint:i,view:this.view});a?(this._renderer?.updatePlacementLocation(a.scenePoint),this._handleObserverPlacementComplete(a)):this._onCancel(e)}_onTargetMapPointComplete(e,t,i){const a=p({drawTool:e,intersector:t,mapPoint:i,view:this.view});a?(this._renderer?.updatePlacementLocation(a.scenePoint),this._handleTargetPlacementComplete(a),"multiple"===this.placementMode&&this._renderer?.updatePlacementLocation(null)):this._onCancel(e)}_onTargetMapPointPreview(e,t,i){const a=p({drawTool:e,intersector:t,mapPoint:i,view:this.view});a&&(this._renderer?.updatePlacementLocation(a.scenePoint),this._handleTargetPlacementPreview(a))}_onManipulatorCountChange(e){e.removeHandles(T);const t=[];e.manipulators.forEach(({manipulator:e})=>{e instanceof P&&t.push(e.disableDisplay())}),e.addHandles(t,T)}_destroyDrawTool(e=this._drawTool){this._drawTool=null,this._renderer=null,e&&m(this.view,e)}_updateStagedViewshed(e){const t=this.stagedViewshed;if(!t)return;const i=this.callbacks.findViewshedComputedData(t);if(!i)return;const{heading:a,tilt:o,farDistance:s}=v(this.view,i,e);t.farDistance=s,t.tilt=o,t.heading=a}get test(){}};e([c({constructOnly:!0})],f.prototype,"analysis",void 0),e([c({constructOnly:!0})],f.prototype,"analysisViewData",void 0),e([c({constructOnly:!0})],f.prototype,"view",void 0),e([c({constructOnly:!0})],f.prototype,"callbacks",void 0),e([c()],f.prototype,"placementMode",void 0),e([c()],f.prototype,"creationState",void 0),e([c()],f.prototype,"stagedViewshed",void 0),e([c()],f.prototype,"_placeOperation",void 0),e([c()],f.prototype,"_drawTool",void 0),e([c()],f.prototype,"_renderer",void 0),e([c()],f.prototype,"updating",null),e([c()],f.prototype,"active",null),f=e([h("esri.views.3d.analysis.Viewshed.ViewshedPlacementController")],f);export{f as ViewshedPlacementController};
2
+ import{__decorate as e}from"tslib";import t from"../../../../analysis/Viewshed.js";import i from"../../../../core/Accessor.js";import"../../../../core/has.js";import{createAbortError as a,throwIfAborted as s,onAbort as o}from"../../../../core/promiseUtils.js";import{watch as n,sync as r}from"../../../../core/reactiveUtils.js";import{getMetersPerVerticalUnitForSR as l}from"../../../../core/units.js";import{property as c,subclass as h}from"../../../../core/accessorSupport/decorators.js";import{createDrawTool as d,createPlacementResult as p}from"./placementUtils.js";import{detachToolFromView as m}from"./toolLifecycleUtils.js";import{creationVerticalOffset as _}from"./ViewshedConfiguration.js";import u from"./ViewshedPlacementOperation.js";import{createViewshedPlacementRootPluginConfiguration as w}from"./ViewshedPlacementRootPlugin.js";import{computeParametersFromTargetPoint as v}from"./viewshedToolUtils.js";import{DrawManipulator3D as P}from"../../../draw/DrawManipulator3D.js";import{ViewEventPriorities as g}from"../../../input/InputManager.js";import{sketchKeys as y}from"../../../interactive/keybindings.js";import O from"../../../interactive/sketch/SketchOptions.js";const b="multiple",S=Symbol("hiddenManipulatorHandle");let C=class extends i{constructor(e){super(e),this.placementMode=b,this.stagedViewshed=null,this._placeOperation=null,this._drawTool=null,this._renderer=null,this._sketchOptions=new O({tooltips:{enabled:!1}})}initialize(){this.addHandles([this.view.on("key-down",e=>this._handleKeyDown(e),g.DEFAULT),n(()=>{const{stagedViewshed:e}=this;return{stagedViewshed:e,stagedViewshedInAnalysis:null!=e&&this.analysis.viewsheds.includes(e)}},({stagedViewshed:e,stagedViewshedInAnalysis:t})=>{null==e||t||this.analysis.viewsheds.add(e)},r)])}destroy(){this._cancelPlacementOperation()}get updating(){return!!this._drawTool?.updating}get active(){return!!this._drawTool?.active}get creationState(){return this._get("creationState")}set creationState(e){this._set("creationState",e),this._sketchOptions.tooltips.enabled="placing-observer"===e}startPlaceOperation(e,t){this._removeStaged(),this.creationState=null,this._rejectPlaceOperation(a()),s(t);const{resolve:i,reject:n,promise:r}=Promise.withResolvers(),l=o(t,()=>this._cancelPlacementOperation());return this._placeOperation=new u({abortHandle:l,reject:n,resolve:i}),this.place(e),r}place(e){this.callbacks.setSelectedViewshed(null),this.placementMode=e,this._startObserverPlacement()}cancelPlaceOperation(){null==this.creationState&&null==this._placeOperation||(this._cancelPlacementOperation(),this.callbacks.cancelTool())}_handleDeleteDuringCreation(){return null!=this.creationState&&(this._destroyDrawTool(),this._removeStaged(),this.callbacks.setSelectedViewshed(null),this._startObserverPlacement(),!0)}_handleKeyDown(e){null!=this.creationState&&(y.cancel===e.key?(this._handleCancelDuringCreation(),e.stopPropagation(),e.preventDefault()):y.delete.includes(e.key)&&(this._handleDeleteDuringCreation(),e.stopPropagation(),e.preventDefault()))}_handleCancelDuringCreation(){if(this._removeStaged()&&"multiple"===this.placementMode)return this.callbacks.setSelectedViewshed(null),void this._startObserverPlacement();this._destroyDrawTool(),this._abortCreation()}_removeStaged(){const{stagedViewshed:e}=this;return this.stagedViewshed=null,!!e&&(this.analysis.viewsheds.remove(e),!0)}_cancelPlacementOperation(){this._destroyDrawTool(),this._removeStaged(),this.creationState=null,this._finishPlaceOperation()}_abortCreation(){this.callbacks.cancelTool(),this.creationState=null,this._finishPlaceOperation()}_handleObserverPlacementComplete(e){const i=l(e.mapPoint.spatialReference);e.mapPoint.z=(e.mapPoint.z??0)+_/i;const a=new t({observer:e.mapPoint.clone(),feature:e.feature});this.analysis.viewsheds.add(a),this.stagedViewshed=a,this.creationState="placing-target",this._updateStagedViewshed(e.scenePoint),this.callbacks.setSelectedViewshed(null)}_onCancel(e){const t=this._removeStaged();return"placing-observer"===this.creationState?t&&"multiple"===this.placementMode?(this.callbacks.setSelectedViewshed(null),void this._startObserverPlacement()):(this._destroyDrawTool(e),void this._abortCreation()):t?(this.creationState="placing-observer",this.callbacks.setSelectedViewshed(null),void("multiple"!==this.placementMode?(this._destroyDrawTool(e),this._abortCreation()):this._startPointPlacement())):(this._destroyDrawTool(e),void this._abortCreation())}_handleTargetPlacementComplete(e){this._updateStagedViewshed(e.scenePoint);const t=this.stagedViewshed;this._placeOperation?.markPlacedViewshed(),this.stagedViewshed=null,this.callbacks.setSelectedViewshed(t),"multiple"!==this.placementMode||(this.creationState="placing-observer")}_handleTargetPlacementPreview(e){this._updateStagedViewshed(e.scenePoint)}_resolvePlaceOperation(){this._clearPlaceOperationAndRun(e=>e?.resolve())}_finishPlaceOperation(){this._clearPlaceOperationAndRun(e=>e?.finish())}_rejectPlaceOperation(e){this._clearPlaceOperationAndRun(t=>t?.reject(e))}_clearPlaceOperationAndRun(e){const t=this._placeOperation;this._placeOperation=null,e(t)}_startObserverPlacement(){this.creationState="placing-observer",this._startPointPlacement()}_startPointPlacement(){this._drawTool&&this._destroyDrawTool(this._drawTool);const{drawTool:e,intersector:t,renderer:i}=d({analysisViewData:this.analysisViewData,view:this.view,sketchOptions:this._sketchOptions,onCancel:e=>this._onCancel(e),onComplete:e=>this._onComplete(e),onManipulatorCountChange:e=>this._onManipulatorCountChange(e),isPlacingObserver:()=>"placing-observer"===this.creationState});this._drawTool=e,this._renderer=i;try{this.view.addAndActivateTool(e),e.begin([w({mode:this.placementMode,onObserverComplete:i=>this._onObserverMapPointComplete(e,t,i),onTargetComplete:i=>this._onTargetMapPointComplete(e,t,i),onTargetPreview:i=>this._onTargetMapPointPreview(e,t,i)})])}catch(a){this._destroyDrawTool(e),this._rejectPlaceOperation(a instanceof Error?a:new Error(String(a)))}}_onComplete(e){this._removeStaged(),this._resolvePlaceOperation(),this._destroyDrawTool(e),this.creationState=null}_onObserverMapPointComplete(e,t,i){const a=p({drawTool:e,intersector:t,mapPoint:i,view:this.view});a?(this._renderer?.updatePlacementLocation(a.scenePoint),this._handleObserverPlacementComplete(a)):this._onCancel(e)}_onTargetMapPointComplete(e,t,i){const a=p({drawTool:e,intersector:t,mapPoint:i,view:this.view});a?(this._renderer?.updatePlacementLocation(a.scenePoint),this._handleTargetPlacementComplete(a),"multiple"===this.placementMode&&this._renderer?.updatePlacementLocation(null)):this._onCancel(e)}_onTargetMapPointPreview(e,t,i){const a=p({drawTool:e,intersector:t,mapPoint:i,view:this.view});a&&(this._renderer?.updatePlacementLocation(a.scenePoint),this._handleTargetPlacementPreview(a))}_onManipulatorCountChange(e){e.removeHandles(S);const t=[];e.manipulators.forEach(({manipulator:e})=>{e instanceof P&&t.push(e.disableDisplay())}),e.addHandles(t,S)}_destroyDrawTool(e=this._drawTool){this._drawTool=null,this._renderer=null,e&&m(this.view,e)}_updateStagedViewshed(e){const t=this.stagedViewshed;if(!t)return;const i=this.callbacks.findViewshedComputedData(t);if(!i)return;const{heading:a,tilt:s,farDistance:o}=v(this.view,i,e);t.farDistance=o,t.tilt=s,t.heading=a}get test(){}};e([c({constructOnly:!0})],C.prototype,"analysis",void 0),e([c({constructOnly:!0})],C.prototype,"analysisViewData",void 0),e([c({constructOnly:!0})],C.prototype,"view",void 0),e([c({constructOnly:!0})],C.prototype,"callbacks",void 0),e([c()],C.prototype,"placementMode",void 0),e([c()],C.prototype,"stagedViewshed",void 0),e([c()],C.prototype,"_placeOperation",void 0),e([c()],C.prototype,"_drawTool",void 0),e([c()],C.prototype,"_renderer",void 0),e([c()],C.prototype,"_sketchOptions",void 0),e([c()],C.prototype,"updating",null),e([c()],C.prototype,"active",null),e([c({value:null})],C.prototype,"creationState",null),C=e([h("esri.views.3d.analysis.Viewshed.ViewshedPlacementController")],C);export{C as ViewshedPlacementController};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as n}from"tslib";import e from"../../../../core/Accessor.js";import{property as t,subclass as i}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as a}from"../../../../core/support/UpdatingHandles.js";import{absoluteHeightElevationInfo as p}from"../../../../support/elevationInfoUtils.js";import{SnappingVisualizer3D as r}from"../../interactive/SnappingVisualizer3D.js";import{SnappingContext as s}from"../../../interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as o}from"../../../interactive/snapping/SnappingDragPipelineStep.js";import{acquire as g}from"../../../interactive/snapping/SnappingManagerPool.js";let l=class extends e{constructor(n){super(n),this._updatingHandles=new a,this._snappingManagerResult=null}get updating(){return this._updatingHandles.updating||!!this._snappingManager?.updating}get _snappingManager(){return this._snappingManagerResult?.snappingManager}destroy(){this._updatingHandles.destroy()}createObserverMoveSnappingPipeline(n,e,t){if(0!==n)return null;const i=new s({elevationInfo:p,pointer:t,editGeometryOperations:e,visualizer:new r});return o({snappingContext:i,snappingManager:this._ensureSnappingManager(),updatingHandles:this._updatingHandles})}_ensureSnappingManager(){if(null==this._snappingManagerResult){const n=g(this.view);this._snappingManagerResult=n,this.addHandles(n)}return this._snappingManagerResult.snappingManager}};n([t({constructOnly:!0})],l.prototype,"view",void 0),n([t()],l.prototype,"updating",null),n([t()],l.prototype,"_snappingManager",null),n([t()],l.prototype,"_snappingManagerResult",void 0),l=n([i("esri.views.3d.analysis.Viewshed.ViewshedSnappingController")],l);export{l as ViewshedSnappingController};
2
+ import{__decorate as n}from"tslib";import e from"../../../../core/Accessor.js";import{property as t,subclass as i}from"../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as a}from"../../../../core/support/UpdatingHandles.js";import{absoluteHeightElevationInfo as p}from"../../../../support/elevationInfoUtils.js";import{SnappingVisualizer3D as r}from"../../interactive/SnappingVisualizer3D.js";import{SnappingContext as s}from"../../../interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as o}from"../../../interactive/snapping/SnappingDragPipelineStep.js";import{acquire as g}from"../../../interactive/snapping/SnappingManagerPool.js";let l=class extends e{constructor(n){super(n),this._updatingHandles=new a,this._snappingManagerResult=null}get updating(){return this._updatingHandles.updating||!!this._snappingManager?.updating}get _snappingManager(){return this._snappingManagerResult?.snappingManager}destroy(){this._updatingHandles.destroy()}createObserverMoveSnappingPipeline(n,e,t){if(0!==n)return null;const i=new s({elevationInfo:p,pointer:t,editGeometryOperations:e,visualizer:new r});return o({snappingContext:i,snappingManager:this._ensureSnappingManager(),updatingHandles:this._updatingHandles,useZ:!1})}_ensureSnappingManager(){if(null==this._snappingManagerResult){const n=g(this.view);this._snappingManagerResult=n,this.addHandles(n)}return this._snappingManagerResult.snappingManager}};n([t({constructOnly:!0})],l.prototype,"view",void 0),n([t()],l.prototype,"updating",null),n([t()],l.prototype,"_snappingManager",null),n([t()],l.prototype,"_snappingManagerResult",void 0),l=n([i("esri.views.3d.analysis.Viewshed.ViewshedSnappingController")],l);export{l as ViewshedSnappingController};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import i from"../../../../core/Accessor.js";import{isSome as t}from"../../../../core/arrayUtils.js";import{createTask as a}from"../../../../core/asyncUtils.js";import{cyclicalDegrees as n,Cyclical as o}from"../../../../core/Cyclical.js";import{handlesGroup as r}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import{deg2rad as s}from"../../../../core/mathUtils.js";import{abortMaybe as l,destroyMaybe as p}from"../../../../core/maybe.js";import{after as h,throwIfAborted as u}from"../../../../core/promiseUtils.js";import{watch as d,syncAndInitial as c,initial as v}from"../../../../core/reactiveUtils.js";import{property as g,subclass as m}from"../../../../core/accessorSupport/decorators.js";import{sub as f,len as b,dot as M}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{tryProject as w}from"../../../../geometry/projectionUtils.js";import{viewingModeFromString as O}from"../../../ViewingMode.js";import{viewshedToolManipulatorConfiguration as V}from"./ViewshedConfiguration.js";import{ViewshedFieldOfViewManipulation as y,isSideHorizontal as T,flipSide as D}from"./ViewshedFieldOfViewManipulation.js";import{ViewshedScaleOrientManipulation as H}from"./ViewshedScaleOrientManipulation.js";import{ViewshedObserverManipulator as S}from"./viewshedToolManipulatorUtils.js";import{discRadiusSmall as C}from"../../interactive/editingTools/manipulations/config.js";import{MoveManipulation as j}from"../../interactive/editingTools/manipulations/MoveManipulation.js";import{resetProperties as F,sceneSnappingAtLocation as x,dragManipulatedObject as A}from"../../../interactive/dragEventPipeline.js";import{EditGeometryOperations as P}from"../../../interactive/editGeometry/EditGeometryOperations.js";const k=Symbol("dragHandles"),E=Symbol("hideManipulators"),z=Symbol("hideFoVManipulators"),U=Symbol("hideObserverManipulator");let R=class extends i{constructor(e){super(e),this._moveManipulation=null,this._observerManipulator=null,this._fieldOfViewManipulation=null,this._scaleOrientManipulation=null,this._forceHoveringTask=null,this._forceHoveringTestPromise=null,this._grabbing=!1,this.viewshedComputedData=null}initialize(){this._moveManipulation=this._createMoveManipulation(),this._fieldOfViewManipulation=new y({view:this.view,tool:this.parentTool}),this._scaleOrientManipulation=new H({view:this.view,tool:this.parentTool}),this._observerManipulator=new S(this.view,this.parentTool),this.addHandles([d(()=>this.elevationAlignedObserverRenderSpace,e=>{null!=e&&(this._moveManipulation.renderLocation=e,this._observerManipulator.renderLocation=e)},c),d(()=>this.viewshedComputedData?.heading,e=>{e&&(this._moveManipulation.angle=s(90-e))},v),d(()=>{const{viewshedComputedData:e}=this;return{viewshedComputedData:e,observer:this.elevationAlignedObserverRenderSpace}},({viewshedComputedData:e,observer:i},a)=>{this._grabbing&&i!==a?.observer||(this.removeHandles(k),e?.valid&&this.addHandles([this._buildObserverDragPipeline(e),this._buildFOVDragPipeline(e),this._buildScaleOrientDragPipeline(e)].filter(t),k))},v),d(()=>{const e=this.viewshedComputedData;return e?.valid?{viewshedCompData:e,target:e.elevationAlignedTargetRenderSpace,hFOV:e.horizontalFieldOfView,vFOV:e.verticalFieldOfView}:null},e=>{null!=e&&this._fieldOfViewManipulation.updateManipulatorsTransform(e.viewshedCompData)},v),d(()=>{const e=this.viewshedComputedData;return e?.valid?{viewshedCompData:e,hFOV:e.horizontalFieldOfView,vFOV:e.verticalFieldOfView,tilt:e.tilt}:null},e=>{null!=e&&this._fieldOfViewManipulation.updateManipulatorVisuals(e.viewshedCompData)},v),d(()=>{const e=this.analysisViewData.visible&&(this.viewshedComputedData?.valid??!1),i=this.parentTool.selectedViewshedComputedData===this.viewshedComputedData,{creating:t,isPlacingTarget:a}=this.parentTool;return{fovManipulationAvailable:e&&!a,nonFOVManipulationAvailable:e&&(!t||i)}},({fovManipulationAvailable:e,nonFOVManipulationAvailable:i})=>{this._moveManipulation.available=i,this._scaleOrientManipulation.available=i,this._observerManipulator.available=i,this._fieldOfViewManipulation.available=e},v),d(()=>{const e=this.viewshedComputedData;if(!e?.valid)return null;const{observer:i,target:t,verticalFieldOfView:a,horizontalFieldOfView:n}=e;return{viewshedCompData:e,observer:i,target:t,verticalFieldOfView:a,horizontalFieldOfView:n}},e=>{null!=e&&this._scaleOrientManipulation.updateManipulators(e.viewshedCompData)},v)]);const e=e=>{this.addHandles([e.events.on("focus-changed",()=>{const e=this._someManipulatorHovering();e&&this.parentTool.subToolHandles.forEach(({subTool:e})=>{e._resetHoveringTask()}),this._someManipulatorSelected()||e||(this._forceHoveringTask=a(async e=>{await(this._forceHoveringTestPromise??h(V.hoverTimeoutMilliseconds,e)),u(e),this._forceHoveringTask=null,this._updateManipulatorVisibility()}))}),e.events.on("grab-changed",i=>{this._grabbing="start"===i.action,"end"===i.action&&this.parentTool.updateInteractionVisualsVisibility(),this.parentTool.subToolHandles.forEach(({subTool:e})=>{e!==this&&e._setInteractive(!this._grabbing)}),this._setInteractive(i=>i.hasManipulator(e)||!this._grabbing)}),e.events.on("drag",e=>{"start"===e.action&&this.parentTool.updateInteractionVisualsVisibility()})])};this._forEachManipulator(e)}destroy(){this._forceHoveringTask=l(this._forceHoveringTask),this._moveManipulation=p(this._moveManipulation),this._fieldOfViewManipulation=p(this._fieldOfViewManipulation),this._scaleOrientManipulation=p(this._scaleOrientManipulation),this.parentTool.manipulators.remove(this._observerManipulator),this._observerManipulator=p(this._observerManipulator)}get updating(){return null!=this._forceHoveringTask&&!this._forceHoveringTask.finished}get viewshed(){return this.viewshedComputedData?.viewshed}get grabbing(){return this._grabbing}get observer(){return this.viewshed?.observer}set observer(e){const i=this.viewshed;null!=i&&(i.observer=e)}get elevationAlignedObserverRenderSpace(){return this.viewshedComputedData?.elevationAlignedObserverRenderSpace}get discManipulator(){return this._moveManipulation.xyManipulation.discManipulator}get moveInteractionState(){const{dragging:e,grabbing:i}=this._moveManipulation;return{dragging:e,grabbing:i}}get scaleOrientInteractionState(){const{dragging:e,grabbing:i}=this._scaleOrientManipulation;return{dragging:e,grabbing:i}}_setInteractive(e){const i="boolean"==typeof e;this._forEachManipulation(t=>t.interactive=i?e:e(t))}onManipulatorSelectionChanged(){if(this._updateManipulatorVisibility(),!this._someManipulatorSelected()){this.analysisViewData.selectedViewshed===this.viewshed&&(this.analysisViewData.selectedViewshed=null),this._resetHoveringTask()}}hasManipulator(e){let i=!1;return this._forEachManipulator(t=>{i=i||t===e}),i}_someManipulatorSelected(){return this._moveManipulation.selected||this._fieldOfViewManipulation.selected||this._scaleOrientManipulation.selected}_someManipulatorHovering(){return this._moveManipulation.hovering||this._fieldOfViewManipulation.hovering||this._scaleOrientManipulation.hovering}_createMoveManipulation(){return new j({view:this.view,tool:this.parentTool,snapToScene:!1,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:!0,radius:C})}_buildObserverDragPipeline(e){const i={mode:"absolute-height",offset:0},t=e.observer;if(null==t)return null;const a=this.view.spatialReference;return this._moveManipulation.createDragPipeline((n,o,r,s,l)=>{s=s.next(F(this,["observer"]));const p=w(t,a),h=w(e.elevationAlignedObserver,a);if(null==p||null==h)return{steps:r,cancel:s};const u=P.fromGeometry(p,O(this.view.viewingMode)),d=P.fromGeometry(h,O(this.view.viewingMode)),c=this.parentTool.createObserverMoveSnappingPipeline?.(n,d,l);if(null!=c){const{snappingStep:e,cancelSnapping:t}=c,{coordinateHelper:a}=d.data;s=s.next(t);return{steps:r.next(e=>({...e,snapOrigin:a.pointToVector(h)})).next(x(this.view,i)).next(...e).next(A({operations:u})).next(e=>(this.observer=u.data.geometry,e)),cancel:s}}return{steps:r.next(A({operations:u})).next(e=>(this.observer=u.data.geometry,e)),cancel:s}},i,a,void 0)}_buildFOVDragPipeline(e){let i=0,t=0;return this._fieldOfViewManipulation.createDragPipeline((a,o,r)=>{if(null==e)return{steps:o,cancel:r};const s=e.viewshed;let l=null;r=r.next(F(s,["horizontalFieldOfView","verticalFieldOfView"]));return{steps:o.next(a=>{"start"===a.action&&(l=null,i=e.horizontalFieldOfView,t=e.verticalFieldOfView);const o=a.deltaAngle;if(null==l&&0!==o){const e="bottom"===a.side||"left"===a.side?o>0:o<0;l=T(a.side)?0===i&&e||360===i&&!e:0===t&&e}const r=l?D(a.side):a.side;let p=0;switch(r){case"left":p=i/2-o;break;case"right":p=i/2+o;break;case"top":p=t+2*o;break;case"bottom":p=t-2*o}return T(r)?(p=n.normalize(p),p=p>270?0:p>180?180:p,s.horizontalFieldOfView=2*p):s.verticalFieldOfView=p,a}),cancel:r}},e)}_buildScaleOrientDragPipeline(e){let i=0,t=0;const a=(i,t)=>(a,n,o)=>{if(null==e)return{steps:n,cancel:o};const r=e.viewshed;return o=o.next(F(r,[i])),{steps:n=n.next(t(r,e)),cancel:o}};return r([this._scaleOrientManipulation.createHeadingDragPipeline(a("heading",(i,a)=>a=>("start"===a.action&&(t=e.heading),i.heading=n.normalize(t+a.deltaAngle),a)),e),this._scaleOrientManipulation.createTiltDragPipeline(a("tilt",(t,a)=>a=>{"start"===a.action&&(i=e.tilt);let n=i+a.deltaAngle;return n<-90?n=180:n>270&&(n=0),t.tilt=G.clamp(n),a}),e),this._scaleOrientManipulation.createDistanceDragPipeline(a("farDistance",(e,i)=>t=>{const a=f(I,t.renderEnd,i.elevationAlignedObserverRenderSpace),n=b(a)*i.metersPerUnit,o=M(a,i.targetDirection)<0?V.scaleOrientMinDistance:n;return e.farDistance=o,t}),e)])}_updateManipulatorVisibility(){const e=this._someManipulatorSelected(),i=null!=this._forceHoveringTask||this._someManipulatorHovering(),t=this._fieldOfViewManipulation.hovering,a=this.parentTool.creating;let n=[];const o=e=>{n.push(e.disableDisplay())};e||!a&&i?this.removeHandles(E):(this._scaleOrientManipulation.forEachManipulator(o),this._moveManipulation.forEachManipulator(o),this.addHandles(n,E),n=[]),e||!a&&i||a&&t?this.removeHandles(z):(this._fieldOfViewManipulation.forEachManipulator(o),this.addHandles(n,z)),e||!a?this.removeHandles(U):this.addHandles(this._observerManipulator.disableDisplay(),U)}_resetHoveringTask(){this._forceHoveringTask=l(this._forceHoveringTask),this._updateManipulatorVisibility()}_forEachManipulator(e){this._forEachManipulation(i=>{i.forEachManipulator(e)}),e(this._observerManipulator)}_forEachManipulation(e){e(this._moveManipulation),e(this._fieldOfViewManipulation),e(this._scaleOrientManipulation)}get test(){return{moveManipulation:this._moveManipulation,fieldOfViewManipulation:this._fieldOfViewManipulation,scaleOrientManipulation:this._scaleOrientManipulation,viewshedComputedData:this.viewshedComputedData,setHoveringTimeoutPromise:e=>{this._forceHoveringTestPromise=e}}}};e([g({constructOnly:!0})],R.prototype,"analysis",void 0),e([g({constructOnly:!0})],R.prototype,"analysisViewData",void 0),e([g({constructOnly:!0})],R.prototype,"parentTool",void 0),e([g({constructOnly:!0,nonNullable:!0})],R.prototype,"view",void 0),e([g()],R.prototype,"_forceHoveringTask",void 0),e([g()],R.prototype,"updating",null),e([g()],R.prototype,"viewshed",null),e([g()],R.prototype,"_grabbing",void 0),e([g()],R.prototype,"grabbing",null),e([g()],R.prototype,"viewshedComputedData",void 0),e([g()],R.prototype,"observer",null),e([g()],R.prototype,"elevationAlignedObserverRenderSpace",null),R=e([m("esri.views.3d.analysis.Viewshed.ViewshedSubTool")],R);const I=_(),G=new o(0,180);export{R as ViewshedSubTool};
2
+ import{__decorate as e}from"tslib";import i from"../../../../core/Accessor.js";import{isSome as t}from"../../../../core/arrayUtils.js";import{createTask as a}from"../../../../core/asyncUtils.js";import{cyclicalDegrees as n,Cyclical as o}from"../../../../core/Cyclical.js";import{handlesGroup as r}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import{deg2rad as s}from"../../../../core/mathUtils.js";import{abortMaybe as l,destroyMaybe as p}from"../../../../core/maybe.js";import{after as h,throwIfAborted as u}from"../../../../core/promiseUtils.js";import{watch as d,syncAndInitial as c,initial as v}from"../../../../core/reactiveUtils.js";import{property as g,subclass as m}from"../../../../core/accessorSupport/decorators.js";import{sub as f,len as b,dot as M}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as _}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{tryProject as w}from"../../../../geometry/projectionUtils.js";import{viewingModeFromString as O}from"../../../ViewingMode.js";import{viewshedToolManipulatorConfiguration as V}from"./ViewshedConfiguration.js";import{ViewshedFieldOfViewManipulation as y,isSideHorizontal as T,flipSide as D}from"./ViewshedFieldOfViewManipulation.js";import{ViewshedScaleOrientManipulation as H}from"./ViewshedScaleOrientManipulation.js";import{ViewshedObserverManipulator as S}from"./viewshedToolManipulatorUtils.js";import{discRadiusSmall as C}from"../../interactive/editingTools/manipulations/config.js";import{MoveManipulation as j}from"../../interactive/editingTools/manipulations/MoveManipulation.js";import{resetProperties as F,sceneSnappingAtProjectedLocation as x,dragManipulatedObject as A}from"../../../interactive/dragEventPipeline.js";import{EditGeometryOperations as P}from"../../../interactive/editGeometry/EditGeometryOperations.js";const k=Symbol("dragHandles"),E=Symbol("hideManipulators"),z=Symbol("hideFoVManipulators"),U=Symbol("hideObserverManipulator");let R=class extends i{constructor(e){super(e),this._moveManipulation=null,this._observerManipulator=null,this._fieldOfViewManipulation=null,this._scaleOrientManipulation=null,this._forceHoveringTask=null,this._forceHoveringTestPromise=null,this._grabbing=!1,this.viewshedComputedData=null}initialize(){this._moveManipulation=this._createMoveManipulation(),this._fieldOfViewManipulation=new y({view:this.view,tool:this.parentTool}),this._scaleOrientManipulation=new H({view:this.view,tool:this.parentTool}),this._observerManipulator=new S(this.view,this.parentTool),this.addHandles([d(()=>this.elevationAlignedObserverRenderSpace,e=>{null!=e&&(this._moveManipulation.renderLocation=e,this._observerManipulator.renderLocation=e)},c),d(()=>this.viewshedComputedData?.heading,e=>{e&&(this._moveManipulation.angle=s(90-e))},v),d(()=>{const{viewshedComputedData:e}=this;return{viewshedComputedData:e,observer:this.elevationAlignedObserverRenderSpace}},({viewshedComputedData:e,observer:i},a)=>{this._grabbing&&i!==a?.observer||(this.removeHandles(k),e?.valid&&this.addHandles([this._buildObserverDragPipeline(e),this._buildFOVDragPipeline(e),this._buildScaleOrientDragPipeline(e)].filter(t),k))},v),d(()=>{const e=this.viewshedComputedData;return e?.valid?{viewshedCompData:e,target:e.elevationAlignedTargetRenderSpace,hFOV:e.horizontalFieldOfView,vFOV:e.verticalFieldOfView}:null},e=>{null!=e&&this._fieldOfViewManipulation.updateManipulatorsTransform(e.viewshedCompData)},v),d(()=>{const e=this.viewshedComputedData;return e?.valid?{viewshedCompData:e,hFOV:e.horizontalFieldOfView,vFOV:e.verticalFieldOfView,tilt:e.tilt}:null},e=>{null!=e&&this._fieldOfViewManipulation.updateManipulatorVisuals(e.viewshedCompData)},v),d(()=>{const e=this.analysisViewData.visible&&(this.viewshedComputedData?.valid??!1),i=this.parentTool.selectedViewshedComputedData===this.viewshedComputedData,{creating:t,isPlacingTarget:a}=this.parentTool;return{fovManipulationAvailable:e&&!a,nonFOVManipulationAvailable:e&&(!t||i)}},({fovManipulationAvailable:e,nonFOVManipulationAvailable:i})=>{this._moveManipulation.available=i,this._scaleOrientManipulation.available=i,this._observerManipulator.available=i,this._fieldOfViewManipulation.available=e},v),d(()=>{const e=this.viewshedComputedData;if(!e?.valid)return null;const{observer:i,target:t,verticalFieldOfView:a,horizontalFieldOfView:n}=e;return{viewshedCompData:e,observer:i,target:t,verticalFieldOfView:a,horizontalFieldOfView:n}},e=>{null!=e&&this._scaleOrientManipulation.updateManipulators(e.viewshedCompData)},v)]);const e=e=>{this.addHandles([e.events.on("focus-changed",()=>{const e=this._someManipulatorHovering();e&&this.parentTool.subToolHandles.forEach(({subTool:e})=>{e._resetHoveringTask()}),this._someManipulatorSelected()||e||(this._forceHoveringTask=a(async e=>{await(this._forceHoveringTestPromise??h(V.hoverTimeoutMilliseconds,e)),u(e),this._forceHoveringTask=null,this._updateManipulatorVisibility()}))}),e.events.on("grab-changed",i=>{this._grabbing="start"===i.action,"end"===i.action&&this.parentTool.updateInteractionVisualsVisibility(),this.parentTool.subToolHandles.forEach(({subTool:e})=>{e!==this&&e._setInteractive(!this._grabbing)}),this._setInteractive(i=>i.hasManipulator(e)||!this._grabbing)}),e.events.on("drag",e=>{"start"===e.action&&this.parentTool.updateInteractionVisualsVisibility()})])};this._forEachManipulator(e)}destroy(){this._forceHoveringTask=l(this._forceHoveringTask),this._moveManipulation=p(this._moveManipulation),this._fieldOfViewManipulation=p(this._fieldOfViewManipulation),this._scaleOrientManipulation=p(this._scaleOrientManipulation),this.parentTool.manipulators.remove(this._observerManipulator),this._observerManipulator=p(this._observerManipulator)}get updating(){return null!=this._forceHoveringTask&&!this._forceHoveringTask.finished}get viewshed(){return this.viewshedComputedData?.viewshed}get grabbing(){return this._grabbing}get observer(){return this.viewshed?.observer}set observer(e){const i=this.viewshed;null!=i&&(i.observer=e)}get elevationAlignedObserverRenderSpace(){return this.viewshedComputedData?.elevationAlignedObserverRenderSpace}get discManipulator(){return this._moveManipulation.xyManipulation.discManipulator}get moveInteractionState(){const{dragging:e,grabbing:i}=this._moveManipulation;return{dragging:e,grabbing:i}}get scaleOrientInteractionState(){const{dragging:e,grabbing:i}=this._scaleOrientManipulation;return{dragging:e,grabbing:i}}_setInteractive(e){const i="boolean"==typeof e;this._forEachManipulation(t=>t.interactive=i?e:e(t))}onManipulatorSelectionChanged(){if(this._updateManipulatorVisibility(),!this._someManipulatorSelected()){this.analysisViewData.selectedViewshed===this.viewshed&&(this.analysisViewData.selectedViewshed=null),this._resetHoveringTask()}}hasManipulator(e){let i=!1;return this._forEachManipulator(t=>{i=i||t===e}),i}_someManipulatorSelected(){return this._moveManipulation.selected||this._fieldOfViewManipulation.selected||this._scaleOrientManipulation.selected}_someManipulatorHovering(){return this._moveManipulation.hovering||this._fieldOfViewManipulation.hovering||this._scaleOrientManipulation.hovering}_createMoveManipulation(){return new j({view:this.view,tool:this.parentTool,snapToScene:!1,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:!0,radius:C})}_buildObserverDragPipeline(e){const i={mode:"absolute-height",offset:0},t=e.observer;if(null==t)return null;const a=this.view.spatialReference;return this._moveManipulation.createDragPipeline((n,o,r,s,l)=>{s=s.next(F(this,["observer"]));const p=w(t,a),h=w(e.elevationAlignedObserver,a);if(null==p||null==h)return{steps:r,cancel:s};const u=P.fromGeometry(p,O(this.view.viewingMode)),d=P.fromGeometry(h,O(this.view.viewingMode)),c=this.parentTool.createObserverMoveSnappingPipeline?.(n,d,l);if(null!=c){const{snappingStep:e,cancelSnapping:t}=c,{coordinateHelper:a}=d.data;s=s.next(t);return{steps:r.next(e=>({...e,snapOrigin:a.pointToVector(h)})).next(x(this.view,i)).next(...e).next(A({operations:u})).next(e=>(this.observer=u.data.geometry,e)),cancel:s}}return{steps:r.next(A({operations:u})).next(e=>(this.observer=u.data.geometry,e)),cancel:s}},i,a,void 0)}_buildFOVDragPipeline(e){let i=0,t=0;return this._fieldOfViewManipulation.createDragPipeline((a,o,r)=>{if(null==e)return{steps:o,cancel:r};const s=e.viewshed;let l=null;r=r.next(F(s,["horizontalFieldOfView","verticalFieldOfView"]));return{steps:o.next(a=>{"start"===a.action&&(l=null,i=e.horizontalFieldOfView,t=e.verticalFieldOfView);const o=a.deltaAngle;if(null==l&&0!==o){const e="bottom"===a.side||"left"===a.side?o>0:o<0;l=T(a.side)?0===i&&e||360===i&&!e:0===t&&e}const r=l?D(a.side):a.side;let p=0;switch(r){case"left":p=i/2-o;break;case"right":p=i/2+o;break;case"top":p=t+2*o;break;case"bottom":p=t-2*o}return T(r)?(p=n.normalize(p),p=p>270?0:p>180?180:p,s.horizontalFieldOfView=2*p):s.verticalFieldOfView=p,a}),cancel:r}},e)}_buildScaleOrientDragPipeline(e){let i=0,t=0;const a=(i,t)=>(a,n,o)=>{if(null==e)return{steps:n,cancel:o};const r=e.viewshed;return o=o.next(F(r,[i])),{steps:n=n.next(t(r,e)),cancel:o}};return r([this._scaleOrientManipulation.createHeadingDragPipeline(a("heading",(i,a)=>a=>("start"===a.action&&(t=e.heading),i.heading=n.normalize(t+a.deltaAngle),a)),e),this._scaleOrientManipulation.createTiltDragPipeline(a("tilt",(t,a)=>a=>{"start"===a.action&&(i=e.tilt);let n=i+a.deltaAngle;return n<-90?n=180:n>270&&(n=0),t.tilt=G.clamp(n),a}),e),this._scaleOrientManipulation.createDistanceDragPipeline(a("farDistance",(e,i)=>t=>{const a=f(I,t.renderEnd,i.elevationAlignedObserverRenderSpace),n=b(a)*i.metersPerUnit,o=M(a,i.targetDirection)<0?V.scaleOrientMinDistance:n;return e.farDistance=o,t}),e)])}_updateManipulatorVisibility(){const e=this._someManipulatorSelected(),i=null!=this._forceHoveringTask||this._someManipulatorHovering(),t=this._fieldOfViewManipulation.hovering,a=this.parentTool.creating;let n=[];const o=e=>{n.push(e.disableDisplay())};e||!a&&i?this.removeHandles(E):(this._scaleOrientManipulation.forEachManipulator(o),this._moveManipulation.forEachManipulator(o),this.addHandles(n,E),n=[]),e||!a&&i||a&&t?this.removeHandles(z):(this._fieldOfViewManipulation.forEachManipulator(o),this.addHandles(n,z)),e||!a?this.removeHandles(U):this.addHandles(this._observerManipulator.disableDisplay(),U)}_resetHoveringTask(){this._forceHoveringTask=l(this._forceHoveringTask),this._updateManipulatorVisibility()}_forEachManipulator(e){this._forEachManipulation(i=>{i.forEachManipulator(e)}),e(this._observerManipulator)}_forEachManipulation(e){e(this._moveManipulation),e(this._fieldOfViewManipulation),e(this._scaleOrientManipulation)}get test(){return{moveManipulation:this._moveManipulation,fieldOfViewManipulation:this._fieldOfViewManipulation,scaleOrientManipulation:this._scaleOrientManipulation,viewshedComputedData:this.viewshedComputedData,setHoveringTimeoutPromise:e=>{this._forceHoveringTestPromise=e}}}};e([g({constructOnly:!0})],R.prototype,"analysis",void 0),e([g({constructOnly:!0})],R.prototype,"analysisViewData",void 0),e([g({constructOnly:!0})],R.prototype,"parentTool",void 0),e([g({constructOnly:!0,nonNullable:!0})],R.prototype,"view",void 0),e([g()],R.prototype,"_forceHoveringTask",void 0),e([g()],R.prototype,"updating",null),e([g()],R.prototype,"viewshed",null),e([g()],R.prototype,"_grabbing",void 0),e([g()],R.prototype,"grabbing",null),e([g()],R.prototype,"viewshedComputedData",void 0),e([g()],R.prototype,"observer",null),e([g()],R.prototype,"elevationAlignedObserverRenderSpace",null),R=e([m("esri.views.3d.analysis.Viewshed.ViewshedSubTool")],R);const I=_(),G=new o(0,180);export{R as ViewshedSubTool};
@@ -31,5 +31,5 @@ export default class VolumeMeasurementError<T = any> extends Error {
31
31
  * console.log("Error name: ", error.name);
32
32
  * });
33
33
  */
34
- name: VolumeMeasurementErrorName;
34
+ readonly name: VolumeMeasurementErrorName;
35
35
  }
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import has from"../../../../core/has.js";class e{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding="image/ktx2"}}function t(e){return"encoded-mesh-texture"===e?.type}async function n(e){const t=new Blob([e]),n=await t.text();return JSON.parse(n)}async function r(t,n){if("image/ktx2"===n)return new e(t);const r=new Blob([t],{type:n});let o=URL.createObjectURL(r);switch(n){case"image/jpeg":o+="#.jpg";break;case"image/png":o+="#.png"}const c=new Image;if(has("esri-iPhone"))return new Promise((e,t)=>{const n=()=>{s(),e(c)},r=e=>{s(),t(e)},s=()=>{URL.revokeObjectURL(o),c.removeEventListener("load",n),c.removeEventListener("error",r)};c.addEventListener("load",n),c.addEventListener("error",r),c.src=o});try{c.src=o,await c.decode()}catch(s){console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(o),c}export{e as EncodedMeshTexture,r as imageFromBinaryData,t as isEncodedMeshTexture,n as jsonFromBinaryData};
2
+ import has from"../../../../core/has.js";class e{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding="image/ktx2"}}function t(e){return"encoded-mesh-texture"===e?.type}async function r(e){const t=new Blob([e]),r=await t.text();return JSON.parse(r)}async function n(t,r){if("image/ktx2"===r)return new e(t);const n=new Blob([t],{type:r});let o=URL.createObjectURL(n);switch(r){case"image/jpeg":o+="#.jpg";break;case"image/png":o+="#.png"}const c=new Image;if(has("esri-iPhone"))return new Promise((e,t)=>{const r=()=>{s(),e(c)},n=e=>{s(),t(e)},s=()=>{URL.revokeObjectURL(o),c.removeEventListener("load",r),c.removeEventListener("error",n)};c.addEventListener("load",r),c.addEventListener("error",n),c.src=o});try{c.src=o,await c.decode()}catch{}return URL.revokeObjectURL(o),c}export{e as EncodedMeshTexture,n as imageFromBinaryData,t as isEncodedMeshTexture,r as jsonFromBinaryData};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import{removeUnordered as i}from"../../../../../core/arrayUtils.js";import{EventEmitter as n}from"../../../../../core/Evented.js";import a from"../../../../../core/Handles.js";import{handlesGroup as o,makeHandle as s,destroyHandle as r}from"../../../../../core/handleUtils.js";import"../../../../../core/has.js";import{destroyMaybe as l,removeMaybe as p}from"../../../../../core/maybe.js";import{watch as d,initial as h,on as u,syncAndInitial as c,when as m,sync as g}from"../../../../../core/reactiveUtils.js";import{property as f,subclass as _}from"../../../../../core/accessorSupport/decorators.js";import{IDENTITY as v}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{length as M,subtract as b,lerp as x,set as y,add as O,scale as E}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as j,create as I}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as S}from"../../../../../core/support/UpdatingHandles.js";import H from"../../../../../geometry/Point.js";import w from"../../../../../geometry/Polyline.js";import V from"../../../../../geometry/SpatialReference.js";import{makeDehydratedPoint as D}from"../../../../../layers/graphics/dehydratedPoint.js";import{isVolumetricSymbol as T}from"../../../../../symbols/support/utils.js";import{Manipulator3D as G}from"../../Manipulator3D.js";import{createManipulatorMaterial as A,createManipulatorOutlineMaterial as P,placeAtObject as k}from"../../manipulatorUtils.js";import{RenderObject as C}from"../../RenderObject.js";import{SegmentLabels3D as U}from"../../SegmentLabels3D.js";import{SnappingVisualizer3D as L}from"../../SnappingVisualizer3D.js";import{screenToMapXYAtLocation as R,screenToRenderPlaneFromEvent as z,convertToMapCoordinates as F}from"../dragEventPipeline3D.js";import{orientation as Z}from"../geometryUtils.js";import{canMoveZOperations as B}from"../manipulatorUtils.js";import{Settings as W}from"../settings.js";import{createVisualElements as N}from"../visualElementUtils.js";import{discRadiusSmall as q}from"../manipulations/config.js";import{MoveManipulation as X}from"../manipulations/MoveManipulation.js";import{MoveXYObjectManipulation as Y}from"../manipulations/MoveXYObjectManipulation.js";import{getMapPointAtEdgeOffsetManipulatorElevation as K,createEdgeOffsetIntersectionPlane as J,createEdgeOffsetOperation as Q,edgeOffsetRotationMatrix as $,screenEdgeLengthSquared as ee,getDistanceInGeometrySR as te}from"./edgeOffsetUtils.js";import{createTooltipInfos as ie,connectTooltipToManipulatedObject as ne,getUpdatedTranslateObjectTooltipInfo as ae,getUpdatedEdgeOffsetTooltipInfo as oe}from"./reshapeTooltipUtils3D.js";import{OutlineVisualElement as se}from"../../visualElements/OutlineVisualElement.js";import{createElevationUpdateHandle as re}from"../../../support/elevationUpdateUtils.js";import{createExtrudedTriangle as le,createSphereGeometry as pe}from"../../../webgl-engine/lib/GeometryUtil.js";import{mouseButtons as de}from"../../../../input/mouseButtons.js";import{sceneSnappingAtLocation as he,addMapDelta as ue,createManipulatorDragEventPipeline as ce,dragAtLocation as me,addScreenDelta as ge}from"../../../../interactive/dragEventPipeline.js";import{tooltipKeys as fe}from"../../../../interactive/keybindings.js";import{SnappingContext as _e}from"../../../../interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as ve}from"../../../../interactive/snapping/SnappingDragPipelineStep.js";import{makeTooltip as Me,enterInputModeIfAvailable as be}from"../../../../interactive/tooltip/tooltipCommonUtils.js";import{GeometryWorkerHandle as xe}from"../../../../support/GeometryWorkerHandle.js";const ye=Symbol(),Oe=Symbol();let Ee=class extends t{get _operations(){return this.object.operations}constructor(e){super(e),this._selectedIndex=0,this._manipulatorHandles=new a,this._manipulatorInfos=[],this._numGrabbing=0,this._numDragging=0,this._reshapeEventState=0,this._pendingEdgeOffsetInfo=null,this._updatingHandles=new S,this._recreatingManipulators=!1,this._settings=new W({getTheme:()=>this.view.effectiveTheme}),this.events=new n,this.activeTooltipInfo=null,this._measurementWorker=new xe({preloadGeodetic:!0}),this._vertexLaserLineVisualElement=null,this._tooltipCallbacks={onBeforeReshape:()=>this.tool.endDrag(),onReshapeStart:()=>this._updateEventState(2),onReshape:()=>this.events.emit("reshape",{type:"reshape",object:this.object}),onReshapeStop:()=>this._updateEventState(0,{forceEnd:!0}),onMoveStart:()=>this._updateEventState(1),onMove:()=>this.events.emit("move",{type:"move",object:this.object,dx:0,dy:0}),onMoveStop:()=>this._updateEventState(0,{forceEnd:!0})}}initialize(){const{view:e}=this,t=this._settings.manipulators,i=t.vertex;this.tooltipInfos=ie(this._sketchOptions,e),this._vertexManipulatorMaterial=A(i.color.toUnitRGBA(),i.renderOccluded),this._vertexManipulatorOutlineMaterial=P(i.outlineColor.toUnitRGBA(),i.renderOccluded),this._vertexManipulatorHoverOutlineMaterial=P(i.hoverOutlineColor.toUnitRGBA(),i.renderOccluded);const n=t.edge;this._edgeManipulatorMaterial=A(n.color.toUnitRGBA(),n.renderOccluded),this._edgeManipulatorOutlineMaterial=P(n.outlineColor.toUnitRGBA(),n.renderOccluded);const a=t.edgeOffset;this._edgeOffsetManipulatorMaterial=A(a.color.toUnitRGBA(),a.renderOccluded,!1),this._edgeOffsetManipulatorHoverMaterial=A(a.hoverColor.toUnitRGBA(),a.renderOccluded,!1);const o=t.selected;this._selectedManipulatorMaterial=A(o.color.toUnitRGBA(),o.renderOccluded),this._selectedManipulatorOutlineMaterial=P(o.outlineColor.toUnitRGBA(),o.renderOccluded),this._selectedManipulatorHoverOutlineMaterial=P(o.hoverOutlineColor.toUnitRGBA(),o.renderOccluded),this.tooltip=Me(()=>({view:e,options:this._sketchOptions.tooltips})),this.addHandles([d(()=>{const e=this._settings.manipulators;return{vertexSettings:e.vertex,edgeSettings:e.edge,edgeOffsetSettings:e.edgeOffset,selectedSettings:e.selected}},({vertexSettings:e,edgeSettings:t,edgeOffsetSettings:i,selectedSettings:n})=>{e.applyColor(this._vertexManipulatorMaterial),e.applyOutline(this._vertexManipulatorOutlineMaterial),e.applyHoverOutline(this._vertexManipulatorHoverOutlineMaterial),t.applyColor(this._edgeManipulatorMaterial),t.applyOutline(this._edgeManipulatorOutlineMaterial),i.applyColor(this._edgeOffsetManipulatorMaterial),i.applyHover(this._edgeOffsetManipulatorHoverMaterial),n.applyColor(this._selectedManipulatorMaterial),n.applyOutline(this._selectedManipulatorOutlineMaterial),n.applyHoverOutline(this._selectedManipulatorHoverOutlineMaterial)}),d(()=>this.object.visible,e=>{for(const t of this._manipulatorInfos)t.manipulator.available=e,we(t)&&(t.edgeManipulator.available=e)}),d(()=>this._numGrabbing+this._numDragging===0,e=>this._toggleAutoHideManipulators(e)),d(()=>({labels:this._segmentLabels,enabled:this._sketchOptions.labels.enabled,edgeOffsetEnabled:this.enableEdgeOffset}),({labels:e,enabled:t,edgeOffsetEnabled:i})=>{null!=e&&(e.visible=t,e.edgeDistance=i?"far":"default")},h),ne(this.tooltip,this.object,()=>this._tooltipsContext,this._updatingHandles),d(()=>this.tooltip.mode,(e,t)=>{"input"===t&&"input"!==e&&this._resetTooltip()}),u(()=>this._operations,"vertex-update",e=>this._updateManipulatorPositions(e.vertices),{onListenerAdd:()=>this._recreateManipulators()}),u(()=>this._operations?.data,"change",e=>{"undo"!==e.operation&&"redo"!==e.operation||this._recreateManipulators()})])}destroy(){this._removeManipulators(),this._updatingHandles.destroy(),this._segmentLabels=l(this._segmentLabels),this.tooltip=l(this.tooltip),this._measurementWorker.destroy()}get updating(){return this._updatingHandles.updating||!!this._segmentLabels?.updating}get manipulators(){return this.tool.manipulators}get view(){return this.tool.view}get object(){return this.tool.object}get enableZShape(){return this.tool.enableZShape}get enableDeleteVertices(){return this.tool.enableDeleteVertices}get enableZVertex(){return this.tool.enableZVertex}get autoHideManipulators(){return this.tool.autoHideManipulators}get enableMoveObject(){return this.tool.enableMoveObject}get enableMidpoints(){return this.tool.enableMidpoints}get enableEdgeOffset(){return this.tool.enableEdgeOffset}get _sketchOptions(){return this.tool.sketchOptions}get _accentColor(){return this.view.effectiveTheme.accentColor}enterInputModeIfAvailable(e){return"key-down"===e.type&&e.key===fe.enterInputMode&&("reshape-edge-offset"===this.activeTooltipInfo?.type?this._enterInputModeDuringEdgeOffset(e):!!be(e,this.tooltip)&&(this.tool.endDrag(),!0))}removeSelectedVertices(){const e=this._manipulatorInfos.filter(e=>e.manipulator.selected&&"vertex"===e.type);return this._removeVertices(e),e.length}onManipulatorSelectionChanged(){this.events.emit("manipulators-changed")}_removeManipulators(){this._manipulatorHandles.removeAll(),this._moveManipulation=l(this._moveManipulation),this._objectMoveManipulation=l(this._objectMoveManipulation),this.manipulators.removeAll(),this._manipulatorInfos=[],this._numGrabbing=0,this._numDragging=0}_createManipulators(e){if(null==this._operations)return;const t=this.object.elevationInfo;for(const{vertices:i,segments:n,index:a}of this._operations.data.parts){const o=e?.byPartIndex.get(a);for(const e of i){const i=o?.has(e.index);this._createVertexOrEdgeManipulator(e,t,i)}for(const e of n)"line"===e.type&&this._createVertexOrEdgeManipulator(e,t)}this._createObjectMoveManipulation(),this._createMoveManipulation(t),this._createVisualElements()}recordUndo(e){this._operations?.recordUndo(e,!0)}get canRedo(){return this._operations?.canRedo??!1}get canUndo(){return this._operations?.canUndo??!1}redo(){return this._operations?.redo()}undo(){return this.events.emit("undo"),this._operations?.undo()}_recreateManipulators(){if(!this._recreatingManipulators){if(this._recreatingManipulators=!0,this._removeManipulators(),this._resetTooltip(),this._operations&&this._segmentLabels?.context?.editGeometryOperations===this._operations||(this._segmentLabels=l(this._segmentLabels)),this._createManipulators(),!this._segmentLabels&&this._operations){const e=this._sketchOptions.labels;this._segmentLabels=new U({context:{view:this.view,editGeometryOperations:this._operations,elevationInfo:this.object.elevationInfo,labelOptions:e},visible:e.enabled})}this._recreatingManipulators=!1}}_perObjectManipulatorDragAction(e,t){if("end"===t.action)return t;let i=0;const n=[],a=this._manipulatorInfos.some(e=>"vertex"===e.type&&e.manipulator.selected),o=1===e&&a;for(const s of this._manipulatorInfos)"vertex"===s.type&&(s.manipulator.grabbing||o&&!s.manipulator.selected||n.push(s),i++);this._moveVertices(n,t);if(n.length===i){if(this._updateEventState(1),this.destroyed)return t;this.events.emit("move",{type:"move",dx:t.screenDeltaX,dy:t.screenDeltaY,object:this.object})}else{if(this._updateEventState(2),this.destroyed)return t;this.events.emit("reshape",{type:"reshape",object:this.object})}return t}_toggleAutoHideManipulators(e){this.autoHideManipulators&&(e?this.removeHandles(ye):this.tool.manipulators.forEach(({manipulator:e})=>{const t=e.disableDisplay?.();t&&this.addHandles(t,ye)}))}_isMultiVertexSelection(){return this._manipulatorInfos.reduce((e,t)=>"vertex"===t.type&&t.manipulator.selected?e+1:e,0)>1}_perVertexManipulatorDragAction(e){if(this._updateEventState(2),this.destroyed)return;const{mapDeltaX:t,mapDeltaY:i,mapDeltaZ:n}=e;if(!t&&!i&&!n)return;const a=[];for(const o of this._manipulatorInfos)"vertex"===o.type&&(o.manipulator.selected&&!o.manipulator.grabbing||o===e.info)&&a.push(o);this._moveVertices(a,e,1),this.events.emit("reshape",{type:"reshape",object:this.object})}_updateEventState(e,t={}){if(e===this._reshapeEventState)return!1;switch(e){case 0:if(!t.forceEnd&&(0!==this._numGrabbing||0!==this._numDragging))return!1;switch(this._reshapeEventState){case 1:this.events.emit("move",{type:"move-stop",dx:0,dy:0,object:this.object});break;case 2:this.events.emit("reshape",{type:"reshape-stop",object:this.object})}break;case 1:switch(this._reshapeEventState){case 0:this.events.emit("move",{type:"move-start",dx:0,dy:0,object:this.object});break;case 2:this.events.emit("reshape",{type:"reshape-stop",object:this.object}),this.destroyed||this.events.emit("move",{type:"move-start",dx:0,dy:0,object:this.object})}break;case 2:switch(this._reshapeEventState){case 0:this.events.emit("reshape",{type:"reshape-start",object:this.object});break;case 1:this.events.emit("move",{type:"move-stop",dx:0,dy:0,object:this.object}),this.destroyed||this.events.emit("reshape",{type:"reshape-start",object:this.object})}}if(this.destroyed)return!1;const i=this._reshapeEventState!==e;return this._reshapeEventState=e,i}_createObjectMoveManipulation(){const{tool:e,view:t,object:i,_operations:n}=this;if(n){if(this._objectMoveManipulation=new Y({tool:e,view:t,object:i}),this.enableMoveObject){let e=null;this._manipulatorHandles.add(this._objectMoveManipulation.createDragPipeline((t,i,a)=>{i.next(e=>this._trackNumDragging(e)).next(t=>("start"===t.action&&(e=n.createUndoGroup()),t)).next(e=>this._perObjectManipulatorDragAction(0,e)).next(e=>(this._updateTranslateObjectTooltip(0,e),e)).next(t=>{"end"===t.action&&(this._resetTooltip(),e=p(e))}),a.next(()=>this._onDragCancel(!0,()=>e=p(e)))})),this._objectMoveManipulation.forEachManipulator(e=>this._manipulatorHandles.add(this._watchAndUpdateGrabState(e,!1)))}else this._objectMoveManipulation.forEachManipulator(e=>{e.grabbable=!1,e.cursor=null});this._objectMoveManipulation.forEachManipulator(e=>this._manipulatorHandles.add(e.events.on("immediate-click",e=>{this._manipulatorInfos.some(e=>e.manipulator.selected)?this._clearSelection():this.events.emit("immediate-click",{...e,object:this.object}),e.stopPropagation()})))}}_createMoveManipulation(e){const{object:t,tool:i,view:n,_operations:a}=this;if(!a)return;this._moveManipulation=new X({tool:i,view:n,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:this.enableZShape&&B(t.operations,t.elevationInfo),snapToScene:!1,radius:X.radiusForSymbol(t.graphic?.symbol)}),this._moveManipulation.forEachManipulator(e=>this.addHandles([e.events.on("immediate-click",t=>{this._moveManipulation.zManipulation.hasManipulator(e)||this._manipulatorInfos.some(e=>e.manipulator.selected)||this.events.emit("immediate-click",{...t,object:this.object}),t.stopPropagation()}),this._watchAndUpdateGrabState(e,!1)]));const o=e=>t=>{this.addHandles([t.events.on("focus-changed",({action:t})=>{"focus"===t?this._updateTranslateTooltip(e):this._resetTooltip()})])};this._moveManipulation.xyManipulation.forEachManipulator(o(0)),this._moveManipulation.xyAxisManipulation.forEachManipulator(o(1)),this._moveManipulation.zManipulation.forEachManipulator(o(2)),this._moveManipulation.elevationInfo={mode:"absolute-height",offset:0};const s=a.data.spatialReference;this.addHandles([this._moveManipulation.createDragPipeline((n,o,s,r,l)=>{const{snappingStep:p,cancelSnapping:d}=ve({predicate:e=>!!e.info,snappingManager:i.snappingManager,snappingContext:new _e({editGeometryOperations:a,elevationInfo:e,pointer:l,excludeFeature:t.graphic,visualizer:new L}),updatingHandles:this._updatingHandles,useZ:!1});return r=r.next(e=>(this._onDragCancel(),e)).next(d),{steps:s=s.next(e=>this._trackNumDragging(e)).next(e=>{const t=this._manipulatorInfos.filter(e=>"vertex"===e.type&&e.manipulator.selected);return 1===e.manipulatorType&&1===t.length?{...e,info:t[0],snapOrigin:t[0].handle.pos}:e}).next(he(this.view,e,t.graphic??void 0)).next(...p).next(ue()).next(e=>this._perObjectManipulatorDragAction(1,e)).next(e=>(this._updateTranslateTooltip(n,e),e)),cancel:r}},e,s,t.graphic),d(()=>t.visible,()=>this._updateMoveManipulationPosition(),h),t.on("committed",()=>{this._recreatingManipulators||this._updateMoveManipulationPosition()}),d(()=>t.isDraped,e=>{this._updateMoveManipulationPosition(),this.removeHandles(Oe),e&&this.addHandles(re({view:this.view,geometry:t.graphic?.geometry,elevationInfo:t.elevationInfo,onElevationChanges:()=>this._updateMoveManipulationPosition()}),Oe)},h)])}_createVisualElements(){const{object:e,view:t}=this,i=N({view:t,object:e,forEachManipulator:e=>{if(!this.destroyed&&!this._recreatingManipulators){this._objectMoveManipulation.forEachManipulator(e),this._moveManipulation.forEachManipulator(e);for(const t of this._manipulatorInfos)e(t.manipulator,1)}},onManipulatorsChanged:e=>this.events.on("manipulators-changed",e)});null!=i&&(this._outlineVisualElement=i.visualElement instanceof se?i.visualElement:null);const n=this._outlineVisualElement;if(null!=n){const t=()=>{e.isDraped||this._updateMoveManipulationPosition()};this._manipulatorHandles.add(u(()=>n.events,"attachment-origin-changed",t,{onListenerAdd:t}))}this._manipulatorHandles.add(i)}_createEdgeOffsetManipulator(e,t=this.object.elevationInfo){const i=this.view,n=this._operations;if(e.part.vertices.length<=2||!n)return null;const a=n.data.spatialReference,s=this._settings.manipulators.edgeOffset,r=s.size/2,l=r+s.collisionPadding,p=r/l,d=p/2,h=p*Math.sqrt(3)/2,{height:u,offset:c}=s,m=this._edgeOffsetManipulatorMaterial;if(!this._edgeOffsetManipulatorGeometryInside){const e=le(m,h,d,d,u,c);this._edgeOffsetManipulatorGeometryInside=e}if(!this._edgeOffsetManipulatorGeometryOutside){const e=le(m,-h,d,d,u,-c);this._edgeOffsetManipulatorGeometryOutside=e}const g=[new C(this._edgeOffsetManipulatorGeometryInside.instantiate(),1),new C(this._edgeOffsetManipulatorGeometryInside.instantiate({material:this._edgeOffsetManipulatorHoverMaterial}),2),new C(this._edgeOffsetManipulatorGeometryOutside.instantiate(),1),new C(this._edgeOffsetManipulatorGeometryOutside.instantiate({material:this._edgeOffsetManipulatorHoverMaterial}),2)],f=new G({view:i,renderObjects:g,elevationInfo:"on-the-ground"!==t.mode||T(this.object.graphic?.symbol)?{mode:"absolute-height",offset:0}:t,worldOriented:!1,focusMultiplier:1,radius:l,available:this.object.visible,collisionType:{type:"disc",direction:j(0,0,1)},collisionPriority:1,metadata:{deleting:!1},location:He(a)}),_=new G({view:i,worldSized:!0,worldOriented:!1,available:this.object.visible,collisionPriority:-10,cursor:this.enableMoveObject?"move":"default",metadata:{deleting:!1},location:He(a)}),v={manipulator:f,handle:e,locationUpdateHandle:null,type:"edge",selectedIndex:0,edgeManipulator:_,visibilityHandle:null};this._autoHideEdgeOffsetManipulator(v,s.minSquaredEdgeLength);const M=()=>this._updateEdgeOffsetManipulator(v);M(),v.locationUpdateHandle=o([e.leftVertex,e.rightVertex].map(e=>{const t=this._getManipulatorInfoFromHandle(e);return t?.manipulator.events.on("location-update",M)}));const b=e=>{this._manipulatorInfos.some(e=>e.manipulator.selected)?this._clearSelection():this.events.emit("immediate-click",{...e,object:this.object}),e.stopPropagation()};return this._manipulatorHandles.add([v.locationUpdateHandle,this._watchAndUpdateGrabState(f,!0),this._watchAndUpdateGrabState(_,!0),ce(f,this._createEdgeOffsetPipeline(v,t,n)),ce(_,this._createEdgePipeline(v,t,n)),_.events.on("immediate-click",b),f.events.on("immediate-click",b),f.events.on("focus-changed",()=>this._resetTooltip()),f.events.on("grab-changed",({screenPoint:e,action:t})=>{v.grabMapPoint="start"===t?K(e,this.view,this.object,v):null})],f),this._manipulatorInfos.push(v),this.manipulators.addMany([f,_]),this.events.emit("manipulators-changed"),v}_autoHideEdgeOffsetManipulator(e,t){const i=e.manipulator,n=e.edgeManipulator,a=()=>{e.visibilityHandle=p(e.visibilityHandle);const a=this._getManipulatorInfoFromHandle(e.handle.leftVertex),r=this._getManipulatorInfoFromHandle(e.handle.rightVertex),l=null!=a&&null!=r&&ee(a.manipulator.renderLocation,r.manipulator.renderLocation,this.view.state.camera)<t;(!i.focused&&!n.focused||l)&&(i.grabbable=!l,n.grabbable=!l,e.visibilityHandle=o([i.disableDisplay(),s(()=>{i.grabbable=!0,n.grabbable=this.enableMoveObject})]))};this._manipulatorHandles.add([i.events.on("focus-changed",a),n.events.on("focus-changed",a),s(()=>{p(e.visibilityHandle),n.metadata.deleting=!0,this.manipulators.remove(n)})],i),a()}_updateEdgeOffsetManipulator(e){if(!this._operations)return;this._updateManipulatorPosition(e);const{coordinateHelper:t}=this._operations.data,i=J(this.view,e.manipulator.elevationAlignedLocation,Q(t,e.handle,e.manipulator.elevationInfo)),n=this._getManipulatorInfoFromHandle(e.handle.leftVertex),a=this._getManipulatorInfoFromHandle(e.handle.rightVertex);if(null==n||null==a)return;const o=n.manipulator.renderLocation,s=a.manipulator.renderLocation,r=null!=i?$(i,o,s):v;e.manipulator.modelTransform=r,e.edgeManipulator.elevationAlignedLocation=e.manipulator.elevationAlignedLocation,e.edgeManipulator.modelTransform=r;const l=M(b(De,o,s))/2;e.edgeManipulator.collisionType={type:"line",paths:[[[-l,0,0],[l,0,0]]]}}_createEdgePipeline(e,t,i){return(n,a,o,s)=>{if("touch"===s){this._createEdgeOffsetPipeline(e,t,i)(n,a,o)}else if(this.enableMoveObject){const e=this.object.graphic,s=i.data.spatialReference,{elevationAlignedLocation:r}=n;a.next(e=>this._trackNumDragging(e)).next(me(this.view,r)).next(R(this.view,r,t,s,e)).next(ge()).next(ue()).next(e=>this._perObjectManipulatorDragAction(0,e)).next(e=>(this._updateTranslateObjectTooltip(0,e),e)).next(e=>{"end"===e.action&&this._resetTooltip()}),o.next(()=>this._onDragCancel(!n.metadata.deleting))}}}_createEdgeOffsetPipeline(e,t,i){return(n,a,o)=>{const s=this._pendingEdgeOffsetInfo;if(s?.manipulatorInfo===e&&"drag"!==s.mode)return void o.execute({action:"cancel"});this._clearSelection();const{initializeStep:r,cleanup:l}=this._initializeEdgeOffset(e,t,i,o),p=this._applyEdgeOffsetStep(e);a.next(e=>this._trackNumDragging(e)).next(me(this.view,n.elevationAlignedLocation)).next(r).next(z(this.view)).next(F(this.view,i.data.spatialReference)).next(ue()).next(je()).next(e=>this._pendingEdgeOffsetInfo?e:p(e)).next(e=>{"end"!==e.action||this._pendingEdgeOffsetInfo||l()}),o.next(()=>{this._exitEdgeOffsetInputMode(),n.metadata.deleting||(l(),this._onDragCancel())})}}_initializeEdgeOffset(e,t,i,n){const{view:a,object:s}=this,r=Q(i.data.coordinateHelper,e.handle,t),l=i.createUndoGroup(),d=J(a,e.manipulator.elevationAlignedLocation,r);let h;this._splitEdgesBeforeEdgeOffset(e,r),this._selectEdgeOffsetArrow(e,r);const u=()=>{this._cleanEdgeOffsetCollapsedEdges(e,i),h=p(h)},c=this.events.on("undo",u);return h=o([this._initializeEdgeOffsetVisualElement(e,s,t,i),l,c,this._connectEdgeOffsetTooltip(e,r,i,()=>{n.execute({action:"cancel"})})]),{initializeStep:e=>null==r||null==d?(u(),null):{...e,operation:r,plane:d},cleanup:u}}_initializeEdgeOffsetVisualElement(e,t,i,n){const a=()=>new w({paths:[[e.handle.leftVertex.pos,e.handle.rightVertex.pos]],spatialReference:n.data.spatialReference}),s=new se({view:this.view,isDraped:t.isDraped,geometry:a(),elevationInfo:i,width:this._settings.visualElements.lineObjects.outline.width,attached:!1,isDecoration:!0}),l=o([d(()=>({color:this._accentColor,draped:t.isDraped}),({color:e,draped:t})=>{s.color=e.toUnitRGBA(),s.isDraped=t},c),t.on("committed",()=>{s.geometry=a()}),r(s)]);return s.attached=!0,l}_applyEdgeOffsetStep(e){return t=>(this.destroyed||null==t.operation||!this._operations||(this._updateEventState(2),null==t.signedDistance?this._resetTooltip():((t.mapDeltaX||t.mapDeltaY||t.mapDeltaZ)&&(this._offsetEdge(e,t.operation,t.signedDistance),this.events.emit("reshape",{type:"reshape",object:this.object})),this._updateEdgeOffsetTooltip(t))),t)}_cleanEdgeOffsetCollapsedEdges(e,t){const i=e.handle.leftVertex.leftSegment?.leftVertex,n=e.handle.leftVertex,a=e.handle.rightVertex.rightSegment?.rightVertex,o=e.handle.rightVertex,s=t.data.coordinateHelper,r=this.view.pixelSizeAt(s.vectorToDehydratedPoint(n.pos),s.spatialReference),l=[];if(i&&s.distance(i.pos,n.pos)<Te){const e=this._getManipulatorInfoFromHandle(n);null!=e&&l.push(e)}if(s.distance(n.pos,o.pos)<r||a&&s.distance(a.pos,o.pos)<Te){const e=this._getManipulatorInfoFromHandle(o);null!=e&&l.push(e)}l.length&&this._removeVertices(l)}_enterInputModeDuringEdgeOffset(e){const t=this._findActiveEdgeOffsetManipulatorInfo();return!!t&&(!!be(e,this.tooltip)&&(t.manipulator.dragging?(this._pendingEdgeOffsetInfo={manipulatorInfo:t,mode:"drag"},!0):(this._clearSelection(),this._pendingEdgeOffsetInfo={manipulatorInfo:t,mode:"hover"},this._connectEdgeOffsetTooltipOnHover(t),!0)))}_exitEdgeOffsetInputMode(){this.tooltip&&(this._pendingEdgeOffsetInfo=null,this._resetTooltip(),this.tooltip.exitInputMode())}_findActiveEdgeOffsetManipulatorInfo(){return this._manipulatorInfos.filter(we).find(({manipulator:e})=>e.hovering||e.grabbing||e.dragging)}_connectEdgeOffsetTooltipOnHover(e){const{_operations:t,object:i}=this;if(!t)return;const{elevationInfo:n}=i,a=Q(t.data.coordinateHelper,e.handle,n);this._selectEdgeOffsetArrow(e,a),this.addHandles([this._initializeEdgeOffsetVisualElement(e,i,n,t),this._connectEdgeOffsetTooltip(e,a,t,()=>{this.removeHandles(a),this._exitEdgeOffsetInputMode()})],a)}_splitEdgesBeforeEdgeOffset(e,t){if(t.requiresSplitEdgeLeft){const t=this._getManipulatorInfoFromHandle(e.handle.leftVertex.leftSegment);null!=t&&this._splitEdgeManipulator(t,1)}if(t.requiresSplitEdgeRight){const t=this._getManipulatorInfoFromHandle(e.handle.rightVertex.rightSegment);null!=t&&this._splitEdgeManipulator(t,0)}}_selectEdgeOffsetArrow(e,t){const i=e.grabMapPoint??K(this.view.inputManager?.latestPointerInfo?.location,this.view,this.object,e);i&&t.selectArrowFromStartPoint(i)}_connectEdgeOffsetTooltip(e,t,i,n){const a=()=>this.tooltipInfos.edgeOffset.distance.actual,s=a=>{n(),queueMicrotask(()=>{this.view.focus();const n=i.createUndoGroup();this._tooltipCallbacks.onReshapeStart?.(),this._splitEdgesBeforeEdgeOffset(e,t),this._offsetEdge(e,t,te(a,e.manipulator.location,t,i)),this._tooltipCallbacks.onReshape?.(),this._tooltipCallbacks.onReshapeStop?.(),this._cleanEdgeOffsetCollapsedEdges(e,i),n.remove()})},r=()=>{const e=a();null!=e?s(e):n()};return o([m(()=>this.tooltip&&!this.tooltip.focused,()=>r(),g),this.tooltip.on("discard",n),this.tooltip.on("commit",e=>{"commit-and-exit"===e.type&&r()})])}_createVertexOrEdgeManipulator(e,t=this.object.elevationInfo,i=!1){const n=this.view,a=this._operations,s=this._settings;if(!a)return null;const r=a.data.type,l=a.data.spatialReference;if("line"===e.type){if(this.enableEdgeOffset)return this._createEdgeOffsetManipulator(e,t);if(!this.enableMidpoints)return null}if(null==this._vertexManipulatorGeometry||null==this._vertexManipulatorOutlineGeometry){const{size:e,outlineSize:t}=Ie(s.manipulators.vertex);this._vertexManipulatorGeometry=pe(this._vertexManipulatorMaterial,e,16,16),this._vertexManipulatorOutlineGeometry=pe(this._vertexManipulatorOutlineMaterial,t,16,16)}if(null==this._edgeManipulatorGeometry||null==this._edgeManipulatorOutlineGeometry){const{size:e,outlineSize:t}=Ie(s.manipulators.edge);this._edgeManipulatorGeometry=pe(this._edgeManipulatorMaterial,e,16,16),this._edgeManipulatorOutlineGeometry=pe(this._edgeManipulatorOutlineMaterial,t,16,16)}const d="point"===r||"mesh"===r?[]:[new C(this._vertexManipulatorGeometry.instantiate(),4|Ge),new C(this._vertexManipulatorOutlineGeometry.instantiate(),5|Ge),new C(this._vertexManipulatorOutlineGeometry.instantiate({material:this._vertexManipulatorHoverOutlineMaterial}),6|Ge),new C(this._vertexManipulatorGeometry.instantiate({material:this._selectedManipulatorMaterial}),8),new C(this._vertexManipulatorOutlineGeometry.instantiate({material:this._selectedManipulatorOutlineMaterial}),9),new C(this._vertexManipulatorOutlineGeometry.instantiate({material:this._selectedManipulatorHoverOutlineMaterial}),10)];this.enableMidpoints&&d.push(new C(this._edgeManipulatorGeometry.instantiate({material:this._vertexManipulatorMaterial}),6|Ae),new C(this._edgeManipulatorOutlineGeometry.instantiate({material:this._vertexManipulatorHoverOutlineMaterial}),6|Ae),new C(this._edgeManipulatorGeometry.instantiate(),5|Ae),new C(this._edgeManipulatorOutlineGeometry.instantiate(),5|Ae));const h=new G({view:n,renderObjects:d,elevationInfo:t,focusMultiplier:1,touchMultiplier:1,available:this.object.visible,metadata:{deleting:!1},location:He(l)});h.selected=i,this._setTypeSpecificManipulatorSettings(h,e,t);const u="vertex"===e.type?{manipulator:h,handle:e,type:"vertex",selectedIndex:0}:{manipulator:h,handle:e,locationUpdateHandle:null,type:"edge",selectedIndex:0};if(this._manipulatorInfos.push(u),this.manipulators.add(h),this._updateManipulatorPosition(u),"edge"===u.type){const e=[];for(const t of[u.handle.leftVertex,u.handle.rightVertex]){const i=this._getManipulatorInfoFromHandle(t);null!=i&&e.push(i.manipulator.events.on("location-update",()=>this._updateManipulatorPosition(u)))}u.locationUpdateHandle=o(e),this._manipulatorHandles.add(u.locationUpdateHandle,h)}this._manipulatorHandles.add(this._watchAndUpdateGrabState(h,!0),h);const c=ce(h,(e,i,o,s)=>{let r=null;const{snappingStep:d,cancelSnapping:h}=ve({predicate:()=>!this._isMultiVertexSelection(),snappingManager:this.tool.snappingManager,snappingContext:new _e({editGeometryOperations:a,elevationInfo:t,pointer:s,excludeFeature:this.object.graphic,visualizer:new L}),updatingHandles:this._updatingHandles,useZ:!1});o.next(t=>(this._onDragCancel(!e.metadata.deleting,()=>r=p(r)),t)).next(h);const{elevationAlignedLocation:c}=e,m=this.object.graphic??void 0;i.next(e=>this._trackNumDragging(e)).next(e=>{if("start"===e.action&&a&&(r=a.createUndoGroup()),"edge"===u.type){const t=this._splitEdgeManipulator(u);return{...e,info:t,snapOrigin:t.handle.pos}}return{...e,info:u,snapOrigin:u.handle.pos}}).next(me(n,c)).next(R(n,c,t,l,m)).next(he(n,t,m)).next(...d).next(ue()).next(e=>{this._perVertexManipulatorDragAction(e),"end"===e.action&&(r=p(r)),this._resetTooltip()})});return this._manipulatorHandles.add([c,h.events.on("immediate-click",e=>this._manipulatorClickCallback(e,u)),h.events.on("select-changed",()=>{u.selectedIndex=++this._selectedIndex,this._updateMoveManipulationPosition(),this._resetTooltip()}),h.events.on("focus-changed",()=>{this._resetTooltip()})],h),this.events.emit("manipulators-changed"),u}_trackNumDragging(e){switch(e.action){case"start":this._numDragging++;break;case"end":this._numDragging--}return e}_onDragCancel(e=!0,t){switch(this._numDragging--,e&&this.undo(),this.tool.snappingManager?.doneSnapping(),this._resetTooltip(),this._reshapeEventState){case 0:break;case 1:this.events.emit("move",{type:"move",dx:0,dy:0,object:this.object});break;case 2:this.events.emit("reshape",{type:"reshape",object:this.object})}t?.(),this.destroyed||this._updateEventState(0)}_setTypeSpecificManipulatorSettings(e,t,i){const n=this._settings;switch(t.type){case"vertex":{e.state=Ge,e.selectable=!0,e.cursor="move",e.collisionPriority=2;const{size:t,collisionPadding:a}=n.manipulators.vertex;e.radius=t/2+a,e.elevationInfo=i;const o=this._operations?.data.type;e.interactive=null!=o&&"point"!==o&&"mesh"!==o;break}case"line":{e.state=Ae,e.selectable=!1,e.cursor="copy",e.collisionPriority=-1;const{size:t,collisionPadding:a}=n.manipulators.edge;e.radius=t/2+a,e.elevationInfo="on-the-ground"!==i.mode||T(this.object.graphic?.symbol)?{mode:"absolute-height",offset:0}:i;break}}}_watchAndUpdateGrabState(e,t){return e.events.on("grab-changed",i=>{this._onGrabStateChanged(e,t,i.action,i.pointerType)})}_onGrabStateChanged(e,t,i,n="mouse"){if(!this._recreatingManipulators){if("start"===i)t&&this._updateSelection(e),this._numGrabbing++;else if(this._numGrabbing--,this._updateEventState(0),this.destroyed)return;this._moveManipulation.interactive=!this._numGrabbing,("touch"!==n||this.enableEdgeOffset)&&(this._manipulatorInfos.forEach(e=>{const{manipulator:t}=e,i=this._operations?.data.type;t.interactive=t.grabbing||!this._numGrabbing&&null!=i&&"point"!==i&&"mesh"!==i,we(e)&&(e.edgeManipulator.interactive=e.edgeManipulator.grabbing||!this._numGrabbing)}),this._objectMoveManipulation.forEachManipulator(e=>{e.interactive=e.grabbing||!this._numGrabbing}))}}_clearSelection(){for(const e of this._manipulatorInfos)e.manipulator.grabbing||(e.manipulator.selected=!1);this._pendingEdgeOffsetInfo=null}_updateSelection(e){e.grabbing&&!e.selected&&e.selectable&&(this._clearSelection(),e.selected=!0,this.events.emit("manipulators-changed"))}_removeManipulator(e){null!=e&&(e.manipulator.metadata.deleting=!0,this.manipulators.remove(e.manipulator),this._manipulatorHandles.remove(e.manipulator),i(this._manipulatorInfos,e),this.events.emit("manipulators-changed"),this._resetTooltip())}_getManipulatorInfoFromHandle(e){return this._manipulatorInfos.find(t=>t.handle===e)}_updateManipulatorPositions(e){for(const t of e)this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(t))}_updateManipulatorPosition(e){const t=this._operations;if(null!=e&&t)if("vertex"===e.type)e.manipulator.location=t.data.coordinateHelper.vectorToDehydratedPoint(e.handle.pos,Ve),e.manipulator.grabbing&&null!=this._vertexLaserLineVisualElement&&(this._vertexLaserLineVisualElement.visualElement.intersectsWorldUpAtLocation=e.manipulator.renderLocation);else if("edge"===e.type){const i=this._getManipulatorInfoFromHandle(e.handle.leftVertex),n=this._getManipulatorInfoFromHandle(e.handle.rightVertex);if(null==i||null==n)return;const a=i.manipulator,o=n.manipulator;if("on-the-ground"===e.manipulator.elevationInfo?.mode){const i=a.location,n=o.location,s=.5,r=i.x+s*(n.x-i.x),l=i.y+s*(n.y-i.y),p=i.hasZ&&n.hasZ?0:void 0;e.manipulator.location=D(r,l,p,t.data.spatialReference)}else x(De,a.renderLocation,o.renderLocation,.5),e.manipulator.renderLocation=De}}_splitEdgeManipulator(e,t=.5){const i=this._operations,n=i.splitSegment(e.handle,t).createdVertex;e.locationUpdateHandle=p(e.locationUpdateHandle);const a=this.object.elevationInfo;let o;this.enableEdgeOffset?(this._removeManipulator(e),o=this._createVertexOrEdgeManipulator(n)):(o=e,o.handle=n,o.type="vertex",this._setTypeSpecificManipulatorSettings(e.manipulator,e.handle,a)),"line"===n.leftSegment?.type&&this._createVertexOrEdgeManipulator(n.leftSegment),"line"===n.rightSegment?.type&&this._createVertexOrEdgeManipulator(n.rightSegment),this._updateManipulatorPosition(o),this.enableEdgeOffset||this._resetTooltip(),this._updateSelection(e.manipulator);const s=this._updateEventState(2),r=i.data.coordinateHelper.vectorToArray(o.handle.pos),l=i.data.parts.indexOf(n.part);return this.events.emit("vertex-add",{type:"vertex-add",object:this.object,vertices:[{coordinates:r,componentIndex:l,vertexIndex:n.index}],added:r}),s&&this._updateEventState(0),o}_updateMoveManipulationPosition(){const e=y(De,0,0,0);let t=0,i=!1,n=null,a=null;for(const r of this._manipulatorInfos)"vertex"===r.type&&(r.manipulator.selected?(t++,O(e,e,r.manipulator.renderLocation),null==n||r.selectedIndex>n.selectedIndex?(a=n,n=r):(null==a||r.selectedIndex>a.selectedIndex)&&(a=r)):i=!0);const o=this.object,s=this._operations?.data.geometry;if(0===t){const e=o.visible&&this.enableMoveObject;this._moveManipulation.xyManipulation.available=e,this._moveManipulation.xyAxisManipulation.available=e,this._moveManipulation.xyAxisManipulation.orthogonalAvailable=e,this._moveManipulation.zManipulation.available=e&&this.enableZShape&&B(this._operations,o.elevationInfo),this._moveManipulation.angle=Z(s),this._moveManipulation.radius=X.radiusForSymbol(o.graphic?.symbol)}else{const e=o.visible;this._moveManipulation.xyManipulation.available=e,this._moveManipulation.xyAxisManipulation.available=e,this._moveManipulation.zManipulation.available=e&&this.enableZVertex&&B(this._operations,this.object.elevationInfo),this._moveManipulation.xyAxisManipulation.orthogonalAvailable=e&&1!==t;let i=0;if(null!=n){const e=n.handle.pos,t=null!=a?a.handle.pos:n.handle.leftSegment?.leftVertex?n.handle.leftSegment.leftVertex.pos:null,o=null==a&&n.handle.rightSegment?.rightVertex?n.handle.rightSegment.rightVertex.pos:null;t&&o?this._moveManipulation.xyAxisManipulation.available=!1:t?i=Se(t,e):o&&(i=Se(e,o))}this._moveManipulation.angle=i,this._moveManipulation.radius=q}0!==t&&i?(E(e,e,1/t),Ve.spatialReference=this._operations.data.spatialReference,Ve.hasZ=!0,this.view.renderCoordsHelper.fromRenderCoords(e,Ve),this._moveManipulation.elevationAlignedLocation=Ve):null==this._outlineVisualElement||this.object.isDraped||null==this._outlineVisualElement.attachmentOrigin?k(this._moveManipulation,this.object):this._moveManipulation.elevationAlignedLocation=this._outlineVisualElement.attachmentOrigin}_removeVertices(e){const t=new Array,i=this._operations;if(i){for(const n of e){const e=n.handle.part;if("vertex"===n.type&&i.canRemoveVertex(e)){t.push(n.handle),this._removeManipulator(n),this._removeManipulator(this._getManipulatorInfoFromHandle(n.handle.leftSegment)),this._removeManipulator(this._getManipulatorInfoFromHandle(n.handle.rightSegment));const a=i.removeVertices([n.handle]),o=a.removedVertices?.[0].createdSegment;o&&"line"===o.type?this._createVertexOrEdgeManipulator(o):this.enableEdgeOffset&&e.vertices.length<=2&&this._removeManipulator(this._getManipulatorInfoFromHandle(e.segments[0]))}}if(t.length>0){const e=t.map(e=>{const t=i.data.parts.indexOf(e.part);return{coordinates:i.data.coordinateHelper.vectorToArray(e.pos),componentIndex:t,vertexIndex:e.index}}),n=this._updateEventState(2);if(this.destroyed)return;if(this.events.emit("vertex-remove",{type:"vertex-remove",object:this.object,removed:e.map(e=>e.coordinates),vertices:e}),this.destroyed)return;if(n&&(this._updateEventState(0),this.destroyed))return;this._updateMoveManipulationPosition()}}}_moveVertices(e,t,i=("start"===t.action?0:1)){const n=this._operations;if(n){e.length>0&&n.moveVertices(e.map(e=>e.handle),t.mapDeltaX,t.mapDeltaY,t.mapDeltaZ,i);for(const t of e)this._updateManipulatorPosition(t)}}_offsetEdge(e,t,i){if(!this._operations)return;const n=t.clone();n.distance=i,this._operations.updateVertices([e.handle.leftVertex,e.handle.rightVertex],n),this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(e.handle.leftVertex)),this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(e.handle.rightVertex))}_manipulatorClickCallback(e,t){e.shiftKey||this._clearSelection(),"vertex"===t.type&&(t.manipulator.selected=!t.manipulator.selected,this.enableDeleteVertices&&e.button===de.Right&&this._removeVertices([t])),"edge"===t.type&&e.button===de.Left&&this._splitEdgeManipulator(t),e.stopPropagation()}_updateTranslateTooltip(e,t){null!=this._defaultTooltipInfo?this._resetTooltip():this._updateTranslateObjectTooltip(e,t)}_updateTranslateObjectTooltip(e,t){this._pendingEdgeOffsetInfo||(this.activeTooltipInfo=ae(e,t,this._tooltipsContext,this._updatingHandles))}_updateEdgeOffsetTooltip(e){this._pendingEdgeOffsetInfo||(this.activeTooltipInfo=oe(this.object,e,this._tooltipsContext,this._updatingHandles))}_resetTooltip(){const e=this.activeTooltipInfo;if(this._pendingEdgeOffsetInfo&&"reshape-edge-offset"===e?.type)return;let t=null;t=this._pendingEdgeOffsetInfo||null!=this._findActiveEdgeOffsetManipulatorInfo()?oe(this.object,null,this._tooltipsContext,this._updatingHandles):this._defaultTooltipInfo,t!==e&&(null!=e&&null!=t&&"input"===this.tooltip.mode||(this.activeTooltipInfo=t))}get _defaultTooltipInfo(){const e=this._operations?.data.type;switch(e){case"polyline":case"polygon":return this._selectedVertexManipulatorInfo?this.tooltipInfos.selectedVertex:null;case"point":case"mesh":return this.tooltipInfos.movePoint;default:return null}}get _selectedVertexManipulatorInfo(){const e=this._manipulatorInfos.filter(e=>"vertex"===e.type&&e.manipulator.selected);return 1===e.length?e[0]:null}get _tooltipsContext(){const{tooltipInfos:e,activeTooltipInfo:t}=this;return{sketchOptions:this._sketchOptions,tooltipInfos:e,activeTooltipInfo:t,selectedVertexManipulatorInfo:this._selectedVertexManipulatorInfo,callbacks:this._tooltipCallbacks,measurementWorker:this._measurementWorker}}get test(){}};function je(){return e=>{const{operation:t,mapEnd:i}=e;return null==t||null==i?e:{...e,signedDistance:t.signedDistanceToPoint(i)}}}function Ie(e){const t=e.size/2,i=t+e.collisionPadding;return{size:t/i,outlineSize:(t+e.outlineSize)/i}}function Se(e,t){return Math.atan2(t[1]-e[1],t[0]-e[0])+Math.PI/2}function He(e){return new H({x:0,y:0,z:0,spatialReference:e})}function we(e){return"edge"===e.type&&"edgeManipulator"in e}e([f()],Ee.prototype,"_numGrabbing",void 0),e([f()],Ee.prototype,"_numDragging",void 0),e([f()],Ee.prototype,"_pendingEdgeOffsetInfo",void 0),e([f()],Ee.prototype,"_operations",null),e([f()],Ee.prototype,"_segmentLabels",void 0),e([f({constructOnly:!0})],Ee.prototype,"tool",void 0),e([f()],Ee.prototype,"tooltip",void 0),e([f()],Ee.prototype,"activeTooltipInfo",void 0),e([f({readOnly:!0})],Ee.prototype,"updating",null),e([f()],Ee.prototype,"manipulators",null),e([f()],Ee.prototype,"view",null),e([f()],Ee.prototype,"object",null),e([f()],Ee.prototype,"enableZShape",null),e([f()],Ee.prototype,"enableDeleteVertices",null),e([f()],Ee.prototype,"enableZVertex",null),e([f()],Ee.prototype,"autoHideManipulators",null),e([f()],Ee.prototype,"enableMoveObject",null),e([f()],Ee.prototype,"enableMidpoints",null),e([f()],Ee.prototype,"enableEdgeOffset",null),e([f()],Ee.prototype,"_sketchOptions",null),e([f()],Ee.prototype,"_accentColor",null),e([f()],Ee.prototype,"_tooltipsContext",null),Ee=e([_("esri.views.3d.interactive.editingTools.reshape.ReshapeOperation")],Ee);const Ve=D(0,0,void 0,V.WGS84),De=I(),Te=1e-6,Ge=16,Ae=32;export{Ee as ReshapeOperation};
2
+ import{__decorate as e}from"tslib";import t from"../../../../../core/Accessor.js";import{removeUnordered as i}from"../../../../../core/arrayUtils.js";import{EventEmitter as n}from"../../../../../core/Evented.js";import a from"../../../../../core/Handles.js";import{handlesGroup as o,makeHandle as s,destroyHandle as r}from"../../../../../core/handleUtils.js";import"../../../../../core/has.js";import{destroyMaybe as l,removeMaybe as p}from"../../../../../core/maybe.js";import{watch as h,initial as d,on as u,syncAndInitial as c,when as m,sync as f}from"../../../../../core/reactiveUtils.js";import{property as g,subclass as _}from"../../../../../core/accessorSupport/decorators.js";import{IDENTITY as v}from"../../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{length as M,subtract as b,lerp as x,set as y,add as O,scale as E}from"../../../../../core/libs/gl-matrix-2/math/vec3.js";import{fromValues as j,create as I}from"../../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as S}from"../../../../../core/support/UpdatingHandles.js";import H from"../../../../../geometry/Point.js";import w from"../../../../../geometry/Polyline.js";import V from"../../../../../geometry/SpatialReference.js";import{makeDehydratedPoint as A}from"../../../../../layers/graphics/dehydratedPoint.js";import{isVolumetricSymbol as D}from"../../../../../symbols/support/utils.js";import{Manipulator3D as T}from"../../Manipulator3D.js";import{createManipulatorMaterial as G,createManipulatorOutlineMaterial as P,placeAtObject as k}from"../../manipulatorUtils.js";import{RenderObject as C}from"../../RenderObject.js";import{SegmentLabels3D as U}from"../../SegmentLabels3D.js";import{SnappingVisualizer3D as R}from"../../SnappingVisualizer3D.js";import{screenToMapXYAtLocation as L,screenToRenderPlaneFromEvent as z,convertToMapCoordinates as F}from"../dragEventPipeline3D.js";import{orientation as Z}from"../geometryUtils.js";import{canMoveZOperations as B}from"../manipulatorUtils.js";import{Settings as W}from"../settings.js";import{createVisualElements as N}from"../visualElementUtils.js";import{discRadiusSmall as q}from"../manipulations/config.js";import{MoveManipulation as X}from"../manipulations/MoveManipulation.js";import{MoveXYObjectManipulation as Y}from"../manipulations/MoveXYObjectManipulation.js";import{getMapPointAtEdgeOffsetManipulatorElevation as K,createEdgeOffsetIntersectionPlane as J,createEdgeOffsetOperation as Q,edgeOffsetRotationMatrix as $,screenEdgeLengthSquared as ee,getDistanceInGeometrySR as te}from"./edgeOffsetUtils.js";import{createTooltipInfos as ie,connectTooltipToManipulatedObject as ne,getUpdatedTranslateObjectTooltipInfo as ae,getUpdatedEdgeOffsetTooltipInfo as oe}from"./reshapeTooltipUtils3D.js";import{OutlineVisualElement as se}from"../../visualElements/OutlineVisualElement.js";import{createElevationUpdateHandle as re}from"../../../support/elevationUpdateUtils.js";import{createExtrudedTriangle as le,createSphereGeometry as pe}from"../../../webgl-engine/lib/GeometryUtil.js";import{mouseButtons as he}from"../../../../input/mouseButtons.js";import{sceneSnappingAtLocation as de,addMapDelta as ue,createManipulatorDragEventPipeline as ce,dragAtLocation as me,addScreenDelta as fe}from"../../../../interactive/dragEventPipeline.js";import{tooltipKeys as ge}from"../../../../interactive/keybindings.js";import{SnappingContext as _e}from"../../../../interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as ve}from"../../../../interactive/snapping/SnappingDragPipelineStep.js";import{makeTooltip as Me,enterInputModeIfAvailable as be}from"../../../../interactive/tooltip/tooltipCommonUtils.js";import{GeometryWorkerHandle as xe}from"../../../../support/GeometryWorkerHandle.js";const ye=Symbol(),Oe=Symbol();let Ee=class extends t{get _operations(){return this.object.operations}constructor(e){super(e),this._selectedIndex=0,this._manipulatorHandles=new a,this._manipulatorInfos=[],this._numGrabbing=0,this._numDragging=0,this._reshapeEventState=0,this._pendingEdgeOffsetInfo=null,this._updatingHandles=new S,this._recreatingManipulators=!1,this._settings=new W({getTheme:()=>this.view.effectiveTheme}),this.events=new n,this.activeTooltipInfo=null,this._measurementWorker=new xe({preloadGeodetic:!0}),this._vertexLaserLineVisualElement=null,this._tooltipCallbacks={onBeforeReshape:()=>this.tool.endDrag(),onReshapeStart:()=>this._updateEventState(2),onReshape:()=>this.events.emit("reshape",{type:"reshape",object:this.object}),onReshapeStop:()=>this._updateEventState(0,{forceEnd:!0}),onMoveStart:()=>this._updateEventState(1),onMove:()=>this.events.emit("move",{type:"move",object:this.object,dx:0,dy:0}),onMoveStop:()=>this._updateEventState(0,{forceEnd:!0})}}initialize(){const{view:e}=this,t=this._settings.manipulators,i=t.vertex;this.tooltipInfos=ie(this._sketchOptions,e),this._vertexManipulatorMaterial=G(i.color.toUnitRGBA(),i.renderOccluded),this._vertexManipulatorOutlineMaterial=P(i.outlineColor.toUnitRGBA(),i.renderOccluded),this._vertexManipulatorHoverOutlineMaterial=P(i.hoverOutlineColor.toUnitRGBA(),i.renderOccluded);const n=t.edge;this._edgeManipulatorMaterial=G(n.color.toUnitRGBA(),n.renderOccluded),this._edgeManipulatorOutlineMaterial=P(n.outlineColor.toUnitRGBA(),n.renderOccluded);const a=t.edgeOffset;this._edgeOffsetManipulatorMaterial=G(a.color.toUnitRGBA(),a.renderOccluded,!1),this._edgeOffsetManipulatorHoverMaterial=G(a.hoverColor.toUnitRGBA(),a.renderOccluded,!1);const o=t.selected;this._selectedManipulatorMaterial=G(o.color.toUnitRGBA(),o.renderOccluded),this._selectedManipulatorOutlineMaterial=P(o.outlineColor.toUnitRGBA(),o.renderOccluded),this._selectedManipulatorHoverOutlineMaterial=P(o.hoverOutlineColor.toUnitRGBA(),o.renderOccluded),this.tooltip=Me(()=>({view:e,options:this._sketchOptions.tooltips})),this.addHandles([h(()=>{const e=this._settings.manipulators;return{vertexSettings:e.vertex,edgeSettings:e.edge,edgeOffsetSettings:e.edgeOffset,selectedSettings:e.selected}},({vertexSettings:e,edgeSettings:t,edgeOffsetSettings:i,selectedSettings:n})=>{e.applyColor(this._vertexManipulatorMaterial),e.applyOutline(this._vertexManipulatorOutlineMaterial),e.applyHoverOutline(this._vertexManipulatorHoverOutlineMaterial),t.applyColor(this._edgeManipulatorMaterial),t.applyOutline(this._edgeManipulatorOutlineMaterial),i.applyColor(this._edgeOffsetManipulatorMaterial),i.applyHover(this._edgeOffsetManipulatorHoverMaterial),n.applyColor(this._selectedManipulatorMaterial),n.applyOutline(this._selectedManipulatorOutlineMaterial),n.applyHoverOutline(this._selectedManipulatorHoverOutlineMaterial)}),h(()=>this.object.visible,e=>{for(const t of this._manipulatorInfos)t.manipulator.available=e,we(t)&&(t.edgeManipulator.available=e)}),h(()=>this._numGrabbing+this._numDragging===0,e=>this._toggleAutoHideManipulators(e)),h(()=>({labels:this._segmentLabels,enabled:this._sketchOptions.labels.enabled,edgeOffsetEnabled:this.enableEdgeOffset}),({labels:e,enabled:t,edgeOffsetEnabled:i})=>{null!=e&&(e.visible=t,e.edgeDistance=i?"far":"default")},d),ne(this.tooltip,this.object,()=>this._tooltipsContext,this._updatingHandles),h(()=>this.tooltip.mode,(e,t)=>{"input"===t&&"input"!==e&&this._resetTooltip()}),u(()=>this._operations,"vertex-update",e=>this._updateManipulatorPositions(e.vertices),{onListenerAdd:()=>this._recreateManipulators()}),u(()=>this._operations?.data,"change",e=>{"undo"!==e.operation&&"redo"!==e.operation||this._recreateManipulators()})])}destroy(){this._removeManipulators(),this._updatingHandles.destroy(),this._segmentLabels=l(this._segmentLabels),this.tooltip=l(this.tooltip),this._measurementWorker.destroy()}get updating(){return this._updatingHandles.updating||!!this._segmentLabels?.updating}get manipulators(){return this.tool.manipulators}get view(){return this.tool.view}get object(){return this.tool.object}get enableZShape(){return this.tool.enableZShape}get enableDeleteVertices(){return this.tool.enableDeleteVertices}get enableZVertex(){return this.tool.enableZVertex}get autoHideManipulators(){return this.tool.autoHideManipulators}get enableMoveObject(){return this.tool.enableMoveObject}get enableMidpoints(){return this.tool.enableMidpoints}get enableEdgeOffset(){return this.tool.enableEdgeOffset}get _sketchOptions(){return this.tool.sketchOptions}get _accentColor(){return this.view.effectiveTheme.accentColor}enterInputModeIfAvailable(e){return"key-down"===e.type&&e.key===ge.enterInputMode&&("reshape-edge-offset"===this.activeTooltipInfo?.type?this._enterInputModeDuringEdgeOffset(e):!!be(e,this.tooltip)&&(this.tool.endDrag(),!0))}removeSelectedVertices(){const e=this._manipulatorInfos.filter(e=>e.manipulator.selected&&"vertex"===e.type);return this._removeVertices(e),e.length}onManipulatorSelectionChanged(){this.events.emit("manipulators-changed")}clearSelection(){let e=!1;for(const t of this._manipulatorInfos)if(t.manipulator.selected){e=!0;break}e&&(this._clearSelection(),this._updateMoveManipulationPosition(),this.events.emit("manipulators-changed"))}selectManipulator(e){if(null==this._manipulatorInfos.find(t=>t.manipulator===e)||!e.selectable)return!1;let t=e.selected;for(const i of this._manipulatorInfos)if(i.manipulator!==e&&i.manipulator.selected){t=!1;break}return t||(this._clearSelection(),e.selected=!0,this._updateMoveManipulationPosition(),this.events.emit("manipulators-changed")),!0}_removeManipulators(){this._manipulatorHandles.removeAll(),this._moveManipulation=l(this._moveManipulation),this._objectMoveManipulation=l(this._objectMoveManipulation),this.manipulators.removeAll(),this._manipulatorInfos=[],this._numGrabbing=0,this._numDragging=0}_createManipulators(e){if(null==this._operations)return;const t=this.object.elevationInfo;for(const{vertices:i,segments:n,index:a}of this._operations.data.parts){const o=e?.byPartIndex.get(a);for(const e of i){const i=o?.has(e.index);this._createVertexOrEdgeManipulator(e,t,i)}for(const e of n)"line"===e.type&&this._createVertexOrEdgeManipulator(e,t)}this._createObjectMoveManipulation(),this._createMoveManipulation(t),this._createVisualElements()}recordUndo(e){this._operations?.recordUndo(e,!0)}get canRedo(){return this._operations?.canRedo??!1}get canUndo(){return this._operations?.canUndo??!1}redo(){return this._operations?.redo()}undo(){return this.events.emit("undo"),this._operations?.undo()}_recreateManipulators(){if(!this._recreatingManipulators){if(this._recreatingManipulators=!0,this._removeManipulators(),this._resetTooltip(),this._operations&&this._segmentLabels?.context?.editGeometryOperations===this._operations||(this._segmentLabels=l(this._segmentLabels)),this._createManipulators(),!this._segmentLabels&&this._operations){const e=this._sketchOptions.labels;this._segmentLabels=new U({context:{view:this.view,editGeometryOperations:this._operations,elevationInfo:this.object.elevationInfo,labelOptions:e},visible:e.enabled})}this._recreatingManipulators=!1}}_perObjectManipulatorDragAction(e,t){if("end"===t.action)return t;let i=0;const n=[],a=this._manipulatorInfos.some(e=>"vertex"===e.type&&e.manipulator.selected),o=1===e&&a;for(const s of this._manipulatorInfos)"vertex"===s.type&&(s.manipulator.grabbing||o&&!s.manipulator.selected||n.push(s),i++);this._moveVertices(n,t);if(n.length===i){if(this._updateEventState(1),this.destroyed)return t;this.events.emit("move",{type:"move",dx:t.screenDeltaX,dy:t.screenDeltaY,object:this.object})}else{if(this._updateEventState(2),this.destroyed)return t;this.events.emit("reshape",{type:"reshape",object:this.object})}return t}_toggleAutoHideManipulators(e){this.autoHideManipulators&&(e?this.removeHandles(ye):this.tool.manipulators.forEach(({manipulator:e})=>{const t=e.disableDisplay?.();t&&this.addHandles(t,ye)}))}_isMultiVertexSelection(){return this._manipulatorInfos.reduce((e,t)=>"vertex"===t.type&&t.manipulator.selected?e+1:e,0)>1}_perVertexManipulatorDragAction(e){if(this._updateEventState(2),this.destroyed)return;const{mapDeltaX:t,mapDeltaY:i,mapDeltaZ:n}=e;if(!t&&!i&&!n)return;const a=[];for(const o of this._manipulatorInfos)"vertex"===o.type&&(o.manipulator.selected&&!o.manipulator.grabbing||o===e.info)&&a.push(o);this._moveVertices(a,e,1),this.events.emit("reshape",{type:"reshape",object:this.object})}_updateEventState(e,t={}){if(e===this._reshapeEventState)return!1;switch(e){case 0:if(!t.forceEnd&&(0!==this._numGrabbing||0!==this._numDragging))return!1;switch(this._reshapeEventState){case 1:this.events.emit("move",{type:"move-stop",dx:0,dy:0,object:this.object});break;case 2:this.events.emit("reshape",{type:"reshape-stop",object:this.object})}break;case 1:switch(this._reshapeEventState){case 0:this.events.emit("move",{type:"move-start",dx:0,dy:0,object:this.object});break;case 2:this.events.emit("reshape",{type:"reshape-stop",object:this.object}),this.destroyed||this.events.emit("move",{type:"move-start",dx:0,dy:0,object:this.object})}break;case 2:switch(this._reshapeEventState){case 0:this.events.emit("reshape",{type:"reshape-start",object:this.object});break;case 1:this.events.emit("move",{type:"move-stop",dx:0,dy:0,object:this.object}),this.destroyed||this.events.emit("reshape",{type:"reshape-start",object:this.object})}}if(this.destroyed)return!1;const i=this._reshapeEventState!==e;return this._reshapeEventState=e,i}_createObjectMoveManipulation(){const{tool:e,view:t,object:i,_operations:n}=this;if(n){if(this._objectMoveManipulation=new Y({tool:e,view:t,object:i}),this.enableMoveObject){let e=null;this._manipulatorHandles.add(this._objectMoveManipulation.createDragPipeline((t,i,a)=>{i.next(e=>this._trackNumDragging(e)).next(t=>("start"===t.action&&(e=n.createUndoGroup()),t)).next(e=>this._perObjectManipulatorDragAction(0,e)).next(e=>(this._updateTranslateObjectTooltip(0,e),e)).next(t=>{"end"===t.action&&(this._resetTooltip(),e=p(e))}),a.next(()=>this._onDragCancel(!0,()=>e=p(e)))})),this._objectMoveManipulation.forEachManipulator(e=>this._manipulatorHandles.add(this._watchAndUpdateGrabState(e,!1)))}else this._objectMoveManipulation.forEachManipulator(e=>{e.grabbable=!1,e.cursor=null});this._objectMoveManipulation.forEachManipulator(e=>this._manipulatorHandles.add(e.events.on("immediate-click",e=>{this._manipulatorInfos.some(e=>e.manipulator.selected)?this._clearSelection():this.events.emit("immediate-click",{...e,object:this.object}),e.stopPropagation()})))}}_createMoveManipulation(e){const{object:t,tool:i,view:n,_operations:a}=this;if(!a)return;this._moveManipulation=new X({tool:i,view:n,xyAvailable:!0,xyAxisAvailable:!0,zAvailable:this.enableZShape&&B(t.operations,t.elevationInfo),snapToScene:!1,radius:X.radiusForSymbol(t.graphic?.symbol)}),this._moveManipulation.forEachManipulator(e=>this.addHandles([e.events.on("immediate-click",t=>{this._moveManipulation.zManipulation.hasManipulator(e)||this._manipulatorInfos.some(e=>e.manipulator.selected)||this.events.emit("immediate-click",{...t,object:this.object}),t.stopPropagation()}),this._watchAndUpdateGrabState(e,!1)]));const o=e=>t=>{this.addHandles([t.events.on("focus-changed",({action:t})=>{"focus"===t?this._updateTranslateTooltip(e):this._resetTooltip()})])};this._moveManipulation.xyManipulation.forEachManipulator(o(0)),this._moveManipulation.xyAxisManipulation.forEachManipulator(o(1)),this._moveManipulation.zManipulation.forEachManipulator(o(2)),this._moveManipulation.elevationInfo={mode:"absolute-height",offset:0};const s=a.data.spatialReference;this.addHandles([this._moveManipulation.createDragPipeline((n,o,s,r,l)=>{const{snappingStep:p,cancelSnapping:h}=ve({predicate:e=>!!e.info,snappingManager:i.snappingManager,snappingContext:new _e({editGeometryOperations:a,elevationInfo:e,pointer:l,excludeFeature:t.graphic,visualizer:new R}),updatingHandles:this._updatingHandles,useZ:!1});return r=r.next(e=>(this._onDragCancel(),e)).next(h),{steps:s=s.next(e=>this._trackNumDragging(e)).next(e=>{const t=this._manipulatorInfos.filter(e=>"vertex"===e.type&&e.manipulator.selected);return 1===e.manipulatorType&&1===t.length?{...e,info:t[0],snapOrigin:t[0].handle.pos}:e}).next(de(this.view,e,t.graphic??void 0)).next(...p).next(ue()).next(e=>this._perObjectManipulatorDragAction(1,e)).next(e=>(this._updateTranslateTooltip(n,e),e)),cancel:r}},e,s,t.graphic),h(()=>t.visible,()=>this._updateMoveManipulationPosition(),d),t.on("committed",()=>{this._recreatingManipulators||this._updateMoveManipulationPosition()}),h(()=>t.isDraped,e=>{this._updateMoveManipulationPosition(),this.removeHandles(Oe),e&&this.addHandles(re({view:this.view,geometry:t.graphic?.geometry,elevationInfo:t.elevationInfo,onElevationChanges:()=>this._updateMoveManipulationPosition()}),Oe)},d)])}_createVisualElements(){const{object:e,view:t}=this,i=N({view:t,object:e,forEachManipulator:e=>{if(!this.destroyed&&!this._recreatingManipulators){this._objectMoveManipulation.forEachManipulator(e),this._moveManipulation.forEachManipulator(e);for(const t of this._manipulatorInfos)e(t.manipulator,1)}},onManipulatorsChanged:e=>this.events.on("manipulators-changed",e)});null!=i&&(this._outlineVisualElement=i.visualElement instanceof se?i.visualElement:null);const n=this._outlineVisualElement;if(null!=n){const t=()=>{e.isDraped||this._updateMoveManipulationPosition()};this._manipulatorHandles.add(u(()=>n.events,"attachment-origin-changed",t,{onListenerAdd:t}))}this._manipulatorHandles.add(i)}_createEdgeOffsetManipulator(e,t=this.object.elevationInfo){const i=this.view,n=this._operations;if(e.part.vertices.length<=2||!n)return null;const a=n.data.spatialReference,s=this._settings.manipulators.edgeOffset,r=s.size/2,l=r+s.collisionPadding,p=r/l,h=p/2,d=p*Math.sqrt(3)/2,{height:u,offset:c}=s,m=this._edgeOffsetManipulatorMaterial;if(!this._edgeOffsetManipulatorGeometryInside){const e=le(m,d,h,h,u,c);this._edgeOffsetManipulatorGeometryInside=e}if(!this._edgeOffsetManipulatorGeometryOutside){const e=le(m,-d,h,h,u,-c);this._edgeOffsetManipulatorGeometryOutside=e}const f=[new C(this._edgeOffsetManipulatorGeometryInside.instantiate(),1),new C(this._edgeOffsetManipulatorGeometryInside.instantiate({material:this._edgeOffsetManipulatorHoverMaterial}),2),new C(this._edgeOffsetManipulatorGeometryOutside.instantiate(),1),new C(this._edgeOffsetManipulatorGeometryOutside.instantiate({material:this._edgeOffsetManipulatorHoverMaterial}),2)],g=new T({view:i,renderObjects:f,elevationInfo:"on-the-ground"!==t.mode||D(this.object.graphic?.symbol)?{mode:"absolute-height",offset:0}:t,worldOriented:!1,focusMultiplier:1,radius:l,available:this.object.visible,collisionType:{type:"disc",direction:j(0,0,1)},collisionPriority:1,metadata:{deleting:!1},location:He(a)}),_=new T({view:i,worldSized:!0,worldOriented:!1,available:this.object.visible,collisionPriority:-10,cursor:this.enableMoveObject?"move":"default",metadata:{deleting:!1},location:He(a)}),v={manipulator:g,handle:e,locationUpdateHandle:null,type:"edge",selectedIndex:0,edgeManipulator:_,visibilityHandle:null};this._autoHideEdgeOffsetManipulator(v,s.minSquaredEdgeLength);const M=()=>this._updateEdgeOffsetManipulator(v);M(),v.locationUpdateHandle=o([e.leftVertex,e.rightVertex].map(e=>{const t=this._getManipulatorInfoFromHandle(e);return t?.manipulator.events.on("location-update",M)}));const b=e=>{this._manipulatorInfos.some(e=>e.manipulator.selected)?this._clearSelection():this.events.emit("immediate-click",{...e,object:this.object}),e.stopPropagation()};return this._manipulatorHandles.add([v.locationUpdateHandle,this._watchAndUpdateGrabState(g,!0),this._watchAndUpdateGrabState(_,!0),ce(g,this._createEdgeOffsetPipeline(v,t,n)),ce(_,this._createEdgePipeline(v,t,n)),_.events.on("immediate-click",b),g.events.on("immediate-click",b),g.events.on("focus-changed",()=>this._resetTooltip()),g.events.on("grab-changed",({screenPoint:e,action:t})=>{v.grabMapPoint="start"===t?K(e,this.view,this.object,v):null})],g),this._manipulatorInfos.push(v),this.manipulators.addMany([g,_]),this.events.emit("manipulators-changed"),v}_autoHideEdgeOffsetManipulator(e,t){const i=e.manipulator,n=e.edgeManipulator,a=()=>{e.visibilityHandle=p(e.visibilityHandle);const a=this._getManipulatorInfoFromHandle(e.handle.leftVertex),r=this._getManipulatorInfoFromHandle(e.handle.rightVertex),l=null!=a&&null!=r&&ee(a.manipulator.renderLocation,r.manipulator.renderLocation,this.view.state.camera)<t;(!i.focused&&!n.focused||l)&&(i.grabbable=!l,n.grabbable=!l,e.visibilityHandle=o([i.disableDisplay(),s(()=>{i.grabbable=!0,n.grabbable=this.enableMoveObject})]))};this._manipulatorHandles.add([i.events.on("focus-changed",a),n.events.on("focus-changed",a),s(()=>{p(e.visibilityHandle),n.metadata.deleting=!0,this.manipulators.remove(n)})],i),a()}_updateEdgeOffsetManipulator(e){if(!this._operations)return;this._updateManipulatorPosition(e);const{coordinateHelper:t}=this._operations.data,i=J(this.view,e.manipulator.elevationAlignedLocation,Q(t,e.handle,e.manipulator.elevationInfo)),n=this._getManipulatorInfoFromHandle(e.handle.leftVertex),a=this._getManipulatorInfoFromHandle(e.handle.rightVertex);if(null==n||null==a)return;const o=n.manipulator.renderLocation,s=a.manipulator.renderLocation,r=null!=i?$(i,o,s):v;e.manipulator.modelTransform=r,e.edgeManipulator.elevationAlignedLocation=e.manipulator.elevationAlignedLocation,e.edgeManipulator.modelTransform=r;const l=M(b(Ae,o,s))/2;e.edgeManipulator.collisionType={type:"line",paths:[[[-l,0,0],[l,0,0]]]}}_createEdgePipeline(e,t,i){return(n,a,o,s)=>{if("touch"===s){this._createEdgeOffsetPipeline(e,t,i)(n,a,o)}else if(this.enableMoveObject){const e=this.object.graphic,s=i.data.spatialReference,{elevationAlignedLocation:r}=n;a.next(e=>this._trackNumDragging(e)).next(me(this.view,r)).next(L(this.view,r,t,s,e)).next(fe()).next(ue()).next(e=>this._perObjectManipulatorDragAction(0,e)).next(e=>(this._updateTranslateObjectTooltip(0,e),e)).next(e=>{"end"===e.action&&this._resetTooltip()}),o.next(()=>this._onDragCancel(!n.metadata.deleting))}}}_createEdgeOffsetPipeline(e,t,i){return(n,a,o)=>{const s=this._pendingEdgeOffsetInfo;if(s?.manipulatorInfo===e&&"drag"!==s.mode)return void o.execute({action:"cancel"});this._clearSelection();const{initializeStep:r,cleanup:l}=this._initializeEdgeOffset(e,t,i,o),p=this._applyEdgeOffsetStep(e);a.next(e=>this._trackNumDragging(e)).next(me(this.view,n.elevationAlignedLocation)).next(r).next(z(this.view)).next(F(this.view,i.data.spatialReference)).next(ue()).next(je()).next(e=>this._pendingEdgeOffsetInfo?e:p(e)).next(e=>{"end"!==e.action||this._pendingEdgeOffsetInfo||l()}),o.next(()=>{this._exitEdgeOffsetInputMode(),n.metadata.deleting||(l(),this._onDragCancel())})}}_initializeEdgeOffset(e,t,i,n){const{view:a,object:s}=this,r=Q(i.data.coordinateHelper,e.handle,t),l=i.createUndoGroup(),h=J(a,e.manipulator.elevationAlignedLocation,r);let d;this._splitEdgesBeforeEdgeOffset(e,r),this._selectEdgeOffsetArrow(e,r);const u=()=>{this._cleanEdgeOffsetCollapsedEdges(e,i),d=p(d)},c=this.events.on("undo",u);return d=o([this._initializeEdgeOffsetVisualElement(e,s,t,i),l,c,this._connectEdgeOffsetTooltip(e,r,i,()=>{n.execute({action:"cancel"})})]),{initializeStep:e=>null==r||null==h?(u(),null):{...e,operation:r,plane:h},cleanup:u}}_initializeEdgeOffsetVisualElement(e,t,i,n){const a=()=>new w({paths:[[e.handle.leftVertex.pos,e.handle.rightVertex.pos]],spatialReference:n.data.spatialReference}),s=new se({view:this.view,isDraped:t.isDraped,geometry:a(),elevationInfo:i,width:this._settings.visualElements.lineObjects.outline.width,attached:!1,isDecoration:!0}),l=o([h(()=>({color:this._accentColor,draped:t.isDraped}),({color:e,draped:t})=>{s.color=e.toUnitRGBA(),s.isDraped=t},c),t.on("committed",()=>{s.geometry=a()}),r(s)]);return s.attached=!0,l}_applyEdgeOffsetStep(e){return t=>(this.destroyed||null==t.operation||!this._operations||(this._updateEventState(2),null==t.signedDistance?this._resetTooltip():((t.mapDeltaX||t.mapDeltaY||t.mapDeltaZ)&&(this._offsetEdge(e,t.operation,t.signedDistance),this.events.emit("reshape",{type:"reshape",object:this.object})),this._updateEdgeOffsetTooltip(t))),t)}_cleanEdgeOffsetCollapsedEdges(e,t){const i=e.handle.leftVertex.leftSegment?.leftVertex,n=e.handle.leftVertex,a=e.handle.rightVertex.rightSegment?.rightVertex,o=e.handle.rightVertex,s=t.data.coordinateHelper,r=this.view.pixelSizeAt(s.vectorToDehydratedPoint(n.pos),s.spatialReference),l=[];if(i&&s.distance(i.pos,n.pos)<De){const e=this._getManipulatorInfoFromHandle(n);null!=e&&l.push(e)}if(s.distance(n.pos,o.pos)<r||a&&s.distance(a.pos,o.pos)<De){const e=this._getManipulatorInfoFromHandle(o);null!=e&&l.push(e)}l.length&&this._removeVertices(l)}_enterInputModeDuringEdgeOffset(e){const t=this._findActiveEdgeOffsetManipulatorInfo();return!!t&&(!!be(e,this.tooltip)&&(t.manipulator.dragging?(this._pendingEdgeOffsetInfo={manipulatorInfo:t,mode:"drag"},!0):(this._clearSelection(),this._pendingEdgeOffsetInfo={manipulatorInfo:t,mode:"hover"},this._connectEdgeOffsetTooltipOnHover(t),!0)))}_exitEdgeOffsetInputMode(){this.tooltip&&(this._pendingEdgeOffsetInfo=null,this._resetTooltip(),this.tooltip.exitInputMode())}_findActiveEdgeOffsetManipulatorInfo(){return this._manipulatorInfos.filter(we).find(({manipulator:e})=>e.hovering||e.grabbing||e.dragging)}_connectEdgeOffsetTooltipOnHover(e){const{_operations:t,object:i}=this;if(!t)return;const{elevationInfo:n}=i,a=Q(t.data.coordinateHelper,e.handle,n);this._selectEdgeOffsetArrow(e,a),this.addHandles([this._initializeEdgeOffsetVisualElement(e,i,n,t),this._connectEdgeOffsetTooltip(e,a,t,()=>{this.removeHandles(a),this._exitEdgeOffsetInputMode()})],a)}_splitEdgesBeforeEdgeOffset(e,t){if(t.requiresSplitEdgeLeft){const t=this._getManipulatorInfoFromHandle(e.handle.leftVertex.leftSegment);null!=t&&this._splitEdgeManipulator(t,1)}if(t.requiresSplitEdgeRight){const t=this._getManipulatorInfoFromHandle(e.handle.rightVertex.rightSegment);null!=t&&this._splitEdgeManipulator(t,0)}}_selectEdgeOffsetArrow(e,t){const i=e.grabMapPoint??K(this.view.inputManager?.latestPointerInfo?.location,this.view,this.object,e);i&&t.selectArrowFromStartPoint(i)}_connectEdgeOffsetTooltip(e,t,i,n){const a=()=>this.tooltipInfos.edgeOffset.distance.actual,s=a=>{n(),queueMicrotask(()=>{this.view.focus();const n=i.createUndoGroup();this._tooltipCallbacks.onReshapeStart?.(),this._splitEdgesBeforeEdgeOffset(e,t),this._offsetEdge(e,t,te(a,e.manipulator.location,t,i)),this._tooltipCallbacks.onReshape?.(),this._tooltipCallbacks.onReshapeStop?.(),this._cleanEdgeOffsetCollapsedEdges(e,i),n.remove()})},r=()=>{const e=a();null!=e?s(e):n()};return o([m(()=>this.tooltip&&!this.tooltip.focused,()=>r(),f),this.tooltip.on("discard",n),this.tooltip.on("commit",e=>{"commit-and-exit"===e.type&&r()})])}_createVertexOrEdgeManipulator(e,t=this.object.elevationInfo,i=!1){const n=this.view,a=this._operations,s=this._settings;if(!a)return null;const r=a.data.type,l=a.data.spatialReference;if("line"===e.type){if(this.enableEdgeOffset)return this._createEdgeOffsetManipulator(e,t);if(!this.enableMidpoints)return null}if(null==this._vertexManipulatorGeometry||null==this._vertexManipulatorOutlineGeometry){const{size:e,outlineSize:t}=Ie(s.manipulators.vertex);this._vertexManipulatorGeometry=pe(this._vertexManipulatorMaterial,e,16,16),this._vertexManipulatorOutlineGeometry=pe(this._vertexManipulatorOutlineMaterial,t,16,16)}if(null==this._edgeManipulatorGeometry||null==this._edgeManipulatorOutlineGeometry){const{size:e,outlineSize:t}=Ie(s.manipulators.edge);this._edgeManipulatorGeometry=pe(this._edgeManipulatorMaterial,e,16,16),this._edgeManipulatorOutlineGeometry=pe(this._edgeManipulatorOutlineMaterial,t,16,16)}const h="point"===r||"mesh"===r?[]:[new C(this._vertexManipulatorGeometry.instantiate(),4|Te),new C(this._vertexManipulatorOutlineGeometry.instantiate(),5|Te),new C(this._vertexManipulatorOutlineGeometry.instantiate({material:this._vertexManipulatorHoverOutlineMaterial}),6|Te),new C(this._vertexManipulatorGeometry.instantiate({material:this._selectedManipulatorMaterial}),8),new C(this._vertexManipulatorOutlineGeometry.instantiate({material:this._selectedManipulatorOutlineMaterial}),9),new C(this._vertexManipulatorOutlineGeometry.instantiate({material:this._selectedManipulatorHoverOutlineMaterial}),10)];this.enableMidpoints&&h.push(new C(this._edgeManipulatorGeometry.instantiate({material:this._vertexManipulatorMaterial}),6|Ge),new C(this._edgeManipulatorOutlineGeometry.instantiate({material:this._vertexManipulatorHoverOutlineMaterial}),6|Ge),new C(this._edgeManipulatorGeometry.instantiate(),5|Ge),new C(this._edgeManipulatorOutlineGeometry.instantiate(),5|Ge));const d=()=>new T({view:n,renderObjects:h,elevationInfo:t,focusMultiplier:1,touchMultiplier:1,available:this.object.visible,metadata:{deleting:!1},location:He(l)});let u=null;"vertex"===e.type&&(u=this.object.createReshapeManipulator?.({vertex:e,defaultCreate:d,elevationInfo:t,selected:i})??null),u??=d(),u.selected=i,this._setTypeSpecificManipulatorSettings(u,e,t);const c="vertex"===e.type?{manipulator:u,handle:e,type:"vertex",selectedIndex:0}:{manipulator:u,handle:e,locationUpdateHandle:null,type:"edge",selectedIndex:0};if(this._manipulatorInfos.push(c),this.manipulators.add(u),this._updateManipulatorPosition(c),"edge"===c.type){const e=[];for(const t of[c.handle.leftVertex,c.handle.rightVertex]){const i=this._getManipulatorInfoFromHandle(t);null!=i&&e.push(i.manipulator.events.on("location-update",()=>this._updateManipulatorPosition(c)))}c.locationUpdateHandle=o(e),this._manipulatorHandles.add(c.locationUpdateHandle,u)}this._manipulatorHandles.add(this._watchAndUpdateGrabState(u,!0),u);const m=ce(u,(e,i,o,s)=>{let r=null;const{snappingStep:h,cancelSnapping:d}=ve({predicate:()=>!this._isMultiVertexSelection(),snappingManager:this.tool.snappingManager,snappingContext:new _e({editGeometryOperations:a,elevationInfo:t,pointer:s,excludeFeature:this.object.graphic,visualizer:new R}),updatingHandles:this._updatingHandles,useZ:!1});o.next(t=>(this._onDragCancel(!e.metadata.deleting,()=>r=p(r)),t)).next(d);const{elevationAlignedLocation:u}=e,m=this.object.graphic??void 0;i.next(e=>this._trackNumDragging(e)).next(e=>{if("start"===e.action&&a&&(r=a.createUndoGroup()),"edge"===c.type){const t=this._splitEdgeManipulator(c);return{...e,info:t,snapOrigin:t.handle.pos}}return{...e,info:c,snapOrigin:c.handle.pos}}).next(me(n,u)).next(L(n,u,t,l,m)).next(de(n,t,m)).next(...h).next(ue()).next(e=>{this._perVertexManipulatorDragAction(e),"end"===e.action&&(r=p(r)),this._resetTooltip()})});return this._manipulatorHandles.add([m,u.events.on("immediate-click",e=>this._manipulatorClickCallback(e,c)),u.events.on("select-changed",()=>{c.selectedIndex=++this._selectedIndex,this._updateMoveManipulationPosition(),this._resetTooltip()}),u.events.on("focus-changed",()=>{this._resetTooltip()})],u),this.events.emit("manipulators-changed"),c}_trackNumDragging(e){switch(e.action){case"start":this._numDragging++;break;case"end":this._numDragging--}return e}_onDragCancel(e=!0,t){switch(this._numDragging--,e&&this.undo(),this.tool.snappingManager?.doneSnapping(),this._resetTooltip(),this._reshapeEventState){case 0:break;case 1:this.events.emit("move",{type:"move",dx:0,dy:0,object:this.object});break;case 2:this.events.emit("reshape",{type:"reshape",object:this.object})}t?.(),this.destroyed||this._updateEventState(0)}_setTypeSpecificManipulatorSettings(e,t,i){const n=this._settings;switch(t.type){case"vertex":{e.selectable=!0,e.cursor="move",e.collisionPriority=2,e.elevationInfo=i;const t=this._operations?.data.type;if(e.interactive=null!=t&&"point"!==t&&"mesh"!==t,null==this.object.createReshapeManipulator){const{size:t,collisionPadding:i}=n.manipulators.vertex;e.radius=t/2+i,e.state=Te}break}case"line":{e.state=Ge,e.selectable=!1,e.cursor="copy",e.collisionPriority=-1;const{size:t,collisionPadding:a}=n.manipulators.edge;e.radius=t/2+a,e.elevationInfo="on-the-ground"!==i.mode||D(this.object.graphic?.symbol)?{mode:"absolute-height",offset:0}:i;break}}}_watchAndUpdateGrabState(e,t){return e.events.on("grab-changed",i=>{this._onGrabStateChanged(e,t,i.action,i.pointerType)})}_onGrabStateChanged(e,t,i,n="mouse"){if(!this._recreatingManipulators){if("start"===i)t&&this._updateSelection(e),this._numGrabbing++;else if(this._numGrabbing--,this._updateEventState(0),this.destroyed)return;this._moveManipulation.interactive=!this._numGrabbing,("touch"!==n||this.enableEdgeOffset)&&(this._manipulatorInfos.forEach(e=>{const{manipulator:t}=e,i=this._operations?.data.type;t.interactive=t.grabbing||!this._numGrabbing&&null!=i&&"point"!==i&&"mesh"!==i,we(e)&&(e.edgeManipulator.interactive=e.edgeManipulator.grabbing||!this._numGrabbing)}),this._objectMoveManipulation.forEachManipulator(e=>{e.interactive=e.grabbing||!this._numGrabbing}))}}_clearSelection(){for(const e of this._manipulatorInfos)e.manipulator.grabbing||(e.manipulator.selected=!1);this._pendingEdgeOffsetInfo=null}_updateSelection(e){e.grabbing&&!e.selected&&e.selectable&&(this._clearSelection(),e.selected=!0,this.events.emit("manipulators-changed"))}_removeManipulator(e){null!=e&&(e.manipulator.metadata.deleting=!0,this.manipulators.remove(e.manipulator),this._manipulatorHandles.remove(e.manipulator),i(this._manipulatorInfos,e),this.events.emit("manipulators-changed"),this._resetTooltip())}_getManipulatorInfoFromHandle(e){return this._manipulatorInfos.find(t=>t.handle===e)}_updateManipulatorPositions(e){for(const t of e)this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(t))}_updateManipulatorPosition(e){const t=this._operations;if(null!=e&&t)if("vertex"===e.type)e.manipulator.location=t.data.coordinateHelper.vectorToDehydratedPoint(e.handle.pos,Ve),e.manipulator.grabbing&&null!=this._vertexLaserLineVisualElement&&(this._vertexLaserLineVisualElement.visualElement.intersectsWorldUpAtLocation=e.manipulator.renderLocation);else if("edge"===e.type){const i=this._getManipulatorInfoFromHandle(e.handle.leftVertex),n=this._getManipulatorInfoFromHandle(e.handle.rightVertex);if(null==i||null==n)return;const a=i.manipulator,o=n.manipulator;if("on-the-ground"===e.manipulator.elevationInfo?.mode){const i=a.location,n=o.location,s=.5,r=i.x+s*(n.x-i.x),l=i.y+s*(n.y-i.y),p=i.hasZ&&n.hasZ?0:void 0;e.manipulator.location=A(r,l,p,t.data.spatialReference)}else x(Ae,a.renderLocation,o.renderLocation,.5),e.manipulator.renderLocation=Ae}}_splitEdgeManipulator(e,t=.5){const i=this._operations,n=i.splitSegment(e.handle,t).createdVertex;e.locationUpdateHandle=p(e.locationUpdateHandle);const a=this.object.elevationInfo;let o;this.enableEdgeOffset?(this._removeManipulator(e),o=this._createVertexOrEdgeManipulator(n)):(o=e,o.handle=n,o.type="vertex",this._setTypeSpecificManipulatorSettings(e.manipulator,e.handle,a)),"line"===n.leftSegment?.type&&this._createVertexOrEdgeManipulator(n.leftSegment),"line"===n.rightSegment?.type&&this._createVertexOrEdgeManipulator(n.rightSegment),this._updateManipulatorPosition(o),this.enableEdgeOffset||this._resetTooltip(),this._updateSelection(e.manipulator);const s=this._updateEventState(2),r=i.data.coordinateHelper.vectorToArray(o.handle.pos),l=i.data.parts.indexOf(n.part);return this.events.emit("vertex-add",{type:"vertex-add",object:this.object,vertices:[{coordinates:r,componentIndex:l,vertexIndex:n.index}],added:r}),s&&this._updateEventState(0),o}_updateMoveManipulationPosition(){const e=y(Ae,0,0,0);let t=0,i=!1,n=null,a=null;for(const r of this._manipulatorInfos)"vertex"===r.type&&(r.manipulator.selected?(t++,O(e,e,r.manipulator.renderLocation),null==n||r.selectedIndex>n.selectedIndex?(a=n,n=r):(null==a||r.selectedIndex>a.selectedIndex)&&(a=r)):i=!0);const o=this.object,s=this._operations?.data.geometry;if(0===t){const e=o.visible&&this.enableMoveObject;this._moveManipulation.xyManipulation.available=e,this._moveManipulation.xyAxisManipulation.available=e,this._moveManipulation.xyAxisManipulation.orthogonalAvailable=e,this._moveManipulation.zManipulation.available=e&&this.enableZShape&&B(this._operations,o.elevationInfo),this._moveManipulation.angle=Z(s),this._moveManipulation.radius=X.radiusForSymbol(o.graphic?.symbol)}else{const e=o.visible;this._moveManipulation.xyManipulation.available=e,this._moveManipulation.xyAxisManipulation.available=e,this._moveManipulation.zManipulation.available=e&&this.enableZVertex&&B(this._operations,this.object.elevationInfo),this._moveManipulation.xyAxisManipulation.orthogonalAvailable=e&&1!==t;let i=0;if(null!=n){const e=n.handle.pos,t=null!=a?a.handle.pos:n.handle.leftSegment?.leftVertex?n.handle.leftSegment.leftVertex.pos:null,o=null==a&&n.handle.rightSegment?.rightVertex?n.handle.rightSegment.rightVertex.pos:null;t&&o?this._moveManipulation.xyAxisManipulation.available=!1:t?i=Se(t,e):o&&(i=Se(e,o))}const s=n?.handle,r=s?o.getReshapeMoveConfig?.({vertex:s,numSelected:t})??null:null;switch(r?.xyAxisMode){case"all":this._moveManipulation.xyAxisManipulation.available=e,this._moveManipulation.xyAxisManipulation.orthogonalAvailable=e;break;case"hidden":this._moveManipulation.xyAxisManipulation.available=!1,this._moveManipulation.xyAxisManipulation.orthogonalAvailable=!1}this._moveManipulation.angle=r?.angle??i,this._moveManipulation.radius=q}0!==t&&i?(E(e,e,1/t),Ve.spatialReference=this._operations.data.spatialReference,Ve.hasZ=!0,this.view.renderCoordsHelper.fromRenderCoords(e,Ve),this._moveManipulation.elevationAlignedLocation=Ve):null==this._outlineVisualElement||this.object.isDraped||null==this._outlineVisualElement.attachmentOrigin?k(this._moveManipulation,this.object):this._moveManipulation.elevationAlignedLocation=this._outlineVisualElement.attachmentOrigin}_removeVertices(e){const t=new Array,i=this._operations;if(i){for(const n of e){const e=n.handle.part;if("vertex"===n.type&&i.canRemoveVertex(e)){t.push(n.handle),this._removeManipulator(n),this._removeManipulator(this._getManipulatorInfoFromHandle(n.handle.leftSegment)),this._removeManipulator(this._getManipulatorInfoFromHandle(n.handle.rightSegment));const a=i.removeVertices([n.handle]),o=a.removedVertices?.[0].createdSegment;o&&"line"===o.type?this._createVertexOrEdgeManipulator(o):this.enableEdgeOffset&&e.vertices.length<=2&&this._removeManipulator(this._getManipulatorInfoFromHandle(e.segments[0]))}}if(t.length>0){const e=t.map(e=>{const t=i.data.parts.indexOf(e.part);return{coordinates:i.data.coordinateHelper.vectorToArray(e.pos),componentIndex:t,vertexIndex:e.index}}),n=this._updateEventState(2);if(this.destroyed)return;if(this.events.emit("vertex-remove",{type:"vertex-remove",object:this.object,removed:e.map(e=>e.coordinates),vertices:e}),this.destroyed)return;if(n&&(this._updateEventState(0),this.destroyed))return;this._updateMoveManipulationPosition()}}}_moveVertices(e,t,i=("start"===t.action?0:1)){const n=this._operations;if(n){e.length>0&&n.moveVertices(e.map(e=>e.handle),t.mapDeltaX,t.mapDeltaY,t.mapDeltaZ,i);for(const t of e)this._updateManipulatorPosition(t)}}_offsetEdge(e,t,i){if(!this._operations)return;const n=t.clone();n.distance=i,this._operations.updateVertices([e.handle.leftVertex,e.handle.rightVertex],n),this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(e.handle.leftVertex)),this._updateManipulatorPosition(this._getManipulatorInfoFromHandle(e.handle.rightVertex))}_manipulatorClickCallback(e,t){e.shiftKey||this._clearSelection(),"vertex"===t.type&&(t.manipulator.selected=!t.manipulator.selected,this.enableDeleteVertices&&e.button===he.Right&&this._removeVertices([t])),"edge"===t.type&&e.button===he.Left&&this._splitEdgeManipulator(t),e.stopPropagation()}_updateTranslateTooltip(e,t){null!=this._defaultTooltipInfo?this._resetTooltip():this._updateTranslateObjectTooltip(e,t)}_updateTranslateObjectTooltip(e,t){this._pendingEdgeOffsetInfo||(this.activeTooltipInfo=ae(e,t,this._tooltipsContext,this._updatingHandles))}_updateEdgeOffsetTooltip(e){this._pendingEdgeOffsetInfo||(this.activeTooltipInfo=oe(this.object,e,this._tooltipsContext,this._updatingHandles))}_resetTooltip(){const e=this.activeTooltipInfo;if(this._pendingEdgeOffsetInfo&&"reshape-edge-offset"===e?.type)return;let t=null;t=this._pendingEdgeOffsetInfo||null!=this._findActiveEdgeOffsetManipulatorInfo()?oe(this.object,null,this._tooltipsContext,this._updatingHandles):this._defaultTooltipInfo,t!==e&&(null!=e&&null!=t&&"input"===this.tooltip.mode||(this.activeTooltipInfo=t))}get _defaultTooltipInfo(){const e=this._operations?.data.type;switch(e){case"multipoint":case"polyline":case"polygon":return this._selectedVertexManipulatorInfo?this.tooltipInfos.selectedVertex:null;case"point":case"mesh":return this.tooltipInfos.movePoint;default:return null}}get _selectedVertexManipulatorInfo(){const e=this._manipulatorInfos.filter(e=>"vertex"===e.type&&e.manipulator.selected);return 1===e.length?e[0]:null}get _tooltipsContext(){const{tooltipInfos:e,activeTooltipInfo:t}=this;return{sketchOptions:this._sketchOptions,tooltipInfos:e,activeTooltipInfo:t,selectedVertexManipulatorInfo:this._selectedVertexManipulatorInfo,callbacks:this._tooltipCallbacks,measurementWorker:this._measurementWorker}}get test(){}};function je(){return e=>{const{operation:t,mapEnd:i}=e;return null==t||null==i?e:{...e,signedDistance:t.signedDistanceToPoint(i)}}}function Ie(e){const t=e.size/2,i=t+e.collisionPadding;return{size:t/i,outlineSize:(t+e.outlineSize)/i}}function Se(e,t){return Math.atan2(t[1]-e[1],t[0]-e[0])+Math.PI/2}function He(e){return new H({x:0,y:0,z:0,spatialReference:e})}function we(e){return"edge"===e.type&&"edgeManipulator"in e}e([g()],Ee.prototype,"_numGrabbing",void 0),e([g()],Ee.prototype,"_numDragging",void 0),e([g()],Ee.prototype,"_pendingEdgeOffsetInfo",void 0),e([g()],Ee.prototype,"_operations",null),e([g()],Ee.prototype,"_segmentLabels",void 0),e([g({constructOnly:!0})],Ee.prototype,"tool",void 0),e([g()],Ee.prototype,"tooltip",void 0),e([g()],Ee.prototype,"activeTooltipInfo",void 0),e([g({readOnly:!0})],Ee.prototype,"updating",null),e([g()],Ee.prototype,"manipulators",null),e([g()],Ee.prototype,"view",null),e([g()],Ee.prototype,"object",null),e([g()],Ee.prototype,"enableZShape",null),e([g()],Ee.prototype,"enableDeleteVertices",null),e([g()],Ee.prototype,"enableZVertex",null),e([g()],Ee.prototype,"autoHideManipulators",null),e([g()],Ee.prototype,"enableMoveObject",null),e([g()],Ee.prototype,"enableMidpoints",null),e([g()],Ee.prototype,"enableEdgeOffset",null),e([g()],Ee.prototype,"_sketchOptions",null),e([g()],Ee.prototype,"_accentColor",null),e([g()],Ee.prototype,"_tooltipsContext",null),Ee=e([_("esri.views.3d.interactive.editingTools.reshape.ReshapeOperation")],Ee);const Ve=A(0,0,void 0,V.WGS84),Ae=I(),De=1e-6,Te=16,Ge=32;export{Ee as ReshapeOperation};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{EventEmitter as t}from"../../../../../core/Evented.js";import"../../../../../core/has.js";import{destroyMaybe as o}from"../../../../../core/maybe.js";import{property as i,subclass as n}from"../../../../../core/accessorSupport/decorators.js";import{ReshapeOperation as r}from"./ReshapeOperation.js";import{InteractiveToolBase as p}from"../../../../interactive/InteractiveToolBase.js";import{sketchKeys as a}from"../../../../interactive/keybindings.js";import s from"../../../../interactive/sketch/SketchOptions.js";let h=class extends p{constructor(e){super(e),this._reshapeOperation=null,this.events=new t,this.enableZShape=!0,this.enableZVertex=!0,this.enableMoveObject=!0,this.enableDeleteVertices=!0,this.autoHideManipulators=!1,this.enableMidpoints=!0,this.enableEdgeOffset=!1,this.type="reshape-3d",this.sketchOptions=new s,this.snappingManager=null,this.automaticManipulatorSelection=!1}initialize(){const e=this._reshapeOperation=new r({tool:this});this.addHandles([e.events.on("reshape",e=>this.events.emit("reshape",e)),e.events.on("move",e=>this.events.emit("move",e)),e.events.on("vertex-add",e=>this.events.emit("vertex-add",e)),e.events.on("vertex-remove",e=>this.events.emit("vertex-remove",e)),e.events.on("immediate-click",e=>this.events.emit("immediate-click",{...e,object:this.object})),this.view.on("pointer-down",["Shift"],e=>e.stopPropagation())]),this.finishToolCreation()}destroy(){this._reshapeOperation=o(this._reshapeOperation)}get updating(){return((this.object.updating??!1)||this._reshapeOperation?.updating||this.snappingManager?.updating)??!1}get activeTooltipInfo(){return this._reshapeOperation?.activeTooltipInfo??null}get tooltip(){return this._reshapeOperation?.tooltip??null}onManipulatorSelectionChanged(){this._reshapeOperation?.onManipulatorSelectionChanged()}recordUndo(e,t){this._reshapeOperation?.recordUndo({apply:e,undo:t,accumulate:()=>!1})}get canUndo(){return this._reshapeOperation?.canUndo??!1}undo(){this.snappingManager?.doneSnapping(),this._reshapeOperation?.undo()}get canRedo(){return this._reshapeOperation?.canRedo??!1}redo(){this.snappingManager?.doneSnapping(),this._reshapeOperation?.redo()}onInputEvent(e){const t=this._reshapeOperation;if(t&&!t.enterInputModeIfAvailable(e)&&this.enableDeleteVertices&&"key-down"===e.type&&a.delete.includes(e.key)){t.removeSelectedVertices()>0&&e.stopPropagation()}}reset(){}get test(){}};e([i()],h.prototype,"_reshapeOperation",void 0),e([i({constructOnly:!0})],h.prototype,"view",void 0),e([i({constructOnly:!0})],h.prototype,"object",void 0),e([i()],h.prototype,"enableZShape",void 0),e([i()],h.prototype,"enableZVertex",void 0),e([i()],h.prototype,"enableMoveObject",void 0),e([i()],h.prototype,"enableDeleteVertices",void 0),e([i()],h.prototype,"autoHideManipulators",void 0),e([i()],h.prototype,"enableMidpoints",void 0),e([i()],h.prototype,"enableEdgeOffset",void 0),e([i()],h.prototype,"type",void 0),e([i({type:s})],h.prototype,"sketchOptions",void 0),e([i()],h.prototype,"snappingManager",void 0),e([i()],h.prototype,"updating",null),e([i()],h.prototype,"activeTooltipInfo",null),e([i()],h.prototype,"tooltip",null),e([i()],h.prototype,"automaticManipulatorSelection",void 0),h=e([n("esri.views.3d.interactive.editingTools.reshape.ReshapeTool3D")],h);export{h as ReshapeTool3D};
2
+ import{__decorate as e}from"tslib";import{EventEmitter as t}from"../../../../../core/Evented.js";import"../../../../../core/has.js";import{destroyMaybe as o}from"../../../../../core/maybe.js";import{property as i,subclass as n}from"../../../../../core/accessorSupport/decorators.js";import{ReshapeOperation as r}from"./ReshapeOperation.js";import{InteractiveToolBase as p}from"../../../../interactive/InteractiveToolBase.js";import{sketchKeys as a}from"../../../../interactive/keybindings.js";import s from"../../../../interactive/sketch/SketchOptions.js";let h=class extends p{constructor(e){super(e),this._reshapeOperation=null,this.events=new t,this.enableZShape=!0,this.enableZVertex=!0,this.enableMoveObject=!0,this.enableDeleteVertices=!0,this.autoHideManipulators=!1,this.enableMidpoints=!0,this.enableEdgeOffset=!1,this.type="reshape-3d",this.sketchOptions=new s,this.snappingManager=null,this.automaticManipulatorSelection=!1}initialize(){const e=this._reshapeOperation=new r({tool:this});this.addHandles([e.events.on("reshape",e=>this.events.emit("reshape",e)),e.events.on("move",e=>this.events.emit("move",e)),e.events.on("vertex-add",e=>this.events.emit("vertex-add",e)),e.events.on("vertex-remove",e=>this.events.emit("vertex-remove",e)),e.events.on("immediate-click",e=>this.events.emit("immediate-click",{...e,object:this.object})),this.view.on("pointer-down",["Shift"],e=>e.stopPropagation())]),this.finishToolCreation()}destroy(){this._reshapeOperation=o(this._reshapeOperation)}get updating(){return((this.object.updating??!1)||this._reshapeOperation?.updating||this.snappingManager?.updating)??!1}get activeTooltipInfo(){return this._reshapeOperation?.activeTooltipInfo??null}get tooltip(){return this._reshapeOperation?.tooltip??null}onManipulatorSelectionChanged(){this._reshapeOperation?.onManipulatorSelectionChanged()}clearSelection(){this._reshapeOperation?.clearSelection()}selectManipulator(e){return this._reshapeOperation?.selectManipulator(e)??!1}recordUndo(e,t){this._reshapeOperation?.recordUndo({apply:e,undo:t,accumulate:()=>!1})}get canUndo(){return this._reshapeOperation?.canUndo??!1}undo(){this.snappingManager?.doneSnapping(),this._reshapeOperation?.undo()}get canRedo(){return this._reshapeOperation?.canRedo??!1}redo(){this.snappingManager?.doneSnapping(),this._reshapeOperation?.redo()}onInputEvent(e){const t=this._reshapeOperation;if(t&&!t.enterInputModeIfAvailable(e)&&this.enableDeleteVertices&&"key-down"===e.type&&a.delete.includes(e.key)){t.removeSelectedVertices()>0&&e.stopPropagation()}}reset(){}get test(){}};e([i()],h.prototype,"_reshapeOperation",void 0),e([i({constructOnly:!0})],h.prototype,"view",void 0),e([i({constructOnly:!0})],h.prototype,"object",void 0),e([i()],h.prototype,"enableZShape",void 0),e([i()],h.prototype,"enableZVertex",void 0),e([i()],h.prototype,"enableMoveObject",void 0),e([i()],h.prototype,"enableDeleteVertices",void 0),e([i()],h.prototype,"autoHideManipulators",void 0),e([i()],h.prototype,"enableMidpoints",void 0),e([i()],h.prototype,"enableEdgeOffset",void 0),e([i()],h.prototype,"type",void 0),e([i({type:s})],h.prototype,"sketchOptions",void 0),e([i()],h.prototype,"snappingManager",void 0),e([i()],h.prototype,"updating",null),e([i()],h.prototype,"activeTooltipInfo",null),e([i()],h.prototype,"tooltip",null),e([i()],h.prototype,"automaticManipulatorSelection",void 0),h=e([n("esri.views.3d.interactive.editingTools.reshape.ReshapeTool3D")],h);export{h as ReshapeTool3D};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- function r(r){return t(r).result}function t(r){if(r.graphic&&"graphics"!==r.graphic.layer?.type)return{result:1};if(!r.operations)return{result:2};const t=r.operations.data.type,e=r.operations.data.geometry;return"point"===t||"mesh"===t||"polyline"===t||"polygon"===t?{result:0,geometry:e}:{result:3}}export{r as isSupportedObject};
2
+ function t(t){return r(t).result}function r(t){if(t.graphic&&"graphics"!==t.graphic.layer?.type)return{result:1};if(!t.operations)return{result:2};const r=t.operations.data.type,e=t.operations.data.geometry;return"point"===r||"multipoint"===r||"mesh"===r||"polyline"===r||"polygon"===r?{result:0,geometry:e}:{result:3}}export{t as isSupportedObject};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{handlesGroup as t}from"../../../../../core/handleUtils.js";import{debounce as e}from"../../../../../core/promiseUtils.js";import{scale as o,zeroMeters as n}from"../../../../../core/quantity.js";import{watch as i,syncAndInitial as a,sync as s}from"../../../../../core/reactiveUtils.js";import{ensureType as r}from"../../../../../core/accessorSupport/ensureType.js";import c from"../../../../../geometry/Point.js";import{manipulatedObjectGeometry as l}from"../manipulatedObjectUtils.js";import{updateXYZFromTooltipInfo as p,updateTooltipInfoFromManipulatedObject as f,updateElevationFromPoint as m}from"../tooltipUtils3D.js";import{axisConstrainedDragSign as u}from"../manipulations/moveUtils.js";import{connectPasteEvent as y,getXYZDeltasFromTooltipInfo as d}from"../../../../interactive/tooltip/tooltipCommonUtils.js";import{MovePointTooltipInfo as v}from"../../../../interactive/tooltip/infos/MovePointTooltipInfo.js";import{ReshapeEdgeOffsetTooltipInfo as h}from"../../../../interactive/tooltip/infos/ReshapeEdgeOffsetTooltipInfo.js";import{SelectedVertexTooltipInfo as k}from"../../../../interactive/tooltip/infos/SelectedVertexTooltipInfo.js";import{TranslateTooltipInfo as w}from"../../../../interactive/tooltip/infos/TranslateTooltipInfo.js";import{TranslateXYTooltipInfo as T}from"../../../../interactive/tooltip/infos/TranslateXYTooltipInfo.js";import{TranslateZTooltipInfo as g}from"../../../../interactive/tooltip/infos/TranslateZTooltipInfo.js";import{verticalSignedDistanceBetweenPoints as j}from"../../../../support/euclideanLengthMeasurementUtils.js";function I(t,e){const o=e?.type;return{edgeOffset:new h({sketchOptions:t,viewType:o}),movePoint:new v({sketchOptions:t,viewType:o}),selectedVertex:new k({sketchOptions:t,viewType:o}),translate:new w({sketchOptions:t,viewType:o}),translateXY:new T({sketchOptions:t,viewType:o}),translateZ:new g({sketchOptions:t,viewType:o})}}function O(o,n,r,c){function p(){const t=r(),e=t.sketchOptions.tooltips.effectiveEnabled?t.activeTooltipInfo:null;return{...t,activeTooltipInfo:e}}let f=!1;function m(t){f||(f=!0,t(),f=!1)}const u=e(t=>U(n,t)),d=t=>{m(()=>{x(n,t),o.info=t.activeTooltipInfo,c.consumePromise(u(t))})};return t([i(p,t=>d(t),a),i(()=>{const t=p(),{activeTooltipInfo:e}=t;if(e&&"key"in e)return{context:t,activeTooltipInfo:e,key:e.key,geometry:l(n)}},(t,e)=>{t&&e&&e.key!==t.key&&m(()=>b(n,t.context))},s),n.on("committed",()=>d(p())),y(o,{onBeforePaste:()=>{f=!0},onAfterPaste:()=>{b(n,p()),f=!1}})])}function b(t,{activeTooltipInfo:e,selectedVertexManipulatorInfo:o,callbacks:n}){if(!e)return;n.onBeforeReshape();const i=l(t);switch(i?.type){case"mesh":"move-point"===e.type&&p(e,i.origin,t,n);break;case"point":"move-point"===e.type&&p(e,i,t,n);break;case"polyline":case"polygon":"selected-vertex"===e.type&&P(e,o,t,n)}}function P(t,e,o,n){if(!e)return;const{dx:i,dy:a,dz:s}=d(t,e.manipulator.location);0===i&&0===a&&0===s||(n.onReshapeStart(),o.operations?.moveVertices([e.handle],i,a,s,0),n.onReshape(),n.onReshapeStop())}function x(t,e){const{activeTooltipInfo:o,selectedVertexManipulatorInfo:n,sketchOptions:i}=e;if(o)switch(o.sketchOptions=i,o?.type){case"move-point":f(o,t);break;case"selected-vertex":D(o,n,t);break;case"reshape-edge-offset":L(o,t)}}function D(t,e,o){if(!t||"selected-vertex"!==t.type)return;const n=e?.manipulator.location;t.setLocationFromPoint(n),m(t,n,o);const i=o.operations?.data.geometry,a=i?.type;"polygon"!==a&&"polyline"!==a||(t.geometryType=a),t.totalLength.visible="polyline"===a,t.area.visible="polygon"===a}function L(t,e){const o=e.operations?.data.geometry,n=o?.type;t.totalLength.visible="polyline"===n,t.totalLength.visible||(t.totalLength.actual=null),t.area.visible="polygon"===n,t.area.visible||(t.area.actual=null)}async function U(t,e){const{activeTooltipInfo:o}=e;if(o)switch(o?.type){case"selected-vertex":case"reshape-edge-offset":return await M(o,t,e)}}async function M(t,e,{measurementWorker:o}){const n=e.operations?.data.geometry;switch(n?.type){case"polygon":t.area.actual=(await o.autoArea2D(n)).area;break;case"polyline":t.totalLength.actual=await o.autoLength2D(n)}}const S=r(c);function B(t,e,o,n){let i=null;const{tooltipInfos:a,sketchOptions:s}=o;switch(t){case 0:i=a.translate;break;case 1:i=a.translateXY;break;case 2:i=a.translateZ}return i.sketchOptions=s,n.consumePromise(E(i,e,o)),i}const E=e(R);async function R(t,e,n){switch(t.type){case"translate":return V(t,e,(t,e)=>n.measurementWorker.autoDistance2DBetweenPoints(S(t),S(e)));case"translate-xy":return V(t,e,async(t,i)=>{const a=await n.measurementWorker.autoDistance2DBetweenPoints(S(t),S(i));return o(a,u(e))});case"translate-z":return V(t,e,j)}}async function V(t,e,o){if(null!=e&&"end"!==e.action){const{mapStart:i,mapEnd:a}=e,s=await o(i,a);t.distance=s??n}else t.distance=n}function A(t,e,o,n){const{sketchOptions:i,tooltipInfos:a}=o,s=a.edgeOffset;return s.sketchOptions=i,n.consumePromise(W(s,t,e,o)),s}const W=e(X);async function X(t,e,i,{measurementWorker:a}){const s=e.operations,r=i?.signedDistance;if(null!=i&&null!=r&&"end"!==i.action&&null!=s){const e=s.data.coordinateHelper,{start:n,end:c}=i.operation.clampedStartAndEnd(i.mapEnd),l=await a.autoDistance2DBetweenPoints(e.arrayToPoint(n),e.arrayToPoint(c)),p=Math.sign(r*i.operation.selectedArrow);t.distance.committed=null,t.distance.actual=null!=l?o(l,p):null}else t.distance.committed=null,t.distance.actual=n}export{O as connectTooltipToManipulatedObject,I as createTooltipInfos,A as getUpdatedEdgeOffsetTooltipInfo,B as getUpdatedTranslateObjectTooltipInfo};
2
+ import{handlesGroup as t}from"../../../../../core/handleUtils.js";import{debounce as e}from"../../../../../core/promiseUtils.js";import{scale as o,zeroMeters as n}from"../../../../../core/quantity.js";import{watch as i,syncAndInitial as a,sync as s}from"../../../../../core/reactiveUtils.js";import{ensureType as r}from"../../../../../core/accessorSupport/ensureType.js";import c from"../../../../../geometry/Point.js";import{manipulatedObjectGeometry as l}from"../manipulatedObjectUtils.js";import{updateXYZFromTooltipInfo as p,updateTooltipInfoFromManipulatedObject as f,updateElevationFromPoint as m}from"../tooltipUtils3D.js";import{axisConstrainedDragSign as u}from"../manipulations/moveUtils.js";import{connectPasteEvent as y,getXYZDeltasFromTooltipInfo as d}from"../../../../interactive/tooltip/tooltipCommonUtils.js";import{MovePointTooltipInfo as v}from"../../../../interactive/tooltip/infos/MovePointTooltipInfo.js";import{ReshapeEdgeOffsetTooltipInfo as h}from"../../../../interactive/tooltip/infos/ReshapeEdgeOffsetTooltipInfo.js";import{SelectedVertexTooltipInfo as k}from"../../../../interactive/tooltip/infos/SelectedVertexTooltipInfo.js";import{TranslateTooltipInfo as w}from"../../../../interactive/tooltip/infos/TranslateTooltipInfo.js";import{TranslateXYTooltipInfo as T}from"../../../../interactive/tooltip/infos/TranslateXYTooltipInfo.js";import{TranslateZTooltipInfo as g}from"../../../../interactive/tooltip/infos/TranslateZTooltipInfo.js";import{verticalSignedDistanceBetweenPoints as j}from"../../../../support/euclideanLengthMeasurementUtils.js";function I(t,e){const o=e?.type;return{edgeOffset:new h({sketchOptions:t,viewType:o}),movePoint:new v({sketchOptions:t,viewType:o}),selectedVertex:new k({sketchOptions:t,viewType:o}),translate:new w({sketchOptions:t,viewType:o}),translateXY:new T({sketchOptions:t,viewType:o}),translateZ:new g({sketchOptions:t,viewType:o})}}function O(o,n,r,c){function p(){const t=r(),e=t.sketchOptions.tooltips.effectiveEnabled?t.activeTooltipInfo:null;return{...t,activeTooltipInfo:e}}let f=!1;function m(t){f||(f=!0,t(),f=!1)}const u=e(t=>U(n,t)),d=t=>{m(()=>{x(n,t),o.info=t.activeTooltipInfo,c.consumePromise(u(t))})};return t([i(p,t=>d(t),a),i(()=>{const t=p(),{activeTooltipInfo:e}=t;if(e&&"key"in e)return{context:t,activeTooltipInfo:e,key:e.key,geometry:l(n)}},(t,e)=>{t&&e&&e.key!==t.key&&m(()=>b(n,t.context))},s),n.on("committed",()=>d(p())),y(o,{onBeforePaste:()=>{f=!0},onAfterPaste:()=>{b(n,p()),f=!1}})])}function b(t,{activeTooltipInfo:e,selectedVertexManipulatorInfo:o,callbacks:n}){if(!e)return;n.onBeforeReshape();const i=l(t);switch(i?.type){case"mesh":"move-point"===e.type&&p(e,i.origin,t,n);break;case"point":"move-point"===e.type&&p(e,i,t,n);break;case"multipoint":case"polyline":case"polygon":"selected-vertex"===e.type&&P(e,o,t,n)}}function P(t,e,o,n){if(!e)return;const{dx:i,dy:a,dz:s}=d(t,e.manipulator.location);0===i&&0===a&&0===s||(n.onReshapeStart(),o.operations?.moveVertices([e.handle],i,a,s,0),n.onReshape(),n.onReshapeStop())}function x(t,e){const{activeTooltipInfo:o,selectedVertexManipulatorInfo:n,sketchOptions:i}=e;if(o)switch(o.sketchOptions=i,o?.type){case"move-point":f(o,t);break;case"selected-vertex":D(o,n,t);break;case"reshape-edge-offset":L(o,t)}}function D(t,e,o){if(!t||"selected-vertex"!==t.type)return;const n=e?.manipulator.location;t.setLocationFromPoint(n),m(t,n,o);const i=o.operations?.data.geometry,a=i?.type;"polygon"!==a&&"polyline"!==a||(t.geometryType=a),t.totalLength.visible="polyline"===a,t.area.visible="polygon"===a}function L(t,e){const o=e.operations?.data.geometry,n=o?.type;t.totalLength.visible="polyline"===n,t.totalLength.visible||(t.totalLength.actual=null),t.area.visible="polygon"===n,t.area.visible||(t.area.actual=null)}async function U(t,e){const{activeTooltipInfo:o}=e;if(o)switch(o?.type){case"selected-vertex":case"reshape-edge-offset":return await M(o,t,e)}}async function M(t,e,{measurementWorker:o}){const n=e.operations?.data.geometry;switch(n?.type){case"polygon":t.area.actual=(await o.autoArea2D(n)).area;break;case"polyline":t.totalLength.actual=await o.autoLength2D(n)}}const S=r(c);function B(t,e,o,n){let i=null;const{tooltipInfos:a,sketchOptions:s}=o;switch(t){case 0:i=a.translate;break;case 1:i=a.translateXY;break;case 2:i=a.translateZ}return i.sketchOptions=s,n.consumePromise(E(i,e,o)),i}const E=e(R);async function R(t,e,n){switch(t.type){case"translate":return V(t,e,(t,e)=>n.measurementWorker.autoDistance2DBetweenPoints(S(t),S(e)));case"translate-xy":return V(t,e,async(t,i)=>{const a=await n.measurementWorker.autoDistance2DBetweenPoints(S(t),S(i));return o(a,u(e))});case"translate-z":return V(t,e,j)}}async function V(t,e,o){if(null!=e&&"end"!==e.action){const{mapStart:i,mapEnd:a}=e,s=await o(i,a);t.distance=s??n}else t.distance=n}function A(t,e,o,n){const{sketchOptions:i,tooltipInfos:a}=o,s=a.edgeOffset;return s.sketchOptions=i,n.consumePromise(W(s,t,e,o)),s}const W=e(X);async function X(t,e,i,{measurementWorker:a}){const s=e.operations,r=i?.signedDistance;if(null!=i&&null!=r&&"end"!==i.action&&null!=s){const e=s.data.coordinateHelper,{start:n,end:c}=i.operation.clampedStartAndEnd(i.mapEnd),l=await a.autoDistance2DBetweenPoints(e.arrayToPoint(n),e.arrayToPoint(c)),p=Math.sign(r*i.operation.selectedArrow);t.distance.committed=null,t.distance.actual=null!=l?o(l,p):null}else t.distance.committed=null,t.distance.actual=n}export{O as connectTooltipToManipulatedObject,I as createTooltipInfos,A as getUpdatedEdgeOffsetTooltipInfo,B as getUpdatedTranslateObjectTooltipInfo};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{createVisualElements as e}from"./lineObjectVisualElementUtils.js";import{manipulatedObjectGeometry as t}from"./manipulatedObjectUtils.js";import{createVisualElements as s}from"./originGeometryVisualElementUtils.js";function l(l){switch(t(l.object)?.type){case"point":case"mesh":return s(l);case"polygon":case"polyline":return e(l);default:return null}}export{l as createVisualElements};
2
+ import{createVisualElements as e}from"./lineObjectVisualElementUtils.js";import{manipulatedObjectGeometry as t}from"./manipulatedObjectUtils.js";import{createVisualElements as s}from"./originGeometryVisualElementUtils.js";function i(i){switch(t(i.object)?.type){case"multipoint":default:return null;case"point":case"mesh":return s(i);case"polygon":case"polyline":return e(i)}}export{i as createVisualElements};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../../../../core/Accessor.js";import{equals as i}from"../../../../../../core/arrayUtils.js";import{watch as r}from"../../../../../../core/reactiveUtils.js";import{property as o,subclass as s}from"../../../../../../core/accessorSupport/decorators.js";import{create as n}from"../../../../../../geometry/support/aaBoundingRect.js";import{TileKey as l}from"../../../../../../layers/support/TileKey.js";import{distanceToTile as p}from"../../../../../interactive/snapping/featureSources/featureServiceSource/tileUtils.js";let u=class extends t{get _sortedTilesCoveringView(){const e=(this.view.featureTiles?.tiles?.toArray()??[]).map(a),t=this._effectivePointOfInterest;return null!=t&&e.sort((e,i)=>p(t,e)-p(t,i)),e}get tileInfo(){return this.view.featureTiles?.tilingScheme?.toTileInfo()??null}get tileSize(){return this.view.featureTiles?.tileSize??256}get _effectivePointOfInterest(){const e=this.pointOfInterest;return null!=e?e:this.view.pointsOfInterest?.focus.location}get updating(){return!this.view.featureTiles}constructor(e){super(e),this.tiles=[],this.pointOfInterest=null}initialize(){this.addHandles([this.view.enableFeatureTiles(),r(()=>this._sortedTilesCoveringView,e=>this._set("tiles",e),{initial:!0,equals:(e,t)=>i(e,t,(e,t)=>e.id===t.id)})])}};function a({lij:[e,t,i],extent:r}){return new l(e,t,i,r??n())}e([o({readOnly:!0})],u.prototype,"tiles",void 0),e([o({readOnly:!0})],u.prototype,"_sortedTilesCoveringView",null),e([o({readOnly:!0})],u.prototype,"tileInfo",null),e([o({readOnly:!0})],u.prototype,"tileSize",null),e([o({constructOnly:!0})],u.prototype,"view",void 0),e([o()],u.prototype,"pointOfInterest",void 0),e([o()],u.prototype,"_effectivePointOfInterest",null),e([o()],u.prototype,"updating",null),u=e([s("esri.views.3d.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiles3D")],u);export{u as FeatureServiceTiles3D};
2
+ import{__decorate as e}from"tslib";import t from"../../../../../../core/Accessor.js";import{equals as i}from"../../../../../../core/arrayUtils.js";import{property as r,subclass as s}from"../../../../../../core/accessorSupport/decorators.js";import{UpdatingHandles as o}from"../../../../../../core/support/UpdatingHandles.js";import{create as n}from"../../../../../../geometry/support/aaBoundingRect.js";import{TileKey as l}from"../../../../../../layers/support/TileKey.js";import{distanceToTile as p}from"../../../../../interactive/snapping/featureSources/featureServiceSource/tileUtils.js";let a=class extends t{get _sortedTilesCoveringView(){const e=(this.view.featureTiles?.tiles?.toArray()??[]).map(u),t=this._effectivePointOfInterest;return null!=t&&e.sort((e,i)=>p(t,e)-p(t,i)),e}get tileInfo(){return this.view.featureTiles?.tilingScheme?.toTileInfo()??null}get tileSize(){return this.view.featureTiles?.tileSize??256}get _effectivePointOfInterest(){const e=this.pointOfInterest;return null!=e?e:this.view.pointsOfInterest?.focus?.location}get updating(){return!this.view.featureTiles||this._updatingHandles.updating}constructor(e){super(e),this.tiles=[],this.pointOfInterest=null,this._updatingHandles=new o}destroy(){this._updatingHandles.destroy()}initialize(){this.addHandles(this.view.enableFeatureTiles()),this._updatingHandles.add(()=>this._sortedTilesCoveringView,e=>this._set("tiles",e),{initial:!0,equals:(e,t)=>i(e,t,(e,t)=>e.id===t.id)})}};function u({lij:[e,t,i],extent:r}){return new l(e,t,i,r??n())}e([r({readOnly:!0})],a.prototype,"tiles",void 0),e([r({readOnly:!0})],a.prototype,"_sortedTilesCoveringView",null),e([r({readOnly:!0})],a.prototype,"tileInfo",null),e([r({readOnly:!0})],a.prototype,"tileSize",null),e([r({constructOnly:!0})],a.prototype,"view",void 0),e([r()],a.prototype,"pointOfInterest",void 0),e([r()],a.prototype,"_effectivePointOfInterest",null),e([r()],a.prototype,"updating",null),a=e([s("esri.views.3d.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiles3D")],a);export{a as FeatureServiceTiles3D};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{equals as t}from"../../../core/arrayUtils.js";import"../../../core/has.js";import{removeMaybe as i,abortMaybe as s}from"../../../core/maybe.js";import{debounce as r,throwIfAborted as n,ignoreAbortErrors as l}from"../../../core/promiseUtils.js";import{watch as a,sync as o,when as u,whenOnce as d}from"../../../core/reactiveUtils.js";import{addFrameTask as h}from"../../../core/scheduling.js";import{signal as p}from"../../../core/signal.js";import{Seconds as c,secondsFromMilliseconds as m}from"../../../core/time.js";import{property as g,subclass as _}from"../../../core/accessorSupport/decorators.js";import{projectOrLoad as f}from"../../../geometry/projectionUtils.js";import y from"../../../geometry/SpatialReference.js";import{toExtent as v,fromExtent as w,intersection as T,create as S,intersects as b}from"../../../geometry/support/aaBoundingRect.js";import{getInfo as R}from"../../../geometry/support/spatialReferenceUtils.js";import x from"../../../symbols/support/ElevationInfo.js";import A from"./SubView3D.js";import{getFeatureTileId as L}from"./support/FeatureTileDescriptor.js";import{makeScheduleFunction as E}from"./support/makeScheduleFunction.js";import{debugFlags as j}from"../support/debugFlags.js";import{tileFilterDistance as M,scaleThresholdForLoadingAllTiles as O,defaultTransitionDuration as I,transitionDurationFactor as C,seamlessTransitionEnabled as P,densityFactor as U,loadAllTilesDensityFactor as D,averageLoadingTimeSmoothingFactor as W,fadeOutTime as k,fadeInTime as F,minimumTracingResolution as q}from"../support/flow/constants.js";import{isFullExtent as B,wrappedWidth as V,FlowQuery3D as G}from"../support/flow/FlowQuery3D.js";import{FlowWorkerHandle as H}from"../support/flow/FlowWorkerHandle.js";import{materialParametersFromRenderer as z,createStreamlineGeometry as N}from"../support/flow/geometryUtils.js";import{boundingRectOfTiles as Q}from"../support/flow/loadUtils.js";import{StreamlineResources3DOverlay as J}from"../support/flow/StreamlineResources3DOverlay.js";import{StreamlineResources3DShape as K}from"../support/flow/StreamlineResources3DShape.js";import{webMercatorWorldExtent as X}from"../terrain/TerrainConst.js";import{descendantsAtLevel as Y,tilesAreRelated as Z}from"../terrain/tileUtils.js";import{isScreenSizePerspectiveEnabled as $}from"../webgl-engine/lib/screenSizePerspectiveUtils.js";import{RibbonLineMaterial as ee}from"../webgl-engine/materials/RibbonLineMaterial.js";import{hasLayerBasedScaleVisibility as te,isInEffectiveScaleRange as ie}from"../../support/layerViewUtils.js";import{TaskPriority as se}from"../../support/Scheduler.js";import{simulationSettingsEqual as re,getPositions as ne,getFlowSimulationSettings as le}from"../../support/flow/utils.js";let ae=class extends A{constructor(e){super(e),this.type="flow",this.renderedTiles=null,this.tilesIntersectDataBounds=!0,this.requireLoad=!1,this.workerHandle=null,this.frameTask=null,this._averageLoadingTime=c(0),this._abortController=null,this._loadingState="ready-to-load",this._tilesUpdateIsWaiting=!1,this._debugAllowAutoLoading=p(!0),this.emissiveStrength=0,this._materialParametersOverridde=null,this._suspendedOverride=null,this._simulationSettingsOverride=null,this._seamlessTransitionEnabledOverride=null,this._updateTask=null,this._debouncedTileUpdate=r(async e=>{const{allTiles:t}=this.surface,i=this._getTileFilterFunction(),{_dataBounds:s}=this,r=new Set;let l=!1;function*a(e){for(let n=0;n<t.length;++n){const a=t.at(n),o=de(s,a.extent);i(a)&&o&&(r.add(a),l=!0),e.madeProgress(),e.done&&(e=yield)}}await this.frameTask.scheduleGenerator(a,e.signal),n(e.signal),this.tilesIntersectDataBounds=!(0!==t.length&&!this.loadAllTiles)||l,this.renderedTiles=r})}initialize(){const{surface:e,view:t}=this,{resourceController:i}=t;this.workerHandle=new H(E(i)),this.frameTask=i.scheduler.registerTask(se.FLOW_GENERATOR),this._updateTask=h({update:()=>this._update()}),this.addHandles([a(()=>this._simulationSettings,()=>this.triggerLoad(),{sync:!0,equals:(e,t)=>null==e&&null==t||null!=e&&null!=t&&re(e,t)}),this.updatingHandles.add(()=>this.suspended,e=>{e?this._suspend():this._resume()},o),a(()=>{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._effectiveDensity]},()=>this.triggerLoad(),o),u(()=>!this.view.animationsEnabled,()=>{const{_resources:e,_lastResources:t}=this;null!=e&&(e.startTime=pe),null!=t&&(t.startTime=pe)},o),a(()=>this._materialParameters,e=>{this._resources?.setMaterialParameters(e),this._lastResources?.setMaterialParameters(e)}),u(()=>e.allTilesCreated,()=>this._triggerTilesUpdate(),o),t.enableFeatureTiles(),a(()=>[this._dataBounds,this._featureTilesBounds,this.loadAllTiles],()=>this._triggerTilesUpdate()),a(()=>this._flowRenderer,(e,t)=>{const i=t?.visualVariables??[],s=e?.visualVariables??[];s.length===i.length&&s.every((e,t)=>e.type===i[t].type)||this.clear()}),u(()=>!t.featureTiles?.updating,()=>{this._triggerTilesUpdate()})]),this.suspended&&this._suspend(),this._triggerTilesUpdate()}destroy(){this._updateTask=i(this._updateTask),this.abort(),this.clear(),this.notifyChange("updating")}abort(){this._abortController=s(this._abortController),this._tilesUpdateIsWaiting=!1,this.requireLoad=!1}_ensureAbortController(){return null==this._abortController&&(this._abortController=new AbortController),this._abortController}_resume(){this._updateTask.resume(),this._triggerTilesUpdate(),this.triggerLoad()}_suspend(){this._updateTask.pause(),this.abort(),this.clear()}get _clippingArea(){const e=f(this.view.clippingArea,this.surface.spatialReference).geometry;return null==e?null:w(e)}get _dataBounds(){const e=this._fullExtentSurfaceSpatialReference;return null==e?null:w(e)}get suspended(){return null!=this._suspendedOverride?this._suspendedOverride:this.layerView.suspended||this.view.groundView.hasTerrainReplacement}get _fullExtentSurfaceSpatialReference(){return f(this.layer.fullExtent,this.surface.spatialReference).geometry}get _draped(){return"on-the-ground"===this.elevationInfo.mode}get extent(){if(this.loadAllTiles)return ce(this._fullExtentSurfaceSpatialReference);const{spatialReference:e}=this.surface;let t=this.renderedTiles;if(null==e||null==t)return null;const i=this.view.terrainLevel;if(null!=i){const e=new Set;t.forEach(t=>{Math.abs(i-t.level)<M&&e.add(t)}),t=e}const s=Q(t,this.spatialReferenceInfo);return null==s?null:(T(s,this._clippingArea,s),ce(v(s,e)))}get loadAllTiles(){return this.view.scale>(j.FLOW_GLOBAL_SCALE_THRESHOLD??O)}get isDataGlobal(){const{extent:e,spatialReferenceInfo:t}=this;return null!=e&&B(e.xmin,e.xmax,t)}get loadAllTilesLevel(){const{tilingScheme:e}=this.surface;return Math.min(Math.ceil(e.levelAtScale(j.FLOW_GLOBAL_SCALE_THRESHOLD??O)),e.getMaxLod())}get targetTiles(){const e=new Map;if(this.loadAllTiles){const{_dataBounds:t}=this;if(null==t)return e;const i=S(),s=this.loadAllTilesLevel,r=this.surface.tilingScheme,n=r.rootTilesInExtent(t).flatMap(e=>Y(e,s));for(const l of n){const[n,a,o]=l;r.getExtent(s,a,o,i),de(t,i)&&e.set(L(s,a,o),l)}return e}const{renderedTiles:t}=this;for(const i of t??[])e.set(i.key,i.lij);return e}get _featureTilesBounds(){const e=this.view.featureTiles?.filterExtent,t=f(e,this.surface.spatialReference).geometry;return null==t?null:w(t)}get _flowRenderer(){const e=this.layer.renderer;return"flow"===e?.type?e:null}get _materialParameters(){return{...z(this._flowRenderer,this.layerView.fullOpacity,this.emissiveStrength),...this._materialParametersOverridde,hasSlicePlane:this.layerView.slicePlaneEnabled,screenSizePerspective:!this._draped&&"screenSizePerspectiveEnabled"in this.layer&&$(this.layer.screenSizePerspectiveEnabled)?this.view.screenSizePerspective.parameters:null}}get _opacity(){return this.layerView.fullOpacity}get _seamlessTransitionWaitingTime(){const{_averageLoadingTime:e}=this;return c(0===e?I:this._averageLoadingTime*C)}get _transitionEnabled(){return this.view.qualitySettings.flow.transitionEnabled}get _seamlessTransitionEnabled(){return!!this._transitionEnabled&&(null!=this._seamlessTransitionEnabledOverride?this._seamlessTransitionEnabledOverride:P)}get _tracingResolution(){const{extent:e}=this;if(!e)return[0,0];const t=V(e.xmin,e.xmax,this.spatialReferenceInfo?.valid)/(e.ymax-e.ymin),[i,s]=this.view.size;let r,n;i<s?(r=i,n=i/t):(r=s*t,n=s);const l=q,a=this.view.qualitySettings.flow.maxTracingResolution,o=Math.max(1,l/Math.min(r,n)),u=o*Math.min(1,a/Math.max(r*o,n*o));return[Math.round(r*u),Math.round(n*u)]}get visible(){const e=this._flowRenderer?.color;return this.visibleAtCurrentScale&&this.layer.effectiveVisible&&this._opacity>0&&(null==e||e.a>0)}get _effectiveDensity(){const{_simulationSettings:e}=this;if(null==e)return 0;const t=e.density*this.view.quality;return e.lineSpacing/Math.sqrt(t)<e.lineCollisionWidth?(e.lineSpacing/e.lineCollisionWidth)**2:t}get elevationInfo(){return("elevationInfo"in this.layer?this.layer.elevationInfo:void 0)??ue}startPositions(e){if(!this._seamlessTransitionEnabled)return[];const{_flowRenderer:t,_resources:i}=this;return null==t||null==i?[]:ne(i.streamlines,i.query,e,t.flowSpeed)}get needsMagnitude(){return this._flowRenderer?.hasVisualVariables()??!1}get spatialReferenceInfo(){return R(this.surface.spatialReference)}get loadingState(){return this._loadingState}get loadRequirementsMet(){return null!=this.renderedTiles&&(this.renderedTiles.size>0||this.loadAllTiles)&&null!=this.extent}hasWork(){return this.updatingHandles.updating||this.requireLoad||"before-transition"===this._loadingState}get updating(){return this._debugAllowAutoLoading.value&&this.visible&&!(this.destroyed||this.destroying)&&this.hasWork()}get visibleAtCurrentScale(){return!te()||ie(this.layer.effectiveScaleRange,this.view.scale)}get _simulationSettings(){const{_flowRenderer:e,_simulationSettingsOverride:t}=this;if(null==e)return null;let i=le(e);return i.segmentLength=i.lineCollisionWidth/2,i.onlyForwardTracing=!1,i.maxNumberOfStreamlines=this.view.qualitySettings.flow.maxTotalNumberOfStreamlines,i.density*=U,this.loadAllTiles&&this.isDataGlobal&&(i.density*=D),null!=t&&(i={...i,...t}),i}getSimulationSettings(e){const{_simulationSettings:t,spatialReferenceInfo:i}=this;if(null==t)return null;const s="global"===this.view.viewingMode&&null!=i&&B(e.extent.xmin,e.extent.xmax,i);return{...t,wrapAround:s,density:this._effectiveDensity}}get surface(){return this.view.basemapTerrain}doRefresh(){}clear(){this._resources?.detach(),this._resources=null,this._lastResources?.detach(),this._lastResources=null,this.tilesIntersectDataBounds=!0,this._loadingState="ready-to-load"}_update(){const e=this._time;this._lastResources?.hasFadedOut(e)&&this._lastResources.detach();const t=this._nextStateForTransition(e);if(!this.requireLoad||this.updatingHandles.updating||"ready-to-load"!==t||!this.loadRequirementsMet)return this._loadingState=t,void(this.tilesIntersectDataBounds||(this.requireLoad=!1));this._loadingState="loading";const i=async()=>{const t=this._time,i=this._seamlessTransitionEnabled&&null!=this._resources?c(e+this._seamlessTransitionWaitingTime):e;await this._load(i);const s=c((this._time-t)/1e3);this._updateAverageLoadingTime(s)};this.updatingHandles.consumePromise(l(i())),this.requireLoad=!1}_updateAverageLoadingTime(e){const t=W;this._averageLoadingTime=c(t*e+(1-t)*this._averageLoadingTime)}triggerLoad(){!this.suspended&&this._debugAllowAutoLoading.value&&(this.visible?this.requireLoad=!0:this.clear())}get _time(){return m(this.layerView.view.stage.renderer.renderContext.time)}async _load(e){const{extent:t,view:i}=this;if(!this.visible)return void this.clear();if(null==t)return void(this._loadingState="ready-to-load");this._transitionEnabled||(this._lastResources?.detach(),this._lastResources=null,this._resources?.detach(),this._resources=null);const s=new G(t,this.layerView.timeExtent,this._tracingResolution,i.state.contentPixelRatio,e),r=this._ensureAbortController();try{const t=await this._loadStreamlines(s,r.signal);if(n(r.signal),null!=t){this._lastResources?.detach(),this._lastResources=this._resources,this._resources=t;const i=this._getStartTime(e);null!=this._lastResources&&(this._lastResources.endTime=i),this._resources.startTime=i,this.view.animationsEnabled||(this._lastResources?.detach(),this._lastResources=null),await t.attach(),this.suspended&&this.clear(),n(r.signal),this._loadingState=this._seamlessTransitionEnabled?"before-transition":"transitioning"}else this._loadingState="ready-to-load"}catch(l){this._loadingState="ready-to-load"}}async _loadStreamlines(e,t){const i=await this.fetchDataAndGenerateStreamlines(e,t);if(null==i)return null;const{geometries:s,material:r}=await this._createGeometry(e,i,t);return this._draped?new J(e,i,r,s,this.layerView):new K(e,i,r,s,this.view)}async fetchDataAndGenerateStreamlines(e,t){return null}async _createGeometry(e,t,i){const s=new ee(this._materialParameters,this.view.state.isGlobal),r=new Array,{elevationInfo:l,_draped:a,view:o}=this;function*u(i){for(let n=0;n<t.length;++n)r.push(N(o,e,t[n],l,s,a)),i.madeProgress(),i.done&&(i=yield)}return await this.frameTask.scheduleGenerator(u,i),n(i),{geometries:r,material:s}}_triggerTilesUpdate(){if(this.suspended)return;if(this._tilesUpdateIsWaiting)return;this._tilesUpdateIsWaiting=!0;const e=this._ensureAbortController(),t=async()=>{try{await d(()=>this.view.stationary),n(e.signal),await this._debouncedTileUpdate(e)}finally{this._tilesUpdateIsWaiting=!1}};this.updatingHandles.consumePromise(l(t()))}_getTileFilterFunction(){const{view:e,_featureTilesBounds:i,loadAllTiles:s}=this;if(s){const{loadAllTilesLevel:e}=this;return t=>t.level===e}const r=e=>e.rendered&&e.visible,{featureTiles:n}=e;if(!n)return r;const l=n.tiles.filter(e=>e.measures.visible);return e=>r(e)&&de(i,e.extent)&&l.some(({lij:i})=>t(i,e.lij)||Z(i,e.lij))}_nextStateForTransition(e){const{_resources:t}=this;if(null==this._flowRenderer||null==t||"ready-to-load"===this._loadingState||"loading"===this._loadingState)return this._loadingState;const i=t.startTime;return e<i?"before-transition":e<i+k?"transitioning":"ready-to-load"}_getStartTime(e){if(!this.view.animationsEnabled)return pe;const t=this._time;return c(t>e?t:e)}get usedMemory(){return(this._lastResources?.usedMemory??0)+(this._resources?.usedMemory??0)}get test(){}};e([g()],ae.prototype,"type",void 0),e([g()],ae.prototype,"renderedTiles",void 0),e([g()],ae.prototype,"_resources",void 0),e([g()],ae.prototype,"_lastResources",void 0),e([g()],ae.prototype,"tilesIntersectDataBounds",void 0),e([g()],ae.prototype,"requireLoad",void 0),e([g()],ae.prototype,"_averageLoadingTime",void 0),e([g()],ae.prototype,"_loadingState",void 0),e([g()],ae.prototype,"emissiveStrength",void 0),e([g()],ae.prototype,"_clippingArea",null),e([g()],ae.prototype,"_dataBounds",null),e([g()],ae.prototype,"suspended",null),e([g()],ae.prototype,"_fullExtentSurfaceSpatialReference",null),e([g()],ae.prototype,"_draped",null),e([g()],ae.prototype,"extent",null),e([g()],ae.prototype,"loadAllTiles",null),e([g()],ae.prototype,"isDataGlobal",null),e([g()],ae.prototype,"loadAllTilesLevel",null),e([g()],ae.prototype,"targetTiles",null),e([g()],ae.prototype,"_featureTilesBounds",null),e([g()],ae.prototype,"_flowRenderer",null),e([g()],ae.prototype,"_materialParameters",null),e([g()],ae.prototype,"_opacity",null),e([g()],ae.prototype,"_seamlessTransitionWaitingTime",null),e([g()],ae.prototype,"_transitionEnabled",null),e([g()],ae.prototype,"_seamlessTransitionEnabled",null),e([g()],ae.prototype,"_tracingResolution",null),e([g()],ae.prototype,"visible",null),e([g()],ae.prototype,"_effectiveDensity",null),e([g()],ae.prototype,"elevationInfo",null),e([g()],ae.prototype,"needsMagnitude",null),e([g()],ae.prototype,"spatialReferenceInfo",null),e([g()],ae.prototype,"loadingState",null),e([g()],ae.prototype,"updating",null),e([g()],ae.prototype,"visibleAtCurrentScale",null),e([g()],ae.prototype,"_materialParametersOverridde",void 0),e([g()],ae.prototype,"_suspendedOverride",void 0),e([g()],ae.prototype,"_simulationSettingsOverride",void 0),e([g()],ae.prototype,"_seamlessTransitionEnabledOverride",void 0),e([g()],ae.prototype,"_simulationSettings",null),e([g()],ae.prototype,"surface",null),ae=e([_("esri.views.3d.layers.FlowSubView3D")],ae);const oe=ae,ue=new x({mode:"on-the-ground"});function de(e,t){return null==e||null==t||b(e,t)}const he=v(X,y.WebMercator),pe=c(-F);function ce(e){return null!=e&&e.spatialReference.isWebMercator?e?.intersection(he):e}export{oe as default};
2
+ import{__decorate as e}from"tslib";import{equals as t}from"../../../core/arrayUtils.js";import"../../../core/has.js";import{removeMaybe as i,abortMaybe as s}from"../../../core/maybe.js";import{debounce as r,throwIfAborted as n,ignoreAbortErrors as l}from"../../../core/promiseUtils.js";import{watch as a,sync as o,when as u,whenOnce as d}from"../../../core/reactiveUtils.js";import{addFrameTask as h}from"../../../core/scheduling.js";import{signal as p}from"../../../core/signal.js";import{Seconds as c,secondsFromMilliseconds as m}from"../../../core/time.js";import{property as g,subclass as _}from"../../../core/accessorSupport/decorators.js";import{projectOrLoad as f}from"../../../geometry/projectionUtils.js";import y from"../../../geometry/SpatialReference.js";import{toExtent as v,fromExtent as T,intersection as w,create as b,intersects as S}from"../../../geometry/support/aaBoundingRect.js";import{getInfo as R}from"../../../geometry/support/spatialReferenceUtils.js";import x from"../../../symbols/support/ElevationInfo.js";import A from"./SubView3D.js";import{getFeatureTileId as L}from"./support/FeatureTileDescriptor.js";import{makeScheduleFunction as E}from"./support/makeScheduleFunction.js";import{debugFlags as j}from"../support/debugFlags.js";import{tileFilterDistance as M,scaleThresholdForLoadingAllTiles as O,defaultTransitionDuration as I,transitionDurationFactor as C,seamlessTransitionEnabled as P,densityFactor as U,loadAllTilesDensityFactor as D,averageLoadingTimeSmoothingFactor as W,fadeOutTime as k,fadeInTime as F,minimumTracingResolution as q}from"../support/flow/constants.js";import{isFullExtent as B,wrappedWidth as V,FlowQuery3D as G}from"../support/flow/FlowQuery3D.js";import{FlowWorkerHandle as H}from"../support/flow/FlowWorkerHandle.js";import{materialParametersFromRenderer as z,createStreamlineGeometry as N}from"../support/flow/geometryUtils.js";import{boundingRectOfTiles as Q}from"../support/flow/loadUtils.js";import{StreamlineResources3DOverlay as J}from"../support/flow/StreamlineResources3DOverlay.js";import{StreamlineResources3DShape as K}from"../support/flow/StreamlineResources3DShape.js";import{webMercatorWorldExtent as X}from"../terrain/TerrainConst.js";import{descendantsAtLevel as Y,tilesAreRelated as Z}from"../terrain/tileUtils.js";import{isScreenSizePerspectiveEnabled as $}from"../webgl-engine/lib/screenSizePerspectiveUtils.js";import{RibbonLineMaterial as ee}from"../webgl-engine/materials/RibbonLineMaterial.js";import{hasLayerBasedScaleVisibility as te,isInEffectiveScaleRange as ie}from"../../support/layerViewUtils.js";import{TaskPriority as se}from"../../support/Scheduler.js";import{simulationSettingsEqual as re,getPositions as ne,getFlowSimulationSettings as le}from"../../support/flow/utils.js";let ae=class extends A{constructor(e){super(e),this.type="flow",this.renderedTiles=null,this.tilesIntersectDataBounds=!0,this.requireLoad=!1,this.workerHandle=null,this.frameTask=null,this._averageLoadingTime=c(0),this._abortController=null,this._loadingState="ready-to-load",this._tilesUpdateIsWaiting=!1,this._debugAllowAutoLoading=p(!0),this.emissiveStrength=0,this._materialParametersOverridde=null,this._suspendedOverride=null,this._simulationSettingsOverride=null,this._seamlessTransitionEnabledOverride=null,this._updateTask=null,this._debouncedTileUpdate=r(async e=>{const{allTiles:t}=this.surface,i=this._getTileFilterFunction(),{_dataBounds:s}=this,r=new Set;let l=!1;function*a(e){for(let n=0;n<t.length;++n){const a=t.at(n),o=de(s,a.extent);i(a)&&o&&(r.add(a),l=!0),e.madeProgress(),e.done&&(e=yield)}}await this.frameTask.scheduleGenerator(a,e.signal),n(e.signal),this.tilesIntersectDataBounds=!(0!==t.length&&!this.loadAllTiles)||l,this.renderedTiles=r})}initialize(){const{surface:e,view:t}=this,{resourceController:i}=t;this.workerHandle=new H(E(i)),this.frameTask=i.scheduler.registerTask(se.FLOW_GENERATOR),this._updateTask=h({update:()=>this._update()}),this.addHandles([a(()=>this._simulationSettings,()=>this.triggerLoad(),{sync:!0,equals:(e,t)=>null==e&&null==t||null!=e&&null!=t&&re(e,t)}),this.updatingHandles.add(()=>this.suspended,e=>{e?this._suspend():this._resume()},o),a(()=>{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._effectiveDensity]},()=>this.triggerLoad(),o),u(()=>!this._animationsEnabled,()=>{const{_resources:e,_lastResources:t}=this;null!=e&&(e.startTime=pe),null!=t&&(t.startTime=pe)},o),a(()=>this._materialParameters,e=>{this._resources?.setMaterialParameters(e),this._lastResources?.setMaterialParameters(e)}),u(()=>e.allTilesCreated,()=>this._triggerTilesUpdate(),o),t.enableFeatureTiles(),a(()=>[this._dataBounds,this._featureTilesBounds,this.loadAllTiles],()=>this._triggerTilesUpdate()),a(()=>this._flowRenderer,(e,t)=>{const i=t?.visualVariables??[],s=e?.visualVariables??[];s.length===i.length&&s.every((e,t)=>e.type===i[t].type)||this.clear()}),u(()=>!t.featureTiles?.updating,()=>{this._triggerTilesUpdate()})]),this.suspended&&this._suspend(),this._triggerTilesUpdate()}destroy(){this._updateTask=i(this._updateTask),this.abort(),this.clear(),this.notifyChange("updating")}abort(){this._abortController=s(this._abortController),this._tilesUpdateIsWaiting=!1,this.requireLoad=!1}_ensureAbortController(){return null==this._abortController&&(this._abortController=new AbortController),this._abortController}_resume(){this._updateTask.resume(),this._triggerTilesUpdate(),this.triggerLoad()}_suspend(){this._updateTask.pause(),this.abort(),this.clear()}get _animationsEnabled(){return this.view.state.animationsEnabled}get _clippingArea(){const e=f(this.view.clippingArea,this.surface.spatialReference).geometry;return null==e?null:T(e)}get _dataBounds(){const e=this._fullExtentSurfaceSpatialReference;return null==e?null:T(e)}get suspended(){return null!=this._suspendedOverride?this._suspendedOverride:this.layerView.suspended||this.view.groundView.hasTerrainReplacement}get _fullExtentSurfaceSpatialReference(){return f(this.layer.fullExtent,this.surface.spatialReference).geometry}get _draped(){return"on-the-ground"===this.elevationInfo.mode}get extent(){if(this.loadAllTiles)return ce(this._fullExtentSurfaceSpatialReference);const{spatialReference:e}=this.surface;let t=this.renderedTiles;if(null==e||null==t)return null;const i=this.view.terrainLevel;if(null!=i){const e=new Set;t.forEach(t=>{Math.abs(i-t.level)<M&&e.add(t)}),t=e}const s=Q(t,this.spatialReferenceInfo);return null==s?null:(w(s,this._clippingArea,s),ce(v(s,e)))}get loadAllTiles(){return this.view.scale>(j.FLOW_GLOBAL_SCALE_THRESHOLD??O)}get isDataGlobal(){const{extent:e,spatialReferenceInfo:t}=this;return null!=e&&B(e.xmin,e.xmax,t)}get loadAllTilesLevel(){const{tilingScheme:e}=this.surface;return Math.min(Math.ceil(e.levelAtScale(j.FLOW_GLOBAL_SCALE_THRESHOLD??O)),e.getMaxLod())}get targetTiles(){const e=new Map;if(this.loadAllTiles){const{_dataBounds:t}=this;if(null==t)return e;const i=b(),s=this.loadAllTilesLevel,r=this.surface.tilingScheme,n=r.rootTilesInExtent(t).flatMap(e=>Y(e,s));for(const l of n){const[n,a,o]=l;r.getExtent(s,a,o,i),de(t,i)&&e.set(L(s,a,o),l)}return e}const{renderedTiles:t}=this;for(const i of t??[])e.set(i.key,i.lij);return e}get _featureTilesBounds(){const e=this.view.featureTiles?.filterExtent,t=f(e,this.surface.spatialReference).geometry;return null==t?null:T(t)}get _flowRenderer(){const e=this.layer.renderer;return"flow"===e?.type?e:null}get _materialParameters(){return{...z(this._flowRenderer,this.layerView.fullOpacity,this.emissiveStrength),...this._materialParametersOverridde,hasSlicePlane:this.layerView.slicePlaneEnabled,screenSizePerspective:!this._draped&&"screenSizePerspectiveEnabled"in this.layer&&$(this.layer.screenSizePerspectiveEnabled)?this.view.screenSizePerspective.parameters:null}}get _opacity(){return this.layerView.fullOpacity}get _seamlessTransitionWaitingTime(){const{_averageLoadingTime:e}=this;return c(0===e?I:this._averageLoadingTime*C)}get _transitionEnabled(){return this.view.qualitySettings.flow.transitionEnabled}get _seamlessTransitionEnabled(){return!!this._transitionEnabled&&(null!=this._seamlessTransitionEnabledOverride?this._seamlessTransitionEnabledOverride:P)}get _tracingResolution(){const{extent:e}=this;if(!e)return[0,0];const t=V(e.xmin,e.xmax,this.spatialReferenceInfo?.valid)/(e.ymax-e.ymin),[i,s]=this.view.size;let r,n;i<s?(r=i,n=i/t):(r=s*t,n=s);const l=q,a=this.view.qualitySettings.flow.maxTracingResolution,o=Math.max(1,l/Math.min(r,n)),u=o*Math.min(1,a/Math.max(r*o,n*o));return[Math.round(r*u),Math.round(n*u)]}get visible(){const e=this._flowRenderer?.color;return this.visibleAtCurrentScale&&this.layer.effectiveVisible&&this._opacity>0&&(null==e||e.a>0)}get _effectiveDensity(){const{_simulationSettings:e}=this;if(null==e)return 0;const t=e.density*this.view.quality;return e.lineSpacing/Math.sqrt(t)<e.lineCollisionWidth?(e.lineSpacing/e.lineCollisionWidth)**2:t}get elevationInfo(){return("elevationInfo"in this.layer?this.layer.elevationInfo:void 0)??ue}startPositions(e){if(!this._seamlessTransitionEnabled)return[];const{_flowRenderer:t,_resources:i}=this;return null==t||null==i?[]:ne(i.streamlines,i.query,e,t.flowSpeed)}get needsMagnitude(){return this._flowRenderer?.hasVisualVariables()??!1}get spatialReferenceInfo(){return R(this.surface.spatialReference)}get loadingState(){return this._loadingState}get loadRequirementsMet(){return null!=this.renderedTiles&&(this.renderedTiles.size>0||this.loadAllTiles)&&null!=this.extent}hasWork(){return this.updatingHandles.updating||this.requireLoad||"before-transition"===this._loadingState}get updating(){return this._debugAllowAutoLoading.value&&this.visible&&!(this.destroyed||this.destroying)&&this.hasWork()}get visibleAtCurrentScale(){return!te()||ie(this.layer.effectiveScaleRange,this.view.scale)}get _simulationSettings(){const{_flowRenderer:e,_simulationSettingsOverride:t}=this;if(null==e)return null;let i=le(e);return i.segmentLength=i.lineCollisionWidth/2,i.onlyForwardTracing=!1,i.maxNumberOfStreamlines=this.view.qualitySettings.flow.maxTotalNumberOfStreamlines,i.density*=U,this.loadAllTiles&&this.isDataGlobal&&(i.density*=D),null!=t&&(i={...i,...t}),i}getSimulationSettings(e){const{_simulationSettings:t,spatialReferenceInfo:i}=this;if(null==t)return null;const s="global"===this.view.viewingMode&&null!=i&&B(e.extent.xmin,e.extent.xmax,i);return{...t,wrapAround:s,density:this._effectiveDensity}}get surface(){return this.view.basemapTerrain}doRefresh(){}clear(){this._resources?.detach(),this._resources=null,this._lastResources?.detach(),this._lastResources=null,this.tilesIntersectDataBounds=!0,this._loadingState="ready-to-load"}_update(){const e=this._time;this._lastResources?.hasFadedOut(e)&&this._lastResources.detach();const t=this._nextStateForTransition(e);if(!this.requireLoad||this.updatingHandles.updating||"ready-to-load"!==t||!this.loadRequirementsMet)return this._loadingState=t,void(this.tilesIntersectDataBounds||(this.requireLoad=!1));this._loadingState="loading";const i=async()=>{const t=this._time,i=this._seamlessTransitionEnabled&&null!=this._resources?c(e+this._seamlessTransitionWaitingTime):e;await this._load(i);const s=c((this._time-t)/1e3);this._updateAverageLoadingTime(s)};this.updatingHandles.consumePromise(l(i())),this.requireLoad=!1}_updateAverageLoadingTime(e){const t=W;this._averageLoadingTime=c(t*e+(1-t)*this._averageLoadingTime)}triggerLoad(){!this.suspended&&this._debugAllowAutoLoading.value&&(this.visible?this.requireLoad=!0:this.clear())}get _time(){return m(this.layerView.view.stage.renderer.renderContext.time)}async _load(e){const{extent:t,view:i}=this;if(!this.visible)return void this.clear();if(null==t)return void(this._loadingState="ready-to-load");this._transitionEnabled||(this._lastResources?.detach(),this._lastResources=null,this._resources?.detach(),this._resources=null);const s=new G(t,this.layerView.timeExtent,this._tracingResolution,i.state.contentPixelRatio,e),r=this._ensureAbortController();try{const t=await this._loadStreamlines(s,r.signal);if(n(r.signal),null!=t){this._lastResources?.detach(),this._lastResources=this._resources,this._resources=t;const i=this._getStartTime(e);null!=this._lastResources&&(this._lastResources.endTime=i),this._resources.startTime=i,this._animationsEnabled||(this._lastResources?.detach(),this._lastResources=null),await t.attach(),this.suspended&&this.clear(),n(r.signal),this._loadingState=this._seamlessTransitionEnabled?"before-transition":"transitioning"}else this._loadingState="ready-to-load"}catch(l){this._loadingState="ready-to-load"}}async _loadStreamlines(e,t){const i=await this.fetchDataAndGenerateStreamlines(e,t);if(null==i)return null;const{geometries:s,material:r}=await this._createGeometry(e,i,t);return this._draped?new J(e,i,r,s,this.layerView):new K(e,i,r,s,this.view)}async fetchDataAndGenerateStreamlines(e,t){return null}async _createGeometry(e,t,i){const s=new ee(this._materialParameters,this.view.state.isGlobal),r=new Array,{elevationInfo:l,_draped:a,view:o}=this;function*u(i){for(let n=0;n<t.length;++n)r.push(N(o,e,t[n],l,s,a)),i.madeProgress(),i.done&&(i=yield)}return await this.frameTask.scheduleGenerator(u,i),n(i),{geometries:r,material:s}}_triggerTilesUpdate(){if(this.suspended)return;if(this._tilesUpdateIsWaiting)return;this._tilesUpdateIsWaiting=!0;const e=this._ensureAbortController(),t=async()=>{try{await d(()=>this.view.stationary),n(e.signal),await this._debouncedTileUpdate(e)}finally{this._tilesUpdateIsWaiting=!1}};this.updatingHandles.consumePromise(l(t()))}_getTileFilterFunction(){const{view:e,_featureTilesBounds:i,loadAllTiles:s}=this;if(s){const{loadAllTilesLevel:e}=this;return t=>t.level===e}const r=e=>e.rendered&&e.visible,{featureTiles:n}=e;if(!n)return r;const l=n.tiles.filter(e=>e.measures.visible);return e=>r(e)&&de(i,e.extent)&&l.some(({lij:i})=>t(i,e.lij)||Z(i,e.lij))}_nextStateForTransition(e){const{_resources:t}=this;if(null==this._flowRenderer||null==t||"ready-to-load"===this._loadingState||"loading"===this._loadingState)return this._loadingState;const i=t.startTime;return e<i?"before-transition":e<i+k?"transitioning":"ready-to-load"}_getStartTime(e){if(!this._animationsEnabled)return pe;const t=this._time;return c(t>e?t:e)}get usedMemory(){return(this._lastResources?.usedMemory??0)+(this._resources?.usedMemory??0)}get test(){}};e([g()],ae.prototype,"type",void 0),e([g()],ae.prototype,"renderedTiles",void 0),e([g()],ae.prototype,"_resources",void 0),e([g()],ae.prototype,"_lastResources",void 0),e([g()],ae.prototype,"tilesIntersectDataBounds",void 0),e([g()],ae.prototype,"requireLoad",void 0),e([g()],ae.prototype,"_averageLoadingTime",void 0),e([g()],ae.prototype,"_loadingState",void 0),e([g()],ae.prototype,"emissiveStrength",void 0),e([g()],ae.prototype,"_animationsEnabled",null),e([g()],ae.prototype,"_clippingArea",null),e([g()],ae.prototype,"_dataBounds",null),e([g()],ae.prototype,"suspended",null),e([g()],ae.prototype,"_fullExtentSurfaceSpatialReference",null),e([g()],ae.prototype,"_draped",null),e([g()],ae.prototype,"extent",null),e([g()],ae.prototype,"loadAllTiles",null),e([g()],ae.prototype,"isDataGlobal",null),e([g()],ae.prototype,"loadAllTilesLevel",null),e([g()],ae.prototype,"targetTiles",null),e([g()],ae.prototype,"_featureTilesBounds",null),e([g()],ae.prototype,"_flowRenderer",null),e([g()],ae.prototype,"_materialParameters",null),e([g()],ae.prototype,"_opacity",null),e([g()],ae.prototype,"_seamlessTransitionWaitingTime",null),e([g()],ae.prototype,"_transitionEnabled",null),e([g()],ae.prototype,"_seamlessTransitionEnabled",null),e([g()],ae.prototype,"_tracingResolution",null),e([g()],ae.prototype,"visible",null),e([g()],ae.prototype,"_effectiveDensity",null),e([g()],ae.prototype,"elevationInfo",null),e([g()],ae.prototype,"needsMagnitude",null),e([g()],ae.prototype,"spatialReferenceInfo",null),e([g()],ae.prototype,"loadingState",null),e([g()],ae.prototype,"updating",null),e([g()],ae.prototype,"visibleAtCurrentScale",null),e([g()],ae.prototype,"_materialParametersOverridde",void 0),e([g()],ae.prototype,"_suspendedOverride",void 0),e([g()],ae.prototype,"_simulationSettingsOverride",void 0),e([g()],ae.prototype,"_seamlessTransitionEnabledOverride",void 0),e([g()],ae.prototype,"_simulationSettings",null),e([g()],ae.prototype,"surface",null),ae=e([_("esri.views.3d.layers.FlowSubView3D")],ae);const oe=ae,ue=new x({mode:"on-the-ground"});function de(e,t){return null==e||null==t||S(e,t)}const he=v(X,y.WebMercator),pe=c(-F);function ce(e){return null!=e&&e.spatialReference.isWebMercator?e?.intersection(he):e}export{oe as default};