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

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 (230) hide show
  1. package/dist/cdn/{D4MZYBH7.js → 4JGB6WLL.js} +1 -1
  2. package/dist/cdn/{7NAC32PQ.js → 4MAZNAHZ.js} +1 -1
  3. package/dist/cdn/{Z6UCVV4K.js → 4RLG6MXK.js} +1 -1
  4. package/dist/cdn/56A5UMZG.js +9 -0
  5. package/dist/cdn/{SAJPXZDW.js → 56XVVIG7.js} +1 -1
  6. package/dist/cdn/{W5FWW67G.js → 5LIR6BQY.js} +1 -1
  7. package/dist/cdn/{OYBEDO63.js → 5MPYPIR2.js} +1 -1
  8. package/dist/cdn/{HO4GBQJG.js → 6Z3DXRF6.js} +1 -1
  9. package/dist/cdn/{HT2HC33W.js → 7FJTZ7VA.js} +1 -1
  10. package/dist/cdn/{GPL6FNKN.js → 7GXMCAWQ.js} +1 -1
  11. package/dist/cdn/{E5EU4SVV.js → 7WD3GNG4.js} +1 -1
  12. package/dist/cdn/{3UJAJDSF.js → AGB374BK.js} +1 -1
  13. package/dist/cdn/{2KSXH2TC.js → AHB7W7RI.js} +1 -1
  14. package/dist/cdn/{6ID6N5BF.js → BGLTC5SO.js} +1 -1
  15. package/dist/cdn/{SSH4MSHE.js → BVSSQNES.js} +1 -1
  16. package/dist/cdn/{CEWRVOKP.js → C4OXBZJK.js} +1 -1
  17. package/dist/cdn/{SXVCHOTK.js → DFZZNKPK.js} +3 -6
  18. package/dist/cdn/{B33EUN4X.js → DKEYOEI7.js} +1 -1
  19. package/dist/cdn/{5UIJ4Z3C.js → DNPN62O5.js} +1 -1
  20. package/dist/cdn/{QTZMCFZB.js → E5E6J57F.js} +22 -22
  21. package/dist/cdn/{KEOBSFBN.js → EPOIEXNS.js} +1 -1
  22. package/dist/cdn/{JMCZPJDW.js → FVOCVCEE.js} +1 -1
  23. package/dist/cdn/{PV6MK2E6.js → FYT4Q5GJ.js} +1 -1
  24. package/dist/cdn/H2UL463J.js +2 -0
  25. package/dist/cdn/{FMTXVLZB.js → I22C4HE4.js} +1 -1
  26. package/dist/cdn/{SRT2KXZG.js → IEOFEUZI.js} +1 -1
  27. package/dist/cdn/ILLTWR2W.js +2 -0
  28. package/dist/cdn/{P2TNN5UL.js → J3HJC4SO.js} +1 -1
  29. package/dist/cdn/K4TDKKPB.js +18 -0
  30. package/dist/cdn/{23LRX7AS.js → KSQHSNTW.js} +1 -1
  31. package/dist/cdn/{CB7QDBRG.js → KUGXNF5Y.js} +1 -1
  32. package/dist/cdn/{52QHFDTC.js → LEK4P4OY.js} +1 -1
  33. package/dist/cdn/LKZFKOG4.js +2 -0
  34. package/dist/cdn/{TSYIZSCP.js → LYAXTCCM.js} +11 -1
  35. package/dist/cdn/{TFTW5B3R.js → MC5ARLKZ.js} +1 -1
  36. package/dist/cdn/{DNZ5U52C.js → MT5J66WR.js} +1 -1
  37. package/dist/cdn/{IFI66PVI.js → MVF7I3RU.js} +1 -1
  38. package/dist/cdn/{F3NG6RFP.js → NIHPHDXG.js} +31 -18
  39. package/dist/cdn/{UFPB7JD3.js → P67K4TAX.js} +1 -1
  40. package/dist/cdn/{ZIX74MNU.js → PPRV6EZZ.js} +1 -1
  41. package/dist/cdn/{PZW6JMSM.js → PUCDO65D.js} +1 -1
  42. package/dist/cdn/Q5TICZRX.js +15 -0
  43. package/dist/cdn/{GSD6O5J7.js → QHDEVLC3.js} +1 -1
  44. package/dist/cdn/{HNWINTTY.js → QQEYWBVV.js} +1 -1
  45. package/dist/cdn/{CUJ3M6UT.js → RRD4QUQS.js} +1 -1
  46. package/dist/cdn/{GWWU6HWB.js → RSCBZIAN.js} +17 -19
  47. package/dist/cdn/RUF6QBY7.js +2 -0
  48. package/dist/cdn/{UY5JVVRO.js → S5AQVTR2.js} +1 -1
  49. package/dist/cdn/S6U6SXMD.js +2 -0
  50. package/dist/cdn/{H7J2FXMS.js → SGQBWAPU.js} +1 -1
  51. package/dist/cdn/{MEDCFXMB.js → SOLCNPHW.js} +1 -1
  52. package/dist/cdn/{BQE2XAKC.js → SSIUWTQX.js} +1 -1
  53. package/dist/cdn/{AYQT4HC4.js → SYZEWVHU.js} +1 -1
  54. package/dist/cdn/{KGSB4I6Y.js → TWJSFINX.js} +1 -1
  55. package/dist/cdn/{VEDAG7UO.js → TX3LBQ6V.js} +1 -1
  56. package/dist/cdn/{ATHNXWV4.js → U3CNAJQZ.js} +115 -115
  57. package/dist/cdn/{RMCQZMLA.js → U4RHWD57.js} +1 -1
  58. package/dist/cdn/{UM3P3Q52.js → U6JZYJ4D.js} +1 -1
  59. package/dist/cdn/{PQNFWMST.js → ULFPP7PF.js} +1 -1
  60. package/dist/cdn/{N5D5ABJ6.js → UOGZGAJD.js} +1 -1
  61. package/dist/cdn/{NWCKV677.js → VBJSVR6T.js} +1 -1
  62. package/dist/cdn/WGS5W6W5.js +2 -0
  63. package/dist/cdn/{RPEQD2MH.js → WLM4HMMF.js} +1 -1
  64. package/dist/cdn/{MOH6GREK.js → X6JL6SAH.js} +1 -1
  65. package/dist/cdn/{DGNAMFJN.js → XBFG3KX6.js} +6 -2
  66. package/dist/cdn/{TIF36KTA.js → XXGM7HGO.js} +1 -1
  67. package/dist/cdn/{BLCW2CZO.js → Y77RX7KL.js} +1 -1
  68. package/dist/cdn/{ICSHJV2N.js → ZCSF2MJ5.js} +1 -1
  69. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ar.json +1 -1
  70. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.bg.json +1 -1
  71. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.bs.json +1 -1
  72. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ca.json +1 -1
  73. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.cs.json +1 -1
  74. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.da.json +1 -1
  75. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.de.json +1 -1
  76. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.el.json +1 -1
  77. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.en.json +1 -1
  78. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.es.json +1 -1
  79. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.et.json +1 -1
  80. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.fi.json +1 -1
  81. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.fr.json +1 -1
  82. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.he.json +1 -1
  83. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.hr.json +1 -1
  84. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.hu.json +1 -1
  85. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.id.json +1 -1
  86. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.it.json +1 -1
  87. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ja.json +1 -1
  88. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.json +1 -1
  89. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ko.json +1 -1
  90. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.lt.json +1 -1
  91. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.lv.json +1 -1
  92. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.nl.json +1 -1
  93. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.no.json +1 -1
  94. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.pl.json +1 -1
  95. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.pt-BR.json +1 -1
  96. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.pt-PT.json +1 -1
  97. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ro.json +1 -1
  98. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.ru.json +1 -1
  99. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.sk.json +1 -1
  100. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.sl.json +1 -1
  101. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.sr.json +1 -1
  102. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.sv.json +1 -1
  103. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.th.json +1 -1
  104. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.tr.json +1 -1
  105. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.uk.json +1 -1
  106. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.vi.json +1 -1
  107. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.zh-CN.json +1 -1
  108. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.zh-HK.json +1 -1
  109. package/dist/cdn/assets/arcgis-solutions-assistant/t9n/messages.zh-TW.json +1 -1
  110. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ar.json +1 -1
  111. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.bg.json +1 -1
  112. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.bs.json +1 -1
  113. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ca.json +1 -1
  114. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.cs.json +1 -1
  115. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.da.json +1 -1
  116. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.de.json +1 -1
  117. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.el.json +1 -1
  118. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.en.json +1 -1
  119. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.es.json +1 -1
  120. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.et.json +1 -1
  121. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.fi.json +1 -1
  122. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.fr.json +1 -1
  123. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.he.json +1 -1
  124. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.hr.json +1 -1
  125. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.hu.json +1 -1
  126. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.id.json +1 -1
  127. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.it.json +1 -1
  128. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ja.json +1 -1
  129. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.json +1 -1
  130. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ko.json +1 -1
  131. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.lt.json +1 -1
  132. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.lv.json +1 -1
  133. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.nl.json +1 -1
  134. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.no.json +1 -1
  135. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pl.json +1 -1
  136. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pt-BR.json +1 -1
  137. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.pt-PT.json +1 -1
  138. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ro.json +1 -1
  139. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.ru.json +1 -1
  140. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sk.json +1 -1
  141. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sl.json +1 -1
  142. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sr.json +1 -1
  143. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.sv.json +1 -1
  144. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.th.json +1 -1
  145. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.tr.json +1 -1
  146. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.uk.json +1 -1
  147. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.vi.json +1 -1
  148. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-CN.json +1 -1
  149. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-HK.json +1 -1
  150. package/dist/cdn/assets/solution-builder-assistant/t9n/messages.zh-TW.json +1 -1
  151. package/dist/cdn/assets/solution-deployed-card/t9n/messages.en.json +1 -1
  152. package/dist/cdn/assets/solution-deployed-card/t9n/messages.json +1 -1
  153. package/dist/cdn/index.js +1 -1
  154. package/dist/chunks/Auth.js +1 -1
  155. package/dist/chunks/CardsFetcher.js +2 -2
  156. package/dist/chunks/assistantResponse.js +17 -19
  157. package/dist/chunks/cardsHelpers.js +12 -12
  158. package/dist/chunks/classifyIntent.js +31 -18
  159. package/dist/chunks/converter.js +114 -105
  160. package/dist/chunks/description.js +7 -3
  161. package/dist/chunks/designSolution.js +11 -1
  162. package/dist/chunks/downloadUtils.js +5 -5
  163. package/dist/chunks/getRelatedInfos.js +1 -1
  164. package/dist/chunks/helpers.js +75 -55
  165. package/dist/chunks/initialAssessment.js +3 -6
  166. package/dist/chunks/interfaces.js +45 -41
  167. package/dist/chunks/mapViewUtils.js +9 -9
  168. package/dist/chunks/popupUtils.js +1 -1
  169. package/dist/chunks/queryUtils.js +3 -3
  170. package/dist/chunks/responseOptionsBuilderExclusion.js +12 -0
  171. package/dist/chunks/responseOptionsDefault.js +18 -0
  172. package/dist/chunks/solution-builder-assistant.js +58 -28
  173. package/dist/chunks/solution-deploy-dialog.js +157 -153
  174. package/dist/chunks/solutions-deploy-app-nav.js +3 -4
  175. package/dist/chunks/templates.js +6 -6
  176. package/dist/chunks/updateDesign.js +1 -1
  177. package/dist/chunks/validators.js +6 -6
  178. package/dist/components/arcgis-solutions-assistant/customElement.d.ts +8 -0
  179. package/dist/components/arcgis-solutions-assistant/customElement.js +262 -191
  180. package/dist/components/arcgis-solutions-assistant/index.js +1 -0
  181. package/dist/components/card-manager/customElement.js +6 -6
  182. package/dist/components/create-feature/customElement.js +1 -1
  183. package/dist/components/crowdsource-manager/customElement.js +1 -1
  184. package/dist/components/crowdsource-reporter/customElement.js +2 -2
  185. package/dist/components/edit-card/customElement.js +1 -1
  186. package/dist/components/feature-details/customElement.js +1 -1
  187. package/dist/components/feature-list/customElement.js +1 -1
  188. package/dist/components/layer-list/customElement.js +1 -1
  189. package/dist/components/layer-table/customElement.js +2 -2
  190. package/dist/components/map-card/customElement.js +2 -2
  191. package/dist/components/map-layer-picker/customElement.js +1 -1
  192. package/dist/components/map-select-tools/customElement.js +2 -2
  193. package/dist/components/pdf-download/customElement.js +1 -1
  194. package/dist/components/public-notification/customElement.js +2 -2
  195. package/dist/components/refine-selection/customElement.js +2 -2
  196. package/dist/components/selection-tool/customElement.js +1 -1
  197. package/dist/components/solution-builder-assistant/customElement.d.ts +8 -2
  198. package/dist/components/solution-builder-assistant/customElement.js +3 -2
  199. package/dist/components/solution-builder-assistant/index.js +1 -0
  200. package/dist/components/solution-configure-titles/customElement.js +6 -6
  201. package/dist/components/solution-delete-dialog/customElement.js +2 -2
  202. package/dist/components/solution-deployed-card/customElement.js +2 -2
  203. package/dist/components/solution-deployed-card-panel/customElement.js +3 -3
  204. package/dist/components/solution-details-card/customElement.js +2 -2
  205. package/dist/components/solution-details-panel/customElement.js +2 -2
  206. package/dist/components/solution-resource-card/customElement.js +1 -1
  207. package/dist/components/solution-snapshot-gallery/customElement.js +2 -2
  208. package/dist/components/solution-social-share/customElement.js +1 -1
  209. package/dist/components/solution-user-avatar/customElement.js +1 -1
  210. package/dist/components/solutions-all-panel/customElement.js +1 -1
  211. package/dist/components/solutions-deploy-app/customElement.js +160 -32
  212. package/dist/components/solutions-deploy-app/index.js +1 -1
  213. package/dist/components/solutions-deployed-list/customElement.js +1 -1
  214. package/dist/components/solutions-deployed-panel/customElement.js +1 -1
  215. package/dist/components/solutions-deployed-shell/customElement.js +1 -1
  216. package/dist/components/solutions-filter-panel/customElement.js +1 -1
  217. package/dist/components/solutions-searchsort-toolbar/customElement.js +1 -1
  218. package/dist/docs/api.json +1 -1
  219. package/dist/docs/docs.json +1 -1
  220. package/dist/docs/web-types.json +1 -1
  221. package/dist/solutions-components_commit.txt +8 -5
  222. package/dist/utils/interfaces.d.ts +1 -6
  223. package/package.json +1 -1
  224. package/dist/cdn/7J2F4TFI.js +0 -18
  225. package/dist/cdn/EXC566PM.js +0 -2
  226. package/dist/cdn/LDNPRHOM.js +0 -2
  227. package/dist/cdn/NN52IXXG.js +0 -2
  228. package/dist/cdn/SFFLZSAY.js +0 -2
  229. package/dist/cdn/WPGT2HLS.js +0 -2
  230. package/dist/cdn/XC3IZAIH.js +0 -2
@@ -7,21 +7,21 @@ import { unsafeHTML as Ee } from "lit/directives/unsafe-html.js";
7
7
  import { useContextConsumer as te } from "@arcgis/lumina/context";
8
8
  import { c as Ae, b as De } from "../../chunks/deployAppContexts.js";
9
9
  import { T as Le } from "../../chunks/interfaces.js";
10
- import { c as Me } from "../../chunks/helpers.js";
10
+ import { l as Re } from "../../chunks/helpers.js";
11
11
  import se from "@arcgis/core/config.js";
12
- import { createRef as Re, ref as $e } from "lit-html/directives/ref.js";
13
- import { StateGraph as z, START as O, END as C, Annotation as f, NodeInterrupt as ie } from "@langchain/langgraph/web";
14
- import { createAgentRuntimeState as j, sendTraceMessage as v, invokeStructuredPrompt as A, getEmbeddings as Fe, cosineSimilarity as Pe, invokeTextPrompt as Ne } from "@arcgis/ai-orchestrator";
15
- import r, { z as M } from "zod";
16
- import * as J from "@esri/arcgis-rest-portal";
17
- import { applyPatch as Be } from "fast-json-patch";
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";
16
+ import * as G from "@esri/arcgis-rest-portal";
17
+ import { applyPatch as Ne } from "fast-json-patch";
18
18
  import "@langchain/core/messages";
19
19
  import { C as oe } from "../../chunks/converter.js";
20
- import { g as P, d as ae, r as re, t as qe, T as E } from "../../chunks/templates.js";
20
+ import { g as F, t as ae, r as re, c as qe, d as A } from "../../chunks/templates.js";
21
21
  import Ue from "@arcgis/core/portal/Portal.js";
22
- import ze from "@arcgis/core/portal/PortalItem.js";
23
- const Oe = 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)}`;
24
- async function x(t, e) {
22
+ import Oe from "@arcgis/core/portal/PortalItem.js";
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)}`;
24
+ async function y(t, e) {
25
25
  const s = Object.entries(t).find(
26
26
  ([n]) => n.endsWith(`/${e}.md`)
27
27
  );
@@ -99,7 +99,7 @@ function He(t) {
99
99
  function de(t) {
100
100
  return t && t.helperServices.aiAssistantServices ? `${t.helperServices.aiAssistantServices.url}/skills/doc_ai_assistant/api/pre-chat` : null;
101
101
  }
102
- async function U(t, e, s) {
102
+ async function O(t, e, s) {
103
103
  const n = await fetch(e, {
104
104
  method: "POST",
105
105
  headers: {
@@ -112,47 +112,50 @@ async function U(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 = f.Root({
115
+ const Ve = (t) => new Promise((e) => setTimeout(e, t)), Qe = 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
119
119
  // persists into priorSteps.
120
- ...j(),
121
- solutionResponse: f({
120
+ ...J(),
121
+ solutionResponse: b({
122
122
  reducer: (t, e) => e ?? null,
123
123
  default: () => null
124
124
  }),
125
- documentSkillUrl: f({
125
+ documentSkillUrl: b({
126
126
  reducer: (t, e) => e ?? null,
127
127
  default: () => null
128
128
  }),
129
129
  // Persisted across turns via the graph checkpointer so follow-up questions
130
130
  // continue the same service conversation. Null on the very first interaction
131
131
  // or after messages are cleared.
132
- conversationId: f({
132
+ conversationId: b({
133
133
  reducer: (t, e) => e ?? t,
134
134
  default: () => null
135
135
  })
136
- }), Ke = () => new z(Qe).addNode("initializeAgent", Ye).addNode("askSolutionsQuestions", We).addEdge(O, "initializeAgent").addEdge("initializeAgent", "askSolutionsQuestions").addEdge("askSolutionsQuestions", C), ue = async (t, e, s) => {
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) => {
137
137
  if (!t) return;
138
- const n = de(t);
139
- if (!n) return;
140
- const o = { context: {
138
+ const i = de(t);
139
+ if (!i) return;
140
+ const a = { context: {
141
141
  kind: "DocAIAssistantRequest",
142
142
  filters: {
143
143
  products: "ArcGIS Solutions",
144
- persona: { persona: "apps-solutions" }
144
+ persona: { persona: "apps-solutions" },
145
+ pipeline: {
146
+ translation: { allow: !0, language: s, use_llm: !1 }
147
+ }
145
148
  }
146
149
  } };
147
- s && (o.conversationId = s), U(o, n, e ?? "");
148
- }, We = async (t, e) => {
150
+ n && (a.conversationId = n), O(a, i, e ?? "");
151
+ }, Ke = async (t, e) => {
149
152
  const s = N(e), n = t.documentSkillUrl;
150
153
  let i = [];
151
- await v(
154
+ await w(
152
155
  { text: s.agentProgress.explorerAgentSearching },
153
156
  e
154
157
  );
155
- let o = await U(
158
+ let o = await O(
156
159
  {
157
160
  message: t.agentExecutionContext.userRequest,
158
161
  conversationId: e?.configurable?.context?.convoId ?? void 0,
@@ -160,7 +163,10 @@ const Ve = (t) => new Promise((e) => setTimeout(e, t)), Qe = f.Root({
160
163
  kind: "DocAIAssistantRequest",
161
164
  filters: {
162
165
  products: "ArcGIS Solutions",
163
- persona: { persona: "apps-solutions" }
166
+ persona: { persona: "apps-solutions" },
167
+ pipeline: {
168
+ translation: { allow: !0, language: e?.configurable?.context?.configContext.locale ?? "en", use_llm: !1 }
169
+ }
164
170
  }
165
171
  }
166
172
  },
@@ -178,23 +184,23 @@ const Ve = (t) => new Promise((e) => setTimeout(e, t)), Qe = f.Root({
178
184
  const u = async (m) => {
179
185
  const c = m.context?.results?.[0]?.reply ?? "";
180
186
  if (c !== "") {
181
- const y = Je(c), w = Ge(y, e);
182
- l = w.source, i = [
187
+ const x = Je(c), S = Ge(x, e);
188
+ l = S.source, i = [
183
189
  ...i,
184
- ...w.allMatches.filter(
185
- (k) => !i.some((B) => B.solution.id === k.solution.id)
190
+ ...S.allMatches.filter(
191
+ (k) => !i.some((q) => q.solution.id === k.solution.id)
186
192
  )
187
193
  ];
188
194
  }
189
195
  c !== "" && m.context?.results?.[0]?.followupQuestions && (d = m.context.results[0].followupQuestions);
190
196
  const g = m.context?.results?.[0]?.status?.currentStatusStep;
191
197
  if (g) {
192
- let y = "";
193
- g === 1 ? y = s.agentProgress.explorerAgentReading : g === 2 ? y = s.agentProgress.explorerAgentReviewing : g === 3 && (y = s.agentProgress.explorerAgentPreparing), await v({ text: y }, e);
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);
194
200
  }
195
201
  };
196
202
  for (await u(o); a.hasMore; )
197
- await Ve(500), o = await U(
203
+ await Ve(500), o = await O(
198
204
  {
199
205
  conversationId: a.conversationId,
200
206
  ackSequenceNumber: a.ackSequenceNumber,
@@ -213,7 +219,12 @@ const Ve = (t) => new Promise((e) => setTimeout(e, t)), Qe = f.Root({
213
219
  const m = e.configurable.context.updateSuggestedPrompts, c = d;
214
220
  setTimeout(() => m(c), 0);
215
221
  }
216
- return de(e?.configurable?.context.portal) && ue(e?.configurable?.context.portal, e?.configurable?.context.token ?? "", a.conversationId), i.length && (i.length === 1 ? ce(i[0].solution.id) : le(i)), {
222
+ return de(e?.configurable?.context.portal) && ue(
223
+ e?.configurable?.context.portal,
224
+ e?.configurable?.context.token ?? "",
225
+ e?.configurable?.context.configContext.locale ?? "en",
226
+ a.conversationId
227
+ ), i.length && (i.length === 1 ? ce(i[0].solution.id) : le(i)), {
217
228
  outputMessage: l,
218
229
  summary: l,
219
230
  status: "success",
@@ -226,7 +237,7 @@ const Ve = (t) => new Promise((e) => setTimeout(e, t)), Qe = f.Root({
226
237
  documentSkillUrl: s
227
238
  };
228
239
  };
229
- await x(je, "solutions_explorer_description");
240
+ await y(je, "solutions_explorer_description");
230
241
  const pe = (t) => {
231
242
  if (t && Array.isArray(t.id) && t.id.length > 0)
232
243
  return t.id[t.id.length - 1].replace("Message", "").toLowerCase();
@@ -253,7 +264,7 @@ const pe = (t) => {
253
264
  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;
254
265
  }
255
266
  return { role: "human", content: String(t) };
256
- }, 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 an existing solution that closely matches your use case and may already meet your needs: {{solutionMatch}}. Do you want to continue building your solution?", 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 = {
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 = {
257
268
  builderMessages: st
258
269
  }, it = /* @__PURE__ */ new Set([
259
270
  "add",
@@ -330,13 +341,13 @@ class me {
330
341
  }
331
342
  compareStrings() {
332
343
  const e = new Set(this.template.solution.strings.map((n) => n.key)), s = new Set(this.response.solution.strings.map((n) => n.key));
333
- (e.size !== s.size || [...e].some((n) => !s.has(n))) && this.logIssue("String keys in llm response do not match the template.");
344
+ e.size === s.size && [...e].every((n) => s.has(n)) || this.logIssue("String keys in llm response do not match the template.");
334
345
  for (const n of this.response.solution.strings)
335
346
  n.value || this.logIssue(`String key '${n.key}' has no value.`);
336
347
  }
337
348
  compareItems() {
338
349
  const e = new Set(this.template.items.map((n) => n.id)), s = new Set(this.response.items.map((n) => n.id));
339
- (e.size !== s.size || [...e].some((n) => !s.has(n))) && this.logIssue("Item ids in llm response do not match the template.");
350
+ e.size === s.size && [...e].every((n) => s.has(n)) || this.logIssue("Item ids in llm response do not match the template.");
340
351
  }
341
352
  compareFeatureLayers() {
342
353
  const e = this.template.featureLayer, s = this.response.featureLayer;
@@ -346,7 +357,14 @@ class me {
346
357
  }
347
358
  if (!e.addLayers) {
348
359
  const n = new Set(e.layers.map((o) => o.id)), i = new Set(s.layers.map((o) => o.id));
349
- (n.size !== i.size || [...n].some((o) => !i.has(o))) && this.logIssue(`Feature Layer '${e.itemId}' had its layer ids altered.`);
360
+ if (!(n.size === i.size && [...n].every((o) => i.has(o))))
361
+ this.logIssue(`Feature Layer '${e.itemId}' had its layer ids altered.`);
362
+ else
363
+ for (const o of e.layers)
364
+ if (o.type) {
365
+ const a = s.layers.find((l) => l.id === o.id);
366
+ a && a.type !== o.type && this.logIssue(`Layer '${o.id}' type '${a.type}' does not match template type '${o.type}'. This layer type is immutable.`);
367
+ }
350
368
  }
351
369
  }
352
370
  validateResponse() {
@@ -438,6 +456,7 @@ const ot = r.object({
438
456
  }), rt = r.object({
439
457
  id: r.number().int().describe("Layer/table id within the feature service."),
440
458
  type: r.enum(["Point", "Polyline", "Polygon", "Table"]).describe("Layer type."),
459
+ typeMutable: r.boolean().describe("Indicates whether the layer type can be changed."),
441
460
  name: r.string().describe("Layer/table name."),
442
461
  description: r.string().describe("Layer/table description."),
443
462
  customFields: r.array(ne).describe("User/business fields specific to the solution."),
@@ -446,7 +465,7 @@ const ot = r.object({
446
465
  itemId: r.string().describe("ArcGIS item id for the feature layer."),
447
466
  addLayers: r.boolean().describe("Indicates whether new layers can be added during solution design."),
448
467
  layers: r.array(rt)
449
- }), G = r.object({
468
+ }), H = r.object({
450
469
  response: r.string().describe("Conversational response to the user's query."),
451
470
  solution: r.object({
452
471
  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."),
@@ -475,29 +494,22 @@ const ot = r.object({
475
494
  assistantResponse: r.string().describe("Natural-language response for the user."),
476
495
  isValidUseCase: r.boolean().describe("True only when the request is concrete, appropriate, and has at least one matching template."),
477
496
  matchedTemplates: r.array(pt).describe("Ordered list of matching templates, best match first. Empty when no valid match exists.")
478
- }), H = (t) => t in E, gt = 5, ht = 0.8, ft = 0.15, bt = "Web Mapping Application", yt = "Embeddings";
479
- let R = null, q = null, $ = null, F = null;
480
- const xt = "Build", D = /* @__PURE__ */ Object.assign({
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({
481
500
  "./prompts/description.md": () => import("../../chunks/description2.js").then((t) => t.default),
482
501
  "./prompts/designSolution.md": () => import("../../chunks/designSolution.js").then((t) => t.default),
483
502
  "./prompts/findExistingSolution.md": () => import("../../chunks/findExistingSolution.js").then((t) => t.default),
484
503
  "./prompts/initialAssessment.md": () => import("../../chunks/initialAssessment.js").then((t) => t.default),
485
504
  "./prompts/updateDesign.md": () => import("../../chunks/updateDesign.js").then((t) => t.default)
486
- }), vt = nt.builderMessages, b = (t, e, s) => {
487
- let i = N(e)?.builderMessages?.[t] ?? vt[t];
488
- if (!s)
489
- return i;
490
- for (const [o, a] of Object.entries(s))
491
- i = i.replaceAll(`{{${o}}}`, a);
492
- return i;
493
- }, ge = (t) => {
505
+ }), vt = nt.builderMessages, f = (t, e, s) => N(e)?.builderMessages?.[t] ?? vt[t], ge = (t) => {
494
506
  typeof window < "u" && window.dispatchEvent(new CustomEvent("arcgis-solution-design-update", {
495
507
  detail: t
496
508
  }));
497
509
  }, wt = async (t, e, s) => {
498
510
  if (!t) return null;
499
511
  const n = `type:"${bt}" AND typekeywords:${yt} AND group:${t}`;
500
- return (await J.searchItems({
512
+ return (await G.searchItems({
501
513
  q: n,
502
514
  params: e ? { token: e } : void 0,
503
515
  portal: s,
@@ -508,7 +520,7 @@ async function St(t, e, s) {
508
520
  try {
509
521
  const n = await wt(t, e, s);
510
522
  if (!n) return null;
511
- const i = new ze({ id: n.id });
523
+ const i = new Oe({ id: n.id });
512
524
  return await i.load(), await i.fetchData("json");
513
525
  } catch {
514
526
  return null;
@@ -517,7 +529,7 @@ async function St(t, e, s) {
517
529
  const It = async (t, e, s) => {
518
530
  if (!t) return [];
519
531
  const n = `type:Solution AND typekeywords:${xt} AND group:${t}`;
520
- return (await J.searchItems({
532
+ return (await G.searchItems({
521
533
  q: n,
522
534
  params: e ? { token: e } : void 0,
523
535
  portal: s,
@@ -525,7 +537,7 @@ const It = async (t, e, s) => {
525
537
  }))?.results ?? [];
526
538
  }, Ct = async (t, e, s) => {
527
539
  try {
528
- const n = await J.getItemData(t, {
540
+ const n = await G.getItemData(t, {
529
541
  params: e ? { token: e } : void 0,
530
542
  portal: s
531
543
  }), i = n?.buildSolution;
@@ -565,10 +577,10 @@ const It = async (t, e, s) => {
565
577
  error: s instanceof Error ? s.stack ?? s.message : String(s)
566
578
  };
567
579
  }
568
- }, V = async (t) => {
569
- if (q) {
570
- Object.entries(q).forEach(([a, l]) => {
571
- E[a] && (E[a].initialTemplate = l);
580
+ }, Q = async (t) => {
581
+ if (U) {
582
+ Object.entries(U).forEach(([a, l]) => {
583
+ A[a] && (A[a].initialTemplate = l);
572
584
  });
573
585
  return;
574
586
  }
@@ -588,7 +600,7 @@ const It = async (t, e, s) => {
588
600
  const { buildSolution: h, params: m } = u;
589
601
  if (typeof h == "object" && h !== null && "solution" in h) {
590
602
  const g = h.solution;
591
- g.thumbnailUrl = a.thumbnail ? `${n ?? "https://www.arcgis.com/sharing/rest"}/content/items/${a.id}/info/${a.thumbnail}` : void 0;
603
+ g.thumbnailUrl = a.thumbnail ? `${n ?? "https://www.arcgis.com/sharing/rest"}/content/items/${a.id}/info/${a.thumbnail}` : void 0, g.item = a;
592
604
  }
593
605
  const c = {
594
606
  ...l,
@@ -601,11 +613,11 @@ const It = async (t, e, s) => {
601
613
  sourceBuildSolution: structuredClone(h),
602
614
  params: m ? structuredClone(m) : null
603
615
  }
604
- ), E[d] = {
616
+ ), A[d] = {
605
617
  ...l,
606
618
  initialTemplate: o[d]
607
619
  };
608
- })), q = o;
620
+ })), U = o;
609
621
  }, fe = (t) => {
610
622
  const e = t?.configurable?.context?.token;
611
623
  return typeof e != "string" || !e.trim() ? null : e;
@@ -619,25 +631,25 @@ const It = async (t, e, s) => {
619
631
  }, _t = async (t) => {
620
632
  await Promise.all([
621
633
  ve(t),
622
- V(t)
634
+ Q(t)
623
635
  ]);
624
636
  }, xe = async (t) => {
625
637
  const e = fe(t);
626
- (!$ || e && e !== F) && (F = e ?? F, $ = _t(t).catch((n) => {
627
- throw $ = null, F = null, n;
628
- })), await $;
638
+ (!M || e && e !== P) && (P = e ?? P, M = _t(t).catch((n) => {
639
+ throw M = null, P = null, n;
640
+ })), await M;
629
641
  };
630
642
  async function ve(t) {
631
- if (R) return R;
643
+ if ($) return $;
632
644
  const e = be(t);
633
645
  if (!e)
634
646
  return console.warn("Solution Builder: missing primarySolutionsGroupId in appConfig; skipping embeddings load."), null;
635
647
  const s = ye(t), n = t?.configurable?.context?.configContext?.portalURL;
636
648
  await new Ue(n ? { url: n } : void 0).load();
637
649
  const o = fe(t) ?? void 0, a = await St(e, o, s);
638
- return a ? (R = a.items, R) : null;
650
+ return a ? ($ = a.items, $) : null;
639
651
  }
640
- const kt = () => Object.entries(E).map(([t, e]) => `ID: ${t}
652
+ const kt = () => Object.entries(A).map(([t, e]) => `ID: ${t}
641
653
  Label: ${e.label}
642
654
  Description: ${e.description}`).join(`
643
655
 
@@ -649,10 +661,10 @@ Description: ${e.description}`).join(`
649
661
  const s = JSON.parse(e), n = _(
650
662
  { response: "", ...s },
651
663
  { itemId: s?.solution?.itemId ?? null }
652
- ), i = G.safeParse(n);
664
+ ), i = H.safeParse(n);
653
665
  if (!i.success)
654
666
  return null;
655
- const { response: o, ...a } = i.data, l = s.templateId, d = typeof l == "string" && H(l) ? l : null;
667
+ const { response: o, ...a } = i.data, l = s.templateId, d = typeof l == "string" && V(l) ? l : null;
656
668
  return _(
657
669
  a,
658
670
  {
@@ -664,47 +676,52 @@ Description: ${e.description}`).join(`
664
676
  } catch {
665
677
  return null;
666
678
  }
667
- }, Et = f.Root({
668
- ...j(),
679
+ }, Et = b.Root({
680
+ ...J(),
669
681
  /** Optional human-readable template description retained for UI use. */
670
- templateDescription: f({
682
+ templateDescription: b({
671
683
  reducer: (t, e) => typeof e == "string" || e === null ? e : t ?? null,
672
684
  default: () => null
673
685
  }),
674
686
  /** Current editable design payload being refined across turns. */
675
- currentDesign: f({
687
+ currentDesign: b({
676
688
  reducer: (t = null, e) => e === void 0 ? t : e ?? null,
677
689
  default: () => null
678
690
  }),
679
691
  /** Initial request assessment produced by the intake prompt. */
680
- assessment: f({
692
+ assessment: b({
681
693
  reducer: (t = null, e) => e === void 0 ? t : e ?? null,
682
694
  default: () => null
683
695
  }),
684
696
  /** Template selected automatically or by human-in-the-loop choice. */
685
- selectedTemplate: f({
697
+ selectedTemplate: b({
686
698
  reducer: (t = null, e) => e === void 0 ? t : e ?? null,
687
699
  default: () => null
688
700
  }),
689
701
  /** Existing solution matches surfaced before building a new solution. */
690
- existingMatches: f({
702
+ existingMatches: b({
691
703
  reducer: (t = [], e) => e === void 0 ? t : e ?? [],
692
704
  default: () => []
705
+ }),
706
+ /** User decision for whether to continue building after existing matches are shown. */
707
+ continueBuilding: b({
708
+ reducer: (t = null, e) => e === void 0 ? t : e ?? null,
709
+ default: () => null
693
710
  })
694
711
  }), At = (t, e) => {
695
712
  const s = Tt(e), n = s?.templateId ?? null, i = {};
696
713
  return JSON.stringify(t.currentDesign) !== JSON.stringify(s) && (i.currentDesign = s), n && t.selectedTemplate !== n && (i.selectedTemplate = n), i;
697
714
  }, Dt = async (t, e) => {
698
- await v({ text: b("understandingRequest", e) }, e), await xe(e);
699
- const s = t.agentExecutionContext.userRequest, n = kt(), i = t.agentExecutionContext.messages.slice(-11), o = await A({
700
- promptText: await x(D, "initialAssessment"),
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"),
701
718
  modelTier: "advanced",
702
719
  temperature: 0,
703
720
  schema: mt,
704
721
  messages: i,
705
722
  inputVariables: { query: s, availableTemplates: n }
706
723
  }), a = o.matchedTemplates.filter(
707
- (c) => H(c.templateId)
724
+ (c) => V(c.templateId)
708
725
  ), l = {
709
726
  ...o,
710
727
  matchedTemplates: a
@@ -712,7 +729,8 @@ Description: ${e.description}`).join(`
712
729
  return {
713
730
  assessment: l,
714
731
  selectedTemplate: m,
715
- existingMatches: []
732
+ existingMatches: [],
733
+ continueBuilding: null
716
734
  };
717
735
  }, Lt = (t) => {
718
736
  const e = t.assessment?.assistantResponse ?? "";
@@ -721,16 +739,16 @@ Description: ${e.description}`).join(`
721
739
  summary: e,
722
740
  status: "success"
723
741
  };
724
- }, Mt = (t, e) => {
742
+ }, Rt = (t, e) => {
725
743
  const { hitlResponse: s } = e.configurable, n = "selectTemplate", i = t.assessment?.matchedTemplates.filter(
726
- (u) => H(u.templateId)
744
+ (u) => V(u.templateId)
727
745
  ) ?? [], o = i.map((u) => `${u.templateDescription}`);
728
746
  if (s?.agentId !== "solutionBuilder" || s.id !== n) {
729
747
  const u = {
730
748
  agentId: "solutionBuilder",
731
749
  id: n,
732
750
  kind: "singleSelection",
733
- message: b("selectTemplatePrompt", e),
751
+ message: f("selectTemplatePrompt", e),
734
752
  metadata: [...o]
735
753
  };
736
754
  throw new ie(u);
@@ -739,16 +757,16 @@ Description: ${e.description}`).join(`
739
757
  return {
740
758
  selectedTemplate: (l >= 0 ? i[l] : void 0)?.templateId ?? i[0]?.templateId ?? null
741
759
  };
742
- }, Rt = async (t, e) => {
743
- await v({ text: b("searchingExistingSolutions", e) }, e);
760
+ }, $t = async (t, e) => {
761
+ await w({ text: f("searchingExistingSolutions", e) }, e);
744
762
  const s = t.agentExecutionContext.userRequest, n = tt(t.agentExecutionContext.messages) || s, i = await ve(e);
745
763
  if (!i)
746
764
  return console.warn("Solutions Search: failed to load solution embeddings cache; skipping search."), { existingMatches: [] };
747
765
  if (!i.length)
748
766
  return { existingMatches: [] };
749
- const [o] = await Fe([n]), a = i.map((c) => ({
767
+ const [o] = await Pe([n]), a = i.map((c) => ({
750
768
  solution: c,
751
- score: Pe(o, c.embedding)
769
+ score: Fe(o, c.embedding)
752
770
  }));
753
771
  a.sort((c, g) => g.score - c.score);
754
772
  const l = a.slice(0, gt);
@@ -759,34 +777,45 @@ Snippet: ${c.snippet}
759
777
  Description: ${c.description}`).join(`
760
778
 
761
779
  `), u = t.agentExecutionContext.messages.slice(-11);
762
- return { existingMatches: (await A({
763
- promptText: await x(D, "findExistingSolution"),
780
+ return { existingMatches: (await D({
781
+ promptText: await y(L, "findExistingSolution"),
764
782
  modelTier: "fast",
765
783
  temperature: 0,
766
784
  schema: ut,
767
785
  messages: u,
768
786
  inputVariables: { query: s, candidates: d }
769
787
  })).matchedTitles.map((c) => l.find(({ solution: g }) => g.title === c)).filter((c) => c !== void 0) };
770
- }, $t = (t, e) => {
788
+ }, Mt = (t, e) => {
771
789
  const { existingMatches: s } = t, { hitlResponse: n } = e.configurable, i = `confirmExistingSolution:${s[0].solution.id}`;
772
790
  if (n?.agentId !== "solutionBuilder" || n.id !== i) {
773
791
  s.length === 1 ? ce(s[0].solution.id) : le(s);
774
- const o = s.map((d) => `${d.solution.title}`).join(", "), a = b("existingSolutionMatch", e, { solutionMatch: o }), l = {
792
+ const d = f("existingSolutionMatch", e), u = [
793
+ f("continueBuildingYes", e),
794
+ f("continueBuildingNo", e)
795
+ ], h = {
775
796
  agentId: "solutionBuilder",
776
797
  id: i,
777
- kind: "booleanChoice",
778
- message: a,
779
- metadata: []
798
+ kind: "singleSelection",
799
+ message: d,
800
+ metadata: u
780
801
  };
781
- throw new ie(l);
802
+ throw new ie(h);
782
803
  }
783
- return {};
804
+ const o = String(n.payload ?? "").trim(), a = f("continueBuildingNo", e);
805
+ return { continueBuilding: o !== a };
806
+ }, Pt = (t, e) => {
807
+ const s = f("continueBuildingDeclined", e);
808
+ return {
809
+ outputMessage: s,
810
+ summary: s,
811
+ status: "success"
812
+ };
784
813
  }, we = async (t, e) => {
785
814
  await xe(e);
786
815
  const { currentDesign: s } = t, n = t.agentExecutionContext.userRequest;
787
- await v({ text: b("creatingDesign", e) }, e);
788
- let i = P(t.selectedTemplate);
789
- if (i?.initialTemplate || (await V(e), i = P(t.selectedTemplate)), !i?.initialTemplate)
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)
790
819
  throw new Error("No hydrated templates are available for solution design.");
791
820
  const o = _(
792
821
  s ?? i.initialTemplate,
@@ -795,11 +824,11 @@ Description: ${c.description}`).join(`
795
824
  sourceBuildSolution: s?.sourceBuildSolution ?? i.initialTemplate.sourceBuildSolution,
796
825
  params: s?.params ?? i.initialTemplate.params ?? null
797
826
  }
798
- ), a = t.agentExecutionContext.messages.slice(-11), l = await A({
799
- promptText: await x(D, "designSolution"),
827
+ ), a = t.agentExecutionContext.messages.slice(-11), l = await D({
828
+ promptText: await y(L, "designSolution"),
800
829
  modelTier: "advanced",
801
830
  temperature: 0,
802
- schema: G,
831
+ schema: H,
803
832
  messages: a,
804
833
  inputVariables: {
805
834
  currentDesign: JSON.stringify(ae(o)),
@@ -823,15 +852,15 @@ Description: ${c.description}`).join(`
823
852
  "[SolutionBuilder] designSolution validation failed:",
824
853
  { issues: g.issues, llmResponse: l }
825
854
  ), {
826
- outputMessage: b("createDesignFailed", e)
855
+ outputMessage: f("createDesignFailed", e)
827
856
  };
828
- const y = c.sourceBuildSolution, w = he(c, y);
829
- if (!w.ok) {
857
+ const x = c.sourceBuildSolution, S = he(c, x);
858
+ if (!S.ok) {
830
859
  console.warn(
831
860
  "[SolutionBuilder] designSolution Esri JSON conversion failed:",
832
- { error: w.error, llmResponse: l, design: c }
861
+ { error: S.error, llmResponse: l, design: c }
833
862
  );
834
- const k = b("createDesignFailed", e);
863
+ const k = f("createDesignFailed", e);
835
864
  return {
836
865
  outputMessage: k,
837
866
  summary: k,
@@ -849,9 +878,9 @@ Description: ${c.description}`).join(`
849
878
  if (!s)
850
879
  return we(t, e);
851
880
  const n = t.agentExecutionContext.userRequest, i = t.agentExecutionContext.messages.slice(-11);
852
- await v({ text: b("updatingDesign", e) }, e);
853
- const o = await A({
854
- promptText: await x(D, "updateDesign"),
881
+ await w({ text: f("updatingDesign", e) }, e);
882
+ const o = await D({
883
+ promptText: await y(L, "updateDesign"),
855
884
  modelTier: "advanced",
856
885
  temperature: 0,
857
886
  schema: dt,
@@ -871,7 +900,7 @@ Description: ${c.description}`).join(`
871
900
  try {
872
901
  return JSON.parse(p);
873
902
  } catch {
874
- const I = p.replace(/[\u0000-\u001F]/g, (Z) => {
903
+ const C = p.replace(/[\u0000-\u001F]/g, (Z) => {
875
904
  switch (Z) {
876
905
  case "\b":
877
906
  return "\\b";
@@ -889,7 +918,7 @@ Description: ${c.description}`).join(`
889
918
  }
890
919
  });
891
920
  try {
892
- return JSON.parse(I);
921
+ return JSON.parse(C);
893
922
  } catch {
894
923
  return p;
895
924
  }
@@ -899,44 +928,44 @@ Description: ${c.description}`).join(`
899
928
  path: p.path.replace(/\/+$/, ""),
900
929
  ...p.value != null && p.value !== "" ? { value: d(p.value) } : {},
901
930
  ...p.from != null && p.from !== "" ? { from: p.from } : {}
902
- }))].sort((p, I) => p.op !== "remove" || I.op !== "remove" ? 0 : I.path.localeCompare(p.path, void 0, { numeric: !0 })), m = structuredClone(
931
+ }))].sort((p, C) => p.op !== "remove" || C.op !== "remove" ? 0 : C.path.localeCompare(p.path, void 0, { numeric: !0 })), m = structuredClone(
903
932
  ae(s)
904
933
  );
905
934
  try {
906
- Be(m, h, !0);
935
+ Ne(m, h, !0);
907
936
  } catch (p) {
908
937
  console.warn(
909
938
  "[SolutionBuilder] updateDesign JSON patch failed:",
910
939
  { error: p, llmResponse: o, patches: h, patchTarget: m }
911
940
  );
912
- const I = b("applyChangeFailed", e);
941
+ const C = f("applyChangeFailed", e);
913
942
  return {
914
- outputMessage: I,
915
- summary: I,
943
+ outputMessage: C,
944
+ summary: C,
916
945
  status: "success"
917
946
  };
918
947
  }
919
948
  const c = _(
920
949
  { response: "", ...m },
921
950
  { itemId: s.solution?.itemId ?? null }
922
- ), g = G.safeParse(c);
951
+ ), g = H.safeParse(c);
923
952
  if (!g.success) {
924
953
  console.warn(
925
954
  "[SolutionBuilder] updateDesign schema validation failed:",
926
955
  { errors: g.error.issues, llmResponse: o, patchedDesign: c }
927
956
  );
928
- const p = b("applyChangeFailed", e);
957
+ const p = f("applyChangeFailed", e);
929
958
  return {
930
959
  outputMessage: p,
931
960
  summary: p,
932
961
  status: "success"
933
962
  };
934
963
  }
935
- const { response: y, featureLayer: w, ...k } = g.data, B = re(
936
- w,
964
+ const { response: x, featureLayer: S, ...k } = g.data, q = re(
965
+ S,
937
966
  s.featureLayer
938
- ), S = _(
939
- { ...k, featureLayer: B },
967
+ ), I = _(
968
+ { ...k, featureLayer: q },
940
969
  {
941
970
  itemId: s.solution?.itemId,
942
971
  sourceBuildSolution: s.sourceBuildSolution,
@@ -944,74 +973,84 @@ Description: ${c.description}`).join(`
944
973
  params: s.params ?? null
945
974
  }
946
975
  );
947
- let L = P(t.selectedTemplate);
948
- if (L?.initialTemplate || (await V(e), L = P(t.selectedTemplate)), !L?.initialTemplate)
976
+ let R = F(t.selectedTemplate);
977
+ if (R?.initialTemplate || (await Q(e), R = F(t.selectedTemplate)), !R?.initialTemplate)
949
978
  throw new Error("No hydrated templates are available for solution design.");
950
- const W = new me(S, L.initialTemplate, !1);
951
- if (!W.isValid)
979
+ const K = new me(I, R.initialTemplate, !1);
980
+ if (!K.isValid)
952
981
  return console.warn(
953
982
  "[SolutionBuilder] updateDesign validation failed:",
954
- { issues: W.issues, llmResponse: o, patchedDesign: S }
983
+ { issues: K.issues, llmResponse: o, patchedDesign: I }
955
984
  ), {
956
- outputMessage: b("applyChangeFailed", e)
985
+ outputMessage: f("applyChangeFailed", e)
957
986
  };
958
- const Ie = S.sourceBuildSolution, Y = he(S, Ie);
987
+ const Ie = I.sourceBuildSolution, Y = he(I, Ie);
959
988
  if (!Y.ok) {
960
989
  console.warn(
961
990
  "[SolutionBuilder] updateDesign Esri JSON conversion failed:",
962
- { error: Y.error, llmResponse: o, design: S }
991
+ { error: Y.error, llmResponse: o, design: I }
963
992
  );
964
- const p = b("applyChangeFailed", e);
993
+ const p = f("applyChangeFailed", e);
965
994
  return {
966
995
  outputMessage: p,
967
996
  summary: p,
968
997
  status: "success"
969
998
  };
970
999
  }
971
- return ge(S), {
1000
+ return ge(I), {
972
1001
  outputMessage: a,
973
1002
  summary: a,
974
1003
  status: "success",
975
- currentDesign: S
1004
+ currentDesign: I
976
1005
  };
977
- }, Pt = (t) => t.currentDesign !== null ? "updateDesign" : "assessInitialRequest", Nt = (t) => !t.assessment || !t.assessment.isValidUseCase ? "invalidUseCaseExit" : !t.selectedTemplate && t.assessment.matchedTemplates.length > 1 ? "selectTemplateHIL" : "findExistingSolutions", Bt = (t) => t.existingMatches.length > 0 ? "confirmContinueBuildingHIL" : "designSolution", qt = () => new z(Et).addNode("syncCurrentDesignFromContext", At).addNode("assessInitialRequest", Dt).addNode("invalidUseCaseExit", Lt).addNode("selectTemplateHIL", Mt).addNode("findExistingSolutions", Rt).addNode("confirmContinueBuildingHIL", $t).addNode("designSolution", we).addNode("updateDesign", Ft).addEdge(O, "syncCurrentDesignFromContext").addConditionalEdges("syncCurrentDesignFromContext", Pt, {
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, {
978
1007
  updateDesign: "updateDesign",
979
1008
  assessInitialRequest: "assessInitialRequest"
980
1009
  }).addConditionalEdges("assessInitialRequest", Nt, {
981
1010
  invalidUseCaseExit: "invalidUseCaseExit",
982
1011
  selectTemplateHIL: "selectTemplateHIL",
983
1012
  findExistingSolutions: "findExistingSolutions"
984
- }).addEdge("invalidUseCaseExit", C).addEdge("selectTemplateHIL", "findExistingSolutions").addConditionalEdges("findExistingSolutions", Bt, {
1013
+ }).addEdge("invalidUseCaseExit", v).addEdge("selectTemplateHIL", "findExistingSolutions").addConditionalEdges("findExistingSolutions", qt, {
985
1014
  confirmContinueBuildingHIL: "confirmContinueBuildingHIL",
986
1015
  designSolution: "designSolution"
987
- }).addEdge("confirmContinueBuildingHIL", "designSolution").addEdge("designSolution", C).addEdge("updateDesign", C);
988
- await x(D, "description");
989
- const Ut = M.object({
990
- tool: M.enum(["explorer", "builder", "other"]).describe("The selected tool based on the user's query."),
991
- confidence: M.number().min(0).max(1).describe("A confidence score (0.00–1.00)."),
992
- rationale: M.string().min(1).describe("A brief rationale for the tool choice (≤140 characters)")
993
- }), Q = /* @__PURE__ */ Object.assign({
1016
+ }).addConditionalEdges("confirmContinueBuildingHIL", Ut, {
1017
+ declineContinueBuildingExit: "declineContinueBuildingExit",
1018
+ 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({
994
1027
  "./prompts/assistantResponse.md": () => import("../../chunks/assistantResponse.js").then((t) => t.default),
995
1028
  "./prompts/classifyIntent.md": () => import("../../chunks/classifyIntent.js").then((t) => t.default),
996
- "./prompts/description.md": () => import("../../chunks/description.js").then((t) => t.default)
997
- }), K = () => {
1029
+ "./prompts/description.md": () => import("../../chunks/description.js").then((t) => t.default),
1030
+ "./prompts/responseOptionsBuilderExclusion.md": () => import("../../chunks/responseOptionsBuilderExclusion.js").then((t) => t.default),
1031
+ "./prompts/responseOptionsDefault.md": () => import("../../chunks/responseOptionsDefault.js").then((t) => t.default)
1032
+ }), W = () => {
998
1033
  const t = new CustomEvent("assistantProcessing", {
999
1034
  detail: !1
1000
1035
  });
1001
1036
  window.dispatchEvent(t);
1002
- }, Se = f.Root({
1003
- ...j(),
1004
- selectedTool: f({
1037
+ }, Se = b.Root({
1038
+ ...J(),
1039
+ selectedTool: b({
1005
1040
  reducer: (t, e) => e ?? null,
1006
1041
  default: () => null
1007
1042
  }),
1008
- intentRationale: f({
1043
+ intentRationale: b({
1009
1044
  reducer: (t, e) => e ?? null,
1010
1045
  default: () => null
1046
+ }),
1047
+ builderExclusion: b({
1048
+ reducer: (t, e) => e ?? !1,
1049
+ default: () => !1
1011
1050
  })
1012
- }), zt = async (t, e) => {
1051
+ }), jt = async (t, e) => {
1013
1052
  const s = N(e);
1014
- await v(
1053
+ await w(
1015
1054
  { text: s?.builderMessages.understandingRequest },
1016
1055
  e
1017
1056
  );
@@ -1023,60 +1062,64 @@ const Ut = M.object({
1023
1062
  } catch {
1024
1063
  a = !1;
1025
1064
  }
1026
- const l = await x(Q, "classifyIntent"), d = await A({
1065
+ const l = await y(B, "classifyIntent"), d = await D({
1027
1066
  promptText: l,
1028
1067
  modelTier: "advanced",
1029
1068
  temperature: 0,
1030
- schema: Ut,
1069
+ schema: zt,
1031
1070
  messages: i,
1032
1071
  inputVariables: { query: n, activeSolutionDesign: a }
1033
1072
  });
1034
1073
  return {
1035
1074
  selectedTool: d.tool,
1036
- intentRationale: d.rationale
1075
+ intentRationale: d.rationale,
1076
+ builderExclusion: d.builderExclusion
1037
1077
  };
1038
- }, Ot = async (t, e) => {
1039
- const n = await Ke().compile().invoke(t, e);
1040
- return K(), n;
1041
- }, jt = async (t, e) => {
1042
- const n = await qt().compile().invoke(t, e);
1043
- return K(), n;
1044
1078
  }, Jt = async (t, e) => {
1045
- const s = N(e), n = t.agentExecutionContext.userRequest, i = t.intentRationale ?? "No rationale available.";
1046
- await v(
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
+ }, 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(
1047
1087
  { text: s?.executingSolutionsAssistantAgent },
1048
1088
  e
1049
1089
  );
1050
- const o = await x(Q, "assistantResponse"), a = t.agentExecutionContext.messages.slice(-11), l = await Ne({
1051
- promptText: o,
1052
- modelTier: "fast",
1090
+ const a = await y(B, "assistantResponse"), l = await y(
1091
+ B,
1092
+ o
1093
+ ), d = t.agentExecutionContext.messages.slice(-11), u = await Be({
1094
+ promptText: a,
1095
+ modelTier: "advanced",
1053
1096
  temperature: 0,
1054
- messages: a,
1055
- inputVariables: { query: n, rationale: i }
1097
+ messages: d,
1098
+ inputVariables: { query: n, rationale: i, responseOptions: l }
1056
1099
  });
1057
- return K(), {
1058
- outputMessage: l,
1059
- summary: l,
1100
+ return W(), {
1101
+ outputMessage: u,
1102
+ summary: u,
1060
1103
  status: "success"
1061
1104
  };
1062
- }, Gt = (t) => t.selectedTool ?? "other", Ht = () => new z(Se).addNode("classifyIntent", zt).addNode("routeToExplorer", Ot).addNode("routeToBuilder", jt).addNode("assistantResponse", Jt).addEdge(O, "classifyIntent").addConditionalEdges("classifyIntent", Gt, {
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, {
1063
1106
  explorer: "routeToExplorer",
1064
1107
  builder: "routeToBuilder",
1065
1108
  other: "assistantResponse"
1066
- }).addEdge("routeToExplorer", C).addEdge("routeToBuilder", C).addEdge("assistantResponse", C), Vt = await x(Q, "description"), Qt = {
1109
+ }).addEdge("routeToExplorer", v).addEdge("routeToBuilder", v).addEdge("assistantResponse", v), Wt = await y(B, "description"), Kt = {
1067
1110
  id: "solutionsAssistant",
1068
1111
  name: "Solutions Assistant Agent",
1069
- description: Vt,
1070
- createGraph: Ht,
1112
+ description: Wt,
1113
+ createGraph: Qt,
1071
1114
  workspace: Se
1072
- }, Kt = "https://links.esri.com/solutions/agol-organizational-account", Wt = "https://links.esri.com/solutions/configure-assistants";
1073
- class Yt extends ke {
1115
+ }, Yt = "https://links.esri.com/solutions/agol-organizational-account", Zt = "https://links.esri.com/solutions/configure-assistants";
1116
+ class Xt extends ke {
1074
1117
  constructor() {
1075
1118
  super(), this.open = !1, this.userFirstName = "", this.builderVisible = !1, this.hasActiveBuilderDesign = !1, this._conversationId = void 0, this._orgSettings = {
1076
1119
  aiAssistantsEnabled: !1,
1077
1120
  blockBetaApps: !0,
1078
1121
  colocateCompute: !1
1079
- }, 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 = Re(), this._configContextConsumer = te({
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({
1080
1123
  context: Ae,
1081
1124
  subscribe: !0,
1082
1125
  callback: (e) => {
@@ -1114,7 +1157,7 @@ class Yt extends ke {
1114
1157
  this.properties = { open: 5, userFirstName: 1, builderVisible: 5, hasActiveBuilderDesign: 5, _conversationId: 16, _orgSettings: 16, _suggestedPrompts: 16, _hasInteracted: 16, _isMobile: 16, _translations: 16, _builderWidth: 16, _solutionDesignJson: 16, _isAssistantBusy: 16, _isBuilderBusy: 16, _preChatCheck: 16 };
1115
1158
  }
1116
1159
  static {
1117
- this.styles = Oe;
1160
+ this.styles = ze;
1118
1161
  }
1119
1162
  get _telemetry() {
1120
1163
  return this._configContextConsumer.value?.telemetrySession;
@@ -1135,23 +1178,21 @@ class Yt extends ke {
1135
1178
  this._loadUserFirstName();
1136
1179
  }
1137
1180
  willUpdate(e) {
1138
- 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._preChatCheck = !0)), this._configContextConsumer.value?.userSession?.token && this._configContextConsumer.value?.authentication?.CanUseAI;
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;
1139
1182
  }
1140
1183
  _renderNoSign() {
1141
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>`;
1142
1185
  }
1143
1186
  _renderNoPermission() {
1144
- 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}}", Kt).replace("{{configAI}}", Wt))}</div></calcite-notice>`;
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>`;
1145
1188
  }
1146
1189
  render() {
1147
1190
  let e = this._suggestedPrompts.length > 0 ? this._suggestedPrompts : this._hasInteracted ? [] : Object.values(this._translations.defaultFollowUpQuestions);
1148
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=${() => {
1149
1192
  window.dispatchEvent(new CustomEvent("toggleSolutionBuilder"));
1150
- }} scale=m slot=header-actions-end></calcite-action>` || ""}<calcite-action id=newChatButton icon=speech-bubble-plus .text=${this._translations.tooltips.newConversation} @click=${() => {
1151
- this._conversationId = void 0, this._suggestedPrompts = [], this._hasInteracted = !1, this._assistantRef.value?.clearChatHistory();
1152
- }} scale=m slot=header-actions-end></calcite-action><calcite-tooltip placement=bottom reference-element=newChatButton><span>${this._translations.tooltips.newConversation}</span></calcite-tooltip>${!this._isMobile && T`<calcite-tooltip placement=bottom reference-element=solutionBuilderAction><span>${this._translations.tooltips.toggleSolutionBuilder}</span></calcite-tooltip>` || ""}<arcgis-assistant reference-element copy-enabled feedback-enabled heading description entry-message=${this._translations.defaultStartUpMessage ?? ee} .suggestedPrompts=${e} @arcgisSubmit=${(s) => {
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) => {
1153
1194
  console.log("arcgis submit: ", s.detail), this._suggestedPrompts = [], e = [], this._hasInteracted = !0;
1154
- const n = Date.now(), i = Me(n), o = s.detail || "Unknown";
1195
+ const n = Date.now(), i = Re(n), o = s.detail || "Unknown";
1155
1196
  this._telemetry?.logEvent({
1156
1197
  category: Le.ASSISTANT,
1157
1198
  action: "Chat",
@@ -1160,7 +1201,15 @@ class Yt extends ke {
1160
1201
  }), this.assistantProcessing.emit(!0);
1161
1202
  }} @arcgisFeedback=${(s) => {
1162
1203
  s.detail;
1163
- }} ${$e(this._assistantRef)}><arcgis-assistant-agent .agent=${Qt} .context=${{
1204
+ }} @arcgisInterrupt=${() => {
1205
+ this._queryElementInShadowDom(this.el, ".footer-container", !0);
1206
+ }} @arcgisInterruptCancel=${() => {
1207
+ this._queryElementInShadowDom(this.el, ".footer-container", !1);
1208
+ }} @arcgisInterruptSubmit=${() => {
1209
+ 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=${() => {
1211
+ 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=${{
1164
1213
  token: this._configContextConsumer.value?.userSession?.token,
1165
1214
  configContext: this._configContextConsumer.value,
1166
1215
  convoId: this._conversationId,
@@ -1213,8 +1262,30 @@ class Yt extends ke {
1213
1262
  });
1214
1263
  window.dispatchEvent(s);
1215
1264
  }
1265
+ _queryElementInShadowDom(e, s, n) {
1266
+ const i = e.shadowRoot;
1267
+ if (i) {
1268
+ const o = i.querySelector("arcgis-assistant");
1269
+ o && o.shadowRoot && this._findElementInShadowDom(o.shadowRoot, s, n);
1270
+ } else
1271
+ console.log("No shadowRoot found on this component.");
1272
+ }
1273
+ _findElementInShadowDom(e, s, n) {
1274
+ const i = e.querySelector(s);
1275
+ i && this._disableElementAndChildren(i, n);
1276
+ const o = e.children;
1277
+ for (const a of Array.from(o))
1278
+ a.classList.contains(s) && this._disableElementAndChildren(a, n), this._findElementInShadowDom(a, s, n);
1279
+ }
1280
+ _disableElementAndChildren(e, s) {
1281
+ "disabled" in e && (e.disabled = s), e.querySelectorAll("*").forEach((i) => {
1282
+ i.nodeName.toLowerCase() === "arcgis-assistant-chat-entry" && i.shadowRoot && i.shadowRoot.querySelectorAll("*").forEach((l) => {
1283
+ "disabled" in l && (l.disabled = s);
1284
+ }), "disabled" in i && (i.disabled = s);
1285
+ });
1286
+ }
1216
1287
  }
1217
- Ce("arcgis-solutions-assistant", Yt);
1288
+ Ce("arcgis-solutions-assistant", Xt);
1218
1289
  export {
1219
- Yt as ArcgisSolutionsAssistant
1290
+ Xt as ArcgisSolutionsAssistant
1220
1291
  };