xactsize-webcomponents 1.0.43 → 1.0.44

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.
@@ -1,8 +1,8 @@
1
- const Wt = (i, t, e) => {
1
+ const Yt = (i, t, e) => {
2
2
  const s = i[t];
3
- return s ? typeof s == "function" ? s() : Promise.resolve(s) : new Promise((n, o) => {
3
+ return s ? typeof s == "function" ? s() : Promise.resolve(s) : new Promise((o, n) => {
4
4
  (typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
5
- o.bind(
5
+ n.bind(
6
6
  null,
7
7
  new Error(
8
8
  "Unknown variable dynamic import: " + t + (t.split("/").length !== e ? ". Note that variables only represent file names one level deep." : "")
@@ -16,18 +16,18 @@ const Wt = (i, t, e) => {
16
16
  * Copyright 2019 Google LLC
17
17
  * SPDX-License-Identifier: BSD-3-Clause
18
18
  */
19
- const Q = globalThis, mt = Q.ShadowRoot && (Q.ShadyCSS === void 0 || Q.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, gt = Symbol(), Ct = /* @__PURE__ */ new WeakMap();
20
- let Ht = class {
19
+ const X = globalThis, yt = X.ShadowRoot && (X.ShadyCSS === void 0 || X.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, _t = Symbol(), bt = /* @__PURE__ */ new WeakMap();
20
+ let Ut = class {
21
21
  constructor(t, e, s) {
22
- if (this._$cssResult$ = !0, s !== gt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
22
+ if (this._$cssResult$ = !0, s !== _t) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
23
23
  this.cssText = t, this.t = e;
24
24
  }
25
25
  get styleSheet() {
26
26
  let t = this.o;
27
27
  const e = this.t;
28
- if (mt && t === void 0) {
28
+ if (yt && t === void 0) {
29
29
  const s = e !== void 0 && e.length === 1;
30
- s && (t = Ct.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && Ct.set(e, t));
30
+ s && (t = bt.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), s && bt.set(e, t));
31
31
  }
32
32
  return t;
33
33
  }
@@ -35,33 +35,33 @@ let Ht = class {
35
35
  return this.cssText;
36
36
  }
37
37
  };
38
- const qt = (i) => new Ht(typeof i == "string" ? i : i + "", void 0, gt), P = (i, ...t) => {
39
- const e = i.length === 1 ? i[0] : t.reduce((s, n, o) => s + ((r) => {
38
+ const Kt = (i) => new Ut(typeof i == "string" ? i : i + "", void 0, _t), U = (i, ...t) => {
39
+ const e = i.length === 1 ? i[0] : t.reduce((s, o, n) => s + ((r) => {
40
40
  if (r._$cssResult$ === !0) return r.cssText;
41
41
  if (typeof r == "number") return r;
42
42
  throw Error("Value passed to 'css' function must be a 'css' function result: " + r + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
43
- })(n) + i[o + 1], i[0]);
44
- return new Ht(e, i, gt);
45
- }, Yt = (i, t) => {
46
- if (mt) i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
43
+ })(o) + i[n + 1], i[0]);
44
+ return new Ut(e, i, _t);
45
+ }, Qt = (i, t) => {
46
+ if (yt) i.adoptedStyleSheets = t.map((e) => e instanceof CSSStyleSheet ? e : e.styleSheet);
47
47
  else for (const e of t) {
48
- const s = document.createElement("style"), n = Q.litNonce;
49
- n !== void 0 && s.setAttribute("nonce", n), s.textContent = e.cssText, i.appendChild(s);
48
+ const s = document.createElement("style"), o = X.litNonce;
49
+ o !== void 0 && s.setAttribute("nonce", o), s.textContent = e.cssText, i.appendChild(s);
50
50
  }
51
- }, vt = mt ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
51
+ }, wt = yt ? (i) => i : (i) => i instanceof CSSStyleSheet ? ((t) => {
52
52
  let e = "";
53
53
  for (const s of t.cssRules) e += s.cssText;
54
- return qt(e);
54
+ return Kt(e);
55
55
  })(i) : i;
56
56
  /**
57
57
  * @license
58
58
  * Copyright 2017 Google LLC
59
59
  * SPDX-License-Identifier: BSD-3-Clause
60
60
  */
61
- const { is: Kt, defineProperty: Qt, getOwnPropertyDescriptor: Xt, getOwnPropertyNames: Jt, getOwnPropertySymbols: te, getPrototypeOf: ee } = Object, $ = globalThis, bt = $.trustedTypes, ie = bt ? bt.emptyScript : "", ot = $.reactiveElementPolyfillSupport, F = (i, t) => i, X = { toAttribute(i, t) {
61
+ const { is: Xt, defineProperty: Jt, getOwnPropertyDescriptor: te, getOwnPropertyNames: ee, getOwnPropertySymbols: ie, getPrototypeOf: se } = Object, $ = globalThis, Et = $.trustedTypes, oe = Et ? Et.emptyScript : "", rt = $.reactiveElementPolyfillSupport, z = (i, t) => i, J = { toAttribute(i, t) {
62
62
  switch (t) {
63
63
  case Boolean:
64
- i = i ? ie : null;
64
+ i = i ? oe : null;
65
65
  break;
66
66
  case Object:
67
67
  case Array:
@@ -86,7 +86,7 @@ const { is: Kt, defineProperty: Qt, getOwnPropertyDescriptor: Xt, getOwnProperty
86
86
  }
87
87
  }
88
88
  return e;
89
- } }, yt = (i, t) => !Kt(i, t), wt = { attribute: !0, type: String, converter: X, reflect: !1, useDefault: !1, hasChanged: yt };
89
+ } }, xt = (i, t) => !Xt(i, t), At = { attribute: !0, type: String, converter: J, reflect: !1, useDefault: !1, hasChanged: xt };
90
90
  Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), $.litPropertyMetadata ?? ($.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
91
91
  let I = class extends HTMLElement {
92
92
  static addInitializer(t) {
@@ -95,46 +95,46 @@ let I = class extends HTMLElement {
95
95
  static get observedAttributes() {
96
96
  return this.finalize(), this._$Eh && [...this._$Eh.keys()];
97
97
  }
98
- static createProperty(t, e = wt) {
98
+ static createProperty(t, e = At) {
99
99
  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) {
100
- const s = Symbol(), n = this.getPropertyDescriptor(t, s, e);
101
- n !== void 0 && Qt(this.prototype, t, n);
100
+ const s = Symbol(), o = this.getPropertyDescriptor(t, s, e);
101
+ o !== void 0 && Jt(this.prototype, t, o);
102
102
  }
103
103
  }
104
104
  static getPropertyDescriptor(t, e, s) {
105
- const { get: n, set: o } = Xt(this.prototype, t) ?? { get() {
105
+ const { get: o, set: n } = te(this.prototype, t) ?? { get() {
106
106
  return this[e];
107
107
  }, set(r) {
108
108
  this[e] = r;
109
109
  } };
110
- return { get: n, set(r) {
111
- const l = n == null ? void 0 : n.call(this);
112
- o == null || o.call(this, r), this.requestUpdate(t, l, s);
110
+ return { get: o, set(r) {
111
+ const l = o == null ? void 0 : o.call(this);
112
+ n == null || n.call(this, r), this.requestUpdate(t, l, s);
113
113
  }, configurable: !0, enumerable: !0 };
114
114
  }
115
115
  static getPropertyOptions(t) {
116
- return this.elementProperties.get(t) ?? wt;
116
+ return this.elementProperties.get(t) ?? At;
117
117
  }
118
118
  static _$Ei() {
119
- if (this.hasOwnProperty(F("elementProperties"))) return;
120
- const t = ee(this);
119
+ if (this.hasOwnProperty(z("elementProperties"))) return;
120
+ const t = se(this);
121
121
  t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
122
122
  }
123
123
  static finalize() {
124
- if (this.hasOwnProperty(F("finalized"))) return;
125
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(F("properties"))) {
126
- const e = this.properties, s = [...Jt(e), ...te(e)];
127
- for (const n of s) this.createProperty(n, e[n]);
124
+ if (this.hasOwnProperty(z("finalized"))) return;
125
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(z("properties"))) {
126
+ const e = this.properties, s = [...ee(e), ...ie(e)];
127
+ for (const o of s) this.createProperty(o, e[o]);
128
128
  }
129
129
  const t = this[Symbol.metadata];
130
130
  if (t !== null) {
131
131
  const e = litPropertyMetadata.get(t);
132
- if (e !== void 0) for (const [s, n] of e) this.elementProperties.set(s, n);
132
+ if (e !== void 0) for (const [s, o] of e) this.elementProperties.set(s, o);
133
133
  }
134
134
  this._$Eh = /* @__PURE__ */ new Map();
135
135
  for (const [e, s] of this.elementProperties) {
136
- const n = this._$Eu(e, s);
137
- n !== void 0 && this._$Eh.set(n, e);
136
+ const o = this._$Eu(e, s);
137
+ o !== void 0 && this._$Eh.set(o, e);
138
138
  }
139
139
  this.elementStyles = this.finalizeStyles(this.styles);
140
140
  }
@@ -142,8 +142,8 @@ let I = class extends HTMLElement {
142
142
  const e = [];
143
143
  if (Array.isArray(t)) {
144
144
  const s = new Set(t.flat(1 / 0).reverse());
145
- for (const n of s) e.unshift(vt(n));
146
- } else t !== void 0 && e.push(vt(t));
145
+ for (const o of s) e.unshift(wt(o));
146
+ } else t !== void 0 && e.push(wt(t));
147
147
  return e;
148
148
  }
149
149
  static _$Eu(t, e) {
@@ -172,7 +172,7 @@ let I = class extends HTMLElement {
172
172
  }
173
173
  createRenderRoot() {
174
174
  const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
175
- return Yt(t, this.constructor.elementStyles), t;
175
+ return Qt(t, this.constructor.elementStyles), t;
176
176
  }
177
177
  connectedCallback() {
178
178
  var t;
@@ -194,32 +194,32 @@ let I = class extends HTMLElement {
194
194
  this._$AK(t, s);
195
195
  }
196
196
  _$ET(t, e) {
197
- var o;
198
- const s = this.constructor.elementProperties.get(t), n = this.constructor._$Eu(t, s);
199
- if (n !== void 0 && s.reflect === !0) {
200
- const r = (((o = s.converter) == null ? void 0 : o.toAttribute) !== void 0 ? s.converter : X).toAttribute(e, s.type);
201
- this._$Em = t, r == null ? this.removeAttribute(n) : this.setAttribute(n, r), this._$Em = null;
197
+ var n;
198
+ const s = this.constructor.elementProperties.get(t), o = this.constructor._$Eu(t, s);
199
+ if (o !== void 0 && s.reflect === !0) {
200
+ const r = (((n = s.converter) == null ? void 0 : n.toAttribute) !== void 0 ? s.converter : J).toAttribute(e, s.type);
201
+ this._$Em = t, r == null ? this.removeAttribute(o) : this.setAttribute(o, r), this._$Em = null;
202
202
  }
203
203
  }
204
204
  _$AK(t, e) {
205
- var o, r;
206
- const s = this.constructor, n = s._$Eh.get(t);
207
- if (n !== void 0 && this._$Em !== n) {
208
- const l = s.getPropertyOptions(n), h = typeof l.converter == "function" ? { fromAttribute: l.converter } : ((o = l.converter) == null ? void 0 : o.fromAttribute) !== void 0 ? l.converter : X;
209
- this._$Em = n, this[n] = h.fromAttribute(e, l.type) ?? ((r = this._$Ej) == null ? void 0 : r.get(n)) ?? null, this._$Em = null;
205
+ var n, r;
206
+ const s = this.constructor, o = s._$Eh.get(t);
207
+ if (o !== void 0 && this._$Em !== o) {
208
+ const l = s.getPropertyOptions(o), h = typeof l.converter == "function" ? { fromAttribute: l.converter } : ((n = l.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? l.converter : J;
209
+ this._$Em = o, this[o] = h.fromAttribute(e, l.type) ?? ((r = this._$Ej) == null ? void 0 : r.get(o)) ?? null, this._$Em = null;
210
210
  }
211
211
  }
212
212
  requestUpdate(t, e, s) {
213
- var n;
213
+ var o;
214
214
  if (t !== void 0) {
215
- const o = this.constructor, r = this[t];
216
- if (s ?? (s = o.getPropertyOptions(t)), !((s.hasChanged ?? yt)(r, e) || s.useDefault && s.reflect && r === ((n = this._$Ej) == null ? void 0 : n.get(t)) && !this.hasAttribute(o._$Eu(t, s)))) return;
215
+ const n = this.constructor, r = this[t];
216
+ if (s ?? (s = n.getPropertyOptions(t)), !((s.hasChanged ?? xt)(r, e) || s.useDefault && s.reflect && r === ((o = this._$Ej) == null ? void 0 : o.get(t)) && !this.hasAttribute(n._$Eu(t, s)))) return;
217
217
  this.C(t, e, s);
218
218
  }
219
219
  this.isUpdatePending === !1 && (this._$ES = this._$EP());
220
220
  }
221
- C(t, e, { useDefault: s, reflect: n, wrapped: o }, r) {
222
- s && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(t) && (this._$Ej.set(t, r ?? e ?? this[t]), o !== !0 || r !== void 0) || (this._$AL.has(t) || (this.hasUpdated || s || (e = void 0), this._$AL.set(t, e)), n === !0 && this._$Em !== t && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(t));
221
+ C(t, e, { useDefault: s, reflect: o, wrapped: n }, r) {
222
+ s && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(t) && (this._$Ej.set(t, r ?? e ?? this[t]), n !== !0 || r !== void 0) || (this._$AL.has(t) || (this.hasUpdated || s || (e = void 0), this._$AL.set(t, e)), o === !0 && this._$Em !== t && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(t));
223
223
  }
224
224
  async _$EP() {
225
225
  this.isUpdatePending = !0;
@@ -239,24 +239,24 @@ let I = 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 [o, r] of this._$Ep) this[o] = r;
242
+ for (const [n, r] of this._$Ep) this[n] = r;
243
243
  this._$Ep = void 0;
244
244
  }
245
- const n = this.constructor.elementProperties;
246
- if (n.size > 0) for (const [o, r] of n) {
247
- const { wrapped: l } = r, h = this[o];
248
- l !== !0 || this._$AL.has(o) || h === void 0 || this.C(o, void 0, r, h);
245
+ const o = this.constructor.elementProperties;
246
+ if (o.size > 0) for (const [n, r] of o) {
247
+ const { wrapped: l } = r, h = this[n];
248
+ l !== !0 || this._$AL.has(n) || h === void 0 || this.C(n, void 0, r, h);
249
249
  }
250
250
  }
251
251
  let t = !1;
252
252
  const e = this._$AL;
253
253
  try {
254
- t = this.shouldUpdate(e), t ? (this.willUpdate(e), (s = this._$EO) == null || s.forEach((n) => {
255
- var o;
256
- return (o = n.hostUpdate) == null ? void 0 : o.call(n);
254
+ t = this.shouldUpdate(e), t ? (this.willUpdate(e), (s = this._$EO) == null || s.forEach((o) => {
255
+ var n;
256
+ return (n = o.hostUpdate) == null ? void 0 : n.call(o);
257
257
  }), this.update(e)) : this._$EM();
258
- } catch (n) {
259
- throw t = !1, this._$EM(), n;
258
+ } catch (o) {
259
+ throw t = !1, this._$EM(), o;
260
260
  }
261
261
  t && this._$AE(e);
262
262
  }
@@ -265,8 +265,8 @@ let I = class extends HTMLElement {
265
265
  _$AE(t) {
266
266
  var e;
267
267
  (e = this._$EO) == null || e.forEach((s) => {
268
- var n;
269
- return (n = s.hostUpdated) == null ? void 0 : n.call(s);
268
+ var o;
269
+ return (o = s.hostUpdated) == null ? void 0 : o.call(s);
270
270
  }), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
271
271
  }
272
272
  _$EM() {
@@ -289,61 +289,61 @@ let I = class extends HTMLElement {
289
289
  firstUpdated(t) {
290
290
  }
291
291
  };
292
- I.elementStyles = [], I.shadowRootOptions = { mode: "open" }, I[F("elementProperties")] = /* @__PURE__ */ new Map(), I[F("finalized")] = /* @__PURE__ */ new Map(), ot == null || ot({ ReactiveElement: I }), ($.reactiveElementVersions ?? ($.reactiveElementVersions = [])).push("2.1.0");
292
+ I.elementStyles = [], I.shadowRootOptions = { mode: "open" }, I[z("elementProperties")] = /* @__PURE__ */ new Map(), I[z("finalized")] = /* @__PURE__ */ new Map(), rt == null || rt({ ReactiveElement: I }), ($.reactiveElementVersions ?? ($.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 z = globalThis, J = z.trustedTypes, Et = J ? J.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, Pt = "$lit$", A = `lit$${Math.random().toFixed(9).slice(2)}$`, Ut = "?" + A, se = `<${Ut}>`, R = document, N = () => R.createComment(""), B = (i) => i === null || typeof i != "object" && typeof i != "function", _t = Array.isArray, ne = (i) => _t(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", rt = `[
299
- \f\r]`, V = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, At = /-->/g, $t = />/g, M = RegExp(`>|${rt}(?:([^\\s"'>=/]+)(${rt}*=${rt}*(?:[^
300
- \f\r"'\`<>=]|("|')|))|$)`, "g"), Mt = /'/g, Lt = /"/g, Vt = /^(?:script|style|textarea|title)$/i, oe = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), g = oe(1), T = Symbol.for("lit-noChange"), y = Symbol.for("lit-nothing"), St = /* @__PURE__ */ new WeakMap(), S = R.createTreeWalker(R, 129);
301
- function Ft(i, t) {
302
- if (!_t(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
303
- return Et !== void 0 ? Et.createHTML(t) : t;
298
+ const N = globalThis, tt = N.trustedTypes, $t = tt ? tt.createPolicy("lit-html", { createHTML: (i) => i }) : void 0, Vt = "$lit$", A = `lit$${Math.random().toFixed(9).slice(2)}$`, Ft = "?" + A, ne = `<${Ft}>`, R = document, B = () => R.createComment(""), Z = (i) => i === null || typeof i != "object" && typeof i != "function", Ct = Array.isArray, re = (i) => Ct(i) || typeof (i == null ? void 0 : i[Symbol.iterator]) == "function", at = `[
299
+ \f\r]`, F = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, St = /-->/g, Lt = />/g, S = RegExp(`>|${at}(?:([^\\s"'>=/]+)(${at}*=${at}*(?:[^
300
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Mt = /'/g, kt = /"/g, zt = /^(?:script|style|textarea|title)$/i, ae = (i) => (t, ...e) => ({ _$litType$: i, strings: t, values: e }), g = ae(1), T = Symbol.for("lit-noChange"), y = Symbol.for("lit-nothing"), Rt = /* @__PURE__ */ new WeakMap(), M = R.createTreeWalker(R, 129);
301
+ function Nt(i, t) {
302
+ if (!Ct(i) || !i.hasOwnProperty("raw")) throw Error("invalid template strings array");
303
+ return $t !== void 0 ? $t.createHTML(t) : t;
304
304
  }
305
- const re = (i, t) => {
305
+ const le = (i, t) => {
306
306
  const e = i.length - 1, s = [];
307
- let n, o = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", r = V;
307
+ let o, n = t === 2 ? "<svg>" : t === 3 ? "<math>" : "", r = F;
308
308
  for (let l = 0; l < e; l++) {
309
309
  const h = i[l];
310
310
  let u, f, m = -1, b = 0;
311
- for (; b < h.length && (r.lastIndex = b, f = r.exec(h), f !== null); ) b = r.lastIndex, r === V ? f[1] === "!--" ? r = At : f[1] !== void 0 ? r = $t : f[2] !== void 0 ? (Vt.test(f[2]) && (n = RegExp("</" + f[2], "g")), r = M) : f[3] !== void 0 && (r = M) : r === M ? f[0] === ">" ? (r = n ?? V, m = -1) : f[1] === void 0 ? m = -2 : (m = r.lastIndex - f[2].length, u = f[1], r = f[3] === void 0 ? M : f[3] === '"' ? Lt : Mt) : r === Lt || r === Mt ? r = M : r === At || r === $t ? r = V : (r = M, n = void 0);
312
- const E = r === M && i[l + 1].startsWith("/>") ? " " : "";
313
- o += r === V ? h + se : m >= 0 ? (s.push(u), h.slice(0, m) + Pt + h.slice(m) + A + E) : h + A + (m === -2 ? l : E);
311
+ for (; b < h.length && (r.lastIndex = b, f = r.exec(h), f !== null); ) b = r.lastIndex, r === F ? f[1] === "!--" ? r = St : f[1] !== void 0 ? r = Lt : f[2] !== void 0 ? (zt.test(f[2]) && (o = RegExp("</" + f[2], "g")), r = S) : f[3] !== void 0 && (r = S) : r === S ? f[0] === ">" ? (r = o ?? F, m = -1) : f[1] === void 0 ? m = -2 : (m = r.lastIndex - f[2].length, u = f[1], r = f[3] === void 0 ? S : f[3] === '"' ? kt : Mt) : r === kt || r === Mt ? r = S : r === St || r === Lt ? r = F : (r = S, o = void 0);
312
+ const E = r === S && i[l + 1].startsWith("/>") ? " " : "";
313
+ n += r === F ? h + ne : m >= 0 ? (s.push(u), h.slice(0, m) + Vt + h.slice(m) + A + E) : h + A + (m === -2 ? l : E);
314
314
  }
315
- return [Ft(i, o + (i[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
315
+ return [Nt(i, n + (i[e] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), s];
316
316
  };
317
- class Z {
317
+ class j {
318
318
  constructor({ strings: t, _$litType$: e }, s) {
319
- let n;
319
+ let o;
320
320
  this.parts = [];
321
- let o = 0, r = 0;
322
- const l = t.length - 1, h = this.parts, [u, f] = re(t, e);
323
- if (this.el = Z.createElement(u, s), S.currentNode = this.el.content, e === 2 || e === 3) {
321
+ let n = 0, r = 0;
322
+ const l = t.length - 1, h = this.parts, [u, f] = le(t, e);
323
+ if (this.el = j.createElement(u, s), M.currentNode = this.el.content, e === 2 || e === 3) {
324
324
  const m = this.el.content.firstChild;
325
325
  m.replaceWith(...m.childNodes);
326
326
  }
327
- for (; (n = S.nextNode()) !== null && h.length < l; ) {
328
- if (n.nodeType === 1) {
329
- if (n.hasAttributes()) for (const m of n.getAttributeNames()) if (m.endsWith(Pt)) {
330
- const b = f[r++], E = n.getAttribute(m).split(A), Y = /([.?@])?(.*)/.exec(b);
331
- h.push({ type: 1, index: o, name: Y[2], strings: E, ctor: Y[1] === "." ? le : Y[1] === "?" ? he : Y[1] === "@" ? ce : st }), n.removeAttribute(m);
332
- } else m.startsWith(A) && (h.push({ type: 6, index: o }), n.removeAttribute(m));
333
- if (Vt.test(n.tagName)) {
334
- const m = n.textContent.split(A), b = m.length - 1;
327
+ for (; (o = M.nextNode()) !== null && h.length < l; ) {
328
+ if (o.nodeType === 1) {
329
+ if (o.hasAttributes()) for (const m of o.getAttributeNames()) if (m.endsWith(Vt)) {
330
+ const b = f[r++], E = o.getAttribute(m).split(A), K = /([.?@])?(.*)/.exec(b);
331
+ h.push({ type: 1, index: n, name: K[2], strings: E, ctor: K[1] === "." ? ce : K[1] === "?" ? de : K[1] === "@" ? pe : ot }), o.removeAttribute(m);
332
+ } else m.startsWith(A) && (h.push({ type: 6, index: n }), o.removeAttribute(m));
333
+ if (zt.test(o.tagName)) {
334
+ const m = o.textContent.split(A), b = m.length - 1;
335
335
  if (b > 0) {
336
- n.textContent = J ? J.emptyScript : "";
337
- for (let E = 0; E < b; E++) n.append(m[E], N()), S.nextNode(), h.push({ type: 2, index: ++o });
338
- n.append(m[b], N());
336
+ o.textContent = tt ? tt.emptyScript : "";
337
+ for (let E = 0; E < b; E++) o.append(m[E], B()), M.nextNode(), h.push({ type: 2, index: ++n });
338
+ o.append(m[b], B());
339
339
  }
340
340
  }
341
- } else if (n.nodeType === 8) if (n.data === Ut) h.push({ type: 2, index: o });
341
+ } else if (o.nodeType === 8) if (o.data === Ft) h.push({ type: 2, index: n });
342
342
  else {
343
343
  let m = -1;
344
- for (; (m = n.data.indexOf(A, m + 1)) !== -1; ) h.push({ type: 7, index: o }), m += A.length - 1;
344
+ for (; (m = o.data.indexOf(A, m + 1)) !== -1; ) h.push({ type: 7, index: n }), m += A.length - 1;
345
345
  }
346
- o++;
346
+ n++;
347
347
  }
348
348
  }
349
349
  static createElement(t, e) {
@@ -351,14 +351,14 @@ class Z {
351
351
  return s.innerHTML = t, s;
352
352
  }
353
353
  }
354
- function D(i, t, e = i, s) {
354
+ function H(i, t, e = i, s) {
355
355
  var r, l;
356
356
  if (t === T) return t;
357
- let n = s !== void 0 ? (r = e._$Co) == null ? void 0 : r[s] : e._$Cl;
358
- const o = B(t) ? void 0 : t._$litDirective$;
359
- return (n == null ? void 0 : n.constructor) !== o && ((l = n == null ? void 0 : n._$AO) == null || l.call(n, !1), o === void 0 ? n = void 0 : (n = new o(i), n._$AT(i, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = n : e._$Cl = n), n !== void 0 && (t = D(i, n._$AS(i, t.values), n, s)), t;
357
+ let o = s !== void 0 ? (r = e._$Co) == null ? void 0 : r[s] : e._$Cl;
358
+ const n = Z(t) ? void 0 : t._$litDirective$;
359
+ return (o == null ? void 0 : o.constructor) !== n && ((l = o == null ? void 0 : o._$AO) == null || l.call(o, !1), n === void 0 ? o = void 0 : (o = new n(i), o._$AT(i, e, s)), s !== void 0 ? (e._$Co ?? (e._$Co = []))[s] = o : e._$Cl = o), o !== void 0 && (t = H(i, o._$AS(i, t.values), o, s)), t;
360
360
  }
361
- class ae {
361
+ class he {
362
362
  constructor(t, e) {
363
363
  this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = e;
364
364
  }
@@ -369,30 +369,30 @@ class ae {
369
369
  return this._$AM._$AU;
370
370
  }
371
371
  u(t) {
372
- const { el: { content: e }, parts: s } = this._$AD, n = ((t == null ? void 0 : t.creationScope) ?? R).importNode(e, !0);
373
- S.currentNode = n;
374
- let o = S.nextNode(), r = 0, l = 0, h = s[0];
372
+ const { el: { content: e }, parts: s } = this._$AD, o = ((t == null ? void 0 : t.creationScope) ?? R).importNode(e, !0);
373
+ M.currentNode = o;
374
+ let n = M.nextNode(), r = 0, l = 0, h = s[0];
375
375
  for (; h !== void 0; ) {
376
376
  if (r === h.index) {
377
377
  let u;
378
- h.type === 2 ? u = new G(o, o.nextSibling, this, t) : h.type === 1 ? u = new h.ctor(o, h.name, h.strings, this, t) : h.type === 6 && (u = new de(o, this, t)), this._$AV.push(u), h = s[++l];
378
+ h.type === 2 ? u = new W(n, n.nextSibling, this, t) : h.type === 1 ? u = new h.ctor(n, h.name, h.strings, this, t) : h.type === 6 && (u = new ue(n, this, t)), this._$AV.push(u), h = s[++l];
379
379
  }
380
- r !== (h == null ? void 0 : h.index) && (o = S.nextNode(), r++);
380
+ r !== (h == null ? void 0 : h.index) && (n = M.nextNode(), r++);
381
381
  }
382
- return S.currentNode = R, n;
382
+ return M.currentNode = R, o;
383
383
  }
384
384
  p(t) {
385
385
  let e = 0;
386
386
  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++;
387
387
  }
388
388
  }
389
- class G {
389
+ class W {
390
390
  get _$AU() {
391
391
  var t;
392
392
  return ((t = this._$AM) == null ? void 0 : t._$AU) ?? this._$Cv;
393
393
  }
394
- constructor(t, e, s, n) {
395
- this.type = 2, this._$AH = y, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = n, this._$Cv = (n == null ? void 0 : n.isConnected) ?? !0;
394
+ constructor(t, e, s, o) {
395
+ this.type = 2, this._$AH = y, this._$AN = void 0, this._$AA = t, this._$AB = e, this._$AM = s, this.options = o, this._$Cv = (o == null ? void 0 : o.isConnected) ?? !0;
396
396
  }
397
397
  get parentNode() {
398
398
  let t = this._$AA.parentNode;
@@ -406,7 +406,7 @@ class G {
406
406
  return this._$AB;
407
407
  }
408
408
  _$AI(t, e = this) {
409
- t = D(this, t, e), B(t) ? t === y || t == null || t === "" ? (this._$AH !== y && this._$AR(), this._$AH = y) : t !== this._$AH && t !== T && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : ne(t) ? this.k(t) : this._(t);
409
+ t = H(this, t, e), Z(t) ? t === y || t == null || t === "" ? (this._$AH !== y && this._$AR(), this._$AH = y) : t !== this._$AH && t !== T && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : re(t) ? this.k(t) : this._(t);
410
410
  }
411
411
  O(t) {
412
412
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -415,33 +415,33 @@ class G {
415
415
  this._$AH !== t && (this._$AR(), this._$AH = this.O(t));
416
416
  }
417
417
  _(t) {
418
- this._$AH !== y && B(this._$AH) ? this._$AA.nextSibling.data = t : this.T(R.createTextNode(t)), this._$AH = t;
418
+ this._$AH !== y && Z(this._$AH) ? this._$AA.nextSibling.data = t : this.T(R.createTextNode(t)), this._$AH = t;
419
419
  }
420
420
  $(t) {
421
- var o;
422
- const { values: e, _$litType$: s } = t, n = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = Z.createElement(Ft(s.h, s.h[0]), this.options)), s);
423
- if (((o = this._$AH) == null ? void 0 : o._$AD) === n) this._$AH.p(e);
421
+ var n;
422
+ const { values: e, _$litType$: s } = t, o = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = j.createElement(Nt(s.h, s.h[0]), this.options)), s);
423
+ if (((n = this._$AH) == null ? void 0 : n._$AD) === o) this._$AH.p(e);
424
424
  else {
425
- const r = new ae(n, this), l = r.u(this.options);
425
+ const r = new he(o, this), l = r.u(this.options);
426
426
  r.p(e), this.T(l), this._$AH = r;
427
427
  }
428
428
  }
429
429
  _$AC(t) {
430
- let e = St.get(t.strings);
431
- return e === void 0 && St.set(t.strings, e = new Z(t)), e;
430
+ let e = Rt.get(t.strings);
431
+ return e === void 0 && Rt.set(t.strings, e = new j(t)), e;
432
432
  }
433
433
  k(t) {
434
- _t(this._$AH) || (this._$AH = [], this._$AR());
434
+ Ct(this._$AH) || (this._$AH = [], this._$AR());
435
435
  const e = this._$AH;
436
- let s, n = 0;
437
- for (const o of t) n === e.length ? e.push(s = new G(this.O(N()), this.O(N()), this, this.options)) : s = e[n], s._$AI(o), n++;
438
- n < e.length && (this._$AR(s && s._$AB.nextSibling, n), e.length = n);
436
+ let s, o = 0;
437
+ for (const n of t) o === e.length ? e.push(s = new W(this.O(B()), this.O(B()), this, this.options)) : s = e[o], s._$AI(n), o++;
438
+ o < e.length && (this._$AR(s && s._$AB.nextSibling, o), e.length = o);
439
439
  }
440
440
  _$AR(t = this._$AA.nextSibling, e) {
441
441
  var s;
442
442
  for ((s = this._$AP) == null ? void 0 : s.call(this, !1, !0, e); t && t !== this._$AB; ) {
443
- const n = t.nextSibling;
444
- t.remove(), t = n;
443
+ const o = t.nextSibling;
444
+ t.remove(), t = o;
445
445
  }
446
446
  }
447
447
  setConnected(t) {
@@ -449,32 +449,32 @@ class G {
449
449
  this._$AM === void 0 && (this._$Cv = t, (e = this._$AP) == null || e.call(this, t));
450
450
  }
451
451
  }
452
- class st {
452
+ class ot {
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(t, e, s, n, o) {
460
- this.type = 1, this._$AH = y, this._$AN = void 0, this.element = t, this.name = e, this._$AM = n, this.options = o, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = y;
459
+ constructor(t, e, s, o, n) {
460
+ this.type = 1, this._$AH = y, this._$AN = void 0, this.element = t, this.name = e, this._$AM = o, this.options = n, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = y;
461
461
  }
462
- _$AI(t, e = this, s, n) {
463
- const o = this.strings;
462
+ _$AI(t, e = this, s, o) {
463
+ const n = this.strings;
464
464
  let r = !1;
465
- if (o === void 0) t = D(this, t, e, 0), r = !B(t) || t !== this._$AH && t !== T, r && (this._$AH = t);
465
+ if (n === void 0) t = H(this, t, e, 0), r = !Z(t) || t !== this._$AH && t !== T, r && (this._$AH = t);
466
466
  else {
467
467
  const l = t;
468
468
  let h, u;
469
- for (t = o[0], h = 0; h < o.length - 1; h++) u = D(this, l[s + h], e, h), u === T && (u = this._$AH[h]), r || (r = !B(u) || u !== this._$AH[h]), u === y ? t = y : t !== y && (t += (u ?? "") + o[h + 1]), this._$AH[h] = u;
469
+ for (t = n[0], h = 0; h < n.length - 1; h++) u = H(this, l[s + h], e, h), u === T && (u = this._$AH[h]), r || (r = !Z(u) || u !== this._$AH[h]), u === y ? t = y : t !== y && (t += (u ?? "") + n[h + 1]), this._$AH[h] = u;
470
470
  }
471
- r && !n && this.j(t);
471
+ r && !o && this.j(t);
472
472
  }
473
473
  j(t) {
474
474
  t === y ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t ?? "");
475
475
  }
476
476
  }
477
- class le extends st {
477
+ class ce extends ot {
478
478
  constructor() {
479
479
  super(...arguments), this.type = 3;
480
480
  }
@@ -482,7 +482,7 @@ class le extends st {
482
482
  this.element[this.name] = t === y ? void 0 : t;
483
483
  }
484
484
  }
485
- class he extends st {
485
+ class de extends ot {
486
486
  constructor() {
487
487
  super(...arguments), this.type = 4;
488
488
  }
@@ -490,21 +490,21 @@ class he extends st {
490
490
  this.element.toggleAttribute(this.name, !!t && t !== y);
491
491
  }
492
492
  }
493
- class ce extends st {
494
- constructor(t, e, s, n, o) {
495
- super(t, e, s, n, o), this.type = 5;
493
+ class pe extends ot {
494
+ constructor(t, e, s, o, n) {
495
+ super(t, e, s, o, n), this.type = 5;
496
496
  }
497
497
  _$AI(t, e = this) {
498
- if ((t = D(this, t, e, 0) ?? y) === T) return;
499
- const s = this._$AH, n = t === y && s !== y || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, o = t !== y && (s === y || n);
500
- n && this.element.removeEventListener(this.name, this, s), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
498
+ if ((t = H(this, t, e, 0) ?? y) === T) return;
499
+ const s = this._$AH, o = t === y && s !== y || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, n = t !== y && (s === y || o);
500
+ o && this.element.removeEventListener(this.name, this, s), n && this.element.addEventListener(this.name, this, t), this._$AH = t;
501
501
  }
502
502
  handleEvent(t) {
503
503
  var e;
504
504
  typeof this._$AH == "function" ? this._$AH.call(((e = this.options) == null ? void 0 : e.host) ?? this.element, t) : this._$AH.handleEvent(t);
505
505
  }
506
506
  }
507
- class de {
507
+ class ue {
508
508
  constructor(t, e, s) {
509
509
  this.element = t, this.type = 6, this._$AN = void 0, this._$AM = e, this.options = s;
510
510
  }
@@ -512,19 +512,19 @@ class de {
512
512
  return this._$AM._$AU;
513
513
  }
514
514
  _$AI(t) {
515
- D(this, t);
515
+ H(this, t);
516
516
  }
517
517
  }
518
- const at = z.litHtmlPolyfillSupport;
519
- at == null || at(Z, G), (z.litHtmlVersions ?? (z.litHtmlVersions = [])).push("3.3.0");
520
- const pe = (i, t, e) => {
518
+ const lt = N.litHtmlPolyfillSupport;
519
+ lt == null || lt(j, W), (N.litHtmlVersions ?? (N.litHtmlVersions = [])).push("3.3.0");
520
+ const fe = (i, t, e) => {
521
521
  const s = (e == null ? void 0 : e.renderBefore) ?? t;
522
- let n = s._$litPart$;
523
- if (n === void 0) {
524
- const o = (e == null ? void 0 : e.renderBefore) ?? null;
525
- s._$litPart$ = n = new G(t.insertBefore(N(), o), o, void 0, e ?? {});
522
+ let o = s._$litPart$;
523
+ if (o === void 0) {
524
+ const n = (e == null ? void 0 : e.renderBefore) ?? null;
525
+ s._$litPart$ = o = new W(t.insertBefore(B(), n), n, void 0, e ?? {});
526
526
  }
527
- return n._$AI(i), n;
527
+ return o._$AI(i), o;
528
528
  };
529
529
  /**
530
530
  * @license
@@ -543,7 +543,7 @@ let C = class extends I {
543
543
  }
544
544
  update(t) {
545
545
  const e = this.render();
546
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = pe(e, this.renderRoot, this.renderOptions);
546
+ this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = fe(e, this.renderRoot, this.renderOptions);
547
547
  }
548
548
  connectedCallback() {
549
549
  var t;
@@ -557,17 +557,17 @@ let C = class extends I {
557
557
  return T;
558
558
  }
559
559
  };
560
- var Dt;
561
- C._$litElement$ = !0, C.finalized = !0, (Dt = k.litElementHydrateSupport) == null || Dt.call(k, { LitElement: C });
562
- const lt = k.litElementPolyfillSupport;
563
- lt == null || lt({ LitElement: C });
560
+ var Pt;
561
+ C._$litElement$ = !0, C.finalized = !0, (Pt = k.litElementHydrateSupport) == null || Pt.call(k, { LitElement: C });
562
+ const ht = k.litElementPolyfillSupport;
563
+ ht == null || ht({ LitElement: C });
564
564
  (k.litElementVersions ?? (k.litElementVersions = [])).push("4.2.0");
565
565
  /**
566
566
  * @license
567
567
  * Copyright 2017 Google LLC
568
568
  * SPDX-License-Identifier: BSD-3-Clause
569
569
  */
570
- const U = (i) => (t, e) => {
570
+ const V = (i) => (t, e) => {
571
571
  e !== void 0 ? e.addInitializer(() => {
572
572
  customElements.define(i, t);
573
573
  }) : customElements.define(i, t);
@@ -577,10 +577,10 @@ const U = (i) => (t, e) => {
577
577
  * Copyright 2017 Google LLC
578
578
  * SPDX-License-Identifier: BSD-3-Clause
579
579
  */
580
- const ue = { attribute: !0, type: String, converter: X, reflect: !1, hasChanged: yt }, fe = (i = ue, t, e) => {
581
- const { kind: s, metadata: n } = e;
582
- let o = globalThis.litPropertyMetadata.get(n);
583
- if (o === void 0 && globalThis.litPropertyMetadata.set(n, o = /* @__PURE__ */ new Map()), s === "setter" && ((i = Object.create(i)).wrapped = !0), o.set(e.name, i), s === "accessor") {
580
+ const me = { attribute: !0, type: String, converter: J, reflect: !1, hasChanged: xt }, ge = (i = me, t, e) => {
581
+ const { kind: s, metadata: o } = e;
582
+ let n = globalThis.litPropertyMetadata.get(o);
583
+ if (n === void 0 && globalThis.litPropertyMetadata.set(o, n = /* @__PURE__ */ new Map()), s === "setter" && ((i = Object.create(i)).wrapped = !0), n.set(e.name, i), s === "accessor") {
584
584
  const { name: r } = e;
585
585
  return { set(l) {
586
586
  const h = t.get.call(this);
@@ -599,9 +599,9 @@ const ue = { attribute: !0, type: String, converter: X, reflect: !1, hasChanged:
599
599
  throw Error("Unsupported decorator location: " + s);
600
600
  };
601
601
  function d(i) {
602
- return (t, e) => typeof e == "object" ? fe(i, t, e) : ((s, n, o) => {
603
- const r = n.hasOwnProperty(o);
604
- return n.constructor.createProperty(o, s), r ? Object.getOwnPropertyDescriptor(n, o) : void 0;
602
+ return (t, e) => typeof e == "object" ? ge(i, t, e) : ((s, o, n) => {
603
+ const r = o.hasOwnProperty(n);
604
+ return o.constructor.createProperty(n, s), r ? Object.getOwnPropertyDescriptor(o, n) : void 0;
605
605
  })(i, t, e);
606
606
  }
607
607
  /**
@@ -617,20 +617,20 @@ function _(i) {
617
617
  * Copyright 2021 Google LLC
618
618
  * SPDX-License-Identifier: BSD-3-Clause
619
619
  */
620
- const dt = "lit-localize-status";
620
+ const pt = "lit-localize-status";
621
621
  /**
622
622
  * @license
623
623
  * Copyright 2021 Google LLC
624
624
  * SPDX-License-Identifier: BSD-3-Clause
625
625
  */
626
- const me = (i, ...t) => ({
626
+ const ye = (i, ...t) => ({
627
627
  strTag: !0,
628
628
  strings: i,
629
629
  values: t
630
- }), ge = me, ye = (i) => typeof i != "string" && "strTag" in i, zt = (i, t, e) => {
630
+ }), _e = ye, xe = (i) => typeof i != "string" && "strTag" in i, Bt = (i, t, e) => {
631
631
  let s = i[0];
632
- for (let n = 1; n < i.length; n++)
633
- s += t[e ? e[n - 1] : n - 1], s += i[n];
632
+ for (let o = 1; o < i.length; o++)
633
+ s += t[e ? e[o - 1] : o - 1], s += i[o];
634
634
  return s;
635
635
  };
636
636
  /**
@@ -638,44 +638,44 @@ const me = (i, ...t) => ({
638
638
  * Copyright 2021 Google LLC
639
639
  * SPDX-License-Identifier: BSD-3-Clause
640
640
  */
641
- const Nt = (i) => ye(i) ? zt(i.strings, i.values) : i;
642
- let a = Nt, kt = !1;
643
- function _e(i) {
644
- if (kt)
641
+ const Zt = (i) => xe(i) ? Bt(i.strings, i.values) : i;
642
+ let a = Zt, Tt = !1;
643
+ function Ce(i) {
644
+ if (Tt)
645
645
  throw new Error("lit-localize can only be configured once");
646
- a = i, kt = !0;
646
+ a = i, Tt = !0;
647
647
  }
648
648
  /**
649
649
  * @license
650
650
  * Copyright 2021 Google LLC
651
651
  * SPDX-License-Identifier: BSD-3-Clause
652
652
  */
653
- class xe {
653
+ class ve {
654
654
  constructor(t) {
655
655
  this.__litLocalizeEventHandler = (e) => {
656
656
  e.detail.status === "ready" && this.host.requestUpdate();
657
657
  }, this.host = t;
658
658
  }
659
659
  hostConnected() {
660
- window.addEventListener(dt, this.__litLocalizeEventHandler);
660
+ window.addEventListener(pt, this.__litLocalizeEventHandler);
661
661
  }
662
662
  hostDisconnected() {
663
- window.removeEventListener(dt, this.__litLocalizeEventHandler);
663
+ window.removeEventListener(pt, this.__litLocalizeEventHandler);
664
664
  }
665
665
  }
666
- const Ce = (i) => i.addController(new xe(i)), ve = Ce;
666
+ const be = (i) => i.addController(new ve(i)), we = be;
667
667
  /**
668
668
  * @license
669
669
  * Copyright 2021 Google LLC
670
670
  * SPDX-License-Identifier: BSD-3-Clause
671
671
  */
672
- const W = () => (i, t) => (i.addInitializer(ve), i);
672
+ const q = () => (i, t) => (i.addInitializer(we), i);
673
673
  /**
674
674
  * @license
675
675
  * Copyright 2020 Google LLC
676
676
  * SPDX-License-Identifier: BSD-3-Clause
677
677
  */
678
- class Bt {
678
+ class jt {
679
679
  constructor() {
680
680
  this.settled = !1, this.promise = new Promise((t, e) => {
681
681
  this._resolve = t, this._reject = e;
@@ -696,92 +696,93 @@ class Bt {
696
696
  const w = [];
697
697
  for (let i = 0; i < 256; i++)
698
698
  w[i] = (i >> 4 & 15).toString(16) + (i & 15).toString(16);
699
- function be(i) {
700
- let t = 0, e = 8997, s = 0, n = 33826, o = 0, r = 40164, l = 0, h = 52210;
699
+ function Ee(i) {
700
+ let t = 0, e = 8997, s = 0, o = 33826, n = 0, r = 40164, l = 0, h = 52210;
701
701
  for (let u = 0; u < i.length; u++)
702
- e ^= i.charCodeAt(u), t = e * 435, s = n * 435, o = r * 435, l = h * 435, o += e << 8, l += n << 8, s += t >>> 16, e = t & 65535, o += s >>> 16, n = s & 65535, h = l + (o >>> 16) & 65535, r = o & 65535;
703
- return w[h >> 8] + w[h & 255] + w[r >> 8] + w[r & 255] + w[n >> 8] + w[n & 255] + w[e >> 8] + w[e & 255];
702
+ e ^= i.charCodeAt(u), t = e * 435, s = o * 435, n = r * 435, l = h * 435, n += e << 8, l += o << 8, s += t >>> 16, e = t & 65535, n += s >>> 16, o = s & 65535, h = l + (n >>> 16) & 65535, r = n & 65535;
703
+ return w[h >> 8] + w[h & 255] + w[r >> 8] + w[r & 255] + w[o >> 8] + w[o & 255] + w[e >> 8] + w[e & 255];
704
704
  }
705
705
  /**
706
706
  * @license
707
707
  * Copyright 2020 Google LLC
708
708
  * SPDX-License-Identifier: BSD-3-Clause
709
709
  */
710
- const we = "", Ee = "h", Ae = "s";
711
- function $e(i, t) {
712
- return (t ? Ee : Ae) + be(typeof i == "string" ? i : i.join(we));
710
+ const Ae = "", $e = "h", Se = "s";
711
+ function Le(i, t) {
712
+ return (t ? $e : Se) + Ee(typeof i == "string" ? i : i.join(Ae));
713
713
  }
714
714
  /**
715
715
  * @license
716
716
  * Copyright 2021 Google LLC
717
717
  * SPDX-License-Identifier: BSD-3-Clause
718
718
  */
719
- const Rt = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new Map();
719
+ const Ot = /* @__PURE__ */ new WeakMap(), It = /* @__PURE__ */ new Map();
720
720
  function Me(i, t, e) {
721
721
  if (i) {
722
- const s = (e == null ? void 0 : e.id) ?? Le(t), n = i[s];
723
- if (n) {
724
- if (typeof n == "string")
725
- return n;
726
- if ("strTag" in n)
727
- return zt(
728
- n.strings,
722
+ const s = (e == null ? void 0 : e.id) ?? ke(t), o = i[s];
723
+ if (o) {
724
+ if (typeof o == "string")
725
+ return o;
726
+ if ("strTag" in o)
727
+ return Bt(
728
+ o.strings,
729
729
  // Cast `template` because its type wasn't automatically narrowed (but
730
730
  // we know it must be the same type as `localized`).
731
731
  t.values,
732
- n.values
732
+ o.values
733
733
  );
734
734
  {
735
- let o = Rt.get(n);
736
- return o === void 0 && (o = n.values, Rt.set(n, o)), {
737
- ...n,
738
- values: o.map((r) => t.values[r])
735
+ let n = Ot.get(o);
736
+ return n === void 0 && (n = o.values, Ot.set(o, n)), {
737
+ ...o,
738
+ values: n.map((r) => t.values[r])
739
739
  };
740
740
  }
741
741
  }
742
742
  }
743
- return Nt(t);
743
+ return Zt(t);
744
744
  }
745
- function Le(i) {
745
+ function ke(i) {
746
746
  const t = typeof i == "string" ? i : i.strings;
747
- let e = Tt.get(t);
748
- return e === void 0 && (e = $e(t, typeof i != "string" && !("strTag" in i)), Tt.set(t, e)), e;
747
+ let e = It.get(t);
748
+ return e === void 0 && (e = Le(t, typeof i != "string" && !("strTag" in i)), It.set(t, e)), e;
749
749
  }
750
750
  /**
751
751
  * @license
752
752
  * Copyright 2021 Google LLC
753
753
  * SPDX-License-Identifier: BSD-3-Clause
754
754
  */
755
- function ht(i) {
756
- window.dispatchEvent(new CustomEvent(dt, { detail: i }));
755
+ function ct(i) {
756
+ window.dispatchEvent(new CustomEvent(pt, { detail: i }));
757
757
  }
758
- let tt = "", ct, Zt, et, pt, jt, L = new Bt();
758
+ let et = "", dt, Gt, it, ut, Wt, L = new jt();
759
759
  L.resolve();
760
- let K = 0;
761
- const Se = (i) => (_e((t, e) => Me(jt, t, e)), tt = Zt = i.sourceLocale, et = new Set(i.targetLocales), et.add(i.sourceLocale), pt = i.loadLocale, { getLocale: ke, setLocale: Re }), ke = () => tt, Re = (i) => {
762
- if (i === (ct ?? tt))
760
+ let Q = 0;
761
+ const Re = (i) => (Ce((t, e) => Me(Wt, t, e)), et = Gt = i.sourceLocale, it = new Set(i.targetLocales), it.add(i.sourceLocale), ut = i.loadLocale, { getLocale: Te, setLocale: Oe }), Te = () => et, Oe = (i) => {
762
+ if (i === (dt ?? et))
763
763
  return L.promise;
764
- if (!et || !pt)
764
+ if (!it || !ut)
765
765
  throw new Error("Internal error");
766
- if (!et.has(i))
766
+ if (!it.has(i))
767
767
  throw new Error("Invalid locale code");
768
- K++;
769
- const t = K;
770
- return ct = i, L.settled && (L = new Bt()), ht({ status: "loading", loadingLocale: i }), (i === Zt ? (
768
+ Q++;
769
+ const t = Q;
770
+ return dt = i, L.settled && (L = new jt()), ct({ status: "loading", loadingLocale: i }), (i === Gt ? (
771
771
  // We could switch to the source locale synchronously, but we prefer to
772
772
  // queue it on a microtask so that switching locales is consistently
773
773
  // asynchronous.
774
774
  Promise.resolve({ templates: void 0 })
775
- ) : pt(i)).then((s) => {
776
- K === t && (tt = i, ct = void 0, jt = s.templates, ht({ status: "ready", readyLocale: i }), L.resolve());
775
+ ) : ut(i)).then((s) => {
776
+ Q === t && (et = i, dt = void 0, Wt = s.templates, ct({ status: "ready", readyLocale: i }), L.resolve());
777
777
  }, (s) => {
778
- K === t && (ht({
778
+ Q === t && (ct({
779
779
  status: "error",
780
780
  errorLocale: i,
781
781
  errorMessage: s.toString()
782
782
  }), L.reject(s));
783
783
  }), L.promise;
784
- }, Gt = "en", Te = [
784
+ }, qt = "en", Ie = [
785
+ "es-MX",
785
786
  "pt-BR"
786
787
  ];
787
788
  /**
@@ -789,8 +790,8 @@ const Se = (i) => (_e((t, e) => Me(jt, t, e)), tt = Zt = i.sourceLocale, et = ne
789
790
  * Copyright 2017 Google LLC
790
791
  * SPDX-License-Identifier: BSD-3-Clause
791
792
  */
792
- const Oe = { ATTRIBUTE: 1 }, Ie = (i) => (...t) => ({ _$litDirective$: i, values: t });
793
- class De {
793
+ const De = { ATTRIBUTE: 1 }, He = (i) => (...t) => ({ _$litDirective$: i, values: t });
794
+ class Pe {
794
795
  constructor(t) {
795
796
  }
796
797
  get _$AU() {
@@ -811,34 +812,34 @@ class De {
811
812
  * Copyright 2018 Google LLC
812
813
  * SPDX-License-Identifier: BSD-3-Clause
813
814
  */
814
- const He = Ie(class extends De {
815
+ const Ue = He(class extends Pe {
815
816
  constructor(i) {
816
817
  var t;
817
- if (super(i), i.type !== Oe.ATTRIBUTE || i.name !== "class" || ((t = i.strings) == null ? void 0 : t.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
818
+ if (super(i), i.type !== De.ATTRIBUTE || i.name !== "class" || ((t = i.strings) == null ? void 0 : t.length) > 2) throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.");
818
819
  }
819
820
  render(i) {
820
821
  return " " + Object.keys(i).filter((t) => i[t]).join(" ") + " ";
821
822
  }
822
823
  update(i, [t]) {
823
- var s, n;
824
+ var s, o;
824
825
  if (this.st === void 0) {
825
- this.st = /* @__PURE__ */ new Set(), i.strings !== void 0 && (this.nt = new Set(i.strings.join(" ").split(/\s/).filter((o) => o !== "")));
826
- for (const o in t) t[o] && !((s = this.nt) != null && s.has(o)) && this.st.add(o);
826
+ this.st = /* @__PURE__ */ new Set(), i.strings !== void 0 && (this.nt = new Set(i.strings.join(" ").split(/\s/).filter((n) => n !== "")));
827
+ for (const n in t) t[n] && !((s = this.nt) != null && s.has(n)) && this.st.add(n);
827
828
  return this.render(t);
828
829
  }
829
830
  const e = i.element.classList;
830
- for (const o of this.st) o in t || (e.remove(o), this.st.delete(o));
831
- for (const o in t) {
832
- const r = !!t[o];
833
- r === this.st.has(o) || (n = this.nt) != null && n.has(o) || (r ? (e.add(o), this.st.add(o)) : (e.remove(o), this.st.delete(o)));
831
+ for (const n of this.st) n in t || (e.remove(n), this.st.delete(n));
832
+ for (const n in t) {
833
+ const r = !!t[n];
834
+ r === this.st.has(n) || (o = this.nt) != null && o.has(n) || (r ? (e.add(n), this.st.add(n)) : (e.remove(n), this.st.delete(n)));
834
835
  }
835
836
  return T;
836
837
  }
837
838
  });
838
- var Pe = Object.defineProperty, Ue = Object.getOwnPropertyDescriptor, q = (i, t, e, s) => {
839
- for (var n = s > 1 ? void 0 : s ? Ue(t, e) : t, o = i.length - 1, r; o >= 0; o--)
840
- (r = i[o]) && (n = (s ? r(t, e, n) : r(n)) || n);
841
- return s && n && Pe(t, e, n), n;
839
+ var Ve = Object.defineProperty, Fe = Object.getOwnPropertyDescriptor, Y = (i, t, e, s) => {
840
+ for (var o = s > 1 ? void 0 : s ? Fe(t, e) : t, n = i.length - 1, r; n >= 0; n--)
841
+ (r = i[n]) && (o = (s ? r(t, e, o) : r(o)) || o);
842
+ return s && o && Ve(t, e, o), o;
842
843
  };
843
844
  let O = class extends C {
844
845
  constructor() {
@@ -859,7 +860,7 @@ let O = class extends C {
859
860
  `;
860
861
  }
861
862
  };
862
- O.styles = P`
863
+ O.styles = U`
863
864
  :host {
864
865
  display: block;
865
866
  width: 100%;
@@ -940,27 +941,27 @@ O.styles = P`
940
941
  }
941
942
  }
942
943
  `;
943
- q([
944
+ Y([
944
945
  d({ type: String })
945
946
  ], O.prototype, "type", 2);
946
- q([
947
+ Y([
947
948
  d({ type: String })
948
949
  ], O.prototype, "label", 2);
949
- q([
950
+ Y([
950
951
  d({ type: Boolean })
951
952
  ], O.prototype, "disabled", 2);
952
- q([
953
+ Y([
953
954
  d({ type: String })
954
955
  ], O.prototype, "variant", 2);
955
- O = q([
956
- U("xact-button")
956
+ O = Y([
957
+ V("xact-button")
957
958
  ], O);
958
- var Ve = Object.defineProperty, Fe = Object.getOwnPropertyDescriptor, nt = (i, t, e, s) => {
959
- for (var n = s > 1 ? void 0 : s ? Fe(t, e) : t, o = i.length - 1, r; o >= 0; o--)
960
- (r = i[o]) && (n = (s ? r(t, e, n) : r(n)) || n);
961
- return s && n && Ve(t, e, n), n;
959
+ var ze = Object.defineProperty, Ne = Object.getOwnPropertyDescriptor, nt = (i, t, e, s) => {
960
+ for (var o = s > 1 ? void 0 : s ? Ne(t, e) : t, n = i.length - 1, r; n >= 0; n--)
961
+ (r = i[n]) && (o = (s ? r(t, e, o) : r(o)) || o);
962
+ return s && o && ze(t, e, o), o;
962
963
  };
963
- let H = class extends C {
964
+ let P = class extends C {
964
965
  constructor() {
965
966
  super(...arguments), this.height = 0, this.brandName = "", this.handleStart = () => {
966
967
  var t;
@@ -1011,7 +1012,7 @@ let H = class extends C {
1011
1012
  </div>
1012
1013
 
1013
1014
  <p class="disclaimer">
1014
- ${a("By using Xactsize, you agree to our Terms and Privacy Policy.")}
1015
+ ${a("By using")} Xactsize, ${a("you agree to our Terms and Privacy Policy.")}
1015
1016
  </p>
1016
1017
  </div>
1017
1018
  `;
@@ -1032,7 +1033,7 @@ let H = class extends C {
1032
1033
  `;
1033
1034
  }
1034
1035
  };
1035
- H.styles = P`
1036
+ P.styles = U`
1036
1037
  :host {
1037
1038
  display: block;
1038
1039
  font-family: 'Inter', 'Helvetica', Arial, sans-serif;
@@ -1210,23 +1211,23 @@ H.styles = P`
1210
1211
  `;
1211
1212
  nt([
1212
1213
  d({ type: Number })
1213
- ], H.prototype, "height", 2);
1214
+ ], P.prototype, "height", 2);
1214
1215
  nt([
1215
1216
  d({ type: String })
1216
- ], H.prototype, "brandName", 2);
1217
+ ], P.prototype, "brandName", 2);
1217
1218
  nt([
1218
1219
  d({ type: Function })
1219
- ], H.prototype, "onStartMeasurement", 2);
1220
- H = nt([
1221
- U("xact-step-one"),
1222
- W()
1223
- ], H);
1224
- var ze = Object.getOwnPropertyDescriptor, Ne = (i, t, e, s) => {
1225
- for (var n = s > 1 ? void 0 : s ? ze(t, e) : t, o = i.length - 1, r; o >= 0; o--)
1226
- (r = i[o]) && (n = r(n) || n);
1227
- return n;
1220
+ ], P.prototype, "onStartMeasurement", 2);
1221
+ P = nt([
1222
+ V("xact-step-one"),
1223
+ q()
1224
+ ], P);
1225
+ var Be = Object.getOwnPropertyDescriptor, Ze = (i, t, e, s) => {
1226
+ for (var o = s > 1 ? void 0 : s ? Be(t, e) : t, n = i.length - 1, r; n >= 0; n--)
1227
+ (r = i[n]) && (o = r(o) || o);
1228
+ return o;
1228
1229
  };
1229
- let ut = class extends C {
1230
+ let ft = class extends C {
1230
1231
  render() {
1231
1232
  return g`
1232
1233
  <footer class="modal-footer">
@@ -1274,7 +1275,7 @@ let ut = class extends C {
1274
1275
  `;
1275
1276
  }
1276
1277
  };
1277
- ut.styles = P`
1278
+ ft.styles = U`
1278
1279
  .modal-footer {
1279
1280
  text-align: center;
1280
1281
  font-size: 12px;
@@ -1311,14 +1312,14 @@ ut.styles = P`
1311
1312
  outline-offset: 2px;
1312
1313
  }
1313
1314
  `;
1314
- ut = Ne([
1315
- U("xact-footer"),
1316
- W()
1317
- ], ut);
1318
- var Be = Object.defineProperty, Ze = Object.getOwnPropertyDescriptor, v = (i, t, e, s) => {
1319
- for (var n = s > 1 ? void 0 : s ? Ze(t, e) : t, o = i.length - 1, r; o >= 0; o--)
1320
- (r = i[o]) && (n = (s ? r(t, e, n) : r(n)) || n);
1321
- return s && n && Be(t, e, n), n;
1315
+ ft = Ze([
1316
+ V("xact-footer"),
1317
+ q()
1318
+ ], ft);
1319
+ var je = Object.defineProperty, Ge = Object.getOwnPropertyDescriptor, v = (i, t, e, s) => {
1320
+ for (var o = s > 1 ? void 0 : s ? Ge(t, e) : t, n = i.length - 1, r; n >= 0; n--)
1321
+ (r = i[n]) && (o = (s ? r(t, e, o) : r(o)) || o);
1322
+ return s && o && je(t, e, o), o;
1322
1323
  };
1323
1324
  let x = class extends C {
1324
1325
  constructor() {
@@ -1331,7 +1332,7 @@ let x = class extends C {
1331
1332
  <img
1332
1333
  class="product-image"
1333
1334
  src="${this.generatedImageUrl || this.garmentUrl}"
1334
- alt="${this.productName || "Product"}"
1335
+ alt="${this.productName || a("Product")}"
1335
1336
  />
1336
1337
 
1337
1338
  <!-- Badge com fundo e texto -->
@@ -1443,7 +1444,7 @@ let x = class extends C {
1443
1444
  `;
1444
1445
  }
1445
1446
  };
1446
- x.styles = P`
1447
+ x.styles = U`
1447
1448
  :host {
1448
1449
  display: flex;
1449
1450
  flex-direction: column;
@@ -1554,15 +1555,15 @@ v([
1554
1555
  d({ type: Function })
1555
1556
  ], x.prototype, "onRetry", 2);
1556
1557
  x = v([
1557
- U("xact-step-result"),
1558
- W()
1558
+ V("xact-step-result"),
1559
+ q()
1559
1560
  ], x);
1560
- var je = Object.defineProperty, Ge = Object.getOwnPropertyDescriptor, xt = (i, t, e, s) => {
1561
- for (var n = s > 1 ? void 0 : s ? Ge(t, e) : t, o = i.length - 1, r; o >= 0; o--)
1562
- (r = i[o]) && (n = (s ? r(t, e, n) : r(n)) || n);
1563
- return s && n && je(t, e, n), n;
1561
+ var We = Object.defineProperty, qe = Object.getOwnPropertyDescriptor, vt = (i, t, e, s) => {
1562
+ for (var o = s > 1 ? void 0 : s ? qe(t, e) : t, n = i.length - 1, r; n >= 0; n--)
1563
+ (r = i[n]) && (o = (s ? r(t, e, o) : r(o)) || o);
1564
+ return s && o && We(t, e, o), o;
1564
1565
  };
1565
- let j = class extends C {
1566
+ let G = class extends C {
1566
1567
  constructor() {
1567
1568
  super(...arguments), this.height = 0;
1568
1569
  }
@@ -1711,17 +1712,17 @@ let j = class extends C {
1711
1712
  </div>
1712
1713
  <div class="snow-layer">
1713
1714
  ${i.map((t) => {
1714
- const e = t * 37 % 100, s = t % 6 * 0.35, n = t % 5 * 0.4;
1715
+ const e = t * 37 % 100, s = t % 6 * 0.35, o = t % 5 * 0.4;
1715
1716
  return g`<span
1716
1717
  class="snowflake"
1717
- style="left:${e}%; animation-delay:${s}s, ${n}s;"
1718
+ style="left:${e}%; animation-delay:${s}s, ${o}s;"
1718
1719
  ></span>`;
1719
1720
  })}
1720
1721
  </div>
1721
1722
  `;
1722
1723
  }
1723
1724
  };
1724
- j.styles = P`
1725
+ G.styles = U`
1725
1726
  :host {
1726
1727
  display: flex;
1727
1728
  justify-content: center;
@@ -1913,20 +1914,19 @@ j.styles = P`
1913
1914
  }
1914
1915
 
1915
1916
  `;
1916
- xt([
1917
+ vt([
1917
1918
  d({ type: Number })
1918
- ], j.prototype, "height", 2);
1919
- xt([
1919
+ ], G.prototype, "height", 2);
1920
+ vt([
1920
1921
  d({ type: Function })
1921
- ], j.prototype, "onStep2advancement", 2);
1922
- j = xt([
1923
- U("xact-step-informs"),
1924
- W()
1925
- ], j);
1926
- const Ot = "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", We = "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", qe = "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";
1927
- class Ye {
1922
+ ], G.prototype, "onStep2advancement", 2);
1923
+ G = vt([
1924
+ V("xact-step-informs"),
1925
+ q()
1926
+ ], G);
1927
+ const Dt = "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", Ye = "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", Ke = "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", D = class D {
1928
1928
  constructor() {
1929
- this.audioContext = null, this.playbackCtx = null, this.stream = null, this.processor = null, this.source = null, this.audioPlaybackQueue = [], this.isPlaying = !1;
1929
+ this.audioContext = null, this.playbackCtx = null, this.stream = null, this.processor = null, this.source = null, this.audioPlaybackQueue = [], this.isPlaying = !1, this.isUserSpeaking = !1, this.speechTimeout = null;
1930
1930
  }
1931
1931
  get isPlaybackActive() {
1932
1932
  return this.isPlaying || this.audioPlaybackQueue.length > 0;
@@ -1936,8 +1936,15 @@ class Ye {
1936
1936
  this.stream = await navigator.mediaDevices.getUserMedia({
1937
1937
  audio: { sampleRate: 16e3, channelCount: 1, echoCancellation: !0 }
1938
1938
  }), this.audioContext = new AudioContext({ sampleRate: 16e3 }), this.source = this.audioContext.createMediaStreamSource(this.stream), this.processor = this.audioContext.createScriptProcessor(4096, 1, 1), this.processor.onaudioprocess = (e) => {
1939
- const s = e.inputBuffer.getChannelData(0), n = this.float32ToInt16(s);
1940
- t(n.buffer);
1939
+ const s = e.inputBuffer.getChannelData(0);
1940
+ let o = 0;
1941
+ for (let l = 0; l < s.length; l++)
1942
+ o += s[l] * s[l];
1943
+ Math.sqrt(o / s.length) > D.SPEECH_THRESHOLD && (this.isUserSpeaking = !0, this.speechTimeout && clearTimeout(this.speechTimeout), this.speechTimeout = window.setTimeout(() => {
1944
+ this.isUserSpeaking = !1;
1945
+ }, D.SPEECH_HOLD_TIME));
1946
+ const r = this.float32ToInt16(s);
1947
+ t(r.buffer);
1941
1948
  }, this.source.connect(this.processor), this.processor.connect(this.audioContext.destination);
1942
1949
  } catch (e) {
1943
1950
  console.error("Microphone access denied or error:", e);
@@ -1946,8 +1953,8 @@ class Ye {
1946
1953
  float32ToInt16(t) {
1947
1954
  const e = new Int16Array(t.length);
1948
1955
  for (let s = 0; s < t.length; s++) {
1949
- const n = Math.max(-1, Math.min(1, t[s]));
1950
- e[s] = n < 0 ? n * 32768 : n * 32767;
1956
+ const o = Math.max(-1, Math.min(1, t[s]));
1957
+ e[s] = o < 0 ? o * 32768 : o * 32767;
1951
1958
  }
1952
1959
  return e;
1953
1960
  }
@@ -1965,12 +1972,12 @@ class Ye {
1965
1972
  const e = new Int16Array(t), s = new Float32Array(e.length);
1966
1973
  for (let r = 0; r < e.length; r++)
1967
1974
  s[r] = e[r] / 32767;
1968
- const n = this.playbackCtx.createBuffer(1, s.length, 24e3);
1969
- n.copyToChannel(s, 0);
1970
- const o = this.playbackCtx.createBufferSource();
1971
- o.buffer = n, o.connect(this.playbackCtx.destination), o.onended = () => {
1975
+ const o = this.playbackCtx.createBuffer(1, s.length, 24e3);
1976
+ o.copyToChannel(s, 0);
1977
+ const n = this.playbackCtx.createBufferSource();
1978
+ n.buffer = o, n.connect(this.playbackCtx.destination), n.onended = () => {
1972
1979
  this.isPlaying = !1, this.audioPlaybackQueue.length === 0 && this.onQueueDrained && this.onQueueDrained(), this.playNextChunk();
1973
- }, o.start();
1980
+ }, n.start();
1974
1981
  }
1975
1982
  clearPlaybackQueue() {
1976
1983
  this.audioPlaybackQueue = [];
@@ -1978,20 +1985,29 @@ class Ye {
1978
1985
  stopAll() {
1979
1986
  this.clearPlaybackQueue(), this.processor && this.source && (this.processor.disconnect(), this.source.disconnect()), this.stream && (this.stream.getTracks().forEach((t) => t.stop()), this.stream = null), this.audioContext && (this.audioContext.close(), this.audioContext = null), this.playbackCtx && (this.playbackCtx.close(), this.playbackCtx = null);
1980
1987
  }
1981
- }
1982
- const it = class it {
1983
- constructor(t, e) {
1984
- this.ws = null, this.introSent = !1, this.introComplete = !1, this.lastCvError = "", this.lastCvErrorTime = 0, this.measurementComplete = !1, this.apiUrl = t, this.apiKey = e, this.audioManager = new Ye();
1988
+ };
1989
+ D.SPEECH_THRESHOLD = 0.02, D.SPEECH_HOLD_TIME = 1500;
1990
+ let mt = D;
1991
+ const st = class st {
1992
+ constructor(t, e, s = "en") {
1993
+ this.ws = null, this.introSent = !1, this.introComplete = !1, this.lastCvError = "", this.lastCvErrorTime = 0, this.measurementComplete = !1, this.isDisconnected = !1, this.apiUrl = t, this.apiKey = e, this.localeCode = s, this.audioManager = new mt();
1985
1994
  }
1986
1995
  async connect() {
1987
1996
  try {
1988
- const t = await fetch(`${this.apiUrl}/api/ConversationalAI/ticket`, {
1989
- method: "POST",
1990
- headers: {
1991
- "Content-Type": "application/json",
1992
- "X-Api-Key": this.apiKey
1997
+ const t = await fetch(
1998
+ `${this.apiUrl}/api/ConversationalAI/ticket`,
1999
+ {
2000
+ method: "POST",
2001
+ headers: {
2002
+ "Content-Type": "application/json",
2003
+ "X-Api-Key": this.apiKey
2004
+ }
1993
2005
  }
1994
- });
2006
+ );
2007
+ if (this.isDisconnected) {
2008
+ console.log("AI session was disconnected before ticket response.");
2009
+ return;
2010
+ }
1995
2011
  if (!t.ok) {
1996
2012
  console.error("Failed to get ticket", t.statusText);
1997
2013
  return;
@@ -2001,11 +2017,19 @@ const it = class it {
2001
2017
  console.error("Invalid ticket response");
2002
2018
  return;
2003
2019
  }
2004
- const s = "wss://conversational-ai-service-923169850574.southamerica-east1.run.app", n = crypto.randomUUID(), o = `${s}/ws/chat/${n}/${e.ticket_id}`;
2005
- this.ws = new WebSocket(o), this.ws.binaryType = "arraybuffer", this.ws.onopen = () => {
2006
- console.log("AI session connected."), !this.introSent && this.ws && this.ws.readyState === WebSocket.OPEN && (this.introSent = !0, this.ws.send(JSON.stringify({
2007
- cv_alert: "Measurement process started!"
2008
- })));
2020
+ if (this.isDisconnected) {
2021
+ console.log(
2022
+ "AI session was disconnected before websocket could be opened."
2023
+ );
2024
+ return;
2025
+ }
2026
+ const s = "wss://conversational-ai-service-923169850574.southamerica-east1.run.app", o = crypto.randomUUID(), n = `${s}/ws/chat/${o}/${e.ticket_id}`;
2027
+ this.ws = new WebSocket(n), this.ws.binaryType = "arraybuffer", this.ws.onopen = () => {
2028
+ console.log("AI session connected."), !this.introSent && this.ws && this.ws.readyState === WebSocket.OPEN && (this.introSent = !0, this.ws.send(
2029
+ JSON.stringify({
2030
+ cv_alert: `Measurement process started! The user speaks ${this.localeCode}.`
2031
+ })
2032
+ ));
2009
2033
  }, this.ws.onmessage = (r) => {
2010
2034
  if (r.data instanceof ArrayBuffer) {
2011
2035
  this.audioManager.queueAudio(r.data);
@@ -2044,7 +2068,9 @@ const it = class it {
2044
2068
  if (!this.introComplete) {
2045
2069
  this.audioManager.onQueueDrained = () => {
2046
2070
  this.audioManager.onQueueDrained = void 0, this.introComplete = !0, console.log("AI introduction audio finished. CV errors now enabled.");
2047
- }, this.audioManager.isPlaybackActive || (this.audioManager.onQueueDrained = void 0, this.introComplete = !0, console.log("AI introduction complete (no audio). CV errors now enabled."));
2071
+ }, this.audioManager.isPlaybackActive || (this.audioManager.onQueueDrained = void 0, this.introComplete = !0, console.log(
2072
+ "AI introduction complete (no audio). CV errors now enabled."
2073
+ ));
2048
2074
  return;
2049
2075
  }
2050
2076
  if (this.measurementComplete) {
@@ -2060,34 +2086,36 @@ const it = class it {
2060
2086
  }));
2061
2087
  }
2062
2088
  forwardCvError(t) {
2063
- if (!this.introComplete || this.measurementComplete) return;
2064
- const e = Date.now(), s = t === this.lastCvError, n = e - this.lastCvErrorTime < it.CV_ERROR_THROTTLE_MS;
2065
- s && n || (this.lastCvError = t, this.lastCvErrorTime = e, this.ws && this.ws.readyState === WebSocket.OPEN && this.ws.send(JSON.stringify({ cv_alert: t })));
2089
+ if (!this.introComplete || this.measurementComplete || this.audioManager.isUserSpeaking) return;
2090
+ const e = Date.now(), s = t === this.lastCvError, o = e - this.lastCvErrorTime < st.CV_ERROR_THROTTLE_MS;
2091
+ s && o || (this.lastCvError = t, this.lastCvErrorTime = e, this.ws && this.ws.readyState === WebSocket.OPEN && this.ws.send(JSON.stringify({ cv_alert: t })));
2066
2092
  }
2067
2093
  notifySuccess(t, e = "") {
2068
- this.measurementComplete = !0, this.audioManager.clearPlaybackQueue(), console.log("Sending success message to AI session", t, e), this.ws && this.ws.readyState === WebSocket.OPEN && this.ws.send(JSON.stringify({
2069
- cv_alert: `SYSTEM ALERT: Measurement is complete! Recommended size: ${t}. ${e ? `Extra context: ${e}. ` : ""}INSTRUCTION: Embody your persona! Enthusiastically reveal their size, offer a quick fashion compliment, and gracefully say goodbye.`
2070
- }));
2094
+ this.measurementComplete = !0, this.audioManager.clearPlaybackQueue(), console.log("Sending success message to AI session", t, e), this.ws && this.ws.readyState === WebSocket.OPEN && this.ws.send(
2095
+ JSON.stringify({
2096
+ cv_alert: `SYSTEM ALERT: Measurement is complete! Recommended size: ${t}. ${e ? `Extra context: ${e}. ` : ""}INSTRUCTION: Embody your persona! Enthusiastically reveal their size, offer a quick fashion compliment, and gracefully say goodbye.`
2097
+ })
2098
+ );
2071
2099
  }
2072
2100
  disconnect() {
2073
- this.audioManager.stopAll(), this.ws && (this.ws.close(1e3, "Measurement complete"), this.ws = null);
2101
+ this.isDisconnected = !0, this.audioManager.stopAll(), this.ws && (this.ws.close(1e3, "Measurement complete"), this.ws = null);
2074
2102
  }
2075
2103
  };
2076
- it.CV_ERROR_THROTTLE_MS = 6e3;
2077
- let ft = it;
2078
- var Ke = Object.defineProperty, Qe = Object.getOwnPropertyDescriptor, p = (i, t, e, s) => {
2079
- for (var n = s > 1 ? void 0 : s ? Qe(t, e) : t, o = i.length - 1, r; o >= 0; o--)
2080
- (r = i[o]) && (n = (s ? r(t, e, n) : r(n)) || n);
2081
- return s && n && Ke(t, e, n), n;
2104
+ st.CV_ERROR_THROTTLE_MS = 6e3;
2105
+ let gt = st;
2106
+ var Qe = Object.defineProperty, Xe = Object.getOwnPropertyDescriptor, p = (i, t, e, s) => {
2107
+ for (var o = s > 1 ? void 0 : s ? Xe(t, e) : t, n = i.length - 1, r; n >= 0; n--)
2108
+ (r = i[n]) && (o = (s ? r(t, e, o) : r(o)) || o);
2109
+ return s && o && Qe(t, e, o), o;
2082
2110
  };
2083
- const { getLocale: ei, setLocale: It } = Se({
2084
- sourceLocale: Gt,
2085
- targetLocales: Te,
2086
- loadLocale: (i) => Wt(/* @__PURE__ */ Object.assign({ "./generated/locales/pt-BR.ts": () => import("./pt-BR-KsDVLJ-W.mjs") }), `./generated/locales/${i}.ts`, 4)
2111
+ const { getLocale: ii, setLocale: Ht } = Re({
2112
+ sourceLocale: qt,
2113
+ targetLocales: Ie,
2114
+ loadLocale: (i) => Yt(/* @__PURE__ */ Object.assign({ "./generated/locales/es-MX.ts": () => import("./es-MX-Bc0zxUr_.mjs"), "./generated/locales/pt-BR.ts": () => import("./pt-BR-m4YL1hub.mjs") }), `./generated/locales/${i}.ts`, 4)
2087
2115
  });
2088
2116
  let c = class extends C {
2089
2117
  constructor() {
2090
- super(...arguments), this.spinnerFrame = 0, this.apiKey = "", this.tenantId = "1", this.productSku = "123456", this.baseUrl = "https://xactsize-dotnet-api-923169850574.southamerica-east1.run.app", this.apiUrl = this.baseUrl + "/api/measurer/measure/body", this.vtonUrl = this.baseUrl + "/api/VirtualTryOn/generate", this.garmentUrl = "", this.vton = !1, this.brandName = void 0, this.buttonText = "Find My Size", this._culture = "pt-BR", this.measurerKey = "", this._isLocaleLoading = !1, this.showModal = !1, this.step = 1, this.height = 0, this.recommendedSize = "", this.measurements = {}, this.errorMessage = "", this.instructionMessage = a(
2118
+ super(...arguments), this.spinnerFrame = 0, this.apiKey = "", this.tenantId = "1", this.productSku = "123456", this.baseUrl = "https://xactsize-dotnet-api-923169850574.southamerica-east1.run.app", this.apiUrl = this.baseUrl + "/api/measurer/measure/body", this.vtonUrl = this.baseUrl + "/api/VirtualTryOn/generate", this.garmentUrl = "", this.vton = !1, this.brandName = void 0, this.buttonText = "", this._culture = "pt-BR", this.measurerKey = "", this._isLocaleLoading = !1, this.showModal = !1, this.step = 1, this.height = 0, this.recommendedSize = "", this.measurements = {}, this.errorMessage = "", this.instructionMessage = a(
2091
2119
  "Position yourself in front of the camera"
2092
2120
  ), this.shouldStartMeasurement = !1, this.isLoading = !1, this.isFetching = !1, this.generatedImageUrl = "", this.isVtonFetching = !1, this.vtonError = !1, this.videoElement = null, this.stream = null, this.poolingTimeout = null, this.instructionMessageTimeout = null, this.aiSession = null, this.cameras = [], this.currentCameraId = null, this.snowflakesCache = null;
2093
2121
  }
@@ -2095,7 +2123,7 @@ let c = class extends C {
2095
2123
  this.startSpinnerAnimation();
2096
2124
  }
2097
2125
  startSpinnerAnimation() {
2098
- const i = [qe, We, Ot];
2126
+ const i = [Ke, Ye, Dt];
2099
2127
  this.spinnerInterval = setInterval(() => {
2100
2128
  var e;
2101
2129
  const t = (e = this.shadowRoot) == null ? void 0 : e.querySelector(
@@ -2113,9 +2141,9 @@ let c = class extends C {
2113
2141
  }
2114
2142
  async _applyLocale(i) {
2115
2143
  try {
2116
- this._isLocaleLoading = !0, this.requestUpdate(), await It(i);
2144
+ this._isLocaleLoading = !0, this.requestUpdate(), await Ht(i);
2117
2145
  } catch (t) {
2118
- console.error("Failed to load locale", i, t), await It(Gt);
2146
+ console.error("Failed to load locale", i, t), await Ht(qt);
2119
2147
  } finally {
2120
2148
  this._isLocaleLoading = !1, this.requestUpdate();
2121
2149
  }
@@ -2286,7 +2314,7 @@ let c = class extends C {
2286
2314
  throw new Error("VTON URL is required");
2287
2315
  this.videoElement = this.shadowRoot.querySelector("video");
2288
2316
  try {
2289
- this.stream = await navigator.mediaDevices.getUserMedia({ video: !0 }), this.videoElement && (this.videoElement.srcObject = this.stream, await this.videoElement.play(), await this.loadCameras(), this.aiSession = new ft(this.baseUrl, this.apiKey), await this.aiSession.connect(), this.aiSession.startMicrophone(), this.startPolling());
2317
+ this.stream = await navigator.mediaDevices.getUserMedia({ video: !0 }), this.videoElement && (this.videoElement.srcObject = this.stream, await this.videoElement.play(), await this.loadCameras(), this.aiSession = new gt(this.baseUrl, this.apiKey, this.culture), await this.aiSession.connect(), this.aiSession.startMicrophone(), this.startPolling());
2290
2318
  } catch {
2291
2319
  this.errorMessage = a("Error accessing webcam");
2292
2320
  }
@@ -2322,11 +2350,11 @@ let c = class extends C {
2322
2350
  if (!this.videoElement || !this.stream || this.isFetching) return;
2323
2351
  const s = document.createElement("canvas");
2324
2352
  s.width = this.videoElement.videoWidth, s.height = this.videoElement.videoHeight;
2325
- const n = s.getContext("2d");
2326
- n == null || n.drawImage(this.videoElement, 0, 0, s.width, s.height);
2327
- const o = await new Promise(
2353
+ const o = s.getContext("2d");
2354
+ o == null || o.drawImage(this.videoElement, 0, 0, s.width, s.height);
2355
+ const n = await new Promise(
2328
2356
  (u) => s.toBlob((f) => u(f), "image/jpeg")
2329
- ), r = new File([o], "frame.jpg", { type: "image/jpeg" }), l = new FormData();
2357
+ ), r = new File([n], "frame.jpg", { type: "image/jpeg" }), l = new FormData();
2330
2358
  l.append("image", r), l.append("height", this.height.toString()), l.append("productSku", this.productSku), this.measurerKey && l.append("measurerKey", this.measurerKey);
2331
2359
  try {
2332
2360
  this.isFetching = !0, this.isLoading = !0, this.poolingTimeout && clearTimeout(this.poolingTimeout), this.instructionMessageTimeout && clearTimeout(this.instructionMessageTimeout);
@@ -2344,7 +2372,7 @@ let c = class extends C {
2344
2372
  this.generateVtonImage(r), t.push(f);
2345
2373
  const m = t.length;
2346
2374
  this.instructionMessage = a(
2347
- ge`Scanning... ${m}/${3}`
2375
+ _e`Scanning... ${m}/${3}`
2348
2376
  ), m >= 3 ? (this.processFinalResults(t), this.stopPolling(), this.step = 4) : this.poolingTimeout = setTimeout(e, 500);
2349
2377
  } else
2350
2378
  this.instructionMessage = this.getTranslatedMessage(
@@ -2400,15 +2428,15 @@ let c = class extends C {
2400
2428
  const l = r.chosenSize;
2401
2429
  l && (s[l] = (s[l] || 0) + 1);
2402
2430
  }), console.log("🗳️ Voting Results:", s);
2403
- let n = "", o = 0;
2431
+ let o = "", n = 0;
2404
2432
  for (const [r, l] of Object.entries(s))
2405
- l > o && (o = l, n = r);
2406
- if (console.log(`🏆 WINNER: ${n}`), console.groupEnd(), this.measurements = t, this.recommendedSize = n, this.instructionMessage = a("Measurement successful!"), this.aiSession) {
2433
+ l > n && (n = l, o = r);
2434
+ if (console.log(`🏆 WINNER: ${o}`), console.groupEnd(), this.measurements = t, this.recommendedSize = o, this.instructionMessage = a("Measurement successful!"), this.aiSession) {
2407
2435
  this.aiSession.onTurnComplete = () => {
2408
2436
  this.aiSession = null;
2409
2437
  };
2410
2438
  let r = "";
2411
- this.vton && (this.isVtonFetching ? r = "An image of the user wearing the garment is currently being generated. TELL USER THEIR IMAGE IS GENERATING." : this.generatedImageUrl && (r = "The image has successfully generated. TELL USER: 'Here is your image in the garment'.")), this.aiSession.notifySuccess(n, r);
2439
+ this.vton && (this.isVtonFetching ? r = "An image of the user wearing the garment is currently being generated. TELL USER THEIR IMAGE IS GENERATING." : this.generatedImageUrl && (r = "The image has successfully generated. TELL USER: 'Here is your image in the garment'.")), this.aiSession.notifySuccess(o, r);
2412
2440
  }
2413
2441
  }
2414
2442
  stopPolling() {
@@ -2432,13 +2460,13 @@ let c = class extends C {
2432
2460
  generateSnowflakes() {
2433
2461
  const i = [];
2434
2462
  for (let e = 0; e < 80; e++) {
2435
- const s = Math.random() * 100, n = 8 + Math.random() * 17, o = -Math.random() * 30;
2463
+ const s = Math.random() * 100, o = 8 + Math.random() * 17, n = -Math.random() * 30;
2436
2464
  i.push(
2437
2465
  g`<span
2438
2466
  class="snowflake"
2439
- style="left:${s}%; animation-duration:${n.toFixed(
2467
+ style="left:${s}%; animation-duration:${o.toFixed(
2440
2468
  2
2441
- )}s; animation-delay:${o.toFixed(2)}s;"
2469
+ )}s; animation-delay:${n.toFixed(2)}s;"
2442
2470
  ></span>`
2443
2471
  );
2444
2472
  }
@@ -2453,7 +2481,7 @@ let c = class extends C {
2453
2481
  class="launch-btn"
2454
2482
  style="--brand-primary: #000; --text-inverse: #fff; --brand-primary-hover: #111;"
2455
2483
  @click=${this.openModal}
2456
- label="${this.buttonText}"
2484
+ label="${this.buttonText || a("Find My Size")}"
2457
2485
  ></xact-button>
2458
2486
 
2459
2487
  ${this.showModal ? g`
@@ -2512,13 +2540,13 @@ let c = class extends C {
2512
2540
  <div class="video-overlay-spinner">
2513
2541
  <img
2514
2542
  class="spinner"
2515
- src="${Ot}"
2516
- alt="Carregando"
2543
+ src="${Dt}"
2544
+ alt="${a("Loading")}"
2517
2545
  />
2518
2546
  </div>
2519
2547
 
2520
2548
  <video
2521
- class=${He({
2549
+ class=${Ue({
2522
2550
  error: !this.errorMessage,
2523
2551
  success: !!this.errorMessage
2524
2552
  })}
@@ -2571,7 +2599,7 @@ let c = class extends C {
2571
2599
  `;
2572
2600
  }
2573
2601
  };
2574
- c.styles = P`
2602
+ c.styles = U`
2575
2603
  :host {
2576
2604
  display: block;
2577
2605
  font-family: Arial, sans-serif;
@@ -3215,12 +3243,12 @@ p([
3215
3243
  _()
3216
3244
  ], c.prototype, "currentCameraId", 2);
3217
3245
  c = p([
3218
- U("body-measurer"),
3219
- W()
3246
+ V("body-measurer"),
3247
+ q()
3220
3248
  ], c);
3221
3249
  export {
3222
3250
  c as B,
3223
- It as a,
3224
- ei as g,
3225
- ge as s
3251
+ Ht as a,
3252
+ ii as g,
3253
+ _e as s
3226
3254
  };