@arcgis/core 5.0.0-next.83 → 5.0.0-next.85

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 (914) hide show
  1. package/WebDocument2D.d.ts +3 -2
  2. package/WebDocument2D.js +1 -1
  3. package/WebScene.d.ts +3 -2
  4. package/WebScene.js +1 -1
  5. package/applications/Components/applySetUtils.d.ts +237 -0
  6. package/applications/Components/applySetUtils.js +5 -0
  7. package/applications/Components/editUtils.d.ts +92 -0
  8. package/applications/Components/editUtils.js +5 -0
  9. package/applications/Components/symbolUtils.d.ts +37 -0
  10. package/applications/Components/symbolUtils.js +5 -0
  11. package/applications/Components/templateUtils.d.ts +106 -0
  12. package/applications/Components/templateUtils.js +5 -0
  13. package/applications/SceneViewer/layerUtils.d.ts +3 -2
  14. package/applications/SceneViewer/layerUtils.js +1 -1
  15. package/assets/esri/core/workers/RemoteClient.js +1 -1
  16. package/assets/esri/core/workers/chunks/001fd3d30e5bb0d180c6.js +1 -0
  17. package/assets/esri/core/workers/chunks/0057d3a9522188090536.js +1 -0
  18. package/assets/esri/core/workers/chunks/008a555ce169640e2a35.js +2 -0
  19. package/assets/esri/core/workers/chunks/{f25bebd2b6eb0d0f6626.js.LICENSE.txt → 008a555ce169640e2a35.js.LICENSE.txt} +1 -1
  20. package/assets/esri/core/workers/chunks/00e135dc1b4cb024973d.js +1 -0
  21. package/assets/esri/core/workers/chunks/03da31c7635d077e8d99.js +1 -0
  22. package/assets/esri/core/workers/chunks/0402b7996940ba0f8cc8.js +2 -0
  23. package/assets/esri/core/workers/chunks/{73c416ae0ec5a1815591.js.LICENSE.txt → 0402b7996940ba0f8cc8.js.LICENSE.txt} +1 -1
  24. package/assets/esri/core/workers/chunks/04fddd41a8e6a4c1bc57.js +1 -0
  25. package/assets/esri/core/workers/chunks/055aead7135a2f8bca29.js +1 -0
  26. package/assets/esri/core/workers/chunks/05a75878baca3a04fee9.js +1 -0
  27. package/assets/esri/core/workers/chunks/05aa22778a85624cfa55.js +1 -0
  28. package/assets/esri/core/workers/chunks/06493efc57cbfbda050a.js +1 -0
  29. package/assets/esri/core/workers/chunks/0674ae3741bc99325879.js +1 -0
  30. package/assets/esri/core/workers/chunks/07c5a9e8f48b3c806ac7.js +1 -0
  31. package/assets/esri/core/workers/chunks/0889e3d1a034be031c9e.js +2 -0
  32. package/assets/esri/core/workers/chunks/{43e2c1d72cd9c8beed2f.js.LICENSE.txt → 0889e3d1a034be031c9e.js.LICENSE.txt} +1 -1
  33. package/assets/esri/core/workers/chunks/0abb084b8a137f4fcdfc.js +1 -0
  34. package/assets/esri/core/workers/chunks/0b0545538ce355cace52.js +1 -0
  35. package/assets/esri/core/workers/chunks/0c13591347d51d684561.js +1 -0
  36. package/assets/esri/core/workers/chunks/0e7daf348c3e4681dd44.js +1 -0
  37. package/assets/esri/core/workers/chunks/10a5bf887132821beaf0.js +1 -0
  38. package/assets/esri/core/workers/chunks/10b32aff749d3459ddcd.js +1 -0
  39. package/assets/esri/core/workers/chunks/114aecdbd2bd92b24de2.js +1 -0
  40. package/assets/esri/core/workers/chunks/14f8215ab716c6d9d5f8.js +1 -0
  41. package/assets/esri/core/workers/chunks/156c73a948bde11f0d53.js +1 -0
  42. package/assets/esri/core/workers/chunks/165cf8031af160c99d70.js +1 -0
  43. package/assets/esri/core/workers/chunks/1779e6eabc299831fc9f.js +1 -0
  44. package/assets/esri/core/workers/chunks/181fab86394f1f912490.js +1 -0
  45. package/assets/esri/core/workers/chunks/185c97bc63ce546995ce.js +1 -0
  46. package/assets/esri/core/workers/chunks/18cdd268fc921ffd92e2.js +1 -0
  47. package/assets/esri/core/workers/chunks/1a13b472e0cf9f88e8de.js +1 -0
  48. package/assets/esri/core/workers/chunks/1a41c9127ca5a260d5ef.js +1 -0
  49. package/assets/esri/core/workers/chunks/1a62c456e791c82050fe.js +1 -0
  50. package/assets/esri/core/workers/chunks/1c05906d1b5b92441c9b.js +1 -0
  51. package/assets/esri/core/workers/chunks/1cf289446619645487b6.js +1 -0
  52. package/assets/esri/core/workers/chunks/1e318e5cf417c8f13bc7.js +1 -0
  53. package/assets/esri/core/workers/chunks/1eb6f210ae69c317e1f6.js +1 -0
  54. package/assets/esri/core/workers/chunks/1facc1b45345a095b9a7.js +1 -0
  55. package/assets/esri/core/workers/chunks/1fe1a131be1d5e1e23ed.js +1 -0
  56. package/assets/esri/core/workers/chunks/21739c37160061f229ef.js +1 -0
  57. package/assets/esri/core/workers/chunks/22b1543b1a39db9acfc3.js +1 -0
  58. package/assets/esri/core/workers/chunks/249bc4abaa6482aaf288.js +1 -0
  59. package/assets/esri/core/workers/chunks/25a9ae17dc2ef44a4481.js +1 -0
  60. package/assets/esri/core/workers/chunks/25dead73dfc5a4c19285.js +1 -0
  61. package/assets/esri/core/workers/chunks/2767b69085c9f7a1e1af.js +1 -0
  62. package/assets/esri/core/workers/chunks/286a45e9aec0b2bf32ef.js +1 -0
  63. package/assets/esri/core/workers/chunks/289681e94e93dc1d3512.js +1 -0
  64. package/assets/esri/core/workers/chunks/2a81f08de9d642485669.js +1 -0
  65. package/assets/esri/core/workers/chunks/2b2283f1ee4bfc1baa18.js +1 -0
  66. package/assets/esri/core/workers/chunks/2bb82ae3ada57c066fdf.js +1 -0
  67. package/assets/esri/core/workers/chunks/2bdd28b4b5ef2c1e111f.js +1 -0
  68. package/assets/esri/core/workers/chunks/2c8b4d54ecf6ea2fecb1.js +1 -0
  69. package/assets/esri/core/workers/chunks/2ce845c990bb4d701362.js +1 -0
  70. package/assets/esri/core/workers/chunks/2f20cca2c5c058afc9af.js +1 -0
  71. package/assets/esri/core/workers/chunks/301fa6276f4098521106.js +1 -0
  72. package/assets/esri/core/workers/chunks/304ea784c28dc78e5e65.js +1 -0
  73. package/assets/esri/core/workers/chunks/3087910d19959fdc546b.js +1 -0
  74. package/assets/esri/core/workers/chunks/30cfa41017c2d434a89f.js +1 -0
  75. package/assets/esri/core/workers/chunks/33257fbd724ae188e259.js +1 -0
  76. package/assets/esri/core/workers/chunks/338768f94cc49559b209.js +1 -0
  77. package/assets/esri/core/workers/chunks/34073c8e4fc825f060f1.js +1 -0
  78. package/assets/esri/core/workers/chunks/34503f9b26c81e631174.js +1 -0
  79. package/assets/esri/core/workers/chunks/348560f083350ad0bf2e.js +1 -0
  80. package/assets/esri/core/workers/chunks/3606fc5537c4d11b9554.js +1 -0
  81. package/assets/esri/core/workers/chunks/3628e82707e7720c9e4c.js +1 -0
  82. package/assets/esri/core/workers/chunks/36b053decb87c9d32cd2.js +1 -0
  83. package/assets/esri/core/workers/chunks/37f5687dc1147b0a7bc1.js +1 -0
  84. package/assets/esri/core/workers/chunks/380a9b6d75992d6311c3.js +1 -0
  85. package/assets/esri/core/workers/chunks/3849dc35941e569fae5f.js +1 -0
  86. package/assets/esri/core/workers/chunks/388bd41c305d5a11f739.js +1 -0
  87. package/assets/esri/core/workers/chunks/389e2263a540f819d842.js +1 -0
  88. package/assets/esri/core/workers/chunks/38ca539f33e2d977771c.js +1 -0
  89. package/assets/esri/core/workers/chunks/39e1b04444389d2987be.js +1 -0
  90. package/assets/esri/core/workers/chunks/3ad7ec46adecf00ae1c2.js +1 -0
  91. package/assets/esri/core/workers/chunks/3aeb3e8220e7d9869652.js +1 -0
  92. package/assets/esri/core/workers/chunks/3afc221b3a9e209cceea.js +1 -0
  93. package/assets/esri/core/workers/chunks/3b67aa46a60e35469bf8.js +1 -0
  94. package/assets/esri/core/workers/chunks/3b6fc34b6d92eef030e5.js +1 -0
  95. package/assets/esri/core/workers/chunks/3bb28b59614fc36b2c50.js +1 -0
  96. package/assets/esri/core/workers/chunks/3eeaec74871e20b433d2.js +1 -0
  97. package/assets/esri/core/workers/chunks/418a778a4cbbb9dabecd.js +1 -0
  98. package/assets/esri/core/workers/chunks/42444285fd79a8d8e564.js +1 -0
  99. package/assets/esri/core/workers/chunks/428ca5900d882d7be499.js +1 -0
  100. package/assets/esri/core/workers/chunks/436c15ac34a205a13a37.js +1 -0
  101. package/assets/esri/core/workers/chunks/43e9eaedf65921b58eb2.js +1 -0
  102. package/assets/esri/core/workers/chunks/4487cf21fa9f0466450d.js +1 -0
  103. package/assets/esri/core/workers/chunks/45dbdf2ff95f7be1eb88.js +1 -0
  104. package/assets/esri/core/workers/chunks/4756f0dbbda129c760b1.js +1 -0
  105. package/assets/esri/core/workers/chunks/4a0760571ce536fbd8c8.js +1 -0
  106. package/assets/esri/core/workers/chunks/4b09d92c51c4619b548a.js +1 -0
  107. package/assets/esri/core/workers/chunks/4b24f72b56edc28bb15e.js +1 -0
  108. package/assets/esri/core/workers/chunks/4bb0c3b009493ea44632.js +1 -0
  109. package/assets/esri/core/workers/chunks/{f25bebd2b6eb0d0f6626.js → 4c07b2d1a14906371fc5.js} +2 -2
  110. package/assets/esri/core/workers/chunks/{6be530ab81291745485b.js.LICENSE.txt → 4c07b2d1a14906371fc5.js.LICENSE.txt} +1 -1
  111. package/assets/esri/core/workers/chunks/4c0e0beb1534d81ff648.js +1 -0
  112. package/assets/esri/core/workers/chunks/4c54cb80c4dc9bbbd395.js +1 -0
  113. package/assets/esri/core/workers/chunks/4caec60ac0a5851730c6.js +1 -0
  114. package/assets/esri/core/workers/chunks/4db259316b193fcc4541.js +1 -0
  115. package/assets/esri/core/workers/chunks/4f132d758f8b4795c43f.js +1 -0
  116. package/assets/esri/core/workers/chunks/4f4bdf9f5323fa702e6c.js +1 -0
  117. package/assets/esri/core/workers/chunks/4f53071b5eb23d4478c4.js +1 -0
  118. package/assets/esri/core/workers/chunks/4f8895eb57ec6ab4b318.js +1 -0
  119. package/assets/esri/core/workers/chunks/4ff3c03cfbec928c0720.js +1 -0
  120. package/assets/esri/core/workers/chunks/504ab6bf7bfbfd4c4211.js +1 -0
  121. package/assets/esri/core/workers/chunks/5119e3159617b8e1ea13.js +1 -0
  122. package/assets/esri/core/workers/chunks/52684c2abc9e8ce793cf.js +1 -0
  123. package/assets/esri/core/workers/chunks/5298f99c197c8607a690.js +1 -0
  124. package/assets/esri/core/workers/chunks/52ae2073604deef63ea2.js +1 -0
  125. package/assets/esri/core/workers/chunks/532935f420ed5f13c011.js +1 -0
  126. package/assets/esri/core/workers/chunks/5348e4dc55428de9bba7.js +1 -0
  127. package/assets/esri/core/workers/chunks/53a1c6e008287d1f12f0.js +1 -0
  128. package/assets/esri/core/workers/chunks/53d0b870c080236d82d1.js +1 -0
  129. package/assets/esri/core/workers/chunks/5543de9a0435c319f4f9.js +301 -0
  130. package/assets/esri/core/workers/chunks/55bf39611ae6028131a3.js +1 -0
  131. package/assets/esri/core/workers/chunks/5659e221e8805bb81210.js +1 -0
  132. package/assets/esri/core/workers/chunks/568fc92333a9ab1c06e6.js +1 -0
  133. package/assets/esri/core/workers/chunks/56bbd86b804cb2a59031.js +1 -0
  134. package/assets/esri/core/workers/chunks/57a749804da9a2b1fae9.js +1 -0
  135. package/assets/esri/core/workers/chunks/59d3f3fbae775fd7686e.js +1 -0
  136. package/assets/esri/core/workers/chunks/59e7a0215791b2b51180.js +1 -0
  137. package/assets/esri/core/workers/chunks/5a706eecd8a988fae6b7.js +1 -0
  138. package/assets/esri/core/workers/chunks/5b278b9980752ef495a2.js +1 -0
  139. package/assets/esri/core/workers/chunks/5b3bb636e3bec625e515.js +1 -0
  140. package/assets/esri/core/workers/chunks/5ba2bbbb42ef1920579d.js +1 -0
  141. package/assets/esri/core/workers/chunks/5cc731f161012b63c77a.js +1 -0
  142. package/assets/esri/core/workers/chunks/5eee48b02e1683f022df.js +2 -0
  143. package/assets/esri/core/workers/chunks/{0b7bbdc0d71ee6721751.js.LICENSE.txt → 5eee48b02e1683f022df.js.LICENSE.txt} +1 -1
  144. package/assets/esri/core/workers/chunks/5fa8fe6353dbdda0b06a.js +1 -0
  145. package/assets/esri/core/workers/chunks/5fc6cada83bf8462d54c.js +1 -0
  146. package/assets/esri/core/workers/chunks/6107b58457a70c8de9da.js +1 -0
  147. package/assets/esri/core/workers/chunks/63e930e76a181d54786d.js +1 -0
  148. package/assets/esri/core/workers/chunks/63ee7aa1b169dbec1e37.js +1 -0
  149. package/assets/esri/core/workers/chunks/6440d78ed2af2e7265aa.js +1 -0
  150. package/assets/esri/core/workers/chunks/645e086291b04bc036d7.js +1 -0
  151. package/assets/esri/core/workers/chunks/654eef3ad30f34c42e12.js +1 -0
  152. package/assets/esri/core/workers/chunks/681d9a923c0d1ace86e8.js +1 -0
  153. package/assets/esri/core/workers/chunks/68abe4e70ea48e978642.js +1 -0
  154. package/assets/esri/core/workers/chunks/6a083fde0e207625fd0b.js +1 -0
  155. package/assets/esri/core/workers/chunks/6bc7bacf01328ef10ff1.js +1 -0
  156. package/assets/esri/core/workers/chunks/6bcf5d6792e4f09cbc7b.js +1 -0
  157. package/assets/esri/core/workers/chunks/6d7eb784988ee9a33473.js +1 -0
  158. package/assets/esri/core/workers/chunks/6de843d1809cba61ded3.js +1 -0
  159. package/assets/esri/core/workers/chunks/6e04303500a9fbc3f14a.js +1 -0
  160. package/assets/esri/core/workers/chunks/6edcae8ec128c2e86a05.js +1 -0
  161. package/assets/esri/core/workers/chunks/6eeee6e278b5f516d1d2.js +1 -0
  162. package/assets/esri/core/workers/chunks/701775be0dad640a72b4.js +1 -0
  163. package/assets/esri/core/workers/chunks/70df4331ed29d823bf38.js +1 -0
  164. package/assets/esri/core/workers/chunks/7130b09300032d3a5925.js +1 -0
  165. package/assets/esri/core/workers/chunks/72f0e2e5dcddafa2a642.js +1 -0
  166. package/assets/esri/core/workers/chunks/73c87eb9bd8f0f848481.js +1 -0
  167. package/assets/esri/core/workers/chunks/746190bb70aa78ba0bfc.js +1039 -0
  168. package/assets/esri/core/workers/chunks/75d7290c73bb59f2c856.js +1 -0
  169. package/assets/esri/core/workers/chunks/780a1eba9a7f1ca690ce.js +1 -0
  170. package/assets/esri/core/workers/chunks/7815dbf49ef5a06705f3.js +1 -0
  171. package/assets/esri/core/workers/chunks/7892daeed58778453639.js +1 -0
  172. package/assets/esri/core/workers/chunks/7990c828447bc3a29965.js +1 -0
  173. package/assets/esri/core/workers/chunks/799829d0ae17c146196b.js +1 -0
  174. package/assets/esri/core/workers/chunks/7a1ec6ac88d974cc5074.js +1 -0
  175. package/assets/esri/core/workers/chunks/7a31717dafbd820bc2bf.js +1 -0
  176. package/assets/esri/core/workers/chunks/7d76a2245ac973efe1ed.js +1 -0
  177. package/assets/esri/core/workers/chunks/7f76566d9b3801742387.js +1 -0
  178. package/assets/esri/core/workers/chunks/7f7c4ffbdf7b20dc7a54.js +1 -0
  179. package/assets/esri/core/workers/chunks/8008bca4ef04c9424579.js +1 -0
  180. package/assets/esri/core/workers/chunks/815a25a5a8dba7921f8b.js +1 -0
  181. package/assets/esri/core/workers/chunks/8184c34b2c4969f14f3d.js +1 -0
  182. package/assets/esri/core/workers/chunks/81e395a93c67749c6487.js +1 -0
  183. package/assets/esri/core/workers/chunks/8351012ceb466f01b8fd.js +1 -0
  184. package/assets/esri/core/workers/chunks/83ddc0f6bfe68756f26f.js +1 -0
  185. package/assets/esri/core/workers/chunks/841058de8bc6e328fd68.js +1 -0
  186. package/assets/esri/core/workers/chunks/84a4390b1c277c415d44.js +1 -0
  187. package/assets/esri/core/workers/chunks/854adab6a06af861c104.js +1 -0
  188. package/assets/esri/core/workers/chunks/8765fe036d9664c25b1d.js +37 -0
  189. package/assets/esri/core/workers/chunks/88c3b60b403e2454b56e.js +1 -0
  190. package/assets/esri/core/workers/chunks/8a0a13f398ab488dbbe9.js +1 -0
  191. package/assets/esri/core/workers/chunks/8b1fa59d436e2815b2f1.js +2 -0
  192. package/assets/esri/core/workers/chunks/{25f3ee666f545a7a7993.js.LICENSE.txt → 8b1fa59d436e2815b2f1.js.LICENSE.txt} +1 -1
  193. package/assets/esri/core/workers/chunks/8cb13b3776f07536c79f.js +1 -0
  194. package/assets/esri/core/workers/chunks/{51093e552e31344cefa5.js → 8d9ec752136cbc5cb29a.js} +1 -1
  195. package/assets/esri/core/workers/chunks/8deae3a426eceae73186.js +1 -0
  196. package/assets/esri/core/workers/chunks/8f4ca0dfd9635eb10e02.js +1 -0
  197. package/assets/esri/core/workers/chunks/8faa0122d0a6e2e39153.js +1 -0
  198. package/assets/esri/core/workers/chunks/913c417ad278ce1caaf9.js +1 -0
  199. package/assets/esri/core/workers/chunks/9184089e72c24d91d23b.js +1 -0
  200. package/assets/esri/core/workers/chunks/91e307ca0d11804a7a1d.js +2 -0
  201. package/assets/esri/core/workers/chunks/9264cce4699284eae97c.js +2 -0
  202. package/assets/esri/core/workers/chunks/{37002a46f03a9fc5f644.js.LICENSE.txt → 9264cce4699284eae97c.js.LICENSE.txt} +1 -1
  203. package/assets/esri/core/workers/chunks/9279a5361bf6a54784ef.js +1 -0
  204. package/assets/esri/core/workers/chunks/92a42bbb8b9b39f3211c.js +1 -0
  205. package/assets/esri/core/workers/chunks/934ce3f004c54d542d2c.js +1 -0
  206. package/assets/esri/core/workers/chunks/93caf6fb8afab3dd8a46.js +1 -0
  207. package/assets/esri/core/workers/chunks/95e93884b39ca4b312d1.js +2 -0
  208. package/assets/esri/core/workers/chunks/{5b9f2aa3ba1bf12c3240.js.LICENSE.txt → 95e93884b39ca4b312d1.js.LICENSE.txt} +1 -1
  209. package/assets/esri/core/workers/chunks/97148a9966f55e69421e.js +1 -0
  210. package/assets/esri/core/workers/chunks/9748b8c35d56a5ee9c64.js +1 -0
  211. package/assets/esri/core/workers/chunks/97ad3eb25ad003c16148.js +1 -0
  212. package/assets/esri/core/workers/chunks/982e709d2cef971ecd82.js +1 -0
  213. package/assets/esri/core/workers/chunks/98e04c2382fa5ba382fc.js +1 -0
  214. package/assets/esri/core/workers/chunks/9919b3c345785e910c38.js +1 -0
  215. package/assets/esri/core/workers/chunks/9c6d34bb666f630d511f.js +1 -0
  216. package/assets/esri/core/workers/chunks/9cd7205bbc711914d74b.js +1 -0
  217. package/assets/esri/core/workers/chunks/9d17524f5f935b7b60bf.js +1 -0
  218. package/assets/esri/core/workers/chunks/9de8149ae0a0726a4ab2.js +1 -0
  219. package/assets/esri/core/workers/chunks/9fac9eda0a41f7f4c2c6.js +1 -0
  220. package/assets/esri/core/workers/chunks/9ff1e650ce0912afa780.js +1 -0
  221. package/assets/esri/core/workers/chunks/a09099697955eb44bfac.js +1 -0
  222. package/assets/esri/core/workers/chunks/a0d52a819302ed6f401e.js +1 -0
  223. package/assets/esri/core/workers/chunks/a1908b3fa61f02425a94.js +1 -0
  224. package/assets/esri/core/workers/chunks/a2046f85b9964693f053.js +1 -0
  225. package/assets/esri/core/workers/chunks/a24627400b3b9fe8431d.js +1 -0
  226. package/assets/esri/core/workers/chunks/a27c74fd2029583de933.js +1 -0
  227. package/assets/esri/core/workers/chunks/a2c0c1bb5e775abefc90.js +1 -0
  228. package/assets/esri/core/workers/chunks/a3184fb1ac7ce9af1a7e.js +1 -0
  229. package/assets/esri/core/workers/chunks/a4ee92867ad5cde25aed.js +1 -0
  230. package/assets/esri/core/workers/chunks/a56a5e00964d4cd59a66.js +1 -0
  231. package/assets/esri/core/workers/chunks/a774b4fc7df801503bea.js +1 -0
  232. package/assets/esri/core/workers/chunks/a9521578c0e21aaddbc7.js +1 -0
  233. package/assets/esri/core/workers/chunks/a9b30c3b604e314f1706.js +1 -0
  234. package/assets/esri/core/workers/chunks/aa0c648bd37787f62b1f.js +1 -0
  235. package/assets/esri/core/workers/chunks/aa1b8c06bdf8453a02d7.js +1 -0
  236. package/assets/esri/core/workers/chunks/aaac4eee709cd6d24910.js +1 -0
  237. package/assets/esri/core/workers/chunks/aafa33f661462f5afd2b.js +1 -0
  238. package/assets/esri/core/workers/chunks/ab3e457c82fa9bd0203f.js +1 -0
  239. package/assets/esri/core/workers/chunks/ac0949ea3d2cf3eb7383.js +1 -0
  240. package/assets/esri/core/workers/chunks/ac5da65af5da254acb16.js +1 -0
  241. package/assets/esri/core/workers/chunks/adecd31fd64d6753682d.js +1 -0
  242. package/assets/esri/core/workers/chunks/ae5798399607cb043ed2.js +1 -0
  243. package/assets/esri/core/workers/chunks/af3d4eba6fe24db3ceba.js +1 -0
  244. package/assets/esri/core/workers/chunks/b1015e1f25b60c08d2cf.js +1 -0
  245. package/assets/esri/core/workers/chunks/b1085fa91724e2d3b24f.js +1 -0
  246. package/assets/esri/core/workers/chunks/b12dc8fd3f2a2ff8073d.js +1 -0
  247. package/assets/esri/core/workers/chunks/b190a776de4859ac00f8.js +1 -0
  248. package/assets/esri/core/workers/chunks/b1c6a1759febad66927f.js +1 -0
  249. package/assets/esri/core/workers/chunks/b482a24c9567d8926897.js +1 -0
  250. package/assets/esri/core/workers/chunks/b48b0f512a1cd7226bdc.js +1 -0
  251. package/assets/esri/core/workers/chunks/b586d7e608e8ba8b88fe.js +1 -0
  252. package/assets/esri/core/workers/chunks/b599c6d4fa3189ed1762.js +1 -0
  253. package/assets/esri/core/workers/chunks/b6acf67316107902e31d.js +1 -0
  254. package/assets/esri/core/workers/chunks/b7576a5195615c465ea7.js +1 -0
  255. package/assets/esri/core/workers/chunks/b7e40118b4d645e9f8e1.js +1 -0
  256. package/assets/esri/core/workers/chunks/b8005b1996f42dee8237.js +1 -0
  257. package/assets/esri/core/workers/chunks/b91a157fb5f729de6597.js +1 -0
  258. package/assets/esri/core/workers/chunks/b9226dd0342cfd30ece0.js +1 -0
  259. package/assets/esri/core/workers/chunks/b977b9f5f50ae8027443.js +1 -0
  260. package/assets/esri/core/workers/chunks/bab6dee8f4715d05d984.js +1 -0
  261. package/assets/esri/core/workers/chunks/bbb409e54db77bfabdee.js +1 -0
  262. package/assets/esri/core/workers/chunks/bc4f513ea3a8f344c8da.js +1 -0
  263. package/assets/esri/core/workers/chunks/be26f8175a76e7dc8f7a.js +1 -0
  264. package/assets/esri/core/workers/chunks/befedcb6d8d1ff88125f.js +1 -0
  265. package/assets/esri/core/workers/chunks/bf73352b3366de82abbe.js +1 -0
  266. package/assets/esri/core/workers/chunks/c0265669fb616f052b65.js +1 -0
  267. package/assets/esri/core/workers/chunks/c133e57f2201b9bc6cbc.js +1 -0
  268. package/assets/esri/core/workers/chunks/c18a2948ae3cb527d8bb.js +1 -0
  269. package/assets/esri/core/workers/chunks/c2d7b32f0c8eb965fcf7.js +1 -0
  270. package/assets/esri/core/workers/chunks/c45a5bcf26659daf02a1.js +1 -0
  271. package/assets/esri/core/workers/chunks/c46a4681cbba638b58c1.js +1 -0
  272. package/assets/esri/core/workers/chunks/c477b0ce55211339c4cb.js +1 -0
  273. package/assets/esri/core/workers/chunks/c500b59cd7da54fe72ec.js +1 -0
  274. package/assets/esri/core/workers/chunks/c5c1b189b91e199e8b82.js +1 -0
  275. package/assets/esri/core/workers/chunks/c65a138c14a4c540cd3b.js +1 -0
  276. package/assets/esri/core/workers/chunks/c66a9477e1c30a5ca03f.js +1 -0
  277. package/assets/esri/core/workers/chunks/{d79d29b52a65fb6bf94d.js → c71fe727224da0aba6ca.js} +1 -1
  278. package/assets/esri/core/workers/chunks/c741f7bc5693ae7e5019.js +1 -0
  279. package/assets/esri/core/workers/chunks/c75a41a5c8c5bd40ae91.js +1 -0
  280. package/assets/esri/core/workers/chunks/c791e8ebf3ee0805c479.js +1 -0
  281. package/assets/esri/core/workers/chunks/c825ca22894bdb4d01ba.js +1 -0
  282. package/assets/esri/core/workers/chunks/c8f1075c45ecf9fef00f.js +1 -0
  283. package/assets/esri/core/workers/chunks/ca06811e636f1d96f3cb.js +1 -0
  284. package/assets/esri/core/workers/chunks/cb66a74448a6c0c20d5d.js +1 -0
  285. package/assets/esri/core/workers/chunks/cbab45550b06bcc38524.js +1 -0
  286. package/assets/esri/core/workers/chunks/cc2606b8e600eeaf4bc8.js +1 -0
  287. package/assets/esri/core/workers/chunks/cdf711afbaaf345101f0.js +1 -0
  288. package/assets/esri/core/workers/chunks/ce87a6e24e9c64d90da3.js +1 -0
  289. package/assets/esri/core/workers/chunks/ce9467dc1ff695d795e5.js +1 -0
  290. package/assets/esri/core/workers/chunks/d0c831a473642d1bd9d1.js +1 -0
  291. package/assets/esri/core/workers/chunks/d0d6f818851d9a2d7938.js +1 -0
  292. package/assets/esri/core/workers/chunks/d1dd1787b3bf27834a9e.js +1 -0
  293. package/assets/esri/core/workers/chunks/d28169816c768d55aa09.js +1 -0
  294. package/assets/esri/core/workers/chunks/d2d4bce67c711a404b73.js +1 -0
  295. package/assets/esri/core/workers/chunks/d31f62ecbb54bffc54f2.js +1 -0
  296. package/assets/esri/core/workers/chunks/d37f03714c9591fb2b06.js +1 -0
  297. package/assets/esri/core/workers/chunks/d3c69c9cb3d9c3f5c67a.js +1 -0
  298. package/assets/esri/core/workers/chunks/d436e1694f4b5bf05a90.js +1 -0
  299. package/assets/esri/core/workers/chunks/d4770dddfbfdc3845749.js +1 -0
  300. package/assets/esri/core/workers/chunks/d477def8bfd8482596d1.js +1 -0
  301. package/assets/esri/core/workers/chunks/d4c4dad52da5dcf4432c.js +1 -0
  302. package/assets/esri/core/workers/chunks/d4f4c0201d8b641709c0.js +1 -0
  303. package/assets/esri/core/workers/chunks/d525b3fa719a688d4899.js +1 -0
  304. package/assets/esri/core/workers/chunks/d6e11f05db698d14f21d.js +1 -0
  305. package/assets/esri/core/workers/chunks/d7c275717a2405b6ff87.js +1 -0
  306. package/assets/esri/core/workers/chunks/d9d2178d436597b1afaf.js +1 -0
  307. package/assets/esri/core/workers/chunks/da808dfb22c6de29e560.js +1 -0
  308. package/assets/esri/core/workers/chunks/db9a9712038df76e3eda.js +1 -0
  309. package/assets/esri/core/workers/chunks/dd0e65b18c634b64582e.js +1 -0
  310. package/assets/esri/core/workers/chunks/dd30c1f5da0af72becd1.js +1 -0
  311. package/assets/esri/core/workers/chunks/de216922b36267ab4aa1.js +1 -0
  312. package/assets/esri/core/workers/chunks/de6b3f80070abdd61d0f.js +1 -0
  313. package/assets/esri/core/workers/chunks/dea2e8caaf6e53ec56f8.js +1 -0
  314. package/assets/esri/core/workers/chunks/ded589862c22ea12d47a.js +1 -0
  315. package/assets/esri/core/workers/chunks/dedd9d47ccc019ffc484.js +1 -0
  316. package/assets/esri/core/workers/chunks/dfef6e3d7bbf099de498.js +1 -0
  317. package/assets/esri/core/workers/chunks/e1b677a135e164a29605.js +1 -0
  318. package/assets/esri/core/workers/chunks/e201bfe3158c025edc99.js +1 -0
  319. package/assets/esri/core/workers/chunks/e337b8d69d89f597cb58.js +1 -0
  320. package/assets/esri/core/workers/chunks/e370d213c307ad8bfaec.js +1 -0
  321. package/assets/esri/core/workers/chunks/e3a73d9acebccd3ba49b.js +1 -0
  322. package/assets/esri/core/workers/chunks/e43c6058c793d43fa5f3.js +1 -0
  323. package/assets/esri/core/workers/chunks/e462b167841fddaa80b8.js +1 -0
  324. package/assets/esri/core/workers/chunks/e51e35b5cef89b0e0db1.js +1 -0
  325. package/assets/esri/core/workers/chunks/e58ec49a5cd852cb46cb.js +1 -0
  326. package/assets/esri/core/workers/chunks/e7d28ebf684db4ecb8cb.js +1 -0
  327. package/assets/esri/core/workers/chunks/e8f6305744f87bbed961.js +1 -0
  328. package/assets/esri/core/workers/chunks/e9f8115c049f168d3c2b.js +1 -0
  329. package/assets/esri/core/workers/chunks/ea32a8478f3ccb19aced.js +1 -0
  330. package/assets/esri/core/workers/chunks/ea734de7d5271c487171.js +1 -0
  331. package/assets/esri/core/workers/chunks/eb765db525f4e2e2bda2.js +1 -0
  332. package/assets/esri/core/workers/chunks/ebbcd6196ef5c5ab233d.js +1 -0
  333. package/assets/esri/core/workers/chunks/ec00fa313794f177d9d3.js +1 -0
  334. package/assets/esri/core/workers/chunks/ec03d59984782529031a.js +1 -0
  335. package/assets/esri/core/workers/chunks/ec7f4e459c7466805f72.js +1 -0
  336. package/assets/esri/core/workers/chunks/ecf7d34b37ce6f0877af.js +1 -0
  337. package/assets/esri/core/workers/chunks/ed1c92a24a167e57e36e.js +1 -0
  338. package/assets/esri/core/workers/chunks/ed69b19366e3ce5805ac.js +1 -0
  339. package/assets/esri/core/workers/chunks/ee25d1eae52c8be82898.js +1 -0
  340. package/assets/esri/core/workers/chunks/ee905e24320241959965.js +1 -0
  341. package/assets/esri/core/workers/chunks/eea91681bae00819a5e9.js +1 -0
  342. package/assets/esri/core/workers/chunks/eed24607e9b5312b417f.js +1 -0
  343. package/assets/esri/core/workers/chunks/f0eb2bfe5a8607b251f5.js +1 -0
  344. package/assets/esri/core/workers/chunks/f370e60dc81d41368e0c.js +1 -0
  345. package/assets/esri/core/workers/chunks/f3fdf9970b3c7acd071d.js +1 -0
  346. package/assets/esri/core/workers/chunks/f40e413c68d99cf54d42.js +1 -0
  347. package/assets/esri/core/workers/chunks/f5b32bc3f7ee911e3c59.js +1 -0
  348. package/assets/esri/core/workers/chunks/f5dbffd5e8b3c16336a1.js +1 -0
  349. package/assets/esri/core/workers/chunks/f5ed6953a9255f0bed6a.js +2 -0
  350. package/assets/esri/core/workers/chunks/{9ccabf8142fb5de4d3e2.js.LICENSE.txt → f5ed6953a9255f0bed6a.js.LICENSE.txt} +1 -1
  351. package/assets/esri/core/workers/chunks/f627017adc9469144507.js +1 -0
  352. package/assets/esri/core/workers/chunks/f7ad285944e0e5164384.js +1 -0
  353. package/assets/esri/core/workers/chunks/f872d34d4236f8bedbd9.js +1 -0
  354. package/assets/esri/core/workers/chunks/f88adc930506ac2d5c90.js +1 -0
  355. package/assets/esri/core/workers/chunks/f890cfa4932955ecd4e7.js +1 -0
  356. package/assets/esri/core/workers/chunks/fd4bd04f85458cad849c.js +1 -0
  357. package/assets/esri/core/workers/chunks/fe98a068536e904ce257.js +1 -0
  358. package/assets/esri/core/workers/chunks/ffa9cc09e82f2e515993.js +1 -0
  359. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  360. package/assets/esri/themes/base/widgets/_Compass.scss +1 -1
  361. package/assets/esri/themes/base/widgets/_Feature.scss +1 -1
  362. package/assets/esri/themes/base/widgets/_Features.scss +1 -1
  363. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +4 -4
  364. package/assets/esri/themes/base/widgets/_Widget.scss +1 -1
  365. package/assets/esri/themes/dark/main.css +1 -1
  366. package/assets/esri/themes/light/main.css +1 -1
  367. package/assets/esri/themes/light/view.css +1 -1
  368. package/chunks/HUDMaterial.glsl.js +1 -1
  369. package/config.js +1 -1
  370. package/copyright.txt +2 -2
  371. package/core/MultiOriginJSONSupport.d.ts +8 -0
  372. package/core/MultiOriginJSONSupport.js +1 -1
  373. package/core/ReadOnlyMultiOriginJSONSupport.d.ts +40 -0
  374. package/core/ReadOnlyMultiOriginJSONSupport.js +1 -1
  375. package/core/WriteableMultiOriginJSONMixin.js +1 -1
  376. package/core/accessorSupport/decorators/subclass.js +1 -1
  377. package/core/accessorSupport/types.d.ts +2 -0
  378. package/editing/sharedTemplates/templateLoader.js +5 -0
  379. package/editing/templateUtils.js +1 -1
  380. package/interfaces.d.ts +6 -0
  381. package/kernel.js +1 -1
  382. package/layers/BingMapsLayer.d.ts +3 -2
  383. package/layers/BingMapsLayer.js +1 -1
  384. package/layers/BuildingSceneLayer.d.ts +3 -2
  385. package/layers/BuildingSceneLayer.js +1 -1
  386. package/layers/CSVLayer.js +1 -1
  387. package/layers/CatalogLayer.d.ts +3 -2
  388. package/layers/CatalogLayer.js +1 -1
  389. package/layers/DimensionLayer.d.ts +3 -2
  390. package/layers/DimensionLayer.js +1 -1
  391. package/layers/ElevationLayer.d.ts +3 -2
  392. package/layers/ElevationLayer.js +1 -1
  393. package/layers/FeatureLayer.d.ts +3 -2
  394. package/layers/FeatureLayer.js +1 -1
  395. package/layers/GaussianSplatLayer.d.ts +3 -2
  396. package/layers/GaussianSplatLayer.js +1 -1
  397. package/layers/GeoJSONLayer.d.ts +3 -2
  398. package/layers/GeoJSONLayer.js +1 -1
  399. package/layers/GeoRSSLayer.d.ts +3 -2
  400. package/layers/GeoRSSLayer.js +1 -1
  401. package/layers/GroupLayer.d.ts +3 -2
  402. package/layers/GroupLayer.js +1 -1
  403. package/layers/ImageryLayer.d.ts +3 -2
  404. package/layers/ImageryLayer.js +1 -1
  405. package/layers/ImageryTileLayer.d.ts +3 -2
  406. package/layers/ImageryTileLayer.js +1 -1
  407. package/layers/IntegratedMesh3DTilesLayer.d.ts +3 -2
  408. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  409. package/layers/IntegratedMeshLayer.d.ts +3 -2
  410. package/layers/IntegratedMeshLayer.js +1 -1
  411. package/layers/KMLLayer.d.ts +3 -2
  412. package/layers/KMLLayer.js +1 -1
  413. package/layers/KnowledgeGraphLayer.d.ts +3 -2
  414. package/layers/KnowledgeGraphLayer.js +1 -1
  415. package/layers/LineOfSightLayer.d.ts +3 -2
  416. package/layers/LineOfSightLayer.js +1 -1
  417. package/layers/LinkChartLayer.d.ts +3 -2
  418. package/layers/LinkChartLayer.js +1 -1
  419. package/layers/MapImageLayer.d.ts +3 -2
  420. package/layers/MapImageLayer.js +1 -1
  421. package/layers/MapNotesLayer.d.ts +3 -2
  422. package/layers/MapNotesLayer.js +1 -1
  423. package/layers/MediaLayer.d.ts +3 -2
  424. package/layers/MediaLayer.js +1 -1
  425. package/layers/OGCFeatureLayer.d.ts +3 -2
  426. package/layers/OGCFeatureLayer.js +1 -1
  427. package/layers/ParquetLayer.d.ts +3 -2
  428. package/layers/ParquetLayer.js +1 -1
  429. package/layers/PointCloudLayer.d.ts +3 -2
  430. package/layers/PointCloudLayer.js +1 -1
  431. package/layers/RouteLayer.d.ts +3 -2
  432. package/layers/RouteLayer.js +1 -1
  433. package/layers/SceneLayer.d.ts +6 -2
  434. package/layers/SceneLayer.js +1 -1
  435. package/layers/StreamLayer.d.ts +3 -2
  436. package/layers/StreamLayer.js +1 -1
  437. package/layers/SubtypeGroupLayer.d.ts +3 -2
  438. package/layers/SubtypeGroupLayer.js +1 -1
  439. package/layers/TileLayer.d.ts +3 -2
  440. package/layers/TileLayer.js +1 -1
  441. package/layers/UnknownLayer.d.ts +3 -2
  442. package/layers/UnknownLayer.js +1 -1
  443. package/layers/UnsupportedLayer.d.ts +3 -2
  444. package/layers/UnsupportedLayer.js +1 -1
  445. package/layers/VectorTileLayer.d.ts +3 -2
  446. package/layers/VectorTileLayer.js +1 -1
  447. package/layers/VideoLayer.d.ts +3 -2
  448. package/layers/VideoLayer.js +1 -1
  449. package/layers/ViewshedLayer.d.ts +3 -2
  450. package/layers/ViewshedLayer.js +1 -1
  451. package/layers/VoxelLayer.d.ts +3 -2
  452. package/layers/VoxelLayer.js +1 -1
  453. package/layers/WCSLayer.d.ts +3 -2
  454. package/layers/WCSLayer.js +1 -1
  455. package/layers/WFSLayer.d.ts +3 -2
  456. package/layers/WFSLayer.js +1 -1
  457. package/layers/WMSLayer.d.ts +3 -2
  458. package/layers/WMSLayer.js +1 -1
  459. package/layers/WMTSLayer.d.ts +3 -2
  460. package/layers/WMTSLayer.js +1 -1
  461. package/layers/WebTileLayer.d.ts +3 -2
  462. package/layers/WebTileLayer.js +1 -1
  463. package/layers/buildingSublayers/BuildingSublayer.d.ts +3 -2
  464. package/layers/buildingSublayers/BuildingSublayer.js +1 -1
  465. package/layers/catalog/CatalogDynamicGroupLayer.d.ts +3 -2
  466. package/layers/catalog/CatalogDynamicGroupLayer.js +1 -1
  467. package/layers/catalog/CatalogFootprintLayer.d.ts +3 -2
  468. package/layers/catalog/CatalogFootprintLayer.js +1 -1
  469. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +3 -2
  470. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  471. package/layers/media/types.d.ts +31 -5
  472. package/layers/mixins/ImageryTileMixin.js +1 -1
  473. package/layers/raster/datasets/FunctionRaster.js +1 -1
  474. package/layers/raster/functions/BaseRasterFunction.js +1 -1
  475. package/layers/raster/functions/StretchFunction.js +1 -1
  476. package/layers/raster/functions/rasterProjectionHelper.js +1 -1
  477. package/layers/support/ElevationQuery.js +1 -1
  478. package/layers/support/MediaElementBase.d.ts +5 -3
  479. package/layers/support/MediaElementBase.js +1 -1
  480. package/layers/support/RasterJobHandler.js +1 -1
  481. package/layers/support/RasterWorker.js +1 -1
  482. package/layers/support/Sublayer.d.ts +3 -2
  483. package/layers/support/Sublayer.js +1 -1
  484. package/layers/support/SubtypeSublayer.d.ts +3 -2
  485. package/layers/support/SubtypeSublayer.js +1 -1
  486. package/layers/support/WMSSublayer.d.ts +3 -2
  487. package/layers/support/WMSSublayer.js +1 -1
  488. package/layers/support/layerOriginUtils.js +1 -1
  489. package/linkChart/LinkChartProperties.d.ts +5 -3
  490. package/linkChart/LinkChartProperties.js +1 -1
  491. package/networks/CircuitManager.d.ts +1 -1
  492. package/networks/Network.d.ts +4 -2
  493. package/networks/Network.js +1 -1
  494. package/networks/support/NamedTraceConfiguration.d.ts +5 -3
  495. package/networks/support/NamedTraceConfiguration.js +1 -1
  496. package/networks/support/jsonTypes.d.ts +65 -0
  497. package/package.json +3 -3
  498. package/rest/featureService/types.d.ts +42 -5
  499. package/rest/networks/circuits/exportCircuits.js +1 -1
  500. package/rest/networks/circuits/support/ExportCircuitsParameters.d.ts +10 -2
  501. package/rest/networks/circuits/support/ExportCircuitsParameters.js +1 -1
  502. package/rest/support/Query.d.ts +12 -1
  503. package/support/revision.js +1 -1
  504. package/symbols/support/symbolUtils.js +1 -1
  505. package/views/2d/engine/BitmapTileContainer.js +1 -1
  506. package/views/2d/engine/DisplayObject.js +1 -1
  507. package/views/2d/engine/Stage.js +1 -1
  508. package/views/2d/engine/imagery/RasterTileContainer.js +1 -1
  509. package/views/2d/engine/imagery/RasterVFTileContainer.js +1 -1
  510. package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
  511. package/views/2d/engine/vectorTiles/decluttering/SymbolDeclutterer.js +1 -1
  512. package/views/2d/engine/vectorTiles/decluttering/SymbolFader.js +1 -1
  513. package/views/2d/engine/webgl/RenderingDevice.js +1 -1
  514. package/views/2d/engine/webgl/TileContainer.js +1 -1
  515. package/views/2d/engine/webgl/collisions/LabelMetric.js +1 -1
  516. package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueProgramCache.js +1 -1
  517. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueBackground.js +1 -1
  518. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueFill.js +1 -1
  519. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueLine.js +1 -1
  520. package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueSymbol.js +1 -1
  521. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  522. package/views/2d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles2D.js +1 -1
  523. package/views/2d/layers/TileLayerView2D.js +1 -1
  524. package/views/2d/layers/WMTSLayerView2D.js +1 -1
  525. package/views/2d/layers/features/FeatureContainer.js +1 -1
  526. package/views/2d/layers/features/Processor.js +1 -1
  527. package/views/2d/layers/features/support/Tile.js +1 -1
  528. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  529. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  530. package/views/2d/layers/imagery/VectorFieldTileView2D.js +1 -1
  531. package/views/2d/layers/support/imageUtils.js +1 -1
  532. package/views/2d/tiling/TileCache.js +1 -1
  533. package/views/2d/tiling/TileInfoView.js +1 -1
  534. package/views/2d/tiling/TileInfoViewPOT.js +1 -1
  535. package/views/3d/FocusAreasView.js +1 -1
  536. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  537. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
  538. package/views/3d/camera/intersectionUtils.js +1 -1
  539. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  540. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  541. package/views/3d/layers/graphics/ElevationQuery.js +1 -1
  542. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  543. package/views/3d/layers/graphics/extrudeUtils.js +5 -0
  544. package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
  545. package/views/3d/support/gaussianSplatting/GaussianSplatFadeHelper.js +1 -1
  546. package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +1 -1
  547. package/views/interactive/snapping/SelfSnappingEngine.js +1 -1
  548. package/views/interactive/snapping/SnappingContext.js +1 -1
  549. package/widgets/Attribution.d.ts +1 -0
  550. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +18 -0
  551. package/widgets/BatchAttributeForm.d.ts +2 -0
  552. package/widgets/BatchAttributeForm.js +1 -1
  553. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  554. package/widgets/Editor/workflowUtils.js +1 -1
  555. package/widgets/Feature/support/featureUtils.js +1 -1
  556. package/widgets/FeatureForm.js +1 -1
  557. package/widgets/FeatureTable/FeatureTableViewModel.d.ts +43 -4
  558. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  559. package/widgets/FeatureTable/FieldColumn.js +1 -1
  560. package/widgets/FeatureTable/Grid/EditorColumn.js +1 -1
  561. package/widgets/FeatureTable/Grid/types.d.ts +7 -1
  562. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  563. package/widgets/FeatureTable/support/tableUtils.js +1 -1
  564. package/widgets/FeatureTable.d.ts +43 -4
  565. package/widgets/FeatureTable.js +1 -1
  566. package/widgets/Legend/LegendViewModel.d.ts +6 -0
  567. package/widgets/Legend/styles/card/CardView.d.ts +19 -3
  568. package/widgets/Legend/styles/classic/ClassicView.d.ts +1 -0
  569. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  570. package/widgets/Legend.d.ts +15 -0
  571. package/widgets/Search/SearchViewModel.d.ts +5 -0
  572. package/widgets/Search/SearchViewModel.js +1 -1
  573. package/widgets/Search/support/layerSearchUtils.js +1 -1
  574. package/widgets/Search.js +1 -1
  575. package/widgets/smartMapping/BinaryColorSizeSlider.js +1 -1
  576. package/widgets/smartMapping/ClassedColorSlider.js +1 -1
  577. package/widgets/smartMapping/ClassedSizeSlider.d.ts +1 -1
  578. package/widgets/smartMapping/ClassedSizeSlider.js +1 -1
  579. package/widgets/smartMapping/ColorSizeSlider.js +1 -1
  580. package/widgets/smartMapping/ColorSlider.js +1 -1
  581. package/widgets/smartMapping/OpacitySlider.js +1 -1
  582. package/widgets/smartMapping/SizeSlider.js +1 -1
  583. package/assets/esri/core/workers/chunks/00c77f03dd511c6dbff2.js +0 -1
  584. package/assets/esri/core/workers/chunks/015492d609c28077d66c.js +0 -1
  585. package/assets/esri/core/workers/chunks/04176244b0a3539c9681.js +0 -1
  586. package/assets/esri/core/workers/chunks/0429ca6ba562ae29897e.js +0 -1
  587. package/assets/esri/core/workers/chunks/04958494022f82dca473.js +0 -1
  588. package/assets/esri/core/workers/chunks/049c125085028ffdd0dd.js +0 -1
  589. package/assets/esri/core/workers/chunks/05e3bfd07a7a227862fd.js +0 -1
  590. package/assets/esri/core/workers/chunks/095c1b88cdcb91ab837e.js +0 -1
  591. package/assets/esri/core/workers/chunks/09b77f82c22530b44daa.js +0 -1
  592. package/assets/esri/core/workers/chunks/0a39c6dc57bd60d5587e.js +0 -1
  593. package/assets/esri/core/workers/chunks/0b679d5a1bfdbd006d6e.js +0 -1
  594. package/assets/esri/core/workers/chunks/0b7bbdc0d71ee6721751.js +0 -2
  595. package/assets/esri/core/workers/chunks/0d9e1ccc3ba8b5ed3287.js +0 -1
  596. package/assets/esri/core/workers/chunks/0f4e9846d074864b39c2.js +0 -1
  597. package/assets/esri/core/workers/chunks/0fc22ad791d3ec0a9c5e.js +0 -1
  598. package/assets/esri/core/workers/chunks/1037b38aade2a847bf24.js +0 -1
  599. package/assets/esri/core/workers/chunks/108a4ab28b6586e281d9.js +0 -1
  600. package/assets/esri/core/workers/chunks/12f9a55253084a910b2e.js +0 -1
  601. package/assets/esri/core/workers/chunks/13137f35b9ab299d07e3.js +0 -1
  602. package/assets/esri/core/workers/chunks/13839d220e5c62404923.js +0 -1
  603. package/assets/esri/core/workers/chunks/1484a7ef4fcbd748b197.js +0 -1
  604. package/assets/esri/core/workers/chunks/14dedd80fb797303f91f.js +0 -1
  605. package/assets/esri/core/workers/chunks/1694b9154df3eccf602e.js +0 -1
  606. package/assets/esri/core/workers/chunks/16a7edb381621085a631.js +0 -1
  607. package/assets/esri/core/workers/chunks/16cfa7031d6dbf5aa09b.js +0 -1
  608. package/assets/esri/core/workers/chunks/18ab5959ebf8689f8fe8.js +0 -1
  609. package/assets/esri/core/workers/chunks/18b0ce0bc2a9737ffb1b.js +0 -1
  610. package/assets/esri/core/workers/chunks/1a6d2f525dd30d08cf9b.js +0 -1
  611. package/assets/esri/core/workers/chunks/1b284a6f32effe28aafc.js +0 -1
  612. package/assets/esri/core/workers/chunks/1c58bd3275c849d44b13.js +0 -1
  613. package/assets/esri/core/workers/chunks/1c742018eb7dfd5d23e3.js +0 -1
  614. package/assets/esri/core/workers/chunks/1dfa949cc4f4c18ed4cf.js +0 -1
  615. package/assets/esri/core/workers/chunks/1e848d9da1c61a27cf18.js +0 -1
  616. package/assets/esri/core/workers/chunks/20f4c6d8b310ecab97be.js +0 -1
  617. package/assets/esri/core/workers/chunks/218b2b767b40d85fb713.js +0 -1
  618. package/assets/esri/core/workers/chunks/22c115ec003351c7d8ee.js +0 -1
  619. package/assets/esri/core/workers/chunks/23545a9adc75564ecf6e.js +0 -1
  620. package/assets/esri/core/workers/chunks/23cf4cbc389d2b50e968.js +0 -1
  621. package/assets/esri/core/workers/chunks/24527b61c8c216becbc4.js +0 -1
  622. package/assets/esri/core/workers/chunks/24dab877047369de13e2.js +0 -1
  623. package/assets/esri/core/workers/chunks/25f3ee666f545a7a7993.js +0 -2
  624. package/assets/esri/core/workers/chunks/29471e0b3f7296dee096.js +0 -1
  625. package/assets/esri/core/workers/chunks/2b27499fa9de22970b7a.js +0 -1
  626. package/assets/esri/core/workers/chunks/2bd59ece927b5c1c9f80.js +0 -1
  627. package/assets/esri/core/workers/chunks/2c7038a7ffaf75344b02.js +0 -1
  628. package/assets/esri/core/workers/chunks/2d8b8880e6bff4414e95.js +0 -1
  629. package/assets/esri/core/workers/chunks/2dfa7abf2d39fa5a3874.js +0 -1
  630. package/assets/esri/core/workers/chunks/2e6ae1ca07df442fc966.js +0 -1
  631. package/assets/esri/core/workers/chunks/2e6bd743b88e83d43137.js +0 -1
  632. package/assets/esri/core/workers/chunks/3001568a99fdd14aada9.js +0 -1
  633. package/assets/esri/core/workers/chunks/30dd4a7c93b33988a270.js +0 -1
  634. package/assets/esri/core/workers/chunks/312b3cc1c91d5b419faf.js +0 -1
  635. package/assets/esri/core/workers/chunks/31fa3dd983e9e73fcb65.js +0 -1
  636. package/assets/esri/core/workers/chunks/33a13e80badd20ed8de2.js +0 -1
  637. package/assets/esri/core/workers/chunks/355c8d0eadfff9f62dfb.js +0 -1
  638. package/assets/esri/core/workers/chunks/35c98ea99000f411175f.js +0 -1
  639. package/assets/esri/core/workers/chunks/35e1d0cfc3c5a484422f.js +0 -1
  640. package/assets/esri/core/workers/chunks/360f263f32aa2342a897.js +0 -1
  641. package/assets/esri/core/workers/chunks/369f37060608342a4262.js +0 -1
  642. package/assets/esri/core/workers/chunks/36ecf951c0c7dad84b69.js +0 -1
  643. package/assets/esri/core/workers/chunks/37002a46f03a9fc5f644.js +0 -2
  644. package/assets/esri/core/workers/chunks/37258b702fe06bbcf748.js +0 -1
  645. package/assets/esri/core/workers/chunks/37a3e91791a18ed8b8da.js +0 -1
  646. package/assets/esri/core/workers/chunks/3a04153ca9d8e4f01185.js +0 -1
  647. package/assets/esri/core/workers/chunks/3b1982bf7b44ff897a35.js +0 -1
  648. package/assets/esri/core/workers/chunks/3b25f5d9c8f78bb6e011.js +0 -1
  649. package/assets/esri/core/workers/chunks/3c5f07ebe1b09dcdc958.js +0 -1
  650. package/assets/esri/core/workers/chunks/3c66dd52ad156711a6a2.js +0 -1
  651. package/assets/esri/core/workers/chunks/3ed317900f0edf635508.js +0 -1
  652. package/assets/esri/core/workers/chunks/3f0959b1abafe516146e.js +0 -1
  653. package/assets/esri/core/workers/chunks/41f487713c6278d389a1.js +0 -1
  654. package/assets/esri/core/workers/chunks/4319b89cfa02894a8cae.js +0 -1
  655. package/assets/esri/core/workers/chunks/43e2c1d72cd9c8beed2f.js +0 -2
  656. package/assets/esri/core/workers/chunks/44c228388a95fa958827.js +0 -1
  657. package/assets/esri/core/workers/chunks/45a9cd722e98dd1548ae.js +0 -1
  658. package/assets/esri/core/workers/chunks/46daa1ff5b412a97edc9.js +0 -1
  659. package/assets/esri/core/workers/chunks/46e547691bca424f2bc9.js +0 -1
  660. package/assets/esri/core/workers/chunks/4750f55a289bc0cf3d77.js +0 -1
  661. package/assets/esri/core/workers/chunks/47d2103b876b01bc26fd.js +0 -1
  662. package/assets/esri/core/workers/chunks/495af366ec1defd89a72.js +0 -1
  663. package/assets/esri/core/workers/chunks/4b14ee37b5ac50a734f9.js +0 -1
  664. package/assets/esri/core/workers/chunks/4bcd74951477e8977ba1.js +0 -1
  665. package/assets/esri/core/workers/chunks/4cbe78d6a5ff617e15d6.js +0 -1
  666. package/assets/esri/core/workers/chunks/4ce28c936eaffe57c448.js +0 -1
  667. package/assets/esri/core/workers/chunks/4d5591c1b4ef37075921.js +0 -1
  668. package/assets/esri/core/workers/chunks/4ef97eb67dc42e0052d6.js +0 -1
  669. package/assets/esri/core/workers/chunks/4fa230dc6e5e87b0dec1.js +0 -1
  670. package/assets/esri/core/workers/chunks/4fcf035582fa6e93d264.js +0 -1
  671. package/assets/esri/core/workers/chunks/509307a2ef990ad1da8f.js +0 -301
  672. package/assets/esri/core/workers/chunks/50eb381b18b84b9c75a3.js +0 -1
  673. package/assets/esri/core/workers/chunks/50f03813fba4b752ca9f.js +0 -1
  674. package/assets/esri/core/workers/chunks/52a14266fe239b95c5ce.js +0 -1
  675. package/assets/esri/core/workers/chunks/52bcfb3ea563c1a301d4.js +0 -1
  676. package/assets/esri/core/workers/chunks/53b5c77832df7df4d4e3.js +0 -1
  677. package/assets/esri/core/workers/chunks/558822b700e8bd844052.js +0 -1
  678. package/assets/esri/core/workers/chunks/55a9ea536c64976c3409.js +0 -1
  679. package/assets/esri/core/workers/chunks/563933a84fc9b0e021f6.js +0 -1
  680. package/assets/esri/core/workers/chunks/56569d0c2cf5c5167651.js +0 -1
  681. package/assets/esri/core/workers/chunks/575a33924ec900f9e537.js +0 -1
  682. package/assets/esri/core/workers/chunks/584c4602d97a008afb83.js +0 -1
  683. package/assets/esri/core/workers/chunks/58b3a776ef129f7f86dc.js +0 -1
  684. package/assets/esri/core/workers/chunks/590a7fd4f5476224ec89.js +0 -1
  685. package/assets/esri/core/workers/chunks/59a45533e96cedf1c480.js +0 -1
  686. package/assets/esri/core/workers/chunks/5a66b7f1f4da75da8e7f.js +0 -1
  687. package/assets/esri/core/workers/chunks/5b9f2aa3ba1bf12c3240.js +0 -2
  688. package/assets/esri/core/workers/chunks/5bbf20135c87a1cc8a18.js +0 -1
  689. package/assets/esri/core/workers/chunks/5cc217f188fd56006158.js +0 -1
  690. package/assets/esri/core/workers/chunks/5dc2f2e28c30386efadf.js +0 -1
  691. package/assets/esri/core/workers/chunks/5df49e1f283e2e83de46.js +0 -1
  692. package/assets/esri/core/workers/chunks/60764ea501a3a1aacc63.js +0 -1
  693. package/assets/esri/core/workers/chunks/6087d5dc40bb62ec48c8.js +0 -1
  694. package/assets/esri/core/workers/chunks/6094bba52ddada48c7ed.js +0 -1
  695. package/assets/esri/core/workers/chunks/60eeeea671a523bb6b15.js +0 -1
  696. package/assets/esri/core/workers/chunks/60f363ee2add089e8f0b.js +0 -1
  697. package/assets/esri/core/workers/chunks/6387308c4add226e5b83.js +0 -1
  698. package/assets/esri/core/workers/chunks/63b8193ad90b2ebe6884.js +0 -1
  699. package/assets/esri/core/workers/chunks/657602e6a84e8b4576fb.js +0 -1
  700. package/assets/esri/core/workers/chunks/65fd971d0574d69cbc26.js +0 -1
  701. package/assets/esri/core/workers/chunks/679cd6424e0e2d7f372b.js +0 -1
  702. package/assets/esri/core/workers/chunks/6800647240b7968be225.js +0 -1
  703. package/assets/esri/core/workers/chunks/68074a484d7f9bc713c0.js +0 -1
  704. package/assets/esri/core/workers/chunks/680f9c29ca96ea8e01da.js +0 -1
  705. package/assets/esri/core/workers/chunks/68cb43f2fa8cc826e99b.js +0 -1
  706. package/assets/esri/core/workers/chunks/69a68a6d6736c4b97a27.js +0 -1
  707. package/assets/esri/core/workers/chunks/6a3d66d7c92f90cc2a17.js +0 -1
  708. package/assets/esri/core/workers/chunks/6a544fb44f7da0e80f43.js +0 -1
  709. package/assets/esri/core/workers/chunks/6a782e8475bff4d56dbc.js +0 -1
  710. package/assets/esri/core/workers/chunks/6b85a8776ec2beff63cb.js +0 -1
  711. package/assets/esri/core/workers/chunks/6be530ab81291745485b.js +0 -2
  712. package/assets/esri/core/workers/chunks/6d3ae7969ea86a2e0b13.js +0 -1
  713. package/assets/esri/core/workers/chunks/6df484faf54e90a6cc77.js +0 -1
  714. package/assets/esri/core/workers/chunks/6ea6ad894ac634aa4391.js +0 -1
  715. package/assets/esri/core/workers/chunks/6ffc1a0400298fca00ee.js +0 -1
  716. package/assets/esri/core/workers/chunks/729c2d26ae23d9c86547.js +0 -1
  717. package/assets/esri/core/workers/chunks/73bee5659414b3687cfc.js +0 -1
  718. package/assets/esri/core/workers/chunks/73c416ae0ec5a1815591.js +0 -2
  719. package/assets/esri/core/workers/chunks/74b825d4f0e7ab567b10.js +0 -1
  720. package/assets/esri/core/workers/chunks/75c66e38bdc1c786c599.js +0 -1
  721. package/assets/esri/core/workers/chunks/75fd2ef1236a9364ca7f.js +0 -1
  722. package/assets/esri/core/workers/chunks/760a759f9697adde6dd4.js +0 -1
  723. package/assets/esri/core/workers/chunks/77509bd20ac5bc190c94.js +0 -1039
  724. package/assets/esri/core/workers/chunks/7763cf4a9a4343c28591.js +0 -1
  725. package/assets/esri/core/workers/chunks/7972954801b82e7afc72.js +0 -1
  726. package/assets/esri/core/workers/chunks/798d227205bd958de6a7.js +0 -1
  727. package/assets/esri/core/workers/chunks/7bc09e80bf45fe137055.js +0 -1
  728. package/assets/esri/core/workers/chunks/7be9bbae23895d1cfa92.js +0 -1
  729. package/assets/esri/core/workers/chunks/7bf30c254228f9b7f224.js +0 -1
  730. package/assets/esri/core/workers/chunks/7bf491b468cd74a4166c.js +0 -1
  731. package/assets/esri/core/workers/chunks/7d631ebf8f79225cf0f6.js +0 -1
  732. package/assets/esri/core/workers/chunks/7d744554d14057d9b2b1.js +0 -1
  733. package/assets/esri/core/workers/chunks/7d8664aeff66e34138bd.js +0 -1
  734. package/assets/esri/core/workers/chunks/7db52d2451494835c160.js +0 -1
  735. package/assets/esri/core/workers/chunks/818b5b8027d6fe8999d6.js +0 -1
  736. package/assets/esri/core/workers/chunks/8195310b4c53db902fc1.js +0 -1
  737. package/assets/esri/core/workers/chunks/82ace0195b63790b22c9.js +0 -1
  738. package/assets/esri/core/workers/chunks/83117d2747bdaf480c7b.js +0 -1
  739. package/assets/esri/core/workers/chunks/83c5dea24e36ac2e3497.js +0 -1
  740. package/assets/esri/core/workers/chunks/84440efe2cc337dab81f.js +0 -1
  741. package/assets/esri/core/workers/chunks/84ec8ea3e40e0864798f.js +0 -1
  742. package/assets/esri/core/workers/chunks/852007720e3bc29532db.js +0 -1
  743. package/assets/esri/core/workers/chunks/85c92726121cb43a2216.js +0 -1
  744. package/assets/esri/core/workers/chunks/86832d94190150c70c11.js +0 -1
  745. package/assets/esri/core/workers/chunks/873008572c1f21cea122.js +0 -2
  746. package/assets/esri/core/workers/chunks/87c6470ee295d736b06d.js +0 -1
  747. package/assets/esri/core/workers/chunks/88379cd8e8e1c7ae3c7c.js +0 -1
  748. package/assets/esri/core/workers/chunks/88cbaa91c495d86f4bb0.js +0 -1
  749. package/assets/esri/core/workers/chunks/89853fccdf2bfcc290c0.js +0 -1
  750. package/assets/esri/core/workers/chunks/8c1f1eb36198ce40ef13.js +0 -1
  751. package/assets/esri/core/workers/chunks/8d58e59ea13ecafdd45c.js +0 -1
  752. package/assets/esri/core/workers/chunks/8db723b8468e408dda46.js +0 -1
  753. package/assets/esri/core/workers/chunks/8dca61f8ba6689379f86.js +0 -1
  754. package/assets/esri/core/workers/chunks/8e354c7b4858db5880a9.js +0 -1
  755. package/assets/esri/core/workers/chunks/8e556ff730ae96290a69.js +0 -1
  756. package/assets/esri/core/workers/chunks/8e62a5fcc4c7e83a903a.js +0 -1
  757. package/assets/esri/core/workers/chunks/9086a4933d3d3d9ffa72.js +0 -1
  758. package/assets/esri/core/workers/chunks/91d9ade78854f40a962d.js +0 -1
  759. package/assets/esri/core/workers/chunks/91fba3bebd78cb956941.js +0 -1
  760. package/assets/esri/core/workers/chunks/920b4def081c78c0d586.js +0 -1
  761. package/assets/esri/core/workers/chunks/92928c56b312e1514600.js +0 -1
  762. package/assets/esri/core/workers/chunks/92a4f56232f81ca457fa.js +0 -1
  763. package/assets/esri/core/workers/chunks/92ef6071ea87b7f940e2.js +0 -1
  764. package/assets/esri/core/workers/chunks/9319d57494482668ab19.js +0 -1
  765. package/assets/esri/core/workers/chunks/9361834d2c3064eb41fc.js +0 -1
  766. package/assets/esri/core/workers/chunks/9382af94bf6bf1b09c8c.js +0 -1
  767. package/assets/esri/core/workers/chunks/942c80c425b1f13cced5.js +0 -1
  768. package/assets/esri/core/workers/chunks/95cb062cae4c31c07124.js +0 -1
  769. package/assets/esri/core/workers/chunks/968335b28b895e19913b.js +0 -1
  770. package/assets/esri/core/workers/chunks/979bc762ccc0d3fc2467.js +0 -1
  771. package/assets/esri/core/workers/chunks/9828b07b5f8fd9f40935.js +0 -1
  772. package/assets/esri/core/workers/chunks/98739414c107ad78e4d8.js +0 -1
  773. package/assets/esri/core/workers/chunks/988f5e003377d734d282.js +0 -1
  774. package/assets/esri/core/workers/chunks/9921c8d4487a0f580b93.js +0 -1
  775. package/assets/esri/core/workers/chunks/9a6bdcedcb7d2798ba30.js +0 -1
  776. package/assets/esri/core/workers/chunks/9afe220b5b60cfa44c95.js +0 -1
  777. package/assets/esri/core/workers/chunks/9ba8a2e1c0fb4e1efc7c.js +0 -1
  778. package/assets/esri/core/workers/chunks/9c93eadbd19bef1191b4.js +0 -1
  779. package/assets/esri/core/workers/chunks/9c9d359caf8354a8ec52.js +0 -1
  780. package/assets/esri/core/workers/chunks/9cc2832d5f625f81c08d.js +0 -1
  781. package/assets/esri/core/workers/chunks/9ccabf8142fb5de4d3e2.js +0 -2
  782. package/assets/esri/core/workers/chunks/9cec9d09f3aa5c21660d.js +0 -37
  783. package/assets/esri/core/workers/chunks/9d258f14199181dee424.js +0 -1
  784. package/assets/esri/core/workers/chunks/9e869fd6450cf874783a.js +0 -1
  785. package/assets/esri/core/workers/chunks/9f34cf024231f574009c.js +0 -1
  786. package/assets/esri/core/workers/chunks/a1594486177015e8a6c3.js +0 -1
  787. package/assets/esri/core/workers/chunks/a16e75ff5cd9b22be197.js +0 -1
  788. package/assets/esri/core/workers/chunks/a1b8722c6acafdf1c2bf.js +0 -1
  789. package/assets/esri/core/workers/chunks/a3407ca77b0ff62c0e75.js +0 -1
  790. package/assets/esri/core/workers/chunks/a41073263af5eba3c16d.js +0 -1
  791. package/assets/esri/core/workers/chunks/a623676c74745e040a2a.js +0 -1
  792. package/assets/esri/core/workers/chunks/a64cd02ca959d511101c.js +0 -1
  793. package/assets/esri/core/workers/chunks/a6742abe3ebe371e85f1.js +0 -1
  794. package/assets/esri/core/workers/chunks/a6d4256c327f07221117.js +0 -1
  795. package/assets/esri/core/workers/chunks/a6f29d1a6356e2de5a79.js +0 -1
  796. package/assets/esri/core/workers/chunks/a79fad422d41019c8232.js +0 -1
  797. package/assets/esri/core/workers/chunks/a8dfd246c797f3b979f5.js +0 -1
  798. package/assets/esri/core/workers/chunks/ab0275669e28e7a34c38.js +0 -1
  799. package/assets/esri/core/workers/chunks/ab5e2f823960c33cefe4.js +0 -1
  800. package/assets/esri/core/workers/chunks/acdbe0299024d58e1421.js +0 -1
  801. package/assets/esri/core/workers/chunks/ad253136c1e12f733d15.js +0 -1
  802. package/assets/esri/core/workers/chunks/adc68e2c6d2698a52bfe.js +0 -1
  803. package/assets/esri/core/workers/chunks/adff1791ae44631ad34a.js +0 -1
  804. package/assets/esri/core/workers/chunks/ae16fe50a54b5c0f9811.js +0 -1
  805. package/assets/esri/core/workers/chunks/ae18de425548bb865702.js +0 -1
  806. package/assets/esri/core/workers/chunks/ae6066ea6cb373dc6db3.js +0 -1
  807. package/assets/esri/core/workers/chunks/aeb524eded012217a865.js +0 -1
  808. package/assets/esri/core/workers/chunks/af00081b78fc30ac556c.js +0 -1
  809. package/assets/esri/core/workers/chunks/b211b53aa7616a093b90.js +0 -1
  810. package/assets/esri/core/workers/chunks/b28e0b89603d8b03f9e1.js +0 -1
  811. package/assets/esri/core/workers/chunks/b4349db7155673329432.js +0 -1
  812. package/assets/esri/core/workers/chunks/b48033645091c91e0d88.js +0 -1
  813. package/assets/esri/core/workers/chunks/b5e4a36784d598ae6679.js +0 -1
  814. package/assets/esri/core/workers/chunks/b64cfd86d9204be743c6.js +0 -1
  815. package/assets/esri/core/workers/chunks/b8988771bfa4e785ebd6.js +0 -1
  816. package/assets/esri/core/workers/chunks/ba6452acee3d6defb37e.js +0 -1
  817. package/assets/esri/core/workers/chunks/bb92a9daa0c5b019561f.js +0 -1
  818. package/assets/esri/core/workers/chunks/bc731ec9d5136f1d9253.js +0 -1
  819. package/assets/esri/core/workers/chunks/bd1d159dce4094694c93.js +0 -1
  820. package/assets/esri/core/workers/chunks/bd2a28b14e5c0a55d783.js +0 -1
  821. package/assets/esri/core/workers/chunks/bdbb5b33f0f49661bf6d.js +0 -1
  822. package/assets/esri/core/workers/chunks/befeca51530bba5e8073.js +0 -1
  823. package/assets/esri/core/workers/chunks/bf05164b7a3e4f31e9db.js +0 -1
  824. package/assets/esri/core/workers/chunks/bf88bd763fd6442a95fd.js +0 -1
  825. package/assets/esri/core/workers/chunks/bfe052b386ec4874f350.js +0 -1
  826. package/assets/esri/core/workers/chunks/c042269586921e337be9.js +0 -1
  827. package/assets/esri/core/workers/chunks/c0b15510a8cab98df77f.js +0 -1
  828. package/assets/esri/core/workers/chunks/c27842a34e73ccb46116.js +0 -1
  829. package/assets/esri/core/workers/chunks/c3272b09bff886b08ce1.js +0 -1
  830. package/assets/esri/core/workers/chunks/c38a07e936226b361b63.js +0 -1
  831. package/assets/esri/core/workers/chunks/c59c1e52acb5ac8f78f9.js +0 -1
  832. package/assets/esri/core/workers/chunks/c5cc0fc652432a9264cc.js +0 -1
  833. package/assets/esri/core/workers/chunks/c605bf7d1e12917ac482.js +0 -1
  834. package/assets/esri/core/workers/chunks/c743e561e7d73a100576.js +0 -1
  835. package/assets/esri/core/workers/chunks/c7838ac0db8570a2d2c1.js +0 -1
  836. package/assets/esri/core/workers/chunks/c8182c2cbb0ead202af6.js +0 -1
  837. package/assets/esri/core/workers/chunks/c91ef3814e7f024043cf.js +0 -1
  838. package/assets/esri/core/workers/chunks/c96083838f919a8f64cd.js +0 -1
  839. package/assets/esri/core/workers/chunks/cad1d7e5ce89f51b3ac9.js +0 -1
  840. package/assets/esri/core/workers/chunks/cade149fa19b4d06dd24.js +0 -1
  841. package/assets/esri/core/workers/chunks/cc50f96321a7c12f300b.js +0 -1
  842. package/assets/esri/core/workers/chunks/ccc743e41854eb225c23.js +0 -1
  843. package/assets/esri/core/workers/chunks/cd788ed111e1e35cf9c8.js +0 -1
  844. package/assets/esri/core/workers/chunks/ce3870db25566cd93d8e.js +0 -1
  845. package/assets/esri/core/workers/chunks/cfbe9993263fa6f69363.js +0 -1
  846. package/assets/esri/core/workers/chunks/d129a5a34e9ad09bd39e.js +0 -1
  847. package/assets/esri/core/workers/chunks/d14e75b160aa432233c6.js +0 -1
  848. package/assets/esri/core/workers/chunks/d21480925a8bc9c7de96.js +0 -1
  849. package/assets/esri/core/workers/chunks/d32aad968798948946e4.js +0 -1
  850. package/assets/esri/core/workers/chunks/d364096493ceeff34c10.js +0 -1
  851. package/assets/esri/core/workers/chunks/d373986588f6b1b8f2d5.js +0 -1
  852. package/assets/esri/core/workers/chunks/d3b1d1c389d70919fb02.js +0 -1
  853. package/assets/esri/core/workers/chunks/d52a0c3a855029c48bd2.js +0 -1
  854. package/assets/esri/core/workers/chunks/d66973e926bc03e2359a.js +0 -1
  855. package/assets/esri/core/workers/chunks/d7cd1d879768df629716.js +0 -1
  856. package/assets/esri/core/workers/chunks/d7df5e4028d502712317.js +0 -1
  857. package/assets/esri/core/workers/chunks/d90564fbafc00df2d56d.js +0 -1
  858. package/assets/esri/core/workers/chunks/d9ca754f51b9812bb179.js +0 -1
  859. package/assets/esri/core/workers/chunks/d9ef0b3341e2744d8f2f.js +0 -1
  860. package/assets/esri/core/workers/chunks/da5ce19ecf3a5e92a2a9.js +0 -1
  861. package/assets/esri/core/workers/chunks/da7685ec2b6eaf00fd2d.js +0 -1
  862. package/assets/esri/core/workers/chunks/dae715b2b0094641e42f.js +0 -1
  863. package/assets/esri/core/workers/chunks/db04b0a30cce9e476551.js +0 -1
  864. package/assets/esri/core/workers/chunks/db28d00171240b4fffac.js +0 -1
  865. package/assets/esri/core/workers/chunks/db4661fd82dc61162115.js +0 -1
  866. package/assets/esri/core/workers/chunks/dbd382546837aa7709e2.js +0 -1
  867. package/assets/esri/core/workers/chunks/dddb6cb44cbe4dc1af97.js +0 -1
  868. package/assets/esri/core/workers/chunks/de60421029fbcebe2950.js +0 -1
  869. package/assets/esri/core/workers/chunks/df33d5a08e1b6dc00f45.js +0 -1
  870. package/assets/esri/core/workers/chunks/e0369ce0d729c9656488.js +0 -1
  871. package/assets/esri/core/workers/chunks/e03c706e327f4989280a.js +0 -1
  872. package/assets/esri/core/workers/chunks/e0648f5aed9d939928dc.js +0 -1
  873. package/assets/esri/core/workers/chunks/e071b912539304564b69.js +0 -1
  874. package/assets/esri/core/workers/chunks/e10d6e511921394474ca.js +0 -1
  875. package/assets/esri/core/workers/chunks/e34b7acc963288ca0f04.js +0 -1
  876. package/assets/esri/core/workers/chunks/e4b6aa8f67c2bd285020.js +0 -1
  877. package/assets/esri/core/workers/chunks/e572ffc1d000e4e6325f.js +0 -1
  878. package/assets/esri/core/workers/chunks/e615a935bbf1168fac43.js +0 -1
  879. package/assets/esri/core/workers/chunks/e8bf362b2631f977b1cb.js +0 -1
  880. package/assets/esri/core/workers/chunks/e8e4d48ab4024e17108d.js +0 -1
  881. package/assets/esri/core/workers/chunks/e97787de88e2992add13.js +0 -1
  882. package/assets/esri/core/workers/chunks/eaadcc43837c465342cc.js +0 -1
  883. package/assets/esri/core/workers/chunks/eb7eb3b3b8800fd73f3e.js +0 -1
  884. package/assets/esri/core/workers/chunks/ecb4c223c0278971cdc9.js +0 -1
  885. package/assets/esri/core/workers/chunks/ed7e353e290b3a272457.js +0 -1
  886. package/assets/esri/core/workers/chunks/ee361690b456c12c30d8.js +0 -1
  887. package/assets/esri/core/workers/chunks/ef639d31c94d2b55b8d4.js +0 -1
  888. package/assets/esri/core/workers/chunks/ef977be20a647aeded0a.js +0 -1
  889. package/assets/esri/core/workers/chunks/efb631371b6bb3f043bb.js +0 -1
  890. package/assets/esri/core/workers/chunks/f0100b34f8b13fb37157.js +0 -1
  891. package/assets/esri/core/workers/chunks/f0914715e90e43466f8c.js +0 -1
  892. package/assets/esri/core/workers/chunks/f0a667d8d33bc51c795d.js +0 -1
  893. package/assets/esri/core/workers/chunks/f1e5d52e550326e49d1e.js +0 -1
  894. package/assets/esri/core/workers/chunks/f2b63597ae956db74eb3.js +0 -1
  895. package/assets/esri/core/workers/chunks/f32d4813b450a3eb4262.js +0 -1
  896. package/assets/esri/core/workers/chunks/f3b2c81f5ad26a58a4bd.js +0 -1
  897. package/assets/esri/core/workers/chunks/f54ec21fa67db6fef5a6.js +0 -1
  898. package/assets/esri/core/workers/chunks/f57b5720ce827f5845cd.js +0 -1
  899. package/assets/esri/core/workers/chunks/f5a695dc51793b138b23.js +0 -1
  900. package/assets/esri/core/workers/chunks/f5f584d325f8f2ea825f.js +0 -1
  901. package/assets/esri/core/workers/chunks/f65d26588d2d80680a26.js +0 -1
  902. package/assets/esri/core/workers/chunks/f65f1798f398bc549463.js +0 -1
  903. package/assets/esri/core/workers/chunks/f72e6c903f55ce95a6c5.js +0 -1
  904. package/assets/esri/core/workers/chunks/f77b93bef06bae03c1c6.js +0 -1
  905. package/assets/esri/core/workers/chunks/f7dfbf24859f4ac2421b.js +0 -1
  906. package/assets/esri/core/workers/chunks/f8438642a9bdd8980b4b.js +0 -1
  907. package/assets/esri/core/workers/chunks/f98689562017583f73ee.js +0 -1
  908. package/assets/esri/core/workers/chunks/fdb5b5d8a7c99a0bf5f9.js +0 -1
  909. package/assets/esri/core/workers/chunks/fdbe16e3b23e01655c0c.js +0 -1
  910. package/assets/esri/core/workers/chunks/fe07390e27f8cd5e93a8.js +0 -1
  911. package/assets/esri/core/workers/chunks/fe33b11ec3f58a0f541a.js +0 -1
  912. package/assets/esri/core/workers/chunks/ff8e2f998169ca3a7a68.js +0 -1
  913. package/assets/esri/core/workers/chunks/ffdba51e7256ebf8ebd3.js +0 -1
  914. /package/assets/esri/core/workers/chunks/{873008572c1f21cea122.js.LICENSE.txt → 91e307ca0d11804a7a1d.js.LICENSE.txt} +0 -0
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../../core/Error.js";import"../../../core/has.js";import{whenOnce as i,watch as r,sync as s}from"../../../core/reactiveUtils.js";import{property as a,subclass as l}from"../../../core/accessorSupport/decorators.js";import{projectDatasetExtent as n}from"../../../layers/raster/functions/rasterProjectionHelper.js";import{LayerView3D as o}from"./LayerView3D.js";import{TiledLayerView3D as h}from"./TiledLayerView3D.js";import m from"../support/flow/FlowSubViewTiles3D.js";import{RasterTile as d}from"../terrain/RasterTile.js";import{ImageryTileLayerViewMixin as p}from"../../layers/ImageryTileLayerViewMixin.js";import u from"../../layers/LayerView.js";import{RefreshableLayerView as y}from"../../layers/RefreshableLayerView.js";import{createQueryGeometry as c}from"../../support/drapedUtils.js";import{getWebGLCapabilities as f}from"../../webgl/capabilities.js";let b=class extends(p(y(h(o(u))))){constructor(){super(...arguments),this.type="imagery-tile-3d",this._isAlignedMapTile=!0,this._flowSubView=null,this.ignoresMemoryFactor=!1,this.unloadedMemory=0}initialize(){this.layer.increaseRasterJobHandlerUsage(),null==this.fullExtent&&this.addResolvingPromise(Promise.reject(new t("layerview:spatial-reference-incompatible","The layer extent cannot be projected to the view's spatial reference",{layer:this.layer})));const e=i(()=>this.view?.basemapTerrain?.tilingSchemeLocked).then(()=>{const e=this.view.basemapTerrain.tilingScheme,t=this.layer.tileInfo;this._isAlignedMapTile=["png","png24","png32","jpg","mixed"].includes(t.format)&&e.compatibleWith(t),this.tileInfo=this._isAlignedMapTile?t:e.toTileInfo(),this.addHandles([r(()=>this.layer.renderer,e=>{this._setSubView(e),this._updatingHandles.addPromise(this.doRefresh())},s),r(()=>[this.layer.interpolation,this.layer.bandIds,this.layer.multidimensionalDefinition,this.layer.multidimensionalSubset,this.layer.rasterFunction,this.timeExtent],()=>this._updatingHandles.addPromise(this.doRefresh()),s)])});this._setSubView(this.layer.renderer),this.addResolvingPromise(e)}destroy(){this.layer.decreaseRasterJobHandlerUsage(),this._flowSubView?.destroy()}_setSubView(e){if("wcs"===this.layer.type)return;const t="flow"===e?.type,i=this._flowSubView;t&&null!=i||(i?.destroy(),this._flowSubView=t?new m({layerView:this}):null)}get _blankTile(){const e=document.createElement("canvas"),t=e.getContext("2d"),[i,r]=this.tileInfo.size;return e.width=i,e.height=r,t.clearRect(0,0,i,r),t.getImageData(0,0,i,r)}get _hasFlow(){return null!=this._flowSubView}get imageFormatIsOpaque(){return"jpg"===this.layer.tileInfo.format}get hasMixedImageFormats(){return"mixed"===this.layer.tileInfo.format}get dataLevelRange(){const e=this.layer.tileInfo,t=this.tileInfo.lodAt(0)?.scale,i=e.lodAt(e.lods.length-1)?.scale;return this.levelRangeFromScaleRange(t,i)}get visibleAtCurrentScale(){return this._flowSubView?.visibleAtCurrentScale??this.tilesVisibleAtCurrentScale()}_getFullExtent(){return n(this.layer.serviceRasterInfo,this.view.basemapTerrain?.spatialReference??this.view.spatialReference)}async fetchTile(e,t){const i=this.tileInfo,r=this._canSymbolizeInWebGL(),s={tileInfo:i,requestRawData:r&&!this._hasFlow,signal:t.signal,timeExtent:this.timeExtent,requestAsImageElement:this._isAlignedMapTile,requestProjectedLocalDirections:this._hasFlow,noClip:!1},{layer:a}=this,[l,n,o]=e,h=await a.fetchTile(l,n,o,s);if(h instanceof HTMLImageElement)return h;let m=h?.pixelBlock;if(null==m)return this._blankTile;if(!r&&!this._hasFlow&&(m=await a.applyRenderer(h),null==m))return this._blankTile;const p=new d([l,n,o],m,i.size[0],i.size[1]);return r?(p.symbolizerRenderer=a.symbolizer.rendererJSON,p.symbolizerParameters=a.symbolizer.generateWebGLParameters(this._getSymbolizerOptions(l)),p.transformGrid=h.transformGrid,p.bandIds=a.bandIds):(p.isRendereredSource=!0,p.bandIds=null),p.interpolation=a.interpolation,p}_getSymbolizerOptions(e){const t=this.tileInfo.lodAt(e).resolution;return{pixelBlock:null,isGCS:null!=this.view.basemapTerrain?.spatialReference?this.view.basemapTerrain.spatialReference.isGeographic:this.view.spatialReference.isGeographic,resolution:{x:t,y:t},bandIds:this.layer.bandIds}}ensureSymbolizerParameters(e){this._canSymbolizeInWebGL()&&JSON.stringify(e.symbolizerRenderer)!==JSON.stringify(this.layer.symbolizer.rendererJSON)&&(e.symbolizerParameters=this.layer.symbolizer.generateWebGLParameters(this._getSymbolizerOptions(e.lij[0])))}createFetchPopupFeaturesQueryGeometry(e,t){return c(e,t,this.view)}async doRefresh(){this.suspended||(this._flowSubView?.doRefresh(),this.emit("data-changed"))}isUpdating(){return this._flowSubView?.updating??!1}_canSymbolizeInWebGL(){const e=f(),{symbolizer:t}=this.layer,i=t.lookup.colormapLut?.indexedColormap,r=!!this.layer.rasterFunction?.hasClipFunction,s=i&&i.length>4*(e.maxTextureSize||4096);return t.canRenderInWebGL&&!s&&!r}get usedMemory(){return this._flowSubView?.usedMemory??0}get test(){}};e([a({readOnly:!0})],b.prototype,"_blankTile",null),e([a()],b.prototype,"_hasFlow",null),e([a({readOnly:!0})],b.prototype,"imageFormatIsOpaque",null),e([a({readOnly:!0})],b.prototype,"hasMixedImageFormats",null),e([a()],b.prototype,"_flowSubView",void 0),e([a({readOnly:!0})],b.prototype,"dataLevelRange",null),e([a({readOnly:!0})],b.prototype,"visibleAtCurrentScale",null),b=e([l("esri.views.3d.layers.ImageryTileLayerView3D")],b);const g=b;export{g as default};
5
+ import{__decorate as e}from"tslib";import t from"../../../core/Error.js";import"../../../core/has.js";import{whenOnce as i,watch as r,sync as s}from"../../../core/reactiveUtils.js";import{property as l,subclass as a}from"../../../core/accessorSupport/decorators.js";import{computeSrcResolutions as o,projectDatasetExtent as n}from"../../../layers/raster/functions/rasterProjectionHelper.js";import{LayerView3D as h}from"./LayerView3D.js";import{TiledLayerView3D as m}from"./TiledLayerView3D.js";import d from"../support/flow/FlowSubViewTiles3D.js";import{RasterTile as u}from"../terrain/RasterTile.js";import{ImageryTileLayerViewMixin as p}from"../../layers/ImageryTileLayerViewMixin.js";import y from"../../layers/LayerView.js";import{RefreshableLayerView as c}from"../../layers/RefreshableLayerView.js";import{createQueryGeometry as f}from"../../support/drapedUtils.js";import{getWebGLCapabilities as b}from"../../webgl/capabilities.js";let g=class extends(p(c(m(h(y))))){constructor(){super(...arguments),this._srcResolutions=[],this.type="imagery-tile-3d",this._isAlignedMapTile=!0,this._flowSubView=null,this.ignoresMemoryFactor=!1,this.unloadedMemory=0}initialize(){this.layer.increaseRasterJobHandlerUsage(),null==this.fullExtent&&this.addResolvingPromise(Promise.reject(new t("layerview:spatial-reference-incompatible","The layer extent cannot be projected to the view's spatial reference",{layer:this.layer})));const e=i(()=>this.view?.basemapTerrain?.tilingSchemeLocked).then(()=>{const e=this.view.basemapTerrain.tilingScheme,t=this.layer.tileInfo;this._isAlignedMapTile=["png","png24","png32","jpg","mixed"].includes(t.format)&&e.compatibleWith(t),this.tileInfo=this._isAlignedMapTile?t:e.toTileInfo(),this._srcResolutions=o(this.layer.serviceRasterInfo,this.tileInfo),this.addHandles([r(()=>this.layer.renderer,e=>{this._setSubView(e),this._updatingHandles.addPromise(this.doRefresh())},s),r(()=>[this.layer.interpolation,this.layer.bandIds,this.layer.multidimensionalDefinition,this.layer.multidimensionalSubset,this.layer.rasterFunction,this.timeExtent],()=>this._updatingHandles.addPromise(this.doRefresh()),s)])});this._setSubView(this.layer.renderer),this.addResolvingPromise(e)}destroy(){this.layer.decreaseRasterJobHandlerUsage(),this._flowSubView?.destroy()}_setSubView(e){if("wcs"===this.layer.type)return;const t="flow"===e?.type,i=this._flowSubView;t&&null!=i||(i?.destroy(),this._flowSubView=t?new d({layerView:this}):null)}get _blankTile(){const e=document.createElement("canvas"),t=e.getContext("2d"),[i,r]=this.tileInfo.size;return e.width=i,e.height=r,t.clearRect(0,0,i,r),t.getImageData(0,0,i,r)}get _hasFlow(){return null!=this._flowSubView}get imageFormatIsOpaque(){return"jpg"===this.layer.tileInfo.format}get hasMixedImageFormats(){return"mixed"===this.layer.tileInfo.format}get dataLevelRange(){const e=this.layer.tileInfo,t=this.tileInfo.lodAt(0)?.scale,i=e.lodAt(e.lods.length-1)?.scale;return this.levelRangeFromScaleRange(t,i)}get visibleAtCurrentScale(){return this._flowSubView?.visibleAtCurrentScale??this.tilesVisibleAtCurrentScale()}_getFullExtent(){return n(this.layer.serviceRasterInfo,this.view.basemapTerrain?.spatialReference??this.view.spatialReference)}async fetchTile(e,t){const i=this.tileInfo,r=this._canSymbolizeInWebGL(),s={tileInfo:i,requestRawData:r&&!this._hasFlow,signal:t.signal,timeExtent:this.timeExtent,requestAsImageElement:this._isAlignedMapTile,requestProjectedLocalDirections:this._hasFlow,srcResolution:this._srcResolutions[e[0]],noClip:!1},{layer:l}=this,[a,o,n]=e,h=await l.fetchTile(a,o,n,s);if(h instanceof HTMLImageElement)return h;let m=h?.pixelBlock;if(null==m)return this._blankTile;if(!r&&!this._hasFlow&&(m=await l.applyRenderer(h),null==m))return this._blankTile;const d=new u([a,o,n],m,i.size[0],i.size[1]);return r?(d.symbolizerRenderer=l.symbolizer.rendererJSON,d.symbolizerParameters=l.symbolizer.generateWebGLParameters(this._getSymbolizerOptions(a)),d.transformGrid=h.transformGrid,d.bandIds=l.bandIds):(d.isRendereredSource=!0,d.bandIds=null),d.interpolation=l.interpolation,d}_getSymbolizerOptions(e){const t=this.tileInfo.lodAt(e).resolution;return{pixelBlock:null,isGCS:null!=this.view.basemapTerrain?.spatialReference?this.view.basemapTerrain.spatialReference.isGeographic:this.view.spatialReference.isGeographic,resolution:{x:t,y:t},bandIds:this.layer.bandIds}}ensureSymbolizerParameters(e){this._canSymbolizeInWebGL()&&JSON.stringify(e.symbolizerRenderer)!==JSON.stringify(this.layer.symbolizer.rendererJSON)&&(e.symbolizerParameters=this.layer.symbolizer.generateWebGLParameters(this._getSymbolizerOptions(e.lij[0])))}createFetchPopupFeaturesQueryGeometry(e,t){return f(e,t,this.view)}async doRefresh(){this.suspended||(this._flowSubView?.doRefresh(),this.emit("data-changed"))}isUpdating(){return this._flowSubView?.updating??!1}_canSymbolizeInWebGL(){const e=b(),{symbolizer:t}=this.layer,i=t.lookup.colormapLut?.indexedColormap,r=!!this.layer.rasterFunction?.hasClipFunction,s=i&&i.length>4*(e.maxTextureSize||4096);return t.canRenderInWebGL&&!s&&!r}get usedMemory(){return this._flowSubView?.usedMemory??0}get test(){}};e([l({readOnly:!0})],g.prototype,"_blankTile",null),e([l()],g.prototype,"_hasFlow",null),e([l({readOnly:!0})],g.prototype,"imageFormatIsOpaque",null),e([l({readOnly:!0})],g.prototype,"hasMixedImageFormats",null),e([l()],g.prototype,"_flowSubView",void 0),e([l({readOnly:!0})],g.prototype,"dataLevelRange",null),e([l({readOnly:!0})],g.prototype,"visibleAtCurrentScale",null),g=e([a("esri.views.3d.layers.ImageryTileLayerView3D")],g);const w=g;export{w as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{remove as e}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{createAbortError as t,createResolver as r,onAbort as s}from"../../../../core/promiseUtils.js";import i from"../../../../geometry/Multipoint.js";import{TaskPriority as o,noBudget as n}from"../../../support/Scheduler.js";class a{constructor(e,t){this.spatialReference=e,this._view=t}getElevation(e,t,r){return this._view.elevationProvider.getElevation(e,t,0,this.spatialReference,r)}async queryElevation(e,t,r,s,i){return this._view.elevationProvider.queryElevation(e,t,0,this.spatialReference,i,r,s)}}class l{constructor(e,t,r,s){this.spatialReference=t,this._getElevationQueryProvider=r,this._queries=new Array,this._queryOptions={...s,ignoreInvisibleLayers:!0},this._frameTask=e.registerTask(o.ELEVATION_QUERY,this)}destroy({completeTasks:e}={completeTasks:!1}){if(this._frameTask.remove(),this.readyToRun)if(e)this.runTask(n);else for(const r of this._queries)r.result.reject(t())}queryElevation(i,o,n,a=0){const l=r(),u={x:i,y:o,minDemResolution:a,result:l,signal:n};return this._queries.push(u),s(n,()=>{e(this._queries,u),l.reject(t())}),l.promise}get readyToRun(){return this._queries.length>0}runTask(e){const r=this._queries;this._queries=[];const o=this._getElevationQueryProvider();if(!o)return r.forEach(e=>e.result.reject()),void e.madeProgress();const n=r.map(e=>[e.x,e.y]),a=r.reduce((e,t)=>Math.min(e,t.minDemResolution),1/0),l=new i({points:n,spatialReference:this.spatialReference}),u=r.length>1&&r.some(e=>!!e.signal)?new AbortController:null,c=null!=u?u.signal:r[0].signal;if(null!=u){let e=0;r.forEach(i=>s(i.signal,()=>{e++,i.result.reject(t()),e===r.length&&u.abort()}))}const h={...this._queryOptions,minDemResolution:a,signal:c};o.queryElevation(l,h).then(e=>{r.forEach((r,s)=>{null!=r.signal&&r.signal.aborted?r.result.reject(t()):r.result.resolve(e.geometry.points[s][2])})}).catch(e=>{r.forEach(t=>t.result.reject(e))}),e.madeProgress()}get test(){}}export{l as ElevationQuery,a as ViewElevationProvider};
5
+ import{remove as e}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import{createAbortError as t,createResolver as r,onAbort as s}from"../../../../core/promiseUtils.js";import i from"../../../../geometry/Multipoint.js";import{TaskPriority as o,noBudget as n}from"../../../support/Scheduler.js";class a{constructor(e,t){this.spatialReference=e,this._view=t}getElevation(e,t,r){return this._view.elevationProvider.getElevation(e,t,0,this.spatialReference,r)}async queryElevation(e,t,r,s,i){return this._view.elevationProvider.queryElevation(e,t,0,this.spatialReference,i,r,s)}}class l{constructor(e,t,r,s){this.spatialReference=t,this._getElevationQueryProvider=r,this._queries=new Array,this._queryOptions={...s,ignoreInvisibleLayers:!0},this._frameTask=e.registerTask(o.ELEVATION_QUERY,this)}destroy({completeTasks:e}={completeTasks:!1}){if(this._frameTask.remove(),this.readyToRun)if(e)this.runTask(n);else for(const r of this._queries)r.result.reject(t())}queryElevation(i,o,n,a=0){const l=r(),u={x:i,y:o,minDemResolution:a,result:l,signal:n};return this._queries.push(u),s(n,()=>{e(this._queries,u),l.reject(t())}),l.promise}get readyToRun(){return this._queries.length>0}runTask(e){const r=this._queries;this._queries=[];const o=this._getElevationQueryProvider();if(!o)return r.forEach(e=>e.result.reject()),void e.madeProgress();const n=r.map(e=>[e.x,e.y]),a=r.reduce((e,t)=>Math.min(e,t.minDemResolution),1/0),l=new i({points:n,spatialReference:this.spatialReference}),u=r.length>1&&r.some(e=>!!e.signal)?new AbortController:null,c=null!=u?u.signal:r[0].signal;if(null!=u){let e=0;r.forEach(i=>s(i.signal,()=>{e++,i.result.reject(t()),e===r.length&&u.abort()}))}const h={...this._queryOptions,minDemResolution:a,signal:c};o.queryElevation(l,h).then(e=>{r.forEach((r,s)=>{if(null!=r.signal&&r.signal.aborted)r.result.reject(t());else{const t=e.geometry.points[s][2],i=void 0!==h.noDataValue&&t===h.noDataValue?null:t;r.result.resolve(i)}})}).catch(e=>{r.forEach(t=>t.result.reject(e))}),e.madeProgress()}get test(){}}export{l as ElevationQuery,a as ViewElevationProvider};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{clone as t}from"../../../../core/lang.js";import{getMetersPerVerticalUnitForSR as e}from"../../../../core/units.js";import{e as r}from"../../../../chunks/earcut.js";import{normalFromMat4 as s}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{invert as n,invertOrIdentity as i}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as l,sub as c,cross as m,add as p,normalize as h,transformMat4 as u,copy as d,subtract as g}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{ONES as f,create as y}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{computeTranslationToOriginAndRotation as b}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{create as _,fromBuffer as x,intersectsClippingArea as S}from"../../../../geometry/support/aaBoundingBox.js";import{newDoubleArray as j}from"../../../../geometry/support/DoubleArray.js";import{newIndexArray as w,getZeroIndexArray as P}from"../../../../geometry/support/Indices.js";import{t as v}from"../../../../chunks/vec3.js";import{SnappingCandidateVertex as C,SnappingCandidateEdge as E}from"../../../../layers/graphics/data/SnappingCandidate.js";import{getDriverAxisSizeValue as A}from"../../../../renderers/support/renderingInfoUtils.js";import{needsElevationUpdates3D as D,SampleElevationInfo as I}from"./elevationAlignmentUtils.js";import{Object3DEdgeState as L,Graphics3DObject3DGraphicLayer as U}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as z}from"./Graphics3DSymbolLayer.js";import{computeCentroid as M}from"./graphicUtils.js";import{geometryAsPolygon as O}from"./polygonUtils.js";import{createMaterial as G}from"../support/edgeUtils.js";import{encodeNaNUInt8 as V}from"../support/symbolColorUtils.js";import{debugFlags as T}from"../../support/debugFlags.js";import{SamplePosition as B}from"../../support/ElevationProvider.js";import{polygonToRenderInfo as F}from"../../support/renderInfoUtils/polygon.js";import{Attribute as R}from"../../webgl-engine/lib/Attribute.js";import{Geometry as H}from"../../webgl-engine/lib/Geometry.js";import{isGeometryWithMapPositions as N}from"../../webgl-engine/lib/GeometryWithMapPositions.js";import{compressNormals as W,compressNormal as k}from"../../webgl-engine/lib/Normals.js";import{Object3D as q}from"../../webgl-engine/lib/Object3D.js";import{DefaultMaterial as Z}from"../../webgl-engine/materials/DefaultMaterial.js";const J=["polygon","extent"];class K extends z{constructor(t,e,r,s){super(t,e,r,s,pt(e)),this.ensureDrapedStatus(!1)}async doLoad(){const t=this.symbolLayer,e=t?.material,r=this.symbolLayer.material?.color?.a,s=this.needsDrivenTransparentPass||null!=r&&1!==r,o=e?.emissive,n=!this._hasDrivenColorOrOpacity&&(null==r||0===r),i={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0,ambient:f,diffuse:f,opacity:n?0:1,layerOpacity:this._getLayerOpacity(),drivenOpacity:s,hasSymbolColors:!0,hasSlicePlane:this._context.slicePlaneEnabled,castShadows:t.castShadows,emissiveStrengthFromSymbol:o?.strength??0,emissiveSource:1,offsetTransparentBackfaces:!0,normalType:1},a=new Z(i,this._context),l=new Z({...i,cullFace:2},this._context);this._materials[0]=a,this._materials[1]=l,this._updateTransparentDepedentMaterialParameters()}destroy(){super.destroy(),this._materials.length=0}createGraphics3DGraphic(t){const e=t.graphic;if(!this._validateGeometry(e.geometry,J,this.symbolLayer.type))return null;const r=this._getDrivenUInt8ColorWithNaNSupport(t.renderingInfo,this._materialColor,!1);V(r,r);const s=this.createElevationContextForGraphic(e);return this._createAs3DShape(e,t.renderingInfo,r,s,e.uid)}layerOpacityChanged(t,e){const r=this._getLayerOpacity();this._materials[0]?.setParameters({layerOpacity:r}),this._materials[1]?.setParameters({layerOpacity:r}),this._updateTransparentDepedentMaterialParameters(),t?.forEach(t=>e(t)?.layerOpacityChanged(r,this._context.isAsync))}layerScreenSizePerspectiveChanged(){}layerElevationInfoChanged(t,e){return this.updateGraphics3DGraphicElevationInfo(t,e,D)}slicePlaneEnabledChanged(t,e){return this._materials[0]?.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),this._materials[1]?.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),t?.forEach(t=>{const r=e(t);null!=r&&r.slicePlaneEnabledChanged(this._context.slicePlaneEnabled,this._context.isAsync)}),!0}physicalBasedRenderingChanged(){const t={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0};return this._materials[0]?.setParameters(t),this._materials[1]?.setParameters(t),!0}_getExtrusionSize(t){let e;return e=t.size&&this._drivenProperties.size?A(t.size,2)??0:this._getSymbolSize(),e/=this._context.renderCoordsHelper.unitInMeters,e}applyRendererDiff(t,e){return this._drivenPropertiesChanged(e)?0:1}async queryForSnapping(r,s,o,n){const i=this._getExtrusionSize(o)*this._context.renderCoordsHelper.unitInMeters/e(s),{objectId:a,target:l}=r,c=t(l);switch(c.z=(c.z??0)+i,r.type){case"edge":{const{start:e,end:s}=r,o=t(e),n=t(s);return o.z=(o.z??0)+i,n.z=(n.z??0)+i,[new E(a,c,1/0,o,n)]}case"vertex":return[new C(a,c,1/0),new E(a,l,1/0,l,c)];default:return[]}}_getSymbolSize(){return this.symbolLayer.size??1}_createAs3DShape(t,e,i,l,c){const m=O(t.geometry);if(null==m)return null;if(0===m.rings.length||!m.rings.some(t=>t.length>0))return this._logGeometryValidationWarnings(m.rings,"rings","ExtrudeSymbol3DLayer"),null;const p=F(m,this._context.elevationProvider,this._context.renderCoordsHelper,l);this._logGeometryCreationWarnings(p,m.rings,"rings","ExtrudeSymbol3DLayer");const h=M(m);if(null==h)return null;const u=new Array,d=new Array,g=_(),f=a(),P=y(),C=1===this._context.renderCoordsHelper.viewingMode;C||this._context.renderCoordsHelper.worldUpAtPosition(null,P),b(m.spatialReference,[h.x,h.y,0],f,this._context.renderCoordsHelper.spatialReference);const E=a();n(E,f);const A=o();s(A,E);const{polygons:I,mapPositions:z,position:V}=p,T=new Map,B=this._materials[0];for(const s of I){const t=s.count;if(this._context.clippingExtent&&(x(s.mapPositions,g),!S(g,this._context.clippingExtent)))continue;const o=r(s.mapPositions,s.holeIndices,3);if(0===o.length)continue;const n=o.length,a=6*t,l=w(a+n),m=w(n),p=j(3*a),h=j(3*a),y=j(3*a),b=j(a);X(V,z,o,s,p,y,h,b,l,m,this._getExtrusionSize(e),P,C),v(p,p,E);const _=this._context.stage.renderView.getObjectAndLayerIdColor({graphicUid:c,layerViewUid:this._context.layerViewUid}),A=new St(p,y,W(h),b),D=Q(B,l,l.length-m.length,A,i,_),I=t,L=t,U=2*s.count,M=new jt(I,L,U,n/3);mt(D,M,f),T.set(D,M),u.push(D,Q(this._materials[1],m,0,A,i,_)),d.push(A.heights)}if(0===u.length)return null;const R=new q({geometries:u,layerViewUid:this._context.layerViewUid,graphicUid:c,isElevationSource:!0});R.transformation=f;const H=G(this.symbolLayer,{opacity:this._getLayerOpacity()}),N=H?new L(this._materials[0],H,this._context.slicePlaneEnabled):null,k=new U(this,R,null,(t,e,r,s,o)=>ct(t,e,r,s,o,d,T),l,N);return k.alignedSampledElevation=p.sampledElevation,k.needsElevationUpdates=D(l.mode),k}get _materialColor(){return this.symbolLayer.material?.color}_updateTransparentDepedentMaterialParameters(){const t=this._materials[0];t&&t.setParameters({cullFace:t.transparent?0:2})}}function Q(t,e,r,s,o,n){const i=P(e.length),a=[["position",new R(s.positions,e,3,!0)],["normalCompressed",new R(s.normals,e,2,!0)],["symbolColor",new R(o,i,4,!0)]];return new H(t,a,s.elevation,0,n,r)}function X(t,e,r,s,o,n,i,a,l,c,m,p,h){const u=r.length/3;let d=2*s.count;Y(t,e,s.index,s.count,r,0,u,o,n,i,a,l,c,d,m,p,h);let g=0,f=2*s.count;d=0;const y=s.pathLengths[0];et(o,n,a,i,g,y,s.count,f,l,d,m),f+=4*y,d+=2*y,g+=y;for(let b=1;b<s.pathLengths.length;++b){const t=s.pathLengths[b];et(o,n,a,i,g,t,s.count,f,l,d,m),f+=4*t,d+=2*t,g+=t}}function Y(t,e,r,s,o,n,i,a,l,c,m,p,u,g,f,y,b){d(ut,y),l??=[],c??=[],m??=[];const _=f>0?1:-1;let x=3*r,S=0,j=3*S,w=s,P=3*w;for(let d=0;d<s;++d){const r=t[x],s=t[x+1],o=t[x+2];b&&(ut[0]=r,ut[1]=s,ut[2]=o,h(ut,ut)),a[j+0]=r,a[j+1]=s,a[j+2]=o;const n=e[x+0],i=e[x+1],p=e[x+2];l[j+0]=n,l[j+1]=i,l[j+2]=p,c[j+0]=-_*ut[0],c[j+1]=-_*ut[1],c[j+2]=-_*ut[2],m[S]=0,a[P+0]=r+f*ut[0],a[P+1]=s+f*ut[1],a[P+2]=o+f*ut[2],l[P+0]=n,l[P+1]=i,l[P+2]=p,m[w]=f,j+=3,P+=3,x+=3,S+=1,w+=1}x=3*n,j=0,P=3*g;const v=f<0?ft:gt,C=f<0?gt:ft;for(let h=0;h<i;++h)u[j]=o[x+v[0]],u[j+1]=o[x+v[1]],u[j+2]=o[x+v[2]],p[P]=o[x+C[0]]+s,p[P+1]=o[x+C[1]]+s,p[P+2]=o[x+C[2]]+s,j+=3,P+=3,x+=3}function $(t,e,r,s,o,n,i){s[n]=s[i],i*=3,t[n*=3]=t[i],t[n+1]=t[i+1],t[n+2]=t[i+2],e[n]=e[i],e[n+1]=e[i+1],e[n+2]=e[i+2],r[n]=o[0],r[n+1]=o[1],r[n+2]=o[2]}const tt=y();function et(t,e,r,s,o,n,i,a,l,c,m){e??=[],r??=[],s??=[];let p=o,h=o+1,u=o+i,d=o+i+1,g=a,f=a+1,y=a+2*n,b=a+2*n+1;m<0&&(p=o+i+1,d=o);let _=3*c;for(let x=0;x<n;++x)x===n-1&&(h=o,m>0?d=o+i:p=o+i),at(t,p,h,u,tt),$(t,e,s,r,tt,g,p),$(t,e,s,r,tt,f,h),$(t,e,s,r,tt,y,u),$(t,e,s,r,tt,b,d),l[_]=g,l[_+1]=y,l[_+2]=b,l[_+3]=g,l[_+4]=b,l[_+5]=f,_+=6,p++,h++,u++,d++,g+=2,f+=2,y+=2,b+=2}const rt=y(),st=y(),ot=y(),nt=y(),it=y();function at(t,e,r,s,o){e*=3,r*=3,s*=3,l(rt,t[e++],t[e++],t[e++]),l(st,t[r++],t[r++],t[r++]),l(ot,t[s++],t[s++],t[s++]),g(nt,st,rt),g(it,ot,rt),m(o,it,nt),h(o,o)}const lt=y();function ct(t,e,r,s,o,n,c){const m=t.stageObject,p=m.geometries,h=p.length,d="absolute-height"!==e.mode;let g=0;const f=m.transformation,y=i(a(),f);for(let i=0;i<h;i+=2){const t=p[i];if(!N(t))continue;const e=t.getMutableAttribute("position").data,a=n[i/2],h=new B(t.mapPositions),b=e.length/3;let _=!1,x=0;{let t=0;for(let n=0;n<b;n++){lt[0]=e[t],lt[1]=e[t+1],lt[2]=e[t+2],s(h,dt),d&&(x+=dt.sampledElevation),T.TESTS_DISABLE_OPTIMIZATIONS?(l(ht,h.array[h.offset],h.array[h.offset+1],dt.z+a[t/3]),null!=r&&o.toRenderCoords(ht,r,ht),u(ht,ht,y)):(l(ht,e[t],e[t+1],e[t+2]),u(ht,ht,f),o.setAltitude(ht,dt.z+a[t/3]),u(ht,ht,y)),e[t]=ht[0],e[t+1]=ht[1],e[t+2]=ht[2];const n=yt/o.unitInMeters;(Math.abs(lt[0]-e[t])>=n||Math.abs(lt[1]-e[t+1])>=n||Math.abs(lt[2]-e[t+2])>=n)&&(_=!0),h.offset+=3,t+=3}}if(_){const e=c.get(t);e&&mt(t,e,f),m.geometryVertexAttributeUpdated(p[i],"normalCompressed"),t.invalidateBoundingInfo(),m.geometryVertexAttributeUpdated(p[i],"position"),p[i+1].invalidateBoundingInfo(),m.geometryVertexAttributeUpdated(p[i+1],"position")}g+=x/b}return g/h}function mt(t,e,r){const s=t.getMutableAttribute("position"),o=t.getMutableAttribute("normalCompressed").data,n=s.data,i=t.attributes.get("position").indices,{topVertexStart:a,topVertexCount:d,topFaceStart:g,topFaceCount:f}=e,y=g+f,b=a+d,_=bt,x=_t,S=xt,j=ut,w=ht;l(w,0,0,0);const P=(t,e)=>{const s=3*t;l(e,n[s+0],n[s+1],n[s+2]),u(e,e,r)};for(let l=g;l<y;++l){const t=3*l;P(i[t+0],_[0]),P(i[t+1],_[1]),P(i[t+2],_[2]),c(x,_[1],_[0]),c(S,_[2],_[0]),m(j,x,S),p(w,w,j)}h(w,w);for(let l=a;l<b;++l){const t=w[0],e=w[1],r=w[2];k(o,l,t,e,r)}}function pt(t){return 1===(t.material?.color?.a??0)}const ht=y(),ut=y(),dt=new I,gt=[0,2,1],ft=[0,1,2],yt=.01,bt=[y(),y(),y()],_t=y(),xt=y();class St{constructor(t,e,r,s){this.positions=t,this.elevation=e,this.normals=r,this.heights=s}}class jt{constructor(t,e,r,s){this.topVertexStart=t,this.topVertexCount=e,this.topFaceStart=r,this.topFaceCount=s}}export{K as Graphics3DExtrudeSymbolLayer,X as extrudePolygon};
5
+ import{clone as t}from"../../../../core/lang.js";import{getMetersPerVerticalUnitForSR as e}from"../../../../core/units.js";import{e as r}from"../../../../chunks/earcut.js";import{normalFromMat4 as s}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as i}from"../../../../core/libs/gl-matrix-2/factories/mat3f64.js";import{invert as o,invertOrIdentity as n}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as a}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as l,sub as c,cross as m,add as p,normalize as h,transformMat4 as d}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{ONES as g,create as u}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{computeTranslationToOriginAndRotation as y}from"../../../../geometry/projection/computeTranslationToOriginAndRotation.js";import{create as f,fromBuffer as b,intersectsClippingArea as _}from"../../../../geometry/support/aaBoundingBox.js";import{newDoubleArray as x}from"../../../../geometry/support/DoubleArray.js";import{newIndexArray as j,getZeroIndexArray as S}from"../../../../geometry/support/Indices.js";import{t as w}from"../../../../chunks/vec3.js";import{SnappingCandidateVertex as P,SnappingCandidateEdge as v}from"../../../../layers/graphics/data/SnappingCandidate.js";import{getDriverAxisSizeValue as C}from"../../../../renderers/support/renderingInfoUtils.js";import{needsElevationUpdates3D as E,SampleElevationInfo as A}from"./elevationAlignmentUtils.js";import{extrudePolygon as D}from"./extrudeUtils.js";import{Object3DEdgeState as I,Graphics3DObject3DGraphicLayer as U}from"./Graphics3DObject3DGraphicLayer.js";import{Graphics3DSymbolLayer as z}from"./Graphics3DSymbolLayer.js";import{computeCentroid as M}from"./graphicUtils.js";import{geometryAsPolygon as O}from"./polygonUtils.js";import{createMaterial as L}from"../support/edgeUtils.js";import{encodeNaNUInt8 as G}from"../support/symbolColorUtils.js";import{debugFlags as V}from"../../support/debugFlags.js";import{SamplePosition as T}from"../../support/ElevationProvider.js";import{polygonToRenderInfo as B}from"../../support/renderInfoUtils/polygon.js";import{Attribute as F}from"../../webgl-engine/lib/Attribute.js";import{Geometry as R}from"../../webgl-engine/lib/Geometry.js";import{isGeometryWithMapPositions as H}from"../../webgl-engine/lib/GeometryWithMapPositions.js";import{compressNormals as N,compressNormal as W}from"../../webgl-engine/lib/Normals.js";import{Object3D as k}from"../../webgl-engine/lib/Object3D.js";import{DefaultMaterial as q}from"../../webgl-engine/materials/DefaultMaterial.js";const Z=["polygon","extent"];class J extends z{constructor(t,e,r,s){super(t,e,r,s,$(e)),this.ensureDrapedStatus(!1)}async doLoad(){const t=this.symbolLayer,e=t?.material,r=this.symbolLayer.material?.color?.a,s=this.needsDrivenTransparentPass||null!=r&&1!==r,i=e?.emissive,o=!this._hasDrivenColorOrOpacity&&(null==r||0===r),n={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0,ambient:g,diffuse:g,opacity:o?0:1,layerOpacity:this._getLayerOpacity(),drivenOpacity:s,hasSymbolColors:!0,hasSlicePlane:this._context.slicePlaneEnabled,castShadows:t.castShadows,emissiveStrengthFromSymbol:i?.strength??0,emissiveSource:1,offsetTransparentBackfaces:!0,normalType:1},a=new q(n,this._context),l=new q({...n,cullFace:2},this._context);this._materials[0]=a,this._materials[1]=l,this._updateTransparentDepedentMaterialParameters()}destroy(){super.destroy(),this._materials.length=0}createGraphics3DGraphic(t){const e=t.graphic;if(!this._validateGeometry(e.geometry,Z,this.symbolLayer.type))return null;const r=this._getDrivenUInt8ColorWithNaNSupport(t.renderingInfo,this._materialColor,!1);G(r,r);const s=this.createElevationContextForGraphic(e);return this._createAs3DShape(e,t.renderingInfo,r,s,e.uid)}layerOpacityChanged(t,e){const r=this._getLayerOpacity();this._materials[0]?.setParameters({layerOpacity:r}),this._materials[1]?.setParameters({layerOpacity:r}),this._updateTransparentDepedentMaterialParameters(),t?.forEach(t=>e(t)?.layerOpacityChanged(r,this._context.isAsync))}layerScreenSizePerspectiveChanged(){}layerElevationInfoChanged(t,e){return this.updateGraphics3DGraphicElevationInfo(t,e,E)}slicePlaneEnabledChanged(t,e){return this._materials[0]?.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),this._materials[1]?.setParameters({hasSlicePlane:this._context.slicePlaneEnabled}),t?.forEach(t=>{const r=e(t);null!=r&&r.slicePlaneEnabledChanged(this._context.slicePlaneEnabled,this._context.isAsync)}),!0}physicalBasedRenderingChanged(){const t={usePBR:this._context.physicalBasedRenderingEnabled,isSchematic:!0};return this._materials[0]?.setParameters(t),this._materials[1]?.setParameters(t),!0}_getExtrusionSize(t){let e;return e=t.size&&this._drivenProperties.size?C(t.size,2)??0:this._getSymbolSize(),e/=this._context.renderCoordsHelper.unitInMeters,e}applyRendererDiff(t,e){return this._drivenPropertiesChanged(e)?0:1}async queryForSnapping(r,s,i,o){const n=this._getExtrusionSize(i)*this._context.renderCoordsHelper.unitInMeters/e(s),{objectId:a,target:l}=r,c=t(l);switch(c.z=(c.z??0)+n,r.type){case"edge":{const{start:e,end:s}=r,i=t(e),o=t(s);return i.z=(i.z??0)+n,o.z=(o.z??0)+n,[new v(a,c,1/0,i,o)]}case"vertex":return[new P(a,c,1/0),new v(a,l,1/0,l,c)];default:return[]}}_getSymbolSize(){return this.symbolLayer.size??1}_createAs3DShape(t,e,n,l,c){const m=O(t.geometry);if(null==m)return null;if(0===m.rings.length||!m.rings.some(t=>t.length>0))return this._logGeometryValidationWarnings(m.rings,"rings","ExtrudeSymbol3DLayer"),null;const p=B(m,this._context.elevationProvider,this._context.renderCoordsHelper,l);this._logGeometryCreationWarnings(p,m.rings,"rings","ExtrudeSymbol3DLayer");const h=M(m);if(null==h)return null;const d=new Array,g=new Array,S=f(),P=a(),v=u(),C=1===this._context.renderCoordsHelper.viewingMode;C||this._context.renderCoordsHelper.worldUpAtPosition(null,v),y(m.spatialReference,[h.x,h.y,0],P,this._context.renderCoordsHelper.spatialReference);const A=a();o(A,P);const z=i();s(z,A);const{polygons:G,mapPositions:V,position:T}=p,F=new Map,R=this._materials[0];for(const s of G){const t=s.count;if(this._context.clippingExtent&&(b(s.mapPositions,S),!_(S,this._context.clippingExtent)))continue;const i=r(s.mapPositions,s.holeIndices,3);if(0===i.length)continue;const o=i.length,a=6*t,l=j(a+o),m=j(o),p=x(3*a),h=x(3*a),u=x(3*a),y=x(a),f=this._getExtrusionSize(e);D(T,V,i,s,p,u,h,y,l,m,f,v,C),w(p,p,A);const E=this._context.stage.renderView.getObjectAndLayerIdColor({graphicUid:c,layerViewUid:this._context.layerViewUid}),I=new at(p,u,N(h),y),U=K(R,l,l.length-m.length,I,n,E),z=t,M=t,O=2*s.count,L=new lt(z,M,O,o/3);Y(U,L,P),F.set(U,L),d.push(U,K(this._materials[1],m,0,I,n,E)),g.push(I.heights)}if(0===d.length)return null;const H=new k({geometries:d,layerViewUid:this._context.layerViewUid,graphicUid:c,isElevationSource:!0});H.transformation=P;const W=L(this.symbolLayer,{opacity:this._getLayerOpacity()}),q=W?new I(this._materials[0],W,this._context.slicePlaneEnabled):null,Z=new U(this,H,null,(t,e,r,s,i)=>X(t,e,r,s,i,g,F),l,q);return Z.alignedSampledElevation=p.sampledElevation,Z.needsElevationUpdates=E(l.mode),Z}get _materialColor(){return this.symbolLayer.material?.color}_updateTransparentDepedentMaterialParameters(){const t=this._materials[0];t&&t.setParameters({cullFace:t.transparent?0:2})}}function K(t,e,r,s,i,o){const n=S(e.length),a=[["position",new F(s.positions,e,3,!0)],["normalCompressed",new F(s.normals,e,2,!0)],["symbolColor",new F(i,n,4,!0)]];return new R(t,a,s.elevation,0,o,r)}const Q=u();function X(t,e,r,s,i,o,c){const m=t.stageObject,p=m.geometries,h=p.length,g="absolute-height"!==e.mode;let u=0;const y=m.transformation,f=n(a(),y);for(let n=0;n<h;n+=2){const t=p[n];if(!H(t))continue;const e=t.getMutableAttribute("position").data,a=o[n/2],h=new T(t.mapPositions),b=e.length/3;let _=!1,x=0;{let t=0;for(let o=0;o<b;o++){Q[0]=e[t],Q[1]=e[t+1],Q[2]=e[t+2],s(h,rt),g&&(x+=rt.sampledElevation),V.TESTS_DISABLE_OPTIMIZATIONS?(l(tt,h.array[h.offset],h.array[h.offset+1],rt.z+a[t/3]),null!=r&&i.toRenderCoords(tt,r,tt),d(tt,tt,f)):(l(tt,e[t],e[t+1],e[t+2]),d(tt,tt,y),i.setAltitude(tt,rt.z+a[t/3]),d(tt,tt,f)),e[t]=tt[0],e[t+1]=tt[1],e[t+2]=tt[2];const o=st/i.unitInMeters;(Math.abs(Q[0]-e[t])>=o||Math.abs(Q[1]-e[t+1])>=o||Math.abs(Q[2]-e[t+2])>=o)&&(_=!0),h.offset+=3,t+=3}}if(_){const e=c.get(t);e&&Y(t,e,y),m.geometryVertexAttributeUpdated(p[n],"normalCompressed"),t.invalidateBoundingInfo(),m.geometryVertexAttributeUpdated(p[n],"position"),p[n+1].invalidateBoundingInfo(),m.geometryVertexAttributeUpdated(p[n+1],"position")}u+=x/b}return u/h}function Y(t,e,r){const s=t.getMutableAttribute("position"),i=t.getMutableAttribute("normalCompressed").data,o=s.data,n=t.attributes.get("position").indices,{topVertexStart:a,topVertexCount:g,topFaceStart:u,topFaceCount:y}=e,f=u+y,b=a+g,_=it,x=ot,j=nt,S=et,w=tt;l(w,0,0,0);const P=(t,e)=>{const s=3*t;l(e,o[s+0],o[s+1],o[s+2]),d(e,e,r)};for(let l=u;l<f;++l){const t=3*l;P(n[t+0],_[0]),P(n[t+1],_[1]),P(n[t+2],_[2]),c(x,_[1],_[0]),c(j,_[2],_[0]),m(S,x,j),p(w,w,S)}h(w,w);for(let l=a;l<b;++l){const t=w[0],e=w[1],r=w[2];W(i,l,t,e,r)}}function $(t){return 1===(t.material?.color?.a??0)}const tt=u(),et=u(),rt=new A,st=.01,it=[u(),u(),u()],ot=u(),nt=u();class at{constructor(t,e,r,s){this.positions=t,this.elevation=e,this.normals=r,this.heights=s}}class lt{constructor(t,e,r,s){this.topVertexStart=t,this.topVertexCount=e,this.topFaceStart=r,this.topFaceCount=s}}export{J as Graphics3DExtrudeSymbolLayer};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
+ */
5
+ import{copy as t,normalize as o,set as n,subtract as c,cross as e}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";function l(t,o,n,c,e,s,l,i,u,h,a,g,m){const p=n.length/3;let x=2*c.count;r(t,o,c.index,c.count,n,0,p,e,s,l,i,u,h,x,a,g,m);let L=0,b=2*c.count;x=0;const j=c.pathLengths[0];f(e,s,i,l,L,j,c.count,b,u,x,a),b+=4*j,x+=2*j,L+=j;for(let r=1;r<c.pathLengths.length;++r){const t=c.pathLengths[r];f(e,s,i,l,L,t,c.count,b,u,x,a),b+=4*t,x+=2*t,L+=t}}function r(n,c,e,s,l,r,f,i,u,h,a,g,m,p,x,v,d){t(L,v),u??=[],h??=[],a??=[];const k=x>0?1:-1;let q=3*e,w=0,y=3*w,z=s,A=3*z;for(let t=0;t<s;++t){const t=n[q],e=n[q+1],s=n[q+2];d&&(L[0]=t,L[1]=e,L[2]=s,o(L,L)),i[y+0]=t,i[y+1]=e,i[y+2]=s;const l=c[q+0],r=c[q+1],f=c[q+2];u[y+0]=l,u[y+1]=r,u[y+2]=f,h[y+0]=-k*L[0],h[y+1]=-k*L[1],h[y+2]=-k*L[2],a[w]=0,i[A+0]=t+x*L[0],i[A+1]=e+x*L[1],i[A+2]=s+x*L[2],u[A+0]=l,u[A+1]=r,u[A+2]=f,a[z]=x,y+=3,A+=3,q+=3,w+=1,z+=1}q=3*r,y=0,A=3*p;const B=x<0?j:b,C=x<0?b:j;for(let t=0;t<f;++t)m[y]=l[q+B[0]],m[y+1]=l[q+B[1]],m[y+2]=l[q+B[2]],g[A]=l[q+C[0]]+s,g[A+1]=l[q+C[1]]+s,g[A+2]=l[q+C[2]]+s,y+=3,A+=3,q+=3}function f(t,o,n,c,e,s,l,r,f,a,g){o??=[],n??=[],c??=[];let m=e,p=e+1,x=e+l,L=e+l+1,b=r,j=r+1,v=r+2*s,d=r+2*s+1;g<0&&(m=e+l+1,L=e);let k=3*a;for(let q=0;q<s;++q)q===s-1&&(p=e,g>0?L=e+l:m=e+l),i(t,m,p,x,h),u(t,o,c,n,h,b,m),u(t,o,c,n,h,j,p),u(t,o,c,n,h,v,x),u(t,o,c,n,h,d,L),f[k]=b,f[k+1]=v,f[k+2]=d,f[k+3]=b,f[k+4]=d,f[k+5]=j,k+=6,m++,p++,x++,L++,b+=2,j+=2,v+=2,d+=2}function i(t,s,l,r,f){s*=3,l*=3,r*=3,n(a,t[s++],t[s++],t[s++]),n(g,t[l++],t[l++],t[l++]),n(m,t[r++],t[r++],t[r++]),c(p,g,a),c(x,m,a),e(f,x,p),o(f,f)}function u(t,o,n,c,e,s,l){c[s]=c[l],l*=3,t[s*=3]=t[l],t[s+1]=t[l+1],t[s+2]=t[l+2],o[s]=o[l],o[s+1]=o[l+1],o[s+2]=o[l+2],n[s]=e[0],n[s+1]=e[1],n[s+2]=e[2]}const h=s(),a=s(),g=s(),m=s(),p=s(),x=s(),L=s(),b=[0,2,1],j=[0,1,2];export{l as extrudePolygon};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{reallocGrowthFactor as e}from"../../../../core/arrayUtils.js";import{signal as r}from"../../../../core/signal.js";import{normalize as t}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{intersectsSphere as i}from"../../../../geometry/support/frustum.js";import{Sphere as n}from"../../../../geometry/support/sphere.js";import{makeScheduleFunction as a}from"../../layers/support/makeScheduleFunction.js";import{GaussianSplatSortWorkerHandle as o}from"../GaussianSplatWorkerHandle.js";import{GaussianSplatFadeTexture as u}from"./GaussianSplatFadeTexture.js";import{GaussianSplatOrderTexture as h}from"./GaussianSplatOrderTexture.js";import{GaussianSplatTextureAtlas as d}from"./GaussianSplatTextureAtlas.js";import{TaskPriority as l}from"../../../support/Scheduler.js";class _{constructor(e){this._updating=r(!1),this._useDeterministicSort=!1,this.visibleGaussians=0,this._visibleGaussianTiles=new Array,this._workerHandle=null,this._isSorting=!1,this._pendingSortTask=!1,this._bufferCapacity=0,this._minimumBoundingSphere=new n,this._cameraDirectionNormalized=s(),this._frameTask=null,this._renderer=e,this._orderTexture=new h(this._renderer.renderingContext),this._fadingTexture=new u(this._renderer.renderingContext),this._textureAtlas=new d(this._renderer.renderingContext,this._renderer.view.resourceController.memoryController,this._renderer.fboCache);const{resourceController:t}=this._renderer.view;this._workerHandle=new o(a(t)),this._frameTask=t.scheduler.registerTask(l.GAUSSIAN_SPLAT_SORTING)}get textureAtlas(){return this._textureAtlas}get orderTexture(){return this._orderTexture}get fadingTexture(){return this._fadingTexture}get visibleGaussianTiles(){return this._visibleGaussianTiles}updateGaussianVisibility(e){this._visibleGaussianTiles=e,this.requestSort()}isUpdating(){return this._updating.value}destroy(){this._pendingSortTask=!1,this._frameTask.remove(),this._workerHandle?.destroyWorkerAndSelf(),this._textureAtlas.destroy(),this._orderTexture.destroy(),this._fadingTexture.destroy()}requestSort(){this._updating.value=!0,this._isSorting?this._pendingSortTask=!0:(this._isSorting=!0,this._pendingSortTask=!1,this._sortOnWorker().then(()=>this._handleSortComplete()).catch(()=>this._handleSortComplete()))}_handleSortComplete(){this._isSorting=!1,this._pendingSortTask?this.requestSort():this._updating.value=!1}_clearBuffersAndTextures(){this._bufferCapacity=0,this._orderTexture.clear(),this._textureAtlas.clear()}_ensureBufferCapacity(r){if(this._bufferCapacity<r){const t=Math.ceil(r*e);this._atlasIndicesBuffer=new Uint32Array(t),this._sortedAtlasIndicesBuffer=new Uint32Array(t),this._distancesBuffer=new Float64Array(t),this._sortOrderBuffer=new Uint32Array(t),this._bufferCapacity=t}}async _sortOnWorker(){if(0===this._visibleGaussianTiles.length)return this.visibleGaussians=0,this._clearBuffersAndTextures(),void this._renderer.requestRender(1);this._useDeterministicSort&&this._visibleGaussianTiles.sort((e,r)=>e.obb.centerX-r.obb.centerX||e.obb.centerY-r.obb.centerY||e.obb.centerZ-r.obb.centerZ);let e=this._visibleGaussianTiles.reduce((e,r)=>e+r.gaussianAtlasIndices.length,0);this._ensureBufferCapacity(e),this._textureAtlas.ensureTextureAtlas();const{frustum:r}=this._renderer.camera;t(this._cameraDirectionNormalized,this._renderer.camera.ray.direction);const s=this._cameraDirectionNormalized[0],n=this._cameraDirectionNormalized[1],a=this._cameraDirectionNormalized[2];let o=0;if(this._visibleGaussianTiles.forEach(t=>{const{gaussianAtlasIndices:u,positions:h}=t;if(this._minimumBoundingSphere.center=t.obb.center,this._minimumBoundingSphere.radius=t.obb.radius+t.maxScale,i(r,this._minimumBoundingSphere))for(let e=0;e<u.length;e++){this._atlasIndicesBuffer[o]=u[e];const r=3*e,t=h[r],i=h[r+1],d=h[r+2];this._distancesBuffer[o]=t*s+i*n+d*a,this._sortOrderBuffer[o]=o,o++}else e-=u.length}),0===e)return this.visibleGaussians=0,this._clearBuffersAndTextures(),void this._renderer.requestRender(1);const u={distances:this._distancesBuffer,sortOrderIndices:this._sortOrderBuffer,numGaussians:e,preciseSort:this._useDeterministicSort};await(this._workerHandle?.sort(u).then(e=>{this._distancesBuffer=e.distances,this._sortOrderBuffer=e.sortedOrderIndices}));const h=async r=>{const t=this._sortedAtlasIndicesBuffer.subarray(0,e);for(let s=0;s<e;s++)t[s]=this._atlasIndicesBuffer[this._sortOrderBuffer[s]];this._orderTexture.setData(t,e),this.visibleGaussians=e,this._renderer.requestRender(1),r.madeProgress()};await this._frameTask.schedule(h)}set useDeterministicSort(e){this._useDeterministicSort=e}}export{_ as GaussianSplatDataStore};
5
+ import{reallocGrowthFactor as e}from"../../../../core/arrayUtils.js";import{signal as r}from"../../../../core/signal.js";import{normalize as t}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as s}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{intersectsSphere as i}from"../../../../geometry/support/frustum.js";import{Sphere as n}from"../../../../geometry/support/sphere.js";import{makeScheduleFunction as a}from"../../layers/support/makeScheduleFunction.js";import{GaussianSplatSortWorkerHandle as o}from"../GaussianSplatWorkerHandle.js";import{GaussianSplatFadeTexture as u}from"./GaussianSplatFadeTexture.js";import{GaussianSplatOrderTexture as h}from"./GaussianSplatOrderTexture.js";import{GaussianSplatTextureAtlas as d}from"./GaussianSplatTextureAtlas.js";import{TaskPriority as l}from"../../../support/Scheduler.js";class _{constructor(e){this._updating=r(!1),this._useDeterministicSort=!1,this.visibleGaussians=0,this._visibleGaussianTiles=new Array,this._workerHandle=null,this._isSorting=!1,this._pendingSortTask=!1,this._bufferCapacity=0,this._minimumBoundingSphere=new n,this._cameraDirectionNormalized=s(),this._frameTask=null,this._renderer=e,this._orderTexture=new h(this._renderer.renderingContext),this._fadingTexture=new u(this._renderer.renderingContext),this._textureAtlas=new d(this._renderer.renderingContext,this._renderer.view.resourceController.memoryController,this._renderer.fboCache);const{resourceController:t}=this._renderer.view;this._workerHandle=new o(a(t)),this._frameTask=t.scheduler.registerTask(l.GAUSSIAN_SPLAT_SORTING)}get textureAtlas(){return this._textureAtlas}get orderTexture(){return this._orderTexture}get fadingTexture(){return this._fadingTexture}get visibleGaussianTiles(){return this._visibleGaussianTiles}updateGaussianVisibility(e){this._visibleGaussianTiles=e,this.requestSort()}isUpdating(){return this._updating.value}destroy(){this._pendingSortTask=!1,this._frameTask.remove(),this._workerHandle?.destroyWorkerAndSelf(),this._textureAtlas.destroy(),this._orderTexture.destroy(),this._fadingTexture.destroy()}requestSort(){this._updating.value=!0,this._isSorting?this._pendingSortTask=!0:(this._isSorting=!0,this._pendingSortTask=!1,this._sortOnWorker().then(()=>this._handleSortComplete()).catch(()=>this._handleSortComplete()))}_handleSortComplete(){this._isSorting=!1,this._pendingSortTask?this.requestSort():this._updating.value=!1}_clearBuffersAndTextures(){this._bufferCapacity=0,this._orderTexture.clear(),this._textureAtlas.clear()}_ensureBufferCapacity(r){if(this._bufferCapacity<r){const t=Math.ceil(r*e);this._atlasIndicesBuffer=new Uint32Array(t),this._sortedAtlasIndicesBuffer=new Uint32Array(t),this._distancesBuffer=new Float64Array(t),this._sortOrderBuffer=new Uint32Array(t),this._bufferCapacity=t}}async _sortOnWorker(){if(0===this._visibleGaussianTiles.length)return this.visibleGaussians=0,this._clearBuffersAndTextures(),void this._renderer.requestRender(1);this._useDeterministicSort&&this._visibleGaussianTiles.sort((e,r)=>e.obb.centerX-r.obb.centerX||e.obb.centerY-r.obb.centerY||e.obb.centerZ-r.obb.centerZ);let e=this._visibleGaussianTiles.reduce((e,r)=>e+r.gaussianAtlasIndices.length,0);this._ensureBufferCapacity(e),this._textureAtlas.ensureTextureAtlas();const{frustum:r}=this._renderer.camera;t(this._cameraDirectionNormalized,this._renderer.camera.ray.direction);const s=this._cameraDirectionNormalized[0],n=this._cameraDirectionNormalized[1],a=this._cameraDirectionNormalized[2];let o=0;const u=1.5;if(this._visibleGaussianTiles.forEach(t=>{const{gaussianAtlasIndices:h,positions:d}=t;if(this._minimumBoundingSphere.center=t.obb.center,this._minimumBoundingSphere.radius=(t.obb.radius+t.maxScale)*u,i(r,this._minimumBoundingSphere))for(let e=0;e<h.length;e++){this._atlasIndicesBuffer[o]=h[e];const r=3*e,t=d[r],i=d[r+1],u=d[r+2];this._distancesBuffer[o]=t*s+i*n+u*a,this._sortOrderBuffer[o]=o,o++}else e-=h.length}),0===e)return this.visibleGaussians=0,this._clearBuffersAndTextures(),void this._renderer.requestRender(1);const h={distances:this._distancesBuffer,sortOrderIndices:this._sortOrderBuffer,numGaussians:e,preciseSort:this._useDeterministicSort};await(this._workerHandle?.sort(h).then(e=>{this._distancesBuffer=e.distances,this._sortOrderBuffer=e.sortedOrderIndices}));const d=async r=>{const t=this._sortedAtlasIndicesBuffer.subarray(0,e);for(let s=0;s<e;s++)t[s]=this._atlasIndicesBuffer[this._sortOrderBuffer[s]];this._orderTexture.setData(t,e),this.visibleGaussians=e,this._renderer.requestRender(1),r.madeProgress()};await this._frameTask.schedule(d)}set useDeterministicSort(e){this._useDeterministicSort=e}}export{_ as GaussianSplatDataStore};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{signal as i}from"../../../../core/signal.js";class e{static{this.fadeInEase=i=>i*(2-i)}static{this.fadeOutEase=i=>i*i}constructor(e){this.layerView=e,this._numFadingTiles=i(0)}get numFadingTiles(){return this._numFadingTiles.value}fadeTile(i,e){const t=this._getTargetOpacity(e);if(i.fadeDirection=e,0===this.fadeDuration)return void this._instantTileFading(i,t);const a=i.opacityModifier;if(a!==t){const e=1-Math.abs(t-a);this._startTileFading(i,e)}else this._stopTileFading(i)}updateAllTileFading(i){this.layerView.tileHandles.forEach(e=>this._updateTileFading(e,i)),this.layerView.updateGaussians()}onFadeDurationChanged(i){0===i&&this.numFadingTiles>0&&this._instantlyFullyFadeAllTiles()}isTileFadingOut(i){return null!=i.fadeProgress&&1===i.fadeDirection}isUpdating(){return this._numFadingTiles.value>0}get fadeDuration(){return this.layerView.view.qualitySettings.fadeDuration}get fadingEnabled(){return 0!==this.fadeDuration}_startTileFading(i,e){null==i.fadeProgress&&this._numFadingTiles.value++,i.fadeProgress=e}_stopTileFading(i){null!=i.fadeProgress&&(1===i.fadeDirection&&this._onTileFullyFadedOut(i),this._numFadingTiles.value--,i.fadeProgress=null)}_updateTileFading(i,t){const{fadeProgress:a,fadeDirection:s}=i;if(null==a)return;const n=this._fadeDirectionToSign(s),l=n*this.fadeDuration,d=this._getTargetOpacity(s),r=t/Math.abs(l||1),o=Math.min(a+r,1),u=n*(1-(0===s?e.fadeInEase:e.fadeOutEase)(o)),g=1===o;i.opacityModifier=g?d:d-u,g?this._stopTileFading(i):i.fadeProgress=o,this._updateOpacityModifier(i)}_updateOpacityModifier(i){const e=255*i.opacityModifier;for(let t=0;t<i.pageIds.length;t++){const a=i.pageIds[t];this.layerView.data.fadingTexture.updateBuffer(e,a)}}_instantTileFading(i,e){i.fadeProgress=null,i.opacityModifier=e,this._updateOpacityModifier(i),1===i.fadeDirection&&this._onTileFullyFadedOut(i)}_instantlyFullyFadeAllTiles(){this.layerView.tileHandles.forEach(i=>{null!=i.fadeProgress&&this._instantTileFading(i,this._getTargetOpacity(i.fadeDirection))}),this.layerView.updateGaussians(),this._numFadingTiles.value=0}_onTileFullyFadedOut(i){i.isVisible=!1,this.layerView.moveTileToCache(i)}_fadeDirectionToSign(i){return 0===i?1:-1}_getTargetOpacity(i){return 0===i?1:0}}export{e as GaussianSplatFadeHelper};
5
+ import{signal as i}from"../../../../core/signal.js";class e{static{this.fadeInEase=i=>i*(2-i)}static{this.fadeOutEase=i=>i*i}constructor(e){this.layerView=e,this._numFadingTiles=i(0)}get numFadingTiles(){return this._numFadingTiles.value}fadeTile(i,e){const t=this._getTargetOpacity(e);if(i.fadeDirection=e,0===this.fadeDuration)return void this._instantTileFading(i,t);const a=i.opacityModifier;if(a!==t){const e=1-Math.abs(t-a);this._startTileFading(i,e)}else this._stopTileFading(i)}updateAllTileFading(i){this.layerView.tileHandles.forEach(e=>this._updateTileFading(e,i)),this.layerView.updateGaussians()}onFadeDurationChanged(i){0===i&&this.numFadingTiles>0&&this._instantlyFullyFadeAllTiles()}isTileFadingOut(i){return null!=i.fadeProgress&&1===i.fadeDirection}isUpdating(){return this._numFadingTiles.value>0}get fadeDuration(){return 2*this.layerView.view.qualitySettings.fadeDuration}get fadingEnabled(){return 0!==this.fadeDuration}_startTileFading(i,e){null==i.fadeProgress&&this._numFadingTiles.value++,i.fadeProgress=e}_stopTileFading(i){null!=i.fadeProgress&&(1===i.fadeDirection&&this._onTileFullyFadedOut(i),this._numFadingTiles.value--,i.fadeProgress=null)}_updateTileFading(i,t){const{fadeProgress:a,fadeDirection:s}=i;if(null==a)return;const n=this._fadeDirectionToSign(s),l=n*this.fadeDuration,d=this._getTargetOpacity(s),r=t/Math.abs(l||1),o=Math.min(a+r,1),u=n*(1-(0===s?e.fadeInEase:e.fadeOutEase)(o)),g=1===o;i.opacityModifier=g?d:d-u,g?this._stopTileFading(i):i.fadeProgress=o,this._updateOpacityModifier(i)}_updateOpacityModifier(i){const e=255*i.opacityModifier;for(let t=0;t<i.pageIds.length;t++){const a=i.pageIds[t];this.layerView.data.fadingTexture.updateBuffer(e,a)}}_instantTileFading(i,e){i.fadeProgress=null,i.opacityModifier=e,this._updateOpacityModifier(i),1===i.fadeDirection&&this._onTileFullyFadedOut(i)}_instantlyFullyFadeAllTiles(){this.layerView.tileHandles.forEach(i=>{null!=i.fadeProgress&&this._instantTileFading(i,this._getTargetOpacity(i.fadeDirection))}),this.layerView.updateGaussians(),this._numFadingTiles.value=0}_onTileFullyFadedOut(i){i.isVisible=!1,this.layerView.moveTileToCache(i)}_fadeDirectionToSign(i){return 0===i?1:-1}_getTargetOpacity(i){return 0===i?1:0}}export{e as GaussianSplatFadeHelper};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import"../../../../core/has.js";import{disposeMaybe as e,destroyMaybe as i}from"../../../../core/maybe.js";import{property as r,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{multiply as s,fromTranslation as n}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as u,sub as a}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as p}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{RenderCategory as f}from"../../webgl.js";import{debugFlags as c}from"../../support/debugFlags.js";import{glLayout as _}from"../../support/buffer/glUtil.js";import{newLayout as d}from"../../support/buffer/InterleavedLayout.js";import l from"../../webgl/RenderNode.js";import{Pos2Locations as m}from"./DefaultVertexBufferLayouts.js";import{VertexArrayObject as g}from"./VertexArrayObject.js";import{TaskPriority as x}from"../../../support/Scheduler.js";import{Yield as v}from"../../../support/Yield.js";import{DataType as b,PixelType as w}from"../../../webgl/enums.js";import{makePipelineState as y,defaultColorWrite as P}from"../../../webgl/renderState.js";import{Sync as T}from"../../../webgl/Sync.js";import j from"../../../webgl/Texture.js";import{TextureDescriptor as B}from"../../../webgl/TextureDescriptor.js";import{fromLayout as C}from"../../../webgl/VertexAttributeLocations.js";import{VertexBuffer as E}from"../../../webgl/VertexBuffer.js";let F=class extends l{constructor(t){super(t),this.category=f.COMPOSITE,this._debugVao=null,this._debugVaoLength=0,this.readyToRun=!1,this.done=!0,this._start=!1,this._origin=p(),this._textureWidth=256,this._uploadBuffer=new Float32Array(3*this._textureWidth),this._counter=0,this._width=0,this._height=0,this._pixelBufferSize=0,this._pipeline=y({colorWrite:P}),this._format=0}initialize(){const t=this.view.resourceController.scheduler.registerTask(x.GRAPHICS_CORE,this);this.addHandles(t),this.produces="disabled",this.consumes.required=[this.category],this.formatOverride&&(this._format=this.formatOverride)}destroy(){this._program=e(this._program),this._debugProgram=e(this._debugProgram),this._debugVao=e(this._debugVao);const t=this.gl;this._sync=i(this._sync),this._pixelBuffer&&(t.deleteBuffer(this._pixelBuffer),this._pixelBuffer=null,this._pixelBufferSize=0),this._texture=e(this._texture)}precompile(){this._ensureProgram(this.renderingContext)}render(t){const e=t.find(({name:t})=>t===this.category),i=this.renderingContext,r=this.gl,o=e.getTexture(r.DEPTH_STENCIL_ATTACHMENT),s=this.view.stage?.renderer.fboCache;if(!o||!s||this._sync||!this._start)return e;this._start=!1,this.produces=c.OCCLUSION_QUERY_DEBUG_PIXEL?this.category:"disabled";const n=s.acquire(this._width,this._height,"hud visibility",10);i.bindFramebuffer(n.fbo),i.setPipelineState(this._pipeline);const h=this._ensureProgram(i);return i.useProgram(h),L(h,this.camera,this._origin),i.bindTexture(o,0),h.setUniform1i("depthTex",0),i.bindTexture(this._texture,1),h.setUniform1i("positionTex",1),h.setUniform1i("count",this._counter),i.screen.draw(),this._pixelBuffer||(this._pixelBuffer=r.createBuffer()),0===this._format&&(this._format=6403===r.getParameter(r.IMPLEMENTATION_COLOR_READ_FORMAT)&&r.getParameter(r.IMPLEMENTATION_COLOR_READ_TYPE)===b.FLOAT?6403:6408),this._pixelBufferSize=this._width*this._height*(6403===this._format?4:16),r.bindBuffer(r.PIXEL_PACK_BUFFER,this._pixelBuffer),r.bufferData(r.PIXEL_PACK_BUFFER,this._pixelBufferSize,r.STREAM_READ),r.readPixels(0,0,this._width,this._height,this._format,b.FLOAT,0),this._sync=new T(r),n.release(),setTimeout(()=>this.readyToRun=!0,0),e}runTask(){if(!this._sync)return void(this.readyToRun=!1);try{if(!this._sync.poll())return v}catch(e){return this.readyToRun=!1,void(this._sync=i(this._sync))}this.readyToRun=!1,this._sync=i(this._sync);const t=this.gl;t.bindBuffer(t.PIXEL_PACK_BUFFER,this._pixelBuffer),this._cpuBuffer=new Float32Array(this._width*this._height*(6403===this._format?1:4)),t.getBufferSubData(t.PIXEL_PACK_BUFFER,0,this._cpuBuffer),t.bindBuffer(t.PIXEL_PACK_BUFFER,null),this.done=!0}init(t,e){const i=this._textureWidth;if(this._width=i,this._height=Math.ceil(t/i),this._counter=0,this._texture?.dispose(),0===this._height)return;const r=new B(this._width,this._height);r.pixelFormat=6407,r.dataType=w.FLOAT,r.samplingMode=9728,this._texture=new j(this.renderingContext,r),this.done=!1,u(this._origin,Math.fround(e[0]),Math.fround(e[1]),Math.fround(e[2]))}addPosition(t){const e=this._width;if(this._counter>=e*this._height)return-1;const i=this._counter%e;return a(M,t,this._origin),this._uploadBuffer[3*i+0]=M[0],this._uploadBuffer[3*i+1]=M[1],this._uploadBuffer[3*i+2]=M[2],i===e-1&&this._flush(),this._counter++}start(){if(0===this._width||0===this._height)return;const t=this._width;this._counter%t>0&&this._flush(),this.produces=this.category,this._start=!0,this.requestRender(1)}getOcclusion(t){return this._cpuBuffer?.[6403===this._format?t:4*t]??-1}get usedMemory(){return(this._texture?.usedMemory??0)+this._pixelBufferSize+4*(this._uploadBuffer?.length??0)+4*(this._cpuBuffer?.length??0)}_flush(){const t=this._width,e=Math.floor(this._counter/t);this._texture?.updateData(0,0,e,t,1,this._uploadBuffer)}_ensureProgram(t){return this._program??=t.programCache.acquire(D,O,m),this._program}_ensureDebugProgram(t){return this._debugProgram??=t.programCache.acquire(A,R,V),this._debugProgram}_ensureDebugVao(t,i){if(!this._debugVao||this._debugVaoLength<i){const r=new Float32Array(i);for(let t=0;t<i;t++)r[t]=t;this._debugVao=e(this._debugVao),this._debugVao=new g(t,new E(t,S,r))}return this._debugVao}};t([r()],F.prototype,"category",void 0),t([r()],F.prototype,"formatOverride",void 0),t([r()],F.prototype,"readyToRun",void 0),t([r()],F.prototype,"done",void 0),F=t([o("esri.views.3d.webgl-engine.lib.GPUPointOcclusionQuery")],F);const A="#version 300 es\nprecision highp float;\nprecision highp int;\n\nin highp float componentIndex;\n\nuniform highp mat4 proj;\nuniform highp mat4 view;\n\nuniform highp sampler2D positionTex;\n\nvoid main() {\n int width = textureSize(positionTex, 0).x;\n int u = int(componentIndex) % width;\n int v = int(componentIndex) / width;\n\n vec4 posWorld = vec4(texelFetch(positionTex, ivec2(u, v), 0).rgb, 1.0);\n vec4 posView = view * posWorld;\n vec4 projected = proj * posView;\n\n gl_Position = projected;\n gl_PointSize = 1.0;\n}",R="#version 300 es\nout highp vec4 fragColor;\nuniform lowp vec4 color;\nvoid main() {\n fragColor = color;\n}\n",D="#version 300 es\nprecision highp float;\nin vec2 position;\n\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n}",O="#version 300 es\nprecision highp float;\nout highp vec4 fragColor;\n\nuniform highp mat4 proj;\nuniform highp mat4 view;\n\nuniform highp int count;\n\nuniform highp sampler2D depthTex;\nuniform highp sampler2D positionTex;\n\nfloat linearizeDepth(float depth) {\n float depthNdc = depth * 2.0 - 1.0;\n float c1 = proj[3][2];\n float c2 = proj[2][2];\n return -c1 / (depthNdc + c2 + 1e-7);\n}\n\nvoid main() {\n int u = int(floor(gl_FragCoord.x));\n int v = int(floor(gl_FragCoord.y));\n if (u + v * textureSize(positionTex, 0).x >= count) {\n fragColor = vec4(-1);\n return;\n }\n vec4 posWorld = vec4(texelFetch(positionTex, ivec2(u, v), 0).rgb, 1.0);\n vec4 posView = view * posWorld;\n vec4 projected = proj * posView;\n\n vec3 clipPos = projected.xyz / projected.w;\n\n if (clipPos.x < -1.0 || clipPos.x > 1.0 || clipPos.y < -1.0 || clipPos.y > 1.0) {\n fragColor = vec4(-1);\n return;\n }\n\n vec3 uvDepth = 0.5 * clipPos + vec3(0.5);\n\n float depth = texture(depthTex, uvDepth.xy).r;\n\n if (uvDepth.z <= depth) {\n fragColor = vec4(0);\n return;\n }\n\n fragColor = vec4(linearizeDepth(depth) - linearizeDepth(uvDepth.z));\n}\n";function L(t,e,i){s(I,e.viewMatrix,n(I,i)),t.setUniformMatrix4fv("view",I),t.setUniformMatrix4fv("proj",e.projectionMatrix)}const M=p(),I=h(),S=_(d().f32("componentIndex")),V=C(S);export{F as GPUPointOcclusionQuery};
5
+ import{__decorate as t}from"tslib";import"../../../../core/has.js";import{disposeMaybe as e,destroyMaybe as i}from"../../../../core/maybe.js";import{property as r,subclass as o}from"../../../../core/accessorSupport/decorators.js";import{multiply as s,fromTranslation as n}from"../../../../core/libs/gl-matrix-2/math/mat4.js";import{create as h}from"../../../../core/libs/gl-matrix-2/factories/mat4f64.js";import{set as u,sub as a}from"../../../../core/libs/gl-matrix-2/math/vec3.js";import{create as p}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{RenderCategory as c}from"../../webgl.js";import{debugFlags as f}from"../../support/debugFlags.js";import{glLayout as d}from"../../support/buffer/glUtil.js";import{newLayout as _}from"../../support/buffer/InterleavedLayout.js";import l from"../../webgl/RenderNode.js";import{Pos2Locations as m}from"./DefaultVertexBufferLayouts.js";import{VertexArrayObject as g}from"./VertexArrayObject.js";import{TaskPriority as x}from"../../../support/Scheduler.js";import{Yield as v}from"../../../support/Yield.js";import{BufferObject as b}from"../../../webgl/BufferObject.js";import{DataType as w,PixelType as y}from"../../../webgl/enums.js";import{makePipelineState as T,defaultColorWrite as j}from"../../../webgl/renderState.js";import{Sync as P}from"../../../webgl/Sync.js";import C from"../../../webgl/Texture.js";import{TextureDescriptor as B}from"../../../webgl/TextureDescriptor.js";import{fromLayout as O}from"../../../webgl/VertexAttributeLocations.js";import{VertexBuffer as D}from"../../../webgl/VertexBuffer.js";let M=class extends l{constructor(t){super(t),this.category=c.COMPOSITE,this._debugVao=null,this._debugVaoLength=0,this.readyToRun=!1,this.done=!0,this._start=!1,this._origin=p(),this._textureWidth=256,this._uploadBuffer=new Float32Array(3*this._textureWidth),this._counter=0,this._width=0,this._height=0,this._pipeline=T({colorWrite:j}),this._format=0}initialize(){const t=this.view.resourceController.scheduler.registerTask(x.GRAPHICS_CORE,this);this.addHandles(t),this.produces="disabled",this.consumes.required=[this.category],this.formatOverride&&(this._format=this.formatOverride)}destroy(){this._program=e(this._program),this._debugProgram=e(this._debugProgram),this._debugVao=e(this._debugVao),this._sync=i(this._sync),this._pixelBuffer=e(this._pixelBuffer),this._texture=e(this._texture)}precompile(){this._ensureProgram(this.renderingContext)}render(t){const e=t.find(({name:t})=>t===this.category),i=this.renderingContext,r=this.gl,o=e.getTexture(r.DEPTH_STENCIL_ATTACHMENT),s=this.view.stage?.renderer.fboCache;if(!o||!s||this._sync||!this._start)return e;this._start=!1,this.produces=f.OCCLUSION_QUERY_DEBUG_PIXEL?this.category:"disabled";const n=s.acquire(this._width,this._height,"hud visibility",10);i.bindFramebuffer(n.fbo),i.setPipelineState(this._pipeline);const h=this._ensureProgram(i);return i.useProgram(h),F(h,this.camera,this._origin),i.bindTexture(o,0),h.setUniform1i("depthTex",0),i.bindTexture(this._texture,1),h.setUniform1i("positionTex",1),h.setUniform1i("count",this._counter),i.screen.draw(),0===this._format&&(this._format=6403===r.getParameter(r.IMPLEMENTATION_COLOR_READ_FORMAT)&&r.getParameter(r.IMPLEMENTATION_COLOR_READ_TYPE)===w.FLOAT?6403:6408),this._pixelBuffer??=b.createPixelPack(i,r.STREAM_READ),this._pixelBuffer.setSize(this._width*this._height*(6403===this._format?4:16)),i.bindBuffer(this._pixelBuffer),r.readPixels(0,0,this._width,this._height,this._format,w.FLOAT,0),i.unbindBuffer(35051),i.bindFramebuffer(null),n.release(),this._sync=new P(r),setTimeout(()=>this.readyToRun=!0,0),e}runTask(){if(this._sync&&this._pixelBuffer){try{if(!this._sync.poll())return v}catch(t){return this.readyToRun=!1,void(this._sync=i(this._sync))}this.readyToRun=!1,this._sync=i(this._sync),this._cpuBuffer=new Float32Array(this._width*this._height*(6403===this._format?1:4)),this._pixelBuffer.getSubData(this._cpuBuffer),this.done=!0}else this.readyToRun=!1}cancel(){this._start=!1,this._sync=i(this._sync)}init(t,e){this.cancel();const i=this._textureWidth;if(this._width=i,this._height=Math.ceil(t/i),this._counter=0,this._texture?.dispose(),0===this._height)return;const r=new B(this._width,this._height);r.pixelFormat=6407,r.dataType=y.FLOAT,r.samplingMode=9728,this._texture=new C(this.renderingContext,r),this.done=!1,u(this._origin,Math.fround(e[0]),Math.fround(e[1]),Math.fround(e[2]))}addPosition(t){const e=this._width;if(this._counter>=e*this._height)return-1;const i=this._counter%e;return a(L,t,this._origin),this._uploadBuffer[3*i+0]=L[0],this._uploadBuffer[3*i+1]=L[1],this._uploadBuffer[3*i+2]=L[2],i===e-1&&this._flush(),this._counter++}start(){if(0===this._width||0===this._height)return void(this.done=!0);const t=this._width;this._counter%t>0&&this._flush(),this.produces=this.category,this._start=!0,this.requestRender(1)}getOcclusion(t){return this._cpuBuffer?.[6403===this._format?t:4*t]??-1}get usedMemory(){return(this._texture?.usedMemory??0)+(this._pixelBuffer?.usedMemory??0)+4*(this._uploadBuffer?.length??0)+4*(this._cpuBuffer?.length??0)}_flush(){const t=this._width,e=Math.floor(this._counter/t);this._texture?.updateData(0,0,e,t,1,this._uploadBuffer)}_ensureProgram(t){return this._program??=t.programCache.acquire(R,E,m),this._program}_ensureDebugProgram(t){return this._debugProgram??=t.programCache.acquire(V,A,z),this._debugProgram}_ensureDebugVao(t,i){if(!this._debugVao||this._debugVaoLength<i){const r=new Float32Array(i);for(let t=0;t<i;t++)r[t]=t;this._debugVao=e(this._debugVao),this._debugVao=new g(t,new D(t,I,r))}return this._debugVao}};t([r()],M.prototype,"category",void 0),t([r()],M.prototype,"formatOverride",void 0),t([r()],M.prototype,"readyToRun",void 0),t([r()],M.prototype,"done",void 0),M=t([o("esri.views.3d.webgl-engine.lib.GPUPointOcclusionQuery")],M);const V="#version 300 es\nprecision highp float;\nprecision highp int;\n\nin highp float componentIndex;\n\nuniform highp mat4 proj;\nuniform highp mat4 view;\n\nuniform highp sampler2D positionTex;\n\nvoid main() {\n int width = textureSize(positionTex, 0).x;\n int u = int(componentIndex) % width;\n int v = int(componentIndex) / width;\n\n vec4 posWorld = vec4(texelFetch(positionTex, ivec2(u, v), 0).rgb, 1.0);\n vec4 posView = view * posWorld;\n vec4 projected = proj * posView;\n\n gl_Position = projected;\n gl_PointSize = 1.0;\n}",A="#version 300 es\nout highp vec4 fragColor;\nuniform lowp vec4 color;\nvoid main() {\n fragColor = color;\n}\n",R="#version 300 es\nprecision highp float;\nin vec2 position;\n\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n}",E="#version 300 es\nprecision highp float;\nout highp vec4 fragColor;\n\nuniform highp mat4 proj;\nuniform highp mat4 view;\n\nuniform highp int count;\n\nuniform highp sampler2D depthTex;\nuniform highp sampler2D positionTex;\n\nfloat linearizeDepth(float depth) {\n float depthNdc = depth * 2.0 - 1.0;\n float c1 = proj[3][2];\n float c2 = proj[2][2];\n return -c1 / (depthNdc + c2 + 1e-7);\n}\n\nvoid main() {\n int u = int(floor(gl_FragCoord.x));\n int v = int(floor(gl_FragCoord.y));\n if (u + v * textureSize(positionTex, 0).x >= count) {\n fragColor = vec4(-1);\n return;\n }\n vec4 posWorld = vec4(texelFetch(positionTex, ivec2(u, v), 0).rgb, 1.0);\n vec4 posView = view * posWorld;\n vec4 projected = proj * posView;\n\n vec3 clipPos = projected.xyz / projected.w;\n\n if (clipPos.x < -1.0 || clipPos.x > 1.0 || clipPos.y < -1.0 || clipPos.y > 1.0) {\n fragColor = vec4(-1);\n return;\n }\n\n vec3 uvDepth = 0.5 * clipPos + vec3(0.5);\n\n float depth = texture(depthTex, uvDepth.xy).r;\n\n if (uvDepth.z <= depth) {\n fragColor = vec4(0);\n return;\n }\n\n fragColor = vec4(linearizeDepth(depth) - linearizeDepth(uvDepth.z));\n}\n";function F(t,e,i){s(S,e.viewMatrix,n(S,i)),t.setUniformMatrix4fv("view",S),t.setUniformMatrix4fv("proj",e.projectionMatrix)}const L=p(),S=h(),I=d(_().f32("componentIndex")),z=O(I);export{M as GPUPointOcclusionQuery};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as t}from"tslib";import s from"../../../core/Accessor.js";import i from"../../../core/Collection.js";import{property as e,subclass as o}from"../../../core/accessorSupport/decorators.js";import{LineSnapper as n}from"./LineSnapper.js";import{ParallelLineSnapper as r}from"./ParallelLineSnapper.js";import{RightAngleSnapper as p}from"./RightAngleSnapper.js";import{RightAngleTriangleSnapper as a}from"./RightAngleTriangleSnapper.js";import{sortCandidatesInPlace as c}from"./snappingUtils.js";let h=class extends s{constructor(t){super(t),this.updating=!1,this._snappers=new i,this._domain=2}initialize(){this._snappers.push(new r(this.view,this.options),new n(this.view,this.options,this.geodesicLengthMeasurementUtils),new p(this.view,this.options,this.geodesicLengthMeasurementUtils),new a(this.view,this.options))}set options(t){this._set("options",t);for(const s of this._snappers)s.options=t}async fetchCandidates(t,s,i){if(!(s&this._domain&&this.options.effectiveSelfEnabled))return[];const e=[];for(const o of this._snappers.items)for(const s of o.snap(t,i))e.push(s);return c(t,e),e}};t([e({readOnly:!0})],h.prototype,"updating",void 0),t([e({constructOnly:!0})],h.prototype,"view",void 0),t([e({constructOnly:!0})],h.prototype,"geodesicLengthMeasurementUtils",void 0),t([e()],h.prototype,"options",null),h=t([o("esri.views.interactive.snapping.SelfSnappingEngine")],h);export{h as SelfSnappingEngine};
5
+ import{__decorate as t}from"tslib";import s from"../../../core/Accessor.js";import e from"../../../core/Collection.js";import{property as i,subclass as o}from"../../../core/accessorSupport/decorators.js";import{LineSnapper as n}from"./LineSnapper.js";import{ParallelLineSnapper as p}from"./ParallelLineSnapper.js";import{RightAngleSnapper as r}from"./RightAngleSnapper.js";import{RightAngleTriangleSnapper as a}from"./RightAngleTriangleSnapper.js";import{sortCandidatesInPlace as c}from"./snappingUtils.js";let h=class extends s{constructor(t){super(t),this.updating=!1,this._snappers=new e,this._domain=2}initialize(){this._snappers.push(new p(this.view,this.options),new n(this.view,this.options,this.geodesicLengthMeasurementUtils),new r(this.view,this.options,this.geodesicLengthMeasurementUtils),new a(this.view,this.options))}set options(t){this._set("options",t);for(const s of this._snappers)s.options=t}async fetchCandidates(t,s,e){if(!(s&this._domain)||!this.options.effectiveSelfEnabled||e.suppressSelfSnapping)return[];const i=[];for(const o of this._snappers.items)for(const s of o.snap(t,e))i.push(s);return c(t,i),i}};t([i({readOnly:!0})],h.prototype,"updating",void 0),t([i({constructOnly:!0})],h.prototype,"view",void 0),t([i({constructOnly:!0})],h.prototype,"geodesicLengthMeasurementUtils",void 0),t([i()],h.prototype,"options",null),h=t([o("esri.views.interactive.snapping.SelfSnappingEngine")],h);export{h as SelfSnappingEngine};
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- class e{constructor(e){this.vertexHandle=null,this.excludeFeature=null,this.visualizer=null,this.selfSnappingZ=null,this.drawConstraints=null,this.editGeometryOperations=e.editGeometryOperations,this.elevationInfo=e.elevationInfo,this.pointer=e.pointer,this.vertexHandle=e.vertexHandle,this.excludeFeature=e.excludeFeature,this.feature=e.feature,this.visualizer=e.visualizer,this.selfSnappingZ=e.selfSnappingZ,this.drawConstraints=e.drawConstraints}get coordinateHelper(){return this.editGeometryOperations.data.coordinateHelper}get spatialReference(){return this.coordinateHelper.spatialReference}}export{e as SnappingContext};
5
+ class e{constructor(e){this.vertexHandle=null,this.excludeFeature=null,this.visualizer=null,this.suppressSelfSnapping=!1,this.selfSnappingZ=null,this.drawConstraints=null,this.editGeometryOperations=e.editGeometryOperations,this.elevationInfo=e.elevationInfo,this.pointer=e.pointer,this.vertexHandle=e.vertexHandle,this.excludeFeature=e.excludeFeature,this.feature=e.feature,this.visualizer=e.visualizer,this.selfSnappingZ=e.selfSnappingZ,this.drawConstraints=e.drawConstraints,this.suppressSelfSnapping=e.suppressSelfSnapping}get coordinateHelper(){return this.editGeometryOperations.data.coordinateHelper}get spatialReference(){return this.coordinateHelper.spatialReference}}export{e as SnappingContext};
@@ -59,6 +59,7 @@ export interface AttributionProperties extends WidgetProperties, Partial<Pick<At
59
59
  * > For detailed guidelines on working with attribution, please visit the official [attribution in your app](https://developers.arcgis.com/terms/attribution/) documentation.
60
60
  * > For information on terms of use, see the [Terms of Use FAQ](https://developers.arcgis.com/terms/faq/).
61
61
  *
62
+ * @deprecated since version 5.0. As of 5.0, attribution is handled automatically by the [Map](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-map/) and [Scene](https://developers.arcgis.com/javascript/latest/references/map-components/arcgis-scene/) components, with properties for extracting attribution items, hiding the attribution, as well as setting dark and light mode for the attribution. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/).
62
63
  * @since 4.0
63
64
  * @see [AttributionViewModel](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Attribution-AttributionViewModel.html)
64
65
  * @see [DefaultUI](https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-DefaultUI.html)
@@ -207,6 +207,8 @@ export default class BatchAttributeFormViewModel extends EventedAccessor {
207
207
  accessor submitHasBeenAttempted: boolean;
208
208
  /** The time zone used to interpret date values in the form. If this property is `null` or set to `"unknown"`, date values are displayed in the time zone specified by the layer's [FeatureLayer#preferredTimeZone](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#preferredTimeZone). If none is provided there, date values are interpreted in UTC. */
209
209
  accessor timeZone: TimeZone | null | undefined;
210
+ /** Indicates whether the form is updating or calculating expressions. */
211
+ get updating(): boolean;
210
212
  /**
211
213
  * Indicates whether any values, for any features, have been modified by the
212
214
  * user. This property does not take into account changes to attribute values
@@ -240,6 +242,13 @@ export default class BatchAttributeFormViewModel extends EventedAccessor {
240
242
  * @returns Returns the associated field value, or `undefined` if there is no matching attribute.
241
243
  */
242
244
  getFieldInputValue(elementId: string): FieldValue | undefined;
245
+ /**
246
+ * Gets the updated attribute values for the given feature.
247
+ *
248
+ * @param feature
249
+ * @returns The current attribute values for the given feature.
250
+ */
251
+ getValues(feature: Graphic): Graphic["attributes"];
243
252
  /**
244
253
  * This method triggers the `"submit"` event, and causes [submitHasBeenAttempted](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-BatchAttributeForm-BatchAttributeFormViewModel.html#submitHasBeenAttempted) to become `true`. It does _not_ do anything to persist the updated values. It is up to the client these values as appropriate — for example, by calling [FeatureLayer#applyEdits()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#applyEdits) method to update the features' attributes.
245
254
  *
@@ -252,4 +261,13 @@ export default class BatchAttributeFormViewModel extends EventedAccessor {
252
261
  * on(dom.byId("btnUpdate"), "click", form.submit());
253
262
  */
254
263
  submit(): void;
264
+ /**
265
+ * Determines if user input has caused the given feature to become invalid. Only returns `true` if _all_ of the following three conditions are true of the given feature:
266
+ * 1. It had no validation errors at the start of the editing session.
267
+ * 2. It currently has validation errors.
268
+ * 3. At least one of the validation errors was caused by user input, as opposed to a [value expression](https://developers.arcgis.com/javascript/latest/api-reference/esri-form-elements-FieldElement.html#valueExpression).
269
+ *
270
+ * @param feature
271
+ */
272
+ userChangesHaveMadeFeatureInvalid(feature: Graphic): boolean;
255
273
  }
@@ -184,6 +184,8 @@ export default class BatchAttributeForm extends Widget<BatchAttributeFormPropert
184
184
  /** Defines which elements are visible in the widget. */
185
185
  get visibleElements(): VisibleElements;
186
186
  set visibleElements(value: VisibleElementsProperties);
187
+ /** Focus the form on the first input element with an error. */
188
+ goToFirstError(): void;
187
189
  /**
188
190
  * This method is typically called when the user clicks a submit button or when the form is programmatically submitted and calls the [FeatureLayer#applyEdits()](https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#applyEdits) method
189
191
  * to update the features' attributes.
@@ -2,4 +2,4 @@
2
2
  All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import{substitute as t}from"../intl.js";import{getOrCreateMapValue as i}from"../core/MapUtils.js";import{watch as n,on as o}from"../core/reactiveUtils.js";import{property as a,subclass as s}from"../core/accessorSupport/decorators.js";import{isIntegerField as r}from"../layers/support/fieldUtils.js";import{isString as l}from"../support/guards.js";import d from"./Widget.js";import{getHiddenFieldsValidationErrorMessage as p,getVisibleFieldInputValidationErrorMessage as u,isElementTemplateWithInputType as m}from"./BatchAttributeForm/batchAttributeFormUtils.js";import c from"./BatchAttributeForm/BatchAttributeFormViewModel.js";import{css as h}from"./BatchAttributeForm/css.js";import v from"./BatchAttributeForm/VisibleElements.js";import{isGroupInput as f,isFieldInput as b,isTextElementInput as C,differentValuesString as g}from"./BatchAttributeForm/inputs/support/inputUtils.js";import{loadCalciteComponents as _}from"./support/componentsUtils.js";import{getLabelForDateFieldValue as y,getIntlOptionsForField as F,prepareISOFieldValueForDateComponents as w,prepareUnixFieldValueForDateComponents as I,normalizeTimeOnlyString as x,getISOFieldValueFromDateComponents as M,getUnixFieldValueFromDateComponents as k}from"./support/dateUtils.js";import{globalCss as O}from"./support/globalCss.js";import{messageBundle as T,vmEvent as V,tsx as D}from"./support/widget.js";import{setFocus as U}from"./support/widgetUtils.js";import{isEmptyValue as E}from"./support/forms/formUtils.js";const S="data-element-id";let R=class extends d{constructor(e,t){super(e,t),this.headingLevel=2,this.messagesCommon=null,this.messages=null,this.featureFormMessages=null,this.viewModel=new c,this.visibleElements=new v,this.groupDisplay="all",this._attemptFocusOnNextRender=!1,this._dateComponentMap=new Map,this._touchedInputs=new Set,this._focusedFieldInput=null,this._batchSwitchInputInitialValues=new Map,this._saveInput=this._saveInput.bind(this),this._onFormSubmit=this._onFormSubmit.bind(this),this._onComponentFocus=this._onComponentFocus.bind(this),this._onComponentBlur=this._onComponentBlur.bind(this),this._afterComponentCreateOrUpdate=this._afterComponentCreateOrUpdate.bind(this),this._afterDateComponentCreate=this._afterDateComponentCreate.bind(this),this._afterRadioGroupCreateOrUpdate=this._afterRadioGroupCreateOrUpdate.bind(this)}initialize(){this.addHandles([n(()=>this.features,()=>{this._dateComponentMap.clear()}),n(()=>this.viewModel.activeForm,()=>{this._batchSwitchInputInitialValues.clear()}),o(()=>this.viewModel,"submit",()=>{this.valid||this.goToClosestError()})])}loadDependencies(){return _({input:()=>import("@esri/calcite-components/dist/components/calcite-input"),block:()=>import("@esri/calcite-components/dist/components/calcite-block"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item"),"combobox-item-group":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item-group"),dropdown:()=>import("@esri/calcite-components/dist/components/calcite-dropdown"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item"),"input-date-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-date-picker"),"input-number":()=>import("@esri/calcite-components/dist/components/calcite-input-number"),"input-time-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-time-picker"),"input-time-zone":()=>import("@esri/calcite-components/dist/components/calcite-input-time-zone"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),"input-message":()=>import("@esri/calcite-components/dist/components/calcite-input-message"),loader:()=>import("@esri/calcite-components/dist/components/calcite-loader"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch"),"text-area":()=>import("@esri/calcite-components/dist/components/calcite-text-area"),"radio-button":()=>import("@esri/calcite-components/dist/components/calcite-radio-button"),"radio-button-group":()=>import("@esri/calcite-components/dist/components/calcite-radio-button-group")})}get activeFeatureIndex(){return this.viewModel.activeFeatureIndex}set activeFeatureIndex(e){this.viewModel.activeFeatureIndex=e}get disabled(){return this.viewModel.disabled}set disabled(e){this.viewModel.disabled=e}get _effectiveDisabled(){return this.disabled||this.viewModel.updating}get features(){return this.viewModel.features}set features(e){this.viewModel.features=e}get map(){return this.viewModel.map}set map(e){this.viewModel.map=e}get maximumFeatureCount(){return this.viewModel.maximumFeatureCount}set maximumFeatureCount(e){this.viewModel.maximumFeatureCount=e}get maximumFeatureCountWithComplexForms(){return this.viewModel.maximumFeatureCountWithComplexForms}set maximumFeatureCountWithComplexForms(e){this.viewModel.maximumFeatureCountWithComplexForms=e}get spatialReference(){return this.viewModel.spatialReference}set spatialReference(e){this.viewModel.spatialReference=e}get layerInfos(){return this.viewModel.layerInfos}set layerInfos(e){this.viewModel.layerInfos=e}get timeZone(){return this.viewModel.timeZone}set timeZone(e){this.viewModel.timeZone=e}get icon(){return"edit-attributes"}set icon(e){this._overrideIfSome("icon",e)}get readOnly(){return this.viewModel.readOnly}set readOnly(e){this.viewModel.readOnly=e}get valid(){return this.viewModel.valid}goToClosestError(){const e=this.viewModel.getFirstVisibleInvalidFieldInput();if(!e)return;const{groupInput:t}=e;t&&(t.open||(t.open=!0)),this._focusedFieldInput=e.input,this._attemptFocusOnNextRender=!0,this.scheduleRender()}render(){const{status:e}=this.viewModel;return"failed"===e?this.viewModel.hasTooManyComplexFeatures?this._renderErrorNotice(t(this.messages.formFailedToLoadTooManyComplexFeatures,{num:this.viewModel.maximumFeatureCountWithComplexForms})):this.viewModel.hasTooManyFeatures?this._renderErrorNotice(t(this.messages.formFailedToLoadTooManyFeatures,{num:this.viewModel.maximumFeatureCount})):this._renderErrorNotice(this.messages.formFailedToLoad):this.viewModel.expressionEvaluationFailed?this._renderErrorNotice(this.messages.expressionEvaluationFailed):this.viewModel.hasLayersWithContingentValues?this._renderErrorNotice(this.messages.unsupportedContingentValues):D("div",{class:this.classes(h.base,O.widget,O.panel)},"loaded"===e?this._renderForm():"loading"===e&&this.visibleElements.loadingIndicator?D("calcite-loader",{key:"loader",label:this.messagesCommon?.loading}):null)}submit(){this.viewModel.submit()}_setDateTimeTimeZoneMap(e){const{datePart:t,elementId:n}=e.dataset,o=i(this._dateComponentMap,`${n}`,()=>({}));switch(t){case"date":o.date=e;break;case"time":o.time=e;break;case"timeZone":o.timeZone=e}}_renderErrorNotice(e){return D("div",{class:this.classes(h.base,O.widget,O.panel)},D("calcite-notice",{class:h.noticeError,icon:!0,kind:"warning",open:!0},D("div",{slot:"message"},e)))}_renderForm(){return D("form",{class:h.form,onsubmit:this._onFormSubmit},this._renderInvisibleFieldsError(),this._renderContent())}_renderInvisibleFieldsError(){const{viewModel:e}=this,{hasNonActiveInvalidFeatures:t,activeForm:i}=e;let n;if(!e.submitHasBeenAttempted)return null;if(i.invalidHiddenInputs.length>0)if(n=p(i,e.mode,this.messages),"batch"===this.viewModel.mode){const e=i.invalidHiddenInputs.filter(e=>"hidden:group-visibility-expression:all-features"===e.effectiveVisibilityCode||"hidden:visibility-expression:all-features"===e.visibilityCode);e.length>0?n+=` (${e.map(e=>e.label).join(", ")})`:n=null}else n+=` (${i.invalidHiddenInputs.map(e=>e.label).join(", ")})`;else if(t)return null;return n?D("calcite-notice",{class:h.noticeError,icon:!0,kind:"danger",open:!0},D("div",{slot:"message"},n)):null}_renderContent(){if(!this.viewModel.hasVisibleInputs)return[D("calcite-notice",{class:h.noticeError,icon:!0,kind:"warning",open:!0},D("div",{slot:"message"},this.messages.noVisibleFields[this.viewModel.noVisibleElementsReason]))];const{inputs:e}=this.viewModel.activeForm;return e.filter(e=>e.visible).map(e=>this._renderInput(e))}_renderInput(e){return f(e)?this._renderGroupInput(e):b(e)?this._renderLabeledField(e):C(e)?this._renderTextComponent(e):void 0}_renderGroupInput(e){const{inputs:t,template:i,open:n}=e,o=t.filter(e=>e.visible),a=i.label??"";return D("calcite-block",{class:this.classes(h.group,"sequential"===this.groupDisplay?h.groupSequential:null,this.disabled?h.inputDisabled:null),collapsible:!0,description:i.description??void 0,disabled:this._effectiveDisabled,expanded:n,heading:a,headingLevel:this.headingLevel,key:`{${i.elementId}-key}`,label:a,onCalciteBlockClose:()=>{e.open=!1},onCalciteBlockOpen:()=>{e.open=!0}},o.map(e=>this._renderInput(e)))}_renderLabeledField(e){const{elementId:i}=e.template,{label:n,required:o,dataType:a}=e,s=o?t(this.messages.requiredFieldLabel,{name:n}):n;return D("calcite-label",{"aria-label":s,class:h.label,key:`field--${i}`},D("div",{class:h.labelTextContent,key:"labelTextContainer"},n,o?D("span",{"aria-hidden":"true",title:this.messagesCommon.required},"*"):void 0),"unsupported"!==a?this._renderFieldInput(e):this._renderReadOnlyComponent(e),this._renderAuxiliaryText(e))}_renderFieldInput(e){const t=this.getCommonInputProps(e),{dataType:i}=e;return"date"===i?this._renderDateComponents(e,t):"coded-value"===e.domain?.type?this._renderCodedInputs({input:e,props:t}):"number"===i?this._renderNumberComponent(e,t):this._renderStringComponent(e,t)}_renderAuxiliaryText(e){const{compositeError:t,description:i,submittable:n}=e,o=!n&&t&&(this.viewModel.submitHasBeenAttempted||this._touchedInputs.has(e.template.elementId))?u(e,t,this.messages):null;return o?D("calcite-input-message",{icon:!0,status:"invalid"},o):i?D("calcite-input-message",{class:h.description,icon:!1,status:"idle"},i):null}_renderCodedInputs({input:e,props:t}){const i=e.template.input?.type??null,n=e.codedValueOptions;switch(i){case"switch":return this._renderSwitchField({input:e,props:t});case"radio-buttons":return this._renderRadioButtonGroupComponent({input:e,options:n.flat(),props:t});default:return this._renderComboBoxComponent({options:n,props:t,input:e})}}_renderSwitchField({input:e,props:t}){if((this._batchSwitchInputInitialValues.get(e)===g||e.value===g)&&"batch"===this.viewModel.mode){const i={dropdown:{afterCreate:this._afterComponentCreateOrUpdate,afterUpdate:this._afterComponentCreateOrUpdate,disabled:t.readOnly,open:!1,[S]:t[S]},trigger:{appearance:"transparent",iconEnd:"chevron-down",kind:"neutral",slot:"trigger",label:t.label},group:{mode:"single"}};return this._renderDropdownComponent({buttonValue:e.value,dropdownProps:i,options:[{name:this.messages.differentValuesPlaceholder,value:g,disabled:!0},...e.codedValueDomainOptions]})}return this._renderSwitchComponent({input:e,props:t})}_renderSwitchComponent({input:e,props:t}){return D("calcite-switch",{...t,checked:!!m(e.template,"switch")&&e.value===e.template.input.onValue,class:h.inputSwitch,disabled:t.readOnly,onblur:()=>{this._focusedFieldInput=null},onCalciteSwitchChange:({currentTarget:e})=>this._saveInput(e)})}_renderDropdownComponent({buttonValue:e,options:t,dropdownProps:i}){const{trigger:n,dropdown:o,group:a}=i;return D("calcite-dropdown",{...o,onblur:()=>{this._focusedFieldInput=null},onfocus:this._onComponentFocus,onCalciteDropdownSelect:({currentTarget:e})=>this._saveInput(e)},D("calcite-button",{...n},e===g?this.messages.differentValuesPlaceholder:e),D("calcite-dropdown-group",{selectionMode:a.mode},t.map(t=>D("calcite-dropdown-item",{disabled:t.disabled,label:String(t.name),selected:e===t.value},t.name))))}_renderComboBoxComponent({input:e,options:t,props:i}){const n="INSERT"===this.viewModel.editType,o=this._touchedInputs.has(e?.template?.elementId),a=n&&e.showNoValueOptionEnabled&&!o?()=>{}:i.onblur,s={...i,onblur:a};return D("calcite-combobox",{...s,selectionMode:"single",value:i.placeholder===this.messages.differentValuesPlaceholder?g:String(i.value),onCalciteComboboxChange:({currentTarget:e})=>{e.value!==g&&this._saveInput(e)}},this.renderComboboxOptionsList({input:e,options:t,props:i}))}renderComboboxOptionsList({input:e,options:t,props:i}){const[n,o]=t.map(e=>e.map(({name:e,value:t})=>D("calcite-combobox-item",{heading:e,key:`#${t}`,selected:i.value===t,value:`${t}`}))),a=[...n];o.length>0&&a.push(D("calcite-combobox-item-group",{key:"unsupported",label:this.featureFormMessages.subtypes.unsupportedDomainGroupTitle},o));const s=i.placeholder===this.messages.differentValuesPlaceholder,r=!s&&E(i.value);return e.showNoValueOptionEnabled&&a.unshift(D("calcite-combobox-item",{heading:e.showNoValueLabel||this.messages.empty,key:"empty-option",selected:r,value:""})),s&&a.unshift(D("calcite-combobox-item",{heading:this.messages.differentValuesPlaceholder,key:g,selected:!0,value:g})),a}_renderRadioButtonGroupComponent({input:e,options:t,props:i}){const n=t.map(({name:t,value:n})=>this._renderRadioButtons({label:t,value:n,selected:n===e.value,props:i}));if(e.showNoValueOptionEnabled){const t="",o=e.showNoValueLabel||this.messages.empty,a=E(e.value);n.unshift(this._renderRadioButtons({label:o,value:t,selected:a,props:i}))}return D("calcite-radio-button-group",{afterCreate:this._afterRadioGroupCreateOrUpdate,afterUpdate:this._afterRadioGroupCreateOrUpdate,class:h.inputRadioGroup,disabled:i.readOnly,key:`${i.key}-radio-group`,layout:"vertical",name:i.name,required:i.required},n,i.placeholder===this.messages.differentValuesPlaceholder?D("calcite-label",{class:h.placeholderRadio,key:i.label,layout:"inline"},D("calcite-radio-button",{checked:!0,class:h.inputRadio,disabled:!0,name:i.placeholder,value:i.placeholder}),i.placeholder):null)}_renderRadioButtons({value:e,selected:t,label:i,props:n}){return D("calcite-label",{class:h.inputRadioLabel,key:n.label,layout:"inline"},D("calcite-radio-button",{...n,afterCreate:void 0,afterUpdate:void 0,checked:t,class:h.inputRadio,disabled:n.readOnly,name:n.label,onblur:()=>{this._focusedFieldInput=null},value:e,onCalciteRadioButtonChange:({currentTarget:e})=>{e.checked&&this._saveInput(e)}}),i)}_renderStringComponent(e,t){const{template:i}=e;return!i.field.editable||this.readOnly?this._renderReadOnlyComponent(e):"text-area"===i.input?.type?D("calcite-text-area",{...t,class:this.classes(h.individualElement),resize:"vertical",value:t.value?String(t.value):"",onCalciteTextAreaInput:({currentTarget:e})=>this._saveInput(e)}):D("calcite-input",{...t,class:this.classes(h.individualElement),type:"text",value:t.value?String(t.value):"",onCalciteInputInput:({currentTarget:e})=>this._saveInput(e)})}_renderNumberComponent(e,t){const i=r(e.field);return D("calcite-input-number",{...t,integer:i,type:"number",value:i&&""!==t.value?Math.round(parseFloat(String(t.value))).toString():String(t.value),onCalciteInputNumberInput:({currentTarget:e})=>this._saveInput(e)})}_renderReadOnlyComponent(e,t){const i=this.getCommonInputProps(e);return D("calcite-input",{...i,class:this.classes(h.fieldInput,h.inputDisabled,h.individualElement),readOnly:!0,type:"text",value:String(t??i.value??"")})}_renderDateComponents(e,t){const{field:i}=e;let n;switch(i.type){case"date":n=this._renderDateFieldComponents(e,t);break;case"date-only":n=this._renderDateOnlyFieldComponent(e,t);break;case"time-only":n=this._renderTimeOnlyFieldComponent(e,t);break;case"timestamp-offset":n=this._renderTimestampOffsetFieldComponents(e,t);break;default:n=this._renderReadOnlyComponent(e,y(i,t.value,{timeZone:e.effectiveTimeZone,...F(e.template.field)}))}return e.value===g?[n,D("calcite-input-message",{icon:"information",key:"diff-values-message",status:"idle"},this.messages.differentValues)]:n}_renderDateOnlyFieldComponent(e,t){const{class:i,key:n,readOnly:o}=t,{rawMax:a,rawMin:s}=e.range;return D("calcite-input-date-picker",{afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterComponentCreateOrUpdate,class:i,"data-date-part":"date","data-element-id":t[S],key:`${n}-date-input`,max:l(a)?a:void 0,min:l(s)?s:void 0,onblur:()=>{this._focusedFieldInput=null},onfocus:this._onComponentFocus,overlayPositioning:"fixed",readOnly:o,value:e.value===g?"":e.value?String(e.value):"",onCalciteInputDatePickerChange:t=>this._saveValueFromDateComponent(e,t.currentTarget)})}_renderTimeOnlyFieldComponent(e,t){const{class:i,key:n,readOnly:o}=t;return D("calcite-input-time-picker",{afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterComponentCreateOrUpdate,class:i,"data-date-part":"time","data-element-id":t[S],key:`${n}-time-input`,onblur:()=>{this._focusedFieldInput=null},onfocus:this._onComponentFocus,overlayPositioning:"fixed",readOnly:o,value:e.value===g?"":e.value?String(e.value):"",onCalciteInputTimePickerChange:t=>this._saveValueFromDateComponent(e,t.currentTarget)})}_renderTimestampOffsetFieldComponents(e,t){const{class:i,key:n,readOnly:o}=t,{rawMax:a,rawMin:s}=e.range,r=w(a),l=w(s),d=w(e.value===g?"":e.value),p=e.includeTimeOffset,u={afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterComponentCreateOrUpdate,overlayPositioning:"fixed",readOnly:o,[S]:t[S],onfocus:this._onComponentFocus};return D("div",{class:h.dateInputContainer,key:`${n}-date-time-container`},D("calcite-input-date-picker",{...u,class:i,"data-date-part":"date",key:`${n}-date-input`,max:r?.date??void 0,min:l?.date??void 0,onblur:()=>{this._focusedFieldInput=null},value:d.date??"",onCalciteInputDatePickerChange:t=>this._saveValueFromDateComponent(e,t.target)}),D("calcite-input-time-picker",{...u,class:i,"data-date-part":"time",key:`${n}-time-input`,onblur:()=>{this._focusedFieldInput=null},value:d.time??"",onCalciteInputTimePickerChange:t=>this._saveValueFromDateComponent(e,t.target)}),p?D("calcite-input-time-zone",{...u,class:i,clearable:e.value===g||null==e.value,"data-date-part":"timeZone",key:`${n}-timezone-input`,onblur:()=>{this._focusedFieldInput=null},value:d.timeZoneOffset||"",onCalciteInputTimeZoneChange:t=>this._saveValueFromDateComponent(e,t.target)}):null)}_renderDateFieldComponents(e,t){const{class:i,key:n,readOnly:o,min:a,max:s}=t,r=e.effectiveTimeZone,l=I(e.value===g?"":e.value,r),d=I(s,r),p=I(a,r),u=e.includeTime,m={afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterComponentCreateOrUpdate,overlayPositioning:"fixed",readOnly:o,[S]:t[S],onfocus:this._onComponentFocus};return D("div",{class:h.dateInputContainer,key:`${n}-date-time-container`},D("calcite-input-date-picker",{...m,class:i,"data-date-part":"date",key:`${n}-date-input`,max:d?.date??void 0,min:p?.date??void 0,onblur:()=>{this._focusedFieldInput=null},value:l.date??"",onCalciteInputDatePickerChange:t=>this._saveValueFromDateComponent(e,t.target)}),u?D("calcite-input-time-picker",{...m,"data-date-part":"time",key:`${n}-time-input`,onblur:()=>{this._focusedFieldInput=null},step:1,value:l.time??"",onCalciteInputTimePickerChange:t=>{this._saveValueFromDateComponent(e,t.target)}}):null)}_renderTextComponent(e){const{elementId:t}=e.template;return D("div",{class:h.textElementInput,"data-testid":`text-element-${t}`,innerHTML:e.text,key:`text-element-${t}`})}getCommonInputProps(e){const{template:t,valid:i,value:n,minLength:o,maxLength:a,required:s,fieldName:r,editable:l,userHasChangedValue:d,range:{max:p,min:u}}=e,m=!l||this.readOnly,c=!m&&this._effectiveDisabled;let v=t.hint??void 0,f=!1;return n===g&&(v=this.messages.differentValuesPlaceholder,f=!0),{afterCreate:this._afterComponentCreateOrUpdate,afterUpdate:this._afterComponentCreateOrUpdate,"aria-invalid":i?"false":"true",class:this.classes(h.fieldInput,m?h.inputDisabled:null),status:!d&&!this.viewModel.submitHasBeenAttempted||i?"idle":"invalid",maxLength:a&&a>-1?a:void 0,minLength:o&&o>-1?o:void 0,key:t.elementId,label:r,name:r,max:null!=p?p:void 0,min:null!=u?u:void 0,disabled:c,readOnly:m,onblur:this._onComponentBlur,required:s,placeholder:v,value:f?"":n??"",[S]:t.elementId,onfocus:this._onComponentFocus}}_onFormSubmit(e){e.preventDefault()}_getFieldInputFromHTMLElement(e){return this.viewModel.findFieldInput(e.getAttribute(S))}_afterRadioGroupCreateOrUpdate(e){const t=e.selectedItem,i=e.querySelector("calcite-radio-button"),n=t||i;n&&this._afterComponentCreateOrUpdate(n)}_onComponentFocus(e){const t=e.target,i=this._getFieldInputFromHTMLElement(t);this._touchedInputs.add(i.template.elementId),this._focusedFieldInput=i}_afterComponentCreateOrUpdate(e){const t=this._getFieldInputFromHTMLElement(e),i=this._focusedFieldInput;this._attemptFocusOnNextRender&&i===t&&(this._attemptFocusOnNextRender=!1,U(e))}_onComponentBlur(){this._focusedFieldInput=null}_parseValue(e,t){if(m(t.template,"switch")){if("calcite-dropdown"===e.localName&&t.domain)for(const i of t.domain.codedValues)if(i.name===e.selectedItems[0].textContent)return i.code;return e.checked?t.template.input.onValue:t.template.input.offValue}const i=e.value;return null==i||""===i?null:"number"===t.dataType?"-0"===i||"-0."===i||"-0,"===i?i:parseFloat(i):"date"===t.field.type?parseFloat(i):i}_saveInput(e){const t=this._getFieldInputFromHTMLElement(e),{elementId:n}=t.template;if(!t)return;const o=t?.value;if(m(t.template,"switch")&&"single"!==this.viewModel.mode){const e=i(this._batchSwitchInputInitialValues,t,()=>t.value);this._batchSwitchInputInitialValues.set(t,null===e?o:e)}const a=this._parseValue(e,t);a!==o&&this.viewModel.setValue(n,a)}_afterDateComponentCreate(e){this._setDateTimeTimeZoneMap(e),this._afterComponentCreateOrUpdate(e)}_saveValueFromDateComponent(e,t){const{elementId:i}=e.template,n=e.field.type,o=this._dateComponentMap.get(`${i}`);if(!o)return;const a=e.effectiveTimeZone;let s=e.value===g?void 0:e.value,r=null;"date-only"===n?r=Array.isArray(t.value)?t.value[0]:t.value:"time-only"===n?(s=x(s),r=x(t.value)):r="timestamp-offset"===n?null!=t.value?M({dateComponent:o.date,timeComponent:o.time,oldValue:s,timeZoneComponent:o.timeZone,defaultTimeZone:a}):null:null!=t.value?k({oldValue:s,dateComponent:o.date,timeZone:a,timeComponent:o.time?.value===g?void 0:o.time}):null,s!==r&&(null!==r&&t.value?this.viewModel.setValue(`${i}`,r):this.viewModel.setValue(`${i}`,null))}};e([a()],R.prototype,"activeFeatureIndex",null),e([a()],R.prototype,"disabled",null),e([a()],R.prototype,"_effectiveDisabled",null),e([a()],R.prototype,"features",null),e([a()],R.prototype,"map",null),e([a()],R.prototype,"maximumFeatureCount",null),e([a()],R.prototype,"maximumFeatureCountWithComplexForms",null),e([a()],R.prototype,"spatialReference",null),e([a()],R.prototype,"layerInfos",null),e([a()],R.prototype,"timeZone",null),e([a()],R.prototype,"headingLevel",void 0),e([a()],R.prototype,"icon",null),e([a(),T("esri/t9n/common")],R.prototype,"messagesCommon",void 0),e([a(),T("esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm")],R.prototype,"messages",void 0),e([a(),T("esri/widgets/FeatureForm/t9n/FeatureForm")],R.prototype,"featureFormMessages",void 0),e([a()],R.prototype,"readOnly",null),e([a()],R.prototype,"valid",null),e([a({type:c}),V(["value-change","submit"])],R.prototype,"viewModel",void 0),e([a({type:v,nonNullable:!0})],R.prototype,"visibleElements",void 0),e([a()],R.prototype,"groupDisplay",void 0),R=e([s("esri.widgets.BatchAttributeForm")],R);const B=R;export{B as default};
5
+ import{__decorate as e}from"tslib";import{substitute as t}from"../intl.js";import{getOrCreateMapValue as i}from"../core/MapUtils.js";import{watch as n,on as o}from"../core/reactiveUtils.js";import{property as a,subclass as s}from"../core/accessorSupport/decorators.js";import{isIntegerField as r}from"../layers/support/fieldUtils.js";import{isString as l}from"../support/guards.js";import d from"./Widget.js";import{getHiddenFieldsValidationErrorMessage as p,getVisibleFieldInputValidationErrorMessage as u,isElementTemplateWithInputType as m}from"./BatchAttributeForm/batchAttributeFormUtils.js";import c from"./BatchAttributeForm/BatchAttributeFormViewModel.js";import{css as h}from"./BatchAttributeForm/css.js";import v from"./BatchAttributeForm/VisibleElements.js";import{isGroupInput as f,isFieldInput as b,isTextElementInput as C,differentValuesString as g}from"./BatchAttributeForm/inputs/support/inputUtils.js";import{loadCalciteComponents as _}from"./support/componentsUtils.js";import{getLabelForDateFieldValue as y,getIntlOptionsForField as F,prepareISOFieldValueForDateComponents as w,prepareUnixFieldValueForDateComponents as I,normalizeTimeOnlyString as x,getISOFieldValueFromDateComponents as M,getUnixFieldValueFromDateComponents as k}from"./support/dateUtils.js";import{globalCss as O}from"./support/globalCss.js";import{messageBundle as T,vmEvent as V,tsx as D}from"./support/widget.js";import{setFocus as U}from"./support/widgetUtils.js";import{isEmptyValue as E}from"./support/forms/formUtils.js";const S="data-element-id";let R=class extends d{constructor(e,t){super(e,t),this.headingLevel=2,this.messagesCommon=null,this.messages=null,this.featureFormMessages=null,this.viewModel=new c,this.visibleElements=new v,this.groupDisplay="all",this._attemptFocusOnNextRender=!1,this._dateComponentMap=new Map,this._touchedInputs=new Set,this._focusedFieldInput=null,this._batchSwitchInputInitialValues=new Map,this._saveInput=this._saveInput.bind(this),this._onFormSubmit=this._onFormSubmit.bind(this),this._onComponentFocus=this._onComponentFocus.bind(this),this._onComponentBlur=this._onComponentBlur.bind(this),this._afterComponentCreateOrUpdate=this._afterComponentCreateOrUpdate.bind(this),this._afterDateComponentCreate=this._afterDateComponentCreate.bind(this),this._afterRadioGroupCreateOrUpdate=this._afterRadioGroupCreateOrUpdate.bind(this)}initialize(){this.addHandles([n(()=>this.features,()=>{this._dateComponentMap.clear()}),n(()=>this.viewModel.activeForm,()=>{this._batchSwitchInputInitialValues.clear()}),o(()=>this.viewModel,"submit",()=>{this.valid||this.goToFirstError()})])}loadDependencies(){return _({input:()=>import("@esri/calcite-components/dist/components/calcite-input"),block:()=>import("@esri/calcite-components/dist/components/calcite-block"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),combobox:()=>import("@esri/calcite-components/dist/components/calcite-combobox"),"combobox-item":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item"),"combobox-item-group":()=>import("@esri/calcite-components/dist/components/calcite-combobox-item-group"),dropdown:()=>import("@esri/calcite-components/dist/components/calcite-dropdown"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item"),"input-date-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-date-picker"),"input-number":()=>import("@esri/calcite-components/dist/components/calcite-input-number"),"input-time-picker":()=>import("@esri/calcite-components/dist/components/calcite-input-time-picker"),"input-time-zone":()=>import("@esri/calcite-components/dist/components/calcite-input-time-zone"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),"input-message":()=>import("@esri/calcite-components/dist/components/calcite-input-message"),loader:()=>import("@esri/calcite-components/dist/components/calcite-loader"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch"),"text-area":()=>import("@esri/calcite-components/dist/components/calcite-text-area"),"radio-button":()=>import("@esri/calcite-components/dist/components/calcite-radio-button"),"radio-button-group":()=>import("@esri/calcite-components/dist/components/calcite-radio-button-group")})}get activeFeatureIndex(){return this.viewModel.activeFeatureIndex}set activeFeatureIndex(e){this.viewModel.activeFeatureIndex=e}get disabled(){return this.viewModel.disabled}set disabled(e){this.viewModel.disabled=e}get _effectiveDisabled(){return this.disabled||this.viewModel.updating}get features(){return this.viewModel.features}set features(e){this.viewModel.features=e}get map(){return this.viewModel.map}set map(e){this.viewModel.map=e}get maximumFeatureCount(){return this.viewModel.maximumFeatureCount}set maximumFeatureCount(e){this.viewModel.maximumFeatureCount=e}get maximumFeatureCountWithComplexForms(){return this.viewModel.maximumFeatureCountWithComplexForms}set maximumFeatureCountWithComplexForms(e){this.viewModel.maximumFeatureCountWithComplexForms=e}get spatialReference(){return this.viewModel.spatialReference}set spatialReference(e){this.viewModel.spatialReference=e}get layerInfos(){return this.viewModel.layerInfos}set layerInfos(e){this.viewModel.layerInfos=e}get timeZone(){return this.viewModel.timeZone}set timeZone(e){this.viewModel.timeZone=e}get icon(){return"edit-attributes"}set icon(e){this._overrideIfSome("icon",e)}get readOnly(){return this.viewModel.readOnly}set readOnly(e){this.viewModel.readOnly=e}get valid(){return this.viewModel.valid}goToFirstError(){const e=this.viewModel.getFirstVisibleInvalidFieldInput();if(!e)return;const{groupInput:t}=e;t&&(t.open||(t.open=!0)),this._focusedFieldInput=e.input,this._attemptFocusOnNextRender=!0,this.scheduleRender()}render(){const{status:e}=this.viewModel;return"failed"===e?this.viewModel.hasTooManyComplexFeatures?this._renderErrorNotice(t(this.messages.formFailedToLoadTooManyComplexFeatures,{num:this.viewModel.maximumFeatureCountWithComplexForms})):this.viewModel.hasTooManyFeatures?this._renderErrorNotice(t(this.messages.formFailedToLoadTooManyFeatures,{num:this.viewModel.maximumFeatureCount})):this._renderErrorNotice(this.messages.formFailedToLoad):this.viewModel.expressionEvaluationFailed?this._renderErrorNotice(this.messages.expressionEvaluationFailed):this.viewModel.hasLayersWithContingentValues?this._renderErrorNotice(this.messages.unsupportedContingentValues):D("div",{class:this.classes(h.base,O.widget,O.panel)},"loaded"===e?this._renderForm():"loading"===e&&this.visibleElements.loadingIndicator?D("calcite-loader",{key:"loader",label:this.messagesCommon?.loading}):null)}submit(){this.viewModel.submit()}_setDateTimeTimeZoneMap(e){const{datePart:t,elementId:n}=e.dataset,o=i(this._dateComponentMap,`${n}`,()=>({}));switch(t){case"date":o.date=e;break;case"time":o.time=e;break;case"timeZone":o.timeZone=e}}_renderErrorNotice(e){return D("div",{class:this.classes(h.base,O.widget,O.panel)},D("calcite-notice",{class:h.noticeError,icon:!0,kind:"warning",open:!0},D("div",{slot:"message"},e)))}_renderForm(){return D("form",{class:h.form,onsubmit:this._onFormSubmit},this._renderInvisibleFieldsError(),this._renderContent())}_renderInvisibleFieldsError(){const{viewModel:e}=this,{hasNonActiveInvalidFeatures:t,activeForm:i}=e;let n;if(!e.submitHasBeenAttempted)return null;if(i.invalidHiddenInputs.length>0)if(n=p(i,e.mode,this.messages),"batch"===this.viewModel.mode){const e=i.invalidHiddenInputs.filter(e=>"hidden:group-visibility-expression:all-features"===e.effectiveVisibilityCode||"hidden:visibility-expression:all-features"===e.visibilityCode);e.length>0?n+=` (${e.map(e=>e.label).join(", ")})`:n=null}else n+=` (${i.invalidHiddenInputs.map(e=>e.label).join(", ")})`;else if(t)return null;return n?D("calcite-notice",{class:h.noticeError,icon:!0,kind:"danger",open:!0},D("div",{slot:"message"},n)):null}_renderContent(){if(!this.viewModel.hasVisibleInputs)return[D("calcite-notice",{class:h.noticeError,icon:!0,kind:"warning",open:!0},D("div",{slot:"message"},this.messages.noVisibleFields[this.viewModel.noVisibleElementsReason]))];const{inputs:e}=this.viewModel.activeForm;return e.filter(e=>e.visible).map(e=>this._renderInput(e))}_renderInput(e){return f(e)?this._renderGroupInput(e):b(e)?this._renderLabeledField(e):C(e)?this._renderTextComponent(e):void 0}_renderGroupInput(e){const{inputs:t,template:i,open:n}=e,o=t.filter(e=>e.visible),a=i.label??"";return D("calcite-block",{class:this.classes(h.group,"sequential"===this.groupDisplay?h.groupSequential:null,this.disabled?h.inputDisabled:null),collapsible:!0,description:i.description??void 0,disabled:this._effectiveDisabled,expanded:n,heading:a,headingLevel:this.headingLevel,key:`{${i.elementId}-key}`,label:a,onCalciteBlockClose:()=>{e.open=!1},onCalciteBlockOpen:()=>{e.open=!0}},o.map(e=>this._renderInput(e)))}_renderLabeledField(e){const{elementId:i}=e.template,{label:n,required:o,dataType:a}=e,s=o?t(this.messages.requiredFieldLabel,{name:n}):n;return D("calcite-label",{"aria-label":s,class:h.label,key:`field--${i}`},D("div",{class:h.labelTextContent,key:"labelTextContainer"},n,o?D("span",{"aria-hidden":"true",title:this.messagesCommon.required},"*"):void 0),"unsupported"!==a?this._renderFieldInput(e):this._renderReadOnlyComponent(e),this._renderAuxiliaryText(e))}_renderFieldInput(e){const t=this.getCommonInputProps(e),{dataType:i}=e;return"date"===i?this._renderDateComponents(e,t):"coded-value"===e.domain?.type?this._renderCodedInputs({input:e,props:t}):"number"===i?this._renderNumberComponent(e,t):this._renderStringComponent(e,t)}_renderAuxiliaryText(e){const{compositeError:t,description:i,submittable:n}=e,o=!n&&t&&(this.viewModel.submitHasBeenAttempted||this._touchedInputs.has(e.template.elementId))?u(e,t,this.messages):null;return o?D("calcite-input-message",{icon:!0,status:"invalid"},o):i?D("calcite-input-message",{class:h.description,icon:!1,status:"idle"},i):null}_renderCodedInputs({input:e,props:t}){const i=e.template.input?.type??null,n=e.codedValueOptions;switch(i){case"switch":return this._renderSwitchField({input:e,props:t});case"radio-buttons":return this._renderRadioButtonGroupComponent({input:e,options:n.flat(),props:t});default:return this._renderComboBoxComponent({options:n,props:t,input:e})}}_renderSwitchField({input:e,props:t}){if((this._batchSwitchInputInitialValues.get(e)===g||e.value===g)&&"batch"===this.viewModel.mode){const i={dropdown:{afterCreate:this._afterComponentCreateOrUpdate,afterUpdate:this._afterComponentCreateOrUpdate,disabled:t.readOnly,open:!1,[S]:t[S]},trigger:{appearance:"transparent",iconEnd:"chevron-down",kind:"neutral",slot:"trigger",label:t.label},group:{mode:"single"}};return this._renderDropdownComponent({buttonValue:e.value,dropdownProps:i,options:[{name:this.messages.differentValuesPlaceholder,value:g,disabled:!0},...e.codedValueDomainOptions]})}return this._renderSwitchComponent({input:e,props:t})}_renderSwitchComponent({input:e,props:t}){return D("calcite-switch",{...t,checked:!!m(e.template,"switch")&&e.value===e.template.input.onValue,class:h.inputSwitch,disabled:t.readOnly,onblur:()=>{this._focusedFieldInput=null},onCalciteSwitchChange:({currentTarget:e})=>this._saveInput(e)})}_renderDropdownComponent({buttonValue:e,options:t,dropdownProps:i}){const{trigger:n,dropdown:o,group:a}=i;return D("calcite-dropdown",{...o,onblur:()=>{this._focusedFieldInput=null},onfocus:this._onComponentFocus,onCalciteDropdownSelect:({currentTarget:e})=>this._saveInput(e)},D("calcite-button",{...n},e===g?this.messages.differentValuesPlaceholder:e),D("calcite-dropdown-group",{selectionMode:a.mode},t.map(t=>D("calcite-dropdown-item",{disabled:t.disabled,label:String(t.name),selected:e===t.value},t.name))))}_renderComboBoxComponent({input:e,options:t,props:i}){const n="INSERT"===this.viewModel.editType,o=this._touchedInputs.has(e?.template?.elementId),a=n&&e.showNoValueOptionEnabled&&!o?()=>{}:i.onblur,s={...i,onblur:a};return D("calcite-combobox",{...s,selectionMode:"single",value:i.placeholder===this.messages.differentValuesPlaceholder?g:String(i.value),onCalciteComboboxChange:({currentTarget:e})=>{e.value!==g&&this._saveInput(e)}},this.renderComboboxOptionsList({input:e,options:t,props:i}))}renderComboboxOptionsList({input:e,options:t,props:i}){const[n,o]=t.map(e=>e.map(({name:e,value:t})=>D("calcite-combobox-item",{heading:e,key:`#${t}`,selected:i.value===t,value:`${t}`}))),a=[...n];o.length>0&&a.push(D("calcite-combobox-item-group",{key:"unsupported",label:this.featureFormMessages.subtypes.unsupportedDomainGroupTitle},o));const s=i.placeholder===this.messages.differentValuesPlaceholder,r=!s&&E(i.value);return e.showNoValueOptionEnabled&&a.unshift(D("calcite-combobox-item",{heading:e.showNoValueLabel||this.messages.empty,key:"empty-option",selected:r,value:""})),s&&a.unshift(D("calcite-combobox-item",{heading:this.messages.differentValuesPlaceholder,key:g,selected:!0,value:g})),a}_renderRadioButtonGroupComponent({input:e,options:t,props:i}){const n=t.map(({name:t,value:n})=>this._renderRadioButtons({label:t,value:n,selected:n===e.value,props:i}));if(e.showNoValueOptionEnabled){const t="",o=e.showNoValueLabel||this.messages.empty,a=E(e.value);n.unshift(this._renderRadioButtons({label:o,value:t,selected:a,props:i}))}return D("calcite-radio-button-group",{afterCreate:this._afterRadioGroupCreateOrUpdate,afterUpdate:this._afterRadioGroupCreateOrUpdate,class:h.inputRadioGroup,disabled:i.readOnly,key:`${i.key}-radio-group`,layout:"vertical",name:i.name,required:i.required},n,i.placeholder===this.messages.differentValuesPlaceholder?D("calcite-label",{class:h.placeholderRadio,key:i.label,layout:"inline"},D("calcite-radio-button",{checked:!0,class:h.inputRadio,disabled:!0,name:i.placeholder,value:i.placeholder}),i.placeholder):null)}_renderRadioButtons({value:e,selected:t,label:i,props:n}){return D("calcite-label",{class:h.inputRadioLabel,key:n.label,layout:"inline"},D("calcite-radio-button",{...n,afterCreate:void 0,afterUpdate:void 0,checked:t,class:h.inputRadio,disabled:n.readOnly,name:n.label,onblur:()=>{this._focusedFieldInput=null},value:e,onCalciteRadioButtonChange:({currentTarget:e})=>{e.checked&&this._saveInput(e)}}),i)}_renderStringComponent(e,t){const{template:i}=e;return!i.field.editable||this.readOnly?this._renderReadOnlyComponent(e):"text-area"===i.input?.type?D("calcite-text-area",{...t,class:this.classes(h.individualElement),resize:"vertical",value:t.value?String(t.value):"",onCalciteTextAreaInput:({currentTarget:e})=>this._saveInput(e)}):D("calcite-input",{...t,class:this.classes(h.individualElement),type:"text",value:t.value?String(t.value):"",onCalciteInputInput:({currentTarget:e})=>this._saveInput(e)})}_renderNumberComponent(e,t){const i=r(e.field);return D("calcite-input-number",{...t,integer:i,type:"number",value:i&&""!==t.value?Math.round(parseFloat(String(t.value))).toString():String(t.value),onCalciteInputNumberInput:({currentTarget:e})=>this._saveInput(e)})}_renderReadOnlyComponent(e,t){const i=this.getCommonInputProps(e);return D("calcite-input",{...i,class:this.classes(h.fieldInput,h.inputDisabled,h.individualElement),readOnly:!0,type:"text",value:String(t??i.value??"")})}_renderDateComponents(e,t){const{field:i}=e;let n;switch(i.type){case"date":n=this._renderDateFieldComponents(e,t);break;case"date-only":n=this._renderDateOnlyFieldComponent(e,t);break;case"time-only":n=this._renderTimeOnlyFieldComponent(e,t);break;case"timestamp-offset":n=this._renderTimestampOffsetFieldComponents(e,t);break;default:n=this._renderReadOnlyComponent(e,y(i,t.value,{timeZone:e.effectiveTimeZone,...F(e.template.field)}))}return e.value===g?[n,D("calcite-input-message",{icon:"information",key:"diff-values-message",status:"idle"},this.messages.differentValues)]:n}_renderDateOnlyFieldComponent(e,t){const{class:i,key:n,readOnly:o}=t,{rawMax:a,rawMin:s}=e.range;return D("calcite-input-date-picker",{afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterComponentCreateOrUpdate,class:i,"data-date-part":"date","data-element-id":t[S],key:`${n}-date-input`,max:l(a)?a:void 0,min:l(s)?s:void 0,onblur:()=>{this._focusedFieldInput=null},onfocus:this._onComponentFocus,overlayPositioning:"fixed",readOnly:o,value:e.value===g?"":e.value?String(e.value):"",onCalciteInputDatePickerChange:t=>this._saveValueFromDateComponent(e,t.currentTarget)})}_renderTimeOnlyFieldComponent(e,t){const{class:i,key:n,readOnly:o}=t;return D("calcite-input-time-picker",{afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterComponentCreateOrUpdate,class:i,"data-date-part":"time","data-element-id":t[S],key:`${n}-time-input`,onblur:()=>{this._focusedFieldInput=null},onfocus:this._onComponentFocus,overlayPositioning:"fixed",readOnly:o,value:e.value===g?"":e.value?String(e.value):"",onCalciteInputTimePickerChange:t=>this._saveValueFromDateComponent(e,t.currentTarget)})}_renderTimestampOffsetFieldComponents(e,t){const{class:i,key:n,readOnly:o}=t,{rawMax:a,rawMin:s}=e.range,r=w(a),l=w(s),d=w(e.value===g?"":e.value),p=e.includeTimeOffset,u={afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterComponentCreateOrUpdate,overlayPositioning:"fixed",readOnly:o,[S]:t[S],onfocus:this._onComponentFocus};return D("div",{class:h.dateInputContainer,key:`${n}-date-time-container`},D("calcite-input-date-picker",{...u,class:i,"data-date-part":"date",key:`${n}-date-input`,max:r?.date??void 0,min:l?.date??void 0,onblur:()=>{this._focusedFieldInput=null},value:d.date??"",onCalciteInputDatePickerChange:t=>this._saveValueFromDateComponent(e,t.target)}),D("calcite-input-time-picker",{...u,class:i,"data-date-part":"time",key:`${n}-time-input`,onblur:()=>{this._focusedFieldInput=null},value:d.time??"",onCalciteInputTimePickerChange:t=>this._saveValueFromDateComponent(e,t.target)}),p?D("calcite-input-time-zone",{...u,class:i,clearable:e.value===g||null==e.value,"data-date-part":"timeZone",key:`${n}-timezone-input`,onblur:()=>{this._focusedFieldInput=null},value:d.timeZoneOffset||"",onCalciteInputTimeZoneChange:t=>this._saveValueFromDateComponent(e,t.target)}):null)}_renderDateFieldComponents(e,t){const{class:i,key:n,readOnly:o,min:a,max:s}=t,r=e.effectiveTimeZone,l=I(e.value===g?"":e.value,r),d=I(s,r),p=I(a,r),u=e.includeTime,m={afterCreate:this._afterDateComponentCreate,afterUpdate:this._afterComponentCreateOrUpdate,overlayPositioning:"fixed",readOnly:o,[S]:t[S],onfocus:this._onComponentFocus};return D("div",{class:h.dateInputContainer,key:`${n}-date-time-container`},D("calcite-input-date-picker",{...m,class:i,"data-date-part":"date",key:`${n}-date-input`,max:d?.date??void 0,min:p?.date??void 0,onblur:()=>{this._focusedFieldInput=null},value:l.date??"",onCalciteInputDatePickerChange:t=>this._saveValueFromDateComponent(e,t.target)}),u?D("calcite-input-time-picker",{...m,"data-date-part":"time",key:`${n}-time-input`,onblur:()=>{this._focusedFieldInput=null},step:1,value:l.time??"",onCalciteInputTimePickerChange:t=>{this._saveValueFromDateComponent(e,t.target)}}):null)}_renderTextComponent(e){const{elementId:t}=e.template;return D("div",{class:h.textElementInput,"data-testid":`text-element-${t}`,innerHTML:e.text,key:`text-element-${t}`})}getCommonInputProps(e){const{template:t,valid:i,value:n,minLength:o,maxLength:a,required:s,fieldName:r,editable:l,userHasChangedValue:d,range:{max:p,min:u}}=e,m=!l||this.readOnly,c=!m&&this._effectiveDisabled;let v=t.hint??void 0,f=!1;return n===g&&(v=this.messages.differentValuesPlaceholder,f=!0),{afterCreate:this._afterComponentCreateOrUpdate,afterUpdate:this._afterComponentCreateOrUpdate,"aria-invalid":i?"false":"true",class:this.classes(h.fieldInput,m?h.inputDisabled:null),status:!d&&!this.viewModel.submitHasBeenAttempted||i?"idle":"invalid",maxLength:a&&a>-1?a:void 0,minLength:o&&o>-1?o:void 0,key:t.elementId,label:r,name:r,max:null!=p?p:void 0,min:null!=u?u:void 0,disabled:c,readOnly:m,onblur:this._onComponentBlur,required:s,placeholder:v,value:f?"":n??"",[S]:t.elementId,onfocus:this._onComponentFocus}}_onFormSubmit(e){e.preventDefault()}_getFieldInputFromHTMLElement(e){return this.viewModel.findFieldInput(e.getAttribute(S))}_afterRadioGroupCreateOrUpdate(e){const t=e.selectedItem,i=e.querySelector("calcite-radio-button"),n=t||i;n&&this._afterComponentCreateOrUpdate(n)}_onComponentFocus(e){const t=e.target,i=this._getFieldInputFromHTMLElement(t);this._touchedInputs.add(i.template.elementId),this._focusedFieldInput=i}_afterComponentCreateOrUpdate(e){const t=this._getFieldInputFromHTMLElement(e),i=this._focusedFieldInput;this._attemptFocusOnNextRender&&i===t&&(this._attemptFocusOnNextRender=!1,U(e))}_onComponentBlur(){this._focusedFieldInput=null}_parseValue(e,t){if(m(t.template,"switch")){if("calcite-dropdown"===e.localName&&t.domain)for(const i of t.domain.codedValues)if(i.name===e.selectedItems[0].textContent)return i.code;return e.checked?t.template.input.onValue:t.template.input.offValue}const i=e.value;return null==i||""===i?null:"number"===t.dataType?"-0"===i||"-0."===i||"-0,"===i?i:parseFloat(i):"date"===t.field.type?parseFloat(i):i}_saveInput(e){const t=this._getFieldInputFromHTMLElement(e),{elementId:n}=t.template;if(!t)return;const o=t?.value;if(m(t.template,"switch")&&"single"!==this.viewModel.mode){const e=i(this._batchSwitchInputInitialValues,t,()=>t.value);this._batchSwitchInputInitialValues.set(t,null===e?o:e)}const a=this._parseValue(e,t);a!==o&&this.viewModel.setValue(n,a)}_afterDateComponentCreate(e){this._setDateTimeTimeZoneMap(e),this._afterComponentCreateOrUpdate(e)}_saveValueFromDateComponent(e,t){const{elementId:i}=e.template,n=e.field.type,o=this._dateComponentMap.get(`${i}`);if(!o)return;const a=e.effectiveTimeZone;let s=e.value===g?void 0:e.value,r=null;"date-only"===n?r=Array.isArray(t.value)?t.value[0]:t.value:"time-only"===n?(s=x(s),r=x(t.value)):r="timestamp-offset"===n?null!=t.value?M({dateComponent:o.date,timeComponent:o.time,oldValue:s,timeZoneComponent:o.timeZone,defaultTimeZone:a}):null:null!=t.value?k({oldValue:s,dateComponent:o.date,timeZone:a,timeComponent:o.time?.value===g?void 0:o.time}):null,s!==r&&(null!==r&&t.value?this.viewModel.setValue(`${i}`,r):this.viewModel.setValue(`${i}`,null))}};e([a()],R.prototype,"activeFeatureIndex",null),e([a()],R.prototype,"disabled",null),e([a()],R.prototype,"_effectiveDisabled",null),e([a()],R.prototype,"features",null),e([a()],R.prototype,"map",null),e([a()],R.prototype,"maximumFeatureCount",null),e([a()],R.prototype,"maximumFeatureCountWithComplexForms",null),e([a()],R.prototype,"spatialReference",null),e([a()],R.prototype,"layerInfos",null),e([a()],R.prototype,"timeZone",null),e([a()],R.prototype,"headingLevel",void 0),e([a()],R.prototype,"icon",null),e([a(),T("esri/t9n/common")],R.prototype,"messagesCommon",void 0),e([a(),T("esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm")],R.prototype,"messages",void 0),e([a(),T("esri/widgets/FeatureForm/t9n/FeatureForm")],R.prototype,"featureFormMessages",void 0),e([a()],R.prototype,"readOnly",null),e([a()],R.prototype,"valid",null),e([a({type:c}),V(["value-change","submit"])],R.prototype,"viewModel",void 0),e([a({type:v,nonNullable:!0})],R.prototype,"visibleElements",void 0),e([a()],R.prototype,"groupDisplay",void 0),R=e([s("esri.widgets.BatchAttributeForm")],R);const B=R;export{B 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/5.0/esri/copyright.txt for details.
4
4
  */
5
- import{__decorate as e}from"tslib";import t from"../../Graphic.js";import a from"../../core/Error.js";import{makeHandle as i,handlesGroup as r,abortHandle as s}from"../../core/handleUtils.js";import"../../core/has.js";import n from"../../core/Logger.js";import{removeMaybe as o,destroyMaybe as l}from"../../core/maybe.js";import{debounce as d,isPromiseLike as c}from"../../core/promiseUtils.js";import{watch as u,when as h,initial as p,whenOnce as m,syncAndInitial as f}from"../../core/reactiveUtils.js";import{generateBracedUUID as w}from"../../core/uuid.js";import{property as g,subclass as y}from"../../core/accessorSupport/decorators.js";import{isSharedTemplateOrMetadata as v,isSharedTemplate as _,isStandardFeatureTemplate as F}from"../../editing/templateUtils.js";import b from"../../layers/GraphicsLayer.js";import{isTable as M}from"../../layers/support/layerUtils.js";import{isNumber as I}from"../../support/guards.js";import{getDisplayedSymbol as V}from"../../symbols/support/symbolUtils.js";import{getDrawHelpMessage as k}from"../../views/draw/support/helpMessageUtils.js";import S from"../../views/draw/support/HighlightHelper.js";import A from"../../views/interactive/sketch/SketchOptions.js";import C from"../../views/interactive/snapping/FeatureSnappingLayerSource.js";import{temporaryHighlightName as P}from"../../views/support/HighlightDefaults.js";import T from"./CreateFeaturesWorkflowData.js";import{isModelUpload as E,handleModelUpload as H}from"./modelUploadUtils.js";import U from"./Workflow.js";import{createToolFromGeometryType as L,findEditorItemForLayer as j,getServiceEditsFromWorkflowData as x,getServiceInfoForLayer as O,orderEditsByRelationshipDependencies as z,getFullTemplateForCreationInfo as W,getServiceLayersById as D,startCreatingNewFeature as R,findLayerInfo as G,updateGraphicSymbolWhenRequired as N,isTerminalUpdateEventType as K,getVisualVariableAttributes as Z,startUpdatingFeatureGeometry as q,createWorkflowSteps as B,avoidFeatureTemplateSelectionWithOnlyOneItem as J,getCreationAttributes as Q,setUpSketchCreateWatchers as X,setRelationshipFields as Y,prepareAttachmentsForCreateFeaturesWorkflow as $,showProgressCursor as ee,setVisualVariablesAndElevationInfoForUpdate as te,visualVariableInteractiveUpdate as ae}from"./workflowUtils.js";import ie from"../FeatureForm/FeatureFormViewModel.js";import re from"../Sketch/SketchViewModel.js";var se;const ne=Symbol(),oe=Symbol(),le=Symbol(),de=Symbol(),ce={point:["point"],multipoint:["multipoint"],polygon:["polygon","freehandPolygon","rectangle","circle"],polyline:["polyline","freehandPolyline"],mesh:[],multipatch:[]};let ue=se=class extends U{constructor(e){super(e),this.type="create-features",this.createFeatureState="create-new",this.data=void 0,this.isNested=!1,this._getDrawMeshHelpMessage=void 0,this._webStyleCache=new Map,this._featureFormHandle=null,this._visualVariableAttributes={rotation:null,size:null},this._formViewModel=new ie,this._sketchLayer=null,this._sketchViewModel=null,this._attachmentFileInfos=new Map,this._isActive=!0}initialize(){this.isNested&&(this._isActive=!1),this._initializeSketchViewModel()}destroy(){this._sketchViewModel.destroy()}get allowSave(){return!this.updating}get formViewModel(){return this._formViewModel}get hasInvalidFormTemplate(){return!!this.data.editorItem?.hasInvalidFormTemplate}get hasPendingEdits(){if(this.pendingFeatures.some(e=>!!this.data.getEditsForPendingFeature(e)?.modified))return!0;const{creationInfo:e,upload:t}=this.data,{activeComponent:a,createGraphic:i}=this._sketchViewModel,r=i?.geometry?.type;return!("polyline"!==r&&"polygon"!==r&&"multipoint"!==r||"draw-2d"!==a?.type&&"draw-3d"!==a?.type)&&a.drawOperation.committedVertices.length>0||(!(!t||"pending"!==t.state&&"success"!==t.state)||!!e?.geometryToPlace)}get hasPreviousStep(){return this._stepIndex>0||"update-pending"===this.createFeatureState&&!!this.data.selectedPendingFeature&&!this.parent&&!E(this.data.creationInfo)}get helpMessage(){const{creationInfo:e,viewModel:t}=this.data;if("creating-features"!==this.stepId||!e)return;const{_sketchViewModel:a}=this,i=e.layer.geometryType,r=a.createGraphic;if("mesh"===i){this._getDrawMeshHelpMessage||import("../../views/draw/support/helpMessageUtils3d.js").then(e=>{this._getDrawMeshHelpMessage=e.getDrawMeshHelpMessage});const{view:e}=t;return"3d"===e?.type?this._getDrawMeshHelpMessage?.(r,e):void 0}const{activeCreateToolDrawMode:s,activeTool:n}=a;return k("rectangle"===n||"circle"===n?n:i,r?.geometry,s)}get layer(){return this.data.creationInfo?.layer}get numPendingFeatures(){return this.pendingFeatures.length}get numPendingFeaturesExcludingHidden(){return this.pendingFeatures.filter(e=>this.data.isDisplayable(e)).length}get parent(){return this.data.parent}get pendingFeatures(){return this.data.pendingFeatures}get keyboardCancellationEnabled(){return 0===this.numPendingFeatures}get reliesOnOwnerAdminPrivileges(){return this.data.editorItem?.capabilities.create.reliesOnOwnerAdminPrivileges??!1}get saveActionLabel(){return"create"}get shouldShowAttachments(){return(this.data.selectedPendingFeature&&this.data.editorItem?.capabilities.create.attachments.enabled)??!1}get shouldAllowAttachmentEditing(){return this.shouldShowAttachments}get sketchViewModel(){return this._sketchViewModel}get test(){}get availableCreateTools(){const e=this.data.creationInfo?.layer.geometryType,t=this.data.viewModel.view;if(!e)return[];if(this.data.creationInfo?.maxFeatures&&this.data.creationInfo.maxFeatures<=this.numPendingFeatures)return[];if(v(this.data.fullTemplate)){const{tool:t}=L(e,this.data.fullTemplate);return[t]}return"2d"!==t?.type&&"multipoint"===e?[]:[...ce[e]]}get _attachmentsActive(){const e=this.data.viewModel.attachmentsViewModel.mode,t=this.stepId;return this.shouldShowAttachments&&("add"===e||"edit"===e||"adding-attachment"===t||"editing-attachment"===t)}async enter(){this._isActive=!0,"awaiting-feature-creation-info"!==this.stepId&&await this._updatingHandles.addPromise(this._setUpCreatingFeaturesStep())}exit(){this._isActive=!1,this.removeHandles([le])}async updatePendingFeature(e){if(e!==this.data.selectedPendingFeature)return this._sketchViewModel.cancel(),this._startUpdating({feature:e})}async start(){return await super.start(),M(this.data.creationInfo?.layer)?null:{enter:async()=>{},exit:async()=>{},viewModel:this._sketchViewModel}}async save(){const{formViewModel:e}=this;if(e.pendingSubtypeChoice)return;e.submit(),this._stashValidationState();const t=this.data.selectedPendingFeature,a=this._hasValidationErrors(t)?t:this.data.pendingFeatures.find(e=>this._hasValidationErrors(e));return a?(await this._startUpdating({feature:a}),void e?.submit()):super.save()}back(e){return"update-pending"!==this.createFeatureState||!this.data.selectedPendingFeature||E(this.data.creationInfo)||this._attachmentsActive||this.parent?super.back(e):this._clearSelectedFeature()}previous(e){return"update-pending"!==this.createFeatureState||!this.data.selectedPendingFeature||E(this.data.creationInfo)||this._attachmentsActive?super.previous(e):this._clearSelectedFeature()}cancelFeature(e){this.data.isSharedTemplateWorkflow?n.getLogger(this).warn("Cannot cancel individual features created by shared templates."):(this.data.removePendingFeature(e),this.sketchViewModel.removeGraphic(e))}static create(e){const{addAttachmentsCallback:t,applyEdits:a,applyEditsFeatureService:i,isNested:r,creationInfo:s,parent:n,snappingManager:o,startAt:l,viewModel:d}=e,c=e.sketchOptions??new A,u=s?.layer,h=u?j(d.editorItems,u):void 0,p=new se({data:new T({creationInfo:s,editorItem:h,parent:n,sketchOptions:c,snappingManager:o,viewModel:d}),isNested:r,onCommit:async e=>{const{creationInfo:r}=e;if(!r)return;p._sketchViewModel.cancel();const s=e.pendingFeatures.toArray(),{layer:n}=r,o=n.capabilities?.editing.supportsGlobalId&&"globalIdField"in n,l=p._attachmentFileInfos,{fullTemplate:c}=e,u=x(p.data),h=_(c)&&u;if(o){if(fe(s),h){let t=ge(u,l);const a=await(O(n,d.view)?.load());a&&(t=z({edits:t,serviceInfo:a,view:d.view,findOriginalFeature:t=>e.getEditsForPendingFeature(t)?.initialFeature??t})),await i(c.featureService,t,{globalIdUsed:!0,gdbVersion:c.layer.gdbVersion??void 0})}else{const e=we(s,l);await a(n,e,{globalIdUsed:!0})}return}const m=h?await i(c.featureService,u,{gdbVersion:c.layer.gdbVersion??void 0}):[await a(n,{addFeatures:s})];m&&l.size>0&&await Promise.all(m.map(e=>{if(e?.addFeatureResults)return t(n,me(s,e.addFeatureResults,n,l))}))}});return p._set("steps",this._createWorkflowSteps(p,l)),p}_fadeExistingFeatures(e){if("effect"in e){const t=e.effect;return e.effect="saturate(0.6) opacity(0.8)",i(()=>e.effect=t)}const t=e.opacity;return e.opacity=.7,i(()=>e.opacity=t)}async _initializeFullTemplateAndExecutorInfo(e){const{creationInfo:t}=e,{view:a}=e.viewModel;if(!t||!a)return null;const i=await W(t,a);if(e.fullTemplate=i,i&&_(i)){const{createTemplateExecutor:r}=await import("../../editing/sharedTemplates/executor/createTemplateExecutor.js"),s={completionResults:[],executor:await r(i),serviceLayersById:D(t.layer,a)};e.templateExecutorInfo=s}return i}async _startCreating(){this.removeHandles(oe);const{data:e}=this;if(!e.creationInfo)return;const t=this.data.creationInfo?.maxFeatures;if(t&&this.numPendingFeatures>=t)return this.sketchViewModel.cancel(),void(this.numPendingFeatures&&await this._startUpdating({feature:this.pendingFeatures.at(-1)}));this.createFeatureState="create-new",await R(this._sketchViewModel,this._sketchLayer,e,this._webStyleCache)}async _clearSelectedFeature(){const e=this._formViewModel.pendingSubtypeChoice;e&&(e.resolve("undo"),await e.promise),this._stashValidationState(),this.sketchViewModel.cancel(),this.data.selectedPendingFeature=null,this._featureFormHandle=o(this._featureFormHandle),this._formViewModel.feature=null;const t=this.data.viewModel.attachmentsViewModel;"add"!==t.mode&&"edit"!==t.mode||await(this.data.viewModel.activeWorkflow?.previous())}_stashValidationState(){const e=this._formViewModel.feature,t=e&&this.data.getEditsForPendingFeature(e);t&&(t.submittable=this._formViewModel.submittable)}async _selectFeatureForUpdate({feature:e,initialFeature:t=e}){this._stashValidationState();const{data:a,pendingFeatures:i,_webStyleCache:s}=this;i.includes(e)||a.addPendingFeature(e,t),a.selectedPendingFeature=e;const{_formViewModel:n,_sketchViewModel:l}=this,{creationInfo:d,viewModel:c}=a,{attachmentsViewModel:h,layerInfos:p,view:m}=c;if(!m||!d)return;o(this._featureFormHandle);const f=e.sourceLayer,w=G(p,f),g=w?.formTemplate,y=m.spatialReference;n.set({editType:"INSERT",feature:e,formTemplate:g,spatialReference:y,map:m.map}),"add"!==h.mode&&"edit"!==h.mode||await(c.activeWorkflow?.previous()),h.graphic=e,h.fileInfos.removeAll(),h.mode="view";(this._attachmentFileInfos.get(e)||[]).forEach(({file:e,form:t})=>h.addFile(e,t)),await N(e,s,"2d"===m.type?m.scale:null);const v=a.getEditsForPendingFeature(e);this._featureFormHandle=r([n.on("value-change",async({fieldName:t,value:a})=>{if(v?.updateAttributes(n.getValues()),I(a)){const e=this._visualVariableAttributes;e.size&&!e.size.isUpdatingInteractively&&t===e.size.field&&e.size.setInitialValue(a),e.rotation&&!e.rotation.isUpdatingInteractively&&t===e.rotation.field&&e.rotation.setInitialValue(a)}await N(e,s,"2d"===m.type?m.scale:null)}),l.on(["update","undo","redo"],e=>{("undo"===e.type||"redo"===e.type||"update"===e.type&&null!=e.toolEventInfo&&K(e.toolEventInfo.type))&&n.notifyFeatureGeometryChanged()}),u(()=>n.feature?.sourceLayer,t=>e.sourceLayer=t),u(()=>[n.feature,n.submittable],()=>this._stashValidationState())]),this.createFeatureState="update-pending"}async _startUpdating({feature:e,initialFeature:t=e}){await this._selectFeatureForUpdate({feature:e,initialFeature:t});const{_sketchLayer:a,_sketchViewModel:i,data:r}=this,{creationInfo:s,viewModel:n}=r,{view:o}=n;if(!o||!s)return;const l=e.sourceLayer??s.layer;return M(l)?void 0:(this._visualVariableAttributes=Z(e),q({graphic:e,sketchLayer:a,sketchViewModel:i,sourceLayer:l,visualVariables:this._visualVariableAttributes,webStyleCache:this._webStyleCache}))}static _createWorkflowSteps(e,t="awaiting-feature-creation-info"){const{data:a}=e,i=B(["awaiting-feature-creation-info","creating-features","adding-attachment","editing-attachment"],t,{"awaiting-feature-creation-info":()=>({id:"awaiting-feature-creation-info",async setUp(){const{creationInfo:t,viewModel:i}=a,{view:r}=i;r&&(E(t)?e.addHandles(await H({view:r,data:a,next:()=>e.next(),cancel:()=>i.cancelWorkflow({warnIfNoWorkflow:!1})}),this.id):(a.parent&&t&&e.addHandles(i.restrictFeatureTemplatesViewModelToLayer(t.layer),this.id),e.addHandles(i.featureTemplatesViewModel.on("select",({item:t})=>{t&&(a.creationInfo={...a.creationInfo,layer:t.layer,template:t.template},e.next())}),this.id)))},async tearDown(){e.removeHandles(this.id)}}),"creating-features":()=>({id:"creating-features",async setUp(){e._isActive&&await e._setUpCreatingFeaturesStep()},async tearDown(t){const{viewModel:i}=a;t.canceled&&(e.removeHandles([le,ne,oe,de]),i.attachmentsViewModel.fileInfos.removeAll(),e._attachmentFileInfos.clear())}}),"adding-attachment":()=>({id:"adding-attachment",parent:"creating-features",async setUp(){},async tearDown(){const{attachmentsViewModel:t}=a.viewModel,{graphic:i,fileInfos:r}=t;e._attachmentFileInfos.set(i,r.toArray()),t.mode="view"}}),"editing-attachment":()=>({id:"editing-attachment",parent:"creating-features",async setUp(){},async tearDown(){const{attachmentsViewModel:t}=a.viewModel,{graphic:i,fileInfos:r}=t;e._attachmentFileInfos.set(i,r.toArray()),t.mode="view"}})});return J(a,i)}static _configureSketchViewModel(e){const{data:t,_sketchLayer:a,_sketchViewModel:s,_webStyleCache:n}=e,{creationInfo:o,viewModel:l}=t,{view:c}=l,p=[];if(!c)return i();if("2d"===c.type){o&&p.push(e._fadeExistingFeatures(o.layer));const t=d((e,t)=>Promise.all(e.map(e=>N(e,n,t))));p.push(u(()=>c.scale,e=>t(a.graphics,e)))}const m=Q(t.fullTemplate,o?.attributeOverrides),f=u(()=>s.createGraphic,a=>{a&&!e.hasHandles(oe)&&e._updatingHandles.addPromise(X({creationAttributes:m,data:t,sketchViewModel:s,view:c,webStyleCache:n}).then(t=>e.addHandles(t,oe)))}),w=async t=>{if("cancel"!==t.state&&"complete"!==t.state||e.removeHandles(oe),"cancel"===t.state&&null!==c.activeTool&&c.activeTool!==e.sketchViewModel.activeComponent&&(await e._waitForActiveToolCleared(),await e._startCreating()),"complete"===t.state&&t.graphic){const a=await e._processEdits(t.graphic,{scale:"2d"===c.type?c.scale:null,useSourceLayer:!0,webStyleCache:e._webStyleCache});a&&(await e._waitForActiveToolCleared(),await e._startUpdating({feature:a}))}},g=async i=>{const{attachmentsViewModel:r}=l,{_formViewModel:n}=e;if(i.graphics.length>1)return void await e._clearSelectedFeature();const d=i.graphics[0];if("complete"===i.state){const{submittable:t}=n;if(e.numPendingFeatures!==o?.maxFeatures&&t||n.submit(),await e._clearSelectedFeature(),"add"!==r.mode&&"edit"!==r.mode||await(l.activeWorkflow?.previous()),!i.aborted&&c.activeTool===e.sketchViewModel.activeComponent&&(await e.sketchViewModel.wait(),"ready"===e.sketchViewModel.state&&"mesh"!==e.data.creationInfo?.layer.geometryType))return e._startCreating()}else{if("start"===i.state)return d.sourceLayer??=t.creationInfo?.layer,await te({graphic:d,sketchLayer:a,sketchViewModel:s,visualVariables:e._visualVariableAttributes,webStyleCache:e._webStyleCache,sourceLayer:d.sourceLayer}),e._selectFeatureForUpdate({feature:d});if("active"===i.state){await e.updatePendingFeature(d);const t=e._visualVariableAttributes;ae(c,d,i,t)&&await N(d,e._webStyleCache,"2d"===c.type?c.scale:null);const a=d.attributes,{rotation:r,size:s}=t;if(null!=r){const{field:e}=r;n.setValue(e,a[e])}if(null!=s){const{field:e}=s;n.setValue(e,a[e])}}}},y=async a=>{if(a.graphics.forEach(e=>{t.removePendingFeature(e)}),!E(t.creationInfo))return e._startCreating()},v=async()=>{if(E(t.creationInfo))try{await e.data.viewModel.back()}catch{}return e._startCreating()};p.push(f,s.on("create",t=>e._updatingHandles.addPromise(w(t))),s.on("update",t=>e._updatingHandles.addPromise(g(t))),s.on("delete",t=>e._updatingHandles.addPromise(y(t))),h(()=>!e.numPendingFeatures,()=>e._updatingHandles.addPromise(v())),i(()=>{s.cancel()}),he(s,a,t),...pe(t));const _=r(p);return s.addHandles(_),_}_initializeSketchViewModel(){const{data:e}=this,{view:t}=e.viewModel,a=new b({elevationInfo:e.creationInfo?.layer.elevationInfo,internal:!0,listMode:"hide",title:"createFeaturesWorkflow-internal"}),r=new re({layer:a,creationMode:"single",sketchOptions:e.sketchOptions,snappingManager:e.snappingManager,updateOnGraphicClick:!1,defaultUpdateOptions:{multipleSelectionEnabled:!1},view:t});this._sketchLayer=a,this._sketchViewModel=r,t?.map.add(a),this.addHandles([i(()=>{t?.destroyed||t?.map.remove(a),a.destroy()}),u(()=>this.numPendingFeatures>0,e=>this._sketchViewModel.updateOnGraphicClick=e,p)])}_hasValidationErrors(e){return!!e&&(!this.data.isSubmittable(e)||!!this._formViewModel.validateContingencyConstraints(e.attributes,{includeIncompleteViolations:!0})?.length)}async _processEdits(e,t){const{data:a,_formViewModel:i,_sketchLayer:r}=this,{layerInfos:s,view:n}=a.viewModel;i.editType="INSERT",i.map=n?.map,i.spatialReference=n?.spatialReference;const{templateExecutorInfo:o}=a;if(!o){const t=e.clone();return t.geometry=null,await this._addAndInitializeEdits(e,t),e}r.remove(e);const{executor:l}=o,d=l(e.geometry,"completion"),u=c(d)?await d:d;o.completionResults.push(u),Y(u.relationships),i.editType="INSERT",i.map=n?.map,i.spatialReference=n?.spatialReference,u.primary&&a.creationInfo?.attributeOverrides&&(u.primary.graphic.attributes={...u.primary.graphic.attributes,...a.creationInfo.attributeOverrides});for(const c of u.edits){let e=null;if(c.addFeatures)for(const a of c.addFeatures){const i=a.clone();i.geometry=null,null!=a.geometry&&(a.symbol=await V(a,t),r.add(a)),a.sourceLayer!==e?.layer&&(e=G(s,a.sourceLayer));const n=!!u.associationGraphics?.has(a);await this._addAndInitializeEdits(a,i,e,n)}}i.feature=null,await m(()=>!i.updating);return u.edits.reduce((e,t)=>e+(t.addFeatures?.length??0),0)>1?null:u.primary?.graphic}async _addAndInitializeEdits(e,t,a,i=!1){const{data:r,_formViewModel:s}=this,{layerInfos:n}=r.viewModel,o=r.addPendingFeature(e,t,{isAssociation:i});a??=G(n,e.sourceLayer),s.feature=e,s.formTemplate=a?.formTemplate,await m(()=>!s.updating),o.updateAttributes(s.getValues()),o.submittable=s.submittable}async _setUpCreatingFeaturesStep(){if(this.hasHandles(le))return;const{data:e,sketchViewModel:s}=this,{creationInfo:n,viewModel:l}=e,{attachmentsViewModel:d,view:c}=l;if(!c||!n?.layer)throw new a("missing-parameters","CreateFeaturesWorkflow requires a view and creationInfo.");const{initialFeature:h,layer:m}=n,f=[],w=[];this._featureFormHandle=o(this._featureFormHandle),this._visualVariableAttributes={rotation:null,size:null},e.editorItem=j(l.editorItems,n.layer),n.template&&(null==e.fullTemplate&&await this._initializeFullTemplateAndExecutorInfo(e),w.push(i(()=>{e.templateExecutorInfo&&(e.templateExecutorInfo.completionResults=[])}))),s.allowDeleteKey=!e.isSharedTemplateWorkflow,$(d),f.push(u(()=>d.mode,e=>{switch(e){case"add":this.go("adding-attachment");break;case"edit":this.go("editing-attachment")}}));const g=ee(c);f.push(g);const y=M(n.layer),{template:_}=n,b=!_||F(_)||v(_)&&"feature"===_.type,I=y&&b;try{if(I){const a=h??new t({attributes:Q(e.fullTemplate,n.attributeOverrides),sourceLayer:m}),i=await this._processEdits(a);i&&await this._startUpdating({feature:i})}else f.push(se._configureSketchViewModel(this)),h?(E(n)&&n.geometryToPlace&&(h.attributes=Q(e.fullTemplate,n.attributeOverrides)),s.addGraphic(h),await this._startUpdating({feature:h})):await this._startCreating()}finally{g.remove()}const V=i(()=>{for(const t of e.pendingFeatures)s.removeGraphic(t),e.removePendingFeature(t)}),k=u(()=>c?.timeZone,e=>{this._formViewModel.timeZone=e,this.data.timeZone=e},p),S=i(()=>{E(n)&&l.cancelWorkflow({warnIfNoWorkflow:!1})});this._featureFormHandle&&f.push(this._featureFormHandle),this.addHandles(f,this._handleKeys.beforeCommit),this.addHandles(w,this._handleKeys.afterCommit),this.addHandles([i(()=>d.fileInfos.removeAll()),r(f),r(w),S,V,k],le)}async _waitForActiveToolCleared(){const e=this.data.viewModel.view;if(null==e?.activeTool)return;const t=new AbortController;this.addHandles(s(t),de),await m(()=>null==e?.activeTool,t.signal),t.abort()}};function he(e,t,a){let s=null;const n=()=>e.snappingOptions.featureSources,o=()=>(s=new C({layer:t}),n().add(s),s),d=()=>{null!=s&&(n().remove(s),s=l(s))};return r([u(()=>{const e=a.creationInfo?.layer,t=n().find(t=>t.layer===e);return{hasFeatureLayerSource:!!t,enabled:t?.enabled??!1}},({hasFeatureLayerSource:e,enabled:t})=>{if(!e)return d();s??=o(),s.enabled=t},f),i(d)])}function pe(e){const t=e.viewModel.view;if(!t)return[];const a=[];if("3d"===t.type){const r=new S({view:t});a.push(u(()=>e.selectedPendingFeature,(e,t)=>{r.remove(e),r.add(t)}),i(()=>r.destroy()))}const r=new S({view:t,highlightName:P});return a.push(u(()=>e.temporaryHighlightFeature,e=>{r.removeAll(),r.add(e)}),i(()=>r.destroy())),a}function me(e,t,a,i){const r=[];return t.forEach((t,s)=>{if(!t.error){const n=e[s],o=i.get(n)||[];n.attributes[a.objectIdField]=t.objectId,o.forEach(({form:e})=>r.push({feature:n,attachment:e}))}}),r}function fe(e){for(const t of e){const{sourceLayer:e}=t;e&&"globalIdField"in e&&null!=e.globalIdField&&(t.attributes[e.globalIdField]??=w())}}function we(e,t){const a=[];if(!t||0===t.size)return{addFeatures:e};for(const[i,r]of t)for(const{file:e}of r)a.push({feature:i,attachment:{globalId:w(),data:e}});return a.length?{addFeatures:e,addAttachments:a}:{addFeatures:e}}function ge(e,t){return e.map(e=>{const{addFeatures:a}=e;if(!a||0===a.length)return e;const i=[];for(const r of a){const e=t.get(r);if(e)for(const{file:t}of e)i.push({feature:r,attachment:{globalId:w(),data:t}})}return i.length?{...e,addAttachments:i}:e})}e([g()],ue.prototype,"allowSave",null),e([g()],ue.prototype,"createFeatureState",void 0),e([g()],ue.prototype,"data",void 0),e([g({constructOnly:!0})],ue.prototype,"isNested",void 0),e([g()],ue.prototype,"formViewModel",null),e([g()],ue.prototype,"hasInvalidFormTemplate",null),e([g()],ue.prototype,"hasPendingEdits",null),e([g()],ue.prototype,"hasPreviousStep",null),e([g()],ue.prototype,"_getDrawMeshHelpMessage",void 0),e([g()],ue.prototype,"helpMessage",null),e([g()],ue.prototype,"layer",null),e([g()],ue.prototype,"parent",null),e([g()],ue.prototype,"keyboardCancellationEnabled",null),e([g()],ue.prototype,"reliesOnOwnerAdminPrivileges",null),e([g()],ue.prototype,"saveActionLabel",null),e([g()],ue.prototype,"shouldShowAttachments",null),e([g()],ue.prototype,"shouldAllowAttachmentEditing",null),e([g()],ue.prototype,"sketchViewModel",null),e([g()],ue.prototype,"availableCreateTools",null),e([g()],ue.prototype,"_attachmentsActive",null),ue=se=e([y("esri.widgets.Editor.CreateFeaturesWorkflow")],ue);const ye=ue;export{ye as default};
5
+ import{__decorate as e}from"tslib";import t from"../../Graphic.js";import a from"../../core/Error.js";import{makeHandle as i,handlesGroup as r,abortHandle as s}from"../../core/handleUtils.js";import"../../core/has.js";import n from"../../core/Logger.js";import{removeMaybe as o,destroyMaybe as l}from"../../core/maybe.js";import{debounce as d,isPromiseLike as c}from"../../core/promiseUtils.js";import{watch as u,when as h,initial as p,whenOnce as m,syncAndInitial as f}from"../../core/reactiveUtils.js";import{generateBracedUUID as w}from"../../core/uuid.js";import{property as g,subclass as y}from"../../core/accessorSupport/decorators.js";import{isSharedTemplateOrMetadata as v,isSharedTemplate as _,getCreationAttributes as F,isStandardFeatureTemplate as b}from"../../editing/templateUtils.js";import{getFullTemplate as M}from"../../editing/sharedTemplates/templateLoader.js";import I from"../../layers/GraphicsLayer.js";import{isTable as V}from"../../layers/support/layerUtils.js";import{isNumber as k}from"../../support/guards.js";import{getDisplayedSymbol as S}from"../../symbols/support/symbolUtils.js";import{getDrawHelpMessage as A}from"../../views/draw/support/helpMessageUtils.js";import T from"../../views/draw/support/HighlightHelper.js";import C from"../../views/interactive/sketch/SketchOptions.js";import P from"../../views/interactive/snapping/FeatureSnappingLayerSource.js";import{temporaryHighlightName as E}from"../../views/support/HighlightDefaults.js";import H from"./CreateFeaturesWorkflowData.js";import{isModelUpload as L,handleModelUpload as U}from"./modelUploadUtils.js";import j from"./Workflow.js";import{createToolFromGeometryType as x,findEditorItemForLayer as O,getServiceEditsFromWorkflowData as z,getServiceInfoForLayer as W,orderEditsByRelationshipDependencies as D,getServiceLayersById as R,startCreatingNewFeature as G,findLayerInfo as N,updateGraphicSymbolWhenRequired as K,isTerminalUpdateEventType as Z,getVisualVariableAttributes as q,startUpdatingFeatureGeometry as B,createWorkflowSteps as J,avoidFeatureTemplateSelectionWithOnlyOneItem as Q,setUpSketchCreateWatchers as X,setRelationshipFields as Y,prepareAttachmentsForCreateFeaturesWorkflow as $,showProgressCursor as ee,setVisualVariablesAndElevationInfoForUpdate as te,visualVariableInteractiveUpdate as ae}from"./workflowUtils.js";import ie from"../FeatureForm/FeatureFormViewModel.js";import re from"../Sketch/SketchViewModel.js";var se;const ne=Symbol(),oe=Symbol(),le=Symbol(),de=Symbol(),ce={point:["point"],multipoint:["multipoint"],polygon:["polygon","freehandPolygon","rectangle","circle"],polyline:["polyline","freehandPolyline"],mesh:[],multipatch:[]};let ue=se=class extends j{constructor(e){super(e),this.type="create-features",this.createFeatureState="create-new",this.data=void 0,this.isNested=!1,this._getDrawMeshHelpMessage=void 0,this._webStyleCache=new Map,this._featureFormHandle=null,this._visualVariableAttributes={rotation:null,size:null},this._formViewModel=new ie,this._sketchLayer=null,this._sketchViewModel=null,this._attachmentFileInfos=new Map,this._isActive=!0}initialize(){this.isNested&&(this._isActive=!1),this._initializeSketchViewModel()}destroy(){this._sketchViewModel.destroy()}get allowSave(){return!this.updating}get formViewModel(){return this._formViewModel}get hasInvalidFormTemplate(){return!!this.data.editorItem?.hasInvalidFormTemplate}get hasPendingEdits(){if(this.pendingFeatures.some(e=>!!this.data.getEditsForPendingFeature(e)?.modified))return!0;const{creationInfo:e,upload:t}=this.data,{activeComponent:a,createGraphic:i}=this._sketchViewModel,r=i?.geometry?.type;return!("polyline"!==r&&"polygon"!==r&&"multipoint"!==r||"draw-2d"!==a?.type&&"draw-3d"!==a?.type)&&a.drawOperation.committedVertices.length>0||(!(!t||"pending"!==t.state&&"success"!==t.state)||!!e?.geometryToPlace)}get hasPreviousStep(){return this._stepIndex>0||"update-pending"===this.createFeatureState&&!!this.data.selectedPendingFeature&&!this.parent&&!L(this.data.creationInfo)}get helpMessage(){const{creationInfo:e,viewModel:t}=this.data;if("creating-features"!==this.stepId||!e)return;const{_sketchViewModel:a}=this,i=e.layer.geometryType,r=a.createGraphic;if("mesh"===i){this._getDrawMeshHelpMessage||import("../../views/draw/support/helpMessageUtils3d.js").then(e=>{this._getDrawMeshHelpMessage=e.getDrawMeshHelpMessage});const{view:e}=t;return"3d"===e?.type?this._getDrawMeshHelpMessage?.(r,e):void 0}const{activeCreateToolDrawMode:s,activeTool:n}=a;return A("rectangle"===n||"circle"===n?n:i,r?.geometry,s)}get layer(){return this.data.creationInfo?.layer}get numPendingFeatures(){return this.pendingFeatures.length}get numPendingFeaturesExcludingHidden(){return this.pendingFeatures.filter(e=>this.data.isDisplayable(e)).length}get parent(){return this.data.parent}get pendingFeatures(){return this.data.pendingFeatures}get keyboardCancellationEnabled(){return 0===this.numPendingFeatures}get reliesOnOwnerAdminPrivileges(){return this.data.editorItem?.capabilities.create.reliesOnOwnerAdminPrivileges??!1}get saveActionLabel(){return"create"}get shouldShowAttachments(){return(this.data.selectedPendingFeature&&this.data.editorItem?.capabilities.create.attachments.enabled)??!1}get shouldAllowAttachmentEditing(){return this.shouldShowAttachments}get sketchViewModel(){return this._sketchViewModel}get test(){}get availableCreateTools(){const e=this.data.creationInfo?.layer.geometryType,t=this.data.viewModel.view;if(!e)return[];if(this.data.creationInfo?.maxFeatures&&this.data.creationInfo.maxFeatures<=this.numPendingFeatures)return[];if(v(this.data.fullTemplate)){const{tool:t}=x(e,this.data.fullTemplate);return[t]}return"2d"!==t?.type&&"multipoint"===e?[]:[...ce[e]]}get _attachmentsActive(){const e=this.data.viewModel.attachmentsViewModel.mode,t=this.stepId;return this.shouldShowAttachments&&("add"===e||"edit"===e||"adding-attachment"===t||"editing-attachment"===t)}async enter(){this._isActive=!0,"awaiting-feature-creation-info"!==this.stepId&&await this._updatingHandles.addPromise(this._setUpCreatingFeaturesStep())}exit(){this._isActive=!1,this.removeHandles([le])}async updatePendingFeature(e){if(e!==this.data.selectedPendingFeature)return this._sketchViewModel.cancel(),this._startUpdating({feature:e})}async start(){return await super.start(),V(this.data.creationInfo?.layer)?null:{enter:async()=>{},exit:async()=>{},viewModel:this._sketchViewModel}}async save(){const{formViewModel:e}=this;if(e.pendingSubtypeChoice)return;e.submit(),this._stashValidationState();const t=this.data.selectedPendingFeature,a=this._hasValidationErrors(t)?t:this.data.pendingFeatures.find(e=>this._hasValidationErrors(e));return a?(await this._startUpdating({feature:a}),void e?.submit()):super.save()}back(e){return"update-pending"!==this.createFeatureState||!this.data.selectedPendingFeature||L(this.data.creationInfo)||this._attachmentsActive||this.parent?super.back(e):this._clearSelectedFeature()}previous(e){return"update-pending"!==this.createFeatureState||!this.data.selectedPendingFeature||L(this.data.creationInfo)||this._attachmentsActive?super.previous(e):this._clearSelectedFeature()}cancelFeature(e){this.data.isSharedTemplateWorkflow?n.getLogger(this).warn("Cannot cancel individual features created by shared templates."):(this.data.removePendingFeature(e),this.sketchViewModel.removeGraphic(e))}static create(e){const{addAttachmentsCallback:t,applyEdits:a,applyEditsFeatureService:i,isNested:r,creationInfo:s,parent:n,snappingManager:o,startAt:l,viewModel:d}=e,c=e.sketchOptions??new C,u=s?.layer,h=u?O(d.editorItems,u):void 0,p=new se({data:new H({creationInfo:s,editorItem:h,parent:n,sketchOptions:c,snappingManager:o,viewModel:d}),isNested:r,onCommit:async e=>{const{creationInfo:r}=e;if(!r)return;p._sketchViewModel.cancel();const s=e.pendingFeatures.toArray(),{layer:n}=r,o=n.capabilities?.editing.supportsGlobalId&&"globalIdField"in n,l=p._attachmentFileInfos,{fullTemplate:c}=e,u=z(p.data),h=_(c)&&u;if(o){if(fe(s),h){let t=ge(u,l);const a=await(W(n,d.view)?.load());a&&(t=D({edits:t,serviceInfo:a,view:d.view,findOriginalFeature:t=>e.getEditsForPendingFeature(t)?.initialFeature??t})),await i(c.featureService,t,{globalIdUsed:!0,gdbVersion:c.layer.gdbVersion??void 0})}else{const e=we(s,l);await a(n,e,{globalIdUsed:!0})}return}const m=h?await i(c.featureService,u,{gdbVersion:c.layer.gdbVersion??void 0}):[await a(n,{addFeatures:s})];m&&l.size>0&&await Promise.all(m.map(e=>{if(e?.addFeatureResults)return t(n,me(s,e.addFeatureResults,n,l))}))}});return p._set("steps",this._createWorkflowSteps(p,l)),p}_fadeExistingFeatures(e){if("effect"in e){const t=e.effect;return e.effect="saturate(0.6) opacity(0.8)",i(()=>e.effect=t)}const t=e.opacity;return e.opacity=.7,i(()=>e.opacity=t)}async _initializeFullTemplateAndExecutorInfo(e){const{creationInfo:t}=e,{view:a}=e.viewModel;if(!t||!a)return null;const i=await M(a,t.template);if(e.fullTemplate=i,i&&_(i)){const{createTemplateExecutor:r}=await import("../../editing/sharedTemplates/executor/createTemplateExecutor.js"),s={completionResults:[],executor:await r(i),serviceLayersById:R(t.layer,a)};e.templateExecutorInfo=s}return i}async _startCreating(){this.removeHandles(oe);const{data:e}=this;if(!e.creationInfo)return;const t=this.data.creationInfo?.maxFeatures;if(t&&this.numPendingFeatures>=t)return this.sketchViewModel.cancel(),void(this.numPendingFeatures&&await this._startUpdating({feature:this.pendingFeatures.at(-1)}));this.createFeatureState="create-new",await G(this._sketchViewModel,this._sketchLayer,e,this._webStyleCache)}async _clearSelectedFeature(){const e=this._formViewModel.pendingSubtypeChoice;e&&(e.resolve("undo"),await e.promise),this._stashValidationState(),this.sketchViewModel.cancel(),this.data.selectedPendingFeature=null,this._featureFormHandle=o(this._featureFormHandle),this._formViewModel.feature=null;const t=this.data.viewModel.attachmentsViewModel;"add"!==t.mode&&"edit"!==t.mode||await(this.data.viewModel.activeWorkflow?.previous())}_stashValidationState(){const e=this._formViewModel.feature,t=e&&this.data.getEditsForPendingFeature(e);t&&(t.submittable=this._formViewModel.submittable)}async _selectFeatureForUpdate({feature:e,initialFeature:t=e}){this._stashValidationState();const{data:a,pendingFeatures:i,_webStyleCache:s}=this;i.includes(e)||a.addPendingFeature(e,t),a.selectedPendingFeature=e;const{_formViewModel:n,_sketchViewModel:l}=this,{creationInfo:d,viewModel:c}=a,{attachmentsViewModel:h,layerInfos:p,view:m}=c;if(!m||!d)return;o(this._featureFormHandle);const f=e.sourceLayer,w=N(p,f),g=w?.formTemplate,y=m.spatialReference;n.set({editType:"INSERT",feature:e,formTemplate:g,spatialReference:y,map:m.map}),"add"!==h.mode&&"edit"!==h.mode||await(c.activeWorkflow?.previous()),h.graphic=e,h.fileInfos.removeAll(),h.mode="view";(this._attachmentFileInfos.get(e)||[]).forEach(({file:e,form:t})=>h.addFile(e,t)),await K(e,s,"2d"===m.type?m.scale:null);const v=a.getEditsForPendingFeature(e);this._featureFormHandle=r([n.on("value-change",async({fieldName:t,value:a})=>{if(v?.updateAttributes(n.getValues()),k(a)){const e=this._visualVariableAttributes;e.size&&!e.size.isUpdatingInteractively&&t===e.size.field&&e.size.setInitialValue(a),e.rotation&&!e.rotation.isUpdatingInteractively&&t===e.rotation.field&&e.rotation.setInitialValue(a)}await K(e,s,"2d"===m.type?m.scale:null)}),l.on(["update","undo","redo"],e=>{("undo"===e.type||"redo"===e.type||"update"===e.type&&null!=e.toolEventInfo&&Z(e.toolEventInfo.type))&&n.notifyFeatureGeometryChanged()}),u(()=>n.feature?.sourceLayer,t=>e.sourceLayer=t),u(()=>[n.feature,n.submittable],()=>this._stashValidationState())]),this.createFeatureState="update-pending"}async _startUpdating({feature:e,initialFeature:t=e}){await this._selectFeatureForUpdate({feature:e,initialFeature:t});const{_sketchLayer:a,_sketchViewModel:i,data:r}=this,{creationInfo:s,viewModel:n}=r,{view:o}=n;if(!o||!s)return;const l=e.sourceLayer??s.layer;return V(l)?void 0:(this._visualVariableAttributes=q(e),B({graphic:e,sketchLayer:a,sketchViewModel:i,sourceLayer:l,visualVariables:this._visualVariableAttributes,webStyleCache:this._webStyleCache}))}static _createWorkflowSteps(e,t="awaiting-feature-creation-info"){const{data:a}=e,i=J(["awaiting-feature-creation-info","creating-features","adding-attachment","editing-attachment"],t,{"awaiting-feature-creation-info":()=>({id:"awaiting-feature-creation-info",async setUp(){const{creationInfo:t,viewModel:i}=a,{view:r}=i;r&&(L(t)?e.addHandles(await U({view:r,data:a,next:()=>e.next(),cancel:()=>i.cancelWorkflow({warnIfNoWorkflow:!1})}),this.id):(a.parent&&t&&e.addHandles(i.restrictFeatureTemplatesViewModelToLayer(t.layer),this.id),e.addHandles(i.featureTemplatesViewModel.on("select",({item:t})=>{t&&(a.creationInfo={...a.creationInfo,layer:t.layer,template:t.template},e.next())}),this.id)))},async tearDown(){e.removeHandles(this.id)}}),"creating-features":()=>({id:"creating-features",async setUp(){e._isActive&&await e._setUpCreatingFeaturesStep()},async tearDown(t){const{viewModel:i}=a;t.canceled&&(e.removeHandles([le,ne,oe,de]),i.attachmentsViewModel.fileInfos.removeAll(),e._attachmentFileInfos.clear())}}),"adding-attachment":()=>({id:"adding-attachment",parent:"creating-features",async setUp(){},async tearDown(){const{attachmentsViewModel:t}=a.viewModel,{graphic:i,fileInfos:r}=t;e._attachmentFileInfos.set(i,r.toArray()),t.mode="view"}}),"editing-attachment":()=>({id:"editing-attachment",parent:"creating-features",async setUp(){},async tearDown(){const{attachmentsViewModel:t}=a.viewModel,{graphic:i,fileInfos:r}=t;e._attachmentFileInfos.set(i,r.toArray()),t.mode="view"}})});return Q(a,i)}static _configureSketchViewModel(e){const{data:t,_sketchLayer:a,_sketchViewModel:s,_webStyleCache:n}=e,{creationInfo:o,viewModel:l}=t,{view:c}=l,p=[];if(!c)return i();if("2d"===c.type){o&&p.push(e._fadeExistingFeatures(o.layer));const t=d((e,t)=>Promise.all(e.map(e=>K(e,n,t))));p.push(u(()=>c.scale,e=>t(a.graphics,e)))}const m=F(t.fullTemplate,o?.attributeOverrides),f=u(()=>s.createGraphic,a=>{a&&!e.hasHandles(oe)&&e._updatingHandles.addPromise(X({creationAttributes:m,data:t,sketchViewModel:s,view:c,webStyleCache:n}).then(t=>e.addHandles(t,oe)))}),w=async t=>{if("cancel"!==t.state&&"complete"!==t.state||e.removeHandles(oe),"cancel"===t.state&&null!==c.activeTool&&c.activeTool!==e.sketchViewModel.activeComponent&&(await e._waitForActiveToolCleared(),await e._startCreating()),"complete"===t.state&&t.graphic){const a=await e._processEdits(t.graphic,{scale:"2d"===c.type?c.scale:null,useSourceLayer:!0,webStyleCache:e._webStyleCache});a&&(await e._waitForActiveToolCleared(),await e._startUpdating({feature:a}))}},g=async i=>{const{attachmentsViewModel:r}=l,{_formViewModel:n}=e;if(i.graphics.length>1)return void await e._clearSelectedFeature();const d=i.graphics[0];if("complete"===i.state){const{submittable:t}=n;if(e.numPendingFeatures!==o?.maxFeatures&&t||n.submit(),await e._clearSelectedFeature(),"add"!==r.mode&&"edit"!==r.mode||await(l.activeWorkflow?.previous()),!i.aborted&&c.activeTool===e.sketchViewModel.activeComponent&&(await e.sketchViewModel.wait(),"ready"===e.sketchViewModel.state&&"mesh"!==e.data.creationInfo?.layer.geometryType))return e._startCreating()}else{if("start"===i.state)return d.sourceLayer??=t.creationInfo?.layer,await te({graphic:d,sketchLayer:a,sketchViewModel:s,visualVariables:e._visualVariableAttributes,webStyleCache:e._webStyleCache,sourceLayer:d.sourceLayer}),e._selectFeatureForUpdate({feature:d});if("active"===i.state){await e.updatePendingFeature(d);const t=e._visualVariableAttributes;ae(c,d,i,t)&&await K(d,e._webStyleCache,"2d"===c.type?c.scale:null);const a=d.attributes,{rotation:r,size:s}=t;if(null!=r){const{field:e}=r;n.setValue(e,a[e])}if(null!=s){const{field:e}=s;n.setValue(e,a[e])}}}},y=async a=>{if(a.graphics.forEach(e=>{t.removePendingFeature(e)}),!L(t.creationInfo))return e._startCreating()},v=async()=>{if(L(t.creationInfo))try{await e.data.viewModel.back()}catch{}return e._startCreating()};p.push(f,s.on("create",t=>e._updatingHandles.addPromise(w(t))),s.on("update",t=>e._updatingHandles.addPromise(g(t))),s.on("delete",t=>e._updatingHandles.addPromise(y(t))),h(()=>!e.numPendingFeatures,()=>e._updatingHandles.addPromise(v())),i(()=>{s.cancel()}),he(s,a,t),...pe(t));const _=r(p);return s.addHandles(_),_}_initializeSketchViewModel(){const{data:e}=this,{view:t}=e.viewModel,a=new I({elevationInfo:e.creationInfo?.layer.elevationInfo,internal:!0,listMode:"hide",title:"createFeaturesWorkflow-internal"}),r=new re({layer:a,creationMode:"single",sketchOptions:e.sketchOptions,snappingManager:e.snappingManager,updateOnGraphicClick:!1,defaultUpdateOptions:{multipleSelectionEnabled:!1},view:t});this._sketchLayer=a,this._sketchViewModel=r,t?.map.add(a),this.addHandles([i(()=>{t?.destroyed||t?.map.remove(a),a.destroy()}),u(()=>this.numPendingFeatures>0,e=>this._sketchViewModel.updateOnGraphicClick=e,p)])}_hasValidationErrors(e){return!!e&&(!this.data.isSubmittable(e)||!!this._formViewModel.validateContingencyConstraints(e.attributes,{includeIncompleteViolations:!0})?.length)}async _processEdits(e,t){const{data:a,_formViewModel:i,_sketchLayer:r}=this,{layerInfos:s,view:n}=a.viewModel;i.editType="INSERT",i.map=n?.map,i.spatialReference=n?.spatialReference;const{templateExecutorInfo:o}=a;if(!o){const t=e.clone();return t.geometry=null,await this._addAndInitializeEdits(e,t),e}r.remove(e);const{executor:l}=o,d=l(e.geometry,"completion"),u=c(d)?await d:d;o.completionResults.push(u),Y(u.relationships),i.editType="INSERT",i.map=n?.map,i.spatialReference=n?.spatialReference,u.primary&&a.creationInfo?.attributeOverrides&&(u.primary.graphic.attributes={...u.primary.graphic.attributes,...a.creationInfo.attributeOverrides});for(const c of u.edits){let e=null;if(c.addFeatures)for(const a of c.addFeatures){const i=a.clone();i.geometry=null,null!=a.geometry&&(a.symbol=await S(a,t),r.add(a)),a.sourceLayer!==e?.layer&&(e=N(s,a.sourceLayer));const n=!!u.associationGraphics?.has(a);await this._addAndInitializeEdits(a,i,e,n)}}i.feature=null,await m(()=>!i.updating);return u.edits.reduce((e,t)=>e+(t.addFeatures?.length??0),0)>1?null:u.primary?.graphic}async _addAndInitializeEdits(e,t,a,i=!1){const{data:r,_formViewModel:s}=this,{layerInfos:n}=r.viewModel,o=r.addPendingFeature(e,t,{isAssociation:i});a??=N(n,e.sourceLayer),s.feature=e,s.formTemplate=a?.formTemplate,await m(()=>!s.updating),o.updateAttributes(s.getValues()),o.submittable=s.submittable}async _setUpCreatingFeaturesStep(){if(this.hasHandles(le))return;const{data:e,sketchViewModel:s}=this,{creationInfo:n,viewModel:l}=e,{attachmentsViewModel:d,view:c}=l;if(!c||!n?.layer)throw new a("missing-parameters","CreateFeaturesWorkflow requires a view and creationInfo.");const{initialFeature:h,layer:m}=n,f=[],w=[];this._featureFormHandle=o(this._featureFormHandle),this._visualVariableAttributes={rotation:null,size:null},e.editorItem=O(l.editorItems,n.layer),n.template&&(null==e.fullTemplate&&await this._initializeFullTemplateAndExecutorInfo(e),w.push(i(()=>{e.templateExecutorInfo&&(e.templateExecutorInfo.completionResults=[])}))),s.allowDeleteKey=!e.isSharedTemplateWorkflow,$(d),f.push(u(()=>d.mode,e=>{switch(e){case"add":this.go("adding-attachment");break;case"edit":this.go("editing-attachment")}}));const g=ee(c);f.push(g);const y=V(n.layer),{template:_}=n,M=!_||b(_)||v(_)&&"feature"===_.type,I=y&&M;try{if(I){const a=h??new t({attributes:F(e.fullTemplate,n.attributeOverrides),sourceLayer:m}),i=await this._processEdits(a);i&&await this._startUpdating({feature:i})}else f.push(se._configureSketchViewModel(this)),h?(L(n)&&n.geometryToPlace&&(h.attributes=F(e.fullTemplate,n.attributeOverrides)),s.addGraphic(h),await this._startUpdating({feature:h})):await this._startCreating()}finally{g.remove()}const k=i(()=>{for(const t of e.pendingFeatures)s.removeGraphic(t),e.removePendingFeature(t)}),S=u(()=>c?.timeZone,e=>{this._formViewModel.timeZone=e,this.data.timeZone=e},p),A=i(()=>{L(n)&&l.cancelWorkflow({warnIfNoWorkflow:!1})});this._featureFormHandle&&f.push(this._featureFormHandle),this.addHandles(f,this._handleKeys.beforeCommit),this.addHandles(w,this._handleKeys.afterCommit),this.addHandles([i(()=>d.fileInfos.removeAll()),r(f),r(w),A,k,S],le)}async _waitForActiveToolCleared(){const e=this.data.viewModel.view;if(null==e?.activeTool)return;const t=new AbortController;this.addHandles(s(t),de),await m(()=>null==e?.activeTool,t.signal),t.abort()}};function he(e,t,a){let s=null;const n=()=>e.snappingOptions.featureSources,o=()=>(s=new P({layer:t}),n().add(s),s),d=()=>{null!=s&&(n().remove(s),s=l(s))};return r([u(()=>{const e=a.creationInfo?.layer,t=n().find(t=>t.layer===e);return{hasFeatureLayerSource:!!t,enabled:t?.enabled??!1}},({hasFeatureLayerSource:e,enabled:t})=>{if(!e)return d();s??=o(),s.enabled=t},f),i(d)])}function pe(e){const t=e.viewModel.view;if(!t)return[];const a=[];if("3d"===t.type){const r=new T({view:t});a.push(u(()=>e.selectedPendingFeature,(e,t)=>{r.remove(e),r.add(t)}),i(()=>r.destroy()))}const r=new T({view:t,highlightName:E});return a.push(u(()=>e.temporaryHighlightFeature,e=>{r.removeAll(),r.add(e)}),i(()=>r.destroy())),a}function me(e,t,a,i){const r=[];return t.forEach((t,s)=>{if(!t.error){const n=e[s],o=i.get(n)||[];n.attributes[a.objectIdField]=t.objectId,o.forEach(({form:e})=>r.push({feature:n,attachment:e}))}}),r}function fe(e){for(const t of e){const{sourceLayer:e}=t;e&&"globalIdField"in e&&null!=e.globalIdField&&(t.attributes[e.globalIdField]??=w())}}function we(e,t){const a=[];if(!t||0===t.size)return{addFeatures:e};for(const[i,r]of t)for(const{file:e}of r)a.push({feature:i,attachment:{globalId:w(),data:e}});return a.length?{addFeatures:e,addAttachments:a}:{addFeatures:e}}function ge(e,t){return e.map(e=>{const{addFeatures:a}=e;if(!a||0===a.length)return e;const i=[];for(const r of a){const e=t.get(r);if(e)for(const{file:t}of e)i.push({feature:r,attachment:{globalId:w(),data:t}})}return i.length?{...e,addAttachments:i}:e})}e([g()],ue.prototype,"allowSave",null),e([g()],ue.prototype,"createFeatureState",void 0),e([g()],ue.prototype,"data",void 0),e([g({constructOnly:!0})],ue.prototype,"isNested",void 0),e([g()],ue.prototype,"formViewModel",null),e([g()],ue.prototype,"hasInvalidFormTemplate",null),e([g()],ue.prototype,"hasPendingEdits",null),e([g()],ue.prototype,"hasPreviousStep",null),e([g()],ue.prototype,"_getDrawMeshHelpMessage",void 0),e([g()],ue.prototype,"helpMessage",null),e([g()],ue.prototype,"layer",null),e([g()],ue.prototype,"parent",null),e([g()],ue.prototype,"keyboardCancellationEnabled",null),e([g()],ue.prototype,"reliesOnOwnerAdminPrivileges",null),e([g()],ue.prototype,"saveActionLabel",null),e([g()],ue.prototype,"shouldShowAttachments",null),e([g()],ue.prototype,"shouldAllowAttachmentEditing",null),e([g()],ue.prototype,"sketchViewModel",null),e([g()],ue.prototype,"availableCreateTools",null),e([g()],ue.prototype,"_attachmentsActive",null),ue=se=e([y("esri.widgets.Editor.CreateFeaturesWorkflow")],ue);const ye=ue;export{ye as default};