@esri/solutions-components 5.1.0-next.143 → 5.1.0-next.145

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 (256) hide show
  1. package/dist/cdn/{LEK4P4OY.js → 25NZZKXC.js} +1 -1
  2. package/dist/cdn/2BIUOM64.js +2 -0
  3. package/dist/cdn/{S5AQVTR2.js → 2PUK3PST.js} +1 -1
  4. package/dist/cdn/{KUGXNF5Y.js → 2UMMLVCR.js} +1 -1
  5. package/dist/cdn/{LYAXTCCM.js → 34CZ4EWR.js} +4 -3
  6. package/dist/cdn/{SOLCNPHW.js → 3DCFUYKP.js} +1 -1
  7. package/dist/cdn/{P67K4TAX.js → 3JQ2RXVJ.js} +1 -1
  8. package/dist/cdn/3V2UWENT.js +2 -0
  9. package/dist/cdn/{7WD3GNG4.js → 4JVDUPVW.js} +1 -1
  10. package/dist/cdn/{BNRFT546.js → 5DEYOM7D.js} +1 -1
  11. package/dist/cdn/{WLM4HMMF.js → 5LF6C3S5.js} +1 -1
  12. package/dist/cdn/{4JGB6WLL.js → 5NQNJZTE.js} +1 -1
  13. package/dist/cdn/{4MAZNAHZ.js → 5OFQVDNK.js} +1 -1
  14. package/dist/cdn/{NV2DLQDN.js → 6MOTC6CE.js} +1 -1
  15. package/dist/cdn/{PUCDO65D.js → 6T35OGRG.js} +1 -1
  16. package/dist/cdn/{FVOCVCEE.js → 72X4E4QW.js} +1 -1
  17. package/dist/cdn/{Y77RX7KL.js → 7ADKNWWI.js} +1 -1
  18. package/dist/cdn/{DKEYOEI7.js → 7CLM77HQ.js} +1 -1
  19. package/dist/cdn/{IFONVCBL.js → A27DLHRU.js} +1 -1
  20. package/dist/cdn/{3UKDJZ2D.js → AE5HNAOV.js} +1 -1
  21. package/dist/cdn/{YQWQG523.js → AOWNMC3W.js} +1 -1
  22. package/dist/cdn/{U4RHWD57.js → AZN2E5DL.js} +1 -1
  23. package/dist/cdn/BMMIXOTR.js +2 -0
  24. package/dist/cdn/{6Z3DXRF6.js → BQE6IVEF.js} +1 -1
  25. package/dist/cdn/{EDZIFJZR.js → C5ZH23YO.js} +1 -1
  26. package/dist/cdn/{7GXMCAWQ.js → CVRBLJ5O.js} +1 -1
  27. package/dist/cdn/{ENG5BCAV.js → DXQQQNOF.js} +1 -1
  28. package/dist/cdn/{BGLTC5SO.js → F26SXWZ5.js} +1 -1
  29. package/dist/cdn/{4RLG6MXK.js → G3F52QRW.js} +1 -1
  30. package/dist/cdn/{IEOFEUZI.js → G3FTF6WH.js} +1 -1
  31. package/dist/cdn/{AHB7W7RI.js → GJD7AOUI.js} +1 -1
  32. package/dist/cdn/{RRD4QUQS.js → HLKEBN2O.js} +1 -1
  33. package/dist/cdn/{J3HJC4SO.js → HPWNNMVU.js} +2 -2
  34. package/dist/cdn/{ZCSF2MJ5.js → I7XBRB6B.js} +1 -1
  35. package/dist/cdn/{SGQBWAPU.js → IDEOFV22.js} +1 -1
  36. package/dist/cdn/{FW2HWQC7.js → IEC46RE7.js} +1 -1
  37. package/dist/cdn/{ULFPP7PF.js → IEN3TA4W.js} +1 -1
  38. package/dist/cdn/{LKZFKOG4.js → KDNGZ47C.js} +1 -1
  39. package/dist/cdn/{7FJTZ7VA.js → L3UI7EZZ.js} +1 -1
  40. package/dist/cdn/{MC5ARLKZ.js → L6P26BYB.js} +1 -1
  41. package/dist/cdn/{U3CNAJQZ.js → LCV5GKUD.js} +3 -3
  42. package/dist/cdn/{X6JL6SAH.js → LJY6BB64.js} +1 -1
  43. package/dist/cdn/{MT5J66WR.js → LL647FJR.js} +1 -1
  44. package/dist/cdn/{KSQHSNTW.js → M4II4TSX.js} +1 -1
  45. package/dist/cdn/{E5E6J57F.js → MEZL3ZHS.js} +28 -27
  46. package/dist/cdn/MHVLVLRA.js +2 -0
  47. package/dist/cdn/{UOGZGAJD.js → MIH5YMTN.js} +1 -1
  48. package/dist/cdn/{K4TDKKPB.js → MPCJZCL5.js} +1 -1
  49. package/dist/cdn/MZ73EAAV.js +29 -0
  50. package/dist/cdn/{C4OXBZJK.js → NIYB3TEW.js} +1 -1
  51. package/dist/cdn/{TX3LBQ6V.js → NOXANMDF.js} +1 -1
  52. package/dist/cdn/{QHDEVLC3.js → P4XNRWG7.js} +1 -1
  53. package/dist/cdn/{EPOIEXNS.js → PBGG3TGN.js} +1 -1
  54. package/dist/cdn/{H2UL463J.js → PBMTIFFX.js} +1 -1
  55. package/dist/cdn/{VBJSVR6T.js → PECGJO2P.js} +1 -1
  56. package/dist/cdn/{FILMKUOU.js → PNESECPO.js} +1 -1
  57. package/dist/cdn/{Z23BVIGQ.js → QFZK4TD4.js} +1 -1
  58. package/dist/cdn/QGCF64WY.js +2 -0
  59. package/dist/cdn/{5LIR6BQY.js → QKJJHBMB.js} +1 -1
  60. package/dist/cdn/{ZCPVOS4Q.js → QQXQAU33.js} +1 -1
  61. package/dist/cdn/{56XVVIG7.js → RIHOGDUV.js} +1 -1
  62. package/dist/cdn/{AGB374BK.js → RUQ4RO4T.js} +1 -1
  63. package/dist/cdn/{MVF7I3RU.js → UKQPYE7U.js} +1 -1
  64. package/dist/cdn/{BVSSQNES.js → ULUJKWT5.js} +1 -1
  65. package/dist/cdn/{U6JZYJ4D.js → UM3P3Q52.js} +1 -1
  66. package/dist/cdn/VO53567V.js +2 -0
  67. package/dist/cdn/WKS3TKDC.js +2 -0
  68. package/dist/cdn/WUKFT5AY.js +4 -0
  69. package/dist/cdn/{QQEYWBVV.js → XGWDWPRK.js} +1 -1
  70. package/dist/cdn/{XXGM7HGO.js → XGYNSCTA.js} +1 -1
  71. package/dist/cdn/{DNPN62O5.js → Y4KGXRSD.js} +1 -1
  72. package/dist/cdn/{SSIUWTQX.js → Y6QJCLML.js} +1 -1
  73. package/dist/cdn/{WGS5W6W5.js → YVIEKHQQ.js} +1 -1
  74. package/dist/cdn/{I22C4HE4.js → ZHXREM2D.js} +1 -1
  75. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ar.json +1 -1
  76. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.bg.json +1 -1
  77. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.bs.json +1 -1
  78. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ca.json +1 -1
  79. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.cs.json +1 -1
  80. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.da.json +1 -1
  81. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.de.json +1 -1
  82. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.el.json +1 -1
  83. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.es.json +1 -1
  84. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.et.json +1 -1
  85. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.fi.json +1 -1
  86. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.fr.json +1 -1
  87. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.he.json +1 -1
  88. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.hr.json +1 -1
  89. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.hu.json +1 -1
  90. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.id.json +1 -1
  91. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.it.json +1 -1
  92. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ja.json +1 -1
  93. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ko.json +1 -1
  94. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.lt.json +1 -1
  95. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.lv.json +1 -1
  96. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.nl.json +1 -1
  97. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.no.json +1 -1
  98. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.pl.json +1 -1
  99. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.pt-BR.json +1 -1
  100. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.pt-PT.json +1 -1
  101. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ro.json +1 -1
  102. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ru.json +1 -1
  103. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.sk.json +1 -1
  104. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.sl.json +1 -1
  105. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.sr.json +1 -1
  106. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.sv.json +1 -1
  107. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.th.json +1 -1
  108. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.tr.json +1 -1
  109. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.uk.json +1 -1
  110. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.vi.json +1 -1
  111. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.zh-CN.json +1 -1
  112. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.zh-HK.json +1 -1
  113. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.zh-TW.json +1 -1
  114. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ar.json +1 -1
  115. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.bg.json +1 -1
  116. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.bs.json +1 -1
  117. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ca.json +1 -1
  118. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.cs.json +1 -1
  119. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.da.json +1 -1
  120. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.de.json +1 -1
  121. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.el.json +1 -1
  122. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.es.json +1 -1
  123. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.et.json +1 -1
  124. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.fi.json +1 -1
  125. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.fr.json +1 -1
  126. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.he.json +1 -1
  127. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.hr.json +1 -1
  128. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.hu.json +1 -1
  129. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.id.json +1 -1
  130. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.it.json +1 -1
  131. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ja.json +1 -1
  132. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ko.json +1 -1
  133. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.lt.json +1 -1
  134. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.lv.json +1 -1
  135. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.nl.json +1 -1
  136. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.no.json +1 -1
  137. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pl.json +1 -1
  138. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pt-BR.json +1 -1
  139. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pt-PT.json +1 -1
  140. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ro.json +1 -1
  141. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ru.json +1 -1
  142. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sk.json +1 -1
  143. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sl.json +1 -1
  144. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sr.json +1 -1
  145. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sv.json +1 -1
  146. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.th.json +1 -1
  147. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.tr.json +1 -1
  148. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.uk.json +1 -1
  149. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.vi.json +1 -1
  150. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-CN.json +1 -1
  151. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-HK.json +1 -1
  152. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-TW.json +1 -1
  153. package/dist/cdn/assets/solution-deployed-card/t9n/messages.ar.json +1 -1
  154. package/dist/cdn/assets/solution-deployed-card/t9n/messages.bg.json +1 -1
  155. package/dist/cdn/assets/solution-deployed-card/t9n/messages.bs.json +1 -1
  156. package/dist/cdn/assets/solution-deployed-card/t9n/messages.ca.json +1 -1
  157. package/dist/cdn/assets/solution-deployed-card/t9n/messages.cs.json +1 -1
  158. package/dist/cdn/assets/solution-deployed-card/t9n/messages.da.json +1 -1
  159. package/dist/cdn/assets/solution-deployed-card/t9n/messages.de.json +1 -1
  160. package/dist/cdn/assets/solution-deployed-card/t9n/messages.el.json +1 -1
  161. package/dist/cdn/assets/solution-deployed-card/t9n/messages.es.json +1 -1
  162. package/dist/cdn/assets/solution-deployed-card/t9n/messages.et.json +1 -1
  163. package/dist/cdn/assets/solution-deployed-card/t9n/messages.fi.json +1 -1
  164. package/dist/cdn/assets/solution-deployed-card/t9n/messages.fr.json +1 -1
  165. package/dist/cdn/assets/solution-deployed-card/t9n/messages.he.json +1 -1
  166. package/dist/cdn/assets/solution-deployed-card/t9n/messages.hr.json +1 -1
  167. package/dist/cdn/assets/solution-deployed-card/t9n/messages.hu.json +1 -1
  168. package/dist/cdn/assets/solution-deployed-card/t9n/messages.id.json +1 -1
  169. package/dist/cdn/assets/solution-deployed-card/t9n/messages.it.json +1 -1
  170. package/dist/cdn/assets/solution-deployed-card/t9n/messages.ja.json +1 -1
  171. package/dist/cdn/assets/solution-deployed-card/t9n/messages.ko.json +1 -1
  172. package/dist/cdn/assets/solution-deployed-card/t9n/messages.lt.json +1 -1
  173. package/dist/cdn/assets/solution-deployed-card/t9n/messages.lv.json +1 -1
  174. package/dist/cdn/assets/solution-deployed-card/t9n/messages.nl.json +1 -1
  175. package/dist/cdn/assets/solution-deployed-card/t9n/messages.no.json +1 -1
  176. package/dist/cdn/assets/solution-deployed-card/t9n/messages.pl.json +1 -1
  177. package/dist/cdn/assets/solution-deployed-card/t9n/messages.pt-BR.json +1 -1
  178. package/dist/cdn/assets/solution-deployed-card/t9n/messages.pt-PT.json +1 -1
  179. package/dist/cdn/assets/solution-deployed-card/t9n/messages.ro.json +1 -1
  180. package/dist/cdn/assets/solution-deployed-card/t9n/messages.ru.json +1 -1
  181. package/dist/cdn/assets/solution-deployed-card/t9n/messages.sk.json +1 -1
  182. package/dist/cdn/assets/solution-deployed-card/t9n/messages.sl.json +1 -1
  183. package/dist/cdn/assets/solution-deployed-card/t9n/messages.sr.json +1 -1
  184. package/dist/cdn/assets/solution-deployed-card/t9n/messages.sv.json +1 -1
  185. package/dist/cdn/assets/solution-deployed-card/t9n/messages.th.json +1 -1
  186. package/dist/cdn/assets/solution-deployed-card/t9n/messages.tr.json +1 -1
  187. package/dist/cdn/assets/solution-deployed-card/t9n/messages.uk.json +1 -1
  188. package/dist/cdn/assets/solution-deployed-card/t9n/messages.vi.json +1 -1
  189. package/dist/cdn/assets/solution-deployed-card/t9n/messages.zh-CN.json +1 -1
  190. package/dist/cdn/assets/solution-deployed-card/t9n/messages.zh-HK.json +1 -1
  191. package/dist/cdn/assets/solution-deployed-card/t9n/messages.zh-TW.json +1 -1
  192. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.ar.json +1 -1
  193. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.bg.json +1 -1
  194. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.bs.json +1 -1
  195. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.ca.json +1 -1
  196. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.cs.json +1 -1
  197. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.da.json +1 -1
  198. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.de.json +1 -1
  199. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.el.json +1 -1
  200. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.en.json +1 -1
  201. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.es.json +1 -1
  202. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.et.json +1 -1
  203. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.fi.json +1 -1
  204. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.fr.json +1 -1
  205. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.he.json +1 -1
  206. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.hr.json +1 -1
  207. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.hu.json +1 -1
  208. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.id.json +1 -1
  209. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.it.json +1 -1
  210. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.ja.json +1 -1
  211. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.json +1 -1
  212. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.ko.json +1 -1
  213. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.lt.json +1 -1
  214. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.lv.json +1 -1
  215. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.nl.json +1 -1
  216. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.no.json +1 -1
  217. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.pl.json +1 -1
  218. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.pt-BR.json +1 -1
  219. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.pt-PT.json +1 -1
  220. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.ro.json +1 -1
  221. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.ru.json +1 -1
  222. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.sk.json +1 -1
  223. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.sl.json +1 -1
  224. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.sr.json +1 -1
  225. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.sv.json +1 -1
  226. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.th.json +1 -1
  227. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.tr.json +1 -1
  228. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.uk.json +1 -1
  229. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.vi.json +1 -1
  230. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.zh-CN.json +1 -1
  231. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.zh-HK.json +1 -1
  232. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.zh-TW.json +1 -1
  233. package/dist/cdn/index.js +1 -1
  234. package/dist/chunks/converter.js +633 -367
  235. package/dist/chunks/deployFlowController.js +46 -0
  236. package/dist/chunks/designSolution.js +4 -3
  237. package/dist/chunks/explainValidationFailure.js +32 -0
  238. package/dist/chunks/solution-builder-assistant.js +163 -78
  239. package/dist/chunks/updateDesign.js +1 -1
  240. package/dist/components/arcgis-solutions-assistant/customElement.js +396 -318
  241. package/dist/components/arcgis-solutions-assistant/index.js +1 -1
  242. package/dist/components/solution-builder-assistant/customElement.js +3 -2
  243. package/dist/components/solution-deploying-dialog/customElement.js +12 -12
  244. package/dist/components/solution-details-panel/customElement.js +112 -102
  245. package/dist/docs/api.json +1 -1
  246. package/dist/docs/docs.json +1 -1
  247. package/dist/docs/web-types.json +1 -1
  248. package/dist/solutions-components_commit.txt +6 -6
  249. package/package.json +1 -1
  250. package/dist/cdn/5MPYPIR2.js +0 -2
  251. package/dist/cdn/FYT4Q5GJ.js +0 -2
  252. package/dist/cdn/GLQZHYJP.js +0 -4
  253. package/dist/cdn/ILLTWR2W.js +0 -2
  254. package/dist/cdn/RUF6QBY7.js +0 -2
  255. package/dist/cdn/S6U6SXMD.js +0 -2
  256. package/dist/cdn/SYZEWVHU.js +0 -2
@@ -1,23 +1,23 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
2
  import { c as Ce } from "../../chunks/runtime.js";
3
3
  import { u as _e } from "../../chunks/useT9n.js";
4
- import { LitElement as ke, createEvent as X, nothing as ee } from "@arcgis/lumina";
5
- import { css as Te, html as T } from "lit";
4
+ import { LitElement as ke, createEvent as X, nothing as Z } from "@arcgis/lumina";
5
+ import { css as Te, html as k } from "lit";
6
6
  import { unsafeHTML as Ee } from "lit/directives/unsafe-html.js";
7
- import { useContextConsumer as te } from "@arcgis/lumina/context";
8
- import { c as Ae, b as De } from "../../chunks/deployAppContexts.js";
9
- import { T as Le } from "../../chunks/interfaces.js";
10
- import { l as Re } from "../../chunks/helpers.js";
11
- import se from "@arcgis/core/config.js";
12
- import { createRef as $e, ref as Me } from "lit-html/directives/ref.js";
13
- import { Annotation as b, StateGraph as z, START as j, END as v, NodeInterrupt as ie } from "@langchain/langgraph/web";
14
- import { createAgentRuntimeState as J, sendTraceMessage as w, invokeStructuredPrompt as D, getEmbeddings as Pe, cosineSimilarity as Fe, invokeTextPrompt as Be } from "@arcgis/ai-orchestrator";
15
- import r, { z as E } from "zod";
7
+ import { useContextConsumer as ee } from "@arcgis/lumina/context";
8
+ import { c as Ae, b as Le } from "../../chunks/deployAppContexts.js";
9
+ import { T as De } from "../../chunks/interfaces.js";
10
+ import { l as Fe } from "../../chunks/helpers.js";
11
+ import te from "@arcgis/core/config.js";
12
+ import { createRef as $e, ref as Re } from "lit-html/directives/ref.js";
13
+ import { Annotation as b, StateGraph as z, START as j, END as x, NodeInterrupt as ne } from "@langchain/langgraph/web";
14
+ import { createAgentRuntimeState as J, sendTraceMessage as v, invokeStructuredPrompt as E, getEmbeddings as Me, cosineSimilarity as Ne, invokeTextPrompt as Pe } from "@arcgis/ai-orchestrator";
15
+ import r, { z as L } from "zod";
16
16
  import * as G from "@esri/arcgis-rest-portal";
17
- import { applyPatch as Ne } from "fast-json-patch";
17
+ import { applyPatch as Be } from "fast-json-patch";
18
18
  import "@langchain/core/messages";
19
- import { C as oe } from "../../chunks/converter.js";
20
- import { g as F, t as ae, r as re, c as qe, d as A } from "../../chunks/templates.js";
19
+ import { C as ie } from "../../chunks/converter.js";
20
+ import { g as N, t as oe, r as ae, c as qe, d as D } from "../../chunks/templates.js";
21
21
  import Ue from "@arcgis/core/portal/Portal.js";
22
22
  import Oe from "@arcgis/core/portal/PortalItem.js";
23
23
  const ze = Te`:host{display:block;height:100%}.margin-lg{margin:var(--calcite-spacing-lg)}.display-flex-row{display:flex;flex-direction:row}.assistant-split-container{display:flex;width:100%;height:calc(100vh - 78px);overflow:hidden;border-radius:10px}.assistant-panel{display:flex;flex-direction:column;height:100%;border:1px solid var(--calcite-color-surface-3);background-color:var(--calcite-color-surface-2);overflow:hidden}.chat-panel{min-width:320px}.builder-panel{min-width:320px;max-width:100%;border-left:1px solid var(--calcite-color-surface-3)}.panel-actions{display:flex;gap:8px;padding:6px;align-items:center}.builder-header,.builder-footer{padding:10px;background:var(--calcite-color-surface-1);border-bottom:1px solid var(--calcite-color-surface-3)}.builder-content{flex:1;overflow:auto;padding:12px}.builder-content pre{white-space:pre-wrap;word-wrap:break-word;max-height:100%;overflow:auto}.builder-actions{display:flex;gap:6px;align-items:center}.padding-left-10{padding-left:10px}.chat-container{display:flex;flex-direction:column;gap:0px;max-width:600px;height:75%;background-color:var(--calcite-color-surface-4);padding:1px}.chat-container_expanded{display:flex;flex-direction:column;gap:0px;max-width:100%;height:95%;background-color:var(--calcite-color-surface-1);border-radius:10px;padding:10px}.chat-panel{--calcite-color-focus: var(--calcite-color-brand);--calcite-panel-border-color: var(--calcite-color-border-2);--calcite-internal-panel-header-vertical-padding: 0px;--calcite-panel-header-content-space: 0px;border:var(--calcite-border-width-sm) solid var(--calcite-color-border-2);height:100%}.header-content{display:flex;align-items:center;gap:var(--calcite-spacing-sm);height:65px;box-sizing:border-box;padding-inline-start:var(--calcite-space-2xl)}.header-title{font-size:var(--calcite-font-size-md);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1)}.beta-chip{--calcite-chip-corner-radius: var(--calcite-corner-radius-half)}.chat-panel calcite-card,.chat-panel calcite-text-area,.chat-panel calcite-button,.chat-panel .chat-messages,.chat-panel .chat-input{--calcite-color-focus: var(--calcite-color-brand)}.assistant-followup-chip:focus{outline:2px solid var(--calcite-color-brand)}.chat-panel-heading{font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-surface-1, var(--calcite-color-text-1))}.chat-messages{display:flex;flex-direction:column;gap:20px;padding:4px;height:100%;overflow-y:auto}.user-message{align-self:flex-end;background:var(--calcite-color-brand);border-radius:8px;max-width:90%;--calcite-card-corner-radius: 8px;--calcite-card-background-color: var(--calcite-color-brand);--calcite-card-border-color: var(--calcite-color-brand);color:var(--calcite-color-text-inverse);text-align:left}.system-message{align-self:flex-start;background:var(--calcite-color-surface-3);border-radius:8px;max-width:90%;--calcite-card-corner-radius: 8px;--calcite-card-background-color: var(--calcite-color-surface-4);--calcite-card-border-color: var(--calcite-color-surface-4);color:var(--calcite-color-inverse);text-align:left}.loader-message{align-self:flex-start;background:var(--calcite-color-surface-4);border-radius:8px;--calcite-card-corner-radius: 8px;--calcite-card-background-color: var(--calcite-color-surface-4);--calcite-card-border-color: var(--calcite-color-surface-4)}.message-content{padding:0;font-size:14px}.response-message.message-content>p:first-of-type{margin-top:0}.message-content img{max-width:100%;height:auto;display:block;object-fit:contain}.message-content-pad{padding-bottom:10px;font-size:14px}.message-content-summary{padding-bottom:14px}.message-content-alignment{display:flex;align-items:center;gap:var(--calcite-spacing-md);font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-1)}.padding-top-10{padding-top:10px}.padding-right-8{padding-right:8px}.padding-left-right-5{padding-right:5px;padding-left:5px}.chip-content{padding:5px 5px 5px 0}.chat-input{display:flex;flex-direction:row;flex-grow:1}.table-cell{--calcite-table-cell-background: var(--calcite-color-surface-4)}.cursor-pointer{cursor:pointer}.notice-border-color{--temp-initial-brand: var(--calcite-color-brand)}.notice-border-color calcite-notice{--calcite-color-brand: #ddd;--calcite-icon-color: var(--temp-initial-brand)}.notice-border-color calcite-notice *{--calcite-color-brand: var(--temp-initial-brand)}.solution-card{padding:5px 0;text-decoration:none;display:block;width:100%;cursor:pointer}.solution-card calcite-card{display:flex;flex-direction:column;max-width:520px;overflow:hidden;--calcite-card-corner-radius: var(--calcite-corner-radius-round) !important;--calcite-card-shadow: var(--calcite-shadow-sm);--calcite-card-background-color: var(--calcite-card-background-color) }.solution-card div[slot=thumbnail]{max-height:100%;width:100%;position:relative;&:after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;transition:all .15s ease-in-out}}.solution-card div[slot=thumbnail] img{max-height:100%;width:100%;object-fit:cover}.solution-card span[slot=description]{padding-top:10px}.solution-card calcite-chip{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);visibility:hidden;pointer-events:none;opacity:0;transition:all .15s ease-in-out;z-index:9999}.solution-card:hover calcite-chip{visibility:visible;opacity:1}.solution-card:hover div[slot=thumbnail]:after{background-color:#00000080}.solution-card:hover h3{text-decoration:underline}.solution-card:focus{outline:2px solid var(--calcite-color-brand)}.references-container{padding-top:10px;display:block}.references-container.collapsed{display:none}.width-100{width:100%}.disclaimer-div{display:flex;align-items:center;gap:var(--calcite-spacing-sm);font-size:var(--calcite-font-size--0);color:var(--calcite-color-text-1)}.display-none{display:none}.chat-messages calcite-fab{position:absolute;bottom:16px;left:50%;transform:translate(-50%);z-index:999}.icon-color-background{--calcite-button-icon-color: var(--calcite-color-surface-1)}#closeAssistantButton{--calcite-action-text-color: var(--calcite-color-text-1)}.icon-color-background:focus{--calcite-color-focus: var(--calcite-color-surface-1)}@media(max-width:430px){.solution-card .solution-snippet{display:none}}.height-32-flex-auto{height:32px;flex:0 0 auto}.margin-top-0.message-content>p:first-of-type{margin-top:0}a:not(.solution-card){color:var(--calcite-link-text-color, var(--calcite-color-text-link));cursor:pointer;text-decoration:none;line-height:inherit;background-image:linear-gradient(currentColor,currentColor),linear-gradient(var(--calcite-color-brand-underline),var(--calcite-color-brand-underline));background-position-x:0%,100%;background-position-y:min(1.5em,100%);background-repeat:no-repeat,no-repeat;background-size:0% 1px,100% 1px;transition-property:background-size,color;transition-duration:var(--calcite-animation-timing, .15s);transition-timing-function:ease-in-out;outline-color:transparent;position:relative}a:not(.solution-card):hover{background-size:100% 1px,100% 1px}a:not(.solution-card):focus{outline:2px solid var(--calcite-color-brand);outline-offset:2px;outline-color:var(--calcite-color-brand)}a:not(.solution-card):active{color:var(--calcite-color-brand-press)}`;
@@ -34,10 +34,10 @@ ${Object.keys(t).join(`
34
34
  );
35
35
  return await s[1]();
36
36
  }
37
- function N(t) {
37
+ function B(t) {
38
38
  return t?.configurable?.context?.translations;
39
39
  }
40
- function le(t) {
40
+ function re(t) {
41
41
  if (typeof window > "u" || t.length <= 1)
42
42
  return;
43
43
  const e = t.map((n) => n.solution.id), s = t.map((n) => n.solution.title);
@@ -59,7 +59,7 @@ function le(t) {
59
59
  }
60
60
  }));
61
61
  }
62
- function ce(t) {
62
+ function le(t) {
63
63
  if (typeof window > "u" || !t)
64
64
  return;
65
65
  const e = new CustomEvent("solutionIDFromAssistant", {
@@ -93,10 +93,10 @@ function Ge(t, e) {
93
93
  }
94
94
  }), { source: t, allMatches: s };
95
95
  }
96
- function He(t) {
96
+ function Ve(t) {
97
97
  return t && t.helperServices.aiAssistantServices ? `${t.helperServices.aiAssistantServices.url}/skills/doc_ai_assistant/chat` : null;
98
98
  }
99
- function de(t) {
99
+ function ce(t) {
100
100
  return t && t.helperServices.aiAssistantServices ? `${t.helperServices.aiAssistantServices.url}/skills/doc_ai_assistant/api/pre-chat` : null;
101
101
  }
102
102
  async function O(t, e, s) {
@@ -112,7 +112,7 @@ async function O(t, e, s) {
112
112
  throw new Error(`HTTP ${n.status} calling ${e}`);
113
113
  return n.json();
114
114
  }
115
- const Ve = (t) => new Promise((e) => setTimeout(e, t)), Qe = b.Root({
115
+ const He = (t) => new Promise((e) => setTimeout(e, t)), We = b.Root({
116
116
  // Provides agentExecutionContext, outputMessage, summary, and status
117
117
  // channels with the orchestrator's standard reducers/defaults so the
118
118
  // sub-agent reports back through the same shape the orchestrator
@@ -133,9 +133,9 @@ const Ve = (t) => new Promise((e) => setTimeout(e, t)), Qe = b.Root({
133
133
  reducer: (t, e) => e ?? t,
134
134
  default: () => null
135
135
  })
136
- }), We = () => new z(Qe).addNode("initializeAgent", Ye).addNode("askSolutionsQuestions", Ke).addEdge(j, "initializeAgent").addEdge("initializeAgent", "askSolutionsQuestions").addEdge("askSolutionsQuestions", v), ue = async (t, e, s, n) => {
136
+ }), Ke = () => new z(We).addNode("initializeAgent", Ye).addNode("askSolutionsQuestions", Qe).addEdge(j, "initializeAgent").addEdge("initializeAgent", "askSolutionsQuestions").addEdge("askSolutionsQuestions", x), de = async (t, e, s, n) => {
137
137
  if (!t) return;
138
- const i = de(t);
138
+ const i = ce(t);
139
139
  if (!i) return;
140
140
  const a = { context: {
141
141
  kind: "DocAIAssistantRequest",
@@ -148,10 +148,10 @@ const Ve = (t) => new Promise((e) => setTimeout(e, t)), Qe = b.Root({
148
148
  }
149
149
  } };
150
150
  n && (a.conversationId = n), O(a, i, e ?? "");
151
- }, Ke = async (t, e) => {
152
- const s = N(e), n = t.documentSkillUrl;
151
+ }, Qe = async (t, e) => {
152
+ const s = B(e), n = t.documentSkillUrl;
153
153
  let i = [];
154
- await w(
154
+ await v(
155
155
  { text: s.agentProgress.explorerAgentSearching },
156
156
  e
157
157
  );
@@ -180,27 +180,26 @@ const Ve = (t) => new Promise((e) => setTimeout(e, t)), Qe = b.Root({
180
180
  hasMore: o.hasMore,
181
181
  ackSequenceNumber: o.sequenceNumber,
182
182
  inquiryId: o.inquiryId
183
- }, l = "", d = null;
183
+ }, l = "";
184
184
  const u = async (m) => {
185
- const c = m.context?.results?.[0]?.reply ?? "";
186
- if (c !== "") {
187
- const x = Je(c), S = Ge(x, e);
188
- l = S.source, i = [
185
+ const h = m.context?.results?.[0]?.reply ?? "";
186
+ if (h !== "") {
187
+ const g = Je(h), A = Ge(g, e);
188
+ l = A.source, i = [
189
189
  ...i,
190
- ...S.allMatches.filter(
191
- (k) => !i.some((q) => q.solution.id === k.solution.id)
190
+ ...A.allMatches.filter(
191
+ (C) => !i.some((_) => _.solution.id === C.solution.id)
192
192
  )
193
193
  ];
194
194
  }
195
- c !== "" && m.context?.results?.[0]?.followupQuestions && (d = m.context.results[0].followupQuestions);
196
- const g = m.context?.results?.[0]?.status?.currentStatusStep;
197
- if (g) {
198
- let x = "";
199
- g === 1 ? x = s.agentProgress.explorerAgentReading : g === 2 ? x = s.agentProgress.explorerAgentReviewing : g === 3 && (x = s.agentProgress.explorerAgentPreparing), await w({ text: x }, e);
195
+ const d = m.context?.results?.[0]?.status?.currentStatusStep;
196
+ if (d) {
197
+ let g = "";
198
+ d === 1 ? g = s.agentProgress.explorerAgentReading : d === 2 ? g = s.agentProgress.explorerAgentReviewing : d === 3 && (g = s.agentProgress.explorerAgentPreparing), await v({ text: g }, e);
200
199
  }
201
200
  };
202
201
  for (await u(o); a.hasMore; )
203
- await Ve(500), o = await O(
202
+ await He(500), o = await O(
204
203
  {
205
204
  conversationId: a.conversationId,
206
205
  ackSequenceNumber: a.ackSequenceNumber,
@@ -215,16 +214,12 @@ const Ve = (t) => new Promise((e) => setTimeout(e, t)), Qe = b.Root({
215
214
  ackSequenceNumber: o.sequenceNumber,
216
215
  inquiryId: o.inquiryId
217
216
  }, await u(o);
218
- if (d && e?.configurable?.context?.updateSuggestedPrompts) {
219
- const m = e.configurable.context.updateSuggestedPrompts, c = d;
220
- setTimeout(() => m(c), 0);
221
- }
222
- return de(e?.configurable?.context.portal) && ue(
217
+ return ce(e?.configurable?.context.portal) && de(
223
218
  e?.configurable?.context.portal,
224
219
  e?.configurable?.context.token ?? "",
225
220
  e?.configurable?.context.configContext.locale ?? "en",
226
221
  a.conversationId
227
- ), i.length && (i.length === 1 ? ce(i[0].solution.id) : le(i)), {
222
+ ), i.length && (i.length === 1 ? le(i[0].solution.id) : re(i)), {
228
223
  outputMessage: l,
229
224
  summary: l,
230
225
  status: "success",
@@ -233,12 +228,12 @@ const Ve = (t) => new Promise((e) => setTimeout(e, t)), Qe = b.Root({
233
228
  };
234
229
  }, Ye = async (t, e) => {
235
230
  let s = null;
236
- return t.documentSkillUrl === null && e?.configurable?.context?.portal && (s = He(e.configurable.context.portal)), {
231
+ return t.documentSkillUrl === null && e?.configurable?.context?.portal && (s = Ve(e.configurable.context.portal)), {
237
232
  documentSkillUrl: s
238
233
  };
239
234
  };
240
235
  await y(je, "solutions_explorer_description");
241
- const pe = (t) => {
236
+ const ue = (t) => {
242
237
  if (t && Array.isArray(t.id) && t.id.length > 0)
243
238
  return t.id[t.id.length - 1].replace("Message", "").toLowerCase();
244
239
  if (t && typeof t._getType == "function")
@@ -248,8 +243,8 @@ const pe = (t) => {
248
243
  return "human";
249
244
  }
250
245
  return "human";
251
- }, Ze = (t) => {
252
- const e = pe(t);
246
+ }, Xe = (t) => {
247
+ const e = ue(t);
253
248
  if (t && t.kwargs)
254
249
  return {
255
250
  role: e,
@@ -264,7 +259,7 @@ const pe = (t) => {
264
259
  return t.id && (s.id = t.id), t.name && (s.name = t.name), t.additional_kwargs && (s.additional_kwargs = t.additional_kwargs), t.response_metadata && (s.response_metadata = t.response_metadata), s;
265
260
  }
266
261
  return { role: "human", content: String(t) };
267
- }, Xe = (t) => pe(t) === "human", et = (t, e = 3) => t.filter((s) => Xe(s)).slice(-e).map(Ze), tt = (t, e = " ") => et(t).map((i) => i.content).join(e).trim(), st = { understandingRequest: "Understanding your request...", selectTemplatePrompt: "This use case could be supported in a few different ways. Choose the option that best matches what you want to accomplish.", searchingExistingSolutions: "Searching for existing solutions...", existingSolutionMatch: "I found one or more existing solutions that match your use case. These are ready-to-use solutions that may already meet your needs and can be deployed now. Do you want to continue building your own solution?", continueBuildingYes: "Yes, I want to build a new solution", continueBuildingNo: "No, I’ll review existing solutions", continueBuildingDeclined: "Sounds good. We can focus on existing solutions. Let me know if I can help answer any questions or provide more details.", creatingDesign: "Generating solution design...", updatingDesign: "Updating solution design...", applyChangeFailed: "I wasn't able to apply that change. The design was not modified. Please try rephrasing your request.", createDesignFailed: "I wasn't able to create a solution design from that request. Please try rephrasing and try again.", discardMessage: "Are you sure you want to discard your solution?", discardForNewSolution: "I can help you build a new solution, but I will need to discard your current solution design. Do you want to continue?" }, nt = {
262
+ }, Ze = (t) => ue(t) === "human", et = (t, e = 3) => t.filter((s) => Ze(s)).slice(-e).map(Xe), tt = (t, e = " ") => et(t).map((i) => i.content).join(e).trim(), st = { understandingRequest: "Understanding your request...", selectTemplatePrompt: "This use case could be supported in a few different ways. Choose the option that best matches what you want to accomplish.", searchingExistingSolutions: "Searching for existing solutions...", existingSolutionMatch: "I found one or more existing solutions that match your use case. These are ready-to-use solutions that may already meet your needs and can be deployed now. Do you want to continue building your own solution?", continueBuildingYes: "Yes, I want to build a new solution", continueBuildingNo: "No, I’ll review existing solutions", continueBuildingDeclined: "Sounds good. We can focus on existing solutions. Let me know if I can help answer any questions or provide more details.", creatingDesign: "Generating solution design...", updatingDesign: "Updating solution design...", applyChangeFailed: "I wasn't able to apply that change. The design was not modified. Please try rephrasing your request.", createDesignFailed: "I wasn't able to create a solution design from that request. Please try rephrasing and try again.", discardMessage: "Are you sure you want to discard your solution?", discardForNewSolution: "I can help you build a new solution, but I will need to discard your current solution design. Do you want to continue?" }, nt = {
268
263
  builderMessages: st
269
264
  }, it = /* @__PURE__ */ new Set([
270
265
  "add",
@@ -319,6 +314,8 @@ const pe = (t) => {
319
314
  "rownum",
320
315
  "select",
321
316
  "set",
317
+ "shape",
318
+ "subtype",
322
319
  "table",
323
320
  "top",
324
321
  "truncate",
@@ -329,9 +326,9 @@ const pe = (t) => {
329
326
  "view",
330
327
  "where"
331
328
  ]);
332
- class me {
329
+ class pe {
333
330
  constructor(e, s, n = !0) {
334
- this.isValid = !0, this.issues = [], this.response = e, this.template = s, this.newDesign = n, this.validate();
331
+ this.isValid = !0, this.issues = [], this.fieldNameRegistry = null, this.response = e, this.template = s, this.newDesign = n, this.validate();
335
332
  }
336
333
  validate() {
337
334
  this.compareModels(), this.validateResponse();
@@ -343,11 +340,11 @@ class me {
343
340
  const e = new Set(this.template.solution.strings.map((n) => n.key)), s = new Set(this.response.solution.strings.map((n) => n.key));
344
341
  e.size === s.size && [...e].every((n) => s.has(n)) || this.logIssue("String keys in llm response do not match the template.");
345
342
  for (const n of this.response.solution.strings)
346
- n.value || this.logIssue(`String key '${n.key}' has no value.`);
343
+ n.value || this.logIssue(`String key '${n.key}' has no value in the design. It must be populated.`);
347
344
  }
348
345
  compareItems() {
349
346
  const e = new Set(this.template.items.map((n) => n.id)), s = new Set(this.response.items.map((n) => n.id));
350
- e.size === s.size && [...e].every((n) => s.has(n)) || this.logIssue("Item ids in llm response do not match the template.");
347
+ e.size === s.size && [...e].every((n) => s.has(n)) || this.logIssue("Item IDs in design do not match the template.");
351
348
  }
352
349
  compareFeatureLayers() {
353
350
  const e = this.template.featureLayer, s = this.response.featureLayer;
@@ -368,14 +365,20 @@ class me {
368
365
  }
369
366
  }
370
367
  validateResponse() {
371
- const e = this.template.featureLayer.layers;
368
+ const e = /* @__PURE__ */ new Set([
369
+ "Feature Layer (hosted)",
370
+ "Feature Layer (hosted, view)"
371
+ ]);
372
+ for (const i of this.response.items)
373
+ e.has(i.type) && i.title.length > 100 && this.logIssue(`Service name '${i.title}' exceeds 100 characters.`);
374
+ const s = this.template.featureLayer.layers;
372
375
  this.response.featureLayer.layers.length || this.logIssue("Feature layer item must contain at least one layer.");
373
- const s = this.response.featureLayer.layers.map((n) => n.name.toLowerCase());
374
- s.length !== new Set(s).size && this.logIssue("Layer names must be unique (case-insensitive).");
375
- for (const n of this.response.featureLayer.layers) {
376
- this.validateLayer(n);
377
- const i = e.find((o) => o.id === n.id);
378
- i && this.validateRequiredFields(n, i);
376
+ const n = this.response.featureLayer.layers.map((i) => i.name.toLowerCase());
377
+ n.length !== new Set(n).size && this.logIssue(`Layer names must be unique (case-insensitive). Layer names in design: ${n}.`);
378
+ for (const i of this.response.featureLayer.layers) {
379
+ this.validateLayer(i, this.response.featureLayer.addLayers);
380
+ const o = s.find((a) => a.id === i.id);
381
+ o && this.validateRequiredFields(i, o);
379
382
  }
380
383
  }
381
384
  validateRequiredFields(e, s) {
@@ -383,7 +386,12 @@ class me {
383
386
  for (const i of s.requiredFields)
384
387
  n.has(i.name) || this.logIssue(`Layer '${e.name}' is missing required field '${i.name}'.`);
385
388
  }
386
- validateLayer(e) {
389
+ validateLayer(e, s) {
390
+ !s && e.typeMutable === !0 && e.type === "Table" && this.logIssue(
391
+ `Layer '${e.name}' cannot be a Table. It may be a Point, Line, or Polygon.`
392
+ ), this.validateLayerFields(e);
393
+ }
394
+ validateLayerFields(e) {
387
395
  const s = /* @__PURE__ */ new Set([
388
396
  "objectid",
389
397
  "globalid",
@@ -391,26 +399,57 @@ class me {
391
399
  "created_user",
392
400
  "last_edited_date",
393
401
  "last_edited_user"
394
- ]), n = e.systemFields ?? [];
395
- if (n.length) {
396
- const o = new Set(n.map((l) => l.name));
397
- (o.size !== s.size || [...s].some((l) => !o.has(l))) && this.logIssue(
398
- `Layer '${e.name}' has invalid system fields: ${JSON.stringify([...o])}.`
399
- );
402
+ ]), n = e.customFields.map((c) => c.name), i = new Set(e.requiredFields.map((c) => c.name)), o = [...new Set(
403
+ n.filter((c) => s.has(c))
404
+ )];
405
+ for (const c of o)
406
+ this.logIssue(`Layer '${e.name}' field '${c}' collides with a reserved system field name.`);
407
+ const a = [...new Set(
408
+ n.filter((c) => i.has(c))
409
+ )];
410
+ for (const c of a)
411
+ this.logIssue(`Layer '${e.name}' field '${c}' collides with a required field name.`);
412
+ if (!o.length && !a.length) {
413
+ const c = e.systemFields ?? [], m = [
414
+ ...e.customFields,
415
+ ...e.requiredFields,
416
+ ...c
417
+ ].map((h) => h.name);
418
+ m.length !== new Set(m).size && this.logIssue(`Layer '${e.name}' has duplicate fields: ${JSON.stringify(m)}.`);
400
419
  }
401
- const i = [
402
- ...e.customFields,
403
- ...e.requiredFields,
404
- ...n
405
- ].map((o) => o.name);
406
- i.length !== new Set(i).size && this.logIssue(`Layer '${e.name}' has duplicate fields: ${JSON.stringify(i)}.`);
407
- for (const o of [...e.customFields, ...e.requiredFields, ...n])
408
- this.validateField(o);
420
+ const l = e.systemFields ?? [], u = [...e.customFields, ...e.requiredFields, ...l].map((c) => c.name.toLowerCase());
421
+ this.fieldNameRegistry = new Set(u);
422
+ for (const c of [...e.customFields, ...e.requiredFields])
423
+ this.validateField(c);
424
+ this.fieldNameRegistry = null;
425
+ }
426
+ getUniqueTruncatedFieldName(e) {
427
+ const n = this.fieldNameRegistry;
428
+ if (!n)
429
+ return e.slice(0, 31);
430
+ const i = e.toLowerCase();
431
+ n.delete(i);
432
+ const o = e.slice(0, 31);
433
+ let a = o, l = 1;
434
+ for (; n.has(a.toLowerCase()); ) {
435
+ const u = `_${l}`, c = Math.max(1, 31 - u.length);
436
+ a = `${o.slice(0, c)}${u}`, l += 1;
437
+ }
438
+ return n.add(a.toLowerCase()), a;
409
439
  }
410
440
  validateField(e) {
411
- if (e.alias || this.logIssue(`Field '${e.name}' has no display name (alias).`), /^[A-Za-z]/u.test(e.name) || this.logIssue(`Field '${e.name}' does not start with a letter.`), /^[A-Za-z][A-Za-z0-9_]*$/u.test(e.name) || this.logIssue(`Field '${e.name}' contains invalid characters (only letters, numbers, and underscores allowed).`), e.name.length > 31 && this.logIssue(`Field '${e.name}' exceeds 31 characters.`), it.has(e.name.toLowerCase()) && this.logIssue(`Field '${e.name}' is a SQL reserved keyword.`), e.choiceList && (e.choiceList.some((s) => !s) && this.logIssue(`Field '${e.name}' has empty domain values.`), e.choiceList.length !== new Set(e.choiceList).size && this.logIssue(`Field '${e.name}' has duplicate domain values.`), e.length != null)) {
412
- const s = Math.max(...e.choiceList.map((n) => n.length));
413
- s > e.length && (this.newDesign ? (console.debug(`Field '${e.name}' length ${e.length} is insufficient for choiceList value of length ${s}. Auto-fixing to ${s}.`), e.length = s) : this.logIssue(`Field '${e.name}' length ${e.length} is insufficient for choiceList value of length ${s}.`));
441
+ const s = /^\p{L}/u, n = /^.[\p{L}\p{M}\p{N}_]*$/u;
442
+ if (e.alias || this.logIssue(`Field '${e.name}' has no display name (alias).`), s.test(e.name) || this.logIssue(`Field '${e.name}' does not start with a letter.`), n.test(e.name) || this.logIssue(
443
+ `Field '${e.name}' contains invalid characters (only letters from any writing system, numbers, and underscores are allowed; emojis and punctuation are not allowed).`
444
+ ), e.name.length > 31)
445
+ if (this.newDesign) {
446
+ const i = e.name;
447
+ e.name = this.getUniqueTruncatedFieldName(e.name), console.debug(`Field '${i}' exceeds 31 characters. Auto-fixing to '${e.name}'.`);
448
+ } else
449
+ this.logIssue(`Field '${e.name}' exceeds 31 characters.`);
450
+ if (it.has(e.name.toLowerCase()) && this.logIssue(`Field '${e.name}' is a SQL reserved keyword.`), e.choiceList && (e.type !== "string" && this.logIssue(`Field '${e.name}' must be of type 'string' to have a domain.`), e.choiceList.some((i) => !i) && this.logIssue(`Field '${e.name}' has empty domain values.`), e.choiceList.length !== new Set(e.choiceList).size && this.logIssue(`Field '${e.name}' has duplicate domain values.`), e.length != null)) {
451
+ const i = Math.max(...e.choiceList.map((o) => o.length));
452
+ i > e.length && (this.newDesign ? (console.debug(`Field '${e.name}' length ${e.length} is insufficient for choiceList value of length ${i}. Auto-fixing to ${i}.`), e.length = i) : this.logIssue(`Field '${e.name}' length ${e.length} is insufficient for choiceList value of length ${i}.`));
414
453
  }
415
454
  }
416
455
  logIssue(e) {
@@ -444,7 +483,7 @@ const ot = r.object({
444
483
  "Notebook",
445
484
  "QuickCapture Project"
446
485
  ]).describe("ArcGIS item type.")
447
- }), ne = r.object({
486
+ }), se = r.object({
448
487
  name: r.string().describe("Field name."),
449
488
  type: r.enum(["string", "integer", "double", "date", "oid", "guid", "globalid"]).describe("Field data type."),
450
489
  alias: r.string().describe("Field alias for display."),
@@ -459,13 +498,13 @@ const ot = r.object({
459
498
  typeMutable: r.boolean().describe("Indicates whether the layer type can be changed."),
460
499
  name: r.string().describe("Layer/table name."),
461
500
  description: r.string().describe("Layer/table description."),
462
- customFields: r.array(ne).describe("User/business fields specific to the solution."),
463
- requiredFields: r.array(ne).describe("Fields required for solution functionality (e.g., relationship keys).")
501
+ customFields: r.array(se).describe("User/business fields specific to the solution."),
502
+ requiredFields: r.array(se).describe("Fields required for solution functionality (e.g., relationship keys).")
464
503
  }), lt = r.object({
465
504
  itemId: r.string().describe("ArcGIS item id for the feature layer."),
466
505
  addLayers: r.boolean().describe("Indicates whether new layers can be added during solution design."),
467
506
  layers: r.array(rt)
468
- }), H = r.object({
507
+ }), V = r.object({
469
508
  response: r.string().describe("Conversational response to the user's query."),
470
509
  solution: r.object({
471
510
  itemId: r.string().nullable().describe("ArcGIS item id of the source Solution template used for deployment. Preserve the existing value exactly when known; otherwise use null."),
@@ -485,30 +524,61 @@ const ot = r.object({
485
524
  response: r.string().describe("Conversational response describing the accepted design changes."),
486
525
  patches: r.array(ct).describe("Minimal RFC 6902 patch operations needed to update the current design.")
487
526
  }), ut = r.object({
488
- matchedTitles: r.array(r.string()).describe("Titles of solutions that match the user's request. Empty array if no strong match.")
527
+ response: r.string().describe("Short, user-friendly explanation of why the requested update was not applied.")
489
528
  }), pt = r.object({
529
+ matchedTitles: r.array(r.string()).describe("Titles of solutions that match the user's request. Empty array if no strong match.")
530
+ }), mt = r.object({
490
531
  templateId: r.string().min(1).describe("Template id from the available template list."),
491
532
  confidence: r.number().min(0).max(1).describe("Confidence score from 0 to 1 for this template match."),
492
533
  templateDescription: r.string().min(1).describe("Short description this template in the user's use case/workflow.")
493
- }), mt = r.object({
534
+ }), gt = r.object({
494
535
  assistantResponse: r.string().describe("Natural-language response for the user."),
495
536
  isValidUseCase: r.boolean().describe("True only when the request is concrete, appropriate, and has at least one matching template."),
496
- matchedTemplates: r.array(pt).describe("Ordered list of matching templates, best match first. Empty when no valid match exists.")
497
- }), V = (t) => t in A, gt = 5, ht = 0.8, ft = 0.15, bt = "Web Mapping Application", yt = "Embeddings";
498
- let $ = null, U = null, M = null, P = null;
499
- const xt = "Build", L = /* @__PURE__ */ Object.assign({
537
+ matchedTemplates: r.array(mt).describe("Ordered list of matching templates, best match first. Empty when no valid match exists.")
538
+ }), ht = (t) => t.length ? t.map((e, s) => `${s + 1}. ${e}`).join(`
539
+ `) : "No validation errors were provided.", ft = async (t) => {
540
+ const {
541
+ query: e,
542
+ validationIssues: s,
543
+ recentMessages: n,
544
+ fallbackMessage: i,
545
+ promptModules: o
546
+ } = t;
547
+ try {
548
+ return (await E({
549
+ promptText: await y(o, "explainValidationFailure"),
550
+ modelTier: "fast",
551
+ temperature: 0,
552
+ schema: ut,
553
+ messages: n,
554
+ inputVariables: {
555
+ query: e,
556
+ validationIssueCount: String(s.length),
557
+ validationIssues: ht(s)
558
+ }
559
+ })).response?.trim() || i;
560
+ } catch (a) {
561
+ return console.warn(
562
+ "Natural language response failed:",
563
+ { error: a }
564
+ ), i;
565
+ }
566
+ }, H = (t) => t in D, bt = 5, yt = 0.8, xt = 0.15, vt = "Web Mapping Application", wt = "Embeddings";
567
+ let $ = null, U = null, R = null, M = null;
568
+ const St = "Build", T = /* @__PURE__ */ Object.assign({
500
569
  "./prompts/description.md": () => import("../../chunks/description2.js").then((t) => t.default),
501
570
  "./prompts/designSolution.md": () => import("../../chunks/designSolution.js").then((t) => t.default),
571
+ "./prompts/explainValidationFailure.md": () => import("../../chunks/explainValidationFailure.js").then((t) => t.default),
502
572
  "./prompts/findExistingSolution.md": () => import("../../chunks/findExistingSolution.js").then((t) => t.default),
503
573
  "./prompts/initialAssessment.md": () => import("../../chunks/initialAssessment.js").then((t) => t.default),
504
574
  "./prompts/updateDesign.md": () => import("../../chunks/updateDesign.js").then((t) => t.default)
505
- }), vt = nt.builderMessages, f = (t, e, s) => N(e)?.builderMessages?.[t] ?? vt[t], ge = (t) => {
575
+ }), It = nt.builderMessages, f = (t, e, s) => B(e)?.builderMessages?.[t] ?? It[t], me = (t) => {
506
576
  typeof window < "u" && window.dispatchEvent(new CustomEvent("arcgis-solution-design-update", {
507
577
  detail: t
508
578
  }));
509
- }, wt = async (t, e, s) => {
579
+ }, Ct = async (t, e, s) => {
510
580
  if (!t) return null;
511
- const n = `type:"${bt}" AND typekeywords:${yt} AND group:${t}`;
581
+ const n = `type:"${vt}" AND typekeywords:${wt} AND group:${t}`;
512
582
  return (await G.searchItems({
513
583
  q: n,
514
584
  params: e ? { token: e } : void 0,
@@ -516,9 +586,9 @@ const xt = "Build", L = /* @__PURE__ */ Object.assign({
516
586
  num: 1
517
587
  }))?.results?.[0] ?? null;
518
588
  };
519
- async function St(t, e, s) {
589
+ async function _t(t, e, s) {
520
590
  try {
521
- const n = await wt(t, e, s);
591
+ const n = await Ct(t, e, s);
522
592
  if (!n) return null;
523
593
  const i = new Oe({ id: n.id });
524
594
  return await i.load(), await i.fetchData("json");
@@ -526,16 +596,16 @@ async function St(t, e, s) {
526
596
  return null;
527
597
  }
528
598
  }
529
- const It = async (t, e, s) => {
599
+ const kt = async (t, e, s) => {
530
600
  if (!t) return [];
531
- const n = `type:Solution AND typekeywords:${xt} AND group:${t}`;
601
+ const n = `type:Solution AND typekeywords:${St} AND group:${t}`;
532
602
  return (await G.searchItems({
533
603
  q: n,
534
604
  params: e ? { token: e } : void 0,
535
605
  portal: s,
536
606
  num: 100
537
607
  }))?.results ?? [];
538
- }, Ct = async (t, e, s) => {
608
+ }, Tt = async (t, e, s) => {
539
609
  try {
540
610
  const n = await G.getItemData(t, {
541
611
  params: e ? { token: e } : void 0,
@@ -547,7 +617,7 @@ const It = async (t, e, s) => {
547
617
  } catch {
548
618
  return null;
549
619
  }
550
- }, _ = (t, e = {}) => {
620
+ }, I = (t, e = {}) => {
551
621
  let s = t;
552
622
  return "itemId" in e && (s = {
553
623
  ...s,
@@ -565,118 +635,118 @@ const It = async (t, e, s) => {
565
635
  ...s,
566
636
  templateId: e.templateId ?? null
567
637
  }), s;
568
- }, he = (t, e) => {
638
+ }, ge = (t, e) => {
569
639
  if (t == null || e == null)
570
640
  return { ok: !1, error: "design or sourceBuildSolution is null/undefined" };
571
641
  try {
572
642
  const s = structuredClone(e);
573
- return new oe({ buildSolution: s }).applyLlmTemplate(t), { ok: !0 };
643
+ return new ie({ buildSolution: s }).applyLlmTemplate(t), { ok: !0 };
574
644
  } catch (s) {
575
645
  return {
576
646
  ok: !1,
577
647
  error: s instanceof Error ? s.stack ?? s.message : String(s)
578
648
  };
579
649
  }
580
- }, Q = async (t) => {
650
+ }, W = async (t) => {
581
651
  if (U) {
582
652
  Object.entries(U).forEach(([a, l]) => {
583
- A[a] && (A[a].initialTemplate = l);
653
+ D[a] && (D[a].initialTemplate = l);
584
654
  });
585
655
  return;
586
656
  }
587
- const e = t?.configurable?.context?.token, s = be(t), n = ye(t);
657
+ const e = t?.configurable?.context?.token, s = fe(t), n = be(t);
588
658
  if (!s) {
589
659
  console.warn("Solution Builder: missing primarySolutionsGroupId in appConfig; skipping live template hydration.");
590
660
  return;
591
661
  }
592
- const i = await It(s, e, n), o = {};
662
+ const i = await kt(s, e, n), o = {};
593
663
  await Promise.all(i.map(async (a) => {
594
664
  const l = a.properties?.templateInfo;
595
665
  if (!l || typeof l != "object") return;
596
- const d = l.id;
597
- if (typeof d != "string" || o[d]) return;
598
- const u = await Ct(a.id, e, n);
599
- if (!u) return;
600
- const { buildSolution: h, params: m } = u;
601
- if (typeof h == "object" && h !== null && "solution" in h) {
602
- const g = h.solution;
666
+ const u = l.id;
667
+ if (typeof u != "string" || o[u]) return;
668
+ const c = await Tt(a.id, e, n);
669
+ if (!c) return;
670
+ const { buildSolution: m, params: h } = c;
671
+ if (typeof m == "object" && m !== null && "solution" in m) {
672
+ const g = m.solution;
603
673
  g.thumbnailUrl = a.thumbnail ? `${n ?? "https://www.arcgis.com/sharing/rest"}/content/items/${a.id}/info/${a.thumbnail}` : void 0, g.item = a;
604
674
  }
605
- const c = {
675
+ const d = {
606
676
  ...l,
607
- buildSolution: h
677
+ buildSolution: m
608
678
  };
609
- o[d] = _(
610
- new oe(c).dumpToLlmTemplate(),
679
+ o[u] = I(
680
+ new ie(d).dumpToLlmTemplate(),
611
681
  {
612
682
  itemId: a.id,
613
- sourceBuildSolution: structuredClone(h),
614
- params: m ? structuredClone(m) : null
683
+ sourceBuildSolution: structuredClone(m),
684
+ params: h ? structuredClone(h) : null
615
685
  }
616
- ), A[d] = {
686
+ ), D[u] = {
617
687
  ...l,
618
- initialTemplate: o[d]
688
+ initialTemplate: o[u]
619
689
  };
620
690
  })), U = o;
621
- }, fe = (t) => {
691
+ }, he = (t) => {
622
692
  const e = t?.configurable?.context?.token;
623
693
  return typeof e != "string" || !e.trim() ? null : e;
624
- }, be = (t) => {
694
+ }, fe = (t) => {
625
695
  const e = t?.configurable?.context?.configContext?.primarySolutionsGroupId;
626
696
  return typeof e != "string" || !e.trim() ? null : e;
627
- }, ye = (t) => {
697
+ }, be = (t) => {
628
698
  const e = t?.configurable?.context?.configContext?.portalURL;
629
699
  if (!(typeof e != "string" || !e.trim()))
630
700
  return `${e.replace(/\/+$/, "")}/sharing/rest`;
631
- }, _t = async (t) => {
701
+ }, Et = async (t) => {
632
702
  await Promise.all([
633
- ve(t),
634
- Q(t)
703
+ xe(t),
704
+ W(t)
635
705
  ]);
636
- }, xe = async (t) => {
637
- const e = fe(t);
638
- (!M || e && e !== P) && (P = e ?? P, M = _t(t).catch((n) => {
639
- throw M = null, P = null, n;
640
- })), await M;
706
+ }, ye = async (t) => {
707
+ const e = he(t);
708
+ (!R || e && e !== M) && (M = e ?? M, R = Et(t).catch((n) => {
709
+ throw R = null, M = null, n;
710
+ })), await R;
641
711
  };
642
- async function ve(t) {
712
+ async function xe(t) {
643
713
  if ($) return $;
644
- const e = be(t);
714
+ const e = fe(t);
645
715
  if (!e)
646
716
  return console.warn("Solution Builder: missing primarySolutionsGroupId in appConfig; skipping embeddings load."), null;
647
- const s = ye(t), n = t?.configurable?.context?.configContext?.portalURL;
717
+ const s = be(t), n = t?.configurable?.context?.configContext?.portalURL;
648
718
  await new Ue(n ? { url: n } : void 0).load();
649
- const o = fe(t) ?? void 0, a = await St(e, o, s);
719
+ const o = he(t) ?? void 0, a = await _t(e, o, s);
650
720
  return a ? ($ = a.items, $) : null;
651
721
  }
652
- const kt = () => Object.entries(A).map(([t, e]) => `ID: ${t}
722
+ const At = () => Object.entries(D).map(([t, e]) => `ID: ${t}
653
723
  Label: ${e.label}
654
724
  Description: ${e.description}`).join(`
655
725
 
656
- `), Tt = (t) => {
726
+ `), Lt = (t) => {
657
727
  const e = t?.configurable?.context?.solutionDesignJson;
658
728
  if (typeof e != "string" || !e.trim())
659
729
  return null;
660
730
  try {
661
- const s = JSON.parse(e), n = _(
731
+ const s = JSON.parse(e), n = I(
662
732
  { response: "", ...s },
663
733
  { itemId: s?.solution?.itemId ?? null }
664
- ), i = H.safeParse(n);
734
+ ), i = V.safeParse(n);
665
735
  if (!i.success)
666
736
  return null;
667
- const { response: o, ...a } = i.data, l = s.templateId, d = typeof l == "string" && V(l) ? l : null;
668
- return _(
737
+ const { response: o, ...a } = i.data, l = s.templateId, u = typeof l == "string" && H(l) ? l : null;
738
+ return I(
669
739
  a,
670
740
  {
671
741
  sourceBuildSolution: s.sourceBuildSolution,
672
- templateId: d,
742
+ templateId: u,
673
743
  params: s.params ?? null
674
744
  }
675
745
  );
676
746
  } catch {
677
747
  return null;
678
748
  }
679
- }, Et = b.Root({
749
+ }, Dt = b.Root({
680
750
  ...J(),
681
751
  /** Optional human-readable template description retained for UI use. */
682
752
  templateDescription: b({
@@ -708,145 +778,145 @@ Description: ${e.description}`).join(`
708
778
  reducer: (t = null, e) => e === void 0 ? t : e ?? null,
709
779
  default: () => null
710
780
  })
711
- }), At = (t, e) => {
712
- const s = Tt(e), n = s?.templateId ?? null, i = {};
781
+ }), Ft = (t, e) => {
782
+ const s = Lt(e), n = s?.templateId ?? null, i = {};
713
783
  return JSON.stringify(t.currentDesign) !== JSON.stringify(s) && (i.currentDesign = s), n && t.selectedTemplate !== n && (i.selectedTemplate = n), i;
714
- }, Dt = async (t, e) => {
715
- await w({ text: f("understandingRequest", e) }, e), await xe(e);
716
- const s = t.agentExecutionContext.userRequest, n = kt(), i = t.agentExecutionContext.messages.slice(-11), o = await D({
717
- promptText: await y(L, "initialAssessment"),
784
+ }, $t = async (t, e) => {
785
+ await v({ text: f("understandingRequest", e) }, e), await ye(e);
786
+ const s = t.agentExecutionContext.userRequest, n = At(), i = t.agentExecutionContext.messages.slice(-11), o = await E({
787
+ promptText: await y(T, "initialAssessment"),
718
788
  modelTier: "advanced",
719
789
  temperature: 0,
720
- schema: mt,
790
+ schema: gt,
721
791
  messages: i,
722
792
  inputVariables: { query: s, availableTemplates: n }
723
793
  }), a = o.matchedTemplates.filter(
724
- (c) => V(c.templateId)
794
+ (d) => H(d.templateId)
725
795
  ), l = {
726
796
  ...o,
727
797
  matchedTemplates: a
728
- }, [d, u] = a, m = !!d && d.confidence >= ht && (u === void 0 || d.confidence - u.confidence >= ft) ? d.templateId : null;
798
+ }, [u, c] = a, h = !!u && u.confidence >= yt && (c === void 0 || u.confidence - c.confidence >= xt) ? u.templateId : null;
729
799
  return {
730
800
  assessment: l,
731
- selectedTemplate: m,
801
+ selectedTemplate: h,
732
802
  existingMatches: [],
733
803
  continueBuilding: null
734
804
  };
735
- }, Lt = (t) => {
805
+ }, Rt = (t) => {
736
806
  const e = t.assessment?.assistantResponse ?? "";
737
807
  return {
738
808
  outputMessage: e,
739
809
  summary: e,
740
810
  status: "success"
741
811
  };
742
- }, Rt = (t, e) => {
812
+ }, Mt = (t, e) => {
743
813
  const { hitlResponse: s } = e.configurable, n = "selectTemplate", i = t.assessment?.matchedTemplates.filter(
744
- (u) => V(u.templateId)
745
- ) ?? [], o = i.map((u) => `${u.templateDescription}`);
814
+ (c) => H(c.templateId)
815
+ ) ?? [], o = i.map((c) => `${c.templateDescription}`);
746
816
  if (s?.agentId !== "solutionBuilder" || s.id !== n) {
747
- const u = {
817
+ const c = {
748
818
  agentId: "solutionBuilder",
749
819
  id: n,
750
820
  kind: "singleSelection",
751
821
  message: f("selectTemplatePrompt", e),
752
822
  metadata: [...o]
753
823
  };
754
- throw new ie(u);
824
+ throw new ne(c);
755
825
  }
756
- const a = String(s.payload ?? ""), l = o.findIndex((u) => u === a);
826
+ const a = String(s.payload ?? ""), l = o.findIndex((c) => c === a);
757
827
  return {
758
828
  selectedTemplate: (l >= 0 ? i[l] : void 0)?.templateId ?? i[0]?.templateId ?? null
759
829
  };
760
- }, $t = async (t, e) => {
761
- await w({ text: f("searchingExistingSolutions", e) }, e);
762
- const s = t.agentExecutionContext.userRequest, n = tt(t.agentExecutionContext.messages) || s, i = await ve(e);
830
+ }, Nt = async (t, e) => {
831
+ await v({ text: f("searchingExistingSolutions", e) }, e);
832
+ const s = t.agentExecutionContext.userRequest, n = tt(t.agentExecutionContext.messages) || s, i = await xe(e);
763
833
  if (!i)
764
834
  return console.warn("Solutions Search: failed to load solution embeddings cache; skipping search."), { existingMatches: [] };
765
835
  if (!i.length)
766
836
  return { existingMatches: [] };
767
- const [o] = await Pe([n]), a = i.map((c) => ({
768
- solution: c,
769
- score: Fe(o, c.embedding)
837
+ const [o] = await Me([n]), a = i.map((d) => ({
838
+ solution: d,
839
+ score: Ne(o, d.embedding)
770
840
  }));
771
- a.sort((c, g) => g.score - c.score);
772
- const l = a.slice(0, gt);
841
+ a.sort((d, g) => g.score - d.score);
842
+ const l = a.slice(0, bt);
773
843
  if (!l.length)
774
844
  return { existingMatches: [] };
775
- const d = l.map(({ solution: c }) => `${c.title}
776
- Snippet: ${c.snippet}
777
- Description: ${c.description}`).join(`
845
+ const u = l.map(({ solution: d }) => `${d.title}
846
+ Snippet: ${d.snippet}
847
+ Description: ${d.description}`).join(`
778
848
 
779
- `), u = t.agentExecutionContext.messages.slice(-11);
780
- return { existingMatches: (await D({
781
- promptText: await y(L, "findExistingSolution"),
849
+ `), c = t.agentExecutionContext.messages.slice(-11);
850
+ return { existingMatches: (await E({
851
+ promptText: await y(T, "findExistingSolution"),
782
852
  modelTier: "fast",
783
853
  temperature: 0,
784
- schema: ut,
785
- messages: u,
786
- inputVariables: { query: s, candidates: d }
787
- })).matchedTitles.map((c) => l.find(({ solution: g }) => g.title === c)).filter((c) => c !== void 0) };
788
- }, Mt = (t, e) => {
854
+ schema: pt,
855
+ messages: c,
856
+ inputVariables: { query: s, candidates: u }
857
+ })).matchedTitles.map((d) => l.find(({ solution: g }) => g.title === d)).filter((d) => d !== void 0) };
858
+ }, Pt = (t, e) => {
789
859
  const { existingMatches: s } = t, { hitlResponse: n } = e.configurable, i = `confirmExistingSolution:${s[0].solution.id}`;
790
860
  if (n?.agentId !== "solutionBuilder" || n.id !== i) {
791
- s.length === 1 ? ce(s[0].solution.id) : le(s);
792
- const d = f("existingSolutionMatch", e), u = [
861
+ s.length === 1 ? le(s[0].solution.id) : re(s);
862
+ const u = f("existingSolutionMatch", e), c = [
793
863
  f("continueBuildingYes", e),
794
864
  f("continueBuildingNo", e)
795
- ], h = {
865
+ ], m = {
796
866
  agentId: "solutionBuilder",
797
867
  id: i,
798
868
  kind: "singleSelection",
799
- message: d,
800
- metadata: u
869
+ message: u,
870
+ metadata: c
801
871
  };
802
- throw new ie(h);
872
+ throw new ne(m);
803
873
  }
804
874
  const o = String(n.payload ?? "").trim(), a = f("continueBuildingNo", e);
805
875
  return { continueBuilding: o !== a };
806
- }, Pt = (t, e) => {
876
+ }, Bt = (t, e) => {
807
877
  const s = f("continueBuildingDeclined", e);
808
878
  return {
809
879
  outputMessage: s,
810
880
  summary: s,
811
881
  status: "success"
812
882
  };
813
- }, we = async (t, e) => {
814
- await xe(e);
883
+ }, ve = async (t, e) => {
884
+ await ye(e);
815
885
  const { currentDesign: s } = t, n = t.agentExecutionContext.userRequest;
816
- await w({ text: f("creatingDesign", e) }, e);
817
- let i = F(t.selectedTemplate);
818
- if (i?.initialTemplate || (await Q(e), i = F(t.selectedTemplate)), !i?.initialTemplate)
886
+ await v({ text: f("creatingDesign", e) }, e);
887
+ let i = N(t.selectedTemplate);
888
+ if (i?.initialTemplate || (await W(e), i = N(t.selectedTemplate)), !i?.initialTemplate)
819
889
  throw new Error("No hydrated templates are available for solution design.");
820
- const o = _(
890
+ const o = I(
821
891
  s ?? i.initialTemplate,
822
892
  {
823
893
  itemId: (s ?? i.initialTemplate)?.solution?.itemId ?? null,
824
894
  sourceBuildSolution: s?.sourceBuildSolution ?? i.initialTemplate.sourceBuildSolution,
825
895
  params: s?.params ?? i.initialTemplate.params ?? null
826
896
  }
827
- ), a = t.agentExecutionContext.messages.slice(-11), l = await D({
828
- promptText: await y(L, "designSolution"),
897
+ ), a = t.agentExecutionContext.messages.slice(-11), l = await E({
898
+ promptText: await y(T, "designSolution"),
829
899
  modelTier: "advanced",
830
900
  temperature: 0,
831
- schema: H,
901
+ schema: V,
832
902
  messages: a,
833
903
  inputVariables: {
834
- currentDesign: JSON.stringify(ae(o)),
904
+ currentDesign: JSON.stringify(oe(o)),
835
905
  templateInstructions: i.instructions,
836
906
  query: n
837
907
  }
838
- }), { response: d, featureLayer: u, ...h } = l, m = re(
839
- u,
908
+ }), { response: u, featureLayer: c, ...m } = l, h = ae(
909
+ c,
840
910
  o.featureLayer
841
- ), c = _(
842
- { ...h, featureLayer: m },
911
+ ), d = I(
912
+ { ...m, featureLayer: h },
843
913
  {
844
914
  itemId: o?.solution?.itemId,
845
915
  sourceBuildSolution: o.sourceBuildSolution,
846
916
  templateId: t.selectedTemplate ?? null,
847
917
  params: o.params ?? null
848
918
  }
849
- ), g = new me(c, i.initialTemplate);
919
+ ), g = new pe(d, i.initialTemplate);
850
920
  if (!g.isValid)
851
921
  return console.warn(
852
922
  "[SolutionBuilder] designSolution validation failed:",
@@ -854,33 +924,33 @@ Description: ${c.description}`).join(`
854
924
  ), {
855
925
  outputMessage: f("createDesignFailed", e)
856
926
  };
857
- const x = c.sourceBuildSolution, S = he(c, x);
858
- if (!S.ok) {
927
+ const A = d.sourceBuildSolution, C = ge(d, A);
928
+ if (!C.ok) {
859
929
  console.warn(
860
930
  "[SolutionBuilder] designSolution Esri JSON conversion failed:",
861
- { error: S.error, llmResponse: l, design: c }
931
+ { error: C.error, llmResponse: l, design: d }
862
932
  );
863
- const k = f("createDesignFailed", e);
933
+ const _ = f("createDesignFailed", e);
864
934
  return {
865
- outputMessage: k,
866
- summary: k,
935
+ outputMessage: _,
936
+ summary: _,
867
937
  status: "success"
868
938
  };
869
939
  }
870
- return ge(c), {
871
- outputMessage: d,
872
- summary: d,
940
+ return me(d), {
941
+ outputMessage: u,
942
+ summary: u,
873
943
  status: "success",
874
- currentDesign: c
944
+ currentDesign: d
875
945
  };
876
- }, Ft = async (t, e) => {
946
+ }, qt = async (t, e) => {
877
947
  const { currentDesign: s } = t;
878
948
  if (!s)
879
- return we(t, e);
949
+ return ve(t, e);
880
950
  const n = t.agentExecutionContext.userRequest, i = t.agentExecutionContext.messages.slice(-11);
881
- await w({ text: f("updatingDesign", e) }, e);
882
- const o = await D({
883
- promptText: await y(L, "updateDesign"),
951
+ await v({ text: f("updatingDesign", e) }, e);
952
+ const o = await E({
953
+ promptText: await y(T, "updateDesign"),
884
954
  modelTier: "advanced",
885
955
  temperature: 0,
886
956
  schema: dt,
@@ -896,12 +966,12 @@ Description: ${c.description}`).join(`
896
966
  summary: a,
897
967
  status: "success"
898
968
  };
899
- const d = (p) => {
969
+ const u = (p) => {
900
970
  try {
901
971
  return JSON.parse(p);
902
972
  } catch {
903
- const C = p.replace(/[\u0000-\u001F]/g, (Z) => {
904
- switch (Z) {
973
+ const S = p.replace(/[\u0000-\u001F]/g, (Y) => {
974
+ switch (Y) {
905
975
  case "\b":
906
976
  return "\\b";
907
977
  case "\f":
@@ -914,45 +984,45 @@ Description: ${c.description}`).join(`
914
984
  case " ":
915
985
  return "\\t";
916
986
  default:
917
- return "\\u" + Z.charCodeAt(0).toString(16).padStart(4, "0");
987
+ return "\\u" + Y.charCodeAt(0).toString(16).padStart(4, "0");
918
988
  }
919
989
  });
920
990
  try {
921
- return JSON.parse(C);
991
+ return JSON.parse(S);
922
992
  } catch {
923
993
  return p;
924
994
  }
925
995
  }
926
- }, h = [...l.map((p) => ({
996
+ }, m = [...l.map((p) => ({
927
997
  op: p.op,
928
998
  path: p.path.replace(/\/+$/, ""),
929
- ...p.value != null && p.value !== "" ? { value: d(p.value) } : {},
999
+ ...p.value != null && p.value !== "" ? { value: u(p.value) } : {},
930
1000
  ...p.from != null && p.from !== "" ? { from: p.from } : {}
931
- }))].sort((p, C) => p.op !== "remove" || C.op !== "remove" ? 0 : C.path.localeCompare(p.path, void 0, { numeric: !0 })), m = structuredClone(
932
- ae(s)
1001
+ }))].sort((p, S) => p.op !== "remove" || S.op !== "remove" ? 0 : S.path.localeCompare(p.path, void 0, { numeric: !0 })), h = structuredClone(
1002
+ oe(s)
933
1003
  );
934
1004
  try {
935
- Ne(m, h, !0);
1005
+ Be(h, m, !0);
936
1006
  } catch (p) {
937
1007
  console.warn(
938
1008
  "[SolutionBuilder] updateDesign JSON patch failed:",
939
- { error: p, llmResponse: o, patches: h, patchTarget: m }
1009
+ { error: p, llmResponse: o, patches: m, patchTarget: h }
940
1010
  );
941
- const C = f("applyChangeFailed", e);
1011
+ const S = f("applyChangeFailed", e);
942
1012
  return {
943
- outputMessage: C,
944
- summary: C,
1013
+ outputMessage: S,
1014
+ summary: S,
945
1015
  status: "success"
946
1016
  };
947
1017
  }
948
- const c = _(
949
- { response: "", ...m },
1018
+ const d = I(
1019
+ { response: "", ...h },
950
1020
  { itemId: s.solution?.itemId ?? null }
951
- ), g = H.safeParse(c);
1021
+ ), g = V.safeParse(d);
952
1022
  if (!g.success) {
953
1023
  console.warn(
954
1024
  "[SolutionBuilder] updateDesign schema validation failed:",
955
- { errors: g.error.issues, llmResponse: o, patchedDesign: c }
1025
+ { errors: g.error.issues, llmResponse: o, patchedDesign: d }
956
1026
  );
957
1027
  const p = f("applyChangeFailed", e);
958
1028
  return {
@@ -961,11 +1031,11 @@ Description: ${c.description}`).join(`
961
1031
  status: "success"
962
1032
  };
963
1033
  }
964
- const { response: x, featureLayer: S, ...k } = g.data, q = re(
965
- S,
1034
+ const { response: A, featureLayer: C, ..._ } = g.data, Se = ae(
1035
+ C,
966
1036
  s.featureLayer
967
- ), I = _(
968
- { ...k, featureLayer: q },
1037
+ ), w = I(
1038
+ { ..._, featureLayer: Se },
969
1039
  {
970
1040
  itemId: s.solution?.itemId,
971
1041
  sourceBuildSolution: s.sourceBuildSolution,
@@ -973,22 +1043,33 @@ Description: ${c.description}`).join(`
973
1043
  params: s.params ?? null
974
1044
  }
975
1045
  );
976
- let R = F(t.selectedTemplate);
977
- if (R?.initialTemplate || (await Q(e), R = F(t.selectedTemplate)), !R?.initialTemplate)
1046
+ let F = N(t.selectedTemplate);
1047
+ if (F?.initialTemplate || (await W(e), F = N(t.selectedTemplate)), !F?.initialTemplate)
978
1048
  throw new Error("No hydrated templates are available for solution design.");
979
- const K = new me(I, R.initialTemplate, !1);
980
- if (!K.isValid)
981
- return console.warn(
1049
+ const q = new pe(w, F.initialTemplate, !1);
1050
+ if (!q.isValid) {
1051
+ console.warn(
982
1052
  "[SolutionBuilder] updateDesign validation failed:",
983
- { issues: K.issues, llmResponse: o, patchedDesign: I }
984
- ), {
985
- outputMessage: f("applyChangeFailed", e)
1053
+ { issues: q.issues, llmResponse: o, patchedDesign: w }
1054
+ );
1055
+ const p = await ft({
1056
+ query: n,
1057
+ validationIssues: q.issues,
1058
+ recentMessages: i,
1059
+ fallbackMessage: f("applyChangeFailed", e),
1060
+ promptModules: T
1061
+ });
1062
+ return {
1063
+ outputMessage: p,
1064
+ summary: p,
1065
+ status: "success"
986
1066
  };
987
- const Ie = I.sourceBuildSolution, Y = he(I, Ie);
988
- if (!Y.ok) {
1067
+ }
1068
+ const Ie = w.sourceBuildSolution, Q = ge(w, Ie);
1069
+ if (!Q.ok) {
989
1070
  console.warn(
990
1071
  "[SolutionBuilder] updateDesign Esri JSON conversion failed:",
991
- { error: Y.error, llmResponse: o, design: I }
1072
+ { error: Q.error, llmResponse: o, design: w }
992
1073
  );
993
1074
  const p = f("applyChangeFailed", e);
994
1075
  return {
@@ -997,44 +1078,44 @@ Description: ${c.description}`).join(`
997
1078
  status: "success"
998
1079
  };
999
1080
  }
1000
- return ge(I), {
1081
+ return me(w), {
1001
1082
  outputMessage: a,
1002
1083
  summary: a,
1003
1084
  status: "success",
1004
- currentDesign: I
1085
+ currentDesign: w
1005
1086
  };
1006
- }, Bt = (t) => t.currentDesign !== null ? "updateDesign" : "assessInitialRequest", Nt = (t) => !t.assessment || !t.assessment.isValidUseCase ? "invalidUseCaseExit" : !t.selectedTemplate && t.assessment.matchedTemplates.length > 1 ? "selectTemplateHIL" : "findExistingSolutions", qt = (t) => t.existingMatches.length > 0 ? "confirmContinueBuildingHIL" : "designSolution", Ut = (t) => t.continueBuilding === !1 ? "declineContinueBuildingExit" : "designSolution", Ot = () => new z(Et).addNode("syncCurrentDesignFromContext", At).addNode("assessInitialRequest", Dt).addNode("invalidUseCaseExit", Lt).addNode("selectTemplateHIL", Rt).addNode("findExistingSolutions", $t).addNode("confirmContinueBuildingHIL", Mt).addNode("declineContinueBuildingExit", Pt).addNode("designSolution", we).addNode("updateDesign", Ft).addEdge(j, "syncCurrentDesignFromContext").addConditionalEdges("syncCurrentDesignFromContext", Bt, {
1087
+ }, Ut = (t) => t.currentDesign !== null ? "updateDesign" : "assessInitialRequest", Ot = (t) => !t.assessment || !t.assessment.isValidUseCase ? "invalidUseCaseExit" : !t.selectedTemplate && t.assessment.matchedTemplates.length > 1 ? "selectTemplateHIL" : "findExistingSolutions", zt = (t) => t.existingMatches.length > 0 ? "confirmContinueBuildingHIL" : "designSolution", jt = (t) => t.continueBuilding === !1 ? "declineContinueBuildingExit" : "designSolution", Jt = () => new z(Dt).addNode("syncCurrentDesignFromContext", Ft).addNode("assessInitialRequest", $t).addNode("invalidUseCaseExit", Rt).addNode("selectTemplateHIL", Mt).addNode("findExistingSolutions", Nt).addNode("confirmContinueBuildingHIL", Pt).addNode("declineContinueBuildingExit", Bt).addNode("designSolution", ve).addNode("updateDesign", qt).addEdge(j, "syncCurrentDesignFromContext").addConditionalEdges("syncCurrentDesignFromContext", Ut, {
1007
1088
  updateDesign: "updateDesign",
1008
1089
  assessInitialRequest: "assessInitialRequest"
1009
- }).addConditionalEdges("assessInitialRequest", Nt, {
1090
+ }).addConditionalEdges("assessInitialRequest", Ot, {
1010
1091
  invalidUseCaseExit: "invalidUseCaseExit",
1011
1092
  selectTemplateHIL: "selectTemplateHIL",
1012
1093
  findExistingSolutions: "findExistingSolutions"
1013
- }).addEdge("invalidUseCaseExit", v).addEdge("selectTemplateHIL", "findExistingSolutions").addConditionalEdges("findExistingSolutions", qt, {
1094
+ }).addEdge("invalidUseCaseExit", x).addEdge("selectTemplateHIL", "findExistingSolutions").addConditionalEdges("findExistingSolutions", zt, {
1014
1095
  confirmContinueBuildingHIL: "confirmContinueBuildingHIL",
1015
1096
  designSolution: "designSolution"
1016
- }).addConditionalEdges("confirmContinueBuildingHIL", Ut, {
1097
+ }).addConditionalEdges("confirmContinueBuildingHIL", jt, {
1017
1098
  declineContinueBuildingExit: "declineContinueBuildingExit",
1018
1099
  designSolution: "designSolution"
1019
- }).addEdge("declineContinueBuildingExit", v).addEdge("designSolution", v).addEdge("updateDesign", v);
1020
- await y(L, "description");
1021
- const zt = E.object({
1022
- tool: E.enum(["explorer", "builder", "other"]).describe("The selected tool based on the user's query."),
1023
- confidence: E.number().min(0).max(1).describe("A confidence score (0.00–1.00)."),
1024
- rationale: E.string().min(1).describe("A brief rationale for the tool choice (≤140 characters)"),
1025
- builderExclusion: E.boolean().describe("True only when tool is other specifically due to Builder Exclusion Override.")
1026
- }), B = /* @__PURE__ */ Object.assign({
1100
+ }).addEdge("declineContinueBuildingExit", x).addEdge("designSolution", x).addEdge("updateDesign", x);
1101
+ await y(T, "description");
1102
+ const Gt = L.object({
1103
+ tool: L.enum(["explorer", "builder", "other"]).describe("The selected tool based on the user's query."),
1104
+ confidence: L.number().min(0).max(1).describe("A confidence score (0.00–1.00)."),
1105
+ rationale: L.string().min(1).describe("A brief rationale for the tool choice (≤140 characters)"),
1106
+ builderExclusion: L.boolean().describe("True only when tool is other specifically due to Builder Exclusion Override.")
1107
+ }), P = /* @__PURE__ */ Object.assign({
1027
1108
  "./prompts/assistantResponse.md": () => import("../../chunks/assistantResponse.js").then((t) => t.default),
1028
1109
  "./prompts/classifyIntent.md": () => import("../../chunks/classifyIntent.js").then((t) => t.default),
1029
1110
  "./prompts/description.md": () => import("../../chunks/description.js").then((t) => t.default),
1030
1111
  "./prompts/responseOptionsBuilderExclusion.md": () => import("../../chunks/responseOptionsBuilderExclusion.js").then((t) => t.default),
1031
1112
  "./prompts/responseOptionsDefault.md": () => import("../../chunks/responseOptionsDefault.js").then((t) => t.default)
1032
- }), W = () => {
1113
+ }), K = () => {
1033
1114
  const t = new CustomEvent("assistantProcessing", {
1034
1115
  detail: !1
1035
1116
  });
1036
1117
  window.dispatchEvent(t);
1037
- }, Se = b.Root({
1118
+ }, we = b.Root({
1038
1119
  ...J(),
1039
1120
  selectedTool: b({
1040
1121
  reducer: (t, e) => e ?? null,
@@ -1048,9 +1129,9 @@ const zt = E.object({
1048
1129
  reducer: (t, e) => e ?? !1,
1049
1130
  default: () => !1
1050
1131
  })
1051
- }), jt = async (t, e) => {
1052
- const s = N(e);
1053
- await w(
1132
+ }), Vt = async (t, e) => {
1133
+ const s = B(e);
1134
+ await v(
1054
1135
  { text: s?.builderMessages.understandingRequest },
1055
1136
  e
1056
1137
  );
@@ -1062,71 +1143,71 @@ const zt = E.object({
1062
1143
  } catch {
1063
1144
  a = !1;
1064
1145
  }
1065
- const l = await y(B, "classifyIntent"), d = await D({
1146
+ const l = await y(P, "classifyIntent"), u = await E({
1066
1147
  promptText: l,
1067
1148
  modelTier: "advanced",
1068
1149
  temperature: 0,
1069
- schema: zt,
1150
+ schema: Gt,
1070
1151
  messages: i,
1071
1152
  inputVariables: { query: n, activeSolutionDesign: a }
1072
1153
  });
1073
1154
  return {
1074
- selectedTool: d.tool,
1075
- intentRationale: d.rationale,
1076
- builderExclusion: d.builderExclusion
1155
+ selectedTool: u.tool,
1156
+ intentRationale: u.rationale,
1157
+ builderExclusion: u.builderExclusion
1077
1158
  };
1078
- }, Jt = async (t, e) => {
1079
- const n = await We().compile().invoke(t, e);
1080
- return W(), n;
1081
- }, Gt = async (t, e) => {
1082
- const n = await Ot().compile().invoke(t, e);
1083
- return W(), n;
1084
1159
  }, Ht = async (t, e) => {
1085
- const s = N(e), n = t.agentExecutionContext.userRequest, i = t.intentRationale ?? "No rationale available.", o = t.builderExclusion ? "responseOptionsBuilderExclusion" : "responseOptionsDefault";
1086
- await w(
1160
+ const n = await Ke().compile().invoke(t, e);
1161
+ return K(), n;
1162
+ }, Wt = async (t, e) => {
1163
+ const n = await Jt().compile().invoke(t, e);
1164
+ return K(), n;
1165
+ }, Kt = async (t, e) => {
1166
+ const s = B(e), n = t.agentExecutionContext.userRequest, i = t.intentRationale ?? "No rationale available.", o = t.builderExclusion ? "responseOptionsBuilderExclusion" : "responseOptionsDefault";
1167
+ await v(
1087
1168
  { text: s?.executingSolutionsAssistantAgent },
1088
1169
  e
1089
1170
  );
1090
- const a = await y(B, "assistantResponse"), l = await y(
1091
- B,
1171
+ const a = await y(P, "assistantResponse"), l = await y(
1172
+ P,
1092
1173
  o
1093
- ), d = t.agentExecutionContext.messages.slice(-11), u = await Be({
1174
+ ), u = t.agentExecutionContext.messages.slice(-11), c = await Pe({
1094
1175
  promptText: a,
1095
1176
  modelTier: "advanced",
1096
1177
  temperature: 0,
1097
- messages: d,
1178
+ messages: u,
1098
1179
  inputVariables: { query: n, rationale: i, responseOptions: l }
1099
1180
  });
1100
- return W(), {
1101
- outputMessage: u,
1102
- summary: u,
1181
+ return K(), {
1182
+ outputMessage: c,
1183
+ summary: c,
1103
1184
  status: "success"
1104
1185
  };
1105
- }, Vt = (t) => t.selectedTool ?? "other", Qt = () => new z(Se).addNode("classifyIntent", jt).addNode("routeToExplorer", Jt).addNode("routeToBuilder", Gt).addNode("assistantResponse", Ht).addEdge(j, "classifyIntent").addConditionalEdges("classifyIntent", Vt, {
1186
+ }, Qt = (t) => t.selectedTool ?? "other", Yt = () => new z(we).addNode("classifyIntent", Vt).addNode("routeToExplorer", Ht).addNode("routeToBuilder", Wt).addNode("assistantResponse", Kt).addEdge(j, "classifyIntent").addConditionalEdges("classifyIntent", Qt, {
1106
1187
  explorer: "routeToExplorer",
1107
1188
  builder: "routeToBuilder",
1108
1189
  other: "assistantResponse"
1109
- }).addEdge("routeToExplorer", v).addEdge("routeToBuilder", v).addEdge("assistantResponse", v), Wt = await y(B, "description"), Kt = {
1190
+ }).addEdge("routeToExplorer", x).addEdge("routeToBuilder", x).addEdge("assistantResponse", x), Xt = await y(P, "description"), Zt = {
1110
1191
  id: "solutionsAssistant",
1111
1192
  name: "Solutions Assistant Agent",
1112
- description: Wt,
1113
- createGraph: Qt,
1114
- workspace: Se
1115
- }, Yt = "https://links.esri.com/solutions/agol-organizational-account", Zt = "https://links.esri.com/solutions/configure-assistants";
1116
- class Xt extends ke {
1193
+ description: Xt,
1194
+ createGraph: Yt,
1195
+ workspace: we
1196
+ }, es = "https://links.esri.com/solutions/agol-organizational-account", ts = "https://links.esri.com/solutions/configure-assistants";
1197
+ class ss extends ke {
1117
1198
  constructor() {
1118
1199
  super(), this.open = !1, this.userFirstName = "", this.builderVisible = !1, this.hasActiveBuilderDesign = !1, this._conversationId = void 0, this._orgSettings = {
1119
1200
  aiAssistantsEnabled: !1,
1120
1201
  blockBetaApps: !0,
1121
1202
  colocateCompute: !1
1122
- }, this._suggestedPrompts = [], this._hasInteracted = !1, this._isMobile = window.innerWidth <= 800, this._translations = _e({ name: "arcgis-solutions-assistant", blocking: !0 }), this._builderWidth = 48, this._solutionDesignJson = '{ "solution": null }', this._isAssistantBusy = !1, this._isBuilderBusy = !1, this._preChatCheck = !1, this._assistantRef = $e(), this._configContextConsumer = te({
1203
+ }, this._suggestedPrompts = [], this._hasInteracted = !1, this._isMobile = window.innerWidth <= 800, this._translations = _e({ name: "arcgis-solutions-assistant", blocking: !0 }), this._builderWidth = 48, this._solutionDesignJson = '{ "solution": null }', this._isAssistantBusy = !1, this._isBuilderBusy = !1, this._preChatCheck = !1, this._assistantRef = $e(), this._configContextConsumer = ee({
1123
1204
  context: Ae,
1124
1205
  subscribe: !0,
1125
1206
  callback: (e) => {
1126
- e?.portalURL && (se.portalUrl = e.portalURL), e?.userSession && !this.userFirstName && this._loadUserFirstName(), e?.authentication?.PortalSubset?.orgSettings && (this._orgSettings = e?.authentication?.PortalSubset?.orgSettings);
1207
+ e?.portalURL && (te.portalUrl = e.portalURL), e?.userSession && !this.userFirstName && this._loadUserFirstName(), e?.authentication?.PortalSubset?.orgSettings && (this._orgSettings = e?.authentication?.PortalSubset?.orgSettings);
1127
1208
  }
1128
- }), this._builderDesignContextConsumer = te({
1129
- context: De,
1209
+ }), this._builderDesignContextConsumer = ee({
1210
+ context: Le,
1130
1211
  subscribe: !0,
1131
1212
  callback: (e) => {
1132
1213
  e?.design && (this._solutionDesignJson = JSON.stringify(e.design, null, 2));
@@ -1172,29 +1253,29 @@ class Xt extends ke {
1172
1253
  this._checkURLOpenParameter();
1173
1254
  }
1174
1255
  load() {
1175
- this._configContextConsumer.value?.portalURL && (se.portalUrl = this._configContextConsumer.value.portalURL);
1256
+ this._configContextConsumer.value?.portalURL && (te.portalUrl = this._configContextConsumer.value.portalURL);
1176
1257
  }
1177
1258
  firstUpdated(e) {
1178
1259
  this._loadUserFirstName();
1179
1260
  }
1180
1261
  willUpdate(e) {
1181
- e.has("open") && this.open && window.dispatchEvent(new CustomEvent("openAssistant")), this._configContextConsumer.value?.authentication && this._configContextConsumer.value?.userSession?.token && (this._preChatCheck || (ue(this._configContextConsumer.value?.authentication.Portal, this._configContextConsumer.value?.userSession?.token, this._configContextConsumer.value?.locale ?? "en"), this._preChatCheck = !0)), this._configContextConsumer.value?.userSession?.token && this._configContextConsumer.value?.authentication?.CanUseAI;
1262
+ e.has("open") && this.open && window.dispatchEvent(new CustomEvent("openAssistant")), this._configContextConsumer.value?.authentication && this._configContextConsumer.value?.userSession?.token && (this._preChatCheck || (de(this._configContextConsumer.value?.authentication.Portal, this._configContextConsumer.value?.userSession?.token, this._configContextConsumer.value?.locale ?? "en"), this._preChatCheck = !0)), this._configContextConsumer.value?.userSession?.token && this._configContextConsumer.value?.authentication?.CanUseAI;
1182
1263
  }
1183
1264
  _renderNoSign() {
1184
- return T`<calcite-notice class="margin-lg" open scale=m icon=effects kind=info><div slot=message>${this._translations.signInMessage}</div><calcite-link @click=${this._handleSignIn} slot=link title=${this._translations.signInMessage ?? ee} class="padding-top-10">${this._translations.signIn}</calcite-link></calcite-notice>`;
1265
+ return k`<calcite-notice class="margin-lg" open scale=m icon=effects kind=info><div slot=message>${this._translations.signInMessage}</div><calcite-link @click=${this._handleSignIn} slot=link title=${this._translations.signInMessage ?? Z} class="padding-top-10">${this._translations.signIn}</calcite-link></calcite-notice>`;
1185
1266
  }
1186
1267
  _renderNoPermission() {
1187
- return T`<calcite-notice open scale=m icon=effects kind=info><div slot=title>${this._translations.noPermissionTitle}</div><div slot=message class="padding-top-10">${Ee(this._translations.noPermissionMessage.replace("{{orgUrl}}", Yt).replace("{{configAI}}", Zt))}</div></calcite-notice>`;
1268
+ return k`<calcite-notice open scale=m icon=effects kind=info><div slot=title>${this._translations.noPermissionTitle}</div><div slot=message class="padding-top-10">${Ee(this._translations.noPermissionMessage.replace("{{orgUrl}}", es).replace("{{configAI}}", ts))}</div></calcite-notice>`;
1188
1269
  }
1189
1270
  render() {
1190
1271
  let e = this._suggestedPrompts.length > 0 ? this._suggestedPrompts : this._hasInteracted ? [] : Object.values(this._translations.defaultFollowUpQuestions);
1191
- return this._suggestedPrompts.length > 0 ? e = this._suggestedPrompts : this._hasInteracted || (e = [...Object.values(this._translations.defaultFollowUpQuestions)]), T`<calcite-panel class="chat-panel"><div class="header-content" slot=header-content><span class="header-title">${this._translations.solutionAssistantTitle}</span></div>${this._configContextConsumer.value?.userSession?.token ? this._configContextConsumer.value?.authentication?.CanUseAI ? T`${!this._isMobile && T`<calcite-action id=solutionBuilderAction icon=pencil-square .text=${this._translations.tooltips.builder} text-enabled .indicator=${this.hasActiveBuilderDesign} .disabled=${!this.hasActiveBuilderDesign} .active=${this.builderVisible} selection-appearance=highlight @click=${() => {
1272
+ return this._suggestedPrompts.length > 0 ? e = this._suggestedPrompts : this._hasInteracted || (e = [...Object.values(this._translations.defaultFollowUpQuestions)]), k`<calcite-panel class="chat-panel"><div class="header-content" slot=header-content><span class="header-title">${this._translations.solutionAssistantTitle}</span></div>${this._configContextConsumer.value?.userSession?.token ? this._configContextConsumer.value?.authentication?.CanUseAI ? k`${!this._isMobile && k`<calcite-action id=solutionBuilderAction icon=pencil-square .text=${this._translations.tooltips.builder} text-enabled .indicator=${this.hasActiveBuilderDesign} .disabled=${!this.hasActiveBuilderDesign} .active=${this.builderVisible} selection-appearance=highlight @click=${() => {
1192
1273
  window.dispatchEvent(new CustomEvent("toggleSolutionBuilder"));
1193
- }} scale=m slot=header-actions-end></calcite-action>` || ""}${!this._isMobile && T`<calcite-tooltip placement=bottom reference-element=solutionBuilderAction><span>${this._translations.tooltips.solutionBuilder}</span></calcite-tooltip>` || ""}<arcgis-assistant reference-element copy-enabled feedback-enabled heading description entry-message=${this._translations.defaultStartUpMessage ?? ee} .suggestedPrompts=${e} @arcgisSubmit=${(s) => {
1274
+ }} scale=m slot=header-actions-end></calcite-action>` || ""}${!this._isMobile && k`<calcite-tooltip placement=bottom reference-element=solutionBuilderAction><span>${this._translations.tooltips.solutionBuilder}</span></calcite-tooltip>` || ""}<arcgis-assistant reference-element copy-enabled feedback-enabled heading description entry-message=${this._translations.defaultStartUpMessage ?? Z} .suggestedPrompts=${e} @arcgisSubmit=${(s) => {
1194
1275
  console.log("arcgis submit: ", s.detail), this._suggestedPrompts = [], e = [], this._hasInteracted = !0;
1195
- const n = Date.now(), i = Re(n), o = s.detail || "Unknown";
1276
+ const n = Date.now(), i = Fe(n), o = s.detail || "Unknown";
1196
1277
  this._telemetry?.logEvent({
1197
- category: Le.ASSISTANT,
1278
+ category: De.ASSISTANT,
1198
1279
  action: "Chat",
1199
1280
  dimensions: [o],
1200
1281
  metrics: [i]
@@ -1207,9 +1288,9 @@ class Xt extends ke {
1207
1288
  this._queryElementInShadowDom(this.el, ".footer-container", !1);
1208
1289
  }} @arcgisInterruptSubmit=${() => {
1209
1290
  this._queryElementInShadowDom(this.el, ".footer-container", !1);
1210
- }} ${Me(this._assistantRef)}><calcite-label alignment=start slot=entry-actions-start layout=inline scale=s><calcite-action id=newChatButton icon=speech-bubble-plus .text=${this._translations.tooltips.newChat} @click=${() => {
1291
+ }} ${Re(this._assistantRef)}><calcite-button appearance=transparent id=newChatButton icon-start=speech-bubble-plus kind=neutral .label=${this._translations.tooltips.newChat} @click=${() => {
1211
1292
  this._conversationId = void 0, this._suggestedPrompts = [], this._hasInteracted = !1, this._assistantRef.value?.clearChatHistory(), this._queryElementInShadowDom(this.el, ".footer-container", !1);
1212
- }} scale=s></calcite-action>${this._translations.tooltips.newChat}</calcite-label><arcgis-assistant-agent .agent=${Kt} .context=${{
1293
+ }} round scale=m slot=entry-actions-start>${this._translations.tooltips.newChat}</calcite-button><arcgis-assistant-agent .agent=${Zt} .context=${{
1213
1294
  token: this._configContextConsumer.value?.userSession?.token,
1214
1295
  configContext: this._configContextConsumer.value,
1215
1296
  convoId: this._conversationId,
@@ -1217,16 +1298,13 @@ class Xt extends ke {
1217
1298
  assistantRef: this._assistantRef,
1218
1299
  translations: this._translations,
1219
1300
  solutionDesignJson: this._solutionDesignJson,
1220
- updateSuggestedPrompts: (s) => {
1221
- this._suggestedPrompts = s;
1222
- },
1223
1301
  setConversationId: (s) => {
1224
1302
  this._conversationId = s;
1225
1303
  },
1226
1304
  clearSuggestedPrompts: () => {
1227
1305
  this._suggestedPrompts = [];
1228
1306
  }
1229
- }}></arcgis-assistant-agent></arcgis-assistant><div slot=footer class="disclaimer-div width-100"><calcite-chip class="beta-chip" appearance=outline kind=neutral .label=${this._translations.betaTag} scale=s>${this._translations.betaTag}</calcite-chip><span>${this._translations.disclaimerMessage} <a href=https://links.esri.com/solutions/security-concern rel="noopener noreferrer" target=_blank>${this._translations.reportConcern}</a></span></div>` : this._renderNoPermission() : this._renderNoSign()}<calcite-action icon=x id=closeAssistantButton .label=${this._translations.tooltips.close} @click=${() => {
1307
+ }}></arcgis-assistant-agent></arcgis-assistant><div slot=footer class="disclaimer-div width-100"><calcite-chip class="beta-chip" appearance=solid kind=neutral .label=${this._translations.betaTag} scale=s>${this._translations.betaTag}</calcite-chip><span>${this._translations.disclaimerMessage} <a href=https://links.esri.com/solutions/security-concern rel="noopener noreferrer" target=_blank>${this._translations.reportConcern}</a></span></div>` : this._renderNoPermission() : this._renderNoSign()}<calcite-action icon=x id=closeAssistantButton .label=${this._translations.tooltips.close} @click=${() => {
1230
1308
  this.closeAssistant.emit(!0);
1231
1309
  }} slot=header-actions-end .text=${this._translations.tooltips.close}></calcite-action><calcite-tooltip placement=bottom reference-element=closeAssistantButton><span>${this._translations.tooltips.close}</span></calcite-tooltip></calcite-panel>`;
1232
1310
  }
@@ -1245,14 +1323,14 @@ class Xt extends ke {
1245
1323
  }
1246
1324
  }
1247
1325
  _parseAgentPickedAndTask(e) {
1248
- const s = Array.from(this._assistantRef.value?.messages || []), n = e.log || [], a = [...s].sort((c, g) => g.id - c.id).find((c) => c.role === "user" && c.id <= e.id)?.content || null, l = n.find((c) => typeof c == "string" && c.includes("Agent picked:")) ?? null;
1326
+ const s = Array.from(this._assistantRef.value?.messages || []), n = e.log || [], a = [...s].sort((d, g) => g.id - d.id).find((d) => d.role === "user" && d.id <= e.id)?.content || null, l = n.find((d) => typeof d == "string" && d.includes("Agent picked:")) ?? null;
1249
1327
  if (!l)
1250
1328
  return { agentPicked: null, taskAssigned: null, userMessage: a };
1251
- const d = /Agent picked:\s*(.*?)\s*(?:\\n|\r?\n)\s*Task Assigned:\s*([\s\S]*)$/i, u = l.match(d);
1252
- if (!u)
1329
+ const u = /Agent picked:\s*(.*?)\s*(?:\\n|\r?\n)\s*Task Assigned:\s*([\s\S]*)$/i, c = l.match(u);
1330
+ if (!c)
1253
1331
  return { agentPicked: null, taskAssigned: null, userMessage: a };
1254
- const h = u[1].trim(), m = u[2].trim();
1255
- return { agentPicked: h, taskAssigned: m, userMessage: a };
1332
+ const m = c[1].trim(), h = c[2].trim();
1333
+ return { agentPicked: m, taskAssigned: h, userMessage: a };
1256
1334
  }
1257
1335
  _emitItemIdFromAI(e) {
1258
1336
  const s = new CustomEvent("solutionIDFromAssistant", {
@@ -1285,7 +1363,7 @@ class Xt extends ke {
1285
1363
  });
1286
1364
  }
1287
1365
  }
1288
- Ce("arcgis-solutions-assistant", Xt);
1366
+ Ce("arcgis-solutions-assistant", ss);
1289
1367
  export {
1290
- Xt as ArcgisSolutionsAssistant
1368
+ ss as ArcgisSolutionsAssistant
1291
1369
  };