@record-evolution/widget-overlay 1.0.8 → 1.0.10
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/widget-overlay.js +776 -796
- package/dist/widget-overlay.js.map +1 -1
- package/package.json +5 -1
- package/src/definition-schema.d.ts +0 -65
- package/src/definition-schema.json +32 -22
package/dist/widget-overlay.js
CHANGED
|
@@ -1,719 +1,699 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
1
|
+
const k = globalThis, J = k.ShadowRoot && (k.ShadyCSS === void 0 || k.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, K = /* @__PURE__ */ Symbol(), lt = /* @__PURE__ */ new WeakMap();
|
|
2
|
+
let _t = class {
|
|
3
|
+
constructor(t, e, s) {
|
|
4
|
+
if (this._$cssResult$ = !0, s !== K) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
5
|
+
this.cssText = t, this.t = e;
|
|
6
|
+
}
|
|
7
|
+
get styleSheet() {
|
|
8
|
+
let t = this.o;
|
|
9
|
+
const e = this.t;
|
|
10
|
+
if (J && t === void 0) {
|
|
11
|
+
const s = e !== void 0 && e.length === 1;
|
|
12
|
+
s && (t = lt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && lt.set(e, t));
|
|
13
|
+
}
|
|
14
|
+
return t;
|
|
15
|
+
}
|
|
16
|
+
toString() {
|
|
17
|
+
return this.cssText;
|
|
18
|
+
}
|
|
7
19
|
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
20
|
+
const Pt = (r) => new _t(typeof r == "string" ? r : r + "", void 0, K), bt = (r, ...t) => {
|
|
21
|
+
const e = r.length === 1 ? r[0] : t.reduce(((s, i, o) => s + ((n) => {
|
|
22
|
+
if (n._$cssResult$ === !0) return n.cssText;
|
|
23
|
+
if (typeof n == "number") return n;
|
|
24
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + n + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
25
|
+
})(i) + r[o + 1]), r[0]);
|
|
26
|
+
return new _t(e, r, K);
|
|
27
|
+
}, Ut = (r, t) => {
|
|
28
|
+
if (J) r.adoptedStyleSheets = t.map(((e) => e instanceof CSSStyleSheet ? e : e.styleSheet));
|
|
29
|
+
else for (const e of t) {
|
|
30
|
+
const s = document.createElement("style"), i = k.litNonce;
|
|
31
|
+
i !== void 0 && s.setAttribute("nonce", i), s.textContent = e.cssText, r.appendChild(s);
|
|
32
|
+
}
|
|
33
|
+
}, ht = J ? (r) => r : (r) => r instanceof CSSStyleSheet ? ((t) => {
|
|
34
|
+
let e = "";
|
|
35
|
+
for (const s of t.cssRules) e += s.cssText;
|
|
36
|
+
return Pt(e);
|
|
37
|
+
})(r) : r;
|
|
38
|
+
const { is: Tt, defineProperty: Ot, getOwnPropertyDescriptor: Mt, getOwnPropertyNames: Nt, getOwnPropertySymbols: Ht, getPrototypeOf: Lt } = Object, z = globalThis, ct = z.trustedTypes, Rt = ct ? ct.emptyScript : "", kt = z.reactiveElementPolyfillSupport, N = (r, t) => r, j = { toAttribute(r, t) {
|
|
39
|
+
switch (t) {
|
|
40
|
+
case Boolean:
|
|
41
|
+
r = r ? Rt : null;
|
|
42
|
+
break;
|
|
43
|
+
case Object:
|
|
44
|
+
case Array:
|
|
45
|
+
r = r == null ? r : JSON.stringify(r);
|
|
46
|
+
}
|
|
47
|
+
return r;
|
|
48
|
+
}, fromAttribute(r, t) {
|
|
49
|
+
let e = r;
|
|
50
|
+
switch (t) {
|
|
51
|
+
case Boolean:
|
|
52
|
+
e = r !== null;
|
|
53
|
+
break;
|
|
54
|
+
case Number:
|
|
55
|
+
e = r === null ? null : Number(r);
|
|
56
|
+
break;
|
|
57
|
+
case Object:
|
|
58
|
+
case Array:
|
|
59
|
+
try {
|
|
60
|
+
e = JSON.parse(r);
|
|
61
|
+
} catch {
|
|
62
|
+
e = null;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return e;
|
|
66
|
+
} }, Q = (r, t) => !Tt(r, t), dt = { attribute: !0, type: String, converter: j, reflect: !1, useDefault: !1, hasChanged: Q };
|
|
67
|
+
Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), z.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
68
|
+
let E = class extends HTMLElement {
|
|
69
|
+
static addInitializer(t) {
|
|
70
|
+
this._$Ei(), (this.l ??= []).push(t);
|
|
71
|
+
}
|
|
72
|
+
static get observedAttributes() {
|
|
73
|
+
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
74
|
+
}
|
|
75
|
+
static createProperty(t, e = dt) {
|
|
76
|
+
if (e.state && (e.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((e = Object.create(e)).wrapped = !0), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
77
|
+
const s = /* @__PURE__ */ Symbol(), i = this.getPropertyDescriptor(t, s, e);
|
|
78
|
+
i !== void 0 && Ot(this.prototype, t, i);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
static getPropertyDescriptor(t, e, s) {
|
|
82
|
+
const { get: i, set: o } = Mt(this.prototype, t) ?? { get() {
|
|
83
|
+
return this[e];
|
|
84
|
+
}, set(n) {
|
|
85
|
+
this[e] = n;
|
|
86
|
+
} };
|
|
87
|
+
return { get: i, set(n) {
|
|
88
|
+
const h = i?.call(this);
|
|
89
|
+
o?.call(this, n), this.requestUpdate(t, h, s);
|
|
90
|
+
}, configurable: !0, enumerable: !0 };
|
|
91
|
+
}
|
|
92
|
+
static getPropertyOptions(t) {
|
|
93
|
+
return this.elementProperties.get(t) ?? dt;
|
|
94
|
+
}
|
|
95
|
+
static _$Ei() {
|
|
96
|
+
if (this.hasOwnProperty(N("elementProperties"))) return;
|
|
97
|
+
const t = Lt(this);
|
|
98
|
+
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
99
|
+
}
|
|
100
|
+
static finalize() {
|
|
101
|
+
if (this.hasOwnProperty(N("finalized"))) return;
|
|
102
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(N("properties"))) {
|
|
103
|
+
const e = this.properties, s = [...Nt(e), ...Ht(e)];
|
|
104
|
+
for (const i of s) this.createProperty(i, e[i]);
|
|
105
|
+
}
|
|
106
|
+
const t = this[Symbol.metadata];
|
|
107
|
+
if (t !== null) {
|
|
108
|
+
const e = litPropertyMetadata.get(t);
|
|
109
|
+
if (e !== void 0) for (const [s, i] of e) this.elementProperties.set(s, i);
|
|
110
|
+
}
|
|
111
|
+
this._$Eh = /* @__PURE__ */ new Map();
|
|
112
|
+
for (const [e, s] of this.elementProperties) {
|
|
113
|
+
const i = this._$Eu(e, s);
|
|
114
|
+
i !== void 0 && this._$Eh.set(i, e);
|
|
115
|
+
}
|
|
116
|
+
this.elementStyles = this.finalizeStyles(this.styles);
|
|
117
|
+
}
|
|
118
|
+
static finalizeStyles(t) {
|
|
119
|
+
const e = [];
|
|
120
|
+
if (Array.isArray(t)) {
|
|
121
|
+
const s = new Set(t.flat(1 / 0).reverse());
|
|
122
|
+
for (const i of s) e.unshift(ht(i));
|
|
123
|
+
} else t !== void 0 && e.push(ht(t));
|
|
124
|
+
return e;
|
|
125
|
+
}
|
|
126
|
+
static _$Eu(t, e) {
|
|
127
|
+
const s = e.attribute;
|
|
128
|
+
return s === !1 ? void 0 : typeof s == "string" ? s : typeof t == "string" ? t.toLowerCase() : void 0;
|
|
129
|
+
}
|
|
130
|
+
constructor() {
|
|
131
|
+
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
132
|
+
}
|
|
133
|
+
_$Ev() {
|
|
134
|
+
this._$ES = new Promise(((t) => this.enableUpdating = t)), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(((t) => t(this)));
|
|
135
|
+
}
|
|
136
|
+
addController(t) {
|
|
137
|
+
(this._$EO ??= /* @__PURE__ */ new Set()).add(t), this.renderRoot !== void 0 && this.isConnected && t.hostConnected?.();
|
|
138
|
+
}
|
|
139
|
+
removeController(t) {
|
|
140
|
+
this._$EO?.delete(t);
|
|
141
|
+
}
|
|
142
|
+
_$E_() {
|
|
143
|
+
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
|
|
144
|
+
for (const s of e.keys()) this.hasOwnProperty(s) && (t.set(s, this[s]), delete this[s]);
|
|
145
|
+
t.size > 0 && (this._$Ep = t);
|
|
146
|
+
}
|
|
147
|
+
createRenderRoot() {
|
|
148
|
+
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
149
|
+
return Ut(t, this.constructor.elementStyles), t;
|
|
150
|
+
}
|
|
151
|
+
connectedCallback() {
|
|
152
|
+
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(((t) => t.hostConnected?.()));
|
|
153
|
+
}
|
|
154
|
+
enableUpdating(t) {
|
|
155
|
+
}
|
|
156
|
+
disconnectedCallback() {
|
|
157
|
+
this._$EO?.forEach(((t) => t.hostDisconnected?.()));
|
|
158
|
+
}
|
|
159
|
+
attributeChangedCallback(t, e, s) {
|
|
160
|
+
this._$AK(t, s);
|
|
161
|
+
}
|
|
162
|
+
_$ET(t, e) {
|
|
163
|
+
const s = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, s);
|
|
164
|
+
if (i !== void 0 && s.reflect === !0) {
|
|
165
|
+
const o = (s.converter?.toAttribute !== void 0 ? s.converter : j).toAttribute(e, s.type);
|
|
166
|
+
this._$Em = t, o == null ? this.removeAttribute(i) : this.setAttribute(i, o), this._$Em = null;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
_$AK(t, e) {
|
|
170
|
+
const s = this.constructor, i = s._$Eh.get(t);
|
|
171
|
+
if (i !== void 0 && this._$Em !== i) {
|
|
172
|
+
const o = s.getPropertyOptions(i), n = typeof o.converter == "function" ? { fromAttribute: o.converter } : o.converter?.fromAttribute !== void 0 ? o.converter : j;
|
|
173
|
+
this._$Em = i, this[i] = n.fromAttribute(e, o.type) ?? this._$Ej?.get(i) ?? null, this._$Em = null;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
requestUpdate(t, e, s) {
|
|
177
|
+
if (t !== void 0) {
|
|
178
|
+
const i = this.constructor, o = this[t];
|
|
179
|
+
if (s ??= i.getPropertyOptions(t), !((s.hasChanged ?? Q)(o, e) || s.useDefault && s.reflect && o === this._$Ej?.get(t) && !this.hasAttribute(i._$Eu(t, s)))) return;
|
|
180
|
+
this.C(t, e, s);
|
|
181
|
+
}
|
|
182
|
+
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
183
|
+
}
|
|
184
|
+
C(t, e, { useDefault: s, reflect: i, wrapped: o }, n) {
|
|
185
|
+
s && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, n ?? e ?? this[t]), o !== !0 || n !== void 0) || (this._$AL.has(t) || (this.hasUpdated || s || (e = void 0), this._$AL.set(t, e)), i === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
|
|
186
|
+
}
|
|
187
|
+
async _$EP() {
|
|
188
|
+
this.isUpdatePending = !0;
|
|
189
|
+
try {
|
|
190
|
+
await this._$ES;
|
|
191
|
+
} catch (e) {
|
|
192
|
+
Promise.reject(e);
|
|
193
|
+
}
|
|
194
|
+
const t = this.scheduleUpdate();
|
|
195
|
+
return t != null && await t, !this.isUpdatePending;
|
|
196
|
+
}
|
|
197
|
+
scheduleUpdate() {
|
|
198
|
+
return this.performUpdate();
|
|
199
|
+
}
|
|
200
|
+
performUpdate() {
|
|
201
|
+
if (!this.isUpdatePending) return;
|
|
202
|
+
if (!this.hasUpdated) {
|
|
203
|
+
if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
|
|
204
|
+
for (const [i, o] of this._$Ep) this[i] = o;
|
|
205
|
+
this._$Ep = void 0;
|
|
206
|
+
}
|
|
207
|
+
const s = this.constructor.elementProperties;
|
|
208
|
+
if (s.size > 0) for (const [i, o] of s) {
|
|
209
|
+
const { wrapped: n } = o, h = this[i];
|
|
210
|
+
n !== !0 || this._$AL.has(i) || h === void 0 || this.C(i, void 0, o, h);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
let t = !1;
|
|
214
|
+
const e = this._$AL;
|
|
215
|
+
try {
|
|
216
|
+
t = this.shouldUpdate(e), t ? (this.willUpdate(e), this._$EO?.forEach(((s) => s.hostUpdate?.())), this.update(e)) : this._$EM();
|
|
217
|
+
} catch (s) {
|
|
218
|
+
throw t = !1, this._$EM(), s;
|
|
219
|
+
}
|
|
220
|
+
t && this._$AE(e);
|
|
221
|
+
}
|
|
222
|
+
willUpdate(t) {
|
|
223
|
+
}
|
|
224
|
+
_$AE(t) {
|
|
225
|
+
this._$EO?.forEach(((e) => e.hostUpdated?.())), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
226
|
+
}
|
|
227
|
+
_$EM() {
|
|
228
|
+
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
229
|
+
}
|
|
230
|
+
get updateComplete() {
|
|
231
|
+
return this.getUpdateComplete();
|
|
232
|
+
}
|
|
233
|
+
getUpdateComplete() {
|
|
234
|
+
return this._$ES;
|
|
235
|
+
}
|
|
236
|
+
shouldUpdate(t) {
|
|
237
|
+
return !0;
|
|
238
|
+
}
|
|
239
|
+
update(t) {
|
|
240
|
+
this._$Eq &&= this._$Eq.forEach(((e) => this._$ET(e, this[e]))), this._$EM();
|
|
241
|
+
}
|
|
242
|
+
updated(t) {
|
|
243
|
+
}
|
|
244
|
+
firstUpdated(t) {
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
E.elementStyles = [], E.shadowRootOptions = { mode: "open" }, E[N("elementProperties")] = /* @__PURE__ */ new Map(), E[N("finalized")] = /* @__PURE__ */ new Map(), kt?.({ ReactiveElement: E }), (z.reactiveElementVersions ??= []).push("2.1.0");
|
|
248
|
+
const tt = globalThis, D = tt.trustedTypes, pt = D ? D.createPolicy("lit-html", { createHTML: (r) => r }) : void 0, At = "$lit$", b = `lit$${Math.random().toFixed(9).slice(2)}$`, wt = "?" + b, jt = `<${wt}>`, S = document, H = () => S.createComment(""), L = (r) => r === null || typeof r != "object" && typeof r != "function", et = Array.isArray, Dt = (r) => et(r) || typeof r?.[Symbol.iterator] == "function", q = `[
|
|
249
|
+
\f\r]`, O = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ut = /-->/g, ft = />/g, A = RegExp(`>|${q}(?:([^\\s"'>=/]+)(${q}*=${q}*(?:[^
|
|
250
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), $t = /'/g, gt = /"/g, xt = /^(?:script|style|textarea|title)$/i, It = (r) => (t, ...e) => ({ _$litType$: r, strings: t, values: e }), g = It(1), y = /* @__PURE__ */ Symbol.for("lit-noChange"), f = /* @__PURE__ */ Symbol.for("lit-nothing"), mt = /* @__PURE__ */ new WeakMap(), x = S.createTreeWalker(S, 129);
|
|
251
|
+
function St(r, t) {
|
|
252
|
+
if (!et(r) || !r.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
253
|
+
return pt !== void 0 ? pt.createHTML(t) : t;
|
|
42
254
|
}
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
-
let
|
|
46
|
-
for (let
|
|
47
|
-
const
|
|
48
|
-
let
|
|
49
|
-
for (;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
r = _e;
|
|
55
|
-
else if (l[G] !== void 0)
|
|
56
|
-
Ee.test(l[G]) && (n = new RegExp(`</${l[G]}`, "g")), r = S;
|
|
57
|
-
else if (l[He] !== void 0)
|
|
58
|
-
throw new Error("Bindings in tag names are not supported. Please use static templates instead. See https://lit.dev/docs/templates/expressions/#static-expressions");
|
|
59
|
-
} else r === S ? l[Be] === ">" ? (r = n ?? R, f = -1) : l[ye] === void 0 ? f = -2 : (f = r.lastIndex - l[je].length, m = l[ye], r = l[$e] === void 0 ? S : l[$e] === '"' ? q : Y) : r === q || r === Y ? r = S : r === ge || r === _e ? r = R : (r = S, n = void 0);
|
|
60
|
-
console.assert(f === -1 || r === S || r === Y || r === q, "unexpected parse state B");
|
|
61
|
-
const p = r === S && o[a + 1].startsWith("/>") ? " " : "";
|
|
62
|
-
s += r === R ? c + Ue : f >= 0 ? (i.push(m), c.slice(0, f) + Ne + c.slice(f) + v + p) : c + v + (f === -2 ? a : p);
|
|
63
|
-
}
|
|
64
|
-
const h = s + (o[t] || "<?>") + (e === J ? "</svg>" : e === ee ? "</math>" : "");
|
|
65
|
-
return [Ae(o, h), i];
|
|
255
|
+
const zt = (r, t) => {
|
|
256
|
+
const e = r.length - 1, s = [];
|
|
257
|
+
let i, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", n = O;
|
|
258
|
+
for (let h = 0; h < e; h++) {
|
|
259
|
+
const a = r[h];
|
|
260
|
+
let d, u, l = -1, p = 0;
|
|
261
|
+
for (; p < a.length && (n.lastIndex = p, u = n.exec(a), u !== null); ) p = n.lastIndex, n === O ? u[1] === "!--" ? n = ut : u[1] !== void 0 ? n = ft : u[2] !== void 0 ? (xt.test(u[2]) && (i = RegExp("</" + u[2], "g")), n = A) : u[3] !== void 0 && (n = A) : n === A ? u[0] === ">" ? (n = i ?? O, l = -1) : u[1] === void 0 ? l = -2 : (l = n.lastIndex - u[2].length, d = u[1], n = u[3] === void 0 ? A : u[3] === '"' ? gt : $t) : n === gt || n === $t ? n = A : n === ut || n === ft ? n = O : (n = A, i = void 0);
|
|
262
|
+
const c = n === A && r[h + 1].startsWith("/>") ? " " : "";
|
|
263
|
+
o += n === O ? a + jt : l >= 0 ? (s.push(d), a.slice(0, l) + At + a.slice(l) + b + c) : a + b + (l === -2 ? h : c);
|
|
264
|
+
}
|
|
265
|
+
return [St(r, o + (r[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
|
|
66
266
|
};
|
|
67
|
-
class
|
|
68
|
-
constructor({ strings:
|
|
267
|
+
class R {
|
|
268
|
+
constructor({ strings: t, _$litType$: e }, s) {
|
|
269
|
+
let i;
|
|
69
270
|
this.parts = [];
|
|
70
|
-
let
|
|
71
|
-
const h =
|
|
72
|
-
if (this.el =
|
|
73
|
-
const
|
|
74
|
-
|
|
271
|
+
let o = 0, n = 0;
|
|
272
|
+
const h = t.length - 1, a = this.parts, [d, u] = zt(t, e);
|
|
273
|
+
if (this.el = R.createElement(d, s), x.currentNode = this.el.content, e === 2 || e === 3) {
|
|
274
|
+
const l = this.el.content.firstChild;
|
|
275
|
+
l.replaceWith(...l.childNodes);
|
|
75
276
|
}
|
|
76
|
-
for (; (
|
|
77
|
-
if (
|
|
78
|
-
{
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
for (const m of s.getAttributeNames())
|
|
89
|
-
if (m.endsWith(Ne)) {
|
|
90
|
-
const d = f[r++], p = s.getAttribute(m).split(v), g = /([.?@])?(.*)/.exec(d);
|
|
91
|
-
a.push({
|
|
92
|
-
type: se,
|
|
93
|
-
index: n,
|
|
94
|
-
name: g[2],
|
|
95
|
-
strings: p,
|
|
96
|
-
ctor: g[1] === "." ? Ze : g[1] === "?" ? Qe : g[1] === "@" ? Xe : W
|
|
97
|
-
}), s.removeAttribute(m);
|
|
98
|
-
} else m.startsWith(v) && (a.push({
|
|
99
|
-
type: ne,
|
|
100
|
-
index: n
|
|
101
|
-
}), s.removeAttribute(m));
|
|
102
|
-
if (Ee.test(s.tagName)) {
|
|
103
|
-
const m = s.textContent.split(v), d = m.length - 1;
|
|
104
|
-
if (d > 0) {
|
|
105
|
-
s.textContent = z ? z.emptyScript : "";
|
|
106
|
-
for (let l = 0; l < d; l++)
|
|
107
|
-
s.append(m[l], O()), A.nextNode(), a.push({ type: H, index: ++n });
|
|
108
|
-
s.append(m[d], O());
|
|
277
|
+
for (; (i = x.nextNode()) !== null && a.length < h; ) {
|
|
278
|
+
if (i.nodeType === 1) {
|
|
279
|
+
if (i.hasAttributes()) for (const l of i.getAttributeNames()) if (l.endsWith(At)) {
|
|
280
|
+
const p = u[n++], c = i.getAttribute(l).split(b), $ = /([.?@])?(.*)/.exec(p);
|
|
281
|
+
a.push({ type: 1, index: o, name: $[2], strings: c, ctor: $[1] === "." ? Vt : $[1] === "?" ? Wt : $[1] === "@" ? qt : B }), i.removeAttribute(l);
|
|
282
|
+
} else l.startsWith(b) && (a.push({ type: 6, index: o }), i.removeAttribute(l));
|
|
283
|
+
if (xt.test(i.tagName)) {
|
|
284
|
+
const l = i.textContent.split(b), p = l.length - 1;
|
|
285
|
+
if (p > 0) {
|
|
286
|
+
i.textContent = D ? D.emptyScript : "";
|
|
287
|
+
for (let c = 0; c < p; c++) i.append(l[c], H()), x.nextNode(), a.push({ type: 2, index: ++o });
|
|
288
|
+
i.append(l[p], H());
|
|
109
289
|
}
|
|
110
290
|
}
|
|
111
|
-
} else if (
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
a.push({ type: Ge, index: n }), d += v.length - 1;
|
|
118
|
-
}
|
|
119
|
-
n++;
|
|
291
|
+
} else if (i.nodeType === 8) if (i.data === wt) a.push({ type: 2, index: o });
|
|
292
|
+
else {
|
|
293
|
+
let l = -1;
|
|
294
|
+
for (; (l = i.data.indexOf(b, l + 1)) !== -1; ) a.push({ type: 7, index: o }), l += b.length - 1;
|
|
295
|
+
}
|
|
296
|
+
o++;
|
|
120
297
|
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
template: this,
|
|
126
|
-
clonableTemplate: this.el,
|
|
127
|
-
parts: this.parts,
|
|
128
|
-
strings: e
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
// Overridden via `litHtmlPolyfillSupport` to provide platform support.
|
|
132
|
-
/** @nocollapse */
|
|
133
|
-
static createElement(e, t) {
|
|
134
|
-
const i = V.createElement("template");
|
|
135
|
-
return i.innerHTML = e, i;
|
|
298
|
+
}
|
|
299
|
+
static createElement(t, e) {
|
|
300
|
+
const s = S.createElement("template");
|
|
301
|
+
return s.innerHTML = t, s;
|
|
136
302
|
}
|
|
137
303
|
}
|
|
138
|
-
function
|
|
139
|
-
if (
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
// This property needs to remain unminified.
|
|
144
|
-
e._$litDirective$
|
|
145
|
-
);
|
|
146
|
-
return s?.constructor !== n && (s?._$notifyDirectiveConnectionChanged?.(!1), n === void 0 ? s = void 0 : (s = new n(o), s._$initialize(o, t, i)), i !== void 0 ? (t.__directives ??= [])[i] = s : t.__directive = s), s !== void 0 && (e = L(o, s._$resolve(o, e.values), s, i)), e;
|
|
304
|
+
function P(r, t, e = r, s) {
|
|
305
|
+
if (t === y) return t;
|
|
306
|
+
let i = s !== void 0 ? e._$Co?.[s] : e._$Cl;
|
|
307
|
+
const o = L(t) ? void 0 : t._$litDirective$;
|
|
308
|
+
return i?.constructor !== o && (i?._$AO?.(!1), o === void 0 ? i = void 0 : (i = new o(r), i._$AT(r, e, s)), s !== void 0 ? (e._$Co ??= [])[s] = i : e._$Cl = i), i !== void 0 && (t = P(r, i._$AS(r, t.values), i, s)), t;
|
|
147
309
|
}
|
|
148
|
-
class
|
|
149
|
-
constructor(
|
|
150
|
-
this._$
|
|
310
|
+
let Bt = class {
|
|
311
|
+
constructor(t, e) {
|
|
312
|
+
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
|
|
151
313
|
}
|
|
152
|
-
// Called by ChildPart parentNode getter
|
|
153
314
|
get parentNode() {
|
|
154
|
-
return this._$
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
const { el: { content: t }, parts: i } = this._$template, s = (e?.creationScope ?? V).importNode(t, !0);
|
|
164
|
-
A.currentNode = s;
|
|
165
|
-
let n = A.nextNode(), r = 0, h = 0, a = i[0];
|
|
315
|
+
return this._$AM.parentNode;
|
|
316
|
+
}
|
|
317
|
+
get _$AU() {
|
|
318
|
+
return this._$AM._$AU;
|
|
319
|
+
}
|
|
320
|
+
u(t) {
|
|
321
|
+
const { el: { content: e }, parts: s } = this._$AD, i = (t?.creationScope ?? S).importNode(e, !0);
|
|
322
|
+
x.currentNode = i;
|
|
323
|
+
let o = x.nextNode(), n = 0, h = 0, a = s[0];
|
|
166
324
|
for (; a !== void 0; ) {
|
|
167
|
-
if (
|
|
168
|
-
let
|
|
169
|
-
a.type ===
|
|
325
|
+
if (n === a.index) {
|
|
326
|
+
let d;
|
|
327
|
+
a.type === 2 ? d = new U(o, o.nextSibling, this, t) : a.type === 1 ? d = new a.ctor(o, a.name, a.strings, this, t) : a.type === 6 && (d = new Ft(o, this, t)), this._$AV.push(d), a = s[++h];
|
|
170
328
|
}
|
|
171
|
-
|
|
329
|
+
n !== a?.index && (o = x.nextNode(), n++);
|
|
172
330
|
}
|
|
173
|
-
return
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
let
|
|
177
|
-
for (const
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
331
|
+
return x.currentNode = S, i;
|
|
332
|
+
}
|
|
333
|
+
p(t) {
|
|
334
|
+
let e = 0;
|
|
335
|
+
for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(t, s, e), e += s.strings.length - 2) : s._$AI(t[e])), e++;
|
|
336
|
+
}
|
|
337
|
+
};
|
|
338
|
+
class U {
|
|
339
|
+
get _$AU() {
|
|
340
|
+
return this._$AM?._$AU ?? this._$Cv;
|
|
341
|
+
}
|
|
342
|
+
constructor(t, e, s, i) {
|
|
343
|
+
this.type = 2, this._$AH = f, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = i, this._$Cv = i?.isConnected ?? !0;
|
|
186
344
|
}
|
|
187
|
-
}
|
|
188
|
-
let oe = class Ve {
|
|
189
|
-
// See comment in Disconnectable interface for why this is a getter
|
|
190
|
-
get _$isConnected() {
|
|
191
|
-
return this._$parent?._$isConnected ?? this.__isConnected;
|
|
192
|
-
}
|
|
193
|
-
constructor(e, t, i, s) {
|
|
194
|
-
this.type = H, this._$committedValue = _, this._$disconnectableChildren = void 0, this._$startNode = e, this._$endNode = t, this._$parent = i, this.options = s, this.__isConnected = s?.isConnected ?? !0, this._textSanitizer = void 0;
|
|
195
|
-
}
|
|
196
|
-
/**
|
|
197
|
-
* The parent node into which the part renders its content.
|
|
198
|
-
*
|
|
199
|
-
* A ChildPart's content consists of a range of adjacent child nodes of
|
|
200
|
-
* `.parentNode`, possibly bordered by 'marker nodes' (`.startNode` and
|
|
201
|
-
* `.endNode`).
|
|
202
|
-
*
|
|
203
|
-
* - If both `.startNode` and `.endNode` are non-null, then the part's content
|
|
204
|
-
* consists of all siblings between `.startNode` and `.endNode`, exclusively.
|
|
205
|
-
*
|
|
206
|
-
* - If `.startNode` is non-null but `.endNode` is null, then the part's
|
|
207
|
-
* content consists of all siblings following `.startNode`, up to and
|
|
208
|
-
* including the last child of `.parentNode`. If `.endNode` is non-null, then
|
|
209
|
-
* `.startNode` will always be non-null.
|
|
210
|
-
*
|
|
211
|
-
* - If both `.endNode` and `.startNode` are null, then the part's content
|
|
212
|
-
* consists of all child nodes of `.parentNode`.
|
|
213
|
-
*/
|
|
214
345
|
get parentNode() {
|
|
215
|
-
let
|
|
216
|
-
const
|
|
217
|
-
return
|
|
218
|
-
}
|
|
219
|
-
/**
|
|
220
|
-
* The part's leading marker node, if any. See `.parentNode` for more
|
|
221
|
-
* information.
|
|
222
|
-
*/
|
|
346
|
+
let t = this._$AA.parentNode;
|
|
347
|
+
const e = this._$AM;
|
|
348
|
+
return e !== void 0 && t?.nodeType === 11 && (t = e.parentNode), t;
|
|
349
|
+
}
|
|
223
350
|
get startNode() {
|
|
224
|
-
return this._$
|
|
351
|
+
return this._$AA;
|
|
225
352
|
}
|
|
226
|
-
/**
|
|
227
|
-
* The part's trailing marker node, if any. See `.parentNode` for more
|
|
228
|
-
* information.
|
|
229
|
-
*/
|
|
230
353
|
get endNode() {
|
|
231
|
-
return this._$
|
|
232
|
-
}
|
|
233
|
-
_$setValue(e, t = this) {
|
|
234
|
-
if (this.parentNode === null)
|
|
235
|
-
throw new Error("This `ChildPart` has no `parentNode` and therefore cannot accept a value. This likely means the element containing the part was manipulated in an unsupported way outside of Lit's control such that the part's marker nodes were ejected from DOM. For example, setting the element's `innerHTML` or `textContent` can do this.");
|
|
236
|
-
if (e = L(this, e, t), D(e))
|
|
237
|
-
e === _ || e == null || e === "" ? (this._$committedValue !== _ && (u && u({
|
|
238
|
-
kind: "commit nothing to child",
|
|
239
|
-
start: this._$startNode,
|
|
240
|
-
end: this._$endNode,
|
|
241
|
-
parent: this._$parent,
|
|
242
|
-
options: this.options
|
|
243
|
-
}), this._$clear()), this._$committedValue = _) : e !== this._$committedValue && e !== N && this._commitText(e);
|
|
244
|
-
else if (e._$litType$ !== void 0)
|
|
245
|
-
this._commitTemplateResult(e);
|
|
246
|
-
else if (e.nodeType !== void 0) {
|
|
247
|
-
if (this.options?.host === e) {
|
|
248
|
-
this._commitText("[probable mistake: rendered a template's host in itself (commonly caused by writing ${this} in a template]"), console.warn("Attempted to render the template host", e, "inside itself. This is almost always a mistake, and in dev mode ", "we render some warning text. In production however, we'll ", "render it, which will usually result in an error, and sometimes ", "in the element disappearing from the DOM.");
|
|
249
|
-
return;
|
|
250
|
-
}
|
|
251
|
-
this._commitNode(e);
|
|
252
|
-
} else Ie(e) ? this._commitIterable(e) : this._commitText(e);
|
|
253
|
-
}
|
|
254
|
-
_insert(e) {
|
|
255
|
-
return x(x(this._$startNode).parentNode).insertBefore(e, this._$endNode);
|
|
256
|
-
}
|
|
257
|
-
_commitNode(e) {
|
|
258
|
-
if (this._$committedValue !== e) {
|
|
259
|
-
if (this._$clear(), j !== Ce) {
|
|
260
|
-
const t = this._$startNode.parentNode?.nodeName;
|
|
261
|
-
if (t === "STYLE" || t === "SCRIPT") {
|
|
262
|
-
let i = "Forbidden";
|
|
263
|
-
throw t === "STYLE" ? i = "Lit does not support binding inside style nodes. This is a security risk, as style injection attacks can exfiltrate data and spoof UIs. Consider instead using css`...` literals to compose styles, and do dynamic styling with css custom properties, ::parts, <slot>s, and by mutating the DOM rather than stylesheets." : i = "Lit does not support binding inside script nodes. This is a security risk, as it could allow arbitrary code execution.", new Error(i);
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
u && u({
|
|
267
|
-
kind: "commit node",
|
|
268
|
-
start: this._$startNode,
|
|
269
|
-
parent: this._$parent,
|
|
270
|
-
value: e,
|
|
271
|
-
options: this.options
|
|
272
|
-
}), this._$committedValue = this._insert(e);
|
|
273
|
-
}
|
|
354
|
+
return this._$AB;
|
|
274
355
|
}
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
options: this.options
|
|
291
|
-
}), t.data = e;
|
|
292
|
-
}
|
|
293
|
-
this._$committedValue = e;
|
|
294
|
-
}
|
|
295
|
-
_commitTemplateResult(e) {
|
|
296
|
-
const { values: t, ["_$litType$"]: i } = e, s = typeof i == "number" ? this._$getTemplate(e) : (i.el === void 0 && (i.el = U.createElement(Ae(i.h, i.h[0]), this.options)), i);
|
|
297
|
-
if (this._$committedValue?._$template === s)
|
|
298
|
-
u && u({
|
|
299
|
-
kind: "template updating",
|
|
300
|
-
template: s,
|
|
301
|
-
instance: this._$committedValue,
|
|
302
|
-
parts: this._$committedValue._$parts,
|
|
303
|
-
options: this.options,
|
|
304
|
-
values: t
|
|
305
|
-
}), this._$committedValue._update(t);
|
|
356
|
+
_$AI(t, e = this) {
|
|
357
|
+
t = P(this, t, e), L(t) ? t === f || t == null || t === "" ? (this._$AH !== f && this._$AR(), this._$AH = f) : t !== this._$AH && t !== y && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Dt(t) ? this.k(t) : this._(t);
|
|
358
|
+
}
|
|
359
|
+
O(t) {
|
|
360
|
+
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
361
|
+
}
|
|
362
|
+
T(t) {
|
|
363
|
+
this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
|
|
364
|
+
}
|
|
365
|
+
_(t) {
|
|
366
|
+
this._$AH !== f && L(this._$AH) ? this._$AA.nextSibling.data = t : this.T(S.createTextNode(t)), this._$AH = t;
|
|
367
|
+
}
|
|
368
|
+
$(t) {
|
|
369
|
+
const { values: e, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = R.createElement(St(s.h, s.h[0]), this.options)), s);
|
|
370
|
+
if (this._$AH?._$AD === i) this._$AH.p(e);
|
|
306
371
|
else {
|
|
307
|
-
const
|
|
308
|
-
|
|
309
|
-
kind: "template instantiated",
|
|
310
|
-
template: s,
|
|
311
|
-
instance: n,
|
|
312
|
-
parts: n._$parts,
|
|
313
|
-
options: this.options,
|
|
314
|
-
fragment: r,
|
|
315
|
-
values: t
|
|
316
|
-
}), n._update(t), u && u({
|
|
317
|
-
kind: "template instantiated and updated",
|
|
318
|
-
template: s,
|
|
319
|
-
instance: n,
|
|
320
|
-
parts: n._$parts,
|
|
321
|
-
options: this.options,
|
|
322
|
-
fragment: r,
|
|
323
|
-
values: t
|
|
324
|
-
}), this._commitNode(r), this._$committedValue = n;
|
|
372
|
+
const o = new Bt(i, this), n = o.u(this.options);
|
|
373
|
+
o.p(e), this.T(n), this._$AH = o;
|
|
325
374
|
}
|
|
326
375
|
}
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
const t = this._$
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
* Removes the nodes contained within this Part from the DOM.
|
|
343
|
-
*
|
|
344
|
-
* @param start Start node to clear from, for clearing a subset of the part's
|
|
345
|
-
* DOM (used when truncating iterables)
|
|
346
|
-
* @param from When `start` is specified, the index within the iterable from
|
|
347
|
-
* which ChildParts are being removed, used for disconnecting directives in
|
|
348
|
-
* those Parts.
|
|
349
|
-
*
|
|
350
|
-
* @internal
|
|
351
|
-
*/
|
|
352
|
-
_$clear(e = x(this._$startNode).nextSibling, t) {
|
|
353
|
-
for (this._$notifyConnectionChanged?.(!1, !0, t); e && e !== this._$endNode; ) {
|
|
354
|
-
const i = x(e).nextSibling;
|
|
355
|
-
x(e).remove(), e = i;
|
|
376
|
+
_$AC(t) {
|
|
377
|
+
let e = mt.get(t.strings);
|
|
378
|
+
return e === void 0 && mt.set(t.strings, e = new R(t)), e;
|
|
379
|
+
}
|
|
380
|
+
k(t) {
|
|
381
|
+
et(this._$AH) || (this._$AH = [], this._$AR());
|
|
382
|
+
const e = this._$AH;
|
|
383
|
+
let s, i = 0;
|
|
384
|
+
for (const o of t) i === e.length ? e.push(s = new U(this.O(H()), this.O(H()), this, this.options)) : s = e[i], s._$AI(o), i++;
|
|
385
|
+
i < e.length && (this._$AR(s && s._$AB.nextSibling, i), e.length = i);
|
|
386
|
+
}
|
|
387
|
+
_$AR(t = this._$AA.nextSibling, e) {
|
|
388
|
+
for (this._$AP?.(!1, !0, e); t && t !== this._$AB; ) {
|
|
389
|
+
const s = t.nextSibling;
|
|
390
|
+
t.remove(), t = s;
|
|
356
391
|
}
|
|
357
392
|
}
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
* should only be called on `RootPart`s (the `ChildPart` returned from a
|
|
361
|
-
* top-level `render()` call). It has no effect on non-root ChildParts.
|
|
362
|
-
* @param isConnected Whether to set
|
|
363
|
-
* @internal
|
|
364
|
-
*/
|
|
365
|
-
setConnected(e) {
|
|
366
|
-
if (this._$parent === void 0)
|
|
367
|
-
this.__isConnected = e, this._$notifyConnectionChanged?.(e);
|
|
368
|
-
else
|
|
369
|
-
throw new Error("part.setConnected() may only be called on a RootPart returned from render().");
|
|
393
|
+
setConnected(t) {
|
|
394
|
+
this._$AM === void 0 && (this._$Cv = t, this._$AP?.(t));
|
|
370
395
|
}
|
|
371
|
-
}
|
|
372
|
-
class
|
|
396
|
+
}
|
|
397
|
+
class B {
|
|
373
398
|
get tagName() {
|
|
374
399
|
return this.element.tagName;
|
|
375
400
|
}
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
* If this part is single-valued, `this._strings` will be undefined, and the
|
|
387
|
-
* method will be called with a single value argument. If this part is
|
|
388
|
-
* multi-value, `this._strings` will be defined, and the method is called
|
|
389
|
-
* with the value array of the part's owning TemplateInstance, and an offset
|
|
390
|
-
* into the value array from which the values should be read.
|
|
391
|
-
* This method is overloaded this way to eliminate short-lived array slices
|
|
392
|
-
* of the template instance values, and allow a fast-path for single-valued
|
|
393
|
-
* parts.
|
|
394
|
-
*
|
|
395
|
-
* @param value The part value, or an array of values for multi-valued parts
|
|
396
|
-
* @param valueIndex the index to start reading values from. `undefined` for
|
|
397
|
-
* single-valued parts
|
|
398
|
-
* @param noCommit causes the part to not commit its value to the DOM. Used
|
|
399
|
-
* in hydration to prime attribute parts with their first-rendered value,
|
|
400
|
-
* but not set the attribute, and in SSR to no-op the DOM operation and
|
|
401
|
-
* capture the value for serialization.
|
|
402
|
-
*
|
|
403
|
-
* @internal
|
|
404
|
-
*/
|
|
405
|
-
_$setValue(e, t = this, i, s) {
|
|
406
|
-
const n = this.strings;
|
|
407
|
-
let r = !1;
|
|
408
|
-
if (n === void 0)
|
|
409
|
-
e = L(this, e, t, 0), r = !D(e) || e !== this._$committedValue && e !== N, r && (this._$committedValue = e);
|
|
401
|
+
get _$AU() {
|
|
402
|
+
return this._$AM._$AU;
|
|
403
|
+
}
|
|
404
|
+
constructor(t, e, s, i, o) {
|
|
405
|
+
this.type = 1, this._$AH = f, this._$AN = void 0, this.element = t, this.name = e, this._$AM = i, this.options = o, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = f;
|
|
406
|
+
}
|
|
407
|
+
_$AI(t, e = this, s, i) {
|
|
408
|
+
const o = this.strings;
|
|
409
|
+
let n = !1;
|
|
410
|
+
if (o === void 0) t = P(this, t, e, 0), n = !L(t) || t !== this._$AH && t !== y, n && (this._$AH = t);
|
|
410
411
|
else {
|
|
411
|
-
const h =
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
for (a = 0; a < n.length - 1; a++)
|
|
415
|
-
c = L(this, h[i + a], t, a), c === N && (c = this._$committedValue[a]), r ||= !D(c) || c !== this._$committedValue[a], c === _ ? e = _ : e !== _ && (e += (c ?? "") + n[a + 1]), this._$committedValue[a] = c;
|
|
412
|
+
const h = t;
|
|
413
|
+
let a, d;
|
|
414
|
+
for (t = o[0], a = 0; a < o.length - 1; a++) d = P(this, h[s + a], e, a), d === y && (d = this._$AH[a]), n ||= !L(d) || d !== this._$AH[a], d === f ? t = f : t !== f && (t += (d ?? "") + o[a + 1]), this._$AH[a] = d;
|
|
416
415
|
}
|
|
417
|
-
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
e === _ ? x(this.element).removeAttribute(this.name) : (this._sanitizer === void 0 && (this._sanitizer = j(this.element, this.name)), e = this._sanitizer(e ?? ""), u && u({
|
|
422
|
-
kind: "commit attribute",
|
|
423
|
-
element: this.element,
|
|
424
|
-
name: this.name,
|
|
425
|
-
value: e,
|
|
426
|
-
options: this.options
|
|
427
|
-
}), x(this.element).setAttribute(this.name, e ?? ""));
|
|
416
|
+
n && !i && this.j(t);
|
|
417
|
+
}
|
|
418
|
+
j(t) {
|
|
419
|
+
t === f ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
|
|
428
420
|
}
|
|
429
421
|
}
|
|
430
|
-
class
|
|
422
|
+
class Vt extends B {
|
|
431
423
|
constructor() {
|
|
432
|
-
super(...arguments), this.type =
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
this._sanitizer === void 0 && (this._sanitizer = j(this.element, this.name)), e = this._sanitizer(e), u && u({
|
|
437
|
-
kind: "commit property",
|
|
438
|
-
element: this.element,
|
|
439
|
-
name: this.name,
|
|
440
|
-
value: e,
|
|
441
|
-
options: this.options
|
|
442
|
-
}), this.element[this.name] = e === _ ? void 0 : e;
|
|
424
|
+
super(...arguments), this.type = 3;
|
|
425
|
+
}
|
|
426
|
+
j(t) {
|
|
427
|
+
this.element[this.name] = t === f ? void 0 : t;
|
|
443
428
|
}
|
|
444
429
|
}
|
|
445
|
-
class
|
|
430
|
+
class Wt extends B {
|
|
446
431
|
constructor() {
|
|
447
|
-
super(...arguments), this.type =
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
u && u({
|
|
452
|
-
kind: "commit boolean attribute",
|
|
453
|
-
element: this.element,
|
|
454
|
-
name: this.name,
|
|
455
|
-
value: !!(e && e !== _),
|
|
456
|
-
options: this.options
|
|
457
|
-
}), x(this.element).toggleAttribute(this.name, !!e && e !== _);
|
|
432
|
+
super(...arguments), this.type = 4;
|
|
433
|
+
}
|
|
434
|
+
j(t) {
|
|
435
|
+
this.element.toggleAttribute(this.name, !!t && t !== f);
|
|
458
436
|
}
|
|
459
437
|
}
|
|
460
|
-
class
|
|
461
|
-
constructor(e,
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
const i = this._$committedValue, s = e === _ && i !== _ || e.capture !== i.capture || e.once !== i.once || e.passive !== i.passive, n = e !== _ && (i === _ || s);
|
|
472
|
-
u && u({
|
|
473
|
-
kind: "commit event listener",
|
|
474
|
-
element: this.element,
|
|
475
|
-
name: this.name,
|
|
476
|
-
value: e,
|
|
477
|
-
options: this.options,
|
|
478
|
-
removeListener: s,
|
|
479
|
-
addListener: n,
|
|
480
|
-
oldListener: i
|
|
481
|
-
}), s && this.element.removeEventListener(this.name, this, i), n && this.element.addEventListener(this.name, this, e), this._$committedValue = e;
|
|
482
|
-
}
|
|
483
|
-
handleEvent(e) {
|
|
484
|
-
typeof this._$committedValue == "function" ? this._$committedValue.call(this.options?.host ?? this.element, e) : this._$committedValue.handleEvent(e);
|
|
438
|
+
class qt extends B {
|
|
439
|
+
constructor(t, e, s, i, o) {
|
|
440
|
+
super(t, e, s, i, o), this.type = 5;
|
|
441
|
+
}
|
|
442
|
+
_$AI(t, e = this) {
|
|
443
|
+
if ((t = P(this, t, e, 0) ?? f) === y) return;
|
|
444
|
+
const s = this._$AH, i = t === f && s !== f || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, o = t !== f && (s === f || i);
|
|
445
|
+
i && this.element.removeEventListener(this.name, this, s), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
446
|
+
}
|
|
447
|
+
handleEvent(t) {
|
|
448
|
+
typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, t) : this._$AH.handleEvent(t);
|
|
485
449
|
}
|
|
486
450
|
}
|
|
487
|
-
class
|
|
488
|
-
constructor(
|
|
489
|
-
this.element =
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
u && u({
|
|
497
|
-
kind: "commit to element binding",
|
|
498
|
-
element: this.element,
|
|
499
|
-
value: e,
|
|
500
|
-
options: this.options
|
|
501
|
-
}), L(this, e);
|
|
451
|
+
class Ft {
|
|
452
|
+
constructor(t, e, s) {
|
|
453
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
|
|
454
|
+
}
|
|
455
|
+
get _$AU() {
|
|
456
|
+
return this._$AM._$AU;
|
|
457
|
+
}
|
|
458
|
+
_$AI(t) {
|
|
459
|
+
P(this, t);
|
|
502
460
|
}
|
|
503
461
|
}
|
|
504
|
-
const
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
});
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
});
|
|
520
|
-
class le {
|
|
521
|
-
constructor(e) {
|
|
462
|
+
const Zt = { I: U }, Xt = tt.litHtmlPolyfillSupport;
|
|
463
|
+
Xt?.(R, U), (tt.litHtmlVersions ??= []).push("3.3.0");
|
|
464
|
+
const Yt = (r, t, e) => {
|
|
465
|
+
const s = e?.renderBefore ?? t;
|
|
466
|
+
let i = s._$litPart$;
|
|
467
|
+
if (i === void 0) {
|
|
468
|
+
const o = e?.renderBefore ?? null;
|
|
469
|
+
s._$litPart$ = i = new U(t.insertBefore(H(), o), o, void 0, e ?? {});
|
|
470
|
+
}
|
|
471
|
+
return i._$AI(r), i;
|
|
472
|
+
};
|
|
473
|
+
const st = globalThis;
|
|
474
|
+
let C = class extends E {
|
|
475
|
+
constructor() {
|
|
476
|
+
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
522
477
|
}
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
return this.
|
|
478
|
+
createRenderRoot() {
|
|
479
|
+
const t = super.createRenderRoot();
|
|
480
|
+
return this.renderOptions.renderBefore ??= t.firstChild, t;
|
|
526
481
|
}
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
this.
|
|
482
|
+
update(t) {
|
|
483
|
+
const e = this.render();
|
|
484
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = Yt(e, this.renderRoot, this.renderOptions);
|
|
530
485
|
}
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
return this.update(e, t);
|
|
486
|
+
connectedCallback() {
|
|
487
|
+
super.connectedCallback(), this._$Do?.setConnected(!0);
|
|
534
488
|
}
|
|
535
|
-
|
|
536
|
-
|
|
489
|
+
disconnectedCallback() {
|
|
490
|
+
super.disconnectedCallback(), this._$Do?.setConnected(!1);
|
|
537
491
|
}
|
|
492
|
+
render() {
|
|
493
|
+
return y;
|
|
494
|
+
}
|
|
495
|
+
};
|
|
496
|
+
C._$litElement$ = !0, C.finalized = !0, st.litElementHydrateSupport?.({ LitElement: C });
|
|
497
|
+
const Gt = st.litElementPolyfillSupport;
|
|
498
|
+
Gt?.({ LitElement: C });
|
|
499
|
+
(st.litElementVersions ??= []).push("4.2.0");
|
|
500
|
+
const Jt = (r) => (t, e) => {
|
|
501
|
+
e !== void 0 ? e.addInitializer((() => {
|
|
502
|
+
customElements.define(r, t);
|
|
503
|
+
})) : customElements.define(r, t);
|
|
504
|
+
};
|
|
505
|
+
const Kt = { attribute: !0, type: String, converter: j, reflect: !1, hasChanged: Q }, Qt = (r = Kt, t, e) => {
|
|
506
|
+
const { kind: s, metadata: i } = e;
|
|
507
|
+
let o = globalThis.litPropertyMetadata.get(i);
|
|
508
|
+
if (o === void 0 && globalThis.litPropertyMetadata.set(i, o = /* @__PURE__ */ new Map()), s === "setter" && ((r = Object.create(r)).wrapped = !0), o.set(e.name, r), s === "accessor") {
|
|
509
|
+
const { name: n } = e;
|
|
510
|
+
return { set(h) {
|
|
511
|
+
const a = t.get.call(this);
|
|
512
|
+
t.set.call(this, h), this.requestUpdate(n, a, r);
|
|
513
|
+
}, init(h) {
|
|
514
|
+
return h !== void 0 && this.C(n, void 0, r, h), h;
|
|
515
|
+
} };
|
|
516
|
+
}
|
|
517
|
+
if (s === "setter") {
|
|
518
|
+
const { name: n } = e;
|
|
519
|
+
return function(h) {
|
|
520
|
+
const a = this[n];
|
|
521
|
+
t.call(this, h), this.requestUpdate(n, a, r);
|
|
522
|
+
};
|
|
523
|
+
}
|
|
524
|
+
throw Error("Unsupported decorator location: " + s);
|
|
525
|
+
};
|
|
526
|
+
function V(r) {
|
|
527
|
+
return (t, e) => typeof e == "object" ? Qt(r, t, e) : ((s, i, o) => {
|
|
528
|
+
const n = i.hasOwnProperty(o);
|
|
529
|
+
return i.constructor.createProperty(o, s), n ? Object.getOwnPropertyDescriptor(i, o) : void 0;
|
|
530
|
+
})(r, t, e);
|
|
531
|
+
}
|
|
532
|
+
function T(r) {
|
|
533
|
+
return V({ ...r, state: !0, attribute: !1 });
|
|
538
534
|
}
|
|
539
|
-
const
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
535
|
+
const te = (r, t, e) => (e.configurable = !0, e.enumerable = !0, Reflect.decorate && typeof t != "object" && Object.defineProperty(r, t, e), e);
|
|
536
|
+
function ee(r, t) {
|
|
537
|
+
return (e, s, i) => {
|
|
538
|
+
const o = (n) => n.renderRoot?.querySelector(r) ?? null;
|
|
539
|
+
return te(e, s, { get() {
|
|
540
|
+
return o(this);
|
|
541
|
+
} });
|
|
542
|
+
};
|
|
543
|
+
}
|
|
544
|
+
const it = { ATTRIBUTE: 1, CHILD: 2 }, rt = (r) => (...t) => ({ _$litDirective$: r, values: t });
|
|
545
|
+
let ot = class {
|
|
546
|
+
constructor(t) {
|
|
547
|
+
}
|
|
548
|
+
get _$AU() {
|
|
549
|
+
return this._$AM._$AU;
|
|
550
|
+
}
|
|
551
|
+
_$AT(t, e, s) {
|
|
552
|
+
this._$Ct = t, this._$AM = e, this._$Ci = s;
|
|
553
|
+
}
|
|
554
|
+
_$AS(t, e) {
|
|
555
|
+
return this.update(t, e);
|
|
556
|
+
}
|
|
557
|
+
update(t, e) {
|
|
558
|
+
return this.render(...e);
|
|
559
|
+
}
|
|
560
|
+
};
|
|
561
|
+
const Et = "important", se = " !" + Et, F = rt(class extends ot {
|
|
562
|
+
constructor(r) {
|
|
563
|
+
if (super(r), r.type !== it.ATTRIBUTE || r.name !== "style" || r.strings?.length > 2) throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.");
|
|
564
|
+
}
|
|
565
|
+
render(r) {
|
|
566
|
+
return Object.keys(r).reduce(((t, e) => {
|
|
567
|
+
const s = r[e];
|
|
568
|
+
return s == null ? t : t + `${e = e.includes("-") ? e : e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g, "-$&").toLowerCase()}:${s};`;
|
|
569
|
+
}), "");
|
|
570
|
+
}
|
|
571
|
+
update(r, [t]) {
|
|
572
|
+
const { style: e } = r.element;
|
|
573
|
+
if (this.ft === void 0) return this.ft = new Set(Object.keys(t)), this.render(t);
|
|
574
|
+
for (const s of this.ft) t[s] == null && (this.ft.delete(s), s.includes("-") ? e.removeProperty(s) : e[s] = null);
|
|
557
575
|
for (const s in t) {
|
|
558
|
-
const
|
|
559
|
-
if (
|
|
560
|
-
this.
|
|
561
|
-
const
|
|
562
|
-
s.includes("-") ||
|
|
576
|
+
const i = t[s];
|
|
577
|
+
if (i != null) {
|
|
578
|
+
this.ft.add(s);
|
|
579
|
+
const o = typeof i == "string" && i.endsWith(se);
|
|
580
|
+
s.includes("-") || o ? e.setProperty(s, o ? i.slice(0, -11) : i, o ? Et : "") : e[s] = i;
|
|
563
581
|
}
|
|
564
582
|
}
|
|
565
|
-
return
|
|
583
|
+
return y;
|
|
566
584
|
}
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
if (
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
if (typeof e != "string")
|
|
581
|
-
throw new Error(`${this.constructor.directiveName}() called with a non-string value`);
|
|
582
|
-
if (e === this._value)
|
|
583
|
-
return this._templateResult;
|
|
584
|
-
this._value = e;
|
|
585
|
-
const t = [e];
|
|
586
|
-
return t.raw = t, this._templateResult = {
|
|
587
|
-
// Cast to a known set of integers that satisfy ResultType so that we
|
|
588
|
-
// don't have to export ResultType and possibly encourage this pattern.
|
|
589
|
-
// This property needs to remain unminified.
|
|
590
|
-
_$litType$: this.constructor.resultType,
|
|
591
|
-
strings: t,
|
|
592
|
-
values: []
|
|
593
|
-
};
|
|
585
|
+
});
|
|
586
|
+
class Y extends ot {
|
|
587
|
+
constructor(t) {
|
|
588
|
+
if (super(t), this.it = f, t.type !== it.CHILD) throw Error(this.constructor.directiveName + "() can only be used in child bindings");
|
|
589
|
+
}
|
|
590
|
+
render(t) {
|
|
591
|
+
if (t === f || t == null) return this._t = void 0, this.it = t;
|
|
592
|
+
if (t === y) return t;
|
|
593
|
+
if (typeof t != "string") throw Error(this.constructor.directiveName + "() called with a non-string value");
|
|
594
|
+
if (t === this.it) return this._t;
|
|
595
|
+
this.it = t;
|
|
596
|
+
const e = [t];
|
|
597
|
+
return e.raw = e, this._t = { _$litType$: this.constructor.resultType, strings: e, values: [] };
|
|
594
598
|
}
|
|
595
599
|
}
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
const
|
|
605
|
-
|
|
606
|
-
if (t === void 0) {
|
|
607
|
-
const n = T(i).insertBefore(xe(), s), r = T(i).insertBefore(xe(), s);
|
|
608
|
-
t = new at(n, r, o, o.options);
|
|
600
|
+
Y.directiveName = "unsafeHTML", Y.resultType = 1;
|
|
601
|
+
let G = class extends Y {
|
|
602
|
+
};
|
|
603
|
+
G.directiveName = "unsafeSVG", G.resultType = 2;
|
|
604
|
+
const ie = rt(G);
|
|
605
|
+
const { I: re } = Zt, vt = () => document.createComment(""), M = (r, t, e) => {
|
|
606
|
+
const s = r._$AA.parentNode, i = t === void 0 ? r._$AB : t._$AA;
|
|
607
|
+
if (e === void 0) {
|
|
608
|
+
const o = s.insertBefore(vt(), i), n = s.insertBefore(vt(), i);
|
|
609
|
+
e = new re(o, n, r, r.options);
|
|
609
610
|
} else {
|
|
610
|
-
const
|
|
611
|
+
const o = e._$AB.nextSibling, n = e._$AM, h = n !== r;
|
|
611
612
|
if (h) {
|
|
612
|
-
t._$reparentDisconnectables?.(o), t._$parent = o;
|
|
613
613
|
let a;
|
|
614
|
-
|
|
614
|
+
e._$AQ?.(r), e._$AM = r, e._$AP !== void 0 && (a = r._$AU) !== n._$AU && e._$AP(a);
|
|
615
615
|
}
|
|
616
|
-
if (
|
|
617
|
-
let a =
|
|
618
|
-
for (; a !==
|
|
619
|
-
const
|
|
620
|
-
|
|
616
|
+
if (o !== i || h) {
|
|
617
|
+
let a = e._$AA;
|
|
618
|
+
for (; a !== o; ) {
|
|
619
|
+
const d = a.nextSibling;
|
|
620
|
+
s.insertBefore(a, i), a = d;
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
623
|
}
|
|
624
|
-
return
|
|
625
|
-
},
|
|
626
|
-
|
|
627
|
-
let
|
|
628
|
-
const
|
|
629
|
-
for (;
|
|
630
|
-
const
|
|
631
|
-
|
|
624
|
+
return e;
|
|
625
|
+
}, w = (r, t, e = r) => (r._$AI(t, e), r), oe = {}, ne = (r, t = oe) => r._$AH = t, ae = (r) => r._$AH, Z = (r) => {
|
|
626
|
+
r._$AP?.(!1, !0);
|
|
627
|
+
let t = r._$AA;
|
|
628
|
+
const e = r._$AB.nextSibling;
|
|
629
|
+
for (; t !== e; ) {
|
|
630
|
+
const s = t.nextSibling;
|
|
631
|
+
t.remove(), t = s;
|
|
632
632
|
}
|
|
633
633
|
};
|
|
634
|
-
const
|
|
635
|
-
const
|
|
636
|
-
for (let
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
throw new Error("repeat() can only be used in text expressions");
|
|
644
|
-
}
|
|
645
|
-
_getValuesAndKeys(e, t, i) {
|
|
634
|
+
const yt = (r, t, e) => {
|
|
635
|
+
const s = /* @__PURE__ */ new Map();
|
|
636
|
+
for (let i = t; i <= e; i++) s.set(r[i], i);
|
|
637
|
+
return s;
|
|
638
|
+
}, X = rt(class extends ot {
|
|
639
|
+
constructor(r) {
|
|
640
|
+
if (super(r), r.type !== it.CHILD) throw Error("repeat() can only be used in text expressions");
|
|
641
|
+
}
|
|
642
|
+
dt(r, t, e) {
|
|
646
643
|
let s;
|
|
647
|
-
|
|
648
|
-
const
|
|
649
|
-
let
|
|
650
|
-
for (const
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
return this.
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
if (
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
l
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
else if (f === void 0 && (f = we(h, p, g), m = we(a, d, l)), !f.has(a[d]))
|
|
680
|
-
Q(n[d]), d++;
|
|
681
|
-
else if (!f.has(a[l]))
|
|
682
|
-
Q(n[l]), l--;
|
|
683
|
-
else {
|
|
684
|
-
const w = m.get(h[p]), F = w !== void 0 ? n[w] : null;
|
|
685
|
-
if (F === null) {
|
|
686
|
-
const me = k(e, n[d]);
|
|
687
|
-
E(me, r[p]), c[p] = me;
|
|
688
|
-
} else
|
|
689
|
-
c[p] = E(F, r[p]), k(e, n[d], F), n[w] = null;
|
|
690
|
-
p++;
|
|
691
|
-
}
|
|
692
|
-
for (; p <= g; ) {
|
|
693
|
-
const w = k(e, c[g + 1]);
|
|
694
|
-
E(w, r[p]), c[p++] = w;
|
|
644
|
+
e === void 0 ? e = t : t !== void 0 && (s = t);
|
|
645
|
+
const i = [], o = [];
|
|
646
|
+
let n = 0;
|
|
647
|
+
for (const h of r) i[n] = s ? s(h, n) : n, o[n] = e(h, n), n++;
|
|
648
|
+
return { values: o, keys: i };
|
|
649
|
+
}
|
|
650
|
+
render(r, t, e) {
|
|
651
|
+
return this.dt(r, t, e).values;
|
|
652
|
+
}
|
|
653
|
+
update(r, [t, e, s]) {
|
|
654
|
+
const i = ae(r), { values: o, keys: n } = this.dt(t, e, s);
|
|
655
|
+
if (!Array.isArray(i)) return this.ut = n, o;
|
|
656
|
+
const h = this.ut ??= [], a = [];
|
|
657
|
+
let d, u, l = 0, p = i.length - 1, c = 0, $ = o.length - 1;
|
|
658
|
+
for (; l <= p && c <= $; ) if (i[l] === null) l++;
|
|
659
|
+
else if (i[p] === null) p--;
|
|
660
|
+
else if (h[l] === n[c]) a[c] = w(i[l], o[c]), l++, c++;
|
|
661
|
+
else if (h[p] === n[$]) a[$] = w(i[p], o[$]), p--, $--;
|
|
662
|
+
else if (h[l] === n[$]) a[$] = w(i[l], o[$]), M(r, a[$ + 1], i[l]), l++, $--;
|
|
663
|
+
else if (h[p] === n[c]) a[c] = w(i[p], o[c]), M(r, i[l], i[p]), p--, c++;
|
|
664
|
+
else if (d === void 0 && (d = yt(n, c, $), u = yt(h, l, p)), d.has(h[l])) if (d.has(h[p])) {
|
|
665
|
+
const m = u.get(n[c]), W = m !== void 0 ? i[m] : null;
|
|
666
|
+
if (W === null) {
|
|
667
|
+
const at = M(r, i[l]);
|
|
668
|
+
w(at, o[c]), a[c] = at;
|
|
669
|
+
} else a[c] = w(W, o[c]), M(r, i[l], W), i[m] = null;
|
|
670
|
+
c++;
|
|
671
|
+
} else Z(i[p]), p--;
|
|
672
|
+
else Z(i[l]), l++;
|
|
673
|
+
for (; c <= $; ) {
|
|
674
|
+
const m = M(r, a[$ + 1]);
|
|
675
|
+
w(m, o[c]), a[c++] = m;
|
|
695
676
|
}
|
|
696
|
-
for (;
|
|
697
|
-
const
|
|
698
|
-
|
|
677
|
+
for (; l <= p; ) {
|
|
678
|
+
const m = i[l++];
|
|
679
|
+
m !== null && Z(m);
|
|
699
680
|
}
|
|
700
|
-
return this.
|
|
681
|
+
return this.ut = n, ne(r, a), y;
|
|
701
682
|
}
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
var
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
return i && s && mt(e, t, s), s;
|
|
683
|
+
});
|
|
684
|
+
var le = Object.defineProperty, he = Object.getOwnPropertyDescriptor, Ct = (r, t, e, s) => {
|
|
685
|
+
for (var i = s > 1 ? void 0 : s ? he(t, e) : t, o = r.length - 1, n; o >= 0; o--)
|
|
686
|
+
(n = r[o]) && (i = (s ? n(t, e, i) : n(i)) || i);
|
|
687
|
+
return s && i && le(t, e, i), i;
|
|
708
688
|
};
|
|
709
|
-
let
|
|
689
|
+
let I = class extends C {
|
|
710
690
|
render() {
|
|
711
|
-
return
|
|
712
|
-
${this.value !== void 0 ?
|
|
691
|
+
return g`
|
|
692
|
+
${this.value !== void 0 ? g`<div class="bar" style="width: ${this.value * 100}%;"></div>` : g`<div class="indeterminate"></div>`}
|
|
713
693
|
`;
|
|
714
694
|
}
|
|
715
695
|
};
|
|
716
|
-
|
|
696
|
+
I.styles = bt`
|
|
717
697
|
:host {
|
|
718
698
|
display: inline-block;
|
|
719
699
|
width: var(--progress-width, 200px);
|
|
@@ -755,36 +735,36 @@ B.styles = ve`
|
|
|
755
735
|
}
|
|
756
736
|
}
|
|
757
737
|
`;
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
],
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
],
|
|
764
|
-
var
|
|
765
|
-
for (var
|
|
766
|
-
(
|
|
767
|
-
return
|
|
738
|
+
Ct([
|
|
739
|
+
V({ type: Number })
|
|
740
|
+
], I.prototype, "value", 2);
|
|
741
|
+
I = Ct([
|
|
742
|
+
Jt("linear-progress")
|
|
743
|
+
], I);
|
|
744
|
+
var ce = Object.defineProperty, _ = (r, t, e, s) => {
|
|
745
|
+
for (var i = void 0, o = r.length - 1, n; o >= 0; o--)
|
|
746
|
+
(n = r[o]) && (i = n(t, e, i) || i);
|
|
747
|
+
return i && ce(t, e, i), i;
|
|
768
748
|
};
|
|
769
|
-
const
|
|
749
|
+
const nt = class nt extends C {
|
|
770
750
|
constructor() {
|
|
771
|
-
super(), this.version = "1.0.
|
|
751
|
+
super(), this.version = "1.0.10", this.getModifier = this.getModifier.bind(this);
|
|
772
752
|
}
|
|
773
|
-
update(
|
|
774
|
-
|
|
753
|
+
update(t) {
|
|
754
|
+
t.has("inputData") && (this.transform(), this.modifier || this.getModifier()), t.has("theme") && this.registerTheme(this.theme), super.update(t);
|
|
775
755
|
}
|
|
776
|
-
firstUpdated(
|
|
756
|
+
firstUpdated(t) {
|
|
777
757
|
this.registerTheme(this.theme), new ResizeObserver(this.getModifier).observe(this);
|
|
778
758
|
}
|
|
779
|
-
registerTheme(
|
|
780
|
-
const
|
|
781
|
-
this.themeBgColor =
|
|
759
|
+
registerTheme(t) {
|
|
760
|
+
const e = getComputedStyle(this).getPropertyValue("--re-text-color").trim(), s = getComputedStyle(this).getPropertyValue("--re-tile-background-color").trim();
|
|
761
|
+
this.themeBgColor = s || this.theme?.theme_object?.backgroundColor, this.themeTitleColor = e || this.theme?.theme_object?.title?.textStyle?.color, this.themeSubtitleColor = e || this.theme?.theme_object?.title?.subtextStyle?.color || this.themeTitleColor;
|
|
782
762
|
}
|
|
783
|
-
handleFileChange(
|
|
784
|
-
const
|
|
785
|
-
|
|
763
|
+
handleFileChange(t) {
|
|
764
|
+
const s = t.target.files?.[0];
|
|
765
|
+
s && (this.previewUrl && URL.revokeObjectURL(this.previewUrl), this.previewUrl = URL.createObjectURL(s), this.dispatchEvent(
|
|
786
766
|
new CustomEvent("overlay-file-selected", {
|
|
787
|
-
detail: { file:
|
|
767
|
+
detail: { file: s, name: s.name, size: s.size, type: s.type, url: this.previewUrl },
|
|
788
768
|
bubbles: !0,
|
|
789
769
|
composed: !0
|
|
790
770
|
})
|
|
@@ -795,29 +775,29 @@ const he = class he extends Te {
|
|
|
795
775
|
this.previewUrl = void 0;
|
|
796
776
|
return;
|
|
797
777
|
}
|
|
798
|
-
const
|
|
799
|
-
if (
|
|
800
|
-
this.inlineSvg =
|
|
778
|
+
const t = this.inputData.image.trim(), s = t.replace(/^\uFEFF/, "").trimStart().match(/<svg[\s\S]*?<\/svg>/i);
|
|
779
|
+
if (s) {
|
|
780
|
+
this.inlineSvg = s[0].trim(), this.previewUrl = void 0;
|
|
801
781
|
return;
|
|
802
782
|
}
|
|
803
|
-
if (/^data:image\/svg\+xml[,;]/.test(
|
|
804
|
-
this.previewUrl =
|
|
783
|
+
if (/^data:image\/svg\+xml[,;]/.test(t)) {
|
|
784
|
+
this.previewUrl = t;
|
|
805
785
|
return;
|
|
806
786
|
}
|
|
807
|
-
if (/^data:image\/[a-zA-Z.+-]+;base64,/.test(
|
|
808
|
-
this.previewUrl =
|
|
787
|
+
if (/^data:image\/[a-zA-Z.+-]+;base64,/.test(t)) {
|
|
788
|
+
this.previewUrl = t;
|
|
809
789
|
return;
|
|
810
790
|
}
|
|
811
|
-
if (/^[A-Za-z0-9+/]+=*$/.test(
|
|
812
|
-
this.previewUrl = `data:image/*;base64,${
|
|
791
|
+
if (/^[A-Za-z0-9+/]+=*$/.test(t) && t.length > 100) {
|
|
792
|
+
this.previewUrl = `data:image/*;base64,${t}`;
|
|
813
793
|
return;
|
|
814
794
|
}
|
|
815
795
|
try {
|
|
816
|
-
new URL(
|
|
796
|
+
new URL(t), this.previewUrl = t;
|
|
817
797
|
return;
|
|
818
798
|
} catch {
|
|
819
|
-
if (/^([./]|\/)/.test(
|
|
820
|
-
this.previewUrl =
|
|
799
|
+
if (/^([./]|\/)/.test(t)) {
|
|
800
|
+
this.previewUrl = t;
|
|
821
801
|
return;
|
|
822
802
|
}
|
|
823
803
|
}
|
|
@@ -825,117 +805,117 @@ const he = class he extends Te {
|
|
|
825
805
|
}
|
|
826
806
|
async getModifier() {
|
|
827
807
|
if (!this.baseLayer) return;
|
|
828
|
-
const
|
|
829
|
-
if (!e) return;
|
|
830
|
-
const t = this.baseLayer.parentElement?.getBoundingClientRect();
|
|
808
|
+
const t = this.baseLayer.getBoundingClientRect();
|
|
831
809
|
if (!t) return;
|
|
832
|
-
|
|
810
|
+
const e = this.baseLayer.parentElement?.getBoundingClientRect();
|
|
811
|
+
if (!e) return;
|
|
812
|
+
let s, i;
|
|
833
813
|
if (this.baseLayer instanceof HTMLImageElement)
|
|
834
|
-
|
|
814
|
+
s = this.baseLayer.naturalWidth, i = this.baseLayer.naturalHeight;
|
|
835
815
|
else {
|
|
836
|
-
const
|
|
837
|
-
if (
|
|
838
|
-
const
|
|
839
|
-
if (console.log(
|
|
840
|
-
|
|
816
|
+
const p = this.baseLayer.querySelector("svg");
|
|
817
|
+
if (p) {
|
|
818
|
+
const c = p.viewBox.baseVal;
|
|
819
|
+
if (console.log(c), c && c.width > 0 && c.height > 0)
|
|
820
|
+
s = c.width, i = c.height;
|
|
841
821
|
else {
|
|
842
|
-
const
|
|
843
|
-
|
|
822
|
+
const $ = this.baseLayer.getAttribute("width"), m = this.baseLayer.getAttribute("height");
|
|
823
|
+
$ && m && (s = parseFloat($), i = parseFloat(m));
|
|
844
824
|
}
|
|
845
825
|
}
|
|
846
826
|
}
|
|
847
|
-
if (!
|
|
848
|
-
const
|
|
849
|
-
this.modifier = { scaler: h, xOffset:
|
|
827
|
+
if (!s || !i) return;
|
|
828
|
+
const o = t.width / s, n = t.height / i, h = Math.min(o, n), a = s * h, d = i * h, u = (e.width - a) / 2, l = (e.height - d) / 2;
|
|
829
|
+
this.modifier = { scaler: h, xOffset: u, yOffset: l, visibleWidth: a, visibleHeight: d };
|
|
850
830
|
}
|
|
851
|
-
getOverlayItemPosition(
|
|
831
|
+
getOverlayItemPosition(t, e, s) {
|
|
852
832
|
return {
|
|
853
|
-
left:
|
|
854
|
-
top:
|
|
833
|
+
left: t * s.visibleWidth,
|
|
834
|
+
top: e * s.visibleHeight
|
|
855
835
|
};
|
|
856
836
|
}
|
|
857
|
-
renderText(
|
|
858
|
-
const
|
|
859
|
-
if (!
|
|
860
|
-
const
|
|
861
|
-
let h =
|
|
837
|
+
renderText(t, e, s) {
|
|
838
|
+
const i = t, o = this.getOverlayItemPosition(e.relXPos, e.relYPos, s);
|
|
839
|
+
if (!o) return f;
|
|
840
|
+
const n = i.textStyle?.precision ?? 1;
|
|
841
|
+
let h = e.data;
|
|
862
842
|
const a = Number(h);
|
|
863
|
-
let
|
|
864
|
-
if (!Number.isNaN(a) && typeof
|
|
865
|
-
h = a.toFixed(
|
|
866
|
-
const
|
|
867
|
-
|
|
843
|
+
let d = "#333";
|
|
844
|
+
if (!Number.isNaN(a) && typeof n == "number" && n >= 0) {
|
|
845
|
+
h = a.toFixed(n);
|
|
846
|
+
const l = i.sections?.sectionLimits.findIndex((p) => a <= p) ?? -2;
|
|
847
|
+
d = (l >= 1 ? i.sections?.colors[l - 1] : "#333") ?? "#333";
|
|
868
848
|
}
|
|
869
|
-
const
|
|
870
|
-
"font-size": (
|
|
871
|
-
color:
|
|
872
|
-
"background-color":
|
|
873
|
-
"font-weight":
|
|
874
|
-
left: `${
|
|
875
|
-
top: `${
|
|
876
|
-
"border-radius": 10 *
|
|
849
|
+
const u = {
|
|
850
|
+
"font-size": (i.textStyle.fontSize ?? 14) * s.scaler + "px",
|
|
851
|
+
color: d,
|
|
852
|
+
"background-color": i.textStyle.backgroundColor,
|
|
853
|
+
"font-weight": i.textStyle.fontWeight,
|
|
854
|
+
left: `${o.left}px`,
|
|
855
|
+
top: `${o.top}px`,
|
|
856
|
+
"border-radius": 10 * s.scaler + "px",
|
|
877
857
|
"transform-origin": "50% 50%",
|
|
878
858
|
transform: "translate(-50%, -50%)",
|
|
879
|
-
padding: `${6 *
|
|
859
|
+
padding: `${6 * s.scaler}px ${12 * s.scaler}px`
|
|
880
860
|
};
|
|
881
|
-
return
|
|
882
|
-
<div class="overlay-item" style=${
|
|
861
|
+
return g`
|
|
862
|
+
<div class="overlay-item" style=${F(u)}>${e.prefix}${h}${e.suffix}</div>
|
|
883
863
|
`;
|
|
884
864
|
}
|
|
885
|
-
renderProgress(
|
|
886
|
-
const
|
|
887
|
-
if (!
|
|
888
|
-
const
|
|
889
|
-
"--progress-color": (
|
|
890
|
-
"--progress-width": (
|
|
891
|
-
"--progress-height": (
|
|
892
|
-
"--progress-background":
|
|
893
|
-
"border-radius": 10 *
|
|
865
|
+
renderProgress(t, e, s) {
|
|
866
|
+
const i = t, o = this.getOverlayItemPosition(e.relXPos, e.relYPos, s);
|
|
867
|
+
if (!o) return f;
|
|
868
|
+
const n = i.sections?.sectionLimits.findIndex(($) => Number(e.data) <= $) ?? -2, a = {
|
|
869
|
+
"--progress-color": (n >= 1 ? i.sections?.colors[n - 1] : void 0) ?? "#333",
|
|
870
|
+
"--progress-width": (i.progressStyle?.width ?? 10) * s.scaler + "px",
|
|
871
|
+
"--progress-height": (i.progressStyle?.height ?? 100) * s.scaler + "px",
|
|
872
|
+
"--progress-background": i.progressStyle?.backgroundColor ?? "#fff",
|
|
873
|
+
"border-radius": 10 * s.scaler + "px",
|
|
894
874
|
"transform-origin": "50% 50%",
|
|
895
|
-
transform: `translate(-50%, -50%) rotate(${
|
|
896
|
-
left: `${
|
|
897
|
-
top: `${
|
|
898
|
-
},
|
|
899
|
-
let
|
|
900
|
-
return
|
|
901
|
-
}
|
|
902
|
-
renderLayer(
|
|
903
|
-
const
|
|
904
|
-
if (!
|
|
905
|
-
const
|
|
906
|
-
left:
|
|
907
|
-
top:
|
|
908
|
-
width:
|
|
909
|
-
height:
|
|
875
|
+
transform: `translate(-50%, -50%) rotate(${i.progressStyle?.rotate ?? 0}deg)`,
|
|
876
|
+
left: `${o.left}px`,
|
|
877
|
+
top: `${o.top}px`
|
|
878
|
+
}, d = Number(e.data), u = i.sections ?? {}, l = Math.min(...u.sectionLimits.map(Number)), p = Math.max(...u.sectionLimits.map(Number));
|
|
879
|
+
let c = p === l ? 0 : (d - l) / (p - l);
|
|
880
|
+
return c = Math.min(1, Math.max(0, c)), g` <linear-progress .value=${c} style=${F(a)}></linear-progress> `;
|
|
881
|
+
}
|
|
882
|
+
renderLayer(t) {
|
|
883
|
+
const e = this.modifier;
|
|
884
|
+
if (!e) return f;
|
|
885
|
+
const s = {
|
|
886
|
+
left: e.xOffset + "px",
|
|
887
|
+
top: e.yOffset + "px",
|
|
888
|
+
width: e.visibleWidth + "px",
|
|
889
|
+
height: e.visibleHeight + "px"
|
|
910
890
|
};
|
|
911
|
-
return
|
|
891
|
+
return g`<div
|
|
912
892
|
class="overlay"
|
|
913
|
-
style=${
|
|
914
|
-
type="${
|
|
915
|
-
name="${
|
|
893
|
+
style=${F(s)}
|
|
894
|
+
type="${t.layerType}"
|
|
895
|
+
name="${t.layerName}"
|
|
916
896
|
>
|
|
917
|
-
${
|
|
897
|
+
${t.layerType === "text" ? this.renderTextLayer(t) : this.renderProgressLayer(t)}
|
|
918
898
|
</div>`;
|
|
919
899
|
}
|
|
920
|
-
renderTextLayer(
|
|
921
|
-
const
|
|
922
|
-
return
|
|
923
|
-
|
|
924
|
-
(
|
|
925
|
-
(
|
|
926
|
-
)}` :
|
|
927
|
-
}
|
|
928
|
-
renderProgressLayer(
|
|
929
|
-
const
|
|
930
|
-
return
|
|
931
|
-
|
|
932
|
-
(
|
|
933
|
-
(
|
|
934
|
-
)}` :
|
|
900
|
+
renderTextLayer(t) {
|
|
901
|
+
const e = this.modifier;
|
|
902
|
+
return e ? g`${X(
|
|
903
|
+
t.textPins ?? [],
|
|
904
|
+
(s, i) => i,
|
|
905
|
+
(s) => g`${this.renderText(t, s, e)}`
|
|
906
|
+
)}` : f;
|
|
907
|
+
}
|
|
908
|
+
renderProgressLayer(t) {
|
|
909
|
+
const e = this.modifier;
|
|
910
|
+
return e ? g`${X(
|
|
911
|
+
t.progressPins ?? [],
|
|
912
|
+
(s, i) => i,
|
|
913
|
+
(s) => g`${this.renderProgress(t, s, e)}`
|
|
914
|
+
)}` : f;
|
|
935
915
|
}
|
|
936
916
|
render() {
|
|
937
|
-
const
|
|
938
|
-
return
|
|
917
|
+
const t = !!this.inlineSvg || !!this.previewUrl;
|
|
918
|
+
return g`
|
|
939
919
|
<div class="wrapper" style="background-color: ${this.themeBgColor}">
|
|
940
920
|
<h3 class="paging" ?active=${this.inputData?.title} style="color: ${this.themeTitleColor}">
|
|
941
921
|
${this.inputData?.title}
|
|
@@ -948,9 +928,9 @@ const he = class he extends Te {
|
|
|
948
928
|
${this.inputData?.subTitle}
|
|
949
929
|
</p>
|
|
950
930
|
|
|
951
|
-
<div class="paging no-data" ?active=${!
|
|
952
|
-
<div class="img-container paging" ?active="${
|
|
953
|
-
${this.inlineSvg ?
|
|
931
|
+
<div class="paging no-data" ?active=${!t}>No Image</div>
|
|
932
|
+
<div class="img-container paging" ?active="${t}">
|
|
933
|
+
${this.inlineSvg ? g`<div id="base-layer" class="svg-wrapper">${ie(this.inlineSvg)}</div>` : this.previewUrl ? g`<img
|
|
954
934
|
id="base-layer"
|
|
955
935
|
@load="${this.getModifier}"
|
|
956
936
|
src="${this.previewUrl}"
|
|
@@ -959,15 +939,15 @@ const he = class he extends Te {
|
|
|
959
939
|
/>` : ""}
|
|
960
940
|
${X(
|
|
961
941
|
this.inputData?.overlays ?? [],
|
|
962
|
-
(
|
|
963
|
-
(
|
|
942
|
+
(e) => e.layerName,
|
|
943
|
+
(e) => g` ${this.renderLayer(e)} `
|
|
964
944
|
)}
|
|
965
945
|
</div>
|
|
966
946
|
</div>
|
|
967
947
|
`;
|
|
968
948
|
}
|
|
969
949
|
};
|
|
970
|
-
|
|
950
|
+
nt.styles = bt`
|
|
971
951
|
:host {
|
|
972
952
|
display: block;
|
|
973
953
|
font-family: sans-serif;
|
|
@@ -1051,36 +1031,36 @@ he.styles = ve`
|
|
|
1051
1031
|
pointer-events: auto;
|
|
1052
1032
|
}
|
|
1053
1033
|
`;
|
|
1054
|
-
let
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
],
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
],
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
],
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
],
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
],
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
],
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
],
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
],
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
],
|
|
1082
|
-
window.customElements.define("widget-overlay-1.0.
|
|
1034
|
+
let v = nt;
|
|
1035
|
+
_([
|
|
1036
|
+
V({ type: Object })
|
|
1037
|
+
], v.prototype, "inputData");
|
|
1038
|
+
_([
|
|
1039
|
+
V({ type: Object })
|
|
1040
|
+
], v.prototype, "theme");
|
|
1041
|
+
_([
|
|
1042
|
+
T()
|
|
1043
|
+
], v.prototype, "themeBgColor");
|
|
1044
|
+
_([
|
|
1045
|
+
T()
|
|
1046
|
+
], v.prototype, "themeTitleColor");
|
|
1047
|
+
_([
|
|
1048
|
+
T()
|
|
1049
|
+
], v.prototype, "themeSubtitleColor");
|
|
1050
|
+
_([
|
|
1051
|
+
T()
|
|
1052
|
+
], v.prototype, "previewUrl");
|
|
1053
|
+
_([
|
|
1054
|
+
T()
|
|
1055
|
+
], v.prototype, "inlineSvg");
|
|
1056
|
+
_([
|
|
1057
|
+
T()
|
|
1058
|
+
], v.prototype, "modifier");
|
|
1059
|
+
_([
|
|
1060
|
+
ee("#base-layer")
|
|
1061
|
+
], v.prototype, "baseLayer");
|
|
1062
|
+
window.customElements.define("widget-overlay-1.0.10", v);
|
|
1083
1063
|
export {
|
|
1084
|
-
|
|
1064
|
+
v as WidgetImage
|
|
1085
1065
|
};
|
|
1086
1066
|
//# sourceMappingURL=widget-overlay.js.map
|