@cal.macconnachie/web-components 0.0.10 → 0.0.12

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 wt = class {
2
+ let $t = 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 wt = class {
17
17
  return this.cssText;
18
18
  }
19
19
  };
20
- const xt = (e) => new wt(typeof e == "string" ? e : e + "", void 0, Q), Et = (e, ...t) => {
20
+ const xt = (e) => new $t(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 wt(s, e, Q);
26
+ return new $t(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) {
@@ -249,7 +249,7 @@ let U = class extends HTMLElement {
249
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
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 = `[
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 }), f = 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 }), y = 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;
@@ -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), $ = /([.?@])?(.*)/.exec(p);
283
- n.push({ type: 1, index: o, name: $[2], strings: u, ctor: $[1] === "." ? zt : $[1] === "?" ? Yt : $[1] === "@" ? Kt : V }), r.removeAttribute(l);
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);
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;
@@ -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
- }, $t = kt(class extends Ct {
612
+ }, wt = 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, $ = o.length - 1;
632
- for (; l <= p && u <= $; ) if (r[l] === null) l++;
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++;
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[$]) n[$] = P(r[p], o[$]), p--, $--;
636
- else if (c[l] === a[$]) n[$] = P(r[l], o[$]), L(e, n[$ + 1], r[l]), l++, $--;
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--;
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, $), d = yt(c, l, p)), h.has(c[l])) if (h.has(c[p])) {
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])) {
639
639
  const v = d.get(a[u]), A = v !== void 0 ? r[v] : null;
640
640
  if (A === null) {
641
- const w = L(e, r[l]);
642
- P(w, o[u]), n[u] = w;
641
+ const $ = L(e, r[l]);
642
+ P($, o[u]), n[u] = $;
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 <= $; ) {
648
- const v = L(e, n[$ + 1]);
647
+ for (; u <= w; ) {
648
+ const v = L(e, n[w + 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 $ = await fetch(`${e}${t.login}`, {
677
+ const w = 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 (!$.ok) {
691
- const v = await $.json();
690
+ if (!w.ok) {
691
+ const v = await w.json();
692
692
  throw new Error(v.message || v.error || "Login failed");
693
693
  }
694
- return $.json();
694
+ return w.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: $
756
+ code: w
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: $
769
+ code: w
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: $ = "lax",
833
+ sameSite: w = "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=${$}`, v && (A += `; Domain=${v}`), document.cookie = A;
837
+ l !== void 0 && (A += `; Max-Age=${l}`), A += `; Path=${p}`, u && (A += "; Secure"), A += `; SameSite=${w}`, 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 = (w) => {
886
- const _ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~", k = new Uint8Array(w);
885
+ }, a = ($) => {
886
+ const _ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~", k = new Uint8Array($);
887
887
  return crypto.getRandomValues(k), Array.from(k).map((E) => _[E % _.length]).join("");
888
- }, c = async (w) => {
889
- const k = new TextEncoder().encode(w), E = await crypto.subtle.digest("SHA-256", k);
888
+ }, c = async ($) => {
889
+ const k = new TextEncoder().encode($), 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 w = a(128), _ = await c(w);
893
- return sessionStorage.setItem("pkce_code_verifier", w), { codeVerifier: w, codeChallenge: _ };
892
+ const $ = a(128), _ = await c($);
893
+ return sessionStorage.setItem("pkce_code_verifier", $), { codeVerifier: $, codeChallenge: _ };
894
894
  }, h = () => {
895
- const w = a(32);
896
- return sessionStorage.setItem("oauth_state", w), w;
895
+ const $ = a(32);
896
+ return sessionStorage.setItem("oauth_state", $), $;
897
897
  }, d = async () => {
898
- const { codeChallenge: w } = await n(), _ = h(), k = new URLSearchParams({
898
+ const { codeChallenge: $ } = 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: w,
906
+ code_challenge: $,
907
907
  prompt: "select_account"
908
908
  });
909
909
  return `${o.domain}/oauth2/authorize?${k.toString()}`;
910
910
  }, l = async () => {
911
- const w = await d();
912
- window.location.href = w;
911
+ const $ = await d();
912
+ window.location.href = $;
913
913
  }, p = async () => {
914
- const { codeChallenge: w } = await n(), _ = h(), k = new URLSearchParams({
914
+ const { codeChallenge: $ } = 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: w
922
+ code_challenge: $
923
923
  });
924
924
  return `${o.domain}/oauth2/authorize?${k.toString()}`;
925
925
  }, u = async () => {
926
- const w = await p();
927
- window.location.href = w;
928
- }, $ = (w) => {
926
+ const $ = await p();
927
+ window.location.href = $;
928
+ }, w = ($) => {
929
929
  const _ = sessionStorage.getItem("oauth_state");
930
- return sessionStorage.removeItem("oauth_state"), _ === w;
930
+ return sessionStorage.removeItem("oauth_state"), _ === $;
931
931
  }, v = () => {
932
- const w = sessionStorage.getItem("pkce_code_verifier");
933
- return sessionStorage.removeItem("pkce_code_verifier"), w;
932
+ const $ = sessionStorage.getItem("pkce_code_verifier");
933
+ return sessionStorage.removeItem("pkce_code_verifier"), $;
934
934
  };
935
935
  return {
936
936
  redirectToGoogleAuth: l,
937
937
  redirectToAppleAuth: u,
938
- validateState: $,
938
+ validateState: w,
939
939
  getCodeVerifier: v,
940
- exchangeCodeForTokens: async (w) => {
940
+ exchangeCodeForTokens: async ($) => {
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: w,
947
+ code: $,
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, y = (e, t, s, i) => {
1464
+ var pe = Object.defineProperty, ue = Object.getOwnPropertyDescriptor, f = (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;
@@ -1479,7 +1479,7 @@ const ge = [
1479
1479
  ];
1480
1480
  let m = class extends H {
1481
1481
  constructor() {
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.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) => {
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();
1484
1484
  }, this.baseUrlErrorMessage = "Authentication service is not configured correctly. Please add an API domain or contact support.", this.handleClose = () => {
1485
1485
  this.isClosing || !this.isVisible || (this.cleanupInlineStyles(), this.isDragging = !1, this.dragStartY = 0, this.dragCurrentY = 0, this.dragStartTime = 0, this.isClosing = !0, setTimeout(() => {
@@ -1536,7 +1536,7 @@ let m = class extends H {
1536
1536
  connectedCallback() {
1537
1537
  super.connectedCallback(), window.addEventListener("keyup", this.boundKeyHandler);
1538
1538
  const e = this.cookies.getAuthToken("AUTH_TOKEN"), t = this.cookies.getAuthToken("REFRESH_TOKEN");
1539
- this.isLoggedIn = !!(e && t), this.mode = this.initialMode, this.hasApiBaseUrl() || (this.error = this.baseUrlErrorMessage), this.handleOAuthCallbackIfPresent();
1539
+ this.isLoggedIn = !!(e && t), this.mode = this.disableSignup && this.initialMode === "signup" ? "signin" : this.initialMode, this.hasApiBaseUrl() || (this.error = this.baseUrlErrorMessage), this.handleOAuthCallbackIfPresent();
1540
1540
  }
1541
1541
  disconnectedCallback() {
1542
1542
  window.removeEventListener("keyup", this.boundKeyHandler), this.unlockBodyScroll(), super.disconnectedCallback();
@@ -1545,7 +1545,7 @@ let m = class extends H {
1545
1545
  this.open && (this.isVisible = !0);
1546
1546
  }
1547
1547
  updated(e) {
1548
- e.has("baseUrl") && (this.apiService = void 0, this.hasApiBaseUrl() ? (this.error === this.baseUrlErrorMessage && (this.error = ""), this.hasHandledOAuthCallback || this.handleOAuthCallbackIfPresent()) : this.error = this.baseUrlErrorMessage), (e.has("oauthDomain") || e.has("oauthRegion") || e.has("oauthUserPoolId") || e.has("oauthClientId") || e.has("oauthRedirectUri")) && (this.oauthService = void 0, this.handleOAuthCallbackIfPresent()), e.has("open") && (this.open ? (this.isVisible = !0, this.lockBodyScroll(), setTimeout(() => {
1548
+ e.has("disableSignup") && this.disableSignup && this.mode === "signup" && (this.mode = "signin", this.signupStep = "form"), e.has("baseUrl") && (this.apiService = void 0, this.hasApiBaseUrl() ? (this.error === this.baseUrlErrorMessage && (this.error = ""), this.hasHandledOAuthCallback || this.handleOAuthCallbackIfPresent()) : this.error = this.baseUrlErrorMessage), (e.has("oauthDomain") || e.has("oauthRegion") || e.has("oauthUserPoolId") || e.has("oauthClientId") || e.has("oauthRedirectUri")) && (this.oauthService = void 0, this.handleOAuthCallbackIfPresent()), e.has("open") && (this.open ? (this.isVisible = !0, this.lockBodyScroll(), setTimeout(() => {
1549
1549
  this.emailInput?.focus();
1550
1550
  }, 100)) : this.isVisible && this.handleClose()), e.has("isVisible") && (this.isVisible ? (this.lockBodyScroll(), this.cleanupInlineStyles()) : (this.unlockBodyScroll(), this.resetState()));
1551
1551
  }
@@ -1564,7 +1564,7 @@ let m = class extends H {
1564
1564
  this.isDragging = !1, this.lastDragEndTime = 0, this.dragStartY = 0, this.dragCurrentY = 0, this.dragStartTime = 0, this.error = "", this.notice = "", this.errors = {}, this.email = "", this.password = "", this.givenName = "", this.familyName = "", this.newPassword = "", this.confirmPassword = "", this.otpDigits = ["", "", "", "", "", ""], this.signupOtpDigits = ["", "", "", "", "", ""], this.resetStep = "none", this.signupStep = "form", this.mode = this.initialMode;
1565
1565
  }
1566
1566
  toggleMode() {
1567
- this.resetStep === "none" && (this.mode = this.mode === "signin" ? "signup" : "signin", this.signupStep = "form", this.error = "", this.notice = "", this.errors = {}, this.confirmPassword = "", this.mode === "signin" && (this.givenName = "", this.familyName = "", this.signupOtpDigits = ["", "", "", "", "", ""]));
1567
+ this.resetStep === "none" && (this.disableSignup && this.mode === "signin" || (this.mode = this.mode === "signin" ? "signup" : "signin", this.signupStep = "form", this.error = "", this.notice = "", this.errors = {}, this.confirmPassword = "", this.mode === "signin" && (this.givenName = "", this.familyName = "", this.signupOtpDigits = ["", "", "", "", "", ""])));
1568
1568
  }
1569
1569
  startReset() {
1570
1570
  this.mode = "signin", this.resetStep = "request", this.error = "", this.notice = "", this.errors = {}, this.password = "", this.newPassword = "", this.confirmPassword = "";
@@ -1898,7 +1898,7 @@ let m = class extends H {
1898
1898
  "modal-container--dragging": this.isDragging,
1899
1899
  [`modal-container--${this.size}`]: !0
1900
1900
  };
1901
- return f`
1901
+ return y`
1902
1902
  <!-- Modal/Drawer -->
1903
1903
  <div
1904
1904
  class=${mt(e)}
@@ -1938,8 +1938,8 @@ let m = class extends H {
1938
1938
  renderContent() {
1939
1939
  if (!this.hasApiBaseUrl()) {
1940
1940
  const e = this.baseUrlErrorMessage;
1941
- return f`
1942
- ${this.logoUrl.length > 0 ? f`
1941
+ return y`
1942
+ ${this.logoUrl.length > 0 ? y`
1943
1943
  <header class="modal-header">
1944
1944
  <div class="auth-header">
1945
1945
  <img
@@ -1962,9 +1962,9 @@ let m = class extends H {
1962
1962
  </div>
1963
1963
  `;
1964
1964
  }
1965
- return this.isLoggedIn ? f`
1965
+ return this.isLoggedIn ? y`
1966
1966
  <!-- Header -->
1967
- ${this.logoUrl.length > 0 ? f`
1967
+ ${this.logoUrl.length > 0 ? y`
1968
1968
  <header class="modal-header">
1969
1969
  <div class="auth-header">
1970
1970
  <img
@@ -1987,9 +1987,9 @@ let m = class extends H {
1987
1987
  ${this.renderAlerts()}
1988
1988
  </div>
1989
1989
  </div>
1990
- ` : f`
1990
+ ` : y`
1991
1991
  <!-- Header -->
1992
- ${(!this.mode || this.resetStep === "none") && this.logoUrl.length > 0 && this.mode === "signin" ? f`
1992
+ ${(!this.mode || this.resetStep === "none") && this.logoUrl.length > 0 && this.mode === "signin" ? y`
1993
1993
  <header class="modal-header">
1994
1994
 
1995
1995
  <div class="auth-header">
@@ -2023,7 +2023,7 @@ let m = class extends H {
2023
2023
  }
2024
2024
  renderFormContent() {
2025
2025
  if (this.resetStep === "none" && (!this.mode || this.mode === "signin" || this.signupStep === "form"))
2026
- return f`
2026
+ return y`
2027
2027
  <!-- Email -->
2028
2028
  <label class="field">
2029
2029
  <span class="field-label">Email Address</span>
@@ -2037,7 +2037,7 @@ let m = class extends H {
2037
2037
  required
2038
2038
  autocomplete="email"
2039
2039
  />
2040
- ${this.errors.email ? f`<span class="field-error">${this.errors.email}</span>` : g}
2040
+ ${this.errors.email ? y`<span class="field-error">${this.errors.email}</span>` : g}
2041
2041
  </label>
2042
2042
 
2043
2043
  <!-- Password -->
@@ -2052,10 +2052,10 @@ let m = class extends H {
2052
2052
  required
2053
2053
  autocomplete=${this.mode === "signup" ? "new-password" : "current-password"}
2054
2054
  />
2055
- ${this.errors.password ? f`<span class="field-error">${this.errors.password}</span>` : g}
2055
+ ${this.errors.password ? y`<span class="field-error">${this.errors.password}</span>` : g}
2056
2056
  </label>
2057
2057
 
2058
- ${this.mode === "signin" && this.error ? f`
2058
+ ${this.mode === "signin" && this.error ? y`
2059
2059
  <div class="forgot-row">
2060
2060
  <button type="button" class="text-btn" @click=${this.startReset}>
2061
2061
  Forgot your password?
@@ -2063,7 +2063,7 @@ let m = class extends H {
2063
2063
  </div>
2064
2064
  ` : g}
2065
2065
 
2066
- ${this.mode === "signup" ? f`
2066
+ ${this.mode === "signup" ? y`
2067
2067
  <!-- Confirm Password -->
2068
2068
  <label class="field">
2069
2069
  <span class="field-label">Confirm Password</span>
@@ -2076,7 +2076,7 @@ let m = class extends H {
2076
2076
  required
2077
2077
  autocomplete="new-password"
2078
2078
  />
2079
- ${this.errors.confirm_password ? f`<span class="field-error">${this.errors.confirm_password}</span>` : g}
2079
+ ${this.errors.confirm_password ? y`<span class="field-error">${this.errors.confirm_password}</span>` : g}
2080
2080
  </label>
2081
2081
 
2082
2082
  <!-- First Name -->
@@ -2091,7 +2091,7 @@ let m = class extends H {
2091
2091
  required
2092
2092
  autocomplete="given-name"
2093
2093
  />
2094
- ${this.errors.givenName ? f`<span class="field-error">${this.errors.givenName}</span>` : g}
2094
+ ${this.errors.givenName ? y`<span class="field-error">${this.errors.givenName}</span>` : g}
2095
2095
  </label>
2096
2096
 
2097
2097
  <!-- Last Name -->
@@ -2106,19 +2106,19 @@ let m = class extends H {
2106
2106
  required
2107
2107
  autocomplete="family-name"
2108
2108
  />
2109
- ${this.errors.familyName ? f`<span class="field-error">${this.errors.familyName}</span>` : g}
2109
+ ${this.errors.familyName ? y`<span class="field-error">${this.errors.familyName}</span>` : g}
2110
2110
  </label>
2111
2111
  ` : g}
2112
2112
  `;
2113
2113
  if (this.mode === "signup" && this.signupStep === "otp")
2114
- return f`
2114
+ return y`
2115
2115
  <div class="otp-section">
2116
2116
  <label class="otp-label">Enter 6-digit code</label>
2117
2117
  <div class="otp-inputs" role="group" aria-label="One time code">
2118
- ${$t(
2118
+ ${wt(
2119
2119
  Array.from({ length: 6 }, (e, t) => t),
2120
2120
  (e) => e,
2121
- (e) => f`
2121
+ (e) => y`
2122
2122
  <input
2123
2123
  class="otp-input signup-otp-input ${this.errors.signup_otp ? "otp-input--error" : ""}"
2124
2124
  type="text"
@@ -2135,7 +2135,7 @@ let m = class extends H {
2135
2135
  `
2136
2136
  )}
2137
2137
  </div>
2138
- ${this.errors.signup_otp ? f`<p class="otp-error">${this.errors.signup_otp}</p>` : g}
2138
+ ${this.errors.signup_otp ? y`<p class="otp-error">${this.errors.signup_otp}</p>` : g}
2139
2139
  </div>
2140
2140
  <div class="forgot-row">
2141
2141
  <button type="button" class="text-btn" @click=${this.backToSignupForm}>
@@ -2144,7 +2144,7 @@ let m = class extends H {
2144
2144
  </div>
2145
2145
  `;
2146
2146
  if (this.resetStep === "request")
2147
- return f`
2147
+ return y`
2148
2148
  <label class="field">
2149
2149
  <span class="field-label">Email Address</span>
2150
2150
  <input
@@ -2157,7 +2157,7 @@ let m = class extends H {
2157
2157
  required
2158
2158
  autocomplete="email"
2159
2159
  />
2160
- ${this.errors.email ? f`<span class="field-error">${this.errors.email}</span>` : g}
2160
+ ${this.errors.email ? y`<span class="field-error">${this.errors.email}</span>` : g}
2161
2161
  </label>
2162
2162
  <div class="forgot-row">
2163
2163
  <button type="button" class="text-btn" @click=${this.cancelReset}>
@@ -2167,7 +2167,7 @@ let m = class extends H {
2167
2167
  `;
2168
2168
  if (this.resetStep === "confirm") {
2169
2169
  const e = this.otpDigits.every((t) => /^\d$/.test(t));
2170
- return f`
2170
+ return y`
2171
2171
  <label class="field">
2172
2172
  <span class="field-label">Email Address</span>
2173
2173
  <input
@@ -2179,16 +2179,16 @@ let m = class extends H {
2179
2179
  required
2180
2180
  autocomplete="email"
2181
2181
  />
2182
- ${this.errors.email ? f`<span class="field-error">${this.errors.email}</span>` : g}
2182
+ ${this.errors.email ? y`<span class="field-error">${this.errors.email}</span>` : g}
2183
2183
  </label>
2184
2184
 
2185
2185
  <div class="otp-section">
2186
2186
  <label class="otp-label">Enter 6-digit code</label>
2187
2187
  <div class="otp-inputs" role="group" aria-label="One time code">
2188
- ${$t(
2188
+ ${wt(
2189
2189
  Array.from({ length: 6 }, (t, s) => s),
2190
2190
  (t) => t,
2191
- (t) => f`
2191
+ (t) => y`
2192
2192
  <input
2193
2193
  class="otp-input reset-otp-input ${this.errors.otp ? "otp-input--error" : ""}"
2194
2194
  type="text"
@@ -2205,10 +2205,10 @@ let m = class extends H {
2205
2205
  `
2206
2206
  )}
2207
2207
  </div>
2208
- ${this.errors.otp ? f`<p class="otp-error">${this.errors.otp}</p>` : g}
2208
+ ${this.errors.otp ? y`<p class="otp-error">${this.errors.otp}</p>` : g}
2209
2209
  </div>
2210
2210
 
2211
- ${e ? f`
2211
+ ${e ? y`
2212
2212
  <div class="new-password-fields">
2213
2213
  <label class="field">
2214
2214
  <span class="field-label">New Password</span>
@@ -2221,7 +2221,7 @@ let m = class extends H {
2221
2221
  required
2222
2222
  autocomplete="new-password"
2223
2223
  />
2224
- ${this.errors.new_password ? f`<span class="field-error">${this.errors.new_password}</span>` : g}
2224
+ ${this.errors.new_password ? y`<span class="field-error">${this.errors.new_password}</span>` : g}
2225
2225
  </label>
2226
2226
 
2227
2227
  <label class="field">
@@ -2235,7 +2235,7 @@ let m = class extends H {
2235
2235
  required
2236
2236
  autocomplete="new-password"
2237
2237
  />
2238
- ${this.errors.confirm_password ? f`<span class="field-error">${this.errors.confirm_password}</span>` : g}
2238
+ ${this.errors.confirm_password ? y`<span class="field-error">${this.errors.confirm_password}</span>` : g}
2239
2239
  </label>
2240
2240
  </div>
2241
2241
  ` : g}
@@ -2251,31 +2251,31 @@ let m = class extends H {
2251
2251
  }
2252
2252
  renderActions() {
2253
2253
  if (this.resetStep === "request")
2254
- return f`
2254
+ return y`
2255
2255
  <button type="submit" class="cta" ?disabled=${this.isLoading}>
2256
2256
  ${this.isLoading ? "Sending..." : "Send Reset Code"}
2257
2257
  </button>
2258
2258
  `;
2259
2259
  if (this.resetStep === "confirm")
2260
- return this.otpDigits.every((t) => /^\d$/.test(t)) ? f`
2260
+ return this.otpDigits.every((t) => /^\d$/.test(t)) ? y`
2261
2261
  <button type="submit" class="cta" ?disabled=${this.isLoading}>
2262
2262
  ${this.isLoading ? "Resetting..." : "Reset Password"}
2263
2263
  </button>
2264
2264
  ` : g;
2265
2265
  if (this.mode === "signup" && this.signupStep === "otp") {
2266
2266
  const e = this.signupOtpDigits.every((t) => /^\d$/.test(t));
2267
- return f`
2267
+ return y`
2268
2268
  <button type="submit" class="cta" ?disabled=${!e || this.isLoading}>
2269
2269
  ${this.isLoading ? "Completing..." : "Complete Registration"}
2270
2270
  </button>
2271
2271
  `;
2272
2272
  }
2273
- return f`
2273
+ return y`
2274
2274
  <button type="submit" class="cta" ?disabled=${this.isLoading}>
2275
2275
  ${this.isLoading ? "Loading..." : this.mode === "signup" ? "Continue" : "Sign In"}
2276
2276
  </button>
2277
2277
 
2278
- ${this.isOAuthConfigured() && this.mode === "signin" ? f`
2278
+ ${this.isOAuthConfigured() && this.mode === "signin" ? y`
2279
2279
  <div class="button-row">
2280
2280
  <button
2281
2281
  type="button"
@@ -2299,8 +2299,8 @@ let m = class extends H {
2299
2299
  `;
2300
2300
  }
2301
2301
  renderAlerts() {
2302
- return f`
2303
- ${this.notice ? f`
2302
+ return y`
2303
+ ${this.notice ? y`
2304
2304
  <div class="alert alert--success">
2305
2305
  ${this.notice}
2306
2306
  <button class="alert-close" @click=${() => this.notice = ""} aria-label="Dismiss">
@@ -2308,7 +2308,7 @@ let m = class extends H {
2308
2308
  </button>
2309
2309
  </div>
2310
2310
  ` : g}
2311
- ${this.error ? f`
2311
+ ${this.error ? y`
2312
2312
  <div class="alert alert--error">
2313
2313
  ${this.error}
2314
2314
  <button class="alert-close" @click=${() => this.error = ""} aria-label="Dismiss">
@@ -2319,7 +2319,7 @@ let m = class extends H {
2319
2319
  `;
2320
2320
  }
2321
2321
  renderFooter() {
2322
- return this.isLoggedIn ? g : this.resetStep === "none" && (!this.mode || this.mode === "signin" || this.signupStep === "form") ? f`
2322
+ return this.isLoggedIn ? g : this.resetStep === "none" && (!this.mode || this.mode === "signin" || this.signupStep === "form") ? this.disableSignup ? g : y`
2323
2323
  <div class="auth-footer">
2324
2324
  <p class="toggle-text">
2325
2325
  ${this.mode === "signup" ? "Already have an account?" : "Don't have an account?"}
@@ -2328,7 +2328,7 @@ let m = class extends H {
2328
2328
  ${this.mode === "signup" ? "Sign In" : "Sign Up"}
2329
2329
  </button>
2330
2330
  </div>
2331
- ` : f`
2331
+ ` : y`
2332
2332
  <div class="auth-footer">
2333
2333
  <p class="toggle-text">
2334
2334
  Having trouble? Email
@@ -2338,7 +2338,7 @@ let m = class extends H {
2338
2338
  `;
2339
2339
  }
2340
2340
  renderGoogleIcon() {
2341
- return f`
2341
+ return y`
2342
2342
  <svg viewBox="-0.5 0 48 48" width="18" height="18" fill="none">
2343
2343
  <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>
2344
2344
  <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>
@@ -2348,7 +2348,7 @@ let m = class extends H {
2348
2348
  `;
2349
2349
  }
2350
2350
  renderAppleIcon() {
2351
- return f`
2351
+ return y`
2352
2352
  <svg viewBox="-3.5 0 48 48" width="18" height="18" class="apple-icon">
2353
2353
  <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>
2354
2354
  </svg>
@@ -2388,122 +2388,125 @@ let m = class extends H {
2388
2388
  }
2389
2389
  };
2390
2390
  m.styles = de();
2391
- y([
2391
+ f([
2392
2392
  S({ type: Boolean, reflect: !0 })
2393
2393
  ], m.prototype, "open", 2);
2394
- y([
2394
+ f([
2395
2395
  S({ type: String, attribute: "initial-mode" })
2396
2396
  ], m.prototype, "initialMode", 2);
2397
- y([
2397
+ f([
2398
2398
  S({ type: String, attribute: "logo-url" })
2399
2399
  ], m.prototype, "logoUrl", 2);
2400
- y([
2400
+ f([
2401
2401
  S({ type: String, attribute: "api-domain" })
2402
2402
  ], m.prototype, "baseUrl", 2);
2403
- y([
2403
+ f([
2404
2404
  S({ type: String, attribute: "oauth-domain" })
2405
2405
  ], m.prototype, "oauthDomain", 2);
2406
- y([
2406
+ f([
2407
2407
  S({ type: String, attribute: "oauth-region" })
2408
2408
  ], m.prototype, "oauthRegion", 2);
2409
- y([
2409
+ f([
2410
2410
  S({ type: String, attribute: "oauth-user-pool-id" })
2411
2411
  ], m.prototype, "oauthUserPoolId", 2);
2412
- y([
2412
+ f([
2413
2413
  S({ type: String, attribute: "oauth-client-id" })
2414
2414
  ], m.prototype, "oauthClientId", 2);
2415
- y([
2415
+ f([
2416
2416
  S({ type: String, attribute: "oauth-redirect-uri" })
2417
2417
  ], m.prototype, "oauthRedirectUri", 2);
2418
- y([
2418
+ f([
2419
2419
  S({ type: String, attribute: "oauth-spa-domain" })
2420
2420
  ], m.prototype, "oauthSpaDomain", 2);
2421
- y([
2421
+ f([
2422
2422
  S({ type: String, attribute: "size" })
2423
2423
  ], m.prototype, "size", 2);
2424
- y([
2424
+ f([
2425
2425
  S({ type: String, attribute: "data-theme", reflect: !0 })
2426
2426
  ], m.prototype, "theme", 2);
2427
- y([
2427
+ f([
2428
+ S({ type: Boolean, attribute: "disable-signup" })
2429
+ ], m.prototype, "disableSignup", 2);
2430
+ f([
2428
2431
  b()
2429
2432
  ], m.prototype, "mode", 2);
2430
- y([
2433
+ f([
2431
2434
  b()
2432
2435
  ], m.prototype, "resetStep", 2);
2433
- y([
2436
+ f([
2434
2437
  b()
2435
2438
  ], m.prototype, "signupStep", 2);
2436
- y([
2439
+ f([
2437
2440
  b()
2438
2441
  ], m.prototype, "isLoading", 2);
2439
- y([
2442
+ f([
2440
2443
  b()
2441
2444
  ], m.prototype, "isClosing", 2);
2442
- y([
2445
+ f([
2443
2446
  b()
2444
2447
  ], m.prototype, "isVisible", 2);
2445
- y([
2448
+ f([
2446
2449
  b()
2447
2450
  ], m.prototype, "isLoggedIn", 2);
2448
- y([
2451
+ f([
2449
2452
  b()
2450
2453
  ], m.prototype, "email", 2);
2451
- y([
2454
+ f([
2452
2455
  b()
2453
2456
  ], m.prototype, "password", 2);
2454
- y([
2457
+ f([
2455
2458
  b()
2456
2459
  ], m.prototype, "givenName", 2);
2457
- y([
2460
+ f([
2458
2461
  b()
2459
2462
  ], m.prototype, "familyName", 2);
2460
- y([
2463
+ f([
2461
2464
  b()
2462
2465
  ], m.prototype, "newPassword", 2);
2463
- y([
2466
+ f([
2464
2467
  b()
2465
2468
  ], m.prototype, "confirmPassword", 2);
2466
- y([
2469
+ f([
2467
2470
  b()
2468
2471
  ], m.prototype, "notice", 2);
2469
- y([
2472
+ f([
2470
2473
  b()
2471
2474
  ], m.prototype, "error", 2);
2472
- y([
2475
+ f([
2473
2476
  b()
2474
2477
  ], m.prototype, "errors", 2);
2475
- y([
2478
+ f([
2476
2479
  b()
2477
2480
  ], m.prototype, "otpDigits", 2);
2478
- y([
2481
+ f([
2479
2482
  b()
2480
2483
  ], m.prototype, "signupOtpDigits", 2);
2481
- y([
2484
+ f([
2482
2485
  b()
2483
2486
  ], m.prototype, "isDragging", 2);
2484
- y([
2487
+ f([
2485
2488
  b()
2486
2489
  ], m.prototype, "dragStartY", 2);
2487
- y([
2490
+ f([
2488
2491
  b()
2489
2492
  ], m.prototype, "dragCurrentY", 2);
2490
- y([
2493
+ f([
2491
2494
  b()
2492
2495
  ], m.prototype, "dragStartTime", 2);
2493
- y([
2496
+ f([
2494
2497
  b()
2495
2498
  ], m.prototype, "lastDragEndTime", 2);
2496
- y([
2499
+ f([
2497
2500
  it(".modal-container")
2498
2501
  ], m.prototype, "modalContainer", 2);
2499
- y([
2502
+ f([
2500
2503
  it("#email-input")
2501
2504
  ], m.prototype, "emailInput", 2);
2502
- y([
2505
+ f([
2503
2506
  it(".modal-body")
2504
2507
  ], m.prototype, "modalBody", 2);
2505
- m = y([
2506
- Zt("auth")
2508
+ m = f([
2509
+ Zt("auth-drawer")
2507
2510
  ], m);
2508
2511
  export {
2509
2512
  m as Auth