@arcgis/coding-components 5.0.0-next.157 → 5.0.0-next.159

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.
@@ -17381,7 +17381,7 @@ F.add = (t, e, r, n) => {
17381
17381
  }), F.add("wasm-simd", () => {
17382
17382
  const t = [0, 97, 115, 109, 1, 0, 0, 0, 1, 5, 1, 96, 0, 1, 123, 3, 2, 1, 0, 10, 10, 1, 8, 0, 65, 0, 253, 15, 253, 98, 11];
17383
17383
  return WebAssembly.validate(new Uint8Array(t));
17384
- }), F.add("esri-atomics", "Atomics" in tr), F.add("esri-workers", "Worker" in tr), F.add("web-feat:cache", "caches" in tr), F.add("esri-workers-arraybuffer-transfer", !F("safari") || Number(F("safari")) >= 12), F.add("workers-pool-size", 8), F.add("featurelayer-simplify-thresholds", [0.5, 0.5, 0.5, 0.5]), F.add("featurelayer-simplify-payload-size-factors", [1, 1, 4]), F.add("featurelayer-animation-enabled", !0), F.add("featurelayer-snapshot-enabled", !0), F.add("featurelayer-snapshot-initial-tolerance", 0), F.add("featurelayer-snapshot-point-min-threshold", 8e4), F.add("featurelayer-snapshot-point-max-threshold", 4e5), F.add("featurelayer-snapshot-multipoint-min-threshold", 2e4), F.add("featurelayer-snapshot-multipoint-max-threshold", 1e5), F.add("featurelayer-snapshot-polygon-min-threshold", 2e3), F.add("featurelayer-snapshot-polygon-max-threshold", 2e3), F.add("featurelayer-snapshot-polyline-min-threshold", 2e3), F.add("featurelayer-snapshot-polyline-max-threshold", 2e3), F.add("featurelayer-snapshot-max-vertex-count", 25e4), F.add("featurelayer-snapshot-non-hosted-exceedslimit-enabled", !0), F.add("featurelayer-snapshot-concurrency", 4), F.add("featurelayer-snapshot-coverage", 0.1), F.add("featurelayer-query-max-depth", 4), F.add("featurelayer-query-pausing-enabled", !1), F.add("featurelayer-query-tile-concurrency", 4), F.add("featurelayer-query-tile-max-features", 6e5), F.add("featurelayer-advanced-symbols", !1), F.add("featurelayer-pbf", !0), F.add("featurelayer-pbf-statistics", !1), F.add("feature-layers-workers", !0), F.add("feature-polyline-generalization-factor", 1), F.add("parquetlayer-full-query-feature-count", 2e4), F.add("parquetlayer-hittest-max-feature-count", 1), F.add("parquetlayer-persistence-enabled", !1), F.add("parquetlayer-cache-enabled", !0), F.add("mapview-transitions-duration", 200), F.add("mapview-essential-goto-duration", 200), F.add("mapview-srswitch-adjust-rotation-scale-threshold", 24e6), F.add("mapserver-pbf-version-support", 10.81), F.add("mapservice-popup-identify-max-tolerance", 20), F.add("request-queue-concurrency-global", 50), F.add("request-queue-concurrency-hosted", 16), F.add("request-queue-concurrency-non-hosted", 6), F.add("curve-densification-coarse-segments", 128), F.add("curve-densification-max-segments", 2e3), F.add("curve-densification-min-segments", 3), F.add("curve-densification-pixel-deviation", 0.5), F.add("view-readyState-waiting-delay", 1e3), F.add("gradient-depth-bias", 0.01), F.add("gradient-depth-epsilon", 1e-8), F.add("enable-feature:esri-compress-textures", !0), F.add("enable-feature:basemap-groundlayers", !0), F.add("enable-feature:oit-ground", !0), !F("host-webworker") && F("host-browser") && (F.add("esri-csp-restrictions", () => {
17384
+ }), F.add("esri-atomics", "Atomics" in tr), F.add("esri-workers", "Worker" in tr), F.add("web-feat:cache", "caches" in tr), F.add("esri-workers-arraybuffer-transfer", !F("safari") || Number(F("safari")) >= 12), F.add("workers-pool-size", 8), F.add("featurelayer-simplify-thresholds", [0.5, 0.5, 0.5, 0.5]), F.add("featurelayer-simplify-payload-size-factors", [1, 1, 4]), F.add("featurelayer-animation-enabled", !0), F.add("featurelayer-snapshot-enabled", !0), F.add("featurelayer-snapshot-initial-tolerance", 0), F.add("featurelayer-snapshot-point-min-threshold", 8e4), F.add("featurelayer-snapshot-point-max-threshold", 4e5), F.add("featurelayer-snapshot-multipoint-min-threshold", 2e4), F.add("featurelayer-snapshot-multipoint-max-threshold", 1e5), F.add("featurelayer-snapshot-polygon-min-threshold", 2e3), F.add("featurelayer-snapshot-polygon-max-threshold", 2e3), F.add("featurelayer-snapshot-polyline-min-threshold", 2e3), F.add("featurelayer-snapshot-polyline-max-threshold", 2e3), F.add("featurelayer-snapshot-max-vertex-count", 25e4), F.add("featurelayer-snapshot-non-hosted-exceedslimit-enabled", !0), F.add("featurelayer-snapshot-concurrency", 4), F.add("featurelayer-snapshot-allow-editable", !1), F.add("featurelayer-snapshot-coverage", 0.1), F.add("featurelayer-query-max-depth", 4), F.add("featurelayer-query-pausing-enabled", !1), F.add("featurelayer-query-tile-concurrency", 4), F.add("featurelayer-query-tile-max-features", 6e5), F.add("featurelayer-advanced-symbols", !1), F.add("featurelayer-pbf", !0), F.add("featurelayer-pbf-statistics", !1), F.add("feature-layers-workers", !0), F.add("feature-polyline-generalization-factor", 1), F.add("parquetlayer-full-query-feature-count", 2e4), F.add("parquetlayer-hittest-max-feature-count", 1), F.add("parquetlayer-persistence-enabled", !1), F.add("parquetlayer-cache-enabled", !0), F.add("mapview-transitions-duration", 200), F.add("mapview-essential-goto-duration", 200), F.add("mapview-srswitch-adjust-rotation-scale-threshold", 24e6), F.add("mapserver-pbf-version-support", 10.81), F.add("mapservice-popup-identify-max-tolerance", 20), F.add("request-queue-concurrency-global", 50), F.add("request-queue-concurrency-hosted", 16), F.add("request-queue-concurrency-non-hosted", 6), F.add("curve-densification-coarse-segments", 128), F.add("curve-densification-max-segments", 2e3), F.add("curve-densification-min-segments", 3), F.add("curve-densification-pixel-deviation", 0.5), F.add("view-readyState-waiting-delay", 1e3), F.add("gradient-depth-bias", 0.01), F.add("gradient-depth-epsilon", 1e-8), F.add("enable-feature:esri-compress-textures", !0), F.add("enable-feature:basemap-groundlayers", !0), F.add("enable-feature:oit-ground", !0), !F("host-webworker") && F("host-browser") && (F.add("esri-csp-restrictions", () => {
17385
17385
  try {
17386
17386
  new Function();
17387
17387
  } catch {
@@ -18238,7 +18238,7 @@ function se(t, e, r, n) {
18238
18238
  const fr = { apiKey: void 0, apiKeys: { scopes: [] }, applicationName: "", applicationUrl: globalThis.location?.href, assetsPath: "", fontsUrl: "https://static.arcgis.com/fonts", geometryServiceUrl: "https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer", geoRSSServiceUrl: "https://utility.arcgis.com/sharing/rss", kmlServiceUrl: "https://utility.arcgis.com/sharing/kml", userPrivilegesApplied: !0, portalUrl: "https://www.arcgis.com", respectPrefersReducedMotion: !0, routeServiceUrl: "https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World", workers: { loaderConfig: { has: {}, paths: {}, map: {}, packages: [] } }, request: { crossOriginNoCorsDomains: null, httpsDomains: ["arcgis.com", "arcgisonline.com", "esrikr.com", "premiumservices.blackbridge.com", "esripremium.accuweather.com", "gbm.digitalglobe.com", "firstlook.digitalglobe.com", "msi.digitalglobe.com"], interceptors: [], internalInterceptors: [], maxUrlLength: 2e3, priority: "high", proxyRules: [], proxyUrl: null, timeout: 62e3, trustedServers: [], useIdentity: !0 }, log: { interceptors: [], level: null } };
18239
18239
  if (globalThis.esriConfig && (q4(fr, globalThis.esriConfig, !0), delete fr.has), !fr.assetsPath) {
18240
18240
  {
18241
- const t = "5.0.0-next.115";
18241
+ const t = "5.0.0-next.117";
18242
18242
  fr.assetsPath = `https://cdn.jsdelivr.net/npm/@arcgis/core@${t}/assets`;
18243
18243
  }
18244
18244
  fr.defaultAssetsPath = fr.assetsPath;
package/dist/cdn/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{I as s,u as e}from"./DDFKURLO.js";import"./RXOG5OZ7.js";import"./ALDX5YZO.js";var i=e(s,{"arcgis-arcade-coding-assistant":[()=>import("./BE4FGKNF.js"),"appVersion,assistantsEnabled,closed,closePanel:,editorRef:,feedbackServiceUrl,helpBase,insertText:,portalUrl,serviceUrl;destroy"],"arcgis-arcade-editor":[()=>import("./EHTEMHJI.js"),"arcadeAssistant:,customPanels:,editorInstance:,editorOptions:,hideDocumentationActions,hideSideBar,messages:,openedSidePanel,profile:,script,sideActionBarExpanded,snippets:,suggestions:,testData:;getTestResult,setFocus"],"arcgis-arcade-results":[()=>import("./IAMP2URN.js"),"calciteModeDark,consoleLogs:,loading,openedResultPanel,result:"],"arcgis-arcade-suggestions":[()=>import("./NEEMZKOL.js"),"closed,suggestions:"],"arcgis-code-editor":[()=>import("./QPOKIVLR.js"),"editorInstance:,editorOptions:,language,modelId,value;insertSnippet,insertText,setFocus"],"arcgis-code-editor-shell":[()=>import("./QDE2LLCP.js")],"arcgis-code-viewer":[()=>import("./H75AOE6T.js"),"language,round"],"arcgis-editor-variables":[()=>import("./NBNHNFDE.js"),"closed,loading,modelId,variable:"],"arcgis-language-api-panel":[()=>import("./BUY5C6Q3.js"),"apiLibrary:,closed,hideDocumentationActions,languageId,loading"],"arcgis-sql-expression-editor":[()=>import("./4Y2WQD7U.js"),"hideSideBar,messages:,profile:,script;setFocus"]});i({resourcesUrl:import.meta.url});var t=new CSSStyleSheet;t.replaceSync("@layer{:not([hydrated]):is(arcgis-arcade-editor,arcgis-code-editor,arcgis-code-editor-shell,arcgis-code-viewer,arcgis-sql-expression-editor){visibility:hidden}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,t];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r)=>{a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c);r.p=a.t(([m])=>{r.t=m.trackAccess;r.o=m.createObservable;r.c=m.createTrackingTarget;r.r=m.runTracked},"applications/Components/reactiveUtils")})($arcgis,s)
2
+ import{I as s,u as e}from"./DDFKURLO.js";import"./RXOG5OZ7.js";import"./ALDX5YZO.js";var i=e(s,{"arcgis-arcade-coding-assistant":[()=>import("./WD3XRDKO.js"),"appVersion,assistantsEnabled,closed,closePanel:,editorRef:,feedbackServiceUrl,helpBase,insertText:,portalUrl,serviceUrl;destroy"],"arcgis-arcade-editor":[()=>import("./P2MJ7R3U.js"),"arcadeAssistant:,customPanels:,editorInstance:,editorOptions:,hideDocumentationActions,hideSideBar,messages:,openedSidePanel,profile:,script,sideActionBarExpanded,snippets:,suggestions:,testData:;getTestResult,setFocus"],"arcgis-arcade-results":[()=>import("./IAMP2URN.js"),"calciteModeDark,consoleLogs:,loading,openedResultPanel,result:"],"arcgis-arcade-suggestions":[()=>import("./NEEMZKOL.js"),"closed,suggestions:"],"arcgis-code-editor":[()=>import("./Y7IEIZNX.js"),"editorInstance:,editorOptions:,language,modelId,value;insertSnippet,insertText,setFocus"],"arcgis-code-editor-shell":[()=>import("./QDE2LLCP.js")],"arcgis-code-viewer":[()=>import("./JTUZKSDX.js"),"language,round"],"arcgis-editor-variables":[()=>import("./NBNHNFDE.js"),"closed,loading,modelId,variable:"],"arcgis-language-api-panel":[()=>import("./BUY5C6Q3.js"),"apiLibrary:,closed,hideDocumentationActions,languageId,loading"],"arcgis-sql-expression-editor":[()=>import("./4Y2WQD7U.js"),"hideSideBar,messages:,profile:,script;setFocus"]});i({resourcesUrl:import.meta.url});var t=new CSSStyleSheet;t.replaceSync("@layer{:not([hydrated]):is(arcgis-arcade-editor,arcgis-code-editor,arcgis-code-editor-shell,arcgis-code-viewer,arcgis-sql-expression-editor){visibility:hidden}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,t];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r)=>{a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c);r.p=a.t(([m])=>{r.t=m.trackAccess;r.o=m.createObservable;r.c=m.createTrackingTarget;r.r=m.runTracked},"applications/Components/reactiveUtils")})($arcgis,s)
@@ -118,7 +118,7 @@ const F = [
118
118
  { include: "@whitespace" },
119
119
  // regular expression: ensure it is terminated before beginning (otherwise it is an operator)
120
120
  [
121
- /\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|\/|,|\)|\]|\}|$))/u,
121
+ /\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/u,
122
122
  { token: "regexp", bracket: "@open", next: "@regexp" }
123
123
  ],
124
124
  // delimiters and operators
@@ -161,7 +161,7 @@ const F = [
161
161
  // whitespace
162
162
  { include: "@whitespace" },
163
163
  // from keyword
164
- [/from/u, { token: "keyword", next: "@popall" }]
164
+ [/from(?=\s)/u, { token: "keyword", next: "@popall" }]
165
165
  ],
166
166
  // State after `for` keyword: expects '('
167
167
  forLoopInit: [
@@ -650,7 +650,7 @@ class Ke extends ie {
650
650
  this.updateViewState({ isSubmitting: !0, errorMessage: void 0 });
651
651
  try {
652
652
  const e = await this.getToken(), i = this.getModel();
653
- if (!i)
653
+ if (!i || !this.serviceUrl)
654
654
  return;
655
655
  const o = this.viewState.context ?? await this.getProfileAndMetadata(i.uri), n = (await we({
656
656
  baseUrl: this.serviceUrl,
@@ -1,7 +1,7 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import { g as y, c as I } from "../../chunks/runtime.js";
3
- import { css as D, html as s, nothing as P } from "lit";
4
- import { KeyCode as C } from "monaco-editor";
2
+ import { g as I, c as D } from "../../chunks/runtime.js";
3
+ import { css as C, html as s, nothing as b } from "lit";
4
+ import { KeyCode as B } from "monaco-editor";
5
5
  import "monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js";
6
6
  import "monaco-editor/esm/vs/editor/standalone/common/standaloneTheme.js";
7
7
  import "monaco-editor/esm/vs/platform/hover/browser/hover.js";
@@ -9,21 +9,21 @@ import "monaco-editor/esm/vs/editor/common/languages/supports/tokenization.js";
9
9
  import "monaco-editor/esm/vs/base/browser/dom.js";
10
10
  import "monaco-editor/esm/vs/editor/browser/editorDom.js";
11
11
  import "monaco-editor/esm/vs/editor/browser/controller/mouseTarget.js";
12
- import { LitElement as B, createEvent as b, safeClassMap as l } from "@arcgis/lumina";
13
- import { generateGuid as k } from "@arcgis/toolkit/string";
14
- import { D as M, e as v } from "../../chunks/arcade-executor.js";
15
- import { s as T, g as L } from "../../chunks/arcade-service-accessors.js";
12
+ import { LitElement as k, createEvent as v, safeClassMap as l } from "@arcgis/lumina";
13
+ import { generateGuid as M } from "@arcgis/toolkit/string";
14
+ import { D as T, e as x } from "../../chunks/arcade-executor.js";
15
+ import { s as U, g as L } from "../../chunks/arcade-service-accessors.js";
16
16
  import { b as c } from "../../chunks/arcade-defaults.js";
17
- import { u as U } from "../../chunks/useT9n.js";
18
- import { createRef as F, ref as N } from "lit/directives/ref.js";
19
- import x from "@arcgis/core/identity/IdentityManager.js";
20
- import { log as H, rethrowError as o } from "@arcgis/toolkit/log";
21
- const O = D`:host{height:100%}calcite-tooltip:not([calcite-hydrated])>*{display:none}.main-action-bar{calcite-action-group{padding-inline-end:var(--calcite-spacing-sm)}calcite-action-group calcite-action{padding-inline-end:var(--calcite-spacing-sm)}calcite-action-group calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}calcite-action-group:last-child{border-inline-end-width:0px}calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}`, j = "https://services6.arcgis.com/HXHga6CfMLMBOlBX/ArcGIS/rest/services/survey123_6e349a50b4504ca6b6107216d568db5f_form/FeatureServer/0", a = (i, e) => H(i, "Arcade Assistant", e), z = (i) => {
17
+ import { u as F } from "../../chunks/useT9n.js";
18
+ import { createRef as N, ref as H } from "lit/directives/ref.js";
19
+ import R from "@arcgis/core/identity/IdentityManager.js";
20
+ import { log as O, rethrowError as o } from "@arcgis/toolkit/log";
21
+ const j = C`:host{height:100%}calcite-tooltip:not([calcite-hydrated])>*{display:none}.main-action-bar{calcite-action-group{padding-inline-end:var(--calcite-spacing-sm)}calcite-action-group calcite-action{padding-inline-end:var(--calcite-spacing-sm)}calcite-action-group calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}calcite-action-group:last-child{border-inline-end-width:0px}calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}`, E = "https://services6.arcgis.com/HXHga6CfMLMBOlBX/ArcGIS/rest/services/survey123_6e349a50b4504ca6b6107216d568db5f_form/FeatureServer/0", a = (i, e) => O(i, "Arcade Assistant", e), z = (i) => {
22
22
  const { aiAssistantsEnabled: e } = i;
23
23
  return e === void 0 ? (a("warn", "`areAiAssistantsEnabled` is not defined in the organizations settings."), !1) : e;
24
- }, V = (i) => !(!i || !("id" in i)), G = async (i) => (await x.getCredential(i, { oAuthPopupConfirmation: !1 })).token, q = async (i) => {
24
+ }, V = (i) => !(!i || !("id" in i)), G = async (i) => (await R.getCredential(i, { oAuthPopupConfirmation: !1 })).token, q = async (i) => {
25
25
  try {
26
- return !!await x.checkSignInStatus(i);
26
+ return !!await R.checkSignInStatus(i);
27
27
  } catch {
28
28
  return a("warn", "User is not signed in."), !1;
29
29
  }
@@ -37,42 +37,46 @@ async function X({
37
37
  const t = i.replace(/\/sharing\/rest(\/.*)?$/iu, "").replace(/\/$/u, "");
38
38
  if (!await q(t))
39
39
  return { shouldRender: !1 };
40
- const n = await G(i), h = `${t}/sharing/rest/portals/self?f=json&token=${n}`, p = `${t}/sharing/rest/portals/self/settings?f=json&token=${n}`, u = `${t}/sharing/rest/portals/self/signinSettings?f=json&token=${n}`, E = await Promise.allSettled([
40
+ const n = await G(i), h = `${t}/sharing/rest/portals/self?f=json&token=${n}`, p = `${t}/sharing/rest/portals/self/settings?f=json&token=${n}`, u = `${t}/sharing/rest/portals/self/signinSettings?f=json&token=${n}`, w = await Promise.allSettled([
41
41
  fetch(h, { credentials: "include" }).then((r) => r.json()),
42
42
  fetch(p, { credentials: "include" }).then((r) => r.json()),
43
43
  fetch(u, { credentials: "include" }).then((r) => r.json())
44
- ]), [g, f, _] = E, m = g.status === "fulfilled" ? g.value : (a("warn", `Failed to fetch selfUrl. Reason: ${g.reason}.`), {}), S = f.status === "fulfilled" ? f.value : (a("warn", `Failed to fetch settingsUrl. Reason: ${f.reason}.`), {}), R = _.status === "fulfilled" ? _.value : (a("warn", `Failed to fetch signinSettingsUrl. Reason: ${_.reason}.`), {}), $ = m?.helperServices?.aiAssistantServices?.url;
45
- if (!$)
46
- return a("warn", "Service URL is not available in the portal self response."), { shouldRender: !1 };
47
- const w = m.helpBase || "";
44
+ ]), [g, f, _] = w, m = g.status === "fulfilled" ? g.value : (a("warn", `Failed to fetch selfUrl. Reason: ${g.reason}.`), {}), S = f.status === "fulfilled" ? f.value : (a("warn", `Failed to fetch settingsUrl. Reason: ${f.reason}.`), {}), y = _.status === "fulfilled" ? _.value : (a("warn", `Failed to fetch signinSettingsUrl. Reason: ${_.reason}.`), {}), $ = m.helpBase || "";
48
45
  if (!S)
49
46
  return a("warn", "Settings response is not available."), { shouldRender: !1 };
50
47
  let A = z(S);
51
- return R.blockBetaApps === !0 && (a(
48
+ y.blockBetaApps === !0 && (a(
52
49
  "warn",
53
50
  "Arcade Assistant is blocked by the organization settings. To enable it, do not block beta apps in the organization settings."
54
- ), A = !1), m?.user?.privileges?.includes("portal:user:useAIAssistants") || (a("warn", "User does not have the required privileges to use AI Assistants."), A = !1), {
51
+ ), A = !1), m?.user?.privileges?.includes("portal:user:useAIAssistants") || (a("warn", "User does not have the required privileges to use AI Assistants."), A = !1);
52
+ const P = m?.helperServices?.aiAssistantServices?.url;
53
+ return P ? {
55
54
  shouldRender: !0,
56
- serviceUrl: $,
57
- helpBase: w,
55
+ serviceUrl: P,
56
+ helpBase: $,
58
57
  assistantsEnabled: A,
59
- feedbackServiceUrl: j
58
+ feedbackServiceUrl: E
59
+ } : {
60
+ shouldRender: !0,
61
+ assistantsEnabled: !1,
62
+ helpBase: $,
63
+ feedbackServiceUrl: E
60
64
  };
61
65
  }
62
- class K extends B {
66
+ class K extends k {
63
67
  constructor() {
64
- super(...arguments), this._codeEditorElt = F(), this._componentReadyDefer = Promise.withResolvers(), this._disposables = [], this._editorProfilePromise = Promise.resolve(void 0), this.messages = U(), this._modelId = k(), this._openArcadeHelp = () => void window.open(M, "Arcade Help"), this._toggleSidePanel = (e) => {
68
+ super(...arguments), this._codeEditorElt = N(), this._componentReadyDefer = Promise.withResolvers(), this._disposables = [], this._editorProfilePromise = Promise.resolve(void 0), this.messages = F(), this._modelId = M(), this._openArcadeHelp = () => void window.open(T, "Arcade Help"), this._toggleSidePanel = (e) => {
65
69
  if (!e.target)
66
70
  return;
67
71
  const t = e.target?.dataset.panelName ?? "none";
68
72
  this.openedSidePanel = t === this.openedSidePanel ? "none" : t, this.openedSidePanel === "none" && this._codeEditorElt.value?.setFocus().catch(o(this));
69
- }, this._consoleLogs = [], this._executingScript = !1, this._preparingArcade = !1, this._resultPanel = "output", this._showExecutionPanel = !1, this._arcadeAssistantRemoteState = { shouldRender: !1 }, this.hideDocumentationActions = !1, this.hideSideBar = !1, this.openedSidePanel = "none", this.script = "", this.sideActionBarExpanded = !1, this.arcgisDiagnosticsChange = b({ bubbles: !1 }), this.arcgisScriptChange = b({ bubbles: !1 });
73
+ }, this._consoleLogs = [], this._executingScript = !1, this._preparingArcade = !1, this._resultPanel = "output", this._showExecutionPanel = !1, this._arcadeAssistantRemoteState = { shouldRender: !1 }, this.hideDocumentationActions = !1, this.hideSideBar = !1, this.openedSidePanel = "none", this.script = "", this.sideActionBarExpanded = !1, this.arcgisDiagnosticsChange = v({ bubbles: !1 }), this.arcgisScriptChange = v({ bubbles: !1 });
70
74
  }
71
75
  static {
72
76
  this.properties = { _apiLibrary: 16, _consoleLogs: 16, _editorProfile: 16, _executingScript: 16, _executionResult: 16, _preparingArcade: 16, _resultPanel: 16, _showExecutionPanel: 16, _arcadeAssistantRemoteState: 16, editorInstance: 32, editorOptions: 0, hideDocumentationActions: 5, hideSideBar: 5, openedSidePanel: 3, profile: 0, script: 1, sideActionBarExpanded: 7, snippets: 0, suggestions: 0, testData: 0, customPanels: 0, arcadeAssistant: 0 };
73
77
  }
74
78
  static {
75
- this.styles = [O];
79
+ this.styles = [j];
76
80
  }
77
81
  get editorInstance() {
78
82
  return this._codeEditorElt.value?.editorInstance;
@@ -85,14 +89,14 @@ class K extends B {
85
89
  return { type: "error", value: "Missing editor profile", error: null };
86
90
  await this._componentReadyDefer.promise;
87
91
  const t = this._codeEditorElt.value?.value;
88
- return await v(e.definition, t, this.testData);
92
+ return await x(e.definition, t, this.testData);
89
93
  }
90
94
  async setFocus() {
91
95
  await this._componentReadyDefer.promise, await this._codeEditorElt.value?.setFocus();
92
96
  }
93
97
  async load() {
94
- const e = y("./assets");
95
- T(e), await this._updateDataModelDeps(), await this._updateArcadeAssistantRemoteState();
98
+ const e = I("./assets");
99
+ U(e), await this._updateDataModelDeps(), await this._updateArcadeAssistantRemoteState();
96
100
  }
97
101
  willUpdate(e) {
98
102
  (e.has("messages") || e.has("profile")) && this.hasUpdated && this._updateDataModelDeps(), e.has("testData") && this._testDataChanged(), e.has("snippets") && c.updateApiContextForModel(this._modelId, {
@@ -141,7 +145,7 @@ class K extends B {
141
145
  }
142
146
  this._showExecutionPanel = !0, this._executingScript = !0, this._consoleLogs = [], setTimeout(() => void (async () => {
143
147
  const d = this._codeEditorElt.value?.value;
144
- this._executionResult = await v(t.definition, d, e, (n) => setTimeout(() => this._consoleLogs = [...this._consoleLogs, n], 0)), this._executingScript = !1;
148
+ this._executionResult = await x(t.definition, d, e, (n) => setTimeout(() => this._consoleLogs = [...this._consoleLogs, n], 0)), this._executingScript = !1;
145
149
  })(), 0);
146
150
  }
147
151
  _toggleShowExecutionPanel() {
@@ -174,7 +178,7 @@ class K extends B {
174
178
  // An unique identifier for the action.
175
179
  id: "run-script",
176
180
  label: "Run Arcade Expression",
177
- keybindings: [C.F5],
181
+ keybindings: [B.F5],
178
182
  contextMenuGroupId: "code",
179
183
  contextMenuOrder: 1,
180
184
  run: () => {
@@ -197,10 +201,10 @@ class K extends B {
197
201
  return this.testData ? s`<calcite-action-bar class="main-action-bar" layout=horizontal scale=s expanded expand-disabled slot=top-action-bar><calcite-action-group scale=s><calcite-action .text=${this.messages.run ?? ""} text-enabled icon=play scale=s .loading=${this._preparingArcade} @click=${() => void this._executeScript().catch(o(this))}></calcite-action>${this._executionResult ? s`<calcite-action .text=${this.messages.lastresults ?? ""} .active=${this._showExecutionPanel} text-enabled icon=access-string-results icon-flip-rtl scale=s @click=${this._toggleShowExecutionPanel}></calcite-action>` : null}</calcite-action-group></calcite-action-bar>` : null;
198
202
  }
199
203
  renderMainPanel() {
200
- return s`<arcgis-code-editor slot=editor .editorOptions=${this.editorOptions} .language=${c.languageId} .value=${this.script ?? ""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${N(this._codeEditorElt)}></arcgis-code-editor>`;
204
+ return s`<arcgis-code-editor slot=editor .editorOptions=${this.editorOptions} .language=${c.languageId} .value=${this.script ?? ""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${H(this._codeEditorElt)}></arcgis-code-editor>`;
201
205
  }
202
206
  renderAction({ id: e, label: t, icon: d, active: n, panelName: h, iconFlipRtl: p = !1, onClick: u = this._toggleSidePanel }) {
203
- return s`<calcite-action id=${e ?? P} .text=${t} .textEnabled=${this.sideActionBarExpanded} .icon=${d} .active=${n} @click=${u} data-panel-name=${h ?? P} .iconFlipRtl=${p}></calcite-action>${!this.sideActionBarExpanded && s`<calcite-tooltip .referenceElement=${e}><span>${t}</span></calcite-tooltip>` || ""}`;
207
+ return s`<calcite-action id=${e ?? b} .text=${t} .textEnabled=${this.sideActionBarExpanded} .icon=${d} .active=${n} @click=${u} data-panel-name=${h ?? b} .iconFlipRtl=${p}></calcite-action>${!this.sideActionBarExpanded && s`<calcite-tooltip .referenceElement=${e}><span>${t}</span></calcite-tooltip>` || ""}`;
204
208
  }
205
209
  renderSideActionBar() {
206
210
  return this.hideSideBar ? null : s`<calcite-action-bar slot=side-action-bar class="side-action-bar" .expanded=${this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action-group>${this.renderAction({
@@ -247,7 +251,7 @@ class K extends B {
247
251
  if (this.hideSideBar)
248
252
  return null;
249
253
  const { openedSidePanel: e } = this;
250
- return s`<arcgis-language-api-panel slot=side-panel class=${l(e === "api" ? "" : "hidden")} .loading=${this._preparingArcade} .apiLibrary=${this._apiLibrary} .hideDocumentationActions=${this.hideDocumentationActions} @arcgisInternalItemSelected=${this._insertAsSnippet} @arcgisInternalClosePanel=${this._toggleSidePanel} data-panel-name=none .closed=${e !== "api"}></arcgis-language-api-panel><arcgis-editor-variables slot=side-panel class=${l(e === "variables" ? "" : "hidden")} .loading=${this._preparingArcade} .modelId=${this._modelId} @arcgisInternalItemSelected=${this._insertAsText} @arcgisInternalClosePanel=${this._toggleSidePanel} data-panel-name=none .variable=${this._editorProfile} .closed=${e !== "variables"}></arcgis-editor-variables>${this.suggestions?.length && s`<arcgis-arcade-suggestions slot=side-panel class=${l(e === "suggestions" ? "" : "hidden")} .closed=${e !== "suggestions"} .suggestions=${this.suggestions} @arcgisInternalItemSelected=${this._insertAsText} @arcgisInternalClosePanel=${this._toggleSidePanel} data-panel-name=none></arcgis-arcade-suggestions>` || ""}${this.arcadeAssistant && this._arcadeAssistantRemoteState.shouldRender && s`<arcgis-arcade-coding-assistant slot=side-panel class=${l(e === "arcade-assistant" ? "" : "hidden")} .closed=${e !== "arcade-assistant"} .insertText=${this._insertText.bind(this)} .closePanel=${this._toggleSidePanel} .portalUrl=${this.arcadeAssistant.portalUrl} .serviceUrl=${this._arcadeAssistantRemoteState.serviceUrl} .helpBase=${this._arcadeAssistantRemoteState.helpBase} .assistantsEnabled=${this._arcadeAssistantRemoteState.assistantsEnabled} .feedbackServiceUrl=${this._arcadeAssistantRemoteState.feedbackServiceUrl} .editorRef=${this.el} .appVersion=${this.arcadeAssistant.appVersion}></arcgis-arcade-coding-assistant>` || ""}${this.customPanels?.map((t) => s`<calcite-flow slot=side-panel class=${l(e === t.id ? "" : "hidden")}>${t?.useFlows ? t.renderer?.({
254
+ return s`<arcgis-language-api-panel slot=side-panel class=${l(e === "api" ? "" : "hidden")} .loading=${this._preparingArcade} .apiLibrary=${this._apiLibrary} .hideDocumentationActions=${this.hideDocumentationActions} @arcgisInternalItemSelected=${this._insertAsSnippet} @arcgisInternalClosePanel=${this._toggleSidePanel} data-panel-name=none .closed=${e !== "api"}></arcgis-language-api-panel><arcgis-editor-variables slot=side-panel class=${l(e === "variables" ? "" : "hidden")} .loading=${this._preparingArcade} .modelId=${this._modelId} @arcgisInternalItemSelected=${this._insertAsText} @arcgisInternalClosePanel=${this._toggleSidePanel} data-panel-name=none .variable=${this._editorProfile} .closed=${e !== "variables"}></arcgis-editor-variables>${this.suggestions?.length && s`<arcgis-arcade-suggestions slot=side-panel class=${l(e === "suggestions" ? "" : "hidden")} .closed=${e !== "suggestions"} .suggestions=${this.suggestions} @arcgisInternalItemSelected=${this._insertAsText} @arcgisInternalClosePanel=${this._toggleSidePanel} data-panel-name=none></arcgis-arcade-suggestions>` || ""}${this.arcadeAssistant && this._arcadeAssistantRemoteState.shouldRender && s`<arcgis-arcade-coding-assistant slot=side-panel class=${l(e === "arcade-assistant" ? "" : "hidden")} .closed=${e !== "arcade-assistant"} .insertText=${this._insertText.bind(this)} .closePanel=${this._toggleSidePanel} .portalUrl=${this.arcadeAssistant.portalUrl} .serviceUrl=${"serviceUrl" in this._arcadeAssistantRemoteState ? this._arcadeAssistantRemoteState.serviceUrl : void 0} .helpBase=${this._arcadeAssistantRemoteState.helpBase} .assistantsEnabled=${this._arcadeAssistantRemoteState.assistantsEnabled} .feedbackServiceUrl=${this._arcadeAssistantRemoteState.feedbackServiceUrl} .editorRef=${this.el} .appVersion=${this.arcadeAssistant.appVersion}></arcgis-arcade-coding-assistant>` || ""}${this.customPanels?.map((t) => s`<calcite-flow slot=side-panel class=${l(e === t.id ? "" : "hidden")}>${t?.useFlows ? t.renderer?.({
251
255
  closePanel: this._toggleSidePanel,
252
256
  insertText: this._insertText.bind(this),
253
257
  closed: e !== t.id,
@@ -268,7 +272,7 @@ class K extends B {
268
272
  return s`<arcgis-code-editor-shell>${this.renderMainActionBar()}${this.renderMainPanel()}${this.renderResultsPanel()}${this.renderSidePanel()}${this.renderSideActionBar()}</arcgis-code-editor-shell>`;
269
273
  }
270
274
  }
271
- I("arcgis-arcade-editor", K);
275
+ D("arcgis-arcade-editor", K);
272
276
  export {
273
277
  K as ArcgisArcadeEditor
274
278
  };