@esri/solutions-components 5.1.0-next.144 → 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 (136) 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/{65L2LQGD.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/{YLC2EM5A.js → LCV5GKUD.js} +2 -2
  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/{5YXQ4UXZ.js → MEZL3ZHS.js} +24 -23
  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/solution-deployed-card-panel/t9n/messages.ar.json +1 -1
  76. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.bg.json +1 -1
  77. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.bs.json +1 -1
  78. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.ca.json +1 -1
  79. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.cs.json +1 -1
  80. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.da.json +1 -1
  81. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.de.json +1 -1
  82. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.el.json +1 -1
  83. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.es.json +1 -1
  84. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.et.json +1 -1
  85. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.fi.json +1 -1
  86. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.fr.json +1 -1
  87. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.he.json +1 -1
  88. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.hr.json +1 -1
  89. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.hu.json +1 -1
  90. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.id.json +1 -1
  91. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.it.json +1 -1
  92. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.ja.json +1 -1
  93. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.ko.json +1 -1
  94. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.lt.json +1 -1
  95. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.lv.json +1 -1
  96. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.nl.json +1 -1
  97. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.no.json +1 -1
  98. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.pl.json +1 -1
  99. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.pt-BR.json +1 -1
  100. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.pt-PT.json +1 -1
  101. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.ro.json +1 -1
  102. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.ru.json +1 -1
  103. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.sk.json +1 -1
  104. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.sl.json +1 -1
  105. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.sr.json +1 -1
  106. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.sv.json +1 -1
  107. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.th.json +1 -1
  108. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.tr.json +1 -1
  109. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.uk.json +1 -1
  110. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.vi.json +1 -1
  111. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.zh-CN.json +1 -1
  112. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.zh-HK.json +1 -1
  113. package/dist/cdn/assets/solution-deployed-card-panel/t9n/messages.zh-TW.json +1 -1
  114. package/dist/cdn/index.js +1 -1
  115. package/dist/chunks/converter.js +633 -367
  116. package/dist/chunks/deployFlowController.js +46 -0
  117. package/dist/chunks/designSolution.js +4 -3
  118. package/dist/chunks/explainValidationFailure.js +32 -0
  119. package/dist/chunks/solution-builder-assistant.js +157 -71
  120. package/dist/chunks/updateDesign.js +1 -1
  121. package/dist/components/arcgis-solutions-assistant/customElement.js +334 -248
  122. package/dist/components/solution-builder-assistant/customElement.js +3 -2
  123. package/dist/components/solution-deploying-dialog/customElement.js +12 -12
  124. package/dist/components/solution-details-panel/customElement.js +112 -102
  125. package/dist/docs/api.json +1 -1
  126. package/dist/docs/docs.json +1 -1
  127. package/dist/docs/web-types.json +1 -1
  128. package/dist/solutions-components_commit.txt +6 -6
  129. package/package.json +1 -1
  130. package/dist/cdn/5MPYPIR2.js +0 -2
  131. package/dist/cdn/CGCNGFBL.js +0 -2
  132. package/dist/cdn/FE2GEHNL.js +0 -2
  133. package/dist/cdn/GLQZHYJP.js +0 -4
  134. package/dist/cdn/LYK2CASU.js +0 -2
  135. package/dist/cdn/S6U6SXMD.js +0 -2
  136. package/dist/cdn/SYZEWVHU.js +0 -2
@@ -1,26 +1,26 @@
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 Z, nothing as X } from "@arcgis/lumina";
5
- import { css as Ee, html as k } from "lit";
6
- import { unsafeHTML as Te } from "lit/directives/unsafe-html.js";
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
+ import { unsafeHTML as Ee } from "lit/directives/unsafe-html.js";
7
7
  import { useContextConsumer as ee } 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";
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
11
  import te 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 O, START as z, END as x, NodeInterrupt as ne } from "@langchain/langgraph/web";
14
- import { createAgentRuntimeState as j, sendTraceMessage as v, invokeStructuredPrompt as D, getEmbeddings as Be, cosineSimilarity as Fe, invokeTextPrompt as Pe } from "@arcgis/ai-orchestrator";
15
- import r, { z as T } from "zod";
16
- import * as J from "@esri/arcgis-rest-portal";
17
- import { applyPatch as Ne } from "fast-json-patch";
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
+ import * as G from "@esri/arcgis-rest-portal";
17
+ import { applyPatch as Be } from "fast-json-patch";
18
18
  import "@langchain/core/messages";
19
19
  import { C as ie } from "../../chunks/converter.js";
20
- import { g as F, t as oe, r as ae, c as qe, d as A } from "../../chunks/templates.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
- const ze = Ee`: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)}`;
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
24
  async function y(t, e) {
25
25
  const s = Object.entries(t).find(
26
26
  ([n]) => n.endsWith(`/${e}.md`)
@@ -34,7 +34,7 @@ ${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
40
  function re(t) {
@@ -93,13 +93,13 @@ 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
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
- 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,12 +112,12 @@ 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)), We = 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
119
119
  // persists into priorSteps.
120
- ...j(),
120
+ ...J(),
121
121
  solutionResponse: b({
122
122
  reducer: (t, e) => e ?? null,
123
123
  default: () => null
@@ -133,7 +133,7 @@ const Ve = (t) => new Promise((e) => setTimeout(e, t)), We = b.Root({
133
133
  reducer: (t, e) => e ?? t,
134
134
  default: () => null
135
135
  })
136
- }), Ke = () => new O(We).addNode("initializeAgent", Ye).addNode("askSolutionsQuestions", Qe).addEdge(z, "initializeAgent").addEdge("initializeAgent", "askSolutionsQuestions").addEdge("askSolutionsQuestions", x), de = 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
138
  const i = ce(t);
139
139
  if (!i) return;
@@ -147,15 +147,15 @@ const Ve = (t) => new Promise((e) => setTimeout(e, t)), We = b.Root({
147
147
  }
148
148
  }
149
149
  } };
150
- n && (a.conversationId = n), U(a, i, e ?? "");
150
+ n && (a.conversationId = n), O(a, i, e ?? "");
151
151
  }, Qe = async (t, e) => {
152
- const s = N(e), n = t.documentSkillUrl;
152
+ const s = B(e), n = t.documentSkillUrl;
153
153
  let i = [];
154
154
  await v(
155
155
  { text: s.agentProgress.explorerAgentSearching },
156
156
  e
157
157
  );
158
- let o = await U(
158
+ let o = await O(
159
159
  {
160
160
  message: t.agentExecutionContext.userRequest,
161
161
  conversationId: e?.configurable?.context?.convoId ?? void 0,
@@ -181,25 +181,25 @@ const Ve = (t) => new Promise((e) => setTimeout(e, t)), We = b.Root({
181
181
  ackSequenceNumber: o.sequenceNumber,
182
182
  inquiryId: o.inquiryId
183
183
  }, l = "";
184
- const d = async (g) => {
185
- const h = g.context?.results?.[0]?.reply ?? "";
184
+ const u = async (m) => {
185
+ const h = m.context?.results?.[0]?.reply ?? "";
186
186
  if (h !== "") {
187
- const m = Je(h), E = Ge(m, e);
188
- l = E.source, i = [
187
+ const g = Je(h), A = Ge(g, e);
188
+ l = A.source, i = [
189
189
  ...i,
190
- ...E.allMatches.filter(
190
+ ...A.allMatches.filter(
191
191
  (C) => !i.some((_) => _.solution.id === C.solution.id)
192
192
  )
193
193
  ];
194
194
  }
195
- const c = g.context?.results?.[0]?.status?.currentStatusStep;
196
- if (c) {
197
- let m = "";
198
- c === 1 ? m = s.agentProgress.explorerAgentReading : c === 2 ? m = s.agentProgress.explorerAgentReviewing : c === 3 && (m = s.agentProgress.explorerAgentPreparing), await v({ text: m }, 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);
199
199
  }
200
200
  };
201
- for (await d(o); a.hasMore; )
202
- await Ve(500), o = await U(
201
+ for (await u(o); a.hasMore; )
202
+ await He(500), o = await O(
203
203
  {
204
204
  conversationId: a.conversationId,
205
205
  ackSequenceNumber: a.ackSequenceNumber,
@@ -213,7 +213,7 @@ const Ve = (t) => new Promise((e) => setTimeout(e, t)), We = b.Root({
213
213
  hasMore: o.hasMore,
214
214
  ackSequenceNumber: o.sequenceNumber,
215
215
  inquiryId: o.inquiryId
216
- }, await d(o);
216
+ }, await u(o);
217
217
  return ce(e?.configurable?.context.portal) && de(
218
218
  e?.configurable?.context.portal,
219
219
  e?.configurable?.context.token ?? "",
@@ -228,7 +228,7 @@ const Ve = (t) => new Promise((e) => setTimeout(e, t)), We = b.Root({
228
228
  };
229
229
  }, Ye = async (t, e) => {
230
230
  let s = null;
231
- 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)), {
232
232
  documentSkillUrl: s
233
233
  };
234
234
  };
@@ -243,7 +243,7 @@ const ue = (t) => {
243
243
  return "human";
244
244
  }
245
245
  return "human";
246
- }, Ze = (t) => {
246
+ }, Xe = (t) => {
247
247
  const e = ue(t);
248
248
  if (t && t.kwargs)
249
249
  return {
@@ -259,7 +259,7 @@ const ue = (t) => {
259
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;
260
260
  }
261
261
  return { role: "human", content: String(t) };
262
- }, Xe = (t) => ue(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 = {
263
263
  builderMessages: st
264
264
  }, it = /* @__PURE__ */ new Set([
265
265
  "add",
@@ -314,6 +314,8 @@ const ue = (t) => {
314
314
  "rownum",
315
315
  "select",
316
316
  "set",
317
+ "shape",
318
+ "subtype",
317
319
  "table",
318
320
  "top",
319
321
  "truncate",
@@ -326,7 +328,7 @@ const ue = (t) => {
326
328
  ]);
327
329
  class pe {
328
330
  constructor(e, s, n = !0) {
329
- 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();
330
332
  }
331
333
  validate() {
332
334
  this.compareModels(), this.validateResponse();
@@ -338,11 +340,11 @@ class pe {
338
340
  const e = new Set(this.template.solution.strings.map((n) => n.key)), s = new Set(this.response.solution.strings.map((n) => n.key));
339
341
  e.size === s.size && [...e].every((n) => s.has(n)) || this.logIssue("String keys in llm response do not match the template.");
340
342
  for (const n of this.response.solution.strings)
341
- 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.`);
342
344
  }
343
345
  compareItems() {
344
346
  const e = new Set(this.template.items.map((n) => n.id)), s = new Set(this.response.items.map((n) => n.id));
345
- 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.");
346
348
  }
347
349
  compareFeatureLayers() {
348
350
  const e = this.template.featureLayer, s = this.response.featureLayer;
@@ -363,14 +365,20 @@ class pe {
363
365
  }
364
366
  }
365
367
  validateResponse() {
366
- 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;
367
375
  this.response.featureLayer.layers.length || this.logIssue("Feature layer item must contain at least one layer.");
368
- const s = this.response.featureLayer.layers.map((n) => n.name.toLowerCase());
369
- s.length !== new Set(s).size && this.logIssue("Layer names must be unique (case-insensitive).");
370
- for (const n of this.response.featureLayer.layers) {
371
- this.validateLayer(n);
372
- const i = e.find((o) => o.id === n.id);
373
- 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);
374
382
  }
375
383
  }
376
384
  validateRequiredFields(e, s) {
@@ -378,7 +386,12 @@ class pe {
378
386
  for (const i of s.requiredFields)
379
387
  n.has(i.name) || this.logIssue(`Layer '${e.name}' is missing required field '${i.name}'.`);
380
388
  }
381
- 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) {
382
395
  const s = /* @__PURE__ */ new Set([
383
396
  "objectid",
384
397
  "globalid",
@@ -386,26 +399,57 @@ class pe {
386
399
  "created_user",
387
400
  "last_edited_date",
388
401
  "last_edited_user"
389
- ]), n = e.systemFields ?? [];
390
- if (n.length) {
391
- const o = new Set(n.map((l) => l.name));
392
- (o.size !== s.size || [...s].some((l) => !o.has(l))) && this.logIssue(
393
- `Layer '${e.name}' has invalid system fields: ${JSON.stringify([...o])}.`
394
- );
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)}.`);
419
+ }
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;
395
437
  }
396
- const i = [
397
- ...e.customFields,
398
- ...e.requiredFields,
399
- ...n
400
- ].map((o) => o.name);
401
- i.length !== new Set(i).size && this.logIssue(`Layer '${e.name}' has duplicate fields: ${JSON.stringify(i)}.`);
402
- for (const o of [...e.customFields, ...e.requiredFields, ...n])
403
- this.validateField(o);
438
+ return n.add(a.toLowerCase()), a;
404
439
  }
405
440
  validateField(e) {
406
- 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)) {
407
- const s = Math.max(...e.choiceList.map((n) => n.length));
408
- 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}.`));
409
453
  }
410
454
  }
411
455
  logIssue(e) {
@@ -460,7 +504,7 @@ const ot = r.object({
460
504
  itemId: r.string().describe("ArcGIS item id for the feature layer."),
461
505
  addLayers: r.boolean().describe("Indicates whether new layers can be added during solution design."),
462
506
  layers: r.array(rt)
463
- }), G = r.object({
507
+ }), V = r.object({
464
508
  response: r.string().describe("Conversational response to the user's query."),
465
509
  solution: r.object({
466
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."),
@@ -480,40 +524,71 @@ const ot = r.object({
480
524
  response: r.string().describe("Conversational response describing the accepted design changes."),
481
525
  patches: r.array(ct).describe("Minimal RFC 6902 patch operations needed to update the current design.")
482
526
  }), ut = r.object({
483
- 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.")
484
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({
485
531
  templateId: r.string().min(1).describe("Template id from the available template list."),
486
532
  confidence: r.number().min(0).max(1).describe("Confidence score from 0 to 1 for this template match."),
487
533
  templateDescription: r.string().min(1).describe("Short description this template in the user's use case/workflow.")
488
- }), mt = r.object({
534
+ }), gt = r.object({
489
535
  assistantResponse: r.string().describe("Natural-language response for the user."),
490
536
  isValidUseCase: r.boolean().describe("True only when the request is concrete, appropriate, and has at least one matching template."),
491
- matchedTemplates: r.array(pt).describe("Ordered list of matching templates, best match first. Empty when no valid match exists.")
492
- }), H = (t) => t in A, gt = 5, ht = 0.8, ft = 0.15, bt = "Web Mapping Application", yt = "Embeddings";
493
- let $ = null, q = null, M = null, B = null;
494
- 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({
495
569
  "./prompts/description.md": () => import("../../chunks/description2.js").then((t) => t.default),
496
570
  "./prompts/designSolution.md": () => import("../../chunks/designSolution.js").then((t) => t.default),
571
+ "./prompts/explainValidationFailure.md": () => import("../../chunks/explainValidationFailure.js").then((t) => t.default),
497
572
  "./prompts/findExistingSolution.md": () => import("../../chunks/findExistingSolution.js").then((t) => t.default),
498
573
  "./prompts/initialAssessment.md": () => import("../../chunks/initialAssessment.js").then((t) => t.default),
499
574
  "./prompts/updateDesign.md": () => import("../../chunks/updateDesign.js").then((t) => t.default)
500
- }), vt = nt.builderMessages, f = (t, e, s) => N(e)?.builderMessages?.[t] ?? vt[t], me = (t) => {
575
+ }), It = nt.builderMessages, f = (t, e, s) => B(e)?.builderMessages?.[t] ?? It[t], me = (t) => {
501
576
  typeof window < "u" && window.dispatchEvent(new CustomEvent("arcgis-solution-design-update", {
502
577
  detail: t
503
578
  }));
504
- }, wt = async (t, e, s) => {
579
+ }, Ct = async (t, e, s) => {
505
580
  if (!t) return null;
506
- const n = `type:"${bt}" AND typekeywords:${yt} AND group:${t}`;
507
- return (await J.searchItems({
581
+ const n = `type:"${vt}" AND typekeywords:${wt} AND group:${t}`;
582
+ return (await G.searchItems({
508
583
  q: n,
509
584
  params: e ? { token: e } : void 0,
510
585
  portal: s,
511
586
  num: 1
512
587
  }))?.results?.[0] ?? null;
513
588
  };
514
- async function St(t, e, s) {
589
+ async function _t(t, e, s) {
515
590
  try {
516
- const n = await wt(t, e, s);
591
+ const n = await Ct(t, e, s);
517
592
  if (!n) return null;
518
593
  const i = new Oe({ id: n.id });
519
594
  return await i.load(), await i.fetchData("json");
@@ -521,18 +596,18 @@ async function St(t, e, s) {
521
596
  return null;
522
597
  }
523
598
  }
524
- const It = async (t, e, s) => {
599
+ const kt = async (t, e, s) => {
525
600
  if (!t) return [];
526
- const n = `type:Solution AND typekeywords:${xt} AND group:${t}`;
527
- return (await J.searchItems({
601
+ const n = `type:Solution AND typekeywords:${St} AND group:${t}`;
602
+ return (await G.searchItems({
528
603
  q: n,
529
604
  params: e ? { token: e } : void 0,
530
605
  portal: s,
531
606
  num: 100
532
607
  }))?.results ?? [];
533
- }, Ct = async (t, e, s) => {
608
+ }, Tt = async (t, e, s) => {
534
609
  try {
535
- const n = await J.getItemData(t, {
610
+ const n = await G.getItemData(t, {
536
611
  params: e ? { token: e } : void 0,
537
612
  portal: s
538
613
  }), i = n?.buildSolution;
@@ -572,10 +647,10 @@ const It = async (t, e, s) => {
572
647
  error: s instanceof Error ? s.stack ?? s.message : String(s)
573
648
  };
574
649
  }
575
- }, V = async (t) => {
576
- if (q) {
577
- Object.entries(q).forEach(([a, l]) => {
578
- A[a] && (A[a].initialTemplate = l);
650
+ }, W = async (t) => {
651
+ if (U) {
652
+ Object.entries(U).forEach(([a, l]) => {
653
+ D[a] && (D[a].initialTemplate = l);
579
654
  });
580
655
  return;
581
656
  }
@@ -584,35 +659,35 @@ const It = async (t, e, s) => {
584
659
  console.warn("Solution Builder: missing primarySolutionsGroupId in appConfig; skipping live template hydration.");
585
660
  return;
586
661
  }
587
- const i = await It(s, e, n), o = {};
662
+ const i = await kt(s, e, n), o = {};
588
663
  await Promise.all(i.map(async (a) => {
589
664
  const l = a.properties?.templateInfo;
590
665
  if (!l || typeof l != "object") return;
591
- const d = l.id;
592
- if (typeof d != "string" || o[d]) return;
593
- const u = await Ct(a.id, e, n);
594
- if (!u) return;
595
- const { buildSolution: g, params: h } = u;
596
- if (typeof g == "object" && g !== null && "solution" in g) {
597
- const m = g.solution;
598
- m.thumbnailUrl = a.thumbnail ? `${n ?? "https://www.arcgis.com/sharing/rest"}/content/items/${a.id}/info/${a.thumbnail}` : void 0, m.item = a;
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;
673
+ g.thumbnailUrl = a.thumbnail ? `${n ?? "https://www.arcgis.com/sharing/rest"}/content/items/${a.id}/info/${a.thumbnail}` : void 0, g.item = a;
599
674
  }
600
- const c = {
675
+ const d = {
601
676
  ...l,
602
- buildSolution: g
677
+ buildSolution: m
603
678
  };
604
- o[d] = I(
605
- new ie(c).dumpToLlmTemplate(),
679
+ o[u] = I(
680
+ new ie(d).dumpToLlmTemplate(),
606
681
  {
607
682
  itemId: a.id,
608
- sourceBuildSolution: structuredClone(g),
683
+ sourceBuildSolution: structuredClone(m),
609
684
  params: h ? structuredClone(h) : null
610
685
  }
611
- ), A[d] = {
686
+ ), D[u] = {
612
687
  ...l,
613
- initialTemplate: o[d]
688
+ initialTemplate: o[u]
614
689
  };
615
- })), q = o;
690
+ })), U = o;
616
691
  }, he = (t) => {
617
692
  const e = t?.configurable?.context?.token;
618
693
  return typeof e != "string" || !e.trim() ? null : e;
@@ -623,16 +698,16 @@ const It = async (t, e, s) => {
623
698
  const e = t?.configurable?.context?.configContext?.portalURL;
624
699
  if (!(typeof e != "string" || !e.trim()))
625
700
  return `${e.replace(/\/+$/, "")}/sharing/rest`;
626
- }, _t = async (t) => {
701
+ }, Et = async (t) => {
627
702
  await Promise.all([
628
703
  xe(t),
629
- V(t)
704
+ W(t)
630
705
  ]);
631
706
  }, ye = async (t) => {
632
707
  const e = he(t);
633
- (!M || e && e !== B) && (B = e ?? B, M = _t(t).catch((n) => {
634
- throw M = null, B = null, n;
635
- })), await M;
708
+ (!R || e && e !== M) && (M = e ?? M, R = Et(t).catch((n) => {
709
+ throw R = null, M = null, n;
710
+ })), await R;
636
711
  };
637
712
  async function xe(t) {
638
713
  if ($) return $;
@@ -641,14 +716,14 @@ async function xe(t) {
641
716
  return console.warn("Solution Builder: missing primarySolutionsGroupId in appConfig; skipping embeddings load."), null;
642
717
  const s = be(t), n = t?.configurable?.context?.configContext?.portalURL;
643
718
  await new Ue(n ? { url: n } : void 0).load();
644
- const o = he(t) ?? void 0, a = await St(e, o, s);
719
+ const o = he(t) ?? void 0, a = await _t(e, o, s);
645
720
  return a ? ($ = a.items, $) : null;
646
721
  }
647
- const kt = () => Object.entries(A).map(([t, e]) => `ID: ${t}
722
+ const At = () => Object.entries(D).map(([t, e]) => `ID: ${t}
648
723
  Label: ${e.label}
649
724
  Description: ${e.description}`).join(`
650
725
 
651
- `), Et = (t) => {
726
+ `), Lt = (t) => {
652
727
  const e = t?.configurable?.context?.solutionDesignJson;
653
728
  if (typeof e != "string" || !e.trim())
654
729
  return null;
@@ -656,23 +731,23 @@ Description: ${e.description}`).join(`
656
731
  const s = JSON.parse(e), n = I(
657
732
  { response: "", ...s },
658
733
  { itemId: s?.solution?.itemId ?? null }
659
- ), i = G.safeParse(n);
734
+ ), i = V.safeParse(n);
660
735
  if (!i.success)
661
736
  return null;
662
- const { response: o, ...a } = i.data, l = s.templateId, d = typeof l == "string" && H(l) ? l : null;
737
+ const { response: o, ...a } = i.data, l = s.templateId, u = typeof l == "string" && H(l) ? l : null;
663
738
  return I(
664
739
  a,
665
740
  {
666
741
  sourceBuildSolution: s.sourceBuildSolution,
667
- templateId: d,
742
+ templateId: u,
668
743
  params: s.params ?? null
669
744
  }
670
745
  );
671
746
  } catch {
672
747
  return null;
673
748
  }
674
- }, Tt = b.Root({
675
- ...j(),
749
+ }, Dt = b.Root({
750
+ ...J(),
676
751
  /** Optional human-readable template description retained for UI use. */
677
752
  templateDescription: b({
678
753
  reducer: (t, e) => typeof e == "string" || e === null ? e : t ?? null,
@@ -703,98 +778,98 @@ Description: ${e.description}`).join(`
703
778
  reducer: (t = null, e) => e === void 0 ? t : e ?? null,
704
779
  default: () => null
705
780
  })
706
- }), At = (t, e) => {
707
- const s = Et(e), n = s?.templateId ?? null, i = {};
781
+ }), Ft = (t, e) => {
782
+ const s = Lt(e), n = s?.templateId ?? null, i = {};
708
783
  return JSON.stringify(t.currentDesign) !== JSON.stringify(s) && (i.currentDesign = s), n && t.selectedTemplate !== n && (i.selectedTemplate = n), i;
709
- }, Dt = async (t, e) => {
784
+ }, $t = async (t, e) => {
710
785
  await v({ text: f("understandingRequest", e) }, e), await ye(e);
711
- const s = t.agentExecutionContext.userRequest, n = kt(), i = t.agentExecutionContext.messages.slice(-11), o = await D({
712
- promptText: await y(L, "initialAssessment"),
786
+ const s = t.agentExecutionContext.userRequest, n = At(), i = t.agentExecutionContext.messages.slice(-11), o = await E({
787
+ promptText: await y(T, "initialAssessment"),
713
788
  modelTier: "advanced",
714
789
  temperature: 0,
715
- schema: mt,
790
+ schema: gt,
716
791
  messages: i,
717
792
  inputVariables: { query: s, availableTemplates: n }
718
793
  }), a = o.matchedTemplates.filter(
719
- (c) => H(c.templateId)
794
+ (d) => H(d.templateId)
720
795
  ), l = {
721
796
  ...o,
722
797
  matchedTemplates: a
723
- }, [d, u] = a, h = !!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;
724
799
  return {
725
800
  assessment: l,
726
801
  selectedTemplate: h,
727
802
  existingMatches: [],
728
803
  continueBuilding: null
729
804
  };
730
- }, Lt = (t) => {
805
+ }, Rt = (t) => {
731
806
  const e = t.assessment?.assistantResponse ?? "";
732
807
  return {
733
808
  outputMessage: e,
734
809
  summary: e,
735
810
  status: "success"
736
811
  };
737
- }, Rt = (t, e) => {
812
+ }, Mt = (t, e) => {
738
813
  const { hitlResponse: s } = e.configurable, n = "selectTemplate", i = t.assessment?.matchedTemplates.filter(
739
- (u) => H(u.templateId)
740
- ) ?? [], o = i.map((u) => `${u.templateDescription}`);
814
+ (c) => H(c.templateId)
815
+ ) ?? [], o = i.map((c) => `${c.templateDescription}`);
741
816
  if (s?.agentId !== "solutionBuilder" || s.id !== n) {
742
- const u = {
817
+ const c = {
743
818
  agentId: "solutionBuilder",
744
819
  id: n,
745
820
  kind: "singleSelection",
746
821
  message: f("selectTemplatePrompt", e),
747
822
  metadata: [...o]
748
823
  };
749
- throw new ne(u);
824
+ throw new ne(c);
750
825
  }
751
- const a = String(s.payload ?? ""), l = o.findIndex((u) => u === a);
826
+ const a = String(s.payload ?? ""), l = o.findIndex((c) => c === a);
752
827
  return {
753
828
  selectedTemplate: (l >= 0 ? i[l] : void 0)?.templateId ?? i[0]?.templateId ?? null
754
829
  };
755
- }, $t = async (t, e) => {
830
+ }, Nt = async (t, e) => {
756
831
  await v({ text: f("searchingExistingSolutions", e) }, e);
757
832
  const s = t.agentExecutionContext.userRequest, n = tt(t.agentExecutionContext.messages) || s, i = await xe(e);
758
833
  if (!i)
759
834
  return console.warn("Solutions Search: failed to load solution embeddings cache; skipping search."), { existingMatches: [] };
760
835
  if (!i.length)
761
836
  return { existingMatches: [] };
762
- const [o] = await Be([n]), a = i.map((c) => ({
763
- solution: c,
764
- score: Fe(o, c.embedding)
837
+ const [o] = await Me([n]), a = i.map((d) => ({
838
+ solution: d,
839
+ score: Ne(o, d.embedding)
765
840
  }));
766
- a.sort((c, m) => m.score - c.score);
767
- const l = a.slice(0, gt);
841
+ a.sort((d, g) => g.score - d.score);
842
+ const l = a.slice(0, bt);
768
843
  if (!l.length)
769
844
  return { existingMatches: [] };
770
- const d = l.map(({ solution: c }) => `${c.title}
771
- Snippet: ${c.snippet}
772
- Description: ${c.description}`).join(`
845
+ const u = l.map(({ solution: d }) => `${d.title}
846
+ Snippet: ${d.snippet}
847
+ Description: ${d.description}`).join(`
773
848
 
774
- `), u = t.agentExecutionContext.messages.slice(-11);
775
- return { existingMatches: (await D({
776
- promptText: await y(L, "findExistingSolution"),
849
+ `), c = t.agentExecutionContext.messages.slice(-11);
850
+ return { existingMatches: (await E({
851
+ promptText: await y(T, "findExistingSolution"),
777
852
  modelTier: "fast",
778
853
  temperature: 0,
779
- schema: ut,
780
- messages: u,
781
- inputVariables: { query: s, candidates: d }
782
- })).matchedTitles.map((c) => l.find(({ solution: m }) => m.title === c)).filter((c) => c !== void 0) };
783
- }, 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) => {
784
859
  const { existingMatches: s } = t, { hitlResponse: n } = e.configurable, i = `confirmExistingSolution:${s[0].solution.id}`;
785
860
  if (n?.agentId !== "solutionBuilder" || n.id !== i) {
786
861
  s.length === 1 ? le(s[0].solution.id) : re(s);
787
- const d = f("existingSolutionMatch", e), u = [
862
+ const u = f("existingSolutionMatch", e), c = [
788
863
  f("continueBuildingYes", e),
789
864
  f("continueBuildingNo", e)
790
- ], g = {
865
+ ], m = {
791
866
  agentId: "solutionBuilder",
792
867
  id: i,
793
868
  kind: "singleSelection",
794
- message: d,
795
- metadata: u
869
+ message: u,
870
+ metadata: c
796
871
  };
797
- throw new ne(g);
872
+ throw new ne(m);
798
873
  }
799
874
  const o = String(n.payload ?? "").trim(), a = f("continueBuildingNo", e);
800
875
  return { continueBuilding: o !== a };
@@ -809,8 +884,8 @@ Description: ${c.description}`).join(`
809
884
  await ye(e);
810
885
  const { currentDesign: s } = t, n = t.agentExecutionContext.userRequest;
811
886
  await v({ text: f("creatingDesign", e) }, e);
812
- let i = F(t.selectedTemplate);
813
- if (i?.initialTemplate || (await V(e), i = F(t.selectedTemplate)), !i?.initialTemplate)
887
+ let i = N(t.selectedTemplate);
888
+ if (i?.initialTemplate || (await W(e), i = N(t.selectedTemplate)), !i?.initialTemplate)
814
889
  throw new Error("No hydrated templates are available for solution design.");
815
890
  const o = I(
816
891
  s ?? i.initialTemplate,
@@ -819,41 +894,41 @@ Description: ${c.description}`).join(`
819
894
  sourceBuildSolution: s?.sourceBuildSolution ?? i.initialTemplate.sourceBuildSolution,
820
895
  params: s?.params ?? i.initialTemplate.params ?? null
821
896
  }
822
- ), a = t.agentExecutionContext.messages.slice(-11), l = await D({
823
- promptText: await y(L, "designSolution"),
897
+ ), a = t.agentExecutionContext.messages.slice(-11), l = await E({
898
+ promptText: await y(T, "designSolution"),
824
899
  modelTier: "advanced",
825
900
  temperature: 0,
826
- schema: G,
901
+ schema: V,
827
902
  messages: a,
828
903
  inputVariables: {
829
904
  currentDesign: JSON.stringify(oe(o)),
830
905
  templateInstructions: i.instructions,
831
906
  query: n
832
907
  }
833
- }), { response: d, featureLayer: u, ...g } = l, h = ae(
834
- u,
908
+ }), { response: u, featureLayer: c, ...m } = l, h = ae(
909
+ c,
835
910
  o.featureLayer
836
- ), c = I(
837
- { ...g, featureLayer: h },
911
+ ), d = I(
912
+ { ...m, featureLayer: h },
838
913
  {
839
914
  itemId: o?.solution?.itemId,
840
915
  sourceBuildSolution: o.sourceBuildSolution,
841
916
  templateId: t.selectedTemplate ?? null,
842
917
  params: o.params ?? null
843
918
  }
844
- ), m = new pe(c, i.initialTemplate);
845
- if (!m.isValid)
919
+ ), g = new pe(d, i.initialTemplate);
920
+ if (!g.isValid)
846
921
  return console.warn(
847
922
  "[SolutionBuilder] designSolution validation failed:",
848
- { issues: m.issues, llmResponse: l }
923
+ { issues: g.issues, llmResponse: l }
849
924
  ), {
850
925
  outputMessage: f("createDesignFailed", e)
851
926
  };
852
- const E = c.sourceBuildSolution, C = ge(c, E);
927
+ const A = d.sourceBuildSolution, C = ge(d, A);
853
928
  if (!C.ok) {
854
929
  console.warn(
855
930
  "[SolutionBuilder] designSolution Esri JSON conversion failed:",
856
- { error: C.error, llmResponse: l, design: c }
931
+ { error: C.error, llmResponse: l, design: d }
857
932
  );
858
933
  const _ = f("createDesignFailed", e);
859
934
  return {
@@ -862,20 +937,20 @@ Description: ${c.description}`).join(`
862
937
  status: "success"
863
938
  };
864
939
  }
865
- return me(c), {
866
- outputMessage: d,
867
- summary: d,
940
+ return me(d), {
941
+ outputMessage: u,
942
+ summary: u,
868
943
  status: "success",
869
- currentDesign: c
944
+ currentDesign: d
870
945
  };
871
- }, Ft = async (t, e) => {
946
+ }, qt = async (t, e) => {
872
947
  const { currentDesign: s } = t;
873
948
  if (!s)
874
949
  return ve(t, e);
875
950
  const n = t.agentExecutionContext.userRequest, i = t.agentExecutionContext.messages.slice(-11);
876
951
  await v({ text: f("updatingDesign", e) }, e);
877
- const o = await D({
878
- promptText: await y(L, "updateDesign"),
952
+ const o = await E({
953
+ promptText: await y(T, "updateDesign"),
879
954
  modelTier: "advanced",
880
955
  temperature: 0,
881
956
  schema: dt,
@@ -891,7 +966,7 @@ Description: ${c.description}`).join(`
891
966
  summary: a,
892
967
  status: "success"
893
968
  };
894
- const d = (p) => {
969
+ const u = (p) => {
895
970
  try {
896
971
  return JSON.parse(p);
897
972
  } catch {
@@ -918,20 +993,20 @@ Description: ${c.description}`).join(`
918
993
  return p;
919
994
  }
920
995
  }
921
- }, g = [...l.map((p) => ({
996
+ }, m = [...l.map((p) => ({
922
997
  op: p.op,
923
998
  path: p.path.replace(/\/+$/, ""),
924
- ...p.value != null && p.value !== "" ? { value: d(p.value) } : {},
999
+ ...p.value != null && p.value !== "" ? { value: u(p.value) } : {},
925
1000
  ...p.from != null && p.from !== "" ? { from: p.from } : {}
926
1001
  }))].sort((p, S) => p.op !== "remove" || S.op !== "remove" ? 0 : S.path.localeCompare(p.path, void 0, { numeric: !0 })), h = structuredClone(
927
1002
  oe(s)
928
1003
  );
929
1004
  try {
930
- Ne(h, g, !0);
1005
+ Be(h, m, !0);
931
1006
  } catch (p) {
932
1007
  console.warn(
933
1008
  "[SolutionBuilder] updateDesign JSON patch failed:",
934
- { error: p, llmResponse: o, patches: g, patchTarget: h }
1009
+ { error: p, llmResponse: o, patches: m, patchTarget: h }
935
1010
  );
936
1011
  const S = f("applyChangeFailed", e);
937
1012
  return {
@@ -940,14 +1015,14 @@ Description: ${c.description}`).join(`
940
1015
  status: "success"
941
1016
  };
942
1017
  }
943
- const c = I(
1018
+ const d = I(
944
1019
  { response: "", ...h },
945
1020
  { itemId: s.solution?.itemId ?? null }
946
- ), m = G.safeParse(c);
947
- if (!m.success) {
1021
+ ), g = V.safeParse(d);
1022
+ if (!g.success) {
948
1023
  console.warn(
949
1024
  "[SolutionBuilder] updateDesign schema validation failed:",
950
- { errors: m.error.issues, llmResponse: o, patchedDesign: c }
1025
+ { errors: g.error.issues, llmResponse: o, patchedDesign: d }
951
1026
  );
952
1027
  const p = f("applyChangeFailed", e);
953
1028
  return {
@@ -956,7 +1031,7 @@ Description: ${c.description}`).join(`
956
1031
  status: "success"
957
1032
  };
958
1033
  }
959
- const { response: E, featureLayer: C, ..._ } = m.data, Se = ae(
1034
+ const { response: A, featureLayer: C, ..._ } = g.data, Se = ae(
960
1035
  C,
961
1036
  s.featureLayer
962
1037
  ), w = I(
@@ -968,17 +1043,28 @@ Description: ${c.description}`).join(`
968
1043
  params: s.params ?? null
969
1044
  }
970
1045
  );
971
- let R = F(t.selectedTemplate);
972
- if (R?.initialTemplate || (await V(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)
973
1048
  throw new Error("No hydrated templates are available for solution design.");
974
- const K = new pe(w, R.initialTemplate, !1);
975
- if (!K.isValid)
976
- return console.warn(
1049
+ const q = new pe(w, F.initialTemplate, !1);
1050
+ if (!q.isValid) {
1051
+ console.warn(
977
1052
  "[SolutionBuilder] updateDesign validation failed:",
978
- { issues: K.issues, llmResponse: o, patchedDesign: w }
979
- ), {
980
- 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"
981
1066
  };
1067
+ }
982
1068
  const Ie = w.sourceBuildSolution, Q = ge(w, Ie);
983
1069
  if (!Q.ok) {
984
1070
  console.warn(
@@ -998,39 +1084,39 @@ Description: ${c.description}`).join(`
998
1084
  status: "success",
999
1085
  currentDesign: w
1000
1086
  };
1001
- }, Pt = (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 O(Tt).addNode("syncCurrentDesignFromContext", At).addNode("assessInitialRequest", Dt).addNode("invalidUseCaseExit", Lt).addNode("selectTemplateHIL", Rt).addNode("findExistingSolutions", $t).addNode("confirmContinueBuildingHIL", Mt).addNode("declineContinueBuildingExit", Bt).addNode("designSolution", ve).addNode("updateDesign", Ft).addEdge(z, "syncCurrentDesignFromContext").addConditionalEdges("syncCurrentDesignFromContext", Pt, {
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, {
1002
1088
  updateDesign: "updateDesign",
1003
1089
  assessInitialRequest: "assessInitialRequest"
1004
- }).addConditionalEdges("assessInitialRequest", Nt, {
1090
+ }).addConditionalEdges("assessInitialRequest", Ot, {
1005
1091
  invalidUseCaseExit: "invalidUseCaseExit",
1006
1092
  selectTemplateHIL: "selectTemplateHIL",
1007
1093
  findExistingSolutions: "findExistingSolutions"
1008
- }).addEdge("invalidUseCaseExit", x).addEdge("selectTemplateHIL", "findExistingSolutions").addConditionalEdges("findExistingSolutions", qt, {
1094
+ }).addEdge("invalidUseCaseExit", x).addEdge("selectTemplateHIL", "findExistingSolutions").addConditionalEdges("findExistingSolutions", zt, {
1009
1095
  confirmContinueBuildingHIL: "confirmContinueBuildingHIL",
1010
1096
  designSolution: "designSolution"
1011
- }).addConditionalEdges("confirmContinueBuildingHIL", Ut, {
1097
+ }).addConditionalEdges("confirmContinueBuildingHIL", jt, {
1012
1098
  declineContinueBuildingExit: "declineContinueBuildingExit",
1013
1099
  designSolution: "designSolution"
1014
1100
  }).addEdge("declineContinueBuildingExit", x).addEdge("designSolution", x).addEdge("updateDesign", x);
1015
- await y(L, "description");
1016
- const zt = T.object({
1017
- tool: T.enum(["explorer", "builder", "other"]).describe("The selected tool based on the user's query."),
1018
- confidence: T.number().min(0).max(1).describe("A confidence score (0.00–1.00)."),
1019
- rationale: T.string().min(1).describe("A brief rationale for the tool choice (≤140 characters)"),
1020
- builderExclusion: T.boolean().describe("True only when tool is other specifically due to Builder Exclusion Override.")
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.")
1021
1107
  }), P = /* @__PURE__ */ Object.assign({
1022
1108
  "./prompts/assistantResponse.md": () => import("../../chunks/assistantResponse.js").then((t) => t.default),
1023
1109
  "./prompts/classifyIntent.md": () => import("../../chunks/classifyIntent.js").then((t) => t.default),
1024
1110
  "./prompts/description.md": () => import("../../chunks/description.js").then((t) => t.default),
1025
1111
  "./prompts/responseOptionsBuilderExclusion.md": () => import("../../chunks/responseOptionsBuilderExclusion.js").then((t) => t.default),
1026
1112
  "./prompts/responseOptionsDefault.md": () => import("../../chunks/responseOptionsDefault.js").then((t) => t.default)
1027
- }), W = () => {
1113
+ }), K = () => {
1028
1114
  const t = new CustomEvent("assistantProcessing", {
1029
1115
  detail: !1
1030
1116
  });
1031
1117
  window.dispatchEvent(t);
1032
1118
  }, we = b.Root({
1033
- ...j(),
1119
+ ...J(),
1034
1120
  selectedTool: b({
1035
1121
  reducer: (t, e) => e ?? null,
1036
1122
  default: () => null
@@ -1043,8 +1129,8 @@ const zt = T.object({
1043
1129
  reducer: (t, e) => e ?? !1,
1044
1130
  default: () => !1
1045
1131
  })
1046
- }), jt = async (t, e) => {
1047
- const s = N(e);
1132
+ }), Vt = async (t, e) => {
1133
+ const s = B(e);
1048
1134
  await v(
1049
1135
  { text: s?.builderMessages.understandingRequest },
1050
1136
  e
@@ -1057,27 +1143,27 @@ const zt = T.object({
1057
1143
  } catch {
1058
1144
  a = !1;
1059
1145
  }
1060
- const l = await y(P, "classifyIntent"), d = await D({
1146
+ const l = await y(P, "classifyIntent"), u = await E({
1061
1147
  promptText: l,
1062
1148
  modelTier: "advanced",
1063
1149
  temperature: 0,
1064
- schema: zt,
1150
+ schema: Gt,
1065
1151
  messages: i,
1066
1152
  inputVariables: { query: n, activeSolutionDesign: a }
1067
1153
  });
1068
1154
  return {
1069
- selectedTool: d.tool,
1070
- intentRationale: d.rationale,
1071
- builderExclusion: d.builderExclusion
1155
+ selectedTool: u.tool,
1156
+ intentRationale: u.rationale,
1157
+ builderExclusion: u.builderExclusion
1072
1158
  };
1073
- }, Jt = async (t, e) => {
1074
- const n = await Ke().compile().invoke(t, e);
1075
- return W(), n;
1076
- }, Gt = async (t, e) => {
1077
- const n = await Ot().compile().invoke(t, e);
1078
- return W(), n;
1079
1159
  }, Ht = async (t, e) => {
1080
- const s = N(e), n = t.agentExecutionContext.userRequest, i = t.intentRationale ?? "No rationale available.", o = t.builderExclusion ? "responseOptionsBuilderExclusion" : "responseOptionsDefault";
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";
1081
1167
  await v(
1082
1168
  { text: s?.executingSolutionsAssistantAgent },
1083
1169
  e
@@ -1085,30 +1171,30 @@ const zt = T.object({
1085
1171
  const a = await y(P, "assistantResponse"), l = await y(
1086
1172
  P,
1087
1173
  o
1088
- ), d = t.agentExecutionContext.messages.slice(-11), u = await Pe({
1174
+ ), u = t.agentExecutionContext.messages.slice(-11), c = await Pe({
1089
1175
  promptText: a,
1090
1176
  modelTier: "advanced",
1091
1177
  temperature: 0,
1092
- messages: d,
1178
+ messages: u,
1093
1179
  inputVariables: { query: n, rationale: i, responseOptions: l }
1094
1180
  });
1095
- return W(), {
1096
- outputMessage: u,
1097
- summary: u,
1181
+ return K(), {
1182
+ outputMessage: c,
1183
+ summary: c,
1098
1184
  status: "success"
1099
1185
  };
1100
- }, Vt = (t) => t.selectedTool ?? "other", Wt = () => new O(we).addNode("classifyIntent", jt).addNode("routeToExplorer", Jt).addNode("routeToBuilder", Gt).addNode("assistantResponse", Ht).addEdge(z, "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, {
1101
1187
  explorer: "routeToExplorer",
1102
1188
  builder: "routeToBuilder",
1103
1189
  other: "assistantResponse"
1104
- }).addEdge("routeToExplorer", x).addEdge("routeToBuilder", x).addEdge("assistantResponse", x), Kt = await y(P, "description"), Qt = {
1190
+ }).addEdge("routeToExplorer", x).addEdge("routeToBuilder", x).addEdge("assistantResponse", x), Xt = await y(P, "description"), Zt = {
1105
1191
  id: "solutionsAssistant",
1106
1192
  name: "Solutions Assistant Agent",
1107
- description: Kt,
1108
- createGraph: Wt,
1193
+ description: Xt,
1194
+ createGraph: Yt,
1109
1195
  workspace: we
1110
- }, Yt = "https://links.esri.com/solutions/agol-organizational-account", Zt = "https://links.esri.com/solutions/configure-assistants";
1111
- class Xt extends ke {
1196
+ }, es = "https://links.esri.com/solutions/agol-organizational-account", ts = "https://links.esri.com/solutions/configure-assistants";
1197
+ class ss extends ke {
1112
1198
  constructor() {
1113
1199
  super(), this.open = !1, this.userFirstName = "", this.builderVisible = !1, this.hasActiveBuilderDesign = !1, this._conversationId = void 0, this._orgSettings = {
1114
1200
  aiAssistantsEnabled: !1,
@@ -1121,14 +1207,14 @@ class Xt extends ke {
1121
1207
  e?.portalURL && (te.portalUrl = e.portalURL), e?.userSession && !this.userFirstName && this._loadUserFirstName(), e?.authentication?.PortalSubset?.orgSettings && (this._orgSettings = e?.authentication?.PortalSubset?.orgSettings);
1122
1208
  }
1123
1209
  }), this._builderDesignContextConsumer = ee({
1124
- context: De,
1210
+ context: Le,
1125
1211
  subscribe: !0,
1126
1212
  callback: (e) => {
1127
1213
  e?.design && (this._solutionDesignJson = JSON.stringify(e.design, null, 2));
1128
1214
  }
1129
1215
  }), this._handleResize = () => {
1130
1216
  this._isMobile = window.innerWidth <= 800;
1131
- }, this.closeAssistant = Z(), this.assistantProcessing = Z(), this._handleAssistantLinkClick = (e) => {
1217
+ }, this.closeAssistant = X(), this.assistantProcessing = X(), this._handleAssistantLinkClick = (e) => {
1132
1218
  const s = e.composedPath().find((n) => n instanceof HTMLAnchorElement);
1133
1219
  if (s?.href)
1134
1220
  if (e.preventDefault(), s.target.indexOf("solutionId:") > -1) {
@@ -1176,20 +1262,20 @@ class Xt extends ke {
1176
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;
1177
1263
  }
1178
1264
  _renderNoSign() {
1179
- 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 ?? X} 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>`;
1180
1266
  }
1181
1267
  _renderNoPermission() {
1182
- 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">${Te(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>`;
1183
1269
  }
1184
1270
  render() {
1185
1271
  let e = this._suggestedPrompts.length > 0 ? this._suggestedPrompts : this._hasInteracted ? [] : Object.values(this._translations.defaultFollowUpQuestions);
1186
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=${() => {
1187
1273
  window.dispatchEvent(new CustomEvent("toggleSolutionBuilder"));
1188
- }} 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 ?? X} .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) => {
1189
1275
  console.log("arcgis submit: ", s.detail), this._suggestedPrompts = [], e = [], this._hasInteracted = !0;
1190
- const n = Date.now(), i = Re(n), o = s.detail || "Unknown";
1276
+ const n = Date.now(), i = Fe(n), o = s.detail || "Unknown";
1191
1277
  this._telemetry?.logEvent({
1192
- category: Le.ASSISTANT,
1278
+ category: De.ASSISTANT,
1193
1279
  action: "Chat",
1194
1280
  dimensions: [o],
1195
1281
  metrics: [i]
@@ -1202,9 +1288,9 @@ class Xt extends ke {
1202
1288
  this._queryElementInShadowDom(this.el, ".footer-container", !1);
1203
1289
  }} @arcgisInterruptSubmit=${() => {
1204
1290
  this._queryElementInShadowDom(this.el, ".footer-container", !1);
1205
- }} ${Me(this._assistantRef)}><calcite-button appearance=solid id=newChatButton icon-start=speech-bubble-plus kind=neutral .label=${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=${() => {
1206
1292
  this._conversationId = void 0, this._suggestedPrompts = [], this._hasInteracted = !1, this._assistantRef.value?.clearChatHistory(), this._queryElementInShadowDom(this.el, ".footer-container", !1);
1207
- }} round scale=s slot=entry-actions-start>${this._translations.tooltips.newChat}</calcite-button><arcgis-assistant-agent .agent=${Qt} .context=${{
1293
+ }} round scale=m slot=entry-actions-start>${this._translations.tooltips.newChat}</calcite-button><arcgis-assistant-agent .agent=${Zt} .context=${{
1208
1294
  token: this._configContextConsumer.value?.userSession?.token,
1209
1295
  configContext: this._configContextConsumer.value,
1210
1296
  convoId: this._conversationId,
@@ -1218,7 +1304,7 @@ class Xt extends ke {
1218
1304
  clearSuggestedPrompts: () => {
1219
1305
  this._suggestedPrompts = [];
1220
1306
  }
1221
- }}></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=${() => {
1222
1308
  this.closeAssistant.emit(!0);
1223
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>`;
1224
1310
  }
@@ -1237,14 +1323,14 @@ class Xt extends ke {
1237
1323
  }
1238
1324
  }
1239
1325
  _parseAgentPickedAndTask(e) {
1240
- const s = Array.from(this._assistantRef.value?.messages || []), n = e.log || [], a = [...s].sort((c, m) => m.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;
1241
1327
  if (!l)
1242
1328
  return { agentPicked: null, taskAssigned: null, userMessage: a };
1243
- const d = /Agent picked:\s*(.*?)\s*(?:\\n|\r?\n)\s*Task Assigned:\s*([\s\S]*)$/i, u = l.match(d);
1244
- 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)
1245
1331
  return { agentPicked: null, taskAssigned: null, userMessage: a };
1246
- const g = u[1].trim(), h = u[2].trim();
1247
- return { agentPicked: g, taskAssigned: h, userMessage: a };
1332
+ const m = c[1].trim(), h = c[2].trim();
1333
+ return { agentPicked: m, taskAssigned: h, userMessage: a };
1248
1334
  }
1249
1335
  _emitItemIdFromAI(e) {
1250
1336
  const s = new CustomEvent("solutionIDFromAssistant", {
@@ -1277,7 +1363,7 @@ class Xt extends ke {
1277
1363
  });
1278
1364
  }
1279
1365
  }
1280
- Ce("arcgis-solutions-assistant", Xt);
1366
+ Ce("arcgis-solutions-assistant", ss);
1281
1367
  export {
1282
- Xt as ArcgisSolutionsAssistant
1368
+ ss as ArcgisSolutionsAssistant
1283
1369
  };