@cal.macconnachie/web-components 0.0.16 → 0.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  const z = globalThis, Z = z.ShadowRoot && (z.ShadyCSS === void 0 || z.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, Q = Symbol(), ot = /* @__PURE__ */ new WeakMap();
2
- let $t = class {
2
+ let wt = class {
3
3
  constructor(t, s, i) {
4
4
  if (this._$cssResult$ = !0, i !== Q) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
5
5
  this.cssText = t, this.t = s;
@@ -17,13 +17,13 @@ let $t = class {
17
17
  return this.cssText;
18
18
  }
19
19
  };
20
- const xt = (e) => new $t(typeof e == "string" ? e : e + "", void 0, Q), Et = (e, ...t) => {
20
+ const xt = (e) => new wt(typeof e == "string" ? e : e + "", void 0, Q), Et = (e, ...t) => {
21
21
  const s = e.length === 1 ? e[0] : t.reduce(((i, r, o) => i + ((a) => {
22
22
  if (a._$cssResult$ === !0) return a.cssText;
23
23
  if (typeof a == "number") return a;
24
24
  throw Error("Value passed to 'css' function must be a 'css' function result: " + a + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
25
25
  })(r) + e[o + 1]), e[0]);
26
- return new $t(s, e, Q);
26
+ return new wt(s, e, Q);
27
27
  }, Tt = (e, t) => {
28
28
  if (Z) e.adoptedStyleSheets = t.map(((s) => s instanceof CSSStyleSheet ? s : s.styleSheet));
29
29
  else for (const s of t) {
@@ -35,7 +35,7 @@ const xt = (e) => new $t(typeof e == "string" ? e : e + "", void 0, Q), Et = (e,
35
35
  for (const i of t.cssRules) s += i.cssText;
36
36
  return xt(s);
37
37
  })(e) : e;
38
- const { is: Pt, defineProperty: Ot, getOwnPropertyDescriptor: Dt, getOwnPropertyNames: Ut, getOwnPropertySymbols: Rt, getPrototypeOf: It } = Object, F = globalThis, nt = F.trustedTypes, Nt = nt ? nt.emptyScript : "", Lt = F.reactiveElementPolyfillSupport, M = (e, t) => e, Y = { toAttribute(e, t) {
38
+ const { is: Pt, defineProperty: Ot, getOwnPropertyDescriptor: Dt, getOwnPropertyNames: Ut, getOwnPropertySymbols: Rt, getPrototypeOf: It } = Object, F = globalThis, nt = F.trustedTypes, Nt = nt ? nt.emptyScript : "", Lt = F.reactiveElementPolyfillSupport, H = (e, t) => e, Y = { toAttribute(e, t) {
39
39
  switch (t) {
40
40
  case Boolean:
41
41
  e = e ? Nt : null;
@@ -93,13 +93,13 @@ let U = class extends HTMLElement {
93
93
  return this.elementProperties.get(t) ?? lt;
94
94
  }
95
95
  static _$Ei() {
96
- if (this.hasOwnProperty(M("elementProperties"))) return;
96
+ if (this.hasOwnProperty(H("elementProperties"))) return;
97
97
  const t = It(this);
98
98
  t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
99
99
  }
100
100
  static finalize() {
101
- if (this.hasOwnProperty(M("finalized"))) return;
102
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(M("properties"))) {
101
+ if (this.hasOwnProperty(H("finalized"))) return;
102
+ if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(H("properties"))) {
103
103
  const s = this.properties, i = [...Ut(s), ...Rt(s)];
104
104
  for (const r of i) this.createProperty(r, s[r]);
105
105
  }
@@ -246,10 +246,10 @@ let U = class extends HTMLElement {
246
246
  firstUpdated(t) {
247
247
  }
248
248
  };
249
- U.elementStyles = [], U.shadowRootOptions = { mode: "open" }, U[M("elementProperties")] = /* @__PURE__ */ new Map(), U[M("finalized")] = /* @__PURE__ */ new Map(), Lt?.({ ReactiveElement: U }), (F.reactiveElementVersions ??= []).push("2.1.1");
250
- const tt = globalThis, K = tt.trustedTypes, ht = K ? K.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, bt = "$lit$", C = `lit$${Math.random().toFixed(9).slice(2)}$`, vt = "?" + C, Mt = `<${vt}>`, D = document, j = () => D.createComment(""), q = (e) => e === null || typeof e != "object" && typeof e != "function", et = Array.isArray, Ht = (e) => et(e) || typeof e?.[Symbol.iterator] == "function", W = `[
249
+ U.elementStyles = [], U.shadowRootOptions = { mode: "open" }, U[H("elementProperties")] = /* @__PURE__ */ new Map(), U[H("finalized")] = /* @__PURE__ */ new Map(), Lt?.({ ReactiveElement: U }), (F.reactiveElementVersions ??= []).push("2.1.1");
250
+ const tt = globalThis, K = tt.trustedTypes, ht = K ? K.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, bt = "$lit$", C = `lit$${Math.random().toFixed(9).slice(2)}$`, vt = "?" + C, Ht = `<${vt}>`, D = document, j = () => D.createComment(""), q = (e) => e === null || typeof e != "object" && typeof e != "function", et = Array.isArray, Mt = (e) => et(e) || typeof e?.[Symbol.iterator] == "function", W = `[
251
251
  \f\r]`, N = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, ct = /-->/g, dt = />/g, T = RegExp(`>|${W}(?:([^\\s"'>=/]+)(${W}*=${W}*(?:[^
252
- \f\r"'\`<>=]|("|')|))|$)`, "g"), pt = /'/g, ut = /"/g, At = /^(?:script|style|textarea|title)$/i, jt = (e) => (t, ...s) => ({ _$litType$: e, strings: t, values: s }), y = jt(1), x = Symbol.for("lit-noChange"), g = Symbol.for("lit-nothing"), gt = /* @__PURE__ */ new WeakMap(), O = D.createTreeWalker(D, 129);
252
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), pt = /'/g, ut = /"/g, At = /^(?:script|style|textarea|title)$/i, jt = (e) => (t, ...s) => ({ _$litType$: e, strings: t, values: s }), f = jt(1), x = Symbol.for("lit-noChange"), g = Symbol.for("lit-nothing"), gt = /* @__PURE__ */ new WeakMap(), O = D.createTreeWalker(D, 129);
253
253
  function _t(e, t) {
254
254
  if (!et(e) || !e.hasOwnProperty("raw")) throw Error("invalid template strings array");
255
255
  return ht !== void 0 ? ht.createHTML(t) : t;
@@ -262,7 +262,7 @@ const qt = (e, t) => {
262
262
  let h, d, l = -1, p = 0;
263
263
  for (; p < n.length && (a.lastIndex = p, d = a.exec(n), d !== null); ) p = a.lastIndex, a === N ? d[1] === "!--" ? a = ct : d[1] !== void 0 ? a = dt : d[2] !== void 0 ? (At.test(d[2]) && (r = RegExp("</" + d[2], "g")), a = T) : d[3] !== void 0 && (a = T) : a === T ? d[0] === ">" ? (a = r ?? N, l = -1) : d[1] === void 0 ? l = -2 : (l = a.lastIndex - d[2].length, h = d[1], a = d[3] === void 0 ? T : d[3] === '"' ? ut : pt) : a === ut || a === pt ? a = T : a === ct || a === dt ? a = N : (a = T, r = void 0);
264
264
  const u = a === T && e[c + 1].startsWith("/>") ? " " : "";
265
- o += a === N ? n + Mt : l >= 0 ? (i.push(h), n.slice(0, l) + bt + n.slice(l) + C + u) : n + C + (l === -2 ? c : u);
265
+ o += a === N ? n + Ht : l >= 0 ? (i.push(h), n.slice(0, l) + bt + n.slice(l) + C + u) : n + C + (l === -2 ? c : u);
266
266
  }
267
267
  return [_t(e, o + (e[s] || "<?>") + (t === 2 ? "</svg>" : t === 3 ? "</math>" : "")), i];
268
268
  };
@@ -279,8 +279,8 @@ class B {
279
279
  for (; (r = O.nextNode()) !== null && n.length < c; ) {
280
280
  if (r.nodeType === 1) {
281
281
  if (r.hasAttributes()) for (const l of r.getAttributeNames()) if (l.endsWith(bt)) {
282
- const p = d[a++], u = r.getAttribute(l).split(C), w = /([.?@])?(.*)/.exec(p);
283
- n.push({ type: 1, index: o, name: w[2], strings: u, ctor: w[1] === "." ? zt : w[1] === "?" ? Yt : w[1] === "@" ? Kt : V }), r.removeAttribute(l);
282
+ const p = d[a++], u = r.getAttribute(l).split(C), $ = /([.?@])?(.*)/.exec(p);
283
+ n.push({ type: 1, index: o, name: $[2], strings: u, ctor: $[1] === "." ? zt : $[1] === "?" ? Yt : $[1] === "@" ? Kt : V }), r.removeAttribute(l);
284
284
  } else l.startsWith(C) && (n.push({ type: 6, index: o }), r.removeAttribute(l));
285
285
  if (At.test(r.tagName)) {
286
286
  const l = r.textContent.split(C), p = l.length - 1;
@@ -356,7 +356,7 @@ class I {
356
356
  return this._$AB;
357
357
  }
358
358
  _$AI(t, s = this) {
359
- t = R(this, t, s), q(t) ? t === g || t == null || t === "" ? (this._$AH !== g && this._$AR(), this._$AH = g) : t !== this._$AH && t !== x && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Ht(t) ? this.k(t) : this._(t);
359
+ t = R(this, t, s), q(t) ? t === g || t == null || t === "" ? (this._$AH !== g && this._$AR(), this._$AH = g) : t !== this._$AH && t !== x && this._(t) : t._$litType$ !== void 0 ? this.$(t) : t.nodeType !== void 0 ? this.T(t) : Mt(t) ? this.k(t) : this._(t);
360
360
  }
361
361
  O(t) {
362
362
  return this._$AA.parentNode.insertBefore(t, this._$AB);
@@ -473,7 +473,7 @@ const Gt = (e, t, s) => {
473
473
  return r._$AI(e), r;
474
474
  };
475
475
  const st = globalThis;
476
- let H = class extends U {
476
+ let M = class extends U {
477
477
  constructor() {
478
478
  super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
479
479
  }
@@ -495,9 +495,9 @@ let H = class extends U {
495
495
  return x;
496
496
  }
497
497
  };
498
- H._$litElement$ = !0, H.finalized = !0, st.litElementHydrateSupport?.({ LitElement: H });
498
+ M._$litElement$ = !0, M.finalized = !0, st.litElementHydrateSupport?.({ LitElement: M });
499
499
  const Jt = st.litElementPolyfillSupport;
500
- Jt?.({ LitElement: H });
500
+ Jt?.({ LitElement: M });
501
501
  (st.litElementVersions ??= []).push("4.2.1");
502
502
  const Zt = (e) => (t, s) => {
503
503
  s !== void 0 ? s.addInitializer((() => {
@@ -609,7 +609,7 @@ const yt = (e, t, s) => {
609
609
  const i = /* @__PURE__ */ new Map();
610
610
  for (let r = t; r <= s; r++) i.set(e[r], r);
611
611
  return i;
612
- }, wt = kt(class extends Ct {
612
+ }, $t = kt(class extends Ct {
613
613
  constructor(e) {
614
614
  if (super(e), e.type !== St.CHILD) throw Error("repeat() can only be used in text expressions");
615
615
  }
@@ -628,24 +628,24 @@ const yt = (e, t, s) => {
628
628
  const r = re(e), { values: o, keys: a } = this.dt(t, s, i);
629
629
  if (!Array.isArray(r)) return this.ut = a, o;
630
630
  const c = this.ut ??= [], n = [];
631
- let h, d, l = 0, p = r.length - 1, u = 0, w = o.length - 1;
632
- for (; l <= p && u <= w; ) if (r[l] === null) l++;
631
+ let h, d, l = 0, p = r.length - 1, u = 0, $ = o.length - 1;
632
+ for (; l <= p && u <= $; ) if (r[l] === null) l++;
633
633
  else if (r[p] === null) p--;
634
634
  else if (c[l] === a[u]) n[u] = P(r[l], o[u]), l++, u++;
635
- else if (c[p] === a[w]) n[w] = P(r[p], o[w]), p--, w--;
636
- else if (c[l] === a[w]) n[w] = P(r[l], o[w]), L(e, n[w + 1], r[l]), l++, w--;
635
+ else if (c[p] === a[$]) n[$] = P(r[p], o[$]), p--, $--;
636
+ else if (c[l] === a[$]) n[$] = P(r[l], o[$]), L(e, n[$ + 1], r[l]), l++, $--;
637
637
  else if (c[p] === a[u]) n[u] = P(r[p], o[u]), L(e, r[l], r[p]), p--, u++;
638
- else if (h === void 0 && (h = yt(a, u, w), d = yt(c, l, p)), h.has(c[l])) if (h.has(c[p])) {
638
+ else if (h === void 0 && (h = yt(a, u, $), d = yt(c, l, p)), h.has(c[l])) if (h.has(c[p])) {
639
639
  const v = d.get(a[u]), A = v !== void 0 ? r[v] : null;
640
640
  if (A === null) {
641
- const $ = L(e, r[l]);
642
- P($, o[u]), n[u] = $;
641
+ const w = L(e, r[l]);
642
+ P(w, o[u]), n[u] = w;
643
643
  } else n[u] = P(A, o[u]), L(e, r[l], A), r[v] = null;
644
644
  u++;
645
645
  } else G(r[p]), p--;
646
646
  else G(r[l]), l++;
647
- for (; u <= w; ) {
648
- const v = L(e, n[w + 1]);
647
+ for (; u <= $; ) {
648
+ const v = L(e, n[$ + 1]);
649
649
  P(v, o[u]), n[u++] = v;
650
650
  }
651
651
  for (; l <= p; ) {
@@ -674,7 +674,7 @@ const yt = (e, t, s) => {
674
674
  refreshToken: p,
675
675
  idToken: u
676
676
  }) => {
677
- const w = await fetch(`${e}${t.login}`, {
677
+ const $ = await fetch(`${e}${t.login}`, {
678
678
  method: "POST",
679
679
  headers: {
680
680
  "Content-Type": "application/json"
@@ -687,11 +687,11 @@ const yt = (e, t, s) => {
687
687
  idToken: u
688
688
  })
689
689
  });
690
- if (!w.ok) {
691
- const v = await w.json();
690
+ if (!$.ok) {
691
+ const v = await $.json();
692
692
  throw new Error(v.message || v.error || "Login failed");
693
693
  }
694
- return w.json();
694
+ return $.json();
695
695
  },
696
696
  logout: async ({
697
697
  accessToken: h,
@@ -753,7 +753,7 @@ const yt = (e, t, s) => {
753
753
  phone_number: l,
754
754
  family_name: p,
755
755
  given_name: u,
756
- code: w
756
+ code: $
757
757
  }) => {
758
758
  const v = await fetch(`${e}${t.register}`, {
759
759
  method: "POST",
@@ -766,7 +766,7 @@ const yt = (e, t, s) => {
766
766
  phone_number: l,
767
767
  family_name: p,
768
768
  given_name: u,
769
- code: w
769
+ code: $
770
770
  })
771
771
  });
772
772
  if (!v.ok) {
@@ -830,11 +830,11 @@ const yt = (e, t, s) => {
830
830
  maxAge: l,
831
831
  path: p = "/",
832
832
  secure: u = window.location.protocol === "https:",
833
- sameSite: w = "lax",
833
+ sameSite: $ = "lax",
834
834
  domain: v
835
835
  } = d;
836
836
  let A = `${encodeURIComponent(n)}=${encodeURIComponent(h)}`;
837
- l !== void 0 && (A += `; Max-Age=${l}`), A += `; Path=${p}`, u && (A += "; Secure"), A += `; SameSite=${w}`, v && (A += `; Domain=${v}`), document.cookie = A;
837
+ l !== void 0 && (A += `; Max-Age=${l}`), A += `; Path=${p}`, u && (A += "; Secure"), A += `; SameSite=${$}`, v && (A += `; Domain=${v}`), document.cookie = A;
838
838
  }, t = (n) => {
839
839
  const h = encodeURIComponent(n) + "=", d = document.cookie.split(";");
840
840
  for (let l = 0; l < d.length; l++) {
@@ -882,20 +882,20 @@ const yt = (e, t, s) => {
882
882
  domain: e,
883
883
  clientId: i,
884
884
  redirectUri: he(r)
885
- }, a = ($) => {
886
- const _ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~", k = new Uint8Array($);
885
+ }, a = (w) => {
886
+ const _ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~", k = new Uint8Array(w);
887
887
  return crypto.getRandomValues(k), Array.from(k).map((E) => _[E % _.length]).join("");
888
- }, c = async ($) => {
889
- const k = new TextEncoder().encode($), E = await crypto.subtle.digest("SHA-256", k);
888
+ }, c = async (w) => {
889
+ const k = new TextEncoder().encode(w), E = await crypto.subtle.digest("SHA-256", k);
890
890
  return btoa(String.fromCharCode(...new Uint8Array(E))).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
891
891
  }, n = async () => {
892
- const $ = a(128), _ = await c($);
893
- return sessionStorage.setItem("pkce_code_verifier", $), { codeVerifier: $, codeChallenge: _ };
892
+ const w = a(128), _ = await c(w);
893
+ return sessionStorage.setItem("pkce_code_verifier", w), { codeVerifier: w, codeChallenge: _ };
894
894
  }, h = () => {
895
- const $ = a(32);
896
- return sessionStorage.setItem("oauth_state", $), $;
895
+ const w = a(32);
896
+ return sessionStorage.setItem("oauth_state", w), w;
897
897
  }, d = async () => {
898
- const { codeChallenge: $ } = await n(), _ = h(), k = new URLSearchParams({
898
+ const { codeChallenge: w } = await n(), _ = h(), k = new URLSearchParams({
899
899
  response_type: "code",
900
900
  client_id: o.clientId,
901
901
  redirect_uri: o.redirectUri,
@@ -903,15 +903,15 @@ const yt = (e, t, s) => {
903
903
  scope: "openid email profile",
904
904
  state: _,
905
905
  code_challenge_method: "S256",
906
- code_challenge: $,
906
+ code_challenge: w,
907
907
  prompt: "select_account"
908
908
  });
909
909
  return `${o.domain}/oauth2/authorize?${k.toString()}`;
910
910
  }, l = async () => {
911
- const $ = await d();
912
- window.location.href = $;
911
+ const w = await d();
912
+ window.location.href = w;
913
913
  }, p = async () => {
914
- const { codeChallenge: $ } = await n(), _ = h(), k = new URLSearchParams({
914
+ const { codeChallenge: w } = await n(), _ = h(), k = new URLSearchParams({
915
915
  response_type: "code",
916
916
  client_id: o.clientId,
917
917
  redirect_uri: o.redirectUri,
@@ -919,32 +919,32 @@ const yt = (e, t, s) => {
919
919
  scope: "openid email profile",
920
920
  state: _,
921
921
  code_challenge_method: "S256",
922
- code_challenge: $
922
+ code_challenge: w
923
923
  });
924
924
  return `${o.domain}/oauth2/authorize?${k.toString()}`;
925
925
  }, u = async () => {
926
- const $ = await p();
927
- window.location.href = $;
928
- }, w = ($) => {
926
+ const w = await p();
927
+ window.location.href = w;
928
+ }, $ = (w) => {
929
929
  const _ = sessionStorage.getItem("oauth_state");
930
- return sessionStorage.removeItem("oauth_state"), _ === $;
930
+ return sessionStorage.removeItem("oauth_state"), _ === w;
931
931
  }, v = () => {
932
- const $ = sessionStorage.getItem("pkce_code_verifier");
933
- return sessionStorage.removeItem("pkce_code_verifier"), $;
932
+ const w = sessionStorage.getItem("pkce_code_verifier");
933
+ return sessionStorage.removeItem("pkce_code_verifier"), w;
934
934
  };
935
935
  return {
936
936
  redirectToGoogleAuth: l,
937
937
  redirectToAppleAuth: u,
938
- validateState: w,
938
+ validateState: $,
939
939
  getCodeVerifier: v,
940
- exchangeCodeForTokens: async ($) => {
940
+ exchangeCodeForTokens: async (w) => {
941
941
  const _ = v();
942
942
  if (!_)
943
943
  throw new Error("PKCE code verifier not found. Please restart the authentication flow.");
944
944
  const k = new URLSearchParams({
945
945
  grant_type: "authorization_code",
946
946
  client_id: o.clientId,
947
- code: $,
947
+ code: w,
948
948
  redirect_uri: o.redirectUri,
949
949
  code_verifier: _
950
950
  }), E = await fetch(`${o.domain}/oauth2/token`, {
@@ -1461,7 +1461,7 @@ const yt = (e, t, s) => {
1461
1461
  transition: none !important;
1462
1462
  }
1463
1463
  }`;
1464
- var pe = Object.defineProperty, ue = Object.getOwnPropertyDescriptor, f = (e, t, s, i) => {
1464
+ var pe = Object.defineProperty, ue = Object.getOwnPropertyDescriptor, y = (e, t, s, i) => {
1465
1465
  for (var r = i > 1 ? void 0 : i ? ue(t, s) : t, o = e.length - 1, a; o >= 0; o--)
1466
1466
  (a = e[o]) && (r = (i ? a(t, s, r) : a(r)) || r);
1467
1467
  return i && r && pe(t, s, r), r;
@@ -1477,7 +1477,7 @@ const ge = [
1477
1477
  "token_type",
1478
1478
  "expires_in"
1479
1479
  ];
1480
- let m = class extends H {
1480
+ let m = class extends M {
1481
1481
  constructor() {
1482
1482
  super(...arguments), this.open = !1, this.initialMode = "signin", this.logoUrl = "", this.baseUrl = "", this.oauthDomain = "", this.oauthRegion = "", this.oauthUserPoolId = "", this.oauthClientId = "", this.oauthRedirectUri = "", this.oauthSpaDomain = "", this.size = "sm", this.theme = "light", this.disableSignup = !1, this.mode = "signin", this.resetStep = "none", this.signupStep = "form", this.isLoading = !1, this.isClosing = !1, this.isVisible = !1, this.isLoggedIn = !1, this.email = "", this.password = "", this.givenName = "", this.familyName = "", this.newPassword = "", this.confirmPassword = "", this.notice = "", this.error = "", this.errors = {}, this.otpDigits = ["", "", "", "", "", ""], this.signupOtpDigits = ["", "", "", "", "", ""], this.isDragging = !1, this.dragStartY = 0, this.dragCurrentY = 0, this.dragStartTime = 0, this.lastDragEndTime = 0, this.cookies = ne(), this.scrollPosition = 0, this.transitionDuration = 300, this.hasHandledOAuthCallback = !1, this.boundKeyHandler = (e) => {
1483
1483
  e.key === "Escape" && this.isVisible && this.handleClose();
@@ -1790,7 +1790,7 @@ let m = class extends H {
1790
1790
  }), await this.handleSignIn();
1791
1791
  }
1792
1792
  isUserLoggedIn() {
1793
- return this.isLoggedIn;
1793
+ return this.isLoggedIn || !!this.cookies.getAuthToken("ACCESS_TOKEN") && !!this.cookies.getAuthToken("REFRESH_TOKEN") && !!this.cookies.getAuthToken("AUTH_TOKEN");
1794
1794
  }
1795
1795
  async logout() {
1796
1796
  const e = this.cookies.getAuthToken("ACCESS_TOKEN"), t = this.cookies.getAuthToken("AUTH_TOKEN"), s = this.cookies.getAuthToken("REFRESH_TOKEN");
@@ -1909,7 +1909,7 @@ let m = class extends H {
1909
1909
  "modal-container--dragging": this.isDragging,
1910
1910
  [`modal-container--${this.size}`]: !0
1911
1911
  };
1912
- return y`
1912
+ return f`
1913
1913
  <!-- Modal/Drawer -->
1914
1914
  <div
1915
1915
  class=${mt(e)}
@@ -1949,8 +1949,8 @@ let m = class extends H {
1949
1949
  renderContent() {
1950
1950
  if (!this.hasApiBaseUrl()) {
1951
1951
  const e = this.baseUrlErrorMessage;
1952
- return y`
1953
- ${this.logoUrl.length > 0 ? y`
1952
+ return f`
1953
+ ${this.logoUrl.length > 0 ? f`
1954
1954
  <header class="modal-header">
1955
1955
  <div class="auth-header">
1956
1956
  <img
@@ -1973,9 +1973,34 @@ let m = class extends H {
1973
1973
  </div>
1974
1974
  `;
1975
1975
  }
1976
- return this.isLoggedIn ? y`
1976
+ return this.isLoading && this.hasHandledOAuthCallback ? f`
1977
+ ${this.logoUrl.length > 0 ? f`
1978
+ <header class="modal-header">
1979
+ <div class="auth-header">
1980
+ <img
1981
+ src="${this.logoUrl}"
1982
+ width="48"
1983
+ height="48"
1984
+ alt="Logo"
1985
+ class="auth-logo"
1986
+ />
1987
+ </div>
1988
+ </header>
1989
+ ` : g}
1990
+
1991
+ <div class="modal-body">
1992
+ <div class="auth-form">
1993
+ <div class="form-actions">
1994
+ <button type="button" class="cta" disabled>
1995
+ Signing in...
1996
+ </button>
1997
+ </div>
1998
+ ${this.renderAlerts()}
1999
+ </div>
2000
+ </div>
2001
+ ` : this.isLoggedIn ? f`
1977
2002
  <!-- Header -->
1978
- ${this.logoUrl.length > 0 ? y`
2003
+ ${this.logoUrl.length > 0 ? f`
1979
2004
  <header class="modal-header">
1980
2005
  <div class="auth-header">
1981
2006
  <img
@@ -1998,9 +2023,9 @@ let m = class extends H {
1998
2023
  ${this.renderAlerts()}
1999
2024
  </div>
2000
2025
  </div>
2001
- ` : y`
2026
+ ` : f`
2002
2027
  <!-- Header -->
2003
- ${(!this.mode || this.resetStep === "none") && this.logoUrl.length > 0 && this.mode === "signin" ? y`
2028
+ ${(!this.mode || this.resetStep === "none") && this.logoUrl.length > 0 && this.mode === "signin" ? f`
2004
2029
  <header class="modal-header">
2005
2030
 
2006
2031
  <div class="auth-header">
@@ -2034,7 +2059,7 @@ let m = class extends H {
2034
2059
  }
2035
2060
  renderFormContent() {
2036
2061
  if (this.resetStep === "none" && (!this.mode || this.mode === "signin" || this.signupStep === "form"))
2037
- return y`
2062
+ return f`
2038
2063
  <!-- Email -->
2039
2064
  <label class="field">
2040
2065
  <span class="field-label">Email Address</span>
@@ -2048,7 +2073,7 @@ let m = class extends H {
2048
2073
  required
2049
2074
  autocomplete="email"
2050
2075
  />
2051
- ${this.errors.email ? y`<span class="field-error">${this.errors.email}</span>` : g}
2076
+ ${this.errors.email ? f`<span class="field-error">${this.errors.email}</span>` : g}
2052
2077
  </label>
2053
2078
 
2054
2079
  <!-- Password -->
@@ -2063,10 +2088,10 @@ let m = class extends H {
2063
2088
  required
2064
2089
  autocomplete=${this.mode === "signup" ? "new-password" : "current-password"}
2065
2090
  />
2066
- ${this.errors.password ? y`<span class="field-error">${this.errors.password}</span>` : g}
2091
+ ${this.errors.password ? f`<span class="field-error">${this.errors.password}</span>` : g}
2067
2092
  </label>
2068
2093
 
2069
- ${this.mode === "signin" && this.error ? y`
2094
+ ${this.mode === "signin" && this.error ? f`
2070
2095
  <div class="forgot-row">
2071
2096
  <button type="button" class="text-btn" @click=${this.startReset}>
2072
2097
  Forgot your password?
@@ -2074,7 +2099,7 @@ let m = class extends H {
2074
2099
  </div>
2075
2100
  ` : g}
2076
2101
 
2077
- ${this.mode === "signup" ? y`
2102
+ ${this.mode === "signup" ? f`
2078
2103
  <!-- Confirm Password -->
2079
2104
  <label class="field">
2080
2105
  <span class="field-label">Confirm Password</span>
@@ -2087,7 +2112,7 @@ let m = class extends H {
2087
2112
  required
2088
2113
  autocomplete="new-password"
2089
2114
  />
2090
- ${this.errors.confirm_password ? y`<span class="field-error">${this.errors.confirm_password}</span>` : g}
2115
+ ${this.errors.confirm_password ? f`<span class="field-error">${this.errors.confirm_password}</span>` : g}
2091
2116
  </label>
2092
2117
 
2093
2118
  <!-- First Name -->
@@ -2102,7 +2127,7 @@ let m = class extends H {
2102
2127
  required
2103
2128
  autocomplete="given-name"
2104
2129
  />
2105
- ${this.errors.givenName ? y`<span class="field-error">${this.errors.givenName}</span>` : g}
2130
+ ${this.errors.givenName ? f`<span class="field-error">${this.errors.givenName}</span>` : g}
2106
2131
  </label>
2107
2132
 
2108
2133
  <!-- Last Name -->
@@ -2117,19 +2142,19 @@ let m = class extends H {
2117
2142
  required
2118
2143
  autocomplete="family-name"
2119
2144
  />
2120
- ${this.errors.familyName ? y`<span class="field-error">${this.errors.familyName}</span>` : g}
2145
+ ${this.errors.familyName ? f`<span class="field-error">${this.errors.familyName}</span>` : g}
2121
2146
  </label>
2122
2147
  ` : g}
2123
2148
  `;
2124
2149
  if (this.mode === "signup" && this.signupStep === "otp")
2125
- return y`
2150
+ return f`
2126
2151
  <div class="otp-section">
2127
2152
  <label class="otp-label">Enter 6-digit code</label>
2128
2153
  <div class="otp-inputs" role="group" aria-label="One time code">
2129
- ${wt(
2154
+ ${$t(
2130
2155
  Array.from({ length: 6 }, (e, t) => t),
2131
2156
  (e) => e,
2132
- (e) => y`
2157
+ (e) => f`
2133
2158
  <input
2134
2159
  class="otp-input signup-otp-input ${this.errors.signup_otp ? "otp-input--error" : ""}"
2135
2160
  type="text"
@@ -2146,7 +2171,7 @@ let m = class extends H {
2146
2171
  `
2147
2172
  )}
2148
2173
  </div>
2149
- ${this.errors.signup_otp ? y`<p class="otp-error">${this.errors.signup_otp}</p>` : g}
2174
+ ${this.errors.signup_otp ? f`<p class="otp-error">${this.errors.signup_otp}</p>` : g}
2150
2175
  </div>
2151
2176
  <div class="forgot-row">
2152
2177
  <button type="button" class="text-btn" @click=${this.backToSignupForm}>
@@ -2155,7 +2180,7 @@ let m = class extends H {
2155
2180
  </div>
2156
2181
  `;
2157
2182
  if (this.resetStep === "request")
2158
- return y`
2183
+ return f`
2159
2184
  <label class="field">
2160
2185
  <span class="field-label">Email Address</span>
2161
2186
  <input
@@ -2168,7 +2193,7 @@ let m = class extends H {
2168
2193
  required
2169
2194
  autocomplete="email"
2170
2195
  />
2171
- ${this.errors.email ? y`<span class="field-error">${this.errors.email}</span>` : g}
2196
+ ${this.errors.email ? f`<span class="field-error">${this.errors.email}</span>` : g}
2172
2197
  </label>
2173
2198
  <div class="forgot-row">
2174
2199
  <button type="button" class="text-btn" @click=${this.cancelReset}>
@@ -2178,7 +2203,7 @@ let m = class extends H {
2178
2203
  `;
2179
2204
  if (this.resetStep === "confirm") {
2180
2205
  const e = this.otpDigits.every((t) => /^\d$/.test(t));
2181
- return y`
2206
+ return f`
2182
2207
  <label class="field">
2183
2208
  <span class="field-label">Email Address</span>
2184
2209
  <input
@@ -2190,16 +2215,16 @@ let m = class extends H {
2190
2215
  required
2191
2216
  autocomplete="email"
2192
2217
  />
2193
- ${this.errors.email ? y`<span class="field-error">${this.errors.email}</span>` : g}
2218
+ ${this.errors.email ? f`<span class="field-error">${this.errors.email}</span>` : g}
2194
2219
  </label>
2195
2220
 
2196
2221
  <div class="otp-section">
2197
2222
  <label class="otp-label">Enter 6-digit code</label>
2198
2223
  <div class="otp-inputs" role="group" aria-label="One time code">
2199
- ${wt(
2224
+ ${$t(
2200
2225
  Array.from({ length: 6 }, (t, s) => s),
2201
2226
  (t) => t,
2202
- (t) => y`
2227
+ (t) => f`
2203
2228
  <input
2204
2229
  class="otp-input reset-otp-input ${this.errors.otp ? "otp-input--error" : ""}"
2205
2230
  type="text"
@@ -2216,10 +2241,10 @@ let m = class extends H {
2216
2241
  `
2217
2242
  )}
2218
2243
  </div>
2219
- ${this.errors.otp ? y`<p class="otp-error">${this.errors.otp}</p>` : g}
2244
+ ${this.errors.otp ? f`<p class="otp-error">${this.errors.otp}</p>` : g}
2220
2245
  </div>
2221
2246
 
2222
- ${e ? y`
2247
+ ${e ? f`
2223
2248
  <div class="new-password-fields">
2224
2249
  <label class="field">
2225
2250
  <span class="field-label">New Password</span>
@@ -2232,7 +2257,7 @@ let m = class extends H {
2232
2257
  required
2233
2258
  autocomplete="new-password"
2234
2259
  />
2235
- ${this.errors.new_password ? y`<span class="field-error">${this.errors.new_password}</span>` : g}
2260
+ ${this.errors.new_password ? f`<span class="field-error">${this.errors.new_password}</span>` : g}
2236
2261
  </label>
2237
2262
 
2238
2263
  <label class="field">
@@ -2246,7 +2271,7 @@ let m = class extends H {
2246
2271
  required
2247
2272
  autocomplete="new-password"
2248
2273
  />
2249
- ${this.errors.confirm_password ? y`<span class="field-error">${this.errors.confirm_password}</span>` : g}
2274
+ ${this.errors.confirm_password ? f`<span class="field-error">${this.errors.confirm_password}</span>` : g}
2250
2275
  </label>
2251
2276
  </div>
2252
2277
  ` : g}
@@ -2262,31 +2287,31 @@ let m = class extends H {
2262
2287
  }
2263
2288
  renderActions() {
2264
2289
  if (this.resetStep === "request")
2265
- return y`
2290
+ return f`
2266
2291
  <button type="submit" class="cta" ?disabled=${this.isLoading}>
2267
2292
  ${this.isLoading ? "Sending..." : "Send Reset Code"}
2268
2293
  </button>
2269
2294
  `;
2270
2295
  if (this.resetStep === "confirm")
2271
- return this.otpDigits.every((t) => /^\d$/.test(t)) ? y`
2296
+ return this.otpDigits.every((t) => /^\d$/.test(t)) ? f`
2272
2297
  <button type="submit" class="cta" ?disabled=${this.isLoading}>
2273
2298
  ${this.isLoading ? "Resetting..." : "Reset Password"}
2274
2299
  </button>
2275
2300
  ` : g;
2276
2301
  if (this.mode === "signup" && this.signupStep === "otp") {
2277
2302
  const e = this.signupOtpDigits.every((t) => /^\d$/.test(t));
2278
- return y`
2303
+ return f`
2279
2304
  <button type="submit" class="cta" ?disabled=${!e || this.isLoading}>
2280
2305
  ${this.isLoading ? "Completing..." : "Complete Registration"}
2281
2306
  </button>
2282
2307
  `;
2283
2308
  }
2284
- return y`
2309
+ return f`
2285
2310
  <button type="submit" class="cta" ?disabled=${this.isLoading}>
2286
2311
  ${this.isLoading ? "Loading..." : this.mode === "signup" ? "Continue" : "Sign In"}
2287
2312
  </button>
2288
2313
 
2289
- ${this.isOAuthConfigured() && this.mode === "signin" ? y`
2314
+ ${this.isOAuthConfigured() && this.mode === "signin" ? f`
2290
2315
  <div class="button-row">
2291
2316
  <button
2292
2317
  type="button"
@@ -2310,8 +2335,8 @@ let m = class extends H {
2310
2335
  `;
2311
2336
  }
2312
2337
  renderAlerts() {
2313
- return y`
2314
- ${this.notice ? y`
2338
+ return f`
2339
+ ${this.notice ? f`
2315
2340
  <div class="alert alert--success">
2316
2341
  ${this.notice}
2317
2342
  <button class="alert-close" @click=${() => this.notice = ""} aria-label="Dismiss">
@@ -2319,7 +2344,7 @@ let m = class extends H {
2319
2344
  </button>
2320
2345
  </div>
2321
2346
  ` : g}
2322
- ${this.error ? y`
2347
+ ${this.error ? f`
2323
2348
  <div class="alert alert--error">
2324
2349
  ${this.error}
2325
2350
  <button class="alert-close" @click=${() => this.error = ""} aria-label="Dismiss">
@@ -2330,7 +2355,7 @@ let m = class extends H {
2330
2355
  `;
2331
2356
  }
2332
2357
  renderFooter() {
2333
- return this.isLoggedIn ? g : this.resetStep === "none" && (!this.mode || this.mode === "signin" || this.signupStep === "form") ? this.disableSignup ? g : y`
2358
+ return this.isLoggedIn ? g : this.resetStep === "none" && (!this.mode || this.mode === "signin" || this.signupStep === "form") ? this.disableSignup ? g : f`
2334
2359
  <div class="auth-footer">
2335
2360
  <p class="toggle-text">
2336
2361
  ${this.mode === "signup" ? "Already have an account?" : "Don't have an account?"}
@@ -2339,7 +2364,7 @@ let m = class extends H {
2339
2364
  ${this.mode === "signup" ? "Sign In" : "Sign Up"}
2340
2365
  </button>
2341
2366
  </div>
2342
- ` : y`
2367
+ ` : f`
2343
2368
  <div class="auth-footer">
2344
2369
  <p class="toggle-text">
2345
2370
  Having trouble? Email
@@ -2349,7 +2374,7 @@ let m = class extends H {
2349
2374
  `;
2350
2375
  }
2351
2376
  renderGoogleIcon() {
2352
- return y`
2377
+ return f`
2353
2378
  <svg viewBox="-0.5 0 48 48" width="18" height="18" fill="none">
2354
2379
  <path d="M9.82727273,24 C9.82727273,22.4757333 10.0804318,21.0144 10.5322727,19.6437333 L2.62345455,13.6042667 C1.08206818,16.7338667 0.213636364,20.2602667 0.213636364,24 C0.213636364,27.7365333 1.081,31.2608 2.62025,34.3882667 L10.5247955,28.3370667 C10.0772273,26.9728 9.82727273,25.5168 9.82727273,24" fill="#FBBC05"></path>
2355
2380
  <path d="M23.7136364,10.1333333 C27.025,10.1333333 30.0159091,11.3066667 32.3659091,13.2266667 L39.2022727,6.4 C35.0363636,2.77333333 29.6954545,0.533333333 23.7136364,0.533333333 C14.4268636,0.533333333 6.44540909,5.84426667 2.62345455,13.6042667 L10.5322727,19.6437333 C12.3545909,14.112 17.5491591,10.1333333 23.7136364,10.1333333" fill="#EB4335"></path>
@@ -2359,7 +2384,7 @@ let m = class extends H {
2359
2384
  `;
2360
2385
  }
2361
2386
  renderAppleIcon() {
2362
- return y`
2387
+ return f`
2363
2388
  <svg viewBox="-3.5 0 48 48" width="18" height="18" class="apple-icon">
2364
2389
  <path d="M231.174735,567.792499 C232.740177,565.771699 233.926883,562.915484 233.497649,560 C230.939077,560.177808 227.948466,561.814769 226.203475,563.948463 C224.612784,565.88177 223.305444,568.757742 223.816036,571.549042 C226.613071,571.636535 229.499881,569.960061 231.174735,567.792499 L231.174735,567.792499 Z M245,595.217241 C243.880625,597.712195 243.341978,598.827022 241.899976,601.03692 C239.888467,604.121745 237.052156,607.962958 233.53412,607.991182 C230.411652,608.02505 229.606488,605.94498 225.367451,605.970382 C221.128414,605.99296 220.244696,608.030695 217.116618,607.999649 C213.601387,607.968603 210.913765,604.502761 208.902256,601.417937 C203.27452,592.79849 202.68257,582.680377 206.152914,577.298162 C208.621711,573.476705 212.515678,571.241407 216.173986,571.241407 C219.89682,571.241407 222.239372,573.296075 225.322563,573.296075 C228.313175,573.296075 230.133913,571.235762 234.440281,571.235762 C237.700215,571.235762 241.153726,573.022307 243.611302,576.10431 C235.554045,580.546683 236.85858,592.121127 245,595.217241 L245,595.217241 Z" transform="translate(-204.000000, -560.000000)" fill="#0b0b0a"></path>
2365
2390
  </svg>
@@ -2399,124 +2424,124 @@ let m = class extends H {
2399
2424
  }
2400
2425
  };
2401
2426
  m.styles = de();
2402
- f([
2427
+ y([
2403
2428
  S({ type: Boolean, reflect: !0 })
2404
2429
  ], m.prototype, "open", 2);
2405
- f([
2430
+ y([
2406
2431
  S({ type: String, attribute: "initial-mode" })
2407
2432
  ], m.prototype, "initialMode", 2);
2408
- f([
2433
+ y([
2409
2434
  S({ type: String, attribute: "logo-url" })
2410
2435
  ], m.prototype, "logoUrl", 2);
2411
- f([
2436
+ y([
2412
2437
  S({ type: String, attribute: "api-domain" })
2413
2438
  ], m.prototype, "baseUrl", 2);
2414
- f([
2439
+ y([
2415
2440
  S({ type: String, attribute: "oauth-domain" })
2416
2441
  ], m.prototype, "oauthDomain", 2);
2417
- f([
2442
+ y([
2418
2443
  S({ type: String, attribute: "oauth-region" })
2419
2444
  ], m.prototype, "oauthRegion", 2);
2420
- f([
2445
+ y([
2421
2446
  S({ type: String, attribute: "oauth-user-pool-id" })
2422
2447
  ], m.prototype, "oauthUserPoolId", 2);
2423
- f([
2448
+ y([
2424
2449
  S({ type: String, attribute: "oauth-client-id" })
2425
2450
  ], m.prototype, "oauthClientId", 2);
2426
- f([
2451
+ y([
2427
2452
  S({ type: String, attribute: "oauth-redirect-uri" })
2428
2453
  ], m.prototype, "oauthRedirectUri", 2);
2429
- f([
2454
+ y([
2430
2455
  S({ type: String, attribute: "oauth-spa-domain" })
2431
2456
  ], m.prototype, "oauthSpaDomain", 2);
2432
- f([
2457
+ y([
2433
2458
  S({ type: String, attribute: "size" })
2434
2459
  ], m.prototype, "size", 2);
2435
- f([
2460
+ y([
2436
2461
  S({ type: String, attribute: "data-theme", reflect: !0 })
2437
2462
  ], m.prototype, "theme", 2);
2438
- f([
2463
+ y([
2439
2464
  S({ type: Boolean, attribute: "disable-signup" })
2440
2465
  ], m.prototype, "disableSignup", 2);
2441
- f([
2466
+ y([
2442
2467
  b()
2443
2468
  ], m.prototype, "mode", 2);
2444
- f([
2469
+ y([
2445
2470
  b()
2446
2471
  ], m.prototype, "resetStep", 2);
2447
- f([
2472
+ y([
2448
2473
  b()
2449
2474
  ], m.prototype, "signupStep", 2);
2450
- f([
2475
+ y([
2451
2476
  b()
2452
2477
  ], m.prototype, "isLoading", 2);
2453
- f([
2478
+ y([
2454
2479
  b()
2455
2480
  ], m.prototype, "isClosing", 2);
2456
- f([
2481
+ y([
2457
2482
  b()
2458
2483
  ], m.prototype, "isVisible", 2);
2459
- f([
2484
+ y([
2460
2485
  b()
2461
2486
  ], m.prototype, "isLoggedIn", 2);
2462
- f([
2487
+ y([
2463
2488
  b()
2464
2489
  ], m.prototype, "email", 2);
2465
- f([
2490
+ y([
2466
2491
  b()
2467
2492
  ], m.prototype, "password", 2);
2468
- f([
2493
+ y([
2469
2494
  b()
2470
2495
  ], m.prototype, "givenName", 2);
2471
- f([
2496
+ y([
2472
2497
  b()
2473
2498
  ], m.prototype, "familyName", 2);
2474
- f([
2499
+ y([
2475
2500
  b()
2476
2501
  ], m.prototype, "newPassword", 2);
2477
- f([
2502
+ y([
2478
2503
  b()
2479
2504
  ], m.prototype, "confirmPassword", 2);
2480
- f([
2505
+ y([
2481
2506
  b()
2482
2507
  ], m.prototype, "notice", 2);
2483
- f([
2508
+ y([
2484
2509
  b()
2485
2510
  ], m.prototype, "error", 2);
2486
- f([
2511
+ y([
2487
2512
  b()
2488
2513
  ], m.prototype, "errors", 2);
2489
- f([
2514
+ y([
2490
2515
  b()
2491
2516
  ], m.prototype, "otpDigits", 2);
2492
- f([
2517
+ y([
2493
2518
  b()
2494
2519
  ], m.prototype, "signupOtpDigits", 2);
2495
- f([
2520
+ y([
2496
2521
  b()
2497
2522
  ], m.prototype, "isDragging", 2);
2498
- f([
2523
+ y([
2499
2524
  b()
2500
2525
  ], m.prototype, "dragStartY", 2);
2501
- f([
2526
+ y([
2502
2527
  b()
2503
2528
  ], m.prototype, "dragCurrentY", 2);
2504
- f([
2529
+ y([
2505
2530
  b()
2506
2531
  ], m.prototype, "dragStartTime", 2);
2507
- f([
2532
+ y([
2508
2533
  b()
2509
2534
  ], m.prototype, "lastDragEndTime", 2);
2510
- f([
2535
+ y([
2511
2536
  it(".modal-container")
2512
2537
  ], m.prototype, "modalContainer", 2);
2513
- f([
2538
+ y([
2514
2539
  it("#email-input")
2515
2540
  ], m.prototype, "emailInput", 2);
2516
- f([
2541
+ y([
2517
2542
  it(".modal-body")
2518
2543
  ], m.prototype, "modalBody", 2);
2519
- m = f([
2544
+ m = y([
2520
2545
  Zt("auth-drawer")
2521
2546
  ], m);
2522
2547
  export {