@cedros/login-react 0.0.34 → 0.0.35

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
@@ -2412,11 +2412,11 @@ function Pc({
2412
2412
  if (!f) return;
2413
2413
  const A = (L) => {
2414
2414
  h.current && !h.current.contains(L.target) && (g(!1), p(-1));
2415
- }, S = (L) => {
2415
+ }, E = (L) => {
2416
2416
  L.key === "Escape" && (g(!1), p(-1), y.current?.focus());
2417
2417
  };
2418
- return document.addEventListener("mousedown", A), document.addEventListener("keydown", S), () => {
2419
- document.removeEventListener("mousedown", A), document.removeEventListener("keydown", S);
2418
+ return document.addEventListener("mousedown", A), document.addEventListener("keydown", E), () => {
2419
+ document.removeEventListener("mousedown", A), document.removeEventListener("keydown", E);
2420
2420
  };
2421
2421
  }, [f]);
2422
2422
  const v = x(
@@ -2424,10 +2424,10 @@ function Pc({
2424
2424
  if (!(!f || b.length === 0))
2425
2425
  switch (A.key) {
2426
2426
  case "ArrowDown":
2427
- A.preventDefault(), p((S) => (S + 1) % b.length);
2427
+ A.preventDefault(), p((E) => (E + 1) % b.length);
2428
2428
  break;
2429
2429
  case "ArrowUp":
2430
- A.preventDefault(), p((S) => (S - 1 + b.length) % b.length);
2430
+ A.preventDefault(), p((E) => (E - 1 + b.length) % b.length);
2431
2431
  break;
2432
2432
  case "Home":
2433
2433
  A.preventDefault(), p(0);
@@ -2444,7 +2444,7 @@ function Pc({
2444
2444
  [f, w, b]
2445
2445
  ), N = x(() => {
2446
2446
  b.length !== 0 && (g((A) => !A), p(-1));
2447
- }, [b.length]), E = {
2447
+ }, [b.length]), S = {
2448
2448
  sm: "cedros-button-sm",
2449
2449
  md: "cedros-button-md",
2450
2450
  lg: "cedros-button-lg"
@@ -2458,13 +2458,13 @@ function Pc({
2458
2458
  "button",
2459
2459
  {
2460
2460
  type: "button",
2461
- className: `cedros-button ${P[r]} ${E[o]} ${t}`,
2461
+ className: `cedros-button ${P[r]} ${S[o]} ${t}`,
2462
2462
  disabled: !0,
2463
2463
  children: /* @__PURE__ */ e(j, { size: "sm" })
2464
2464
  }
2465
2465
  );
2466
2466
  if (c && l) {
2467
- const A = l.name || l.email || "User", S = Gr(l.picture);
2467
+ const A = l.name || l.email || "User", E = Gr(l.picture);
2468
2468
  return (
2469
2469
  // L-08: Added keyboard handler and ref for accessibility
2470
2470
  /* @__PURE__ */ i("div", { className: "cedros-user-menu", ref: h, onKeyDown: v, children: [
@@ -2473,16 +2473,16 @@ function Pc({
2473
2473
  {
2474
2474
  ref: y,
2475
2475
  type: "button",
2476
- className: `cedros-button cedros-user-button ${E[o]} ${t}`,
2476
+ className: `cedros-button cedros-user-button ${S[o]} ${t}`,
2477
2477
  "aria-haspopup": "menu",
2478
2478
  "aria-expanded": f,
2479
2479
  "aria-label": `User menu for ${A}`,
2480
2480
  onClick: N,
2481
2481
  children: [
2482
- S ? /* @__PURE__ */ e(
2482
+ E ? /* @__PURE__ */ e(
2483
2483
  "img",
2484
2484
  {
2485
- src: S,
2485
+ src: E,
2486
2486
  alt: A,
2487
2487
  className: "cedros-user-avatar",
2488
2488
  referrerPolicy: "no-referrer",
@@ -2533,7 +2533,7 @@ function Pc({
2533
2533
  "button",
2534
2534
  {
2535
2535
  type: "button",
2536
- className: `cedros-button ${P[r]} ${E[o]} ${t}`,
2536
+ className: `cedros-button ${P[r]} ${S[o]} ${t}`,
2537
2537
  onClick: u,
2538
2538
  children: a || "Sign in"
2539
2539
  }
@@ -3238,27 +3238,28 @@ function fs() {
3238
3238
  });
3239
3239
  return t.callbacks?.onLoginSuccess?.(y.user, "webauthn"), r?.handleLoginSuccess(y.user, y.tokens), y;
3240
3240
  } catch (w) {
3241
- if (w instanceof Error && (w.name === "NotAllowedError" || w.name === "InvalidStateError"))
3241
+ const p = w instanceof Error && (w.name === "NotAllowedError" || w.name === "InvalidStateError"), h = typeof w == "object" && w !== null && "isApiError" in w && w.data?.code === "INVALID_CREDENTIALS";
3242
+ if (p || h)
3242
3243
  try {
3243
- const b = await l.post(
3244
+ const N = await l.post(
3244
3245
  "/webauthn/signup/options",
3245
3246
  {}
3246
- ), v = ut(b.options), N = await navigator.credentials.create({
3247
- publicKey: v
3247
+ ), S = ut(N.options), P = await navigator.credentials.create({
3248
+ publicKey: S
3248
3249
  });
3249
- if (!N)
3250
+ if (!P)
3250
3251
  throw new Error("Passkey signup returned no credential");
3251
- const E = await l.post("/webauthn/signup/verify", {
3252
- challengeId: b.challengeId,
3253
- credential: Te(N)
3252
+ const A = await l.post("/webauthn/signup/verify", {
3253
+ challengeId: N.challengeId,
3254
+ credential: Te(P)
3254
3255
  });
3255
- return t.callbacks?.onLoginSuccess?.(E.user, "webauthn"), r?.handleLoginSuccess(E.user, E.tokens), E;
3256
- } catch (b) {
3257
- const N = Be(b) ?? W(b, "Unable to create passkey. Please try again.");
3258
- throw n(N), N;
3256
+ return t.callbacks?.onLoginSuccess?.(A.user, "webauthn"), r?.handleLoginSuccess(A.user, A.tokens), A;
3257
+ } catch (N) {
3258
+ const P = Be(N) ?? W(N, "Unable to create passkey. Please try again.");
3259
+ throw n(P), P;
3259
3260
  }
3260
- const y = Be(w) ?? W(w, "Unable to sign in with passkey. Please try again.");
3261
- throw n(y), y;
3261
+ const v = Be(w) ?? W(w, "Unable to sign in with passkey. Please try again.");
3262
+ throw n(v), v;
3262
3263
  } finally {
3263
3264
  a(!1);
3264
3265
  }
@@ -3339,27 +3340,27 @@ function Kt({ onSuccess: t, className: r = "", defaultTab: o = "login" }) {
3339
3340
  const g = a.forms?.forgotPassword?.mode ?? (a.features?.instantLink ? "instantLink" : "reset"), w = x(
3340
3341
  (P) => {
3341
3342
  const A = Re.indexOf(n);
3342
- let S = A;
3343
+ let E = A;
3343
3344
  switch (P.key) {
3344
3345
  case "ArrowLeft":
3345
3346
  case "ArrowUp":
3346
- S = A === 0 ? Re.length - 1 : A - 1;
3347
+ E = A === 0 ? Re.length - 1 : A - 1;
3347
3348
  break;
3348
3349
  case "ArrowRight":
3349
3350
  case "ArrowDown":
3350
- S = A === Re.length - 1 ? 0 : A + 1;
3351
+ E = A === Re.length - 1 ? 0 : A + 1;
3351
3352
  break;
3352
3353
  case "Home":
3353
- S = 0;
3354
+ E = 0;
3354
3355
  break;
3355
3356
  case "End":
3356
- S = Re.length - 1;
3357
+ E = Re.length - 1;
3357
3358
  break;
3358
3359
  default:
3359
3360
  return;
3360
3361
  }
3361
3362
  P.preventDefault();
3362
- const L = Re[S];
3363
+ const L = Re[E];
3363
3364
  l(L), document.getElementById(`cedros-tab-${L}`)?.focus();
3364
3365
  },
3365
3366
  [n]
@@ -3369,7 +3370,7 @@ function Kt({ onSuccess: t, className: r = "", defaultTab: o = "login" }) {
3369
3370
  apple: !0,
3370
3371
  solana: !0,
3371
3372
  webauthn: !0
3372
- }, h = p.email !== !1, y = p.google !== !1 && a.googleClientId, b = p.apple !== !1 && a.appleClientId && f, v = p.solana !== !1 && u, N = p.webauthn !== !1, E = h && (y || b || v || N);
3373
+ }, h = p.email !== !1, y = p.google !== !1 && a.googleClientId, b = p.apple !== !1 && a.appleClientId && f, v = p.solana !== !1 && u, N = p.webauthn !== !1, S = h && (y || b || v || N);
3373
3374
  return c === "forgotPassword" ? /* @__PURE__ */ e("div", { className: `cedros-login-form ${r}`, children: /* @__PURE__ */ e(wn, { mode: g, onCancel: () => d("form") }) }) : /* @__PURE__ */ i("div", { className: `cedros-login-form ${r}`, children: [
3374
3375
  (N || y || b || v) && (() => {
3375
3376
  const P = {
@@ -3378,12 +3379,12 @@ function Kt({ onSuccess: t, className: r = "", defaultTab: o = "login" }) {
3378
3379
  apple: b ? /* @__PURE__ */ e(An, { onSuccess: t }) : null,
3379
3380
  solana: v ? /* @__PURE__ */ e(lo, { onSuccess: t }) : null
3380
3381
  };
3381
- return /* @__PURE__ */ e("div", { className: "cedros-social-buttons", children: (s ?? ["webauthn", "google", "apple", "solana"]).map((S) => {
3382
- const L = P[S];
3383
- return L ? /* @__PURE__ */ e(ro, { children: L }, S) : null;
3382
+ return /* @__PURE__ */ e("div", { className: "cedros-social-buttons", children: (s ?? ["webauthn", "google", "apple", "solana"]).map((E) => {
3383
+ const L = P[E];
3384
+ return L ? /* @__PURE__ */ e(ro, { children: L }, E) : null;
3384
3385
  }) });
3385
3386
  })(),
3386
- E && /* @__PURE__ */ e("div", { className: "cedros-divider", children: /* @__PURE__ */ e("span", { children: "Or continue with" }) }),
3387
+ S && /* @__PURE__ */ e("div", { className: "cedros-divider", children: /* @__PURE__ */ e("span", { children: "Or continue with" }) }),
3387
3388
  h && /* @__PURE__ */ i($, { children: [
3388
3389
  /* @__PURE__ */ i("div", { className: "cedros-tabs", role: "tablist", "aria-label": "Authentication method", children: [
3389
3390
  /* @__PURE__ */ e(
@@ -4399,10 +4400,10 @@ function zn({
4399
4400
  className: s = ""
4400
4401
  }) {
4401
4402
  const [n, l] = k(Array(le).fill("")), [c, d] = k(null), [u, m] = k([]), [f, g] = k(null), w = Yr(), p = J(null), h = x(
4402
- (A, S) => {
4403
+ (A, E) => {
4403
4404
  const L = [...n];
4404
- if (L[A] = S.toLowerCase().trim(), l(L), S.length > 0) {
4405
- const C = un(S, 5);
4405
+ if (L[A] = E.toLowerCase().trim(), l(L), E.length > 0) {
4406
+ const C = un(E, 5);
4406
4407
  m(C);
4407
4408
  } else
4408
4409
  m([]);
@@ -4413,8 +4414,8 @@ function zn({
4413
4414
  d(A), m([]);
4414
4415
  }, []), b = x(
4415
4416
  (A) => {
4416
- const S = n[A];
4417
- S && !qe(S) && g(`Word ${A + 1} is not in the wordlist`), p.current !== null && window.clearTimeout(p.current), p.current = window.setTimeout(() => {
4417
+ const E = n[A];
4418
+ E && !qe(E) && g(`Word ${A + 1} is not in the wordlist`), p.current !== null && window.clearTimeout(p.current), p.current = window.setTimeout(() => {
4418
4419
  c === A && m([]);
4419
4420
  }, 200);
4420
4421
  },
@@ -4426,17 +4427,17 @@ function zn({
4426
4427
  const v = x(
4427
4428
  (A) => {
4428
4429
  if (c !== null) {
4429
- const S = [...n];
4430
- S[c] = A, l(S), m([]), document.querySelector(
4430
+ const E = [...n];
4431
+ E[c] = A, l(E), m([]), document.querySelector(
4431
4432
  `[data-word-index="${c + 1}"]`
4432
4433
  )?.focus();
4433
4434
  }
4434
4435
  },
4435
4436
  [c, n]
4436
4437
  ), N = x((A) => {
4437
- const S = A.clipboardData.getData("text"), L = pn(S);
4438
+ const E = A.clipboardData.getData("text"), L = pn(E);
4438
4439
  L.length === le && (A.preventDefault(), l(L), g(null));
4439
- }, []), E = x(
4440
+ }, []), S = x(
4440
4441
  (A) => {
4441
4442
  if (A.preventDefault(), n.filter((C) => !C).length > 0) {
4442
4443
  g(`Please enter all ${le} words`);
@@ -4459,36 +4460,36 @@ function zn({
4459
4460
  "form",
4460
4461
  {
4461
4462
  className: `cedros-recovery-phrase-input ${s}`,
4462
- onSubmit: E,
4463
+ onSubmit: S,
4463
4464
  onPaste: N,
4464
4465
  children: [
4465
4466
  /* @__PURE__ */ i("div", { className: "cedros-recovery-input-header", children: [
4466
4467
  /* @__PURE__ */ e("h3", { className: "cedros-recovery-input-title", children: "Enter Recovery Phrase" }),
4467
4468
  /* @__PURE__ */ e("p", { className: "cedros-recovery-input-description", children: "Enter your 12-word recovery phrase. You can paste the entire phrase at once." })
4468
4469
  ] }),
4469
- /* @__PURE__ */ e("div", { className: "cedros-word-inputs", children: Array.from({ length: le }, (A, S) => /* @__PURE__ */ i("div", { className: "cedros-word-input-wrapper", children: [
4470
+ /* @__PURE__ */ e("div", { className: "cedros-word-inputs", children: Array.from({ length: le }, (A, E) => /* @__PURE__ */ i("div", { className: "cedros-word-input-wrapper", children: [
4470
4471
  /* @__PURE__ */ i("label", { className: "cedros-word-label", children: [
4471
- S + 1,
4472
+ E + 1,
4472
4473
  "."
4473
4474
  ] }),
4474
4475
  /* @__PURE__ */ e(
4475
4476
  "input",
4476
4477
  {
4477
4478
  type: "text",
4478
- className: `cedros-word-input ${n[S] && !qe(n[S]) ? "cedros-word-invalid" : n[S] && qe(n[S]) ? "cedros-word-valid" : ""}`,
4479
- value: n[S],
4480
- onChange: (L) => h(S, L.target.value),
4481
- onFocus: () => y(S),
4482
- onBlur: () => b(S),
4483
- "data-word-index": S,
4479
+ className: `cedros-word-input ${n[E] && !qe(n[E]) ? "cedros-word-invalid" : n[E] && qe(n[E]) ? "cedros-word-valid" : ""}`,
4480
+ value: n[E],
4481
+ onChange: (L) => h(E, L.target.value),
4482
+ onFocus: () => y(E),
4483
+ onBlur: () => b(E),
4484
+ "data-word-index": E,
4484
4485
  autoComplete: "off",
4485
4486
  autoCapitalize: "none",
4486
4487
  spellCheck: !1,
4487
4488
  disabled: o,
4488
- "aria-label": `Word ${S + 1}`
4489
+ "aria-label": `Word ${E + 1}`
4489
4490
  }
4490
4491
  )
4491
- ] }, S)) }),
4492
+ ] }, E)) }),
4492
4493
  c !== null && u.length > 0 && /* @__PURE__ */ e("div", { className: "cedros-suggestions", role: "listbox", id: `${w}-suggestions`, children: u.map((A) => /* @__PURE__ */ e(
4493
4494
  "button",
4494
4495
  {
@@ -4670,9 +4671,9 @@ function Kn() {
4670
4671
  s({ step: "generating_seed" });
4671
4672
  const v = Zs();
4672
4673
  c.current.push(v), s({ step: "splitting_shares" });
4673
- const { shareA: N, shareB: E, shareC: P } = rs(v);
4674
- c.current.push(N, E, P), s({ step: "encrypting_shares" });
4675
- const A = await jr(N, zr(h)), S = ss(v), L = os(S);
4674
+ const { shareA: N, shareB: S, shareC: P } = rs(v);
4675
+ c.current.push(N, S, P), s({ step: "encrypting_shares" });
4676
+ const A = await jr(N, zr(h)), E = ss(v), L = os(E);
4676
4677
  s({ step: "uploading" });
4677
4678
  const C = {
4678
4679
  solanaPubkey: L,
@@ -4680,7 +4681,7 @@ function Kn() {
4680
4681
  shareACiphertext: A.ciphertext,
4681
4682
  shareANonce: A.nonce,
4682
4683
  // Share B is now plaintext (SSS math protects it)
4683
- shareB: we(E)
4684
+ shareB: we(S)
4684
4685
  };
4685
4686
  if (p === "password") {
4686
4687
  if (!y) throw new Error("KDF salt required for password method");
@@ -4732,10 +4733,10 @@ function Kn() {
4732
4733
  s({ step: "registering_passkey" });
4733
4734
  let y;
4734
4735
  try {
4735
- const v = new TextEncoder().encode(t.id), N = t.name ?? t.email ?? "User", E = t.email ?? t.id;
4736
+ const v = new TextEncoder().encode(t.id), N = t.name ?? t.email ?? "User", S = t.email ?? t.id;
4736
4737
  y = (await eo(
4737
4738
  v,
4738
- E,
4739
+ S,
4739
4740
  N,
4740
4741
  p
4741
4742
  )).prfOutput;
@@ -4790,7 +4791,7 @@ function Yn({
4790
4791
  _(() => {
4791
4792
  w(f());
4792
4793
  }, [s?.id, a]);
4793
- const E = x(
4794
+ const S = x(
4794
4795
  async (L) => {
4795
4796
  if (L.preventDefault(), p !== y) {
4796
4797
  N("Passwords do not match");
@@ -4809,7 +4810,7 @@ function Yn({
4809
4810
  await c();
4810
4811
  }, [c]), A = x(() => {
4811
4812
  d(), n.solanaPubkey && t?.(n.solanaPubkey);
4812
- }, [d, n.solanaPubkey, t]), S = x(() => {
4813
+ }, [d, n.solanaPubkey, t]), E = x(() => {
4813
4814
  u(), r?.();
4814
4815
  }, [u, r]);
4815
4816
  return n.step === "generating_seed" || n.step === "splitting_shares" ? /* @__PURE__ */ e("div", { className: `cedros-wallet-enrollment ${o}`, "aria-busy": "true", children: /* @__PURE__ */ i("div", { className: "cedros-enrollment-progress", role: "status", "aria-live": "polite", children: [
@@ -4915,7 +4916,7 @@ function Yn({
4915
4916
  {
4916
4917
  type: "button",
4917
4918
  className: "cedros-button cedros-button-secondary",
4918
- onClick: S,
4919
+ onClick: E,
4919
4920
  children: "Cancel"
4920
4921
  }
4921
4922
  ),
@@ -4968,7 +4969,7 @@ function Yn({
4968
4969
  /* @__PURE__ */ e("span", { children: "Passkey" })
4969
4970
  ] })
4970
4971
  ] }),
4971
- g === "password" && /* @__PURE__ */ i("form", { onSubmit: E, className: "cedros-enrollment-form", children: [
4972
+ g === "password" && /* @__PURE__ */ i("form", { onSubmit: S, className: "cedros-enrollment-form", children: [
4972
4973
  /* @__PURE__ */ e(
4973
4974
  he,
4974
4975
  {
@@ -5002,7 +5003,7 @@ function Yn({
5002
5003
  {
5003
5004
  type: "button",
5004
5005
  className: "cedros-button cedros-button-secondary",
5005
- onClick: S,
5006
+ onClick: E,
5006
5007
  disabled: m,
5007
5008
  children: "Cancel"
5008
5009
  }
@@ -5056,7 +5057,7 @@ function Yn({
5056
5057
  {
5057
5058
  type: "button",
5058
5059
  className: "cedros-button cedros-button-secondary",
5059
- onClick: S,
5060
+ onClick: E,
5060
5061
  disabled: m,
5061
5062
  children: "Cancel"
5062
5063
  }
@@ -5271,7 +5272,7 @@ function ta({
5271
5272
  _(() => {
5272
5273
  a !== void 0 && w(a);
5273
5274
  }, [a]);
5274
- const v = g === "password", N = g === "passkey", E = x(async () => {
5275
+ const v = g === "password", N = g === "passkey", S = x(async () => {
5275
5276
  if (f("credential"), b(null), !g)
5276
5277
  try {
5277
5278
  const T = await l();
@@ -5306,7 +5307,7 @@ function ta({
5306
5307
  } catch (T) {
5307
5308
  b(T instanceof Error ? T.message : "Failed to unlock wallet"), f("error");
5308
5309
  }
5309
- }, [d, n, t]), S = x(() => {
5310
+ }, [d, n, t]), E = x(() => {
5310
5311
  h(""), f("idle"), b(null), r?.();
5311
5312
  }, [r]), L = x(() => {
5312
5313
  h(""), f("credential"), b(null);
@@ -5322,7 +5323,7 @@ function ta({
5322
5323
  {
5323
5324
  type: "button",
5324
5325
  className: "cedros-button cedros-button-primary",
5325
- onClick: E,
5326
+ onClick: S,
5326
5327
  children: "Unlock Wallet"
5327
5328
  }
5328
5329
  )
@@ -5357,7 +5358,7 @@ function ta({
5357
5358
  {
5358
5359
  type: "button",
5359
5360
  className: "cedros-button cedros-button-secondary",
5360
- onClick: S,
5361
+ onClick: E,
5361
5362
  disabled: C,
5362
5363
  children: "Cancel"
5363
5364
  }
@@ -5374,7 +5375,7 @@ function ta({
5374
5375
  error: y ?? void 0,
5375
5376
  onPrompt: A,
5376
5377
  onRetry: A,
5377
- onCancel: o ? S : void 0
5378
+ onCancel: o ? E : void 0
5378
5379
  }
5379
5380
  )
5380
5381
  ] }) : /* @__PURE__ */ i("div", { className: "cedros-wallet-unlock-loading", children: [
@@ -5413,7 +5414,7 @@ function ta({
5413
5414
  {
5414
5415
  type: "button",
5415
5416
  className: "cedros-button cedros-button-secondary",
5416
- onClick: S,
5417
+ onClick: E,
5417
5418
  children: "Cancel"
5418
5419
  }
5419
5420
  )
@@ -5515,24 +5516,24 @@ function na() {
5515
5516
  p = dn(f), c.current.push(p);
5516
5517
  const h = ss(p), y = os(h), { shareA: b, shareB: v } = rs(p);
5517
5518
  c.current.push(b, v), s({ step: "encrypting" });
5518
- let N, E, P;
5519
+ let N, S, P;
5519
5520
  if (g === "passkey") {
5520
5521
  const L = Hr();
5521
5522
  P = we(L);
5522
5523
  const C = await zt(P);
5523
5524
  c.current.push(C.prfOutput), N = await Qr(C.prfOutput, L), c.current.push(N);
5524
5525
  } else
5525
- E = Vr(), N = await ns(w, E, Qe), c.current.push(N);
5526
+ S = Vr(), N = await ns(w, S, Qe), c.current.push(N);
5526
5527
  const A = await jr(b, zr(N));
5527
5528
  s({ step: "uploading" });
5528
- const S = {
5529
+ const E = {
5529
5530
  solanaPubkey: y,
5530
5531
  shareAAuthMethod: g,
5531
5532
  shareACiphertext: A.ciphertext,
5532
5533
  shareANonce: A.nonce,
5533
5534
  shareB: we(v)
5534
5535
  };
5535
- g === "password" && (S.shareAKdfSalt = we(E), S.shareAKdfParams = Qe), g === "passkey" && (S.prfSalt = P), await t(S), d(), s({ step: "complete" });
5536
+ g === "password" && (E.shareAKdfSalt = we(S), E.shareAKdfParams = Qe), g === "passkey" && (E.prfSalt = P), await t(E), d(), s({ step: "complete" });
5536
5537
  } catch (p) {
5537
5538
  d(), s({
5538
5539
  step: "error",
@@ -5559,7 +5560,7 @@ function aa({
5559
5560
  className: o = "",
5560
5561
  defaultAuthMethod: a = "password"
5561
5562
  }) {
5562
- const { state: s, startRecovery: n, cancel: l, isRecovering: c } = na(), [d, u] = k([]), [m, f] = k(!1), [g, w] = k(a), [p, h] = k(""), [y, b] = k(""), [v, N] = k(null), E = x((C) => {
5563
+ const { state: s, startRecovery: n, cancel: l, isRecovering: c } = na(), [d, u] = k([]), [m, f] = k(!1), [g, w] = k(a), [p, h] = k(""), [y, b] = k(""), [v, N] = k(null), S = x((C) => {
5563
5564
  u(C), f(!0);
5564
5565
  }, []), P = x(
5565
5566
  async (C) => {
@@ -5578,7 +5579,7 @@ function aa({
5578
5579
  [d, g, p, y, n]
5579
5580
  ), A = x(() => {
5580
5581
  l(), u([]), f(!1), h(""), b(""), r?.();
5581
- }, [l, r]), S = x(() => {
5582
+ }, [l, r]), E = x(() => {
5582
5583
  f(!1), h(""), b("");
5583
5584
  }, []), L = x(() => {
5584
5585
  t?.();
@@ -5706,7 +5707,7 @@ function aa({
5706
5707
  {
5707
5708
  type: "button",
5708
5709
  className: "cedros-button cedros-button-secondary",
5709
- onClick: S,
5710
+ onClick: E,
5710
5711
  disabled: c,
5711
5712
  children: "Back"
5712
5713
  }
@@ -5729,7 +5730,7 @@ function aa({
5729
5730
  /* @__PURE__ */ e(
5730
5731
  zn,
5731
5732
  {
5732
- onSubmit: E,
5733
+ onSubmit: S,
5733
5734
  onCancel: A,
5734
5735
  isSubmitting: !1
5735
5736
  }
@@ -6305,11 +6306,11 @@ function Dc({
6305
6306
  }
6306
6307
  }, [w]);
6307
6308
  const h = x((P, A) => {
6308
- m((S) => ({ ...S, [P]: A })), g(null), p(!1);
6309
+ m((E) => ({ ...E, [P]: A })), g(null), p(!1);
6309
6310
  }, []), y = x(async () => {
6310
- const P = Object.entries(u).map(([A, S]) => ({
6311
+ const P = Object.entries(u).map(([A, E]) => ({
6311
6312
  key: A,
6312
- value: S
6313
+ value: E
6313
6314
  }));
6314
6315
  if (P.length !== 0)
6315
6316
  try {
@@ -6327,11 +6328,11 @@ function Dc({
6327
6328
  ] });
6328
6329
  if (l)
6329
6330
  return /* @__PURE__ */ e("div", { className: `cedros-system-settings ${r}`, children: /* @__PURE__ */ e(X, { error: l.message }) });
6330
- const E = Object.keys(a).sort();
6331
- return E.length === 0 ? /* @__PURE__ */ e("div", { className: `cedros-system-settings cedros-system-settings-empty ${r}`, children: /* @__PURE__ */ e("p", { children: "No system settings found." }) }) : /* @__PURE__ */ i("div", { className: `cedros-system-settings ${r}`, children: [
6331
+ const S = Object.keys(a).sort();
6332
+ return S.length === 0 ? /* @__PURE__ */ e("div", { className: `cedros-system-settings cedros-system-settings-empty ${r}`, children: /* @__PURE__ */ e("p", { children: "No system settings found." }) }) : /* @__PURE__ */ i("div", { className: `cedros-system-settings ${r}`, children: [
6332
6333
  f && /* @__PURE__ */ e(X, { error: f }),
6333
6334
  w && /* @__PURE__ */ e("div", { className: "cedros-settings-success", children: "Settings saved successfully." }),
6334
- E.map((P) => /* @__PURE__ */ e(
6335
+ S.map((P) => /* @__PURE__ */ e(
6335
6336
  ga,
6336
6337
  {
6337
6338
  category: P,
@@ -6714,13 +6715,13 @@ function ka({ className: t }) {
6714
6715
  _(() => {
6715
6716
  c();
6716
6717
  }, [c]);
6717
- const g = lr.find((E) => E.id === m), w = g?.category ?? "", h = (u("email_provider") || "custom") === "custom", y = u("email_smtp_host"), b = !h || y != null && y !== "", v = q(() => {
6718
- const E = r[w] ?? [];
6719
- if (m !== "email") return E;
6718
+ const g = lr.find((S) => S.id === m), w = g?.category ?? "", h = (u("email_provider") || "custom") === "custom", y = u("email_smtp_host"), b = !h || y != null && y !== "", v = q(() => {
6719
+ const S = r[w] ?? [];
6720
+ if (m !== "email") return S;
6720
6721
  const P = h ? _o : Wo;
6721
- return E.filter((A) => P.includes(A.key)).sort((A, S) => P.indexOf(A.key) - P.indexOf(S.key));
6722
- }, [r, w, m, h]), N = (E, P) => {
6723
- if (d(E, P), E === "email_provider" && P !== "custom") {
6722
+ return S.filter((A) => P.includes(A.key)).sort((A, E) => P.indexOf(A.key) - P.indexOf(E.key));
6723
+ }, [r, w, m, h]), N = (S, P) => {
6724
+ if (d(S, P), S === "email_provider" && P !== "custom") {
6724
6725
  const A = Oo[P];
6725
6726
  A && (d("email_smtp_host", A), d("email_smtp_port", "587"), d("email_smtp_tls", "true"));
6726
6727
  }
@@ -6737,17 +6738,17 @@ function ka({ className: t }) {
6737
6738
  /* @__PURE__ */ e(No, { status: s, error: n })
6738
6739
  ] }),
6739
6740
  m === "email" && !b && /* @__PURE__ */ e("div", { className: "cedros-settings-warning-banner", children: "Email features (verification, password reset, instant link) are disabled until SMTP is configured. Select a provider or enter custom SMTP settings below." }),
6740
- /* @__PURE__ */ e("div", { className: "cedros-admin-tabs cedros-admin-tabs--line", children: lr.map((E) => /* @__PURE__ */ e(
6741
+ /* @__PURE__ */ e("div", { className: "cedros-admin-tabs cedros-admin-tabs--line", children: lr.map((S) => /* @__PURE__ */ e(
6741
6742
  "button",
6742
6743
  {
6743
6744
  type: "button",
6744
- className: `cedros-admin-tab ${m === E.id ? "cedros-admin-tab-active" : ""}`,
6745
- onClick: () => f(E.id),
6746
- "aria-selected": m === E.id,
6745
+ className: `cedros-admin-tab ${m === S.id ? "cedros-admin-tab-active" : ""}`,
6746
+ onClick: () => f(S.id),
6747
+ "aria-selected": m === S.id,
6747
6748
  role: "tab",
6748
- children: E.label
6749
+ children: S.label
6749
6750
  },
6750
- E.id
6751
+ S.id
6751
6752
  )) }),
6752
6753
  /* @__PURE__ */ e("div", { className: "cedros-admin-tab-content", role: "tabpanel", children: v.length === 0 ? /* @__PURE__ */ e("div", { className: "cedros-system-settings-empty", children: /* @__PURE__ */ i("p", { children: [
6753
6754
  "No settings found for ",
@@ -6987,17 +6988,17 @@ function Fc({
6987
6988
  onLogoutClick: c,
6988
6989
  className: d = ""
6989
6990
  }) {
6990
- const [u, m] = k(o), [f, g] = k(!0), { user: w, logout: p } = te(), { activeOrg: h, role: y, isLoading: b, fetchOrgs: v, hasPermission: N } = Co(), { status: E, isLoading: P, checkStatus: A } = ws(), { features: S, isLoading: L } = uo(), { canAccess: C } = ho(), B = x(
6991
+ const [u, m] = k(o), [f, g] = k(!0), { user: w, logout: p } = te(), { activeOrg: h, role: y, isLoading: b, fetchOrgs: v, hasPermission: N } = Co(), { status: S, isLoading: P, checkStatus: A } = ws(), { features: E, isLoading: L } = uo(), { canAccess: C } = ho(), B = x(
6991
6992
  (U) => {
6992
6993
  m(U), n?.(U);
6993
6994
  },
6994
6995
  [n]
6995
- ), T = Na.filter((U) => !(!r.includes(U.id) || U.requiredFeature && !S[U.requiredFeature] || !C(U.id))), M = T.find((U) => U.id === u), R = !M && !L;
6996
+ ), T = Na.filter((U) => !(!r.includes(U.id) || U.requiredFeature && !E[U.requiredFeature] || !C(U.id))), M = T.find((U) => U.id === u), R = !M && !L;
6996
6997
  return _(() => {
6997
6998
  v(), A();
6998
6999
  }, [v, A]), _(() => {
6999
7000
  R && T.length > 0 && m("users");
7000
- }, [R, T.length]), !P && E?.needsSetup ? /* @__PURE__ */ e("div", { className: `cedros-admin cedros-dashboard cedros-dashboard--setup ${d}`, children: /* @__PURE__ */ e(Aa, { onComplete: () => A() }) }) : (b || P || L) && !h ? /* @__PURE__ */ i("div", { className: `cedros-admin cedros-dashboard cedros-dashboard--loading ${d}`, children: [
7001
+ }, [R, T.length]), !P && S?.needsSetup ? /* @__PURE__ */ e("div", { className: `cedros-admin cedros-dashboard cedros-dashboard--setup ${d}`, children: /* @__PURE__ */ e(Aa, { onComplete: () => A() }) }) : (b || P || L) && !h ? /* @__PURE__ */ i("div", { className: `cedros-admin cedros-dashboard cedros-dashboard--loading ${d}`, children: [
7001
7002
  /* @__PURE__ */ e(j, {}),
7002
7003
  /* @__PURE__ */ e("span", { className: "cedros-dashboard__loading-text", children: "Loading..." })
7003
7004
  ] }) : u === "team" && !h ? /* @__PURE__ */ e("div", { className: `cedros-admin cedros-dashboard ${d}`, children: /* @__PURE__ */ e(X, { error: "No organization selected. Please select an organization first." }) }) : /* @__PURE__ */ i("div", { className: `cedros-admin cedros-dashboard ${d}`, children: [
@@ -7141,16 +7142,16 @@ function Ea({ orgId: t, currentUserId: r, hasPermission: o, role: a }) {
7141
7142
  _(() => {
7142
7143
  u(), h();
7143
7144
  }, [u, h]);
7144
- const N = o("invite:create"), E = o("invite:cancel"), P = g.length, A = l.reduce(
7145
+ const N = o("invite:create"), S = o("invite:cancel"), P = g.length, A = l.reduce(
7145
7146
  (B, T) => (B[T.role] = (B[T.role] ?? 0) + 1, B),
7146
7147
  {}
7147
- ), S = A.owner ?? 0, L = A.admin ?? 0, C = A.member ?? 0;
7148
+ ), E = A.owner ?? 0, L = A.admin ?? 0, C = A.member ?? 0;
7148
7149
  return /* @__PURE__ */ i("div", { className: "cedros-dashboard__team", children: [
7149
7150
  /* @__PURE__ */ e(
7150
7151
  ts,
7151
7152
  {
7152
7153
  stats: [
7153
- { label: "Owners", value: S },
7154
+ { label: "Owners", value: E },
7154
7155
  { label: "Admins", value: L },
7155
7156
  { label: "Members", value: C },
7156
7157
  { label: "Pending Invites", value: P }
@@ -7227,8 +7228,8 @@ function Ea({ orgId: t, currentUserId: r, hasPermission: o, role: a }) {
7227
7228
  invites: g,
7228
7229
  isLoading: w,
7229
7230
  error: p?.message,
7230
- canManage: E || N,
7231
- onCancel: E ? b : void 0,
7231
+ canManage: S || N,
7232
+ onCancel: S ? b : void 0,
7232
7233
  onResend: N ? v : void 0
7233
7234
  }
7234
7235
  ) })
@@ -8392,27 +8393,27 @@ function Va() {
8392
8393
  return unescape(encodeURIComponent(b)).length;
8393
8394
  }
8394
8395
  function m(b, v, N) {
8395
- const E = [];
8396
+ const S = [];
8396
8397
  let P;
8397
8398
  for (; (P = b.exec(N)) !== null; )
8398
- E.push({
8399
+ S.push({
8399
8400
  data: P[0],
8400
8401
  index: P.index,
8401
8402
  mode: v,
8402
8403
  length: P[0].length
8403
8404
  });
8404
- return E;
8405
+ return S;
8405
8406
  }
8406
8407
  function f(b) {
8407
8408
  const v = m(l.NUMERIC, r.NUMERIC, b), N = m(l.ALPHANUMERIC, r.ALPHANUMERIC, b);
8408
- let E, P;
8409
- return c.isKanjiModeEnabled() ? (E = m(l.BYTE, r.BYTE, b), P = m(l.KANJI, r.KANJI, b)) : (E = m(l.BYTE_KANJI, r.BYTE, b), P = []), v.concat(N, E, P).sort(function(S, L) {
8410
- return S.index - L.index;
8411
- }).map(function(S) {
8409
+ let S, P;
8410
+ return c.isKanjiModeEnabled() ? (S = m(l.BYTE, r.BYTE, b), P = m(l.KANJI, r.KANJI, b)) : (S = m(l.BYTE_KANJI, r.BYTE, b), P = []), v.concat(N, S, P).sort(function(E, L) {
8411
+ return E.index - L.index;
8412
+ }).map(function(E) {
8412
8413
  return {
8413
- data: S.data,
8414
- mode: S.mode,
8415
- length: S.length
8414
+ data: E.data,
8415
+ mode: E.mode,
8416
+ length: E.length
8416
8417
  };
8417
8418
  });
8418
8419
  }
@@ -8430,67 +8431,67 @@ function Va() {
8430
8431
  }
8431
8432
  function w(b) {
8432
8433
  return b.reduce(function(v, N) {
8433
- const E = v.length - 1 >= 0 ? v[v.length - 1] : null;
8434
- return E && E.mode === N.mode ? (v[v.length - 1].data += N.data, v) : (v.push(N), v);
8434
+ const S = v.length - 1 >= 0 ? v[v.length - 1] : null;
8435
+ return S && S.mode === N.mode ? (v[v.length - 1].data += N.data, v) : (v.push(N), v);
8435
8436
  }, []);
8436
8437
  }
8437
8438
  function p(b) {
8438
8439
  const v = [];
8439
8440
  for (let N = 0; N < b.length; N++) {
8440
- const E = b[N];
8441
- switch (E.mode) {
8441
+ const S = b[N];
8442
+ switch (S.mode) {
8442
8443
  case r.NUMERIC:
8443
8444
  v.push([
8444
- E,
8445
- { data: E.data, mode: r.ALPHANUMERIC, length: E.length },
8446
- { data: E.data, mode: r.BYTE, length: E.length }
8445
+ S,
8446
+ { data: S.data, mode: r.ALPHANUMERIC, length: S.length },
8447
+ { data: S.data, mode: r.BYTE, length: S.length }
8447
8448
  ]);
8448
8449
  break;
8449
8450
  case r.ALPHANUMERIC:
8450
8451
  v.push([
8451
- E,
8452
- { data: E.data, mode: r.BYTE, length: E.length }
8452
+ S,
8453
+ { data: S.data, mode: r.BYTE, length: S.length }
8453
8454
  ]);
8454
8455
  break;
8455
8456
  case r.KANJI:
8456
8457
  v.push([
8457
- E,
8458
- { data: E.data, mode: r.BYTE, length: u(E.data) }
8458
+ S,
8459
+ { data: S.data, mode: r.BYTE, length: u(S.data) }
8459
8460
  ]);
8460
8461
  break;
8461
8462
  case r.BYTE:
8462
8463
  v.push([
8463
- { data: E.data, mode: r.BYTE, length: u(E.data) }
8464
+ { data: S.data, mode: r.BYTE, length: u(S.data) }
8464
8465
  ]);
8465
8466
  }
8466
8467
  }
8467
8468
  return v;
8468
8469
  }
8469
8470
  function h(b, v) {
8470
- const N = {}, E = { start: {} };
8471
+ const N = {}, S = { start: {} };
8471
8472
  let P = ["start"];
8472
8473
  for (let A = 0; A < b.length; A++) {
8473
- const S = b[A], L = [];
8474
- for (let C = 0; C < S.length; C++) {
8475
- const B = S[C], T = "" + A + C;
8476
- L.push(T), N[T] = { node: B, lastCount: 0 }, E[T] = {};
8474
+ const E = b[A], L = [];
8475
+ for (let C = 0; C < E.length; C++) {
8476
+ const B = E[C], T = "" + A + C;
8477
+ L.push(T), N[T] = { node: B, lastCount: 0 }, S[T] = {};
8477
8478
  for (let M = 0; M < P.length; M++) {
8478
8479
  const R = P[M];
8479
- N[R] && N[R].node.mode === B.mode ? (E[R][T] = g(N[R].lastCount + B.length, B.mode) - g(N[R].lastCount, B.mode), N[R].lastCount += B.length) : (N[R] && (N[R].lastCount = B.length), E[R][T] = g(B.length, B.mode) + 4 + r.getCharCountIndicator(B.mode, v));
8480
+ N[R] && N[R].node.mode === B.mode ? (S[R][T] = g(N[R].lastCount + B.length, B.mode) - g(N[R].lastCount, B.mode), N[R].lastCount += B.length) : (N[R] && (N[R].lastCount = B.length), S[R][T] = g(B.length, B.mode) + 4 + r.getCharCountIndicator(B.mode, v));
8480
8481
  }
8481
8482
  }
8482
8483
  P = L;
8483
8484
  }
8484
8485
  for (let A = 0; A < P.length; A++)
8485
- E[P[A]].end = 0;
8486
- return { map: E, table: N };
8486
+ S[P[A]].end = 0;
8487
+ return { map: S, table: N };
8487
8488
  }
8488
8489
  function y(b, v) {
8489
8490
  let N;
8490
- const E = r.getBestModeForData(b);
8491
- if (N = r.from(v, E), N !== r.BYTE && N.bit < E.bit)
8491
+ const S = r.getBestModeForData(b);
8492
+ if (N = r.from(v, S), N !== r.BYTE && N.bit < S.bit)
8492
8493
  throw new Error('"' + b + '" cannot be encoded with mode ' + r.toString(N) + `.
8493
- Suggested mode is: ` + r.toString(E));
8494
+ Suggested mode is: ` + r.toString(S));
8494
8495
  switch (N === r.KANJI && !c.isKanjiModeEnabled() && (N = r.BYTE), N) {
8495
8496
  case r.NUMERIC:
8496
8497
  return new o(b);
@@ -8503,13 +8504,13 @@ function Va() {
8503
8504
  }
8504
8505
  }
8505
8506
  t.fromArray = function(v) {
8506
- return v.reduce(function(N, E) {
8507
- return typeof E == "string" ? N.push(y(E, null)) : E.data && N.push(y(E.data, E.mode)), N;
8507
+ return v.reduce(function(N, S) {
8508
+ return typeof S == "string" ? N.push(y(S, null)) : S.data && N.push(y(S.data, S.mode)), N;
8508
8509
  }, []);
8509
8510
  }, t.fromString = function(v, N) {
8510
- const E = f(v, c.isKanjiModeEnabled()), P = p(E), A = h(P, N), S = d.find_path(A.map, "start", "end"), L = [];
8511
- for (let C = 1; C < S.length - 1; C++)
8512
- L.push(A.table[S[C]].node);
8511
+ const S = f(v, c.isKanjiModeEnabled()), P = p(S), A = h(P, N), E = d.find_path(A.map, "start", "end"), L = [];
8512
+ for (let C = 1; C < E.length - 1; C++)
8513
+ L.push(A.table[E[C]].node);
8513
8514
  return t.fromArray(w(L));
8514
8515
  }, t.rawSplit = function(v) {
8515
8516
  return t.fromArray(
@@ -8523,8 +8524,8 @@ function Ha() {
8523
8524
  if (Rr) return pt;
8524
8525
  Rr = 1;
8525
8526
  const t = ke(), r = Yt(), o = La(), a = Ma(), s = Ta(), n = Ba(), l = Ra(), c = ys(), d = Ua(), u = Fa(), m = _a(), f = Ne(), g = Va();
8526
- function w(A, S) {
8527
- const L = A.size, C = n.getPositions(S);
8527
+ function w(A, E) {
8528
+ const L = A.size, C = n.getPositions(E);
8528
8529
  for (let B = 0; B < C.length; B++) {
8529
8530
  const T = C[B][0], M = C[B][1];
8530
8531
  for (let R = -1; R <= 7; R++)
@@ -8534,14 +8535,14 @@ function Ha() {
8534
8535
  }
8535
8536
  }
8536
8537
  function p(A) {
8537
- const S = A.size;
8538
- for (let L = 8; L < S - 8; L++) {
8538
+ const E = A.size;
8539
+ for (let L = 8; L < E - 8; L++) {
8539
8540
  const C = L % 2 === 0;
8540
8541
  A.set(L, 6, C, !0), A.set(6, L, C, !0);
8541
8542
  }
8542
8543
  }
8543
- function h(A, S) {
8544
- const L = s.getPositions(S);
8544
+ function h(A, E) {
8545
+ const L = s.getPositions(E);
8545
8546
  for (let C = 0; C < L.length; C++) {
8546
8547
  const B = L[C][0], T = L[C][1];
8547
8548
  for (let M = -2; M <= 2; M++)
@@ -8549,20 +8550,20 @@ function Ha() {
8549
8550
  M === -2 || M === 2 || R === -2 || R === 2 || M === 0 && R === 0 ? A.set(B + M, T + R, !0, !0) : A.set(B + M, T + R, !1, !0);
8550
8551
  }
8551
8552
  }
8552
- function y(A, S) {
8553
- const L = A.size, C = u.getEncodedBits(S);
8553
+ function y(A, E) {
8554
+ const L = A.size, C = u.getEncodedBits(E);
8554
8555
  let B, T, M;
8555
8556
  for (let R = 0; R < 18; R++)
8556
8557
  B = Math.floor(R / 3), T = R % 3 + L - 8 - 3, M = (C >> R & 1) === 1, A.set(B, T, M, !0), A.set(T, B, M, !0);
8557
8558
  }
8558
- function b(A, S, L) {
8559
- const C = A.size, B = m.getEncodedBits(S, L);
8559
+ function b(A, E, L) {
8560
+ const C = A.size, B = m.getEncodedBits(E, L);
8560
8561
  let T, M;
8561
8562
  for (T = 0; T < 15; T++)
8562
8563
  M = (B >> T & 1) === 1, T < 6 ? A.set(T, 8, M, !0) : T < 8 ? A.set(T + 1, 8, M, !0) : A.set(C - 15 + T, 8, M, !0), T < 8 ? A.set(8, C - T - 1, M, !0) : T < 9 ? A.set(8, 15 - T - 1 + 1, M, !0) : A.set(8, 15 - T - 1, M, !0);
8563
8564
  A.set(C - 8, 8, 1, !0);
8564
8565
  }
8565
- function v(A, S) {
8566
+ function v(A, E) {
8566
8567
  const L = A.size;
8567
8568
  let C = -1, B = L - 1, T = 7, M = 0;
8568
8569
  for (let R = L - 1; R > 0; R -= 2)
@@ -8570,7 +8571,7 @@ function Ha() {
8570
8571
  for (let I = 0; I < 2; I++)
8571
8572
  if (!A.isReserved(B, R - I)) {
8572
8573
  let U = !1;
8573
- M < S.length && (U = (S[M] >>> T & 1) === 1), A.set(B, R - I, U), T--, T === -1 && (M++, T = 7);
8574
+ M < E.length && (U = (E[M] >>> T & 1) === 1), A.set(B, R - I, U), T--, T === -1 && (M++, T = 7);
8574
8575
  }
8575
8576
  if (B += C, B < 0 || L <= B) {
8576
8577
  B -= C, C = -C;
@@ -8578,21 +8579,21 @@ function Ha() {
8578
8579
  }
8579
8580
  }
8580
8581
  }
8581
- function N(A, S, L) {
8582
+ function N(A, E, L) {
8582
8583
  const C = new o();
8583
8584
  L.forEach(function(I) {
8584
8585
  C.put(I.mode.bit, 4), C.put(I.getLength(), f.getCharCountIndicator(I.mode, A)), I.write(C);
8585
8586
  });
8586
- const B = t.getSymbolTotalCodewords(A), T = c.getTotalCodewordsCount(A, S), M = (B - T) * 8;
8587
+ const B = t.getSymbolTotalCodewords(A), T = c.getTotalCodewordsCount(A, E), M = (B - T) * 8;
8587
8588
  for (C.getLengthInBits() + 4 <= M && C.put(0, 4); C.getLengthInBits() % 8 !== 0; )
8588
8589
  C.putBit(0);
8589
8590
  const R = (M - C.getLengthInBits()) / 8;
8590
8591
  for (let I = 0; I < R; I++)
8591
8592
  C.put(I % 2 ? 17 : 236, 8);
8592
- return E(C, A, S);
8593
+ return S(C, A, E);
8593
8594
  }
8594
- function E(A, S, L) {
8595
- const C = t.getSymbolTotalCodewords(S), B = c.getTotalCodewordsCount(S, L), T = C - B, M = c.getBlocksCount(S, L), R = C % M, I = M - R, U = Math.floor(C / M), ee = Math.floor(T / M), pe = ee + 1, re = U - ee, Q = new d(re);
8595
+ function S(A, E, L) {
8596
+ const C = t.getSymbolTotalCodewords(E), B = c.getTotalCodewordsCount(E, L), T = C - B, M = c.getBlocksCount(E, L), R = C % M, I = M - R, U = Math.floor(C / M), ee = Math.floor(T / M), pe = ee + 1, re = U - ee, Q = new d(re);
8596
8597
  let D = 0;
8597
8598
  const F = new Array(M), K = new Array(M);
8598
8599
  let se = 0;
@@ -8611,12 +8612,12 @@ function Ha() {
8611
8612
  ge[me++] = K[z][V];
8612
8613
  return ge;
8613
8614
  }
8614
- function P(A, S, L, C) {
8615
+ function P(A, E, L, C) {
8615
8616
  let B;
8616
8617
  if (Array.isArray(A))
8617
8618
  B = g.fromArray(A);
8618
8619
  else if (typeof A == "string") {
8619
- let U = S;
8620
+ let U = E;
8620
8621
  if (!U) {
8621
8622
  const ee = g.rawSplit(A);
8622
8623
  U = u.getBestVersionForData(ee, L);
@@ -8627,32 +8628,32 @@ function Ha() {
8627
8628
  const T = u.getBestVersionForData(B, L);
8628
8629
  if (!T)
8629
8630
  throw new Error("The amount of data is too big to be stored in a QR Code");
8630
- if (!S)
8631
- S = T;
8632
- else if (S < T)
8631
+ if (!E)
8632
+ E = T;
8633
+ else if (E < T)
8633
8634
  throw new Error(
8634
8635
  `
8635
8636
  The chosen QR Code version cannot contain this amount of data.
8636
8637
  Minimum version required to store current data is: ` + T + `.
8637
8638
  `
8638
8639
  );
8639
- const M = N(S, L, B), R = t.getSymbolSize(S), I = new a(R);
8640
- return w(I, S), p(I), h(I, S), b(I, L, 0), S >= 7 && y(I, S), v(I, M), isNaN(C) && (C = l.getBestMask(
8640
+ const M = N(E, L, B), R = t.getSymbolSize(E), I = new a(R);
8641
+ return w(I, E), p(I), h(I, E), b(I, L, 0), E >= 7 && y(I, E), v(I, M), isNaN(C) && (C = l.getBestMask(
8641
8642
  I,
8642
8643
  b.bind(null, I, L)
8643
8644
  )), l.applyMask(C, I), b(I, L, C), {
8644
8645
  modules: I,
8645
- version: S,
8646
+ version: E,
8646
8647
  errorCorrectionLevel: L,
8647
8648
  maskPattern: C,
8648
8649
  segments: B
8649
8650
  };
8650
8651
  }
8651
- return pt.create = function(S, L) {
8652
- if (typeof S > "u" || S === "")
8652
+ return pt.create = function(E, L) {
8653
+ if (typeof E > "u" || E === "")
8653
8654
  throw new Error("No input text");
8654
8655
  let C = r.M, B, T;
8655
- return typeof L < "u" && (C = r.from(L.errorCorrectionLevel, r.M), B = u.from(L.version), T = l.from(L.maskPattern), L.toSJISFunc && t.setToSJISFunction(L.toSJISFunc)), P(S, B, C, T);
8656
+ return typeof L < "u" && (C = r.from(L.errorCorrectionLevel, r.M), B = u.from(L.version), T = l.from(L.maskPattern), L.toSJISFunc && t.setToSJISFunction(L.toSJISFunc)), P(E, B, C, T);
8656
8657
  }, pt;
8657
8658
  }
8658
8659
  var Bt = {}, Rt = {}, Ir;
@@ -8849,10 +8850,10 @@ function ks() {
8849
8850
  ), w = x(async () => {
8850
8851
  u(!0), f(null);
8851
8852
  try {
8852
- const E = await g.get("/mfa/status");
8853
- return a(E), E;
8854
- } catch (E) {
8855
- const P = W(E, "Unable to load two-factor authentication status. Please try again.");
8853
+ const S = await g.get("/mfa/status");
8854
+ return a(S), S;
8855
+ } catch (S) {
8856
+ const P = W(S, "Unable to load two-factor authentication status. Please try again.");
8856
8857
  throw f(P), P;
8857
8858
  } finally {
8858
8859
  u(!1);
@@ -8860,17 +8861,17 @@ function ks() {
8860
8861
  }, [g]), p = x(async () => {
8861
8862
  u(!0), f(null), n("loading");
8862
8863
  try {
8863
- const E = await g.post("/mfa/setup", {});
8864
- return c(E), n("setup"), E;
8865
- } catch (E) {
8866
- const P = W(E, "Unable to start two-factor setup. Please try again.");
8864
+ const S = await g.post("/mfa/setup", {});
8865
+ return c(S), n("setup"), S;
8866
+ } catch (S) {
8867
+ const P = W(S, "Unable to start two-factor setup. Please try again.");
8867
8868
  throw f(P), n("error"), P;
8868
8869
  } finally {
8869
8870
  u(!1);
8870
8871
  }
8871
8872
  }, [g]), h = x(
8872
- async (E) => {
8873
- if (!/^\d{6}$/.test(E)) {
8873
+ async (S) => {
8874
+ if (!/^\d{6}$/.test(S)) {
8874
8875
  const P = {
8875
8876
  code: "VALIDATION_ERROR",
8876
8877
  message: "Please enter a 6-digit code"
@@ -8879,7 +8880,7 @@ function ks() {
8879
8880
  }
8880
8881
  u(!0), f(null), n("verifying");
8881
8882
  try {
8882
- await g.post("/mfa/enable", { code: E }), n("success");
8883
+ await g.post("/mfa/enable", { code: S }), n("success");
8883
8884
  try {
8884
8885
  const P = await g.get("/mfa/status");
8885
8886
  a(P);
@@ -8895,8 +8896,8 @@ function ks() {
8895
8896
  },
8896
8897
  [g]
8897
8898
  ), y = x(
8898
- async (E) => {
8899
- if (!E) {
8899
+ async (S) => {
8900
+ if (!S) {
8900
8901
  const P = {
8901
8902
  code: "VALIDATION_ERROR",
8902
8903
  message: "Please enter your password"
@@ -8905,7 +8906,7 @@ function ks() {
8905
8906
  }
8906
8907
  u(!0), f(null);
8907
8908
  try {
8908
- await g.post("/mfa/disable", { password: E }), a({ enabled: !1, recoveryCodesRemaining: 0 }), c(null), n("idle");
8909
+ await g.post("/mfa/disable", { password: S }), a({ enabled: !1, recoveryCodesRemaining: 0 }), c(null), n("idle");
8909
8910
  } catch (P) {
8910
8911
  const A = W(P, "Unable to disable two-factor authentication. Please try again.");
8911
8912
  throw f(A), A;
@@ -8915,8 +8916,8 @@ function ks() {
8915
8916
  },
8916
8917
  [g]
8917
8918
  ), b = x(
8918
- async (E) => {
8919
- if (!/^\d{6}$/.test(E)) {
8919
+ async (S) => {
8920
+ if (!/^\d{6}$/.test(S)) {
8920
8921
  const P = {
8921
8922
  code: "VALIDATION_ERROR",
8922
8923
  message: "Please enter a 6-digit code"
@@ -8927,7 +8928,7 @@ function ks() {
8927
8928
  try {
8928
8929
  return await g.post(
8929
8930
  "/mfa/recovery-codes/regenerate",
8930
- { code: E }
8931
+ { code: S }
8931
8932
  );
8932
8933
  } catch (P) {
8933
8934
  const A = W(P, "Unable to regenerate recovery codes. Please try again.");
@@ -8963,7 +8964,7 @@ function Ns({ onSuccess: t, onCancel: r, className: o = "" }) {
8963
8964
  }, [a, c]), _(() => {
8964
8965
  a === "success" && t?.();
8965
8966
  }, [a, t]);
8966
- const E = async () => {
8967
+ const S = async () => {
8967
8968
  s?.secret && (await navigator.clipboard.writeText(s.secret), y(!0), N.current !== null && window.clearTimeout(N.current), N.current = window.setTimeout(() => y(!1), 2e3));
8968
8969
  }, P = async () => {
8969
8970
  if (s?.recoveryCodes) {
@@ -8977,7 +8978,7 @@ function Ns({ onSuccess: t, onCancel: r, className: o = "" }) {
8977
8978
  } catch {
8978
8979
  p("");
8979
8980
  }
8980
- }, S = () => {
8981
+ }, E = () => {
8981
8982
  m(), r?.();
8982
8983
  };
8983
8984
  return _(() => () => {
@@ -8990,7 +8991,7 @@ function Ns({ onSuccess: t, onCancel: r, className: o = "" }) {
8990
8991
  {
8991
8992
  type: "button",
8992
8993
  className: "cedros-button cedros-button-outline cedros-button-md",
8993
- onClick: S,
8994
+ onClick: E,
8994
8995
  children: "Cancel"
8995
8996
  }
8996
8997
  ),
@@ -9045,7 +9046,7 @@ function Ns({ onSuccess: t, onCancel: r, className: o = "" }) {
9045
9046
  {
9046
9047
  type: "button",
9047
9048
  className: "cedros-button cedros-button-ghost cedros-button-sm",
9048
- onClick: E,
9049
+ onClick: S,
9049
9050
  "aria-label": "Copy secret",
9050
9051
  children: h ? "Copied!" : "Copy"
9051
9052
  }
@@ -9058,7 +9059,7 @@ function Ns({ onSuccess: t, onCancel: r, className: o = "" }) {
9058
9059
  {
9059
9060
  type: "button",
9060
9061
  className: "cedros-button cedros-button-outline cedros-button-md",
9061
- onClick: S,
9062
+ onClick: E,
9062
9063
  children: "Cancel"
9063
9064
  }
9064
9065
  ),
@@ -9163,7 +9164,7 @@ function Ns({ onSuccess: t, onCancel: r, className: o = "" }) {
9163
9164
  ] }) : null;
9164
9165
  }
9165
9166
  function Xa({ onStatusChange: t, className: r = "" }) {
9166
- const { status: o, isLoading: a, error: s, getStatus: n, disableTotp: l, regenerateBackupCodes: c, clearError: d } = ks(), [u, m] = k("status"), [f, g] = k(""), [w, p] = k(""), [h, y] = k(null), [b, v] = k(!1), [N, E] = k(null);
9167
+ const { status: o, isLoading: a, error: s, getStatus: n, disableTotp: l, regenerateBackupCodes: c, clearError: d } = ks(), [u, m] = k("status"), [f, g] = k(""), [w, p] = k(""), [h, y] = k(null), [b, v] = k(!1), [N, S] = k(null);
9167
9168
  _(() => {
9168
9169
  n().catch(() => {
9169
9170
  });
@@ -9171,21 +9172,21 @@ function Xa({ onStatusChange: t, className: r = "" }) {
9171
9172
  const P = x(() => {
9172
9173
  m("status"), t?.(!0);
9173
9174
  }, [t]), A = async () => {
9174
- v(!0), E(null);
9175
+ v(!0), S(null);
9175
9176
  try {
9176
9177
  await l(f), m("status"), g(""), t?.(!1);
9177
9178
  } catch (C) {
9178
- E(C instanceof Error ? C.message : "Failed to disable 2FA"), g("");
9179
+ S(C instanceof Error ? C.message : "Failed to disable 2FA"), g("");
9179
9180
  } finally {
9180
9181
  v(!1);
9181
9182
  }
9182
- }, S = async () => {
9183
- v(!0), E(null);
9183
+ }, E = async () => {
9184
+ v(!0), S(null);
9184
9185
  try {
9185
9186
  const C = await c(w);
9186
9187
  y(C.recoveryCodes), p("");
9187
9188
  } catch (C) {
9188
- E(C instanceof Error ? C.message : "Failed to regenerate codes"), p("");
9189
+ S(C instanceof Error ? C.message : "Failed to regenerate codes"), p("");
9189
9190
  } finally {
9190
9191
  v(!1);
9191
9192
  }
@@ -9211,7 +9212,7 @@ function Xa({ onStatusChange: t, className: r = "" }) {
9211
9212
  X,
9212
9213
  {
9213
9214
  error: { code: "UNKNOWN_ERROR", message: N },
9214
- onDismiss: () => E(null)
9215
+ onDismiss: () => S(null)
9215
9216
  }
9216
9217
  ) }),
9217
9218
  /* @__PURE__ */ e("div", { className: "cedros-totp-verify-input", children: /* @__PURE__ */ e(
@@ -9232,7 +9233,7 @@ function Xa({ onStatusChange: t, className: r = "" }) {
9232
9233
  type: "button",
9233
9234
  className: "cedros-button cedros-button-outline cedros-button-md",
9234
9235
  onClick: () => {
9235
- m("status"), g(""), E(null);
9236
+ m("status"), g(""), S(null);
9236
9237
  },
9237
9238
  disabled: b,
9238
9239
  children: "Cancel"
@@ -9283,7 +9284,7 @@ function Xa({ onStatusChange: t, className: r = "" }) {
9283
9284
  X,
9284
9285
  {
9285
9286
  error: { code: "UNKNOWN_ERROR", message: N },
9286
- onDismiss: () => E(null)
9287
+ onDismiss: () => S(null)
9287
9288
  }
9288
9289
  ) }),
9289
9290
  /* @__PURE__ */ e("div", { className: "cedros-totp-verify-input", children: /* @__PURE__ */ e(
@@ -9291,7 +9292,7 @@ function Xa({ onStatusChange: t, className: r = "" }) {
9291
9292
  {
9292
9293
  value: w,
9293
9294
  onChange: p,
9294
- onComplete: S,
9295
+ onComplete: E,
9295
9296
  disabled: b,
9296
9297
  autoFocus: !0
9297
9298
  }
@@ -9303,7 +9304,7 @@ function Xa({ onStatusChange: t, className: r = "" }) {
9303
9304
  type: "button",
9304
9305
  className: "cedros-button cedros-button-outline cedros-button-md",
9305
9306
  onClick: () => {
9306
- m("status"), p(""), E(null);
9307
+ m("status"), p(""), S(null);
9307
9308
  },
9308
9309
  disabled: b,
9309
9310
  children: "Cancel"
@@ -9314,7 +9315,7 @@ function Xa({ onStatusChange: t, className: r = "" }) {
9314
9315
  {
9315
9316
  type: "button",
9316
9317
  className: "cedros-button cedros-button-primary cedros-button-md",
9317
- onClick: S,
9318
+ onClick: E,
9318
9319
  disabled: b || w.length !== 6,
9319
9320
  children: b ? /* @__PURE__ */ i($, { children: [
9320
9321
  /* @__PURE__ */ e(j, { size: "sm" }),
@@ -9458,7 +9459,7 @@ function _c({
9458
9459
  onClose: r,
9459
9460
  className: o = ""
9460
9461
  }) {
9461
- const { user: a } = et(), { isLoading: s, error: n, changePassword: l, clearError: c } = st(), [d, u] = k("main"), [m, f] = k(""), [g, w] = k(""), [p, h] = k(""), [y, b] = k(null), [v, N] = k(null), E = rt(g), P = g === p, A = m.length > 0 && g.length > 0 && p.length > 0 && E.isValid && P, S = x(async () => {
9462
+ const { user: a } = et(), { isLoading: s, error: n, changePassword: l, clearError: c } = st(), [d, u] = k("main"), [m, f] = k(""), [g, w] = k(""), [p, h] = k(""), [y, b] = k(null), [v, N] = k(null), S = rt(g), P = g === p, A = m.length > 0 && g.length > 0 && p.length > 0 && S.isValid && P, E = x(async () => {
9462
9463
  if (A) {
9463
9464
  b(null), N(null);
9464
9465
  try {
@@ -9542,7 +9543,7 @@ function _c({
9542
9543
  {
9543
9544
  type: "button",
9544
9545
  className: "cedros-button cedros-button-primary cedros-button-md",
9545
- onClick: S,
9546
+ onClick: E,
9546
9547
  disabled: s || !A,
9547
9548
  children: s ? /* @__PURE__ */ i($, { children: [
9548
9549
  /* @__PURE__ */ e(j, { size: "sm" }),
@@ -9682,7 +9683,7 @@ function ti({
9682
9683
  onCancel: r,
9683
9684
  className: o = ""
9684
9685
  }) {
9685
- const { isLoading: a, error: s, changePassword: n, clearError: l } = st(), [c, d] = k(""), [u, m] = k(""), [f, g] = k(""), [w, p] = k(null), [h, y] = k(null), b = rt(u), v = u === f, N = c.length > 0 && u.length > 0 && f.length > 0 && b.isValid && v, E = x(async () => {
9686
+ const { isLoading: a, error: s, changePassword: n, clearError: l } = st(), [c, d] = k(""), [u, m] = k(""), [f, g] = k(""), [w, p] = k(null), [h, y] = k(null), b = rt(u), v = u === f, N = c.length > 0 && u.length > 0 && f.length > 0 && b.isValid && v, S = x(async () => {
9686
9687
  if (N) {
9687
9688
  p(null), y(null);
9688
9689
  try {
@@ -9761,7 +9762,7 @@ function ti({
9761
9762
  {
9762
9763
  type: "button",
9763
9764
  className: "cedros-button cedros-button-primary cedros-button-md",
9764
- onClick: E,
9765
+ onClick: S,
9765
9766
  disabled: a || !N,
9766
9767
  children: a ? /* @__PURE__ */ i($, { children: [
9767
9768
  /* @__PURE__ */ e(j, { size: "sm" }),
@@ -9778,7 +9779,7 @@ function ri({ onPasswordChange: t, className: r = "" }) {
9778
9779
  isLoading: m,
9779
9780
  isSuccess: f,
9780
9781
  reset: g
9781
- } = Qt(), w = d.some((C) => C.credentialType === "password"), [p, h] = k("view"), [y, b] = k(""), [v, N] = k(null), E = () => o?.name ? o.name.split(" ").map((C) => C[0]).join("").toUpperCase().slice(0, 2) : o?.email ? o.email[0].toUpperCase() : "?", P = x(() => {
9782
+ } = Qt(), w = d.some((C) => C.credentialType === "password"), [p, h] = k("view"), [y, b] = k(""), [v, N] = k(null), S = () => o?.name ? o.name.split(" ").map((C) => C[0]).join("").toUpperCase().slice(0, 2) : o?.email ? o.email[0].toUpperCase() : "?", P = x(() => {
9782
9783
  b(o?.name || ""), h("edit"), N(null);
9783
9784
  }, [o?.name]), A = x(async () => {
9784
9785
  const C = y.trim();
@@ -9790,7 +9791,7 @@ function ri({ onPasswordChange: t, className: r = "" }) {
9790
9791
  N(B instanceof Error ? B.message : "Failed to update name");
9791
9792
  }
9792
9793
  }
9793
- }, [y, l, a]), S = x(() => {
9794
+ }, [y, l, a]), E = x(() => {
9794
9795
  h("view"), b(""), N(null), c();
9795
9796
  }, [c]), L = x(async () => {
9796
9797
  if (o?.email) {
@@ -9818,7 +9819,7 @@ function ri({ onPasswordChange: t, className: r = "" }) {
9818
9819
  alt: o.name || "Profile",
9819
9820
  className: "cedros-profile-avatar"
9820
9821
  }
9821
- ) : /* @__PURE__ */ e("div", { className: "cedros-profile-avatar cedros-profile-avatar-fallback", children: E() }) }),
9822
+ ) : /* @__PURE__ */ e("div", { className: "cedros-profile-avatar cedros-profile-avatar-fallback", children: S() }) }),
9822
9823
  /* @__PURE__ */ i("div", { className: "cedros-profile-info", children: [
9823
9824
  p === "edit" ? /* @__PURE__ */ i("div", { className: "cedros-profile-name-edit", children: [
9824
9825
  /* @__PURE__ */ e(
@@ -9831,7 +9832,7 @@ function ri({ onPasswordChange: t, className: r = "" }) {
9831
9832
  disabled: s,
9832
9833
  autoFocus: !0,
9833
9834
  onKeyDown: (C) => {
9834
- C.key === "Enter" && A(), C.key === "Escape" && S();
9835
+ C.key === "Enter" && A(), C.key === "Escape" && E();
9835
9836
  }
9836
9837
  }
9837
9838
  ),
@@ -9851,7 +9852,7 @@ function ri({ onPasswordChange: t, className: r = "" }) {
9851
9852
  {
9852
9853
  type: "button",
9853
9854
  className: "cedros-button cedros-button-outline cedros-button-sm",
9854
- onClick: S,
9855
+ onClick: E,
9855
9856
  disabled: s,
9856
9857
  children: "Cancel"
9857
9858
  }
@@ -9999,7 +10000,7 @@ function oi({
9999
10000
  }
10000
10001
  },
10001
10002
  [d]
10002
- ), N = new Set(n.map((C) => C.credentialType)), E = t && !N.has("oauth_google"), P = r && !N.has("oauth_apple"), A = (o || g) && !N.has("webauthn_passkey"), S = a && !N.has("solana"), L = E || P || A || S;
10003
+ ), N = new Set(n.map((C) => C.credentialType)), S = t && !N.has("oauth_google"), P = r && !N.has("oauth_apple"), A = (o || g) && !N.has("webauthn_passkey"), E = a && !N.has("solana"), L = S || P || A || E;
10003
10004
  return l && n.length === 0 ? /* @__PURE__ */ i("div", { className: `cedros-linked-accounts ${s}`, children: [
10004
10005
  /* @__PURE__ */ e(j, {}),
10005
10006
  /* @__PURE__ */ e("span", { children: "Loading linked accounts..." })
@@ -10024,7 +10025,7 @@ function oi({
10024
10025
  L && /* @__PURE__ */ i("div", { className: "cedros-linked-add", children: [
10025
10026
  /* @__PURE__ */ e("p", { className: "cedros-linked-add-label", children: "Link a new sign-in method" }),
10026
10027
  /* @__PURE__ */ i("div", { className: "cedros-linked-add-buttons", children: [
10027
- E && /* @__PURE__ */ i(
10028
+ S && /* @__PURE__ */ i(
10028
10029
  "button",
10029
10030
  {
10030
10031
  type: "button",
@@ -10061,7 +10062,7 @@ function oi({
10061
10062
  ] })
10062
10063
  }
10063
10064
  ),
10064
- S && /* @__PURE__ */ i(
10065
+ E && /* @__PURE__ */ i(
10065
10066
  "button",
10066
10067
  {
10067
10068
  type: "button",
@@ -10873,9 +10874,9 @@ function jc({
10873
10874
  tokenPriceUsd: b,
10874
10875
  showExplainer: v = !1,
10875
10876
  siteName: N,
10876
- explainerConfig: E
10877
+ explainerConfig: S
10877
10878
  }) {
10878
- const { deposit: P, getStatus: A, error: S, clearError: L } = fi(), C = tt(), B = Or(t.quickActionTokens), T = Or(t.customTokenSymbols), M = q(() => {
10879
+ const { deposit: P, getStatus: A, error: E, clearError: L } = fi(), C = tt(), B = Or(t.quickActionTokens), T = Or(t.customTokenSymbols), M = q(() => {
10879
10880
  const O = t.customTokens ?? [];
10880
10881
  if (O.length === 0) return a;
10881
10882
  const H = new Set(a.map((Z) => Z.symbol)), Y = [...a];
@@ -11111,7 +11112,7 @@ function jc({
11111
11112
  Si,
11112
11113
  {
11113
11114
  siteName: N,
11114
- config: E,
11115
+ config: S,
11115
11116
  depositConfig: t,
11116
11117
  currencyMode: r,
11117
11118
  token: F,
@@ -11194,7 +11195,7 @@ function jc({
11194
11195
  Q === "error" && /* @__PURE__ */ e(
11195
11196
  Ri,
11196
11197
  {
11197
- error: V || S || "An error occurred",
11198
+ error: V || E || "An error occurred",
11198
11199
  onRetry: () => D("confirm"),
11199
11200
  onCancel: u
11200
11201
  }
@@ -11348,7 +11349,7 @@ function Pi({
11348
11349
  onConfirm: y,
11349
11350
  onBack: b
11350
11351
  }) {
11351
- const [v, N] = k(g.privateMinUsd), [E, P] = k(!1), [A, S] = k(!1), [L, C] = k(0), [B, T] = k(null), R = $t(v, g) === "sol_micro", I = t.symbol === xe.symbol, U = q(() => {
11352
+ const [v, N] = k(g.privateMinUsd), [S, P] = k(!1), [A, E] = k(!1), [L, C] = k(0), [B, T] = k(null), R = $t(v, g) === "sol_micro", I = t.symbol === xe.symbol, U = q(() => {
11352
11353
  const V = a.length === 0 ? r : r.filter((de) => a.includes(de.symbol)), z = V.length > 0 ? V : r;
11353
11354
  return z.some((de) => de.symbol === xe.symbol) ? z : [...z, xe];
11354
11355
  }, [r, a]), ee = ot(g, v), pe = ee < 0.01 ? 0.01 : ee, re = I ? "Fees: calculated after deposit" : `Fees: $${pe.toFixed(2)} total`, Q = I ? "" : Is(g, v, ee), D = Fs(R ? Se : t, g), F = D ? v / D : t.symbol === "SOL" && g.solPriceUsd > 0 ? v / g.solPriceUsd : v, K = F ? _s(F, R ? "SOL" : t.symbol) : null, ne = v - ee <= 0 && v > 0, ge = !I && v > 0 && !ne && F >= n && F <= l;
@@ -11399,7 +11400,7 @@ function Pi({
11399
11400
  "button",
11400
11401
  {
11401
11402
  type: "button",
11402
- className: `cedros-deposit-flow-token-quick-btn ${E ? "is-active" : ""}`,
11403
+ className: `cedros-deposit-flow-token-quick-btn ${S ? "is-active" : ""}`,
11403
11404
  onClick: () => {
11404
11405
  P(!0), C((V) => V + 1);
11405
11406
  },
@@ -11407,7 +11408,7 @@ function Pi({
11407
11408
  }
11408
11409
  )
11409
11410
  ] }),
11410
- E && /* @__PURE__ */ e("div", { className: "cedros-deposit-flow-token-custom", children: /* @__PURE__ */ e(
11411
+ S && /* @__PURE__ */ e("div", { className: "cedros-deposit-flow-token-custom", children: /* @__PURE__ */ e(
11411
11412
  Ls,
11412
11413
  {
11413
11414
  tokens: U,
@@ -11477,11 +11478,11 @@ function Pi({
11477
11478
  `, ", ")}`,
11478
11479
  "aria-expanded": A,
11479
11480
  onClick: (V) => {
11480
- V.stopPropagation(), S((z) => !z);
11481
+ V.stopPropagation(), E((z) => !z);
11481
11482
  },
11482
- onBlur: () => S(!1),
11483
+ onBlur: () => E(!1),
11483
11484
  onKeyDown: (V) => {
11484
- V.key === "Escape" && S(!1);
11485
+ V.key === "Escape" && E(!1);
11485
11486
  },
11486
11487
  children: "i"
11487
11488
  }
@@ -11562,7 +11563,7 @@ function Mi({
11562
11563
  onSent: w,
11563
11564
  onBack: p
11564
11565
  }) {
11565
- const [h, y] = k(u.privateMinUsd), [b, v] = k(!1), [N, E] = k(!1), [P, A] = k(0), [S, L] = k(null), B = $t(h, u) === "sol_micro", T = t.symbol === xe.symbol, M = q(() => {
11566
+ const [h, y] = k(u.privateMinUsd), [b, v] = k(!1), [N, S] = k(!1), [P, A] = k(0), [E, L] = k(null), B = $t(h, u) === "sol_micro", T = t.symbol === xe.symbol, M = q(() => {
11566
11567
  const F = a.length === 0 ? r : r.filter((ne) => a.includes(ne.symbol)), K = F.length > 0 ? F : r;
11567
11568
  return K.some((ne) => ne.symbol === xe.symbol) ? K : [...K, xe];
11568
11569
  }, [r, a]), R = ot(u, h), I = R < 0.01 ? 0.01 : R, U = T ? "Fees: calculated after deposit" : `Fees: $${I.toFixed(2)} total`, ee = T ? "" : Is(u, h, R), pe = T || h > 0, re = Fs(B ? Se : t, u, s), Q = re ? h / re : null, D = Q ? _s(Q, t.symbol) : null;
@@ -11572,8 +11573,8 @@ function Mi({
11572
11573
  L(t);
11573
11574
  const F = r.find((K) => K.symbol === "SOL");
11574
11575
  F && f(F);
11575
- } else !B && S && t.symbol === "SOL" && (f(S), L(null));
11576
- }, [B, t.symbol, n, r, f, S, t]), _(() => {
11576
+ } else !B && E && t.symbol === "SOL" && (f(E), L(null));
11577
+ }, [B, t.symbol, n, r, f, E, t]), _(() => {
11577
11578
  g(h);
11578
11579
  }, [h, g]), l ? /* @__PURE__ */ i("div", { className: "cedros-deposit-flow-step", children: [
11579
11580
  /* @__PURE__ */ e("h4", { className: "cedros-deposit-flow-step-title", children: "Send Deposit" }),
@@ -11678,11 +11679,11 @@ function Mi({
11678
11679
  `, ", ")}`,
11679
11680
  "aria-expanded": N,
11680
11681
  onClick: (F) => {
11681
- F.stopPropagation(), E((K) => !K);
11682
+ F.stopPropagation(), S((K) => !K);
11682
11683
  },
11683
- onBlur: () => E(!1),
11684
+ onBlur: () => S(!1),
11684
11685
  onKeyDown: (F) => {
11685
- F.key === "Escape" && E(!1);
11686
+ F.key === "Escape" && S(!1);
11686
11687
  },
11687
11688
  children: "i"
11688
11689
  }
@@ -12157,10 +12158,10 @@ function Vc({
12157
12158
  onLoad: s,
12158
12159
  onTransactionClick: n
12159
12160
  }) {
12160
- const { getHistory: l, isLoading: c, error: d, clearError: u } = Ws(), [m, f] = k(t), [g, w] = k([]), [p, h] = k(0), [y, b] = k(0), [v, N] = k(null), E = Dt.find((M) => M.key === m) || Dt[0], P = q(() => E.txTypes === null ? g : g.filter((M) => {
12161
+ const { getHistory: l, isLoading: c, error: d, clearError: u } = Ws(), [m, f] = k(t), [g, w] = k([]), [p, h] = k(0), [y, b] = k(0), [v, N] = k(null), S = Dt.find((M) => M.key === m) || Dt[0], P = q(() => S.txTypes === null ? g : g.filter((M) => {
12161
12162
  const R = M.txType || "";
12162
- return E.txTypes.some((I) => R.toLowerCase().includes(I.toLowerCase()));
12163
- }), [g, E.txTypes]), A = x(async () => {
12163
+ return S.txTypes.some((I) => R.toLowerCase().includes(I.toLowerCase()));
12164
+ }), [g, S.txTypes]), A = x(async () => {
12164
12165
  try {
12165
12166
  const M = await l({ limit: r * 3, offset: y });
12166
12167
  w(M.transactions), h(M.total), s?.(M), N(null);
@@ -12177,7 +12178,7 @@ function Vc({
12177
12178
  const M = setInterval(A, o);
12178
12179
  return () => clearInterval(M);
12179
12180
  }, [o, A]);
12180
- const S = Math.ceil(p / r), L = Math.floor(y / r) + 1, C = (M) => {
12181
+ const E = Math.ceil(p / r), L = Math.floor(y / r) + 1, C = (M) => {
12181
12182
  const R = (M - 1) * r;
12182
12183
  b(Math.max(0, Math.min(R, Math.max(0, p - 1))));
12183
12184
  }, B = (M) => {
@@ -12239,7 +12240,7 @@ function Vc({
12239
12240
  );
12240
12241
  }) }),
12241
12242
  P.length === 0 ? /* @__PURE__ */ i("div", { className: "cedros-tx-empty", children: [
12242
- /* @__PURE__ */ e("p", { className: "cedros-tx-empty-message", children: m === "all" ? "No transactions yet." : `No ${E.label.toLowerCase()} found.` }),
12243
+ /* @__PURE__ */ e("p", { className: "cedros-tx-empty-message", children: m === "all" ? "No transactions yet." : `No ${S.label.toLowerCase()} found.` }),
12243
12244
  m === "all" && /* @__PURE__ */ e("p", { className: "cedros-tx-empty-hint", children: "Make a deposit to get started." })
12244
12245
  ] }) : /* @__PURE__ */ i($, { children: [
12245
12246
  /* @__PURE__ */ e("div", { className: "cedros-tx-list", children: P.slice(0, r).map((M) => {
@@ -12283,7 +12284,7 @@ function Vc({
12283
12284
  M.id
12284
12285
  );
12285
12286
  }) }),
12286
- S > 1 && /* @__PURE__ */ i("div", { className: "cedros-tx-pagination", children: [
12287
+ E > 1 && /* @__PURE__ */ i("div", { className: "cedros-tx-pagination", children: [
12287
12288
  /* @__PURE__ */ e(
12288
12289
  "button",
12289
12290
  {
@@ -12298,7 +12299,7 @@ function Vc({
12298
12299
  "Page ",
12299
12300
  L,
12300
12301
  " of ",
12301
- S
12302
+ E
12302
12303
  ] }),
12303
12304
  /* @__PURE__ */ e(
12304
12305
  "button",
@@ -12306,7 +12307,7 @@ function Vc({
12306
12307
  type: "button",
12307
12308
  className: "cedros-tx-page-btn",
12308
12309
  onClick: () => C(L + 1),
12309
- disabled: L >= S,
12310
+ disabled: L >= E,
12310
12311
  children: "Next"
12311
12312
  }
12312
12313
  )
@@ -12429,7 +12430,7 @@ function Hc({
12429
12430
  onCancel: o,
12430
12431
  className: a = ""
12431
12432
  }) {
12432
- const s = ve(), { withdrawSol: n, withdrawSpl: l, getBalances: c, isSubmitting: d, error: u, clearError: m } = Os(), [f, g] = k("loading"), [w, p] = k([]), [h, y] = k(null), [b, v] = k(""), [N, E] = k(""), [P, A] = k(null), [S, L] = k(null), [C, B] = k(null), T = s?.config.solana?.network ?? "mainnet-beta", M = q(() => {
12433
+ const s = ve(), { withdrawSol: n, withdrawSpl: l, getBalances: c, isSubmitting: d, error: u, clearError: m } = Os(), [f, g] = k("loading"), [w, p] = k([]), [h, y] = k(null), [b, v] = k(""), [N, S] = k(""), [P, A] = k(null), [E, L] = k(null), [C, B] = k(null), T = s?.config.solana?.network ?? "mainnet-beta", M = q(() => {
12433
12434
  if (!P?.txSignature) return "";
12434
12435
  const D = `https://explorer.solana.com/tx/${P.txSignature}`;
12435
12436
  return T === "mainnet-beta" ? D : `${D}?cluster=${encodeURIComponent(T)}`;
@@ -12473,13 +12474,13 @@ function Hc({
12473
12474
  }, [s, c]);
12474
12475
  const I = x(
12475
12476
  (D) => {
12476
- y(D), g("form"), m(), L(null), E("");
12477
+ y(D), g("form"), m(), L(null), S("");
12477
12478
  },
12478
12479
  [m]
12479
12480
  ), U = x(() => {
12480
12481
  if (!h) return;
12481
12482
  const D = Number(h.rawBalance) / Math.pow(10, h.decimals);
12482
- h.mint === Ut ? E(String(Math.max(0, D - 0.01))) : E(String(D));
12483
+ h.mint === Ut ? S(String(Math.max(0, D - 0.01))) : S(String(D));
12483
12484
  }, [h]), ee = x(() => {
12484
12485
  if (L(null), !b.trim()) {
12485
12486
  L("Destination address is required");
@@ -12518,9 +12519,9 @@ function Hc({
12518
12519
  t,
12519
12520
  r
12520
12521
  ]), re = x(() => {
12521
- m(), L(null), f === "form" ? (g("select"), y(null), E(""), v("")) : f === "confirm" && g("form");
12522
+ m(), L(null), f === "form" ? (g("select"), y(null), S(""), v("")) : f === "confirm" && g("form");
12522
12523
  }, [f, m]), Q = x(() => {
12523
- g("select"), y(null), v(""), E(""), A(null), m(), L(null);
12524
+ g("select"), y(null), v(""), S(""), A(null), m(), L(null);
12524
12525
  }, [m]);
12525
12526
  return s ? /* @__PURE__ */ i("div", { className: `cedros-withdrawal ${a}`, children: [
12526
12527
  f === "loading" && /* @__PURE__ */ i("div", { className: "cedros-withdrawal-processing", children: [
@@ -12610,7 +12611,7 @@ function Hc({
12610
12611
  className: "cedros-input",
12611
12612
  placeholder: "0.00",
12612
12613
  value: N,
12613
- onChange: (D) => E(D.target.value),
12614
+ onChange: (D) => S(D.target.value),
12614
12615
  min: "0",
12615
12616
  step: "any"
12616
12617
  }
@@ -12626,7 +12627,7 @@ function Hc({
12626
12627
  )
12627
12628
  ] })
12628
12629
  ] }),
12629
- (S || u) && /* @__PURE__ */ e(X, { error: S || u || "" }),
12630
+ (E || u) && /* @__PURE__ */ e(X, { error: E || u || "" }),
12630
12631
  /* @__PURE__ */ e(
12631
12632
  "button",
12632
12633
  {
@@ -12785,7 +12786,7 @@ function Qc({
12785
12786
  _(() => {
12786
12787
  b();
12787
12788
  }, [b]);
12788
- const v = Math.ceil(u / t), N = Math.floor(f / t) + 1, E = (P) => {
12789
+ const v = Math.ceil(u / t), N = Math.floor(f / t) + 1, S = (P) => {
12789
12790
  const A = (P - 1) * t;
12790
12791
  g(Math.max(0, Math.min(A, Math.max(0, u - 1))));
12791
12792
  };
@@ -12828,8 +12829,8 @@ function Qc({
12828
12829
  {
12829
12830
  className: "cedros-tx-item cedros-tx-item-negative",
12830
12831
  onClick: () => o?.(P),
12831
- onKeyDown: (S) => {
12832
- (S.key === "Enter" || S.key === " ") && (S.preventDefault(), o?.(P));
12832
+ onKeyDown: (E) => {
12833
+ (E.key === "Enter" || E.key === " ") && (E.preventDefault(), o?.(P));
12833
12834
  },
12834
12835
  role: o ? "button" : void 0,
12835
12836
  tabIndex: o ? 0 : void 0,
@@ -12857,7 +12858,7 @@ function Qc({
12857
12858
  href: `${a}/account/${P.destination}`,
12858
12859
  target: "_blank",
12859
12860
  rel: "noopener noreferrer",
12860
- onClick: (S) => S.stopPropagation(),
12861
+ onClick: (E) => E.stopPropagation(),
12861
12862
  children: Ji(P.destination)
12862
12863
  }
12863
12864
  ),
@@ -12868,7 +12869,7 @@ function Qc({
12868
12869
  href: `${a}/tx/${P.txSignature}`,
12869
12870
  target: "_blank",
12870
12871
  rel: "noopener noreferrer",
12871
- onClick: (S) => S.stopPropagation(),
12872
+ onClick: (E) => E.stopPropagation(),
12872
12873
  children: "tx"
12873
12874
  }
12874
12875
  )
@@ -12887,7 +12888,7 @@ function Qc({
12887
12888
  {
12888
12889
  type: "button",
12889
12890
  className: "cedros-tx-page-btn",
12890
- onClick: () => E(N - 1),
12891
+ onClick: () => S(N - 1),
12891
12892
  disabled: N <= 1,
12892
12893
  children: "Previous"
12893
12894
  }
@@ -12903,7 +12904,7 @@ function Qc({
12903
12904
  {
12904
12905
  type: "button",
12905
12906
  className: "cedros-tx-page-btn",
12906
- onClick: () => E(N + 1),
12907
+ onClick: () => S(N + 1),
12907
12908
  disabled: N >= v,
12908
12909
  children: "Next"
12909
12910
  }