@cal.macconnachie/web-components 0.0.12 → 0.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -248,8 +248,8 @@ let Q = class extends HTMLElement {
248
248
  };
249
249
  Q.elementStyles = [], Q.shadowRootOptions = { mode: "open" }, Q[de("elementProperties")] = /* @__PURE__ */ new Map(), Q[de("finalized")] = /* @__PURE__ */ new Map(), Ns?.({ ReactiveElement: Q }), (xe.reactiveElementVersions ??= []).push("2.1.1");
250
250
  const Xe = globalThis, Ce = Xe.trustedTypes, yt = Ce ? Ce.createPolicy("lit-html", { createHTML: (t) => t }) : void 0, Vt = "$lit$", H = `lit$${Math.random().toFixed(9).slice(2)}$`, Wt = "?" + H, Ls = `<${Wt}>`, G = document, ue = () => G.createComment(""), pe = (t) => t === null || typeof t != "object" && typeof t != "function", Qe = Array.isArray, Is = (t) => Qe(t) || typeof t?.[Symbol.iterator] == "function", je = `[
251
- \f\r]`, le = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, wt = /-->/g, bt = />/g, K = RegExp(`>|${je}(?:([^\\s"'>=/]+)(${je}*=${je}*(?:[^
252
- \f\r"'\`<>=]|("|')|))|$)`, "g"), St = /'/g, $t = /"/g, Yt = /^(?:script|style|textarea|title)$/i, Bs = (t) => (e, ...s) => ({ _$litType$: t, strings: e, values: s }), S = Bs(1), M = Symbol.for("lit-noChange"), b = Symbol.for("lit-nothing"), At = /* @__PURE__ */ new WeakMap(), W = G.createTreeWalker(G, 129);
251
+ \f\r]`, le = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, bt = /-->/g, wt = />/g, K = RegExp(`>|${je}(?:([^\\s"'>=/]+)(${je}*=${je}*(?:[^
252
+ \f\r"'\`<>=]|("|')|))|$)`, "g"), St = /'/g, $t = /"/g, Yt = /^(?:script|style|textarea|title)$/i, Bs = (t) => (e, ...s) => ({ _$litType$: t, strings: e, values: s }), S = Bs(1), M = Symbol.for("lit-noChange"), w = Symbol.for("lit-nothing"), At = /* @__PURE__ */ new WeakMap(), W = G.createTreeWalker(G, 129);
253
253
  function Jt(t, e) {
254
254
  if (!Qe(t) || !t.hasOwnProperty("raw")) throw Error("invalid template strings array");
255
255
  return yt !== void 0 ? yt.createHTML(e) : e;
@@ -260,7 +260,7 @@ const js = (t, e) => {
260
260
  for (let a = 0; a < s; a++) {
261
261
  const l = t[a];
262
262
  let h, c, u = -1, f = 0;
263
- for (; f < l.length && (n.lastIndex = f, c = n.exec(l), c !== null); ) f = n.lastIndex, n === le ? c[1] === "!--" ? n = wt : c[1] !== void 0 ? n = bt : c[2] !== void 0 ? (Yt.test(c[2]) && (i = RegExp("</" + c[2], "g")), n = K) : c[3] !== void 0 && (n = K) : n === K ? c[0] === ">" ? (n = i ?? le, u = -1) : c[1] === void 0 ? u = -2 : (u = n.lastIndex - c[2].length, h = c[1], n = c[3] === void 0 ? K : c[3] === '"' ? $t : St) : n === $t || n === St ? n = K : n === wt || n === bt ? n = le : (n = K, i = void 0);
263
+ for (; f < l.length && (n.lastIndex = f, c = n.exec(l), c !== null); ) f = n.lastIndex, n === le ? c[1] === "!--" ? n = bt : c[1] !== void 0 ? n = wt : c[2] !== void 0 ? (Yt.test(c[2]) && (i = RegExp("</" + c[2], "g")), n = K) : c[3] !== void 0 && (n = K) : n === K ? c[0] === ">" ? (n = i ?? le, u = -1) : c[1] === void 0 ? u = -2 : (u = n.lastIndex - c[2].length, h = c[1], n = c[3] === void 0 ? K : c[3] === '"' ? $t : St) : n === $t || n === St ? n = K : n === bt || n === wt ? n = le : (n = K, i = void 0);
264
264
  const y = n === K && t[a + 1].startsWith("/>") ? " " : "";
265
265
  o += n === le ? l + Ls : u >= 0 ? (r.push(h), l.slice(0, u) + Vt + l.slice(u) + H + y) : l + H + (u === -2 ? a : y);
266
266
  }
@@ -342,7 +342,7 @@ class re {
342
342
  return this._$AM?._$AU ?? this._$Cv;
343
343
  }
344
344
  constructor(e, s, r, i) {
345
- this.type = 2, this._$AH = b, this._$AN = void 0, this._$AA = e, this._$AB = s, this._$AM = r, this.options = i, this._$Cv = i?.isConnected ?? !0;
345
+ this.type = 2, this._$AH = w, this._$AN = void 0, this._$AA = e, this._$AB = s, this._$AM = r, this.options = i, this._$Cv = i?.isConnected ?? !0;
346
346
  }
347
347
  get parentNode() {
348
348
  let e = this._$AA.parentNode;
@@ -356,7 +356,7 @@ class re {
356
356
  return this._$AB;
357
357
  }
358
358
  _$AI(e, s = this) {
359
- e = te(this, e, s), pe(e) ? e === b || e == null || e === "" ? (this._$AH !== b && this._$AR(), this._$AH = b) : e !== this._$AH && e !== M && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Is(e) ? this.k(e) : this._(e);
359
+ e = te(this, e, s), pe(e) ? e === w || e == null || e === "" ? (this._$AH !== w && this._$AR(), this._$AH = w) : e !== this._$AH && e !== M && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : Is(e) ? this.k(e) : this._(e);
360
360
  }
361
361
  O(e) {
362
362
  return this._$AA.parentNode.insertBefore(e, this._$AB);
@@ -365,7 +365,7 @@ class re {
365
365
  this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
366
366
  }
367
367
  _(e) {
368
- this._$AH !== b && pe(this._$AH) ? this._$AA.nextSibling.data = e : this.T(G.createTextNode(e)), this._$AH = e;
368
+ this._$AH !== w && pe(this._$AH) ? this._$AA.nextSibling.data = e : this.T(G.createTextNode(e)), this._$AH = e;
369
369
  }
370
370
  $(e) {
371
371
  const { values: s, _$litType$: r } = e, i = typeof r == "number" ? this._$AC(e) : (r.el === void 0 && (r.el = fe.createElement(Jt(r.h, r.h[0]), this.options)), r);
@@ -404,7 +404,7 @@ class Re {
404
404
  return this._$AM._$AU;
405
405
  }
406
406
  constructor(e, s, r, i, o) {
407
- this.type = 1, this._$AH = b, this._$AN = void 0, this.element = e, this.name = s, this._$AM = i, this.options = o, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = b;
407
+ this.type = 1, this._$AH = w, this._$AN = void 0, this.element = e, this.name = s, this._$AM = i, this.options = o, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = w;
408
408
  }
409
409
  _$AI(e, s = this, r, i) {
410
410
  const o = this.strings;
@@ -413,12 +413,12 @@ class Re {
413
413
  else {
414
414
  const a = e;
415
415
  let l, h;
416
- for (e = o[0], l = 0; l < o.length - 1; l++) h = te(this, a[r + l], s, l), h === M && (h = this._$AH[l]), n ||= !pe(h) || h !== this._$AH[l], h === b ? e = b : e !== b && (e += (h ?? "") + o[l + 1]), this._$AH[l] = h;
416
+ for (e = o[0], l = 0; l < o.length - 1; l++) h = te(this, a[r + l], s, l), h === M && (h = this._$AH[l]), n ||= !pe(h) || h !== this._$AH[l], h === w ? e = w : e !== w && (e += (h ?? "") + o[l + 1]), this._$AH[l] = h;
417
417
  }
418
418
  n && !i && this.j(e);
419
419
  }
420
420
  j(e) {
421
- e === b ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
421
+ e === w ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
422
422
  }
423
423
  }
424
424
  class Ms extends Re {
@@ -426,7 +426,7 @@ class Ms extends Re {
426
426
  super(...arguments), this.type = 3;
427
427
  }
428
428
  j(e) {
429
- this.element[this.name] = e === b ? void 0 : e;
429
+ this.element[this.name] = e === w ? void 0 : e;
430
430
  }
431
431
  }
432
432
  class Fs extends Re {
@@ -434,7 +434,7 @@ class Fs extends Re {
434
434
  super(...arguments), this.type = 4;
435
435
  }
436
436
  j(e) {
437
- this.element.toggleAttribute(this.name, !!e && e !== b);
437
+ this.element.toggleAttribute(this.name, !!e && e !== w);
438
438
  }
439
439
  }
440
440
  class qs extends Re {
@@ -442,8 +442,8 @@ class qs extends Re {
442
442
  super(e, s, r, i, o), this.type = 5;
443
443
  }
444
444
  _$AI(e, s = this) {
445
- if ((e = te(this, e, s, 0) ?? b) === M) return;
446
- const r = this._$AH, i = e === b && r !== b || e.capture !== r.capture || e.once !== r.once || e.passive !== r.passive, o = e !== b && (r === b || i);
445
+ if ((e = te(this, e, s, 0) ?? w) === M) return;
446
+ const r = this._$AH, i = e === w && r !== w || e.capture !== r.capture || e.once !== r.once || e.passive !== r.passive, o = e !== w && (r === w || i);
447
447
  i && this.element.removeEventListener(this.name, this, r), o && this.element.addEventListener(this.name, this, e), this._$AH = e;
448
448
  }
449
449
  handleEvent(e) {
@@ -638,8 +638,8 @@ const _t = (t, e, s) => {
638
638
  else if (h === void 0 && (h = _t(n, y, p), c = _t(a, u, f)), h.has(a[u])) if (h.has(a[f])) {
639
639
  const g = c.get(n[y]), m = g !== void 0 ? i[g] : null;
640
640
  if (m === null) {
641
- const w = ce(t, i[u]);
642
- V(w, o[y]), l[y] = w;
641
+ const b = ce(t, i[u]);
642
+ V(b, o[y]), l[y] = b;
643
643
  } else l[y] = V(m, o[y]), ce(t, i[u], m), i[g] = null;
644
644
  y++;
645
645
  } else He(i[f]), f--;
@@ -882,20 +882,20 @@ const _t = (t, e, s) => {
882
882
  domain: t,
883
883
  clientId: r,
884
884
  redirectUri: ir(i)
885
- }, n = (w) => {
886
- const _ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~", E = new Uint8Array(w);
885
+ }, n = (b) => {
886
+ const _ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~", E = new Uint8Array(b);
887
887
  return crypto.getRandomValues(E), Array.from(E).map((k) => _[k % _.length]).join("");
888
- }, a = async (w) => {
889
- const E = new TextEncoder().encode(w), k = await crypto.subtle.digest("SHA-256", E);
888
+ }, a = async (b) => {
889
+ const E = new TextEncoder().encode(b), k = await crypto.subtle.digest("SHA-256", E);
890
890
  return btoa(String.fromCharCode(...new Uint8Array(k))).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
891
891
  }, l = async () => {
892
- const w = n(128), _ = await a(w);
893
- return sessionStorage.setItem("pkce_code_verifier", w), { codeVerifier: w, codeChallenge: _ };
892
+ const b = n(128), _ = await a(b);
893
+ return sessionStorage.setItem("pkce_code_verifier", b), { codeVerifier: b, codeChallenge: _ };
894
894
  }, h = () => {
895
- const w = n(32);
896
- return sessionStorage.setItem("oauth_state", w), w;
895
+ const b = n(32);
896
+ return sessionStorage.setItem("oauth_state", b), b;
897
897
  }, c = async () => {
898
- const { codeChallenge: w } = await l(), _ = h(), E = new URLSearchParams({
898
+ const { codeChallenge: b } = await l(), _ = h(), E = new URLSearchParams({
899
899
  response_type: "code",
900
900
  client_id: o.clientId,
901
901
  redirect_uri: o.redirectUri,
@@ -903,15 +903,15 @@ const _t = (t, e, s) => {
903
903
  scope: "openid email profile",
904
904
  state: _,
905
905
  code_challenge_method: "S256",
906
- code_challenge: w,
906
+ code_challenge: b,
907
907
  prompt: "select_account"
908
908
  });
909
909
  return `${o.domain}/oauth2/authorize?${E.toString()}`;
910
910
  }, u = async () => {
911
- const w = await c();
912
- window.location.href = w;
911
+ const b = await c();
912
+ window.location.href = b;
913
913
  }, f = async () => {
914
- const { codeChallenge: w } = await l(), _ = h(), E = new URLSearchParams({
914
+ const { codeChallenge: b } = await l(), _ = h(), E = new URLSearchParams({
915
915
  response_type: "code",
916
916
  client_id: o.clientId,
917
917
  redirect_uri: o.redirectUri,
@@ -919,32 +919,32 @@ const _t = (t, e, s) => {
919
919
  scope: "openid email profile",
920
920
  state: _,
921
921
  code_challenge_method: "S256",
922
- code_challenge: w
922
+ code_challenge: b
923
923
  });
924
924
  return `${o.domain}/oauth2/authorize?${E.toString()}`;
925
925
  }, y = async () => {
926
- const w = await f();
927
- window.location.href = w;
928
- }, p = (w) => {
926
+ const b = await f();
927
+ window.location.href = b;
928
+ }, p = (b) => {
929
929
  const _ = sessionStorage.getItem("oauth_state");
930
- return sessionStorage.removeItem("oauth_state"), _ === w;
930
+ return sessionStorage.removeItem("oauth_state"), _ === b;
931
931
  }, g = () => {
932
- const w = sessionStorage.getItem("pkce_code_verifier");
933
- return sessionStorage.removeItem("pkce_code_verifier"), w;
932
+ const b = sessionStorage.getItem("pkce_code_verifier");
933
+ return sessionStorage.removeItem("pkce_code_verifier"), b;
934
934
  };
935
935
  return {
936
936
  redirectToGoogleAuth: u,
937
937
  redirectToAppleAuth: y,
938
938
  validateState: p,
939
939
  getCodeVerifier: g,
940
- exchangeCodeForTokens: async (w) => {
940
+ exchangeCodeForTokens: async (b) => {
941
941
  const _ = g();
942
942
  if (!_)
943
943
  throw new Error("PKCE code verifier not found. Please restart the authentication flow.");
944
944
  const E = new URLSearchParams({
945
945
  grant_type: "authorization_code",
946
946
  client_id: o.clientId,
947
- code: w,
947
+ code: b,
948
948
  redirect_uri: o.redirectUri,
949
949
  code_verifier: _
950
950
  }), k = await fetch(`${o.domain}/oauth2/token`, {
@@ -1784,6 +1784,9 @@ let A = class extends ee {
1784
1784
  otp: t.otp
1785
1785
  }), await this.handleSignIn();
1786
1786
  }
1787
+ isUserLoggedIn() {
1788
+ return this.isLoggedIn;
1789
+ }
1787
1790
  async logout() {
1788
1791
  const t = this.cookies.getAuthToken("ACCESS_TOKEN"), e = this.cookies.getAuthToken("AUTH_TOKEN"), s = this.cookies.getAuthToken("REFRESH_TOKEN");
1789
1792
  if (t == null || s == null || e == null) {
@@ -1887,7 +1890,7 @@ let A = class extends ee {
1887
1890
  }
1888
1891
  render() {
1889
1892
  if (!this.isVisible)
1890
- return b;
1893
+ return w;
1891
1894
  const t = {
1892
1895
  "modal-overlay": !0,
1893
1896
  "modal-overlay--closing": this.isClosing
@@ -1951,7 +1954,7 @@ let A = class extends ee {
1951
1954
  />
1952
1955
  </div>
1953
1956
  </header>
1954
- ` : b}
1957
+ ` : w}
1955
1958
 
1956
1959
  <div class="modal-body">
1957
1960
  <div class="auth-form">
@@ -1976,7 +1979,7 @@ let A = class extends ee {
1976
1979
  />
1977
1980
  </div>
1978
1981
  </header>
1979
- ` : b}
1982
+ ` : w}
1980
1983
 
1981
1984
  <!-- Body -->
1982
1985
  <div class="modal-body">
@@ -2002,7 +2005,7 @@ let A = class extends ee {
2002
2005
  />
2003
2006
  </div>
2004
2007
  </header>
2005
- ` : b}
2008
+ ` : w}
2006
2009
 
2007
2010
  <!-- Body -->
2008
2011
  <div class="modal-body">
@@ -2037,7 +2040,7 @@ let A = class extends ee {
2037
2040
  required
2038
2041
  autocomplete="email"
2039
2042
  />
2040
- ${this.errors.email ? S`<span class="field-error">${this.errors.email}</span>` : b}
2043
+ ${this.errors.email ? S`<span class="field-error">${this.errors.email}</span>` : w}
2041
2044
  </label>
2042
2045
 
2043
2046
  <!-- Password -->
@@ -2052,7 +2055,7 @@ let A = class extends ee {
2052
2055
  required
2053
2056
  autocomplete=${this.mode === "signup" ? "new-password" : "current-password"}
2054
2057
  />
2055
- ${this.errors.password ? S`<span class="field-error">${this.errors.password}</span>` : b}
2058
+ ${this.errors.password ? S`<span class="field-error">${this.errors.password}</span>` : w}
2056
2059
  </label>
2057
2060
 
2058
2061
  ${this.mode === "signin" && this.error ? S`
@@ -2061,7 +2064,7 @@ let A = class extends ee {
2061
2064
  Forgot your password?
2062
2065
  </button>
2063
2066
  </div>
2064
- ` : b}
2067
+ ` : w}
2065
2068
 
2066
2069
  ${this.mode === "signup" ? S`
2067
2070
  <!-- Confirm Password -->
@@ -2076,7 +2079,7 @@ let A = class extends ee {
2076
2079
  required
2077
2080
  autocomplete="new-password"
2078
2081
  />
2079
- ${this.errors.confirm_password ? S`<span class="field-error">${this.errors.confirm_password}</span>` : b}
2082
+ ${this.errors.confirm_password ? S`<span class="field-error">${this.errors.confirm_password}</span>` : w}
2080
2083
  </label>
2081
2084
 
2082
2085
  <!-- First Name -->
@@ -2091,7 +2094,7 @@ let A = class extends ee {
2091
2094
  required
2092
2095
  autocomplete="given-name"
2093
2096
  />
2094
- ${this.errors.givenName ? S`<span class="field-error">${this.errors.givenName}</span>` : b}
2097
+ ${this.errors.givenName ? S`<span class="field-error">${this.errors.givenName}</span>` : w}
2095
2098
  </label>
2096
2099
 
2097
2100
  <!-- Last Name -->
@@ -2106,9 +2109,9 @@ let A = class extends ee {
2106
2109
  required
2107
2110
  autocomplete="family-name"
2108
2111
  />
2109
- ${this.errors.familyName ? S`<span class="field-error">${this.errors.familyName}</span>` : b}
2112
+ ${this.errors.familyName ? S`<span class="field-error">${this.errors.familyName}</span>` : w}
2110
2113
  </label>
2111
- ` : b}
2114
+ ` : w}
2112
2115
  `;
2113
2116
  if (this.mode === "signup" && this.signupStep === "otp")
2114
2117
  return S`
@@ -2135,7 +2138,7 @@ let A = class extends ee {
2135
2138
  `
2136
2139
  )}
2137
2140
  </div>
2138
- ${this.errors.signup_otp ? S`<p class="otp-error">${this.errors.signup_otp}</p>` : b}
2141
+ ${this.errors.signup_otp ? S`<p class="otp-error">${this.errors.signup_otp}</p>` : w}
2139
2142
  </div>
2140
2143
  <div class="forgot-row">
2141
2144
  <button type="button" class="text-btn" @click=${this.backToSignupForm}>
@@ -2157,7 +2160,7 @@ let A = class extends ee {
2157
2160
  required
2158
2161
  autocomplete="email"
2159
2162
  />
2160
- ${this.errors.email ? S`<span class="field-error">${this.errors.email}</span>` : b}
2163
+ ${this.errors.email ? S`<span class="field-error">${this.errors.email}</span>` : w}
2161
2164
  </label>
2162
2165
  <div class="forgot-row">
2163
2166
  <button type="button" class="text-btn" @click=${this.cancelReset}>
@@ -2179,7 +2182,7 @@ let A = class extends ee {
2179
2182
  required
2180
2183
  autocomplete="email"
2181
2184
  />
2182
- ${this.errors.email ? S`<span class="field-error">${this.errors.email}</span>` : b}
2185
+ ${this.errors.email ? S`<span class="field-error">${this.errors.email}</span>` : w}
2183
2186
  </label>
2184
2187
 
2185
2188
  <div class="otp-section">
@@ -2205,7 +2208,7 @@ let A = class extends ee {
2205
2208
  `
2206
2209
  )}
2207
2210
  </div>
2208
- ${this.errors.otp ? S`<p class="otp-error">${this.errors.otp}</p>` : b}
2211
+ ${this.errors.otp ? S`<p class="otp-error">${this.errors.otp}</p>` : w}
2209
2212
  </div>
2210
2213
 
2211
2214
  ${t ? S`
@@ -2221,7 +2224,7 @@ let A = class extends ee {
2221
2224
  required
2222
2225
  autocomplete="new-password"
2223
2226
  />
2224
- ${this.errors.new_password ? S`<span class="field-error">${this.errors.new_password}</span>` : b}
2227
+ ${this.errors.new_password ? S`<span class="field-error">${this.errors.new_password}</span>` : w}
2225
2228
  </label>
2226
2229
 
2227
2230
  <label class="field">
@@ -2235,10 +2238,10 @@ let A = class extends ee {
2235
2238
  required
2236
2239
  autocomplete="new-password"
2237
2240
  />
2238
- ${this.errors.confirm_password ? S`<span class="field-error">${this.errors.confirm_password}</span>` : b}
2241
+ ${this.errors.confirm_password ? S`<span class="field-error">${this.errors.confirm_password}</span>` : w}
2239
2242
  </label>
2240
2243
  </div>
2241
- ` : b}
2244
+ ` : w}
2242
2245
 
2243
2246
  <div class="forgot-row">
2244
2247
  <button type="button" class="text-btn" @click=${this.backToRequest}>
@@ -2247,7 +2250,7 @@ let A = class extends ee {
2247
2250
  </div>
2248
2251
  `;
2249
2252
  }
2250
- return b;
2253
+ return w;
2251
2254
  }
2252
2255
  renderActions() {
2253
2256
  if (this.resetStep === "request")
@@ -2261,7 +2264,7 @@ let A = class extends ee {
2261
2264
  <button type="submit" class="cta" ?disabled=${this.isLoading}>
2262
2265
  ${this.isLoading ? "Resetting..." : "Reset Password"}
2263
2266
  </button>
2264
- ` : b;
2267
+ ` : w;
2265
2268
  if (this.mode === "signup" && this.signupStep === "otp") {
2266
2269
  const t = this.signupOtpDigits.every((e) => /^\d$/.test(e));
2267
2270
  return S`
@@ -2295,7 +2298,7 @@ let A = class extends ee {
2295
2298
  ${this.renderAppleIcon()}
2296
2299
  </button>
2297
2300
  </div>
2298
- ` : b}
2301
+ ` : w}
2299
2302
  `;
2300
2303
  }
2301
2304
  renderAlerts() {
@@ -2307,7 +2310,7 @@ let A = class extends ee {
2307
2310
  ×
2308
2311
  </button>
2309
2312
  </div>
2310
- ` : b}
2313
+ ` : w}
2311
2314
  ${this.error ? S`
2312
2315
  <div class="alert alert--error">
2313
2316
  ${this.error}
@@ -2315,11 +2318,11 @@ let A = class extends ee {
2315
2318
  ×
2316
2319
  </button>
2317
2320
  </div>
2318
- ` : b}
2321
+ ` : w}
2319
2322
  `;
2320
2323
  }
2321
2324
  renderFooter() {
2322
- return this.isLoggedIn ? b : this.resetStep === "none" && (!this.mode || this.mode === "signin" || this.signupStep === "form") ? this.disableSignup ? b : S`
2325
+ return this.isLoggedIn ? w : this.resetStep === "none" && (!this.mode || this.mode === "signin" || this.signupStep === "form") ? this.disableSignup ? w : S`
2323
2326
  <div class="auth-footer">
2324
2327
  <p class="toggle-text">
2325
2328
  ${this.mode === "signup" ? "Already have an account?" : "Don't have an account?"}
@@ -2606,11 +2609,16 @@ F.styles = Kt`
2606
2609
  font-weight: 500;
2607
2610
  position: relative;
2608
2611
  overflow: hidden;
2612
+ color: inherit;
2609
2613
  }
2610
2614
 
2611
2615
  .theme-toggle:focus {
2612
2616
  outline: none;
2613
- box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5);
2617
+ }
2618
+
2619
+ .theme-toggle:focus-visible {
2620
+ outline: 2px solid transparent;
2621
+ outline-offset: 2px;
2614
2622
  }
2615
2623
 
2616
2624
  .theme-toggle:hover {
@@ -2634,22 +2642,25 @@ F.styles = Kt`
2634
2642
  padding: 1rem;
2635
2643
  }
2636
2644
 
2637
- /* Variant styles */
2645
+ /* Variant styles - Light mode */
2638
2646
  .btn--ghost {
2639
2647
  background: transparent;
2648
+ border: none;
2640
2649
  }
2641
2650
 
2642
2651
  .btn--ghost:hover {
2643
- background: rgba(0, 0, 0, 0.05);
2652
+ background: transparent;
2653
+ opacity: 0.7;
2644
2654
  }
2645
2655
 
2646
2656
  .btn--outline {
2647
- border: 1px solid currentColor;
2657
+ border: 1px solid rgba(0, 0, 0, 0.2);
2648
2658
  background: transparent;
2649
2659
  }
2650
2660
 
2651
2661
  .btn--outline:hover {
2652
2662
  background: rgba(0, 0, 0, 0.05);
2663
+ border-color: rgba(0, 0, 0, 0.3);
2653
2664
  }
2654
2665
 
2655
2666
  .btn--solid {
@@ -2660,6 +2671,29 @@ F.styles = Kt`
2660
2671
  background: rgba(0, 0, 0, 0.15);
2661
2672
  }
2662
2673
 
2674
+ /* Dark mode adaptations */
2675
+ :host([theme="dark"]) .btn--ghost:hover {
2676
+ background: transparent;
2677
+ opacity: 0.7;
2678
+ }
2679
+
2680
+ :host([theme="dark"]) .btn--outline {
2681
+ border-color: rgba(255, 255, 255, 0.2);
2682
+ }
2683
+
2684
+ :host([theme="dark"]) .btn--outline:hover {
2685
+ background: rgba(255, 255, 255, 0.1);
2686
+ border-color: rgba(255, 255, 255, 0.3);
2687
+ }
2688
+
2689
+ :host([theme="dark"]) .btn--solid {
2690
+ background: rgba(255, 255, 255, 0.1);
2691
+ }
2692
+
2693
+ :host([theme="dark"]) .btn--solid:hover {
2694
+ background: rgba(255, 255, 255, 0.15);
2695
+ }
2696
+
2663
2697
  .theme-icon {
2664
2698
  width: 1.25rem;
2665
2699
  height: 1.25rem;
@@ -2723,7 +2757,7 @@ ie([
2723
2757
  T()
2724
2758
  ], F.prototype, "isDark", 2);
2725
2759
  F = ie([
2726
- Gt("cals-theme-toggle")
2760
+ Gt("theme-toggle")
2727
2761
  ], F);
2728
2762
  function ss(t, e) {
2729
2763
  return function() {
@@ -2755,7 +2789,7 @@ const fr = Ue("string"), P = Ue("function"), os = Ue("number"), ge = (t) => t !=
2755
2789
  } catch {
2756
2790
  return !1;
2757
2791
  }
2758
- }, yr = N("Date"), wr = N("File"), br = N("Blob"), Sr = N("FileList"), $r = (t) => ge(t) && P(t.pipe), Ar = (t) => {
2792
+ }, yr = N("Date"), br = N("File"), wr = N("Blob"), Sr = N("FileList"), $r = (t) => ge(t) && P(t.pipe), Ar = (t) => {
2759
2793
  let e;
2760
2794
  return t && (typeof FormData == "function" && t instanceof FormData || P(t.append) && ((e = De(t)) === "formdata" || // detect form-data instance
2761
2795
  e === "object" && P(t.toString) && t.toString() === "[object FormData]"));
@@ -2921,8 +2955,8 @@ const Vr = (t) => {
2921
2955
  isHeaders: kr,
2922
2956
  isUndefined: se,
2923
2957
  isDate: yr,
2924
- isFile: wr,
2925
- isBlob: br,
2958
+ isFile: br,
2959
+ isBlob: wr,
2926
2960
  isRegExp: Hr,
2927
2961
  isFunction: P,
2928
2962
  isStream: $r,
@@ -3057,12 +3091,12 @@ function Ne(t, e, s) {
3057
3091
  return d.isArrayBuffer(p) || d.isTypedArray(p) ? l && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
3058
3092
  }
3059
3093
  function c(p, g, m) {
3060
- let w = p;
3094
+ let b = p;
3061
3095
  if (p && !m && typeof p == "object") {
3062
3096
  if (d.endsWith(g, "{}"))
3063
3097
  g = r ? g : g.slice(0, -2), p = JSON.stringify(p);
3064
- else if (d.isArray(p) && Xr(p) || (d.isFileList(p) || d.endsWith(g, "[]")) && (w = d.toArray(p)))
3065
- return g = us(g), w.forEach(function(E, k) {
3098
+ else if (d.isArray(p) && Xr(p) || (d.isFileList(p) || d.endsWith(g, "[]")) && (b = d.toArray(p)))
3099
+ return g = us(g), b.forEach(function(E, k) {
3066
3100
  !(d.isUndefined(E) || E === null) && e.append(
3067
3101
  // eslint-disable-next-line no-nested-ternary
3068
3102
  n === !0 ? Ct([g], k, o) : n === null ? g : g + "[]",
@@ -3081,14 +3115,14 @@ function Ne(t, e, s) {
3081
3115
  if (!d.isUndefined(p)) {
3082
3116
  if (u.indexOf(p) !== -1)
3083
3117
  throw Error("Circular reference detected in " + g.join("."));
3084
- u.push(p), d.forEach(p, function(w, _) {
3085
- (!(d.isUndefined(w) || w === null) && i.call(
3118
+ u.push(p), d.forEach(p, function(b, _) {
3119
+ (!(d.isUndefined(b) || b === null) && i.call(
3086
3120
  e,
3087
- w,
3121
+ b,
3088
3122
  d.isString(_) ? _.trim() : _,
3089
3123
  g,
3090
3124
  f
3091
- )) === !0 && y(w, g ? g.concat(_) : [_]);
3125
+ )) === !0 && y(b, g ? g.concat(_) : [_]);
3092
3126
  }), u.pop();
3093
3127
  }
3094
3128
  }
@@ -3266,7 +3300,7 @@ function ui(t, e, s) {
3266
3300
  }
3267
3301
  return (s || JSON.stringify)(t);
3268
3302
  }
3269
- const we = {
3303
+ const be = {
3270
3304
  transitional: ms,
3271
3305
  adapter: ["xhr", "http", "fetch"],
3272
3306
  transformRequest: [function(e, s) {
@@ -3295,7 +3329,7 @@ const we = {
3295
3329
  return o || i ? (s.setContentType("application/json", !1), ui(e)) : e;
3296
3330
  }],
3297
3331
  transformResponse: [function(e) {
3298
- const s = this.transitional || we.transitional, r = s && s.forcedJSONParsing, i = this.responseType === "json";
3332
+ const s = this.transitional || be.transitional, r = s && s.forcedJSONParsing, i = this.responseType === "json";
3299
3333
  if (d.isResponse(e) || d.isReadableStream(e))
3300
3334
  return e;
3301
3335
  if (e && d.isString(e) && (r && !this.responseType || i)) {
@@ -3333,7 +3367,7 @@ const we = {
3333
3367
  }
3334
3368
  };
3335
3369
  d.forEach(["delete", "get", "head", "post", "put", "patch"], (t) => {
3336
- we.headers[t] = {};
3370
+ be.headers[t] = {};
3337
3371
  });
3338
3372
  const pi = d.toObjectSet([
3339
3373
  "age",
@@ -3388,7 +3422,7 @@ function Fe(t, e, s, r, i) {
3388
3422
  function yi(t) {
3389
3423
  return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, s, r) => s.toUpperCase() + r);
3390
3424
  }
3391
- function wi(t, e) {
3425
+ function bi(t, e) {
3392
3426
  const s = d.toCamelCase(" " + e);
3393
3427
  ["get", "set", "has"].forEach((r) => {
3394
3428
  Object.defineProperty(t, r + s, {
@@ -3520,7 +3554,7 @@ class D {
3520
3554
  }).accessors, i = this.prototype;
3521
3555
  function o(n) {
3522
3556
  const a = he(n);
3523
- r[a] || (wi(i, n), r[a] = !0);
3557
+ r[a] || (bi(i, n), r[a] = !0);
3524
3558
  }
3525
3559
  return d.isArray(e) ? e.forEach(o) : o(e), this;
3526
3560
  }
@@ -3537,7 +3571,7 @@ d.reduceDescriptors(D.prototype, ({ value: t }, e) => {
3537
3571
  });
3538
3572
  d.freezeMethods(D);
3539
3573
  function qe(t, e) {
3540
- const s = this || we, r = e || s, i = D.from(r.headers);
3574
+ const s = this || be, r = e || s, i = D.from(r.headers);
3541
3575
  let o = r.data;
3542
3576
  return d.forEach(t, function(a) {
3543
3577
  o = a.call(s, o, i.normalize(), e ? e.status : void 0);
@@ -3552,7 +3586,7 @@ function ne(t, e, s) {
3552
3586
  d.inherits(ne, $, {
3553
3587
  __CANCEL__: !0
3554
3588
  });
3555
- function ws(t, e, s) {
3589
+ function bs(t, e, s) {
3556
3590
  const r = s.config.validateStatus;
3557
3591
  !s.status || !r || r(s.status) ? t(s) : e(new $(
3558
3592
  "Request failed with status code " + s.status,
@@ -3562,7 +3596,7 @@ function ws(t, e, s) {
3562
3596
  s
3563
3597
  ));
3564
3598
  }
3565
- function bi(t) {
3599
+ function wi(t) {
3566
3600
  const e = /^([-+\w]{1,25})(:?\/\/|:)/.exec(t);
3567
3601
  return e && e[1] || "";
3568
3602
  }
@@ -3658,7 +3692,7 @@ function Ei(t) {
3658
3692
  function _i(t, e) {
3659
3693
  return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
3660
3694
  }
3661
- function bs(t, e, s) {
3695
+ function ws(t, e, s) {
3662
3696
  let r = !Ei(e);
3663
3697
  return t && (r || s == !1) ? _i(t, e) : e;
3664
3698
  }
@@ -3730,7 +3764,7 @@ function Z(t, e) {
3730
3764
  const Ss = (t) => {
3731
3765
  const e = Z({}, t);
3732
3766
  let { data: s, withXSRFToken: r, xsrfHeaderName: i, xsrfCookieName: o, headers: n, auth: a } = e;
3733
- if (e.headers = n = D.from(n), e.url = fs(bs(e.baseURL, e.url, e.allowAbsoluteUrls), t.params, t.paramsSerializer), a && n.set(
3767
+ if (e.headers = n = D.from(n), e.url = fs(ws(e.baseURL, e.url, e.allowAbsoluteUrls), t.params, t.paramsSerializer), a && n.set(
3734
3768
  "Authorization",
3735
3769
  "Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
3736
3770
  ), d.isFormData(s)) {
@@ -3759,7 +3793,7 @@ const Ss = (t) => {
3759
3793
  }
3760
3794
  let m = new XMLHttpRequest();
3761
3795
  m.open(i.method.toUpperCase(), i.url, !0), m.timeout = i.timeout;
3762
- function w() {
3796
+ function b() {
3763
3797
  if (!m)
3764
3798
  return;
3765
3799
  const E = D.from(
@@ -3772,14 +3806,14 @@ const Ss = (t) => {
3772
3806
  config: t,
3773
3807
  request: m
3774
3808
  };
3775
- ws(function(U) {
3809
+ bs(function(U) {
3776
3810
  s(U), g();
3777
3811
  }, function(U) {
3778
3812
  r(U), g();
3779
3813
  }, R), m = null;
3780
3814
  }
3781
- "onloadend" in m ? m.onloadend = w : m.onreadystatechange = function() {
3782
- !m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(w);
3815
+ "onloadend" in m ? m.onloadend = b : m.onreadystatechange = function() {
3816
+ !m || m.readyState !== 4 || m.status === 0 && !(m.responseURL && m.responseURL.indexOf("file:") === 0) || setTimeout(b);
3783
3817
  }, m.onabort = function() {
3784
3818
  m && (r(new $("Request aborted", $.ECONNABORTED, t, m)), m = null);
3785
3819
  }, m.onerror = function(k) {
@@ -3799,7 +3833,7 @@ const Ss = (t) => {
3799
3833
  }), d.isUndefined(i.withCredentials) || (m.withCredentials = !!i.withCredentials), a && a !== "json" && (m.responseType = i.responseType), h && ([f, p] = Oe(h, !0), m.addEventListener("progress", f)), l && m.upload && ([u, y] = Oe(l), m.upload.addEventListener("progress", u), m.upload.addEventListener("loadend", y)), (i.cancelToken || i.signal) && (c = (E) => {
3800
3834
  m && (r(!E || E.type ? new ne(null, t, m) : E), m.abort(), m = null);
3801
3835
  }, i.cancelToken && i.cancelToken.subscribe(c), i.signal && (i.signal.aborted ? c() : i.signal.addEventListener("abort", c)));
3802
- const _ = bi(i.url);
3836
+ const _ = wi(i.url);
3803
3837
  if (_ && x.protocols.indexOf(_) === -1) {
3804
3838
  r(new $("Unsupported protocol " + _ + ":", $.ERR_BAD_REQUEST, t));
3805
3839
  return;
@@ -3920,9 +3954,9 @@ const Ss = (t) => {
3920
3954
  };
3921
3955
  i && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((p) => {
3922
3956
  !u[p] && (u[p] = (g, m) => {
3923
- let w = g && g[p];
3924
- if (w)
3925
- return w.call(g);
3957
+ let b = g && g[p];
3958
+ if (b)
3959
+ return b.call(g);
3926
3960
  throw new $(`Response type '${p}' is not supported`, $.ERR_NOT_SUPPORT, m);
3927
3961
  });
3928
3962
  });
@@ -3948,7 +3982,7 @@ const Ss = (t) => {
3948
3982
  let {
3949
3983
  url: g,
3950
3984
  method: m,
3951
- data: w,
3985
+ data: b,
3952
3986
  signal: _,
3953
3987
  cancelToken: E,
3954
3988
  timeout: k,
@@ -3956,7 +3990,7 @@ const Ss = (t) => {
3956
3990
  onUploadProgress: q,
3957
3991
  responseType: U,
3958
3992
  headers: Ie,
3959
- withCredentials: be = "same-origin",
3993
+ withCredentials: we = "same-origin",
3960
3994
  fetchOptions: at
3961
3995
  } = Ss(p), lt = e || fetch;
3962
3996
  U = U ? (U + "").toLowerCase() : "text";
@@ -3966,29 +4000,29 @@ const Ss = (t) => {
3966
4000
  });
3967
4001
  let ct;
3968
4002
  try {
3969
- if (q && h && m !== "get" && m !== "head" && (ct = await y(Ie, w)) !== 0) {
4003
+ if (q && h && m !== "get" && m !== "head" && (ct = await y(Ie, b)) !== 0) {
3970
4004
  let j = new s(g, {
3971
4005
  method: "POST",
3972
- body: w,
4006
+ body: b,
3973
4007
  duplex: "half"
3974
4008
  }), X;
3975
- if (d.isFormData(w) && (X = j.headers.get("content-type")) && Ie.setContentType(X), j.body) {
4009
+ if (d.isFormData(b) && (X = j.headers.get("content-type")) && Ie.setContentType(X), j.body) {
3976
4010
  const [Be, $e] = Pt(
3977
4011
  ct,
3978
4012
  Oe(Dt(q))
3979
4013
  );
3980
- w = Nt(j.body, Lt, Be, $e);
4014
+ b = Nt(j.body, Lt, Be, $e);
3981
4015
  }
3982
4016
  }
3983
- d.isString(be) || (be = be ? "include" : "omit");
4017
+ d.isString(we) || (we = we ? "include" : "omit");
3984
4018
  const L = o && "credentials" in s.prototype, ht = {
3985
4019
  ...at,
3986
4020
  signal: Se,
3987
4021
  method: m.toUpperCase(),
3988
4022
  headers: Ie.normalize().toJSON(),
3989
- body: w,
4023
+ body: b,
3990
4024
  duplex: "half",
3991
- credentials: L ? be : void 0
4025
+ credentials: L ? we : void 0
3992
4026
  };
3993
4027
  ae = o && new s(g, ht);
3994
4028
  let B = await (o ? lt(ae, at) : lt(g, ht));
@@ -4012,7 +4046,7 @@ const Ss = (t) => {
4012
4046
  U = U || "text";
4013
4047
  let _s = await u[d.findKey(u, U) || "text"](B, p);
4014
4048
  return !dt && z && z(), await new Promise((j, X) => {
4015
- ws(j, X, {
4049
+ bs(j, X, {
4016
4050
  data: _s,
4017
4051
  headers: D.from(B.headers),
4018
4052
  status: B.status,
@@ -4108,7 +4142,7 @@ function Mt(t) {
4108
4142
  return ze(t), t.headers = D.from(t.headers), t.data = qe.call(
4109
4143
  t,
4110
4144
  t.transformRequest
4111
- ), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), As.getAdapter(t.adapter || we.adapter, t)(t).then(function(r) {
4145
+ ), ["post", "put", "patch"].indexOf(t.method) !== -1 && t.headers.setContentType("application/x-www-form-urlencoded", !1), As.getAdapter(t.adapter || be.adapter, t)(t).then(function(r) {
4112
4146
  return ze(t), r.data = qe.call(
4113
4147
  t,
4114
4148
  t.transformResponse,
@@ -4262,7 +4296,7 @@ class J {
4262
4296
  }
4263
4297
  getUri(e) {
4264
4298
  e = Z(this.defaults, e);
4265
- const s = bs(e.baseURL, e.url, e.allowAbsoluteUrls);
4299
+ const s = ws(e.baseURL, e.url, e.allowAbsoluteUrls);
4266
4300
  return fs(s, e.params, e.paramsSerializer);
4267
4301
  }
4268
4302
  }
@@ -4451,7 +4485,7 @@ function Es(t) {
4451
4485
  return Es(Z(t, i));
4452
4486
  }, s;
4453
4487
  }
4454
- const C = Es(we);
4488
+ const C = Es(be);
4455
4489
  C.Axios = J;
4456
4490
  C.CanceledError = ne;
4457
4491
  C.CancelToken = nt;