@fluid-app/fluid-cli-theme-dev 0.1.845 → 0.1.846

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.
Files changed (80) hide show
  1. package/dist/dist-cli-preview/.vite/manifest.json +56 -56
  2. package/dist/dist-cli-preview/account-screens.js +1 -1
  3. package/dist/dist-cli-preview/chunks/{MediaScreen-OktVRY5X.js → MediaScreen-B7XgA_e_.js} +1 -1
  4. package/dist/dist-cli-preview/chunks/{MemberShareablesScreen-CgDf5URo.js → MemberShareablesScreen-fPF5ztRI.js} +1 -1
  5. package/dist/dist-cli-preview/chunks/{PlaylistsScreen-BpbJQRG3.js → PlaylistsScreen-BfNHn6Uo.js} +1 -1
  6. package/dist/dist-cli-preview/chunks/{ProfileScreen-Db7X__eT.js → ProfileScreen-DXNwxar6.js} +1 -1
  7. package/dist/dist-cli-preview/chunks/{SubscriptionsScreen-DWdfrxIk.js → SubscriptionsScreen-Bx5xmXVW.js} +1 -1
  8. package/dist/dist-cli-preview/chunks/ar-BEzME6fe.js +917 -0
  9. package/dist/dist-cli-preview/chunks/bg-BH8ZSqUX.js +911 -0
  10. package/dist/dist-cli-preview/chunks/bn-DtDJ6TZx.js +911 -0
  11. package/dist/dist-cli-preview/chunks/{cli-preview-CCjTBx69.js → cli-preview-CuOsDTeY.js} +5 -5
  12. package/dist/dist-cli-preview/chunks/{create-card-entry-container-BCfXyeFG.js → create-card-entry-container-BUKIZjiP.js} +999 -997
  13. package/dist/dist-cli-preview/chunks/cs-Cnh23N0Q.js +913 -0
  14. package/dist/dist-cli-preview/chunks/da-BkFlENrm.js +911 -0
  15. package/dist/dist-cli-preview/chunks/de-CXbxjpqk.js +911 -0
  16. package/dist/dist-cli-preview/chunks/el-D0HrgcCq.js +911 -0
  17. package/dist/dist-cli-preview/chunks/es-DCUL4uMv.js +911 -0
  18. package/dist/dist-cli-preview/chunks/fi-CHdIuHZ7.js +911 -0
  19. package/dist/dist-cli-preview/chunks/fr-f1nsQ8CJ.js +911 -0
  20. package/dist/dist-cli-preview/chunks/he-CTQSWuhd.js +913 -0
  21. package/dist/dist-cli-preview/chunks/hi-Cbc4sngc.js +911 -0
  22. package/dist/dist-cli-preview/chunks/hr-gmnEby65.js +913 -0
  23. package/dist/dist-cli-preview/chunks/hu-CYbJhMFr.js +911 -0
  24. package/dist/dist-cli-preview/chunks/id-sJevBl7H.js +911 -0
  25. package/dist/dist-cli-preview/chunks/it-CN9jBl_o.js +911 -0
  26. package/dist/dist-cli-preview/chunks/ja-murQgegy.js +911 -0
  27. package/dist/dist-cli-preview/chunks/ko-DwAvoUMI.js +911 -0
  28. package/dist/dist-cli-preview/chunks/{mount-account-screen-C8xJxwHo.js → mount-account-screen-DBYUXnXw.js} +2 -2
  29. package/dist/dist-cli-preview/chunks/ms-CReSPLVF.js +911 -0
  30. package/dist/dist-cli-preview/chunks/{navigate-account-screen-CObpzljY.js → navigate-account-screen-yYftMA5R.js} +1 -1
  31. package/dist/dist-cli-preview/chunks/nl-DqZXUUj7.js +911 -0
  32. package/dist/dist-cli-preview/chunks/no-CkOJoOje.js +911 -0
  33. package/dist/dist-cli-preview/chunks/pl-Cgn6JU9e.js +915 -0
  34. package/dist/dist-cli-preview/chunks/pt-DGK1Owr_.js +911 -0
  35. package/dist/dist-cli-preview/chunks/ro-fNB65Q5C.js +911 -0
  36. package/dist/dist-cli-preview/chunks/ru-B_6QET6M.js +915 -0
  37. package/dist/dist-cli-preview/chunks/sk-Dp8unwXq.js +913 -0
  38. package/dist/dist-cli-preview/chunks/sv-BzcwdZZ-.js +911 -0
  39. package/dist/dist-cli-preview/chunks/th-ES1aYgaU.js +911 -0
  40. package/dist/dist-cli-preview/chunks/tl-CmEY-mla.js +911 -0
  41. package/dist/dist-cli-preview/chunks/tr-CgGyOVOg.js +911 -0
  42. package/dist/dist-cli-preview/chunks/uk-2HuaXPmF.js +915 -0
  43. package/dist/dist-cli-preview/chunks/vi-BCRRbQTG.js +911 -0
  44. package/dist/dist-cli-preview/chunks/zh_CN-DravPRSW.js +911 -0
  45. package/dist/dist-cli-preview/chunks/zh_TW-C4OAorfd.js +911 -0
  46. package/package.json +2 -2
  47. package/dist/dist-cli-preview/chunks/ar-B38JwP1Q.js +0 -915
  48. package/dist/dist-cli-preview/chunks/bg-D2-Dxyho.js +0 -909
  49. package/dist/dist-cli-preview/chunks/bn-RV1lUDS4.js +0 -909
  50. package/dist/dist-cli-preview/chunks/cs-_pqEX0vR.js +0 -911
  51. package/dist/dist-cli-preview/chunks/da-CmdC3qAz.js +0 -909
  52. package/dist/dist-cli-preview/chunks/de-CZa8AamX.js +0 -909
  53. package/dist/dist-cli-preview/chunks/el-DX8bI8nT.js +0 -909
  54. package/dist/dist-cli-preview/chunks/es-BgU-HQ7D.js +0 -909
  55. package/dist/dist-cli-preview/chunks/fi-CoefTRQx.js +0 -909
  56. package/dist/dist-cli-preview/chunks/fr-BrO75FSP.js +0 -909
  57. package/dist/dist-cli-preview/chunks/he-ypPgeNk0.js +0 -911
  58. package/dist/dist-cli-preview/chunks/hi-BPJxfecJ.js +0 -909
  59. package/dist/dist-cli-preview/chunks/hr-6uSkEE3o.js +0 -911
  60. package/dist/dist-cli-preview/chunks/hu-CvzXfr0I.js +0 -909
  61. package/dist/dist-cli-preview/chunks/id-rkKtZ8bk.js +0 -909
  62. package/dist/dist-cli-preview/chunks/it-No4oD9aM.js +0 -909
  63. package/dist/dist-cli-preview/chunks/ja-DXgYDhlx.js +0 -909
  64. package/dist/dist-cli-preview/chunks/ko-C8afRgfd.js +0 -909
  65. package/dist/dist-cli-preview/chunks/ms-B7RG6ICM.js +0 -909
  66. package/dist/dist-cli-preview/chunks/nl-BQj59rtg.js +0 -909
  67. package/dist/dist-cli-preview/chunks/no-Der6oMFk.js +0 -909
  68. package/dist/dist-cli-preview/chunks/pl-BUsBvD4D.js +0 -913
  69. package/dist/dist-cli-preview/chunks/pt-WiiCDQ-t.js +0 -909
  70. package/dist/dist-cli-preview/chunks/ro-B0G8KWRk.js +0 -909
  71. package/dist/dist-cli-preview/chunks/ru-CChSc7YS.js +0 -913
  72. package/dist/dist-cli-preview/chunks/sk-Bsl8JShF.js +0 -911
  73. package/dist/dist-cli-preview/chunks/sv-bV_XmfL8.js +0 -909
  74. package/dist/dist-cli-preview/chunks/th-BQF1j8NM.js +0 -909
  75. package/dist/dist-cli-preview/chunks/tl-B4gzymDl.js +0 -909
  76. package/dist/dist-cli-preview/chunks/tr-CsPvkMxO.js +0 -909
  77. package/dist/dist-cli-preview/chunks/uk-CQb2GOug.js +0 -913
  78. package/dist/dist-cli-preview/chunks/vi-BNGblIIf.js +0 -909
  79. package/dist/dist-cli-preview/chunks/zh_CN-sTRogX90.js +0 -909
  80. package/dist/dist-cli-preview/chunks/zh_TW-C_dDvIXT.js +0 -909
@@ -1,20 +1,20 @@
1
1
  var eo = Object.defineProperty;
2
2
  var to = (e, n, t) => n in e ? eo(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
3
- var q = (e, n, t) => to(e, typeof n != "symbol" ? n + "" : n, t);
4
- import { c as rt, l as m, H as Pt, as as no, j as i, G as ro, J as tn, O as Qn, K as dt, al as ot, am as lo, at as ao, au as mi, av as mt, aw as tt, ax as io, ay as so, az as oo, aA as co, aB as zr, aC as hi, aD as uo, aE as mo, aF as nn, aG as fi, aH as ho, aI as jl, aJ as fo, aK as Pl, aL as po, X as ie, _ as ze, n as vo, Y as Ae, a6 as pi, aM as go, aj as Xn, $ as Z, an as rn, a7 as ve, aN as vi, aO as $t, aP as xo, Z as l, a1 as gi, aQ as yo, aR as _o, aS as bo, aT as wo, B as xi, ak as yi, ar as $e, ap as el, aU as at, P as _i, aV as bi, aW as wi, aX as Eo, a3 as $o, a2 as Fo, aY as Ei, aZ as Co, a_ as zo, a$ as Mo, ah as No } from "./account-screen-runtime-B9i-9CLs.js";
3
+ var V = (e, n, t) => to(e, typeof n != "symbol" ? n + "" : n, t);
4
+ import { c as rt, l as m, H as Pt, as as no, j as i, G as ro, J as tn, O as Qn, K as dt, al as ct, am as lo, at as ao, au as mi, av as mt, aw as tt, ax as io, ay as so, az as oo, aA as co, aB as zr, aC as hi, aD as uo, aE as mo, aF as nn, aG as fi, aH as ho, aI as jl, aJ as fo, aK as Pl, aL as po, X as ie, _ as ze, n as vo, Y as Ae, a6 as pi, aM as go, aj as Xn, $ as X, an as rn, a7 as ve, aN as vi, aO as $t, aP as xo, Z as l, a1 as gi, aQ as yo, aR as _o, aS as bo, aT as wo, B as xi, ak as yi, ar as $e, ap as el, aU as it, P as _i, aV as bi, aW as wi, aX as Eo, a3 as $o, a2 as Fo, aY as Ei, aZ as Co, a_ as zo, a$ as Mo, ah as No } from "./account-screen-runtime-B9i-9CLs.js";
5
5
  import { u as $i } from "./PortalTenantClientProvider-CpIpKQVv.js";
6
6
  import { k as Fi, l as So, m as jo, n as Po, o as Ao, q as Do, r as Ho, t as ko, u as To, v as Io, w as Oo, x as Lo, y as Bo, z as Ro } from "./hey-api-client-EAWr0fT_.js";
7
7
  import { a as Vo, c as qo, b as Uo, u as Go } from "./translation-api-context-factory-BEO-iYLb.js";
8
8
  import { u as fe, C as Ft, f as tl, o as Ct, d as It, s as me, g as Wo, n as xn } from "./schemas-CZvv_5iX.js";
9
9
  import { I as ln, B as Ci, a as zi, b as Mr, c as Mi, S as ue, d as Ko, e as Yo } from "./sheet-haptics-context-COwdGTra.js";
10
- import { u as it, r as zn, p as Zn, d as Qo, n as Mn, i as Nn, e as Sn, I as Jn, R as Ni, b as an, P as er, g as Xo } from "./MemberManagementProviders-Bln-Y7uX.js";
10
+ import { u as st, r as zn, p as Zn, d as Qo, n as Mn, i as Nn, e as Sn, I as Jn, R as Ni, b as an, P as er, g as Xo } from "./MemberManagementProviders-Bln-Y7uX.js";
11
11
  import { u as Zo } from "./useInfiniteQuery-Dw0mdxuD.js";
12
12
  import { u as nl } from "./countries-api-adapter-c75511Cl.js";
13
13
  import { E as Al, D as Si, a as ji, b as Pi, c as kt, i as Dl, P as tr, g as nr, h as rr, j as Hl, M as Jo } from "./MobileActionSheet-rTSxp-qM.js";
14
14
  import { u as ht, a as Ai } from "./sidebar-SmEnwFoV.js";
15
15
  import { M as rl, f as kl, T as jn, R as Te, e as Ke, D as ll, a as al, b as il, i as Di, c as Hi, P as ec } from "./ResponsiveDialog-CRjYPJDy.js";
16
16
  import { T as ki, C as lr, a as Ti, P as Ii, b as tc, M as nc, B as rc } from "./Textarea-DpGnk7nw.js";
17
- import { P as H, u as lc } from "./use-store-CXu_fhao.js";
17
+ import { P as k, u as lc } from "./use-store-CXu_fhao.js";
18
18
  import { S as sn, e as on, f as cn, g as dn, h as un, d as Oi } from "./Select-V9j-VL4o.js";
19
19
  import { C as ac, a as ic, b as sc, c as oc, d as cc, e as dc, f as uc, g as Li, h as mc } from "./Combobox-DN6uDwMf.js";
20
20
  import { u as hc } from "./use-optional-store-DopS-Jc8.js";
@@ -142,7 +142,7 @@ var sl = "ScrollArea", [Ri] = ro(sl), [jc, Ie] = Ri(sl), Vi = m.forwardRef(
142
142
  dir: a,
143
143
  scrollHideDelay: s = 600,
144
144
  ...o
145
- } = e, [c, d] = m.useState(null), [u, h] = m.useState(null), [p, x] = m.useState(null), [_, b] = m.useState(null), [f, v] = m.useState(null), [w, E] = m.useState(0), [C, z] = m.useState(0), [$, M] = m.useState(!1), [F, S] = m.useState(!1), A = Pt(n, (k) => d(k)), j = no(a);
145
+ } = e, [c, d] = m.useState(null), [u, h] = m.useState(null), [p, x] = m.useState(null), [_, b] = m.useState(null), [f, v] = m.useState(null), [w, E] = m.useState(0), [C, z] = m.useState(0), [$, M] = m.useState(!1), [F, S] = m.useState(!1), D = Pt(n, (T) => d(T)), j = no(a);
146
146
  return /* @__PURE__ */ i.jsx(
147
147
  jc,
148
148
  {
@@ -170,7 +170,7 @@ var sl = "ScrollArea", [Ri] = ro(sl), [jc, Ie] = Ri(sl), Vi = m.forwardRef(
170
170
  {
171
171
  dir: j,
172
172
  ...o,
173
- ref: A,
173
+ ref: D,
174
174
  style: {
175
175
  position: "relative",
176
176
  // Pass corner sizes as CSS vars to reduce re-renders of context consumers
@@ -464,42 +464,42 @@ var Pc = m.forwardRef((e, n) => {
464
464
  onWheelScroll: h,
465
465
  onResize: p,
466
466
  ...x
467
- } = e, _ = Ie(Ye, t), [b, f] = m.useState(null), v = Pt(n, (A) => f(A)), w = m.useRef(null), E = m.useRef(""), C = _.viewport, z = r.content - r.viewport, $ = ot(h), M = ot(d), F = ir(p, 10);
468
- function S(A) {
467
+ } = e, _ = Ie(Ye, t), [b, f] = m.useState(null), v = Pt(n, (D) => f(D)), w = m.useRef(null), E = m.useRef(""), C = _.viewport, z = r.content - r.viewport, $ = ct(h), M = ct(d), F = ir(p, 10);
468
+ function S(D) {
469
469
  if (w.current) {
470
- const j = A.clientX - w.current.left, k = A.clientY - w.current.top;
471
- u({ x: j, y: k });
470
+ const j = D.clientX - w.current.left, T = D.clientY - w.current.top;
471
+ u({ x: j, y: T });
472
472
  }
473
473
  }
474
474
  return m.useEffect(() => {
475
- const A = (j) => {
476
- const k = j.target;
477
- b?.contains(k) && $(j, z);
475
+ const D = (j) => {
476
+ const T = j.target;
477
+ b?.contains(T) && $(j, z);
478
478
  };
479
- return document.addEventListener("wheel", A, { passive: !1 }), () => document.removeEventListener("wheel", A, { passive: !1 });
479
+ return document.addEventListener("wheel", D, { passive: !1 }), () => document.removeEventListener("wheel", D, { passive: !1 });
480
480
  }, [C, b, z, $]), m.useEffect(M, [r, M]), zt(b, F), zt(_.content, F), /* @__PURE__ */ i.jsx(
481
481
  kc,
482
482
  {
483
483
  scope: t,
484
484
  scrollbar: b,
485
485
  hasThumb: a,
486
- onThumbChange: ot(s),
487
- onThumbPointerUp: ot(o),
486
+ onThumbChange: ct(s),
487
+ onThumbPointerUp: ct(o),
488
488
  onThumbPositionChange: M,
489
- onThumbPointerDown: ot(c),
489
+ onThumbPointerDown: ct(c),
490
490
  children: /* @__PURE__ */ i.jsx(
491
491
  tn.div,
492
492
  {
493
493
  ...x,
494
494
  ref: v,
495
495
  style: { position: "absolute", ...x.style },
496
- onPointerDown: dt(e.onPointerDown, (A) => {
497
- A.button === 0 && (A.target.setPointerCapture(A.pointerId), w.current = b.getBoundingClientRect(), E.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", _.viewport && (_.viewport.style.scrollBehavior = "auto"), S(A));
496
+ onPointerDown: dt(e.onPointerDown, (D) => {
497
+ D.button === 0 && (D.target.setPointerCapture(D.pointerId), w.current = b.getBoundingClientRect(), E.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", _.viewport && (_.viewport.style.scrollBehavior = "auto"), S(D));
498
498
  }),
499
499
  onPointerMove: dt(e.onPointerMove, S),
500
- onPointerUp: dt(e.onPointerUp, (A) => {
501
- const j = A.target;
502
- j.hasPointerCapture(A.pointerId) && j.releasePointerCapture(A.pointerId), document.body.style.webkitUserSelect = E.current, _.viewport && (_.viewport.style.scrollBehavior = ""), w.current = null;
500
+ onPointerUp: dt(e.onPointerUp, (D) => {
501
+ const j = D.target;
502
+ j.hasPointerCapture(D.pointerId) && j.releasePointerCapture(D.pointerId), document.body.style.webkitUserSelect = E.current, _.viewport && (_.viewport.style.scrollBehavior = ""), w.current = null;
503
503
  })
504
504
  }
505
505
  )
@@ -620,13 +620,13 @@ var Lc = (e, n = () => {
620
620
  })(), () => window.cancelAnimationFrame(r);
621
621
  };
622
622
  function ir(e, n) {
623
- const t = ot(e), r = m.useRef(0);
623
+ const t = ct(e), r = m.useRef(0);
624
624
  return m.useEffect(() => () => window.clearTimeout(r.current), []), m.useCallback(() => {
625
625
  window.clearTimeout(r.current), r.current = window.setTimeout(t, n);
626
626
  }, [t, n]);
627
627
  }
628
628
  function zt(e, n) {
629
- const t = ot(n);
629
+ const t = ct(n);
630
630
  lo(() => {
631
631
  let r = 0;
632
632
  if (e) {
@@ -662,7 +662,7 @@ function Wc(e) {
662
662
  const Kc = 10;
663
663
  class t1 {
664
664
  constructor() {
665
- q(this, "subPriority", 0);
665
+ V(this, "subPriority", 0);
666
666
  }
667
667
  validate(n, t) {
668
668
  return !0;
@@ -682,8 +682,8 @@ class Yc extends t1 {
682
682
  class Qc extends t1 {
683
683
  constructor(t, r) {
684
684
  super();
685
- q(this, "priority", Kc);
686
- q(this, "subPriority", -1);
685
+ V(this, "priority", Kc);
686
+ V(this, "subPriority", -1);
687
687
  this.context = t || ((a) => tt(r, a));
688
688
  }
689
689
  set(t, r) {
@@ -711,8 +711,8 @@ class se {
711
711
  class Xc extends se {
712
712
  constructor() {
713
713
  super(...arguments);
714
- q(this, "priority", 140);
715
- q(this, "incompatibleTokens", ["R", "u", "t", "T"]);
714
+ V(this, "priority", 140);
715
+ V(this, "incompatibleTokens", ["R", "u", "t", "T"]);
716
716
  }
717
717
  parse(t, r, a) {
718
718
  switch (r) {
@@ -872,8 +872,8 @@ function l1(e) {
872
872
  class Zc extends se {
873
873
  constructor() {
874
874
  super(...arguments);
875
- q(this, "priority", 130);
876
- q(this, "incompatibleTokens", ["Y", "R", "u", "w", "I", "i", "e", "c", "t", "T"]);
875
+ V(this, "priority", 130);
876
+ V(this, "incompatibleTokens", ["Y", "R", "u", "w", "I", "i", "e", "c", "t", "T"]);
877
877
  }
878
878
  parse(t, r, a) {
879
879
  const s = (o) => ({
@@ -913,8 +913,8 @@ class Zc extends se {
913
913
  class Jc extends se {
914
914
  constructor() {
915
915
  super(...arguments);
916
- q(this, "priority", 130);
917
- q(this, "incompatibleTokens", [
916
+ V(this, "priority", 130);
917
+ V(this, "incompatibleTokens", [
918
918
  "y",
919
919
  "R",
920
920
  "u",
@@ -972,8 +972,8 @@ class Jc extends se {
972
972
  class e2 extends se {
973
973
  constructor() {
974
974
  super(...arguments);
975
- q(this, "priority", 130);
976
- q(this, "incompatibleTokens", [
975
+ V(this, "priority", 130);
976
+ V(this, "incompatibleTokens", [
977
977
  "G",
978
978
  "y",
979
979
  "Y",
@@ -1002,8 +1002,8 @@ class e2 extends se {
1002
1002
  class t2 extends se {
1003
1003
  constructor() {
1004
1004
  super(...arguments);
1005
- q(this, "priority", 130);
1006
- q(this, "incompatibleTokens", ["G", "y", "Y", "R", "w", "I", "i", "e", "c", "t", "T"]);
1005
+ V(this, "priority", 130);
1006
+ V(this, "incompatibleTokens", ["G", "y", "Y", "R", "w", "I", "i", "e", "c", "t", "T"]);
1007
1007
  }
1008
1008
  parse(t, r) {
1009
1009
  return Dn(r === "u" ? 4 : r.length, t);
@@ -1015,8 +1015,8 @@ class t2 extends se {
1015
1015
  class n2 extends se {
1016
1016
  constructor() {
1017
1017
  super(...arguments);
1018
- q(this, "priority", 120);
1019
- q(this, "incompatibleTokens", [
1018
+ V(this, "priority", 120);
1019
+ V(this, "incompatibleTokens", [
1020
1020
  "Y",
1021
1021
  "R",
1022
1022
  "q",
@@ -1082,8 +1082,8 @@ class n2 extends se {
1082
1082
  class r2 extends se {
1083
1083
  constructor() {
1084
1084
  super(...arguments);
1085
- q(this, "priority", 120);
1086
- q(this, "incompatibleTokens", [
1085
+ V(this, "priority", 120);
1086
+ V(this, "incompatibleTokens", [
1087
1087
  "Y",
1088
1088
  "R",
1089
1089
  "Q",
@@ -1149,7 +1149,7 @@ class r2 extends se {
1149
1149
  class l2 extends se {
1150
1150
  constructor() {
1151
1151
  super(...arguments);
1152
- q(this, "incompatibleTokens", [
1152
+ V(this, "incompatibleTokens", [
1153
1153
  "Y",
1154
1154
  "R",
1155
1155
  "q",
@@ -1164,7 +1164,7 @@ class l2 extends se {
1164
1164
  "t",
1165
1165
  "T"
1166
1166
  ]);
1167
- q(this, "priority", 110);
1167
+ V(this, "priority", 110);
1168
1168
  }
1169
1169
  parse(t, r, a) {
1170
1170
  const s = (o) => o - 1;
@@ -1217,8 +1217,8 @@ class l2 extends se {
1217
1217
  class a2 extends se {
1218
1218
  constructor() {
1219
1219
  super(...arguments);
1220
- q(this, "priority", 110);
1221
- q(this, "incompatibleTokens", [
1220
+ V(this, "priority", 110);
1221
+ V(this, "incompatibleTokens", [
1222
1222
  "Y",
1223
1223
  "R",
1224
1224
  "q",
@@ -1289,8 +1289,8 @@ function i2(e, n, t) {
1289
1289
  class s2 extends se {
1290
1290
  constructor() {
1291
1291
  super(...arguments);
1292
- q(this, "priority", 100);
1293
- q(this, "incompatibleTokens", [
1292
+ V(this, "priority", 100);
1293
+ V(this, "incompatibleTokens", [
1294
1294
  "y",
1295
1295
  "R",
1296
1296
  "u",
@@ -1330,8 +1330,8 @@ function o2(e, n, t) {
1330
1330
  class c2 extends se {
1331
1331
  constructor() {
1332
1332
  super(...arguments);
1333
- q(this, "priority", 100);
1334
- q(this, "incompatibleTokens", [
1333
+ V(this, "priority", 100);
1334
+ V(this, "incompatibleTokens", [
1335
1335
  "y",
1336
1336
  "Y",
1337
1337
  "u",
@@ -1382,9 +1382,9 @@ const d2 = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], u2 = [
1382
1382
  class m2 extends se {
1383
1383
  constructor() {
1384
1384
  super(...arguments);
1385
- q(this, "priority", 90);
1386
- q(this, "subPriority", 1);
1387
- q(this, "incompatibleTokens", [
1385
+ V(this, "priority", 90);
1386
+ V(this, "subPriority", 1);
1387
+ V(this, "incompatibleTokens", [
1388
1388
  "Y",
1389
1389
  "R",
1390
1390
  "q",
@@ -1420,9 +1420,9 @@ class m2 extends se {
1420
1420
  class h2 extends se {
1421
1421
  constructor() {
1422
1422
  super(...arguments);
1423
- q(this, "priority", 90);
1424
- q(this, "subpriority", 1);
1425
- q(this, "incompatibleTokens", [
1423
+ V(this, "priority", 90);
1424
+ V(this, "subpriority", 1);
1425
+ V(this, "incompatibleTokens", [
1426
1426
  "Y",
1427
1427
  "R",
1428
1428
  "q",
@@ -1466,8 +1466,8 @@ function ul(e, n, t) {
1466
1466
  class f2 extends se {
1467
1467
  constructor() {
1468
1468
  super(...arguments);
1469
- q(this, "priority", 90);
1470
- q(this, "incompatibleTokens", ["D", "i", "e", "c", "t", "T"]);
1469
+ V(this, "priority", 90);
1470
+ V(this, "incompatibleTokens", ["D", "i", "e", "c", "t", "T"]);
1471
1471
  }
1472
1472
  parse(t, r, a) {
1473
1473
  switch (r) {
@@ -1507,8 +1507,8 @@ class f2 extends se {
1507
1507
  class p2 extends se {
1508
1508
  constructor() {
1509
1509
  super(...arguments);
1510
- q(this, "priority", 90);
1511
- q(this, "incompatibleTokens", [
1510
+ V(this, "priority", 90);
1511
+ V(this, "incompatibleTokens", [
1512
1512
  "y",
1513
1513
  "R",
1514
1514
  "u",
@@ -1578,8 +1578,8 @@ class p2 extends se {
1578
1578
  class v2 extends se {
1579
1579
  constructor() {
1580
1580
  super(...arguments);
1581
- q(this, "priority", 90);
1582
- q(this, "incompatibleTokens", [
1581
+ V(this, "priority", 90);
1582
+ V(this, "incompatibleTokens", [
1583
1583
  "y",
1584
1584
  "R",
1585
1585
  "u",
@@ -1653,8 +1653,8 @@ function g2(e, n, t) {
1653
1653
  class x2 extends se {
1654
1654
  constructor() {
1655
1655
  super(...arguments);
1656
- q(this, "priority", 90);
1657
- q(this, "incompatibleTokens", [
1656
+ V(this, "priority", 90);
1657
+ V(this, "incompatibleTokens", [
1658
1658
  "y",
1659
1659
  "Y",
1660
1660
  "u",
@@ -1749,8 +1749,8 @@ class x2 extends se {
1749
1749
  class y2 extends se {
1750
1750
  constructor() {
1751
1751
  super(...arguments);
1752
- q(this, "priority", 80);
1753
- q(this, "incompatibleTokens", ["b", "B", "H", "k", "t", "T"]);
1752
+ V(this, "priority", 80);
1753
+ V(this, "incompatibleTokens", ["b", "B", "H", "k", "t", "T"]);
1754
1754
  }
1755
1755
  parse(t, r, a) {
1756
1756
  switch (r) {
@@ -1790,8 +1790,8 @@ class y2 extends se {
1790
1790
  class _2 extends se {
1791
1791
  constructor() {
1792
1792
  super(...arguments);
1793
- q(this, "priority", 80);
1794
- q(this, "incompatibleTokens", ["a", "B", "H", "k", "t", "T"]);
1793
+ V(this, "priority", 80);
1794
+ V(this, "incompatibleTokens", ["a", "B", "H", "k", "t", "T"]);
1795
1795
  }
1796
1796
  parse(t, r, a) {
1797
1797
  switch (r) {
@@ -1831,8 +1831,8 @@ class _2 extends se {
1831
1831
  class b2 extends se {
1832
1832
  constructor() {
1833
1833
  super(...arguments);
1834
- q(this, "priority", 80);
1835
- q(this, "incompatibleTokens", ["a", "b", "t", "T"]);
1834
+ V(this, "priority", 80);
1835
+ V(this, "incompatibleTokens", ["a", "b", "t", "T"]);
1836
1836
  }
1837
1837
  parse(t, r, a) {
1838
1838
  switch (r) {
@@ -1872,8 +1872,8 @@ class b2 extends se {
1872
1872
  class w2 extends se {
1873
1873
  constructor() {
1874
1874
  super(...arguments);
1875
- q(this, "priority", 70);
1876
- q(this, "incompatibleTokens", ["H", "K", "k", "t", "T"]);
1875
+ V(this, "priority", 70);
1876
+ V(this, "incompatibleTokens", ["H", "K", "k", "t", "T"]);
1877
1877
  }
1878
1878
  parse(t, r, a) {
1879
1879
  switch (r) {
@@ -1896,8 +1896,8 @@ class w2 extends se {
1896
1896
  class E2 extends se {
1897
1897
  constructor() {
1898
1898
  super(...arguments);
1899
- q(this, "priority", 70);
1900
- q(this, "incompatibleTokens", ["a", "b", "h", "K", "k", "t", "T"]);
1899
+ V(this, "priority", 70);
1900
+ V(this, "incompatibleTokens", ["a", "b", "h", "K", "k", "t", "T"]);
1901
1901
  }
1902
1902
  parse(t, r, a) {
1903
1903
  switch (r) {
@@ -1919,8 +1919,8 @@ class E2 extends se {
1919
1919
  class $2 extends se {
1920
1920
  constructor() {
1921
1921
  super(...arguments);
1922
- q(this, "priority", 70);
1923
- q(this, "incompatibleTokens", ["h", "H", "k", "t", "T"]);
1922
+ V(this, "priority", 70);
1923
+ V(this, "incompatibleTokens", ["h", "H", "k", "t", "T"]);
1924
1924
  }
1925
1925
  parse(t, r, a) {
1926
1926
  switch (r) {
@@ -1942,8 +1942,8 @@ class $2 extends se {
1942
1942
  class F2 extends se {
1943
1943
  constructor() {
1944
1944
  super(...arguments);
1945
- q(this, "priority", 70);
1946
- q(this, "incompatibleTokens", ["a", "b", "h", "H", "K", "t", "T"]);
1945
+ V(this, "priority", 70);
1946
+ V(this, "incompatibleTokens", ["a", "b", "h", "H", "K", "t", "T"]);
1947
1947
  }
1948
1948
  parse(t, r, a) {
1949
1949
  switch (r) {
@@ -1966,8 +1966,8 @@ class F2 extends se {
1966
1966
  class C2 extends se {
1967
1967
  constructor() {
1968
1968
  super(...arguments);
1969
- q(this, "priority", 60);
1970
- q(this, "incompatibleTokens", ["t", "T"]);
1969
+ V(this, "priority", 60);
1970
+ V(this, "incompatibleTokens", ["t", "T"]);
1971
1971
  }
1972
1972
  parse(t, r, a) {
1973
1973
  switch (r) {
@@ -1989,8 +1989,8 @@ class C2 extends se {
1989
1989
  class z2 extends se {
1990
1990
  constructor() {
1991
1991
  super(...arguments);
1992
- q(this, "priority", 50);
1993
- q(this, "incompatibleTokens", ["t", "T"]);
1992
+ V(this, "priority", 50);
1993
+ V(this, "incompatibleTokens", ["t", "T"]);
1994
1994
  }
1995
1995
  parse(t, r, a) {
1996
1996
  switch (r) {
@@ -2012,8 +2012,8 @@ class z2 extends se {
2012
2012
  class M2 extends se {
2013
2013
  constructor() {
2014
2014
  super(...arguments);
2015
- q(this, "priority", 30);
2016
- q(this, "incompatibleTokens", ["t", "T"]);
2015
+ V(this, "priority", 30);
2016
+ V(this, "incompatibleTokens", ["t", "T"]);
2017
2017
  }
2018
2018
  parse(t, r) {
2019
2019
  const a = (s) => Math.trunc(s * Math.pow(10, -r.length + 3));
@@ -2026,8 +2026,8 @@ class M2 extends se {
2026
2026
  class N2 extends se {
2027
2027
  constructor() {
2028
2028
  super(...arguments);
2029
- q(this, "priority", 10);
2030
- q(this, "incompatibleTokens", ["t", "T", "x"]);
2029
+ V(this, "priority", 10);
2030
+ V(this, "incompatibleTokens", ["t", "T", "x"]);
2031
2031
  }
2032
2032
  parse(t, r) {
2033
2033
  switch (r) {
@@ -2063,8 +2063,8 @@ class N2 extends se {
2063
2063
  class S2 extends se {
2064
2064
  constructor() {
2065
2065
  super(...arguments);
2066
- q(this, "priority", 10);
2067
- q(this, "incompatibleTokens", ["t", "T", "X"]);
2066
+ V(this, "priority", 10);
2067
+ V(this, "incompatibleTokens", ["t", "T", "X"]);
2068
2068
  }
2069
2069
  parse(t, r) {
2070
2070
  switch (r) {
@@ -2100,8 +2100,8 @@ class S2 extends se {
2100
2100
  class j2 extends se {
2101
2101
  constructor() {
2102
2102
  super(...arguments);
2103
- q(this, "priority", 40);
2104
- q(this, "incompatibleTokens", "*");
2103
+ V(this, "priority", 40);
2104
+ V(this, "incompatibleTokens", "*");
2105
2105
  }
2106
2106
  parse(t) {
2107
2107
  return n1(t);
@@ -2113,8 +2113,8 @@ class j2 extends se {
2113
2113
  class P2 extends se {
2114
2114
  constructor() {
2115
2115
  super(...arguments);
2116
- q(this, "priority", 20);
2117
- q(this, "incompatibleTokens", "*");
2116
+ V(this, "priority", 20);
2117
+ V(this, "incompatibleTokens", "*");
2118
2118
  }
2119
2119
  parse(t) {
2120
2120
  return n1(t);
@@ -3790,6 +3790,7 @@ const Vd = {
3790
3790
  // Edit bill date dialog
3791
3791
  edit_bill_date_title: "Edit bill date",
3792
3792
  edit_bill_date_description: "Select a new date for your next bill.",
3793
+ bill_date_early_order_warning: "This date is earlier than your next scheduled order. A new order will be placed and charged on this date.",
3793
3794
  edit_bill_date_action: "Save",
3794
3795
  next_bill_date_label: "Next bill date",
3795
3796
  edit_bill_date_cancel: "Cancel",
@@ -3987,7 +3988,7 @@ const Vd = {
3987
3988
  // Outcome toasts after a payment-method update queues an immediate retry on
3988
3989
  // a past_due subscription (the charge runs async; the UI polls for the
3989
3990
  // result — see useRetryStatusPolling).
3990
- payment_retry_succeeded: "Payment confirmed — your subscription is active again.",
3991
+ payment_retry_succeeded: "Payment confirmed — your order is placed and your subscription is active again.",
3991
3992
  payment_retry_failed: "That payment was declined. Try a different card to reactivate your subscription.",
3992
3993
  payment_retry_processing: "We're processing your payment. The status will update shortly.",
3993
3994
  // Time-bucket strings used in {{when}} interpolation for the
@@ -4126,106 +4127,106 @@ const Vd = {
4126
4127
  }, qd = qo({
4127
4128
  fallback: Vd,
4128
4129
  loaders: {
4129
- ar: () => import("./ar-B38JwP1Q.js").then(
4130
+ ar: () => import("./ar-BEzME6fe.js").then(
4130
4131
  (e) => e.default
4131
4132
  ),
4132
- bg: () => import("./bg-D2-Dxyho.js").then(
4133
+ bg: () => import("./bg-BH8ZSqUX.js").then(
4133
4134
  (e) => e.default
4134
4135
  ),
4135
- bn: () => import("./bn-RV1lUDS4.js").then(
4136
+ bn: () => import("./bn-DtDJ6TZx.js").then(
4136
4137
  (e) => e.default
4137
4138
  ),
4138
- cs: () => import("./cs-_pqEX0vR.js").then(
4139
+ cs: () => import("./cs-Cnh23N0Q.js").then(
4139
4140
  (e) => e.default
4140
4141
  ),
4141
- da: () => import("./da-CmdC3qAz.js").then(
4142
+ da: () => import("./da-BkFlENrm.js").then(
4142
4143
  (e) => e.default
4143
4144
  ),
4144
- de: () => import("./de-CZa8AamX.js").then(
4145
+ de: () => import("./de-CXbxjpqk.js").then(
4145
4146
  (e) => e.default
4146
4147
  ),
4147
- el: () => import("./el-DX8bI8nT.js").then(
4148
+ el: () => import("./el-D0HrgcCq.js").then(
4148
4149
  (e) => e.default
4149
4150
  ),
4150
- es: () => import("./es-BgU-HQ7D.js").then(
4151
+ es: () => import("./es-DCUL4uMv.js").then(
4151
4152
  (e) => e.default
4152
4153
  ),
4153
- fi: () => import("./fi-CoefTRQx.js").then(
4154
+ fi: () => import("./fi-CHdIuHZ7.js").then(
4154
4155
  (e) => e.default
4155
4156
  ),
4156
- fr: () => import("./fr-BrO75FSP.js").then(
4157
+ fr: () => import("./fr-f1nsQ8CJ.js").then(
4157
4158
  (e) => e.default
4158
4159
  ),
4159
- he: () => import("./he-ypPgeNk0.js").then(
4160
+ he: () => import("./he-CTQSWuhd.js").then(
4160
4161
  (e) => e.default
4161
4162
  ),
4162
- hi: () => import("./hi-BPJxfecJ.js").then(
4163
+ hi: () => import("./hi-Cbc4sngc.js").then(
4163
4164
  (e) => e.default
4164
4165
  ),
4165
- hr: () => import("./hr-6uSkEE3o.js").then(
4166
+ hr: () => import("./hr-gmnEby65.js").then(
4166
4167
  (e) => e.default
4167
4168
  ),
4168
- hu: () => import("./hu-CvzXfr0I.js").then(
4169
+ hu: () => import("./hu-CYbJhMFr.js").then(
4169
4170
  (e) => e.default
4170
4171
  ),
4171
- id: () => import("./id-rkKtZ8bk.js").then(
4172
+ id: () => import("./id-sJevBl7H.js").then(
4172
4173
  (e) => e.default
4173
4174
  ),
4174
- it: () => import("./it-No4oD9aM.js").then(
4175
+ it: () => import("./it-CN9jBl_o.js").then(
4175
4176
  (e) => e.default
4176
4177
  ),
4177
- ja: () => import("./ja-DXgYDhlx.js").then(
4178
+ ja: () => import("./ja-murQgegy.js").then(
4178
4179
  (e) => e.default
4179
4180
  ),
4180
- ko: () => import("./ko-C8afRgfd.js").then(
4181
+ ko: () => import("./ko-DwAvoUMI.js").then(
4181
4182
  (e) => e.default
4182
4183
  ),
4183
- ms: () => import("./ms-B7RG6ICM.js").then(
4184
+ ms: () => import("./ms-CReSPLVF.js").then(
4184
4185
  (e) => e.default
4185
4186
  ),
4186
- nl: () => import("./nl-BQj59rtg.js").then(
4187
+ nl: () => import("./nl-DqZXUUj7.js").then(
4187
4188
  (e) => e.default
4188
4189
  ),
4189
- no: () => import("./no-Der6oMFk.js").then(
4190
+ no: () => import("./no-CkOJoOje.js").then(
4190
4191
  (e) => e.default
4191
4192
  ),
4192
- pl: () => import("./pl-BUsBvD4D.js").then(
4193
+ pl: () => import("./pl-Cgn6JU9e.js").then(
4193
4194
  (e) => e.default
4194
4195
  ),
4195
- pt: () => import("./pt-WiiCDQ-t.js").then(
4196
+ pt: () => import("./pt-DGK1Owr_.js").then(
4196
4197
  (e) => e.default
4197
4198
  ),
4198
- ro: () => import("./ro-B0G8KWRk.js").then(
4199
+ ro: () => import("./ro-fNB65Q5C.js").then(
4199
4200
  (e) => e.default
4200
4201
  ),
4201
- ru: () => import("./ru-CChSc7YS.js").then(
4202
+ ru: () => import("./ru-B_6QET6M.js").then(
4202
4203
  (e) => e.default
4203
4204
  ),
4204
- sk: () => import("./sk-Bsl8JShF.js").then(
4205
+ sk: () => import("./sk-Dp8unwXq.js").then(
4205
4206
  (e) => e.default
4206
4207
  ),
4207
- sv: () => import("./sv-bV_XmfL8.js").then(
4208
+ sv: () => import("./sv-BzcwdZZ-.js").then(
4208
4209
  (e) => e.default
4209
4210
  ),
4210
- th: () => import("./th-BQF1j8NM.js").then(
4211
+ th: () => import("./th-ES1aYgaU.js").then(
4211
4212
  (e) => e.default
4212
4213
  ),
4213
- tl: () => import("./tl-B4gzymDl.js").then(
4214
+ tl: () => import("./tl-CmEY-mla.js").then(
4214
4215
  (e) => e.default
4215
4216
  ),
4216
- tr: () => import("./tr-CsPvkMxO.js").then(
4217
+ tr: () => import("./tr-CgGyOVOg.js").then(
4217
4218
  (e) => e.default
4218
4219
  ),
4219
- uk: () => import("./uk-CQb2GOug.js").then(
4220
+ uk: () => import("./uk-2HuaXPmF.js").then(
4220
4221
  (e) => e.default
4221
4222
  ),
4222
- vi: () => import("./vi-BNGblIIf.js").then(
4223
+ vi: () => import("./vi-BCRRbQTG.js").then(
4223
4224
  (e) => e.default
4224
4225
  ),
4225
- zh_CN: () => import("./zh_CN-sTRogX90.js").then(
4226
+ zh_CN: () => import("./zh_CN-DravPRSW.js").then(
4226
4227
  (e) => e.default
4227
4228
  ),
4228
- zh_TW: () => import("./zh_TW-C_dDvIXT.js").then(
4229
+ zh_TW: () => import("./zh_TW-C4OAorfd.js").then(
4229
4230
  (e) => e.default
4230
4231
  )
4231
4232
  }
@@ -4357,14 +4358,14 @@ function b1({
4357
4358
  disabled: c = !1,
4358
4359
  presentation: d = "dialog"
4359
4360
  }) {
4360
- const { t: u } = it(), [h, p] = m.useState(!1), x = r ?? u("edit"), _ = a ?? u("delete"), b = s ?? u("make_default"), f = o ?? x;
4361
+ const { t: u } = st(), [h, p] = m.useState(!1), x = r ?? u("edit"), _ = a ?? u("delete"), b = s ?? u("make_default"), f = o ?? x;
4361
4362
  if (d === "bottom-sheet") {
4362
4363
  const v = (w) => {
4363
4364
  p(!1), w();
4364
4365
  };
4365
4366
  return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
4366
4367
  /* @__PURE__ */ i.jsx(
4367
- Z,
4368
+ X,
4368
4369
  {
4369
4370
  variant: "ghost",
4370
4371
  disabled: c,
@@ -4381,7 +4382,7 @@ function b1({
4381
4382
  title: f,
4382
4383
  children: /* @__PURE__ */ i.jsxs("div", { className: "space-y-1 px-2", children: [
4383
4384
  n && /* @__PURE__ */ i.jsxs(
4384
- Z,
4385
+ X,
4385
4386
  {
4386
4387
  type: "button",
4387
4388
  variant: "ghost",
@@ -4394,7 +4395,7 @@ function b1({
4394
4395
  }
4395
4396
  ),
4396
4397
  t && /* @__PURE__ */ i.jsxs(
4397
- Z,
4398
+ X,
4398
4399
  {
4399
4400
  type: "button",
4400
4401
  variant: "ghost",
@@ -4407,7 +4408,7 @@ function b1({
4407
4408
  }
4408
4409
  ),
4409
4410
  e && /* @__PURE__ */ i.jsxs(
4410
- Z,
4411
+ X,
4411
4412
  {
4412
4413
  type: "button",
4413
4414
  variant: "ghost",
@@ -4426,7 +4427,7 @@ function b1({
4426
4427
  }
4427
4428
  return /* @__PURE__ */ i.jsxs(Si, { children: [
4428
4429
  /* @__PURE__ */ i.jsx(ji, { asChild: !0, children: /* @__PURE__ */ i.jsx(
4429
- Z,
4430
+ X,
4430
4431
  {
4431
4432
  variant: "ghost",
4432
4433
  disabled: c,
@@ -4494,7 +4495,7 @@ function w1({
4494
4495
  actionText: c,
4495
4496
  presentation: d = "dialog"
4496
4497
  }) {
4497
- const { t: u } = it(), h = c ?? u("delete");
4498
+ const { t: u } = st(), h = c ?? u("delete");
4498
4499
  return /* @__PURE__ */ i.jsxs(
4499
4500
  Te,
4500
4501
  {
@@ -4508,7 +4509,7 @@ function w1({
4508
4509
  s && /* @__PURE__ */ i.jsx("p", { className: "text-destructive text-sm", children: s }),
4509
4510
  /* @__PURE__ */ i.jsx(Ke, { children: /* @__PURE__ */ i.jsxs("div", { className: "flex w-full flex-row justify-between gap-x-2", children: [
4510
4511
  /* @__PURE__ */ i.jsx(
4511
- Z,
4512
+ X,
4512
4513
  {
4513
4514
  variant: "secondary",
4514
4515
  className: "min-w-[70px]",
@@ -4517,7 +4518,7 @@ function w1({
4517
4518
  }
4518
4519
  ),
4519
4520
  /* @__PURE__ */ i.jsx(
4520
- Z,
4521
+ X,
4521
4522
  {
4522
4523
  type: "button",
4523
4524
  variant: "destructive",
@@ -4747,15 +4748,15 @@ function F1({
4747
4748
  fieldState: { error: f }
4748
4749
  } = rn({ name: r, control: e }), [v, w] = m.useState(
4749
4750
  []
4750
- ), [E, C] = m.useState(!1), [z, $] = m.useState(!1), M = m.useRef(null), F = m.useRef(0), S = m.useRef(null), A = m.useMemo(
4751
+ ), [E, C] = m.useState(!1), [z, $] = m.useState(!1), M = m.useRef(null), F = m.useRef(0), S = m.useRef(null), D = m.useMemo(
4751
4752
  () => !!(t && t.trim() !== ""),
4752
4753
  [t]
4753
4754
  ), j = d ?? r;
4754
4755
  m.useEffect(() => {
4755
- function V(Y) {
4756
+ function R(Y) {
4756
4757
  M.current && !M.current.contains(Y.target) && (C(!1), $(!1));
4757
4758
  }
4758
- return document.addEventListener("mousedown", V), () => document.removeEventListener("mousedown", V);
4759
+ return document.addEventListener("mousedown", R), () => document.removeEventListener("mousedown", R);
4759
4760
  }, []), m.useEffect(
4760
4761
  () => () => {
4761
4762
  S.current !== null && clearTimeout(S.current);
@@ -4768,19 +4769,19 @@ function F1({
4768
4769
  "AddressAutocompleteInput: no AddressAutocompleteApiProvider found — address suggestions are disabled."
4769
4770
  );
4770
4771
  }, [_]);
4771
- const k = m.useCallback(
4772
- (V) => {
4772
+ const T = m.useCallback(
4773
+ (R) => {
4773
4774
  n(
4774
4775
  r,
4775
- V.streetLine,
4776
+ R.streetLine,
4776
4777
  yn
4777
- ), n(a, V.city, yn), s && n(
4778
+ ), n(a, R.city, yn), s && n(
4778
4779
  s,
4779
- a0(V, c),
4780
+ a0(R, c),
4780
4781
  yn
4781
4782
  ), n(
4782
4783
  o,
4783
- V.postalCode,
4784
+ R.postalCode,
4784
4785
  yn
4785
4786
  );
4786
4787
  },
@@ -4793,53 +4794,53 @@ function F1({
4793
4794
  c
4794
4795
  ]
4795
4796
  ), L = m.useCallback(
4796
- (V) => {
4797
- const Y = V.target.value;
4797
+ (R) => {
4798
+ const Y = R.target.value;
4798
4799
  if (b.onChange(Y), !_) return;
4799
4800
  if (S.current !== null && (clearTimeout(S.current), S.current = null), Y.length < 1) {
4800
4801
  C(!1), $(!1), w([]);
4801
4802
  return;
4802
4803
  }
4803
- if (!A) {
4804
+ if (!D) {
4804
4805
  $(!0), C(!0);
4805
4806
  return;
4806
4807
  }
4807
4808
  $(!1);
4808
- const I = ++F.current;
4809
+ const J = ++F.current;
4809
4810
  S.current = setTimeout(() => {
4810
- S.current = null, _.fetchSuggestions({ query: Y, countryIso: t }).then((O) => {
4811
- I === F.current && (w(O), C(!0));
4811
+ S.current = null, _.fetchSuggestions({ query: Y, countryIso: t }).then((A) => {
4812
+ J === F.current && (w(A), C(!0));
4812
4813
  });
4813
4814
  }, i0);
4814
4815
  },
4815
- [_, t, b, A]
4816
- ), K = m.useCallback(
4817
- async (V) => {
4816
+ [_, t, b, D]
4817
+ ), W = m.useCallback(
4818
+ async (R) => {
4818
4819
  S.current !== null && (clearTimeout(S.current), S.current = null);
4819
4820
  const Y = ++F.current;
4820
- if (!V.needsDetailLookup) {
4821
- k({
4822
- streetLine: V.streetLine ?? V.text,
4823
- city: V.city ?? "",
4824
- state: V.state ?? "",
4825
- postalCode: V.postalCode ?? ""
4821
+ if (!R.needsDetailLookup) {
4822
+ T({
4823
+ streetLine: R.streetLine ?? R.text,
4824
+ city: R.city ?? "",
4825
+ state: R.state ?? "",
4826
+ postalCode: R.postalCode ?? ""
4826
4827
  }), C(!1);
4827
4828
  return;
4828
4829
  }
4829
4830
  if (!_) return;
4830
- const { details: I, drilldownSuggestions: O } = await _.fetchDetails({
4831
- suggestion: V,
4831
+ const { details: J, drilldownSuggestions: A } = await _.fetchDetails({
4832
+ suggestion: R,
4832
4833
  countryIso: t
4833
4834
  });
4834
4835
  if (Y === F.current) {
4835
- if (I) {
4836
- k(I), C(!1);
4836
+ if (J) {
4837
+ T(J), C(!1);
4837
4838
  return;
4838
4839
  }
4839
- w(O), C(!0);
4840
+ w(A), C(!0);
4840
4841
  }
4841
4842
  },
4842
- [_, t, k]
4843
+ [_, t, T]
4843
4844
  );
4844
4845
  return /* @__PURE__ */ i.jsxs("div", { className: "space-y-1", children: [
4845
4846
  u && /* @__PURE__ */ i.jsx(ve, { htmlFor: j, className: "mb-1.5 block text-sm font-medium", children: u }),
@@ -4860,22 +4861,22 @@ function F1({
4860
4861
  }
4861
4862
  ),
4862
4863
  E && z && /* @__PURE__ */ i.jsx("div", { className: "bg-muted text-foreground absolute z-50 mt-1 w-full rounded-md px-3 py-2 text-sm shadow-lg", children: "Please select a country first to enable address suggestions" }),
4863
- E && !z && v.length > 0 && /* @__PURE__ */ i.jsx("div", { className: "bg-background text-foreground border-border absolute z-50 mt-1 max-h-60 w-full overflow-y-auto rounded-md border shadow-lg", children: v.map((V) => /* @__PURE__ */ i.jsxs(
4864
+ E && !z && v.length > 0 && /* @__PURE__ */ i.jsx("div", { className: "bg-background text-foreground border-border absolute z-50 mt-1 max-h-60 w-full overflow-y-auto rounded-md border shadow-lg", children: v.map((R) => /* @__PURE__ */ i.jsxs(
4864
4865
  "button",
4865
4866
  {
4866
4867
  type: "button",
4867
4868
  onClick: () => {
4868
- K(V).catch((Y) => {
4869
+ W(R).catch((Y) => {
4869
4870
  console.error("Address autocomplete click failed:", Y);
4870
4871
  });
4871
4872
  },
4872
4873
  className: "hover:bg-muted block w-full cursor-pointer px-3 py-2 text-left text-sm",
4873
4874
  children: [
4874
- V.text,
4875
- V.needsDetailLookup ? " →" : ""
4875
+ R.text,
4876
+ R.needsDetailLookup ? " →" : ""
4876
4877
  ]
4877
4878
  },
4878
- V.id
4879
+ R.id
4879
4880
  )) })
4880
4881
  ] }),
4881
4882
  f?.message && /* @__PURE__ */ i.jsx("p", { className: "text-destructive text-sm", children: f.message })
@@ -5010,16 +5011,16 @@ function f0({
5010
5011
  isDeleting: p = !1,
5011
5012
  presentation: x = "dialog"
5012
5013
  }) {
5013
- const { t: _ } = it(), [b, f] = m.useState(!1);
5014
+ const { t: _ } = st(), [b, f] = m.useState(!1);
5014
5015
  m.useEffect(() => {
5015
5016
  e || f(!1);
5016
5017
  }, [e]), m.useEffect(() => {
5017
5018
  if (!b) return;
5018
- const U = setTimeout(() => f(!1), 3e3);
5019
- return () => clearTimeout(U);
5019
+ const q = setTimeout(() => f(!1), 3e3);
5020
+ return () => clearTimeout(q);
5020
5021
  }, [b]);
5021
5022
  const v = m.useMemo(
5022
- () => m0((U) => _(U)),
5023
+ () => m0((q) => _(q)),
5023
5024
  [_]
5024
5025
  ), { control: w, handleSubmit: E, reset: C, setValue: z, setError: $, clearErrors: M } = tl(v, {
5025
5026
  defaultValues: {
@@ -5037,12 +5038,12 @@ function f0({
5037
5038
  }), F = vi({
5038
5039
  control: w,
5039
5040
  name: "billing_address.country_code"
5040
- }), { stateOptions: S, optionsCountry: A, config: j, handleCountryChange: k } = _1(), L = [...c].map((U) => ({
5041
- name: U.name,
5042
- value: U.iso
5043
- })).sort((U, R) => U.value === F ? -1 : R.value === F ? 1 : U.name.localeCompare(R.name)), K = S.map((U) => ({
5044
- name: U.name,
5045
- value: U.isoCode
5041
+ }), { stateOptions: S, optionsCountry: D, config: j, handleCountryChange: T } = _1(), L = [...c].map((q) => ({
5042
+ name: q.name,
5043
+ value: q.iso
5044
+ })).sort((q, B) => q.value === F ? -1 : B.value === F ? 1 : q.name.localeCompare(B.name)), W = S.map((q) => ({
5045
+ name: q.name,
5046
+ value: q.isoCode
5046
5047
  }));
5047
5048
  m.useEffect(() => {
5048
5049
  n && e && C({
@@ -5058,71 +5059,71 @@ function f0({
5058
5059
  set_as_default: n.default
5059
5060
  });
5060
5061
  }, [n, t, e, C]);
5061
- const V = t?.country_code ?? "US", Y = m.useRef(!1);
5062
+ const R = t?.country_code ?? "US", Y = m.useRef(!1);
5062
5063
  m.useEffect(() => {
5063
5064
  e || (Y.current = !1);
5064
5065
  }, [e]);
5065
- const I = !e || !n ? null : Y.current || F === V ? F : null;
5066
+ const J = !e || !n ? null : Y.current || F === R ? F : null;
5066
5067
  m.useEffect(() => {
5067
- I && k(I, d);
5068
- }, [I, k, d]);
5069
- const O = A === F, X = z1(), [J, re] = m.useState(null);
5068
+ J && T(J, d);
5069
+ }, [J, T, d]);
5070
+ const A = D === F, K = z1(), [Z, re] = m.useState(null);
5070
5071
  m.useEffect(() => {
5071
- if (!X || !I) return;
5072
- let U = !1;
5073
- return re(null), X.fetchAddressFields(I, u).then((R) => {
5074
- U || re({
5075
- country: I,
5076
- fields: R.address_fields.fields
5072
+ if (!K || !J) return;
5073
+ let q = !1;
5074
+ return re(null), K.fetchAddressFields(J, u).then((B) => {
5075
+ q || re({
5076
+ country: J,
5077
+ fields: B.address_fields.fields
5077
5078
  });
5078
5079
  }).catch(() => {
5079
- U || re({ country: I, fields: null });
5080
+ q || re({ country: J, fields: null });
5080
5081
  }), () => {
5081
- U = !0;
5082
+ q = !0;
5082
5083
  };
5083
- }, [X, I, u]);
5084
- const W = J?.country === F ? J?.fields : null, oe = m.useMemo(
5085
- () => N1(W ?? null).filter((U) => U !== "phone"),
5086
- [W]
5087
- ), B = m.useMemo(
5084
+ }, [K, J, u]);
5085
+ const G = Z?.country === F ? Z?.fields : null, oe = m.useMemo(
5086
+ () => N1(G ?? null).filter((q) => q !== "phone"),
5087
+ [G]
5088
+ ), O = m.useMemo(
5088
5089
  () => S1(oe),
5089
5090
  [oe]
5090
- ), ee = X ? I === null || J?.country === F : (
5091
+ ), ee = K ? J === null || Z?.country === F : (
5091
5092
  // Without the service, the option list is the only signal, so wait for it.
5092
- O
5093
- ), P = (U) => W ? Sr(W, U) : U === "state" ? K.length > 0 : Sr(null, U), G = (U) => {
5094
- const R = j1(W ?? null, U, {
5093
+ A
5094
+ ), P = (q) => G ? Sr(G, q) : q === "state" ? W.length > 0 : Sr(null, q), U = (q) => {
5095
+ const B = j1(G ?? null, q, {
5095
5096
  regionKey: j?.regionLabel,
5096
5097
  postalKey: j?.postalLabel
5097
5098
  });
5098
- return R.label ?? _(R.translationKey ?? U);
5099
+ return B.label ?? _(B.translationKey ?? q);
5099
5100
  }, xe = {
5100
5101
  name: "name_is_required",
5101
5102
  address1: "address_line_1_is_required",
5102
5103
  city: "city_is_required",
5103
5104
  state: "state_is_required",
5104
5105
  postal_code: "zip_code_is_required"
5105
- }, ye = E((U) => {
5106
+ }, ye = E((q) => {
5106
5107
  if (M(pl.map((ne) => ne.path)), !ee) return;
5107
- const R = oe.filter(
5108
- (ne) => P(ne) && !h0(U, ne)?.trim()
5108
+ const B = oe.filter(
5109
+ (ne) => P(ne) && !h0(q, ne)?.trim()
5109
5110
  );
5110
- if (R.length > 0) {
5111
- for (const ne of R) {
5112
- const D = xe[ne];
5113
- D && $(Xl(ne), {
5111
+ if (B.length > 0) {
5112
+ for (const ne of B) {
5113
+ const H = xe[ne];
5114
+ H && $(Xl(ne), {
5114
5115
  type: "manual",
5115
- message: _(D)
5116
+ message: _(H)
5116
5117
  });
5117
5118
  }
5118
5119
  return;
5119
5120
  }
5120
- a(U);
5121
+ a(q);
5121
5122
  }), Pe = m.useMemo(() => _(p ? "deleting" : b ? "tap_to_confirm" : "delete_card"), [p, b, _]);
5122
5123
  if (!n) return null;
5123
- const { details: Me } = n, Fe = gt(n, _("card_fallback")), De = Me.exp_month, Oe = Me.exp_year, He = (U) => {
5124
- const R = G(U);
5125
- return U === "address1" ? /* @__PURE__ */ i.jsx(
5124
+ const { details: Me } = n, Fe = gt(n, _("card_fallback")), De = Me.exp_month, Oe = Me.exp_year, He = (q) => {
5125
+ const B = U(q);
5126
+ return q === "address1" ? /* @__PURE__ */ i.jsx(
5126
5127
  F1,
5127
5128
  {
5128
5129
  control: w,
@@ -5133,35 +5134,35 @@ function f0({
5133
5134
  stateField: oe.includes("state") ? "billing_address.state" : void 0,
5134
5135
  postalCodeField: "billing_address.zip",
5135
5136
  stateOptions: S,
5136
- label: R,
5137
+ label: B,
5137
5138
  disabled: s
5138
5139
  },
5139
- U
5140
- ) : U === "state" && K.length > 0 ? /* @__PURE__ */ i.jsx(
5140
+ q
5141
+ ) : q === "state" && W.length > 0 ? /* @__PURE__ */ i.jsx(
5141
5142
  Wl,
5142
5143
  {
5143
5144
  control: w,
5144
5145
  name: "billing_address.state",
5145
- label: R,
5146
- options: K,
5146
+ label: B,
5147
+ options: W,
5147
5148
  placeholder: _("select_state")
5148
5149
  },
5149
- U
5150
+ q
5150
5151
  ) : /* @__PURE__ */ i.jsx(
5151
5152
  e0,
5152
5153
  {
5153
5154
  control: w,
5154
- name: Xl(U),
5155
- label: R
5155
+ name: Xl(q),
5156
+ label: B
5156
5157
  },
5157
- U
5158
+ q
5158
5159
  );
5159
5160
  };
5160
5161
  return /* @__PURE__ */ i.jsxs(
5161
5162
  Te,
5162
5163
  {
5163
5164
  open: e,
5164
- onOpenChange: (U) => !U && r(),
5165
+ onOpenChange: (q) => !q && r(),
5165
5166
  title: _("edit_card"),
5166
5167
  presentation: x,
5167
5168
  children: [
@@ -5202,16 +5203,16 @@ function f0({
5202
5203
  }
5203
5204
  }
5204
5205
  ),
5205
- B.map((U) => /* @__PURE__ */ i.jsx(
5206
+ O.map((q) => /* @__PURE__ */ i.jsx(
5206
5207
  "div",
5207
5208
  {
5208
5209
  className: ie(
5209
5210
  "grid grid-cols-1 gap-3",
5210
- U.length === 3 ? "sm:grid-cols-3" : U.length === 2 ? "sm:grid-cols-2" : void 0
5211
+ q.length === 3 ? "sm:grid-cols-3" : q.length === 2 ? "sm:grid-cols-2" : void 0
5211
5212
  ),
5212
- children: U.map((R) => He(R))
5213
+ children: q.map((B) => He(B))
5213
5214
  },
5214
- U.join("-")
5215
+ q.join("-")
5215
5216
  ))
5216
5217
  ] })
5217
5218
  ] })
@@ -5221,13 +5222,13 @@ function f0({
5221
5222
  {
5222
5223
  control: w,
5223
5224
  name: "set_as_default",
5224
- render: ({ field: U }) => /* @__PURE__ */ i.jsxs("div", { className: "mt-2 flex items-center gap-x-2", children: [
5225
+ render: ({ field: q }) => /* @__PURE__ */ i.jsxs("div", { className: "mt-2 flex items-center gap-x-2", children: [
5225
5226
  /* @__PURE__ */ i.jsx(
5226
5227
  lr,
5227
5228
  {
5228
5229
  id: "set_as_default",
5229
- checked: U.value,
5230
- onCheckedChange: (R) => U.onChange(R === !0)
5230
+ checked: q.value,
5231
+ onCheckedChange: (B) => q.onChange(B === !0)
5231
5232
  }
5232
5233
  ),
5233
5234
  /* @__PURE__ */ i.jsx(ve, { htmlFor: "set_as_default", className: "text-sm font-normal", children: _("set_as_default_payment_method") })
@@ -5237,7 +5238,7 @@ function f0({
5237
5238
  o && /* @__PURE__ */ i.jsx("div", { className: "text-destructive text-sm", children: o }),
5238
5239
  /* @__PURE__ */ i.jsxs(Ke, { className: "flex flex-row items-center justify-between gap-2", children: [
5239
5240
  h ? /* @__PURE__ */ i.jsxs(
5240
- Z,
5241
+ X,
5241
5242
  {
5242
5243
  type: "button",
5243
5244
  variant: "ghost",
@@ -5254,7 +5255,7 @@ function f0({
5254
5255
  ) : /* @__PURE__ */ i.jsx("span", {}),
5255
5256
  /* @__PURE__ */ i.jsxs("div", { className: "flex items-center gap-2", children: [
5256
5257
  /* @__PURE__ */ i.jsx(
5257
- Z,
5258
+ X,
5258
5259
  {
5259
5260
  type: "button",
5260
5261
  variant: "secondary",
@@ -5264,7 +5265,7 @@ function f0({
5264
5265
  }
5265
5266
  ),
5266
5267
  /* @__PURE__ */ i.jsxs(
5267
- Z,
5268
+ X,
5268
5269
  {
5269
5270
  type: "button",
5270
5271
  onClick: ye,
@@ -5285,16 +5286,16 @@ function p0(e) {
5285
5286
  const n = e.trim();
5286
5287
  return n ? /^https?:\/\//i.test(n) ? n : `https://${n}` : "";
5287
5288
  }
5288
- const st = me().transform(p0).pipe(me().url().or(Wo("")));
5289
+ const ot = me().transform(p0).pipe(me().url().or(Wo("")));
5289
5290
  Ct({
5290
5291
  bio: me().optional(),
5291
- linkedin: st,
5292
- facebook: st,
5293
- twitter: st,
5294
- instagram: st,
5295
- youtube: st,
5296
- pinterest: st,
5297
- tiktok: st,
5292
+ linkedin: ot,
5293
+ facebook: ot,
5294
+ twitter: ot,
5295
+ instagram: ot,
5296
+ youtube: ot,
5297
+ pinterest: ot,
5298
+ tiktok: ot,
5298
5299
  whatsapp: me().optional(),
5299
5300
  wechat: me().optional()
5300
5301
  });
@@ -5754,26 +5755,26 @@ function Bn(e, n) {
5754
5755
  Bn = /* @__PURE__ */ l.forwardRef(Bn);
5755
5756
  Bn.propTypes = {
5756
5757
  // Parses a single characher of `<input/>` text.
5757
- parse: H.func.isRequired,
5758
+ parse: k.func.isRequired,
5758
5759
  // Formats `value` into `<input/>` text.
5759
- format: H.func.isRequired,
5760
+ format: k.func.isRequired,
5760
5761
  // Renders `<input/>` by default.
5761
- inputComponent: H.elementType,
5762
+ inputComponent: k.elementType,
5762
5763
  // `<input/>` `type` attribute.
5763
- type: H.string,
5764
+ type: k.string,
5764
5765
  // Is parsed from <input/> text.
5765
- value: H.string,
5766
+ value: k.string,
5766
5767
  // An initial value for an "uncontrolled" <input/>.
5767
- defaultValue: H.string,
5768
+ defaultValue: k.string,
5768
5769
  // This handler is called each time `<input/>` text is changed.
5769
- onChange: H.func,
5770
+ onChange: k.func,
5770
5771
  // Whether this input should be "controlled" or "uncontrolled".
5771
5772
  // The default value is `true` meaning "uncontrolled".
5772
- controlled: H.bool,
5773
+ controlled: k.bool,
5773
5774
  // Passthrough
5774
- onKeyDown: H.func,
5775
- onCut: H.func,
5776
- onPaste: H.func
5775
+ onKeyDown: k.func,
5776
+ onCut: k.func,
5777
+ onPaste: k.func
5777
5778
  };
5778
5779
  function ia(e, n) {
5779
5780
  e = e.split("-"), n = n.split("-");
@@ -8956,17 +8957,17 @@ function y5(e) {
8956
8957
  * digits and possibly a leading plus character".
8957
8958
  * Examples: `""`, `"+"`, `"+123"`, `"123"`.
8958
8959
  */
8959
- value: H.string.isRequired,
8960
+ value: k.string.isRequired,
8960
8961
  /**
8961
8962
  * A function of `value: string`.
8962
8963
  * Updates the `value` property.
8963
8964
  */
8964
- onChange: H.func.isRequired,
8965
+ onChange: k.func.isRequired,
8965
8966
  /**
8966
8967
  * A function of `event: Event`.
8967
8968
  * Handles `keydown` events.
8968
8969
  */
8969
- onKeyDown: H.func,
8970
+ onKeyDown: k.func,
8970
8971
  /**
8971
8972
  * A two-letter country code for formatting `value`
8972
8973
  * as a national phone number (e.g. `(800) 555 35 35`).
@@ -8978,15 +8979,15 @@ function y5(e) {
8978
8979
  * because it only applies when the user inputs a phone number in a national format
8979
8980
  * and is completely ignored when the user inputs a phone number in an international format.
8980
8981
  */
8981
- country: H.string,
8982
+ country: k.string,
8982
8983
  /**
8983
8984
  * The format that the input field value is being input/output in.
8984
8985
  */
8985
- inputFormat: H.oneOf(["INTERNATIONAL", "NATIONAL_PART_OF_INTERNATIONAL", "NATIONAL", "INTERNATIONAL_OR_NATIONAL"]).isRequired,
8986
+ inputFormat: k.oneOf(["INTERNATIONAL", "NATIONAL_PART_OF_INTERNATIONAL", "NATIONAL", "INTERNATIONAL_OR_NATIONAL"]).isRequired,
8986
8987
  /**
8987
8988
  * `libphonenumber-js` metadata.
8988
8989
  */
8989
- metadata: H.object
8990
+ metadata: k.object
8990
8991
  }, n;
8991
8992
  }
8992
8993
  const _5 = y5();
@@ -9052,17 +9053,17 @@ function $5(e) {
9052
9053
  * digits and possibly a leading plus character".
9053
9054
  * Examples: `""`, `"+"`, `"+123"`, `"123"`.
9054
9055
  */
9055
- value: H.string.isRequired,
9056
+ value: k.string.isRequired,
9056
9057
  /**
9057
9058
  * A function of `value: string`.
9058
9059
  * Updates the `value` property.
9059
9060
  */
9060
- onChange: H.func.isRequired,
9061
+ onChange: k.func.isRequired,
9061
9062
  /**
9062
9063
  * A function of `event: Event`.
9063
9064
  * Handles `keydown` events.
9064
9065
  */
9065
- onKeyDown: H.func,
9066
+ onKeyDown: k.func,
9066
9067
  /**
9067
9068
  * A two-letter country code for formatting `value`
9068
9069
  * as a national phone number (e.g. `(800) 555 35 35`).
@@ -9074,19 +9075,19 @@ function $5(e) {
9074
9075
  * because it only applies when the user inputs a phone number in a national format
9075
9076
  * and is completely ignored when the user inputs a phone number in an international format.
9076
9077
  */
9077
- country: H.string,
9078
+ country: k.string,
9078
9079
  /**
9079
9080
  * The format that the input field value is being input/output in.
9080
9081
  */
9081
- inputFormat: H.oneOf(["INTERNATIONAL", "NATIONAL_PART_OF_INTERNATIONAL", "NATIONAL", "INTERNATIONAL_OR_NATIONAL"]).isRequired,
9082
+ inputFormat: k.oneOf(["INTERNATIONAL", "NATIONAL_PART_OF_INTERNATIONAL", "NATIONAL", "INTERNATIONAL_OR_NATIONAL"]).isRequired,
9082
9083
  /**
9083
9084
  * `libphonenumber-js` metadata.
9084
9085
  */
9085
- metadata: H.object,
9086
+ metadata: k.object,
9086
9087
  /**
9087
9088
  * The `<input/>` component.
9088
9089
  */
9089
- inputComponent: H.elementType
9090
+ inputComponent: k.elementType
9090
9091
  }, n;
9091
9092
  }
9092
9093
  const F5 = $5();
@@ -9180,25 +9181,25 @@ es.propTypes = {
9180
9181
  * A two-letter country code.
9181
9182
  * Example: "US", "RU", etc.
9182
9183
  */
9183
- value: H.string,
9184
+ value: k.string,
9184
9185
  /**
9185
9186
  * A function of `value: string`.
9186
9187
  * Updates the `value` property.
9187
9188
  */
9188
- onChange: H.func.isRequired,
9189
+ onChange: k.func.isRequired,
9189
9190
  // `<select/>` options.
9190
- options: H.arrayOf(H.shape({
9191
- value: H.string,
9192
- label: H.string,
9193
- divider: H.bool
9191
+ options: k.arrayOf(k.shape({
9192
+ value: k.string,
9193
+ label: k.string,
9194
+ divider: k.bool
9194
9195
  })).isRequired,
9195
9196
  // `readonly` attribute doesn't work on a `<select/>`.
9196
9197
  // https://github.com/catamphetamine/react-phone-number-input/issues/419#issuecomment-1764384480
9197
9198
  // https://www.delftstack.com/howto/html/html-select-readonly/
9198
9199
  // To work around that, if `readOnly: true` property is passed
9199
9200
  // to this component, it behaves analogous to `disabled: true`.
9200
- disabled: H.bool,
9201
- readOnly: H.bool
9201
+ disabled: k.bool,
9202
+ readOnly: k.bool
9202
9203
  };
9203
9204
  var P5 = {
9204
9205
  fontSize: "1px",
@@ -9228,11 +9229,11 @@ function ts(e) {
9228
9229
  }
9229
9230
  ts.propTypes = {
9230
9231
  // Country flag component.
9231
- iconComponent: H.elementType,
9232
+ iconComponent: k.elementType,
9232
9233
  // Select arrow component.
9233
- arrowComponent: H.elementType,
9234
+ arrowComponent: k.elementType,
9234
9235
  // Set to `true` to render Unicode flag icons instead of SVG images.
9235
- unicodeFlags: H.bool
9236
+ unicodeFlags: k.bool
9236
9237
  };
9237
9238
  function A5() {
9238
9239
  return /* @__PURE__ */ l.createElement("div", {
@@ -9290,9 +9291,9 @@ function bl(e) {
9290
9291
  bl.propTypes = {
9291
9292
  // The country to be selected by default.
9292
9293
  // Two-letter country code ("ISO 3166-1 alpha-2").
9293
- country: H.string.isRequired,
9294
+ country: k.string.isRequired,
9294
9295
  // Will be HTML `title` attribute of the `<img/>`.
9295
- countryName: H.string.isRequired,
9296
+ countryName: k.string.isRequired,
9296
9297
  // Country flag icon components.
9297
9298
  // By default flag icons are inserted as `<img/>`s
9298
9299
  // with their `src` pointed to `country-flag-icons` gitlab pages website.
@@ -9300,10 +9301,10 @@ bl.propTypes = {
9300
9301
  // where having a large (3 megabyte) `<svg/>` flags
9301
9302
  // bundle is more appropriate.
9302
9303
  // `import flags from 'react-phone-number-input/flags'`.
9303
- flags: H.objectOf(H.elementType),
9304
+ flags: k.objectOf(k.elementType),
9304
9305
  // A URL for a country flag icon.
9305
9306
  // By default it points to `country-flag-icons` gitlab pages website.
9306
- flagUrl: H.string.isRequired
9307
+ flagUrl: k.string.isRequired
9307
9308
  };
9308
9309
  var I5 = ["aspectRatio"], O5 = ["title"], L5 = ["title"];
9309
9310
  function Un() {
@@ -9338,8 +9339,8 @@ function mr(e) {
9338
9339
  return n === 1 ? /* @__PURE__ */ l.createElement(ls, t) : /* @__PURE__ */ l.createElement(rs, t);
9339
9340
  }
9340
9341
  mr.propTypes = {
9341
- title: H.string.isRequired,
9342
- aspectRatio: H.number
9342
+ title: k.string.isRequired,
9343
+ aspectRatio: k.number
9343
9344
  };
9344
9345
  function rs(e) {
9345
9346
  var n = e.title, t = wl(e, O5);
@@ -9381,7 +9382,7 @@ function rs(e) {
9381
9382
  }));
9382
9383
  }
9383
9384
  rs.propTypes = {
9384
- title: H.string.isRequired
9385
+ title: k.string.isRequired
9385
9386
  };
9386
9387
  function ls(e) {
9387
9388
  var n = e.title, t = wl(e, L5);
@@ -9420,7 +9421,7 @@ function ls(e) {
9420
9421
  }));
9421
9422
  }
9422
9423
  ls.propTypes = {
9423
- title: H.string.isRequired
9424
+ title: k.string.isRequired
9424
9425
  };
9425
9426
  function R5(e) {
9426
9427
  if (e.length < 2 || e[0] !== "+")
@@ -9556,9 +9557,9 @@ function ss(e) {
9556
9557
  }));
9557
9558
  }
9558
9559
  return s.propTypes = {
9559
- country: H.string,
9560
- label: H.string.isRequired,
9561
- aspectRatio: H.number
9560
+ country: k.string,
9561
+ label: k.string.isRequired,
9562
+ aspectRatio: k.number
9562
9563
  }, s;
9563
9564
  }
9564
9565
  ss({
@@ -9602,10 +9603,10 @@ function Z5(e, n) {
9602
9603
  function J5(e, n) {
9603
9604
  typeof e == "function" ? e(n) : e.current = n;
9604
9605
  }
9605
- var os = H.shape({
9606
- country_calling_codes: H.object.isRequired,
9607
- countries: H.object.isRequired
9608
- }), cs = H.objectOf(H.string);
9606
+ var os = k.shape({
9607
+ country_calling_codes: k.object.isRequired,
9608
+ countries: k.object.isRequired
9609
+ }), cs = k.objectOf(k.string);
9609
9610
  function et(e, n) {
9610
9611
  var t = "+" + lt(e, n);
9611
9612
  return t;
@@ -9841,8 +9842,8 @@ function mm(e, n) {
9841
9842
  function hm(e, n, t) {
9842
9843
  var r = e.metadata, a = e.countries, s = e.defaultCountry, o = e.value, c = e.reset, d = e.international, u = e.displayInitialValueAsLocalNumber, h = e.initialValueFormat, p = n.defaultCountry, x = n.value, _ = n.reset;
9843
9844
  t.country;
9844
- var b = t.value, f = t.hasUserSelectedACountry, v = t.latestCountrySelectedByUser, w = function(k) {
9845
- return hs(_n(_n({}, k), {}, {
9845
+ var b = t.value, f = t.hasUserSelectedACountry, v = t.latestCountrySelectedByUser, w = function(T) {
9846
+ return hs(_n(_n({}, T), {}, {
9846
9847
  international: d,
9847
9848
  useNationalFormat: u || h === "national",
9848
9849
  metadata: r
@@ -9901,8 +9902,8 @@ function hm(e, n, t) {
9901
9902
  var S;
9902
9903
  if (o) {
9903
9904
  if (v) {
9904
- var A = M ? v === M : bt(o, v, r);
9905
- A ? M || (M = v) : S = {
9905
+ var D = M ? v === M : bt(o, v, r);
9906
+ D ? M || (M = v) : S = {
9906
9907
  latestCountrySelectedByUser: void 0
9907
9908
  };
9908
9909
  }
@@ -10061,30 +10062,30 @@ var $m = /* @__PURE__ */ (function(e) {
10061
10062
  var w = r.props.metadata;
10062
10063
  return hr(v, w);
10063
10064
  }), Re(r, "onCountryChange", function(v) {
10064
- var w = r.props, E = w.international, C = w.metadata, z = w.onChange, $ = w.focusInputOnCountrySelection, M = r.state, F = M.phoneDigits, S = M.country, A = rm(F, {
10065
+ var w = r.props, E = w.international, C = w.metadata, z = w.onChange, $ = w.focusInputOnCountrySelection, M = r.state, F = M.phoneDigits, S = M.country, D = rm(F, {
10065
10066
  prevCountry: S,
10066
10067
  newCountry: v,
10067
10068
  metadata: C,
10068
10069
  // Convert the phone number to "national" format
10069
10070
  // when the user changes the selected country by hand.
10070
10071
  useNationalFormat: !E
10071
- }), j = xt(A, v, C);
10072
+ }), j = xt(D, v, C);
10072
10073
  $ && r.inputRef.current.focus(), r.setState({
10073
10074
  country: v,
10074
10075
  latestCountrySelectedByUser: v,
10075
10076
  hasUserSelectedACountry: !0,
10076
- phoneDigits: A,
10077
+ phoneDigits: D,
10077
10078
  value: j
10078
10079
  }, function() {
10079
10080
  z(j);
10080
10081
  });
10081
10082
  }), Re(r, "onChange", function(v) {
10082
- var w = r.props, E = w.defaultCountry, C = w.onChange, z = w.addInternationalOption, $ = w.international, M = w.limitMaxLength, F = w.countryCallingCodeEditable, S = w.metadata, A = r.state, j = A.countries, k = A.phoneDigits, L = A.country, K = A.latestCountrySelectedByUser, V = im(v, {
10083
- prevPhoneDigits: k,
10083
+ var w = r.props, E = w.defaultCountry, C = w.onChange, z = w.addInternationalOption, $ = w.international, M = w.limitMaxLength, F = w.countryCallingCodeEditable, S = w.metadata, D = r.state, j = D.countries, T = D.phoneDigits, L = D.country, W = D.latestCountrySelectedByUser, R = im(v, {
10084
+ prevPhoneDigits: T,
10084
10085
  country: L,
10085
10086
  countryRequired: !z,
10086
10087
  defaultCountry: E,
10087
- latestCountrySelectedByUser: K,
10088
+ latestCountrySelectedByUser: W,
10088
10089
  getAnyCountry: function() {
10089
10090
  return r.getFirstSupportedCountry({
10090
10091
  countries: j
@@ -10095,19 +10096,19 @@ var $m = /* @__PURE__ */ (function(e) {
10095
10096
  limitMaxLength: M,
10096
10097
  countryCallingCodeEditable: F,
10097
10098
  metadata: S
10098
- }), Y = V.phoneDigits, I = V.country, O = V.value, X = {
10099
+ }), Y = R.phoneDigits, J = R.country, A = R.value, K = {
10099
10100
  phoneDigits: Y,
10100
- value: O,
10101
- country: I
10101
+ value: A,
10102
+ country: J
10102
10103
  };
10103
- K && O && !bt(O, K, S) && (X.latestCountrySelectedByUser = void 0), F === !1 && !O && Y === r.state.phoneDigits && (X.forceRerender = {}), r.setState(
10104
- X,
10104
+ W && A && !bt(A, W, S) && (K.latestCountrySelectedByUser = void 0), F === !1 && !A && Y === r.state.phoneDigits && (K.forceRerender = {}), r.setState(
10105
+ K,
10105
10106
  // Update the new `value` property.
10106
10107
  // Doing it after the `state` has been updated
10107
10108
  // because `onChange()` will trigger `getDerivedStateFromProps()`
10108
10109
  // with the new `value` which will be compared to `state.value` there.
10109
10110
  function() {
10110
- return C(O);
10111
+ return C(A);
10111
10112
  }
10112
10113
  );
10113
10114
  }), Re(r, "_onFocus", function() {
@@ -10249,13 +10250,13 @@ var $m = /* @__PURE__ */ (function(e) {
10249
10250
  r.flags, r.flagComponent, r.flagUrl, r.addInternationalOption, r.internationalIcon, r.displayInitialValueAsLocalNumber, r.initialValueFormat, r.onCountryChange, r.limitMaxLength, r.countryCallingCodeEditable, r.focusInputOnCountrySelection, r.reset;
10250
10251
  var E = r.metadata, C = r.international;
10251
10252
  r.locales;
10252
- var z = pm(r, fm), $ = this.state, M = $.country, F = $.countries, S = $.phoneDigits, A = $.isFocused, j = x ? _5 : F5, k = this.getCountrySelectOptions({
10253
+ var z = pm(r, fm), $ = this.state, M = $.country, F = $.countries, S = $.phoneDigits, D = $.isFocused, j = x ? _5 : F5, T = this.getCountrySelectOptions({
10253
10254
  countries: F
10254
10255
  });
10255
10256
  return /* @__PURE__ */ l.createElement(f, wt({
10256
10257
  style: d,
10257
10258
  className: Ln(u, "PhoneInput", {
10258
- "PhoneInput--focus": A,
10259
+ "PhoneInput--focus": D,
10259
10260
  "PhoneInput--disabled": s,
10260
10261
  "PhoneInput--readOnly": o
10261
10262
  })
@@ -10264,7 +10265,7 @@ var $m = /* @__PURE__ */ (function(e) {
10264
10265
  "aria-label": w.country
10265
10266
  }, b, {
10266
10267
  value: M,
10267
- options: k,
10268
+ options: T,
10268
10269
  onChange: this.onCountryChange,
10269
10270
  onFocus: this.onCountryFocus,
10270
10271
  onBlur: this.onCountryBlur,
@@ -10323,7 +10324,7 @@ gs.propTypes = {
10323
10324
  *
10324
10325
  * Any "falsy" value like `undefined`, `null` or an empty string `""` is treated like "empty".
10325
10326
  */
10326
- value: H.string,
10327
+ value: k.string,
10327
10328
  /**
10328
10329
  * A function of `value: string?`.
10329
10330
  *
@@ -10331,27 +10332,27 @@ gs.propTypes = {
10331
10332
  *
10332
10333
  * If the user erases the input value, the argument is `undefined`.
10333
10334
  */
10334
- onChange: H.func.isRequired,
10335
+ onChange: k.func.isRequired,
10335
10336
  /**
10336
10337
  * Toggles the `--focus` CSS class.
10337
10338
  * @ignore
10338
10339
  */
10339
- onFocus: H.func,
10340
+ onFocus: k.func,
10340
10341
  /**
10341
10342
  * `onBlur` is usually passed by `redux-form`.
10342
10343
  * @ignore
10343
10344
  */
10344
- onBlur: H.func,
10345
+ onBlur: k.func,
10345
10346
  /**
10346
10347
  * Set to `true` to mark both the phone number `<input/>`
10347
10348
  * and the country `<select/>` as `disabled`.
10348
10349
  */
10349
- disabled: H.bool,
10350
+ disabled: k.bool,
10350
10351
  /**
10351
10352
  * Set to `true` to mark both the phone number `<input/>`
10352
10353
  * and the country `<select/>` as `readonly`.
10353
10354
  */
10354
- readOnly: H.bool,
10355
+ readOnly: k.bool,
10355
10356
  /**
10356
10357
  * Sets `autoComplete` property for phone number `<input/>`.
10357
10358
  *
@@ -10373,7 +10374,7 @@ gs.propTypes = {
10373
10374
  * what was submitted previously".
10374
10375
  */
10375
10376
  // (is `"tel"` by default)
10376
- autoComplete: H.string,
10377
+ autoComplete: k.string,
10377
10378
  /**
10378
10379
  * Set to `"national"` to show the initial `value` in
10379
10380
  * "national" format rather than "international".
@@ -10394,10 +10395,10 @@ gs.propTypes = {
10394
10395
  * Future people won't be using "national" format, only "international".
10395
10396
  */
10396
10397
  // (is `undefined` by default)
10397
- initialValueFormat: H.oneOf(["national"]),
10398
+ initialValueFormat: k.oneOf(["national"]),
10398
10399
  // `displayInitialValueAsLocalNumber` property has been
10399
10400
  // superceded by `initialValueFormat` property.
10400
- displayInitialValueAsLocalNumber: H.bool,
10401
+ displayInitialValueAsLocalNumber: k.bool,
10401
10402
  /**
10402
10403
  * The country to be selected by default.
10403
10404
  * For example, can be set after a GeoIP lookup.
@@ -10405,7 +10406,7 @@ gs.propTypes = {
10405
10406
  * Example: `"US"`.
10406
10407
  */
10407
10408
  // A two-letter country code ("ISO 3166-1 alpha-2").
10408
- defaultCountry: H.string,
10409
+ defaultCountry: k.string,
10409
10410
  /**
10410
10411
  * If specified, only these countries will be available for selection.
10411
10412
  *
@@ -10413,7 +10414,7 @@ gs.propTypes = {
10413
10414
  *
10414
10415
  * `["RU", "UA", "KZ"]`
10415
10416
  */
10416
- countries: H.arrayOf(H.string),
10417
+ countries: k.arrayOf(k.string),
10417
10418
  /**
10418
10419
  * Custom country `<select/>` option names.
10419
10420
  * Also some labels like "ext" and country `<select/>` `aria-label`.
@@ -10438,7 +10439,7 @@ gs.propTypes = {
10438
10439
  * and can be either a Unicode BCP 47 locale identifier or an array of such locale identifiers.
10439
10440
  * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument
10440
10441
  */
10441
- locales: H.oneOfType([H.string, H.arrayOf(H.string)]),
10442
+ locales: k.oneOfType([k.string, k.arrayOf(k.string)]),
10442
10443
  /*
10443
10444
  * Custom country `<select/>` options sorting function.
10444
10445
  * The default one uses `a.localeCompare(b)`, and,
@@ -10461,7 +10462,7 @@ gs.propTypes = {
10461
10462
  * one should check the `CHANGELOG.md` every time before updating this library,
10462
10463
  * otherwise there's a possibility that some new country flag would be missing.
10463
10464
  */
10464
- flagUrl: H.string,
10465
+ flagUrl: k.string,
10465
10466
  /**
10466
10467
  * Custom country flag icon components.
10467
10468
  * These flags will be used instead of the default ones.
@@ -10484,7 +10485,7 @@ gs.propTypes = {
10484
10485
  *
10485
10486
  * `<PhoneInput flags={flags} .../>`
10486
10487
  */
10487
- flags: H.objectOf(H.elementType),
10488
+ flags: k.objectOf(k.elementType),
10488
10489
  /**
10489
10490
  * Country flag icon component.
10490
10491
  *
@@ -10495,11 +10496,11 @@ gs.propTypes = {
10495
10496
  * * `flagUrl: string` — The `flagUrl` property (see above).
10496
10497
  * * `flags: object` — The `flags` property (see above).
10497
10498
  */
10498
- flagComponent: H.elementType,
10499
+ flagComponent: k.elementType,
10499
10500
  /**
10500
10501
  * Set to `false` to remove the "International" option from country `<select/>`.
10501
10502
  */
10502
- addInternationalOption: H.bool,
10503
+ addInternationalOption: k.bool,
10503
10504
  /**
10504
10505
  * "International" icon component.
10505
10506
  * Should have the same aspect ratio.
@@ -10508,7 +10509,7 @@ gs.propTypes = {
10508
10509
  *
10509
10510
  * * `title: string` — "International" country option label.
10510
10511
  */
10511
- internationalIcon: H.elementType,
10512
+ internationalIcon: k.elementType,
10512
10513
  /**
10513
10514
  * Can be used to place some countries on top of the list of country `<select/>` options.
10514
10515
  *
@@ -10521,15 +10522,15 @@ gs.propTypes = {
10521
10522
  *
10522
10523
  * `["US", "CA", "AU", "|", "..."]`
10523
10524
  */
10524
- countryOptionsOrder: H.arrayOf(H.string),
10525
+ countryOptionsOrder: k.arrayOf(k.string),
10525
10526
  /**
10526
10527
  * `<Phone/>` component CSS style object.
10527
10528
  */
10528
- style: H.object,
10529
+ style: k.object,
10529
10530
  /**
10530
10531
  * `<Phone/>` component CSS class.
10531
10532
  */
10532
- className: H.string,
10533
+ className: k.string,
10533
10534
  /**
10534
10535
  * Country `<select/>` component.
10535
10536
  *
@@ -10547,13 +10548,13 @@ gs.propTypes = {
10547
10548
  * * `tabIndex: (number|string)?` — HTML `tabIndex` attribute.
10548
10549
  * * `className: string` — CSS class name.
10549
10550
  */
10550
- countrySelectComponent: H.elementType,
10551
+ countrySelectComponent: k.elementType,
10551
10552
  /**
10552
10553
  * Country `<select/>` component props.
10553
10554
  * Along with the usual DOM properties such as `aria-label` and `tabIndex`,
10554
10555
  * some custom properties are supported, such as `arrowComponent` and `unicodeFlags`.
10555
10556
  */
10556
- countrySelectProps: H.object,
10557
+ countrySelectProps: k.object,
10557
10558
  /**
10558
10559
  * Phone number `<input/>` component.
10559
10560
  *
@@ -10567,11 +10568,11 @@ gs.propTypes = {
10567
10568
  *
10568
10569
  * Must also either use `React.forwardRef()` to "forward" `ref` to the `<input/>` or implement `.focus()` method.
10569
10570
  */
10570
- inputComponent: H.elementType,
10571
+ inputComponent: k.elementType,
10571
10572
  /**
10572
10573
  * Phone number `<input/>` component props.
10573
10574
  */
10574
- numberInputProps: H.object,
10575
+ numberInputProps: k.object,
10575
10576
  /**
10576
10577
  * Wrapping `<div/>` component.
10577
10578
  *
@@ -10580,11 +10581,11 @@ gs.propTypes = {
10580
10581
  * * `style: object` — A component CSS style object.
10581
10582
  * * `className: string` — Classes to attach to the component, typically changes when component focuses or blurs.
10582
10583
  */
10583
- containerComponent: H.elementType,
10584
+ containerComponent: k.elementType,
10584
10585
  /**
10585
10586
  * Wrapping `<div/>` component props.
10586
10587
  */
10587
- containerComponentProps: H.object,
10588
+ containerComponentProps: k.object,
10588
10589
  /**
10589
10590
  * When the user attempts to insert a digit somewhere in the middle of a phone number,
10590
10591
  * the caret position is moved right before the next available digit skipping
@@ -10597,25 +10598,25 @@ gs.propTypes = {
10597
10598
  * with caret position during phone number input.
10598
10599
  */
10599
10600
  // Is `true` by default.
10600
- smartCaret: H.bool,
10601
+ smartCaret: k.bool,
10601
10602
  /**
10602
10603
  * Set to `true` to force "international" phone number format.
10603
10604
  * Set to `false` to force "national" phone number format.
10604
10605
  * By default it's `undefined` meaning that it doesn't enforce any phone number format:
10605
10606
  * the user can input their phone number in either "national" or "international" format.
10606
10607
  */
10607
- international: H.bool,
10608
+ international: k.bool,
10608
10609
  /**
10609
10610
  * If set to `true`, the phone number input will get trimmed
10610
10611
  * if it exceeds the maximum length for the country.
10611
10612
  */
10612
- limitMaxLength: H.bool,
10613
+ limitMaxLength: k.bool,
10613
10614
  /**
10614
10615
  * If set to `false`, and `international` is `true`, then
10615
10616
  * users won't be able to erase the "country calling part"
10616
10617
  * of a phone number in the `<input/>`.
10617
10618
  */
10618
- countryCallingCodeEditable: H.bool,
10619
+ countryCallingCodeEditable: k.bool,
10619
10620
  /**
10620
10621
  * `libphonenumber-js` metadata.
10621
10622
  *
@@ -10635,7 +10636,7 @@ gs.propTypes = {
10635
10636
  // therefore reducing "conversion" (that's a marketing term).
10636
10637
  // Assuming that the phone number's country is the user's country
10637
10638
  // is not 100% correct but in most cases I guess it's valid.
10638
- onCountryChange: H.func,
10639
+ onCountryChange: k.func,
10639
10640
  /**
10640
10641
  * If set to `false`, will not focus the `<input/>` component
10641
10642
  * when the user selects a country from the list of countries.
@@ -10645,7 +10646,7 @@ gs.propTypes = {
10645
10646
  * does not automatically cause a change of context unless the user
10646
10647
  * has been advised of the behaviour before using the component."
10647
10648
  */
10648
- focusInputOnCountrySelection: H.bool
10649
+ focusInputOnCountrySelection: k.bool
10649
10650
  };
10650
10651
  var Ga = {
10651
10652
  /**
@@ -10690,7 +10691,7 @@ var Ga = {
10690
10691
  * would be "stuck", if not using this `reset` property.
10691
10692
  */
10692
10693
  // https://github.com/catamphetamine/react-phone-number-input/issues/300
10693
- reset: H.any,
10694
+ reset: k.any,
10694
10695
  /**
10695
10696
  *
10696
10697
  */
@@ -17122,7 +17123,7 @@ function Nx({
17122
17123
  },
17123
17124
  children: [
17124
17125
  /* @__PURE__ */ i.jsx(nr, { asChild: !0, children: /* @__PURE__ */ i.jsxs(
17125
- Z,
17126
+ X,
17126
17127
  {
17127
17128
  type: "button",
17128
17129
  variant: "outline",
@@ -17244,10 +17245,10 @@ function Wn({
17244
17245
  e || f(!1);
17245
17246
  }, [e]), m.useEffect(() => {
17246
17247
  if (!b) return;
17247
- const B = setTimeout(() => f(!1), 3e3);
17248
- return () => clearTimeout(B);
17248
+ const O = setTimeout(() => f(!1), 3e3);
17249
+ return () => clearTimeout(O);
17249
17250
  }, [b]);
17250
- const z = m.useMemo(() => d(h ? "deleting" : b ? "tap_to_confirm" : "delete_address"), [h, b, d]), { control: $, handleSubmit: M, reset: F, setValue: S, setError: A, clearErrors: j } = tl(Sx, {
17251
+ const z = m.useMemo(() => d(h ? "deleting" : b ? "tap_to_confirm" : "delete_address"), [h, b, d]), { control: $, handleSubmit: M, reset: F, setValue: S, setError: D, clearErrors: j } = tl(Sx, {
17251
17252
  defaultValues: {
17252
17253
  name: "",
17253
17254
  address1: "",
@@ -17259,33 +17260,33 @@ function Wn({
17259
17260
  country_code: p,
17260
17261
  default: !1
17261
17262
  }
17262
- }), k = vi({ control: $, name: "country_code" }), { stateOptions: L, config: K, handleCountryChange: V } = _1();
17263
+ }), T = vi({ control: $, name: "country_code" }), { stateOptions: L, config: W, handleCountryChange: R } = _1();
17263
17264
  m.useEffect(() => {
17264
- if (!w || !k) return;
17265
- let B = !1;
17266
- return C(null), w.fetchAddressFields(k, x).then((ee) => {
17267
- B || C([...ee.address_fields.fields]);
17265
+ if (!w || !T) return;
17266
+ let O = !1;
17267
+ return C(null), w.fetchAddressFields(T, x).then((ee) => {
17268
+ O || C([...ee.address_fields.fields]);
17268
17269
  }).catch(() => {
17269
- B || C(null);
17270
+ O || C(null);
17270
17271
  }), () => {
17271
- B = !0;
17272
+ O = !0;
17272
17273
  };
17273
- }, [w, k, x]);
17274
- const Y = m.useMemo(() => N1(E), [E]), I = m.useMemo(
17274
+ }, [w, T, x]);
17275
+ const Y = m.useMemo(() => N1(E), [E]), J = m.useMemo(
17275
17276
  () => S1(Y),
17276
17277
  [Y]
17277
- ), O = (B) => {
17278
- const ee = j1(E, B, {
17279
- regionKey: K?.regionLabel,
17280
- postalKey: K?.postalLabel
17278
+ ), A = (O) => {
17279
+ const ee = j1(E, O, {
17280
+ regionKey: W?.regionLabel,
17281
+ postalKey: W?.postalLabel
17281
17282
  });
17282
- return ee.label ?? d(ee.translationKey ?? B);
17283
- }, X = [...s].map((B) => ({
17284
- name: B.name,
17285
- value: B.iso
17286
- })).sort((B, ee) => B.value === k ? -1 : ee.value === k ? 1 : B.name.localeCompare(ee.name)), J = L.map((B) => ({
17287
- name: B.name,
17288
- value: B.isoCode
17283
+ return ee.label ?? d(ee.translationKey ?? O);
17284
+ }, K = [...s].map((O) => ({
17285
+ name: O.name,
17286
+ value: O.iso
17287
+ })).sort((O, ee) => O.value === T ? -1 : ee.value === T ? 1 : O.name.localeCompare(ee.name)), Z = L.map((O) => ({
17288
+ name: O.name,
17289
+ value: O.isoCode
17289
17290
  }));
17290
17291
  m.useEffect(() => {
17291
17292
  e && (t ? (F({
@@ -17298,7 +17299,7 @@ function Wn({
17298
17299
  phone: t.phone ?? "",
17299
17300
  country_code: t.country_code ?? p,
17300
17301
  default: t.default
17301
- }), V(
17302
+ }), R(
17302
17303
  t.country_code ?? p,
17303
17304
  c
17304
17305
  )) : (F({
@@ -17311,18 +17312,18 @@ function Wn({
17311
17312
  phone: "",
17312
17313
  country_code: p,
17313
17314
  default: !1
17314
- }), V(p, c)));
17315
- }, [t, e, F, V, c]), m.useEffect(() => {
17316
- V(k, c);
17317
- }, [k, V, c]);
17318
- const re = M((B) => {
17315
+ }), R(p, c)));
17316
+ }, [t, e, F, R, c]), m.useEffect(() => {
17317
+ R(T, c);
17318
+ }, [T, R, c]);
17319
+ const re = M((O) => {
17319
17320
  j(Y);
17320
17321
  const ee = Y.filter(
17321
- (P) => Sr(E, P) && Px(B[P])
17322
+ (P) => Sr(E, P) && Px(O[P])
17322
17323
  );
17323
17324
  if (ee.length > 0) {
17324
17325
  for (const P of ee)
17325
- A(P, {
17326
+ D(P, {
17326
17327
  type: "manual",
17327
17328
  message: jx[P]
17328
17329
  });
@@ -17330,36 +17331,36 @@ function Wn({
17330
17331
  }
17331
17332
  r({
17332
17333
  address: {
17333
- name: B.name,
17334
- address1: B.address1,
17335
- address2: B.address2 ?? null,
17336
- city: B.city,
17337
- state: B.state,
17338
- postal_code: B.postal_code,
17339
- phone: B.phone || null,
17340
- country_code: B.country_code,
17341
- default: B.default
17334
+ name: O.name,
17335
+ address1: O.address1,
17336
+ address2: O.address2 ?? null,
17337
+ city: O.city,
17338
+ state: O.state,
17339
+ postal_code: O.postal_code,
17340
+ phone: O.phone || null,
17341
+ country_code: O.country_code,
17342
+ default: O.default
17342
17343
  }
17343
17344
  });
17344
- }), W = (B, ee) => {
17345
- const P = O(B);
17346
- return B === "state" && J.length > 0 ? /* @__PURE__ */ i.jsx(
17345
+ }), G = (O, ee) => {
17346
+ const P = A(O);
17347
+ return O === "state" && Z.length > 0 ? /* @__PURE__ */ i.jsx(
17347
17348
  Zl,
17348
17349
  {
17349
17350
  control: $,
17350
17351
  name: "state",
17351
17352
  label: P,
17352
17353
  placeholder: d("select_state"),
17353
- options: J,
17354
+ options: Z,
17354
17355
  containerClassName: ee,
17355
17356
  disabled: a
17356
17357
  },
17357
- B
17358
- ) : B === "address1" ? /* @__PURE__ */ i.jsxs("div", { className: ie("space-y-1", ee), children: [
17358
+ O
17359
+ ) : O === "address1" ? /* @__PURE__ */ i.jsxs("div", { className: ie("space-y-1", ee), children: [
17359
17360
  /* @__PURE__ */ i.jsx(
17360
17361
  ve,
17361
17362
  {
17362
- htmlFor: B,
17363
+ htmlFor: O,
17363
17364
  className: "mb-1.5 block text-sm font-medium",
17364
17365
  children: P
17365
17366
  }
@@ -17369,7 +17370,7 @@ function Wn({
17369
17370
  {
17370
17371
  control: $,
17371
17372
  setValue: S,
17372
- countryIso: k,
17373
+ countryIso: T,
17373
17374
  addressLineField: "address1",
17374
17375
  cityField: "city",
17375
17376
  stateField: Y.includes("state") ? "state" : void 0,
@@ -17378,12 +17379,12 @@ function Wn({
17378
17379
  disabled: a
17379
17380
  }
17380
17381
  )
17381
- ] }, B) : B === "phone" ? /* @__PURE__ */ i.jsx("div", { className: ee, children: /* @__PURE__ */ i.jsx(
17382
+ ] }, O) : O === "phone" ? /* @__PURE__ */ i.jsx("div", { className: ee, children: /* @__PURE__ */ i.jsx(
17382
17383
  $t,
17383
17384
  {
17384
17385
  control: $,
17385
17386
  name: "phone",
17386
- render: ({ field: { value: G, onChange: xe }, fieldState: { error: ye } }) => /* @__PURE__ */ i.jsxs("div", { className: "space-y-1", children: [
17387
+ render: ({ field: { value: U, onChange: xe }, fieldState: { error: ye } }) => /* @__PURE__ */ i.jsxs("div", { className: "space-y-1", children: [
17387
17388
  /* @__PURE__ */ i.jsx(
17388
17389
  ve,
17389
17390
  {
@@ -17396,9 +17397,9 @@ function Wn({
17396
17397
  Mx,
17397
17398
  {
17398
17399
  id: v,
17399
- value: G ?? "",
17400
+ value: U ?? "",
17400
17401
  onChange: xe,
17401
- defaultCountry: k,
17402
+ defaultCountry: T,
17402
17403
  error: !!ye,
17403
17404
  disabled: a,
17404
17405
  searchPlaceholder: d("search_country"),
@@ -17408,24 +17409,24 @@ function Wn({
17408
17409
  ye?.message && /* @__PURE__ */ i.jsx("p", { className: "text-destructive text-sm", children: ye.message })
17409
17410
  ] })
17410
17411
  }
17411
- ) }, B) : /* @__PURE__ */ i.jsx(
17412
+ ) }, O) : /* @__PURE__ */ i.jsx(
17412
17413
  v0,
17413
17414
  {
17414
17415
  control: $,
17415
- name: B,
17416
+ name: O,
17416
17417
  label: P,
17417
17418
  containerClassName: ee,
17418
17419
  disabled: a,
17419
- autoComplete: B === "name" ? "name" : void 0
17420
+ autoComplete: O === "name" ? "name" : void 0
17420
17421
  },
17421
- B
17422
+ O
17422
17423
  );
17423
17424
  }, oe = t !== null;
17424
17425
  return /* @__PURE__ */ i.jsxs(
17425
17426
  Te,
17426
17427
  {
17427
17428
  open: e,
17428
- onOpenChange: (B) => !B && n(),
17429
+ onOpenChange: (O) => !O && n(),
17429
17430
  title: d(oe ? "edit_address" : "add_an_address"),
17430
17431
  presentation: _,
17431
17432
  size: "wide",
@@ -17438,27 +17439,27 @@ function Wn({
17438
17439
  name: "country_code",
17439
17440
  label: d("country"),
17440
17441
  placeholder: d("select_an_option"),
17441
- options: X,
17442
+ options: K,
17442
17443
  disabled: a,
17443
17444
  onChange: () => {
17444
17445
  S("state", ""), j("state");
17445
17446
  }
17446
17447
  }
17447
17448
  ),
17448
- I.map((B) => B.length === 1 ? W(B[0]) : /* @__PURE__ */ i.jsx(
17449
+ J.map((O) => O.length === 1 ? G(O[0]) : /* @__PURE__ */ i.jsx(
17449
17450
  "div",
17450
17451
  {
17451
17452
  className: "flex flex-col gap-3 sm:flex-row",
17452
- children: B.map(
17453
- (ee) => W(ee, "min-w-0 flex-1")
17453
+ children: O.map(
17454
+ (ee) => G(ee, "min-w-0 flex-1")
17454
17455
  )
17455
17456
  },
17456
- B.join("-")
17457
+ O.join("-")
17457
17458
  ))
17458
17459
  ] }),
17459
17460
  /* @__PURE__ */ i.jsxs("div", { className: "mt-4 flex flex-wrap items-center justify-between gap-3", children: [
17460
17461
  u ? /* @__PURE__ */ i.jsxs(
17461
- Z,
17462
+ X,
17462
17463
  {
17463
17464
  type: "button",
17464
17465
  variant: "ghost",
@@ -17479,13 +17480,13 @@ function Wn({
17479
17480
  {
17480
17481
  control: $,
17481
17482
  name: "default",
17482
- render: ({ field: B }) => /* @__PURE__ */ i.jsxs("div", { className: "flex items-center gap-x-2", children: [
17483
+ render: ({ field: O }) => /* @__PURE__ */ i.jsxs("div", { className: "flex items-center gap-x-2", children: [
17483
17484
  /* @__PURE__ */ i.jsx(
17484
17485
  lr,
17485
17486
  {
17486
17487
  id: "set_as_default_address",
17487
- checked: B.value,
17488
- onCheckedChange: (ee) => B.onChange(ee === !0),
17488
+ checked: O.value,
17489
+ onCheckedChange: (ee) => O.onChange(ee === !0),
17489
17490
  disabled: a || h
17490
17491
  }
17491
17492
  ),
@@ -17501,7 +17502,7 @@ function Wn({
17501
17502
  }
17502
17503
  ),
17503
17504
  /* @__PURE__ */ i.jsxs(
17504
- Z,
17505
+ X,
17505
17506
  {
17506
17507
  type: "submit",
17507
17508
  onClick: re,
@@ -17597,13 +17598,13 @@ function Ax() {
17597
17598
  "vgs-expiration-date",
17598
17599
  "vgs-cvc",
17599
17600
  "vgs-card-holder"
17600
- ].every((I) => {
17601
- const O = document.getElementById(I);
17602
- return O && O.isConnected;
17603
- }) ? !0 : $ >= M ? !1 : ($++, await new Promise((I) => setTimeout(I, F)), S());
17601
+ ].every((J) => {
17602
+ const A = document.getElementById(J);
17603
+ return A && A.isConnected;
17604
+ }) ? !0 : $ >= M ? !1 : ($++, await new Promise((J) => setTimeout(J, F)), S());
17604
17605
  if (!await S())
17605
17606
  throw new Error("Payment form elements not ready");
17606
- const j = document.getElementById("vgs-card-number"), k = j ? getComputedStyle(j) : null, L = k?.getPropertyValue("--color-foreground").trim() || "#0a0a0a", K = k?.getPropertyValue("--color-muted-foreground").trim() || "#737373", V = {
17607
+ const j = document.getElementById("vgs-card-number"), T = j ? getComputedStyle(j) : null, L = T?.getPropertyValue("--color-foreground").trim() || "#0a0a0a", W = T?.getPropertyValue("--color-muted-foreground").trim() || "#737373", R = {
17607
17608
  fontSize: "16px",
17608
17609
  fontFamily: "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
17609
17610
  color: L,
@@ -17616,7 +17617,7 @@ function Ax() {
17616
17617
  lineHeight: "26px",
17617
17618
  height: "100%",
17618
17619
  width: "100%",
17619
- "&::placeholder": { color: K, opacity: 1 },
17620
+ "&::placeholder": { color: W, opacity: 1 },
17620
17621
  "&:focus": { outline: "none" }
17621
17622
  };
17622
17623
  z.field("#vgs-card-number", {
@@ -17624,7 +17625,7 @@ function Ax() {
17624
17625
  name: "card_number",
17625
17626
  placeholder: "0000 0000 0000 0000",
17626
17627
  showCardIcon: !0,
17627
- css: { ...V, paddingRight: "40px" },
17628
+ css: { ...R, paddingRight: "40px" },
17628
17629
  autoComplete: "cc-number",
17629
17630
  validations: ["required", "validCardNumber"]
17630
17631
  }), z.field("#vgs-expiration-date", {
@@ -17632,21 +17633,21 @@ function Ax() {
17632
17633
  name: "card_exp",
17633
17634
  yearLength: 2,
17634
17635
  placeholder: "MM / YY",
17635
- css: V,
17636
+ css: R,
17636
17637
  autoComplete: "cc-exp",
17637
17638
  validations: ["required", "validCardExpirationDate"]
17638
17639
  }), z.field("#vgs-cvc", {
17639
17640
  type: "card-security-code",
17640
17641
  name: "card_cvc",
17641
17642
  placeholder: "123",
17642
- css: V,
17643
+ css: R,
17643
17644
  autoComplete: "cc-csc",
17644
17645
  validations: ["required", "validCardSecurityCode"]
17645
17646
  }), z.field("#vgs-card-holder", {
17646
17647
  type: "text",
17647
17648
  name: "card_holder",
17648
17649
  placeholder: "Full Name",
17649
- css: V,
17650
+ css: R,
17650
17651
  autoComplete: "cc-name",
17651
17652
  validations: ["required"]
17652
17653
  }), n(!0);
@@ -17815,91 +17816,91 @@ function bs({
17815
17816
  isFormReady: M,
17816
17817
  isLoading: F,
17817
17818
  isScriptLoaded: S,
17818
- scriptLoadError: A,
17819
+ scriptLoadError: D,
17819
17820
  initializeForm: j,
17820
- submitCard: k,
17821
+ submitCard: T,
17821
17822
  vgsFieldState: L,
17822
- resetVgs: K,
17823
- onSuccessRef: V,
17823
+ resetVgs: W,
17824
+ onSuccessRef: R,
17824
17825
  onErrorRef: Y
17825
- } = Ax(), I = c?.id ?? null, O = m.useMemo(
17826
- () => I === null ? d : d.filter((R) => R.id !== I),
17827
- [d, I]
17828
- ), X = m.useMemo(() => {
17829
- const R = [];
17830
- return c && R.push(c), R.push(...O), R.push(...E), R;
17831
- }, [c, O, E]), J = X.length > 0, re = m.useMemo(() => {
17826
+ } = Ax(), J = c?.id ?? null, A = m.useMemo(
17827
+ () => J === null ? d : d.filter((B) => B.id !== J),
17828
+ [d, J]
17829
+ ), K = m.useMemo(() => {
17830
+ const B = [];
17831
+ return c && B.push(c), B.push(...A), B.push(...E), B;
17832
+ }, [c, A, E]), Z = K.length > 0, re = m.useMemo(() => {
17832
17833
  if (c) return c.id.toString();
17833
- if (u && O.some((ne) => ne.id === u))
17834
+ if (u && A.some((ne) => ne.id === u))
17834
17835
  return u.toString();
17835
- const R = O[0];
17836
- return R ? R.id.toString() : vt;
17837
- }, [c, u, O]), { control: W, handleSubmit: oe, reset: B, setValue: ee, watch: P } = tl(Dx, {
17836
+ const B = A[0];
17837
+ return B ? B.id.toString() : vt;
17838
+ }, [c, u, A]), { control: G, handleSubmit: oe, reset: O, setValue: ee, watch: P } = tl(Dx, {
17838
17839
  defaultValues: {
17839
17840
  billing_address_selection: re,
17840
17841
  set_as_default: !1
17841
17842
  }
17842
17843
  });
17843
17844
  m.useEffect(() => {
17844
- e && (B({
17845
+ e && (O({
17845
17846
  billing_address_selection: re,
17846
17847
  set_as_default: !1
17847
17848
  }), C([]));
17848
- }, [e, re, B]);
17849
- const G = P("billing_address_selection"), xe = m.useMemo(() => {
17850
- if (!G || G === vt)
17849
+ }, [e, re, O]);
17850
+ const U = P("billing_address_selection"), xe = m.useMemo(() => {
17851
+ if (!U || U === vt)
17851
17852
  return null;
17852
- const R = Number(G);
17853
- return Number.isFinite(R) ? X.find((ne) => ne.id === R) ?? null : null;
17854
- }, [G, X]), ye = m.useMemo(() => {
17855
- const R = [];
17856
- c && R.push({
17853
+ const B = Number(U);
17854
+ return Number.isFinite(B) ? K.find((ne) => ne.id === B) ?? null : null;
17855
+ }, [U, K]), ye = m.useMemo(() => {
17856
+ const B = [];
17857
+ c && B.push({
17857
17858
  name: p("same_as_shipping"),
17858
17859
  value: c.id.toString()
17859
17860
  });
17860
- for (const ne of O)
17861
- R.push({
17861
+ for (const ne of A)
17862
+ B.push({
17862
17863
  name: Ya(ne),
17863
17864
  value: ne.id.toString()
17864
17865
  });
17865
17866
  for (const ne of E)
17866
- R.push({
17867
+ B.push({
17867
17868
  name: Ya(ne),
17868
17869
  value: ne.id.toString()
17869
17870
  });
17870
- return R.push({
17871
+ return B.push({
17871
17872
  name: p("use_a_different_address"),
17872
17873
  value: vt
17873
- }), R;
17874
- }, [c, O, E, p]), Pe = m.useCallback(
17875
- (R) => {
17876
- if (R === vt) {
17874
+ }), B;
17875
+ }, [c, A, E, p]), Pe = m.useCallback(
17876
+ (B) => {
17877
+ if (B === vt) {
17877
17878
  $(!0);
17878
17879
  return;
17879
17880
  }
17880
- ee("billing_address_selection", R, { shouldValidate: !0 });
17881
+ ee("billing_address_selection", B, { shouldValidate: !0 });
17881
17882
  },
17882
17883
  [ee]
17883
17884
  ), Me = m.useCallback(
17884
- (R) => {
17885
- C((ne) => [...ne, R]), ee("billing_address_selection", R.id.toString(), {
17885
+ (B) => {
17886
+ C((ne) => [...ne, B]), ee("billing_address_selection", B.id.toString(), {
17886
17887
  shouldValidate: !0
17887
17888
  }), $(!1);
17888
17889
  },
17889
17890
  [ee]
17890
17891
  ), Fe = m.useCallback(
17891
- (R) => {
17892
- const ne = R?.card_exp;
17892
+ (B) => {
17893
+ const ne = B?.card_exp;
17893
17894
  if (!ne) {
17894
17895
  f("Missing expiration date from payment form"), w(!1);
17895
17896
  return;
17896
17897
  }
17897
- const D = ne.replace(/\s+/g, ""), [ce, _e] = D.split("/");
17898
+ const H = ne.replace(/\s+/g, ""), [ce, _e] = H.split("/");
17898
17899
  if (!ce || !_e) {
17899
17900
  f("Invalid expiration date format"), w(!1);
17900
17901
  return;
17901
17902
  }
17902
- const Ce = _e.length === 2 ? `20${_e}` : _e, he = R?.card_holder?.trim();
17903
+ const Ce = _e.length === 2 ? `20${_e}` : _e, he = B?.card_holder?.trim();
17903
17904
  if (!he) {
17904
17905
  f("Cardholder name is required"), w(!1);
17905
17906
  return;
@@ -17915,8 +17916,8 @@ function bs({
17915
17916
  t({
17916
17917
  set_as_default: Qe.set_as_default,
17917
17918
  payment_method: {
17918
- token: R.card_number,
17919
- cvv_token: R.card_cvc,
17919
+ token: B.card_number,
17920
+ cvv_token: B.card_cvc,
17920
17921
  exp_month: ce,
17921
17922
  exp_year: Ce,
17922
17923
  card_holder: he,
@@ -17933,41 +17934,41 @@ function bs({
17933
17934
  )();
17934
17935
  },
17935
17936
  [oe, t, L]
17936
- ), De = m.useCallback((R) => {
17937
- f(R), w(!1);
17937
+ ), De = m.useCallback((B) => {
17938
+ f(B), w(!1);
17938
17939
  }, []);
17939
17940
  m.useEffect(() => {
17940
- V.current = Fe, Y.current = De;
17941
- }, [Fe, De, V, Y]), m.useEffect(() => {
17941
+ R.current = Fe, Y.current = De;
17942
+ }, [Fe, De, R, Y]), m.useEffect(() => {
17942
17943
  if (!e || !S) return;
17943
- let R = !1;
17944
+ let B = !1;
17944
17945
  return (async () => {
17945
17946
  try {
17946
- const D = await _.vault.fetchCredentials(o);
17947
- R || await j(D);
17948
- } catch (D) {
17949
- console.error("Failed to fetch vault credentials:", D), R || f("Failed to initialize payment form");
17947
+ const H = await _.vault.fetchCredentials(o);
17948
+ B || await j(H);
17949
+ } catch (H) {
17950
+ console.error("Failed to fetch vault credentials:", H), B || f("Failed to initialize payment form");
17950
17951
  }
17951
17952
  })(), () => {
17952
- R = !0;
17953
+ B = !0;
17953
17954
  };
17954
17955
  }, [e, S, o, _, j]);
17955
17956
  const Oe = () => {
17956
- a || (K(), B(), f(void 0), w(!1), $(!1), n());
17957
+ a || (W(), O(), f(void 0), w(!1), $(!1), n());
17957
17958
  }, He = oe(() => {
17958
- w(!0), f(void 0), k();
17959
- }), U = r || v;
17959
+ w(!0), f(void 0), T();
17960
+ }), q = r || v;
17960
17961
  return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
17961
17962
  /* @__PURE__ */ i.jsx(
17962
17963
  Te,
17963
17964
  {
17964
17965
  open: e,
17965
- onOpenChange: (R) => !R && Oe(),
17966
+ onOpenChange: (B) => !B && Oe(),
17966
17967
  title: p("add_credit_card"),
17967
17968
  presentation: x,
17968
17969
  size: "wide",
17969
17970
  children: /* @__PURE__ */ i.jsxs("div", { className: "relative min-w-0 pt-1", children: [
17970
- (F || !M) && !A && /* @__PURE__ */ i.jsx("div", { className: "bg-background/80 absolute inset-0 z-10 flex items-center justify-center rounded backdrop-blur-[1px]", children: /* @__PURE__ */ i.jsxs("div", { className: "flex items-center justify-center", children: [
17971
+ (F || !M) && !D && /* @__PURE__ */ i.jsx("div", { className: "bg-background/80 absolute inset-0 z-10 flex items-center justify-center rounded backdrop-blur-[1px]", children: /* @__PURE__ */ i.jsxs("div", { className: "flex items-center justify-center", children: [
17971
17972
  /* @__PURE__ */ i.jsx("div", { className: "border-primary mr-3 size-5 animate-spin rounded-full border-2 border-t-2 border-t-transparent" }),
17972
17973
  /* @__PURE__ */ i.jsx("p", { className: "text-muted-foreground text-sm font-medium", children: p("securing") })
17973
17974
  ] }) }),
@@ -17976,18 +17977,18 @@ function bs({
17976
17977
  Hx,
17977
17978
  {
17978
17979
  vgsFieldState: L,
17979
- networkError: b ?? A ?? s
17980
+ networkError: b ?? D ?? s
17980
17981
  }
17981
17982
  ),
17982
17983
  /* @__PURE__ */ i.jsxs("div", { className: "space-y-3 pt-2", children: [
17983
17984
  /* @__PURE__ */ i.jsx("h3", { className: "text-muted-foreground text-sm font-medium", children: p("billing_address") }),
17984
- J ? /* @__PURE__ */ i.jsx(
17985
+ Z ? /* @__PURE__ */ i.jsx(
17985
17986
  $t,
17986
17987
  {
17987
- control: W,
17988
+ control: G,
17988
17989
  name: "billing_address_selection",
17989
17990
  render: ({
17990
- field: { value: R },
17991
+ field: { value: B },
17991
17992
  fieldState: { error: ne }
17992
17993
  }) => /* @__PURE__ */ i.jsxs("div", { className: "space-y-1", children: [
17993
17994
  /* @__PURE__ */ i.jsx(
@@ -18001,9 +18002,9 @@ function bs({
18001
18002
  /* @__PURE__ */ i.jsxs(
18002
18003
  sn,
18003
18004
  {
18004
- value: R,
18005
+ value: B,
18005
18006
  onValueChange: Pe,
18006
- disabled: U,
18007
+ disabled: q,
18007
18008
  children: [
18008
18009
  /* @__PURE__ */ i.jsx(
18009
18010
  on,
@@ -18014,14 +18015,14 @@ function bs({
18014
18015
  children: /* @__PURE__ */ i.jsx(cn, { placeholder: p("select_an_option") })
18015
18016
  }
18016
18017
  ),
18017
- /* @__PURE__ */ i.jsx(dn, { children: ye.map((D) => /* @__PURE__ */ i.jsx(
18018
+ /* @__PURE__ */ i.jsx(dn, { children: ye.map((H) => /* @__PURE__ */ i.jsx(
18018
18019
  un,
18019
18020
  {
18020
- value: D.value,
18021
- onClick: D.value === vt ? () => $(!0) : void 0,
18022
- children: D.name
18021
+ value: H.value,
18022
+ onClick: H.value === vt ? () => $(!0) : void 0,
18023
+ children: H.name
18023
18024
  },
18024
- D.value
18025
+ H.value
18025
18026
  )) })
18026
18027
  ]
18027
18028
  }
@@ -18030,12 +18031,12 @@ function bs({
18030
18031
  ] })
18031
18032
  }
18032
18033
  ) : /* @__PURE__ */ i.jsx(
18033
- Z,
18034
+ X,
18034
18035
  {
18035
18036
  type: "button",
18036
18037
  variant: "outline",
18037
18038
  onClick: () => $(!0),
18038
- disabled: U,
18039
+ disabled: q,
18039
18040
  className: "w-full",
18040
18041
  children: p("add_billing_address")
18041
18042
  }
@@ -18047,16 +18048,16 @@ function bs({
18047
18048
  /* @__PURE__ */ i.jsx(
18048
18049
  $t,
18049
18050
  {
18050
- control: W,
18051
+ control: G,
18051
18052
  name: "set_as_default",
18052
- render: ({ field: R }) => /* @__PURE__ */ i.jsxs("div", { className: "flex items-center gap-x-2", children: [
18053
+ render: ({ field: B }) => /* @__PURE__ */ i.jsxs("div", { className: "flex items-center gap-x-2", children: [
18053
18054
  /* @__PURE__ */ i.jsx(
18054
18055
  lr,
18055
18056
  {
18056
18057
  id: "set_as_default_cc",
18057
- checked: R.value,
18058
- onCheckedChange: (ne) => R.onChange(ne === !0),
18059
- disabled: U
18058
+ checked: B.value,
18059
+ onCheckedChange: (ne) => B.onChange(ne === !0),
18060
+ disabled: q
18060
18061
  }
18061
18062
  ),
18062
18063
  /* @__PURE__ */ i.jsx(
@@ -18070,9 +18071,9 @@ function bs({
18070
18071
  ] })
18071
18072
  }
18072
18073
  ),
18073
- /* @__PURE__ */ i.jsxs(Z, { type: "button", onClick: He, disabled: U, children: [
18074
- U && /* @__PURE__ */ i.jsx("div", { className: "mr-2 size-4 animate-spin rounded-full border-2 border-current/30 border-t-current" }),
18075
- p(U ? "saving" : "save_card")
18074
+ /* @__PURE__ */ i.jsxs(X, { type: "button", onClick: He, disabled: q, children: [
18075
+ q && /* @__PURE__ */ i.jsx("div", { className: "mr-2 size-4 animate-spin rounded-full border-2 border-current/30 border-t-current" }),
18076
+ p(q ? "saving" : "save_card")
18076
18077
  ] })
18077
18078
  ] })
18078
18079
  ] })
@@ -18434,13 +18435,13 @@ function $s(e, n, t) {
18434
18435
  return e("month_plural", { count: r });
18435
18436
  }
18436
18437
  const Yx = "yyyy-MM-dd";
18437
- function ct(e) {
18438
+ function at(e) {
18438
18439
  return L2(e.slice(0, 10), Yx, /* @__PURE__ */ new Date());
18439
18440
  }
18440
18441
  function $n(e, n, t, r, a) {
18441
18442
  const s = Pd(e, n, a);
18442
18443
  return s ? t("bill_date_moved_notice", {
18443
- date: jt(ct(s), r)
18444
+ date: jt(at(s), r)
18444
18445
  }) : null;
18445
18446
  }
18446
18447
  const Fs = "vgs";
@@ -18606,9 +18607,9 @@ function Ms({
18606
18607
  if (u.current) return;
18607
18608
  const {
18608
18609
  session_token: S,
18609
- merchant_tx_id: A,
18610
+ merchant_tx_id: D,
18610
18611
  fingerprinting_required: j,
18611
- tds_method_content: k
18612
+ tds_method_content: T
18612
18613
  } = F.three_ds;
18613
18614
  if (!S) {
18614
18615
  p(a("payment_verification_didnt_complete"));
@@ -18616,50 +18617,50 @@ function Ms({
18616
18617
  }
18617
18618
  const L = {
18618
18619
  sessionToken: S,
18619
- merchantTxId: A ?? void 0
18620
+ merchantTxId: D ?? void 0
18620
18621
  };
18621
18622
  u.current = L, o(L);
18622
18623
  try {
18623
- j !== !1 && typeof k == "string" && k.length > 0 && await Xx(k);
18624
- const K = await e.confirmPaymentMethod3DS({
18624
+ j !== !1 && typeof T == "string" && T.length > 0 && await Xx(T);
18625
+ const W = await e.confirmPaymentMethod3DS({
18625
18626
  session_token: L.sessionToken
18626
18627
  });
18627
- if (K.status === "approved") {
18628
- await b(K);
18628
+ if (W.status === "approved") {
18629
+ await b(W);
18629
18630
  return;
18630
18631
  }
18631
- if (!K.challenge_form) {
18632
+ if (!W.challenge_form) {
18632
18633
  f(a("payment_verification_didnt_complete"));
18633
18634
  return;
18634
18635
  }
18635
18636
  d({
18636
- html: K.challenge_form,
18637
- url: K.challenge_url ?? void 0
18637
+ html: W.challenge_form,
18638
+ url: W.challenge_url ?? void 0
18638
18639
  });
18639
- } catch (K) {
18640
- f(w(K));
18640
+ } catch (W) {
18641
+ f(w(W));
18641
18642
  }
18642
18643
  }, C = async (F) => {
18643
18644
  const S = u.current;
18644
18645
  if (S)
18645
18646
  try {
18646
- const A = await e.confirmPaymentMethod3DS({
18647
+ const D = await e.confirmPaymentMethod3DS({
18647
18648
  session_token: S.sessionToken
18648
18649
  });
18649
18650
  if (u.current !== S) return;
18650
- if (A.status === "approved") {
18651
- await b(A);
18651
+ if (D.status === "approved") {
18652
+ await b(D);
18652
18653
  return;
18653
18654
  }
18654
18655
  f(a("payment_verification_didnt_complete"));
18655
- } catch (A) {
18656
+ } catch (D) {
18656
18657
  if (u.current !== S) return;
18657
- if (F && Ja(A) === "three_ds_pending") {
18658
+ if (F && Ja(D) === "three_ds_pending") {
18658
18659
  if (await ny(ty), u.current !== S) return;
18659
18660
  await C(!1);
18660
18661
  return;
18661
18662
  }
18662
- f(w(A));
18663
+ f(w(D));
18663
18664
  }
18664
18665
  }, z = async () => {
18665
18666
  const F = u.current;
@@ -18906,25 +18907,25 @@ function fy({
18906
18907
  [s]
18907
18908
  ), S = m.useMemo(() => {
18908
18909
  const L = /* @__PURE__ */ new Set();
18909
- for (const K of F)
18910
- for (const V of K.subscriptions)
18911
- V.subscription_token && L.add(V.subscription_token);
18910
+ for (const W of F)
18911
+ for (const R of W.subscriptions)
18912
+ R.subscription_token && L.add(R.subscription_token);
18912
18913
  return L;
18913
- }, [F]), A = c === "all" && F.length > 0, { activeSubs: j, inactiveSubs: k } = m.useMemo(() => {
18914
+ }, [F]), D = c === "all" && F.length > 0, { activeSubs: j, inactiveSubs: T } = m.useMemo(() => {
18914
18915
  const L = M.slice().sort(
18915
- (V, Y) => ei[yt(V.status, o).kind] - ei[yt(Y.status, o).kind]
18916
- ), K = L.filter(
18917
- (V) => ti(yt(V.status, o).kind)
18916
+ (R, Y) => ei[yt(R.status, o).kind] - ei[yt(Y.status, o).kind]
18917
+ ), W = L.filter(
18918
+ (R) => ti(yt(R.status, o).kind)
18918
18919
  );
18919
18920
  return {
18920
- activeSubs: A ? K.filter(
18921
- (V) => !S.has(V.subscription_token)
18922
- ) : K,
18921
+ activeSubs: D ? W.filter(
18922
+ (R) => !S.has(R.subscription_token)
18923
+ ) : W,
18923
18924
  inactiveSubs: L.filter(
18924
- (V) => !ti(yt(V.status, o).kind)
18925
+ (R) => !ti(yt(R.status, o).kind)
18925
18926
  )
18926
18927
  };
18927
- }, [M, o, A, S]);
18928
+ }, [M, o, D, S]);
18928
18929
  return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
18929
18930
  /* @__PURE__ */ i.jsx(gi, { children: /* @__PURE__ */ i.jsx(Ci, { children: /* @__PURE__ */ i.jsx(zi, { className: "text-lg", children: /* @__PURE__ */ i.jsx(Mr, { children: /* @__PURE__ */ i.jsx(Mi, { className: "font-semibold", children: o("breadcrumb") }) }) }) }) }),
18930
18931
  /* @__PURE__ */ i.jsx("div", { className: "relative", children: /* @__PURE__ */ i.jsxs("div", { className: "relative mx-auto max-w-4xl px-5 pt-8 pb-20 md:px-8", children: [
@@ -18939,21 +18940,21 @@ function fy({
18939
18940
  t: o
18940
18941
  }
18941
18942
  ),
18942
- b || n ? /* @__PURE__ */ i.jsx("div", { className: "mt-8 grid grid-cols-1 gap-5 md:grid-cols-2", children: Array(4).fill(0).map((L, K) => /* @__PURE__ */ i.jsx($y, {}, K)) }) : f ? /* @__PURE__ */ i.jsx(Cy, { onRetry: () => v(), t: o }) : M.length === 0 ? /* @__PURE__ */ i.jsx(Fy, { filtered: c !== "all", t: o }) : /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
18943
- (A || j.length > 0) && // Single grid for bundle cards + regular subscription cards so
18943
+ b || n ? /* @__PURE__ */ i.jsx("div", { className: "mt-8 grid grid-cols-1 gap-5 md:grid-cols-2", children: Array(4).fill(0).map((L, W) => /* @__PURE__ */ i.jsx($y, {}, W)) }) : f ? /* @__PURE__ */ i.jsx(Cy, { onRetry: () => v(), t: o }) : M.length === 0 ? /* @__PURE__ */ i.jsx(Fy, { filtered: c !== "all", t: o }) : /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
18944
+ (D || j.length > 0) && // Single grid for bundle cards + regular subscription cards so
18944
18945
  // they share rows. CSS Grid's default `align-items: stretch`
18945
18946
  // makes every cell in the same row match heights, which is
18946
18947
  // what we want — the tallest card in a row sets the row
18947
18948
  // height and the others stretch to match.
18948
18949
  /* @__PURE__ */ i.jsxs("div", { className: "mt-6 grid grid-cols-1 gap-5 md:grid-cols-2", children: [
18949
- A && F.map((L, K) => /* @__PURE__ */ i.jsx(
18950
+ D && F.map((L, W) => /* @__PURE__ */ i.jsx(
18950
18951
  xy,
18951
18952
  {
18952
18953
  bundle: L,
18953
18954
  onSubscriptionClick: t,
18954
18955
  t: o
18955
18956
  },
18956
- `bundle-${K}-${L.next_bill_date}`
18957
+ `bundle-${W}-${L.next_bill_date}`
18957
18958
  )),
18958
18959
  j.map((L) => /* @__PURE__ */ i.jsx(
18959
18960
  _y,
@@ -18966,13 +18967,13 @@ function fy({
18966
18967
  L.id
18967
18968
  ))
18968
18969
  ] }),
18969
- k.length > 0 && /* @__PURE__ */ i.jsxs("div", { className: j.length > 0 ? "mt-10" : "mt-6", children: [
18970
+ T.length > 0 && /* @__PURE__ */ i.jsxs("div", { className: j.length > 0 ? "mt-10" : "mt-6", children: [
18970
18971
  /* @__PURE__ */ i.jsx("div", { className: "text-muted-foreground mb-2 px-1 text-xs font-semibold", children: o("list_cancelled_section_label", {
18971
18972
  n: String(
18972
- p ? $.cancelled : k.length
18973
+ p ? $.cancelled : T.length
18973
18974
  )
18974
18975
  }) }),
18975
- /* @__PURE__ */ i.jsx("div", { className: "space-y-3", children: k.map((L) => /* @__PURE__ */ i.jsx(
18976
+ /* @__PURE__ */ i.jsx("div", { className: "space-y-3", children: T.map((L) => /* @__PURE__ */ i.jsx(
18976
18977
  wy,
18977
18978
  {
18978
18979
  sub: L,
@@ -19484,49 +19485,49 @@ function zy({
19484
19485
  li(t, a)
19485
19486
  );
19486
19487
  }, [E, t, a]);
19487
- const z = m.useCallback((O) => {
19488
- d((X) => {
19489
- const J = new Set(X);
19490
- return J.has(O) ? J.delete(O) : J.add(O), J;
19488
+ const z = m.useCallback((A) => {
19489
+ d((K) => {
19490
+ const Z = new Set(K);
19491
+ return Z.has(A) ? Z.delete(A) : Z.add(A), Z;
19491
19492
  });
19492
19493
  }, []), $ = m.useMemo(() => {
19493
- const O = Array.from(c).map((X) => {
19494
- const J = e.find(
19495
- (re) => re.subscription_token === X
19494
+ const A = Array.from(c).map((K) => {
19495
+ const Z = e.find(
19496
+ (re) => re.subscription_token === K
19496
19497
  )?.subscription_plan;
19497
19498
  return {
19498
- billingInterval: J?.billing_interval,
19499
- billingIntervalUnit: J?.billing_interval_unit
19499
+ billingInterval: Z?.billing_interval,
19500
+ billingIntervalUnit: Z?.billing_interval_unit
19500
19501
  };
19501
19502
  });
19502
- return { today: u, maxDate: pd(O, u) };
19503
+ return { today: u, maxDate: pd(A, u) };
19503
19504
  }, [c, e, u]), M = m.useMemo(() => {
19504
- const O = /* @__PURE__ */ new Set();
19505
- for (const X of c) {
19506
- const J = e.find((re) => re.subscription_token === X);
19507
- for (const re of J?.blackout_days ?? []) O.add(re);
19505
+ const A = /* @__PURE__ */ new Set();
19506
+ for (const K of c) {
19507
+ const Z = e.find((re) => re.subscription_token === K);
19508
+ for (const re of Z?.blackout_days ?? []) A.add(re);
19508
19509
  }
19509
- return [...O];
19510
+ return [...A];
19510
19511
  }, [c, e]), F = b !== null && M.includes(b) ? null : b, S = m.useCallback(
19511
- (O) => {
19512
- if (p(O), x != null) {
19513
- if (Nl(O, x, $)) {
19512
+ (A) => {
19513
+ if (p(A), x != null) {
19514
+ if (Nl(A, x, $)) {
19514
19515
  _(null), f(null);
19515
19516
  return;
19516
19517
  }
19517
- b != null && Cn(O, x, b, $) && f(null);
19518
+ b != null && Cn(A, x, b, $) && f(null);
19518
19519
  }
19519
19520
  },
19520
19521
  [x, b, $]
19521
- ), A = m.useCallback(
19522
- (O) => {
19523
- _(O), b != null && Cn(h, O, b, $) && f(null);
19522
+ ), D = m.useCallback(
19523
+ (A) => {
19524
+ _(A), b != null && Cn(h, A, b, $) && f(null);
19524
19525
  },
19525
19526
  [b, h, $]
19526
- ), j = m.useCallback((O) => f(O), []), k = c.size >= 2, L = x !== null && F !== null && Cn(h, x, F, $), K = x !== null && F !== null && !L, V = v != null, Y = E != null, I = m.useMemo(() => {
19527
+ ), j = m.useCallback((A) => f(A), []), T = c.size >= 2, L = x !== null && F !== null && Cn(h, x, F, $), W = x !== null && F !== null && !L, R = v != null, Y = E != null, J = m.useMemo(() => {
19527
19528
  if (x == null || F == null) return null;
19528
- const O = String(x + 1).padStart(2, "0"), X = String(F).padStart(2, "0");
19529
- return `${h}-${O}-${X}`;
19529
+ const A = String(x + 1).padStart(2, "0"), K = String(F).padStart(2, "0");
19530
+ return `${h}-${A}-${K}`;
19530
19531
  }, [h, x, F]);
19531
19532
  return {
19532
19533
  step: s,
@@ -19537,7 +19538,7 @@ function zy({
19537
19538
  selectedMonth: x,
19538
19539
  selectedDay: F,
19539
19540
  setYear: S,
19540
- setMonth: A,
19541
+ setMonth: D,
19541
19542
  setDay: j,
19542
19543
  selectedAddressId: v,
19543
19544
  setSelectedAddressId: w,
@@ -19545,11 +19546,11 @@ function zy({
19545
19546
  setSelectedPaymentMethodId: C,
19546
19547
  bounds: $,
19547
19548
  blackoutDays: M,
19548
- canProceedFromStep1: k,
19549
- canProceedFromStep2: K,
19550
- canProceedFromStep3: V,
19549
+ canProceedFromStep1: T,
19550
+ canProceedFromStep2: W,
19551
+ canProceedFromStep3: R,
19551
19552
  canProceedFromStep4: Y,
19552
- formattedDate: I
19553
+ formattedDate: J
19553
19554
  };
19554
19555
  }
19555
19556
  const wn = [
@@ -20130,7 +20131,7 @@ function Iy({
20130
20131
  isLoadingCustomer: n,
20131
20132
  onToast: t
20132
20133
  }) {
20133
- const { isMobile: r } = ht(), { navigate: a } = xi(), s = ze(), o = an(), c = nl(), { t: d } = ae(), { t: u } = it(), { config: h } = yi(), { locale: p } = Xn(), { data: x } = lc(), _ = !!x?.bundle_subscriptions_enabled, { data: b = [] } = Ae({
20134
+ const { isMobile: r } = ht(), { navigate: a } = xi(), s = ze(), o = an(), c = nl(), { t: d } = ae(), { t: u } = st(), { config: h } = yi(), { locale: p } = Xn(), { data: x } = lc(), _ = !!x?.bundle_subscriptions_enabled, { data: b = [] } = Ae({
20134
20135
  queryKey: $e.addresses.list(),
20135
20136
  queryFn: async () => (await o.fetchAddresses()).addresses.map(ai),
20136
20137
  enabled: !!e && !n
@@ -20148,16 +20149,16 @@ function Iy({
20148
20149
  { customerId: e, limit: Jr },
20149
20150
  { enabled: !!e && !n }
20150
20151
  ), $ = m.useMemo(
20151
- () => v?.pages.flatMap((D) => D.subscriptions) ?? [],
20152
+ () => v?.pages.flatMap((H) => H.subscriptions) ?? [],
20152
20153
  [v]
20153
20154
  ), M = m.useMemo(
20154
20155
  () => $.filter(
20155
- (D) => js(D.status) !== "cancelled" && (D.bundled_subscriptions?.length ?? 0) === 0
20156
+ (H) => js(H.status) !== "cancelled" && (H.bundled_subscriptions?.length ?? 0) === 0
20156
20157
  ),
20157
20158
  [$]
20158
- ), F = v?.pages[0]?.counts, S = F ? F.all - F.cancelled : M.length, { data: A } = ud({
20159
+ ), F = v?.pages[0]?.counts, S = F ? F.all - F.cancelled : M.length, { data: D } = ud({
20159
20160
  enabled: !!e && !n && _
20160
- }), [j, k] = m.useState(!1), L = m.useRef(!1);
20161
+ }), [j, T] = m.useState(!1), L = m.useRef(!1);
20161
20162
  m.useEffect(() => {
20162
20163
  if (!j) {
20163
20164
  L.current = !1;
@@ -20171,50 +20172,50 @@ function Iy({
20171
20172
  C,
20172
20173
  w
20173
20174
  ]);
20174
- const K = C || E && !z, [V, Y] = m.useState(0), [I, O] = m.useState({ open: !1, selected: null }), [X, J] = m.useState(!1), [re, W] = m.useState(null), [oe, B] = m.useState(!1), { data: ee } = Ae({
20175
+ const W = C || E && !z, [R, Y] = m.useState(0), [J, A] = m.useState({ open: !1, selected: null }), [K, Z] = m.useState(!1), [re, G] = m.useState(null), [oe, O] = m.useState(!1), { data: ee } = Ae({
20175
20176
  queryKey: el.countries(p),
20176
20177
  queryFn: () => c.listCountries({ languageIso: p }),
20177
- enabled: I.open || X
20178
+ enabled: J.open || K
20178
20179
  }), P = m.useMemo(
20179
- () => [...ee?.countries ?? []].map((D) => ({ iso: D.code, name: D.name })).sort((D, ce) => D.name.localeCompare(ce.name)),
20180
+ () => [...ee?.countries ?? []].map((H) => ({ iso: H.code, name: H.name })).sort((H, ce) => H.name.localeCompare(ce.name)),
20180
20181
  [ee]
20181
- ), G = m.useMemo(() => {
20182
- const D = /* @__PURE__ */ new Map();
20182
+ ), U = m.useMemo(() => {
20183
+ const H = /* @__PURE__ */ new Map();
20183
20184
  for (const ce of ee?.countries ?? [])
20184
- D.set(
20185
+ H.set(
20185
20186
  ce.code,
20186
20187
  ce.states.map((_e) => ({ name: _e.name, isoCode: _e.code }))
20187
20188
  );
20188
- return D;
20189
+ return H;
20189
20190
  }, [ee]), xe = m.useCallback(
20190
- (D) => Promise.resolve(G.get(D) ?? []),
20191
- [G]
20191
+ (H) => Promise.resolve(U.get(H) ?? []),
20192
+ [U]
20192
20193
  ), ye = fe({
20193
20194
  // Detect a server-side dedupe (POST /api/pay/addresses returns the existing
20194
20195
  // record when an identical address already exists, ignoring `name`). Snapshot
20195
20196
  // the current id set before the request and compare against the returned id.
20196
- mutationFn: async (D) => {
20197
+ mutationFn: async (H) => {
20197
20198
  const ce = new Set(b.map((Ce) => Ce.id)), _e = await o.createAddress({
20198
20199
  address: {
20199
- name: D.address.name,
20200
- street1: D.address.address1,
20201
- street2: D.address.address2,
20202
- city: D.address.city,
20203
- state: D.address.state,
20204
- zip: D.address.postal_code,
20205
- country: D.address.country_code,
20206
- phone: D.address.phone,
20207
- default: D.address.default
20200
+ name: H.address.name,
20201
+ street1: H.address.address1,
20202
+ street2: H.address.address2,
20203
+ city: H.address.city,
20204
+ state: H.address.state,
20205
+ zip: H.address.postal_code,
20206
+ country: H.address.country_code,
20207
+ phone: H.address.phone,
20208
+ default: H.address.default
20208
20209
  }
20209
20210
  });
20210
20211
  return { address: _e, deduped: ce.has(_e.id) };
20211
20212
  },
20212
- onSuccess: ({ deduped: D }) => {
20213
- s.invalidateQueries({ queryKey: $e.addresses.all }), D ? t?.(u("address_already_exists"), "warning") : t?.(u("address_created"), "success");
20213
+ onSuccess: ({ deduped: H }) => {
20214
+ s.invalidateQueries({ queryKey: $e.addresses.all }), H ? t?.(u("address_already_exists"), "warning") : t?.(u("address_created"), "success");
20214
20215
  },
20215
20216
  onError: () => t?.(u("failed_to_create_address"), "error")
20216
20217
  }), Pe = m.useCallback(
20217
- (D) => u(D),
20218
+ (H) => u(H),
20218
20219
  [u]
20219
20220
  ), Me = Ms({
20220
20221
  payApi: o,
@@ -20222,78 +20223,78 @@ function Iy({
20222
20223
  onApproved: async () => {
20223
20224
  await s.invalidateQueries({
20224
20225
  queryKey: $e.paymentMethods.all
20225
- }), J(!1), t?.(u("payment_method_added"), "success");
20226
+ }), Z(!1), t?.(u("payment_method_added"), "success");
20226
20227
  },
20227
- onFailed: (D) => {
20228
- W(D);
20228
+ onFailed: (H) => {
20229
+ G(H);
20229
20230
  },
20230
20231
  onCanceled: () => {
20231
20232
  }
20232
20233
  }), Fe = Ns({
20233
20234
  begin: Me.begin,
20234
20235
  onCreated: () => {
20235
- s.invalidateQueries({ queryKey: $e.paymentMethods.all }), J(!1), t?.(u("payment_method_added"), "success");
20236
+ s.invalidateQueries({ queryKey: $e.paymentMethods.all }), Z(!1), t?.(u("payment_method_added"), "success");
20236
20237
  }
20237
20238
  }), De = fe({
20238
- mutationFn: (D) => o.createPaymentMethod({
20239
+ mutationFn: (H) => o.createPaymentMethod({
20239
20240
  payment_method: {
20240
20241
  type: "card",
20241
- token: D.payment_method.token,
20242
+ token: H.payment_method.token,
20242
20243
  token_provider: Fs,
20243
- exp_month: D.payment_method.exp_month,
20244
- exp_year: D.payment_method.exp_year,
20245
- cvv_token: D.payment_method.cvv_token,
20246
- card_holder: D.payment_method.card_holder,
20247
- default: D.set_as_default,
20248
- ...D.payment_method.bin ? { bin: D.payment_method.bin } : {},
20249
- ...D.payment_method.last_four ? { last_four: D.payment_method.last_four } : {},
20250
- ...D.payment_method.card_network ? { card_network: D.payment_method.card_network } : {}
20244
+ exp_month: H.payment_method.exp_month,
20245
+ exp_year: H.payment_method.exp_year,
20246
+ cvv_token: H.payment_method.cvv_token,
20247
+ card_holder: H.payment_method.card_holder,
20248
+ default: H.set_as_default,
20249
+ ...H.payment_method.bin ? { bin: H.payment_method.bin } : {},
20250
+ ...H.payment_method.last_four ? { last_four: H.payment_method.last_four } : {},
20251
+ ...H.payment_method.card_network ? { card_network: H.payment_method.card_network } : {}
20251
20252
  },
20252
- billing_address_id: D.billing_address_id,
20253
+ billing_address_id: H.billing_address_id,
20253
20254
  browser_info: Cs()
20254
20255
  }),
20255
20256
  onSuccess: Fe,
20256
20257
  onError: () => t?.(u("failed_to_add_payment_method"), "error")
20257
- }), Oe = md(), He = Ot(), U = () => {
20258
- Y((D) => D + 1), k(!0);
20259
- }, R = async (D) => {
20258
+ }), Oe = md(), He = Ot(), q = () => {
20259
+ Y((H) => H + 1), T(!0);
20260
+ }, B = async (H) => {
20260
20261
  if (oe) return;
20261
- B(!0);
20262
+ O(!0);
20262
20263
  let ce = null;
20263
20264
  try {
20264
20265
  const he = await Oe.mutateAsync({
20265
- subscription_tokens: D.subscription_tokens,
20266
- next_bill_date: D.next_bill_date,
20267
- address_id: D.address_id,
20266
+ subscription_tokens: H.subscription_tokens,
20267
+ next_bill_date: H.next_bill_date,
20268
+ address_id: H.address_id,
20268
20269
  // The customer picked the date on this device's calendar, so the bundle
20269
20270
  // bills on this zone rather than on whichever zone its oldest member
20270
20271
  // happens to carry.
20271
20272
  timezone: Intl.DateTimeFormat().resolvedOptions().timeZone
20272
20273
  });
20273
20274
  ce = $n(
20274
- D.next_bill_date,
20275
+ H.next_bill_date,
20275
20276
  he.next_bill_date,
20276
20277
  d,
20277
20278
  p
20278
20279
  );
20279
20280
  } catch (he) {
20280
20281
  const de = (pi(he) && he.status >= 400 && he.status < 500 ? he.message : void 0) ?? d("bundle_failed");
20281
- t?.(de, "error"), B(!1);
20282
+ t?.(de, "error"), O(!1);
20282
20283
  return;
20283
20284
  }
20284
20285
  const Ce = (await Promise.allSettled(
20285
- D.subscription_tokens.map(
20286
+ H.subscription_tokens.map(
20286
20287
  (he) => He.mutateAsync({
20287
20288
  subscriptionToken: he,
20288
- body: { payment_method_id: D.payment_method_id }
20289
+ body: { payment_method_id: H.payment_method_id }
20289
20290
  })
20290
20291
  )
20291
20292
  )).filter((he) => he.status === "rejected").length;
20292
20293
  Ce === 0 ? t?.(ce ?? d("bundle_succeeded"), "success") : (ce && t?.(ce, "success"), t?.(
20293
20294
  d("bundle_partial_payment_failure", { n: String(Ce) }),
20294
20295
  "warning"
20295
- )), k(!1), B(!1);
20296
- }, ne = (D) => a(`subscriptions/${D}`);
20296
+ )), T(!1), O(!1);
20297
+ }, ne = (H) => a(`subscriptions/${H}`);
20297
20298
  return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
20298
20299
  /* @__PURE__ */ i.jsx(
20299
20300
  fy,
@@ -20301,43 +20302,43 @@ function Iy({
20301
20302
  customerId: e,
20302
20303
  isLoadingCustomer: n,
20303
20304
  onSubscriptionClick: ne,
20304
- onResume: (D) => ne(D.subscription_token),
20305
- onBundleClick: _ && S >= 2 ? U : void 0,
20306
- bundles: _ ? A : void 0
20305
+ onResume: (H) => ne(H.subscription_token),
20306
+ onBundleClick: _ && S >= 2 ? q : void 0,
20307
+ bundles: _ ? D : void 0
20307
20308
  }
20308
20309
  ),
20309
20310
  _ && /* @__PURE__ */ i.jsx(
20310
20311
  ky,
20311
20312
  {
20312
20313
  open: j,
20313
- onOpenChange: k,
20314
+ onOpenChange: T,
20314
20315
  subscriptions: M,
20315
- isLoadingSubscriptions: K,
20316
+ isLoadingSubscriptions: W,
20316
20317
  hasIncompleteSubscriptions: z && E,
20317
20318
  addresses: b,
20318
20319
  paymentMethods: f,
20319
- defaultAddressId: b.find((D) => D.default)?.id ?? b[0]?.id ?? null,
20320
- defaultPaymentMethodId: f.find((D) => D.default)?.id ?? f[0]?.id ?? null,
20321
- onAddAddress: () => O({ open: !0, selected: null }),
20322
- onAddPaymentMethod: () => J(!0),
20323
- onSubmit: R,
20320
+ defaultAddressId: b.find((H) => H.default)?.id ?? b[0]?.id ?? null,
20321
+ defaultPaymentMethodId: f.find((H) => H.default)?.id ?? f[0]?.id ?? null,
20322
+ onAddAddress: () => A({ open: !0, selected: null }),
20323
+ onAddPaymentMethod: () => Z(!0),
20324
+ onSubmit: B,
20324
20325
  isSubmitting: oe
20325
20326
  },
20326
- V
20327
+ R
20327
20328
  ),
20328
20329
  /* @__PURE__ */ i.jsx(
20329
20330
  Wn,
20330
20331
  {
20331
20332
  presentation: r ? "bottom-sheet" : "dialog",
20332
- isOpen: I.open,
20333
- onClose: () => O({ open: !1, selected: null }),
20334
- selectedAddress: I.selected,
20335
- defaultCountry: b.find((D) => D.default)?.country_code ?? h.countryIso ?? "US",
20333
+ isOpen: J.open,
20334
+ onClose: () => A({ open: !1, selected: null }),
20335
+ selectedAddress: J.selected,
20336
+ defaultCountry: b.find((H) => H.default)?.country_code ?? h.countryIso ?? "US",
20336
20337
  languageIso: p,
20337
20338
  t: Fr,
20338
- onSubmit: async (D) => {
20339
+ onSubmit: async (H) => {
20339
20340
  try {
20340
- await ye.mutateAsync(D), O({ open: !1, selected: null });
20341
+ await ye.mutateAsync(H), A({ open: !1, selected: null });
20341
20342
  } catch {
20342
20343
  }
20343
20344
  },
@@ -20346,32 +20347,32 @@ function Iy({
20346
20347
  fetchStates: xe
20347
20348
  }
20348
20349
  ),
20349
- X && /* @__PURE__ */ i.jsx(
20350
+ K && /* @__PURE__ */ i.jsx(
20350
20351
  bs,
20351
20352
  {
20352
20353
  presentation: r ? "bottom-sheet" : "dialog",
20353
- isOpen: X,
20354
+ isOpen: K,
20354
20355
  onClose: () => {
20355
- Me.isActive || (W(null), J(!1));
20356
+ Me.isActive || (G(null), Z(!1));
20356
20357
  },
20357
20358
  t: Fr,
20358
20359
  error: re ?? void 0,
20359
- onSubmit: async (D) => {
20360
- W(null);
20360
+ onSubmit: async (H) => {
20361
+ G(null);
20361
20362
  try {
20362
- await De.mutateAsync(D);
20363
+ await De.mutateAsync(H);
20363
20364
  } catch {
20364
20365
  }
20365
20366
  },
20366
20367
  isSubmitting: De.isPending,
20367
20368
  jwt: "",
20368
20369
  savedAddresses: b,
20369
- defaultBillingAddressId: b.find((D) => D.default)?.id,
20370
- renderAddressFormDialog: ({ isOpen: D, onClose: ce, onAddressCreated: _e }) => /* @__PURE__ */ i.jsx(
20370
+ defaultBillingAddressId: b.find((H) => H.default)?.id,
20371
+ renderAddressFormDialog: ({ isOpen: H, onClose: ce, onAddressCreated: _e }) => /* @__PURE__ */ i.jsx(
20371
20372
  Wn,
20372
20373
  {
20373
20374
  presentation: r ? "bottom-sheet" : "dialog",
20374
- isOpen: D,
20375
+ isOpen: H,
20375
20376
  onClose: ce,
20376
20377
  selectedAddress: null,
20377
20378
  defaultCountry: b.find((Ce) => Ce.default)?.country_code ?? h.countryIso ?? "US",
@@ -20404,7 +20405,7 @@ function hb(e) {
20404
20405
  class ii extends Error {
20405
20406
  constructor(t, r) {
20406
20407
  super(r);
20407
- q(this, "failure");
20408
+ V(this, "failure");
20408
20409
  this.name = "CancellationSessionError", this.failure = t;
20409
20410
  }
20410
20411
  }
@@ -20566,7 +20567,7 @@ function By({
20566
20567
  }
20567
20568
  ),
20568
20569
  e.saves ? /* @__PURE__ */ i.jsx(
20569
- Z,
20570
+ X,
20570
20571
  {
20571
20572
  variant: "outline",
20572
20573
  className: "w-full",
@@ -20576,7 +20577,7 @@ function By({
20576
20577
  ),
20577
20578
  children: r("cancel_offer_accept_button")
20578
20579
  }
20579
- ) : v && /* @__PURE__ */ i.jsx(Z, { variant: "outline", className: "w-full", asChild: !0, children: /* @__PURE__ */ i.jsx("a", { href: v, target: "_blank", rel: "noopener noreferrer", children: r("cancel_offer_contact_button") }) })
20580
+ ) : v && /* @__PURE__ */ i.jsx(X, { variant: "outline", className: "w-full", asChild: !0, children: /* @__PURE__ */ i.jsx("a", { href: v, target: "_blank", rel: "noopener noreferrer", children: r("cancel_offer_contact_button") }) })
20580
20581
  ] });
20581
20582
  }
20582
20583
  function Ry({
@@ -20741,8 +20742,8 @@ function Wy({
20741
20742
  _(!0);
20742
20743
  try {
20743
20744
  await j, n(!1);
20744
- } catch (k) {
20745
- console.error("CancelSubscriptionDialog: action rejected", k);
20745
+ } catch (T) {
20746
+ console.error("CancelSubscriptionDialog: action rejected", T);
20746
20747
  } finally {
20747
20748
  _(!1);
20748
20749
  }
@@ -20756,7 +20757,7 @@ function Wy({
20756
20757
  j && p.giveReason(j);
20757
20758
  }, S = () => {
20758
20759
  f && r(f);
20759
- }, A = p.error ?? a;
20760
+ }, D = p.error ?? a;
20760
20761
  return /* @__PURE__ */ i.jsxs(
20761
20762
  Te,
20762
20763
  {
@@ -20794,7 +20795,7 @@ function Wy({
20794
20795
  }
20795
20796
  ),
20796
20797
  /* @__PURE__ */ i.jsx(
20797
- Z,
20798
+ X,
20798
20799
  {
20799
20800
  variant: "outline",
20800
20801
  onClick: S,
@@ -20829,16 +20830,16 @@ function Wy({
20829
20830
  {
20830
20831
  session: C.session,
20831
20832
  disabled: b,
20832
- onAccept: async (j, k) => {
20833
- await p.accept(j, k) && n(!1);
20833
+ onAccept: async (j, T) => {
20834
+ await p.accept(j, T) && n(!1);
20834
20835
  }
20835
20836
  }
20836
20837
  )
20837
20838
  ] }),
20838
- A && /* @__PURE__ */ i.jsx("p", { className: "text-destructive text-left text-sm", children: A }),
20839
+ D && /* @__PURE__ */ i.jsx("p", { className: "text-destructive text-left text-sm", children: D }),
20839
20840
  /* @__PURE__ */ i.jsxs(Ke, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: [
20840
20841
  /* @__PURE__ */ i.jsx(
20841
- Z,
20842
+ X,
20842
20843
  {
20843
20844
  variant: "secondary",
20844
20845
  onClick: () => n(!1),
@@ -20847,7 +20848,7 @@ function Wy({
20847
20848
  }
20848
20849
  ),
20849
20850
  C.kind === "reason" && /* @__PURE__ */ i.jsx(
20850
- Z,
20851
+ X,
20851
20852
  {
20852
20853
  variant: "outline",
20853
20854
  onClick: F,
@@ -20856,7 +20857,7 @@ function Wy({
20856
20857
  }
20857
20858
  ),
20858
20859
  /* @__PURE__ */ i.jsx(
20859
- Z,
20860
+ X,
20860
20861
  {
20861
20862
  variant: "destructive",
20862
20863
  onClick: () => void M(),
@@ -20906,7 +20907,7 @@ function Ky({
20906
20907
  p === "order_count" && _ && t({
20907
20908
  type: "order_count",
20908
20909
  numberOfOrders: _,
20909
- shownResumeDate: w ? at(w, "yyyy-MM-dd") : null
20910
+ shownResumeDate: w ? it(w, "yyyy-MM-dd") : null
20910
20911
  });
20911
20912
  }, C = (M) => {
20912
20913
  M || (x("indefinite"), b(null)), n(M);
@@ -21001,7 +21002,7 @@ function Ky({
21001
21002
  a && /* @__PURE__ */ i.jsx("p", { className: "text-destructive text-left text-sm", children: a }),
21002
21003
  /* @__PURE__ */ i.jsx(Ke, { children: /* @__PURE__ */ i.jsxs("div", { className: "flex w-full flex-row justify-between gap-x-2", children: [
21003
21004
  /* @__PURE__ */ i.jsx(
21004
- Z,
21005
+ X,
21005
21006
  {
21006
21007
  variant: "outline",
21007
21008
  className: "h-10 min-w-[70px] rounded p-3",
@@ -21010,7 +21011,7 @@ function Ky({
21010
21011
  }
21011
21012
  ),
21012
21013
  /* @__PURE__ */ i.jsx(
21013
- Z,
21014
+ X,
21014
21015
  {
21015
21016
  type: "button",
21016
21017
  className: "h-10 min-w-[70px] rounded p-3",
@@ -21039,11 +21040,11 @@ function Yy({
21039
21040
  const w = nn(v, 1);
21040
21041
  m.useEffect(() => {
21041
21042
  if (!e) return;
21042
- const z = s ? ct(s) : w, $ = z < w ? w : z;
21043
+ const z = s ? at(s) : w, $ = z < w ? w : z;
21043
21044
  p(kn($, c) ? void 0 : $);
21044
21045
  }, [e, s]);
21045
21046
  const E = () => {
21046
- h && t(at(h, "yyyy-MM-dd"));
21047
+ h && t(it(h, "yyyy-MM-dd"));
21047
21048
  }, C = (z) => {
21048
21049
  z || (p(void 0), _(!1)), n(z);
21049
21050
  };
@@ -21061,7 +21062,7 @@ function Yy({
21061
21062
  /* @__PURE__ */ i.jsx(ve, { className: "text-foreground text-sm font-semibold", children: d("resume_date") }),
21062
21063
  /* @__PURE__ */ i.jsx(_i, { container: b, children: /* @__PURE__ */ i.jsxs(tr, { open: x, onOpenChange: _, children: [
21063
21064
  /* @__PURE__ */ i.jsx(nr, { asChild: !0, children: /* @__PURE__ */ i.jsxs(
21064
- Z,
21065
+ X,
21065
21066
  {
21066
21067
  variant: "outline",
21067
21068
  className: ie(
@@ -21069,7 +21070,7 @@ function Yy({
21069
21070
  !h && "text-muted-foreground hover:text-muted-foreground"
21070
21071
  ),
21071
21072
  children: [
21072
- h ? at(h, "MM/dd/yyyy") : /* @__PURE__ */ i.jsx("span", { children: d("date_placeholder") }),
21073
+ h ? it(h, "MM/dd/yyyy") : /* @__PURE__ */ i.jsx("span", { children: d("date_placeholder") }),
21073
21074
  /* @__PURE__ */ i.jsx(Li, { className: "text-muted-foreground ml-auto size-4" })
21074
21075
  ]
21075
21076
  }
@@ -21119,7 +21120,7 @@ function Yy({
21119
21120
  a && /* @__PURE__ */ i.jsx("p", { className: "text-destructive text-left text-sm", children: a }),
21120
21121
  /* @__PURE__ */ i.jsx(Ke, { children: /* @__PURE__ */ i.jsxs("div", { className: "flex w-full flex-row justify-between gap-x-2", children: [
21121
21122
  /* @__PURE__ */ i.jsx(
21122
- Z,
21123
+ X,
21123
21124
  {
21124
21125
  className: "bg-muted text-foreground ring-border hover:bg-muted/80 h-10 min-w-[70px] rounded p-3 ring-1",
21125
21126
  onClick: () => C(!1),
@@ -21127,7 +21128,7 @@ function Yy({
21127
21128
  }
21128
21129
  ),
21129
21130
  /* @__PURE__ */ i.jsx(
21130
- Z,
21131
+ X,
21131
21132
  {
21132
21133
  type: "button",
21133
21134
  className: "bg-primary text-primary-foreground h-10 min-w-[70px] rounded p-3 hover:opacity-90 disabled:opacity-50",
@@ -21186,72 +21187,72 @@ function Zy({
21186
21187
  }) {
21187
21188
  const { t: f, locale: v } = ae(), [w, E] = m.useState(void 0), [C, z] = m.useState(!1), [$, M] = m.useState(null), F = /* @__PURE__ */ new Date();
21188
21189
  F.setHours(0, 0, 0, 0);
21189
- const S = nn(F, 1), A = Hn(
21190
+ const S = nn(F, 1), D = Hn(
21190
21191
  o,
21191
21192
  c,
21192
21193
  F
21193
21194
  ), j = m.useMemo(
21194
- () => (d ?? []).map((I, O) => ({
21195
- ...I,
21196
- color: ci[O % ci.length]
21195
+ () => (d ?? []).map((A, K) => ({
21196
+ ...A,
21197
+ color: ci[K % ci.length]
21197
21198
  })),
21198
21199
  [d]
21199
- ), k = m.useMemo(() => {
21200
- const I = /* @__PURE__ */ new Map(), O = wi(/* @__PURE__ */ new Date(), 2);
21201
- for (const X of j) {
21202
- if (!X.nextBillDate) continue;
21203
- let J = ct(X.nextBillDate), re = 0;
21204
- for (; !Eo(J, O) && re < Xy; ) {
21205
- const W = at(J, "yyyy-MM-dd"), oe = I.get(W) ?? [];
21206
- oe.push(X.color), I.set(W, oe), J = Qy(J, X.billingInterval, X.billingIntervalUnit), re++;
21200
+ ), T = m.useMemo(() => {
21201
+ const A = /* @__PURE__ */ new Map(), K = wi(/* @__PURE__ */ new Date(), 2);
21202
+ for (const Z of j) {
21203
+ if (!Z.nextBillDate) continue;
21204
+ let re = at(Z.nextBillDate), G = 0;
21205
+ for (; !Eo(re, K) && G < Xy; ) {
21206
+ const oe = it(re, "yyyy-MM-dd"), O = A.get(oe) ?? [];
21207
+ O.push(Z.color), A.set(oe, O), re = Qy(re, Z.billingInterval, Z.billingIntervalUnit), G++;
21207
21208
  }
21208
21209
  }
21209
- return I;
21210
+ return A;
21210
21211
  }, [j]), L = m.useMemo(
21211
21212
  () => ({
21212
- DayContent: ({ date: I }) => {
21213
- const O = at(I, "yyyy-MM-dd"), X = k.get(O) ?? [];
21213
+ DayContent: ({ date: A }) => {
21214
+ const K = it(A, "yyyy-MM-dd"), Z = T.get(K) ?? [];
21214
21215
  return /* @__PURE__ */ i.jsxs("div", { className: "flex h-full w-full flex-col items-center justify-center", children: [
21215
- /* @__PURE__ */ i.jsx("span", { className: "leading-none", children: I.getDate() }),
21216
- X.length > 0 && /* @__PURE__ */ i.jsx("div", { className: "mt-0.5 flex items-center justify-center gap-0.5", children: X.map((J, re) => /* @__PURE__ */ i.jsx(
21216
+ /* @__PURE__ */ i.jsx("span", { className: "leading-none", children: A.getDate() }),
21217
+ Z.length > 0 && /* @__PURE__ */ i.jsx("div", { className: "mt-0.5 flex items-center justify-center gap-0.5", children: Z.map((re, G) => /* @__PURE__ */ i.jsx(
21217
21218
  "span",
21218
21219
  {
21219
21220
  className: "size-1 rounded-[1px]",
21220
- style: { backgroundColor: J }
21221
+ style: { backgroundColor: re }
21221
21222
  },
21222
- `${O}-${re}`
21223
+ `${K}-${G}`
21223
21224
  )) })
21224
21225
  ] });
21225
21226
  },
21226
21227
  IconLeft: ({
21227
- className: I,
21228
- ...O
21229
- }) => /* @__PURE__ */ i.jsx(Fo, { className: ie("h-4 w-4", I), ...O }),
21228
+ className: A,
21229
+ ...K
21230
+ }) => /* @__PURE__ */ i.jsx(Fo, { className: ie("h-4 w-4", A), ...K }),
21230
21231
  IconRight: ({
21231
- className: I,
21232
- ...O
21233
- }) => /* @__PURE__ */ i.jsx($o, { className: ie("h-4 w-4", I), ...O })
21232
+ className: A,
21233
+ ...K
21234
+ }) => /* @__PURE__ */ i.jsx($o, { className: ie("h-4 w-4", A), ...K })
21234
21235
  }),
21235
- [k]
21236
+ [T]
21236
21237
  );
21237
21238
  m.useEffect(() => {
21238
21239
  if (e)
21239
21240
  if (s) {
21240
- const I = ct(s), O = I < S ? S : I > A ? A : I;
21241
- E(kn(O, b) ? void 0 : O);
21241
+ const A = at(s), K = A < S ? S : A > D ? D : A;
21242
+ E(kn(K, b) ? void 0 : K);
21242
21243
  } else
21243
21244
  E(void 0);
21244
21245
  }, [e, s]);
21245
- const K = () => {
21246
- w && t(at(w, "yyyy-MM-dd"));
21247
- }, V = (I) => {
21248
- I || (E(void 0), z(!1)), n(I);
21249
- }, Y = w ? jt(w, v) : s ? jt(ct(s), v) : f("a_future_date");
21246
+ const W = () => {
21247
+ w && t(it(w, "yyyy-MM-dd"));
21248
+ }, R = (A) => {
21249
+ A || (E(void 0), z(!1)), n(A);
21250
+ }, Y = w != null && s != null && w < at(s), J = w ? jt(w, v) : s ? jt(at(s), v) : f("a_future_date");
21250
21251
  return /* @__PURE__ */ i.jsxs(
21251
21252
  Te,
21252
21253
  {
21253
21254
  open: e,
21254
- onOpenChange: V,
21255
+ onOpenChange: R,
21255
21256
  title: p ?? f("edit_bill_date_title"),
21256
21257
  description: _ ?? f("edit_bill_date_description"),
21257
21258
  presentation: h,
@@ -21262,7 +21263,7 @@ function Zy({
21262
21263
  /* @__PURE__ */ i.jsx(ve, { className: "text-foreground text-sm font-semibold", children: f("next_bill_date_label") }),
21263
21264
  /* @__PURE__ */ i.jsx(_i, { container: $, children: /* @__PURE__ */ i.jsxs(tr, { open: C, onOpenChange: z, children: [
21264
21265
  /* @__PURE__ */ i.jsx(nr, { asChild: !0, children: /* @__PURE__ */ i.jsxs(
21265
- Z,
21266
+ X,
21266
21267
  {
21267
21268
  variant: "outline",
21268
21269
  className: ie(
@@ -21270,7 +21271,7 @@ function Zy({
21270
21271
  !w && "text-muted-foreground hover:text-muted-foreground"
21271
21272
  ),
21272
21273
  children: [
21273
- w ? at(w, "MM/dd/yyyy") : /* @__PURE__ */ i.jsx("span", { children: f("date_placeholder") }),
21274
+ w ? it(w, "MM/dd/yyyy") : /* @__PURE__ */ i.jsx("span", { children: f("date_placeholder") }),
21274
21275
  /* @__PURE__ */ i.jsx(Li, { className: "text-muted-foreground ml-auto size-4" })
21275
21276
  ]
21276
21277
  }
@@ -21286,11 +21287,11 @@ function Zy({
21286
21287
  {
21287
21288
  mode: "single",
21288
21289
  selected: w,
21289
- onSelect: (I) => {
21290
- E(I), z(!1);
21290
+ onSelect: (A) => {
21291
+ E(A), z(!1);
21291
21292
  },
21292
- disabled: (I) => I < S || I > A || kn(I, b),
21293
- defaultMonth: w ?? (s ? ct(s) : void 0),
21293
+ disabled: (A) => A < S || A > D || kn(A, b),
21294
+ defaultMonth: w ?? (s ? at(s) : void 0),
21294
21295
  components: L,
21295
21296
  initialFocus: !0
21296
21297
  }
@@ -21309,9 +21310,10 @@ function Zy({
21309
21310
  w && /* @__PURE__ */ i.jsxs("div", { className: "text-muted-foreground text-xs", children: [
21310
21311
  f("bill_date_preview_prefix"),
21311
21312
  " ",
21312
- /* @__PURE__ */ i.jsx("span", { className: "font-semibold", children: Y }),
21313
+ /* @__PURE__ */ i.jsx("span", { className: "font-semibold", children: J }),
21313
21314
  f("bill_date_preview_suffix")
21314
21315
  ] }),
21316
+ Y && /* @__PURE__ */ i.jsx("p", { className: "text-destructive text-xs", children: f("bill_date_early_order_warning") }),
21315
21317
  j.length > 0 && /* @__PURE__ */ i.jsxs("div", { className: "space-y-2", children: [
21316
21318
  /* @__PURE__ */ i.jsx(ve, { className: "text-foreground text-sm font-semibold", children: f("your_other_subscriptions") }),
21317
21319
  /* @__PURE__ */ i.jsx("div", { className: "border-border max-h-40 overflow-auto rounded-md border", children: /* @__PURE__ */ i.jsxs("table", { className: "w-full table-fixed text-sm", children: [
@@ -21326,58 +21328,58 @@ function Zy({
21326
21328
  /* @__PURE__ */ i.jsx("th", { className: "px-3 py-2 text-left font-medium", children: f("other_subs_product") }),
21327
21329
  /* @__PURE__ */ i.jsx("th", { className: "w-28 px-3 py-2 text-left font-medium", children: f("other_subs_bill_date") })
21328
21330
  ] }) }),
21329
- /* @__PURE__ */ i.jsx("tbody", { className: "divide-border divide-y", children: j.map((I) => /* @__PURE__ */ i.jsxs("tr", { children: [
21331
+ /* @__PURE__ */ i.jsx("tbody", { className: "divide-border divide-y", children: j.map((A) => /* @__PURE__ */ i.jsxs("tr", { children: [
21330
21332
  /* @__PURE__ */ i.jsx("td", { className: "p-2", children: /* @__PURE__ */ i.jsx(
21331
21333
  "span",
21332
21334
  {
21333
21335
  "aria-hidden": !0,
21334
21336
  className: "inline-block size-2.5 rounded-full",
21335
- style: { backgroundColor: I.color }
21337
+ style: { backgroundColor: A.color }
21336
21338
  }
21337
21339
  ) }),
21338
21340
  /* @__PURE__ */ i.jsx(
21339
21341
  "td",
21340
21342
  {
21341
21343
  className: "overflow-hidden px-3 py-2",
21342
- title: I.productTitle,
21344
+ title: A.productTitle,
21343
21345
  children: u ? /* @__PURE__ */ i.jsx(
21344
21346
  "button",
21345
21347
  {
21346
21348
  type: "button",
21347
21349
  onClick: () => {
21348
- u(I.token), V(!1);
21350
+ u(A.token), R(!1);
21349
21351
  },
21350
21352
  className: "text-primary block w-full truncate text-left hover:underline",
21351
- children: I.productTitle
21353
+ children: A.productTitle
21352
21354
  }
21353
- ) : /* @__PURE__ */ i.jsx("span", { className: "text-foreground block truncate", children: I.productTitle })
21355
+ ) : /* @__PURE__ */ i.jsx("span", { className: "text-foreground block truncate", children: A.productTitle })
21354
21356
  }
21355
21357
  ),
21356
- /* @__PURE__ */ i.jsx("td", { className: "text-muted-foreground px-3 py-2 whitespace-nowrap", children: I.nextBillDate ? Kx(
21357
- ct(I.nextBillDate),
21358
+ /* @__PURE__ */ i.jsx("td", { className: "text-muted-foreground px-3 py-2 whitespace-nowrap", children: A.nextBillDate ? Kx(
21359
+ at(A.nextBillDate),
21358
21360
  v
21359
21361
  ) : "—" })
21360
- ] }, I.token)) })
21362
+ ] }, A.token)) })
21361
21363
  ] }) })
21362
21364
  ] })
21363
21365
  ] }),
21364
21366
  a && /* @__PURE__ */ i.jsx("p", { className: "text-destructive text-left text-sm", children: a }),
21365
21367
  /* @__PURE__ */ i.jsx(Ke, { children: /* @__PURE__ */ i.jsxs("div", { className: "flex w-full flex-row justify-between gap-x-2", children: [
21366
21368
  /* @__PURE__ */ i.jsx(
21367
- Z,
21369
+ X,
21368
21370
  {
21369
21371
  variant: "outline",
21370
21372
  className: "h-10 min-w-[70px] rounded p-3",
21371
- onClick: () => V(!1),
21373
+ onClick: () => R(!1),
21372
21374
  children: f("edit_bill_date_cancel")
21373
21375
  }
21374
21376
  ),
21375
21377
  /* @__PURE__ */ i.jsx(
21376
- Z,
21378
+ X,
21377
21379
  {
21378
21380
  type: "button",
21379
21381
  className: "h-10 min-w-[70px] rounded p-3",
21380
- onClick: K,
21382
+ onClick: W,
21381
21383
  disabled: !w || r,
21382
21384
  children: r ? /* @__PURE__ */ i.jsx("div", { className: "border-primary-foreground size-5 animate-spin rounded-full border-4 border-t-4 border-t-transparent" }) : x ?? f("edit_bill_date_action")
21383
21385
  }
@@ -21461,7 +21463,7 @@ function t_({
21461
21463
  ] }),
21462
21464
  (a || r) && /* @__PURE__ */ i.jsxs("div", { className: "flex flex-wrap gap-2", children: [
21463
21465
  a && /* @__PURE__ */ i.jsxs(
21464
- Z,
21466
+ X,
21465
21467
  {
21466
21468
  type: "button",
21467
21469
  size: "default",
@@ -21486,7 +21488,7 @@ function t_({
21486
21488
  }
21487
21489
  ),
21488
21490
  r && /* @__PURE__ */ i.jsx(
21489
- Z,
21491
+ X,
21490
21492
  {
21491
21493
  type: "button",
21492
21494
  variant: a ? "outline" : "default",
@@ -21543,7 +21545,7 @@ function n_({
21543
21545
  ] }) }),
21544
21546
  /* @__PURE__ */ i.jsxs(Ke, { className: "gap-2 sm:justify-between", children: [
21545
21547
  /* @__PURE__ */ i.jsx(
21546
- Z,
21548
+ X,
21547
21549
  {
21548
21550
  type: "button",
21549
21551
  variant: "outline",
@@ -21553,7 +21555,7 @@ function n_({
21553
21555
  }
21554
21556
  ),
21555
21557
  /* @__PURE__ */ i.jsxs(
21556
- Z,
21558
+ X,
21557
21559
  {
21558
21560
  type: "button",
21559
21561
  onClick: s,
@@ -22103,13 +22105,13 @@ function u_({
22103
22105
  z.billing_interval,
22104
22106
  z.billing_interval_unit,
22105
22107
  v
22106
- ), A = e.payment_method, j = A?.details ?? null, k = A ? Ts(A, j) : null, L = "flex h-auto flex-row items-center justify-center gap-2 overflow-hidden border border-border bg-muted py-2 text-xs whitespace-nowrap text-foreground hover:bg-accent sm:text-sm";
22108
+ ), D = e.payment_method, j = D?.details ?? null, T = D ? Ts(D, j) : null, L = "flex h-auto flex-row items-center justify-center gap-2 overflow-hidden border border-border bg-muted py-2 text-xs whitespace-nowrap text-foreground hover:bg-accent sm:text-sm";
22107
22109
  return /* @__PURE__ */ i.jsx("div", { className: "bg-background col-span-4 flex-auto px-8 pt-4", children: /* @__PURE__ */ i.jsxs("div", { className: "mx-auto max-w-lg lg:mx-0 lg:mr-auto", children: [
22108
22110
  n.order.length > 0 && /* @__PURE__ */ i.jsxs("div", { className: "border-border mb-6 border-b pb-6", children: [
22109
22111
  /* @__PURE__ */ i.jsx("h2", { className: "text-foreground mb-3 text-sm/6 font-semibold", children: v("your_upcoming_order") }),
22110
22112
  /* @__PURE__ */ i.jsxs("div", { className: "grid grid-cols-1 gap-3 sm:grid-cols-2", children: [
22111
22113
  n.order.includes("skip_next_order") && /* @__PURE__ */ i.jsxs(
22112
- Z,
22114
+ X,
22113
22115
  {
22114
22116
  variant: "outline",
22115
22117
  onClick: s,
@@ -22122,7 +22124,7 @@ function u_({
22122
22124
  }
22123
22125
  ),
22124
22126
  n.order.includes("edit_bill_date") && /* @__PURE__ */ i.jsxs(
22125
- Z,
22127
+ X,
22126
22128
  {
22127
22129
  variant: "outline",
22128
22130
  onClick: h,
@@ -22143,7 +22145,7 @@ function u_({
22143
22145
  /* @__PURE__ */ i.jsx(ks, { status: F, children: Es.has(F) ? v(`list_status_${F}`) : Fl(F) }),
22144
22146
  n.menu.length > 0 && (f === "bottom-sheet" ? /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
22145
22147
  /* @__PURE__ */ i.jsx(
22146
- Z,
22148
+ X,
22147
22149
  {
22148
22150
  type: "button",
22149
22151
  variant: "ghost",
@@ -22181,7 +22183,7 @@ function u_({
22181
22183
  )
22182
22184
  ] }) : /* @__PURE__ */ i.jsxs(Si, { children: [
22183
22185
  /* @__PURE__ */ i.jsx(ji, { asChild: !0, children: /* @__PURE__ */ i.jsx(
22184
- Z,
22186
+ X,
22185
22187
  {
22186
22188
  type: "button",
22187
22189
  variant: "ghost",
@@ -22212,7 +22214,7 @@ function u_({
22212
22214
  ] })
22213
22215
  ] }),
22214
22216
  n.primary === "resume_subscription" && /* @__PURE__ */ i.jsxs(
22215
- Z,
22217
+ X,
22216
22218
  {
22217
22219
  type: "button",
22218
22220
  onClick: c,
@@ -22225,7 +22227,7 @@ function u_({
22225
22227
  }
22226
22228
  ),
22227
22229
  n.primary === "reactivate_subscription" && /* @__PURE__ */ i.jsxs(
22228
- Z,
22230
+ X,
22229
22231
  {
22230
22232
  type: "button",
22231
22233
  onClick: u,
@@ -22282,13 +22284,13 @@ function u_({
22282
22284
  e.address.phone && /* @__PURE__ */ i.jsx("p", { children: e.address.phone })
22283
22285
  ] })
22284
22286
  ] }),
22285
- A && (p ? /* @__PURE__ */ i.jsx(
22287
+ D && (p ? /* @__PURE__ */ i.jsx(
22286
22288
  "div",
22287
22289
  {
22288
22290
  id: "subscription-payment-method-section",
22289
22291
  className: "scroll-mt-24",
22290
22292
  children: p({
22291
- paymentMethod: A,
22293
+ paymentMethod: D,
22292
22294
  subscriptionToken: e.subscription_token,
22293
22295
  customerId: e.customer?.id ?? 0,
22294
22296
  countryCode: e.address?.country_code ?? "US",
@@ -22304,8 +22306,8 @@ function u_({
22304
22306
  children: [
22305
22307
  /* @__PURE__ */ i.jsx("div", { className: "text-muted-foreground mb-1 text-sm", children: v("payment_method") }),
22306
22308
  /* @__PURE__ */ i.jsxs("div", { className: "text-foreground flex items-center gap-2 text-sm", children: [
22307
- k && /* @__PURE__ */ i.jsx(i_, { display: k }),
22308
- k && /* @__PURE__ */ i.jsx("span", { className: "font-medium", children: k.label })
22309
+ T && /* @__PURE__ */ i.jsx(i_, { display: T }),
22310
+ T && /* @__PURE__ */ i.jsx("span", { className: "font-medium", children: T.label })
22309
22311
  ] })
22310
22312
  ]
22311
22313
  }
@@ -22366,43 +22368,43 @@ function h_({
22366
22368
  v.current = e;
22367
22369
  const [w, E] = m.useState(null), C = m.useCallback(
22368
22370
  ({
22369
- subscriptionToken: T,
22371
+ subscriptionToken: I,
22370
22372
  isBusy: le
22371
22373
  }) => {
22372
- E((Ne) => le ? T : Ne === T ? null : Ne);
22374
+ E((Ne) => le ? I : Ne === I ? null : Ne);
22373
22375
  },
22374
22376
  []
22375
- ), [z, $] = m.useState(!1), [M, F] = m.useState(!1), [S, A] = m.useState(!1), [j, k] = m.useState(!1), [L, K] = m.useState(!1), [V, Y] = m.useState(
22377
+ ), [z, $] = m.useState(!1), [M, F] = m.useState(!1), [S, D] = m.useState(!1), [j, T] = m.useState(!1), [L, W] = m.useState(!1), [R, Y] = m.useState(
22376
22378
  null
22377
- ), [I, O] = m.useState(
22379
+ ), [J, A] = m.useState(
22378
22380
  null
22379
- ), { data: X, isLoading: J, error: re } = X2(e), W = X?.subscription, oe = W?.customer?.id ?? 0, B = W?.status === "past_due" && !Mt(W) && W.next_retry_at == null, ee = cd(e, {
22380
- enabled: B
22381
- }), P = B && ee.isFetching, G = ee.data?.failed_cycle_waiver, xe = G?.next_bill_date != null && G.next_ship_date != null ? h1({
22382
- nextBillDate: G.next_bill_date,
22383
- nextShipDate: G.next_ship_date,
22381
+ ), { data: K, isLoading: Z, error: re } = X2(e), G = K?.subscription, oe = G?.customer?.id ?? 0, O = G?.status === "past_due" && !Mt(G) && G.next_retry_at == null, ee = cd(e, {
22382
+ enabled: O
22383
+ }), P = O && ee.isFetching, U = ee.data?.failed_cycle_waiver, xe = U?.next_bill_date != null && U.next_ship_date != null ? h1({
22384
+ nextBillDate: U.next_bill_date,
22385
+ nextShipDate: U.next_ship_date,
22384
22386
  locale: b,
22385
- timezone: W?.timezone ?? "UTC"
22386
- }) : null, ye = B && !P && !ee.isError && G?.eligible === !0 && xe != null, Pe = c1({
22387
+ timezone: G?.timezone ?? "UTC"
22388
+ }) : null, ye = O && !P && !ee.isError && U?.eligible === !0 && xe != null, Pe = c1({
22387
22389
  subscriptionToken: e,
22388
22390
  onSucceeded: () => r?.(_("payment_retry_succeeded"), "success"),
22389
22391
  onFailed: () => r?.(_("payment_retry_failed"), "error"),
22390
22392
  onTimedOut: () => r?.(_("payment_retry_processing"), "warning")
22391
22393
  }), Me = o1({
22392
- onSuccess: ({ subscriptionToken: T }) => {
22393
- v.current === T && Pe.start();
22394
+ onSuccess: ({ subscriptionToken: I }) => {
22395
+ v.current === I && Pe.start();
22394
22396
  },
22395
- onError: (T, { subscriptionToken: le }) => {
22396
- v.current === le && a?.(_("unable_to_retry_payment"), T);
22397
+ onError: (I, { subscriptionToken: le }) => {
22398
+ v.current === le && a?.(_("unable_to_retry_payment"), I);
22397
22399
  }
22398
22400
  }), Fe = dd({
22399
- onSuccess: ({ subscriptionToken: T }) => {
22401
+ onSuccess: ({ subscriptionToken: I }) => {
22400
22402
  Y(
22401
- (le) => le === T ? null : le
22402
- ), v.current === T && r?.(_("failed_cycle_waiver_succeeded"), "success");
22403
+ (le) => le === I ? null : le
22404
+ ), v.current === I && r?.(_("failed_cycle_waiver_succeeded"), "success");
22403
22405
  },
22404
- onError: (T, { subscriptionToken: le }) => {
22405
- if (l_(T)) {
22406
+ onError: (I, { subscriptionToken: le }) => {
22407
+ if (l_(I)) {
22406
22408
  if (Promise.all([
22407
22409
  f.invalidateQueries({
22408
22410
  queryKey: te.detail(le),
@@ -22424,65 +22426,65 @@ function h_({
22424
22426
  );
22425
22427
  return;
22426
22428
  }
22427
- a?.(_("generic_error"), T);
22429
+ a?.(_("generic_error"), I);
22428
22430
  }
22429
22431
  }), De = Q2(
22430
22432
  { perPage: 100 },
22431
22433
  { enabled: L }
22432
22434
  ), Oe = m.useMemo(
22433
- () => (De.data?.subscriptions ?? []).filter((T) => T.subscription_token !== e).map((T) => ({
22434
- token: T.subscription_token,
22435
- productTitle: T.variant?.product?.title ?? _("breadcrumb"),
22436
- nextBillDate: T.next_bill_date,
22437
- billingInterval: T.subscription_plan?.billing_interval ?? 1,
22438
- billingIntervalUnit: T.subscription_plan?.billing_interval_unit ?? "month"
22435
+ () => (De.data?.subscriptions ?? []).filter((I) => I.subscription_token !== e).map((I) => ({
22436
+ token: I.subscription_token,
22437
+ productTitle: I.variant?.product?.title ?? _("breadcrumb"),
22438
+ nextBillDate: I.next_bill_date,
22439
+ billingInterval: I.subscription_plan?.billing_interval ?? 1,
22440
+ billingIntervalUnit: I.subscription_plan?.billing_interval_unit ?? "month"
22439
22441
  })),
22440
22442
  [De.data, e, _]
22441
- ), He = m.useRef(null), U = Z2({
22442
- onSuccess: (T, { pauseParams: le }) => r?.(
22443
+ ), He = m.useRef(null), q = Z2({
22444
+ onSuccess: (I, { pauseParams: le }) => r?.(
22443
22445
  $n(
22444
22446
  le.nextBillDate ?? He.current,
22445
- T.subscription.next_bill_date,
22447
+ I.subscription.next_bill_date,
22446
22448
  _,
22447
22449
  b,
22448
- T.subscription.timezone
22450
+ I.subscription.timezone
22449
22451
  ) ?? _("subscription_paused")
22450
22452
  ),
22451
- onError: (T) => a?.(_("failed_to_pause"), T)
22452
- }), R = J2({
22453
- onSuccess: (T, { resumeParams: le }) => r?.(
22453
+ onError: (I) => a?.(_("failed_to_pause"), I)
22454
+ }), B = J2({
22455
+ onSuccess: (I, { resumeParams: le }) => r?.(
22454
22456
  $n(
22455
22457
  le.nextBillDate,
22456
- T.subscription.next_bill_date,
22458
+ I.subscription.next_bill_date,
22457
22459
  _,
22458
22460
  b,
22459
- T.subscription.timezone
22461
+ I.subscription.timezone
22460
22462
  ) ?? _("subscription_resumed")
22461
22463
  ),
22462
- onError: (T) => a?.(_("failed_to_resume"), T)
22464
+ onError: (I) => a?.(_("failed_to_resume"), I)
22463
22465
  }), ne = ed({
22464
22466
  onSuccess: () => r?.(_("next_billing_skipped")),
22465
- onError: (T) => a?.(_("failed_to_skip"), T)
22466
- }), D = nd({
22467
+ onError: (I) => a?.(_("failed_to_skip"), I)
22468
+ }), H = nd({
22467
22469
  onSuccess: () => {
22468
22470
  r?.(_("subscription_cancelled")), $(!1);
22469
22471
  },
22470
- onError: (T) => a?.(_("failed_to_cancel"), T)
22472
+ onError: (I) => a?.(_("failed_to_cancel"), I)
22471
22473
  }), ce = rd({
22472
22474
  onSuccess: () => r?.(_("subscription_reactivated")),
22473
- onError: (T) => a?.(_("failed_to_reactivate"), T)
22475
+ onError: (I) => a?.(_("failed_to_reactivate"), I)
22474
22476
  }), [_e, Ce] = m.useState(null), he = m.useRef(
22475
22477
  null
22476
22478
  ), Qe = Ot({
22477
- onSuccess: ({ subscriptionToken: T }) => {
22478
- v.current === T && r?.(_("quantity_updated"));
22479
+ onSuccess: ({ subscriptionToken: I }) => {
22480
+ v.current === I && r?.(_("quantity_updated"));
22479
22481
  },
22480
- onError: (T, { subscriptionToken: le }) => {
22481
- v.current === le && (Ce(null), a?.(_("failed_to_update_quantity"), T));
22482
+ onError: (I, { subscriptionToken: le }) => {
22483
+ v.current === le && (Ce(null), a?.(_("failed_to_update_quantity"), I));
22482
22484
  }
22483
22485
  }), de = Ot({
22484
- onSuccess: ({ subscriptionToken: T, body: le }, Ne) => {
22485
- v.current === T && (r?.(
22486
+ onSuccess: ({ subscriptionToken: I, body: le }, Ne) => {
22487
+ v.current === I && (r?.(
22486
22488
  $n(
22487
22489
  le.next_bill_date,
22488
22490
  Ne.subscription.next_bill_date,
@@ -22490,16 +22492,16 @@ function h_({
22490
22492
  b,
22491
22493
  Ne.subscription.timezone
22492
22494
  ) ?? _("bill_date_updated")
22493
- ), Ne.subscription.next_bill_date && O(Ne.subscription.next_bill_date.slice(0, 10)), K(!1));
22495
+ ), Ne.subscription.next_bill_date && A(Ne.subscription.next_bill_date.slice(0, 10)), W(!1));
22494
22496
  },
22495
- onError: (T, { subscriptionToken: le }) => {
22496
- v.current === le && (O(null), a?.(_("failed_to_update_bill_date"), T));
22497
+ onError: (I, { subscriptionToken: le }) => {
22498
+ v.current === le && (A(null), a?.(_("failed_to_update_bill_date"), I));
22497
22499
  }
22498
- }), ke = X?.subscription.next_bill_date ?? null;
22500
+ }), ke = K?.subscription.next_bill_date ?? null;
22499
22501
  m.useEffect(() => {
22500
- I != null && ke != null && ke.startsWith(I) && O(null);
22501
- }, [I, ke]);
22502
- const hn = X?.subscription.quantity;
22502
+ J != null && ke != null && ke.startsWith(J) && A(null);
22503
+ }, [J, ke]);
22504
+ const hn = K?.subscription.quantity;
22503
22505
  m.useEffect(() => {
22504
22506
  _e != null && hn === _e && Ce(null);
22505
22507
  }, [_e, hn]), m.useEffect(
@@ -22509,10 +22511,10 @@ function h_({
22509
22511
  []
22510
22512
  );
22511
22513
  const N = Qe.mutate, Q = m.useCallback(
22512
- (T) => {
22513
- const le = Math.max(1, T);
22514
+ (I) => {
22515
+ const le = Math.max(1, I);
22514
22516
  Ce(le), he.current && clearTimeout(he.current), he.current = setTimeout(() => {
22515
- const Ne = X?.subscription.quantity;
22517
+ const Ne = K?.subscription.quantity;
22516
22518
  if (le === Ne) {
22517
22519
  Ce(null);
22518
22520
  return;
@@ -22523,61 +22525,61 @@ function h_({
22523
22525
  });
22524
22526
  }, 500);
22525
22527
  },
22526
- [X?.subscription.quantity, N, e]
22528
+ [K?.subscription.quantity, N, e]
22527
22529
  ), Xe = m.useRef(t);
22528
22530
  Xe.current = t;
22529
22531
  const fn = m.useRef(n);
22530
22532
  if (fn.current = n, m.useEffect(() => {
22531
- !J && re && Xe.current?.(re);
22532
- }, [J, re]), m.useEffect(() => {
22533
- !J && !re && !W && fn.current?.();
22534
- }, [J, re, W]), J)
22533
+ !Z && re && Xe.current?.(re);
22534
+ }, [Z, re]), m.useEffect(() => {
22535
+ !Z && !re && !G && fn.current?.();
22536
+ }, [Z, re, G]), Z)
22535
22537
  return /* @__PURE__ */ i.jsx(s_, {});
22536
- if (!W)
22538
+ if (!G)
22537
22539
  return null;
22538
- const Le = W.subscription_plan, pn = sr(W), Rs = pn === "active", vn = Ed({
22539
- status: W.status,
22540
- billingCycleLimitReached: W.billing_cycle_limit_reached,
22541
- nextRetryAt: W.next_retry_at,
22542
- nextBillDate: W.next_bill_date,
22543
- allowSkipping: W.subscription_plan.allow_skipping,
22544
- maxSkips: W.subscription_plan.max_skips,
22545
- skippedCount: W.skipped_count,
22540
+ const Le = G.subscription_plan, pn = sr(G), Rs = pn === "active", vn = Ed({
22541
+ status: G.status,
22542
+ billingCycleLimitReached: G.billing_cycle_limit_reached,
22543
+ nextRetryAt: G.next_retry_at,
22544
+ nextBillDate: G.next_bill_date,
22545
+ allowSkipping: G.subscription_plan.allow_skipping,
22546
+ maxSkips: G.subscription_plan.max_skips,
22547
+ skippedCount: G.skipped_count,
22546
22548
  hasPendingSkip: _d(
22547
- W.subscription_skips,
22549
+ G.subscription_skips,
22548
22550
  /* @__PURE__ */ new Date(),
22549
- W.timezone
22551
+ G.timezone
22550
22552
  ),
22551
22553
  canWaiveFailedCycle: ye,
22552
22554
  isWaiverPreviewLoading: P
22553
- }), fr = Me.isPending && Me.variables?.subscriptionToken === e || Pe.isProcessing, Sl = U.isPending || R.isPending || ne.isPending || D.isPending || ce.isPending || de.isPending, Vs = w === e, gn = Fe.isPending && Fe.variables?.subscriptionToken === e, pr = fr || Vs || gn, qs = Mt(W) || fr || gn || Sl, Us = Sl || pr, Gs = (T) => {
22555
+ }), fr = Me.isPending && Me.variables?.subscriptionToken === e || Pe.isProcessing, Sl = q.isPending || B.isPending || ne.isPending || H.isPending || ce.isPending || de.isPending, Vs = w === e, gn = Fe.isPending && Fe.variables?.subscriptionToken === e, pr = fr || Vs || gn, qs = Mt(G) || fr || gn || Sl, Us = Sl || pr, Gs = (I) => {
22554
22556
  const le = { customerId: oe };
22555
- He.current = null, T.type === "order_count" && (le.numberOfOrders = T.numberOfOrders, He.current = T.shownResumeDate), U.mutate(
22557
+ He.current = null, I.type === "order_count" && (le.numberOfOrders = I.numberOfOrders, He.current = I.shownResumeDate), q.mutate(
22556
22558
  { subscriptionToken: e, pauseParams: le },
22557
22559
  { onSuccess: () => F(!1) }
22558
22560
  );
22559
- }, Ws = (T) => {
22560
- R.mutate(
22561
+ }, Ws = (I) => {
22562
+ B.mutate(
22561
22563
  {
22562
22564
  subscriptionToken: e,
22563
- resumeParams: { customerId: oe, nextBillDate: T }
22565
+ resumeParams: { customerId: oe, nextBillDate: I }
22564
22566
  },
22565
- { onSuccess: () => A(!1) }
22567
+ { onSuccess: () => D(!1) }
22566
22568
  );
22567
22569
  }, Ks = () => {
22568
- const T = Ll(
22570
+ const I = Ll(
22569
22571
  Le.billing_interval,
22570
22572
  Le.billing_interval_unit
22571
22573
  );
22572
22574
  ne.mutate({
22573
22575
  subscriptionToken: e,
22574
- skipParams: { customerId: oe, nextBillDate: T }
22576
+ skipParams: { customerId: oe, nextBillDate: I }
22575
22577
  });
22576
22578
  }, Ys = () => {
22577
- D.mutate({ subscriptionToken: e, customerId: oe });
22579
+ H.mutate({ subscriptionToken: e, customerId: oe });
22578
22580
  }, Qs = () => {
22579
22581
  if (h) {
22580
- k(!0);
22582
+ T(!0);
22581
22583
  return;
22582
22584
  }
22583
22585
  ce.mutate({
@@ -22587,35 +22589,35 @@ function h_({
22587
22589
  }, Xs = () => {
22588
22590
  pr || Me.mutate({ subscriptionToken: e });
22589
22591
  }, Zs = a_(
22590
- W.payment_method ?? null
22592
+ G.payment_method ?? null
22591
22593
  ), Js = ({
22592
- addressId: T
22594
+ addressId: I
22593
22595
  }) => {
22594
22596
  ce.mutate(
22595
22597
  {
22596
22598
  subscriptionToken: e,
22597
- reactivateParams: T != null ? { address_id: T } : {}
22599
+ reactivateParams: I != null ? { address_id: I } : {}
22598
22600
  },
22599
- { onSuccess: () => k(!1) }
22601
+ { onSuccess: () => T(!1) }
22600
22602
  );
22601
22603
  };
22602
22604
  return /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
22603
22605
  pn === "past_due" && /* @__PURE__ */ i.jsx("div", { className: "mb-4 px-2 sm:px-0 lg:mb-6", children: /* @__PURE__ */ i.jsx(
22604
22606
  t_,
22605
22607
  {
22606
- productTitle: W.variant?.product?.title ?? null,
22607
- nextRetryAt: W.next_retry_at ?? null,
22608
- declineCount: W.decline_count ?? null,
22608
+ productTitle: G.variant?.product?.title ?? null,
22609
+ nextRetryAt: G.next_retry_at ?? null,
22610
+ declineCount: G.decline_count ?? null,
22609
22611
  savedMethodLabel: Zs,
22610
22612
  onRetryPaymentClick: vn.recovery?.primary === "retry_payment" ? Xs : void 0,
22611
22613
  isRetryingPayment: fr,
22612
22614
  isCheckingWaiver: vn.recovery?.isCheckingWaiver === !0,
22613
22615
  recoveryDisabled: pr,
22614
22616
  onUpdatePaymentClick: p ?? (() => {
22615
- const T = document.getElementById(
22617
+ const I = document.getElementById(
22616
22618
  "subscription-payment-method-section"
22617
22619
  );
22618
- T && T.scrollIntoView({ behavior: "smooth", block: "start" });
22620
+ I && I.scrollIntoView({ behavior: "smooth", block: "start" });
22619
22621
  }),
22620
22622
  onWaiveFailedCycleClick: vn.recovery?.tertiary === "waive_failed_cycle" ? () => Y(e) : void 0
22621
22623
  }
@@ -22624,9 +22626,9 @@ function h_({
22624
22626
  /* @__PURE__ */ i.jsx(
22625
22627
  d_,
22626
22628
  {
22627
- subscription: W,
22629
+ subscription: G,
22628
22630
  displayQuantity: _e ?? void 0,
22629
- displayNextBillDate: I ?? void 0,
22631
+ displayNextBillDate: J ?? void 0,
22630
22632
  canEditQuantity: Rs,
22631
22633
  onQuantityChange: Q,
22632
22634
  isUpdatingQuantity: Qe.isPending,
@@ -22636,17 +22638,17 @@ function h_({
22636
22638
  /* @__PURE__ */ i.jsx(
22637
22639
  u_,
22638
22640
  {
22639
- subscription: W,
22641
+ subscription: G,
22640
22642
  actionPolicy: vn,
22641
22643
  isMutating: Us,
22642
22644
  paymentMethodDisabled: qs,
22643
22645
  onPaymentRecoveryStateChange: C,
22644
22646
  onSkip: Ks,
22645
22647
  onPause: () => F(!0),
22646
- onResume: () => A(!0),
22648
+ onResume: () => D(!0),
22647
22649
  onCancel: () => $(!0),
22648
22650
  onReactivate: Qs,
22649
- onEditBillDate: () => K(!0),
22651
+ onEditBillDate: () => W(!0),
22650
22652
  renderPaymentMethod: o,
22651
22653
  renderShippingAddress: c,
22652
22654
  renderAutoApplyPoints: d,
@@ -22655,7 +22657,7 @@ function h_({
22655
22657
  }
22656
22658
  )
22657
22659
  ] }),
22658
- /* @__PURE__ */ i.jsx(m_, { subscription: W }),
22660
+ /* @__PURE__ */ i.jsx(m_, { subscription: G }),
22659
22661
  /* @__PURE__ */ i.jsx(
22660
22662
  Wy,
22661
22663
  {
@@ -22663,14 +22665,14 @@ function h_({
22663
22665
  presentation: x,
22664
22666
  onOpenChange: $,
22665
22667
  onConfirm: Ys,
22666
- onPauseInstead: (T) => {
22667
- U.mutate(
22668
+ onPauseInstead: (I) => {
22669
+ q.mutate(
22668
22670
  {
22669
22671
  subscriptionToken: e,
22670
22672
  pauseParams: {
22671
22673
  customerId: oe,
22672
- nextBillDate: at(
22673
- Ei(/* @__PURE__ */ new Date(), T),
22674
+ nextBillDate: it(
22675
+ Ei(/* @__PURE__ */ new Date(), I),
22674
22676
  "yyyy-MM-dd"
22675
22677
  )
22676
22678
  }
@@ -22681,7 +22683,7 @@ function h_({
22681
22683
  }
22682
22684
  );
22683
22685
  },
22684
- isPending: U.isPending
22686
+ isPending: q.isPending
22685
22687
  }
22686
22688
  ),
22687
22689
  /* @__PURE__ */ i.jsx(
@@ -22689,19 +22691,19 @@ function h_({
22689
22691
  {
22690
22692
  open: L,
22691
22693
  presentation: x,
22692
- onOpenChange: (T) => {
22693
- T || de.reset(), K(T);
22694
+ onOpenChange: (I) => {
22695
+ I || de.reset(), W(I);
22694
22696
  },
22695
- onConfirm: (T) => {
22696
- O(T), de.mutate({
22697
+ onConfirm: (I) => {
22698
+ A(I), de.mutate({
22697
22699
  subscriptionToken: e,
22698
- body: { next_bill_date: T }
22700
+ body: { next_bill_date: I }
22699
22701
  });
22700
22702
  },
22701
22703
  isLoading: de.isPending,
22702
22704
  errorMessage: de.isError ? _("bill_date_error") : void 0,
22703
- blackoutDays: W.blackout_days,
22704
- currentNextBillDate: W.next_bill_date,
22705
+ blackoutDays: G.blackout_days,
22706
+ currentNextBillDate: G.next_bill_date,
22705
22707
  billingInterval: Le.billing_interval,
22706
22708
  billingIntervalUnit: Le.billing_interval_unit,
22707
22709
  otherSubscriptions: Oe,
@@ -22713,13 +22715,13 @@ function h_({
22713
22715
  {
22714
22716
  open: M,
22715
22717
  presentation: x,
22716
- onOpenChange: (T) => {
22717
- T || U.reset(), F(T);
22718
+ onOpenChange: (I) => {
22719
+ I || q.reset(), F(I);
22718
22720
  },
22719
22721
  onConfirm: Gs,
22720
- isLoading: U.isPending,
22721
- errorMessage: U.isError ? _("generic_error") : void 0,
22722
- currentNextBillDate: W.next_bill_date,
22722
+ isLoading: q.isPending,
22723
+ errorMessage: q.isError ? _("generic_error") : void 0,
22724
+ currentNextBillDate: G.next_bill_date,
22723
22725
  billingInterval: Le.billing_interval,
22724
22726
  billingIntervalUnit: Le.billing_interval_unit
22725
22727
  }
@@ -22729,13 +22731,13 @@ function h_({
22729
22731
  {
22730
22732
  open: S,
22731
22733
  presentation: x,
22732
- onOpenChange: (T) => {
22733
- T || R.reset(), A(T);
22734
+ onOpenChange: (I) => {
22735
+ I || B.reset(), D(I);
22734
22736
  },
22735
22737
  onConfirm: Ws,
22736
- isLoading: R.isPending,
22737
- errorMessage: R.isError ? _("generic_error") : void 0,
22738
- blackoutDays: W.blackout_days,
22738
+ isLoading: B.isPending,
22739
+ errorMessage: B.isError ? _("generic_error") : void 0,
22740
+ blackoutDays: G.blackout_days,
22739
22741
  defaultNextBillDate: Ll(
22740
22742
  Le.billing_interval,
22741
22743
  Le.billing_interval_unit
@@ -22745,25 +22747,25 @@ function h_({
22745
22747
  /* @__PURE__ */ i.jsx(
22746
22748
  n_,
22747
22749
  {
22748
- open: V === e,
22750
+ open: R === e,
22749
22751
  presentation: x,
22750
- preview: V === e ? ee.data?.failed_cycle_waiver ?? null : null,
22751
- timezone: W.timezone ?? "UTC",
22752
+ preview: R === e ? ee.data?.failed_cycle_waiver ?? null : null,
22753
+ timezone: G.timezone ?? "UTC",
22752
22754
  isPending: gn,
22753
- onOpenChange: (T) => {
22754
- T || Y(
22755
+ onOpenChange: (I) => {
22756
+ I || Y(
22755
22757
  (le) => le === e ? null : le
22756
22758
  );
22757
22759
  },
22758
22760
  onConfirm: () => {
22759
- V !== e || gn || Fe.mutate({ subscriptionToken: e });
22761
+ R !== e || gn || Fe.mutate({ subscriptionToken: e });
22760
22762
  }
22761
22763
  }
22762
22764
  ),
22763
22765
  h?.({
22764
22766
  open: j,
22765
- onOpenChange: (T) => {
22766
- T || ce.reset(), k(T);
22767
+ onOpenChange: (I) => {
22768
+ I || ce.reset(), T(I);
22767
22769
  },
22768
22770
  onConfirm: Js,
22769
22771
  isLoading: ce.isPending,
@@ -22857,7 +22859,7 @@ function g_({
22857
22859
  className: _ = "",
22858
22860
  presentation: b = "dialog"
22859
22861
  }) {
22860
- const { t: f } = it(), v = u ?? f("add_a_payment_method"), [w, E] = m.useState(!1), C = m.useId(), z = n ? Kl(n, f("card_expires")) : null;
22862
+ const { t: f } = st(), v = u ?? f("add_a_payment_method"), [w, E] = m.useState(!1), C = m.useId(), z = n ? Kl(n, f("card_expires")) : null;
22861
22863
  return /* @__PURE__ */ i.jsxs("div", { className: ie("border-border mb-6 border-b pb-4", _), children: [
22862
22864
  /* @__PURE__ */ i.jsxs(
22863
22865
  "button",
@@ -22935,8 +22937,8 @@ function g_({
22935
22937
  "aria-selected": M,
22936
22938
  "aria-disabled": x,
22937
22939
  onClick: S,
22938
- onKeyDown: (A) => {
22939
- (A.key === "Enter" || A.key === " ") && (A.preventDefault(), S());
22940
+ onKeyDown: (D) => {
22941
+ (D.key === "Enter" || D.key === " ") && (D.preventDefault(), S());
22940
22942
  },
22941
22943
  className: ie(
22942
22944
  "text-foreground flex w-full flex-row items-center justify-between gap-3 rounded-sm p-3 text-left transition-colors",
@@ -22963,8 +22965,8 @@ function g_({
22963
22965
  (o || c || d) && /* @__PURE__ */ i.jsx(
22964
22966
  "span",
22965
22967
  {
22966
- onClick: (A) => A.stopPropagation(),
22967
- onKeyDown: (A) => A.stopPropagation(),
22968
+ onClick: (D) => D.stopPropagation(),
22969
+ onKeyDown: (D) => D.stopPropagation(),
22968
22970
  children: /* @__PURE__ */ i.jsx(
22969
22971
  b1,
22970
22972
  {
@@ -23082,7 +23084,7 @@ function w_({
23082
23084
  addDialogOpen: o,
23083
23085
  onAddDialogOpenChange: c
23084
23086
  }) {
23085
- const { isMobile: d } = ht(), { t: u } = it(), { t: h } = ae(), { locale: p } = Xn(), x = m.useRef(n);
23087
+ const { isMobile: d } = ht(), { t: u } = st(), { t: h } = ae(), { locale: p } = Xn(), x = m.useRef(n);
23086
23088
  x.current = n;
23087
23089
  const _ = m.useRef(t);
23088
23090
  _.current = t;
@@ -23100,29 +23102,29 @@ function w_({
23100
23102
  c ? c(N) : M(N);
23101
23103
  },
23102
23104
  [c]
23103
- ), A = m.useRef(!1), [j, k] = m.useState(null), [L, K] = m.useState(null), [V, Y] = m.useState(void 0), [I, O] = m.useState(null), X = m.useRef(n), { data: J = [], isLoading: re } = Ae({
23105
+ ), D = m.useRef(!1), [j, T] = m.useState(null), [L, W] = m.useState(null), [R, Y] = m.useState(void 0), [J, A] = m.useState(null), K = m.useRef(n), { data: Z = [], isLoading: re } = Ae({
23104
23106
  queryKey: $e.paymentMethods.list(),
23105
23107
  queryFn: async () => (await E.fetchPaymentMethods()).payment_methods.map(zs)
23106
- }), { data: W = [] } = Ae({
23108
+ }), { data: G = [] } = Ae({
23107
23109
  queryKey: $e.addresses.list(),
23108
23110
  queryFn: async () => (await E.fetchAddresses()).addresses.map(di),
23109
23111
  enabled: F
23110
- }), oe = nl(), { data: B } = Ae({
23112
+ }), oe = nl(), { data: O } = Ae({
23111
23113
  queryKey: el.countries(p),
23112
23114
  queryFn: () => oe.listCountries({ languageIso: p }),
23113
23115
  enabled: F || j !== null
23114
23116
  }), ee = m.useMemo(
23115
- () => [...B?.countries ?? []].map((N) => ({ iso: N.code, name: N.name })).sort((N, Q) => N.name.localeCompare(Q.name)),
23116
- [B]
23117
+ () => [...O?.countries ?? []].map((N) => ({ iso: N.code, name: N.name })).sort((N, Q) => N.name.localeCompare(Q.name)),
23118
+ [O]
23117
23119
  ), P = m.useMemo(() => {
23118
23120
  const N = /* @__PURE__ */ new Map();
23119
- for (const Q of B?.countries ?? [])
23121
+ for (const Q of O?.countries ?? [])
23120
23122
  N.set(
23121
23123
  Q.code,
23122
23124
  Q.states.map((Xe) => ({ name: Xe.name, isoCode: Xe.code }))
23123
23125
  );
23124
23126
  return N;
23125
- }, [B]), G = m.useCallback(
23127
+ }, [O]), U = m.useCallback(
23126
23128
  (N) => Promise.resolve(P.get(N) ?? []),
23127
23129
  [P]
23128
23130
  ), xe = c1({
@@ -23174,8 +23176,8 @@ function w_({
23174
23176
  const Q = b.current;
23175
23177
  if (!v(Q) || _.current)
23176
23178
  return;
23177
- const Xe = A.current;
23178
- A.current = !1, Xe ? a?.(u("payment_method_added")) : Pe.mutate({
23179
+ const Xe = D.current;
23180
+ D.current = !1, Xe ? a?.(u("payment_method_added")) : Pe.mutate({
23179
23181
  subscriptionToken: Q,
23180
23182
  body: { payment_method_id: N }
23181
23183
  });
@@ -23190,14 +23192,14 @@ function w_({
23190
23192
  },
23191
23193
  onFailed: (N) => {
23192
23194
  const Q = b.current;
23193
- v(Q) && O(N);
23195
+ v(Q) && A(N);
23194
23196
  },
23195
23197
  onCanceled: () => {
23196
23198
  }
23197
23199
  });
23198
23200
  m.useEffect(() => {
23199
- const N = X.current !== n;
23200
- N && (X.current = n, A.current = !1, k(null), K(null), Y(void 0), O(null));
23201
+ const N = K.current !== n;
23202
+ N && (K.current = n, D.current = !1, T(null), W(null), Y(void 0), A(null));
23201
23203
  const Q = b.current !== null && b.current !== n;
23202
23204
  !Fe.isActive && (N || Q) && (b.current = null, S(!1));
23203
23205
  }, [Fe.isActive, S, n]);
@@ -23254,7 +23256,7 @@ function w_({
23254
23256
  const Q = f.current;
23255
23257
  v(Q) && s?.(u("failed_to_create_address"), N);
23256
23258
  }
23257
- }), U = fe({
23259
+ }), q = fe({
23258
23260
  mutationFn: ({
23259
23261
  paymentMethodId: N,
23260
23262
  data: Q
@@ -23283,7 +23285,7 @@ function w_({
23283
23285
  const Q = f.current;
23284
23286
  v(Q) && s?.(u("failed_to_update_payment_method"), N);
23285
23287
  }
23286
- }), R = fe({
23288
+ }), B = fe({
23287
23289
  mutationFn: (N) => E.deletePaymentMethod(N),
23288
23290
  onSuccess: async () => {
23289
23291
  await C.invalidateQueries({
@@ -23318,10 +23320,10 @@ function w_({
23318
23320
  const Q = f.current;
23319
23321
  v(Q) && s?.(u("failed_to_set_default_payment_method"), N);
23320
23322
  }
23321
- }), D = __(
23322
- J,
23323
+ }), H = __(
23324
+ Z,
23323
23325
  e
23324
- ), ce = D.find((N) => N.id === e.id) ?? y_(e), _e = He.isPending || U.isPending || R.isPending || ne.isPending, Ce = Oe.isPending || Fe.isActive, he = Pe.isPending || ye.isPending || xe.isProcessing || Ce || _e, Qe = Pe.isPending && Pe.variables?.subscriptionToken === n || ye.isPending && ye.variables?.subscriptionToken === n || xe.isProcessing || Ce && b.current === n || _e && f.current === n, de = t || he;
23326
+ ), ce = H.find((N) => N.id === e.id) ?? y_(e), _e = He.isPending || q.isPending || B.isPending || ne.isPending, Ce = Oe.isPending || Fe.isActive, he = Pe.isPending || ye.isPending || xe.isProcessing || Ce || _e, Qe = Pe.isPending && Pe.variables?.subscriptionToken === n || ye.isPending && ye.variables?.subscriptionToken === n || xe.isProcessing || Ce && b.current === n || _e && f.current === n, de = t || he;
23325
23327
  m.useEffect(() => {
23326
23328
  r?.({
23327
23329
  subscriptionToken: n,
@@ -23341,7 +23343,7 @@ function w_({
23341
23343
  const N = n;
23342
23344
  f.current = N, Y(void 0);
23343
23345
  try {
23344
- await R.mutateAsync(L.id), v(N) && K(null);
23346
+ await B.mutateAsync(L.id), v(N) && W(null);
23345
23347
  } catch (Q) {
23346
23348
  v(N) && Y(ke(Q));
23347
23349
  }
@@ -23353,9 +23355,9 @@ function w_({
23353
23355
  presentation: d ? "bottom-sheet" : "dialog",
23354
23356
  title: h("payment_method"),
23355
23357
  displayPaymentMethod: ce,
23356
- paymentMethodList: D,
23358
+ paymentMethodList: H,
23357
23359
  onAddPaymentMethodClick: () => {
23358
- de || (A.current = !0, S(!0));
23360
+ de || (D.current = !0, S(!0));
23359
23361
  },
23360
23362
  addPaymentMethodLabel: u("add_payment_method_action"),
23361
23363
  showAddButton: !0,
@@ -23368,9 +23370,9 @@ function w_({
23368
23370
  body: { payment_method_id: N.id }
23369
23371
  });
23370
23372
  },
23371
- onEditPaymentMethod: de ? void 0 : (N) => k(N),
23373
+ onEditPaymentMethod: de ? void 0 : (N) => T(N),
23372
23374
  onDeletePaymentMethod: de ? void 0 : (N) => {
23373
- Y(void 0), K(N);
23375
+ Y(void 0), W(N);
23374
23376
  },
23375
23377
  onMakeDefaultPaymentMethod: de ? void 0 : (N) => {
23376
23378
  f.current = n, ne.mutate(N);
@@ -23383,13 +23385,13 @@ function w_({
23383
23385
  presentation: d ? "bottom-sheet" : "dialog",
23384
23386
  isOpen: F,
23385
23387
  onClose: () => {
23386
- Fe.isActive || (A.current = !1, b.current = null, O(null), S(!1));
23388
+ Fe.isActive || (D.current = !1, b.current = null, A(null), S(!1));
23387
23389
  },
23388
- error: I ?? void 0,
23390
+ error: J ?? void 0,
23389
23391
  t: w,
23390
23392
  onSubmit: async (N) => {
23391
23393
  if (!de) {
23392
- b.current = n, O(null);
23394
+ b.current = n, A(null);
23393
23395
  try {
23394
23396
  await Oe.mutateAsync(N);
23395
23397
  } catch {
@@ -23398,8 +23400,8 @@ function w_({
23398
23400
  },
23399
23401
  isSubmitting: de,
23400
23402
  jwt: "",
23401
- savedAddresses: W,
23402
- defaultBillingAddressId: W.find((N) => N.default)?.id,
23403
+ savedAddresses: G,
23404
+ defaultBillingAddressId: G.find((N) => N.default)?.id,
23403
23405
  renderAddressFormDialog: ({ isOpen: N, onClose: Q, onAddressCreated: Xe }) => /* @__PURE__ */ i.jsx(
23404
23406
  Wn,
23405
23407
  {
@@ -23420,7 +23422,7 @@ function w_({
23420
23422
  },
23421
23423
  isSubmitting: de,
23422
23424
  countries: ee,
23423
- fetchStates: G,
23425
+ fetchStates: U,
23424
23426
  languageIso: p
23425
23427
  }
23426
23428
  )
@@ -23434,22 +23436,22 @@ function w_({
23434
23436
  isOpen: j !== null,
23435
23437
  paymentMethod: j,
23436
23438
  billingAddress: j?.billing_address ?? null,
23437
- onClose: () => k(null),
23439
+ onClose: () => T(null),
23438
23440
  onSubmit: async (N) => {
23439
23441
  if (de || !j) return;
23440
23442
  const Q = n;
23441
23443
  f.current = Q;
23442
23444
  try {
23443
- await U.mutateAsync({
23445
+ await q.mutateAsync({
23444
23446
  paymentMethodId: j.id,
23445
23447
  data: N
23446
- }), v(Q) && k(null);
23448
+ }), v(Q) && T(null);
23447
23449
  } catch {
23448
23450
  }
23449
23451
  },
23450
23452
  isSubmitting: de,
23451
23453
  countries: ee,
23452
- fetchStates: G,
23454
+ fetchStates: U,
23453
23455
  languageIso: p
23454
23456
  }
23455
23457
  ),
@@ -23462,10 +23464,10 @@ function w_({
23462
23464
  actionText: u("delete"),
23463
23465
  openDialog: L !== null,
23464
23466
  setOpenDialog: (N) => {
23465
- N || (K(null), Y(void 0));
23467
+ N || (W(null), Y(void 0));
23466
23468
  },
23467
23469
  onAction: hn,
23468
- errorMsg: V,
23470
+ errorMsg: R,
23469
23471
  isLoading: de
23470
23472
  }
23471
23473
  )
@@ -23495,7 +23497,7 @@ function Os({
23495
23497
  className: b = "",
23496
23498
  presentation: f = "dialog"
23497
23499
  }) {
23498
- const { t: v } = it(), w = u ?? v("add_an_address"), [E, C] = m.useState(_), z = m.useId();
23500
+ const { t: v } = st(), w = u ?? v("add_an_address"), [E, C] = m.useState(_), z = m.useId();
23499
23501
  return /* @__PURE__ */ i.jsxs("div", { className: ie("border-border mb-6 border-b pb-4", b), children: [
23500
23502
  /* @__PURE__ */ i.jsxs(
23501
23503
  "button",
@@ -23653,7 +23655,7 @@ function z_({
23653
23655
  onSuccess: a,
23654
23656
  onError: s
23655
23657
  }) {
23656
- const { isMobile: o } = ht(), { t: c } = it(), { t: d } = ae(), { config: u } = yi(), { locale: h } = Xn(), p = m.useRef(t);
23658
+ const { isMobile: o } = ht(), { t: c } = st(), { t: d } = ae(), { config: u } = yi(), { locale: h } = Xn(), p = m.useRef(t);
23657
23659
  p.current = t;
23658
23660
  const x = (P) => _t(
23659
23661
  p.current,
@@ -23664,46 +23666,46 @@ function z_({
23664
23666
  ), b = an(), f = ze(), v = m.useMemo(
23665
23667
  () => Cl(b),
23666
23668
  [b]
23667
- ), [w, E] = m.useState(!1), [C, z] = m.useState(null), [$, M] = m.useState(null), [F, S] = m.useState(void 0), A = m.useRef(t);
23669
+ ), [w, E] = m.useState(!1), [C, z] = m.useState(null), [$, M] = m.useState(null), [F, S] = m.useState(void 0), D = m.useRef(t);
23668
23670
  m.useEffect(() => {
23669
- A.current !== t && (A.current = t, E(!1), z(null), M(null), S(void 0));
23671
+ D.current !== t && (D.current = t, E(!1), z(null), M(null), S(void 0));
23670
23672
  }, [t]);
23671
- const { data: j = [], isLoading: k } = Ae({
23673
+ const { data: j = [], isLoading: T } = Ae({
23672
23674
  queryKey: $e.addresses.list(),
23673
23675
  queryFn: async () => (await b.fetchAddresses()).addresses.map($_)
23674
- }), L = nl(), { data: K } = Ae({
23676
+ }), L = nl(), { data: W } = Ae({
23675
23677
  queryKey: el.countries(h),
23676
23678
  queryFn: () => L.listCountries({ languageIso: h }),
23677
23679
  enabled: w
23678
- }), V = m.useMemo(
23679
- () => [...K?.countries ?? []].map((P) => ({ iso: P.code, name: P.name })).sort((P, G) => P.name.localeCompare(G.name)),
23680
- [K]
23680
+ }), R = m.useMemo(
23681
+ () => [...W?.countries ?? []].map((P) => ({ iso: P.code, name: P.name })).sort((P, U) => P.name.localeCompare(U.name)),
23682
+ [W]
23681
23683
  ), Y = m.useMemo(() => {
23682
23684
  const P = /* @__PURE__ */ new Map();
23683
- for (const G of K?.countries ?? [])
23685
+ for (const U of W?.countries ?? [])
23684
23686
  P.set(
23685
- G.code,
23686
- G.states.map((xe) => ({ name: xe.name, isoCode: xe.code }))
23687
+ U.code,
23688
+ U.states.map((xe) => ({ name: xe.name, isoCode: xe.code }))
23687
23689
  );
23688
23690
  return P;
23689
- }, [K]), I = m.useCallback(
23691
+ }, [W]), J = m.useCallback(
23690
23692
  (P) => Promise.resolve(Y.get(P) ?? []),
23691
23693
  [Y]
23692
- ), O = Ot({
23694
+ ), A = Ot({
23693
23695
  onSuccess: ({ subscriptionToken: P }) => {
23694
23696
  p.current === P && a?.(c("shipping_address_updated"));
23695
23697
  },
23696
- onError: (P, { subscriptionToken: G }) => {
23697
- p.current === G && s?.(c("failed_to_update_shipping_address"), P);
23698
+ onError: (P, { subscriptionToken: U }) => {
23699
+ p.current === U && s?.(c("failed_to_update_shipping_address"), P);
23698
23700
  }
23699
- }), X = fe({
23701
+ }), K = fe({
23700
23702
  // Detect a server-side dedupe (POST /api/pay/addresses returns the existing
23701
23703
  // record when an identical address already exists, ignoring `name`). Snapshot
23702
23704
  // the current id set before the request and compare against the returned id.
23703
23705
  mutationFn: async ({
23704
23706
  body: P
23705
23707
  }) => {
23706
- const G = new Set(j.map((ye) => ye.id)), xe = await b.createAddress({
23708
+ const U = new Set(j.map((ye) => ye.id)), xe = await b.createAddress({
23707
23709
  address: {
23708
23710
  name: P.address.name,
23709
23711
  street1: P.address.address1,
@@ -23716,45 +23718,45 @@ function z_({
23716
23718
  default: P.address.default
23717
23719
  }
23718
23720
  });
23719
- return { address: xe, deduped: G.has(xe.id) };
23721
+ return { address: xe, deduped: U.has(xe.id) };
23720
23722
  },
23721
- onSuccess: ({ deduped: P }, { subscriptionToken: G }) => {
23722
- f.invalidateQueries({ queryKey: $e.addresses.all }), x(G) && (P ? a?.(c("address_already_exists"), "warning") : a?.(c("address_created"), "success"));
23723
+ onSuccess: ({ deduped: P }, { subscriptionToken: U }) => {
23724
+ f.invalidateQueries({ queryKey: $e.addresses.all }), x(U) && (P ? a?.(c("address_already_exists"), "warning") : a?.(c("address_created"), "success"));
23723
23725
  },
23724
- onError: (P, { subscriptionToken: G }) => {
23725
- x(G) && s?.(c("failed_to_create_address"), P);
23726
+ onError: (P, { subscriptionToken: U }) => {
23727
+ x(U) && s?.(c("failed_to_create_address"), P);
23726
23728
  }
23727
- }), J = fe({
23729
+ }), Z = fe({
23728
23730
  mutationFn: ({
23729
23731
  addressId: P,
23730
- body: G
23732
+ body: U
23731
23733
  }) => b.updateAddress(P, {
23732
23734
  address: {
23733
- name: G.address.name,
23734
- street1: G.address.address1,
23735
- street2: G.address.address2,
23736
- city: G.address.city,
23737
- state: G.address.state,
23738
- zip: G.address.postal_code,
23739
- country: G.address.country_code,
23740
- phone: G.address.phone,
23741
- default: G.address.default
23735
+ name: U.address.name,
23736
+ street1: U.address.address1,
23737
+ street2: U.address.address2,
23738
+ city: U.address.city,
23739
+ state: U.address.state,
23740
+ zip: U.address.postal_code,
23741
+ country: U.address.country_code,
23742
+ phone: U.address.phone,
23743
+ default: U.address.default
23742
23744
  }
23743
23745
  }),
23744
- onSuccess: (P, { subscriptionToken: G }) => {
23745
- f.invalidateQueries({ queryKey: $e.addresses.all }), x(G) && a?.(c("address_updated"));
23746
+ onSuccess: (P, { subscriptionToken: U }) => {
23747
+ f.invalidateQueries({ queryKey: $e.addresses.all }), x(U) && a?.(c("address_updated"));
23746
23748
  },
23747
- onError: (P, { subscriptionToken: G }) => {
23748
- x(G) && s?.(c("failed_to_update_address"), P);
23749
+ onError: (P, { subscriptionToken: U }) => {
23750
+ x(U) && s?.(c("failed_to_update_address"), P);
23749
23751
  }
23750
23752
  }), re = fe({
23751
23753
  mutationFn: ({
23752
23754
  addressId: P
23753
23755
  }) => b.deleteAddress(P),
23754
- onSuccess: (P, { subscriptionToken: G }) => {
23755
- f.invalidateQueries({ queryKey: $e.addresses.all }), x(G) && a?.(c("address_deleted"));
23756
+ onSuccess: (P, { subscriptionToken: U }) => {
23757
+ f.invalidateQueries({ queryKey: $e.addresses.all }), x(U) && a?.(c("address_deleted"));
23756
23758
  }
23757
- }), W = fe({
23759
+ }), G = fe({
23758
23760
  mutationFn: ({
23759
23761
  address: P
23760
23762
  }) => b.updateAddress(P.id, {
@@ -23770,15 +23772,15 @@ function z_({
23770
23772
  default: !0
23771
23773
  }
23772
23774
  }),
23773
- onSuccess: (P, { subscriptionToken: G }) => {
23774
- f.invalidateQueries({ queryKey: $e.addresses.all }), x(G) && a?.(c("default_address_updated"));
23775
+ onSuccess: (P, { subscriptionToken: U }) => {
23776
+ f.invalidateQueries({ queryKey: $e.addresses.all }), x(U) && a?.(c("default_address_updated"));
23775
23777
  },
23776
- onError: (P, { subscriptionToken: G }) => {
23777
- x(G) && s?.(c("failed_to_update_default_address"), P);
23778
+ onError: (P, { subscriptionToken: U }) => {
23779
+ x(U) && s?.(c("failed_to_update_default_address"), P);
23778
23780
  }
23779
23781
  }), oe = (e !== null ? j.find((P) => P.id === e) : void 0) ?? (n ? j.find(
23780
23782
  (P) => P.address1 === n.address1 && P.postal_code === n.postal_code && P.city === n.city
23781
- ) : void 0) ?? F_(n), B = () => {
23783
+ ) : void 0) ?? F_(n), O = () => {
23782
23784
  E(!1), z(null);
23783
23785
  }, ee = async () => {
23784
23786
  if (!$) return;
@@ -23789,9 +23791,9 @@ function z_({
23789
23791
  subscriptionToken: P,
23790
23792
  addressId: $.id
23791
23793
  }), x(P) && M(null);
23792
- } catch (G) {
23794
+ } catch (U) {
23793
23795
  x(P) && S(
23794
- G instanceof Error ? G.message : c("unable_to_delete_address")
23796
+ U instanceof Error ? U.message : c("unable_to_delete_address")
23795
23797
  );
23796
23798
  }
23797
23799
  };
@@ -23805,7 +23807,7 @@ function z_({
23805
23807
  addressList: j,
23806
23808
  selectedAddressId: e ?? 0,
23807
23809
  onSelectAddress: (P) => {
23808
- P.id !== e && O.mutate({
23810
+ P.id !== e && A.mutate({
23809
23811
  subscriptionToken: t,
23810
23812
  body: { address_id: P.id }
23811
23813
  });
@@ -23819,14 +23821,14 @@ function z_({
23819
23821
  onDeleteAddress: r ? void 0 : (P) => {
23820
23822
  S(void 0), M(P);
23821
23823
  },
23822
- onMakeDefaultAddress: r ? void 0 : (P) => W.mutate({
23824
+ onMakeDefaultAddress: r ? void 0 : (P) => G.mutate({
23823
23825
  subscriptionToken: t,
23824
23826
  address: P
23825
23827
  }),
23826
23828
  addAddressLabel: c("add_an_address_action"),
23827
23829
  showAddButton: !r,
23828
- isLoading: k,
23829
- isPending: r || O.isPending || X.isPending || J.isPending || re.isPending || W.isPending
23830
+ isLoading: T,
23831
+ isPending: r || A.isPending || K.isPending || Z.isPending || re.isPending || G.isPending
23830
23832
  }
23831
23833
  ),
23832
23834
  /* @__PURE__ */ i.jsx(
@@ -23834,28 +23836,28 @@ function z_({
23834
23836
  {
23835
23837
  presentation: o ? "bottom-sheet" : "dialog",
23836
23838
  isOpen: w,
23837
- onClose: B,
23839
+ onClose: O,
23838
23840
  selectedAddress: C,
23839
23841
  defaultCountry: j.find((P) => P.default)?.country_code ?? n?.country_code ?? u.countryIso ?? "US",
23840
23842
  languageIso: h,
23841
23843
  t: _,
23842
23844
  onSubmit: async (P) => {
23843
- const G = t;
23845
+ const U = t;
23844
23846
  try {
23845
- C ? await J.mutateAsync({
23846
- subscriptionToken: G,
23847
+ C ? await Z.mutateAsync({
23848
+ subscriptionToken: U,
23847
23849
  addressId: C.id,
23848
23850
  body: P
23849
- }) : await X.mutateAsync({
23850
- subscriptionToken: G,
23851
+ }) : await K.mutateAsync({
23852
+ subscriptionToken: U,
23851
23853
  body: P
23852
- }), x(G) && B();
23854
+ }), x(U) && O();
23853
23855
  } catch {
23854
23856
  }
23855
23857
  },
23856
- isSubmitting: X.isPending || J.isPending,
23857
- countries: V,
23858
- fetchStates: I
23858
+ isSubmitting: K.isPending || Z.isPending,
23859
+ countries: R,
23860
+ fetchStates: J
23859
23861
  }
23860
23862
  ),
23861
23863
  /* @__PURE__ */ i.jsx(
@@ -23990,7 +23992,7 @@ function A_({
23990
23992
  u ? /* @__PURE__ */ i.jsx("p", { className: "text-muted-foreground mt-3 text-sm", children: d("auto_apply_points_bundle_split_warning") }) : null,
23991
23993
  /* @__PURE__ */ i.jsxs(Ke, { children: [
23992
23994
  /* @__PURE__ */ i.jsx(
23993
- Z,
23995
+ X,
23994
23996
  {
23995
23997
  type: "button",
23996
23998
  className: "bg-muted text-foreground ring-border hover:bg-muted/80 h-10 min-w-[70px] rounded p-3 ring-1",
@@ -23999,7 +24001,7 @@ function A_({
23999
24001
  }
24000
24002
  ),
24001
24003
  /* @__PURE__ */ i.jsx(
24002
- Z,
24004
+ X,
24003
24005
  {
24004
24006
  type: "button",
24005
24007
  className: "bg-muted text-foreground ring-border hover:bg-muted/80 h-10 min-w-[70px] rounded p-3 ring-1",
@@ -24008,7 +24010,7 @@ function A_({
24008
24010
  }
24009
24011
  ),
24010
24012
  /* @__PURE__ */ i.jsx(
24011
- Z,
24013
+ X,
24012
24014
  {
24013
24015
  type: "button",
24014
24016
  className: "bg-primary text-primary-foreground h-10 min-w-[70px] rounded p-3 hover:opacity-90",
@@ -24050,18 +24052,18 @@ function D_({
24050
24052
  // until the refreshed payload is in hand. Reporting success before then
24051
24053
  // would put a toast next to a control still showing the pre-write value.
24052
24054
  onSuccess: async (j, {
24053
- subscriptionToken: k,
24055
+ subscriptionToken: T,
24054
24056
  autoApplyPoints: L
24055
24057
  }) => {
24056
- for (const V of o.lists)
24057
- _.invalidateQueries({ queryKey: V });
24058
+ for (const R of o.lists)
24059
+ _.invalidateQueries({ queryKey: R });
24058
24060
  if (await _.refetchQueries({
24059
- queryKey: o.detail(k),
24061
+ queryKey: o.detail(T),
24060
24062
  exact: !0
24061
- }), b.current !== k)
24063
+ }), b.current !== T)
24062
24064
  return;
24063
24065
  if (_.getQueryData(
24064
- o.detail(k)
24066
+ o.detail(T)
24065
24067
  )?.subscription.auto_apply_points !== L) {
24066
24068
  u?.(
24067
24069
  p("auto_apply_points_saved_but_not_refreshed", {
@@ -24073,8 +24075,8 @@ function D_({
24073
24075
  }
24074
24076
  u?.(p("auto_apply_points_updated", { label: s }));
24075
24077
  },
24076
- onError: (j, { subscriptionToken: k }) => {
24077
- b.current === k && h?.(
24078
+ onError: (j, { subscriptionToken: T }) => {
24079
+ b.current === T && h?.(
24078
24080
  p("failed_to_update_auto_apply_points", { label: s }),
24079
24081
  j
24080
24082
  );
@@ -24082,7 +24084,7 @@ function D_({
24082
24084
  }), $ = M_({
24083
24085
  queryKeys: o,
24084
24086
  currentSubscriptionToken: t,
24085
- onSuccess: ({ result: j, refreshed: k, variables: L }) => {
24087
+ onSuccess: ({ result: j, refreshed: T, variables: L }) => {
24086
24088
  if (j_({
24087
24089
  confirmedScope: L.scope,
24088
24090
  // The set this write was fired with, not the ref. The ref tracks
@@ -24101,7 +24103,7 @@ function D_({
24101
24103
  );
24102
24104
  return;
24103
24105
  }
24104
- if (!k) {
24106
+ if (!T) {
24105
24107
  u?.(
24106
24108
  p("auto_apply_points_saved_but_not_refreshed", {
24107
24109
  label: s
@@ -24143,12 +24145,12 @@ function D_({
24143
24145
  writeInFlight: z.isPending && z.variables?.subscriptionToken === t || $.isPending && ($.variables?.subscriptionToken === t || $.variables?.bundleTokens?.includes(t)) || M
24144
24146
  });
24145
24147
  function S(j) {
24146
- const k = S_({ renewalBundle: a });
24147
- if (k === "fallback") {
24148
+ const T = S_({ renewalBundle: a });
24149
+ if (T === "fallback") {
24148
24150
  z.mutate({ subscriptionToken: t, autoApplyPoints: j });
24149
24151
  return;
24150
24152
  }
24151
- if (k === "write") {
24153
+ if (T === "write") {
24152
24154
  $.mutate({
24153
24155
  subscriptionToken: t,
24154
24156
  autoApplyPoints: j,
@@ -24159,13 +24161,13 @@ function D_({
24159
24161
  }
24160
24162
  w.current = !1, v(j);
24161
24163
  }
24162
- function A(j) {
24164
+ function D(j) {
24163
24165
  if (w.current) return;
24164
24166
  w.current = !0;
24165
- const k = f;
24166
- v(null), k !== null && $.mutate({
24167
+ const T = f;
24168
+ v(null), T !== null && $.mutate({
24167
24169
  subscriptionToken: t,
24168
- autoApplyPoints: k,
24170
+ autoApplyPoints: T,
24169
24171
  scope: j,
24170
24172
  bundleTokens: a?.members.map((L) => L.subscription_token) ?? []
24171
24173
  });
@@ -24194,8 +24196,8 @@ function D_({
24194
24196
  targetToken: t,
24195
24197
  nextValue: f,
24196
24198
  presentation: c,
24197
- onConfirmAll: () => A("bundle"),
24198
- onConfirmOne: () => A("subscription"),
24199
+ onConfirmAll: () => D("bundle"),
24200
+ onConfirmOne: () => D("subscription"),
24199
24201
  onCancel: () => v(null)
24200
24202
  }
24201
24203
  ) : null
@@ -24279,7 +24281,7 @@ function I_({
24279
24281
  t ? /* @__PURE__ */ i.jsx("p", { role: "alert", className: "text-destructive text-sm", children: t }) : null,
24280
24282
  /* @__PURE__ */ i.jsxs(Ke, { className: "gap-2 sm:justify-between", children: [
24281
24283
  /* @__PURE__ */ i.jsx(
24282
- Z,
24284
+ X,
24283
24285
  {
24284
24286
  type: "button",
24285
24287
  variant: "outline",
@@ -24289,7 +24291,7 @@ function I_({
24289
24291
  }
24290
24292
  ),
24291
24293
  /* @__PURE__ */ i.jsxs(
24292
- Z,
24294
+ X,
24293
24295
  {
24294
24296
  type: "button",
24295
24297
  onClick: r,
@@ -24511,7 +24513,7 @@ function q_({
24511
24513
  a && /* @__PURE__ */ i.jsx("p", { className: "text-destructive text-left text-sm", children: s("failed_to_reactivate") }),
24512
24514
  /* @__PURE__ */ i.jsx(Ke, { children: /* @__PURE__ */ i.jsxs("div", { className: "flex w-full flex-row justify-between gap-x-2", children: [
24513
24515
  /* @__PURE__ */ i.jsx(
24514
- Z,
24516
+ X,
24515
24517
  {
24516
24518
  className: "bg-muted text-foreground ring-border hover:bg-muted/80 h-10 min-w-[70px] rounded p-3 ring-1",
24517
24519
  onClick: () => w(!1),
@@ -24519,7 +24521,7 @@ function q_({
24519
24521
  }
24520
24522
  ),
24521
24523
  /* @__PURE__ */ i.jsx(
24522
- Z,
24524
+ X,
24523
24525
  {
24524
24526
  type: "button",
24525
24527
  className: "bg-primary text-primary-foreground h-10 min-w-[70px] rounded p-3 hover:opacity-90 disabled:opacity-50",