@fanfare-io/fanfare-sdk-react 0.7.1 → 0.8.0

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 (2) hide show
  1. package/dist/index.js +268 -268
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import { jsx as t, Fragment as Me, jsxs as u } from "react/jsx-runtime";
3
3
  import lr from "@fanfare-io/fanfare-sdk-core";
4
4
  import * as s from "react";
5
- import { createContext as jt, useMemo as X, useContext as zt, useState as ve, useRef as bt, useEffect as $e, useCallback as B, useSyncExternalStore as cr, forwardRef as kt, useLayoutEffect as dr } from "react";
5
+ import { createContext as zt, useMemo as X, useContext as jt, useState as ve, useRef as bt, useEffect as $e, useCallback as B, useSyncExternalStore as cr, forwardRef as kt, useLayoutEffect as dr } from "react";
6
6
  import { getLocaleMessages as ur, mergeTranslations as aa, createTranslateFunction as ba, isRTLLocale as pr, en as gr, resolveLocaleMapValue as mr, normalizeLocale as hr } from "@fanfare-io/fanfare-sdk-i18n";
7
7
  import { RTL_LOCALES as Zo, isRTLLocale as Yo } from "@fanfare-io/fanfare-sdk-i18n";
8
8
  import { ensureFanfareError as mt, toDisplay as ra, classify as wr } from "@fanfare-io/fanfare-sdk-core/errors";
@@ -17,7 +17,7 @@ import Cr from "canvas-confetti";
17
17
  import { atom as qe } from "nanostores";
18
18
  import { bucketFromEtaSeconds as Dr, bucketI18nKey as Vr } from "@fanfare-io/fanfare-sdk-core/queues";
19
19
  import { createPortal as Er } from "react-dom";
20
- const ya = jt(null), ka = gr, Mr = ba(ka, "en"), Tr = {
20
+ const ya = zt(null), ka = gr, Mr = ba(ka, "en"), Tr = {
21
21
  locale: "en",
22
22
  messages: ka,
23
23
  isRoot: !0,
@@ -26,9 +26,9 @@ const ya = jt(null), ka = gr, Mr = ba(ka, "en"), Tr = {
26
26
  experienceTranslations: null,
27
27
  setExperienceTranslations: () => {
28
28
  }
29
- }, _a = jt(Tr);
29
+ }, _a = zt(Tr);
30
30
  function Ft() {
31
- return zt(_a);
31
+ return jt(_a);
32
32
  }
33
33
  function K() {
34
34
  const { t: e, locale: a, dir: r } = Ft();
@@ -85,7 +85,7 @@ function $o({
85
85
  features: C,
86
86
  beacon: l
87
87
  }) {
88
- const [h, p] = ve(null), [D, E] = ve(!0), T = bt(null), b = X(
88
+ const [h, p] = ve(null), [D, V] = ve(!0), T = bt(null), b = X(
89
89
  () => ({
90
90
  organizationId: f,
91
91
  publishableKey: c,
@@ -103,29 +103,29 @@ function $o({
103
103
  );
104
104
  return $e(() => {
105
105
  let N = !0;
106
- p(null), E(!0);
106
+ p(null), V(!0);
107
107
  async function S() {
108
108
  if (N)
109
109
  try {
110
- const V = await lr(b);
110
+ const M = await lr({ ...b, autoResume: a && r });
111
111
  if (!N) {
112
- await V.destroy();
112
+ await M.destroy();
113
113
  return;
114
114
  }
115
- T.current = V, a && V.auth.getSession() && r && await V.journeys.resumeAll(), N && (p(V), E(!1));
116
- } catch (V) {
117
- console.error("Failed to initialize Fanfare SDK:", V), N && E(!1);
115
+ T.current = M, N && (p(M), V(!1));
116
+ } catch (M) {
117
+ console.error("Failed to initialize Fanfare SDK:", M), N && V(!1);
118
118
  }
119
119
  }
120
120
  return oa(S), () => {
121
121
  N = !1;
122
- const V = T.current;
123
- T.current = null, V && oa(() => V.destroy());
122
+ const M = T.current;
123
+ T.current = null, M && oa(() => M.destroy());
124
124
  };
125
125
  }, [b, a, r]), D ? /* @__PURE__ */ t(Me, { children: n }) : h ? /* @__PURE__ */ t(ya.Provider, { value: h, children: /* @__PURE__ */ t(Na, { locale: o, translations: i, children: e }) }) : (console.error("Fanfare SDK failed to initialize"), null);
126
126
  }
127
127
  function Nt() {
128
- const e = zt(ya);
128
+ const e = jt(ya);
129
129
  if (!e)
130
130
  throw new Error(
131
131
  "useFanfare must be used within a FanfareProvider. Make sure your component is wrapped with <FanfareProvider>"
@@ -177,11 +177,11 @@ function Sa(e, a) {
177
177
  i.current = p, g(p), x(p.snapshot$.get()), v(p.view$.get());
178
178
  const D = p.snapshot$.listen((T) => {
179
179
  x(T);
180
- }), E = p.view$.listen((T) => {
180
+ }), V = p.view$.listen((T) => {
181
181
  v(T);
182
182
  });
183
183
  return () => {
184
- D(), E();
184
+ D(), V();
185
185
  };
186
186
  }, [e, r]), $e(() => {
187
187
  if (!e) {
@@ -191,8 +191,8 @@ function Sa(e, a) {
191
191
  let p = !1;
192
192
  const D = d?.experience?.experience?.i18n;
193
193
  if (D) {
194
- const E = mr(D, n);
195
- o(E ?? null);
194
+ const V = mr(D, n);
195
+ o(V ?? null);
196
196
  } else p || o(null);
197
197
  return () => {
198
198
  p = !0, o(null);
@@ -204,9 +204,9 @@ function Sa(e, a) {
204
204
  throw new Error("experienceId is required to start an experience journey");
205
205
  const D = i.current ?? r.journeys.get(e);
206
206
  i.current = D, g(D), y(null), l(null);
207
- const E = f.current, T = {
208
- accessCode: p?.accessCode ?? E?.accessCode,
209
- autoEnterWaitlist: p?.autoEnterWaitlist ?? E?.autoEnterWaitlist
207
+ const V = f.current, T = {
208
+ accessCode: p?.accessCode ?? V?.accessCode,
209
+ autoEnterWaitlist: p?.autoEnterWaitlist ?? V?.autoEnterWaitlist
210
210
  };
211
211
  try {
212
212
  const b = D.view$.get();
@@ -236,12 +236,12 @@ function Sa(e, a) {
236
236
  start: h
237
237
  };
238
238
  }
239
- function je(e) {
239
+ function ze(e) {
240
240
  const a = B((n) => e.listen(n), [e]), r = B(() => e.get(), [e]);
241
241
  return cr(a, r, r);
242
242
  }
243
243
  function Wo(e) {
244
- return je(e.snapshot$);
244
+ return ze(e.snapshot$);
245
245
  }
246
246
  function Lr({ experienceId: e, autoStart: a, children: r }) {
247
247
  const n = Sa(e, {
@@ -413,22 +413,22 @@ function Ir(e) {
413
413
  const a = e.replace(/\D/g, "");
414
414
  return e.startsWith("+") ? a.length >= 10 && a.length <= 15 : a.length === 10;
415
415
  }
416
- const jr = _r({
416
+ const zr = _r({
417
417
  extend: {
418
418
  classGroups: {
419
419
  "font-size": ["text-xxs"]
420
420
  }
421
421
  }
422
422
  });
423
- function M(...e) {
424
- return jr(kr(e));
423
+ function E(...e) {
424
+ return zr(kr(e));
425
425
  }
426
426
  function fa(e, a) {
427
427
  if (typeof e == "function")
428
428
  return e(a);
429
429
  e != null && (e.current = a);
430
430
  }
431
- function zr(...e) {
431
+ function jr(...e) {
432
432
  return (a) => {
433
433
  let r = !1;
434
434
  const n = e.map((o) => {
@@ -472,7 +472,7 @@ function $r(e) {
472
472
  let { children: o, ...i } = r;
473
473
  if (Ca(o) && typeof xt == "function" && (o = xt(o._payload)), s.isValidElement(o)) {
474
474
  const f = Hr(o), c = Ur(i, o.props);
475
- return o.type !== s.Fragment && (c.ref = n ? zr(n, f) : f), s.cloneElement(o, c);
475
+ return o.type !== s.Fragment && (c.ref = n ? jr(n, f) : f), s.cloneElement(o, c);
476
476
  }
477
477
  return s.Children.count(o) > 1 ? s.Children.only(null) : null;
478
478
  });
@@ -536,9 +536,9 @@ const ot = () => typeof window > "u" ? !1 : window.matchMedia("(prefers-reduced-
536
536
  theme: Sr,
537
537
  variant: "default",
538
538
  isRoot: !0
539
- }, Tt = jt(Yr);
539
+ }, Tt = zt(Yr);
540
540
  function ft() {
541
- return zt(Tt);
541
+ return jt(Tt);
542
542
  }
543
543
  function Gr(e, a) {
544
544
  const r = ft();
@@ -590,7 +590,7 @@ function Rt({ theme: e, variant: a, as: r = "div", className: n, children: o })
590
590
  return e !== void 0 || a !== void 0 || i.isRoot ? /* @__PURE__ */ t(Tt.Provider, { value: f, children: /* @__PURE__ */ t(
591
591
  r,
592
592
  {
593
- className: M("fanfare-themed", n),
593
+ className: E("fanfare-themed", n),
594
594
  style: c,
595
595
  "data-fanfare-themed": !0,
596
596
  "data-fanfare-variant": f.variant,
@@ -627,7 +627,7 @@ const Jr = (e, a) => /* @__PURE__ */ t("svg", { viewBox: "0 0 24 24", width: "1.
627
627
  ref: n,
628
628
  viewBox: "0 0 24 24",
629
629
  xmlns: "http://www.w3.org/2000/svg",
630
- className: M(tn({ size: a, styleVariant: o }), e),
630
+ className: E(tn({ size: a, styleVariant: o }), e),
631
631
  "data-slot": "spinner",
632
632
  "data-size": a,
633
633
  "aria-hidden": "true",
@@ -790,7 +790,7 @@ const an = te(
790
790
  styleVariant: "default"
791
791
  }
792
792
  }
793
- ), z = s.forwardRef(
793
+ ), j = s.forwardRef(
794
794
  ({
795
795
  className: e,
796
796
  variant: a,
@@ -825,7 +825,7 @@ const an = te(
825
825
  "data-status": w || void 0,
826
826
  "aria-busy": n || void 0,
827
827
  "aria-disabled": C || void 0,
828
- className: M(an({ variant: a, size: r, styleVariant: v, className: e })),
828
+ className: E(an({ variant: a, size: r, styleVariant: v, className: e })),
829
829
  disabled: C,
830
830
  ...d,
831
831
  children: [
@@ -842,7 +842,7 @@ const an = te(
842
842
  "span",
843
843
  {
844
844
  "data-slot": "button-content",
845
- className: M(
845
+ className: E(
846
846
  "ff:gap-inherit ff:flex ff:items-center",
847
847
  (n || w) && "ff:opacity-0",
848
848
  f
@@ -855,7 +855,7 @@ const an = te(
855
855
  );
856
856
  }
857
857
  );
858
- z.displayName = "Button";
858
+ j.displayName = "Button";
859
859
  const sa = ["default", "rounded"], rn = te(
860
860
  [
861
861
  "ff:flex ff:w-full ff:rounded-md ff:px-3 ff:py-2",
@@ -920,7 +920,7 @@ const sa = ["default", "rounded"], rn = te(
920
920
  }
921
921
  }), yt = s.forwardRef(
922
922
  ({ className: e, type: a = "text", label: r, error: n, hasError: o, inlineLabel: i, inlineError: f, ...c }, g) => {
923
- const { variant: d } = ft(), x = ge(), m = c.id || c.name, v = i ?? sa.includes(d), w = f ?? sa.includes(d), y = o || !!n, C = !!n && !o, l = v && r, h = !v && r, p = w && C, D = !w && C, E = M(
923
+ const { variant: d } = ft(), x = ge(), m = c.id || c.name, v = i ?? sa.includes(d), w = f ?? sa.includes(d), y = o || !!n, C = !!n && !o, l = v && r, h = !v && r, p = w && C, D = !w && C, V = E(
924
924
  rn({ styleVariant: x }),
925
925
  y && "ff:border-danger ff:focus:border-danger ff:focus:ring-danger",
926
926
  // Extra padding for floating label
@@ -945,8 +945,8 @@ const sa = ["default", "rounded"], rn = te(
945
945
  "aria-invalid": y,
946
946
  "aria-describedby": C ? `${m}-error` : void 0,
947
947
  placeholder: c.placeholder || " ",
948
- className: M(
949
- E,
948
+ className: E(
949
+ V,
950
950
  // Placeholder shown state for label positioning
951
951
  "ff:peer ff:placeholder:opacity-0 ff:placeholder:transition-opacity ff:placeholder:duration-200",
952
952
  "ff:focus:placeholder:opacity-100"
@@ -959,7 +959,7 @@ const sa = ["default", "rounded"], rn = te(
959
959
  {
960
960
  htmlFor: m,
961
961
  "data-slot": "input-label",
962
- className: M(
962
+ className: E(
963
963
  "ff:absolute ff:left-3 ff:top-3 ff:z-10 ff:origin-top-left ff:select-none",
964
964
  "ff:text-sm ff:font-medium ff:transition-all ff:duration-150 ff:ease-out",
965
965
  "ff:pointer-events-none",
@@ -1007,7 +1007,7 @@ const sa = ["default", "rounded"], rn = te(
1007
1007
  {
1008
1008
  htmlFor: m,
1009
1009
  "data-slot": "input-label",
1010
- className: M(
1010
+ className: E(
1011
1011
  "ff:text-foreground ff:mb-1.5 ff:block ff:text-sm ff:font-medium",
1012
1012
  la({ styleVariant: x })
1013
1013
  ),
@@ -1024,7 +1024,7 @@ const sa = ["default", "rounded"], rn = te(
1024
1024
  "data-slot": "input-field",
1025
1025
  "aria-invalid": y,
1026
1026
  "aria-describedby": C ? `${m}-error` : void 0,
1027
- className: E,
1027
+ className: V,
1028
1028
  ...c
1029
1029
  }
1030
1030
  ),
@@ -1064,7 +1064,7 @@ const Ea = s.forwardRef(
1064
1064
  disabled: d,
1065
1065
  ...x
1066
1066
  }, m) => {
1067
- const { t: v } = K(), [w, y] = s.useState(() => i === "auto" ? Va(a) : i), [C, l] = s.useState(!1), [h, p] = s.useState(null), [D, E] = s.useState(!1), [T, b] = s.useState(
1067
+ const { t: v } = K(), [w, y] = s.useState(() => i === "auto" ? Va(a) : i), [C, l] = s.useState(!1), [h, p] = s.useState(null), [D, V] = s.useState(!1), [T, b] = s.useState(
1068
1068
  () => w === "phone" ? Dt(a) : a
1069
1069
  ), N = i === "auto";
1070
1070
  s.useEffect(() => {
@@ -1075,17 +1075,17 @@ const Ea = s.forwardRef(
1075
1075
  const S = s.useCallback(
1076
1076
  (L, J) => {
1077
1077
  if (!L) {
1078
- p(null), E(!1), n?.(!1);
1078
+ p(null), V(!1), n?.(!1);
1079
1079
  return;
1080
1080
  }
1081
- J === "email" ? ht.safeParse(nn, L).success ? (p(null), E(!0), n?.(!0)) : (p(v("auth.invalidEmail")), E(!1), n?.(!1)) : Ir(L) ? (p(null), E(!0), n?.(!0)) : (p(v("auth.invalidPhone")), E(!1), n?.(!1));
1081
+ J === "email" ? ht.safeParse(nn, L).success ? (p(null), V(!0), n?.(!0)) : (p(v("auth.invalidEmail")), V(!1), n?.(!1)) : Ir(L) ? (p(null), V(!0), n?.(!0)) : (p(v("auth.invalidPhone")), V(!1), n?.(!1));
1082
1082
  },
1083
1083
  [n]
1084
1084
  );
1085
1085
  s.useEffect(() => {
1086
1086
  S(a, w);
1087
1087
  }, [a, w, S]);
1088
- const V = (L) => {
1088
+ const M = (L) => {
1089
1089
  const J = L.target.value;
1090
1090
  if (w === "phone") {
1091
1091
  const ne = Dt(J);
@@ -1100,9 +1100,9 @@ const Ea = s.forwardRef(
1100
1100
  L.key === "Enter" && o && (L.preventDefault(), o()), x.onKeyDown?.(L);
1101
1101
  }, O = () => {
1102
1102
  const L = w === "email" ? "phone" : "email";
1103
- y(L), b(""), p(null), l(!1), E(!1), r("", L), n?.(!1);
1103
+ y(L), b(""), p(null), l(!1), V(!1), r("", L), n?.(!1);
1104
1104
  }, $ = f || (C && !D ? h : null), fe = x.placeholder || v(w === "email" ? "auth.emailPlaceholder" : "auth.phonePlaceholder"), ce = N && /* @__PURE__ */ t(
1105
- z,
1105
+ j,
1106
1106
  {
1107
1107
  type: "button",
1108
1108
  variant: "link",
@@ -1116,7 +1116,7 @@ const Ea = s.forwardRef(
1116
1116
  return N ? /* @__PURE__ */ u(
1117
1117
  "div",
1118
1118
  {
1119
- className: M("fanfare-auth-input", e),
1119
+ className: E("fanfare-auth-input", e),
1120
1120
  "data-slot": "auth-input",
1121
1121
  "data-mode": w,
1122
1122
  "data-valid": D || void 0,
@@ -1133,7 +1133,7 @@ const Ea = s.forwardRef(
1133
1133
  inputMode: w === "email" ? "email" : "tel",
1134
1134
  autoComplete: w === "email" ? "email" : "tel",
1135
1135
  value: T,
1136
- onChange: V,
1136
+ onChange: M,
1137
1137
  onBlur: A,
1138
1138
  onKeyDown: I,
1139
1139
  placeholder: fe,
@@ -1156,7 +1156,7 @@ const Ea = s.forwardRef(
1156
1156
  inputMode: w === "email" ? "email" : "tel",
1157
1157
  autoComplete: w === "email" ? "email" : "tel",
1158
1158
  value: T,
1159
- onChange: V,
1159
+ onChange: M,
1160
1160
  onBlur: A,
1161
1161
  onKeyDown: I,
1162
1162
  placeholder: fe,
@@ -1164,7 +1164,7 @@ const Ea = s.forwardRef(
1164
1164
  label: g,
1165
1165
  error: $ || void 0,
1166
1166
  hasError: c,
1167
- className: M("fanfare-auth-input", e),
1167
+ className: E("fanfare-auth-input", e),
1168
1168
  "data-slot": "auth-input",
1169
1169
  "data-mode": w,
1170
1170
  "data-valid": D || void 0,
@@ -1263,10 +1263,10 @@ const on = te(
1263
1263
  a?.(fe), fe.length === n ? (r?.(fe), C(n - 1)) : C(O.length);
1264
1264
  return;
1265
1265
  }
1266
- const V = S.slice(-1), A = [...w];
1267
- A[b] = V, y(A);
1266
+ const M = S.slice(-1), A = [...w];
1267
+ A[b] = M, y(A);
1268
1268
  const I = A.join("");
1269
- a?.(I), V && b < n - 1 && C(b + 1), I.length === n && !I.includes("") && r?.(I);
1269
+ a?.(I), M && b < n - 1 && C(b + 1), I.length === n && !I.includes("") && r?.(I);
1270
1270
  }, h = (b, N) => {
1271
1271
  switch (N.key) {
1272
1272
  case "Backspace":
@@ -1286,21 +1286,21 @@ const on = te(
1286
1286
  b.preventDefault();
1287
1287
  const N = b.clipboardData.getData("text").replace(/\D/g, "").slice(0, n);
1288
1288
  if (N) {
1289
- const S = N.split(""), V = [...S, ...Array(n - S.length).fill("")];
1290
- y(V);
1291
- const A = V.join("");
1289
+ const S = N.split(""), M = [...S, ...Array(n - S.length).fill("")];
1290
+ y(M);
1291
+ const A = M.join("");
1292
1292
  a?.(A), A.length === n ? (r?.(A), C(n - 1)) : C(S.length);
1293
1293
  }
1294
1294
  }, D = (b) => {
1295
1295
  b.target.select();
1296
- }, E = i || !!o, T = !!o && !i;
1296
+ }, V = i || !!o, T = !!o && !i;
1297
1297
  return /* @__PURE__ */ u(
1298
1298
  "div",
1299
1299
  {
1300
1300
  ref: x,
1301
- className: M("fanfare-otp-input", "ff:space-y-1.5", d),
1301
+ className: E("fanfare-otp-input", "ff:space-y-1.5", d),
1302
1302
  "data-slot": "otp-input",
1303
- "data-error": E || void 0,
1303
+ "data-error": V || void 0,
1304
1304
  children: [
1305
1305
  /* @__PURE__ */ t(
1306
1306
  "div",
@@ -1327,9 +1327,9 @@ const on = te(
1327
1327
  disabled: f,
1328
1328
  autoFocus: c && N === 0,
1329
1329
  "aria-label": `Digit ${N + 1} of ${n}`,
1330
- "aria-invalid": E,
1331
- "aria-describedby": E ? g : void 0,
1332
- className: on({ styleVariant: m, hasError: E })
1330
+ "aria-invalid": V,
1331
+ "aria-describedby": V ? g : void 0,
1332
+ className: on({ styleVariant: m, hasError: V })
1333
1333
  },
1334
1334
  N
1335
1335
  ))
@@ -1380,20 +1380,20 @@ const fn = te(["ff:rounded-lg ff:p-6", "ff:bg-background", "ff:text-foreground"]
1380
1380
  ref: n,
1381
1381
  "data-slot": "card",
1382
1382
  "data-variant": a,
1383
- className: M(fn({ variant: a, styleVariant: o, className: e })),
1383
+ className: E(fn({ variant: a, styleVariant: o, className: e })),
1384
1384
  ...r
1385
1385
  }
1386
1386
  );
1387
1387
  });
1388
1388
  Ta.displayName = "Card";
1389
- const sn = s.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t("div", { ref: r, "data-slot": "card-header", className: M("fanfare-card-header ff:mb-4", e), ...a }));
1389
+ const sn = s.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t("div", { ref: r, "data-slot": "card-header", className: E("fanfare-card-header ff:mb-4", e), ...a }));
1390
1390
  sn.displayName = "CardHeader";
1391
1391
  const ln = s.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
1392
1392
  "h3",
1393
1393
  {
1394
1394
  ref: r,
1395
1395
  "data-slot": "card-title",
1396
- className: M("ff:text-lg ff:font-heading ff:font-semibold ff:leading-none", "ff:text-foreground", e),
1396
+ className: E("ff:text-lg ff:font-heading ff:font-semibold ff:leading-none", "ff:text-foreground", e),
1397
1397
  ...a
1398
1398
  }
1399
1399
  ));
@@ -1404,20 +1404,20 @@ const cn = s.forwardRef(
1404
1404
  {
1405
1405
  ref: r,
1406
1406
  "data-slot": "card-description",
1407
- className: M("ff:mt-1 ff:text-sm", "ff:text-muted", e),
1407
+ className: E("ff:mt-1 ff:text-sm", "ff:text-muted", e),
1408
1408
  ...a
1409
1409
  }
1410
1410
  )
1411
1411
  );
1412
1412
  cn.displayName = "CardDescription";
1413
- const dn = s.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t("div", { ref: r, "data-slot": "card-content", className: M(e), ...a }));
1413
+ const dn = s.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t("div", { ref: r, "data-slot": "card-content", className: E(e), ...a }));
1414
1414
  dn.displayName = "CardContent";
1415
1415
  const un = s.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ t(
1416
1416
  "div",
1417
1417
  {
1418
1418
  ref: r,
1419
1419
  "data-slot": "card-footer",
1420
- className: M("ff:mt-4 ff:flex ff:items-center ff:gap-2", e),
1420
+ className: E("ff:mt-4 ff:flex ff:items-center ff:gap-2", e),
1421
1421
  ...a
1422
1422
  }
1423
1423
  ));
@@ -1428,7 +1428,7 @@ const Ra = s.forwardRef(({ className: e, ...a }, r) => /* @__PURE__ */ u(
1428
1428
  ref: r,
1429
1429
  xmlns: "http://www.w3.org/2000/svg",
1430
1430
  viewBox: "0 0 5647 2166",
1431
- className: M("ff:h-5 ff:w-auto", e),
1431
+ className: E("ff:h-5 ff:w-auto", e),
1432
1432
  "data-slot": "fanfare-logo",
1433
1433
  ...a,
1434
1434
  children: [
@@ -1558,7 +1558,7 @@ const Z = s.forwardRef(({ className: e, children: a, ...r }, n) => /* @__PURE__
1558
1558
  {
1559
1559
  ref: n,
1560
1560
  "data-slot": "panel-body",
1561
- className: M("ff:flex ff:flex-1 ff:flex-col ff:gap-5", e),
1561
+ className: E("ff:flex ff:flex-1 ff:flex-col ff:gap-5", e),
1562
1562
  ...r,
1563
1563
  children: a
1564
1564
  }
@@ -1572,7 +1572,7 @@ const H = s.forwardRef(
1572
1572
  {
1573
1573
  ref: n,
1574
1574
  "data-slot": "panel-footer",
1575
- className: M(
1575
+ className: E(
1576
1576
  "ff:flex ff:items-center ff:justify-between ff:gap-2 ff:border-t ff:border-border-light ff:px-5 ff:py-2.5 ff:text-xxs ff:text-muted-foreground",
1577
1577
  (i === "clean" || i === "retro") && "ff:font-mono",
1578
1578
  e
@@ -1601,7 +1601,7 @@ const Y = s.forwardRef(
1601
1601
  {
1602
1602
  ref: n,
1603
1603
  "data-slot": "panel-layout",
1604
- className: M("ff:flex ff:flex-col ff:overflow-hidden ff:p-0 ff:max-h-[24rem]", e),
1604
+ className: E("ff:flex ff:flex-col ff:overflow-hidden ff:p-0 ff:max-h-[24rem]", e),
1605
1605
  ...r,
1606
1606
  children: [
1607
1607
  /* @__PURE__ */ t("div", { className: "ff:flex ff:flex-1 ff:flex-col ff:gap-5 ff:p-5", children: f }),
@@ -1742,13 +1742,13 @@ const pn = ["clean"], gn = te(["ff:inline-flex ff:items-center", "ff:text-xs ff:
1742
1742
  "data-slot": "badge",
1743
1743
  "data-variant": g,
1744
1744
  "data-solid-background": d,
1745
- className: M(gn({ variant: g, solid: d, styleVariant: c, className: e })),
1745
+ className: E(gn({ variant: g, solid: d, styleVariant: c, className: e })),
1746
1746
  ...o,
1747
1747
  children: [
1748
1748
  x && /* @__PURE__ */ t(
1749
1749
  "span",
1750
1750
  {
1751
- className: M("ff:size-1.5 ff:shrink-0 ff:rounded-full", ca[g]),
1751
+ className: E("ff:size-1.5 ff:shrink-0 ff:rounded-full", ca[g]),
1752
1752
  "aria-hidden": "true"
1753
1753
  }
1754
1754
  ),
@@ -1760,7 +1760,7 @@ const pn = ["clean"], gn = te(["ff:inline-flex ff:items-center", "ff:text-xs ff:
1760
1760
  );
1761
1761
  La.displayName = "Badge";
1762
1762
  const G = s.forwardRef(
1763
- ({ variant: e = "default", label: a, title: r, description: n, className: o, ...i }, f) => /* @__PURE__ */ u("div", { ref: f, "data-slot": "panel-header", className: M("ff:flex ff:flex-col ff:gap-4", o), ...i, children: [
1763
+ ({ variant: e = "default", label: a, title: r, description: n, className: o, ...i }, f) => /* @__PURE__ */ u("div", { ref: f, "data-slot": "panel-header", className: E("ff:flex ff:flex-col ff:gap-4", o), ...i, children: [
1764
1764
  a ? /* @__PURE__ */ t("div", { className: "ff:flex", children: /* @__PURE__ */ t(La, { variant: e, solidBackground: !1, children: a }) }) : null,
1765
1765
  r || n ? /* @__PURE__ */ u("div", { children: [
1766
1766
  r ? /* @__PURE__ */ t("h2", { className: "ff:text-xl ff:font-semibold ff:text-foreground", children: r }) : null,
@@ -1783,7 +1783,7 @@ const mn = te(["ff:flex ff:flex-col ff:gap-2", "ff:p-4", "ff:text-xs ff:text-for
1783
1783
  }
1784
1784
  }), ie = s.forwardRef(({ className: e, children: a, ...r }, n) => {
1785
1785
  const o = ge();
1786
- return /* @__PURE__ */ t("div", { ref: n, "data-slot": "info-panel", className: M(mn({ styleVariant: o }), e), ...r, children: a });
1786
+ return /* @__PURE__ */ t("div", { ref: n, "data-slot": "info-panel", className: E(mn({ styleVariant: o }), e), ...r, children: a });
1787
1787
  });
1788
1788
  ie.displayName = "InfoPanel";
1789
1789
  const hn = te(["ff:flex ff:items-start ff:gap-3", "ff:rounded-lg ff:p-4"], {
@@ -1862,12 +1862,12 @@ const be = s.forwardRef(
1862
1862
  "data-slot": "alert-panel",
1863
1863
  "data-tone": e,
1864
1864
  role: e === "success" ? "status" : "alert",
1865
- className: M(hn({ tone: e }), o),
1865
+ className: E(hn({ tone: e }), o),
1866
1866
  ...i,
1867
1867
  children: [
1868
- /* @__PURE__ */ t("div", { className: M(wn({ tone: e })), "aria-hidden": "true", children: a ?? c }),
1868
+ /* @__PURE__ */ t("div", { className: E(wn({ tone: e })), "aria-hidden": "true", children: a ?? c }),
1869
1869
  /* @__PURE__ */ u("div", { className: "ff:flex ff:flex-col ff:gap-1", children: [
1870
- r ? /* @__PURE__ */ t("p", { className: M(vn({ tone: e })), children: r }) : null,
1870
+ r ? /* @__PURE__ */ t("p", { className: E(vn({ tone: e })), children: r }) : null,
1871
1871
  n ? /* @__PURE__ */ t("p", { className: "ff:text-xs ff:text-foreground/80", children: n }) : null
1872
1872
  ] })
1873
1873
  ]
@@ -2120,7 +2120,7 @@ function pe({
2120
2120
  if (!w)
2121
2121
  return null;
2122
2122
  if (y && r)
2123
- return /* @__PURE__ */ t("span", { className: M("ff:text-muted ff:font-heading", n), "data-slot": "countdown", "data-past": "", children: r });
2123
+ return /* @__PURE__ */ t("span", { className: E("ff:text-muted ff:font-heading", n), "data-slot": "countdown", "data-past": "", children: r });
2124
2124
  const l = y ? "ff:opacity-50" : void 0, p = [
2125
2125
  {
2126
2126
  value: v.days,
@@ -2141,20 +2141,20 @@ function pe({
2141
2141
  shortLabel: m("countdown.secondsShort"),
2142
2142
  show: c
2143
2143
  }
2144
- ].filter((E) => E.show), D = g === "swiss" ? p.slice(0, 3) : p;
2144
+ ].filter((V) => V.show), D = g === "swiss" ? p.slice(0, 3) : p;
2145
2145
  if (g === "compact") {
2146
- const E = (T) => T.toString().padStart(2, "0");
2146
+ const V = (T) => T.toString().padStart(2, "0");
2147
2147
  return /* @__PURE__ */ t(
2148
2148
  "span",
2149
2149
  {
2150
- className: M("ff:tabular-nums ff:font-heading", l, n),
2150
+ className: E("ff:tabular-nums ff:font-heading", l, n),
2151
2151
  "data-slot": "countdown",
2152
2152
  "data-layout": "compact",
2153
2153
  "data-past": y || void 0,
2154
2154
  role: "timer",
2155
2155
  "aria-live": y ? "off" : "polite",
2156
2156
  children: D.map((T, b) => /* @__PURE__ */ u(s.Fragment, { children: [
2157
- E(T.value),
2157
+ V(T.value),
2158
2158
  T.shortLabel,
2159
2159
  b < D.length - 1 && " "
2160
2160
  ] }, T.label))
@@ -2164,7 +2164,7 @@ function pe({
2164
2164
  return /* @__PURE__ */ t(
2165
2165
  "div",
2166
2166
  {
2167
- className: M(Dn({ styleVariant: C, size: d }), l, n),
2167
+ className: E(Dn({ styleVariant: C, size: d }), l, n),
2168
2168
  "data-slot": "countdown",
2169
2169
  "data-layout": "swiss",
2170
2170
  "data-size": d,
@@ -2172,10 +2172,10 @@ function pe({
2172
2172
  "data-past": y || void 0,
2173
2173
  role: "timer",
2174
2174
  "aria-live": y ? "off" : "polite",
2175
- children: D.map((E, T) => /* @__PURE__ */ u(s.Fragment, { children: [
2176
- /* @__PURE__ */ t(En, { value: E.value, label: E.label, styleVariant: C, size: d, tone: x }),
2175
+ children: D.map((V, T) => /* @__PURE__ */ u(s.Fragment, { children: [
2176
+ /* @__PURE__ */ t(En, { value: V.value, label: V.label, styleVariant: C, size: d, tone: x }),
2177
2177
  T < D.length - 1 && /* @__PURE__ */ t(Mn, { styleVariant: C, size: d })
2178
- ] }, E.label))
2178
+ ] }, V.label))
2179
2179
  }
2180
2180
  );
2181
2181
  }
@@ -2189,7 +2189,7 @@ function nt({ show: e, presenceKey: a, children: r, className: n }) {
2189
2189
  animate: { opacity: 1, y: 0 },
2190
2190
  exit: o ? { opacity: 0 } : { opacity: 0, y: -4 },
2191
2191
  transition: { duration: 0.18, ease: "easeOut" },
2192
- className: M(n),
2192
+ className: E(n),
2193
2193
  children: r
2194
2194
  },
2195
2195
  a ?? "fade-presence"
@@ -2257,7 +2257,7 @@ function rt({ children: e, transitionKey: a, mode: r, layout: n = !0, className:
2257
2257
  transition: d.transition,
2258
2258
  layout: n && !f,
2259
2259
  "data-slot": "transition",
2260
- className: M(o),
2260
+ className: E(o),
2261
2261
  children: e
2262
2262
  },
2263
2263
  a
@@ -2289,23 +2289,23 @@ function Aa({
2289
2289
  defaultError: l,
2290
2290
  className: h
2291
2291
  }) {
2292
- const { t: p } = K(), D = s.useId(), E = i ?? p("auth.badgeLabel"), T = f ?? p("auth.title"), b = c ?? p("auth.description"), N = d ?? p("auth.submit"), S = x ?? p("auth.verify"), [V, A] = s.useState(w), [I, O] = s.useState(y ?? ""), [$, fe] = s.useState(
2292
+ const { t: p } = K(), D = s.useId(), V = i ?? p("auth.badgeLabel"), T = f ?? p("auth.title"), b = c ?? p("auth.description"), N = d ?? p("auth.submit"), S = x ?? p("auth.verify"), [M, A] = s.useState(w), [I, O] = s.useState(y ?? ""), [$, fe] = s.useState(
2293
2293
  C ?? Va(y ?? "")
2294
2294
  ), [ce, L] = s.useState(!1), [J, ne] = s.useState(""), [se, de] = s.useState(!1), [ee, P] = s.useState(l ?? null), [ae, me] = s.useState(
2295
2295
  w === "verify" && (y ?? "").length > 0 ? Date.now() + Et : null
2296
2296
  ), [ke, Re] = s.useState(() => Date.now()), [ue, q] = s.useState(!1), [_e, Ne] = s.useState(!1), st = p($ === "email" ? "auth.email" : "auth.phone");
2297
2297
  s.useEffect(() => {
2298
- if (V !== "verify") return;
2298
+ if (M !== "verify") return;
2299
2299
  const W = setInterval(() => Re(Date.now()), 1e3);
2300
2300
  return () => clearInterval(W);
2301
- }, [V]), s.useEffect(() => {
2301
+ }, [M]), s.useEffect(() => {
2302
2302
  if (!ue) return;
2303
2303
  const W = setTimeout(() => q(!1), Ln);
2304
2304
  return () => clearTimeout(W);
2305
2305
  }, [ue]);
2306
2306
  const Ue = ae ? Math.max(0, ae - ke) : 0, lt = Ue > 0, xe = s.useRef(null);
2307
2307
  ee && (xe.current = ee);
2308
- const F = ee ?? xe.current ?? "", ze = (W, Se) => {
2308
+ const F = ee ?? xe.current ?? "", je = (W, Se) => {
2309
2309
  O(W), fe(Se), P(null);
2310
2310
  }, Fe = async (W) => {
2311
2311
  if (W?.preventDefault(), !(!ce || !I)) {
@@ -2349,14 +2349,14 @@ function Aa({
2349
2349
  }
2350
2350
  }
2351
2351
  };
2352
- if (V === "success")
2353
- return /* @__PURE__ */ u(Y, { className: M("fanfare-auth-form", h), "data-slot": "auth-form", "data-step": "success", children: [
2352
+ if (M === "success")
2353
+ return /* @__PURE__ */ u(Y, { className: E("fanfare-auth-form", h), "data-slot": "auth-form", "data-step": "success", children: [
2354
2354
  /* @__PURE__ */ t(Z, { children: /* @__PURE__ */ u("div", { className: "ff:flex ff:flex-col ff:items-center ff:gap-3 ff:py-4", children: [
2355
2355
  /* @__PURE__ */ t(
2356
2356
  "div",
2357
2357
  {
2358
2358
  "data-slot": "auth-form-success-icon",
2359
- className: M(
2359
+ className: E(
2360
2360
  "ff:flex ff:h-12 ff:w-12 ff:items-center ff:justify-center ff:rounded-full",
2361
2361
  "ff:bg-success/10 ff:text-success"
2362
2362
  ),
@@ -2367,15 +2367,15 @@ function Aa({
2367
2367
  ] }) }),
2368
2368
  v && /* @__PURE__ */ t(H, {})
2369
2369
  ] });
2370
- const Ke = V === "credential" ? T : p("auth.verifyTitle");
2371
- return /* @__PURE__ */ u(Y, { className: M("fanfare-auth-form", h), "data-slot": "auth-form", "data-step": V, children: [
2372
- /* @__PURE__ */ t(G, { variant: o, label: E }),
2370
+ const Ke = M === "credential" ? T : p("auth.verifyTitle");
2371
+ return /* @__PURE__ */ u(Y, { className: E("fanfare-auth-form", h), "data-slot": "auth-form", "data-step": M, children: [
2372
+ /* @__PURE__ */ t(G, { variant: o, label: V }),
2373
2373
  /* @__PURE__ */ u(Z, { children: [
2374
2374
  g ? /* @__PURE__ */ u("div", { "data-slot": "auth-form-countdown", className: "ff:flex ff:flex-col ff:items-start ff:gap-1", children: [
2375
2375
  /* @__PURE__ */ t("span", { className: "ff:text-xxs ff:font-medium ff:uppercase ff:tracking-widest ff:text-muted", children: p("time.opensIn") }),
2376
2376
  /* @__PURE__ */ t(pe, { targetDate: g, showDays: !1 })
2377
2377
  ] }) : null,
2378
- /* @__PURE__ */ t("div", { "data-slot": "auth-form-heading", children: /* @__PURE__ */ t(rt, { transitionKey: V, mode: "fade", children: V === "credential" ? /* @__PURE__ */ u(Me, { children: [
2378
+ /* @__PURE__ */ t("div", { "data-slot": "auth-form-heading", children: /* @__PURE__ */ t(rt, { transitionKey: M, mode: "fade", children: M === "credential" ? /* @__PURE__ */ u(Me, { children: [
2379
2379
  /* @__PURE__ */ t("h2", { className: "ff:text-foreground ff:text-xl ff:font-semibold", children: Ke }),
2380
2380
  /* @__PURE__ */ t("p", { className: "ff:text-muted-foreground ff:text-xs", children: b })
2381
2381
  ] }) : /* @__PURE__ */ u(Me, { children: [
@@ -2385,7 +2385,7 @@ function Aa({
2385
2385
  " ",
2386
2386
  /* @__PURE__ */ t("strong", { className: "ff:text-foreground ff:font-semibold", children: I }),
2387
2387
  " · ",
2388
- /* @__PURE__ */ t(z, { type: "button", variant: "link", size: "xs", onClick: ct, disabled: se, children: p("auth.change") })
2388
+ /* @__PURE__ */ t(j, { type: "button", variant: "link", size: "xs", onClick: ct, disabled: se, children: p("auth.change") })
2389
2389
  ] }) : /* @__PURE__ */ t("p", { className: "ff:text-muted-foreground ff:text-xs", children: p("auth.verifyDescription", { values: { type: st } }) })
2390
2390
  ] }) }) }),
2391
2391
  /* @__PURE__ */ u(
@@ -2393,14 +2393,14 @@ function Aa({
2393
2393
  {
2394
2394
  className: "ff:flex ff:flex-1 ff:flex-col ff:gap-5",
2395
2395
  onSubmit: (W) => {
2396
- W.preventDefault(), V === "credential" ? Fe(W) : He(W);
2396
+ W.preventDefault(), M === "credential" ? Fe(W) : He(W);
2397
2397
  },
2398
2398
  children: [
2399
- /* @__PURE__ */ t(rt, { transitionKey: V, children: V === "credential" ? /* @__PURE__ */ t(
2399
+ /* @__PURE__ */ t(rt, { transitionKey: M, children: M === "credential" ? /* @__PURE__ */ t(
2400
2400
  Ea,
2401
2401
  {
2402
2402
  value: I,
2403
- onValueChange: ze,
2403
+ onValueChange: je,
2404
2404
  onValidChange: L,
2405
2405
  onSubmit: () => {
2406
2406
  Fe();
@@ -2423,10 +2423,10 @@ function Aa({
2423
2423
  disabled: se
2424
2424
  }
2425
2425
  ) }),
2426
- /* @__PURE__ */ t(nt, { show: V === "verify", presenceKey: "resend-area", children: /* @__PURE__ */ t(rt, { transitionKey: ue ? "success" : "cooldown", mode: "fade", layout: !1, children: ue ? /* @__PURE__ */ t(be, { tone: "success", title: p("auth.newCodeSent") }) : /* @__PURE__ */ u("div", { "data-slot": "auth-form-resend", className: "ff:flex ff:items-center ff:justify-between", children: [
2426
+ /* @__PURE__ */ t(nt, { show: M === "verify", presenceKey: "resend-area", children: /* @__PURE__ */ t(rt, { transitionKey: ue ? "success" : "cooldown", mode: "fade", layout: !1, children: ue ? /* @__PURE__ */ t(be, { tone: "success", title: p("auth.newCodeSent") }) : /* @__PURE__ */ u("div", { "data-slot": "auth-form-resend", className: "ff:flex ff:items-center ff:justify-between", children: [
2427
2427
  /* @__PURE__ */ t("span", { className: "ff:text-muted-foreground ff:text-xxs", children: p("auth.didntGetIt") }),
2428
2428
  lt ? /* @__PURE__ */ t("span", { className: "ff:text-muted-foreground ff:text-xxs ff:tabular-nums", children: An(Ue) }) : /* @__PURE__ */ t(
2429
- z,
2429
+ j,
2430
2430
  {
2431
2431
  type: "button",
2432
2432
  variant: "link",
@@ -2442,15 +2442,15 @@ function Aa({
2442
2442
  /* @__PURE__ */ t(nt, { show: !!ee, presenceKey: "error-alert", children: /* @__PURE__ */ t(be, { id: D, tone: "danger", title: F }) }),
2443
2443
  /* @__PURE__ */ u("div", { className: "ff:mt-auto ff:flex ff:flex-col ff:gap-2", children: [
2444
2444
  /* @__PURE__ */ t(
2445
- z,
2445
+ j,
2446
2446
  {
2447
2447
  type: "submit",
2448
2448
  className: "ff:w-full",
2449
- disabled: se || _e || (V === "credential" ? !ce : J.length < 6),
2450
- children: se ? /* @__PURE__ */ t(Te, { size: "sm" }) : V === "credential" ? N : S
2449
+ disabled: se || _e || (M === "credential" ? !ce : J.length < 6),
2450
+ children: se ? /* @__PURE__ */ t(Te, { size: "sm" }) : M === "credential" ? N : S
2451
2451
  }
2452
2452
  ),
2453
- m && V === "credential" && /* @__PURE__ */ t(z, { type: "button", variant: "outline", className: "ff:w-full", onClick: r, disabled: se, children: p("common.skip") })
2453
+ m && M === "credential" && /* @__PURE__ */ t(j, { type: "button", variant: "outline", className: "ff:w-full", onClick: r, disabled: se, children: p("common.skip") })
2454
2454
  ] })
2455
2455
  ]
2456
2456
  }
@@ -2489,14 +2489,14 @@ const Ia = s.forwardRef(
2489
2489
  placeholder: f,
2490
2490
  error: o,
2491
2491
  hasError: i,
2492
- className: M("fanfare-access-code-input", e),
2492
+ className: E("fanfare-access-code-input", e),
2493
2493
  "data-slot": "access-code-input",
2494
2494
  ...g
2495
2495
  }
2496
2496
  )
2497
2497
  );
2498
2498
  Ia.displayName = "AccessCodeInput";
2499
- function ja({
2499
+ function za({
2500
2500
  onSubmit: e,
2501
2501
  onSkip: a,
2502
2502
  variant: r = "secondary",
@@ -2510,19 +2510,19 @@ function ja({
2510
2510
  defaultError: x,
2511
2511
  className: m
2512
2512
  }) {
2513
- const { t: v } = K(), w = n ?? v("accessCode.badgeLabel"), y = o ?? v("accessCode.title"), C = i ?? v("accessCode.description"), l = c ?? v("accessCode.submit"), [h, p] = s.useState(""), [D, E] = s.useState(!1), [T, b] = s.useState(x ?? null), N = async (S) => {
2513
+ const { t: v } = K(), w = n ?? v("accessCode.badgeLabel"), y = o ?? v("accessCode.title"), C = i ?? v("accessCode.description"), l = c ?? v("accessCode.submit"), [h, p] = s.useState(""), [D, V] = s.useState(!1), [T, b] = s.useState(x ?? null), N = async (S) => {
2514
2514
  if (S?.preventDefault(), !!h.trim()) {
2515
- E(!0), b(null);
2515
+ V(!0), b(null);
2516
2516
  try {
2517
2517
  await e?.(h.trim());
2518
- } catch (V) {
2519
- b(V instanceof Error ? V.message : v("accessCode.invalid"));
2518
+ } catch (M) {
2519
+ b(M instanceof Error ? M.message : v("accessCode.invalid"));
2520
2520
  } finally {
2521
- E(!1);
2521
+ V(!1);
2522
2522
  }
2523
2523
  }
2524
2524
  };
2525
- return /* @__PURE__ */ u(Y, { className: M("fanfare-access-code-form", m), "data-slot": "access-code-form", children: [
2525
+ return /* @__PURE__ */ u(Y, { className: E("fanfare-access-code-form", m), "data-slot": "access-code-form", children: [
2526
2526
  /* @__PURE__ */ t(G, { variant: r, label: w }),
2527
2527
  /* @__PURE__ */ u(Z, { children: [
2528
2528
  f ? /* @__PURE__ */ u("div", { "data-slot": "access-code-form-countdown", className: "ff:flex ff:flex-col ff:items-start ff:gap-1", children: [
@@ -2555,27 +2555,27 @@ function ja({
2555
2555
  ),
2556
2556
  T ? /* @__PURE__ */ t(be, { tone: "danger", title: T }) : null,
2557
2557
  /* @__PURE__ */ u("div", { className: "ff:mt-auto ff:flex ff:flex-col ff:gap-2", children: [
2558
- /* @__PURE__ */ t(z, { type: "submit", className: "ff:w-full", disabled: D || !h.trim(), children: D ? /* @__PURE__ */ t(Te, { size: "sm" }) : l }),
2559
- g && /* @__PURE__ */ t(z, { type: "button", variant: "outline", className: "ff:w-full", onClick: a, disabled: D, children: v("common.skip") })
2558
+ /* @__PURE__ */ t(j, { type: "submit", className: "ff:w-full", disabled: D || !h.trim(), children: D ? /* @__PURE__ */ t(Te, { size: "sm" }) : l }),
2559
+ g && /* @__PURE__ */ t(j, { type: "button", variant: "outline", className: "ff:w-full", onClick: a, disabled: D, children: v("common.skip") })
2560
2560
  ] })
2561
2561
  ] })
2562
2562
  ] }),
2563
2563
  /* @__PURE__ */ t(H, {})
2564
2564
  ] });
2565
2565
  }
2566
- ja.displayName = "AccessCodeForm";
2566
+ za.displayName = "AccessCodeForm";
2567
2567
  function In(e) {
2568
2568
  if (!e || typeof e != "object") return !1;
2569
2569
  const a = e;
2570
2570
  return typeof a.kind != "string" || typeof a.challengeId != "string" ? !1 : a.kind === "fanfare:challenge:turnstile" ? typeof a.token == "string" && a.token.length > 0 : a.kind === "fanfare:challenge:turnstile_error" || a.kind === "fanfare:challenge:turnstile_expired";
2571
2571
  }
2572
- function jn(e, a) {
2572
+ function zn(e, a) {
2573
2573
  const r = e?.blockedUntil;
2574
2574
  if (!r) return { blocked: !1 };
2575
2575
  const n = Date.parse(r);
2576
2576
  return Number.isFinite(n) ? { blocked: a < n, blockedUntil: r } : { blocked: !1 };
2577
2577
  }
2578
- function zn(e, a) {
2578
+ function jn(e, a) {
2579
2579
  const r = new Date(e);
2580
2580
  try {
2581
2581
  return r.toLocaleString(hr(a));
@@ -2583,7 +2583,7 @@ function zn(e, a) {
2583
2583
  return r.toLocaleString();
2584
2584
  }
2585
2585
  }
2586
- function za({
2586
+ function ja({
2587
2587
  challenge: e,
2588
2588
  botMitigation: a,
2589
2589
  onVerifyToken: r,
@@ -2596,7 +2596,7 @@ function za({
2596
2596
  retryLabel: d,
2597
2597
  className: x
2598
2598
  }) {
2599
- const { t: m, locale: v } = K(), [w, y] = s.useState(0), [C, l] = s.useState(!1), [h, p] = s.useState(!1), [D, E] = s.useState(null), [T, b] = s.useState(!1), [N, S] = s.useState("reload"), [V, A] = s.useState(() => Date.now()), I = X(() => {
2599
+ const { t: m, locale: v } = K(), [w, y] = s.useState(0), [C, l] = s.useState(!1), [h, p] = s.useState(!1), [D, V] = s.useState(null), [T, b] = s.useState(!1), [N, S] = s.useState("reload"), [M, A] = s.useState(() => Date.now()), I = X(() => {
2600
2600
  if (!e?.iframeUrl) return null;
2601
2601
  try {
2602
2602
  return new URL(e.iframeUrl).origin;
@@ -2623,24 +2623,24 @@ function za({
2623
2623
  };
2624
2624
  }, [a?.blockedUntil]);
2625
2625
  const { blocked: $, blockedUntil: fe } = X(
2626
- () => jn(a, V),
2627
- [a, V]
2626
+ () => zn(a, M),
2627
+ [a, M]
2628
2628
  ), ce = typeof a?.attemptsRemaining == "number" ? a.attemptsRemaining : void 0;
2629
2629
  s.useEffect(() => {
2630
- y(0), l(!1), p(!1), E(null), b(!1), S("reload");
2630
+ y(0), l(!1), p(!1), V(null), b(!1), S("reload");
2631
2631
  }, [e?.id]), s.useEffect(() => {
2632
- T && a?.message && E(a.message);
2632
+ T && a?.message && V(a.message);
2633
2633
  }, [T, a?.message]), s.useEffect(() => {
2634
2634
  if (!e?.id || !I) return;
2635
2635
  const ee = (P) => {
2636
2636
  if (P.origin !== I || !In(P.data) || P.data.challengeId !== e.id) return;
2637
2637
  if (P.data.kind === "fanfare:challenge:turnstile") {
2638
2638
  const ke = P.data.token;
2639
- b(!0), p(!0), E(null), (async () => {
2639
+ b(!0), p(!0), V(null), (async () => {
2640
2640
  try {
2641
2641
  await r(ke);
2642
2642
  } catch (Re) {
2643
- E(Re instanceof Error ? Re.message : m("challenge.verificationFailed"));
2643
+ V(Re instanceof Error ? Re.message : m("challenge.verificationFailed"));
2644
2644
  } finally {
2645
2645
  p(!1);
2646
2646
  }
@@ -2650,16 +2650,16 @@ function za({
2650
2650
  b(!0);
2651
2651
  const ae = typeof P.data.reason == "string" ? P.data.reason : void 0, me = typeof P.data.message == "string" ? P.data.message : void 0;
2652
2652
  if (ae === "challenge_expired" || ae === "challenge_not_found") {
2653
- S("reroute"), E(
2653
+ S("reroute"), V(
2654
2654
  me ?? (P.data.kind === "fanfare:challenge:turnstile_expired" ? m("challenge.expiredRefresh") : m("challenge.errorRefresh"))
2655
2655
  );
2656
2656
  return;
2657
2657
  }
2658
2658
  if (S("reload"), P.data.kind === "fanfare:challenge:turnstile_expired") {
2659
- E(me ?? m("challenge.expiredRetry")), y((ke) => ke + 1), l(!1);
2659
+ V(me ?? m("challenge.expiredRetry")), y((ke) => ke + 1), l(!1);
2660
2660
  return;
2661
2661
  }
2662
- E(me ?? m("challenge.errorRetry")), y((ke) => ke + 1), l(!1);
2662
+ V(me ?? m("challenge.errorRetry")), y((ke) => ke + 1), l(!1);
2663
2663
  };
2664
2664
  return window.addEventListener("message", ee), () => {
2665
2665
  window.removeEventListener("message", ee);
@@ -2667,13 +2667,13 @@ function za({
2667
2667
  }, [e?.id, I, r, m]);
2668
2668
  const L = f ?? m("challenge.title"), J = c ?? m("challenge.description"), ne = d ?? m("challenge.retry"), se = i ?? m("challenge.badgeLabel"), de = () => {
2669
2669
  const ee = N;
2670
- if (E(null), b(!1), n && (ee === "reroute" || !O || typeof ce == "number" && ce <= 0)) {
2670
+ if (V(null), b(!1), n && (ee === "reroute" || !O || typeof ce == "number" && ce <= 0)) {
2671
2671
  S("reload"), n();
2672
2672
  return;
2673
2673
  }
2674
2674
  S("reload"), y((P) => P + 1), l(!1);
2675
2675
  };
2676
- return /* @__PURE__ */ u(Y, { className: M("fanfare-challenge-gate", x), "data-slot": "challenge-gate", children: [
2676
+ return /* @__PURE__ */ u(Y, { className: E("fanfare-challenge-gate", x), "data-slot": "challenge-gate", children: [
2677
2677
  /* @__PURE__ */ t(G, { variant: o, label: se }),
2678
2678
  /* @__PURE__ */ u(Z, { children: [
2679
2679
  g ? /* @__PURE__ */ u("div", { "data-slot": "challenge-gate-countdown", className: "ff:flex ff:flex-col ff:items-start ff:gap-1", children: [
@@ -2689,7 +2689,7 @@ function za({
2689
2689
  {
2690
2690
  tone: "danger",
2691
2691
  title: a?.message ?? m("challenge.blockedDefault"),
2692
- description: fe ? m("challenge.blockedUntil", { values: { date: zn(fe, v) } }) : void 0
2692
+ description: fe ? m("challenge.blockedUntil", { values: { date: jn(fe, v) } }) : void 0
2693
2693
  }
2694
2694
  ) : O ? /* @__PURE__ */ u("div", { className: "ff:relative ff:w-full ff:rounded-md ff:border ff:border-border ff:bg-background ff:overflow-hidden", children: [
2695
2695
  !C && /* @__PURE__ */ t("div", { className: "ff:absolute ff:inset-0 ff:flex ff:items-center ff:justify-center ff:bg-background/60", children: /* @__PURE__ */ t(Te, { size: "lg" }) }),
@@ -2716,26 +2716,26 @@ function za({
2716
2716
  description: ce !== void 0 ? m("challenge.attemptsRemaining", { values: { count: ce } }) : void 0
2717
2717
  }
2718
2718
  ),
2719
- !$ && /* @__PURE__ */ t(z, { className: "ff:mt-auto ff:w-full", variant: "secondary", onClick: de, disabled: h, children: ne })
2719
+ !$ && /* @__PURE__ */ t(j, { className: "ff:mt-auto ff:w-full", variant: "secondary", onClick: de, disabled: h, children: ne })
2720
2720
  ] }),
2721
2721
  /* @__PURE__ */ t(H, {})
2722
2722
  ] });
2723
2723
  }
2724
- za.displayName = "ChallengeGate";
2724
+ ja.displayName = "ChallengeGate";
2725
2725
  function Fa({ title: e, message: a, endedAt: r, ctaLabel: n, onCtaClick: o, className: i }) {
2726
2726
  const { t: f, locale: c } = K(), g = e ?? f("ended.title"), d = a ?? f("ended.message"), x = s.useMemo(() => r ? (r instanceof Date ? r : new Date(r)).toLocaleDateString(c, {
2727
2727
  month: "long",
2728
2728
  day: "numeric",
2729
2729
  year: "numeric"
2730
2730
  }) : null, [r, c]), m = we();
2731
- return /* @__PURE__ */ t(U.div, { ...m, children: /* @__PURE__ */ u(Y, { className: M("ff:w-full ff:max-w-sm", i), "data-slot": "ended-module", role: "status", children: [
2731
+ return /* @__PURE__ */ t(U.div, { ...m, children: /* @__PURE__ */ u(Y, { className: E("ff:w-full ff:max-w-sm", i), "data-slot": "ended-module", role: "status", children: [
2732
2732
  /* @__PURE__ */ t(G, { variant: "outline", label: g }),
2733
2733
  /* @__PURE__ */ u(Z, { children: [
2734
2734
  /* @__PURE__ */ u(ie, { children: [
2735
2735
  /* @__PURE__ */ t("p", { className: "ff:text-foreground/80", children: d }),
2736
2736
  x && /* @__PURE__ */ t("p", { className: "ff:text-xs ff:text-muted", children: f("ended.endedOn", { values: { date: x } }) })
2737
2737
  ] }),
2738
- n && o && /* @__PURE__ */ t(z, { className: "ff:mt-auto ff:w-full", variant: "outline", onClick: o, children: n })
2738
+ n && o && /* @__PURE__ */ t(j, { className: "ff:mt-auto ff:w-full", variant: "outline", onClick: o, children: n })
2739
2739
  ] }),
2740
2740
  /* @__PURE__ */ t(H, {})
2741
2741
  ] }) });
@@ -2752,13 +2752,13 @@ function et({ error: e, title: a, label: r, info: n, ctaLabel: o, onRetry: i, cl
2752
2752
  }
2753
2753
  }
2754
2754
  }, l = we();
2755
- return /* @__PURE__ */ t(U.div, { ...l, children: /* @__PURE__ */ u(Y, { className: M("ff:w-full ff:max-w-sm", f), "data-slot": "error-view", role: "alert", children: [
2755
+ return /* @__PURE__ */ t(U.div, { ...l, children: /* @__PURE__ */ u(Y, { className: E("ff:w-full ff:max-w-sm", f), "data-slot": "error-view", role: "alert", children: [
2756
2756
  /* @__PURE__ */ t(G, { variant: "danger", label: x }),
2757
2757
  /* @__PURE__ */ u(Z, { children: [
2758
2758
  /* @__PURE__ */ t(be, { tone: "danger", title: m, description: w }),
2759
2759
  n ? /* @__PURE__ */ t(ie, { children: n }) : null,
2760
2760
  i ? /* @__PURE__ */ t(
2761
- z,
2761
+ j,
2762
2762
  {
2763
2763
  className: "ff:mt-auto",
2764
2764
  onClick: () => {
@@ -2838,7 +2838,7 @@ function it({
2838
2838
  return /* @__PURE__ */ t(U.div, { ...g, children: /* @__PURE__ */ u(
2839
2839
  Y,
2840
2840
  {
2841
- className: M("ff:w-full ff:max-w-sm", i),
2841
+ className: E("ff:w-full ff:max-w-sm", i),
2842
2842
  "data-slot": "granted-panel",
2843
2843
  "data-stage": "granted",
2844
2844
  role: "status",
@@ -2849,7 +2849,7 @@ function it({
2849
2849
  /* @__PURE__ */ t("span", { className: "ff:text-xxs ff:font-medium ff:uppercase ff:tracking-widest ff:text-muted", children: f("granted.timeRemaining") }),
2850
2850
  /* @__PURE__ */ t(pe, { targetDate: n, showDays: !1 })
2851
2851
  ] }) : /* @__PURE__ */ t("p", { className: "ff:text-foreground/80", children: a }) }),
2852
- /* @__PURE__ */ t(z, { className: "ff:mt-auto", onClick: o, children: r })
2852
+ /* @__PURE__ */ t(j, { className: "ff:mt-auto", onClick: o, children: r })
2853
2853
  ] }),
2854
2854
  /* @__PURE__ */ t(H, {})
2855
2855
  ]
@@ -2883,7 +2883,7 @@ function We({
2883
2883
  return /* @__PURE__ */ t(U.div, { ...x, children: /* @__PURE__ */ u(
2884
2884
  Y,
2885
2885
  {
2886
- className: M("ff:w-full ff:max-w-sm", o),
2886
+ className: E("ff:w-full ff:max-w-sm", o),
2887
2887
  "data-slot": "outcome-panel",
2888
2888
  "data-stage": "ended",
2889
2889
  "data-reason": e,
@@ -2891,7 +2891,7 @@ function We({
2891
2891
  /* @__PURE__ */ t(G, { variant: c.variant, label: i(c.title) }),
2892
2892
  /* @__PURE__ */ u(Z, { children: [
2893
2893
  /* @__PURE__ */ t(ie, { children: /* @__PURE__ */ t("p", { className: "ff:text-foreground/80", children: i(c.body) }) }),
2894
- g && /* @__PURE__ */ t(z, { className: "ff:mt-auto", onClick: r, disabled: n, loading: n, children: d })
2894
+ g && /* @__PURE__ */ t(j, { className: "ff:mt-auto", onClick: r, disabled: n, loading: n, children: d })
2895
2895
  ] }),
2896
2896
  /* @__PURE__ */ t(H, {})
2897
2897
  ]
@@ -2920,7 +2920,7 @@ function Pa({
2920
2920
  return e === "none" ? /* @__PURE__ */ t(Me, { children: C }) : e === "loading" ? /* @__PURE__ */ t(
2921
2921
  "div",
2922
2922
  {
2923
- className: M(
2923
+ className: E(
2924
2924
  "fanfare-journey-gate",
2925
2925
  "ff:flex ff:flex-col ff:items-center ff:justify-center ff:py-12",
2926
2926
  y
@@ -2931,7 +2931,7 @@ function Pa({
2931
2931
  "aria-busy": "true",
2932
2932
  children: /* @__PURE__ */ t(Te, { size: "lg", className: "ff:text-primary" })
2933
2933
  }
2934
- ) : e === "auth" ? /* @__PURE__ */ t("div", { className: M("fanfare-journey-gate", y), "data-slot": "journey-gate", children: /* @__PURE__ */ t(
2934
+ ) : e === "auth" ? /* @__PURE__ */ t("div", { className: E("fanfare-journey-gate", y), "data-slot": "journey-gate", children: /* @__PURE__ */ t(
2935
2935
  Aa,
2936
2936
  {
2937
2937
  title: d,
@@ -2943,8 +2943,8 @@ function Pa({
2943
2943
  onSuccess: o,
2944
2944
  allowSkip: c
2945
2945
  }
2946
- ) }) : e === "access_code" ? /* @__PURE__ */ t("div", { className: M("fanfare-journey-gate", y), "data-slot": "journey-gate", children: /* @__PURE__ */ t(
2947
- ja,
2946
+ ) }) : e === "access_code" ? /* @__PURE__ */ t("div", { className: E("fanfare-journey-gate", y), "data-slot": "journey-gate", children: /* @__PURE__ */ t(
2947
+ za,
2948
2948
  {
2949
2949
  title: m,
2950
2950
  description: v,
@@ -3051,7 +3051,7 @@ const Kn = te(["ff:animate-pulse ff:rounded-md", "ff:bg-secondary"], {
3051
3051
  }
3052
3052
  }), $a = s.forwardRef(({ className: e, ...a }, r) => {
3053
3053
  const n = ge();
3054
- return /* @__PURE__ */ t("div", { ref: r, "data-slot": "skeleton", className: M(Kn({ styleVariant: n }), e), ...a });
3054
+ return /* @__PURE__ */ t("div", { ref: r, "data-slot": "skeleton", className: E(Kn({ styleVariant: n }), e), ...a });
3055
3055
  });
3056
3056
  $a.displayName = "Skeleton";
3057
3057
  const Zn = (e, a) => /* @__PURE__ */ t("svg", { viewBox: "0 0 24 24", width: "1.2em", height: "1.2em", ref: a, ...e, children: /* @__PURE__ */ t("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 7.5v11.25m-18 0A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75m-18 0v-7.5A2.25 2.25 0 0 1 5.25 9h13.5A2.25 2.25 0 0 1 21 11.25v7.5m-9-6h.008v.008H12zM12 15h.008v.008H12zm0 2.25h.008v.008H12zM9.75 15h.008v.008H9.75zm0 2.25h.008v.008H9.75zM7.5 15h.008v.008H7.5zm0 2.25h.008v.008H7.5zm6.75-4.5h.008v.008h-.008zm0 2.25h.008v.008h-.008zm0 2.25h.008v.008h-.008zm2.25-4.5h.008v.008H16.5zm0 2.25h.008v.008H16.5z" }) }), Yn = kt(Zn), Gn = (e, a) => /* @__PURE__ */ t("svg", { viewBox: "0 0 24 24", width: "1.2em", height: "1.2em", ref: a, ...e, children: /* @__PURE__ */ t("path", { fill: "none", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 1.5, d: "m15.75 10.5l4.72-4.72a.75.75 0 0 1 1.28.53v11.38a.75.75 0 0 1-1.28.53l-4.72-4.72M4.5 18.75h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25h-9A2.25 2.25 0 0 0 2.25 7.5v9a2.25 2.25 0 0 0 2.25 2.25" }) }), qa = kt(Gn);
@@ -3099,7 +3099,7 @@ function Wa({
3099
3099
  /* @__PURE__ */ t("span", { className: "ff:font-mono ff:font-semibold ff:text-foreground", children: e.confirmationCode })
3100
3100
  ] })
3101
3101
  ] }),
3102
- !r && /* @__PURE__ */ t(z, { size: "md", className: "ff:w-full", onClick: p.onClick, disabled: p.disabled, children: /* @__PURE__ */ u("span", { className: "ff:flex ff:items-center ff:gap-1.5", children: [
3102
+ !r && /* @__PURE__ */ t(j, { size: "md", className: "ff:w-full", onClick: p.onClick, disabled: p.disabled, children: /* @__PURE__ */ u("span", { className: "ff:flex ff:items-center ff:gap-1.5", children: [
3103
3103
  p.icon,
3104
3104
  p.label
3105
3105
  ] }) }),
@@ -3108,7 +3108,7 @@ function Wa({
3108
3108
  /* @__PURE__ */ t(be, { tone: "danger", title: d("appointment.cancelConfirm") }),
3109
3109
  /* @__PURE__ */ u("div", { className: "ff:flex ff:gap-2", children: [
3110
3110
  /* @__PURE__ */ t(
3111
- z,
3111
+ j,
3112
3112
  {
3113
3113
  size: "sm",
3114
3114
  variant: "destructive",
@@ -3120,7 +3120,7 @@ function Wa({
3120
3120
  }
3121
3121
  ),
3122
3122
  /* @__PURE__ */ t(
3123
- z,
3123
+ j,
3124
3124
  {
3125
3125
  size: "sm",
3126
3126
  variant: "outline",
@@ -3133,9 +3133,9 @@ function Wa({
3133
3133
  ] })
3134
3134
  ] }) }),
3135
3135
  !r && !x && /* @__PURE__ */ u("div", { className: "ff:flex ff:items-center ff:justify-center ff:gap-3 ff:text-xs", children: [
3136
- /* @__PURE__ */ t(z, { variant: "link", size: "xs", onClick: o, children: d("appointment.reschedule") }),
3136
+ /* @__PURE__ */ t(j, { variant: "link", size: "xs", onClick: o, children: d("appointment.reschedule") }),
3137
3137
  /* @__PURE__ */ t("span", { "aria-hidden": "true", className: "ff:text-muted", children: "·" }),
3138
- /* @__PURE__ */ t(z, { variant: "link", size: "xs", onClick: () => m(!0), disabled: c, children: d("appointment.cancel") })
3138
+ /* @__PURE__ */ t(j, { variant: "link", size: "xs", onClick: () => m(!0), disabled: c, children: d("appointment.cancel") })
3139
3139
  ] })
3140
3140
  ] });
3141
3141
  }
@@ -3170,7 +3170,7 @@ function Ua({ booking: e, timezone: a, onJoinCall: r, onShowPass: n }) {
3170
3170
  ] })
3171
3171
  ] }),
3172
3172
  i ? /* @__PURE__ */ t(
3173
- z,
3173
+ j,
3174
3174
  {
3175
3175
  size: "md",
3176
3176
  className: "ff:w-full",
@@ -3183,7 +3183,7 @@ function Ua({ booking: e, timezone: a, onJoinCall: r, onShowPass: n }) {
3183
3183
  o("appointment.joinCall")
3184
3184
  ] })
3185
3185
  }
3186
- ) : /* @__PURE__ */ t(z, { size: "md", variant: "outline", className: "ff:w-full", onClick: () => n?.(), disabled: !n, children: o("appointment.showPass") })
3186
+ ) : /* @__PURE__ */ t(j, { size: "md", variant: "outline", className: "ff:w-full", onClick: () => n?.(), disabled: !n, children: o("appointment.showPass") })
3187
3187
  ]
3188
3188
  }
3189
3189
  );
@@ -3359,25 +3359,25 @@ function Ya({
3359
3359
  () => r ? gt(new Date(r), n) : void 0,
3360
3360
  [r, n]
3361
3361
  ), { startDate: d, endDate: x } = s.useMemo(() => {
3362
- const N = gt(/* @__PURE__ */ new Date(), n), S = c && c > N ? c : N, V = ga(S, ha - 1), A = g && g < V ? g : V;
3362
+ const N = gt(/* @__PURE__ */ new Date(), n), S = c && c > N ? c : N, M = ga(S, ha - 1), A = g && g < M ? g : M;
3363
3363
  return { startDate: S, endDate: A };
3364
3364
  }, [c, g, n]), { slots: m, isLoading: v, error: w } = Qn(e, { startDate: d, endDate: x, timezone: n }), y = s.useMemo(() => {
3365
3365
  const N = /* @__PURE__ */ new Map();
3366
3366
  for (const S of m) {
3367
- const V = S.startTime ? gt(new Date(S.startTime), S.timezone ?? n) : S.id.slice(0, 10), A = N.get(V);
3368
- A ? A.push(S) : N.set(V, [S]);
3367
+ const M = S.startTime ? gt(new Date(S.startTime), S.timezone ?? n) : S.id.slice(0, 10), A = N.get(M);
3368
+ A ? A.push(S) : N.set(M, [S]);
3369
3369
  }
3370
3370
  return N;
3371
3371
  }, [m, n]), C = s.useMemo(() => {
3372
3372
  const N = [];
3373
3373
  for (let S = 0; S < ha; S += 1) {
3374
- const V = ga(d, S);
3375
- if (g && V > g) break;
3376
- const A = y.get(V) ?? [], I = A.some(($) => $.available > 0), O = !v && A.length === 0;
3374
+ const M = ga(d, S);
3375
+ if (g && M > g) break;
3376
+ const A = y.get(M) ?? [], I = A.some(($) => $.available > 0), O = !v && A.length === 0;
3377
3377
  N.push({
3378
- date: V,
3379
- weekdayLabel: Un(V),
3380
- dayNumber: Hn(V),
3378
+ date: M,
3379
+ weekdayLabel: Un(M),
3380
+ dayNumber: Hn(M),
3381
3381
  hasAvailability: I,
3382
3382
  isClosed: O
3383
3383
  });
@@ -3389,12 +3389,12 @@ function Ya({
3389
3389
  const N = C.find((S) => !S.isClosed);
3390
3390
  N && (h(N.date), D(null));
3391
3391
  }, [C, l]);
3392
- const E = s.useMemo(() => l ? y.get(l) ?? [] : [], [l, y]);
3392
+ const V = s.useMemo(() => l ? y.get(l) ?? [] : [], [l, y]);
3393
3393
  s.useEffect(() => {
3394
3394
  if (!o) return;
3395
- const N = E.find((S) => S.id === p) ?? null;
3395
+ const N = V.find((S) => S.id === p) ?? null;
3396
3396
  o(N);
3397
- }, [E, p, o]);
3397
+ }, [V, p, o]);
3398
3398
  const T = s.useCallback((N) => {
3399
3399
  h(N), D(null);
3400
3400
  }, []), b = s.useCallback((N) => {
@@ -3405,7 +3405,7 @@ function Ya({
3405
3405
  /* @__PURE__ */ t(
3406
3406
  Za,
3407
3407
  {
3408
- slots: E,
3408
+ slots: V,
3409
3409
  isLoading: v,
3410
3410
  selectedSlotId: p,
3411
3411
  onSelect: b
@@ -3437,7 +3437,7 @@ function At({
3437
3437
  isReentering: h,
3438
3438
  className: p
3439
3439
  }) {
3440
- const { t: D } = K(), E = je(a ?? eo), [T, b] = s.useState(!1), N = we();
3440
+ const { t: D } = K(), V = ze(a ?? eo), [T, b] = s.useState(!1), N = we();
3441
3441
  if (r === "ended")
3442
3442
  return /* @__PURE__ */ t(We, { outcomeReason: C ?? "ended", participationType: "appointment", className: p });
3443
3443
  if (r === "participating" && T)
@@ -3455,8 +3455,8 @@ function At({
3455
3455
  idleLabelKey: "appointment.selectATime",
3456
3456
  isPending: v,
3457
3457
  error: w,
3458
- onConfirm: async (S, V) => {
3459
- await d(S, V), b(!1);
3458
+ onConfirm: async (S, M) => {
3459
+ await d(S, M), b(!1);
3460
3460
  },
3461
3461
  className: p,
3462
3462
  motionProps: N,
@@ -3465,11 +3465,11 @@ function At({
3465
3465
  }
3466
3466
  );
3467
3467
  if (r === "participating") {
3468
- const S = E.booking, V = S?.consumerStatus, A = V === "checked_in", I = V === "completed", O = I ? "completed" : A ? "checked_in" : "booked", $ = D(I ? "appointment.completedTitle" : A ? "appointment.checkedIn" : "appointment.bookedTitle");
3468
+ const S = V.booking, M = S?.consumerStatus, A = M === "checked_in", I = M === "completed", O = I ? "completed" : A ? "checked_in" : "booked", $ = D(I ? "appointment.completedTitle" : A ? "appointment.checkedIn" : "appointment.bookedTitle");
3469
3469
  return /* @__PURE__ */ t(U.div, { ...N, children: /* @__PURE__ */ u(
3470
3470
  Y,
3471
3471
  {
3472
- className: M("ff:w-full ff:max-w-sm", p),
3472
+ className: E("ff:w-full ff:max-w-sm", p),
3473
3473
  "data-slot": "appointment-module",
3474
3474
  "data-stage": "participating",
3475
3475
  "data-substage": O,
@@ -3531,7 +3531,7 @@ function wa({
3531
3531
  dataStage: y,
3532
3532
  dataMode: C
3533
3533
  }) {
3534
- const { t: l } = K(), [h, p] = s.useState(null), D = h ? l(c, { values: { time: Oa(h) } }) : l(g), E = s.useCallback(async () => {
3534
+ const { t: l } = K(), [h, p] = s.useState(null), D = h ? l(c, { values: { time: Oa(h) } }) : l(g), V = s.useCallback(async () => {
3535
3535
  if (!h) return;
3536
3536
  const T = h.locationId ?? o;
3537
3537
  await m(h.id, T);
@@ -3539,7 +3539,7 @@ function wa({
3539
3539
  return /* @__PURE__ */ t(U.div, { ...w, children: /* @__PURE__ */ u(
3540
3540
  Y,
3541
3541
  {
3542
- className: M("ff:w-full ff:max-w-sm", v),
3542
+ className: E("ff:w-full ff:max-w-sm", v),
3543
3543
  "data-slot": "appointment-module",
3544
3544
  "data-stage": y,
3545
3545
  "data-mode": C,
@@ -3557,11 +3557,11 @@ function wa({
3557
3557
  }
3558
3558
  ) }),
3559
3559
  /* @__PURE__ */ t(H, { children: /* @__PURE__ */ t(
3560
- z,
3560
+ j,
3561
3561
  {
3562
3562
  size: "sm",
3563
3563
  className: "ff:w-full",
3564
- onClick: E,
3564
+ onClick: V,
3565
3565
  disabled: !h || d,
3566
3566
  loading: d,
3567
3567
  children: D
@@ -3631,13 +3631,13 @@ function tt({
3631
3631
  onCheckoutClick: h,
3632
3632
  outcomeReason: p,
3633
3633
  onReenter: D,
3634
- isReentering: E,
3634
+ isReentering: V,
3635
3635
  className: T
3636
3636
  }) {
3637
- const { t: b } = K(), N = je(e ?? ro), S = s.useMemo(
3637
+ const { t: b } = K(), N = ze(e ?? ro), S = s.useMemo(
3638
3638
  () => no(a, N),
3639
3639
  [a, N]
3640
- ), V = s.useMemo(
3640
+ ), M = s.useMemo(
3641
3641
  () => x ?? (S.closeAt ? new Date(S.closeAt) : void 0),
3642
3642
  [x, S.closeAt]
3643
3643
  ), A = s.useMemo(() => {
@@ -3664,18 +3664,18 @@ function tt({
3664
3664
  return /* @__PURE__ */ t(U.div, { ...$, children: /* @__PURE__ */ u(
3665
3665
  Y,
3666
3666
  {
3667
- className: M("ff:w-full ff:max-w-sm", T),
3667
+ className: E("ff:w-full ff:max-w-sm", T),
3668
3668
  "data-slot": "auction-module",
3669
3669
  "data-stage": "enterable",
3670
3670
  children: [
3671
3671
  /* @__PURE__ */ t(G, { variant: "default", label: b("auction.title") }),
3672
3672
  /* @__PURE__ */ u(Z, { children: [
3673
- V && /* @__PURE__ */ u("div", { className: "ff:flex ff:flex-col ff:items-start ff:gap-1", children: [
3673
+ M && /* @__PURE__ */ u("div", { className: "ff:flex ff:flex-col ff:items-start ff:gap-1", children: [
3674
3674
  /* @__PURE__ */ t("span", { className: "ff:text-xxs ff:font-medium ff:uppercase ff:tracking-widest ff:text-muted", children: b("auction.endsIn") }),
3675
- /* @__PURE__ */ t(pe, { targetDate: V, showDays: !1 })
3675
+ /* @__PURE__ */ t(pe, { targetDate: M, showDays: !1 })
3676
3676
  ] }),
3677
3677
  /* @__PURE__ */ t(ie, { children: /* @__PURE__ */ t("p", { className: "ff:text-foreground/80", children: b("auction.description") }) }),
3678
- c ? /* @__PURE__ */ t(z, { className: "ff:mt-auto ff:w-full", onClick: ce, children: b("auction.bidAction") }) : n && /* @__PURE__ */ t(z, { className: "ff:mt-auto ff:w-full", onClick: i, disabled: g, loading: g, children: b("auction.enter") })
3678
+ c ? /* @__PURE__ */ t(j, { className: "ff:mt-auto ff:w-full", onClick: ce, children: b("auction.bidAction") }) : n && /* @__PURE__ */ t(j, { className: "ff:mt-auto ff:w-full", onClick: i, disabled: g, loading: g, children: b("auction.enter") })
3679
3679
  ] }),
3680
3680
  /* @__PURE__ */ t(H, {})
3681
3681
  ]
@@ -3686,15 +3686,15 @@ function tt({
3686
3686
  return /* @__PURE__ */ t(U.div, { ...$, children: /* @__PURE__ */ u(
3687
3687
  Y,
3688
3688
  {
3689
- className: M("ff:w-full ff:max-w-sm", T),
3689
+ className: E("ff:w-full ff:max-w-sm", T),
3690
3690
  "data-slot": "auction-module",
3691
3691
  "data-stage": "participating",
3692
3692
  children: [
3693
3693
  /* @__PURE__ */ t(G, { variant: J, label: ne }),
3694
3694
  /* @__PURE__ */ u(Z, { children: [
3695
- V && /* @__PURE__ */ u("div", { className: "ff:flex ff:flex-col ff:items-start ff:gap-1", children: [
3695
+ M && /* @__PURE__ */ u("div", { className: "ff:flex ff:flex-col ff:items-start ff:gap-1", children: [
3696
3696
  /* @__PURE__ */ t("span", { className: "ff:text-xxs ff:font-medium ff:uppercase ff:tracking-widest ff:text-muted", children: b("auction.endsIn") }),
3697
- /* @__PURE__ */ t(pe, { targetDate: V, showDays: !1 })
3697
+ /* @__PURE__ */ t(pe, { targetDate: M, showDays: !1 })
3698
3698
  ] }),
3699
3699
  /* @__PURE__ */ u(ie, { children: [
3700
3700
  se !== void 0 && /* @__PURE__ */ u("div", { className: "ff:flex ff:items-center ff:justify-between", children: [
@@ -3707,9 +3707,9 @@ function tt({
3707
3707
  ] })
3708
3708
  ] }),
3709
3709
  /* @__PURE__ */ u("div", { className: "ff:mt-auto ff:flex ff:flex-col ff:gap-2", children: [
3710
- c && /* @__PURE__ */ t(z, { className: "ff:w-full", onClick: ce, children: b("auction.bidAction") }),
3710
+ c && /* @__PURE__ */ t(j, { className: "ff:w-full", onClick: ce, children: b("auction.bidAction") }),
3711
3711
  o && /* @__PURE__ */ t(
3712
- z,
3712
+ j,
3713
3713
  {
3714
3714
  className: "ff:w-full",
3715
3715
  variant: "outline",
@@ -3731,7 +3731,7 @@ function tt({
3731
3731
  return /* @__PURE__ */ t(U.div, { ...$, children: /* @__PURE__ */ u(
3732
3732
  Y,
3733
3733
  {
3734
- className: M("ff:w-full ff:max-w-sm", T),
3734
+ className: E("ff:w-full ff:max-w-sm", T),
3735
3735
  "data-slot": "auction-module",
3736
3736
  "data-stage": "settling",
3737
3737
  children: [
@@ -3764,7 +3764,7 @@ function tt({
3764
3764
  outcomeReason: p ?? "ended",
3765
3765
  participationType: "auction",
3766
3766
  onReenter: D,
3767
- isReentering: E,
3767
+ isReentering: V,
3768
3768
  className: T
3769
3769
  }
3770
3770
  ) : null;
@@ -3790,29 +3790,29 @@ function at({
3790
3790
  isReentering: C,
3791
3791
  className: l
3792
3792
  }) {
3793
- const { t: h } = K(), p = je(e ?? oo), D = s.useMemo(
3793
+ const { t: h } = K(), p = ze(e ?? oo), D = s.useMemo(
3794
3794
  () => g ?? (p.drawTime ? new Date(p.drawTime) : void 0),
3795
3795
  [g, p.drawTime]
3796
- ), E = s.useMemo(() => {
3796
+ ), V = s.useMemo(() => {
3797
3797
  if (x)
3798
3798
  return x instanceof Date ? x : new Date(x);
3799
3799
  }, [x]), T = we(), b = () => {
3800
3800
  v ? v() : m && window.open(m, "_blank", "noopener,noreferrer");
3801
3801
  };
3802
- return a === "enterable" ? /* @__PURE__ */ t(U.div, { ...T, children: /* @__PURE__ */ u(Y, { className: M("ff:w-full ff:max-w-sm", l), "data-slot": "draw-module", "data-stage": "enterable", children: [
3802
+ return a === "enterable" ? /* @__PURE__ */ t(U.div, { ...T, children: /* @__PURE__ */ u(Y, { className: E("ff:w-full ff:max-w-sm", l), "data-slot": "draw-module", "data-stage": "enterable", children: [
3803
3803
  /* @__PURE__ */ t(G, { variant: "default", label: h("draw.title") }),
3804
3804
  /* @__PURE__ */ u(Z, { children: [
3805
3805
  D && /* @__PURE__ */ u("div", { className: "ff:flex ff:flex-col ff:items-start ff:gap-1", children: [
3806
3806
  /* @__PURE__ */ t("span", { className: "ff:text-xxs ff:font-medium ff:uppercase ff:tracking-widest ff:text-muted", children: h("draw.drawClosesIn") }),
3807
3807
  /* @__PURE__ */ t(pe, { targetDate: D, showDays: !1 })
3808
3808
  ] }),
3809
- r && /* @__PURE__ */ t(z, { className: "ff:mt-auto ff:w-full", onClick: o, disabled: f, loading: f, children: h("draw.enter") })
3809
+ r && /* @__PURE__ */ t(j, { className: "ff:mt-auto ff:w-full", onClick: o, disabled: f, loading: f, children: h("draw.enter") })
3810
3810
  ] }),
3811
3811
  /* @__PURE__ */ t(H, {})
3812
3812
  ] }) }) : a === "participating" ? /* @__PURE__ */ t(U.div, { ...T, children: /* @__PURE__ */ u(
3813
3813
  Y,
3814
3814
  {
3815
- className: M("ff:w-full ff:max-w-sm", l),
3815
+ className: E("ff:w-full ff:max-w-sm", l),
3816
3816
  "data-slot": "draw-module",
3817
3817
  "data-stage": "participating",
3818
3818
  children: [
@@ -3825,7 +3825,7 @@ function at({
3825
3825
  ] }) : null,
3826
3826
  /* @__PURE__ */ t(ie, { children: /* @__PURE__ */ t("p", { className: "ff:text-foreground/80", children: h(D ? "draw.goodLuck" : "draw.stayTuned") }) }),
3827
3827
  n && /* @__PURE__ */ t(
3828
- z,
3828
+ j,
3829
3829
  {
3830
3830
  className: "ff:mt-auto ff:w-full",
3831
3831
  variant: "outline",
@@ -3839,7 +3839,7 @@ function at({
3839
3839
  /* @__PURE__ */ t(H, {})
3840
3840
  ]
3841
3841
  }
3842
- ) }) : a === "settling" ? /* @__PURE__ */ t(U.div, { ...T, children: /* @__PURE__ */ u(Y, { className: M("ff:w-full ff:max-w-sm", l), "data-slot": "draw-module", "data-stage": "settling", children: [
3842
+ ) }) : a === "settling" ? /* @__PURE__ */ t(U.div, { ...T, children: /* @__PURE__ */ u(Y, { className: E("ff:w-full ff:max-w-sm", l), "data-slot": "draw-module", "data-stage": "settling", children: [
3843
3843
  /* @__PURE__ */ t(G, { variant: "default", label: h("draw.settlingTitle") }),
3844
3844
  /* @__PURE__ */ t(Z, { children: /* @__PURE__ */ t(ie, { children: /* @__PURE__ */ t("p", { className: "ff:text-foreground/80", children: h("draw.settlingDescription") }) }) }),
3845
3845
  /* @__PURE__ */ t(H, {})
@@ -3849,7 +3849,7 @@ function at({
3849
3849
  label: h("draw.wonTitle"),
3850
3850
  fallbackMessage: h("granted.description"),
3851
3851
  ctaLabel: h("granted.cta"),
3852
- expiresAt: E,
3852
+ expiresAt: V,
3853
3853
  onCtaClick: b,
3854
3854
  className: l
3855
3855
  }
@@ -3885,30 +3885,30 @@ function wt({
3885
3885
  isReentering: C,
3886
3886
  className: l
3887
3887
  }) {
3888
- const { t: h } = K(), p = je(e ?? fo), D = s.useMemo(() => {
3888
+ const { t: h } = K(), p = ze(e ?? fo), D = s.useMemo(() => {
3889
3889
  if (x)
3890
3890
  return x instanceof Date ? x : new Date(x);
3891
- }, [x]), E = we(), T = () => {
3891
+ }, [x]), V = we(), T = () => {
3892
3892
  v ? v() : m && window.open(m, "_blank", "noopener,noreferrer");
3893
3893
  };
3894
3894
  if (a === "enterable")
3895
- return /* @__PURE__ */ t(U.div, { ...E, children: /* @__PURE__ */ u(Y, { className: M("ff:w-full ff:max-w-sm", l), "data-slot": "queue-module", "data-stage": "enterable", children: [
3895
+ return /* @__PURE__ */ t(U.div, { ...V, children: /* @__PURE__ */ u(Y, { className: E("ff:w-full ff:max-w-sm", l), "data-slot": "queue-module", "data-stage": "enterable", children: [
3896
3896
  /* @__PURE__ */ t(G, { variant: "default", label: h("queue.openingSoon") }),
3897
3897
  /* @__PURE__ */ u(Z, { children: [
3898
3898
  g && /* @__PURE__ */ u("div", { className: "ff:flex ff:flex-col ff:items-start ff:gap-1", children: [
3899
3899
  /* @__PURE__ */ t("span", { className: "ff:text-xxs ff:font-medium ff:uppercase ff:tracking-widest ff:text-muted", children: h("queue.queueClosesIn") }),
3900
3900
  /* @__PURE__ */ t(pe, { targetDate: g, showDays: !1 })
3901
3901
  ] }),
3902
- r && /* @__PURE__ */ t(z, { className: "ff:mt-auto ff:w-full", onClick: o, disabled: f, loading: f, children: h("queue.enter") })
3902
+ r && /* @__PURE__ */ t(j, { className: "ff:mt-auto ff:w-full", onClick: o, disabled: f, loading: f, children: h("queue.enter") })
3903
3903
  ] }),
3904
3904
  /* @__PURE__ */ t(H, {})
3905
3905
  ] }) });
3906
3906
  if (a === "participating") {
3907
- const b = p.estimatedWaitTime, N = b != null ? Math.ceil(b / 60) : null, S = (O) => O < 1 ? h("queue.waitLessThanMinute") : O === 1 ? h("queue.waitOneMinute") : h("queue.waitMinutes", { values: { count: O } }), V = b != null ? Dr(b) : null, A = V ? h(Vr(V)) : null, I = N !== null ? S(N) : "...";
3908
- return /* @__PURE__ */ t(U.div, { ...E, children: /* @__PURE__ */ u(
3907
+ const b = p.estimatedWaitTime, N = b != null ? Math.ceil(b / 60) : null, S = (O) => O < 1 ? h("queue.waitLessThanMinute") : O === 1 ? h("queue.waitOneMinute") : h("queue.waitMinutes", { values: { count: O } }), M = b != null ? Dr(b) : null, A = M ? h(Vr(M)) : null, I = N !== null ? S(N) : "...";
3908
+ return /* @__PURE__ */ t(U.div, { ...V, children: /* @__PURE__ */ u(
3909
3909
  Y,
3910
3910
  {
3911
- className: M("ff:w-full ff:max-w-sm", l),
3911
+ className: E("ff:w-full ff:max-w-sm", l),
3912
3912
  "data-slot": "queue-module",
3913
3913
  "data-stage": "participating",
3914
3914
  children: [
@@ -3921,7 +3921,7 @@ function wt({
3921
3921
  ] }),
3922
3922
  /* @__PURE__ */ t(ie, { children: /* @__PURE__ */ t("p", { className: "ff:text-muted ff:text-xs", children: h("queue.qualitativeReassurance") }) }),
3923
3923
  n && /* @__PURE__ */ t(
3924
- z,
3924
+ j,
3925
3925
  {
3926
3926
  className: "ff:mt-auto ff:w-full",
3927
3927
  variant: "outline",
@@ -3980,7 +3980,7 @@ function vt({
3980
3980
  isReentering: l,
3981
3981
  className: h
3982
3982
  }) {
3983
- const { t: p } = K(), D = je(e ?? io), E = s.useMemo(() => {
3983
+ const { t: p } = K(), D = ze(e ?? io), V = s.useMemo(() => {
3984
3984
  if (w)
3985
3985
  return w instanceof Date ? w : new Date(w);
3986
3986
  }, [w]), T = x ?? D.checkoutUrl, b = we(), N = () => {
@@ -3989,7 +3989,7 @@ function vt({
3989
3989
  return a === "enterable" ? /* @__PURE__ */ t(U.div, { ...b, children: /* @__PURE__ */ u(
3990
3990
  Y,
3991
3991
  {
3992
- className: M("ff:w-full ff:max-w-sm", h),
3992
+ className: E("ff:w-full ff:max-w-sm", h),
3993
3993
  "data-slot": "timed-release-module",
3994
3994
  "data-stage": "enterable",
3995
3995
  children: [
@@ -4000,7 +4000,7 @@ function vt({
4000
4000
  /* @__PURE__ */ t(pe, { targetDate: d, showDays: !1 })
4001
4001
  ] }),
4002
4002
  /* @__PURE__ */ t(ie, { children: /* @__PURE__ */ t("p", { className: "ff:text-foreground/80", children: p("timedRelease.description") }) }),
4003
- r && /* @__PURE__ */ t(z, { className: "ff:mt-auto ff:w-full", onClick: o, disabled: c, loading: c, children: p("timedRelease.enter") })
4003
+ r && /* @__PURE__ */ t(j, { className: "ff:mt-auto ff:w-full", onClick: o, disabled: c, loading: c, children: p("timedRelease.enter") })
4004
4004
  ] }),
4005
4005
  /* @__PURE__ */ t(H, {})
4006
4006
  ]
@@ -4008,7 +4008,7 @@ function vt({
4008
4008
  ) }) : a === "participating" ? /* @__PURE__ */ t(U.div, { ...b, children: /* @__PURE__ */ u(
4009
4009
  Y,
4010
4010
  {
4011
- className: M("ff:w-full ff:max-w-sm", h),
4011
+ className: E("ff:w-full ff:max-w-sm", h),
4012
4012
  "data-slot": "timed-release-module",
4013
4013
  "data-stage": "participating",
4014
4014
  children: [
@@ -4020,9 +4020,9 @@ function vt({
4020
4020
  ] }),
4021
4021
  /* @__PURE__ */ t(ie, { children: /* @__PURE__ */ t("p", { className: "ff:text-foreground/80", children: p("timedRelease.browseAndComplete") }) }),
4022
4022
  /* @__PURE__ */ u("div", { className: "ff:mt-auto ff:flex ff:flex-col ff:gap-2", children: [
4023
- T && /* @__PURE__ */ t(z, { className: "ff:w-full", onClick: N, children: p("timedRelease.shop") }),
4023
+ T && /* @__PURE__ */ t(j, { className: "ff:w-full", onClick: N, children: p("timedRelease.shop") }),
4024
4024
  f && /* @__PURE__ */ t(
4025
- z,
4025
+ j,
4026
4026
  {
4027
4027
  className: "ff:w-full",
4028
4028
  variant: T ? "secondary" : "primary",
@@ -4031,7 +4031,7 @@ function vt({
4031
4031
  }
4032
4032
  ),
4033
4033
  n && /* @__PURE__ */ t(
4034
- z,
4034
+ j,
4035
4035
  {
4036
4036
  className: "ff:w-full",
4037
4037
  variant: "outline",
@@ -4052,7 +4052,7 @@ function vt({
4052
4052
  label: p("timedRelease.granted"),
4053
4053
  fallbackMessage: p("granted.description"),
4054
4054
  ctaLabel: p("granted.cta"),
4055
- expiresAt: E,
4055
+ expiresAt: V,
4056
4056
  onCtaClick: N,
4057
4057
  className: h
4058
4058
  }
@@ -4080,7 +4080,7 @@ function Ga({
4080
4080
  className: g
4081
4081
  }) {
4082
4082
  const { t: d } = K(), x = e ?? d("upcoming.title"), m = a ?? d("upcoming.description"), v = s.useMemo(() => r ? r instanceof Date ? r : new Date(r) : null, [r]), w = we();
4083
- return /* @__PURE__ */ t(U.div, { ...w, children: /* @__PURE__ */ u(Y, { className: M("ff:w-full ff:max-w-sm", g), "data-slot": "upcoming-module", children: [
4083
+ return /* @__PURE__ */ t(U.div, { ...w, children: /* @__PURE__ */ u(Y, { className: E("ff:w-full ff:max-w-sm", g), "data-slot": "upcoming-module", children: [
4084
4084
  /* @__PURE__ */ t(G, { variant: "secondary", label: x }),
4085
4085
  /* @__PURE__ */ u(Z, { children: [
4086
4086
  v && /* @__PURE__ */ u("div", { className: "ff:flex ff:flex-col ff:items-start ff:gap-1", children: [
@@ -4095,7 +4095,7 @@ function Ga({
4095
4095
  )
4096
4096
  ] }),
4097
4097
  /* @__PURE__ */ t(ie, { children: /* @__PURE__ */ t("p", { className: "ff:text-foreground/80", children: m }) }),
4098
- o && i && /* @__PURE__ */ t(z, { className: "ff:mt-auto ff:w-full", onClick: i, disabled: c, loading: c, children: f ?? d("waitlist.enter") })
4098
+ o && i && /* @__PURE__ */ t(j, { className: "ff:mt-auto ff:w-full", onClick: i, disabled: c, loading: c, children: f ?? d("waitlist.enter") })
4099
4099
  ] }),
4100
4100
  /* @__PURE__ */ t(H, {})
4101
4101
  ] }) });
@@ -4161,10 +4161,10 @@ function It({ message: e, className: a }) {
4161
4161
  role: "status",
4162
4162
  "aria-live": "polite",
4163
4163
  "aria-busy": "true",
4164
- className: M("ff:flex ff:flex-col ff:items-center ff:justify-center ff:py-12", a),
4164
+ className: E("ff:flex ff:flex-col ff:items-center ff:justify-center ff:py-12", a),
4165
4165
  children: [
4166
- /* @__PURE__ */ t("div", { className: M(co({ styleVariant: r })), children: /* @__PURE__ */ t(Te, { size: o }) }),
4167
- e && /* @__PURE__ */ t("p", { className: M(uo({ styleVariant: r })), children: e })
4166
+ /* @__PURE__ */ t("div", { className: E(co({ styleVariant: r })), children: /* @__PURE__ */ t(Te, { size: o }) }),
4167
+ e && /* @__PURE__ */ t("p", { className: E(uo({ styleVariant: r })), children: e })
4168
4168
  ]
4169
4169
  }
4170
4170
  );
@@ -4183,7 +4183,7 @@ function Ja({
4183
4183
  className: d
4184
4184
  }) {
4185
4185
  const { t: x } = K(), m = we();
4186
- return /* @__PURE__ */ t(U.div, { ...m, children: /* @__PURE__ */ u(Y, { className: M("fanfare-start-view", d), "data-slot": "start-view", children: [
4186
+ return /* @__PURE__ */ t(U.div, { ...m, children: /* @__PURE__ */ u(Y, { className: E("fanfare-start-view", d), "data-slot": "start-view", children: [
4187
4187
  /* @__PURE__ */ t(
4188
4188
  G,
4189
4189
  {
@@ -4199,7 +4199,7 @@ function Ja({
4199
4199
  /* @__PURE__ */ t(pe, { targetDate: o, showDays: !1 })
4200
4200
  ] }) : null,
4201
4201
  i ? /* @__PURE__ */ t(ie, { children: i }) : null,
4202
- /* @__PURE__ */ t(z, { className: "ff:mt-auto ff:w-full", onClick: c, disabled: g, loading: g, children: f ?? x("start.cta") })
4202
+ /* @__PURE__ */ t(j, { className: "ff:mt-auto ff:w-full", onClick: c, disabled: g, loading: g, children: f ?? x("start.cta") })
4203
4203
  ] }),
4204
4204
  /* @__PURE__ */ t(H, {})
4205
4205
  ] }) });
@@ -4215,7 +4215,7 @@ function Qa({
4215
4215
  className: f
4216
4216
  }) {
4217
4217
  const { t: c } = K(), g = e ?? c("waitlist.enteredTitle"), d = a ?? c("waitlist.enteredDescription"), x = c("time.opensIn"), m = s.useMemo(() => r ? r instanceof Date ? r : new Date(r) : null, [r]), v = we();
4218
- return /* @__PURE__ */ t(U.div, { ...v, children: /* @__PURE__ */ u(Y, { className: M("fanfare-waitlist-view", f), "data-slot": "waitlist-view", children: [
4218
+ return /* @__PURE__ */ t(U.div, { ...v, children: /* @__PURE__ */ u(Y, { className: E("fanfare-waitlist-view", f), "data-slot": "waitlist-view", children: [
4219
4219
  /* @__PURE__ */ t(G, { variant: "success", title: g, description: d }),
4220
4220
  /* @__PURE__ */ u(Z, { children: [
4221
4221
  m && /* @__PURE__ */ u(ie, { children: [
@@ -4230,7 +4230,7 @@ function Qa({
4230
4230
  )
4231
4231
  ] }),
4232
4232
  o && /* @__PURE__ */ t(
4233
- z,
4233
+ j,
4234
4234
  {
4235
4235
  className: "ff:mt-auto ff:w-full",
4236
4236
  variant: "outline",
@@ -4326,11 +4326,11 @@ function ko({
4326
4326
  onError: m,
4327
4327
  className: v
4328
4328
  }) {
4329
- const w = Nt(), { t: y } = K(), C = B((k, _) => y(k, _), [y]), { journey: l, view: h, snapshot: p, fanfareError: D, start: E } = Sa(e, {
4329
+ const w = Nt(), { t: y } = K(), C = B((k, _) => y(k, _), [y]), { journey: l, view: h, snapshot: p, fanfareError: D, start: V } = Sa(e, {
4330
4330
  autoStart: a,
4331
4331
  accessCode: r,
4332
4332
  autoEnterWaitlist: n
4333
- }), [T, b] = s.useState(!1), [N, S] = s.useState(!1), [V, A] = s.useState(!1), [I, O] = s.useState(!1), [$, fe] = s.useState(!1), [ce, L] = s.useState(null), [J, ne] = s.useState(!1), [se, de] = s.useState(!1), [ee, P] = s.useState(!1), ae = h?.journeyStage ?? null, me = h?.journeyStage === "routed" ? h : void 0, ke = me?.offers.some((k) => k.gates.some((_) => _.type === "access_code")) ?? !1, Re = h?.journeyStage === "routed" ? ke || J : h?.journeyStage === "routing" && J, ue = St(p), q = ue?.phase ?? me?.sequence.phase ?? null, _e = ce, Ne = _e ? ra(_e, C) : null, st = p?.experience?.experience?.theme, Ue = o ?? st, lt = i ?? o?.variant ?? st?.variant, xe = X(() => p ? xa(p) : [], [p]);
4333
+ }), [T, b] = s.useState(!1), [N, S] = s.useState(!1), [M, A] = s.useState(!1), [I, O] = s.useState(!1), [$, fe] = s.useState(!1), [ce, L] = s.useState(null), [J, ne] = s.useState(!1), [se, de] = s.useState(!1), [ee, P] = s.useState(!1), ae = h?.journeyStage ?? null, me = h?.journeyStage === "routed" ? h : void 0, ke = me?.offers.some((k) => k.gates.some((_) => _.type === "access_code")) ?? !1, Re = h?.journeyStage === "routed" ? ke || J : h?.journeyStage === "routing" && J, ue = St(p), q = ue?.phase ?? me?.sequence.phase ?? null, _e = ce, Ne = _e ? ra(_e, C) : null, st = p?.experience?.experience?.theme, Ue = o ?? st, lt = i ?? o?.variant ?? st?.variant, xe = X(() => p ? xa(p) : [], [p]);
4334
4334
  s.useEffect(() => {
4335
4335
  p && d && d(p);
4336
4336
  }, [p, d]), s.useEffect(() => {
@@ -4346,7 +4346,7 @@ function ko({
4346
4346
  L(_);
4347
4347
  },
4348
4348
  [l, m]
4349
- ), ze = B(
4349
+ ), je = B(
4350
4350
  (k) => {
4351
4351
  const _ = mt(k), R = ra(_, C);
4352
4352
  throw R.disposition === "INLINE" || R.disposition === "STEP_RESET" ? m?.(_) : F(_), new Error(R.description);
@@ -4363,21 +4363,21 @@ function ko({
4363
4363
  const Le = B(async () => {
4364
4364
  b(!0), L(null);
4365
4365
  try {
4366
- await E();
4366
+ await V();
4367
4367
  } catch {
4368
4368
  } finally {
4369
4369
  b(!1);
4370
4370
  }
4371
- }, [E]), [Ae, He] = s.useState(null), ct = B(
4371
+ }, [V]), [Ae, He] = s.useState(null), ct = B(
4372
4372
  async (k, _) => {
4373
4373
  L(null);
4374
4374
  try {
4375
4375
  _ === "email" ? await w.auth.requestOtp({ email: k }) : await w.auth.requestOtp({ phone: k }), He({ value: k, type: _ });
4376
4376
  } catch (R) {
4377
- ze(R);
4377
+ je(R);
4378
4378
  }
4379
4379
  },
4380
- [ze, w]
4380
+ [je, w]
4381
4381
  ), dt = B(
4382
4382
  async (k) => {
4383
4383
  if (!l || !Ae) return;
@@ -4385,7 +4385,7 @@ function ko({
4385
4385
  try {
4386
4386
  Ae.type === "email" ? await w.auth.verifyOtp({ email: Ae.value, code: k }) : await w.auth.verifyOtp({ phone: Ae.value, code: k });
4387
4387
  } catch (R) {
4388
- ze(R);
4388
+ je(R);
4389
4389
  }
4390
4390
  He(null);
4391
4391
  const _ = l.view$.get();
@@ -4396,7 +4396,7 @@ function ko({
4396
4396
  F(R);
4397
4397
  }
4398
4398
  },
4399
- [ze, F, w, l, Ae]
4399
+ [je, F, w, l, Ae]
4400
4400
  ), Ke = B(
4401
4401
  async (k) => {
4402
4402
  if (l) {
@@ -4575,7 +4575,7 @@ function ko({
4575
4575
  L(null);
4576
4576
  const k = l.view$.get();
4577
4577
  k.journeyStage === "gated" && k.retry().catch(F);
4578
- }, [F, l]), j = X(() => h?.journeyStage === "routed" && "sequence" in h ? h.sequence : void 0, [h]), Ge = X(() => j?.phase === "scheduled" ? j.waitlist : void 0, [j]), Ce = vo(p, j), oe = bo(p), nr = xo(p), Jt = yo(nr, oe?.id), Ie = ue && "grant" in ue && ue.grant ? ue.grant : void 0, Je = ue && "outcome" in ue && ue.outcome ? ue.outcome : void 0;
4578
+ }, [F, l]), z = X(() => h?.journeyStage === "routed" && "sequence" in h ? h.sequence : void 0, [h]), Ge = X(() => z?.phase === "scheduled" ? z.waitlist : void 0, [z]), Ce = vo(p, z), oe = bo(p), nr = xo(p), Jt = yo(nr, oe?.id), Ie = ue && "grant" in ue && ue.grant ? ue.grant : void 0, Je = ue && "outcome" in ue && ue.outcome ? ue.outcome : void 0;
4579
4579
  s.useEffect(() => {
4580
4580
  Ie?.token && x && x(Ie.token);
4581
4581
  }, [Ie?.token, x]);
@@ -4590,10 +4590,10 @@ function ko({
4590
4590
  }, [ae, xe]), ut = X(() => {
4591
4591
  if (ae === "routing") return y("experience.findingPlace");
4592
4592
  }, [ae, y]), Be = X(() => {
4593
- if (!(!l || q !== "participating" || !j || j.phase !== "participating" || !("display$" in j)))
4594
- return j.display$;
4595
- }, [l, q, j]), pt = je(Be ?? po), ea = X(() => {
4596
- const k = oe?.details?.type === "auction" ? oe.details : void 0, _ = j?.phase === "participating" && j.mechanism === "auction" ? j.consumer : void 0, R = pt;
4593
+ if (!(!l || q !== "participating" || !z || z.phase !== "participating" || !("display$" in z)))
4594
+ return z.display$;
4595
+ }, [l, q, z]), pt = ze(Be ?? po), ea = X(() => {
4596
+ const k = oe?.details?.type === "auction" ? oe.details : void 0, _ = z?.phase === "participating" && z.mechanism === "auction" ? z.consumer : void 0, R = pt;
4597
4597
  if (!(!k && !_ && !R))
4598
4598
  return {
4599
4599
  currentBid: R?.currentBid ?? _?.currentBid,
@@ -4605,12 +4605,12 @@ function ko({
4605
4605
  minNextBid: R?.minNextBid ?? k?.minNextBid,
4606
4606
  bidIncrement: R?.bidIncrement ?? k?.bidIncrement
4607
4607
  };
4608
- }, [pt, j, oe?.details]), Oe = X(() => j?.phase === "scheduled" && j.startsAt ? new Date(j.startsAt) : oe?.opensAt ? new Date(oe.opensAt) : void 0, [j, oe?.opensAt]), fr = X(() => {
4608
+ }, [pt, z, oe?.details]), Oe = X(() => z?.phase === "scheduled" && z.startsAt ? new Date(z.startsAt) : oe?.opensAt ? new Date(oe.opensAt) : void 0, [z, oe?.opensAt]), fr = X(() => {
4609
4609
  if (!(q !== "participating" || Ct !== "queue"))
4610
4610
  return pt?.position;
4611
4611
  }, [pt, Ct, q]);
4612
4612
  if (c)
4613
- return /* @__PURE__ */ t(Rt, { theme: Ue, variant: lt, children: /* @__PURE__ */ t("div", { className: M("fanfare-experience-widget", v), "data-slot": "experience-widget", children: c({
4613
+ return /* @__PURE__ */ t(Rt, { theme: Ue, variant: lt, children: /* @__PURE__ */ t("div", { className: E("fanfare-experience-widget", v), "data-slot": "experience-widget", children: c({
4614
4614
  journey: l,
4615
4615
  view: h,
4616
4616
  snapshot: p,
@@ -4650,7 +4650,7 @@ function ko({
4650
4650
  onVerifyToken: Yt,
4651
4651
  onRetry: Gt
4652
4652
  }) : /* @__PURE__ */ t(
4653
- za,
4653
+ ja,
4654
4654
  {
4655
4655
  challenge: _,
4656
4656
  botMitigation: R,
@@ -4664,15 +4664,15 @@ function ko({
4664
4664
  if (q === "unavailable")
4665
4665
  return f?.ended ? f.ended({
4666
4666
  ...le,
4667
- reason: j?.phase === "unavailable" ? j.reason ?? "unavailable" : "unavailable"
4667
+ reason: z?.phase === "unavailable" ? z.reason ?? "unavailable" : "unavailable"
4668
4668
  }) : /* @__PURE__ */ t(Fa, { title: y("experience.noSequenceTitle"), message: y("experience.noSequenceMessage") });
4669
4669
  if (q === "scheduled")
4670
4670
  return Ge && Ge.status !== "not_waitlisted" ? f?.waitlist ? f.waitlist({
4671
4671
  ...le,
4672
4672
  startsAt: Oe,
4673
4673
  onLeave: Pe,
4674
- isLeaving: V
4675
- }) : /* @__PURE__ */ t(Qa, { startsAt: Oe, onLeave: Pe, isLeaving: V }) : f?.upcoming ? f.upcoming({
4674
+ isLeaving: M
4675
+ }) : /* @__PURE__ */ t(Qa, { startsAt: Oe, onLeave: Pe, isLeaving: M }) : f?.upcoming ? f.upcoming({
4676
4676
  ...le,
4677
4677
  startsAt: Oe,
4678
4678
  canEnter: Xt,
@@ -4688,18 +4688,18 @@ function ko({
4688
4688
  }
4689
4689
  );
4690
4690
  if (q === "enterable" || q === "participating") {
4691
- const k = q === "enterable" ? or : Ct, _ = q === "participating" ? Jt : oe?.id, R = j?.phase === "enterable" && "enter" in j && typeof j.enter == "function", ye = j?.phase === "participating" && "leave" in j;
4692
- if (q === "enterable" && f?.enterable && mo(j))
4691
+ const k = q === "enterable" ? or : Ct, _ = q === "participating" ? Jt : oe?.id, R = z?.phase === "enterable" && "enter" in z && typeof z.enter == "function", ye = z?.phase === "participating" && "leave" in z;
4692
+ if (q === "enterable" && f?.enterable && mo(z))
4693
4693
  return f.enterable({
4694
4694
  ...le,
4695
- sequence: j,
4696
- participationType: j.mechanism
4695
+ sequence: z,
4696
+ participationType: z.mechanism
4697
4697
  });
4698
- if (q === "participating" && f?.participating && ho(j))
4698
+ if (q === "participating" && f?.participating && ho(z))
4699
4699
  return f.participating({
4700
4700
  ...le,
4701
- sequence: j,
4702
- participationType: j.mechanism,
4701
+ sequence: z,
4702
+ participationType: z.mechanism,
4703
4703
  position: fr
4704
4704
  });
4705
4705
  const he = oe?.details;
@@ -4806,10 +4806,10 @@ function ko({
4806
4806
  return /* @__PURE__ */ t(et, { error: y("experience.unsupportedDistribution"), onRetry: Ye });
4807
4807
  }
4808
4808
  if (q === "settling") {
4809
- if (j?.phase !== "settling")
4809
+ if (z?.phase !== "settling")
4810
4810
  return /* @__PURE__ */ t(It, { message: ut });
4811
4811
  const k = oe?.details;
4812
- switch (j.mechanism) {
4812
+ switch (z.mechanism) {
4813
4813
  case "draw": {
4814
4814
  const _ = k?.type === "draw" ? k : void 0;
4815
4815
  return /* @__PURE__ */ t(
@@ -4852,10 +4852,10 @@ function ko({
4852
4852
  }
4853
4853
  if (q === "granted") {
4854
4854
  const k = Ie?.expiresAt ? new Date(Ie.expiresAt).getTime() : void 0;
4855
- if (f?.granted && wo(j))
4855
+ if (f?.granted && wo(z))
4856
4856
  return f.granted({
4857
4857
  ...le,
4858
- sequence: j,
4858
+ sequence: z,
4859
4859
  grant: Ie?.token,
4860
4860
  expiresAt: k
4861
4861
  });
@@ -4884,7 +4884,7 @@ function ko({
4884
4884
  return /* @__PURE__ */ t(et, { error: y("experience.unsupportedDistribution"), onRetry: Ye });
4885
4885
  }
4886
4886
  if (q === "ended") {
4887
- const k = Je?.type ?? (j?.phase === "ended" ? j.outcome.reason : void 0) ?? "unknown";
4887
+ const k = Je?.type ?? (z?.phase === "ended" ? z.outcome.reason : void 0) ?? "unknown";
4888
4888
  if (k === "expired" && f?.expired) {
4889
4889
  const R = Je?.at ? new Date(Je.at) : void 0;
4890
4890
  return f.expired({
@@ -4939,7 +4939,7 @@ function ko({
4939
4939
  }
4940
4940
  return f?.loading ? f.loading({ ...le, message: ut }) : /* @__PURE__ */ t(It, { message: ut });
4941
4941
  }, sr = `${ae ?? "loading"}-${q ?? "unavailable"}`;
4942
- return /* @__PURE__ */ t(Rt, { theme: Ue, variant: lt, children: /* @__PURE__ */ u("div", { className: M("fanfare-experience-widget", v), "data-slot": "experience-widget", children: [
4942
+ return /* @__PURE__ */ t(Rt, { theme: Ue, variant: lt, children: /* @__PURE__ */ u("div", { className: E("fanfare-experience-widget", v), "data-slot": "experience-widget", children: [
4943
4943
  /* @__PURE__ */ t(rt, { transitionKey: sr, children: ir() }),
4944
4944
  Re ? /* @__PURE__ */ t(
4945
4945
  Xa,
@@ -4990,18 +4990,18 @@ function So({
4990
4990
  }
4991
4991
  So.displayName = "ShadowDOMPreview";
4992
4992
  export {
4993
- ja as AccessCodeForm,
4993
+ za as AccessCodeForm,
4994
4994
  tt as AuctionModule,
4995
4995
  Aa as AuthForm,
4996
4996
  Ea as AuthInput,
4997
- z as Button,
4997
+ j as Button,
4998
4998
  Ta as Card,
4999
4999
  dn as CardContent,
5000
5000
  cn as CardDescription,
5001
5001
  un as CardFooter,
5002
5002
  sn as CardHeader,
5003
5003
  ln as CardTitle,
5004
- za as ChallengeGate,
5004
+ ja as ChallengeGate,
5005
5005
  at as DrawModule,
5006
5006
  Fa as EndedModule,
5007
5007
  et as ErrorView,
@@ -5038,6 +5038,6 @@ export {
5038
5038
  Nt as useFanfare,
5039
5039
  qo as useFanfareAuth,
5040
5040
  Wo as useJourneySnapshot,
5041
- je as useNanostore,
5041
+ ze as useNanostore,
5042
5042
  K as useTranslations
5043
5043
  };