@alfadocs/ui-kit-debug 1.85.0 → 1.86.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.
@@ -1,6 +1,6 @@
1
1
  import { jsx as n, jsxs as S, Fragment as ie } from "react/jsx-runtime";
2
2
  import { forwardRef as Cn, useId as at, useRef as M, useCallback as ke, useState as H, useEffect as q, useMemo as $, Fragment as ns, useLayoutEffect as an, useImperativeHandle as ss } from "react";
3
- import { c as Dt } from "./index-D2ZczOXr.js";
3
+ import { c as At } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as Z, Trans as Tn } from "react-i18next";
5
5
  import { u as rs } from "./registry-DvAUVLHh.js";
6
6
  import { A as oe } from "./alert-9kEwDza3.js";
@@ -14,7 +14,7 @@ import { E as ds } from "./email-input-C7THAwh2.js";
14
14
  import { F as Ke } from "./form-field-CyHfOVKF.js";
15
15
  import { P as ls } from "./phone-input-DJ4BN8tG.js";
16
16
  import { T as us } from "./text-area-COMVJ1yE.js";
17
- import { T as zt } from "./text-input-CaG9ApoE.js";
17
+ import { T as qt } from "./text-input-CaG9ApoE.js";
18
18
  import { A as ms } from "./address-fields-CfnXK8RT.js";
19
19
  import { S as An } from "./spinner-CoflYlEx.js";
20
20
  import { a as Zt } from "./format-price-BcFBa-WP.js";
@@ -27,15 +27,15 @@ import { S as Xt } from "./select-4S-eYZUf.js";
27
27
  import { C as un } from "./combobox-CDPm_n0p.js";
28
28
  import { M as mn } from "./multi-select-i5MFRpXg.js";
29
29
  import { c as hs } from "./option-row-Dc7BrbK8.js";
30
- import { S as Wt } from "./skeleton-tTWJpvAq.js";
30
+ import { S as Jt } from "./skeleton-tTWJpvAq.js";
31
31
  import { E as Mn } from "./empty-state-DwJ5YNzz.js";
32
32
  import { S as vs } from "./stepper-accordion-DDTSOUHc.js";
33
33
  import { S as bs } from "./stepper-progress-D6H8wQiV.js";
34
34
  import { S as ys } from "./slot-grid-Bb13H9Rl.js";
35
35
  import { p as fe } from "./parseISO-DZZ5a-zK.js";
36
36
  import { C as ks } from "./chevron-down-DWE7GSq9.js";
37
- import { s as yt, f as Jt, d as yn } from "./format--x5jypvH.js";
38
- import { x as On, a as kt, b as sn, i as Ss, s as At, m as xs, y as Kt } from "./date-picker-variants-Dt6UbonG.js";
37
+ import { s as yt, f as Gt, d as yn } from "./format--x5jypvH.js";
38
+ import { x as On, a as kt, b as sn, i as Ss, s as Tt, m as xs, y as zt } from "./date-picker-variants-Dt6UbonG.js";
39
39
  import { s as Is } from "./subDays-DKISP2nE.js";
40
40
  import { C as Ns } from "./chevron-left-B8cOyH-V.js";
41
41
  import { C as ws } from "./chevron-right-I9AeSxH2.js";
@@ -291,16 +291,16 @@ function ir(e) {
291
291
  return [...t ? e.operatorsByService ? e.specialties.filter(
292
292
  (i) => e.services.some(
293
293
  (r) => {
294
- var a;
295
- return r.specialtyId === i.id && ((a = r.operatorIds) == null ? void 0 : a.includes(t));
294
+ var c;
295
+ return r.specialtyId === i.id && ((c = r.operatorIds) == null ? void 0 : c.includes(t));
296
296
  }
297
297
  )
298
298
  ) : e.specialties.filter((i) => {
299
299
  var r;
300
300
  return (r = i.operatorIds) == null ? void 0 : r.includes(t);
301
301
  }) : e.specialties].sort((i, r) => {
302
- const a = i.sequenceNumber ?? Number.POSITIVE_INFINITY, c = r.sequenceNumber ?? Number.POSITIVE_INFINITY;
303
- return a - c;
302
+ const c = i.sequenceNumber ?? Number.POSITIVE_INFINITY, a = r.sequenceNumber ?? Number.POSITIVE_INFINITY;
303
+ return c - a;
304
304
  });
305
305
  }
306
306
  function or(e) {
@@ -324,7 +324,7 @@ function ar(e) {
324
324
  return e.operators.filter(
325
325
  (i) => {
326
326
  var r;
327
- return (r = i.appointmentBookingReasonIds) == null ? void 0 : r.some((a) => s.includes(a));
327
+ return (r = i.appointmentBookingReasonIds) == null ? void 0 : r.some((c) => s.includes(c));
328
328
  }
329
329
  );
330
330
  if (t) {
@@ -332,18 +332,18 @@ function ar(e) {
332
332
  if (i.length > 0)
333
333
  return e.operators.filter(
334
334
  (r) => {
335
- var a;
336
- return (a = r.specialtyIds) == null ? void 0 : a.some((c) => i.includes(c));
335
+ var c;
336
+ return (c = r.specialtyIds) == null ? void 0 : c.some((a) => i.includes(a));
337
337
  }
338
338
  );
339
339
  }
340
340
  return [];
341
341
  }
342
342
  function cr(e, t) {
343
- const s = e.country === rr, i = !s || e.value.insuranceType !== void 0, a = (e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties) && i, c = et(e.value).length > 0, m = !a || c, p = Ue(e.value).length > 0, f = !m || p, v = t.operators, h = !!e.allowOperatorSelection && f && p && !e.lockedOperatorId && v.length > 1, d = f && p, I = (!d || e.value.date !== void 0) && e.value.date !== void 0, F = (!I || e.value.slotKey !== void 0) && e.value.slotKey !== void 0, N = p && v.length === 0;
343
+ const s = e.country === rr, i = !s || e.value.insuranceType !== void 0, c = (e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties) && i, a = et(e.value).length > 0, m = !c || a, p = Ue(e.value).length > 0, f = !m || p, v = t.operators, h = !!e.allowOperatorSelection && f && p && !e.lockedOperatorId && v.length > 1, d = f && p, I = (!d || e.value.date !== void 0) && e.value.date !== void 0, F = (!I || e.value.slotKey !== void 0) && e.value.slotKey !== void 0, N = p && v.length === 0;
344
344
  return {
345
345
  insurance: s,
346
- specialty: a,
346
+ specialty: c,
347
347
  service: m,
348
348
  operator: h,
349
349
  date: d,
@@ -389,12 +389,12 @@ function lr(e) {
389
389
  services: or(e),
390
390
  operators: ar(e)
391
391
  }, s = cr(e, t), { currentStep: i, visibleSteps: r } = dr(e, s);
392
- let a;
392
+ let c;
393
393
  if (e.value.date && e.value.slotKey) {
394
394
  const f = e.availableSlots[e.value.date];
395
- f && (a = f.find((v) => v.key === e.value.slotKey));
395
+ f && (c = f.find((v) => v.key === e.value.slotKey));
396
396
  }
397
- const c = Ue(e.value), l = c.length > 0 ? e.services.find((f) => f.id === c[0]) : void 0, m = et(e.value).length > 0, p = c.length > 0 && e.value.date !== void 0 && e.value.slotKey !== void 0 && (!s.insurance || e.value.insuranceType !== void 0) && (!s.specialty || m);
397
+ const a = Ue(e.value), l = a.length > 0 ? e.services.find((f) => f.id === a[0]) : void 0, m = et(e.value).length > 0, p = a.length > 0 && e.value.date !== void 0 && e.value.slotKey !== void 0 && (!s.insurance || e.value.insuranceType !== void 0) && (!s.specialty || m);
398
398
  return {
399
399
  gates: s,
400
400
  filtered: t,
@@ -403,7 +403,7 @@ function lr(e) {
403
403
  visibleSteps: r,
404
404
  isReadyToSubmit: p,
405
405
  durationMin: l == null ? void 0 : l.durationMin,
406
- selectedSlot: a
406
+ selectedSlot: c
407
407
  };
408
408
  }
409
409
  function En(e, t) {
@@ -521,10 +521,10 @@ function Vn(e, t) {
521
521
  function ur(e, t) {
522
522
  let s = e;
523
523
  if (t.lockedOperatorId && s.operatorId !== t.lockedOperatorId && (s = { ...s, operatorId: t.lockedOperatorId }), (t.useSpecialties === void 0 ? t.specialties.length > 0 : t.useSpecialties) && t.specialties.length === 1 && s.specialtyId === void 0 && s.specialtyIds === void 0 && (s = { ...s, specialtyId: t.specialties[0].id }), t.autoSelectSingleService) {
524
- const r = et(s), a = r.length > 0 ? t.services.filter(
525
- (c) => c.specialtyId && r.includes(c.specialtyId)
524
+ const r = et(s), c = r.length > 0 ? t.services.filter(
525
+ (a) => a.specialtyId && r.includes(a.specialtyId)
526
526
  ) : t.services;
527
- a.length === 1 && s.serviceId === void 0 && s.serviceIds === void 0 && (s = { ...s, serviceId: a[0].id }, s.operatorId === void 0 && s.operatorIds === void 0 && (s = { ...s, operatorId: Re }));
527
+ c.length === 1 && s.serviceId === void 0 && s.serviceIds === void 0 && (s = { ...s, serviceId: c[0].id }, s.operatorId === void 0 && s.operatorIds === void 0 && (s = { ...s, operatorId: Re }));
528
528
  }
529
529
  return s;
530
530
  }
@@ -550,11 +550,11 @@ function pr(e, t, s) {
550
550
  return cn.filter(
551
551
  (p) => s.includes(p) && r.has(p)
552
552
  );
553
- const a = [];
554
- r.has("email") && a.push("email");
555
- const c = mr(t), l = r.has("whatsapp");
556
- l && c && a.push("whatsapp"), !l && r.has("sms") && a.push("sms");
557
- const m = new Set(a);
553
+ const c = [];
554
+ r.has("email") && c.push("email");
555
+ const a = mr(t), l = r.has("whatsapp");
556
+ l && a && c.push("whatsapp"), !l && r.has("sms") && c.push("sms");
557
+ const m = new Set(c);
558
558
  return cn.filter((p) => m.has(p));
559
559
  }
560
560
  const fr = /https?:\/\/(?:(?![.,;:!?'»›]https?:\/\/)[^\s<>"\u060C\u061B\u061F\u06D4\u2000-\u206F\u3000-\u303F\uFF00-\uFFEF])+/gi, gr = /* @__PURE__ */ new Set([
@@ -602,16 +602,16 @@ function xr(e) {
602
602
  let s = 0;
603
603
  const i = (r) => {
604
604
  if (r === "") return;
605
- const a = t[t.length - 1];
606
- (a == null ? void 0 : a.kind) === "text" ? a.text += r : t.push({ kind: "text", text: r });
605
+ const c = t[t.length - 1];
606
+ (c == null ? void 0 : c.kind) === "text" ? c.text += r : t.push({ kind: "text", text: r });
607
607
  };
608
608
  for (const r of e.matchAll(fr)) {
609
- const a = r.index ?? 0, c = vr(kr(r[0]));
610
- Sr(c) && (i(e.slice(s, a)), t.push({ kind: "link", text: c, href: c }), s = a + c.length);
609
+ const c = r.index ?? 0, a = vr(kr(r[0]));
610
+ Sr(a) && (i(e.slice(s, c)), t.push({ kind: "link", text: a, href: a }), s = c + a.length);
611
611
  }
612
612
  return i(e.slice(s)), t;
613
613
  }
614
- const xn = 500, Ir = /^[A-Z0-9]{16}$/, Nr = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, In = 300, rn = "ds:rounded-[var(--radius-sm)] ds:underline ds:text-[var(--foreground)] ds:focus-visible:outline-solid ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]", jt = (e) => e && /^https?:\/\//i.test(e) ? e : void 0, wr = (e, t) => ({
614
+ const xn = 500, Ir = /^[A-Z0-9]{16}$/, Nr = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, In = 300, rn = "ds:rounded-[var(--radius-sm)] ds:underline ds:text-[var(--foreground)] ds:focus-visible:outline-solid ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]", Kt = (e) => e && /^https?:\/\//i.test(e) ? e : void 0, wr = (e, t) => ({
615
615
  street: (e == null ? void 0 : e.address.line1) ?? "",
616
616
  city: (e == null ? void 0 : e.address.city) ?? "",
617
617
  postcode: (e == null ? void 0 : e.address.postalCode) ?? "",
@@ -629,7 +629,7 @@ const xn = 500, Ir = /^[A-Z0-9]{16}$/, Nr = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, In = 3
629
629
  postalCode: e.postcode,
630
630
  country: e.country.toUpperCase()
631
631
  }
632
- }), Tr = Dt("ds:flex ds:flex-col ds:border", {
632
+ }), Tr = At("ds:flex ds:flex-col ds:border", {
633
633
  variants: {
634
634
  noticeStyle: {
635
635
  plain: "ds:gap-[var(--spacing-xs)] ds:rounded-[var(--radius-md)] ds:border-[var(--border)] ds:bg-[var(--muted)] ds:p-[var(--spacing-sm)]",
@@ -645,8 +645,8 @@ const xn = 500, Ir = /^[A-Z0-9]{16}$/, Nr = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, In = 3
645
645
  province: "billing.province"
646
646
  }, zn = /^\d{5}$/, Dr = (e) => {
647
647
  if (!e) return !1;
648
- const { line1: t, city: s, postalCode: i, country: r, state: a } = e.address;
649
- return !t.trim() || !s.trim() || !i.trim() || !r.trim() ? !1 : r.toUpperCase() !== "IT" ? !0 : !!a.trim() && zn.test(i.trim());
648
+ const { line1: t, city: s, postalCode: i, country: r, state: c } = e.address;
649
+ return !t.trim() || !s.trim() || !i.trim() || !r.trim() ? !1 : r.toUpperCase() !== "IT" ? !0 : !!c.trim() && zn.test(i.trim());
650
650
  }, Mr = (e, t) => {
651
651
  var s;
652
652
  return {
@@ -660,7 +660,7 @@ const xn = 500, Ir = /^[A-Z0-9]{16}$/, Nr = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, In = 3
660
660
  country: e.address.country.trim().toUpperCase()
661
661
  }
662
662
  };
663
- }, Ut = { state: "idle" }, Nn = [
663
+ }, jt = { state: "idle" }, Nn = [
664
664
  "firstName",
665
665
  "lastName",
666
666
  "email",
@@ -680,8 +680,8 @@ const xn = 500, Ir = /^[A-Z0-9]{16}$/, Nr = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, In = 3
680
680
  onSubmit: s,
681
681
  hideEmail: i = !1,
682
682
  emailOptional: r = !1,
683
- requireCodiceFiscale: a = !1,
684
- requireDateOfBirth: c = !1,
683
+ requireCodiceFiscale: c = !1,
684
+ requireDateOfBirth: a = !1,
685
685
  requireInsuranceNumber: l = !1,
686
686
  insuranceType: m,
687
687
  showNote: p = !1,
@@ -706,7 +706,7 @@ const xn = 500, Ir = /^[A-Z0-9]{16}$/, Nr = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, In = 3
706
706
  singleConfirmationChannel: L = !1,
707
707
  submitError: B
708
708
  }, D) => {
709
- var It, Nt, wt, Ct, Tt;
709
+ var xt, It, Nt, wt, Ct;
710
710
  const { t: k, i18n: Y } = Z("ui"), X = at(), _e = M(null), Le = ke(
711
711
  (o) => {
712
712
  _e.current = o, typeof D == "function" ? D(o) : D && (D.current = o);
@@ -722,10 +722,10 @@ const xn = 500, Ir = /^[A-Z0-9]{16}$/, Nr = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, In = 3
722
722
  for (const T of o ?? [])
723
723
  if (T.focus(), document.activeElement === T) return;
724
724
  }, [E]);
725
- const W = M(!1), [Q, Be] = H(!1), [tt, ge] = H(!1), te = R || Q, [me, Se] = H(Ut), [xe, Te] = H(Ut), [ce, Pe] = H({}), ee = ke(
725
+ const W = M(!1), [Q, Be] = H(!1), [tt, ge] = H(!1), te = R || Q, [me, Se] = H(jt), [xe, Te] = H(jt), [ce, Pe] = H({}), ee = ke(
726
726
  (o) => Pe((y) => ({ ...y, [o]: !0 })),
727
727
  []
728
- ), [le, Mt] = H(Or), Ve = M(null), nt = M(
728
+ ), [le, Dt] = H(Or), Ve = M(null), nt = M(
729
729
  null
730
730
  );
731
731
  q(
@@ -747,9 +747,9 @@ const xn = 500, Ir = /^[A-Z0-9]{16}$/, Nr = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, In = 3
747
747
  I
748
748
  ]) : void 0, [tn, He] = H(
749
749
  () => e.paymentAccepted ? Ae : void 0
750
- ), Ot = M(Ae), ct = !!(g && e.paymentAccepted && tn === Ae);
750
+ ), Mt = M(Ae), ct = !!(g && e.paymentAccepted && tn === Ae);
751
751
  q(() => {
752
- Ot.current !== Ae && (Ot.current = Ae, He(void 0), e.paymentAccepted !== void 0 && z({ paymentAccepted: g ? !1 : void 0 }));
752
+ Mt.current !== Ae && (Mt.current = Ae, He(void 0), e.paymentAccepted !== void 0 && z({ paymentAccepted: g ? !1 : void 0 }));
753
753
  }, [Ae, g, z, e.paymentAccepted]);
754
754
  const Ge = typeof (d == null ? void 0 : d.label) == "string" && d.label.trim() !== "", De = d && Ge ? JSON.stringify([
755
755
  d.label,
@@ -757,13 +757,13 @@ const xn = 500, Ir = /^[A-Z0-9]{16}$/, Nr = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, In = 3
757
757
  d.required
758
758
  ]) : void 0, [nn, ae] = H(
759
759
  () => e.practiceConsentAccepted ? De : void 0
760
- ), Et = M(De), ue = !!(De !== void 0 && e.practiceConsentAccepted && nn === De);
760
+ ), Ot = M(De), ue = !!(De !== void 0 && e.practiceConsentAccepted && nn === De);
761
761
  q(() => {
762
- Et.current !== De && (Et.current = De, ae(void 0), e.practiceConsentAccepted !== void 0 && z({ practiceConsentAccepted: void 0 }));
762
+ Ot.current !== De && (Ot.current = De, ae(void 0), e.practiceConsentAccepted !== void 0 && z({ practiceConsentAccepted: void 0 }));
763
763
  }, [De, z, e.practiceConsentAccepted]);
764
- const $e = g ? Zt(g.amountCents, g.currencyCode, Y.language) : "", Me = jt(I), he = F && !!g && !u, V = a, dt = (C || "it").toLowerCase(), st = !he || Dr(e.billing), rt = wr(e.billing, dt), de = rt.country === "it", Oe = M(null), Je = M(
764
+ const $e = g ? Zt(g.amountCents, g.currencyCode, Y.language) : "", Me = Kt(I), he = F && !!g && !u, V = c, dt = (C || "it").toLowerCase(), st = !he || Dr(e.billing), rt = wr(e.billing, dt), de = rt.country === "it", Oe = M(null), Je = M(
765
765
  null
766
- ), We = (It = e.billing) == null ? void 0 : It.address.line1.trim(), pe = ((wt = (Nt = e.billing) == null ? void 0 : Nt.address.line2) == null ? void 0 : wt.trim()) || null;
766
+ ), We = (xt = e.billing) == null ? void 0 : xt.address.line1.trim(), pe = ((Nt = (It = e.billing) == null ? void 0 : It.address.line2) == null ? void 0 : Nt.trim()) || null;
767
767
  q(() => {
768
768
  var o;
769
769
  We !== void 0 && pe ? Je.current = { street: We, line2: pe } : (We === void 0 || We === ((o = Je.current) == null ? void 0 : o.street)) && (Je.current = null);
@@ -774,7 +774,7 @@ const xn = 500, Ir = /^[A-Z0-9]{16}$/, Nr = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, In = 3
774
774
  // The one format the block itself checks: an Italian CAP.
775
775
  o === "postcode" && de && !zn.test(rt.postcode.trim()) ? k("inputs.postalCode.invalid") : void 0
776
776
  ) : k("booking.details.fieldRequired")
777
- ), Ft = ke(
777
+ ), Et = ke(
778
778
  () => Pe(
779
779
  (o) => o[G.province] ? o : {
780
780
  ...o,
@@ -830,11 +830,11 @@ const xn = 500, Ir = /^[A-Z0-9]{16}$/, Nr = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, In = 3
830
830
  q(() => {
831
831
  it.current = x, ut.current = O;
832
832
  }, [x, O]);
833
- const Rt = !!x, _t = !!O;
833
+ const Ft = !!x, Rt = !!O;
834
834
  q(() => {
835
835
  const o = e.codiceFiscale;
836
- if (!V || !Rt || !o) {
837
- Se(Ut);
836
+ if (!V || !Ft || !o) {
837
+ Se(jt);
838
838
  return;
839
839
  }
840
840
  if (!Ir.test(o)) {
@@ -866,12 +866,12 @@ const xn = 500, Ir = /^[A-Z0-9]{16}$/, Nr = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, In = 3
866
866
  }, In), () => {
867
867
  y = !1, Ve.current && clearTimeout(Ve.current);
868
868
  };
869
- }, [V, Rt, e.codiceFiscale, k]);
869
+ }, [V, Ft, e.codiceFiscale, k]);
870
870
  const Ze = l && m === "public";
871
871
  q(() => {
872
872
  const o = e.insuranceNumber;
873
- if (!Ze || !_t || !o) {
874
- Te(Ut);
873
+ if (!Ze || !Rt || !o) {
874
+ Te(jt);
875
875
  return;
876
876
  }
877
877
  Te({ state: "pending" }), nt.current && clearTimeout(nt.current), nt.current = setTimeout(() => {
@@ -887,7 +887,7 @@ const xn = 500, Ir = /^[A-Z0-9]{16}$/, Nr = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, In = 3
887
887
  })
888
888
  );
889
889
  }, In);
890
- }, [Ze, _t, e.insuranceNumber, k]);
890
+ }, [Ze, Rt, e.insuranceNumber, k]);
891
891
  const mt = $(() => {
892
892
  var y;
893
893
  if (i) return !0;
@@ -896,9 +896,9 @@ const xn = 500, Ir = /^[A-Z0-9]{16}$/, Nr = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, In = 3
896
896
  }, [i, r, lt, e.email]), pt = $(
897
897
  () => !!(e.mobilePhone && e.mobilePhone.length >= 6),
898
898
  [e.mobilePhone]
899
- ), Lt = $(() => {
899
+ ), _t = $(() => {
900
900
  var o, y;
901
- return !(!((o = e.firstName) != null && o.trim()) || !((y = e.lastName) != null && y.trim()) || !mt || !pt || V && (me.state !== "valid" || me.value !== e.codiceFiscale) || !st || c && !e.dateOfBirth || Ze && xe.state !== "valid");
901
+ return !(!((o = e.firstName) != null && o.trim()) || !((y = e.lastName) != null && y.trim()) || !mt || !pt || V && (me.state !== "valid" || me.value !== e.codiceFiscale) || !st || a && !e.dateOfBirth || Ze && xe.state !== "valid");
902
902
  }, [
903
903
  e.firstName,
904
904
  e.lastName,
@@ -909,13 +909,13 @@ const xn = 500, Ir = /^[A-Z0-9]{16}$/, Nr = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, In = 3
909
909
  me.state,
910
910
  me.value,
911
911
  e.codiceFiscale,
912
- c,
912
+ a,
913
913
  e.dateOfBirth,
914
914
  Ze,
915
915
  xe.state
916
- ]), ft = w != null && w.trim() ? w : void 0, Fe = ft !== void 0, Bt = !Fe || !!e.criticalInformationAccepted, gt = !Ge || !(d != null && d.required) || ue, Xe = !!(e.privacyConsent && e.termsConsent && Bt && gt), Pt = !ze || Ie.length > 0, ht = Lt && Xe && Pt && (!g || ct) && !u && !te, ve = !ht && !te && !u, Vt = `${X}-submit-hint`, ne = {
917
- firstName: ce.firstName && !((Ct = e.firstName) != null && Ct.trim()) ? k("booking.details.firstName.required") : void 0,
918
- lastName: ce.lastName && !((Tt = e.lastName) != null && Tt.trim()) ? k("booking.details.lastName.required") : void 0,
916
+ ]), ft = w != null && w.trim() ? w : void 0, Fe = ft !== void 0, Lt = !Fe || !!e.criticalInformationAccepted, gt = !Ge || !(d != null && d.required) || ue, Xe = !!(e.privacyConsent && e.termsConsent && Lt && gt), Bt = !ze || Ie.length > 0, ht = _t && Xe && Bt && (!g || ct) && !u && !te, ve = !ht && !te && !u, Pt = `${X}-submit-hint`, ne = {
917
+ firstName: ce.firstName && !((wt = e.firstName) != null && wt.trim()) ? k("booking.details.firstName.required") : void 0,
918
+ lastName: ce.lastName && !((Ct = e.lastName) != null && Ct.trim()) ? k("booking.details.lastName.required") : void 0,
919
919
  email: !i && ce.email && !mt ? k("booking.details.email.invalid") : void 0,
920
920
  mobilePhone: ce.mobilePhone && !pt ? k("booking.details.mobilePhone.invalid") : void 0,
921
921
  codiceFiscale: ce.codiceFiscale && me.state === "invalid" ? me.hint ?? k("booking.details.codiceFiscale.invalid") : ce.codiceFiscale && !e.codiceFiscale ? k("booking.details.fieldRequired") : void 0,
@@ -929,10 +929,10 @@ const xn = 500, Ir = /^[A-Z0-9]{16}$/, Nr = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, In = 3
929
929
  }, vt = Nn.filter(
930
930
  (o) => le.has(o) && ne[o] !== void 0
931
931
  );
932
- vt.length !== le.size && Mt(new Set(vt));
932
+ vt.length !== le.size && Dt(new Set(vt));
933
933
  const se = (o) => !le.has(o), be = async (o) => {
934
934
  var T;
935
- if (o.preventDefault(), !te && !W.current && !ht && Mt(
935
+ if (o.preventDefault(), !te && !W.current && !ht && Dt(
936
936
  new Set(
937
937
  Nn.filter(
938
938
  (U) => le.has(U) || !ne[U]
@@ -1001,7 +1001,7 @@ const xn = 500, Ir = /^[A-Z0-9]{16}$/, Nr = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, In = 3
1001
1001
  error: ne.codiceFiscale,
1002
1002
  announceError: se("codiceFiscale"),
1003
1003
  children: /* @__PURE__ */ n(
1004
- zt,
1004
+ qt,
1005
1005
  {
1006
1006
  value: e.codiceFiscale ?? "",
1007
1007
  maxLength: 16,
@@ -1012,8 +1012,8 @@ const xn = 500, Ir = /^[A-Z0-9]{16}$/, Nr = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, In = 3
1012
1012
  }
1013
1013
  )
1014
1014
  }
1015
- ), $t = (o, y) => {
1016
- const T = jt(y);
1015
+ ), Vt = (o, y) => {
1016
+ const T = Kt(y);
1017
1017
  return T ? /* @__PURE__ */ n(
1018
1018
  Tn,
1019
1019
  {
@@ -1050,7 +1050,7 @@ const xn = 500, Ir = /^[A-Z0-9]{16}$/, Nr = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, In = 3
1050
1050
  onSubmit: be,
1051
1051
  onFocus: (o) => {
1052
1052
  const y = Oe.current;
1053
- !y || !o.currentTarget.contains(o.target) || !y.contains(o.target) && y.compareDocumentPosition(o.target) & Node.DOCUMENT_POSITION_FOLLOWING && Ft();
1053
+ !y || !o.currentTarget.contains(o.target) || !y.contains(o.target) && y.compareDocumentPosition(o.target) & Node.DOCUMENT_POSITION_FOLLOWING && Et();
1054
1054
  },
1055
1055
  "aria-busy": te || void 0,
1056
1056
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
@@ -1065,7 +1065,7 @@ const xn = 500, Ir = /^[A-Z0-9]{16}$/, Nr = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, In = 3
1065
1065
  error: ne.firstName,
1066
1066
  announceError: se("firstName"),
1067
1067
  children: /* @__PURE__ */ n(
1068
- zt,
1068
+ qt,
1069
1069
  {
1070
1070
  autoComplete: "given-name",
1071
1071
  value: e.firstName ?? "",
@@ -1083,7 +1083,7 @@ const xn = 500, Ir = /^[A-Z0-9]{16}$/, Nr = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, In = 3
1083
1083
  error: ne.lastName,
1084
1084
  announceError: se("lastName"),
1085
1085
  children: /* @__PURE__ */ n(
1086
- zt,
1086
+ qt,
1087
1087
  {
1088
1088
  autoComplete: "family-name",
1089
1089
  value: e.lastName ?? "",
@@ -1139,9 +1139,9 @@ const xn = 500, Ir = /^[A-Z0-9]{16}$/, Nr = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, In = 3
1139
1139
  ]
1140
1140
  }
1141
1141
  ),
1142
- V && !he || c ? /* @__PURE__ */ S("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
1142
+ V && !he || a ? /* @__PURE__ */ S("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
1143
1143
  V && !he ? Qe : null,
1144
- c ? /* @__PURE__ */ n(
1144
+ a ? /* @__PURE__ */ n(
1145
1145
  Ke,
1146
1146
  {
1147
1147
  label: k("booking.details.dateOfBirth.label"),
@@ -1171,7 +1171,7 @@ const xn = 500, Ir = /^[A-Z0-9]{16}$/, Nr = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, In = 3
1171
1171
  error: ne.insuranceNumber,
1172
1172
  announceError: se("insuranceNumber"),
1173
1173
  children: /* @__PURE__ */ n(
1174
- zt,
1174
+ qt,
1175
1175
  {
1176
1176
  value: e.insuranceNumber ?? "",
1177
1177
  onChange: (o) => z({ insuranceNumber: o.target.value }),
@@ -1423,7 +1423,7 @@ const xn = 500, Ir = /^[A-Z0-9]{16}$/, Nr = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, In = 3
1423
1423
  onCheckedChange: (o) => z({ privacyConsent: o === !0 }),
1424
1424
  "aria-required": !0,
1425
1425
  label: /* @__PURE__ */ S(ie, { children: [
1426
- $t(
1426
+ Vt(
1427
1427
  "booking.details.consent.privacy.label",
1428
1428
  v
1429
1429
  ),
@@ -1445,7 +1445,7 @@ const xn = 500, Ir = /^[A-Z0-9]{16}$/, Nr = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, In = 3
1445
1445
  onCheckedChange: (o) => z({ termsConsent: o === !0 }),
1446
1446
  "aria-required": !0,
1447
1447
  label: /* @__PURE__ */ S(ie, { children: [
1448
- $t(
1448
+ Vt(
1449
1449
  "booking.details.consent.terms.label",
1450
1450
  h
1451
1451
  ),
@@ -1471,11 +1471,11 @@ const xn = 500, Ir = /^[A-Z0-9]{16}$/, Nr = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, In = 3
1471
1471
  },
1472
1472
  "aria-required": d.required || void 0,
1473
1473
  label: /* @__PURE__ */ S(ie, { children: [
1474
- jt(d.url) ? /* @__PURE__ */ n(
1474
+ Kt(d.url) ? /* @__PURE__ */ n(
1475
1475
  "a",
1476
1476
  {
1477
1477
  dir: "auto",
1478
- href: jt(d.url),
1478
+ href: Kt(d.url),
1479
1479
  target: "_blank",
1480
1480
  rel: "noopener noreferrer",
1481
1481
  className: rn,
@@ -1545,7 +1545,7 @@ const xn = 500, Ir = /^[A-Z0-9]{16}$/, Nr = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, In = 3
1545
1545
  ve ? /* @__PURE__ */ n(
1546
1546
  "p",
1547
1547
  {
1548
- id: Vt,
1548
+ id: Pt,
1549
1549
  "data-slot": "submit-hint",
1550
1550
  className: "type-body-sm ds:m-0 ds:text-[var(--muted-foreground)]",
1551
1551
  children: k("booking.details.submitHint")
@@ -1559,7 +1559,7 @@ const xn = 500, Ir = /^[A-Z0-9]{16}$/, Nr = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, In = 3
1559
1559
  type: "submit",
1560
1560
  disabled: te || u,
1561
1561
  "aria-disabled": !ht || void 0,
1562
- "aria-describedby": ve ? Vt : void 0,
1562
+ "aria-describedby": ve ? Pt : void 0,
1563
1563
  startIcon: te ? /* @__PURE__ */ n(An, { variant: "pulse", size: "sm" }) : void 0,
1564
1564
  children: g ? k("booking.payment.submit", { amount: $e }) : k("booking.details.submit")
1565
1565
  }
@@ -1571,7 +1571,7 @@ const xn = 500, Ir = /^[A-Z0-9]{16}$/, Nr = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, In = 3
1571
1571
  }
1572
1572
  );
1573
1573
  fn.displayName = "BookingDetailsForm";
1574
- const St = [
1574
+ const Wt = [
1575
1575
  "ds:focus-visible:outline-[length:var(--focus-ring-width)]",
1576
1576
  "ds:focus-visible:outline-solid",
1577
1577
  "ds:focus-visible:outline-[var(--ring)]",
@@ -1591,9 +1591,8 @@ function ln(e) {
1591
1591
  }
1592
1592
  function Kn(e, t) {
1593
1593
  if (!e || typeof e.scrollIntoView != "function") return !1;
1594
- const s = getComputedStyle(e), i = parseFloat(s.scrollMarginTop) || 0, r = parseFloat(s.scrollMarginBottom) || 0, a = e.getBoundingClientRect();
1595
- if (a.top >= i && a.bottom <= window.innerHeight - r)
1596
- return !1;
1594
+ const s = getComputedStyle(e), i = getComputedStyle(document.documentElement), r = (parseFloat(s.scrollMarginTop) || 0) + (parseFloat(i.scrollPaddingTop) || 0), c = (parseFloat(s.scrollMarginBottom) || 0) + (parseFloat(i.scrollPaddingBottom) || 0), a = e.getBoundingClientRect();
1595
+ if (a.top >= r && a.bottom <= window.innerHeight - c) return !1;
1597
1596
  try {
1598
1597
  e.scrollIntoView({
1599
1598
  behavior: ln(e) ? "auto" : "smooth",
@@ -1619,8 +1618,8 @@ function Fr({
1619
1618
  onResend: s,
1620
1619
  resendSeconds: i = 60,
1621
1620
  phoneHint: r,
1622
- onVerified: a,
1623
- onBusyChange: c
1621
+ onVerified: c,
1622
+ onBusyChange: a
1624
1623
  }) {
1625
1624
  const { t: l, i18n: m } = Z("ui"), p = at(), f = at(), v = M(null), h = M(null), d = M(null), g = M(null), I = M(!1), u = M(!1), [F, N] = H(null), [w, x] = H(!1), [O, R] = H(null), [_, b] = H(
1626
1625
  null
@@ -1628,8 +1627,8 @@ function Fr({
1628
1627
  () => Date.now() + A * 1e3
1629
1628
  ), [D, k] = H(A), Y = O === "too-many-attempts";
1630
1629
  q(() => {
1631
- c == null || c(!!F);
1632
- }, [F, c]), q(() => (I.current = !0, () => {
1630
+ a == null || a(!!F);
1631
+ }, [F, a]), q(() => (I.current = !0, () => {
1633
1632
  I.current = !1;
1634
1633
  }), []), q(() => {
1635
1634
  var E;
@@ -1652,7 +1651,7 @@ function Fr({
1652
1651
  try {
1653
1652
  const J = await t(E);
1654
1653
  if (!I.current) return;
1655
- J.ok ? a(J.redirectUrl) : (R(J.reason), J.reason !== "too-many-attempts" && P((W) => W + 1));
1654
+ J.ok ? c(J.redirectUrl) : (R(J.reason), J.reason !== "too-many-attempts" && P((W) => W + 1));
1656
1655
  } catch {
1657
1656
  if (!I.current) return;
1658
1657
  b("verify"), P((J) => J + 1);
@@ -1687,7 +1686,7 @@ function Fr({
1687
1686
  ref: v,
1688
1687
  id: p,
1689
1688
  tabIndex: -1,
1690
- className: `type-title-card ds:m-0 ${St}`,
1689
+ className: `type-title-card ds:m-0 ${Wt}`,
1691
1690
  children: l("booking.code.heading")
1692
1691
  }
1693
1692
  ),
@@ -1758,17 +1757,17 @@ function Rr(e) {
1758
1757
  }
1759
1758
  function _r(e, t, s) {
1760
1759
  const i = e.filter(
1761
- (a) => t.includes(a.id)
1760
+ (c) => t.includes(c.id)
1762
1761
  ), r = (s == null ? void 0 : s.serviceId) ?? (t.length === 1 ? t[0] : void 0);
1763
1762
  if (r) {
1764
- const a = i.find((l) => l.id === r);
1765
- if (!a) return { blocked: !0 };
1766
- const c = jn(a);
1767
- return { payment: c, blocked: !!(a.payment && !c) };
1763
+ const c = i.find((l) => l.id === r);
1764
+ if (!c) return { blocked: !0 };
1765
+ const a = jn(c);
1766
+ return { payment: a, blocked: !!(c.payment && !a) };
1768
1767
  }
1769
- return { blocked: i.some((a) => !!a.payment) };
1768
+ return { blocked: i.some((c) => !!c.payment) };
1770
1769
  }
1771
- function Ht(e) {
1770
+ function Ut(e) {
1772
1771
  return e ? JSON.stringify([
1773
1772
  e.serviceId,
1774
1773
  e.kind,
@@ -1782,8 +1781,8 @@ function Lr({
1782
1781
  availableSlots: s,
1783
1782
  onSubmit: i,
1784
1783
  onChange: r,
1785
- paymentState: a,
1786
- submitting: c,
1784
+ paymentState: c,
1785
+ submitting: a,
1787
1786
  paymentTermsUrl: l,
1788
1787
  renderPayment: m,
1789
1788
  codeStep: p
@@ -1807,10 +1806,10 @@ function Lr({
1807
1806
  ), I = g.blocked || !!(g.payment && !m), u = JSON.stringify([
1808
1807
  f,
1809
1808
  d == null ? void 0 : d.serviceId,
1810
- Ht(g.payment),
1809
+ Ut(g.payment),
1811
1810
  l,
1812
1811
  I
1813
- ]), F = g.payment ? JSON.stringify([Ht(g.payment), l]) : "", N = M(void 0), w = !!((J = t.details) != null && J.paymentAccepted);
1812
+ ]), F = g.payment ? JSON.stringify([Ut(g.payment), l]) : "", N = M(void 0), w = !!((J = t.details) != null && J.paymentAccepted);
1814
1813
  q(() => {
1815
1814
  if (!w) N.current = void 0;
1816
1815
  else if (F) N.current === void 0 ? N.current = F : N.current !== F && (N.current = void 0, r({
@@ -1830,8 +1829,8 @@ function Lr({
1830
1829
  L.current === u || P.current || B || (L.current = u, _.current += 1, b.current = !1, R({ status: "idle" }));
1831
1830
  }, [u, B]);
1832
1831
  const D = B || L.current === u ? O.session : void 0, k = $(
1833
- () => D && (a == null ? void 0 : a.sessionId) === D.id ? a : D ? { sessionId: D.id, status: "ready" } : void 0,
1834
- [D, a]
1832
+ () => D && (c == null ? void 0 : c.sessionId) === D.id ? c : D ? { sessionId: D.id, status: "ready" } : void 0,
1833
+ [D, c]
1835
1834
  );
1836
1835
  D && k && "phase" in k && k.phase === "completion" && (A.current = D.id);
1837
1836
  const Y = $(
@@ -1860,7 +1859,7 @@ function Lr({
1860
1859
  _.current += 1, b.current = !1, P.current = !1, A.current = void 0, v.current = void 0, L.current = x.current, R({ status: "idle" });
1861
1860
  }, _e = async (W) => {
1862
1861
  var Se, xe, Te, ce, Pe;
1863
- if (!(d != null && d.available) || I || c || b.current || O.status === "payment" || O.status === "code" || P.current || g.payment && !W.paymentAccepted) return;
1862
+ if (!(d != null && d.available) || I || a || b.current || O.status === "payment" || O.status === "code" || P.current || g.payment && !W.paymentAccepted) return;
1864
1863
  b.current = !0;
1865
1864
  const Q = p ? { ...p } : void 0;
1866
1865
  v.current = { selection: f, slot: { ...d } };
@@ -1889,7 +1888,7 @@ function Lr({
1889
1888
  if (!te()) return;
1890
1889
  if (ge.payment) {
1891
1890
  const le = ee == null ? void 0 : ee.paymentSession;
1892
- if (!((Pe = le == null ? void 0 : le.id) != null && Pe.trim()) || Ht(le.payment) !== Ht(ge.payment)) {
1891
+ if (!((Pe = le == null ? void 0 : le.id) != null && Pe.trim()) || Ut(le.payment) !== Ut(ge.payment)) {
1893
1892
  R({ status: "error" });
1894
1893
  return;
1895
1894
  }
@@ -1937,8 +1936,8 @@ function $r({
1937
1936
  onNavigate: s,
1938
1937
  date: i,
1939
1938
  time: r,
1940
- details: a,
1941
- shouldTakeFocus: c
1939
+ details: c,
1940
+ shouldTakeFocus: a
1942
1941
  }) {
1943
1942
  const { t: l } = Z("ui"), m = M(null), p = M(null), f = M(void 0), v = at(), h = M(null), [d, g] = H(!1), [I, u] = H(() => ln(null)), F = () => {
1944
1943
  clearTimeout(f.current);
@@ -1954,7 +1953,7 @@ function $r({
1954
1953
  u(ln(m.current));
1955
1954
  }, []), q(() => {
1956
1955
  const x = p.current;
1957
- x && m.current && c(m.current) && x.focus({ preventScroll: !0 });
1956
+ x && m.current && a(m.current) && x.focus({ preventScroll: !0 });
1958
1957
  }, []), q(() => (f.current = setTimeout(() => w.current(), t), () => clearTimeout(f.current)), [e, t]), /* @__PURE__ */ S(
1959
1958
  "div",
1960
1959
  {
@@ -1989,12 +1988,12 @@ function $r({
1989
1988
  ref: p,
1990
1989
  tabIndex: -1,
1991
1990
  "aria-describedby": v,
1992
- className: `type-title-card ds:m-0 ${St}`,
1991
+ className: "type-title-card ds:m-0 ds:outline-none",
1993
1992
  children: l("booking.reserved.heading")
1994
1993
  }
1995
1994
  ),
1996
1995
  /* @__PURE__ */ n("p", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: i ? l("booking.reserved.when", { date: i, time: r }) : r }),
1997
- a ? /* @__PURE__ */ n("p", { className: "type-body ds:m-0 ds:text-[var(--muted-foreground)]", children: a }) : null
1996
+ c ? /* @__PURE__ */ n("p", { className: "type-body ds:m-0 ds:text-[var(--muted-foreground)]", children: c }) : null
1998
1997
  ] }),
1999
1998
  /* @__PURE__ */ n("p", { id: v, role: "status", className: "type-body ds:m-0", children: l(d ? "booking.reserved.stayed" : "booking.reserved.redirecting") }),
2000
1999
  I || d || t > Br ? null : (
@@ -2047,7 +2046,7 @@ const Kr = 2 ** 31 - 1;
2047
2046
  function jr(e) {
2048
2047
  return typeof e == "number" && Number.isFinite(e) && e >= 0 ? Math.min(e, Kr) : qr;
2049
2048
  }
2050
- const Ur = Dt(
2049
+ const Ur = At(
2051
2050
  // --booking-held-height: see the step-8 effects (runtime-measured height).
2052
2051
  "ds:flex ds:w-full ds:flex-col ds:text-[var(--foreground)] ds:[min-block-size:var(--booking-held-height,auto)]",
2053
2052
  {
@@ -2109,13 +2108,13 @@ function Jr(e) {
2109
2108
  function Un() {
2110
2109
  const { t: e, i18n: t } = Z("ui");
2111
2110
  return (s) => {
2112
- const i = Rr(s), r = (c) => Zt(c.amountCents, c.currencyCode, t.language), a = i.price ? "label" in i.price ? i.price.label : r(i.price.amount) : void 0;
2111
+ const i = Rr(s), r = (a) => Zt(a.amountCents, a.currencyCode, t.language), c = i.price ? "label" in i.price ? i.price.label : r(i.price.amount) : void 0;
2113
2112
  return i.payment === "unavailable" ? {
2114
- price: a,
2113
+ price: c,
2115
2114
  payment: e("booking.payment.unavailable"),
2116
2115
  paymentTone: "error"
2117
2116
  } : {
2118
- price: a,
2117
+ price: c,
2119
2118
  payment: i.payment ? e(`booking.payment.${i.payment.kind}`, {
2120
2119
  amount: r(i.payment)
2121
2120
  }) : void 0,
@@ -2124,7 +2123,7 @@ function Un() {
2124
2123
  };
2125
2124
  }
2126
2125
  function ot(e) {
2127
- return Jt(e, "yyyy-MM-dd");
2126
+ return Gt(e, "yyyy-MM-dd");
2128
2127
  }
2129
2128
  const Wr = [
2130
2129
  "ds:relative ds:flex ds:items-center ds:justify-center",
@@ -2136,7 +2135,7 @@ const Wr = [
2136
2135
  "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
2137
2136
  "ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
2138
2137
  "ds:forced-colors:focus-visible:outline-[CanvasText]"
2139
- ].join(" "), Yr = Dt(Wr, {
2138
+ ].join(" "), Yr = At(Wr, {
2140
2139
  variants: {
2141
2140
  state: {
2142
2141
  available: "ds:cursor-pointer ds:text-[var(--foreground)] ds:hover:bg-[var(--muted)]/30",
@@ -2154,8 +2153,8 @@ function Zr({
2154
2153
  locale: i,
2155
2154
  loading: r
2156
2155
  }) {
2157
- const { t: a } = Z("ui"), c = $(() => t ? At(fe(t)) : e.length > 0 ? At(fe(e[0])) : At(/* @__PURE__ */ new Date()), [t, e]), [l, m] = H(c), [p, f] = H(null), v = $(() => {
2158
- const N = At(l), w = xs(l), x = N.getDay(), O = w.getDate(), R = [];
2156
+ const { t: c } = Z("ui"), a = $(() => t ? Tt(fe(t)) : e.length > 0 ? Tt(fe(e[0])) : Tt(/* @__PURE__ */ new Date()), [t, e]), [l, m] = H(a), [p, f] = H(null), v = $(() => {
2157
+ const N = Tt(l), w = xs(l), x = N.getDay(), O = w.getDate(), R = [];
2159
2158
  for (let _ = x; _ > 0; _ -= 1) {
2160
2159
  const b = new Date(N);
2161
2160
  b.setDate(N.getDate() - _), R.push(b);
@@ -2176,7 +2175,7 @@ function Zr({
2176
2175
  year: "numeric"
2177
2176
  }).format(l);
2178
2177
  } catch {
2179
- return Jt(l, "MMMM yyyy");
2178
+ return Gt(l, "MMMM yyyy");
2180
2179
  }
2181
2180
  }, [l, i]), d = $(() => {
2182
2181
  const N = new Date(2024, 0, 7);
@@ -2186,7 +2185,7 @@ function Zr({
2186
2185
  try {
2187
2186
  return new Intl.DateTimeFormat(i, { weekday: "short" }).format(O);
2188
2187
  } catch {
2189
- return Jt(O, "EEE");
2188
+ return Gt(O, "EEE");
2190
2189
  }
2191
2190
  });
2192
2191
  }, [i]), g = $(() => new Set(e), [e]), I = ke(
@@ -2196,9 +2195,9 @@ function Zr({
2196
2195
  if (p) return p;
2197
2196
  if (t) return fe(t);
2198
2197
  const N = v.find(
2199
- (w) => Kt(w, l) && I(w)
2198
+ (w) => zt(w, l) && I(w)
2200
2199
  );
2201
- return N || (v.find((w) => Kt(w, l)) ?? null);
2200
+ return N || (v.find((w) => zt(w, l)) ?? null);
2202
2201
  }, [p, t, v, l, I]), F = ke(
2203
2202
  (N, w) => {
2204
2203
  let x = null;
@@ -2229,7 +2228,7 @@ function Zr({
2229
2228
  default:
2230
2229
  return;
2231
2230
  }
2232
- x && (N.preventDefault(), Kt(x, l) || m(At(x)), f(x));
2231
+ x && (N.preventDefault(), zt(x, l) || m(Tt(x)), f(x));
2233
2232
  },
2234
2233
  [I, s, l]
2235
2234
  );
@@ -2238,11 +2237,11 @@ function Zr({
2238
2237
  {
2239
2238
  role: "status",
2240
2239
  "aria-live": "polite",
2241
- "aria-label": a("common.loading"),
2240
+ "aria-label": c("common.loading"),
2242
2241
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
2243
2242
  children: [
2244
- /* @__PURE__ */ n(Wt, { variant: "text", width: "40%" }),
2245
- /* @__PURE__ */ n("div", { className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]", children: Array.from({ length: 42 }, (N, w) => /* @__PURE__ */ n(Wt, { variant: "rounded", height: "2.5rem" }, `mg-skel-${w}`)) })
2243
+ /* @__PURE__ */ n(Jt, { variant: "text", width: "40%" }),
2244
+ /* @__PURE__ */ n("div", { className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]", children: Array.from({ length: 42 }, (N, w) => /* @__PURE__ */ n(Jt, { variant: "rounded", height: "2.5rem" }, `mg-skel-${w}`)) })
2246
2245
  ]
2247
2246
  }
2248
2247
  ) : /* @__PURE__ */ S("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
@@ -2251,7 +2250,7 @@ function Zr({
2251
2250
  bn,
2252
2251
  {
2253
2252
  icon: /* @__PURE__ */ n(Ns, {}),
2254
- "aria-label": a("booking.previousMonth"),
2253
+ "aria-label": c("booking.previousMonth"),
2255
2254
  size: "sm",
2256
2255
  intent: "ghost",
2257
2256
  flipIconInRtl: !0,
@@ -2272,7 +2271,7 @@ function Zr({
2272
2271
  bn,
2273
2272
  {
2274
2273
  icon: /* @__PURE__ */ n(ws, {}),
2275
- "aria-label": a("booking.nextMonth"),
2274
+ "aria-label": c("booking.nextMonth"),
2276
2275
  size: "sm",
2277
2276
  intent: "ghost",
2278
2277
  flipIconInRtl: !0,
@@ -2286,7 +2285,7 @@ function Zr({
2286
2285
  "div",
2287
2286
  {
2288
2287
  role: "grid",
2289
- "aria-label": a("booking.monthGridLabel"),
2288
+ "aria-label": c("booking.monthGridLabel"),
2290
2289
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]",
2291
2290
  children: [
2292
2291
  /* @__PURE__ */ n(
@@ -2311,13 +2310,13 @@ function Zr({
2311
2310
  role: "row",
2312
2311
  className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]",
2313
2312
  children: v.slice(w * 7, w * 7 + 7).map((x, O) => {
2314
- const R = w * 7 + O, _ = Kt(x, l), b = _ && I(x), C = t ? yn(x, fe(t)) : !1, P = _ ? C ? "selected" : b ? "available" : "unavailable" : "outside", A = u ? yn(u, x) : !1, L = (() => {
2313
+ const R = w * 7 + O, _ = zt(x, l), b = _ && I(x), C = t ? yn(x, fe(t)) : !1, P = _ ? C ? "selected" : b ? "available" : "unavailable" : "outside", A = u ? yn(u, x) : !1, L = (() => {
2315
2314
  try {
2316
2315
  return new Intl.DateTimeFormat(i, {
2317
2316
  dateStyle: "full"
2318
2317
  }).format(x);
2319
2318
  } catch {
2320
- return Jt(x, "PPP");
2319
+ return Gt(x, "PPP");
2321
2320
  }
2322
2321
  })();
2323
2322
  return /* @__PURE__ */ n(
@@ -2348,7 +2347,7 @@ function Zr({
2348
2347
  )
2349
2348
  ] });
2350
2349
  }
2351
- const Xr = Dt(
2350
+ const Xr = At(
2352
2351
  [
2353
2352
  "ds:relative ds:flex ds:w-full ds:items-center ds:gap-[var(--spacing-md)]",
2354
2353
  "ds:min-h-[var(--min-target-size)]",
@@ -2380,7 +2379,7 @@ function Qr({
2380
2379
  onSelect: s,
2381
2380
  showDuration: i
2382
2381
  }) {
2383
- const { t: r } = Z("ui"), a = Un(), c = at(), [l, m] = H(() => {
2382
+ const { t: r } = Z("ui"), c = Un(), a = at(), [l, m] = H(() => {
2384
2383
  if (t) {
2385
2384
  const h = e.findIndex((d) => d.id === t);
2386
2385
  if (h >= 0) return h;
@@ -2432,10 +2431,10 @@ function Qr({
2432
2431
  {
2433
2432
  role: "radiogroup",
2434
2433
  "aria-label": r("booking.serviceListLabel"),
2435
- id: c,
2434
+ id: a,
2436
2435
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
2437
2436
  children: e.map((h, d) => {
2438
- const g = t === h.id, I = l === d, { price: u, payment: F, paymentTone: N } = a(h), w = u ? F ? r("booking.serviceCardLabelPayment", {
2437
+ const g = t === h.id, I = l === d, { price: u, payment: F, paymentTone: N } = c(h), w = u ? F ? r("booking.serviceCardLabelPayment", {
2439
2438
  label: h.label,
2440
2439
  price: u,
2441
2440
  payment: F
@@ -2510,7 +2509,7 @@ function Qr({
2510
2509
  }
2511
2510
  );
2512
2511
  }
2513
- const ei = Dt(
2512
+ const ei = At(
2514
2513
  [
2515
2514
  "ds:inline-flex ds:items-center ds:justify-center ds:gap-[var(--spacing-2xs)]",
2516
2515
  "ds:min-h-[var(--min-target-size)]",
@@ -2562,11 +2561,11 @@ function si({
2562
2561
  selectedSlotKey: s,
2563
2562
  onSelect: i,
2564
2563
  loading: r,
2565
- locale: a
2564
+ locale: c
2566
2565
  }) {
2567
- const { t: c } = Z("ui"), l = $(() => {
2566
+ const { t: a } = Z("ui"), l = $(() => {
2568
2567
  try {
2569
- return new Intl.DateTimeFormat(a, {
2568
+ return new Intl.DateTimeFormat(c, {
2570
2569
  weekday: "long",
2571
2570
  day: "numeric",
2572
2571
  month: "long"
@@ -2574,7 +2573,7 @@ function si({
2574
2573
  } catch {
2575
2574
  return e;
2576
2575
  }
2577
- }, [e, a]), m = $(() => {
2576
+ }, [e, c]), m = $(() => {
2578
2577
  const v = {
2579
2578
  morning: [],
2580
2579
  afternoon: [],
@@ -2585,16 +2584,16 @@ function si({
2585
2584
  return v;
2586
2585
  }, [t]), p = t.filter((v) => v.available).length, f = ["morning", "afternoon", "evening"];
2587
2586
  return r ? /* @__PURE__ */ S("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2588
- /* @__PURE__ */ n(Wt, { variant: "text", width: "60%" }),
2587
+ /* @__PURE__ */ n(Jt, { variant: "text", width: "60%" }),
2589
2588
  [0, 1].map((v) => /* @__PURE__ */ n(
2590
2589
  "div",
2591
2590
  {
2592
2591
  className: "ds:grid ds:grid-cols-3 ds:gap-[var(--spacing-xs)]",
2593
- children: [0, 1, 2].map((h) => /* @__PURE__ */ n(Wt, { variant: "rounded", height: "44px" }, h))
2592
+ children: [0, 1, 2].map((h) => /* @__PURE__ */ n(Jt, { variant: "rounded", height: "44px" }, h))
2594
2593
  },
2595
2594
  v
2596
2595
  ))
2597
- ] }) : p === 0 ? /* @__PURE__ */ n(Mn, { variant: "no-results", title: c("booking.noSlotsForDate") }) : /* @__PURE__ */ S("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2596
+ ] }) : p === 0 ? /* @__PURE__ */ n(Mn, { variant: "no-results", title: a("booking.noSlotsForDate") }) : /* @__PURE__ */ S("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2598
2597
  /* @__PURE__ */ S("div", { className: "ds:flex ds:items-baseline ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
2599
2598
  /* @__PURE__ */ S("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
2600
2599
  /* @__PURE__ */ n(
@@ -2606,7 +2605,7 @@ function si({
2606
2605
  ),
2607
2606
  /* @__PURE__ */ n("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: l })
2608
2607
  ] }),
2609
- /* @__PURE__ */ n("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: c("booking.slotsAvailable", { count: p }) })
2608
+ /* @__PURE__ */ n("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: a("booking.slotsAvailable", { count: p }) })
2610
2609
  ] }),
2611
2610
  f.map((v) => {
2612
2611
  const h = m[v];
@@ -2619,13 +2618,13 @@ function si({
2619
2618
  children: [
2620
2619
  /* @__PURE__ */ S("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:text-[color:var(--muted-foreground)]", children: [
2621
2620
  /* @__PURE__ */ n(d, { "aria-hidden": "true", className: "ds:size-3.5" }),
2622
- /* @__PURE__ */ n("span", { className: "type-meta ds:font-[var(--font-weight-semibold)] ds:uppercase", children: c(`booking.timeOfDay.${v}`) })
2621
+ /* @__PURE__ */ n("span", { className: "type-meta ds:font-[var(--font-weight-semibold)] ds:uppercase", children: a(`booking.timeOfDay.${v}`) })
2623
2622
  ] }),
2624
2623
  /* @__PURE__ */ n(
2625
2624
  "div",
2626
2625
  {
2627
2626
  role: "group",
2628
- "aria-label": c(`booking.timeOfDay.${v}`),
2627
+ "aria-label": a(`booking.timeOfDay.${v}`),
2629
2628
  className: "ds:grid ds:grid-cols-3 ds:gap-[var(--spacing-xs)] ds:sm:grid-cols-4",
2630
2629
  children: h.map((g) => {
2631
2630
  const I = g.key === s, u = g.available ? I ? "selected" : "idle" : "unavailable";
@@ -2636,12 +2635,12 @@ function si({
2636
2635
  "data-slot-id": g.key,
2637
2636
  disabled: !g.available,
2638
2637
  "aria-pressed": I,
2639
- "aria-label": c("booking.slotAvailableLabel", {
2640
- time: Yt(e, g.time, a)
2638
+ "aria-label": a("booking.slotAvailableLabel", {
2639
+ time: Yt(e, g.time, c)
2641
2640
  }),
2642
2641
  onClick: () => g.available && i(g),
2643
2642
  className: ei({ state: u }),
2644
- children: Yt(e, g.time, a)
2643
+ children: Yt(e, g.time, c)
2645
2644
  },
2646
2645
  g.key
2647
2646
  );
@@ -2655,15 +2654,15 @@ function si({
2655
2654
  })
2656
2655
  ] });
2657
2656
  }
2658
- const Gt = 4;
2657
+ const Ht = 4;
2659
2658
  function ri({
2660
2659
  availableDates: e,
2661
2660
  availableSlots: t,
2662
2661
  value: s,
2663
2662
  onChange: i,
2664
2663
  onDateSelect: r,
2665
- onWindowChange: a,
2666
- loadingDates: c,
2664
+ onWindowChange: c,
2665
+ loadingDates: a,
2667
2666
  loadingSlots: l,
2668
2667
  locale: m,
2669
2668
  agentIdBase: p
@@ -2679,9 +2678,9 @@ function ri({
2679
2678
  }
2680
2679
  return f;
2681
2680
  }), d = $(
2682
- () => sn(v, Gt - 1),
2681
+ () => sn(v, Ht - 1),
2683
2682
  [v]
2684
- ), g = $(() => Array.from({ length: Gt }, (b, C) => {
2683
+ ), g = $(() => Array.from({ length: Ht }, (b, C) => {
2685
2684
  const P = sn(v, C), A = ot(P), B = (t[A] ?? []).map((D) => ({
2686
2685
  id: D.key,
2687
2686
  // SlotGrid formats `start` as a time via Intl.DateTimeFormat —
@@ -2693,11 +2692,11 @@ function ri({
2693
2692
  return { date: A, slots: B };
2694
2693
  }), [v, t]), I = kt(v, f), u = !0, F = ke(() => {
2695
2694
  h((b) => {
2696
- const C = Is(b, Gt);
2695
+ const C = Is(b, Ht);
2697
2696
  return kt(f, C) ? f : C;
2698
2697
  });
2699
2698
  }, [f]), N = ke(() => {
2700
- h((b) => sn(b, Gt));
2699
+ h((b) => sn(b, Ht));
2701
2700
  }, []);
2702
2701
  q(() => {
2703
2702
  if (e.length === 0) return;
@@ -2707,8 +2706,8 @@ function ri({
2707
2706
  return !kt(A, d) && !Ss(A, v);
2708
2707
  }) || h(b);
2709
2708
  }, [e]), q(() => {
2710
- a == null || a(ot(v), ot(d));
2711
- }, [v, d, a]);
2709
+ c == null || c(ot(v), ot(d));
2710
+ }, [v, d, c]);
2712
2711
  const w = ke(
2713
2712
  (b, C) => {
2714
2713
  const P = typeof C.date == "string" ? C.date : ot(C.date);
@@ -2717,7 +2716,7 @@ function ri({
2717
2716
  }), r == null || r(P);
2718
2717
  },
2719
2718
  [i, r, s]
2720
- ), x = c || l ? "loading" : "default", O = g.some((b) => b.slots.length > 0), R = e[0];
2719
+ ), x = a || l ? "loading" : "default", O = g.some((b) => b.slots.length > 0), R = e[0];
2721
2720
  return /* @__PURE__ */ S("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2722
2721
  x !== "loading" && !O && !!R ? /* @__PURE__ */ n(
2723
2722
  gn,
@@ -2751,8 +2750,8 @@ function Hn(e) {
2751
2750
  value: s,
2752
2751
  onChange: i,
2753
2752
  onDateSelect: r,
2754
- onWindowChange: a,
2755
- loadingDates: c,
2753
+ onWindowChange: c,
2754
+ loadingDates: a,
2756
2755
  loadingSlots: l,
2757
2756
  locale: m,
2758
2757
  datePickerStyle: p,
@@ -2766,8 +2765,8 @@ function Hn(e) {
2766
2765
  value: s,
2767
2766
  onChange: i,
2768
2767
  onDateSelect: r,
2769
- onWindowChange: a,
2770
- loadingDates: c,
2768
+ onWindowChange: c,
2769
+ loadingDates: a,
2771
2770
  loadingSlots: l,
2772
2771
  locale: m,
2773
2772
  agentIdBase: f
@@ -2781,13 +2780,13 @@ function Hn(e) {
2781
2780
  i(Qt(s, v)), r == null || r(v);
2782
2781
  },
2783
2782
  locale: m,
2784
- loading: c ?? l
2783
+ loading: a ?? l
2785
2784
  }
2786
2785
  );
2787
2786
  }
2788
2787
  function Gn(e) {
2789
- const { inputs: t, value: s, onChange: i, loadingSlots: r, locale: a, datePickerStyle: c } = e;
2790
- return c === "four-day-grid" || !s.date ? null : /* @__PURE__ */ n(
2788
+ const { inputs: t, value: s, onChange: i, loadingSlots: r, locale: c, datePickerStyle: a } = e;
2789
+ return a === "four-day-grid" || !s.date ? null : /* @__PURE__ */ n(
2791
2790
  si,
2792
2791
  {
2793
2792
  date: s.date,
@@ -2795,7 +2794,7 @@ function Gn(e) {
2795
2794
  selectedSlotKey: s.slotKey,
2796
2795
  onSelect: (l) => i(Vn(s, l.key)),
2797
2796
  loading: r,
2798
- locale: a
2797
+ locale: c
2799
2798
  }
2800
2799
  );
2801
2800
  }
@@ -2826,14 +2825,14 @@ function Wn({
2826
2825
  valueIds: s,
2827
2826
  onChange: i,
2828
2827
  onChangeIds: r,
2829
- pickerStyle: a = "select"
2828
+ pickerStyle: c = "select"
2830
2829
  }) {
2831
- const { t: c } = Z("ui"), l = e.map((p) => ({
2830
+ const { t: a } = Z("ui"), l = e.map((p) => ({
2832
2831
  value: p.id,
2833
2832
  label: p.label,
2834
2833
  dir: "auto"
2835
- })), m = /* @__PURE__ */ n("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: c("booking.specialty.heading") });
2836
- return a === "multi-select" && r ? /* @__PURE__ */ S("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2834
+ })), m = /* @__PURE__ */ n("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: a("booking.specialty.heading") });
2835
+ return c === "multi-select" && r ? /* @__PURE__ */ S("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2837
2836
  m,
2838
2837
  /* @__PURE__ */ n(
2839
2838
  mn,
@@ -2841,12 +2840,12 @@ function Wn({
2841
2840
  options: l,
2842
2841
  value: s ?? [],
2843
2842
  onChange: r,
2844
- placeholder: c("booking.specialty.placeholder"),
2845
- "aria-label": c("booking.specialty.heading"),
2843
+ placeholder: a("booking.specialty.placeholder"),
2844
+ "aria-label": a("booking.specialty.heading"),
2846
2845
  allowClear: !0
2847
2846
  }
2848
2847
  )
2849
- ] }) : a === "combobox" ? /* @__PURE__ */ S("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2848
+ ] }) : c === "combobox" ? /* @__PURE__ */ S("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2850
2849
  m,
2851
2850
  /* @__PURE__ */ n(
2852
2851
  un,
@@ -2854,8 +2853,8 @@ function Wn({
2854
2853
  options: l,
2855
2854
  value: t ?? "",
2856
2855
  onValueChange: (p) => i(p === "" ? "" : p),
2857
- placeholder: c("booking.specialty.placeholder"),
2858
- "aria-label": c("booking.specialty.heading"),
2856
+ placeholder: a("booking.specialty.placeholder"),
2857
+ "aria-label": a("booking.specialty.heading"),
2859
2858
  clearable: !0
2860
2859
  }
2861
2860
  )
@@ -2867,8 +2866,8 @@ function Wn({
2867
2866
  options: l,
2868
2867
  value: t ?? "",
2869
2868
  onValueChange: (p) => i(p),
2870
- placeholder: c("booking.specialty.placeholder"),
2871
- "aria-label": c("booking.specialty.heading")
2869
+ placeholder: a("booking.specialty.placeholder"),
2870
+ "aria-label": a("booking.specialty.heading")
2872
2871
  }
2873
2872
  )
2874
2873
  ] });
@@ -2879,11 +2878,11 @@ function Yn({
2879
2878
  valueIds: s,
2880
2879
  onChange: i,
2881
2880
  onChangeIds: r,
2882
- pickerStyle: a,
2883
- compact: c,
2881
+ pickerStyle: c,
2882
+ compact: a,
2884
2883
  showDuration: l
2885
2884
  }) {
2886
- const { t: m } = Z("ui"), p = Un(), f = a ?? (c ? "select" : "cards"), v = e.map((d) => {
2885
+ const { t: m } = Z("ui"), p = Un(), f = c ?? (a ? "select" : "cards"), v = e.map((d) => {
2887
2886
  const { price: g, payment: I, paymentTone: u } = p(d);
2888
2887
  return {
2889
2888
  value: d.id,
@@ -2961,10 +2960,10 @@ function Zn({
2961
2960
  valueIds: s,
2962
2961
  onChange: i,
2963
2962
  onChangeIds: r,
2964
- pickerStyle: a = "select"
2963
+ pickerStyle: c = "select"
2965
2964
  }) {
2966
- const { t: c } = Z("ui"), l = /* @__PURE__ */ n("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: c("booking.operator.heading") });
2967
- if (a === "multi-select" && r) {
2965
+ const { t: a } = Z("ui"), l = /* @__PURE__ */ n("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: a("booking.operator.heading") });
2966
+ if (c === "multi-select" && r) {
2968
2967
  const p = e.map((f) => ({
2969
2968
  value: f.id,
2970
2969
  label: f.name,
@@ -2978,20 +2977,20 @@ function Zn({
2978
2977
  options: p,
2979
2978
  value: s ?? [],
2980
2979
  onChange: r,
2981
- placeholder: c("booking.operator.all"),
2982
- "aria-label": c("booking.operator.heading"),
2980
+ placeholder: a("booking.operator.all"),
2981
+ "aria-label": a("booking.operator.heading"),
2983
2982
  allowClear: !0
2984
2983
  }
2985
2984
  )
2986
2985
  ] });
2987
2986
  }
2988
2987
  const m = [
2989
- { value: Re, label: c("booking.operator.all") },
2988
+ { value: Re, label: a("booking.operator.all") },
2990
2989
  ...e.map(
2991
2990
  (p) => ({ value: p.id, label: p.name, dir: "auto" })
2992
2991
  )
2993
2992
  ];
2994
- return a === "combobox" ? /* @__PURE__ */ S("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2993
+ return c === "combobox" ? /* @__PURE__ */ S("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
2995
2994
  l,
2996
2995
  /* @__PURE__ */ n(
2997
2996
  un,
@@ -2999,8 +2998,8 @@ function Zn({
2999
2998
  options: m,
3000
2999
  value: t ?? Re,
3001
3000
  onValueChange: (p) => i(p === "" ? Re : p),
3002
- placeholder: c("booking.operator.placeholder"),
3003
- "aria-label": c("booking.operator.heading"),
3001
+ placeholder: a("booking.operator.placeholder"),
3002
+ "aria-label": a("booking.operator.heading"),
3004
3003
  clearable: !0
3005
3004
  }
3006
3005
  )
@@ -3012,8 +3011,8 @@ function Zn({
3012
3011
  options: m,
3013
3012
  value: t ?? Re,
3014
3013
  onValueChange: (p) => i(p),
3015
- placeholder: c("booking.operator.placeholder"),
3016
- "aria-label": c("booking.operator.heading")
3014
+ placeholder: a("booking.operator.placeholder"),
3015
+ "aria-label": a("booking.operator.heading")
3017
3016
  }
3018
3017
  )
3019
3018
  ] });
@@ -3052,8 +3051,8 @@ function ii({
3052
3051
  handoverDelayMs: s,
3053
3052
  onNavigate: i,
3054
3053
  payment: r,
3055
- confirmationChannels: a,
3056
- snapshot: c,
3054
+ confirmationChannels: c,
3055
+ snapshot: a,
3057
3056
  operators: l,
3058
3057
  specialties: m,
3059
3058
  services: p,
@@ -3069,9 +3068,9 @@ function ii({
3069
3068
  const A = F.current, L = document.activeElement, B = A == null ? void 0 : A.closest('[data-component="booking"]');
3070
3069
  !r && !e || !A || (L && (B != null && B.contains(L)) || I()) && A.focus();
3071
3070
  }, []);
3072
- const N = pn(a), x = qn(
3071
+ const N = pn(c), x = qn(
3073
3072
  N,
3074
- c.details.confirmationChannels
3073
+ a.details.confirmationChannels
3075
3074
  ).map(
3076
3075
  (A) => u(`booking.confirmation.channel.${A}`)
3077
3076
  ), O = r ? Zt(r.amountCents, r.currencyCode, f) : "", R = r ? u(
@@ -3082,18 +3081,18 @@ function ii({
3082
3081
  }) : u("booking.success.descriptionSingle", {
3083
3082
  channel: x[0]
3084
3083
  }), _ = $(() => {
3085
- if (c.date)
3084
+ if (a.date)
3086
3085
  try {
3087
3086
  return new Intl.DateTimeFormat(f, {
3088
3087
  weekday: "long",
3089
3088
  day: "numeric",
3090
3089
  month: "long"
3091
- }).format(fe(c.date));
3090
+ }).format(fe(a.date));
3092
3091
  } catch {
3093
- return c.date;
3092
+ return a.date;
3094
3093
  }
3095
- }, [c.date, f]), b = $(() => {
3096
- const L = (c.operatorIds && c.operatorIds.length > 0 ? c.operatorIds : c.operatorId ? [c.operatorId] : []).filter((B) => B !== Re).map((B) => {
3094
+ }, [a.date, f]), b = $(() => {
3095
+ const L = (a.operatorIds && a.operatorIds.length > 0 ? a.operatorIds : a.operatorId ? [a.operatorId] : []).filter((B) => B !== Re).map((B) => {
3097
3096
  var D;
3098
3097
  return (D = l.find((k) => k.id === B)) == null ? void 0 : D.name;
3099
3098
  }).filter((B) => B !== void 0);
@@ -3109,18 +3108,18 @@ function ii({
3109
3108
  { type: "element", value: B }
3110
3109
  ]);
3111
3110
  }
3112
- }, [c.operatorIds, c.operatorId, l, f]), C = c.specialtyId ? m.find((A) => A.id === c.specialtyId) : void 0, P = c.serviceId ? p.find((A) => A.id === c.serviceId) : void 0;
3111
+ }, [a.operatorIds, a.operatorId, l, f]), C = a.specialtyId ? m.find((A) => A.id === a.specialtyId) : void 0, P = a.serviceId ? p.find((A) => A.id === a.serviceId) : void 0;
3113
3112
  if (t) {
3114
3113
  let A;
3115
- if (c.date)
3114
+ if (a.date)
3116
3115
  try {
3117
3116
  A = new Intl.DateTimeFormat(f, {
3118
3117
  weekday: "short",
3119
3118
  day: "numeric",
3120
3119
  month: "short"
3121
- }).format(fe(c.date));
3120
+ }).format(fe(a.date));
3122
3121
  } catch {
3123
- A = c.date;
3122
+ A = a.date;
3124
3123
  }
3125
3124
  const L = (P == null ? void 0 : P.label) ?? (C == null ? void 0 : C.label), B = b.map(
3126
3125
  (D, k) => D.type === "element" ? /* @__PURE__ */ n("bdi", { children: D.value }, k) : D.value
@@ -3132,7 +3131,7 @@ function ii({
3132
3131
  delayMs: jr(s),
3133
3132
  onNavigate: i,
3134
3133
  date: A,
3135
- time: Yt(c.date, c.slot.time, f),
3134
+ time: Yt(a.date, a.slot.time, f),
3136
3135
  details: L || B.length > 0 ? /* @__PURE__ */ S(ie, { children: [
3137
3136
  L ? /* @__PURE__ */ n("bdi", { children: L }) : null,
3138
3137
  L && B.length > 0 ? " · " : null,
@@ -3158,7 +3157,7 @@ function ii({
3158
3157
  as: "h3",
3159
3158
  ref: F,
3160
3159
  tabIndex: r || e ? -1 : void 0,
3161
- className: r || e ? St : void 0,
3160
+ className: r || e ? "ds:outline-none" : void 0,
3162
3161
  children: u(
3163
3162
  r ? v === "demo" ? "booking.payment.paidDemoTitle" : "booking.payment.paidTitle" : e ? "booking.code.confirmedHeading" : "booking.success.heading"
3164
3163
  )
@@ -3198,7 +3197,7 @@ function ii({
3198
3197
  /* @__PURE__ */ n("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: _ })
3199
3198
  ] }) : null,
3200
3199
  /* @__PURE__ */ n("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: u("booking.success.summaryTime") }),
3201
- /* @__PURE__ */ n("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: Yt(c.date, c.slot.time, f) }),
3200
+ /* @__PURE__ */ n("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: Yt(a.date, a.slot.time, f) }),
3202
3201
  b.length > 0 ? /* @__PURE__ */ S(ie, { children: [
3203
3202
  /* @__PURE__ */ n("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: u("booking.success.summaryProvider") }),
3204
3203
  /* @__PURE__ */ n("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: b.map(
@@ -3240,7 +3239,7 @@ function re({
3240
3239
  "data-booking-step": String(e),
3241
3240
  ...t ? { [es]: "" } : null,
3242
3241
  tabIndex: -1,
3243
- className: s ? `${s} ${St}` : St,
3242
+ className: s ? `${s} ${Wt}` : Wt,
3244
3243
  children: r
3245
3244
  }
3246
3245
  );
@@ -3254,8 +3253,8 @@ function ai(e) {
3254
3253
  inputs: s,
3255
3254
  value: i,
3256
3255
  onChange: r,
3257
- onSubmit: a,
3258
- emptyServicesSlot: c,
3256
+ onSubmit: c,
3257
+ emptyServicesSlot: a,
3259
3258
  onboardingIncompleteSlot: l,
3260
3259
  loadingDates: m,
3261
3260
  loadingSlots: p,
@@ -3271,7 +3270,7 @@ function ai(e) {
3271
3270
  detailsProps: w,
3272
3271
  agentIdBase: x,
3273
3272
  activeStep: O
3274
- } = e, { t: R } = Z("ui"), _ = xt(O, h), b = (C, P) => ({
3273
+ } = e, { t: R } = Z("ui"), _ = St(O, h), b = (C, P) => ({
3275
3274
  step: C,
3276
3275
  active: C === _,
3277
3276
  className: P
@@ -3295,7 +3294,7 @@ function ai(e) {
3295
3294
  pickerStyle: d
3296
3295
  }
3297
3296
  ) }) : null,
3298
- t.gates.service ? /* @__PURE__ */ n(re, { ...b(3), children: t.filtered.services.length === 0 ? /* @__PURE__ */ n(Qn, { customSlot: c }) : /* @__PURE__ */ n(
3297
+ t.gates.service ? /* @__PURE__ */ n(re, { ...b(3), children: t.filtered.services.length === 0 ? /* @__PURE__ */ n(Qn, { customSlot: a }) : /* @__PURE__ */ n(
3299
3298
  Yn,
3300
3299
  {
3301
3300
  services: t.filtered.services,
@@ -3370,7 +3369,7 @@ function ai(e) {
3370
3369
  ...w,
3371
3370
  value: i.details ?? {},
3372
3371
  onChange: (C) => r({ ...i, details: C }),
3373
- onSubmit: a,
3372
+ onSubmit: c,
3374
3373
  submitting: F,
3375
3374
  defaultPhoneCountry: e.policy.country
3376
3375
  }
@@ -3381,8 +3380,8 @@ function Ne(e, t, s = {}) {
3381
3380
  const {
3382
3381
  cascade: i,
3383
3382
  inputs: r,
3384
- value: a,
3385
- onChange: c,
3383
+ value: c,
3384
+ onChange: a,
3386
3385
  onSubmit: l,
3387
3386
  emptyServicesSlot: m,
3388
3387
  onboardingIncompleteSlot: p,
@@ -3406,8 +3405,8 @@ function Ne(e, t, s = {}) {
3406
3405
  return /* @__PURE__ */ n(
3407
3406
  Jn,
3408
3407
  {
3409
- value: a.insuranceType,
3410
- onChange: (b) => c(En(a, b))
3408
+ value: c.insuranceType,
3409
+ onChange: (b) => a(En(c, b))
3411
3410
  }
3412
3411
  );
3413
3412
  case 2:
@@ -3415,10 +3414,10 @@ function Ne(e, t, s = {}) {
3415
3414
  Wn,
3416
3415
  {
3417
3416
  specialties: i.filtered.specialties,
3418
- value: a.specialtyId,
3419
- valueIds: a.specialtyIds,
3420
- onChange: (b) => c(Fn(a, b)),
3421
- onChangeIds: (b) => c(Rn(a, b)),
3417
+ value: c.specialtyId,
3418
+ valueIds: c.specialtyIds,
3419
+ onChange: (b) => a(Fn(c, b)),
3420
+ onChangeIds: (b) => a(Rn(c, b)),
3422
3421
  pickerStyle: I
3423
3422
  }
3424
3423
  );
@@ -3427,10 +3426,10 @@ function Ne(e, t, s = {}) {
3427
3426
  Yn,
3428
3427
  {
3429
3428
  services: i.filtered.services,
3430
- value: a.serviceId,
3431
- valueIds: a.serviceIds,
3432
- onChange: (b) => c(_n(a, b)),
3433
- onChangeIds: (b) => c(Ln(a, b)),
3429
+ value: c.serviceId,
3430
+ valueIds: c.serviceIds,
3431
+ onChange: (b) => a(_n(c, b)),
3432
+ onChangeIds: (b) => a(Ln(c, b)),
3434
3433
  pickerStyle: u,
3435
3434
  compact: s.compactService,
3436
3435
  showDuration: F
@@ -3441,10 +3440,10 @@ function Ne(e, t, s = {}) {
3441
3440
  Zn,
3442
3441
  {
3443
3442
  operators: i.filtered.operators,
3444
- value: a.operatorId,
3445
- valueIds: a.operatorIds,
3446
- onChange: (b) => c(Bn(a, b)),
3447
- onChangeIds: (b) => c(Pn(a, b)),
3443
+ value: c.operatorId,
3444
+ valueIds: c.operatorIds,
3445
+ onChange: (b) => a(Bn(c, b)),
3446
+ onChangeIds: (b) => a(Pn(c, b)),
3448
3447
  pickerStyle: N
3449
3448
  }
3450
3449
  );
@@ -3453,13 +3452,13 @@ function Ne(e, t, s = {}) {
3453
3452
  gn,
3454
3453
  {
3455
3454
  nextAvailableDate: r.nextAvailableDate,
3456
- onJump: () => c(Qt(a, r.nextAvailableDate)),
3455
+ onJump: () => a(Qt(c, r.nextAvailableDate)),
3457
3456
  locale: x
3458
3457
  }
3459
3458
  ) : Hn({
3460
3459
  inputs: r,
3461
- value: a,
3462
- onChange: c,
3460
+ value: c,
3461
+ onChange: a,
3463
3462
  onDateSelect: h,
3464
3463
  onWindowChange: d,
3465
3464
  loadingDates: f,
@@ -3471,8 +3470,8 @@ function Ne(e, t, s = {}) {
3471
3470
  case 6:
3472
3471
  return Gn({
3473
3472
  inputs: r,
3474
- value: a,
3475
- onChange: c,
3473
+ value: c,
3474
+ onChange: a,
3476
3475
  loadingSlots: v,
3477
3476
  locale: x,
3478
3477
  datePickerStyle: g
@@ -3482,8 +3481,8 @@ function Ne(e, t, s = {}) {
3482
3481
  fn,
3483
3482
  {
3484
3483
  ...O,
3485
- value: a.details ?? {},
3486
- onChange: (b) => c({ ...a, details: b }),
3484
+ value: c.details ?? {},
3485
+ onChange: (b) => a({ ...c, details: b }),
3487
3486
  onSubmit: l,
3488
3487
  submitting: w,
3489
3488
  defaultPhoneCountry: R.country
@@ -3509,16 +3508,16 @@ function en() {
3509
3508
  [e]
3510
3509
  );
3511
3510
  }
3512
- function xt(e, t) {
3511
+ function St(e, t) {
3513
3512
  return t === "four-day-grid" && e === 6 ? 5 : e;
3514
3513
  }
3515
3514
  function ci(e) {
3516
- const { cascade: t, value: s, activeStep: i, setActiveStep: r, datePickerStyle: a } = e, c = en(), { t: l } = Z("ui"), m = l("booking.operator.all"), p = $(
3517
- () => hn(t.visibleSteps, a),
3518
- [t.visibleSteps, a]
3519
- ), f = xt(i, a), v = Math.max(0, p.indexOf(f)), h = $(
3515
+ const { cascade: t, value: s, activeStep: i, setActiveStep: r, datePickerStyle: c } = e, a = en(), { t: l } = Z("ui"), m = l("booking.operator.all"), p = $(
3516
+ () => hn(t.visibleSteps, c),
3517
+ [t.visibleSteps, c]
3518
+ ), f = St(i, c), v = Math.max(0, p.indexOf(f)), h = $(
3520
3519
  () => p.map((d) => ({
3521
- label: c[d],
3520
+ label: a[d],
3522
3521
  summary: ts(d, s, t, m),
3523
3522
  status: di(d, s, t),
3524
3523
  content: /* @__PURE__ */ n(re, { step: d, active: d === f, children: Ne(d, e, { compactService: !0 }) })
@@ -3526,7 +3525,7 @@ function ci(e) {
3526
3525
  [
3527
3526
  p,
3528
3527
  s,
3529
- c,
3528
+ a,
3530
3529
  t,
3531
3530
  e,
3532
3531
  f,
@@ -3554,7 +3553,7 @@ function wn(e, t) {
3554
3553
  function on(e, t) {
3555
3554
  const s = e.map((i) => {
3556
3555
  var r;
3557
- return (r = t.find((a) => a.id === i)) == null ? void 0 : r.label;
3556
+ return (r = t.find((c) => c.id === i)) == null ? void 0 : r.label;
3558
3557
  }).filter((i) => i !== void 0);
3559
3558
  return s.length > 0 ? s.join(", ") : void 0;
3560
3559
  }
@@ -3572,14 +3571,14 @@ function ts(e, t, s, i) {
3572
3571
  case 3:
3573
3572
  return on(Ue(t), s.filtered.services);
3574
3573
  case 4: {
3575
- const c = dn(t).filter((m) => m !== Re), l = on(
3576
- c,
3574
+ const a = dn(t).filter((m) => m !== Re), l = on(
3575
+ a,
3577
3576
  s.filtered.operators.map((m) => ({
3578
3577
  id: m.id,
3579
3578
  label: m.name
3580
3579
  }))
3581
3580
  );
3582
- return l !== void 0 ? l : c.length === 0 ? i : void 0;
3581
+ return l !== void 0 ? l : a.length === 0 ? i : void 0;
3583
3582
  }
3584
3583
  case 5:
3585
3584
  return t.date;
@@ -3590,7 +3589,7 @@ function ts(e, t, s, i) {
3590
3589
  }
3591
3590
  }
3592
3591
  function li(e) {
3593
- const { cascade: t, value: s, activeStep: i, setActiveStep: r } = e, { t: a } = Z("ui"), c = en(), l = a("booking.operator.all"), m = `${at()}-filter`, p = xt(i, e.datePickerStyle), f = t.visibleSteps.filter(
3592
+ const { cascade: t, value: s, activeStep: i, setActiveStep: r } = e, { t: c } = Z("ui"), a = en(), l = c("booking.operator.all"), m = `${at()}-filter`, p = St(i, e.datePickerStyle), f = t.visibleSteps.filter(
3594
3593
  (d) => d === 1 || d === 2 || d === 3 || d === 4
3595
3594
  ), v = f.some(
3596
3595
  (d) => !je(d, s)
@@ -3602,7 +3601,7 @@ function li(e) {
3602
3601
  "div",
3603
3602
  {
3604
3603
  role: "group",
3605
- "aria-label": a("booking.filtersLabel"),
3604
+ "aria-label": c("booking.filtersLabel"),
3606
3605
  className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
3607
3606
  children: f.map((d) => {
3608
3607
  const g = ts(
@@ -3630,10 +3629,10 @@ function li(e) {
3630
3629
  u && I ? t.currentStep : d
3631
3630
  ),
3632
3631
  children: g ? /* @__PURE__ */ S(ie, { children: [
3633
- c[d],
3632
+ a[d],
3634
3633
  ": ",
3635
3634
  g
3636
- ] }) : c[d]
3635
+ ] }) : a[d]
3637
3636
  },
3638
3637
  `csc-${d}`
3639
3638
  );
@@ -3679,7 +3678,7 @@ function li(e) {
3679
3678
  ] });
3680
3679
  }
3681
3680
  function ui(e) {
3682
- const { cascade: t, datePickerStyle: s, activeStep: i } = e, r = xt(i, s), a = t.visibleSteps.filter(
3681
+ const { cascade: t, datePickerStyle: s, activeStep: i } = e, r = St(i, s), c = t.visibleSteps.filter(
3683
3682
  (l) => l === 1 || l === 2 || l === 3 || l === 4
3684
3683
  );
3685
3684
  return /* @__PURE__ */ S("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
@@ -3688,7 +3687,7 @@ function ui(e) {
3688
3687
  {
3689
3688
  className: s === "four-day-grid" ? "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]" : "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-2",
3690
3689
  children: [
3691
- /* @__PURE__ */ n("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: a.map((l) => /* @__PURE__ */ n(re, { step: l, active: l === r, children: Ne(l, e, { compactService: !0 }) }, `fbf-${l}`)) }),
3690
+ /* @__PURE__ */ n("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: c.map((l) => /* @__PURE__ */ n(re, { step: l, active: l === r, children: Ne(l, e, { compactService: !0 }) }, `fbf-${l}`)) }),
3692
3691
  /* @__PURE__ */ S("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
3693
3692
  t.gates.date ? /* @__PURE__ */ n(re, { step: 5, active: r === 5, children: Ne(5, e) }) : null,
3694
3693
  t.gates.slot && e.value.date && s === "month-calendar" ? /* @__PURE__ */ n(re, { step: 6, active: r === 6, children: Ne(6, e) }) : null
@@ -3700,13 +3699,13 @@ function ui(e) {
3700
3699
  ] });
3701
3700
  }
3702
3701
  function mi(e) {
3703
- const { cascade: t, value: s, activeStep: i, setActiveStep: r, datePickerStyle: a } = e, { t: c } = Z("ui"), l = en(), m = $(
3704
- () => hn(t.visibleSteps, a),
3705
- [t.visibleSteps, a]
3706
- ), p = xt(i, a), f = Math.max(0, m.indexOf(p)), v = m.length, h = $(
3702
+ const { cascade: t, value: s, activeStep: i, setActiveStep: r, datePickerStyle: c } = e, { t: a } = Z("ui"), l = en(), m = $(
3703
+ () => hn(t.visibleSteps, c),
3704
+ [t.visibleSteps, c]
3705
+ ), p = St(i, c), f = Math.max(0, m.indexOf(p)), v = m.length, h = $(
3707
3706
  () => m.map((u) => ({ label: l[u] })),
3708
3707
  [m, l]
3709
- ), d = f > 0, g = p === 5 && a === "four-day-grid", I = f < v - 1 && je(p, s) && (!g || je(6, s));
3708
+ ), d = f > 0, g = p === 5 && c === "four-day-grid", I = f < v - 1 && je(p, s) && (!g || je(6, s));
3710
3709
  return /* @__PURE__ */ S("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
3711
3710
  /* @__PURE__ */ n(bs, { activeStep: f, steps: h }),
3712
3711
  /* @__PURE__ */ n(re, { step: p, active: !0, children: Ne(p, e, { compactService: !0 }) }),
@@ -3721,7 +3720,7 @@ function mi(e) {
3721
3720
  const u = m[f - 1];
3722
3721
  u && r(u);
3723
3722
  },
3724
- children: c("booking.actions.back")
3723
+ children: a("booking.actions.back")
3725
3724
  }
3726
3725
  ),
3727
3726
  p < 7 ? /* @__PURE__ */ n(
@@ -3734,7 +3733,7 @@ function mi(e) {
3734
3733
  const u = m[f + 1];
3735
3734
  u && r(u);
3736
3735
  },
3737
- children: c("booking.actions.next")
3736
+ children: a("booking.actions.next")
3738
3737
  }
3739
3738
  ) : null
3740
3739
  ] })
@@ -3754,8 +3753,8 @@ const hi = Cn(
3754
3753
  useSpecialties: s,
3755
3754
  allowOperatorSelection: i = !1,
3756
3755
  lockedOperatorId: r,
3757
- operatorsByService: a = !1,
3758
- autoSelectSingleService: c = !1,
3756
+ operatorsByService: c = !1,
3757
+ autoSelectSingleService: a = !1,
3759
3758
  specialties: l,
3760
3759
  services: m,
3761
3760
  operators: p,
@@ -3801,25 +3800,25 @@ const hi = Cn(
3801
3800
  loadingSlots: Pe,
3802
3801
  submitting: ee,
3803
3802
  submitError: le,
3804
- mode: Mt = "live",
3803
+ mode: Dt = "live",
3805
3804
  showModifyOnSuccess: Ve = !0,
3806
3805
  surface: nt = "flat",
3807
3806
  emptyServicesSlot: z,
3808
3807
  onboardingIncompleteSlot: Ae,
3809
3808
  "aria-label": tn,
3810
3809
  id: He,
3811
- className: Ot,
3810
+ className: Mt,
3812
3811
  onFocus: ct,
3813
3812
  onBlur: Ge,
3814
3813
  ...De
3815
3814
  }, nn) => {
3816
- var wt, Ct, Tt;
3817
- const { t: ae, i18n: Et } = Z("ui"), ue = e ?? "inline-list", $e = Et.language ?? "en", Me = l ?? pi, he = p ?? fi;
3815
+ var Nt, wt, Ct;
3816
+ const { t: ae, i18n: Ot } = Z("ui"), ue = e ?? "inline-list", $e = Ot.language ?? "en", Me = l ?? pi, he = p ?? fi;
3818
3817
  q(() => {
3819
3818
  const o = ur(E, {
3820
3819
  useSpecialties: s,
3821
3820
  lockedOperatorId: r,
3822
- autoSelectSingleService: c,
3821
+ autoSelectSingleService: a,
3823
3822
  specialties: Me,
3824
3823
  services: m
3825
3824
  });
@@ -3827,7 +3826,7 @@ const hi = Cn(
3827
3826
  }, [
3828
3827
  r,
3829
3828
  s,
3830
- c,
3829
+ a,
3831
3830
  Me,
3832
3831
  m
3833
3832
  ]);
@@ -3837,7 +3836,7 @@ const hi = Cn(
3837
3836
  useSpecialties: s,
3838
3837
  allowOperatorSelection: i,
3839
3838
  lockedOperatorId: r,
3840
- operatorsByService: a,
3839
+ operatorsByService: c,
3841
3840
  specialties: Me,
3842
3841
  services: m,
3843
3842
  operators: he,
@@ -3849,8 +3848,8 @@ const hi = Cn(
3849
3848
  s,
3850
3849
  i,
3851
3850
  r,
3852
- a,
3853
3851
  c,
3852
+ a,
3854
3853
  Me,
3855
3854
  m,
3856
3855
  he,
@@ -3912,9 +3911,9 @@ const hi = Cn(
3912
3911
  const pe = M(null), qe = $(
3913
3912
  () => hn(V.visibleSteps, te),
3914
3913
  [V.visibleSteps, te]
3915
- ), Ft = en(), [Ee, ze] = H(""), Ye = M(null), Ie = M(null);
3914
+ ), Et = en(), [Ee, ze] = H(""), Ye = M(null), Ie = M(null);
3916
3915
  q(() => {
3917
- const o = xt(de, te);
3916
+ const o = St(de, te);
3918
3917
  if (Ie.current === null) {
3919
3918
  Ie.current = o;
3920
3919
  return;
@@ -3926,7 +3925,7 @@ const hi = Cn(
3926
3925
  y === -1 ? "" : ae("booking.stepAnnouncement", {
3927
3926
  current: y + 1,
3928
3927
  total: qe.length,
3929
- label: Ft[o]
3928
+ label: Et[o]
3930
3929
  })
3931
3930
  );
3932
3931
  const T = Ye.current;
@@ -3935,17 +3934,17 @@ const hi = Cn(
3935
3934
  if (!U) return;
3936
3935
  const ye = document.activeElement;
3937
3936
  if (!(ye === null || ye === document.body || !U.contains(ye))) return;
3938
- const qt = U.querySelector(oi) ?? U;
3939
- if (qt.focus({ preventScroll: !0 }), typeof qt.scrollIntoView == "function")
3937
+ const $t = U.querySelector(oi) ?? U;
3938
+ if ($t.focus({ preventScroll: !0 }), typeof $t.scrollIntoView == "function")
3940
3939
  try {
3941
- qt.scrollIntoView({
3940
+ $t.scrollIntoView({
3942
3941
  behavior: gi() ? "auto" : "smooth",
3943
3942
  block: "nearest"
3944
3943
  });
3945
3944
  } catch {
3946
- qt.scrollIntoView();
3945
+ $t.scrollIntoView();
3947
3946
  }
3948
- }, [de, te, qe, Ft, ae]);
3947
+ }, [de, te, qe, Et, ae]);
3949
3948
  const K = Lr({
3950
3949
  services: m,
3951
3950
  value: E,
@@ -3959,7 +3958,7 @@ const hi = Cn(
3959
3958
  codeStep: Q
3960
3959
  }), j = K.status, lt = K.submit, it = M(K.reset);
3961
3960
  it.current = K.reset;
3962
- const ut = M(!1), [Rt, _t] = H(!1);
3961
+ const ut = M(!1), [Ft, Rt] = H(!1);
3963
3962
  q(() => {
3964
3963
  var y, T;
3965
3964
  if (!ut.current || j !== "idle") return;
@@ -3969,7 +3968,7 @@ const hi = Cn(
3969
3968
  );
3970
3969
  o && (o.focus({ preventScroll: !0 }), (T = o.scrollIntoView) == null || T.call(o, { block: "nearest" }));
3971
3970
  }, [j]);
3972
- const Ze = at(), mt = M(null), pt = M(null), Lt = ((wt = K.state) == null ? void 0 : wt.status) === "failed", ft = K.state && "phase" in K.state && K.state.phase === "completion";
3971
+ const Ze = at(), mt = M(null), pt = M(null), _t = ((Nt = K.state) == null ? void 0 : Nt.status) === "failed", ft = K.state && "phase" in K.state && K.state.phase === "completion";
3973
3972
  q(() => {
3974
3973
  var o, y;
3975
3974
  if (j === "payment") {
@@ -3978,9 +3977,9 @@ const hi = Cn(
3978
3977
  }
3979
3978
  }, [j, ft]), q(() => {
3980
3979
  var o;
3981
- j === "payment" && Lt && ((o = pt.current) == null || o.focus());
3982
- }, [j, Lt]), ss(nn, () => pe.current, []);
3983
- const Fe = j === "success" ? 8 : j === "payment" || j === "code" ? 7 : V.currentStep, Bt = M(null), gt = M(0);
3980
+ j === "payment" && _t && ((o = pt.current) == null || o.focus());
3981
+ }, [j, _t]), ss(nn, () => pe.current, []);
3982
+ const Fe = j === "success" ? 8 : j === "payment" || j === "code" ? 7 : V.currentStep, Lt = M(null), gt = M(0);
3984
3983
  an(() => {
3985
3984
  var o;
3986
3985
  (j === "submitting" || j === "code" || j === "payment") && (gt.current = ((o = pe.current) == null ? void 0 : o.offsetHeight) ?? 0);
@@ -3991,8 +3990,8 @@ const hi = Cn(
3991
3990
  `${gt.current}px`
3992
3991
  ), gt.current = 0);
3993
3992
  }, [Fe]), q(() => {
3994
- if (Fe === Bt.current) return;
3995
- Bt.current = Fe, Be == null || Be(Fe);
3993
+ if (Fe === Lt.current) return;
3994
+ Lt.current = Fe, Be == null || Be(Fe);
3996
3995
  const o = pe.current;
3997
3996
  if (Fe !== 8 || !o) return;
3998
3997
  const y = () => o.style.removeProperty("--booking-held-height");
@@ -4002,7 +4001,7 @@ const hi = Cn(
4002
4001
  q(() => {
4003
4002
  Xe.current = { activeStep: de, cascade: V, submitState: j };
4004
4003
  }, [de, V, j]);
4005
- const Pt = $(
4004
+ const Bt = $(
4006
4005
  () => ({
4007
4006
  getVariant: () => ue,
4008
4007
  getCurrentStep: () => {
@@ -4019,8 +4018,8 @@ const hi = Cn(
4019
4018
  }),
4020
4019
  [ue, J]
4021
4020
  );
4022
- rs(sr, Pt, He);
4023
- const ht = tn ?? ae("booking.regionLabel"), ve = K.snapshot, Vt = j === "success" && ve ? /* @__PURE__ */ n(
4021
+ rs(sr, Bt, He);
4022
+ const ht = tn ?? ae("booking.regionLabel"), ve = K.snapshot, Pt = j === "success" && ve ? /* @__PURE__ */ n(
4024
4023
  ii,
4025
4024
  {
4026
4025
  codeVerified: K.codeVerified,
@@ -4033,15 +4032,15 @@ const hi = Cn(
4033
4032
  ...ve.value,
4034
4033
  slot: ve.slot,
4035
4034
  details: ve.details,
4036
- serviceId: ((Ct = ve.payment) == null ? void 0 : Ct.serviceId) ?? ve.slot.serviceId ?? ve.value.serviceId
4035
+ serviceId: ((wt = ve.payment) == null ? void 0 : wt.serviceId) ?? ve.slot.serviceId ?? ve.value.serviceId
4037
4036
  },
4038
4037
  operators: he,
4039
4038
  specialties: Me,
4040
4039
  services: m,
4041
4040
  locale: $e,
4042
- mode: Mt,
4041
+ mode: Dt,
4043
4042
  showModify: Ve && !ve.payment && !K.codeVerified,
4044
- onReset: () => Pt.reset(),
4043
+ onReset: () => Bt.reset(),
4045
4044
  focusWasLost: () => {
4046
4045
  const o = Ye.current, y = document.activeElement;
4047
4046
  return !!(o && !o.isConnected) && (!y || y === document.body);
@@ -4056,14 +4055,14 @@ const hi = Cn(
4056
4055
  ...K.codeStep,
4057
4056
  ...Q,
4058
4057
  onVerified: K.completeCode,
4059
- onBusyChange: _t
4058
+ onBusyChange: Rt
4060
4059
  }
4061
4060
  ) : null, vt = K.activeSession, se = K.state, be = vt && se ? {
4062
4061
  session: vt,
4063
4062
  payment: vt.payment,
4064
4063
  state: se,
4065
- billing: (Tt = K.snapshot) == null ? void 0 : Tt.details.billing
4066
- } : void 0, Qe = se && "phase" in se && se.phase === "completion", $t = j === "payment" && be ? /* @__PURE__ */ S(
4064
+ billing: (Ct = K.snapshot) == null ? void 0 : Ct.details.billing
4065
+ } : void 0, Qe = se && "phase" in se && se.phase === "completion", Vt = j === "payment" && be ? /* @__PURE__ */ S(
4067
4066
  "section",
4068
4067
  {
4069
4068
  "aria-labelledby": Ze,
@@ -4109,7 +4108,7 @@ const hi = Cn(
4109
4108
  ref: pt,
4110
4109
  variant: "error",
4111
4110
  tabIndex: -1,
4112
- className: St,
4111
+ className: Wt,
4113
4112
  children: /* @__PURE__ */ n(oe.Description, { children: be.state.error ?? ae(
4114
4113
  Qe ? "booking.payment.completionFailed" : "booking.payment.failed"
4115
4114
  ) })
@@ -4118,7 +4117,7 @@ const hi = Cn(
4118
4117
  Qe ? D == null ? void 0 : D(be) : B == null ? void 0 : B(be)
4119
4118
  ]
4120
4119
  }
4121
- ) : null, It = $(() => {
4120
+ ) : null, xt = $(() => {
4122
4121
  const o = new Set(Ue(E)), y = m.filter((T) => o.has(T.id)).map((T) => {
4123
4122
  var U;
4124
4123
  return {
@@ -4130,7 +4129,7 @@ const hi = Cn(
4130
4129
  return y.length === 1 ? y[0].text : y.map((T) => `${T.label}: ${T.text}`).join(`
4131
4130
 
4132
4131
  `);
4133
- }, [m, E]), Nt = $(() => {
4132
+ }, [m, E]), It = $(() => {
4134
4133
  if (j === "success" || j === "payment") return null;
4135
4134
  const o = ue === "accordion" ? ci : ue === "calendar" ? li : ue === "flexible" ? ui : ue === "progress" ? mi : ai, y = {
4136
4135
  cascade: V,
@@ -4158,7 +4157,7 @@ const hi = Cn(
4158
4157
  privacyPolicyUrl: R,
4159
4158
  termsUrl: _,
4160
4159
  practiceConsent: b,
4161
- criticalInformationToAccept: It,
4160
+ criticalInformationToAccept: xt,
4162
4161
  locked: j === "code",
4163
4162
  payment: K.payment,
4164
4163
  paymentTermsUrl: C,
@@ -4222,7 +4221,7 @@ const hi = Cn(
4222
4221
  R,
4223
4222
  _,
4224
4223
  b,
4225
- It,
4224
+ xt,
4226
4225
  k,
4227
4226
  Y,
4228
4227
  X,
@@ -4257,7 +4256,7 @@ const hi = Cn(
4257
4256
  className: Ur({
4258
4257
  variant: ue,
4259
4258
  surface: nt,
4260
- className: Ot
4259
+ className: Mt
4261
4260
  }),
4262
4261
  tabIndex: -1,
4263
4262
  onFocus: (o) => {
@@ -4292,16 +4291,16 @@ const hi = Cn(
4292
4291
  }
4293
4292
  ),
4294
4293
  K.cancelled ? /* @__PURE__ */ n(oe, { variant: "info", children: /* @__PURE__ */ n(oe.Description, { children: ae("booking.payment.cancelled") }) }) : null,
4295
- Vt ?? $t ?? /* @__PURE__ */ S(ie, { children: [
4294
+ Pt ?? Vt ?? /* @__PURE__ */ S(ie, { children: [
4296
4295
  Q ? /* @__PURE__ */ n(
4297
4296
  "fieldset",
4298
4297
  {
4299
4298
  "data-slot": "booking-form",
4300
4299
  disabled: ne ? !0 : void 0,
4301
4300
  className: "ds:m-0 ds:min-w-0 ds:border-0 ds:p-0",
4302
- children: Nt
4301
+ children: It
4303
4302
  }
4304
- ) : Nt,
4303
+ ) : It,
4305
4304
  ne ? /* @__PURE__ */ S(ie, { children: [
4306
4305
  /* @__PURE__ */ n("div", { className: "ds:flex ds:justify-end", children: /* @__PURE__ */ n(
4307
4306
  we,
@@ -4309,7 +4308,7 @@ const hi = Cn(
4309
4308
  type: "button",
4310
4309
  intent: "ghost",
4311
4310
  size: "md",
4312
- disabled: Rt,
4311
+ disabled: Ft,
4313
4312
  onClick: () => {
4314
4313
  ut.current = !0, it.current();
4315
4314
  },
@@ -4331,4 +4330,4 @@ export {
4331
4330
  Re as O,
4332
4331
  sr as b
4333
4332
  };
4334
- //# sourceMappingURL=booking-CNNtMjXC.js.map
4333
+ //# sourceMappingURL=booking-ya6O9yBv.js.map