@spectric/ui 0.0.9 → 0.0.11
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 +2 -2
- package/dist/components/pagination/pagination.d.ts +5 -5
- package/dist/components/query_bar/QueryBar.d.ts +4 -4
- package/dist/components/table/cell.d.ts +1 -0
- package/dist/components/table/header.d.ts +2 -1
- package/dist/components/table/sorting.d.ts +5 -0
- package/dist/components/table/table.d.ts +43 -36
- package/dist/components/tooltip/tooltip.d.ts +2 -2
- package/dist/custom-elements.json +28 -8
- package/dist/index.es.js +1587 -1518
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +87 -85
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/utils/once.d.ts +1 -0
- package/dist/utils/spread.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/Button.ts +2 -2
- package/src/components/input.ts +0 -1
- package/src/components/pagination/pagination.ts +7 -7
- package/src/components/query_bar/QueryBar.ts +31 -26
- package/src/components/table/cell.ts +13 -3
- package/src/components/table/header.ts +22 -3
- package/src/components/table/sorting.ts +34 -0
- package/src/components/table/table.css +52 -0
- package/src/components/table/table.ts +111 -50
- package/src/components/tooltip/tooltip.ts +2 -2
- package/src/stories/fixtures/ExampleContent.ts +15 -8
- package/src/stories/fixtures/data.ts +24 -11
- package/src/stories/table.stories.ts +27 -13
- package/src/utils/once.ts +12 -0
- package/src/utils/spread.ts +3 -3
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 yt = globalThis, cr = yt.ShadowRoot && (yt.ShadyCSS === void 0 || yt.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, lr = Symbol(), Ci = /* @__PURE__ */ new WeakMap();
|
|
7
|
+
let Ii = class {
|
|
8
8
|
constructor(r, o, s) {
|
|
9
|
-
if (this._$cssResult$ = !0, s !==
|
|
9
|
+
if (this._$cssResult$ = !0, s !== lr) 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 (cr && r === void 0) {
|
|
16
16
|
const s = o !== void 0 && o.length === 1;
|
|
17
|
-
s && (r =
|
|
17
|
+
s && (r = Ci.get(o)), r === void 0 && ((this.o = r = new CSSStyleSheet()).replaceSync(this.cssText), s && Ci.set(o, r));
|
|
18
18
|
}
|
|
19
19
|
return r;
|
|
20
20
|
}
|
|
@@ -22,33 +22,33 @@ let Ui = class {
|
|
|
22
22
|
return this.cssText;
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const
|
|
26
|
-
const o = i.length === 1 ? i[0] : r.reduce((s,
|
|
27
|
-
if (
|
|
28
|
-
if (typeof
|
|
29
|
-
throw Error("Value passed to 'css' function must be a 'css' function result: " +
|
|
30
|
-
})(
|
|
31
|
-
return new
|
|
32
|
-
},
|
|
33
|
-
if (
|
|
25
|
+
const Wo = (i) => new Ii(typeof i == "string" ? i : i + "", void 0, lr), W = (i, ...r) => {
|
|
26
|
+
const o = i.length === 1 ? i[0] : r.reduce((s, a, t) => s + ((p) => {
|
|
27
|
+
if (p._$cssResult$ === !0) return p.cssText;
|
|
28
|
+
if (typeof p == "number") return p;
|
|
29
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + p + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
30
|
+
})(a) + i[t + 1], i[0]);
|
|
31
|
+
return new Ii(o, i, lr);
|
|
32
|
+
}, Yo = (i, r) => {
|
|
33
|
+
if (cr) i.adoptedStyleSheets = r.map((o) => o instanceof CSSStyleSheet ? o : o.styleSheet);
|
|
34
34
|
else for (const o of r) {
|
|
35
|
-
const s = document.createElement("style"),
|
|
36
|
-
|
|
35
|
+
const s = document.createElement("style"), a = yt.litNonce;
|
|
36
|
+
a !== void 0 && s.setAttribute("nonce", a), s.textContent = o.cssText, i.appendChild(s);
|
|
37
37
|
}
|
|
38
|
-
},
|
|
38
|
+
}, Ei = cr ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((r) => {
|
|
39
39
|
let o = "";
|
|
40
40
|
for (const s of r.cssRules) o += s.cssText;
|
|
41
|
-
return
|
|
41
|
+
return Wo(o);
|
|
42
42
|
})(i) : i;
|
|
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: Ko, defineProperty: Zo, getOwnPropertyDescriptor: Vo, getOwnPropertyNames: Xo, getOwnPropertySymbols: Go, getPrototypeOf: Jo } = Object, ce = globalThis, Oi = ce.trustedTypes, en = Oi ? Oi.emptyScript : "", Gt = ce.reactiveElementPolyfillSupport, Ye = (i, r) => i, xt = { toAttribute(i, r) {
|
|
49
49
|
switch (r) {
|
|
50
50
|
case Boolean:
|
|
51
|
-
i = i ?
|
|
51
|
+
i = i ? en : null;
|
|
52
52
|
break;
|
|
53
53
|
case Object:
|
|
54
54
|
case Array:
|
|
@@ -73,57 +73,57 @@ const { is: Wo, defineProperty: Yo, getOwnPropertyDescriptor: Ko, getOwnProperty
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return o;
|
|
76
|
-
} },
|
|
77
|
-
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")),
|
|
78
|
-
class
|
|
76
|
+
} }, pr = (i, r) => !Ko(i, r), Pi = { attribute: !0, type: String, converter: xt, reflect: !1, hasChanged: pr };
|
|
77
|
+
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), ce.litPropertyMetadata ?? (ce.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
78
|
+
class Te extends HTMLElement {
|
|
79
79
|
static addInitializer(r) {
|
|
80
80
|
this._$Ei(), (this.l ?? (this.l = [])).push(r);
|
|
81
81
|
}
|
|
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 = Pi) {
|
|
86
86
|
if (o.state && (o.attribute = !1), this._$Ei(), this.elementProperties.set(r, o), !o.noAccessor) {
|
|
87
|
-
const s = Symbol(),
|
|
88
|
-
|
|
87
|
+
const s = Symbol(), a = this.getPropertyDescriptor(r, s, o);
|
|
88
|
+
a !== void 0 && Zo(this.prototype, r, a);
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
91
|
static getPropertyDescriptor(r, o, s) {
|
|
92
|
-
const { get:
|
|
92
|
+
const { get: a, set: t } = Vo(this.prototype, r) ?? { get() {
|
|
93
93
|
return this[o];
|
|
94
|
-
}, set(
|
|
95
|
-
this[o] =
|
|
94
|
+
}, set(p) {
|
|
95
|
+
this[o] = p;
|
|
96
96
|
} };
|
|
97
97
|
return { get() {
|
|
98
|
-
return
|
|
99
|
-
}, set(
|
|
100
|
-
const
|
|
101
|
-
t.call(this,
|
|
98
|
+
return a == null ? void 0 : a.call(this);
|
|
99
|
+
}, set(p) {
|
|
100
|
+
const g = a == null ? void 0 : a.call(this);
|
|
101
|
+
t.call(this, p), this.requestUpdate(r, g, s);
|
|
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) ?? Pi;
|
|
106
106
|
}
|
|
107
107
|
static _$Ei() {
|
|
108
|
-
if (this.hasOwnProperty(
|
|
109
|
-
const r =
|
|
108
|
+
if (this.hasOwnProperty(Ye("elementProperties"))) return;
|
|
109
|
+
const r = Jo(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, s = [...
|
|
116
|
-
for (const
|
|
113
|
+
if (this.hasOwnProperty(Ye("finalized"))) return;
|
|
114
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(Ye("properties"))) {
|
|
115
|
+
const o = this.properties, s = [...Xo(o), ...Go(o)];
|
|
116
|
+
for (const a of s) this.createProperty(a, o[a]);
|
|
117
117
|
}
|
|
118
118
|
const r = this[Symbol.metadata];
|
|
119
119
|
if (r !== null) {
|
|
120
120
|
const o = litPropertyMetadata.get(r);
|
|
121
|
-
if (o !== void 0) for (const [s,
|
|
121
|
+
if (o !== void 0) for (const [s, a] of o) this.elementProperties.set(s, a);
|
|
122
122
|
}
|
|
123
123
|
this._$Eh = /* @__PURE__ */ new Map();
|
|
124
124
|
for (const [o, s] of this.elementProperties) {
|
|
125
|
-
const
|
|
126
|
-
|
|
125
|
+
const a = this._$Eu(o, s);
|
|
126
|
+
a !== void 0 && this._$Eh.set(a, o);
|
|
127
127
|
}
|
|
128
128
|
this.elementStyles = this.finalizeStyles(this.styles);
|
|
129
129
|
}
|
|
@@ -131,8 +131,8 @@ class Oe extends HTMLElement {
|
|
|
131
131
|
const o = [];
|
|
132
132
|
if (Array.isArray(r)) {
|
|
133
133
|
const s = new Set(r.flat(1 / 0).reverse());
|
|
134
|
-
for (const
|
|
135
|
-
} else r !== void 0 && o.push(
|
|
134
|
+
for (const a of s) o.unshift(Ei(a));
|
|
135
|
+
} else r !== void 0 && o.push(Ei(r));
|
|
136
136
|
return o;
|
|
137
137
|
}
|
|
138
138
|
static _$Eu(r, o) {
|
|
@@ -161,7 +161,7 @@ class Oe extends HTMLElement {
|
|
|
161
161
|
}
|
|
162
162
|
createRenderRoot() {
|
|
163
163
|
const r = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
164
|
-
return
|
|
164
|
+
return Yo(r, this.constructor.elementStyles), r;
|
|
165
165
|
}
|
|
166
166
|
connectedCallback() {
|
|
167
167
|
var r;
|
|
@@ -184,23 +184,23 @@ class Oe extends HTMLElement {
|
|
|
184
184
|
}
|
|
185
185
|
_$EC(r, o) {
|
|
186
186
|
var t;
|
|
187
|
-
const s = this.constructor.elementProperties.get(r),
|
|
188
|
-
if (
|
|
189
|
-
const
|
|
190
|
-
this._$Em = r,
|
|
187
|
+
const s = this.constructor.elementProperties.get(r), a = this.constructor._$Eu(r, s);
|
|
188
|
+
if (a !== void 0 && s.reflect === !0) {
|
|
189
|
+
const p = (((t = s.converter) == null ? void 0 : t.toAttribute) !== void 0 ? s.converter : xt).toAttribute(o, s.type);
|
|
190
|
+
this._$Em = r, p == null ? this.removeAttribute(a) : this.setAttribute(a, p), this._$Em = null;
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
_$AK(r, o) {
|
|
194
194
|
var t;
|
|
195
|
-
const s = this.constructor,
|
|
196
|
-
if (
|
|
197
|
-
const
|
|
198
|
-
this._$Em =
|
|
195
|
+
const s = this.constructor, a = s._$Eh.get(r);
|
|
196
|
+
if (a !== void 0 && this._$Em !== a) {
|
|
197
|
+
const p = s.getPropertyOptions(a), g = typeof p.converter == "function" ? { fromAttribute: p.converter } : ((t = p.converter) == null ? void 0 : t.fromAttribute) !== void 0 ? p.converter : xt;
|
|
198
|
+
this._$Em = a, this[a] = g.fromAttribute(o, p.type), this._$Em = null;
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
201
|
requestUpdate(r, o, s) {
|
|
202
202
|
if (r !== void 0) {
|
|
203
|
-
if (s ?? (s = this.constructor.getPropertyOptions(r)), !(s.hasChanged ??
|
|
203
|
+
if (s ?? (s = this.constructor.getPropertyOptions(r)), !(s.hasChanged ?? pr)(this[r], o)) return;
|
|
204
204
|
this.P(r, o, s);
|
|
205
205
|
}
|
|
206
206
|
this.isUpdatePending === !1 && (this._$ES = this._$ET());
|
|
@@ -226,21 +226,21 @@ class Oe 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, p] of this._$Ep) this[t] = p;
|
|
230
230
|
this._$Ep = void 0;
|
|
231
231
|
}
|
|
232
|
-
const
|
|
233
|
-
if (
|
|
232
|
+
const a = this.constructor.elementProperties;
|
|
233
|
+
if (a.size > 0) for (const [t, p] of a) p.wrapped !== !0 || this._$AL.has(t) || this[t] === void 0 || this.P(t, this[t], p);
|
|
234
234
|
}
|
|
235
235
|
let r = !1;
|
|
236
236
|
const o = this._$AL;
|
|
237
237
|
try {
|
|
238
|
-
r = this.shouldUpdate(o), r ? (this.willUpdate(o), (s = this._$EO) == null || s.forEach((
|
|
238
|
+
r = this.shouldUpdate(o), r ? (this.willUpdate(o), (s = this._$EO) == null || s.forEach((a) => {
|
|
239
239
|
var t;
|
|
240
|
-
return (t =
|
|
240
|
+
return (t = a.hostUpdate) == null ? void 0 : t.call(a);
|
|
241
241
|
}), this.update(o)) : this._$EU();
|
|
242
|
-
} catch (
|
|
243
|
-
throw r = !1, this._$EU(),
|
|
242
|
+
} catch (a) {
|
|
243
|
+
throw r = !1, this._$EU(), a;
|
|
244
244
|
}
|
|
245
245
|
r && this._$AE(o);
|
|
246
246
|
}
|
|
@@ -249,8 +249,8 @@ class Oe extends HTMLElement {
|
|
|
249
249
|
_$AE(r) {
|
|
250
250
|
var o;
|
|
251
251
|
(o = this._$EO) == null || o.forEach((s) => {
|
|
252
|
-
var
|
|
253
|
-
return (
|
|
252
|
+
var a;
|
|
253
|
+
return (a = s.hostUpdated) == null ? void 0 : a.call(s);
|
|
254
254
|
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(r)), this.updated(r);
|
|
255
255
|
}
|
|
256
256
|
_$EU() {
|
|
@@ -273,76 +273,76 @@ class Oe extends HTMLElement {
|
|
|
273
273
|
firstUpdated(r) {
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
|
-
|
|
276
|
+
Te.elementStyles = [], Te.shadowRootOptions = { mode: "open" }, Te[Ye("elementProperties")] = /* @__PURE__ */ new Map(), Te[Ye("finalized")] = /* @__PURE__ */ new Map(), Gt == null || Gt({ ReactiveElement: Te }), (ce.reactiveElementVersions ?? (ce.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 Ke = globalThis, At = Ke.trustedTypes, Ti = At ? At.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, Qi = "$lit$", ae = `lit$${Math.random().toFixed(9).slice(2)}$`, Hi = "?" + ae, tn = `<${Hi}>`, ve = document, Ve = () => ve.createComment(""), Xe = (i) => i === null || typeof i != "object" && typeof i != "function", ur = Array.isArray, rn = (i) => ur(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", Jt = `[
|
|
283
|
+
\f\r]`, We = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Li = /-->/g, Ni = />/g, ge = RegExp(`>|${Jt}(?:([^\\s"'>=/]+)(${Jt}*=${Jt}*(?:[^
|
|
284
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Di = /'/g, ji = /"/g, qi = /^(?:script|style|textarea|title)$/i, sn = (i) => (r, ...o) => ({ _$litType$: i, strings: r, values: o }), _ = sn(1), me = Symbol.for("lit-noChange"), C = Symbol.for("lit-nothing"), zi = /* @__PURE__ */ new WeakMap(), be = ve.createTreeWalker(ve, 129);
|
|
285
|
+
function Wi(i, r) {
|
|
286
|
+
if (!ur(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
287
|
+
return Ti !== void 0 ? Ti.createHTML(r) : r;
|
|
288
|
+
}
|
|
289
|
+
const on = (i, r) => {
|
|
290
290
|
const o = i.length - 1, s = [];
|
|
291
|
-
let
|
|
292
|
-
for (let
|
|
293
|
-
const v = i[
|
|
291
|
+
let a, t = r === 2 ? "<svg>" : r === 3 ? "<math>" : "", p = We;
|
|
292
|
+
for (let g = 0; g < o; g++) {
|
|
293
|
+
const v = i[g];
|
|
294
294
|
let x, A, w = -1, S = 0;
|
|
295
|
-
for (; S < v.length && (
|
|
296
|
-
const k =
|
|
297
|
-
t +=
|
|
295
|
+
for (; S < v.length && (p.lastIndex = S, A = p.exec(v), A !== null); ) S = p.lastIndex, p === We ? A[1] === "!--" ? p = Li : A[1] !== void 0 ? p = Ni : A[2] !== void 0 ? (qi.test(A[2]) && (a = RegExp("</" + A[2], "g")), p = ge) : A[3] !== void 0 && (p = ge) : p === ge ? A[0] === ">" ? (p = a ?? We, w = -1) : A[1] === void 0 ? w = -2 : (w = p.lastIndex - A[2].length, x = A[1], p = A[3] === void 0 ? ge : A[3] === '"' ? ji : Di) : p === ji || p === Di ? p = ge : p === Li || p === Ni ? p = We : (p = ge, a = void 0);
|
|
296
|
+
const k = p === ge && i[g + 1].startsWith("/>") ? " " : "";
|
|
297
|
+
t += p === We ? v + tn : w >= 0 ? (s.push(x), v.slice(0, w) + Qi + v.slice(w) + ae + k) : v + ae + (w === -2 ? g : k);
|
|
298
298
|
}
|
|
299
|
-
return [
|
|
299
|
+
return [Wi(i, t + (i[o] || "<?>") + (r === 2 ? "</svg>" : r === 3 ? "</math>" : "")), s];
|
|
300
300
|
};
|
|
301
|
-
class
|
|
301
|
+
class Ge {
|
|
302
302
|
constructor({ strings: r, _$litType$: o }, s) {
|
|
303
|
-
let
|
|
303
|
+
let a;
|
|
304
304
|
this.parts = [];
|
|
305
|
-
let t = 0,
|
|
306
|
-
const
|
|
307
|
-
if (this.el =
|
|
305
|
+
let t = 0, p = 0;
|
|
306
|
+
const g = r.length - 1, v = this.parts, [x, A] = on(r, o);
|
|
307
|
+
if (this.el = Ge.createElement(x, s), be.currentNode = this.el.content, o === 2 || o === 3) {
|
|
308
308
|
const w = this.el.content.firstChild;
|
|
309
309
|
w.replaceWith(...w.childNodes);
|
|
310
310
|
}
|
|
311
|
-
for (; (
|
|
312
|
-
if (
|
|
313
|
-
if (
|
|
314
|
-
const S = A[
|
|
315
|
-
v.push({ type: 1, index: t, name: z[2], strings: k, ctor: z[1] === "." ?
|
|
316
|
-
} else w.startsWith(
|
|
317
|
-
if (
|
|
318
|
-
const w =
|
|
311
|
+
for (; (a = be.nextNode()) !== null && v.length < g; ) {
|
|
312
|
+
if (a.nodeType === 1) {
|
|
313
|
+
if (a.hasAttributes()) for (const w of a.getAttributeNames()) if (w.endsWith(Qi)) {
|
|
314
|
+
const S = A[p++], k = a.getAttribute(w).split(ae), z = /([.?@])?(.*)/.exec(S);
|
|
315
|
+
v.push({ type: 1, index: t, name: z[2], strings: k, ctor: z[1] === "." ? an : z[1] === "?" ? cn : z[1] === "@" ? ln : Pt }), a.removeAttribute(w);
|
|
316
|
+
} else w.startsWith(ae) && (v.push({ type: 6, index: t }), a.removeAttribute(w));
|
|
317
|
+
if (qi.test(a.tagName)) {
|
|
318
|
+
const w = a.textContent.split(ae), S = w.length - 1;
|
|
319
319
|
if (S > 0) {
|
|
320
|
-
|
|
321
|
-
for (let k = 0; k < S; k++)
|
|
322
|
-
|
|
320
|
+
a.textContent = At ? At.emptyScript : "";
|
|
321
|
+
for (let k = 0; k < S; k++) a.append(w[k], Ve()), be.nextNode(), v.push({ type: 2, index: ++t });
|
|
322
|
+
a.append(w[S], Ve());
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
|
-
} else if (
|
|
325
|
+
} else if (a.nodeType === 8) if (a.data === Hi) v.push({ type: 2, index: t });
|
|
326
326
|
else {
|
|
327
327
|
let w = -1;
|
|
328
|
-
for (; (w =
|
|
328
|
+
for (; (w = a.data.indexOf(ae, w + 1)) !== -1; ) v.push({ type: 7, index: t }), w += ae.length - 1;
|
|
329
329
|
}
|
|
330
330
|
t++;
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
static createElement(r, o) {
|
|
334
|
-
const s =
|
|
334
|
+
const s = ve.createElement("template");
|
|
335
335
|
return s.innerHTML = r, s;
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
|
-
function
|
|
339
|
-
var
|
|
340
|
-
if (r ===
|
|
341
|
-
let
|
|
342
|
-
const t =
|
|
343
|
-
return (
|
|
338
|
+
function De(i, r, o = i, s) {
|
|
339
|
+
var p, g;
|
|
340
|
+
if (r === me) return r;
|
|
341
|
+
let a = s !== void 0 ? (p = o._$Co) == null ? void 0 : p[s] : o._$Cl;
|
|
342
|
+
const t = Xe(r) ? void 0 : r._$litDirective$;
|
|
343
|
+
return (a == null ? void 0 : a.constructor) !== t && ((g = a == null ? void 0 : a._$AO) == null || g.call(a, !1), t === void 0 ? a = void 0 : (a = new t(i), a._$AT(i, o, s)), s !== void 0 ? (o._$Co ?? (o._$Co = []))[s] = a : o._$Cl = a), a !== void 0 && (r = De(i, a._$AS(i, r.values), a, s)), r;
|
|
344
344
|
}
|
|
345
|
-
class
|
|
345
|
+
class nn {
|
|
346
346
|
constructor(r, o) {
|
|
347
347
|
this._$AV = [], this._$AN = void 0, this._$AD = r, this._$AM = o;
|
|
348
348
|
}
|
|
@@ -353,30 +353,30 @@ class sn {
|
|
|
353
353
|
return this._$AM._$AU;
|
|
354
354
|
}
|
|
355
355
|
u(r) {
|
|
356
|
-
const { el: { content: o }, parts: s } = this._$AD,
|
|
357
|
-
|
|
358
|
-
let t =
|
|
356
|
+
const { el: { content: o }, parts: s } = this._$AD, a = ((r == null ? void 0 : r.creationScope) ?? ve).importNode(o, !0);
|
|
357
|
+
be.currentNode = a;
|
|
358
|
+
let t = be.nextNode(), p = 0, g = 0, v = s[0];
|
|
359
359
|
for (; v !== void 0; ) {
|
|
360
|
-
if (
|
|
360
|
+
if (p === v.index) {
|
|
361
361
|
let x;
|
|
362
|
-
v.type === 2 ? x = new
|
|
362
|
+
v.type === 2 ? x = new tt(t, t.nextSibling, this, r) : v.type === 1 ? x = new v.ctor(t, v.name, v.strings, this, r) : v.type === 6 && (x = new pn(t, this, r)), this._$AV.push(x), v = s[++g];
|
|
363
363
|
}
|
|
364
|
-
|
|
364
|
+
p !== (v == null ? void 0 : v.index) && (t = be.nextNode(), p++);
|
|
365
365
|
}
|
|
366
|
-
return
|
|
366
|
+
return be.currentNode = ve, a;
|
|
367
367
|
}
|
|
368
368
|
p(r) {
|
|
369
369
|
let o = 0;
|
|
370
370
|
for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(r, s, o), o += s.strings.length - 2) : s._$AI(r[o])), o++;
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
|
-
class
|
|
373
|
+
class tt {
|
|
374
374
|
get _$AU() {
|
|
375
375
|
var r;
|
|
376
376
|
return ((r = this._$AM) == null ? void 0 : r._$AU) ?? this._$Cv;
|
|
377
377
|
}
|
|
378
|
-
constructor(r, o, s,
|
|
379
|
-
this.type = 2, this._$AH = C, this._$AN = void 0, this._$AA = r, this._$AB = o, this._$AM = s, this.options =
|
|
378
|
+
constructor(r, o, s, a) {
|
|
379
|
+
this.type = 2, this._$AH = C, this._$AN = void 0, this._$AA = r, this._$AB = o, this._$AM = s, this.options = a, this._$Cv = (a == null ? void 0 : a.isConnected) ?? !0;
|
|
380
380
|
}
|
|
381
381
|
get parentNode() {
|
|
382
382
|
let r = this._$AA.parentNode;
|
|
@@ -390,7 +390,7 @@ class Je {
|
|
|
390
390
|
return this._$AB;
|
|
391
391
|
}
|
|
392
392
|
_$AI(r, o = this) {
|
|
393
|
-
r =
|
|
393
|
+
r = De(this, r, o), Xe(r) ? r === C || r == null || r === "" ? (this._$AH !== C && this._$AR(), this._$AH = C) : r !== this._$AH && r !== me && this._(r) : r._$litType$ !== void 0 ? this.$(r) : r.nodeType !== void 0 ? this.T(r) : rn(r) ? this.k(r) : this._(r);
|
|
394
394
|
}
|
|
395
395
|
O(r) {
|
|
396
396
|
return this._$AA.parentNode.insertBefore(r, this._$AB);
|
|
@@ -399,33 +399,33 @@ class Je {
|
|
|
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 && Xe(this._$AH) ? this._$AA.nextSibling.data = r : this.T(ve.createTextNode(r)), this._$AH = r;
|
|
403
403
|
}
|
|
404
404
|
$(r) {
|
|
405
405
|
var t;
|
|
406
|
-
const { values: o, _$litType$: s } = r,
|
|
407
|
-
if (((t = this._$AH) == null ? void 0 : t._$AD) ===
|
|
406
|
+
const { values: o, _$litType$: s } = r, a = typeof s == "number" ? this._$AC(r) : (s.el === void 0 && (s.el = Ge.createElement(Wi(s.h, s.h[0]), this.options)), s);
|
|
407
|
+
if (((t = this._$AH) == null ? void 0 : t._$AD) === a) this._$AH.p(o);
|
|
408
408
|
else {
|
|
409
|
-
const
|
|
410
|
-
|
|
409
|
+
const p = new nn(a, this), g = p.u(this.options);
|
|
410
|
+
p.p(o), this.T(g), this._$AH = p;
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
413
|
_$AC(r) {
|
|
414
|
-
let o =
|
|
415
|
-
return o === void 0 &&
|
|
414
|
+
let o = zi.get(r.strings);
|
|
415
|
+
return o === void 0 && zi.set(r.strings, o = new Ge(r)), o;
|
|
416
416
|
}
|
|
417
417
|
k(r) {
|
|
418
|
-
|
|
418
|
+
ur(this._$AH) || (this._$AH = [], this._$AR());
|
|
419
419
|
const o = this._$AH;
|
|
420
|
-
let s,
|
|
421
|
-
for (const t of r)
|
|
422
|
-
|
|
420
|
+
let s, a = 0;
|
|
421
|
+
for (const t of r) a === o.length ? o.push(s = new tt(this.O(Ve()), this.O(Ve()), this, this.options)) : s = o[a], s._$AI(t), a++;
|
|
422
|
+
a < o.length && (this._$AR(s && s._$AB.nextSibling, a), o.length = a);
|
|
423
423
|
}
|
|
424
424
|
_$AR(r = this._$AA.nextSibling, o) {
|
|
425
425
|
var s;
|
|
426
426
|
for ((s = this._$AP) == null ? void 0 : s.call(this, !1, !0, o); r && r !== this._$AB; ) {
|
|
427
|
-
const
|
|
428
|
-
r.remove(), r =
|
|
427
|
+
const a = r.nextSibling;
|
|
428
|
+
r.remove(), r = a;
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
431
|
setConnected(r) {
|
|
@@ -433,32 +433,32 @@ class Je {
|
|
|
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 Pt {
|
|
437
437
|
get tagName() {
|
|
438
438
|
return this.element.tagName;
|
|
439
439
|
}
|
|
440
440
|
get _$AU() {
|
|
441
441
|
return this._$AM._$AU;
|
|
442
442
|
}
|
|
443
|
-
constructor(r, o, s,
|
|
444
|
-
this.type = 1, this._$AH = C, this._$AN = void 0, this.element = r, this.name = o, this._$AM =
|
|
443
|
+
constructor(r, o, s, a, t) {
|
|
444
|
+
this.type = 1, this._$AH = C, this._$AN = void 0, this.element = r, this.name = o, this._$AM = a, this.options = t, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = C;
|
|
445
445
|
}
|
|
446
|
-
_$AI(r, o = this, s,
|
|
446
|
+
_$AI(r, o = this, s, a) {
|
|
447
447
|
const t = this.strings;
|
|
448
|
-
let
|
|
449
|
-
if (t === void 0) r =
|
|
448
|
+
let p = !1;
|
|
449
|
+
if (t === void 0) r = De(this, r, o, 0), p = !Xe(r) || r !== this._$AH && r !== me, p && (this._$AH = r);
|
|
450
450
|
else {
|
|
451
|
-
const
|
|
451
|
+
const g = r;
|
|
452
452
|
let v, x;
|
|
453
|
-
for (r = t[0], v = 0; v < t.length - 1; v++) x =
|
|
453
|
+
for (r = t[0], v = 0; v < t.length - 1; v++) x = De(this, g[s + v], o, v), x === me && (x = this._$AH[v]), p || (p = !Xe(x) || x !== this._$AH[v]), x === C ? r = C : r !== C && (r += (x ?? "") + t[v + 1]), this._$AH[v] = x;
|
|
454
454
|
}
|
|
455
|
-
|
|
455
|
+
p && !a && 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 an extends Pt {
|
|
462
462
|
constructor() {
|
|
463
463
|
super(...arguments), this.type = 3;
|
|
464
464
|
}
|
|
@@ -466,7 +466,7 @@ class on extends Et {
|
|
|
466
466
|
this.element[this.name] = r === C ? void 0 : r;
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
|
-
class
|
|
469
|
+
class cn extends Pt {
|
|
470
470
|
constructor() {
|
|
471
471
|
super(...arguments), this.type = 4;
|
|
472
472
|
}
|
|
@@ -474,21 +474,21 @@ class nn extends Et {
|
|
|
474
474
|
this.element.toggleAttribute(this.name, !!r && r !== C);
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
class
|
|
478
|
-
constructor(r, o, s,
|
|
479
|
-
super(r, o, s,
|
|
477
|
+
class ln extends Pt {
|
|
478
|
+
constructor(r, o, s, a, t) {
|
|
479
|
+
super(r, o, s, a, t), this.type = 5;
|
|
480
480
|
}
|
|
481
481
|
_$AI(r, o = this) {
|
|
482
|
-
if ((r =
|
|
483
|
-
const s = this._$AH,
|
|
484
|
-
|
|
482
|
+
if ((r = De(this, r, o, 0) ?? C) === me) return;
|
|
483
|
+
const s = this._$AH, a = r === C && s !== C || r.capture !== s.capture || r.once !== s.once || r.passive !== s.passive, t = r !== C && (s === C || a);
|
|
484
|
+
a && this.element.removeEventListener(this.name, this, s), t && this.element.addEventListener(this.name, this, r), this._$AH = r;
|
|
485
485
|
}
|
|
486
486
|
handleEvent(r) {
|
|
487
487
|
var o;
|
|
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 pn {
|
|
492
492
|
constructor(r, o, s) {
|
|
493
493
|
this.element = r, this.type = 6, this._$AN = void 0, this._$AM = o, this.options = s;
|
|
494
494
|
}
|
|
@@ -496,26 +496,26 @@ class cn {
|
|
|
496
496
|
return this._$AM._$AU;
|
|
497
497
|
}
|
|
498
498
|
_$AI(r) {
|
|
499
|
-
|
|
499
|
+
De(this, r);
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
const
|
|
503
|
-
|
|
504
|
-
const
|
|
502
|
+
const er = Ke.litHtmlPolyfillSupport;
|
|
503
|
+
er == null || er(Ge, tt), (Ke.litHtmlVersions ?? (Ke.litHtmlVersions = [])).push("3.2.1");
|
|
504
|
+
const dr = (i, r, o) => {
|
|
505
505
|
const s = (o == null ? void 0 : o.renderBefore) ?? r;
|
|
506
|
-
let
|
|
507
|
-
if (
|
|
506
|
+
let a = s._$litPart$;
|
|
507
|
+
if (a === void 0) {
|
|
508
508
|
const t = (o == null ? void 0 : o.renderBefore) ?? null;
|
|
509
|
-
s._$litPart$ =
|
|
509
|
+
s._$litPart$ = a = new tt(r.insertBefore(Ve(), t), t, void 0, o ?? {});
|
|
510
510
|
}
|
|
511
|
-
return
|
|
511
|
+
return a._$AI(i), a;
|
|
512
512
|
};
|
|
513
513
|
/**
|
|
514
514
|
* @license
|
|
515
515
|
* Copyright 2017 Google LLC
|
|
516
516
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
517
517
|
*/
|
|
518
|
-
let O = class extends
|
|
518
|
+
let O = class extends Te {
|
|
519
519
|
constructor() {
|
|
520
520
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
521
521
|
}
|
|
@@ -526,7 +526,7 @@ let O = class extends Oe {
|
|
|
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 = dr(o, this.renderRoot, this.renderOptions);
|
|
530
530
|
}
|
|
531
531
|
connectedCallback() {
|
|
532
532
|
var r;
|
|
@@ -537,21 +537,21 @@ let O = class extends Oe {
|
|
|
537
537
|
super.disconnectedCallback(), (r = this._$Do) == null || r.setConnected(!1);
|
|
538
538
|
}
|
|
539
539
|
render() {
|
|
540
|
-
return
|
|
540
|
+
return me;
|
|
541
541
|
}
|
|
542
542
|
};
|
|
543
|
-
var
|
|
544
|
-
O._$litElement$ = !0, O.finalized = !0, (
|
|
545
|
-
const
|
|
546
|
-
|
|
543
|
+
var Fi;
|
|
544
|
+
O._$litElement$ = !0, O.finalized = !0, (Fi = globalThis.litElementHydrateSupport) == null || Fi.call(globalThis, { LitElement: O });
|
|
545
|
+
const tr = globalThis.litElementPolyfillSupport;
|
|
546
|
+
tr == null || tr({ 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 Yi = { ATTRIBUTE: 1, CHILD: 2, PROPERTY: 3, BOOLEAN_ATTRIBUTE: 4, EVENT: 5, ELEMENT: 6 }, hr = (i) => (...r) => ({ _$litDirective$: i, values: r });
|
|
554
|
+
let Ki = class {
|
|
555
555
|
constructor(r) {
|
|
556
556
|
}
|
|
557
557
|
get _$AU() {
|
|
@@ -572,10 +572,10 @@ let Wi = class {
|
|
|
572
572
|
* Copyright 2018 Google LLC
|
|
573
573
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
574
574
|
*/
|
|
575
|
-
const
|
|
575
|
+
const Zi = "important", un = " !" + Zi, Vi = hr(class extends Ki {
|
|
576
576
|
constructor(i) {
|
|
577
577
|
var r;
|
|
578
|
-
if (super(i), i.type !==
|
|
578
|
+
if (super(i), i.type !== Yi.ATTRIBUTE || i.name !== "style" || ((r = i.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(i) {
|
|
581
581
|
return Object.keys(i).reduce((r, o) => {
|
|
@@ -588,16 +588,16 @@ const Yi = "important", ln = " !" + Yi, Ki = ur(class extends Wi {
|
|
|
588
588
|
if (this.ft === void 0) return this.ft = new Set(Object.keys(r)), this.render(r);
|
|
589
589
|
for (const s of this.ft) r[s] == null && (this.ft.delete(s), s.includes("-") ? o.removeProperty(s) : o[s] = null);
|
|
590
590
|
for (const s in r) {
|
|
591
|
-
const
|
|
592
|
-
if (
|
|
591
|
+
const a = r[s];
|
|
592
|
+
if (a != null) {
|
|
593
593
|
this.ft.add(s);
|
|
594
|
-
const t = typeof
|
|
595
|
-
s.includes("-") || t ? o.setProperty(s, t ?
|
|
594
|
+
const t = typeof a == "string" && a.endsWith(un);
|
|
595
|
+
s.includes("-") || t ? o.setProperty(s, t ? a.slice(0, -11) : a, t ? Zi : "") : o[s] = a;
|
|
596
596
|
}
|
|
597
597
|
}
|
|
598
|
-
return
|
|
598
|
+
return me;
|
|
599
599
|
}
|
|
600
|
-
}),
|
|
600
|
+
}), dn = W`
|
|
601
601
|
:host{
|
|
602
602
|
display: inline-block;
|
|
603
603
|
--text-on-color: var(--spectric-text-on-color, #ffffff);
|
|
@@ -854,31 +854,31 @@ const L = (i) => (r, o) => {
|
|
|
854
854
|
* Copyright 2017 Google LLC
|
|
855
855
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
856
856
|
*/
|
|
857
|
-
const
|
|
858
|
-
const { kind: s, metadata:
|
|
859
|
-
let t = globalThis.litPropertyMetadata.get(
|
|
860
|
-
if (t === void 0 && globalThis.litPropertyMetadata.set(
|
|
861
|
-
const { name:
|
|
862
|
-
return { set(
|
|
857
|
+
const hn = { attribute: !0, type: String, converter: xt, reflect: !1, hasChanged: pr }, fn = (i = hn, r, o) => {
|
|
858
|
+
const { kind: s, metadata: a } = o;
|
|
859
|
+
let t = globalThis.litPropertyMetadata.get(a);
|
|
860
|
+
if (t === void 0 && globalThis.litPropertyMetadata.set(a, t = /* @__PURE__ */ new Map()), t.set(o.name, i), s === "accessor") {
|
|
861
|
+
const { name: p } = o;
|
|
862
|
+
return { set(g) {
|
|
863
863
|
const v = r.get.call(this);
|
|
864
|
-
r.set.call(this,
|
|
865
|
-
}, init(
|
|
866
|
-
return
|
|
864
|
+
r.set.call(this, g), this.requestUpdate(p, v, i);
|
|
865
|
+
}, init(g) {
|
|
866
|
+
return g !== void 0 && this.P(p, void 0, i), g;
|
|
867
867
|
} };
|
|
868
868
|
}
|
|
869
869
|
if (s === "setter") {
|
|
870
|
-
const { name:
|
|
871
|
-
return function(
|
|
872
|
-
const v = this[
|
|
873
|
-
r.call(this,
|
|
870
|
+
const { name: p } = o;
|
|
871
|
+
return function(g) {
|
|
872
|
+
const v = this[p];
|
|
873
|
+
r.call(this, g), this.requestUpdate(p, v, i);
|
|
874
874
|
};
|
|
875
875
|
}
|
|
876
876
|
throw Error("Unsupported decorator location: " + s);
|
|
877
877
|
};
|
|
878
|
-
function
|
|
879
|
-
return (r, o) => typeof o == "object" ?
|
|
880
|
-
const
|
|
881
|
-
return
|
|
878
|
+
function b(i) {
|
|
879
|
+
return (r, o) => typeof o == "object" ? fn(i, r, o) : ((s, a, t) => {
|
|
880
|
+
const p = a.hasOwnProperty(t);
|
|
881
|
+
return a.constructor.createProperty(t, p ? { ...s, wrapped: !0 } : s), p ? Object.getOwnPropertyDescriptor(a, t) : void 0;
|
|
882
882
|
})(i, r, o);
|
|
883
883
|
}
|
|
884
884
|
/**
|
|
@@ -886,27 +886,27 @@ function g(i) {
|
|
|
886
886
|
* Copyright 2017 Google LLC
|
|
887
887
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
888
888
|
*/
|
|
889
|
-
function
|
|
890
|
-
return
|
|
889
|
+
function rt(i) {
|
|
890
|
+
return b({ ...i, state: !0, attribute: !1 });
|
|
891
891
|
}
|
|
892
892
|
/**
|
|
893
893
|
* @license
|
|
894
894
|
* Copyright 2017 Google LLC
|
|
895
895
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
896
896
|
*/
|
|
897
|
-
const
|
|
897
|
+
const Xi = (i, r, o) => (o.configurable = !0, o.enumerable = !0, Reflect.decorate && typeof r != "object" && Object.defineProperty(i, r, o), o);
|
|
898
898
|
/**
|
|
899
899
|
* @license
|
|
900
900
|
* Copyright 2017 Google LLC
|
|
901
901
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
902
902
|
*/
|
|
903
|
-
function
|
|
904
|
-
return (o, s,
|
|
905
|
-
const t = (
|
|
906
|
-
var
|
|
907
|
-
return ((
|
|
903
|
+
function Re(i, r) {
|
|
904
|
+
return (o, s, a) => {
|
|
905
|
+
const t = (p) => {
|
|
906
|
+
var g;
|
|
907
|
+
return ((g = p.renderRoot) == null ? void 0 : g.querySelector(i)) ?? null;
|
|
908
908
|
};
|
|
909
|
-
return
|
|
909
|
+
return Xi(o, s, { get() {
|
|
910
910
|
return t(this);
|
|
911
911
|
} });
|
|
912
912
|
};
|
|
@@ -916,23 +916,23 @@ function De(i, r) {
|
|
|
916
916
|
* Copyright 2017 Google LLC
|
|
917
917
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
918
918
|
*/
|
|
919
|
-
function
|
|
920
|
-
return (r, o) =>
|
|
919
|
+
function Tt(i) {
|
|
920
|
+
return (r, o) => Xi(r, o, { async get() {
|
|
921
921
|
var s;
|
|
922
922
|
return await this.updateComplete, ((s = this.renderRoot) == null ? void 0 : s.querySelector(i)) ?? null;
|
|
923
923
|
} });
|
|
924
924
|
}
|
|
925
|
-
var
|
|
926
|
-
for (var
|
|
927
|
-
(
|
|
928
|
-
return s &&
|
|
929
|
-
},
|
|
930
|
-
const
|
|
925
|
+
var gn = Object.defineProperty, bn = Object.getOwnPropertyDescriptor, G = (i, r, o, s) => {
|
|
926
|
+
for (var a = s > 1 ? void 0 : s ? bn(r, o) : r, t = i.length - 1, p; t >= 0; t--)
|
|
927
|
+
(p = i[t]) && (a = (s ? p(r, o, a) : p(a)) || a);
|
|
928
|
+
return s && a && gn(r, o, a), a;
|
|
929
|
+
}, vn = /* @__PURE__ */ ((i) => (i.large = "large", i.medium = "medium", i.small = "small", i.xsmall = "xsmall", i.xxsmall = "xxsmall", i.tiny = "tiny", i))(vn || {}), mn = /* @__PURE__ */ ((i) => (i.primary = "primary", i.secondary = "secondary", i.text = "text", i))(mn || {});
|
|
930
|
+
const yn = {
|
|
931
931
|
primary: "spectric-button--primary",
|
|
932
932
|
secondary: "spectric-button--secondary",
|
|
933
933
|
text: "spectric-button--text"
|
|
934
934
|
};
|
|
935
|
-
let
|
|
935
|
+
let M = class extends O {
|
|
936
936
|
constructor() {
|
|
937
937
|
super(...arguments), this.variant = "primary", this.disabled = !1, this.size = "small", this.label = "", this.danger = !1, this.icon = !1, this.tooltipPosition = "right", this._onClick = (i) => {
|
|
938
938
|
if (i instanceof CustomEvent || (i.preventDefault(), i.stopImmediatePropagation(), i.stopPropagation(), this.disabled))
|
|
@@ -952,14 +952,14 @@ let B = class extends O {
|
|
|
952
952
|
super.disconnectedCallback(), this.removeEventListener("click", this._onClick);
|
|
953
953
|
}
|
|
954
954
|
render() {
|
|
955
|
-
const i =
|
|
955
|
+
const i = yn[this.variant] || "spectric-button--primary";
|
|
956
956
|
return _`
|
|
957
957
|
${this.tooltip ? _`<spectric-tooltip .text=${this.tooltip} .position=${this.tooltipPosition || "right"} .triggerTarget=${this}></spectric-tooltip>` : null}
|
|
958
958
|
<button
|
|
959
959
|
type="button"
|
|
960
960
|
?disabled=${this.disabled}
|
|
961
961
|
class=${["spectric-button", `spectric-button-danger--${this.danger || !1}`, `spectric-button--${this.size || "medium"}`, i].join(" ")}
|
|
962
|
-
style=${
|
|
962
|
+
style=${Vi({ backgroundColor: this.backgroundColor })}
|
|
963
963
|
>
|
|
964
964
|
<span class="animation"></span>
|
|
965
965
|
<slot>${this.label}</slot>
|
|
@@ -967,93 +967,93 @@ let B = class extends O {
|
|
|
967
967
|
`;
|
|
968
968
|
}
|
|
969
969
|
};
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
],
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
],
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
],
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
],
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
],
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
],
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
],
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
],
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
],
|
|
998
|
-
|
|
970
|
+
M.styles = dn;
|
|
971
|
+
G([
|
|
972
|
+
b({ type: String, reflect: !0 })
|
|
973
|
+
], M.prototype, "variant", 2);
|
|
974
|
+
G([
|
|
975
|
+
b({ type: Boolean, reflect: !0 })
|
|
976
|
+
], M.prototype, "disabled", 2);
|
|
977
|
+
G([
|
|
978
|
+
b({ type: String, reflect: !0 })
|
|
979
|
+
], M.prototype, "backgroundColor", 2);
|
|
980
|
+
G([
|
|
981
|
+
b({ type: String, reflect: !0 })
|
|
982
|
+
], M.prototype, "size", 2);
|
|
983
|
+
G([
|
|
984
|
+
b({ type: String, reflect: !0 })
|
|
985
|
+
], M.prototype, "label", 2);
|
|
986
|
+
G([
|
|
987
|
+
b({ type: Boolean, reflect: !0 })
|
|
988
|
+
], M.prototype, "danger", 2);
|
|
989
|
+
G([
|
|
990
|
+
b({ type: Boolean, reflect: !0 })
|
|
991
|
+
], M.prototype, "icon", 2);
|
|
992
|
+
G([
|
|
993
|
+
b({ type: String, reflect: !0 })
|
|
994
|
+
], M.prototype, "tooltip", 2);
|
|
995
|
+
G([
|
|
996
|
+
b({ type: String, reflect: !0 })
|
|
997
|
+
], M.prototype, "tooltipPosition", 2);
|
|
998
|
+
M = G([
|
|
999
999
|
L("spectric-button")
|
|
1000
|
-
],
|
|
1000
|
+
], M);
|
|
1001
1001
|
/**
|
|
1002
1002
|
* @license
|
|
1003
1003
|
* Copyright 2020 Google LLC
|
|
1004
1004
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1005
1005
|
*/
|
|
1006
|
-
const
|
|
1006
|
+
const $n = (i) => i.strings === void 0;
|
|
1007
1007
|
/**
|
|
1008
1008
|
* @license
|
|
1009
1009
|
* Copyright 2017 Google LLC
|
|
1010
1010
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1011
1011
|
*/
|
|
1012
|
-
const
|
|
1012
|
+
const Ze = (i, r) => {
|
|
1013
1013
|
var s;
|
|
1014
1014
|
const o = i._$AN;
|
|
1015
1015
|
if (o === void 0) return !1;
|
|
1016
|
-
for (const
|
|
1016
|
+
for (const a of o) (s = a._$AO) == null || s.call(a, r, !1), Ze(a, r);
|
|
1017
1017
|
return !0;
|
|
1018
|
-
},
|
|
1018
|
+
}, St = (i) => {
|
|
1019
1019
|
let r, o;
|
|
1020
1020
|
do {
|
|
1021
1021
|
if ((r = i._$AM) === void 0) break;
|
|
1022
1022
|
o = r._$AN, o.delete(i), i = r;
|
|
1023
1023
|
} while ((o == null ? void 0 : o.size) === 0);
|
|
1024
|
-
},
|
|
1024
|
+
}, Gi = (i) => {
|
|
1025
1025
|
for (let r; r = i._$AM; i = r) {
|
|
1026
1026
|
let o = r._$AN;
|
|
1027
1027
|
if (o === void 0) r._$AN = o = /* @__PURE__ */ new Set();
|
|
1028
1028
|
else if (o.has(i)) break;
|
|
1029
|
-
o.add(i),
|
|
1029
|
+
o.add(i), xn(r);
|
|
1030
1030
|
}
|
|
1031
1031
|
};
|
|
1032
|
-
function
|
|
1033
|
-
this._$AN !== void 0 ? (
|
|
1032
|
+
function _n(i) {
|
|
1033
|
+
this._$AN !== void 0 ? (St(this), this._$AM = i, Gi(this)) : this._$AM = i;
|
|
1034
1034
|
}
|
|
1035
|
-
function
|
|
1036
|
-
const s = this._$AH,
|
|
1037
|
-
if (
|
|
1038
|
-
else s != null && (
|
|
1039
|
-
else
|
|
1035
|
+
function wn(i, r = !1, o = 0) {
|
|
1036
|
+
const s = this._$AH, a = this._$AN;
|
|
1037
|
+
if (a !== void 0 && a.size !== 0) if (r) if (Array.isArray(s)) for (let t = o; t < s.length; t++) Ze(s[t], !1), St(s[t]);
|
|
1038
|
+
else s != null && (Ze(s, !1), St(s));
|
|
1039
|
+
else Ze(this, i);
|
|
1040
1040
|
}
|
|
1041
|
-
const
|
|
1042
|
-
i.type ==
|
|
1041
|
+
const xn = (i) => {
|
|
1042
|
+
i.type == Yi.CHILD && (i._$AP ?? (i._$AP = wn), i._$AQ ?? (i._$AQ = _n));
|
|
1043
1043
|
};
|
|
1044
|
-
class
|
|
1044
|
+
class Ji extends Ki {
|
|
1045
1045
|
constructor() {
|
|
1046
1046
|
super(...arguments), this._$AN = void 0;
|
|
1047
1047
|
}
|
|
1048
1048
|
_$AT(r, o, s) {
|
|
1049
|
-
super._$AT(r, o, s),
|
|
1049
|
+
super._$AT(r, o, s), Gi(this), this.isConnected = r._$AU;
|
|
1050
1050
|
}
|
|
1051
1051
|
_$AO(r, o = !0) {
|
|
1052
|
-
var s,
|
|
1053
|
-
r !== this.isConnected && (this.isConnected = r, r ? (s = this.reconnected) == null || s.call(this) : (
|
|
1052
|
+
var s, a;
|
|
1053
|
+
r !== this.isConnected && (this.isConnected = r, r ? (s = this.reconnected) == null || s.call(this) : (a = this.disconnected) == null || a.call(this)), o && (Ze(this, r), St(this));
|
|
1054
1054
|
}
|
|
1055
1055
|
setValue(r) {
|
|
1056
|
-
if (
|
|
1056
|
+
if ($n(this._$Ct)) this._$Ct._$AI(r, this);
|
|
1057
1057
|
else {
|
|
1058
1058
|
const o = [...this._$Ct._$AH];
|
|
1059
1059
|
o[this._$Ci] = r, this._$Ct._$AI(o, this, 0);
|
|
@@ -1069,10 +1069,10 @@ class Xi extends Wi {
|
|
|
1069
1069
|
* Copyright 2020 Google LLC
|
|
1070
1070
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1071
1071
|
*/
|
|
1072
|
-
const
|
|
1073
|
-
class
|
|
1072
|
+
const $t = () => new An();
|
|
1073
|
+
class An {
|
|
1074
1074
|
}
|
|
1075
|
-
const
|
|
1075
|
+
const rr = /* @__PURE__ */ new WeakMap(), _t = hr(class extends Ji {
|
|
1076
1076
|
render(i) {
|
|
1077
1077
|
return C;
|
|
1078
1078
|
}
|
|
@@ -1084,13 +1084,13 @@ const er = /* @__PURE__ */ new WeakMap(), yt = ur(class extends Xi {
|
|
|
1084
1084
|
rt(i) {
|
|
1085
1085
|
if (this.isConnected || (i = void 0), typeof this.Y == "function") {
|
|
1086
1086
|
const r = this.ht ?? globalThis;
|
|
1087
|
-
let o =
|
|
1088
|
-
o === void 0 && (o = /* @__PURE__ */ new WeakMap(),
|
|
1087
|
+
let o = rr.get(r);
|
|
1088
|
+
o === void 0 && (o = /* @__PURE__ */ new WeakMap(), rr.set(r, o)), o.get(this.Y) !== void 0 && this.Y.call(this.ht, void 0), o.set(this.Y, i), i !== void 0 && this.Y.call(this.ht, i);
|
|
1089
1089
|
} else this.Y.value = i;
|
|
1090
1090
|
}
|
|
1091
1091
|
get lt() {
|
|
1092
1092
|
var i, r;
|
|
1093
|
-
return typeof this.Y == "function" ? (i =
|
|
1093
|
+
return typeof this.Y == "function" ? (i = rr.get(this.ht ?? globalThis)) == null ? void 0 : i.get(this.Y) : (r = this.Y) == null ? void 0 : r.value;
|
|
1094
1094
|
}
|
|
1095
1095
|
disconnected() {
|
|
1096
1096
|
this.lt === this.ct && this.rt(void 0);
|
|
@@ -1098,7 +1098,7 @@ const er = /* @__PURE__ */ new WeakMap(), yt = ur(class extends Xi {
|
|
|
1098
1098
|
reconnected() {
|
|
1099
1099
|
this.rt(this.ct);
|
|
1100
1100
|
}
|
|
1101
|
-
}),
|
|
1101
|
+
}), Sn = class {
|
|
1102
1102
|
constructor(r) {
|
|
1103
1103
|
return this.buffer = r, this.u8 = new Uint8Array(r), new Proxy(this, {
|
|
1104
1104
|
get(o, s) {
|
|
@@ -1118,20 +1118,20 @@ const er = /* @__PURE__ */ new WeakMap(), yt = ur(class extends Xi {
|
|
|
1118
1118
|
return this.u8.byteLength * 8;
|
|
1119
1119
|
}
|
|
1120
1120
|
set(r, o) {
|
|
1121
|
-
for (let s = o || 0,
|
|
1122
|
-
this.setBit(s, r[
|
|
1121
|
+
for (let s = o || 0, a = 0, t = r.length; a < t; s++, a++)
|
|
1122
|
+
this.setBit(s, r[a]);
|
|
1123
1123
|
}
|
|
1124
1124
|
subarray(r, o) {
|
|
1125
1125
|
let s = [];
|
|
1126
1126
|
r = r || 0, o = o || this.length, o = o > this.length ? this.length : o;
|
|
1127
|
-
for (let
|
|
1128
|
-
s.push(this.getBit(
|
|
1127
|
+
for (let a = r; a < o; a++)
|
|
1128
|
+
s.push(this.getBit(a));
|
|
1129
1129
|
return s;
|
|
1130
1130
|
}
|
|
1131
1131
|
};
|
|
1132
|
-
class
|
|
1133
|
-
constructor(r, o, s,
|
|
1134
|
-
this.__target = r, this._handler = s, this._type = o, this._handler = s, this._options =
|
|
1132
|
+
class Ri {
|
|
1133
|
+
constructor(r, o, s, a) {
|
|
1134
|
+
this.__target = r, this._handler = s, this._type = o, this._handler = s, this._options = a || !1, r instanceof Promise ? r.then((t) => {
|
|
1135
1135
|
this._handler && (this._node = t, this._node.addEventListener(this._type, this._handler, this._options));
|
|
1136
1136
|
}) : (this._node = r, this._node.addEventListener(this._type, this._handler, this._options));
|
|
1137
1137
|
}
|
|
@@ -1139,7 +1139,7 @@ class ji {
|
|
|
1139
1139
|
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);
|
|
1140
1140
|
}
|
|
1141
1141
|
}
|
|
1142
|
-
class
|
|
1142
|
+
class es extends O {
|
|
1143
1143
|
constructor() {
|
|
1144
1144
|
super(...arguments), this._disposables = /* @__PURE__ */ new Set(), this._isDisposed = !1, this._disposableListeners = [], this._connected = !1;
|
|
1145
1145
|
}
|
|
@@ -1148,7 +1148,7 @@ class Gi extends O {
|
|
|
1148
1148
|
console.warn("Event handler already exists best practice is to add the this in the constructor");
|
|
1149
1149
|
return;
|
|
1150
1150
|
}
|
|
1151
|
-
this._disposableListeners.push({ target: r, event: o, handler: s }), this._connected && this.registerDisposable(new
|
|
1151
|
+
this._disposableListeners.push({ target: r, event: o, handler: s }), this._connected && this.registerDisposable(new Ri(r, o, s));
|
|
1152
1152
|
}
|
|
1153
1153
|
registerDisposable(r) {
|
|
1154
1154
|
if (!r)
|
|
@@ -1159,7 +1159,7 @@ class Gi extends O {
|
|
|
1159
1159
|
}
|
|
1160
1160
|
connectedCallback() {
|
|
1161
1161
|
super.connectedCallback(), this._connected = !0, this._isDisposed = !1, this._disposableListeners.forEach(({ target: r, event: o, handler: s }) => {
|
|
1162
|
-
this.registerDisposable(new
|
|
1162
|
+
this.registerDisposable(new Ri(r, o, s));
|
|
1163
1163
|
});
|
|
1164
1164
|
}
|
|
1165
1165
|
disconnectedCallback() {
|
|
@@ -1168,7 +1168,7 @@ class Gi extends O {
|
|
|
1168
1168
|
}), this._isDisposed = !0;
|
|
1169
1169
|
}
|
|
1170
1170
|
}
|
|
1171
|
-
const
|
|
1171
|
+
const ts = (i) => {
|
|
1172
1172
|
var r;
|
|
1173
1173
|
return (...o) => {
|
|
1174
1174
|
r && cancelAnimationFrame(r), r = requestAnimationFrame(() => {
|
|
@@ -1176,18 +1176,18 @@ const Ji = (i) => {
|
|
|
1176
1176
|
});
|
|
1177
1177
|
};
|
|
1178
1178
|
};
|
|
1179
|
-
var
|
|
1180
|
-
for (var
|
|
1181
|
-
(
|
|
1182
|
-
return s &&
|
|
1179
|
+
var kn = Object.defineProperty, Cn = Object.getOwnPropertyDescriptor, we = (i, r, o, s) => {
|
|
1180
|
+
for (var a = s > 1 ? void 0 : s ? Cn(r, o) : r, t = i.length - 1, p; t >= 0; t--)
|
|
1181
|
+
(p = i[t]) && (a = (s ? p(r, o, a) : p(a)) || a);
|
|
1182
|
+
return s && a && kn(r, o, a), a;
|
|
1183
1183
|
};
|
|
1184
|
-
const
|
|
1185
|
-
let
|
|
1184
|
+
const En = ["mousemove", "click", "dblclick", "mousedown", "mouseup", "contextmenu"], vt = { width: 200, height: 200 }, kt = { width: 10, height: 10 };
|
|
1185
|
+
let re = class extends es {
|
|
1186
1186
|
constructor() {
|
|
1187
1187
|
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 = {
|
|
1188
|
-
viewport:
|
|
1189
|
-
canvas:
|
|
1190
|
-
scrollDiv:
|
|
1188
|
+
viewport: $t(),
|
|
1189
|
+
canvas: $t(),
|
|
1190
|
+
scrollDiv: $t()
|
|
1191
1191
|
}, this.color = "#000000", this.onThemeChange = () => {
|
|
1192
1192
|
let o = getComputedStyle(this);
|
|
1193
1193
|
this.color != o.color && (this.color = o.color, this.paint());
|
|
@@ -1204,21 +1204,21 @@ let te = class extends Gi {
|
|
|
1204
1204
|
this.resizeObserver.disconnect();
|
|
1205
1205
|
}, this.resizeObserver = i, this.addDisposableListener(document.body, "theme-change", this.onThemeChange);
|
|
1206
1206
|
var r = {};
|
|
1207
|
-
|
|
1208
|
-
this.addDisposableListener(this._canvas, o,
|
|
1207
|
+
En.forEach((o) => {
|
|
1208
|
+
this.addDisposableListener(this._canvas, o, ts(async (s) => {
|
|
1209
1209
|
s.stopImmediatePropagation(), s.stopPropagation(), s.preventDefault();
|
|
1210
|
-
var
|
|
1211
|
-
let t =
|
|
1210
|
+
var a = await this._canvas;
|
|
1211
|
+
let t = a.getBoundingClientRect(), p = {
|
|
1212
1212
|
x: Math.floor(Math.abs(s.clientX - t.left)),
|
|
1213
1213
|
y: Math.floor(Math.abs(s.clientY - t.top))
|
|
1214
|
-
},
|
|
1215
|
-
if (o === "mousemove" && r[o] ==
|
|
1214
|
+
}, g = this.canvasPositionToBit(p);
|
|
1215
|
+
if (o === "mousemove" && r[o] == g)
|
|
1216
1216
|
return;
|
|
1217
|
-
r[o] =
|
|
1217
|
+
r[o] = g;
|
|
1218
1218
|
let v = "bit" + String(o).charAt(0).toUpperCase() + String(o).slice(1);
|
|
1219
|
-
if (
|
|
1219
|
+
if (g != -1) {
|
|
1220
1220
|
let x = new CustomEvent(v, {
|
|
1221
|
-
detail: { bitIndex:
|
|
1221
|
+
detail: { bitIndex: g, position: p, nativeEvent: s }
|
|
1222
1222
|
});
|
|
1223
1223
|
this.dispatchEvent(x);
|
|
1224
1224
|
}
|
|
@@ -1229,7 +1229,7 @@ let te = class extends Gi {
|
|
|
1229
1229
|
this.onResize(), super.connectedCallback(), this.registerDisposable(this.resizeObserver), this.resizeObserver.observe(this);
|
|
1230
1230
|
}
|
|
1231
1231
|
updated(i) {
|
|
1232
|
-
i.has("arrayBuffer") && this.arrayBuffer && (this._bitArray = new
|
|
1232
|
+
i.has("arrayBuffer") && this.arrayBuffer && (this._bitArray = new Sn(this.arrayBuffer));
|
|
1233
1233
|
const r = ["arrayBuffer", "scale", "frameWidth", "width", "height"];
|
|
1234
1234
|
for (const o of r)
|
|
1235
1235
|
if (i.has(o)) {
|
|
@@ -1248,23 +1248,23 @@ let te = class extends Gi {
|
|
|
1248
1248
|
if (i <= 0)
|
|
1249
1249
|
return;
|
|
1250
1250
|
this.calculateViewport();
|
|
1251
|
-
const { width: o =
|
|
1251
|
+
const { width: o = vt.width, height: s = vt.height } = this, a = this.getPxPerBit(), t = this.refs.canvas.value.getContext("2d");
|
|
1252
1252
|
if (!t)
|
|
1253
1253
|
return;
|
|
1254
|
-
this.state.scale !=
|
|
1255
|
-
let
|
|
1256
|
-
t.fillStyle =
|
|
1257
|
-
let
|
|
1254
|
+
this.state.scale != a && (t.reset(), t.scale(a, a));
|
|
1255
|
+
let p = getComputedStyle(this);
|
|
1256
|
+
t.fillStyle = p.color, t.clearRect(0, 0, o, s);
|
|
1257
|
+
let g = 0;
|
|
1258
1258
|
for (let v = this.yStart * i + this.xStart, x = r.length; v < x; v++) {
|
|
1259
1259
|
let A = v % i - this.xStart;
|
|
1260
1260
|
if (!(A < 0)) {
|
|
1261
|
-
if (Math.floor(A *
|
|
1262
|
-
|
|
1261
|
+
if (Math.floor(A * a) > o) {
|
|
1262
|
+
g++, v = g * i + this.yStart * i + this.xStart - 1;
|
|
1263
1263
|
continue;
|
|
1264
1264
|
}
|
|
1265
|
-
if (Math.floor(
|
|
1265
|
+
if (Math.floor(g * a) > s)
|
|
1266
1266
|
break;
|
|
1267
|
-
r.getBit(v) === 1 && t.fillRect(A,
|
|
1267
|
+
r.getBit(v) === 1 && t.fillRect(A, g, 1, 1), (v + 1) % i === 0 && v >= i - 1 && g++;
|
|
1268
1268
|
}
|
|
1269
1269
|
}
|
|
1270
1270
|
}
|
|
@@ -1275,34 +1275,34 @@ let te = class extends Gi {
|
|
|
1275
1275
|
const { frameWidth: i, _bitArray: r } = this;
|
|
1276
1276
|
if (this.refs.scrollDiv.value) {
|
|
1277
1277
|
var o = this.getPxPerBit();
|
|
1278
|
-
const s = r.length / i * o,
|
|
1279
|
-
t.style.width =
|
|
1278
|
+
const s = r.length / i * o, a = i * o, t = this.refs.scrollDiv.value;
|
|
1279
|
+
t.style.width = a + "px", t.style.height = s + "px";
|
|
1280
1280
|
}
|
|
1281
1281
|
}
|
|
1282
1282
|
render() {
|
|
1283
|
-
const { height: i =
|
|
1283
|
+
const { height: i = vt.height, width: r = vt.width } = this;
|
|
1284
1284
|
return _`
|
|
1285
1285
|
<div
|
|
1286
1286
|
id="viewport"
|
|
1287
|
-
${
|
|
1287
|
+
${_t(this.refs.viewport)}
|
|
1288
1288
|
@scroll=${this.handleScroll}
|
|
1289
1289
|
style=${`width:${r}px;height:${i}px;overflow:auto;position:relative`}
|
|
1290
1290
|
>
|
|
1291
1291
|
<div
|
|
1292
1292
|
id="fakescrolldiv"
|
|
1293
|
-
${
|
|
1293
|
+
${_t(this.refs.scrollDiv)}
|
|
1294
1294
|
>
|
|
1295
1295
|
</div>
|
|
1296
1296
|
</div>
|
|
1297
1297
|
<canvas
|
|
1298
|
-
${
|
|
1299
|
-
width=${r -
|
|
1300
|
-
height=${i -
|
|
1298
|
+
${_t(this.refs.canvas)}
|
|
1299
|
+
width=${r - kt.width}
|
|
1300
|
+
height=${i - kt.height}
|
|
1301
1301
|
></canvas>
|
|
1302
1302
|
`;
|
|
1303
1303
|
}
|
|
1304
1304
|
};
|
|
1305
|
-
|
|
1305
|
+
re.styles = W`
|
|
1306
1306
|
:host{
|
|
1307
1307
|
position: relative;
|
|
1308
1308
|
--border-radius: var(--spectric-border-radius,4em);
|
|
@@ -1326,8 +1326,8 @@ te.styles = q`
|
|
|
1326
1326
|
background-color:var(--background-color);
|
|
1327
1327
|
}
|
|
1328
1328
|
::-webkit-scrollbar {
|
|
1329
|
-
height: ${
|
|
1330
|
-
width: ${
|
|
1329
|
+
height: ${kt.height}px;
|
|
1330
|
+
width: ${kt.width}px;
|
|
1331
1331
|
|
|
1332
1332
|
}
|
|
1333
1333
|
|
|
@@ -1399,28 +1399,28 @@ te.styles = q`
|
|
|
1399
1399
|
}
|
|
1400
1400
|
|
|
1401
1401
|
`;
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
],
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
],
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
],
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
],
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
],
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
],
|
|
1420
|
-
|
|
1402
|
+
we([
|
|
1403
|
+
b({ type: Object, attribute: !1 })
|
|
1404
|
+
], re.prototype, "arrayBuffer", 2);
|
|
1405
|
+
we([
|
|
1406
|
+
b({ type: Number })
|
|
1407
|
+
], re.prototype, "frameWidth", 2);
|
|
1408
|
+
we([
|
|
1409
|
+
b({ type: Number })
|
|
1410
|
+
], re.prototype, "scale", 2);
|
|
1411
|
+
we([
|
|
1412
|
+
b({ type: Number })
|
|
1413
|
+
], re.prototype, "width", 2);
|
|
1414
|
+
we([
|
|
1415
|
+
b({ type: Number })
|
|
1416
|
+
], re.prototype, "height", 2);
|
|
1417
|
+
we([
|
|
1418
|
+
Tt("canvas")
|
|
1419
|
+
], re.prototype, "_canvas", 2);
|
|
1420
|
+
re = we([
|
|
1421
1421
|
L("spectric-bit-display")
|
|
1422
|
-
],
|
|
1423
|
-
const
|
|
1422
|
+
], re);
|
|
1423
|
+
const On = W`.spectric-header {
|
|
1424
1424
|
display: flex;
|
|
1425
1425
|
justify-content: space-between;
|
|
1426
1426
|
align-items: center;
|
|
@@ -1456,12 +1456,12 @@ const Cn = q`.spectric-header {
|
|
|
1456
1456
|
font-size: 14px;
|
|
1457
1457
|
}
|
|
1458
1458
|
`;
|
|
1459
|
-
var
|
|
1460
|
-
for (var
|
|
1461
|
-
(
|
|
1462
|
-
return s &&
|
|
1459
|
+
var Pn = Object.defineProperty, Tn = Object.getOwnPropertyDescriptor, Lt = (i, r, o, s) => {
|
|
1460
|
+
for (var a = s > 1 ? void 0 : s ? Tn(r, o) : r, t = i.length - 1, p; t >= 0; t--)
|
|
1461
|
+
(p = i[t]) && (a = (s ? p(r, o, a) : p(a)) || a);
|
|
1462
|
+
return s && a && Pn(r, o, a), a;
|
|
1463
1463
|
};
|
|
1464
|
-
let
|
|
1464
|
+
let je = class extends O {
|
|
1465
1465
|
constructor() {
|
|
1466
1466
|
super(...arguments), this.showCreateAccount = !1, this.showLoginButton = !1, this.username = "", this.onLogout = () => {
|
|
1467
1467
|
const i = {
|
|
@@ -1506,32 +1506,32 @@ let Le = class extends O {
|
|
|
1506
1506
|
`;
|
|
1507
1507
|
}
|
|
1508
1508
|
};
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
],
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
],
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
],
|
|
1519
|
-
|
|
1509
|
+
je.styles = On;
|
|
1510
|
+
Lt([
|
|
1511
|
+
b({ type: Boolean, reflect: !0 })
|
|
1512
|
+
], je.prototype, "showCreateAccount", 2);
|
|
1513
|
+
Lt([
|
|
1514
|
+
b({ type: Boolean, reflect: !0 })
|
|
1515
|
+
], je.prototype, "showLoginButton", 2);
|
|
1516
|
+
Lt([
|
|
1517
|
+
b({ type: String, reflect: !0 })
|
|
1518
|
+
], je.prototype, "username", 2);
|
|
1519
|
+
je = Lt([
|
|
1520
1520
|
L("spectric-header")
|
|
1521
|
-
],
|
|
1522
|
-
var
|
|
1523
|
-
for (var
|
|
1524
|
-
(
|
|
1525
|
-
return s &&
|
|
1521
|
+
], je);
|
|
1522
|
+
var Ln = Object.defineProperty, Nn = Object.getOwnPropertyDescriptor, Be = (i, r, o, s) => {
|
|
1523
|
+
for (var a = s > 1 ? void 0 : s ? Nn(r, o) : r, t = i.length - 1, p; t >= 0; t--)
|
|
1524
|
+
(p = i[t]) && (a = (s ? p(r, o, a) : p(a)) || a);
|
|
1525
|
+
return s && a && Ln(r, o, a), a;
|
|
1526
1526
|
};
|
|
1527
|
-
const
|
|
1527
|
+
const Dn = {
|
|
1528
1528
|
display: "flex",
|
|
1529
1529
|
alignItems: "center",
|
|
1530
1530
|
backgroundColor: "black",
|
|
1531
1531
|
color: "white",
|
|
1532
1532
|
textAlign: "center"
|
|
1533
1533
|
};
|
|
1534
|
-
let
|
|
1534
|
+
let ye = class extends O {
|
|
1535
1535
|
constructor() {
|
|
1536
1536
|
super(...arguments), this.dismissable = !1, this.text = "", this.bannerId = "", this.headerStyle = {}, this._dismissed = !1, this.onDismiss = (i) => {
|
|
1537
1537
|
i.preventDefault(), i.stopPropagation();
|
|
@@ -1540,9 +1540,9 @@ let ve = class extends O {
|
|
|
1540
1540
|
composed: !0
|
|
1541
1541
|
};
|
|
1542
1542
|
this._dismissed = !0;
|
|
1543
|
-
let { bannerId: o, text: s, headerStyle:
|
|
1543
|
+
let { bannerId: o, text: s, headerStyle: a, dismissable: t } = this;
|
|
1544
1544
|
this.dispatchEvent(new CustomEvent("bannerDismissed", {
|
|
1545
|
-
detail: { bannerId: o, text: s, headerStyle:
|
|
1545
|
+
detail: { bannerId: o, text: s, headerStyle: a, dismissable: t },
|
|
1546
1546
|
...r
|
|
1547
1547
|
}));
|
|
1548
1548
|
};
|
|
@@ -1550,32 +1550,32 @@ let ve = class extends O {
|
|
|
1550
1550
|
render() {
|
|
1551
1551
|
if (!this._dismissed)
|
|
1552
1552
|
return _`
|
|
1553
|
-
<header style=${
|
|
1553
|
+
<header style=${Vi({ ...Dn, ...this.headerStyle })}>
|
|
1554
1554
|
<div style="flex-grow:1"><slot name="text">${this.text}</slot><slot></slot></div>
|
|
1555
1555
|
${this.dismissable ? _`<spectric-button size="small" @click=${this.onDismiss}>X</spectric-button>` : null}
|
|
1556
1556
|
</header>
|
|
1557
1557
|
`;
|
|
1558
1558
|
}
|
|
1559
1559
|
};
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
],
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
],
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
],
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
],
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
],
|
|
1575
|
-
|
|
1560
|
+
Be([
|
|
1561
|
+
b({ type: Boolean, reflect: !0 })
|
|
1562
|
+
], ye.prototype, "dismissable", 2);
|
|
1563
|
+
Be([
|
|
1564
|
+
b({ type: String, reflect: !0 })
|
|
1565
|
+
], ye.prototype, "text", 2);
|
|
1566
|
+
Be([
|
|
1567
|
+
b({ type: String, reflect: !0 })
|
|
1568
|
+
], ye.prototype, "bannerId", 2);
|
|
1569
|
+
Be([
|
|
1570
|
+
b({ type: Object })
|
|
1571
|
+
], ye.prototype, "headerStyle", 2);
|
|
1572
|
+
Be([
|
|
1573
|
+
b({ state: !0, type: Boolean, attribute: !1 })
|
|
1574
|
+
], ye.prototype, "_dismissed", 2);
|
|
1575
|
+
ye = Be([
|
|
1576
1576
|
L("spectric-banner")
|
|
1577
|
-
],
|
|
1578
|
-
const
|
|
1577
|
+
], ye);
|
|
1578
|
+
const jn = W`
|
|
1579
1579
|
|
|
1580
1580
|
:host {
|
|
1581
1581
|
height:100vh;
|
|
@@ -1737,8 +1737,8 @@ article{
|
|
|
1737
1737
|
* Copyright 2018 Google LLC
|
|
1738
1738
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1739
1739
|
*/
|
|
1740
|
-
const
|
|
1741
|
-
class
|
|
1740
|
+
const ir = (i) => i ?? C;
|
|
1741
|
+
class zn extends Ji {
|
|
1742
1742
|
constructor() {
|
|
1743
1743
|
super(...arguments), this.prevData = {};
|
|
1744
1744
|
}
|
|
@@ -1751,22 +1751,22 @@ class Dn extends Xi {
|
|
|
1751
1751
|
}
|
|
1752
1752
|
apply(r) {
|
|
1753
1753
|
if (!r) return;
|
|
1754
|
-
const {
|
|
1755
|
-
for (const
|
|
1756
|
-
const
|
|
1757
|
-
|
|
1754
|
+
const { element: o } = this;
|
|
1755
|
+
for (const s in r) {
|
|
1756
|
+
const a = r[s];
|
|
1757
|
+
o[s] !== a && (o[s] = a);
|
|
1758
1758
|
}
|
|
1759
1759
|
}
|
|
1760
1760
|
groom(r) {
|
|
1761
1761
|
const { prevData: o, element: s } = this;
|
|
1762
1762
|
if (o)
|
|
1763
|
-
for (const
|
|
1764
|
-
(!r || !(
|
|
1763
|
+
for (const a in o)
|
|
1764
|
+
(!r || !(a in r) && s[a] === o[a]) && (s[a] = void 0);
|
|
1765
1765
|
}
|
|
1766
1766
|
}
|
|
1767
|
-
const
|
|
1768
|
-
var
|
|
1769
|
-
const
|
|
1767
|
+
const wt = hr(zn);
|
|
1768
|
+
var sr = /* @__PURE__ */ ((i) => (i.None = "none", i.Uscui = "us.cui", i.Usclassified = "us.classified", i.Usunclassified = "us.unclassified", i.Usconfidential = "us.confidential", i.Ussecret = "us.secret", i.Ustopsecret = "us.topsecret", i.UstopsecretSi = "us.topsecret.si", i.Uknotset = "uk.notset", i.Ukofficial = "uk.official", i.Uksecret = "uk.secret", i.Uktopsecret = "uk.topsecret", i.Caprotected_a = "ca.protected_a", i.Caprotected_b = "ca.protected_b", i.Caprotected_c = "ca.protected_c", i.Caconfidential = "ca.confidential", i.Casecret = "ca.secret", i.Catopsecret = "ca.topsecret", i.Auunofficial = "au.unofficial", i.Auofficial = "au.official", i.Auofficialsensitive = "au.officialsensitive", i.Auconfidential = "au.confidential", i.Ausecret = "au.secret", i.Autopsecret = "au.topsecret", i))(sr || {});
|
|
1769
|
+
const mt = {
|
|
1770
1770
|
none: {},
|
|
1771
1771
|
//US Department of Defense spec CFR-2002-title31-vol1-sec2-7
|
|
1772
1772
|
"us.cui": {
|
|
@@ -1886,21 +1886,21 @@ const bt = {
|
|
|
1886
1886
|
content: "Top Secret"
|
|
1887
1887
|
}
|
|
1888
1888
|
};
|
|
1889
|
-
var
|
|
1890
|
-
for (var
|
|
1891
|
-
(
|
|
1892
|
-
return s &&
|
|
1889
|
+
var Rn = Object.defineProperty, Bn = Object.getOwnPropertyDescriptor, J = (i, r, o, s) => {
|
|
1890
|
+
for (var a = s > 1 ? void 0 : s ? Bn(r, o) : r, t = i.length - 1, p; t >= 0; t--)
|
|
1891
|
+
(p = i[t]) && (a = (s ? p(r, o, a) : p(a)) || a);
|
|
1892
|
+
return s && a && Rn(r, o, a), a;
|
|
1893
1893
|
};
|
|
1894
|
-
let
|
|
1894
|
+
let U = class extends O {
|
|
1895
1895
|
constructor() {
|
|
1896
|
-
super(...arguments), this.showHeader = !0, this.headerSticky = !0, this.classificationLevel =
|
|
1896
|
+
super(...arguments), this.showHeader = !0, this.headerSticky = !0, this.classificationLevel = sr.None, this.classificationText = "", this.notifications = [], this.showCreateAccount = !1, this.showLoginButton = !0, this.username = "";
|
|
1897
1897
|
}
|
|
1898
1898
|
// protected createRenderRoot(): HTMLElement | DocumentFragment {
|
|
1899
1899
|
// return this
|
|
1900
1900
|
// }
|
|
1901
1901
|
render() {
|
|
1902
|
-
this.classificationLevel && !
|
|
1903
|
-
const i = this.classificationLevel ? this.classificationText ||
|
|
1902
|
+
this.classificationLevel && !mt[this.classificationLevel] && (console.warn("Unknown classification", this.classificationLevel), this.classificationLevel = sr.None);
|
|
1903
|
+
const i = this.classificationLevel ? this.classificationText || mt[this.classificationLevel].content : "", r = this.showHeader ? _`<spectric-header ?showCreateAccount=${this.showCreateAccount} .showLoginButton=${this.showLoginButton} username=${ir(this.username)}>
|
|
1904
1904
|
<slot name="branding" slot="branding"></slot>
|
|
1905
1905
|
<slot name="name" slot="name"></slot>
|
|
1906
1906
|
<slot name="center" slot="center"></slot>
|
|
@@ -1909,10 +1909,10 @@ let M = class extends O {
|
|
|
1909
1909
|
return _`
|
|
1910
1910
|
${this.classificationLevel && i ? _`
|
|
1911
1911
|
<!-- Classification Banner -->
|
|
1912
|
-
<spectric-banner ${
|
|
1912
|
+
<spectric-banner ${wt({ text: i, headerStyle: mt[this.classificationLevel] })}></spectric-banner>
|
|
1913
1913
|
` : null}
|
|
1914
|
-
<spectric-theme theme=${
|
|
1915
|
-
${this.notifications ? this.notifications.map((o) => _`<spectric-banner ${
|
|
1914
|
+
<spectric-theme theme=${ir(this.theme)}>
|
|
1915
|
+
${this.notifications ? this.notifications.map((o) => _`<spectric-banner ${wt(o)} ></spectric-banner>`) : null}
|
|
1916
1916
|
${this.headerSticky ? r : null}
|
|
1917
1917
|
<article>
|
|
1918
1918
|
${this.headerSticky ? null : r}
|
|
@@ -1922,47 +1922,47 @@ let M = class extends O {
|
|
|
1922
1922
|
</section>
|
|
1923
1923
|
</article>
|
|
1924
1924
|
</spectric-theme>
|
|
1925
|
-
${this.classificationLevel && i ? _`<spectric-banner ${
|
|
1925
|
+
${this.classificationLevel && i ? _`<spectric-banner ${wt({ text: i, headerStyle: mt[this.classificationLevel] })}></spectric-banner>` : null}
|
|
1926
1926
|
|
|
1927
1927
|
`;
|
|
1928
1928
|
}
|
|
1929
1929
|
};
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
],
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
],
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
],
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
],
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
],
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
],
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
],
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
],
|
|
1955
|
-
|
|
1956
|
-
|
|
1957
|
-
],
|
|
1958
|
-
|
|
1930
|
+
U.styles = jn;
|
|
1931
|
+
J([
|
|
1932
|
+
b({ type: Boolean, reflect: !0 })
|
|
1933
|
+
], U.prototype, "showHeader", 2);
|
|
1934
|
+
J([
|
|
1935
|
+
b({ type: Boolean, reflect: !0 })
|
|
1936
|
+
], U.prototype, "headerSticky", 2);
|
|
1937
|
+
J([
|
|
1938
|
+
b({ type: String, reflect: !0 })
|
|
1939
|
+
], U.prototype, "classificationLevel", 2);
|
|
1940
|
+
J([
|
|
1941
|
+
b({ type: String, reflect: !0 })
|
|
1942
|
+
], U.prototype, "classificationText", 2);
|
|
1943
|
+
J([
|
|
1944
|
+
b({ type: Array, reflect: !0 })
|
|
1945
|
+
], U.prototype, "notifications", 2);
|
|
1946
|
+
J([
|
|
1947
|
+
b({ type: Boolean, reflect: !0 })
|
|
1948
|
+
], U.prototype, "showCreateAccount", 2);
|
|
1949
|
+
J([
|
|
1950
|
+
b({ type: Boolean, reflect: !0 })
|
|
1951
|
+
], U.prototype, "showLoginButton", 2);
|
|
1952
|
+
J([
|
|
1953
|
+
b({ type: String, reflect: !0 })
|
|
1954
|
+
], U.prototype, "username", 2);
|
|
1955
|
+
J([
|
|
1956
|
+
b({ type: String, reflect: !0 })
|
|
1957
|
+
], U.prototype, "theme", 2);
|
|
1958
|
+
U = J([
|
|
1959
1959
|
L("spectric-page")
|
|
1960
|
-
],
|
|
1961
|
-
var
|
|
1962
|
-
for (var
|
|
1963
|
-
(
|
|
1964
|
-
return s &&
|
|
1965
|
-
},
|
|
1960
|
+
], U);
|
|
1961
|
+
var Mn = Object.defineProperty, Un = Object.getOwnPropertyDescriptor, P = (i, r, o, s) => {
|
|
1962
|
+
for (var a = s > 1 ? void 0 : s ? Un(r, o) : r, t = i.length - 1, p; t >= 0; t--)
|
|
1963
|
+
(p = i[t]) && (a = (s ? p(r, o, a) : p(a)) || a);
|
|
1964
|
+
return s && a && Mn(r, o, a), a;
|
|
1965
|
+
}, Fn = /* @__PURE__ */ ((i) => (i.Text = "text", i.TextArea = "text-area", i.number = "number", i.color = "color", i.date = "date", i.datetime = "datetime-local", i.email = "email", i.file = "file", i.hidden = "hidden", i.password = "password", i.checkbox = "checkbox", i))(Fn || {});
|
|
1966
1966
|
let E = class extends O {
|
|
1967
1967
|
constructor() {
|
|
1968
1968
|
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: i }) => {
|
|
@@ -2019,18 +2019,18 @@ let E = class extends O {
|
|
|
2019
2019
|
?disabled="${this.disabled}"
|
|
2020
2020
|
aria-describedby="helper-text"
|
|
2021
2021
|
id="input"
|
|
2022
|
-
name="${
|
|
2023
|
-
pattern="${
|
|
2024
|
-
placeholder="${
|
|
2025
|
-
autocomplete="${
|
|
2022
|
+
name="${Pe(this.name)}"
|
|
2023
|
+
pattern="${Pe(this.pattern)}"
|
|
2024
|
+
placeholder="${Pe(this.placeholder)}"
|
|
2025
|
+
autocomplete="${Pe(this.autocomplete)}"
|
|
2026
2026
|
?readonly="${this.readonly}"
|
|
2027
2027
|
?required="${this.required}"
|
|
2028
|
-
type="${
|
|
2028
|
+
type="${Pe(
|
|
2029
2029
|
this.variant !== "password" ? this.variant : this._showPassword ? "text" : "password"
|
|
2030
2030
|
/* password */
|
|
2031
2031
|
)}"
|
|
2032
2032
|
.value="${this._value}"
|
|
2033
|
-
maxlength="${
|
|
2033
|
+
maxlength="${Pe(this.maxCount > 0 ? this.maxCount : void 0)}"
|
|
2034
2034
|
@input="${this._handleInput}"
|
|
2035
2035
|
@change=${() => {
|
|
2036
2036
|
this.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
@@ -2062,7 +2062,7 @@ let E = class extends O {
|
|
|
2062
2062
|
return _`
|
|
2063
2063
|
<div class="checkbox">
|
|
2064
2064
|
<spectric-button @click=${() => {
|
|
2065
|
-
this.checked = !this.checked, this.value = !!this.checked,
|
|
2065
|
+
this.checked = !this.checked, this.value = !!this.checked, this.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
2066
2066
|
}} icon size=${this.size || "xxsmall"} variant=${this.checked ? "primary" : "secondary"}>${this.checked ? "✓" : " "}</spectric-button>
|
|
2067
2067
|
${this.invalid || this.helperText ? _`<spectric-tooltip text=${this.invalid || this.helperText}></spectric-tooltip>` : null}
|
|
2068
2068
|
${this.label}
|
|
@@ -2074,160 +2074,160 @@ let E = class extends O {
|
|
|
2074
2074
|
}
|
|
2075
2075
|
};
|
|
2076
2076
|
P([
|
|
2077
|
-
|
|
2077
|
+
b({ type: Boolean, reflect: !0 })
|
|
2078
2078
|
], E.prototype, "checked", 2);
|
|
2079
2079
|
P([
|
|
2080
|
-
|
|
2080
|
+
b({ type: String, reflect: !0 })
|
|
2081
2081
|
], E.prototype, "placeholder", 2);
|
|
2082
2082
|
P([
|
|
2083
|
-
|
|
2083
|
+
b({ type: Boolean, reflect: !0 })
|
|
2084
2084
|
], E.prototype, "readonly", 2);
|
|
2085
2085
|
P([
|
|
2086
|
-
|
|
2086
|
+
b({ type: String, reflect: !0 })
|
|
2087
2087
|
], E.prototype, "variant", 2);
|
|
2088
2088
|
P([
|
|
2089
|
-
|
|
2089
|
+
b({ type: Boolean, reflect: !0 })
|
|
2090
2090
|
], E.prototype, "disabled", 2);
|
|
2091
2091
|
P([
|
|
2092
|
-
|
|
2092
|
+
b({ type: String, reflect: !0 })
|
|
2093
2093
|
], E.prototype, "label", 2);
|
|
2094
2094
|
P([
|
|
2095
|
-
|
|
2095
|
+
b()
|
|
2096
2096
|
], E.prototype, "hidePasswordLabel", 2);
|
|
2097
2097
|
P([
|
|
2098
|
-
|
|
2098
|
+
b()
|
|
2099
2099
|
], E.prototype, "showPasswordLabel", 2);
|
|
2100
2100
|
P([
|
|
2101
|
-
|
|
2101
|
+
b({
|
|
2102
2102
|
type: Boolean,
|
|
2103
2103
|
reflect: !0
|
|
2104
2104
|
})
|
|
2105
2105
|
], E.prototype, "showPasswordVisibilityToggle", 2);
|
|
2106
2106
|
P([
|
|
2107
|
-
|
|
2107
|
+
b({ type: String, reflect: !0 })
|
|
2108
2108
|
], E.prototype, "helperText", 2);
|
|
2109
2109
|
P([
|
|
2110
|
-
|
|
2110
|
+
b({ type: Boolean, reflect: !0 })
|
|
2111
2111
|
], E.prototype, "invalid", 2);
|
|
2112
2112
|
P([
|
|
2113
|
-
|
|
2113
|
+
b({ type: Boolean, reflect: !0 })
|
|
2114
2114
|
], E.prototype, "required", 2);
|
|
2115
2115
|
P([
|
|
2116
|
-
|
|
2116
|
+
b({ type: String, reflect: !0 })
|
|
2117
2117
|
], E.prototype, "invalidText", 2);
|
|
2118
2118
|
P([
|
|
2119
|
-
|
|
2119
|
+
b()
|
|
2120
2120
|
], E.prototype, "name", 2);
|
|
2121
2121
|
P([
|
|
2122
|
-
|
|
2122
|
+
b()
|
|
2123
2123
|
], E.prototype, "pattern", 2);
|
|
2124
2124
|
P([
|
|
2125
|
-
|
|
2125
|
+
b({ type: Number, reflect: !0 })
|
|
2126
2126
|
], E.prototype, "maxCount", 2);
|
|
2127
2127
|
P([
|
|
2128
|
-
|
|
2128
|
+
b({ reflect: !0 })
|
|
2129
2129
|
], E.prototype, "autocomplete", 2);
|
|
2130
2130
|
P([
|
|
2131
|
-
|
|
2131
|
+
b({ reflect: !0 })
|
|
2132
2132
|
], E.prototype, "value", 1);
|
|
2133
2133
|
P([
|
|
2134
|
-
|
|
2134
|
+
Re("input")
|
|
2135
2135
|
], E.prototype, "_input", 2);
|
|
2136
2136
|
E = P([
|
|
2137
2137
|
L("spectric-input")
|
|
2138
2138
|
], E);
|
|
2139
|
-
const
|
|
2139
|
+
const Pe = (i) => ir(i === "" ? void 0 : i ?? void 0), In = "end of input", Qn = {
|
|
2140
2140
|
fieldName: "field name",
|
|
2141
2141
|
value: "value",
|
|
2142
2142
|
literal: "literal",
|
|
2143
2143
|
whitespace: "whitespace"
|
|
2144
2144
|
};
|
|
2145
|
-
class
|
|
2145
|
+
class rs extends Error {
|
|
2146
2146
|
constructor(r, o) {
|
|
2147
2147
|
let s = r.message;
|
|
2148
2148
|
if (r.expected) {
|
|
2149
|
-
const
|
|
2150
|
-
let
|
|
2151
|
-
s = `Expected ${
|
|
2149
|
+
const p = r.expected.map((v) => Qn[v.description] || v.description).join(", ");
|
|
2150
|
+
let g = r.found ? `"${r.found}"` : In;
|
|
2151
|
+
s = `Expected ${p} but ${g} found.`;
|
|
2152
2152
|
}
|
|
2153
|
-
const
|
|
2153
|
+
const a = [s, o, "-".repeat(r.location.start.offset) + "^"].join(
|
|
2154
2154
|
`
|
|
2155
2155
|
`
|
|
2156
2156
|
);
|
|
2157
|
-
super(
|
|
2157
|
+
super(a), this.name = "DQLSyntaxError", this.shortMessage = s;
|
|
2158
2158
|
}
|
|
2159
2159
|
}
|
|
2160
|
-
function
|
|
2160
|
+
function Le(i) {
|
|
2161
2161
|
return {
|
|
2162
2162
|
type: "literal",
|
|
2163
2163
|
value: i
|
|
2164
2164
|
};
|
|
2165
2165
|
}
|
|
2166
|
-
function
|
|
2166
|
+
function fr(i) {
|
|
2167
2167
|
return i.value;
|
|
2168
2168
|
}
|
|
2169
|
-
const
|
|
2169
|
+
const Hn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2170
2170
|
__proto__: null,
|
|
2171
|
-
buildNode:
|
|
2172
|
-
toOpenSearchQuery:
|
|
2171
|
+
buildNode: Le,
|
|
2172
|
+
toOpenSearchQuery: fr
|
|
2173
2173
|
}, Symbol.toStringTag, { value: "Module" })), {
|
|
2174
|
-
SyntaxError:
|
|
2175
|
-
parse:
|
|
2174
|
+
SyntaxError: Ic,
|
|
2175
|
+
parse: Nt
|
|
2176
2176
|
} = function() {
|
|
2177
|
-
function i(s,
|
|
2177
|
+
function i(s, a) {
|
|
2178
2178
|
function t() {
|
|
2179
2179
|
this.constructor = s;
|
|
2180
2180
|
}
|
|
2181
|
-
t.prototype =
|
|
2181
|
+
t.prototype = a.prototype, s.prototype = new t();
|
|
2182
2182
|
}
|
|
2183
|
-
function r(s,
|
|
2184
|
-
this.message = s, this.expected =
|
|
2183
|
+
function r(s, a, t, p) {
|
|
2184
|
+
this.message = s, this.expected = a, this.found = t, this.location = p, this.name = "SyntaxError", typeof Error.captureStackTrace == "function" && Error.captureStackTrace(this, r);
|
|
2185
2185
|
}
|
|
2186
2186
|
i(r, Error);
|
|
2187
2187
|
function o(s) {
|
|
2188
|
-
var
|
|
2188
|
+
var a = arguments.length > 1 ? arguments[1] : {}, t = {}, p = { start: ci, Literal: Zt }, g = ci, v = function(e, n) {
|
|
2189
2189
|
return n.type === "cursor" ? {
|
|
2190
2190
|
...n,
|
|
2191
2191
|
suggestionTypes: ["conjunction"]
|
|
2192
|
-
} : e !== null ? e :
|
|
2192
|
+
} : e !== null ? e : fe.function.buildNode("is", "*", "*");
|
|
2193
2193
|
}, x = function() {
|
|
2194
|
-
return
|
|
2194
|
+
return Mo;
|
|
2195
2195
|
}, A = function(e, n) {
|
|
2196
|
-
const l = [e, n].find((
|
|
2197
|
-
return l ||
|
|
2196
|
+
const l = [e, n].find((u) => u.type === "cursor");
|
|
2197
|
+
return l || V("or", [e, n]);
|
|
2198
2198
|
}, w = function(e, n) {
|
|
2199
|
-
const l = [e, n].find((
|
|
2200
|
-
return l ||
|
|
2199
|
+
const l = [e, n].find((u) => u.type === "cursor");
|
|
2200
|
+
return l || V("and", [e, n]);
|
|
2201
2201
|
}, S = function(e) {
|
|
2202
|
-
return e.type === "cursor" ? e :
|
|
2203
|
-
}, k = "(", z = { type: "literal", value: "(", description: '"("' },
|
|
2202
|
+
return e.type === "cursor" ? e : V("not", [e]);
|
|
2203
|
+
}, k = "(", z = { type: "literal", value: "(", description: '"("' }, it = ")", se = { type: "literal", value: ")", description: '")"' }, Y = function(e, n) {
|
|
2204
2204
|
return n.type === "cursor" ? {
|
|
2205
2205
|
...n,
|
|
2206
2206
|
suggestionTypes: ["conjunction"]
|
|
2207
2207
|
} : e;
|
|
2208
|
-
},
|
|
2208
|
+
}, K = ":", R = { type: "literal", value: ":", description: '":"' }, Ae = "{", jt = { type: "literal", value: "{", description: '"{"' }, zt = "}", Rt = { type: "literal", value: "}", description: '"}"' }, us = function(e, n, l) {
|
|
2209
2209
|
return n.type === "cursor" ? {
|
|
2210
2210
|
...n,
|
|
2211
2211
|
nestedPath: n.nestedPath ? `${e.value}.${n.nestedPath}` : e.value
|
|
2212
2212
|
} : l.type === "cursor" ? {
|
|
2213
2213
|
...l,
|
|
2214
2214
|
suggestionTypes: ["conjunction"]
|
|
2215
|
-
} :
|
|
2216
|
-
},
|
|
2215
|
+
} : V("nested", [e, n]);
|
|
2216
|
+
}, ds = { type: "other", description: "fieldName" }, hs = function(e, n, l) {
|
|
2217
2217
|
if (l.type === "cursor")
|
|
2218
2218
|
return {
|
|
2219
2219
|
...l,
|
|
2220
2220
|
suggestionTypes: ["conjunction"]
|
|
2221
2221
|
};
|
|
2222
|
-
const
|
|
2223
|
-
return
|
|
2224
|
-
},
|
|
2222
|
+
const u = Ho(n, l);
|
|
2223
|
+
return V("range", [e, u]);
|
|
2224
|
+
}, fs = function(e, n) {
|
|
2225
2225
|
return n.type === "cursor" ? {
|
|
2226
2226
|
...n,
|
|
2227
2227
|
fieldName: e.value,
|
|
2228
2228
|
suggestionTypes: ["value", "conjunction"]
|
|
2229
2229
|
} : n(e);
|
|
2230
|
-
},
|
|
2230
|
+
}, gs = function(e) {
|
|
2231
2231
|
if (e.type === "cursor") {
|
|
2232
2232
|
const l = `${e.prefix}${e.suffix}`.trim();
|
|
2233
2233
|
return {
|
|
@@ -2236,140 +2236,140 @@ const In = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2236
2236
|
suggestionTypes: ["field", "operator", "conjunction"]
|
|
2237
2237
|
};
|
|
2238
2238
|
}
|
|
2239
|
-
const n =
|
|
2239
|
+
const n = oe(null);
|
|
2240
2240
|
return e(n);
|
|
2241
|
-
},
|
|
2241
|
+
}, bs = function(e, n) {
|
|
2242
2242
|
return n.type === "cursor" ? {
|
|
2243
2243
|
...n,
|
|
2244
2244
|
suggestionTypes: ["conjunction"]
|
|
2245
2245
|
} : e;
|
|
2246
|
-
},
|
|
2247
|
-
const l = [e, n].find((
|
|
2246
|
+
}, vs = function(e, n) {
|
|
2247
|
+
const l = [e, n].find((u) => u.type === "cursor");
|
|
2248
2248
|
return l ? {
|
|
2249
2249
|
...l,
|
|
2250
2250
|
suggestionTypes: ["value"]
|
|
2251
|
-
} : (
|
|
2252
|
-
},
|
|
2253
|
-
const l = [e, n].find((
|
|
2251
|
+
} : (u) => V("or", [e(u), n(u)]);
|
|
2252
|
+
}, ms = function(e, n) {
|
|
2253
|
+
const l = [e, n].find((u) => u.type === "cursor");
|
|
2254
2254
|
return l ? {
|
|
2255
2255
|
...l,
|
|
2256
2256
|
suggestionTypes: ["value"]
|
|
2257
|
-
} : (
|
|
2258
|
-
},
|
|
2257
|
+
} : (u) => V("and", [e(u), n(u)]);
|
|
2258
|
+
}, ys = function(e) {
|
|
2259
2259
|
return e.type === "cursor" ? {
|
|
2260
2260
|
...list,
|
|
2261
2261
|
suggestionTypes: ["value"]
|
|
2262
|
-
} : (n) =>
|
|
2263
|
-
},
|
|
2262
|
+
} : (n) => V("not", [e(n)]);
|
|
2263
|
+
}, $s = { type: "other", description: "value" }, _s = function(e) {
|
|
2264
2264
|
if (e.type === "cursor") return e;
|
|
2265
|
-
const n =
|
|
2266
|
-
return (l) =>
|
|
2267
|
-
},
|
|
2265
|
+
const n = oe(!0);
|
|
2266
|
+
return (l) => V("is", [l, e, n]);
|
|
2267
|
+
}, ws = function(e) {
|
|
2268
2268
|
if (e.type === "cursor") return e;
|
|
2269
|
-
!
|
|
2270
|
-
const n =
|
|
2271
|
-
return (l) =>
|
|
2272
|
-
},
|
|
2273
|
-
const { start:
|
|
2269
|
+
!Io && e.type === "wildcard" && fe.wildcard.hasLeadingWildcard(e) && I("Leading wildcards are disabled. See query:allowLeadingWildcards in Advanced Settings.");
|
|
2270
|
+
const n = oe(!1);
|
|
2271
|
+
return (l) => V("is", [l, e, n]);
|
|
2272
|
+
}, xs = { type: "other", description: "OR" }, $r = "or", _r = { type: "literal", value: "or", description: '"or"' }, As = { type: "other", description: "AND" }, wr = "and", xr = { type: "literal", value: "and", description: '"and"' }, Ss = { type: "other", description: "NOT" }, Ar = "not", Sr = { type: "literal", value: "not", description: '"not"' }, ks = { type: "other", description: "literal" }, Ue = '"', Fe = { type: "literal", value: '"', description: '"\\""' }, Bt = function(e, n, l) {
|
|
2273
|
+
const { start: u, end: h } = vo();
|
|
2274
2274
|
return {
|
|
2275
2275
|
type: "cursor",
|
|
2276
|
-
start:
|
|
2276
|
+
start: u.offset,
|
|
2277
2277
|
end: h.offset - n.length,
|
|
2278
2278
|
prefix: e.join(""),
|
|
2279
2279
|
suffix: l.join(""),
|
|
2280
|
-
text:
|
|
2280
|
+
text: bo().replace(n, "")
|
|
2281
2281
|
};
|
|
2282
|
-
},
|
|
2283
|
-
return
|
|
2284
|
-
},
|
|
2282
|
+
}, Cs = function(e) {
|
|
2283
|
+
return oe(e.join(""));
|
|
2284
|
+
}, Ie = "\\", Qe = { type: "literal", value: "\\", description: '"\\\\"' }, Es = /^[\\"]/, Os = { type: "class", value: '[\\\\"]', description: '[\\\\"]' }, st = function(e) {
|
|
2285
2285
|
return e;
|
|
2286
|
-
},
|
|
2286
|
+
}, Ps = /^[^"]/, Ts = { type: "class", value: '[^"]', description: '[^"]' }, Ls = function(e) {
|
|
2287
2287
|
const n = e.join("").trim();
|
|
2288
|
-
return n === "null" ?
|
|
2288
|
+
return n === "null" ? oe(null) : n === "true" ? oe(!0) : n === "false" ? oe(!1) : e.includes(Ai) ? Qo(n) : oe(
|
|
2289
2289
|
/^(-?[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
|
|
2290
2290
|
);
|
|
2291
|
-
},
|
|
2292
|
-
return
|
|
2293
|
-
},
|
|
2291
|
+
}, kr = { type: "any", description: "any character" }, ot = "*", nt = { type: "literal", value: "*", description: '"*"' }, Ns = function() {
|
|
2292
|
+
return Ai;
|
|
2293
|
+
}, Cr = "\\t", Ds = { type: "literal", value: "\\t", description: '"\\\\t"' }, js = function() {
|
|
2294
2294
|
return " ";
|
|
2295
|
-
},
|
|
2295
|
+
}, Er = "\\r", zs = { type: "literal", value: "\\r", description: '"\\\\r"' }, Rs = function() {
|
|
2296
2296
|
return "\r";
|
|
2297
|
-
},
|
|
2297
|
+
}, Or = "\\n", Bs = { type: "literal", value: "\\n", description: '"\\\\n"' }, Ms = function() {
|
|
2298
2298
|
return `
|
|
2299
2299
|
`;
|
|
2300
|
-
},
|
|
2300
|
+
}, Us = function(e) {
|
|
2301
2301
|
return e;
|
|
2302
|
-
},
|
|
2302
|
+
}, Fs = /^[\\():<>"*{}]/, Is = { type: "class", value: '[\\\\():<>"*{}]', description: '[\\\\():<>"*{}]' }, Pr = "<=", Qs = { type: "literal", value: "<=", description: '"<="' }, Hs = function() {
|
|
2303
2303
|
return "lte";
|
|
2304
|
-
},
|
|
2304
|
+
}, Tr = ">=", qs = { type: "literal", value: ">=", description: '">="' }, Ws = function() {
|
|
2305
2305
|
return "gte";
|
|
2306
|
-
},
|
|
2306
|
+
}, Lr = "<", Nr = { type: "literal", value: "<", description: '"<"' }, Ys = function() {
|
|
2307
2307
|
return "lt";
|
|
2308
|
-
},
|
|
2308
|
+
}, Dr = ">", jr = { type: "literal", value: ">", description: '">"' }, Ks = function() {
|
|
2309
2309
|
return "gt";
|
|
2310
|
-
},
|
|
2311
|
-
return
|
|
2312
|
-
},
|
|
2313
|
-
return
|
|
2314
|
-
},
|
|
2315
|
-
|
|
2316
|
-
},
|
|
2317
|
-
|
|
2318
|
-
},
|
|
2319
|
-
|
|
2320
|
-
},
|
|
2321
|
-
|
|
2322
|
-
},
|
|
2323
|
-
|
|
2324
|
-
},
|
|
2325
|
-
|
|
2326
|
-
},
|
|
2327
|
-
|
|
2328
|
-
},
|
|
2329
|
-
|
|
2330
|
-
}, ao = function() {
|
|
2331
|
-
F("LuceneProximity");
|
|
2332
|
-
}, Xr = "^", Gr = { type: "literal", value: "^", description: '"^"' }, co = function() {
|
|
2333
|
-
F("LuceneBoost");
|
|
2310
|
+
}, Zs = { type: "other", description: "whitespace" }, Vs = /^[ \t\r\n]/, Xs = { type: "class", value: "[\\ \\t\\r\\n]", description: "[\\ \\t\\r\\n]" }, Gs = function() {
|
|
2311
|
+
return Uo;
|
|
2312
|
+
}, zr = "@kuery-cursor@", Js = { type: "literal", value: "@kuery-cursor@", description: '"@kuery-cursor@"' }, eo = function() {
|
|
2313
|
+
return Fo;
|
|
2314
|
+
}, Rr = "||", to = { type: "literal", value: "||", description: '"||"' }, ro = function() {
|
|
2315
|
+
I("LuceneOr");
|
|
2316
|
+
}, Br = "&&", io = { type: "literal", value: "&&", description: '"&&"' }, Mr = function() {
|
|
2317
|
+
I("LuceneAnd");
|
|
2318
|
+
}, Ur = "+", Fr = { type: "literal", value: "+", description: '"+"' }, Ir = "-", Qr = { type: "literal", value: "-", description: '"-"' }, Hr = function() {
|
|
2319
|
+
I("LuceneNot");
|
|
2320
|
+
}, qr = "!", Wr = { type: "literal", value: "!", description: '"!"' }, Yr = "_exists_", so = { type: "literal", value: "_exists_", description: '"_exists_"' }, oo = function() {
|
|
2321
|
+
I("LuceneExists");
|
|
2322
|
+
}, Kr = function() {
|
|
2323
|
+
I("LuceneRange");
|
|
2324
|
+
}, Zr = "?", Vr = { type: "literal", value: "?", description: '"?"' }, no = function() {
|
|
2325
|
+
I("LuceneWildcard");
|
|
2326
|
+
}, Mt = "/", Ut = { type: "literal", value: "/", description: '"/"' }, Xr = /^[^\/]/, Gr = { type: "class", value: "[^/]", description: "[^/]" }, ao = function() {
|
|
2327
|
+
I("LuceneRegex");
|
|
2328
|
+
}, Ft = "~", It = { type: "literal", value: "~", description: '"~"' }, Se = /^[0-9]/, ke = { type: "class", value: "[0-9]", description: "[0-9]" }, co = function() {
|
|
2329
|
+
I("LuceneFuzzy");
|
|
2334
2330
|
}, lo = function() {
|
|
2331
|
+
I("LuceneProximity");
|
|
2332
|
+
}, Jr = "^", ei = { type: "literal", value: "^", description: '"^"' }, po = function() {
|
|
2333
|
+
I("LuceneBoost");
|
|
2334
|
+
}, uo = function() {
|
|
2335
2335
|
return char;
|
|
2336
|
-
},
|
|
2337
|
-
if ("startRule" in
|
|
2338
|
-
if (!(
|
|
2339
|
-
throw new Error(`Can't start parsing from rule "` +
|
|
2340
|
-
|
|
2336
|
+
}, ho = "=", fo = { type: "literal", value: "=", description: '"="' }, ti = "[", ri = { type: "literal", value: "[", description: '"["' }, ii = "]", si = { type: "literal", value: "]", description: '"]"' }, oi = "TO", go = { type: "literal", value: "TO", description: '"TO"' }, c = 0, $ = 0, at = [{ line: 1, column: 1, seenCR: !1 }], Z = 0, Qt = [], d = 0, ct;
|
|
2337
|
+
if ("startRule" in a) {
|
|
2338
|
+
if (!(a.startRule in p))
|
|
2339
|
+
throw new Error(`Can't start parsing from rule "` + a.startRule + '".');
|
|
2340
|
+
g = p[a.startRule];
|
|
2341
2341
|
}
|
|
2342
|
-
function
|
|
2343
|
-
return s.substring($,
|
|
2342
|
+
function bo() {
|
|
2343
|
+
return s.substring($, c);
|
|
2344
2344
|
}
|
|
2345
|
-
function
|
|
2346
|
-
return
|
|
2345
|
+
function vo() {
|
|
2346
|
+
return lt($, c);
|
|
2347
2347
|
}
|
|
2348
|
-
function
|
|
2349
|
-
throw
|
|
2348
|
+
function I(e) {
|
|
2349
|
+
throw ai(
|
|
2350
2350
|
e,
|
|
2351
2351
|
null,
|
|
2352
|
-
s.substring($,
|
|
2353
|
-
|
|
2352
|
+
s.substring($, c),
|
|
2353
|
+
lt($, c)
|
|
2354
2354
|
);
|
|
2355
2355
|
}
|
|
2356
|
-
function
|
|
2357
|
-
var n =
|
|
2356
|
+
function ni(e) {
|
|
2357
|
+
var n = at[e], l, u;
|
|
2358
2358
|
if (n)
|
|
2359
2359
|
return n;
|
|
2360
|
-
for (l = e - 1; !
|
|
2360
|
+
for (l = e - 1; !at[l]; )
|
|
2361
2361
|
l--;
|
|
2362
|
-
for (n =
|
|
2362
|
+
for (n = at[l], n = {
|
|
2363
2363
|
line: n.line,
|
|
2364
2364
|
column: n.column,
|
|
2365
2365
|
seenCR: n.seenCR
|
|
2366
2366
|
}; l < e; )
|
|
2367
|
-
|
|
2368
|
-
` ? (n.seenCR || n.line++, n.column = 1, n.seenCR = !1) :
|
|
2369
|
-
return
|
|
2367
|
+
u = s.charAt(l), u === `
|
|
2368
|
+
` ? (n.seenCR || n.line++, n.column = 1, n.seenCR = !1) : u === "\r" || u === "\u2028" || u === "\u2029" ? (n.line++, n.column = 1, n.seenCR = !0) : (n.column++, n.seenCR = !1), l++;
|
|
2369
|
+
return at[e] = n, n;
|
|
2370
2370
|
}
|
|
2371
|
-
function
|
|
2372
|
-
var l =
|
|
2371
|
+
function lt(e, n) {
|
|
2372
|
+
var l = ni(e), u = ni(n);
|
|
2373
2373
|
return {
|
|
2374
2374
|
start: {
|
|
2375
2375
|
offset: e,
|
|
@@ -2378,693 +2378,693 @@ const In = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2378
2378
|
},
|
|
2379
2379
|
end: {
|
|
2380
2380
|
offset: n,
|
|
2381
|
-
line:
|
|
2382
|
-
column:
|
|
2381
|
+
line: u.line,
|
|
2382
|
+
column: u.column
|
|
2383
2383
|
}
|
|
2384
2384
|
};
|
|
2385
2385
|
}
|
|
2386
2386
|
function f(e) {
|
|
2387
|
-
|
|
2387
|
+
c < Z || (c > Z && (Z = c, Qt = []), Qt.push(e));
|
|
2388
2388
|
}
|
|
2389
|
-
function
|
|
2389
|
+
function ai(e, n, l, u) {
|
|
2390
2390
|
function h(T) {
|
|
2391
2391
|
var N = 1;
|
|
2392
|
-
for (T.sort(function(
|
|
2393
|
-
return
|
|
2392
|
+
for (T.sort(function(ne, Q) {
|
|
2393
|
+
return ne.description < Q.description ? -1 : ne.description > Q.description ? 1 : 0;
|
|
2394
2394
|
}); N < T.length; )
|
|
2395
2395
|
T[N - 1] === T[N] ? T.splice(N, 1) : N++;
|
|
2396
2396
|
}
|
|
2397
2397
|
function y(T, N) {
|
|
2398
|
-
function
|
|
2399
|
-
function
|
|
2400
|
-
return
|
|
2398
|
+
function ne(qo) {
|
|
2399
|
+
function bt(te) {
|
|
2400
|
+
return te.charCodeAt(0).toString(16).toUpperCase();
|
|
2401
2401
|
}
|
|
2402
|
-
return
|
|
2403
|
-
return "\\x0" +
|
|
2404
|
-
}).replace(/[\x10-\x1F\x80-\xFF]/g, function(
|
|
2405
|
-
return "\\x" +
|
|
2406
|
-
}).replace(/[\u0100-\u0FFF]/g, function(
|
|
2407
|
-
return "\\u0" +
|
|
2408
|
-
}).replace(/[\u1000-\uFFFF]/g, function(
|
|
2409
|
-
return "\\u" +
|
|
2402
|
+
return qo.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(te) {
|
|
2403
|
+
return "\\x0" + bt(te);
|
|
2404
|
+
}).replace(/[\x10-\x1F\x80-\xFF]/g, function(te) {
|
|
2405
|
+
return "\\x" + bt(te);
|
|
2406
|
+
}).replace(/[\u0100-\u0FFF]/g, function(te) {
|
|
2407
|
+
return "\\u0" + bt(te);
|
|
2408
|
+
}).replace(/[\u1000-\uFFFF]/g, function(te) {
|
|
2409
|
+
return "\\u" + bt(te);
|
|
2410
2410
|
});
|
|
2411
2411
|
}
|
|
2412
|
-
var
|
|
2413
|
-
for (
|
|
2414
|
-
|
|
2415
|
-
return
|
|
2412
|
+
var Q = new Array(T.length), Si, ki, qe;
|
|
2413
|
+
for (qe = 0; qe < T.length; qe++)
|
|
2414
|
+
Q[qe] = T[qe].description;
|
|
2415
|
+
return Si = T.length > 1 ? Q.slice(0, -1).join(", ") + " or " + Q[T.length - 1] : Q[0], ki = N ? '"' + ne(N) + '"' : "end of input", "Expected " + Si + " but " + ki + " found.";
|
|
2416
2416
|
}
|
|
2417
2417
|
return n !== null && h(n), new r(
|
|
2418
2418
|
e !== null ? e : y(n, l),
|
|
2419
2419
|
n,
|
|
2420
2420
|
l,
|
|
2421
|
-
|
|
2421
|
+
u
|
|
2422
2422
|
);
|
|
2423
2423
|
}
|
|
2424
|
-
function
|
|
2425
|
-
var e, n, l,
|
|
2426
|
-
for (e =
|
|
2424
|
+
function ci() {
|
|
2425
|
+
var e, n, l, u;
|
|
2426
|
+
for (e = c, n = [], l = m(); l !== t; )
|
|
2427
2427
|
n.push(l), l = m();
|
|
2428
|
-
return n !== t ? (l =
|
|
2428
|
+
return n !== t ? (l = pt(), l === t && (l = null), l !== t ? (u = ft(), u !== t ? ($ = e, n = v(l, u), e = n) : (c = e, e = t)) : (c = e, e = t)) : (c = e, e = t), e;
|
|
2429
2429
|
}
|
|
2430
|
-
function
|
|
2431
|
-
var e, n, l,
|
|
2432
|
-
return e =
|
|
2430
|
+
function pt() {
|
|
2431
|
+
var e, n, l, u;
|
|
2432
|
+
return e = c, $ = c, n = x(), n ? n = void 0 : n = t, n !== t ? (l = Co(), l !== t ? (n = [n, l], e = n) : (c = e, e = t)) : (c = e, e = t), e === t && (e = c, n = Ht(), n !== t ? (l = ut(), l !== t ? (u = pt(), u !== t ? ($ = e, n = A(n, u), e = n) : (c = e, e = t)) : (c = e, e = t)) : (c = e, e = t), e === t && (e = Ht())), e;
|
|
2433
2433
|
}
|
|
2434
|
-
function
|
|
2435
|
-
var e, n, l,
|
|
2436
|
-
return e =
|
|
2434
|
+
function Ht() {
|
|
2435
|
+
var e, n, l, u;
|
|
2436
|
+
return e = c, n = li(), n !== t ? (l = dt(), l !== t ? (u = Ht(), u !== t ? ($ = e, n = w(n, u), e = n) : (c = e, e = t)) : (c = e, e = t)) : (c = e, e = t), e === t && (e = li()), e;
|
|
2437
2437
|
}
|
|
2438
|
-
function
|
|
2438
|
+
function li() {
|
|
2439
2439
|
var e, n, l;
|
|
2440
|
-
return e =
|
|
2440
|
+
return e = c, n = Kt(), n !== t ? (l = pi(), l !== t ? ($ = e, n = S(l), e = n) : (c = e, e = t)) : (c = e, e = t), e === t && (e = pi()), e;
|
|
2441
2441
|
}
|
|
2442
|
-
function
|
|
2443
|
-
var e, n, l,
|
|
2444
|
-
if (e =
|
|
2445
|
-
for (l = [],
|
|
2446
|
-
l.push(
|
|
2447
|
-
l !== t ? (
|
|
2442
|
+
function pi() {
|
|
2443
|
+
var e, n, l, u, h, y;
|
|
2444
|
+
if (e = c, s.charCodeAt(c) === 40 ? (n = k, c++) : (n = t, d === 0 && f(z)), n !== t) {
|
|
2445
|
+
for (l = [], u = m(); u !== t; )
|
|
2446
|
+
l.push(u), u = m();
|
|
2447
|
+
l !== t ? (u = pt(), u !== t ? (h = ft(), h !== t ? (s.charCodeAt(c) === 41 ? (y = it, c++) : (y = t, d === 0 && f(se)), y !== t ? ($ = e, n = Y(u, h), e = n) : (c = e, e = t)) : (c = e, e = t)) : (c = e, e = t)) : (c = e, e = t);
|
|
2448
2448
|
} else
|
|
2449
|
-
|
|
2450
|
-
return e === t && (e =
|
|
2449
|
+
c = e, e = t;
|
|
2450
|
+
return e === t && (e = mo()), e;
|
|
2451
2451
|
}
|
|
2452
|
-
function
|
|
2453
|
-
var e, n, l,
|
|
2454
|
-
if (e =
|
|
2455
|
-
for (l = [],
|
|
2456
|
-
l.push(
|
|
2452
|
+
function mo() {
|
|
2453
|
+
var e, n, l, u, h, y, T, N, ne, Q;
|
|
2454
|
+
if (e = c, n = qt(), n !== t) {
|
|
2455
|
+
for (l = [], u = m(); u !== t; )
|
|
2456
|
+
l.push(u), u = m();
|
|
2457
2457
|
if (l !== t)
|
|
2458
|
-
if (s.charCodeAt(
|
|
2458
|
+
if (s.charCodeAt(c) === 58 ? (u = K, c++) : (u = t, d === 0 && f(R)), u !== t) {
|
|
2459
2459
|
for (h = [], y = m(); y !== t; )
|
|
2460
2460
|
h.push(y), y = m();
|
|
2461
2461
|
if (h !== t)
|
|
2462
|
-
if (s.charCodeAt(
|
|
2462
|
+
if (s.charCodeAt(c) === 123 ? (y = Ae, c++) : (y = t, d === 0 && f(jt)), y !== t) {
|
|
2463
2463
|
for (T = [], N = m(); N !== t; )
|
|
2464
2464
|
T.push(N), N = m();
|
|
2465
|
-
T !== t ? (N =
|
|
2465
|
+
T !== t ? (N = pt(), N !== t ? (ne = ft(), ne !== t ? (s.charCodeAt(c) === 125 ? (Q = zt, c++) : (Q = t, d === 0 && f(Rt)), Q !== t ? ($ = e, n = us(n, N, ne), e = n) : (c = e, e = t)) : (c = e, e = t)) : (c = e, e = t)) : (c = e, e = t);
|
|
2466
2466
|
} else
|
|
2467
|
-
|
|
2467
|
+
c = e, e = t;
|
|
2468
2468
|
else
|
|
2469
|
-
|
|
2469
|
+
c = e, e = t;
|
|
2470
2470
|
} else
|
|
2471
|
-
|
|
2471
|
+
c = e, e = t;
|
|
2472
2472
|
else
|
|
2473
|
-
|
|
2473
|
+
c = e, e = t;
|
|
2474
2474
|
} else
|
|
2475
|
-
|
|
2476
|
-
return e === t && (e =
|
|
2475
|
+
c = e, e = t;
|
|
2476
|
+
return e === t && (e = yo()), e;
|
|
2477
2477
|
}
|
|
2478
|
-
function
|
|
2478
|
+
function yo() {
|
|
2479
2479
|
var e;
|
|
2480
|
-
return e =
|
|
2480
|
+
return e = $o(), e === t && (e = _o(), e === t && (e = wo())), e;
|
|
2481
2481
|
}
|
|
2482
|
-
function
|
|
2482
|
+
function qt() {
|
|
2483
2483
|
var e;
|
|
2484
|
-
return d++, e =
|
|
2484
|
+
return d++, e = Zt(), d--, e === t && d === 0 && f(ds), e;
|
|
2485
2485
|
}
|
|
2486
|
-
function
|
|
2487
|
-
var e, n, l,
|
|
2488
|
-
if (e =
|
|
2489
|
-
for (l = [],
|
|
2490
|
-
l.push(
|
|
2486
|
+
function $o() {
|
|
2487
|
+
var e, n, l, u, h, y;
|
|
2488
|
+
if (e = c, n = qt(), n !== t) {
|
|
2489
|
+
for (l = [], u = m(); u !== t; )
|
|
2490
|
+
l.push(u), u = m();
|
|
2491
2491
|
if (l !== t)
|
|
2492
|
-
if (
|
|
2492
|
+
if (u = bi(), u !== t) {
|
|
2493
2493
|
for (h = [], y = m(); y !== t; )
|
|
2494
2494
|
h.push(y), y = m();
|
|
2495
|
-
h !== t ? (y =
|
|
2495
|
+
h !== t ? (y = Zt(), y !== t ? ($ = e, n = hs(n, u, y), e = n) : (c = e, e = t)) : (c = e, e = t);
|
|
2496
2496
|
} else
|
|
2497
|
-
|
|
2497
|
+
c = e, e = t;
|
|
2498
2498
|
else
|
|
2499
|
-
|
|
2499
|
+
c = e, e = t;
|
|
2500
2500
|
} else
|
|
2501
|
-
|
|
2501
|
+
c = e, e = t;
|
|
2502
2502
|
return e;
|
|
2503
2503
|
}
|
|
2504
|
-
function
|
|
2505
|
-
var e, n, l,
|
|
2506
|
-
if (e =
|
|
2507
|
-
for (l = [],
|
|
2508
|
-
l.push(
|
|
2504
|
+
function _o() {
|
|
2505
|
+
var e, n, l, u, h, y;
|
|
2506
|
+
if (e = c, n = qt(), n !== t) {
|
|
2507
|
+
for (l = [], u = m(); u !== t; )
|
|
2508
|
+
l.push(u), u = m();
|
|
2509
2509
|
if (l !== t)
|
|
2510
|
-
if (s.charCodeAt(
|
|
2510
|
+
if (s.charCodeAt(c) === 58 ? (u = K, c++) : (u = t, d === 0 && f(R)), u !== t) {
|
|
2511
2511
|
for (h = [], y = m(); y !== t; )
|
|
2512
2512
|
h.push(y), y = m();
|
|
2513
|
-
h !== t ? (y =
|
|
2513
|
+
h !== t ? (y = Wt(), y !== t ? ($ = e, n = fs(n, y), e = n) : (c = e, e = t)) : (c = e, e = t);
|
|
2514
2514
|
} else
|
|
2515
|
-
|
|
2515
|
+
c = e, e = t;
|
|
2516
2516
|
else
|
|
2517
|
-
|
|
2517
|
+
c = e, e = t;
|
|
2518
2518
|
} else
|
|
2519
|
-
|
|
2519
|
+
c = e, e = t;
|
|
2520
2520
|
return e;
|
|
2521
2521
|
}
|
|
2522
|
-
function
|
|
2522
|
+
function wo() {
|
|
2523
2523
|
var e, n;
|
|
2524
|
-
return e =
|
|
2524
|
+
return e = c, n = hi(), n !== t && ($ = e, n = gs(n)), e = n, e;
|
|
2525
2525
|
}
|
|
2526
|
-
function
|
|
2527
|
-
var e, n, l,
|
|
2528
|
-
if (e =
|
|
2529
|
-
for (l = [],
|
|
2530
|
-
l.push(
|
|
2531
|
-
l !== t ? (
|
|
2526
|
+
function Wt() {
|
|
2527
|
+
var e, n, l, u, h, y;
|
|
2528
|
+
if (e = c, s.charCodeAt(c) === 40 ? (n = k, c++) : (n = t, d === 0 && f(z)), n !== t) {
|
|
2529
|
+
for (l = [], u = m(); u !== t; )
|
|
2530
|
+
l.push(u), u = m();
|
|
2531
|
+
l !== t ? (u = ui(), u !== t ? (h = ft(), h !== t ? (s.charCodeAt(c) === 41 ? (y = it, c++) : (y = t, d === 0 && f(se)), y !== t ? ($ = e, n = bs(u, h), e = n) : (c = e, e = t)) : (c = e, e = t)) : (c = e, e = t)) : (c = e, e = t);
|
|
2532
2532
|
} else
|
|
2533
|
-
|
|
2534
|
-
return e === t && (e =
|
|
2533
|
+
c = e, e = t;
|
|
2534
|
+
return e === t && (e = hi()), e;
|
|
2535
2535
|
}
|
|
2536
|
-
function
|
|
2537
|
-
var e, n, l,
|
|
2538
|
-
return e =
|
|
2536
|
+
function ui() {
|
|
2537
|
+
var e, n, l, u;
|
|
2538
|
+
return e = c, n = Yt(), n !== t ? (l = ut(), l !== t ? (u = ui(), u !== t ? ($ = e, n = vs(n, u), e = n) : (c = e, e = t)) : (c = e, e = t)) : (c = e, e = t), e === t && (e = Yt()), e;
|
|
2539
2539
|
}
|
|
2540
|
-
function
|
|
2541
|
-
var e, n, l,
|
|
2542
|
-
return e =
|
|
2540
|
+
function Yt() {
|
|
2541
|
+
var e, n, l, u;
|
|
2542
|
+
return e = c, n = di(), n !== t ? (l = dt(), l !== t ? (u = Yt(), u !== t ? ($ = e, n = ms(n, u), e = n) : (c = e, e = t)) : (c = e, e = t)) : (c = e, e = t), e === t && (e = di()), e;
|
|
2543
2543
|
}
|
|
2544
|
-
function
|
|
2544
|
+
function di() {
|
|
2545
2545
|
var e, n, l;
|
|
2546
|
-
return e =
|
|
2546
|
+
return e = c, n = Kt(), n !== t ? (l = Wt(), l !== t ? ($ = e, n = ys(l), e = n) : (c = e, e = t)) : (c = e, e = t), e === t && (e = Wt()), e;
|
|
2547
2547
|
}
|
|
2548
|
-
function
|
|
2548
|
+
function hi() {
|
|
2549
2549
|
var e, n;
|
|
2550
|
-
return d++, e =
|
|
2550
|
+
return d++, e = c, n = ht(), n !== t && ($ = e, n = _s(n)), e = n, e === t && (e = c, n = fi(), n !== t && ($ = e, n = ws(n)), e = n), d--, e === t && (n = t, d === 0 && f($s)), e;
|
|
2551
2551
|
}
|
|
2552
|
-
function
|
|
2553
|
-
var e, n, l,
|
|
2554
|
-
if (d++, e =
|
|
2552
|
+
function ut() {
|
|
2553
|
+
var e, n, l, u, h;
|
|
2554
|
+
if (d++, e = c, n = [], l = m(), l !== t)
|
|
2555
2555
|
for (; l !== t; )
|
|
2556
2556
|
n.push(l), l = m();
|
|
2557
2557
|
else
|
|
2558
2558
|
n = t;
|
|
2559
2559
|
if (n !== t)
|
|
2560
|
-
if (s.substr(
|
|
2561
|
-
if (
|
|
2560
|
+
if (s.substr(c, 2).toLowerCase() === $r ? (l = s.substr(c, 2), c += 2) : (l = t, d === 0 && f(_r)), l !== t) {
|
|
2561
|
+
if (u = [], h = m(), h !== t)
|
|
2562
2562
|
for (; h !== t; )
|
|
2563
|
-
|
|
2563
|
+
u.push(h), h = m();
|
|
2564
2564
|
else
|
|
2565
|
-
|
|
2566
|
-
|
|
2565
|
+
u = t;
|
|
2566
|
+
u !== t ? (n = [n, l, u], e = n) : (c = e, e = t);
|
|
2567
2567
|
} else
|
|
2568
|
-
|
|
2568
|
+
c = e, e = t;
|
|
2569
2569
|
else
|
|
2570
|
-
|
|
2571
|
-
return e === t && (e =
|
|
2570
|
+
c = e, e = t;
|
|
2571
|
+
return e === t && (e = c, $ = c, n = x(), n ? n = void 0 : n = t, n !== t ? (l = vi(), l !== t ? (n = [n, l], e = n) : (c = e, e = t)) : (c = e, e = t)), d--, e === t && (n = t, d === 0 && f(xs)), e;
|
|
2572
2572
|
}
|
|
2573
|
-
function
|
|
2574
|
-
var e, n, l,
|
|
2575
|
-
if (d++, e =
|
|
2573
|
+
function dt() {
|
|
2574
|
+
var e, n, l, u, h;
|
|
2575
|
+
if (d++, e = c, n = [], l = m(), l !== t)
|
|
2576
2576
|
for (; l !== t; )
|
|
2577
2577
|
n.push(l), l = m();
|
|
2578
2578
|
else
|
|
2579
2579
|
n = t;
|
|
2580
2580
|
if (n !== t)
|
|
2581
|
-
if (s.substr(
|
|
2582
|
-
if (
|
|
2581
|
+
if (s.substr(c, 3).toLowerCase() === wr ? (l = s.substr(c, 3), c += 3) : (l = t, d === 0 && f(xr)), l !== t) {
|
|
2582
|
+
if (u = [], h = m(), h !== t)
|
|
2583
2583
|
for (; h !== t; )
|
|
2584
|
-
|
|
2584
|
+
u.push(h), h = m();
|
|
2585
2585
|
else
|
|
2586
|
-
|
|
2587
|
-
|
|
2586
|
+
u = t;
|
|
2587
|
+
u !== t ? (n = [n, l, u], e = n) : (c = e, e = t);
|
|
2588
2588
|
} else
|
|
2589
|
-
|
|
2589
|
+
c = e, e = t;
|
|
2590
2590
|
else
|
|
2591
|
-
|
|
2592
|
-
return e === t && (e =
|
|
2591
|
+
c = e, e = t;
|
|
2592
|
+
return e === t && (e = c, $ = c, n = x(), n ? n = void 0 : n = t, n !== t ? (l = mi(), l !== t ? (n = [n, l], e = n) : (c = e, e = t)) : (c = e, e = t)), d--, e === t && (n = t, d === 0 && f(As)), e;
|
|
2593
2593
|
}
|
|
2594
|
-
function
|
|
2595
|
-
var e, n, l,
|
|
2596
|
-
if (d++, e =
|
|
2597
|
-
if (l = [],
|
|
2598
|
-
for (;
|
|
2599
|
-
l.push(
|
|
2594
|
+
function Kt() {
|
|
2595
|
+
var e, n, l, u;
|
|
2596
|
+
if (d++, e = c, s.substr(c, 3).toLowerCase() === Ar ? (n = s.substr(c, 3), c += 3) : (n = t, d === 0 && f(Sr)), n !== t) {
|
|
2597
|
+
if (l = [], u = m(), u !== t)
|
|
2598
|
+
for (; u !== t; )
|
|
2599
|
+
l.push(u), u = m();
|
|
2600
2600
|
else
|
|
2601
2601
|
l = t;
|
|
2602
|
-
l !== t ? (n = [n, l], e = n) : (
|
|
2602
|
+
l !== t ? (n = [n, l], e = n) : (c = e, e = t);
|
|
2603
2603
|
} else
|
|
2604
|
-
|
|
2605
|
-
return e === t && (e =
|
|
2604
|
+
c = e, e = t;
|
|
2605
|
+
return e === t && (e = c, $ = c, n = x(), n ? n = void 0 : n = t, n !== t ? (l = yi(), l !== t ? (n = [n, l], e = n) : (c = e, e = t)) : (c = e, e = t)), d--, e === t && (n = t, d === 0 && f(Ss)), e;
|
|
2606
2606
|
}
|
|
2607
|
-
function
|
|
2607
|
+
function Zt() {
|
|
2608
2608
|
var e;
|
|
2609
|
-
return d++, e =
|
|
2609
|
+
return d++, e = ht(), e === t && (e = fi()), d--, e === t && d === 0 && f(ks), e;
|
|
2610
2610
|
}
|
|
2611
|
-
function
|
|
2612
|
-
var e, n, l,
|
|
2613
|
-
if (e =
|
|
2614
|
-
for (l = [],
|
|
2615
|
-
l.push(
|
|
2611
|
+
function ht() {
|
|
2612
|
+
var e, n, l, u, h, y;
|
|
2613
|
+
if (e = c, s.charCodeAt(c) === 34 ? (n = Ue, c++) : (n = t, d === 0 && f(Fe)), n !== t) {
|
|
2614
|
+
for (l = [], u = Ce(); u !== t; )
|
|
2615
|
+
l.push(u), u = Ce();
|
|
2616
2616
|
if (l !== t)
|
|
2617
|
-
if (
|
|
2618
|
-
for (h = [], y =
|
|
2619
|
-
h.push(y), y =
|
|
2620
|
-
h !== t ? (s.charCodeAt(
|
|
2617
|
+
if (u = He(), u !== t) {
|
|
2618
|
+
for (h = [], y = Ce(); y !== t; )
|
|
2619
|
+
h.push(y), y = Ce();
|
|
2620
|
+
h !== t ? (s.charCodeAt(c) === 34 ? (y = Ue, c++) : (y = t, d === 0 && f(Fe)), y !== t ? ($ = e, n = Bt(l, u, h), e = n) : (c = e, e = t)) : (c = e, e = t);
|
|
2621
2621
|
} else
|
|
2622
|
-
|
|
2622
|
+
c = e, e = t;
|
|
2623
2623
|
else
|
|
2624
|
-
|
|
2624
|
+
c = e, e = t;
|
|
2625
2625
|
} else
|
|
2626
|
-
|
|
2626
|
+
c = e, e = t;
|
|
2627
2627
|
if (e === t)
|
|
2628
|
-
if (e =
|
|
2629
|
-
for (l = [],
|
|
2630
|
-
l.push(
|
|
2631
|
-
l !== t ? (s.charCodeAt(
|
|
2628
|
+
if (e = c, s.charCodeAt(c) === 34 ? (n = Ue, c++) : (n = t, d === 0 && f(Fe)), n !== t) {
|
|
2629
|
+
for (l = [], u = Ce(); u !== t; )
|
|
2630
|
+
l.push(u), u = Ce();
|
|
2631
|
+
l !== t ? (s.charCodeAt(c) === 34 ? (u = Ue, c++) : (u = t, d === 0 && f(Fe)), u !== t ? ($ = e, n = Cs(l), e = n) : (c = e, e = t)) : (c = e, e = t);
|
|
2632
2632
|
} else
|
|
2633
|
-
|
|
2633
|
+
c = e, e = t;
|
|
2634
2634
|
return e;
|
|
2635
2635
|
}
|
|
2636
|
-
function
|
|
2636
|
+
function Ce() {
|
|
2637
2637
|
var e, n, l;
|
|
2638
|
-
return e =
|
|
2638
|
+
return e = Vt(), e === t && (e = c, s.charCodeAt(c) === 92 ? (n = Ie, c++) : (n = t, d === 0 && f(Qe)), n !== t ? (Es.test(s.charAt(c)) ? (l = s.charAt(c), c++) : (l = t, d === 0 && f(Os)), l !== t ? ($ = e, n = st(l), e = n) : (c = e, e = t)) : (c = e, e = t), e === t && (e = c, n = c, d++, l = He(), d--, l === t ? n = void 0 : (c = n, n = t), n !== t ? (Ps.test(s.charAt(c)) ? (l = s.charAt(c), c++) : (l = t, d === 0 && f(Ts)), l !== t ? ($ = e, n = st(l), e = n) : (c = e, e = t)) : (c = e, e = t))), e;
|
|
2639
2639
|
}
|
|
2640
|
-
function
|
|
2641
|
-
var e, n, l,
|
|
2642
|
-
for (e =
|
|
2643
|
-
n.push(l), l =
|
|
2640
|
+
function fi() {
|
|
2641
|
+
var e, n, l, u, h;
|
|
2642
|
+
for (e = c, n = [], l = Ee(); l !== t; )
|
|
2643
|
+
n.push(l), l = Ee();
|
|
2644
2644
|
if (n !== t)
|
|
2645
|
-
if (l =
|
|
2646
|
-
for (
|
|
2647
|
-
|
|
2648
|
-
|
|
2645
|
+
if (l = He(), l !== t) {
|
|
2646
|
+
for (u = [], h = Ee(); h !== t; )
|
|
2647
|
+
u.push(h), h = Ee();
|
|
2648
|
+
u !== t ? ($ = e, n = Bt(n, l, u), e = n) : (c = e, e = t);
|
|
2649
2649
|
} else
|
|
2650
|
-
|
|
2650
|
+
c = e, e = t;
|
|
2651
2651
|
else
|
|
2652
|
-
|
|
2652
|
+
c = e, e = t;
|
|
2653
2653
|
if (e === t) {
|
|
2654
|
-
if (e =
|
|
2654
|
+
if (e = c, n = [], l = Ee(), l !== t)
|
|
2655
2655
|
for (; l !== t; )
|
|
2656
|
-
n.push(l), l =
|
|
2656
|
+
n.push(l), l = Ee();
|
|
2657
2657
|
else
|
|
2658
2658
|
n = t;
|
|
2659
|
-
n !== t && ($ = e, n =
|
|
2659
|
+
n !== t && ($ = e, n = Ls(n)), e = n;
|
|
2660
2660
|
}
|
|
2661
2661
|
return e;
|
|
2662
2662
|
}
|
|
2663
|
-
function
|
|
2664
|
-
var e, n, l,
|
|
2665
|
-
return e =
|
|
2663
|
+
function Ee() {
|
|
2664
|
+
var e, n, l, u, h;
|
|
2665
|
+
return e = Vt(), e === t && (e = Ao(), e === t && (e = So(), e === t && (e = xo(), e === t && (e = c, n = c, d++, l = gi(), d--, l === t ? n = void 0 : (c = n, n = t), n !== t ? (l = c, d++, u = ko(), d--, u === t ? l = void 0 : (c = l, l = t), l !== t ? (u = c, d++, h = He(), d--, h === t ? u = void 0 : (c = u, u = t), u !== t ? (s.length > c ? (h = s.charAt(c), c++) : (h = t, d === 0 && f(kr)), h !== t ? ($ = e, n = st(h), e = n) : (c = e, e = t)) : (c = e, e = t)) : (c = e, e = t)) : (c = e, e = t))))), e;
|
|
2666
2666
|
}
|
|
2667
|
-
function
|
|
2667
|
+
function xo() {
|
|
2668
2668
|
var e, n;
|
|
2669
|
-
return e =
|
|
2669
|
+
return e = c, s.charCodeAt(c) === 42 ? (n = ot, c++) : (n = t, d === 0 && f(nt)), n !== t && ($ = e, n = Ns()), e = n, e;
|
|
2670
2670
|
}
|
|
2671
|
-
function
|
|
2672
|
-
var e, n, l,
|
|
2673
|
-
for (e =
|
|
2671
|
+
function ft() {
|
|
2672
|
+
var e, n, l, u, h;
|
|
2673
|
+
for (e = c, n = [], l = m(); l !== t; )
|
|
2674
2674
|
n.push(l), l = m();
|
|
2675
2675
|
if (n !== t)
|
|
2676
|
-
if (l =
|
|
2677
|
-
for (
|
|
2678
|
-
|
|
2679
|
-
|
|
2676
|
+
if (l = He(), l !== t) {
|
|
2677
|
+
for (u = [], h = m(); h !== t; )
|
|
2678
|
+
u.push(h), h = m();
|
|
2679
|
+
u !== t ? ($ = e, n = Bt(n, l, u), e = n) : (c = e, e = t);
|
|
2680
2680
|
} else
|
|
2681
|
-
|
|
2681
|
+
c = e, e = t;
|
|
2682
2682
|
else
|
|
2683
|
-
|
|
2683
|
+
c = e, e = t;
|
|
2684
2684
|
if (e === t)
|
|
2685
2685
|
for (e = [], n = m(); n !== t; )
|
|
2686
2686
|
e.push(n), n = m();
|
|
2687
2687
|
return e;
|
|
2688
2688
|
}
|
|
2689
|
-
function
|
|
2689
|
+
function Vt() {
|
|
2690
2690
|
var e, n;
|
|
2691
|
-
return e =
|
|
2691
|
+
return e = c, s.substr(c, 2) === Cr ? (n = Cr, c += 2) : (n = t, d === 0 && f(Ds)), n !== t && ($ = e, n = js()), e = n, e === t && (e = c, s.substr(c, 2) === Er ? (n = Er, c += 2) : (n = t, d === 0 && f(zs)), n !== t && ($ = e, n = Rs()), e = n, e === t && (e = c, s.substr(c, 2) === Or ? (n = Or, c += 2) : (n = t, d === 0 && f(Bs)), n !== t && ($ = e, n = Ms()), e = n)), e;
|
|
2692
2692
|
}
|
|
2693
|
-
function
|
|
2693
|
+
function Ao() {
|
|
2694
2694
|
var e, n, l;
|
|
2695
|
-
return e =
|
|
2695
|
+
return e = c, s.charCodeAt(c) === 92 ? (n = Ie, c++) : (n = t, d === 0 && f(Qe)), n !== t ? (l = gi(), l !== t ? ($ = e, n = st(l), e = n) : (c = e, e = t)) : (c = e, e = t), e;
|
|
2696
2696
|
}
|
|
2697
|
-
function
|
|
2697
|
+
function So() {
|
|
2698
2698
|
var e, n, l;
|
|
2699
|
-
return e =
|
|
2699
|
+
return e = c, s.charCodeAt(c) === 92 ? (n = Ie, c++) : (n = t, d === 0 && f(Qe)), n !== t ? (s.substr(c, 2).toLowerCase() === $r ? (l = s.substr(c, 2), c += 2) : (l = t, d === 0 && f(_r)), l === t && (s.substr(c, 3).toLowerCase() === wr ? (l = s.substr(c, 3), c += 3) : (l = t, d === 0 && f(xr)), l === t && (s.substr(c, 3).toLowerCase() === Ar ? (l = s.substr(c, 3), c += 3) : (l = t, d === 0 && f(Sr)))), l !== t ? ($ = e, n = Us(l), e = n) : (c = e, e = t)) : (c = e, e = t), e;
|
|
2700
2700
|
}
|
|
2701
|
-
function
|
|
2701
|
+
function ko() {
|
|
2702
2702
|
var e;
|
|
2703
|
-
return e =
|
|
2703
|
+
return e = ut(), e === t && (e = dt(), e === t && (e = Kt())), e;
|
|
2704
2704
|
}
|
|
2705
|
-
function
|
|
2705
|
+
function gi() {
|
|
2706
2706
|
var e;
|
|
2707
|
-
return
|
|
2707
|
+
return Fs.test(s.charAt(c)) ? (e = s.charAt(c), c++) : (e = t, d === 0 && f(Is)), e;
|
|
2708
2708
|
}
|
|
2709
|
-
function
|
|
2709
|
+
function bi() {
|
|
2710
2710
|
var e, n;
|
|
2711
|
-
return e =
|
|
2711
|
+
return e = c, s.substr(c, 2) === Pr ? (n = Pr, c += 2) : (n = t, d === 0 && f(Qs)), n !== t && ($ = e, n = Hs()), e = n, e === t && (e = c, s.substr(c, 2) === Tr ? (n = Tr, c += 2) : (n = t, d === 0 && f(qs)), n !== t && ($ = e, n = Ws()), e = n, e === t && (e = c, s.charCodeAt(c) === 60 ? (n = Lr, c++) : (n = t, d === 0 && f(Nr)), n !== t && ($ = e, n = Ys()), e = n, e === t && (e = c, s.charCodeAt(c) === 62 ? (n = Dr, c++) : (n = t, d === 0 && f(jr)), n !== t && ($ = e, n = Ks()), e = n))), e;
|
|
2712
2712
|
}
|
|
2713
2713
|
function m() {
|
|
2714
2714
|
var e;
|
|
2715
|
-
return d++,
|
|
2715
|
+
return d++, Vs.test(s.charAt(c)) ? (e = s.charAt(c), c++) : (e = t, d === 0 && f(Xs)), d--, e === t && d === 0 && f(Zs), e;
|
|
2716
2716
|
}
|
|
2717
|
-
function
|
|
2717
|
+
function He() {
|
|
2718
2718
|
var e, n, l;
|
|
2719
|
-
return e =
|
|
2719
|
+
return e = c, $ = c, n = Gs(), n ? n = void 0 : n = t, n !== t ? (s.substr(c, 14) === zr ? (l = zr, c += 14) : (l = t, d === 0 && f(Js)), l !== t ? ($ = e, n = eo(), e = n) : (c = e, e = t)) : (c = e, e = t), e;
|
|
2720
2720
|
}
|
|
2721
|
-
function
|
|
2722
|
-
var e, n, l,
|
|
2723
|
-
for (e =
|
|
2721
|
+
function vi() {
|
|
2722
|
+
var e, n, l, u, h;
|
|
2723
|
+
for (e = c, n = [], l = m(); l !== t; )
|
|
2724
2724
|
n.push(l), l = m();
|
|
2725
2725
|
if (n !== t)
|
|
2726
|
-
if (s.substr(
|
|
2727
|
-
for (
|
|
2728
|
-
|
|
2729
|
-
|
|
2726
|
+
if (s.substr(c, 2) === Rr ? (l = Rr, c += 2) : (l = t, d === 0 && f(to)), l !== t) {
|
|
2727
|
+
for (u = [], h = m(); h !== t; )
|
|
2728
|
+
u.push(h), h = m();
|
|
2729
|
+
u !== t ? ($ = e, n = ro(), e = n) : (c = e, e = t);
|
|
2730
2730
|
} else
|
|
2731
|
-
|
|
2731
|
+
c = e, e = t;
|
|
2732
2732
|
else
|
|
2733
|
-
|
|
2733
|
+
c = e, e = t;
|
|
2734
2734
|
return e;
|
|
2735
2735
|
}
|
|
2736
|
-
function
|
|
2737
|
-
var e, n, l,
|
|
2738
|
-
for (e =
|
|
2736
|
+
function mi() {
|
|
2737
|
+
var e, n, l, u, h;
|
|
2738
|
+
for (e = c, n = [], l = m(); l !== t; )
|
|
2739
2739
|
n.push(l), l = m();
|
|
2740
2740
|
if (n !== t)
|
|
2741
|
-
if (s.substr(
|
|
2742
|
-
for (
|
|
2743
|
-
|
|
2744
|
-
|
|
2741
|
+
if (s.substr(c, 2) === Br ? (l = Br, c += 2) : (l = t, d === 0 && f(io)), l !== t) {
|
|
2742
|
+
for (u = [], h = m(); h !== t; )
|
|
2743
|
+
u.push(h), h = m();
|
|
2744
|
+
u !== t ? ($ = e, n = Mr(), e = n) : (c = e, e = t);
|
|
2745
2745
|
} else
|
|
2746
|
-
|
|
2746
|
+
c = e, e = t;
|
|
2747
2747
|
else
|
|
2748
|
-
|
|
2749
|
-
return e === t && (e =
|
|
2748
|
+
c = e, e = t;
|
|
2749
|
+
return e === t && (e = c, s.charCodeAt(c) === 43 ? (n = Ur, c++) : (n = t, d === 0 && f(Fr)), n !== t && ($ = e, n = Mr()), e = n), e;
|
|
2750
2750
|
}
|
|
2751
|
-
function
|
|
2751
|
+
function yi() {
|
|
2752
2752
|
var e, n;
|
|
2753
|
-
return e =
|
|
2753
|
+
return e = c, s.charCodeAt(c) === 45 ? (n = Ir, c++) : (n = t, d === 0 && f(Qr)), n !== t && ($ = e, n = Hr()), e = n, e === t && (e = c, s.charCodeAt(c) === 33 ? (n = qr, c++) : (n = t, d === 0 && f(Wr)), n !== t && ($ = e, n = Hr()), e = n), e;
|
|
2754
2754
|
}
|
|
2755
|
-
function
|
|
2755
|
+
function Co() {
|
|
2756
2756
|
var e;
|
|
2757
|
-
return e =
|
|
2757
|
+
return e = Eo(), e === t && (e = $i(), e === t && (e = Oo())), e;
|
|
2758
2758
|
}
|
|
2759
|
-
function
|
|
2760
|
-
var e, n, l,
|
|
2761
|
-
if (e =
|
|
2762
|
-
for (l = [],
|
|
2763
|
-
l.push(
|
|
2759
|
+
function Eo() {
|
|
2760
|
+
var e, n, l, u, h, y;
|
|
2761
|
+
if (e = c, n = Oe(), n !== t) {
|
|
2762
|
+
for (l = [], u = m(); u !== t; )
|
|
2763
|
+
l.push(u), u = m();
|
|
2764
2764
|
if (l !== t)
|
|
2765
|
-
if (s.charCodeAt(
|
|
2765
|
+
if (s.charCodeAt(c) === 58 ? (u = K, c++) : (u = t, d === 0 && f(R)), u !== t) {
|
|
2766
2766
|
for (h = [], y = m(); y !== t; )
|
|
2767
2767
|
h.push(y), y = m();
|
|
2768
|
-
h !== t ? (y =
|
|
2768
|
+
h !== t ? (y = $i(), y !== t ? (n = [n, l, u, h, y], e = n) : (c = e, e = t)) : (c = e, e = t);
|
|
2769
2769
|
} else
|
|
2770
|
-
|
|
2770
|
+
c = e, e = t;
|
|
2771
2771
|
else
|
|
2772
|
-
|
|
2772
|
+
c = e, e = t;
|
|
2773
2773
|
} else
|
|
2774
|
-
|
|
2774
|
+
c = e, e = t;
|
|
2775
2775
|
return e;
|
|
2776
2776
|
}
|
|
2777
|
-
function
|
|
2777
|
+
function $i() {
|
|
2778
2778
|
var e;
|
|
2779
|
-
return e =
|
|
2779
|
+
return e = Po(), e === t && (e = Xt(), e === t && (e = To(), e === t && (e = Lo(), e === t && (e = No(), e === t && (e = Do()))))), e;
|
|
2780
2780
|
}
|
|
2781
|
-
function
|
|
2782
|
-
var e, n, l,
|
|
2783
|
-
if (e =
|
|
2784
|
-
for (l = [],
|
|
2785
|
-
l.push(
|
|
2781
|
+
function Oo() {
|
|
2782
|
+
var e, n, l, u, h, y;
|
|
2783
|
+
if (e = c, s.substr(c, 8) === Yr ? (n = Yr, c += 8) : (n = t, d === 0 && f(so)), n !== t) {
|
|
2784
|
+
for (l = [], u = m(); u !== t; )
|
|
2785
|
+
l.push(u), u = m();
|
|
2786
2786
|
if (l !== t)
|
|
2787
|
-
if (s.charCodeAt(
|
|
2787
|
+
if (s.charCodeAt(c) === 58 ? (u = K, c++) : (u = t, d === 0 && f(R)), u !== t) {
|
|
2788
2788
|
for (h = [], y = m(); y !== t; )
|
|
2789
2789
|
h.push(y), y = m();
|
|
2790
|
-
h !== t ? (y =
|
|
2790
|
+
h !== t ? (y = Oe(), y !== t ? ($ = e, n = oo(), e = n) : (c = e, e = t)) : (c = e, e = t);
|
|
2791
2791
|
} else
|
|
2792
|
-
|
|
2792
|
+
c = e, e = t;
|
|
2793
2793
|
else
|
|
2794
|
-
|
|
2794
|
+
c = e, e = t;
|
|
2795
2795
|
} else
|
|
2796
|
-
|
|
2796
|
+
c = e, e = t;
|
|
2797
2797
|
return e;
|
|
2798
2798
|
}
|
|
2799
|
-
function
|
|
2800
|
-
var e, n, l,
|
|
2801
|
-
if (e =
|
|
2802
|
-
for (l = [],
|
|
2803
|
-
l.push(
|
|
2804
|
-
l !== t ? (
|
|
2799
|
+
function Po() {
|
|
2800
|
+
var e, n, l, u, h, y, T;
|
|
2801
|
+
if (e = c, n = bi(), n !== t) {
|
|
2802
|
+
for (l = [], u = m(); u !== t; )
|
|
2803
|
+
l.push(u), u = m();
|
|
2804
|
+
l !== t ? (u = Oe(), u !== t ? ($ = e, n = Kr(), e = n) : (c = e, e = t)) : (c = e, e = t);
|
|
2805
2805
|
} else
|
|
2806
|
-
|
|
2806
|
+
c = e, e = t;
|
|
2807
2807
|
if (e === t)
|
|
2808
|
-
if (e =
|
|
2809
|
-
for (l = [],
|
|
2810
|
-
l.push(
|
|
2811
|
-
l !== t ? (
|
|
2808
|
+
if (e = c, n = Ro(), n !== t) {
|
|
2809
|
+
for (l = [], u = m(); u !== t; )
|
|
2810
|
+
l.push(u), u = m();
|
|
2811
|
+
l !== t ? (u = Oe(), u !== t ? (h = xi(), h !== t ? (y = Oe(), y !== t ? (T = Bo(), T !== t ? ($ = e, n = Kr(), e = n) : (c = e, e = t)) : (c = e, e = t)) : (c = e, e = t)) : (c = e, e = t)) : (c = e, e = t);
|
|
2812
2812
|
} else
|
|
2813
|
-
|
|
2813
|
+
c = e, e = t;
|
|
2814
2814
|
return e;
|
|
2815
2815
|
}
|
|
2816
|
-
function
|
|
2817
|
-
var e, n, l,
|
|
2818
|
-
for (e =
|
|
2819
|
-
n.push(l), l =
|
|
2816
|
+
function Xt() {
|
|
2817
|
+
var e, n, l, u, h;
|
|
2818
|
+
for (e = c, n = [], l = gt(), l === t && (s.charCodeAt(c) === 42 ? (l = ot, c++) : (l = t, d === 0 && f(nt))); l !== t; )
|
|
2819
|
+
n.push(l), l = gt(), l === t && (s.charCodeAt(c) === 42 ? (l = ot, c++) : (l = t, d === 0 && f(nt)));
|
|
2820
2820
|
if (n !== t)
|
|
2821
|
-
if (s.charCodeAt(
|
|
2822
|
-
for (
|
|
2823
|
-
|
|
2824
|
-
|
|
2821
|
+
if (s.charCodeAt(c) === 63 ? (l = Zr, c++) : (l = t, d === 0 && f(Vr)), l !== t) {
|
|
2822
|
+
for (u = [], h = Xt(); h !== t; )
|
|
2823
|
+
u.push(h), h = Xt();
|
|
2824
|
+
u !== t ? ($ = e, n = no(), e = n) : (c = e, e = t);
|
|
2825
2825
|
} else
|
|
2826
|
-
|
|
2826
|
+
c = e, e = t;
|
|
2827
2827
|
else
|
|
2828
|
-
|
|
2828
|
+
c = e, e = t;
|
|
2829
2829
|
return e;
|
|
2830
2830
|
}
|
|
2831
|
-
function
|
|
2832
|
-
var e, n, l,
|
|
2833
|
-
if (e =
|
|
2834
|
-
for (l = [],
|
|
2835
|
-
l.push(
|
|
2836
|
-
l !== t ? (s.charCodeAt(
|
|
2831
|
+
function To() {
|
|
2832
|
+
var e, n, l, u;
|
|
2833
|
+
if (e = c, s.charCodeAt(c) === 47 ? (n = Mt, c++) : (n = t, d === 0 && f(Ut)), n !== t) {
|
|
2834
|
+
for (l = [], Xr.test(s.charAt(c)) ? (u = s.charAt(c), c++) : (u = t, d === 0 && f(Gr)); u !== t; )
|
|
2835
|
+
l.push(u), Xr.test(s.charAt(c)) ? (u = s.charAt(c), c++) : (u = t, d === 0 && f(Gr));
|
|
2836
|
+
l !== t ? (s.charCodeAt(c) === 47 ? (u = Mt, c++) : (u = t, d === 0 && f(Ut)), u !== t ? ($ = e, n = ao(), e = n) : (c = e, e = t)) : (c = e, e = t);
|
|
2837
2837
|
} else
|
|
2838
|
-
|
|
2838
|
+
c = e, e = t;
|
|
2839
2839
|
return e;
|
|
2840
2840
|
}
|
|
2841
|
-
function
|
|
2842
|
-
var e, n, l,
|
|
2843
|
-
if (e =
|
|
2844
|
-
if (s.charCodeAt(
|
|
2845
|
-
for (
|
|
2846
|
-
|
|
2847
|
-
|
|
2841
|
+
function Lo() {
|
|
2842
|
+
var e, n, l, u, h;
|
|
2843
|
+
if (e = c, n = _i(), n !== t)
|
|
2844
|
+
if (s.charCodeAt(c) === 126 ? (l = Ft, c++) : (l = t, d === 0 && f(It)), l !== t) {
|
|
2845
|
+
for (u = [], Se.test(s.charAt(c)) ? (h = s.charAt(c), c++) : (h = t, d === 0 && f(ke)); h !== t; )
|
|
2846
|
+
u.push(h), Se.test(s.charAt(c)) ? (h = s.charAt(c), c++) : (h = t, d === 0 && f(ke));
|
|
2847
|
+
u !== t ? ($ = e, n = co(), e = n) : (c = e, e = t);
|
|
2848
2848
|
} else
|
|
2849
|
-
|
|
2849
|
+
c = e, e = t;
|
|
2850
2850
|
else
|
|
2851
|
-
|
|
2851
|
+
c = e, e = t;
|
|
2852
2852
|
return e;
|
|
2853
2853
|
}
|
|
2854
|
-
function
|
|
2855
|
-
var e, n, l,
|
|
2856
|
-
if (e =
|
|
2857
|
-
if (s.charCodeAt(
|
|
2858
|
-
for (
|
|
2859
|
-
|
|
2860
|
-
|
|
2854
|
+
function No() {
|
|
2855
|
+
var e, n, l, u, h;
|
|
2856
|
+
if (e = c, n = ht(), n !== t)
|
|
2857
|
+
if (s.charCodeAt(c) === 126 ? (l = Ft, c++) : (l = t, d === 0 && f(It)), l !== t) {
|
|
2858
|
+
for (u = [], Se.test(s.charAt(c)) ? (h = s.charAt(c), c++) : (h = t, d === 0 && f(ke)); h !== t; )
|
|
2859
|
+
u.push(h), Se.test(s.charAt(c)) ? (h = s.charAt(c), c++) : (h = t, d === 0 && f(ke));
|
|
2860
|
+
u !== t ? ($ = e, n = lo(), e = n) : (c = e, e = t);
|
|
2861
2861
|
} else
|
|
2862
|
-
|
|
2862
|
+
c = e, e = t;
|
|
2863
2863
|
else
|
|
2864
|
-
|
|
2864
|
+
c = e, e = t;
|
|
2865
2865
|
return e;
|
|
2866
2866
|
}
|
|
2867
|
-
function
|
|
2868
|
-
var e, n, l,
|
|
2869
|
-
if (e =
|
|
2870
|
-
if (s.charCodeAt(
|
|
2871
|
-
for (
|
|
2872
|
-
|
|
2873
|
-
|
|
2867
|
+
function Do() {
|
|
2868
|
+
var e, n, l, u, h;
|
|
2869
|
+
if (e = c, n = Oe(), n !== t)
|
|
2870
|
+
if (s.charCodeAt(c) === 94 ? (l = Jr, c++) : (l = t, d === 0 && f(ei)), l !== t) {
|
|
2871
|
+
for (u = [], Se.test(s.charAt(c)) ? (h = s.charAt(c), c++) : (h = t, d === 0 && f(ke)); h !== t; )
|
|
2872
|
+
u.push(h), Se.test(s.charAt(c)) ? (h = s.charAt(c), c++) : (h = t, d === 0 && f(ke));
|
|
2873
|
+
u !== t ? ($ = e, n = po(), e = n) : (c = e, e = t);
|
|
2874
2874
|
} else
|
|
2875
|
-
|
|
2875
|
+
c = e, e = t;
|
|
2876
2876
|
else
|
|
2877
|
-
|
|
2877
|
+
c = e, e = t;
|
|
2878
2878
|
return e;
|
|
2879
2879
|
}
|
|
2880
|
-
function
|
|
2880
|
+
function Oe() {
|
|
2881
2881
|
var e;
|
|
2882
|
-
return e =
|
|
2882
|
+
return e = ht(), e === t && (e = _i()), e;
|
|
2883
2883
|
}
|
|
2884
|
-
function
|
|
2884
|
+
function _i() {
|
|
2885
2885
|
var e, n;
|
|
2886
|
-
if (e = [], n =
|
|
2886
|
+
if (e = [], n = gt(), n !== t)
|
|
2887
2887
|
for (; n !== t; )
|
|
2888
|
-
e.push(n), n =
|
|
2888
|
+
e.push(n), n = gt();
|
|
2889
2889
|
else
|
|
2890
2890
|
e = t;
|
|
2891
2891
|
return e;
|
|
2892
2892
|
}
|
|
2893
|
-
function
|
|
2894
|
-
var e, n, l,
|
|
2895
|
-
return e =
|
|
2893
|
+
function gt() {
|
|
2894
|
+
var e, n, l, u;
|
|
2895
|
+
return e = Vt(), e === t && (e = zo(), e === t && (e = c, n = c, d++, l = wi(), d--, l === t ? n = void 0 : (c = n, n = t), n !== t ? (l = c, d++, u = jo(), d--, u === t ? l = void 0 : (c = l, l = t), l !== t ? (s.length > c ? (u = s.charAt(c), c++) : (u = t, d === 0 && f(kr)), u !== t ? (n = [n, l, u], e = n) : (c = e, e = t)) : (c = e, e = t)) : (c = e, e = t))), e;
|
|
2896
2896
|
}
|
|
2897
|
-
function
|
|
2897
|
+
function jo() {
|
|
2898
2898
|
var e;
|
|
2899
|
-
return e =
|
|
2899
|
+
return e = ut(), e === t && (e = dt(), e === t && (e = vi(), e === t && (e = mi(), e === t && (e = yi(), e === t && (e = xi()))))), e;
|
|
2900
2900
|
}
|
|
2901
|
-
function
|
|
2901
|
+
function zo() {
|
|
2902
2902
|
var e, n, l;
|
|
2903
|
-
return e =
|
|
2903
|
+
return e = c, s.charCodeAt(c) === 92 ? (n = Ie, c++) : (n = t, d === 0 && f(Qe)), n !== t ? (l = wi(), l !== t ? ($ = e, n = uo(), e = n) : (c = e, e = t)) : (c = e, e = t), e;
|
|
2904
2904
|
}
|
|
2905
|
-
function
|
|
2905
|
+
function wi() {
|
|
2906
2906
|
var e;
|
|
2907
|
-
return s.charCodeAt(
|
|
2907
|
+
return s.charCodeAt(c) === 43 ? (e = Ur, c++) : (e = t, d === 0 && f(Fr)), e === t && (s.charCodeAt(c) === 45 ? (e = Ir, c++) : (e = t, d === 0 && f(Qr)), e === t && (s.charCodeAt(c) === 61 ? (e = ho, c++) : (e = t, d === 0 && f(fo)), e === t && (s.charCodeAt(c) === 62 ? (e = Dr, c++) : (e = t, d === 0 && f(jr)), e === t && (s.charCodeAt(c) === 60 ? (e = Lr, c++) : (e = t, d === 0 && f(Nr)), e === t && (s.charCodeAt(c) === 33 ? (e = qr, c++) : (e = t, d === 0 && f(Wr)), e === t && (s.charCodeAt(c) === 40 ? (e = k, c++) : (e = t, d === 0 && f(z)), e === t && (s.charCodeAt(c) === 41 ? (e = it, c++) : (e = t, d === 0 && f(se)), e === t && (s.charCodeAt(c) === 123 ? (e = Ae, c++) : (e = t, d === 0 && f(jt)), e === t && (s.charCodeAt(c) === 125 ? (e = zt, c++) : (e = t, d === 0 && f(Rt)), e === t && (s.charCodeAt(c) === 91 ? (e = ti, c++) : (e = t, d === 0 && f(ri)), e === t && (s.charCodeAt(c) === 93 ? (e = ii, c++) : (e = t, d === 0 && f(si)), e === t && (s.charCodeAt(c) === 94 ? (e = Jr, c++) : (e = t, d === 0 && f(ei)), e === t && (s.charCodeAt(c) === 34 ? (e = Ue, c++) : (e = t, d === 0 && f(Fe)), e === t && (s.charCodeAt(c) === 126 ? (e = Ft, c++) : (e = t, d === 0 && f(It)), e === t && (s.charCodeAt(c) === 42 ? (e = ot, c++) : (e = t, d === 0 && f(nt)), e === t && (s.charCodeAt(c) === 63 ? (e = Zr, c++) : (e = t, d === 0 && f(Vr)), e === t && (s.charCodeAt(c) === 58 ? (e = K, c++) : (e = t, d === 0 && f(R)), e === t && (s.charCodeAt(c) === 92 ? (e = Ie, c++) : (e = t, d === 0 && f(Qe)), e === t && (s.charCodeAt(c) === 47 ? (e = Mt, c++) : (e = t, d === 0 && f(Ut))))))))))))))))))))), e;
|
|
2908
2908
|
}
|
|
2909
|
-
function
|
|
2910
|
-
var e, n, l,
|
|
2911
|
-
if (e =
|
|
2909
|
+
function xi() {
|
|
2910
|
+
var e, n, l, u, h;
|
|
2911
|
+
if (e = c, n = [], l = m(), l !== t)
|
|
2912
2912
|
for (; l !== t; )
|
|
2913
2913
|
n.push(l), l = m();
|
|
2914
2914
|
else
|
|
2915
2915
|
n = t;
|
|
2916
2916
|
if (n !== t)
|
|
2917
|
-
if (s.substr(
|
|
2918
|
-
if (
|
|
2917
|
+
if (s.substr(c, 2) === oi ? (l = oi, c += 2) : (l = t, d === 0 && f(go)), l !== t) {
|
|
2918
|
+
if (u = [], h = m(), h !== t)
|
|
2919
2919
|
for (; h !== t; )
|
|
2920
|
-
|
|
2920
|
+
u.push(h), h = m();
|
|
2921
2921
|
else
|
|
2922
|
-
|
|
2923
|
-
|
|
2922
|
+
u = t;
|
|
2923
|
+
u !== t ? (n = [n, l, u], e = n) : (c = e, e = t);
|
|
2924
2924
|
} else
|
|
2925
|
-
|
|
2925
|
+
c = e, e = t;
|
|
2926
2926
|
else
|
|
2927
|
-
|
|
2927
|
+
c = e, e = t;
|
|
2928
2928
|
return e;
|
|
2929
2929
|
}
|
|
2930
|
-
function
|
|
2930
|
+
function Ro() {
|
|
2931
2931
|
var e;
|
|
2932
|
-
return s.charCodeAt(
|
|
2932
|
+
return s.charCodeAt(c) === 91 ? (e = ti, c++) : (e = t, d === 0 && f(ri)), e === t && (s.charCodeAt(c) === 123 ? (e = Ae, c++) : (e = t, d === 0 && f(jt))), e;
|
|
2933
2933
|
}
|
|
2934
|
-
function
|
|
2934
|
+
function Bo() {
|
|
2935
2935
|
var e;
|
|
2936
|
-
return s.charCodeAt(
|
|
2936
|
+
return s.charCodeAt(c) === 93 ? (e = ii, c++) : (e = t, d === 0 && f(si)), e === t && (s.charCodeAt(c) === 125 ? (e = zt, c++) : (e = t, d === 0 && f(Rt))), e;
|
|
2937
2937
|
}
|
|
2938
|
-
const { errorOnLuceneSyntax:
|
|
2939
|
-
if (
|
|
2940
|
-
return
|
|
2941
|
-
throw
|
|
2938
|
+
const { errorOnLuceneSyntax: Mo, parseCursor: Uo, cursorSymbol: Fo, allowLeadingWildcards: Io = !0, helpers: { nodeTypes: fe } } = a, V = fe.function.buildNodeWithArgumentNodes, oe = fe.literal.buildNode, Qo = fe.wildcard.buildNode, Ho = fe.namedArg.buildNode, { wildcardSymbol: Ai } = fe.wildcard;
|
|
2939
|
+
if (ct = g(), ct !== t && c === s.length)
|
|
2940
|
+
return ct;
|
|
2941
|
+
throw ct !== t && c < s.length && f({ type: "end", description: "end of input" }), ai(
|
|
2942
2942
|
null,
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2943
|
+
Qt,
|
|
2944
|
+
Z < s.length ? s.charAt(Z) : null,
|
|
2945
|
+
Z < s.length ? lt(Z, Z + 1) : lt(Z, Z)
|
|
2946
2946
|
);
|
|
2947
2947
|
}
|
|
2948
2948
|
return {
|
|
2949
2949
|
SyntaxError: r,
|
|
2950
2950
|
parse: o
|
|
2951
2951
|
};
|
|
2952
|
-
}(),
|
|
2952
|
+
}(), gr = (i, r = {}, o = Nt) => {
|
|
2953
2953
|
if (typeof i > "u")
|
|
2954
2954
|
throw new Error("expression must be a string, got undefined instead");
|
|
2955
|
-
return o(i, { ...r, helpers: { nodeTypes:
|
|
2956
|
-
},
|
|
2955
|
+
return o(i, { ...r, helpers: { nodeTypes: le } });
|
|
2956
|
+
}, ze = (i, r = {}) => gr(
|
|
2957
2957
|
i,
|
|
2958
2958
|
{
|
|
2959
2959
|
...r,
|
|
2960
2960
|
startRule: "Literal"
|
|
2961
2961
|
},
|
|
2962
|
-
|
|
2963
|
-
),
|
|
2962
|
+
Nt
|
|
2963
|
+
), Ct = (i, r = {}) => {
|
|
2964
2964
|
try {
|
|
2965
|
-
return
|
|
2965
|
+
return gr(i, r, Nt);
|
|
2966
2966
|
} catch (o) {
|
|
2967
|
-
throw o.name === "SyntaxError" ? new
|
|
2967
|
+
throw o.name === "SyntaxError" ? new rs(o, i) : o;
|
|
2968
2968
|
}
|
|
2969
|
-
},
|
|
2969
|
+
}, qn = (i) => {
|
|
2970
2970
|
try {
|
|
2971
|
-
return
|
|
2971
|
+
return gr(i, { errorOnLuceneSyntax: !0 }, Nt), !1;
|
|
2972
2972
|
} catch (r) {
|
|
2973
2973
|
return r.message.startsWith("Lucene");
|
|
2974
2974
|
}
|
|
2975
|
-
}, D = (i, r, o, s) => (r = void 0, !i || !i.type || !
|
|
2976
|
-
function
|
|
2975
|
+
}, D = (i, r, o, s) => (r = void 0, !i || !i.type || !le[i.type] ? D(le.function.buildNode("and", []), r) : le[i.type].toOpenSearchQuery(i, r, o, s)), ie = "@kuery-wildcard@";
|
|
2976
|
+
function Wn(i) {
|
|
2977
2977
|
return i.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
2978
2978
|
}
|
|
2979
|
-
function
|
|
2979
|
+
function Yn(i) {
|
|
2980
2980
|
return i.replace(/[+-=&|><!(){}[\]^"~*?:\\/]/g, "\\$&");
|
|
2981
2981
|
}
|
|
2982
|
-
function
|
|
2983
|
-
return i.includes(
|
|
2982
|
+
function Kn(i) {
|
|
2983
|
+
return i.includes(ie) ? {
|
|
2984
2984
|
type: "wildcard",
|
|
2985
2985
|
value: i
|
|
2986
|
-
} :
|
|
2986
|
+
} : ze(i);
|
|
2987
2987
|
}
|
|
2988
|
-
function
|
|
2989
|
-
const { value: o } = i, s = o.split(
|
|
2988
|
+
function is(i, r) {
|
|
2989
|
+
const { value: o } = i, s = o.split(ie).map(Wn).join("[\\s\\S]*");
|
|
2990
2990
|
return new RegExp(`^${s}$`).test(r);
|
|
2991
2991
|
}
|
|
2992
|
-
function
|
|
2992
|
+
function Zn(i) {
|
|
2993
2993
|
const { value: r } = i;
|
|
2994
|
-
return r.split(
|
|
2994
|
+
return r.split(ie).join("*");
|
|
2995
2995
|
}
|
|
2996
|
-
function
|
|
2996
|
+
function or(i) {
|
|
2997
2997
|
const { value: r } = i;
|
|
2998
|
-
return r.split(
|
|
2998
|
+
return r.split(ie).map(Yn).join("*");
|
|
2999
2999
|
}
|
|
3000
|
-
function
|
|
3000
|
+
function Vn(i) {
|
|
3001
3001
|
const { value: r } = i;
|
|
3002
|
-
return r.startsWith(
|
|
3002
|
+
return r.startsWith(ie) && r.replace(ie, "").length > 0;
|
|
3003
3003
|
}
|
|
3004
|
-
const
|
|
3004
|
+
const Xn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3005
3005
|
__proto__: null,
|
|
3006
|
-
buildNode:
|
|
3007
|
-
hasLeadingWildcard:
|
|
3008
|
-
test:
|
|
3009
|
-
toOpenSearchQuery:
|
|
3010
|
-
toQueryStringQuery:
|
|
3011
|
-
wildcardSymbol:
|
|
3006
|
+
buildNode: Kn,
|
|
3007
|
+
hasLeadingWildcard: Vn,
|
|
3008
|
+
test: is,
|
|
3009
|
+
toOpenSearchQuery: Zn,
|
|
3010
|
+
toQueryStringQuery: or,
|
|
3011
|
+
wildcardSymbol: ie
|
|
3012
3012
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3013
|
-
function
|
|
3013
|
+
function br(i, r) {
|
|
3014
3014
|
if (!r) return [];
|
|
3015
3015
|
if (i.type === "literal") {
|
|
3016
|
-
const o =
|
|
3016
|
+
const o = fr(i), s = r.fields.find((a) => a.name === o);
|
|
3017
3017
|
return s ? [s] : [];
|
|
3018
3018
|
} else if (i.type === "wildcard")
|
|
3019
|
-
return r.fields.filter((s) =>
|
|
3019
|
+
return r.fields.filter((s) => is(i, s.name));
|
|
3020
3020
|
}
|
|
3021
|
-
function
|
|
3021
|
+
function ss(i, r, o) {
|
|
3022
3022
|
const s = {
|
|
3023
3023
|
...i,
|
|
3024
3024
|
value: o ? `${o}.${i.value}` : i.value
|
|
3025
3025
|
};
|
|
3026
3026
|
if (!r || s.type === "wildcard" && !o)
|
|
3027
3027
|
return s;
|
|
3028
|
-
const t =
|
|
3029
|
-
const v =
|
|
3028
|
+
const t = br(s, r).reduce((p, g) => {
|
|
3029
|
+
const v = g.subType && g.subType.nested ? g.subType.nested.path : void 0;
|
|
3030
3030
|
return o && !v ? [
|
|
3031
|
-
...
|
|
3032
|
-
`${
|
|
3031
|
+
...p,
|
|
3032
|
+
`${g.name} is not a nested field but is in nested group "${o}" in the DQL expression.`
|
|
3033
3033
|
] : v && !o ? [
|
|
3034
|
-
...
|
|
3035
|
-
`${
|
|
3034
|
+
...p,
|
|
3035
|
+
`${g.name} is a nested field, but is not in a nested group in the DQL expression.`
|
|
3036
3036
|
] : v !== o ? [
|
|
3037
|
-
...
|
|
3038
|
-
`Nested field ${
|
|
3039
|
-
] :
|
|
3037
|
+
...p,
|
|
3038
|
+
`Nested field ${g.name} is being queried with the incorrect nested path. The correct path is ${g.subType.nested.path}.`
|
|
3039
|
+
] : p;
|
|
3040
3040
|
}, []);
|
|
3041
3041
|
if (t.length > 0)
|
|
3042
3042
|
throw new Error(t.join(`
|
|
3043
3043
|
`));
|
|
3044
3044
|
return s;
|
|
3045
3045
|
}
|
|
3046
|
-
function
|
|
3046
|
+
function Gn(i, r, o = !1) {
|
|
3047
3047
|
if (i === void 0)
|
|
3048
3048
|
throw new Error("fieldName is a required argument");
|
|
3049
3049
|
if (r === void 0)
|
|
3050
3050
|
throw new Error("value is a required argument");
|
|
3051
|
-
const s = typeof i == "string" ?
|
|
3051
|
+
const s = typeof i == "string" ? ze(i) : Le(i), a = typeof r == "string" ? ze(r) : Le(r), t = Le(o);
|
|
3052
3052
|
return {
|
|
3053
|
-
arguments: [s,
|
|
3053
|
+
arguments: [s, a, t]
|
|
3054
3054
|
};
|
|
3055
3055
|
}
|
|
3056
|
-
function
|
|
3056
|
+
function Jn(i, r, o = {}, s = {}) {
|
|
3057
3057
|
const {
|
|
3058
|
-
arguments: [
|
|
3059
|
-
} = i,
|
|
3060
|
-
|
|
3058
|
+
arguments: [a, t, p]
|
|
3059
|
+
} = i, g = ss(
|
|
3060
|
+
a,
|
|
3061
3061
|
r,
|
|
3062
3062
|
s != null && s.nested ? s.nested.path : void 0
|
|
3063
|
-
), v = D(
|
|
3064
|
-
if (
|
|
3063
|
+
), v = D(g), x = t !== void 0 ? D(t) : t, A = p.value ? "phrase" : "best_fields";
|
|
3064
|
+
if (g.value === null)
|
|
3065
3065
|
return t.type === "wildcard" ? {
|
|
3066
3066
|
query_string: {
|
|
3067
|
-
query:
|
|
3067
|
+
query: or(t)
|
|
3068
3068
|
}
|
|
3069
3069
|
} : {
|
|
3070
3070
|
multi_match: {
|
|
@@ -3073,54 +3073,54 @@ function Xn(i, r, o = {}, s = {}) {
|
|
|
3073
3073
|
lenient: !0
|
|
3074
3074
|
}
|
|
3075
3075
|
};
|
|
3076
|
-
const w = r ?
|
|
3076
|
+
const w = r ? br(g, r) : [];
|
|
3077
3077
|
w && w.length === 0 && w.push({
|
|
3078
|
-
name: D(
|
|
3078
|
+
name: D(g),
|
|
3079
3079
|
scripted: !1,
|
|
3080
3080
|
type: ""
|
|
3081
3081
|
});
|
|
3082
|
-
const S = t.type === "wildcard" && x === "*", k =
|
|
3082
|
+
const S = t.type === "wildcard" && x === "*", k = g.type === "wildcard" && v === "*" || w && r && w.length === r.fields.length;
|
|
3083
3083
|
return S && k ? { match_all: {} } : {
|
|
3084
3084
|
bool: {
|
|
3085
|
-
should: w.reduce((
|
|
3086
|
-
const
|
|
3087
|
-
var
|
|
3088
|
-
return
|
|
3085
|
+
should: w.reduce((se, Y) => {
|
|
3086
|
+
const K = (R) => {
|
|
3087
|
+
var Ae;
|
|
3088
|
+
return g.type !== "wildcard" || !((Ae = Y.subType) != null && Ae.nested) || s != null && s.nested ? R : {
|
|
3089
3089
|
nested: {
|
|
3090
|
-
path:
|
|
3090
|
+
path: Y.subType.nested.path,
|
|
3091
3091
|
query: R,
|
|
3092
3092
|
score_mode: "none"
|
|
3093
3093
|
}
|
|
3094
3094
|
};
|
|
3095
3095
|
};
|
|
3096
|
-
if (
|
|
3096
|
+
if (Y.scripted)
|
|
3097
3097
|
return [];
|
|
3098
3098
|
if (S)
|
|
3099
3099
|
return [
|
|
3100
|
-
...
|
|
3101
|
-
|
|
3100
|
+
...se,
|
|
3101
|
+
K({
|
|
3102
3102
|
exists: {
|
|
3103
|
-
field:
|
|
3103
|
+
field: Y.name
|
|
3104
3104
|
}
|
|
3105
3105
|
})
|
|
3106
3106
|
];
|
|
3107
3107
|
if (t.type === "wildcard")
|
|
3108
3108
|
return [
|
|
3109
|
-
...
|
|
3110
|
-
|
|
3109
|
+
...se,
|
|
3110
|
+
K({
|
|
3111
3111
|
query_string: {
|
|
3112
|
-
fields: [
|
|
3113
|
-
query:
|
|
3112
|
+
fields: [Y.name],
|
|
3113
|
+
query: or(t)
|
|
3114
3114
|
}
|
|
3115
3115
|
})
|
|
3116
3116
|
];
|
|
3117
|
-
if (
|
|
3117
|
+
if (Y.type === "date") {
|
|
3118
3118
|
const R = o.dateFormatTZ ? { time_zone: o.dateFormatTZ } : {};
|
|
3119
3119
|
return [
|
|
3120
|
-
...
|
|
3121
|
-
|
|
3120
|
+
...se,
|
|
3121
|
+
K({
|
|
3122
3122
|
range: {
|
|
3123
|
-
[
|
|
3123
|
+
[Y.name]: {
|
|
3124
3124
|
gte: x,
|
|
3125
3125
|
lte: x,
|
|
3126
3126
|
...R
|
|
@@ -3131,10 +3131,10 @@ function Xn(i, r, o = {}, s = {}) {
|
|
|
3131
3131
|
} else {
|
|
3132
3132
|
const R = A === "phrase" ? "match_phrase" : "match";
|
|
3133
3133
|
return [
|
|
3134
|
-
...
|
|
3135
|
-
|
|
3134
|
+
...se,
|
|
3135
|
+
K({
|
|
3136
3136
|
[R]: {
|
|
3137
|
-
[
|
|
3137
|
+
[Y.name]: x
|
|
3138
3138
|
}
|
|
3139
3139
|
})
|
|
3140
3140
|
];
|
|
@@ -3144,34 +3144,34 @@ function Xn(i, r, o = {}, s = {}) {
|
|
|
3144
3144
|
}
|
|
3145
3145
|
};
|
|
3146
3146
|
}
|
|
3147
|
-
const
|
|
3147
|
+
const ea = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3148
3148
|
__proto__: null,
|
|
3149
|
-
buildNodeParams:
|
|
3150
|
-
toOpenSearchQuery:
|
|
3149
|
+
buildNodeParams: Gn,
|
|
3150
|
+
toOpenSearchQuery: Jn
|
|
3151
3151
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3152
|
-
function
|
|
3152
|
+
function ta(i) {
|
|
3153
3153
|
return {
|
|
3154
3154
|
arguments: i
|
|
3155
3155
|
};
|
|
3156
3156
|
}
|
|
3157
|
-
function
|
|
3157
|
+
function ra(i, r, o = {}, s = {}) {
|
|
3158
3158
|
return {
|
|
3159
3159
|
bool: {
|
|
3160
3160
|
filter: (i.arguments || []).map((t) => D(t, r, o, s))
|
|
3161
3161
|
}
|
|
3162
3162
|
};
|
|
3163
3163
|
}
|
|
3164
|
-
const
|
|
3164
|
+
const ia = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3165
3165
|
__proto__: null,
|
|
3166
|
-
buildNodeParams:
|
|
3167
|
-
toOpenSearchQuery:
|
|
3166
|
+
buildNodeParams: ta,
|
|
3167
|
+
toOpenSearchQuery: ra
|
|
3168
3168
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3169
|
-
function
|
|
3169
|
+
function sa(i) {
|
|
3170
3170
|
return {
|
|
3171
3171
|
arguments: i
|
|
3172
3172
|
};
|
|
3173
3173
|
}
|
|
3174
|
-
function
|
|
3174
|
+
function oa(i, r, o = {}, s = {}) {
|
|
3175
3175
|
return {
|
|
3176
3176
|
bool: {
|
|
3177
3177
|
should: (i.arguments || []).map((t) => D(t, r, o, s)),
|
|
@@ -3179,60 +3179,60 @@ function ia(i, r, o = {}, s = {}) {
|
|
|
3179
3179
|
}
|
|
3180
3180
|
};
|
|
3181
3181
|
}
|
|
3182
|
-
const
|
|
3182
|
+
const na = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3183
3183
|
__proto__: null,
|
|
3184
|
-
buildNodeParams:
|
|
3185
|
-
toOpenSearchQuery:
|
|
3184
|
+
buildNodeParams: sa,
|
|
3185
|
+
toOpenSearchQuery: oa
|
|
3186
3186
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3187
|
-
function
|
|
3187
|
+
function aa(i) {
|
|
3188
3188
|
return {
|
|
3189
3189
|
arguments: [i]
|
|
3190
3190
|
};
|
|
3191
3191
|
}
|
|
3192
|
-
function
|
|
3193
|
-
const [
|
|
3192
|
+
function ca(i, r, o = {}, s = {}) {
|
|
3193
|
+
const [a] = i.arguments;
|
|
3194
3194
|
return {
|
|
3195
3195
|
bool: {
|
|
3196
|
-
must_not: D(
|
|
3196
|
+
must_not: D(a, r, o, s)
|
|
3197
3197
|
}
|
|
3198
3198
|
};
|
|
3199
3199
|
}
|
|
3200
|
-
const
|
|
3200
|
+
const la = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3201
3201
|
__proto__: null,
|
|
3202
|
-
buildNodeParams:
|
|
3203
|
-
toOpenSearchQuery:
|
|
3202
|
+
buildNodeParams: aa,
|
|
3203
|
+
toOpenSearchQuery: ca
|
|
3204
3204
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3205
|
-
function
|
|
3205
|
+
function pa(i, ...r) {
|
|
3206
3206
|
let o = {};
|
|
3207
3207
|
for (let s of r)
|
|
3208
3208
|
o[s] = i[s];
|
|
3209
3209
|
return o;
|
|
3210
3210
|
}
|
|
3211
|
-
function
|
|
3212
|
-
const o =
|
|
3213
|
-
let [
|
|
3214
|
-
return
|
|
3211
|
+
function ua(i, r) {
|
|
3212
|
+
const o = pa(r, "gt", "lt", "gte", "lte", "format"), s = typeof i == "string" ? ze(i) : le.literal.buildNode(i), a = Object.entries(o).map((t) => {
|
|
3213
|
+
let [p, g] = t;
|
|
3214
|
+
return le.namedArg.buildNode(p, g);
|
|
3215
3215
|
});
|
|
3216
3216
|
return {
|
|
3217
|
-
arguments: [s, ...
|
|
3217
|
+
arguments: [s, ...a]
|
|
3218
3218
|
};
|
|
3219
3219
|
}
|
|
3220
|
-
function
|
|
3221
|
-
const [
|
|
3222
|
-
|
|
3220
|
+
function da(i, r, o = {}, s = {}) {
|
|
3221
|
+
const [a, ...t] = i.arguments, p = ss(
|
|
3222
|
+
a,
|
|
3223
3223
|
r,
|
|
3224
3224
|
s != null && s.nested ? s.nested.path : void 0
|
|
3225
|
-
),
|
|
3226
|
-
return
|
|
3227
|
-
name: D(
|
|
3225
|
+
), g = r ? br(p, r) : [], v = ha(t), x = Object.fromEntries(Object.entries(v).map(([w, S]) => [w, D(S)]));
|
|
3226
|
+
return g && g.length === 0 && g.push({
|
|
3227
|
+
name: D(p),
|
|
3228
3228
|
scripted: !1,
|
|
3229
3229
|
type: ""
|
|
3230
3230
|
}), {
|
|
3231
3231
|
bool: {
|
|
3232
|
-
should:
|
|
3232
|
+
should: g.map((w) => {
|
|
3233
3233
|
const S = (k) => {
|
|
3234
3234
|
var z;
|
|
3235
|
-
return
|
|
3235
|
+
return p.type !== "wildcard" || !((z = w.subType) != null && z.nested) || s.nested ? k : {
|
|
3236
3236
|
nested: {
|
|
3237
3237
|
path: w.subType.nested.path,
|
|
3238
3238
|
query: k,
|
|
@@ -3263,74 +3263,74 @@ function pa(i, r, o = {}, s = {}) {
|
|
|
3263
3263
|
}
|
|
3264
3264
|
};
|
|
3265
3265
|
}
|
|
3266
|
-
function
|
|
3266
|
+
function ha(i) {
|
|
3267
3267
|
if (i.gt && i.gte || i.lt && i.lte)
|
|
3268
3268
|
throw new Error("range ends cannot be both inclusive and exclusive");
|
|
3269
3269
|
const r = ["gte", "lte", "format"];
|
|
3270
|
-
return i.reduce((o, s,
|
|
3270
|
+
return i.reduce((o, s, a) => (s.type === "namedArg" ? o[s.name] = s.value : o[r[a]] = s, o), {});
|
|
3271
3271
|
}
|
|
3272
|
-
const
|
|
3272
|
+
const fa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3273
3273
|
__proto__: null,
|
|
3274
|
-
buildNodeParams:
|
|
3275
|
-
toOpenSearchQuery:
|
|
3274
|
+
buildNodeParams: ua,
|
|
3275
|
+
toOpenSearchQuery: da
|
|
3276
3276
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3277
|
-
function
|
|
3277
|
+
function ga(i) {
|
|
3278
3278
|
return {
|
|
3279
|
-
arguments: [
|
|
3279
|
+
arguments: [Le(i)]
|
|
3280
3280
|
};
|
|
3281
3281
|
}
|
|
3282
|
-
function
|
|
3282
|
+
function ba(i, r, o = {}, s = {}) {
|
|
3283
3283
|
const {
|
|
3284
|
-
arguments: [
|
|
3284
|
+
arguments: [a]
|
|
3285
3285
|
} = i, t = {
|
|
3286
|
-
...
|
|
3287
|
-
value: s != null && s.nested ? `${s.nested.path}.${
|
|
3288
|
-
},
|
|
3289
|
-
if (
|
|
3286
|
+
...a,
|
|
3287
|
+
value: s != null && s.nested ? `${s.nested.path}.${a.value}` : a.value
|
|
3288
|
+
}, p = fr(t), g = ((r == null ? void 0 : r.fields) || []).find((v) => v.name === p);
|
|
3289
|
+
if (g && g.scripted)
|
|
3290
3290
|
throw new Error("Exists query does not support scripted fields");
|
|
3291
3291
|
return {
|
|
3292
|
-
exists: { field:
|
|
3292
|
+
exists: { field: p }
|
|
3293
3293
|
};
|
|
3294
3294
|
}
|
|
3295
|
-
const
|
|
3295
|
+
const va = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3296
3296
|
__proto__: null,
|
|
3297
|
-
buildNodeParams:
|
|
3298
|
-
toOpenSearchQuery:
|
|
3297
|
+
buildNodeParams: ga,
|
|
3298
|
+
toOpenSearchQuery: ba
|
|
3299
3299
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3300
|
-
function
|
|
3300
|
+
function ma(i, r) {
|
|
3301
3301
|
return {
|
|
3302
|
-
arguments: [typeof i == "string" ?
|
|
3302
|
+
arguments: [typeof i == "string" ? ze(i) : Le(i), r]
|
|
3303
3303
|
};
|
|
3304
3304
|
}
|
|
3305
|
-
function
|
|
3305
|
+
function ya(i, r, o = {}, s = {}) {
|
|
3306
3306
|
var v;
|
|
3307
|
-
const [
|
|
3307
|
+
const [a, t] = i.arguments, p = D(a), g = (v = s == null ? void 0 : s.nested) != null && v.path ? `${s.nested.path}.${p}` : p;
|
|
3308
3308
|
return {
|
|
3309
3309
|
nested: {
|
|
3310
|
-
path:
|
|
3310
|
+
path: g,
|
|
3311
3311
|
query: D(t, r, o, {
|
|
3312
3312
|
...s,
|
|
3313
|
-
nested: { path:
|
|
3313
|
+
nested: { path: g }
|
|
3314
3314
|
}),
|
|
3315
3315
|
score_mode: "none"
|
|
3316
3316
|
}
|
|
3317
3317
|
};
|
|
3318
3318
|
}
|
|
3319
|
-
const
|
|
3319
|
+
const $a = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3320
3320
|
__proto__: null,
|
|
3321
|
-
buildNodeParams:
|
|
3322
|
-
toOpenSearchQuery:
|
|
3323
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
3324
|
-
is:
|
|
3325
|
-
and:
|
|
3326
|
-
or:
|
|
3327
|
-
not:
|
|
3328
|
-
range:
|
|
3329
|
-
exists:
|
|
3330
|
-
nested:
|
|
3321
|
+
buildNodeParams: ma,
|
|
3322
|
+
toOpenSearchQuery: ya
|
|
3323
|
+
}, Symbol.toStringTag, { value: "Module" })), vr = {
|
|
3324
|
+
is: ea,
|
|
3325
|
+
and: ia,
|
|
3326
|
+
or: na,
|
|
3327
|
+
not: la,
|
|
3328
|
+
range: fa,
|
|
3329
|
+
exists: va,
|
|
3330
|
+
nested: $a
|
|
3331
3331
|
};
|
|
3332
|
-
function
|
|
3333
|
-
const o =
|
|
3332
|
+
function _a(i, ...r) {
|
|
3333
|
+
const o = vr[i];
|
|
3334
3334
|
if (o === void 0)
|
|
3335
3335
|
throw new Error(`Unknown function "${i}"`);
|
|
3336
3336
|
return {
|
|
@@ -3341,8 +3341,8 @@ function ya(i, ...r) {
|
|
|
3341
3341
|
...o.buildNodeParams(...r)
|
|
3342
3342
|
};
|
|
3343
3343
|
}
|
|
3344
|
-
function
|
|
3345
|
-
if (
|
|
3344
|
+
function wa(i, r) {
|
|
3345
|
+
if (vr[i] === void 0)
|
|
3346
3346
|
throw new Error(`Unknown function "${i}"`);
|
|
3347
3347
|
return {
|
|
3348
3348
|
type: "function",
|
|
@@ -3350,142 +3350,142 @@ function $a(i, r) {
|
|
|
3350
3350
|
arguments: r
|
|
3351
3351
|
};
|
|
3352
3352
|
}
|
|
3353
|
-
function
|
|
3354
|
-
return
|
|
3353
|
+
function xa(i, r, o, s) {
|
|
3354
|
+
return vr[i.function].toOpenSearchQuery(i, r, o, s);
|
|
3355
3355
|
}
|
|
3356
|
-
const
|
|
3356
|
+
const Aa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3357
3357
|
__proto__: null,
|
|
3358
|
-
buildNode:
|
|
3359
|
-
buildNodeWithArgumentNodes:
|
|
3360
|
-
toOpenSearchQuery:
|
|
3358
|
+
buildNode: _a,
|
|
3359
|
+
buildNodeWithArgumentNodes: wa,
|
|
3360
|
+
toOpenSearchQuery: xa
|
|
3361
3361
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3362
|
-
function
|
|
3363
|
-
const o = r.type === "literal" ? r :
|
|
3362
|
+
function Sa(i, r) {
|
|
3363
|
+
const o = r.type === "literal" ? r : le.literal.buildNode(r);
|
|
3364
3364
|
return {
|
|
3365
3365
|
type: "namedArg",
|
|
3366
3366
|
name: i,
|
|
3367
3367
|
value: o
|
|
3368
3368
|
};
|
|
3369
3369
|
}
|
|
3370
|
-
function
|
|
3370
|
+
function ka(i) {
|
|
3371
3371
|
return D(i.value);
|
|
3372
3372
|
}
|
|
3373
|
-
const
|
|
3373
|
+
const Ca = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3374
3374
|
__proto__: null,
|
|
3375
|
-
buildNode:
|
|
3376
|
-
toOpenSearchQuery:
|
|
3377
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
3375
|
+
buildNode: Sa,
|
|
3376
|
+
toOpenSearchQuery: ka
|
|
3377
|
+
}, Symbol.toStringTag, { value: "Module" })), le = {
|
|
3378
3378
|
// This requires better typing of the different typings and their return types.
|
|
3379
3379
|
// @ts-ignore
|
|
3380
|
-
function:
|
|
3381
|
-
literal:
|
|
3382
|
-
namedArg:
|
|
3383
|
-
wildcard:
|
|
3384
|
-
},
|
|
3380
|
+
function: Aa,
|
|
3381
|
+
literal: Hn,
|
|
3382
|
+
namedArg: Ca,
|
|
3383
|
+
wildcard: Xn
|
|
3384
|
+
}, Ea = ie, Oa = (i, r) => "(" + (i.arguments || []).map((s) => $e(s, r)).join(" AND ") + ")", Pa = (i, r) => {
|
|
3385
3385
|
var {
|
|
3386
|
-
arguments: [o, s,
|
|
3386
|
+
arguments: [o, s, a]
|
|
3387
3387
|
} = i;
|
|
3388
3388
|
let t = "=";
|
|
3389
3389
|
s.type === "wildcard" && (t = "");
|
|
3390
|
-
let
|
|
3391
|
-
|
|
3392
|
-
let
|
|
3393
|
-
return
|
|
3394
|
-
},
|
|
3390
|
+
let p = $e(s);
|
|
3391
|
+
a = a.value || typeof p == "string", s.type === "literal" && a && (p = `'${p}'`), s.type === "literal" && !a && (p = `${p}`);
|
|
3392
|
+
let g = $e(o);
|
|
3393
|
+
return g == null ? r && a ? `(${r.filter((v) => v.type === "string").map((v) => `${v.name} ILIKE '%${s.value}%'`).join(" OR ")})` : r && !a && (s.value === !0 || s.value === !1) ? `(${r.filter((v) => v.type === "boolean").map((v) => `${v.name}=${s.value}`).join(" OR ")})` : "" : g + t + p;
|
|
3394
|
+
}, Ta = (i, r) => "(" + (i.arguments || []).map((s) => $e(s, r)).join(" OR ") + ")", La = (i, r) => {
|
|
3395
3395
|
const [o] = i.arguments;
|
|
3396
|
-
return "NOT (" +
|
|
3397
|
-
},
|
|
3396
|
+
return "NOT (" + $e(o, r) + ")";
|
|
3397
|
+
}, Na = {
|
|
3398
3398
|
gt: ">",
|
|
3399
3399
|
lt: "<",
|
|
3400
3400
|
gte: ">=",
|
|
3401
3401
|
lte: "<="
|
|
3402
|
-
},
|
|
3402
|
+
}, Da = (i) => {
|
|
3403
3403
|
const [r, o] = i.arguments;
|
|
3404
3404
|
let s = o.value;
|
|
3405
|
-
const
|
|
3406
|
-
let t =
|
|
3407
|
-
return s.type === "literal" && (t = `${t}`), `${r.value} ${
|
|
3408
|
-
},
|
|
3405
|
+
const a = Na[o.name];
|
|
3406
|
+
let t = $e(s);
|
|
3407
|
+
return s.type === "literal" && (t = `${t}`), `${r.value} ${a} ${t}`;
|
|
3408
|
+
}, ja = (i) => {
|
|
3409
3409
|
const [r] = i.arguments;
|
|
3410
3410
|
return `${r.value} IS NOT NULL`;
|
|
3411
|
-
},
|
|
3412
|
-
is:
|
|
3413
|
-
and:
|
|
3414
|
-
or:
|
|
3415
|
-
not:
|
|
3416
|
-
range:
|
|
3417
|
-
exists:
|
|
3418
|
-
nested:
|
|
3419
|
-
},
|
|
3420
|
-
function: (i, r) =>
|
|
3411
|
+
}, za = (i) => (console.warn("Nested types dont exist in CQL", i), ""), Ra = {
|
|
3412
|
+
is: Pa,
|
|
3413
|
+
and: Oa,
|
|
3414
|
+
or: Ta,
|
|
3415
|
+
not: La,
|
|
3416
|
+
range: Da,
|
|
3417
|
+
exists: ja,
|
|
3418
|
+
nested: za
|
|
3419
|
+
}, Ba = {
|
|
3420
|
+
function: (i, r) => Ra[i.function](i, r),
|
|
3421
3421
|
literal: (i) => i.value,
|
|
3422
3422
|
wildcard: (i) => {
|
|
3423
3423
|
const { value: r } = i;
|
|
3424
|
-
return ` LIKE '${r.split(
|
|
3424
|
+
return ` LIKE '${r.split(Ea).join("%")}'`;
|
|
3425
3425
|
}
|
|
3426
|
-
},
|
|
3427
|
-
const o =
|
|
3426
|
+
}, $e = (i, r) => {
|
|
3427
|
+
const o = Ba[i.type];
|
|
3428
3428
|
return o(i, r);
|
|
3429
|
-
},
|
|
3429
|
+
}, Ma = ie, Ua = (i) => ({ $and: (i.arguments || []).map((s) => pe(s)) }), Fa = (i) => {
|
|
3430
3430
|
const {
|
|
3431
3431
|
arguments: [r, o]
|
|
3432
3432
|
} = i;
|
|
3433
|
-
let s =
|
|
3433
|
+
let s = pe(o);
|
|
3434
3434
|
if (o.type === "wildcard" && o.value === "@kuery-wildcard@")
|
|
3435
|
-
return
|
|
3435
|
+
return os(i);
|
|
3436
3436
|
let t = {};
|
|
3437
|
-
return t[
|
|
3438
|
-
},
|
|
3439
|
-
$or: (i.arguments || []).map((o) =>
|
|
3440
|
-
}),
|
|
3437
|
+
return t[pe(r)] = { $eq: s }, t;
|
|
3438
|
+
}, Ia = (i) => ({
|
|
3439
|
+
$or: (i.arguments || []).map((o) => pe(o))
|
|
3440
|
+
}), Qa = (i) => {
|
|
3441
3441
|
const [r] = i.arguments;
|
|
3442
3442
|
let o = {};
|
|
3443
|
-
return o = { $ne:
|
|
3444
|
-
},
|
|
3443
|
+
return o = { $ne: pe(r) }, o;
|
|
3444
|
+
}, Ha = {
|
|
3445
3445
|
gt: "$gt",
|
|
3446
3446
|
lt: "$lt",
|
|
3447
3447
|
gte: "$gte",
|
|
3448
3448
|
lte: "$lte"
|
|
3449
|
-
},
|
|
3449
|
+
}, qa = (i) => {
|
|
3450
3450
|
const [r, o] = i.arguments;
|
|
3451
3451
|
let s = o.value;
|
|
3452
|
-
const
|
|
3453
|
-
let t =
|
|
3454
|
-
return
|
|
3455
|
-
},
|
|
3452
|
+
const a = Ha[o.name];
|
|
3453
|
+
let t = pe(s), p = {};
|
|
3454
|
+
return p[r.value] = {}, p[r.value][a] = t, p;
|
|
3455
|
+
}, os = (i) => {
|
|
3456
3456
|
const [r] = i.arguments;
|
|
3457
|
-
return { [
|
|
3458
|
-
},
|
|
3459
|
-
is:
|
|
3460
|
-
and:
|
|
3461
|
-
or:
|
|
3462
|
-
not:
|
|
3463
|
-
range:
|
|
3464
|
-
exists:
|
|
3465
|
-
nested:
|
|
3466
|
-
},
|
|
3467
|
-
function: (i) =>
|
|
3457
|
+
return { [pe(r)]: { $ne: null } };
|
|
3458
|
+
}, Wa = (i) => (console.warn("TODO Implement nested search", i), ""), Ya = {
|
|
3459
|
+
is: Fa,
|
|
3460
|
+
and: Ua,
|
|
3461
|
+
or: Ia,
|
|
3462
|
+
not: Qa,
|
|
3463
|
+
range: qa,
|
|
3464
|
+
exists: os,
|
|
3465
|
+
nested: Wa
|
|
3466
|
+
}, Ka = {
|
|
3467
|
+
function: (i) => Ya[i.function](i),
|
|
3468
3468
|
literal: (i) => i.value,
|
|
3469
3469
|
wildcard: (i) => {
|
|
3470
3470
|
const { value: r } = i;
|
|
3471
|
-
return `/${r.split(
|
|
3471
|
+
return `/${r.split(Ma).join(".*")}/`;
|
|
3472
3472
|
}
|
|
3473
|
-
},
|
|
3474
|
-
const o =
|
|
3473
|
+
}, pe = (i, r) => {
|
|
3474
|
+
const o = Ka[i.type];
|
|
3475
3475
|
return o(i, r);
|
|
3476
|
-
},
|
|
3476
|
+
}, Za = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3477
3477
|
__proto__: null,
|
|
3478
|
-
DQLSyntaxError:
|
|
3479
|
-
doesKueryExpressionHaveLuceneSyntaxError:
|
|
3480
|
-
fromKueryExpression:
|
|
3481
|
-
fromLiteralExpression:
|
|
3482
|
-
nodeTypes:
|
|
3483
|
-
parse:
|
|
3484
|
-
toCql:
|
|
3478
|
+
DQLSyntaxError: rs,
|
|
3479
|
+
doesKueryExpressionHaveLuceneSyntaxError: qn,
|
|
3480
|
+
fromKueryExpression: Ct,
|
|
3481
|
+
fromLiteralExpression: ze,
|
|
3482
|
+
nodeTypes: le,
|
|
3483
|
+
parse: Ct,
|
|
3484
|
+
toCql: $e,
|
|
3485
3485
|
toDSL: D,
|
|
3486
|
-
toMongo:
|
|
3486
|
+
toMongo: pe,
|
|
3487
3487
|
toOpenSearchQuery: D
|
|
3488
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
3488
|
+
}, Symbol.toStringTag, { value: "Module" })), Va = W`
|
|
3489
3489
|
:host {
|
|
3490
3490
|
--dialog-padding: var(--spectric-dialog-padding, 5px);
|
|
3491
3491
|
--dialog-background:var(--spectric-background,rgb(246, 249, 252));
|
|
@@ -3533,13 +3533,13 @@ spectric-button{
|
|
|
3533
3533
|
top: 0;
|
|
3534
3534
|
}
|
|
3535
3535
|
`;
|
|
3536
|
-
var
|
|
3537
|
-
for (var
|
|
3538
|
-
(
|
|
3539
|
-
return s &&
|
|
3536
|
+
var Xa = Object.defineProperty, Ga = Object.getOwnPropertyDescriptor, de = (i, r, o, s) => {
|
|
3537
|
+
for (var a = s > 1 ? void 0 : s ? Ga(r, o) : r, t = i.length - 1, p; t >= 0; t--)
|
|
3538
|
+
(p = i[t]) && (a = (s ? p(r, o, a) : p(a)) || a);
|
|
3539
|
+
return s && a && Xa(r, o, a), a;
|
|
3540
3540
|
};
|
|
3541
|
-
const
|
|
3542
|
-
let
|
|
3541
|
+
const ns = "spectric-dialog";
|
|
3542
|
+
let H = class extends O {
|
|
3543
3543
|
constructor() {
|
|
3544
3544
|
super(...arguments), this.open = !1, this.dismissable = !0, this.hideBackdrop = !1, this.title = "", this.closeOnEscape = !0, this.closeOnOutsideClick = !0, this.clickHandler = async (i) => {
|
|
3545
3545
|
const r = await this.dialogElement;
|
|
@@ -3554,14 +3554,14 @@ let Q = class extends O {
|
|
|
3554
3554
|
};
|
|
3555
3555
|
}
|
|
3556
3556
|
static display(i, r) {
|
|
3557
|
-
let o = document.createElement(
|
|
3557
|
+
let o = document.createElement(ns);
|
|
3558
3558
|
o.addEventListener("close", () => {
|
|
3559
3559
|
o.remove();
|
|
3560
3560
|
});
|
|
3561
|
-
for (let
|
|
3562
|
-
o[
|
|
3561
|
+
for (let a in i)
|
|
3562
|
+
o[a] = i[a];
|
|
3563
3563
|
let s = document.createDocumentFragment();
|
|
3564
|
-
return
|
|
3564
|
+
return dr(r, s), o.appendChild(s), o.open = !0, document.body.appendChild(o), o;
|
|
3565
3565
|
}
|
|
3566
3566
|
connectedCallback() {
|
|
3567
3567
|
super.connectedCallback(), this.dialogElement.then((i) => i.addEventListener("keydown", this._handleKeyDown));
|
|
@@ -3596,79 +3596,83 @@ let Q = class extends O {
|
|
|
3596
3596
|
`;
|
|
3597
3597
|
}
|
|
3598
3598
|
};
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
],
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
],
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
],
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
],
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
],
|
|
3615
|
-
|
|
3616
|
-
|
|
3617
|
-
],
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
],
|
|
3621
|
-
|
|
3622
|
-
L(
|
|
3623
|
-
],
|
|
3624
|
-
var
|
|
3625
|
-
for (var
|
|
3626
|
-
(
|
|
3627
|
-
return s &&
|
|
3628
|
-
},
|
|
3629
|
-
const
|
|
3599
|
+
H.styles = Va;
|
|
3600
|
+
de([
|
|
3601
|
+
b({ type: Boolean, reflect: !0 })
|
|
3602
|
+
], H.prototype, "open", 2);
|
|
3603
|
+
de([
|
|
3604
|
+
b({ type: Boolean, reflect: !0 })
|
|
3605
|
+
], H.prototype, "dismissable", 2);
|
|
3606
|
+
de([
|
|
3607
|
+
b({ type: Boolean, reflect: !0 })
|
|
3608
|
+
], H.prototype, "hideBackdrop", 2);
|
|
3609
|
+
de([
|
|
3610
|
+
b({ type: String, reflect: !0 })
|
|
3611
|
+
], H.prototype, "title", 2);
|
|
3612
|
+
de([
|
|
3613
|
+
b({ type: Boolean, reflect: !0 })
|
|
3614
|
+
], H.prototype, "closeOnEscape", 2);
|
|
3615
|
+
de([
|
|
3616
|
+
b({ type: Boolean, reflect: !0 })
|
|
3617
|
+
], H.prototype, "closeOnOutsideClick", 2);
|
|
3618
|
+
de([
|
|
3619
|
+
Tt("dialog")
|
|
3620
|
+
], H.prototype, "dialogElement", 2);
|
|
3621
|
+
H = de([
|
|
3622
|
+
L(ns)
|
|
3623
|
+
], H);
|
|
3624
|
+
var Ja = Object.defineProperty, ec = Object.getOwnPropertyDescriptor, ee = (i, r, o, s) => {
|
|
3625
|
+
for (var a = s > 1 ? void 0 : s ? ec(r, o) : r, t = i.length - 1, p; t >= 0; t--)
|
|
3626
|
+
(p = i[t]) && (a = (s ? p(r, o, a) : p(a)) || a);
|
|
3627
|
+
return s && a && Ja(r, o, a), a;
|
|
3628
|
+
}, tc = /* @__PURE__ */ ((i) => (i.MONGO = "toMongo", i.CQL = "toCql", i.DSL = "toDSL", i.AST = "AST", i))(tc || {});
|
|
3629
|
+
const as = {
|
|
3630
3630
|
eq: { value: " : ", label: " equals some value" },
|
|
3631
3631
|
gt: { value: " > ", label: " is greater than some value" },
|
|
3632
3632
|
lt: { value: " < ", label: " is less than some value" },
|
|
3633
3633
|
gte: { value: " >= ", label: " is greater than or equal to some value" },
|
|
3634
3634
|
lte: { value: " <= ", label: " is less than or equal to some value" }
|
|
3635
|
-
},
|
|
3635
|
+
}, rc = {
|
|
3636
3636
|
eq: { value: ": ", label: " equals some value" },
|
|
3637
3637
|
exists: { value: ": *", label: " exists in any form" }
|
|
3638
|
-
},
|
|
3638
|
+
}, ic = [
|
|
3639
3639
|
{ value: ": true", label: " value is true" },
|
|
3640
3640
|
{ value: ": false", label: "value is false" }
|
|
3641
|
-
],
|
|
3642
|
-
let
|
|
3641
|
+
], sc = Object.fromEntries(Object.entries(as).map(([i, r]) => [i, { value: r.value, label: (r.label || "").replace("value", "date-time") }]));
|
|
3642
|
+
let q = class extends O {
|
|
3643
3643
|
constructor() {
|
|
3644
3644
|
super(), this.placeholder = "", this._value = "", this.value = "", this.outputLanguage = "AST", this.completions = [], this.completionIndex = 0, this.fields = [], this._parseQuery = (i = void 0) => {
|
|
3645
3645
|
let r;
|
|
3646
|
-
if (i && (i != null && i.currentTarget) &&
|
|
3647
|
-
|
|
3646
|
+
if (i && (i != null && i.currentTarget) && (this.value = i.currentTarget.value), this.value)
|
|
3647
|
+
try {
|
|
3648
|
+
i && i.data == "(" && (this.value = this.value + " )", this._input.setSelectionRange(this.value.length - 2, this.value.length - 2));
|
|
3649
|
+
let a = this.value;
|
|
3650
|
+
this._input.selectionStart !== null && (a = a.substring(0, this._input.selectionStart) + "@kuery-cursor@" + a.substring(this._input.selectionStart));
|
|
3651
|
+
let t = Ct(a, { parseCursor: !0, cursorSymbol: "@kuery-cursor@", allowLeadingWildcards: !1 });
|
|
3652
|
+
this.autoComplete(t);
|
|
3653
|
+
} catch {
|
|
3654
|
+
return;
|
|
3655
|
+
}
|
|
3648
3656
|
try {
|
|
3649
|
-
|
|
3650
|
-
let c = this.value;
|
|
3651
|
-
this._input.selectionStart !== null && (c = c.substring(0, this._input.selectionStart) + "@kuery-cursor@" + c.substring(this._input.selectionStart));
|
|
3652
|
-
let t = St(c, { parseCursor: !0, cursorSymbol: "@kuery-cursor@", allowLeadingWildcards: !1 });
|
|
3653
|
-
this.autoComplete(t), r = St(this.value, { allowLeadingWildcards: !1 });
|
|
3657
|
+
r = Ct(this.value, { allowLeadingWildcards: !1 });
|
|
3654
3658
|
} catch {
|
|
3655
3659
|
return;
|
|
3656
3660
|
}
|
|
3657
3661
|
let o;
|
|
3658
|
-
this.outputLanguage == "AST" ? o = r : o =
|
|
3662
|
+
this.outputLanguage == "AST" ? o = r : o = Za[this.outputLanguage](r, this.fields);
|
|
3659
3663
|
let s = new CustomEvent("change", { detail: o });
|
|
3660
3664
|
this.dispatchEvent(s);
|
|
3661
3665
|
}, this.getValuesForField = async (i, r) => (console.log("getValuesForField isn't set no values returned", i, r), []), this._selectCompletion = async () => {
|
|
3662
3666
|
if (!this.suggestion)
|
|
3663
3667
|
return;
|
|
3664
3668
|
let i = this.completions[this.completionIndex], r = this.value.substring(0, i.start) + i.value, o = r.length, s = this.value.substring(i.end);
|
|
3665
|
-
if (i.value.includes(s) ? this.value = r : this.value = r + this.value.substring(i.end), this._input.setSelectionRange(o, o), i.onSelect) {
|
|
3666
|
-
let
|
|
3667
|
-
|
|
3669
|
+
if (i.value.includes(s) ? this.value = r : this.value = r + this.value.substring(i.end), this._input.value = this.value, this._input.setSelectionRange(o, o), i.onSelect) {
|
|
3670
|
+
let a = await i.onSelect();
|
|
3671
|
+
a !== void 0 && (this.value += a, setTimeout(() => {
|
|
3668
3672
|
this._input.focus();
|
|
3669
3673
|
}));
|
|
3670
3674
|
}
|
|
3671
|
-
this.completionIndex = 0, this.completions = [], this._parseQuery();
|
|
3675
|
+
this.completionIndex = 0, this.completions = [], this._parseQuery(), this._input.focus();
|
|
3672
3676
|
}, this._handleArrows = (i) => {
|
|
3673
3677
|
var r;
|
|
3674
3678
|
i.key === "Escape" && (this.completions = []), (i.key == "ArrowLeft" || i.key === "ArrowRight") && setTimeout(this._parseQuery, 100), this.completions.length && ["ArrowUp", "ArrowDown", "Enter", "Tab"].includes(i.key) && this.suggestion && (i.preventDefault(), (i.key === "ArrowDown" || i.key === "Tab") && (this.completionIndex += 1, this.completionIndex > this.completions.length - 1 && (this.completionIndex = 0)), i.key === "ArrowUp" && (this.completionIndex -= 1, this.completionIndex < 0 && (this.completionIndex = this.completions.length - 1)), (r = this._asyncAutocomplete) == null || r.then((o) => {
|
|
@@ -3686,26 +3690,26 @@ let H = class extends O {
|
|
|
3686
3690
|
let r = [];
|
|
3687
3691
|
this.suggestion = i;
|
|
3688
3692
|
let { start: o, end: s } = i;
|
|
3689
|
-
for (let
|
|
3690
|
-
if (
|
|
3691
|
-
let t = this.fields.filter((
|
|
3693
|
+
for (let a of i.suggestionTypes) {
|
|
3694
|
+
if (a == "conjunction" && i.text.endsWith(" ") && r.push(...["and ", "or "].map((t) => ({ type: a, value: t, start: s, end: s }))), a === "field") {
|
|
3695
|
+
let t = this.fields.filter((p) => p.name.includes(i.fieldName) || p.name.includes(i.prefix)).map((p) => [{ type: a, value: p.name, start: o, end: s }]).flat();
|
|
3692
3696
|
r.push(...t);
|
|
3693
3697
|
}
|
|
3694
|
-
if (
|
|
3695
|
-
let t = this.fields.find((
|
|
3696
|
-
t && (t.type === "number" ? r.push(...Object.values(
|
|
3697
|
-
type:
|
|
3698
|
-
...
|
|
3698
|
+
if (a === "operator") {
|
|
3699
|
+
let t = this.fields.find((p) => p.name === i.fieldName);
|
|
3700
|
+
t && (t.type === "number" ? r.push(...Object.values(as).map((p) => ({ type: a, ...p, start: s, end: s }))) : t.type === "string" ? t.format === "date-time" ? r.push(...Object.values(sc).map((p) => ({
|
|
3701
|
+
type: a,
|
|
3702
|
+
...p,
|
|
3699
3703
|
start: s,
|
|
3700
3704
|
end: s,
|
|
3701
3705
|
onSelect: async () => {
|
|
3702
|
-
let
|
|
3703
|
-
|
|
3704
|
-
let v, x =
|
|
3706
|
+
let g = await this.getValuesForField(i.fieldName, i.prefix);
|
|
3707
|
+
g.length === 0 && (g = ["now-1m", "now-1d", "now-1M"]);
|
|
3708
|
+
let v, x = $t();
|
|
3705
3709
|
return await new Promise((A) => {
|
|
3706
|
-
let w =
|
|
3710
|
+
let w = H.display({}, _`
|
|
3707
3711
|
<div class="query-bar-date-quick-select">
|
|
3708
|
-
${
|
|
3712
|
+
${g.map((S) => _`<a href="#" @click=${(k) => {
|
|
3709
3713
|
k.preventDefault(), v = `"${S}"`, A(v), w.open = !1;
|
|
3710
3714
|
}}>${S}</a>`)}
|
|
3711
3715
|
</div>
|
|
@@ -3714,28 +3718,28 @@ let H = class extends O {
|
|
|
3714
3718
|
return;
|
|
3715
3719
|
v = `"${(/* @__PURE__ */ new Date(S.target.value + ":00.000Z")).toISOString()}"`, x.value.disabled = v === void 0;
|
|
3716
3720
|
}}></spectric-input>
|
|
3717
|
-
<spectric-button ${
|
|
3721
|
+
<spectric-button ${_t(x)} .disabled=${!0} @click=${() => {
|
|
3718
3722
|
A(v), w.open = !1;
|
|
3719
3723
|
}}>Submit</spectric-button>
|
|
3720
3724
|
`);
|
|
3721
3725
|
}), v;
|
|
3722
3726
|
}
|
|
3723
|
-
}))) : r.push(...Object.values(
|
|
3727
|
+
}))) : r.push(...Object.values(rc).map((p) => ({ type: a, ...p, start: s, end: s }))) : t.type === "boolean" && r.push(...ic.map((p) => ({ type: a, ...p, start: s, end: s }))));
|
|
3724
3728
|
}
|
|
3725
|
-
if (
|
|
3726
|
-
let t = this.fields.find((
|
|
3729
|
+
if (a === "value") {
|
|
3730
|
+
let t = this.fields.find((p) => p.name === i.fieldName);
|
|
3727
3731
|
if (t && t.type == "boolean")
|
|
3728
|
-
r.push({ type:
|
|
3732
|
+
r.push({ type: a, value: "true", start: o, end: s }, { type: a, value: "false", start: o, end: s });
|
|
3729
3733
|
else {
|
|
3730
3734
|
console.log(`invoke callback to get values for ${i.fieldName}`);
|
|
3731
|
-
let
|
|
3732
|
-
(t == null ? void 0 : t.type) === "string" && (
|
|
3735
|
+
let p = await this.getValuesForField(i.fieldName, i.prefix);
|
|
3736
|
+
(t == null ? void 0 : t.type) === "string" && (p = p.map((g) => `"${g}"`)), r.push(...p.map((g) => ({ type: a, value: g, start: o, end: s })));
|
|
3733
3737
|
}
|
|
3734
3738
|
}
|
|
3735
3739
|
}
|
|
3736
3740
|
if (this.completions = r, this.completions.length && this._autocomplete) {
|
|
3737
|
-
let { width:
|
|
3738
|
-
this._autocomplete.showPopover(), "anchorName" in document.documentElement.style || (this._autocomplete.style.left = `${t + 3.75}px`, this._autocomplete.style.top = `${
|
|
3741
|
+
let { width: a, left: t, bottom: p } = this._input.getBoundingClientRect();
|
|
3742
|
+
this._autocomplete.showPopover(), "anchorName" in document.documentElement.style || (this._autocomplete.style.left = `${t + 3.75}px`, this._autocomplete.style.top = `${p}px`), this._autocomplete.style.width = `${a - 15}px`;
|
|
3739
3743
|
}
|
|
3740
3744
|
}
|
|
3741
3745
|
updated(i) {
|
|
@@ -3753,37 +3757,37 @@ let H = class extends O {
|
|
|
3753
3757
|
</div>`;
|
|
3754
3758
|
}
|
|
3755
3759
|
};
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
],
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
],
|
|
3762
|
-
|
|
3763
|
-
|
|
3764
|
-
],
|
|
3765
|
-
|
|
3766
|
-
|
|
3767
|
-
],
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
],
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
],
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
],
|
|
3777
|
-
|
|
3778
|
-
|
|
3779
|
-
],
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
],
|
|
3783
|
-
|
|
3760
|
+
ee([
|
|
3761
|
+
b({ type: String, reflect: !0 })
|
|
3762
|
+
], q.prototype, "placeholder", 2);
|
|
3763
|
+
ee([
|
|
3764
|
+
b({ type: String, reflect: !0 })
|
|
3765
|
+
], q.prototype, "value", 2);
|
|
3766
|
+
ee([
|
|
3767
|
+
b({ type: String, reflect: !0 })
|
|
3768
|
+
], q.prototype, "outputLanguage", 2);
|
|
3769
|
+
ee([
|
|
3770
|
+
rt()
|
|
3771
|
+
], q.prototype, "completions", 2);
|
|
3772
|
+
ee([
|
|
3773
|
+
rt()
|
|
3774
|
+
], q.prototype, "completionIndex", 2);
|
|
3775
|
+
ee([
|
|
3776
|
+
b({ type: Array, reflect: !0 })
|
|
3777
|
+
], q.prototype, "fields", 2);
|
|
3778
|
+
ee([
|
|
3779
|
+
Re(".autocomplete")
|
|
3780
|
+
], q.prototype, "_autocomplete", 2);
|
|
3781
|
+
ee([
|
|
3782
|
+
Tt(".autocomplete")
|
|
3783
|
+
], q.prototype, "_asyncAutocomplete", 2);
|
|
3784
|
+
ee([
|
|
3785
|
+
Re("spectric-input")
|
|
3786
|
+
], q.prototype, "_input", 2);
|
|
3787
|
+
q = ee([
|
|
3784
3788
|
L("spectric-query")
|
|
3785
|
-
],
|
|
3786
|
-
const
|
|
3789
|
+
], q);
|
|
3790
|
+
const Bi = W`
|
|
3787
3791
|
border-color: color-mix(in hsl, var(--panel-color, #0b0b0b), var(--spectric-input-color, #000000) 3%);
|
|
3788
3792
|
background-color: var(--panel-color,#0b0b0b);
|
|
3789
3793
|
--spectric-input-color: var(--spectric-background);
|
|
@@ -3791,7 +3795,7 @@ const zi = q`
|
|
|
3791
3795
|
--spectric-text-primary:var(--text-primary);
|
|
3792
3796
|
--spectric-text-secondary:var(--text-secondary);
|
|
3793
3797
|
filter: drop-shadow(0px 1px 3px color-mix(in srgb, var(--text-secondary, #3c4c5b), transparent 50%));
|
|
3794
|
-
`,
|
|
3798
|
+
`, Mi = W`
|
|
3795
3799
|
border-color: color-mix(in hsl, var(--panel-color-inverse,#f4f4f4), var(--spectric-input-color, #000000) 3%);
|
|
3796
3800
|
background-color: var(--panel-color-inverse,#0b0b0b);
|
|
3797
3801
|
color:var(--text-primary,#3c4c5b);
|
|
@@ -3799,7 +3803,7 @@ const zi = q`
|
|
|
3799
3803
|
--spectric-text-primary:var(--text-secondary);
|
|
3800
3804
|
--spectric-text-secondary:var(--text-primary);
|
|
3801
3805
|
filter: drop-shadow(0px 1px 3px color-mix(in srgb, var(--text-primary, #3c4c5b), transparent 70%));
|
|
3802
|
-
`,
|
|
3806
|
+
`, oc = W`
|
|
3803
3807
|
:host{
|
|
3804
3808
|
display:block;
|
|
3805
3809
|
border:2px solid black;
|
|
@@ -3809,26 +3813,26 @@ const zi = q`
|
|
|
3809
3813
|
|
|
3810
3814
|
}
|
|
3811
3815
|
:host(spectric-panel[level='0']) {
|
|
3812
|
-
${
|
|
3816
|
+
${Bi};
|
|
3813
3817
|
}
|
|
3814
3818
|
|
|
3815
3819
|
:host(spectric-panel[level='1']) {
|
|
3816
|
-
${
|
|
3820
|
+
${Mi};
|
|
3817
3821
|
}
|
|
3818
3822
|
|
|
3819
3823
|
:host(spectric-panel[level='2']) {
|
|
3820
|
-
${
|
|
3824
|
+
${Bi};
|
|
3821
3825
|
}
|
|
3822
3826
|
:host(spectric-panel[level='3']) {
|
|
3823
|
-
${
|
|
3827
|
+
${Mi};
|
|
3824
3828
|
}
|
|
3825
3829
|
`;
|
|
3826
|
-
var
|
|
3827
|
-
for (var
|
|
3828
|
-
(
|
|
3829
|
-
return s &&
|
|
3830
|
+
var nc = Object.defineProperty, ac = Object.getOwnPropertyDescriptor, mr = (i, r, o, s) => {
|
|
3831
|
+
for (var a = s > 1 ? void 0 : s ? ac(r, o) : r, t = i.length - 1, p; t >= 0; t--)
|
|
3832
|
+
(p = i[t]) && (a = (s ? p(r, o, a) : p(a)) || a);
|
|
3833
|
+
return s && a && nc(r, o, a), a;
|
|
3830
3834
|
};
|
|
3831
|
-
let
|
|
3835
|
+
let Je = class extends O {
|
|
3832
3836
|
constructor() {
|
|
3833
3837
|
super(...arguments), this.level = 0;
|
|
3834
3838
|
}
|
|
@@ -3856,22 +3860,22 @@ let Xe = class extends O {
|
|
|
3856
3860
|
return _` <slot></slot> `;
|
|
3857
3861
|
}
|
|
3858
3862
|
};
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
],
|
|
3863
|
-
|
|
3864
|
-
|
|
3865
|
-
],
|
|
3866
|
-
|
|
3863
|
+
Je.styles = oc;
|
|
3864
|
+
mr([
|
|
3865
|
+
b({ type: Number, reflect: !0 })
|
|
3866
|
+
], Je.prototype, "level", 2);
|
|
3867
|
+
mr([
|
|
3868
|
+
b({ attribute: !1 })
|
|
3869
|
+
], Je.prototype, "layers", 2);
|
|
3870
|
+
Je = mr([
|
|
3867
3871
|
L("spectric-panel")
|
|
3868
|
-
],
|
|
3869
|
-
var
|
|
3870
|
-
for (var
|
|
3871
|
-
(
|
|
3872
|
-
return s &&
|
|
3872
|
+
], Je);
|
|
3873
|
+
var cc = Object.defineProperty, lc = Object.getOwnPropertyDescriptor, cs = (i, r, o, s) => {
|
|
3874
|
+
for (var a = s > 1 ? void 0 : s ? lc(r, o) : r, t = i.length - 1, p; t >= 0; t--)
|
|
3875
|
+
(p = i[t]) && (a = (s ? p(r, o, a) : p(a)) || a);
|
|
3876
|
+
return s && a && cc(r, o, a), a;
|
|
3873
3877
|
};
|
|
3874
|
-
const
|
|
3878
|
+
const Qc = {
|
|
3875
3879
|
"--primary": { control: "color" },
|
|
3876
3880
|
"--secondary": { control: "color" },
|
|
3877
3881
|
"--tertiary": { control: "color" },
|
|
@@ -3882,7 +3886,7 @@ const Bc = {
|
|
|
3882
3886
|
"--text-secondary": { control: "color" },
|
|
3883
3887
|
"--text-on-color": { control: "color" },
|
|
3884
3888
|
"--border-radius": { control: "text" }
|
|
3885
|
-
},
|
|
3889
|
+
}, ls = {
|
|
3886
3890
|
"--secondary": "#77878b",
|
|
3887
3891
|
"--tertiary": "#c7c7c7",
|
|
3888
3892
|
"--disabled": "#000000",
|
|
@@ -3891,20 +3895,20 @@ const Bc = {
|
|
|
3891
3895
|
"--text-on-color": "#ededed",
|
|
3892
3896
|
"--background": "#181818",
|
|
3893
3897
|
"--background-inverse": "#37373d"
|
|
3894
|
-
},
|
|
3895
|
-
...
|
|
3898
|
+
}, Ui = {
|
|
3899
|
+
...ls,
|
|
3896
3900
|
"--primary": "#ffd45a",
|
|
3897
3901
|
"--text-on-color": "#4f4f4f"
|
|
3898
|
-
},
|
|
3902
|
+
}, nr = {
|
|
3899
3903
|
undefined: {},
|
|
3900
3904
|
light: {},
|
|
3901
|
-
dark:
|
|
3902
|
-
spectric:
|
|
3905
|
+
dark: ls,
|
|
3906
|
+
spectric: Ui,
|
|
3903
3907
|
spectricFlat: {
|
|
3904
|
-
...
|
|
3908
|
+
...Ui,
|
|
3905
3909
|
"--border-radius": "1px"
|
|
3906
3910
|
}
|
|
3907
|
-
},
|
|
3911
|
+
}, Hc = Object.fromEntries(Object.keys(nr).map((i) => [i, i])), pc = `
|
|
3908
3912
|
--spectric-background: var(--background,#ffffff);
|
|
3909
3913
|
--spectric-background-hover:var(--background-hover,rgba(141, 141, 141, 0.12));
|
|
3910
3914
|
--spectric-background-inverse: var(--background-inverse,#f4f4f4);
|
|
@@ -3948,7 +3952,7 @@ const Bc = {
|
|
|
3948
3952
|
--spectric-button-disabled: #c6c6c6;
|
|
3949
3953
|
color: var(--spectric-text-primary);
|
|
3950
3954
|
`;
|
|
3951
|
-
let
|
|
3955
|
+
let Et = class extends O {
|
|
3952
3956
|
constructor() {
|
|
3953
3957
|
super(...arguments), this.theme = "undefined";
|
|
3954
3958
|
}
|
|
@@ -3962,15 +3966,15 @@ let kt = class extends O {
|
|
|
3962
3966
|
}
|
|
3963
3967
|
}
|
|
3964
3968
|
render() {
|
|
3965
|
-
let i = Object.keys(
|
|
3966
|
-
|
|
3969
|
+
let i = Object.keys(nr).includes(this.theme) ? this.theme : "undefined", r = Object.entries(
|
|
3970
|
+
nr[i]
|
|
3967
3971
|
).map((o) => `${o[0]}:${o[1]};`).join(`
|
|
3968
3972
|
`);
|
|
3969
3973
|
return _`
|
|
3970
3974
|
${this.theme && this.theme !== "light" ? _`
|
|
3971
3975
|
<style>:host{
|
|
3972
3976
|
${r};
|
|
3973
|
-
${
|
|
3977
|
+
${pc}
|
|
3974
3978
|
}
|
|
3975
3979
|
/* Webkit psudo elements don't pick up variables defined by the host */
|
|
3976
3980
|
::-webkit-scrollbar-thumb {
|
|
@@ -4044,16 +4048,16 @@ let kt = class extends O {
|
|
|
4044
4048
|
`;
|
|
4045
4049
|
}
|
|
4046
4050
|
};
|
|
4047
|
-
|
|
4051
|
+
Et.styles = W`:host{
|
|
4048
4052
|
display:contents;
|
|
4049
4053
|
}`;
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
],
|
|
4053
|
-
|
|
4054
|
+
cs([
|
|
4055
|
+
b({ reflect: !0 })
|
|
4056
|
+
], Et.prototype, "theme", 2);
|
|
4057
|
+
Et = cs([
|
|
4054
4058
|
L("spectric-theme")
|
|
4055
|
-
],
|
|
4056
|
-
const
|
|
4059
|
+
], Et);
|
|
4060
|
+
const uc = W`
|
|
4057
4061
|
:host {
|
|
4058
4062
|
display: block;
|
|
4059
4063
|
height: 100%;
|
|
@@ -4117,35 +4121,35 @@ const lc = q`
|
|
|
4117
4121
|
cursor: ew-resize;
|
|
4118
4122
|
}
|
|
4119
4123
|
`;
|
|
4120
|
-
var
|
|
4121
|
-
for (var
|
|
4122
|
-
(
|
|
4123
|
-
return s &&
|
|
4124
|
-
},
|
|
4125
|
-
const
|
|
4126
|
-
let j = class extends
|
|
4124
|
+
var dc = Object.defineProperty, hc = Object.getOwnPropertyDescriptor, F = (i, r, o, s) => {
|
|
4125
|
+
for (var a = s > 1 ? void 0 : s ? hc(r, o) : r, t = i.length - 1, p; t >= 0; t--)
|
|
4126
|
+
(p = i[t]) && (a = (s ? p(r, o, a) : p(a)) || a);
|
|
4127
|
+
return s && a && dc(r, o, a), a;
|
|
4128
|
+
}, fc = /* @__PURE__ */ ((i) => (i.horizontal = "horizontal", i.vertical = "vertical", i))(fc || {});
|
|
4129
|
+
const gc = "spectric-splitview";
|
|
4130
|
+
let j = class extends es {
|
|
4127
4131
|
constructor() {
|
|
4128
4132
|
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 = () => {
|
|
4129
|
-
let { percentage: r, orientation: o, invisible: s, min:
|
|
4130
|
-
|
|
4131
|
-
}, this._onMouseMove =
|
|
4133
|
+
let { percentage: r, orientation: o, invisible: s, min: a, max: t, useSavedState: p } = this, g = this.getAttribute("id");
|
|
4134
|
+
g && this.useSavedState && localStorage.setItem(`splitview-${g}`, String(r)), this.dispatchEvent(new CustomEvent("change", { detail: { orientation: o, percentage: r, invisible: s, min: a, max: t, useSavedState: p } }));
|
|
4135
|
+
}, this._onMouseMove = ts((r) => {
|
|
4132
4136
|
if (this.isDragging) {
|
|
4133
4137
|
const o = this.getBoundingClientRect();
|
|
4134
|
-
let s,
|
|
4135
|
-
this.orientation === "horizontal" ? (s = r.clientX - o.left,
|
|
4138
|
+
let s, a;
|
|
4139
|
+
this.orientation === "horizontal" ? (s = r.clientX - o.left, a = s / o.width * 100) : (s = r.clientY - o.top, a = s / o.height * 100), a = Math.min(Math.max(a, this.min), this.max), this.percentage = a, this._emitChange();
|
|
4136
4140
|
}
|
|
4137
4141
|
}), this._assignSlot = (r) => {
|
|
4138
4142
|
if (!r.target)
|
|
4139
4143
|
return;
|
|
4140
|
-
let s = r.target.assignedNodes().filter((
|
|
4144
|
+
let s = r.target.assignedNodes().filter((a) => a instanceof HTMLElement);
|
|
4141
4145
|
s.length > 2 && console.log("cannot assign more than 2 elements to a split view"), s.forEach(
|
|
4142
|
-
(
|
|
4146
|
+
(a) => {
|
|
4143
4147
|
if (this._panel1.assignedNodes().length === 0) {
|
|
4144
|
-
|
|
4148
|
+
a.slot = "panel1";
|
|
4145
4149
|
return;
|
|
4146
4150
|
}
|
|
4147
4151
|
if (this._panel2.assignedNodes().length === 0) {
|
|
4148
|
-
|
|
4152
|
+
a.slot = "panel2";
|
|
4149
4153
|
return;
|
|
4150
4154
|
}
|
|
4151
4155
|
this._error = "Too many element assigned to split view splitter can only have a maximum of 2 children", console.warn("Too many element assigned to split view splitter can only have a maximum of 2 children");
|
|
@@ -4184,51 +4188,51 @@ let j = class extends Gi {
|
|
|
4184
4188
|
`;
|
|
4185
4189
|
}
|
|
4186
4190
|
};
|
|
4187
|
-
j.styles =
|
|
4188
|
-
|
|
4189
|
-
|
|
4191
|
+
j.styles = uc;
|
|
4192
|
+
F([
|
|
4193
|
+
b({ type: String })
|
|
4190
4194
|
], j.prototype, "orientation", 2);
|
|
4191
|
-
|
|
4192
|
-
|
|
4195
|
+
F([
|
|
4196
|
+
b({ type: Number, reflect: !0 })
|
|
4193
4197
|
], j.prototype, "percentage", 2);
|
|
4194
|
-
|
|
4195
|
-
|
|
4198
|
+
F([
|
|
4199
|
+
b({ type: Boolean })
|
|
4196
4200
|
], j.prototype, "invisible", 2);
|
|
4197
|
-
|
|
4198
|
-
|
|
4201
|
+
F([
|
|
4202
|
+
b({ type: Number, reflect: !0 })
|
|
4199
4203
|
], j.prototype, "min", 2);
|
|
4200
|
-
|
|
4201
|
-
|
|
4204
|
+
F([
|
|
4205
|
+
b({ type: Number, reflect: !0 })
|
|
4202
4206
|
], j.prototype, "max", 2);
|
|
4203
|
-
|
|
4204
|
-
|
|
4207
|
+
F([
|
|
4208
|
+
b({ type: Boolean, reflect: !0 })
|
|
4205
4209
|
], j.prototype, "useSavedState", 2);
|
|
4206
|
-
|
|
4207
|
-
|
|
4210
|
+
F([
|
|
4211
|
+
rt()
|
|
4208
4212
|
], j.prototype, "isDragging", 2);
|
|
4209
|
-
|
|
4210
|
-
|
|
4213
|
+
F([
|
|
4214
|
+
rt()
|
|
4211
4215
|
], j.prototype, "_error", 2);
|
|
4212
|
-
|
|
4213
|
-
|
|
4216
|
+
F([
|
|
4217
|
+
Tt(".splitter")
|
|
4214
4218
|
], j.prototype, "_splitter", 2);
|
|
4215
|
-
|
|
4216
|
-
|
|
4219
|
+
F([
|
|
4220
|
+
Re("slot[name='panel1']")
|
|
4217
4221
|
], j.prototype, "_panel1", 2);
|
|
4218
|
-
|
|
4219
|
-
|
|
4222
|
+
F([
|
|
4223
|
+
Re("slot[name='panel2']")
|
|
4220
4224
|
], j.prototype, "_panel2", 2);
|
|
4221
|
-
j =
|
|
4222
|
-
L(
|
|
4225
|
+
j = F([
|
|
4226
|
+
L(gc)
|
|
4223
4227
|
], j);
|
|
4224
|
-
var
|
|
4225
|
-
for (var
|
|
4226
|
-
(
|
|
4227
|
-
return s &&
|
|
4228
|
+
var bc = Object.defineProperty, vc = Object.getOwnPropertyDescriptor, Me = (i, r, o, s) => {
|
|
4229
|
+
for (var a = s > 1 ? void 0 : s ? vc(r, o) : r, t = i.length - 1, p; t >= 0; t--)
|
|
4230
|
+
(p = i[t]) && (a = (s ? p(r, o, a) : p(a)) || a);
|
|
4231
|
+
return s && a && bc(r, o, a), a;
|
|
4228
4232
|
};
|
|
4229
|
-
const
|
|
4233
|
+
const mc = "spectric-pagination";
|
|
4230
4234
|
console.log("Pagination");
|
|
4231
|
-
let
|
|
4235
|
+
let _e = class extends O {
|
|
4232
4236
|
constructor() {
|
|
4233
4237
|
super(...arguments), this.page = 1, this.pageSize = 10, this.pageSizeOptions = [10, 20, 50, 100, 1e3], this.size = "xsmall", this._handlePageUp = () => {
|
|
4234
4238
|
this.page += 1, this._emitChange();
|
|
@@ -4267,8 +4271,8 @@ let ye = class extends O {
|
|
|
4267
4271
|
${o}
|
|
4268
4272
|
</div>
|
|
4269
4273
|
<div>
|
|
4270
|
-
<spectric-button size=${this.size} ?disabled=${this.page === 1} @click=${this._handlePageDown} icon
|
|
4271
|
-
<spectric-button size=${this.size} ?disabled=${r} @click=${this._handlePageUp} icon
|
|
4274
|
+
<spectric-button size=${this.size} ?disabled=${this.page === 1} @click=${this._handlePageDown} icon>🠈</spectric-button>
|
|
4275
|
+
<spectric-button size=${this.size} ?disabled=${r} @click=${this._handlePageUp} icon>🠊</spectric-button>
|
|
4272
4276
|
</div>
|
|
4273
4277
|
</div>
|
|
4274
4278
|
` : null}
|
|
@@ -4276,33 +4280,35 @@ let ye = class extends O {
|
|
|
4276
4280
|
`;
|
|
4277
4281
|
}
|
|
4278
4282
|
};
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
],
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
],
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
],
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
],
|
|
4291
|
-
|
|
4292
|
-
|
|
4293
|
-
],
|
|
4294
|
-
|
|
4295
|
-
L(
|
|
4296
|
-
],
|
|
4297
|
-
var
|
|
4298
|
-
for (var
|
|
4299
|
-
(
|
|
4300
|
-
return s &&
|
|
4283
|
+
Me([
|
|
4284
|
+
b({ type: Number, reflect: !0 })
|
|
4285
|
+
], _e.prototype, "page", 2);
|
|
4286
|
+
Me([
|
|
4287
|
+
b({ type: Number, reflect: !0 })
|
|
4288
|
+
], _e.prototype, "pageSize", 2);
|
|
4289
|
+
Me([
|
|
4290
|
+
b({ type: Number, reflect: !0 })
|
|
4291
|
+
], _e.prototype, "totalItems", 2);
|
|
4292
|
+
Me([
|
|
4293
|
+
b({ type: Array })
|
|
4294
|
+
], _e.prototype, "pageSizeOptions", 2);
|
|
4295
|
+
Me([
|
|
4296
|
+
b({ type: String, reflect: !0 })
|
|
4297
|
+
], _e.prototype, "size", 2);
|
|
4298
|
+
_e = Me([
|
|
4299
|
+
L(mc)
|
|
4300
|
+
], _e);
|
|
4301
|
+
var yc = Object.defineProperty, $c = Object.getOwnPropertyDescriptor, ps = (i, r, o, s) => {
|
|
4302
|
+
for (var a = s > 1 ? void 0 : s ? $c(r, o) : r, t = i.length - 1, p; t >= 0; t--)
|
|
4303
|
+
(p = i[t]) && (a = (s ? p(r, o, a) : p(a)) || a);
|
|
4304
|
+
return s && a && yc(r, o, a), a;
|
|
4301
4305
|
};
|
|
4302
|
-
const
|
|
4303
|
-
let
|
|
4306
|
+
const _c = "spectric-table-header";
|
|
4307
|
+
let ar = class extends O {
|
|
4304
4308
|
constructor() {
|
|
4305
|
-
super(...arguments), this.columns = []
|
|
4309
|
+
super(...arguments), this.columns = [], this._handleSortChange = (i) => {
|
|
4310
|
+
i = JSON.parse(JSON.stringify(i)), i.sortable && (i.sortDirection === B.none || i.sortDirection === void 0 ? i.sortDirection = B.ascending : i.sortDirection === B.ascending ? i.sortDirection = B.decending : i.sortDirection === B.decending && (i.sortDirection = B.none), this.dispatchEvent(new CustomEvent("sortChange", { detail: i })));
|
|
4311
|
+
};
|
|
4306
4312
|
}
|
|
4307
4313
|
createRenderRoot() {
|
|
4308
4314
|
return this;
|
|
@@ -4312,29 +4318,31 @@ let or = class extends O {
|
|
|
4312
4318
|
<tr>
|
|
4313
4319
|
${this.columns.map((i) => {
|
|
4314
4320
|
let r = ["header-contents"];
|
|
4315
|
-
|
|
4321
|
+
i.filterable, i.sortable && r.push("sortable");
|
|
4322
|
+
let o = i.sortDirection === B.ascending ? "🠉" : i.sortDirection == B.decending ? "🠋" : "", s = i.sortDirection || B.none;
|
|
4323
|
+
return _`<td @click=${() => this._handleSortChange(i)}><div class=${r.join(" ")}>${i.title || i.key} <span class="sort-direction ${s}">${o}</span></div></td>`;
|
|
4316
4324
|
})}
|
|
4317
4325
|
</tr>
|
|
4318
4326
|
`;
|
|
4319
4327
|
}
|
|
4320
4328
|
};
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
],
|
|
4324
|
-
|
|
4325
|
-
L(
|
|
4326
|
-
],
|
|
4327
|
-
var
|
|
4328
|
-
for (var
|
|
4329
|
-
(
|
|
4330
|
-
return s &&
|
|
4329
|
+
ps([
|
|
4330
|
+
b({ type: Array, attribute: !1 })
|
|
4331
|
+
], ar.prototype, "columns", 2);
|
|
4332
|
+
ar = ps([
|
|
4333
|
+
L(_c)
|
|
4334
|
+
], ar);
|
|
4335
|
+
var wc = Object.defineProperty, xc = Object.getOwnPropertyDescriptor, Dt = (i, r, o, s) => {
|
|
4336
|
+
for (var a = s > 1 ? void 0 : s ? xc(r, o) : r, t = i.length - 1, p; t >= 0; t--)
|
|
4337
|
+
(p = i[t]) && (a = (s ? p(r, o, a) : p(a)) || a);
|
|
4338
|
+
return s && a && wc(r, o, a), a;
|
|
4331
4339
|
};
|
|
4332
|
-
const
|
|
4333
|
-
let
|
|
4340
|
+
const Ac = "spectric-table-cell";
|
|
4341
|
+
let et = class extends O {
|
|
4334
4342
|
constructor() {
|
|
4335
4343
|
super(), this._handleFilterOut = () => {
|
|
4336
4344
|
let i;
|
|
4337
|
-
this.column.key && typeof this.row == "object" && (i = this.row
|
|
4345
|
+
this.column.key && typeof this.row == "object" && (i = Ne(this.row, this.column.key)), this.dispatchEvent(new CustomEvent("filter", {
|
|
4338
4346
|
composed: !0,
|
|
4339
4347
|
bubbles: !0,
|
|
4340
4348
|
detail: {
|
|
@@ -4346,7 +4354,7 @@ let Ge = class extends O {
|
|
|
4346
4354
|
}));
|
|
4347
4355
|
}, this._handleFilterFor = () => {
|
|
4348
4356
|
let i;
|
|
4349
|
-
this.column.key && typeof this.row == "object" && (i = this.row
|
|
4357
|
+
this.column.key && typeof this.row == "object" && (i = Ne(this.row, this.column.key)), this.dispatchEvent(new CustomEvent("filter", {
|
|
4350
4358
|
composed: !0,
|
|
4351
4359
|
bubbles: !0,
|
|
4352
4360
|
detail: {
|
|
@@ -4366,7 +4374,7 @@ let Ge = class extends O {
|
|
|
4366
4374
|
}
|
|
4367
4375
|
render() {
|
|
4368
4376
|
let i;
|
|
4369
|
-
this.column.render ? i = this.column.render(this.row, this.table) : this.column.key && typeof this.row == "object" ? i = this.row
|
|
4377
|
+
this.column.render ? i = this.column.render(this.row, this.table) : this.column.key && typeof this.row == "object" ? i = Ne(this.row, this.column.key) : i = _`error`;
|
|
4370
4378
|
let r = ["cell-contents"];
|
|
4371
4379
|
this.column.filterable && r.push("filterable");
|
|
4372
4380
|
let o = _`<div class="table-cell-actions">
|
|
@@ -4384,25 +4392,29 @@ let Ge = class extends O {
|
|
|
4384
4392
|
`;
|
|
4385
4393
|
}
|
|
4386
4394
|
};
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
],
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
],
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
],
|
|
4396
|
-
|
|
4397
|
-
L(
|
|
4398
|
-
],
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4395
|
+
Dt([
|
|
4396
|
+
b({ type: Object, attribute: !1 })
|
|
4397
|
+
], et.prototype, "row", 2);
|
|
4398
|
+
Dt([
|
|
4399
|
+
b({ type: Object, attribute: !1 })
|
|
4400
|
+
], et.prototype, "column", 2);
|
|
4401
|
+
Dt([
|
|
4402
|
+
Re("td")
|
|
4403
|
+
], et.prototype, "td", 2);
|
|
4404
|
+
et = Dt([
|
|
4405
|
+
L(Ac)
|
|
4406
|
+
], et);
|
|
4407
|
+
const Ne = (i, r) => {
|
|
4408
|
+
let o = r.split("."), s = i[o[0]];
|
|
4409
|
+
return o.length > 1 && (s = Ne(s, o.slice(1).join("."))), s;
|
|
4410
|
+
};
|
|
4411
|
+
var Sc = Object.defineProperty, kc = Object.getOwnPropertyDescriptor, yr = (i, r, o, s) => {
|
|
4412
|
+
for (var a = s > 1 ? void 0 : s ? kc(r, o) : r, t = i.length - 1, p; t >= 0; t--)
|
|
4413
|
+
(p = i[t]) && (a = (s ? p(r, o, a) : p(a)) || a);
|
|
4414
|
+
return s && a && Sc(r, o, a), a;
|
|
4403
4415
|
};
|
|
4404
|
-
const
|
|
4405
|
-
let
|
|
4416
|
+
const Cc = "spectric-table-body";
|
|
4417
|
+
let Ot = class extends O {
|
|
4406
4418
|
constructor() {
|
|
4407
4419
|
super(...arguments), this.data = [], this.columns = [];
|
|
4408
4420
|
}
|
|
@@ -4417,32 +4429,81 @@ let Ct = class extends O {
|
|
|
4417
4429
|
`;
|
|
4418
4430
|
}
|
|
4419
4431
|
};
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
],
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
],
|
|
4426
|
-
|
|
4427
|
-
L(
|
|
4428
|
-
],
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
|
|
4432
|
+
yr([
|
|
4433
|
+
b({ type: Array, attribute: !1 })
|
|
4434
|
+
], Ot.prototype, "data", 2);
|
|
4435
|
+
yr([
|
|
4436
|
+
b({ type: Array, attribute: !1 })
|
|
4437
|
+
], Ot.prototype, "columns", 2);
|
|
4438
|
+
Ot = yr([
|
|
4439
|
+
L(Cc)
|
|
4440
|
+
], Ot);
|
|
4441
|
+
const Ec = (i) => i.map(({ key: r, sortDirection: o, compareFn: s }) => (a, t) => {
|
|
4442
|
+
if (!r)
|
|
4443
|
+
return;
|
|
4444
|
+
let p = Ne(a, r), g = Ne(t, r);
|
|
4445
|
+
if (s)
|
|
4446
|
+
return s(a, t);
|
|
4447
|
+
if (typeof p == "number" || typeof p == "bigint" || typeof p == "boolean") {
|
|
4448
|
+
let v = p - g;
|
|
4449
|
+
return o === B.decending && (v = v * -1), v;
|
|
4450
|
+
} else if (typeof p == "string")
|
|
4451
|
+
return p.localeCompare(g) * (o === B.decending ? -1 : 1);
|
|
4452
|
+
});
|
|
4453
|
+
var Oc = Object.defineProperty, Pc = Object.getOwnPropertyDescriptor, xe = (i, r, o, s) => {
|
|
4454
|
+
for (var a = s > 1 ? void 0 : s ? Pc(r, o) : r, t = i.length - 1, p; t >= 0; t--)
|
|
4455
|
+
(p = i[t]) && (a = (s ? p(r, o, a) : p(a)) || a);
|
|
4456
|
+
return s && a && Oc(r, o, a), a;
|
|
4433
4457
|
};
|
|
4434
|
-
const
|
|
4435
|
-
|
|
4458
|
+
const Tc = "spectric-table";
|
|
4459
|
+
var Lc = /* @__PURE__ */ ((i) => (i.multi = "multi", i.single = "single", i.none = "none", i))(Lc || {}), Nc = /* @__PURE__ */ ((i) => (i.multi = "multi", i.single = "single", i))(Nc || {}), B = /* @__PURE__ */ ((i) => (i.ascending = "ascending", i.decending = "decending", i.none = "none", i))(B || {});
|
|
4460
|
+
let ue = class extends O {
|
|
4436
4461
|
constructor() {
|
|
4437
|
-
super(...arguments), this.data = [], this.columns = [], this._handlePaginationChange = (i) => {
|
|
4438
|
-
i.preventDefault(), i.stopPropagation(), this.pagination
|
|
4462
|
+
super(...arguments), this.data = [], this.columns = [], this.select = "none", this.sort = "single", this._handlePaginationChange = (i) => {
|
|
4463
|
+
if (i.preventDefault(), i.stopPropagation(), this.pagination) {
|
|
4464
|
+
let r = { ...this.pagination, ...i.detail }, { totalItems: o, page: s, pageSize: a } = r;
|
|
4465
|
+
o && s && a && (s - 1) * a > o && (r.page = 1), this.pagination = r;
|
|
4466
|
+
}
|
|
4467
|
+
this._emitChange();
|
|
4468
|
+
}, this._handleSortChange = (i) => {
|
|
4469
|
+
let r = i.detail, o = this.columns.find((s) => s.key == r.key);
|
|
4470
|
+
if (!o) {
|
|
4471
|
+
console.warn("Unable to find sort column");
|
|
4472
|
+
return;
|
|
4473
|
+
}
|
|
4474
|
+
this.sort == "single" && this.columns.forEach((s) => {
|
|
4475
|
+
s.sortDirection = "none";
|
|
4476
|
+
}), o.sortDirection = r.sortDirection, this.columns = [...this.columns], this._emitChange();
|
|
4439
4477
|
}, this._emitChange = () => {
|
|
4440
|
-
let { pagination: i } = this;
|
|
4441
|
-
this.dispatchEvent(new CustomEvent("change", { detail: { pagination: i } }));
|
|
4478
|
+
let { pagination: i, columns: r } = this;
|
|
4479
|
+
this.dispatchEvent(new CustomEvent("change", { detail: { pagination: i, columns: r } }));
|
|
4442
4480
|
}, this.__DO_NOT_USE_filter = () => {
|
|
4443
4481
|
this.dispatchEvent(new CustomEvent("filter"));
|
|
4444
4482
|
}, this.selected = [], this._handleSelectAllChange = (i) => {
|
|
4445
|
-
i.stopPropagation(), i.target.checked ? this.selected = [...this.data] : this.selected = [], this.dispatchEvent(new CustomEvent("
|
|
4483
|
+
i.stopPropagation(), i.target.checked ? this.selected = [...this.data] : this.selected = [], this.dispatchEvent(new CustomEvent("selected", { detail: this.selected }));
|
|
4484
|
+
};
|
|
4485
|
+
}
|
|
4486
|
+
static getDefaultDataSorterAndPaginatior(i) {
|
|
4487
|
+
return (r) => {
|
|
4488
|
+
let o = r.columns.filter(
|
|
4489
|
+
(p) => p.sortable && p.sortDirection && p.sortDirection !== "none"
|
|
4490
|
+
/* none */
|
|
4491
|
+
), s = [...i];
|
|
4492
|
+
if (o.length) {
|
|
4493
|
+
let p = Ec(o);
|
|
4494
|
+
s.sort((g, v) => {
|
|
4495
|
+
for (let x of p) {
|
|
4496
|
+
let A = x(g, v);
|
|
4497
|
+
if (A)
|
|
4498
|
+
return A;
|
|
4499
|
+
}
|
|
4500
|
+
return 0;
|
|
4501
|
+
});
|
|
4502
|
+
}
|
|
4503
|
+
if (!r.pagination)
|
|
4504
|
+
return s;
|
|
4505
|
+
let { page: a, pageSize: t } = r.pagination;
|
|
4506
|
+
return !a || !t ? s : r.pagination ? s.slice((a - 1) * t, a * t) : s;
|
|
4446
4507
|
};
|
|
4447
4508
|
}
|
|
4448
4509
|
createRenderRoot() {
|
|
@@ -4450,51 +4511,56 @@ let $e = class extends O {
|
|
|
4450
4511
|
}
|
|
4451
4512
|
render() {
|
|
4452
4513
|
let i = this.columns.filter((r) => !r.hidden);
|
|
4453
|
-
return this.select && i.unshift({
|
|
4514
|
+
return this.select !== "none" && i.unshift({
|
|
4454
4515
|
title: this.select === "multi" ? _`<spectric-input variant="checkbox" @change=${this._handleSelectAllChange} .helperText=${"Select All"}></spectric-input>` : null,
|
|
4455
|
-
render: (r) => _`<spectric-input variant="checkbox" .checked=${this.selected.includes(r)} @change=${(o) => {
|
|
4516
|
+
render: (r) => _`<spectric-input variant="checkbox" class="table-checkbox-${this.select}" .checked=${this.selected.includes(r)} @change=${(o) => {
|
|
4456
4517
|
if (o.stopPropagation(), this.select === "single" && (this.selected = []), o.target.checked)
|
|
4457
|
-
this.selected.push(r), this.dispatchEvent(new CustomEvent("
|
|
4518
|
+
this.selected.push(r), this.dispatchEvent(new CustomEvent("selected", { detail: this.selected }));
|
|
4458
4519
|
else {
|
|
4459
|
-
let s = this.selected.findIndex((
|
|
4460
|
-
s !== -1 && (this.selected.splice(s, 1), this.dispatchEvent(new CustomEvent("
|
|
4520
|
+
let s = this.selected.findIndex((a) => a === r);
|
|
4521
|
+
s !== -1 && (this.selected.splice(s, 1), this.dispatchEvent(new CustomEvent("selected", { detail: this.selected })));
|
|
4461
4522
|
}
|
|
4462
4523
|
}}></spectric-input>`
|
|
4463
4524
|
}), _`
|
|
4464
|
-
<div
|
|
4465
|
-
<
|
|
4466
|
-
|
|
4525
|
+
<div class="table-wrapper">
|
|
4526
|
+
<div role="table">
|
|
4527
|
+
<spectric-table-header .columns=${i} @sortChange=${this._handleSortChange}></spectric-table-header>
|
|
4528
|
+
<spectric-table-body .columns=${i} .data=${this.data} .table=${this}></spectric-table-body>
|
|
4529
|
+
</div>
|
|
4467
4530
|
</div>
|
|
4468
|
-
${this.pagination ? _`<spectric-pagination ${
|
|
4531
|
+
${this.pagination ? _`<spectric-pagination ${wt(this.pagination)} @change=${this._handlePaginationChange}></spectric-pagination>` : null}
|
|
4469
4532
|
`;
|
|
4470
4533
|
}
|
|
4471
4534
|
};
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
],
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
],
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
],
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
],
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
],
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
],
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4535
|
+
xe([
|
|
4536
|
+
b({ type: Array, attribute: !1 })
|
|
4537
|
+
], ue.prototype, "data", 2);
|
|
4538
|
+
xe([
|
|
4539
|
+
b({ type: Object, attribute: !1 })
|
|
4540
|
+
], ue.prototype, "pagination", 2);
|
|
4541
|
+
xe([
|
|
4542
|
+
b({ attribute: !1 })
|
|
4543
|
+
], ue.prototype, "columns", 2);
|
|
4544
|
+
xe([
|
|
4545
|
+
b({ type: String, reflect: !0 })
|
|
4546
|
+
], ue.prototype, "select", 2);
|
|
4547
|
+
xe([
|
|
4548
|
+
b({ type: String, reflect: !0 })
|
|
4549
|
+
], ue.prototype, "sort", 2);
|
|
4550
|
+
xe([
|
|
4551
|
+
rt()
|
|
4552
|
+
], ue.prototype, "selected", 2);
|
|
4553
|
+
ue = xe([
|
|
4554
|
+
L(Tc)
|
|
4555
|
+
], ue);
|
|
4556
|
+
var Dc = Object.defineProperty, jc = Object.getOwnPropertyDescriptor, he = (i, r, o, s) => {
|
|
4557
|
+
for (var a = s > 1 ? void 0 : s ? jc(r, o) : r, t = i.length - 1, p; t >= 0; t--)
|
|
4558
|
+
(p = i[t]) && (a = (s ? p(r, o, a) : p(a)) || a);
|
|
4559
|
+
return s && a && Dc(r, o, a), a;
|
|
4494
4560
|
};
|
|
4495
|
-
const
|
|
4496
|
-
var
|
|
4497
|
-
let
|
|
4561
|
+
const zc = "spectric-tooltip";
|
|
4562
|
+
var Rc = /* @__PURE__ */ ((i) => (i.top = "top", i.bottom = "bottom", i.left = "left", i.right = "right", i.mouse = "mouse", i))(Rc || {});
|
|
4563
|
+
let X = class extends O {
|
|
4498
4564
|
constructor() {
|
|
4499
4565
|
super(...arguments), this.delay = 100, this.animationDuration = 0, this.text = "", this.position = "right", this.maxWidth = 300, this.portalElement = document.createElement("div"), this.portalTarget = document.body, this.open = !1, this._getMousePosition = (i) => {
|
|
4500
4566
|
this.mouseLocation = {
|
|
@@ -4511,7 +4577,7 @@ let V = class extends O {
|
|
|
4511
4577
|
<span class="tooltip-caret"></span>
|
|
4512
4578
|
<div class="tooltip-content">${this.text}</div>
|
|
4513
4579
|
</div>`;
|
|
4514
|
-
|
|
4580
|
+
dr(i, this.portalElement), !(!this.target || !this.target.checkVisibility()) && (this.portalTarget.appendChild(this.portalElement), this.open = !0, requestAnimationFrame(this.positionTooltip));
|
|
4515
4581
|
}, this.applyStyle = (i) => {
|
|
4516
4582
|
Object.entries(i).forEach(([r, o]) => {
|
|
4517
4583
|
this.portalElement.style.setProperty(r, o);
|
|
@@ -4529,32 +4595,32 @@ let V = class extends O {
|
|
|
4529
4595
|
const o = this.target.getBoundingClientRect(), s = this.portalElement.getBoundingClientRect();
|
|
4530
4596
|
if (this.target !== document.body && this.maxWidth && this.maxWidth > 0 && (s.width = Math.min(s.width, this.maxWidth)), this.position === "mouse" && this.mouseLocation) {
|
|
4531
4597
|
this.mouseframe = void 0;
|
|
4532
|
-
const
|
|
4533
|
-
this.applyStyle({ ...r, ...
|
|
4598
|
+
const a = { left: this.mouseLocation.left + 10 + "px", top: this.mouseLocation.top - s.height / 2 + "px" };
|
|
4599
|
+
this.applyStyle({ ...r, ...a });
|
|
4534
4600
|
} else if (this.position === "top") {
|
|
4535
|
-
const
|
|
4601
|
+
const a = {
|
|
4536
4602
|
top: o.top - s.height + "px",
|
|
4537
4603
|
left: o.left + o.width / 2 - s.width / 2 + "px"
|
|
4538
4604
|
};
|
|
4539
|
-
this.applyStyle({ ...r, ...
|
|
4605
|
+
this.applyStyle({ ...r, ...a });
|
|
4540
4606
|
} else if (this.position === "bottom") {
|
|
4541
|
-
const
|
|
4607
|
+
const a = {
|
|
4542
4608
|
top: o.bottom + "px",
|
|
4543
4609
|
left: o.left + o.width / 2 - s.width / 2 + "px"
|
|
4544
4610
|
};
|
|
4545
|
-
this.applyStyle({ ...r, ...
|
|
4611
|
+
this.applyStyle({ ...r, ...a });
|
|
4546
4612
|
} else if (this.position === "left") {
|
|
4547
|
-
const
|
|
4613
|
+
const a = {
|
|
4548
4614
|
top: Math.max(0, o.top + o.height / 2 - s.height / 2) + "px",
|
|
4549
4615
|
left: o.left - s.width + "px"
|
|
4550
4616
|
};
|
|
4551
|
-
this.applyStyle({ ...r, ...
|
|
4617
|
+
this.applyStyle({ ...r, ...a });
|
|
4552
4618
|
} else if (this.position === "right") {
|
|
4553
|
-
const
|
|
4619
|
+
const a = {
|
|
4554
4620
|
top: Math.max(0, o.top + o.height / 2 - s.height / 2) + "px",
|
|
4555
4621
|
left: o.right + "px"
|
|
4556
4622
|
};
|
|
4557
|
-
this.applyStyle({ ...r, ...
|
|
4623
|
+
this.applyStyle({ ...r, ...a });
|
|
4558
4624
|
}
|
|
4559
4625
|
this.position !== "mouse" && this.portalElement.animate({ opacity: [0, 1] }, { duration: this.animationDuration });
|
|
4560
4626
|
};
|
|
@@ -4572,61 +4638,64 @@ let V = class extends O {
|
|
|
4572
4638
|
render() {
|
|
4573
4639
|
}
|
|
4574
4640
|
};
|
|
4575
|
-
|
|
4641
|
+
X.styles = W`:host{max-height: 0px;
|
|
4576
4642
|
max-width: 0px;
|
|
4577
4643
|
display: none;
|
|
4578
4644
|
pointer-events:none;}`;
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
],
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
],
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
],
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
],
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
],
|
|
4594
|
-
|
|
4595
|
-
|
|
4596
|
-
],
|
|
4597
|
-
|
|
4598
|
-
|
|
4599
|
-
],
|
|
4600
|
-
|
|
4601
|
-
L(
|
|
4602
|
-
],
|
|
4645
|
+
he([
|
|
4646
|
+
b({ type: Number, reflect: !0 })
|
|
4647
|
+
], X.prototype, "delay", 2);
|
|
4648
|
+
he([
|
|
4649
|
+
b({ type: Number, reflect: !0 })
|
|
4650
|
+
], X.prototype, "animationDuration", 2);
|
|
4651
|
+
he([
|
|
4652
|
+
b({ type: String, reflect: !1 })
|
|
4653
|
+
], X.prototype, "text", 2);
|
|
4654
|
+
he([
|
|
4655
|
+
b({ type: String, reflect: !0 })
|
|
4656
|
+
], X.prototype, "position", 2);
|
|
4657
|
+
he([
|
|
4658
|
+
b({ type: Number, reflect: !0 })
|
|
4659
|
+
], X.prototype, "maxWidth", 2);
|
|
4660
|
+
he([
|
|
4661
|
+
b({ attribute: !1 })
|
|
4662
|
+
], X.prototype, "portalTarget", 2);
|
|
4663
|
+
he([
|
|
4664
|
+
b({ attribute: !1 })
|
|
4665
|
+
], X.prototype, "triggerTarget", 2);
|
|
4666
|
+
X = he([
|
|
4667
|
+
L(zc)
|
|
4668
|
+
], X);
|
|
4603
4669
|
export {
|
|
4604
|
-
|
|
4605
|
-
|
|
4606
|
-
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
|
-
|
|
4612
|
-
|
|
4613
|
-
|
|
4614
|
-
|
|
4615
|
-
|
|
4616
|
-
|
|
4670
|
+
re as BitDisplayCanvas,
|
|
4671
|
+
vn as ButtonSizes,
|
|
4672
|
+
mn as ButtonVariants,
|
|
4673
|
+
Qc as CSSPropsControls,
|
|
4674
|
+
H as DialogElement,
|
|
4675
|
+
ns as DialogElementTag,
|
|
4676
|
+
gc as ElementTag,
|
|
4677
|
+
je as Header,
|
|
4678
|
+
Fn as InputVariants,
|
|
4679
|
+
fc as Orientations,
|
|
4680
|
+
_e as PaginationElement,
|
|
4681
|
+
mc as PaginationElementTag,
|
|
4682
|
+
M as SpectricButton,
|
|
4617
4683
|
E as SpectricInput,
|
|
4618
|
-
|
|
4619
|
-
|
|
4620
|
-
|
|
4621
|
-
|
|
4684
|
+
U as SpectricPage,
|
|
4685
|
+
Je as SpectricPanel,
|
|
4686
|
+
q as SpectricQuery,
|
|
4687
|
+
Et as SpectricThemeProvider,
|
|
4622
4688
|
j as SplitView,
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
|
|
4628
|
-
|
|
4629
|
-
|
|
4630
|
-
|
|
4689
|
+
tc as SupportedLanguages,
|
|
4690
|
+
ue as TableElement,
|
|
4691
|
+
Tc as TableElementTag,
|
|
4692
|
+
Lc as TableSelectOptions,
|
|
4693
|
+
B as TableSortDirection,
|
|
4694
|
+
Nc as TableSortOption,
|
|
4695
|
+
Hc as ThemeSelections,
|
|
4696
|
+
X as TooltipElement,
|
|
4697
|
+
zc as TooltipElementTag,
|
|
4698
|
+
Rc as TooltipPostions,
|
|
4699
|
+
le as nodeTypes
|
|
4631
4700
|
};
|
|
4632
4701
|
//# sourceMappingURL=index.es.js.map
|