@arcgis/coding-components 4.33.0-next.97 → 4.33.0-next.99
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.
- package/dist/arcgis-coding-components/4CWG53YG.js +4 -0
- package/dist/arcgis-coding-components/{2H4AMXB4.js.LEGAL.txt → 4CWG53YG.js.LEGAL.txt} +1 -1
- package/dist/arcgis-coding-components/{3SJN4SN4.js → 4KGS45F6.js} +4 -4
- package/dist/arcgis-coding-components/{3SJN4SN4.js.LEGAL.txt → 4KGS45F6.js.LEGAL.txt} +1 -1
- package/dist/arcgis-coding-components/6X6SKMSK.js +4 -0
- package/dist/arcgis-coding-components/{4XII6RJZ.js.LEGAL.txt → 6X6SKMSK.js.LEGAL.txt} +1 -1
- package/dist/arcgis-coding-components/{NZIFN45M.js → AIQ3ZZ4N.js} +2 -2
- package/dist/arcgis-coding-components/{26YT57CB.js → B6RBYOZB.js} +1 -1
- package/dist/arcgis-coding-components/BHPZXDRW.js +4 -0
- package/dist/arcgis-coding-components/{5MXNPLI6.js.LEGAL.txt → BHPZXDRW.js.LEGAL.txt} +1 -1
- package/dist/arcgis-coding-components/{PUQ5D5HM.js → BXIVTWDT.js} +2 -2
- package/dist/arcgis-coding-components/{5MXNPLI6.js → CCHHSGLF.js} +2 -2
- package/dist/arcgis-coding-components/CCHHSGLF.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/{UC366WOZ.js → CLUD6ZAM.js} +2 -2
- package/dist/arcgis-coding-components/CPPMJWU4.js +4 -0
- package/dist/arcgis-coding-components/CPPMJWU4.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/{OPWIC7VC.js → DAIV4YM2.js} +2 -2
- package/dist/arcgis-coding-components/{GBHU7OBT.js → DETRUXO4.js} +2 -2
- package/dist/arcgis-coding-components/DETRUXO4.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/DPLHQRHL.js +4 -0
- package/dist/arcgis-coding-components/{EYTEAFAW.js.LEGAL.txt → DPLHQRHL.js.LEGAL.txt} +1 -1
- package/dist/arcgis-coding-components/EZ46MHBE.js +4 -0
- package/dist/arcgis-coding-components/FBZDECME.js +4 -0
- package/dist/arcgis-coding-components/FBZDECME.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/{ECFYN65T.js → GLZTVDY3.js} +1 -1
- package/dist/arcgis-coding-components/GQYPMHDN.js +8 -0
- package/dist/arcgis-coding-components/GQYPMHDN.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/GTJMQUCR.js +4 -0
- package/dist/arcgis-coding-components/GTJMQUCR.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/{C4H4QEN4.js → H5IXRF6P.js} +2 -2
- package/dist/arcgis-coding-components/{C3TNIXF3.js → HK3NR5FJ.js} +2 -2
- package/dist/arcgis-coding-components/{2EZQB3FZ.js → I6FG6PHA.js} +2 -2
- package/dist/arcgis-coding-components/{KUJRM24I.js → IERFPICF.js} +3 -3
- package/dist/arcgis-coding-components/IERFPICF.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/{JYOMM3GO.js → IGD5JVMO.js} +2 -2
- package/dist/arcgis-coding-components/KE4BOMMR.js +4 -0
- package/dist/arcgis-coding-components/{S4QW43DS.js → LVP37CVZ.js} +2 -2
- package/dist/arcgis-coding-components/{CTZ7LRNS.js → MQ6QSJ3D.js} +1 -1
- package/dist/arcgis-coding-components/MQ6QSJ3D.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/{MPLDQ5TJ.js → NNQQRWM4.js} +2 -2
- package/dist/arcgis-coding-components/{XTHN3CP3.js → OHE2XVBA.js} +2 -2
- package/dist/arcgis-coding-components/OQ3VLBIA.js +4 -0
- package/dist/arcgis-coding-components/OQ3VLBIA.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/PYOJIGHL.js +4 -0
- package/dist/arcgis-coding-components/QCGTZIV7.js +4 -0
- package/dist/arcgis-coding-components/QCGTZIV7.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/{CWEEAXIO.js → S5J3QOAN.js} +2 -2
- package/dist/arcgis-coding-components/S5J3QOAN.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/{WPXHAXAE.js → TSHYFCHO.js} +2 -2
- package/dist/arcgis-coding-components/TSHYFCHO.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/{D76ZNFFX.js → UBQV4SE4.js} +9 -9
- package/dist/arcgis-coding-components/UBQV4SE4.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/{SC7XJB4P.js → WR6DJLNQ.js} +2 -2
- package/dist/arcgis-coding-components/{5B5EFJUZ.js → XJBT377I.js} +3 -3
- package/dist/arcgis-coding-components/{5B5EFJUZ.js.LEGAL.txt → XJBT377I.js.LEGAL.txt} +1 -1
- package/dist/arcgis-coding-components/XPHHHGZH.js +6 -0
- package/dist/arcgis-coding-components/{C6WVU4C3.js.LEGAL.txt → XPHHHGZH.js.LEGAL.txt} +1 -1
- package/dist/arcgis-coding-components/{4XII6RJZ.js → Z5YGU3UZ.js} +2 -2
- package/dist/arcgis-coding-components/Z5YGU3UZ.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/{F72PKZU7.js → Z65637GR.js} +2 -2
- package/dist/arcgis-coding-components/Z65637GR.js.LEGAL.txt +3 -0
- package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
- package/dist/arcgis-coding-components/arcgis-coding-components.esm.js.LEGAL.txt +1 -1
- package/dist/arcgis-coding-components/assets/arcade-coding-assistant/t9n/messages.en.json +1 -0
- package/dist/arcgis-coding-components/assets/code-editor/sql-expr.worker.js +79 -79
- package/dist/chunks/arcade-defaults.js +1 -1
- package/dist/chunks/arcade-executor.js +1 -1
- package/dist/chunks/arcade-mode.js +1 -1
- package/dist/chunks/arcade-service-accessors.js +6 -53
- package/dist/chunks/fields.js +1 -1
- package/dist/chunks/language-defaults-base.js +1 -1
- package/dist/chunks/markdown.js +25 -24
- package/dist/chunks/monaco-importer.js +1 -1
- package/dist/chunks/runtime.js +1 -1
- package/dist/chunks/setup-monaco.js +52 -0
- package/dist/chunks/sql-expr-contribution.js +107 -0
- package/dist/chunks/sql-expr-defaults.js +1 -1
- package/dist/chunks/sql-expr-mode.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/components/arcgis-arcade-coding-assistant/customElement.d.ts +10 -0
- package/dist/components/arcgis-arcade-coding-assistant/customElement.js +26 -0
- package/dist/components/arcgis-arcade-coding-assistant/index.d.ts +1 -0
- package/dist/components/arcgis-arcade-coding-assistant/index.js +1 -0
- package/dist/components/arcgis-arcade-editor/customElement.js +3 -2
- package/dist/components/arcgis-arcade-results/customElement.js +1 -1
- package/dist/components/arcgis-arcade-suggestions/customElement.js +2 -2
- package/dist/components/arcgis-code-editor/customElement.js +33 -113
- package/dist/components/arcgis-editor-variables/customElement.js +1 -1
- package/dist/components/arcgis-language-api-panel/customElement.d.ts +2 -0
- package/dist/components/arcgis-language-api-panel/customElement.js +26 -25
- package/dist/components/arcgis-sql-expression-editor/customElement.js +5 -5
- package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
- package/dist/docs/api.json +2 -2
- package/dist/docs/docs.json +2 -2
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +1 -1
- package/dist/loader.js +3 -2
- package/dist/utils/colorize.d.ts +2 -2
- package/dist/utils/monaco-languages.d.ts +13 -0
- package/dist/utils/profile/types.d.ts +72 -3
- package/package.json +6 -6
- package/dist/arcgis-coding-components/2H4AMXB4.js +0 -4
- package/dist/arcgis-coding-components/BNVT3NFQ.js +0 -8
- package/dist/arcgis-coding-components/BNVT3NFQ.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/C6WVU4C3.js +0 -6
- package/dist/arcgis-coding-components/CTZ7LRNS.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/CWEEAXIO.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/D6FFB266.js +0 -4
- package/dist/arcgis-coding-components/D6FFB266.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/D76ZNFFX.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/EYCFPL7N.js +0 -4
- package/dist/arcgis-coding-components/EYCFPL7N.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/EYTEAFAW.js +0 -4
- package/dist/arcgis-coding-components/F72PKZU7.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/GBHU7OBT.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/HDSXRFUK.js +0 -4
- package/dist/arcgis-coding-components/KUJRM24I.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/LOLIV5RG.js +0 -4
- package/dist/arcgis-coding-components/PNNUXZXD.js +0 -4
- package/dist/arcgis-coding-components/RCLT7GF6.js +0 -4
- package/dist/arcgis-coding-components/RCLT7GF6.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/WPXHAXAE.js.LEGAL.txt +0 -3
- package/dist/arcgis-coding-components/YBE7OOZG.js +0 -4
- package/dist/arcgis-coding-components/YBE7OOZG.js.LEGAL.txt +0 -3
- /package/dist/arcgis-coding-components/{NZIFN45M.js.LEGAL.txt → AIQ3ZZ4N.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{26YT57CB.js.LEGAL.txt → B6RBYOZB.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{PUQ5D5HM.js.LEGAL.txt → BXIVTWDT.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{UC366WOZ.js.LEGAL.txt → CLUD6ZAM.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{OPWIC7VC.js.LEGAL.txt → DAIV4YM2.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{C3TNIXF3.js.LEGAL.txt → EZ46MHBE.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{ECFYN65T.js.LEGAL.txt → GLZTVDY3.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{C4H4QEN4.js.LEGAL.txt → H5IXRF6P.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{HDSXRFUK.js.LEGAL.txt → HK3NR5FJ.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{2EZQB3FZ.js.LEGAL.txt → I6FG6PHA.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{JYOMM3GO.js.LEGAL.txt → IGD5JVMO.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{LOLIV5RG.js.LEGAL.txt → KE4BOMMR.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{S4QW43DS.js.LEGAL.txt → LVP37CVZ.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{MPLDQ5TJ.js.LEGAL.txt → NNQQRWM4.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{XTHN3CP3.js.LEGAL.txt → OHE2XVBA.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{PNNUXZXD.js.LEGAL.txt → PYOJIGHL.js.LEGAL.txt} +0 -0
- /package/dist/arcgis-coding-components/{SC7XJB4P.js.LEGAL.txt → WR6DJLNQ.js.LEGAL.txt} +0 -0
|
@@ -7,7 +7,7 @@ import { u as f } from "../../chunks/useT9n.js";
|
|
|
7
7
|
import { css as m } from "@lit/reactive-element/css-tag.js";
|
|
8
8
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
9
9
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
10
|
-
v4.33.0-next.
|
|
10
|
+
v4.33.0-next.99 */
|
|
11
11
|
const u = m`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2);word-break:break-word}}`;
|
|
12
12
|
function g(l) {
|
|
13
13
|
l.key === "Enter" && l.stopPropagation();
|
|
@@ -5,6 +5,8 @@ import { ApiCategory, ApiItem } from '@arcgis/languages-api-utils';
|
|
|
5
5
|
|
|
6
6
|
/** @private */
|
|
7
7
|
export declare class ArcgisLanguageApiPanel extends LitElement {
|
|
8
|
+
/** The language the panel is rendering */
|
|
9
|
+
languageId: string;
|
|
8
10
|
/** The api library to display */
|
|
9
11
|
apiLibrary: ApiCategory[] | undefined;
|
|
10
12
|
/** Should the documentation action be hidden */
|
|
@@ -1,35 +1,36 @@
|
|
|
1
1
|
import { c as m } from "../../chunks/runtime.js";
|
|
2
|
-
import { ref as
|
|
2
|
+
import { ref as o } from "lit-html/directives/ref.js";
|
|
3
3
|
import { html as s } from "lit";
|
|
4
|
-
import { setFocusOnElement as
|
|
5
|
-
import { LitElement as
|
|
6
|
-
import { g as r, o as
|
|
7
|
-
import { f as
|
|
8
|
-
import { u as
|
|
9
|
-
import { css as
|
|
4
|
+
import { setFocusOnElement as h, addLTRMark as a, focusElement as u } from "@arcgis/components-utils";
|
|
5
|
+
import { LitElement as p, createEvent as c } from "@arcgis/lumina";
|
|
6
|
+
import { g as r, o as f, c as n, a as g } from "../../chunks/markdown.js";
|
|
7
|
+
import { f as _ } from "../../chunks/monaco-importer.js";
|
|
8
|
+
import { u as b } from "../../chunks/useT9n.js";
|
|
9
|
+
import { css as v } from "@lit/reactive-element/css-tag.js";
|
|
10
|
+
import { s as d } from "../../chunks/sql-expr-contribution.js";
|
|
10
11
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
11
12
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
12
|
-
v4.33.0-next.
|
|
13
|
-
const
|
|
14
|
-
class
|
|
13
|
+
v4.33.0-next.99 */
|
|
14
|
+
const y = v`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-block{p:first-of-type{margin-top:0}code{font-family:var(--calcite-code-family)}pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm);code{font-size:var(--calcite-font-size--2)}}}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`;
|
|
15
|
+
class I extends p {
|
|
15
16
|
constructor() {
|
|
16
|
-
super(...arguments), this.messages =
|
|
17
|
+
super(...arguments), this.messages = b(), this._unselectItem = async () => {
|
|
17
18
|
this._selectedApiItem = void 0;
|
|
18
|
-
}, this._colorizeStyle = "", this._filterValue = "", this.hideDocumentationActions = !1, this.loading = !1, this.arcgisClose =
|
|
19
|
+
}, this._colorizeStyle = "", this._filterValue = "", this.languageId = "arcade", this.hideDocumentationActions = !1, this.loading = !1, this.arcgisClose = c({ bubbles: !1 }), this.arcgisItemSelected = c({ bubbles: !1 });
|
|
19
20
|
}
|
|
20
21
|
static {
|
|
21
|
-
this.properties = { _colorizeStyle: 16, _filterValue: 16, _selectedApiItem: 16, apiLibrary: 0, hideDocumentationActions: 5, loading: 5 };
|
|
22
|
+
this.properties = { _colorizeStyle: 16, _filterValue: 16, _selectedApiItem: 16, languageId: 1, apiLibrary: 0, hideDocumentationActions: 5, loading: 5 };
|
|
22
23
|
}
|
|
23
24
|
static {
|
|
24
|
-
this.styles =
|
|
25
|
+
this.styles = y;
|
|
25
26
|
}
|
|
26
27
|
//#endregion
|
|
27
28
|
//#region Lifecycle
|
|
28
|
-
load() {
|
|
29
|
-
this._colorizeStyle = r(), this._themeChangedListener =
|
|
29
|
+
async load() {
|
|
30
|
+
await d(this.languageId), this._colorizeStyle = r(), this._themeChangedListener = f(() => this._colorizeStyle = r());
|
|
30
31
|
}
|
|
31
32
|
willUpdate(e) {
|
|
32
|
-
if (e.has("apiLibrary")) {
|
|
33
|
+
if (e.has("languageId") && d(this.languageId), e.has("apiLibrary")) {
|
|
33
34
|
if (!this._selectedApiItem)
|
|
34
35
|
return;
|
|
35
36
|
for (const i of this.apiLibrary ?? [])
|
|
@@ -52,7 +53,7 @@ class y extends u {
|
|
|
52
53
|
return;
|
|
53
54
|
}
|
|
54
55
|
this._flowObserver || (this._flowObserver = new MutationObserver(() => {
|
|
55
|
-
|
|
56
|
+
h(e.querySelector("calcite-flow-item:last-child"), "calcite-input");
|
|
56
57
|
}), this._flowObserver.observe(e, { attributes: !0, attributeFilter: ["id"], childList: !0 }));
|
|
57
58
|
}
|
|
58
59
|
_emitItemSelected(e, i) {
|
|
@@ -75,24 +76,24 @@ class y extends u {
|
|
|
75
76
|
this._filterValue = e.currentTarget.value ?? "";
|
|
76
77
|
}
|
|
77
78
|
_elementToMarkdown(e) {
|
|
78
|
-
e !== void 0 && (e.innerHTML = n(this._selectedApiItem.examples),
|
|
79
|
+
e !== void 0 && (e.innerHTML = n(this._selectedApiItem.examples), g(e, this.languageId).catch(console.error));
|
|
79
80
|
}
|
|
80
81
|
//#endregion
|
|
81
82
|
//#region Rendering
|
|
82
83
|
renderApiCategory(e) {
|
|
83
|
-
const i =
|
|
84
|
-
return i.length ? s`<calcite-list-item-group .heading=${e.title}>${i.map((t) => s`<calcite-list-item .label=${
|
|
84
|
+
const i = _(e.items, "name", this._filterValue);
|
|
85
|
+
return i.length ? s`<calcite-list-item-group .heading=${e.title}>${i.map((t) => s`<calcite-list-item .label=${a(t.completion.detail)} @calciteListItemSelect=${(l) => this._emitItemSelected(l, t)} @keydown=${(l) => this._emitItemSelected(l, t)}><calcite-action slot=actions-end .text=${this.messages.expand ?? ""} icon=chevron-right icon-flip-rtl scale=s @click=${(l) => this._selectItem(l, t)}></calcite-action></calcite-list-item>`)}</calcite-list-item-group>` : null;
|
|
85
86
|
}
|
|
86
87
|
renderApiItemFlowItem() {
|
|
87
88
|
const e = this._selectedApiItem;
|
|
88
|
-
return e ? s`<calcite-flow-item .heading=${this.messages.constantsandfunctions} .beforeBack=${this._unselectItem} closable @calciteFlowItemClose=${this._emitClose} selected>${this.hideDocumentationActions ? null : s`<calcite-button width=half slot=footer appearance=outline kind=brand scale=s .href=${e.link} target=Help icon-start=information>${this.messages.moreinformation}</calcite-button>`}<calcite-button .width=${this.hideDocumentationActions ? "full" : "half"} slot=footer appearance=outline kind=brand icon-start=code scale=s @click=${(i) => this._emitItemSelectedAndClose(i, e)} ${
|
|
89
|
+
return e ? s`<calcite-flow-item .heading=${this.messages.constantsandfunctions} .beforeBack=${this._unselectItem} closable @calciteFlowItemClose=${this._emitClose} selected>${this.hideDocumentationActions ? null : s`<calcite-button width=half slot=footer appearance=outline kind=brand scale=s .href=${e.link} target=Help icon-start=information>${this.messages.moreinformation}</calcite-button>`}<calcite-button .width=${this.hideDocumentationActions ? "full" : "half"} slot=footer appearance=outline kind=brand icon-start=code scale=s @click=${(i) => this._emitItemSelectedAndClose(i, e)} ${o(u)}>${this.messages.insert}</calcite-button><calcite-block open .heading=${a(e.completion.detail)}><div .innerHTML=${n(e.completion.documentation) ?? ""}></div>${e.examples ? s`<div ${o(this._elementToMarkdown)}></div>` : null}</calcite-block></calcite-flow-item>` : null;
|
|
89
90
|
}
|
|
90
91
|
render() {
|
|
91
92
|
const e = (this.apiLibrary ?? []).map((t) => this.renderApiCategory(t)), i = e.every((t) => !t);
|
|
92
|
-
return s`<style>${this._colorizeStyle}</style><calcite-flow ${
|
|
93
|
+
return s`<style>${this._colorizeStyle}</style><calcite-flow ${o(this.flowFocusHandler)}><calcite-flow-item .heading=${this.messages.constantsandfunctions} closable @calciteFlowItemClose=${this._emitClose} .selected=${!this._selectedApiItem}><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m></calcite-input>${this.loading ? s`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading ?? "Loading"}></calcite-loader>` : s`<calcite-list label="arcade api">${i ? s`<div class="notice-container">${this.messages.noitems}</div>` : e}</calcite-list>`}</calcite-flow-item>${this.renderApiItemFlowItem()}</calcite-flow>`;
|
|
93
94
|
}
|
|
94
95
|
}
|
|
95
|
-
m("arcgis-language-api-panel",
|
|
96
|
+
m("arcgis-language-api-panel", I);
|
|
96
97
|
export {
|
|
97
|
-
|
|
98
|
+
I as ArcgisLanguageApiPanel
|
|
98
99
|
};
|
|
@@ -3,16 +3,16 @@ import { html as i } from "lit";
|
|
|
3
3
|
import { LitElement as s, createEvent as r, noShadowRoot as n } from "@arcgis/lumina";
|
|
4
4
|
import { generateGuid as l } from "@arcgis/components-utils";
|
|
5
5
|
import { a } from "../../chunks/sql-expr-defaults.js";
|
|
6
|
-
import { u as
|
|
7
|
-
import { createRef as
|
|
6
|
+
import { u as d } from "../../chunks/useT9n.js";
|
|
7
|
+
import { createRef as c, ref as p } from "lit-html/directives/ref.js";
|
|
8
8
|
import { css as h } from "@lit/reactive-element/css-tag.js";
|
|
9
9
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
10
10
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
11
|
-
v4.33.0-next.
|
|
11
|
+
v4.33.0-next.99 */
|
|
12
12
|
const g = h`@layer{arcgis-sql-expression-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--arcgis-coding-components-border);box-sizing:border-box;background-color:var(--arcgis-coding-components-background-color);height:100%;.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-panel{flex:1 0 auto}.position-relative{position:relative}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.border-inline-start{border-inline-start:var(--arcgis-coding-components-border);box-sizing:border-box}.border-inline-end{border-inline-end:var(--arcgis-coding-components-border);box-sizing:border-box}.side-action-bar{max-width:var(--arcgis-coding-components-side-action-bar-max-w)}.side-panel{max-width:var(--arcgis-coding-components-side-panel-max-w);width:var(--arcgis-coding-components-side-panel-w);calcite-flow{height:100%}}}}`;
|
|
13
13
|
class f extends s {
|
|
14
14
|
constructor() {
|
|
15
|
-
super(...arguments), this._codeEditorElt =
|
|
15
|
+
super(...arguments), this._codeEditorElt = c(), this.messages = d(), this._modelId = l(), this._preparing = !1, this.sideActionBarExpanded = !1, this.script = "", this.hideSideBar = !1, this.arcgisScriptChange = r({ bubbles: !1 });
|
|
16
16
|
}
|
|
17
17
|
static {
|
|
18
18
|
this.properties = { _activeAction: 16, _apiLibrary: 16, _editorProfile: 16, _preparing: 16, sideActionBarExpanded: 16, profile: 0, script: 1, hideSideBar: 5 };
|
|
@@ -85,7 +85,7 @@ class f extends s {
|
|
|
85
85
|
//#region Rendering
|
|
86
86
|
render() {
|
|
87
87
|
const e = this._getFeatureSetVariable();
|
|
88
|
-
return i`<div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable"><arcgis-code-editor language=arcgis-sql-expression .modelId=${this._modelId} .value=${this.script ?? ""} @arcgisValueChange=${this._onCodeEditorValueChange} ${p(this._codeEditorElt)}></arcgis-code-editor></div>${this._activeAction === "fields" && !this.hideSideBar && i`<arcgis-editor-variables .variable=${e} class="side-panel flex-panel border-inline-start" .loading=${this._preparing} .modelId=${this._modelId} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${() => this._setActiveAction(void 0)} data-panel-name=none></arcgis-editor-variables>` || ""}${this._activeAction === "functions" && !this.hideSideBar && i`<arcgis-language-api-panel class="side-panel flex-panel border-inline-start" @arcgisItemSelected=${this._insertAsSnippet} @arcgisClose=${() => this._setActiveAction(void 0)} .loading=${this._preparing} .apiLibrary=${this._apiLibrary} data-panel-name=none hide-documentation-actions></arcgis-language-api-panel>` || ""}${!this.hideSideBar && i`<calcite-action-bar class="side-action-bar border-inline-start" .expanded=${this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action id=fields-action .text=${this.messages.fields ?? "Fields"} icon=profile-variables .active=${this._activeAction === "fields"} data-panel-name=fields @click=${this._handleActionClick}></calcite-action>${!this.sideActionBarExpanded && i`<calcite-tooltip reference-element=fields-action><span>${this.messages.fields ?? "Fields"}</span></calcite-tooltip>` || ""}<calcite-action id=functions-action .text=${this.messages.functions ?? "Functions"} icon=function .active=${this._activeAction === "functions"} data-panel-name=functions @click=${this._handleActionClick}></calcite-action>${!this.sideActionBarExpanded && i`<calcite-tooltip reference-element=functions-action><span>${this.messages.functions ?? "Functions"}</span></calcite-tooltip>` || ""}</calcite-action-bar>` || ""}</div>`;
|
|
88
|
+
return i`<div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable"><arcgis-code-editor language=arcgis-sql-expression .modelId=${this._modelId} .value=${this.script ?? ""} @arcgisValueChange=${this._onCodeEditorValueChange} ${p(this._codeEditorElt)}></arcgis-code-editor></div>${this._activeAction === "fields" && !this.hideSideBar && i`<arcgis-editor-variables .variable=${e} class="side-panel flex-panel border-inline-start" .loading=${this._preparing} .modelId=${this._modelId} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${() => this._setActiveAction(void 0)} data-panel-name=none></arcgis-editor-variables>` || ""}${this._activeAction === "functions" && !this.hideSideBar && i`<arcgis-language-api-panel class="side-panel flex-panel border-inline-start" @arcgisItemSelected=${this._insertAsSnippet} @arcgisClose=${() => this._setActiveAction(void 0)} .loading=${this._preparing} .apiLibrary=${this._apiLibrary} data-panel-name=none hide-documentation-actions .languageId=${a.languageId}></arcgis-language-api-panel>` || ""}${!this.hideSideBar && i`<calcite-action-bar class="side-action-bar border-inline-start" .expanded=${this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action id=fields-action .text=${this.messages.fields ?? "Fields"} icon=profile-variables .active=${this._activeAction === "fields"} data-panel-name=fields @click=${this._handleActionClick}></calcite-action>${!this.sideActionBarExpanded && i`<calcite-tooltip reference-element=fields-action><span>${this.messages.fields ?? "Fields"}</span></calcite-tooltip>` || ""}<calcite-action id=functions-action .text=${this.messages.functions ?? "Functions"} icon=function .active=${this._activeAction === "functions"} data-panel-name=functions @click=${this._handleActionClick}></calcite-action>${!this.sideActionBarExpanded && i`<calcite-tooltip reference-element=functions-action><span>${this.messages.functions ?? "Functions"}</span></calcite-tooltip>` || ""}</calcite-action-bar>` || ""}</div>`;
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
o("arcgis-sql-expression-editor", f);
|
|
@@ -7,7 +7,7 @@ import { u as m } from "../../chunks/useT9n.js";
|
|
|
7
7
|
import { css as d } from "@lit/reactive-element/css-tag.js";
|
|
8
8
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
9
9
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
10
|
-
v4.33.0-next.
|
|
10
|
+
v4.33.0-next.99 */
|
|
11
11
|
const h = d`:host{calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`;
|
|
12
12
|
class f extends r {
|
|
13
13
|
constructor() {
|
package/dist/docs/api.json
CHANGED
package/dist/docs/docs.json
CHANGED
package/dist/docs/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@arcgis/coding-components",
|
|
4
|
-
"version": "4.33.0-next.
|
|
4
|
+
"version": "4.33.0-next.99",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { a as c } from "./chunks/arcade-defaults.js";
|
|
|
3
3
|
import { s as p } from "./chunks/sql-expr-defaults.js";
|
|
4
4
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
5
5
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
6
|
-
v4.33.0-next.
|
|
6
|
+
v4.33.0-next.99 */
|
|
7
7
|
const a = s, r = t;
|
|
8
8
|
export {
|
|
9
9
|
c as arcade,
|
package/dist/loader.js
CHANGED
|
@@ -2,14 +2,15 @@ import { r as e } from "./chunks/runtime.js";
|
|
|
2
2
|
import { makeDefineCustomElements as i } from "@arcgis/lumina";
|
|
3
3
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
4
4
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
5
|
-
v4.33.0-next.
|
|
5
|
+
v4.33.0-next.99 */
|
|
6
6
|
const o = i(e, {
|
|
7
|
+
"arcgis-arcade-coding-assistant": [() => import("./components/arcgis-arcade-coding-assistant/customElement.js")],
|
|
7
8
|
"arcgis-arcade-editor": [() => import("./components/arcgis-arcade-editor/customElement.js"), "customPanels:,editorInstance:,editorOptions:,hideDocumentationActions,hideSideBar,openedSidePanel:,profile:,script,sideActionBarExpanded,snippets:,suggestions:,testData:;getEditorInstance,getScript,getTestResult,setFocus"],
|
|
8
9
|
"arcgis-arcade-results": [() => import("./components/arcgis-arcade-results/customElement.js"), "consoleLogs:,loading,openedResultPanel,result:"],
|
|
9
10
|
"arcgis-arcade-suggestions": [() => import("./components/arcgis-arcade-suggestions/customElement.js"), "suggestions:"],
|
|
10
11
|
"arcgis-code-editor": [() => import("./components/arcgis-code-editor/customElement.js"), "editorInstance:,editorOptions:,language,modelId,value;getEditorInstance,getValue,insertSnippet,insertText,setFocus,setValue"],
|
|
11
12
|
"arcgis-editor-variables": [() => import("./components/arcgis-editor-variables/customElement.js"), "loading,modelId,variable:"],
|
|
12
|
-
"arcgis-language-api-panel": [() => import("./components/arcgis-language-api-panel/customElement.js"), "apiLibrary:,hideDocumentationActions,loading"],
|
|
13
|
+
"arcgis-language-api-panel": [() => import("./components/arcgis-language-api-panel/customElement.js"), "apiLibrary:,hideDocumentationActions,languageId,loading"],
|
|
13
14
|
"arcgis-sql-expression-editor": [() => import("./components/arcgis-sql-expression-editor/customElement.js"), "hideSideBar,profile:,script"],
|
|
14
15
|
"arcgis-sql-expression-fields": [() => import("./components/arcgis-sql-expression-fields/customElement.js"), "loading,modelId"]
|
|
15
16
|
});
|
package/dist/utils/colorize.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IDisposable } from 'monaco-editor';
|
|
2
|
-
export declare function colorizedAllCodeElements(e: HTMLElement): Promise<void>;
|
|
3
|
-
export declare function colorizeCodeElement(e: Element | null | undefined, text: string | null | undefined): Promise<void>;
|
|
2
|
+
export declare function colorizedAllCodeElements(e: HTMLElement, languageId: string): Promise<void>;
|
|
3
|
+
export declare function colorizeCodeElement(e: Element | null | undefined, text: string | null | undefined, languageId: string): Promise<void>;
|
|
4
4
|
export declare function generateColorizeStyles(): string;
|
|
5
5
|
export declare function onColorizeThemeChanged(func: () => void): IDisposable;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* helper to track the languages that have been encountered in monaco-editor.
|
|
3
|
+
* Useful for wrapping callbacks passed to monaco's languages.onLanguage function.
|
|
4
|
+
* See arcade-contribution for usage.
|
|
5
|
+
*/
|
|
6
|
+
export declare function withLanguageTracking(languageId: string, registerCallback: () => void): () => void;
|
|
7
|
+
/**
|
|
8
|
+
* Sets up the language in the editor outside of the editor.
|
|
9
|
+
* This is useful for when the editor is not present, but we still want to use the language features, like theming.
|
|
10
|
+
* We do this by creating a model with the languageId and then disposing of it.
|
|
11
|
+
* See usage in {@link ArcgisLanguageApiPanel}.
|
|
12
|
+
*/
|
|
13
|
+
export declare function setupLanguageOutsideEditor(languageId: string): Promise<void>;
|
|
@@ -1,10 +1,78 @@
|
|
|
1
1
|
/// <reference types="@arcgis/core/interfaces.d.ts" />
|
|
2
2
|
import { BundleType, ApiItem, ApiVariableType, ProfileId } from '@arcgis/languages-api-utils';
|
|
3
|
-
|
|
3
|
+
declare const profileStrings: (value: {
|
|
4
|
+
layer: string;
|
|
5
|
+
featureservice: string;
|
|
6
|
+
mapservice: string;
|
|
7
|
+
map: string;
|
|
8
|
+
webmap: string;
|
|
9
|
+
webscene: string;
|
|
10
|
+
webmapformat: string;
|
|
11
|
+
item: string;
|
|
12
|
+
invoking: string;
|
|
13
|
+
fields: string;
|
|
14
|
+
values: string;
|
|
15
|
+
relationships: string;
|
|
16
|
+
layers: string;
|
|
17
|
+
tables: string;
|
|
18
|
+
geometry: string;
|
|
19
|
+
dictionary: string;
|
|
20
|
+
feature: string;
|
|
21
|
+
featureset: string;
|
|
22
|
+
featuresetcollection: string;
|
|
23
|
+
oid: string;
|
|
24
|
+
number: string;
|
|
25
|
+
string: string;
|
|
26
|
+
date: string;
|
|
27
|
+
blob: string;
|
|
28
|
+
raster: string;
|
|
29
|
+
guid: string;
|
|
30
|
+
"global-id": string;
|
|
31
|
+
xml: string;
|
|
32
|
+
function: string;
|
|
33
|
+
domainvalues: string;
|
|
34
|
+
subtypes: string;
|
|
35
|
+
domainvaluesfortypeformat: string;
|
|
36
|
+
domainvaluesbysubtypes: string;
|
|
37
|
+
}) => {
|
|
38
|
+
layer: string;
|
|
39
|
+
featureservice: string;
|
|
40
|
+
mapservice: string;
|
|
41
|
+
map: string;
|
|
42
|
+
webmap: string;
|
|
43
|
+
webscene: string;
|
|
44
|
+
webmapformat: string;
|
|
45
|
+
item: string;
|
|
46
|
+
invoking: string;
|
|
47
|
+
fields: string;
|
|
48
|
+
values: string;
|
|
49
|
+
relationships: string;
|
|
50
|
+
layers: string;
|
|
51
|
+
tables: string;
|
|
52
|
+
geometry: string;
|
|
53
|
+
dictionary: string;
|
|
54
|
+
feature: string;
|
|
55
|
+
featureset: string;
|
|
56
|
+
featuresetcollection: string;
|
|
57
|
+
oid: string;
|
|
58
|
+
number: string;
|
|
59
|
+
string: string;
|
|
60
|
+
date: string;
|
|
61
|
+
blob: string;
|
|
62
|
+
raster: string;
|
|
63
|
+
guid: string;
|
|
64
|
+
"global-id": string;
|
|
65
|
+
xml: string;
|
|
66
|
+
function: string;
|
|
67
|
+
domainvalues: string;
|
|
68
|
+
subtypes: string;
|
|
69
|
+
domainvaluesfortypeformat: string;
|
|
70
|
+
domainvaluesbysubtypes: string;
|
|
71
|
+
};
|
|
4
72
|
/**
|
|
5
73
|
* The editor profile strings.
|
|
6
74
|
*/
|
|
7
|
-
export type ProfileStrings = typeof
|
|
75
|
+
export type ProfileStrings = ReturnType<typeof profileStrings>;
|
|
8
76
|
/**
|
|
9
77
|
* Editor Profile definition used for configuring the editor:
|
|
10
78
|
* - presenting to the user the Arcade API
|
|
@@ -226,7 +294,7 @@ export interface IPredefinedProfile {
|
|
|
226
294
|
*/
|
|
227
295
|
hiddenApiItems?: string[];
|
|
228
296
|
}
|
|
229
|
-
export type IndexedProfileStrings = Record<string, string | undefined
|
|
297
|
+
export type IndexedProfileStrings = ProfileStrings & Record<string, string | undefined>;
|
|
230
298
|
/**
|
|
231
299
|
* Describe the support source for some of the editor variables.
|
|
232
300
|
*/
|
|
@@ -340,3 +408,4 @@ export interface LayerInfo {
|
|
|
340
408
|
export interface IExtendedPredefinedProfile extends IPredefinedProfile {
|
|
341
409
|
additionalVariables?: IProfileVariable[];
|
|
342
410
|
}
|
|
411
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/coding-components",
|
|
3
|
-
"version": "4.33.0-next.
|
|
3
|
+
"version": "4.33.0-next.99",
|
|
4
4
|
"description": "Contains components for editing code in different languages. The currently supported languages are html, css, json, TypeScript, JavaScript, and Arcade.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ArcGIS",
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
],
|
|
38
38
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@arcgis/arcade-languageservice": "4.33.0-next.
|
|
41
|
-
"@arcgis/components-utils": "4.33.0-next.
|
|
42
|
-
"@arcgis/core-adapter": "4.33.0-next.
|
|
43
|
-
"@arcgis/languages-api-utils": "4.33.0-next.
|
|
44
|
-
"@arcgis/lumina": "4.33.0-next.
|
|
40
|
+
"@arcgis/arcade-languageservice": "4.33.0-next.99",
|
|
41
|
+
"@arcgis/components-utils": "4.33.0-next.99",
|
|
42
|
+
"@arcgis/core-adapter": "4.33.0-next.99",
|
|
43
|
+
"@arcgis/languages-api-utils": "4.33.0-next.99",
|
|
44
|
+
"@arcgis/lumina": "4.33.0-next.99",
|
|
45
45
|
"monaco-editor": "^0.52.0",
|
|
46
46
|
"tslib": "^2.7.0",
|
|
47
47
|
"vscode-languageserver-types": "^3.17.5"
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
3
|
-
v4.33.0-next.97 */
|
|
4
|
-
import{a as h,b as g}from"./NZIFN45M.js";import{a as p}from"./GBHU7OBT.js";import"./HDSXRFUK.js";import{a}from"./CWEEAXIO.js";import"./3SJN4SN4.js";import"./26YT57CB.js";import"./CTZ7LRNS.js";import"./5B5EFJUZ.js";import"./UC366WOZ.js";import{D as l,h as r,k as n,m as c,n as e,z as d}from"./C6WVU4C3.js";import{h as s}from"./LOLIV5RG.js";import"./XTHN3CP3.js";import"./ECFYN65T.js";var f=n`@layer{arcgis-sql-expression-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--arcgis-coding-components-border);box-sizing:border-box;background-color:var(--arcgis-coding-components-background-color);height:100%;.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-panel{flex:1 0 auto}.position-relative{position:relative}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.border-inline-start{border-inline-start:var(--arcgis-coding-components-border);box-sizing:border-box}.border-inline-end{border-inline-end:var(--arcgis-coding-components-border);box-sizing:border-box}.side-action-bar{max-width:var(--arcgis-coding-components-side-action-bar-max-w)}.side-panel{max-width:var(--arcgis-coding-components-side-panel-max-w);width:var(--arcgis-coding-components-side-panel-w);calcite-flow{height:100%}}}}`,o=class extends d{constructor(){super(...arguments),this._codeEditorElt=h(),this.messages=p(),this._modelId=s(),this._preparing=!1,this.sideActionBarExpanded=!1,this.script="",this.hideSideBar=!1,this.arcgisScriptChange=r({bubbles:!1})}static{this.properties={_activeAction:16,_apiLibrary:16,_editorProfile:16,_preparing:16,sideActionBarExpanded:16,profile:0,script:1,hideSideBar:5}}static{this.shadowRootOptions=c}static{this.styles=f}async load(){await this._updateEditorProfile().catch(console.error)}willUpdate(i){(i.has("messages")||i.has("profile"))&&this._updateDataModelDeps()}async _updateDataModelDeps(){await this._updateEditorProfile(),await this._updateApiLibrary()}async _updateEditorProfile(){this._preparing=!0;try{await a.setProfileForModel(this._modelId,this.profile,{locale:this.messages._t9nLocale}),this._editorProfile=a.getEditorProfileForModel(this._modelId)}catch{this._editorProfile=void 0}finally{this._preparing=!1}}_setActiveAction(i){if(this._activeAction===i){this._activeAction=void 0;return}this._activeAction=i}_handleActionClick(i){let t=i.target;this._setActiveAction(t.dataset.panelName)}_insertAsSnippet(i){this._codeEditorElt.value?.insertSnippet(i.detail).catch(console.error)}_insertAsText(i){this._codeEditorElt.value?.insertText(i.detail.replaceAll('"',"'")).catch(console.error)}async _updateApiLibrary(){this._apiLibrary=await a.getApiLibraryForModel(this._modelId)}_onCodeEditorValueChange(i){i.stopPropagation(),this.script=i.detail,this.arcgisScriptChange.emit(i.detail)}_getFeatureSetVariable(){let i,t=a.getEditorProfileForModel(this._modelId);return t?.variables?.length&&t?.variables?.[0]?.type!=="featureSet"?console.error("encountered unexpected editor profile"):i=t?.variables?.[0],i}_toggleSideActionBarExpanded(){this.sideActionBarExpanded=!this.sideActionBarExpanded}render(){let i=this._getFeatureSetVariable();return e`<div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable"><arcgis-code-editor language=arcgis-sql-expression .modelId=${this._modelId} .value=${this.script??""} @arcgisValueChange=${this._onCodeEditorValueChange} ${g(this._codeEditorElt)}></arcgis-code-editor></div>${this._activeAction==="fields"&&!this.hideSideBar&&e`<arcgis-editor-variables .variable=${i} class="side-panel flex-panel border-inline-start" .loading=${this._preparing} .modelId=${this._modelId} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${()=>this._setActiveAction(void 0)} data-panel-name=none></arcgis-editor-variables>`||""}${this._activeAction==="functions"&&!this.hideSideBar&&e`<arcgis-language-api-panel class="side-panel flex-panel border-inline-start" @arcgisItemSelected=${this._insertAsSnippet} @arcgisClose=${()=>this._setActiveAction(void 0)} .loading=${this._preparing} .apiLibrary=${this._apiLibrary} data-panel-name=none hide-documentation-actions></arcgis-language-api-panel>`||""}${!this.hideSideBar&&e`<calcite-action-bar class="side-action-bar border-inline-start" .expanded=${this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action id=fields-action .text=${this.messages.fields??"Fields"} icon=profile-variables .active=${this._activeAction==="fields"} data-panel-name=fields @click=${this._handleActionClick}></calcite-action>${!this.sideActionBarExpanded&&e`<calcite-tooltip reference-element=fields-action><span>${this.messages.fields??"Fields"}</span></calcite-tooltip>`||""}<calcite-action id=functions-action .text=${this.messages.functions??"Functions"} icon=function .active=${this._activeAction==="functions"} data-panel-name=functions @click=${this._handleActionClick}></calcite-action>${!this.sideActionBarExpanded&&e`<calcite-tooltip reference-element=functions-action><span>${this.messages.functions??"Functions"}</span></calcite-tooltip>`||""}</calcite-action-bar>`||""}</div>`}};l("arcgis-sql-expression-editor",o);export{o as ArcgisSqlExpressionEditor};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
3
|
-
v4.33.0-next.97 */
|
|
4
|
-
import{a as T,b as M,c as j,d as m,e as A,f as F,g as $}from"./3SJN4SN4.js";import{b as f,c as d,d as l}from"./26YT57CB.js";import{f as v}from"./CTZ7LRNS.js";import{E as u}from"./C6WVU4C3.js";import{i as h,j as g,w as k,x}from"./LOLIV5RG.js";function L(){return!!window.MonacoEnvironment?.getWorkerUrl}var V=new Map;function G(e){L()||(window.MonacoEnvironment={getWorker:async(n,t)=>{let a=V.get(t)??`${e}/code-editor/editor.worker.js`;switch(t){case"json":a=`${e}/code-editor/json.worker.js`;break;case"css":a=`${e}/code-editor/css.worker.js`;break;case"html":a=`${e}/code-editor/html.worker.js`;break;case"typescript":case"javascript":a=`${e}/code-editor/ts.worker.js`;break;case"arcade":a=`${e}/code-editor/arcade.worker.js`;break;case"arcgis-sql-expression":a=`${e}/code-editor/sql-expr.worker.js`;break}if(!x(a)||k(a,globalThis.location.href,!0))return new Worker(a,{name:t});let r=await(await v())(a,{responseType:"text"});return new Worker(URL.createObjectURL(new Blob([r.data],{type:"text/javascript"})))}})}async function z(){return(await E()).getArcadeDiagnosticService()}async function E(){return await import("./F72PKZU7.js")}async function D(e){let{apiVersion:n,bundles:t,hiddenApiItems:a}=e.toEditorProfileDefinition(),r=await P(e.dictionaryVariables);return{apiVersion:n,bundles:t,variables:r,hiddenApiItems:a?.map(i=>i.toLowerCase())}}async function P(e,n=f.Variable){return await Promise.all(e.map(async t=>{switch(t.type){case"dictionary":return await R(t,n);case"feature":return await C(t,n);default:return S(t,n)}}))}function S(e,n){let{name:t,type:a}=e,r=e.getDescription();return{name:t,description:r,type:a,completion:{label:t,detail:t,insertText:t,insertTextMode:l.asIs,insertTextFormat:d.PlainText,kind:n,documentation:{kind:"markdown",value:r}}}}async function C(e,n){let t=await e.loadSource(),{name:a}=e,r=e.getDescription(),i={label:a,detail:a,insertText:a,insertTextMode:l.asIs,insertTextFormat:d.PlainText,kind:n},s={name:a,description:r,type:"dictionary",properties:[],completion:i};if(!t)return s;let[o,c]=A(t.fields,r,!0);return s.properties=o,i.documentation={kind:"markdown",value:c},s}async function R(e,n){let{name:t,dictionaryVariables:a}=e,r=e.getDescription(),i=a.reduce((s,o)=>{s!==""&&(s+=`
|
|
5
|
-
|
|
6
|
-
`),s+=`**${o.name}**
|
|
7
|
-
${o.type}`;let c=o.getDescription();return c&&(s+=`
|
|
8
|
-
${c}`),s},r);return{name:t,description:r,type:"dictionary",properties:await P(a,f.Field),completion:{label:t,detail:t,insertText:t,insertTextMode:l.asIs,insertTextFormat:d.PlainText,kind:n,documentation:{kind:"markdown",value:i}}}}async function y(e="en"){let n=I.get(e);if(n)return n;if(!h.has(e))return await y("en");try{let t=await fetch(u(`./assets/arcade-language/profiles/arcade-profiles.t9n.${e}.json`));return t.ok?U(e,await t.json()):e==="en"?null:await y("en")}catch{return null}}var I=new Map;function U(e,n){let t=new Map;return n.forEach(a=>{t.set(a.id,a)}),I.set(e,t),t}async function W(e,n="en"){return(await y(n))?.get(e)??null}function q(e){return!!e&&typeof e=="object"&&"additionalVariables"in e&&Array.isArray(e.additionalVariables)}function K(e){return e?.map(w)}function w(e){switch(e.type){case"dictionary":return{...e,type:e.type,properties:K(e.properties)};case"array":return{...e,type:e.type,elementType:{type:"number",name:"number"}};default:return{...e,type:e.type}}}async function O(e,n="en"){if(!m(e))return;let t=await W(e.id,n);if(!t)return;let a={bundles:[...t.bundles],variables:[],hiddenApiItems:e.hiddenApiItems?.map(r=>r.toLowerCase())};return t.variables.forEach(r=>{if(e.disabledVariables?.includes(r.name))return;let i=e.definitions[r.name];switch(r.type){case"dictionary":return a.variables.push(w({...r,type:r.type,properties:Array.isArray(i)?[...i]:r.properties}));case"feature":case"voxel":return T(i)?a.variables.push({...r,type:"feature",definition:i}):void 0;case"featureSet":return M(i)?a.variables.push({...r,type:r.type,definition:i}):void 0;case"featureSetCollection":return j(i)?a.variables.push({...r,type:r.type,definition:i}):void 0;default:return a.variables.push(w(r))}}),q(e)&&a.variables.push(...e.additionalVariables??[]),a}var b=class extends ${constructor(){super("arcade",{apiPath:"./assets/arcade-language/api",apiPrefix:"arcade-api.t9n."})}async setProfileForModel(n,t,a={locale:"en"}){m(t)&&(t=await O(t,a.locale));let r=await g(a.locale,u("./assets/editor-profile/t9n"),"messages.");if(!r)throw new Error(`Failed to load the language bundle for ${a.locale}`);this.disposeForModel(n);let i=this._getApiKey(n),s=new F(t,r);this._modelToProfileMap.set(i,s);let o=await D(s);this.updateApiContextForModel(n,{locale:a.locale,profile:o,snippets:a.snippets})}},p=new b,Y={setProfileForModel:p.setProfileForModel.bind(p),getApiLibraryForModel:p.getApiLibraryForModel.bind(p)};export{G as a,z as b,E as c,p as d};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
3
|
-
v4.33.0-next.97 */
|
|
4
|
-
import{a as b,f as u,g as W,r as X,s as jt,u as Vt}from"./LOLIV5RG.js";var st=Symbol.for("controller");var $e=s=>typeof s=="object"&&s!==null&&(st in s||"hostConnected"in s||"hostDisconnected"in s||"hostUpdate"in s||"hostUpdated"in s);function _s(s){return typeof s?.then=="function"}var z;function M(s){z!==s&&(z=s,queueMicrotask(()=>{z===s&&(z=void 0)}))}function q(s){return z}var L=[];function Ae(s){if(s===void 0){L=[];return}let t=L.indexOf(s);L=t===-1?[...L,s]:L.slice(0,t+1),queueMicrotask(()=>{L=[]})}function we(){return L}var I;function Es(s){I!==s&&(I=s,queueMicrotask(()=>{I===s&&(I=void 0)}))}function xe(){let s=I;return I=void 0,s}var Oe=async(s,t)=>{let e=Et(s);if(e===void 0)return s;if(await e.ready,typeof t=="function"){let o=e.watchExports(n=>t(n,o))}return e.exports},Se=async s=>{let t=Et(s);return await t.ready,t},Et=s=>{let e=q().manager.internals.resolveExports(s);if(e!==void 0)return e;if($e(s))return s;let o=xe();if(o!==void 0)return o},gt={setter:!1,getter:!1,readOnly:!1},B=new WeakMap;function Le(s,t,e){let o=Object.keys(s),n=o.length;j===void 0&&queueMicrotask(ot),j??=new Map;let i=j.get(s);return i===void 0&&(i={callbacks:[],keyCount:n},j.set(s,i)),i.keyCount!==n&&(i.callbacks.forEach(r=>r(o)),i.callbacks=[],i.keyCount=n),i.callbacks.push(r=>{let c=l=>u(t,null,l),a=r[n];a===void 0?c(void 0):s[a]===e?c(a):c(void 0)}),e}var j;function ot(){Array.from(j?.entries()??[]).forEach(([s,{callbacks:t}])=>{let e=Object.keys(s);t.forEach(o=>o(e))}),j=void 0}var zt=(s=>(s[s.String=1]="String",s[s.Number=2]="Number",s[s.Boolean=4]="Boolean",s[s.Any=8]="Any",s[s.Unknown=16]="Unknown",s[s.State=32]="State",s[s.Method=64]="Method",s[s.Event=128]="Event",s[s.Element=256]="Element",s[s.ReflectAttr=512]="ReflectAttr",s[s.Mutable=1024]="Mutable",s[s.Prop=31]="Prop",s[s.HasAttribute=15]="HasAttribute",s[s.PropLike=63]="PropLike",s[s.ReadOnly=2048]="ReadOnly",s))(zt||{});function Bt(s,t){if(t){let e=s.constructor.elementProperties;s.manager.internals.members=Object.fromEntries(Array.from(e,([o,n])=>n.noAccessor?void 0:[o,[(n.readOnly?2048:0)|(n.state?32:16)]]).filter(Vt))}else{let e=s.constructor,o=e.__registerControllers?.(s)??void 0;if(e.__registerControllers=void 0,typeof o!="object")throw new Error("Failed to retrieve component meta");s.manager.internals.members=Object.fromEntries(Object.entries(o).filter(([n,[i]])=>(i&63)!==0))}}function Pe(s,t=8){return s==null||typeof s=="object"||typeof s=="function"?s:t&4?s==="false"?!1:s===""||!!s:t&2?Number.parseFloat(s):t&1?String(s):s}var ke=(s,t)=>s.manager.internals.members?.[t]?.[0],et=class{constructor(t){this.enabledWatchers={},this.allWatchers={},this.enableReadonly=()=>{if(this.enableReadonly=void 0,!this.component.manager.isLit)return;let e=this.component.manager.internals;Object.entries(e.members).forEach(([o,[n]])=>{n&zt.ReadOnly&&(e.setters[o]??=[],e.setters[o].push(e.readonlySetter))})},this.trackedValue=bt,this.keyTrackers=[],this.getters={},this.setters={},this.accessorGetter={},this.accessorSetter={},this._exports=new WeakMap,this.readonlySetter=(e,o,n)=>{if(gt.readOnly)return e;throw new Error(`Cannot assign to read-only property "${n}" of ${this.component.el.localName}. Trying to assign "${String(e)}"`)},this.component=t}firePropTrackers(t,e){let o=this.keyTrackers;this.trackedValue=bt,this.keyTrackers=[],o.forEach(n=>n(t,e))}getSetProxy(t){let e=this.component,o=e.constructor.prototype;if(this._getSetProxy(o,t,"class"),e.manager.isLit)return;let n=e.el.constructor.prototype;o!==n&&this._getSetProxy(n,t,"html")}_getSetProxy(t,e,o){let n=this.component,i=ke(n,e),r;do r=Object.getOwnPropertyDescriptor(t,e);while(!r&&(t=Object.getPrototypeOf(t)));if(!r)return;let c=r.get,a=r.set,l=tt in c,d=tt in a;if(l&&d)return;let h=!l,m=!d,g=h?function(){let v=c.call(this),E=B.get(this);if(gt.getter||E===void 0)return v;let U=E.manager.internals;v=U.accessorGetter[e](v,e);let y=U.getters[e]??vt;for(let C=0;C<y.length;C++)v=y[C](v,e);return v}:c,S=m?function(v){let E=c.call(this),U=B.get(this);if(U===void 0){a.call(this,v);return}let y=U.manager.isLit?v??void 0:Pe(v,i),C=U.manager.internals;if(y===E)a.call(this,y);else{let It=gt.setter?vt:C.setters[e]??vt;for(let H=0;H<It.length&&(y=It[H](y,E,e),y!==E);H++);y=C.accessorSetter[e](y,E,e),a.call(this,y),y!==E&&C.enabledWatchers[e]?.forEach(H=>H(y,E,e))}C.keyTrackers.length>0&&C?.firePropTrackers(e,v)}:a;h&&(g[tt]=!0),m&&(S[tt]=!0),Object.defineProperty(t,e,{...r,get:g,set:S})}markExports(t,e){(typeof e=="object"&&e!==null||typeof e=="function")&&this._exports.set(e,t)}resolveExports(t){if(typeof t=="object"&&t!==null||typeof t=="function")return this._exports.get(t)}},vt=[],tt=Symbol(),bt=Symbol();function De(s,t,e){let o=s.manager.internals;return o.trackedValue!==bt&&o.trackedValue!==e&&o.firePropTrackers(void 0,void 0),o.keyTrackers.length===0&&queueMicrotask(()=>o.firePropTrackers(void 0,void 0)),o.trackedValue=e,o.keyTrackers.push((n,i)=>u(t,void 0,e===i?n:void 0)),e}function Te(s=[q(),...we()],t,e){let o=Array.isArray(s)?s:[s],n=o.length+1,i=c=>{n-=1,c!==void 0&&(n=Math.min(n,0)),n===0&&t(c)};o.forEach(c=>Le(c,a=>i(a===void 0?void 0:{key:a,host:c,isReactive:!1}),e));let r=o.find(c=>"manager"in c&&typeof c.manager=="object"&&c.manager.component===c);return r&&De(r,c=>i(c===void 0?void 0:{key:c,host:r,isReactive:!0}),e),e}var Ne=(s="",t={},e=q())=>{let o={emit:n=>{s===""&&ot();let i=new CustomEvent(s,{detail:n,cancelable:!0,bubbles:!0,composed:!0,...t});return e.el.dispatchEvent(i),i}};return s===""&&Te(void 0,n=>{s=n.key},o),o},Re=Ne.bind(null,""),qt;qt=st;var _t=class{constructor(t){this._callbacks={hostConnected:[],hostDisconnected:[],hostLoad:[],hostLoaded:[],hostUpdate:[],hostUpdated:[],hostDestroy:[],hostLifecycle:[]},this._ready=new b,this._lifecycleCleanups=[],this.connectedCalled=!1,this._loadCalled=!1,this.loadedCalled=!1,this[qt]=!0,this.ready=this._ready.promise,this._exports=Wt(this),this._exportWatchers=new Set;let e=t??q(new.target.name);this.component=e,this.component.addController(this),this.component.manager===void 0||(Ae(this),queueMicrotask(()=>this.catchUpLifecycle()))}catchUpLifecycle(){let{manager:t}=this.component;t.connectedCalled&&!this.connectedCalled&&this.triggerConnected(),t._loadCalled&&this.triggerLoad().then(()=>{t.loadedCalled&&this.triggerLoaded()}).catch(console.error)}get exports(){return this._exports}set exports(t){let e=this._exports;e!==t&&(this._exports=t,this._exportWatchers.forEach(u),this.connectedCalled&&this.assignedProperty!==!1&&this.component.requestUpdate(this.assignedProperty,e)),this._ready.resolve(t)}setProvisionalExports(t,e=!0){this._exports=e?Wt(t):t,this._exportWatchers.forEach(u)}watchExports(t){let e=()=>t(this._exports);return this._exportWatchers.add(e),()=>void this._exportWatchers.delete(e)}get use(){return M(this.component),Oe}get useRef(){return M(this.component),Se}get useRefSync(){return M(this.component),Et}controllerRemoved(){this.component.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this._callbacks.hostConnected.push(t)}onDisconnected(t){this._callbacks.hostDisconnected.push(t)}onLoad(t){this._callbacks.hostLoad.push(t)}onLoaded(t){this._callbacks.hostLoaded.push(t)}onUpdate(t){this._callbacks.hostUpdate.push(t)}onUpdated(t){this._callbacks.hostUpdated.push(t)}onDestroy(t){this._callbacks.hostDestroy.push(t)}onLifecycle(t){this._callbacks.hostLifecycle.push(t),this.connectedCalled&&this.component.el.isConnected&&this._callLifecycle(t)}triggerConnected(){let t=this;t.hostConnected&&u(t.hostConnected,t),this._callbacks.hostConnected.forEach(u),this.triggerLifecycle(),this.connectedCalled=!0}triggerDisconnected(){let t=this;t.hostDisconnected&&u(t.hostDisconnected,t),this._callbacks.hostDisconnected.forEach(u),this._lifecycleCleanups.forEach(u),this._lifecycleCleanups=[]}async triggerLoad(){if(this._loadCalled)return;this._loadCalled=!0;let t=this;t.hostLoad&&await W(t.hostLoad,t),this._callbacks.hostLoad.length>0&&await Promise.allSettled(this._callbacks.hostLoad.map(W)),this._ready.resolve(this._exports)}triggerLoaded(){if(this.loadedCalled)return;let t=this;t.hostLoaded&&u(t.hostLoaded,t),this._callbacks.hostLoaded.forEach(u),this.loadedCalled=!0}triggerUpdate(t){let e=this;e.hostUpdate&&u(e.hostUpdate,e,t),this._callbacks.hostUpdate.forEach(Ht,t)}triggerUpdated(t){let e=this;e.hostUpdated&&u(e.hostUpdated,e,t),this._callbacks.hostUpdated.forEach(Ht,t)}triggerDestroy(){let t=this;t.hostDestroy&&u(t.hostDestroy,t),this._callbacks.hostDestroy.forEach(u)}triggerLifecycle(){let t=this;t.hostLifecycle&&this._callLifecycle(()=>t.hostLifecycle()),this._callbacks.hostLifecycle.forEach(this._callLifecycle,this)}_callLifecycle(t){M(this.component);let e=u(t);(Array.isArray(e)?e:[e]).forEach(n=>{typeof n=="function"?this._lifecycleCleanups.push(n):typeof n=="object"&&typeof n.remove=="function"&&this._lifecycleCleanups.push(n.remove)})}};function Ht(s){u(s,void 0,this)}var Gt=_t;function Wt(s){if(typeof s!="object"&&typeof s!="function"||s===null)return s;let t=new Proxy(s,{get(e,o,n){if(!(Ue.has(o)&&o in e&&e[o]===t)&&(o in e||o in Promise.prototype||typeof o=="symbol"))return typeof e=="function"?e[o]:Reflect.get(e,o,n)},set:(e,o,n,i)=>Reflect.set(e,o,n,i)});return t}var Ue=new Set(["exports","_exports"]);function Ft(s,t,e){let o=t,n=s.manager.internals;n.allWatchers[o]??=[];let i=n.allWatchers[o],r=e,c=(a,l,d)=>u(r,null,a,l,d);return i.push(c),()=>{let a=i.indexOf(c);a!==-1&&i.splice(a,1)}}var nt=globalThis,it=nt.ShadowRoot&&(nt.ShadyCSS===void 0||nt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ct=Symbol(),Yt=new WeakMap,G=class{constructor(t,e,o){if(this._$cssResult$=!0,o!==Ct)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(it&&t===void 0){let o=e!==void 0&&e.length===1;o&&(t=Yt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&Yt.set(e,t))}return t}toString(){return this.cssText}},Jt=s=>new G(typeof s=="string"?s:s+"",void 0,Ct),Me=(s,...t)=>{let e=s.length===1?s[0]:t.reduce((o,n,i)=>o+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+s[i+1],s[0]);return new G(e,s,Ct)},$t=(s,t)=>{if(it)s.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let o=document.createElement("style"),n=nt.litNonce;n!==void 0&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o)}},rt=it?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(let o of t.cssRules)e+=o.cssText;return Jt(e)})(s):s;var Kt=";",at=",",Zt=":",$=(s=>(s[s.ATTRIBUTE=1]="ATTRIBUTE",s[s.REFLECT=2]="REFLECT",s[s.BOOLEAN=4]="BOOLEAN",s[s.NUMBER=8]="NUMBER",s[s.STATE=16]="STATE",s[s.READ_ONLY=32]="READ_ONLY",s[s.NO_ACCESSOR=64]="NO_ACCESSOR",s))($||{});function wt(s){let t=s;for(;t=t.parentNode??t.host;)if(t?.constructor?.lumina){let e=t;return e.manager?.loadedCalled||e._offspring.push(s),e._postLoad.promise}return!1}var Ie=(s,t)=>function(o,n){if(!globalThis.customElements)return;let r=(n??o??{}).resourcesUrl;r&&s.setAssetPath(r),Object.entries(t).forEach(je)};function je([s,[t,e=""]]){if(customElements.get(s))return;let[o,n,i]=e.split(Kt),r=o?o?.split(at).map(Qt):void 0,c=r?.map(([l])=>l),a=class extends At{static{this.observedAttributes=r?.map(([,l])=>l).filter(l=>l!=="")}static{this._properties=c}static{this._asyncMethods=n?n?.split(at):void 0}static{this._syncMethods=i?.split(at)}static{this._name=s}constructor(){!a._loadPromise&&(a._loadPromise=t(),a._initializePrototype()),super()}};customElements.define(s,a)}var ct=Object.defineProperty;function Qt(s){let t=s.split(Zt);return t.length===1?[t[0],X(t[0])]:t}var Ve=globalThis.HTMLElement??Qt,At=class extends Ve{constructor(){super(),this._store={},this._pendingAttributes=[],this._postLoad=new b,this._postLoaded=new b,this._offspring=[],this._saveInstanceProperties();let t=this.constructor;t._LitConstructor?this._initializeComponent({a:t._LitConstructor}):t._loadPromise.then(ze).then(this._initializeComponent.bind(this)).catch(e=>{this._postLoaded.reject(e),setTimeout(()=>{throw e})})}static{this.lumina=!0}static _initializePrototype(){this._properties?.forEach(this._bindProp,this),this._asyncMethods?.forEach(this._bindAsync,this),this._syncMethods?.forEach(this._bindSync,this)}static _bindProp(t){ct(this.prototype,t,{configurable:!0,enumerable:!0,get(){return this._store[t]},set(e){this._store[t]=e}})}static _bindAsync(t){ct(this.prototype,t,{async value(...e){return this._litElement||await this._postLoaded.promise,await this._litElement[t](...e)},configurable:!0})}static _bindSync(t){ct(this.prototype,t,{value(...e){return this._litElement[t](...e)},configurable:!0})}get manager(){return this._litElement?.manager}_saveInstanceProperties(){let t=this.constructor,e=this;t._properties?.forEach(o=>{Object.hasOwn(this,o)&&(this._store[o]=e[o],delete e[o])})}attributeChangedCallback(t,e,o){this._litElement?.attributeChangedCallback(t,e,o),this._litElement||this._pendingAttributes.push(t)}connectedCallback(){this._litElement?this._litElement.connectedCallback?.():queueMicrotask(()=>{this._ancestorLoad=wt(this)})}disconnectedCallback(){this._litElement?.disconnectedCallback?.()}async componentOnReady(){return await this._postLoaded.promise,this}_initializeComponent(t){let e=this.constructor,o=e._name,n=this._store,i=Object.values(t).find(h=>h.tagName===o),r=`${o}--lazy`,c=i;for(;c&&!Object.hasOwn(c,"lumina");)c=Object.getPrototypeOf(c);We(c),!e._LitConstructor&&(e._LitConstructor=i,customElements.define(r,i)),i.lazy=this;let l=document.createElement(r);i.lazy=void 0,this._litElement=l,this._store=l,this._pendingAttributes.forEach(h=>{let m=this.getAttribute(h);l.attributeChangedCallback(h,null,m)}),Object.entries(n).forEach(He,l);let d=this.isConnected;(d||this._ancestorLoad)&&(l.connectedCallback?.(),d||l.disconnectedCallback())}addController(){}requestUpdate(){this._litElement?.requestUpdate()}};function He([s,t]){this[s]=t}function We(s){let t=s.prototype,e=Element.prototype;Object.hasOwn(t,"isConnected")||(t.setAttribute=function(n,i){e.setAttribute.call(this.el,n,i)},t.removeAttribute=function(n){e.removeAttribute.call(this.el,n)},ct(t,"isConnected",{get(){return Reflect.get(e,"isConnected",this.el)}}))}var ze=async s=>(await s.$$,s),xt={};var St=globalThis,lt=St.trustedTypes,Xt=lt?lt.createPolicy("lit-html",{createHTML:s=>s}):void 0,Lt="$lit$",A=`lit$${Math.random().toFixed(9).slice(2)}$`,Pt="?"+A,Be=`<${Pt}>`,D=document,Y=()=>D.createComment(""),J=s=>s===null||typeof s!="object"&&typeof s!="function",kt=Array.isArray,ie=s=>kt(s)||typeof s?.[Symbol.iterator]=="function",Ot=`[
|
|
5
|
-
\f\r]`,F=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,te=/-->/g,ee=/>/g,P=RegExp(`>|${Ot}(?:([^\\s"'>=/]+)(${Ot}*=${Ot}*(?:[^
|
|
6
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),se=/'/g,oe=/"/g,re=/^(?:script|style|textarea|title)$/i,Dt=s=>(t,...e)=>({_$litType$:s,strings:t,values:e}),Ps=Dt(1),ks=Dt(2),Ds=Dt(3),f=Symbol.for("lit-noChange"),p=Symbol.for("lit-nothing"),ne=new WeakMap,k=D.createTreeWalker(D,129);function ae(s,t){if(!kt(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return Xt!==void 0?Xt.createHTML(t):t}var ce=(s,t)=>{let e=s.length-1,o=[],n,i=t===2?"<svg>":t===3?"<math>":"",r=F;for(let c=0;c<e;c++){let a=s[c],l,d,h=-1,m=0;for(;m<a.length&&(r.lastIndex=m,d=r.exec(a),d!==null);)m=r.lastIndex,r===F?d[1]==="!--"?r=te:d[1]!==void 0?r=ee:d[2]!==void 0?(re.test(d[2])&&(n=RegExp("</"+d[2],"g")),r=P):d[3]!==void 0&&(r=P):r===P?d[0]===">"?(r=n??F,h=-1):d[1]===void 0?h=-2:(h=r.lastIndex-d[2].length,l=d[1],r=d[3]===void 0?P:d[3]==='"'?oe:se):r===oe||r===se?r=P:r===te||r===ee?r=F:(r=P,n=void 0);let g=r===P&&s[c+1].startsWith("/>")?" ":"";i+=r===F?a+Be:h>=0?(o.push(l),a.slice(0,h)+Lt+a.slice(h)+A+g):a+A+(h===-2?c:g)}return[ae(s,i+(s[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),o]},K=class s{constructor({strings:t,_$litType$:e},o){let n;this.parts=[];let i=0,r=0,c=t.length-1,a=this.parts,[l,d]=ce(t,e);if(this.el=s.createElement(l,o),k.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(n=k.nextNode())!==null&&a.length<c;){if(n.nodeType===1){if(n.hasAttributes())for(let h of n.getAttributeNames())if(h.endsWith(Lt)){let m=d[r++],g=n.getAttribute(h).split(A),S=/([.?@])?(.*)/.exec(m);a.push({type:1,index:i,name:S[2],strings:g,ctor:S[1]==="."?dt:S[1]==="?"?ut:S[1]==="@"?pt:N}),n.removeAttribute(h)}else h.startsWith(A)&&(a.push({type:6,index:i}),n.removeAttribute(h));if(re.test(n.tagName)){let h=n.textContent.split(A),m=h.length-1;if(m>0){n.textContent=lt?lt.emptyScript:"";for(let g=0;g<m;g++)n.append(h[g],Y()),k.nextNode(),a.push({type:2,index:++i});n.append(h[m],Y())}}}else if(n.nodeType===8)if(n.data===Pt)a.push({type:2,index:i});else{let h=-1;for(;(h=n.data.indexOf(A,h+1))!==-1;)a.push({type:7,index:i}),h+=A.length-1}i++}}static createElement(t,e){let o=D.createElement("template");return o.innerHTML=t,o}};function T(s,t,e=s,o){if(t===f)return t;let n=o!==void 0?e._$Co?.[o]:e._$Cl,i=J(t)?void 0:t._$litDirective$;return n?.constructor!==i&&(n?._$AO?.(!1),i===void 0?n=void 0:(n=new i(s),n._$AT(s,e,o)),o!==void 0?(e._$Co??=[])[o]=n:e._$Cl=n),n!==void 0&&(t=T(s,n._$AS(s,t.values),n,o)),t}var ht=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:o}=this._$AD,n=(t?.creationScope??D).importNode(e,!0);k.currentNode=n;let i=k.nextNode(),r=0,c=0,a=o[0];for(;a!==void 0;){if(r===a.index){let l;a.type===2?l=new V(i,i.nextSibling,this,t):a.type===1?l=new a.ctor(i,a.name,a.strings,this,t):a.type===6&&(l=new ft(i,this,t)),this._$AV.push(l),a=o[++c]}r!==a?.index&&(i=k.nextNode(),r++)}return k.currentNode=D,n}p(t){let e=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}},V=class s{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,o,n){this.type=2,this._$AH=p,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=T(this,t,e),J(t)?t===p||t==null||t===""?(this._$AH!==p&&this._$AR(),this._$AH=p):t!==this._$AH&&t!==f&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):ie(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==p&&J(this._$AH)?this._$AA.nextSibling.data=t:this.T(D.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:o}=t,n=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=K.createElement(ae(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===n)this._$AH.p(e);else{let i=new ht(n,this),r=i.u(this.options);i.p(e),this.T(r),this._$AH=i}}_$AC(t){let e=ne.get(t.strings);return e===void 0&&ne.set(t.strings,e=new K(t)),e}k(t){kt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,o,n=0;for(let i of t)n===e.length?e.push(o=new s(this.O(Y()),this.O(Y()),this,this.options)):o=e[n],o._$AI(i),n++;n<e.length&&(this._$AR(o&&o._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){let o=t.nextSibling;t.remove(),t=o}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},N=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,o,n,i){this.type=1,this._$AH=p,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=i,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=p}_$AI(t,e=this,o,n){let i=this.strings,r=!1;if(i===void 0)t=T(this,t,e,0),r=!J(t)||t!==this._$AH&&t!==f,r&&(this._$AH=t);else{let c=t,a,l;for(t=i[0],a=0;a<i.length-1;a++)l=T(this,c[o+a],e,a),l===f&&(l=this._$AH[a]),r||=!J(l)||l!==this._$AH[a],l===p?t=p:t!==p&&(t+=(l??"")+i[a+1]),this._$AH[a]=l}r&&!n&&this.j(t)}j(t){t===p?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},dt=class extends N{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===p?void 0:t}},ut=class extends N{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==p)}},pt=class extends N{constructor(t,e,o,n,i){super(t,e,o,n,i),this.type=5}_$AI(t,e=this){if((t=T(this,t,e,0)??p)===f)return;let o=this._$AH,n=t===p&&o!==p||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,i=t!==p&&(o===p||n);n&&this.element.removeEventListener(this.name,this,o),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},ft=class{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){T(this,t)}},le={M:Lt,P:A,A:Pt,C:1,L:ce,R:ht,D:ie,V:T,I:V,H:N,N:ut,U:pt,B:dt,F:ft},qe=St.litHtmlPolyfillSupport;qe?.(K,V),(St.litHtmlVersions??=[]).push("3.2.1");var Tt=(s,t,e)=>{let o=e?.renderBefore??t,n=o._$litPart$;if(n===void 0){let i=e?.renderBefore??null;o._$litPart$=n=new V(t.insertBefore(Y(),i),i,void 0,e??{})}return n._$AI(s),n};var{is:Ge,defineProperty:Fe,getOwnPropertyDescriptor:Ye,getOwnPropertyNames:Je,getOwnPropertySymbols:Ke,getPrototypeOf:Ze}=Object,yt=globalThis,he=yt.trustedTypes,Qe=he?he.emptyScript:"",Xe=yt.reactiveElementPolyfillSupport,Z=(s,t)=>s,mt={toAttribute(s,t){switch(t){case Boolean:s=s?Qe:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s)}catch{e=null}}return e}},Nt=(s,t)=>!Ge(s,t),de={attribute:!0,type:String,converter:mt,reflect:!1,hasChanged:Nt};Symbol.metadata??=Symbol("metadata"),yt.litPropertyMetadata??=new WeakMap;var w=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=de){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){let o=Symbol(),n=this.getPropertyDescriptor(t,o,e);n!==void 0&&Fe(this.prototype,t,n)}}static getPropertyDescriptor(t,e,o){let{get:n,set:i}=Ye(this.prototype,t)??{get(){return this[e]},set(r){this[e]=r}};return{get(){return n?.call(this)},set(r){let c=n?.call(this);i.call(this,r),this.requestUpdate(t,c,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??de}static _$Ei(){if(this.hasOwnProperty(Z("elementProperties")))return;let t=Ze(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Z("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Z("properties"))){let e=this.properties,o=[...Je(e),...Ke(e)];for(let n of o)this.createProperty(n,e[n])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[o,n]of e)this.elementProperties.set(o,n)}this._$Eh=new Map;for(let[e,o]of this.elementProperties){let n=this._$Eu(e,o);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let o=new Set(t.flat(1/0).reverse());for(let n of o)e.unshift(rt(n))}else t!==void 0&&e.push(rt(t));return e}static _$Eu(t,e){let o=e.attribute;return o===!1?void 0:typeof o=="string"?o:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let o of e.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return $t(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$EC(t,e){let o=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,o);if(n!==void 0&&o.reflect===!0){let i=(o.converter?.toAttribute!==void 0?o.converter:mt).toAttribute(e,o.type);this._$Em=t,i==null?this.removeAttribute(n):this.setAttribute(n,i),this._$Em=null}}_$AK(t,e){let o=this.constructor,n=o._$Eh.get(t);if(n!==void 0&&this._$Em!==n){let i=o.getPropertyOptions(n),r=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:mt;this._$Em=n,this[n]=r.fromAttribute(e,i.type),this._$Em=null}}requestUpdate(t,e,o){if(t!==void 0){if(o??=this.constructor.getPropertyOptions(t),!(o.hasChanged??Nt)(this[t],e))return;this.P(t,e,o)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,o){this._$AL.has(t)||this._$AL.set(t,e),o.reflect===!0&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[n,i]of this._$Ep)this[n]=i;this._$Ep=void 0}let o=this.constructor.elementProperties;if(o.size>0)for(let[n,i]of o)i.wrapped!==!0||this._$AL.has(n)||this[n]===void 0||this.P(n,this[n],i)}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(o=>o.hostUpdate?.()),this.update(e)):this._$EU()}catch(o){throw t=!1,this._$EU(),o}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach(e=>this._$EC(e,this[e])),this._$EU()}updated(t){}firstUpdated(t){}};w.elementStyles=[],w.shadowRootOptions={mode:"open"},w[Z("elementProperties")]=new Map,w[Z("finalized")]=new Map,Xe?.({ReactiveElement:w}),(yt.reactiveElementVersions??=[]).push("2.0.4");var x=class extends w{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Tt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return f}};x._$litElement$=!0,x.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:x});var ts=globalThis.litElementPolyfillSupport;ts?.({LitElement:x});(globalThis.litElementVersions??=[]).push("4.1.1");var me=s=>new Mt(s),Mt=class extends Gt{constructor(t){let e="addController"in t,o=new Set;function n(a){o.add(a),!(st in a)&&t.renderRoot&&t.el.isConnected&&a.hostConnected?.()}function i(a){o.delete(a),a.controllerRemoved?.()}let r=t;r.addController=n,r.removeController=i,super(t),this.internals=new et(this.component),this.destroyed=!1,this._updatePromise=new b,this._originalLifecycles={},this.isLit=e,this.component.manager=this,Bt(t,e),this._controllers=o,this.exports=void 0,this.hasDestroy=Ut in this.component&&typeof this.component.destroy=="function",this._bindLifecycleMethods();let c=this.internals;Object.keys(c.members).forEach(a=>{c.accessorGetter[a]=fe,c.accessorSetter[a]=fe,c.getSetProxy(a)}),e?this.internals.enabledWatchers=this.internals.allWatchers:Object.defineProperty(t,"updateComplete",{get:async()=>await this._updatePromise.promise}),queueMicrotask(c.enableReadonly),M(t),B.set(t.el,t),B.set(t,t)}_bindLifecycleMethods(){let t=this.component,e=this.isLit,o=t.el===t;this._originalLifecycles={_connectedCallback:e||o?void 0:t.connectedCallback,_disconnectedCallback:e||o?void 0:t.disconnectedCallback,_load:e?t.load:t.componentWillLoad,_loaded:e?t.loaded:t.componentDidLoad,_willUpdate:e?void 0:t.componentWillUpdate,_updated:e?void 0:t.componentDidUpdate,_destroy:t.destroy};let n=this._connectedCallback.bind(this),i=this._disconnectedCallback.bind(this),r=this._update.bind(this),c=this._updated.bind(this);e?t.constructor.prototype.addController.call(t,{hostConnected:n,hostDisconnected:i,hostUpdate:r,hostUpdated:c}):(t.connectedCallback=n,t.disconnectedCallback=i,t.componentWillLoad=this._load.bind(this),t.componentDidLoad=this._loaded.bind(this),t.componentWillUpdate=r,t.componentDidUpdate=c),this.hasDestroy&&(t.destroy=this.destroy.bind(this))}_connectedCallback(){if(this.destroyed){let e=this.component.el.localName;throw this.component.el.remove(),new Error(`The ${e} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${Ut} prop.`)}this._autoDestroyTimeout!==void 0&&clearTimeout(this._autoDestroyTimeout);let t=this.internals;t.enabledWatchers=t.allWatchers,ot(),t.enableReadonly?.(),this._controllers.forEach(os),this._originalLifecycles._connectedCallback?.call(this.component)}_disconnectedCallback(){this.destroyed||(this._controllers.forEach(ns),this._originalLifecycles._disconnectedCallback?.call(this.component),this.hasDestroy&&this._setAutoDestroyTimeout())}async _load(){await Promise.allSettled(Array.from(this._controllers,is)),await this._originalLifecycles._load?.call(this.component),this.hasDestroy&&Ft(this.component,Ut,()=>this._setAutoDestroyTimeout())}_loaded(){this._controllers.forEach(rs),this._originalLifecycles._loaded?.call(this.component)}_update(){let t=this.component;return this._controllers.forEach(as,t.$changes),this._originalLifecycles._willUpdate?.call(this.component)}_updated(){let t=this.component;if(this._controllers.forEach(cs,t.$changes),this._originalLifecycles._updated?.call(this.component),this.isLit)t.$changes=new Map;else{let e=this._updatePromise;this._updatePromise=new b,e.resolve(!0)}}async destroy(){if(!this.destroyed){if(this.component.el.isConnected){this.hasDestroy=!1;try{this.component.el.remove()}finally{this.hasDestroy=!0}}this._autoDestroyTimeout=void 0,this.destroyed=!0,this._controllers.forEach(ls),this._controllers.clear(),await this._originalLifecycles._destroy?.call(this.component)}}_setAutoDestroyTimeout(){if(this._autoDestroyTimeout!==void 0&&clearTimeout(this._autoDestroyTimeout),!this.component.el.isConnected&&!this.component.autoDestroyDisabled){let t=()=>void this.destroy().catch(console.error);this._autoDestroyTimeout=jt(t,ss)}}},Ut="autoDestroyDisabled",ss=1e3,fe=s=>s;function os(s){"triggerConnected"in s?s.triggerConnected():u(s.hostConnected,s)}function ns(s){"triggerDisconnected"in s?s.triggerDisconnected():u(s.hostDisconnected,s)}async function is(s){"triggerLoad"in s?await s.triggerLoad():await W(s.hostLoad,s)}function rs(s){"triggerLoaded"in s?s.triggerLoaded():u(s.hostLoaded,s)}function as(s){"triggerUpdate"in s?s.triggerUpdate(this):u(s.hostUpdate,s,this)}function cs(s){"triggerUpdated"in s?s.triggerUpdated(this):u(s.hostUpdated,s,this)}function ls(s){"triggerDestroy"in s?s.triggerDestroy():u(s.hostDestroy,s)}var _={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},R=s=>(...t)=>({_$litDirective$:s,values:t}),O=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var ye=R(class extends O{constructor(s){if(super(s),s.type!==_.ATTRIBUTE||s.name!=="class"||s.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(s){return" "+Object.keys(s).filter(t=>s[t]).join(" ")+" "}update(s,[t]){if(this.st===void 0){this.st=new Set,s.strings!==void 0&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(let o in t)t[o]&&!this.nt?.has(o)&&this.st.add(o);return this.render(t)}let e=s.element.classList;for(let o of this.st)o in t||(e.remove(o),this.st.delete(o));for(let o in t){let n=!!t[o];n===this.st.has(o)||this.nt?.has(o)||(n?(e.add(o),this.st.add(o)):(e.remove(o),this.st.delete(o)))}return f}});var ge="important",hs=" !"+ge,ds=R(class extends O{constructor(s){if(super(s),s.type!==_.ATTRIBUTE||s.name!=="style"||s.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(s){return Object.keys(s).reduce((t,e)=>{let o=s[e];return o==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`},"")}update(s,[t]){let{style:e}=s.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let o of this.ft)t[o]==null&&(this.ft.delete(o),o.includes("-")?e.removeProperty(o):e[o]=null);for(let o in t){let n=t[o];if(n!=null){this.ft.add(o);let i=typeof n=="string"&&n.endsWith(hs);o.includes("-")||i?e.setProperty(o,i?n.slice(0,-11):n,i?ge:""):e[o]=n}}return f}});var{I:us}=le;var be=s=>s.strings===void 0,ve=()=>document.createComment(""),zo=(s,t,e)=>{let o=s._$AA.parentNode,n=t===void 0?s._$AB:t._$AA;if(e===void 0){let i=o.insertBefore(ve(),n),r=o.insertBefore(ve(),n);e=new us(i,r,s,s.options)}else{let i=e._$AB.nextSibling,r=e._$AM,c=r!==s;if(c){let a;e._$AQ?.(s),e._$AM=s,e._$AP!==void 0&&(a=s._$AU)!==r._$AU&&e._$AP(a)}if(i!==n||c){let a=e._$AA;for(;a!==i;){let l=a.nextSibling;o.insertBefore(a,n),a=l}}}return e},Bo=(s,t,e=s)=>(s._$AI(t,e),s),ps={},_e=(s,t=ps)=>s._$AH=t,qo=s=>s._$AH,Go=s=>{s._$AP?.(!1,!0);let t=s._$AA,e=s._$AB.nextSibling;for(;t!==e;){let o=t.nextSibling;t.remove(),t=o}};var fs=R(class extends O{constructor(s){if(super(s),s.type!==_.PROPERTY&&s.type!==_.ATTRIBUTE&&s.type!==_.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!be(s))throw Error("`live` bindings can only contain a single expression")}render(s){return s}update(s,[t]){if(t===f||t===p)return t;let e=s.element,o=s.name;if(s.type===_.PROPERTY){if(t===e[o])return f}else if(s.type===_.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(o))return f}else if(s.type===_.ATTRIBUTE&&e.getAttribute(o)===t+"")return f;return _e(s),t}});var ys=()=>{},Ee=class s extends x{constructor(){super(),this.el=this.constructor.lazy??this,this.manager=me(this),this._postLoad=this.constructor.lazy?._postLoad??new b,this._offspring=this.constructor.lazy?._offspring??[],this._postLoaded=this.constructor.lazy?._postLoaded??new b,this._enableUpdating=this.enableUpdating,this.enableUpdating=ys;let t=s.prototype.shouldUpdate;this.shouldUpdate!==t&&(this._originalShouldUpdate=this.shouldUpdate,this.shouldUpdate=t),!1}static finalizeStyles(t){let e=super.finalizeStyles(t),o=this.shadowRootOptions===xt;return this.runtime?.commonStyles===void 0||o?e:[this.runtime.commonStyles,...e]}static createProperty(t,e){let o=typeof e=="number"?e:Array.isArray(e)?e[0]:0,n=Array.isArray(e)?e[1]:void 0;super.createProperty(t,{attribute:o&$.ATTRIBUTE&&typeof t=="string"?X(t):!1,reflect:!!(o&$.REFLECT),type:o&$.BOOLEAN?Boolean:o&$.NUMBER?Number:void 0,state:!!(o&$.STATE),readOnly:!!(o&$.READ_ONLY),noAccessor:!!(o&$.NO_ACCESSOR),...n})}static{this.lumina=!0}connectedCallback(){if(this.el.hasAttribute("defer-hydration"))return;let t=!this.manager.connectedCalled;super.connectedCallback(),t&&queueMicrotask(()=>this._load().catch(e=>{this._postLoaded.reject(e),setTimeout(()=>{throw e})}))}createRenderRoot(){let t=this.el.shadowRoot,e=this.constructor,o=e.shadowRootOptions,i=t??(o===xt?this.el:this.el.attachShadow(o));if(t)return x.prototype.createRenderRoot.call(this),t;if(this.isConnected){let r=i.getRootNode();r.adoptedStyleSheets=[...r.adoptedStyleSheets,...e.elementStyles.map(c=>"styleSheet"in c?c.styleSheet:c)]}return i}async _load(){let t=this.el._ancestorLoad??wt(this.el);t&&await t,await this.manager._load(),this._enableUpdating(!0),this.performUpdate(),this._postLoad.resolve(),await Promise.resolve();let e=this._offspring.filter(o=>!o.manager?.loadedCalled);e.length&&await Promise.allSettled(e.map(async o=>await o.componentOnReady())),this._offspring.length=0,this.el.setAttribute(this.constructor.runtime.hydratedAttribute,""),this.manager._loaded(),this._postLoaded.resolve()}shouldUpdate(t){return this.$changes=t,this._originalShouldUpdate?.(t)??!0}listen(t,e,o){let n=e?.bind(this)??e;this.manager.onLifecycle(()=>(this.el.addEventListener(t,n,o),()=>this.el.removeEventListener(t,n,o)))}listenOn(t,e,o,n){let i=o?.bind(this)??o;this.manager.onLifecycle(()=>(t.addEventListener(e,i,n),()=>t.removeEventListener(e,i,n)))}async componentOnReady(){return await this._postLoaded.promise,this}};function Ce(s){let t,e=n=>{t=new URL(n,globalThis.location?.href||void 0).href},o={...s,getAssetPath(n){let i=new URL(n,t);return i.origin!==globalThis.location?.origin?i.href:i.pathname},setAssetPath:e,customElement(n,i){i.runtime=o,i.tagName=n,customElements.get(n)||customElements.define(n,i)}};return e(s.defaultAssetPath),o}var vn=s=>typeof s=="object"&&s!=null?ye(s):s;var bn=p;var gs=Ce({defaultAssetPath:"https://jsdev.arcgis.com/coding-components/next/",hydratedAttribute:"hydrated"}),{customElement:Cn,getAssetPath:$n,setAssetPath:An}=gs;export{_s as a,M as b,Ae as c,we as d,Es as e,gt as f,Te as g,Re as h,_t as i,Ft as j,Me as k,Ie as l,xt as m,Ps as n,f as o,p,_ as q,R as r,O as s,be as t,zo as u,Bo as v,_e as w,qo as x,Go as y,Ee as z,vn as A,bn as B,gs as C,Cn as D,$n as E};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
3
|
-
v4.33.0-next.97 */
|
|
4
|
-
import{b as f}from"./NZIFN45M.js";import{a as u}from"./GBHU7OBT.js";import"./HDSXRFUK.js";import{D as m,h as l,k as d,n as i,z as h}from"./C6WVU4C3.js";import{e as c,o as n}from"./LOLIV5RG.js";import"./ECFYN65T.js";var g=d`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2);word-break:break-word}}`;function b(a){a.key==="Enter"&&a.stopPropagation()}var o=class extends h{constructor(){super(...arguments),this._beforeBack=async()=>{this.removeLastPanelRenderer(),this._filterValue=""},this.messages=u(),this._filterValue="",this._flowItemRenderers=[],this._mode="profile",this._mutationCounter=1,this.loading=!1,this.arcgisClose=l({bubbles:!1}),this.arcgisItemSelected=l({bubbles:!1})}static{this.properties={_filterValue:16,_flowItemRenderers:16,_mode:16,_mutationCounter:16,loading:5,modelId:1,variable:0}}static{this.styles=g}load(){this._variableChanged()}willUpdate(e){e.has("modelId")&&(this._flowItemRenderers=[]),e.has("variable")&&this._variableChanged()}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect()}_variableChanged(){this._mode=this.variable?.type==="featureSet"?"featureSet":"profile"}addPanelRenderer(e){this._flowItemRenderers=[...this._flowItemRenderers,e]}removeLastPanelRenderer(){this._flowItemRenderers=this._flowItemRenderers.slice(0,-1)}_isMode(e){return this._mode===e}flowFocusHandler(e){if(!e){this._flowObserver?.disconnect(),this._flowObserver=void 0;return}this._flowObserver||(this._flowObserver=new MutationObserver(()=>{c(e.querySelector("calcite-flow-item:last-child"),"calcite-input")}),this._flowObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0}))}_updateFilterValue(e){this._filterValue=e.currentTarget.value}_emitClose(){this.arcgisClose.emit()}_backToTop(){this._flowItemRenderers=[]}_emitItemSelected(e,t){if(t.nonInteractive)return;let s=e;(!s.key||s.key==="Enter")&&(e.preventDefault(),this.arcgisItemSelected.emit(t.snippet))}_showCollectionPanel(e,t){e.stopPropagation(),this.addPanelRenderer(s=>this.renderCollectionBasedVariable(t,!1,s))}_getHeadingForCollection(e){if(!e)return"";switch(this._mode){case"profile":return this.messages.profilevariables??"";case"featureSet":return this.messages.fields??""}}_getDescriptionForCollection(e){if(!e)return"";switch(this._mode){case"profile":return e.breadcrumb;case"featureSet":return e.variables[0]?.getLabel()??""}}renderCollectionBasedVariable(e,t=!1,s=!1){if(!e)return null;let r=this.loading;return!r&&!e.loaded&&(e.loadSource().then(()=>setTimeout(()=>{this._mutationCounter+=1})).catch(()=>{console.error("Error loading collection"),r=!1}),r=!0),i`<calcite-flow-item .heading=${this._getHeadingForCollection(e)} .description=${this._getDescriptionForCollection(e)} .beforeBack=${this._beforeBack} closable @calciteFlowItemClose=${this._emitClose} .selected=${s}><calcite-action slot=header-actions-end .text=${this.messages.backtotop??""} scale=m .hidden=${t||this._isMode("featureSet")} icon=chevrons-left icon-flip-rtl @click=${this._backToTop}></calcite-action><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m></calcite-input>${r?i`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading??""}></calcite-loader>`:i`<calcite-list label=variables>${this.renderEditorVariables(e)}</calcite-list>`}</calcite-flow-item>`}renderEditorVariables(e){let t=n(this._filterValue),s=e.variables.filter(r=>r.passFilter(t));return s.length?s.map(r=>this.renderEditorVariable(r)):i`<div class="notice-container">${this.messages.noitems}</div>`}renderEditorVariable(e){switch(e.type){case"group":return this._isMode("featureSet")&&e.isHeader?i`<calcite-list-item-group .heading=${e.getLabel()}></calcite-list-item-group>`:this._isMode("featureSet")&&e._label?.code==="fields"?this.renderEditorVariables(e):i`<calcite-list-item-group .heading=${e.getLabel()}>${this.renderEditorVariables(e)}</calcite-list-item-group>`;default:return i`<calcite-list-item .label=${e.getLabel()} .description=${e.getDescription()} @calciteListItemSelect=${t=>this._emitItemSelected(t,e)} @keydown=${t=>this._emitItemSelected(t,e)}>${e.isCollection?i`<calcite-action slot=actions-end .text=${this.messages.expand??""} scale=s icon=chevron-right icon-flip-rtl @click=${t=>this._showCollectionPanel(t,e)} @keydown=${b}></calcite-action>`:null}${e.icon?i`<calcite-icon .icon=${e.icon} scale=s slot=content-start></calcite-icon>`:null}</calcite-list-item>`}}render(){return!this.loading&&this.variable?.loaded&&!this.variable?.variables.length?i`<calcite-flow><calcite-flow-item .heading=${this.messages.profilevariables} closable @calciteFlowItemClose=${this._emitClose}><div class="notice-container">${this.messages.noprofilevariablesmessage}</div></calcite-flow-item></calcite-flow>`:i`<calcite-flow ${f(this.flowFocusHandler)}>${this.renderCollectionBasedVariable(this.variable,!0,this._flowItemRenderers.length===0)}${this._flowItemRenderers.map((e,t,s)=>e(t===s.length-1))}</calcite-flow>`}};m("arcgis-editor-variables",o);export{o as ArcgisEditorVariables};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
-
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
3
|
-
v4.33.0-next.97 */
|
|
4
|
-
import{a as b,c as r,d as v,e as n}from"./D76ZNFFX.js";import{b as l}from"./NZIFN45M.js";import{a as _}from"./GBHU7OBT.js";import"./HDSXRFUK.js";import{a as g}from"./5B5EFJUZ.js";import"./UC366WOZ.js";import{D as f,h as o,k as p,n as s,z as u}from"./C6WVU4C3.js";import{d,e as h,q as a}from"./LOLIV5RG.js";import"./XTHN3CP3.js";import"./ECFYN65T.js";var $=p`:host{background-color:var(--calcite-color-foreground-1);.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.sticky{position:sticky;top:0;z-index:10}calcite-flow{height:100%}calcite-block{p:first-of-type{margin-top:0}code{font-family:var(--calcite-code-family)}pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm);code{font-size:var(--calcite-font-size--2)}}}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`,m=class extends u{constructor(){super(...arguments),this.messages=_(),this._unselectItem=async()=>{this._selectedApiItem=void 0},this._colorizeStyle="",this._filterValue="",this.hideDocumentationActions=!1,this.loading=!1,this.arcgisClose=o({bubbles:!1}),this.arcgisItemSelected=o({bubbles:!1})}static{this.properties={_colorizeStyle:16,_filterValue:16,_selectedApiItem:16,apiLibrary:0,hideDocumentationActions:5,loading:5}}static{this.styles=$}load(){this._colorizeStyle=r(),this._themeChangedListener=v(()=>this._colorizeStyle=r())}willUpdate(e){if(e.has("apiLibrary")){if(!this._selectedApiItem)return;for(let i of this.apiLibrary??[])for(let t of i.items)if(t.name===this._selectedApiItem.name){this._selectedApiItem=t;return}this._selectedApiItem=void 0}}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect(),this._themeChangedListener?.dispose()}flowFocusHandler(e){if(!e){this._flowObserver?.disconnect(),this._flowObserver=void 0;return}this._flowObserver||(this._flowObserver=new MutationObserver(()=>{h(e.querySelector("calcite-flow-item:last-child"),"calcite-input")}),this._flowObserver.observe(e,{attributes:!0,attributeFilter:["id"],childList:!0}))}_emitItemSelected(e,i){if(!i)return;let t=e;(!t.key||t.key==="Enter")&&(e.preventDefault(),this.arcgisItemSelected.emit(i.completion.insertText??""))}_emitClose(){this.arcgisClose.emit()}_emitItemSelectedAndClose(e,i){let t=e;(!t.key||t.key==="Enter")&&(e.preventDefault(),this.arcgisItemSelected.emit(i.completion.insertText??""))}_selectItem(e,i){e.stopPropagation(),this._selectedApiItem=i}_updateFilterValue(e){this._filterValue=e.currentTarget.value??""}_elementToMarkdown(e){e!==void 0&&(e.innerHTML=n(this._selectedApiItem.examples),b(e).catch(console.error))}renderApiCategory(e){let i=g(e.items,"name",this._filterValue);return i.length?s`<calcite-list-item-group .heading=${e.title}>${i.map(t=>s`<calcite-list-item .label=${a(t.completion.detail)} @calciteListItemSelect=${c=>this._emitItemSelected(c,t)} @keydown=${c=>this._emitItemSelected(c,t)}><calcite-action slot=actions-end .text=${this.messages.expand??""} icon=chevron-right icon-flip-rtl scale=s @click=${c=>this._selectItem(c,t)}></calcite-action></calcite-list-item>`)}</calcite-list-item-group>`:null}renderApiItemFlowItem(){let e=this._selectedApiItem;return e?s`<calcite-flow-item .heading=${this.messages.constantsandfunctions} .beforeBack=${this._unselectItem} closable @calciteFlowItemClose=${this._emitClose} selected>${this.hideDocumentationActions?null:s`<calcite-button width=half slot=footer appearance=outline kind=brand scale=s .href=${e.link} target=Help icon-start=information>${this.messages.moreinformation}</calcite-button>`}<calcite-button .width=${this.hideDocumentationActions?"full":"half"} slot=footer appearance=outline kind=brand icon-start=code scale=s @click=${i=>this._emitItemSelectedAndClose(i,e)} ${l(d)}>${this.messages.insert}</calcite-button><calcite-block open .heading=${a(e.completion.detail)}><div .innerHTML=${n(e.completion.documentation)??""}></div>${e.examples?s`<div ${l(this._elementToMarkdown)}></div>`:null}</calcite-block></calcite-flow-item>`:null}render(){let e=(this.apiLibrary??[]).map(t=>this.renderApiCategory(t)),i=e.every(t=>!t);return s`<style>${this._colorizeStyle}</style><calcite-flow ${l(this.flowFocusHandler)}><calcite-flow-item .heading=${this.messages.constantsandfunctions} closable @calciteFlowItemClose=${this._emitClose} .selected=${!this._selectedApiItem}><calcite-input .value=${this._filterValue} icon=magnifying-glass clearable @calciteInputInput=${this._updateFilterValue} class="sticky" scale=m></calcite-input>${this.loading?s`<calcite-loader scale=s type=indeterminate .label=${this.messages.loading??"Loading"}></calcite-loader>`:s`<calcite-list label="arcade api">${i?s`<div class="notice-container">${this.messages.noitems}</div>`:e}</calcite-list>`}</calcite-flow-item>${this.renderApiItemFlowItem()}</calcite-flow>`}};f("arcgis-language-api-panel",m);export{m as ArcgisLanguageApiPanel};
|