@arcgis/core 4.32.0-next.20250121 → 4.32.0-next.20250123

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 (867) hide show
  1. package/Graphic.js +1 -1
  2. package/Viewpoint.js +1 -1
  3. package/WebLinkChart.js +1 -1
  4. package/analysis/LengthDimension.js +1 -1
  5. package/analysis/SlicePlane.js +1 -1
  6. package/analysis/Viewshed.js +1 -1
  7. package/analysis/ViewshedAnalysis.js +1 -1
  8. package/arcade/featureSetUtils.js +1 -1
  9. package/arcade/featureset/sources/FeatureLayerMemory.js +1 -1
  10. package/arcade/featureset/support/shared.js +1 -1
  11. package/arcade/functions/knowledgegraph.js +1 -1
  12. package/arcade/treeAnalysis.js +1 -1
  13. package/assets/components/assets/icon/crosshair16.json +1 -0
  14. package/assets/components/assets/icon/crosshair24.json +1 -0
  15. package/assets/components/assets/icon/crosshair32.json +1 -0
  16. package/assets/components/assets/icon/utilityNetworkLayer16.json +1 -0
  17. package/assets/components/assets/icon/utilityNetworkLayer24.json +1 -0
  18. package/assets/components/assets/icon/utilityNetworkLayer32.json +1 -0
  19. package/assets/esri/core/t9n/Units_ar.json +1 -1
  20. package/assets/esri/core/t9n/Units_bg.json +1 -1
  21. package/assets/esri/core/t9n/Units_bs.json +1 -1
  22. package/assets/esri/core/t9n/Units_ca.json +1 -1
  23. package/assets/esri/core/t9n/Units_cs.json +1 -1
  24. package/assets/esri/core/t9n/Units_da.json +1 -1
  25. package/assets/esri/core/t9n/Units_de.json +1 -1
  26. package/assets/esri/core/t9n/Units_el.json +1 -1
  27. package/assets/esri/core/t9n/Units_es.json +1 -1
  28. package/assets/esri/core/t9n/Units_et.json +1 -1
  29. package/assets/esri/core/t9n/Units_fi.json +1 -1
  30. package/assets/esri/core/t9n/Units_fr.json +1 -1
  31. package/assets/esri/core/t9n/Units_he.json +1 -1
  32. package/assets/esri/core/t9n/Units_hr.json +1 -1
  33. package/assets/esri/core/t9n/Units_hu.json +1 -1
  34. package/assets/esri/core/t9n/Units_id.json +1 -1
  35. package/assets/esri/core/t9n/Units_it.json +1 -1
  36. package/assets/esri/core/t9n/Units_ja.json +1 -1
  37. package/assets/esri/core/t9n/Units_ko.json +1 -1
  38. package/assets/esri/core/t9n/Units_lt.json +1 -1
  39. package/assets/esri/core/t9n/Units_lv.json +1 -1
  40. package/assets/esri/core/t9n/Units_nl.json +1 -1
  41. package/assets/esri/core/t9n/Units_no.json +1 -1
  42. package/assets/esri/core/t9n/Units_pl.json +1 -1
  43. package/assets/esri/core/t9n/Units_pt-BR.json +1 -1
  44. package/assets/esri/core/t9n/Units_pt-PT.json +1 -1
  45. package/assets/esri/core/t9n/Units_ro.json +1 -1
  46. package/assets/esri/core/t9n/Units_ru.json +1 -1
  47. package/assets/esri/core/t9n/Units_sk.json +1 -1
  48. package/assets/esri/core/t9n/Units_sl.json +1 -1
  49. package/assets/esri/core/t9n/Units_sr.json +1 -1
  50. package/assets/esri/core/t9n/Units_sv.json +1 -1
  51. package/assets/esri/core/t9n/Units_th.json +1 -1
  52. package/assets/esri/core/t9n/Units_tr.json +1 -1
  53. package/assets/esri/core/t9n/Units_uk.json +1 -1
  54. package/assets/esri/core/t9n/Units_vi.json +1 -1
  55. package/assets/esri/core/t9n/Units_zh-CN.json +1 -1
  56. package/assets/esri/core/t9n/Units_zh-HK.json +1 -1
  57. package/assets/esri/core/t9n/Units_zh-TW.json +1 -1
  58. package/assets/esri/core/workers/RemoteClient.js +1 -1
  59. package/assets/esri/core/workers/chunks/00479bc2393e5ad0e9b7.js +1 -0
  60. package/assets/esri/core/workers/chunks/0167cf867d8e46c818b0.js +1 -0
  61. package/assets/esri/core/workers/chunks/{6d17488396583d83d9be.js → 0711d3ad4d403bcfdcad.js} +1 -1
  62. package/assets/esri/core/workers/chunks/07360fde6ea65664e6ca.js +1 -0
  63. package/assets/esri/core/workers/chunks/{f8e188af5608293d5b2b.js → 07bff9e742f3e5877f3f.js} +1 -1
  64. package/assets/esri/core/workers/chunks/08ba4ab873a0da6a95eb.js +1 -0
  65. package/assets/esri/core/workers/chunks/{baf6b773b8c714d86cba.js → 0982611dd86f0805d102.js} +1 -1
  66. package/assets/esri/core/workers/chunks/12dd892cf61a76fb40ad.js +1 -0
  67. package/assets/esri/core/workers/chunks/13453393e40ab80329d9.js +1 -0
  68. package/assets/esri/core/workers/chunks/15e08e8a8a72b177d74c.js +1 -0
  69. package/assets/esri/core/workers/chunks/16f82e9d98371431b46d.js +1 -0
  70. package/assets/esri/core/workers/chunks/1787932b984ec8977095.js +1 -0
  71. package/assets/esri/core/workers/chunks/1e3ab66d0e8a7f160f33.js +1 -0
  72. package/assets/esri/core/workers/chunks/1f8eb143f5d665b95593.js +1 -0
  73. package/assets/esri/core/workers/chunks/2079d6e3da42d1ceb4c5.js +1 -0
  74. package/assets/esri/core/workers/chunks/207c040b0e42358a5389.js +1 -0
  75. package/assets/esri/core/workers/chunks/21016d58428b15f7427c.js +1 -0
  76. package/assets/esri/core/workers/chunks/{af0b0a7eedebcf99d05d.js → 2118e9ffb24178ed7f59.js} +1 -1
  77. package/assets/esri/core/workers/chunks/21c12edc0632eb911e73.js +1 -0
  78. package/assets/esri/core/workers/chunks/{12b2c8251ec2d0e2ca46.js → 22721fa9d1e8a8d47b0e.js} +1 -1
  79. package/assets/esri/core/workers/chunks/24a86c52c8bdd0b5eb4d.js +1 -0
  80. package/assets/esri/core/workers/chunks/{9970e0e74cf2877a7ffc.js → 2503beb30f905b78d85f.js} +2 -2
  81. package/assets/esri/core/workers/chunks/2503beb30f905b78d85f.js.LICENSE.txt +15 -0
  82. package/assets/esri/core/workers/chunks/25a6641938a9ccab39b7.js +1 -0
  83. package/assets/esri/core/workers/chunks/26a2bd432e7a1b3870c3.js +1 -0
  84. package/assets/esri/core/workers/chunks/26e9a1889d069e81a483.js +1 -0
  85. package/assets/esri/core/workers/chunks/2840705ae7fa909ab4ed.js +1 -0
  86. package/assets/esri/core/workers/chunks/2971266a49226e769360.js +1 -0
  87. package/assets/esri/core/workers/chunks/298da83f8d507d128213.js +1 -0
  88. package/assets/esri/core/workers/chunks/2a33e83ff2ef16a2b421.js +1 -0
  89. package/assets/esri/core/workers/chunks/2a7f5d09cdc0333fa4bd.js +1 -0
  90. package/assets/esri/core/workers/chunks/2e82c8882a0989ed5431.js +1 -0
  91. package/assets/esri/core/workers/chunks/2ea5e5e6c4660a06b516.js +1 -0
  92. package/assets/esri/core/workers/chunks/304722106439951da6e1.js +1 -0
  93. package/assets/esri/core/workers/chunks/324a5547c64a3bae670d.js +1 -0
  94. package/assets/esri/core/workers/chunks/349f31a1fb489fbfe60d.js +1 -0
  95. package/assets/esri/core/workers/chunks/{f95d4fb1199161d8b683.js → 34b31091e172e910d750.js} +1 -1
  96. package/assets/esri/core/workers/chunks/{c690268f48bc84778b23.js → 3b6f2e5ec0a372ae8b94.js} +1 -1
  97. package/assets/esri/core/workers/chunks/3c23e567cfb7372c44ba.js +1 -0
  98. package/assets/esri/core/workers/chunks/{66d40a486aa3caa76106.js → 3c591f76e7d6204b7780.js} +1 -1
  99. package/assets/esri/core/workers/chunks/3f25b7844816bbc3a9fe.js +1 -0
  100. package/assets/esri/core/workers/chunks/402de76b5de05615e111.js +1 -0
  101. package/assets/esri/core/workers/chunks/453f71ac3579524221b2.js +1 -0
  102. package/assets/esri/core/workers/chunks/454034bad60414a9ab7f.js +1 -0
  103. package/assets/esri/core/workers/chunks/472564bd841d0c5d8f17.js +1 -0
  104. package/assets/esri/core/workers/chunks/483787099d2ba8b8022d.js +1 -0
  105. package/assets/esri/core/workers/chunks/499e845c727b7891283d.js +2 -0
  106. package/assets/esri/core/workers/chunks/{34b86b4b9e6c1937ee39.js.LICENSE.txt → 499e845c727b7891283d.js.LICENSE.txt} +4 -6
  107. package/assets/esri/core/workers/chunks/4d7bd2bbe9045a2fee7a.js +1 -0
  108. package/assets/esri/core/workers/chunks/4e5cf2d489db2a57d3bd.js +1 -0
  109. package/assets/esri/core/workers/chunks/52a1c14dc33964e197f6.js +1 -0
  110. package/assets/esri/core/workers/chunks/{f8b85c0074d4fe4c158e.js → 571a0af503dbe8093814.js} +1 -1
  111. package/assets/esri/core/workers/chunks/57ebfa7f163a1b40cd1e.js +1 -0
  112. package/assets/esri/core/workers/chunks/589777dab423b619da47.js +1 -0
  113. package/assets/esri/core/workers/chunks/{2de5fe03e28ca8a72597.js → 5a83f90b55a5efbe1ef2.js} +1 -1
  114. package/assets/esri/core/workers/chunks/5c57aa9fdc4e1bab61ac.js +1 -0
  115. package/assets/esri/core/workers/chunks/5e889a675cbaff03ad5a.js +1 -0
  116. package/assets/esri/core/workers/chunks/5fbdb5fea7d6676fcf19.js +1 -0
  117. package/assets/esri/core/workers/chunks/610b33b7291cffcc4e5d.js +1 -0
  118. package/assets/esri/core/workers/chunks/644e83f48752a34f0d1a.js +1 -0
  119. package/assets/esri/core/workers/chunks/{c81204ae663e58c7b689.js → 6aa6a56bcece0793967e.js} +1 -1
  120. package/assets/esri/core/workers/chunks/6d179eb8edcefb91d5d7.js +1 -0
  121. package/assets/esri/core/workers/chunks/6df1bda3826a4a3c1dc9.js +1 -0
  122. package/assets/esri/core/workers/chunks/6e6422eda398774acbc7.js +1 -0
  123. package/assets/esri/core/workers/chunks/6eb829a7959df2269b0e.js +1 -0
  124. package/assets/esri/core/workers/chunks/7719fe672ea74cdc87be.js +1 -0
  125. package/assets/esri/core/workers/chunks/774cbf14c74504458a6f.js +1 -0
  126. package/assets/esri/core/workers/chunks/79afe4674a0557eb26e4.js +1 -0
  127. package/assets/esri/core/workers/chunks/{02b2175132c9720bc756.js → 7a0415db78c68d31733f.js} +1 -1
  128. package/assets/esri/core/workers/chunks/7a9e1696dc6120df15b0.js +1 -0
  129. package/assets/esri/core/workers/chunks/7ae1f26ded268099f429.js +1 -0
  130. package/assets/esri/core/workers/chunks/7bf08823f861628144a1.js +1 -0
  131. package/assets/esri/core/workers/chunks/7d49b5bc9eb102e467ab.js +1 -0
  132. package/assets/esri/core/workers/chunks/7e4d72279cc599b7029c.js +1 -0
  133. package/assets/esri/core/workers/chunks/{89198ca24466d939e4e8.js → 7ee2d34d9eaab5e8f589.js} +1 -1
  134. package/assets/esri/core/workers/chunks/7fd48f0a2b35779e680a.js +1 -0
  135. package/assets/esri/core/workers/chunks/81efe1f47fd41b7a5cc1.js +1 -0
  136. package/assets/esri/core/workers/chunks/835fa4484c58d9b31c78.js +1 -0
  137. package/assets/esri/core/workers/chunks/{44ec3c77339b9765aaa4.js → 8584ccce34972e28c040.js} +1 -1
  138. package/assets/esri/core/workers/chunks/86149b4a5a148744c7d1.js +1 -0
  139. package/assets/esri/core/workers/chunks/86b63a4805f7dfbf5857.js +1 -0
  140. package/assets/esri/core/workers/chunks/89df68dd6a0386210d5d.js +1 -0
  141. package/assets/esri/core/workers/chunks/8a13cd313d309281dbb9.js +1 -0
  142. package/assets/esri/core/workers/chunks/{1bf472f3ca67b0275667.js → 8a1e4f65fc81aba7a704.js} +1 -1
  143. package/assets/esri/core/workers/chunks/8b8dd0771fbc582e1e24.js +2 -0
  144. package/assets/esri/core/workers/chunks/{280b7b885b96a5a68716.js.LICENSE.txt → 8b8dd0771fbc582e1e24.js.LICENSE.txt} +4 -6
  145. package/assets/esri/core/workers/chunks/8e334fa440ae542e2e34.js +1 -0
  146. package/assets/esri/core/workers/chunks/91384398f01485631f70.js +1 -0
  147. package/assets/esri/core/workers/chunks/92155d112ebb6a4c6c6e.js +1 -0
  148. package/assets/esri/core/workers/chunks/{6a737f056b2b95f09776.js → 92871ebb339a7b6ff29c.js} +1 -1
  149. package/assets/esri/core/workers/chunks/92d243c7bc2f92f6cd33.js +1 -0
  150. package/assets/esri/core/workers/chunks/971c956de1f8dd230d0f.js +1 -0
  151. package/assets/esri/core/workers/chunks/9848e9b9cc62328bfeb4.js +1 -0
  152. package/assets/esri/core/workers/chunks/9848f496d534feff6df1.js +314 -0
  153. package/assets/esri/core/workers/chunks/9bd22cdf6eb158555906.js +1 -0
  154. package/assets/esri/core/workers/chunks/{3a3e9701e5d7b05f41b7.js → 9bfb091cec7eed6c8111.js} +1 -1
  155. package/assets/esri/core/workers/chunks/9c5c6ecaf5be24279fa5.js +1 -0
  156. package/assets/esri/core/workers/chunks/9c6380af3bc3130658e1.js +1 -0
  157. package/assets/esri/core/workers/chunks/{17726b0ab1bf66185d66.js → 9d6d82419de2b76508d8.js} +1 -1
  158. package/assets/esri/core/workers/chunks/9ed1691eab19dfb1cf04.js +1 -0
  159. package/assets/esri/core/workers/chunks/a0a4c7605c678d2de7ef.js +1 -0
  160. package/assets/esri/core/workers/chunks/a3ae5ea96898de327147.js +1 -0
  161. package/assets/esri/core/workers/chunks/aca9a39eb1181a7733bb.js +1 -0
  162. package/assets/esri/core/workers/chunks/ad215219e5eef8598745.js +1 -0
  163. package/assets/esri/core/workers/chunks/ad7596e7f81f557bb2c8.js +1 -0
  164. package/assets/esri/core/workers/chunks/adf361e8b2887921a69c.js +1 -0
  165. package/assets/esri/core/workers/chunks/adfa126cea32298c28e9.js +1 -0
  166. package/assets/esri/core/workers/chunks/b21b152fa15896577242.js +2 -0
  167. package/assets/esri/core/workers/chunks/b21b152fa15896577242.js.LICENSE.txt +8 -0
  168. package/assets/esri/core/workers/chunks/b3aeda290470dcb2bdd2.js +1 -0
  169. package/assets/esri/core/workers/chunks/b3f9d7a676076a7557f5.js +1 -0
  170. package/assets/esri/core/workers/chunks/b42ecc7c3eb2fd8d1308.js +1 -0
  171. package/assets/esri/core/workers/chunks/b44cf0e4c2f93408cabc.js +1 -0
  172. package/assets/esri/core/workers/chunks/b70a9d23e549d0e60e0f.js +1 -0
  173. package/assets/esri/core/workers/chunks/b882f921387e21fb263d.js +1 -0
  174. package/assets/esri/core/workers/chunks/ba3c18d1efde46461231.js +1 -0
  175. package/assets/esri/core/workers/chunks/bb73cd34fbae935ccbcc.js +1 -0
  176. package/assets/esri/core/workers/chunks/bbdf93f2ac9bd80338b2.js +1 -0
  177. package/assets/esri/core/workers/chunks/bc0183350841e09d71fa.js +1 -0
  178. package/assets/esri/core/workers/chunks/bddfdbb2fb1dd813e8f2.js +1 -0
  179. package/assets/esri/core/workers/chunks/bf3c4c1bff8b71bc0b13.js +1 -0
  180. package/assets/esri/core/workers/chunks/c1970657a287ec96001e.js +1 -0
  181. package/assets/esri/core/workers/chunks/{399e67ccb69a5b206354.js → c1fd87af3129873369fd.js} +1 -1
  182. package/assets/esri/core/workers/chunks/{82266ca8002554198208.js → c2336d1f5b2b7bf6e7a7.js} +1 -1
  183. package/assets/esri/core/workers/chunks/c571c2155589d711005c.js +1 -0
  184. package/assets/esri/core/workers/chunks/c83b26ff96e39266adc2.js +1 -0
  185. package/assets/esri/core/workers/chunks/ca5bd71bc2c1b1b3f9d9.js +1 -0
  186. package/assets/esri/core/workers/chunks/{98da074899c82f0ded0b.js → cdd8983cf3a301805680.js} +1 -1
  187. package/assets/esri/core/workers/chunks/{435c037ccba71f1e22d3.js → d31f7598629f7cc50233.js} +1 -1
  188. package/assets/esri/core/workers/chunks/d45ff061bf71b73e9f26.js +1 -0
  189. package/assets/esri/core/workers/chunks/d4760e583dfac95dc8a1.js +1 -0
  190. package/assets/esri/core/workers/chunks/{7fe92f072d3641ec4662.js → d5a749156cb4ade92128.js} +1 -1
  191. package/assets/esri/core/workers/chunks/d6f2a023ddd26a544eb4.js +1 -0
  192. package/assets/esri/core/workers/chunks/d71a5c029fc9f4820589.js +1 -0
  193. package/assets/esri/core/workers/chunks/d7ccbe9b36e89b385040.js +1 -0
  194. package/assets/esri/core/workers/chunks/{e9c21907fabcedbd32ae.js → d8386803854f4b3e2576.js} +1 -1
  195. package/assets/esri/core/workers/chunks/d8c762ca94e3a11b125d.js +1 -0
  196. package/assets/esri/core/workers/chunks/da01b509b2237689faad.js +1 -0
  197. package/assets/esri/core/workers/chunks/daeca0feb37bbb198677.js +1 -0
  198. package/assets/esri/core/workers/chunks/dbc447413ab40a79ba87.js +1 -0
  199. package/assets/esri/core/workers/chunks/de2ca2dc1b5d62c0d82e.js +1 -0
  200. package/assets/esri/core/workers/chunks/df86a49ddc505b4a7c4a.js +1 -0
  201. package/assets/esri/core/workers/chunks/dfa4be2e07cc4c0938b0.js +1 -0
  202. package/assets/esri/core/workers/chunks/{fa331c8b556bb7fb8ae3.js → dfaf1da323906ee60549.js} +1 -1
  203. package/assets/esri/core/workers/chunks/e067cef3b3ac3af49b88.js +1 -0
  204. package/assets/esri/core/workers/chunks/e1108227821a85a784bc.js +2 -0
  205. package/assets/esri/core/workers/chunks/e1108227821a85a784bc.js.LICENSE.txt +9 -0
  206. package/assets/esri/core/workers/chunks/e42c8045f54aa88c9f6e.js +1 -0
  207. package/assets/esri/core/workers/chunks/e56647e61296643c5f84.js +1 -0
  208. package/assets/esri/core/workers/chunks/e6087eda5e3b7e5ad3e1.js +1 -0
  209. package/assets/esri/core/workers/chunks/e89439cc20b7f4c6a9d1.js +1 -0
  210. package/assets/esri/core/workers/chunks/e9993d4f2bfdc434fbcc.js +1 -0
  211. package/assets/esri/core/workers/chunks/ecc3a2adc384677bec38.js +1 -0
  212. package/assets/esri/core/workers/chunks/{54c149f90bf94b797b36.js → ed30f46236da29c15430.js} +1 -1
  213. package/assets/esri/core/workers/chunks/f2cf05fbbb51d657d300.js +1 -0
  214. package/assets/esri/core/workers/chunks/{1c67f4f84fff70e20902.js → f31a9d88113bb86d946e.js} +2 -2
  215. package/assets/esri/core/workers/chunks/{1c67f4f84fff70e20902.js.LICENSE.txt → f31a9d88113bb86d946e.js.LICENSE.txt} +4 -6
  216. package/assets/esri/core/workers/chunks/f62f657f9fef28f492e0.js +1 -0
  217. package/assets/esri/core/workers/chunks/fd1506eedb1cee717822.js +2 -0
  218. package/assets/esri/core/workers/chunks/fd1506eedb1cee717822.js.LICENSE.txt +3 -0
  219. package/assets/esri/core/workers/chunks/fef135e55706d84d1947.js +1 -0
  220. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  221. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  222. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
  223. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
  224. package/assets/esri/themes/base/widgets/_FeatureTable.scss +8 -7
  225. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +24 -0
  226. package/assets/esri/themes/base/widgets/_UtilityNetworkTrace.scss +49 -24
  227. package/assets/esri/themes/dark/main.css +1 -1
  228. package/assets/esri/themes/light/main.css +1 -1
  229. package/assets/esri/themes/light/view.css +1 -1
  230. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
  231. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  232. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  233. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  234. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  235. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  236. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  237. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  238. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  239. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
  240. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  241. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  242. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  243. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  244. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  245. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  246. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  247. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  248. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  249. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  250. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  251. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  252. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  253. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  254. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
  255. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  256. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  257. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  258. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  259. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  260. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  261. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  262. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  263. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  264. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  265. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  266. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  267. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  268. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  269. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  270. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  271. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace.json +1 -1
  272. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ar.json +1 -1
  273. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_bg.json +1 -1
  274. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_bs.json +1 -1
  275. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ca.json +1 -1
  276. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_cs.json +1 -1
  277. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_da.json +1 -1
  278. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_de.json +1 -1
  279. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_el.json +1 -1
  280. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_en.json +1 -1
  281. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_es.json +1 -1
  282. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_et.json +1 -1
  283. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_fi.json +1 -1
  284. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_fr.json +1 -1
  285. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_he.json +1 -1
  286. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_hr.json +1 -1
  287. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_hu.json +1 -1
  288. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_id.json +1 -1
  289. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_it.json +1 -1
  290. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ja.json +1 -1
  291. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ko.json +1 -1
  292. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_lt.json +1 -1
  293. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_lv.json +1 -1
  294. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_nl.json +1 -1
  295. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_no.json +1 -1
  296. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pl.json +1 -1
  297. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pt-BR.json +1 -1
  298. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pt-PT.json +1 -1
  299. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ro.json +1 -1
  300. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ru.json +1 -1
  301. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sk.json +1 -1
  302. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sl.json +1 -1
  303. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sr.json +1 -1
  304. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sv.json +1 -1
  305. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_th.json +1 -1
  306. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_tr.json +1 -1
  307. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_uk.json +1 -1
  308. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_vi.json +1 -1
  309. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-CN.json +1 -1
  310. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-HK.json +1 -1
  311. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-TW.json +1 -1
  312. package/chunks/BloomComposition.glsl.js +33 -23
  313. package/chunks/Fog.glsl.js +4 -6
  314. package/chunks/Viewshed.glsl.js +7 -15
  315. package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
  316. package/chunks/arcgis-knowledge-client-core.js +1 -1
  317. package/chunks/cameraUtilsPlanar.js +1 -1
  318. package/chunks/cameraUtilsSpherical.js +1 -1
  319. package/chunks/lyr3DMain.js +1 -1
  320. package/chunks/lyr3DWorker.js +1 -1
  321. package/core/quantity.d.ts +1 -1
  322. package/core/quantity.js +5 -0
  323. package/core/units.d.ts +1 -1
  324. package/core/units.js +5 -0
  325. package/editing/sharedTemplates/SharedTemplate.js +1 -1
  326. package/editing/sharedTemplates/SharedTemplateMetadata.d.ts +4 -0
  327. package/editing/sharedTemplates/SharedTemplateMetadata.js +1 -1
  328. package/editing/sharedTemplates/templateDefinitions/parts/PresetTemplatePart.js +1 -1
  329. package/editing/templateUtils.js +5 -0
  330. package/form/elements/UtilityNetworkAssociationsElement.js +1 -1
  331. package/geometry/geometryEngine.js +1 -1
  332. package/geometry/geometryEngineAsync.js +1 -1
  333. package/geometry/operators/projectOperator.d.ts +4 -0
  334. package/geometry/operators/shapePreservingProjectOperator.d.ts +4 -0
  335. package/geometry/operators/support/GeographicTransformation.d.ts +4 -0
  336. package/geometry/operators/support/GeographicTransformation.js +1 -1
  337. package/geometry/operators/support/GeographicTransformationStep.d.ts +4 -0
  338. package/geometry/operators/support/apiConverter.js +1 -1
  339. package/geometry/operators/support/geographicTransformationUtils.d.ts +4 -0
  340. package/geometry/support/GeographicTransformation.d.ts +2 -2
  341. package/geometry/support/GeographicTransformationStep.d.ts +2 -2
  342. package/geometry/support/geodesicUtils.js +1 -1
  343. package/geometry/support/geometryUtils.js +1 -1
  344. package/geometry/support/meshUtils/elevation.js +1 -1
  345. package/geometry/support/near.js +1 -1
  346. package/geometry/support/rotate.js +1 -1
  347. package/geometry/support/typeUtils.js +1 -1
  348. package/geometry.js +1 -1
  349. package/grids/MeasuredGrid.js +1 -1
  350. package/interfaces.d.ts +2069 -622
  351. package/layers/BaseElevationLayer.js +1 -1
  352. package/layers/BingMapsLayer.js +1 -1
  353. package/layers/CSVLayer.js +1 -1
  354. package/layers/FeatureLayer.js +1 -1
  355. package/layers/GeoJSONLayer.js +1 -1
  356. package/layers/GeoRSSLayer.js +1 -1
  357. package/layers/ILyr3DWasmPerSceneView.js +1 -1
  358. package/layers/KMLLayer.js +1 -1
  359. package/layers/KnowledgeGraphLayer.js +1 -1
  360. package/layers/Layer.js +1 -1
  361. package/layers/LinkChartLayer.js +1 -1
  362. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  363. package/layers/MapNotesLayer.js +1 -1
  364. package/layers/OGCFeatureLayer.js +1 -1
  365. package/layers/OpenStreetMapLayer.js +1 -1
  366. package/layers/ParquetLayer.js +1 -1
  367. package/layers/RouteLayer.js +1 -1
  368. package/layers/SceneLayer.js +1 -1
  369. package/layers/StreamLayer.js +1 -1
  370. package/layers/VideoLayer.js +1 -1
  371. package/layers/WFSLayer.js +1 -1
  372. package/layers/WebTileLayer.js +1 -1
  373. package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
  374. package/layers/catalog/CatalogFootprintLayer.js +1 -1
  375. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  376. package/layers/graphics/controllers/StreamController.js +1 -1
  377. package/layers/graphics/data/QueryEngineResult.js +1 -1
  378. package/layers/graphics/hydratedFeatures.js +1 -1
  379. package/layers/graphics/sources/CSVSource.js +1 -1
  380. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  381. package/layers/graphics/sources/GeoJSONSource.js +1 -1
  382. package/layers/graphics/sources/MemorySource.js +1 -1
  383. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  384. package/layers/graphics/sources/ParquetSource.js +1 -1
  385. package/layers/graphics/sources/WFSSource.js +1 -1
  386. package/layers/graphics/sources/connections/GeoEventConnection.js +1 -1
  387. package/layers/graphics/sources/support/CSVSourceWorker.js +1 -1
  388. package/layers/graphics/sources/support/uploadAssets.js +1 -1
  389. package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
  390. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  391. package/layers/knowledgeGraph/SessionMemoryStorage.js +1 -1
  392. package/layers/knowledgeGraph/supportUtils.js +1 -1
  393. package/layers/mixins/ArcGISCachedService.js +1 -1
  394. package/layers/mixins/ArcGISImageService.js +1 -1
  395. package/layers/mixins/FeatureReductionLayer.js +1 -1
  396. package/layers/mixins/ImageryTileMixin.js +1 -1
  397. package/layers/ogc/ogcFeatureUtils.js +1 -1
  398. package/layers/ogc/wfsUtils.js +1 -1
  399. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  400. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  401. package/layers/orientedImagery/queries.js +1 -1
  402. package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
  403. package/layers/orientedImagery/transformations/rectifyMapPoint.js +1 -1
  404. package/layers/orientedImagery/transformations/utils.js +1 -1
  405. package/layers/support/ElevationSampler.js +1 -1
  406. package/layers/support/FeatureFilter.js +1 -1
  407. package/layers/support/FeatureReductionBinning.js +1 -1
  408. package/layers/support/FeatureReductionCluster.js +1 -1
  409. package/layers/support/KMLMapImage.js +1 -1
  410. package/layers/support/KMLSublayer.js +1 -1
  411. package/layers/support/LabelClass.js +1 -1
  412. package/layers/support/LocalMediaElementSource.js +1 -1
  413. package/layers/support/MultidimensionalSubset.js +1 -1
  414. package/layers/support/OrderByInfo.d.ts +4 -0
  415. package/layers/support/RasterWorker.js +1 -1
  416. package/layers/support/RouteStopSymbols.js +1 -1
  417. package/layers/support/RouteSymbols.js +1 -1
  418. package/layers/support/SceneModification.js +1 -1
  419. package/layers/support/Sublayer.js +1 -1
  420. package/layers/support/SubtypeSublayer.js +1 -1
  421. package/layers/support/TelemetryData.js +1 -1
  422. package/layers/support/TrackInfo.js +1 -1
  423. package/layers/support/VideoFrame.js +1 -1
  424. package/layers/support/featureLayerUtils.js +1 -1
  425. package/layers/support/mediaUtils.js +1 -1
  426. package/layers/support/rasterDatasets/BaseRaster.js +1 -1
  427. package/layers/support/rasterDatasets/ImageAuxRaster.js +1 -1
  428. package/layers/support/rasterDatasets/ImageServerRaster.js +1 -1
  429. package/layers/support/rasterDatasets/InMemoryRaster.js +1 -1
  430. package/layers/support/rasterDatasets/MRFRaster.js +1 -1
  431. package/layers/support/rasterDatasets/RawBlockCache.js +1 -1
  432. package/layers/support/rasterDatasets/TIFFRaster.js +1 -1
  433. package/layers/support/rasterDatasets/WCSRaster.js +1 -1
  434. package/layers/support/rasterDatasets/covJSONParser.js +1 -1
  435. package/layers/support/rasterDatasets/pamParser.js +1 -1
  436. package/layers/support/rasterFunctions/ClipFunctionArguments.js +1 -1
  437. package/layers/support/rasterFunctions/rasterProjectionHelper.js +1 -1
  438. package/layers/support/rasterTransforms/PolynomialTransform.js +1 -1
  439. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  440. package/layers/support/source/QueryTableDataSource.js +1 -1
  441. package/layers/support/subtypeGroupLayerUtils.js +1 -1
  442. package/networks/Network.js +1 -1
  443. package/networks/support/utils.js +1 -1
  444. package/package.json +2 -2
  445. package/pointCloudRenderers.js +1 -1
  446. package/rasterRenderers.js +1 -1
  447. package/renderers/ClassBreaksRenderer.js +1 -1
  448. package/renderers/HeatmapRenderer.js +1 -1
  449. package/renderers/PieChartRenderer.js +1 -1
  450. package/renderers/UniqueValueRenderer.js +1 -1
  451. package/renderers/VectorFieldRenderer.js +1 -1
  452. package/renderers/support/RasterPresetRenderer.js +1 -1
  453. package/renderers/support/commonProperties.js +1 -1
  454. package/renderers/support/jsonUtils.js +1 -1
  455. package/renderers/support/rasterRendererHelper.js +1 -1
  456. package/renderers/support/rasterTypeUtils.js +5 -0
  457. package/renderers/support/typeUtils.js +5 -0
  458. package/renderers.js +1 -1
  459. package/rest/featureService/FeatureService.js +1 -1
  460. package/rest/geometryService/autoComplete.js +1 -1
  461. package/rest/geometryService/buffer.js +1 -1
  462. package/rest/geometryService/cut.js +1 -1
  463. package/rest/geometryService/trimExtend.js +1 -1
  464. package/rest/imageService.js +1 -1
  465. package/rest/knowledgeGraph/Entity.js +1 -1
  466. package/rest/knowledgeGraph/GraphQueryStreaming.js +1 -1
  467. package/rest/knowledgeGraph/ProtoFeatureCollection.js +1 -1
  468. package/rest/knowledgeGraph/Relationship.js +1 -1
  469. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsConfiguration.d.ts +4 -0
  470. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsConfiguration.js +5 -0
  471. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsEntity.d.ts +4 -0
  472. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsEntity.js +5 -0
  473. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsPathFilter.d.ts +4 -0
  474. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsPathFilter.js +5 -0
  475. package/rest/knowledgeGraph/toolService/findPaths/CIMKGTraversalDirection.d.ts +4 -0
  476. package/rest/knowledgeGraph/toolService/findPaths/CIMKGTraversalDirection.js +5 -0
  477. package/rest/knowledgeGraph/toolService/findPaths/FindPathsToolSettings.d.ts +4 -0
  478. package/rest/knowledgeGraph/toolService/findPaths/FindPathsToolSettings.js +5 -0
  479. package/rest/knowledgeGraph/wasmInterface/queryToWasmEncodedFactories.js +1 -1
  480. package/rest/knowledgeGraph/wasmInterface/updateToWasmEncodedFactories.js +1 -1
  481. package/rest/knowledgeGraph/wasmInterface/wasmToQueryResponseObjFactories.js +1 -1
  482. package/rest/knowledgeGraphService.js +1 -1
  483. package/rest/networks/support/Association.js +1 -1
  484. package/rest/networks/support/ValidateNetworkTopologyParameters.js +1 -1
  485. package/rest/places.js +1 -1
  486. package/rest/print.js +1 -1
  487. package/rest/query/executeForExtent.js +1 -1
  488. package/rest/query/executeForTopExtents.js +1 -1
  489. package/rest/support/AddressToLocationsParameters.js +1 -1
  490. package/rest/support/AddressesToLocationsParameters.js +1 -1
  491. package/rest/support/AggregateFeatureSet.js +1 -1
  492. package/rest/support/AttributeBinsQuery.js +1 -1
  493. package/rest/support/BaseImageMeasureParameters.js +1 -1
  494. package/rest/support/BufferParameters.js +1 -1
  495. package/rest/support/ClosestFacilityParameters.js +1 -1
  496. package/rest/support/DataLayer.js +1 -1
  497. package/rest/support/DensifyParameters.js +1 -1
  498. package/rest/support/DirectionLine.js +1 -1
  499. package/rest/support/DirectionPoint.js +1 -1
  500. package/rest/support/DirectionsEvent.js +1 -1
  501. package/rest/support/DirectionsFeature.js +1 -1
  502. package/rest/support/DirectionsFeatureSet.js +1 -1
  503. package/rest/support/DistanceParameters.js +1 -1
  504. package/rest/support/FeatureSet.js +1 -1
  505. package/rest/support/FindParameters.js +1 -1
  506. package/rest/support/FindResult.js +1 -1
  507. package/rest/support/IdentifyParameters.js +1 -1
  508. package/rest/support/IdentifyResult.js +1 -1
  509. package/rest/support/ImageAngleParameters.js +1 -1
  510. package/rest/support/ImageAngleResult.js +1 -1
  511. package/rest/support/ImageAreaParameters.js +1 -1
  512. package/rest/support/ImageBoundaryResult.js +1 -1
  513. package/rest/support/ImageDistanceParameters.js +1 -1
  514. package/rest/support/ImageGPSInfoParameters.js +1 -1
  515. package/rest/support/ImageHeightParameters.js +1 -1
  516. package/rest/support/ImageHistogramParameters.js +1 -1
  517. package/rest/support/ImageIdentifyParameters.js +1 -1
  518. package/rest/support/ImagePixelLocationParameters.js +1 -1
  519. package/rest/support/ImagePointParameters.js +1 -1
  520. package/rest/support/ImagePointResult.js +1 -1
  521. package/rest/support/ImageSampleParameters.js +1 -1
  522. package/rest/support/ImageToMapMultirayParameters.js +1 -1
  523. package/rest/support/ImageToMapParameters.js +1 -1
  524. package/rest/support/ImageVolumeParameters.js +1 -1
  525. package/rest/support/LengthsParameters.js +1 -1
  526. package/rest/support/LocationToAddressParameters.js +1 -1
  527. package/rest/support/MapToImageParameters.js +1 -1
  528. package/rest/support/MeasureAreaFromImageResult.js +1 -1
  529. package/rest/support/MeasureFromImageParameters.js +1 -1
  530. package/rest/support/MeasureLengthFromImageResult.js +1 -1
  531. package/rest/support/PointBarrier.js +1 -1
  532. package/rest/support/PolygonBarrier.js +1 -1
  533. package/rest/support/PolylineBarrier.js +1 -1
  534. package/rest/support/ProjectParameters.js +1 -1
  535. package/rest/support/QuantizationParameters.js +1 -1
  536. package/rest/support/Query.js +1 -1
  537. package/rest/support/RelationshipQuery.js +1 -1
  538. package/rest/support/RouteInfo.js +1 -1
  539. package/rest/support/RouteParameters.js +1 -1
  540. package/rest/support/ServiceAreaParameters.js +1 -1
  541. package/rest/support/Stop.js +1 -1
  542. package/rest/support/SuggestLocationsParameters.js +1 -1
  543. package/rest/support/TopFeaturesQuery.js +1 -1
  544. package/rest/support/TrimExtendParameters.js +1 -1
  545. package/rest/support/meshFeatureAttributes.js +1 -1
  546. package/smartMapping/labels/support/utils.js +1 -1
  547. package/smartMapping/raster/support/adapters/ImageryLayerAdapter.js +1 -1
  548. package/smartMapping/renderers/color.js +1 -1
  549. package/smartMapping/renderers/dotDensity.js +1 -1
  550. package/smartMapping/renderers/heatmap.js +1 -1
  551. package/smartMapping/renderers/location.js +1 -1
  552. package/smartMapping/renderers/pieChart.js +1 -1
  553. package/smartMapping/renderers/size.js +1 -1
  554. package/smartMapping/renderers/support/referenceSizeUtils.js +1 -1
  555. package/smartMapping/renderers/support/utils.js +1 -1
  556. package/smartMapping/renderers/type.js +1 -1
  557. package/smartMapping/statistics/support/utils.js +1 -1
  558. package/support/arcadeOnDemand.js +1 -1
  559. package/support/arcadeUtils.js +1 -1
  560. package/support/revision.js +1 -1
  561. package/symbols/cim/CIMSymbolHelper.js +1 -1
  562. package/symbols/cim/cimAnalyzer.js +1 -1
  563. package/symbols/cim/effects/EffectBuffer.js +1 -1
  564. package/symbols/cim/effects/EffectDonut.js +1 -1
  565. package/symbols/cim/effects/EffectOffset.js +1 -1
  566. package/symbols/support/cimConversionUtils.js +1 -1
  567. package/symbols/support/defaults3D.js +1 -1
  568. package/symbols/support/jsonUtils.js +1 -1
  569. package/symbols/support/symbolConversion.js +1 -1
  570. package/symbols/support/typeUtils.js +5 -0
  571. package/symbols/support/utils.js +1 -1
  572. package/symbols/support/webStyleSymbolUtils.js +1 -1
  573. package/symbols.js +1 -1
  574. package/undoredo/support/Services.js +1 -1
  575. package/unionTypes.d.ts +4 -0
  576. package/unionTypes.js +5 -0
  577. package/views/2d/AnimationManager.js +1 -1
  578. package/views/2d/MapViewConstraints.js +1 -1
  579. package/views/2d/ViewState.js +1 -1
  580. package/views/2d/ViewStateManager.js +1 -1
  581. package/views/2d/engine/flow/FlowStrategy.js +1 -1
  582. package/views/2d/engine/flow/dataUtils.js +1 -1
  583. package/views/2d/engine/vectorTiles/tileInfoUtils.js +1 -1
  584. package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
  585. package/views/2d/engine/webgl/shaderGraph/techniques/createTestMeshData.js +1 -1
  586. package/views/2d/engine/webgl/shaderGraph/techniques/markers/ComputedMarkerParams.js +1 -1
  587. package/views/2d/grid/gridUtils.js +1 -1
  588. package/views/2d/interactive/SnappingVisualizer2D.js +1 -1
  589. package/views/2d/interactive/editingTools/ControlPointsTransformTool.js +1 -1
  590. package/views/2d/interactive/editingTools/TransformTool.js +1 -1
  591. package/views/2d/interactive/editingTools/draw/DrawGraphicTool2D.js +1 -1
  592. package/views/2d/interactive/editingTools/draw/symbols.js +1 -1
  593. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  594. package/views/2d/layers/MediaLayerView2D.js +1 -1
  595. package/views/2d/layers/TileLayerView2D.js +1 -1
  596. package/views/2d/layers/VideoLayerView2D.js +1 -1
  597. package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
  598. package/views/2d/layers/features/processor/TrackStrategy.js +1 -1
  599. package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
  600. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  601. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  602. package/views/2d/layers/support/clusterUtils.js +1 -1
  603. package/views/2d/navigation/actions/Pan.js +1 -1
  604. package/views/2d/navigation/actions/Rotate.js +1 -1
  605. package/views/2d/pointToPoint/Camera.js +1 -1
  606. package/views/3d/analysis/Dimension/DimensionTool.js +1 -1
  607. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  608. package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
  609. package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
  610. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  611. package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
  612. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  613. package/views/3d/analysis/Viewshed/ViewshedComputedData.js +1 -1
  614. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  615. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  616. package/views/3d/environment/EnvironmentManager.js +1 -1
  617. package/views/3d/environment/Fog.glsl.js +1 -1
  618. package/views/3d/interactive/Manipulator3D.js +1 -1
  619. package/views/3d/interactive/editingTools/dragEventPipeline3D.js +1 -1
  620. package/views/3d/interactive/editingTools/media/MediaElementControllerControlPoints.js +1 -1
  621. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
  622. package/views/3d/layers/I3SMeshViewLabeler.js +1 -1
  623. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  624. package/views/3d/layers/Lyr3DWasm.js +1 -1
  625. package/views/3d/layers/VoxelLayerView3D.js +1 -1
  626. package/views/3d/layers/graphics/ElevationQuery.js +1 -1
  627. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  628. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  629. package/views/3d/layers/graphics/QueryEngine.js +1 -1
  630. package/views/3d/layers/graphics/elevationAlignPointsInFeatures.js +1 -1
  631. package/views/3d/layers/graphics/polygonUtils.js +1 -1
  632. package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
  633. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  634. package/views/3d/layers/support/FeatureTile.js +1 -1
  635. package/views/3d/layers/support/FeatureTileDescriptor.js +1 -1
  636. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  637. package/views/3d/layers/support/FeatureTileFetcher3DDebugger.js +1 -1
  638. package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
  639. package/views/3d/layers/support/FeatureTileTree3D.js +1 -1
  640. package/views/3d/layers/support/FeatureTileTree3DDebugger.js +1 -1
  641. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  642. package/views/3d/layers/support/I3STreeDebugger.js +1 -1
  643. package/views/3d/layers/support/TerrainTileTree3DDebugger.js +1 -1
  644. package/views/3d/state/ViewStateManager.js +1 -1
  645. package/views/3d/support/FrustumExtentIntersection.js +1 -1
  646. package/views/3d/support/cameraUtilsPlanar.js +1 -1
  647. package/views/3d/support/cameraUtilsSpherical.js +1 -1
  648. package/views/3d/support/debugUtils.js +1 -1
  649. package/views/3d/support/hitTest.js +1 -1
  650. package/views/3d/support/viewpointUtils.js +1 -1
  651. package/views/3d/terrain/PlanarPatch.js +1 -1
  652. package/views/3d/terrain/SphericalPatch.js +1 -1
  653. package/views/3d/terrain/TerrainRenderer.js +1 -1
  654. package/views/3d/terrain/TerrainSurface.js +1 -1
  655. package/views/3d/terrain/Tile.js +1 -1
  656. package/views/3d/terrain/TilingScheme.js +1 -1
  657. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  658. package/views/3d/webgl-engine/effects/bloom/BloomComposition.glsl.js +1 -1
  659. package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
  660. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  661. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  662. package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
  663. package/views/3d/webgl-engine/shaders/Viewshed.glsl.js +1 -1
  664. package/views/SceneView.js +1 -1
  665. package/views/VideoView.js +1 -1
  666. package/views/View2D.js +1 -1
  667. package/views/draw/MultipointDrawAction.js +1 -1
  668. package/views/draw/PointDrawAction.js +1 -1
  669. package/views/draw/PolygonDrawAction.js +1 -1
  670. package/views/draw/PolylineDrawAction.js +1 -1
  671. package/views/draw/SegmentDrawAction.js +1 -1
  672. package/views/draw/drawSurfaces.js +1 -1
  673. package/views/draw/support/Box.js +1 -1
  674. package/views/draw/support/GraphicMover.js +1 -1
  675. package/views/draw/support/Reshape.js +1 -1
  676. package/views/draw/support/createUtils.js +1 -1
  677. package/views/draw/support/surfaceCoordinateSystems.js +1 -1
  678. package/views/interactive/sketch/constraintUtils.js +1 -1
  679. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
  680. package/views/layers/support/Geometry.js +1 -1
  681. package/views/support/HighlightOptions.d.ts +4 -0
  682. package/views/support/drapedUtils.js +1 -1
  683. package/webdoc/geotriggersInfo/FeatureFilter.js +1 -1
  684. package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
  685. package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
  686. package/widgets/CoordinateConversion/support/Format.js +1 -1
  687. package/widgets/CoordinateConversion/support/coordinateConversionUtils.js +1 -1
  688. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
  689. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  690. package/widgets/Editor/UpdateWorkflow.js +1 -1
  691. package/widgets/Editor/workflowUtils.js +1 -1
  692. package/widgets/ElevationProfile/support/ProfileLine2D.js +1 -1
  693. package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
  694. package/widgets/Feature/FeatureViewModel.js +1 -1
  695. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
  696. package/widgets/FeatureForm/UtilityNetworkAssociationInput.js +1 -1
  697. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  698. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  699. package/widgets/FeatureTable.js +1 -1
  700. package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
  701. package/widgets/FeatureTemplates/TemplateItem.js +1 -1
  702. package/widgets/FeatureTemplates/featureTemplatesUtils.js +1 -1
  703. package/widgets/FeatureTemplates.js +1 -1
  704. package/widgets/Features/FeaturesViewModel.js +1 -1
  705. package/widgets/LayerList/LayerListItem.js +1 -1
  706. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  707. package/widgets/Legend/support/sizeRampUtils.js +1 -1
  708. package/widgets/Legend/support/utils.js +1 -1
  709. package/widgets/Locate.js +1 -1
  710. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  711. package/widgets/OrientedImageryViewer/OrientedImageryViewerVisibleElements.js +1 -1
  712. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  713. package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
  714. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  715. package/widgets/OrientedImageryViewer/components/ImageAreaMeasurement.js +5 -0
  716. package/widgets/OrientedImageryViewer/components/ImageDistanceMeasurement.js +5 -0
  717. package/widgets/OrientedImageryViewer/components/ImageMeasurement.js +5 -0
  718. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  719. package/widgets/OrientedImageryViewer/css.js +1 -1
  720. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  721. package/widgets/OrientedImageryViewer/symbols.js +1 -1
  722. package/widgets/OrientedImageryViewer.js +1 -1
  723. package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
  724. package/widgets/PanoramicViewer/constants.js +1 -1
  725. package/widgets/PanoramicViewer/utils.js +1 -1
  726. package/widgets/Print/PrintViewModel.js +1 -1
  727. package/widgets/Print.js +1 -1
  728. package/widgets/ScaleBar/ScaleBarViewModel.js +1 -1
  729. package/widgets/Search/SearchViewModel.js +1 -1
  730. package/widgets/Sketch/SketchViewModel.js +1 -1
  731. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +5 -0
  732. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeaturesDrillIn.js +5 -0
  733. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  734. package/widgets/UtilityNetworkTrace/support/GeometryHandler.js +1 -1
  735. package/widgets/UtilityNetworkTrace.js +1 -1
  736. package/widgets/support/GridControls/GridControlsViewModel.js +1 -1
  737. package/widgets/support/Selector2D/SelectionOperation.js +1 -1
  738. package/widgets/support/UtilityNetworkAssociations/UtilityNetworkAssociationList.js +1 -1
  739. package/widgets/support/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +1 -1
  740. package/assets/esri/core/workers/chunks/0651586dc7bd2e8b34db.js +0 -1
  741. package/assets/esri/core/workers/chunks/077070295499b9bfabb6.js +0 -1
  742. package/assets/esri/core/workers/chunks/090cfc7f088a729afd47.js +0 -1
  743. package/assets/esri/core/workers/chunks/0d387baa64a89f88b1de.js +0 -1
  744. package/assets/esri/core/workers/chunks/105dcc7b7284b1e965b7.js +0 -1
  745. package/assets/esri/core/workers/chunks/134de9fa142129a43b1e.js +0 -1
  746. package/assets/esri/core/workers/chunks/16fa0a5f73ab67a8d3e4.js +0 -1
  747. package/assets/esri/core/workers/chunks/1797f62e9bf8f1ac8d13.js +0 -1
  748. package/assets/esri/core/workers/chunks/182722e2fe0a35c4d8db.js +0 -1
  749. package/assets/esri/core/workers/chunks/184846d2dde25ee12904.js +0 -1
  750. package/assets/esri/core/workers/chunks/1b3215f3290fb2f07ab8.js +0 -1
  751. package/assets/esri/core/workers/chunks/1d34a146b32b959923b0.js +0 -1
  752. package/assets/esri/core/workers/chunks/1f4dd96aacf8c40a1120.js +0 -1
  753. package/assets/esri/core/workers/chunks/1fa705ee39556ef4bb3b.js +0 -1
  754. package/assets/esri/core/workers/chunks/206194cf069ad4bcc3ad.js +0 -1
  755. package/assets/esri/core/workers/chunks/217f8139bea225d1fcc6.js +0 -1
  756. package/assets/esri/core/workers/chunks/22748779ca94eda44de5.js +0 -1
  757. package/assets/esri/core/workers/chunks/2427a01678f3d9fbf30b.js +0 -1
  758. package/assets/esri/core/workers/chunks/243520d9f4a118e63bbc.js +0 -1
  759. package/assets/esri/core/workers/chunks/26c8e30a5ee8db0314c8.js +0 -1
  760. package/assets/esri/core/workers/chunks/2779cf112299b612a73a.js +0 -1
  761. package/assets/esri/core/workers/chunks/280b7b885b96a5a68716.js +0 -2
  762. package/assets/esri/core/workers/chunks/299ed506209562be4fad.js +0 -1
  763. package/assets/esri/core/workers/chunks/2f5722844208d0f5d616.js +0 -1
  764. package/assets/esri/core/workers/chunks/2fb884799de54182d2c3.js +0 -2
  765. package/assets/esri/core/workers/chunks/2fb884799de54182d2c3.js.LICENSE.txt +0 -11
  766. package/assets/esri/core/workers/chunks/300a5f4842b90bda55b3.js +0 -1
  767. package/assets/esri/core/workers/chunks/33a13544b9e5f4f20bce.js +0 -1
  768. package/assets/esri/core/workers/chunks/33eebe5cb22a03ae90c8.js +0 -1
  769. package/assets/esri/core/workers/chunks/346ec2f8c373337c18c7.js +0 -1
  770. package/assets/esri/core/workers/chunks/34b86b4b9e6c1937ee39.js +0 -2
  771. package/assets/esri/core/workers/chunks/3512d53abe9abee7f420.js +0 -1
  772. package/assets/esri/core/workers/chunks/423329432fbf007c620b.js +0 -1
  773. package/assets/esri/core/workers/chunks/467bd3c0da9518a0058b.js +0 -1
  774. package/assets/esri/core/workers/chunks/47745c4f74830f981fd4.js +0 -1
  775. package/assets/esri/core/workers/chunks/4af0674fabfc965f1660.js +0 -1
  776. package/assets/esri/core/workers/chunks/4c1d11a91291b28a73be.js +0 -1
  777. package/assets/esri/core/workers/chunks/4c40fd932113a71cbe8e.js +0 -1
  778. package/assets/esri/core/workers/chunks/51fbbd082ca78e4417d9.js +0 -1
  779. package/assets/esri/core/workers/chunks/5a937486b9fd62b57dca.js +0 -1
  780. package/assets/esri/core/workers/chunks/5c05c899f7e6f764fedd.js +0 -1
  781. package/assets/esri/core/workers/chunks/636b944604480a905888.js +0 -1
  782. package/assets/esri/core/workers/chunks/6400f39a965900f66ce7.js +0 -1
  783. package/assets/esri/core/workers/chunks/643da327858a68ffbd88.js +0 -1
  784. package/assets/esri/core/workers/chunks/6c1470dc0bd4389d1a2d.js +0 -1
  785. package/assets/esri/core/workers/chunks/6c3862f42b6b27edf1cf.js +0 -2
  786. package/assets/esri/core/workers/chunks/6c3862f42b6b27edf1cf.js.LICENSE.txt +0 -10
  787. package/assets/esri/core/workers/chunks/6e804ee2d96d4de85a5f.js +0 -1
  788. package/assets/esri/core/workers/chunks/712f0dd46932c544df68.js +0 -1
  789. package/assets/esri/core/workers/chunks/71e88c90e9f9a9bddcd8.js +0 -1
  790. package/assets/esri/core/workers/chunks/7341108896d0e4d44dab.js +0 -1
  791. package/assets/esri/core/workers/chunks/74ba752dfab8ea5b6d2a.js +0 -314
  792. package/assets/esri/core/workers/chunks/79903647d4ed16d9a402.js +0 -1
  793. package/assets/esri/core/workers/chunks/7b4880b2dc6b01d70ccc.js +0 -1
  794. package/assets/esri/core/workers/chunks/7c98e4fcba1dc24eb788.js +0 -1
  795. package/assets/esri/core/workers/chunks/7d0fc25ce1f74adcfeb6.js +0 -1
  796. package/assets/esri/core/workers/chunks/8249351daa45ca82ca0c.js +0 -1
  797. package/assets/esri/core/workers/chunks/87ddc3d5d751d565cd97.js +0 -1
  798. package/assets/esri/core/workers/chunks/87f33a60768801ca1ce8.js +0 -1
  799. package/assets/esri/core/workers/chunks/885205379220ccee5802.js +0 -1
  800. package/assets/esri/core/workers/chunks/88bb55bca76f978c0aa3.js +0 -1
  801. package/assets/esri/core/workers/chunks/8b2f0c33e10e163d5c8f.js +0 -1
  802. package/assets/esri/core/workers/chunks/8c5d1fd2b2c7c26e8ff5.js +0 -1
  803. package/assets/esri/core/workers/chunks/8cda8dbd95f0a78063a8.js +0 -1
  804. package/assets/esri/core/workers/chunks/8e0e5183c88a45fbfd8e.js +0 -1
  805. package/assets/esri/core/workers/chunks/90eea0c2435bb5d10460.js +0 -1
  806. package/assets/esri/core/workers/chunks/93c1541241f92fc07eaa.js +0 -1
  807. package/assets/esri/core/workers/chunks/964f2897794d8d71dcb7.js +0 -1
  808. package/assets/esri/core/workers/chunks/97169740043b4a0a40fb.js +0 -1
  809. package/assets/esri/core/workers/chunks/976daa00d35ee7f27a26.js +0 -1
  810. package/assets/esri/core/workers/chunks/97d66b0d0ff1132966de.js +0 -1
  811. package/assets/esri/core/workers/chunks/984d5533dcc831c426be.js +0 -1
  812. package/assets/esri/core/workers/chunks/9970e0e74cf2877a7ffc.js.LICENSE.txt +0 -17
  813. package/assets/esri/core/workers/chunks/99b4f146d0f1661a217c.js +0 -1
  814. package/assets/esri/core/workers/chunks/9e4d68da11995a5b66c3.js +0 -1
  815. package/assets/esri/core/workers/chunks/a6095a6abb2610bb95c1.js +0 -1
  816. package/assets/esri/core/workers/chunks/aa96a05b94ae642c1c9f.js +0 -1
  817. package/assets/esri/core/workers/chunks/b0055e7b2e840d478de8.js +0 -1
  818. package/assets/esri/core/workers/chunks/b1bf8ad629a6b8f4489a.js +0 -1
  819. package/assets/esri/core/workers/chunks/b1e3448ba51557ff6c13.js +0 -1
  820. package/assets/esri/core/workers/chunks/b30046a40bcfbec8abe4.js +0 -1
  821. package/assets/esri/core/workers/chunks/b538d02706a25bbbe2d0.js +0 -1
  822. package/assets/esri/core/workers/chunks/b81b8a800eec9db7ece2.js +0 -1
  823. package/assets/esri/core/workers/chunks/c1c216b0aebe86311fae.js +0 -1
  824. package/assets/esri/core/workers/chunks/c436a112a3119ceabebf.js +0 -1
  825. package/assets/esri/core/workers/chunks/c609bc34b14e4956292e.js +0 -1
  826. package/assets/esri/core/workers/chunks/c8a09db652389f0d254d.js +0 -1
  827. package/assets/esri/core/workers/chunks/c8a645601d041f411060.js +0 -1
  828. package/assets/esri/core/workers/chunks/c9741eb7a66ff7ec9184.js +0 -1
  829. package/assets/esri/core/workers/chunks/cb3b7f83b3efb315bd14.js +0 -1
  830. package/assets/esri/core/workers/chunks/cdc5e4cd1214362e752a.js +0 -1
  831. package/assets/esri/core/workers/chunks/ce0fb7cbf72bbb4cfe98.js +0 -1
  832. package/assets/esri/core/workers/chunks/cf244cbd0558cc1142ed.js +0 -1
  833. package/assets/esri/core/workers/chunks/d181447e2be06beaa23f.js +0 -1
  834. package/assets/esri/core/workers/chunks/d5c93caa3a8bb06a0b3f.js +0 -1
  835. package/assets/esri/core/workers/chunks/da5fc368eb5b3592d05e.js +0 -1
  836. package/assets/esri/core/workers/chunks/dae7e8357936466482fe.js +0 -1
  837. package/assets/esri/core/workers/chunks/db20b986a5681316070b.js +0 -2
  838. package/assets/esri/core/workers/chunks/db20b986a5681316070b.js.LICENSE.txt +0 -5
  839. package/assets/esri/core/workers/chunks/dc7fb41ebe57b463d408.js +0 -1
  840. package/assets/esri/core/workers/chunks/dd935b6335c674b6f596.js +0 -1
  841. package/assets/esri/core/workers/chunks/ddd20894b5107b76b815.js +0 -1
  842. package/assets/esri/core/workers/chunks/de00150030003de05146.js +0 -1
  843. package/assets/esri/core/workers/chunks/decd316936df1ad3fa65.js +0 -1
  844. package/assets/esri/core/workers/chunks/df4d7f100222ea671730.js +0 -1
  845. package/assets/esri/core/workers/chunks/e2320e4e6fd976966c0b.js +0 -1
  846. package/assets/esri/core/workers/chunks/e418c4f7866d03d5352e.js +0 -1
  847. package/assets/esri/core/workers/chunks/e4f4ad67d778dea5b956.js +0 -1
  848. package/assets/esri/core/workers/chunks/e610dd938d30f75778bc.js +0 -1
  849. package/assets/esri/core/workers/chunks/eb256e8488e341c4a6f2.js +0 -1
  850. package/assets/esri/core/workers/chunks/ebc0094355504ec09fb8.js +0 -1
  851. package/assets/esri/core/workers/chunks/ec195549b274cca09d81.js +0 -1
  852. package/assets/esri/core/workers/chunks/ec4a45b40021abdead45.js +0 -1
  853. package/assets/esri/core/workers/chunks/ee5f43fbe4c2cc199e64.js +0 -1
  854. package/assets/esri/core/workers/chunks/f0334d31c8cac38baa25.js +0 -1
  855. package/assets/esri/core/workers/chunks/f1b63f092e239f84b849.js +0 -1
  856. package/assets/esri/core/workers/chunks/f2126b79f41dc62cc576.js +0 -1
  857. package/assets/esri/core/workers/chunks/f3a75dffb285590cb451.js +0 -1
  858. package/assets/esri/core/workers/chunks/f3e0b0f07a622fcdd6ae.js +0 -1
  859. package/assets/esri/core/workers/chunks/f581aec77accce7411e0.js +0 -1
  860. package/assets/esri/core/workers/chunks/f606350e4d040ad70f4d.js +0 -1
  861. package/assets/esri/core/workers/chunks/f849ffe8e551bd5896ef.js +0 -1
  862. package/assets/esri/core/workers/chunks/f877bcbd277a28154d82.js +0 -1
  863. package/assets/esri/core/workers/chunks/fa1c68f2ffcdff7986b6.js +0 -1
  864. package/assets/esri/core/workers/chunks/fa849ff6132c2cd6d8e8.js +0 -1
  865. package/assets/esri/core/workers/chunks/feeb36ffdffb227c4353.js +0 -1
  866. package/renderers/support/types.js +0 -5
  867. package/widgets/support/templateUtils.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../chunks/tslib.es6.js";import"../../../geometry.js";import e from"../../../Graphic.js";import i from"../../../core/Evented.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{zeroMeters as o}from"../../../core/quantityUtils.js";import{when as r,watch as a,syncAndInitial as h,initial as c}from"../../../core/reactiveUtils.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import{create as p}from"../../../geometry/support/aaBoundingRect.js";import{getRingsOrPathsBounds as _}from"../../../geometry/support/boundsUtils.js";import{geometryToCoordinates as d}from"../../../geometry/support/coordsUtils.js";import m from"../../../geometry/support/rotate.js";import u from"../../../symbols/SimpleFillSymbol.js";import g from"../../../symbols/SimpleLineSymbol.js";import y from"../../../symbols/SimpleMarkerSymbol.js";import{cloneMove as v,scale as f,getRotationAngle as G,getScaleRatio as b}from"./drawUtils.js";import x from"./GraphicMover.js";import w from"./HighlightHelper.js";import{addUniqueLayer as S}from"./layerUtils.js";import{settings as k}from"./settings.js";import R from"../../interactive/sketch/SketchOptions.js";import{makeTooltip as M}from"../../interactive/tooltip/tooltipCommonUtils.js";import{ExtentRotateTooltipInfo as I}from"../../interactive/tooltip/infos/ExtentRotateTooltipInfo.js";import{ExtentScaleTooltipInfo as C}from"../../interactive/tooltip/infos/ExtentScaleTooltipInfo.js";import{TranslateTooltipInfo as H}from"../../interactive/tooltip/infos/TranslateTooltipInfo.js";import{autoDistanceBetweenPoints2D as O}from"../../support/automaticLengthMeasurementUtils.js";import{autoSize2D as j}from"../../support/extentUtils.js";import T from"../../../geometry/Point.js";import E from"../../../geometry/Polygon.js";import L from"../../../geometry/Polyline.js";class z{constructor(t,e,i,s){this.graphics=t,this.mover=e,this.dx=i,this.dy=s,this.type="move-start"}}class B{constructor(t,e,i,s){this.graphics=t,this.mover=e,this.dx=i,this.dy=s,this.type="move"}}class Y{constructor(t,e,i,s){this.graphics=t,this.mover=e,this.dx=i,this.dy=s,this.type="move-stop"}}class N{constructor(t,e,i){this.graphics=t,this.mover=e,this.angle=i,this.type="rotate-start"}}class U{constructor(t,e,i){this.graphics=t,this.mover=e,this.angle=i,this.type="rotate"}}class A{constructor(t,e,i){this.graphics=t,this.mover=e,this.angle=i,this.type="rotate-stop"}}class P{constructor(t,e,i,s){this.graphics=t,this.mover=e,this.xScale=i,this.yScale=s,this.type="scale-start"}}class X{constructor(t,e,i,s){this.graphics=t,this.mover=e,this.xScale=i,this.yScale=s,this.type="scale"}}class F{constructor(t,e,i,s){this.graphics=t,this.mover=e,this.xScale=i,this.yScale=s,this.type="scale-stop"}}const D=k.transformGraphics,V={centerIndicator:new y({style:"cross",size:D.center.size,color:D.center.color}),fill:{default:new u({color:D.fill.color,outline:{color:D.fill.outlineColor,join:"round",width:1}}),active:new u({color:D.fill.stagedColor,outline:{color:D.fill.outlineColor,join:"round",style:"dash",width:1}})},handles:{default:new y({style:"square",size:D.vertex.size,color:D.vertex.color,outline:{color:D.vertex.outlineColor,width:1}}),hover:new y({style:"square",size:D.vertex.hoverSize,color:D.vertex.hoverColor,outline:{color:D.vertex.hoverOutlineColor,width:1}})},rotator:{default:new y({style:"circle",size:D.vertex.size,color:D.vertex.color,outline:{color:D.vertex.outlineColor,width:1}}),hover:new y({style:"circle",size:D.vertex.hoverSize,color:D.vertex.hoverColor,outline:{color:D.vertex.hoverOutlineColor,width:1}})},rotatorLine:new g({color:D.line.color,width:1})};let q=class extends i.EventedAccessor{constructor(t){super(t),this._activeHandleGraphic=null,this._graphicAttributes={esriSketchTool:"box"},this._mover=null,this._centerGraphic=null,this._backgroundGraphic=null,this._vertexGraphics=[],this._rotateHandleGraphic=null,this._rotateGraphicOffset=20,this._angleOfRotation=0,this._rotateLineGraphic=null,this._startInfo=null,this._totalDx=0,this._totalDy=0,this._xScale=1,this._yScale=1,this.tooltip=null,this.type="box",this.callbacks={onMoveStart(){},onMove(){},onMoveStop(){},onScaleStart(){},onScale(){},onScaleStop(){},onRotateStart(){},onRotate(){},onRotateStop(){},onGraphicClick(){}},this.enableMovement=!0,this.enableRotation=!0,this.enableScaling=!0,this.graphics=[],this.highlightsEnabled=!0,this.layer=null,this.preserveAspectRatio=!1,this.showCenterGraphic=!0,this.symbols=V,this.sketchOptions=new R,this.view=null,this._getBounds=(()=>{const t=p();return(e,i)=>{e[0]=Number.POSITIVE_INFINITY,e[1]=Number.POSITIVE_INFINITY,e[2]=Number.NEGATIVE_INFINITY,e[3]=Number.NEGATIVE_INFINITY;for(const s of i){if(!s)continue;let i,o,r,a;if("point"===s.type)i=r=s.x,o=a=s.y;else if("multipoint"===s.type){const e=d(s);[i,o,r,a]=_(t,[e])}else if("extent"===s.type)[i,o,r,a]=[s.xmin,s.ymin,s.xmax,s.ymax];else{const e=d(s);[i,o,r,a]=_(t,e)}e[0]=Math.min(i,e[0]),e[1]=Math.min(o,e[1]),e[2]=Math.max(r,e[2]),e[3]=Math.max(a,e[3])}return e}})()}initialize(){const t=this.view;this._highlightHelper=new w({view:t}),this._setup(),this.addHandles([r((()=>t?.ready),(()=>{const{layer:t,view:e}=this;S(e,t)}),{once:!0,initial:!0}),a((()=>this.preserveAspectRatio),(()=>{this._activeHandleGraphic&&(this._scaleGraphic(this._activeHandleGraphic),this._updateGraphics(),this._updateTooltip(this._activeHandleGraphic))})),a((()=>t?.scale),(()=>{this._updateRotateGraphic(),this._updateRotateLineGraphic()})),a((()=>this.graphics),(()=>this.refresh())),a((()=>this.layer),((t,e)=>{e&&this._resetGraphics(e),this.refresh()})),a((()=>this.highlightsEnabled),(()=>{this._highlightHelper?.removeAll(),this._setUpHighlights()})),a((()=>this.sketchOptions.tooltips.effectiveEnabled),(e=>{this.tooltip=e?M((()=>({view:t,options:this.sketchOptions.tooltips}))):s(this.tooltip)}),h),a((()=>this.view.effectiveTheme.accentColor),(()=>this._updateSymbolsForTheme()),c),this.on("move-start",(t=>this.callbacks?.onMoveStart?.(t))),this.on("move",(t=>this.callbacks?.onMove?.(t))),this.on("move-stop",(t=>this.callbacks?.onMoveStop?.(t))),this.on("rotate-start",(t=>this.callbacks?.onRotateStart?.(t))),this.on("rotate",(t=>this.callbacks?.onRotate?.(t))),this.on("rotate-stop",(t=>this.callbacks?.onRotateStop?.(t))),this.on("scale-start",(t=>this.callbacks?.onScaleStart?.(t))),this.on("scale",(t=>this.callbacks?.onScale?.(t))),this.on("scale-stop",(t=>this.callbacks?.onScaleStop?.(t)))])}destroy(){this._reset(),this.tooltip=s(this.tooltip)}get state(){const t=this.view?.ready??!1,e=this.graphics.length&&this.layer;return t&&e?"active":t?"ready":"disabled"}isUIGraphic(t){return this._vertexGraphics.includes(t)||t===this._backgroundGraphic||t===this._centerGraphic||t===this._rotateHandleGraphic||t===this._rotateLineGraphic}move(t,e){if(this._mover&&this.graphics.length){for(const i of this.graphics){const s=i.geometry,o=v(s,t,e,this.view);i.geometry=o}this.refresh(),this.emit("move-stop",new Y(this.graphics,null,t,e))}}scale(t,e){if(this._mover&&this.graphics.length){for(const i of this.graphics){const s=i.geometry,o=f(s,t,e);i.geometry=o}this.refresh(),this.emit("scale-stop",new F(this.graphics,null,t,e))}}rotate(t,e){if(this._mover&&this.graphics.length){if(!e){const t=this._vertexGraphics[1].geometry.x,i=this._vertexGraphics[3].geometry.y;e=new T(t,i,this.view.spatialReference)}for(const i of this.graphics){const s=i.geometry,o=m(s,t,e);i.geometry=o}this.refresh(),this.emit("rotate-stop",new A(this.graphics,null,t))}}refresh(){this._reset(),this._setup()}reset(){this.graphics=[]}_setup(){"active"===this.state&&(this._setUpHighlights(),this._setupGraphics(),this._setupMover(),this._updateGraphics())}_reset(){this._highlightHelper?.removeAll(),this._resetGraphicStateVars(),this._resetGraphics(),this._updateTooltip(),this._mover&&this._mover.destroy(),this._mover=null,this.view.cursor="default"}_resetGraphicStateVars(){this._startInfo=null,this._activeHandleGraphic=null,this._totalDx=0,this._totalDy=0,this._xScale=1,this._yScale=1,this._angleOfRotation=0}_resetGraphics(t){(t=t||this.layer)&&(t.removeMany(this._vertexGraphics),t.remove(this._backgroundGraphic),t.remove(this._centerGraphic),t.remove(this._rotateHandleGraphic),t.remove(this._rotateLineGraphic)),this._vertexGraphics.forEach((t=>!t.destroyed&&t.destroy())),!this._backgroundGraphic.destroyed&&this._backgroundGraphic.destroy(),!this._centerGraphic.destroyed&&this._centerGraphic.destroy(),!this._rotateHandleGraphic.destroyed&&this._rotateHandleGraphic.destroy(),!this._rotateLineGraphic.destroyed&&this._rotateLineGraphic.destroy(),this._vertexGraphics=[],this._backgroundGraphic=null,this._centerGraphic=null,this._rotateHandleGraphic=null,this._rotateLineGraphic=null}_setupMover(){let t=[];this.enableScaling&&(t=t.concat(this._vertexGraphics)),this.enableMovement&&(t=t.concat(this.graphics,this._backgroundGraphic)),this.enableRotation&&t.push(this._rotateHandleGraphic),this.showCenterGraphic&&t.push(this._centerGraphic),this._mover=new x({enableMoveAllGraphics:!1,highlightsEnabled:!1,indicatorsEnabled:!1,view:this.view,graphics:t,callbacks:{onGraphicClick:t=>this._onGraphicClickCallback(t),onGraphicMoveStart:t=>this._onGraphicMoveStartCallback(t),onGraphicMove:t=>this._onGraphicMoveCallback(t),onGraphicMoveStop:t=>this._onGraphicMoveStopCallback(t),onGraphicPointerOver:t=>this._onGraphicPointerOverCallback(t),onGraphicPointerOut:t=>this._onGraphicPointerOutCallback(t)}})}_getStartInfo(t){const[e,i,s,o]=this._getBoxBounds(p()),r=Math.abs(s-e),a=Math.abs(o-i),h=(s+e)/2,c=(o+i)/2,{x:n,y:l}=t.geometry;return{width:r,height:a,centerX:h,centerY:c,startX:n,startY:l,graphicInfos:this._getGraphicInfos(),box:this._backgroundGraphic.geometry,rotate:this._rotateHandleGraphic.geometry}}_getGraphicInfos(){return this.graphics.map((t=>this._getGraphicInfo(t)))}_getGraphicInfo(t){const e=t.geometry,[i,s,o,r]=this._getBounds(p(),[e]);return{width:Math.abs(o-i),height:Math.abs(r-s),centerX:(o+i)/2,centerY:(r+s)/2,geometry:e}}_onGraphicClickCallback(t){t.viewEvent.stopPropagation(),this.emit("graphic-click",t),this.callbacks.onGraphicClick&&this.callbacks.onGraphicClick(t)}_onGraphicMoveStartCallback(t){const{_angleOfRotation:e,_xScale:i,_yScale:s,_backgroundGraphic:o,_vertexGraphics:r,_rotateHandleGraphic:a,symbols:h}=this,c=t.graphic;this._resetGraphicStateVars(),this._hideGraphicsBeforeUpdate(),o.symbol=h.fill.active,this._startInfo=this._getStartInfo(c),this._updateTooltip(c,t.viewEvent),c===a?(this.view.cursor="grabbing",this.emit("rotate-start",new N(this.graphics,c,e))):r.includes(c)?(this._activeHandleGraphic=c,this.emit("scale-start",new P(this.graphics,c,i,s))):this.emit("move-start",new z(this.graphics,c,t.dx,t.dy))}_onGraphicMoveCallback(t){const e=t.graphic;if(this._startInfo)if(this._vertexGraphics.includes(e))this._scaleGraphic(e),this._updateTooltip(e,t.viewEvent),this.emit("scale",new X(this.graphics,e,this._xScale,this._yScale));else if(e===this._rotateHandleGraphic)this._rotateGraphic(e),this._updateTooltip(e,t.viewEvent),this.emit("rotate",new U(this.graphics,e,this._angleOfRotation));else{const{dx:i,dy:s}=t;this._totalDx+=i,this._totalDy+=s,this._moveGraphic(e,i,s),this._updateTooltip(e,t.viewEvent),this.emit("move",new B(this.graphics,e,i,s))}}_onGraphicMoveStopCallback(t){const e=t.graphic;if(!this._startInfo)return void this.refresh();const{_angleOfRotation:i,_totalDx:s,_totalDy:o,_xScale:r,_yScale:a,_vertexGraphics:h,_rotateHandleGraphic:c}=this;this.refresh(),e===c?(this.view.cursor="pointer",this.emit("rotate-stop",new A(this.graphics,e,i))):h.includes(e)?this.emit("scale-stop",new F(this.graphics,e,r,a)):this.emit("move-stop",new Y(this.graphics,e,s,o))}_onGraphicPointerOverCallback(t){const{_backgroundGraphic:e,_vertexGraphics:i,graphics:s,_rotateHandleGraphic:o,symbols:r,view:a}=this,h=t.graphic;if(this._hoveredGraphic=h,h===o)return o.symbol=r.rotator.hover,a.cursor="pointer",void this._updateTooltip(h);if(s.includes(h)||h===e)return void(a.cursor="move");if(!i.includes(h))return void(a.cursor="pointer");this._updateTooltip(h),t.graphic.symbol=r.handles.hover;const c=a.rotation;let n,l=t.index;switch(l<8&&(c>=0&&c<45?l%=8:l=c>=45&&c<90?(l+1)%8:c>=90&&c<135?(l+2)%8:c>=135&&c<180?(l+3)%8:c>=180&&c<225?(l+4)%8:c>=225&&c<270?(l+5)%8:c>=270&&c<315?(l+6)%8:(l+7)%8),l){case 0:case 4:n="nwse-resize";break;case 1:case 5:n="ns-resize";break;case 2:case 6:n="nesw-resize";break;case 3:case 7:n="ew-resize";break;default:n="pointer"}a.cursor=n}_onGraphicPointerOutCallback(t){const{_vertexGraphics:e,_rotateHandleGraphic:i,symbols:s,view:o}=this;this._hoveredGraphic=null,t.graphic===i?i.symbol=s.rotator.default:e.includes(t.graphic)&&(t.graphic.symbol=s.handles.default),o.cursor="default",this._updateTooltip()}_scaleGraphic(t){const{_startInfo:e,_vertexGraphics:i,preserveAspectRatio:s,view:o}=this,{centerX:r,centerY:a,graphicInfos:h,height:c,startX:n,startY:l,width:p}=e,{resolution:_,transform:d}=o.state,m=i.indexOf(t);1!==m&&5!==m||this._updateX(t,r),3!==m&&7!==m||this._updateY(t,a);const{x:u,y:g}=t.geometry,y=d[0]*u+d[2]*g+d[4],G=d[1]*u+d[3]*g+d[5],x=h?.map((t=>t.geometry))??[],w=x.every((t=>"point"===t.type));if((0===p||0===c)&&w){const t=J((u-n)/_),i=J((l-g)/_);for(let e=0;e<x.length;e++)this.graphics[e].geometry=v(x[e],t,i,o,!0);return this._centerGraphic.geometry=new T(u,g,o.spatialReference),void(this._backgroundGraphic.geometry=v(e.box,t,i,o,!0))}if(s){const t=J(d[0]*r+d[2]*a+d[4],2),e=J(d[1]*r+d[3]*a+d[5],2),i=J(d[0]*n+d[2]*l+d[4],2),s=J(d[1]*n+d[3]*l+d[5],2);let o=b(t,e,i,s,y,G);0!==o&&Math.abs(o)!==1/0||(o=1),this._xScale=this._yScale=o;for(const h of x){const t=x.indexOf(h);this.graphics[t].geometry=f(h,this._xScale,this._yScale,[r,a])}this._updateBackgroundGraphic()}else{let t=u-n,i=l-g;if(1===m||5===m?t=0:3!==m&&7!==m||(i=0),0===t&&0===i)return;const s=r+t/2,h=a+i/2;let d=(p+(n>r?t:-1*t))/p,y=(c+(l<a?i:-1*i))/c;1!==m&&5!==m&&0!==d&&Math.abs(d)!==1/0||(d=1),3!==m&&7!==m&&0!==y&&Math.abs(y)!==1/0||(y=1),this._xScale=d,this._yScale=y;const G=(s-r)/_,b=(h-a)/_,w=f(e.box,this._xScale,this._yScale);this._backgroundGraphic.geometry=v(w,G,b,o,!0);const{centerX:S,centerY:k}=this._getGraphicInfo(this._backgroundGraphic),R=(S-r)/_,M=-1*(k-a)/_;for(const e of x){const t=x.indexOf(e),i=f(e,this._xScale,this._yScale,[r,a]);this.graphics[t].geometry=v(i,R,M,o,!0)}this._centerGraphic.geometry=new T(S,k,o.spatialReference)}}_rotateGraphic(t){const{centerX:e,centerY:i,startX:s,startY:o,box:r,rotate:a}=this._startInfo,h=this.view.spatialReference,c=new T(s,o,h),n=new T(e,i,h),l=t.geometry;this._angleOfRotation=G(c,l,n);const p=this._startInfo.graphicInfos?.map((t=>t.geometry))??[];for(const _ of p){const t=p.indexOf(_),e=m(_,this._angleOfRotation,n);this.graphics[t].geometry=e}this._backgroundGraphic.geometry=m(r,this._angleOfRotation,n),this._rotateHandleGraphic.geometry=m(a,this._angleOfRotation,n)}_moveGraphic(t,e,i){if(this.graphics.includes(t)){const s=this._backgroundGraphic.geometry;this._backgroundGraphic.geometry=v(s,e,i,this.view);for(const o of this.graphics)o!==t&&(o.geometry=v(o.geometry,e,i,this.view))}else if(t===this._centerGraphic){const t=this._backgroundGraphic.geometry;this._backgroundGraphic.geometry=v(t,e,i,this.view)}if(t===this._backgroundGraphic||t===this._centerGraphic)for(const s of this.graphics)s.geometry=v(s.geometry,e,i,this.view)}_setUpHighlights(){this.highlightsEnabled&&this.graphics.length&&this._highlightHelper?.add(this.graphics)}_setupGraphics(){const{_graphicAttributes:t,symbols:i}=this;this._centerGraphic=new e({symbol:i.centerIndicator,attributes:t}),this.showCenterGraphic&&this.layer.add(this._centerGraphic),this._backgroundGraphic=new e({symbol:i.fill.default,attributes:t}),this.layer.add(this._backgroundGraphic),this._rotateLineGraphic=new e({symbol:i.rotatorLine,attributes:t}),this._rotateHandleGraphic=new e({symbol:i.rotator.default,attributes:t}),this.enableRotation&&!this._hasExtentGraphic()&&this.layer.addMany([this._rotateLineGraphic,this._rotateHandleGraphic]);for(let s=0;s<8;s++)this._vertexGraphics.push(new e({symbol:i.handles.default,attributes:t}));this.enableScaling&&this.layer.addMany(this._vertexGraphics)}_updateSymbolsForTheme(){const t=this.view.effectiveTheme.accentColor;this.symbols={...this.symbols,fill:{active:this.symbols.fill.active?.clone().set("outline.color",t),default:this.symbols.fill.default?.clone().set("outline.color",t)},handles:{...this.symbols.handles,default:this.symbols.handles.default.clone().set("outline.color",t)},rotator:{...this.symbols.rotator,default:this.symbols.rotator.default.clone().set("outline.color",t)},rotatorLine:this.symbols.rotatorLine.clone().set("color",t)};for(const e of this._vertexGraphics)e.symbol=e===this._hoveredGraphic?this.symbols.handles.hover:this.symbols.handles.default;this._backgroundGraphic.symbol=this.symbols.fill.default,this._rotateHandleGraphic.symbol=this._rotateHandleGraphic===this._hoveredGraphic?this.symbols.rotator.hover:this.symbols.rotator.default,this._rotateLineGraphic.symbol=this.symbols.rotatorLine}_updateGraphics(){this._updateBackgroundGraphic(),this._updateHandleGraphics(),this._updateCenterGraphic(),this._updateRotateGraphic(),this._updateRotateLineGraphic()}_hideGraphicsBeforeUpdate(){this._centerGraphic.visible=!1,this._rotateHandleGraphic.visible=!1,this._rotateLineGraphic.visible=!1,this._vertexGraphics.forEach((t=>t.visible=!1))}_updateHandleGraphics(){const t=this._getCoordinates(!0);this._vertexGraphics.forEach(((e,i)=>{const[s,o]=t[i];this._updateXY(e,s,o)}))}_updateBackgroundGraphic(){const t=this._getCoordinates().map((([t,e])=>[t,e]));this._backgroundGraphic.geometry=new E({rings:[t],spatialReference:this.view.spatialReference})}_updateCenterGraphic(){const[t,e,i,s]=this._getBoxBounds(p()),o=(i+t)/2,r=(s+e)/2;this._centerGraphic.geometry=new T(o,r,this.view.spatialReference)}_updateRotateGraphic(){if(!this._vertexGraphics.length)return;const{x:t,y:e}=this._vertexGraphics[1].geometry,i=e+this.view.state.resolution*this._rotateGraphicOffset;this._rotateHandleGraphic.geometry=new T(t,i,this.view.spatialReference)}_updateRotateLineGraphic(){if(!this._vertexGraphics.length||!this._rotateHandleGraphic?.geometry)return;const t=this._vertexGraphics[1].geometry,e=this._rotateHandleGraphic.geometry;this._rotateLineGraphic.geometry=new L({paths:[[[t.x,t.y],[e.x,e.y]]],spatialReference:this.view.spatialReference})}_updateXY(t,e,i){t.geometry=new T(e,i,this.view.spatialReference)}_updateX(t,e){const i=t.geometry.y;t.geometry=new T(e,i,this.view.spatialReference)}_updateY(t,e){const i=t.geometry.x;t.geometry=new T(i,e,this.view.spatialReference)}_hasExtentGraphic(){return this.graphics.some((t=>null!=t?.geometry&&"extent"===t.geometry.type))}_getBoxBounds(t){const e=this.graphics.map((t=>t.geometry));return this._getBounds(t,e)}_getCoordinates(t){const[e,i,s,o]=this._getBoxBounds(p());if(t){const t=(e+s)/2,r=(o+i)/2;return[[e,o],[t,o],[s,o],[s,r],[s,i],[t,i],[e,i],[e,r]]}return[[e,o],[s,o],[s,i],[e,i]]}_updateTooltip(t,e){if(null==this.tooltip)return;if(!t)return void this.tooltip.clear();const{_backgroundGraphic:i,graphics:s,_vertexGraphics:o,_rotateHandleGraphic:r}=this;t===r?this._updateRotateTooltip():o.includes(t)?this._updateScaleTooltip():(s.includes(t)||t===i)&&this._updateMoveTooltip(e)}_updateRotateTooltip(){null!=this.tooltip&&(this.tooltip.info=new I({sketchOptions:this.sketchOptions,angle:-this._angleOfRotation}))}_updateScaleTooltip(){const{tooltip:t,_xScale:e,_yScale:i,sketchOptions:s,view:o}=this;if(null==t)return;const r=this._getCoordinates(),a=j({topLeft:r[0],topRight:r[1],bottomRight:r[2],bottomLeft:r[3],spatialReference:o.spatialReference});if(null==a)return;const{xSize:h,ySize:c}=a,n=Math.abs(e),l=Math.abs(i);t.info=new C({sketchOptions:s,xScale:n,yScale:l,xSize:h,ySize:c})}_updateMoveTooltip(t){const{tooltip:e,sketchOptions:i,view:s}=this;if(null==e)return;const r=new H({sketchOptions:i});if(t){const{x:e,y:i}=t.origin,a=s.toMap(t),h=s.toMap({x:e,y:i}),c=O(h,a);r.distance=null!=c?c:o}e.info=r}};function J(t,e=2){return Number.parseFloat(t.toFixed(e))}t([n()],q.prototype,"tooltip",void 0),t([n({readOnly:!0})],q.prototype,"type",void 0),t([n()],q.prototype,"callbacks",void 0),t([n()],q.prototype,"enableMovement",void 0),t([n()],q.prototype,"enableRotation",void 0),t([n()],q.prototype,"enableScaling",void 0),t([n()],q.prototype,"graphics",void 0),t([n()],q.prototype,"highlightsEnabled",void 0),t([n()],q.prototype,"layer",void 0),t([n()],q.prototype,"preserveAspectRatio",void 0),t([n()],q.prototype,"showCenterGraphic",void 0),t([n({readOnly:!0})],q.prototype,"state",null),t([n()],q.prototype,"symbols",void 0),t([n({type:R})],q.prototype,"sketchOptions",void 0),t([n({constructOnly:!0})],q.prototype,"view",void 0),q=t([l("esri.views.draw.support.Box")],q);const K=q;export{K as default};
5
+ import{_ as t}from"../../../chunks/tslib.es6.js";import e from"../../../Graphic.js";import i from"../../../core/Evented.js";import{destroyMaybe as s}from"../../../core/maybe.js";import{zeroMeters as o}from"../../../core/quantityUtils.js";import{when as r,watch as a,syncAndInitial as h,initial as c}from"../../../core/reactiveUtils.js";import{property as n}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as l}from"../../../core/accessorSupport/decorators/subclass.js";import p from"../../../geometry/Point.js";import _ from"../../../geometry/Polygon.js";import d from"../../../geometry/Polyline.js";import{create as m}from"../../../geometry/support/aaBoundingRect.js";import{getRingsOrPathsBounds as u}from"../../../geometry/support/boundsUtils.js";import{geometryToCoordinates as g}from"../../../geometry/support/coordsUtils.js";import y from"../../../geometry/support/rotate.js";import v from"../../../symbols/SimpleFillSymbol.js";import f from"../../../symbols/SimpleLineSymbol.js";import G from"../../../symbols/SimpleMarkerSymbol.js";import{cloneMove as b,scale as x,getRotationAngle as w,getScaleRatio as S}from"./drawUtils.js";import k from"./GraphicMover.js";import R from"./HighlightHelper.js";import{addUniqueLayer as M}from"./layerUtils.js";import{settings as I}from"./settings.js";import C from"../../interactive/sketch/SketchOptions.js";import{makeTooltip as H}from"../../interactive/tooltip/tooltipCommonUtils.js";import{ExtentRotateTooltipInfo as O}from"../../interactive/tooltip/infos/ExtentRotateTooltipInfo.js";import{ExtentScaleTooltipInfo as j}from"../../interactive/tooltip/infos/ExtentScaleTooltipInfo.js";import{TranslateTooltipInfo as T}from"../../interactive/tooltip/infos/TranslateTooltipInfo.js";import{autoDistanceBetweenPoints2D as E}from"../../support/automaticLengthMeasurementUtils.js";import{autoSize2D as L}from"../../support/extentUtils.js";class z{constructor(t,e,i,s){this.graphics=t,this.mover=e,this.dx=i,this.dy=s,this.type="move-start"}}class B{constructor(t,e,i,s){this.graphics=t,this.mover=e,this.dx=i,this.dy=s,this.type="move"}}class Y{constructor(t,e,i,s){this.graphics=t,this.mover=e,this.dx=i,this.dy=s,this.type="move-stop"}}class N{constructor(t,e,i){this.graphics=t,this.mover=e,this.angle=i,this.type="rotate-start"}}class U{constructor(t,e,i){this.graphics=t,this.mover=e,this.angle=i,this.type="rotate"}}class A{constructor(t,e,i){this.graphics=t,this.mover=e,this.angle=i,this.type="rotate-stop"}}class P{constructor(t,e,i,s){this.graphics=t,this.mover=e,this.xScale=i,this.yScale=s,this.type="scale-start"}}class X{constructor(t,e,i,s){this.graphics=t,this.mover=e,this.xScale=i,this.yScale=s,this.type="scale"}}class F{constructor(t,e,i,s){this.graphics=t,this.mover=e,this.xScale=i,this.yScale=s,this.type="scale-stop"}}const D=I.transformGraphics,V={centerIndicator:new G({style:"cross",size:D.center.size,color:D.center.color}),fill:{default:new v({color:D.fill.color,outline:{color:D.fill.outlineColor,join:"round",width:1}}),active:new v({color:D.fill.stagedColor,outline:{color:D.fill.outlineColor,join:"round",style:"dash",width:1}})},handles:{default:new G({style:"square",size:D.vertex.size,color:D.vertex.color,outline:{color:D.vertex.outlineColor,width:1}}),hover:new G({style:"square",size:D.vertex.hoverSize,color:D.vertex.hoverColor,outline:{color:D.vertex.hoverOutlineColor,width:1}})},rotator:{default:new G({style:"circle",size:D.vertex.size,color:D.vertex.color,outline:{color:D.vertex.outlineColor,width:1}}),hover:new G({style:"circle",size:D.vertex.hoverSize,color:D.vertex.hoverColor,outline:{color:D.vertex.hoverOutlineColor,width:1}})},rotatorLine:new f({color:D.line.color,width:1})};let q=class extends i.EventedAccessor{constructor(t){super(t),this._activeHandleGraphic=null,this._graphicAttributes={esriSketchTool:"box"},this._mover=null,this._centerGraphic=null,this._backgroundGraphic=null,this._vertexGraphics=[],this._rotateHandleGraphic=null,this._rotateGraphicOffset=20,this._angleOfRotation=0,this._rotateLineGraphic=null,this._startInfo=null,this._totalDx=0,this._totalDy=0,this._xScale=1,this._yScale=1,this.tooltip=null,this.type="box",this.callbacks={onMoveStart(){},onMove(){},onMoveStop(){},onScaleStart(){},onScale(){},onScaleStop(){},onRotateStart(){},onRotate(){},onRotateStop(){},onGraphicClick(){}},this.enableMovement=!0,this.enableRotation=!0,this.enableScaling=!0,this.graphics=[],this.highlightsEnabled=!0,this.layer=null,this.preserveAspectRatio=!1,this.showCenterGraphic=!0,this.symbols=V,this.sketchOptions=new C,this.view=null,this._getBounds=(()=>{const t=m();return(e,i)=>{e[0]=Number.POSITIVE_INFINITY,e[1]=Number.POSITIVE_INFINITY,e[2]=Number.NEGATIVE_INFINITY,e[3]=Number.NEGATIVE_INFINITY;for(const s of i){if(!s)continue;let i,o,r,a;if("point"===s.type)i=r=s.x,o=a=s.y;else if("multipoint"===s.type){const e=g(s);[i,o,r,a]=u(t,[e])}else if("extent"===s.type)[i,o,r,a]=[s.xmin,s.ymin,s.xmax,s.ymax];else{const e=g(s);[i,o,r,a]=u(t,e)}e[0]=Math.min(i,e[0]),e[1]=Math.min(o,e[1]),e[2]=Math.max(r,e[2]),e[3]=Math.max(a,e[3])}return e}})()}initialize(){const t=this.view;this._highlightHelper=new R({view:t}),this._setup(),this.addHandles([r((()=>t?.ready),(()=>{const{layer:t,view:e}=this;M(e,t)}),{once:!0,initial:!0}),a((()=>this.preserveAspectRatio),(()=>{this._activeHandleGraphic&&(this._scaleGraphic(this._activeHandleGraphic),this._updateGraphics(),this._updateTooltip(this._activeHandleGraphic))})),a((()=>t?.scale),(()=>{this._updateRotateGraphic(),this._updateRotateLineGraphic()})),a((()=>this.graphics),(()=>this.refresh())),a((()=>this.layer),((t,e)=>{e&&this._resetGraphics(e),this.refresh()})),a((()=>this.highlightsEnabled),(()=>{this._highlightHelper?.removeAll(),this._setUpHighlights()})),a((()=>this.sketchOptions.tooltips.effectiveEnabled),(e=>{this.tooltip=e?H((()=>({view:t,options:this.sketchOptions.tooltips}))):s(this.tooltip)}),h),a((()=>this.view.effectiveTheme.accentColor),(()=>this._updateSymbolsForTheme()),c),this.on("move-start",(t=>this.callbacks?.onMoveStart?.(t))),this.on("move",(t=>this.callbacks?.onMove?.(t))),this.on("move-stop",(t=>this.callbacks?.onMoveStop?.(t))),this.on("rotate-start",(t=>this.callbacks?.onRotateStart?.(t))),this.on("rotate",(t=>this.callbacks?.onRotate?.(t))),this.on("rotate-stop",(t=>this.callbacks?.onRotateStop?.(t))),this.on("scale-start",(t=>this.callbacks?.onScaleStart?.(t))),this.on("scale",(t=>this.callbacks?.onScale?.(t))),this.on("scale-stop",(t=>this.callbacks?.onScaleStop?.(t)))])}destroy(){this._reset(),this.tooltip=s(this.tooltip)}get state(){const t=this.view?.ready??!1,e=this.graphics.length&&this.layer;return t&&e?"active":t?"ready":"disabled"}isUIGraphic(t){return this._vertexGraphics.includes(t)||t===this._backgroundGraphic||t===this._centerGraphic||t===this._rotateHandleGraphic||t===this._rotateLineGraphic}move(t,e){if(this._mover&&this.graphics.length){for(const i of this.graphics){const s=i.geometry,o=b(s,t,e,this.view);i.geometry=o}this.refresh(),this.emit("move-stop",new Y(this.graphics,null,t,e))}}scale(t,e){if(this._mover&&this.graphics.length){for(const i of this.graphics){const s=i.geometry,o=x(s,t,e);i.geometry=o}this.refresh(),this.emit("scale-stop",new F(this.graphics,null,t,e))}}rotate(t,e){if(this._mover&&this.graphics.length){if(!e){const t=this._vertexGraphics[1].geometry.x,i=this._vertexGraphics[3].geometry.y;e=new p(t,i,this.view.spatialReference)}for(const i of this.graphics){const s=i.geometry,o=y(s,t,e);i.geometry=o}this.refresh(),this.emit("rotate-stop",new A(this.graphics,null,t))}}refresh(){this._reset(),this._setup()}reset(){this.graphics=[]}_setup(){"active"===this.state&&(this._setUpHighlights(),this._setupGraphics(),this._setupMover(),this._updateGraphics())}_reset(){this._highlightHelper?.removeAll(),this._resetGraphicStateVars(),this._resetGraphics(),this._updateTooltip(),this._mover&&this._mover.destroy(),this._mover=null,this.view.cursor="default"}_resetGraphicStateVars(){this._startInfo=null,this._activeHandleGraphic=null,this._totalDx=0,this._totalDy=0,this._xScale=1,this._yScale=1,this._angleOfRotation=0}_resetGraphics(t){(t=t||this.layer)&&(t.removeMany(this._vertexGraphics),t.remove(this._backgroundGraphic),t.remove(this._centerGraphic),t.remove(this._rotateHandleGraphic),t.remove(this._rotateLineGraphic)),this._vertexGraphics.forEach((t=>!t.destroyed&&t.destroy())),!this._backgroundGraphic.destroyed&&this._backgroundGraphic.destroy(),!this._centerGraphic.destroyed&&this._centerGraphic.destroy(),!this._rotateHandleGraphic.destroyed&&this._rotateHandleGraphic.destroy(),!this._rotateLineGraphic.destroyed&&this._rotateLineGraphic.destroy(),this._vertexGraphics=[],this._backgroundGraphic=null,this._centerGraphic=null,this._rotateHandleGraphic=null,this._rotateLineGraphic=null}_setupMover(){let t=[];this.enableScaling&&(t=t.concat(this._vertexGraphics)),this.enableMovement&&(t=t.concat(this.graphics,this._backgroundGraphic)),this.enableRotation&&t.push(this._rotateHandleGraphic),this.showCenterGraphic&&t.push(this._centerGraphic),this._mover=new k({enableMoveAllGraphics:!1,highlightsEnabled:!1,indicatorsEnabled:!1,view:this.view,graphics:t,callbacks:{onGraphicClick:t=>this._onGraphicClickCallback(t),onGraphicMoveStart:t=>this._onGraphicMoveStartCallback(t),onGraphicMove:t=>this._onGraphicMoveCallback(t),onGraphicMoveStop:t=>this._onGraphicMoveStopCallback(t),onGraphicPointerOver:t=>this._onGraphicPointerOverCallback(t),onGraphicPointerOut:t=>this._onGraphicPointerOutCallback(t)}})}_getStartInfo(t){const[e,i,s,o]=this._getBoxBounds(m()),r=Math.abs(s-e),a=Math.abs(o-i),h=(s+e)/2,c=(o+i)/2,{x:n,y:l}=t.geometry;return{width:r,height:a,centerX:h,centerY:c,startX:n,startY:l,graphicInfos:this._getGraphicInfos(),box:this._backgroundGraphic.geometry,rotate:this._rotateHandleGraphic.geometry}}_getGraphicInfos(){return this.graphics.map((t=>this._getGraphicInfo(t)))}_getGraphicInfo(t){const e=t.geometry,[i,s,o,r]=this._getBounds(m(),[e]);return{width:Math.abs(o-i),height:Math.abs(r-s),centerX:(o+i)/2,centerY:(r+s)/2,geometry:e}}_onGraphicClickCallback(t){t.viewEvent.stopPropagation(),this.emit("graphic-click",t),this.callbacks.onGraphicClick&&this.callbacks.onGraphicClick(t)}_onGraphicMoveStartCallback(t){const{_angleOfRotation:e,_xScale:i,_yScale:s,_backgroundGraphic:o,_vertexGraphics:r,_rotateHandleGraphic:a,symbols:h}=this,c=t.graphic;this._resetGraphicStateVars(),this._hideGraphicsBeforeUpdate(),o.symbol=h.fill.active,this._startInfo=this._getStartInfo(c),this._updateTooltip(c,t.viewEvent),c===a?(this.view.cursor="grabbing",this.emit("rotate-start",new N(this.graphics,c,e))):r.includes(c)?(this._activeHandleGraphic=c,this.emit("scale-start",new P(this.graphics,c,i,s))):this.emit("move-start",new z(this.graphics,c,t.dx,t.dy))}_onGraphicMoveCallback(t){const e=t.graphic;if(this._startInfo)if(this._vertexGraphics.includes(e))this._scaleGraphic(e),this._updateTooltip(e,t.viewEvent),this.emit("scale",new X(this.graphics,e,this._xScale,this._yScale));else if(e===this._rotateHandleGraphic)this._rotateGraphic(e),this._updateTooltip(e,t.viewEvent),this.emit("rotate",new U(this.graphics,e,this._angleOfRotation));else{const{dx:i,dy:s}=t;this._totalDx+=i,this._totalDy+=s,this._moveGraphic(e,i,s),this._updateTooltip(e,t.viewEvent),this.emit("move",new B(this.graphics,e,i,s))}}_onGraphicMoveStopCallback(t){const e=t.graphic;if(!this._startInfo)return void this.refresh();const{_angleOfRotation:i,_totalDx:s,_totalDy:o,_xScale:r,_yScale:a,_vertexGraphics:h,_rotateHandleGraphic:c}=this;this.refresh(),e===c?(this.view.cursor="pointer",this.emit("rotate-stop",new A(this.graphics,e,i))):h.includes(e)?this.emit("scale-stop",new F(this.graphics,e,r,a)):this.emit("move-stop",new Y(this.graphics,e,s,o))}_onGraphicPointerOverCallback(t){const{_backgroundGraphic:e,_vertexGraphics:i,graphics:s,_rotateHandleGraphic:o,symbols:r,view:a}=this,h=t.graphic;if(this._hoveredGraphic=h,h===o)return o.symbol=r.rotator.hover,a.cursor="pointer",void this._updateTooltip(h);if(s.includes(h)||h===e)return void(a.cursor="move");if(!i.includes(h))return void(a.cursor="pointer");this._updateTooltip(h),t.graphic.symbol=r.handles.hover;const c=a.rotation;let n,l=t.index;switch(l<8&&(c>=0&&c<45?l%=8:l=c>=45&&c<90?(l+1)%8:c>=90&&c<135?(l+2)%8:c>=135&&c<180?(l+3)%8:c>=180&&c<225?(l+4)%8:c>=225&&c<270?(l+5)%8:c>=270&&c<315?(l+6)%8:(l+7)%8),l){case 0:case 4:n="nwse-resize";break;case 1:case 5:n="ns-resize";break;case 2:case 6:n="nesw-resize";break;case 3:case 7:n="ew-resize";break;default:n="pointer"}a.cursor=n}_onGraphicPointerOutCallback(t){const{_vertexGraphics:e,_rotateHandleGraphic:i,symbols:s,view:o}=this;this._hoveredGraphic=null,t.graphic===i?i.symbol=s.rotator.default:e.includes(t.graphic)&&(t.graphic.symbol=s.handles.default),o.cursor="default",this._updateTooltip()}_scaleGraphic(t){const{_startInfo:e,_vertexGraphics:i,preserveAspectRatio:s,view:o}=this,{centerX:r,centerY:a,graphicInfos:h,height:c,startX:n,startY:l,width:_}=e,{resolution:d,transform:m}=o.state,u=i.indexOf(t);1!==u&&5!==u||this._updateX(t,r),3!==u&&7!==u||this._updateY(t,a);const{x:g,y}=t.geometry,v=m[0]*g+m[2]*y+m[4],f=m[1]*g+m[3]*y+m[5],G=h?.map((t=>t.geometry))??[],w=G.every((t=>"point"===t.type));if((0===_||0===c)&&w){const t=J((g-n)/d),i=J((l-y)/d);for(let e=0;e<G.length;e++)this.graphics[e].geometry=b(G[e],t,i,o,!0);return this._centerGraphic.geometry=new p(g,y,o.spatialReference),void(this._backgroundGraphic.geometry=b(e.box,t,i,o,!0))}if(s){const t=J(m[0]*r+m[2]*a+m[4],2),e=J(m[1]*r+m[3]*a+m[5],2),i=J(m[0]*n+m[2]*l+m[4],2),s=J(m[1]*n+m[3]*l+m[5],2);let o=S(t,e,i,s,v,f);0!==o&&Math.abs(o)!==1/0||(o=1),this._xScale=this._yScale=o;for(const h of G){const t=G.indexOf(h);this.graphics[t].geometry=x(h,this._xScale,this._yScale,[r,a])}this._updateBackgroundGraphic()}else{let t=g-n,i=l-y;if(1===u||5===u?t=0:3!==u&&7!==u||(i=0),0===t&&0===i)return;const s=r+t/2,h=a+i/2;let m=(_+(n>r?t:-1*t))/_,v=(c+(l<a?i:-1*i))/c;1!==u&&5!==u&&0!==m&&Math.abs(m)!==1/0||(m=1),3!==u&&7!==u&&0!==v&&Math.abs(v)!==1/0||(v=1),this._xScale=m,this._yScale=v;const f=(s-r)/d,w=(h-a)/d,S=x(e.box,this._xScale,this._yScale);this._backgroundGraphic.geometry=b(S,f,w,o,!0);const{centerX:k,centerY:R}=this._getGraphicInfo(this._backgroundGraphic),M=(k-r)/d,I=-1*(R-a)/d;for(const e of G){const t=G.indexOf(e),i=x(e,this._xScale,this._yScale,[r,a]);this.graphics[t].geometry=b(i,M,I,o,!0)}this._centerGraphic.geometry=new p(k,R,o.spatialReference)}}_rotateGraphic(t){const{centerX:e,centerY:i,startX:s,startY:o,box:r,rotate:a}=this._startInfo,h=this.view.spatialReference,c=new p(s,o,h),n=new p(e,i,h),l=t.geometry;this._angleOfRotation=w(c,l,n);const _=this._startInfo.graphicInfos?.map((t=>t.geometry))??[];for(const p of _){const t=_.indexOf(p),e=y(p,this._angleOfRotation,n);this.graphics[t].geometry=e}this._backgroundGraphic.geometry=y(r,this._angleOfRotation,n),this._rotateHandleGraphic.geometry=y(a,this._angleOfRotation,n)}_moveGraphic(t,e,i){if(this.graphics.includes(t)){const s=this._backgroundGraphic.geometry;this._backgroundGraphic.geometry=b(s,e,i,this.view);for(const o of this.graphics)o!==t&&(o.geometry=b(o.geometry,e,i,this.view))}else if(t===this._centerGraphic){const t=this._backgroundGraphic.geometry;this._backgroundGraphic.geometry=b(t,e,i,this.view)}if(t===this._backgroundGraphic||t===this._centerGraphic)for(const s of this.graphics)s.geometry=b(s.geometry,e,i,this.view)}_setUpHighlights(){this.highlightsEnabled&&this.graphics.length&&this._highlightHelper?.add(this.graphics)}_setupGraphics(){const{_graphicAttributes:t,symbols:i}=this;this._centerGraphic=new e({symbol:i.centerIndicator,attributes:t}),this.showCenterGraphic&&this.layer.add(this._centerGraphic),this._backgroundGraphic=new e({symbol:i.fill.default,attributes:t}),this.layer.add(this._backgroundGraphic),this._rotateLineGraphic=new e({symbol:i.rotatorLine,attributes:t}),this._rotateHandleGraphic=new e({symbol:i.rotator.default,attributes:t}),this.enableRotation&&!this._hasExtentGraphic()&&this.layer.addMany([this._rotateLineGraphic,this._rotateHandleGraphic]);for(let s=0;s<8;s++)this._vertexGraphics.push(new e({symbol:i.handles.default,attributes:t}));this.enableScaling&&this.layer.addMany(this._vertexGraphics)}_updateSymbolsForTheme(){const t=this.view.effectiveTheme.accentColor;this.symbols={...this.symbols,fill:{active:this.symbols.fill.active?.clone().set("outline.color",t),default:this.symbols.fill.default?.clone().set("outline.color",t)},handles:{...this.symbols.handles,default:this.symbols.handles.default.clone().set("outline.color",t)},rotator:{...this.symbols.rotator,default:this.symbols.rotator.default.clone().set("outline.color",t)},rotatorLine:this.symbols.rotatorLine.clone().set("color",t)};for(const e of this._vertexGraphics)e.symbol=e===this._hoveredGraphic?this.symbols.handles.hover:this.symbols.handles.default;this._backgroundGraphic.symbol=this.symbols.fill.default,this._rotateHandleGraphic.symbol=this._rotateHandleGraphic===this._hoveredGraphic?this.symbols.rotator.hover:this.symbols.rotator.default,this._rotateLineGraphic.symbol=this.symbols.rotatorLine}_updateGraphics(){this._updateBackgroundGraphic(),this._updateHandleGraphics(),this._updateCenterGraphic(),this._updateRotateGraphic(),this._updateRotateLineGraphic()}_hideGraphicsBeforeUpdate(){this._centerGraphic.visible=!1,this._rotateHandleGraphic.visible=!1,this._rotateLineGraphic.visible=!1,this._vertexGraphics.forEach((t=>t.visible=!1))}_updateHandleGraphics(){const t=this._getCoordinates(!0);this._vertexGraphics.forEach(((e,i)=>{const[s,o]=t[i];this._updateXY(e,s,o)}))}_updateBackgroundGraphic(){const t=this._getCoordinates().map((([t,e])=>[t,e]));this._backgroundGraphic.geometry=new _({rings:[t],spatialReference:this.view.spatialReference})}_updateCenterGraphic(){const[t,e,i,s]=this._getBoxBounds(m()),o=(i+t)/2,r=(s+e)/2;this._centerGraphic.geometry=new p(o,r,this.view.spatialReference)}_updateRotateGraphic(){if(!this._vertexGraphics.length)return;const{x:t,y:e}=this._vertexGraphics[1].geometry,i=e+this.view.state.resolution*this._rotateGraphicOffset;this._rotateHandleGraphic.geometry=new p(t,i,this.view.spatialReference)}_updateRotateLineGraphic(){if(!this._vertexGraphics.length||!this._rotateHandleGraphic?.geometry)return;const t=this._vertexGraphics[1].geometry,e=this._rotateHandleGraphic.geometry;this._rotateLineGraphic.geometry=new d({paths:[[[t.x,t.y],[e.x,e.y]]],spatialReference:this.view.spatialReference})}_updateXY(t,e,i){t.geometry=new p(e,i,this.view.spatialReference)}_updateX(t,e){const i=t.geometry.y;t.geometry=new p(e,i,this.view.spatialReference)}_updateY(t,e){const i=t.geometry.x;t.geometry=new p(i,e,this.view.spatialReference)}_hasExtentGraphic(){return this.graphics.some((t=>null!=t?.geometry&&"extent"===t.geometry.type))}_getBoxBounds(t){const e=this.graphics.map((t=>t.geometry));return this._getBounds(t,e)}_getCoordinates(t){const[e,i,s,o]=this._getBoxBounds(m());if(t){const t=(e+s)/2,r=(o+i)/2;return[[e,o],[t,o],[s,o],[s,r],[s,i],[t,i],[e,i],[e,r]]}return[[e,o],[s,o],[s,i],[e,i]]}_updateTooltip(t,e){if(null==this.tooltip)return;if(!t)return void this.tooltip.clear();const{_backgroundGraphic:i,graphics:s,_vertexGraphics:o,_rotateHandleGraphic:r}=this;t===r?this._updateRotateTooltip():o.includes(t)?this._updateScaleTooltip():(s.includes(t)||t===i)&&this._updateMoveTooltip(e)}_updateRotateTooltip(){null!=this.tooltip&&(this.tooltip.info=new O({sketchOptions:this.sketchOptions,angle:-this._angleOfRotation}))}_updateScaleTooltip(){const{tooltip:t,_xScale:e,_yScale:i,sketchOptions:s,view:o}=this;if(null==t)return;const r=this._getCoordinates(),a=L({topLeft:r[0],topRight:r[1],bottomRight:r[2],bottomLeft:r[3],spatialReference:o.spatialReference});if(null==a)return;const{xSize:h,ySize:c}=a,n=Math.abs(e),l=Math.abs(i);t.info=new j({sketchOptions:s,xScale:n,yScale:l,xSize:h,ySize:c})}_updateMoveTooltip(t){const{tooltip:e,sketchOptions:i,view:s}=this;if(null==e)return;const r=new T({sketchOptions:i});if(t){const{x:e,y:i}=t.origin,a=s.toMap(t),h=s.toMap({x:e,y:i}),c=E(h,a);r.distance=null!=c?c:o}e.info=r}};function J(t,e=2){return Number.parseFloat(t.toFixed(e))}t([n()],q.prototype,"tooltip",void 0),t([n({readOnly:!0})],q.prototype,"type",void 0),t([n()],q.prototype,"callbacks",void 0),t([n()],q.prototype,"enableMovement",void 0),t([n()],q.prototype,"enableRotation",void 0),t([n()],q.prototype,"enableScaling",void 0),t([n()],q.prototype,"graphics",void 0),t([n()],q.prototype,"highlightsEnabled",void 0),t([n()],q.prototype,"layer",void 0),t([n()],q.prototype,"preserveAspectRatio",void 0),t([n()],q.prototype,"showCenterGraphic",void 0),t([n({readOnly:!0})],q.prototype,"state",null),t([n()],q.prototype,"symbols",void 0),t([n({type:C})],q.prototype,"sketchOptions",void 0),t([n({constructOnly:!0})],q.prototype,"view",void 0),q=t([l("esri.views.draw.support.Box")],q);const K=q;export{K as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{_ as i}from"../../../chunks/tslib.es6.js";import"../../../symbols.js";import t from"../../../core/Evented.js";import{clone as e}from"../../../core/lang.js";import{watch as s,when as r}from"../../../core/reactiveUtils.js";import{property as h}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import a from"../../../layers/GraphicsLayer.js";import{cloneMove as c}from"./drawUtils.js";import n from"./HighlightHelper.js";import{addUniqueLayer as l,findLayerView as p}from"./layerUtils.js";import{GraphicClickEvent as d,GraphicDoubleClickEvent as g,GraphicPointerDownEvent as v,GraphicPointerUpEvent as m,GraphicPointerOutEvent as _,GraphicMoveStartEvent as y,GraphicMoveEvent as u,GraphicMoveStopEvent as f,GraphicPointerOverEvent as G}from"./input/GraphicMoverEvents.js";import{ViewEventPriorities as w}from"../../input/InputManager.js";import{GraphicManipulator as b}from"../../interactive/GraphicManipulator.js";import{createScreenPointFromEvent as k}from"../../support/screenUtils.js";import O from"../../../symbols/SimpleMarkerSymbol.js";import x from"../../../symbols/SimpleLineSymbol.js";import H from"../../../symbols/SimpleFillSymbol.js";const M="indicator-symbols";let E=class extends t.EventedAccessor{constructor(i){super(i),this._activeGraphic=null,this._dragEvent=null,this._hoverGraphic=null,this._indicators=[],this._initialDragGeometry=null,this._manipulators=[],this._layerViews=null,this.type="graphic-mover",this.callbacks={onGraphicClick(){},onGraphicDoubleClick(){},onGraphicMoveStart(){},onGraphicMove(){},onGraphicMoveStop(){},onGraphicPointerOver(){},onGraphicPointerOut(){},onGraphicPointerDown(){},onGraphicPointerUp(){}},this.enableMoveAllGraphics=!1,this.graphics=[],this.indicatorsEnabled=!1,this.layer=new a({listMode:"hide",internal:!0,title:"GraphicMover highlight layer"}),this.view=null}initialize(){l(this.view,this.layer),this._highlightHelper=new n({view:this.view}),this.refresh(),this.addHandles([s((()=>this.graphics.length),(()=>this.refresh())),r((()=>this.view?.ready),(()=>{this.addHandles([this.view.on("immediate-click",(i=>this._clickHandler(i)),w.TOOL),this.view.on("double-click",(i=>this._doubleClickHandler(i)),w.TOOL),this.view.on("pointer-down",(i=>this._pointerDownHandler(i)),w.TOOL),this.view.on("pointer-move",(i=>this._pointerMoveHandler(i)),w.TOOL),this.view.on("pointer-up",(i=>this._pointerUpHandler(i)),w.TOOL),this.view.on("drag",(i=>this._dragHandler(i)),w.TOOL),this.view.on("key-down",(i=>this._keyDownHandler(i)),w.TOOL)])}),{once:!0,initial:!0}),s((()=>this.view),(i=>{this._highlightHelper.removeAll(),this._highlightHelper.view=i}))])}destroy(){this._removeIndicators(),this.view.map?.remove(this.layer),this.layer.destroy(),this.reset(),this._manipulators.forEach((i=>i.destroy())),this._manipulators=null}set highlightsEnabled(i){this._highlightHelper?.removeAll(),this._set("highlightsEnabled",i),i&&this._highlightHelper?.add(this.graphics)}get state(){const i=this.view.ready,t=this.graphics.length>0,e=this._activeGraphic;return i&&t?e?"moving":"active":i?"ready":"disabled"}refresh(){this.reset(),this._setup()}reset(){this._activeGraphic=null,this._hoverGraphic=null,this._dragEvent=null,this._highlightHelper.removeAll()}updateGeometry(i,t){const e=this.graphics[i];e&&(e.set("geometry",t),this._setUpIndicators())}_setup(){this._setUpHighlights(),this._setUpIndicators(),this._setUpManipulators(),this._syncLayerViews()}_clickHandler(i){const t=this._findTargetGraphic(k(i));if(t){const e=new d(t,this.graphics.indexOf(t),i.x,i.y,i);this.emit("graphic-click",e),this.callbacks.onGraphicClick&&this.callbacks.onGraphicClick(e)}}_doubleClickHandler(i){const t=this._findTargetGraphic(k(i));if(t){const e=new g(t,this.graphics.indexOf(t),i.x,i.y,i);this.emit("graphic-double-click",e),this.callbacks.onGraphicDoubleClick&&this.callbacks.onGraphicDoubleClick(e)}}_pointerDownHandler(i){const t=this._findTargetGraphic(k(i));if(t){this._activeGraphic=t;const{x:e,y:s}=i,r=new v(t,this.graphics.indexOf(t),e,s,i);this.emit("graphic-pointer-down",r),this.callbacks.onGraphicPointerDown&&this.callbacks.onGraphicPointerDown(r)}else this._activeGraphic=null}_pointerUpHandler(i){if(this._activeGraphic){const{x:t,y:e}=i,s=this.graphics.indexOf(this._activeGraphic),r=new m(this._activeGraphic,s,t,e,i);this.emit("graphic-pointer-up",r),this.callbacks.onGraphicPointerUp&&this.callbacks.onGraphicPointerUp(r)}}_pointerMoveHandler(i){if(this._dragEvent)return;const t=this._findTargetGraphic(k(i));if(t){const{x:e,y:s}=i;if(this._hoverGraphic){if(this._hoverGraphic===t)return;const r=this.graphics.indexOf(this._hoverGraphic),h=new _(this.graphics[r],r,e,s,i);this._hoverGraphic=null,this.emit("graphic-pointer-out",h),this.callbacks.onGraphicPointerOut&&this.callbacks.onGraphicPointerOut(h)}const r=this.graphics.indexOf(t),h=new G(t,r,e,s,i);return this._hoverGraphic=t,this.emit("graphic-pointer-over",h),void(this.callbacks.onGraphicPointerOver&&this.callbacks.onGraphicPointerOver(h))}if(this._hoverGraphic){const{x:t,y:e}=i,s=this.graphics.indexOf(this._hoverGraphic),r=new _(this.graphics[s],s,t,e,i);this._hoverGraphic=null,this.emit("graphic-pointer-out",r),this.callbacks.onGraphicPointerOut&&this.callbacks.onGraphicPointerOut(r)}}_dragHandler(i){if("start"!==i.action&&!this._dragEvent||!this._activeGraphic?.geometry)return;"start"===i.action&&this._removeIndicators(),i.stopPropagation();const{action:t,x:s,y:r}=i,h=this.graphics.indexOf(this._activeGraphic),o=this._dragEvent?s-this._dragEvent.x:0,a=this._dragEvent?r-this._dragEvent.y:0,n=s-i.origin.x,l=r-i.origin.y,p="start"===t?this._activeGraphic.geometry:this._initialDragGeometry,d=c(p,n,l,this.view);if(this._activeGraphic.geometry=d,this.enableMoveAllGraphics&&this.graphics.forEach((i=>{i!==this._activeGraphic&&(i.geometry=c(i.geometry,o,a,this.view))})),this._dragEvent=i,"start"===t){this._initialDragGeometry=e(p);const t=new y(this._activeGraphic,this.graphics,h,s,r,o,a,n,l,i);this.emit("graphic-move-start",t),this.callbacks.onGraphicMoveStart&&this.callbacks.onGraphicMoveStart(t),t.defaultPrevented&&this._activeGraphic.set("geometry",p)}else if("update"===t){const t=new u(this._activeGraphic,this.graphics,h,s,r,o,a,n,l,i);this.emit("graphic-move",t),this.callbacks.onGraphicMove&&this.callbacks.onGraphicMove(t),t.defaultPrevented&&(this._activeGraphic.geometry=p)}else{const t=new f(this._activeGraphic,this.graphics,h,s,r,o,a,n,l,i);this._dragEvent=null,this._activeGraphic=null,this._setUpIndicators(),this.emit("graphic-move-stop",t),this.callbacks.onGraphicMoveStop&&this.callbacks.onGraphicMoveStop(t),t.defaultPrevented&&(this.graphics[h].set("geometry",this._initialDragGeometry),this._setUpIndicators()),this._initialDragGeometry=null}}_keyDownHandler(i){"a"!==i.key&&"d"!==i.key&&"n"!==i.key||"moving"!==this.state||i.stopPropagation()}_findTargetGraphic(i){const t=this.view.toMap(i),e=this.graphics;let s=null,r=Number.MAX_VALUE;this._syncLayerViews();const h=this._layerViews.flatMap((i=>"graphicsViews"in i?Array.from(i.graphicsViews(),(i=>i.hitTest(t))).flat():i.graphicsView.hitTest(t))).filter((i=>e.includes(i))).sort(((i,t)=>e.indexOf(i)-e.indexOf(t)));return h.length?h[0]:(this._manipulators.forEach((t=>{const e=t.intersectionDistance(i);null!=e&&e<r&&(r=e,s=t.graphic)})),s)}_syncLayerViews(){this._layerViews=[];const i=new Set;for(const t of this.graphics){const e=p(this.view,t.layer);e&&i.add(e)}this._layerViews=[...i]}_setUpManipulators(){const{graphics:i,view:t}=this;this._manipulators.forEach((i=>i.destroy())),this._manipulators=i.length?i.map((i=>new b({graphic:i,view:t}))):[]}_setUpHighlights(){this.highlightsEnabled&&this._highlightHelper.add(this.graphics)}_setUpIndicators(){if(this._removeIndicators(),this.indicatorsEnabled){for(const i of this.graphics){const t=i.clone();t.symbol=j(i),this._indicators.push(t),this.addHandles(s((()=>i.symbol),(()=>this._setUpIndicators())),M)}this.layer.addMany(this._indicators)}}_removeIndicators(){this.removeHandles(M),this._indicators.length&&(this.layer.removeMany(this._indicators),this._indicators.forEach((i=>i.destroy())),this._indicators=[])}};function j(i){const t=12;if(null==i.symbol)return null;switch(i.symbol.type){case"cim":return new O({style:"circle",size:t,color:[0,0,0,0],outline:{color:[255,127,0,1],width:1}});case"picture-marker":{const{xoffset:t,yoffset:e,height:s,width:r}=i.symbol,h=s===r?r:Math.max(s,r);return new O({xoffset:t,yoffset:e,size:h,style:"square",color:[0,0,0,0],outline:{color:[255,127,0,1],width:1}})}case"simple-marker":{const{xoffset:t,yoffset:e,size:s,style:r}=i.symbol;return new O({xoffset:t,yoffset:e,style:"circle"===r?"circle":"square",size:s+2,color:[0,0,0,0],outline:{color:[255,127,0,1],width:1}})}case"simple-fill":return new H({color:[0,0,0,0],outline:{style:"dash",color:[255,127,0,1],width:1}});case"simple-line":return new x({color:[255,127,0,1],style:"dash",width:1});case"text":{const{xoffset:e,yoffset:s}=i.symbol;return new O({xoffset:e,yoffset:s,size:t,color:[0,0,0,0],outline:{color:[255,127,0,1],width:1}})}default:return null}}i([h()],E.prototype,"_activeGraphic",void 0),i([h({readOnly:!0})],E.prototype,"type",void 0),i([h()],E.prototype,"callbacks",void 0),i([h()],E.prototype,"enableMoveAllGraphics",void 0),i([h()],E.prototype,"graphics",void 0),i([h({value:!1})],E.prototype,"highlightsEnabled",null),i([h()],E.prototype,"indicatorsEnabled",void 0),i([h()],E.prototype,"layer",void 0),i([h({readOnly:!0})],E.prototype,"state",null),i([h()],E.prototype,"view",void 0),E=i([o("esri.views.draw.support.GraphicMover")],E);const U=E;export{U as default};
5
+ import{_ as i}from"../../../chunks/tslib.es6.js";import t from"../../../core/Evented.js";import{clone as e}from"../../../core/lang.js";import{watch as s,when as r}from"../../../core/reactiveUtils.js";import{property as h}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import a from"../../../layers/GraphicsLayer.js";import c from"../../../symbols/SimpleFillSymbol.js";import n from"../../../symbols/SimpleLineSymbol.js";import l from"../../../symbols/SimpleMarkerSymbol.js";import{cloneMove as p}from"./drawUtils.js";import d from"./HighlightHelper.js";import{addUniqueLayer as g,findLayerView as v}from"./layerUtils.js";import{GraphicClickEvent as m,GraphicDoubleClickEvent as _,GraphicPointerDownEvent as y,GraphicPointerUpEvent as u,GraphicPointerOutEvent as f,GraphicMoveStartEvent as G,GraphicMoveEvent as w,GraphicMoveStopEvent as b,GraphicPointerOverEvent as k}from"./input/GraphicMoverEvents.js";import{ViewEventPriorities as O}from"../../input/InputManager.js";import{GraphicManipulator as x}from"../../interactive/GraphicManipulator.js";import{createScreenPointFromEvent as H}from"../../support/screenUtils.js";const M="indicator-symbols";let E=class extends t.EventedAccessor{constructor(i){super(i),this._activeGraphic=null,this._dragEvent=null,this._hoverGraphic=null,this._indicators=[],this._initialDragGeometry=null,this._manipulators=[],this._layerViews=null,this.type="graphic-mover",this.callbacks={onGraphicClick(){},onGraphicDoubleClick(){},onGraphicMoveStart(){},onGraphicMove(){},onGraphicMoveStop(){},onGraphicPointerOver(){},onGraphicPointerOut(){},onGraphicPointerDown(){},onGraphicPointerUp(){}},this.enableMoveAllGraphics=!1,this.graphics=[],this.indicatorsEnabled=!1,this.layer=new a({listMode:"hide",internal:!0,title:"GraphicMover highlight layer"}),this.view=null}initialize(){g(this.view,this.layer),this._highlightHelper=new d({view:this.view}),this.refresh(),this.addHandles([s((()=>this.graphics.length),(()=>this.refresh())),r((()=>this.view?.ready),(()=>{this.addHandles([this.view.on("immediate-click",(i=>this._clickHandler(i)),O.TOOL),this.view.on("double-click",(i=>this._doubleClickHandler(i)),O.TOOL),this.view.on("pointer-down",(i=>this._pointerDownHandler(i)),O.TOOL),this.view.on("pointer-move",(i=>this._pointerMoveHandler(i)),O.TOOL),this.view.on("pointer-up",(i=>this._pointerUpHandler(i)),O.TOOL),this.view.on("drag",(i=>this._dragHandler(i)),O.TOOL),this.view.on("key-down",(i=>this._keyDownHandler(i)),O.TOOL)])}),{once:!0,initial:!0}),s((()=>this.view),(i=>{this._highlightHelper.removeAll(),this._highlightHelper.view=i}))])}destroy(){this._removeIndicators(),this.view.map?.remove(this.layer),this.layer.destroy(),this.reset(),this._manipulators.forEach((i=>i.destroy())),this._manipulators=null}set highlightsEnabled(i){this._highlightHelper?.removeAll(),this._set("highlightsEnabled",i),i&&this._highlightHelper?.add(this.graphics)}get state(){const i=this.view.ready,t=this.graphics.length>0,e=this._activeGraphic;return i&&t?e?"moving":"active":i?"ready":"disabled"}refresh(){this.reset(),this._setup()}reset(){this._activeGraphic=null,this._hoverGraphic=null,this._dragEvent=null,this._highlightHelper.removeAll()}updateGeometry(i,t){const e=this.graphics[i];e&&(e.set("geometry",t),this._setUpIndicators())}_setup(){this._setUpHighlights(),this._setUpIndicators(),this._setUpManipulators(),this._syncLayerViews()}_clickHandler(i){const t=this._findTargetGraphic(H(i));if(t){const e=new m(t,this.graphics.indexOf(t),i.x,i.y,i);this.emit("graphic-click",e),this.callbacks.onGraphicClick&&this.callbacks.onGraphicClick(e)}}_doubleClickHandler(i){const t=this._findTargetGraphic(H(i));if(t){const e=new _(t,this.graphics.indexOf(t),i.x,i.y,i);this.emit("graphic-double-click",e),this.callbacks.onGraphicDoubleClick&&this.callbacks.onGraphicDoubleClick(e)}}_pointerDownHandler(i){const t=this._findTargetGraphic(H(i));if(t){this._activeGraphic=t;const{x:e,y:s}=i,r=new y(t,this.graphics.indexOf(t),e,s,i);this.emit("graphic-pointer-down",r),this.callbacks.onGraphicPointerDown&&this.callbacks.onGraphicPointerDown(r)}else this._activeGraphic=null}_pointerUpHandler(i){if(this._activeGraphic){const{x:t,y:e}=i,s=this.graphics.indexOf(this._activeGraphic),r=new u(this._activeGraphic,s,t,e,i);this.emit("graphic-pointer-up",r),this.callbacks.onGraphicPointerUp&&this.callbacks.onGraphicPointerUp(r)}}_pointerMoveHandler(i){if(this._dragEvent)return;const t=this._findTargetGraphic(H(i));if(t){const{x:e,y:s}=i;if(this._hoverGraphic){if(this._hoverGraphic===t)return;const r=this.graphics.indexOf(this._hoverGraphic),h=new f(this.graphics[r],r,e,s,i);this._hoverGraphic=null,this.emit("graphic-pointer-out",h),this.callbacks.onGraphicPointerOut&&this.callbacks.onGraphicPointerOut(h)}const r=this.graphics.indexOf(t),h=new k(t,r,e,s,i);return this._hoverGraphic=t,this.emit("graphic-pointer-over",h),void(this.callbacks.onGraphicPointerOver&&this.callbacks.onGraphicPointerOver(h))}if(this._hoverGraphic){const{x:t,y:e}=i,s=this.graphics.indexOf(this._hoverGraphic),r=new f(this.graphics[s],s,t,e,i);this._hoverGraphic=null,this.emit("graphic-pointer-out",r),this.callbacks.onGraphicPointerOut&&this.callbacks.onGraphicPointerOut(r)}}_dragHandler(i){if("start"!==i.action&&!this._dragEvent||!this._activeGraphic?.geometry)return;"start"===i.action&&this._removeIndicators(),i.stopPropagation();const{action:t,x:s,y:r}=i,h=this.graphics.indexOf(this._activeGraphic),o=this._dragEvent?s-this._dragEvent.x:0,a=this._dragEvent?r-this._dragEvent.y:0,c=s-i.origin.x,n=r-i.origin.y,l="start"===t?this._activeGraphic.geometry:this._initialDragGeometry,d=p(l,c,n,this.view);if(this._activeGraphic.geometry=d,this.enableMoveAllGraphics&&this.graphics.forEach((i=>{i!==this._activeGraphic&&(i.geometry=p(i.geometry,o,a,this.view))})),this._dragEvent=i,"start"===t){this._initialDragGeometry=e(l);const t=new G(this._activeGraphic,this.graphics,h,s,r,o,a,c,n,i);this.emit("graphic-move-start",t),this.callbacks.onGraphicMoveStart&&this.callbacks.onGraphicMoveStart(t),t.defaultPrevented&&this._activeGraphic.set("geometry",l)}else if("update"===t){const t=new w(this._activeGraphic,this.graphics,h,s,r,o,a,c,n,i);this.emit("graphic-move",t),this.callbacks.onGraphicMove&&this.callbacks.onGraphicMove(t),t.defaultPrevented&&(this._activeGraphic.geometry=l)}else{const t=new b(this._activeGraphic,this.graphics,h,s,r,o,a,c,n,i);this._dragEvent=null,this._activeGraphic=null,this._setUpIndicators(),this.emit("graphic-move-stop",t),this.callbacks.onGraphicMoveStop&&this.callbacks.onGraphicMoveStop(t),t.defaultPrevented&&(this.graphics[h].set("geometry",this._initialDragGeometry),this._setUpIndicators()),this._initialDragGeometry=null}}_keyDownHandler(i){"a"!==i.key&&"d"!==i.key&&"n"!==i.key||"moving"!==this.state||i.stopPropagation()}_findTargetGraphic(i){const t=this.view.toMap(i),e=this.graphics;let s=null,r=Number.MAX_VALUE;this._syncLayerViews();const h=this._layerViews.flatMap((i=>"graphicsViews"in i?Array.from(i.graphicsViews(),(i=>i.hitTest(t))).flat():i.graphicsView.hitTest(t))).filter((i=>e.includes(i))).sort(((i,t)=>e.indexOf(i)-e.indexOf(t)));return h.length?h[0]:(this._manipulators.forEach((t=>{const e=t.intersectionDistance(i);null!=e&&e<r&&(r=e,s=t.graphic)})),s)}_syncLayerViews(){this._layerViews=[];const i=new Set;for(const t of this.graphics){const e=v(this.view,t.layer);e&&i.add(e)}this._layerViews=[...i]}_setUpManipulators(){const{graphics:i,view:t}=this;this._manipulators.forEach((i=>i.destroy())),this._manipulators=i.length?i.map((i=>new x({graphic:i,view:t}))):[]}_setUpHighlights(){this.highlightsEnabled&&this._highlightHelper.add(this.graphics)}_setUpIndicators(){if(this._removeIndicators(),this.indicatorsEnabled){for(const i of this.graphics){const t=i.clone();t.symbol=U(i),this._indicators.push(t),this.addHandles(s((()=>i.symbol),(()=>this._setUpIndicators())),M)}this.layer.addMany(this._indicators)}}_removeIndicators(){this.removeHandles(M),this._indicators.length&&(this.layer.removeMany(this._indicators),this._indicators.forEach((i=>i.destroy())),this._indicators=[])}};function U(i){const t=12;if(null==i.symbol)return null;switch(i.symbol.type){case"cim":return new l({style:"circle",size:t,color:[0,0,0,0],outline:{color:[255,127,0,1],width:1}});case"picture-marker":{const{xoffset:t,yoffset:e,height:s,width:r}=i.symbol,h=s===r?r:Math.max(s,r);return new l({xoffset:t,yoffset:e,size:h,style:"square",color:[0,0,0,0],outline:{color:[255,127,0,1],width:1}})}case"simple-marker":{const{xoffset:t,yoffset:e,size:s,style:r}=i.symbol;return new l({xoffset:t,yoffset:e,style:"circle"===r?"circle":"square",size:s+2,color:[0,0,0,0],outline:{color:[255,127,0,1],width:1}})}case"simple-fill":return new c({color:[0,0,0,0],outline:{style:"dash",color:[255,127,0,1],width:1}});case"simple-line":return new n({color:[255,127,0,1],style:"dash",width:1});case"text":{const{xoffset:e,yoffset:s}=i.symbol;return new l({xoffset:e,yoffset:s,size:t,color:[0,0,0,0],outline:{color:[255,127,0,1],width:1}})}default:return null}}i([h()],E.prototype,"_activeGraphic",void 0),i([h({readOnly:!0})],E.prototype,"type",void 0),i([h()],E.prototype,"callbacks",void 0),i([h()],E.prototype,"enableMoveAllGraphics",void 0),i([h()],E.prototype,"graphics",void 0),i([h({value:!1})],E.prototype,"highlightsEnabled",null),i([h()],E.prototype,"indicatorsEnabled",void 0),i([h()],E.prototype,"layer",void 0),i([h({readOnly:!0})],E.prototype,"state",null),i([h()],E.prototype,"view",void 0),E=i([o("esri.views.draw.support.GraphicMover")],E);const j=E;export{j as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import"../../../geometry.js";import t from"../../../Graphic.js";import{createTask as i}from"../../../core/asyncUtils.js";import s from"../../../core/Collection.js";import o from"../../../core/Error.js";import r from"../../../core/Evented.js";import n from"../../../core/Logger.js";import{destroyMaybe as h,assertIsSome as a,abortMaybe as p}from"../../../core/maybe.js";import{pausable as c,when as l,watch as d,sync as m,initial as v}from"../../../core/reactiveUtils.js";import{property as y}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as _}from"../../../core/accessorSupport/decorators/subclass.js";import{closeRingsAndFixWinding as g,getMidpoint as u,geometryToCoordinates as f}from"../../../geometry/support/coordsUtils.js";import x from"../../../layers/GraphicsLayer.js";import G from"../../../symbols/SimpleMarkerSymbol.js";import{ViewingMode as b}from"../../ViewingMode.js";import{SnappingVisualizer2D as V}from"../../2d/interactive/SnappingVisualizer2D.js";import{cloneMove as M}from"./drawUtils.js";import S from"./GraphicMover.js";import w from"./HighlightHelper.js";import{addUniqueLayer as E}from"./layerUtils.js";import{createTooltipInfos as I,connectTooltip as O,updateTranslateTooltipInfo as k,updateTranslateVertexTooltipInfo as T}from"./reshapeTooltipUtils.js";import{settings as C}from"./settings.js";import{ViewEventPriorities as H}from"../../input/InputManager.js";import{createCoordinateHelper as j}from"../../interactive/coordinateHelper.js";import{sketchKeys as R}from"../../interactive/keybindings.js";import{EditGeometryOperations as A}from"../../interactive/editGeometry/EditGeometryOperations.js";import U from"../../interactive/sketch/SketchOptions.js";import{SnappingContext as L}from"../../interactive/snapping/SnappingContext.js";import{makeTooltip as z,enterInputModeIfAvailable as D}from"../../interactive/tooltip/tooltipCommonUtils.js";import F from"../../../geometry/Polyline.js";import P from"../../../geometry/Point.js";class Z{constructor(e,t,i){this.graphic=e,this.mover=t,this.selected=i,this.type="reshape-start"}}class X{constructor(e,t,i){this.graphic=e,this.mover=t,this.selected=i,this.type="reshape"}}class Y{constructor(e,t,i){this.graphic=e,this.mover=t,this.selected=i,this.type="reshape-stop"}}class K{constructor(e,t,i){this.mover=e,this.dx=t,this.dy=i,this.type="move-start"}}class N{constructor(e,t,i){this.mover=e,this.dx=t,this.dy=i,this.type="move"}}class q{constructor(e,t,i){this.mover=e,this.dx=t,this.dy=i,this.type="move-stop"}}class B{constructor(e){this.added=e,this.type="vertex-select"}}class J{constructor(e){this.removed=e,this.type="vertex-deselect"}}class Q{constructor(e,t,i,s){this.added=e,this.graphic=t,this.oldGraphic=i,this.vertices=s,this.type="vertex-add"}}class W{constructor(e,t,i,s){this.removed=e,this.graphic=t,this.oldGraphic=i,this.vertices=s,this.type="vertex-remove"}}const $=C.reshapeGraphics,ee={vertices:{default:new G({style:"circle",size:$.vertex.size,color:$.vertex.color,outline:{color:$.vertex.outlineColor,width:1}}),hover:new G({style:"circle",size:$.vertex.hoverSize,color:$.vertex.hoverColor,outline:{color:$.vertex.hoverOutlineColor,width:1}}),selected:new G({style:"circle",size:$.selected.size,color:$.selected.color,outline:{color:$.selected.outlineColor,width:1}})},midpoints:{default:new G({style:"circle",size:$.midpoint.size,color:$.midpoint.color,outline:{color:$.midpoint.outlineColor,width:1}}),hover:new G({style:"circle",size:$.midpoint.size,color:$.midpoint.color,outline:{color:$.midpoint.outlineColor,width:1}})}};let te=class extends r.EventedAccessor{constructor(e){super(e),this._updateHandlesOnExternalGeometryChange=null,this._activeOperationInfo=null,this._editGeometryOperations=null,this._graphicAttributes={esriSketchTool:"box"},this._mover=null,this._snappingContext=null,this._snappingGraphicsLayer=null,this._hoverGraphic=null,this._snappingTask=null,this._stagedVertex=null,this.tooltip=null,this.activeTooltipInfo=null,this.callbacks={onReshapeStart(){},onReshape(){},onReshapeStop(){},onMoveStart(){},onMove(){},onMoveStop(){},onGraphicClick(){}},this.enableMidpoints=!0,this.enableMovement=!0,this.enableVertices=!0,this.graphic=null,this.layer=null,this.midpointGraphics=new s,this.midpointSymbol=new G({style:"circle",size:6,color:[200,200,200],outline:{color:[100,100,100],width:1}}),this.selectedVertices=new s,this.snappingManager=null,this.symbols=ee,this.sketchOptions=new U,this.type="reshape",this.vertexGraphics=new s,this.view=null}initialize(){const e=this.view;this._highlightHelper=new w({view:e}),this._setup(),this._updateHandlesOnExternalGeometryChange=c((()=>this.graphic?.geometry),(e=>{if(!e)return;const t=new Set(this.selectedVertices.map((e=>e.attributes?.pointIndex)));this._highlightHelper.removeAll(),this._setUpHighlights(),this._setupGraphics(),this._clearSelection(),this.vertexGraphics.filter((e=>t.has(e.attributes.pointIndex))).forEach((e=>this._addToSelection(e)));const{enableMovement:i,_mover:s,graphic:o,midpointGraphics:r,vertexGraphics:n}=this,h=n.concat(r).items;i&&h.push(o),s?.set("graphics",h)}),m),this.tooltip=z((()=>({view:e,options:this.sketchOptions.tooltips}))),this.tooltipInfos=I(this.sketchOptions),this.addHandles([l((()=>e?.ready),(()=>{const{layer:e,view:t}=this;E(t,e),this.addHandles(t.on("key-down",(e=>this._keyDownHandler(e)),H.TOOL))}),{once:!0,initial:!0}),d((()=>this.graphic),(()=>this.refresh())),d((()=>this.layer),((e,t)=>{t&&(this._clearSelection(),this._resetGraphics(t)),this.refresh()})),d((()=>this.enableMidpoints),(()=>this.refresh())),O(this.tooltip,(()=>this._tooltipsContext)),d((()=>this.view.effectiveTheme.accentColor),(()=>this._updateSymbolsForTheme()),v),this._updateHandlesOnExternalGeometryChange]),this._updateTooltip()}destroy(){this._reset(),this._mover?.destroy(),this._mover=null,this.tooltip=h(this.tooltip)}get _coordinateHelper(){return this._editGeometryOperations?.data.coordinateHelper??j(!!this.graphic.geometry?.hasZ,!!this.graphic.geometry?.hasM,this.view.spatialReference)}get _selectedVertex(){return 1===this.selectedVertices.length?this.selectedVertices.at(0):void 0}get _tooltipsContext(){return{sketchOptions:this.sketchOptions,activeTooltipInfo:this.activeTooltipInfo,graphic:this.graphic,selectedVertex:this._selectedVertex,updateGeometry:(e,t,i,s,o)=>{this._setUpGeometryHelper();const r=e===this.graphic;r?this._emitMoveStartEvent(0,0):this._emitReshapeStartEvent(e);const n=!0;if(this._syncGeometryAfterVertexMove(e,t,s,o,n),r){const{view:e}=this,s=e.toScreen(i),o=e.toScreen(t),r=(o?.x??0)-(s?.x??0),n=(o?.y??0)-(s?.y??0);this._emitMoveEvent(r,n),this._emitMoveStopEvent(r,n)}else this._emitReshapeEvent(e),this._emitReshapeStopEvent(e);this._editGeometryOperations=h(this._editGeometryOperations)}}}set highlightsEnabled(e){this._highlightHelper?.removeAll(),this._set("highlightsEnabled",e),this._setUpHighlights()}get state(){const e=this.view.ready,t=!(!this.graphic||!this.layer);return e&&t?"active":e?"ready":"disabled"}isUIGraphic(e){const t=[];return this.graphic&&t.push(this.graphic),t.concat(this.vertexGraphics.items,this.midpointGraphics.items),t.length>0&&t.includes(e)}refresh(){this._reset(),this._setup()}reset(){this.graphic=null}clearSelection(){this._clearSelection()}removeSelectedVertices(){const{selectedVertices:e}=this;e.length&&this._removeVertices(e)}_setup(){const{graphic:e,layer:t}=this;if(!t||null==e?.geometry)return;const i=e.geometry;"mesh"!==i.type&&"extent"!==i.type?("polygon"===i.type&&g(i),this._setUpHighlights(),this._setupGraphics(),this._setupMover()):this._logGeometryTypeError()}_setUpHighlights(){this.highlightsEnabled&&this.graphic&&this._highlightHelper?.add(this.graphic)}_setUpGeometryHelper(){const e=this.graphic.geometry;if(null==e||"mesh"===e.type||"extent"===e.type)return void this._logGeometryTypeError();const t="multipoint"===e.type?new F({paths:[e.points],spatialReference:e.spatialReference}):e;this._editGeometryOperations=A.fromGeometry(t,b.Local)}_saveSnappingContextForHandle(e,t){this._snappingGraphicsLayer=new x({listMode:"hide",internal:!0,title:"Reshape snapping layer"}),this.view.map.layers.add(this._snappingGraphicsLayer);const i=this._editGeometryOperations;a(i),this._snappingContext=new L({editGeometryOperations:i,elevationInfo:{mode:"on-the-ground",offset:0},pointer:t.viewEvent?.pointerType||"mouse",excludeFeature:this.graphic,feature:this.graphic,visualizer:new V(this._snappingGraphicsLayer),vertexHandle:this._getVertexFromEditGeometry(e)})}_reset(){this._clearSelection(),this._highlightHelper?.removeAll(),this._updateTooltip(),this._resetGraphics(),this._resetSnappingStateVars(),this._activeOperationInfo=null,this._mover&&this._mover.destroy(),this._mover=null,this.view.cursor="default"}_resetSnappingStateVars(){null!=this.snappingManager&&this.snappingManager.doneSnapping(),null!=this._snappingGraphicsLayer&&(this.view?.map&&this.view.map.layers.remove(this._snappingGraphicsLayer),this._snappingGraphicsLayer.destroy()),this._editGeometryOperations=h(this._editGeometryOperations),this._snappingTask=p(this._snappingTask),this._snappingTask=null,this._snappingContext=null,this._stagedVertex=null}_resetGraphics(e){this._removeMidpointGraphics(e),this._removeVertexGraphics(e),this.selectedVertices.removeAll(),this._updateTooltip()}_removeMidpointGraphics(e){const t=e||this.layer;t&&t.removeMany(this.midpointGraphics.items),this.midpointGraphics.items.forEach((e=>e.destroy())),this.midpointGraphics.removeAll()}_removeVertexGraphics(e){const t=e||this.layer;t&&t.removeMany(this.vertexGraphics.items),this.vertexGraphics.items.forEach((e=>e.destroy())),this.vertexGraphics.removeAll()}_setupGraphics(){const e=this.graphic.geometry;if(null!=e&&("polyline"===e.type||"polygon"===e.type)){const t=ie(e);this.enableMidpoints&&this._setUpMidpointGraphics(t),this.enableVertices&&this._setUpVertexGraphics(t)}}_setUpMidpointGraphics(e){this._removeMidpointGraphics();const t=this._createMidpointGraphics(e);this.midpointGraphics.addMany(t),this.layer.addMany(t)}_setUpVertexGraphics(e){this._removeVertexGraphics();const t=this._createVertexGraphics(e);this.vertexGraphics.addMany(t),this._storeRelatedVertexIndices(),this.layer.addMany(t)}_createVertexGraphics(e){const{_graphicAttributes:i,symbols:s}=this,o=[];return e?.forEach(((e,r)=>{e.forEach(((e,n)=>{o.push(new t({geometry:this._coordinateHelper.arrayToPoint(e),symbol:s?.vertices?.default,attributes:{...i,pathIndex:r,pointIndex:n}}))}))})),o}_createMidpointGraphics(e){const{_graphicAttributes:i,symbols:s}=this,o=[];for(let r=0;r<e.length;r++){const n=e[r];for(let e=0;e<n.length;e++){const h=(e+1)%n.length;if("polyline"===this.graphic.geometry?.type&&0===h)continue;const a=n[e],p=n[h],c=this._getMidpoint(a,p);o.push(new t({geometry:c,symbol:s.midpoints.default,attributes:{...i,pathIndex:r,pointIndexStart:e,pointIndexEnd:h}}))}}return o}_updateSymbolsForTheme(){const e=this.view.effectiveTheme.accentColor;this.symbols={vertices:{...this.symbols.vertices,default:this.symbols.vertices.default.clone().set("color",e),hover:this.symbols.vertices.hover?.clone().set("color",e)},midpoints:{...this.symbols.midpoints}};for(const t of this.vertexGraphics)this._isSelected(t)?t.symbol=this.symbols.vertices.selected:this._hoverGraphic===t?t.symbol=this.symbols.vertices.hover:t.symbol=this.symbols.vertices.default}_storeRelatedVertexIndices(){const e=this.vertexGraphics.items;if(!e)return;const t=e.map((({geometry:e})=>({x:e.x,y:e.y})));for(let i=0;i<t.length;i++){const s=[];for(let e=0;e<t.length;e++){if(i===e)continue;const o=t[i],r=t[e];o.x===r.x&&o.y===r.y&&s.push(e)}e[i].attributes.relatedGraphicIndices=s}}_setupMover(){const{enableMovement:e,graphic:t,midpointGraphics:i,vertexGraphics:s,view:o}=this,r=s.concat(i).items;e&&r.push(t),this._mover=new S({enableMoveAllGraphics:!1,highlightsEnabled:!1,indicatorsEnabled:!1,graphics:r,view:o,callbacks:{onGraphicClick:e=>this._onGraphicClickCallback(e),onGraphicMoveStart:e=>this._onGraphicMoveStartCallback(e),onGraphicMove:e=>this._onGraphicMoveCallback(e),onGraphicMoveStop:e=>this._onGraphicMoveStopCallback(e),onGraphicPointerOver:e=>this._onGraphicPointerOverCallback(e),onGraphicPointerOut:e=>this._onGraphicPointerOutCallback(e)}})}_onGraphicClickCallback(e){e.viewEvent.stopPropagation();const t=e.graphic;if(t===this.graphic)this.clearSelection(),this.emit("graphic-click",e),this.callbacks.onGraphicClick?.(e);else if(this._isMidpoint(t)){if(2===e.viewEvent.button)return;const i=this.graphic.clone(),s=this._createVertexFromMidpoint(t);this.refresh(),this._emitVertexAddEvent([t],i,s)}else if(this._isVertex(t))if(e.viewEvent.stopPropagation(),2===e.viewEvent.button)this._removeVertices(t);else{e.viewEvent.native.shiftKey||this._clearSelection(),this.selectedVertices.includes(t)?this._removeFromSelection(t,!0):this._addToSelection(t)}}_setUpOperation(e){const{graphic:t,dx:i,dy:s}=e,o=t===this.graphic;this._resetSnappingStateVars(),this._setUpGeometryHelper(),this._saveSnappingContextForHandle(t,e),this._activeOperationInfo={target:this.graphic,mover:t,operationType:o?"move":"reshape",totalDx:i,totalDy:s}}_onGraphicMoveStartCallback(e){const{dx:t,dy:i,graphic:s}=e;if(s===this.graphic){const{geometry:o}=s;return this._setUpOperation(e),this._emitMoveStartEvent(t,i),void(null!=o&&"point"===o.type&&this._onHandleMove(s,t,i,e,(()=>{this._updateTooltip(this.graphic,e.viewEvent),this._emitMoveEvent(t,i)})))}if(!this.selectedVertices.includes(s)){if(this._clearSelection(),this._isMidpoint(s)){const e=this.graphic.clone(),t=this._createVertexFromMidpoint(s);this._emitVertexAddEvent([s],e,t)}this._addToSelection(s)}this._setUpOperation(e),this._emitReshapeStartEvent(s),this._onHandleMove(s,t,i,e,(()=>{this._updateTooltip(s,e.viewEvent),this._emitReshapeEvent(s)}))}_onGraphicMoveCallback(e){const t=this._activeOperationInfo;if(!t)return;const{dx:i,dy:s,graphic:o}=e;t.totalDx+=i,t.totalDy+=s;const{operationType:r}=t,{geometry:n}=o;if(null!=n)if("move"!==r)this._onHandleMove(o,i,s,e,(()=>{this._updateTooltip(o,e.viewEvent),this._emitReshapeEvent(o)}));else if("point"===n.type)this._onHandleMove(o,i,s,e,(()=>{this._updateTooltip(this.graphic,e.viewEvent),this._emitMoveEvent(i,s)}));else if("polyline"===n.type||"polygon"===n.type){const t=ie(n);this._updateVertexGraphicLocations(t),this._updateTooltip(this.graphic,e.viewEvent),this._emitMoveEvent(i,s)}}_onGraphicMoveStopCallback(e){const t=this._activeOperationInfo;if(!t)return;const{dx:i,dy:s,graphic:o}=e,{operationType:r}=t;t.totalDx+=i,t.totalDy+=s,this._onHandleMove(o,i,s,e,(()=>"move"===r?this._emitMoveStopEvent():this._emitReshapeStopEvent(o))),this._isMidpoint(o)?this.refresh():(this._updateTooltip(this._isVertex(o)?o:null),this._resetSnappingStateVars(),this._activeOperationInfo=null)}_updateVertexGraphicLocations(e){const{_coordinateHelper:t}=this;for(const i of this.vertexGraphics){const{pathIndex:s,pointIndex:o}=i.attributes;i.geometry=t.arrayToPoint(e[s][o])}this._updateMidpointGraphicLocations(e)}_updateMidpointGraphicLocations(e){for(const t of this.midpointGraphics){const{pathIndex:i,pointIndexStart:s,pointIndexEnd:o}=t.attributes,r=e[i];t.geometry=this._getMidpoint(r[s],r[o])}}_getMidpoint(e,t){const{_coordinateHelper:i}=this,s=i.arrayToVector(e),o=i.arrayToVector(t),r=i.toXYZ(s),n=i.toXYZ(o),[h,a,p]=u(r,n),c=i.hasM()?0:void 0;return new P({x:h,y:a,z:p,m:c,spatialReference:i.spatialReference})}_getVertexFromEditGeometry(e){const[t,i]=se(e);return a(this._editGeometryOperations),this._editGeometryOperations.data.components[t].vertices[i]}_onHandleMove(e,t,s,o,r){p(this._snappingTask);const n=this._snappingContext;if(!n)return;const h=e.geometry,a="graphic-move-stop"===o.type;if(null!=this.snappingManager&&this.selectedVertices.length<2&&!a){const o=this.snappingManager;this._stagedVertex=o.update({point:h,context:n}),this._syncGeometryAfterVertexMove(e,new P(this._stagedVertex),t,s,a),r(),this._snappingTask=i((async i=>{const p=await o.snap({point:h,context:n,signal:i});p.valid&&(this._stagedVertex=p.apply(),this._syncGeometryAfterVertexMove(e,new P(this._stagedVertex),t,s,a),r())}))}else{const i=null!=this._stagedVertex?new P(this._stagedVertex):h;this._syncGeometryAfterVertexMove(e,i,t,s,a),r()}}_syncGeometryAfterVertexMove(e,t,i,s,o=!1){const r=this._editGeometryOperations?.data.geometry;if(r)if("point"===r.type)e.geometry=t;else if("mesh"===r.type)e.geometry=r.centerAt(t);else{const{_coordinateHelper:n}=this,[h,a]=se(e);let p=f(r);const c=p[h].length-1,l=n.pointToArray(t);p[h][a]=l,"polygon"===r.type&&(0===a?p[h][c]=l:a===c&&(p[h][0]=l)),this._isVertex(e)&&(p=this._moveRelatedCoordinates(p,e,l),p=this._moveSelectedHandleCoordinates(p,e,i,s,"polygon"===r.type),this._updateMidpointGraphicLocations(p)),this._updateGraphicGeometry(r.clone());const d=n.pointToVector(t),m=this._getVertexFromEditGeometry(e),v=n.getZ(d),y=d[0]-m.pos[0],_=d[1]-m.pos[1],g=null!=v?v-m.pos[2]:0;this._editGeometryOperations?.moveVertices([m],y,_,g),o&&(this._mover?this._mover.updateGeometry(this._mover.graphics.indexOf(e),t):e.geometry=t)}}_moveRelatedCoordinates(e,t,i){const{relatedGraphicIndices:s}=t.attributes;for(const o of s){const s=this.vertexGraphics.at(o),{pathIndex:r,pointIndex:n}=s.attributes;e[r][n]=i,s.geometry=t.geometry}return e}_moveSelectedHandleCoordinates(e,t,i,s,o){for(const r of this.selectedVertices)if(r!==t){const{pathIndex:t,pointIndex:n,relatedGraphicIndices:h}=r.attributes,a=M(r.geometry,i,s,this.view),p=f(a),c=e[t].length-1;e[t][n]=p,r.geometry=a,o&&(0===n?e[t][c]=p:n===c&&(e[t][0]=p));for(const i of h){const t=this.vertexGraphics.at(i),{pathIndex:s,pointIndex:o}=t.attributes;e[s][o]=p,t.geometry=a}}return e}_onGraphicPointerOverCallback(e){const t=e.graphic;this._hoverGraphic=t;const i=this._isVertex(t);i&&!this._isSelected(t)&&(t.symbol=this.symbols.vertices.hover),this._updateTooltip(i?t:null),this._updateHoverCursor(t)}_onGraphicPointerOutCallback(e){const t=e.graphic;this._hoverGraphic=null,this._isVertex(t)&&!this._isSelected(t)&&(t.symbol=this.symbols.vertices.default),this.view.cursor="default",this._updateTooltip()}_createVertexFromMidpoint(e){const{_graphicAttributes:t,graphic:i}=this,s=i.geometry;if(null==s||"polygon"!==s.type&&"polyline"!==s.type)return[];const o=s.clone(),r=[],{pathIndex:n,pointIndexStart:h,pointIndexEnd:a}=e.attributes,p=f(e.geometry),c=0===a?h+1:a,l=f(o);return l[n].splice(c,0,p),e.attributes={...t,pathIndex:n,pointIndex:c,relatedGraphicIndices:[]},r.push({coordinates:l[n][c],componentIndex:n,vertexIndex:c}),this._updateGraphicGeometry(o),r}_addToSelection(e){const t=oe(e);for(const i of t)i.symbol=this.symbols.vertices.selected,this.selectedVertices.add(i),this._updateTooltip(i);this._emitSelectEvent(t)}_removeFromSelection(e,t){const{vertices:i}=this.symbols,s=t?i.hover:i.default;this.selectedVertices.remove(e),e.symbol=s,this._emitDeselectEvent([e]),this._updateTooltip()}_clearSelection(){const e=this.selectedVertices.toArray();if(e.length>0){for(const t of e)t.set("symbol",this.symbols.vertices.default);this.selectedVertices.removeAll(),this._emitDeselectEvent(e),this._updateTooltip()}}_keyDownHandler(e){null==this._activeOperationInfo&&D(e,this.tooltip)||R.delete.includes(e.key)&&!e.repeat&&this.selectedVertices.length&&this._removeVertices(this.selectedVertices)}_removeVertices(e){const t=this.graphic.geometry;if(null==t||"polygon"!==t.type&&"polyline"!==t.type)return;if("polygon"===t.type&&this.vertexGraphics.length<4||this.vertexGraphics.length<3)return;const i=this.graphic.clone(),s=t.clone();let o=f(s);const r=[],n=oe(e);for(const h of n){const{x:e,y:t}=h.geometry;for(let i=0;i<o.length;i++){const s=o[i];for(let n=0;n<s.length;n++){const[h,a]=s[n];e===h&&t===a&&(r.push({coordinates:o[i][n],componentIndex:i,vertexIndex:n}),o[i].splice(Number(n),1))}}}if("polygon"===s.type)o=o.filter((e=>{if(e.length<2)return!1;const[t,i]=e[0],[s,o]=e[e.length-1];return(2!==e.length||t!==s||i!==o)&&(t===s&&i===o||e.push(e[0]),!0)})),s.rings=o;else{for(const e of o)1===e.length&&o.splice(o.indexOf(e),1);s.paths=o}this._updateGraphicGeometry(s),this.refresh(),this._emitVertexRemoveEvent(n,i,r)}_isVertex(e){return this.vertexGraphics.includes(e)}_isSelected(e){return this._isVertex(e)&&this.selectedVertices.includes(e)}_isMidpoint(e){return this.midpointGraphics.includes(e)}_updateHoverCursor(e){this.view.cursor=this._isMidpoint(e)?"copy":"move"}_updateTooltip(e,t){let i=null;const{graphic:s,view:o,tooltipInfos:r}=this,n=s?.geometry;"point"===n?.type?i=r.movePoint:this._selectedVertex?i=r.selectedVertex:e===this.graphic?(i=r.translateGraphic,k(i,o,t)):e&&this.selectedVertices.length>1&&(i=r.translateVertices,T(i,o,n,t)),this.activeTooltipInfo=i}_updateGraphicGeometry(e){this._updateHandlesOnExternalGeometryChange?.pause(),this.graphic.geometry=e,this._updateHandlesOnExternalGeometryChange?.resume()}_emitMoveStartEvent(e,t){const i=new K(this.graphic,e,t);this.emit("move-start",i),this.callbacks.onMoveStart?.(i)}_emitMoveEvent(e,t){const i=new N(this.graphic,e,t);this.emit("move",i),this.callbacks.onMove?.(i)}_emitMoveStopEvent(e,t){if(null==e||null==t){const i=this._activeOperationInfo;if(!i)return;e=i.totalDx,t=i.totalDy}const i=new q(this.graphic,e,t);this.emit("move-stop",i),this.callbacks.onMoveStop?.(i)}_emitReshapeStartEvent(e){const t=new Z(this.graphic,e,this.selectedVertices.toArray());this.emit("reshape-start",t),this.callbacks.onReshapeStart?.(t)}_emitReshapeEvent(e){const t=new X(this.graphic,e,this.selectedVertices.toArray());this.emit("reshape",t),this.callbacks.onReshape?.(t)}_emitReshapeStopEvent(e){const t=new Y(this.graphic,e,this.selectedVertices.toArray());this.emit("reshape-stop",t),this.callbacks.onReshapeStop?.(t)}_emitSelectEvent(e){const t=new B(e);this.emit("select",t),this.callbacks.onVertexSelect?.(t)}_emitDeselectEvent(e){const t=new J(e);this.emit("deselect",t),this.callbacks.onVertexDeselect?.(t)}_emitVertexAddEvent(e,t,i){const s=new Q(e,this.graphic,t,i);this.emit("vertex-add",s),this.callbacks.onVertexAdd?.(s)}_emitVertexRemoveEvent(e,t,i){const s=new W(e,this.graphic,t,i);this.emit("vertex-remove",s),this.callbacks.onVertexRemove?.(s)}_logGeometryTypeError(){n.getLogger(this).error(new o("reshape:invalid-geometry","Reshape operation not supported for the provided graphic. The geometry type is not supported."))}};function ie(e){const t=f(e.clone());if("polygon"===e.type)for(const i of t){const e=i[i.length-1];i[0][0]===e[0]&&i[0][1]===e[1]&&i.length>2&&i.pop()}return t}function se({attributes:e}){return[e?.pathIndex||0,e?.pointIndex||0]}function oe(e){return e instanceof t?[e]:[...e]}e([y()],te.prototype,"_activeOperationInfo",void 0),e([y()],te.prototype,"_coordinateHelper",null),e([y()],te.prototype,"_editGeometryOperations",void 0),e([y()],te.prototype,"tooltip",void 0),e([y()],te.prototype,"tooltipInfos",void 0),e([y()],te.prototype,"activeTooltipInfo",void 0),e([y()],te.prototype,"_selectedVertex",null),e([y()],te.prototype,"_tooltipsContext",null),e([y()],te.prototype,"callbacks",void 0),e([y()],te.prototype,"enableMidpoints",void 0),e([y()],te.prototype,"enableMovement",void 0),e([y()],te.prototype,"enableVertices",void 0),e([y()],te.prototype,"graphic",void 0),e([y({value:!0})],te.prototype,"highlightsEnabled",null),e([y()],te.prototype,"layer",void 0),e([y({readOnly:!0})],te.prototype,"midpointGraphics",void 0),e([y()],te.prototype,"midpointSymbol",void 0),e([y({readOnly:!0})],te.prototype,"selectedVertices",void 0),e([y()],te.prototype,"snappingManager",void 0),e([y({readOnly:!0})],te.prototype,"state",null),e([y()],te.prototype,"symbols",void 0),e([y({type:U})],te.prototype,"sketchOptions",void 0),e([y({readOnly:!0})],te.prototype,"type",void 0),e([y({readOnly:!0})],te.prototype,"vertexGraphics",void 0),e([y()],te.prototype,"view",void 0),te=e([_("esri.views.draw.support.Reshape")],te);const re=te;export{re as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import t from"../../../Graphic.js";import{createTask as i}from"../../../core/asyncUtils.js";import s from"../../../core/Collection.js";import o from"../../../core/Error.js";import r from"../../../core/Evented.js";import n from"../../../core/Logger.js";import{destroyMaybe as h,assertIsSome as a,abortMaybe as p}from"../../../core/maybe.js";import{pausable as c,when as l,watch as d,sync as m,initial as v}from"../../../core/reactiveUtils.js";import{property as y}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import{subclass as _}from"../../../core/accessorSupport/decorators/subclass.js";import g from"../../../geometry/Point.js";import u from"../../../geometry/Polyline.js";import{closeRingsAndFixWinding as f,getMidpoint as x,geometryToCoordinates as G}from"../../../geometry/support/coordsUtils.js";import b from"../../../layers/GraphicsLayer.js";import V from"../../../symbols/SimpleMarkerSymbol.js";import{ViewingMode as M}from"../../ViewingMode.js";import{SnappingVisualizer2D as S}from"../../2d/interactive/SnappingVisualizer2D.js";import{cloneMove as w}from"./drawUtils.js";import E from"./GraphicMover.js";import I from"./HighlightHelper.js";import{addUniqueLayer as O}from"./layerUtils.js";import{createTooltipInfos as k,connectTooltip as T,updateTranslateTooltipInfo as C,updateTranslateVertexTooltipInfo as H}from"./reshapeTooltipUtils.js";import{settings as j}from"./settings.js";import{ViewEventPriorities as R}from"../../input/InputManager.js";import{createCoordinateHelper as A}from"../../interactive/coordinateHelper.js";import{sketchKeys as U}from"../../interactive/keybindings.js";import{EditGeometryOperations as L}from"../../interactive/editGeometry/EditGeometryOperations.js";import z from"../../interactive/sketch/SketchOptions.js";import{SnappingContext as D}from"../../interactive/snapping/SnappingContext.js";import{makeTooltip as F,enterInputModeIfAvailable as P}from"../../interactive/tooltip/tooltipCommonUtils.js";class Z{constructor(e,t,i){this.graphic=e,this.mover=t,this.selected=i,this.type="reshape-start"}}class X{constructor(e,t,i){this.graphic=e,this.mover=t,this.selected=i,this.type="reshape"}}class Y{constructor(e,t,i){this.graphic=e,this.mover=t,this.selected=i,this.type="reshape-stop"}}class K{constructor(e,t,i){this.mover=e,this.dx=t,this.dy=i,this.type="move-start"}}class N{constructor(e,t,i){this.mover=e,this.dx=t,this.dy=i,this.type="move"}}class q{constructor(e,t,i){this.mover=e,this.dx=t,this.dy=i,this.type="move-stop"}}class B{constructor(e){this.added=e,this.type="vertex-select"}}class J{constructor(e){this.removed=e,this.type="vertex-deselect"}}class Q{constructor(e,t,i,s){this.added=e,this.graphic=t,this.oldGraphic=i,this.vertices=s,this.type="vertex-add"}}class W{constructor(e,t,i,s){this.removed=e,this.graphic=t,this.oldGraphic=i,this.vertices=s,this.type="vertex-remove"}}const $=j.reshapeGraphics,ee={vertices:{default:new V({style:"circle",size:$.vertex.size,color:$.vertex.color,outline:{color:$.vertex.outlineColor,width:1}}),hover:new V({style:"circle",size:$.vertex.hoverSize,color:$.vertex.hoverColor,outline:{color:$.vertex.hoverOutlineColor,width:1}}),selected:new V({style:"circle",size:$.selected.size,color:$.selected.color,outline:{color:$.selected.outlineColor,width:1}})},midpoints:{default:new V({style:"circle",size:$.midpoint.size,color:$.midpoint.color,outline:{color:$.midpoint.outlineColor,width:1}}),hover:new V({style:"circle",size:$.midpoint.size,color:$.midpoint.color,outline:{color:$.midpoint.outlineColor,width:1}})}};let te=class extends r.EventedAccessor{constructor(e){super(e),this._updateHandlesOnExternalGeometryChange=null,this._activeOperationInfo=null,this._editGeometryOperations=null,this._graphicAttributes={esriSketchTool:"box"},this._mover=null,this._snappingContext=null,this._snappingGraphicsLayer=null,this._hoverGraphic=null,this._snappingTask=null,this._stagedVertex=null,this.tooltip=null,this.activeTooltipInfo=null,this.callbacks={onReshapeStart(){},onReshape(){},onReshapeStop(){},onMoveStart(){},onMove(){},onMoveStop(){},onGraphicClick(){}},this.enableMidpoints=!0,this.enableMovement=!0,this.enableVertices=!0,this.graphic=null,this.layer=null,this.midpointGraphics=new s,this.midpointSymbol=new V({style:"circle",size:6,color:[200,200,200],outline:{color:[100,100,100],width:1}}),this.selectedVertices=new s,this.snappingManager=null,this.symbols=ee,this.sketchOptions=new z,this.type="reshape",this.vertexGraphics=new s,this.view=null}initialize(){const e=this.view;this._highlightHelper=new I({view:e}),this._setup(),this._updateHandlesOnExternalGeometryChange=c((()=>this.graphic?.geometry),(e=>{if(!e)return;const t=new Set(this.selectedVertices.map((e=>e.attributes?.pointIndex)));this._highlightHelper.removeAll(),this._setUpHighlights(),this._setupGraphics(),this._clearSelection(),this.vertexGraphics.filter((e=>t.has(e.attributes.pointIndex))).forEach((e=>this._addToSelection(e)));const{enableMovement:i,_mover:s,graphic:o,midpointGraphics:r,vertexGraphics:n}=this,h=n.concat(r).items;i&&h.push(o),s?.set("graphics",h)}),m),this.tooltip=F((()=>({view:e,options:this.sketchOptions.tooltips}))),this.tooltipInfos=k(this.sketchOptions),this.addHandles([l((()=>e?.ready),(()=>{const{layer:e,view:t}=this;O(t,e),this.addHandles(t.on("key-down",(e=>this._keyDownHandler(e)),R.TOOL))}),{once:!0,initial:!0}),d((()=>this.graphic),(()=>this.refresh())),d((()=>this.layer),((e,t)=>{t&&(this._clearSelection(),this._resetGraphics(t)),this.refresh()})),d((()=>this.enableMidpoints),(()=>this.refresh())),T(this.tooltip,(()=>this._tooltipsContext)),d((()=>this.view.effectiveTheme.accentColor),(()=>this._updateSymbolsForTheme()),v),this._updateHandlesOnExternalGeometryChange]),this._updateTooltip()}destroy(){this._reset(),this._mover?.destroy(),this._mover=null,this.tooltip=h(this.tooltip)}get _coordinateHelper(){return this._editGeometryOperations?.data.coordinateHelper??A(!!this.graphic.geometry?.hasZ,!!this.graphic.geometry?.hasM,this.view.spatialReference)}get _selectedVertex(){return 1===this.selectedVertices.length?this.selectedVertices.at(0):void 0}get _tooltipsContext(){return{sketchOptions:this.sketchOptions,activeTooltipInfo:this.activeTooltipInfo,graphic:this.graphic,selectedVertex:this._selectedVertex,updateGeometry:(e,t,i,s,o)=>{this._setUpGeometryHelper();const r=e===this.graphic;r?this._emitMoveStartEvent(0,0):this._emitReshapeStartEvent(e);const n=!0;if(this._syncGeometryAfterVertexMove(e,t,s,o,n),r){const{view:e}=this,s=e.toScreen(i),o=e.toScreen(t),r=(o?.x??0)-(s?.x??0),n=(o?.y??0)-(s?.y??0);this._emitMoveEvent(r,n),this._emitMoveStopEvent(r,n)}else this._emitReshapeEvent(e),this._emitReshapeStopEvent(e);this._editGeometryOperations=h(this._editGeometryOperations)}}}set highlightsEnabled(e){this._highlightHelper?.removeAll(),this._set("highlightsEnabled",e),this._setUpHighlights()}get state(){const e=this.view.ready,t=!(!this.graphic||!this.layer);return e&&t?"active":e?"ready":"disabled"}isUIGraphic(e){const t=[];return this.graphic&&t.push(this.graphic),t.concat(this.vertexGraphics.items,this.midpointGraphics.items),t.length>0&&t.includes(e)}refresh(){this._reset(),this._setup()}reset(){this.graphic=null}clearSelection(){this._clearSelection()}removeSelectedVertices(){const{selectedVertices:e}=this;e.length&&this._removeVertices(e)}_setup(){const{graphic:e,layer:t}=this;if(!t||null==e?.geometry)return;const i=e.geometry;"mesh"!==i.type&&"extent"!==i.type?("polygon"===i.type&&f(i),this._setUpHighlights(),this._setupGraphics(),this._setupMover()):this._logGeometryTypeError()}_setUpHighlights(){this.highlightsEnabled&&this.graphic&&this._highlightHelper?.add(this.graphic)}_setUpGeometryHelper(){const e=this.graphic.geometry;if(null==e||"mesh"===e.type||"extent"===e.type)return void this._logGeometryTypeError();const t="multipoint"===e.type?new u({paths:[e.points],spatialReference:e.spatialReference}):e;this._editGeometryOperations=L.fromGeometry(t,M.Local)}_saveSnappingContextForHandle(e,t){this._snappingGraphicsLayer=new b({listMode:"hide",internal:!0,title:"Reshape snapping layer"}),this.view.map.layers.add(this._snappingGraphicsLayer);const i=this._editGeometryOperations;a(i),this._snappingContext=new D({editGeometryOperations:i,elevationInfo:{mode:"on-the-ground",offset:0},pointer:t.viewEvent?.pointerType||"mouse",excludeFeature:this.graphic,feature:this.graphic,visualizer:new S(this._snappingGraphicsLayer),vertexHandle:this._getVertexFromEditGeometry(e)})}_reset(){this._clearSelection(),this._highlightHelper?.removeAll(),this._updateTooltip(),this._resetGraphics(),this._resetSnappingStateVars(),this._activeOperationInfo=null,this._mover&&this._mover.destroy(),this._mover=null,this.view.cursor="default"}_resetSnappingStateVars(){null!=this.snappingManager&&this.snappingManager.doneSnapping(),null!=this._snappingGraphicsLayer&&(this.view?.map&&this.view.map.layers.remove(this._snappingGraphicsLayer),this._snappingGraphicsLayer.destroy()),this._editGeometryOperations=h(this._editGeometryOperations),this._snappingTask=p(this._snappingTask),this._snappingTask=null,this._snappingContext=null,this._stagedVertex=null}_resetGraphics(e){this._removeMidpointGraphics(e),this._removeVertexGraphics(e),this.selectedVertices.removeAll(),this._updateTooltip()}_removeMidpointGraphics(e){const t=e||this.layer;t&&t.removeMany(this.midpointGraphics.items),this.midpointGraphics.items.forEach((e=>e.destroy())),this.midpointGraphics.removeAll()}_removeVertexGraphics(e){const t=e||this.layer;t&&t.removeMany(this.vertexGraphics.items),this.vertexGraphics.items.forEach((e=>e.destroy())),this.vertexGraphics.removeAll()}_setupGraphics(){const e=this.graphic.geometry;if(null!=e&&("polyline"===e.type||"polygon"===e.type)){const t=ie(e);this.enableMidpoints&&this._setUpMidpointGraphics(t),this.enableVertices&&this._setUpVertexGraphics(t)}}_setUpMidpointGraphics(e){this._removeMidpointGraphics();const t=this._createMidpointGraphics(e);this.midpointGraphics.addMany(t),this.layer.addMany(t)}_setUpVertexGraphics(e){this._removeVertexGraphics();const t=this._createVertexGraphics(e);this.vertexGraphics.addMany(t),this._storeRelatedVertexIndices(),this.layer.addMany(t)}_createVertexGraphics(e){const{_graphicAttributes:i,symbols:s}=this,o=[];return e?.forEach(((e,r)=>{e.forEach(((e,n)=>{o.push(new t({geometry:this._coordinateHelper.arrayToPoint(e),symbol:s?.vertices?.default,attributes:{...i,pathIndex:r,pointIndex:n}}))}))})),o}_createMidpointGraphics(e){const{_graphicAttributes:i,symbols:s}=this,o=[];for(let r=0;r<e.length;r++){const n=e[r];for(let e=0;e<n.length;e++){const h=(e+1)%n.length;if("polyline"===this.graphic.geometry?.type&&0===h)continue;const a=n[e],p=n[h],c=this._getMidpoint(a,p);o.push(new t({geometry:c,symbol:s.midpoints.default,attributes:{...i,pathIndex:r,pointIndexStart:e,pointIndexEnd:h}}))}}return o}_updateSymbolsForTheme(){const e=this.view.effectiveTheme.accentColor;this.symbols={vertices:{...this.symbols.vertices,default:this.symbols.vertices.default.clone().set("color",e),hover:this.symbols.vertices.hover?.clone().set("color",e)},midpoints:{...this.symbols.midpoints}};for(const t of this.vertexGraphics)this._isSelected(t)?t.symbol=this.symbols.vertices.selected:this._hoverGraphic===t?t.symbol=this.symbols.vertices.hover:t.symbol=this.symbols.vertices.default}_storeRelatedVertexIndices(){const e=this.vertexGraphics.items;if(!e)return;const t=e.map((({geometry:e})=>({x:e.x,y:e.y})));for(let i=0;i<t.length;i++){const s=[];for(let e=0;e<t.length;e++){if(i===e)continue;const o=t[i],r=t[e];o.x===r.x&&o.y===r.y&&s.push(e)}e[i].attributes.relatedGraphicIndices=s}}_setupMover(){const{enableMovement:e,graphic:t,midpointGraphics:i,vertexGraphics:s,view:o}=this,r=s.concat(i).items;e&&r.push(t),this._mover=new E({enableMoveAllGraphics:!1,highlightsEnabled:!1,indicatorsEnabled:!1,graphics:r,view:o,callbacks:{onGraphicClick:e=>this._onGraphicClickCallback(e),onGraphicMoveStart:e=>this._onGraphicMoveStartCallback(e),onGraphicMove:e=>this._onGraphicMoveCallback(e),onGraphicMoveStop:e=>this._onGraphicMoveStopCallback(e),onGraphicPointerOver:e=>this._onGraphicPointerOverCallback(e),onGraphicPointerOut:e=>this._onGraphicPointerOutCallback(e)}})}_onGraphicClickCallback(e){e.viewEvent.stopPropagation();const t=e.graphic;if(t===this.graphic)this.clearSelection(),this.emit("graphic-click",e),this.callbacks.onGraphicClick?.(e);else if(this._isMidpoint(t)){if(2===e.viewEvent.button)return;const i=this.graphic.clone(),s=this._createVertexFromMidpoint(t);this.refresh(),this._emitVertexAddEvent([t],i,s)}else if(this._isVertex(t))if(e.viewEvent.stopPropagation(),2===e.viewEvent.button)this._removeVertices(t);else{e.viewEvent.native.shiftKey||this._clearSelection(),this.selectedVertices.includes(t)?this._removeFromSelection(t,!0):this._addToSelection(t)}}_setUpOperation(e){const{graphic:t,dx:i,dy:s}=e,o=t===this.graphic;this._resetSnappingStateVars(),this._setUpGeometryHelper(),this._saveSnappingContextForHandle(t,e),this._activeOperationInfo={target:this.graphic,mover:t,operationType:o?"move":"reshape",totalDx:i,totalDy:s}}_onGraphicMoveStartCallback(e){const{dx:t,dy:i,graphic:s}=e;if(s===this.graphic){const{geometry:o}=s;return this._setUpOperation(e),this._emitMoveStartEvent(t,i),void(null!=o&&"point"===o.type&&this._onHandleMove(s,t,i,e,(()=>{this._updateTooltip(this.graphic,e.viewEvent),this._emitMoveEvent(t,i)})))}if(!this.selectedVertices.includes(s)){if(this._clearSelection(),this._isMidpoint(s)){const e=this.graphic.clone(),t=this._createVertexFromMidpoint(s);this._emitVertexAddEvent([s],e,t)}this._addToSelection(s)}this._setUpOperation(e),this._emitReshapeStartEvent(s),this._onHandleMove(s,t,i,e,(()=>{this._updateTooltip(s,e.viewEvent),this._emitReshapeEvent(s)}))}_onGraphicMoveCallback(e){const t=this._activeOperationInfo;if(!t)return;const{dx:i,dy:s,graphic:o}=e;t.totalDx+=i,t.totalDy+=s;const{operationType:r}=t,{geometry:n}=o;if(null!=n)if("move"!==r)this._onHandleMove(o,i,s,e,(()=>{this._updateTooltip(o,e.viewEvent),this._emitReshapeEvent(o)}));else if("point"===n.type)this._onHandleMove(o,i,s,e,(()=>{this._updateTooltip(this.graphic,e.viewEvent),this._emitMoveEvent(i,s)}));else if("polyline"===n.type||"polygon"===n.type){const t=ie(n);this._updateVertexGraphicLocations(t),this._updateTooltip(this.graphic,e.viewEvent),this._emitMoveEvent(i,s)}}_onGraphicMoveStopCallback(e){const t=this._activeOperationInfo;if(!t)return;const{dx:i,dy:s,graphic:o}=e,{operationType:r}=t;t.totalDx+=i,t.totalDy+=s,this._onHandleMove(o,i,s,e,(()=>"move"===r?this._emitMoveStopEvent():this._emitReshapeStopEvent(o))),this._isMidpoint(o)?this.refresh():(this._updateTooltip(this._isVertex(o)?o:null),this._resetSnappingStateVars(),this._activeOperationInfo=null)}_updateVertexGraphicLocations(e){const{_coordinateHelper:t}=this;for(const i of this.vertexGraphics){const{pathIndex:s,pointIndex:o}=i.attributes;i.geometry=t.arrayToPoint(e[s][o])}this._updateMidpointGraphicLocations(e)}_updateMidpointGraphicLocations(e){for(const t of this.midpointGraphics){const{pathIndex:i,pointIndexStart:s,pointIndexEnd:o}=t.attributes,r=e[i];t.geometry=this._getMidpoint(r[s],r[o])}}_getMidpoint(e,t){const{_coordinateHelper:i}=this,s=i.arrayToVector(e),o=i.arrayToVector(t),r=i.toXYZ(s),n=i.toXYZ(o),[h,a,p]=x(r,n),c=i.hasM()?0:void 0;return new g({x:h,y:a,z:p,m:c,spatialReference:i.spatialReference})}_getVertexFromEditGeometry(e){const[t,i]=se(e);return a(this._editGeometryOperations),this._editGeometryOperations.data.components[t].vertices[i]}_onHandleMove(e,t,s,o,r){p(this._snappingTask);const n=this._snappingContext;if(!n)return;const h=e.geometry,a="graphic-move-stop"===o.type;if(null!=this.snappingManager&&this.selectedVertices.length<2&&!a){const o=this.snappingManager;this._stagedVertex=o.update({point:h,context:n}),this._syncGeometryAfterVertexMove(e,new g(this._stagedVertex),t,s,a),r(),this._snappingTask=i((async i=>{const p=await o.snap({point:h,context:n,signal:i});p.valid&&(this._stagedVertex=p.apply(),this._syncGeometryAfterVertexMove(e,new g(this._stagedVertex),t,s,a),r())}))}else{const i=null!=this._stagedVertex?new g(this._stagedVertex):h;this._syncGeometryAfterVertexMove(e,i,t,s,a),r()}}_syncGeometryAfterVertexMove(e,t,i,s,o=!1){const r=this._editGeometryOperations?.data.geometry;if(r)if("point"===r.type)e.geometry=t;else if("mesh"===r.type)e.geometry=r.centerAt(t);else{const{_coordinateHelper:n}=this,[h,a]=se(e);let p=G(r);const c=p[h].length-1,l=n.pointToArray(t);p[h][a]=l,"polygon"===r.type&&(0===a?p[h][c]=l:a===c&&(p[h][0]=l)),this._isVertex(e)&&(p=this._moveRelatedCoordinates(p,e,l),p=this._moveSelectedHandleCoordinates(p,e,i,s,"polygon"===r.type),this._updateMidpointGraphicLocations(p)),this._updateGraphicGeometry(r.clone());const d=n.pointToVector(t),m=this._getVertexFromEditGeometry(e),v=n.getZ(d),y=d[0]-m.pos[0],_=d[1]-m.pos[1],g=null!=v?v-m.pos[2]:0;this._editGeometryOperations?.moveVertices([m],y,_,g),o&&(this._mover?this._mover.updateGeometry(this._mover.graphics.indexOf(e),t):e.geometry=t)}}_moveRelatedCoordinates(e,t,i){const{relatedGraphicIndices:s}=t.attributes;for(const o of s){const s=this.vertexGraphics.at(o),{pathIndex:r,pointIndex:n}=s.attributes;e[r][n]=i,s.geometry=t.geometry}return e}_moveSelectedHandleCoordinates(e,t,i,s,o){for(const r of this.selectedVertices)if(r!==t){const{pathIndex:t,pointIndex:n,relatedGraphicIndices:h}=r.attributes,a=w(r.geometry,i,s,this.view),p=G(a),c=e[t].length-1;e[t][n]=p,r.geometry=a,o&&(0===n?e[t][c]=p:n===c&&(e[t][0]=p));for(const i of h){const t=this.vertexGraphics.at(i),{pathIndex:s,pointIndex:o}=t.attributes;e[s][o]=p,t.geometry=a}}return e}_onGraphicPointerOverCallback(e){const t=e.graphic;this._hoverGraphic=t;const i=this._isVertex(t);i&&!this._isSelected(t)&&(t.symbol=this.symbols.vertices.hover),this._updateTooltip(i?t:null),this._updateHoverCursor(t)}_onGraphicPointerOutCallback(e){const t=e.graphic;this._hoverGraphic=null,this._isVertex(t)&&!this._isSelected(t)&&(t.symbol=this.symbols.vertices.default),this.view.cursor="default",this._updateTooltip()}_createVertexFromMidpoint(e){const{_graphicAttributes:t,graphic:i}=this,s=i.geometry;if(null==s||"polygon"!==s.type&&"polyline"!==s.type)return[];const o=s.clone(),r=[],{pathIndex:n,pointIndexStart:h,pointIndexEnd:a}=e.attributes,p=G(e.geometry),c=0===a?h+1:a,l=G(o);return l[n].splice(c,0,p),e.attributes={...t,pathIndex:n,pointIndex:c,relatedGraphicIndices:[]},r.push({coordinates:l[n][c],componentIndex:n,vertexIndex:c}),this._updateGraphicGeometry(o),r}_addToSelection(e){const t=oe(e);for(const i of t)i.symbol=this.symbols.vertices.selected,this.selectedVertices.add(i),this._updateTooltip(i);this._emitSelectEvent(t)}_removeFromSelection(e,t){const{vertices:i}=this.symbols,s=t?i.hover:i.default;this.selectedVertices.remove(e),e.symbol=s,this._emitDeselectEvent([e]),this._updateTooltip()}_clearSelection(){const e=this.selectedVertices.toArray();if(e.length>0){for(const t of e)t.set("symbol",this.symbols.vertices.default);this.selectedVertices.removeAll(),this._emitDeselectEvent(e),this._updateTooltip()}}_keyDownHandler(e){null==this._activeOperationInfo&&P(e,this.tooltip)||U.delete.includes(e.key)&&!e.repeat&&this.selectedVertices.length&&this._removeVertices(this.selectedVertices)}_removeVertices(e){const t=this.graphic.geometry;if(null==t||"polygon"!==t.type&&"polyline"!==t.type)return;if("polygon"===t.type&&this.vertexGraphics.length<4||this.vertexGraphics.length<3)return;const i=this.graphic.clone(),s=t.clone();let o=G(s);const r=[],n=oe(e);for(const h of n){const{x:e,y:t}=h.geometry;for(let i=0;i<o.length;i++){const s=o[i];for(let n=0;n<s.length;n++){const[h,a]=s[n];e===h&&t===a&&(r.push({coordinates:o[i][n],componentIndex:i,vertexIndex:n}),o[i].splice(Number(n),1))}}}if("polygon"===s.type)o=o.filter((e=>{if(e.length<2)return!1;const[t,i]=e[0],[s,o]=e[e.length-1];return(2!==e.length||t!==s||i!==o)&&(t===s&&i===o||e.push(e[0]),!0)})),s.rings=o;else{for(const e of o)1===e.length&&o.splice(o.indexOf(e),1);s.paths=o}this._updateGraphicGeometry(s),this.refresh(),this._emitVertexRemoveEvent(n,i,r)}_isVertex(e){return this.vertexGraphics.includes(e)}_isSelected(e){return this._isVertex(e)&&this.selectedVertices.includes(e)}_isMidpoint(e){return this.midpointGraphics.includes(e)}_updateHoverCursor(e){this.view.cursor=this._isMidpoint(e)?"copy":"move"}_updateTooltip(e,t){let i=null;const{graphic:s,view:o,tooltipInfos:r}=this,n=s?.geometry;"point"===n?.type?i=r.movePoint:this._selectedVertex?i=r.selectedVertex:e===this.graphic?(i=r.translateGraphic,C(i,o,t)):e&&this.selectedVertices.length>1&&(i=r.translateVertices,H(i,o,n,t)),this.activeTooltipInfo=i}_updateGraphicGeometry(e){this._updateHandlesOnExternalGeometryChange?.pause(),this.graphic.geometry=e,this._updateHandlesOnExternalGeometryChange?.resume()}_emitMoveStartEvent(e,t){const i=new K(this.graphic,e,t);this.emit("move-start",i),this.callbacks.onMoveStart?.(i)}_emitMoveEvent(e,t){const i=new N(this.graphic,e,t);this.emit("move",i),this.callbacks.onMove?.(i)}_emitMoveStopEvent(e,t){if(null==e||null==t){const i=this._activeOperationInfo;if(!i)return;e=i.totalDx,t=i.totalDy}const i=new q(this.graphic,e,t);this.emit("move-stop",i),this.callbacks.onMoveStop?.(i)}_emitReshapeStartEvent(e){const t=new Z(this.graphic,e,this.selectedVertices.toArray());this.emit("reshape-start",t),this.callbacks.onReshapeStart?.(t)}_emitReshapeEvent(e){const t=new X(this.graphic,e,this.selectedVertices.toArray());this.emit("reshape",t),this.callbacks.onReshape?.(t)}_emitReshapeStopEvent(e){const t=new Y(this.graphic,e,this.selectedVertices.toArray());this.emit("reshape-stop",t),this.callbacks.onReshapeStop?.(t)}_emitSelectEvent(e){const t=new B(e);this.emit("select",t),this.callbacks.onVertexSelect?.(t)}_emitDeselectEvent(e){const t=new J(e);this.emit("deselect",t),this.callbacks.onVertexDeselect?.(t)}_emitVertexAddEvent(e,t,i){const s=new Q(e,this.graphic,t,i);this.emit("vertex-add",s),this.callbacks.onVertexAdd?.(s)}_emitVertexRemoveEvent(e,t,i){const s=new W(e,this.graphic,t,i);this.emit("vertex-remove",s),this.callbacks.onVertexRemove?.(s)}_logGeometryTypeError(){n.getLogger(this).error(new o("reshape:invalid-geometry","Reshape operation not supported for the provided graphic. The geometry type is not supported."))}};function ie(e){const t=G(e.clone());if("polygon"===e.type)for(const i of t){const e=i[i.length-1];i[0][0]===e[0]&&i[0][1]===e[1]&&i.length>2&&i.pop()}return t}function se({attributes:e}){return[e?.pathIndex||0,e?.pointIndex||0]}function oe(e){return e instanceof t?[e]:[...e]}e([y()],te.prototype,"_activeOperationInfo",void 0),e([y()],te.prototype,"_coordinateHelper",null),e([y()],te.prototype,"_editGeometryOperations",void 0),e([y()],te.prototype,"tooltip",void 0),e([y()],te.prototype,"tooltipInfos",void 0),e([y()],te.prototype,"activeTooltipInfo",void 0),e([y()],te.prototype,"_selectedVertex",null),e([y()],te.prototype,"_tooltipsContext",null),e([y()],te.prototype,"callbacks",void 0),e([y()],te.prototype,"enableMidpoints",void 0),e([y()],te.prototype,"enableMovement",void 0),e([y()],te.prototype,"enableVertices",void 0),e([y()],te.prototype,"graphic",void 0),e([y({value:!0})],te.prototype,"highlightsEnabled",null),e([y()],te.prototype,"layer",void 0),e([y({readOnly:!0})],te.prototype,"midpointGraphics",void 0),e([y()],te.prototype,"midpointSymbol",void 0),e([y({readOnly:!0})],te.prototype,"selectedVertices",void 0),e([y()],te.prototype,"snappingManager",void 0),e([y({readOnly:!0})],te.prototype,"state",null),e([y()],te.prototype,"symbols",void 0),e([y({type:z})],te.prototype,"sketchOptions",void 0),e([y({readOnly:!0})],te.prototype,"type",void 0),e([y({readOnly:!0})],te.prototype,"vertexGraphics",void 0),e([y()],te.prototype,"view",void 0),te=e([_("esri.views.draw.support.Reshape")],te);const re=te;export{re as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import"../../../geometry.js";import{equals as t,isSome as e}from"../../../core/arrayUtils.js";import{clone as o}from"../../../core/lang.js";import{getMetersPerUnitForSR as n}from"../../../core/unitUtils.js";import{m as r}from"../../../chunks/vec32.js";import{create as a}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import l from"../../../geometry/Circle.js";import{simplify as s,distance as i}from"../../../geometry/geometryEngine.js";import{unnormalizeGeometryOnDatelineCrossing as c,isClockwise as y,unnormalizeVerticesOnDatelineCrossing as p}from"../../../geometry/support/coordsUtils.js";import{isValid as u}from"../../../geometry/support/spatialReferenceUtils.js";import{makeSurfacePoint as m}from"./surfaceCoordinateSystems.js";import f from"../../../geometry/Point.js";import x from"../../../geometry/Multipoint.js";import h from"../../../geometry/Polyline.js";import M from"../../../geometry/Polygon.js";function g(t,e){const o=new f({x:t[0],y:t[1],spatialReference:e});return t.length>2&&(o.z=t[2]),o}function d(t,e){return new x({points:t,spatialReference:e})}function R(t,e,o){const n=new h({paths:t,spatialReference:e});return o&&c(n),n}function j(e,n,r,a=!0){const l=o(e);l.forEach((e=>{const o=e[0],n=e[e.length-1];t(o,n)&&1!==e.length||e.push(e[0])}));let i=new M({rings:l,spatialReference:n});return i.rings.forEach((t=>{y(t)||t.reverse()})),r&&c(i),a&&i.isSelfIntersecting&&u(n)&&(i=s(i)),i}function T(t,o,n){const r=o.mapToLocalMultiple(t),a=[],l={x:r[0].x,y:r[0].y},s={x:r[1].x,y:r[1].y},i=Math.round(s.x-l.x),c=Math.round(s.y-l.y),y=Math.max(Math.abs(i),Math.abs(c));if(n){const t={x:l.x+y,y:l.y+y},e={x:l.x-y,y:l.y-y};a.push(m(t.x,e.y),m(e.x,e.y),m(e.x,t.y),m(t.x,t.y))}else{const t={x:i>0?l.x+y:l.x-y,y:c>0?l.y+y:l.y-y};a.push(m(l.x,l.y),m(t.x,l.y),m(t.x,t.y),m(l.x,t.y))}return U(j([a.map((t=>o.localToMap(t))).filter(e)],o.spatialReference,o.doUnnormalization,!0),a,o)}function b(t,o,n){let r=o.mapToLocalMultiple(t);if(1===r.length){const t=48,e=r[0];r=[m(e.x-t,e.y+t),m(e.x+t,e.y-t),m(e.x+t,e.y-t),m(e.x-t,e.y+t)]}const a=[],l={x:r[0].x,y:r[0].y},s={x:r[1].x,y:r[1].y};if(n){const t=Math.round(s.x-l.x),e=Math.round(s.y-l.y);a.push(m(l.x-t,l.y-e),m(s.x,l.y-e),m(s.x,s.y),m(l.x-t,s.y))}else a.push(m(l.x,l.y),m(s.x,l.y),m(s.x,s.y),m(l.x,s.y));return U(j([a.map((t=>o.localToMap(t))).filter(e)],o.spatialReference,o.doUnnormalization,!0),a,o)}function U(t,e,o){const n=P(e[3],e[2],o),r=P(e[1],e[2],o),a=P(e[0],e[1],o),l=P(e[0],e[3],o);return{geometry:t,midpoints:null!=n&&null!=r&&null!=a&&null!=l?{top:n,right:r,bottom:a,left:l}:null}}function P(t,e,o){w[0]=t.x,w[1]=t.y,w[2]=0,I[0]=e.x,I[1]=e.y,I[2]=0,r(w,w,I,.5),z.x=w[0],z.y=I[1],z.z=I[2];const n=o.localToMap(z);return null!=n?g(n,o.spatialReference):null}const z=m(0,0,0),w=a(),I=a();function L(t,e,o,r){const a=e.mapToLocalMultiple(t);let s=null,c=null;if(o)s=a[0],c=a[1];else{const t=a[0],e=a[1],o=Math.round(e.x-t.x),n=Math.round(e.y-t.y),r=Math.max(Math.abs(o),Math.abs(n));s=m(o>0?t.x+r/2:t.x-r/2,n>0?t.y+r/2:t.y-r/2),c=m(Math.abs(o)>Math.abs(n)?s.x-r/2:s.x,Math.abs(o)>Math.abs(n)?s.y:s.y-r/2)}const y=e.localToMap(s),f=e.localToMap(c);if(null==y||null==f)return null;e.doUnnormalization&&p([[y,f]],e.spatialReference);const x=g(y,e.spatialReference),h=g(f,e.spatialReference),M=n(e.spatialReference);let d=0;if(u(e.spatialReference))d=M*i(x,h,null);else{const t=s.x-c.x,e=s.y-c.y;d=M*Math.sqrt(t*t+e*e)*(r||1)}const R=new l({center:x,radius:d,radiusUnit:"meters",spatialReference:e.spatialReference});return{geometry:j(R.rings,R.spatialReference,!1),center:x,edge:h}}function v(t,o,n){const r=o.mapToLocalMultiple(t),a=r[0],l=r[1],s=Math.round(l.x-a.x),i=Math.round(l.y-a.y),c=m(n?a.x:a.x+s/2,n?a.y:a.y+i/2),y=n?s:s/2,p=n?i:i/2,u=60,f=[],x=2*Math.PI/u;function h(t){const e=Math.cos(t),o=Math.sin(t);return m(y*e+c.x,p*o+c.y)}for(let e=0;e<u;e++)f.push(h(e*x));f.push(f[0]);const{spatialReference:M,doUnnormalization:d}=o,R=j([f.map((t=>o.localToMap(t))).filter(e)],M,d,!1),T=o.localToMap(h(Math.PI/2)),b=o.localToMap(h(0)),U=o.localToMap(h(-Math.PI/2)),P=o.localToMap(h(Math.PI));return{geometry:R,midpoints:null!=T&&null!=b&&null!=U&&null!=P?{top:g(T,M),right:g(b,M),bottom:g(U,M),left:g(P,M)}:null}}export{L as createCircle,v as createEllipse,d as createMultipoint,g as createPoint,j as createPolygon,R as createPolyline,b as createRectangle,T as createSquare};
5
+ import{equals as t,isSome as e}from"../../../core/arrayUtils.js";import{clone as o}from"../../../core/lang.js";import{getMetersPerUnitForSR as n}from"../../../core/unitUtils.js";import{m as r}from"../../../chunks/vec32.js";import{create as a}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import l from"../../../geometry/Circle.js";import{simplify as s,distance as i}from"../../../geometry/geometryEngine.js";import c from"../../../geometry/Multipoint.js";import y from"../../../geometry/Point.js";import p from"../../../geometry/Polygon.js";import u from"../../../geometry/Polyline.js";import{unnormalizeGeometryOnDatelineCrossing as m,isClockwise as f,unnormalizeVerticesOnDatelineCrossing as x}from"../../../geometry/support/coordsUtils.js";import{isValid as h}from"../../../geometry/support/spatialReferenceUtils.js";import{makeSurfacePoint as M}from"./surfaceCoordinateSystems.js";function g(t,e){const o=new y({x:t[0],y:t[1],spatialReference:e});return t.length>2&&(o.z=t[2]),o}function d(t,e){return new c({points:t,spatialReference:e})}function R(t,e,o){const n=new u({paths:t,spatialReference:e});return o&&m(n),n}function j(e,n,r,a=!0){const l=o(e);l.forEach((e=>{const o=e[0],n=e[e.length-1];t(o,n)&&1!==e.length||e.push(e[0])}));let i=new p({rings:l,spatialReference:n});return i.rings.forEach((t=>{f(t)||t.reverse()})),r&&m(i),a&&i.isSelfIntersecting&&h(n)&&(i=s(i)),i}function T(t,o,n){const r=o.mapToLocalMultiple(t),a=[],l={x:r[0].x,y:r[0].y},s={x:r[1].x,y:r[1].y},i=Math.round(s.x-l.x),c=Math.round(s.y-l.y),y=Math.max(Math.abs(i),Math.abs(c));if(n){const t={x:l.x+y,y:l.y+y},e={x:l.x-y,y:l.y-y};a.push(M(t.x,e.y),M(e.x,e.y),M(e.x,t.y),M(t.x,t.y))}else{const t={x:i>0?l.x+y:l.x-y,y:c>0?l.y+y:l.y-y};a.push(M(l.x,l.y),M(t.x,l.y),M(t.x,t.y),M(l.x,t.y))}return U(j([a.map((t=>o.localToMap(t))).filter(e)],o.spatialReference,o.doUnnormalization,!0),a,o)}function b(t,o,n){let r=o.mapToLocalMultiple(t);if(1===r.length){const t=48,e=r[0];r=[M(e.x-t,e.y+t),M(e.x+t,e.y-t),M(e.x+t,e.y-t),M(e.x-t,e.y+t)]}const a=[],l={x:r[0].x,y:r[0].y},s={x:r[1].x,y:r[1].y};if(n){const t=Math.round(s.x-l.x),e=Math.round(s.y-l.y);a.push(M(l.x-t,l.y-e),M(s.x,l.y-e),M(s.x,s.y),M(l.x-t,s.y))}else a.push(M(l.x,l.y),M(s.x,l.y),M(s.x,s.y),M(l.x,s.y));return U(j([a.map((t=>o.localToMap(t))).filter(e)],o.spatialReference,o.doUnnormalization,!0),a,o)}function U(t,e,o){const n=P(e[3],e[2],o),r=P(e[1],e[2],o),a=P(e[0],e[1],o),l=P(e[0],e[3],o);return{geometry:t,midpoints:null!=n&&null!=r&&null!=a&&null!=l?{top:n,right:r,bottom:a,left:l}:null}}function P(t,e,o){w[0]=t.x,w[1]=t.y,w[2]=0,I[0]=e.x,I[1]=e.y,I[2]=0,r(w,w,I,.5),z.x=w[0],z.y=I[1],z.z=I[2];const n=o.localToMap(z);return null!=n?g(n,o.spatialReference):null}const z=M(0,0,0),w=a(),I=a();function L(t,e,o,r){const a=e.mapToLocalMultiple(t);let s=null,c=null;if(o)s=a[0],c=a[1];else{const t=a[0],e=a[1],o=Math.round(e.x-t.x),n=Math.round(e.y-t.y),r=Math.max(Math.abs(o),Math.abs(n));s=M(o>0?t.x+r/2:t.x-r/2,n>0?t.y+r/2:t.y-r/2),c=M(Math.abs(o)>Math.abs(n)?s.x-r/2:s.x,Math.abs(o)>Math.abs(n)?s.y:s.y-r/2)}const y=e.localToMap(s),p=e.localToMap(c);if(null==y||null==p)return null;e.doUnnormalization&&x([[y,p]],e.spatialReference);const u=g(y,e.spatialReference),m=g(p,e.spatialReference),f=n(e.spatialReference);let d=0;if(h(e.spatialReference))d=f*i(u,m,null);else{const t=s.x-c.x,e=s.y-c.y;d=f*Math.sqrt(t*t+e*e)*(r||1)}const R=new l({center:u,radius:d,radiusUnit:"meters",spatialReference:e.spatialReference});return{geometry:j(R.rings,R.spatialReference,!1),center:u,edge:m}}function v(t,o,n){const r=o.mapToLocalMultiple(t),a=r[0],l=r[1],s=Math.round(l.x-a.x),i=Math.round(l.y-a.y),c=M(n?a.x:a.x+s/2,n?a.y:a.y+i/2),y=n?s:s/2,p=n?i:i/2,u=60,m=[],f=2*Math.PI/u;function x(t){const e=Math.cos(t),o=Math.sin(t);return M(y*e+c.x,p*o+c.y)}for(let e=0;e<u;e++)m.push(x(e*f));m.push(m[0]);const{spatialReference:h,doUnnormalization:d}=o,R=j([m.map((t=>o.localToMap(t))).filter(e)],h,d,!1),T=o.localToMap(x(Math.PI/2)),b=o.localToMap(x(0)),U=o.localToMap(x(-Math.PI/2)),P=o.localToMap(x(Math.PI));return{geometry:R,midpoints:null!=T&&null!=b&&null!=U&&null!=P?{top:g(T,h),right:g(b,h),bottom:g(U,h),left:g(P,h)}:null}}export{L as createCircle,v as createEllipse,d as createMultipoint,g as createPoint,j as createPolygon,R as createPolyline,b as createRectangle,T as createSquare};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import"../../../geometry.js";import{isSome as t}from"../../../core/arrayUtils.js";import{invert as r}from"../../../core/libs/gl-matrix-2/math/mat2d.js";import{create as e,clone as s}from"../../../core/libs/gl-matrix-2/factories/mat2df64.js";import{rotationTo as a,invert as o}from"../../../core/libs/gl-matrix-2/math/quat.js";import{create as i}from"../../../core/libs/gl-matrix-2/factories/quatf64.js";import{h as n,f as l,d as h,n as m,e as c,w as f}from"../../../chunks/vec32.js";import{create as p}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{Axis as d}from"../../../geometry/support/Axis.js";import u from"../../../geometry/Point.js";function w(t,r,e=null){return null!=e?[t,r,e]:[t,r]}function g(t,r,e=null){return null!=e?{x:t,y:r,z:e}:{x:t,y:r}}class R{constructor(t){this.spatialReference=t}mapToLocalMultiple(r){return r.map((t=>this.mapToLocal(t))).filter(t)}get doUnnormalization(){return!1}}class W extends R{constructor(t,a,o=null){super(a),this._defaultZ=o,this.transform=e(),this.transformInv=e(),this.transform=s(t),r(this.transformInv,this.transform)}makeMapPoint(t,r){return w(t,r,this._defaultZ)}mapToLocal(t){return g(this.transform[0]*t[0]+this.transform[2]*t[1]+this.transform[4],this.transform[1]*t[0]+this.transform[3]*t[1]+this.transform[5])}localToMap(t){return w(this.transformInv[0]*t.x+this.transformInv[2]*t.y+this.transformInv[4],this.transformInv[1]*t.x+this.transformInv[3]*t.y+this.transformInv[5],this._defaultZ)}}class v extends R{constructor(t,r){super(t.spatialReference),this.view=t,this.defaultZ=null,this.pWS=p(),this.tangentFrameUpWS=p(),this.tangentFrameRightWS=p(),this.tangentFrameForwardWS=p(),this.localFrameRightWS=p(),this.localFrameUpWS=p(),this.worldToLocalTransform=i(),this.localToWorldTransform=i(),this.scale=1,this.scale=t.resolution,this.referenceMapPoint=r,this.defaultZ=r.hasZ?r.z:null;const e=t.state.camera.viewRight;this.view.renderCoordsHelper.toRenderCoords(this.referenceMapPoint,this.pWS),this.view.renderCoordsHelper.worldBasisAtPosition(this.pWS,d.X,this.tangentFrameRightWS),this.view.renderCoordsHelper.worldBasisAtPosition(this.pWS,d.Y,this.tangentFrameUpWS),this.view.renderCoordsHelper.worldBasisAtPosition(this.pWS,d.Z,this.tangentFrameForwardWS);const s=p();n(s,this.tangentFrameForwardWS,l(e,this.tangentFrameForwardWS)),h(this.localFrameRightWS,e,s),m(this.localFrameRightWS,this.localFrameRightWS),c(this.localFrameUpWS,this.tangentFrameForwardWS,this.localFrameRightWS),a(this.worldToLocalTransform,this.localFrameRightWS,this.tangentFrameRightWS),o(this.localToWorldTransform,this.worldToLocalTransform)}get doUnnormalization(){return"global"===this.view.viewingMode}makeMapPoint(t,r){return w(t,r,this.defaultZ)}mapToLocal(t){const r=p();this.view.renderCoordsHelper.toRenderCoords(new u({x:t[0],y:t[1],spatialReference:this.spatialReference}),r),f(r,r,this.worldToLocalTransform);const e=this.view.renderCoordsHelper.fromRenderCoords(r,new u({spatialReference:this.view.spatialReference}));return null!=e?g(e.x/this.scale,e.y/this.scale):null}localToMap(t){const r=p();this.view.renderCoordsHelper.toRenderCoords(new u({x:t.x*this.scale,y:t.y*this.scale,spatialReference:this.spatialReference}),r),f(r,r,this.localToWorldTransform);const e=this.view.renderCoordsHelper.fromRenderCoords(r,new u({spatialReference:this.view.spatialReference}));return null!=e?w(e.x,e.y,this.defaultZ):null}}function F(t,r){if("2d"===t.type)return new W(t.state.transform,t.spatialReference,r.length>2?r[2]:null);if("3d"===t.type){const e=r.length>2?new u({x:r[0],y:r[1],z:r[2],spatialReference:t.spatialReference}):new u({x:r[0],y:r[1],spatialReference:t.spatialReference});return new v(t,e)}return null}export{W as AffineCoordinateSystem,v as SceneViewCoordinateSystem,R as SurfaceCoordinateSystem,F as createViewAlignedCoordinateSystem,w as makeMapPoint,g as makeSurfacePoint};
5
+ import{isSome as t}from"../../../core/arrayUtils.js";import{invert as r}from"../../../core/libs/gl-matrix-2/math/mat2d.js";import{create as e,clone as s}from"../../../core/libs/gl-matrix-2/factories/mat2df64.js";import{rotationTo as a,invert as o}from"../../../core/libs/gl-matrix-2/math/quat.js";import{create as i}from"../../../core/libs/gl-matrix-2/factories/quatf64.js";import{h as n,f as l,d as h,n as m,e as c,w as f}from"../../../chunks/vec32.js";import{create as p}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import d from"../../../geometry/Point.js";import{Axis as u}from"../../../geometry/support/Axis.js";function w(t,r,e=null){return null!=e?[t,r,e]:[t,r]}function g(t,r,e=null){return null!=e?{x:t,y:r,z:e}:{x:t,y:r}}class R{constructor(t){this.spatialReference=t}mapToLocalMultiple(r){return r.map((t=>this.mapToLocal(t))).filter(t)}get doUnnormalization(){return!1}}class W extends R{constructor(t,a,o=null){super(a),this._defaultZ=o,this.transform=e(),this.transformInv=e(),this.transform=s(t),r(this.transformInv,this.transform)}makeMapPoint(t,r){return w(t,r,this._defaultZ)}mapToLocal(t){return g(this.transform[0]*t[0]+this.transform[2]*t[1]+this.transform[4],this.transform[1]*t[0]+this.transform[3]*t[1]+this.transform[5])}localToMap(t){return w(this.transformInv[0]*t.x+this.transformInv[2]*t.y+this.transformInv[4],this.transformInv[1]*t.x+this.transformInv[3]*t.y+this.transformInv[5],this._defaultZ)}}class v extends R{constructor(t,r){super(t.spatialReference),this.view=t,this.defaultZ=null,this.pWS=p(),this.tangentFrameUpWS=p(),this.tangentFrameRightWS=p(),this.tangentFrameForwardWS=p(),this.localFrameRightWS=p(),this.localFrameUpWS=p(),this.worldToLocalTransform=i(),this.localToWorldTransform=i(),this.scale=1,this.scale=t.resolution,this.referenceMapPoint=r,this.defaultZ=r.hasZ?r.z:null;const e=t.state.camera.viewRight;this.view.renderCoordsHelper.toRenderCoords(this.referenceMapPoint,this.pWS),this.view.renderCoordsHelper.worldBasisAtPosition(this.pWS,u.X,this.tangentFrameRightWS),this.view.renderCoordsHelper.worldBasisAtPosition(this.pWS,u.Y,this.tangentFrameUpWS),this.view.renderCoordsHelper.worldBasisAtPosition(this.pWS,u.Z,this.tangentFrameForwardWS);const s=p();n(s,this.tangentFrameForwardWS,l(e,this.tangentFrameForwardWS)),h(this.localFrameRightWS,e,s),m(this.localFrameRightWS,this.localFrameRightWS),c(this.localFrameUpWS,this.tangentFrameForwardWS,this.localFrameRightWS),a(this.worldToLocalTransform,this.localFrameRightWS,this.tangentFrameRightWS),o(this.localToWorldTransform,this.worldToLocalTransform)}get doUnnormalization(){return"global"===this.view.viewingMode}makeMapPoint(t,r){return w(t,r,this.defaultZ)}mapToLocal(t){const r=p();this.view.renderCoordsHelper.toRenderCoords(new d({x:t[0],y:t[1],spatialReference:this.spatialReference}),r),f(r,r,this.worldToLocalTransform);const e=this.view.renderCoordsHelper.fromRenderCoords(r,new d({spatialReference:this.view.spatialReference}));return null!=e?g(e.x/this.scale,e.y/this.scale):null}localToMap(t){const r=p();this.view.renderCoordsHelper.toRenderCoords(new d({x:t.x*this.scale,y:t.y*this.scale,spatialReference:this.spatialReference}),r),f(r,r,this.localToWorldTransform);const e=this.view.renderCoordsHelper.fromRenderCoords(r,new d({spatialReference:this.view.spatialReference}));return null!=e?w(e.x,e.y,this.defaultZ):null}}function F(t,r){if("2d"===t.type)return new W(t.state.transform,t.spatialReference,r.length>2?r[2]:null);if("3d"===t.type){const e=r.length>2?new d({x:r[0],y:r[1],z:r[2],spatialReference:t.spatialReference}):new d({x:r[0],y:r[1],spatialReference:t.spatialReference});return new v(t,e)}return null}export{W as AffineCoordinateSystem,v as SceneViewCoordinateSystem,R as SurfaceCoordinateSystem,F as createViewAlignedCoordinateSystem,w as makeMapPoint,g as makeSurfacePoint};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import"../../../geometry.js";import{valueInUnit as e,createLength as n,createAngle as t}from"../../../core/quantityUtils.js";import{verticalLengthUnitFromSpatialReference as r,lengthUnitFromSpatialReference as o}from"../../../core/unitUtils.js";import{d as i,c as l,g as u}from"../../../chunks/vec32.js";import{projectVectorToVector as s}from"../../../geometry/projection/projectVectorToVector.js";import{geodesicCompatibleSpatialReference as c}from"../../../geometry/support/geodesicUtils.js";import{makeDehydratedPoint as a}from"../../../layers/graphics/dehydratedPoint.js";import{getConvertedElevationFromXYZ as f}from"../../../support/elevationInfoUtils.js";import{CoordinateConstraint as m,constraintOrSet as d,VerticalCylinderConstraint as p,HorizontalPlaneConstraint as v,GeodesicConstraint as g,PointConstraint as R,VerticalHalfPlaneConstraint as j}from"./constraints.js";import{fromPoint as w,createWritable as y,toElevationAlignedDehydratedPoint as h}from"./normalizedPoint.js";import{getDegreesGeographic as x,DirectionMode as S,directionBetweenPoints as I,pointFromDistanceAlongAzimuth as U}from"../../support/angularMeasurementUtils.js";import M from"../../../geometry/SpatialReference.js";function Z(e,n,t,r,o,i){let l="geodesic",u=c(t);const a=y();return w(e,n,r,a),a[2]=0,u&&s(a,t,a,u)||(l="euclidean",u=t),{mode:l,view:n,elevationInfo:r,hasZ:o,directionMode:i,spatialReference:e.spatialReference,measurementSR:u,origin:a}}function b(n,t,r){if(null==t||null==n)return;const i=o(r.measurementSR);if(null==i)return;const l=G(n,r);if(null==l)return;const u=e(t,i);return new p(l,u)}function A(e,n,r,o){if(null==r||null==e)return;const i=G(e,o);if(null==i)return;const l=x(r),u=10,s=e=>{if(null==e)return;const n=y(),r=t(e,"degrees","geographic");return U(n,i,o.measurementSR,u,r,o.mode)?new j(i,n):void 0},c=()=>{if(null!=n&&null!=e)return x(I(n,e))};switch(o.directionMode){case S.Absolute:return s(l);case S.Relative:{const e=c();if(null==e)return;return s(e+l)}case S.RelativeBilateral:{const e=c();if(null==e)return;return d([s(e+l),s(e-l)])}}}function B(e,n){const t=C(e,n);return null!=t?new v(t):void 0}function P(e,n,t){const{context:r,longitude:o,latitude:i,direction:l,distance:u,elevation:s}=t;if(null!=o||null!=i||null!=u||null!=s||null!=l){if(null!=o||null!=i){const e=x(o),n=x(i),t=C(s,r);return new m(e,n,t)}return T(e,n,t)}}function T(n,t,{context:r,direction:o,distance:i,elevation:l}){if(null==t)return B(l,r);const{view:u,elevationInfo:c,measurementSR:a}=r,f=w(t,u,c);if(!a||!s(f,t.spatialReference,E,a))return;const[m,p]=E,v=null!=i?e(i,"meters"):void 0,j=x(o),y=C(l,r),h=e=>{const n=new g([m,p],a,v,y,e);return null==v||null==e||null==y&&r.hasZ?n:new R(n.closestTo(f))};if(null==j)return h(void 0);const U=()=>{if(null!=n&&null!=t)return x(I(n,t))};switch(r.directionMode){case S.Absolute:return h(j);case S.Relative:{const e=U();if(null==e)return;return h(e+j)}case S.RelativeBilateral:{const e=U();if(null==e)return;return d([h(e+j),h(e-j)])}}}function V(e){return"geodesic"===e.context.mode?P(null,null,e):q(e)}function k(e,n,t){const{context:r,x:o,y:i,distance:l,direction:u,elevation:s}=t;return"geodesic"===r.mode?P(n,e,t):null!=o||null!=i?q(t):z([b(e,l,r),A(e,n,u,r),B(s,r)])}function q({x:e,y:n,elevation:t,context:r}){J.x=e?.value??0,J.y=n?.value??0,J.spatialReference=r.spatialReference;const o=G(J,r,F);return new m(null!=e&&null!=o?o[0]:void 0,null!=n&&null!=o?o[1]:void 0,C(t,r))}function z(e){let n;for(const t of e)t&&(n=n?.intersect(t)??t);return n}function G(e,n,t=y()){const{view:r,elevationInfo:o,measurementSR:l,origin:u,mode:c}=n;if(w(e,r,o,t),s(t,e.spatialReference,t,l))return"geodesic"!==c&&i(t,t,u),t}function W(e,n,t,r){const{view:o,measurementSR:i,spatialReference:c,origin:a,mode:f}=t;if("geodesic"===f?l(H,e):u(H,e,a),s(H,i,H,c))return h(H,o,n,t,r)}function C(e,n){return D(e,n)?.value??void 0}function D(t,{view:o,origin:i,elevationInfo:l,hasZ:u,measurementSR:s}){if(null==t||!u)return;const c=r(s);if(null==c)return;const[a,m]=i,d=e(t,c),p="3d"===o?.type?f(o,a,m,d,s,l):d;return null!=p?n(p,c):void 0}const E=y(),F=y(),H=y(),J=a(0,0,0,M.WGS84);export{W as constraintSpaceToPoint,Z as getConstraintContext,P as getGeodesicConstraint,V as getPointConstraint,k as getPolylineOrPolygonConstraint,z as intersectAll,G as pointToConstraintSpace};
5
+ import{valueInUnit as e,createLength as n,createAngle as t}from"../../../core/quantityUtils.js";import{verticalLengthUnitFromSpatialReference as r,lengthUnitFromSpatialReference as o}from"../../../core/unitUtils.js";import{d as i,c as l,g as u}from"../../../chunks/vec32.js";import s from"../../../geometry/SpatialReference.js";import{projectVectorToVector as c}from"../../../geometry/projection/projectVectorToVector.js";import{geodesicCompatibleSpatialReference as a}from"../../../geometry/support/geodesicUtils.js";import{makeDehydratedPoint as f}from"../../../layers/graphics/dehydratedPoint.js";import{getConvertedElevationFromXYZ as m}from"../../../support/elevationInfoUtils.js";import{CoordinateConstraint as d,constraintOrSet as p,VerticalCylinderConstraint as v,HorizontalPlaneConstraint as g,GeodesicConstraint as R,PointConstraint as w,VerticalHalfPlaneConstraint as j}from"./constraints.js";import{fromPoint as y,createWritable as h,toElevationAlignedDehydratedPoint as x}from"./normalizedPoint.js";import{getDegreesGeographic as S,DirectionMode as I,directionBetweenPoints as U,pointFromDistanceAlongAzimuth as M}from"../../support/angularMeasurementUtils.js";function Z(e,n,t,r,o,i){let l="geodesic",u=a(t);const s=h();return y(e,n,r,s),s[2]=0,u&&c(s,t,s,u)||(l="euclidean",u=t),{mode:l,view:n,elevationInfo:r,hasZ:o,directionMode:i,spatialReference:e.spatialReference,measurementSR:u,origin:s}}function b(n,t,r){if(null==t||null==n)return;const i=o(r.measurementSR);if(null==i)return;const l=G(n,r);if(null==l)return;const u=e(t,i);return new v(l,u)}function A(e,n,r,o){if(null==r||null==e)return;const i=G(e,o);if(null==i)return;const l=S(r),u=10,s=e=>{if(null==e)return;const n=h(),r=t(e,"degrees","geographic");return M(n,i,o.measurementSR,u,r,o.mode)?new j(i,n):void 0},c=()=>{if(null!=n&&null!=e)return S(U(n,e))};switch(o.directionMode){case I.Absolute:return s(l);case I.Relative:{const e=c();if(null==e)return;return s(e+l)}case I.RelativeBilateral:{const e=c();if(null==e)return;return p([s(e+l),s(e-l)])}}}function B(e,n){const t=C(e,n);return null!=t?new g(t):void 0}function P(e,n,t){const{context:r,longitude:o,latitude:i,direction:l,distance:u,elevation:s}=t;if(null!=o||null!=i||null!=u||null!=s||null!=l){if(null!=o||null!=i){const e=S(o),n=S(i),t=C(s,r);return new d(e,n,t)}return T(e,n,t)}}function T(n,t,{context:r,direction:o,distance:i,elevation:l}){if(null==t)return B(l,r);const{view:u,elevationInfo:s,measurementSR:a}=r,f=y(t,u,s);if(!a||!c(f,t.spatialReference,E,a))return;const[m,d]=E,v=null!=i?e(i,"meters"):void 0,g=S(o),j=C(l,r),h=e=>{const n=new R([m,d],a,v,j,e);return null==v||null==e||null==j&&r.hasZ?n:new w(n.closestTo(f))};if(null==g)return h(void 0);const x=()=>{if(null!=n&&null!=t)return S(U(n,t))};switch(r.directionMode){case I.Absolute:return h(g);case I.Relative:{const e=x();if(null==e)return;return h(e+g)}case I.RelativeBilateral:{const e=x();if(null==e)return;return p([h(e+g),h(e-g)])}}}function V(e){return"geodesic"===e.context.mode?P(null,null,e):q(e)}function k(e,n,t){const{context:r,x:o,y:i,distance:l,direction:u,elevation:s}=t;return"geodesic"===r.mode?P(n,e,t):null!=o||null!=i?q(t):z([b(e,l,r),A(e,n,u,r),B(s,r)])}function q({x:e,y:n,elevation:t,context:r}){J.x=e?.value??0,J.y=n?.value??0,J.spatialReference=r.spatialReference;const o=G(J,r,F);return new d(null!=e&&null!=o?o[0]:void 0,null!=n&&null!=o?o[1]:void 0,C(t,r))}function z(e){let n;for(const t of e)t&&(n=n?.intersect(t)??t);return n}function G(e,n,t=h()){const{view:r,elevationInfo:o,measurementSR:l,origin:u,mode:s}=n;if(y(e,r,o,t),c(t,e.spatialReference,t,l))return"geodesic"!==s&&i(t,t,u),t}function W(e,n,t,r){const{view:o,measurementSR:i,spatialReference:s,origin:a,mode:f}=t;if("geodesic"===f?l(H,e):u(H,e,a),c(H,i,H,s))return x(H,o,n,t,r)}function C(e,n){return D(e,n)?.value??void 0}function D(t,{view:o,origin:i,elevationInfo:l,hasZ:u,measurementSR:s}){if(null==t||!u)return;const c=r(s);if(null==c)return;const[a,f]=i,d=e(t,c),p="3d"===o?.type?m(o,a,f,d,s,l):d;return null!=p?n(p,c):void 0}const E=h(),F=h(),H=h(),J=f(0,0,0,s.WGS84);export{W as constraintSpaceToPoint,Z as getConstraintContext,P as getGeodesicConstraint,V as getPointConstraint,k as getPolylineOrPolygonConstraint,z as intersectAll,G as pointToConstraintSpace};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../../chunks/tslib.es6.js";import"../../../../../geometry.js";import t from"../../../../../core/Evented.js";import{createResolver as i,throwIfAborted as r}from"../../../../../core/promiseUtils.js";import{watch as s,whenOnce as a,sync as n}from"../../../../../core/reactiveUtils.js";import{property as o}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as l}from"../../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as u}from"../../../../../core/support/UpdatingHandles.js";import d from"../../../../../geometry/SpatialReference.js";import{executeQueryForSnapping as c}from"../../../../../layers/graphics/data/executeQueryForSnapping.js";import p from"../../../../../layers/graphics/data/FeatureStore.js";import{QueryEngine as h}from"../../../../../layers/graphics/data/QueryEngine.js";import f from"../../../../../layers/support/TileInfo.js";import m from"../../../../../rest/support/Query.js";import g from"../../../../../symbols/support/ElevationInfo.js";import{getSnappingCandidateElevationAligner as y}from"../snappingCandidateElevationAlignment.js";import{getSnappingCandidateElevationFilter as _}from"../snappingCandidateElevationFilter.js";import{getSymbologySnappingCandidatesFetcher as S}from"../symbologySnappingCandidates.js";import{FeatureServiceTiledFetcher as F}from"./FeatureServiceTiledFetcher.js";import{FeatureServiceTileStore as v}from"./FeatureServiceTileStore.js";import{fromJSON as w}from"../../../../../geometry/support/jsonUtils.js";let I=class extends t.EventedAccessor{constructor(){super(...arguments),this._isInitializing=!0,this.remoteClient=null,this._whenSetup=i(),this._elevationAligner=y(),this._elevationFilter=_(),this._symbologyCandidatesFetcher=S(),this._updatingHandles=new u,this._alignPointsInFeatures=async(e,t)=>{const i={query:e},s=await this.remoteClient.invoke("alignElevation",i,{signal:t});return r(t),s},this._getSymbologyCandidates=async(e,t)=>{const i={candidates:e,spatialReference:this._spatialReference.toJSON()},s=await this.remoteClient.invoke("getSymbologyCandidates",i,{signal:t});return r(t),s}}get updating(){return this._isInitializing||this._updatingHandles.updating||this._featureFetcher.updating}destroy(){this._featureFetcher?.destroy(),this._queryEngine?.destroy(),this._featureStore?.clear()}async setup(e){if(this.destroyed)return{result:{}};const{geometryType:t,objectIdField:i,timeInfo:r,fieldsIndex:a}=e.serviceInfo,{hasZ:o}=e,l=d.fromJSON(e.spatialReference);this._spatialReference=l,this._featureStore=new p({...e.serviceInfo,hasZ:o,hasM:!1}),this._queryEngine=new h({spatialReference:e.spatialReference,featureStore:this._featureStore,geometryType:t,fieldsIndex:a,hasZ:o,hasM:!1,objectIdField:i,timeInfo:r}),this._featureFetcher=new F({store:new v({featureStore:this._featureStore}),url:e.serviceInfo.url,objectIdField:e.serviceInfo.objectIdField,globalIdField:e.serviceInfo.globalIdField,capabilities:e.serviceInfo.capabilities,spatialReference:l,sourceSpatialReference:d.fromJSON(e.serviceInfo.spatialReference),customParameters:e.configuration.customParameters});const u="3d"===e.configuration.viewType;return this._elevationAligner=y(u,{elevationInfo:null!=e.elevationInfo?g.fromJSON(e.elevationInfo):null,alignPointsInFeatures:this._alignPointsInFeatures}),this._elevationFilter=_(u),this.addHandles([s((()=>this._featureFetcher.availability),(e=>this.emit("notify-availability",{availability:e})),n),s((()=>this.updating),(()=>this._notifyUpdating()))]),this._whenSetup.resolve(),this._isInitializing=!1,this.configure(e.configuration)}async configure(e){return await this._updatingHandles.addPromise(this._whenSetup.promise),this._updateFeatureFetcherConfiguration(e),C}async setSuspended(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),r(t),this._featureFetcher.suspended=e,C}async updateOutFields(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),r(t),this._featureFetcher.outFields=new Set(e??[]),C}async fetchCandidates(e,t){await this._whenSetup.promise,r(t);const i=b(e),s=t?.signal,a=await c(this._queryEngine,i,s);r(s);const n=await this._elevationAligner.alignCandidates(a.candidates,d.fromJSON(e.point.spatialReference)??d.WGS84,s);r(s);const o=await this._symbologyCandidatesFetcher.fetch(n,s);r(s);const l=0===o.length?n:n.concat(o);return{result:{candidates:this._elevationFilter.filter(i,l)}}}async updateTiles(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),r(t),this._featureFetcher.tileSize=e.tileSize,this._featureFetcher.tilesOfInterest=e.tiles,this._featureFetcher.tileInfo=null!=e.tileInfo?f.fromJSON(e.tileInfo):null,C}async refresh(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),r(t),this._featureFetcher.refresh(),C}async whenNotUpdating(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),r(t),await a((()=>!this.updating),t),r(t),C}async getDebugInfo(e,t){return r(t),{result:this._featureFetcher.debugInfo}}async handleEdits(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),r(t),await this._updatingHandles.addPromise(this._featureFetcher.handleEdits(e)),r(t),C}async setHistoricMoment(e,t){return this._featureFetcher.setHistoricMoment(e.moment),C}async notifyElevationSourceChange(e,t){return this._elevationAligner.notifyElevationSourceChange(),C}async notifySymbologyChange(e,t){return this._symbologyCandidatesFetcher.notifySymbologyChange(),C}async setSymbologySnappingSupported(e){return this._symbologyCandidatesFetcher=S(e,this._getSymbologyCandidates),C}_updateFeatureFetcherConfiguration(e){this._featureFetcher.filter=null!=e.filter?m.fromJSON(e.filter):null,this._featureFetcher.customParameters=e.customParameters}_notifyUpdating(){this.emit("notify-updating",{updating:this.updating})}};e([o({readOnly:!0})],I.prototype,"updating",null),e([o()],I.prototype,"_isInitializing",void 0),I=e([l("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorker")],I);const j=I;function b(e){if(!e.filter)return{...e,query:{where:"1=1"}};const{distance:t,units:i,spatialRel:r,where:s,timeExtent:a,objectIds:n}=e.filter,o={geometry:e.filter.geometry?w(e.filter.geometry):void 0,distance:t,units:i,spatialRel:r,timeExtent:a,objectIds:n,where:s??"1=1"};return{...e,query:o}}const C={result:{}};export{j as default};
5
+ import{_ as e}from"../../../../../chunks/tslib.es6.js";import t from"../../../../../core/Evented.js";import{createResolver as i,throwIfAborted as r}from"../../../../../core/promiseUtils.js";import{watch as s,whenOnce as a,sync as n}from"../../../../../core/reactiveUtils.js";import{property as o}from"../../../../../core/accessorSupport/decorators/property.js";import"../../../../../core/has.js";import"../../../../../core/Logger.js";import"../../../../../core/RandomLCG.js";import{subclass as l}from"../../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as u}from"../../../../../core/support/UpdatingHandles.js";import d from"../../../../../geometry/SpatialReference.js";import{fromJSON as c}from"../../../../../geometry/support/jsonUtils.js";import{executeQueryForSnapping as h}from"../../../../../layers/graphics/data/executeQueryForSnapping.js";import p from"../../../../../layers/graphics/data/FeatureStore.js";import{QueryEngine as f}from"../../../../../layers/graphics/data/QueryEngine.js";import m from"../../../../../layers/support/TileInfo.js";import g from"../../../../../rest/support/Query.js";import y from"../../../../../symbols/support/ElevationInfo.js";import{getSnappingCandidateElevationAligner as _}from"../snappingCandidateElevationAlignment.js";import{getSnappingCandidateElevationFilter as S}from"../snappingCandidateElevationFilter.js";import{getSymbologySnappingCandidatesFetcher as F}from"../symbologySnappingCandidates.js";import{FeatureServiceTiledFetcher as v}from"./FeatureServiceTiledFetcher.js";import{FeatureServiceTileStore as w}from"./FeatureServiceTileStore.js";let I=class extends t.EventedAccessor{constructor(){super(...arguments),this._isInitializing=!0,this.remoteClient=null,this._whenSetup=i(),this._elevationAligner=_(),this._elevationFilter=S(),this._symbologyCandidatesFetcher=F(),this._updatingHandles=new u,this._alignPointsInFeatures=async(e,t)=>{const i={query:e},s=await this.remoteClient.invoke("alignElevation",i,{signal:t});return r(t),s},this._getSymbologyCandidates=async(e,t)=>{const i={candidates:e,spatialReference:this._spatialReference.toJSON()},s=await this.remoteClient.invoke("getSymbologyCandidates",i,{signal:t});return r(t),s}}get updating(){return this._isInitializing||this._updatingHandles.updating||this._featureFetcher.updating}destroy(){this._featureFetcher?.destroy(),this._queryEngine?.destroy(),this._featureStore?.clear()}async setup(e){if(this.destroyed)return{result:{}};const{geometryType:t,objectIdField:i,timeInfo:r,fieldsIndex:a}=e.serviceInfo,{hasZ:o}=e,l=d.fromJSON(e.spatialReference);this._spatialReference=l,this._featureStore=new p({...e.serviceInfo,hasZ:o,hasM:!1}),this._queryEngine=new f({spatialReference:e.spatialReference,featureStore:this._featureStore,geometryType:t,fieldsIndex:a,hasZ:o,hasM:!1,objectIdField:i,timeInfo:r}),this._featureFetcher=new v({store:new w({featureStore:this._featureStore}),url:e.serviceInfo.url,objectIdField:e.serviceInfo.objectIdField,globalIdField:e.serviceInfo.globalIdField,capabilities:e.serviceInfo.capabilities,spatialReference:l,sourceSpatialReference:d.fromJSON(e.serviceInfo.spatialReference),customParameters:e.configuration.customParameters});const u="3d"===e.configuration.viewType;return this._elevationAligner=_(u,{elevationInfo:null!=e.elevationInfo?y.fromJSON(e.elevationInfo):null,alignPointsInFeatures:this._alignPointsInFeatures}),this._elevationFilter=S(u),this.addHandles([s((()=>this._featureFetcher.availability),(e=>this.emit("notify-availability",{availability:e})),n),s((()=>this.updating),(()=>this._notifyUpdating()))]),this._whenSetup.resolve(),this._isInitializing=!1,this.configure(e.configuration)}async configure(e){return await this._updatingHandles.addPromise(this._whenSetup.promise),this._updateFeatureFetcherConfiguration(e),C}async setSuspended(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),r(t),this._featureFetcher.suspended=e,C}async updateOutFields(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),r(t),this._featureFetcher.outFields=new Set(e??[]),C}async fetchCandidates(e,t){await this._whenSetup.promise,r(t);const i=b(e),s=t?.signal,a=await h(this._queryEngine,i,s);r(s);const n=await this._elevationAligner.alignCandidates(a.candidates,d.fromJSON(e.point.spatialReference)??d.WGS84,s);r(s);const o=await this._symbologyCandidatesFetcher.fetch(n,s);r(s);const l=0===o.length?n:n.concat(o);return{result:{candidates:this._elevationFilter.filter(i,l)}}}async updateTiles(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),r(t),this._featureFetcher.tileSize=e.tileSize,this._featureFetcher.tilesOfInterest=e.tiles,this._featureFetcher.tileInfo=null!=e.tileInfo?m.fromJSON(e.tileInfo):null,C}async refresh(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),r(t),this._featureFetcher.refresh(),C}async whenNotUpdating(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),r(t),await a((()=>!this.updating),t),r(t),C}async getDebugInfo(e,t){return r(t),{result:this._featureFetcher.debugInfo}}async handleEdits(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),r(t),await this._updatingHandles.addPromise(this._featureFetcher.handleEdits(e)),r(t),C}async setHistoricMoment(e,t){return this._featureFetcher.setHistoricMoment(e.moment),C}async notifyElevationSourceChange(e,t){return this._elevationAligner.notifyElevationSourceChange(),C}async notifySymbologyChange(e,t){return this._symbologyCandidatesFetcher.notifySymbologyChange(),C}async setSymbologySnappingSupported(e){return this._symbologyCandidatesFetcher=F(e,this._getSymbologyCandidates),C}_updateFeatureFetcherConfiguration(e){this._featureFetcher.filter=null!=e.filter?g.fromJSON(e.filter):null,this._featureFetcher.customParameters=e.customParameters}_notifyUpdating(){this.emit("notify-updating",{updating:this.updating})}};e([o({readOnly:!0})],I.prototype,"updating",null),e([o()],I.prototype,"_isInitializing",void 0),I=e([l("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorker")],I);const j=I;function b(e){if(!e.filter)return{...e,query:{where:"1=1"}};const{distance:t,units:i,spatialRel:r,where:s,timeExtent:a,objectIds:n}=e.filter,o={geometry:e.filter.geometry?c(e.filter.geometry):void 0,distance:t,units:i,spatialRel:r,timeExtent:a,objectIds:n,where:s??"1=1"};return{...e,query:o}}const C={result:{}};export{j as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{_ as o}from"../../../chunks/tslib.es6.js";import"../../../geometry.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as e}from"../../../core/accessorSupport/decorators/subclass.js";import t from"../../../geometry/Geometry.js";import{fromJSON as s}from"../../../geometry/support/jsonUtils.js";import m from"./ClipArea.js";import p from"../../../geometry/Extent.js";import i from"../../../geometry/Polygon.js";var y;const c={base:t,key:"type",typeMap:{extent:p,polygon:i}};let n=y=class extends m{constructor(o){super(o),this.type="geometry",this.geometry=null}clone(){return new y({geometry:this.geometry?.clone()??null})}commitVersionProperties(){this.commitProperty("geometry")}};o([r({types:c,json:{read:s,write:!0}})],n.prototype,"geometry",void 0),n=y=o([e("esri.views.layers.support.Geometry")],n);const a=n;export{a as default};
5
+ import{_ as o}from"../../../chunks/tslib.es6.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as e}from"../../../core/accessorSupport/decorators/subclass.js";import t from"../../../geometry/Extent.js";import s from"../../../geometry/Geometry.js";import m from"../../../geometry/Polygon.js";import{fromJSON as p}from"../../../geometry/support/jsonUtils.js";import i from"./ClipArea.js";var y;const c={base:s,key:"type",typeMap:{extent:t,polygon:m}};let n=y=class extends i{constructor(o){super(o),this.type="geometry",this.geometry=null}clone(){return new y({geometry:this.geometry?.clone()??null})}commitVersionProperties(){this.commitProperty("geometry")}};o([r({types:c,json:{read:p,write:!0}})],n.prototype,"geometry",void 0),n=y=o([e("esri.views.layers.support.Geometry")],n);const a=n;export{a as default};
@@ -0,0 +1,4 @@
1
+ import "../../interfaces";
2
+
3
+ import HighlightOptions = __esri.HighlightOptions;
4
+ export default HighlightOptions;
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import"../../geometry.js";import{getMetersPerUnitForSR as e}from"../../core/unitUtils.js";import{calculateTolerance as t}from"../../renderers/support/clickToleranceUtils.js";import n from"../../geometry/Extent.js";function r(t,r,i,a=new n){let o=0;if("2d"===i.type)o=r*(i.resolution??0);else if("3d"===i.type){const n=i.overlayPixelSizeInMapUnits(t),a=i.basemapSpatialReference;o=null==a||a.equals(i.spatialReference)?r*n:e(a)/e(i.spatialReference)}const s=t.x-o,l=t.y-o,m=t.x+o,p=t.y+o,{spatialReference:c}=i;return a.xmin=Math.min(s,m),a.ymin=Math.min(l,p),a.xmax=Math.max(s,m),a.ymax=Math.max(l,p),a.spatialReference=c,a}function i(e,n,i){const o=i.toMap(e);if(null==o)return!1;return r(o,t(),i,a).intersects(n)}const a=new n;export{r as createQueryGeometry,i as intersectsDrapedGeometry};
5
+ import{getMetersPerUnitForSR as e}from"../../core/unitUtils.js";import t from"../../geometry/Extent.js";import{calculateTolerance as n}from"../../renderers/support/clickToleranceUtils.js";function r(n,r,i,a=new t){let s=0;if("2d"===i.type)s=r*(i.resolution??0);else if("3d"===i.type){const t=i.overlayPixelSizeInMapUnits(n),a=i.basemapSpatialReference;s=null==a||a.equals(i.spatialReference)?r*t:e(a)/e(i.spatialReference)}const o=n.x-s,l=n.y-s,c=n.x+s,m=n.y+s,{spatialReference:p}=i;return a.xmin=Math.min(o,c),a.ymin=Math.min(l,m),a.xmax=Math.max(o,c),a.ymax=Math.max(l,m),a.spatialReference=p,a}function i(e,t,i){const s=i.toMap(e);if(null==s)return!1;return r(s,n(),i,a).intersects(t)}const a=new t;export{r as createQueryGeometry,i as intersectsDrapedGeometry};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{_ as o}from"../../chunks/tslib.es6.js";import{geometryTypes as r}from"../../geometry.js";import e from"../../core/Clonable.js";import t from"../../core/JSONSupport.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import{fromJSON as i}from"../../geometry/support/jsonUtils.js";let m=class extends(e.ClonableMixin(t)){constructor(o){super(o),this.geometry=null,this.where=null}};o([s({types:r,json:{read:i,write:!0}})],m.prototype,"geometry",void 0),o([s({type:String,json:{write:!0}})],m.prototype,"where",void 0),m=o([p("esri.webdoc.geotriggersInfo.FeatureFilter")],m);const c=m;export{c as default};
5
+ import{_ as o}from"../../chunks/tslib.es6.js";import r from"../../core/Clonable.js";import e from"../../core/JSONSupport.js";import{property as t}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";import{fromJSON as p}from"../../geometry/support/jsonUtils.js";import{geometryTypes as i}from"../../geometry/support/typeUtils.js";let m=class extends(r.ClonableMixin(e)){constructor(o){super(o),this.geometry=null,this.where=null}};o([t({types:i,json:{read:p,write:!0}})],m.prototype,"geometry",void 0),o([t({type:String,json:{write:!0}})],m.prototype,"where",void 0),m=o([s("esri.webdoc.geotriggersInfo.FeatureFilter")],m);const c=m;export{c as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import"../../geometry.js";import t from"../../Graphic.js";import"../../intl.js";import"../../symbols.js";import{multiplyOpacity as r,getContrast as s,BrightnessThreshold as i}from"../../core/colorUtils.js";import{destroyMaybe as a}from"../../core/maybe.js";import{watch as n,initial as o}from"../../core/reactiveUtils.js";import{formatDecimal as m,formatImperialArea as l,formatMetricArea as p,formatImperialLength as c,formatMetricLength as u}from"../../core/unitFormatUtils.js";import{convertUnit as h}from"../../core/unitUtils.js";import{property as d}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as g}from"../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as v}from"../../core/support/UpdatingHandles.js";import{geodesicDensify as y,simplify as f,geodesicLength as _,geodesicArea as w,planarLength as L,planarArea as b}from"../../geometry/geometryEngine.js";import{isLoaded as j,project as S}from"../../geometry/projection.js";import{isSupported as G,geodesicDensify as M,geodesicLengths as A,geodesicAreas as x}from"../../geometry/support/geodesicUtils.js";import k from"../../layers/GraphicsLayer.js";import{ViewingMode as q}from"../../views/ViewingMode.js";import{SnappingVisualizer2D as C}from"../../views/2d/interactive/SnappingVisualizer2D.js";import R from"../../views/draw/Draw.js";import{createCoordinateHelper as H}from"../../views/interactive/coordinateHelper.js";import{createManipulatorDragEventPipeline as U,screenToMap as O,dragManipulatedObject as T}from"../../views/interactive/dragEventPipeline.js";import{GraphicManipulator as z}from"../../views/interactive/GraphicManipulator.js";import{InteractiveToolBase as D}from"../../views/interactive/InteractiveToolBase.js";import{EditGeometry as E}from"../../views/interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as P}from"../../views/interactive/editGeometry/EditGeometryOperations.js";import{SnappingContext as W}from"../../views/interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as V}from"../../views/interactive/snapping/SnappingDragPipelineStep.js";import{acquire as F}from"../../views/interactive/snapping/SnappingManagerPool.js";import{setupSnappingToggleHandles as I}from"../../views/interactive/snapping/snappingUtils.js";import{fetchMessageBundle as B}from"../../intl/messages.js";import{onLocaleChange as J}from"../../intl/locale.js";import K from"../../geometry/Point.js";import N from"../../symbols/SimpleFillSymbol.js";import Q from"../../symbols/SimpleLineSymbol.js";import X from"../../symbols/TextSymbol.js";import Y from"../../symbols/Font.js";import Z from"../../symbols/SimpleMarkerSymbol.js";import $ from"../../geometry/Polyline.js";import ee from"../../geometry/SpatialReference.js";import te from"../../geometry/Polygon.js";const re=1e5;let se=class extends D{constructor(e){super(e),this._drawActive=!1,this._measurementLayer=new k({internal:!0,listMode:"hide",visible:!1}),this._manipulatorLayer=new k({internal:!0,listMode:"hide",visible:!1}),this._snappingLayer=new k({internal:!0,listMode:"hide",visible:!1}),this._updatingHandles=new v,this._vertices=[],this.measurement=null,this.measurementLabel=null}initialize(){B("esri/core/t9n/Units").then((e=>{this.messages=e}));const e=this.view;this._draw=new R({view:e}),e.map.addMany([this._measurementLayer,this._manipulatorLayer,this._snappingLayer]),e.focus(),this._snappingManagerResult=F(e),this.addHandles([J((async()=>{this.messages=await B("esri/core/t9n/Units")})),n((()=>[this.unit,this.messages]),(()=>{this._updateGraphics()}),o),n((()=>[this.view.effectiveTheme.accentColor,this.view.effectiveTheme.textColor]),(()=>{if(!this._vertices.length)return;const e=this._vertices.map((({coord:e})=>e));for(const{handle:t}of this._vertices)t.remove();this._vertices=[],this._measurementLayer.removeAll(),this._manipulatorLayer.removeAll(),this._snappingLayer.removeAll(),this.manipulators.removeAll(),this._updateSketch(e)})),n((()=>this.snappingOptions.featureSources),(e=>{for(const t of e)t.layer!==this._measurementLayer&&t.layer!==this._manipulatorLayer||(t.enabled=!1)}),o),this._snappingManagerResult]),I(this)}destroy(){const{map:e}=this.view;this._draw.view=null,this._draw=a(this._draw),e.removeMany([this._measurementLayer,this._manipulatorLayer,this._snappingLayer]),this._measurementLayer.removeAll(),this._manipulatorLayer.removeAll(),this._snappingLayer.removeAll(),this._set("measurement",null),this._set("measurementLabel",null),this._measurementLayer=a(this._measurementLayer),this._manipulatorLayer=a(this._manipulatorLayer),this._snappingLayer=a(this._snappingLayer),this._updatingHandles=a(this._updatingHandles),this._resetVertices()}get _snappingManager(){return this._snappingManagerResult.snappingManager}get cursor(){return this._drawActive?"crosshair":null}set editable(e){this._set("editable",e),e||this._draw.reset()}get snappingOptions(){return this._snappingManager.options}get updating(){return this._updatingHandles.updating||this._snappingManager.updating}onActivate(){this._drawActive||0!==this._vertices.length||this._startSketch()}onShow(){this._measurementLayer.visible=!0,this._manipulatorLayer.visible=!0,this._snappingLayer.visible=!0}onHide(){this._measurementLayer.visible=!1,this._manipulatorLayer.visible=!1,this._snappingLayer.visible=!1}reset(){this.manipulators.removeAll(),this._resetVertices(),this._measurementLayer.removeAll(),this._manipulatorLayer.removeAll(),this._set("measurement",null),this._set("measurementLabel",null),this._draw.reset(),this._drawActive=!1}_getSnappingContext(e){return new W({elevationInfo:{mode:"on-the-ground",offset:0},pointer:e,editGeometryOperations:new P(new E("point",H(!1,!1,this.view.spatialReference)),q.Local),visualizer:new C(this._snappingLayer)})}_resetVertices(){for(const{handle:e}of this._vertices)e.remove();this._vertices=[]}_startSketch(){this._drawActive=!0;const e=this._snappingManager,t=this._draw.create("polyline",{mode:"click",snappingManager:e});t.on(["vertex-add","vertex-update","vertex-remove","cursor-update","undo","redo"],(e=>this._updateSketch(e.vertices))),t.on("draw-complete",(()=>this._stopSketch()))}_stopSketch(){if(this._vertices.length<3)return this.reset(),void this._startSketch();this.manipulators.forEach((({manipulator:e})=>{e.interactive=!0})),this._drawActive=!1,this.finishToolCreation()}_updateSketch(e){const t=this.view.spatialReference;if(t&&(!oe(t)||j())){for(;this._vertices.length>e.length;){const{handle:e,manipulator:t}=this._vertices.pop();e.remove(),this.manipulators.remove(t)}for(let r=this._vertices.length;r<e.length;r++){const[s,i]=e[r],a=new K({x:s,y:i,spatialReference:t}),n=ie(a,this.view,this._manipulatorLayer);this.manipulators.add(n);const o=P.fromGeometry(a,q.Local);o.on("vertex-update",(e=>{const t=e.vertices.at(0);t&&(this._vertices[r].coord=[t.pos[0],t.pos[1]],this._updateGraphics())}));const m=U(n,((e,t,r,s)=>{const i=this._getSnappingContext(s),a=this._snappingManager,n=this._updatingHandles,{snappingStep:m}=V({snappingContext:i,snappingManager:a,updatingHandles:n});t.next(O(this.view)).next((t=>{if("start"===t.action){const r=new K(t.mapStart);e.graphic.geometry=r,o.trySetGeometry(r)}return t})).next(...m).next(T({operations:o})).next((()=>{e.graphic.geometry=o.data.geometry}))}));this._vertices.push({manipulator:n,coord:[s,i],handle:m})}if(this._vertices.length){const r=this._vertices.length-1,s=this._vertices[r],[i,a]=e[r];s.coord[0]===i&&s.coord[1]===a||(s.coord=[i,a],s.manipulator.graphic.geometry=new K({x:i,y:a,spatialReference:t}));const n=this._drawActive?this._vertices[r].manipulator:null;this.manipulators.forEach((({manipulator:e})=>{e.interactive=null==n||e!==n}))}this._updateGraphics()}}_updateGraphics(){if(this._vertices.length<2)return void this._measurementLayer.removeAll();const e=ae(this._vertices.map((({coord:e})=>e)),this.view.spatialReference);if(!e)return;const{measurement:a,fillGeometry:n,outlineGeometry:o}=e;this._set("measurement",a);const m=a?me(this.messages,a,this.unit):null;if(this._set("measurementLabel",m),!n&&!o)return;let l,p,c;const{graphics:u}=this._measurementLayer,h=3===u.length,{effectiveTheme:d}=this.view;h?(l=u.at(0),p=u.at(1),c=u.at(2)):(l=new t({symbol:new N({color:r(d.accentColor,.3),outline:null})}),p=new t({symbol:new Q({color:d.accentColor,width:2})}),c=new t({symbol:new X({color:d.textColor,font:new Y({size:14,family:"sans-serif"}),haloColor:r(s(d.textColor,i.Low),.5),haloSize:2})}),u.removeAll(),u.addMany([l,p,c])),l.geometry=n,p.geometry=o,c.geometry=n?.centroid,c.symbol.text=m?.area??""}};function ie(e,s,i){const a=8,n={style:"circle",color:r(s.effectiveTheme.accentColor,.5),outline:{type:"simple-line",width:0}},o=new Z({...n,size:a}),m=new Z({...n,size:1.5*a}),l=new t({geometry:e,symbol:o});return new z({view:s,layer:i,graphic:l,focusedSymbol:m})}function ae(e,t){if(2===e.length){const r=new $({paths:[e],spatialReference:t});let s;if(t.isGeographic)if(G(t))s=M(r,re);else{const e=S(r,ee.WGS84),i=M(e,re);s=S(i,t)}else s=t.isWebMercator?y(r,re,"meters"):r;return{measurement:null,fillGeometry:null,outlineGeometry:s}}e.push(e[0]);const r=new $({paths:[e],spatialReference:t}),s=new te({rings:[e],spatialReference:t});let i,a,n=null,o=null;if(t.isGeographic)if(G(t)){if(n=M(r,re),o=M(s,re),o=f(o),!o)return null;i=A([r],"meters")[0],a=x([o],"square-meters")[0]}else{const e=ee.WGS84,m=S(r,e),l=S(s,e);if(n=M(m,re),o=M(l,re),o=f(o),!o)return null;i=A([m],"meters")[0],a=x([o],"square-meters")[0],n=S(n,t),o=S(o,t)}else if(t.isWebMercator){if(n=y(r,re,"meters"),o=y(s,re,"meters"),o=f(o),!o)return null;i=_(r,"meters"),a=w(o,"square-meters")}else{if(n=r,o=f(s),!o)return null;i=L(r,"meters"),a=b(o,"square-meters")}return{measurement:{geometry:o,area:a,perimeter:i},fillGeometry:o,outlineGeometry:n}}function ne(e){return null!=e}function oe(e){if(!e)return!1;const{isGeographic:t,isWebMercator:r,isWGS84:s}=e;return t&&!s&&!G(e)||!t&&!r}function me(e,t,r){if(!t||!e)return null;const s={area:null,perimeter:null},{area:i,perimeter:a}=t;switch(r){case"metric":s.area=p(e,i,"square-meters");break;case"imperial":s.area=l(e,i,"square-meters");break;default:{const t=h(i,"square-meters",r);s.area=m(e,t,r);break}}const n=le(r);if(n)switch(n){case"metric":s.perimeter=u(e,a,"meters");break;case"imperial":s.perimeter=c(e,a,"meters");break;default:{const t=h(a,"meters",n);s.perimeter=m(e,t,n);break}}else s.perimeter="";return s}function le(e){switch(e){case"metric":case"ares":case"hectares":return"metric";case"imperial":case"acres":return"imperial";case"square-inches":return"inches";case"square-feet":return"feet";case"square-yards":return"yards";case"square-miles":return"miles";case"square-nautical-miles":return"nautical-miles";case"square-us-feet":return"us-feet";case"square-meters":return"meters";case"square-kilometers":return"kilometers";case"square-millimeters":return"millimeters";case"square-centimeters":return"centimeters";case"square-decimeters":return"decimeters";default:return null}}e([d()],se.prototype,"_drawActive",void 0),e([d({readOnly:!0})],se.prototype,"cursor",null),e([d({value:!0})],se.prototype,"editable",null),e([d({readOnly:!0})],se.prototype,"measurement",void 0),e([d({readOnly:!0})],se.prototype,"measurementLabel",void 0),e([d()],se.prototype,"messages",void 0),e([d()],se.prototype,"unit",void 0),e([d()],se.prototype,"updating",null),e([d({constructOnly:!0})],se.prototype,"view",void 0),se=e([g("esri.widgets.AreaMeasurement2D.AreaMeasurement2DTool")],se);export{se as AreaMeasurement2DTool,ae as createAreaMeasurementInfo2D,me as createAreaMeasurementLabel,oe as isProjectionEngineRequired,ne as isSupported};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../Graphic.js";import"../../intl.js";import{multiplyOpacity as r,getContrast as s,BrightnessThreshold as i}from"../../core/colorUtils.js";import{destroyMaybe as a}from"../../core/maybe.js";import{watch as n,initial as o}from"../../core/reactiveUtils.js";import{formatDecimal as m,formatImperialArea as l,formatMetricArea as p,formatImperialLength as c,formatMetricLength as u}from"../../core/unitFormatUtils.js";import{convertUnit as h}from"../../core/unitUtils.js";import{property as d}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as g}from"../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as v}from"../../core/support/UpdatingHandles.js";import{geodesicDensify as y,simplify as f,geodesicLength as _,geodesicArea as w,planarLength as L,planarArea as b}from"../../geometry/geometryEngine.js";import j from"../../geometry/Point.js";import S from"../../geometry/Polygon.js";import G from"../../geometry/Polyline.js";import{isLoaded as M,project as A}from"../../geometry/projection.js";import x from"../../geometry/SpatialReference.js";import{isSupported as k,geodesicDensify as q,geodesicLengths as C,geodesicAreas as R}from"../../geometry/support/geodesicUtils.js";import H from"../../layers/GraphicsLayer.js";import U from"../../symbols/Font.js";import O from"../../symbols/SimpleFillSymbol.js";import T from"../../symbols/SimpleLineSymbol.js";import z from"../../symbols/SimpleMarkerSymbol.js";import D from"../../symbols/TextSymbol.js";import{ViewingMode as E}from"../../views/ViewingMode.js";import{SnappingVisualizer2D as P}from"../../views/2d/interactive/SnappingVisualizer2D.js";import W from"../../views/draw/Draw.js";import{createCoordinateHelper as V}from"../../views/interactive/coordinateHelper.js";import{createManipulatorDragEventPipeline as F,screenToMap as I,dragManipulatedObject as B}from"../../views/interactive/dragEventPipeline.js";import{GraphicManipulator as J}from"../../views/interactive/GraphicManipulator.js";import{InteractiveToolBase as K}from"../../views/interactive/InteractiveToolBase.js";import{EditGeometry as N}from"../../views/interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as Q}from"../../views/interactive/editGeometry/EditGeometryOperations.js";import{SnappingContext as X}from"../../views/interactive/snapping/SnappingContext.js";import{createSnapDragEventPipelineStep as Y}from"../../views/interactive/snapping/SnappingDragPipelineStep.js";import{acquire as Z}from"../../views/interactive/snapping/SnappingManagerPool.js";import{setupSnappingToggleHandles as $}from"../../views/interactive/snapping/snappingUtils.js";import{fetchMessageBundle as ee}from"../../intl/messages.js";import{onLocaleChange as te}from"../../intl/locale.js";const re=1e5;let se=class extends K{constructor(e){super(e),this._drawActive=!1,this._measurementLayer=new H({internal:!0,listMode:"hide",visible:!1}),this._manipulatorLayer=new H({internal:!0,listMode:"hide",visible:!1}),this._snappingLayer=new H({internal:!0,listMode:"hide",visible:!1}),this._updatingHandles=new v,this._vertices=[],this.measurement=null,this.measurementLabel=null}initialize(){ee("esri/core/t9n/Units").then((e=>{this.messages=e}));const e=this.view;this._draw=new W({view:e}),e.map.addMany([this._measurementLayer,this._manipulatorLayer,this._snappingLayer]),e.focus(),this._snappingManagerResult=Z(e),this.addHandles([te((async()=>{this.messages=await ee("esri/core/t9n/Units")})),n((()=>[this.unit,this.messages]),(()=>{this._updateGraphics()}),o),n((()=>[this.view.effectiveTheme.accentColor,this.view.effectiveTheme.textColor]),(()=>{if(!this._vertices.length)return;const e=this._vertices.map((({coord:e})=>e));for(const{handle:t}of this._vertices)t.remove();this._vertices=[],this._measurementLayer.removeAll(),this._manipulatorLayer.removeAll(),this._snappingLayer.removeAll(),this.manipulators.removeAll(),this._updateSketch(e)})),n((()=>this.snappingOptions.featureSources),(e=>{for(const t of e)t.layer!==this._measurementLayer&&t.layer!==this._manipulatorLayer||(t.enabled=!1)}),o),this._snappingManagerResult]),$(this)}destroy(){const{map:e}=this.view;this._draw.view=null,this._draw=a(this._draw),e.removeMany([this._measurementLayer,this._manipulatorLayer,this._snappingLayer]),this._measurementLayer.removeAll(),this._manipulatorLayer.removeAll(),this._snappingLayer.removeAll(),this._set("measurement",null),this._set("measurementLabel",null),this._measurementLayer=a(this._measurementLayer),this._manipulatorLayer=a(this._manipulatorLayer),this._snappingLayer=a(this._snappingLayer),this._updatingHandles=a(this._updatingHandles),this._resetVertices()}get _snappingManager(){return this._snappingManagerResult.snappingManager}get cursor(){return this._drawActive?"crosshair":null}set editable(e){this._set("editable",e),e||this._draw.reset()}get snappingOptions(){return this._snappingManager.options}get updating(){return this._updatingHandles.updating||this._snappingManager.updating}onActivate(){this._drawActive||0!==this._vertices.length||this._startSketch()}onShow(){this._measurementLayer.visible=!0,this._manipulatorLayer.visible=!0,this._snappingLayer.visible=!0}onHide(){this._measurementLayer.visible=!1,this._manipulatorLayer.visible=!1,this._snappingLayer.visible=!1}reset(){this.manipulators.removeAll(),this._resetVertices(),this._measurementLayer.removeAll(),this._manipulatorLayer.removeAll(),this._set("measurement",null),this._set("measurementLabel",null),this._draw.reset(),this._drawActive=!1}_getSnappingContext(e){return new X({elevationInfo:{mode:"on-the-ground",offset:0},pointer:e,editGeometryOperations:new Q(new N("point",V(!1,!1,this.view.spatialReference)),E.Local),visualizer:new P(this._snappingLayer)})}_resetVertices(){for(const{handle:e}of this._vertices)e.remove();this._vertices=[]}_startSketch(){this._drawActive=!0;const e=this._snappingManager,t=this._draw.create("polyline",{mode:"click",snappingManager:e});t.on(["vertex-add","vertex-update","vertex-remove","cursor-update","undo","redo"],(e=>this._updateSketch(e.vertices))),t.on("draw-complete",(()=>this._stopSketch()))}_stopSketch(){if(this._vertices.length<3)return this.reset(),void this._startSketch();this.manipulators.forEach((({manipulator:e})=>{e.interactive=!0})),this._drawActive=!1,this.finishToolCreation()}_updateSketch(e){const t=this.view.spatialReference;if(t&&(!oe(t)||M())){for(;this._vertices.length>e.length;){const{handle:e,manipulator:t}=this._vertices.pop();e.remove(),this.manipulators.remove(t)}for(let r=this._vertices.length;r<e.length;r++){const[s,i]=e[r],a=new j({x:s,y:i,spatialReference:t}),n=ie(a,this.view,this._manipulatorLayer);this.manipulators.add(n);const o=Q.fromGeometry(a,E.Local);o.on("vertex-update",(e=>{const t=e.vertices.at(0);t&&(this._vertices[r].coord=[t.pos[0],t.pos[1]],this._updateGraphics())}));const m=F(n,((e,t,r,s)=>{const i=this._getSnappingContext(s),a=this._snappingManager,n=this._updatingHandles,{snappingStep:m}=Y({snappingContext:i,snappingManager:a,updatingHandles:n});t.next(I(this.view)).next((t=>{if("start"===t.action){const r=new j(t.mapStart);e.graphic.geometry=r,o.trySetGeometry(r)}return t})).next(...m).next(B({operations:o})).next((()=>{e.graphic.geometry=o.data.geometry}))}));this._vertices.push({manipulator:n,coord:[s,i],handle:m})}if(this._vertices.length){const r=this._vertices.length-1,s=this._vertices[r],[i,a]=e[r];s.coord[0]===i&&s.coord[1]===a||(s.coord=[i,a],s.manipulator.graphic.geometry=new j({x:i,y:a,spatialReference:t}));const n=this._drawActive?this._vertices[r].manipulator:null;this.manipulators.forEach((({manipulator:e})=>{e.interactive=null==n||e!==n}))}this._updateGraphics()}}_updateGraphics(){if(this._vertices.length<2)return void this._measurementLayer.removeAll();const e=ae(this._vertices.map((({coord:e})=>e)),this.view.spatialReference);if(!e)return;const{measurement:a,fillGeometry:n,outlineGeometry:o}=e;this._set("measurement",a);const m=a?me(this.messages,a,this.unit):null;if(this._set("measurementLabel",m),!n&&!o)return;let l,p,c;const{graphics:u}=this._measurementLayer,h=3===u.length,{effectiveTheme:d}=this.view;h?(l=u.at(0),p=u.at(1),c=u.at(2)):(l=new t({symbol:new O({color:r(d.accentColor,.3),outline:null})}),p=new t({symbol:new T({color:d.accentColor,width:2})}),c=new t({symbol:new D({color:d.textColor,font:new U({size:14,family:"sans-serif"}),haloColor:r(s(d.textColor,i.Low),.5),haloSize:2})}),u.removeAll(),u.addMany([l,p,c])),l.geometry=n,p.geometry=o,c.geometry=n?.centroid,c.symbol.text=m?.area??""}};function ie(e,s,i){const a=8,n={style:"circle",color:r(s.effectiveTheme.accentColor,.5),outline:{type:"simple-line",width:0}},o=new z({...n,size:a}),m=new z({...n,size:1.5*a}),l=new t({geometry:e,symbol:o});return new J({view:s,layer:i,graphic:l,focusedSymbol:m})}function ae(e,t){if(2===e.length){const r=new G({paths:[e],spatialReference:t});let s;if(t.isGeographic)if(k(t))s=q(r,re);else{const e=A(r,x.WGS84),i=q(e,re);s=A(i,t)}else s=t.isWebMercator?y(r,re,"meters"):r;return{measurement:null,fillGeometry:null,outlineGeometry:s}}e.push(e[0]);const r=new G({paths:[e],spatialReference:t}),s=new S({rings:[e],spatialReference:t});let i,a,n=null,o=null;if(t.isGeographic)if(k(t)){if(n=q(r,re),o=q(s,re),o=f(o),!o)return null;i=C([r],"meters")[0],a=R([o],"square-meters")[0]}else{const e=x.WGS84,m=A(r,e),l=A(s,e);if(n=q(m,re),o=q(l,re),o=f(o),!o)return null;i=C([m],"meters")[0],a=R([o],"square-meters")[0],n=A(n,t),o=A(o,t)}else if(t.isWebMercator){if(n=y(r,re,"meters"),o=y(s,re,"meters"),o=f(o),!o)return null;i=_(r,"meters"),a=w(o,"square-meters")}else{if(n=r,o=f(s),!o)return null;i=L(r,"meters"),a=b(o,"square-meters")}return{measurement:{geometry:o,area:a,perimeter:i},fillGeometry:o,outlineGeometry:n}}function ne(e){return null!=e}function oe(e){if(!e)return!1;const{isGeographic:t,isWebMercator:r,isWGS84:s}=e;return t&&!s&&!k(e)||!t&&!r}function me(e,t,r){if(!t||!e)return null;const s={area:null,perimeter:null},{area:i,perimeter:a}=t;switch(r){case"metric":s.area=p(e,i,"square-meters");break;case"imperial":s.area=l(e,i,"square-meters");break;default:{const t=h(i,"square-meters",r);s.area=m(e,t,r);break}}const n=le(r);if(n)switch(n){case"metric":s.perimeter=u(e,a,"meters");break;case"imperial":s.perimeter=c(e,a,"meters");break;default:{const t=h(a,"meters",n);s.perimeter=m(e,t,n);break}}else s.perimeter="";return s}function le(e){switch(e){case"metric":case"ares":case"hectares":return"metric";case"imperial":case"acres":return"imperial";case"square-inches":return"inches";case"square-feet":return"feet";case"square-yards":return"yards";case"square-miles":return"miles";case"square-nautical-miles":return"nautical-miles";case"square-us-feet":return"us-feet";case"square-meters":return"meters";case"square-kilometers":return"kilometers";case"square-millimeters":return"millimeters";case"square-centimeters":return"centimeters";case"square-decimeters":return"decimeters";default:return null}}e([d()],se.prototype,"_drawActive",void 0),e([d({readOnly:!0})],se.prototype,"cursor",null),e([d({value:!0})],se.prototype,"editable",null),e([d({readOnly:!0})],se.prototype,"measurement",void 0),e([d({readOnly:!0})],se.prototype,"measurementLabel",void 0),e([d()],se.prototype,"messages",void 0),e([d()],se.prototype,"unit",void 0),e([d()],se.prototype,"updating",null),e([d({constructOnly:!0})],se.prototype,"view",void 0),se=e([g("esri.widgets.AreaMeasurement2D.AreaMeasurement2DTool")],se);export{se as AreaMeasurement2DTool,ae as createAreaMeasurementInfo2D,me as createAreaMeasurementLabel,oe as isProjectionEngineRequired,ne as isSupported};