@arcgis/coding-components 4.34.0-next.80 → 4.34.0-next.81

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 (78) hide show
  1. package/dist/addons.js +1 -1
  2. package/dist/cdn/{ZW47SU7N.js → 2H47T5BX.js} +1 -1
  3. package/dist/cdn/{SANE7NL4.js → 2PVATD5J.js} +2 -2
  4. package/dist/cdn/{2OS5X2XC.js → 2VWONAX6.js} +2 -2
  5. package/dist/cdn/{G74PDVWS.js → 3W5OXDDY.js} +1 -1
  6. package/dist/cdn/{4Y73AMXU.js → 5J6W3M5K.js} +2 -2
  7. package/dist/cdn/{7IK425QK.js → 6M3CUGSG.js} +2 -2
  8. package/dist/cdn/{NTXSDHBS.js → 6QG7QOYL.js} +2 -2
  9. package/dist/cdn/{PLEGSLPL.js → 6RAMHLUB.js} +4 -4
  10. package/dist/cdn/{4JMUV552.js → 75RV4WYM.js} +1 -1
  11. package/dist/cdn/{7TB3DLFW.js → 7UQG3KBX.js} +1 -1
  12. package/dist/cdn/{YVIJYACH.js → ASHG62MT.js} +2 -2
  13. package/dist/cdn/{REAEPLBS.js → BEUBJMHU.js} +2 -2
  14. package/dist/cdn/{WEUONTWC.js → BM2ELDSZ.js} +2 -2
  15. package/dist/cdn/{ZVIG4Y47.js → C5U7ZULG.js} +2 -2
  16. package/dist/cdn/{VF4PFPHZ.js → CBBZU4PE.js} +2 -2
  17. package/dist/cdn/{W6VLAWVY.js → CETIM57Q.js} +2 -2
  18. package/dist/cdn/{JMV65XQ6.js → CINAMZJA.js} +2 -2
  19. package/dist/cdn/{DLD53SME.js → CQFLG447.js} +2 -2
  20. package/dist/cdn/{FPRNXDBG.js → EG3BDIEX.js} +2 -2
  21. package/dist/cdn/{QNK3SEAV.js → HO25GDG7.js} +1 -1
  22. package/dist/cdn/{2UYT4AIE.js → HZGFBTH4.js} +2 -2
  23. package/dist/cdn/{JVYVRBLC.js → I4UAGYBA.js} +2 -2
  24. package/dist/cdn/{PCK6VLVO.js → IPMZC5EA.js} +2 -2
  25. package/dist/cdn/{TOMZIMG4.js → JDR5SVOX.js} +1 -1
  26. package/dist/cdn/{AKPGUPVV.js → KQ6BJT6L.js} +2 -2
  27. package/dist/cdn/{U5WTJRL5.js → KYFRYMAN.js} +2 -2
  28. package/dist/cdn/{HRVU4WAP.js → LAN4W55O.js} +2 -2
  29. package/dist/cdn/{LMNF6SPV.js → M4EJFOB3.js} +2 -2
  30. package/dist/cdn/{QK7Q73XT.js → N35WQ7LC.js} +2 -2
  31. package/dist/cdn/{MBU4K7CX.js → N5LAIHS2.js} +31 -27
  32. package/dist/cdn/{AQGYQUOQ.js → NI3S7GEN.js} +2 -2
  33. package/dist/cdn/{EYGND5IK.js → NN6L6R4D.js} +2 -2
  34. package/dist/cdn/{QUHAMH5S.js → OF6SYAGI.js} +1 -1
  35. package/dist/cdn/{WVFNCCMI.js → PXEXDGP7.js} +2 -2
  36. package/dist/cdn/RB746PL5.js +6 -0
  37. package/dist/cdn/{H2C3XTHM.js → S26TED3O.js} +2 -2
  38. package/dist/cdn/{HJFJB5HU.js → SIZ2E4U5.js} +2 -2
  39. package/dist/cdn/{W57KGVCU.js → UZVV4PUW.js} +2 -2
  40. package/dist/cdn/{YZNUF5RC.js → WMXDEDXT.js} +2 -2
  41. package/dist/cdn/{EAMGHNH6.js → XQ4VHURX.js} +2 -2
  42. package/dist/cdn/{OIP2MDAO.js → YTZFO3HI.js} +2 -2
  43. package/dist/cdn/{SCCNGSHM.js → ZD2VUTFJ.js} +2 -2
  44. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.en.json +1 -1
  45. package/dist/cdn/assets/code-editor/sql-expr.worker.js +41151 -40966
  46. package/dist/cdn/index.js +2 -2
  47. package/dist/chunks/arcade-defaults.js +1 -1
  48. package/dist/chunks/arcade-executor.js +1 -1
  49. package/dist/chunks/arcade-mode.js +1 -1
  50. package/dist/chunks/arcade-service-accessors.js +1 -1
  51. package/dist/chunks/editor.js +1 -1
  52. package/dist/chunks/fields.js +1 -1
  53. package/dist/chunks/language-defaults-base.js +1 -1
  54. package/dist/chunks/markdown.js +23 -19
  55. package/dist/chunks/monaco-importer.js +1 -1
  56. package/dist/chunks/runtime.js +1 -1
  57. package/dist/chunks/setup-monaco.js +1 -1
  58. package/dist/chunks/sql-expr-contribution.js +1 -1
  59. package/dist/chunks/sql-expr-defaults.js +1 -1
  60. package/dist/chunks/sql-expr-mode.js +1 -1
  61. package/dist/chunks/useT9n.js +1 -1
  62. package/dist/components/arcgis-arcade-coding-assistant/customElement.js +135 -176
  63. package/dist/components/arcgis-arcade-coding-assistant/functional.d.ts +87 -38
  64. package/dist/components/arcgis-arcade-editor/customElement.js +1 -1
  65. package/dist/components/arcgis-arcade-results/customElement.js +1 -1
  66. package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
  67. package/dist/components/arcgis-code-editor/customElement.js +1 -1
  68. package/dist/components/arcgis-editor-variables/customElement.js +1 -1
  69. package/dist/components/arcgis-language-api-panel/customElement.js +1 -1
  70. package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
  71. package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
  72. package/dist/docs/api.json +2 -2
  73. package/dist/docs/docs.json +2 -2
  74. package/dist/docs/web-types.json +1 -1
  75. package/dist/index.js +1 -1
  76. package/dist/loader.js +1 -1
  77. package/package.json +5 -5
  78. package/dist/cdn/ERV3IHVW.js +0 -6
@@ -1,35 +1,35 @@
1
- import { c as H } from "../../chunks/runtime.js";
2
- import { nothing as A, LitElement as V } from "@arcgis/lumina";
3
- import { ref as L, createRef as B } from "lit/directives/ref.js";
4
- import j from "@arcgis/core/identity/IdentityManager.js";
5
- import { u as W } from "../../chunks/useT9n.js";
1
+ import { c as O } from "../../chunks/runtime.js";
2
+ import { nothing as w, LitElement as H } from "@arcgis/lumina";
3
+ import { ref as L, createRef as V } from "lit/directives/ref.js";
4
+ import B from "@arcgis/core/identity/IdentityManager.js";
5
+ import { u as j } from "../../chunks/useT9n.js";
6
6
  import { b as I } from "../../chunks/arcade-defaults.js";
7
- import { css as Q, html as r } from "lit";
8
- import E from "@arcgis/core/request.js";
9
- import { e as G, a as J } from "../../chunks/monaco-importer.js";
10
- import { repeat as N } from "lit/directives/repeat.js";
7
+ import { css as W, html as c } from "lit";
8
+ import T from "@arcgis/core/request.js";
9
+ import { e as Q, a as G } from "../../chunks/monaco-importer.js";
10
+ import { repeat as q } from "lit/directives/repeat.js";
11
11
  import "@arcgis/toolkit/function";
12
- import { generateGuid as Y } from "@arcgis/toolkit/string";
13
- import { unsafeHTML as k } from "lit/directives/unsafe-html.js";
14
- import K from "@arcgis/core/layers/FeatureLayer.js";
15
- import X from "@arcgis/core/Graphic.js";
16
- import { b as Z } from "../../chunks/language-defaults-base.js";
12
+ import { generateGuid as J } from "@arcgis/toolkit/string";
13
+ import { unsafeHTML as $ } from "lit/directives/unsafe-html.js";
14
+ import Y from "@arcgis/core/layers/FeatureLayer.js";
15
+ import K from "@arcgis/core/Graphic.js";
16
+ import { b as X } from "../../chunks/language-defaults-base.js";
17
17
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
18
18
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
19
- v4.34.0-next.80 */
20
- const ee = Q`:host(:not([closed])){--calcite-block-border-color: var(--calcite-color-transparent);flex:1 0 auto;border-inline-start:var(--arcgis-coding-components-border);box-sizing:border-box;max-width:var(--arcgis-coding-components-side-panel-max-w);width:var(--arcgis-coding-components-side-panel-w);.submission-actions-wrapper{display:flex;flex-direction:column;width:100%;gap:.75rem}.submission-actions{display:flex;flex-direction:row;gap:.5rem;justify-content:space-between}.gaps{display:flex;gap:.25rem}.align-inline-end{margin-inline-start:auto}.action .error-display{display:flex;flex-direction:row;gap:.5rem;justify-content:space-between}.context-popover p{padding:0 .5rem;font-size:var(--calcite-font-size-sm)}.prompt-list calcite-list-item{margin-block-end:.5rem;border-radius:var(--calcite-corner-radius-round);--calcite-color-border-3: transparent;overflow:hidden}.feedback-content{padding:1rem;display:flex;flex-direction:column;gap:.75rem;max-height:30vh;overflow-y:auto}.feedback-sheet{--calcite-sheet-height: auto;--calcite-sheet-max-height: 100%;--calcite-sheet-min-height: auto}calcite-chip[slot=header-actions-end]{align-self:center;margin-inline-end:.5rem}calcite-list-item:focus calcite-button{position:relative;top:-2px}.prompt-list calcite-list-item:last-of-type{margin-block-end:0}calcite-list{--calcite-color-foreground-1: transparent;background-color:transparent}calcite-list-item{--calcite-color-foreground-1: white}calcite-flow-item calcite-shell{background:transparent}calcite-block{width:100%;max-width:100%;align-self:flex-end;background-color:transparent;margin-block:0}calcite-sheet{--calcite-sheet-scrim-background: rgba(200, 200, 200, .5)}.type-suggestion{--calcite-color-foreground-1: var(--calcite-color-foreground-current);--calcite-color-text-3: var(--calcite-color-text-2);--calcite-icon-color: var(--calcite-color-brand)}.type-history{--calcite-icon-color: var(--calcite-color-text-2)}.type-response{--calcite-icon-color: var(--calcite-color-brand);--calcite-font-family: monospace}.block-response{align-self:flex-start;margin-block-end:4rem;border-block-end:0;--calcite-block-text-color: var(--calcite-color-brand)}calcite-list-item calcite-button{margin-inline-end:.25rem}.type-docs{--calcite-color-foreground-1: var(--calcite-color-foreground-3);--calcite-icon-color: var(--calcite-color-text-1)}.type-error{--calcite-icon-color: var(--calcite-color-status-danger);--calcite-font-family: monospace;border:1px solid var(--calcite-color-status-danger)}#thumbs-up{margin-inline-start:auto;--calcite-icon-color: var(--calcite-color-border-input)}#thumbs-down{--calcite-icon-color: var(--calcite-color-border-input)}calcite-flow-item calcite-shell calcite-notice{margin-block:1rem}.no-space-block,.no-space-block[open]{margin:0}calcite-block[open]:last-of-type{border-block-end:0}.text-area-wrapper{display:flex;border-radius:var(--calcite-corner-radius-round);margin:.75rem;overflow:hidden;--calcite-color-border-input: transparent;position:sticky;box-shadow:var(--calcite-shadow-sm);flex:none}calcite-text-area{height:auto;min-height:5.75rem;overflow:hidden;border-radius:var(--calcite-corner-radius-round) var(--calcite-corner-radius-round) 0 0;--calcite-font-weight-normal: 500;font-weight:500;line-height:1.2}calcite-tooltip{--calcite-tooltip-z-index: 1000}.standalone-list{margin:1rem;width:calc(100% - 2rem)}.result-disclaimer{display:block;width:24rem;max-width:90%;margin:1rem auto;text-align:center;line-height:1.125rem;font-size:.875rem;font-style:italic}calcite-flow{height:100%}calcite-popover calcite-list{--calcite-list-background-color: transparent;--calcite-input-border-color: transparent}calcite-popover calcite-list calcite-filter{--calcite-spacing-sm: 0}.break-spaces{white-space:break-spaces}.feedback-button-container{margin-inline-start:auto;gap:0}.info-heading{font-size:var(--calcite-font-size-1);color:var(--calcite-color-text-1)}.unstyled-h3{margin:unset;font-size:var(--calcite-font-size-md)}.unstyled-shell{position:unset;inset:unset;display:unset;block-size:unset;inline-size:unset}.suggestion-button{font-weight:var(--calcite-font-weight-medium)}.info-block{max-width:450px}#result-block{calcite-card-group{--calcite-card-group-gap: 1.25rem}calcite-card{--calcite-card-corner-radius: var(--calcite-corner-radius-round);--calcite-card-background-color: white;--calcite-card-border-color: transparent;width:100%}.positioned-code-content{display:flex;flex-direction:row;gap:.5rem;padding:.5rem}calcite-card [slot=title] calcite-chip{margin-block-start:.25rem}.code-response-wrapper{position:relative;background:var(--calcite-color-foreground-2);border-radius:var(--calcite-corner-radius-round);margin-top:-1.5rem}.prior-prompt{display:flex;flex-direction:row;padding:0;overflow-y:hidden;overflow-x:auto;margin:.25rem 0 .75rem;align-items:center;max-width:100%;span{overflow-x:auto;overflow-y:hidden}}.copy-feedback{display:none}.copy-prompt-button{align-self:flex-start;margin-inline-start:auto}.response-secondary-action-button[data-copied]+.copy-feedback,.copy-prompt-button[data-copied]+.copy-feedback{display:block;span{padding:.75rem 1rem;font-size:var(--calcite-font-size--2);line-height:1.375;color:var(--calcite-color-text--2);font-weight:var(--calcite-font-weight-medium)}}.copy-prompt-button[data-copied]~.copy-tooltip,.response-secondary-action-button[data-copied]~.copy-tooltip{display:none}code{white-space:pre;font-size:12px;margin:0;overflow-x:auto;font-family:Fira Mono,Consolas,Menlo,monospace;display:block;max-height:12rem;position:relative;padding:.5rem}.code-collapse{margin-inline-start:auto}.response-secondary-action-button{margin-left:.5rem}.add-to-editor-button{--calcite-internal-button-border-color: unset}}.collapsible-code{padding:.5rem}.collapsible-code summary{cursor:pointer;font-weight:500;color:var(--calcite-color-brand);outline:none;padding:.25rem 0}.collapsible-code[open] summary{color:var(--calcite-color-text-2)}.collapsible-error{padding:.5rem}.collapsible-error summary{cursor:pointer;font-weight:500;color:var(--calcite-color-status-danger);outline:none;padding:.25rem 0}.collapsible-error[open] summary{color:var(--calcite-color-text-2)}.response-error-container{padding:.5rem;background:color-mix(in srgb,var(--calcite-color-status-warning) 10%,transparent);border-radius:var(--calcite-corner-radius-round);margin:1rem 0;font-size:var(--calcite-font-size--2);--calcite-input-message-icon-color: var(--calcite-color-status-warning)}.response-error-chip{--calcite-internal-chip-background-color: var(--calcite-color-status-warning);--calcite-chip-icon-color: var(--calcite-color-foreground-1);--calcite-chip-border-color: var(--calcite-color-transparent)}.feedback-actions{gap:unset}}:host([closed]){display:none}`;
21
- class $ extends Error {
19
+ v4.34.0-next.81 */
20
+ const Z = W`:host(:not([closed])){--calcite-block-border-color: var(--calcite-color-transparent);flex:1 0 auto;border-inline-start:var(--arcgis-coding-components-border);box-sizing:border-box;max-width:var(--arcgis-coding-components-side-panel-max-w);width:var(--arcgis-coding-components-side-panel-w);.submission-actions-wrapper{display:flex;flex-direction:column;width:100%;gap:.75rem}.submission-actions{display:flex;flex-direction:row;gap:.5rem;justify-content:space-between}.gaps{display:flex;gap:.25rem}.align-inline-end{margin-inline-start:auto}.action .error-display{display:flex;flex-direction:row;gap:.5rem;justify-content:space-between}.context-popover p{padding:0 .5rem;font-size:var(--calcite-font-size-sm)}.prompt-list calcite-list-item{margin-block-end:.5rem;border-radius:var(--calcite-corner-radius-round);--calcite-color-border-3: transparent;overflow:hidden}.feedback-content{padding:1rem;display:flex;flex-direction:column;gap:.75rem;max-height:30vh;overflow-y:auto}.feedback-sheet{--calcite-sheet-height: auto;--calcite-sheet-max-height: 100%;--calcite-sheet-min-height: auto}calcite-chip[slot=header-actions-end]{align-self:center;margin-inline-end:.5rem}calcite-list-item:focus calcite-button{position:relative;top:-2px}.prompt-list calcite-list-item:last-of-type{margin-block-end:0}calcite-list{--calcite-color-foreground-1: transparent;background-color:transparent}calcite-list-item{--calcite-color-foreground-1: white}calcite-flow-item calcite-shell{background:transparent}calcite-block{width:100%;max-width:100%;align-self:flex-end;background-color:transparent;margin-block:0}calcite-sheet{--calcite-sheet-scrim-background: rgba(200, 200, 200, .5)}.type-suggestion{--calcite-color-foreground-1: var(--calcite-color-foreground-current);--calcite-color-text-3: var(--calcite-color-text-2);--calcite-icon-color: var(--calcite-color-brand)}.type-history{--calcite-icon-color: var(--calcite-color-text-2)}.type-response{--calcite-icon-color: var(--calcite-color-brand);--calcite-font-family: monospace}.block-response{align-self:flex-start;margin-block-end:4rem;border-block-end:0;--calcite-block-text-color: var(--calcite-color-brand)}calcite-list-item calcite-button{margin-inline-end:.25rem}.type-docs{--calcite-color-foreground-1: var(--calcite-color-foreground-3);--calcite-icon-color: var(--calcite-color-text-1)}.type-error{--calcite-icon-color: var(--calcite-color-status-danger);--calcite-font-family: monospace;border:1px solid var(--calcite-color-status-danger)}#thumbs-up{margin-inline-start:auto;--calcite-icon-color: var(--calcite-color-border-input)}#thumbs-down{--calcite-icon-color: var(--calcite-color-border-input)}calcite-flow-item calcite-shell calcite-notice{margin-block:1rem}.no-space-block,.no-space-block[open]{margin:0}calcite-block[open]:last-of-type{border-block-end:0}.text-area-wrapper{display:flex;border-radius:var(--calcite-corner-radius-round);margin:.75rem;overflow:hidden;--calcite-color-border-input: transparent;position:sticky;box-shadow:var(--calcite-shadow-sm);flex:none}calcite-text-area{height:auto;min-height:5.75rem;overflow:hidden;border-radius:var(--calcite-corner-radius-round) var(--calcite-corner-radius-round) 0 0;--calcite-font-weight-normal: 500;font-weight:500;line-height:1.2}calcite-tooltip{--calcite-tooltip-z-index: 1000}.standalone-list{margin:1rem;width:calc(100% - 2rem)}.result-disclaimer{display:block;width:24rem;max-width:90%;margin:1rem auto;text-align:center;line-height:1.125rem;font-size:.875rem;font-style:italic}calcite-flow{height:100%}calcite-popover calcite-list{--calcite-list-background-color: transparent;--calcite-input-border-color: transparent}calcite-popover calcite-list calcite-filter{--calcite-spacing-sm: 0}.break-spaces{white-space:break-spaces}.feedback-button-container{margin-inline-start:auto;gap:0}.info-heading{font-size:var(--calcite-font-size-1);color:var(--calcite-color-text-1)}.unstyled-h3{margin:unset;font-size:var(--calcite-font-size-md)}.unstyled-shell{position:unset;inset:unset;display:unset;block-size:unset;inline-size:unset}.suggestion-button{font-weight:var(--calcite-font-weight-medium)}.info-block{max-width:450px}#result-block{calcite-card-group{--calcite-card-group-gap: 1.25rem}calcite-card{--calcite-card-corner-radius: var(--calcite-corner-radius-round);--calcite-card-background-color: white;--calcite-card-border-color: transparent;width:100%}.positioned-code-content{display:flex;flex-direction:row;gap:.5rem;padding:.5rem}calcite-card [slot=title] calcite-chip{margin-block-start:.25rem}.code-response-wrapper{position:relative;background:var(--calcite-color-foreground-2);border-radius:var(--calcite-corner-radius-round);margin-top:-1.5rem}.prior-prompt{display:flex;flex-direction:row;padding:0;overflow-y:hidden;overflow-x:auto;margin:.25rem 0 .75rem;align-items:center;max-width:100%;span{overflow-x:auto;overflow-y:hidden}}.copy-feedback{display:none}.copy-prompt-button{align-self:flex-start;margin-inline-start:auto}.response-secondary-action-button[data-copied]+.copy-feedback,.copy-prompt-button[data-copied]+.copy-feedback{display:block;span{padding:.75rem 1rem;font-size:var(--calcite-font-size--2);line-height:1.375;color:var(--calcite-color-text--2);font-weight:var(--calcite-font-weight-medium)}}.copy-prompt-button[data-copied]~.copy-tooltip,.response-secondary-action-button[data-copied]~.copy-tooltip{display:none}code{white-space:pre;font-size:12px;margin:0;overflow-x:auto;font-family:Fira Mono,Consolas,Menlo,monospace;display:block;max-height:12rem;position:relative;padding:.5rem}.code-collapse{margin-inline-start:auto}.response-secondary-action-button{margin-left:.5rem}.add-to-editor-button{--calcite-internal-button-border-color: unset}}.collapsible-code{padding:.5rem}.collapsible-code summary{cursor:pointer;font-weight:500;color:var(--calcite-color-brand);outline:none;padding:.25rem 0}.collapsible-code[open] summary{color:var(--calcite-color-text-2)}.collapsible-error{padding:.5rem}.collapsible-error summary{cursor:pointer;font-weight:500;color:var(--calcite-color-status-danger);outline:none;padding:.25rem 0}.collapsible-error[open] summary{color:var(--calcite-color-text-2)}.response-error-container{padding:.5rem;background:color-mix(in srgb,var(--calcite-color-status-warning) 10%,transparent);border-radius:var(--calcite-corner-radius-round);margin:1rem 0;font-size:var(--calcite-font-size--2);--calcite-input-message-icon-color: var(--calcite-color-status-warning)}.response-error-chip{--calcite-internal-chip-background-color: var(--calcite-color-status-warning);--calcite-chip-icon-color: var(--calcite-color-foreground-1);--calcite-chip-border-color: var(--calcite-color-transparent)}.feedback-actions{gap:unset}}:host([closed]){display:none}`;
21
+ class y extends Error {
22
22
  constructor({
23
23
  message: e,
24
24
  code: t,
25
25
  subCode: o,
26
- details: c,
26
+ details: r,
27
27
  source: n
28
28
  }) {
29
- super(e), this.name = "ArcadeAssistantError", this.code = t, this.subCode = o, this.details = c, this.source = n;
29
+ super(e), this.name = "ArcadeAssistantError", this.code = t, this.subCode = o, this.details = r, this.source = n;
30
30
  }
31
31
  }
32
- function T(i) {
32
+ function R(i) {
33
33
  if (!i)
34
34
  return;
35
35
  const e = i.indexOf('{"error":');
@@ -42,200 +42,159 @@ function T(i) {
42
42
  return;
43
43
  }
44
44
  }
45
- async function te(i) {
46
- const { baseUrl: e, skillId: t, message: o, authToken: c, previousConversationId: n, context: h } = i, d = t ? `${e}/skills/${t}/chat` : `${e}/chat`, s = [], m = {
45
+ async function ee(i) {
46
+ const { baseUrl: e, skillId: t, message: o, authToken: r, previousConversationId: n, context: u } = i, d = t ? `${e}/skills/${t}/chat` : `${e}/chat`, s = [], h = {
47
47
  message: o,
48
- context: h
48
+ context: u
49
49
  };
50
- n && (m.conversation_id = n);
50
+ n && (h.conversation_id = n);
51
51
  let a;
52
52
  try {
53
- a = await E(d, {
53
+ a = await T(d, {
54
54
  method: "post",
55
55
  headers: {
56
56
  "Content-Type": "application/json",
57
- token: c
57
+ token: r
58
58
  },
59
- body: JSON.stringify(m),
59
+ body: JSON.stringify(h),
60
60
  responseType: "json"
61
61
  });
62
- } catch (b) {
63
- const g = b, x = g.details?.rawResponse || g.message || String(b), y = T(x);
64
- throw y ? new $(y) : b;
62
+ } catch (f) {
63
+ const b = f, k = b.details?.rawResponse || b.message || String(f), g = R(k);
64
+ throw g ? new y(g) : f;
65
65
  }
66
66
  const l = a.data;
67
67
  s.push(l);
68
- const p = l.conversationId, D = l.inquiryId;
69
- let C = l.sequenceNumber;
70
- async function _() {
71
- let b = 0;
72
- const g = 25;
73
- for (; b < g; ) {
68
+ const p = l.conversationId, F = l.inquiryId;
69
+ let A = l.sequenceNumber;
70
+ async function D() {
71
+ let f = 0;
72
+ const b = 25;
73
+ for (; f < b; ) {
74
74
  await new Promise((v) => setTimeout(v, 1e3));
75
- const x = ie(p, C, D);
76
- let y;
75
+ const k = te(p, A, F);
76
+ let g;
77
77
  try {
78
- y = await E(d, {
78
+ g = await T(d, {
79
79
  method: "post",
80
80
  headers: {
81
81
  "Content-Type": "application/json",
82
- token: c
82
+ token: r
83
83
  },
84
- body: JSON.stringify(x),
84
+ body: JSON.stringify(k),
85
85
  responseType: "json"
86
86
  });
87
87
  } catch (v) {
88
- const S = v, O = S.details?.rawResponse || S.message || String(v), R = T(O);
89
- throw R ? new $(R) : v;
88
+ const C = v, z = C.details?.rawResponse || C.message || String(v), S = R(z);
89
+ throw S ? new y(S) : v;
90
90
  }
91
- const f = y.data;
92
- if (f.context && f.context.kind === "ArcgisErrorAsContext" && f.context.error)
93
- throw new $({
94
- message: f.context.error.message || "ArcGIS Assistant error",
95
- code: f.context.error.code,
96
- subCode: f.context.error.subCode,
97
- details: f.context.error.details,
91
+ const m = g.data;
92
+ if (m.context && m.context.kind === "ArcgisErrorAsContext" && m.context.error)
93
+ throw new y({
94
+ message: m.context.error.message || "ArcGIS Assistant error",
95
+ code: m.context.error.code,
96
+ subCode: m.context.error.subCode,
97
+ details: m.context.error.details,
98
98
  source: "polling-response"
99
99
  });
100
- if (s.push(f), C = f.sequenceNumber, b++, !f.hasMore)
100
+ if (s.push(m), A = m.sequenceNumber, f++, !m.hasMore)
101
101
  break;
102
102
  }
103
- if (b === g)
104
- throw new $({
103
+ if (f === b)
104
+ throw new y({
105
105
  message: "Request timed out",
106
106
  code: "TIMEOUT",
107
107
  source: "polling"
108
108
  });
109
109
  }
110
- const z = 2 * 60 * 1e3;
110
+ const _ = 2 * 60 * 1e3;
111
111
  return await Promise.race([
112
- _(),
112
+ D(),
113
113
  new Promise(
114
- (b, g) => setTimeout(
115
- () => g(
116
- new $({
114
+ (f, b) => setTimeout(
115
+ () => b(
116
+ new y({
117
117
  message: "Request timed out",
118
118
  code: "TIMEOUT",
119
119
  source: "hard-timeout"
120
120
  })
121
121
  ),
122
- z
122
+ _
123
123
  )
124
124
  )
125
125
  ]), s;
126
126
  }
127
- function ie(i, e, t) {
127
+ function te(i, e, t) {
128
128
  return {
129
129
  conversationId: i,
130
130
  inquiryId: t,
131
131
  ackSequenceNumber: e
132
132
  };
133
133
  }
134
- function oe(i) {
134
+ function ie(i) {
135
135
  return i.message.match(/Error in prompt shield/u) ? "I'm having trouble with this request. Try again by rephrasing the question." : i.code === "TIMEOUT" ? "I'm having trouble with this request. Try again by re-asking the same question or rephrasing it." : i.message;
136
136
  }
137
- const ae = (i) => {
138
- const e = i.value.length, t = 72, o = 180, c = i.offsetWidth, h = Math.max(1, Math.floor(c / 8)), d = Math.ceil(e / h), s = t + (d - 2) * 24;
137
+ const oe = (i) => {
138
+ const e = i.value.length, t = 72, o = 180, r = i.offsetWidth, u = Math.max(1, Math.floor(r / 8)), d = Math.ceil(e / u), s = t + (d - 2) * 24;
139
139
  i.style.setProperty("--calcite-text-area-min-height", `${Math.min(s, o)}px`);
140
140
  };
141
- function se({ messages: i }) {
142
- return r`<calcite-chip slot=header-actions-end scale=s appearance=outline-fill .label=${i.beta ?? "Beta"}>${i.beta ?? "Beta"}</calcite-chip>`;
141
+ function ae({ messages: i }) {
142
+ return c`<calcite-chip slot=header-actions-end scale=s appearance=outline-fill .label=${i.beta ?? "Beta"}>${i.beta ?? "Beta"}</calcite-chip>`;
143
143
  }
144
- function re({ popoverContent: i }) {
145
- return r`<calcite-action icon=information slot=header-actions-end id=legal-disclaimer text></calcite-action><calcite-popover reference-element=legal-disclaimer overlay-positioning=fixed label=legal-disclaimer placement=bottom auto-close>${i}</calcite-popover>`;
144
+ function se({ popoverContent: i }) {
145
+ return c`<calcite-action icon=information slot=header-actions-end id=legal-disclaimer text></calcite-action><calcite-popover reference-element=legal-disclaimer overlay-positioning=fixed label=legal-disclaimer placement=bottom auto-close>${i}</calcite-popover>`;
146
146
  }
147
- function F({ errorMessage: i, slot: e }) {
148
- return r`<div class="error-display"><calcite-input-message id=error-message status=invalid icon=exclamation-mark-triangle scale=m slot=${e ?? A}>${i}</calcite-input-message></div>`;
147
+ function U({ errorMessage: i, slot: e }) {
148
+ return c`<div class="error-display"><calcite-input-message id=error-message status=invalid icon=exclamation-mark-triangle scale=m slot=${e ?? w}>${i}</calcite-input-message></div>`;
149
149
  }
150
150
  function ce({ active: i, setActive: e, messages: t }) {
151
- return r`<calcite-alert slot=alerts .open=${i} placement=bottom kind=success icon=check-circle-f auto-close @calciteAlertClose=${() => e(!1)} .label=${t.expressionapplied ?? "Expression applied"}><div slot=message>${t.expressionapplied ?? "Expression applied to editor."}</div></calcite-alert>`;
151
+ return c`<calcite-alert slot=alerts .open=${i} placement=bottom kind=success icon=check-circle-f auto-close @calciteAlertClose=${() => e(!1)} .label=${t.expressionapplied ?? "Expression applied"}><div slot=message>${t.expressionapplied ?? "Expression applied to editor."}</div></calcite-alert>`;
152
152
  }
153
- function ne({ context: i, messages: e }) {
154
- return i ? r`<div class="gaps">${i.profileName && r`<calcite-popover auto-close placement=top .label=${e.profilecontextlabel.replace("{profileName}", i.profileName)} reference-element=profile-context-button class="context-popover"><p>${e.profilecontextlabel.replace("{profileName}", i.profileName)}</p></calcite-popover><calcite-button round kind=neutral icon-start=map-information id=profile-context-button></calcite-button>` || ""}${i.layerName && r`<calcite-popover auto-close placement=top .label=${e.layercontextlabel.replace("{layerName}", i.layerName)} reference-element=layer-context-button class="context-popover"><p>${e.layercontextlabel.replace("{layerName}", i.layerName)}</p></calcite-popover><calcite-button round kind=neutral icon-start=layers id=layer-context-button></calcite-button>` || ""}</div>` : null;
153
+ function re({ context: i, messages: e }) {
154
+ return i ? c`<div class="gaps">${i.profileName && c`<calcite-popover auto-close placement=top .label=${(e.profilecontextlabel ?? "Profile context: {profileName}").replace("{profileName}", i.profileName)} reference-element=profile-context-button class="context-popover"><p>${(e.profilecontextlabel ?? "Profile context: {profileName}").replace("{profileName}", i.profileName)}</p></calcite-popover><calcite-button round kind=neutral icon-start=map-information id=profile-context-button></calcite-button>` || ""}${i.layerName && c`<calcite-popover auto-close placement=top .label=${(e.layercontextlabel ?? "Layer context: {layerName}").replace("{layerName}", i.layerName)} reference-element=layer-context-button class="context-popover"><p>${(e.layercontextlabel ?? "Layer context: {layerName}").replace("{layerName}", i.layerName)}</p></calcite-popover><calcite-button round kind=neutral icon-start=layers id=layer-context-button></calcite-button>` || ""}</div>` : null;
155
155
  }
156
- function le({ isDisabled: i, isReadOnly: e, setQuestion: t, setIsViewingResult: o, textAreaRef: c, question: n, errorMessage: h, setErrorMessage: d, submitQuestion: s, messages: m, mode: a, context: l }) {
157
- return r`<div class="text-area-wrapper"><calcite-text-area resize=vertical .readOnly=${i || e} class="styled-text-area" .placeholder=${m.askaquestion ?? `Specify the calculation or logic you need in an Arcade expression. (e.g., 'Return "Yes" if value > 10')`} .value=${n} @calciteTextAreaInput=${(p) => {
158
- ae(p.target), t(p.target.value);
159
- }} ${L(c)}><div class="submission-actions-wrapper" slot=footer-start>${h && F({ errorMessage: h, slot: "footer-start" }) || ""}<div class="submission-actions">${ne({ context: l, messages: m })}<div class="align-inline-end gaps"><calcite-button round kind=neutral .hidden=${a !== "refine"} icon-start=arrow-left icon-flip-rtl=both appearance=solid .disabled=${i} @click=${async () => {
156
+ function ne({ isDisabled: i, isReadOnly: e, setQuestion: t, setIsViewingResult: o, textAreaRef: r, question: n, errorMessage: u, setErrorMessage: d, submitQuestion: s, messages: h, mode: a, context: l }) {
157
+ return c`<div class="text-area-wrapper"><calcite-text-area resize=vertical .readOnly=${i || e} class="styled-text-area" .placeholder=${h.askaquestion ?? `Specify the calculation or logic you need in an Arcade expression. (e.g., 'Return "Yes" if value > 10')`} .value=${n} @calciteTextAreaInput=${(p) => {
158
+ oe(p.target), t(p.target.value);
159
+ }} ${L(r)}><div class="submission-actions-wrapper" slot=footer-start>${u && U({ errorMessage: u, slot: "footer-start" }) || ""}<div class="submission-actions">${re({ context: l, messages: h })}<div class="align-inline-end gaps"><calcite-button round kind=neutral .hidden=${a !== "refine"} icon-start=arrow-left icon-flip-rtl=both appearance=solid .disabled=${i} @click=${async () => {
160
160
  o(!1), t("");
161
- }}>${m.startover ?? "Start Over"}</calcite-button><calcite-button round icon-end=effects appearance=solid .loading=${i} .disabled=${i} @click=${async () => {
162
- d(n ? "" : m.enteraprompt ?? "Please enter a prompt"), await s();
163
- }}>${a === "prompt" ? m.ask ?? "Generate" : m.refine ?? "Refine"}</calcite-button></div></div></div></calcite-text-area></div>`;
161
+ }}>${h.startover ?? "Start Over"}</calcite-button><calcite-button round icon-end=effects appearance=solid .loading=${i} .disabled=${i} @click=${async () => {
162
+ d(n ? "" : h.enteraprompt ?? "Please enter a prompt"), await s();
163
+ }}>${a === "prompt" ? h.ask ?? "Generate" : h.refine ?? "Refine"}</calcite-button></div></div></div></calcite-text-area></div>`;
164
164
  }
165
- const de = "https://www.esri.com/en-us/privacy/privacy-statements/privacy-statement", pe = "https://www.esri.com/en-us/privacy/privacy-statements/privacy-supplement";
166
- function ue({ setOpen: i, messages: e, feedback: t, setFeedback: o, onSubmit: c }) {
167
- return t.active ? r`<calcite-sheet class="feedback-sheet" .label=${e.feedback ?? "Feedback"} slot=sheets display-mode=float position=block-end .open=${t.active} @calciteSheetClose=${() => i(!1)}><calcite-panel .heading=${e.providefeedback ?? "Provide feedback"} .description=${e.experiencehelps ?? "Your experience helps guide future improvements"}><div class="feedback-content"><calcite-label>${e.experiencehelpful ?? "Was the assistant helpful?"}<calcite-segmented-control scale=l><calcite-segmented-control-item icon-start=thumbs-up .checked=${t.value === "good"} @click=${() => o({ ...t, value: "good" })}></calcite-segmented-control-item><calcite-segmented-control-item icon-start=thumbs-down .checked=${t.value === "bad"} @click=${() => o({ ...t, value: "bad" })}></calcite-segmented-control-item></calcite-segmented-control></calcite-label><calcite-label>${e.describeexperience ?? "Describe your experience"}<calcite-text-area resize=vertical .value=${t.text} @calciteTextAreaInput=${(n) => o({ ...t, text: n.target.value })}></calcite-text-area></calcite-label><calcite-label layout=inline scale=s><calcite-checkbox scale=l .checked=${t.termsAccepted} @calciteCheckboxChange=${(n) => {
165
+ const le = "https://www.esri.com/en-us/privacy/privacy-statements/privacy-statement", de = "https://www.esri.com/en-us/privacy/privacy-statements/privacy-supplement";
166
+ function pe({ setOpen: i, messages: e, feedback: t, setFeedback: o, onSubmit: r }) {
167
+ return t.active ? c`<calcite-sheet class="feedback-sheet" .label=${e.feedback ?? "Feedback"} slot=sheets display-mode=float position=block-end .open=${t.active} @calciteSheetClose=${() => i(!1)}><calcite-panel .heading=${e.providefeedback ?? "Provide feedback"} .description=${e.experiencehelps ?? "Your experience helps guide future improvements"}><div class="feedback-content"><calcite-label>${e.experiencehelpful ?? "Was the assistant helpful?"}<calcite-segmented-control scale=l><calcite-segmented-control-item icon-start=thumbs-up .checked=${t.value === "good"} @click=${() => o({ ...t, value: "good" })}></calcite-segmented-control-item><calcite-segmented-control-item icon-start=thumbs-down .checked=${t.value === "bad"} @click=${() => o({ ...t, value: "bad" })}></calcite-segmented-control-item></calcite-segmented-control></calcite-label><calcite-label>${e.describeexperience ?? "Describe your experience"}<calcite-text-area resize=vertical .value=${t.text} @calciteTextAreaInput=${(n) => o({ ...t, text: n.target.value })}></calcite-text-area></calcite-label><calcite-label layout=inline scale=s><calcite-checkbox scale=l .checked=${t.termsAccepted} @calciteCheckboxChange=${(n) => {
168
168
  o({ ...t, termsAccepted: n.target.checked });
169
- }}></calcite-checkbox><span>${k(e.agreement?.replace("{EsriPrivacyStatement}", `<calcite-link href=${de} target="_blank">${e.esriprivacystatement ?? "Esri Privacy Statement"}</calcite-link>`).replace("{Supplement}", `<calcite-link href=${pe} target="_blank">${e.supplement ?? "Supplement"}</calcite-link>`))}</span></calcite-label></div><calcite-button slot=footer width=full @click=${c} .disabled=${!t.termsAccepted || t.submitting} .loading=${t.submitting}>${e.submitfeedback ?? "Submit Feedback"}</calcite-button></calcite-panel></calcite-sheet>` : null;
169
+ }}></calcite-checkbox><span>${$((e.agreement ?? "I agree to the {EsriPrivacyStatement} (and {Supplement}).").replace("{EsriPrivacyStatement}", `<calcite-link href=${le} target="_blank">${e.esriprivacystatement ?? "Esri Privacy Statement"}</calcite-link>`).replace("{Supplement}", `<calcite-link href=${de} target="_blank">${e.supplement ?? "Supplement"}</calcite-link>`))}</span></calcite-label></div><calcite-button slot=footer width=full @click=${r} .disabled=${!t.termsAccepted || t.submitting} .loading=${t.submitting}>${e.submitfeedback ?? "Submit Feedback"}</calcite-button></calcite-panel></calcite-sheet>` : null;
170
170
  }
171
- function P({ assistantsEnabled: i, messages: e, slot: t, assistantHelpUrl: o, helpTopicUrl: c }) {
172
- return r`<calcite-block .label=${e.assistantinformation ?? "Assistant information"} slot=${t ?? A} expanded class="info-block"><calcite-chip .label=${e.new ?? "new"} kind=brand>${e.new}</calcite-chip><h1 class="info-heading">${e.introducing}</h1><p>${e.capabilities}</p>${i ? r`<p>${e.keepinmind ?? "Keep in mind the following:"}<ul><li>${e.beconsise ?? "Be concise, but also clear in your request"}</li><li>${e.avoidambiguity ?? "Avoid ambiguity and vagueness"}</li><li>${e.moredetails ?? "you do not need to use exact field names in your instructions, but more detail is generally better"}</li></ul>${k((e.seedocumentation ?? "Please see the {documentation} for more information, including limitations and additional resources.").replace("{documentation}", `<calcite-link href=${c} target="_blank">${e.documentation ?? "documentation"}</calcite-link>`))}</p>` : r`<p>${k(e.useofassistant?.replace("{aiassistants}", `<strong>${e.aiassistants ?? "Ai Assistants"}</strong>`))}<calcite-link .href=${o} target=_blank icon-end=launch-2>${e.opensettings ?? "Open Settings"}</calcite-link></p>`}</calcite-block>`;
171
+ function E({ assistantsEnabled: i, messages: e, slot: t, assistantHelpUrl: o, helpTopicUrl: r }) {
172
+ return c`<calcite-block .label=${e.assistantinformation ?? "Assistant information"} slot=${t ?? w} expanded class="info-block"><calcite-chip .label=${e.new ?? "New"} kind=brand>${e.new ?? "New"}</calcite-chip><h1 class="info-heading">${e.introducing ?? "Introducing Arcade Assistant (beta)"}</h1><p>${e.capabilities ?? "The assistant uses artificial intelligence to generate Arcade expressions."}</p>${i ? c`<p>${e.keepinmind ?? "Keep in mind the following:"}<ul><li>${e.beconsise ?? "Be concise, but also clear in your request"}</li><li>${e.avoidambiguity ?? "Avoid ambiguity and vagueness"}</li><li>${e.moredetails ?? "you do not need to use exact field names in your instructions, but more detail is generally better"}</li></ul>${$((e.seedocumentation ?? "Please see the {documentation} for more information, including limitations and additional resources.").replace("{documentation}", `<calcite-link href=${r} target="_blank">${e.documentation ?? "documentation"}</calcite-link>`))}</p>` : c`<p>${$(e.useofassistant?.replace("{aiassistants}", `<strong>${e.aiassistants ?? "Ai Assistants"}</strong>`))}<calcite-link .href=${o} target=_blank icon-end=launch-2>${e.opensettings ?? "Open Settings"}</calcite-link></p>`}</calcite-block>`;
173
173
  }
174
- function he({ messages: i, onProceed: e, onExit: t, helpTopicUrl: o }) {
175
- return r`<calcite-dialog close-disabled placement=top .heading=${i.welcome} slot=dialogs open width-scale=m id=welcome-dialog><h3 class="unstyled-h3">${i.beforeyougetstarted}</h3><ul><li>${i.maybeincorrect}</li><li>${k(i.pleasereadhelp.replace("{helpTopic}", `<calcite-link href=${o} target="_blank">${i.helptopic}</calcite-link>`))}</li></ul><calcite-button id=welcome-proceed slot=footer-end @click=${e}>${i.proceed}</calcite-button><calcite-button id=welcome-decline slot=footer-start @click=${t} kind=neutral>${i.exit}</calcite-button></calcite-dialog>`;
174
+ function ue({ messages: i, onProceed: e, onExit: t, helpTopicUrl: o }) {
175
+ return c`<calcite-dialog close-disabled placement=top .heading=${i.welcome ?? "Welcome to the new assistant experience"} slot=dialogs open width-scale=m id=welcome-dialog><h3 class="unstyled-h3">${i.beforeyougetstarted ?? "Before you get started be aware:"}</h3><ul><li>${i.maybeincorrect ?? "AI generated code may occasionally be incorrect or biased. Review carefully."}</li><li>${$((i.pleasereadhelp ?? "Read the Arcade Assistant (beta) {helpTopic} to get started and learn details on security, privacy and limitations.").replace("{helpTopic}", `<calcite-link href=${o} target="_blank">${i.helptopic ?? "help topic"}</calcite-link>`))}</li></ul><calcite-button id=welcome-proceed slot=footer-end @click=${e}>${i.proceed ?? "Proceed"}</calcite-button><calcite-button id=welcome-decline slot=footer-start @click=${t} kind=neutral>${i.exit ?? "Exit"}</calcite-button></calcite-dialog>`;
176
176
  }
177
- function me({ messages: i, suggestions: e, onSuggestionClick: t }) {
178
- return r`<calcite-block .heading=${i.promptsuggestions} expanded collapsible id=suggestion-block><calcite-chip-group class="suggestions" .label=${i.promptsuggestions ?? "Prompt Suggestions"}>${N(e, (o) => o, (o) => r`<calcite-button round appearance=outline-fill kind=neutral .label=${i.promptsuggestion} class="suggestion-button" @click=${() => t?.(o)}>${o}</calcite-button>`)}</calcite-chip-group></calcite-block>`;
177
+ function he({ messages: i, suggestions: e, onSuggestionClick: t }) {
178
+ return c`<calcite-block .heading=${i.promptsuggestions} expanded collapsible id=suggestion-block><calcite-chip-group class="suggestions" .label=${i.promptsuggestions ?? "Prompt Suggestions"}>${q(e, (o) => o, (o) => c`<calcite-button round appearance=outline-fill kind=neutral .label=${i.promptsuggestion} class="suggestion-button" @click=${() => t?.(o)}>${o}</calcite-button>`)}</calcite-chip-group></calcite-block>`;
179
179
  }
180
- function q({ hidden: i = !1, expanded: e = !1, messages: t, cards: o, heading: c, collapsible: n = !1, showEffectsIcon: h = !1, onCopyCode: d, standalone: s }) {
181
- const m = t.addtoeditor ?? "Add to editor";
182
- return r`<calcite-block .hidden=${i} id=result-block .heading=${c ?? t.besteffort ?? "Here is the assistant's best effort"} .expanded=${e} .collapsible=${n}>${h && r`<calcite-chip .label=${t.assistantresponses} slot=content-start icon=effects scale=m class="suggestion-chips"></calcite-chip>` || ""}<calcite-card-group .label=${t.assistantresponses}>${N(o, (a) => a.conversationId, (a) => r`<calcite-card><div slot=heading><div class="prior-prompt"><span>${a.priorPrompt}</span><calcite-action icon=duplicate scale=s slot=actions-end class="copy-prompt-button" text .id=${`copy-prompt-${a.conversationId}-${s ? "standalone" : "list"}`} @click=${(l) => {
180
+ function N({ hidden: i = !1, expanded: e = !1, messages: t, cards: o, heading: r, collapsible: n = !1, showEffectsIcon: u = !1, onCopyCode: d, standalone: s }) {
181
+ const h = t.addtoeditor ?? "Add to editor";
182
+ return c`<calcite-block .hidden=${i} id=result-block .heading=${r ?? t.besteffort ?? "Here is the assistant's best effort"} .expanded=${e} .collapsible=${n}>${u && c`<calcite-chip .label=${t.assistantresponses ?? "Assistant responses"} slot=content-start icon=effects scale=m class="suggestion-chips"></calcite-chip>` || ""}<calcite-card-group .label=${t.assistantresponses ?? "Assistant responses"}>${q(o, (a) => a.conversationId, (a) => c`<calcite-card><div slot=heading><div class="prior-prompt"><span>${a.priorPrompt}</span><calcite-action icon=duplicate scale=s slot=actions-end class="copy-prompt-button" text .id=${`copy-prompt-${a.conversationId}-${s ? "standalone" : "list"}`} @click=${(l) => {
183
183
  const p = l.currentTarget;
184
184
  navigator.clipboard.writeText(a.priorPrompt).then(() => {
185
185
  p.setAttribute("data-copied", "true"), setTimeout(() => p.removeAttribute("data-copied"), 1500);
186
186
  });
187
- }}></calcite-action><calcite-popover .referenceElement=${`copy-prompt-${a.conversationId}-${s ? "standalone" : "list"}`} placement=top-start class="copy-feedback" .label=${t.copiedsuccessfully ?? "copied successfully"} open trigger-disabled><span>${t.copiedsuccessfully ?? "copied successfully"}</span></calcite-popover><calcite-tooltip .referenceElement=${`copy-prompt-${a.conversationId}-${s ? "standalone" : "list"}`} placement=top-start class="copy-tooltip">${t.copyprompttoclipboard}</calcite-tooltip></div>${a.message && s && r`<div class="response-error-container">${F({ errorMessage: a.message })}</div>` || ""}</div><div><div class="code-response-wrapper"><div class="positioned-code-content"><calcite-chip-group .label=${t.responsecontext ?? "Response Context"} scale=s>${a.message && !s && r`<calcite-tooltip .referenceElement=${`response-chip-${a.conversationId}-error`} placement=top-start overlay-positioning=fixed>${a.message}</calcite-tooltip><calcite-chip .id=${`response-chip-${a.conversationId}-error`} .label=${t.error ?? "Error"} scale=s appearance=outline icon=exclamation-mark-triangle-f class="response-error-chip"></calcite-chip>` || ""}${a.chips?.map((l) => {
188
- const p = Y();
189
- return r`${l.tooltip && r`<calcite-tooltip .referenceElement=${`response-chip-${l.conversationId}-${p}`} placement=top-start overlay-positioning=fixed>${l.tooltip}</calcite-tooltip>` || ""}<calcite-chip .label=${l.label} .scale=${l.scale ?? "s"} .appearance=${l.appearance ?? "outline"} .icon=${l.icon} .id=${`response-chip-${l.conversationId}-${p}`}>${l.label}</calcite-chip>`;
190
- })}</calcite-chip-group></div><details class="collapsible-code" open><summary>Code response</summary><code>${a.code}</code></details></div></div><div slot=footer-start class="feedback-actions"><calcite-button primary-text=${m ?? A} class="add-to-editor-button" @click=${() => a.onAddToEditor("add")} overlay-positioning=fixed scale=s icon-start=plus round>${t.addtoeditor ?? "Add to editor"}</calcite-button><calcite-button round icon-start=file-code kind=neutral scale=s @click=${() => a.onAddToEditor("replace")} class="response-secondary-action-button" .id=${`replace-${a.conversationId}-${s ? "standalone" : "list"}`}></calcite-button><calcite-tooltip .referenceElement=${`replace-${a.conversationId}-${s ? "standalone" : "list"}`} placement=top-start><span>${t.replaceineditor ?? "Replace all code in editor"}</span></calcite-tooltip><calcite-button round icon-start=copy-to-clipboard kind=neutral scale=s @click=${(l) => {
187
+ }}></calcite-action><calcite-popover .referenceElement=${`copy-prompt-${a.conversationId}-${s ? "standalone" : "list"}`} placement=top-start class="copy-feedback" .label=${t.copiedsuccessfully ?? "copied successfully"} open trigger-disabled><span>${t.copiedsuccessfully ?? "copied successfully"}</span></calcite-popover><calcite-tooltip .referenceElement=${`copy-prompt-${a.conversationId}-${s ? "standalone" : "list"}`} placement=top-start class="copy-tooltip">${t.copyprompttoclipboard ?? "Copy prompt to clipboard"}</calcite-tooltip></div>${a.message && s && c`<div class="response-error-container">${U({ errorMessage: a.message })}</div>` || ""}</div><div><div class="code-response-wrapper"><div class="positioned-code-content"><calcite-chip-group .label=${t.responsecontext ?? "Response Context"} scale=s>${a.message && !s && c`<calcite-tooltip .referenceElement=${`response-chip-${a.conversationId}-error`} placement=top-start overlay-positioning=fixed>${a.message}</calcite-tooltip><calcite-chip .id=${`response-chip-${a.conversationId}-error`} .label=${t.error ?? "Error"} scale=s appearance=outline icon=exclamation-mark-triangle-f class="response-error-chip"></calcite-chip>` || ""}${a.chips?.map((l) => {
188
+ const p = J();
189
+ return c`${l.tooltip && c`<calcite-tooltip .referenceElement=${`response-chip-${l.conversationId}-${p}`} placement=top-start overlay-positioning=fixed>${l.tooltip}</calcite-tooltip>` || ""}<calcite-chip .label=${l.label} .scale=${l.scale ?? "s"} .appearance=${l.appearance ?? "outline"} .icon=${l.icon} .id=${`response-chip-${l.conversationId}-${p}`}>${l.label}</calcite-chip>`;
190
+ })}</calcite-chip-group></div><details class="collapsible-code" open><summary>Code response</summary><code>${a.code}</code></details></div></div><div slot=footer-start class="feedback-actions"><calcite-button primary-text=${h ?? w} class="add-to-editor-button" @click=${() => a.onAddToEditor("add")} overlay-positioning=fixed scale=s icon-start=plus round>${t.addtoeditor ?? "Add to editor"}</calcite-button><calcite-button round icon-start=file-code kind=neutral scale=s @click=${() => a.onAddToEditor("replace")} class="response-secondary-action-button" .id=${`replace-${a.conversationId}-${s ? "standalone" : "list"}`}></calcite-button><calcite-tooltip .referenceElement=${`replace-${a.conversationId}-${s ? "standalone" : "list"}`} placement=top-start><span>${t.replaceineditor ?? "Replace all code in editor"}</span></calcite-tooltip><calcite-button round icon-start=copy-to-clipboard kind=neutral scale=s @click=${(l) => {
191
191
  const p = l.currentTarget;
192
192
  d(a.code).then(() => {
193
193
  p.setAttribute("data-copied", "true"), setTimeout(() => p.removeAttribute("data-copied"), 1500);
194
194
  });
195
- }} class="response-secondary-action-button" .id=${`copy-response-${a.conversationId}-${s ? "standalone" : "list"}`}></calcite-button><calcite-popover .referenceElement=${`copy-response-${a.conversationId}-${s ? "standalone" : "list"}`} placement=top-start class="copy-feedback" .label=${t.copiedsuccessfully ?? "copied successfully"} open trigger-disabled><span>${t.copiedsuccessfully ?? "copied successfully"}</span></calcite-popover><calcite-tooltip .referenceElement=${`copy-response-${a.conversationId}-${s ? "standalone" : "list"}`} placement=top-start class="copy-tooltip">${t.copytoclipboard}</calcite-tooltip></div><div slot=footer-end class="feedback-actions"><calcite-action .text=${t.thumbsup} scale=s icon=thumbs-up @click=${a.onThumbsUp} .id=${`thumbs-up-${a.conversationId}-${s ? "standalone" : "list"}`}></calcite-action><calcite-tooltip .referenceElement=${`thumbs-up-${a.conversationId}-${s ? "standalone" : "list"}`} placement=top-start><span>${t.helpful ?? "Helpful"}</span></calcite-tooltip><calcite-action .text=${t.thumbsdown} scale=s icon=thumbs-down @click=${a.onThumbsDown} .id=${`thumbs-down-${a.conversationId}-${s ? "standalone" : "list"}`}></calcite-action><calcite-tooltip .referenceElement=${`thumbs-down-${a.conversationId}-${s ? "standalone" : "list"}`} placement=top-start><span>${t.unhelpful ?? "Unhelpful"}</span></calcite-tooltip></div></calcite-card>`)}</calcite-card-group></calcite-block>`;
195
+ }} class="response-secondary-action-button" .id=${`copy-response-${a.conversationId}-${s ? "standalone" : "list"}`}></calcite-button><calcite-popover .referenceElement=${`copy-response-${a.conversationId}-${s ? "standalone" : "list"}`} placement=top-start class="copy-feedback" .label=${t.copiedsuccessfully ?? "copied successfully"} open trigger-disabled><span>${t.copiedsuccessfully ?? "copied successfully"}</span></calcite-popover><calcite-tooltip .referenceElement=${`copy-response-${a.conversationId}-${s ? "standalone" : "list"}`} placement=top-start class="copy-tooltip">${t.copytoclipboard ?? "Copy code to clipboard"}</calcite-tooltip></div><div slot=footer-end class="feedback-actions"><calcite-action .text=${t.thumbsup ?? "Thumbs up"} scale=s icon=thumbs-up @click=${a.onThumbsUp} .id=${`thumbs-up-${a.conversationId}-${s ? "standalone" : "list"}`}></calcite-action><calcite-tooltip .referenceElement=${`thumbs-up-${a.conversationId}-${s ? "standalone" : "list"}`} placement=top-start><span>${t.helpful ?? "Helpful"}</span></calcite-tooltip><calcite-action .text=${t.thumbsdown ?? "Thumbs down"} scale=s icon=thumbs-down @click=${a.onThumbsDown} .id=${`thumbs-down-${a.conversationId}-${s ? "standalone" : "list"}`}></calcite-action><calcite-tooltip .referenceElement=${`thumbs-down-${a.conversationId}-${s ? "standalone" : "list"}`} placement=top-start><span>${t.unhelpful ?? "Unhelpful"}</span></calcite-tooltip></div></calcite-card>`)}</calcite-card-group></calcite-block>`;
196
196
  }
197
- const u = {
198
- welcome: "Welcome to the new assistant experience",
199
- beforeyougetstarted: "Before you get started be aware:",
200
- maybeincorrect: "AI generated code may occasionally be incorrect or biased. Review carefully.",
201
- pleasereadhelp: "Read the Arcade Assistant (beta) {helpTopic} to get started and learn details on security, privacy and limitations.",
202
- proceed: "Proceed",
203
- exit: "Exit",
204
- promptsuggestions: "Prompt suggestions",
205
- promptsuggestion: "Prompt suggestion",
206
- assistantresponses: "Assistant responses",
207
- collapse: "Collapse",
208
- thumbsup: "Thumbs up",
209
- thumbsdown: "Thumbs down",
210
- refine: "Refine",
211
- startover: "Start over",
212
- helptopic: "help topic",
213
- agreement: "I agree to the {EsriPrivacyStatement} (and {Supplement}).",
214
- esriprivacystatement: "Esri Privacy Statement",
215
- supplement: "Supplement",
216
- disclaimerpt2: "AI-generated content may be inaccurate. Review before using.",
217
- replaceineditor: "Replace all code in editor",
218
- keepinmind: "Keep in mind the following:",
219
- beconsise: "Be concise, but also clear in your request",
220
- avoidambiguity: "Avoid ambiguity and vagueness",
221
- documentation: "documentation",
222
- useexamples: "Use examples to clarify your request",
223
- moredetails: "You do not need to use exact field names in your instructions, but more detail is generally better",
224
- seedocumentation: "Please see the {documentation} for more information, including limitations and additional resources.",
225
- assistantinformation: "Assistant information",
226
- profilecontextlabel: "Profile context: {profileName}",
227
- layercontextlabel: "Layer context: {layerName}",
228
- numlayers: "{numLayers} {layerOrLayers}",
229
- numlayersplural: "layers",
230
- numlayerssingular: "layer",
231
- responsecontext: "Response context",
232
- error: "Error",
233
- copytoclipboard: "Copy code to clipboard",
234
- copyprompttoclipboard: "Copy prompt to clipboard",
235
- copiedsuccessfully: "Copied successfully",
236
- helpful: "Helpful",
237
- unhelpful: "Unhelpful"
238
- }, fe = "arcade_generation", be = "ArcadeCodeRequest", w = "visualization", ge = "ArcadeAssistant", ye = [
197
+ const me = "arcade_generation", fe = "ArcadeCodeRequest", x = "visualization", be = "ArcadeAssistant", ge = [
239
198
  "your_comments",
240
199
  "user_evaluation",
241
200
  "question",
@@ -246,10 +205,10 @@ const u = {
246
205
  "context",
247
206
  "extras"
248
207
  ];
249
- let M = [], U = !0;
250
- class ve extends V {
208
+ let M = [], P = !0;
209
+ class ve extends H {
251
210
  constructor() {
252
- super(...arguments), this.textAreaRef = B(), this.messages = W(), this._feedbackService = void 0, this.handleFeedbackButton = (e, t) => {
211
+ super(...arguments), this.textAreaRef = V(), this.messages = j(), this._feedbackService = void 0, this.handleFeedbackButton = (e, t) => {
253
212
  this.feedback = { active: !0, value: e, item: t, termsAccepted: !1, text: "", submitting: !1 };
254
213
  }, this.handleFeedbackSheetClose = () => {
255
214
  this.feedback = {
@@ -264,7 +223,7 @@ class ve extends V {
264
223
  this.handleFeedbackSheetClose();
265
224
  return;
266
225
  }
267
- const t = this.getModel(), o = t ? await this.getProfileAndMetadata(t.uri) : void 0, c = {
226
+ const t = this.getModel(), o = t ? await this.getProfileAndMetadata(t.uri) : void 0, r = {
268
227
  user_evaluation: this.feedback.value,
269
228
  your_comments: this.feedback.text || void 0,
270
229
  question: this.feedback.item?.question ?? "",
@@ -276,7 +235,7 @@ class ve extends V {
276
235
  */
277
236
  answer: encodeURIComponent(this.feedback.item?.formattedScript ?? ""),
278
237
  useragent: navigator.userAgent,
279
- _source: ge,
238
+ _source: be,
280
239
  version: this.appVersion ?? "",
281
240
  context: o ? JSON.stringify(o) : "",
282
241
  extras: o?.profileName ?? "",
@@ -284,7 +243,7 @@ class ve extends V {
284
243
  privacy_statement: this.feedback.termsAccepted ? "I_agree" : ""
285
244
  };
286
245
  try {
287
- await e.applyEdits({ addFeatures: [new X({ attributes: c })] });
246
+ await e.applyEdits({ addFeatures: [new K({ attributes: r })] });
288
247
  } catch (n) {
289
248
  console.error("Error submitting feedback:", n);
290
249
  }
@@ -303,11 +262,11 @@ class ve extends V {
303
262
  this.properties = { isViewingResult: 16, confirmationActive: 16, isSubmitting: 16, errorMessage: 16, question: 16, history: 16, feedback: 16, splashActive: 16, context: 16, historyCards: 16, closePanel: 0, insertText: 0, helpBase: 1, assistantsEnabled: 5, layer: [1, { type: Object }], portalUrl: 1, serviceUrl: 1, closed: 7, editorRef: 0, feedbackServiceUrl: 1, appVersion: 1 };
304
263
  }
305
264
  static {
306
- this.styles = ee;
265
+ this.styles = Z;
307
266
  }
308
267
  get disclaimerComment() {
309
268
  return `// ${this.messages.disclaimercomment}
310
- // ${u.disclaimerpt2}`;
269
+ // ${this.messages.disclaimerpt2 ?? "AI-generated content may be inaccurate. Review before using."}`;
311
270
  }
312
271
  get assistantHelpUrl() {
313
272
  return `${this.helpBase ?? "https://doc.arcgis.com/en/arcgis-online/"}administer/configure-assistants.htm`;
@@ -342,10 +301,10 @@ class ve extends V {
342
301
  e.has("history") && (this.historyCards = this.getHistoryCards());
343
302
  }
344
303
  connectedCallback() {
345
- super.connectedCallback(), this.history = M, this.splashActive = U;
304
+ super.connectedCallback(), this.history = M, this.splashActive = P;
346
305
  }
347
306
  disconnectedCallback() {
348
- super.disconnectedCallback(), M = this.history, U = this.splashActive, this.copySuccessTimer && (clearTimeout(this.copySuccessTimer), this.copySuccessTimer = void 0);
307
+ super.disconnectedCallback(), M = this.history, P = this.splashActive, this.copySuccessTimer && (clearTimeout(this.copySuccessTimer), this.copySuccessTimer = void 0);
349
308
  }
350
309
  getHistoryCards() {
351
310
  return this.history.reduce((e, t) => (!t.script || (e.push({
@@ -353,26 +312,26 @@ class ve extends V {
353
312
  code: t.formattedScript || t.error || "",
354
313
  chips: [
355
314
  {
356
- label: t.profile ?? w,
315
+ label: t.profile ?? x,
357
316
  icon: "map-information",
358
317
  appearance: "outline",
359
318
  scale: "s",
360
319
  conversationId: t.conversationId ?? "",
361
- tooltip: u.profilecontextlabel.replace("{profileName}", t.profile ?? w)
320
+ tooltip: (this.messages.profilecontextlabel ?? "Profile context: {profileName}").replace("{profileName}", t.profile ?? x)
362
321
  },
363
322
  ...t.layerName ? [
364
323
  {
365
- label: u.numlayers.replace("{numLayers}", "1").replace("{layerOrLayers}", u.numlayerssingular),
324
+ label: (this.messages.numlayers ?? "{numLayers} {layerOrLayers}").replace("{numLayers}", "1").replace("{layerOrLayers}", this.messages.numlayerssingular ?? "layer"),
366
325
  icon: "layer",
367
326
  appearance: "outline",
368
327
  scale: "s",
369
328
  conversationId: t.conversationId ?? "",
370
- tooltip: u.layercontextlabel.replace("{layerName}", t.layerName ?? "No layer")
329
+ tooltip: (this.messages.layercontextlabel ?? "Layer context: {layerName}").replace("{layerName}", t.layerName ?? "No layer")
371
330
  }
372
331
  ] : []
373
332
  ],
374
333
  onAddToEditor: (o) => {
375
- G(this.editorRef.editorInstance, t.formattedScript ?? "", o, this.disclaimerComment);
334
+ Q(this.editorRef.editorInstance, t.formattedScript ?? "", o, this.disclaimerComment);
376
335
  },
377
336
  onThumbsUp: () => this.handleFeedbackButton("good", t),
378
337
  onThumbsDown: () => this.handleFeedbackButton("bad", t),
@@ -388,9 +347,9 @@ class ve extends V {
388
347
  return this._feedbackService;
389
348
  if (!this.feedbackServiceUrl)
390
349
  return;
391
- const e = new K({ url: this.feedbackServiceUrl });
350
+ const e = new Y({ url: this.feedbackServiceUrl });
392
351
  await e.load();
393
- const t = ye.filter((o) => !e.fields.some((c) => c.name === o));
352
+ const t = ge.filter((o) => !e.fields.some((r) => r.name === o));
394
353
  if (t.length > 0) {
395
354
  console.error(`Missing the following fields in feedback service: ${t.join(", ")}. Feedback will not be logged.`);
396
355
  return;
@@ -407,16 +366,16 @@ class ve extends V {
407
366
  const e = await this.getToken(), t = this.getModel();
408
367
  if (!t)
409
368
  return;
410
- const { profileName: o, metadata: c, layerName: n } = await this.getProfileAndMetadata(t.uri), d = (await te({
369
+ const { profileName: o, metadata: r, layerName: n } = await this.getProfileAndMetadata(t.uri), d = (await ee({
411
370
  baseUrl: this.serviceUrl,
412
- skillId: fe,
371
+ skillId: me,
413
372
  message: this.question,
414
373
  authToken: e,
415
374
  context: {
416
- kind: be,
375
+ kind: fe,
417
376
  context: {
418
377
  profile_name: o,
419
- metadata: c
378
+ metadata: r
420
379
  }
421
380
  }
422
381
  })).find((s) => s.context?.kind === "ArcadeCodeResponse");
@@ -425,7 +384,7 @@ class ve extends V {
425
384
  d.context?.kind === "ArcadeCodeResponse" && (this.history = [
426
385
  {
427
386
  script: d?.context?.arcadeCode?.code,
428
- formattedScript: J(d?.context?.arcadeCode?.code ?? ""),
387
+ formattedScript: G(d?.context?.arcadeCode?.code ?? ""),
429
388
  error: void 0,
430
389
  question: this.question,
431
390
  profile: o,
@@ -436,29 +395,29 @@ class ve extends V {
436
395
  ...this.history
437
396
  ], this.isViewingResult = !0, this.errorMessage = void 0);
438
397
  } catch (e) {
439
- e instanceof Error && e.name === "ArcadeAssistantError" ? this.errorMessage = oe(e) || this.messages.erroroccurred || "An error occurred." : this.errorMessage = this.messages.erroroccurred || "An error occurred.", console.error("Error in Arcade Assistant:", e);
398
+ e instanceof Error && e.name === "ArcadeAssistantError" ? this.errorMessage = ie(e) || this.messages.erroroccurred || "An error occurred." : this.errorMessage = this.messages.erroroccurred || "An error occurred.", console.error("Error in Arcade Assistant:", e);
440
399
  } finally {
441
400
  this.isSubmitting = !1;
442
401
  }
443
402
  }
444
403
  }
445
404
  async getToken() {
446
- const { token: e } = await j.getCredential(this.portalUrl);
405
+ const { token: e } = await B.getCredential(this.portalUrl);
447
406
  return e;
448
407
  }
449
408
  async getProfileAndMetadata(e) {
450
- let t = w;
409
+ let t = x;
451
410
  const o = I.getEditorProfileForModel(e);
452
411
  o?.loaded || await o?.loadSource();
453
- const c = this.editorRef.profile;
454
- c && "id" in c && (t = c.id);
412
+ const r = this.editorRef.profile;
413
+ r && "id" in r && (t = r.id);
455
414
  const n = o?.definition?.variables?.find((s) => s.type === "feature");
456
- let h = [], d;
457
- return n?.definition && "fields" in n.definition && (h = n.definition.fields.map((s) => ({
415
+ let u = [], d;
416
+ return n?.definition && "fields" in n.definition && (u = n.definition.fields.map((s) => ({
458
417
  name: s.name,
459
418
  type: s.type,
460
419
  alias: s.alias
461
- })), Z(n?.definition) && (d = n.definition.title)), { profileName: t, metadata: h, layerName: d };
420
+ })), X(n?.definition) && (d = n.definition.title)), { profileName: t, metadata: u, layerName: d };
462
421
  }
463
422
  onCopyCode(e) {
464
423
  const t = e ? `${this.disclaimerComment}
@@ -466,11 +425,11 @@ ${e}` : "";
466
425
  return navigator.clipboard.writeText(t);
467
426
  }
468
427
  render() {
469
- return this.closed ? null : this.assistantsEnabled ? r`<calcite-flow><calcite-flow-item closable .heading=${this.messages.arcadeassistant ?? "Arcade assistant"} @calciteFlowItemClose=${this.handleClose}>${this.splashActive && r`<calcite-scrim></calcite-scrim>` || ""}${se({ messages: this.messages })}${re({ popoverContent: P({ assistantsEnabled: this.assistantsEnabled, messages: { ...this.messages, ...u }, assistantHelpUrl: this.assistantHelpUrl, helpTopicUrl: this.usingTheAssitantDocUrl }) })}<calcite-shell class="unstyled-shell">${this.splashActive && he({ messages: { ...u, ...this.messages }, onProceed: () => {
428
+ return this.closed ? null : this.assistantsEnabled ? c`<calcite-flow><calcite-flow-item closable .heading=${this.messages.arcadeassistant ?? "Arcade assistant"} @calciteFlowItemClose=${this.handleClose}>${this.splashActive && c`<calcite-scrim></calcite-scrim>` || ""}${ae({ messages: this.messages })}${se({ popoverContent: E({ assistantsEnabled: this.assistantsEnabled, messages: this.messages, assistantHelpUrl: this.assistantHelpUrl, helpTopicUrl: this.usingTheAssitantDocUrl }) })}<calcite-shell class="unstyled-shell">${this.splashActive && ue({ messages: this.messages, onProceed: () => {
470
429
  this.splashActive = !1;
471
- }, helpTopicUrl: this.assistantOverviewDocUrl, onExit: (e) => this.closePanel && this.closePanel(e) }) || ""}${ce({ active: this.confirmationActive, setActive: (e) => this.confirmationActive = e, messages: this.messages })}${le({ isDisabled: this.isSubmitting, isReadOnly: !1, setQuestion: this.setQuestion, setIsViewingResult: (e) => this.isViewingResult = e, mode: this.isViewingResult ? "refine" : "prompt", textAreaRef: this.textAreaRef, question: this.question, errorMessage: this.errorMessage, setErrorMessage: (e) => this.errorMessage = e, submitQuestion: this.submitQuestion.bind(this), messages: { ...u, ...this.messages }, context: this.context })}<calcite-block-group label="interactive blocks">${!this.isViewingResult && !this.isSubmitting && me({ messages: { ...this.messages, ...u }, suggestions: ["Round value to one decimal place", 'Return "Yes" if value > 10'], onSuggestionClick: this.onSuggestionClick }) || ""}<calcite-block .hidden=${!this.isSubmitting} .heading=${this.messages.generatingresponse ?? "Generating response..."}></calcite-block>${q({
430
+ }, helpTopicUrl: this.assistantOverviewDocUrl, onExit: (e) => this.closePanel && this.closePanel(e) }) || ""}${ce({ active: this.confirmationActive, setActive: (e) => this.confirmationActive = e, messages: this.messages })}${ne({ isDisabled: this.isSubmitting, isReadOnly: !1, setQuestion: this.setQuestion, setIsViewingResult: (e) => this.isViewingResult = e, mode: this.isViewingResult ? "refine" : "prompt", textAreaRef: this.textAreaRef, question: this.question, errorMessage: this.errorMessage, setErrorMessage: (e) => this.errorMessage = e, submitQuestion: this.submitQuestion.bind(this), messages: this.messages, context: this.context })}<calcite-block-group label="interactive blocks">${!this.isViewingResult && !this.isSubmitting && he({ messages: this.messages, suggestions: ["Round value to one decimal place", 'Return "Yes" if value > 10'], onSuggestionClick: this.onSuggestionClick }) || ""}<calcite-block .hidden=${!this.isSubmitting} .heading=${this.messages.generatingresponse ?? "Generating response..."}></calcite-block>${N({
472
431
  expanded: this.isViewingResult,
473
- messages: { ...this.messages, ...u },
432
+ messages: this.messages,
474
433
  collapsible: !0,
475
434
  showEffectsIcon: !0,
476
435
  /** Only show the latest history card */
@@ -479,9 +438,9 @@ ${e}` : "";
479
438
  hidden: this.isSubmitting || !this.isViewingResult,
480
439
  onCopyCode: this.onCopyCode.bind(this),
481
440
  standalone: !0
482
- })}${q({
441
+ })}${N({
483
442
  expanded: !this.isViewingResult,
484
- messages: { ...this.messages, ...u },
443
+ messages: this.messages,
485
444
  collapsible: !0,
486
445
  /**
487
446
  * When the user is viewing the latest result, we display the first history card
@@ -493,10 +452,10 @@ ${e}` : "";
493
452
  heading: this.messages.recentprompts ?? "Recent prompts",
494
453
  hidden: this.isSubmitting || this.history.length === 0,
495
454
  onCopyCode: this.onCopyCode.bind(this)
496
- })}</calcite-block-group>${this.feedback.active ? ue({ setOpen: this.handleFeedbackSheetClose, messages: { ...this.messages, ...u }, onSubmit: this.handleFeedbackSubmit, feedback: this.feedback, setFeedback: this.setFeedbackState.bind(this) }) : null}</calcite-shell></calcite-flow-item></calcite-flow>` : r`<calcite-flow><calcite-flow-item .selected=${!this.isViewingResult} closable .heading=${this.messages.arcadeassistant ?? "Arcade assistant"} @calciteFlowItemClose=${this.handleClose}>${P({ slot: "content-top", messages: { ...this.messages, ...u }, assistantsEnabled: this.assistantsEnabled, assistantHelpUrl: this.assistantHelpUrl, helpTopicUrl: this.usingTheAssitantDocUrl })}</calcite-flow-item></calcite-flow>`;
455
+ })}</calcite-block-group>${this.feedback.active ? pe({ setOpen: this.handleFeedbackSheetClose, messages: this.messages, onSubmit: this.handleFeedbackSubmit, feedback: this.feedback, setFeedback: this.setFeedbackState.bind(this) }) : null}</calcite-shell></calcite-flow-item></calcite-flow>` : c`<calcite-flow><calcite-flow-item .selected=${!this.isViewingResult} closable .heading=${this.messages.arcadeassistant ?? "Arcade assistant"} @calciteFlowItemClose=${this.handleClose}>${E({ slot: "content-top", messages: this.messages, assistantsEnabled: this.assistantsEnabled, assistantHelpUrl: this.assistantHelpUrl, helpTopicUrl: this.usingTheAssitantDocUrl })}</calcite-flow-item></calcite-flow>`;
497
456
  }
498
457
  }
499
- H("arcgis-arcade-coding-assistant", ve);
458
+ O("arcgis-arcade-coding-assistant", ve);
500
459
  export {
501
460
  ve as ArcgisArcadeCodingAssistant
502
461
  };