@esri/solutions-components 5.1.0-next.150 → 5.1.0-next.151

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 (67) hide show
  1. package/dist/cdn/{KH5WPLZK.js → 2BM4W44V.js} +1 -1
  2. package/dist/cdn/{6K3C5JX2.js → 2HAYT46E.js} +1 -1
  3. package/dist/cdn/3TIQRBWC.js +2 -0
  4. package/dist/cdn/4QOD7X43.js +2 -0
  5. package/dist/cdn/{YWALGZAG.js → 63ZMLOEP.js} +1 -1
  6. package/dist/cdn/{GRQLB7ZG.js → 7GVN2XEM.js} +1 -1
  7. package/dist/cdn/DQXGBGQS.js +2 -0
  8. package/dist/cdn/{ZNH7LRND.js → EKUENEEW.js} +1 -1
  9. package/dist/cdn/{W7I22AW3.js → FNTXI57U.js} +1 -1
  10. package/dist/cdn/{4SBOBTOR.js → FWRT4BPD.js} +1 -1
  11. package/dist/cdn/{Q2DJUFVO.js → FZKGL66L.js} +1 -1
  12. package/dist/cdn/{7Q5BT35O.js → G6EZOEPB.js} +1 -1
  13. package/dist/cdn/{LTLR4VF3.js → GMSG7ZRV.js} +1 -1
  14. package/dist/cdn/{KETYOYXQ.js → IC6KIGR4.js} +1 -1
  15. package/dist/cdn/{TKOGOWYQ.js → KK7S3QIA.js} +27 -27
  16. package/dist/cdn/{RMO244NW.js → KV76ATT5.js} +1 -1
  17. package/dist/cdn/LGZDNUGT.js +2 -0
  18. package/dist/cdn/{PP7EF7UU.js → LQ4BLDUU.js} +1 -1
  19. package/dist/cdn/{YTU2BYBP.js → M73VTGBI.js} +1 -1
  20. package/dist/cdn/{Q35DDH7J.js → MDXI36JJ.js} +7 -7
  21. package/dist/cdn/{BH42V5CR.js → N7VSZ2CS.js} +1 -1
  22. package/dist/cdn/{G3C6IL5Y.js → OAEWZFWV.js} +1 -1
  23. package/dist/cdn/{6VCG2ITQ.js → ON244IGD.js} +1 -1
  24. package/dist/cdn/{RY6KZ77P.js → PGW5WSQA.js} +1 -1
  25. package/dist/cdn/{7WYPODAB.js → PWTMEYVV.js} +1 -1
  26. package/dist/cdn/{6AUKNSKW.js → QD22B6N2.js} +1 -1
  27. package/dist/cdn/{4FRYNYQ6.js → QGDR24DC.js} +1 -1
  28. package/dist/cdn/{42GXADY4.js → RUVOSMTB.js} +1 -1
  29. package/dist/cdn/{Y37QLEAM.js → S4VDUHA7.js} +1 -1
  30. package/dist/cdn/TLM7N22U.js +2 -0
  31. package/dist/cdn/{3A2YSBVB.js → TOIBA2KF.js} +1 -1
  32. package/dist/cdn/{WXL7GVUU.js → U74P7HIL.js} +1 -1
  33. package/dist/cdn/{DQQTSOMQ.js → UIGRRD7P.js} +1 -1
  34. package/dist/cdn/{FWLPMS4Q.js → VY5TD3VS.js} +1 -1
  35. package/dist/cdn/X65HFYH4.js +2 -0
  36. package/dist/cdn/{4DAGSZIC.js → XK36P3C4.js} +1 -1
  37. package/dist/cdn/{757HAEJS.js → ZCLYSOQM.js} +1 -1
  38. package/dist/cdn/{DO7NLLUV.js → ZFF7I7I6.js} +1 -1
  39. package/dist/cdn/{QDKHYQJB.js → ZOF7AUSS.js} +1 -1
  40. package/dist/cdn/{YFJZN5K5.js → ZVXEOW2X.js} +1 -1
  41. package/dist/cdn/index.js +1 -1
  42. package/dist/chunks/interfaces.js +9 -9
  43. package/dist/chunks/solution-builder-assistant.js +1 -1
  44. package/dist/components/arcgis-solutions-assistant/customElement.js +195 -170
  45. package/dist/components/solution-builder-assistant/index.js +2 -2
  46. package/dist/components/solution-details-panel/customElement.js +98 -72
  47. package/dist/components/solutions-deploy-app/customElement.js +22 -18
  48. package/dist/components/solutions-deploy-app/index.js +2 -0
  49. package/dist/components/solutions-resources-section/customElement.js +4 -4
  50. package/dist/components/solutions-resources-shell/customElement.d.ts +4 -3
  51. package/dist/components/solutions-resources-shell/customElement.js +95 -53
  52. package/dist/docs/api.json +1 -1
  53. package/dist/docs/docs.json +1 -1
  54. package/dist/docs/vscode.html-custom-data.json +1 -1
  55. package/dist/docs/web-types.json +1 -1
  56. package/dist/loader.js +1 -1
  57. package/dist/solutions-components_commit.txt +8 -5
  58. package/dist/types/lumina.d.ts +1 -1
  59. package/dist/types/preact.d.ts +1 -1
  60. package/dist/types/react.d.ts +1 -1
  61. package/dist/types/stencil.d.ts +1 -1
  62. package/package.json +1 -1
  63. package/dist/cdn/4RJURJQ5.js +0 -2
  64. package/dist/cdn/JMBANG5V.js +0 -2
  65. package/dist/cdn/OANAQ6HY.js +0 -2
  66. package/dist/cdn/UCQJWFUW.js +0 -2
  67. package/dist/cdn/XEF5G3BC.js +0 -2
@@ -1,26 +1,26 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import { c as _e } from "../../chunks/runtime.js";
3
- import { u as Te } from "../../chunks/useT9n.js";
4
- import { LitElement as ke, createEvent as X, nothing as Z } from "@arcgis/lumina";
5
- import { css as Ee, html as I } from "lit";
6
- import { unsafeHTML as Ae } from "lit/directives/unsafe-html.js";
7
- import { useContextConsumer as ee } from "@arcgis/lumina/context";
8
- import { c as Le, b as Re } from "../../chunks/deployAppContexts.js";
9
- import { T as De } from "../../chunks/interfaces.js";
2
+ import { c as Te } from "../../chunks/runtime.js";
3
+ import { u as Ee } from "../../chunks/useT9n.js";
4
+ import { LitElement as ke, createEvent as Z, nothing as ee } from "@arcgis/lumina";
5
+ import { css as Ae, html as I } from "lit";
6
+ import { unsafeHTML as Le } from "lit/directives/unsafe-html.js";
7
+ import { useContextConsumer as te } from "@arcgis/lumina/context";
8
+ import { c as De, b as Re } from "../../chunks/deployAppContexts.js";
9
+ import { T as R } from "../../chunks/interfaces.js";
10
10
  import { m as Fe } from "../../chunks/helpers.js";
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 v, NodeInterrupt as ne } from "@langchain/langgraph/web";
14
- import { createAgentRuntimeState as j, sendTraceMessage as w, invokeStructuredPrompt as T, getEmbeddings as Ne, cosineSimilarity as Be, invokeTextPrompt as Pe } from "@arcgis/ai-orchestrator";
15
- import r, { z as D } from "zod";
16
- import * as J from "@esri/arcgis-rest-portal";
11
+ import se from "@arcgis/core/config.js";
12
+ import { createRef as $e, ref as Ne } from "lit-html/directives/ref.js";
13
+ import { Annotation as b, StateGraph as z, START as j, END as x, NodeInterrupt as ie } from "@langchain/langgraph/web";
14
+ import { createAgentRuntimeState as J, sendTraceMessage as w, invokeStructuredPrompt as T, getEmbeddings as Me, cosineSimilarity as Be, invokeTextPrompt as Pe } from "@arcgis/ai-orchestrator";
15
+ import r, { z as F } from "zod";
16
+ import * as G from "@esri/arcgis-rest-portal";
17
17
  import { applyPatch as qe } from "fast-json-patch";
18
18
  import "@langchain/core/messages";
19
- import { C as ie } from "../../chunks/converter.js";
20
- import { t as oe, g as N, c as ae, r as re, d as L } from "../../chunks/templates.js";
19
+ import { C as oe } from "../../chunks/converter.js";
20
+ import { t as ae, g as B, c as re, r as le, d as L } 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 = Ae`: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,10 +34,10 @@ ${Object.keys(t).join(`
34
34
  );
35
35
  return await s[1]();
36
36
  }
37
- function B(t) {
37
+ function P(t) {
38
38
  return t?.configurable?.context?.translations;
39
39
  }
40
- function le(t) {
40
+ function ce(t) {
41
41
  if (typeof window > "u" || t.length <= 1)
42
42
  return;
43
43
  const e = t.map((n) => n.solution.id), s = t.map((n) => n.solution.title);
@@ -59,7 +59,7 @@ function le(t) {
59
59
  }
60
60
  }));
61
61
  }
62
- function ce(t) {
62
+ function de(t) {
63
63
  if (typeof window > "u" || !t)
64
64
  return;
65
65
  const e = new CustomEvent("solutionIDFromAssistant", {
@@ -97,10 +97,10 @@ function Ge(t, e) {
97
97
  function Ve(t) {
98
98
  return t && t.helperServices.aiAssistantServices ? `${t.helperServices.aiAssistantServices.url}/skills/doc_ai_assistant/chat` : null;
99
99
  }
100
- function de(t) {
100
+ function ue(t) {
101
101
  return t && t.helperServices.aiAssistantServices ? `${t.helperServices.aiAssistantServices.url}/skills/doc_ai_assistant/api/pre-chat` : null;
102
102
  }
103
- async function U(t, e, s) {
103
+ async function O(t, e, s) {
104
104
  const n = await fetch(e, {
105
105
  method: "POST",
106
106
  headers: {
@@ -118,7 +118,7 @@ const He = (t) => new Promise((e) => setTimeout(e, t)), We = b.Root({
118
118
  // channels with the orchestrator's standard reducers/defaults so the
119
119
  // sub-agent reports back through the same shape the orchestrator
120
120
  // persists into priorSteps.
121
- ...j(),
121
+ ...J(),
122
122
  solutionResponse: b({
123
123
  reducer: (t, e) => e ?? null,
124
124
  default: () => null
@@ -134,9 +134,9 @@ const He = (t) => new Promise((e) => setTimeout(e, t)), We = b.Root({
134
134
  reducer: (t, e) => e ?? t,
135
135
  default: () => null
136
136
  })
137
- }), Ke = () => new O(We).addNode("initializeAgent", Ye).addNode("askSolutionsQuestions", Qe).addEdge(z, "initializeAgent").addEdge("initializeAgent", "askSolutionsQuestions").addEdge("askSolutionsQuestions", v), ue = async (t, e, s, n) => {
137
+ }), Ke = () => new z(We).addNode("initializeAgent", Ye).addNode("askSolutionsQuestions", Qe).addEdge(j, "initializeAgent").addEdge("initializeAgent", "askSolutionsQuestions").addEdge("askSolutionsQuestions", x), pe = async (t, e, s, n) => {
138
138
  if (!t) return;
139
- const i = de(t);
139
+ const i = ue(t);
140
140
  if (!i) return;
141
141
  const a = { context: {
142
142
  kind: "DocAIAssistantRequest",
@@ -148,15 +148,17 @@ const He = (t) => new Promise((e) => setTimeout(e, t)), We = b.Root({
148
148
  }
149
149
  }
150
150
  } };
151
- n && (a.conversationId = n), U(a, i, e ?? "");
151
+ n && (a.conversationId = n), O(a, i, e ?? "");
152
152
  }, Qe = async (t, e) => {
153
- const s = B(e), n = t.documentSkillUrl;
153
+ if (e?.configurable?.abortSignal?.aborted)
154
+ return {};
155
+ const s = P(e), n = t.documentSkillUrl;
154
156
  let i = [];
155
157
  await w(
156
158
  { text: s.agentProgress.explorerAgentSearching },
157
159
  e
158
160
  );
159
- let o = await U(
161
+ let o = await O(
160
162
  {
161
163
  message: t.agentExecutionContext.userRequest,
162
164
  conversationId: e?.configurable?.context?.convoId ?? void 0,
@@ -189,7 +191,7 @@ const He = (t) => new Promise((e) => setTimeout(e, t)), We = b.Root({
189
191
  l = A.source, i = [
190
192
  ...i,
191
193
  ...A.allMatches.filter(
192
- (k) => !i.some((E) => E.solution.id === k.solution.id)
194
+ (E) => !i.some((k) => k.solution.id === E.solution.id)
193
195
  )
194
196
  ];
195
197
  }
@@ -199,8 +201,10 @@ const He = (t) => new Promise((e) => setTimeout(e, t)), We = b.Root({
199
201
  d === 1 ? g = s.agentProgress.explorerAgentReading : d === 2 ? g = s.agentProgress.explorerAgentReviewing : d === 3 && (g = s.agentProgress.explorerAgentPreparing), await w({ text: g }, e);
200
202
  }
201
203
  };
202
- for (await u(o); a.hasMore; )
203
- await He(500), o = await U(
204
+ for (await u(o); a.hasMore; ) {
205
+ if (e?.configurable?.abortSignal?.aborted)
206
+ return {};
207
+ await He(500), o = await O(
204
208
  {
205
209
  conversationId: a.conversationId,
206
210
  ackSequenceNumber: a.ackSequenceNumber,
@@ -215,12 +219,13 @@ const He = (t) => new Promise((e) => setTimeout(e, t)), We = b.Root({
215
219
  ackSequenceNumber: o.sequenceNumber,
216
220
  inquiryId: o.inquiryId
217
221
  }, await u(o);
218
- return de(e?.configurable?.context.portal) && ue(
222
+ }
223
+ return ue(e?.configurable?.context.portal) && pe(
219
224
  e?.configurable?.context.portal,
220
225
  e?.configurable?.context.token ?? "",
221
226
  e?.configurable?.context.configContext.locale ?? "en",
222
227
  a.conversationId
223
- ), i.length && (i.length === 1 ? ce(i[0].solution.id) : le(i)), {
228
+ ), i.length && (i.length === 1 ? de(i[0].solution.id) : ce(i)), {
224
229
  outputMessage: l,
225
230
  summary: l,
226
231
  status: "success",
@@ -234,7 +239,7 @@ const He = (t) => new Promise((e) => setTimeout(e, t)), We = b.Root({
234
239
  };
235
240
  };
236
241
  await y(je, "solutions_explorer_description");
237
- const pe = (t) => {
242
+ const me = (t) => {
238
243
  if (t && Array.isArray(t.id) && t.id.length > 0)
239
244
  return t.id[t.id.length - 1].replace("Message", "").toLowerCase();
240
245
  if (t && typeof t._getType == "function")
@@ -245,7 +250,7 @@ const pe = (t) => {
245
250
  }
246
251
  return "human";
247
252
  }, Xe = (t) => {
248
- const e = pe(t);
253
+ const e = me(t);
249
254
  if (t && t.kwargs)
250
255
  return {
251
256
  role: e,
@@ -260,7 +265,7 @@ const pe = (t) => {
260
265
  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;
261
266
  }
262
267
  return { role: "human", content: String(t) };
263
- }, Ze = (t) => pe(t) === "human", et = (t, e = 3) => t.filter((s) => Ze(s)).slice(-e).map(Xe), tt = (t, e = " ") => et(t).map((i) => i.content).join(e).trim(), st = { understandingRequest: "Understanding your request...", selectTemplatePrompt: "This use case could be supported in a few different ways. Choose the option that best matches what you want to accomplish.", searchingExistingSolutions: "Searching for existing solutions...", existingSolutionMatch: "I found one or more existing solutions that match your use case. These are ready-to-use solutions that may already meet your needs and can be deployed now. Do you want to continue building your own solution?", continueBuildingYes: "Yes, I want to build a new solution", continueBuildingNo: "No, I’ll review existing solutions", continueBuildingDeclined: "Sounds good. We can focus on existing solutions. Let me know if I can help answer any questions or provide more details.", creatingDesign: "Generating solution design...", updatingDesign: "Updating solution design...", applyChangeFailed: "I wasn't able to apply that change. The design was not modified. Please try rephrasing your request.", createDesignFailed: "I wasn't able to create a solution design from that request. Please try rephrasing and try again.", discardMessage: "Are you sure you want to discard your solution?", discardForNewSolution: "I can help you build a new solution, but I will need to discard your current solution design. Do you want to continue?" }, nt = {
268
+ }, Ze = (t) => me(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 = {
264
269
  builderMessages: st
265
270
  }, it = /* @__PURE__ */ new Set([
266
271
  "add",
@@ -327,7 +332,7 @@ const pe = (t) => {
327
332
  "view",
328
333
  "where"
329
334
  ]);
330
- class me {
335
+ class ge {
331
336
  constructor(e, s, n = !0) {
332
337
  this.isValid = !0, this.issues = [], this.fieldNameRegistry = null, this.response = e, this.template = s, this.newDesign = n, this.validate();
333
338
  }
@@ -484,7 +489,7 @@ const ot = r.object({
484
489
  "Notebook",
485
490
  "QuickCapture Project"
486
491
  ]).describe("ArcGIS item type.")
487
- }), se = r.object({
492
+ }), ne = r.object({
488
493
  name: r.string().describe("Field name."),
489
494
  type: r.enum(["string", "integer", "double", "date", "oid", "guid", "globalid"]).describe("Field data type."),
490
495
  alias: r.string().describe("Field alias for display."),
@@ -499,13 +504,13 @@ const ot = r.object({
499
504
  typeMutable: r.boolean().describe("Indicates whether the layer type can be changed."),
500
505
  name: r.string().describe("Layer/table name."),
501
506
  description: r.string().describe("Layer/table description."),
502
- customFields: r.array(se).describe("User/business fields specific to the solution."),
503
- requiredFields: r.array(se).describe("Fields required for solution functionality (e.g., relationship keys).")
507
+ customFields: r.array(ne).describe("User/business fields specific to the solution."),
508
+ requiredFields: r.array(ne).describe("Fields required for solution functionality (e.g., relationship keys).")
504
509
  }), lt = r.object({
505
510
  itemId: r.string().describe("ArcGIS item id for the feature layer."),
506
511
  addLayers: r.boolean().describe("Indicates whether new layers can be added during solution design."),
507
512
  layers: r.array(rt)
508
- }), G = r.object({
513
+ }), V = r.object({
509
514
  response: r.string().describe("Conversational response to the user's query."),
510
515
  solution: r.object({
511
516
  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."),
@@ -568,8 +573,8 @@ const ot = r.object({
568
573
  { error: a }
569
574
  ), i;
570
575
  }
571
- }, V = (t) => t in L, yt = 5, xt = 0.8, vt = 0.15, wt = "Web Mapping Application", St = "Embeddings";
572
- let F = null, q = null, $ = null, M = null;
576
+ }, H = (t) => t in L, yt = 5, vt = 0.8, xt = 0.15, wt = "Web Mapping Application", St = "Embeddings";
577
+ let $ = null, U = null, N = null, M = null;
573
578
  const It = "Build", C = /* @__PURE__ */ Object.assign({
574
579
  "./prompts/assessBuildRequest.md": () => import("../../chunks/assessBuildRequest.js").then((t) => t.default),
575
580
  "./prompts/assessUpdateRequest.md": () => import("../../chunks/assessUpdateRequest.js").then((t) => t.default),
@@ -578,14 +583,14 @@ const It = "Build", C = /* @__PURE__ */ Object.assign({
578
583
  "./prompts/explainValidationFailure.md": () => import("../../chunks/explainValidationFailure.js").then((t) => t.default),
579
584
  "./prompts/findExistingSolution.md": () => import("../../chunks/findExistingSolution.js").then((t) => t.default),
580
585
  "./prompts/updateDesign.md": () => import("../../chunks/updateDesign.js").then((t) => t.default)
581
- }), Ct = nt.builderMessages, h = (t, e, s) => B(e)?.builderMessages?.[t] ?? Ct[t], ge = (t) => {
586
+ }), Ct = nt.builderMessages, h = (t, e, s) => P(e)?.builderMessages?.[t] ?? Ct[t], he = (t) => {
582
587
  typeof window < "u" && window.dispatchEvent(new CustomEvent("arcgis-solution-design-update", {
583
588
  detail: t
584
589
  }));
585
590
  }, _t = async (t, e, s) => {
586
591
  if (!t) return null;
587
592
  const n = `type:"${wt}" AND typekeywords:${St} AND group:${t}`;
588
- return (await J.searchItems({
593
+ return (await G.searchItems({
589
594
  q: n,
590
595
  params: e ? { token: e } : void 0,
591
596
  portal: s,
@@ -602,18 +607,18 @@ async function Tt(t, e, s) {
602
607
  return null;
603
608
  }
604
609
  }
605
- const kt = async (t, e, s) => {
610
+ const Et = async (t, e, s) => {
606
611
  if (!t) return [];
607
612
  const n = `type:Solution AND typekeywords:${It} AND group:${t}`;
608
- return (await J.searchItems({
613
+ return (await G.searchItems({
609
614
  q: n,
610
615
  params: e ? { token: e } : void 0,
611
616
  portal: s,
612
617
  num: 100
613
618
  }))?.results ?? [];
614
- }, Et = async (t, e, s) => {
619
+ }, kt = async (t, e, s) => {
615
620
  try {
616
- const n = await J.getItemData(t, {
621
+ const n = await G.getItemData(t, {
617
622
  params: e ? { token: e } : void 0,
618
623
  portal: s
619
624
  }), i = n?.buildSolution;
@@ -641,37 +646,37 @@ const kt = async (t, e, s) => {
641
646
  ...s,
642
647
  templateId: e.templateId ?? null
643
648
  }), s;
644
- }, he = (t, e) => {
649
+ }, fe = (t, e) => {
645
650
  if (t == null || e == null)
646
651
  return { ok: !1, error: "design or sourceBuildSolution is null/undefined" };
647
652
  try {
648
653
  const s = structuredClone(e);
649
- return new ie({ buildSolution: s }).applyLlmTemplate(t), { ok: !0 };
654
+ return new oe({ buildSolution: s }).applyLlmTemplate(t), { ok: !0 };
650
655
  } catch (s) {
651
656
  return {
652
657
  ok: !1,
653
658
  error: s instanceof Error ? s.stack ?? s.message : String(s)
654
659
  };
655
660
  }
656
- }, H = async (t) => {
657
- if (q) {
658
- Object.entries(q).forEach(([a, l]) => {
661
+ }, W = async (t) => {
662
+ if (U) {
663
+ Object.entries(U).forEach(([a, l]) => {
659
664
  L[a] && (L[a].initialTemplate = l);
660
665
  });
661
666
  return;
662
667
  }
663
- const e = t?.configurable?.context?.token, s = be(t), n = ye(t);
668
+ const e = t?.configurable?.context?.token, s = ye(t), n = ve(t);
664
669
  if (!s) {
665
670
  console.warn("Solution Builder: missing primarySolutionsGroupId in appConfig; skipping live template hydration.");
666
671
  return;
667
672
  }
668
- const i = await kt(s, e, n), o = {};
673
+ const i = await Et(s, e, n), o = {};
669
674
  await Promise.all(i.map(async (a) => {
670
675
  const l = a.properties?.templateInfo;
671
676
  if (!l || typeof l != "object") return;
672
677
  const u = l.id;
673
678
  if (typeof u != "string" || o[u]) return;
674
- const c = await Et(a.id, e, n);
679
+ const c = await kt(a.id, e, n);
675
680
  if (!c) return;
676
681
  const { buildSolution: m, params: f } = c;
677
682
  if (typeof m == "object" && m !== null && "solution" in m) {
@@ -683,7 +688,7 @@ const kt = async (t, e, s) => {
683
688
  buildSolution: m
684
689
  };
685
690
  o[u] = _(
686
- new ie(d).dumpToLlmTemplate(),
691
+ new oe(d).dumpToLlmTemplate(),
687
692
  {
688
693
  itemId: a.id,
689
694
  sourceBuildSolution: structuredClone(m),
@@ -693,43 +698,43 @@ const kt = async (t, e, s) => {
693
698
  ...l,
694
699
  initialTemplate: o[u]
695
700
  };
696
- })), q = o;
697
- }, fe = (t) => {
701
+ })), U = o;
702
+ }, be = (t) => {
698
703
  const e = t?.configurable?.context?.token;
699
704
  return typeof e != "string" || !e.trim() ? null : e;
700
- }, be = (t) => {
705
+ }, ye = (t) => {
701
706
  const e = t?.configurable?.context?.configContext?.primarySolutionsGroupId;
702
707
  return typeof e != "string" || !e.trim() ? null : e;
703
- }, ye = (t) => {
708
+ }, ve = (t) => {
704
709
  const e = t?.configurable?.context?.configContext?.portalURL;
705
710
  if (!(typeof e != "string" || !e.trim()))
706
711
  return `${e.replace(/\/+$/, "")}/sharing/rest`;
707
712
  }, At = async (t) => {
708
713
  await Promise.all([
709
- ve(t),
710
- H(t)
714
+ we(t),
715
+ W(t)
711
716
  ]);
712
717
  }, xe = async (t) => {
713
- const e = fe(t);
714
- (!$ || e && e !== M) && (M = e ?? M, $ = At(t).catch((n) => {
715
- throw $ = null, M = null, n;
716
- })), await $;
717
- };
718
- async function ve(t) {
719
- if (F) return F;
720
718
  const e = be(t);
719
+ (!N || e && e !== M) && (M = e ?? M, N = At(t).catch((n) => {
720
+ throw N = null, M = null, n;
721
+ })), await N;
722
+ };
723
+ async function we(t) {
724
+ if ($) return $;
725
+ const e = ye(t);
721
726
  if (!e)
722
727
  return console.warn("Solution Builder: missing primarySolutionsGroupId in appConfig; skipping embeddings load."), null;
723
- const s = ye(t), n = t?.configurable?.context?.configContext?.portalURL;
728
+ const s = ve(t), n = t?.configurable?.context?.configContext?.portalURL;
724
729
  await new Ue(n ? { url: n } : void 0).load();
725
- const o = fe(t) ?? void 0, a = await Tt(e, o, s);
726
- return a ? (F = a.items, F) : null;
730
+ const o = be(t) ?? void 0, a = await Tt(e, o, s);
731
+ return a ? ($ = a.items, $) : null;
727
732
  }
728
733
  const Lt = () => Object.entries(L).map(([t, e]) => `ID: ${t}
729
734
  Label: ${e.label}
730
735
  Description: ${e.description}`).join(`
731
736
 
732
- `), Rt = (t) => {
737
+ `), Dt = (t) => {
733
738
  const e = t?.configurable?.context?.solutionDesignJson;
734
739
  if (typeof e != "string" || !e.trim())
735
740
  return null;
@@ -737,10 +742,10 @@ Description: ${e.description}`).join(`
737
742
  const s = JSON.parse(e), n = _(
738
743
  { response: "", ...s },
739
744
  { itemId: s?.solution?.itemId ?? null }
740
- ), i = G.safeParse(n);
745
+ ), i = V.safeParse(n);
741
746
  if (!i.success)
742
747
  return null;
743
- const { response: o, ...a } = i.data, l = s.templateId, u = typeof l == "string" && V(l) ? l : null;
748
+ const { response: o, ...a } = i.data, l = s.templateId, u = typeof l == "string" && H(l) ? l : null;
744
749
  return _(
745
750
  a,
746
751
  {
@@ -752,8 +757,8 @@ Description: ${e.description}`).join(`
752
757
  } catch {
753
758
  return null;
754
759
  }
755
- }, Dt = b.Root({
756
- ...j(),
760
+ }, Rt = b.Root({
761
+ ...J(),
757
762
  /** Optional human-readable template description retained for UI use. */
758
763
  templateDescription: b({
759
764
  reducer: (t, e) => typeof e == "string" || e === null ? e : t ?? null,
@@ -790,7 +795,7 @@ Description: ${e.description}`).join(`
790
795
  default: () => null
791
796
  })
792
797
  }), Ft = (t, e) => {
793
- const s = Rt(e), n = s?.templateId ?? null, i = {};
798
+ const s = Dt(e), n = s?.templateId ?? null, i = {};
794
799
  return JSON.stringify(t.currentDesign) !== JSON.stringify(s) && (i.currentDesign = s), n && t.selectedTemplate !== n && (i.selectedTemplate = n), i;
795
800
  }, $t = async (t, e) => {
796
801
  await w({ text: h("understandingRequest", e) }, e), await xe(e);
@@ -802,25 +807,25 @@ Description: ${e.description}`).join(`
802
807
  messages: i,
803
808
  inputVariables: { query: s, availableTemplates: n }
804
809
  }), a = o.matchedTemplates.filter(
805
- (d) => V(d.templateId)
810
+ (d) => H(d.templateId)
806
811
  ), l = {
807
812
  ...o,
808
813
  matchedTemplates: a
809
- }, [u, c] = a, f = !!u && u.confidence >= xt && (c === void 0 || u.confidence - c.confidence >= vt) ? u.templateId : null;
814
+ }, [u, c] = a, f = !!u && u.confidence >= vt && (c === void 0 || u.confidence - c.confidence >= xt) ? u.templateId : null;
810
815
  return {
811
816
  assessment: l,
812
817
  selectedTemplate: f,
813
818
  existingMatches: [],
814
819
  continueBuilding: null
815
820
  };
816
- }, Mt = (t) => {
821
+ }, Nt = (t) => {
817
822
  const e = t.assessment?.assistantResponse ?? "";
818
823
  return {
819
824
  outputMessage: e,
820
825
  summary: e,
821
826
  status: "success"
822
827
  };
823
- }, Nt = async (t, e) => {
828
+ }, Mt = async (t, e) => {
824
829
  const { currentDesign: s } = t;
825
830
  if (!s)
826
831
  return {
@@ -839,7 +844,7 @@ Description: ${e.description}`).join(`
839
844
  schema: pt,
840
845
  messages: i,
841
846
  inputVariables: {
842
- currentDesign: JSON.stringify(oe(s)),
847
+ currentDesign: JSON.stringify(ae(s)),
843
848
  query: n
844
849
  }
845
850
  })
@@ -853,7 +858,7 @@ Description: ${e.description}`).join(`
853
858
  };
854
859
  }, Pt = (t, e) => {
855
860
  const { hitlResponse: s } = e.configurable, n = "selectTemplate", i = t.assessment?.matchedTemplates.filter(
856
- (c) => V(c.templateId)
861
+ (c) => H(c.templateId)
857
862
  ) ?? [], o = i.map((c) => `${c.templateDescription}`);
858
863
  if (s?.agentId !== "solutionBuilder" || s.id !== n) {
859
864
  const c = {
@@ -863,7 +868,7 @@ Description: ${e.description}`).join(`
863
868
  message: h("selectTemplatePrompt", e),
864
869
  metadata: [...o]
865
870
  };
866
- throw new ne(c);
871
+ throw new ie(c);
867
872
  }
868
873
  const a = String(s.payload ?? ""), l = o.findIndex((c) => c === a);
869
874
  return {
@@ -871,12 +876,12 @@ Description: ${e.description}`).join(`
871
876
  };
872
877
  }, qt = async (t, e) => {
873
878
  await w({ text: h("searchingExistingSolutions", e) }, e);
874
- const s = t.agentExecutionContext.userRequest, n = tt(t.agentExecutionContext.messages) || s, i = await ve(e);
879
+ const s = t.agentExecutionContext.userRequest, n = tt(t.agentExecutionContext.messages) || s, i = await we(e);
875
880
  if (!i)
876
881
  return console.warn("Solutions Search: failed to load solution embeddings cache; skipping search."), { existingMatches: [] };
877
882
  if (!i.length)
878
883
  return { existingMatches: [] };
879
- const [o] = await Ne([n]), a = i.map((d) => ({
884
+ const [o] = await Me([n]), a = i.map((d) => ({
880
885
  solution: d,
881
886
  score: Be(o, d.embedding)
882
887
  }));
@@ -900,7 +905,7 @@ Description: ${d.description}`).join(`
900
905
  }, Ut = (t, e) => {
901
906
  const { existingMatches: s } = t, { hitlResponse: n } = e.configurable, i = `confirmExistingSolution:${s[0].solution.id}`;
902
907
  if (n?.agentId !== "solutionBuilder" || n.id !== i) {
903
- s.length === 1 ? ce(s[0].solution.id) : le(s);
908
+ s.length === 1 ? de(s[0].solution.id) : ce(s);
904
909
  const u = h("existingSolutionMatch", e), c = [
905
910
  h("continueBuildingYes", e),
906
911
  h("continueBuildingNo", e)
@@ -911,7 +916,7 @@ Description: ${d.description}`).join(`
911
916
  message: u,
912
917
  metadata: c
913
918
  };
914
- throw new ne(m);
919
+ throw new ie(m);
915
920
  }
916
921
  const o = String(n.payload ?? "").trim(), a = h("continueBuildingNo", e);
917
922
  return { continueBuilding: o !== a };
@@ -922,12 +927,12 @@ Description: ${d.description}`).join(`
922
927
  summary: s,
923
928
  status: "success"
924
929
  };
925
- }, we = async (t, e) => {
930
+ }, Se = async (t, e) => {
926
931
  await xe(e);
927
932
  const { currentDesign: s } = t, n = t.agentExecutionContext.userRequest;
928
933
  await w({ text: h("creatingDesign", e) }, e);
929
- let i = N(t.selectedTemplate);
930
- if (i?.initialTemplate || (await H(e), i = N(t.selectedTemplate)), !i?.initialTemplate)
934
+ let i = B(t.selectedTemplate);
935
+ if (i?.initialTemplate || (await W(e), i = B(t.selectedTemplate)), !i?.initialTemplate)
931
936
  throw new Error("No hydrated templates are available for solution design.");
932
937
  const o = _(
933
938
  s ?? i.initialTemplate,
@@ -940,14 +945,14 @@ Description: ${d.description}`).join(`
940
945
  promptText: await y(C, "designSolution"),
941
946
  modelTier: "advanced",
942
947
  temperature: 0,
943
- schema: G,
948
+ schema: V,
944
949
  messages: a,
945
950
  inputVariables: {
946
- currentDesign: JSON.stringify(ae(o)),
951
+ currentDesign: JSON.stringify(re(o)),
947
952
  templateInstructions: i.instructions,
948
953
  query: n
949
954
  }
950
- }), { response: u, featureLayer: c, ...m } = l, f = re(
955
+ }), { response: u, featureLayer: c, ...m } = l, f = le(
951
956
  c,
952
957
  o.featureLayer
953
958
  ), d = _(
@@ -958,7 +963,7 @@ Description: ${d.description}`).join(`
958
963
  templateId: t.selectedTemplate ?? null,
959
964
  params: o.params ?? null
960
965
  }
961
- ), g = new me(d, i.initialTemplate);
966
+ ), g = new ge(d, i.initialTemplate);
962
967
  if (!g.isValid)
963
968
  return console.warn(
964
969
  "[SolutionBuilder] designSolution validation failed:",
@@ -966,20 +971,20 @@ Description: ${d.description}`).join(`
966
971
  ), {
967
972
  outputMessage: h("createDesignFailed", e)
968
973
  };
969
- const A = d.sourceBuildSolution, k = he(d, A);
970
- if (!k.ok) {
974
+ const A = d.sourceBuildSolution, E = fe(d, A);
975
+ if (!E.ok) {
971
976
  console.warn(
972
977
  "[SolutionBuilder] designSolution Esri JSON conversion failed:",
973
- { error: k.error, llmResponse: l, design: d }
978
+ { error: E.error, llmResponse: l, design: d }
974
979
  );
975
- const E = h("createDesignFailed", e);
980
+ const k = h("createDesignFailed", e);
976
981
  return {
977
- outputMessage: E,
978
- summary: E,
982
+ outputMessage: k,
983
+ summary: k,
979
984
  status: "success"
980
985
  };
981
986
  }
982
- return ge(d), {
987
+ return he(d), {
983
988
  outputMessage: u,
984
989
  summary: u,
985
990
  status: "success",
@@ -988,7 +993,7 @@ Description: ${d.description}`).join(`
988
993
  }, zt = async (t, e) => {
989
994
  const { currentDesign: s } = t;
990
995
  if (!s)
991
- return we(t, e);
996
+ return Se(t, e);
992
997
  const n = t.agentExecutionContext.userRequest, i = t.agentExecutionContext.messages.slice(-11);
993
998
  await w({ text: h("updatingDesign", e) }, e);
994
999
  let o;
@@ -1000,16 +1005,16 @@ Description: ${d.description}`).join(`
1000
1005
  schema: dt,
1001
1006
  messages: i,
1002
1007
  inputVariables: {
1003
- currentDesign: JSON.stringify(oe(s)),
1008
+ currentDesign: JSON.stringify(ae(s)),
1004
1009
  query: n
1005
1010
  }
1006
1011
  });
1007
1012
  } catch (p) {
1008
1013
  console.warn("[SolutionBuilder] updateDesign structured prompt failed:", p);
1009
- const x = h("applyChangeFailed", e);
1014
+ const v = h("applyChangeFailed", e);
1010
1015
  return {
1011
- outputMessage: x,
1012
- summary: x,
1016
+ outputMessage: v,
1017
+ summary: v,
1013
1018
  status: "success"
1014
1019
  };
1015
1020
  }
@@ -1024,8 +1029,8 @@ Description: ${d.description}`).join(`
1024
1029
  try {
1025
1030
  return JSON.parse(p);
1026
1031
  } catch {
1027
- const x = p.replace(/[\u0000-\u001F]/g, (Y) => {
1028
- switch (Y) {
1032
+ const v = p.replace(/[\u0000-\u001F]/g, (X) => {
1033
+ switch (X) {
1029
1034
  case "\b":
1030
1035
  return "\\b";
1031
1036
  case "\f":
@@ -1038,11 +1043,11 @@ Description: ${d.description}`).join(`
1038
1043
  case " ":
1039
1044
  return "\\t";
1040
1045
  default:
1041
- return "\\u" + Y.charCodeAt(0).toString(16).padStart(4, "0");
1046
+ return "\\u" + X.charCodeAt(0).toString(16).padStart(4, "0");
1042
1047
  }
1043
1048
  });
1044
1049
  try {
1045
- return JSON.parse(x);
1050
+ return JSON.parse(v);
1046
1051
  } catch {
1047
1052
  return p;
1048
1053
  }
@@ -1052,8 +1057,8 @@ Description: ${d.description}`).join(`
1052
1057
  path: p.path.replace(/\/+$/, ""),
1053
1058
  ...p.value != null && p.value !== "" ? { value: u(p.value) } : {},
1054
1059
  ...p.from != null && p.from !== "" ? { from: p.from } : {}
1055
- }))].sort((p, x) => p.op !== "remove" || x.op !== "remove" ? 0 : x.path.localeCompare(p.path, void 0, { numeric: !0 })), f = structuredClone(
1056
- ae(s)
1060
+ }))].sort((p, v) => p.op !== "remove" || v.op !== "remove" ? 0 : v.path.localeCompare(p.path, void 0, { numeric: !0 })), f = structuredClone(
1061
+ re(s)
1057
1062
  );
1058
1063
  try {
1059
1064
  qe(f, m, !0);
@@ -1062,17 +1067,17 @@ Description: ${d.description}`).join(`
1062
1067
  "[SolutionBuilder] updateDesign JSON patch failed:",
1063
1068
  { error: p, llmResponse: o, patches: m, patchTarget: f }
1064
1069
  );
1065
- const x = h("applyChangeFailed", e);
1070
+ const v = h("applyChangeFailed", e);
1066
1071
  return {
1067
- outputMessage: x,
1068
- summary: x,
1072
+ outputMessage: v,
1073
+ summary: v,
1069
1074
  status: "success"
1070
1075
  };
1071
1076
  }
1072
1077
  const d = _(
1073
1078
  { response: "", ...f },
1074
1079
  { itemId: s.solution?.itemId ?? null }
1075
- ), g = G.safeParse(d);
1080
+ ), g = V.safeParse(d);
1076
1081
  if (!g.success) {
1077
1082
  console.warn(
1078
1083
  "[SolutionBuilder] updateDesign schema validation failed:",
@@ -1085,11 +1090,11 @@ Description: ${d.description}`).join(`
1085
1090
  status: "success"
1086
1091
  };
1087
1092
  }
1088
- const { response: A, featureLayer: k, ...E } = g.data, Ie = re(
1089
- k,
1093
+ const { response: A, featureLayer: E, ...k } = g.data, Ce = le(
1094
+ E,
1090
1095
  s.featureLayer
1091
1096
  ), S = _(
1092
- { ...E, featureLayer: Ie },
1097
+ { ...k, featureLayer: Ce },
1093
1098
  {
1094
1099
  itemId: s.solution?.itemId,
1095
1100
  sourceBuildSolution: s.sourceBuildSolution,
@@ -1097,18 +1102,18 @@ Description: ${d.description}`).join(`
1097
1102
  params: s.params ?? null
1098
1103
  }
1099
1104
  );
1100
- let R = N(t.selectedTemplate);
1101
- if (R?.initialTemplate || (await H(e), R = N(t.selectedTemplate)), !R?.initialTemplate)
1105
+ let D = B(t.selectedTemplate);
1106
+ if (D?.initialTemplate || (await W(e), D = B(t.selectedTemplate)), !D?.initialTemplate)
1102
1107
  throw new Error("No hydrated templates are available for solution design.");
1103
- const P = new me(S, R.initialTemplate, !1);
1104
- if (!P.isValid) {
1108
+ const q = new ge(S, D.initialTemplate, !1);
1109
+ if (!q.isValid) {
1105
1110
  console.warn(
1106
1111
  "[SolutionBuilder] updateDesign validation failed:",
1107
- { issues: P.issues, llmResponse: o, patchedDesign: S }
1112
+ { issues: q.issues, llmResponse: o, patchedDesign: S }
1108
1113
  );
1109
1114
  const p = await bt({
1110
1115
  query: n,
1111
- validationIssues: P.issues,
1116
+ validationIssues: q.issues,
1112
1117
  recentMessages: i,
1113
1118
  fallbackMessage: h("applyChangeFailed", e),
1114
1119
  promptModules: C
@@ -1119,11 +1124,11 @@ Description: ${d.description}`).join(`
1119
1124
  status: "success"
1120
1125
  };
1121
1126
  }
1122
- const Ce = S.sourceBuildSolution, Q = he(S, Ce);
1123
- if (!Q.ok) {
1127
+ const _e = S.sourceBuildSolution, Y = fe(S, _e);
1128
+ if (!Y.ok) {
1124
1129
  console.warn(
1125
1130
  "[SolutionBuilder] updateDesign Esri JSON conversion failed:",
1126
- { error: Q.error, llmResponse: o, design: S }
1131
+ { error: Y.error, llmResponse: o, design: S }
1127
1132
  );
1128
1133
  const p = h("applyChangeFailed", e);
1129
1134
  return {
@@ -1132,13 +1137,13 @@ Description: ${d.description}`).join(`
1132
1137
  status: "success"
1133
1138
  };
1134
1139
  }
1135
- return ge(S), {
1140
+ return he(S), {
1136
1141
  outputMessage: a,
1137
1142
  summary: a,
1138
1143
  status: "success",
1139
1144
  currentDesign: S
1140
1145
  };
1141
- }, jt = (t) => t.currentDesign !== null ? "assessUpdateRequest" : "assessBuildRequest", Jt = (t) => !t.updateAssessment || !t.updateAssessment.isValidUpdate ? "invalidUpdateExit" : "updateDesign", Gt = (t) => !t.assessment || !t.assessment.isValidUseCase ? "invalidBuildExit" : !t.selectedTemplate && t.assessment.matchedTemplates.length > 1 ? "selectTemplateHIL" : "findExistingSolutions", Vt = (t) => t.existingMatches.length > 0 ? "confirmContinueBuildingHIL" : "designSolution", Ht = (t) => t.continueBuilding === !1 ? "declineContinueBuildingExit" : "designSolution", Wt = () => new O(Dt).addNode("syncCurrentDesignFromContext", Ft).addNode("assessBuildRequest", $t).addNode("assessUpdateRequest", Nt).addNode("invalidBuildExit", Mt).addNode("invalidUpdateExit", Bt).addNode("selectTemplateHIL", Pt).addNode("findExistingSolutions", qt).addNode("confirmContinueBuildingHIL", Ut).addNode("declineContinueBuildingExit", Ot).addNode("designSolution", we).addNode("updateDesign", zt).addEdge(z, "syncCurrentDesignFromContext").addConditionalEdges("syncCurrentDesignFromContext", jt, {
1146
+ }, jt = (t) => t.currentDesign !== null ? "assessUpdateRequest" : "assessBuildRequest", Jt = (t) => !t.updateAssessment || !t.updateAssessment.isValidUpdate ? "invalidUpdateExit" : "updateDesign", Gt = (t) => !t.assessment || !t.assessment.isValidUseCase ? "invalidBuildExit" : !t.selectedTemplate && t.assessment.matchedTemplates.length > 1 ? "selectTemplateHIL" : "findExistingSolutions", Vt = (t) => t.existingMatches.length > 0 ? "confirmContinueBuildingHIL" : "designSolution", Ht = (t) => t.continueBuilding === !1 ? "declineContinueBuildingExit" : "designSolution", Wt = () => new z(Rt).addNode("syncCurrentDesignFromContext", Ft).addNode("assessBuildRequest", $t).addNode("assessUpdateRequest", Mt).addNode("invalidBuildExit", Nt).addNode("invalidUpdateExit", Bt).addNode("selectTemplateHIL", Pt).addNode("findExistingSolutions", qt).addNode("confirmContinueBuildingHIL", Ut).addNode("declineContinueBuildingExit", Ot).addNode("designSolution", Se).addNode("updateDesign", zt).addEdge(j, "syncCurrentDesignFromContext").addConditionalEdges("syncCurrentDesignFromContext", jt, {
1142
1147
  assessUpdateRequest: "assessUpdateRequest",
1143
1148
  assessBuildRequest: "assessBuildRequest"
1144
1149
  }).addConditionalEdges("assessUpdateRequest", Jt, {
@@ -1148,29 +1153,29 @@ Description: ${d.description}`).join(`
1148
1153
  invalidBuildExit: "invalidBuildExit",
1149
1154
  selectTemplateHIL: "selectTemplateHIL",
1150
1155
  findExistingSolutions: "findExistingSolutions"
1151
- }).addEdge("invalidBuildExit", v).addEdge("invalidUpdateExit", v).addEdge("selectTemplateHIL", "findExistingSolutions").addConditionalEdges("findExistingSolutions", Vt, {
1156
+ }).addEdge("invalidBuildExit", x).addEdge("invalidUpdateExit", x).addEdge("selectTemplateHIL", "findExistingSolutions").addConditionalEdges("findExistingSolutions", Vt, {
1152
1157
  confirmContinueBuildingHIL: "confirmContinueBuildingHIL",
1153
1158
  designSolution: "designSolution"
1154
1159
  }).addConditionalEdges("confirmContinueBuildingHIL", Ht, {
1155
1160
  declineContinueBuildingExit: "declineContinueBuildingExit",
1156
1161
  designSolution: "designSolution"
1157
- }).addEdge("declineContinueBuildingExit", v).addEdge("designSolution", v).addEdge("updateDesign", v);
1162
+ }).addEdge("declineContinueBuildingExit", x).addEdge("designSolution", x).addEdge("updateDesign", x);
1158
1163
  await y(C, "description");
1159
- const Kt = D.object({
1160
- tool: D.enum(["explorer", "builder", "other"]).describe("The selected tool based on the user's query."),
1161
- confidence: D.number().min(0).max(1).describe("A confidence score (0.00–1.00)."),
1162
- rationale: D.string().min(1).describe("A brief rationale for the tool choice (≤140 characters)")
1163
- }), W = /* @__PURE__ */ Object.assign({
1164
+ const Kt = F.object({
1165
+ tool: F.enum(["explorer", "builder", "other"]).describe("The selected tool based on the user's query."),
1166
+ confidence: F.number().min(0).max(1).describe("A confidence score (0.00–1.00)."),
1167
+ rationale: F.string().min(1).describe("A brief rationale for the tool choice (≤140 characters)")
1168
+ }), K = /* @__PURE__ */ Object.assign({
1164
1169
  "./prompts/assistantResponse.md": () => import("../../chunks/assistantResponse.js").then((t) => t.default),
1165
1170
  "./prompts/classifyIntent.md": () => import("../../chunks/classifyIntent.js").then((t) => t.default),
1166
1171
  "./prompts/description.md": () => import("../../chunks/description.js").then((t) => t.default)
1167
- }), K = (t) => {
1172
+ }), Q = (t) => {
1168
1173
  const e = new CustomEvent("assistantProcessing", {
1169
1174
  detail: { finished: !0, agent: t }
1170
1175
  });
1171
1176
  window.dispatchEvent(e);
1172
- }, Se = b.Root({
1173
- ...j(),
1177
+ }, Ie = b.Root({
1178
+ ...J(),
1174
1179
  selectedTool: b({
1175
1180
  reducer: (t, e) => e ?? null,
1176
1181
  default: () => null
@@ -1180,7 +1185,9 @@ const Kt = D.object({
1180
1185
  default: () => null
1181
1186
  })
1182
1187
  }), Qt = async (t, e) => {
1183
- const s = B(e);
1188
+ if (e?.configurable?.abortSignal?.aborted)
1189
+ return {};
1190
+ const s = P(e);
1184
1191
  await w(
1185
1192
  { text: s?.builderMessages.understandingRequest },
1186
1193
  e
@@ -1193,7 +1200,7 @@ const Kt = D.object({
1193
1200
  } catch {
1194
1201
  a = !1;
1195
1202
  }
1196
- const l = await y(W, "classifyIntent"), u = await T({
1203
+ const l = await y(K, "classifyIntent"), u = await T({
1197
1204
  promptText: l,
1198
1205
  modelTier: "advanced",
1199
1206
  temperature: 0,
@@ -1206,39 +1213,45 @@ const Kt = D.object({
1206
1213
  intentRationale: u.rationale
1207
1214
  };
1208
1215
  }, Yt = async (t, e) => {
1216
+ if (e?.configurable?.abortSignal?.aborted)
1217
+ return {};
1209
1218
  const n = await Ke().compile().invoke(t, e);
1210
- return K("explorer"), n;
1219
+ return Q("explorer"), n;
1211
1220
  }, Xt = async (t, e) => {
1221
+ if (e?.configurable?.abortSignal?.aborted)
1222
+ return {};
1212
1223
  const n = await Wt().compile().invoke(t, e);
1213
- return K("builder"), n;
1224
+ return Q("builder"), n;
1214
1225
  }, Zt = async (t, e) => {
1215
- const s = B(e), n = t.agentExecutionContext.userRequest, i = t.intentRationale ?? "No rationale available.";
1226
+ if (e?.configurable?.abortSignal?.aborted)
1227
+ return {};
1228
+ const s = P(e), n = t.agentExecutionContext.userRequest, i = t.intentRationale ?? "No rationale available.";
1216
1229
  await w(
1217
1230
  { text: s?.executingSolutionsAssistantAgent },
1218
1231
  e
1219
1232
  );
1220
- const o = await y(W, "assistantResponse"), a = t.agentExecutionContext.messages.slice(-11), l = await Pe({
1233
+ const o = await y(K, "assistantResponse"), a = t.agentExecutionContext.messages.slice(-11), l = await Pe({
1221
1234
  promptText: o,
1222
1235
  modelTier: "advanced",
1223
1236
  temperature: 0,
1224
1237
  messages: a,
1225
1238
  inputVariables: { query: n, rationale: i }
1226
1239
  });
1227
- return K("assistant"), {
1240
+ return Q("assistant"), {
1228
1241
  outputMessage: l,
1229
1242
  summary: l,
1230
1243
  status: "success"
1231
1244
  };
1232
- }, es = (t) => t.selectedTool ?? "other", ts = () => new O(Se).addNode("classifyIntent", Qt).addNode("routeToExplorer", Yt).addNode("routeToBuilder", Xt).addNode("assistantResponse", Zt).addEdge(z, "classifyIntent").addConditionalEdges("classifyIntent", es, {
1245
+ }, es = (t) => t.selectedTool ?? "other", ts = () => new z(Ie).addNode("classifyIntent", Qt).addNode("routeToExplorer", Yt).addNode("routeToBuilder", Xt).addNode("assistantResponse", Zt).addEdge(j, "classifyIntent").addConditionalEdges("classifyIntent", es, {
1233
1246
  explorer: "routeToExplorer",
1234
1247
  builder: "routeToBuilder",
1235
1248
  other: "assistantResponse"
1236
- }).addEdge("routeToExplorer", v).addEdge("routeToBuilder", v).addEdge("assistantResponse", v), ss = await y(W, "description"), ns = {
1249
+ }).addEdge("routeToExplorer", x).addEdge("routeToBuilder", x).addEdge("assistantResponse", x), ss = await y(K, "description"), ns = {
1237
1250
  id: "solutionsAssistant",
1238
1251
  name: "Solutions Assistant Agent",
1239
1252
  description: ss,
1240
1253
  createGraph: ts,
1241
- workspace: Se
1254
+ workspace: Ie
1242
1255
  }, is = "https://links.esri.com/solutions/agol-organizational-account", os = "https://links.esri.com/solutions/configure-assistants";
1243
1256
  class as extends ke {
1244
1257
  constructor() {
@@ -1246,13 +1259,13 @@ class as extends ke {
1246
1259
  aiAssistantsEnabled: !1,
1247
1260
  blockBetaApps: !0,
1248
1261
  colocateCompute: !1
1249
- }, this._suggestedPrompts = [], this._hasInteracted = !1, this._isMobile = window.innerWidth <= 800, this._translations = Te({ name: "arcgis-solutions-assistant", blocking: !0 }), this._builderWidth = 48, this._solutionDesignJson = '{ "solution": null }', this._isAssistantBusy = !1, this._isBuilderBusy = !1, this._preChatCheck = !1, this._showNewChatConfirm = !1, this._assistantRef = $e(), this._configContextConsumer = ee({
1250
- context: Le,
1262
+ }, this._suggestedPrompts = [], this._hasInteracted = !1, this._isMobile = window.innerWidth <= 800, this._translations = Ee({ name: "arcgis-solutions-assistant", blocking: !0 }), this._builderWidth = 48, this._solutionDesignJson = '{ "solution": null }', this._isAssistantBusy = !1, this._isBuilderBusy = !1, this._preChatCheck = !1, this._showNewChatConfirm = !1, this._assistantRef = $e(), this._configContextConsumer = te({
1263
+ context: De,
1251
1264
  subscribe: !0,
1252
1265
  callback: (e) => {
1253
- e?.portalURL && (te.portalUrl = e.portalURL), e?.userSession && !this.userFirstName && this._loadUserFirstName(), e?.authentication?.PortalSubset?.orgSettings && (this._orgSettings = e?.authentication?.PortalSubset?.orgSettings);
1266
+ e?.portalURL && (se.portalUrl = e.portalURL), e?.userSession && !this.userFirstName && this._loadUserFirstName(), e?.authentication?.PortalSubset?.orgSettings && (this._orgSettings = e?.authentication?.PortalSubset?.orgSettings);
1254
1267
  }
1255
- }), this._builderDesignContextConsumer = ee({
1268
+ }), this._builderDesignContextConsumer = te({
1256
1269
  context: Re,
1257
1270
  subscribe: !0,
1258
1271
  callback: (e) => {
@@ -1265,13 +1278,13 @@ class as extends ke {
1265
1278
  if (s.detail?.finished && this._chatStartTime !== null) {
1266
1279
  const n = Fe(this._chatStartTime);
1267
1280
  this._telemetry?.logEvent({
1268
- category: De.ASSISTANT,
1281
+ category: R.ASSISTANT,
1269
1282
  action: "Chat",
1270
1283
  dimensions: [s.detail.agent],
1271
1284
  metrics: [n]
1272
1285
  }), this._chatStartTime = null, this.assistantProcessing.emit(!1);
1273
1286
  }
1274
- }, this.closeAssistant = X(), this.assistantProcessing = X(), this._handleAssistantLinkClick = (e) => {
1287
+ }, this.closeAssistant = Z(), this.assistantProcessing = Z(), this._handleAssistantLinkClick = (e) => {
1275
1288
  const s = e.composedPath().find((n) => n instanceof HTMLAnchorElement);
1276
1289
  if (s?.href)
1277
1290
  if (e.preventDefault(), s.target.indexOf("solutionId:") > -1) {
@@ -1312,25 +1325,29 @@ class as extends ke {
1312
1325
  this._checkURLOpenParameter();
1313
1326
  }
1314
1327
  load() {
1315
- this._configContextConsumer.value?.portalURL && (te.portalUrl = this._configContextConsumer.value.portalURL);
1328
+ this._configContextConsumer.value?.portalURL && (se.portalUrl = this._configContextConsumer.value.portalURL);
1316
1329
  }
1317
1330
  firstUpdated(e) {
1318
1331
  this._loadUserFirstName();
1319
1332
  }
1320
1333
  willUpdate(e) {
1321
- 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;
1334
+ e.has("open") && this.open && window.dispatchEvent(new CustomEvent("openAssistant")), this._configContextConsumer.value?.authentication && this._configContextConsumer.value?.userSession?.token && (this._preChatCheck || (pe(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;
1322
1335
  }
1323
1336
  _renderNoSign() {
1324
- return I`<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>`;
1337
+ return I`<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>`;
1325
1338
  }
1326
1339
  _renderNoPermission() {
1327
- return I`<calcite-notice open scale=m icon=effects kind=info><div slot=title>${this._translations.noPermissionTitle}</div><div slot=message class="padding-top-10">${Ae(this._translations.noPermissionMessage.replace("{{orgUrl}}", is).replace("{{configAI}}", os))}</div></calcite-notice>`;
1340
+ return I`<calcite-notice open scale=m icon=effects kind=info><div slot=title>${this._translations.noPermissionTitle}</div><div slot=message class="padding-top-10">${Le(this._translations.noPermissionMessage.replace("{{orgUrl}}", is).replace("{{configAI}}", os))}</div></calcite-notice>`;
1328
1341
  }
1329
1342
  render() {
1330
1343
  let e = this._suggestedPrompts.length > 0 ? this._suggestedPrompts : this._hasInteracted ? [] : Object.values(this._translations.defaultFollowUpQuestions);
1331
1344
  return this._suggestedPrompts.length > 0 ? e = this._suggestedPrompts : this._hasInteracted || (e = [...Object.values(this._translations.defaultFollowUpQuestions)]), I`<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 ? I`${!this._isMobile && I`<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=${() => {
1332
- window.dispatchEvent(new CustomEvent("toggleSolutionBuilder"));
1333
- }} scale=m slot=header-actions-end></calcite-action>` || ""}${!this._isMobile && I`<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) => {
1345
+ this._telemetry?.logEvent({
1346
+ category: R.ASSISTANT,
1347
+ action: "Toggle Builder Panel",
1348
+ dimensions: [this.builderVisible ? "Close" : "Open"]
1349
+ }), window.dispatchEvent(new CustomEvent("toggleSolutionBuilder"));
1350
+ }} scale=m slot=header-actions-end></calcite-action>` || ""}${!this._isMobile && I`<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) => {
1334
1351
  console.log("arcgis submit: ", s.detail), this._suggestedPrompts = [], e = [], this._hasInteracted = !0, this._chatStartTime = Date.now(), this.assistantProcessing.emit(!0);
1335
1352
  }} @arcgisFeedback=${(s) => {
1336
1353
  s.detail;
@@ -1340,8 +1357,12 @@ class as extends ke {
1340
1357
  this._queryElementInShadowDom(this.el, ".footer-container", !1);
1341
1358
  }} @arcgisInterruptSubmit=${() => {
1342
1359
  this._queryElementInShadowDom(this.el, ".footer-container", !1);
1343
- }} ${Me(this._assistantRef)}><calcite-button appearance=transparent id=newChatButton icon-start=speech-bubble-plus kind=neutral .label=${this._translations.tooltips.newChat} @click=${() => {
1344
- this.hasActiveBuilderDesign ? this._showNewChatConfirm = !0 : this._clearConversation();
1360
+ }} ${Ne(this._assistantRef)}><calcite-button appearance=transparent id=newChatButton icon-start=speech-bubble-plus kind=neutral .label=${this._translations.tooltips.newChat} @click=${() => {
1361
+ this.hasActiveBuilderDesign ? this._showNewChatConfirm = !0 : (this._telemetry?.logEvent({
1362
+ category: R.ASSISTANT,
1363
+ action: "New Chat",
1364
+ dimensions: ["No Active Design"]
1365
+ }), this._clearConversation());
1345
1366
  }} round scale=m slot=entry-actions-start>${this._translations.tooltips.newChat}</calcite-button><arcgis-assistant-agent .agent=${ns} .context=${{
1346
1367
  token: this._configContextConsumer.value?.userSession?.token,
1347
1368
  configContext: this._configContextConsumer.value,
@@ -1359,7 +1380,11 @@ class as extends ke {
1359
1380
  }}></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()}${this._showNewChatConfirm && I`<calcite-dialog close-disabled escape-disabled heading="Start new conversation" modal open>${this._translations.builderMessages.discardMessage}<calcite-button appearance=outline @click=${() => {
1360
1381
  this._showNewChatConfirm = !1;
1361
1382
  }} slot=footer-end>\r\n Cancel</calcite-button><calcite-button appearance=solid kind=danger @click=${() => {
1362
- this._showNewChatConfirm = !1, window.dispatchEvent(new CustomEvent("requestBuilderDiscard"));
1383
+ this._telemetry?.logEvent({
1384
+ category: R.ASSISTANT,
1385
+ action: "New Chat",
1386
+ dimensions: ["With Design Discard"]
1387
+ }), this._showNewChatConfirm = !1, window.dispatchEvent(new CustomEvent("requestBuilderDiscard"));
1363
1388
  }} slot=footer-end>\r\n Discard</calcite-button></calcite-dialog>` || ""}<calcite-action icon=x id=closeAssistantButton .label=${this._translations.tooltips.close} @click=${() => {
1364
1389
  this.closeAssistant.emit(!0);
1365
1390
  }} 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>`;
@@ -1422,7 +1447,7 @@ class as extends ke {
1422
1447
  });
1423
1448
  }
1424
1449
  }
1425
- _e("arcgis-solutions-assistant", as);
1450
+ Te("arcgis-solutions-assistant", as);
1426
1451
  export {
1427
1452
  as as ArcgisSolutionsAssistant
1428
1453
  };