@spectric/ui 0.0.6 → 0.0.8
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/components/Button.d.ts +8 -3
- package/dist/components/index.d.ts +2 -0
- package/dist/components/input.d.ts +3 -1
- package/dist/components/pagination/index.d.ts +1 -0
- package/dist/components/pagination/pagination.d.ts +60 -0
- package/dist/components/query_bar/QueryBar.d.ts +2 -3
- package/dist/components/table/body.d.ts +44 -0
- package/dist/components/table/cell.d.ts +53 -0
- package/dist/components/table/header.d.ts +42 -0
- package/dist/components/table/index.d.ts +1 -0
- package/dist/components/table/table.d.ts +90 -0
- package/dist/custom-elements.json +105 -6
- package/dist/index.es.js +1454 -1144
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +178 -72
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/components/Button.ts +12 -4
- package/src/components/button.css.ts +66 -0
- package/src/components/index.ts +3 -1
- package/src/components/input.ts +19 -2
- package/src/components/pagination/index.ts +1 -0
- package/src/components/pagination/pagination.css +10 -0
- package/src/components/pagination/pagination.ts +133 -0
- package/src/components/query_bar/QueryBar.ts +7 -21
- package/src/components/table/body.ts +69 -0
- package/src/components/table/cell.ts +117 -0
- package/src/components/table/header.ts +68 -0
- package/src/components/table/index.ts +1 -0
- package/src/components/table/table.css +36 -0
- package/src/components/table/table.ts +131 -0
- package/src/stories/Button.stories.ts +3 -2
- package/src/stories/QueryBar.stories.ts +7 -0
- package/src/stories/fixtures/data.ts +3 -0
- package/src/stories/pagination.stories.ts +63 -0
- package/src/stories/table.stories.ts +74 -0
- package/dist/assets/Banner-CZ3qKIQC.js +0 -172
- package/dist/assets/Banner.stories-BMf4MBpI.js +0 -19
- package/dist/assets/BitDisplay.stories-wztXxpxe.js +0 -18
- package/dist/assets/Bits-C_TSTjST.js +0 -1
- package/dist/assets/Button.stories-gHxjWwVf.js +0 -142
- package/dist/assets/Color-F6OSRLHC-AjFOL-zN.js +0 -1
- package/dist/assets/DocsRenderer-CFRXHY34-CvW79YxE.js +0 -761
- package/dist/assets/Header.stories-Bc09U6g1.js +0 -25
- package/dist/assets/Page.stories-DNJKhAFs.js +0 -114
- package/dist/assets/QueryBar.stories-Da5C-SV4.js +0 -17
- package/dist/assets/_commonjsHelpers-Cpj98o6Y.js +0 -1
- package/dist/assets/chunk-L4EGOTBX-AI5g0G5Z.js +0 -2
- package/dist/assets/data-CwENMT7L.js +0 -3
- package/dist/assets/dialog-CFHXbUTQ.js +0 -611
- package/dist/assets/directive-helpers-IbK5tOA8.js +0 -5
- package/dist/assets/entry-preview-Di-j0SPB.js +0 -4
- package/dist/assets/entry-preview-docs-CUBRpM7y.js +0 -1
- package/dist/assets/iframe-BQFuVTVZ.js +0 -2
- package/dist/assets/index-BCiKWbv6.js +0 -1
- package/dist/assets/index-BHYIh-Xd.js +0 -8
- package/dist/assets/index-DBGhiA-l.js +0 -1
- package/dist/assets/index-DrFu-skq.js +0 -6
- package/dist/assets/index-oFsFREWh.js +0 -9
- package/dist/assets/input.stories-Cgdv-5bN.js +0 -58
- package/dist/assets/lit-element-UdLzEcH-.js +0 -19
- package/dist/assets/preview-BWzBA1C2.js +0 -396
- package/dist/assets/preview-CGiTbRot.js +0 -2
- package/dist/assets/preview-D77C14du.js +0 -34
- package/dist/assets/preview-DEMzn_yN.js +0 -1
- package/dist/assets/preview-DFmD0pui.js +0 -1
- package/dist/assets/preview-DGUiP6tS.js +0 -7
- package/dist/assets/preview-DQVTHjv1.js +0 -182
- package/dist/assets/preview-aVwhiz9X.js +0 -1
- package/dist/assets/tiny-invariant-CopsF_GD.js +0 -1
- package/dist/components/input.css.d.ts +0 -2
- package/dist/favicon.svg +0 -1
- package/dist/iframe.html +0 -639
- package/dist/index.html +0 -190
- package/dist/index.json +0 -1
- package/dist/nunito-sans-bold-italic.woff2 +0 -0
- package/dist/nunito-sans-bold.woff2 +0 -0
- package/dist/nunito-sans-italic.woff2 +0 -0
- package/dist/nunito-sans-regular.woff2 +0 -0
- package/dist/project.json +0 -1
- package/dist/sb-addons/chromatic-com-storybook-8/manager-bundle.js +0 -333
- package/dist/sb-addons/chromatic-com-storybook-8/manager-bundle.js.LEGAL.txt +0 -40
- package/dist/sb-addons/essentials-actions-2/manager-bundle.js +0 -3
- package/dist/sb-addons/essentials-actions-2/manager-bundle.js.LEGAL.txt +0 -0
- package/dist/sb-addons/essentials-backgrounds-3/manager-bundle.js +0 -12
- package/dist/sb-addons/essentials-backgrounds-3/manager-bundle.js.LEGAL.txt +0 -0
- package/dist/sb-addons/essentials-controls-1/manager-bundle.js +0 -391
- package/dist/sb-addons/essentials-controls-1/manager-bundle.js.LEGAL.txt +0 -0
- package/dist/sb-addons/essentials-measure-6/manager-bundle.js +0 -3
- package/dist/sb-addons/essentials-measure-6/manager-bundle.js.LEGAL.txt +0 -0
- package/dist/sb-addons/essentials-outline-7/manager-bundle.js +0 -3
- package/dist/sb-addons/essentials-outline-7/manager-bundle.js.LEGAL.txt +0 -0
- package/dist/sb-addons/essentials-toolbars-5/manager-bundle.js +0 -3
- package/dist/sb-addons/essentials-toolbars-5/manager-bundle.js.LEGAL.txt +0 -0
- package/dist/sb-addons/essentials-viewport-4/manager-bundle.js +0 -3
- package/dist/sb-addons/essentials-viewport-4/manager-bundle.js.LEGAL.txt +0 -0
- package/dist/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +0 -3
- package/dist/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js.LEGAL.txt +0 -0
- package/dist/sb-common-assets/favicon.svg +0 -1
- package/dist/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/dist/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/dist/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/dist/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/dist/sb-manager/globals-module-info.js +0 -1028
- package/dist/sb-manager/globals-runtime.js +0 -40861
- package/dist/sb-manager/globals.js +0 -48
- package/dist/sb-manager/runtime.js +0 -13338
- package/dist/sb-preview/globals.js +0 -33
- package/dist/sb-preview/runtime.js +0 -7174
package/dist/index.es.js
CHANGED
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
5
|
*/
|
|
6
|
-
const
|
|
7
|
-
let
|
|
6
|
+
const dt = globalThis, sr = dt.ShadowRoot && (dt.ShadyCSS === void 0 || dt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, ir = Symbol(), ws = /* @__PURE__ */ new WeakMap();
|
|
7
|
+
let Rs = class {
|
|
8
8
|
constructor(r, o, i) {
|
|
9
|
-
if (this._$cssResult$ = !0, i !==
|
|
9
|
+
if (this._$cssResult$ = !0, i !== ir) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
10
10
|
this.cssText = r, this.t = o;
|
|
11
11
|
}
|
|
12
12
|
get styleSheet() {
|
|
13
13
|
let r = this.o;
|
|
14
14
|
const o = this.t;
|
|
15
|
-
if (
|
|
15
|
+
if (sr && r === void 0) {
|
|
16
16
|
const i = o !== void 0 && o.length === 1;
|
|
17
|
-
i && (r =
|
|
17
|
+
i && (r = ws.get(o)), r === void 0 && ((this.o = r = new CSSStyleSheet()).replaceSync(this.cssText), i && ws.set(o, r));
|
|
18
18
|
}
|
|
19
19
|
return r;
|
|
20
20
|
}
|
|
@@ -22,33 +22,33 @@ let Es = class {
|
|
|
22
22
|
return this.cssText;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const
|
|
26
|
-
const o = s.length === 1 ? s[0] : r.reduce((i, c, t) => i + ((
|
|
27
|
-
if (
|
|
28
|
-
if (typeof
|
|
29
|
-
throw Error("Value passed to 'css' function must be a 'css' function result: " +
|
|
25
|
+
const Io = (s) => new Rs(typeof s == "string" ? s : s + "", void 0, ir), Z = (s, ...r) => {
|
|
26
|
+
const o = s.length === 1 ? s[0] : r.reduce((i, c, t) => i + ((u) => {
|
|
27
|
+
if (u._$cssResult$ === !0) return u.cssText;
|
|
28
|
+
if (typeof u == "number") return u;
|
|
29
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + u + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
30
30
|
})(c) + s[t + 1], s[0]);
|
|
31
|
-
return new
|
|
32
|
-
},
|
|
33
|
-
if (
|
|
31
|
+
return new Rs(o, s, ir);
|
|
32
|
+
}, Qo = (s, r) => {
|
|
33
|
+
if (sr) s.adoptedStyleSheets = r.map((o) => o instanceof CSSStyleSheet ? o : o.styleSheet);
|
|
34
34
|
else for (const o of r) {
|
|
35
|
-
const i = document.createElement("style"), c =
|
|
35
|
+
const i = document.createElement("style"), c = dt.litNonce;
|
|
36
36
|
c !== void 0 && i.setAttribute("nonce", c), i.textContent = o.cssText, s.appendChild(i);
|
|
37
37
|
}
|
|
38
|
-
},
|
|
38
|
+
}, xs = sr ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((r) => {
|
|
39
39
|
let o = "";
|
|
40
40
|
for (const i of r.cssRules) o += i.cssText;
|
|
41
|
-
return
|
|
41
|
+
return Io(o);
|
|
42
42
|
})(s) : s;
|
|
43
43
|
/**
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright 2017 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
47
|
*/
|
|
48
|
-
const { is:
|
|
48
|
+
const { is: Ho, defineProperty: qo, getOwnPropertyDescriptor: Wo, getOwnPropertyNames: Yo, getOwnPropertySymbols: Ko, getPrototypeOf: Zo } = Object, oe = globalThis, As = oe.trustedTypes, Xo = As ? As.emptyScript : "", Yt = oe.reactiveElementPolyfillSupport, Me = (s, r) => s, bt = { toAttribute(s, r) {
|
|
49
49
|
switch (r) {
|
|
50
50
|
case Boolean:
|
|
51
|
-
s = s ?
|
|
51
|
+
s = s ? Xo : null;
|
|
52
52
|
break;
|
|
53
53
|
case Object:
|
|
54
54
|
case Array:
|
|
@@ -73,7 +73,7 @@ const { is: Do, defineProperty: jo, getOwnPropertyDescriptor: Ro, getOwnProperty
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return o;
|
|
76
|
-
} },
|
|
76
|
+
} }, or = (s, r) => !Ho(s, r), Ss = { attribute: !0, type: String, converter: bt, reflect: !1, hasChanged: or };
|
|
77
77
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), oe.litPropertyMetadata ?? (oe.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
78
78
|
class ke extends HTMLElement {
|
|
79
79
|
static addInitializer(r) {
|
|
@@ -82,37 +82,37 @@ class ke extends HTMLElement {
|
|
|
82
82
|
static get observedAttributes() {
|
|
83
83
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
84
84
|
}
|
|
85
|
-
static createProperty(r, o =
|
|
85
|
+
static createProperty(r, o = Ss) {
|
|
86
86
|
if (o.state && (o.attribute = !1), this._$Ei(), this.elementProperties.set(r, o), !o.noAccessor) {
|
|
87
87
|
const i = Symbol(), c = this.getPropertyDescriptor(r, i, o);
|
|
88
|
-
c !== void 0 &&
|
|
88
|
+
c !== void 0 && qo(this.prototype, r, c);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
static getPropertyDescriptor(r, o, i) {
|
|
92
|
-
const { get: c, set: t } =
|
|
92
|
+
const { get: c, set: t } = Wo(this.prototype, r) ?? { get() {
|
|
93
93
|
return this[o];
|
|
94
|
-
}, set(
|
|
95
|
-
this[o] =
|
|
94
|
+
}, set(u) {
|
|
95
|
+
this[o] = u;
|
|
96
96
|
} };
|
|
97
97
|
return { get() {
|
|
98
98
|
return c == null ? void 0 : c.call(this);
|
|
99
|
-
}, set(
|
|
100
|
-
const
|
|
101
|
-
t.call(this,
|
|
99
|
+
}, set(u) {
|
|
100
|
+
const g = c == null ? void 0 : c.call(this);
|
|
101
|
+
t.call(this, u), this.requestUpdate(r, g, i);
|
|
102
102
|
}, configurable: !0, enumerable: !0 };
|
|
103
103
|
}
|
|
104
104
|
static getPropertyOptions(r) {
|
|
105
|
-
return this.elementProperties.get(r) ??
|
|
105
|
+
return this.elementProperties.get(r) ?? Ss;
|
|
106
106
|
}
|
|
107
107
|
static _$Ei() {
|
|
108
|
-
if (this.hasOwnProperty(
|
|
109
|
-
const r =
|
|
108
|
+
if (this.hasOwnProperty(Me("elementProperties"))) return;
|
|
109
|
+
const r = Zo(this);
|
|
110
110
|
r.finalize(), r.l !== void 0 && (this.l = [...r.l]), this.elementProperties = new Map(r.elementProperties);
|
|
111
111
|
}
|
|
112
112
|
static finalize() {
|
|
113
|
-
if (this.hasOwnProperty(
|
|
114
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
115
|
-
const o = this.properties, i = [...
|
|
113
|
+
if (this.hasOwnProperty(Me("finalized"))) return;
|
|
114
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(Me("properties"))) {
|
|
115
|
+
const o = this.properties, i = [...Yo(o), ...Ko(o)];
|
|
116
116
|
for (const c of i) this.createProperty(c, o[c]);
|
|
117
117
|
}
|
|
118
118
|
const r = this[Symbol.metadata];
|
|
@@ -131,8 +131,8 @@ class ke extends HTMLElement {
|
|
|
131
131
|
const o = [];
|
|
132
132
|
if (Array.isArray(r)) {
|
|
133
133
|
const i = new Set(r.flat(1 / 0).reverse());
|
|
134
|
-
for (const c of i) o.unshift(
|
|
135
|
-
} else r !== void 0 && o.push(
|
|
134
|
+
for (const c of i) o.unshift(xs(c));
|
|
135
|
+
} else r !== void 0 && o.push(xs(r));
|
|
136
136
|
return o;
|
|
137
137
|
}
|
|
138
138
|
static _$Eu(r, o) {
|
|
@@ -161,7 +161,7 @@ class ke extends HTMLElement {
|
|
|
161
161
|
}
|
|
162
162
|
createRenderRoot() {
|
|
163
163
|
const r = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
164
|
-
return
|
|
164
|
+
return Qo(r, this.constructor.elementStyles), r;
|
|
165
165
|
}
|
|
166
166
|
connectedCallback() {
|
|
167
167
|
var r;
|
|
@@ -186,21 +186,21 @@ class ke extends HTMLElement {
|
|
|
186
186
|
var t;
|
|
187
187
|
const i = this.constructor.elementProperties.get(r), c = this.constructor._$Eu(r, i);
|
|
188
188
|
if (c !== void 0 && i.reflect === !0) {
|
|
189
|
-
const
|
|
190
|
-
this._$Em = r,
|
|
189
|
+
const u = (((t = i.converter) == null ? void 0 : t.toAttribute) !== void 0 ? i.converter : bt).toAttribute(o, i.type);
|
|
190
|
+
this._$Em = r, u == null ? this.removeAttribute(c) : this.setAttribute(c, u), this._$Em = null;
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
_$AK(r, o) {
|
|
194
194
|
var t;
|
|
195
195
|
const i = this.constructor, c = i._$Eh.get(r);
|
|
196
196
|
if (c !== void 0 && this._$Em !== c) {
|
|
197
|
-
const
|
|
198
|
-
this._$Em = c, this[c] =
|
|
197
|
+
const u = i.getPropertyOptions(c), g = typeof u.converter == "function" ? { fromAttribute: u.converter } : ((t = u.converter) == null ? void 0 : t.fromAttribute) !== void 0 ? u.converter : bt;
|
|
198
|
+
this._$Em = c, this[c] = g.fromAttribute(o, u.type), this._$Em = null;
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
requestUpdate(r, o, i) {
|
|
202
202
|
if (r !== void 0) {
|
|
203
|
-
if (i ?? (i = this.constructor.getPropertyOptions(r)), !(i.hasChanged ??
|
|
203
|
+
if (i ?? (i = this.constructor.getPropertyOptions(r)), !(i.hasChanged ?? or)(this[r], o)) return;
|
|
204
204
|
this.P(r, o, i);
|
|
205
205
|
}
|
|
206
206
|
this.isUpdatePending === !1 && (this._$ES = this._$ET());
|
|
@@ -226,11 +226,11 @@ class ke extends HTMLElement {
|
|
|
226
226
|
if (!this.isUpdatePending) return;
|
|
227
227
|
if (!this.hasUpdated) {
|
|
228
228
|
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
|
|
229
|
-
for (const [t,
|
|
229
|
+
for (const [t, u] of this._$Ep) this[t] = u;
|
|
230
230
|
this._$Ep = void 0;
|
|
231
231
|
}
|
|
232
232
|
const c = this.constructor.elementProperties;
|
|
233
|
-
if (c.size > 0) for (const [t,
|
|
233
|
+
if (c.size > 0) for (const [t, u] of c) u.wrapped !== !0 || this._$AL.has(t) || this[t] === void 0 || this.P(t, this[t], u);
|
|
234
234
|
}
|
|
235
235
|
let r = !1;
|
|
236
236
|
const o = this._$AL;
|
|
@@ -273,76 +273,76 @@ class ke extends HTMLElement {
|
|
|
273
273
|
firstUpdated(r) {
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
-
ke.elementStyles = [], ke.shadowRootOptions = { mode: "open" }, ke[
|
|
276
|
+
ke.elementStyles = [], ke.shadowRootOptions = { mode: "open" }, ke[Me("elementProperties")] = /* @__PURE__ */ new Map(), ke[Me("finalized")] = /* @__PURE__ */ new Map(), Yt == null || Yt({ ReactiveElement: ke }), (oe.reactiveElementVersions ?? (oe.reactiveElementVersions = [])).push("2.0.4");
|
|
277
277
|
/**
|
|
278
278
|
* @license
|
|
279
279
|
* Copyright 2017 Google LLC
|
|
280
280
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
281
281
|
*/
|
|
282
|
-
const
|
|
283
|
-
\f\r]`,
|
|
284
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"),
|
|
285
|
-
function
|
|
286
|
-
if (!
|
|
287
|
-
return
|
|
288
|
-
}
|
|
289
|
-
const
|
|
282
|
+
const Fe = globalThis, vt = Fe.trustedTypes, ks = vt ? vt.createPolicy("lit-html", { createHTML: (s) => s }) : void 0, Bs = "$lit$", ie = `lit$${Math.random().toFixed(9).slice(2)}$`, Us = "?" + ie, Go = `<${Us}>`, fe = document, Qe = () => fe.createComment(""), He = (s) => s === null || typeof s != "object" && typeof s != "function", nr = Array.isArray, Jo = (s) => nr(s) || typeof (s == null ? void 0 : s[Symbol.iterator]) == "function", Kt = `[
|
|
283
|
+
\f\r]`, Ue = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Cs = /-->/g, Es = />/g, ue = RegExp(`>|${Kt}(?:([^\\s"'>=/]+)(${Kt}*=${Kt}*(?:[^
|
|
284
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Os = /'/g, Ps = /"/g, Ms = /^(?:script|style|textarea|title)$/i, Vo = (s) => (r, ...o) => ({ _$litType$: s, strings: r, values: o }), w = Vo(1), he = Symbol.for("lit-noChange"), C = Symbol.for("lit-nothing"), Ts = /* @__PURE__ */ new WeakMap(), de = fe.createTreeWalker(fe, 129);
|
|
285
|
+
function Fs(s, r) {
|
|
286
|
+
if (!nr(s) || !s.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
287
|
+
return ks !== void 0 ? ks.createHTML(r) : r;
|
|
288
|
+
}
|
|
289
|
+
const en = (s, r) => {
|
|
290
290
|
const o = s.length - 1, i = [];
|
|
291
|
-
let c, t = r === 2 ? "<svg>" : r === 3 ? "<math>" : "",
|
|
292
|
-
for (let
|
|
293
|
-
const
|
|
294
|
-
let
|
|
295
|
-
for (;
|
|
296
|
-
const
|
|
297
|
-
t +=
|
|
298
|
-
}
|
|
299
|
-
return [
|
|
291
|
+
let c, t = r === 2 ? "<svg>" : r === 3 ? "<math>" : "", u = Ue;
|
|
292
|
+
for (let g = 0; g < o; g++) {
|
|
293
|
+
const b = s[g];
|
|
294
|
+
let x, A, _ = -1, S = 0;
|
|
295
|
+
for (; S < b.length && (u.lastIndex = S, A = u.exec(b), A !== null); ) S = u.lastIndex, u === Ue ? A[1] === "!--" ? u = Cs : A[1] !== void 0 ? u = Es : A[2] !== void 0 ? (Ms.test(A[2]) && (c = RegExp("</" + A[2], "g")), u = ue) : A[3] !== void 0 && (u = ue) : u === ue ? A[0] === ">" ? (u = c ?? Ue, _ = -1) : A[1] === void 0 ? _ = -2 : (_ = u.lastIndex - A[2].length, x = A[1], u = A[3] === void 0 ? ue : A[3] === '"' ? Ps : Os) : u === Ps || u === Os ? u = ue : u === Cs || u === Es ? u = Ue : (u = ue, c = void 0);
|
|
296
|
+
const k = u === ue && s[g + 1].startsWith("/>") ? " " : "";
|
|
297
|
+
t += u === Ue ? b + Go : _ >= 0 ? (i.push(x), b.slice(0, _) + Bs + b.slice(_) + ie + k) : b + ie + (_ === -2 ? g : k);
|
|
298
|
+
}
|
|
299
|
+
return [Fs(s, t + (s[o] || "<?>") + (r === 2 ? "</svg>" : r === 3 ? "</math>" : "")), i];
|
|
300
300
|
};
|
|
301
|
-
class
|
|
301
|
+
class qe {
|
|
302
302
|
constructor({ strings: r, _$litType$: o }, i) {
|
|
303
303
|
let c;
|
|
304
304
|
this.parts = [];
|
|
305
|
-
let t = 0,
|
|
306
|
-
const
|
|
307
|
-
if (this.el =
|
|
305
|
+
let t = 0, u = 0;
|
|
306
|
+
const g = r.length - 1, b = this.parts, [x, A] = en(r, o);
|
|
307
|
+
if (this.el = qe.createElement(x, i), de.currentNode = this.el.content, o === 2 || o === 3) {
|
|
308
308
|
const _ = this.el.content.firstChild;
|
|
309
309
|
_.replaceWith(..._.childNodes);
|
|
310
310
|
}
|
|
311
|
-
for (; (c =
|
|
311
|
+
for (; (c = de.nextNode()) !== null && b.length < g; ) {
|
|
312
312
|
if (c.nodeType === 1) {
|
|
313
|
-
if (c.hasAttributes()) for (const _ of c.getAttributeNames()) if (_.endsWith(
|
|
314
|
-
const
|
|
315
|
-
|
|
316
|
-
} else _.startsWith(ie) && (
|
|
317
|
-
if (
|
|
318
|
-
const _ = c.textContent.split(ie),
|
|
319
|
-
if (
|
|
320
|
-
c.textContent =
|
|
321
|
-
for (let
|
|
322
|
-
c.append(_[
|
|
313
|
+
if (c.hasAttributes()) for (const _ of c.getAttributeNames()) if (_.endsWith(Bs)) {
|
|
314
|
+
const S = A[u++], k = c.getAttribute(_).split(ie), z = /([.?@])?(.*)/.exec(S);
|
|
315
|
+
b.push({ type: 1, index: t, name: z[2], strings: k, ctor: z[1] === "." ? rn : z[1] === "?" ? sn : z[1] === "@" ? on : At }), c.removeAttribute(_);
|
|
316
|
+
} else _.startsWith(ie) && (b.push({ type: 6, index: t }), c.removeAttribute(_));
|
|
317
|
+
if (Ms.test(c.tagName)) {
|
|
318
|
+
const _ = c.textContent.split(ie), S = _.length - 1;
|
|
319
|
+
if (S > 0) {
|
|
320
|
+
c.textContent = vt ? vt.emptyScript : "";
|
|
321
|
+
for (let k = 0; k < S; k++) c.append(_[k], Qe()), de.nextNode(), b.push({ type: 2, index: ++t });
|
|
322
|
+
c.append(_[S], Qe());
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
|
-
} else if (c.nodeType === 8) if (c.data ===
|
|
325
|
+
} else if (c.nodeType === 8) if (c.data === Us) b.push({ type: 2, index: t });
|
|
326
326
|
else {
|
|
327
327
|
let _ = -1;
|
|
328
|
-
for (; (_ = c.data.indexOf(ie, _ + 1)) !== -1; )
|
|
328
|
+
for (; (_ = c.data.indexOf(ie, _ + 1)) !== -1; ) b.push({ type: 7, index: t }), _ += ie.length - 1;
|
|
329
329
|
}
|
|
330
330
|
t++;
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
static createElement(r, o) {
|
|
334
|
-
const i =
|
|
334
|
+
const i = fe.createElement("template");
|
|
335
335
|
return i.innerHTML = r, i;
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
|
-
function
|
|
339
|
-
var
|
|
340
|
-
if (r ===
|
|
341
|
-
let c = i !== void 0 ? (
|
|
342
|
-
const t =
|
|
343
|
-
return (c == null ? void 0 : c.constructor) !== t && ((
|
|
338
|
+
function Ee(s, r, o = s, i) {
|
|
339
|
+
var u, g;
|
|
340
|
+
if (r === he) return r;
|
|
341
|
+
let c = i !== void 0 ? (u = o._$Co) == null ? void 0 : u[i] : o._$Cl;
|
|
342
|
+
const t = He(r) ? void 0 : r._$litDirective$;
|
|
343
|
+
return (c == null ? void 0 : c.constructor) !== t && ((g = c == null ? void 0 : c._$AO) == null || g.call(c, !1), t === void 0 ? c = void 0 : (c = new t(s), c._$AT(s, o, i)), i !== void 0 ? (o._$Co ?? (o._$Co = []))[i] = c : o._$Cl = c), c !== void 0 && (r = Ee(s, c._$AS(s, r.values), c, i)), r;
|
|
344
344
|
}
|
|
345
|
-
class
|
|
345
|
+
class tn {
|
|
346
346
|
constructor(r, o) {
|
|
347
347
|
this._$AV = [], this._$AN = void 0, this._$AD = r, this._$AM = o;
|
|
348
348
|
}
|
|
@@ -353,24 +353,24 @@ class qo {
|
|
|
353
353
|
return this._$AM._$AU;
|
|
354
354
|
}
|
|
355
355
|
u(r) {
|
|
356
|
-
const { el: { content: o }, parts: i } = this._$AD, c = ((r == null ? void 0 : r.creationScope) ??
|
|
357
|
-
|
|
358
|
-
let t =
|
|
359
|
-
for (;
|
|
360
|
-
if (
|
|
361
|
-
let
|
|
362
|
-
|
|
356
|
+
const { el: { content: o }, parts: i } = this._$AD, c = ((r == null ? void 0 : r.creationScope) ?? fe).importNode(o, !0);
|
|
357
|
+
de.currentNode = c;
|
|
358
|
+
let t = de.nextNode(), u = 0, g = 0, b = i[0];
|
|
359
|
+
for (; b !== void 0; ) {
|
|
360
|
+
if (u === b.index) {
|
|
361
|
+
let x;
|
|
362
|
+
b.type === 2 ? x = new Ke(t, t.nextSibling, this, r) : b.type === 1 ? x = new b.ctor(t, b.name, b.strings, this, r) : b.type === 6 && (x = new nn(t, this, r)), this._$AV.push(x), b = i[++g];
|
|
363
363
|
}
|
|
364
|
-
|
|
364
|
+
u !== (b == null ? void 0 : b.index) && (t = de.nextNode(), u++);
|
|
365
365
|
}
|
|
366
|
-
return
|
|
366
|
+
return de.currentNode = fe, c;
|
|
367
367
|
}
|
|
368
368
|
p(r) {
|
|
369
369
|
let o = 0;
|
|
370
370
|
for (const i of this._$AV) i !== void 0 && (i.strings !== void 0 ? (i._$AI(r, i, o), o += i.strings.length - 2) : i._$AI(r[o])), o++;
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
|
-
class
|
|
373
|
+
class Ke {
|
|
374
374
|
get _$AU() {
|
|
375
375
|
var r;
|
|
376
376
|
return ((r = this._$AM) == null ? void 0 : r._$AU) ?? this._$Cv;
|
|
@@ -390,7 +390,7 @@ class qe {
|
|
|
390
390
|
return this._$AB;
|
|
391
391
|
}
|
|
392
392
|
_$AI(r, o = this) {
|
|
393
|
-
r =
|
|
393
|
+
r = Ee(this, r, o), He(r) ? r === C || r == null || r === "" ? (this._$AH !== C && this._$AR(), this._$AH = C) : r !== this._$AH && r !== he && this._(r) : r._$litType$ !== void 0 ? this.$(r) : r.nodeType !== void 0 ? this.T(r) : Jo(r) ? this.k(r) : this._(r);
|
|
394
394
|
}
|
|
395
395
|
O(r) {
|
|
396
396
|
return this._$AA.parentNode.insertBefore(r, this._$AB);
|
|
@@ -399,26 +399,26 @@ class qe {
|
|
|
399
399
|
this._$AH !== r && (this._$AR(), this._$AH = this.O(r));
|
|
400
400
|
}
|
|
401
401
|
_(r) {
|
|
402
|
-
this._$AH !== C &&
|
|
402
|
+
this._$AH !== C && He(this._$AH) ? this._$AA.nextSibling.data = r : this.T(fe.createTextNode(r)), this._$AH = r;
|
|
403
403
|
}
|
|
404
404
|
$(r) {
|
|
405
405
|
var t;
|
|
406
|
-
const { values: o, _$litType$: i } = r, c = typeof i == "number" ? this._$AC(r) : (i.el === void 0 && (i.el =
|
|
406
|
+
const { values: o, _$litType$: i } = r, c = typeof i == "number" ? this._$AC(r) : (i.el === void 0 && (i.el = qe.createElement(Fs(i.h, i.h[0]), this.options)), i);
|
|
407
407
|
if (((t = this._$AH) == null ? void 0 : t._$AD) === c) this._$AH.p(o);
|
|
408
408
|
else {
|
|
409
|
-
const
|
|
410
|
-
|
|
409
|
+
const u = new tn(c, this), g = u.u(this.options);
|
|
410
|
+
u.p(o), this.T(g), this._$AH = u;
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
413
|
_$AC(r) {
|
|
414
|
-
let o =
|
|
415
|
-
return o === void 0 &&
|
|
414
|
+
let o = Ts.get(r.strings);
|
|
415
|
+
return o === void 0 && Ts.set(r.strings, o = new qe(r)), o;
|
|
416
416
|
}
|
|
417
417
|
k(r) {
|
|
418
|
-
|
|
418
|
+
nr(this._$AH) || (this._$AH = [], this._$AR());
|
|
419
419
|
const o = this._$AH;
|
|
420
420
|
let i, c = 0;
|
|
421
|
-
for (const t of r) c === o.length ? o.push(i = new
|
|
421
|
+
for (const t of r) c === o.length ? o.push(i = new Ke(this.O(Qe()), this.O(Qe()), this, this.options)) : i = o[c], i._$AI(t), c++;
|
|
422
422
|
c < o.length && (this._$AR(i && i._$AB.nextSibling, c), o.length = c);
|
|
423
423
|
}
|
|
424
424
|
_$AR(r = this._$AA.nextSibling, o) {
|
|
@@ -433,7 +433,7 @@ class qe {
|
|
|
433
433
|
this._$AM === void 0 && (this._$Cv = r, (o = this._$AP) == null || o.call(this, r));
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
|
-
class
|
|
436
|
+
class At {
|
|
437
437
|
get tagName() {
|
|
438
438
|
return this.element.tagName;
|
|
439
439
|
}
|
|
@@ -445,20 +445,20 @@ class yt {
|
|
|
445
445
|
}
|
|
446
446
|
_$AI(r, o = this, i, c) {
|
|
447
447
|
const t = this.strings;
|
|
448
|
-
let
|
|
449
|
-
if (t === void 0) r =
|
|
448
|
+
let u = !1;
|
|
449
|
+
if (t === void 0) r = Ee(this, r, o, 0), u = !He(r) || r !== this._$AH && r !== he, u && (this._$AH = r);
|
|
450
450
|
else {
|
|
451
|
-
const
|
|
452
|
-
let
|
|
453
|
-
for (r = t[0],
|
|
451
|
+
const g = r;
|
|
452
|
+
let b, x;
|
|
453
|
+
for (r = t[0], b = 0; b < t.length - 1; b++) x = Ee(this, g[i + b], o, b), x === he && (x = this._$AH[b]), u || (u = !He(x) || x !== this._$AH[b]), x === C ? r = C : r !== C && (r += (x ?? "") + t[b + 1]), this._$AH[b] = x;
|
|
454
454
|
}
|
|
455
|
-
|
|
455
|
+
u && !c && this.j(r);
|
|
456
456
|
}
|
|
457
457
|
j(r) {
|
|
458
458
|
r === C ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, r ?? "");
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
class
|
|
461
|
+
class rn extends At {
|
|
462
462
|
constructor() {
|
|
463
463
|
super(...arguments), this.type = 3;
|
|
464
464
|
}
|
|
@@ -466,7 +466,7 @@ class Wo extends yt {
|
|
|
466
466
|
this.element[this.name] = r === C ? void 0 : r;
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
|
-
class
|
|
469
|
+
class sn extends At {
|
|
470
470
|
constructor() {
|
|
471
471
|
super(...arguments), this.type = 4;
|
|
472
472
|
}
|
|
@@ -474,12 +474,12 @@ class Yo extends yt {
|
|
|
474
474
|
this.element.toggleAttribute(this.name, !!r && r !== C);
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
class
|
|
477
|
+
class on extends At {
|
|
478
478
|
constructor(r, o, i, c, t) {
|
|
479
479
|
super(r, o, i, c, t), this.type = 5;
|
|
480
480
|
}
|
|
481
481
|
_$AI(r, o = this) {
|
|
482
|
-
if ((r =
|
|
482
|
+
if ((r = Ee(this, r, o, 0) ?? C) === he) return;
|
|
483
483
|
const i = this._$AH, c = r === C && i !== C || r.capture !== i.capture || r.once !== i.once || r.passive !== i.passive, t = r !== C && (i === C || c);
|
|
484
484
|
c && this.element.removeEventListener(this.name, this, i), t && this.element.addEventListener(this.name, this, r), this._$AH = r;
|
|
485
485
|
}
|
|
@@ -488,7 +488,7 @@ class Ko extends yt {
|
|
|
488
488
|
typeof this._$AH == "function" ? this._$AH.call(((o = this.options) == null ? void 0 : o.host) ?? this.element, r) : this._$AH.handleEvent(r);
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
|
-
class
|
|
491
|
+
class nn {
|
|
492
492
|
constructor(r, o, i) {
|
|
493
493
|
this.element = r, this.type = 6, this._$AN = void 0, this._$AM = o, this.options = i;
|
|
494
494
|
}
|
|
@@ -496,17 +496,17 @@ class Zo {
|
|
|
496
496
|
return this._$AM._$AU;
|
|
497
497
|
}
|
|
498
498
|
_$AI(r) {
|
|
499
|
-
|
|
499
|
+
Ee(this, r);
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
const
|
|
503
|
-
|
|
504
|
-
const
|
|
502
|
+
const Zt = Fe.litHtmlPolyfillSupport;
|
|
503
|
+
Zt == null || Zt(qe, Ke), (Fe.litHtmlVersions ?? (Fe.litHtmlVersions = [])).push("3.2.1");
|
|
504
|
+
const Is = (s, r, o) => {
|
|
505
505
|
const i = (o == null ? void 0 : o.renderBefore) ?? r;
|
|
506
506
|
let c = i._$litPart$;
|
|
507
507
|
if (c === void 0) {
|
|
508
508
|
const t = (o == null ? void 0 : o.renderBefore) ?? null;
|
|
509
|
-
i._$litPart$ = c = new
|
|
509
|
+
i._$litPart$ = c = new Ke(r.insertBefore(Qe(), t), t, void 0, o ?? {});
|
|
510
510
|
}
|
|
511
511
|
return c._$AI(s), c;
|
|
512
512
|
};
|
|
@@ -515,7 +515,7 @@ const Ns = (s, r, o) => {
|
|
|
515
515
|
* Copyright 2017 Google LLC
|
|
516
516
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
517
517
|
*/
|
|
518
|
-
let
|
|
518
|
+
let O = class extends ke {
|
|
519
519
|
constructor() {
|
|
520
520
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
521
521
|
}
|
|
@@ -526,7 +526,7 @@ let L = class extends ke {
|
|
|
526
526
|
}
|
|
527
527
|
update(r) {
|
|
528
528
|
const o = this.render();
|
|
529
|
-
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(r), this._$Do =
|
|
529
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(r), this._$Do = Is(o, this.renderRoot, this.renderOptions);
|
|
530
530
|
}
|
|
531
531
|
connectedCallback() {
|
|
532
532
|
var r;
|
|
@@ -537,21 +537,21 @@ let L = class extends ke {
|
|
|
537
537
|
super.disconnectedCallback(), (r = this._$Do) == null || r.setConnected(!1);
|
|
538
538
|
}
|
|
539
539
|
render() {
|
|
540
|
-
return
|
|
540
|
+
return he;
|
|
541
541
|
}
|
|
542
542
|
};
|
|
543
|
-
var
|
|
544
|
-
|
|
545
|
-
const
|
|
546
|
-
|
|
543
|
+
var zs;
|
|
544
|
+
O._$litElement$ = !0, O.finalized = !0, (zs = globalThis.litElementHydrateSupport) == null || zs.call(globalThis, { LitElement: O });
|
|
545
|
+
const Xt = globalThis.litElementPolyfillSupport;
|
|
546
|
+
Xt == null || Xt({ LitElement: O });
|
|
547
547
|
(globalThis.litElementVersions ?? (globalThis.litElementVersions = [])).push("4.1.1");
|
|
548
548
|
/**
|
|
549
549
|
* @license
|
|
550
550
|
* Copyright 2017 Google LLC
|
|
551
551
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
552
552
|
*/
|
|
553
|
-
const
|
|
554
|
-
let
|
|
553
|
+
const Qs = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, ar = (s) => (...r) => ({ _$litDirective$: s, values: r });
|
|
554
|
+
let Hs = class {
|
|
555
555
|
constructor(r) {
|
|
556
556
|
}
|
|
557
557
|
get _$AU() {
|
|
@@ -572,10 +572,10 @@ let js = class {
|
|
|
572
572
|
* Copyright 2018 Google LLC
|
|
573
573
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
574
574
|
*/
|
|
575
|
-
const
|
|
575
|
+
const qs = "important", an = " !" + qs, Ws = ar(class extends Hs {
|
|
576
576
|
constructor(s) {
|
|
577
577
|
var r;
|
|
578
|
-
if (super(s), s.type !==
|
|
578
|
+
if (super(s), s.type !== Qs.ATTRIBUTE || s.name !== "style" || ((r = s.strings) == null ? void 0 : r.length) > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
|
|
579
579
|
}
|
|
580
580
|
render(s) {
|
|
581
581
|
return Object.keys(s).reduce((r, o) => {
|
|
@@ -591,13 +591,13 @@ const Rs = "important", Xo = " !" + Rs, Bs = er(class extends js {
|
|
|
591
591
|
const c = r[i];
|
|
592
592
|
if (c != null) {
|
|
593
593
|
this.ft.add(i);
|
|
594
|
-
const t = typeof c == "string" && c.endsWith(
|
|
595
|
-
i.includes("-") || t ? o.setProperty(i, t ? c.slice(0, -11) : c, t ?
|
|
594
|
+
const t = typeof c == "string" && c.endsWith(an);
|
|
595
|
+
i.includes("-") || t ? o.setProperty(i, t ? c.slice(0, -11) : c, t ? qs : "") : o[i] = c;
|
|
596
596
|
}
|
|
597
597
|
}
|
|
598
|
-
return
|
|
598
|
+
return he;
|
|
599
599
|
}
|
|
600
|
-
}),
|
|
600
|
+
}), cn = Z`
|
|
601
601
|
:host{
|
|
602
602
|
display: inline-block;
|
|
603
603
|
--text-on-color: var(--spectric-text-on-color, #ffffff);
|
|
@@ -676,6 +676,53 @@ const Rs = "important", Xo = " !" + Rs, Bs = er(class extends js {
|
|
|
676
676
|
box-shadow: 0 0 30px white inset;
|
|
677
677
|
}
|
|
678
678
|
|
|
679
|
+
:host([icon]) .spectric-button {
|
|
680
|
+
padding: unset;
|
|
681
|
+
display: flex;
|
|
682
|
+
align-items: center;
|
|
683
|
+
justify-content: center;
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
/* :host([icon][size="small"]){
|
|
687
|
+
height:12px;
|
|
688
|
+
width:12px;
|
|
689
|
+
}
|
|
690
|
+
|
|
691
|
+
:host([icon][size="medium"]){
|
|
692
|
+
height:14px;
|
|
693
|
+
width:14px;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
:host([icon][size="large"]){
|
|
697
|
+
width: 48px;
|
|
698
|
+
height: 48px;
|
|
699
|
+
} */
|
|
700
|
+
:host([icon][size="tiny"]) .spectric-button{
|
|
701
|
+
width: 10px;
|
|
702
|
+
height: 10px;
|
|
703
|
+
}
|
|
704
|
+
:host([icon][size="xxsmall"]) .spectric-button{
|
|
705
|
+
width: 20px;
|
|
706
|
+
height: 20px;
|
|
707
|
+
}
|
|
708
|
+
:host([icon][size="xsmall"]) .spectric-button{
|
|
709
|
+
width: 28px;
|
|
710
|
+
height: 28px;
|
|
711
|
+
}
|
|
712
|
+
:host([icon][size="small"]) .spectric-button{
|
|
713
|
+
width: 34px;
|
|
714
|
+
height: 34px;
|
|
715
|
+
}
|
|
716
|
+
:host([icon][size="medium"]) .spectric-button{
|
|
717
|
+
width: 40px;
|
|
718
|
+
height: 40px;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
:host([icon][size="large"]) .spectric-button{
|
|
722
|
+
width: 48px;
|
|
723
|
+
height: 48px;
|
|
724
|
+
}
|
|
725
|
+
|
|
679
726
|
.spectric-button:disabled{
|
|
680
727
|
cursor: not-allowed;
|
|
681
728
|
pointer-events: none;
|
|
@@ -743,6 +790,25 @@ opacity:1
|
|
|
743
790
|
background-color: transparent;
|
|
744
791
|
color: var(--text-secondary);
|
|
745
792
|
}
|
|
793
|
+
.spectric-button--tiny {
|
|
794
|
+
font-size: 10px;
|
|
795
|
+
line-height: 10px;
|
|
796
|
+
height: 10px;
|
|
797
|
+
display: flex;
|
|
798
|
+
align-content: center;
|
|
799
|
+
align-items: center;
|
|
800
|
+
}
|
|
801
|
+
.spectric-button--xxsmall {
|
|
802
|
+
padding: 5px 6px;
|
|
803
|
+
font-size: 10px;
|
|
804
|
+
line-height: 8px;
|
|
805
|
+
}
|
|
806
|
+
.spectric-button--xsmall {
|
|
807
|
+
padding: 5px 8px;
|
|
808
|
+
font-size: 10px;
|
|
809
|
+
font-size: 12px;
|
|
810
|
+
line-height: 14px;
|
|
811
|
+
}
|
|
746
812
|
.spectric-button--small {
|
|
747
813
|
padding: 5px 10px;
|
|
748
814
|
font-size: 12px;
|
|
@@ -761,7 +827,7 @@ opacity:1
|
|
|
761
827
|
* Copyright 2017 Google LLC
|
|
762
828
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
763
829
|
*/
|
|
764
|
-
const
|
|
830
|
+
const N = (s) => (r, o) => {
|
|
765
831
|
o !== void 0 ? o.addInitializer(() => {
|
|
766
832
|
customElements.define(s, r);
|
|
767
833
|
}) : customElements.define(s, r);
|
|
@@ -771,31 +837,31 @@ const I = (s) => (r, o) => {
|
|
|
771
837
|
* Copyright 2017 Google LLC
|
|
772
838
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
773
839
|
*/
|
|
774
|
-
const
|
|
840
|
+
const ln = { attribute: !0, type: String, converter: bt, reflect: !1, hasChanged: or }, pn = (s = ln, r, o) => {
|
|
775
841
|
const { kind: i, metadata: c } = o;
|
|
776
842
|
let t = globalThis.litPropertyMetadata.get(c);
|
|
777
843
|
if (t === void 0 && globalThis.litPropertyMetadata.set(c, t = /* @__PURE__ */ new Map()), t.set(o.name, s), i === "accessor") {
|
|
778
|
-
const { name:
|
|
779
|
-
return { set(
|
|
780
|
-
const
|
|
781
|
-
r.set.call(this,
|
|
782
|
-
}, init(
|
|
783
|
-
return
|
|
844
|
+
const { name: u } = o;
|
|
845
|
+
return { set(g) {
|
|
846
|
+
const b = r.get.call(this);
|
|
847
|
+
r.set.call(this, g), this.requestUpdate(u, b, s);
|
|
848
|
+
}, init(g) {
|
|
849
|
+
return g !== void 0 && this.P(u, void 0, s), g;
|
|
784
850
|
} };
|
|
785
851
|
}
|
|
786
852
|
if (i === "setter") {
|
|
787
|
-
const { name:
|
|
788
|
-
return function(
|
|
789
|
-
const
|
|
790
|
-
r.call(this,
|
|
853
|
+
const { name: u } = o;
|
|
854
|
+
return function(g) {
|
|
855
|
+
const b = this[u];
|
|
856
|
+
r.call(this, g), this.requestUpdate(u, b, s);
|
|
791
857
|
};
|
|
792
858
|
}
|
|
793
859
|
throw Error("Unsupported decorator location: " + i);
|
|
794
860
|
};
|
|
795
861
|
function v(s) {
|
|
796
|
-
return (r, o) => typeof o == "object" ?
|
|
797
|
-
const
|
|
798
|
-
return c.constructor.createProperty(t,
|
|
862
|
+
return (r, o) => typeof o == "object" ? pn(s, r, o) : ((i, c, t) => {
|
|
863
|
+
const u = c.hasOwnProperty(t);
|
|
864
|
+
return c.constructor.createProperty(t, u ? { ...i, wrapped: !0 } : i), u ? Object.getOwnPropertyDescriptor(c, t) : void 0;
|
|
799
865
|
})(s, r, o);
|
|
800
866
|
}
|
|
801
867
|
/**
|
|
@@ -803,7 +869,7 @@ function v(s) {
|
|
|
803
869
|
* Copyright 2017 Google LLC
|
|
804
870
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
805
871
|
*/
|
|
806
|
-
function
|
|
872
|
+
function St(s) {
|
|
807
873
|
return v({ ...s, state: !0, attribute: !1 });
|
|
808
874
|
}
|
|
809
875
|
/**
|
|
@@ -811,19 +877,19 @@ function mt(s) {
|
|
|
811
877
|
* Copyright 2017 Google LLC
|
|
812
878
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
813
879
|
*/
|
|
814
|
-
const
|
|
880
|
+
const Ys = (s, r, o) => (o.configurable = !0, o.enumerable = !0, Reflect.decorate && typeof r != "object" && Object.defineProperty(s, r, o), o);
|
|
815
881
|
/**
|
|
816
882
|
* @license
|
|
817
883
|
* Copyright 2017 Google LLC
|
|
818
884
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
819
885
|
*/
|
|
820
|
-
function
|
|
886
|
+
function Ze(s, r) {
|
|
821
887
|
return (o, i, c) => {
|
|
822
|
-
const t = (
|
|
823
|
-
var
|
|
824
|
-
return ((
|
|
888
|
+
const t = (u) => {
|
|
889
|
+
var g;
|
|
890
|
+
return ((g = u.renderRoot) == null ? void 0 : g.querySelector(s)) ?? null;
|
|
825
891
|
};
|
|
826
|
-
return
|
|
892
|
+
return Ys(o, i, { get() {
|
|
827
893
|
return t(this);
|
|
828
894
|
} });
|
|
829
895
|
};
|
|
@@ -833,25 +899,25 @@ function We(s, r) {
|
|
|
833
899
|
* Copyright 2017 Google LLC
|
|
834
900
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
835
901
|
*/
|
|
836
|
-
function
|
|
837
|
-
return (r, o) =>
|
|
902
|
+
function kt(s) {
|
|
903
|
+
return (r, o) => Ys(r, o, { async get() {
|
|
838
904
|
var i;
|
|
839
905
|
return await this.updateComplete, ((i = this.renderRoot) == null ? void 0 : i.querySelector(s)) ?? null;
|
|
840
906
|
} });
|
|
841
907
|
}
|
|
842
|
-
var
|
|
843
|
-
for (var c = i > 1 ? void 0 : i ?
|
|
844
|
-
(
|
|
845
|
-
return i && c &&
|
|
846
|
-
},
|
|
847
|
-
const
|
|
908
|
+
var un = Object.defineProperty, dn = Object.getOwnPropertyDescriptor, ce = (s, r, o, i) => {
|
|
909
|
+
for (var c = i > 1 ? void 0 : i ? dn(r, o) : r, t = s.length - 1, u; t >= 0; t--)
|
|
910
|
+
(u = s[t]) && (c = (i ? u(r, o, c) : u(c)) || c);
|
|
911
|
+
return i && c && un(r, o, c), c;
|
|
912
|
+
}, fn = /* @__PURE__ */ ((s) => (s.large = "large", s.medium = "medium", s.small = "small", s.xsmall = "xsmall", s.xxsmall = "xxsmall", s.tiny = "tiny", s))(fn || {}), hn = /* @__PURE__ */ ((s) => (s.primary = "primary", s.secondary = "secondary", s.text = "text", s))(hn || {});
|
|
913
|
+
const gn = {
|
|
848
914
|
primary: "spectric-button--primary",
|
|
849
915
|
secondary: "spectric-button--secondary",
|
|
850
916
|
text: "spectric-button--text"
|
|
851
917
|
};
|
|
852
|
-
let
|
|
918
|
+
let K = class extends O {
|
|
853
919
|
constructor() {
|
|
854
|
-
super(...arguments), this.variant = "primary", this.disabled = !1, this.size = "
|
|
920
|
+
super(...arguments), this.variant = "primary", this.disabled = !1, this.size = "small", this.label = "", this.danger = !1, this.icon = !1, this._onClick = (s) => {
|
|
855
921
|
if (s instanceof CustomEvent)
|
|
856
922
|
return;
|
|
857
923
|
s.preventDefault(), s.stopImmediatePropagation(), s.stopPropagation();
|
|
@@ -864,19 +930,19 @@ let J = class extends L {
|
|
|
864
930
|
};
|
|
865
931
|
}
|
|
866
932
|
connectedCallback() {
|
|
867
|
-
super.connectedCallback(), this.addEventListener("click", this._onClick);
|
|
933
|
+
super.connectedCallback(), this.addEventListener("click", this._onClick, { capture: !0 });
|
|
868
934
|
}
|
|
869
935
|
disconnectedCallback() {
|
|
870
936
|
super.disconnectedCallback(), this.removeEventListener("click", this._onClick);
|
|
871
937
|
}
|
|
872
938
|
render() {
|
|
873
|
-
const s =
|
|
874
|
-
return
|
|
939
|
+
const s = gn[this.variant] || "spectric-button--primary";
|
|
940
|
+
return w`
|
|
875
941
|
<button
|
|
876
942
|
type="button"
|
|
877
943
|
?disabled=${this.disabled}
|
|
878
944
|
class=${["spectric-button", `spectric-button-danger--${this.danger || !1}`, `spectric-button--${this.size || "medium"}`, s].join(" ")}
|
|
879
|
-
style=${
|
|
945
|
+
style=${Ws({ backgroundColor: this.backgroundColor })}
|
|
880
946
|
>
|
|
881
947
|
<span class="animation"></span>
|
|
882
948
|
<slot>${this.label}</slot>
|
|
@@ -884,84 +950,87 @@ let J = class extends L {
|
|
|
884
950
|
`;
|
|
885
951
|
}
|
|
886
952
|
};
|
|
887
|
-
|
|
888
|
-
|
|
953
|
+
K.styles = cn;
|
|
954
|
+
ce([
|
|
889
955
|
v({ type: String, reflect: !0 })
|
|
890
|
-
],
|
|
891
|
-
|
|
956
|
+
], K.prototype, "variant", 2);
|
|
957
|
+
ce([
|
|
892
958
|
v({ type: Boolean, reflect: !0 })
|
|
893
|
-
],
|
|
894
|
-
|
|
959
|
+
], K.prototype, "disabled", 2);
|
|
960
|
+
ce([
|
|
895
961
|
v({ type: String, reflect: !0 })
|
|
896
|
-
],
|
|
897
|
-
|
|
962
|
+
], K.prototype, "backgroundColor", 2);
|
|
963
|
+
ce([
|
|
898
964
|
v({ type: String, reflect: !0 })
|
|
899
|
-
],
|
|
900
|
-
|
|
965
|
+
], K.prototype, "size", 2);
|
|
966
|
+
ce([
|
|
901
967
|
v({ type: String, reflect: !0 })
|
|
902
|
-
],
|
|
903
|
-
|
|
968
|
+
], K.prototype, "label", 2);
|
|
969
|
+
ce([
|
|
970
|
+
v({ type: Boolean, reflect: !0 })
|
|
971
|
+
], K.prototype, "danger", 2);
|
|
972
|
+
ce([
|
|
904
973
|
v({ type: Boolean, reflect: !0 })
|
|
905
|
-
],
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
],
|
|
974
|
+
], K.prototype, "icon", 2);
|
|
975
|
+
K = ce([
|
|
976
|
+
N("spectric-button")
|
|
977
|
+
], K);
|
|
909
978
|
/**
|
|
910
979
|
* @license
|
|
911
980
|
* Copyright 2020 Google LLC
|
|
912
981
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
913
982
|
*/
|
|
914
|
-
const
|
|
983
|
+
const bn = (s) => s.strings === void 0;
|
|
915
984
|
/**
|
|
916
985
|
* @license
|
|
917
986
|
* Copyright 2017 Google LLC
|
|
918
987
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
919
988
|
*/
|
|
920
|
-
const
|
|
989
|
+
const Ie = (s, r) => {
|
|
921
990
|
var i;
|
|
922
991
|
const o = s._$AN;
|
|
923
992
|
if (o === void 0) return !1;
|
|
924
|
-
for (const c of o) (i = c._$AO) == null || i.call(c, r, !1),
|
|
993
|
+
for (const c of o) (i = c._$AO) == null || i.call(c, r, !1), Ie(c, r);
|
|
925
994
|
return !0;
|
|
926
|
-
},
|
|
995
|
+
}, yt = (s) => {
|
|
927
996
|
let r, o;
|
|
928
997
|
do {
|
|
929
998
|
if ((r = s._$AM) === void 0) break;
|
|
930
999
|
o = r._$AN, o.delete(s), s = r;
|
|
931
1000
|
} while ((o == null ? void 0 : o.size) === 0);
|
|
932
|
-
},
|
|
1001
|
+
}, Ks = (s) => {
|
|
933
1002
|
for (let r; r = s._$AM; s = r) {
|
|
934
1003
|
let o = r._$AN;
|
|
935
1004
|
if (o === void 0) r._$AN = o = /* @__PURE__ */ new Set();
|
|
936
1005
|
else if (o.has(s)) break;
|
|
937
|
-
o.add(s),
|
|
1006
|
+
o.add(s), mn(r);
|
|
938
1007
|
}
|
|
939
1008
|
};
|
|
940
|
-
function
|
|
941
|
-
this._$AN !== void 0 ? (
|
|
1009
|
+
function vn(s) {
|
|
1010
|
+
this._$AN !== void 0 ? (yt(this), this._$AM = s, Ks(this)) : this._$AM = s;
|
|
942
1011
|
}
|
|
943
|
-
function
|
|
1012
|
+
function yn(s, r = !1, o = 0) {
|
|
944
1013
|
const i = this._$AH, c = this._$AN;
|
|
945
|
-
if (c !== void 0 && c.size !== 0) if (r) if (Array.isArray(i)) for (let t = o; t < i.length; t++)
|
|
946
|
-
else i != null && (
|
|
947
|
-
else
|
|
1014
|
+
if (c !== void 0 && c.size !== 0) if (r) if (Array.isArray(i)) for (let t = o; t < i.length; t++) Ie(i[t], !1), yt(i[t]);
|
|
1015
|
+
else i != null && (Ie(i, !1), yt(i));
|
|
1016
|
+
else Ie(this, s);
|
|
948
1017
|
}
|
|
949
|
-
const
|
|
950
|
-
s.type ==
|
|
1018
|
+
const mn = (s) => {
|
|
1019
|
+
s.type == Qs.CHILD && (s._$AP ?? (s._$AP = yn), s._$AQ ?? (s._$AQ = vn));
|
|
951
1020
|
};
|
|
952
|
-
class
|
|
1021
|
+
class Zs extends Hs {
|
|
953
1022
|
constructor() {
|
|
954
1023
|
super(...arguments), this._$AN = void 0;
|
|
955
1024
|
}
|
|
956
1025
|
_$AT(r, o, i) {
|
|
957
|
-
super._$AT(r, o, i),
|
|
1026
|
+
super._$AT(r, o, i), Ks(this), this.isConnected = r._$AU;
|
|
958
1027
|
}
|
|
959
1028
|
_$AO(r, o = !0) {
|
|
960
1029
|
var i, c;
|
|
961
|
-
r !== this.isConnected && (this.isConnected = r, r ? (i = this.reconnected) == null || i.call(this) : (c = this.disconnected) == null || c.call(this)), o && (
|
|
1030
|
+
r !== this.isConnected && (this.isConnected = r, r ? (i = this.reconnected) == null || i.call(this) : (c = this.disconnected) == null || c.call(this)), o && (Ie(this, r), yt(this));
|
|
962
1031
|
}
|
|
963
1032
|
setValue(r) {
|
|
964
|
-
if (
|
|
1033
|
+
if (bn(this._$Ct)) this._$Ct._$AI(r, this);
|
|
965
1034
|
else {
|
|
966
1035
|
const o = [...this._$Ct._$AH];
|
|
967
1036
|
o[this._$Ci] = r, this._$Ct._$AI(o, this, 0);
|
|
@@ -977,10 +1046,10 @@ class zs extends js {
|
|
|
977
1046
|
* Copyright 2020 Google LLC
|
|
978
1047
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
979
1048
|
*/
|
|
980
|
-
const
|
|
981
|
-
class
|
|
1049
|
+
const ft = () => new $n();
|
|
1050
|
+
class $n {
|
|
982
1051
|
}
|
|
983
|
-
const
|
|
1052
|
+
const Gt = /* @__PURE__ */ new WeakMap(), ht = ar(class extends Zs {
|
|
984
1053
|
render(s) {
|
|
985
1054
|
return C;
|
|
986
1055
|
}
|
|
@@ -992,13 +1061,13 @@ const Ht = /* @__PURE__ */ new WeakMap(), pt = er(class extends zs {
|
|
|
992
1061
|
rt(s) {
|
|
993
1062
|
if (this.isConnected || (s = void 0), typeof this.Y == "function") {
|
|
994
1063
|
const r = this.ht ?? globalThis;
|
|
995
|
-
let o =
|
|
996
|
-
o === void 0 && (o = /* @__PURE__ */ new WeakMap(),
|
|
1064
|
+
let o = Gt.get(r);
|
|
1065
|
+
o === void 0 && (o = /* @__PURE__ */ new WeakMap(), Gt.set(r, o)), o.get(this.Y) !== void 0 && this.Y.call(this.ht, void 0), o.set(this.Y, s), s !== void 0 && this.Y.call(this.ht, s);
|
|
997
1066
|
} else this.Y.value = s;
|
|
998
1067
|
}
|
|
999
1068
|
get lt() {
|
|
1000
1069
|
var s, r;
|
|
1001
|
-
return typeof this.Y == "function" ? (s =
|
|
1070
|
+
return typeof this.Y == "function" ? (s = Gt.get(this.ht ?? globalThis)) == null ? void 0 : s.get(this.Y) : (r = this.Y) == null ? void 0 : r.value;
|
|
1002
1071
|
}
|
|
1003
1072
|
disconnected() {
|
|
1004
1073
|
this.lt === this.ct && this.rt(void 0);
|
|
@@ -1006,7 +1075,7 @@ const Ht = /* @__PURE__ */ new WeakMap(), pt = er(class extends zs {
|
|
|
1006
1075
|
reconnected() {
|
|
1007
1076
|
this.rt(this.ct);
|
|
1008
1077
|
}
|
|
1009
|
-
}),
|
|
1078
|
+
}), _n = class {
|
|
1010
1079
|
constructor(r) {
|
|
1011
1080
|
return this.buffer = r, this.u8 = new Uint8Array(r), new Proxy(this, {
|
|
1012
1081
|
get(o, i) {
|
|
@@ -1037,7 +1106,7 @@ const Ht = /* @__PURE__ */ new WeakMap(), pt = er(class extends zs {
|
|
|
1037
1106
|
return i;
|
|
1038
1107
|
}
|
|
1039
1108
|
};
|
|
1040
|
-
class
|
|
1109
|
+
class Ls {
|
|
1041
1110
|
constructor(r, o, i, c) {
|
|
1042
1111
|
this.__target = r, this._handler = i, this._type = o, this._handler = i, this._options = c || !1, r instanceof Promise ? r.then((t) => {
|
|
1043
1112
|
this._handler && (this._node = t, this._node.addEventListener(this._type, this._handler, this._options));
|
|
@@ -1047,7 +1116,7 @@ class xs {
|
|
|
1047
1116
|
this._handler && (this._node && (console.log(`removing event ${this._type} from `, this._node, this.__target instanceof Promise), this._node.removeEventListener(this._type, this._handler, this._options)), this.__target = void 0, this._node = void 0, this._handler = void 0);
|
|
1048
1117
|
}
|
|
1049
1118
|
}
|
|
1050
|
-
class
|
|
1119
|
+
class Xs extends O {
|
|
1051
1120
|
constructor() {
|
|
1052
1121
|
super(...arguments), this._disposables = /* @__PURE__ */ new Set(), this._isDisposed = !1, this._disposableListeners = [], this._connected = !1;
|
|
1053
1122
|
}
|
|
@@ -1056,7 +1125,7 @@ class Fs extends L {
|
|
|
1056
1125
|
console.warn("Event handler already exists best practice is to add the this in the constructor");
|
|
1057
1126
|
return;
|
|
1058
1127
|
}
|
|
1059
|
-
this._disposableListeners.push({ target: r, event: o, handler: i }), this._connected && this.registerDisposable(new
|
|
1128
|
+
this._disposableListeners.push({ target: r, event: o, handler: i }), this._connected && this.registerDisposable(new Ls(r, o, i));
|
|
1060
1129
|
}
|
|
1061
1130
|
registerDisposable(r) {
|
|
1062
1131
|
if (!r)
|
|
@@ -1067,7 +1136,7 @@ class Fs extends L {
|
|
|
1067
1136
|
}
|
|
1068
1137
|
connectedCallback() {
|
|
1069
1138
|
super.connectedCallback(), this._connected = !0, this._isDisposed = !1, this._disposableListeners.forEach(({ target: r, event: o, handler: i }) => {
|
|
1070
|
-
this.registerDisposable(new
|
|
1139
|
+
this.registerDisposable(new Ls(r, o, i));
|
|
1071
1140
|
});
|
|
1072
1141
|
}
|
|
1073
1142
|
disconnectedCallback() {
|
|
@@ -1076,7 +1145,7 @@ class Fs extends L {
|
|
|
1076
1145
|
}), this._isDisposed = !0;
|
|
1077
1146
|
}
|
|
1078
1147
|
}
|
|
1079
|
-
const
|
|
1148
|
+
const Gs = (s) => {
|
|
1080
1149
|
var r;
|
|
1081
1150
|
return (...o) => {
|
|
1082
1151
|
r && cancelAnimationFrame(r), r = requestAnimationFrame(() => {
|
|
@@ -1084,18 +1153,18 @@ const Qs = (s) => {
|
|
|
1084
1153
|
});
|
|
1085
1154
|
};
|
|
1086
1155
|
};
|
|
1087
|
-
var
|
|
1088
|
-
for (var c = i > 1 ? void 0 : i ?
|
|
1089
|
-
(
|
|
1090
|
-
return i && c &&
|
|
1156
|
+
var wn = Object.defineProperty, xn = Object.getOwnPropertyDescriptor, ye = (s, r, o, i) => {
|
|
1157
|
+
for (var c = i > 1 ? void 0 : i ? xn(r, o) : r, t = s.length - 1, u; t >= 0; t--)
|
|
1158
|
+
(u = s[t]) && (c = (i ? u(r, o, c) : u(c)) || c);
|
|
1159
|
+
return i && c && wn(r, o, c), c;
|
|
1091
1160
|
};
|
|
1092
|
-
const
|
|
1093
|
-
let V = class extends
|
|
1161
|
+
const An = ["mousemove", "click", "dblclick", "mousedown", "mouseup", "contextmenu"], pt = { width: 200, height: 200 }, mt = { width: 10, height: 10 };
|
|
1162
|
+
let V = class extends Xs {
|
|
1094
1163
|
constructor() {
|
|
1095
1164
|
super(), this.arrayBuffer = new ArrayBuffer(0), this.frameWidth = 100, this.scale = 1, this.width = 200, this.height = 200, this.state = {}, this.yStart = 0, this.xStart = 0, this.refs = {
|
|
1096
|
-
viewport:
|
|
1097
|
-
canvas:
|
|
1098
|
-
scrollDiv:
|
|
1165
|
+
viewport: ft(),
|
|
1166
|
+
canvas: ft(),
|
|
1167
|
+
scrollDiv: ft()
|
|
1099
1168
|
}, this.color = "#000000", this.onThemeChange = () => {
|
|
1100
1169
|
let o = getComputedStyle(this);
|
|
1101
1170
|
this.color != o.color && (this.color = o.color, this.paint());
|
|
@@ -1112,23 +1181,23 @@ let V = class extends Fs {
|
|
|
1112
1181
|
this.resizeObserver.disconnect();
|
|
1113
1182
|
}, this.resizeObserver = s, this.addDisposableListener(document.body, "theme-change", this.onThemeChange);
|
|
1114
1183
|
var r = {};
|
|
1115
|
-
|
|
1116
|
-
this.addDisposableListener(this._canvas, o,
|
|
1184
|
+
An.forEach((o) => {
|
|
1185
|
+
this.addDisposableListener(this._canvas, o, Gs(async (i) => {
|
|
1117
1186
|
i.stopImmediatePropagation(), i.stopPropagation(), i.preventDefault();
|
|
1118
1187
|
var c = await this._canvas;
|
|
1119
|
-
let t = c.getBoundingClientRect(),
|
|
1188
|
+
let t = c.getBoundingClientRect(), u = {
|
|
1120
1189
|
x: Math.floor(Math.abs(i.clientX - t.left)),
|
|
1121
1190
|
y: Math.floor(Math.abs(i.clientY - t.top))
|
|
1122
|
-
},
|
|
1123
|
-
if (o === "mousemove" && r[o] ==
|
|
1191
|
+
}, g = this.canvasPositionToBit(u);
|
|
1192
|
+
if (o === "mousemove" && r[o] == g)
|
|
1124
1193
|
return;
|
|
1125
|
-
r[o] =
|
|
1126
|
-
let
|
|
1127
|
-
if (
|
|
1128
|
-
let
|
|
1129
|
-
detail: { bitIndex:
|
|
1194
|
+
r[o] = g;
|
|
1195
|
+
let b = "bit" + String(o).charAt(0).toUpperCase() + String(o).slice(1);
|
|
1196
|
+
if (g != -1) {
|
|
1197
|
+
let x = new CustomEvent(b, {
|
|
1198
|
+
detail: { bitIndex: g, position: u, nativeEvent: i }
|
|
1130
1199
|
});
|
|
1131
|
-
this.dispatchEvent(
|
|
1200
|
+
this.dispatchEvent(x);
|
|
1132
1201
|
}
|
|
1133
1202
|
}));
|
|
1134
1203
|
});
|
|
@@ -1137,7 +1206,7 @@ let V = class extends Fs {
|
|
|
1137
1206
|
this.onResize(), super.connectedCallback(), this.registerDisposable(this.resizeObserver), this.resizeObserver.observe(this);
|
|
1138
1207
|
}
|
|
1139
1208
|
updated(s) {
|
|
1140
|
-
s.has("arrayBuffer") && this.arrayBuffer && (this._bitArray = new
|
|
1209
|
+
s.has("arrayBuffer") && this.arrayBuffer && (this._bitArray = new _n(this.arrayBuffer));
|
|
1141
1210
|
const r = ["arrayBuffer", "scale", "frameWidth", "width", "height"];
|
|
1142
1211
|
for (const o of r)
|
|
1143
1212
|
if (s.has(o)) {
|
|
@@ -1156,23 +1225,23 @@ let V = class extends Fs {
|
|
|
1156
1225
|
if (s <= 0)
|
|
1157
1226
|
return;
|
|
1158
1227
|
this.calculateViewport();
|
|
1159
|
-
const { width: o =
|
|
1228
|
+
const { width: o = pt.width, height: i = pt.height } = this, c = this.getPxPerBit(), t = this.refs.canvas.value.getContext("2d");
|
|
1160
1229
|
if (!t)
|
|
1161
1230
|
return;
|
|
1162
1231
|
this.state.scale != c && (t.reset(), t.scale(c, c));
|
|
1163
|
-
let
|
|
1164
|
-
t.fillStyle =
|
|
1165
|
-
let
|
|
1166
|
-
for (let
|
|
1167
|
-
let
|
|
1168
|
-
if (!(
|
|
1169
|
-
if (Math.floor(
|
|
1170
|
-
|
|
1232
|
+
let u = getComputedStyle(this);
|
|
1233
|
+
t.fillStyle = u.color, t.clearRect(0, 0, o, i);
|
|
1234
|
+
let g = 0;
|
|
1235
|
+
for (let b = this.yStart * s + this.xStart, x = r.length; b < x; b++) {
|
|
1236
|
+
let A = b % s - this.xStart;
|
|
1237
|
+
if (!(A < 0)) {
|
|
1238
|
+
if (Math.floor(A * c) > o) {
|
|
1239
|
+
g++, b = g * s + this.yStart * s + this.xStart - 1;
|
|
1171
1240
|
continue;
|
|
1172
1241
|
}
|
|
1173
|
-
if (Math.floor(
|
|
1242
|
+
if (Math.floor(g * c) > i)
|
|
1174
1243
|
break;
|
|
1175
|
-
r.getBit(
|
|
1244
|
+
r.getBit(b) === 1 && t.fillRect(A, g, 1, 1), (b + 1) % s === 0 && b >= s - 1 && g++;
|
|
1176
1245
|
}
|
|
1177
1246
|
}
|
|
1178
1247
|
}
|
|
@@ -1188,29 +1257,29 @@ let V = class extends Fs {
|
|
|
1188
1257
|
}
|
|
1189
1258
|
}
|
|
1190
1259
|
render() {
|
|
1191
|
-
const { height: s =
|
|
1192
|
-
return
|
|
1260
|
+
const { height: s = pt.height, width: r = pt.width } = this;
|
|
1261
|
+
return w`
|
|
1193
1262
|
<div
|
|
1194
1263
|
id="viewport"
|
|
1195
|
-
${
|
|
1264
|
+
${ht(this.refs.viewport)}
|
|
1196
1265
|
@scroll=${this.handleScroll}
|
|
1197
1266
|
style=${`width:${r}px;height:${s}px;overflow:auto;position:relative`}
|
|
1198
1267
|
>
|
|
1199
1268
|
<div
|
|
1200
1269
|
id="fakescrolldiv"
|
|
1201
|
-
${
|
|
1270
|
+
${ht(this.refs.scrollDiv)}
|
|
1202
1271
|
>
|
|
1203
1272
|
</div>
|
|
1204
1273
|
</div>
|
|
1205
1274
|
<canvas
|
|
1206
|
-
${
|
|
1207
|
-
width=${r -
|
|
1208
|
-
height=${s -
|
|
1275
|
+
${ht(this.refs.canvas)}
|
|
1276
|
+
width=${r - mt.width}
|
|
1277
|
+
height=${s - mt.height}
|
|
1209
1278
|
></canvas>
|
|
1210
1279
|
`;
|
|
1211
1280
|
}
|
|
1212
1281
|
};
|
|
1213
|
-
V.styles =
|
|
1282
|
+
V.styles = Z`
|
|
1214
1283
|
:host{
|
|
1215
1284
|
position: relative;
|
|
1216
1285
|
--border-radius: var(--spectric-border-radius,4em);
|
|
@@ -1234,8 +1303,8 @@ V.styles = K`
|
|
|
1234
1303
|
background-color:var(--background-color);
|
|
1235
1304
|
}
|
|
1236
1305
|
::-webkit-scrollbar {
|
|
1237
|
-
height: ${
|
|
1238
|
-
width: ${
|
|
1306
|
+
height: ${mt.height}px;
|
|
1307
|
+
width: ${mt.width}px;
|
|
1239
1308
|
|
|
1240
1309
|
}
|
|
1241
1310
|
|
|
@@ -1307,28 +1376,28 @@ V.styles = K`
|
|
|
1307
1376
|
}
|
|
1308
1377
|
|
|
1309
1378
|
`;
|
|
1310
|
-
|
|
1379
|
+
ye([
|
|
1311
1380
|
v({ type: Object, attribute: !1 })
|
|
1312
1381
|
], V.prototype, "arrayBuffer", 2);
|
|
1313
|
-
|
|
1382
|
+
ye([
|
|
1314
1383
|
v({ type: Number })
|
|
1315
1384
|
], V.prototype, "frameWidth", 2);
|
|
1316
|
-
|
|
1385
|
+
ye([
|
|
1317
1386
|
v({ type: Number })
|
|
1318
1387
|
], V.prototype, "scale", 2);
|
|
1319
|
-
|
|
1388
|
+
ye([
|
|
1320
1389
|
v({ type: Number })
|
|
1321
1390
|
], V.prototype, "width", 2);
|
|
1322
|
-
|
|
1391
|
+
ye([
|
|
1323
1392
|
v({ type: Number })
|
|
1324
1393
|
], V.prototype, "height", 2);
|
|
1325
|
-
|
|
1326
|
-
|
|
1394
|
+
ye([
|
|
1395
|
+
kt("canvas")
|
|
1327
1396
|
], V.prototype, "_canvas", 2);
|
|
1328
|
-
V =
|
|
1329
|
-
|
|
1397
|
+
V = ye([
|
|
1398
|
+
N("spectric-bit-display")
|
|
1330
1399
|
], V);
|
|
1331
|
-
const
|
|
1400
|
+
const Sn = Z`.spectric-header {
|
|
1332
1401
|
display: flex;
|
|
1333
1402
|
justify-content: space-between;
|
|
1334
1403
|
align-items: center;
|
|
@@ -1364,12 +1433,12 @@ const bn = K`.spectric-header {
|
|
|
1364
1433
|
font-size: 14px;
|
|
1365
1434
|
}
|
|
1366
1435
|
`;
|
|
1367
|
-
var
|
|
1368
|
-
for (var c = i > 1 ? void 0 : i ?
|
|
1369
|
-
(
|
|
1370
|
-
return i && c &&
|
|
1436
|
+
var kn = Object.defineProperty, Cn = Object.getOwnPropertyDescriptor, Ct = (s, r, o, i) => {
|
|
1437
|
+
for (var c = i > 1 ? void 0 : i ? Cn(r, o) : r, t = s.length - 1, u; t >= 0; t--)
|
|
1438
|
+
(u = s[t]) && (c = (i ? u(r, o, c) : u(c)) || c);
|
|
1439
|
+
return i && c && kn(r, o, c), c;
|
|
1371
1440
|
};
|
|
1372
|
-
let
|
|
1441
|
+
let Oe = class extends O {
|
|
1373
1442
|
constructor() {
|
|
1374
1443
|
super(...arguments), this.showCreateAccount = !1, this.showLoginButton = !1, this.username = "", this.onLogout = () => {
|
|
1375
1444
|
const s = {
|
|
@@ -1392,7 +1461,7 @@ let Ee = class extends L {
|
|
|
1392
1461
|
};
|
|
1393
1462
|
}
|
|
1394
1463
|
render() {
|
|
1395
|
-
return
|
|
1464
|
+
return w`
|
|
1396
1465
|
<header>
|
|
1397
1466
|
<div class="spectric-header">
|
|
1398
1467
|
<div style="flex-grow:1;">
|
|
@@ -1400,10 +1469,10 @@ let Ee = class extends L {
|
|
|
1400
1469
|
<h1><slot name="name"></slot></h1>
|
|
1401
1470
|
<slot name="center"></slot>
|
|
1402
1471
|
</div>
|
|
1403
|
-
${this.showLoginButton !== !1 ?
|
|
1472
|
+
${this.showLoginButton !== !1 ? w`
|
|
1404
1473
|
<div>
|
|
1405
|
-
${this.username && this.username !== "" ?
|
|
1406
|
-
${this.showCreateAccount !== !1 ?
|
|
1474
|
+
${this.username && this.username !== "" ? w`<spectric-button variant="secondary" size="small" @click=${this.onLogout}>Log out</spectric-button>` : w`
|
|
1475
|
+
${this.showCreateAccount !== !1 ? w`<spectric-button variant="text" size="small" @click=${this.onCreateAccount}>Sign up</spectric-button>` : null}
|
|
1407
1476
|
<spectric-button variant="primary" size="small" @click=${this.onLogin}>Log in</spectric-button>`}
|
|
1408
1477
|
|
|
1409
1478
|
|
|
@@ -1414,32 +1483,32 @@ let Ee = class extends L {
|
|
|
1414
1483
|
`;
|
|
1415
1484
|
}
|
|
1416
1485
|
};
|
|
1417
|
-
|
|
1418
|
-
|
|
1486
|
+
Oe.styles = Sn;
|
|
1487
|
+
Ct([
|
|
1419
1488
|
v({ type: Boolean, reflect: !0 })
|
|
1420
|
-
],
|
|
1421
|
-
|
|
1489
|
+
], Oe.prototype, "showCreateAccount", 2);
|
|
1490
|
+
Ct([
|
|
1422
1491
|
v({ type: Boolean, reflect: !0 })
|
|
1423
|
-
],
|
|
1424
|
-
|
|
1492
|
+
], Oe.prototype, "showLoginButton", 2);
|
|
1493
|
+
Ct([
|
|
1425
1494
|
v({ type: String, reflect: !0 })
|
|
1426
|
-
],
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
],
|
|
1430
|
-
var
|
|
1431
|
-
for (var c = i > 1 ? void 0 : i ?
|
|
1432
|
-
(
|
|
1433
|
-
return i && c &&
|
|
1495
|
+
], Oe.prototype, "username", 2);
|
|
1496
|
+
Oe = Ct([
|
|
1497
|
+
N("spectric-header")
|
|
1498
|
+
], Oe);
|
|
1499
|
+
var En = Object.defineProperty, On = Object.getOwnPropertyDescriptor, Te = (s, r, o, i) => {
|
|
1500
|
+
for (var c = i > 1 ? void 0 : i ? On(r, o) : r, t = s.length - 1, u; t >= 0; t--)
|
|
1501
|
+
(u = s[t]) && (c = (i ? u(r, o, c) : u(c)) || c);
|
|
1502
|
+
return i && c && En(r, o, c), c;
|
|
1434
1503
|
};
|
|
1435
|
-
const
|
|
1504
|
+
const Pn = {
|
|
1436
1505
|
display: "flex",
|
|
1437
1506
|
alignItems: "center",
|
|
1438
1507
|
backgroundColor: "black",
|
|
1439
1508
|
color: "white",
|
|
1440
1509
|
textAlign: "center"
|
|
1441
1510
|
};
|
|
1442
|
-
let
|
|
1511
|
+
let ge = class extends O {
|
|
1443
1512
|
constructor() {
|
|
1444
1513
|
super(...arguments), this.dismissable = !1, this.text = "", this.bannerId = "", this.headerStyle = {}, this._dismissed = !1, this.onDismiss = (s) => {
|
|
1445
1514
|
s.preventDefault(), s.stopPropagation();
|
|
@@ -1457,33 +1526,33 @@ let he = class extends L {
|
|
|
1457
1526
|
}
|
|
1458
1527
|
render() {
|
|
1459
1528
|
if (!this._dismissed)
|
|
1460
|
-
return
|
|
1461
|
-
<header style=${
|
|
1529
|
+
return w`
|
|
1530
|
+
<header style=${Ws({ ...Pn, ...this.headerStyle })}>
|
|
1462
1531
|
<div style="flex-grow:1"><slot name="text">${this.text}</slot><slot></slot></div>
|
|
1463
|
-
${this.dismissable ?
|
|
1532
|
+
${this.dismissable ? w`<spectric-button size="small" @click=${this.onDismiss}>X</spectric-button>` : null}
|
|
1464
1533
|
</header>
|
|
1465
1534
|
`;
|
|
1466
1535
|
}
|
|
1467
1536
|
};
|
|
1468
1537
|
Te([
|
|
1469
1538
|
v({ type: Boolean, reflect: !0 })
|
|
1470
|
-
],
|
|
1539
|
+
], ge.prototype, "dismissable", 2);
|
|
1471
1540
|
Te([
|
|
1472
1541
|
v({ type: String, reflect: !0 })
|
|
1473
|
-
],
|
|
1542
|
+
], ge.prototype, "text", 2);
|
|
1474
1543
|
Te([
|
|
1475
1544
|
v({ type: String, reflect: !0 })
|
|
1476
|
-
],
|
|
1545
|
+
], ge.prototype, "bannerId", 2);
|
|
1477
1546
|
Te([
|
|
1478
1547
|
v({ type: Object })
|
|
1479
|
-
],
|
|
1548
|
+
], ge.prototype, "headerStyle", 2);
|
|
1480
1549
|
Te([
|
|
1481
1550
|
v({ state: !0, type: Boolean, attribute: !1 })
|
|
1482
|
-
],
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
],
|
|
1486
|
-
const
|
|
1551
|
+
], ge.prototype, "_dismissed", 2);
|
|
1552
|
+
ge = Te([
|
|
1553
|
+
N("spectric-banner")
|
|
1554
|
+
], ge);
|
|
1555
|
+
const Tn = Z`
|
|
1487
1556
|
|
|
1488
1557
|
:host {
|
|
1489
1558
|
height:100vh;
|
|
@@ -1645,8 +1714,8 @@ article{
|
|
|
1645
1714
|
* Copyright 2018 Google LLC
|
|
1646
1715
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1647
1716
|
*/
|
|
1648
|
-
const
|
|
1649
|
-
class
|
|
1717
|
+
const Jt = (s) => s ?? C;
|
|
1718
|
+
class Ln extends Zs {
|
|
1650
1719
|
constructor() {
|
|
1651
1720
|
super(...arguments), this.prevData = {};
|
|
1652
1721
|
}
|
|
@@ -1672,9 +1741,9 @@ class wn extends zs {
|
|
|
1672
1741
|
(!r || !(c in r) && i[c] === o[c]) && (i[c] = void 0);
|
|
1673
1742
|
}
|
|
1674
1743
|
}
|
|
1675
|
-
const
|
|
1676
|
-
var
|
|
1677
|
-
const
|
|
1744
|
+
const gt = ar(Ln);
|
|
1745
|
+
var Vt = /* @__PURE__ */ ((s) => (s.None = "none", s.Uscui = "us.cui", s.Usclassified = "us.classified", s.Usunclassified = "us.unclassified", s.Usconfidential = "us.confidential", s.Ussecret = "us.secret", s.Ustopsecret = "us.topsecret", s.UstopsecretSi = "us.topsecret.si", s.Uknotset = "uk.notset", s.Ukofficial = "uk.official", s.Uksecret = "uk.secret", s.Uktopsecret = "uk.topsecret", s.Caprotected_a = "ca.protected_a", s.Caprotected_b = "ca.protected_b", s.Caprotected_c = "ca.protected_c", s.Caconfidential = "ca.confidential", s.Casecret = "ca.secret", s.Catopsecret = "ca.topsecret", s.Auunofficial = "au.unofficial", s.Auofficial = "au.official", s.Auofficialsensitive = "au.officialsensitive", s.Auconfidential = "au.confidential", s.Ausecret = "au.secret", s.Autopsecret = "au.topsecret", s))(Vt || {});
|
|
1746
|
+
const ut = {
|
|
1678
1747
|
none: {},
|
|
1679
1748
|
//US Department of Defense spec CFR-2002-title31-vol1-sec2-7
|
|
1680
1749
|
"us.cui": {
|
|
@@ -1794,33 +1863,33 @@ const ct = {
|
|
|
1794
1863
|
content: "Top Secret"
|
|
1795
1864
|
}
|
|
1796
1865
|
};
|
|
1797
|
-
var
|
|
1798
|
-
for (var c = i > 1 ? void 0 : i ?
|
|
1799
|
-
(
|
|
1800
|
-
return i && c &&
|
|
1866
|
+
var Nn = Object.defineProperty, Dn = Object.getOwnPropertyDescriptor, X = (s, r, o, i) => {
|
|
1867
|
+
for (var c = i > 1 ? void 0 : i ? Dn(r, o) : r, t = s.length - 1, u; t >= 0; t--)
|
|
1868
|
+
(u = s[t]) && (c = (i ? u(r, o, c) : u(c)) || c);
|
|
1869
|
+
return i && c && Nn(r, o, c), c;
|
|
1801
1870
|
};
|
|
1802
|
-
let B = class extends
|
|
1871
|
+
let B = class extends O {
|
|
1803
1872
|
constructor() {
|
|
1804
|
-
super(...arguments), this.showHeader = !0, this.headerSticky = !0, this.classificationLevel =
|
|
1873
|
+
super(...arguments), this.showHeader = !0, this.headerSticky = !0, this.classificationLevel = Vt.None, this.classificationText = "", this.notifications = [], this.showCreateAccount = !1, this.showLoginButton = !0, this.username = "";
|
|
1805
1874
|
}
|
|
1806
1875
|
// protected createRenderRoot(): HTMLElement | DocumentFragment {
|
|
1807
1876
|
// return this
|
|
1808
1877
|
// }
|
|
1809
1878
|
render() {
|
|
1810
|
-
this.classificationLevel && !
|
|
1811
|
-
const s = this.classificationLevel ? this.classificationText ||
|
|
1879
|
+
this.classificationLevel && !ut[this.classificationLevel] && (console.warn("Unknown classification", this.classificationLevel), this.classificationLevel = Vt.None);
|
|
1880
|
+
const s = this.classificationLevel ? this.classificationText || ut[this.classificationLevel].content : "", r = this.showHeader ? w`<spectric-header ?showCreateAccount=${this.showCreateAccount} .showLoginButton=${this.showLoginButton} username=${Jt(this.username)}>
|
|
1812
1881
|
<slot name="branding" slot="branding"></slot>
|
|
1813
1882
|
<slot name="name" slot="name"></slot>
|
|
1814
1883
|
<slot name="center" slot="center"></slot>
|
|
1815
1884
|
<slot name="end" slot="end"></slot>
|
|
1816
1885
|
</spectric-header>` : null;
|
|
1817
|
-
return
|
|
1818
|
-
${this.classificationLevel && s ?
|
|
1886
|
+
return w`
|
|
1887
|
+
${this.classificationLevel && s ? w`
|
|
1819
1888
|
<!-- Classification Banner -->
|
|
1820
|
-
<spectric-banner ${
|
|
1889
|
+
<spectric-banner ${gt({ text: s, headerStyle: ut[this.classificationLevel] })}></spectric-banner>
|
|
1821
1890
|
` : null}
|
|
1822
|
-
<spectric-theme theme=${
|
|
1823
|
-
${this.notifications ? this.notifications.map((o) =>
|
|
1891
|
+
<spectric-theme theme=${Jt(this.theme)}>
|
|
1892
|
+
${this.notifications ? this.notifications.map((o) => w`<spectric-banner ${gt(o)} ></spectric-banner>`) : null}
|
|
1824
1893
|
${this.headerSticky ? r : null}
|
|
1825
1894
|
<article>
|
|
1826
1895
|
${this.headerSticky ? null : r}
|
|
@@ -1830,48 +1899,48 @@ let B = class extends L {
|
|
|
1830
1899
|
</section>
|
|
1831
1900
|
</article>
|
|
1832
1901
|
</spectric-theme>
|
|
1833
|
-
${this.classificationLevel && s ?
|
|
1902
|
+
${this.classificationLevel && s ? w`<spectric-banner ${gt({ text: s, headerStyle: ut[this.classificationLevel] })}></spectric-banner>` : null}
|
|
1834
1903
|
|
|
1835
1904
|
`;
|
|
1836
1905
|
}
|
|
1837
1906
|
};
|
|
1838
|
-
B.styles =
|
|
1839
|
-
|
|
1907
|
+
B.styles = Tn;
|
|
1908
|
+
X([
|
|
1840
1909
|
v({ type: Boolean, reflect: !0 })
|
|
1841
1910
|
], B.prototype, "showHeader", 2);
|
|
1842
|
-
|
|
1911
|
+
X([
|
|
1843
1912
|
v({ type: Boolean, reflect: !0 })
|
|
1844
1913
|
], B.prototype, "headerSticky", 2);
|
|
1845
|
-
|
|
1914
|
+
X([
|
|
1846
1915
|
v({ type: String, reflect: !0 })
|
|
1847
1916
|
], B.prototype, "classificationLevel", 2);
|
|
1848
|
-
|
|
1917
|
+
X([
|
|
1849
1918
|
v({ type: String, reflect: !0 })
|
|
1850
1919
|
], B.prototype, "classificationText", 2);
|
|
1851
|
-
|
|
1920
|
+
X([
|
|
1852
1921
|
v({ type: Array, reflect: !0 })
|
|
1853
1922
|
], B.prototype, "notifications", 2);
|
|
1854
|
-
|
|
1923
|
+
X([
|
|
1855
1924
|
v({ type: Boolean, reflect: !0 })
|
|
1856
1925
|
], B.prototype, "showCreateAccount", 2);
|
|
1857
|
-
|
|
1926
|
+
X([
|
|
1858
1927
|
v({ type: Boolean, reflect: !0 })
|
|
1859
1928
|
], B.prototype, "showLoginButton", 2);
|
|
1860
|
-
|
|
1929
|
+
X([
|
|
1861
1930
|
v({ type: String, reflect: !0 })
|
|
1862
1931
|
], B.prototype, "username", 2);
|
|
1863
|
-
|
|
1932
|
+
X([
|
|
1864
1933
|
v({ type: String, reflect: !0 })
|
|
1865
1934
|
], B.prototype, "theme", 2);
|
|
1866
|
-
B =
|
|
1867
|
-
|
|
1935
|
+
B = X([
|
|
1936
|
+
N("spectric-page")
|
|
1868
1937
|
], B);
|
|
1869
|
-
var
|
|
1870
|
-
for (var c = i > 1 ? void 0 : i ?
|
|
1871
|
-
(
|
|
1872
|
-
return i && c &&
|
|
1873
|
-
},
|
|
1874
|
-
let E = class extends
|
|
1938
|
+
var jn = Object.defineProperty, zn = Object.getOwnPropertyDescriptor, P = (s, r, o, i) => {
|
|
1939
|
+
for (var c = i > 1 ? void 0 : i ? zn(r, o) : r, t = s.length - 1, u; t >= 0; t--)
|
|
1940
|
+
(u = s[t]) && (c = (i ? u(r, o, c) : u(c)) || c);
|
|
1941
|
+
return i && c && jn(r, o, c), c;
|
|
1942
|
+
}, Rn = /* @__PURE__ */ ((s) => (s.Text = "text", s.TextArea = "text-area", s.number = "number", s.color = "color", s.date = "date", s.datetime = "datetime-local", s.email = "email", s.file = "file", s.hidden = "hidden", s.password = "password", s))(Rn || {});
|
|
1943
|
+
let E = class extends O {
|
|
1875
1944
|
constructor() {
|
|
1876
1945
|
super(...arguments), this.placeholder = "", this.readonly = !1, this.variant = "text", this.disabled = !1, this.label = "", this.hidePasswordLabel = "Hide", this.showPasswordLabel = "Show", this.showPasswordVisibilityToggle = !0, this.helperText = "", this.invalid = !1, this.required = !1, this.invalidText = "", this.name = "", this.pattern = "", this.maxCount = 0, this._value = "", this._showPassword = !1, this.autocomplete = "", this._handleInput = ({ target: s }) => {
|
|
1877
1946
|
const r = s;
|
|
@@ -1885,7 +1954,7 @@ let E = class extends L {
|
|
|
1885
1954
|
return this;
|
|
1886
1955
|
}
|
|
1887
1956
|
get selectionStart() {
|
|
1888
|
-
return this._input.selectionStart;
|
|
1957
|
+
return this._input ? this._input.selectionStart : null;
|
|
1889
1958
|
}
|
|
1890
1959
|
get value() {
|
|
1891
1960
|
return this._input ? this.variant == "number" ? parseFloat(this._input.value) : this._input.value : this._value;
|
|
@@ -1894,8 +1963,14 @@ let E = class extends L {
|
|
|
1894
1963
|
const r = this._value;
|
|
1895
1964
|
this._value = s, this.requestUpdate("value", r), this._input && (this._input.value = String(s));
|
|
1896
1965
|
}
|
|
1966
|
+
blur() {
|
|
1967
|
+
this._input && this._input.blur();
|
|
1968
|
+
}
|
|
1969
|
+
focus(s) {
|
|
1970
|
+
this._input && (this._input.blur(), this._input.focus(s));
|
|
1971
|
+
}
|
|
1897
1972
|
setSelectionRange(s, r, o = "none") {
|
|
1898
|
-
this._input.setSelectionRange(s, r, o);
|
|
1973
|
+
this._input && this._input.setSelectionRange(s, r, o);
|
|
1899
1974
|
}
|
|
1900
1975
|
render() {
|
|
1901
1976
|
switch (this.variant) {
|
|
@@ -1907,7 +1982,7 @@ let E = class extends L {
|
|
|
1907
1982
|
case "datetime-local":
|
|
1908
1983
|
case "file":
|
|
1909
1984
|
case "color":
|
|
1910
|
-
return
|
|
1985
|
+
return w`
|
|
1911
1986
|
<div class="inputWrapper">
|
|
1912
1987
|
<div class="text-input__label-helper-wrapper">
|
|
1913
1988
|
<div class="--text-input__label-wrapper">
|
|
@@ -1921,25 +1996,25 @@ let E = class extends L {
|
|
|
1921
1996
|
?disabled="${this.disabled}"
|
|
1922
1997
|
aria-describedby="helper-text"
|
|
1923
1998
|
id="input"
|
|
1924
|
-
name="${
|
|
1925
|
-
pattern="${
|
|
1926
|
-
placeholder="${
|
|
1927
|
-
autocomplete="${
|
|
1999
|
+
name="${Se(this.name)}"
|
|
2000
|
+
pattern="${Se(this.pattern)}"
|
|
2001
|
+
placeholder="${Se(this.placeholder)}"
|
|
2002
|
+
autocomplete="${Se(this.autocomplete)}"
|
|
1928
2003
|
?readonly="${this.readonly}"
|
|
1929
2004
|
?required="${this.required}"
|
|
1930
|
-
type="${
|
|
2005
|
+
type="${Se(
|
|
1931
2006
|
this.variant !== "password" ? this.variant : this._showPassword ? "text" : "password"
|
|
1932
2007
|
/* password */
|
|
1933
2008
|
)}"
|
|
1934
2009
|
.value="${this._value}"
|
|
1935
|
-
maxlength="${
|
|
2010
|
+
maxlength="${Se(this.maxCount > 0 ? this.maxCount : void 0)}"
|
|
1936
2011
|
@input="${this._handleInput}"
|
|
1937
2012
|
@change=${() => {
|
|
1938
2013
|
this.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
1939
2014
|
}}
|
|
1940
2015
|
/>
|
|
1941
2016
|
|
|
1942
|
-
${this.variant === "password" && this.showPasswordVisibilityToggle ?
|
|
2017
|
+
${this.variant === "password" && this.showPasswordVisibilityToggle ? w`
|
|
1943
2018
|
<spectric-button
|
|
1944
2019
|
size="small"
|
|
1945
2020
|
type="button"
|
|
@@ -1959,84 +2034,84 @@ let E = class extends L {
|
|
|
1959
2034
|
</div>
|
|
1960
2035
|
`;
|
|
1961
2036
|
case "hidden":
|
|
1962
|
-
return
|
|
2037
|
+
return w`<input type="hidden"></input>`;
|
|
1963
2038
|
}
|
|
1964
2039
|
return `Not yet implemented ${this.variant}`;
|
|
1965
2040
|
}
|
|
1966
2041
|
};
|
|
1967
|
-
|
|
2042
|
+
P([
|
|
1968
2043
|
v({ type: String, reflect: !0 })
|
|
1969
2044
|
], E.prototype, "placeholder", 2);
|
|
1970
|
-
|
|
2045
|
+
P([
|
|
1971
2046
|
v({ type: Boolean, reflect: !0 })
|
|
1972
2047
|
], E.prototype, "readonly", 2);
|
|
1973
|
-
|
|
2048
|
+
P([
|
|
1974
2049
|
v({ type: String, reflect: !0 })
|
|
1975
2050
|
], E.prototype, "variant", 2);
|
|
1976
|
-
|
|
2051
|
+
P([
|
|
1977
2052
|
v({ type: Boolean, reflect: !0 })
|
|
1978
2053
|
], E.prototype, "disabled", 2);
|
|
1979
|
-
|
|
2054
|
+
P([
|
|
1980
2055
|
v({ type: String, reflect: !0 })
|
|
1981
2056
|
], E.prototype, "label", 2);
|
|
1982
|
-
|
|
2057
|
+
P([
|
|
1983
2058
|
v()
|
|
1984
2059
|
], E.prototype, "hidePasswordLabel", 2);
|
|
1985
|
-
|
|
2060
|
+
P([
|
|
1986
2061
|
v()
|
|
1987
2062
|
], E.prototype, "showPasswordLabel", 2);
|
|
1988
|
-
|
|
2063
|
+
P([
|
|
1989
2064
|
v({
|
|
1990
2065
|
type: Boolean,
|
|
1991
2066
|
reflect: !0
|
|
1992
2067
|
})
|
|
1993
2068
|
], E.prototype, "showPasswordVisibilityToggle", 2);
|
|
1994
|
-
|
|
2069
|
+
P([
|
|
1995
2070
|
v({ type: String, reflect: !0 })
|
|
1996
2071
|
], E.prototype, "helperText", 2);
|
|
1997
|
-
|
|
2072
|
+
P([
|
|
1998
2073
|
v({ type: Boolean, reflect: !0 })
|
|
1999
2074
|
], E.prototype, "invalid", 2);
|
|
2000
|
-
|
|
2075
|
+
P([
|
|
2001
2076
|
v({ type: Boolean, reflect: !0 })
|
|
2002
2077
|
], E.prototype, "required", 2);
|
|
2003
|
-
|
|
2078
|
+
P([
|
|
2004
2079
|
v({ type: String, reflect: !0 })
|
|
2005
2080
|
], E.prototype, "invalidText", 2);
|
|
2006
|
-
|
|
2081
|
+
P([
|
|
2007
2082
|
v()
|
|
2008
2083
|
], E.prototype, "name", 2);
|
|
2009
|
-
|
|
2084
|
+
P([
|
|
2010
2085
|
v()
|
|
2011
2086
|
], E.prototype, "pattern", 2);
|
|
2012
|
-
|
|
2087
|
+
P([
|
|
2013
2088
|
v({ type: Number, reflect: !0 })
|
|
2014
2089
|
], E.prototype, "maxCount", 2);
|
|
2015
|
-
|
|
2090
|
+
P([
|
|
2016
2091
|
v({ reflect: !0 })
|
|
2017
2092
|
], E.prototype, "autocomplete", 2);
|
|
2018
|
-
|
|
2093
|
+
P([
|
|
2019
2094
|
v({ reflect: !0 })
|
|
2020
2095
|
], E.prototype, "value", 1);
|
|
2021
|
-
|
|
2022
|
-
|
|
2096
|
+
P([
|
|
2097
|
+
Ze("input")
|
|
2023
2098
|
], E.prototype, "_input", 2);
|
|
2024
|
-
E =
|
|
2025
|
-
|
|
2099
|
+
E = P([
|
|
2100
|
+
N("spectric-input")
|
|
2026
2101
|
], E);
|
|
2027
|
-
const
|
|
2102
|
+
const Se = (s) => Jt(s === "" ? void 0 : s ?? void 0), Bn = "end of input", Un = {
|
|
2028
2103
|
fieldName: "field name",
|
|
2029
2104
|
value: "value",
|
|
2030
2105
|
literal: "literal",
|
|
2031
2106
|
whitespace: "whitespace"
|
|
2032
2107
|
};
|
|
2033
|
-
class
|
|
2108
|
+
class Js extends Error {
|
|
2034
2109
|
constructor(r, o) {
|
|
2035
2110
|
let i = r.message;
|
|
2036
2111
|
if (r.expected) {
|
|
2037
|
-
const
|
|
2038
|
-
let
|
|
2039
|
-
i = `Expected ${
|
|
2112
|
+
const u = r.expected.map((b) => Un[b.description] || b.description).join(", ");
|
|
2113
|
+
let g = r.found ? `"${r.found}"` : Bn;
|
|
2114
|
+
i = `Expected ${u} but ${g} found.`;
|
|
2040
2115
|
}
|
|
2041
2116
|
const c = [i, o, "-".repeat(r.location.start.offset) + "^"].join(
|
|
2042
2117
|
`
|
|
@@ -2045,22 +2120,22 @@ class Is extends Error {
|
|
|
2045
2120
|
super(c), this.name = "DQLSyntaxError", this.shortMessage = i;
|
|
2046
2121
|
}
|
|
2047
2122
|
}
|
|
2048
|
-
function
|
|
2123
|
+
function Ce(s) {
|
|
2049
2124
|
return {
|
|
2050
2125
|
type: "literal",
|
|
2051
2126
|
value: s
|
|
2052
2127
|
};
|
|
2053
2128
|
}
|
|
2054
|
-
function
|
|
2129
|
+
function cr(s) {
|
|
2055
2130
|
return s.value;
|
|
2056
2131
|
}
|
|
2057
|
-
const
|
|
2132
|
+
const Mn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2058
2133
|
__proto__: null,
|
|
2059
|
-
buildNode:
|
|
2060
|
-
toOpenSearchQuery:
|
|
2134
|
+
buildNode: Ce,
|
|
2135
|
+
toOpenSearchQuery: cr
|
|
2061
2136
|
}, Symbol.toStringTag, { value: "Module" })), {
|
|
2062
|
-
SyntaxError:
|
|
2063
|
-
parse:
|
|
2137
|
+
SyntaxError: Tc,
|
|
2138
|
+
parse: Et
|
|
2064
2139
|
} = function() {
|
|
2065
2140
|
function s(i, c) {
|
|
2066
2141
|
function t() {
|
|
@@ -2068,32 +2143,32 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2068
2143
|
}
|
|
2069
2144
|
t.prototype = c.prototype, i.prototype = new t();
|
|
2070
2145
|
}
|
|
2071
|
-
function r(i, c, t,
|
|
2072
|
-
this.message = i, this.expected = c, this.found = t, this.location =
|
|
2146
|
+
function r(i, c, t, u) {
|
|
2147
|
+
this.message = i, this.expected = c, this.found = t, this.location = u, this.name = "SyntaxError", typeof Error.captureStackTrace == "function" && Error.captureStackTrace(this, r);
|
|
2073
2148
|
}
|
|
2074
2149
|
s(r, Error);
|
|
2075
2150
|
function o(i) {
|
|
2076
|
-
var c = arguments.length > 1 ? arguments[1] : {}, t = {},
|
|
2151
|
+
var c = arguments.length > 1 ? arguments[1] : {}, t = {}, u = { start: ss, Literal: Ht }, g = ss, b = function(e, n) {
|
|
2077
2152
|
return n.type === "cursor" ? {
|
|
2078
2153
|
...n,
|
|
2079
2154
|
suggestionTypes: ["conjunction"]
|
|
2080
|
-
} : e !== null ? e :
|
|
2081
|
-
},
|
|
2082
|
-
return
|
|
2083
|
-
},
|
|
2084
|
-
const l = [e, n].find((
|
|
2155
|
+
} : e !== null ? e : pe.function.buildNode("is", "*", "*");
|
|
2156
|
+
}, x = function() {
|
|
2157
|
+
return jo;
|
|
2158
|
+
}, A = function(e, n) {
|
|
2159
|
+
const l = [e, n].find((p) => p.type === "cursor");
|
|
2085
2160
|
return l || Y("or", [e, n]);
|
|
2086
2161
|
}, _ = function(e, n) {
|
|
2087
|
-
const l = [e, n].find((
|
|
2162
|
+
const l = [e, n].find((p) => p.type === "cursor");
|
|
2088
2163
|
return l || Y("and", [e, n]);
|
|
2089
|
-
},
|
|
2164
|
+
}, S = function(e) {
|
|
2090
2165
|
return e.type === "cursor" ? e : Y("not", [e]);
|
|
2091
|
-
},
|
|
2166
|
+
}, k = "(", z = { type: "literal", value: "(", description: '"("' }, Xe = ")", te = { type: "literal", value: ")", description: '")"' }, H = function(e, n) {
|
|
2092
2167
|
return n.type === "cursor" ? {
|
|
2093
2168
|
...n,
|
|
2094
2169
|
suggestionTypes: ["conjunction"]
|
|
2095
2170
|
} : e;
|
|
2096
|
-
}, q = ":", R = { type: "literal", value: ":", description: '":"' },
|
|
2171
|
+
}, q = ":", R = { type: "literal", value: ":", description: '":"' }, me = "{", Pt = { type: "literal", value: "{", description: '"{"' }, Tt = "}", Lt = { type: "literal", value: "}", description: '"}"' }, ai = function(e, n, l) {
|
|
2097
2172
|
return n.type === "cursor" ? {
|
|
2098
2173
|
...n,
|
|
2099
2174
|
nestedPath: n.nestedPath ? `${e.value}.${n.nestedPath}` : e.value
|
|
@@ -2101,21 +2176,21 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2101
2176
|
...l,
|
|
2102
2177
|
suggestionTypes: ["conjunction"]
|
|
2103
2178
|
} : Y("nested", [e, n]);
|
|
2104
|
-
},
|
|
2179
|
+
}, ci = { type: "other", description: "fieldName" }, li = function(e, n, l) {
|
|
2105
2180
|
if (l.type === "cursor")
|
|
2106
2181
|
return {
|
|
2107
2182
|
...l,
|
|
2108
2183
|
suggestionTypes: ["conjunction"]
|
|
2109
2184
|
};
|
|
2110
|
-
const
|
|
2111
|
-
return Y("range", [e,
|
|
2112
|
-
},
|
|
2185
|
+
const p = Mo(n, l);
|
|
2186
|
+
return Y("range", [e, p]);
|
|
2187
|
+
}, pi = function(e, n) {
|
|
2113
2188
|
return n.type === "cursor" ? {
|
|
2114
2189
|
...n,
|
|
2115
2190
|
fieldName: e.value,
|
|
2116
2191
|
suggestionTypes: ["value", "conjunction"]
|
|
2117
2192
|
} : n(e);
|
|
2118
|
-
},
|
|
2193
|
+
}, ui = function(e) {
|
|
2119
2194
|
if (e.type === "cursor") {
|
|
2120
2195
|
const l = `${e.prefix}${e.suffix}`.trim();
|
|
2121
2196
|
return {
|
|
@@ -2126,138 +2201,138 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2126
2201
|
}
|
|
2127
2202
|
const n = re(null);
|
|
2128
2203
|
return e(n);
|
|
2129
|
-
},
|
|
2204
|
+
}, di = function(e, n) {
|
|
2130
2205
|
return n.type === "cursor" ? {
|
|
2131
2206
|
...n,
|
|
2132
2207
|
suggestionTypes: ["conjunction"]
|
|
2133
2208
|
} : e;
|
|
2134
|
-
},
|
|
2135
|
-
const l = [e, n].find((
|
|
2209
|
+
}, fi = function(e, n) {
|
|
2210
|
+
const l = [e, n].find((p) => p.type === "cursor");
|
|
2136
2211
|
return l ? {
|
|
2137
2212
|
...l,
|
|
2138
2213
|
suggestionTypes: ["value"]
|
|
2139
|
-
} : (
|
|
2140
|
-
},
|
|
2141
|
-
const l = [e, n].find((
|
|
2214
|
+
} : (p) => Y("or", [e(p), n(p)]);
|
|
2215
|
+
}, hi = function(e, n) {
|
|
2216
|
+
const l = [e, n].find((p) => p.type === "cursor");
|
|
2142
2217
|
return l ? {
|
|
2143
2218
|
...l,
|
|
2144
2219
|
suggestionTypes: ["value"]
|
|
2145
|
-
} : (
|
|
2146
|
-
},
|
|
2220
|
+
} : (p) => Y("and", [e(p), n(p)]);
|
|
2221
|
+
}, gi = function(e) {
|
|
2147
2222
|
return e.type === "cursor" ? {
|
|
2148
2223
|
...list,
|
|
2149
2224
|
suggestionTypes: ["value"]
|
|
2150
2225
|
} : (n) => Y("not", [e(n)]);
|
|
2151
|
-
},
|
|
2226
|
+
}, bi = { type: "other", description: "value" }, vi = function(e) {
|
|
2152
2227
|
if (e.type === "cursor") return e;
|
|
2153
2228
|
const n = re(!0);
|
|
2154
2229
|
return (l) => Y("is", [l, e, n]);
|
|
2155
|
-
},
|
|
2230
|
+
}, yi = function(e) {
|
|
2156
2231
|
if (e.type === "cursor") return e;
|
|
2157
|
-
!
|
|
2232
|
+
!Bo && e.type === "wildcard" && pe.wildcard.hasLeadingWildcard(e) && M("Leading wildcards are disabled. See query:allowLeadingWildcards in Advanced Settings.");
|
|
2158
2233
|
const n = re(!1);
|
|
2159
2234
|
return (l) => Y("is", [l, e, n]);
|
|
2160
|
-
},
|
|
2161
|
-
const { start:
|
|
2235
|
+
}, mi = { type: "other", description: "OR" }, gr = "or", br = { type: "literal", value: "or", description: '"or"' }, $i = { type: "other", description: "AND" }, vr = "and", yr = { type: "literal", value: "and", description: '"and"' }, _i = { type: "other", description: "NOT" }, mr = "not", $r = { type: "literal", value: "not", description: '"not"' }, wi = { type: "other", description: "literal" }, Ne = '"', De = { type: "literal", value: '"', description: '"\\""' }, Nt = function(e, n, l) {
|
|
2236
|
+
const { start: p, end: f } = fo();
|
|
2162
2237
|
return {
|
|
2163
2238
|
type: "cursor",
|
|
2164
|
-
start:
|
|
2239
|
+
start: p.offset,
|
|
2165
2240
|
end: f.offset - n.length,
|
|
2166
2241
|
prefix: e.join(""),
|
|
2167
2242
|
suffix: l.join(""),
|
|
2168
|
-
text:
|
|
2243
|
+
text: uo().replace(n, "")
|
|
2169
2244
|
};
|
|
2170
|
-
},
|
|
2245
|
+
}, xi = function(e) {
|
|
2171
2246
|
return re(e.join(""));
|
|
2172
|
-
},
|
|
2247
|
+
}, je = "\\", ze = { type: "literal", value: "\\", description: '"\\\\"' }, Ai = /^[\\"]/, Si = { type: "class", value: '[\\\\"]', description: '[\\\\"]' }, Ge = function(e) {
|
|
2173
2248
|
return e;
|
|
2174
|
-
},
|
|
2249
|
+
}, ki = /^[^"]/, Ci = { type: "class", value: '[^"]', description: '[^"]' }, Ei = function(e) {
|
|
2175
2250
|
const n = e.join("").trim();
|
|
2176
|
-
return n === "null" ? re(null) : n === "true" ? re(!0) : n === "false" ? re(!1) : e.includes(
|
|
2251
|
+
return n === "null" ? re(null) : n === "true" ? re(!0) : n === "false" ? re(!1) : e.includes(ms) ? Uo(n) : re(
|
|
2177
2252
|
/^(-?[1-9]+\d*([.]\d+)?)$|^(-?0[.]\d*[1-9]+)$|^0$|^0.0$|^[.]\d{1,}$/.test(n) ? isFinite(n) && (n > Number.MAX_SAFE_INTEGER || n < Number.MIN_SAFE_INTEGER) ? BigInt(n) : Number(n) : n
|
|
2178
2253
|
);
|
|
2179
|
-
},
|
|
2180
|
-
return
|
|
2181
|
-
},
|
|
2254
|
+
}, _r = { type: "any", description: "any character" }, Je = "*", Ve = { type: "literal", value: "*", description: '"*"' }, Oi = function() {
|
|
2255
|
+
return ms;
|
|
2256
|
+
}, wr = "\\t", Pi = { type: "literal", value: "\\t", description: '"\\\\t"' }, Ti = function() {
|
|
2182
2257
|
return " ";
|
|
2183
|
-
},
|
|
2258
|
+
}, xr = "\\r", Li = { type: "literal", value: "\\r", description: '"\\\\r"' }, Ni = function() {
|
|
2184
2259
|
return "\r";
|
|
2185
|
-
},
|
|
2260
|
+
}, Ar = "\\n", Di = { type: "literal", value: "\\n", description: '"\\\\n"' }, ji = function() {
|
|
2186
2261
|
return `
|
|
2187
2262
|
`;
|
|
2188
|
-
},
|
|
2263
|
+
}, zi = function(e) {
|
|
2189
2264
|
return e;
|
|
2190
|
-
},
|
|
2265
|
+
}, Ri = /^[\\():<>"*{}]/, Bi = { type: "class", value: '[\\\\():<>"*{}]', description: '[\\\\():<>"*{}]' }, Sr = "<=", Ui = { type: "literal", value: "<=", description: '"<="' }, Mi = function() {
|
|
2191
2266
|
return "lte";
|
|
2192
|
-
},
|
|
2267
|
+
}, kr = ">=", Fi = { type: "literal", value: ">=", description: '">="' }, Ii = function() {
|
|
2193
2268
|
return "gte";
|
|
2194
|
-
},
|
|
2269
|
+
}, Cr = "<", Er = { type: "literal", value: "<", description: '"<"' }, Qi = function() {
|
|
2195
2270
|
return "lt";
|
|
2196
|
-
},
|
|
2271
|
+
}, Or = ">", Pr = { type: "literal", value: ">", description: '">"' }, Hi = function() {
|
|
2197
2272
|
return "gt";
|
|
2198
|
-
},
|
|
2199
|
-
return
|
|
2200
|
-
},
|
|
2201
|
-
return
|
|
2202
|
-
},
|
|
2273
|
+
}, qi = { type: "other", description: "whitespace" }, Wi = /^[ \t\r\n]/, Yi = { type: "class", value: "[\\ \\t\\r\\n]", description: "[\\ \\t\\r\\n]" }, Ki = function() {
|
|
2274
|
+
return zo;
|
|
2275
|
+
}, Tr = "@kuery-cursor@", Zi = { type: "literal", value: "@kuery-cursor@", description: '"@kuery-cursor@"' }, Xi = function() {
|
|
2276
|
+
return Ro;
|
|
2277
|
+
}, Lr = "||", Gi = { type: "literal", value: "||", description: '"||"' }, Ji = function() {
|
|
2203
2278
|
M("LuceneOr");
|
|
2204
|
-
},
|
|
2279
|
+
}, Nr = "&&", Vi = { type: "literal", value: "&&", description: '"&&"' }, Dr = function() {
|
|
2205
2280
|
M("LuceneAnd");
|
|
2206
|
-
},
|
|
2281
|
+
}, jr = "+", zr = { type: "literal", value: "+", description: '"+"' }, Rr = "-", Br = { type: "literal", value: "-", description: '"-"' }, Ur = function() {
|
|
2207
2282
|
M("LuceneNot");
|
|
2208
|
-
},
|
|
2283
|
+
}, Mr = "!", Fr = { type: "literal", value: "!", description: '"!"' }, Ir = "_exists_", eo = { type: "literal", value: "_exists_", description: '"_exists_"' }, to = function() {
|
|
2209
2284
|
M("LuceneExists");
|
|
2210
|
-
},
|
|
2285
|
+
}, Qr = function() {
|
|
2211
2286
|
M("LuceneRange");
|
|
2212
|
-
},
|
|
2287
|
+
}, Hr = "?", qr = { type: "literal", value: "?", description: '"?"' }, ro = function() {
|
|
2213
2288
|
M("LuceneWildcard");
|
|
2214
|
-
},
|
|
2289
|
+
}, Dt = "/", jt = { type: "literal", value: "/", description: '"/"' }, Wr = /^[^\/]/, Yr = { type: "class", value: "[^/]", description: "[^/]" }, so = function() {
|
|
2215
2290
|
M("LuceneRegex");
|
|
2216
|
-
},
|
|
2291
|
+
}, zt = "~", Rt = { type: "literal", value: "~", description: '"~"' }, $e = /^[0-9]/, _e = { type: "class", value: "[0-9]", description: "[0-9]" }, io = function() {
|
|
2217
2292
|
M("LuceneFuzzy");
|
|
2218
|
-
},
|
|
2293
|
+
}, oo = function() {
|
|
2219
2294
|
M("LuceneProximity");
|
|
2220
|
-
},
|
|
2295
|
+
}, Kr = "^", Zr = { type: "literal", value: "^", description: '"^"' }, no = function() {
|
|
2221
2296
|
M("LuceneBoost");
|
|
2222
|
-
},
|
|
2297
|
+
}, ao = function() {
|
|
2223
2298
|
return char;
|
|
2224
|
-
},
|
|
2299
|
+
}, co = "=", lo = { type: "literal", value: "=", description: '"="' }, Xr = "[", Gr = { type: "literal", value: "[", description: '"["' }, Jr = "]", Vr = { type: "literal", value: "]", description: '"]"' }, es = "TO", po = { type: "literal", value: "TO", description: '"TO"' }, a = 0, $ = 0, et = [{ line: 1, column: 1, seenCR: !1 }], W = 0, Bt = [], d = 0, tt;
|
|
2225
2300
|
if ("startRule" in c) {
|
|
2226
|
-
if (!(c.startRule in
|
|
2301
|
+
if (!(c.startRule in u))
|
|
2227
2302
|
throw new Error(`Can't start parsing from rule "` + c.startRule + '".');
|
|
2228
|
-
|
|
2303
|
+
g = u[c.startRule];
|
|
2229
2304
|
}
|
|
2230
|
-
function
|
|
2305
|
+
function uo() {
|
|
2231
2306
|
return i.substring($, a);
|
|
2232
2307
|
}
|
|
2233
|
-
function
|
|
2234
|
-
return
|
|
2308
|
+
function fo() {
|
|
2309
|
+
return rt($, a);
|
|
2235
2310
|
}
|
|
2236
2311
|
function M(e) {
|
|
2237
|
-
throw
|
|
2312
|
+
throw rs(
|
|
2238
2313
|
e,
|
|
2239
2314
|
null,
|
|
2240
2315
|
i.substring($, a),
|
|
2241
|
-
|
|
2316
|
+
rt($, a)
|
|
2242
2317
|
);
|
|
2243
2318
|
}
|
|
2244
|
-
function
|
|
2245
|
-
var n =
|
|
2319
|
+
function ts(e) {
|
|
2320
|
+
var n = et[e], l, p;
|
|
2246
2321
|
if (n)
|
|
2247
2322
|
return n;
|
|
2248
|
-
for (l = e - 1; !
|
|
2323
|
+
for (l = e - 1; !et[l]; )
|
|
2249
2324
|
l--;
|
|
2250
|
-
for (n =
|
|
2325
|
+
for (n = et[l], n = {
|
|
2251
2326
|
line: n.line,
|
|
2252
2327
|
column: n.column,
|
|
2253
2328
|
seenCR: n.seenCR
|
|
2254
2329
|
}; l < e; )
|
|
2255
|
-
|
|
2256
|
-
` ? (n.seenCR || n.line++, n.column = 1, n.seenCR = !1) :
|
|
2257
|
-
return
|
|
2330
|
+
p = i.charAt(l), p === `
|
|
2331
|
+
` ? (n.seenCR || n.line++, n.column = 1, n.seenCR = !1) : p === "\r" || p === "\u2028" || p === "\u2029" ? (n.line++, n.column = 1, n.seenCR = !0) : (n.column++, n.seenCR = !1), l++;
|
|
2332
|
+
return et[e] = n, n;
|
|
2258
2333
|
}
|
|
2259
|
-
function
|
|
2260
|
-
var l =
|
|
2334
|
+
function rt(e, n) {
|
|
2335
|
+
var l = ts(e), p = ts(n);
|
|
2261
2336
|
return {
|
|
2262
2337
|
start: {
|
|
2263
2338
|
offset: e,
|
|
@@ -2266,91 +2341,91 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2266
2341
|
},
|
|
2267
2342
|
end: {
|
|
2268
2343
|
offset: n,
|
|
2269
|
-
line:
|
|
2270
|
-
column:
|
|
2344
|
+
line: p.line,
|
|
2345
|
+
column: p.column
|
|
2271
2346
|
}
|
|
2272
2347
|
};
|
|
2273
2348
|
}
|
|
2274
2349
|
function h(e) {
|
|
2275
|
-
a < W || (a > W && (W = a,
|
|
2350
|
+
a < W || (a > W && (W = a, Bt = []), Bt.push(e));
|
|
2276
2351
|
}
|
|
2277
|
-
function
|
|
2352
|
+
function rs(e, n, l, p) {
|
|
2278
2353
|
function f(T) {
|
|
2279
|
-
var
|
|
2280
|
-
for (T.sort(function(se,
|
|
2281
|
-
return se.description <
|
|
2282
|
-
});
|
|
2283
|
-
T[
|
|
2354
|
+
var L = 1;
|
|
2355
|
+
for (T.sort(function(se, F) {
|
|
2356
|
+
return se.description < F.description ? -1 : se.description > F.description ? 1 : 0;
|
|
2357
|
+
}); L < T.length; )
|
|
2358
|
+
T[L - 1] === T[L] ? T.splice(L, 1) : L++;
|
|
2284
2359
|
}
|
|
2285
|
-
function m(T,
|
|
2286
|
-
function se(
|
|
2287
|
-
function
|
|
2288
|
-
return
|
|
2360
|
+
function m(T, L) {
|
|
2361
|
+
function se(Fo) {
|
|
2362
|
+
function lt(J) {
|
|
2363
|
+
return J.charCodeAt(0).toString(16).toUpperCase();
|
|
2289
2364
|
}
|
|
2290
|
-
return
|
|
2291
|
-
return "\\x0" +
|
|
2292
|
-
}).replace(/[\x10-\x1F\x80-\xFF]/g, function(
|
|
2293
|
-
return "\\x" +
|
|
2294
|
-
}).replace(/[\u0100-\u0FFF]/g, function(
|
|
2295
|
-
return "\\u0" +
|
|
2296
|
-
}).replace(/[\u1000-\uFFFF]/g, function(
|
|
2297
|
-
return "\\u" +
|
|
2365
|
+
return Fo.replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\x08/g, "\\b").replace(/\t/g, "\\t").replace(/\n/g, "\\n").replace(/\f/g, "\\f").replace(/\r/g, "\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g, function(J) {
|
|
2366
|
+
return "\\x0" + lt(J);
|
|
2367
|
+
}).replace(/[\x10-\x1F\x80-\xFF]/g, function(J) {
|
|
2368
|
+
return "\\x" + lt(J);
|
|
2369
|
+
}).replace(/[\u0100-\u0FFF]/g, function(J) {
|
|
2370
|
+
return "\\u0" + lt(J);
|
|
2371
|
+
}).replace(/[\u1000-\uFFFF]/g, function(J) {
|
|
2372
|
+
return "\\u" + lt(J);
|
|
2298
2373
|
});
|
|
2299
2374
|
}
|
|
2300
|
-
var
|
|
2301
|
-
for (
|
|
2302
|
-
|
|
2303
|
-
return
|
|
2375
|
+
var F = new Array(T.length), $s, _s, Be;
|
|
2376
|
+
for (Be = 0; Be < T.length; Be++)
|
|
2377
|
+
F[Be] = T[Be].description;
|
|
2378
|
+
return $s = T.length > 1 ? F.slice(0, -1).join(", ") + " or " + F[T.length - 1] : F[0], _s = L ? '"' + se(L) + '"' : "end of input", "Expected " + $s + " but " + _s + " found.";
|
|
2304
2379
|
}
|
|
2305
2380
|
return n !== null && f(n), new r(
|
|
2306
2381
|
e !== null ? e : m(n, l),
|
|
2307
2382
|
n,
|
|
2308
2383
|
l,
|
|
2309
|
-
|
|
2384
|
+
p
|
|
2310
2385
|
);
|
|
2311
2386
|
}
|
|
2312
|
-
function
|
|
2313
|
-
var e, n, l,
|
|
2387
|
+
function ss() {
|
|
2388
|
+
var e, n, l, p;
|
|
2314
2389
|
for (e = a, n = [], l = y(); l !== t; )
|
|
2315
2390
|
n.push(l), l = y();
|
|
2316
|
-
return n !== t ? (l =
|
|
2391
|
+
return n !== t ? (l = st(), l === t && (l = null), l !== t ? (p = at(), p !== t ? ($ = e, n = b(l, p), e = n) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t), e;
|
|
2317
2392
|
}
|
|
2318
|
-
function
|
|
2319
|
-
var e, n, l,
|
|
2320
|
-
return e = a, $ = a, n =
|
|
2393
|
+
function st() {
|
|
2394
|
+
var e, n, l, p;
|
|
2395
|
+
return e = a, $ = a, n = x(), n ? n = void 0 : n = t, n !== t ? (l = xo(), l !== t ? (n = [n, l], e = n) : (a = e, e = t)) : (a = e, e = t), e === t && (e = a, n = Ut(), n !== t ? (l = it(), l !== t ? (p = st(), p !== t ? ($ = e, n = A(n, p), e = n) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t), e === t && (e = Ut())), e;
|
|
2321
2396
|
}
|
|
2322
|
-
function
|
|
2323
|
-
var e, n, l,
|
|
2324
|
-
return e = a, n =
|
|
2397
|
+
function Ut() {
|
|
2398
|
+
var e, n, l, p;
|
|
2399
|
+
return e = a, n = is(), n !== t ? (l = ot(), l !== t ? (p = Ut(), p !== t ? ($ = e, n = _(n, p), e = n) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t), e === t && (e = is()), e;
|
|
2325
2400
|
}
|
|
2326
|
-
function
|
|
2401
|
+
function is() {
|
|
2327
2402
|
var e, n, l;
|
|
2328
|
-
return e = a, n =
|
|
2403
|
+
return e = a, n = Qt(), n !== t ? (l = os(), l !== t ? ($ = e, n = S(l), e = n) : (a = e, e = t)) : (a = e, e = t), e === t && (e = os()), e;
|
|
2329
2404
|
}
|
|
2330
|
-
function
|
|
2331
|
-
var e, n, l,
|
|
2332
|
-
if (e = a, i.charCodeAt(a) === 40 ? (n =
|
|
2333
|
-
for (l = [],
|
|
2334
|
-
l.push(
|
|
2335
|
-
l !== t ? (
|
|
2405
|
+
function os() {
|
|
2406
|
+
var e, n, l, p, f, m;
|
|
2407
|
+
if (e = a, i.charCodeAt(a) === 40 ? (n = k, a++) : (n = t, d === 0 && h(z)), n !== t) {
|
|
2408
|
+
for (l = [], p = y(); p !== t; )
|
|
2409
|
+
l.push(p), p = y();
|
|
2410
|
+
l !== t ? (p = st(), p !== t ? (f = at(), f !== t ? (i.charCodeAt(a) === 41 ? (m = Xe, a++) : (m = t, d === 0 && h(te)), m !== t ? ($ = e, n = H(p, f), e = n) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t);
|
|
2336
2411
|
} else
|
|
2337
2412
|
a = e, e = t;
|
|
2338
|
-
return e === t && (e =
|
|
2413
|
+
return e === t && (e = ho()), e;
|
|
2339
2414
|
}
|
|
2340
|
-
function
|
|
2341
|
-
var e, n, l,
|
|
2342
|
-
if (e = a, n =
|
|
2343
|
-
for (l = [],
|
|
2344
|
-
l.push(
|
|
2415
|
+
function ho() {
|
|
2416
|
+
var e, n, l, p, f, m, T, L, se, F;
|
|
2417
|
+
if (e = a, n = Mt(), n !== t) {
|
|
2418
|
+
for (l = [], p = y(); p !== t; )
|
|
2419
|
+
l.push(p), p = y();
|
|
2345
2420
|
if (l !== t)
|
|
2346
|
-
if (i.charCodeAt(a) === 58 ? (
|
|
2421
|
+
if (i.charCodeAt(a) === 58 ? (p = q, a++) : (p = t, d === 0 && h(R)), p !== t) {
|
|
2347
2422
|
for (f = [], m = y(); m !== t; )
|
|
2348
2423
|
f.push(m), m = y();
|
|
2349
2424
|
if (f !== t)
|
|
2350
|
-
if (i.charCodeAt(a) === 123 ? (m =
|
|
2351
|
-
for (T = [],
|
|
2352
|
-
T.push(
|
|
2353
|
-
T !== t ? (
|
|
2425
|
+
if (i.charCodeAt(a) === 123 ? (m = me, a++) : (m = t, d === 0 && h(Pt)), m !== t) {
|
|
2426
|
+
for (T = [], L = y(); L !== t; )
|
|
2427
|
+
T.push(L), L = y();
|
|
2428
|
+
T !== t ? (L = st(), L !== t ? (se = at(), se !== t ? (i.charCodeAt(a) === 125 ? (F = Tt, a++) : (F = t, d === 0 && h(Lt)), F !== t ? ($ = e, n = ai(n, L, se), e = n) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t);
|
|
2354
2429
|
} else
|
|
2355
2430
|
a = e, e = t;
|
|
2356
2431
|
else
|
|
@@ -2361,26 +2436,26 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2361
2436
|
a = e, e = t;
|
|
2362
2437
|
} else
|
|
2363
2438
|
a = e, e = t;
|
|
2364
|
-
return e === t && (e =
|
|
2439
|
+
return e === t && (e = go()), e;
|
|
2365
2440
|
}
|
|
2366
|
-
function
|
|
2441
|
+
function go() {
|
|
2367
2442
|
var e;
|
|
2368
|
-
return e =
|
|
2443
|
+
return e = bo(), e === t && (e = vo(), e === t && (e = yo())), e;
|
|
2369
2444
|
}
|
|
2370
|
-
function
|
|
2445
|
+
function Mt() {
|
|
2371
2446
|
var e;
|
|
2372
|
-
return d++, e =
|
|
2447
|
+
return d++, e = Ht(), d--, e === t && d === 0 && h(ci), e;
|
|
2373
2448
|
}
|
|
2374
|
-
function
|
|
2375
|
-
var e, n, l,
|
|
2376
|
-
if (e = a, n =
|
|
2377
|
-
for (l = [],
|
|
2378
|
-
l.push(
|
|
2449
|
+
function bo() {
|
|
2450
|
+
var e, n, l, p, f, m;
|
|
2451
|
+
if (e = a, n = Mt(), n !== t) {
|
|
2452
|
+
for (l = [], p = y(); p !== t; )
|
|
2453
|
+
l.push(p), p = y();
|
|
2379
2454
|
if (l !== t)
|
|
2380
|
-
if (
|
|
2455
|
+
if (p = us(), p !== t) {
|
|
2381
2456
|
for (f = [], m = y(); m !== t; )
|
|
2382
2457
|
f.push(m), m = y();
|
|
2383
|
-
f !== t ? (m =
|
|
2458
|
+
f !== t ? (m = Ht(), m !== t ? ($ = e, n = li(n, p, m), e = n) : (a = e, e = t)) : (a = e, e = t);
|
|
2384
2459
|
} else
|
|
2385
2460
|
a = e, e = t;
|
|
2386
2461
|
else
|
|
@@ -2389,16 +2464,16 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2389
2464
|
a = e, e = t;
|
|
2390
2465
|
return e;
|
|
2391
2466
|
}
|
|
2392
|
-
function
|
|
2393
|
-
var e, n, l,
|
|
2394
|
-
if (e = a, n =
|
|
2395
|
-
for (l = [],
|
|
2396
|
-
l.push(
|
|
2467
|
+
function vo() {
|
|
2468
|
+
var e, n, l, p, f, m;
|
|
2469
|
+
if (e = a, n = Mt(), n !== t) {
|
|
2470
|
+
for (l = [], p = y(); p !== t; )
|
|
2471
|
+
l.push(p), p = y();
|
|
2397
2472
|
if (l !== t)
|
|
2398
|
-
if (i.charCodeAt(a) === 58 ? (
|
|
2473
|
+
if (i.charCodeAt(a) === 58 ? (p = q, a++) : (p = t, d === 0 && h(R)), p !== t) {
|
|
2399
2474
|
for (f = [], m = y(); m !== t; )
|
|
2400
2475
|
f.push(m), m = y();
|
|
2401
|
-
f !== t ? (m =
|
|
2476
|
+
f !== t ? (m = Ft(), m !== t ? ($ = e, n = pi(n, m), e = n) : (a = e, e = t)) : (a = e, e = t);
|
|
2402
2477
|
} else
|
|
2403
2478
|
a = e, e = t;
|
|
2404
2479
|
else
|
|
@@ -2407,105 +2482,105 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2407
2482
|
a = e, e = t;
|
|
2408
2483
|
return e;
|
|
2409
2484
|
}
|
|
2410
|
-
function
|
|
2485
|
+
function yo() {
|
|
2411
2486
|
var e, n;
|
|
2412
|
-
return e = a, n =
|
|
2487
|
+
return e = a, n = cs(), n !== t && ($ = e, n = ui(n)), e = n, e;
|
|
2413
2488
|
}
|
|
2414
|
-
function
|
|
2415
|
-
var e, n, l,
|
|
2416
|
-
if (e = a, i.charCodeAt(a) === 40 ? (n =
|
|
2417
|
-
for (l = [],
|
|
2418
|
-
l.push(
|
|
2419
|
-
l !== t ? (
|
|
2489
|
+
function Ft() {
|
|
2490
|
+
var e, n, l, p, f, m;
|
|
2491
|
+
if (e = a, i.charCodeAt(a) === 40 ? (n = k, a++) : (n = t, d === 0 && h(z)), n !== t) {
|
|
2492
|
+
for (l = [], p = y(); p !== t; )
|
|
2493
|
+
l.push(p), p = y();
|
|
2494
|
+
l !== t ? (p = ns(), p !== t ? (f = at(), f !== t ? (i.charCodeAt(a) === 41 ? (m = Xe, a++) : (m = t, d === 0 && h(te)), m !== t ? ($ = e, n = di(p, f), e = n) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t);
|
|
2420
2495
|
} else
|
|
2421
2496
|
a = e, e = t;
|
|
2422
|
-
return e === t && (e =
|
|
2497
|
+
return e === t && (e = cs()), e;
|
|
2423
2498
|
}
|
|
2424
|
-
function
|
|
2425
|
-
var e, n, l,
|
|
2426
|
-
return e = a, n =
|
|
2499
|
+
function ns() {
|
|
2500
|
+
var e, n, l, p;
|
|
2501
|
+
return e = a, n = It(), n !== t ? (l = it(), l !== t ? (p = ns(), p !== t ? ($ = e, n = fi(n, p), e = n) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t), e === t && (e = It()), e;
|
|
2427
2502
|
}
|
|
2428
|
-
function
|
|
2429
|
-
var e, n, l,
|
|
2430
|
-
return e = a, n =
|
|
2503
|
+
function It() {
|
|
2504
|
+
var e, n, l, p;
|
|
2505
|
+
return e = a, n = as(), n !== t ? (l = ot(), l !== t ? (p = It(), p !== t ? ($ = e, n = hi(n, p), e = n) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t), e === t && (e = as()), e;
|
|
2431
2506
|
}
|
|
2432
|
-
function
|
|
2507
|
+
function as() {
|
|
2433
2508
|
var e, n, l;
|
|
2434
|
-
return e = a, n =
|
|
2509
|
+
return e = a, n = Qt(), n !== t ? (l = Ft(), l !== t ? ($ = e, n = gi(l), e = n) : (a = e, e = t)) : (a = e, e = t), e === t && (e = Ft()), e;
|
|
2435
2510
|
}
|
|
2436
|
-
function
|
|
2511
|
+
function cs() {
|
|
2437
2512
|
var e, n;
|
|
2438
|
-
return d++, e = a, n =
|
|
2513
|
+
return d++, e = a, n = nt(), n !== t && ($ = e, n = vi(n)), e = n, e === t && (e = a, n = ls(), n !== t && ($ = e, n = yi(n)), e = n), d--, e === t && (n = t, d === 0 && h(bi)), e;
|
|
2439
2514
|
}
|
|
2440
|
-
function
|
|
2441
|
-
var e, n, l,
|
|
2515
|
+
function it() {
|
|
2516
|
+
var e, n, l, p, f;
|
|
2442
2517
|
if (d++, e = a, n = [], l = y(), l !== t)
|
|
2443
2518
|
for (; l !== t; )
|
|
2444
2519
|
n.push(l), l = y();
|
|
2445
2520
|
else
|
|
2446
2521
|
n = t;
|
|
2447
2522
|
if (n !== t)
|
|
2448
|
-
if (i.substr(a, 2).toLowerCase() ===
|
|
2449
|
-
if (
|
|
2523
|
+
if (i.substr(a, 2).toLowerCase() === gr ? (l = i.substr(a, 2), a += 2) : (l = t, d === 0 && h(br)), l !== t) {
|
|
2524
|
+
if (p = [], f = y(), f !== t)
|
|
2450
2525
|
for (; f !== t; )
|
|
2451
|
-
|
|
2526
|
+
p.push(f), f = y();
|
|
2452
2527
|
else
|
|
2453
|
-
|
|
2454
|
-
|
|
2528
|
+
p = t;
|
|
2529
|
+
p !== t ? (n = [n, l, p], e = n) : (a = e, e = t);
|
|
2455
2530
|
} else
|
|
2456
2531
|
a = e, e = t;
|
|
2457
2532
|
else
|
|
2458
2533
|
a = e, e = t;
|
|
2459
|
-
return e === t && (e = a, $ = a, n =
|
|
2534
|
+
return e === t && (e = a, $ = a, n = x(), n ? n = void 0 : n = t, n !== t ? (l = ds(), l !== t ? (n = [n, l], e = n) : (a = e, e = t)) : (a = e, e = t)), d--, e === t && (n = t, d === 0 && h(mi)), e;
|
|
2460
2535
|
}
|
|
2461
|
-
function
|
|
2462
|
-
var e, n, l,
|
|
2536
|
+
function ot() {
|
|
2537
|
+
var e, n, l, p, f;
|
|
2463
2538
|
if (d++, e = a, n = [], l = y(), l !== t)
|
|
2464
2539
|
for (; l !== t; )
|
|
2465
2540
|
n.push(l), l = y();
|
|
2466
2541
|
else
|
|
2467
2542
|
n = t;
|
|
2468
2543
|
if (n !== t)
|
|
2469
|
-
if (i.substr(a, 3).toLowerCase() ===
|
|
2470
|
-
if (
|
|
2544
|
+
if (i.substr(a, 3).toLowerCase() === vr ? (l = i.substr(a, 3), a += 3) : (l = t, d === 0 && h(yr)), l !== t) {
|
|
2545
|
+
if (p = [], f = y(), f !== t)
|
|
2471
2546
|
for (; f !== t; )
|
|
2472
|
-
|
|
2547
|
+
p.push(f), f = y();
|
|
2473
2548
|
else
|
|
2474
|
-
|
|
2475
|
-
|
|
2549
|
+
p = t;
|
|
2550
|
+
p !== t ? (n = [n, l, p], e = n) : (a = e, e = t);
|
|
2476
2551
|
} else
|
|
2477
2552
|
a = e, e = t;
|
|
2478
2553
|
else
|
|
2479
2554
|
a = e, e = t;
|
|
2480
|
-
return e === t && (e = a, $ = a, n =
|
|
2555
|
+
return e === t && (e = a, $ = a, n = x(), n ? n = void 0 : n = t, n !== t ? (l = fs(), l !== t ? (n = [n, l], e = n) : (a = e, e = t)) : (a = e, e = t)), d--, e === t && (n = t, d === 0 && h($i)), e;
|
|
2481
2556
|
}
|
|
2482
|
-
function
|
|
2483
|
-
var e, n, l,
|
|
2484
|
-
if (d++, e = a, i.substr(a, 3).toLowerCase() ===
|
|
2485
|
-
if (l = [],
|
|
2486
|
-
for (;
|
|
2487
|
-
l.push(
|
|
2557
|
+
function Qt() {
|
|
2558
|
+
var e, n, l, p;
|
|
2559
|
+
if (d++, e = a, i.substr(a, 3).toLowerCase() === mr ? (n = i.substr(a, 3), a += 3) : (n = t, d === 0 && h($r)), n !== t) {
|
|
2560
|
+
if (l = [], p = y(), p !== t)
|
|
2561
|
+
for (; p !== t; )
|
|
2562
|
+
l.push(p), p = y();
|
|
2488
2563
|
else
|
|
2489
2564
|
l = t;
|
|
2490
2565
|
l !== t ? (n = [n, l], e = n) : (a = e, e = t);
|
|
2491
2566
|
} else
|
|
2492
2567
|
a = e, e = t;
|
|
2493
|
-
return e === t && (e = a, $ = a, n =
|
|
2568
|
+
return e === t && (e = a, $ = a, n = x(), n ? n = void 0 : n = t, n !== t ? (l = hs(), l !== t ? (n = [n, l], e = n) : (a = e, e = t)) : (a = e, e = t)), d--, e === t && (n = t, d === 0 && h(_i)), e;
|
|
2494
2569
|
}
|
|
2495
|
-
function
|
|
2570
|
+
function Ht() {
|
|
2496
2571
|
var e;
|
|
2497
|
-
return d++, e =
|
|
2572
|
+
return d++, e = nt(), e === t && (e = ls()), d--, e === t && d === 0 && h(wi), e;
|
|
2498
2573
|
}
|
|
2499
|
-
function
|
|
2500
|
-
var e, n, l,
|
|
2501
|
-
if (e = a, i.charCodeAt(a) === 34 ? (n =
|
|
2502
|
-
for (l = [],
|
|
2503
|
-
l.push(
|
|
2574
|
+
function nt() {
|
|
2575
|
+
var e, n, l, p, f, m;
|
|
2576
|
+
if (e = a, i.charCodeAt(a) === 34 ? (n = Ne, a++) : (n = t, d === 0 && h(De)), n !== t) {
|
|
2577
|
+
for (l = [], p = we(); p !== t; )
|
|
2578
|
+
l.push(p), p = we();
|
|
2504
2579
|
if (l !== t)
|
|
2505
|
-
if (
|
|
2506
|
-
for (f = [], m =
|
|
2507
|
-
f.push(m), m =
|
|
2508
|
-
f !== t ? (i.charCodeAt(a) === 34 ? (m =
|
|
2580
|
+
if (p = Re(), p !== t) {
|
|
2581
|
+
for (f = [], m = we(); m !== t; )
|
|
2582
|
+
f.push(m), m = we();
|
|
2583
|
+
f !== t ? (i.charCodeAt(a) === 34 ? (m = Ne, a++) : (m = t, d === 0 && h(De)), m !== t ? ($ = e, n = Nt(l, p, f), e = n) : (a = e, e = t)) : (a = e, e = t);
|
|
2509
2584
|
} else
|
|
2510
2585
|
a = e, e = t;
|
|
2511
2586
|
else
|
|
@@ -2513,58 +2588,58 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2513
2588
|
} else
|
|
2514
2589
|
a = e, e = t;
|
|
2515
2590
|
if (e === t)
|
|
2516
|
-
if (e = a, i.charCodeAt(a) === 34 ? (n =
|
|
2517
|
-
for (l = [],
|
|
2518
|
-
l.push(
|
|
2519
|
-
l !== t ? (i.charCodeAt(a) === 34 ? (
|
|
2591
|
+
if (e = a, i.charCodeAt(a) === 34 ? (n = Ne, a++) : (n = t, d === 0 && h(De)), n !== t) {
|
|
2592
|
+
for (l = [], p = we(); p !== t; )
|
|
2593
|
+
l.push(p), p = we();
|
|
2594
|
+
l !== t ? (i.charCodeAt(a) === 34 ? (p = Ne, a++) : (p = t, d === 0 && h(De)), p !== t ? ($ = e, n = xi(l), e = n) : (a = e, e = t)) : (a = e, e = t);
|
|
2520
2595
|
} else
|
|
2521
2596
|
a = e, e = t;
|
|
2522
2597
|
return e;
|
|
2523
2598
|
}
|
|
2524
|
-
function
|
|
2599
|
+
function we() {
|
|
2525
2600
|
var e, n, l;
|
|
2526
|
-
return e =
|
|
2601
|
+
return e = qt(), e === t && (e = a, i.charCodeAt(a) === 92 ? (n = je, a++) : (n = t, d === 0 && h(ze)), n !== t ? (Ai.test(i.charAt(a)) ? (l = i.charAt(a), a++) : (l = t, d === 0 && h(Si)), l !== t ? ($ = e, n = Ge(l), e = n) : (a = e, e = t)) : (a = e, e = t), e === t && (e = a, n = a, d++, l = Re(), d--, l === t ? n = void 0 : (a = n, n = t), n !== t ? (ki.test(i.charAt(a)) ? (l = i.charAt(a), a++) : (l = t, d === 0 && h(Ci)), l !== t ? ($ = e, n = Ge(l), e = n) : (a = e, e = t)) : (a = e, e = t))), e;
|
|
2527
2602
|
}
|
|
2528
|
-
function
|
|
2529
|
-
var e, n, l,
|
|
2530
|
-
for (e = a, n = [], l =
|
|
2531
|
-
n.push(l), l =
|
|
2603
|
+
function ls() {
|
|
2604
|
+
var e, n, l, p, f;
|
|
2605
|
+
for (e = a, n = [], l = xe(); l !== t; )
|
|
2606
|
+
n.push(l), l = xe();
|
|
2532
2607
|
if (n !== t)
|
|
2533
|
-
if (l =
|
|
2534
|
-
for (
|
|
2535
|
-
|
|
2536
|
-
|
|
2608
|
+
if (l = Re(), l !== t) {
|
|
2609
|
+
for (p = [], f = xe(); f !== t; )
|
|
2610
|
+
p.push(f), f = xe();
|
|
2611
|
+
p !== t ? ($ = e, n = Nt(n, l, p), e = n) : (a = e, e = t);
|
|
2537
2612
|
} else
|
|
2538
2613
|
a = e, e = t;
|
|
2539
2614
|
else
|
|
2540
2615
|
a = e, e = t;
|
|
2541
2616
|
if (e === t) {
|
|
2542
|
-
if (e = a, n = [], l =
|
|
2617
|
+
if (e = a, n = [], l = xe(), l !== t)
|
|
2543
2618
|
for (; l !== t; )
|
|
2544
|
-
n.push(l), l =
|
|
2619
|
+
n.push(l), l = xe();
|
|
2545
2620
|
else
|
|
2546
2621
|
n = t;
|
|
2547
|
-
n !== t && ($ = e, n =
|
|
2622
|
+
n !== t && ($ = e, n = Ei(n)), e = n;
|
|
2548
2623
|
}
|
|
2549
2624
|
return e;
|
|
2550
2625
|
}
|
|
2551
|
-
function
|
|
2552
|
-
var e, n, l,
|
|
2553
|
-
return e =
|
|
2626
|
+
function xe() {
|
|
2627
|
+
var e, n, l, p, f;
|
|
2628
|
+
return e = qt(), e === t && (e = $o(), e === t && (e = _o(), e === t && (e = mo(), e === t && (e = a, n = a, d++, l = ps(), d--, l === t ? n = void 0 : (a = n, n = t), n !== t ? (l = a, d++, p = wo(), d--, p === t ? l = void 0 : (a = l, l = t), l !== t ? (p = a, d++, f = Re(), d--, f === t ? p = void 0 : (a = p, p = t), p !== t ? (i.length > a ? (f = i.charAt(a), a++) : (f = t, d === 0 && h(_r)), f !== t ? ($ = e, n = Ge(f), e = n) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t))))), e;
|
|
2554
2629
|
}
|
|
2555
|
-
function
|
|
2630
|
+
function mo() {
|
|
2556
2631
|
var e, n;
|
|
2557
|
-
return e = a, i.charCodeAt(a) === 42 ? (n =
|
|
2632
|
+
return e = a, i.charCodeAt(a) === 42 ? (n = Je, a++) : (n = t, d === 0 && h(Ve)), n !== t && ($ = e, n = Oi()), e = n, e;
|
|
2558
2633
|
}
|
|
2559
|
-
function
|
|
2560
|
-
var e, n, l,
|
|
2634
|
+
function at() {
|
|
2635
|
+
var e, n, l, p, f;
|
|
2561
2636
|
for (e = a, n = [], l = y(); l !== t; )
|
|
2562
2637
|
n.push(l), l = y();
|
|
2563
2638
|
if (n !== t)
|
|
2564
|
-
if (l =
|
|
2565
|
-
for (
|
|
2566
|
-
|
|
2567
|
-
|
|
2639
|
+
if (l = Re(), l !== t) {
|
|
2640
|
+
for (p = [], f = y(); f !== t; )
|
|
2641
|
+
p.push(f), f = y();
|
|
2642
|
+
p !== t ? ($ = e, n = Nt(n, l, p), e = n) : (a = e, e = t);
|
|
2568
2643
|
} else
|
|
2569
2644
|
a = e, e = t;
|
|
2570
2645
|
else
|
|
@@ -2574,86 +2649,86 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2574
2649
|
e.push(n), n = y();
|
|
2575
2650
|
return e;
|
|
2576
2651
|
}
|
|
2577
|
-
function
|
|
2652
|
+
function qt() {
|
|
2578
2653
|
var e, n;
|
|
2579
|
-
return e = a, i.substr(a, 2) ===
|
|
2654
|
+
return e = a, i.substr(a, 2) === wr ? (n = wr, a += 2) : (n = t, d === 0 && h(Pi)), n !== t && ($ = e, n = Ti()), e = n, e === t && (e = a, i.substr(a, 2) === xr ? (n = xr, a += 2) : (n = t, d === 0 && h(Li)), n !== t && ($ = e, n = Ni()), e = n, e === t && (e = a, i.substr(a, 2) === Ar ? (n = Ar, a += 2) : (n = t, d === 0 && h(Di)), n !== t && ($ = e, n = ji()), e = n)), e;
|
|
2580
2655
|
}
|
|
2581
|
-
function
|
|
2656
|
+
function $o() {
|
|
2582
2657
|
var e, n, l;
|
|
2583
|
-
return e = a, i.charCodeAt(a) === 92 ? (n =
|
|
2658
|
+
return e = a, i.charCodeAt(a) === 92 ? (n = je, a++) : (n = t, d === 0 && h(ze)), n !== t ? (l = ps(), l !== t ? ($ = e, n = Ge(l), e = n) : (a = e, e = t)) : (a = e, e = t), e;
|
|
2584
2659
|
}
|
|
2585
|
-
function
|
|
2660
|
+
function _o() {
|
|
2586
2661
|
var e, n, l;
|
|
2587
|
-
return e = a, i.charCodeAt(a) === 92 ? (n =
|
|
2662
|
+
return e = a, i.charCodeAt(a) === 92 ? (n = je, a++) : (n = t, d === 0 && h(ze)), n !== t ? (i.substr(a, 2).toLowerCase() === gr ? (l = i.substr(a, 2), a += 2) : (l = t, d === 0 && h(br)), l === t && (i.substr(a, 3).toLowerCase() === vr ? (l = i.substr(a, 3), a += 3) : (l = t, d === 0 && h(yr)), l === t && (i.substr(a, 3).toLowerCase() === mr ? (l = i.substr(a, 3), a += 3) : (l = t, d === 0 && h($r)))), l !== t ? ($ = e, n = zi(l), e = n) : (a = e, e = t)) : (a = e, e = t), e;
|
|
2588
2663
|
}
|
|
2589
|
-
function
|
|
2664
|
+
function wo() {
|
|
2590
2665
|
var e;
|
|
2591
|
-
return e =
|
|
2666
|
+
return e = it(), e === t && (e = ot(), e === t && (e = Qt())), e;
|
|
2592
2667
|
}
|
|
2593
|
-
function
|
|
2668
|
+
function ps() {
|
|
2594
2669
|
var e;
|
|
2595
|
-
return
|
|
2670
|
+
return Ri.test(i.charAt(a)) ? (e = i.charAt(a), a++) : (e = t, d === 0 && h(Bi)), e;
|
|
2596
2671
|
}
|
|
2597
|
-
function
|
|
2672
|
+
function us() {
|
|
2598
2673
|
var e, n;
|
|
2599
|
-
return e = a, i.substr(a, 2) ===
|
|
2674
|
+
return e = a, i.substr(a, 2) === Sr ? (n = Sr, a += 2) : (n = t, d === 0 && h(Ui)), n !== t && ($ = e, n = Mi()), e = n, e === t && (e = a, i.substr(a, 2) === kr ? (n = kr, a += 2) : (n = t, d === 0 && h(Fi)), n !== t && ($ = e, n = Ii()), e = n, e === t && (e = a, i.charCodeAt(a) === 60 ? (n = Cr, a++) : (n = t, d === 0 && h(Er)), n !== t && ($ = e, n = Qi()), e = n, e === t && (e = a, i.charCodeAt(a) === 62 ? (n = Or, a++) : (n = t, d === 0 && h(Pr)), n !== t && ($ = e, n = Hi()), e = n))), e;
|
|
2600
2675
|
}
|
|
2601
2676
|
function y() {
|
|
2602
2677
|
var e;
|
|
2603
|
-
return d++,
|
|
2678
|
+
return d++, Wi.test(i.charAt(a)) ? (e = i.charAt(a), a++) : (e = t, d === 0 && h(Yi)), d--, e === t && d === 0 && h(qi), e;
|
|
2604
2679
|
}
|
|
2605
|
-
function
|
|
2680
|
+
function Re() {
|
|
2606
2681
|
var e, n, l;
|
|
2607
|
-
return e = a, $ = a, n =
|
|
2682
|
+
return e = a, $ = a, n = Ki(), n ? n = void 0 : n = t, n !== t ? (i.substr(a, 14) === Tr ? (l = Tr, a += 14) : (l = t, d === 0 && h(Zi)), l !== t ? ($ = e, n = Xi(), e = n) : (a = e, e = t)) : (a = e, e = t), e;
|
|
2608
2683
|
}
|
|
2609
|
-
function
|
|
2610
|
-
var e, n, l,
|
|
2684
|
+
function ds() {
|
|
2685
|
+
var e, n, l, p, f;
|
|
2611
2686
|
for (e = a, n = [], l = y(); l !== t; )
|
|
2612
2687
|
n.push(l), l = y();
|
|
2613
2688
|
if (n !== t)
|
|
2614
|
-
if (i.substr(a, 2) ===
|
|
2615
|
-
for (
|
|
2616
|
-
|
|
2617
|
-
|
|
2689
|
+
if (i.substr(a, 2) === Lr ? (l = Lr, a += 2) : (l = t, d === 0 && h(Gi)), l !== t) {
|
|
2690
|
+
for (p = [], f = y(); f !== t; )
|
|
2691
|
+
p.push(f), f = y();
|
|
2692
|
+
p !== t ? ($ = e, n = Ji(), e = n) : (a = e, e = t);
|
|
2618
2693
|
} else
|
|
2619
2694
|
a = e, e = t;
|
|
2620
2695
|
else
|
|
2621
2696
|
a = e, e = t;
|
|
2622
2697
|
return e;
|
|
2623
2698
|
}
|
|
2624
|
-
function
|
|
2625
|
-
var e, n, l,
|
|
2699
|
+
function fs() {
|
|
2700
|
+
var e, n, l, p, f;
|
|
2626
2701
|
for (e = a, n = [], l = y(); l !== t; )
|
|
2627
2702
|
n.push(l), l = y();
|
|
2628
2703
|
if (n !== t)
|
|
2629
|
-
if (i.substr(a, 2) ===
|
|
2630
|
-
for (
|
|
2631
|
-
|
|
2632
|
-
|
|
2704
|
+
if (i.substr(a, 2) === Nr ? (l = Nr, a += 2) : (l = t, d === 0 && h(Vi)), l !== t) {
|
|
2705
|
+
for (p = [], f = y(); f !== t; )
|
|
2706
|
+
p.push(f), f = y();
|
|
2707
|
+
p !== t ? ($ = e, n = Dr(), e = n) : (a = e, e = t);
|
|
2633
2708
|
} else
|
|
2634
2709
|
a = e, e = t;
|
|
2635
2710
|
else
|
|
2636
2711
|
a = e, e = t;
|
|
2637
|
-
return e === t && (e = a, i.charCodeAt(a) === 43 ? (n =
|
|
2712
|
+
return e === t && (e = a, i.charCodeAt(a) === 43 ? (n = jr, a++) : (n = t, d === 0 && h(zr)), n !== t && ($ = e, n = Dr()), e = n), e;
|
|
2638
2713
|
}
|
|
2639
|
-
function
|
|
2714
|
+
function hs() {
|
|
2640
2715
|
var e, n;
|
|
2641
|
-
return e = a, i.charCodeAt(a) === 45 ? (n =
|
|
2716
|
+
return e = a, i.charCodeAt(a) === 45 ? (n = Rr, a++) : (n = t, d === 0 && h(Br)), n !== t && ($ = e, n = Ur()), e = n, e === t && (e = a, i.charCodeAt(a) === 33 ? (n = Mr, a++) : (n = t, d === 0 && h(Fr)), n !== t && ($ = e, n = Ur()), e = n), e;
|
|
2642
2717
|
}
|
|
2643
|
-
function
|
|
2718
|
+
function xo() {
|
|
2644
2719
|
var e;
|
|
2645
|
-
return e =
|
|
2720
|
+
return e = Ao(), e === t && (e = gs(), e === t && (e = So())), e;
|
|
2646
2721
|
}
|
|
2647
|
-
function
|
|
2648
|
-
var e, n, l,
|
|
2649
|
-
if (e = a, n =
|
|
2650
|
-
for (l = [],
|
|
2651
|
-
l.push(
|
|
2722
|
+
function Ao() {
|
|
2723
|
+
var e, n, l, p, f, m;
|
|
2724
|
+
if (e = a, n = Ae(), n !== t) {
|
|
2725
|
+
for (l = [], p = y(); p !== t; )
|
|
2726
|
+
l.push(p), p = y();
|
|
2652
2727
|
if (l !== t)
|
|
2653
|
-
if (i.charCodeAt(a) === 58 ? (
|
|
2728
|
+
if (i.charCodeAt(a) === 58 ? (p = q, a++) : (p = t, d === 0 && h(R)), p !== t) {
|
|
2654
2729
|
for (f = [], m = y(); m !== t; )
|
|
2655
2730
|
f.push(m), m = y();
|
|
2656
|
-
f !== t ? (m =
|
|
2731
|
+
f !== t ? (m = gs(), m !== t ? (n = [n, l, p, f, m], e = n) : (a = e, e = t)) : (a = e, e = t);
|
|
2657
2732
|
} else
|
|
2658
2733
|
a = e, e = t;
|
|
2659
2734
|
else
|
|
@@ -2662,20 +2737,20 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2662
2737
|
a = e, e = t;
|
|
2663
2738
|
return e;
|
|
2664
2739
|
}
|
|
2665
|
-
function
|
|
2740
|
+
function gs() {
|
|
2666
2741
|
var e;
|
|
2667
|
-
return e =
|
|
2742
|
+
return e = ko(), e === t && (e = Wt(), e === t && (e = Co(), e === t && (e = Eo(), e === t && (e = Oo(), e === t && (e = Po()))))), e;
|
|
2668
2743
|
}
|
|
2669
|
-
function
|
|
2670
|
-
var e, n, l,
|
|
2671
|
-
if (e = a, i.substr(a, 8) ===
|
|
2672
|
-
for (l = [],
|
|
2673
|
-
l.push(
|
|
2744
|
+
function So() {
|
|
2745
|
+
var e, n, l, p, f, m;
|
|
2746
|
+
if (e = a, i.substr(a, 8) === Ir ? (n = Ir, a += 8) : (n = t, d === 0 && h(eo)), n !== t) {
|
|
2747
|
+
for (l = [], p = y(); p !== t; )
|
|
2748
|
+
l.push(p), p = y();
|
|
2674
2749
|
if (l !== t)
|
|
2675
|
-
if (i.charCodeAt(a) === 58 ? (
|
|
2750
|
+
if (i.charCodeAt(a) === 58 ? (p = q, a++) : (p = t, d === 0 && h(R)), p !== t) {
|
|
2676
2751
|
for (f = [], m = y(); m !== t; )
|
|
2677
2752
|
f.push(m), m = y();
|
|
2678
|
-
f !== t ? (m =
|
|
2753
|
+
f !== t ? (m = Ae(), m !== t ? ($ = e, n = to(), e = n) : (a = e, e = t)) : (a = e, e = t);
|
|
2679
2754
|
} else
|
|
2680
2755
|
a = e, e = t;
|
|
2681
2756
|
else
|
|
@@ -2684,296 +2759,296 @@ const Tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2684
2759
|
a = e, e = t;
|
|
2685
2760
|
return e;
|
|
2686
2761
|
}
|
|
2687
|
-
function
|
|
2688
|
-
var e, n, l,
|
|
2689
|
-
if (e = a, n =
|
|
2690
|
-
for (l = [],
|
|
2691
|
-
l.push(
|
|
2692
|
-
l !== t ? (
|
|
2762
|
+
function ko() {
|
|
2763
|
+
var e, n, l, p, f, m, T;
|
|
2764
|
+
if (e = a, n = us(), n !== t) {
|
|
2765
|
+
for (l = [], p = y(); p !== t; )
|
|
2766
|
+
l.push(p), p = y();
|
|
2767
|
+
l !== t ? (p = Ae(), p !== t ? ($ = e, n = Qr(), e = n) : (a = e, e = t)) : (a = e, e = t);
|
|
2693
2768
|
} else
|
|
2694
2769
|
a = e, e = t;
|
|
2695
2770
|
if (e === t)
|
|
2696
|
-
if (e = a, n =
|
|
2697
|
-
for (l = [],
|
|
2698
|
-
l.push(
|
|
2699
|
-
l !== t ? (
|
|
2771
|
+
if (e = a, n = No(), n !== t) {
|
|
2772
|
+
for (l = [], p = y(); p !== t; )
|
|
2773
|
+
l.push(p), p = y();
|
|
2774
|
+
l !== t ? (p = Ae(), p !== t ? (f = ys(), f !== t ? (m = Ae(), m !== t ? (T = Do(), T !== t ? ($ = e, n = Qr(), e = n) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t);
|
|
2700
2775
|
} else
|
|
2701
2776
|
a = e, e = t;
|
|
2702
2777
|
return e;
|
|
2703
2778
|
}
|
|
2704
|
-
function
|
|
2705
|
-
var e, n, l,
|
|
2706
|
-
for (e = a, n = [], l =
|
|
2707
|
-
n.push(l), l =
|
|
2779
|
+
function Wt() {
|
|
2780
|
+
var e, n, l, p, f;
|
|
2781
|
+
for (e = a, n = [], l = ct(), l === t && (i.charCodeAt(a) === 42 ? (l = Je, a++) : (l = t, d === 0 && h(Ve))); l !== t; )
|
|
2782
|
+
n.push(l), l = ct(), l === t && (i.charCodeAt(a) === 42 ? (l = Je, a++) : (l = t, d === 0 && h(Ve)));
|
|
2708
2783
|
if (n !== t)
|
|
2709
|
-
if (i.charCodeAt(a) === 63 ? (l =
|
|
2710
|
-
for (
|
|
2711
|
-
|
|
2712
|
-
|
|
2784
|
+
if (i.charCodeAt(a) === 63 ? (l = Hr, a++) : (l = t, d === 0 && h(qr)), l !== t) {
|
|
2785
|
+
for (p = [], f = Wt(); f !== t; )
|
|
2786
|
+
p.push(f), f = Wt();
|
|
2787
|
+
p !== t ? ($ = e, n = ro(), e = n) : (a = e, e = t);
|
|
2713
2788
|
} else
|
|
2714
2789
|
a = e, e = t;
|
|
2715
2790
|
else
|
|
2716
2791
|
a = e, e = t;
|
|
2717
2792
|
return e;
|
|
2718
2793
|
}
|
|
2719
|
-
function
|
|
2720
|
-
var e, n, l,
|
|
2721
|
-
if (e = a, i.charCodeAt(a) === 47 ? (n =
|
|
2722
|
-
for (l = [],
|
|
2723
|
-
l.push(
|
|
2724
|
-
l !== t ? (i.charCodeAt(a) === 47 ? (
|
|
2794
|
+
function Co() {
|
|
2795
|
+
var e, n, l, p;
|
|
2796
|
+
if (e = a, i.charCodeAt(a) === 47 ? (n = Dt, a++) : (n = t, d === 0 && h(jt)), n !== t) {
|
|
2797
|
+
for (l = [], Wr.test(i.charAt(a)) ? (p = i.charAt(a), a++) : (p = t, d === 0 && h(Yr)); p !== t; )
|
|
2798
|
+
l.push(p), Wr.test(i.charAt(a)) ? (p = i.charAt(a), a++) : (p = t, d === 0 && h(Yr));
|
|
2799
|
+
l !== t ? (i.charCodeAt(a) === 47 ? (p = Dt, a++) : (p = t, d === 0 && h(jt)), p !== t ? ($ = e, n = so(), e = n) : (a = e, e = t)) : (a = e, e = t);
|
|
2725
2800
|
} else
|
|
2726
2801
|
a = e, e = t;
|
|
2727
2802
|
return e;
|
|
2728
2803
|
}
|
|
2729
|
-
function
|
|
2730
|
-
var e, n, l,
|
|
2731
|
-
if (e = a, n =
|
|
2732
|
-
if (i.charCodeAt(a) === 126 ? (l =
|
|
2733
|
-
for (
|
|
2734
|
-
|
|
2735
|
-
|
|
2804
|
+
function Eo() {
|
|
2805
|
+
var e, n, l, p, f;
|
|
2806
|
+
if (e = a, n = bs(), n !== t)
|
|
2807
|
+
if (i.charCodeAt(a) === 126 ? (l = zt, a++) : (l = t, d === 0 && h(Rt)), l !== t) {
|
|
2808
|
+
for (p = [], $e.test(i.charAt(a)) ? (f = i.charAt(a), a++) : (f = t, d === 0 && h(_e)); f !== t; )
|
|
2809
|
+
p.push(f), $e.test(i.charAt(a)) ? (f = i.charAt(a), a++) : (f = t, d === 0 && h(_e));
|
|
2810
|
+
p !== t ? ($ = e, n = io(), e = n) : (a = e, e = t);
|
|
2736
2811
|
} else
|
|
2737
2812
|
a = e, e = t;
|
|
2738
2813
|
else
|
|
2739
2814
|
a = e, e = t;
|
|
2740
2815
|
return e;
|
|
2741
2816
|
}
|
|
2742
|
-
function
|
|
2743
|
-
var e, n, l,
|
|
2744
|
-
if (e = a, n =
|
|
2745
|
-
if (i.charCodeAt(a) === 126 ? (l =
|
|
2746
|
-
for (
|
|
2747
|
-
|
|
2748
|
-
|
|
2817
|
+
function Oo() {
|
|
2818
|
+
var e, n, l, p, f;
|
|
2819
|
+
if (e = a, n = nt(), n !== t)
|
|
2820
|
+
if (i.charCodeAt(a) === 126 ? (l = zt, a++) : (l = t, d === 0 && h(Rt)), l !== t) {
|
|
2821
|
+
for (p = [], $e.test(i.charAt(a)) ? (f = i.charAt(a), a++) : (f = t, d === 0 && h(_e)); f !== t; )
|
|
2822
|
+
p.push(f), $e.test(i.charAt(a)) ? (f = i.charAt(a), a++) : (f = t, d === 0 && h(_e));
|
|
2823
|
+
p !== t ? ($ = e, n = oo(), e = n) : (a = e, e = t);
|
|
2749
2824
|
} else
|
|
2750
2825
|
a = e, e = t;
|
|
2751
2826
|
else
|
|
2752
2827
|
a = e, e = t;
|
|
2753
2828
|
return e;
|
|
2754
2829
|
}
|
|
2755
|
-
function
|
|
2756
|
-
var e, n, l,
|
|
2757
|
-
if (e = a, n =
|
|
2758
|
-
if (i.charCodeAt(a) === 94 ? (l =
|
|
2759
|
-
for (
|
|
2760
|
-
|
|
2761
|
-
|
|
2830
|
+
function Po() {
|
|
2831
|
+
var e, n, l, p, f;
|
|
2832
|
+
if (e = a, n = Ae(), n !== t)
|
|
2833
|
+
if (i.charCodeAt(a) === 94 ? (l = Kr, a++) : (l = t, d === 0 && h(Zr)), l !== t) {
|
|
2834
|
+
for (p = [], $e.test(i.charAt(a)) ? (f = i.charAt(a), a++) : (f = t, d === 0 && h(_e)); f !== t; )
|
|
2835
|
+
p.push(f), $e.test(i.charAt(a)) ? (f = i.charAt(a), a++) : (f = t, d === 0 && h(_e));
|
|
2836
|
+
p !== t ? ($ = e, n = no(), e = n) : (a = e, e = t);
|
|
2762
2837
|
} else
|
|
2763
2838
|
a = e, e = t;
|
|
2764
2839
|
else
|
|
2765
2840
|
a = e, e = t;
|
|
2766
2841
|
return e;
|
|
2767
2842
|
}
|
|
2768
|
-
function
|
|
2843
|
+
function Ae() {
|
|
2769
2844
|
var e;
|
|
2770
|
-
return e =
|
|
2845
|
+
return e = nt(), e === t && (e = bs()), e;
|
|
2771
2846
|
}
|
|
2772
|
-
function
|
|
2847
|
+
function bs() {
|
|
2773
2848
|
var e, n;
|
|
2774
|
-
if (e = [], n =
|
|
2849
|
+
if (e = [], n = ct(), n !== t)
|
|
2775
2850
|
for (; n !== t; )
|
|
2776
|
-
e.push(n), n =
|
|
2851
|
+
e.push(n), n = ct();
|
|
2777
2852
|
else
|
|
2778
2853
|
e = t;
|
|
2779
2854
|
return e;
|
|
2780
2855
|
}
|
|
2781
|
-
function
|
|
2782
|
-
var e, n, l,
|
|
2783
|
-
return e =
|
|
2856
|
+
function ct() {
|
|
2857
|
+
var e, n, l, p;
|
|
2858
|
+
return e = qt(), e === t && (e = Lo(), e === t && (e = a, n = a, d++, l = vs(), d--, l === t ? n = void 0 : (a = n, n = t), n !== t ? (l = a, d++, p = To(), d--, p === t ? l = void 0 : (a = l, l = t), l !== t ? (i.length > a ? (p = i.charAt(a), a++) : (p = t, d === 0 && h(_r)), p !== t ? (n = [n, l, p], e = n) : (a = e, e = t)) : (a = e, e = t)) : (a = e, e = t))), e;
|
|
2784
2859
|
}
|
|
2785
|
-
function
|
|
2860
|
+
function To() {
|
|
2786
2861
|
var e;
|
|
2787
|
-
return e =
|
|
2862
|
+
return e = it(), e === t && (e = ot(), e === t && (e = ds(), e === t && (e = fs(), e === t && (e = hs(), e === t && (e = ys()))))), e;
|
|
2788
2863
|
}
|
|
2789
|
-
function
|
|
2864
|
+
function Lo() {
|
|
2790
2865
|
var e, n, l;
|
|
2791
|
-
return e = a, i.charCodeAt(a) === 92 ? (n =
|
|
2866
|
+
return e = a, i.charCodeAt(a) === 92 ? (n = je, a++) : (n = t, d === 0 && h(ze)), n !== t ? (l = vs(), l !== t ? ($ = e, n = ao(), e = n) : (a = e, e = t)) : (a = e, e = t), e;
|
|
2792
2867
|
}
|
|
2793
|
-
function
|
|
2868
|
+
function vs() {
|
|
2794
2869
|
var e;
|
|
2795
|
-
return i.charCodeAt(a) === 43 ? (e =
|
|
2870
|
+
return i.charCodeAt(a) === 43 ? (e = jr, a++) : (e = t, d === 0 && h(zr)), e === t && (i.charCodeAt(a) === 45 ? (e = Rr, a++) : (e = t, d === 0 && h(Br)), e === t && (i.charCodeAt(a) === 61 ? (e = co, a++) : (e = t, d === 0 && h(lo)), e === t && (i.charCodeAt(a) === 62 ? (e = Or, a++) : (e = t, d === 0 && h(Pr)), e === t && (i.charCodeAt(a) === 60 ? (e = Cr, a++) : (e = t, d === 0 && h(Er)), e === t && (i.charCodeAt(a) === 33 ? (e = Mr, a++) : (e = t, d === 0 && h(Fr)), e === t && (i.charCodeAt(a) === 40 ? (e = k, a++) : (e = t, d === 0 && h(z)), e === t && (i.charCodeAt(a) === 41 ? (e = Xe, a++) : (e = t, d === 0 && h(te)), e === t && (i.charCodeAt(a) === 123 ? (e = me, a++) : (e = t, d === 0 && h(Pt)), e === t && (i.charCodeAt(a) === 125 ? (e = Tt, a++) : (e = t, d === 0 && h(Lt)), e === t && (i.charCodeAt(a) === 91 ? (e = Xr, a++) : (e = t, d === 0 && h(Gr)), e === t && (i.charCodeAt(a) === 93 ? (e = Jr, a++) : (e = t, d === 0 && h(Vr)), e === t && (i.charCodeAt(a) === 94 ? (e = Kr, a++) : (e = t, d === 0 && h(Zr)), e === t && (i.charCodeAt(a) === 34 ? (e = Ne, a++) : (e = t, d === 0 && h(De)), e === t && (i.charCodeAt(a) === 126 ? (e = zt, a++) : (e = t, d === 0 && h(Rt)), e === t && (i.charCodeAt(a) === 42 ? (e = Je, a++) : (e = t, d === 0 && h(Ve)), e === t && (i.charCodeAt(a) === 63 ? (e = Hr, a++) : (e = t, d === 0 && h(qr)), e === t && (i.charCodeAt(a) === 58 ? (e = q, a++) : (e = t, d === 0 && h(R)), e === t && (i.charCodeAt(a) === 92 ? (e = je, a++) : (e = t, d === 0 && h(ze)), e === t && (i.charCodeAt(a) === 47 ? (e = Dt, a++) : (e = t, d === 0 && h(jt))))))))))))))))))))), e;
|
|
2796
2871
|
}
|
|
2797
|
-
function
|
|
2798
|
-
var e, n, l,
|
|
2872
|
+
function ys() {
|
|
2873
|
+
var e, n, l, p, f;
|
|
2799
2874
|
if (e = a, n = [], l = y(), l !== t)
|
|
2800
2875
|
for (; l !== t; )
|
|
2801
2876
|
n.push(l), l = y();
|
|
2802
2877
|
else
|
|
2803
2878
|
n = t;
|
|
2804
2879
|
if (n !== t)
|
|
2805
|
-
if (i.substr(a, 2) ===
|
|
2806
|
-
if (
|
|
2880
|
+
if (i.substr(a, 2) === es ? (l = es, a += 2) : (l = t, d === 0 && h(po)), l !== t) {
|
|
2881
|
+
if (p = [], f = y(), f !== t)
|
|
2807
2882
|
for (; f !== t; )
|
|
2808
|
-
|
|
2883
|
+
p.push(f), f = y();
|
|
2809
2884
|
else
|
|
2810
|
-
|
|
2811
|
-
|
|
2885
|
+
p = t;
|
|
2886
|
+
p !== t ? (n = [n, l, p], e = n) : (a = e, e = t);
|
|
2812
2887
|
} else
|
|
2813
2888
|
a = e, e = t;
|
|
2814
2889
|
else
|
|
2815
2890
|
a = e, e = t;
|
|
2816
2891
|
return e;
|
|
2817
2892
|
}
|
|
2818
|
-
function
|
|
2893
|
+
function No() {
|
|
2819
2894
|
var e;
|
|
2820
|
-
return i.charCodeAt(a) === 91 ? (e =
|
|
2895
|
+
return i.charCodeAt(a) === 91 ? (e = Xr, a++) : (e = t, d === 0 && h(Gr)), e === t && (i.charCodeAt(a) === 123 ? (e = me, a++) : (e = t, d === 0 && h(Pt))), e;
|
|
2821
2896
|
}
|
|
2822
|
-
function
|
|
2897
|
+
function Do() {
|
|
2823
2898
|
var e;
|
|
2824
|
-
return i.charCodeAt(a) === 93 ? (e =
|
|
2899
|
+
return i.charCodeAt(a) === 93 ? (e = Jr, a++) : (e = t, d === 0 && h(Vr)), e === t && (i.charCodeAt(a) === 125 ? (e = Tt, a++) : (e = t, d === 0 && h(Lt))), e;
|
|
2825
2900
|
}
|
|
2826
|
-
const { errorOnLuceneSyntax:
|
|
2827
|
-
if (
|
|
2828
|
-
return
|
|
2829
|
-
throw
|
|
2901
|
+
const { errorOnLuceneSyntax: jo, parseCursor: zo, cursorSymbol: Ro, allowLeadingWildcards: Bo = !0, helpers: { nodeTypes: pe } } = c, Y = pe.function.buildNodeWithArgumentNodes, re = pe.literal.buildNode, Uo = pe.wildcard.buildNode, Mo = pe.namedArg.buildNode, { wildcardSymbol: ms } = pe.wildcard;
|
|
2902
|
+
if (tt = g(), tt !== t && a === i.length)
|
|
2903
|
+
return tt;
|
|
2904
|
+
throw tt !== t && a < i.length && h({ type: "end", description: "end of input" }), rs(
|
|
2830
2905
|
null,
|
|
2831
|
-
|
|
2906
|
+
Bt,
|
|
2832
2907
|
W < i.length ? i.charAt(W) : null,
|
|
2833
|
-
W < i.length ?
|
|
2908
|
+
W < i.length ? rt(W, W + 1) : rt(W, W)
|
|
2834
2909
|
);
|
|
2835
2910
|
}
|
|
2836
2911
|
return {
|
|
2837
2912
|
SyntaxError: r,
|
|
2838
2913
|
parse: o
|
|
2839
2914
|
};
|
|
2840
|
-
}(),
|
|
2915
|
+
}(), lr = (s, r = {}, o = Et) => {
|
|
2841
2916
|
if (typeof s > "u")
|
|
2842
2917
|
throw new Error("expression must be a string, got undefined instead");
|
|
2843
2918
|
return o(s, { ...r, helpers: { nodeTypes: ne } });
|
|
2844
|
-
},
|
|
2919
|
+
}, Pe = (s, r = {}) => lr(
|
|
2845
2920
|
s,
|
|
2846
2921
|
{
|
|
2847
2922
|
...r,
|
|
2848
2923
|
startRule: "Literal"
|
|
2849
2924
|
},
|
|
2850
|
-
|
|
2851
|
-
),
|
|
2925
|
+
Et
|
|
2926
|
+
), $t = (s, r = {}) => {
|
|
2852
2927
|
try {
|
|
2853
|
-
return
|
|
2928
|
+
return lr(s, r, Et);
|
|
2854
2929
|
} catch (o) {
|
|
2855
|
-
throw o.name === "SyntaxError" ? new
|
|
2930
|
+
throw o.name === "SyntaxError" ? new Js(o, s) : o;
|
|
2856
2931
|
}
|
|
2857
|
-
},
|
|
2932
|
+
}, Fn = (s) => {
|
|
2858
2933
|
try {
|
|
2859
|
-
return
|
|
2934
|
+
return lr(s, { errorOnLuceneSyntax: !0 }, Et), !1;
|
|
2860
2935
|
} catch (r) {
|
|
2861
2936
|
return r.message.startsWith("Lucene");
|
|
2862
2937
|
}
|
|
2863
|
-
},
|
|
2864
|
-
function
|
|
2938
|
+
}, D = (s, r, o, i) => (r = void 0, !s || !s.type || !ne[s.type] ? D(ne.function.buildNode("and", []), r) : ne[s.type].toOpenSearchQuery(s, r, o, i)), ee = "@kuery-wildcard@";
|
|
2939
|
+
function In(s) {
|
|
2865
2940
|
return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
2866
2941
|
}
|
|
2867
|
-
function
|
|
2942
|
+
function Qn(s) {
|
|
2868
2943
|
return s.replace(/[+-=&|><!(){}[\]^"~*?:\\/]/g, "\\$&");
|
|
2869
2944
|
}
|
|
2870
|
-
function
|
|
2945
|
+
function Hn(s) {
|
|
2871
2946
|
return s.includes(ee) ? {
|
|
2872
2947
|
type: "wildcard",
|
|
2873
2948
|
value: s
|
|
2874
|
-
} :
|
|
2949
|
+
} : Pe(s);
|
|
2875
2950
|
}
|
|
2876
|
-
function
|
|
2877
|
-
const { value: o } = s, i = o.split(ee).map(
|
|
2951
|
+
function Vs(s, r) {
|
|
2952
|
+
const { value: o } = s, i = o.split(ee).map(In).join("[\\s\\S]*");
|
|
2878
2953
|
return new RegExp(`^${i}$`).test(r);
|
|
2879
2954
|
}
|
|
2880
|
-
function
|
|
2955
|
+
function qn(s) {
|
|
2881
2956
|
const { value: r } = s;
|
|
2882
2957
|
return r.split(ee).join("*");
|
|
2883
2958
|
}
|
|
2884
|
-
function
|
|
2959
|
+
function er(s) {
|
|
2885
2960
|
const { value: r } = s;
|
|
2886
|
-
return r.split(ee).map(
|
|
2961
|
+
return r.split(ee).map(Qn).join("*");
|
|
2887
2962
|
}
|
|
2888
|
-
function
|
|
2963
|
+
function Wn(s) {
|
|
2889
2964
|
const { value: r } = s;
|
|
2890
2965
|
return r.startsWith(ee) && r.replace(ee, "").length > 0;
|
|
2891
2966
|
}
|
|
2892
|
-
const
|
|
2967
|
+
const Yn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2893
2968
|
__proto__: null,
|
|
2894
|
-
buildNode:
|
|
2895
|
-
hasLeadingWildcard:
|
|
2896
|
-
test:
|
|
2897
|
-
toOpenSearchQuery:
|
|
2898
|
-
toQueryStringQuery:
|
|
2969
|
+
buildNode: Hn,
|
|
2970
|
+
hasLeadingWildcard: Wn,
|
|
2971
|
+
test: Vs,
|
|
2972
|
+
toOpenSearchQuery: qn,
|
|
2973
|
+
toQueryStringQuery: er,
|
|
2899
2974
|
wildcardSymbol: ee
|
|
2900
2975
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
2901
|
-
function
|
|
2976
|
+
function pr(s, r) {
|
|
2902
2977
|
if (!r) return [];
|
|
2903
2978
|
if (s.type === "literal") {
|
|
2904
|
-
const o =
|
|
2979
|
+
const o = cr(s), i = r.fields.find((c) => c.name === o);
|
|
2905
2980
|
return i ? [i] : [];
|
|
2906
2981
|
} else if (s.type === "wildcard")
|
|
2907
|
-
return r.fields.filter((i) =>
|
|
2982
|
+
return r.fields.filter((i) => Vs(s, i.name));
|
|
2908
2983
|
}
|
|
2909
|
-
function
|
|
2984
|
+
function ei(s, r, o) {
|
|
2910
2985
|
const i = {
|
|
2911
2986
|
...s,
|
|
2912
2987
|
value: o ? `${o}.${s.value}` : s.value
|
|
2913
2988
|
};
|
|
2914
2989
|
if (!r || i.type === "wildcard" && !o)
|
|
2915
2990
|
return i;
|
|
2916
|
-
const t =
|
|
2917
|
-
const
|
|
2918
|
-
return o && !
|
|
2919
|
-
...
|
|
2920
|
-
`${
|
|
2921
|
-
] :
|
|
2922
|
-
...
|
|
2923
|
-
`${
|
|
2924
|
-
] :
|
|
2925
|
-
...
|
|
2926
|
-
`Nested field ${
|
|
2927
|
-
] :
|
|
2991
|
+
const t = pr(i, r).reduce((u, g) => {
|
|
2992
|
+
const b = g.subType && g.subType.nested ? g.subType.nested.path : void 0;
|
|
2993
|
+
return o && !b ? [
|
|
2994
|
+
...u,
|
|
2995
|
+
`${g.name} is not a nested field but is in nested group "${o}" in the DQL expression.`
|
|
2996
|
+
] : b && !o ? [
|
|
2997
|
+
...u,
|
|
2998
|
+
`${g.name} is a nested field, but is not in a nested group in the DQL expression.`
|
|
2999
|
+
] : b !== o ? [
|
|
3000
|
+
...u,
|
|
3001
|
+
`Nested field ${g.name} is being queried with the incorrect nested path. The correct path is ${g.subType.nested.path}.`
|
|
3002
|
+
] : u;
|
|
2928
3003
|
}, []);
|
|
2929
3004
|
if (t.length > 0)
|
|
2930
3005
|
throw new Error(t.join(`
|
|
2931
3006
|
`));
|
|
2932
3007
|
return i;
|
|
2933
3008
|
}
|
|
2934
|
-
function
|
|
3009
|
+
function Kn(s, r, o = !1) {
|
|
2935
3010
|
if (s === void 0)
|
|
2936
3011
|
throw new Error("fieldName is a required argument");
|
|
2937
3012
|
if (r === void 0)
|
|
2938
3013
|
throw new Error("value is a required argument");
|
|
2939
|
-
const i = typeof s == "string" ?
|
|
3014
|
+
const i = typeof s == "string" ? Pe(s) : Ce(s), c = typeof r == "string" ? Pe(r) : Ce(r), t = Ce(o);
|
|
2940
3015
|
return {
|
|
2941
3016
|
arguments: [i, c, t]
|
|
2942
3017
|
};
|
|
2943
3018
|
}
|
|
2944
|
-
function
|
|
3019
|
+
function Zn(s, r, o = {}, i = {}) {
|
|
2945
3020
|
const {
|
|
2946
|
-
arguments: [c, t,
|
|
2947
|
-
} = s,
|
|
3021
|
+
arguments: [c, t, u]
|
|
3022
|
+
} = s, g = ei(
|
|
2948
3023
|
c,
|
|
2949
3024
|
r,
|
|
2950
3025
|
i != null && i.nested ? i.nested.path : void 0
|
|
2951
|
-
),
|
|
2952
|
-
if (
|
|
3026
|
+
), b = D(g), x = t !== void 0 ? D(t) : t, A = u.value ? "phrase" : "best_fields";
|
|
3027
|
+
if (g.value === null)
|
|
2953
3028
|
return t.type === "wildcard" ? {
|
|
2954
3029
|
query_string: {
|
|
2955
|
-
query:
|
|
3030
|
+
query: er(t)
|
|
2956
3031
|
}
|
|
2957
3032
|
} : {
|
|
2958
3033
|
multi_match: {
|
|
2959
|
-
type:
|
|
2960
|
-
query:
|
|
3034
|
+
type: A,
|
|
3035
|
+
query: x,
|
|
2961
3036
|
lenient: !0
|
|
2962
3037
|
}
|
|
2963
3038
|
};
|
|
2964
|
-
const _ = r ?
|
|
3039
|
+
const _ = r ? pr(g, r) : [];
|
|
2965
3040
|
_ && _.length === 0 && _.push({
|
|
2966
|
-
name:
|
|
3041
|
+
name: D(g),
|
|
2967
3042
|
scripted: !1,
|
|
2968
3043
|
type: ""
|
|
2969
3044
|
});
|
|
2970
|
-
const
|
|
2971
|
-
return
|
|
3045
|
+
const S = t.type === "wildcard" && x === "*", k = g.type === "wildcard" && b === "*" || _ && r && _.length === r.fields.length;
|
|
3046
|
+
return S && k ? { match_all: {} } : {
|
|
2972
3047
|
bool: {
|
|
2973
3048
|
should: _.reduce((te, H) => {
|
|
2974
3049
|
const q = (R) => {
|
|
2975
|
-
var
|
|
2976
|
-
return
|
|
3050
|
+
var me;
|
|
3051
|
+
return g.type !== "wildcard" || !((me = H.subType) != null && me.nested) || i != null && i.nested ? R : {
|
|
2977
3052
|
nested: {
|
|
2978
3053
|
path: H.subType.nested.path,
|
|
2979
3054
|
query: R,
|
|
@@ -2983,7 +3058,7 @@ function Mn(s, r, o = {}, i = {}) {
|
|
|
2983
3058
|
};
|
|
2984
3059
|
if (H.scripted)
|
|
2985
3060
|
return [];
|
|
2986
|
-
if (
|
|
3061
|
+
if (S)
|
|
2987
3062
|
return [
|
|
2988
3063
|
...te,
|
|
2989
3064
|
q({
|
|
@@ -2998,7 +3073,7 @@ function Mn(s, r, o = {}, i = {}) {
|
|
|
2998
3073
|
q({
|
|
2999
3074
|
query_string: {
|
|
3000
3075
|
fields: [H.name],
|
|
3001
|
-
query:
|
|
3076
|
+
query: er(t)
|
|
3002
3077
|
}
|
|
3003
3078
|
})
|
|
3004
3079
|
];
|
|
@@ -3009,20 +3084,20 @@ function Mn(s, r, o = {}, i = {}) {
|
|
|
3009
3084
|
q({
|
|
3010
3085
|
range: {
|
|
3011
3086
|
[H.name]: {
|
|
3012
|
-
gte:
|
|
3013
|
-
lte:
|
|
3087
|
+
gte: x,
|
|
3088
|
+
lte: x,
|
|
3014
3089
|
...R
|
|
3015
3090
|
}
|
|
3016
3091
|
}
|
|
3017
3092
|
})
|
|
3018
3093
|
];
|
|
3019
3094
|
} else {
|
|
3020
|
-
const R =
|
|
3095
|
+
const R = A === "phrase" ? "match_phrase" : "match";
|
|
3021
3096
|
return [
|
|
3022
3097
|
...te,
|
|
3023
3098
|
q({
|
|
3024
3099
|
[R]: {
|
|
3025
|
-
[H.name]:
|
|
3100
|
+
[H.name]: x
|
|
3026
3101
|
}
|
|
3027
3102
|
})
|
|
3028
3103
|
];
|
|
@@ -3032,98 +3107,98 @@ function Mn(s, r, o = {}, i = {}) {
|
|
|
3032
3107
|
}
|
|
3033
3108
|
};
|
|
3034
3109
|
}
|
|
3035
|
-
const
|
|
3110
|
+
const Xn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3036
3111
|
__proto__: null,
|
|
3037
|
-
buildNodeParams:
|
|
3038
|
-
toOpenSearchQuery:
|
|
3112
|
+
buildNodeParams: Kn,
|
|
3113
|
+
toOpenSearchQuery: Zn
|
|
3039
3114
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3040
|
-
function
|
|
3115
|
+
function Gn(s) {
|
|
3041
3116
|
return {
|
|
3042
3117
|
arguments: s
|
|
3043
3118
|
};
|
|
3044
3119
|
}
|
|
3045
|
-
function
|
|
3120
|
+
function Jn(s, r, o = {}, i = {}) {
|
|
3046
3121
|
return {
|
|
3047
3122
|
bool: {
|
|
3048
|
-
filter: (s.arguments || []).map((t) =>
|
|
3123
|
+
filter: (s.arguments || []).map((t) => D(t, r, o, i))
|
|
3049
3124
|
}
|
|
3050
3125
|
};
|
|
3051
3126
|
}
|
|
3052
|
-
const
|
|
3127
|
+
const Vn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3053
3128
|
__proto__: null,
|
|
3054
|
-
buildNodeParams:
|
|
3055
|
-
toOpenSearchQuery:
|
|
3129
|
+
buildNodeParams: Gn,
|
|
3130
|
+
toOpenSearchQuery: Jn
|
|
3056
3131
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3057
|
-
function
|
|
3132
|
+
function ea(s) {
|
|
3058
3133
|
return {
|
|
3059
3134
|
arguments: s
|
|
3060
3135
|
};
|
|
3061
3136
|
}
|
|
3062
|
-
function
|
|
3137
|
+
function ta(s, r, o = {}, i = {}) {
|
|
3063
3138
|
return {
|
|
3064
3139
|
bool: {
|
|
3065
|
-
should: (s.arguments || []).map((t) =>
|
|
3140
|
+
should: (s.arguments || []).map((t) => D(t, r, o, i)),
|
|
3066
3141
|
minimum_should_match: 1
|
|
3067
3142
|
}
|
|
3068
3143
|
};
|
|
3069
3144
|
}
|
|
3070
|
-
const
|
|
3145
|
+
const ra = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3071
3146
|
__proto__: null,
|
|
3072
|
-
buildNodeParams:
|
|
3073
|
-
toOpenSearchQuery:
|
|
3147
|
+
buildNodeParams: ea,
|
|
3148
|
+
toOpenSearchQuery: ta
|
|
3074
3149
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3075
|
-
function
|
|
3150
|
+
function sa(s) {
|
|
3076
3151
|
return {
|
|
3077
3152
|
arguments: [s]
|
|
3078
3153
|
};
|
|
3079
3154
|
}
|
|
3080
|
-
function
|
|
3155
|
+
function ia(s, r, o = {}, i = {}) {
|
|
3081
3156
|
const [c] = s.arguments;
|
|
3082
3157
|
return {
|
|
3083
3158
|
bool: {
|
|
3084
|
-
must_not:
|
|
3159
|
+
must_not: D(c, r, o, i)
|
|
3085
3160
|
}
|
|
3086
3161
|
};
|
|
3087
3162
|
}
|
|
3088
|
-
const
|
|
3163
|
+
const oa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3089
3164
|
__proto__: null,
|
|
3090
|
-
buildNodeParams:
|
|
3091
|
-
toOpenSearchQuery:
|
|
3165
|
+
buildNodeParams: sa,
|
|
3166
|
+
toOpenSearchQuery: ia
|
|
3092
3167
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3093
|
-
function
|
|
3168
|
+
function na(s, ...r) {
|
|
3094
3169
|
let o = {};
|
|
3095
3170
|
for (let i of r)
|
|
3096
3171
|
o[i] = s[i];
|
|
3097
3172
|
return o;
|
|
3098
3173
|
}
|
|
3099
|
-
function
|
|
3100
|
-
const o =
|
|
3101
|
-
let [
|
|
3102
|
-
return ne.namedArg.buildNode(
|
|
3174
|
+
function aa(s, r) {
|
|
3175
|
+
const o = na(r, "gt", "lt", "gte", "lte", "format"), i = typeof s == "string" ? Pe(s) : ne.literal.buildNode(s), c = Object.entries(o).map((t) => {
|
|
3176
|
+
let [u, g] = t;
|
|
3177
|
+
return ne.namedArg.buildNode(u, g);
|
|
3103
3178
|
});
|
|
3104
3179
|
return {
|
|
3105
3180
|
arguments: [i, ...c]
|
|
3106
3181
|
};
|
|
3107
3182
|
}
|
|
3108
|
-
function
|
|
3109
|
-
const [c, ...t] = s.arguments,
|
|
3183
|
+
function ca(s, r, o = {}, i = {}) {
|
|
3184
|
+
const [c, ...t] = s.arguments, u = ei(
|
|
3110
3185
|
c,
|
|
3111
3186
|
r,
|
|
3112
3187
|
i != null && i.nested ? i.nested.path : void 0
|
|
3113
|
-
),
|
|
3114
|
-
return
|
|
3115
|
-
name:
|
|
3188
|
+
), g = r ? pr(u, r) : [], b = la(t), x = Object.fromEntries(Object.entries(b).map(([_, S]) => [_, D(S)]));
|
|
3189
|
+
return g && g.length === 0 && g.push({
|
|
3190
|
+
name: D(u),
|
|
3116
3191
|
scripted: !1,
|
|
3117
3192
|
type: ""
|
|
3118
3193
|
}), {
|
|
3119
3194
|
bool: {
|
|
3120
|
-
should:
|
|
3121
|
-
const
|
|
3122
|
-
var
|
|
3123
|
-
return
|
|
3195
|
+
should: g.map((_) => {
|
|
3196
|
+
const S = (k) => {
|
|
3197
|
+
var z;
|
|
3198
|
+
return u.type !== "wildcard" || !((z = _.subType) != null && z.nested) || i.nested ? k : {
|
|
3124
3199
|
nested: {
|
|
3125
3200
|
path: _.subType.nested.path,
|
|
3126
|
-
query:
|
|
3201
|
+
query: k,
|
|
3127
3202
|
score_mode: "none"
|
|
3128
3203
|
}
|
|
3129
3204
|
};
|
|
@@ -3131,19 +3206,19 @@ function Jn(s, r, o = {}, i = {}) {
|
|
|
3131
3206
|
if (_.scripted)
|
|
3132
3207
|
return {};
|
|
3133
3208
|
if (_.type === "date") {
|
|
3134
|
-
const
|
|
3135
|
-
return
|
|
3209
|
+
const k = o.dateFormatTZ ? { time_zone: o.dateFormatTZ } : {};
|
|
3210
|
+
return S({
|
|
3136
3211
|
range: {
|
|
3137
3212
|
[_.name]: {
|
|
3138
|
-
...
|
|
3139
|
-
...
|
|
3213
|
+
...x,
|
|
3214
|
+
...k
|
|
3140
3215
|
}
|
|
3141
3216
|
}
|
|
3142
3217
|
});
|
|
3143
3218
|
}
|
|
3144
|
-
return
|
|
3219
|
+
return S({
|
|
3145
3220
|
range: {
|
|
3146
|
-
[_.name]:
|
|
3221
|
+
[_.name]: x
|
|
3147
3222
|
}
|
|
3148
3223
|
});
|
|
3149
3224
|
}),
|
|
@@ -3151,74 +3226,74 @@ function Jn(s, r, o = {}, i = {}) {
|
|
|
3151
3226
|
}
|
|
3152
3227
|
};
|
|
3153
3228
|
}
|
|
3154
|
-
function
|
|
3229
|
+
function la(s) {
|
|
3155
3230
|
if (s.gt && s.gte || s.lt && s.lte)
|
|
3156
3231
|
throw new Error("range ends cannot be both inclusive and exclusive");
|
|
3157
3232
|
const r = ["gte", "lte", "format"];
|
|
3158
3233
|
return s.reduce((o, i, c) => (i.type === "namedArg" ? o[i.name] = i.value : o[r[c]] = i, o), {});
|
|
3159
3234
|
}
|
|
3160
|
-
const
|
|
3235
|
+
const pa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3161
3236
|
__proto__: null,
|
|
3162
|
-
buildNodeParams:
|
|
3163
|
-
toOpenSearchQuery:
|
|
3237
|
+
buildNodeParams: aa,
|
|
3238
|
+
toOpenSearchQuery: ca
|
|
3164
3239
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3165
|
-
function
|
|
3240
|
+
function ua(s) {
|
|
3166
3241
|
return {
|
|
3167
|
-
arguments: [
|
|
3242
|
+
arguments: [Ce(s)]
|
|
3168
3243
|
};
|
|
3169
3244
|
}
|
|
3170
|
-
function
|
|
3245
|
+
function da(s, r, o = {}, i = {}) {
|
|
3171
3246
|
const {
|
|
3172
3247
|
arguments: [c]
|
|
3173
3248
|
} = s, t = {
|
|
3174
3249
|
...c,
|
|
3175
3250
|
value: i != null && i.nested ? `${i.nested.path}.${c.value}` : c.value
|
|
3176
|
-
},
|
|
3177
|
-
if (
|
|
3251
|
+
}, u = cr(t), g = ((r == null ? void 0 : r.fields) || []).find((b) => b.name === u);
|
|
3252
|
+
if (g && g.scripted)
|
|
3178
3253
|
throw new Error("Exists query does not support scripted fields");
|
|
3179
3254
|
return {
|
|
3180
|
-
exists: { field:
|
|
3255
|
+
exists: { field: u }
|
|
3181
3256
|
};
|
|
3182
3257
|
}
|
|
3183
|
-
const
|
|
3258
|
+
const fa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3184
3259
|
__proto__: null,
|
|
3185
|
-
buildNodeParams:
|
|
3186
|
-
toOpenSearchQuery:
|
|
3260
|
+
buildNodeParams: ua,
|
|
3261
|
+
toOpenSearchQuery: da
|
|
3187
3262
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3188
|
-
function
|
|
3263
|
+
function ha(s, r) {
|
|
3189
3264
|
return {
|
|
3190
|
-
arguments: [typeof s == "string" ?
|
|
3265
|
+
arguments: [typeof s == "string" ? Pe(s) : Ce(s), r]
|
|
3191
3266
|
};
|
|
3192
3267
|
}
|
|
3193
|
-
function
|
|
3194
|
-
var
|
|
3195
|
-
const [c, t] = s.arguments,
|
|
3268
|
+
function ga(s, r, o = {}, i = {}) {
|
|
3269
|
+
var b;
|
|
3270
|
+
const [c, t] = s.arguments, u = D(c), g = (b = i == null ? void 0 : i.nested) != null && b.path ? `${i.nested.path}.${u}` : u;
|
|
3196
3271
|
return {
|
|
3197
3272
|
nested: {
|
|
3198
|
-
path:
|
|
3199
|
-
query:
|
|
3273
|
+
path: g,
|
|
3274
|
+
query: D(t, r, o, {
|
|
3200
3275
|
...i,
|
|
3201
|
-
nested: { path:
|
|
3276
|
+
nested: { path: g }
|
|
3202
3277
|
}),
|
|
3203
3278
|
score_mode: "none"
|
|
3204
3279
|
}
|
|
3205
3280
|
};
|
|
3206
3281
|
}
|
|
3207
|
-
const
|
|
3282
|
+
const ba = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3208
3283
|
__proto__: null,
|
|
3209
|
-
buildNodeParams:
|
|
3210
|
-
toOpenSearchQuery:
|
|
3211
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
3212
|
-
is:
|
|
3213
|
-
and:
|
|
3214
|
-
or:
|
|
3215
|
-
not:
|
|
3216
|
-
range:
|
|
3217
|
-
exists:
|
|
3218
|
-
nested:
|
|
3284
|
+
buildNodeParams: ha,
|
|
3285
|
+
toOpenSearchQuery: ga
|
|
3286
|
+
}, Symbol.toStringTag, { value: "Module" })), ur = {
|
|
3287
|
+
is: Xn,
|
|
3288
|
+
and: Vn,
|
|
3289
|
+
or: ra,
|
|
3290
|
+
not: oa,
|
|
3291
|
+
range: pa,
|
|
3292
|
+
exists: fa,
|
|
3293
|
+
nested: ba
|
|
3219
3294
|
};
|
|
3220
|
-
function
|
|
3221
|
-
const o =
|
|
3295
|
+
function va(s, ...r) {
|
|
3296
|
+
const o = ur[s];
|
|
3222
3297
|
if (o === void 0)
|
|
3223
3298
|
throw new Error(`Unknown function "${s}"`);
|
|
3224
3299
|
return {
|
|
@@ -3229,8 +3304,8 @@ function aa(s, ...r) {
|
|
|
3229
3304
|
...o.buildNodeParams(...r)
|
|
3230
3305
|
};
|
|
3231
3306
|
}
|
|
3232
|
-
function
|
|
3233
|
-
if (
|
|
3307
|
+
function ya(s, r) {
|
|
3308
|
+
if (ur[s] === void 0)
|
|
3234
3309
|
throw new Error(`Unknown function "${s}"`);
|
|
3235
3310
|
return {
|
|
3236
3311
|
type: "function",
|
|
@@ -3238,16 +3313,16 @@ function ca(s, r) {
|
|
|
3238
3313
|
arguments: r
|
|
3239
3314
|
};
|
|
3240
3315
|
}
|
|
3241
|
-
function
|
|
3242
|
-
return
|
|
3316
|
+
function ma(s, r, o, i) {
|
|
3317
|
+
return ur[s.function].toOpenSearchQuery(s, r, o, i);
|
|
3243
3318
|
}
|
|
3244
|
-
const
|
|
3319
|
+
const $a = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3245
3320
|
__proto__: null,
|
|
3246
|
-
buildNode:
|
|
3247
|
-
buildNodeWithArgumentNodes:
|
|
3248
|
-
toOpenSearchQuery:
|
|
3321
|
+
buildNode: va,
|
|
3322
|
+
buildNodeWithArgumentNodes: ya,
|
|
3323
|
+
toOpenSearchQuery: ma
|
|
3249
3324
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3250
|
-
function
|
|
3325
|
+
function _a(s, r) {
|
|
3251
3326
|
const o = r.type === "literal" ? r : ne.literal.buildNode(r);
|
|
3252
3327
|
return {
|
|
3253
3328
|
type: "namedArg",
|
|
@@ -3255,125 +3330,125 @@ function pa(s, r) {
|
|
|
3255
3330
|
value: o
|
|
3256
3331
|
};
|
|
3257
3332
|
}
|
|
3258
|
-
function
|
|
3259
|
-
return
|
|
3333
|
+
function wa(s) {
|
|
3334
|
+
return D(s.value);
|
|
3260
3335
|
}
|
|
3261
|
-
const
|
|
3336
|
+
const xa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3262
3337
|
__proto__: null,
|
|
3263
|
-
buildNode:
|
|
3264
|
-
toOpenSearchQuery:
|
|
3338
|
+
buildNode: _a,
|
|
3339
|
+
toOpenSearchQuery: wa
|
|
3265
3340
|
}, Symbol.toStringTag, { value: "Module" })), ne = {
|
|
3266
3341
|
// This requires better typing of the different typings and their return types.
|
|
3267
3342
|
// @ts-ignore
|
|
3268
|
-
function:
|
|
3269
|
-
literal:
|
|
3270
|
-
namedArg:
|
|
3271
|
-
wildcard:
|
|
3272
|
-
},
|
|
3343
|
+
function: $a,
|
|
3344
|
+
literal: Mn,
|
|
3345
|
+
namedArg: xa,
|
|
3346
|
+
wildcard: Yn
|
|
3347
|
+
}, Aa = ee, Sa = (s, r) => "(" + (s.arguments || []).map((i) => be(i, r)).join(" AND ") + ")", ka = (s, r) => {
|
|
3273
3348
|
var {
|
|
3274
3349
|
arguments: [o, i, c]
|
|
3275
3350
|
} = s;
|
|
3276
3351
|
let t = "=";
|
|
3277
3352
|
i.type === "wildcard" && (t = "");
|
|
3278
|
-
let
|
|
3279
|
-
c = c.value || typeof
|
|
3280
|
-
let
|
|
3281
|
-
return
|
|
3282
|
-
},
|
|
3353
|
+
let u = be(i);
|
|
3354
|
+
c = c.value || typeof u == "string", i.type === "literal" && c && (u = `'${u}'`), i.type === "literal" && !c && (u = `${u}`);
|
|
3355
|
+
let g = be(o);
|
|
3356
|
+
return g == null ? r && c ? `(${r.filter((b) => b.type === "string").map((b) => `${b.name} ILIKE '%${i.value}%'`).join(" OR ")})` : r && !c && (i.value === !0 || i.value === !1) ? `(${r.filter((b) => b.type === "boolean").map((b) => `${b.name}=${i.value}`).join(" OR ")})` : "" : g + t + u;
|
|
3357
|
+
}, Ca = (s, r) => "(" + (s.arguments || []).map((i) => be(i, r)).join(" OR ") + ")", Ea = (s, r) => {
|
|
3283
3358
|
const [o] = s.arguments;
|
|
3284
3359
|
return "NOT (" + be(o, r) + ")";
|
|
3285
|
-
},
|
|
3360
|
+
}, Oa = {
|
|
3286
3361
|
gt: ">",
|
|
3287
3362
|
lt: "<",
|
|
3288
3363
|
gte: ">=",
|
|
3289
3364
|
lte: "<="
|
|
3290
|
-
},
|
|
3365
|
+
}, Pa = (s) => {
|
|
3291
3366
|
const [r, o] = s.arguments;
|
|
3292
3367
|
let i = o.value;
|
|
3293
|
-
const c =
|
|
3368
|
+
const c = Oa[o.name];
|
|
3294
3369
|
let t = be(i);
|
|
3295
3370
|
return i.type === "literal" && (t = `${t}`), `${r.value} ${c} ${t}`;
|
|
3296
|
-
},
|
|
3371
|
+
}, Ta = (s) => {
|
|
3297
3372
|
const [r] = s.arguments;
|
|
3298
3373
|
return `${r.value} IS NOT NULL`;
|
|
3299
|
-
},
|
|
3300
|
-
is:
|
|
3301
|
-
and:
|
|
3302
|
-
or:
|
|
3303
|
-
not:
|
|
3304
|
-
range:
|
|
3305
|
-
exists:
|
|
3306
|
-
nested:
|
|
3307
|
-
},
|
|
3308
|
-
function: (s, r) =>
|
|
3374
|
+
}, La = (s) => (console.warn("Nested types dont exist in CQL", s), ""), Na = {
|
|
3375
|
+
is: ka,
|
|
3376
|
+
and: Sa,
|
|
3377
|
+
or: Ca,
|
|
3378
|
+
not: Ea,
|
|
3379
|
+
range: Pa,
|
|
3380
|
+
exists: Ta,
|
|
3381
|
+
nested: La
|
|
3382
|
+
}, Da = {
|
|
3383
|
+
function: (s, r) => Na[s.function](s, r),
|
|
3309
3384
|
literal: (s) => s.value,
|
|
3310
3385
|
wildcard: (s) => {
|
|
3311
3386
|
const { value: r } = s;
|
|
3312
|
-
return ` LIKE '${r.split(
|
|
3387
|
+
return ` LIKE '${r.split(Aa).join("%")}'`;
|
|
3313
3388
|
}
|
|
3314
3389
|
}, be = (s, r) => {
|
|
3315
|
-
const o =
|
|
3390
|
+
const o = Da[s.type];
|
|
3316
3391
|
return o(s, r);
|
|
3317
|
-
},
|
|
3392
|
+
}, ja = ee, za = (s) => ({ $and: (s.arguments || []).map((i) => ae(i)) }), Ra = (s) => {
|
|
3318
3393
|
const {
|
|
3319
3394
|
arguments: [r, o]
|
|
3320
3395
|
} = s;
|
|
3321
3396
|
let i = ae(o);
|
|
3322
3397
|
if (o.type === "wildcard" && o.value === "@kuery-wildcard@")
|
|
3323
|
-
return
|
|
3398
|
+
return ti(s);
|
|
3324
3399
|
let t = {};
|
|
3325
3400
|
return t[ae(r)] = { $eq: i }, t;
|
|
3326
|
-
},
|
|
3401
|
+
}, Ba = (s) => ({
|
|
3327
3402
|
$or: (s.arguments || []).map((o) => ae(o))
|
|
3328
|
-
}),
|
|
3403
|
+
}), Ua = (s) => {
|
|
3329
3404
|
const [r] = s.arguments;
|
|
3330
3405
|
let o = {};
|
|
3331
3406
|
return o = { $ne: ae(r) }, o;
|
|
3332
|
-
},
|
|
3407
|
+
}, Ma = {
|
|
3333
3408
|
gt: "$gt",
|
|
3334
3409
|
lt: "$lt",
|
|
3335
3410
|
gte: "$gte",
|
|
3336
3411
|
lte: "$lte"
|
|
3337
|
-
},
|
|
3412
|
+
}, Fa = (s) => {
|
|
3338
3413
|
const [r, o] = s.arguments;
|
|
3339
3414
|
let i = o.value;
|
|
3340
|
-
const c =
|
|
3341
|
-
let t = ae(i),
|
|
3342
|
-
return
|
|
3343
|
-
},
|
|
3415
|
+
const c = Ma[o.name];
|
|
3416
|
+
let t = ae(i), u = {};
|
|
3417
|
+
return u[r.value] = {}, u[r.value][c] = t, u;
|
|
3418
|
+
}, ti = (s) => {
|
|
3344
3419
|
const [r] = s.arguments;
|
|
3345
3420
|
return { [ae(r)]: { $ne: null } };
|
|
3346
|
-
},
|
|
3347
|
-
is:
|
|
3348
|
-
and:
|
|
3349
|
-
or:
|
|
3350
|
-
not:
|
|
3351
|
-
range:
|
|
3352
|
-
exists:
|
|
3353
|
-
nested:
|
|
3354
|
-
},
|
|
3355
|
-
function: (s) =>
|
|
3421
|
+
}, Ia = (s) => (console.warn("TODO Implement nested search", s), ""), Qa = {
|
|
3422
|
+
is: Ra,
|
|
3423
|
+
and: za,
|
|
3424
|
+
or: Ba,
|
|
3425
|
+
not: Ua,
|
|
3426
|
+
range: Fa,
|
|
3427
|
+
exists: ti,
|
|
3428
|
+
nested: Ia
|
|
3429
|
+
}, Ha = {
|
|
3430
|
+
function: (s) => Qa[s.function](s),
|
|
3356
3431
|
literal: (s) => s.value,
|
|
3357
3432
|
wildcard: (s) => {
|
|
3358
3433
|
const { value: r } = s;
|
|
3359
|
-
return `/${r.split(
|
|
3434
|
+
return `/${r.split(ja).join(".*")}/`;
|
|
3360
3435
|
}
|
|
3361
3436
|
}, ae = (s, r) => {
|
|
3362
|
-
const o =
|
|
3437
|
+
const o = Ha[s.type];
|
|
3363
3438
|
return o(s, r);
|
|
3364
|
-
},
|
|
3439
|
+
}, qa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3365
3440
|
__proto__: null,
|
|
3366
|
-
DQLSyntaxError:
|
|
3367
|
-
doesKueryExpressionHaveLuceneSyntaxError:
|
|
3368
|
-
fromKueryExpression:
|
|
3369
|
-
fromLiteralExpression:
|
|
3441
|
+
DQLSyntaxError: Js,
|
|
3442
|
+
doesKueryExpressionHaveLuceneSyntaxError: Fn,
|
|
3443
|
+
fromKueryExpression: $t,
|
|
3444
|
+
fromLiteralExpression: Pe,
|
|
3370
3445
|
nodeTypes: ne,
|
|
3371
|
-
parse:
|
|
3446
|
+
parse: $t,
|
|
3372
3447
|
toCql: be,
|
|
3373
|
-
toDSL:
|
|
3448
|
+
toDSL: D,
|
|
3374
3449
|
toMongo: ae,
|
|
3375
|
-
toOpenSearchQuery:
|
|
3376
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
3450
|
+
toOpenSearchQuery: D
|
|
3451
|
+
}, Symbol.toStringTag, { value: "Module" })), Wa = Z`
|
|
3377
3452
|
:host {
|
|
3378
3453
|
--dialog-padding: var(--spectric-dialog-padding, 5px);
|
|
3379
3454
|
--dialog-background:var(--spectric-background,rgb(246, 249, 252));
|
|
@@ -3421,13 +3496,13 @@ spectric-button{
|
|
|
3421
3496
|
top: 0;
|
|
3422
3497
|
}
|
|
3423
3498
|
`;
|
|
3424
|
-
var
|
|
3425
|
-
for (var c = i > 1 ? void 0 : i ?
|
|
3426
|
-
(
|
|
3427
|
-
return i && c &&
|
|
3499
|
+
var Ya = Object.defineProperty, Ka = Object.getOwnPropertyDescriptor, le = (s, r, o, i) => {
|
|
3500
|
+
for (var c = i > 1 ? void 0 : i ? Ka(r, o) : r, t = s.length - 1, u; t >= 0; t--)
|
|
3501
|
+
(u = s[t]) && (c = (i ? u(r, o, c) : u(c)) || c);
|
|
3502
|
+
return i && c && Ya(r, o, c), c;
|
|
3428
3503
|
};
|
|
3429
|
-
const
|
|
3430
|
-
let
|
|
3504
|
+
const ri = "spectric-dialog";
|
|
3505
|
+
let I = class extends O {
|
|
3431
3506
|
constructor() {
|
|
3432
3507
|
super(...arguments), this.open = !1, this.dismissable = !0, this.hideBackdrop = !1, this.title = "", this.closeOnEscape = !0, this.closeOnOutsideClick = !0, this.clickHandler = async (s) => {
|
|
3433
3508
|
const r = await this.dialogElement;
|
|
@@ -3442,14 +3517,14 @@ let F = class extends L {
|
|
|
3442
3517
|
};
|
|
3443
3518
|
}
|
|
3444
3519
|
static display(s, r) {
|
|
3445
|
-
let o = document.createElement(
|
|
3520
|
+
let o = document.createElement(ri);
|
|
3446
3521
|
o.addEventListener("close", () => {
|
|
3447
3522
|
o.remove();
|
|
3448
3523
|
});
|
|
3449
3524
|
for (let c in s)
|
|
3450
3525
|
o[c] = s[c];
|
|
3451
3526
|
let i = document.createDocumentFragment();
|
|
3452
|
-
return
|
|
3527
|
+
return Is(r, i), o.appendChild(i), o.open = !0, document.body.appendChild(o), o;
|
|
3453
3528
|
}
|
|
3454
3529
|
connectedCallback() {
|
|
3455
3530
|
super.connectedCallback(), this.dialogElement.then((s) => s.addEventListener("keydown", this._handleKeyDown));
|
|
@@ -3463,11 +3538,11 @@ let F = class extends L {
|
|
|
3463
3538
|
});
|
|
3464
3539
|
}
|
|
3465
3540
|
render() {
|
|
3466
|
-
return
|
|
3541
|
+
return w`
|
|
3467
3542
|
<dialog class=${this.hideBackdrop ? "" : "backdrop"} @close=${this._onClose} @click=${this.clickHandler}>
|
|
3468
3543
|
<spectric-panel>
|
|
3469
3544
|
<div class="modal">
|
|
3470
|
-
${this.dismissable ?
|
|
3545
|
+
${this.dismissable ? w`<spectric-button variant="text" size="small" @click=${() => {
|
|
3471
3546
|
this.open = !1;
|
|
3472
3547
|
}}>X</spectric-button>` : null}
|
|
3473
3548
|
<h3 >
|
|
@@ -3484,66 +3559,66 @@ let F = class extends L {
|
|
|
3484
3559
|
`;
|
|
3485
3560
|
}
|
|
3486
3561
|
};
|
|
3487
|
-
|
|
3488
|
-
|
|
3562
|
+
I.styles = Wa;
|
|
3563
|
+
le([
|
|
3489
3564
|
v({ type: Boolean, reflect: !0 })
|
|
3490
|
-
],
|
|
3491
|
-
|
|
3565
|
+
], I.prototype, "open", 2);
|
|
3566
|
+
le([
|
|
3492
3567
|
v({ type: Boolean, reflect: !0 })
|
|
3493
|
-
],
|
|
3494
|
-
|
|
3568
|
+
], I.prototype, "dismissable", 2);
|
|
3569
|
+
le([
|
|
3495
3570
|
v({ type: Boolean, reflect: !0 })
|
|
3496
|
-
],
|
|
3497
|
-
|
|
3571
|
+
], I.prototype, "hideBackdrop", 2);
|
|
3572
|
+
le([
|
|
3498
3573
|
v({ type: String, reflect: !0 })
|
|
3499
|
-
],
|
|
3500
|
-
|
|
3574
|
+
], I.prototype, "title", 2);
|
|
3575
|
+
le([
|
|
3501
3576
|
v({ type: Boolean, reflect: !0 })
|
|
3502
|
-
],
|
|
3503
|
-
|
|
3577
|
+
], I.prototype, "closeOnEscape", 2);
|
|
3578
|
+
le([
|
|
3504
3579
|
v({ type: Boolean, reflect: !0 })
|
|
3505
|
-
],
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
],
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
],
|
|
3512
|
-
var
|
|
3513
|
-
for (var c = i > 1 ? void 0 : i ?
|
|
3514
|
-
(
|
|
3515
|
-
return i && c &&
|
|
3516
|
-
},
|
|
3517
|
-
const
|
|
3580
|
+
], I.prototype, "closeOnOutsideClick", 2);
|
|
3581
|
+
le([
|
|
3582
|
+
kt("dialog")
|
|
3583
|
+
], I.prototype, "dialogElement", 2);
|
|
3584
|
+
I = le([
|
|
3585
|
+
N(ri)
|
|
3586
|
+
], I);
|
|
3587
|
+
var Za = Object.defineProperty, Xa = Object.getOwnPropertyDescriptor, G = (s, r, o, i) => {
|
|
3588
|
+
for (var c = i > 1 ? void 0 : i ? Xa(r, o) : r, t = s.length - 1, u; t >= 0; t--)
|
|
3589
|
+
(u = s[t]) && (c = (i ? u(r, o, c) : u(c)) || c);
|
|
3590
|
+
return i && c && Za(r, o, c), c;
|
|
3591
|
+
}, Ga = /* @__PURE__ */ ((s) => (s.MONGO = "toMongo", s.CQL = "toCql", s.DSL = "toDSL", s.AST = "AST", s))(Ga || {});
|
|
3592
|
+
const si = {
|
|
3518
3593
|
eq: { value: " : ", label: " equals some value" },
|
|
3519
3594
|
gt: { value: " > ", label: " is greater than some value" },
|
|
3520
3595
|
lt: { value: " < ", label: " is less than some value" },
|
|
3521
3596
|
gte: { value: " >= ", label: " is greater than or equal to some value" },
|
|
3522
3597
|
lte: { value: " <= ", label: " is less than or equal to some value" }
|
|
3523
|
-
},
|
|
3598
|
+
}, Ja = {
|
|
3524
3599
|
eq: { value: ": ", label: " equals some value" },
|
|
3525
3600
|
exists: { value: ": *", label: " exists in any form" }
|
|
3526
|
-
},
|
|
3601
|
+
}, Va = [
|
|
3527
3602
|
{ value: ": true", label: " value is true" },
|
|
3528
3603
|
{ value: ": false", label: "value is false" }
|
|
3529
|
-
],
|
|
3530
|
-
let Q = class extends
|
|
3604
|
+
], ec = Object.fromEntries(Object.entries(si).map(([s, r]) => [s, { value: r.value, label: (r.label || "").replace("value", "date-time") }]));
|
|
3605
|
+
let Q = class extends O {
|
|
3531
3606
|
constructor() {
|
|
3532
|
-
super(), this.placeholder = "", this._value = "", this.outputLanguage = "AST", this.completions = [], this.completionIndex = 0, this.fields = [], this._parseQuery = (s = void 0) => {
|
|
3607
|
+
super(), this.placeholder = "", this._value = "", this.value = "", this.outputLanguage = "AST", this.completions = [], this.completionIndex = 0, this.fields = [], this._parseQuery = (s = void 0) => {
|
|
3533
3608
|
let r;
|
|
3534
|
-
if (this.value == "")
|
|
3609
|
+
if (s && (s != null && s.currentTarget) && s.currentTarget.value && (this.value = s.currentTarget.value), this.value == "")
|
|
3535
3610
|
return;
|
|
3536
3611
|
try {
|
|
3537
3612
|
s && s.data == "(" && (this.value = this.value + " )", this._input.setSelectionRange(this.value.length - 2, this.value.length - 2));
|
|
3538
3613
|
let c = this.value;
|
|
3539
3614
|
this._input.selectionStart !== null && (c = c.substring(0, this._input.selectionStart) + "@kuery-cursor@" + c.substring(this._input.selectionStart));
|
|
3540
|
-
let t =
|
|
3541
|
-
this.autoComplete(t), r =
|
|
3615
|
+
let t = $t(c, { parseCursor: !0, cursorSymbol: "@kuery-cursor@", allowLeadingWildcards: !1 });
|
|
3616
|
+
this.autoComplete(t), r = $t(this.value, { allowLeadingWildcards: !1 });
|
|
3542
3617
|
} catch {
|
|
3543
3618
|
return;
|
|
3544
3619
|
}
|
|
3545
3620
|
let o;
|
|
3546
|
-
this.outputLanguage == "AST" ? o = r : o =
|
|
3621
|
+
this.outputLanguage == "AST" ? o = r : o = qa[this.outputLanguage](r, this.fields);
|
|
3547
3622
|
let i = new CustomEvent("change", { detail: o });
|
|
3548
3623
|
this.dispatchEvent(i);
|
|
3549
3624
|
}, this.getValuesForField = async (s, r) => (console.log("getValuesForField isn't set no values returned", s, r), []), this._selectCompletion = async () => {
|
|
@@ -3552,7 +3627,9 @@ let Q = class extends L {
|
|
|
3552
3627
|
let s = this.completions[this.completionIndex], r = this.value.substring(0, s.start) + s.value, o = r.length, i = this.value.substring(s.end);
|
|
3553
3628
|
if (s.value.includes(i) ? this.value = r : this.value = r + this.value.substring(s.end), this._input.setSelectionRange(o, o), s.onSelect) {
|
|
3554
3629
|
let c = await s.onSelect();
|
|
3555
|
-
c !== void 0 && (this.value += c)
|
|
3630
|
+
c !== void 0 && (this.value += c, setTimeout(() => {
|
|
3631
|
+
this._input.focus();
|
|
3632
|
+
}));
|
|
3556
3633
|
}
|
|
3557
3634
|
this.completionIndex = 0, this.completions = [], this._parseQuery();
|
|
3558
3635
|
}, this._handleArrows = (s) => {
|
|
@@ -3566,13 +3643,6 @@ let Q = class extends L {
|
|
|
3566
3643
|
createRenderRoot() {
|
|
3567
3644
|
return this;
|
|
3568
3645
|
}
|
|
3569
|
-
get value() {
|
|
3570
|
-
return this._input ? String(this._input.value) : this._value;
|
|
3571
|
-
}
|
|
3572
|
-
set value(s) {
|
|
3573
|
-
const r = this._value;
|
|
3574
|
-
this._value = s, this.requestUpdate("value", r), this._input && (this._input.value = String(s));
|
|
3575
|
-
}
|
|
3576
3646
|
async autoComplete(s) {
|
|
3577
3647
|
if (this.completions = [], s.type !== "cursor")
|
|
3578
3648
|
return;
|
|
@@ -3581,102 +3651,102 @@ let Q = class extends L {
|
|
|
3581
3651
|
let { start: o, end: i } = s;
|
|
3582
3652
|
for (let c of s.suggestionTypes) {
|
|
3583
3653
|
if (c == "conjunction" && s.text.endsWith(" ") && r.push(...["and ", "or "].map((t) => ({ type: c, value: t, start: i, end: i }))), c === "field") {
|
|
3584
|
-
let t = this.fields.filter((
|
|
3654
|
+
let t = this.fields.filter((u) => u.name.includes(s.fieldName) || u.name.includes(s.prefix)).map((u) => [{ type: c, value: u.name, start: o, end: i }]).flat();
|
|
3585
3655
|
r.push(...t);
|
|
3586
3656
|
}
|
|
3587
3657
|
if (c === "operator") {
|
|
3588
|
-
let t = this.fields.find((
|
|
3589
|
-
t && (t.type === "number" ? r.push(...Object.values(
|
|
3658
|
+
let t = this.fields.find((u) => u.name === s.fieldName);
|
|
3659
|
+
t && (t.type === "number" ? r.push(...Object.values(si).map((u) => ({ type: c, ...u, start: i, end: i }))) : t.type === "string" ? t.format === "date-time" ? r.push(...Object.values(ec).map((u) => ({
|
|
3590
3660
|
type: c,
|
|
3591
|
-
...
|
|
3661
|
+
...u,
|
|
3592
3662
|
start: i,
|
|
3593
3663
|
end: i,
|
|
3594
3664
|
onSelect: async () => {
|
|
3595
|
-
let
|
|
3596
|
-
|
|
3597
|
-
let
|
|
3598
|
-
return await new Promise((
|
|
3599
|
-
let _ =
|
|
3665
|
+
let g = await this.getValuesForField(s.fieldName, s.prefix);
|
|
3666
|
+
g.length === 0 && (g = ["now-1m", "now-1d", "now-1M"]);
|
|
3667
|
+
let b, x = ft();
|
|
3668
|
+
return await new Promise((A) => {
|
|
3669
|
+
let _ = I.display({}, w`
|
|
3600
3670
|
<div class="query-bar-date-quick-select">
|
|
3601
|
-
${
|
|
3602
|
-
|
|
3603
|
-
}}>${
|
|
3671
|
+
${g.map((S) => w`<a href="#" @click=${(k) => {
|
|
3672
|
+
k.preventDefault(), b = `"${S}"`, A(b), _.open = !1;
|
|
3673
|
+
}}>${S}</a>`)}
|
|
3604
3674
|
</div>
|
|
3605
|
-
<spectric-input variant="datetime-local" @change=${(
|
|
3606
|
-
if (!
|
|
3675
|
+
<spectric-input variant="datetime-local" @change=${(S) => {
|
|
3676
|
+
if (!S.target)
|
|
3607
3677
|
return;
|
|
3608
|
-
|
|
3678
|
+
b = `"${(/* @__PURE__ */ new Date(S.target.value + ":00.000Z")).toISOString()}"`, x.value.disabled = b === void 0;
|
|
3609
3679
|
}}></spectric-input>
|
|
3610
|
-
<spectric-button ${
|
|
3611
|
-
|
|
3680
|
+
<spectric-button ${ht(x)} .disabled=${!0} @click=${() => {
|
|
3681
|
+
A(b), _.open = !1;
|
|
3612
3682
|
}}>Submit</spectric-button>
|
|
3613
3683
|
`);
|
|
3614
|
-
}),
|
|
3684
|
+
}), b;
|
|
3615
3685
|
}
|
|
3616
|
-
}))) : r.push(...Object.values(
|
|
3686
|
+
}))) : r.push(...Object.values(Ja).map((u) => ({ type: c, ...u, start: i, end: i }))) : t.type === "boolean" && r.push(...Va.map((u) => ({ type: c, ...u, start: i, end: i }))));
|
|
3617
3687
|
}
|
|
3618
3688
|
if (c === "value") {
|
|
3619
|
-
let t = this.fields.find((
|
|
3689
|
+
let t = this.fields.find((u) => u.name === s.fieldName);
|
|
3620
3690
|
if (t && t.type == "boolean")
|
|
3621
3691
|
r.push({ type: c, value: "true", start: o, end: i }, { type: c, value: "false", start: o, end: i });
|
|
3622
3692
|
else {
|
|
3623
3693
|
console.log(`invoke callback to get values for ${s.fieldName}`);
|
|
3624
|
-
let
|
|
3625
|
-
(t == null ? void 0 : t.type) === "string" && (
|
|
3694
|
+
let u = await this.getValuesForField(s.fieldName, s.prefix);
|
|
3695
|
+
(t == null ? void 0 : t.type) === "string" && (u = u.map((g) => `"${g}"`)), r.push(...u.map((g) => ({ type: c, value: g, start: o, end: i })));
|
|
3626
3696
|
}
|
|
3627
3697
|
}
|
|
3628
3698
|
}
|
|
3629
3699
|
if (this.completions = r, this.completions.length && this._autocomplete) {
|
|
3630
|
-
let { width: c, left: t, bottom:
|
|
3631
|
-
this._autocomplete.showPopover(), "anchorName" in document.documentElement.style || (this._autocomplete.style.left = `${t + 3.75}px`, this._autocomplete.style.top = `${
|
|
3700
|
+
let { width: c, left: t, bottom: u } = this._input.getBoundingClientRect();
|
|
3701
|
+
this._autocomplete.showPopover(), "anchorName" in document.documentElement.style || (this._autocomplete.style.left = `${t + 3.75}px`, this._autocomplete.style.top = `${u}px`), this._autocomplete.style.width = `${c - 15}px`;
|
|
3632
3702
|
}
|
|
3633
3703
|
}
|
|
3634
3704
|
updated(s) {
|
|
3635
3705
|
s.has("outputLanguage") && this._parseQuery();
|
|
3636
3706
|
}
|
|
3637
3707
|
render() {
|
|
3638
|
-
return
|
|
3639
|
-
<spectric-input .placeholder=${this.placeholder} style=${`anchor-name:--${this.uuid};`} autocomplete="off" @input=${this._parseQuery} @keydown=${this._handleArrows} @change=${(s) => s.stopPropagation()}></spectric-input>
|
|
3708
|
+
return w`
|
|
3709
|
+
<spectric-input .value=${this.value} .placeholder=${this.placeholder} style=${`anchor-name:--${this.uuid};`} autocomplete="off" @input=${this._parseQuery} @keydown=${this._handleArrows} @change=${(s) => s.stopPropagation()}></spectric-input>
|
|
3640
3710
|
<div class="autocomplete" popover style=${`position-anchor: --${this.uuid};`}>
|
|
3641
3711
|
${this.completions.map(
|
|
3642
|
-
(s, r) =>
|
|
3712
|
+
(s, r) => w`<div @click=${() => {
|
|
3643
3713
|
this.completionIndex = r, this._selectCompletion();
|
|
3644
3714
|
}} class=${this.completionIndex == r ? "option active" : "option"}><span class="optiontype ${s.type}">${s.type}</span> <span class="value">${s.value}</span> <span class="label">${s.label}</span></span> </div></div>`
|
|
3645
3715
|
)}
|
|
3646
3716
|
</div>`;
|
|
3647
3717
|
}
|
|
3648
3718
|
};
|
|
3649
|
-
|
|
3719
|
+
G([
|
|
3650
3720
|
v({ type: String, reflect: !0 })
|
|
3651
3721
|
], Q.prototype, "placeholder", 2);
|
|
3652
|
-
|
|
3722
|
+
G([
|
|
3653
3723
|
v({ type: String, reflect: !0 })
|
|
3654
|
-
], Q.prototype, "value",
|
|
3655
|
-
|
|
3724
|
+
], Q.prototype, "value", 2);
|
|
3725
|
+
G([
|
|
3656
3726
|
v({ type: String, reflect: !0 })
|
|
3657
3727
|
], Q.prototype, "outputLanguage", 2);
|
|
3658
|
-
|
|
3659
|
-
|
|
3728
|
+
G([
|
|
3729
|
+
St()
|
|
3660
3730
|
], Q.prototype, "completions", 2);
|
|
3661
|
-
|
|
3662
|
-
|
|
3731
|
+
G([
|
|
3732
|
+
St()
|
|
3663
3733
|
], Q.prototype, "completionIndex", 2);
|
|
3664
|
-
|
|
3734
|
+
G([
|
|
3665
3735
|
v({ type: Array, reflect: !0 })
|
|
3666
3736
|
], Q.prototype, "fields", 2);
|
|
3667
|
-
|
|
3668
|
-
|
|
3737
|
+
G([
|
|
3738
|
+
Ze(".autocomplete")
|
|
3669
3739
|
], Q.prototype, "_autocomplete", 2);
|
|
3670
|
-
|
|
3671
|
-
|
|
3740
|
+
G([
|
|
3741
|
+
kt(".autocomplete")
|
|
3672
3742
|
], Q.prototype, "_asyncAutocomplete", 2);
|
|
3673
|
-
|
|
3674
|
-
|
|
3743
|
+
G([
|
|
3744
|
+
Ze("spectric-input")
|
|
3675
3745
|
], Q.prototype, "_input", 2);
|
|
3676
|
-
Q =
|
|
3677
|
-
|
|
3746
|
+
Q = G([
|
|
3747
|
+
N("spectric-query")
|
|
3678
3748
|
], Q);
|
|
3679
|
-
const
|
|
3749
|
+
const Ns = Z`
|
|
3680
3750
|
border-color: color-mix(in hsl, var(--panel-color, #0b0b0b), var(--spectric-input-color, #000000) 3%);
|
|
3681
3751
|
background-color: var(--panel-color,#0b0b0b);
|
|
3682
3752
|
--spectric-input-color: var(--spectric-background);
|
|
@@ -3684,7 +3754,7 @@ const As = K`
|
|
|
3684
3754
|
--spectric-text-primary:var(--text-primary);
|
|
3685
3755
|
--spectric-text-secondary:var(--text-secondary);
|
|
3686
3756
|
filter: drop-shadow(0px 1px 3px color-mix(in srgb, var(--text-secondary, #3c4c5b), transparent 50%));
|
|
3687
|
-
`,
|
|
3757
|
+
`, Ds = Z`
|
|
3688
3758
|
border-color: color-mix(in hsl, var(--panel-color-inverse,#f4f4f4), var(--spectric-input-color, #000000) 3%);
|
|
3689
3759
|
background-color: var(--panel-color-inverse,#0b0b0b);
|
|
3690
3760
|
color:var(--text-primary,#3c4c5b);
|
|
@@ -3692,7 +3762,7 @@ const As = K`
|
|
|
3692
3762
|
--spectric-text-primary:var(--text-secondary);
|
|
3693
3763
|
--spectric-text-secondary:var(--text-primary);
|
|
3694
3764
|
filter: drop-shadow(0px 1px 3px color-mix(in srgb, var(--text-primary, #3c4c5b), transparent 70%));
|
|
3695
|
-
`,
|
|
3765
|
+
`, tc = Z`
|
|
3696
3766
|
:host{
|
|
3697
3767
|
display:block;
|
|
3698
3768
|
border:2px solid black;
|
|
@@ -3702,26 +3772,26 @@ const As = K`
|
|
|
3702
3772
|
|
|
3703
3773
|
}
|
|
3704
3774
|
:host(spectric-panel[level='0']) {
|
|
3705
|
-
${
|
|
3775
|
+
${Ns};
|
|
3706
3776
|
}
|
|
3707
3777
|
|
|
3708
3778
|
:host(spectric-panel[level='1']) {
|
|
3709
|
-
${
|
|
3779
|
+
${Ds};
|
|
3710
3780
|
}
|
|
3711
3781
|
|
|
3712
3782
|
:host(spectric-panel[level='2']) {
|
|
3713
|
-
${
|
|
3783
|
+
${Ns};
|
|
3714
3784
|
}
|
|
3715
3785
|
:host(spectric-panel[level='3']) {
|
|
3716
|
-
${
|
|
3786
|
+
${Ds};
|
|
3717
3787
|
}
|
|
3718
3788
|
`;
|
|
3719
|
-
var
|
|
3720
|
-
for (var c = i > 1 ? void 0 : i ?
|
|
3721
|
-
(
|
|
3722
|
-
return i && c &&
|
|
3789
|
+
var rc = Object.defineProperty, sc = Object.getOwnPropertyDescriptor, dr = (s, r, o, i) => {
|
|
3790
|
+
for (var c = i > 1 ? void 0 : i ? sc(r, o) : r, t = s.length - 1, u; t >= 0; t--)
|
|
3791
|
+
(u = s[t]) && (c = (i ? u(r, o, c) : u(c)) || c);
|
|
3792
|
+
return i && c && rc(r, o, c), c;
|
|
3723
3793
|
};
|
|
3724
|
-
let
|
|
3794
|
+
let We = class extends O {
|
|
3725
3795
|
constructor() {
|
|
3726
3796
|
super(...arguments), this.level = 0;
|
|
3727
3797
|
}
|
|
@@ -3746,25 +3816,25 @@ let He = class extends L {
|
|
|
3746
3816
|
);
|
|
3747
3817
|
}
|
|
3748
3818
|
render() {
|
|
3749
|
-
return
|
|
3819
|
+
return w` <slot></slot> `;
|
|
3750
3820
|
}
|
|
3751
3821
|
};
|
|
3752
|
-
|
|
3753
|
-
|
|
3822
|
+
We.styles = tc;
|
|
3823
|
+
dr([
|
|
3754
3824
|
v({ type: Number, reflect: !0 })
|
|
3755
|
-
],
|
|
3756
|
-
|
|
3825
|
+
], We.prototype, "level", 2);
|
|
3826
|
+
dr([
|
|
3757
3827
|
v({ attribute: !1 })
|
|
3758
|
-
],
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
],
|
|
3762
|
-
var
|
|
3763
|
-
for (var c = i > 1 ? void 0 : i ?
|
|
3764
|
-
(
|
|
3765
|
-
return i && c &&
|
|
3828
|
+
], We.prototype, "layers", 2);
|
|
3829
|
+
We = dr([
|
|
3830
|
+
N("spectric-panel")
|
|
3831
|
+
], We);
|
|
3832
|
+
var ic = Object.defineProperty, oc = Object.getOwnPropertyDescriptor, ii = (s, r, o, i) => {
|
|
3833
|
+
for (var c = i > 1 ? void 0 : i ? oc(r, o) : r, t = s.length - 1, u; t >= 0; t--)
|
|
3834
|
+
(u = s[t]) && (c = (i ? u(r, o, c) : u(c)) || c);
|
|
3835
|
+
return i && c && ic(r, o, c), c;
|
|
3766
3836
|
};
|
|
3767
|
-
const
|
|
3837
|
+
const Lc = {
|
|
3768
3838
|
"--primary": { control: "color" },
|
|
3769
3839
|
"--secondary": { control: "color" },
|
|
3770
3840
|
"--tertiary": { control: "color" },
|
|
@@ -3775,7 +3845,7 @@ const ac = {
|
|
|
3775
3845
|
"--text-secondary": { control: "color" },
|
|
3776
3846
|
"--text-on-color": { control: "color" },
|
|
3777
3847
|
"--border-radius": { control: "text" }
|
|
3778
|
-
},
|
|
3848
|
+
}, oi = {
|
|
3779
3849
|
"--secondary": "#77878b",
|
|
3780
3850
|
"--tertiary": "#c7c7c7",
|
|
3781
3851
|
"--disabled": "#000000",
|
|
@@ -3784,20 +3854,20 @@ const ac = {
|
|
|
3784
3854
|
"--text-on-color": "#ededed",
|
|
3785
3855
|
"--background": "#181818",
|
|
3786
3856
|
"--background-inverse": "#37373d"
|
|
3787
|
-
},
|
|
3788
|
-
...
|
|
3857
|
+
}, js = {
|
|
3858
|
+
...oi,
|
|
3789
3859
|
"--primary": "#ffd45a",
|
|
3790
3860
|
"--text-on-color": "#4f4f4f"
|
|
3791
|
-
},
|
|
3861
|
+
}, tr = {
|
|
3792
3862
|
undefined: {},
|
|
3793
3863
|
light: {},
|
|
3794
|
-
dark:
|
|
3795
|
-
spectric:
|
|
3864
|
+
dark: oi,
|
|
3865
|
+
spectric: js,
|
|
3796
3866
|
spectricFlat: {
|
|
3797
|
-
...
|
|
3867
|
+
...js,
|
|
3798
3868
|
"--border-radius": "1px"
|
|
3799
3869
|
}
|
|
3800
|
-
},
|
|
3870
|
+
}, Nc = Object.fromEntries(Object.keys(tr).map((s) => [s, s])), nc = `
|
|
3801
3871
|
--spectric-background: var(--background,#ffffff);
|
|
3802
3872
|
--spectric-background-hover:var(--background-hover,rgba(141, 141, 141, 0.12));
|
|
3803
3873
|
--spectric-background-inverse: var(--background-inverse,#f4f4f4);
|
|
@@ -3841,7 +3911,7 @@ const ac = {
|
|
|
3841
3911
|
--spectric-button-disabled: #c6c6c6;
|
|
3842
3912
|
color: var(--spectric-text-primary);
|
|
3843
3913
|
`;
|
|
3844
|
-
let
|
|
3914
|
+
let _t = class extends O {
|
|
3845
3915
|
constructor() {
|
|
3846
3916
|
super(...arguments), this.theme = "undefined";
|
|
3847
3917
|
}
|
|
@@ -3855,15 +3925,15 @@ let vt = class extends L {
|
|
|
3855
3925
|
}
|
|
3856
3926
|
}
|
|
3857
3927
|
render() {
|
|
3858
|
-
let s = Object.keys(
|
|
3859
|
-
|
|
3928
|
+
let s = Object.keys(tr).includes(this.theme) ? this.theme : "undefined", r = Object.entries(
|
|
3929
|
+
tr[s]
|
|
3860
3930
|
).map((o) => `${o[0]}:${o[1]};`).join(`
|
|
3861
3931
|
`);
|
|
3862
|
-
return
|
|
3863
|
-
${this.theme && this.theme !== "light" ?
|
|
3932
|
+
return w`
|
|
3933
|
+
${this.theme && this.theme !== "light" ? w`
|
|
3864
3934
|
<style>:host{
|
|
3865
3935
|
${r};
|
|
3866
|
-
${
|
|
3936
|
+
${nc}
|
|
3867
3937
|
}
|
|
3868
3938
|
/* Webkit psudo elements don't pick up variables defined by the host */
|
|
3869
3939
|
::-webkit-scrollbar-thumb {
|
|
@@ -3937,16 +4007,16 @@ let vt = class extends L {
|
|
|
3937
4007
|
`;
|
|
3938
4008
|
}
|
|
3939
4009
|
};
|
|
3940
|
-
|
|
4010
|
+
_t.styles = Z`:host{
|
|
3941
4011
|
display:contents;
|
|
3942
4012
|
}`;
|
|
3943
|
-
|
|
4013
|
+
ii([
|
|
3944
4014
|
v({ reflect: !0 })
|
|
3945
|
-
],
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
],
|
|
3949
|
-
const
|
|
4015
|
+
], _t.prototype, "theme", 2);
|
|
4016
|
+
_t = ii([
|
|
4017
|
+
N("spectric-theme")
|
|
4018
|
+
], _t);
|
|
4019
|
+
const ac = Z`
|
|
3950
4020
|
:host {
|
|
3951
4021
|
display: block;
|
|
3952
4022
|
height: 100%;
|
|
@@ -4010,18 +4080,18 @@ const Ga = K`
|
|
|
4010
4080
|
cursor: ew-resize;
|
|
4011
4081
|
}
|
|
4012
4082
|
`;
|
|
4013
|
-
var
|
|
4014
|
-
for (var c = i > 1 ? void 0 : i ?
|
|
4015
|
-
(
|
|
4016
|
-
return i && c &&
|
|
4017
|
-
},
|
|
4018
|
-
const
|
|
4019
|
-
let
|
|
4083
|
+
var cc = Object.defineProperty, lc = Object.getOwnPropertyDescriptor, U = (s, r, o, i) => {
|
|
4084
|
+
for (var c = i > 1 ? void 0 : i ? lc(r, o) : r, t = s.length - 1, u; t >= 0; t--)
|
|
4085
|
+
(u = s[t]) && (c = (i ? u(r, o, c) : u(c)) || c);
|
|
4086
|
+
return i && c && cc(r, o, c), c;
|
|
4087
|
+
}, pc = /* @__PURE__ */ ((s) => (s.horizontal = "horizontal", s.vertical = "vertical", s))(pc || {});
|
|
4088
|
+
const uc = "spectric-splitview";
|
|
4089
|
+
let j = class extends Xs {
|
|
4020
4090
|
constructor() {
|
|
4021
4091
|
super(), this.orientation = "horizontal", this.percentage = 50, this.invisible = !1, this.min = 10, this.max = 90, this.useSavedState = !0, this.isDragging = !1, this._error = !1, this._emitChange = () => {
|
|
4022
|
-
let { percentage: r, orientation: o, invisible: i, min: c, max: t, useSavedState:
|
|
4023
|
-
|
|
4024
|
-
}, this._onMouseMove =
|
|
4092
|
+
let { percentage: r, orientation: o, invisible: i, min: c, max: t, useSavedState: u } = this, g = this.getAttribute("id");
|
|
4093
|
+
g && this.useSavedState && localStorage.setItem(`splitview-${g}`, String(r)), this.dispatchEvent(new CustomEvent("change", { detail: { orientation: o, percentage: r, invisible: i, min: c, max: t, useSavedState: u } }));
|
|
4094
|
+
}, this._onMouseMove = Gs((r) => {
|
|
4025
4095
|
if (this.isDragging) {
|
|
4026
4096
|
const o = this.getBoundingClientRect();
|
|
4027
4097
|
let i, c;
|
|
@@ -4062,7 +4132,7 @@ let D = class extends Fs {
|
|
|
4062
4132
|
s.has("percentage") && (this.percentage = Math.min(Math.max(Number(this.percentage), this.min), this.max));
|
|
4063
4133
|
}
|
|
4064
4134
|
render() {
|
|
4065
|
-
return
|
|
4135
|
+
return w`
|
|
4066
4136
|
<div class="split-view ${this.orientation} ${this._error ? "error" : ""} ${this.isDragging ? "active" : ""}" style="--split-percentage: ${this.percentage}%;">
|
|
4067
4137
|
<span class="error-display">${this._error}</span>
|
|
4068
4138
|
<div class="panel" style="${this.orientation === "horizontal" ? "flex: var(--split-percentage, 50%)" : "max-height: var(--split-percentage, 50%)"}">
|
|
@@ -4077,63 +4147,303 @@ let D = class extends Fs {
|
|
|
4077
4147
|
`;
|
|
4078
4148
|
}
|
|
4079
4149
|
};
|
|
4080
|
-
|
|
4150
|
+
j.styles = ac;
|
|
4081
4151
|
U([
|
|
4082
4152
|
v({ type: String })
|
|
4083
|
-
],
|
|
4153
|
+
], j.prototype, "orientation", 2);
|
|
4084
4154
|
U([
|
|
4085
4155
|
v({ type: Number, reflect: !0 })
|
|
4086
|
-
],
|
|
4156
|
+
], j.prototype, "percentage", 2);
|
|
4087
4157
|
U([
|
|
4088
4158
|
v({ type: Boolean })
|
|
4089
|
-
],
|
|
4159
|
+
], j.prototype, "invisible", 2);
|
|
4090
4160
|
U([
|
|
4091
4161
|
v({ type: Number, reflect: !0 })
|
|
4092
|
-
],
|
|
4162
|
+
], j.prototype, "min", 2);
|
|
4093
4163
|
U([
|
|
4094
4164
|
v({ type: Number, reflect: !0 })
|
|
4095
|
-
],
|
|
4165
|
+
], j.prototype, "max", 2);
|
|
4096
4166
|
U([
|
|
4097
4167
|
v({ type: Boolean, reflect: !0 })
|
|
4098
|
-
],
|
|
4168
|
+
], j.prototype, "useSavedState", 2);
|
|
4099
4169
|
U([
|
|
4100
|
-
|
|
4101
|
-
],
|
|
4170
|
+
St()
|
|
4171
|
+
], j.prototype, "isDragging", 2);
|
|
4102
4172
|
U([
|
|
4103
|
-
|
|
4104
|
-
],
|
|
4173
|
+
St()
|
|
4174
|
+
], j.prototype, "_error", 2);
|
|
4105
4175
|
U([
|
|
4106
|
-
|
|
4107
|
-
],
|
|
4176
|
+
kt(".splitter")
|
|
4177
|
+
], j.prototype, "_splitter", 2);
|
|
4108
4178
|
U([
|
|
4109
|
-
|
|
4110
|
-
],
|
|
4179
|
+
Ze("slot[name='panel1']")
|
|
4180
|
+
], j.prototype, "_panel1", 2);
|
|
4111
4181
|
U([
|
|
4112
|
-
|
|
4113
|
-
],
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
],
|
|
4182
|
+
Ze("slot[name='panel2']")
|
|
4183
|
+
], j.prototype, "_panel2", 2);
|
|
4184
|
+
j = U([
|
|
4185
|
+
N(uc)
|
|
4186
|
+
], j);
|
|
4187
|
+
var dc = Object.defineProperty, fc = Object.getOwnPropertyDescriptor, Le = (s, r, o, i) => {
|
|
4188
|
+
for (var c = i > 1 ? void 0 : i ? fc(r, o) : r, t = s.length - 1, u; t >= 0; t--)
|
|
4189
|
+
(u = s[t]) && (c = (i ? u(r, o, c) : u(c)) || c);
|
|
4190
|
+
return i && c && dc(r, o, c), c;
|
|
4191
|
+
};
|
|
4192
|
+
const hc = "spectric-pagination";
|
|
4193
|
+
console.log("Pagination");
|
|
4194
|
+
let ve = class extends O {
|
|
4195
|
+
constructor() {
|
|
4196
|
+
super(...arguments), this.page = 1, this.pageSize = 10, this.pageSizeOptions = [10, 20, 50, 100, 1e3], this.size = "small", this._handlePageUp = () => {
|
|
4197
|
+
this.page += 1, this._emitChange();
|
|
4198
|
+
}, this._handlePageDown = () => {
|
|
4199
|
+
this.page -= 1, this._emitChange();
|
|
4200
|
+
}, this._handleSizeChange = (s) => {
|
|
4201
|
+
let r = parseInt(s.target.value);
|
|
4202
|
+
this.pageSize = r, this._emitChange();
|
|
4203
|
+
}, this._emitChange = () => {
|
|
4204
|
+
let { page: s, pageSize: r } = this;
|
|
4205
|
+
this.dispatchEvent(new CustomEvent("change", { detail: { page: s, pageSize: r } }));
|
|
4206
|
+
};
|
|
4207
|
+
}
|
|
4208
|
+
createRenderRoot() {
|
|
4209
|
+
return this;
|
|
4210
|
+
}
|
|
4211
|
+
updated(s) {
|
|
4212
|
+
s.has("pageSize") && !this.pageSizeOptions.includes(this.pageSize) && (this.pageSizeOptions = [...this.pageSizeOptions, this.pageSize].sort((r, o) => r - o));
|
|
4213
|
+
}
|
|
4214
|
+
render() {
|
|
4215
|
+
let s = this.page * this.pageSize, r = !0;
|
|
4216
|
+
this.totalItems && s < this.totalItems && (r = !1);
|
|
4217
|
+
let o = "";
|
|
4218
|
+
return this.totalItems && (o = `${this.page} of ${Math.ceil(this.totalItems / this.pageSize)}`), w`
|
|
4219
|
+
<div class="spectric-pagination-container">
|
|
4220
|
+
<div>
|
|
4221
|
+
<!-- TODO/FIXME Make a select component and use it for cross browser styling-->
|
|
4222
|
+
<select @change=${this._handleSizeChange} .value=${String(this.pageSize)}>
|
|
4223
|
+
${this.pageSizeOptions.map((i) => w`<option .value=${String(i)} class=${String(i) === String(this.pageSize) ? "selected" : ""}>${i}</option>`)}
|
|
4224
|
+
</select>
|
|
4225
|
+
</div>
|
|
4226
|
+
${this.totalItems ? w`
|
|
4227
|
+
<div class="spectric-pagination-text">${`Items ${(this.page - 1) * this.pageSize}-${Math.min(this.page * this.pageSize, this.totalItems)} of ${this.totalItems}`}</div>
|
|
4228
|
+
<div class="spectric-pagination-container">
|
|
4229
|
+
<div>
|
|
4230
|
+
${o}
|
|
4231
|
+
</div>
|
|
4232
|
+
<div>
|
|
4233
|
+
<spectric-button size=${this.size} ?disabled=${this.page === 1} @click=${this._handlePageDown}><</spectric-button>
|
|
4234
|
+
<spectric-button size=${this.size} ?disabled=${r} @click=${this._handlePageUp}>></spectric-button>
|
|
4235
|
+
</div>
|
|
4236
|
+
</div>
|
|
4237
|
+
` : null}
|
|
4238
|
+
</div>
|
|
4239
|
+
`;
|
|
4240
|
+
}
|
|
4241
|
+
};
|
|
4242
|
+
Le([
|
|
4243
|
+
v({ type: Number, reflect: !0 })
|
|
4244
|
+
], ve.prototype, "page", 2);
|
|
4245
|
+
Le([
|
|
4246
|
+
v({ type: Number, reflect: !0 })
|
|
4247
|
+
], ve.prototype, "pageSize", 2);
|
|
4248
|
+
Le([
|
|
4249
|
+
v({ type: Number, reflect: !0 })
|
|
4250
|
+
], ve.prototype, "totalItems", 2);
|
|
4251
|
+
Le([
|
|
4252
|
+
v({ type: Array })
|
|
4253
|
+
], ve.prototype, "pageSizeOptions", 2);
|
|
4254
|
+
Le([
|
|
4255
|
+
v({ type: String, reflect: !0 })
|
|
4256
|
+
], ve.prototype, "size", 2);
|
|
4257
|
+
ve = Le([
|
|
4258
|
+
N(hc)
|
|
4259
|
+
], ve);
|
|
4260
|
+
var gc = Object.defineProperty, bc = Object.getOwnPropertyDescriptor, ni = (s, r, o, i) => {
|
|
4261
|
+
for (var c = i > 1 ? void 0 : i ? bc(r, o) : r, t = s.length - 1, u; t >= 0; t--)
|
|
4262
|
+
(u = s[t]) && (c = (i ? u(r, o, c) : u(c)) || c);
|
|
4263
|
+
return i && c && gc(r, o, c), c;
|
|
4264
|
+
};
|
|
4265
|
+
const vc = "spectric-table-header";
|
|
4266
|
+
let rr = class extends O {
|
|
4267
|
+
constructor() {
|
|
4268
|
+
super(...arguments), this.columns = [];
|
|
4269
|
+
}
|
|
4270
|
+
createRenderRoot() {
|
|
4271
|
+
return this;
|
|
4272
|
+
}
|
|
4273
|
+
render() {
|
|
4274
|
+
return w`
|
|
4275
|
+
<tr>
|
|
4276
|
+
${this.columns.map((s) => {
|
|
4277
|
+
let r = ["header-contents"];
|
|
4278
|
+
return s.filterable, w`<td><div class=${r.join(" ")}>${s.title || s.key}</div></td>`;
|
|
4279
|
+
})}
|
|
4280
|
+
</tr>
|
|
4281
|
+
`;
|
|
4282
|
+
}
|
|
4283
|
+
};
|
|
4284
|
+
ni([
|
|
4285
|
+
v({ type: Array, attribute: !1 })
|
|
4286
|
+
], rr.prototype, "columns", 2);
|
|
4287
|
+
rr = ni([
|
|
4288
|
+
N(vc)
|
|
4289
|
+
], rr);
|
|
4290
|
+
var yc = Object.defineProperty, mc = Object.getOwnPropertyDescriptor, fr = (s, r, o, i) => {
|
|
4291
|
+
for (var c = i > 1 ? void 0 : i ? mc(r, o) : r, t = s.length - 1, u; t >= 0; t--)
|
|
4292
|
+
(u = s[t]) && (c = (i ? u(r, o, c) : u(c)) || c);
|
|
4293
|
+
return i && c && yc(r, o, c), c;
|
|
4294
|
+
};
|
|
4295
|
+
const $c = "spectric-table-cell";
|
|
4296
|
+
let wt = class extends O {
|
|
4297
|
+
constructor() {
|
|
4298
|
+
super(...arguments), this._handleFilterOut = () => {
|
|
4299
|
+
let s;
|
|
4300
|
+
this.column.key && typeof this.row == "object" && (s = this.row[this.column.key]), this.dispatchEvent(new CustomEvent("filter", {
|
|
4301
|
+
composed: !0,
|
|
4302
|
+
bubbles: !0,
|
|
4303
|
+
detail: {
|
|
4304
|
+
include: !1,
|
|
4305
|
+
row: this.row,
|
|
4306
|
+
value: s,
|
|
4307
|
+
column: this.column
|
|
4308
|
+
}
|
|
4309
|
+
}));
|
|
4310
|
+
}, this._handleFilterFor = () => {
|
|
4311
|
+
let s;
|
|
4312
|
+
this.column.key && typeof this.row == "object" && (s = this.row[this.column.key]), this.dispatchEvent(new CustomEvent("filter", {
|
|
4313
|
+
composed: !0,
|
|
4314
|
+
bubbles: !0,
|
|
4315
|
+
detail: {
|
|
4316
|
+
include: !0,
|
|
4317
|
+
row: this.row,
|
|
4318
|
+
value: s,
|
|
4319
|
+
column: this.column
|
|
4320
|
+
}
|
|
4321
|
+
}));
|
|
4322
|
+
};
|
|
4323
|
+
}
|
|
4324
|
+
createRenderRoot() {
|
|
4325
|
+
return this;
|
|
4326
|
+
}
|
|
4327
|
+
render() {
|
|
4328
|
+
let s;
|
|
4329
|
+
this.column.render ? s = this.column.render(this.row, this.table) : this.column.key && typeof this.row == "object" ? s = this.row[this.column.key] : s = w`error`;
|
|
4330
|
+
let r = ["cell-contents"];
|
|
4331
|
+
this.column.filterable && r.push("filterable");
|
|
4332
|
+
let o = w`<div class="table-cell-actions"><spectric-button @click=${this._handleFilterOut} size="tiny" variant="text" icon>-</spectric-button><spectric-button @click=${this._handleFilterFor} size="tiny" variant="text" icon>+</spectric-button></div>`;
|
|
4333
|
+
return w`
|
|
4334
|
+
<td>
|
|
4335
|
+
${this.column.filterable ? o : null}
|
|
4336
|
+
<div class=${r.join(" ")}>${s}</div>
|
|
4337
|
+
</td>
|
|
4338
|
+
`;
|
|
4339
|
+
}
|
|
4340
|
+
};
|
|
4341
|
+
fr([
|
|
4342
|
+
v({ type: Object, attribute: !1 })
|
|
4343
|
+
], wt.prototype, "row", 2);
|
|
4344
|
+
fr([
|
|
4345
|
+
v({ type: Object, attribute: !1 })
|
|
4346
|
+
], wt.prototype, "column", 2);
|
|
4347
|
+
wt = fr([
|
|
4348
|
+
N($c)
|
|
4349
|
+
], wt);
|
|
4350
|
+
var _c = Object.defineProperty, wc = Object.getOwnPropertyDescriptor, hr = (s, r, o, i) => {
|
|
4351
|
+
for (var c = i > 1 ? void 0 : i ? wc(r, o) : r, t = s.length - 1, u; t >= 0; t--)
|
|
4352
|
+
(u = s[t]) && (c = (i ? u(r, o, c) : u(c)) || c);
|
|
4353
|
+
return i && c && _c(r, o, c), c;
|
|
4354
|
+
};
|
|
4355
|
+
const xc = "spectric-table-body";
|
|
4356
|
+
let xt = class extends O {
|
|
4357
|
+
constructor() {
|
|
4358
|
+
super(...arguments), this.data = [], this.columns = [];
|
|
4359
|
+
}
|
|
4360
|
+
createRenderRoot() {
|
|
4361
|
+
return this;
|
|
4362
|
+
}
|
|
4363
|
+
render() {
|
|
4364
|
+
return w`
|
|
4365
|
+
<body>
|
|
4366
|
+
${this.data.map((s) => w`<tr>${this.columns.map((r) => w`<spectric-table-cell .column=${r} .row=${s}></spectric-table-cell>`)}</tr>`)}
|
|
4367
|
+
</body>
|
|
4368
|
+
`;
|
|
4369
|
+
}
|
|
4370
|
+
};
|
|
4371
|
+
hr([
|
|
4372
|
+
v({ type: Array, attribute: !1 })
|
|
4373
|
+
], xt.prototype, "data", 2);
|
|
4374
|
+
hr([
|
|
4375
|
+
v({ type: Array, attribute: !1 })
|
|
4376
|
+
], xt.prototype, "columns", 2);
|
|
4377
|
+
xt = hr([
|
|
4378
|
+
N(xc)
|
|
4379
|
+
], xt);
|
|
4380
|
+
var Ac = Object.defineProperty, Sc = Object.getOwnPropertyDescriptor, Ot = (s, r, o, i) => {
|
|
4381
|
+
for (var c = i > 1 ? void 0 : i ? Sc(r, o) : r, t = s.length - 1, u; t >= 0; t--)
|
|
4382
|
+
(u = s[t]) && (c = (i ? u(r, o, c) : u(c)) || c);
|
|
4383
|
+
return i && c && Ac(r, o, c), c;
|
|
4384
|
+
};
|
|
4385
|
+
const kc = "spectric-table";
|
|
4386
|
+
let Ye = class extends O {
|
|
4387
|
+
constructor() {
|
|
4388
|
+
super(...arguments), this.data = [], this.columns = [], this._handlePaginationChange = (s) => {
|
|
4389
|
+
s.preventDefault(), s.stopPropagation(), this.pagination && (this.pagination.size, this.pagination = { ...this.pagination, ...s.detail }), this._emitChange();
|
|
4390
|
+
}, this._emitChange = () => {
|
|
4391
|
+
let { pagination: s } = this;
|
|
4392
|
+
this.dispatchEvent(new CustomEvent("change", { detail: { pagination: s } }));
|
|
4393
|
+
}, this.__DO_NOT_USE_filter = () => {
|
|
4394
|
+
this.dispatchEvent(new CustomEvent("filter"));
|
|
4395
|
+
};
|
|
4396
|
+
}
|
|
4397
|
+
createRenderRoot() {
|
|
4398
|
+
return this;
|
|
4399
|
+
}
|
|
4400
|
+
render() {
|
|
4401
|
+
let s = this.columns.filter((r) => !r.hidden);
|
|
4402
|
+
return w`
|
|
4403
|
+
<div role="table">
|
|
4404
|
+
<spectric-table-header .columns=${s}></spectric-table-header>
|
|
4405
|
+
<spectric-table-body .columns=${s} .data=${this.data} .table=${this}></spectric-table-body>
|
|
4406
|
+
</div>
|
|
4407
|
+
${this.pagination ? w`<spectric-pagination ${gt(this.pagination)} @change=${this._handlePaginationChange}></spectric-pagination>` : null}
|
|
4408
|
+
`;
|
|
4409
|
+
}
|
|
4410
|
+
};
|
|
4411
|
+
Ot([
|
|
4412
|
+
v({ type: Array, attribute: !1 })
|
|
4413
|
+
], Ye.prototype, "data", 2);
|
|
4414
|
+
Ot([
|
|
4415
|
+
v({ type: Object, attribute: !1 })
|
|
4416
|
+
], Ye.prototype, "pagination", 2);
|
|
4417
|
+
Ot([
|
|
4418
|
+
v({ attribute: !1 })
|
|
4419
|
+
], Ye.prototype, "columns", 2);
|
|
4420
|
+
Ye = Ot([
|
|
4421
|
+
N(kc)
|
|
4422
|
+
], Ye);
|
|
4117
4423
|
export {
|
|
4118
4424
|
V as BitDisplayCanvas,
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4425
|
+
fn as ButtonSizes,
|
|
4426
|
+
hn as ButtonVariants,
|
|
4427
|
+
Lc as CSSPropsControls,
|
|
4428
|
+
I as DialogElement,
|
|
4429
|
+
ri as DialogElementTag,
|
|
4430
|
+
uc as ElementTag,
|
|
4431
|
+
Oe as Header,
|
|
4432
|
+
Rn as InputVariants,
|
|
4433
|
+
pc as Orientations,
|
|
4434
|
+
ve as PaginationElement,
|
|
4435
|
+
hc as PaginationElementTag,
|
|
4436
|
+
K as SpectricButton,
|
|
4129
4437
|
E as SpectricInput,
|
|
4130
4438
|
B as SpectricPage,
|
|
4131
|
-
|
|
4439
|
+
We as SpectricPanel,
|
|
4132
4440
|
Q as SpectricQuery,
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4441
|
+
_t as SpectricThemeProvider,
|
|
4442
|
+
j as SplitView,
|
|
4443
|
+
Ga as SupportedLanguages,
|
|
4444
|
+
Ye as TableElement,
|
|
4445
|
+
kc as TableElementTag,
|
|
4446
|
+
Nc as ThemeSelections,
|
|
4137
4447
|
ne as nodeTypes
|
|
4138
4448
|
};
|
|
4139
4449
|
//# sourceMappingURL=index.es.js.map
|