@getauthui/core 0.1.11 → 0.1.13

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.
@@ -247,9 +247,9 @@ let et = class extends HTMLElement {
247
247
  }
248
248
  };
249
249
  et.elementStyles = [], et.shadowRootOptions = { mode: "open" }, et[ut("elementProperties")] = /* @__PURE__ */ new Map(), et[ut("finalized")] = /* @__PURE__ */ new Map(), mn?.({ ReactiveElement: et }), (Mt.reactiveElementVersions ??= []).push("2.1.2");
250
- const yi = globalThis, xi = (t) => t, xt = yi.trustedTypes, Ci = xt ? xt.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, Ti = "$lit$", Ve = `lit$${Math.random().toFixed(9).slice(2)}$`, zi = "?" + Ve, bn = `<${zi}>`, Te = document, ft = () => Te.createComment(""), gt = (t) => t === null || typeof t != "object" && typeof t != "function", mi = Array.isArray, wn = (t) => mi(t) || typeof t?.[Symbol.iterator] == "function", Wt = `[
250
+ const yi = globalThis, xi = (t) => t, xt = yi.trustedTypes, Ci = xt ? xt.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, Ti = "$lit$", Ve = `lit$${Math.random().toFixed(9).slice(2)}$`, zi = "?" + Ve, wn = `<${zi}>`, Te = document, ft = () => Te.createComment(""), gt = (t) => t === null || typeof t != "object" && typeof t != "function", mi = Array.isArray, bn = (t) => mi(t) || typeof t?.[Symbol.iterator] == "function", Wt = `[
251
251
  \f\r]`, dt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ui = /-->/g, Ri = />/g, Je = RegExp(`>|${Wt}(?:([^\\s"'>=/]+)(${Wt}*=${Wt}*(?:[^
252
- \f\r"'\`<>=]|("|')|))|$)`, "g"), Mi = /'/g, Ei = /"/g, Oi = /^(?:script|style|textarea|title)$/i, Fi = (t) => (e, ...n) => ({ _$litType$: t, strings: e, values: n }), w = Fi(1), G = Fi(2), nt = /* @__PURE__ */ Symbol.for("lit-noChange"), C = /* @__PURE__ */ Symbol.for("lit-nothing"), qi = /* @__PURE__ */ new WeakMap(), Ze = Te.createTreeWalker(Te, 129);
252
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), Mi = /'/g, Ei = /"/g, Oi = /^(?:script|style|textarea|title)$/i, Fi = (t) => (e, ...n) => ({ _$litType$: t, strings: e, values: n }), b = Fi(1), G = Fi(2), nt = /* @__PURE__ */ Symbol.for("lit-noChange"), C = /* @__PURE__ */ Symbol.for("lit-nothing"), qi = /* @__PURE__ */ new WeakMap(), Ze = Te.createTreeWalker(Te, 129);
253
253
  function en(t, e) {
254
254
  if (!mi(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
255
255
  return Ci !== void 0 ? Ci.createHTML(e) : e;
@@ -262,7 +262,7 @@ const vn = (t, e) => {
262
262
  let c, p, u = -1, m = 0;
263
263
  for (; m < d.length && (s.lastIndex = m, p = s.exec(d), p !== null); ) m = s.lastIndex, s === dt ? p[1] === "!--" ? s = Ui : p[1] !== void 0 ? s = Ri : p[2] !== void 0 ? (Oi.test(p[2]) && (o = RegExp("</" + p[2], "g")), s = Je) : p[3] !== void 0 && (s = Je) : s === Je ? p[0] === ">" ? (s = o ?? dt, u = -1) : p[1] === void 0 ? u = -2 : (u = s.lastIndex - p[2].length, c = p[1], s = p[3] === void 0 ? Je : p[3] === '"' ? Ei : Mi) : s === Ei || s === Mi ? s = Je : s === Ui || s === Ri ? s = dt : (s = Je, o = void 0);
264
264
  const $ = s === Je && t[r + 1].startsWith("/>") ? " " : "";
265
- a += s === dt ? d + bn : u >= 0 ? (i.push(c), d.slice(0, u) + Ti + d.slice(u) + Ve + $) : d + Ve + (u === -2 ? r : $);
265
+ a += s === dt ? d + wn : u >= 0 ? (i.push(c), d.slice(0, u) + Ti + d.slice(u) + Ve + $) : d + Ve + (u === -2 ? r : $);
266
266
  }
267
267
  return [en(t, a + (t[n] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), i];
268
268
  };
@@ -356,7 +356,7 @@ class vt {
356
356
  return this._$AB;
357
357
  }
358
358
  _$AI(e, n = this) {
359
- e = ot(this, e, n), gt(e) ? e === C || e == null || e === "" ? (this._$AH !== C && this._$AR(), this._$AH = C) : e !== this._$AH && e !== nt && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : wn(e) ? this.k(e) : this._(e);
359
+ e = ot(this, e, n), gt(e) ? e === C || e == null || e === "" ? (this._$AH !== C && this._$AR(), this._$AH = C) : e !== this._$AH && e !== nt && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : bn(e) ? this.k(e) : this._(e);
360
360
  }
361
361
  O(e) {
362
362
  return this._$AA.parentNode.insertBefore(e, this._$AB);
@@ -472,7 +472,7 @@ const Pn = (t, e, n) => {
472
472
  }
473
473
  return o._$AI(t), o;
474
474
  };
475
- const bi = globalThis;
475
+ const wi = globalThis;
476
476
  class Qe extends et {
477
477
  constructor() {
478
478
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
@@ -495,10 +495,10 @@ class Qe extends et {
495
495
  return nt;
496
496
  }
497
497
  }
498
- Qe._$litElement$ = !0, Qe.finalized = !0, bi.litElementHydrateSupport?.({ LitElement: Qe });
499
- const xn = bi.litElementPolyfillSupport;
498
+ Qe._$litElement$ = !0, Qe.finalized = !0, wi.litElementHydrateSupport?.({ LitElement: Qe });
499
+ const xn = wi.litElementPolyfillSupport;
500
500
  xn?.({ LitElement: Qe });
501
- (bi.litElementVersions ??= []).push("4.2.2");
501
+ (wi.litElementVersions ??= []).push("4.2.2");
502
502
  const ze = (t) => (e, n) => {
503
503
  n !== void 0 ? n.addInitializer(() => {
504
504
  customElements.define(t, e);
@@ -525,17 +525,17 @@ const Cn = { attribute: !0, type: String, converter: Pt, reflect: !1, hasChanged
525
525
  }
526
526
  throw Error("Unsupported decorator location: " + i);
527
527
  };
528
- function O(t) {
528
+ function F(t) {
529
529
  return (e, n) => typeof n == "object" ? Un(t, e, n) : ((i, o, a) => {
530
530
  const s = o.hasOwnProperty(a);
531
531
  return o.constructor.createProperty(a, i), s ? Object.getOwnPropertyDescriptor(o, a) : void 0;
532
532
  })(t, e, n);
533
533
  }
534
- function D(t) {
535
- return O({ ...t, state: !0, attribute: !1 });
534
+ function N(t) {
535
+ return F({ ...t, state: !0, attribute: !1 });
536
536
  }
537
537
  const Rn = (t, e, n) => (n.configurable = !0, n.enumerable = !0, Reflect.decorate && typeof e != "object" && Object.defineProperty(t, e, n), n);
538
- function wi(t, e) {
538
+ function bi(t, e) {
539
539
  return (n, i, o) => {
540
540
  const a = (s) => s.renderRoot?.querySelector(t) ?? null;
541
541
  return Rn(n, i, { get() {
@@ -562,9 +562,9 @@ function tn() {
562
562
  fractionGroupSeparator: " ",
563
563
  // non-breaking space
564
564
  suffix: ""
565
- }, Ye = "0123456789abcdefghijklmnopqrstuvwxyz", Ht = !0;
565
+ }, Ye = "0123456789abcdefghijklmnopqrstuvwxyz", Dt = !0;
566
566
  function U(l, f) {
567
- var g, k, b, I, j, y, v, S, A = this;
567
+ var g, k, w, I, j, y, v, S, A = this;
568
568
  if (!(A instanceof U)) return new U(l, f);
569
569
  if (f == null) {
570
570
  if (l && l._isBigNumber === !0) {
@@ -584,7 +584,7 @@ function tn() {
584
584
  }
585
585
  (I = S.indexOf(".")) > -1 && (S = S.replace(".", "")), (j = S.search(/e/i)) > 0 ? (I < 0 && (I = j), I += +S.slice(j + 1), S = S.substring(0, j)) : I < 0 && (I = S.length);
586
586
  } else {
587
- if (_(f, 2, Ye.length, "Base"), f == 10 && Ht)
587
+ if (_(f, 2, Ye.length, "Base"), f == 10 && Dt)
588
588
  return A = new U(l), Se(A, Q + A.e + 1, ie);
589
589
  if (S = String(l), y = typeof l == "number") {
590
590
  if (l * 0 != 0) return V(A, S, y, f);
@@ -599,8 +599,8 @@ function tn() {
599
599
  I = v;
600
600
  continue;
601
601
  }
602
- } else if (!b && (S == S.toUpperCase() && (S = S.toLowerCase()) || S == S.toLowerCase() && (S = S.toUpperCase()))) {
603
- b = !0, j = -1, I = 0;
602
+ } else if (!w && (S == S.toUpperCase() && (S = S.toLowerCase()) || S == S.toLowerCase() && (S = S.toUpperCase()))) {
603
+ w = !0, j = -1, I = 0;
604
604
  continue;
605
605
  }
606
606
  return V(A, String(l), y, f);
@@ -656,7 +656,7 @@ function tn() {
656
656
  else throw Error(s + f + " not an object: " + g);
657
657
  if (l.hasOwnProperty(f = "ALPHABET"))
658
658
  if (g = l[f], typeof g == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(g))
659
- Ht = g.slice(0, 10) == "0123456789", Ye = g;
659
+ Dt = g.slice(0, 10) == "0123456789", Ye = g;
660
660
  else
661
661
  throw Error(s + f + " invalid: " + g);
662
662
  } else
@@ -675,20 +675,20 @@ function tn() {
675
675
  }, U.isBigNumber = function(l) {
676
676
  if (!l || l._isBigNumber !== !0) return !1;
677
677
  if (!U.DEBUG) return !0;
678
- var f, g, k = l.c, b = l.e, I = l.s;
678
+ var f, g, k = l.c, w = l.e, I = l.s;
679
679
  e: if ({}.toString.call(k) == "[object Array]") {
680
- if ((I === 1 || I === -1) && b >= -$ && b <= $ && b === a(b)) {
680
+ if ((I === 1 || I === -1) && w >= -$ && w <= $ && w === a(w)) {
681
681
  if (k[0] === 0) {
682
- if (b === 0 && k.length === 1) return !0;
682
+ if (w === 0 && k.length === 1) return !0;
683
683
  break e;
684
684
  }
685
- if (f = (b + 1) % c, f < 1 && (f += c), String(k[0]).length == f) {
685
+ if (f = (w + 1) % c, f < 1 && (f += c), String(k[0]).length == f) {
686
686
  for (f = 0; f < k.length; f++)
687
687
  if (g = k[f], g < 0 || g >= d || g !== a(g)) break e;
688
688
  if (g !== 0) return !0;
689
689
  }
690
690
  }
691
- } else if (k === null && b === null && (I === null || I === 1 || I === -1))
691
+ } else if (k === null && w === null && (I === null || I === 1 || I === -1))
692
692
  return !0;
693
693
  throw Error(s + "Invalid BigNumber: " + l);
694
694
  }, U.maximum = U.max = function() {
@@ -702,11 +702,11 @@ function tn() {
702
702
  return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
703
703
  };
704
704
  return function(g) {
705
- var k, b, I, j, y, v = 0, S = [], A = new U(Y);
705
+ var k, w, I, j, y, v = 0, S = [], A = new U(Y);
706
706
  if (g == null ? g = Q : _(g, 0, $), j = o(g / c), _e)
707
707
  if (crypto.getRandomValues) {
708
708
  for (k = crypto.getRandomValues(new Uint32Array(j *= 2)); v < j; )
709
- y = k[v] * 131072 + (k[v + 1] >>> 11), y >= 9e15 ? (b = crypto.getRandomValues(new Uint32Array(2)), k[v] = b[0], k[v + 1] = b[1]) : (S.push(y % 1e14), v += 2);
709
+ y = k[v] * 131072 + (k[v + 1] >>> 11), y >= 9e15 ? (w = crypto.getRandomValues(new Uint32Array(2)), k[v] = w[0], k[v + 1] = w[1]) : (S.push(y % 1e14), v += 2);
710
710
  v = j / 2;
711
711
  } else if (crypto.randomBytes) {
712
712
  for (k = crypto.randomBytes(j *= 7); v < j; )
@@ -732,28 +732,28 @@ function tn() {
732
732
  return g;
733
733
  }, te = /* @__PURE__ */ (function() {
734
734
  var l = "0123456789";
735
- function f(g, k, b, I) {
735
+ function f(g, k, w, I) {
736
736
  for (var j, y = [0], v, S = 0, A = g.length; S < A; ) {
737
737
  for (v = y.length; v--; y[v] *= k) ;
738
738
  for (y[0] += I.indexOf(g.charAt(S++)), j = 0; j < y.length; j++)
739
- y[j] > b - 1 && (y[j + 1] == null && (y[j + 1] = 0), y[j + 1] += y[j] / b | 0, y[j] %= b);
739
+ y[j] > w - 1 && (y[j + 1] == null && (y[j + 1] = 0), y[j + 1] += y[j] / w | 0, y[j] %= w);
740
740
  }
741
741
  return y.reverse();
742
742
  }
743
- return function(g, k, b, I, j) {
743
+ return function(g, k, w, I, j) {
744
744
  var y, v, S, A, x, B, X, ne, ue = g.indexOf("."), ge = Q, ee = ie;
745
745
  for (ue >= 0 && (A = Xe, Xe = 0, g = g.replace(".", ""), ne = new U(k), B = ne.pow(g.length - ue), Xe = A, ne.c = f(
746
746
  ae(W(B.c), B.e, "0"),
747
747
  10,
748
- b,
748
+ w,
749
749
  l
750
- ), ne.e = ne.c.length), X = f(g, k, b, j ? (y = Ye, l) : (y = l, Ye)), S = A = X.length; X[--A] == 0; X.pop()) ;
750
+ ), ne.e = ne.c.length), X = f(g, k, w, j ? (y = Ye, l) : (y = l, Ye)), S = A = X.length; X[--A] == 0; X.pop()) ;
751
751
  if (!X[0]) return y.charAt(0);
752
- if (ue < 0 ? --S : (B.c = X, B.e = S, B.s = I, B = L(B, ne, ge, ee, b), X = B.c, x = B.r, S = B.e), v = S + ge + 1, ue = X[v], A = b / 2, x = x || v < 0 || X[v + 1] != null, x = ee < 4 ? (ue != null || x) && (ee == 0 || ee == (B.s < 0 ? 3 : 2)) : ue > A || ue == A && (ee == 4 || x || ee == 6 && X[v - 1] & 1 || ee == (B.s < 0 ? 8 : 7)), v < 1 || !X[0])
752
+ if (ue < 0 ? --S : (B.c = X, B.e = S, B.s = I, B = L(B, ne, ge, ee, w), X = B.c, x = B.r, S = B.e), v = S + ge + 1, ue = X[v], A = w / 2, x = x || v < 0 || X[v + 1] != null, x = ee < 4 ? (ue != null || x) && (ee == 0 || ee == (B.s < 0 ? 3 : 2)) : ue > A || ue == A && (ee == 4 || x || ee == 6 && X[v - 1] & 1 || ee == (B.s < 0 ? 8 : 7)), v < 1 || !X[0])
753
753
  g = x ? ae(y.charAt(1), -ge, y.charAt(0)) : y.charAt(0);
754
754
  else {
755
755
  if (X.length = v, x)
756
- for (--b; ++X[--v] > b; )
756
+ for (--w; ++X[--v] > w; )
757
757
  X[v] = 0, v || (++S, X = [1].concat(X));
758
758
  for (A = X.length; !X[--A]; ) ;
759
759
  for (ue = 0, g = ""; ue <= A; g += y.charAt(X[ue++])) ;
@@ -762,40 +762,40 @@ function tn() {
762
762
  return g;
763
763
  };
764
764
  })(), L = /* @__PURE__ */ (function() {
765
- function l(k, b, I) {
766
- var j, y, v, S, A = 0, x = k.length, B = b % m, X = b / m | 0;
765
+ function l(k, w, I) {
766
+ var j, y, v, S, A = 0, x = k.length, B = w % m, X = w / m | 0;
767
767
  for (k = k.slice(); x--; )
768
768
  v = k[x] % m, S = k[x] / m | 0, j = X * v + S * B, y = B * v + j % m * m + A, A = (y / I | 0) + (j / m | 0) + X * S, k[x] = y % I;
769
769
  return A && (k = [A].concat(k)), k;
770
770
  }
771
- function f(k, b, I, j) {
771
+ function f(k, w, I, j) {
772
772
  var y, v;
773
773
  if (I != j)
774
774
  v = I > j ? 1 : -1;
775
775
  else
776
776
  for (y = v = 0; y < I; y++)
777
- if (k[y] != b[y]) {
778
- v = k[y] > b[y] ? 1 : -1;
777
+ if (k[y] != w[y]) {
778
+ v = k[y] > w[y] ? 1 : -1;
779
779
  break;
780
780
  }
781
781
  return v;
782
782
  }
783
- function g(k, b, I, j) {
783
+ function g(k, w, I, j) {
784
784
  for (var y = 0; I--; )
785
- k[I] -= y, y = k[I] < b[I] ? 1 : 0, k[I] = y * j + k[I] - b[I];
785
+ k[I] -= y, y = k[I] < w[I] ? 1 : 0, k[I] = y * j + k[I] - w[I];
786
786
  for (; !k[0] && k.length > 1; k.splice(0, 1)) ;
787
787
  }
788
- return function(k, b, I, j, y) {
789
- var v, S, A, x, B, X, ne, ue, ge, ee, re, we, It, Xt, Vt, Me, ct, $e = k.s == b.s ? 1 : -1, Ie = k.c, pe = b.c;
788
+ return function(k, w, I, j, y) {
789
+ var v, S, A, x, B, X, ne, ue, ge, ee, re, be, It, Xt, Vt, Me, ct, $e = k.s == w.s ? 1 : -1, Ie = k.c, pe = w.c;
790
790
  if (!Ie || !Ie[0] || !pe || !pe[0])
791
791
  return new U(
792
792
  // Return NaN if either NaN, or both Infinity or 0.
793
- !k.s || !b.s || (Ie ? pe && Ie[0] == pe[0] : !pe) ? NaN : (
793
+ !k.s || !w.s || (Ie ? pe && Ie[0] == pe[0] : !pe) ? NaN : (
794
794
  // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.
795
795
  Ie && Ie[0] == 0 || !pe ? $e * 0 : $e / 0
796
796
  )
797
797
  );
798
- for (ue = new U($e), ge = ue.c = [], S = k.e - b.e, $e = I + S + 1, y || (y = d, S = Z(k.e / c) - Z(b.e / c), $e = $e / c | 0), A = 0; pe[A] == (Ie[A] || 0); A++) ;
798
+ for (ue = new U($e), ge = ue.c = [], S = k.e - w.e, $e = I + S + 1, y || (y = d, S = Z(k.e / c) - Z(w.e / c), $e = $e / c | 0), A = 0; pe[A] == (Ie[A] || 0); A++) ;
799
799
  if (pe[A] > (Ie[A] || 0) && S--, $e < 0)
800
800
  ge.push(1), x = !0;
801
801
  else {
@@ -803,7 +803,7 @@ function tn() {
803
803
  ct = pe.slice(), ct = [0].concat(ct), Vt = pe[0], pe[1] >= y / 2 && Vt++;
804
804
  do {
805
805
  if (B = 0, v = f(pe, ee, Me, re), v < 0) {
806
- if (we = ee[0], Me != re && (we = we * y + (ee[1] || 0)), B = a(we / Vt), B > 1)
806
+ if (be = ee[0], Me != re && (be = be * y + (ee[1] || 0)), B = a(be / Vt), B > 1)
807
807
  for (B >= y && (B = y - 1), X = l(pe, B, y), ne = X.length, re = ee.length; f(X, ee, ne, re) == 1; )
808
808
  B--, g(X, Me < ne ? ct : pe, ne, y), ne = X.length, v = 1;
809
809
  else
@@ -824,10 +824,10 @@ function tn() {
824
824
  return ue;
825
825
  };
826
826
  })();
827
- function Dt(l, f, g, k) {
828
- var b, I, j, y, v;
827
+ function Ht(l, f, g, k) {
828
+ var w, I, j, y, v;
829
829
  if (g == null ? g = ie : _(g, 0, 8), !l.c) return l.toString();
830
- if (b = l.c[0], j = l.e, f == null)
830
+ if (w = l.c[0], j = l.e, f == null)
831
831
  v = W(l.c), v = k == 1 || k == 2 && (j <= ce || j >= le) ? J(v, j) : ae(v, j, "0");
832
832
  else if (l = Se(new U(l), f, g), I = l.e, v = W(l.c), y = v.length, k == 1 || k == 2 && (f <= I || I <= ce)) {
833
833
  for (; y < f; v += "0", y++) ;
@@ -836,22 +836,22 @@ function tn() {
836
836
  if (--f > 0) for (v += "."; f--; v += "0") ;
837
837
  } else if (f += I - y, f > 0)
838
838
  for (I + 1 == y && (v += "."); f--; v += "0") ;
839
- return l.s < 0 && b ? "-" + v : v;
839
+ return l.s < 0 && w ? "-" + v : v;
840
840
  }
841
841
  function ki(l, f) {
842
- for (var g, k, b = 1, I = new U(l[0]); b < l.length; b++)
843
- k = new U(l[b]), (!k.s || (g = K(I, k)) === f || g === 0 && I.s === f) && (I = k);
842
+ for (var g, k, w = 1, I = new U(l[0]); w < l.length; w++)
843
+ k = new U(l[w]), (!k.s || (g = K(I, k)) === f || g === 0 && I.s === f) && (I = k);
844
844
  return I;
845
845
  }
846
846
  function Bt(l, f, g) {
847
- for (var k = 1, b = f.length; !f[--b]; f.pop()) ;
848
- for (b = f[0]; b >= 10; b /= 10, k++) ;
847
+ for (var k = 1, w = f.length; !f[--w]; f.pop()) ;
848
+ for (w = f[0]; w >= 10; w /= 10, k++) ;
849
849
  return (g = k + g * c - 1) > ke ? l.c = l.e = null : g < Re ? l.c = [l.e = 0] : (l.e = g, l.c = f), l;
850
850
  }
851
851
  V = /* @__PURE__ */ (function() {
852
- var l = /^(-?)0([xbo])(?=\w[\w.]*$)/i, f = /^([^.]+)\.$/, g = /^\.([^.]+)$/, k = /^-?(Infinity|NaN)$/, b = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
852
+ var l = /^(-?)0([xbo])(?=\w[\w.]*$)/i, f = /^([^.]+)\.$/, g = /^\.([^.]+)$/, k = /^-?(Infinity|NaN)$/, w = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
853
853
  return function(I, j, y, v) {
854
- var S, A = y ? j : j.replace(b, "");
854
+ var S, A = y ? j : j.replace(w, "");
855
855
  if (k.test(A))
856
856
  I.s = isNaN(A) ? null : A < 0 ? -1 : 1;
857
857
  else {
@@ -867,29 +867,29 @@ function tn() {
867
867
  };
868
868
  })();
869
869
  function Se(l, f, g, k) {
870
- var b, I, j, y, v, S, A, x = l.c, B = u;
870
+ var w, I, j, y, v, S, A, x = l.c, B = u;
871
871
  if (x) {
872
872
  e: {
873
- for (b = 1, y = x[0]; y >= 10; y /= 10, b++) ;
874
- if (I = f - b, I < 0)
875
- I += c, j = f, v = x[S = 0], A = a(v / B[b - j - 1] % 10);
873
+ for (w = 1, y = x[0]; y >= 10; y /= 10, w++) ;
874
+ if (I = f - w, I < 0)
875
+ I += c, j = f, v = x[S = 0], A = a(v / B[w - j - 1] % 10);
876
876
  else if (S = o((I + 1) / c), S >= x.length)
877
877
  if (k) {
878
878
  for (; x.length <= S; x.push(0)) ;
879
- v = A = 0, b = 1, I %= c, j = I - c + 1;
879
+ v = A = 0, w = 1, I %= c, j = I - c + 1;
880
880
  } else
881
881
  break e;
882
882
  else {
883
- for (v = y = x[S], b = 1; y >= 10; y /= 10, b++) ;
884
- I %= c, j = I - c + b, A = j < 0 ? 0 : a(v / B[b - j - 1] % 10);
883
+ for (v = y = x[S], w = 1; y >= 10; y /= 10, w++) ;
884
+ I %= c, j = I - c + w, A = j < 0 ? 0 : a(v / B[w - j - 1] % 10);
885
885
  }
886
886
  if (k = k || f < 0 || // Are there any non-zero digits after the rounding digit?
887
887
  // The expression n % pows10[d - j - 1] returns all digits of n to the right
888
888
  // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.
889
- x[S + 1] != null || (j < 0 ? v : v % B[b - j - 1]), k = g < 4 ? (A || k) && (g == 0 || g == (l.s < 0 ? 3 : 2)) : A > 5 || A == 5 && (g == 4 || k || g == 6 && // Check whether the digit to the left of the rounding digit is odd.
890
- (I > 0 ? j > 0 ? v / B[b - j] : 0 : x[S - 1]) % 10 & 1 || g == (l.s < 0 ? 8 : 7)), f < 1 || !x[0])
889
+ x[S + 1] != null || (j < 0 ? v : v % B[w - j - 1]), k = g < 4 ? (A || k) && (g == 0 || g == (l.s < 0 ? 3 : 2)) : A > 5 || A == 5 && (g == 4 || k || g == 6 && // Check whether the digit to the left of the rounding digit is odd.
890
+ (I > 0 ? j > 0 ? v / B[w - j] : 0 : x[S - 1]) % 10 & 1 || g == (l.s < 0 ? 8 : 7)), f < 1 || !x[0])
891
891
  return x.length = 0, k ? (f -= l.e + 1, x[0] = B[(c - f % c) % c], l.e = -f || 0) : x[0] = l.e = 0, l;
892
- if (I == 0 ? (x.length = S, y = 1, S--) : (x.length = S + 1, y = B[c - I], x[S] = j > 0 ? a(v / B[b - j] % B[j]) * y : 0), k)
892
+ if (I == 0 ? (x.length = S, y = 1, S--) : (x.length = S + 1, y = B[c - I], x[S] = j > 0 ? a(v / B[w - j] % B[j]) * y : 0), k)
893
893
  for (; ; )
894
894
  if (S == 0) {
895
895
  for (I = 1, j = x[0]; j >= 10; j /= 10, I++) ;
@@ -916,43 +916,43 @@ function tn() {
916
916
  }, R.comparedTo = function(l, f) {
917
917
  return K(this, new U(l, f));
918
918
  }, R.decimalPlaces = R.dp = function(l, f) {
919
- var g, k, b, I = this;
919
+ var g, k, w, I = this;
920
920
  if (l != null)
921
921
  return _(l, 0, $), f == null ? f = ie : _(f, 0, 8), Se(new U(I), l + I.e + 1, f);
922
922
  if (!(g = I.c)) return null;
923
- if (k = ((b = g.length - 1) - Z(this.e / c)) * c, b = g[b]) for (; b % 10 == 0; b /= 10, k--) ;
923
+ if (k = ((w = g.length - 1) - Z(this.e / c)) * c, w = g[w]) for (; w % 10 == 0; w /= 10, k--) ;
924
924
  return k < 0 && (k = 0), k;
925
925
  }, R.dividedBy = R.div = function(l, f) {
926
926
  return L(this, new U(l, f), Q, ie);
927
927
  }, R.dividedToIntegerBy = R.idiv = function(l, f) {
928
928
  return L(this, new U(l, f), 0, 1);
929
929
  }, R.exponentiatedBy = R.pow = function(l, f) {
930
- var g, k, b, I, j, y, v, S, A, x = this;
930
+ var g, k, w, I, j, y, v, S, A, x = this;
931
931
  if (l = new U(l), l.c && !l.isInteger())
932
932
  throw Error(s + "Exponent not an integer: " + Le(l));
933
933
  if (f != null && (f = new U(f)), y = l.e > 14, !x.c || !x.c[0] || x.c[0] == 1 && !x.e && x.c.length == 1 || !l.c || !l.c[0])
934
- return A = new U(Math.pow(+Le(x), y ? l.s * (2 - N(l)) : +Le(l))), f ? A.mod(f) : A;
934
+ return A = new U(Math.pow(+Le(x), y ? l.s * (2 - D(l)) : +Le(l))), f ? A.mod(f) : A;
935
935
  if (v = l.s < 0, f) {
936
936
  if (f.c ? !f.c[0] : !f.s) return new U(NaN);
937
937
  k = !v && x.isInteger() && f.isInteger(), k && (x = x.mod(f));
938
938
  } else {
939
939
  if (l.e > 9 && (x.e > 0 || x.e < -1 || (x.e == 0 ? x.c[0] > 1 || y && x.c[1] >= 24e7 : x.c[0] < 8e13 || y && x.c[0] <= 9999975e7)))
940
- return I = x.s < 0 && N(l) ? -0 : 0, x.e > -1 && (I = 1 / I), new U(v ? 1 / I : I);
940
+ return I = x.s < 0 && D(l) ? -0 : 0, x.e > -1 && (I = 1 / I), new U(v ? 1 / I : I);
941
941
  Xe && (I = o(Xe / c + 2));
942
942
  }
943
- for (y ? (g = new U(0.5), v && (l.s = 1), S = N(l)) : (b = Math.abs(+Le(l)), S = b % 2), A = new U(Y); ; ) {
943
+ for (y ? (g = new U(0.5), v && (l.s = 1), S = D(l)) : (w = Math.abs(+Le(l)), S = w % 2), A = new U(Y); ; ) {
944
944
  if (S) {
945
945
  if (A = A.times(x), !A.c) break;
946
946
  I ? A.c.length > I && (A.c.length = I) : k && (A = A.mod(f));
947
947
  }
948
- if (b) {
949
- if (b = a(b / 2), b === 0) break;
950
- S = b % 2;
948
+ if (w) {
949
+ if (w = a(w / 2), w === 0) break;
950
+ S = w % 2;
951
951
  } else if (l = l.times(g), Se(l, l.e + 1, 1), l.e > 14)
952
- S = N(l);
952
+ S = D(l);
953
953
  else {
954
- if (b = +Le(l), b === 0) break;
955
- S = b % 2;
954
+ if (w = +Le(l), w === 0) break;
955
+ S = w % 2;
956
956
  }
957
957
  x = x.times(x), I ? x.c && x.c.length > I && (x.c.length = I) : k && (x = x.mod(f));
958
958
  }
@@ -983,7 +983,7 @@ function tn() {
983
983
  }, R.isZero = function() {
984
984
  return !!this.c && this.c[0] == 0;
985
985
  }, R.minus = function(l, f) {
986
- var g, k, b, I, j = this, y = j.s;
986
+ var g, k, w, I, j = this, y = j.s;
987
987
  if (l = new U(l, f), f = l.s, !y || !f) return new U(NaN);
988
988
  if (y != f)
989
989
  return l.s = -f, j.plus(l);
@@ -997,15 +997,15 @@ function tn() {
997
997
  ));
998
998
  }
999
999
  if (v = Z(v), S = Z(S), A = A.slice(), y = v - S) {
1000
- for ((I = y < 0) ? (y = -y, b = A) : (S = v, b = x), b.reverse(), f = y; f--; b.push(0)) ;
1001
- b.reverse();
1000
+ for ((I = y < 0) ? (y = -y, w = A) : (S = v, w = x), w.reverse(), f = y; f--; w.push(0)) ;
1001
+ w.reverse();
1002
1002
  } else
1003
1003
  for (k = (I = (y = A.length) < (f = x.length)) ? y : f, y = f = 0; f < k; f++)
1004
1004
  if (A[f] != x[f]) {
1005
1005
  I = A[f] < x[f];
1006
1006
  break;
1007
1007
  }
1008
- if (I && (b = A, A = x, x = b, l.s = -l.s), f = (k = x.length) - (g = A.length), f > 0) for (; f--; A[g++] = 0) ;
1008
+ if (I && (w = A, A = x, x = w, l.s = -l.s), f = (k = x.length) - (g = A.length), f > 0) for (; f--; A[g++] = 0) ;
1009
1009
  for (f = d - 1; k > y; ) {
1010
1010
  if (A[--k] < x[k]) {
1011
1011
  for (g = k; g && !A[--g]; A[g] = f) ;
@@ -1016,15 +1016,15 @@ function tn() {
1016
1016
  for (; A[0] == 0; A.splice(0, 1), --S) ;
1017
1017
  return A[0] ? Bt(l, A, S) : (l.s = ie == 3 ? -1 : 1, l.c = [l.e = 0], l);
1018
1018
  }, R.modulo = R.mod = function(l, f) {
1019
- var g, k, b = this;
1020
- return l = new U(l, f), !b.c || !l.s || l.c && !l.c[0] ? new U(NaN) : !l.c || b.c && !b.c[0] ? new U(b) : (rt == 9 ? (k = l.s, l.s = 1, g = L(b, l, 0, 3), l.s = k, g.s *= k) : g = L(b, l, 0, rt), l = b.minus(g.times(l)), !l.c[0] && rt == 1 && (l.s = b.s), l);
1019
+ var g, k, w = this;
1020
+ return l = new U(l, f), !w.c || !l.s || l.c && !l.c[0] ? new U(NaN) : !l.c || w.c && !w.c[0] ? new U(w) : (rt == 9 ? (k = l.s, l.s = 1, g = L(w, l, 0, 3), l.s = k, g.s *= k) : g = L(w, l, 0, rt), l = w.minus(g.times(l)), !l.c[0] && rt == 1 && (l.s = w.s), l);
1021
1021
  }, R.multipliedBy = R.times = function(l, f) {
1022
- var g, k, b, I, j, y, v, S, A, x, B, X, ne, ue, ge, ee = this, re = ee.c, we = (l = new U(l, f)).c;
1023
- if (!re || !we || !re[0] || !we[0])
1024
- return !ee.s || !l.s || re && !re[0] && !we || we && !we[0] && !re ? l.c = l.e = l.s = null : (l.s *= ee.s, !re || !we ? l.c = l.e = null : (l.c = [0], l.e = 0)), l;
1025
- for (k = Z(ee.e / c) + Z(l.e / c), l.s *= ee.s, v = re.length, x = we.length, v < x && (ne = re, re = we, we = ne, b = v, v = x, x = b), b = v + x, ne = []; b--; ne.push(0)) ;
1026
- for (ue = d, ge = m, b = x; --b >= 0; ) {
1027
- for (g = 0, B = we[b] % ge, X = we[b] / ge | 0, j = v, I = b + j; I > b; )
1022
+ var g, k, w, I, j, y, v, S, A, x, B, X, ne, ue, ge, ee = this, re = ee.c, be = (l = new U(l, f)).c;
1023
+ if (!re || !be || !re[0] || !be[0])
1024
+ return !ee.s || !l.s || re && !re[0] && !be || be && !be[0] && !re ? l.c = l.e = l.s = null : (l.s *= ee.s, !re || !be ? l.c = l.e = null : (l.c = [0], l.e = 0)), l;
1025
+ for (k = Z(ee.e / c) + Z(l.e / c), l.s *= ee.s, v = re.length, x = be.length, v < x && (ne = re, re = be, be = ne, w = v, v = x, x = w), w = v + x, ne = []; w--; ne.push(0)) ;
1026
+ for (ue = d, ge = m, w = x; --w >= 0; ) {
1027
+ for (g = 0, B = be[w] % ge, X = be[w] / ge | 0, j = v, I = w + j; I > w; )
1028
1028
  S = re[--j] % ge, A = re[j] / ge | 0, y = X * S + A * B, S = B * S + y % ge * ge + ne[I] + g, g = (S / ue | 0) + (y / ge | 0) + X * A, ne[I--] = S % ue;
1029
1029
  ne[I] = g;
1030
1030
  }
@@ -1033,44 +1033,44 @@ function tn() {
1033
1033
  var l = new U(this);
1034
1034
  return l.s = -l.s || null, l;
1035
1035
  }, R.plus = function(l, f) {
1036
- var g, k = this, b = k.s;
1037
- if (l = new U(l, f), f = l.s, !b || !f) return new U(NaN);
1038
- if (b != f)
1036
+ var g, k = this, w = k.s;
1037
+ if (l = new U(l, f), f = l.s, !w || !f) return new U(NaN);
1038
+ if (w != f)
1039
1039
  return l.s = -f, k.minus(l);
1040
1040
  var I = k.e / c, j = l.e / c, y = k.c, v = l.c;
1041
1041
  if (!I || !j) {
1042
- if (!y || !v) return new U(b / 0);
1043
- if (!y[0] || !v[0]) return v[0] ? l : new U(y[0] ? k : b * 0);
1042
+ if (!y || !v) return new U(w / 0);
1043
+ if (!y[0] || !v[0]) return v[0] ? l : new U(y[0] ? k : w * 0);
1044
1044
  }
1045
- if (I = Z(I), j = Z(j), y = y.slice(), b = I - j) {
1046
- for (b > 0 ? (j = I, g = v) : (b = -b, g = y), g.reverse(); b--; g.push(0)) ;
1045
+ if (I = Z(I), j = Z(j), y = y.slice(), w = I - j) {
1046
+ for (w > 0 ? (j = I, g = v) : (w = -w, g = y), g.reverse(); w--; g.push(0)) ;
1047
1047
  g.reverse();
1048
1048
  }
1049
- for (b = y.length, f = v.length, b - f < 0 && (g = v, v = y, y = g, f = b), b = 0; f; )
1050
- b = (y[--f] = y[f] + v[f] + b) / d | 0, y[f] = d === y[f] ? 0 : y[f] % d;
1051
- return b && (y = [b].concat(y), ++j), Bt(l, y, j);
1049
+ for (w = y.length, f = v.length, w - f < 0 && (g = v, v = y, y = g, f = w), w = 0; f; )
1050
+ w = (y[--f] = y[f] + v[f] + w) / d | 0, y[f] = d === y[f] ? 0 : y[f] % d;
1051
+ return w && (y = [w].concat(y), ++j), Bt(l, y, j);
1052
1052
  }, R.precision = R.sd = function(l, f) {
1053
- var g, k, b, I = this;
1053
+ var g, k, w, I = this;
1054
1054
  if (l != null && l !== !!l)
1055
1055
  return _(l, 1, $), f == null ? f = ie : _(f, 0, 8), Se(new U(I), l, f);
1056
1056
  if (!(g = I.c)) return null;
1057
- if (b = g.length - 1, k = b * c + 1, b = g[b]) {
1058
- for (; b % 10 == 0; b /= 10, k--) ;
1059
- for (b = g[0]; b >= 10; b /= 10, k++) ;
1057
+ if (w = g.length - 1, k = w * c + 1, w = g[w]) {
1058
+ for (; w % 10 == 0; w /= 10, k--) ;
1059
+ for (w = g[0]; w >= 10; w /= 10, k++) ;
1060
1060
  }
1061
1061
  return l && I.e + 1 > k && (k = I.e + 1), k;
1062
1062
  }, R.shiftedBy = function(l) {
1063
1063
  return _(l, -p, p), this.times("1e" + l);
1064
1064
  }, R.squareRoot = R.sqrt = function() {
1065
- var l, f, g, k, b, I = this, j = I.c, y = I.s, v = I.e, S = Q + 4, A = new U("0.5");
1065
+ var l, f, g, k, w, I = this, j = I.c, y = I.s, v = I.e, S = Q + 4, A = new U("0.5");
1066
1066
  if (y !== 1 || !j || !j[0])
1067
1067
  return new U(!y || y < 0 && (!j || j[0]) ? NaN : j ? I : 1 / 0);
1068
1068
  if (y = Math.sqrt(+Le(I)), y == 0 || y == 1 / 0 ? (f = W(j), (f.length + v) % 2 == 0 && (f += "0"), y = Math.sqrt(+f), v = Z((v + 1) / 2) - (v < 0 || v % 2), y == 1 / 0 ? f = "5e" + v : (f = y.toExponential(), f = f.slice(0, f.indexOf("e") + 1) + v), g = new U(f)) : g = new U(y + ""), g.c[0]) {
1069
1069
  for (v = g.e, y = v + S, y < 3 && (y = 0); ; )
1070
- if (b = g, g = A.times(b.plus(L(I, b, S, 1))), W(b.c).slice(0, y) === (f = W(g.c)).slice(0, y))
1070
+ if (w = g, g = A.times(w.plus(L(I, w, S, 1))), W(w.c).slice(0, y) === (f = W(g.c)).slice(0, y))
1071
1071
  if (g.e < v && --y, f = f.slice(y - 3, y + 1), f == "9999" || !k && f == "4999") {
1072
- if (!k && (Se(b, b.e + Q + 2, 0), b.times(b).eq(I))) {
1073
- g = b;
1072
+ if (!k && (Se(w, w.e + Q + 2, 0), w.times(w).eq(I))) {
1073
+ g = w;
1074
1074
  break;
1075
1075
  }
1076
1076
  S += 4, y += 4, k = 1;
@@ -1081,17 +1081,17 @@ function tn() {
1081
1081
  }
1082
1082
  return Se(g, g.e + Q + 1, ie, l);
1083
1083
  }, R.toExponential = function(l, f) {
1084
- return l != null && (_(l, 0, $), l++), Dt(this, l, f, 1);
1084
+ return l != null && (_(l, 0, $), l++), Ht(this, l, f, 1);
1085
1085
  }, R.toFixed = function(l, f) {
1086
- return l != null && (_(l, 0, $), l = l + this.e + 1), Dt(this, l, f);
1086
+ return l != null && (_(l, 0, $), l = l + this.e + 1), Ht(this, l, f);
1087
1087
  }, R.toFormat = function(l, f, g) {
1088
- var k, b = this;
1088
+ var k, w = this;
1089
1089
  if (g == null)
1090
1090
  l != null && f && typeof f == "object" ? (g = f, f = null) : l && typeof l == "object" ? (g = l, l = f = null) : g = Nt;
1091
1091
  else if (typeof g != "object")
1092
1092
  throw Error(s + "Argument not an object: " + g);
1093
- if (k = b.toFixed(l, f), b.c) {
1094
- var I, j = k.split("."), y = +g.groupSize, v = +g.secondaryGroupSize, S = g.groupSeparator || "", A = j[0], x = j[1], B = b.s < 0, X = B ? A.slice(1) : A, ne = X.length;
1093
+ if (k = w.toFixed(l, f), w.c) {
1094
+ var I, j = k.split("."), y = +g.groupSize, v = +g.secondaryGroupSize, S = g.groupSeparator || "", A = j[0], x = j[1], B = w.s < 0, X = B ? A.slice(1) : A, ne = X.length;
1095
1095
  if (v && (I = y, y = v, v = I, ne -= I), y > 0 && ne > 0) {
1096
1096
  for (I = ne % y || y, A = X.substr(0, I); I < ne; I += y) A += S + X.substr(I, y);
1097
1097
  v > 0 && (A += S + X.slice(I)), B && (A = "-" + A);
@@ -1103,22 +1103,22 @@ function tn() {
1103
1103
  }
1104
1104
  return (g.prefix || "") + k + (g.suffix || "");
1105
1105
  }, R.toFraction = function(l) {
1106
- var f, g, k, b, I, j, y, v, S, A, x, B, X = this, ne = X.c;
1106
+ var f, g, k, w, I, j, y, v, S, A, x, B, X = this, ne = X.c;
1107
1107
  if (l != null && (y = new U(l), !y.isInteger() && (y.c || y.s !== 1) || y.lt(Y)))
1108
1108
  throw Error(s + "Argument " + (y.isInteger() ? "out of range: " : "not an integer: ") + Le(y));
1109
1109
  if (!ne) return new U(X);
1110
- for (f = new U(Y), S = g = new U(Y), k = v = new U(Y), B = W(ne), I = f.e = B.length - X.e - 1, f.c[0] = u[(j = I % c) < 0 ? c + j : j], l = !l || y.comparedTo(f) > 0 ? I > 0 ? f : S : y, j = ke, ke = 1 / 0, y = new U(B), v.c[0] = 0; A = L(y, f, 0, 1), b = g.plus(A.times(k)), b.comparedTo(l) != 1; )
1111
- g = k, k = b, S = v.plus(A.times(b = S)), v = b, f = y.minus(A.times(b = f)), y = b;
1112
- return b = L(l.minus(g), k, 0, 1), v = v.plus(b.times(S)), g = g.plus(b.times(k)), v.s = S.s = X.s, I = I * 2, x = L(S, k, I, ie).minus(X).abs().comparedTo(
1110
+ for (f = new U(Y), S = g = new U(Y), k = v = new U(Y), B = W(ne), I = f.e = B.length - X.e - 1, f.c[0] = u[(j = I % c) < 0 ? c + j : j], l = !l || y.comparedTo(f) > 0 ? I > 0 ? f : S : y, j = ke, ke = 1 / 0, y = new U(B), v.c[0] = 0; A = L(y, f, 0, 1), w = g.plus(A.times(k)), w.comparedTo(l) != 1; )
1111
+ g = k, k = w, S = v.plus(A.times(w = S)), v = w, f = y.minus(A.times(w = f)), y = w;
1112
+ return w = L(l.minus(g), k, 0, 1), v = v.plus(w.times(S)), g = g.plus(w.times(k)), v.s = S.s = X.s, I = I * 2, x = L(S, k, I, ie).minus(X).abs().comparedTo(
1113
1113
  L(v, g, I, ie).minus(X).abs()
1114
1114
  ) < 1 ? [S, k] : [v, g], ke = j, x;
1115
1115
  }, R.toNumber = function() {
1116
1116
  return +Le(this);
1117
1117
  }, R.toPrecision = function(l, f) {
1118
- return l != null && _(l, 1, $), Dt(this, l, f, 2);
1118
+ return l != null && _(l, 1, $), Ht(this, l, f, 2);
1119
1119
  }, R.toString = function(l) {
1120
- var f, g = this, k = g.s, b = g.e;
1121
- return b === null ? k ? (f = "Infinity", k < 0 && (f = "-" + f)) : f = "NaN" : (l == null ? f = b <= ce || b >= le ? J(W(g.c), b) : ae(W(g.c), b, "0") : l === 10 && Ht ? (g = Se(new U(g), Q + b + 1, ie), f = ae(W(g.c), g.e, "0")) : (_(l, 2, Ye.length, "Base"), f = te(ae(W(g.c), b, "0"), 10, l, k, !0)), k < 0 && g.c[0] && (f = "-" + f)), f;
1120
+ var f, g = this, k = g.s, w = g.e;
1121
+ return w === null ? k ? (f = "Infinity", k < 0 && (f = "-" + f)) : f = "NaN" : (l == null ? f = w <= ce || w >= le ? J(W(g.c), w) : ae(W(g.c), w, "0") : l === 10 && Dt ? (g = Se(new U(g), Q + w + 1, ie), f = ae(W(g.c), g.e, "0")) : (_(l, 2, Ye.length, "Base"), f = te(ae(W(g.c), w, "0"), 10, l, k, !0)), k < 0 && g.c[0] && (f = "-" + f)), f;
1122
1122
  }, R.valueOf = R.toJSON = function() {
1123
1123
  return Le(this);
1124
1124
  }, R._isBigNumber = !0, H != null && U.set(H), U;
@@ -1149,7 +1149,7 @@ function tn() {
1149
1149
  if (H < L || H > te || H !== a(H))
1150
1150
  throw Error(s + (V || "Argument") + (typeof H == "number" ? H < L || H > te ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(H));
1151
1151
  }
1152
- function N(H) {
1152
+ function D(H) {
1153
1153
  var L = H.c.length - 1;
1154
1154
  return Z(H.e / c) == L && H.c[L] % 2 != 0;
1155
1155
  }
@@ -1193,10 +1193,10 @@ function qn() {
1193
1193
  }) + '"' : '"' + p + '"';
1194
1194
  }
1195
1195
  function c(p, u) {
1196
- var m, $, E, Z, W = o, K, _ = u[p], N = _ != null && (_ instanceof e || e.isBigNumber(_));
1196
+ var m, $, E, Z, W = o, K, _ = u[p], D = _ != null && (_ instanceof e || e.isBigNumber(_));
1197
1197
  switch (_ && typeof _ == "object" && typeof _.toJSON == "function" && (_ = _.toJSON(p)), typeof r == "function" && (_ = r.call(u, p, _)), typeof _) {
1198
1198
  case "string":
1199
- return N ? _ : d(_);
1199
+ return D ? _ : d(_);
1200
1200
  case "number":
1201
1201
  return isFinite(_) ? String(_) : "null";
1202
1202
  case "boolean":
@@ -1288,17 +1288,17 @@ function _n() {
1288
1288
  `,
1289
1289
  r: "\r",
1290
1290
  t: " "
1291
- }, c, p = function(N) {
1291
+ }, c, p = function(D) {
1292
1292
  throw {
1293
1293
  name: "SyntaxError",
1294
- message: N,
1294
+ message: D,
1295
1295
  at: s,
1296
1296
  text: c
1297
1297
  };
1298
- }, u = function(N) {
1299
- return N && N !== r && p("Expected '" + N + "' instead of '" + r + "'"), r = c.charAt(s), s += 1, r;
1298
+ }, u = function(D) {
1299
+ return D && D !== r && p("Expected '" + D + "' instead of '" + r + "'"), r = c.charAt(s), s += 1, r;
1300
1300
  }, m = function() {
1301
- var N, J = "";
1301
+ var D, J = "";
1302
1302
  for (r === "-" && (J = "-", u("-")); r >= "0" && r <= "9"; )
1303
1303
  J += r, u();
1304
1304
  if (r === ".")
@@ -1307,20 +1307,20 @@ function _n() {
1307
1307
  if (r === "e" || r === "E")
1308
1308
  for (J += r, u(), (r === "-" || r === "+") && (J += r, u()); r >= "0" && r <= "9"; )
1309
1309
  J += r, u();
1310
- if (N = +J, !isFinite(N))
1310
+ if (D = +J, !isFinite(D))
1311
1311
  p("Bad number");
1312
1312
  else
1313
- return t == null && (t = tn()), J.length > 15 ? a.storeAsString ? J : a.useNativeBigInt ? BigInt(J) : new t(J) : a.alwaysParseAsBig ? a.useNativeBigInt ? BigInt(N) : new t(N) : N;
1313
+ return t == null && (t = tn()), J.length > 15 ? a.storeAsString ? J : a.useNativeBigInt ? BigInt(J) : new t(J) : a.alwaysParseAsBig ? a.useNativeBigInt ? BigInt(D) : new t(D) : D;
1314
1314
  }, $ = function() {
1315
- var N, J, ae = "", H;
1315
+ var D, J, ae = "", H;
1316
1316
  if (r === '"')
1317
1317
  for (var L = s; u(); ) {
1318
1318
  if (r === '"')
1319
1319
  return s - 1 > L && (ae += c.substring(L, s - 1)), u(), ae;
1320
1320
  if (r === "\\") {
1321
1321
  if (s - 1 > L && (ae += c.substring(L, s - 1)), u(), r === "u") {
1322
- for (H = 0, J = 0; J < 4 && (N = parseInt(u(), 16), !!isFinite(N)); J += 1)
1323
- H = H * 16 + N;
1322
+ for (H = 0, J = 0; J < 4 && (D = parseInt(u(), 16), !!isFinite(D)); J += 1)
1323
+ H = H * 16 + D;
1324
1324
  ae += String.fromCharCode(H);
1325
1325
  } else if (typeof d[r] == "string")
1326
1326
  ae += d[r];
@@ -1344,24 +1344,24 @@ function _n() {
1344
1344
  }
1345
1345
  p("Unexpected '" + r + "'");
1346
1346
  }, W, K = function() {
1347
- var N = [];
1347
+ var D = [];
1348
1348
  if (r === "[") {
1349
1349
  if (u("["), E(), r === "]")
1350
- return u("]"), N;
1350
+ return u("]"), D;
1351
1351
  for (; r; ) {
1352
- if (N.push(W()), E(), r === "]")
1353
- return u("]"), N;
1352
+ if (D.push(W()), E(), r === "]")
1353
+ return u("]"), D;
1354
1354
  u(","), E();
1355
1355
  }
1356
1356
  }
1357
1357
  p("Bad array");
1358
1358
  }, _ = function() {
1359
- var N, J = /* @__PURE__ */ Object.create(null);
1359
+ var D, J = /* @__PURE__ */ Object.create(null);
1360
1360
  if (r === "{") {
1361
1361
  if (u("{"), E(), r === "}")
1362
1362
  return u("}"), J;
1363
1363
  for (; r; ) {
1364
- if (N = $(), E(), u(":"), a.strict === !0 && Object.hasOwnProperty.call(J, N) && p('Duplicate key "' + N + '"'), e.test(N) === !0 ? a.protoAction === "error" ? p("Object contains forbidden prototype property") : a.protoAction === "ignore" ? W() : J[N] = W() : n.test(N) === !0 ? a.constructorAction === "error" ? p("Object contains forbidden constructor property") : a.constructorAction === "ignore" ? W() : J[N] = W() : J[N] = W(), E(), r === "}")
1364
+ if (D = $(), E(), u(":"), a.strict === !0 && Object.hasOwnProperty.call(J, D) && p('Duplicate key "' + D + '"'), e.test(D) === !0 ? a.protoAction === "error" ? p("Object contains forbidden prototype property") : a.protoAction === "ignore" ? W() : J[D] = W() : n.test(D) === !0 ? a.constructorAction === "error" ? p("Object contains forbidden constructor property") : a.constructorAction === "ignore" ? W() : J[D] = W() : J[D] = W(), E(), r === "}")
1365
1365
  return u("}"), J;
1366
1366
  u(","), E();
1367
1367
  }
@@ -1381,9 +1381,9 @@ function _n() {
1381
1381
  default:
1382
1382
  return r >= "0" && r <= "9" ? m() : Z();
1383
1383
  }
1384
- }, function(N, J) {
1384
+ }, function(D, J) {
1385
1385
  var ae;
1386
- return c = N + "", s = 0, r = " ", ae = W(), E(), r && p("Syntax error"), typeof J == "function" ? (function H(L, te) {
1386
+ return c = D + "", s = 0, r = " ", ae = W(), E(), r && p("Syntax error"), typeof J == "function" ? (function H(L, te) {
1387
1387
  var V, R = L[te];
1388
1388
  return R && typeof R == "object" && Object.keys(R).forEach(function(Y) {
1389
1389
  V = H(R, Y), V !== void 0 ? R[Y] = V : delete R[Y];
@@ -1393,10 +1393,10 @@ function _n() {
1393
1393
  };
1394
1394
  return Kt = i, Kt;
1395
1395
  }
1396
- var Hi;
1396
+ var Di;
1397
1397
  function Ln() {
1398
- if (Hi) return lt.exports;
1399
- Hi = 1;
1398
+ if (Di) return lt.exports;
1399
+ Di = 1;
1400
1400
  var t = qn().stringify, e = _n();
1401
1401
  return lt.exports = function(n) {
1402
1402
  return {
@@ -1434,7 +1434,7 @@ function Ae(t, e, n, i) {
1434
1434
  c((i = i.apply(t, e || [])).next());
1435
1435
  });
1436
1436
  }
1437
- function Hn(t, e, n, i) {
1437
+ function Dn(t, e, n, i) {
1438
1438
  if (typeof e == "function" ? t !== e || !i : !e.has(t)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
1439
1439
  return n === "m" ? i : n === "a" ? i.call(t) : i ? i.value : e.get(t);
1440
1440
  }
@@ -1456,7 +1456,7 @@ class We {
1456
1456
  * @returns {string}
1457
1457
  */
1458
1458
  static unique(e = 7) {
1459
- const n = Hn(jt, jt, "m", nn).call(jt);
1459
+ const n = Dn(jt, jt, "m", nn).call(jt);
1460
1460
  let i = "";
1461
1461
  for (let o = 0; o < e; o++) {
1462
1462
  const a = Math.floor(Math.random() * 16).toString(16);
@@ -1569,7 +1569,7 @@ P.overlaps = (t, e) => new P("overlaps", t, [e]).toString();
1569
1569
  P.notOverlaps = (t, e) => new P("notOverlaps", t, [e]).toString();
1570
1570
  P.touches = (t, e) => new P("touches", t, [e]).toString();
1571
1571
  P.notTouches = (t, e) => new P("notTouches", t, [e]).toString();
1572
- const Dn = vi({ storeAsString: !1 }), Bn = vi({ useNativeBigInt: !0 }), Xn = BigInt(Number.MAX_SAFE_INTEGER), Vn = BigInt(Number.MIN_SAFE_INTEGER), Wn = BigInt("9223372036854775807"), Gn = BigInt("-9223372036854775808");
1572
+ const Hn = vi({ storeAsString: !1 }), Bn = vi({ useNativeBigInt: !0 }), Xn = BigInt(Number.MAX_SAFE_INTEGER), Vn = BigInt(Number.MIN_SAFE_INTEGER), Wn = BigInt("9223372036854775807"), Gn = BigInt("-9223372036854775808");
1573
1573
  function Kn(t) {
1574
1574
  return t !== null && typeof t == "object" && t._isBigNumber === !0 && typeof t.isInteger == "function" && typeof t.toFixed == "function" && typeof t.toNumber == "function";
1575
1575
  }
@@ -1584,7 +1584,7 @@ function Yn(t, e) {
1584
1584
  return e;
1585
1585
  }
1586
1586
  const ve = {
1587
- parse: (t) => Dn.parse(t, Yn),
1587
+ parse: (t) => Hn.parse(t, Yn),
1588
1588
  stringify: Bn.stringify
1589
1589
  };
1590
1590
  class h extends Error {
@@ -2038,7 +2038,7 @@ class xe {
2038
2038
  const Q = Y * xe.CHUNK_SIZE, ie = Math.min(Q + xe.CHUNK_SIZE, p.size);
2039
2039
  _.push({ start: Q, end: ie });
2040
2040
  }
2041
- const N = 8;
2041
+ const D = 8;
2042
2042
  let J = 1, ae = m, H = W, L = null, te = !1;
2043
2043
  const V = (Y) => {
2044
2044
  var Q;
@@ -2066,7 +2066,7 @@ class xe {
2066
2066
  Y();
2067
2067
  return;
2068
2068
  }
2069
- for (; ce < N && ie < _.length; ) {
2069
+ for (; ce < D && ie < _.length; ) {
2070
2070
  const ke = _[ie++];
2071
2071
  ce++, R(ke).then(() => {
2072
2072
  ce--, le++, Re();
@@ -2122,7 +2122,7 @@ class xe {
2122
2122
  }
2123
2123
  }
2124
2124
  xe.CHUNK_SIZE = 1024 * 1024 * 5;
2125
- class be {
2125
+ class we {
2126
2126
  constructor(e) {
2127
2127
  this.client = e;
2128
2128
  }
@@ -2130,12 +2130,12 @@ class be {
2130
2130
  let i = {};
2131
2131
  for (const [o, a] of Object.entries(e)) {
2132
2132
  const s = n ? n + "[" + o + "]" : o;
2133
- Array.isArray(a) ? i = Object.assign(Object.assign({}, i), be.flatten(a, s)) : i[s] = a;
2133
+ Array.isArray(a) ? i = Object.assign(Object.assign({}, i), we.flatten(a, s)) : i[s] = a;
2134
2134
  }
2135
2135
  return i;
2136
2136
  }
2137
2137
  }
2138
- be.CHUNK_SIZE = 5 * 1024 * 1024;
2138
+ we.CHUNK_SIZE = 5 * 1024 * 1024;
2139
2139
  class Yt {
2140
2140
  constructor(e) {
2141
2141
  this.client = e;
@@ -2873,7 +2873,7 @@ class Yt {
2873
2873
  typeof a < "u" && (c.success = a), typeof s < "u" && (c.failure = s), typeof r < "u" && (c.scopes = r);
2874
2874
  const p = new URL(this.client.config.endpoint + d);
2875
2875
  c.project = this.client.config.project;
2876
- for (const [u, m] of Object.entries(be.flatten(c)))
2876
+ for (const [u, m] of Object.entries(we.flatten(c)))
2877
2877
  p.searchParams.append(u, m);
2878
2878
  if (typeof window < "u" && window?.location) {
2879
2879
  window.location.href = p.toString();
@@ -3091,7 +3091,7 @@ class Yt {
3091
3091
  typeof a < "u" && (c.success = a), typeof s < "u" && (c.failure = s), typeof r < "u" && (c.scopes = r);
3092
3092
  const p = new URL(this.client.config.endpoint + d);
3093
3093
  c.project = this.client.config.project;
3094
- for (const [u, m] of Object.entries(be.flatten(c)))
3094
+ for (const [u, m] of Object.entries(we.flatten(c)))
3095
3095
  p.searchParams.append(u, m);
3096
3096
  if (typeof window < "u" && window?.location) {
3097
3097
  window.location.href = p.toString();
@@ -3247,7 +3247,7 @@ class on {
3247
3247
  typeof a < "u" && (c.width = a), typeof s < "u" && (c.height = s), typeof r < "u" && (c.quality = r);
3248
3248
  const p = new URL(this.client.config.endpoint + d);
3249
3249
  c.project = this.client.config.project, c.impersonateuserid = this.client.config.impersonateuserid;
3250
- for (const [u, m] of Object.entries(be.flatten(c)))
3250
+ for (const [u, m] of Object.entries(we.flatten(c)))
3251
3251
  p.searchParams.append(u, m);
3252
3252
  return p.toString();
3253
3253
  }
@@ -3266,7 +3266,7 @@ class on {
3266
3266
  typeof a < "u" && (c.width = a), typeof s < "u" && (c.height = s), typeof r < "u" && (c.quality = r);
3267
3267
  const p = new URL(this.client.config.endpoint + d);
3268
3268
  c.project = this.client.config.project, c.impersonateuserid = this.client.config.impersonateuserid;
3269
- for (const [u, m] of Object.entries(be.flatten(c)))
3269
+ for (const [u, m] of Object.entries(we.flatten(c)))
3270
3270
  p.searchParams.append(u, m);
3271
3271
  return p.toString();
3272
3272
  }
@@ -3282,7 +3282,7 @@ class on {
3282
3282
  typeof i < "u" && (a.url = i);
3283
3283
  const s = new URL(this.client.config.endpoint + o);
3284
3284
  a.project = this.client.config.project, a.impersonateuserid = this.client.config.impersonateuserid;
3285
- for (const [r, d] of Object.entries(be.flatten(a)))
3285
+ for (const [r, d] of Object.entries(we.flatten(a)))
3286
3286
  s.searchParams.append(r, d);
3287
3287
  return s.toString();
3288
3288
  }
@@ -3301,7 +3301,7 @@ class on {
3301
3301
  typeof a < "u" && (c.width = a), typeof s < "u" && (c.height = s), typeof r < "u" && (c.quality = r);
3302
3302
  const p = new URL(this.client.config.endpoint + d);
3303
3303
  c.project = this.client.config.project, c.impersonateuserid = this.client.config.impersonateuserid;
3304
- for (const [u, m] of Object.entries(be.flatten(c)))
3304
+ for (const [u, m] of Object.entries(we.flatten(c)))
3305
3305
  p.searchParams.append(u, m);
3306
3306
  return p.toString();
3307
3307
  }
@@ -3319,7 +3319,7 @@ class on {
3319
3319
  typeof o < "u" && (d.url = o), typeof a < "u" && (d.width = a), typeof s < "u" && (d.height = s);
3320
3320
  const c = new URL(this.client.config.endpoint + r);
3321
3321
  d.project = this.client.config.project, d.impersonateuserid = this.client.config.impersonateuserid;
3322
- for (const [p, u] of Object.entries(be.flatten(d)))
3322
+ for (const [p, u] of Object.entries(we.flatten(d)))
3323
3323
  c.searchParams.append(p, u);
3324
3324
  return c.toString();
3325
3325
  }
@@ -3335,7 +3335,7 @@ class on {
3335
3335
  typeof o < "u" && (c.name = o), typeof a < "u" && (c.width = a), typeof s < "u" && (c.height = s), typeof r < "u" && (c.background = r);
3336
3336
  const p = new URL(this.client.config.endpoint + d);
3337
3337
  c.project = this.client.config.project, c.impersonateuserid = this.client.config.impersonateuserid;
3338
- for (const [u, m] of Object.entries(be.flatten(c)))
3338
+ for (const [u, m] of Object.entries(we.flatten(c)))
3339
3339
  p.searchParams.append(u, m);
3340
3340
  return p.toString();
3341
3341
  }
@@ -3355,7 +3355,7 @@ class on {
3355
3355
  typeof o < "u" && ($.width = o), typeof a < "u" && ($.height = a), typeof s < "u" && ($.quality = s), typeof r < "u" && ($.output = r), typeof d < "u" && ($.rating = d), typeof c < "u" && ($.userId = c), typeof p < "u" && ($.emailHash = p), typeof u < "u" && ($.name = u);
3356
3356
  const E = new URL(this.client.config.endpoint + m);
3357
3357
  $.project = this.client.config.project, $.impersonateuserid = this.client.config.impersonateuserid;
3358
- for (const [Z, W] of Object.entries(be.flatten($)))
3358
+ for (const [Z, W] of Object.entries(we.flatten($)))
3359
3359
  E.searchParams.append(Z, W);
3360
3360
  return E.toString();
3361
3361
  }
@@ -3374,7 +3374,7 @@ class on {
3374
3374
  typeof o < "u" && (c.text = o), typeof a < "u" && (c.size = a), typeof s < "u" && (c.margin = s), typeof r < "u" && (c.download = r);
3375
3375
  const p = new URL(this.client.config.endpoint + d);
3376
3376
  c.project = this.client.config.project, c.impersonateuserid = this.client.config.impersonateuserid;
3377
- for (const [u, m] of Object.entries(be.flatten(c)))
3377
+ for (const [u, m] of Object.entries(we.flatten(c)))
3378
3378
  p.searchParams.append(u, m);
3379
3379
  return p.toString();
3380
3380
  }
@@ -3402,14 +3402,14 @@ class on {
3402
3402
  quality: n[17],
3403
3403
  output: n[18]
3404
3404
  };
3405
- const o = i.url, a = i.headers, s = i.viewportWidth, r = i.viewportHeight, d = i.scale, c = i.theme, p = i.userAgent, u = i.fullpage, m = i.locale, $ = i.timezone, E = i.latitude, Z = i.longitude, W = i.accuracy, K = i.touch, _ = i.permissions, N = i.sleep, J = i.width, ae = i.height, H = i.quality, L = i.output;
3405
+ const o = i.url, a = i.headers, s = i.viewportWidth, r = i.viewportHeight, d = i.scale, c = i.theme, p = i.userAgent, u = i.fullpage, m = i.locale, $ = i.timezone, E = i.latitude, Z = i.longitude, W = i.accuracy, K = i.touch, _ = i.permissions, D = i.sleep, J = i.width, ae = i.height, H = i.quality, L = i.output;
3406
3406
  if (typeof o > "u")
3407
3407
  throw new h('Missing required parameter: "url"');
3408
3408
  const te = "/avatars/screenshots", V = {};
3409
- typeof o < "u" && (V.url = o), typeof a < "u" && (V.headers = a), typeof s < "u" && (V.viewportWidth = s), typeof r < "u" && (V.viewportHeight = r), typeof d < "u" && (V.scale = d), typeof c < "u" && (V.theme = c), typeof p < "u" && (V.userAgent = p), typeof u < "u" && (V.fullpage = u), typeof m < "u" && (V.locale = m), typeof $ < "u" && (V.timezone = $), typeof E < "u" && (V.latitude = E), typeof Z < "u" && (V.longitude = Z), typeof W < "u" && (V.accuracy = W), typeof K < "u" && (V.touch = K), typeof _ < "u" && (V.permissions = _), typeof N < "u" && (V.sleep = N), typeof J < "u" && (V.width = J), typeof ae < "u" && (V.height = ae), typeof H < "u" && (V.quality = H), typeof L < "u" && (V.output = L);
3409
+ typeof o < "u" && (V.url = o), typeof a < "u" && (V.headers = a), typeof s < "u" && (V.viewportWidth = s), typeof r < "u" && (V.viewportHeight = r), typeof d < "u" && (V.scale = d), typeof c < "u" && (V.theme = c), typeof p < "u" && (V.userAgent = p), typeof u < "u" && (V.fullpage = u), typeof m < "u" && (V.locale = m), typeof $ < "u" && (V.timezone = $), typeof E < "u" && (V.latitude = E), typeof Z < "u" && (V.longitude = Z), typeof W < "u" && (V.accuracy = W), typeof K < "u" && (V.touch = K), typeof _ < "u" && (V.permissions = _), typeof D < "u" && (V.sleep = D), typeof J < "u" && (V.width = J), typeof ae < "u" && (V.height = ae), typeof H < "u" && (V.quality = H), typeof L < "u" && (V.output = L);
3410
3410
  const R = new URL(this.client.config.endpoint + te);
3411
3411
  V.project = this.client.config.project, V.impersonateuserid = this.client.config.impersonateuserid;
3412
- for (const [Y, Q] of Object.entries(be.flatten(V)))
3412
+ for (const [Y, Q] of Object.entries(we.flatten(V)))
3413
3413
  R.searchParams.append(Y, Q);
3414
3414
  return R.toString();
3415
3415
  }
@@ -4605,7 +4605,7 @@ class to {
4605
4605
  typeof s < "u" && (d.token = s);
4606
4606
  const c = new URL(this.client.config.endpoint + r);
4607
4607
  d.project = this.client.config.project, d.impersonateuserid = this.client.config.impersonateuserid;
4608
- for (const [p, u] of Object.entries(be.flatten(d)))
4608
+ for (const [p, u] of Object.entries(we.flatten(d)))
4609
4609
  c.searchParams.append(p, u);
4610
4610
  return c.toString();
4611
4611
  }
@@ -4632,11 +4632,11 @@ class to {
4632
4632
  throw new h('Missing required parameter: "bucketId"');
4633
4633
  if (typeof a > "u")
4634
4634
  throw new h('Missing required parameter: "fileId"');
4635
- const _ = "/storage/buckets/{bucketId}/files/{fileId}/preview".replace("{bucketId}", encodeURIComponent(String(o))).replace("{fileId}", encodeURIComponent(String(a))), N = {};
4636
- typeof s < "u" && (N.width = s), typeof r < "u" && (N.height = r), typeof d < "u" && (N.gravity = d), typeof c < "u" && (N.quality = c), typeof p < "u" && (N.borderWidth = p), typeof u < "u" && (N.borderColor = u), typeof m < "u" && (N.borderRadius = m), typeof $ < "u" && (N.opacity = $), typeof E < "u" && (N.rotation = E), typeof Z < "u" && (N.background = Z), typeof W < "u" && (N.output = W), typeof K < "u" && (N.token = K);
4635
+ const _ = "/storage/buckets/{bucketId}/files/{fileId}/preview".replace("{bucketId}", encodeURIComponent(String(o))).replace("{fileId}", encodeURIComponent(String(a))), D = {};
4636
+ typeof s < "u" && (D.width = s), typeof r < "u" && (D.height = r), typeof d < "u" && (D.gravity = d), typeof c < "u" && (D.quality = c), typeof p < "u" && (D.borderWidth = p), typeof u < "u" && (D.borderColor = u), typeof m < "u" && (D.borderRadius = m), typeof $ < "u" && (D.opacity = $), typeof E < "u" && (D.rotation = E), typeof Z < "u" && (D.background = Z), typeof W < "u" && (D.output = W), typeof K < "u" && (D.token = K);
4637
4637
  const J = new URL(this.client.config.endpoint + _);
4638
- N.project = this.client.config.project, N.impersonateuserid = this.client.config.impersonateuserid;
4639
- for (const [ae, H] of Object.entries(be.flatten(N)))
4638
+ D.project = this.client.config.project, D.impersonateuserid = this.client.config.impersonateuserid;
4639
+ for (const [ae, H] of Object.entries(we.flatten(D)))
4640
4640
  J.searchParams.append(ae, H);
4641
4641
  return J.toString();
4642
4642
  }
@@ -4656,7 +4656,7 @@ class to {
4656
4656
  typeof s < "u" && (d.token = s);
4657
4657
  const c = new URL(this.client.config.endpoint + r);
4658
4658
  d.project = this.client.config.project, d.impersonateuserid = this.client.config.impersonateuserid;
4659
- for (const [p, u] of Object.entries(be.flatten(d)))
4659
+ for (const [p, u] of Object.entries(we.flatten(d)))
4660
4660
  c.searchParams.append(p, u);
4661
4661
  return c.toString();
4662
4662
  }
@@ -6415,7 +6415,7 @@ const ta = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6415
6415
  twoFactor: "Two-factor authentication",
6416
6416
  mfaBadge: "MFA",
6417
6417
  twoFactorDescription: "Require a second factor when signing in to this account.",
6418
- mfaNoFactorWarning: "Turn on an authenticator, or verify your email or phone, before enabling two-factor authentication. Without a factor, this setting does not protect the account.",
6418
+ mfaNoFactorWarning: "Two-factor authentication is on, but no factors are set up yet. Add an authenticator, or verify your email or phone. Without a factor, this setting does not protect the account.",
6419
6419
  enable: "Enable",
6420
6420
  disable: "Disable",
6421
6421
  authenticatorApp: "Authenticator app",
@@ -6571,7 +6571,7 @@ const co = {
6571
6571
  function pt(t) {
6572
6572
  return co[t] ?? t.charAt(0).toUpperCase() + t.slice(1);
6573
6573
  }
6574
- const At = (t, e, n = 401) => Object.assign(new Error(e), { type: t, code: n }), Ce = () => (/* @__PURE__ */ new Date()).toISOString(), He = (t) => new Date(Date.now() - t * 6e4).toISOString(), kt = [
6574
+ const At = (t, e, n = 401) => Object.assign(new Error(e), { type: t, code: n }), Ce = () => (/* @__PURE__ */ new Date()).toISOString(), De = (t) => new Date(Date.now() - t * 6e4).toISOString(), kt = [
6575
6575
  "amber",
6576
6576
  "brave",
6577
6577
  "calm",
@@ -6584,7 +6584,7 @@ const At = (t, e, n = 401) => Object.assign(new Error(e), { type: t, code: n }),
6584
6584
  "juniper",
6585
6585
  "kite",
6586
6586
  "lumen"
6587
- ], Di = () => `${kt[Math.floor(Math.random() * kt.length)]}-${kt[Math.floor(Math.random() * kt.length)]}`, Oe = () => Math.random().toString(36).slice(2, 12), Bi = () => Array.from({ length: 2 }, () => Math.random().toString(36).slice(2, 7)).join("-"), lo = {
6587
+ ], Hi = () => `${kt[Math.floor(Math.random() * kt.length)]}-${kt[Math.floor(Math.random() * kt.length)]}`, Oe = () => Math.random().toString(36).slice(2, 12), Bi = () => Array.from({ length: 2 }, () => Math.random().toString(36).slice(2, 7)).join("-"), lo = {
6588
6588
  name: "Ada Lovelace",
6589
6589
  email: "ada@example.com",
6590
6590
  phone: "+15550100"
@@ -6598,13 +6598,13 @@ class uo {
6598
6598
  const n = e.anonymous ?? !1;
6599
6599
  return this.user = {
6600
6600
  $id: "preview-user",
6601
- $createdAt: He(1440 * 30),
6601
+ $createdAt: De(1440 * 30),
6602
6602
  $updatedAt: Ce(),
6603
6603
  name: n ? "" : e.name ?? this.seed.name,
6604
- registration: He(1440 * 30),
6604
+ registration: De(1440 * 30),
6605
6605
  status: !0,
6606
6606
  labels: [],
6607
- passwordUpdate: n ? "" : He(1440 * 7),
6607
+ passwordUpdate: n ? "" : De(1440 * 7),
6608
6608
  email: n ? "" : e.email ?? this.seed.email,
6609
6609
  phone: n ? "" : e.phone ?? this.seed.phone,
6610
6610
  emailVerification: !n,
@@ -6655,7 +6655,7 @@ class uo {
6655
6655
  {
6656
6656
  ...n,
6657
6657
  $id: Oe(),
6658
- $createdAt: He(300),
6658
+ $createdAt: De(300),
6659
6659
  provider: e,
6660
6660
  ip: "198.51.100.7",
6661
6661
  osCode: "IOS",
@@ -6672,7 +6672,7 @@ class uo {
6672
6672
  {
6673
6673
  ...n,
6674
6674
  $id: Oe(),
6675
- $createdAt: He(1440 * 3),
6675
+ $createdAt: De(1440 * 3),
6676
6676
  provider: "oauth2",
6677
6677
  ip: "192.0.2.90",
6678
6678
  osCode: "WIN",
@@ -6687,8 +6687,8 @@ class uo {
6687
6687
  ], this.identities = [
6688
6688
  {
6689
6689
  $id: "identity-github",
6690
- $createdAt: He(1440 * 20),
6691
- $updatedAt: He(1440 * 20),
6690
+ $createdAt: De(1440 * 20),
6691
+ $updatedAt: De(1440 * 20),
6692
6692
  userId: "preview-user",
6693
6693
  provider: "github",
6694
6694
  providerUid: "8675309",
@@ -6708,7 +6708,7 @@ class uo {
6708
6708
  },
6709
6709
  {
6710
6710
  event: "user.update.name",
6711
- time: He(1440 * 2),
6711
+ time: De(1440 * 2),
6712
6712
  clientName: "Safari",
6713
6713
  osName: "iOS",
6714
6714
  countryName: "Germany",
@@ -6716,7 +6716,7 @@ class uo {
6716
6716
  },
6717
6717
  {
6718
6718
  event: "session.create",
6719
- time: He(1440 * 3),
6719
+ time: De(1440 * 3),
6720
6720
  clientName: "Firefox",
6721
6721
  osName: "Windows",
6722
6722
  countryName: "United States",
@@ -6777,7 +6777,7 @@ class uo {
6777
6777
  userId: e,
6778
6778
  secret: "",
6779
6779
  expire: "",
6780
- phrase: Di()
6780
+ phrase: Hi()
6781
6781
  });
6782
6782
  }
6783
6783
  async createEmailToken(e, n) {
@@ -6787,7 +6787,7 @@ class uo {
6787
6787
  userId: e,
6788
6788
  secret: "",
6789
6789
  expire: "",
6790
- phrase: Di()
6790
+ phrase: Hi()
6791
6791
  });
6792
6792
  }
6793
6793
  async createPhoneToken(e, n) {
@@ -7777,7 +7777,7 @@ const Ki = new mo(), Yi = {
7777
7777
  lg: "0.875rem",
7778
7778
  xl: "1.125rem",
7779
7779
  full: "1.5rem"
7780
- }, bo = Ge`
7780
+ }, wo = Ge`
7781
7781
  :host {
7782
7782
  /* Light theme (matches :root in the console) */
7783
7783
  --authui-background: oklch(1 0 0);
@@ -7844,9 +7844,10 @@ const Ki = new mo(), Yi = {
7844
7844
  --authui-accent-foreground: oklch(0.985 0 0);
7845
7845
  --authui-destructive: oklch(0.396 0.141 25.723);
7846
7846
  --authui-destructive-foreground: oklch(0.637 0.237 25.331);
7847
- --authui-border: oklch(0.252 0.005 286.32);
7848
- --authui-input: #2d2d31;
7849
- --authui-ring: oklch(0.448 0.015 285.786);
7847
+ /* Raised vs card (#1d1d21) for WCAG 1.4.11 (~3:1) UI contrast */
7848
+ --authui-border: #71717a;
7849
+ --authui-input: #71717a;
7850
+ --authui-ring: #a1a1aa;
7850
7851
  --authui-success-foreground: #34d399;
7851
7852
  --authui-warning-foreground: #fbbf24;
7852
7853
  --authui-error-foreground: #f87171;
@@ -7855,7 +7856,7 @@ const Ki = new mo(), Yi = {
7855
7856
  --authui-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
7856
7857
  color-scheme: dark;
7857
7858
  }
7858
- `, wo = Ge`
7859
+ `, bo = Ge`
7859
7860
  *,
7860
7861
  *::before,
7861
7862
  *::after {
@@ -8063,7 +8064,8 @@ const Ki = new mo(), Yi = {
8063
8064
  }
8064
8065
  .input {
8065
8066
  font: inherit;
8066
- font-size: 14px;
8067
+ /* 16px avoids iOS Safari auto-zoom on focus */
8068
+ font-size: 16px;
8067
8069
  height: 36px;
8068
8070
  width: 100%;
8069
8071
  min-width: 0;
@@ -8138,8 +8140,9 @@ const Ki = new mo(), Yi = {
8138
8140
  background: var(--authui-muted);
8139
8141
  transition: background-color 120ms ease;
8140
8142
  }
8143
+ /* destructive-foreground matches light destructive and stays visible on dark card */
8141
8144
  .strength-meter[data-level="1"] span:nth-child(-n + 1) {
8142
- background: var(--authui-destructive);
8145
+ background: var(--authui-destructive-foreground);
8143
8146
  }
8144
8147
  .strength-meter[data-level="2"] span:nth-child(-n + 2) {
8145
8148
  background: var(--authui-warning-foreground);
@@ -8155,6 +8158,19 @@ const Ki = new mo(), Yi = {
8155
8158
  color: var(--authui-muted-foreground);
8156
8159
  margin: 0;
8157
8160
  }
8161
+ :host([data-theme="dark"]) .strength-meter span {
8162
+ background: var(--authui-border);
8163
+ }
8164
+ :host([data-theme="dark"]) .strength-meter[data-level="1"] span:nth-child(-n + 1) {
8165
+ background: var(--authui-destructive-foreground);
8166
+ }
8167
+ :host([data-theme="dark"]) .strength-meter[data-level="2"] span:nth-child(-n + 2),
8168
+ :host([data-theme="dark"]) .strength-meter[data-level="3"] span:nth-child(-n + 3) {
8169
+ background: var(--authui-warning-foreground);
8170
+ }
8171
+ :host([data-theme="dark"]) .strength-meter[data-level="4"] span {
8172
+ background: var(--authui-success);
8173
+ }
8158
8174
 
8159
8175
  .btn.last-used {
8160
8176
  border-color: var(--authui-brand);
@@ -8305,7 +8321,7 @@ const Ki = new mo(), Yi = {
8305
8321
  display: inline-flex;
8306
8322
  align-items: center;
8307
8323
  justify-content: flex-start;
8308
- height: 36px;
8324
+ height: 44px;
8309
8325
  width: fit-content;
8310
8326
  max-width: 100%;
8311
8327
  overflow-x: auto;
@@ -8316,6 +8332,14 @@ const Ki = new mo(), Yi = {
8316
8332
  gap: 2px;
8317
8333
  scrollbar-width: none;
8318
8334
  -webkit-overflow-scrolling: touch;
8335
+ /* Subtle right-edge fade as overflow cue at narrow widths */
8336
+ -webkit-mask-image: linear-gradient(
8337
+ to right,
8338
+ #000 0%,
8339
+ #000 calc(100% - 28px),
8340
+ transparent 100%
8341
+ );
8342
+ mask-image: linear-gradient(to right, #000 0%, #000 calc(100% - 28px), transparent 100%);
8319
8343
  }
8320
8344
  :host([data-theme="dark"]) .tabs {
8321
8345
  background: color-mix(in oklab, var(--authui-muted) 80%, transparent);
@@ -8326,8 +8350,9 @@ const Ki = new mo(), Yi = {
8326
8350
  justify-content: center;
8327
8351
  gap: 6px;
8328
8352
  height: 100%;
8353
+ min-height: 38px;
8329
8354
  flex: 0 0 auto;
8330
- padding: 4px 10px;
8355
+ padding: 8px 12px;
8331
8356
  border-radius: var(--authui-radius-md);
8332
8357
  border: 1px solid transparent;
8333
8358
  background: transparent;
@@ -8862,21 +8887,21 @@ var vo = Object.defineProperty, Io = (t, e, n, i) => {
8862
8887
  for (var o = void 0, a = t.length - 1, s; a >= 0; a--)
8863
8888
  (s = t[a]) && (o = s(e, n, o) || o);
8864
8889
  return o && vo(e, n, o), o;
8865
- }, De;
8866
- const rn = (De = class extends Qe {
8890
+ }, He;
8891
+ const rn = (He = class extends Qe {
8867
8892
  constructor() {
8868
8893
  super(...arguments), this.auth = M.getState(), this.unsubscribeStore = null, this.unsubscribeTheme = null, this.stopKeys = (e) => e.stopPropagation();
8869
8894
  }
8870
8895
  connectedCallback() {
8871
8896
  super.connectedCallback();
8872
- for (const e of De.KEY_EVENTS) this.addEventListener(e, this.stopKeys);
8897
+ for (const e of He.KEY_EVENTS) this.addEventListener(e, this.stopKeys);
8873
8898
  this.auth = M.getState(), this.unsubscribeStore = M.on("change", (e) => {
8874
8899
  this.auth = e, this.applyBranding();
8875
8900
  }), this.unsubscribeTheme = Ki.subscribe(() => this.applyBranding()), this.applyBranding();
8876
8901
  }
8877
8902
  disconnectedCallback() {
8878
8903
  super.disconnectedCallback();
8879
- for (const e of De.KEY_EVENTS) this.removeEventListener(e, this.stopKeys);
8904
+ for (const e of He.KEY_EVENTS) this.removeEventListener(e, this.stopKeys);
8880
8905
  this.unsubscribeStore?.(), this.unsubscribeTheme?.(), this.unsubscribeStore = null, this.unsubscribeTheme = null;
8881
8906
  }
8882
8907
  get strings() {
@@ -8904,9 +8929,9 @@ const rn = (De = class extends Qe {
8904
8929
  fire(e, n) {
8905
8930
  this.dispatchEvent(new CustomEvent(e, { detail: n, bubbles: !0, composed: !0 }));
8906
8931
  }
8907
- }, De.styles = [bo, wo], De.KEY_EVENTS = ["keydown", "keyup", "keypress"], De);
8932
+ }, He.styles = [wo, bo], He.KEY_EVENTS = ["keydown", "keyup", "keypress"], He);
8908
8933
  Io([
8909
- D()
8934
+ N()
8910
8935
  ], rn.prototype, "auth");
8911
8936
  let qe = rn;
8912
8937
  var Ao = Object.defineProperty, ko = Object.getOwnPropertyDescriptor, fe = (t, e, n, i) => {
@@ -8971,64 +8996,64 @@ de.styles = Ge`
8971
8996
  }
8972
8997
  `;
8973
8998
  fe([
8974
- O({ type: String })
8999
+ F({ type: String })
8975
9000
  ], de.prototype, "endpoint", 2);
8976
9001
  fe([
8977
- O({ type: String })
9002
+ F({ type: String })
8978
9003
  ], de.prototype, "project", 2);
8979
9004
  fe([
8980
- O({ type: String, attribute: "redirect-url" })
9005
+ F({ type: String, attribute: "redirect-url" })
8981
9006
  ], de.prototype, "redirectUrl", 2);
8982
9007
  fe([
8983
- O({ type: String, attribute: "success-url" })
9008
+ F({ type: String, attribute: "success-url" })
8984
9009
  ], de.prototype, "successUrl", 2);
8985
9010
  fe([
8986
- O({ type: String })
9011
+ F({ type: String })
8987
9012
  ], de.prototype, "methods", 2);
8988
9013
  fe([
8989
- O({ type: String, attribute: "sign-up" })
9014
+ F({ type: String, attribute: "sign-up" })
8990
9015
  ], de.prototype, "signUp", 2);
8991
9016
  fe([
8992
- O({ type: String, attribute: "require-name" })
9017
+ F({ type: String, attribute: "require-name" })
8993
9018
  ], de.prototype, "requireName", 2);
8994
9019
  fe([
8995
- O({ type: String })
9020
+ F({ type: String })
8996
9021
  ], de.prototype, "mfa", 2);
8997
9022
  fe([
8998
- O({ type: String, attribute: "security-phrase" })
9023
+ F({ type: String, attribute: "security-phrase" })
8999
9024
  ], de.prototype, "securityPhrase", 2);
9000
9025
  fe([
9001
- O({ type: String })
9026
+ F({ type: String })
9002
9027
  ], de.prototype, "name", 2);
9003
9028
  fe([
9004
- O({ type: String })
9029
+ F({ type: String })
9005
9030
  ], de.prototype, "logo", 2);
9006
9031
  fe([
9007
- O({ type: String })
9032
+ F({ type: String })
9008
9033
  ], de.prototype, "theme", 2);
9009
9034
  fe([
9010
- O({ type: String })
9035
+ F({ type: String })
9011
9036
  ], de.prototype, "radius", 2);
9012
9037
  fe([
9013
- O({ type: String })
9038
+ F({ type: String })
9014
9039
  ], de.prototype, "primary", 2);
9015
9040
  fe([
9016
- O({ type: String, attribute: "primary-foreground" })
9041
+ F({ type: String, attribute: "primary-foreground" })
9017
9042
  ], de.prototype, "primaryForeground", 2);
9018
9043
  fe([
9019
- O({ type: String, attribute: "terms-url" })
9044
+ F({ type: String, attribute: "terms-url" })
9020
9045
  ], de.prototype, "termsUrl", 2);
9021
9046
  fe([
9022
- O({ type: String, attribute: "privacy-url" })
9047
+ F({ type: String, attribute: "privacy-url" })
9023
9048
  ], de.prototype, "privacyUrl", 2);
9024
9049
  fe([
9025
- O({ type: String, attribute: "require-acceptance" })
9050
+ F({ type: String, attribute: "require-acceptance" })
9026
9051
  ], de.prototype, "requireAcceptance", 2);
9027
9052
  fe([
9028
- O({ type: String, attribute: "oauth-layout" })
9053
+ F({ type: String, attribute: "oauth-layout" })
9029
9054
  ], de.prototype, "oauthLayout", 2);
9030
9055
  fe([
9031
- O({ type: String })
9056
+ F({ type: String })
9032
9057
  ], de.prototype, "preview", 2);
9033
9058
  de = fe([
9034
9059
  ze("authui-config")
@@ -9066,7 +9091,7 @@ function xo(t, e, n) {
9066
9091
  const i = ui(e), o = ui(n);
9067
9092
  return !(t === "loading" && !i.includes("loading") || i.length > 0 && !i.includes(t) || o.includes(t));
9068
9093
  }
9069
- let bt = class extends Qe {
9094
+ let wt = class extends Qe {
9070
9095
  constructor() {
9071
9096
  super(...arguments), this.when = "", this.unless = "", this.status = M.getState().status, this.unsubscribe = null;
9072
9097
  }
@@ -9084,21 +9109,21 @@ let bt = class extends Qe {
9084
9109
  (this.status !== "loading" || ui(this.when).includes("loading")) && (this.setAttribute("ready", ""), this.style.display = "contents");
9085
9110
  }
9086
9111
  render() {
9087
- return this.visible ? w`<slot></slot>` : C;
9112
+ return this.visible ? b`<slot></slot>` : C;
9088
9113
  }
9089
9114
  };
9090
9115
  _t([
9091
- O({ type: String })
9092
- ], bt.prototype, "when", 2);
9116
+ F({ type: String })
9117
+ ], wt.prototype, "when", 2);
9093
9118
  _t([
9094
- O({ type: String })
9095
- ], bt.prototype, "unless", 2);
9119
+ F({ type: String })
9120
+ ], wt.prototype, "unless", 2);
9096
9121
  _t([
9097
- D()
9098
- ], bt.prototype, "status", 2);
9099
- bt = _t([
9122
+ N()
9123
+ ], wt.prototype, "status", 2);
9124
+ wt = _t([
9100
9125
  ze("authui-show")
9101
- ], bt);
9126
+ ], wt);
9102
9127
  const Co = Ge`
9103
9128
  :host {
9104
9129
  display: block;
@@ -9153,7 +9178,7 @@ const Co = Ge`
9153
9178
  height: 14px;
9154
9179
  margin: 0;
9155
9180
  }
9156
- `, se = (t) => w`<svg
9181
+ `, se = (t) => b`<svg
9157
9182
  xmlns="http://www.w3.org/2000/svg"
9158
9183
  viewBox="0 0 24 24"
9159
9184
  fill="none"
@@ -9246,7 +9271,7 @@ const Co = Ge`
9246
9271
  qr: se(
9247
9272
  G`<rect width="5" height="5" x="3" y="3" rx="1"/><rect width="5" height="5" x="16" y="3" rx="1"/><rect width="5" height="5" x="3" y="16" rx="1"/><path d="M21 16h-3a2 2 0 0 0-2 2v3"/><path d="M21 21v.01"/><path d="M12 7v3a2 2 0 0 1-2 2H7"/><path d="M3 12h.01"/><path d="M12 3h.01"/><path d="M12 16v.01"/><path d="M16 12h1"/><path d="M21 12v.01"/><path d="M12 21v-1"/>`
9248
9273
  )
9249
- }, me = (t, e = "0 0 24 24") => w`<svg xmlns="http://www.w3.org/2000/svg" viewBox=${e} aria-hidden="true">${t}</svg>`, Uo = {
9274
+ }, me = (t, e = "0 0 24 24") => b`<svg xmlns="http://www.w3.org/2000/svg" viewBox=${e} aria-hidden="true">${t}</svg>`, Uo = {
9250
9275
  google: me(
9251
9276
  G`<path fill="#4285F4" d="M23.49 12.27c0-.79-.07-1.54-.19-2.27H12v4.51h6.47a5.57 5.57 0 0 1-2.4 3.58v3h3.86c2.26-2.09 3.56-5.17 3.56-8.82z"/><path fill="#34A853" d="M12 24c3.24 0 5.95-1.08 7.93-2.91l-3.86-3c-1.08.72-2.45 1.16-4.07 1.16-3.13 0-5.78-2.11-6.73-4.96H1.29v3.09A11.99 11.99 0 0 0 12 24z"/><path fill="#FBBC05" d="M5.27 14.29A7.2 7.2 0 0 1 4.89 12c0-.8.14-1.57.38-2.29V6.62H1.29A11.97 11.97 0 0 0 0 12c0 1.94.46 3.77 1.29 5.38l3.98-3.09z"/><path fill="#EA4335" d="M12 4.75c1.77 0 3.35.61 4.6 1.8l3.42-3.42C17.95 1.19 15.24 0 12 0 7.31 0 3.26 2.69 1.29 6.62l3.98 3.09C6.22 6.86 8.87 4.75 12 4.75z"/>`
9252
9277
  ),
@@ -9309,7 +9334,7 @@ function Ai(t) {
9309
9334
  const e = (t.trim()[0] ?? "?").toUpperCase();
9310
9335
  return /[A-Z0-9]/i.test(e) ? e : q.user;
9311
9336
  }
9312
- function wt(t) {
9337
+ function bt(t) {
9313
9338
  typeof document > "u" || (document.querySelector("authui-modal") || document.body.appendChild(document.createElement("authui-modal")), queueMicrotask(() => {
9314
9339
  window.dispatchEvent(new CustomEvent("authui:open", { detail: { view: t } }));
9315
9340
  }));
@@ -9485,10 +9510,10 @@ let he = class extends qe {
9485
9510
  // ───────────────────────────── render ─────────────────────────────
9486
9511
  render() {
9487
9512
  const t = this.renderStep();
9488
- return w`
9513
+ return b`
9489
9514
  <div class="panel ${this.embedded ? "embedded" : ""}" part="panel">
9490
9515
  ${this.renderHeader()}
9491
- ${this.notice ? w`<div class="alert alert-${this.notice.tone}" role="status">
9516
+ ${this.notice ? b`<div class="alert alert-${this.notice.tone}" role="status">
9492
9517
  ${this.notice.tone === "success" ? q.checkCircle : this.notice.tone === "error" ? q.alert : q.info}
9493
9518
  <div class="alert-body">${this.notice.message}</div>
9494
9519
  <button
@@ -9531,9 +9556,9 @@ let he = class extends qe {
9531
9556
  n = this.t("mfaTitle"), i = this.t("mfaDescription");
9532
9557
  break;
9533
9558
  }
9534
- return w`
9559
+ return b`
9535
9560
  <div class="header">
9536
- ${t ? w`<img
9561
+ ${t ? b`<img
9537
9562
  class="logo"
9538
9563
  src=${t}
9539
9564
  alt=""
@@ -9541,30 +9566,30 @@ let he = class extends qe {
9541
9566
  o.target.hidden = !0;
9542
9567
  }}
9543
9568
  />` : C}
9544
- ${M.isPreview ? w`<span class="badge badge-info preview">${this.t("preview")}</span>` : C}
9569
+ ${M.isPreview ? b`<span class="badge badge-info preview">${this.t("preview")}</span>` : C}
9545
9570
  <h2 class="title" id="authui-title">${n}</h2>
9546
- ${i ? w`<p class="description">${i}</p>` : C}
9571
+ ${i ? b`<p class="description">${i}</p>` : C}
9547
9572
  </div>
9548
9573
  `;
9549
9574
  }
9550
9575
  renderError() {
9551
- return this.error ? w`<div class="alert alert-error" role="alert">
9576
+ return this.error ? b`<div class="alert alert-error" role="alert">
9552
9577
  ${q.alert}
9553
9578
  <div class="alert-body">${this.error}</div>
9554
9579
  </div>` : C;
9555
9580
  }
9556
9581
  submitButton(t, e = "btn-primary") {
9557
- return w`<button class="btn ${e} btn-block" type="submit" ?disabled=${this.busy}>
9558
- ${this.busy ? w`<span class="spinner" aria-hidden="true"></span>` : C} ${t}
9582
+ return b`<button class="btn ${e} btn-block" type="submit" ?disabled=${this.busy}>
9583
+ ${this.busy ? b`<span class="spinner" aria-hidden="true"></span>` : C} ${t}
9559
9584
  </button>`;
9560
9585
  }
9561
9586
  passwordField(t) {
9562
9587
  const e = this[t.field], n = t.field === "passwordConfirm" ? this.showPasswordConfirm : this.showPassword, i = t.meter ? pi(e) : null;
9563
- return w`
9588
+ return b`
9564
9589
  <div class="field">
9565
9590
  <div class="field-header">
9566
9591
  <label class="label" for=${t.id}>${t.label}</label>
9567
- ${t.forgot ? w`<button
9592
+ ${t.forgot ? b`<button
9568
9593
  type="button"
9569
9594
  class="btn btn-link small"
9570
9595
  @click=${() => this.go("forgot-password")}
@@ -9594,7 +9619,7 @@ let he = class extends qe {
9594
9619
  ${n ? q.eyeOff : q.eye}
9595
9620
  </button>
9596
9621
  </div>
9597
- ${i && e ? w`<div class="strength" aria-live="polite">
9622
+ ${i && e ? b`<div class="strength" aria-live="polite">
9598
9623
  <div
9599
9624
  class="strength-meter"
9600
9625
  data-level=${String(i.level)}
@@ -9608,12 +9633,12 @@ let he = class extends qe {
9608
9633
  <span></span><span></span><span></span><span></span>
9609
9634
  </div>
9610
9635
  <p class="strength-label">${this.t(i.labelKey)}</p>
9611
- </div>` : t.hint ? w`<p class="hint">${t.hint}</p>` : C}
9636
+ </div>` : t.hint ? b`<p class="hint">${t.hint}</p>` : C}
9612
9637
  </div>
9613
9638
  `;
9614
9639
  }
9615
9640
  emailField(t = "email") {
9616
- return w`
9641
+ return b`
9617
9642
  <div class="field">
9618
9643
  <label class="label" for="authui-email">${this.t("email")}</label>
9619
9644
  <input
@@ -9630,7 +9655,7 @@ let he = class extends qe {
9630
9655
  `;
9631
9656
  }
9632
9657
  codeField() {
9633
- return w`
9658
+ return b`
9634
9659
  <div class="field">
9635
9660
  <label class="label" for="authui-code">${this.t("code")}</label>
9636
9661
  <input
@@ -9659,15 +9684,15 @@ let he = class extends qe {
9659
9684
  }
9660
9685
  legalLinks() {
9661
9686
  const t = this.config?.legal;
9662
- return !t?.termsUrl && !t?.privacyUrl ? C : w`${t.termsUrl ? w`<a href=${t.termsUrl} target="_blank" rel="noopener">${this.t("terms")}</a>` : C}${t.termsUrl && t.privacyUrl ? w` ${this.t("and")} ` : C}${t.privacyUrl ? w`<a href=${t.privacyUrl} target="_blank" rel="noopener">${this.t("privacy")}</a>` : C}`;
9687
+ return !t?.termsUrl && !t?.privacyUrl ? C : b`${t.termsUrl ? b`<a href=${t.termsUrl} target="_blank" rel="noopener">${this.t("terms")}</a>` : C}${t.termsUrl && t.privacyUrl ? b` ${this.t("and")} ` : C}${t.privacyUrl ? b`<a href=${t.privacyUrl} target="_blank" rel="noopener">${this.t("privacy")}</a>` : C}`;
9663
9688
  }
9664
9689
  legal() {
9665
9690
  const t = this.config?.legal;
9666
- return !t?.termsUrl && !t?.privacyUrl || this.step === "sign-up" && this.needsLegalAcceptance() ? C : w`<p class="legal">${this.t("agreeTo")} ${this.legalLinks()}.</p>`;
9691
+ return !t?.termsUrl && !t?.privacyUrl || this.step === "sign-up" && this.needsLegalAcceptance() ? C : b`<p class="legal">${this.t("agreeTo")} ${this.legalLinks()}.</p>`;
9667
9692
  }
9668
9693
  /** Required acceptance checkbox on sign-up when legal.requireAcceptance is set. */
9669
9694
  legalAcceptField() {
9670
- return this.needsLegalAcceptance() ? w`<label class="legal-accept">
9695
+ return this.needsLegalAcceptance() ? b`<label class="legal-accept">
9671
9696
  <input
9672
9697
  type="checkbox"
9673
9698
  .checked=${this.legalAccepted}
@@ -9679,7 +9704,7 @@ let he = class extends qe {
9679
9704
  </label>` : C;
9680
9705
  }
9681
9706
  backLink(t = "sign-in") {
9682
- return w`<div class="links">
9707
+ return b`<div class="links">
9683
9708
  <button type="button" class="btn btn-link" @click=${() => this.go(t)}>
9684
9709
  ${q.arrowLeft} ${this.t("back")}
9685
9710
  </button>
@@ -9687,17 +9712,17 @@ let he = class extends qe {
9687
9712
  }
9688
9713
  renderStep() {
9689
9714
  if (this.auth.configError)
9690
- return w`<div class="alert alert-error" role="alert">
9715
+ return b`<div class="alert alert-error" role="alert">
9691
9716
  ${q.alert}
9692
9717
  <div class="alert-body">${this.auth.configError}</div>
9693
9718
  </div>`;
9694
9719
  if (!this.auth.configured)
9695
- return w`<div class="alert alert-error" role="alert">
9720
+ return b`<div class="alert alert-error" role="alert">
9696
9721
  ${q.alert}
9697
9722
  <div class="alert-body">${this.t("errorNotConfigured")}</div>
9698
9723
  </div>`;
9699
9724
  if (this.auth.status === "loading")
9700
- return w`<div class="empty"><span class="spinner"></span></div>`;
9725
+ return b`<div class="empty"><span class="spinner"></span></div>`;
9701
9726
  if (this.auth.status === "signed-in" && this.step !== "mfa") return this.renderSignedIn();
9702
9727
  switch (this.step) {
9703
9728
  case "sign-up":
@@ -9720,26 +9745,26 @@ let he = class extends qe {
9720
9745
  }
9721
9746
  renderSignedIn() {
9722
9747
  const t = this.auth.user, e = t.name || t.email || t.phone || this.t("guestAccount");
9723
- return w`
9748
+ return b`
9724
9749
  <div class="stack">
9725
9750
  <div class="row">
9726
9751
  <div class="inline">
9727
9752
  <span class="avatar">${Ai(e)}</span>
9728
9753
  <div class="row-main">
9729
9754
  <span class="row-title" title=${e}>${e}</span>
9730
- ${t.email && t.name ? w`<span class="row-sub" title=${t.email}>${t.email}</span>` : C}
9755
+ ${t.email && t.name ? b`<span class="row-sub" title=${t.email}>${t.email}</span>` : C}
9731
9756
  </div>
9732
9757
  </div>
9733
9758
  </div>
9734
9759
  ${this.renderError()}
9735
9760
  <div class="stack-sm">
9736
- ${this.config?.successUrl ? w`<a class="btn btn-primary btn-block" href=${this.config.successUrl}
9761
+ ${this.config?.successUrl ? b`<a class="btn btn-primary btn-block" href=${this.config.successUrl}
9737
9762
  >${this.t("continue")}</a
9738
9763
  >` : C}
9739
9764
  <button
9740
9765
  class="btn btn-outline btn-block"
9741
9766
  @click=${() => {
9742
- this.embedded ? this.fire("authui-open", { view: "account" }) : wt("account");
9767
+ this.embedded ? this.fire("authui-open", { view: "account" }) : bt("account");
9743
9768
  }}
9744
9769
  >
9745
9770
  ${q.settings} ${this.t("manageAccount")}
@@ -9760,11 +9785,11 @@ let he = class extends qe {
9760
9785
  const c = e === `oauth:${r}` ? 0 : 1, p = e === `oauth:${d}` ? 0 : 1;
9761
9786
  return c - p;
9762
9787
  });
9763
- return w`
9788
+ return b`
9764
9789
  <div class="providers icon">
9765
9790
  ${s.map((r) => {
9766
9791
  const d = e === `oauth:${r}`, c = this.t("continueWith", { provider: pt(r) });
9767
- return w`<button
9792
+ return b`<button
9768
9793
  type="button"
9769
9794
  class="btn btn-outline ${d ? "last-used" : ""}"
9770
9795
  @click=${() => this.onOAuth(r)}
@@ -9773,7 +9798,7 @@ let he = class extends qe {
9773
9798
  title=${c}
9774
9799
  >
9775
9800
  ${ht(r)}
9776
- ${d ? w`<span class="oauth-last-used-dot" aria-hidden="true"></span>` : C}
9801
+ ${d ? b`<span class="oauth-last-used-dot" aria-hidden="true"></span>` : C}
9777
9802
  </button>`;
9778
9803
  })}
9779
9804
  </div>
@@ -9784,11 +9809,11 @@ let he = class extends qe {
9784
9809
  const c = e === `oauth:${r}` ? 0 : 1, p = e === `oauth:${d}` ? 0 : 1;
9785
9810
  return c - p;
9786
9811
  });
9787
- return w`
9812
+ return b`
9788
9813
  <div class="providers">
9789
9814
  ${s.map((r) => {
9790
9815
  const d = e === `oauth:${r}`, c = this.t("continueWith", { provider: pt(r) });
9791
- return w`<button
9816
+ return b`<button
9792
9817
  type="button"
9793
9818
  class="btn btn-outline ${d ? "last-used" : ""}"
9794
9819
  @click=${() => this.onOAuth(r)}
@@ -9797,14 +9822,14 @@ let he = class extends qe {
9797
9822
  >
9798
9823
  ${ht(r)}
9799
9824
  <span>${c}</span>
9800
- ${d ? w`<span class="last-used-badge">${this.t("lastUsed")}</span>` : C}
9825
+ ${d ? b`<span class="last-used-badge">${this.t("lastUsed")}</span>` : C}
9801
9826
  </button>`;
9802
9827
  })}
9803
9828
  </div>
9804
9829
  `;
9805
9830
  }
9806
9831
  const a = this.expandedOAuth && t.includes(this.expandedOAuth) ? this.expandedOAuth : n ?? t[0];
9807
- return w`
9832
+ return b`
9808
9833
  <div
9809
9834
  class="providers accordion"
9810
9835
  @mouseleave=${() => {
@@ -9813,7 +9838,7 @@ let he = class extends qe {
9813
9838
  >
9814
9839
  ${t.map((s) => {
9815
9840
  const r = e === `oauth:${s}`, d = a === s, c = this.t("continueWith", { provider: pt(s) });
9816
- return w`<div
9841
+ return b`<div
9817
9842
  class="provider-slot ${d ? "is-expanded" : ""}"
9818
9843
  @mouseenter=${() => {
9819
9844
  this.expandedOAuth = s;
@@ -9833,7 +9858,7 @@ let he = class extends qe {
9833
9858
  <span class="provider-label"
9834
9859
  ><span><span class="provider-label-text">${c}</span></span></span
9835
9860
  >
9836
- ${r ? w`<span class="oauth-last-used" data-last-used=${s} aria-hidden="true">
9861
+ ${r ? b`<span class="oauth-last-used" data-last-used=${s} aria-hidden="true">
9837
9862
  <span class="oauth-last-used-dot"></span>
9838
9863
  <span class="oauth-last-used-pill">${this.t("lastUsed")}</span>
9839
9864
  </span>` : C}
@@ -9849,46 +9874,46 @@ let he = class extends qe {
9849
9874
  t.emailOtp ? { step: "email-otp", icon: q.mail, label: this.t("continueWithEmail") } : null,
9850
9875
  t.phone ? { step: "phone", icon: q.smartphone, label: this.t("continueWithPhone") } : null
9851
9876
  ].filter(Boolean);
9852
- return w`
9877
+ return b`
9853
9878
  <div class="stack">
9854
9879
  ${this.renderProviders()}
9855
- ${n && (e || i.length > 0) ? w`<div class="separator-text">${this.t("or")}</div>` : C}
9856
- ${e ? w`<form
9880
+ ${n && (e || i.length > 0) ? b`<div class="separator-text">${this.t("or")}</div>` : C}
9881
+ ${e ? b`<form
9857
9882
  class="form ${Fe() === "email-password" ? "last-used-form" : ""}"
9858
9883
  @submit=${this.onSignIn}
9859
9884
  novalidate
9860
9885
  >
9861
- ${Fe() === "email-password" ? w`<p class="hint">
9886
+ ${Fe() === "email-password" ? b`<p class="hint">
9862
9887
  <span class="last-used-badge">${this.t("lastUsed")}</span>
9863
9888
  </p>` : C}
9864
9889
  ${this.emailField()}
9865
9890
  ${this.passwordField({ label: this.t("password"), autocomplete: "current-password", id: "authui-password", field: "password", forgot: !0 })}
9866
9891
  ${this.renderError()} ${this.submitButton(this.t("signIn"))}
9867
9892
  </form>` : this.renderError()}
9868
- ${i.length > 0 ? w`<div class="stack-sm">
9893
+ ${i.length > 0 ? b`<div class="stack-sm">
9869
9894
  ${i.map((o) => {
9870
9895
  const a = Fe() === o.step;
9871
- return w`<button
9896
+ return b`<button
9872
9897
  type="button"
9873
9898
  class="btn btn-secondary btn-block ${a ? "last-used" : ""}"
9874
9899
  @click=${() => this.go(o.step)}
9875
9900
  ?disabled=${this.busy}
9876
9901
  >
9877
9902
  ${o.icon} ${o.label}
9878
- ${a ? w`<span class="last-used-badge">${this.t("lastUsed")}</span>` : C}
9903
+ ${a ? b`<span class="last-used-badge">${this.t("lastUsed")}</span>` : C}
9879
9904
  </button>`;
9880
9905
  })}
9881
9906
  </div>` : C}
9882
- ${t.anonymous ? w`<button
9907
+ ${t.anonymous ? b`<button
9883
9908
  type="button"
9884
9909
  class="btn btn-ghost btn-block ${Fe() === "anonymous" ? "last-used" : ""}"
9885
9910
  @click=${this.onGuest}
9886
9911
  ?disabled=${this.busy}
9887
9912
  >
9888
9913
  ${q.ghost} ${this.t("continueAsGuest")}
9889
- ${Fe() === "anonymous" ? w`<span class="last-used-badge">${this.t("lastUsed")}</span>` : C}
9914
+ ${Fe() === "anonymous" ? b`<span class="last-used-badge">${this.t("lastUsed")}</span>` : C}
9890
9915
  </button>` : C}
9891
- ${e && this.config?.signUp !== !1 ? w`<div class="links">
9916
+ ${e && this.config?.signUp !== !1 ? b`<div class="links">
9892
9917
  <span>${this.t("noAccount")}</span>
9893
9918
  <button type="button" class="btn btn-link" @click=${() => this.go("sign-up")}>
9894
9919
  ${this.t("signUp")}
@@ -9900,12 +9925,12 @@ let he = class extends qe {
9900
9925
  }
9901
9926
  renderSignUp() {
9902
9927
  const t = this.legalErrorFromOAuth && this.error === this.t("errorLegalRequired");
9903
- return w`
9928
+ return b`
9904
9929
  <div class="stack">
9905
9930
  ${this.renderProviders()} ${t ? this.renderError() : C}
9906
- ${(this.config?.methods?.oauth?.length ?? 0) > 0 ? w`<div class="separator-text">${this.t("or")}</div>` : C}
9931
+ ${(this.config?.methods?.oauth?.length ?? 0) > 0 ? b`<div class="separator-text">${this.t("or")}</div>` : C}
9907
9932
  <form class="form" @submit=${this.onSignUp} novalidate>
9908
- ${this.config?.requireName !== !1 ? w`<div class="field">
9933
+ ${this.config?.requireName !== !1 ? b`<div class="field">
9909
9934
  <label class="label" for="authui-name">${this.t("name")}</label>
9910
9935
  <input
9911
9936
  class="input"
@@ -9933,7 +9958,7 @@ let he = class extends qe {
9933
9958
  `;
9934
9959
  }
9935
9960
  renderForgot() {
9936
- return w`
9961
+ return b`
9937
9962
  <div class="stack">
9938
9963
  <form class="form" @submit=${this.onForgot} novalidate>
9939
9964
  ${this.emailField()} ${this.renderError()} ${this.submitButton(this.t("sendResetLink"))}
@@ -9943,7 +9968,7 @@ let he = class extends qe {
9943
9968
  `;
9944
9969
  }
9945
9970
  renderReset() {
9946
- return this.recovery ? w`
9971
+ return this.recovery ? b`
9947
9972
  <div class="stack">
9948
9973
  <form class="form" @submit=${this.onReset} novalidate>
9949
9974
  ${this.passwordField({ label: this.t("newPassword"), autocomplete: "new-password", id: "authui-password", field: "password", hint: this.t("passwordHint"), meter: !0 })}
@@ -9962,7 +9987,7 @@ let he = class extends qe {
9962
9987
  </button>
9963
9988
  </div>
9964
9989
  </div>
9965
- ` : w`<div class="stack">
9990
+ ` : b`<div class="stack">
9966
9991
  <div class="alert alert-error" role="alert">
9967
9992
  ${q.alert}
9968
9993
  <div class="alert-body">${this.t("errorInvalidToken")}</div>
@@ -9981,7 +10006,7 @@ let he = class extends qe {
9981
10006
  </div>`;
9982
10007
  }
9983
10008
  phraseBox(t) {
9984
- return t ? w`<div class="alert alert-info">
10009
+ return t ? b`<div class="alert alert-info">
9985
10010
  ${q.shield}
9986
10011
  <div class="alert-title">
9987
10012
  ${this.t("securityPhrase")}: <span class="code">${t}</span>
@@ -9990,13 +10015,13 @@ let he = class extends qe {
9990
10015
  </div>` : C;
9991
10016
  }
9992
10017
  renderMagicUrl() {
9993
- return this.token ? w`<div class="stack">
10018
+ return this.token ? b`<div class="stack">
9994
10019
  <div class="alert alert-success" role="status">
9995
10020
  ${q.mail}
9996
10021
  <div class="alert-body">${this.t("magicLinkSent", { email: this.token.target })}</div>
9997
10022
  </div>
9998
10023
  ${this.phraseBox(this.token.phrase)} ${this.backLink()}
9999
- </div>` : w`
10024
+ </div>` : b`
10000
10025
  <div class="stack">
10001
10026
  <form class="form" @submit=${this.onMagicUrl} novalidate>
10002
10027
  ${this.emailField()} ${this.renderError()} ${this.submitButton(this.t("sendMagicLink"))}
@@ -10025,7 +10050,7 @@ let he = class extends qe {
10025
10050
  }
10026
10051
  renderCodeEntry() {
10027
10052
  const t = this.token?.kind === "phone", e = Date.now() < this.resendCooldownUntil;
10028
- return w`
10053
+ return b`
10029
10054
  <div class="alert alert-info" role="status">
10030
10055
  ${t ? q.smartphone : q.mail}
10031
10056
  <div class="alert-body">${this.t("codeSent", { target: this.token.target })}</div>
@@ -10059,7 +10084,7 @@ let he = class extends qe {
10059
10084
  `;
10060
10085
  }
10061
10086
  renderEmailOtp() {
10062
- return this.token ? w`<div class="stack">${this.renderCodeEntry()}</div>` : w`
10087
+ return this.token ? b`<div class="stack">${this.renderCodeEntry()}</div>` : b`
10063
10088
  <div class="stack">
10064
10089
  <form class="form" @submit=${this.onEmailOtp} novalidate>
10065
10090
  ${this.emailField()} ${this.renderError()} ${this.submitButton(this.t("sendCode"))}
@@ -10069,7 +10094,7 @@ let he = class extends qe {
10069
10094
  `;
10070
10095
  }
10071
10096
  renderPhone() {
10072
- return this.token ? w`<div class="stack">${this.renderCodeEntry()}</div>` : w`
10097
+ return this.token ? b`<div class="stack">${this.renderCodeEntry()}</div>` : b`
10073
10098
  <div class="stack">
10074
10099
  <form class="form" @submit=${this.onPhoneOtp} novalidate>
10075
10100
  <div class="field">
@@ -10120,11 +10145,11 @@ let he = class extends qe {
10120
10145
  available: t?.recoveryCode ?? !0
10121
10146
  }
10122
10147
  ];
10123
- return w`
10148
+ return b`
10124
10149
  <div class="stack">
10125
10150
  <div class="stack-sm">
10126
10151
  ${n.filter((i) => i.available).map(
10127
- (i) => w`<button
10152
+ (i) => b`<button
10128
10153
  type="button"
10129
10154
  class="choice"
10130
10155
  @click=${() => this.onChooseFactor(i.factor)}
@@ -10144,10 +10169,10 @@ let he = class extends qe {
10144
10169
  `;
10145
10170
  }
10146
10171
  const e = this.challenge.factor === "recoverycode";
10147
- return w`
10172
+ return b`
10148
10173
  <div class="stack">
10149
10174
  <form class="form" @submit=${this.onVerifyFactor} novalidate>
10150
- ${e ? w`<div class="field">
10175
+ ${e ? b`<div class="field">
10151
10176
  <label class="label" for="authui-code">${this.t("recoveryCode")}</label>
10152
10177
  <input
10153
10178
  class="input mono"
@@ -10176,70 +10201,70 @@ let he = class extends qe {
10176
10201
  };
10177
10202
  he.styles = [...qe.styles, Co];
10178
10203
  ye([
10179
- O({ type: String })
10204
+ F({ type: String })
10180
10205
  ], he.prototype, "view", 2);
10181
10206
  ye([
10182
- O({ type: Boolean })
10207
+ F({ type: Boolean })
10183
10208
  ], he.prototype, "embedded", 2);
10184
10209
  ye([
10185
- D()
10210
+ N()
10186
10211
  ], he.prototype, "step", 2);
10187
10212
  ye([
10188
- D()
10213
+ N()
10189
10214
  ], he.prototype, "busy", 2);
10190
10215
  ye([
10191
- D()
10216
+ N()
10192
10217
  ], he.prototype, "error", 2);
10193
10218
  ye([
10194
- D()
10219
+ N()
10195
10220
  ], he.prototype, "notice", 2);
10196
10221
  ye([
10197
- D()
10222
+ N()
10198
10223
  ], he.prototype, "showPassword", 2);
10199
10224
  ye([
10200
- D()
10225
+ N()
10201
10226
  ], he.prototype, "showPasswordConfirm", 2);
10202
10227
  ye([
10203
- D()
10228
+ N()
10204
10229
  ], he.prototype, "expandedOAuth", 2);
10205
10230
  ye([
10206
- D()
10231
+ N()
10207
10232
  ], he.prototype, "token", 2);
10208
10233
  ye([
10209
- D()
10234
+ N()
10210
10235
  ], he.prototype, "resendCooldownUntil", 2);
10211
10236
  ye([
10212
- D()
10237
+ N()
10213
10238
  ], he.prototype, "challenge", 2);
10214
10239
  ye([
10215
- D()
10240
+ N()
10216
10241
  ], he.prototype, "recovery", 2);
10217
10242
  ye([
10218
- wi("form input:not([type=hidden])")
10243
+ bi("form input:not([type=hidden])")
10219
10244
  ], he.prototype, "firstInput", 2);
10220
10245
  ye([
10221
- D()
10246
+ N()
10222
10247
  ], he.prototype, "password", 2);
10223
10248
  ye([
10224
- D()
10249
+ N()
10225
10250
  ], he.prototype, "passwordConfirm", 2);
10226
10251
  ye([
10227
- D()
10252
+ N()
10228
10253
  ], he.prototype, "legalAccepted", 2);
10229
10254
  ye([
10230
- D()
10255
+ N()
10231
10256
  ], he.prototype, "legalErrorFromOAuth", 2);
10232
10257
  he = ye([
10233
10258
  ze("authui-sign-in")
10234
10259
  ], he);
10235
- var qo = Object.defineProperty, _o = Object.getOwnPropertyDescriptor, F = (t, e, n, i) => {
10260
+ var qo = Object.defineProperty, _o = Object.getOwnPropertyDescriptor, O = (t, e, n, i) => {
10236
10261
  for (var o = i > 1 ? void 0 : i ? _o(e, n) : e, a = t.length - 1, s; a >= 0; a--)
10237
10262
  (s = t[a]) && (o = (i ? s(e, n, o) : s(o)) || o);
10238
10263
  return i && o && qo(e, n, o), o;
10239
10264
  };
10240
10265
  let z = class extends qe {
10241
10266
  constructor() {
10242
- super(...arguments), this.embedded = !1, this.tab = "profile", this.active = "profile", this.busy = "", this.notice = null, this.errors = {}, this.nameInput = "", this.emailInput = "", this.emailPassword = "", this.phoneInput = "", this.phonePassword = "", this.phoneCode = "", this.phoneCodeSent = !1, this.guestName = "", this.oldPassword = "", this.newPassword = "", this.newPasswordConfirm = "", this.authenticator = null, this.authenticatorCode = "", this.factors = null, this.recoveryCodes = null, this.stepUp = null, this.stepUpCode = "", this.copied = !1, this.sessions = null, this.identities = null, this.logs = null, this.logsSupported = null, this.logsProbeStarted = !1, this.confirmDelete = !1, this.confirmRegenerate = !1, this.confirmRemoveAuthenticator = !1, this.confirmSignOutAll = !1, this.confirmDisconnectId = null, this.verifyEmailCooldownUntil = 0, this.verifyEmailCooldownTimer = null, this.onTabsKeydown = (t) => {
10267
+ super(...arguments), this.embedded = !1, this.tab = "profile", this.active = "profile", this.busy = "", this.notice = null, this.errors = {}, this.nameInput = "", this.emailInput = "", this.emailPassword = "", this.phoneInput = "", this.phonePassword = "", this.phoneCode = "", this.phoneCodeSent = !1, this.guestName = "", this.oldPassword = "", this.newPassword = "", this.newPasswordConfirm = "", this.showOldPassword = !1, this.showNewPassword = !1, this.showNewPasswordConfirm = !1, this.authenticator = null, this.authenticatorCode = "", this.factors = null, this.recoveryCodes = null, this.stepUp = null, this.stepUpCode = "", this.copied = !1, this.sessions = null, this.identities = null, this.logs = null, this.logsSupported = null, this.logsProbeStarted = !1, this.confirmDelete = !1, this.confirmRegenerate = !1, this.confirmRemoveAuthenticator = !1, this.confirmSignOutAll = !1, this.confirmDisconnectId = null, this.verifyEmailCooldownUntil = 0, this.verifyEmailCooldownTimer = null, this.verifyPhoneCooldownUntil = 0, this.verifyPhoneCooldownTimer = null, this.onTabsKeydown = (t) => {
10243
10268
  const e = [...this.renderRoot?.querySelectorAll('[role="tab"]') ?? []];
10244
10269
  if (!e.length) return;
10245
10270
  const n = e.findIndex((a) => a.getAttribute("aria-selected") === "true");
@@ -10288,14 +10313,14 @@ let z = class extends qe {
10288
10313
  this.t("verificationSent")
10289
10314
  );
10290
10315
  }, this.onSendPhoneVerification = () => {
10291
- this.run("verify-phone", async () => {
10292
- await M.sendPhoneVerification(), this.phoneCodeSent = !0;
10316
+ Date.now() < this.verifyPhoneCooldownUntil || this.run("verify-phone", async () => {
10317
+ await M.sendPhoneVerification(), this.phoneCodeSent = !0, this.startVerifyPhoneCooldown();
10293
10318
  });
10294
10319
  }, this.onConfirmPhoneVerification = (t) => {
10295
10320
  t.preventDefault(), this.requireValid(t) && this.run(
10296
10321
  "verify-phone-code",
10297
10322
  async () => {
10298
- await M.confirmPhoneVerification(this.phoneCode), this.phoneCode = "", this.phoneCodeSent = !1;
10323
+ await M.confirmPhoneVerification(this.phoneCode), this.phoneCode = "", this.phoneCodeSent = !1, this.verifyPhoneCooldownUntil = 0, this.clearVerifyPhoneCooldownTimer();
10299
10324
  },
10300
10325
  this.t("phoneVerified")
10301
10326
  );
@@ -10416,7 +10441,7 @@ let z = class extends qe {
10416
10441
  super.connectedCallback(), this.active = this.tab, this.hydrate();
10417
10442
  }
10418
10443
  disconnectedCallback() {
10419
- super.disconnectedCallback(), this.clearVerifyEmailCooldownTimer(), this.noticeTimer && (clearTimeout(this.noticeTimer), this.noticeTimer = null);
10444
+ super.disconnectedCallback(), this.clearVerifyEmailCooldownTimer(), this.clearVerifyPhoneCooldownTimer(), this.noticeTimer && (clearTimeout(this.noticeTimer), this.noticeTimer = null);
10420
10445
  }
10421
10446
  willUpdate(t) {
10422
10447
  t.has("tab") && t.get("tab") !== void 0 && (this.active = this.tab), t.has("auth") && this.hydrate(), this.ensureLoaded();
@@ -10445,7 +10470,7 @@ let z = class extends qe {
10445
10470
  '.tab[aria-selected="true"]'
10446
10471
  );
10447
10472
  n && typeof n.scrollIntoView == "function" && n.scrollIntoView({ inline: "nearest", block: "nearest", behavior: "smooth" });
10448
- }), (t.has("confirmDelete") && this.confirmDelete || t.has("confirmSignOutAll") && this.confirmSignOutAll || t.has("confirmDisconnectId") && this.confirmDisconnectId !== null) && requestAnimationFrame(() => {
10473
+ }), (t.has("confirmDelete") && this.confirmDelete || t.has("confirmSignOutAll") && this.confirmSignOutAll || t.has("confirmDisconnectId") && this.confirmDisconnectId !== null || t.has("confirmRegenerate") && this.confirmRegenerate || t.has("confirmRemoveAuthenticator") && this.confirmRemoveAuthenticator) && requestAnimationFrame(() => {
10449
10474
  this.renderRoot.querySelector(
10450
10475
  ".card-footer [autofocus], .row-actions [autofocus], .inline [autofocus], .card-footer .btn-outline, .row-actions .btn-outline, .inline .btn-outline"
10451
10476
  )?.focus({ preventScroll: !0 });
@@ -10541,6 +10566,14 @@ let z = class extends qe {
10541
10566
  clearVerifyEmailCooldownTimer() {
10542
10567
  this.verifyEmailCooldownTimer && (clearInterval(this.verifyEmailCooldownTimer), this.verifyEmailCooldownTimer = null);
10543
10568
  }
10569
+ startVerifyPhoneCooldown() {
10570
+ this.verifyPhoneCooldownUntil = Date.now() + 45e3, this.clearVerifyPhoneCooldownTimer(), this.verifyPhoneCooldownTimer = setInterval(() => {
10571
+ this.requestUpdate(), Date.now() >= this.verifyPhoneCooldownUntil && this.clearVerifyPhoneCooldownTimer();
10572
+ }, 1e3);
10573
+ }
10574
+ clearVerifyPhoneCooldownTimer() {
10575
+ this.verifyPhoneCooldownTimer && (clearInterval(this.verifyPhoneCooldownTimer), this.verifyPhoneCooldownTimer = null);
10576
+ }
10544
10577
  bind(t) {
10545
10578
  return (e) => {
10546
10579
  this[t] = e.target.value;
@@ -10549,16 +10582,16 @@ let z = class extends qe {
10549
10582
  // ─────────────────────────── render ───────────────────────────
10550
10583
  render() {
10551
10584
  if (!this.auth.configured)
10552
- return w`<div class="alert alert-error" role="alert">
10585
+ return b`<div class="alert alert-error" role="alert">
10553
10586
  ${q.alert}
10554
10587
  <div class="alert-body">${this.t("errorNotConfigured")}</div>
10555
10588
  </div>`;
10556
10589
  if (this.auth.status === "loading")
10557
- return w`<div class="panel ${this.embedded ? "embedded" : ""}" part="panel">
10590
+ return b`<div class="panel ${this.embedded ? "embedded" : ""}" part="panel">
10558
10591
  <div class="empty"><span class="spinner"></span></div>
10559
10592
  </div>`;
10560
10593
  if (!this.user)
10561
- return w`<div class="panel ${this.embedded ? "embedded" : ""}">
10594
+ return b`<div class="panel ${this.embedded ? "embedded" : ""}">
10562
10595
  <authui-sign-in embedded></authui-sign-in>
10563
10596
  </div>`;
10564
10597
  const t = [
@@ -10568,12 +10601,12 @@ let z = class extends qe {
10568
10601
  { id: "connections", label: this.t("connections") },
10569
10602
  ...this.logsSupported ? [{ id: "activity", label: this.t("activity") }] : []
10570
10603
  ];
10571
- return w`
10604
+ return b`
10572
10605
  <div class="panel ${this.embedded ? "embedded" : ""}" part="panel">
10573
10606
  ${this.renderIdentity()}
10574
10607
  <div class="tabs" role="tablist" @keydown=${this.onTabsKeydown}>
10575
10608
  ${t.map(
10576
- (e) => w`<button
10609
+ (e) => b`<button
10577
10610
  class="tab"
10578
10611
  role="tab"
10579
10612
  id=${`authui-tab-${e.id}`}
@@ -10586,7 +10619,7 @@ let z = class extends qe {
10586
10619
  </button>`
10587
10620
  )}
10588
10621
  </div>
10589
- ${this.notice ? w`<div class="alert alert-${this.notice.tone}" role="status">
10622
+ ${this.notice ? b`<div class="alert alert-${this.notice.tone}" role="status">
10590
10623
  ${this.notice.tone === "success" ? q.checkCircle : q.info}
10591
10624
  <div class="alert-body">${this.notice.message}</div>
10592
10625
  <button
@@ -10599,7 +10632,7 @@ let z = class extends qe {
10599
10632
  ${q.x}
10600
10633
  </button>
10601
10634
  </div>` : C}
10602
- ${this.stepUp ? this.renderStepUp() : w`<div
10635
+ ${this.stepUp ? this.renderStepUp() : b`<div
10603
10636
  class="tabpanel"
10604
10637
  role="tabpanel"
10605
10638
  id=${`authui-panel-${this.active}`}
@@ -10612,17 +10645,17 @@ let z = class extends qe {
10612
10645
  }
10613
10646
  renderIdentity() {
10614
10647
  const t = this.user, e = t.name || t.email || t.phone || this.t("guestAccount");
10615
- return w`
10648
+ return b`
10616
10649
  <div class="between">
10617
10650
  <div class="identity">
10618
10651
  <span class="avatar">${Ai(e)}</span>
10619
10652
  <div class="row-main">
10620
10653
  <span class="row-title" title=${e}>
10621
10654
  ${e}
10622
- ${t.mfa ? w`<span class="badge badge-success">${q.shieldCheck} ${this.t("mfaBadge")}</span>` : C}
10623
- ${M.isPreview ? w`<span class="badge badge-info">${this.t("preview")}</span>` : C}
10655
+ ${t.mfa ? b`<span class="badge badge-success">${q.shieldCheck} ${this.t("mfaBadge")}</span>` : C}
10656
+ ${M.isPreview ? b`<span class="badge badge-info">${this.t("preview")}</span>` : C}
10624
10657
  </span>
10625
- ${t.email && t.name ? w`<span class="row-sub" title=${t.email}>${t.email}</span>` : C}
10658
+ ${t.email && t.name ? b`<span class="row-sub" title=${t.email}>${t.email}</span>` : C}
10626
10659
  </div>
10627
10660
  </div>
10628
10661
  <button class="btn btn-outline btn-sm" @click=${() => M.signOut()}>
@@ -10647,27 +10680,27 @@ let z = class extends qe {
10647
10680
  }
10648
10681
  error(t) {
10649
10682
  const e = this.errors[t];
10650
- return e ? w`<div class="alert alert-error" role="alert">
10683
+ return e ? b`<div class="alert alert-error" role="alert">
10651
10684
  ${q.alert}
10652
10685
  <div class="alert-body">${e}</div>
10653
10686
  </div>` : C;
10654
10687
  }
10655
10688
  spinner(t) {
10656
- return this.busy === t ? w`<span class="spinner" aria-hidden="true"></span>` : C;
10689
+ return this.busy === t ? b`<span class="spinner" aria-hidden="true"></span>` : C;
10657
10690
  }
10658
10691
  card(t, e, n, i, o = !1) {
10659
- return w`<section class="card ${o ? "card-danger" : ""}">
10692
+ return b`<section class="card ${o ? "card-danger" : ""}">
10660
10693
  <div class="card-header">
10661
10694
  <h3 class="card-title">${t}</h3>
10662
- ${e ? w`<p class="card-description">${e}</p>` : C}
10695
+ ${e ? b`<p class="card-description">${e}</p>` : C}
10663
10696
  </div>
10664
- ${n !== C ? w`<div class="card-body">${n}</div>` : C}
10665
- ${i ? w`<div class="card-footer">${i}</div>` : C}
10697
+ ${n !== C ? b`<div class="card-body">${n}</div>` : C}
10698
+ ${i ? b`<div class="card-footer">${i}</div>` : C}
10666
10699
  </section>`;
10667
10700
  }
10668
10701
  /** Vibes-style confirm footer: Cancel first (autofocus), destructive only on confirm. */
10669
10702
  confirmFooter(t, e, n, i) {
10670
- return w`
10703
+ return b`
10671
10704
  <button
10672
10705
  type="button"
10673
10706
  class="btn btn-outline btn-sm"
@@ -10688,23 +10721,23 @@ let z = class extends qe {
10688
10721
  `;
10689
10722
  }
10690
10723
  emptyState(t, e, n) {
10691
- return w`<div class="empty empty-well">
10724
+ return b`<div class="empty empty-well">
10692
10725
  <div class="empty-icon" aria-hidden="true">${t}</div>
10693
10726
  <p class="empty-title">${e}</p>
10694
10727
  <p class="empty-desc">${n}</p>
10695
10728
  </div>`;
10696
10729
  }
10697
10730
  verifiedBadge(t) {
10698
- return t ? w`<span class="badge badge-success">${q.check} ${this.t("verified")}</span>` : w`<span class="badge badge-warning">${this.t("unverified")}</span>`;
10731
+ return t ? b`<span class="badge badge-success">${q.check} ${this.t("verified")}</span>` : b`<span class="badge badge-warning">${this.t("unverified")}</span>`;
10699
10732
  }
10700
10733
  // ── Profile ──
10701
10734
  renderProfile() {
10702
10735
  const t = this.user;
10703
- return this.isGuest ? w`<div class="section">
10736
+ return this.isGuest ? b`<div class="section">
10704
10737
  ${this.card(
10705
10738
  this.t("guestAccount"),
10706
10739
  this.t("guestAccountDescription"),
10707
- w`<form class="form" id="guest-form" @submit=${this.onConvertGuest} novalidate>
10740
+ b`<form class="form" id="guest-form" @submit=${this.onConvertGuest} novalidate>
10708
10741
  <div class="field">
10709
10742
  <label class="label" for="guest-name">${this.t("name")}</label>
10710
10743
  <input
@@ -10741,7 +10774,7 @@ let z = class extends qe {
10741
10774
  />
10742
10775
  ${this.emailPassword ? (() => {
10743
10776
  const e = pi(this.emailPassword);
10744
- return w`<div class="strength" aria-live="polite">
10777
+ return b`<div class="strength" aria-live="polite">
10745
10778
  <div
10746
10779
  class="strength-meter"
10747
10780
  data-level=${String(e.level)}
@@ -10756,11 +10789,11 @@ let z = class extends qe {
10756
10789
  </div>
10757
10790
  <p class="strength-label">${this.t(e.labelKey)}</p>
10758
10791
  </div>`;
10759
- })() : w`<p class="hint">${this.t("passwordHint")}</p>`}
10792
+ })() : b`<p class="hint">${this.t("passwordHint")}</p>`}
10760
10793
  </div>
10761
10794
  ${this.error("guest")}
10762
10795
  </form>`,
10763
- w`<button
10796
+ b`<button
10764
10797
  class="btn btn-primary btn-sm"
10765
10798
  type="submit"
10766
10799
  form="guest-form"
@@ -10769,11 +10802,11 @@ let z = class extends qe {
10769
10802
  ${this.spinner("guest")} ${this.t("createAccount")}
10770
10803
  </button>`
10771
10804
  )}
10772
- </div>` : w`<div class="section">
10805
+ </div>` : b`<div class="section">
10773
10806
  ${this.card(
10774
10807
  this.t("name"),
10775
10808
  void 0,
10776
- w`<form class="form" id="name-form" @submit=${this.onUpdateName} novalidate>
10809
+ b`<form class="form" id="name-form" @submit=${this.onUpdateName} novalidate>
10777
10810
  <div class="field">
10778
10811
  <label class="label" for="acc-name">${this.t("name")}</label>
10779
10812
  <input
@@ -10787,7 +10820,7 @@ let z = class extends qe {
10787
10820
  </div>
10788
10821
  ${this.error("name")}
10789
10822
  </form>`,
10790
- w`<button
10823
+ b`<button
10791
10824
  class="btn btn-primary btn-sm"
10792
10825
  type="submit"
10793
10826
  form="name-form"
@@ -10799,7 +10832,7 @@ let z = class extends qe {
10799
10832
  ${this.card(
10800
10833
  this.t("email"),
10801
10834
  void 0,
10802
- w`<form class="form" id="email-form" @submit=${this.onUpdateEmail} novalidate>
10835
+ b`<form class="form" id="email-form" @submit=${this.onUpdateEmail} novalidate>
10803
10836
  <div class="field">
10804
10837
  <label class="label" for="acc-email"
10805
10838
  >${this.t("email")}
@@ -10815,7 +10848,7 @@ let z = class extends qe {
10815
10848
  required
10816
10849
  />
10817
10850
  </div>
10818
- ${this.emailInput !== t.email ? w`<div class="field">
10851
+ ${this.emailInput !== t.email ? b`<div class="field">
10819
10852
  <label class="label" for="acc-email-password"
10820
10853
  >${t.passwordUpdate ? this.t("currentPassword") : this.t("createPassword")}</label
10821
10854
  >
@@ -10828,12 +10861,12 @@ let z = class extends qe {
10828
10861
  autocomplete=${t.passwordUpdate ? "current-password" : "new-password"}
10829
10862
  required
10830
10863
  />
10831
- ${t.passwordUpdate ? C : w`<p class="hint">${this.t("createPasswordHint")}</p>`}
10864
+ ${t.passwordUpdate ? C : b`<p class="hint">${this.t("createPasswordHint")}</p>`}
10832
10865
  </div>` : C}
10833
10866
  ${this.error("email")} ${this.error("verify")}
10834
10867
  </form>`,
10835
- w`
10836
- ${t.email && !t.emailVerification ? w`<button
10868
+ b`
10869
+ ${t.email && !t.emailVerification ? b`<button
10837
10870
  class="btn btn-outline btn-sm"
10838
10871
  type="button"
10839
10872
  @click=${this.onSendVerification}
@@ -10860,7 +10893,7 @@ let z = class extends qe {
10860
10893
  ${this.card(
10861
10894
  this.t("phone"),
10862
10895
  void 0,
10863
- w`<form class="form" id="phone-form" @submit=${this.onUpdatePhone} novalidate>
10896
+ b`<form class="form" id="phone-form" @submit=${this.onUpdatePhone} novalidate>
10864
10897
  <div class="field">
10865
10898
  <label class="label" for="acc-phone"
10866
10899
  >${this.t("phone")}
@@ -10876,7 +10909,7 @@ let z = class extends qe {
10876
10909
  autocomplete="tel"
10877
10910
  />
10878
10911
  </div>
10879
- ${this.phoneInput !== t.phone ? w`<div class="field">
10912
+ ${this.phoneInput !== t.phone ? b`<div class="field">
10880
10913
  <label class="label" for="acc-phone-password"
10881
10914
  >${t.passwordUpdate ? this.t("currentPassword") : this.t("createPassword")}</label
10882
10915
  >
@@ -10889,9 +10922,9 @@ let z = class extends qe {
10889
10922
  autocomplete=${t.passwordUpdate ? "current-password" : "new-password"}
10890
10923
  required
10891
10924
  />
10892
- ${t.passwordUpdate ? C : w`<p class="hint">${this.t("createPasswordHint")}</p>`}
10925
+ ${t.passwordUpdate ? C : b`<p class="hint">${this.t("createPasswordHint")}</p>`}
10893
10926
  </div>` : C}
10894
- ${this.phoneCodeSent ? w`<div class="field">
10927
+ ${this.phoneCodeSent ? b`<div class="field">
10895
10928
  <label class="label" for="acc-phone-code">${this.t("code")}</label>
10896
10929
  <input
10897
10930
  class="input input-otp"
@@ -10910,8 +10943,8 @@ let z = class extends qe {
10910
10943
  </div>` : C}
10911
10944
  ${this.error("phone")} ${this.error("verify-phone")} ${this.error("verify-phone-code")}
10912
10945
  </form>`,
10913
- w`
10914
- ${t.phone && !t.phoneVerification && !this.phoneCodeSent ? w`<button
10946
+ b`
10947
+ ${t.phone && !t.phoneVerification && !this.phoneCodeSent ? b`<button
10915
10948
  class="btn btn-outline btn-sm"
10916
10949
  type="button"
10917
10950
  @click=${this.onSendPhoneVerification}
@@ -10919,14 +10952,28 @@ let z = class extends qe {
10919
10952
  >
10920
10953
  ${this.spinner("verify-phone")} ${this.t("sendCode")}
10921
10954
  </button>` : C}
10922
- ${this.phoneCodeSent ? w`<button
10923
- class="btn btn-outline btn-sm"
10924
- type="button"
10925
- @click=${this.onConfirmPhoneVerification}
10926
- ?disabled=${!!this.busy}
10927
- >
10928
- ${this.spinner("verify-phone-code")} ${this.t("verifyCode")}
10929
- </button>` : C}
10955
+ ${this.phoneCodeSent ? b`<button
10956
+ class="btn btn-outline btn-sm"
10957
+ type="button"
10958
+ @click=${this.onSendPhoneVerification}
10959
+ ?disabled=${!!this.busy || Date.now() < this.verifyPhoneCooldownUntil}
10960
+ >
10961
+ ${this.spinner("verify-phone")}
10962
+ ${Date.now() < this.verifyPhoneCooldownUntil ? this.t("verificationResendIn", {
10963
+ seconds: Math.max(
10964
+ 1,
10965
+ Math.ceil((this.verifyPhoneCooldownUntil - Date.now()) / 1e3)
10966
+ )
10967
+ }) : this.t("resendCode")}
10968
+ </button>
10969
+ <button
10970
+ class="btn btn-outline btn-sm"
10971
+ type="button"
10972
+ @click=${this.onConfirmPhoneVerification}
10973
+ ?disabled=${!!this.busy}
10974
+ >
10975
+ ${this.spinner("verify-phone-code")} ${this.t("verifyCode")}
10976
+ </button>` : C}
10930
10977
  <button
10931
10978
  class="btn btn-primary btn-sm"
10932
10979
  type="submit"
@@ -10944,7 +10991,7 @@ let z = class extends qe {
10944
10991
  return this.card(
10945
10992
  this.t("deleteAccount"),
10946
10993
  this.t("deleteAccountDescription"),
10947
- this.confirmDelete ? this.error("delete") : w`${this.error("delete")}
10994
+ this.confirmDelete ? this.error("delete") : b`${this.error("delete")}
10948
10995
  <button class="btn btn-outline btn-sm warn" @click=${() => this.confirmDelete = !0}>
10949
10996
  ${q.userX} ${this.t("deleteAccount")}
10950
10997
  </button>`,
@@ -10964,45 +11011,65 @@ let z = class extends qe {
10964
11011
  // ── Security ──
10965
11012
  renderSecurity() {
10966
11013
  const t = this.user, e = this.config?.mfa !== !1;
10967
- return w`<div class="section">
11014
+ return b`<div class="section">
10968
11015
  ${this.isGuest ? C : this.card(
10969
11016
  this.t("changePassword"),
10970
11017
  void 0,
10971
- w`<form
11018
+ b`<form
10972
11019
  class="form"
10973
11020
  id="password-form"
10974
11021
  @submit=${this.onChangePassword}
10975
11022
  novalidate
10976
11023
  >
10977
- ${t.passwordUpdate ? w`<div class="field">
11024
+ ${t.passwordUpdate ? b`<div class="field">
10978
11025
  <label class="label" for="acc-old-password"
10979
11026
  >${this.t("currentPassword")}</label
10980
11027
  >
10981
- <input
10982
- class="input"
10983
- id="acc-old-password"
10984
- type="password"
10985
- .value=${this.oldPassword}
10986
- @input=${this.bind("oldPassword")}
10987
- autocomplete="current-password"
10988
- required
10989
- />
11028
+ <div class="input-wrap">
11029
+ <input
11030
+ class="input"
11031
+ id="acc-old-password"
11032
+ type=${this.showOldPassword ? "text" : "password"}
11033
+ .value=${this.oldPassword}
11034
+ @input=${this.bind("oldPassword")}
11035
+ autocomplete="current-password"
11036
+ required
11037
+ />
11038
+ <button
11039
+ type="button"
11040
+ class="btn btn-ghost btn-icon"
11041
+ @click=${() => this.showOldPassword = !this.showOldPassword}
11042
+ aria-label=${this.showOldPassword ? this.t("hidePassword") : this.t("showPassword")}
11043
+ >
11044
+ ${this.showOldPassword ? q.eyeOff : q.eye}
11045
+ </button>
11046
+ </div>
10990
11047
  </div>` : C}
10991
11048
  <div class="field">
10992
11049
  <label class="label" for="acc-new-password">${this.t("newPassword")}</label>
10993
- <input
10994
- class="input"
10995
- id="acc-new-password"
10996
- type="password"
10997
- required
10998
- minlength="8"
10999
- .value=${this.newPassword}
11000
- @input=${this.bind("newPassword")}
11001
- autocomplete="new-password"
11002
- />
11050
+ <div class="input-wrap">
11051
+ <input
11052
+ class="input"
11053
+ id="acc-new-password"
11054
+ type=${this.showNewPassword ? "text" : "password"}
11055
+ required
11056
+ minlength="8"
11057
+ .value=${this.newPassword}
11058
+ @input=${this.bind("newPassword")}
11059
+ autocomplete="new-password"
11060
+ />
11061
+ <button
11062
+ type="button"
11063
+ class="btn btn-ghost btn-icon"
11064
+ @click=${() => this.showNewPassword = !this.showNewPassword}
11065
+ aria-label=${this.showNewPassword ? this.t("hidePassword") : this.t("showPassword")}
11066
+ >
11067
+ ${this.showNewPassword ? q.eyeOff : q.eye}
11068
+ </button>
11069
+ </div>
11003
11070
  ${this.newPassword ? (() => {
11004
11071
  const n = pi(this.newPassword);
11005
- return w`<div class="strength" aria-live="polite">
11072
+ return b`<div class="strength" aria-live="polite">
11006
11073
  <div
11007
11074
  class="strength-meter"
11008
11075
  data-level=${String(n.level)}
@@ -11017,26 +11084,36 @@ let z = class extends qe {
11017
11084
  </div>
11018
11085
  <p class="strength-label">${this.t(n.labelKey)}</p>
11019
11086
  </div>`;
11020
- })() : w`<p class="hint">${this.t("passwordHint")}</p>`}
11087
+ })() : b`<p class="hint">${this.t("passwordHint")}</p>`}
11021
11088
  </div>
11022
11089
  <div class="field">
11023
11090
  <label class="label" for="acc-new-password-confirm"
11024
11091
  >${this.t("confirmPassword")}</label
11025
11092
  >
11026
- <input
11027
- class="input"
11028
- id="acc-new-password-confirm"
11029
- type="password"
11030
- required
11031
- minlength="8"
11032
- .value=${this.newPasswordConfirm}
11033
- @input=${this.bind("newPasswordConfirm")}
11034
- autocomplete="new-password"
11035
- />
11093
+ <div class="input-wrap">
11094
+ <input
11095
+ class="input"
11096
+ id="acc-new-password-confirm"
11097
+ type=${this.showNewPasswordConfirm ? "text" : "password"}
11098
+ required
11099
+ minlength="8"
11100
+ .value=${this.newPasswordConfirm}
11101
+ @input=${this.bind("newPasswordConfirm")}
11102
+ autocomplete="new-password"
11103
+ />
11104
+ <button
11105
+ type="button"
11106
+ class="btn btn-ghost btn-icon"
11107
+ @click=${() => this.showNewPasswordConfirm = !this.showNewPasswordConfirm}
11108
+ aria-label=${this.showNewPasswordConfirm ? this.t("hidePassword") : this.t("showPassword")}
11109
+ >
11110
+ ${this.showNewPasswordConfirm ? q.eyeOff : q.eye}
11111
+ </button>
11112
+ </div>
11036
11113
  </div>
11037
11114
  ${this.error("password")}
11038
11115
  </form>`,
11039
- w`<button
11116
+ b`<button
11040
11117
  class="btn btn-primary btn-sm"
11041
11118
  type="submit"
11042
11119
  form="password-form"
@@ -11054,7 +11131,7 @@ let z = class extends qe {
11054
11131
  return this.card(
11055
11132
  this.t("twoFactor"),
11056
11133
  this.t("twoFactorDescription"),
11057
- w`<div class="kv">
11134
+ b`<div class="kv">
11058
11135
  <div class="toggle-row">
11059
11136
  <div class="row-main">
11060
11137
  <span class="row-title">${this.t("twoFactor")}</span>
@@ -11069,11 +11146,11 @@ let z = class extends qe {
11069
11146
  aria-label=${this.t("twoFactor")}
11070
11147
  ></button>
11071
11148
  </div>
11072
- ${t.mfa && !(this.factors?.totp || t.emailVerification || t.phoneVerification) ? w`<div class="alert alert-warning" role="status">
11149
+ ${t.mfa && !(this.factors?.totp || t.emailVerification || t.phoneVerification) ? b`<div class="alert alert-warning" role="status">
11073
11150
  ${q.alert}
11074
11151
  <div class="alert-body">
11075
11152
  ${this.t("mfaNoFactorWarning")}
11076
- ${this.factors?.totp ? C : w`<div class="links">
11153
+ ${this.factors?.totp ? C : b`<div class="links">
11077
11154
  <button
11078
11155
  type="button"
11079
11156
  class="btn btn-link"
@@ -11094,27 +11171,31 @@ let z = class extends qe {
11094
11171
  ${e ? this.verifiedBadge(!0) : C}</span
11095
11172
  >
11096
11173
  </div>
11097
- ${e ? this.confirmRemoveAuthenticator ? w`<div class="inline">
11174
+ ${e ? this.confirmRemoveAuthenticator ? b`<div class="inline">
11098
11175
  <button
11099
- class="btn btn-outline btn-sm warn"
11100
- @click=${this.onRemoveAuthenticator}
11176
+ type="button"
11177
+ class="btn btn-outline btn-sm"
11178
+ autofocus
11101
11179
  ?disabled=${!!this.busy}
11180
+ @click=${() => this.confirmRemoveAuthenticator = !1}
11102
11181
  >
11103
- ${this.spinner("remove-authenticator")} ${this.t("remove")}
11182
+ ${this.t("cancel")}
11104
11183
  </button>
11105
11184
  <button
11106
- class="btn btn-ghost btn-sm"
11107
- @click=${() => this.confirmRemoveAuthenticator = !1}
11185
+ type="button"
11186
+ class="btn btn-destructive btn-sm"
11187
+ @click=${this.onRemoveAuthenticator}
11188
+ ?disabled=${!!this.busy}
11108
11189
  >
11109
- ${this.t("cancel")}
11190
+ ${this.spinner("remove-authenticator")} ${this.t("remove")}
11110
11191
  </button>
11111
- </div>` : w`<button
11192
+ </div>` : b`<button
11112
11193
  class="btn btn-outline btn-sm"
11113
11194
  @click=${this.onRemoveAuthenticator}
11114
11195
  ?disabled=${!!this.busy}
11115
11196
  >
11116
11197
  ${this.spinner("remove-authenticator")} ${this.t("remove")}
11117
- </button>` : this.authenticator ? C : w`<button
11198
+ </button>` : this.authenticator ? C : b`<button
11118
11199
  class="btn btn-outline btn-sm"
11119
11200
  @click=${this.onAddAuthenticator}
11120
11201
  ?disabled=${!!this.busy}
@@ -11123,7 +11204,7 @@ let z = class extends qe {
11123
11204
  </button>`}
11124
11205
  </div>
11125
11206
  ${this.error("authenticator")} ${this.error("remove-authenticator")}
11126
- ${this.authenticator ? w`<form class="form" @submit=${this.onVerifyAuthenticator} novalidate>
11207
+ ${this.authenticator ? b`<form class="form" @submit=${this.onVerifyAuthenticator} novalidate>
11127
11208
  <p class="hint">${this.t("authenticatorScan")}</p>
11128
11209
  <img class="qr" src=${n} alt=${this.t("qrCodeAlt")} />
11129
11210
  <p class="hint center">${this.t("authenticatorManual")}</p>
@@ -11178,13 +11259,13 @@ let z = class extends qe {
11178
11259
  return this.card(
11179
11260
  this.t("recoveryCodes"),
11180
11261
  this.t("recoveryCodesDescription") + " " + this.t("recoveryCodesOnceHint"),
11181
- w`<div class="kv">
11182
- ${this.recoveryCodes ? w`<div class="alert alert-warning">
11262
+ b`<div class="kv">
11263
+ ${this.recoveryCodes ? b`<div class="alert alert-warning">
11183
11264
  ${q.alert}
11184
11265
  <div class="alert-body">${this.t("recoveryCodesWarning")}</div>
11185
11266
  </div>
11186
11267
  <div class="codes">
11187
- ${this.recoveryCodes.map((e) => w`<span class="code">${e}</span>`)}
11268
+ ${this.recoveryCodes.map((e) => b`<span class="code">${e}</span>`)}
11188
11269
  </div>
11189
11270
  <div class="inline">
11190
11271
  <button class="btn btn-outline btn-sm" @click=${this.onCopyCodes}>
@@ -11194,7 +11275,7 @@ let z = class extends qe {
11194
11275
  <button class="btn btn-ghost btn-sm" @click=${() => this.recoveryCodes = null}>
11195
11276
  ${this.t("done")}
11196
11277
  </button>
11197
- </div>` : w`<div class="inline">
11278
+ </div>` : b`<div class="inline">
11198
11279
  <button
11199
11280
  class="btn btn-outline btn-sm"
11200
11281
  @click=${this.onRecoveryCodes}
@@ -11203,21 +11284,26 @@ let z = class extends qe {
11203
11284
  ${this.spinner("recovery")} ${q.key}
11204
11285
  ${t ? this.t("viewRecoveryCodes") : this.t("generateRecoveryCodes")}
11205
11286
  </button>
11206
- ${t ? this.confirmRegenerate ? w`<div class="inline">
11287
+ ${t ? this.confirmRegenerate ? b`<div class="inline">
11207
11288
  <button
11208
- class="btn btn-outline btn-sm warn"
11209
- @click=${this.onRegenerateRecoveryCodes}
11289
+ type="button"
11290
+ class="btn btn-outline btn-sm"
11291
+ autofocus
11210
11292
  ?disabled=${!!this.busy}
11293
+ @click=${() => this.confirmRegenerate = !1}
11211
11294
  >
11212
- ${q.refresh} ${this.t("regenerateRecoveryCodes")}
11295
+ ${this.t("cancel")}
11213
11296
  </button>
11214
11297
  <button
11215
- class="btn btn-ghost btn-sm"
11216
- @click=${() => this.confirmRegenerate = !1}
11298
+ type="button"
11299
+ class="btn btn-destructive btn-sm"
11300
+ @click=${this.onRegenerateRecoveryCodes}
11301
+ ?disabled=${!!this.busy}
11217
11302
  >
11218
- ${this.t("cancel")}
11303
+ ${this.spinner("recovery")} ${q.refresh}
11304
+ ${this.t("regenerateRecoveryCodes")}
11219
11305
  </button>
11220
- </div>` : w`<button
11306
+ </div>` : b`<button
11221
11307
  class="btn btn-ghost btn-sm"
11222
11308
  @click=${this.onRegenerateRecoveryCodes}
11223
11309
  ?disabled=${!!this.busy}
@@ -11260,8 +11346,8 @@ let z = class extends qe {
11260
11346
  return this.card(
11261
11347
  this.t("mfaTitle"),
11262
11348
  this.t("errorChallengeRequired"),
11263
- w`<div class="kv">
11264
- ${t.challenge ? w`<form class="form" @submit=${this.onStepUpVerify} novalidate>
11349
+ b`<div class="kv">
11350
+ ${t.challenge ? b`<form class="form" @submit=${this.onStepUpVerify} novalidate>
11265
11351
  <div class="field">
11266
11352
  <label class="label" for="acc-stepup"
11267
11353
  >${t.challenge.factor === "recoverycode" ? this.t("recoveryCode") : this.t("code")}</label
@@ -11281,9 +11367,9 @@ let z = class extends qe {
11281
11367
  <button class="btn btn-primary btn-sm" type="submit" ?disabled=${!!this.busy}>
11282
11368
  ${this.spinner("stepup-code")} ${this.t("verifyCode")}
11283
11369
  </button>
11284
- </form>` : w`<div class="stack-sm">
11370
+ </form>` : b`<div class="stack-sm">
11285
11371
  ${n.filter((i) => i.available).map(
11286
- (i) => w`<button
11372
+ (i) => b`<button
11287
11373
  type="button"
11288
11374
  class="choice"
11289
11375
  @click=${() => this.onStepUpFactor(i.factor)}
@@ -11295,7 +11381,7 @@ let z = class extends qe {
11295
11381
  </div>`}
11296
11382
  ${this.error("stepup")} ${this.error("stepup-code")}
11297
11383
  </div>`,
11298
- w`<button class="btn btn-ghost btn-sm" @click=${() => this.stepUp = null}>
11384
+ b`<button class="btn btn-ghost btn-sm" @click=${() => this.stepUp = null}>
11299
11385
  ${this.t("cancel")}
11300
11386
  </button>`
11301
11387
  );
@@ -11307,24 +11393,24 @@ let z = class extends qe {
11307
11393
  }
11308
11394
  renderSessions() {
11309
11395
  const t = this.sessions;
11310
- return w`<div class="section">
11396
+ return b`<div class="section">
11311
11397
  ${this.card(
11312
11398
  this.t("sessions"),
11313
11399
  void 0,
11314
- w`${this.error("sessions")}
11315
- ${t === null ? w`<div class="empty"><span class="spinner"></span></div>` : t.length === 0 ? this.emptyState(
11400
+ b`${this.error("sessions")}
11401
+ ${t === null ? b`<div class="empty"><span class="spinner"></span></div>` : t.length === 0 ? this.emptyState(
11316
11402
  q.monitor,
11317
11403
  this.t("noSessions"),
11318
11404
  this.t("noSessionsDescription")
11319
11405
  ) : t.map(
11320
- (e) => w`<div class="row">
11406
+ (e) => b`<div class="row">
11321
11407
  <div class="inline">
11322
11408
  <span class="device">${this.deviceIcon(e)}</span>
11323
11409
  <div class="row-main">
11324
11410
  <span class="row-title">
11325
11411
  ${e.clientName || e.provider}
11326
- ${e.clientVersion ? w`<span class="muted small">${e.clientVersion}</span>` : C}
11327
- ${e.current ? w`<span class="badge badge-info">${this.t("currentSession")}</span>` : C}
11412
+ ${e.clientVersion ? b`<span class="muted small">${e.clientVersion}</span>` : C}
11413
+ ${e.current ? b`<span class="badge badge-info">${this.t("currentSession")}</span>` : C}
11328
11414
  </span>
11329
11415
  <span class="row-sub"
11330
11416
  >${[e.osName, e.countryName || e.countryCode, e.ip].filter(Boolean).join(" · ")}</span
@@ -11332,7 +11418,7 @@ let z = class extends qe {
11332
11418
  </div>
11333
11419
  </div>
11334
11420
  <div class="row-actions">
11335
- ${this.busy === `session-${e.$id}` ? w`<span class="spinner"></span>` : C}
11421
+ ${this.busy === `session-${e.$id}` ? b`<span class="spinner"></span>` : C}
11336
11422
  <button
11337
11423
  class="btn btn-ghost btn-sm"
11338
11424
  @click=${() => this.onDeleteSession(e.$id)}
@@ -11348,7 +11434,7 @@ let z = class extends qe {
11348
11434
  ${this.card(
11349
11435
  this.t("signOutAllSessions"),
11350
11436
  this.t("signOutAllSessionsDescription"),
11351
- this.confirmSignOutAll ? this.error("sessions-all") : w`${this.error("sessions-all")}
11437
+ this.confirmSignOutAll ? this.error("sessions-all") : b`${this.error("sessions-all")}
11352
11438
  <button
11353
11439
  class="btn btn-outline btn-sm warn"
11354
11440
  @click=${this.onSignOutAll}
@@ -11373,17 +11459,17 @@ let z = class extends qe {
11373
11459
  // ── Connections ──
11374
11460
  renderConnections() {
11375
11461
  const t = this.identities, e = this.config?.methods?.oauth ?? [];
11376
- return w`<div class="section">
11462
+ return b`<div class="section">
11377
11463
  ${this.card(
11378
11464
  this.t("connections"),
11379
11465
  void 0,
11380
- w`${this.error("identities")}
11381
- ${t === null ? w`<div class="empty"><span class="spinner"></span></div>` : t.length === 0 ? this.emptyState(
11466
+ b`${this.error("identities")}
11467
+ ${t === null ? b`<div class="empty"><span class="spinner"></span></div>` : t.length === 0 ? this.emptyState(
11382
11468
  q.link,
11383
11469
  this.t("noConnections"),
11384
11470
  this.t("noConnectionsDescription")
11385
11471
  ) : t.map(
11386
- (n) => w`<div class="row">
11472
+ (n) => b`<div class="row">
11387
11473
  <div class="inline">
11388
11474
  <span class="device">${ht(n.provider)}</span>
11389
11475
  <div class="row-main">
@@ -11392,7 +11478,7 @@ let z = class extends qe {
11392
11478
  </div>
11393
11479
  </div>
11394
11480
  <div class="row-actions">
11395
- ${this.confirmDisconnectId === n.$id ? w`<div class="inline">
11481
+ ${this.confirmDisconnectId === n.$id ? b`<div class="inline">
11396
11482
  <button
11397
11483
  type="button"
11398
11484
  class="btn btn-outline btn-sm"
@@ -11408,22 +11494,22 @@ let z = class extends qe {
11408
11494
  @click=${() => this.onDeleteIdentity(n.$id)}
11409
11495
  ?disabled=${!!this.busy}
11410
11496
  >
11411
- ${this.busy === `identity-${n.$id}` ? w`<span class="spinner"></span>` : C}
11497
+ ${this.busy === `identity-${n.$id}` ? b`<span class="spinner"></span>` : C}
11412
11498
  ${this.t("disconnect")}
11413
11499
  </button>
11414
- </div>` : w`<button
11500
+ </div>` : b`<button
11415
11501
  class="btn btn-ghost btn-sm"
11416
11502
  @click=${() => this.onDeleteIdentity(n.$id)}
11417
11503
  ?disabled=${!!this.busy}
11418
11504
  >
11419
- ${this.busy === `identity-${n.$id}` ? w`<span class="spinner"></span>` : C}
11505
+ ${this.busy === `identity-${n.$id}` ? b`<span class="spinner"></span>` : C}
11420
11506
  ${this.t("disconnect")}
11421
11507
  </button>`}
11422
11508
  </div>
11423
11509
  </div>`
11424
11510
  )}`,
11425
- e.length > 0 ? w`${e.filter((n) => !(t ?? []).some((i) => i.provider === n)).map(
11426
- (n) => w`<button
11511
+ e.length > 0 ? b`${e.filter((n) => !(t ?? []).some((i) => i.provider === n)).map(
11512
+ (n) => b`<button
11427
11513
  class="btn btn-outline btn-sm"
11428
11514
  @click=${() => {
11429
11515
  this.run(`connect-${n}`, () => M.signInWithOAuth(n));
@@ -11440,16 +11526,16 @@ let z = class extends qe {
11440
11526
  // ── Activity ──
11441
11527
  renderActivity() {
11442
11528
  const t = this.logs;
11443
- return w`<div class="section">
11529
+ return b`<div class="section">
11444
11530
  ${this.card(
11445
11531
  this.t("activity"),
11446
11532
  void 0,
11447
- w`${t === null ? w`<div class="empty"><span class="spinner"></span></div>` : t.length === 0 ? this.emptyState(
11533
+ b`${t === null ? b`<div class="empty"><span class="spinner"></span></div>` : t.length === 0 ? this.emptyState(
11448
11534
  q.activity,
11449
11535
  this.t("noActivity"),
11450
11536
  this.t("noActivityDescription")
11451
11537
  ) : t.map(
11452
- (e) => w`<div class="row">
11538
+ (e) => b`<div class="row">
11453
11539
  <div class="row-main">
11454
11540
  <span class="row-title">${e.event}</span>
11455
11541
  <span class="row-sub"
@@ -11561,109 +11647,121 @@ z.styles = [
11561
11647
  }
11562
11648
  `
11563
11649
  ];
11564
- F([
11565
- O({ type: Boolean })
11650
+ O([
11651
+ F({ type: Boolean })
11566
11652
  ], z.prototype, "embedded", 2);
11567
- F([
11568
- O({ type: String })
11653
+ O([
11654
+ F({ type: String })
11569
11655
  ], z.prototype, "tab", 2);
11570
- F([
11571
- D()
11656
+ O([
11657
+ N()
11572
11658
  ], z.prototype, "active", 2);
11573
- F([
11574
- D()
11659
+ O([
11660
+ N()
11575
11661
  ], z.prototype, "busy", 2);
11576
- F([
11577
- D()
11662
+ O([
11663
+ N()
11578
11664
  ], z.prototype, "notice", 2);
11579
- F([
11580
- D()
11665
+ O([
11666
+ N()
11581
11667
  ], z.prototype, "errors", 2);
11582
- F([
11583
- D()
11668
+ O([
11669
+ N()
11584
11670
  ], z.prototype, "nameInput", 2);
11585
- F([
11586
- D()
11671
+ O([
11672
+ N()
11587
11673
  ], z.prototype, "emailInput", 2);
11588
- F([
11589
- D()
11674
+ O([
11675
+ N()
11590
11676
  ], z.prototype, "emailPassword", 2);
11591
- F([
11592
- D()
11677
+ O([
11678
+ N()
11593
11679
  ], z.prototype, "phoneInput", 2);
11594
- F([
11595
- D()
11680
+ O([
11681
+ N()
11596
11682
  ], z.prototype, "phonePassword", 2);
11597
- F([
11598
- D()
11683
+ O([
11684
+ N()
11599
11685
  ], z.prototype, "phoneCode", 2);
11600
- F([
11601
- D()
11686
+ O([
11687
+ N()
11602
11688
  ], z.prototype, "phoneCodeSent", 2);
11603
- F([
11604
- D()
11689
+ O([
11690
+ N()
11605
11691
  ], z.prototype, "guestName", 2);
11606
- F([
11607
- D()
11692
+ O([
11693
+ N()
11608
11694
  ], z.prototype, "oldPassword", 2);
11609
- F([
11610
- D()
11695
+ O([
11696
+ N()
11611
11697
  ], z.prototype, "newPassword", 2);
11612
- F([
11613
- D()
11698
+ O([
11699
+ N()
11614
11700
  ], z.prototype, "newPasswordConfirm", 2);
11615
- F([
11616
- D()
11701
+ O([
11702
+ N()
11703
+ ], z.prototype, "showOldPassword", 2);
11704
+ O([
11705
+ N()
11706
+ ], z.prototype, "showNewPassword", 2);
11707
+ O([
11708
+ N()
11709
+ ], z.prototype, "showNewPasswordConfirm", 2);
11710
+ O([
11711
+ N()
11617
11712
  ], z.prototype, "authenticator", 2);
11618
- F([
11619
- D()
11713
+ O([
11714
+ N()
11620
11715
  ], z.prototype, "authenticatorCode", 2);
11621
- F([
11622
- D()
11716
+ O([
11717
+ N()
11623
11718
  ], z.prototype, "factors", 2);
11624
- F([
11625
- D()
11719
+ O([
11720
+ N()
11626
11721
  ], z.prototype, "recoveryCodes", 2);
11627
- F([
11628
- D()
11722
+ O([
11723
+ N()
11629
11724
  ], z.prototype, "stepUp", 2);
11630
- F([
11631
- D()
11725
+ O([
11726
+ N()
11632
11727
  ], z.prototype, "stepUpCode", 2);
11633
- F([
11634
- D()
11728
+ O([
11729
+ N()
11635
11730
  ], z.prototype, "copied", 2);
11636
- F([
11637
- D()
11731
+ O([
11732
+ N()
11638
11733
  ], z.prototype, "sessions", 2);
11639
- F([
11640
- D()
11734
+ O([
11735
+ N()
11641
11736
  ], z.prototype, "identities", 2);
11642
- F([
11643
- D()
11737
+ O([
11738
+ N()
11644
11739
  ], z.prototype, "logs", 2);
11645
- F([
11646
- D()
11740
+ O([
11741
+ N()
11647
11742
  ], z.prototype, "logsSupported", 2);
11648
- F([
11649
- D()
11743
+ O([
11744
+ N()
11650
11745
  ], z.prototype, "confirmDelete", 2);
11651
- F([
11652
- D()
11746
+ O([
11747
+ N()
11653
11748
  ], z.prototype, "confirmRegenerate", 2);
11654
- F([
11655
- D()
11749
+ O([
11750
+ N()
11656
11751
  ], z.prototype, "confirmRemoveAuthenticator", 2);
11657
- F([
11658
- D()
11752
+ O([
11753
+ N()
11659
11754
  ], z.prototype, "confirmSignOutAll", 2);
11660
- F([
11661
- D()
11755
+ O([
11756
+ N()
11662
11757
  ], z.prototype, "confirmDisconnectId", 2);
11663
- F([
11664
- D()
11758
+ O([
11759
+ N()
11665
11760
  ], z.prototype, "verifyEmailCooldownUntil", 2);
11666
- z = F([
11761
+ O([
11762
+ N()
11763
+ ], z.prototype, "verifyPhoneCooldownUntil", 2);
11764
+ z = O([
11667
11765
  ze("authui-account")
11668
11766
  ], z);
11669
11767
  var Lo = Object.defineProperty, No = Object.getOwnPropertyDescriptor, Ke = (t, e, n, i) => {
@@ -11733,7 +11831,7 @@ let Ee = class extends qe {
11733
11831
  }
11734
11832
  render() {
11735
11833
  const t = this.auth.status === "signed-in", e = this.view === "account" && t;
11736
- return w`
11834
+ return b`
11737
11835
  <dialog
11738
11836
  class=${e ? "wide" : ""}
11739
11837
  aria-label=${e ? this.t("dialogAccount") : this.t("dialogSignIn")}
@@ -11756,7 +11854,7 @@ let Ee = class extends qe {
11756
11854
  </button>
11757
11855
  </div>
11758
11856
  <div class="body" @scroll=${this.syncScrollCue}>
11759
- ${this.open ? e ? w`<authui-account embedded></authui-account>` : w`<authui-sign-in
11857
+ ${this.open ? e ? b`<authui-account embedded></authui-account>` : b`<authui-sign-in
11760
11858
  embedded
11761
11859
  .view=${this.view === "account" ? "sign-in" : this.view}
11762
11860
  ></authui-sign-in>` : C}
@@ -11779,9 +11877,11 @@ Ee.styles = [
11779
11877
  background: var(--authui-background);
11780
11878
  color: var(--authui-foreground);
11781
11879
  padding: 0;
11782
- width: calc(100% - 2rem);
11880
+ width: calc(100% - 2rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
11783
11881
  max-width: 440px;
11784
- max-height: calc(100dvh - 2rem);
11882
+ max-height: calc(
11883
+ 100dvh - 2rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)
11884
+ );
11785
11885
  box-shadow: var(--authui-shadow-lg);
11786
11886
  overflow: hidden;
11787
11887
  z-index: var(--authui-z);
@@ -11809,7 +11909,9 @@ Ee.styles = [
11809
11909
  .frame {
11810
11910
  display: flex;
11811
11911
  flex-direction: column;
11812
- max-height: calc(100dvh - 2rem);
11912
+ max-height: calc(
11913
+ 100dvh - 2rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)
11914
+ );
11813
11915
  min-height: 0;
11814
11916
  position: relative;
11815
11917
  }
@@ -11818,11 +11920,13 @@ Ee.styles = [
11818
11920
  display: flex;
11819
11921
  justify-content: flex-end;
11820
11922
  align-items: center;
11821
- padding: 8px 8px 0;
11923
+ padding: max(8px, env(safe-area-inset-top, 0px)) max(8px, env(safe-area-inset-right, 0px)) 0
11924
+ max(8px, env(safe-area-inset-left, 0px));
11822
11925
  background: var(--authui-background);
11823
11926
  }
11824
11927
  .body {
11825
- padding: 4px 24px 28px;
11928
+ padding: 4px max(24px, env(safe-area-inset-right, 0px))
11929
+ max(28px, env(safe-area-inset-bottom, 0px)) max(24px, env(safe-area-inset-left, 0px));
11826
11930
  overflow-y: auto;
11827
11931
  flex: 1 1 auto;
11828
11932
  min-height: 0;
@@ -11858,13 +11962,13 @@ Ee.styles = [
11858
11962
  `
11859
11963
  ];
11860
11964
  Ke([
11861
- O({ type: Boolean, reflect: !0 })
11965
+ F({ type: Boolean, reflect: !0 })
11862
11966
  ], Ee.prototype, "open", 2);
11863
11967
  Ke([
11864
- O({ type: String })
11968
+ F({ type: String })
11865
11969
  ], Ee.prototype, "view", 2);
11866
11970
  Ke([
11867
- O({
11971
+ F({
11868
11972
  attribute: "close-on-success",
11869
11973
  reflect: !0,
11870
11974
  converter: {
@@ -11880,24 +11984,24 @@ Ke([
11880
11984
  })
11881
11985
  ], Ee.prototype, "closeOnSuccess", 2);
11882
11986
  Ke([
11883
- D()
11987
+ N()
11884
11988
  ], Ee.prototype, "handledPending", 2);
11885
11989
  Ke([
11886
- D()
11990
+ N()
11887
11991
  ], Ee.prototype, "scrollCue", 2);
11888
11992
  Ke([
11889
- wi("dialog")
11993
+ bi("dialog")
11890
11994
  ], Ee.prototype, "dialog", 2);
11891
11995
  Ke([
11892
- wi(".body")
11996
+ bi(".body")
11893
11997
  ], Ee.prototype, "bodyEl", 2);
11894
11998
  Ee = Ke([
11895
11999
  ze("authui-modal")
11896
12000
  ], Ee);
11897
- var Ho = Object.defineProperty, Do = Object.getOwnPropertyDescriptor, Lt = (t, e, n, i) => {
11898
- for (var o = i > 1 ? void 0 : i ? Do(e, n) : e, a = t.length - 1, s; a >= 0; a--)
12001
+ var Do = Object.defineProperty, Ho = Object.getOwnPropertyDescriptor, Lt = (t, e, n, i) => {
12002
+ for (var o = i > 1 ? void 0 : i ? Ho(e, n) : e, a = t.length - 1, s; a >= 0; a--)
11899
12003
  (s = t[a]) && (o = (i ? s(e, n, o) : s(o)) || o);
11900
- return i && o && Ho(e, n, o), o;
12004
+ return i && o && Do(e, n, o), o;
11901
12005
  };
11902
12006
  let at = class extends qe {
11903
12007
  constructor() {
@@ -11905,9 +12009,9 @@ let at = class extends qe {
11905
12009
  }
11906
12010
  render() {
11907
12011
  const t = this.size === "md" ? "" : `btn-${this.size}`;
11908
- return w`<button
12012
+ return b`<button
11909
12013
  class="btn btn-${this.variant} ${t}"
11910
- @click=${() => wt(this.view)}
12014
+ @click=${() => bt(this.view)}
11911
12015
  part="button"
11912
12016
  >
11913
12017
  <slot
@@ -11928,13 +12032,13 @@ at.styles = [
11928
12032
  `
11929
12033
  ];
11930
12034
  Lt([
11931
- O({ type: String })
12035
+ F({ type: String })
11932
12036
  ], at.prototype, "view", 2);
11933
12037
  Lt([
11934
- O({ type: String })
12038
+ F({ type: String })
11935
12039
  ], at.prototype, "variant", 2);
11936
12040
  Lt([
11937
- O({ type: String })
12041
+ F({ type: String })
11938
12042
  ], at.prototype, "size", 2);
11939
12043
  at = Lt([
11940
12044
  ze("authui-button")
@@ -12017,13 +12121,13 @@ let Ue = class extends qe {
12017
12121
  render() {
12018
12122
  const { status: t, user: e, configured: n } = this.auth;
12019
12123
  if (t === "loading" && n)
12020
- return w`<span class="avatar"><span class="spinner"></span></span>`;
12124
+ return b`<span class="avatar"><span class="spinner"></span></span>`;
12021
12125
  if (t !== "signed-in" || !e)
12022
- return w`<button class="btn btn-primary btn-sm" @click=${() => wt("sign-in")}>
12126
+ return b`<button class="btn btn-primary btn-sm" @click=${() => bt("sign-in")}>
12023
12127
  <slot>${this.t("signIn")}</slot>
12024
12128
  </button>`;
12025
12129
  const i = e.name || e.email || e.phone || this.t("guestAccount");
12026
- return w`
12130
+ return b`
12027
12131
  <button
12028
12132
  class="trigger"
12029
12133
  aria-haspopup="menu"
@@ -12032,20 +12136,20 @@ let Ue = class extends qe {
12032
12136
  aria-label=${i}
12033
12137
  >
12034
12138
  <span class="avatar"
12035
- >${this.src ? w`<img src=${this.src} alt="" />` : Ai(i)}</span
12139
+ >${this.src ? b`<img src=${this.src} alt="" />` : Ai(i)}</span
12036
12140
  >
12037
12141
  </button>
12038
- ${this.menuOpen ? w`<div class="menu ${this.menuAbove ? "above" : ""}" role="menu">
12142
+ ${this.menuOpen ? b`<div class="menu ${this.menuAbove ? "above" : ""}" role="menu">
12039
12143
  <div class="menu-header">
12040
12144
  <span class="row-title" title=${i}>${i}</span>
12041
- ${e.email && e.name ? w`<span class="row-sub" title=${e.email}>${e.email}</span>` : C}
12145
+ ${e.email && e.name ? b`<span class="row-sub" title=${e.email}>${e.email}</span>` : C}
12042
12146
  </div>
12043
- ${this.showTeams ? w`<div class="menu-section">
12147
+ ${this.showTeams ? b`<div class="menu-section">
12044
12148
  <div class="menu-section-label">${this.t("teamsLabel")}</div>
12045
- ${this.teamsLoading ? w`<div class="menu-item" aria-busy="true">
12149
+ ${this.teamsLoading ? b`<div class="menu-item" aria-busy="true">
12046
12150
  <span class="spinner"></span>
12047
- </div>` : this.teams.length === 0 ? w`<div class="menu-item" role="note">${this.t("noTeams")}</div>` : this.teams.map(
12048
- (o) => w`<button
12151
+ </div>` : this.teams.length === 0 ? b`<div class="menu-item" role="note">${this.t("noTeams")}</div>` : this.teams.map(
12152
+ (o) => b`<button
12049
12153
  class="menu-item ${o.$id === this.activeTeamId ? "active" : ""}"
12050
12154
  role="menuitemradio"
12051
12155
  aria-checked=${o.$id === this.activeTeamId ? "true" : "false"}
@@ -12053,7 +12157,7 @@ let Ue = class extends qe {
12053
12157
  >
12054
12158
  ${q.users}
12055
12159
  <span title=${o.name}>${o.name}</span>
12056
- ${o.$id === this.activeTeamId ? w`<span class="check">${q.check}</span>` : C}
12160
+ ${o.$id === this.activeTeamId ? b`<span class="check">${q.check}</span>` : C}
12057
12161
  </button>`
12058
12162
  )}
12059
12163
  </div>` : C}
@@ -12063,7 +12167,7 @@ let Ue = class extends qe {
12063
12167
  class="menu-item"
12064
12168
  role="menuitem"
12065
12169
  @click=${() => {
12066
- this.menuOpen = !1, wt("account");
12170
+ this.menuOpen = !1, bt("account");
12067
12171
  }}
12068
12172
  >
12069
12173
  ${q.settings} ${this.t("manageAccount")}
@@ -12084,7 +12188,7 @@ let Ue = class extends qe {
12084
12188
  return this.menuItems?.length ? this.menuItems.map((t) => {
12085
12189
  if (t.href) {
12086
12190
  const n = t.target;
12087
- return w`<a
12191
+ return b`<a
12088
12192
  class="menu-item"
12089
12193
  role="menuitem"
12090
12194
  href=${t.href}
@@ -12098,7 +12202,7 @@ let Ue = class extends qe {
12098
12202
  </a>`;
12099
12203
  }
12100
12204
  const e = t.actionId;
12101
- return w`<button
12205
+ return b`<button
12102
12206
  class="menu-item"
12103
12207
  role="menuitem"
12104
12208
  type="button"
@@ -12240,28 +12344,28 @@ Ue.styles = [
12240
12344
  `
12241
12345
  ];
12242
12346
  Be([
12243
- O({ type: Boolean, attribute: "show-teams" })
12347
+ F({ type: Boolean, attribute: "show-teams" })
12244
12348
  ], Ue.prototype, "showTeams", 2);
12245
12349
  Be([
12246
- O({ attribute: !1 })
12350
+ F({ attribute: !1 })
12247
12351
  ], Ue.prototype, "menuItems", 2);
12248
12352
  Be([
12249
- O({ type: String })
12353
+ F({ type: String })
12250
12354
  ], Ue.prototype, "src", 2);
12251
12355
  Be([
12252
- D()
12356
+ N()
12253
12357
  ], Ue.prototype, "menuOpen", 2);
12254
12358
  Be([
12255
- D()
12359
+ N()
12256
12360
  ], Ue.prototype, "menuAbove", 2);
12257
12361
  Be([
12258
- D()
12362
+ N()
12259
12363
  ], Ue.prototype, "teams", 2);
12260
12364
  Be([
12261
- D()
12365
+ N()
12262
12366
  ], Ue.prototype, "teamsLoading", 2);
12263
12367
  Be([
12264
- D()
12368
+ N()
12265
12369
  ], Ue.prototype, "activeTeamId", 2);
12266
12370
  Ue = Be([
12267
12371
  ze("authui-user-button")
@@ -12270,7 +12374,7 @@ function Vo(t) {
12270
12374
  return M.configure(t), Oo;
12271
12375
  }
12272
12376
  function Wo(t) {
12273
- wt(t);
12377
+ bt(t);
12274
12378
  }
12275
12379
  function Go() {
12276
12380
  Ro();
@@ -12317,7 +12421,7 @@ export {
12317
12421
  de as AuthUIConfigElement,
12318
12422
  qe as AuthUIElement,
12319
12423
  Ee as AuthUIModal,
12320
- bt as AuthUIShow,
12424
+ wt as AuthUIShow,
12321
12425
  he as AuthUISignIn,
12322
12426
  Ue as AuthUIUserButton,
12323
12427
  na as CRITICAL_FOUC_CSS,
@@ -12342,7 +12446,7 @@ export {
12342
12446
  ho as isConfigError,
12343
12447
  zo as on,
12344
12448
  Wo as open,
12345
- wt as openModal,
12449
+ bt as openModal,
12346
12450
  To as previewSignIn,
12347
12451
  pt as providerLabel,
12348
12452
  tt as rememberLastMethod,