xactsize-webcomponents 1.0.18 → 1.0.20
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/body-measurer.es.js +236 -231
- package/dist/body-measurer.umd.js +32 -32
- package/package.json +1 -1
package/dist/body-measurer.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const wA = (l, A, t) => {
|
|
2
2
|
const r = l[A];
|
|
3
|
-
return r ? typeof r == "function" ? r() : Promise.resolve(r) : new Promise((e,
|
|
3
|
+
return r ? typeof r == "function" ? r() : Promise.resolve(r) : new Promise((e, p) => {
|
|
4
4
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
|
|
5
|
-
|
|
5
|
+
p.bind(
|
|
6
6
|
null,
|
|
7
7
|
new Error(
|
|
8
8
|
"Unknown variable dynamic import: " + A + (A.split("/").length !== t ? ". Note that variables only represent file names one level deep." : "")
|
|
@@ -16,16 +16,16 @@ const wA = (l, A, t) => {
|
|
|
16
16
|
* Copyright 2019 Google LLC
|
|
17
17
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
18
18
|
*/
|
|
19
|
-
const
|
|
19
|
+
const B = globalThis, uA = B.ShadowRoot && (B.ShadyCSS === void 0 || B.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, dA = Symbol(), TA = /* @__PURE__ */ new WeakMap();
|
|
20
20
|
let ZA = class {
|
|
21
21
|
constructor(A, t, r) {
|
|
22
|
-
if (this._$cssResult$ = !0, r !==
|
|
22
|
+
if (this._$cssResult$ = !0, r !== dA) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
23
23
|
this.cssText = A, this.t = t;
|
|
24
24
|
}
|
|
25
25
|
get styleSheet() {
|
|
26
26
|
let A = this.o;
|
|
27
27
|
const t = this.t;
|
|
28
|
-
if (
|
|
28
|
+
if (uA && A === void 0) {
|
|
29
29
|
const r = t !== void 0 && t.length === 1;
|
|
30
30
|
r && (A = TA.get(t)), A === void 0 && ((this.o = A = new CSSStyleSheet()).replaceSync(this.cssText), r && TA.set(t, A));
|
|
31
31
|
}
|
|
@@ -35,20 +35,20 @@ let ZA = class {
|
|
|
35
35
|
return this.cssText;
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
|
-
const YA = (l) => new ZA(typeof l == "string" ? l : l + "", void 0,
|
|
39
|
-
const t = l.length === 1 ? l[0] : A.reduce((r, e,
|
|
40
|
-
if (
|
|
41
|
-
if (typeof
|
|
42
|
-
throw Error("Value passed to 'css' function must be a 'css' function result: " +
|
|
43
|
-
})(e) + l[
|
|
44
|
-
return new ZA(t, l,
|
|
38
|
+
const YA = (l) => new ZA(typeof l == "string" ? l : l + "", void 0, dA), N = (l, ...A) => {
|
|
39
|
+
const t = l.length === 1 ? l[0] : A.reduce((r, e, p) => r + ((V) => {
|
|
40
|
+
if (V._$cssResult$ === !0) return V.cssText;
|
|
41
|
+
if (typeof V == "number") return V;
|
|
42
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + V + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
43
|
+
})(e) + l[p + 1], l[0]);
|
|
44
|
+
return new ZA(t, l, dA);
|
|
45
45
|
}, CA = (l, A) => {
|
|
46
|
-
if (
|
|
46
|
+
if (uA) l.adoptedStyleSheets = A.map((t) => t instanceof CSSStyleSheet ? t : t.styleSheet);
|
|
47
47
|
else for (const t of A) {
|
|
48
|
-
const r = document.createElement("style"), e =
|
|
48
|
+
const r = document.createElement("style"), e = B.litNonce;
|
|
49
49
|
e !== void 0 && r.setAttribute("nonce", e), r.textContent = t.cssText, l.appendChild(r);
|
|
50
50
|
}
|
|
51
|
-
}, XA =
|
|
51
|
+
}, XA = uA ? (l) => l : (l) => l instanceof CSSStyleSheet ? ((A) => {
|
|
52
52
|
let t = "";
|
|
53
53
|
for (const r of A.cssRules) t += r.cssText;
|
|
54
54
|
return YA(t);
|
|
@@ -58,7 +58,7 @@ const YA = (l) => new ZA(typeof l == "string" ? l : l + "", void 0, uA), Z = (l,
|
|
|
58
58
|
* Copyright 2017 Google LLC
|
|
59
59
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
60
60
|
*/
|
|
61
|
-
const { is: DA, defineProperty: QA, getOwnPropertyDescriptor: gA, getOwnPropertyNames: BA, getOwnPropertySymbols: _A, getPrototypeOf: $A } = Object, s = globalThis, xA = s.trustedTypes, At = xA ? xA.emptyScript : "",
|
|
61
|
+
const { is: DA, defineProperty: QA, getOwnPropertyDescriptor: gA, getOwnPropertyNames: BA, getOwnPropertySymbols: _A, getPrototypeOf: $A } = Object, s = globalThis, xA = s.trustedTypes, At = xA ? xA.emptyScript : "", eA = s.reactiveElementPolyfillSupport, z = (l, A) => l, _ = { toAttribute(l, A) {
|
|
62
62
|
switch (A) {
|
|
63
63
|
case Boolean:
|
|
64
64
|
l = l ? At : null;
|
|
@@ -86,9 +86,9 @@ const { is: DA, defineProperty: QA, getOwnPropertyDescriptor: gA, getOwnProperty
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
return t;
|
|
89
|
-
} },
|
|
89
|
+
} }, jA = (l, A) => !DA(l, A), KA = { attribute: !0, type: String, converter: _, reflect: !1, useDefault: !1, hasChanged: jA };
|
|
90
90
|
Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), s.litPropertyMetadata ?? (s.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
|
|
91
|
-
let
|
|
91
|
+
let m = class extends HTMLElement {
|
|
92
92
|
static addInitializer(A) {
|
|
93
93
|
this._$Ei(), (this.l ?? (this.l = [])).push(A);
|
|
94
94
|
}
|
|
@@ -102,27 +102,27 @@ let P = class extends HTMLElement {
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
static getPropertyDescriptor(A, t, r) {
|
|
105
|
-
const { get: e, set:
|
|
105
|
+
const { get: e, set: p } = gA(this.prototype, A) ?? { get() {
|
|
106
106
|
return this[t];
|
|
107
|
-
}, set(
|
|
108
|
-
this[t] =
|
|
107
|
+
}, set(V) {
|
|
108
|
+
this[t] = V;
|
|
109
109
|
} };
|
|
110
|
-
return { get: e, set(
|
|
110
|
+
return { get: e, set(V) {
|
|
111
111
|
const S = e == null ? void 0 : e.call(this);
|
|
112
|
-
|
|
112
|
+
p == null || p.call(this, V), this.requestUpdate(A, S, r);
|
|
113
113
|
}, configurable: !0, enumerable: !0 };
|
|
114
114
|
}
|
|
115
115
|
static getPropertyOptions(A) {
|
|
116
116
|
return this.elementProperties.get(A) ?? KA;
|
|
117
117
|
}
|
|
118
118
|
static _$Ei() {
|
|
119
|
-
if (this.hasOwnProperty(
|
|
119
|
+
if (this.hasOwnProperty(z("elementProperties"))) return;
|
|
120
120
|
const A = $A(this);
|
|
121
121
|
A.finalize(), A.l !== void 0 && (this.l = [...A.l]), this.elementProperties = new Map(A.elementProperties);
|
|
122
122
|
}
|
|
123
123
|
static finalize() {
|
|
124
|
-
if (this.hasOwnProperty(
|
|
125
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
124
|
+
if (this.hasOwnProperty(z("finalized"))) return;
|
|
125
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(z("properties"))) {
|
|
126
126
|
const t = this.properties, r = [...BA(t), ..._A(t)];
|
|
127
127
|
for (const e of r) this.createProperty(e, t[e]);
|
|
128
128
|
}
|
|
@@ -194,32 +194,32 @@ let P = class extends HTMLElement {
|
|
|
194
194
|
this._$AK(A, r);
|
|
195
195
|
}
|
|
196
196
|
_$ET(A, t) {
|
|
197
|
-
var
|
|
197
|
+
var p;
|
|
198
198
|
const r = this.constructor.elementProperties.get(A), e = this.constructor._$Eu(A, r);
|
|
199
199
|
if (e !== void 0 && r.reflect === !0) {
|
|
200
|
-
const
|
|
201
|
-
this._$Em = A,
|
|
200
|
+
const V = (((p = r.converter) == null ? void 0 : p.toAttribute) !== void 0 ? r.converter : _).toAttribute(t, r.type);
|
|
201
|
+
this._$Em = A, V == null ? this.removeAttribute(e) : this.setAttribute(e, V), this._$Em = null;
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
_$AK(A, t) {
|
|
205
|
-
var
|
|
205
|
+
var p, V;
|
|
206
206
|
const r = this.constructor, e = r._$Eh.get(A);
|
|
207
207
|
if (e !== void 0 && this._$Em !== e) {
|
|
208
|
-
const S = r.getPropertyOptions(e), n = typeof S.converter == "function" ? { fromAttribute: S.converter } : ((
|
|
209
|
-
this._$Em = e, this[e] = n.fromAttribute(t, S.type) ?? ((
|
|
208
|
+
const S = r.getPropertyOptions(e), n = typeof S.converter == "function" ? { fromAttribute: S.converter } : ((p = S.converter) == null ? void 0 : p.fromAttribute) !== void 0 ? S.converter : _;
|
|
209
|
+
this._$Em = e, this[e] = n.fromAttribute(t, S.type) ?? ((V = this._$Ej) == null ? void 0 : V.get(e)) ?? null, this._$Em = null;
|
|
210
210
|
}
|
|
211
211
|
}
|
|
212
212
|
requestUpdate(A, t, r) {
|
|
213
213
|
var e;
|
|
214
214
|
if (A !== void 0) {
|
|
215
|
-
const
|
|
216
|
-
if (r ?? (r =
|
|
215
|
+
const p = this.constructor, V = this[A];
|
|
216
|
+
if (r ?? (r = p.getPropertyOptions(A)), !((r.hasChanged ?? jA)(V, t) || r.useDefault && r.reflect && V === ((e = this._$Ej) == null ? void 0 : e.get(A)) && !this.hasAttribute(p._$Eu(A, r)))) return;
|
|
217
217
|
this.C(A, t, r);
|
|
218
218
|
}
|
|
219
219
|
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
220
220
|
}
|
|
221
|
-
C(A, t, { useDefault: r, reflect: e, wrapped:
|
|
222
|
-
r && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(A) && (this._$Ej.set(A,
|
|
221
|
+
C(A, t, { useDefault: r, reflect: e, wrapped: p }, V) {
|
|
222
|
+
r && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(A) && (this._$Ej.set(A, V ?? t ?? this[A]), p !== !0 || V !== void 0) || (this._$AL.has(A) || (this.hasUpdated || r || (t = void 0), this._$AL.set(A, t)), e === !0 && this._$Em !== A && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(A));
|
|
223
223
|
}
|
|
224
224
|
async _$EP() {
|
|
225
225
|
this.isUpdatePending = !0;
|
|
@@ -239,21 +239,21 @@ let P = class extends HTMLElement {
|
|
|
239
239
|
if (!this.isUpdatePending) return;
|
|
240
240
|
if (!this.hasUpdated) {
|
|
241
241
|
if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
|
|
242
|
-
for (const [
|
|
242
|
+
for (const [p, V] of this._$Ep) this[p] = V;
|
|
243
243
|
this._$Ep = void 0;
|
|
244
244
|
}
|
|
245
245
|
const e = this.constructor.elementProperties;
|
|
246
|
-
if (e.size > 0) for (const [
|
|
247
|
-
const { wrapped: S } =
|
|
248
|
-
S !== !0 || this._$AL.has(
|
|
246
|
+
if (e.size > 0) for (const [p, V] of e) {
|
|
247
|
+
const { wrapped: S } = V, n = this[p];
|
|
248
|
+
S !== !0 || this._$AL.has(p) || n === void 0 || this.C(p, void 0, V, n);
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
251
|
let A = !1;
|
|
252
252
|
const t = this._$AL;
|
|
253
253
|
try {
|
|
254
254
|
A = this.shouldUpdate(t), A ? (this.willUpdate(t), (r = this._$EO) == null || r.forEach((e) => {
|
|
255
|
-
var
|
|
256
|
-
return (
|
|
255
|
+
var p;
|
|
256
|
+
return (p = e.hostUpdate) == null ? void 0 : p.call(e);
|
|
257
257
|
}), this.update(t)) : this._$EM();
|
|
258
258
|
} catch (e) {
|
|
259
259
|
throw A = !1, this._$EM(), e;
|
|
@@ -289,61 +289,61 @@ let P = class extends HTMLElement {
|
|
|
289
289
|
firstUpdated(A) {
|
|
290
290
|
}
|
|
291
291
|
};
|
|
292
|
-
|
|
292
|
+
m.elementStyles = [], m.shadowRootOptions = { mode: "open" }, m[z("elementProperties")] = /* @__PURE__ */ new Map(), m[z("finalized")] = /* @__PURE__ */ new Map(), eA == null || eA({ ReactiveElement: m }), (s.reactiveElementVersions ?? (s.reactiveElementVersions = [])).push("2.1.0");
|
|
293
293
|
/**
|
|
294
294
|
* @license
|
|
295
295
|
* Copyright 2017 Google LLC
|
|
296
296
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
297
297
|
*/
|
|
298
|
-
const
|
|
299
|
-
\f\r]`,
|
|
300
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), iA = /'/g,
|
|
298
|
+
const G = globalThis, $ = G.trustedTypes, UA = $ ? $.createPolicy("lit-html", { createHTML: (l) => l }) : void 0, NA = "$lit$", W = `lit$${Math.random().toFixed(9).slice(2)}$`, RA = "?" + W, tt = `<${RA}>`, L = document, F = () => L.createComment(""), M = (l) => l === null || typeof l != "object" && typeof l != "function", cA = Array.isArray, lt = (l) => cA(l) || typeof (l == null ? void 0 : l[Symbol.iterator]) == "function", rA = `[
|
|
299
|
+
\f\r]`, H = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, WA = /-->/g, sA = />/g, i = RegExp(`>|${rA}(?:([^\\s"'>=/]+)(${rA}*=${rA}*(?:[^
|
|
300
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), iA = /'/g, OA = /"/g, HA = /^(?:script|style|textarea|title)$/i, et = (l) => (A, ...t) => ({ _$litType$: l, strings: A, values: t }), T = et(1), f = Symbol.for("lit-noChange"), c = Symbol.for("lit-nothing"), vA = /* @__PURE__ */ new WeakMap(), v = L.createTreeWalker(L, 129);
|
|
301
301
|
function zA(l, A) {
|
|
302
|
-
if (!
|
|
302
|
+
if (!cA(l) || !l.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
303
303
|
return UA !== void 0 ? UA.createHTML(A) : A;
|
|
304
304
|
}
|
|
305
305
|
const rt = (l, A) => {
|
|
306
306
|
const t = l.length - 1, r = [];
|
|
307
|
-
let e,
|
|
307
|
+
let e, p = A === 2 ? "<svg>" : A === 3 ? "<math>" : "", V = H;
|
|
308
308
|
for (let S = 0; S < t; S++) {
|
|
309
309
|
const n = l[S];
|
|
310
310
|
let d, k, y = -1, x = 0;
|
|
311
|
-
for (; x < n.length && (
|
|
312
|
-
const U =
|
|
313
|
-
|
|
311
|
+
for (; x < n.length && (V.lastIndex = x, k = V.exec(n), k !== null); ) x = V.lastIndex, V === H ? k[1] === "!--" ? V = WA : k[1] !== void 0 ? V = sA : k[2] !== void 0 ? (HA.test(k[2]) && (e = RegExp("</" + k[2], "g")), V = i) : k[3] !== void 0 && (V = i) : V === i ? k[0] === ">" ? (V = e ?? H, y = -1) : k[1] === void 0 ? y = -2 : (y = V.lastIndex - k[2].length, d = k[1], V = k[3] === void 0 ? i : k[3] === '"' ? OA : iA) : V === OA || V === iA ? V = i : V === WA || V === sA ? V = H : (V = i, e = void 0);
|
|
312
|
+
const U = V === i && l[S + 1].startsWith("/>") ? " " : "";
|
|
313
|
+
p += V === H ? n + tt : y >= 0 ? (r.push(d), n.slice(0, y) + NA + n.slice(y) + W + U) : n + W + (y === -2 ? S : U);
|
|
314
314
|
}
|
|
315
|
-
return [zA(l,
|
|
315
|
+
return [zA(l, p + (l[t] || "<?>") + (A === 2 ? "</svg>" : A === 3 ? "</math>" : "")), r];
|
|
316
316
|
};
|
|
317
|
-
class
|
|
317
|
+
class h {
|
|
318
318
|
constructor({ strings: A, _$litType$: t }, r) {
|
|
319
319
|
let e;
|
|
320
320
|
this.parts = [];
|
|
321
|
-
let
|
|
321
|
+
let p = 0, V = 0;
|
|
322
322
|
const S = A.length - 1, n = this.parts, [d, k] = rt(A, t);
|
|
323
|
-
if (this.el =
|
|
323
|
+
if (this.el = h.createElement(d, r), v.currentNode = this.el.content, t === 2 || t === 3) {
|
|
324
324
|
const y = this.el.content.firstChild;
|
|
325
325
|
y.replaceWith(...y.childNodes);
|
|
326
326
|
}
|
|
327
|
-
for (; (e =
|
|
327
|
+
for (; (e = v.nextNode()) !== null && n.length < S; ) {
|
|
328
328
|
if (e.nodeType === 1) {
|
|
329
329
|
if (e.hasAttributes()) for (const y of e.getAttributeNames()) if (y.endsWith(NA)) {
|
|
330
|
-
const x = k[
|
|
331
|
-
n.push({ type: 1, index:
|
|
332
|
-
} else y.startsWith(W) && (n.push({ type: 6, index:
|
|
330
|
+
const x = k[V++], U = e.getAttribute(y).split(W), Q = /([.?@])?(.*)/.exec(x);
|
|
331
|
+
n.push({ type: 1, index: p, name: Q[2], strings: U, ctor: Q[1] === "." ? Vt : Q[1] === "?" ? qt : Q[1] === "@" ? nt : lA }), e.removeAttribute(y);
|
|
332
|
+
} else y.startsWith(W) && (n.push({ type: 6, index: p }), e.removeAttribute(y));
|
|
333
333
|
if (HA.test(e.tagName)) {
|
|
334
334
|
const y = e.textContent.split(W), x = y.length - 1;
|
|
335
335
|
if (x > 0) {
|
|
336
|
-
e.textContent =
|
|
337
|
-
for (let U = 0; U < x; U++) e.append(y[U],
|
|
338
|
-
e.append(y[x],
|
|
336
|
+
e.textContent = $ ? $.emptyScript : "";
|
|
337
|
+
for (let U = 0; U < x; U++) e.append(y[U], F()), v.nextNode(), n.push({ type: 2, index: ++p });
|
|
338
|
+
e.append(y[x], F());
|
|
339
339
|
}
|
|
340
340
|
}
|
|
341
|
-
} else if (e.nodeType === 8) if (e.data === RA) n.push({ type: 2, index:
|
|
341
|
+
} else if (e.nodeType === 8) if (e.data === RA) n.push({ type: 2, index: p });
|
|
342
342
|
else {
|
|
343
343
|
let y = -1;
|
|
344
|
-
for (; (y = e.data.indexOf(W, y + 1)) !== -1; ) n.push({ type: 7, index:
|
|
344
|
+
for (; (y = e.data.indexOf(W, y + 1)) !== -1; ) n.push({ type: 7, index: p }), y += W.length - 1;
|
|
345
345
|
}
|
|
346
|
-
|
|
346
|
+
p++;
|
|
347
347
|
}
|
|
348
348
|
}
|
|
349
349
|
static createElement(A, t) {
|
|
@@ -351,14 +351,14 @@ class M {
|
|
|
351
351
|
return r.innerHTML = A, r;
|
|
352
352
|
}
|
|
353
353
|
}
|
|
354
|
-
function
|
|
355
|
-
var
|
|
354
|
+
function Z(l, A, t = l, r) {
|
|
355
|
+
var V, S;
|
|
356
356
|
if (A === f) return A;
|
|
357
|
-
let e = r !== void 0 ? (
|
|
358
|
-
const
|
|
359
|
-
return (e == null ? void 0 : e.constructor) !==
|
|
357
|
+
let e = r !== void 0 ? (V = t._$Co) == null ? void 0 : V[r] : t._$Cl;
|
|
358
|
+
const p = M(A) ? void 0 : A._$litDirective$;
|
|
359
|
+
return (e == null ? void 0 : e.constructor) !== p && ((S = e == null ? void 0 : e._$AO) == null || S.call(e, !1), p === void 0 ? e = void 0 : (e = new p(l), e._$AT(l, t, r)), r !== void 0 ? (t._$Co ?? (t._$Co = []))[r] = e : t._$Cl = e), e !== void 0 && (A = Z(l, e._$AS(l, A.values), e, r)), A;
|
|
360
360
|
}
|
|
361
|
-
class
|
|
361
|
+
class pt {
|
|
362
362
|
constructor(A, t) {
|
|
363
363
|
this._$AV = [], this._$AN = void 0, this._$AD = A, this._$AM = t;
|
|
364
364
|
}
|
|
@@ -370,16 +370,16 @@ class Vt {
|
|
|
370
370
|
}
|
|
371
371
|
u(A) {
|
|
372
372
|
const { el: { content: t }, parts: r } = this._$AD, e = ((A == null ? void 0 : A.creationScope) ?? L).importNode(t, !0);
|
|
373
|
-
|
|
374
|
-
let
|
|
373
|
+
v.currentNode = e;
|
|
374
|
+
let p = v.nextNode(), V = 0, S = 0, n = r[0];
|
|
375
375
|
for (; n !== void 0; ) {
|
|
376
|
-
if (
|
|
376
|
+
if (V === n.index) {
|
|
377
377
|
let d;
|
|
378
|
-
n.type === 2 ? d = new w(
|
|
378
|
+
n.type === 2 ? d = new w(p, p.nextSibling, this, A) : n.type === 1 ? d = new n.ctor(p, n.name, n.strings, this, A) : n.type === 6 && (d = new St(p, this, A)), this._$AV.push(d), n = r[++S];
|
|
379
379
|
}
|
|
380
|
-
|
|
380
|
+
V !== (n == null ? void 0 : n.index) && (p = v.nextNode(), V++);
|
|
381
381
|
}
|
|
382
|
-
return
|
|
382
|
+
return v.currentNode = L, e;
|
|
383
383
|
}
|
|
384
384
|
p(A) {
|
|
385
385
|
let t = 0;
|
|
@@ -392,7 +392,7 @@ class w {
|
|
|
392
392
|
return ((A = this._$AM) == null ? void 0 : A._$AU) ?? this._$Cv;
|
|
393
393
|
}
|
|
394
394
|
constructor(A, t, r, e) {
|
|
395
|
-
this.type = 2, this._$AH =
|
|
395
|
+
this.type = 2, this._$AH = c, this._$AN = void 0, this._$AA = A, this._$AB = t, this._$AM = r, this.options = e, this._$Cv = (e == null ? void 0 : e.isConnected) ?? !0;
|
|
396
396
|
}
|
|
397
397
|
get parentNode() {
|
|
398
398
|
let A = this._$AA.parentNode;
|
|
@@ -406,7 +406,7 @@ class w {
|
|
|
406
406
|
return this._$AB;
|
|
407
407
|
}
|
|
408
408
|
_$AI(A, t = this) {
|
|
409
|
-
A =
|
|
409
|
+
A = Z(this, A, t), M(A) ? A === c || A == null || A === "" ? (this._$AH !== c && this._$AR(), this._$AH = c) : A !== this._$AH && A !== f && this._(A) : A._$litType$ !== void 0 ? this.$(A) : A.nodeType !== void 0 ? this.T(A) : lt(A) ? this.k(A) : this._(A);
|
|
410
410
|
}
|
|
411
411
|
O(A) {
|
|
412
412
|
return this._$AA.parentNode.insertBefore(A, this._$AB);
|
|
@@ -415,26 +415,26 @@ class w {
|
|
|
415
415
|
this._$AH !== A && (this._$AR(), this._$AH = this.O(A));
|
|
416
416
|
}
|
|
417
417
|
_(A) {
|
|
418
|
-
this._$AH !==
|
|
418
|
+
this._$AH !== c && M(this._$AH) ? this._$AA.nextSibling.data = A : this.T(L.createTextNode(A)), this._$AH = A;
|
|
419
419
|
}
|
|
420
420
|
$(A) {
|
|
421
|
-
var
|
|
422
|
-
const { values: t, _$litType$: r } = A, e = typeof r == "number" ? this._$AC(A) : (r.el === void 0 && (r.el =
|
|
423
|
-
if (((
|
|
421
|
+
var p;
|
|
422
|
+
const { values: t, _$litType$: r } = A, e = typeof r == "number" ? this._$AC(A) : (r.el === void 0 && (r.el = h.createElement(zA(r.h, r.h[0]), this.options)), r);
|
|
423
|
+
if (((p = this._$AH) == null ? void 0 : p._$AD) === e) this._$AH.p(t);
|
|
424
424
|
else {
|
|
425
|
-
const
|
|
426
|
-
|
|
425
|
+
const V = new pt(e, this), S = V.u(this.options);
|
|
426
|
+
V.p(t), this.T(S), this._$AH = V;
|
|
427
427
|
}
|
|
428
428
|
}
|
|
429
429
|
_$AC(A) {
|
|
430
|
-
let t =
|
|
431
|
-
return t === void 0 &&
|
|
430
|
+
let t = vA.get(A.strings);
|
|
431
|
+
return t === void 0 && vA.set(A.strings, t = new h(A)), t;
|
|
432
432
|
}
|
|
433
433
|
k(A) {
|
|
434
|
-
|
|
434
|
+
cA(this._$AH) || (this._$AH = [], this._$AR());
|
|
435
435
|
const t = this._$AH;
|
|
436
436
|
let r, e = 0;
|
|
437
|
-
for (const
|
|
437
|
+
for (const p of A) e === t.length ? t.push(r = new w(this.O(F()), this.O(F()), this, this.options)) : r = t[e], r._$AI(p), e++;
|
|
438
438
|
e < t.length && (this._$AR(r && r._$AB.nextSibling, e), t.length = e);
|
|
439
439
|
}
|
|
440
440
|
_$AR(A = this._$AA.nextSibling, t) {
|
|
@@ -449,55 +449,55 @@ class w {
|
|
|
449
449
|
this._$AM === void 0 && (this._$Cv = A, (t = this._$AP) == null || t.call(this, A));
|
|
450
450
|
}
|
|
451
451
|
}
|
|
452
|
-
class
|
|
452
|
+
class lA {
|
|
453
453
|
get tagName() {
|
|
454
454
|
return this.element.tagName;
|
|
455
455
|
}
|
|
456
456
|
get _$AU() {
|
|
457
457
|
return this._$AM._$AU;
|
|
458
458
|
}
|
|
459
|
-
constructor(A, t, r, e,
|
|
460
|
-
this.type = 1, this._$AH =
|
|
459
|
+
constructor(A, t, r, e, p) {
|
|
460
|
+
this.type = 1, this._$AH = c, this._$AN = void 0, this.element = A, this.name = t, this._$AM = e, this.options = p, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = c;
|
|
461
461
|
}
|
|
462
462
|
_$AI(A, t = this, r, e) {
|
|
463
|
-
const
|
|
464
|
-
let
|
|
465
|
-
if (
|
|
463
|
+
const p = this.strings;
|
|
464
|
+
let V = !1;
|
|
465
|
+
if (p === void 0) A = Z(this, A, t, 0), V = !M(A) || A !== this._$AH && A !== f, V && (this._$AH = A);
|
|
466
466
|
else {
|
|
467
467
|
const S = A;
|
|
468
468
|
let n, d;
|
|
469
|
-
for (A =
|
|
469
|
+
for (A = p[0], n = 0; n < p.length - 1; n++) d = Z(this, S[r + n], t, n), d === f && (d = this._$AH[n]), V || (V = !M(d) || d !== this._$AH[n]), d === c ? A = c : A !== c && (A += (d ?? "") + p[n + 1]), this._$AH[n] = d;
|
|
470
470
|
}
|
|
471
|
-
|
|
471
|
+
V && !e && this.j(A);
|
|
472
472
|
}
|
|
473
473
|
j(A) {
|
|
474
|
-
A ===
|
|
474
|
+
A === c ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, A ?? "");
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
class
|
|
477
|
+
class Vt extends lA {
|
|
478
478
|
constructor() {
|
|
479
479
|
super(...arguments), this.type = 3;
|
|
480
480
|
}
|
|
481
481
|
j(A) {
|
|
482
|
-
this.element[this.name] = A ===
|
|
482
|
+
this.element[this.name] = A === c ? void 0 : A;
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
|
-
class qt extends
|
|
485
|
+
class qt extends lA {
|
|
486
486
|
constructor() {
|
|
487
487
|
super(...arguments), this.type = 4;
|
|
488
488
|
}
|
|
489
489
|
j(A) {
|
|
490
|
-
this.element.toggleAttribute(this.name, !!A && A !==
|
|
490
|
+
this.element.toggleAttribute(this.name, !!A && A !== c);
|
|
491
491
|
}
|
|
492
492
|
}
|
|
493
|
-
class nt extends
|
|
494
|
-
constructor(A, t, r, e,
|
|
495
|
-
super(A, t, r, e,
|
|
493
|
+
class nt extends lA {
|
|
494
|
+
constructor(A, t, r, e, p) {
|
|
495
|
+
super(A, t, r, e, p), this.type = 5;
|
|
496
496
|
}
|
|
497
497
|
_$AI(A, t = this) {
|
|
498
|
-
if ((A =
|
|
499
|
-
const r = this._$AH, e = A ===
|
|
500
|
-
e && this.element.removeEventListener(this.name, this, r),
|
|
498
|
+
if ((A = Z(this, A, t, 0) ?? c) === f) return;
|
|
499
|
+
const r = this._$AH, e = A === c && r !== c || A.capture !== r.capture || A.once !== r.once || A.passive !== r.passive, p = A !== c && (r === c || e);
|
|
500
|
+
e && this.element.removeEventListener(this.name, this, r), p && this.element.addEventListener(this.name, this, A), this._$AH = A;
|
|
501
501
|
}
|
|
502
502
|
handleEvent(A) {
|
|
503
503
|
var t;
|
|
@@ -512,17 +512,17 @@ class St {
|
|
|
512
512
|
return this._$AM._$AU;
|
|
513
513
|
}
|
|
514
514
|
_$AI(A) {
|
|
515
|
-
|
|
515
|
+
Z(this, A);
|
|
516
516
|
}
|
|
517
517
|
}
|
|
518
|
-
const
|
|
519
|
-
|
|
518
|
+
const pA = G.litHtmlPolyfillSupport;
|
|
519
|
+
pA == null || pA(h, w), (G.litHtmlVersions ?? (G.litHtmlVersions = [])).push("3.3.0");
|
|
520
520
|
const at = (l, A, t) => {
|
|
521
521
|
const r = (t == null ? void 0 : t.renderBefore) ?? A;
|
|
522
522
|
let e = r._$litPart$;
|
|
523
523
|
if (e === void 0) {
|
|
524
|
-
const
|
|
525
|
-
r._$litPart$ = e = new w(A.insertBefore(
|
|
524
|
+
const p = (t == null ? void 0 : t.renderBefore) ?? null;
|
|
525
|
+
r._$litPart$ = e = new w(A.insertBefore(F(), p), p, void 0, t ?? {});
|
|
526
526
|
}
|
|
527
527
|
return e._$AI(l), e;
|
|
528
528
|
};
|
|
@@ -532,7 +532,7 @@ const at = (l, A, t) => {
|
|
|
532
532
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
533
533
|
*/
|
|
534
534
|
const b = globalThis;
|
|
535
|
-
let X = class extends
|
|
535
|
+
let X = class extends m {
|
|
536
536
|
constructor() {
|
|
537
537
|
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
538
538
|
}
|
|
@@ -567,7 +567,7 @@ VA == null || VA({ LitElement: X });
|
|
|
567
567
|
* Copyright 2017 Google LLC
|
|
568
568
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
569
569
|
*/
|
|
570
|
-
const
|
|
570
|
+
const R = (l) => (A, t) => {
|
|
571
571
|
t !== void 0 ? t.addInitializer(() => {
|
|
572
572
|
customElements.define(l, A);
|
|
573
573
|
}) : customElements.define(l, A);
|
|
@@ -577,31 +577,31 @@ const N = (l) => (A, t) => {
|
|
|
577
577
|
* Copyright 2017 Google LLC
|
|
578
578
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
579
579
|
*/
|
|
580
|
-
const yt = { attribute: !0, type: String, converter:
|
|
580
|
+
const yt = { attribute: !0, type: String, converter: _, reflect: !1, hasChanged: jA }, ut = (l = yt, A, t) => {
|
|
581
581
|
const { kind: r, metadata: e } = t;
|
|
582
|
-
let
|
|
583
|
-
if (
|
|
584
|
-
const { name:
|
|
582
|
+
let p = globalThis.litPropertyMetadata.get(e);
|
|
583
|
+
if (p === void 0 && globalThis.litPropertyMetadata.set(e, p = /* @__PURE__ */ new Map()), r === "setter" && ((l = Object.create(l)).wrapped = !0), p.set(t.name, l), r === "accessor") {
|
|
584
|
+
const { name: V } = t;
|
|
585
585
|
return { set(S) {
|
|
586
586
|
const n = A.get.call(this);
|
|
587
|
-
A.set.call(this, S), this.requestUpdate(
|
|
587
|
+
A.set.call(this, S), this.requestUpdate(V, n, l);
|
|
588
588
|
}, init(S) {
|
|
589
|
-
return S !== void 0 && this.C(
|
|
589
|
+
return S !== void 0 && this.C(V, void 0, l, S), S;
|
|
590
590
|
} };
|
|
591
591
|
}
|
|
592
592
|
if (r === "setter") {
|
|
593
|
-
const { name:
|
|
593
|
+
const { name: V } = t;
|
|
594
594
|
return function(S) {
|
|
595
|
-
const n = this[
|
|
596
|
-
A.call(this, S), this.requestUpdate(
|
|
595
|
+
const n = this[V];
|
|
596
|
+
A.call(this, S), this.requestUpdate(V, n, l);
|
|
597
597
|
};
|
|
598
598
|
}
|
|
599
599
|
throw Error("Unsupported decorator location: " + r);
|
|
600
600
|
};
|
|
601
|
-
function
|
|
602
|
-
return (A, t) => typeof t == "object" ? ut(l, A, t) : ((r, e,
|
|
603
|
-
const
|
|
604
|
-
return e.constructor.createProperty(
|
|
601
|
+
function j(l) {
|
|
602
|
+
return (A, t) => typeof t == "object" ? ut(l, A, t) : ((r, e, p) => {
|
|
603
|
+
const V = e.hasOwnProperty(p);
|
|
604
|
+
return e.constructor.createProperty(p, r), V ? Object.getOwnPropertyDescriptor(e, p) : void 0;
|
|
605
605
|
})(l, A, t);
|
|
606
606
|
}
|
|
607
607
|
/**
|
|
@@ -610,14 +610,14 @@ function c(l) {
|
|
|
610
610
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
611
611
|
*/
|
|
612
612
|
function J(l) {
|
|
613
|
-
return
|
|
613
|
+
return j({ ...l, state: !0, attribute: !1 });
|
|
614
614
|
}
|
|
615
615
|
/**
|
|
616
616
|
* @license
|
|
617
617
|
* Copyright 2021 Google LLC
|
|
618
618
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
619
619
|
*/
|
|
620
|
-
const
|
|
620
|
+
const SA = "lit-localize-status";
|
|
621
621
|
/**
|
|
622
622
|
* @license
|
|
623
623
|
* Copyright 2021 Google LLC
|
|
@@ -653,10 +653,10 @@ class ct {
|
|
|
653
653
|
}, this.host = A;
|
|
654
654
|
}
|
|
655
655
|
hostConnected() {
|
|
656
|
-
window.addEventListener(
|
|
656
|
+
window.addEventListener(SA, this.__litLocalizeEventHandler);
|
|
657
657
|
}
|
|
658
658
|
hostDisconnected() {
|
|
659
|
-
window.removeEventListener(
|
|
659
|
+
window.removeEventListener(SA, this.__litLocalizeEventHandler);
|
|
660
660
|
}
|
|
661
661
|
}
|
|
662
662
|
const kt = (l) => l.addController(new ct(l)), Jt = kt;
|
|
@@ -693,10 +693,10 @@ const K = [];
|
|
|
693
693
|
for (let l = 0; l < 256; l++)
|
|
694
694
|
K[l] = (l >> 4 & 15).toString(16) + (l & 15).toString(16);
|
|
695
695
|
function Tt(l) {
|
|
696
|
-
let A = 0, t = 8997, r = 0, e = 33826,
|
|
696
|
+
let A = 0, t = 8997, r = 0, e = 33826, p = 0, V = 40164, S = 0, n = 52210;
|
|
697
697
|
for (let d = 0; d < l.length; d++)
|
|
698
|
-
t ^= l.charCodeAt(d), A = t * 435, r = e * 435,
|
|
699
|
-
return K[n >> 8] + K[n & 255] + K[
|
|
698
|
+
t ^= l.charCodeAt(d), A = t * 435, r = e * 435, p = V * 435, S = n * 435, p += t << 8, S += e << 8, r += A >>> 16, t = A & 65535, p += r >>> 16, e = r & 65535, n = S + (p >>> 16) & 65535, V = p & 65535;
|
|
699
|
+
return K[n >> 8] + K[n & 255] + K[V >> 8] + K[V & 255] + K[e >> 8] + K[e & 255] + K[t >> 8] + K[t & 255];
|
|
700
700
|
}
|
|
701
701
|
/**
|
|
702
702
|
* @license
|
|
@@ -728,10 +728,10 @@ function Wt(l, A, t) {
|
|
|
728
728
|
e.values
|
|
729
729
|
);
|
|
730
730
|
{
|
|
731
|
-
let
|
|
732
|
-
return
|
|
731
|
+
let p = LA.get(e);
|
|
732
|
+
return p === void 0 && (p = e.values, LA.set(e, p)), {
|
|
733
733
|
...e,
|
|
734
|
-
values:
|
|
734
|
+
values: p.map((V) => A.values[V])
|
|
735
735
|
};
|
|
736
736
|
}
|
|
737
737
|
}
|
|
@@ -748,35 +748,35 @@ function st(l) {
|
|
|
748
748
|
* Copyright 2021 Google LLC
|
|
749
749
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
750
750
|
*/
|
|
751
|
-
function
|
|
752
|
-
window.dispatchEvent(new CustomEvent(
|
|
751
|
+
function qA(l) {
|
|
752
|
+
window.dispatchEvent(new CustomEvent(SA, { detail: l }));
|
|
753
753
|
}
|
|
754
|
-
let
|
|
755
|
-
|
|
756
|
-
let
|
|
757
|
-
const it = (l) => (jt((A, t) => Wt(EA, A, t)),
|
|
758
|
-
if (l === (
|
|
759
|
-
return
|
|
760
|
-
if (!
|
|
754
|
+
let AA = "", nA, hA, tA, aA, EA, O = new MA();
|
|
755
|
+
O.resolve();
|
|
756
|
+
let g = 0;
|
|
757
|
+
const it = (l) => (jt((A, t) => Wt(EA, A, t)), AA = hA = l.sourceLocale, tA = new Set(l.targetLocales), tA.add(l.sourceLocale), aA = l.loadLocale, { getLocale: Ot, setLocale: vt }), Ot = () => AA, vt = (l) => {
|
|
758
|
+
if (l === (nA ?? AA))
|
|
759
|
+
return O.promise;
|
|
760
|
+
if (!tA || !aA)
|
|
761
761
|
throw new Error("Internal error");
|
|
762
|
-
if (!
|
|
762
|
+
if (!tA.has(l))
|
|
763
763
|
throw new Error("Invalid locale code");
|
|
764
|
-
|
|
765
|
-
const A =
|
|
766
|
-
return
|
|
764
|
+
g++;
|
|
765
|
+
const A = g;
|
|
766
|
+
return nA = l, O.settled && (O = new MA()), qA({ status: "loading", loadingLocale: l }), (l === hA ? (
|
|
767
767
|
// We could switch to the source locale synchronously, but we prefer to
|
|
768
768
|
// queue it on a microtask so that switching locales is consistently
|
|
769
769
|
// asynchronous.
|
|
770
770
|
Promise.resolve({ templates: void 0 })
|
|
771
|
-
) :
|
|
772
|
-
|
|
771
|
+
) : aA(l)).then((r) => {
|
|
772
|
+
g === A && (AA = l, nA = void 0, EA = r.templates, qA({ status: "ready", readyLocale: l }), O.resolve());
|
|
773
773
|
}, (r) => {
|
|
774
|
-
|
|
774
|
+
g === A && (qA({
|
|
775
775
|
status: "error",
|
|
776
776
|
errorLocale: l,
|
|
777
777
|
errorMessage: r.toString()
|
|
778
|
-
}),
|
|
779
|
-
}),
|
|
778
|
+
}), O.reject(r));
|
|
779
|
+
}), O.promise;
|
|
780
780
|
}, IA = "en", bt = [
|
|
781
781
|
"pt-BR"
|
|
782
782
|
];
|
|
@@ -818,22 +818,22 @@ const Pt = ft(class extends ot {
|
|
|
818
818
|
update(l, [A]) {
|
|
819
819
|
var r, e;
|
|
820
820
|
if (this.st === void 0) {
|
|
821
|
-
this.st = /* @__PURE__ */ new Set(), l.strings !== void 0 && (this.nt = new Set(l.strings.join(" ").split(/\s/).filter((
|
|
822
|
-
for (const
|
|
821
|
+
this.st = /* @__PURE__ */ new Set(), l.strings !== void 0 && (this.nt = new Set(l.strings.join(" ").split(/\s/).filter((p) => p !== "")));
|
|
822
|
+
for (const p in A) A[p] && !((r = this.nt) != null && r.has(p)) && this.st.add(p);
|
|
823
823
|
return this.render(A);
|
|
824
824
|
}
|
|
825
825
|
const t = l.element.classList;
|
|
826
|
-
for (const
|
|
827
|
-
for (const
|
|
828
|
-
const
|
|
829
|
-
|
|
826
|
+
for (const p of this.st) p in A || (t.remove(p), this.st.delete(p));
|
|
827
|
+
for (const p in A) {
|
|
828
|
+
const V = !!A[p];
|
|
829
|
+
V === this.st.has(p) || (e = this.nt) != null && e.has(p) || (V ? (t.add(p), this.st.add(p)) : (t.remove(p), this.st.delete(p)));
|
|
830
830
|
}
|
|
831
831
|
return f;
|
|
832
832
|
}
|
|
833
833
|
});
|
|
834
834
|
var mt = Object.defineProperty, Zt = Object.getOwnPropertyDescriptor, C = (l, A, t, r) => {
|
|
835
|
-
for (var e = r > 1 ? void 0 : r ? Zt(A, t) : A,
|
|
836
|
-
(
|
|
835
|
+
for (var e = r > 1 ? void 0 : r ? Zt(A, t) : A, p = l.length - 1, V; p >= 0; p--)
|
|
836
|
+
(V = l[p]) && (e = (r ? V(A, t, e) : V(e)) || e);
|
|
837
837
|
return r && e && mt(A, t, e), e;
|
|
838
838
|
};
|
|
839
839
|
let o = class extends X {
|
|
@@ -855,7 +855,7 @@ let o = class extends X {
|
|
|
855
855
|
`;
|
|
856
856
|
}
|
|
857
857
|
};
|
|
858
|
-
o.styles =
|
|
858
|
+
o.styles = N`
|
|
859
859
|
:host {
|
|
860
860
|
display: block;
|
|
861
861
|
width: 100%;
|
|
@@ -928,26 +928,26 @@ o.styles = Z`
|
|
|
928
928
|
}
|
|
929
929
|
`;
|
|
930
930
|
C([
|
|
931
|
-
|
|
931
|
+
j({ type: String })
|
|
932
932
|
], o.prototype, "type", 2);
|
|
933
933
|
C([
|
|
934
|
-
|
|
934
|
+
j({ type: String })
|
|
935
935
|
], o.prototype, "label", 2);
|
|
936
936
|
C([
|
|
937
|
-
|
|
937
|
+
j({ type: Boolean })
|
|
938
938
|
], o.prototype, "disabled", 2);
|
|
939
939
|
C([
|
|
940
|
-
|
|
940
|
+
j({ type: String })
|
|
941
941
|
], o.prototype, "variant", 2);
|
|
942
942
|
o = C([
|
|
943
|
-
|
|
943
|
+
R("xact-button")
|
|
944
944
|
], o);
|
|
945
|
-
var Nt = Object.defineProperty, Rt = Object.getOwnPropertyDescriptor,
|
|
946
|
-
for (var e = r > 1 ? void 0 : r ? Rt(A, t) : A,
|
|
947
|
-
(
|
|
945
|
+
var Nt = Object.defineProperty, Rt = Object.getOwnPropertyDescriptor, kA = (l, A, t, r) => {
|
|
946
|
+
for (var e = r > 1 ? void 0 : r ? Rt(A, t) : A, p = l.length - 1, V; p >= 0; p--)
|
|
947
|
+
(V = l[p]) && (e = (r ? V(A, t, e) : V(e)) || e);
|
|
948
948
|
return r && e && Nt(A, t, e), e;
|
|
949
949
|
};
|
|
950
|
-
let
|
|
950
|
+
let E = class extends X {
|
|
951
951
|
constructor() {
|
|
952
952
|
super(...arguments), this.height = 0;
|
|
953
953
|
}
|
|
@@ -982,7 +982,7 @@ let h = class extends X {
|
|
|
982
982
|
`;
|
|
983
983
|
}
|
|
984
984
|
};
|
|
985
|
-
|
|
985
|
+
E.styles = N`
|
|
986
986
|
:host {
|
|
987
987
|
display: block;
|
|
988
988
|
font-family: "Lato", sans-serif;
|
|
@@ -1067,22 +1067,22 @@ h.styles = Z`
|
|
|
1067
1067
|
color: inherit;
|
|
1068
1068
|
}
|
|
1069
1069
|
`;
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
],
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
],
|
|
1076
|
-
|
|
1077
|
-
|
|
1070
|
+
kA([
|
|
1071
|
+
j({ type: Number })
|
|
1072
|
+
], E.prototype, "height", 2);
|
|
1073
|
+
kA([
|
|
1074
|
+
j({ type: Function })
|
|
1075
|
+
], E.prototype, "onStartMeasurement", 2);
|
|
1076
|
+
E = kA([
|
|
1077
|
+
R("xact-step-one"),
|
|
1078
1078
|
Y()
|
|
1079
|
-
],
|
|
1079
|
+
], E);
|
|
1080
1080
|
var Ht = Object.getOwnPropertyDescriptor, zt = (l, A, t, r) => {
|
|
1081
|
-
for (var e = r > 1 ? void 0 : r ? Ht(A, t) : A,
|
|
1082
|
-
(
|
|
1081
|
+
for (var e = r > 1 ? void 0 : r ? Ht(A, t) : A, p = l.length - 1, V; p >= 0; p--)
|
|
1082
|
+
(V = l[p]) && (e = V(e) || e);
|
|
1083
1083
|
return e;
|
|
1084
1084
|
};
|
|
1085
|
-
let
|
|
1085
|
+
let yA = class extends X {
|
|
1086
1086
|
render() {
|
|
1087
1087
|
return T`
|
|
1088
1088
|
<footer class="modal-footer">
|
|
@@ -1130,7 +1130,7 @@ let aA = class extends X {
|
|
|
1130
1130
|
`;
|
|
1131
1131
|
}
|
|
1132
1132
|
};
|
|
1133
|
-
|
|
1133
|
+
yA.styles = N`
|
|
1134
1134
|
.modal-footer {
|
|
1135
1135
|
text-align: center;
|
|
1136
1136
|
font-size: 12px;
|
|
@@ -1167,16 +1167,16 @@ aA.styles = Z`
|
|
|
1167
1167
|
outline-offset: 2px;
|
|
1168
1168
|
}
|
|
1169
1169
|
`;
|
|
1170
|
-
|
|
1171
|
-
|
|
1170
|
+
yA = zt([
|
|
1171
|
+
R("xact-footer"),
|
|
1172
1172
|
Y()
|
|
1173
|
-
],
|
|
1174
|
-
var Gt = Object.defineProperty, Ft = Object.getOwnPropertyDescriptor,
|
|
1175
|
-
for (var e = r > 1 ? void 0 : r ? Ft(A, t) : A,
|
|
1176
|
-
(
|
|
1173
|
+
], yA);
|
|
1174
|
+
var Gt = Object.defineProperty, Ft = Object.getOwnPropertyDescriptor, D = (l, A, t, r) => {
|
|
1175
|
+
for (var e = r > 1 ? void 0 : r ? Ft(A, t) : A, p = l.length - 1, V; p >= 0; p--)
|
|
1176
|
+
(V = l[p]) && (e = (r ? V(A, t, e) : V(e)) || e);
|
|
1177
1177
|
return r && e && Gt(A, t, e), e;
|
|
1178
1178
|
};
|
|
1179
|
-
let
|
|
1179
|
+
let P = class extends X {
|
|
1180
1180
|
constructor() {
|
|
1181
1181
|
super(...arguments), this.productName = "", this.recommendedSize = "";
|
|
1182
1182
|
}
|
|
@@ -1213,7 +1213,7 @@ let E = class extends X {
|
|
|
1213
1213
|
|
|
1214
1214
|
<!-- Texto centralizado -->
|
|
1215
1215
|
<text x="50%" y="55%" dominant-baseline="middle" text-anchor="middle" fill="white" font-size="20" font-weight="bold">
|
|
1216
|
-
|
|
1216
|
+
${this.recommendedSize}
|
|
1217
1217
|
</text>
|
|
1218
1218
|
</svg>
|
|
1219
1219
|
</div>
|
|
@@ -1240,7 +1240,7 @@ let E = class extends X {
|
|
|
1240
1240
|
`;
|
|
1241
1241
|
}
|
|
1242
1242
|
};
|
|
1243
|
-
|
|
1243
|
+
P.styles = N`
|
|
1244
1244
|
:host {
|
|
1245
1245
|
display: flex;
|
|
1246
1246
|
flex-direction: column;
|
|
@@ -1315,19 +1315,25 @@ E.styles = Z`
|
|
|
1315
1315
|
}
|
|
1316
1316
|
}
|
|
1317
1317
|
`;
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
],
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
],
|
|
1324
|
-
|
|
1325
|
-
|
|
1318
|
+
D([
|
|
1319
|
+
j({ type: String })
|
|
1320
|
+
], P.prototype, "productName", 2);
|
|
1321
|
+
D([
|
|
1322
|
+
j({ type: String })
|
|
1323
|
+
], P.prototype, "recommendedSize", 2);
|
|
1324
|
+
D([
|
|
1325
|
+
j({ type: Function })
|
|
1326
|
+
], P.prototype, "onAccept", 2);
|
|
1327
|
+
D([
|
|
1328
|
+
j({ type: Function })
|
|
1329
|
+
], P.prototype, "onRetry", 2);
|
|
1330
|
+
P = D([
|
|
1331
|
+
R("xact-step-result"),
|
|
1326
1332
|
Y()
|
|
1327
|
-
],
|
|
1333
|
+
], P);
|
|
1328
1334
|
var Mt = Object.defineProperty, ht = Object.getOwnPropertyDescriptor, JA = (l, A, t, r) => {
|
|
1329
|
-
for (var e = r > 1 ? void 0 : r ? ht(A, t) : A,
|
|
1330
|
-
(
|
|
1335
|
+
for (var e = r > 1 ? void 0 : r ? ht(A, t) : A, p = l.length - 1, V; p >= 0; p--)
|
|
1336
|
+
(V = l[p]) && (e = (r ? V(A, t, e) : V(e)) || e);
|
|
1331
1337
|
return r && e && Mt(A, t, e), e;
|
|
1332
1338
|
};
|
|
1333
1339
|
let I = class extends X {
|
|
@@ -1479,7 +1485,7 @@ let I = class extends X {
|
|
|
1479
1485
|
`;
|
|
1480
1486
|
}
|
|
1481
1487
|
};
|
|
1482
|
-
I.styles =
|
|
1488
|
+
I.styles = N`
|
|
1483
1489
|
:host {
|
|
1484
1490
|
display: flex;
|
|
1485
1491
|
justify-content: center;
|
|
@@ -1621,19 +1627,19 @@ I.styles = Z`
|
|
|
1621
1627
|
|
|
1622
1628
|
`;
|
|
1623
1629
|
JA([
|
|
1624
|
-
|
|
1630
|
+
j({ type: Number })
|
|
1625
1631
|
], I.prototype, "height", 2);
|
|
1626
1632
|
JA([
|
|
1627
|
-
|
|
1633
|
+
j({ type: Function })
|
|
1628
1634
|
], I.prototype, "onStep2advancement", 2);
|
|
1629
1635
|
I = JA([
|
|
1630
|
-
|
|
1636
|
+
R("xact-step-informs"),
|
|
1631
1637
|
Y()
|
|
1632
1638
|
], I);
|
|
1633
1639
|
const oA = "data:image/svg+xml,%3csvg%20width='22'%20height='40'%20viewBox='0%200%2022%2040'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M21.517%200L0%2013.3362V0H21.517Z'%20fill='white'/%3e%3cpath%20d='M21.517%2013.339L0%2026.6724V13.3362H21.517V13.339Z'%20fill='white'/%3e%3cpath%20d='M21.517%2026.6755L0%2040.0089V26.6726H21.517V26.6755Z'%20fill='%231C28BA'/%3e%3c/svg%3e", Et = "data:image/svg+xml,%3csvg%20width='22'%20height='41'%20viewBox='0%200%2022%2041'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M21.517%200.00878906L0%2013.345V0.00878906H21.517Z'%20fill='white'/%3e%3cpath%20d='M21.517%2013.3478L0%2026.6812V13.345H21.517V13.3478Z'%20fill='%231C28BA'/%3e%3cpath%20d='M21.517%2026.6843L0%2040.0176V26.6814H21.517V26.6843Z'%20fill='white'/%3e%3c/svg%3e", It = "data:image/svg+xml,%3csvg%20width='22'%20height='41'%20viewBox='0%200%2022%2041'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M21.517%200.0204381L0%2013.3538V0.0175781H21.517V0.0204381Z'%20fill='%231C28BA'/%3e%3cpath%20d='M21.517%2013.3538L0%2026.69V13.3538H21.517Z'%20fill='white'/%3e%3cpath%20d='M21.517%2026.693L0%2040.0264V26.6902H21.517V26.693Z'%20fill='white'/%3e%3c/svg%3e";
|
|
1634
1640
|
var wt = Object.defineProperty, Yt = Object.getOwnPropertyDescriptor, u = (l, A, t, r) => {
|
|
1635
|
-
for (var e = r > 1 ? void 0 : r ? Yt(A, t) : A,
|
|
1636
|
-
(
|
|
1641
|
+
for (var e = r > 1 ? void 0 : r ? Yt(A, t) : A, p = l.length - 1, V; p >= 0; p--)
|
|
1642
|
+
(V = l[p]) && (e = (r ? V(A, t, e) : V(e)) || e);
|
|
1637
1643
|
return r && e && wt(A, t, e), e;
|
|
1638
1644
|
};
|
|
1639
1645
|
const { getLocale: gt, setLocale: PA } = it({
|
|
@@ -1782,23 +1788,22 @@ let a = class extends X {
|
|
|
1782
1788
|
const t = A.getContext("2d");
|
|
1783
1789
|
t == null || t.drawImage(this.videoElement, 0, 0, A.width, A.height);
|
|
1784
1790
|
const r = await new Promise(
|
|
1785
|
-
(
|
|
1786
|
-
), e = new File([r], "frame.jpg", { type: "image/jpeg" }),
|
|
1787
|
-
|
|
1791
|
+
(V) => A.toBlob((S) => V(S), "image/jpeg")
|
|
1792
|
+
), e = new File([r], "frame.jpg", { type: "image/jpeg" }), p = new FormData();
|
|
1793
|
+
p.append("image", e), p.append("height", this.height.toString()), p.append("productSku", this.productSku), this.measurerKey && p.append("measurerKey", this.measurerKey);
|
|
1788
1794
|
try {
|
|
1789
1795
|
this.isFetching = !0, this.isLoading = !0, this.poolingTimeout !== null && (clearTimeout(this.poolingTimeout), this.poolingTimeout = null), this.instructionMessageTimeout !== null && (clearTimeout(this.instructionMessageTimeout), this.instructionMessageTimeout = null);
|
|
1790
1796
|
const S = await (await fetch(this.apiUrl, {
|
|
1791
1797
|
method: "POST",
|
|
1792
|
-
body:
|
|
1798
|
+
body: p,
|
|
1793
1799
|
headers: {
|
|
1794
1800
|
Accept: "application/json",
|
|
1795
1801
|
"Cache-Control": "no-store",
|
|
1796
1802
|
Pragma: "no-cache",
|
|
1797
|
-
"X-Api-Key": this.apiKey
|
|
1798
|
-
"X-Tenant-Id": this.tenantId
|
|
1803
|
+
"X-Api-Key": this.apiKey
|
|
1799
1804
|
}
|
|
1800
1805
|
})).json();
|
|
1801
|
-
this.isFetching = !1, this.isLoading = !1, S.success ? (this.measurements = S.measurements, this.recommendedSize = S.chosenSize, this.instructionMessage = q("Measurement successful!"), this.stopPolling(), this.step = 4) : (this.instructionMessage = this.getTranslatedMessage(S.message || "UNKNOWN_ERROR"), this.instructionMessageTimeout = setTimeout(() => {
|
|
1806
|
+
this.isFetching = !1, this.isLoading = !1, this.errorMessage = JSON.stringify(S), S.success ? (this.measurements = S.measurements, this.recommendedSize = S.chosenSize, this.instructionMessage = q("Measurement successful!"), this.stopPolling(), this.step = 4) : (this.instructionMessage = this.getTranslatedMessage(S.message || "UNKNOWN_ERROR"), this.instructionMessageTimeout = setTimeout(() => {
|
|
1802
1807
|
this.recommendedSize || (this.instructionMessage = q("Position yourself in front of the camera"), this.poolingTimeout = setTimeout(l, 0));
|
|
1803
1808
|
}, 2e3));
|
|
1804
1809
|
} catch {
|
|
@@ -1878,7 +1883,7 @@ let a = class extends X {
|
|
|
1878
1883
|
.recommendedSize=${this.recommendedSize}
|
|
1879
1884
|
.onRetry=${() => this.resetMeasurement()}
|
|
1880
1885
|
.onAccept=${() => this.acceptMeasurement()}>
|
|
1881
|
-
</xact-step-result>
|
|
1886
|
+
</xact-step-result>
|
|
1882
1887
|
</div>
|
|
1883
1888
|
` : ""}
|
|
1884
1889
|
<xact-footer></xact-footer>
|
|
@@ -1889,7 +1894,7 @@ let a = class extends X {
|
|
|
1889
1894
|
`;
|
|
1890
1895
|
}
|
|
1891
1896
|
};
|
|
1892
|
-
a.styles =
|
|
1897
|
+
a.styles = N`
|
|
1893
1898
|
:host {
|
|
1894
1899
|
display: block;
|
|
1895
1900
|
font-family: Arial, sans-serif;
|
|
@@ -2317,25 +2322,25 @@ a.styles = Z`
|
|
|
2317
2322
|
|
|
2318
2323
|
`;
|
|
2319
2324
|
u([
|
|
2320
|
-
|
|
2325
|
+
j({ type: String, attribute: "api-key" })
|
|
2321
2326
|
], a.prototype, "apiKey", 2);
|
|
2322
2327
|
u([
|
|
2323
|
-
|
|
2328
|
+
j({ type: String, attribute: "tenant-id" })
|
|
2324
2329
|
], a.prototype, "tenantId", 2);
|
|
2325
2330
|
u([
|
|
2326
|
-
|
|
2331
|
+
j({ type: String, attribute: "product-sku" })
|
|
2327
2332
|
], a.prototype, "productSku", 2);
|
|
2328
2333
|
u([
|
|
2329
|
-
|
|
2334
|
+
j({ type: String, attribute: "api-url" })
|
|
2330
2335
|
], a.prototype, "apiUrl", 2);
|
|
2331
2336
|
u([
|
|
2332
|
-
|
|
2337
|
+
j({ type: Function, attribute: "onmeasurementaccepted" })
|
|
2333
2338
|
], a.prototype, "onMeasurementAccepted", 2);
|
|
2334
2339
|
u([
|
|
2335
|
-
|
|
2340
|
+
j({ type: Function, attribute: "onmeasurementcanceled" })
|
|
2336
2341
|
], a.prototype, "onMeasurementCanceled", 2);
|
|
2337
2342
|
u([
|
|
2338
|
-
|
|
2343
|
+
j({ type: String })
|
|
2339
2344
|
], a.prototype, "culture", 1);
|
|
2340
2345
|
u([
|
|
2341
2346
|
J()
|
|
@@ -2383,7 +2388,7 @@ u([
|
|
|
2383
2388
|
J()
|
|
2384
2389
|
], a.prototype, "currentCameraId", 2);
|
|
2385
2390
|
a = u([
|
|
2386
|
-
|
|
2391
|
+
R("body-measurer"),
|
|
2387
2392
|
Y()
|
|
2388
2393
|
], a);
|
|
2389
2394
|
export {
|