@alfadocs/ui-kit-debug 1.125.0 → 1.125.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{reserved.agent-CCwsOb3M.js → reserved.agent-Dxzmi3GS.js} +530 -526
- package/dist/_chunks/reserved.agent-Dxzmi3GS.js.map +1 -0
- package/dist/agent-catalog.json +1 -1
- package/dist/browser-support.js +1 -1
- package/dist/components/booking/booking-types.d.ts +3 -2
- package/dist/components/booking/booking-types.d.ts.map +1 -1
- package/dist/components/booking/booking.d.ts.map +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/_chunks/reserved.agent-CCwsOb3M.js.map +0 -1
|
@@ -11,34 +11,34 @@ import { R as Sr } from "./radio-BZQs6_36.js";
|
|
|
11
11
|
import { R as xr } from "./radio-group-ChIKyeSJ.js";
|
|
12
12
|
import { D as Ir } from "./date-picker-BmVBVpVu.js";
|
|
13
13
|
import { E as Nr } from "./email-input-DxwbREpx.js";
|
|
14
|
-
import { F as
|
|
14
|
+
import { F as We } from "./form-field-CyHfOVKF.js";
|
|
15
15
|
import { P as wr } from "./phone-input-BL8Sj6OG.js";
|
|
16
16
|
import { T as Cr } from "./text-area-COMVJ1yE.js";
|
|
17
17
|
import { T as Yt } from "./text-input-B6iAgCr3.js";
|
|
18
18
|
import { A as Tr } from "./address-fields-BU65pA-V.js";
|
|
19
19
|
import { S as qn } from "./spinner-CoflYlEx.js";
|
|
20
|
-
import { a as
|
|
20
|
+
import { a as an } from "./format-price-CIX0YJZn.js";
|
|
21
21
|
import { C as Ar } from "./credit-card-D9XZsHGA.js";
|
|
22
|
-
import { m as
|
|
22
|
+
import { m as gn } from "./motion-is-off-BvAuNV5O.js";
|
|
23
23
|
import { C as Mr } from "./card-n6W6LW-N.js";
|
|
24
24
|
import { O as Rr } from "./otp-input-gV1446Dw.js";
|
|
25
25
|
import { i as Or } from "./safe-href-5dbsfbQn.js";
|
|
26
26
|
import { B as zn } from "./badge-BUk4RjTS.js";
|
|
27
|
-
import { I as
|
|
28
|
-
import { S as
|
|
29
|
-
import { C as
|
|
30
|
-
import { M as
|
|
27
|
+
import { I as Rn } from "./icon-button-S8_weU3g.js";
|
|
28
|
+
import { S as cn } from "./select-uESzXTX6.js";
|
|
29
|
+
import { C as yn } from "./combobox-BBCVQS-S.js";
|
|
30
|
+
import { M as kn } from "./multi-select-Df3R8lv_.js";
|
|
31
31
|
import { c as Dr } from "./option-row-Dc7BrbK8.js";
|
|
32
|
-
import { S as
|
|
33
|
-
import { E as
|
|
32
|
+
import { S as sn } from "./skeleton-tTWJpvAq.js";
|
|
33
|
+
import { E as Sn } from "./empty-state-DwJ5YNzz.js";
|
|
34
34
|
import { S as Er } from "./stepper-accordion-CYjrmRte.js";
|
|
35
35
|
import { S as Fr } from "./stepper-progress-D6H8wQiV.js";
|
|
36
36
|
import { S as _r } from "./slot-grid-DEZRB4Yb.js";
|
|
37
|
-
import { p as
|
|
37
|
+
import { p as pe } from "./parseISO-Dl4T9peU.js";
|
|
38
38
|
import { C as Br } from "./chevron-down-DWE7GSq9.js";
|
|
39
|
-
import { s as
|
|
40
|
-
import { q as Kn, i as
|
|
41
|
-
import { a as
|
|
39
|
+
import { s as Je, f as rn, a as On } from "./format-ql5WTsYT.js";
|
|
40
|
+
import { q as Kn, i as Zt, a as st, s as Ft, j as Lr, v as Xt } from "./date-picker-variants-DmfVRNDB.js";
|
|
41
|
+
import { a as mn } from "./addDays-CuE8wLqb.js";
|
|
42
42
|
import { s as Pr } from "./subDays-DC99JK7a.js";
|
|
43
43
|
import { c as _e } from "./createLucideIcon-DhHxpK9K.js";
|
|
44
44
|
import { M as Vr, S as $r } from "./sun-Bj9Mr553.js";
|
|
@@ -284,7 +284,7 @@ const bs = {
|
|
|
284
284
|
description: "Sourced from the id prop."
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
|
-
},
|
|
287
|
+
}, hn = [
|
|
288
288
|
"email",
|
|
289
289
|
"whatsapp",
|
|
290
290
|
"sms"
|
|
@@ -314,7 +314,7 @@ function Ss(e) {
|
|
|
314
314
|
return (s = i.operatorIds) == null ? void 0 : s.includes(e.lockedOperatorId);
|
|
315
315
|
}
|
|
316
316
|
)), e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties) {
|
|
317
|
-
const i =
|
|
317
|
+
const i = it(e.value);
|
|
318
318
|
i.length > 0 && (t = t.filter(
|
|
319
319
|
(s) => s.specialtyId !== void 0 && i.includes(s.specialtyId)
|
|
320
320
|
));
|
|
@@ -322,7 +322,7 @@ function Ss(e) {
|
|
|
322
322
|
return t;
|
|
323
323
|
}
|
|
324
324
|
function xs(e) {
|
|
325
|
-
const t = e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties, r =
|
|
325
|
+
const t = e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties, r = Ze(e.value);
|
|
326
326
|
if ((!t || e.operatorsByService) && r.length > 0)
|
|
327
327
|
return e.operators.filter(
|
|
328
328
|
(i) => {
|
|
@@ -331,7 +331,7 @@ function xs(e) {
|
|
|
331
331
|
}
|
|
332
332
|
);
|
|
333
333
|
if (t) {
|
|
334
|
-
const i =
|
|
334
|
+
const i = it(e.value);
|
|
335
335
|
if (i.length > 0)
|
|
336
336
|
return e.operators.filter(
|
|
337
337
|
(s) => {
|
|
@@ -343,11 +343,11 @@ function xs(e) {
|
|
|
343
343
|
return [];
|
|
344
344
|
}
|
|
345
345
|
function Is(e, t) {
|
|
346
|
-
const r = e.country === ys, i = !r || e.value.insuranceType !== void 0, a = (e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties) && i, o =
|
|
346
|
+
const r = e.country === ys, i = !r || e.value.insuranceType !== void 0, a = (e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties) && i, o = it(e.value).length > 0, m = !a || o, p = Ze(e.value).length > 0, f = !m || p, x = t.operators, g = !!e.allowOperatorSelection && f && p && !e.lockedOperatorId && x.length > 1, l = f && p, v = (!l || e.value.date !== void 0) && e.value.date !== void 0, M = (!v || e.value.slotKey !== void 0) && e.value.slotKey !== void 0, N = p && x.length === 0;
|
|
347
347
|
return {
|
|
348
348
|
insurance: r,
|
|
349
349
|
specialty: a,
|
|
350
|
-
service:
|
|
350
|
+
service: m,
|
|
351
351
|
operator: g,
|
|
352
352
|
date: l,
|
|
353
353
|
slot: v,
|
|
@@ -359,20 +359,20 @@ function Ns(e, t) {
|
|
|
359
359
|
const r = [];
|
|
360
360
|
return t.insurance && r.push(1), t.specialty && r.push(2), r.push(3), t.operator && r.push(4), r.push(5), r.push(6), r.push(7), {
|
|
361
361
|
currentStep: r.find(
|
|
362
|
-
(s) => !
|
|
362
|
+
(s) => !Ye(s, e.value)
|
|
363
363
|
) ?? 7,
|
|
364
364
|
visibleSteps: r
|
|
365
365
|
};
|
|
366
366
|
}
|
|
367
|
-
function
|
|
367
|
+
function Ye(e, t) {
|
|
368
368
|
switch (e) {
|
|
369
369
|
case 1:
|
|
370
370
|
return t.insuranceType !== void 0;
|
|
371
371
|
// 0.34.0: array-or-single — satisfied when EITHER form is present.
|
|
372
372
|
case 2:
|
|
373
|
-
return
|
|
373
|
+
return it(t).length > 0;
|
|
374
374
|
case 3:
|
|
375
|
-
return
|
|
375
|
+
return Ze(t).length > 0;
|
|
376
376
|
// Always satisfied, like its gate: "no preference" is a valid answer,
|
|
377
377
|
// whether it is the `'all'` sentinel or an empty multi-select.
|
|
378
378
|
case 4:
|
|
@@ -395,9 +395,9 @@ function ws(e) {
|
|
|
395
395
|
let a;
|
|
396
396
|
if (e.value.date && e.value.slotKey) {
|
|
397
397
|
const f = e.availableSlots[e.value.date];
|
|
398
|
-
f && (a = f.find((
|
|
398
|
+
f && (a = f.find((x) => x.key === e.value.slotKey));
|
|
399
399
|
}
|
|
400
|
-
const o =
|
|
400
|
+
const o = Ze(e.value), c = o.length > 0 ? e.services.find((f) => f.id === o[0]) : void 0, m = it(e.value).length > 0, p = o.length > 0 && e.value.date !== void 0 && e.value.slotKey !== void 0 && (!r.insurance || e.value.insuranceType !== void 0) && (!r.specialty || m);
|
|
401
401
|
return {
|
|
402
402
|
gates: r,
|
|
403
403
|
filtered: t,
|
|
@@ -497,16 +497,16 @@ function Yn(e, t) {
|
|
|
497
497
|
details: void 0
|
|
498
498
|
};
|
|
499
499
|
}
|
|
500
|
-
function
|
|
500
|
+
function it(e) {
|
|
501
501
|
return e.specialtyIds && e.specialtyIds.length > 0 ? e.specialtyIds : e.specialtyId ? [e.specialtyId] : [];
|
|
502
502
|
}
|
|
503
|
-
function
|
|
503
|
+
function Ze(e) {
|
|
504
504
|
return e.serviceIds && e.serviceIds.length > 0 ? e.serviceIds : e.serviceId ? [e.serviceId] : [];
|
|
505
505
|
}
|
|
506
|
-
function
|
|
506
|
+
function vn(e) {
|
|
507
507
|
return e.operatorIds && e.operatorIds.length > 0 ? e.operatorIds : e.operatorId ? [e.operatorId] : [];
|
|
508
508
|
}
|
|
509
|
-
function
|
|
509
|
+
function bn(e, t) {
|
|
510
510
|
return {
|
|
511
511
|
...e,
|
|
512
512
|
date: t,
|
|
@@ -524,7 +524,7 @@ function Zn(e, t) {
|
|
|
524
524
|
function Cs(e, t) {
|
|
525
525
|
let r = e;
|
|
526
526
|
if (t.lockedOperatorId && r.operatorId !== t.lockedOperatorId && (r = { ...r, operatorId: t.lockedOperatorId }), (t.useSpecialties === void 0 ? t.specialties.length > 0 : t.useSpecialties) && t.specialties.length === 1 && r.specialtyId === void 0 && r.specialtyIds === void 0 && (r = { ...r, specialtyId: t.specialties[0].id }), t.autoSelectSingleService) {
|
|
527
|
-
const s =
|
|
527
|
+
const s = it(r), a = s.length > 0 ? t.services.filter(
|
|
528
528
|
(o) => o.specialtyId && s.includes(o.specialtyId)
|
|
529
529
|
) : t.services;
|
|
530
530
|
a.length === 1 && r.serviceId === void 0 && r.serviceIds === void 0 && (r = { ...r, serviceId: a[0].id }, r.operatorId === void 0 && r.operatorIds === void 0 && (r = { ...r, operatorId: qe }));
|
|
@@ -540,25 +540,25 @@ function Ts(e) {
|
|
|
540
540
|
const t = e.trim();
|
|
541
541
|
return /^\+?\d[\d\s\-()]{6,}$/.test(t);
|
|
542
542
|
}
|
|
543
|
-
function
|
|
543
|
+
function xn(e) {
|
|
544
544
|
const t = e && e.length > 0 ? e : ["sms"], r = new Set(t);
|
|
545
|
-
return
|
|
545
|
+
return hn.filter((i) => r.has(i));
|
|
546
546
|
}
|
|
547
547
|
function Qn(e, t) {
|
|
548
548
|
return t ?? (e.length === 1 ? e : ["email"]);
|
|
549
549
|
}
|
|
550
550
|
function As(e, t, r) {
|
|
551
|
-
const i =
|
|
551
|
+
const i = xn(e), s = new Set(i);
|
|
552
552
|
if (r)
|
|
553
|
-
return
|
|
553
|
+
return hn.filter(
|
|
554
554
|
(p) => r.includes(p) && s.has(p)
|
|
555
555
|
);
|
|
556
556
|
const a = [];
|
|
557
557
|
s.has("email") && a.push("email");
|
|
558
558
|
const o = Ts(t), c = s.has("whatsapp");
|
|
559
559
|
c && o && a.push("whatsapp"), !c && s.has("sms") && a.push("sms");
|
|
560
|
-
const
|
|
561
|
-
return
|
|
560
|
+
const m = new Set(a);
|
|
561
|
+
return hn.filter((p) => m.has(p));
|
|
562
562
|
}
|
|
563
563
|
const Ms = /https?:\/\/(?:(?![.,;:!?'»›]https?:\/\/)[^\s<>"\u060C\u061B\u061F\u06D4\u2000-\u206F\u3000-\u303F\uFF00-\uFFEF])+/gi, Rs = /* @__PURE__ */ new Set([
|
|
564
564
|
".",
|
|
@@ -614,7 +614,7 @@ function Ls(e) {
|
|
|
614
614
|
}
|
|
615
615
|
return i(e.slice(r)), t;
|
|
616
616
|
}
|
|
617
|
-
const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 300,
|
|
617
|
+
const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 300, pn = "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)]", Qt = (e) => e && /^https?:\/\//i.test(e) ? e : void 0, $s = (e, t) => ({
|
|
618
618
|
street: (e == null ? void 0 : e.address.line1) ?? "",
|
|
619
619
|
city: (e == null ? void 0 : e.address.city) ?? "",
|
|
620
620
|
postcode: (e == null ? void 0 : e.address.postalCode) ?? "",
|
|
@@ -663,7 +663,7 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
663
663
|
country: e.address.country.trim().toUpperCase()
|
|
664
664
|
}
|
|
665
665
|
};
|
|
666
|
-
},
|
|
666
|
+
}, en = { state: "idle" }, Bn = [
|
|
667
667
|
"firstName",
|
|
668
668
|
"lastName",
|
|
669
669
|
"email",
|
|
@@ -676,7 +676,7 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
676
676
|
X.city,
|
|
677
677
|
X.postcode,
|
|
678
678
|
X.province
|
|
679
|
-
], Hs = /* @__PURE__ */ new Set(),
|
|
679
|
+
], Hs = /* @__PURE__ */ new Set(), In = Vn(
|
|
680
680
|
({
|
|
681
681
|
value: e,
|
|
682
682
|
onChange: t,
|
|
@@ -686,15 +686,15 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
686
686
|
requireCodiceFiscale: a = !1,
|
|
687
687
|
requireDateOfBirth: o = !1,
|
|
688
688
|
requireInsuranceNumber: c = !1,
|
|
689
|
-
insuranceType:
|
|
689
|
+
insuranceType: m,
|
|
690
690
|
showNote: p = !1,
|
|
691
691
|
showReturningPatientFlag: f = !1,
|
|
692
|
-
privacyPolicyUrl:
|
|
692
|
+
privacyPolicyUrl: x,
|
|
693
693
|
termsUrl: g,
|
|
694
694
|
practiceConsent: l,
|
|
695
695
|
payment: h,
|
|
696
696
|
paymentTermsUrl: v,
|
|
697
|
-
paymentBlocked:
|
|
697
|
+
paymentBlocked: u = !1,
|
|
698
698
|
billingInDetails: M = !1,
|
|
699
699
|
paymentNoticeStyle: N = "highlighted",
|
|
700
700
|
criticalInformationToAccept: w,
|
|
@@ -709,13 +709,13 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
709
709
|
singleConfirmationChannel: k = !1,
|
|
710
710
|
submitError: L
|
|
711
711
|
}, F) => {
|
|
712
|
-
var Ae, Jt, It, Nt,
|
|
712
|
+
var Ae, Jt, It, Nt, nt;
|
|
713
713
|
const { t: y, i18n: W } = Q("ui"), ne = pt(), Ne = A(null), ge = A(null);
|
|
714
714
|
_t(() => {
|
|
715
715
|
var d;
|
|
716
716
|
(d = ge.current) == null || d.setAttribute("inert", "");
|
|
717
717
|
}, []);
|
|
718
|
-
const
|
|
718
|
+
const S = Me(
|
|
719
719
|
(d) => {
|
|
720
720
|
Ne.current = d, typeof F == "function" ? F(d) : F && (F.current = d);
|
|
721
721
|
},
|
|
@@ -730,15 +730,15 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
730
730
|
for (const ie of d ?? [])
|
|
731
731
|
if (ie.focus(), document.activeElement === ie) return;
|
|
732
732
|
}, [q]);
|
|
733
|
-
const U = A(!1), [ze, Be] = J(!1), [he, ve] = J(!1), be = D || ze, [ye, Oe] = J(
|
|
733
|
+
const U = A(!1), [ze, Be] = J(!1), [he, ve] = J(!1), be = D || ze, [ye, Oe] = J(en), [De, ke] = J(en), [oe, ae] = J({}), se = Me(
|
|
734
734
|
(d) => ae((E) => ({ ...E, [d]: !0 })),
|
|
735
735
|
[]
|
|
736
|
-
), [
|
|
736
|
+
), [ot, ft] = J(Hs), Le = A(null), at = A(
|
|
737
737
|
null
|
|
738
738
|
);
|
|
739
739
|
V(
|
|
740
740
|
() => () => {
|
|
741
|
-
Le.current && clearTimeout(Le.current),
|
|
741
|
+
Le.current && clearTimeout(Le.current), at.current && clearTimeout(at.current);
|
|
742
742
|
},
|
|
743
743
|
[]
|
|
744
744
|
);
|
|
@@ -755,7 +755,7 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
755
755
|
v
|
|
756
756
|
]) : void 0, [Pt, Tt] = J(
|
|
757
757
|
() => e.paymentAccepted ? Ke : void 0
|
|
758
|
-
), Vt = A(Ke),
|
|
758
|
+
), Vt = A(Ke), Xe = !!(h && e.paymentAccepted && Pt === Ke);
|
|
759
759
|
V(() => {
|
|
760
760
|
Vt.current !== Ke && (Vt.current = Ke, Tt(void 0), e.paymentAccepted !== void 0 && Z({ paymentAccepted: h ? !1 : void 0 }));
|
|
761
761
|
}, [Ke, h, Z, e.paymentAccepted]);
|
|
@@ -769,18 +769,18 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
769
769
|
V(() => {
|
|
770
770
|
qt.current !== we && (qt.current = we, $t(void 0), e.practiceConsentAccepted !== void 0 && Z({ practiceConsentAccepted: void 0 }));
|
|
771
771
|
}, [we, Z, e.practiceConsentAccepted]);
|
|
772
|
-
const ht = h ?
|
|
772
|
+
const ht = h ? an(h.amountCents, h.currencyCode, W.language) : "", Se = Qt(v), Ee = M && !!h && !u, fe = a, ct = ($ || "it").toLowerCase(), vt = !Ee || js(e.billing), dt = $s(e.billing, ct), je = dt.country === "it", bt = A(null), Qe = A(
|
|
773
773
|
null
|
|
774
774
|
), Pe = (Ae = e.billing) == null ? void 0 : Ae.address.line1.trim(), z = ((It = (Jt = e.billing) == null ? void 0 : Jt.address.line2) == null ? void 0 : It.trim()) || null;
|
|
775
775
|
V(() => {
|
|
776
776
|
var d;
|
|
777
|
-
Pe !== void 0 && z ?
|
|
777
|
+
Pe !== void 0 && z ? Qe.current = { street: Pe, line2: z } : (Pe === void 0 || Pe === ((d = Qe.current) == null ? void 0 : d.street)) && (Qe.current = null);
|
|
778
778
|
}, [Pe, z]);
|
|
779
779
|
const Ve = (d) => (
|
|
780
780
|
// Nothing for a block not shown, nor for a province outside Italy.
|
|
781
|
-
!Ee || !oe[X[d]] || d === "province" && !je ? void 0 :
|
|
781
|
+
!Ee || !oe[X[d]] || d === "province" && !je ? void 0 : dt[d].trim() ? (
|
|
782
782
|
// The one format the block itself checks: an Italian CAP.
|
|
783
|
-
d === "postcode" && je && !er.test(
|
|
783
|
+
d === "postcode" && je && !er.test(dt.postcode.trim()) ? y("inputs.postalCode.invalid") : void 0
|
|
784
784
|
) : y("booking.details.fieldRequired")
|
|
785
785
|
), yt = Me(
|
|
786
786
|
() => ae(
|
|
@@ -794,9 +794,9 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
794
794
|
),
|
|
795
795
|
[]
|
|
796
796
|
), Ce = K(
|
|
797
|
-
() =>
|
|
797
|
+
() => xn(j),
|
|
798
798
|
[j]
|
|
799
|
-
), ee = !h && !
|
|
799
|
+
), ee = !h && !u && Ce.length >= 2, xe = K(
|
|
800
800
|
() => k ? [
|
|
801
801
|
(T == null ? void 0 : T.find(
|
|
802
802
|
(d) => Ce.includes(d)
|
|
@@ -814,7 +814,7 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
814
814
|
]
|
|
815
815
|
), kt = A(!1);
|
|
816
816
|
V(() => {
|
|
817
|
-
if (!(h ||
|
|
817
|
+
if (!(h || u)) {
|
|
818
818
|
if (!ee) {
|
|
819
819
|
e.confirmationChannels !== void 0 && Z({ confirmationChannels: void 0 });
|
|
820
820
|
return;
|
|
@@ -831,7 +831,7 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
831
831
|
xe,
|
|
832
832
|
ee,
|
|
833
833
|
h,
|
|
834
|
-
|
|
834
|
+
u,
|
|
835
835
|
Ce,
|
|
836
836
|
e.mobilePhone,
|
|
837
837
|
T,
|
|
@@ -840,15 +840,15 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
840
840
|
const Ue = e.confirmationChannels ?? xe, St = ee && Ue.length === 0, Te = Qn(
|
|
841
841
|
Ce,
|
|
842
842
|
ee ? Ue : void 0
|
|
843
|
-
),
|
|
843
|
+
), lt = !s || Te.includes("email"), Mt = A(C), zt = A(R);
|
|
844
844
|
V(() => {
|
|
845
845
|
Mt.current = C, zt.current = R;
|
|
846
846
|
}, [C, R]);
|
|
847
847
|
const Kt = !!C, He = !!R;
|
|
848
848
|
V(() => {
|
|
849
849
|
const d = e.codiceFiscale;
|
|
850
|
-
if (!
|
|
851
|
-
Oe(
|
|
850
|
+
if (!fe || !Kt || !d) {
|
|
851
|
+
Oe(en);
|
|
852
852
|
return;
|
|
853
853
|
}
|
|
854
854
|
if (!Ps.test(d)) {
|
|
@@ -864,10 +864,10 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
864
864
|
try {
|
|
865
865
|
const ie = Mt.current;
|
|
866
866
|
if (!ie) return;
|
|
867
|
-
const
|
|
867
|
+
const rt = await ie(d);
|
|
868
868
|
E && Oe({
|
|
869
|
-
state:
|
|
870
|
-
hint:
|
|
869
|
+
state: rt.valid ? "valid" : "invalid",
|
|
870
|
+
hint: rt.hint,
|
|
871
871
|
value: d
|
|
872
872
|
});
|
|
873
873
|
} catch {
|
|
@@ -880,15 +880,15 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
880
880
|
}, _n), () => {
|
|
881
881
|
E = !1, Le.current && clearTimeout(Le.current);
|
|
882
882
|
};
|
|
883
|
-
}, [
|
|
884
|
-
const $e = c &&
|
|
883
|
+
}, [fe, Kt, e.codiceFiscale, y]);
|
|
884
|
+
const $e = c && m === "public";
|
|
885
885
|
V(() => {
|
|
886
886
|
const d = e.insuranceNumber;
|
|
887
887
|
if (!$e || !He || !d) {
|
|
888
|
-
ke(
|
|
888
|
+
ke(en);
|
|
889
889
|
return;
|
|
890
890
|
}
|
|
891
|
-
ke({ state: "pending" }),
|
|
891
|
+
ke({ state: "pending" }), at.current && clearTimeout(at.current), at.current = setTimeout(() => {
|
|
892
892
|
const E = zt.current;
|
|
893
893
|
E && E(d).then(
|
|
894
894
|
(ie) => ke(
|
|
@@ -906,19 +906,19 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
906
906
|
var E;
|
|
907
907
|
if (i) return !0;
|
|
908
908
|
const d = s ? (E = e.email) == null ? void 0 : E.trim() : e.email;
|
|
909
|
-
return !
|
|
910
|
-
}, [i, s,
|
|
909
|
+
return !lt && !d ? !0 : !!(d && Vs.test(d));
|
|
910
|
+
}, [i, s, lt, e.email]), H = K(
|
|
911
911
|
() => !!(e.mobilePhone && e.mobilePhone.length >= 6),
|
|
912
912
|
[e.mobilePhone]
|
|
913
913
|
), jt = K(() => {
|
|
914
914
|
var d, E;
|
|
915
|
-
return !(!((d = e.firstName) != null && d.trim()) || !((E = e.lastName) != null && E.trim()) || !G || !H ||
|
|
915
|
+
return !(!((d = e.firstName) != null && d.trim()) || !((E = e.lastName) != null && E.trim()) || !G || !H || fe && (ye.state !== "valid" || ye.value !== e.codiceFiscale) || !vt || o && !e.dateOfBirth || $e && De.state !== "valid");
|
|
916
916
|
}, [
|
|
917
917
|
e.firstName,
|
|
918
918
|
e.lastName,
|
|
919
919
|
G,
|
|
920
920
|
H,
|
|
921
|
-
|
|
921
|
+
fe,
|
|
922
922
|
vt,
|
|
923
923
|
ye.state,
|
|
924
924
|
ye.value,
|
|
@@ -927,9 +927,9 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
927
927
|
e.dateOfBirth,
|
|
928
928
|
$e,
|
|
929
929
|
De.state
|
|
930
|
-
]),
|
|
930
|
+
]), et = w != null && w.trim() ? w : void 0, xt = et !== void 0, ln = !xt || !!e.criticalInformationAccepted, un = !gt || !(l != null && l.required) || le, Ut = !!(e.privacyConsent && e.termsConsent && ln && un), Ht = !ee || Ue.length > 0, ut = jt && Ut && Ht && (!h || Xe) && !u && !be, Rt = !ut && !be && !u, Ot = `${ne}-submit-hint`, te = {
|
|
931
931
|
firstName: oe.firstName && !((Nt = e.firstName) != null && Nt.trim()) ? y("booking.details.firstName.required") : void 0,
|
|
932
|
-
lastName: oe.lastName && !((
|
|
932
|
+
lastName: oe.lastName && !((nt = e.lastName) != null && nt.trim()) ? y("booking.details.lastName.required") : void 0,
|
|
933
933
|
email: !i && oe.email && !G ? y("booking.details.email.invalid") : void 0,
|
|
934
934
|
mobilePhone: oe.mobilePhone && !H ? y("booking.details.mobilePhone.invalid") : void 0,
|
|
935
935
|
codiceFiscale: oe.codiceFiscale && ye.state === "invalid" ? ye.hint ?? y("booking.details.codiceFiscale.invalid") : oe.codiceFiscale && !e.codiceFiscale ? y("booking.details.fieldRequired") : void 0,
|
|
@@ -941,15 +941,15 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
941
941
|
[X.postcode]: Ve("postcode"),
|
|
942
942
|
[X.province]: Ve("province")
|
|
943
943
|
}, Dt = Bn.filter(
|
|
944
|
-
(d) =>
|
|
944
|
+
(d) => ot.has(d) && te[d] !== void 0
|
|
945
945
|
);
|
|
946
|
-
Dt.length !==
|
|
947
|
-
const ue = (d) => !
|
|
948
|
-
var ie,
|
|
949
|
-
if (d.preventDefault(), !be && !U.current && !
|
|
946
|
+
Dt.length !== ot.size && ft(new Set(Dt));
|
|
947
|
+
const ue = (d) => !ot.has(d), tt = async (d) => {
|
|
948
|
+
var ie, rt;
|
|
949
|
+
if (d.preventDefault(), !be && !U.current && !ut && ft(
|
|
950
950
|
new Set(
|
|
951
951
|
Bn.filter(
|
|
952
|
-
(Ge) =>
|
|
952
|
+
(Ge) => ot.has(Ge) || !te[Ge]
|
|
953
953
|
)
|
|
954
954
|
)
|
|
955
955
|
), ae({
|
|
@@ -964,7 +964,7 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
964
964
|
Object.values(X).map((Ge) => [Ge, !0])
|
|
965
965
|
)
|
|
966
966
|
}), be || U.current) return;
|
|
967
|
-
if (!
|
|
967
|
+
if (!ut) {
|
|
968
968
|
Y((Ge) => Ge + 1);
|
|
969
969
|
return;
|
|
970
970
|
}
|
|
@@ -975,7 +975,7 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
975
975
|
mobilePhone: e.mobilePhone,
|
|
976
976
|
// Always present so the platform can refuse a filled or omitted field.
|
|
977
977
|
// Read from the DOM: bots often set the input without firing onChange.
|
|
978
|
-
website: ((
|
|
978
|
+
website: ((rt = ge.current) == null ? void 0 : rt.value) ?? "",
|
|
979
979
|
privacyConsent: !0,
|
|
980
980
|
termsConsent: !0,
|
|
981
981
|
// Only present when the service carried text to accept — a
|
|
@@ -1010,7 +1010,7 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
1010
1010
|
U.current = !1, Be(!1);
|
|
1011
1011
|
}
|
|
1012
1012
|
}, Et = /* @__PURE__ */ n(
|
|
1013
|
-
|
|
1013
|
+
We,
|
|
1014
1014
|
{
|
|
1015
1015
|
label: y("booking.details.codiceFiscale.label"),
|
|
1016
1016
|
required: !0,
|
|
@@ -1030,7 +1030,7 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
1030
1030
|
)
|
|
1031
1031
|
}
|
|
1032
1032
|
), Gt = (d, E) => {
|
|
1033
|
-
const ie =
|
|
1033
|
+
const ie = Qt(E);
|
|
1034
1034
|
return ie ? /* @__PURE__ */ n(
|
|
1035
1035
|
$n,
|
|
1036
1036
|
{
|
|
@@ -1050,7 +1050,7 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
1050
1050
|
href: ie,
|
|
1051
1051
|
target: "_blank",
|
|
1052
1052
|
rel: "noopener noreferrer",
|
|
1053
|
-
className:
|
|
1053
|
+
className: pn
|
|
1054
1054
|
}
|
|
1055
1055
|
)
|
|
1056
1056
|
)
|
|
@@ -1061,10 +1061,10 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
1061
1061
|
return /* @__PURE__ */ b(
|
|
1062
1062
|
"form",
|
|
1063
1063
|
{
|
|
1064
|
-
ref:
|
|
1064
|
+
ref: S,
|
|
1065
1065
|
id: ne,
|
|
1066
1066
|
noValidate: !0,
|
|
1067
|
-
onSubmit:
|
|
1067
|
+
onSubmit: tt,
|
|
1068
1068
|
onFocus: (d) => {
|
|
1069
1069
|
const E = bt.current;
|
|
1070
1070
|
!E || !d.currentTarget.contains(d.target) || !E.contains(d.target) && E.compareDocumentPosition(d.target) & Node.DOCUMENT_POSITION_FOLLOWING && yt();
|
|
@@ -1092,7 +1092,7 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
1092
1092
|
),
|
|
1093
1093
|
/* @__PURE__ */ b("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
|
|
1094
1094
|
/* @__PURE__ */ n(
|
|
1095
|
-
|
|
1095
|
+
We,
|
|
1096
1096
|
{
|
|
1097
1097
|
label: y("booking.details.firstName.label"),
|
|
1098
1098
|
required: !0,
|
|
@@ -1110,7 +1110,7 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
1110
1110
|
}
|
|
1111
1111
|
),
|
|
1112
1112
|
/* @__PURE__ */ n(
|
|
1113
|
-
|
|
1113
|
+
We,
|
|
1114
1114
|
{
|
|
1115
1115
|
label: y("booking.details.lastName.label"),
|
|
1116
1116
|
required: !0,
|
|
@@ -1134,10 +1134,10 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
1134
1134
|
className: `ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)]${i ? "" : " ds:sm:grid-cols-2"}`,
|
|
1135
1135
|
children: [
|
|
1136
1136
|
!i && /* @__PURE__ */ n(
|
|
1137
|
-
|
|
1137
|
+
We,
|
|
1138
1138
|
{
|
|
1139
1139
|
label: y("booking.details.email.label"),
|
|
1140
|
-
...
|
|
1140
|
+
...lt ? { required: !0 } : { optional: !0 },
|
|
1141
1141
|
error: te.email,
|
|
1142
1142
|
announceError: ue("email"),
|
|
1143
1143
|
children: /* @__PURE__ */ n(
|
|
@@ -1152,7 +1152,7 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
1152
1152
|
}
|
|
1153
1153
|
),
|
|
1154
1154
|
/* @__PURE__ */ n(
|
|
1155
|
-
|
|
1155
|
+
We,
|
|
1156
1156
|
{
|
|
1157
1157
|
label: y("booking.details.mobilePhone.label"),
|
|
1158
1158
|
required: !0,
|
|
@@ -1174,10 +1174,10 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
1174
1174
|
]
|
|
1175
1175
|
}
|
|
1176
1176
|
),
|
|
1177
|
-
|
|
1178
|
-
|
|
1177
|
+
fe && !Ee || o ? /* @__PURE__ */ b("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
|
|
1178
|
+
fe && !Ee ? Et : null,
|
|
1179
1179
|
o ? /* @__PURE__ */ n(
|
|
1180
|
-
|
|
1180
|
+
We,
|
|
1181
1181
|
{
|
|
1182
1182
|
label: y("booking.details.dateOfBirth.label"),
|
|
1183
1183
|
required: !0,
|
|
@@ -1198,7 +1198,7 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
1198
1198
|
) : null
|
|
1199
1199
|
] }) : null,
|
|
1200
1200
|
$e ? /* @__PURE__ */ n(
|
|
1201
|
-
|
|
1201
|
+
We,
|
|
1202
1202
|
{
|
|
1203
1203
|
label: y("booking.details.insuranceNumber.label"),
|
|
1204
1204
|
required: !0,
|
|
@@ -1248,11 +1248,11 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
1248
1248
|
}
|
|
1249
1249
|
)
|
|
1250
1250
|
] }),
|
|
1251
|
-
|
|
1251
|
+
fe ? Et : null,
|
|
1252
1252
|
/* @__PURE__ */ n(
|
|
1253
1253
|
Tr,
|
|
1254
1254
|
{
|
|
1255
|
-
value:
|
|
1255
|
+
value: dt,
|
|
1256
1256
|
onChange: (d) => {
|
|
1257
1257
|
var E;
|
|
1258
1258
|
return (
|
|
@@ -1263,7 +1263,7 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
1263
1263
|
"",
|
|
1264
1264
|
// A second line belongs to its street: it goes when the
|
|
1265
1265
|
// patient writes another, and returns with the first.
|
|
1266
|
-
d.street.trim() === ((E =
|
|
1266
|
+
d.street.trim() === ((E = Qe.current) == null ? void 0 : E.street) ? Qe.current.line2 : null
|
|
1267
1267
|
)
|
|
1268
1268
|
})
|
|
1269
1269
|
);
|
|
@@ -1292,7 +1292,7 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
1292
1292
|
}
|
|
1293
1293
|
) : null,
|
|
1294
1294
|
p ? /* @__PURE__ */ n(
|
|
1295
|
-
|
|
1295
|
+
We,
|
|
1296
1296
|
{
|
|
1297
1297
|
label: y("booking.details.note.label"),
|
|
1298
1298
|
optional: !0,
|
|
@@ -1318,7 +1318,7 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
1318
1318
|
label: y("booking.details.returningPatient.label")
|
|
1319
1319
|
}
|
|
1320
1320
|
) : null,
|
|
1321
|
-
|
|
1321
|
+
et !== void 0 ? /* @__PURE__ */ b(
|
|
1322
1322
|
"div",
|
|
1323
1323
|
{
|
|
1324
1324
|
"data-component": "booking-critical-information",
|
|
@@ -1339,7 +1339,7 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
1339
1339
|
{
|
|
1340
1340
|
dir: "auto",
|
|
1341
1341
|
className: "type-body-sm ds:m-0 ds:whitespace-pre-wrap ds:break-words ds:text-[var(--foreground)]",
|
|
1342
|
-
children: Ls(
|
|
1342
|
+
children: Ls(et).map(
|
|
1343
1343
|
(d, E) => d.kind === "link" ? /* @__PURE__ */ n(
|
|
1344
1344
|
"a",
|
|
1345
1345
|
{
|
|
@@ -1347,7 +1347,7 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
1347
1347
|
target: "_blank",
|
|
1348
1348
|
rel: "noopener noreferrer",
|
|
1349
1349
|
dir: "ltr",
|
|
1350
|
-
className:
|
|
1350
|
+
className: pn,
|
|
1351
1351
|
children: d.text
|
|
1352
1352
|
},
|
|
1353
1353
|
E
|
|
@@ -1428,7 +1428,7 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
1428
1428
|
/* @__PURE__ */ n(
|
|
1429
1429
|
wt,
|
|
1430
1430
|
{
|
|
1431
|
-
checked:
|
|
1431
|
+
checked: Xe,
|
|
1432
1432
|
onCheckedChange: (d) => {
|
|
1433
1433
|
Tt(
|
|
1434
1434
|
d === !0 ? Ke : void 0
|
|
@@ -1461,7 +1461,7 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
1461
1461
|
label: /* @__PURE__ */ b(de, { children: [
|
|
1462
1462
|
Gt(
|
|
1463
1463
|
"booking.details.consent.privacy.label",
|
|
1464
|
-
|
|
1464
|
+
x
|
|
1465
1465
|
),
|
|
1466
1466
|
/* @__PURE__ */ n(
|
|
1467
1467
|
"span",
|
|
@@ -1507,14 +1507,14 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
1507
1507
|
},
|
|
1508
1508
|
"aria-required": l.required || void 0,
|
|
1509
1509
|
label: /* @__PURE__ */ b(de, { children: [
|
|
1510
|
-
|
|
1510
|
+
Qt(l.url) ? /* @__PURE__ */ n(
|
|
1511
1511
|
"a",
|
|
1512
1512
|
{
|
|
1513
1513
|
dir: "auto",
|
|
1514
|
-
href:
|
|
1514
|
+
href: Qt(l.url),
|
|
1515
1515
|
target: "_blank",
|
|
1516
1516
|
rel: "noopener noreferrer",
|
|
1517
|
-
className:
|
|
1517
|
+
className: pn,
|
|
1518
1518
|
children: l.label
|
|
1519
1519
|
}
|
|
1520
1520
|
) : /* @__PURE__ */ n("span", { dir: "auto", children: l.label }),
|
|
@@ -1574,8 +1574,8 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
1574
1574
|
)
|
|
1575
1575
|
}
|
|
1576
1576
|
) : null,
|
|
1577
|
-
!_ && (L || he ||
|
|
1578
|
-
|
|
1577
|
+
!_ && (L || he || u) ? /* @__PURE__ */ n(re, { variant: "error", children: /* @__PURE__ */ n(re.Description, { children: L ?? y(
|
|
1578
|
+
u ? "booking.payment.unavailable" : "booking.payment.submitFailed"
|
|
1579
1579
|
) }) }) : null,
|
|
1580
1580
|
_ ? null : /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
1581
1581
|
Rt ? /* @__PURE__ */ n(
|
|
@@ -1593,8 +1593,8 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
1593
1593
|
intent: "primary",
|
|
1594
1594
|
size: "md",
|
|
1595
1595
|
type: "submit",
|
|
1596
|
-
disabled: be ||
|
|
1597
|
-
"aria-disabled": !
|
|
1596
|
+
disabled: be || u,
|
|
1597
|
+
"aria-disabled": !ut || void 0,
|
|
1598
1598
|
"aria-describedby": Rt ? Ot : void 0,
|
|
1599
1599
|
startIcon: be ? /* @__PURE__ */ n(qn, { variant: "pulse", size: "sm" }) : void 0,
|
|
1600
1600
|
children: h ? y("booking.payment.submit", { amount: ht }) : y("booking.details.submit")
|
|
@@ -1606,7 +1606,7 @@ const Fn = 500, Ps = /^[A-Z0-9]{16}$/, Vs = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, _n = 3
|
|
|
1606
1606
|
);
|
|
1607
1607
|
}
|
|
1608
1608
|
);
|
|
1609
|
-
|
|
1609
|
+
In.displayName = "BookingDetailsForm";
|
|
1610
1610
|
const Bt = [
|
|
1611
1611
|
"ds:focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
1612
1612
|
"ds:focus-visible:outline-solid",
|
|
@@ -1620,7 +1620,7 @@ function tr(e, t) {
|
|
|
1620
1620
|
if (o.top >= s && o.bottom <= window.innerHeight - a) return !1;
|
|
1621
1621
|
try {
|
|
1622
1622
|
e.scrollIntoView({
|
|
1623
|
-
behavior:
|
|
1623
|
+
behavior: gn(e) ? "auto" : "smooth",
|
|
1624
1624
|
block: t
|
|
1625
1625
|
});
|
|
1626
1626
|
} catch {
|
|
@@ -1637,24 +1637,24 @@ function Gs(e, t = 1e3) {
|
|
|
1637
1637
|
r = !0, window.removeEventListener("scrollend", i), clearTimeout(s);
|
|
1638
1638
|
};
|
|
1639
1639
|
}
|
|
1640
|
-
function
|
|
1640
|
+
function Nn({
|
|
1641
1641
|
error: e,
|
|
1642
1642
|
loading: t,
|
|
1643
1643
|
onRetry: r,
|
|
1644
1644
|
label: i,
|
|
1645
1645
|
children: s
|
|
1646
1646
|
}) {
|
|
1647
|
-
const { t: a } = Q("ui"), o = A(null), c = A(!1),
|
|
1647
|
+
const { t: a } = Q("ui"), o = A(null), c = A(!1), m = A(!1);
|
|
1648
1648
|
return V(() => {
|
|
1649
|
-
const p =
|
|
1650
|
-
if (
|
|
1649
|
+
const p = m.current && !t;
|
|
1650
|
+
if (m.current = !!t, !c.current || !p) return;
|
|
1651
1651
|
c.current = !1;
|
|
1652
1652
|
const f = o.current;
|
|
1653
1653
|
if (!f || document.activeElement !== f) return;
|
|
1654
|
-
const
|
|
1654
|
+
const x = f.querySelector(
|
|
1655
1655
|
e ? "[data-slot-retry]" : '[data-slot-id]:not(:disabled), [role="gridcell"]:not(:disabled)'
|
|
1656
1656
|
);
|
|
1657
|
-
|
|
1657
|
+
x == null || x.focus({ preventScroll: !0 });
|
|
1658
1658
|
}, [e, t]), !e && !t && !r ? /* @__PURE__ */ n("div", { children: s }) : /* @__PURE__ */ n(
|
|
1659
1659
|
"div",
|
|
1660
1660
|
{
|
|
@@ -1694,7 +1694,7 @@ function Js({
|
|
|
1694
1694
|
onVerified: a,
|
|
1695
1695
|
onBusyChange: o
|
|
1696
1696
|
}) {
|
|
1697
|
-
const { t: c, i18n:
|
|
1697
|
+
const { t: c, i18n: m } = Q("ui"), p = pt(), f = pt(), x = A(null), g = A(null), l = A(null), h = A(null), v = A(!1), u = A(!1), [M, N] = J(null), [w, C] = J(!1), [R, D] = J(null), [_, O] = J(
|
|
1698
1698
|
null
|
|
1699
1699
|
), [$, j] = J(0), T = Number.isFinite(i) ? Math.max(0, Math.ceil(i)) : 60, [k, L] = J(
|
|
1700
1700
|
() => Date.now() + T * 1e3
|
|
@@ -1704,44 +1704,44 @@ function Js({
|
|
|
1704
1704
|
}, [M, o]), V(() => (v.current = !0, () => {
|
|
1705
1705
|
v.current = !1;
|
|
1706
1706
|
}), []), V(() => {
|
|
1707
|
-
var
|
|
1708
|
-
(
|
|
1707
|
+
var S;
|
|
1708
|
+
(S = l.current) == null || S.focus({ preventScroll: !0 }), tr(g.current, "center");
|
|
1709
1709
|
}, [$]), V(() => {
|
|
1710
1710
|
var Y, U;
|
|
1711
1711
|
if (M || !W && _ !== "resend") return;
|
|
1712
|
-
const
|
|
1713
|
-
|
|
1712
|
+
const S = document.activeElement, q = (Y = x.current) == null ? void 0 : Y.closest("section");
|
|
1713
|
+
S && S !== document.body && !(q != null && q.contains(S)) || (h.current && !h.current.disabled ? h.current.focus() : (U = x.current) == null || U.focus());
|
|
1714
1714
|
}, [M, W, _]), V(() => {
|
|
1715
1715
|
if (F === 0) return;
|
|
1716
|
-
const
|
|
1716
|
+
const S = setTimeout(() => {
|
|
1717
1717
|
y(Math.max(0, Math.ceil((k - Date.now()) / 1e3)));
|
|
1718
1718
|
}, 1e3);
|
|
1719
|
-
return () => clearTimeout(
|
|
1719
|
+
return () => clearTimeout(S);
|
|
1720
1720
|
}, [k, F]);
|
|
1721
|
-
const ne = async (
|
|
1722
|
-
if (!(
|
|
1723
|
-
|
|
1721
|
+
const ne = async (S) => {
|
|
1722
|
+
if (!(u.current || W)) {
|
|
1723
|
+
u.current = !0, N("verify"), C(!1), D(null), O(null);
|
|
1724
1724
|
try {
|
|
1725
|
-
const q = await t(
|
|
1725
|
+
const q = await t(S);
|
|
1726
1726
|
if (!v.current) return;
|
|
1727
1727
|
q.ok ? a(q.redirectUrl) : (D(q.reason), q.reason !== "too-many-attempts" && j((Y) => Y + 1));
|
|
1728
1728
|
} catch {
|
|
1729
1729
|
if (!v.current) return;
|
|
1730
1730
|
O("verify"), j((q) => q + 1);
|
|
1731
1731
|
} finally {
|
|
1732
|
-
|
|
1732
|
+
u.current = !1, v.current && N(null);
|
|
1733
1733
|
}
|
|
1734
1734
|
}
|
|
1735
1735
|
}, Ne = async () => {
|
|
1736
|
-
if (!(
|
|
1737
|
-
|
|
1736
|
+
if (!(u.current || Date.now() < k)) {
|
|
1737
|
+
u.current = !0, N("resend"), C(!1), O(null);
|
|
1738
1738
|
try {
|
|
1739
1739
|
if (await r(), !v.current) return;
|
|
1740
|
-
L(Date.now() + T * 1e3), y(T), D(null), C(!0), j((
|
|
1740
|
+
L(Date.now() + T * 1e3), y(T), D(null), C(!0), j((S) => S + 1);
|
|
1741
1741
|
} catch {
|
|
1742
1742
|
v.current && O("resend");
|
|
1743
1743
|
} finally {
|
|
1744
|
-
|
|
1744
|
+
u.current = !1, v.current && N(null);
|
|
1745
1745
|
}
|
|
1746
1746
|
}
|
|
1747
1747
|
}, ge = R === "wrong" ? c("booking.code.wrong") : R === "expired" ? c("booking.code.expired") : W ? c("booking.code.tooManyAttempts") : void 0;
|
|
@@ -1756,7 +1756,7 @@ function Js({
|
|
|
1756
1756
|
/* @__PURE__ */ n(
|
|
1757
1757
|
"h3",
|
|
1758
1758
|
{
|
|
1759
|
-
ref:
|
|
1759
|
+
ref: x,
|
|
1760
1760
|
id: p,
|
|
1761
1761
|
tabIndex: -1,
|
|
1762
1762
|
className: `type-title-card ds:m-0 ${Bt}`,
|
|
@@ -1773,7 +1773,7 @@ function Js({
|
|
|
1773
1773
|
components: { phone: /* @__PURE__ */ n("bdi", {}) }
|
|
1774
1774
|
}
|
|
1775
1775
|
) : c("booking.code.instruction") }),
|
|
1776
|
-
/* @__PURE__ */ n(
|
|
1776
|
+
/* @__PURE__ */ n(We, { label: c("booking.code.label"), error: ge, children: /* @__PURE__ */ n("div", { dir: "ltr", children: /* @__PURE__ */ n(
|
|
1777
1777
|
Rr,
|
|
1778
1778
|
{
|
|
1779
1779
|
ref: l,
|
|
@@ -1797,7 +1797,7 @@ function Js({
|
|
|
1797
1797
|
loading: M === "resend",
|
|
1798
1798
|
onClick: Ne,
|
|
1799
1799
|
children: F > 0 ? c("booking.code.resendCountdown", {
|
|
1800
|
-
seconds: new Intl.NumberFormat(
|
|
1800
|
+
seconds: new Intl.NumberFormat(m.language).format(
|
|
1801
1801
|
F
|
|
1802
1802
|
)
|
|
1803
1803
|
}) : c("booking.code.resend")
|
|
@@ -1841,7 +1841,7 @@ function Ys(e, t, r) {
|
|
|
1841
1841
|
}
|
|
1842
1842
|
return { blocked: i.some((a) => !!a.payment) };
|
|
1843
1843
|
}
|
|
1844
|
-
function
|
|
1844
|
+
function tn(e) {
|
|
1845
1845
|
return e ? JSON.stringify([
|
|
1846
1846
|
e.serviceId,
|
|
1847
1847
|
e.kind,
|
|
@@ -1858,32 +1858,32 @@ function Zs({
|
|
|
1858
1858
|
paymentState: a,
|
|
1859
1859
|
submitting: o,
|
|
1860
1860
|
paymentTermsUrl: c,
|
|
1861
|
-
renderPayment:
|
|
1861
|
+
renderPayment: m,
|
|
1862
1862
|
codeStep: p
|
|
1863
1863
|
}) {
|
|
1864
|
-
var ge,
|
|
1864
|
+
var ge, S, q;
|
|
1865
1865
|
const f = JSON.stringify([
|
|
1866
1866
|
t.insuranceType,
|
|
1867
1867
|
t.specialtyId,
|
|
1868
1868
|
t.specialtyIds,
|
|
1869
|
-
|
|
1869
|
+
Ze(t),
|
|
1870
1870
|
t.operatorId,
|
|
1871
1871
|
t.operatorIds,
|
|
1872
1872
|
t.date,
|
|
1873
1873
|
t.slotKey
|
|
1874
|
-
]),
|
|
1874
|
+
]), x = A(
|
|
1875
1875
|
void 0
|
|
1876
|
-
), l = (t.date ? (ge = r[t.date]) == null ? void 0 : ge.find((Y) => Y.key === t.slotKey) : void 0) ?? (((
|
|
1876
|
+
), l = (t.date ? (ge = r[t.date]) == null ? void 0 : ge.find((Y) => Y.key === t.slotKey) : void 0) ?? (((S = x.current) == null ? void 0 : S.selection) === f ? x.current.slot : void 0), h = Ys(
|
|
1877
1877
|
e,
|
|
1878
|
-
|
|
1878
|
+
Ze(t),
|
|
1879
1879
|
l
|
|
1880
|
-
), v = h.blocked || !!(h.payment && !
|
|
1880
|
+
), v = h.blocked || !!(h.payment && !m), u = JSON.stringify([
|
|
1881
1881
|
f,
|
|
1882
1882
|
l == null ? void 0 : l.serviceId,
|
|
1883
|
-
|
|
1883
|
+
tn(h.payment),
|
|
1884
1884
|
c,
|
|
1885
1885
|
v
|
|
1886
|
-
]), M = h.payment ? JSON.stringify([
|
|
1886
|
+
]), M = h.payment ? JSON.stringify([tn(h.payment), c]) : "", N = A(void 0), w = !!((q = t.details) != null && q.paymentAccepted);
|
|
1887
1887
|
V(() => {
|
|
1888
1888
|
if (!w) N.current = void 0;
|
|
1889
1889
|
else if (M) N.current === void 0 ? N.current = M : N.current !== M && (N.current = void 0, s({
|
|
@@ -1892,17 +1892,17 @@ function Zs({
|
|
|
1892
1892
|
}));
|
|
1893
1893
|
else return;
|
|
1894
1894
|
}, [w, M, s, t]);
|
|
1895
|
-
const C = A(
|
|
1896
|
-
C.current =
|
|
1897
|
-
const [R, D] = J({ status: "idle" }), _ = A(0), O = A(!1), $ = A(!0), j = A(!1), T = A(void 0), k = A(
|
|
1895
|
+
const C = A(u);
|
|
1896
|
+
C.current = u;
|
|
1897
|
+
const [R, D] = J({ status: "idle" }), _ = A(0), O = A(!1), $ = A(!0), j = A(!1), T = A(void 0), k = A(u);
|
|
1898
1898
|
V(() => ($.current = !0, () => {
|
|
1899
1899
|
$.current = !1, _.current += 1;
|
|
1900
1900
|
}), []);
|
|
1901
1901
|
const L = R.status === "payment" || R.status === "code" || R.status === "success";
|
|
1902
1902
|
V(() => {
|
|
1903
|
-
k.current ===
|
|
1904
|
-
}, [
|
|
1905
|
-
const F = L || k.current ===
|
|
1903
|
+
k.current === u || j.current || L || (k.current = u, _.current += 1, O.current = !1, D({ status: "idle" }));
|
|
1904
|
+
}, [u, L]);
|
|
1905
|
+
const F = L || k.current === u ? R.session : void 0, y = K(
|
|
1906
1906
|
() => F && (a == null ? void 0 : a.sessionId) === F.id ? a : F ? { sessionId: F.id, status: "ready" } : void 0,
|
|
1907
1907
|
[F, a]
|
|
1908
1908
|
);
|
|
@@ -1924,20 +1924,20 @@ function Zs({
|
|
|
1924
1924
|
status: "success",
|
|
1925
1925
|
redirectUrl: W.redirectUrl
|
|
1926
1926
|
}));
|
|
1927
|
-
} else W.status === "cancelled" && (_.current += 1, O.current = !1,
|
|
1927
|
+
} else W.status === "cancelled" && (_.current += 1, O.current = !1, x.current = void 0, s({
|
|
1928
1928
|
...t,
|
|
1929
1929
|
details: { ...t.details, paymentAccepted: !1 }
|
|
1930
1930
|
}), D({ status: "idle", cancelled: !0 }));
|
|
1931
1931
|
}, [F, W, s, t, R.status]);
|
|
1932
1932
|
const ne = () => {
|
|
1933
|
-
_.current += 1, O.current = !1, j.current = !1, T.current = void 0,
|
|
1933
|
+
_.current += 1, O.current = !1, j.current = !1, T.current = void 0, x.current = void 0, k.current = C.current, D({ status: "idle" });
|
|
1934
1934
|
}, Ne = async (Y) => {
|
|
1935
1935
|
var ye, Oe, De, ke, oe;
|
|
1936
1936
|
if (!(l != null && l.available) || v || o || O.current || R.status === "payment" || R.status === "code" || j.current || h.payment && !Y.paymentAccepted) return;
|
|
1937
1937
|
O.current = !0;
|
|
1938
1938
|
const U = p ? { ...p } : void 0;
|
|
1939
|
-
|
|
1940
|
-
const ze = ++_.current, Be =
|
|
1939
|
+
x.current = { selection: f, slot: { ...l } };
|
|
1940
|
+
const ze = ++_.current, Be = u;
|
|
1941
1941
|
k.current = Be;
|
|
1942
1942
|
const he = {
|
|
1943
1943
|
slot: { ...l, meta: l.meta ? { ...l.meta } : void 0 },
|
|
@@ -1962,7 +1962,7 @@ function Zs({
|
|
|
1962
1962
|
if (!ve()) return;
|
|
1963
1963
|
if (he.payment) {
|
|
1964
1964
|
const se = ae == null ? void 0 : ae.paymentSession;
|
|
1965
|
-
if (!((oe = se == null ? void 0 : se.id) != null && oe.trim()) ||
|
|
1965
|
+
if (!((oe = se == null ? void 0 : se.id) != null && oe.trim()) || tn(se.payment) !== tn(he.payment)) {
|
|
1966
1966
|
D({ status: "error" });
|
|
1967
1967
|
return;
|
|
1968
1968
|
}
|
|
@@ -2028,25 +2028,25 @@ function ri({
|
|
|
2028
2028
|
details: a,
|
|
2029
2029
|
shouldTakeFocus: o
|
|
2030
2030
|
}) {
|
|
2031
|
-
const { t: c } = Q("ui"),
|
|
2032
|
-
if (clearTimeout(g.current), !!
|
|
2031
|
+
const { t: c } = Q("ui"), m = rr(e), p = sr(t), f = A(null), x = A(null), g = A(void 0), l = pt(), h = A(null), [v, u] = J(!1), [M, N] = J(() => gn(null)), w = () => {
|
|
2032
|
+
if (clearTimeout(g.current), !!m)
|
|
2033
2033
|
try {
|
|
2034
|
-
r ? r(
|
|
2034
|
+
r ? r(m) : window.location.assign(m);
|
|
2035
2035
|
} catch {
|
|
2036
2036
|
}
|
|
2037
2037
|
}, C = () => {
|
|
2038
2038
|
var D;
|
|
2039
|
-
clearTimeout(g.current),
|
|
2039
|
+
clearTimeout(g.current), u(!0), (D = h.current) == null || D.focus({ preventScroll: !0 });
|
|
2040
2040
|
}, R = A(w);
|
|
2041
2041
|
return R.current = w, _t(() => {
|
|
2042
|
-
N(
|
|
2042
|
+
N(gn(f.current));
|
|
2043
2043
|
}, []), V(() => {
|
|
2044
|
-
const D =
|
|
2044
|
+
const D = x.current;
|
|
2045
2045
|
D && f.current && o(f.current) && D.focus({ preventScroll: !0 });
|
|
2046
2046
|
}, []), V(() => {
|
|
2047
|
-
if (!(!
|
|
2047
|
+
if (!(!m || M))
|
|
2048
2048
|
return g.current = setTimeout(() => R.current(), p), () => clearTimeout(g.current);
|
|
2049
|
-
}, [
|
|
2049
|
+
}, [m, p, M]), /* @__PURE__ */ b(
|
|
2050
2050
|
"div",
|
|
2051
2051
|
{
|
|
2052
2052
|
ref: f,
|
|
@@ -2077,9 +2077,9 @@ function ri({
|
|
|
2077
2077
|
/* @__PURE__ */ n(
|
|
2078
2078
|
"h3",
|
|
2079
2079
|
{
|
|
2080
|
-
ref:
|
|
2080
|
+
ref: x,
|
|
2081
2081
|
tabIndex: -1,
|
|
2082
|
-
"aria-describedby":
|
|
2082
|
+
"aria-describedby": m ? l : void 0,
|
|
2083
2083
|
className: "type-title-card ds:m-0 ds:outline-none",
|
|
2084
2084
|
children: c("booking.reserved.heading")
|
|
2085
2085
|
}
|
|
@@ -2087,7 +2087,7 @@ function ri({
|
|
|
2087
2087
|
i || s ? /* @__PURE__ */ n("p", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: i && s ? c("booking.reserved.when", { date: i, time: s }) : i || s }) : null,
|
|
2088
2088
|
a ? /* @__PURE__ */ n("p", { className: "type-body ds:m-0 ds:text-[var(--muted-foreground)]", children: a }) : null
|
|
2089
2089
|
] }),
|
|
2090
|
-
|
|
2090
|
+
m ? /* @__PURE__ */ b(de, { children: [
|
|
2091
2091
|
/* @__PURE__ */ n("p", { id: l, role: "status", className: "type-body ds:m-0", children: c(v || M ? "booking.reserved.stayed" : "booking.reserved.redirecting") }),
|
|
2092
2092
|
M || v || p > ei ? null : (
|
|
2093
2093
|
// Decorative: the sentence above already says a redirect is coming,
|
|
@@ -2187,7 +2187,7 @@ function ai(e) {
|
|
|
2187
2187
|
function ir() {
|
|
2188
2188
|
const { t: e, i18n: t } = Q("ui");
|
|
2189
2189
|
return (r) => {
|
|
2190
|
-
const i = Ws(r), s = (o) =>
|
|
2190
|
+
const i = Ws(r), s = (o) => an(o.amountCents, o.currencyCode, t.language), a = i.price ? "label" in i.price ? i.price.label : s(i.price.amount) : void 0;
|
|
2191
2191
|
return i.payment === "unavailable" ? {
|
|
2192
2192
|
price: a,
|
|
2193
2193
|
payment: e("booking.payment.unavailable"),
|
|
@@ -2202,7 +2202,7 @@ function ir() {
|
|
|
2202
2202
|
};
|
|
2203
2203
|
}
|
|
2204
2204
|
function mt(e) {
|
|
2205
|
-
return
|
|
2205
|
+
return rn(e, "yyyy-MM-dd");
|
|
2206
2206
|
}
|
|
2207
2207
|
const ci = [
|
|
2208
2208
|
"ds:relative ds:flex ds:items-center ds:justify-center",
|
|
@@ -2232,7 +2232,7 @@ function li({
|
|
|
2232
2232
|
locale: i,
|
|
2233
2233
|
loading: s
|
|
2234
2234
|
}) {
|
|
2235
|
-
const { t: a } = Q("ui"), o = K(() => t ? Ft(
|
|
2235
|
+
const { t: a } = Q("ui"), o = K(() => t ? Ft(pe(t)) : e.length > 0 ? Ft(pe(e[0])) : Ft(/* @__PURE__ */ new Date()), [t, e]), [c, m] = J(o), [p, f] = J(null), x = K(() => {
|
|
2236
2236
|
const N = Ft(c), w = Lr(c), C = N.getDay(), R = w.getDate(), D = [];
|
|
2237
2237
|
for (let _ = C; _ > 0; _ -= 1) {
|
|
2238
2238
|
const O = new Date(N);
|
|
@@ -2254,7 +2254,7 @@ function li({
|
|
|
2254
2254
|
year: "numeric"
|
|
2255
2255
|
}).format(c);
|
|
2256
2256
|
} catch {
|
|
2257
|
-
return
|
|
2257
|
+
return rn(c, "MMMM yyyy");
|
|
2258
2258
|
}
|
|
2259
2259
|
}, [c, i]), l = K(() => {
|
|
2260
2260
|
const N = new Date(2024, 0, 7);
|
|
@@ -2264,20 +2264,20 @@ function li({
|
|
|
2264
2264
|
try {
|
|
2265
2265
|
return new Intl.DateTimeFormat(i, { weekday: "short" }).format(R);
|
|
2266
2266
|
} catch {
|
|
2267
|
-
return
|
|
2267
|
+
return rn(R, "EEE");
|
|
2268
2268
|
}
|
|
2269
2269
|
});
|
|
2270
2270
|
}, [i]), h = K(() => new Set(e), [e]), v = Me(
|
|
2271
2271
|
(N) => h.has(mt(N)),
|
|
2272
2272
|
[h]
|
|
2273
|
-
),
|
|
2273
|
+
), u = K(() => {
|
|
2274
2274
|
if (p) return p;
|
|
2275
|
-
if (t) return
|
|
2276
|
-
const N =
|
|
2277
|
-
(w) =>
|
|
2275
|
+
if (t) return pe(t);
|
|
2276
|
+
const N = x.find(
|
|
2277
|
+
(w) => Xt(w, c) && v(w)
|
|
2278
2278
|
);
|
|
2279
|
-
return N || (
|
|
2280
|
-
}, [p, t,
|
|
2279
|
+
return N || (x.find((w) => Xt(w, c)) ?? null);
|
|
2280
|
+
}, [p, t, x, c, v]), M = Me(
|
|
2281
2281
|
(N, w) => {
|
|
2282
2282
|
let C = null;
|
|
2283
2283
|
switch (N.key) {
|
|
@@ -2307,7 +2307,7 @@ function li({
|
|
|
2307
2307
|
default:
|
|
2308
2308
|
return;
|
|
2309
2309
|
}
|
|
2310
|
-
C && (N.preventDefault(),
|
|
2310
|
+
C && (N.preventDefault(), Xt(C, c) || m(Ft(C)), f(C));
|
|
2311
2311
|
},
|
|
2312
2312
|
[v, r, c]
|
|
2313
2313
|
);
|
|
@@ -2319,14 +2319,14 @@ function li({
|
|
|
2319
2319
|
"aria-label": a("common.loading"),
|
|
2320
2320
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
2321
2321
|
children: [
|
|
2322
|
-
/* @__PURE__ */ n(
|
|
2323
|
-
/* @__PURE__ */ n("div", { className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]", children: Array.from({ length: 42 }, (N, w) => /* @__PURE__ */ n(
|
|
2322
|
+
/* @__PURE__ */ n(sn, { variant: "text", width: "40%" }),
|
|
2323
|
+
/* @__PURE__ */ n("div", { className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]", children: Array.from({ length: 42 }, (N, w) => /* @__PURE__ */ n(sn, { variant: "rounded", height: "2.5rem" }, `mg-skel-${w}`)) })
|
|
2324
2324
|
]
|
|
2325
2325
|
}
|
|
2326
2326
|
) : /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
2327
2327
|
/* @__PURE__ */ b("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
2328
2328
|
/* @__PURE__ */ n(
|
|
2329
|
-
|
|
2329
|
+
Rn,
|
|
2330
2330
|
{
|
|
2331
2331
|
icon: /* @__PURE__ */ n(zr, {}),
|
|
2332
2332
|
"aria-label": a("booking.previousMonth"),
|
|
@@ -2334,7 +2334,7 @@ function li({
|
|
|
2334
2334
|
intent: "ghost",
|
|
2335
2335
|
flipIconInRtl: !0,
|
|
2336
2336
|
onClick: () => {
|
|
2337
|
-
|
|
2337
|
+
m((N) => vs(N)), f(null);
|
|
2338
2338
|
}
|
|
2339
2339
|
}
|
|
2340
2340
|
),
|
|
@@ -2347,7 +2347,7 @@ function li({
|
|
|
2347
2347
|
}
|
|
2348
2348
|
),
|
|
2349
2349
|
/* @__PURE__ */ n(
|
|
2350
|
-
|
|
2350
|
+
Rn,
|
|
2351
2351
|
{
|
|
2352
2352
|
icon: /* @__PURE__ */ n(Kr, {}),
|
|
2353
2353
|
"aria-label": a("booking.nextMonth"),
|
|
@@ -2355,7 +2355,7 @@ function li({
|
|
|
2355
2355
|
intent: "ghost",
|
|
2356
2356
|
flipIconInRtl: !0,
|
|
2357
2357
|
onClick: () => {
|
|
2358
|
-
|
|
2358
|
+
m((N) => Kn(N, 1)), f(null);
|
|
2359
2359
|
}
|
|
2360
2360
|
}
|
|
2361
2361
|
)
|
|
@@ -2388,14 +2388,14 @@ function li({
|
|
|
2388
2388
|
{
|
|
2389
2389
|
role: "row",
|
|
2390
2390
|
className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]",
|
|
2391
|
-
children:
|
|
2392
|
-
const D = w * 7 + R, _ =
|
|
2391
|
+
children: x.slice(w * 7, w * 7 + 7).map((C, R) => {
|
|
2392
|
+
const D = w * 7 + R, _ = Xt(C, c), O = _ && v(C), $ = t ? On(C, pe(t)) : !1, j = _ ? $ ? "selected" : O ? "available" : "unavailable" : "outside", T = u ? On(u, C) : !1, k = (() => {
|
|
2393
2393
|
try {
|
|
2394
2394
|
return new Intl.DateTimeFormat(i, {
|
|
2395
2395
|
dateStyle: "full"
|
|
2396
2396
|
}).format(C);
|
|
2397
2397
|
} catch {
|
|
2398
|
-
return
|
|
2398
|
+
return rn(C, "PPP");
|
|
2399
2399
|
}
|
|
2400
2400
|
})();
|
|
2401
2401
|
return /* @__PURE__ */ n(
|
|
@@ -2458,7 +2458,7 @@ function mi({
|
|
|
2458
2458
|
onSelect: r,
|
|
2459
2459
|
showDuration: i
|
|
2460
2460
|
}) {
|
|
2461
|
-
const { t: s } = Q("ui"), a = ir(), o = pt(), [c,
|
|
2461
|
+
const { t: s } = Q("ui"), a = ir(), o = pt(), [c, m] = J(() => {
|
|
2462
2462
|
if (t) {
|
|
2463
2463
|
const g = e.findIndex((l) => l.id === t);
|
|
2464
2464
|
if (g >= 0) return g;
|
|
@@ -2467,7 +2467,7 @@ function mi({
|
|
|
2467
2467
|
}), p = A(/* @__PURE__ */ new Map()), f = Me((g) => {
|
|
2468
2468
|
var l;
|
|
2469
2469
|
(l = p.current.get(g)) == null || l.focus();
|
|
2470
|
-
}, []),
|
|
2470
|
+
}, []), x = Me(
|
|
2471
2471
|
(g, l, h) => {
|
|
2472
2472
|
const v = e.length;
|
|
2473
2473
|
if (v !== 0)
|
|
@@ -2475,25 +2475,25 @@ function mi({
|
|
|
2475
2475
|
case "ArrowDown":
|
|
2476
2476
|
case "ArrowRight": {
|
|
2477
2477
|
g.preventDefault();
|
|
2478
|
-
const
|
|
2479
|
-
u
|
|
2478
|
+
const u = (l + 1) % v;
|
|
2479
|
+
m(u), f(u);
|
|
2480
2480
|
break;
|
|
2481
2481
|
}
|
|
2482
2482
|
case "ArrowUp":
|
|
2483
2483
|
case "ArrowLeft": {
|
|
2484
2484
|
g.preventDefault();
|
|
2485
|
-
const
|
|
2486
|
-
u
|
|
2485
|
+
const u = (l - 1 + v) % v;
|
|
2486
|
+
m(u), f(u);
|
|
2487
2487
|
break;
|
|
2488
2488
|
}
|
|
2489
2489
|
case "Home": {
|
|
2490
|
-
g.preventDefault(),
|
|
2490
|
+
g.preventDefault(), m(0), f(0);
|
|
2491
2491
|
break;
|
|
2492
2492
|
}
|
|
2493
2493
|
case "End": {
|
|
2494
2494
|
g.preventDefault();
|
|
2495
|
-
const
|
|
2496
|
-
u
|
|
2495
|
+
const u = v - 1;
|
|
2496
|
+
m(u), f(u);
|
|
2497
2497
|
break;
|
|
2498
2498
|
}
|
|
2499
2499
|
case "Enter":
|
|
@@ -2513,13 +2513,13 @@ function mi({
|
|
|
2513
2513
|
id: o,
|
|
2514
2514
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
2515
2515
|
children: e.map((g, l) => {
|
|
2516
|
-
const h = t === g.id, v = c === l, { price:
|
|
2516
|
+
const h = t === g.id, v = c === l, { price: u, payment: M, paymentTone: N } = a(g), w = u ? M ? s("booking.serviceCardLabelPayment", {
|
|
2517
2517
|
label: g.label,
|
|
2518
|
-
price:
|
|
2518
|
+
price: u,
|
|
2519
2519
|
payment: M
|
|
2520
2520
|
}) : s("booking.serviceCardLabelPrice", {
|
|
2521
2521
|
label: g.label,
|
|
2522
|
-
price:
|
|
2522
|
+
price: u
|
|
2523
2523
|
}) : M ? s("booking.serviceCardLabelPaymentNoPrice", {
|
|
2524
2524
|
label: g.label,
|
|
2525
2525
|
payment: M
|
|
@@ -2539,8 +2539,8 @@ function mi({
|
|
|
2539
2539
|
"aria-label": w,
|
|
2540
2540
|
tabIndex: v ? 0 : -1,
|
|
2541
2541
|
onClick: () => r(g.id),
|
|
2542
|
-
onFocus: () =>
|
|
2543
|
-
onKeyDown: (R) =>
|
|
2542
|
+
onFocus: () => m(l),
|
|
2543
|
+
onKeyDown: (R) => x(R, l, g.id),
|
|
2544
2544
|
className: ui({
|
|
2545
2545
|
state: h ? "selected" : "idle"
|
|
2546
2546
|
}),
|
|
@@ -2568,16 +2568,16 @@ function mi({
|
|
|
2568
2568
|
className: Dr({ tone: N }),
|
|
2569
2569
|
children: M
|
|
2570
2570
|
}
|
|
2571
|
-
) :
|
|
2571
|
+
) : u || !i ? null : /* @__PURE__ */ n("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: s("booking.serviceSummary", {
|
|
2572
2572
|
minutes: g.durationMin
|
|
2573
2573
|
}) })
|
|
2574
2574
|
] }),
|
|
2575
|
-
|
|
2575
|
+
u ? /* @__PURE__ */ n(
|
|
2576
2576
|
"span",
|
|
2577
2577
|
{
|
|
2578
2578
|
"aria-hidden": "true",
|
|
2579
2579
|
className: "ds:inline-flex ds:shrink-0 ds:items-center ds:ms-auto",
|
|
2580
|
-
children: /* @__PURE__ */ n(zn, { variant: "accentSoft", size: "lg", children:
|
|
2580
|
+
children: /* @__PURE__ */ n(zn, { variant: "accentSoft", size: "lg", children: u })
|
|
2581
2581
|
}
|
|
2582
2582
|
) : null
|
|
2583
2583
|
]
|
|
@@ -2618,7 +2618,7 @@ function fi(e) {
|
|
|
2618
2618
|
const [t] = e.split(":").map((i) => parseInt(i, 10)), r = Number.isFinite(t) ? t : 0;
|
|
2619
2619
|
return r < 12 ? "morning" : r < 17 ? "afternoon" : "evening";
|
|
2620
2620
|
}
|
|
2621
|
-
function
|
|
2621
|
+
function on(e, t, r) {
|
|
2622
2622
|
if (!e) return t;
|
|
2623
2623
|
try {
|
|
2624
2624
|
return new Intl.DateTimeFormat(r, {
|
|
@@ -2643,13 +2643,13 @@ function hi({
|
|
|
2643
2643
|
loading: a,
|
|
2644
2644
|
locale: o
|
|
2645
2645
|
}) {
|
|
2646
|
-
const { t: c } = Q("ui"),
|
|
2646
|
+
const { t: c } = Q("ui"), m = K(() => {
|
|
2647
2647
|
try {
|
|
2648
2648
|
return new Intl.DateTimeFormat(o, {
|
|
2649
2649
|
weekday: "long",
|
|
2650
2650
|
day: "numeric",
|
|
2651
2651
|
month: "long"
|
|
2652
|
-
}).format(
|
|
2652
|
+
}).format(pe(t));
|
|
2653
2653
|
} catch {
|
|
2654
2654
|
return t;
|
|
2655
2655
|
}
|
|
@@ -2662,19 +2662,19 @@ function hi({
|
|
|
2662
2662
|
for (const l of r)
|
|
2663
2663
|
g[fi(l.time)].push(l);
|
|
2664
2664
|
return g;
|
|
2665
|
-
}, [r]), f = r.filter((g) => g.available).length,
|
|
2665
|
+
}, [r]), f = r.filter((g) => g.available).length, x = ["morning", "afternoon", "evening"];
|
|
2666
2666
|
return a ? /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
2667
|
-
/* @__PURE__ */ n(
|
|
2667
|
+
/* @__PURE__ */ n(sn, { variant: "text", width: "60%" }),
|
|
2668
2668
|
[0, 1].map((g) => /* @__PURE__ */ n(
|
|
2669
2669
|
"div",
|
|
2670
2670
|
{
|
|
2671
2671
|
className: "ds:grid ds:grid-cols-3 ds:gap-[var(--spacing-xs)]",
|
|
2672
|
-
children: [0, 1, 2].map((l) => /* @__PURE__ */ n(
|
|
2672
|
+
children: [0, 1, 2].map((l) => /* @__PURE__ */ n(sn, { variant: "rounded", height: "44px" }, l))
|
|
2673
2673
|
},
|
|
2674
2674
|
g
|
|
2675
2675
|
))
|
|
2676
2676
|
] }) : f === 0 ? /* @__PURE__ */ n(
|
|
2677
|
-
|
|
2677
|
+
Sn,
|
|
2678
2678
|
{
|
|
2679
2679
|
variant: "no-results",
|
|
2680
2680
|
title: c("booking.noSlotsForDate"),
|
|
@@ -2690,11 +2690,11 @@ function hi({
|
|
|
2690
2690
|
className: "ds:size-4 ds:text-[color:var(--accent)]"
|
|
2691
2691
|
}
|
|
2692
2692
|
),
|
|
2693
|
-
/* @__PURE__ */ n("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children:
|
|
2693
|
+
/* @__PURE__ */ n("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: m })
|
|
2694
2694
|
] }),
|
|
2695
2695
|
/* @__PURE__ */ n("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: c("booking.slotsAvailable", { count: f }) })
|
|
2696
2696
|
] }),
|
|
2697
|
-
|
|
2697
|
+
x.map((g) => {
|
|
2698
2698
|
const l = p[g];
|
|
2699
2699
|
if (l.length === 0) return null;
|
|
2700
2700
|
const h = gi[g];
|
|
@@ -2714,20 +2714,20 @@ function hi({
|
|
|
2714
2714
|
"aria-label": c(`booking.timeOfDay.${g}`),
|
|
2715
2715
|
className: "ds:grid ds:grid-cols-3 ds:gap-[var(--spacing-xs)] ds:sm:grid-cols-4",
|
|
2716
2716
|
children: l.map((v) => {
|
|
2717
|
-
const
|
|
2717
|
+
const u = v.key === i, M = v.available ? u ? "selected" : "idle" : "unavailable";
|
|
2718
2718
|
return /* @__PURE__ */ n(
|
|
2719
2719
|
"button",
|
|
2720
2720
|
{
|
|
2721
2721
|
type: "button",
|
|
2722
2722
|
"data-slot-id": v.key,
|
|
2723
2723
|
disabled: !v.available,
|
|
2724
|
-
"aria-pressed":
|
|
2724
|
+
"aria-pressed": u,
|
|
2725
2725
|
"aria-label": c("booking.slotAvailableLabel", {
|
|
2726
|
-
time:
|
|
2726
|
+
time: on(t, v.time, o)
|
|
2727
2727
|
}),
|
|
2728
2728
|
onClick: () => v.available && s(v),
|
|
2729
2729
|
className: pi({ state: M }),
|
|
2730
|
-
children:
|
|
2730
|
+
children: on(t, v.time, o)
|
|
2731
2731
|
},
|
|
2732
2732
|
v.key
|
|
2733
2733
|
);
|
|
@@ -2741,7 +2741,7 @@ function hi({
|
|
|
2741
2741
|
})
|
|
2742
2742
|
] });
|
|
2743
2743
|
}
|
|
2744
|
-
const
|
|
2744
|
+
const nn = 4;
|
|
2745
2745
|
function vi({
|
|
2746
2746
|
availableDates: e,
|
|
2747
2747
|
availableSlots: t,
|
|
@@ -2751,31 +2751,31 @@ function vi({
|
|
|
2751
2751
|
onWindowChange: a,
|
|
2752
2752
|
nextAvailableDate: o,
|
|
2753
2753
|
loadingDates: c,
|
|
2754
|
-
loadingSlots:
|
|
2754
|
+
loadingSlots: m,
|
|
2755
2755
|
slotLoadError: p,
|
|
2756
2756
|
onRetrySlots: f,
|
|
2757
|
-
emptySlotsDescription:
|
|
2757
|
+
emptySlotsDescription: x,
|
|
2758
2758
|
locale: g,
|
|
2759
2759
|
agentIdBase: l
|
|
2760
2760
|
}) {
|
|
2761
2761
|
var Ne, ge;
|
|
2762
|
-
const h = K(() =>
|
|
2763
|
-
e.length > 0 || !!(r.date && !
|
|
2764
|
-
), [
|
|
2762
|
+
const h = K(() => Je(/* @__PURE__ */ new Date()), []), v = A(
|
|
2763
|
+
e.length > 0 || !!(r.date && !Zt(Je(pe(r.date)), h))
|
|
2764
|
+
), [u, M] = J(() => {
|
|
2765
2765
|
if (r.date) {
|
|
2766
|
-
const
|
|
2767
|
-
if (!
|
|
2766
|
+
const S = Je(pe(r.date));
|
|
2767
|
+
if (!st(h, S)) return S;
|
|
2768
2768
|
}
|
|
2769
2769
|
if (e.length > 0) {
|
|
2770
|
-
const
|
|
2771
|
-
if (
|
|
2770
|
+
const S = Je(pe(e[0]));
|
|
2771
|
+
if (st(S, h)) return S;
|
|
2772
2772
|
}
|
|
2773
2773
|
return h;
|
|
2774
2774
|
}), N = K(
|
|
2775
|
-
() =>
|
|
2776
|
-
[
|
|
2777
|
-
), w = K(() => Array.from({ length:
|
|
2778
|
-
const Y =
|
|
2775
|
+
() => mn(u, nn - 1),
|
|
2776
|
+
[u]
|
|
2777
|
+
), w = K(() => Array.from({ length: nn }, (S, q) => {
|
|
2778
|
+
const Y = mn(u, q), U = mt(Y), Be = (t[U] ?? []).map((he) => ({
|
|
2779
2779
|
id: he.key,
|
|
2780
2780
|
// SlotGrid formats `start` as a time via Intl.DateTimeFormat —
|
|
2781
2781
|
// compose a full ISO from the column's date + the slot's HH:mm
|
|
@@ -2784,13 +2784,13 @@ function vi({
|
|
|
2784
2784
|
available: he.available
|
|
2785
2785
|
}));
|
|
2786
2786
|
return { date: U, slots: Be };
|
|
2787
|
-
}), [
|
|
2788
|
-
v.current = !0, M((
|
|
2789
|
-
const q = Pr(
|
|
2790
|
-
return
|
|
2787
|
+
}), [u, t]), C = st(u, h), R = !0, D = Me(() => {
|
|
2788
|
+
v.current = !0, M((S) => {
|
|
2789
|
+
const q = Pr(S, nn);
|
|
2790
|
+
return st(h, q) ? h : q;
|
|
2791
2791
|
});
|
|
2792
2792
|
}, [h]), _ = Me(() => {
|
|
2793
|
-
v.current = !0, M((
|
|
2793
|
+
v.current = !0, M((S) => mn(S, nn));
|
|
2794
2794
|
}, []), O = [
|
|
2795
2795
|
r.serviceId,
|
|
2796
2796
|
(Ne = r.serviceIds) == null ? void 0 : Ne.join(","),
|
|
@@ -2805,36 +2805,40 @@ function vi({
|
|
|
2805
2805
|
T.current = null;
|
|
2806
2806
|
}
|
|
2807
2807
|
v.current = !0;
|
|
2808
|
-
const
|
|
2809
|
-
!
|
|
2810
|
-
const U =
|
|
2811
|
-
return !
|
|
2812
|
-
}) || M(
|
|
2813
|
-
}, [e, $, O, h,
|
|
2814
|
-
|
|
2815
|
-
|
|
2808
|
+
const S = Je(pe(e[0]));
|
|
2809
|
+
!st(S, h) || e.some((Y) => {
|
|
2810
|
+
const U = Je(pe(Y));
|
|
2811
|
+
return !st(U, N) && !Zt(U, u);
|
|
2812
|
+
}) || M(S);
|
|
2813
|
+
}, [e, $, O, h, u, N]), V(() => {
|
|
2814
|
+
if (!r.date) return;
|
|
2815
|
+
const S = Je(pe(r.date));
|
|
2816
|
+
Zt(S, h) || (v.current = !0, !(!Zt(S, u) && !st(S, N)) && M(S));
|
|
2817
|
+
}, [r.date]), V(() => {
|
|
2818
|
+
a == null || a(mt(u), mt(N));
|
|
2819
|
+
}, [u, N, a]);
|
|
2816
2820
|
const k = Me(
|
|
2817
|
-
(
|
|
2821
|
+
(S, q) => {
|
|
2818
2822
|
const Y = typeof q.date == "string" ? q.date : mt(q.date);
|
|
2819
2823
|
i({
|
|
2820
|
-
...Zn(
|
|
2824
|
+
...Zn(bn(r, Y), S.id)
|
|
2821
2825
|
}), s == null || s(Y);
|
|
2822
2826
|
},
|
|
2823
2827
|
[i, s, r]
|
|
2824
|
-
), L = c ||
|
|
2828
|
+
), L = c || m ? "loading" : "default", F = w.some((S) => S.slots.length > 0), W = (o ? [...e, o] : e).filter((S) => st(Je(pe(S)), N)).sort()[0];
|
|
2825
2829
|
return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
2826
2830
|
L !== "loading" && !p && !F && !!W ? /* @__PURE__ */ n(
|
|
2827
2831
|
pr,
|
|
2828
2832
|
{
|
|
2829
2833
|
nextAvailableDate: W,
|
|
2830
2834
|
onJump: () => {
|
|
2831
|
-
v.current = !0, M(
|
|
2835
|
+
v.current = !0, M(Je(pe(W))), s == null || s(W);
|
|
2832
2836
|
},
|
|
2833
2837
|
locale: g
|
|
2834
2838
|
}
|
|
2835
2839
|
) : null,
|
|
2836
2840
|
/* @__PURE__ */ n(
|
|
2837
|
-
|
|
2841
|
+
Nn,
|
|
2838
2842
|
{
|
|
2839
2843
|
label: "slot",
|
|
2840
2844
|
error: p,
|
|
@@ -2845,7 +2849,7 @@ function vi({
|
|
|
2845
2849
|
{
|
|
2846
2850
|
id: l ? `${l}-slots` : void 0,
|
|
2847
2851
|
days: w,
|
|
2848
|
-
emptyDescription:
|
|
2852
|
+
emptyDescription: x,
|
|
2849
2853
|
state: L,
|
|
2850
2854
|
selectedSlotId: r.slotKey,
|
|
2851
2855
|
maxInitialSlotsPerDay: 6,
|
|
@@ -2870,10 +2874,10 @@ function or(e) {
|
|
|
2870
2874
|
onWindowChange: a,
|
|
2871
2875
|
loadingDates: o,
|
|
2872
2876
|
loadingSlots: c,
|
|
2873
|
-
slotLoadError:
|
|
2877
|
+
slotLoadError: m,
|
|
2874
2878
|
onRetrySlots: p,
|
|
2875
2879
|
emptySlotsDescription: f,
|
|
2876
|
-
locale:
|
|
2880
|
+
locale: x,
|
|
2877
2881
|
datePickerStyle: g,
|
|
2878
2882
|
agentIdBase: l
|
|
2879
2883
|
} = e;
|
|
@@ -2889,17 +2893,17 @@ function or(e) {
|
|
|
2889
2893
|
nextAvailableDate: t.nextAvailableDate,
|
|
2890
2894
|
loadingDates: o,
|
|
2891
2895
|
loadingSlots: c,
|
|
2892
|
-
slotLoadError:
|
|
2896
|
+
slotLoadError: m,
|
|
2893
2897
|
onRetrySlots: p,
|
|
2894
2898
|
emptySlotsDescription: f,
|
|
2895
|
-
locale:
|
|
2899
|
+
locale: x,
|
|
2896
2900
|
agentIdBase: l
|
|
2897
2901
|
}
|
|
2898
|
-
) :
|
|
2899
|
-
|
|
2902
|
+
) : m && r.date && e.activeStep > 5 && !o && !c ? null : /* @__PURE__ */ n(
|
|
2903
|
+
Nn,
|
|
2900
2904
|
{
|
|
2901
2905
|
label: "date",
|
|
2902
|
-
error:
|
|
2906
|
+
error: m,
|
|
2903
2907
|
loading: o || c,
|
|
2904
2908
|
onRetry: p,
|
|
2905
2909
|
children: /* @__PURE__ */ n(bi, { ...e })
|
|
@@ -2914,7 +2918,7 @@ function bi(e) {
|
|
|
2914
2918
|
onDateSelect: a,
|
|
2915
2919
|
loadingDates: o,
|
|
2916
2920
|
loadingSlots: c,
|
|
2917
|
-
locale:
|
|
2921
|
+
locale: m,
|
|
2918
2922
|
emptySlotsDescription: p
|
|
2919
2923
|
} = e;
|
|
2920
2924
|
if (!o && !c && r.availableDates.length === 0) {
|
|
@@ -2924,14 +2928,14 @@ function bi(e) {
|
|
|
2924
2928
|
{
|
|
2925
2929
|
nextAvailableDate: r.nextAvailableDate,
|
|
2926
2930
|
onJump: (f) => {
|
|
2927
|
-
s(
|
|
2931
|
+
s(bn(i, f)), a == null || a(f);
|
|
2928
2932
|
},
|
|
2929
|
-
locale:
|
|
2933
|
+
locale: m
|
|
2930
2934
|
}
|
|
2931
2935
|
);
|
|
2932
2936
|
if (p !== void 0)
|
|
2933
2937
|
return /* @__PURE__ */ n(
|
|
2934
|
-
|
|
2938
|
+
Sn,
|
|
2935
2939
|
{
|
|
2936
2940
|
variant: "no-results",
|
|
2937
2941
|
title: t("slotGrid.noSlots"),
|
|
@@ -2945,9 +2949,9 @@ function bi(e) {
|
|
|
2945
2949
|
availableDates: r.availableDates,
|
|
2946
2950
|
selectedDate: i.date,
|
|
2947
2951
|
onSelectDate: (f) => {
|
|
2948
|
-
s(
|
|
2952
|
+
s(bn(i, f)), a == null || a(f);
|
|
2949
2953
|
},
|
|
2950
|
-
locale:
|
|
2954
|
+
locale: m,
|
|
2951
2955
|
loading: o ?? c
|
|
2952
2956
|
}
|
|
2953
2957
|
);
|
|
@@ -2961,12 +2965,12 @@ function ar(e) {
|
|
|
2961
2965
|
loadingSlots: a,
|
|
2962
2966
|
slotLoadError: o,
|
|
2963
2967
|
onRetrySlots: c,
|
|
2964
|
-
emptySlotsDescription:
|
|
2968
|
+
emptySlotsDescription: m,
|
|
2965
2969
|
locale: p,
|
|
2966
2970
|
datePickerStyle: f
|
|
2967
2971
|
} = e;
|
|
2968
2972
|
return f === "four-day-grid" || !r.date || o && e.activeStep <= 5 && !s && !a ? null : /* @__PURE__ */ n(
|
|
2969
|
-
|
|
2973
|
+
Nn,
|
|
2970
2974
|
{
|
|
2971
2975
|
label: "slot",
|
|
2972
2976
|
error: o,
|
|
@@ -2978,9 +2982,9 @@ function ar(e) {
|
|
|
2978
2982
|
date: r.date,
|
|
2979
2983
|
slots: t.availableSlots[r.date] ?? [],
|
|
2980
2984
|
selectedSlotKey: r.slotKey,
|
|
2981
|
-
onSelect: (
|
|
2985
|
+
onSelect: (x) => i(Zn(r, x.key)),
|
|
2982
2986
|
loading: s || a,
|
|
2983
|
-
emptyDescription:
|
|
2987
|
+
emptyDescription: m,
|
|
2984
2988
|
locale: p
|
|
2985
2989
|
}
|
|
2986
2990
|
)
|
|
@@ -2995,7 +2999,7 @@ function cr({ value: e, onChange: t }) {
|
|
|
2995
2999
|
return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
2996
3000
|
/* @__PURE__ */ n("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: r("booking.insurance.heading") }),
|
|
2997
3001
|
/* @__PURE__ */ n(
|
|
2998
|
-
|
|
3002
|
+
cn,
|
|
2999
3003
|
{
|
|
3000
3004
|
options: i,
|
|
3001
3005
|
value: e ?? "",
|
|
@@ -3020,11 +3024,11 @@ function dr({
|
|
|
3020
3024
|
value: p.id,
|
|
3021
3025
|
label: p.label,
|
|
3022
3026
|
dir: "auto"
|
|
3023
|
-
})),
|
|
3027
|
+
})), m = /* @__PURE__ */ n("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: o("booking.specialty.heading") });
|
|
3024
3028
|
return a === "multi-select" && s ? /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
3025
|
-
|
|
3029
|
+
m,
|
|
3026
3030
|
/* @__PURE__ */ n(
|
|
3027
|
-
|
|
3031
|
+
kn,
|
|
3028
3032
|
{
|
|
3029
3033
|
options: c,
|
|
3030
3034
|
value: r ?? [],
|
|
@@ -3035,9 +3039,9 @@ function dr({
|
|
|
3035
3039
|
}
|
|
3036
3040
|
)
|
|
3037
3041
|
] }) : a === "combobox" ? /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
3038
|
-
|
|
3042
|
+
m,
|
|
3039
3043
|
/* @__PURE__ */ n(
|
|
3040
|
-
|
|
3044
|
+
yn,
|
|
3041
3045
|
{
|
|
3042
3046
|
options: c,
|
|
3043
3047
|
value: t ?? "",
|
|
@@ -3048,9 +3052,9 @@ function dr({
|
|
|
3048
3052
|
}
|
|
3049
3053
|
)
|
|
3050
3054
|
] }) : /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
3051
|
-
|
|
3055
|
+
m,
|
|
3052
3056
|
/* @__PURE__ */ n(
|
|
3053
|
-
|
|
3057
|
+
cn,
|
|
3054
3058
|
{
|
|
3055
3059
|
options: c,
|
|
3056
3060
|
value: t ?? "",
|
|
@@ -3071,32 +3075,32 @@ function lr({
|
|
|
3071
3075
|
compact: o,
|
|
3072
3076
|
showDuration: c
|
|
3073
3077
|
}) {
|
|
3074
|
-
const { t:
|
|
3075
|
-
const { price: h, payment: v, paymentTone:
|
|
3078
|
+
const { t: m } = Q("ui"), p = ir(), f = a ?? (o ? "select" : "cards"), x = e.map((l) => {
|
|
3079
|
+
const { price: h, payment: v, paymentTone: u } = p(l);
|
|
3076
3080
|
return {
|
|
3077
3081
|
value: l.id,
|
|
3078
3082
|
// The practice's service name leads the label, so it decides the
|
|
3079
3083
|
// direction, even when the kit's duration is appended after it.
|
|
3080
3084
|
dir: "auto",
|
|
3081
|
-
label: h || v || !c ? l.label : `${l.label} · ${
|
|
3085
|
+
label: h || v || !c ? l.label : `${l.label} · ${m("booking.serviceSummary", {
|
|
3082
3086
|
minutes: l.durationMin
|
|
3083
3087
|
})}`,
|
|
3084
3088
|
...h ? {
|
|
3085
3089
|
endContent: /* @__PURE__ */ n(zn, { variant: "accentSoft", size: "lg", children: h })
|
|
3086
3090
|
} : {},
|
|
3087
|
-
...v ? { description: v, descriptionTone:
|
|
3091
|
+
...v ? { description: v, descriptionTone: u } : {}
|
|
3088
3092
|
};
|
|
3089
|
-
}), g = /* @__PURE__ */ n("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children:
|
|
3093
|
+
}), g = /* @__PURE__ */ n("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: m("booking.service.heading") });
|
|
3090
3094
|
return f === "multi-select" && s ? /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
3091
3095
|
g,
|
|
3092
3096
|
/* @__PURE__ */ n(
|
|
3093
|
-
|
|
3097
|
+
kn,
|
|
3094
3098
|
{
|
|
3095
|
-
options:
|
|
3099
|
+
options: x,
|
|
3096
3100
|
value: r ?? [],
|
|
3097
3101
|
onChange: s,
|
|
3098
|
-
placeholder:
|
|
3099
|
-
"aria-label":
|
|
3102
|
+
placeholder: m("booking.service.placeholder"),
|
|
3103
|
+
"aria-label": m("booking.service.heading"),
|
|
3100
3104
|
allowClear: !0,
|
|
3101
3105
|
wrapOptionLabels: !0
|
|
3102
3106
|
}
|
|
@@ -3104,13 +3108,13 @@ function lr({
|
|
|
3104
3108
|
] }) : f === "combobox" ? /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
3105
3109
|
g,
|
|
3106
3110
|
/* @__PURE__ */ n(
|
|
3107
|
-
|
|
3111
|
+
yn,
|
|
3108
3112
|
{
|
|
3109
|
-
options:
|
|
3113
|
+
options: x,
|
|
3110
3114
|
value: t ?? "",
|
|
3111
3115
|
onValueChange: (l) => i(l === "" ? "" : l),
|
|
3112
|
-
placeholder:
|
|
3113
|
-
"aria-label":
|
|
3116
|
+
placeholder: m("booking.service.placeholder"),
|
|
3117
|
+
"aria-label": m("booking.service.heading"),
|
|
3114
3118
|
clearable: !0,
|
|
3115
3119
|
wrapOptionLabels: !0
|
|
3116
3120
|
}
|
|
@@ -3118,13 +3122,13 @@ function lr({
|
|
|
3118
3122
|
] }) : f === "select" ? /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
3119
3123
|
g,
|
|
3120
3124
|
/* @__PURE__ */ n(
|
|
3121
|
-
|
|
3125
|
+
cn,
|
|
3122
3126
|
{
|
|
3123
|
-
options:
|
|
3127
|
+
options: x,
|
|
3124
3128
|
value: t ?? "",
|
|
3125
3129
|
onValueChange: (l) => i(l),
|
|
3126
|
-
placeholder:
|
|
3127
|
-
"aria-label":
|
|
3130
|
+
placeholder: m("booking.service.placeholder"),
|
|
3131
|
+
"aria-label": m("booking.service.heading"),
|
|
3128
3132
|
showDescriptions: !0,
|
|
3129
3133
|
descriptionInName: !0,
|
|
3130
3134
|
wrapOptionLabels: !0
|
|
@@ -3161,7 +3165,7 @@ function ur({
|
|
|
3161
3165
|
return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
3162
3166
|
c,
|
|
3163
3167
|
/* @__PURE__ */ n(
|
|
3164
|
-
|
|
3168
|
+
kn,
|
|
3165
3169
|
{
|
|
3166
3170
|
options: p,
|
|
3167
3171
|
value: r ?? [],
|
|
@@ -3173,7 +3177,7 @@ function ur({
|
|
|
3173
3177
|
)
|
|
3174
3178
|
] });
|
|
3175
3179
|
}
|
|
3176
|
-
const
|
|
3180
|
+
const m = [
|
|
3177
3181
|
{ value: qe, label: o("booking.operator.all") },
|
|
3178
3182
|
...e.map(
|
|
3179
3183
|
(p) => ({ value: p.id, label: p.name, dir: "auto" })
|
|
@@ -3182,9 +3186,9 @@ function ur({
|
|
|
3182
3186
|
return a === "combobox" ? /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
3183
3187
|
c,
|
|
3184
3188
|
/* @__PURE__ */ n(
|
|
3185
|
-
|
|
3189
|
+
yn,
|
|
3186
3190
|
{
|
|
3187
|
-
options:
|
|
3191
|
+
options: m,
|
|
3188
3192
|
value: t ?? qe,
|
|
3189
3193
|
onValueChange: (p) => i(p === "" ? qe : p),
|
|
3190
3194
|
placeholder: o("booking.operator.placeholder"),
|
|
@@ -3195,9 +3199,9 @@ function ur({
|
|
|
3195
3199
|
] }) : /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
3196
3200
|
c,
|
|
3197
3201
|
/* @__PURE__ */ n(
|
|
3198
|
-
|
|
3202
|
+
cn,
|
|
3199
3203
|
{
|
|
3200
|
-
options:
|
|
3204
|
+
options: m,
|
|
3201
3205
|
value: t ?? qe,
|
|
3202
3206
|
onValueChange: (p) => i(p),
|
|
3203
3207
|
placeholder: o("booking.operator.placeholder"),
|
|
@@ -3223,7 +3227,7 @@ function pr({
|
|
|
3223
3227
|
const { t: i } = Q("ui"), s = K(() => {
|
|
3224
3228
|
try {
|
|
3225
3229
|
return new Intl.DateTimeFormat(r, { dateStyle: "long" }).format(
|
|
3226
|
-
|
|
3230
|
+
pe(e)
|
|
3227
3231
|
);
|
|
3228
3232
|
} catch {
|
|
3229
3233
|
return e;
|
|
@@ -3251,31 +3255,31 @@ function yi({
|
|
|
3251
3255
|
confirmationChannels: a,
|
|
3252
3256
|
snapshot: o,
|
|
3253
3257
|
operators: c,
|
|
3254
|
-
specialties:
|
|
3258
|
+
specialties: m,
|
|
3255
3259
|
services: p,
|
|
3256
3260
|
locale: f,
|
|
3257
|
-
mode:
|
|
3261
|
+
mode: x,
|
|
3258
3262
|
showModify: g,
|
|
3259
3263
|
onReset: l,
|
|
3260
3264
|
onModify: h,
|
|
3261
3265
|
focusWasLost: v
|
|
3262
3266
|
}) {
|
|
3263
|
-
const { t:
|
|
3267
|
+
const { t: u } = Q("ui"), M = A(null);
|
|
3264
3268
|
V(() => {
|
|
3265
3269
|
const T = M.current, k = document.activeElement, L = T == null ? void 0 : T.closest('[data-component="booking"]');
|
|
3266
3270
|
T && (k && (L != null && L.contains(k)) || v()) && T.focus();
|
|
3267
3271
|
}, []);
|
|
3268
|
-
const N =
|
|
3272
|
+
const N = xn(a), C = Qn(
|
|
3269
3273
|
N,
|
|
3270
3274
|
o.details.confirmationChannels
|
|
3271
3275
|
).map(
|
|
3272
|
-
(T) =>
|
|
3273
|
-
), R = s ?
|
|
3274
|
-
|
|
3276
|
+
(T) => u(`booking.confirmation.channel.${T}`)
|
|
3277
|
+
), R = s ? an(s.amountCents, s.currencyCode, f) : "", D = s ? u(
|
|
3278
|
+
x === "demo" ? "booking.payment.paidDemo" : "booking.payment.paidBody",
|
|
3275
3279
|
{ amount: R }
|
|
3276
|
-
) : e ?
|
|
3280
|
+
) : e ? u(x === "demo" ? "booking.code.confirmedDemo" : "booking.code.confirmedBody") : x === "demo" ? u("booking.success.descriptionDemo") : C.length > 1 ? u("booking.success.descriptionMultiple", {
|
|
3277
3281
|
channels: C.join(" · ")
|
|
3278
|
-
}) :
|
|
3282
|
+
}) : u("booking.success.descriptionSingle", {
|
|
3279
3283
|
channel: C[0]
|
|
3280
3284
|
}), _ = K(() => {
|
|
3281
3285
|
if (o.date)
|
|
@@ -3284,7 +3288,7 @@ function yi({
|
|
|
3284
3288
|
weekday: "long",
|
|
3285
3289
|
day: "numeric",
|
|
3286
3290
|
month: "long"
|
|
3287
|
-
}).format(
|
|
3291
|
+
}).format(pe(o.date));
|
|
3288
3292
|
} catch {
|
|
3289
3293
|
return o.date;
|
|
3290
3294
|
}
|
|
@@ -3305,7 +3309,7 @@ function yi({
|
|
|
3305
3309
|
{ type: "element", value: L }
|
|
3306
3310
|
]);
|
|
3307
3311
|
}
|
|
3308
|
-
}, [o.operatorIds, o.operatorId, c, f]), $ = o.specialtyId ?
|
|
3312
|
+
}, [o.operatorIds, o.operatorId, c, f]), $ = o.specialtyId ? m.find((T) => T.id === o.specialtyId) : void 0, j = o.serviceId ? p.find((T) => T.id === o.serviceId) : void 0;
|
|
3309
3313
|
if (t) {
|
|
3310
3314
|
let T;
|
|
3311
3315
|
if (o.date)
|
|
@@ -3314,7 +3318,7 @@ function yi({
|
|
|
3314
3318
|
weekday: "short",
|
|
3315
3319
|
day: "numeric",
|
|
3316
3320
|
month: "short"
|
|
3317
|
-
}).format(
|
|
3321
|
+
}).format(pe(o.date));
|
|
3318
3322
|
} catch {
|
|
3319
3323
|
T = o.date;
|
|
3320
3324
|
}
|
|
@@ -3328,7 +3332,7 @@ function yi({
|
|
|
3328
3332
|
delayMs: sr(r),
|
|
3329
3333
|
onNavigate: i,
|
|
3330
3334
|
date: T,
|
|
3331
|
-
time:
|
|
3335
|
+
time: on(o.date, o.slot.time, f),
|
|
3332
3336
|
details: k || L.length > 0 ? /* @__PURE__ */ b(de, { children: [
|
|
3333
3337
|
k ? /* @__PURE__ */ n("bdi", { children: k }) : null,
|
|
3334
3338
|
k && L.length > 0 ? " · " : null,
|
|
@@ -3355,20 +3359,20 @@ function yi({
|
|
|
3355
3359
|
ref: M,
|
|
3356
3360
|
tabIndex: -1,
|
|
3357
3361
|
className: "ds:outline-none",
|
|
3358
|
-
children:
|
|
3359
|
-
s ?
|
|
3362
|
+
children: u(
|
|
3363
|
+
s ? x === "demo" ? "booking.payment.paidDemoTitle" : "booking.payment.paidTitle" : e ? "booking.code.confirmedHeading" : "booking.success.heading"
|
|
3360
3364
|
)
|
|
3361
3365
|
}
|
|
3362
3366
|
),
|
|
3363
3367
|
/* @__PURE__ */ n(re.Description, { children: D })
|
|
3364
3368
|
] }),
|
|
3365
3369
|
/* @__PURE__ */ n("div", { className: "ds:rounded-[var(--radius-md)] ds:bg-[var(--secondary)] ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ b("dl", { className: "ds:grid ds:grid-cols-[auto_minmax(0,1fr)] ds:gap-x-[var(--spacing-md)] ds:gap-y-[var(--spacing-xs)] ds:m-0", children: [
|
|
3366
|
-
s &&
|
|
3367
|
-
/* @__PURE__ */ n("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children:
|
|
3370
|
+
s && x !== "demo" ? /* @__PURE__ */ b(de, { children: [
|
|
3371
|
+
/* @__PURE__ */ n("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: u("booking.payment.summaryPaid") }),
|
|
3368
3372
|
/* @__PURE__ */ n("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: R })
|
|
3369
3373
|
] }) : null,
|
|
3370
3374
|
$ ? /* @__PURE__ */ b(de, { children: [
|
|
3371
|
-
/* @__PURE__ */ n("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children:
|
|
3375
|
+
/* @__PURE__ */ n("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: u("booking.success.summarySpecialty") }),
|
|
3372
3376
|
/* @__PURE__ */ n(
|
|
3373
3377
|
"dd",
|
|
3374
3378
|
{
|
|
@@ -3379,7 +3383,7 @@ function yi({
|
|
|
3379
3383
|
)
|
|
3380
3384
|
] }) : null,
|
|
3381
3385
|
j ? /* @__PURE__ */ b(de, { children: [
|
|
3382
|
-
/* @__PURE__ */ n("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children:
|
|
3386
|
+
/* @__PURE__ */ n("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: u("booking.success.summaryService") }),
|
|
3383
3387
|
/* @__PURE__ */ n(
|
|
3384
3388
|
"dd",
|
|
3385
3389
|
{
|
|
@@ -3390,21 +3394,21 @@ function yi({
|
|
|
3390
3394
|
)
|
|
3391
3395
|
] }) : null,
|
|
3392
3396
|
_ ? /* @__PURE__ */ b(de, { children: [
|
|
3393
|
-
/* @__PURE__ */ n("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children:
|
|
3397
|
+
/* @__PURE__ */ n("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: u("booking.success.summaryDate") }),
|
|
3394
3398
|
/* @__PURE__ */ n("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: _ })
|
|
3395
3399
|
] }) : null,
|
|
3396
|
-
/* @__PURE__ */ n("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children:
|
|
3397
|
-
/* @__PURE__ */ n("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children:
|
|
3400
|
+
/* @__PURE__ */ n("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: u("booking.success.summaryTime") }),
|
|
3401
|
+
/* @__PURE__ */ n("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: on(o.date, o.slot.time, f) }),
|
|
3398
3402
|
O.length > 0 ? /* @__PURE__ */ b(de, { children: [
|
|
3399
|
-
/* @__PURE__ */ n("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children:
|
|
3403
|
+
/* @__PURE__ */ n("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: u("booking.success.summaryProvider") }),
|
|
3400
3404
|
/* @__PURE__ */ n("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: O.map(
|
|
3401
3405
|
(T, k) => T.type === "element" ? /* @__PURE__ */ n("bdi", { children: T.value }, k) : T.value
|
|
3402
3406
|
) })
|
|
3403
3407
|
] }) : null
|
|
3404
3408
|
] }) }),
|
|
3405
3409
|
/* @__PURE__ */ b("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
3406
|
-
/* @__PURE__ */ n(Re, { intent: "secondary", size: "md", onClick: l, children:
|
|
3407
|
-
g ? /* @__PURE__ */ n(Re, { intent: "ghost", size: "md", onClick: h, children:
|
|
3410
|
+
/* @__PURE__ */ n(Re, { intent: "secondary", size: "md", onClick: l, children: u("booking.success.bookAnother") }),
|
|
3411
|
+
g ? /* @__PURE__ */ n(Re, { intent: "ghost", size: "md", onClick: h, children: u("booking.success.modifyBooking") }) : null
|
|
3408
3412
|
] })
|
|
3409
3413
|
]
|
|
3410
3414
|
}
|
|
@@ -3413,7 +3417,7 @@ function yi({
|
|
|
3413
3417
|
function fr({ customSlot: e }) {
|
|
3414
3418
|
const { t } = Q("ui");
|
|
3415
3419
|
return e ? /* @__PURE__ */ n(de, { children: e }) : /* @__PURE__ */ n(
|
|
3416
|
-
|
|
3420
|
+
Sn,
|
|
3417
3421
|
{
|
|
3418
3422
|
variant: "no-results",
|
|
3419
3423
|
title: t("booking.emptyServices.title"),
|
|
@@ -3441,7 +3445,7 @@ function ce({
|
|
|
3441
3445
|
}
|
|
3442
3446
|
);
|
|
3443
3447
|
}
|
|
3444
|
-
function
|
|
3448
|
+
function wn(e, t) {
|
|
3445
3449
|
return t === "four-day-grid" ? e.filter((r) => r !== 6) : e;
|
|
3446
3450
|
}
|
|
3447
3451
|
function ki(e) {
|
|
@@ -3453,15 +3457,15 @@ function ki(e) {
|
|
|
3453
3457
|
onSubmit: a,
|
|
3454
3458
|
emptyServicesSlot: o,
|
|
3455
3459
|
onboardingIncompleteSlot: c,
|
|
3456
|
-
loadingDates:
|
|
3460
|
+
loadingDates: m,
|
|
3457
3461
|
loadingSlots: p,
|
|
3458
3462
|
slotLoadError: f,
|
|
3459
|
-
onRetrySlots:
|
|
3463
|
+
onRetrySlots: x,
|
|
3460
3464
|
emptySlotsDescription: g,
|
|
3461
3465
|
onDateSelect: l,
|
|
3462
3466
|
onWindowChange: h,
|
|
3463
3467
|
datePickerStyle: v,
|
|
3464
|
-
specialtyPickerStyle:
|
|
3468
|
+
specialtyPickerStyle: u,
|
|
3465
3469
|
servicePickerStyle: M,
|
|
3466
3470
|
showServiceDuration: N,
|
|
3467
3471
|
operatorPickerStyle: w,
|
|
@@ -3491,7 +3495,7 @@ function ki(e) {
|
|
|
3491
3495
|
valueIds: i.specialtyIds,
|
|
3492
3496
|
onChange: (k) => s(Un(i, k)),
|
|
3493
3497
|
onChangeIds: (k) => s(Hn(i, k)),
|
|
3494
|
-
pickerStyle:
|
|
3498
|
+
pickerStyle: u
|
|
3495
3499
|
}
|
|
3496
3500
|
) }) : null,
|
|
3497
3501
|
t.gates.service ? /* @__PURE__ */ n(ce, { ...T(3), children: t.filtered.services.length === 0 ? /* @__PURE__ */ n(fr, { customSlot: o }) : /* @__PURE__ */ n(
|
|
@@ -3531,10 +3535,10 @@ function ki(e) {
|
|
|
3531
3535
|
onChange: s,
|
|
3532
3536
|
onDateSelect: l,
|
|
3533
3537
|
onWindowChange: h,
|
|
3534
|
-
loadingDates:
|
|
3538
|
+
loadingDates: m,
|
|
3535
3539
|
loadingSlots: p,
|
|
3536
3540
|
slotLoadError: f,
|
|
3537
|
-
onRetrySlots:
|
|
3541
|
+
onRetrySlots: x,
|
|
3538
3542
|
emptySlotsDescription: g,
|
|
3539
3543
|
locale: R,
|
|
3540
3544
|
datePickerStyle: v,
|
|
@@ -3554,10 +3558,10 @@ function ki(e) {
|
|
|
3554
3558
|
inputs: r,
|
|
3555
3559
|
value: i,
|
|
3556
3560
|
onChange: s,
|
|
3557
|
-
loadingDates:
|
|
3561
|
+
loadingDates: m,
|
|
3558
3562
|
loadingSlots: p,
|
|
3559
3563
|
slotLoadError: f,
|
|
3560
|
-
onRetrySlots:
|
|
3564
|
+
onRetrySlots: x,
|
|
3561
3565
|
emptySlotsDescription: g,
|
|
3562
3566
|
locale: R,
|
|
3563
3567
|
datePickerStyle: v
|
|
@@ -3566,7 +3570,7 @@ function ki(e) {
|
|
|
3566
3570
|
}
|
|
3567
3571
|
) : null,
|
|
3568
3572
|
t.gates.details && t.selectedSlot ? /* @__PURE__ */ n(ce, { ...T(7), children: /* @__PURE__ */ n(
|
|
3569
|
-
|
|
3573
|
+
In,
|
|
3570
3574
|
{
|
|
3571
3575
|
...D,
|
|
3572
3576
|
value: i.details ?? {},
|
|
@@ -3585,15 +3589,15 @@ function Fe(e, t, r = {}) {
|
|
|
3585
3589
|
inputs: a,
|
|
3586
3590
|
value: o,
|
|
3587
3591
|
onChange: c,
|
|
3588
|
-
onSubmit:
|
|
3592
|
+
onSubmit: m,
|
|
3589
3593
|
emptyServicesSlot: p,
|
|
3590
3594
|
onboardingIncompleteSlot: f,
|
|
3591
|
-
loadingDates:
|
|
3595
|
+
loadingDates: x,
|
|
3592
3596
|
loadingSlots: g,
|
|
3593
3597
|
slotLoadError: l,
|
|
3594
3598
|
onRetrySlots: h,
|
|
3595
3599
|
emptySlotsDescription: v,
|
|
3596
|
-
onDateSelect:
|
|
3600
|
+
onDateSelect: u,
|
|
3597
3601
|
onWindowChange: M,
|
|
3598
3602
|
datePickerStyle: N,
|
|
3599
3603
|
specialtyPickerStyle: w,
|
|
@@ -3659,9 +3663,9 @@ function Fe(e, t, r = {}) {
|
|
|
3659
3663
|
inputs: a,
|
|
3660
3664
|
value: o,
|
|
3661
3665
|
onChange: c,
|
|
3662
|
-
onDateSelect:
|
|
3666
|
+
onDateSelect: u,
|
|
3663
3667
|
onWindowChange: M,
|
|
3664
|
-
loadingDates:
|
|
3668
|
+
loadingDates: x,
|
|
3665
3669
|
loadingSlots: g,
|
|
3666
3670
|
slotLoadError: l,
|
|
3667
3671
|
onRetrySlots: h,
|
|
@@ -3676,7 +3680,7 @@ function Fe(e, t, r = {}) {
|
|
|
3676
3680
|
inputs: a,
|
|
3677
3681
|
value: o,
|
|
3678
3682
|
onChange: c,
|
|
3679
|
-
loadingDates:
|
|
3683
|
+
loadingDates: x,
|
|
3680
3684
|
loadingSlots: g,
|
|
3681
3685
|
slotLoadError: l,
|
|
3682
3686
|
onRetrySlots: h,
|
|
@@ -3686,12 +3690,12 @@ function Fe(e, t, r = {}) {
|
|
|
3686
3690
|
});
|
|
3687
3691
|
case 7:
|
|
3688
3692
|
return s.selectedSlot ? /* @__PURE__ */ n(
|
|
3689
|
-
|
|
3693
|
+
In,
|
|
3690
3694
|
{
|
|
3691
3695
|
...$,
|
|
3692
3696
|
value: o.details ?? {},
|
|
3693
3697
|
onChange: (k) => c({ ...o, details: k }),
|
|
3694
|
-
onSubmit:
|
|
3698
|
+
onSubmit: m,
|
|
3695
3699
|
submitting: _,
|
|
3696
3700
|
defaultPhoneCountry: j.country
|
|
3697
3701
|
}
|
|
@@ -3701,7 +3705,7 @@ function Fe(e, t, r = {}) {
|
|
|
3701
3705
|
return null;
|
|
3702
3706
|
}
|
|
3703
3707
|
}
|
|
3704
|
-
function
|
|
3708
|
+
function dn() {
|
|
3705
3709
|
const { t: e } = Q("ui");
|
|
3706
3710
|
return K(
|
|
3707
3711
|
() => ({
|
|
@@ -3720,13 +3724,13 @@ function Ct(e, t) {
|
|
|
3720
3724
|
return t === "four-day-grid" && e === 6 ? 5 : e;
|
|
3721
3725
|
}
|
|
3722
3726
|
function Si(e) {
|
|
3723
|
-
const { cascade: t, value: r, activeStep: i, setActiveStep: s, datePickerStyle: a } = e, o =
|
|
3724
|
-
() =>
|
|
3727
|
+
const { cascade: t, value: r, activeStep: i, setActiveStep: s, datePickerStyle: a } = e, o = dn(), { t: c } = Q("ui"), m = c("booking.operator.all"), p = K(
|
|
3728
|
+
() => wn(t.visibleSteps, a),
|
|
3725
3729
|
[t.visibleSteps, a]
|
|
3726
|
-
), f = Ct(i, a),
|
|
3730
|
+
), f = Ct(i, a), x = Math.max(0, p.indexOf(f)), g = K(
|
|
3727
3731
|
() => p.map((l) => ({
|
|
3728
3732
|
label: o[l],
|
|
3729
|
-
summary: hr(l, r, t,
|
|
3733
|
+
summary: hr(l, r, t, m),
|
|
3730
3734
|
status: xi(l, r, t),
|
|
3731
3735
|
content: /* @__PURE__ */ n(ce, { step: l, active: l === f, children: Fe(l, e, { compactService: !0 }) })
|
|
3732
3736
|
})),
|
|
@@ -3737,13 +3741,13 @@ function Si(e) {
|
|
|
3737
3741
|
t,
|
|
3738
3742
|
e,
|
|
3739
3743
|
f,
|
|
3740
|
-
|
|
3744
|
+
m
|
|
3741
3745
|
]
|
|
3742
3746
|
);
|
|
3743
3747
|
return /* @__PURE__ */ n(
|
|
3744
3748
|
Er,
|
|
3745
3749
|
{
|
|
3746
|
-
activeStep:
|
|
3750
|
+
activeStep: x,
|
|
3747
3751
|
steps: g,
|
|
3748
3752
|
onStepChange: (l) => {
|
|
3749
3753
|
const h = p[l];
|
|
@@ -3753,12 +3757,12 @@ function Si(e) {
|
|
|
3753
3757
|
);
|
|
3754
3758
|
}
|
|
3755
3759
|
function xi(e, t, r) {
|
|
3756
|
-
return
|
|
3760
|
+
return Ye(e, t) && e < r.currentStep ? "completed" : e <= r.currentStep ? "unlocked" : void 0;
|
|
3757
3761
|
}
|
|
3758
3762
|
function Pn(e, t) {
|
|
3759
|
-
return e !== 4 ?
|
|
3763
|
+
return e !== 4 ? Ye(e, t) : t.operatorIds && t.operatorIds.length > 0 ? !0 : Xn(t) !== void 0;
|
|
3760
3764
|
}
|
|
3761
|
-
function
|
|
3765
|
+
function fn(e, t) {
|
|
3762
3766
|
const r = e.map((i) => {
|
|
3763
3767
|
var s;
|
|
3764
3768
|
return (s = t.find((a) => a.id === i)) == null ? void 0 : s.label;
|
|
@@ -3767,23 +3771,23 @@ function pn(e, t) {
|
|
|
3767
3771
|
}
|
|
3768
3772
|
function hr(e, t, r, i) {
|
|
3769
3773
|
var s;
|
|
3770
|
-
if (
|
|
3774
|
+
if (Ye(e, t))
|
|
3771
3775
|
switch (e) {
|
|
3772
3776
|
case 1:
|
|
3773
3777
|
return t.insuranceType;
|
|
3774
3778
|
case 2:
|
|
3775
|
-
return
|
|
3776
|
-
|
|
3779
|
+
return fn(
|
|
3780
|
+
it(t),
|
|
3777
3781
|
r.filtered.specialties
|
|
3778
3782
|
);
|
|
3779
3783
|
case 3:
|
|
3780
|
-
return
|
|
3784
|
+
return fn(Ze(t), r.filtered.services);
|
|
3781
3785
|
case 4: {
|
|
3782
|
-
const o =
|
|
3786
|
+
const o = vn(t).filter((m) => m !== qe), c = fn(
|
|
3783
3787
|
o,
|
|
3784
|
-
r.filtered.operators.map((
|
|
3785
|
-
id:
|
|
3786
|
-
label:
|
|
3788
|
+
r.filtered.operators.map((m) => ({
|
|
3789
|
+
id: m.id,
|
|
3790
|
+
label: m.name
|
|
3787
3791
|
}))
|
|
3788
3792
|
);
|
|
3789
3793
|
return c !== void 0 ? c : o.length === 0 ? i : void 0;
|
|
@@ -3797,13 +3801,13 @@ function hr(e, t, r, i) {
|
|
|
3797
3801
|
}
|
|
3798
3802
|
}
|
|
3799
3803
|
function Ii(e) {
|
|
3800
|
-
const { cascade: t, value: r, activeStep: i, setActiveStep: s } = e, { t: a } = Q("ui"), o =
|
|
3804
|
+
const { cascade: t, value: r, activeStep: i, setActiveStep: s } = e, { t: a } = Q("ui"), o = dn(), c = a("booking.operator.all"), m = `${pt()}-filter`, p = Ct(i, e.datePickerStyle), f = t.visibleSteps.filter(
|
|
3801
3805
|
(l) => l === 1 || l === 2 || l === 3 || l === 4
|
|
3802
|
-
),
|
|
3803
|
-
(l) => !
|
|
3806
|
+
), x = f.some(
|
|
3807
|
+
(l) => !Ye(l, r)
|
|
3804
3808
|
), g = f.some(
|
|
3805
3809
|
(l) => l === i
|
|
3806
|
-
) ? i : f.find((l) => !
|
|
3810
|
+
) ? i : f.find((l) => !Ye(l, r));
|
|
3807
3811
|
return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
3808
3812
|
f.length > 0 ? /* @__PURE__ */ n(
|
|
3809
3813
|
"div",
|
|
@@ -3817,7 +3821,7 @@ function Ii(e) {
|
|
|
3817
3821
|
r,
|
|
3818
3822
|
t,
|
|
3819
3823
|
c
|
|
3820
|
-
), v = l === g,
|
|
3824
|
+
), v = l === g, u = Ye(l, r);
|
|
3821
3825
|
return /* @__PURE__ */ n(
|
|
3822
3826
|
Re,
|
|
3823
3827
|
{
|
|
@@ -3830,11 +3834,11 @@ function Ii(e) {
|
|
|
3830
3834
|
className: v ? "ds:rotate-180" : void 0
|
|
3831
3835
|
}
|
|
3832
3836
|
),
|
|
3833
|
-
"aria-expanded":
|
|
3834
|
-
"aria-controls":
|
|
3835
|
-
"aria-current": !
|
|
3837
|
+
"aria-expanded": u ? v : void 0,
|
|
3838
|
+
"aria-controls": u && v ? m : void 0,
|
|
3839
|
+
"aria-current": !u && v ? "step" : void 0,
|
|
3836
3840
|
onClick: () => s(
|
|
3837
|
-
|
|
3841
|
+
u && v ? t.currentStep : l
|
|
3838
3842
|
),
|
|
3839
3843
|
children: h ? /* @__PURE__ */ b(de, { children: [
|
|
3840
3844
|
o[l],
|
|
@@ -3852,11 +3856,11 @@ function Ii(e) {
|
|
|
3852
3856
|
{
|
|
3853
3857
|
step: g,
|
|
3854
3858
|
active: g === p,
|
|
3855
|
-
id:
|
|
3859
|
+
id: m,
|
|
3856
3860
|
children: Fe(g, e, { compactService: !0 })
|
|
3857
3861
|
}
|
|
3858
3862
|
) : null,
|
|
3859
|
-
!
|
|
3863
|
+
!x && t.gates.date ? (
|
|
3860
3864
|
// four-day-grid embeds slots inline with the day strip — the
|
|
3861
3865
|
// historic 2-col date|slot split collapses to a single column
|
|
3862
3866
|
// so the picker spans the full width instead of orphaning an
|
|
@@ -3907,13 +3911,13 @@ function Ni(e) {
|
|
|
3907
3911
|
] });
|
|
3908
3912
|
}
|
|
3909
3913
|
function wi(e) {
|
|
3910
|
-
const { cascade: t, value: r, activeStep: i, setActiveStep: s, datePickerStyle: a } = e, { t: o } = Q("ui"), c =
|
|
3911
|
-
() =>
|
|
3914
|
+
const { cascade: t, value: r, activeStep: i, setActiveStep: s, datePickerStyle: a } = e, { t: o } = Q("ui"), c = dn(), m = K(
|
|
3915
|
+
() => wn(t.visibleSteps, a),
|
|
3912
3916
|
[t.visibleSteps, a]
|
|
3913
|
-
), p = Ct(i, a), f = Math.max(0,
|
|
3914
|
-
() =>
|
|
3915
|
-
[
|
|
3916
|
-
), l = f > 0, h = p === 5 && a === "four-day-grid", v = f <
|
|
3917
|
+
), p = Ct(i, a), f = Math.max(0, m.indexOf(p)), x = m.length, g = K(
|
|
3918
|
+
() => m.map((u) => ({ label: c[u] })),
|
|
3919
|
+
[m, c]
|
|
3920
|
+
), l = f > 0, h = p === 5 && a === "four-day-grid", v = f < x - 1 && m[f + 1] <= t.currentStep && Ye(p, r) && (!h || Ye(6, r));
|
|
3917
3921
|
return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
3918
3922
|
/* @__PURE__ */ n(Fr, { activeStep: f, steps: g }),
|
|
3919
3923
|
/* @__PURE__ */ n(ce, { step: p, active: !0, children: Fe(p, e, { compactService: !0 }) }),
|
|
@@ -3925,8 +3929,8 @@ function wi(e) {
|
|
|
3925
3929
|
size: "md",
|
|
3926
3930
|
disabled: !l,
|
|
3927
3931
|
onClick: () => {
|
|
3928
|
-
const
|
|
3929
|
-
|
|
3932
|
+
const u = m[f - 1];
|
|
3933
|
+
u && s(u);
|
|
3930
3934
|
},
|
|
3931
3935
|
children: o("booking.actions.back")
|
|
3932
3936
|
}
|
|
@@ -3938,8 +3942,8 @@ function wi(e) {
|
|
|
3938
3942
|
size: "md",
|
|
3939
3943
|
disabled: !v,
|
|
3940
3944
|
onClick: () => {
|
|
3941
|
-
const
|
|
3942
|
-
|
|
3945
|
+
const u = m[f + 1];
|
|
3946
|
+
u && s(u);
|
|
3943
3947
|
},
|
|
3944
3948
|
children: o("booking.actions.next")
|
|
3945
3949
|
}
|
|
@@ -3964,15 +3968,15 @@ const Mi = Vn(
|
|
|
3964
3968
|
operatorsByService: a = !1,
|
|
3965
3969
|
autoSelectSingleService: o = !1,
|
|
3966
3970
|
specialties: c,
|
|
3967
|
-
services:
|
|
3971
|
+
services: m,
|
|
3968
3972
|
operators: p,
|
|
3969
3973
|
availableDates: f,
|
|
3970
|
-
availableSlots:
|
|
3974
|
+
availableSlots: x,
|
|
3971
3975
|
nextAvailableDate: g,
|
|
3972
3976
|
hideEmail: l = !1,
|
|
3973
3977
|
emailOptional: h = !1,
|
|
3974
3978
|
requireCodiceFiscale: v,
|
|
3975
|
-
requireDateOfBirth:
|
|
3979
|
+
requireDateOfBirth: u,
|
|
3976
3980
|
requireInsuranceNumber: M,
|
|
3977
3981
|
billingInDetails: N = !1,
|
|
3978
3982
|
paymentNoticeStyle: w = "highlighted",
|
|
@@ -3992,7 +3996,7 @@ const Mi = Vn(
|
|
|
3992
3996
|
confirmationChannels: ne,
|
|
3993
3997
|
defaultConfirmationChannels: Ne,
|
|
3994
3998
|
singleConfirmationChannel: ge,
|
|
3995
|
-
value:
|
|
3999
|
+
value: S,
|
|
3996
4000
|
onChange: q,
|
|
3997
4001
|
onSubmit: Y,
|
|
3998
4002
|
codeStep: U,
|
|
@@ -4008,52 +4012,52 @@ const Mi = Vn(
|
|
|
4008
4012
|
loadingSlots: oe,
|
|
4009
4013
|
slotLoadError: ae,
|
|
4010
4014
|
onRetrySlots: se,
|
|
4011
|
-
emptySlotsDescription:
|
|
4015
|
+
emptySlotsDescription: ot,
|
|
4012
4016
|
submitting: ft,
|
|
4013
4017
|
submitError: Le,
|
|
4014
|
-
mode:
|
|
4018
|
+
mode: at = "live",
|
|
4015
4019
|
showModifyOnSuccess: Z = !0,
|
|
4016
4020
|
surface: Ke = "flat",
|
|
4017
4021
|
emptyServicesSlot: Pt,
|
|
4018
4022
|
onboardingIncompleteSlot: Tt,
|
|
4019
4023
|
"aria-label": Vt,
|
|
4020
|
-
id:
|
|
4024
|
+
id: Xe,
|
|
4021
4025
|
className: gt,
|
|
4022
4026
|
onFocus: we,
|
|
4023
4027
|
onBlur: At,
|
|
4024
4028
|
...$t
|
|
4025
4029
|
}, qt) => {
|
|
4026
|
-
var
|
|
4027
|
-
const { t: le, i18n: ht } = Q("ui"), Se = e ?? "inline-list", Ee = ht.language ?? "en",
|
|
4030
|
+
var Cn, Tn, An;
|
|
4031
|
+
const { t: le, i18n: ht } = Q("ui"), Se = e ?? "inline-list", Ee = ht.language ?? "en", fe = c ?? Ci, ct = p ?? Ti;
|
|
4028
4032
|
V(() => {
|
|
4029
|
-
const
|
|
4033
|
+
const I = Cs(S, {
|
|
4030
4034
|
useSpecialties: r,
|
|
4031
4035
|
lockedOperatorId: s,
|
|
4032
4036
|
autoSelectSingleService: o,
|
|
4033
|
-
specialties:
|
|
4034
|
-
services:
|
|
4037
|
+
specialties: fe,
|
|
4038
|
+
services: m
|
|
4035
4039
|
});
|
|
4036
|
-
(
|
|
4040
|
+
(I.specialtyId !== S.specialtyId || I.operatorId !== S.operatorId || I.serviceId !== S.serviceId) && q(I);
|
|
4037
4041
|
}, [
|
|
4038
4042
|
s,
|
|
4039
4043
|
r,
|
|
4040
4044
|
o,
|
|
4041
|
-
|
|
4042
|
-
|
|
4045
|
+
fe,
|
|
4046
|
+
m
|
|
4043
4047
|
]);
|
|
4044
|
-
const [vt,
|
|
4048
|
+
const [vt, dt] = J(!1), je = A(!1), bt = !!(ke || oe);
|
|
4045
4049
|
V(() => {
|
|
4046
4050
|
if (vt) {
|
|
4047
4051
|
if (bt) {
|
|
4048
4052
|
je.current = !0;
|
|
4049
4053
|
return;
|
|
4050
4054
|
}
|
|
4051
|
-
(je.current || !ae) && (je.current = !1,
|
|
4055
|
+
(je.current || !ae) && (je.current = !1, dt(!1));
|
|
4052
4056
|
}
|
|
4053
4057
|
}, [vt, bt, ae]);
|
|
4054
|
-
const
|
|
4058
|
+
const Qe = K(
|
|
4055
4059
|
() => se ? () => {
|
|
4056
|
-
je.current = !1,
|
|
4060
|
+
je.current = !1, dt(!0), se();
|
|
4057
4061
|
} : void 0,
|
|
4058
4062
|
[se]
|
|
4059
4063
|
), Pe = !!(ae || vt && bt), z = K(
|
|
@@ -4063,11 +4067,11 @@ const Mi = Vn(
|
|
|
4063
4067
|
allowOperatorSelection: i,
|
|
4064
4068
|
lockedOperatorId: s,
|
|
4065
4069
|
operatorsByService: a,
|
|
4066
|
-
specialties:
|
|
4067
|
-
services:
|
|
4068
|
-
operators:
|
|
4069
|
-
availableSlots:
|
|
4070
|
-
value: Pe ? { ...
|
|
4070
|
+
specialties: fe,
|
|
4071
|
+
services: m,
|
|
4072
|
+
operators: ct,
|
|
4073
|
+
availableSlots: x,
|
|
4074
|
+
value: Pe ? { ...S, slotKey: void 0 } : S
|
|
4071
4075
|
}),
|
|
4072
4076
|
[
|
|
4073
4077
|
t,
|
|
@@ -4076,35 +4080,35 @@ const Mi = Vn(
|
|
|
4076
4080
|
s,
|
|
4077
4081
|
a,
|
|
4078
4082
|
o,
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4083
|
+
fe,
|
|
4084
|
+
m,
|
|
4085
|
+
ct,
|
|
4082
4086
|
f,
|
|
4087
|
+
x,
|
|
4083
4088
|
S,
|
|
4084
|
-
I,
|
|
4085
4089
|
Pe
|
|
4086
4090
|
]
|
|
4087
4091
|
), Ve = K(
|
|
4088
4092
|
() => [
|
|
4089
|
-
JSON.stringify(
|
|
4090
|
-
JSON.stringify(
|
|
4091
|
-
JSON.stringify(
|
|
4092
|
-
JSON.stringify(
|
|
4093
|
-
JSON.stringify(
|
|
4094
|
-
JSON.stringify(
|
|
4093
|
+
JSON.stringify(S.insuranceType),
|
|
4094
|
+
JSON.stringify(it(S)),
|
|
4095
|
+
JSON.stringify(Ze(S)),
|
|
4096
|
+
JSON.stringify(vn(S)),
|
|
4097
|
+
JSON.stringify(S.date),
|
|
4098
|
+
JSON.stringify(S.slotKey)
|
|
4095
4099
|
],
|
|
4096
|
-
[
|
|
4100
|
+
[S]
|
|
4097
4101
|
), yt = Se === "progress", Ce = Me(
|
|
4098
|
-
(
|
|
4099
|
-
if (
|
|
4102
|
+
(I) => {
|
|
4103
|
+
if (I === 4 && z.visibleSteps.includes(4) && vn(S).length === 0)
|
|
4100
4104
|
return Math.min(4, z.currentStep);
|
|
4101
4105
|
if (!yt) return z.currentStep;
|
|
4102
4106
|
const B = z.visibleSteps.find(
|
|
4103
|
-
(P) => P >
|
|
4107
|
+
(P) => P > I && !Pn(P, S)
|
|
4104
4108
|
);
|
|
4105
4109
|
return B === void 0 ? z.currentStep : Math.min(B, z.currentStep);
|
|
4106
4110
|
},
|
|
4107
|
-
[yt, z.visibleSteps, z.currentStep,
|
|
4111
|
+
[yt, z.visibleSteps, z.currentStep, S]
|
|
4108
4112
|
), [ee, xe] = J(
|
|
4109
4113
|
z.currentStep
|
|
4110
4114
|
), kt = A(null);
|
|
@@ -4116,24 +4120,24 @@ const Mi = Vn(
|
|
|
4116
4120
|
}, xe(z.currentStep));
|
|
4117
4121
|
return;
|
|
4118
4122
|
}
|
|
4119
|
-
const
|
|
4120
|
-
kt.current = null,
|
|
4121
|
-
Math.min(
|
|
4123
|
+
const I = kt.current;
|
|
4124
|
+
kt.current = null, I && ee === I.to && xe(
|
|
4125
|
+
Math.min(I.from, z.currentStep)
|
|
4122
4126
|
);
|
|
4123
4127
|
}, [Pe, ee, z.currentStep]);
|
|
4124
4128
|
const Ue = A(Ve), St = A(z.visibleSteps);
|
|
4125
4129
|
V(() => {
|
|
4126
|
-
const
|
|
4130
|
+
const I = Ue.current, B = St.current;
|
|
4127
4131
|
Ue.current = Ve, St.current = z.visibleSteps;
|
|
4128
4132
|
const P = Ve.findIndex(
|
|
4129
|
-
(Ie,
|
|
4133
|
+
(Ie, Mn) => Ie !== I[Mn]
|
|
4130
4134
|
);
|
|
4131
4135
|
if (P !== -1) {
|
|
4132
4136
|
xe(Ce(P + 1));
|
|
4133
4137
|
return;
|
|
4134
4138
|
}
|
|
4135
4139
|
const me = yt ? z.visibleSteps.find(
|
|
4136
|
-
(Ie) => Ie < ee && !B.includes(Ie) && !Pn(Ie,
|
|
4140
|
+
(Ie) => Ie < ee && !B.includes(Ie) && !Pn(Ie, S)
|
|
4137
4141
|
) : void 0;
|
|
4138
4142
|
if (me !== void 0) {
|
|
4139
4143
|
xe(me);
|
|
@@ -4147,32 +4151,32 @@ const Mi = Vn(
|
|
|
4147
4151
|
z.currentStep,
|
|
4148
4152
|
z.visibleSteps,
|
|
4149
4153
|
ee,
|
|
4150
|
-
|
|
4154
|
+
S
|
|
4151
4155
|
]);
|
|
4152
|
-
const Te = A(null),
|
|
4153
|
-
() =>
|
|
4156
|
+
const Te = A(null), lt = K(
|
|
4157
|
+
() => wn(z.visibleSteps, ve),
|
|
4154
4158
|
[z.visibleSteps, ve]
|
|
4155
|
-
), Mt =
|
|
4159
|
+
), Mt = dn(), [zt, Kt] = J(""), He = A(null), $e = A(null);
|
|
4156
4160
|
_t(() => {
|
|
4157
|
-
const
|
|
4158
|
-
if (!B || !
|
|
4161
|
+
const I = He.current, B = Te.current;
|
|
4162
|
+
if (!B || !I || I.isConnected || document.activeElement !== document.body)
|
|
4159
4163
|
return;
|
|
4160
4164
|
const P = B.querySelector(Ln);
|
|
4161
4165
|
((ae && !ke && !oe ? B.querySelector("[data-slot-retry]") : null) ?? (P == null ? void 0 : P.querySelector("[data-slot-load-state]")) ?? P ?? B).focus({ preventScroll: !0 });
|
|
4162
4166
|
}, [ae, ke, oe]), V(() => {
|
|
4163
|
-
const
|
|
4167
|
+
const I = Ct(ee, ve);
|
|
4164
4168
|
if ($e.current === null) {
|
|
4165
|
-
$e.current =
|
|
4169
|
+
$e.current = I;
|
|
4166
4170
|
return;
|
|
4167
4171
|
}
|
|
4168
|
-
if ($e.current ===
|
|
4169
|
-
$e.current =
|
|
4170
|
-
const B =
|
|
4172
|
+
if ($e.current === I) return;
|
|
4173
|
+
$e.current = I;
|
|
4174
|
+
const B = lt.indexOf(I);
|
|
4171
4175
|
Kt(
|
|
4172
4176
|
B === -1 ? "" : le("booking.stepAnnouncement", {
|
|
4173
4177
|
current: B + 1,
|
|
4174
|
-
total:
|
|
4175
|
-
label: Mt[
|
|
4178
|
+
total: lt.length,
|
|
4179
|
+
label: Mt[I]
|
|
4176
4180
|
})
|
|
4177
4181
|
);
|
|
4178
4182
|
const P = He.current;
|
|
@@ -4191,11 +4195,11 @@ const Mi = Vn(
|
|
|
4191
4195
|
} catch {
|
|
4192
4196
|
Wt.scrollIntoView();
|
|
4193
4197
|
}
|
|
4194
|
-
}, [ee, ve,
|
|
4198
|
+
}, [ee, ve, lt, Mt, le]);
|
|
4195
4199
|
const G = Zs({
|
|
4196
|
-
services:
|
|
4197
|
-
value:
|
|
4198
|
-
availableSlots:
|
|
4200
|
+
services: m,
|
|
4201
|
+
value: S,
|
|
4202
|
+
availableSlots: x,
|
|
4199
4203
|
onSubmit: Y,
|
|
4200
4204
|
onChange: q,
|
|
4201
4205
|
paymentState: j,
|
|
@@ -4203,69 +4207,69 @@ const Mi = Vn(
|
|
|
4203
4207
|
paymentTermsUrl: $,
|
|
4204
4208
|
renderPayment: L,
|
|
4205
4209
|
codeStep: U
|
|
4206
|
-
}), H = G.status, jt = G.submit,
|
|
4207
|
-
|
|
4208
|
-
const xt = A(!1), [
|
|
4210
|
+
}), H = G.status, jt = G.submit, et = A(G.reset);
|
|
4211
|
+
et.current = G.reset;
|
|
4212
|
+
const xt = A(!1), [ln, un] = J(!1);
|
|
4209
4213
|
V(() => {
|
|
4210
4214
|
var B, P;
|
|
4211
4215
|
if (!xt.current || H !== "idle") return;
|
|
4212
4216
|
xt.current = !1;
|
|
4213
|
-
const
|
|
4217
|
+
const I = (B = Te.current) == null ? void 0 : B.querySelector(
|
|
4214
4218
|
'form input:not([type="hidden"]):not([data-honeypot]):not(:disabled), form select:not(:disabled), form textarea:not(:disabled)'
|
|
4215
4219
|
);
|
|
4216
|
-
|
|
4220
|
+
I && (I.focus({ preventScroll: !0 }), (P = I.scrollIntoView) == null || P.call(I, { block: "nearest" }));
|
|
4217
4221
|
}, [H]);
|
|
4218
|
-
const Ut = pt(), Ht = A(null),
|
|
4222
|
+
const Ut = pt(), Ht = A(null), ut = A(null), Rt = ((Cn = G.state) == null ? void 0 : Cn.status) === "failed", Ot = G.state && "phase" in G.state && G.state.phase === "completion";
|
|
4219
4223
|
V(() => {
|
|
4220
|
-
var
|
|
4224
|
+
var I, B;
|
|
4221
4225
|
if (H === "payment") {
|
|
4222
4226
|
const P = document.activeElement;
|
|
4223
|
-
(!Ot || !P || P === document.body || !((
|
|
4227
|
+
(!Ot || !P || P === document.body || !((I = Te.current) != null && I.contains(P))) && ((B = Ht.current) == null || B.focus());
|
|
4224
4228
|
}
|
|
4225
4229
|
}, [H, Ot]), V(() => {
|
|
4226
|
-
var
|
|
4227
|
-
H === "payment" && Rt && ((
|
|
4230
|
+
var I;
|
|
4231
|
+
H === "payment" && Rt && ((I = ut.current) == null || I.focus());
|
|
4228
4232
|
}, [H, Rt]), br(qt, () => Te.current, []);
|
|
4229
4233
|
const te = H === "success" ? 8 : H === "payment" || H === "code" ? 7 : z.currentStep, Dt = A(null), ue = A(0);
|
|
4230
4234
|
_t(() => {
|
|
4231
|
-
var
|
|
4232
|
-
(H === "submitting" || H === "code" || H === "payment") && (ue.current = ((
|
|
4235
|
+
var I;
|
|
4236
|
+
(H === "submitting" || H === "code" || H === "payment") && (ue.current = ((I = Te.current) == null ? void 0 : I.offsetHeight) ?? 0);
|
|
4233
4237
|
}), _t(() => {
|
|
4234
|
-
const
|
|
4235
|
-
te !== 8 || !
|
|
4238
|
+
const I = Te.current;
|
|
4239
|
+
te !== 8 || !I || ue.current === 0 || (I.style.setProperty(
|
|
4236
4240
|
"--booking-held-height",
|
|
4237
4241
|
`${ue.current}px`
|
|
4238
4242
|
), ue.current = 0);
|
|
4239
4243
|
}, [te]), V(() => {
|
|
4240
4244
|
if (te === Dt.current) return;
|
|
4241
4245
|
Dt.current = te, ze == null || ze(te);
|
|
4242
|
-
const
|
|
4243
|
-
if (te !== 8 || !
|
|
4244
|
-
const B = () =>
|
|
4245
|
-
tr(
|
|
4246
|
+
const I = Te.current;
|
|
4247
|
+
if (te !== 8 || !I) return;
|
|
4248
|
+
const B = () => I.style.removeProperty("--booking-held-height");
|
|
4249
|
+
tr(I, "start") ? Gs(B) : B();
|
|
4246
4250
|
}, [te, ze]);
|
|
4247
|
-
const
|
|
4251
|
+
const tt = A({ activeStep: ee, cascade: z, submitState: H });
|
|
4248
4252
|
V(() => {
|
|
4249
|
-
|
|
4253
|
+
tt.current = { activeStep: ee, cascade: z, submitState: H };
|
|
4250
4254
|
}, [ee, z, H]);
|
|
4251
4255
|
const Et = K(
|
|
4252
4256
|
() => ({
|
|
4253
4257
|
getVariant: () => Se,
|
|
4254
4258
|
getCurrentStep: () => {
|
|
4255
|
-
const
|
|
4256
|
-
return
|
|
4259
|
+
const I = tt.current;
|
|
4260
|
+
return I.submitState === "success" ? 8 : I.submitState === "payment" || I.submitState === "code" ? 7 : I.activeStep;
|
|
4257
4261
|
},
|
|
4258
4262
|
reset: () => {
|
|
4259
|
-
|
|
4263
|
+
tt.current.submitState === "payment" || tt.current.submitState === "code" || (q({}), et.current(), xe(1));
|
|
4260
4264
|
},
|
|
4261
|
-
goToStep: (
|
|
4262
|
-
const B =
|
|
4263
|
-
|
|
4265
|
+
goToStep: (I) => {
|
|
4266
|
+
const B = tt.current, P = B.cascade.visibleSteps.includes(I), me = B.cascade.currentStep, Ie = B.submitState === "payment" || B.submitState === "code" ? 7 : !P || I > me ? me : I;
|
|
4267
|
+
tt.current = { ...B, activeStep: Ie }, xe(Ie);
|
|
4264
4268
|
}
|
|
4265
4269
|
}),
|
|
4266
4270
|
[Se, q]
|
|
4267
4271
|
);
|
|
4268
|
-
yr(bs, Et,
|
|
4272
|
+
yr(bs, Et, Xe);
|
|
4269
4273
|
const Gt = Vt ?? le("booking.regionLabel"), Ae = G.snapshot, Jt = H === "success" && Ae ? /* @__PURE__ */ n(
|
|
4270
4274
|
yi,
|
|
4271
4275
|
{
|
|
@@ -4279,21 +4283,21 @@ const Mi = Vn(
|
|
|
4279
4283
|
...Ae.value,
|
|
4280
4284
|
slot: Ae.slot,
|
|
4281
4285
|
details: Ae.details,
|
|
4282
|
-
serviceId: ((
|
|
4286
|
+
serviceId: ((Tn = Ae.payment) == null ? void 0 : Tn.serviceId) ?? Ae.slot.serviceId ?? Ae.value.serviceId
|
|
4283
4287
|
},
|
|
4284
|
-
operators:
|
|
4285
|
-
specialties:
|
|
4286
|
-
services:
|
|
4288
|
+
operators: ct,
|
|
4289
|
+
specialties: fe,
|
|
4290
|
+
services: m,
|
|
4287
4291
|
locale: Ee,
|
|
4288
|
-
mode:
|
|
4292
|
+
mode: at,
|
|
4289
4293
|
showModify: Z && !Ae.payment && !G.codeVerified,
|
|
4290
4294
|
onReset: () => Et.reset(),
|
|
4291
4295
|
focusWasLost: () => {
|
|
4292
|
-
const
|
|
4293
|
-
return !!(
|
|
4296
|
+
const I = He.current, B = document.activeElement;
|
|
4297
|
+
return !!(I && !I.isConnected) && (!B || B === document.body);
|
|
4294
4298
|
},
|
|
4295
4299
|
onModify: () => {
|
|
4296
|
-
|
|
4300
|
+
et.current(), xe(7);
|
|
4297
4301
|
}
|
|
4298
4302
|
}
|
|
4299
4303
|
) : null, It = H === "code" && G.codeStep ? /* @__PURE__ */ n(
|
|
@@ -4302,14 +4306,14 @@ const Mi = Vn(
|
|
|
4302
4306
|
...G.codeStep,
|
|
4303
4307
|
...U,
|
|
4304
4308
|
onVerified: G.completeCode,
|
|
4305
|
-
onBusyChange:
|
|
4309
|
+
onBusyChange: un
|
|
4306
4310
|
}
|
|
4307
|
-
) : null, Nt = G.activeSession,
|
|
4311
|
+
) : null, Nt = G.activeSession, nt = G.state, d = Nt && nt ? {
|
|
4308
4312
|
session: Nt,
|
|
4309
4313
|
payment: Nt.payment,
|
|
4310
|
-
state:
|
|
4311
|
-
billing: (
|
|
4312
|
-
} : void 0, E =
|
|
4314
|
+
state: nt,
|
|
4315
|
+
billing: (An = G.snapshot) == null ? void 0 : An.details.billing
|
|
4316
|
+
} : void 0, E = nt && "phase" in nt && nt.phase === "completion", ie = H === "payment" && d ? /* @__PURE__ */ b(
|
|
4313
4317
|
"section",
|
|
4314
4318
|
{
|
|
4315
4319
|
"aria-labelledby": Ut,
|
|
@@ -4330,7 +4334,7 @@ const Mi = Vn(
|
|
|
4330
4334
|
}
|
|
4331
4335
|
),
|
|
4332
4336
|
E ? null : /* @__PURE__ */ n("p", { className: "type-body ds:m-0", children: le("booking.payment.noticeBody", {
|
|
4333
|
-
amount:
|
|
4337
|
+
amount: an(
|
|
4334
4338
|
d.payment.amountCents,
|
|
4335
4339
|
d.payment.currencyCode,
|
|
4336
4340
|
Ee
|
|
@@ -4352,7 +4356,7 @@ const Mi = Vn(
|
|
|
4352
4356
|
d.state.status === "failed" ? /* @__PURE__ */ n(
|
|
4353
4357
|
re,
|
|
4354
4358
|
{
|
|
4355
|
-
ref:
|
|
4359
|
+
ref: ut,
|
|
4356
4360
|
variant: "error",
|
|
4357
4361
|
tabIndex: -1,
|
|
4358
4362
|
className: Bt,
|
|
@@ -4364,8 +4368,8 @@ const Mi = Vn(
|
|
|
4364
4368
|
E ? F == null ? void 0 : F(d) : L == null ? void 0 : L(d)
|
|
4365
4369
|
]
|
|
4366
4370
|
}
|
|
4367
|
-
) : null,
|
|
4368
|
-
const
|
|
4371
|
+
) : null, rt = K(() => {
|
|
4372
|
+
const I = new Set(Ze(S)), B = m.filter((P) => I.has(P.id)).map((P) => {
|
|
4369
4373
|
var me;
|
|
4370
4374
|
return {
|
|
4371
4375
|
label: P.label,
|
|
@@ -4376,19 +4380,19 @@ const Mi = Vn(
|
|
|
4376
4380
|
return B.length === 1 ? B[0].text : B.map((P) => `${P.label}: ${P.text}`).join(`
|
|
4377
4381
|
|
|
4378
4382
|
`);
|
|
4379
|
-
}, [
|
|
4383
|
+
}, [m, S]), Ge = K(() => {
|
|
4380
4384
|
if (H === "success" || H === "payment") return null;
|
|
4381
|
-
const
|
|
4385
|
+
const I = Se === "accordion" ? Si : Se === "calendar" ? Ii : Se === "flexible" ? Ni : Se === "progress" ? wi : ki, B = {
|
|
4382
4386
|
cascade: z,
|
|
4383
4387
|
inputs: {
|
|
4384
|
-
specialties:
|
|
4385
|
-
services:
|
|
4386
|
-
operators:
|
|
4388
|
+
specialties: fe,
|
|
4389
|
+
services: m,
|
|
4390
|
+
operators: ct,
|
|
4387
4391
|
availableDates: f,
|
|
4388
|
-
availableSlots:
|
|
4392
|
+
availableSlots: x,
|
|
4389
4393
|
nextAvailableDate: g
|
|
4390
4394
|
},
|
|
4391
|
-
value:
|
|
4395
|
+
value: S,
|
|
4392
4396
|
onChange: q,
|
|
4393
4397
|
onSubmit: jt,
|
|
4394
4398
|
policy: { country: t, lockedOperatorId: s },
|
|
@@ -4396,15 +4400,15 @@ const Mi = Vn(
|
|
|
4396
4400
|
hideEmail: l,
|
|
4397
4401
|
emailOptional: h,
|
|
4398
4402
|
requireCodiceFiscale: v,
|
|
4399
|
-
requireDateOfBirth:
|
|
4403
|
+
requireDateOfBirth: u,
|
|
4400
4404
|
requireInsuranceNumber: M,
|
|
4401
|
-
insuranceType:
|
|
4405
|
+
insuranceType: S.insuranceType,
|
|
4402
4406
|
showNote: C,
|
|
4403
4407
|
showReturningPatientFlag: R,
|
|
4404
4408
|
privacyPolicyUrl: D,
|
|
4405
4409
|
termsUrl: _,
|
|
4406
4410
|
practiceConsent: O,
|
|
4407
|
-
criticalInformationToAccept:
|
|
4411
|
+
criticalInformationToAccept: rt,
|
|
4408
4412
|
locked: H === "code",
|
|
4409
4413
|
payment: G.payment,
|
|
4410
4414
|
paymentTermsUrl: $,
|
|
@@ -4423,8 +4427,8 @@ const Mi = Vn(
|
|
|
4423
4427
|
loadingDates: ke,
|
|
4424
4428
|
loadingSlots: oe,
|
|
4425
4429
|
slotLoadError: ae,
|
|
4426
|
-
onRetrySlots:
|
|
4427
|
-
emptySlotsDescription:
|
|
4430
|
+
onRetrySlots: Qe,
|
|
4431
|
+
emptySlotsDescription: ot,
|
|
4428
4432
|
onDateSelect: Be,
|
|
4429
4433
|
onWindowChange: he,
|
|
4430
4434
|
datePickerStyle: ve,
|
|
@@ -4436,9 +4440,9 @@ const Mi = Vn(
|
|
|
4436
4440
|
locale: Ee,
|
|
4437
4441
|
activeStep: ee,
|
|
4438
4442
|
setActiveStep: xe,
|
|
4439
|
-
agentIdBase:
|
|
4443
|
+
agentIdBase: Xe
|
|
4440
4444
|
};
|
|
4441
|
-
return /* @__PURE__ */ n(
|
|
4445
|
+
return /* @__PURE__ */ n(I, { ...B });
|
|
4442
4446
|
}, [
|
|
4443
4447
|
H,
|
|
4444
4448
|
G.payment,
|
|
@@ -4447,13 +4451,13 @@ const Mi = Vn(
|
|
|
4447
4451
|
le,
|
|
4448
4452
|
Se,
|
|
4449
4453
|
z,
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4454
|
+
fe,
|
|
4455
|
+
m,
|
|
4456
|
+
ct,
|
|
4453
4457
|
f,
|
|
4454
|
-
|
|
4458
|
+
x,
|
|
4455
4459
|
g,
|
|
4456
|
-
|
|
4460
|
+
S,
|
|
4457
4461
|
q,
|
|
4458
4462
|
jt,
|
|
4459
4463
|
t,
|
|
@@ -4461,7 +4465,7 @@ const Mi = Vn(
|
|
|
4461
4465
|
l,
|
|
4462
4466
|
h,
|
|
4463
4467
|
v,
|
|
4464
|
-
|
|
4468
|
+
u,
|
|
4465
4469
|
M,
|
|
4466
4470
|
N,
|
|
4467
4471
|
w,
|
|
@@ -4471,7 +4475,7 @@ const Mi = Vn(
|
|
|
4471
4475
|
D,
|
|
4472
4476
|
_,
|
|
4473
4477
|
O,
|
|
4474
|
-
|
|
4478
|
+
rt,
|
|
4475
4479
|
y,
|
|
4476
4480
|
W,
|
|
4477
4481
|
ne,
|
|
@@ -4482,8 +4486,8 @@ const Mi = Vn(
|
|
|
4482
4486
|
ke,
|
|
4483
4487
|
oe,
|
|
4484
4488
|
ae,
|
|
4485
|
-
|
|
4486
|
-
|
|
4489
|
+
Qe,
|
|
4490
|
+
ot,
|
|
4487
4491
|
Be,
|
|
4488
4492
|
he,
|
|
4489
4493
|
ve,
|
|
@@ -4494,7 +4498,7 @@ const Mi = Vn(
|
|
|
4494
4498
|
ft,
|
|
4495
4499
|
Ee,
|
|
4496
4500
|
ee,
|
|
4497
|
-
|
|
4501
|
+
Xe
|
|
4498
4502
|
]);
|
|
4499
4503
|
return /* @__PURE__ */ b(
|
|
4500
4504
|
"div",
|
|
@@ -4502,9 +4506,9 @@ const Mi = Vn(
|
|
|
4502
4506
|
ref: Te,
|
|
4503
4507
|
role: "region",
|
|
4504
4508
|
"aria-label": Gt,
|
|
4505
|
-
id:
|
|
4509
|
+
id: Xe,
|
|
4506
4510
|
"data-component": "booking",
|
|
4507
|
-
"data-component-id":
|
|
4511
|
+
"data-component-id": Xe,
|
|
4508
4512
|
"data-variant": Se,
|
|
4509
4513
|
className: si({
|
|
4510
4514
|
variant: Se,
|
|
@@ -4512,16 +4516,16 @@ const Mi = Vn(
|
|
|
4512
4516
|
className: gt
|
|
4513
4517
|
}),
|
|
4514
4518
|
tabIndex: -1,
|
|
4515
|
-
onFocus: (
|
|
4516
|
-
He.current =
|
|
4519
|
+
onFocus: (I) => {
|
|
4520
|
+
He.current = I.target, we == null || we(I);
|
|
4517
4521
|
},
|
|
4518
|
-
onBlur: (
|
|
4519
|
-
const B =
|
|
4522
|
+
onBlur: (I) => {
|
|
4523
|
+
const B = I.target;
|
|
4520
4524
|
window.setTimeout(() => {
|
|
4521
4525
|
var me;
|
|
4522
4526
|
const P = document.activeElement;
|
|
4523
4527
|
He.current === B && B.isConnected && !(P && ((me = Te.current) != null && me.contains(P))) && (He.current = null);
|
|
4524
|
-
}), At == null || At(
|
|
4528
|
+
}), At == null || At(I);
|
|
4525
4529
|
},
|
|
4526
4530
|
...$t,
|
|
4527
4531
|
children: [
|
|
@@ -4561,9 +4565,9 @@ const Mi = Vn(
|
|
|
4561
4565
|
type: "button",
|
|
4562
4566
|
intent: "ghost",
|
|
4563
4567
|
size: "md",
|
|
4564
|
-
disabled:
|
|
4568
|
+
disabled: ln,
|
|
4565
4569
|
onClick: () => {
|
|
4566
|
-
xt.current = !0,
|
|
4570
|
+
xt.current = !0, et.current();
|
|
4567
4571
|
},
|
|
4568
4572
|
children: le("booking.actions.change")
|
|
4569
4573
|
}
|
|
@@ -4592,10 +4596,10 @@ const Ro = {
|
|
|
4592
4596
|
};
|
|
4593
4597
|
export {
|
|
4594
4598
|
Mi as B,
|
|
4595
|
-
|
|
4599
|
+
hn as C,
|
|
4596
4600
|
qe as O,
|
|
4597
4601
|
ri as a,
|
|
4598
4602
|
bs as b,
|
|
4599
4603
|
Ro as c
|
|
4600
4604
|
};
|
|
4601
|
-
//# sourceMappingURL=reserved.agent-
|
|
4605
|
+
//# sourceMappingURL=reserved.agent-Dxzmi3GS.js.map
|