@alfadocs/ui-kit-debug 1.54.0 → 1.54.2
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/{booking-CPUjwxj0.js → booking-BN7TXe27.js} +1542 -1532
- package/dist/_chunks/booking-BN7TXe27.js.map +1 -0
- package/dist/_chunks/{contact-profile-card-h0QX4_5B.js → contact-profile-card-B-HzocbB.js} +45 -47
- package/dist/_chunks/contact-profile-card-B-HzocbB.js.map +1 -0
- package/dist/_chunks/error-page-C15GfNEj.js +312 -0
- package/dist/_chunks/error-page-C15GfNEj.js.map +1 -0
- package/dist/_chunks/{error-page-illustration-QGJAvuFB.js → error-page-illustration-bFti0VEc.js} +73 -56
- package/dist/_chunks/error-page-illustration-bFti0VEc.js.map +1 -0
- package/dist/_chunks/{login-dev-card-C7wo-Hv1.js → login-dev-card-q7iTojvV.js} +2 -2
- package/dist/_chunks/{login-dev-card-C7wo-Hv1.js.map → login-dev-card-q7iTojvV.js.map} +1 -1
- package/dist/agent-catalog.json +5 -1
- package/dist/components/booking/booking-types.d.ts +14 -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/components/contact-profile-card/contact-profile-card.d.ts.map +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/index.js +136 -134
- package/dist/index.js.map +1 -1
- package/dist/patterns/error-page/error-page-illustration.d.ts +3 -1
- package/dist/patterns/error-page/error-page-illustration.d.ts.map +1 -1
- package/dist/patterns/error-page/error-page.d.ts +34 -2
- package/dist/patterns/error-page/error-page.d.ts.map +1 -1
- package/dist/patterns/error-page/index.d.ts +2 -1
- package/dist/patterns/error-page/index.d.ts.map +1 -1
- package/dist/patterns/error-page/index.js +7 -5
- package/dist/patterns/error-page/index.js.map +1 -1
- package/dist/patterns/login-form/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
- package/dist/_chunks/booking-CPUjwxj0.js.map +0 -1
- package/dist/_chunks/contact-profile-card-h0QX4_5B.js.map +0 -1
- package/dist/_chunks/error-page-CKFJlekz.js +0 -275
- package/dist/_chunks/error-page-CKFJlekz.js.map +0 -1
- package/dist/_chunks/error-page-illustration-QGJAvuFB.js.map +0 -1
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import { jsx as s, jsxs as v, Fragment as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { u as
|
|
6
|
-
import { A as
|
|
7
|
-
import { B as
|
|
1
|
+
import { jsx as s, jsxs as v, Fragment as ne } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as us, useId as Pt, useRef as E, useCallback as ue, useState as Q, useEffect as q, useMemo as R, Fragment as Ps, useImperativeHandle as Vs } from "react";
|
|
3
|
+
import { c as bt } from "./index-D2ZczOXr.js";
|
|
4
|
+
import { useTranslation as G, Trans as $s } from "react-i18next";
|
|
5
|
+
import { u as qs } from "./registry-DvAUVLHh.js";
|
|
6
|
+
import { A as ee } from "./alert-BhCstf2h.js";
|
|
7
|
+
import { B as Xe } from "./button-CYPx2xFq.js";
|
|
8
8
|
import { C as rt } from "./checkbox--ndmyokr.js";
|
|
9
|
-
import { C as
|
|
10
|
-
import { D as
|
|
11
|
-
import { E as
|
|
12
|
-
import { F as
|
|
13
|
-
import { P as
|
|
14
|
-
import { T as
|
|
15
|
-
import { T as
|
|
16
|
-
import { A as
|
|
17
|
-
import { S as
|
|
18
|
-
import { a as
|
|
19
|
-
import { C as
|
|
20
|
-
import { B as
|
|
21
|
-
import { I as
|
|
22
|
-
import { S as
|
|
23
|
-
import { C as
|
|
24
|
-
import { M as
|
|
25
|
-
import { S as
|
|
26
|
-
import { E as
|
|
27
|
-
import { S as
|
|
28
|
-
import { S as
|
|
29
|
-
import { S as
|
|
30
|
-
import { p as
|
|
31
|
-
import { C as
|
|
32
|
-
import { r as at, f as
|
|
33
|
-
import { x as
|
|
34
|
-
import { s as
|
|
35
|
-
import { C as
|
|
36
|
-
import { C as
|
|
37
|
-
import { c as
|
|
38
|
-
import { M as
|
|
39
|
-
import { S as
|
|
40
|
-
import { H as
|
|
41
|
-
import { E as
|
|
42
|
-
import { B as
|
|
43
|
-
import { S as
|
|
44
|
-
import { A as
|
|
45
|
-
import { C as
|
|
9
|
+
import { C as Ks } from "./checkbox-group-B0oZHNT3.js";
|
|
10
|
+
import { D as zs } from "./date-picker-BnhBmcH6.js";
|
|
11
|
+
import { E as js } from "./email-input-Cmeo4zdT.js";
|
|
12
|
+
import { F as Ue } from "./form-field-D9WfDpYB.js";
|
|
13
|
+
import { P as Us } from "./phone-input-BzeUr49H.js";
|
|
14
|
+
import { T as Gs } from "./text-area-CDuItrvL.js";
|
|
15
|
+
import { T as Dt } from "./text-input-lZ2-t-p2.js";
|
|
16
|
+
import { A as Hs } from "./address-fields-1pD-8hML.js";
|
|
17
|
+
import { S as ps } from "./spinner-a0FTYX9Q.js";
|
|
18
|
+
import { a as yt } from "./format-price-DAbh61Lz.js";
|
|
19
|
+
import { C as Js } from "./credit-card-D9XZsHGA.js";
|
|
20
|
+
import { B as ms } from "./badge-hnBt8o7n.js";
|
|
21
|
+
import { I as ns } from "./icon-button-mKIvw90h.js";
|
|
22
|
+
import { S as Vt } from "./select-DHPmASkG.js";
|
|
23
|
+
import { C as Yt } from "./combobox-DppVSuUm.js";
|
|
24
|
+
import { M as Zt } from "./multi-select-CVb6PJOK.js";
|
|
25
|
+
import { S as Et } from "./skeleton-B1KTdJ4N.js";
|
|
26
|
+
import { E as fs } from "./empty-state-CgvmPPvW.js";
|
|
27
|
+
import { S as Ws } from "./stepper-accordion-BPNS6J6B.js";
|
|
28
|
+
import { S as Ys } from "./stepper-progress-D6H8wQiV.js";
|
|
29
|
+
import { S as Zs } from "./slot-grid-kCDoV3k4.js";
|
|
30
|
+
import { p as le } from "./parseISO-y3LncvfO.js";
|
|
31
|
+
import { C as Xs } from "./chevron-down-DWE7GSq9.js";
|
|
32
|
+
import { r as at, f as Bt, b as is } from "./format-D-1gTdHF.js";
|
|
33
|
+
import { x as gs, d as ot, a as Ut, i as Qs, s as ht, m as en, y as Ot } from "./date-picker-variants-B3AFKDSu.js";
|
|
34
|
+
import { s as tn } from "./subDays-XBMBTVOO.js";
|
|
35
|
+
import { C as sn } from "./chevron-left-B8cOyH-V.js";
|
|
36
|
+
import { C as nn } from "./chevron-right-I9AeSxH2.js";
|
|
37
|
+
import { c as ke } from "./createLucideIcon-DhHxpK9K.js";
|
|
38
|
+
import { M as rn, S as an } from "./sun-Bj9Mr553.js";
|
|
39
|
+
import { S as on } from "./stethoscope-sZXGC43m.js";
|
|
40
|
+
import { H as cn } from "./heart-pulse-BCppJyN2.js";
|
|
41
|
+
import { E as dn } from "./eye-BjhN2nYf.js";
|
|
42
|
+
import { B as ln } from "./baby-Dku-Xvg9.js";
|
|
43
|
+
import { S as un } from "./scan-line-CNseIHQ0.js";
|
|
44
|
+
import { A as pn } from "./astroid-BN4f5VXU.js";
|
|
45
|
+
import { C as mn } from "./clipboard-check-BeAGxDVT.js";
|
|
46
46
|
/**
|
|
47
47
|
* @license lucide-react v1.22.0 - ISC
|
|
48
48
|
*
|
|
49
49
|
* This source code is licensed under the ISC license.
|
|
50
50
|
* See the LICENSE file in the root directory of this source tree.
|
|
51
51
|
*/
|
|
52
|
-
const
|
|
52
|
+
const fn = [
|
|
53
53
|
[
|
|
54
54
|
"path",
|
|
55
55
|
{
|
|
@@ -57,14 +57,14 @@ const mn = [
|
|
|
57
57
|
key: "169zse"
|
|
58
58
|
}
|
|
59
59
|
]
|
|
60
|
-
],
|
|
60
|
+
], gn = ke("activity", fn);
|
|
61
61
|
/**
|
|
62
62
|
* @license lucide-react v1.22.0 - ISC
|
|
63
63
|
*
|
|
64
64
|
* This source code is licensed under the ISC license.
|
|
65
65
|
* See the LICENSE file in the root directory of this source tree.
|
|
66
66
|
*/
|
|
67
|
-
const
|
|
67
|
+
const hn = [
|
|
68
68
|
[
|
|
69
69
|
"path",
|
|
70
70
|
{
|
|
@@ -72,14 +72,14 @@ const gn = [
|
|
|
72
72
|
key: "w610uw"
|
|
73
73
|
}
|
|
74
74
|
]
|
|
75
|
-
],
|
|
75
|
+
], vn = ke("bone", hn);
|
|
76
76
|
/**
|
|
77
77
|
* @license lucide-react v1.22.0 - ISC
|
|
78
78
|
*
|
|
79
79
|
* This source code is licensed under the ISC license.
|
|
80
80
|
* See the LICENSE file in the root directory of this source tree.
|
|
81
81
|
*/
|
|
82
|
-
const
|
|
82
|
+
const bn = [
|
|
83
83
|
["path", { d: "M12 18V5", key: "adv99a" }],
|
|
84
84
|
["path", { d: "M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4", key: "1e3is1" }],
|
|
85
85
|
["path", { d: "M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5", key: "1gqd8o" }],
|
|
@@ -88,14 +88,14 @@ const vn = [
|
|
|
88
88
|
["path", { d: "M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517", key: "1gq6am" }],
|
|
89
89
|
["path", { d: "M6 18a4 4 0 0 1-2-7.464", key: "k1g0md" }],
|
|
90
90
|
["path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77", key: "q97ue3" }]
|
|
91
|
-
],
|
|
91
|
+
], yn = ke("brain", bn);
|
|
92
92
|
/**
|
|
93
93
|
* @license lucide-react v1.22.0 - ISC
|
|
94
94
|
*
|
|
95
95
|
* This source code is licensed under the ISC license.
|
|
96
96
|
* See the LICENSE file in the root directory of this source tree.
|
|
97
97
|
*/
|
|
98
|
-
const
|
|
98
|
+
const kn = [
|
|
99
99
|
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
100
100
|
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
101
101
|
["path", { d: "M3 10h18", key: "8toen8" }],
|
|
@@ -104,76 +104,76 @@ const yn = [
|
|
|
104
104
|
["path", { d: "M13 18H7", key: "bb0bb7" }],
|
|
105
105
|
["path", { d: "M7 14h.01", key: "1qa3f1" }],
|
|
106
106
|
["path", { d: "M17 18h.01", key: "1bdyru" }]
|
|
107
|
-
],
|
|
107
|
+
], Sn = ke("calendar-range", kn);
|
|
108
108
|
/**
|
|
109
109
|
* @license lucide-react v1.22.0 - ISC
|
|
110
110
|
*
|
|
111
111
|
* This source code is licensed under the ISC license.
|
|
112
112
|
* See the LICENSE file in the root directory of this source tree.
|
|
113
113
|
*/
|
|
114
|
-
const
|
|
114
|
+
const xn = [
|
|
115
115
|
["path", { d: "M6 8.5a6.5 6.5 0 1 1 13 0c0 6-6 6-6 10a3.5 3.5 0 1 1-7 0", key: "1dfaln" }],
|
|
116
116
|
["path", { d: "M15 8.5a2.5 2.5 0 0 0-5 0v1a2 2 0 1 1 0 4", key: "1qnva7" }]
|
|
117
|
-
],
|
|
117
|
+
], In = ke("ear", xn);
|
|
118
118
|
/**
|
|
119
119
|
* @license lucide-react v1.22.0 - ISC
|
|
120
120
|
*
|
|
121
121
|
* This source code is licensed under the ISC license.
|
|
122
122
|
* See the LICENSE file in the root directory of this source tree.
|
|
123
123
|
*/
|
|
124
|
-
const
|
|
124
|
+
const Nn = [
|
|
125
125
|
["path", { d: "M6 18h8", key: "1borvv" }],
|
|
126
126
|
["path", { d: "M3 22h18", key: "8prr45" }],
|
|
127
127
|
["path", { d: "M14 22a7 7 0 1 0 0-14h-1", key: "1jwaiy" }],
|
|
128
128
|
["path", { d: "M9 14h2", key: "197e7h" }],
|
|
129
129
|
["path", { d: "M9 12a2 2 0 0 1-2-2V6h6v4a2 2 0 0 1-2 2Z", key: "1bmzmy" }],
|
|
130
130
|
["path", { d: "M12 6V3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3", key: "1drr47" }]
|
|
131
|
-
],
|
|
131
|
+
], wn = ke("microscope", Nn);
|
|
132
132
|
/**
|
|
133
133
|
* @license lucide-react v1.22.0 - ISC
|
|
134
134
|
*
|
|
135
135
|
* This source code is licensed under the ISC license.
|
|
136
136
|
* See the LICENSE file in the root directory of this source tree.
|
|
137
137
|
*/
|
|
138
|
-
const
|
|
138
|
+
const Cn = [
|
|
139
139
|
[
|
|
140
140
|
"path",
|
|
141
141
|
{ d: "m10.5 20.5 10-10a4.95 4.95 0 1 0-7-7l-10 10a4.95 4.95 0 1 0 7 7Z", key: "wa1lgi" }
|
|
142
142
|
],
|
|
143
143
|
["path", { d: "m8.5 8.5 7 7", key: "rvfmvr" }]
|
|
144
|
-
],
|
|
144
|
+
], An = ke("pill", Cn);
|
|
145
145
|
/**
|
|
146
146
|
* @license lucide-react v1.22.0 - ISC
|
|
147
147
|
*
|
|
148
148
|
* This source code is licensed under the ISC license.
|
|
149
149
|
* See the LICENSE file in the root directory of this source tree.
|
|
150
150
|
*/
|
|
151
|
-
const
|
|
151
|
+
const Tn = [
|
|
152
152
|
["circle", { cx: "6", cy: "6", r: "3", key: "1lh9wr" }],
|
|
153
153
|
["path", { d: "M8.12 8.12 12 12", key: "1alkpv" }],
|
|
154
154
|
["path", { d: "M20 4 8.12 15.88", key: "xgtan2" }],
|
|
155
155
|
["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }],
|
|
156
156
|
["path", { d: "M14.8 14.8 20 20", key: "ptml3r" }]
|
|
157
|
-
],
|
|
157
|
+
], Dn = ke("scissors", Tn);
|
|
158
158
|
/**
|
|
159
159
|
* @license lucide-react v1.22.0 - ISC
|
|
160
160
|
*
|
|
161
161
|
* This source code is licensed under the ISC license.
|
|
162
162
|
* See the LICENSE file in the root directory of this source tree.
|
|
163
163
|
*/
|
|
164
|
-
const
|
|
164
|
+
const On = [
|
|
165
165
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
166
166
|
["path", { d: "M8 14s1.5 2 4 2 4-2 4-2", key: "1y1vjs" }],
|
|
167
167
|
["line", { x1: "9", x2: "9.01", y1: "9", y2: "9", key: "yxxnd0" }],
|
|
168
168
|
["line", { x1: "15", x2: "15.01", y1: "9", y2: "9", key: "1p4y9e" }]
|
|
169
|
-
],
|
|
169
|
+
], Mn = ke("smile", On);
|
|
170
170
|
/**
|
|
171
171
|
* @license lucide-react v1.22.0 - ISC
|
|
172
172
|
*
|
|
173
173
|
* This source code is licensed under the ISC license.
|
|
174
174
|
* See the LICENSE file in the root directory of this source tree.
|
|
175
175
|
*/
|
|
176
|
-
const
|
|
176
|
+
const Fn = [
|
|
177
177
|
["path", { d: "M12 10V2", key: "16sf7g" }],
|
|
178
178
|
["path", { d: "m4.93 10.93 1.41 1.41", key: "2a7f42" }],
|
|
179
179
|
["path", { d: "M2 18h2", key: "j10viu" }],
|
|
@@ -182,25 +182,25 @@ const Mn = [
|
|
|
182
182
|
["path", { d: "M22 22H2", key: "19qnx5" }],
|
|
183
183
|
["path", { d: "m16 6-4 4-4-4", key: "6wukr" }],
|
|
184
184
|
["path", { d: "M16 18a4 4 0 0 0-8 0", key: "1lzouq" }]
|
|
185
|
-
],
|
|
185
|
+
], _n = ke("sunset", Fn);
|
|
186
186
|
/**
|
|
187
187
|
* @license lucide-react v1.22.0 - ISC
|
|
188
188
|
*
|
|
189
189
|
* This source code is licensed under the ISC license.
|
|
190
190
|
* See the LICENSE file in the root directory of this source tree.
|
|
191
191
|
*/
|
|
192
|
-
const
|
|
192
|
+
const Ln = [
|
|
193
193
|
["path", { d: "m18 2 4 4", key: "22kx64" }],
|
|
194
194
|
["path", { d: "m17 7 3-3", key: "1w1zoj" }],
|
|
195
195
|
["path", { d: "M19 9 8.7 19.3c-1 1-2.5 1-3.4 0l-.6-.6c-1-1-1-2.5 0-3.4L15 5", key: "1exhtz" }],
|
|
196
196
|
["path", { d: "m9 11 4 4", key: "rovt3i" }],
|
|
197
197
|
["path", { d: "m5 19-3 3", key: "59f2uf" }],
|
|
198
198
|
["path", { d: "m14 4 6 6", key: "yqp9t2" }]
|
|
199
|
-
],
|
|
200
|
-
function
|
|
201
|
-
return
|
|
199
|
+
], rs = ke("syringe", Ln);
|
|
200
|
+
function Bn(e, t, n) {
|
|
201
|
+
return gs(e, -1, n);
|
|
202
202
|
}
|
|
203
|
-
const
|
|
203
|
+
const En = {
|
|
204
204
|
id: "booking",
|
|
205
205
|
// `view_change` removed (0.69): the layout `variant` is a fixed prop — the
|
|
206
206
|
// handle exposes only `getVariant` (state), no action mutates it. The flow's
|
|
@@ -275,12 +275,12 @@ const Bn = {
|
|
|
275
275
|
description: "Sourced from the id prop."
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
|
-
},
|
|
278
|
+
}, Jt = [
|
|
279
279
|
"email",
|
|
280
280
|
"whatsapp",
|
|
281
281
|
"sms"
|
|
282
|
-
],
|
|
283
|
-
function
|
|
282
|
+
], Ce = "all", Rn = "de";
|
|
283
|
+
function Pn(e) {
|
|
284
284
|
const t = e.lockedOperatorId;
|
|
285
285
|
return [...t ? e.operatorsByService ? e.specialties.filter(
|
|
286
286
|
(r) => e.services.some(
|
|
@@ -293,11 +293,11 @@ function Rn(e) {
|
|
|
293
293
|
var i;
|
|
294
294
|
return (i = r.operatorIds) == null ? void 0 : i.includes(t);
|
|
295
295
|
}) : e.specialties].sort((r, i) => {
|
|
296
|
-
const a = r.sequenceNumber ?? Number.POSITIVE_INFINITY,
|
|
297
|
-
return a -
|
|
296
|
+
const a = r.sequenceNumber ?? Number.POSITIVE_INFINITY, c = i.sequenceNumber ?? Number.POSITIVE_INFINITY;
|
|
297
|
+
return a - c;
|
|
298
298
|
});
|
|
299
299
|
}
|
|
300
|
-
function
|
|
300
|
+
function Vn(e) {
|
|
301
301
|
let t = e.services;
|
|
302
302
|
if (e.lockedOperatorId && (t = t.filter(
|
|
303
303
|
(r) => {
|
|
@@ -305,15 +305,15 @@ function Pn(e) {
|
|
|
305
305
|
return (i = r.operatorIds) == null ? void 0 : i.includes(e.lockedOperatorId);
|
|
306
306
|
}
|
|
307
307
|
)), e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties) {
|
|
308
|
-
const r =
|
|
308
|
+
const r = Ge(e.value);
|
|
309
309
|
r.length > 0 && (t = t.filter(
|
|
310
310
|
(i) => i.specialtyId !== void 0 && r.includes(i.specialtyId)
|
|
311
311
|
));
|
|
312
312
|
}
|
|
313
313
|
return t;
|
|
314
314
|
}
|
|
315
|
-
function
|
|
316
|
-
const t = e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties, n =
|
|
315
|
+
function $n(e) {
|
|
316
|
+
const t = e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties, n = _e(e.value);
|
|
317
317
|
if ((!t || e.operatorsByService) && n.length > 0)
|
|
318
318
|
return e.operators.filter(
|
|
319
319
|
(r) => {
|
|
@@ -322,48 +322,48 @@ function Vn(e) {
|
|
|
322
322
|
}
|
|
323
323
|
);
|
|
324
324
|
if (t) {
|
|
325
|
-
const r =
|
|
325
|
+
const r = Ge(e.value);
|
|
326
326
|
if (r.length > 0)
|
|
327
327
|
return e.operators.filter(
|
|
328
328
|
(i) => {
|
|
329
329
|
var a;
|
|
330
|
-
return (a = i.specialtyIds) == null ? void 0 : a.some((
|
|
330
|
+
return (a = i.specialtyIds) == null ? void 0 : a.some((c) => r.includes(c));
|
|
331
331
|
}
|
|
332
332
|
);
|
|
333
333
|
}
|
|
334
334
|
return [];
|
|
335
335
|
}
|
|
336
|
-
function
|
|
337
|
-
const n = e.country ===
|
|
336
|
+
function qn(e, t) {
|
|
337
|
+
const n = e.country === Rn, r = !n || e.value.insuranceType !== void 0, a = (e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties) && r, c = Ge(e.value).length > 0, p = !a || c, m = _e(e.value).length > 0, g = !p || m, l = t.operators, o = !!e.allowOperatorSelection && g && m && !e.lockedOperatorId && l.length > 1, u = g && m, I = (!u || e.value.date !== void 0) && e.value.date !== void 0, M = (!I || e.value.slotKey !== void 0) && e.value.slotKey !== void 0, w = m && l.length === 0;
|
|
338
338
|
return {
|
|
339
339
|
insurance: n,
|
|
340
340
|
specialty: a,
|
|
341
|
-
service:
|
|
342
|
-
operator:
|
|
343
|
-
date:
|
|
341
|
+
service: p,
|
|
342
|
+
operator: o,
|
|
343
|
+
date: u,
|
|
344
344
|
slot: I,
|
|
345
|
-
details:
|
|
345
|
+
details: M,
|
|
346
346
|
onboardingIncomplete: w
|
|
347
347
|
};
|
|
348
348
|
}
|
|
349
|
-
function
|
|
349
|
+
function Kn(e, t) {
|
|
350
350
|
const n = [];
|
|
351
351
|
return t.insurance && n.push(1), t.specialty && n.push(2), n.push(3), t.operator && n.push(4), n.push(5), n.push(6), n.push(7), {
|
|
352
352
|
currentStep: n.find(
|
|
353
|
-
(i) => !
|
|
353
|
+
(i) => !Fe(i, e.value)
|
|
354
354
|
) ?? 7,
|
|
355
355
|
visibleSteps: n
|
|
356
356
|
};
|
|
357
357
|
}
|
|
358
|
-
function
|
|
358
|
+
function Fe(e, t) {
|
|
359
359
|
switch (e) {
|
|
360
360
|
case 1:
|
|
361
361
|
return t.insuranceType !== void 0;
|
|
362
362
|
// 0.34.0: array-or-single — satisfied when EITHER form is present.
|
|
363
363
|
case 2:
|
|
364
|
-
return
|
|
364
|
+
return Ge(t).length > 0;
|
|
365
365
|
case 3:
|
|
366
|
-
return
|
|
366
|
+
return _e(t).length > 0;
|
|
367
367
|
// Always satisfied, like its gate: "no preference" is a valid answer,
|
|
368
368
|
// whether it is the `'all'` sentinel or an empty multi-select.
|
|
369
369
|
case 4:
|
|
@@ -377,30 +377,30 @@ function Ae(e, t) {
|
|
|
377
377
|
return !1;
|
|
378
378
|
}
|
|
379
379
|
}
|
|
380
|
-
function
|
|
380
|
+
function zn(e) {
|
|
381
381
|
const t = {
|
|
382
|
-
specialties:
|
|
383
|
-
services:
|
|
384
|
-
operators:
|
|
385
|
-
}, n =
|
|
382
|
+
specialties: Pn(e),
|
|
383
|
+
services: Vn(e),
|
|
384
|
+
operators: $n(e)
|
|
385
|
+
}, n = qn(e, t), { currentStep: r, visibleSteps: i } = Kn(e, n);
|
|
386
386
|
let a;
|
|
387
387
|
if (e.value.date && e.value.slotKey) {
|
|
388
|
-
const
|
|
389
|
-
|
|
388
|
+
const g = e.availableSlots[e.value.date];
|
|
389
|
+
g && (a = g.find((l) => l.key === e.value.slotKey));
|
|
390
390
|
}
|
|
391
|
-
const
|
|
391
|
+
const c = _e(e.value), f = c.length > 0 ? e.services.find((g) => g.id === c[0]) : void 0, p = Ge(e.value).length > 0, m = c.length > 0 && e.value.date !== void 0 && e.value.slotKey !== void 0 && (!n.insurance || e.value.insuranceType !== void 0) && (!n.specialty || p);
|
|
392
392
|
return {
|
|
393
393
|
gates: n,
|
|
394
394
|
filtered: t,
|
|
395
395
|
currentStep: r,
|
|
396
396
|
totalSteps: i.length,
|
|
397
397
|
visibleSteps: i,
|
|
398
|
-
isReadyToSubmit:
|
|
399
|
-
durationMin:
|
|
398
|
+
isReadyToSubmit: m,
|
|
399
|
+
durationMin: f == null ? void 0 : f.durationMin,
|
|
400
400
|
selectedSlot: a
|
|
401
401
|
};
|
|
402
402
|
}
|
|
403
|
-
function
|
|
403
|
+
function hs(e, t) {
|
|
404
404
|
return {
|
|
405
405
|
...e,
|
|
406
406
|
insuranceType: t,
|
|
@@ -412,7 +412,7 @@ function gs(e, t) {
|
|
|
412
412
|
details: void 0
|
|
413
413
|
};
|
|
414
414
|
}
|
|
415
|
-
function
|
|
415
|
+
function vs(e, t) {
|
|
416
416
|
return {
|
|
417
417
|
...e,
|
|
418
418
|
specialtyId: t,
|
|
@@ -426,7 +426,7 @@ function hs(e, t) {
|
|
|
426
426
|
details: void 0
|
|
427
427
|
};
|
|
428
428
|
}
|
|
429
|
-
function
|
|
429
|
+
function bs(e, t) {
|
|
430
430
|
return {
|
|
431
431
|
...e,
|
|
432
432
|
specialtyId: void 0,
|
|
@@ -440,7 +440,7 @@ function vs(e, t) {
|
|
|
440
440
|
details: void 0
|
|
441
441
|
};
|
|
442
442
|
}
|
|
443
|
-
function
|
|
443
|
+
function ys(e, t) {
|
|
444
444
|
return {
|
|
445
445
|
...e,
|
|
446
446
|
serviceId: t,
|
|
@@ -448,27 +448,27 @@ function bs(e, t) {
|
|
|
448
448
|
// Default the operator to the "All operators" sentinel so a patient
|
|
449
449
|
// who doesn't care about picking lands on a satisfied step 4 without
|
|
450
450
|
// any further input.
|
|
451
|
-
operatorId: t ?
|
|
451
|
+
operatorId: t ? Ce : void 0,
|
|
452
452
|
operatorIds: void 0,
|
|
453
453
|
date: void 0,
|
|
454
454
|
slotKey: void 0,
|
|
455
455
|
details: void 0
|
|
456
456
|
};
|
|
457
457
|
}
|
|
458
|
-
function
|
|
458
|
+
function ks(e, t) {
|
|
459
459
|
const n = !!t && t.length > 0;
|
|
460
460
|
return {
|
|
461
461
|
...e,
|
|
462
462
|
serviceId: void 0,
|
|
463
463
|
serviceIds: t,
|
|
464
|
-
operatorId: n ?
|
|
464
|
+
operatorId: n ? Ce : void 0,
|
|
465
465
|
operatorIds: void 0,
|
|
466
466
|
date: void 0,
|
|
467
467
|
slotKey: void 0,
|
|
468
468
|
details: void 0
|
|
469
469
|
};
|
|
470
470
|
}
|
|
471
|
-
function
|
|
471
|
+
function Ss(e, t) {
|
|
472
472
|
return {
|
|
473
473
|
...e,
|
|
474
474
|
operatorId: t,
|
|
@@ -478,7 +478,7 @@ function ks(e, t) {
|
|
|
478
478
|
details: void 0
|
|
479
479
|
};
|
|
480
480
|
}
|
|
481
|
-
function
|
|
481
|
+
function xs(e, t) {
|
|
482
482
|
return {
|
|
483
483
|
...e,
|
|
484
484
|
operatorId: void 0,
|
|
@@ -488,16 +488,16 @@ function Ss(e, t) {
|
|
|
488
488
|
details: void 0
|
|
489
489
|
};
|
|
490
490
|
}
|
|
491
|
-
function
|
|
491
|
+
function Ge(e) {
|
|
492
492
|
return e.specialtyIds && e.specialtyIds.length > 0 ? e.specialtyIds : e.specialtyId ? [e.specialtyId] : [];
|
|
493
493
|
}
|
|
494
|
-
function
|
|
494
|
+
function _e(e) {
|
|
495
495
|
return e.serviceIds && e.serviceIds.length > 0 ? e.serviceIds : e.serviceId ? [e.serviceId] : [];
|
|
496
496
|
}
|
|
497
|
-
function
|
|
497
|
+
function Wt(e) {
|
|
498
498
|
return e.operatorIds && e.operatorIds.length > 0 ? e.operatorIds : e.operatorId ? [e.operatorId] : [];
|
|
499
499
|
}
|
|
500
|
-
function
|
|
500
|
+
function $t(e, t) {
|
|
501
501
|
return {
|
|
502
502
|
...e,
|
|
503
503
|
date: t,
|
|
@@ -506,49 +506,49 @@ function Vt(e, t) {
|
|
|
506
506
|
// since the user has already filled some fields.
|
|
507
507
|
};
|
|
508
508
|
}
|
|
509
|
-
function
|
|
509
|
+
function Is(e, t) {
|
|
510
510
|
return {
|
|
511
511
|
...e,
|
|
512
512
|
slotKey: t
|
|
513
513
|
};
|
|
514
514
|
}
|
|
515
|
-
function
|
|
515
|
+
function jn(e, t) {
|
|
516
516
|
let n = e;
|
|
517
517
|
if (t.lockedOperatorId && n.operatorId !== t.lockedOperatorId && (n = { ...n, operatorId: t.lockedOperatorId }), (t.useSpecialties === void 0 ? t.specialties.length > 0 : t.useSpecialties) && t.specialties.length === 1 && n.specialtyId === void 0 && n.specialtyIds === void 0 && (n = { ...n, specialtyId: t.specialties[0].id }), t.autoSelectSingleService) {
|
|
518
|
-
const i =
|
|
519
|
-
(
|
|
518
|
+
const i = Ge(n), a = i.length > 0 ? t.services.filter(
|
|
519
|
+
(c) => c.specialtyId && i.includes(c.specialtyId)
|
|
520
520
|
) : t.services;
|
|
521
|
-
a.length === 1 && n.serviceId === void 0 && n.serviceIds === void 0 && (n = { ...n, serviceId: a[0].id }, n.operatorId === void 0 && n.operatorIds === void 0 && (n = { ...n, operatorId:
|
|
521
|
+
a.length === 1 && n.serviceId === void 0 && n.serviceIds === void 0 && (n = { ...n, serviceId: a[0].id }, n.operatorId === void 0 && n.operatorIds === void 0 && (n = { ...n, operatorId: Ce }));
|
|
522
522
|
}
|
|
523
523
|
return n;
|
|
524
524
|
}
|
|
525
|
-
function
|
|
526
|
-
if (e.operatorId && e.operatorId !==
|
|
525
|
+
function Ns(e) {
|
|
526
|
+
if (e.operatorId && e.operatorId !== Ce)
|
|
527
527
|
return e.operatorId;
|
|
528
528
|
}
|
|
529
|
-
function
|
|
529
|
+
function Un(e) {
|
|
530
530
|
if (!e) return !1;
|
|
531
531
|
const t = e.trim();
|
|
532
532
|
return /^\+?\d[\d\s\-()]{6,}$/.test(t);
|
|
533
533
|
}
|
|
534
|
-
function
|
|
534
|
+
function ws(e) {
|
|
535
535
|
const t = e && e.length > 0 ? e : ["email"], n = new Set(t);
|
|
536
|
-
return
|
|
536
|
+
return Jt.filter((r) => n.has(r));
|
|
537
537
|
}
|
|
538
|
-
function
|
|
539
|
-
const r =
|
|
538
|
+
function Gn(e, t, n) {
|
|
539
|
+
const r = ws(e), i = new Set(r);
|
|
540
540
|
if (n)
|
|
541
|
-
return
|
|
542
|
-
(
|
|
541
|
+
return Jt.filter(
|
|
542
|
+
(m) => n.includes(m) && i.has(m)
|
|
543
543
|
);
|
|
544
544
|
const a = [];
|
|
545
545
|
i.has("email") && a.push("email");
|
|
546
|
-
const
|
|
547
|
-
|
|
548
|
-
const
|
|
549
|
-
return
|
|
546
|
+
const c = Un(t), f = i.has("whatsapp");
|
|
547
|
+
f && c && a.push("whatsapp"), !f && i.has("sms") && a.push("sms");
|
|
548
|
+
const p = new Set(a);
|
|
549
|
+
return Jt.filter((m) => p.has(m));
|
|
550
550
|
}
|
|
551
|
-
const
|
|
551
|
+
const Hn = /https?:\/\/(?:(?![.,;:!?'»›]https?:\/\/)[^\s<>"\u060C\u061B\u061F\u06D4\u2000-\u206F\u3000-\u303F\uFF00-\uFFEF])+/gi, Jn = /* @__PURE__ */ new Set([
|
|
552
552
|
".",
|
|
553
553
|
",",
|
|
554
554
|
";",
|
|
@@ -558,15 +558,15 @@ const Gn = /https?:\/\/(?:(?![.,;:!?'»›]https?:\/\/)[^\s<>"\u060C\u061B\u061F
|
|
|
558
558
|
"'",
|
|
559
559
|
"»",
|
|
560
560
|
"›"
|
|
561
|
-
]),
|
|
562
|
-
function
|
|
561
|
+
]), Wn = { ")": "(", "]": "[", "}": "{" }, as = (e, t) => e.split(t).length - 1;
|
|
562
|
+
function Yn(e) {
|
|
563
563
|
const t = {};
|
|
564
|
-
for (const [r, i] of Object.entries(
|
|
565
|
-
t[r] =
|
|
564
|
+
for (const [r, i] of Object.entries(Wn))
|
|
565
|
+
t[r] = as(e, r) - as(e, i);
|
|
566
566
|
let n = e.length;
|
|
567
567
|
for (; n > 0; ) {
|
|
568
568
|
const r = e[n - 1];
|
|
569
|
-
if (
|
|
569
|
+
if (Jn.has(r))
|
|
570
570
|
n -= 1;
|
|
571
571
|
else if (r in t && t[r] > 0)
|
|
572
572
|
t[r] -= 1, n -= 1;
|
|
@@ -575,12 +575,12 @@ function Wn(e) {
|
|
|
575
575
|
}
|
|
576
576
|
return e.slice(0, n);
|
|
577
577
|
}
|
|
578
|
-
const
|
|
579
|
-
function Xn(e) {
|
|
580
|
-
const t = e.search(Yn);
|
|
581
|
-
return t > 0 && Zn.test(e[t - 1]) ? e.slice(0, t) : e;
|
|
582
|
-
}
|
|
578
|
+
const Zn = /[\u0600-\u06FF\u3040-\u30FF\u3400-\u9FFF\uAC00-\uD7AF]/, Xn = /[A-Za-z0-9]/;
|
|
583
579
|
function Qn(e) {
|
|
580
|
+
const t = e.search(Zn);
|
|
581
|
+
return t > 0 && Xn.test(e[t - 1]) ? e.slice(0, t) : e;
|
|
582
|
+
}
|
|
583
|
+
function ei(e) {
|
|
584
584
|
try {
|
|
585
585
|
const { protocol: t, hostname: n } = new URL(e);
|
|
586
586
|
return (t === "http:" || t === "https:") && n !== "";
|
|
@@ -588,7 +588,7 @@ function Qn(e) {
|
|
|
588
588
|
return !1;
|
|
589
589
|
}
|
|
590
590
|
}
|
|
591
|
-
function
|
|
591
|
+
function ti(e) {
|
|
592
592
|
const t = [];
|
|
593
593
|
let n = 0;
|
|
594
594
|
const r = (i) => {
|
|
@@ -596,13 +596,13 @@ function ei(e) {
|
|
|
596
596
|
const a = t[t.length - 1];
|
|
597
597
|
(a == null ? void 0 : a.kind) === "text" ? a.text += i : t.push({ kind: "text", text: i });
|
|
598
598
|
};
|
|
599
|
-
for (const i of e.matchAll(
|
|
600
|
-
const a = i.index ?? 0,
|
|
601
|
-
|
|
599
|
+
for (const i of e.matchAll(Hn)) {
|
|
600
|
+
const a = i.index ?? 0, c = Yn(Qn(i[0]));
|
|
601
|
+
ei(c) && (r(e.slice(n, a)), t.push({ kind: "link", text: c, href: c }), n = a + c.length);
|
|
602
602
|
}
|
|
603
603
|
return r(e.slice(n)), t;
|
|
604
604
|
}
|
|
605
|
-
const
|
|
605
|
+
const os = 500, si = /^[A-Z0-9]{16}$/, ni = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, cs = 300, Gt = "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)]", Mt = (e) => e && /^https?:\/\//i.test(e) ? e : void 0, ii = (e, t) => ({
|
|
606
606
|
street: (e == null ? void 0 : e.address.line1) ?? "",
|
|
607
607
|
city: (e == null ? void 0 : e.address.city) ?? "",
|
|
608
608
|
postcode: (e == null ? void 0 : e.address.postalCode) ?? "",
|
|
@@ -610,7 +610,7 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
|
|
|
610
610
|
// The practice's country only until the patient has an address at all.
|
|
611
611
|
country: (e ? e.address.country : t).toLowerCase(),
|
|
612
612
|
formatted: ""
|
|
613
|
-
}),
|
|
613
|
+
}), ri = (e, t, n = null) => ({
|
|
614
614
|
name: t,
|
|
615
615
|
address: {
|
|
616
616
|
line1: e.street,
|
|
@@ -620,7 +620,7 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
|
|
|
620
620
|
postalCode: e.postcode,
|
|
621
621
|
country: e.country.toUpperCase()
|
|
622
622
|
}
|
|
623
|
-
}),
|
|
623
|
+
}), ai = bt("ds:flex ds:flex-col ds:border", {
|
|
624
624
|
variants: {
|
|
625
625
|
noticeStyle: {
|
|
626
626
|
plain: "ds:gap-[var(--spacing-xs)] ds:rounded-[var(--radius-md)] ds:border-[var(--border)] ds:bg-[var(--muted)] ds:p-[var(--spacing-sm)]",
|
|
@@ -628,17 +628,17 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
|
|
|
628
628
|
}
|
|
629
629
|
},
|
|
630
630
|
defaultVariants: { noticeStyle: "plain" }
|
|
631
|
-
}),
|
|
631
|
+
}), oi = ["it", "ch", "de", "at", "fr", "sm"], vt = {
|
|
632
632
|
country: "billing.country",
|
|
633
633
|
street: "billing.street",
|
|
634
634
|
city: "billing.city",
|
|
635
635
|
postcode: "billing.postcode",
|
|
636
636
|
province: "billing.province"
|
|
637
|
-
},
|
|
637
|
+
}, Cs = /^\d{5}$/, ci = (e) => {
|
|
638
638
|
if (!e) return !1;
|
|
639
639
|
const { line1: t, city: n, postalCode: r, country: i, state: a } = e.address;
|
|
640
|
-
return !t.trim() || !n.trim() || !r.trim() || !i.trim() ? !1 : i.toUpperCase() !== "IT" ? !0 : !!a.trim() &&
|
|
641
|
-
},
|
|
640
|
+
return !t.trim() || !n.trim() || !r.trim() || !i.trim() ? !1 : i.toUpperCase() !== "IT" ? !0 : !!a.trim() && Cs.test(r.trim());
|
|
641
|
+
}, di = (e, t) => {
|
|
642
642
|
var n;
|
|
643
643
|
return {
|
|
644
644
|
name: t,
|
|
@@ -651,7 +651,7 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
|
|
|
651
651
|
country: e.address.country.trim().toUpperCase()
|
|
652
652
|
}
|
|
653
653
|
};
|
|
654
|
-
},
|
|
654
|
+
}, Ft = { state: "idle" }, Xt = us(
|
|
655
655
|
({
|
|
656
656
|
value: e,
|
|
657
657
|
onChange: t,
|
|
@@ -659,146 +659,146 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
|
|
|
659
659
|
requireCodiceFiscale: r = !1,
|
|
660
660
|
requireDateOfBirth: i = !1,
|
|
661
661
|
requireInsuranceNumber: a = !1,
|
|
662
|
-
insuranceType:
|
|
663
|
-
showNote:
|
|
664
|
-
showReturningPatientFlag:
|
|
665
|
-
privacyPolicyUrl:
|
|
666
|
-
termsUrl:
|
|
667
|
-
practiceConsent:
|
|
668
|
-
payment:
|
|
669
|
-
paymentTermsUrl:
|
|
670
|
-
paymentBlocked:
|
|
662
|
+
insuranceType: c,
|
|
663
|
+
showNote: f = !1,
|
|
664
|
+
showReturningPatientFlag: p = !1,
|
|
665
|
+
privacyPolicyUrl: m,
|
|
666
|
+
termsUrl: g,
|
|
667
|
+
practiceConsent: l,
|
|
668
|
+
payment: o,
|
|
669
|
+
paymentTermsUrl: u,
|
|
670
|
+
paymentBlocked: k = !1,
|
|
671
671
|
billingInDetails: I = !1,
|
|
672
|
-
paymentNoticeStyle:
|
|
673
|
-
criticalInformationToAccept:
|
|
672
|
+
paymentNoticeStyle: N = "plain",
|
|
673
|
+
criticalInformationToAccept: M,
|
|
674
674
|
validateCodiceFiscale: w,
|
|
675
|
-
validateInsuranceNumber:
|
|
676
|
-
submitting:
|
|
677
|
-
summarySlot:
|
|
675
|
+
validateInsuranceNumber: x,
|
|
676
|
+
submitting: S = !1,
|
|
677
|
+
summarySlot: A,
|
|
678
678
|
defaultPhoneCountry: D,
|
|
679
|
-
confirmationChannels:
|
|
680
|
-
defaultConfirmationChannels:
|
|
681
|
-
submitError:
|
|
679
|
+
confirmationChannels: T,
|
|
680
|
+
defaultConfirmationChannels: h,
|
|
681
|
+
submitError: C
|
|
682
682
|
}, $) => {
|
|
683
|
-
var
|
|
684
|
-
const { t: b, i18n:
|
|
685
|
-
(
|
|
686
|
-
|
|
683
|
+
var je, Ct, ft, At, gt;
|
|
684
|
+
const { t: b, i18n: pe } = G("ui"), F = Pt(), z = E(null), _ = ue(
|
|
685
|
+
(d) => {
|
|
686
|
+
z.current = d, typeof $ == "function" ? $(d) : $ && ($.current = d);
|
|
687
687
|
},
|
|
688
688
|
[$]
|
|
689
|
-
), [
|
|
690
|
-
|
|
691
|
-
var
|
|
692
|
-
if (
|
|
693
|
-
const
|
|
689
|
+
), [me, dt] = Q(0);
|
|
690
|
+
q(() => {
|
|
691
|
+
var O;
|
|
692
|
+
if (me === 0) return;
|
|
693
|
+
const d = (O = z.current) == null ? void 0 : O.querySelectorAll(
|
|
694
694
|
'[aria-invalid="true"], [role="checkbox"][aria-required="true"][aria-checked="false"], [data-unanswered] [role="checkbox"]'
|
|
695
695
|
);
|
|
696
|
-
for (const
|
|
697
|
-
if (
|
|
698
|
-
}, [
|
|
699
|
-
const
|
|
700
|
-
(
|
|
696
|
+
for (const y of d ?? [])
|
|
697
|
+
if (y.focus(), document.activeElement === y) return;
|
|
698
|
+
}, [me]);
|
|
699
|
+
const fe = E(!1), [He, Le] = Q(!1), [H, Be] = Q(!1), ge = S || He, [J, ae] = Q(Ft), [he, Se] = Q(Ft), [W, Ae] = Q({}), ie = ue(
|
|
700
|
+
(d) => Ae((O) => ({ ...O, [d]: !0 })),
|
|
701
701
|
[]
|
|
702
|
-
), oe =
|
|
702
|
+
), oe = E(null), te = E(
|
|
703
703
|
null
|
|
704
704
|
);
|
|
705
|
-
|
|
705
|
+
q(
|
|
706
706
|
() => () => {
|
|
707
|
-
oe.current && clearTimeout(oe.current),
|
|
707
|
+
oe.current && clearTimeout(oe.current), te.current && clearTimeout(te.current);
|
|
708
708
|
},
|
|
709
709
|
[]
|
|
710
710
|
);
|
|
711
|
-
const
|
|
712
|
-
(
|
|
713
|
-
|
|
711
|
+
const L = ue(
|
|
712
|
+
(d) => {
|
|
713
|
+
Be(!1), t({ ...e, ...d });
|
|
714
714
|
},
|
|
715
715
|
[e, t]
|
|
716
|
-
),
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
]) : void 0, [
|
|
723
|
-
() => e.paymentAccepted ?
|
|
724
|
-
),
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
}, [
|
|
728
|
-
const
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
]) : void 0, [
|
|
733
|
-
() => e.practiceConsentAccepted ?
|
|
734
|
-
),
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
}, [
|
|
738
|
-
const
|
|
716
|
+
), xe = o ? JSON.stringify([
|
|
717
|
+
o.serviceId,
|
|
718
|
+
o.kind,
|
|
719
|
+
o.amountCents,
|
|
720
|
+
o.currencyCode,
|
|
721
|
+
u
|
|
722
|
+
]) : void 0, [Kt, Ee] = Q(
|
|
723
|
+
() => e.paymentAccepted ? xe : void 0
|
|
724
|
+
), kt = E(xe), Qe = !!(o && e.paymentAccepted && Kt === xe);
|
|
725
|
+
q(() => {
|
|
726
|
+
kt.current !== xe && (kt.current = xe, Ee(void 0), e.paymentAccepted !== void 0 && L({ paymentAccepted: o ? !1 : void 0 }));
|
|
727
|
+
}, [xe, o, L, e.paymentAccepted]);
|
|
728
|
+
const Re = typeof (l == null ? void 0 : l.label) == "string" && l.label.trim() !== "", Ie = l && Re ? JSON.stringify([
|
|
729
|
+
l.label,
|
|
730
|
+
l.url ?? null,
|
|
731
|
+
l.required
|
|
732
|
+
]) : void 0, [zt, Z] = Q(
|
|
733
|
+
() => e.practiceConsentAccepted ? Ie : void 0
|
|
734
|
+
), St = E(Ie), se = !!(Ie !== void 0 && e.practiceConsentAccepted && zt === Ie);
|
|
735
|
+
q(() => {
|
|
736
|
+
St.current !== Ie && (St.current = Ie, Z(void 0), e.practiceConsentAccepted !== void 0 && L({ practiceConsentAccepted: void 0 }));
|
|
737
|
+
}, [Ie, L, e.practiceConsentAccepted]);
|
|
738
|
+
const Te = o ? yt(o.amountCents, o.currencyCode, pe.language) : "", Ne = Mt(u), ve = I && !!o && !k, B = r, et = (D || "it").toLowerCase(), Je = !ve || ci(e.billing), We = ii(e.billing, et), X = We.country === "it", we = E(null), Pe = E(
|
|
739
739
|
null
|
|
740
|
-
),
|
|
741
|
-
|
|
742
|
-
var
|
|
743
|
-
|
|
744
|
-
}, [
|
|
745
|
-
const
|
|
740
|
+
), Ve = (je = e.billing) == null ? void 0 : je.address.line1.trim(), ce = ((ft = (Ct = e.billing) == null ? void 0 : Ct.address.line2) == null ? void 0 : ft.trim()) || null;
|
|
741
|
+
q(() => {
|
|
742
|
+
var d;
|
|
743
|
+
Ve !== void 0 && ce ? Pe.current = { street: Ve, line2: ce } : (Ve === void 0 || Ve === ((d = Pe.current) == null ? void 0 : d.street)) && (Pe.current = null);
|
|
744
|
+
}, [Ve, ce]);
|
|
745
|
+
const De = (d) => W[vt[d]] ? We[d].trim() ? (
|
|
746
746
|
// The one format the block itself checks: an Italian CAP.
|
|
747
|
-
|
|
748
|
-
) : b("booking.details.fieldRequired") : void 0,
|
|
749
|
-
() =>
|
|
750
|
-
(
|
|
751
|
-
...
|
|
747
|
+
d === "postcode" && X && !Cs.test(We.postcode.trim()) ? b("inputs.postalCode.invalid") : void 0
|
|
748
|
+
) : b("booking.details.fieldRequired") : void 0, xt = ue(
|
|
749
|
+
() => Ae(
|
|
750
|
+
(d) => d[vt.province] ? d : {
|
|
751
|
+
...d,
|
|
752
752
|
codiceFiscale: !0,
|
|
753
753
|
...Object.fromEntries(
|
|
754
|
-
Object.values(
|
|
754
|
+
Object.values(vt).map((O) => [O, !0])
|
|
755
755
|
)
|
|
756
756
|
}
|
|
757
757
|
),
|
|
758
758
|
[]
|
|
759
|
-
),
|
|
760
|
-
() =>
|
|
761
|
-
[
|
|
762
|
-
),
|
|
763
|
-
|
|
764
|
-
if (
|
|
765
|
-
if (
|
|
766
|
-
e.confirmationChannels !== void 0 &&
|
|
759
|
+
), tt = R(
|
|
760
|
+
() => ws(T),
|
|
761
|
+
[T]
|
|
762
|
+
), $e = !o && !k && tt.length >= 2, qe = E(!1);
|
|
763
|
+
q(() => {
|
|
764
|
+
if (o || k) return;
|
|
765
|
+
if (!$e) {
|
|
766
|
+
e.confirmationChannels !== void 0 && L({ confirmationChannels: void 0 });
|
|
767
767
|
return;
|
|
768
768
|
}
|
|
769
769
|
if (e.confirmationChannels !== void 0) {
|
|
770
|
-
|
|
770
|
+
qe.current = !0;
|
|
771
771
|
return;
|
|
772
772
|
}
|
|
773
|
-
const
|
|
774
|
-
|
|
773
|
+
const d = Gn(
|
|
774
|
+
tt,
|
|
775
775
|
e.mobilePhone,
|
|
776
|
-
|
|
776
|
+
h
|
|
777
777
|
);
|
|
778
|
-
|
|
778
|
+
qe.current = !0, L({ confirmationChannels: d });
|
|
779
779
|
}, [
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
780
|
+
$e,
|
|
781
|
+
o,
|
|
782
|
+
k,
|
|
783
|
+
tt,
|
|
784
784
|
e.mobilePhone,
|
|
785
|
-
|
|
785
|
+
h
|
|
786
786
|
]);
|
|
787
|
-
const
|
|
787
|
+
const Oe = R(
|
|
788
788
|
() => e.confirmationChannels ?? [],
|
|
789
789
|
[e.confirmationChannels]
|
|
790
|
-
),
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
}, [w,
|
|
794
|
-
const
|
|
795
|
-
|
|
796
|
-
const
|
|
797
|
-
if (!
|
|
798
|
-
ae(
|
|
790
|
+
), K = $e && Oe.length === 0, j = E(w), lt = E(x);
|
|
791
|
+
q(() => {
|
|
792
|
+
j.current = w, lt.current = x;
|
|
793
|
+
}, [w, x]);
|
|
794
|
+
const st = !!w, ut = !!x;
|
|
795
|
+
q(() => {
|
|
796
|
+
const d = e.codiceFiscale;
|
|
797
|
+
if (!B || !st || !d) {
|
|
798
|
+
ae(Ft);
|
|
799
799
|
return;
|
|
800
800
|
}
|
|
801
|
-
if (!
|
|
801
|
+
if (!si.test(d)) {
|
|
802
802
|
ae({
|
|
803
803
|
state: "invalid",
|
|
804
804
|
hint: b("booking.details.codiceFiscale.invalidFormat")
|
|
@@ -806,74 +806,74 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
|
|
|
806
806
|
return;
|
|
807
807
|
}
|
|
808
808
|
ae({ state: "pending" });
|
|
809
|
-
let
|
|
809
|
+
let O = !0;
|
|
810
810
|
return oe.current && clearTimeout(oe.current), oe.current = setTimeout(async () => {
|
|
811
811
|
try {
|
|
812
|
-
const
|
|
813
|
-
if (!
|
|
814
|
-
const P = await
|
|
815
|
-
|
|
812
|
+
const y = j.current;
|
|
813
|
+
if (!y) return;
|
|
814
|
+
const P = await y(d);
|
|
815
|
+
O && ae({
|
|
816
816
|
state: P.valid ? "valid" : "invalid",
|
|
817
817
|
hint: P.hint,
|
|
818
|
-
value:
|
|
818
|
+
value: d
|
|
819
819
|
});
|
|
820
820
|
} catch {
|
|
821
|
-
|
|
821
|
+
O && ae({
|
|
822
822
|
state: "invalid",
|
|
823
823
|
hint: b("booking.details.codiceFiscale.unavailable"),
|
|
824
|
-
value:
|
|
824
|
+
value: d
|
|
825
825
|
});
|
|
826
826
|
}
|
|
827
|
-
},
|
|
828
|
-
|
|
827
|
+
}, cs), () => {
|
|
828
|
+
O = !1, oe.current && clearTimeout(oe.current);
|
|
829
829
|
};
|
|
830
|
-
}, [
|
|
831
|
-
const
|
|
832
|
-
|
|
833
|
-
const
|
|
834
|
-
if (!
|
|
835
|
-
|
|
830
|
+
}, [B, st, e.codiceFiscale, b]);
|
|
831
|
+
const Ke = a && c === "public";
|
|
832
|
+
q(() => {
|
|
833
|
+
const d = e.insuranceNumber;
|
|
834
|
+
if (!Ke || !ut || !d) {
|
|
835
|
+
Se(Ft);
|
|
836
836
|
return;
|
|
837
837
|
}
|
|
838
|
-
|
|
839
|
-
const
|
|
840
|
-
|
|
841
|
-
(
|
|
842
|
-
|
|
838
|
+
Se({ state: "pending" }), te.current && clearTimeout(te.current), te.current = setTimeout(() => {
|
|
839
|
+
const O = lt.current;
|
|
840
|
+
O && O(d).then(
|
|
841
|
+
(y) => Se(
|
|
842
|
+
y.valid ? { state: "valid" } : { state: "invalid", hint: y.hint }
|
|
843
843
|
)
|
|
844
844
|
).catch(
|
|
845
|
-
() =>
|
|
845
|
+
() => Se({
|
|
846
846
|
state: "invalid",
|
|
847
847
|
hint: b("booking.details.insuranceNumber.unavailable")
|
|
848
848
|
})
|
|
849
849
|
);
|
|
850
|
-
},
|
|
851
|
-
}, [
|
|
852
|
-
const
|
|
853
|
-
() => !!(e.email &&
|
|
850
|
+
}, cs);
|
|
851
|
+
}, [Ke, ut, e.insuranceNumber, b]);
|
|
852
|
+
const nt = R(
|
|
853
|
+
() => !!(e.email && ni.test(e.email)),
|
|
854
854
|
[e.email]
|
|
855
|
-
),
|
|
855
|
+
), it = R(
|
|
856
856
|
() => !!(e.mobilePhone && e.mobilePhone.length >= 6),
|
|
857
857
|
[e.mobilePhone]
|
|
858
|
-
),
|
|
859
|
-
var
|
|
860
|
-
return !(!((
|
|
858
|
+
), It = R(() => {
|
|
859
|
+
var d, O;
|
|
860
|
+
return !(!((d = e.firstName) != null && d.trim()) || !((O = e.lastName) != null && O.trim()) || !nt || !it || B && (J.state !== "valid" || J.value !== e.codiceFiscale) || !Je || i && !e.dateOfBirth || Ke && he.state !== "valid");
|
|
861
861
|
}, [
|
|
862
862
|
e.firstName,
|
|
863
863
|
e.lastName,
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
864
|
+
nt,
|
|
865
|
+
it,
|
|
866
|
+
B,
|
|
867
|
+
Je,
|
|
868
|
+
J.state,
|
|
869
|
+
J.value,
|
|
870
870
|
e.codiceFiscale,
|
|
871
871
|
i,
|
|
872
872
|
e.dateOfBirth,
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
]),
|
|
876
|
-
if (
|
|
873
|
+
Ke,
|
|
874
|
+
he.state
|
|
875
|
+
]), Me = M != null && M.trim() ? M : void 0, pt = Me !== void 0, Ye = !pt || !!e.criticalInformationAccepted, Nt = !Re || !(l != null && l.required) || se, jt = !!(e.privacyConsent && e.termsConsent && Ye && Nt), be = !$e || Oe.length > 0, wt = It && jt && be && (!o || Qe) && !k && !ge, mt = async (d) => {
|
|
876
|
+
if (d.preventDefault(), Ae({
|
|
877
877
|
firstName: !0,
|
|
878
878
|
lastName: !0,
|
|
879
879
|
email: !0,
|
|
@@ -882,14 +882,14 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
|
|
|
882
882
|
dateOfBirth: !0,
|
|
883
883
|
insuranceNumber: !0,
|
|
884
884
|
...Object.fromEntries(
|
|
885
|
-
Object.values(
|
|
885
|
+
Object.values(vt).map((y) => [y, !0])
|
|
886
886
|
)
|
|
887
|
-
}),
|
|
888
|
-
if (!
|
|
889
|
-
dt((
|
|
887
|
+
}), ge || fe.current) return;
|
|
888
|
+
if (!wt) {
|
|
889
|
+
dt((y) => y + 1);
|
|
890
890
|
return;
|
|
891
891
|
}
|
|
892
|
-
const
|
|
892
|
+
const O = {
|
|
893
893
|
firstName: e.firstName.trim(),
|
|
894
894
|
lastName: e.lastName.trim(),
|
|
895
895
|
email: e.email.trim(),
|
|
@@ -898,11 +898,11 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
|
|
|
898
898
|
termsConsent: !0,
|
|
899
899
|
// Only present when the service carried text to accept — a
|
|
900
900
|
// reason without it leaves the key out of the payload entirely.
|
|
901
|
-
...
|
|
901
|
+
...pt ? { criticalInformationAccepted: !0 } : {},
|
|
902
902
|
// Sent whenever the practice's box is shown, ticked or not, so the
|
|
903
903
|
// server can record the answer; left out when there is no box.
|
|
904
|
-
...
|
|
905
|
-
...
|
|
904
|
+
...Re ? { practiceConsentAccepted: se } : {},
|
|
905
|
+
...o ? { paymentAccepted: !0 } : {},
|
|
906
906
|
codiceFiscale: e.codiceFiscale,
|
|
907
907
|
dateOfBirth: e.dateOfBirth,
|
|
908
908
|
insuranceNumber: e.insuranceNumber,
|
|
@@ -911,48 +911,48 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
|
|
|
911
911
|
// Only include when the picker was visible; otherwise the single
|
|
912
912
|
// implicit channel is inferred backend-side from the practice
|
|
913
913
|
// config.
|
|
914
|
-
confirmationChannels:
|
|
915
|
-
...
|
|
916
|
-
billing:
|
|
914
|
+
confirmationChannels: $e ? Oe : void 0,
|
|
915
|
+
...ve && e.billing ? {
|
|
916
|
+
billing: di(
|
|
917
917
|
e.billing,
|
|
918
918
|
`${e.firstName.trim()} ${e.lastName.trim()}`
|
|
919
919
|
)
|
|
920
920
|
} : {}
|
|
921
921
|
};
|
|
922
|
-
|
|
922
|
+
fe.current = !0, Le(!0), Be(!1);
|
|
923
923
|
try {
|
|
924
|
-
await n(
|
|
924
|
+
await n(O);
|
|
925
925
|
} catch {
|
|
926
|
-
|
|
926
|
+
Be(!0);
|
|
927
927
|
} finally {
|
|
928
|
-
|
|
928
|
+
fe.current = !1, Le(!1);
|
|
929
929
|
}
|
|
930
|
-
},
|
|
931
|
-
|
|
930
|
+
}, ze = /* @__PURE__ */ s(
|
|
931
|
+
Ue,
|
|
932
932
|
{
|
|
933
933
|
label: b("booking.details.codiceFiscale.label"),
|
|
934
934
|
required: !0,
|
|
935
|
-
description:
|
|
936
|
-
error: W.codiceFiscale &&
|
|
935
|
+
description: J.state === "pending" ? b("booking.details.codiceFiscale.checking") : b("booking.details.codiceFiscale.helper"),
|
|
936
|
+
error: W.codiceFiscale && J.state === "invalid" ? J.hint ?? b("booking.details.codiceFiscale.invalid") : W.codiceFiscale && !e.codiceFiscale ? b("booking.details.fieldRequired") : void 0,
|
|
937
937
|
children: /* @__PURE__ */ s(
|
|
938
|
-
|
|
938
|
+
Dt,
|
|
939
939
|
{
|
|
940
940
|
value: e.codiceFiscale ?? "",
|
|
941
941
|
maxLength: 16,
|
|
942
|
-
onChange: (
|
|
943
|
-
codiceFiscale:
|
|
942
|
+
onChange: (d) => L({
|
|
943
|
+
codiceFiscale: d.target.value.slice(0, 16).toUpperCase()
|
|
944
944
|
}),
|
|
945
|
-
onBlur: () =>
|
|
945
|
+
onBlur: () => ie("codiceFiscale")
|
|
946
946
|
}
|
|
947
947
|
)
|
|
948
948
|
}
|
|
949
|
-
),
|
|
950
|
-
const
|
|
951
|
-
return
|
|
952
|
-
|
|
949
|
+
), re = (d, O) => {
|
|
950
|
+
const y = Mt(O);
|
|
951
|
+
return y ? /* @__PURE__ */ s(
|
|
952
|
+
$s,
|
|
953
953
|
{
|
|
954
954
|
ns: "ui",
|
|
955
|
-
i18nKey:
|
|
955
|
+
i18nKey: d,
|
|
956
956
|
components: {
|
|
957
957
|
// The `<Trans>` runtime injects link text from the i18n
|
|
958
958
|
// string. The anchor renders empty at static-analysis time,
|
|
@@ -964,63 +964,63 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
|
|
|
964
964
|
/* @__PURE__ */ s(
|
|
965
965
|
"a",
|
|
966
966
|
{
|
|
967
|
-
href:
|
|
967
|
+
href: y,
|
|
968
968
|
target: "_blank",
|
|
969
969
|
rel: "noopener noreferrer",
|
|
970
|
-
className:
|
|
970
|
+
className: Gt
|
|
971
971
|
}
|
|
972
972
|
)
|
|
973
973
|
)
|
|
974
974
|
}
|
|
975
975
|
}
|
|
976
|
-
) : b(
|
|
976
|
+
) : b(d);
|
|
977
977
|
};
|
|
978
978
|
return /* @__PURE__ */ v(
|
|
979
979
|
"form",
|
|
980
980
|
{
|
|
981
|
-
ref:
|
|
982
|
-
id:
|
|
981
|
+
ref: _,
|
|
982
|
+
id: F,
|
|
983
983
|
noValidate: !0,
|
|
984
|
-
onSubmit:
|
|
985
|
-
onFocus: (
|
|
986
|
-
const
|
|
987
|
-
!
|
|
984
|
+
onSubmit: mt,
|
|
985
|
+
onFocus: (d) => {
|
|
986
|
+
const O = we.current;
|
|
987
|
+
!O || !d.currentTarget.contains(d.target) || !O.contains(d.target) && O.compareDocumentPosition(d.target) & Node.DOCUMENT_POSITION_FOLLOWING && xt();
|
|
988
988
|
},
|
|
989
|
-
"aria-busy":
|
|
989
|
+
"aria-busy": ge || void 0,
|
|
990
990
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
991
991
|
children: [
|
|
992
|
-
|
|
992
|
+
A,
|
|
993
993
|
/* @__PURE__ */ v("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
|
|
994
994
|
/* @__PURE__ */ s(
|
|
995
|
-
|
|
995
|
+
Ue,
|
|
996
996
|
{
|
|
997
997
|
label: b("booking.details.firstName.label"),
|
|
998
998
|
required: !0,
|
|
999
|
-
error: W.firstName && !((
|
|
999
|
+
error: W.firstName && !((At = e.firstName) != null && At.trim()) ? b("booking.details.firstName.required") : void 0,
|
|
1000
1000
|
children: /* @__PURE__ */ s(
|
|
1001
|
-
|
|
1001
|
+
Dt,
|
|
1002
1002
|
{
|
|
1003
1003
|
autoComplete: "given-name",
|
|
1004
1004
|
value: e.firstName ?? "",
|
|
1005
|
-
onChange: (
|
|
1006
|
-
onBlur: () =>
|
|
1005
|
+
onChange: (d) => L({ firstName: d.target.value }),
|
|
1006
|
+
onBlur: () => ie("firstName")
|
|
1007
1007
|
}
|
|
1008
1008
|
)
|
|
1009
1009
|
}
|
|
1010
1010
|
),
|
|
1011
1011
|
/* @__PURE__ */ s(
|
|
1012
|
-
|
|
1012
|
+
Ue,
|
|
1013
1013
|
{
|
|
1014
1014
|
label: b("booking.details.lastName.label"),
|
|
1015
1015
|
required: !0,
|
|
1016
|
-
error: W.lastName && !((
|
|
1016
|
+
error: W.lastName && !((gt = e.lastName) != null && gt.trim()) ? b("booking.details.lastName.required") : void 0,
|
|
1017
1017
|
children: /* @__PURE__ */ s(
|
|
1018
|
-
|
|
1018
|
+
Dt,
|
|
1019
1019
|
{
|
|
1020
1020
|
autoComplete: "family-name",
|
|
1021
1021
|
value: e.lastName ?? "",
|
|
1022
|
-
onChange: (
|
|
1023
|
-
onBlur: () =>
|
|
1022
|
+
onChange: (d) => L({ lastName: d.target.value }),
|
|
1023
|
+
onBlur: () => ie("lastName")
|
|
1024
1024
|
}
|
|
1025
1025
|
)
|
|
1026
1026
|
}
|
|
@@ -1028,99 +1028,99 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
|
|
|
1028
1028
|
] }),
|
|
1029
1029
|
/* @__PURE__ */ v("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
|
|
1030
1030
|
/* @__PURE__ */ s(
|
|
1031
|
-
|
|
1031
|
+
Ue,
|
|
1032
1032
|
{
|
|
1033
1033
|
label: b("booking.details.email.label"),
|
|
1034
1034
|
required: !0,
|
|
1035
|
-
error: W.email && !
|
|
1035
|
+
error: W.email && !nt ? b("booking.details.email.invalid") : void 0,
|
|
1036
1036
|
children: /* @__PURE__ */ s(
|
|
1037
|
-
|
|
1037
|
+
js,
|
|
1038
1038
|
{
|
|
1039
1039
|
value: e.email ?? "",
|
|
1040
|
-
onChange: (
|
|
1041
|
-
onBlur: () =>
|
|
1040
|
+
onChange: (d) => L({ email: d.target.value }),
|
|
1041
|
+
onBlur: () => ie("email")
|
|
1042
1042
|
}
|
|
1043
1043
|
)
|
|
1044
1044
|
}
|
|
1045
1045
|
),
|
|
1046
1046
|
/* @__PURE__ */ s(
|
|
1047
|
-
|
|
1047
|
+
Ue,
|
|
1048
1048
|
{
|
|
1049
1049
|
label: b("booking.details.mobilePhone.label"),
|
|
1050
1050
|
required: !0,
|
|
1051
|
-
error: W.mobilePhone && !
|
|
1051
|
+
error: W.mobilePhone && !it ? b("booking.details.mobilePhone.invalid") : void 0,
|
|
1052
1052
|
children: /* @__PURE__ */ s(
|
|
1053
|
-
|
|
1053
|
+
Us,
|
|
1054
1054
|
{
|
|
1055
1055
|
value: e.mobilePhone ?? "",
|
|
1056
1056
|
defaultCountry: D == null ? void 0 : D.toUpperCase(),
|
|
1057
|
-
onChange: (
|
|
1058
|
-
|
|
1057
|
+
onChange: (d) => {
|
|
1058
|
+
L({ mobilePhone: d }), ie("mobilePhone");
|
|
1059
1059
|
}
|
|
1060
1060
|
}
|
|
1061
1061
|
)
|
|
1062
1062
|
}
|
|
1063
1063
|
)
|
|
1064
1064
|
] }),
|
|
1065
|
-
|
|
1066
|
-
|
|
1065
|
+
B && !ve || i ? /* @__PURE__ */ v("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
|
|
1066
|
+
B && !ve ? ze : null,
|
|
1067
1067
|
i ? /* @__PURE__ */ s(
|
|
1068
|
-
|
|
1068
|
+
Ue,
|
|
1069
1069
|
{
|
|
1070
1070
|
label: b("booking.details.dateOfBirth.label"),
|
|
1071
1071
|
required: !0,
|
|
1072
1072
|
error: W.dateOfBirth && !e.dateOfBirth ? b("booking.details.dateOfBirth.required") : void 0,
|
|
1073
1073
|
children: /* @__PURE__ */ s(
|
|
1074
|
-
|
|
1074
|
+
zs,
|
|
1075
1075
|
{
|
|
1076
1076
|
value: e.dateOfBirth ? new Date(e.dateOfBirth) : void 0,
|
|
1077
|
-
onChange: (
|
|
1078
|
-
|
|
1079
|
-
dateOfBirth:
|
|
1080
|
-
}),
|
|
1077
|
+
onChange: (d) => {
|
|
1078
|
+
L({
|
|
1079
|
+
dateOfBirth: d ? d.toISOString().slice(0, 10) : void 0
|
|
1080
|
+
}), ie("dateOfBirth");
|
|
1081
1081
|
}
|
|
1082
1082
|
}
|
|
1083
1083
|
)
|
|
1084
1084
|
}
|
|
1085
1085
|
) : null
|
|
1086
1086
|
] }) : null,
|
|
1087
|
-
|
|
1088
|
-
|
|
1087
|
+
Ke ? /* @__PURE__ */ s(
|
|
1088
|
+
Ue,
|
|
1089
1089
|
{
|
|
1090
1090
|
label: b("booking.details.insuranceNumber.label"),
|
|
1091
1091
|
required: !0,
|
|
1092
|
-
description:
|
|
1093
|
-
error: W.insuranceNumber &&
|
|
1092
|
+
description: he.state === "pending" ? b("booking.details.insuranceNumber.checking") : void 0,
|
|
1093
|
+
error: W.insuranceNumber && he.state === "invalid" ? he.hint ?? b("booking.details.insuranceNumber.invalid") : void 0,
|
|
1094
1094
|
children: /* @__PURE__ */ s(
|
|
1095
|
-
|
|
1095
|
+
Dt,
|
|
1096
1096
|
{
|
|
1097
1097
|
value: e.insuranceNumber ?? "",
|
|
1098
|
-
onChange: (
|
|
1099
|
-
onBlur: () =>
|
|
1098
|
+
onChange: (d) => L({ insuranceNumber: d.target.value }),
|
|
1099
|
+
onBlur: () => ie("insuranceNumber")
|
|
1100
1100
|
}
|
|
1101
1101
|
)
|
|
1102
1102
|
}
|
|
1103
1103
|
) : null,
|
|
1104
|
-
|
|
1104
|
+
ve ? /* @__PURE__ */ v(
|
|
1105
1105
|
"div",
|
|
1106
1106
|
{
|
|
1107
|
-
ref:
|
|
1107
|
+
ref: we,
|
|
1108
1108
|
"data-component": "booking-billing",
|
|
1109
1109
|
role: "group",
|
|
1110
|
-
"aria-labelledby": `${
|
|
1111
|
-
"aria-describedby": `${
|
|
1110
|
+
"aria-labelledby": `${F}-billing-heading`,
|
|
1111
|
+
"aria-describedby": `${F}-billing-intro`,
|
|
1112
1112
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:rounded-[var(--radius-md)] ds:border ds:border-[var(--border)] ds:p-[var(--spacing-sm)]",
|
|
1113
|
-
onBlur: (
|
|
1114
|
-
var
|
|
1115
|
-
const
|
|
1116
|
-
(
|
|
1113
|
+
onBlur: (d) => {
|
|
1114
|
+
var y;
|
|
1115
|
+
const O = (y = d.target.closest("[data-address-field]")) == null ? void 0 : y.getAttribute("data-address-field");
|
|
1116
|
+
(O === "street" || O === "city" || O === "postcode") && ie(vt[O]);
|
|
1117
1117
|
},
|
|
1118
1118
|
children: [
|
|
1119
1119
|
/* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
1120
1120
|
/* @__PURE__ */ s(
|
|
1121
1121
|
"h3",
|
|
1122
1122
|
{
|
|
1123
|
-
id: `${
|
|
1123
|
+
id: `${F}-billing-heading`,
|
|
1124
1124
|
className: "type-label ds:m-0 ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]",
|
|
1125
1125
|
children: b("booking.details.billing.heading")
|
|
1126
1126
|
}
|
|
@@ -1128,110 +1128,110 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
|
|
|
1128
1128
|
/* @__PURE__ */ s(
|
|
1129
1129
|
"p",
|
|
1130
1130
|
{
|
|
1131
|
-
id: `${
|
|
1131
|
+
id: `${F}-billing-intro`,
|
|
1132
1132
|
className: "type-body-sm ds:m-0 ds:text-[color:var(--muted-foreground)]",
|
|
1133
1133
|
children: b("booking.details.billing.intro")
|
|
1134
1134
|
}
|
|
1135
1135
|
)
|
|
1136
1136
|
] }),
|
|
1137
|
-
|
|
1137
|
+
B ? ze : null,
|
|
1138
1138
|
/* @__PURE__ */ s(
|
|
1139
|
-
|
|
1139
|
+
Hs,
|
|
1140
1140
|
{
|
|
1141
|
-
value:
|
|
1142
|
-
onChange: (
|
|
1143
|
-
var
|
|
1141
|
+
value: We,
|
|
1142
|
+
onChange: (d) => {
|
|
1143
|
+
var O;
|
|
1144
1144
|
return (
|
|
1145
1145
|
// The name is set from the patient's own on submit.
|
|
1146
|
-
|
|
1147
|
-
billing:
|
|
1148
|
-
|
|
1146
|
+
L({
|
|
1147
|
+
billing: ri(
|
|
1148
|
+
d,
|
|
1149
1149
|
"",
|
|
1150
1150
|
// A second line belongs to its street: it goes when the
|
|
1151
1151
|
// patient writes another, and returns with the first.
|
|
1152
|
-
|
|
1152
|
+
d.street.trim() === ((O = Pe.current) == null ? void 0 : O.street) ? Pe.current.line2 : null
|
|
1153
1153
|
)
|
|
1154
1154
|
})
|
|
1155
1155
|
);
|
|
1156
1156
|
},
|
|
1157
|
-
popularCountries:
|
|
1157
|
+
popularCountries: oi,
|
|
1158
1158
|
layout: "grid",
|
|
1159
|
-
fields:
|
|
1160
|
-
required:
|
|
1159
|
+
fields: X ? void 0 : ["street", "city", "postcode"],
|
|
1160
|
+
required: X ? ["country", "street", "city", "postcode", "province"] : ["country", "street", "city", "postcode"],
|
|
1161
1161
|
errors: {
|
|
1162
|
-
country:
|
|
1163
|
-
street:
|
|
1164
|
-
city:
|
|
1165
|
-
postcode:
|
|
1166
|
-
province:
|
|
1162
|
+
country: De("country"),
|
|
1163
|
+
street: De("street"),
|
|
1164
|
+
city: De("city"),
|
|
1165
|
+
postcode: De("postcode"),
|
|
1166
|
+
province: X ? De("province") : void 0
|
|
1167
1167
|
}
|
|
1168
1168
|
}
|
|
1169
1169
|
)
|
|
1170
1170
|
]
|
|
1171
1171
|
}
|
|
1172
1172
|
) : null,
|
|
1173
|
-
|
|
1174
|
-
|
|
1173
|
+
f ? /* @__PURE__ */ s(
|
|
1174
|
+
Ue,
|
|
1175
1175
|
{
|
|
1176
1176
|
label: b("booking.details.note.label"),
|
|
1177
1177
|
description: b("booking.details.note.helper", {
|
|
1178
|
-
max:
|
|
1178
|
+
max: os
|
|
1179
1179
|
}),
|
|
1180
1180
|
children: /* @__PURE__ */ s(
|
|
1181
|
-
|
|
1181
|
+
Gs,
|
|
1182
1182
|
{
|
|
1183
1183
|
value: e.note ?? "",
|
|
1184
|
-
maxLength:
|
|
1184
|
+
maxLength: os,
|
|
1185
1185
|
rows: 3,
|
|
1186
|
-
onChange: (
|
|
1186
|
+
onChange: (d) => L({ note: d.target.value })
|
|
1187
1187
|
}
|
|
1188
1188
|
)
|
|
1189
1189
|
}
|
|
1190
1190
|
) : null,
|
|
1191
|
-
|
|
1191
|
+
p ? /* @__PURE__ */ s(
|
|
1192
1192
|
rt,
|
|
1193
1193
|
{
|
|
1194
1194
|
checked: !!e.returningPatient,
|
|
1195
|
-
onCheckedChange: (
|
|
1195
|
+
onCheckedChange: (d) => L({ returningPatient: d === !0 }),
|
|
1196
1196
|
label: b("booking.details.returningPatient.label")
|
|
1197
1197
|
}
|
|
1198
1198
|
) : null,
|
|
1199
|
-
|
|
1199
|
+
Me !== void 0 ? /* @__PURE__ */ v(
|
|
1200
1200
|
"div",
|
|
1201
1201
|
{
|
|
1202
1202
|
"data-component": "booking-critical-information",
|
|
1203
1203
|
role: "group",
|
|
1204
|
-
"aria-labelledby": `${
|
|
1204
|
+
"aria-labelledby": `${F}-critical-information-heading`,
|
|
1205
1205
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:rounded-[var(--radius-md)] ds:border ds:border-[var(--border)] ds:bg-[var(--muted)] ds:p-[var(--spacing-sm)]",
|
|
1206
1206
|
children: [
|
|
1207
1207
|
/* @__PURE__ */ s(
|
|
1208
1208
|
"h3",
|
|
1209
1209
|
{
|
|
1210
|
-
id: `${
|
|
1210
|
+
id: `${F}-critical-information-heading`,
|
|
1211
1211
|
className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0",
|
|
1212
1212
|
children: b("booking.details.criticalInformation.heading")
|
|
1213
1213
|
}
|
|
1214
1214
|
),
|
|
1215
|
-
/* @__PURE__ */ s("p", { className: "type-body-sm ds:m-0 ds:whitespace-pre-wrap ds:break-words ds:text-[var(--foreground)]", children:
|
|
1216
|
-
(
|
|
1215
|
+
/* @__PURE__ */ s("p", { className: "type-body-sm ds:m-0 ds:whitespace-pre-wrap ds:break-words ds:text-[var(--foreground)]", children: ti(Me).map(
|
|
1216
|
+
(d, O) => d.kind === "link" ? /* @__PURE__ */ s(
|
|
1217
1217
|
"a",
|
|
1218
1218
|
{
|
|
1219
|
-
href:
|
|
1219
|
+
href: d.href,
|
|
1220
1220
|
target: "_blank",
|
|
1221
1221
|
rel: "noopener noreferrer",
|
|
1222
|
-
className:
|
|
1223
|
-
children:
|
|
1222
|
+
className: Gt,
|
|
1223
|
+
children: d.text
|
|
1224
1224
|
},
|
|
1225
|
-
|
|
1226
|
-
) : /* @__PURE__ */ s(
|
|
1225
|
+
O
|
|
1226
|
+
) : /* @__PURE__ */ s(Ps, { children: d.text }, O)
|
|
1227
1227
|
) }),
|
|
1228
1228
|
/* @__PURE__ */ s(
|
|
1229
1229
|
rt,
|
|
1230
1230
|
{
|
|
1231
1231
|
checked: !!e.criticalInformationAccepted,
|
|
1232
|
-
onCheckedChange: (
|
|
1232
|
+
onCheckedChange: (d) => L({ criticalInformationAccepted: d === !0 }),
|
|
1233
1233
|
"aria-required": !0,
|
|
1234
|
-
label: /* @__PURE__ */ v(
|
|
1234
|
+
label: /* @__PURE__ */ v(ne, { children: [
|
|
1235
1235
|
b("booking.details.criticalInformation.accept"),
|
|
1236
1236
|
/* @__PURE__ */ s(
|
|
1237
1237
|
"span",
|
|
@@ -1247,23 +1247,23 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
|
|
|
1247
1247
|
]
|
|
1248
1248
|
}
|
|
1249
1249
|
) : null,
|
|
1250
|
-
|
|
1250
|
+
o ? /* @__PURE__ */ v(
|
|
1251
1251
|
"div",
|
|
1252
1252
|
{
|
|
1253
1253
|
"data-component": "booking-payment-notice",
|
|
1254
1254
|
role: "group",
|
|
1255
|
-
"aria-labelledby": `${
|
|
1256
|
-
"data-notice-style":
|
|
1257
|
-
className:
|
|
1258
|
-
noticeStyle:
|
|
1255
|
+
"aria-labelledby": `${F}-payment-heading`,
|
|
1256
|
+
"data-notice-style": N,
|
|
1257
|
+
className: ai({
|
|
1258
|
+
noticeStyle: N
|
|
1259
1259
|
}),
|
|
1260
1260
|
children: [
|
|
1261
|
-
|
|
1262
|
-
/* @__PURE__ */ s("span", { className: "ds:flex ds:size-9 ds:shrink-0 ds:items-center ds:justify-center ds:rounded-full ds:bg-[var(--primary)] ds:text-[var(--primary-foreground)]", children: /* @__PURE__ */ s(
|
|
1261
|
+
N === "highlighted" ? /* @__PURE__ */ v("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
1262
|
+
/* @__PURE__ */ s("span", { className: "ds:flex ds:size-9 ds:shrink-0 ds:items-center ds:justify-center ds:rounded-full ds:bg-[var(--primary)] ds:text-[var(--primary-foreground)]", children: /* @__PURE__ */ s(Js, { "aria-hidden": "true", className: "ds:size-5" }) }),
|
|
1263
1263
|
/* @__PURE__ */ s(
|
|
1264
1264
|
"h3",
|
|
1265
1265
|
{
|
|
1266
|
-
id: `${
|
|
1266
|
+
id: `${F}-payment-heading`,
|
|
1267
1267
|
className: "type-title-item ds:m-0 ds:flex-1",
|
|
1268
1268
|
children: b("booking.payment.noticeTitle")
|
|
1269
1269
|
}
|
|
@@ -1273,22 +1273,22 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
|
|
|
1273
1273
|
{
|
|
1274
1274
|
"aria-hidden": "true",
|
|
1275
1275
|
className: "type-title-card ds:shrink-0 ds:text-[var(--foreground)]",
|
|
1276
|
-
children:
|
|
1276
|
+
children: Te
|
|
1277
1277
|
}
|
|
1278
1278
|
)
|
|
1279
1279
|
] }) : /* @__PURE__ */ s(
|
|
1280
1280
|
"h3",
|
|
1281
1281
|
{
|
|
1282
|
-
id: `${
|
|
1282
|
+
id: `${F}-payment-heading`,
|
|
1283
1283
|
className: "type-label ds:m-0",
|
|
1284
1284
|
children: b("booking.payment.noticeTitle")
|
|
1285
1285
|
}
|
|
1286
1286
|
),
|
|
1287
|
-
/* @__PURE__ */ s("p", { className: "type-body-sm ds:m-0", children: b("booking.payment.noticeBody", { amount:
|
|
1288
|
-
|
|
1287
|
+
/* @__PURE__ */ s("p", { className: "type-body-sm ds:m-0", children: b("booking.payment.noticeBody", { amount: Te }) }),
|
|
1288
|
+
Ne ? /* @__PURE__ */ s(
|
|
1289
1289
|
"a",
|
|
1290
1290
|
{
|
|
1291
|
-
href:
|
|
1291
|
+
href: Ne,
|
|
1292
1292
|
target: "_blank",
|
|
1293
1293
|
rel: "noopener noreferrer",
|
|
1294
1294
|
className: "type-body-sm ds:inline-flex ds:items-center ds:self-start ds:min-h-[var(--min-target-size)] 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)]",
|
|
@@ -1298,15 +1298,15 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
|
|
|
1298
1298
|
/* @__PURE__ */ s(
|
|
1299
1299
|
rt,
|
|
1300
1300
|
{
|
|
1301
|
-
checked:
|
|
1302
|
-
onCheckedChange: (
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
),
|
|
1301
|
+
checked: Qe,
|
|
1302
|
+
onCheckedChange: (d) => {
|
|
1303
|
+
Ee(
|
|
1304
|
+
d === !0 ? xe : void 0
|
|
1305
|
+
), L({ paymentAccepted: d === !0 });
|
|
1306
1306
|
},
|
|
1307
1307
|
"aria-required": !0,
|
|
1308
|
-
label: /* @__PURE__ */ v(
|
|
1309
|
-
b("booking.payment.accept", { amount:
|
|
1308
|
+
label: /* @__PURE__ */ v(ne, { children: [
|
|
1309
|
+
b("booking.payment.accept", { amount: Te }),
|
|
1310
1310
|
/* @__PURE__ */ s(
|
|
1311
1311
|
"span",
|
|
1312
1312
|
{
|
|
@@ -1326,12 +1326,12 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
|
|
|
1326
1326
|
rt,
|
|
1327
1327
|
{
|
|
1328
1328
|
checked: !!e.privacyConsent,
|
|
1329
|
-
onCheckedChange: (
|
|
1329
|
+
onCheckedChange: (d) => L({ privacyConsent: d === !0 }),
|
|
1330
1330
|
"aria-required": !0,
|
|
1331
|
-
label: /* @__PURE__ */ v(
|
|
1332
|
-
|
|
1331
|
+
label: /* @__PURE__ */ v(ne, { children: [
|
|
1332
|
+
re(
|
|
1333
1333
|
"booking.details.consent.privacy.label",
|
|
1334
|
-
|
|
1334
|
+
m
|
|
1335
1335
|
),
|
|
1336
1336
|
/* @__PURE__ */ s(
|
|
1337
1337
|
"span",
|
|
@@ -1348,12 +1348,12 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
|
|
|
1348
1348
|
rt,
|
|
1349
1349
|
{
|
|
1350
1350
|
checked: !!e.termsConsent,
|
|
1351
|
-
onCheckedChange: (
|
|
1351
|
+
onCheckedChange: (d) => L({ termsConsent: d === !0 }),
|
|
1352
1352
|
"aria-required": !0,
|
|
1353
|
-
label: /* @__PURE__ */ v(
|
|
1354
|
-
|
|
1353
|
+
label: /* @__PURE__ */ v(ne, { children: [
|
|
1354
|
+
re(
|
|
1355
1355
|
"booking.details.consent.terms.label",
|
|
1356
|
-
|
|
1356
|
+
g
|
|
1357
1357
|
),
|
|
1358
1358
|
/* @__PURE__ */ s(
|
|
1359
1359
|
"span",
|
|
@@ -1366,28 +1366,28 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
|
|
|
1366
1366
|
] })
|
|
1367
1367
|
}
|
|
1368
1368
|
),
|
|
1369
|
-
|
|
1369
|
+
l && Re ? /* @__PURE__ */ s(
|
|
1370
1370
|
rt,
|
|
1371
1371
|
{
|
|
1372
|
-
checked:
|
|
1373
|
-
onCheckedChange: (
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
),
|
|
1372
|
+
checked: se,
|
|
1373
|
+
onCheckedChange: (d) => {
|
|
1374
|
+
Z(
|
|
1375
|
+
d === !0 ? Ie : void 0
|
|
1376
|
+
), L({ practiceConsentAccepted: d === !0 });
|
|
1377
1377
|
},
|
|
1378
|
-
"aria-required":
|
|
1379
|
-
label: /* @__PURE__ */ v(
|
|
1380
|
-
|
|
1378
|
+
"aria-required": l.required || void 0,
|
|
1379
|
+
label: /* @__PURE__ */ v(ne, { children: [
|
|
1380
|
+
Mt(l.url) ? /* @__PURE__ */ s(
|
|
1381
1381
|
"a",
|
|
1382
1382
|
{
|
|
1383
|
-
href:
|
|
1383
|
+
href: Mt(l.url),
|
|
1384
1384
|
target: "_blank",
|
|
1385
1385
|
rel: "noopener noreferrer",
|
|
1386
|
-
className:
|
|
1387
|
-
children:
|
|
1386
|
+
className: Gt,
|
|
1387
|
+
children: l.label
|
|
1388
1388
|
}
|
|
1389
|
-
) :
|
|
1390
|
-
|
|
1389
|
+
) : l.label,
|
|
1390
|
+
l.required ? /* @__PURE__ */ s(
|
|
1391
1391
|
"span",
|
|
1392
1392
|
{
|
|
1393
1393
|
"aria-hidden": "true",
|
|
@@ -1399,44 +1399,44 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
|
|
|
1399
1399
|
}
|
|
1400
1400
|
) : null
|
|
1401
1401
|
] }),
|
|
1402
|
-
|
|
1402
|
+
$e ? /* @__PURE__ */ s(
|
|
1403
1403
|
"div",
|
|
1404
1404
|
{
|
|
1405
1405
|
"data-component": "booking-confirmation-channels",
|
|
1406
|
-
"data-unanswered":
|
|
1406
|
+
"data-unanswered": K || void 0,
|
|
1407
1407
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
1408
1408
|
children: /* @__PURE__ */ s(
|
|
1409
|
-
|
|
1409
|
+
Ks,
|
|
1410
1410
|
{
|
|
1411
1411
|
label: b("booking.confirmation.heading"),
|
|
1412
1412
|
helperText: b("booking.confirmation.helper"),
|
|
1413
|
-
value:
|
|
1414
|
-
onChange: (
|
|
1415
|
-
confirmationChannels:
|
|
1413
|
+
value: Oe,
|
|
1414
|
+
onChange: (d) => L({
|
|
1415
|
+
confirmationChannels: d
|
|
1416
1416
|
}),
|
|
1417
1417
|
orientation: "vertical",
|
|
1418
|
-
options:
|
|
1419
|
-
value:
|
|
1420
|
-
label: b(`booking.confirmation.channel.${
|
|
1418
|
+
options: tt.map((d) => ({
|
|
1419
|
+
value: d,
|
|
1420
|
+
label: b(`booking.confirmation.channel.${d}`)
|
|
1421
1421
|
})),
|
|
1422
|
-
error:
|
|
1422
|
+
error: K ? b("booking.confirmation.atLeastOne") : void 0
|
|
1423
1423
|
}
|
|
1424
1424
|
)
|
|
1425
1425
|
}
|
|
1426
1426
|
) : null,
|
|
1427
|
-
|
|
1428
|
-
|
|
1427
|
+
C || H || k ? /* @__PURE__ */ s(ee, { variant: "error", children: /* @__PURE__ */ s(ee.Description, { children: C ?? b(
|
|
1428
|
+
k ? "booking.payment.unavailable" : "booking.payment.submitFailed"
|
|
1429
1429
|
) }) }) : null,
|
|
1430
1430
|
/* @__PURE__ */ s(
|
|
1431
|
-
|
|
1431
|
+
Xe,
|
|
1432
1432
|
{
|
|
1433
1433
|
intent: "primary",
|
|
1434
1434
|
size: "md",
|
|
1435
1435
|
type: "submit",
|
|
1436
|
-
disabled:
|
|
1437
|
-
"aria-disabled": !
|
|
1438
|
-
startIcon:
|
|
1439
|
-
children:
|
|
1436
|
+
disabled: ge || k,
|
|
1437
|
+
"aria-disabled": !wt || void 0,
|
|
1438
|
+
startIcon: ge ? /* @__PURE__ */ s(ps, { variant: "pulse", size: "sm" }) : void 0,
|
|
1439
|
+
children: o ? b("booking.payment.submit", { amount: Te }) : b("booking.details.submit")
|
|
1440
1440
|
}
|
|
1441
1441
|
)
|
|
1442
1442
|
]
|
|
@@ -1444,8 +1444,8 @@ const as = 500, ti = /^[A-Z0-9]{16}$/, si = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, os = 3
|
|
|
1444
1444
|
);
|
|
1445
1445
|
}
|
|
1446
1446
|
);
|
|
1447
|
-
|
|
1448
|
-
function
|
|
1447
|
+
Xt.displayName = "BookingDetailsForm";
|
|
1448
|
+
function Qt(e) {
|
|
1449
1449
|
const t = e.payment;
|
|
1450
1450
|
if (!t) return;
|
|
1451
1451
|
const n = (t.currencyCode ?? "EUR").toUpperCase();
|
|
@@ -1457,19 +1457,19 @@ function Xt(e) {
|
|
|
1457
1457
|
currencyCode: n
|
|
1458
1458
|
};
|
|
1459
1459
|
}
|
|
1460
|
-
function
|
|
1460
|
+
function li(e, t, n) {
|
|
1461
1461
|
const r = e.filter(
|
|
1462
1462
|
(a) => t.includes(a.id)
|
|
1463
1463
|
), i = (n == null ? void 0 : n.serviceId) ?? (t.length === 1 ? t[0] : void 0);
|
|
1464
1464
|
if (i) {
|
|
1465
|
-
const a = r.find((
|
|
1465
|
+
const a = r.find((f) => f.id === i);
|
|
1466
1466
|
if (!a) return { blocked: !0 };
|
|
1467
|
-
const
|
|
1468
|
-
return { payment:
|
|
1467
|
+
const c = Qt(a);
|
|
1468
|
+
return { payment: c, blocked: !!(a.payment && !c) };
|
|
1469
1469
|
}
|
|
1470
1470
|
return { blocked: r.some((a) => !!a.payment) };
|
|
1471
1471
|
}
|
|
1472
|
-
function
|
|
1472
|
+
function _t(e) {
|
|
1473
1473
|
return e ? JSON.stringify([
|
|
1474
1474
|
e.serviceId,
|
|
1475
1475
|
e.kind,
|
|
@@ -1477,135 +1477,135 @@ function Ft(e) {
|
|
|
1477
1477
|
e.currencyCode
|
|
1478
1478
|
]) : "";
|
|
1479
1479
|
}
|
|
1480
|
-
function
|
|
1480
|
+
function ui({
|
|
1481
1481
|
services: e,
|
|
1482
1482
|
value: t,
|
|
1483
1483
|
availableSlots: n,
|
|
1484
1484
|
onSubmit: r,
|
|
1485
1485
|
onChange: i,
|
|
1486
1486
|
paymentState: a,
|
|
1487
|
-
submitting:
|
|
1488
|
-
paymentTermsUrl:
|
|
1489
|
-
renderPayment:
|
|
1487
|
+
submitting: c,
|
|
1488
|
+
paymentTermsUrl: f,
|
|
1489
|
+
renderPayment: p
|
|
1490
1490
|
}) {
|
|
1491
|
-
var
|
|
1492
|
-
const
|
|
1491
|
+
var fe, He, Le;
|
|
1492
|
+
const m = JSON.stringify([
|
|
1493
1493
|
t.insuranceType,
|
|
1494
1494
|
t.specialtyId,
|
|
1495
1495
|
t.specialtyIds,
|
|
1496
|
-
|
|
1496
|
+
_e(t),
|
|
1497
1497
|
t.operatorId,
|
|
1498
1498
|
t.operatorIds,
|
|
1499
1499
|
t.date,
|
|
1500
1500
|
t.slotKey
|
|
1501
|
-
]),
|
|
1501
|
+
]), g = E(
|
|
1502
1502
|
void 0
|
|
1503
|
-
),
|
|
1503
|
+
), o = (t.date ? (fe = n[t.date]) == null ? void 0 : fe.find((H) => H.key === t.slotKey) : void 0) ?? (((He = g.current) == null ? void 0 : He.selection) === m ? g.current.slot : void 0), u = li(
|
|
1504
1504
|
e,
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
),
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
]),
|
|
1514
|
-
|
|
1515
|
-
if (!w)
|
|
1516
|
-
else if (
|
|
1505
|
+
_e(t),
|
|
1506
|
+
o
|
|
1507
|
+
), k = u.blocked || !!(u.payment && !p), I = JSON.stringify([
|
|
1508
|
+
m,
|
|
1509
|
+
o == null ? void 0 : o.serviceId,
|
|
1510
|
+
_t(u.payment),
|
|
1511
|
+
f,
|
|
1512
|
+
k
|
|
1513
|
+
]), N = u.payment ? JSON.stringify([_t(u.payment), f]) : "", M = E(void 0), w = !!((Le = t.details) != null && Le.paymentAccepted);
|
|
1514
|
+
q(() => {
|
|
1515
|
+
if (!w) M.current = void 0;
|
|
1516
|
+
else if (N) M.current === void 0 ? M.current = N : M.current !== N && (M.current = void 0, i({
|
|
1517
1517
|
...t,
|
|
1518
1518
|
details: { ...t.details, paymentAccepted: !1 }
|
|
1519
1519
|
}));
|
|
1520
1520
|
else return;
|
|
1521
|
-
}, [w,
|
|
1522
|
-
const
|
|
1523
|
-
|
|
1524
|
-
const [
|
|
1525
|
-
|
|
1526
|
-
|
|
1521
|
+
}, [w, N, i, t]);
|
|
1522
|
+
const x = E(I);
|
|
1523
|
+
x.current = I;
|
|
1524
|
+
const [S, A] = Q({ status: "idle" }), D = E(0), T = E(!1), h = E(!0), C = E(!1), $ = E(void 0), b = E(I);
|
|
1525
|
+
q(() => (h.current = !0, () => {
|
|
1526
|
+
h.current = !1, D.current += 1;
|
|
1527
1527
|
}), []);
|
|
1528
|
-
const
|
|
1529
|
-
|
|
1530
|
-
b.current === I ||
|
|
1531
|
-
}, [I,
|
|
1532
|
-
const
|
|
1533
|
-
() =>
|
|
1534
|
-
[
|
|
1528
|
+
const pe = S.status === "payment" || S.status === "success";
|
|
1529
|
+
q(() => {
|
|
1530
|
+
b.current === I || C.current || pe || (b.current = I, D.current += 1, T.current = !1, A({ status: "idle" }));
|
|
1531
|
+
}, [I, pe]);
|
|
1532
|
+
const F = pe || b.current === I ? S.session : void 0, z = R(
|
|
1533
|
+
() => F && (a == null ? void 0 : a.sessionId) === F.id ? a : F ? { sessionId: F.id, status: "ready" } : void 0,
|
|
1534
|
+
[F, a]
|
|
1535
1535
|
);
|
|
1536
|
-
|
|
1537
|
-
const
|
|
1538
|
-
() =>
|
|
1539
|
-
sessionId:
|
|
1536
|
+
F && z && "phase" in z && z.phase === "completion" && ($.current = F.id);
|
|
1537
|
+
const _ = R(
|
|
1538
|
+
() => F && $.current === F.id && z && z.status !== "paid" && (!("phase" in z) || z.phase !== "completion") ? {
|
|
1539
|
+
sessionId: F.id,
|
|
1540
1540
|
status: "processing",
|
|
1541
1541
|
phase: "completion"
|
|
1542
|
-
} :
|
|
1543
|
-
[
|
|
1542
|
+
} : z,
|
|
1543
|
+
[F, z]
|
|
1544
1544
|
);
|
|
1545
|
-
|
|
1546
|
-
!
|
|
1545
|
+
q(() => {
|
|
1546
|
+
!F || !_ || C.current || (_.status === "paid" ? (C.current = !0, A((H) => ({ ...H, status: "success" }))) : _.status === "cancelled" && (D.current += 1, T.current = !1, g.current = void 0, i({
|
|
1547
1547
|
...t,
|
|
1548
1548
|
details: { ...t.details, paymentAccepted: !1 }
|
|
1549
|
-
}),
|
|
1550
|
-
}, [
|
|
1551
|
-
const
|
|
1552
|
-
D.current += 1,
|
|
1553
|
-
}, dt = async (
|
|
1554
|
-
var
|
|
1555
|
-
if (!(
|
|
1556
|
-
|
|
1557
|
-
const
|
|
1558
|
-
b.current =
|
|
1559
|
-
const
|
|
1560
|
-
slot: { ...
|
|
1549
|
+
}), A({ status: "idle", cancelled: !0 })));
|
|
1550
|
+
}, [F, _, i, t]);
|
|
1551
|
+
const me = () => {
|
|
1552
|
+
D.current += 1, T.current = !1, C.current = !1, $.current = void 0, g.current = void 0, b.current = x.current, A({ status: "idle" });
|
|
1553
|
+
}, dt = async (H) => {
|
|
1554
|
+
var Se, W, Ae, ie, oe;
|
|
1555
|
+
if (!(o != null && o.available) || k || c || T.current || S.status === "payment" || C.current || u.payment && !H.paymentAccepted) return;
|
|
1556
|
+
T.current = !0, g.current = { selection: m, slot: { ...o } };
|
|
1557
|
+
const Be = ++D.current, ge = I;
|
|
1558
|
+
b.current = ge;
|
|
1559
|
+
const J = {
|
|
1560
|
+
slot: { ...o, meta: o.meta ? { ...o.meta } : void 0 },
|
|
1561
1561
|
value: {
|
|
1562
1562
|
...t,
|
|
1563
|
-
serviceIds: (
|
|
1563
|
+
serviceIds: (Se = t.serviceIds) == null ? void 0 : Se.slice(),
|
|
1564
1564
|
specialtyIds: (W = t.specialtyIds) == null ? void 0 : W.slice(),
|
|
1565
|
-
operatorIds: (
|
|
1566
|
-
operatorId:
|
|
1567
|
-
details: { ...
|
|
1565
|
+
operatorIds: (Ae = t.operatorIds) == null ? void 0 : Ae.slice(),
|
|
1566
|
+
operatorId: Ns(t) ?? t.operatorId,
|
|
1567
|
+
details: { ...H }
|
|
1568
1568
|
},
|
|
1569
1569
|
details: {
|
|
1570
|
-
...
|
|
1571
|
-
confirmationChannels: (
|
|
1570
|
+
...H,
|
|
1571
|
+
confirmationChannels: (ie = H.confirmationChannels) == null ? void 0 : ie.slice()
|
|
1572
1572
|
},
|
|
1573
|
-
...
|
|
1574
|
-
}, ae = () =>
|
|
1575
|
-
|
|
1576
|
-
let
|
|
1573
|
+
...u.payment ? { payment: { ...u.payment } } : {}
|
|
1574
|
+
}, ae = () => h.current && D.current === Be && x.current === ge;
|
|
1575
|
+
A({ status: "submitting" });
|
|
1576
|
+
let he = !1;
|
|
1577
1577
|
try {
|
|
1578
|
-
const
|
|
1578
|
+
const te = await r(J);
|
|
1579
1579
|
if (!ae()) return;
|
|
1580
|
-
if (
|
|
1581
|
-
const
|
|
1582
|
-
if (!((oe =
|
|
1583
|
-
|
|
1580
|
+
if (J.payment) {
|
|
1581
|
+
const L = te == null ? void 0 : te.paymentSession;
|
|
1582
|
+
if (!((oe = L == null ? void 0 : L.id) != null && oe.trim()) || _t(L.payment) !== _t(J.payment)) {
|
|
1583
|
+
A({ status: "error" });
|
|
1584
1584
|
return;
|
|
1585
1585
|
}
|
|
1586
|
-
|
|
1586
|
+
he = !0, A({
|
|
1587
1587
|
status: "payment",
|
|
1588
|
-
snapshot:
|
|
1589
|
-
session: { id:
|
|
1588
|
+
snapshot: J,
|
|
1589
|
+
session: { id: L.id, payment: { ...L.payment } }
|
|
1590
1590
|
});
|
|
1591
|
-
} else
|
|
1591
|
+
} else te != null && te.paymentSession ? A({ status: "error" }) : (C.current = !0, A({ status: "success", snapshot: J }));
|
|
1592
1592
|
} catch {
|
|
1593
|
-
ae() &&
|
|
1593
|
+
ae() && A({ status: "error" });
|
|
1594
1594
|
} finally {
|
|
1595
|
-
ae() && !
|
|
1595
|
+
ae() && !he && (T.current = !1);
|
|
1596
1596
|
}
|
|
1597
1597
|
};
|
|
1598
1598
|
return {
|
|
1599
|
-
...
|
|
1600
|
-
payment:
|
|
1601
|
-
blocked:
|
|
1602
|
-
state:
|
|
1603
|
-
activeSession:
|
|
1599
|
+
...S,
|
|
1600
|
+
payment: u.payment,
|
|
1601
|
+
blocked: k,
|
|
1602
|
+
state: _,
|
|
1603
|
+
activeSession: F,
|
|
1604
1604
|
submit: dt,
|
|
1605
|
-
reset:
|
|
1605
|
+
reset: me
|
|
1606
1606
|
};
|
|
1607
1607
|
}
|
|
1608
|
-
const
|
|
1608
|
+
const pi = bt(
|
|
1609
1609
|
"ds:flex ds:w-full ds:flex-col ds:text-[var(--foreground)]",
|
|
1610
1610
|
{
|
|
1611
1611
|
variants: {
|
|
@@ -1633,44 +1633,44 @@ const ui = kt(
|
|
|
1633
1633
|
},
|
|
1634
1634
|
defaultVariants: { variant: "inline-list", surface: "flat" }
|
|
1635
1635
|
}
|
|
1636
|
-
),
|
|
1636
|
+
), mi = [
|
|
1637
1637
|
[
|
|
1638
1638
|
/\b(estetic|aesthetic|botox|filler|mesoterap|chirurgia\s*plastic)/i,
|
|
1639
|
-
|
|
1639
|
+
rs
|
|
1640
1640
|
],
|
|
1641
|
-
[/\b(cardio|ecg|elettrocardio|ecocardio|cuore|heart)/i,
|
|
1642
|
-
[/\b(dent|odonto|tooth|teeth|pulizia|igien|smile)/i,
|
|
1643
|
-
[/\b(oftalmo|ocul|ophthal|vision|occhi|eye)/i,
|
|
1644
|
-
[/\b(otorin|udito|orecchi|hearing|ear)/i,
|
|
1645
|
-
[/\b(neuro|brain|cervello)/i,
|
|
1646
|
-
[/\b(pediatr|child|bambin)/i,
|
|
1647
|
-
[/\b(ortop|ortho|osteo|skeleton|ossa|bone)/i,
|
|
1648
|
-
[/\b(lab|analis|test|sang|esami)/i,
|
|
1649
|
-
[/\b(farmaco|pharm|pillol|refill)/i,
|
|
1650
|
-
[/\b(chirurg|surg|intervent|operat)/i,
|
|
1651
|
-
[/\b(scan|rx|x-?ray|raggi|imag|radio|risonan|ecograf|ultras)/i,
|
|
1652
|
-
[/\b(vacc|inject|inie|punto)/i,
|
|
1653
|
-
[/\b(derma|skin|pelle)/i,
|
|
1654
|
-
[/\b(prima\s*visit|first\s*visit|consult|consulto|valutaz)/i,
|
|
1655
|
-
[/\b(general|medicin|family|control|check[-\s]?up)/i,
|
|
1641
|
+
[/\b(cardio|ecg|elettrocardio|ecocardio|cuore|heart)/i, cn],
|
|
1642
|
+
[/\b(dent|odonto|tooth|teeth|pulizia|igien|smile)/i, Mn],
|
|
1643
|
+
[/\b(oftalmo|ocul|ophthal|vision|occhi|eye)/i, dn],
|
|
1644
|
+
[/\b(otorin|udito|orecchi|hearing|ear)/i, In],
|
|
1645
|
+
[/\b(neuro|brain|cervello)/i, yn],
|
|
1646
|
+
[/\b(pediatr|child|bambin)/i, ln],
|
|
1647
|
+
[/\b(ortop|ortho|osteo|skeleton|ossa|bone)/i, vn],
|
|
1648
|
+
[/\b(lab|analis|test|sang|esami)/i, wn],
|
|
1649
|
+
[/\b(farmaco|pharm|pillol|refill)/i, An],
|
|
1650
|
+
[/\b(chirurg|surg|intervent|operat)/i, Dn],
|
|
1651
|
+
[/\b(scan|rx|x-?ray|raggi|imag|radio|risonan|ecograf|ultras)/i, un],
|
|
1652
|
+
[/\b(vacc|inject|inie|punto)/i, rs],
|
|
1653
|
+
[/\b(derma|skin|pelle)/i, pn],
|
|
1654
|
+
[/\b(prima\s*visit|first\s*visit|consult|consulto|valutaz)/i, mn],
|
|
1655
|
+
[/\b(general|medicin|family|control|check[-\s]?up)/i, gn]
|
|
1656
1656
|
];
|
|
1657
|
-
function
|
|
1658
|
-
for (const [t, n] of
|
|
1657
|
+
function fi(e) {
|
|
1658
|
+
for (const [t, n] of mi)
|
|
1659
1659
|
if (t.test(e)) return n;
|
|
1660
1660
|
return null;
|
|
1661
1661
|
}
|
|
1662
|
-
function
|
|
1663
|
-
const t =
|
|
1662
|
+
function gi(e) {
|
|
1663
|
+
const t = fi(e.label) ?? on;
|
|
1664
1664
|
return /* @__PURE__ */ s(t, { "aria-hidden": "true", className: "ds:size-5" });
|
|
1665
1665
|
}
|
|
1666
|
-
function
|
|
1666
|
+
function As(e) {
|
|
1667
1667
|
var t;
|
|
1668
1668
|
return (t = e.priceLabel) != null && t.trim() ? e.priceLabel : void 0;
|
|
1669
1669
|
}
|
|
1670
|
-
function
|
|
1671
|
-
return
|
|
1670
|
+
function Ze(e) {
|
|
1671
|
+
return Bt(e, "yyyy-MM-dd");
|
|
1672
1672
|
}
|
|
1673
|
-
const
|
|
1673
|
+
const hi = [
|
|
1674
1674
|
"ds:relative ds:flex ds:items-center ds:justify-center",
|
|
1675
1675
|
"ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)]",
|
|
1676
1676
|
"ds:rounded-[var(--radius-sm)]",
|
|
@@ -1680,7 +1680,7 @@ const gi = [
|
|
|
1680
1680
|
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
1681
1681
|
"ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
1682
1682
|
"ds:forced-colors:focus-visible:outline-[CanvasText]"
|
|
1683
|
-
].join(" "),
|
|
1683
|
+
].join(" "), vi = bt(hi, {
|
|
1684
1684
|
variants: {
|
|
1685
1685
|
state: {
|
|
1686
1686
|
available: "ds:cursor-pointer ds:text-[var(--foreground)] ds:hover:bg-[var(--muted)]/30",
|
|
@@ -1691,91 +1691,91 @@ const gi = [
|
|
|
1691
1691
|
},
|
|
1692
1692
|
defaultVariants: { state: "unavailable" }
|
|
1693
1693
|
});
|
|
1694
|
-
function
|
|
1694
|
+
function bi({
|
|
1695
1695
|
availableDates: e,
|
|
1696
1696
|
selectedDate: t,
|
|
1697
1697
|
onSelectDate: n,
|
|
1698
1698
|
locale: r,
|
|
1699
1699
|
loading: i
|
|
1700
1700
|
}) {
|
|
1701
|
-
const { t: a } =
|
|
1702
|
-
const w =
|
|
1703
|
-
for (let
|
|
1704
|
-
const
|
|
1705
|
-
|
|
1701
|
+
const { t: a } = G("ui"), c = R(() => t ? ht(le(t)) : e.length > 0 ? ht(le(e[0])) : ht(/* @__PURE__ */ new Date()), [t, e]), [f, p] = Q(c), [m, g] = Q(null), l = R(() => {
|
|
1702
|
+
const w = ht(f), x = en(f), S = w.getDay(), A = x.getDate(), D = [];
|
|
1703
|
+
for (let T = S; T > 0; T -= 1) {
|
|
1704
|
+
const h = new Date(w);
|
|
1705
|
+
h.setDate(w.getDate() - T), D.push(h);
|
|
1706
1706
|
}
|
|
1707
|
-
for (let
|
|
1708
|
-
const
|
|
1709
|
-
|
|
1707
|
+
for (let T = 0; T < A; T += 1) {
|
|
1708
|
+
const h = new Date(w);
|
|
1709
|
+
h.setDate(w.getDate() + T), D.push(h);
|
|
1710
1710
|
}
|
|
1711
1711
|
for (; D.length < 42; ) {
|
|
1712
|
-
const
|
|
1713
|
-
|
|
1712
|
+
const T = D[D.length - 1], h = new Date(T);
|
|
1713
|
+
h.setDate(T.getDate() + 1), D.push(h);
|
|
1714
1714
|
}
|
|
1715
1715
|
return D;
|
|
1716
|
-
}, [
|
|
1716
|
+
}, [f]), o = R(() => {
|
|
1717
1717
|
try {
|
|
1718
1718
|
return new Intl.DateTimeFormat(r, {
|
|
1719
1719
|
month: "long",
|
|
1720
1720
|
year: "numeric"
|
|
1721
|
-
}).format(
|
|
1721
|
+
}).format(f);
|
|
1722
1722
|
} catch {
|
|
1723
|
-
return
|
|
1723
|
+
return Bt(f, "MMMM yyyy");
|
|
1724
1724
|
}
|
|
1725
|
-
}, [
|
|
1725
|
+
}, [f, r]), u = R(() => {
|
|
1726
1726
|
const w = new Date(2024, 0, 7);
|
|
1727
|
-
return Array.from({ length: 7 }, (
|
|
1728
|
-
const
|
|
1729
|
-
|
|
1727
|
+
return Array.from({ length: 7 }, (x, S) => {
|
|
1728
|
+
const A = new Date(w);
|
|
1729
|
+
A.setDate(w.getDate() + S);
|
|
1730
1730
|
try {
|
|
1731
|
-
return new Intl.DateTimeFormat(r, { weekday: "short" }).format(
|
|
1731
|
+
return new Intl.DateTimeFormat(r, { weekday: "short" }).format(A);
|
|
1732
1732
|
} catch {
|
|
1733
|
-
return
|
|
1733
|
+
return Bt(A, "EEE");
|
|
1734
1734
|
}
|
|
1735
1735
|
});
|
|
1736
|
-
}, [r]),
|
|
1737
|
-
(w) =>
|
|
1738
|
-
[
|
|
1739
|
-
),
|
|
1740
|
-
if (
|
|
1741
|
-
if (t) return
|
|
1742
|
-
const w =
|
|
1743
|
-
(
|
|
1736
|
+
}, [r]), k = R(() => new Set(e), [e]), I = ue(
|
|
1737
|
+
(w) => k.has(Ze(w)),
|
|
1738
|
+
[k]
|
|
1739
|
+
), N = R(() => {
|
|
1740
|
+
if (m) return m;
|
|
1741
|
+
if (t) return le(t);
|
|
1742
|
+
const w = l.find(
|
|
1743
|
+
(x) => Ot(x, f) && I(x)
|
|
1744
1744
|
);
|
|
1745
|
-
return w || (
|
|
1746
|
-
}, [
|
|
1747
|
-
(w,
|
|
1748
|
-
let
|
|
1745
|
+
return w || (l.find((x) => Ot(x, f)) ?? null);
|
|
1746
|
+
}, [m, t, l, f, I]), M = ue(
|
|
1747
|
+
(w, x) => {
|
|
1748
|
+
let S = null;
|
|
1749
1749
|
switch (w.key) {
|
|
1750
1750
|
case "ArrowLeft":
|
|
1751
|
-
|
|
1751
|
+
S = new Date(x), S.setDate(x.getDate() - 1);
|
|
1752
1752
|
break;
|
|
1753
1753
|
case "ArrowRight":
|
|
1754
|
-
|
|
1754
|
+
S = new Date(x), S.setDate(x.getDate() + 1);
|
|
1755
1755
|
break;
|
|
1756
1756
|
case "ArrowUp":
|
|
1757
|
-
|
|
1757
|
+
S = new Date(x), S.setDate(x.getDate() - 7);
|
|
1758
1758
|
break;
|
|
1759
1759
|
case "ArrowDown":
|
|
1760
|
-
|
|
1760
|
+
S = new Date(x), S.setDate(x.getDate() + 7);
|
|
1761
1761
|
break;
|
|
1762
1762
|
case "Home":
|
|
1763
|
-
|
|
1763
|
+
S = new Date(x), S.setDate(x.getDate() - x.getDay());
|
|
1764
1764
|
break;
|
|
1765
1765
|
case "End":
|
|
1766
|
-
|
|
1766
|
+
S = new Date(x), S.setDate(x.getDate() + (6 - x.getDay()));
|
|
1767
1767
|
break;
|
|
1768
1768
|
case "Enter":
|
|
1769
1769
|
case " ": {
|
|
1770
|
-
w.preventDefault(), I(
|
|
1770
|
+
w.preventDefault(), I(x) && n(Ze(x));
|
|
1771
1771
|
return;
|
|
1772
1772
|
}
|
|
1773
1773
|
default:
|
|
1774
1774
|
return;
|
|
1775
1775
|
}
|
|
1776
|
-
|
|
1776
|
+
S && (w.preventDefault(), Ot(S, f) || p(ht(S)), g(S));
|
|
1777
1777
|
},
|
|
1778
|
-
[I, n,
|
|
1778
|
+
[I, n, f]
|
|
1779
1779
|
);
|
|
1780
1780
|
return i ? /* @__PURE__ */ v(
|
|
1781
1781
|
"div",
|
|
@@ -1785,22 +1785,22 @@ function vi({
|
|
|
1785
1785
|
"aria-label": a("common.loading"),
|
|
1786
1786
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
1787
1787
|
children: [
|
|
1788
|
-
/* @__PURE__ */ s(
|
|
1789
|
-
/* @__PURE__ */ s("div", { className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]", children: Array.from({ length: 42 }, (w,
|
|
1788
|
+
/* @__PURE__ */ s(Et, { variant: "text", width: "40%" }),
|
|
1789
|
+
/* @__PURE__ */ s("div", { className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]", children: Array.from({ length: 42 }, (w, x) => /* @__PURE__ */ s(Et, { variant: "rounded", height: "2.5rem" }, `mg-skel-${x}`)) })
|
|
1790
1790
|
]
|
|
1791
1791
|
}
|
|
1792
1792
|
) : /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
1793
1793
|
/* @__PURE__ */ v("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
1794
1794
|
/* @__PURE__ */ s(
|
|
1795
|
-
|
|
1795
|
+
ns,
|
|
1796
1796
|
{
|
|
1797
|
-
icon: /* @__PURE__ */ s(
|
|
1797
|
+
icon: /* @__PURE__ */ s(sn, {}),
|
|
1798
1798
|
"aria-label": a("booking.previousMonth"),
|
|
1799
1799
|
size: "sm",
|
|
1800
1800
|
intent: "ghost",
|
|
1801
1801
|
flipIconInRtl: !0,
|
|
1802
1802
|
onClick: () => {
|
|
1803
|
-
|
|
1803
|
+
p((w) => Bn(w)), g(null);
|
|
1804
1804
|
}
|
|
1805
1805
|
}
|
|
1806
1806
|
),
|
|
@@ -1809,19 +1809,19 @@ function vi({
|
|
|
1809
1809
|
{
|
|
1810
1810
|
className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]",
|
|
1811
1811
|
"aria-live": "polite",
|
|
1812
|
-
children:
|
|
1812
|
+
children: o
|
|
1813
1813
|
}
|
|
1814
1814
|
),
|
|
1815
1815
|
/* @__PURE__ */ s(
|
|
1816
|
-
|
|
1816
|
+
ns,
|
|
1817
1817
|
{
|
|
1818
|
-
icon: /* @__PURE__ */ s(
|
|
1818
|
+
icon: /* @__PURE__ */ s(nn, {}),
|
|
1819
1819
|
"aria-label": a("booking.nextMonth"),
|
|
1820
1820
|
size: "sm",
|
|
1821
1821
|
intent: "ghost",
|
|
1822
1822
|
flipIconInRtl: !0,
|
|
1823
1823
|
onClick: () => {
|
|
1824
|
-
|
|
1824
|
+
p((w) => gs(w, 1)), g(null);
|
|
1825
1825
|
}
|
|
1826
1826
|
}
|
|
1827
1827
|
)
|
|
@@ -1838,30 +1838,30 @@ function vi({
|
|
|
1838
1838
|
{
|
|
1839
1839
|
role: "row",
|
|
1840
1840
|
className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]",
|
|
1841
|
-
children:
|
|
1841
|
+
children: u.map((w, x) => /* @__PURE__ */ s(
|
|
1842
1842
|
"div",
|
|
1843
1843
|
{
|
|
1844
1844
|
role: "columnheader",
|
|
1845
1845
|
className: "type-meta ds:text-center ds:text-[var(--muted-foreground)] ds:font-[var(--font-weight-medium)]",
|
|
1846
1846
|
children: w
|
|
1847
1847
|
},
|
|
1848
|
-
`wd-${
|
|
1848
|
+
`wd-${x}`
|
|
1849
1849
|
))
|
|
1850
1850
|
}
|
|
1851
1851
|
),
|
|
1852
|
-
Array.from({ length: 6 }, (w,
|
|
1852
|
+
Array.from({ length: 6 }, (w, x) => /* @__PURE__ */ s(
|
|
1853
1853
|
"div",
|
|
1854
1854
|
{
|
|
1855
1855
|
role: "row",
|
|
1856
1856
|
className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]",
|
|
1857
|
-
children:
|
|
1858
|
-
const D =
|
|
1857
|
+
children: l.slice(x * 7, x * 7 + 7).map((S, A) => {
|
|
1858
|
+
const D = x * 7 + A, T = Ot(S, f), h = T && I(S), C = t ? is(S, le(t)) : !1, $ = T ? C ? "selected" : h ? "available" : "unavailable" : "outside", b = N ? is(N, S) : !1, pe = (() => {
|
|
1859
1859
|
try {
|
|
1860
1860
|
return new Intl.DateTimeFormat(r, {
|
|
1861
1861
|
dateStyle: "full"
|
|
1862
|
-
}).format(
|
|
1862
|
+
}).format(S);
|
|
1863
1863
|
} catch {
|
|
1864
|
-
return
|
|
1864
|
+
return Bt(S, "PPP");
|
|
1865
1865
|
}
|
|
1866
1866
|
})();
|
|
1867
1867
|
return /* @__PURE__ */ s(
|
|
@@ -1869,30 +1869,30 @@ function vi({
|
|
|
1869
1869
|
{
|
|
1870
1870
|
type: "button",
|
|
1871
1871
|
role: "gridcell",
|
|
1872
|
-
"aria-label":
|
|
1873
|
-
"aria-selected":
|
|
1874
|
-
"aria-disabled": !
|
|
1872
|
+
"aria-label": pe,
|
|
1873
|
+
"aria-selected": C || void 0,
|
|
1874
|
+
"aria-disabled": !h || void 0,
|
|
1875
1875
|
tabIndex: b ? 0 : -1,
|
|
1876
|
-
disabled: !
|
|
1876
|
+
disabled: !h,
|
|
1877
1877
|
onClick: () => {
|
|
1878
|
-
|
|
1878
|
+
h && n(Ze(S));
|
|
1879
1879
|
},
|
|
1880
|
-
onKeyDown: (
|
|
1881
|
-
className:
|
|
1882
|
-
children: /* @__PURE__ */ s("span", { "aria-hidden": "true", children:
|
|
1880
|
+
onKeyDown: (F) => M(F, S),
|
|
1881
|
+
className: vi({ state: $ }),
|
|
1882
|
+
children: /* @__PURE__ */ s("span", { "aria-hidden": "true", children: S.getDate() })
|
|
1883
1883
|
},
|
|
1884
1884
|
`mg-cell-${D}`
|
|
1885
1885
|
);
|
|
1886
1886
|
})
|
|
1887
1887
|
},
|
|
1888
|
-
`mg-row-${
|
|
1888
|
+
`mg-row-${x}`
|
|
1889
1889
|
))
|
|
1890
1890
|
]
|
|
1891
1891
|
}
|
|
1892
1892
|
)
|
|
1893
1893
|
] });
|
|
1894
1894
|
}
|
|
1895
|
-
const
|
|
1895
|
+
const yi = bt(
|
|
1896
1896
|
[
|
|
1897
1897
|
"ds:relative ds:flex ds:w-full ds:items-center ds:gap-[var(--spacing-md)]",
|
|
1898
1898
|
"ds:min-h-[var(--min-target-size)]",
|
|
@@ -1918,95 +1918,96 @@ const bi = kt(
|
|
|
1918
1918
|
defaultVariants: { state: "idle" }
|
|
1919
1919
|
}
|
|
1920
1920
|
);
|
|
1921
|
-
function
|
|
1921
|
+
function ki({
|
|
1922
1922
|
services: e,
|
|
1923
1923
|
selectedServiceId: t,
|
|
1924
|
-
onSelect: n
|
|
1924
|
+
onSelect: n,
|
|
1925
|
+
showDuration: r
|
|
1925
1926
|
}) {
|
|
1926
|
-
const { t:
|
|
1927
|
+
const { t: i, i18n: a } = G("ui"), c = Pt(), [f, p] = Q(() => {
|
|
1927
1928
|
if (t) {
|
|
1928
|
-
const o = e.findIndex((
|
|
1929
|
+
const o = e.findIndex((u) => u.id === t);
|
|
1929
1930
|
if (o >= 0) return o;
|
|
1930
1931
|
}
|
|
1931
1932
|
return 0;
|
|
1932
|
-
}),
|
|
1933
|
-
var
|
|
1934
|
-
(
|
|
1935
|
-
}, []),
|
|
1936
|
-
(o,
|
|
1937
|
-
const
|
|
1938
|
-
if (
|
|
1933
|
+
}), m = E(/* @__PURE__ */ new Map()), g = ue((o) => {
|
|
1934
|
+
var u;
|
|
1935
|
+
(u = m.current.get(o)) == null || u.focus();
|
|
1936
|
+
}, []), l = ue(
|
|
1937
|
+
(o, u, k) => {
|
|
1938
|
+
const I = e.length;
|
|
1939
|
+
if (I !== 0)
|
|
1939
1940
|
switch (o.key) {
|
|
1940
1941
|
case "ArrowDown":
|
|
1941
1942
|
case "ArrowRight": {
|
|
1942
1943
|
o.preventDefault();
|
|
1943
|
-
const
|
|
1944
|
-
|
|
1944
|
+
const N = (u + 1) % I;
|
|
1945
|
+
p(N), g(N);
|
|
1945
1946
|
break;
|
|
1946
1947
|
}
|
|
1947
1948
|
case "ArrowUp":
|
|
1948
1949
|
case "ArrowLeft": {
|
|
1949
1950
|
o.preventDefault();
|
|
1950
|
-
const
|
|
1951
|
-
|
|
1951
|
+
const N = (u - 1 + I) % I;
|
|
1952
|
+
p(N), g(N);
|
|
1952
1953
|
break;
|
|
1953
1954
|
}
|
|
1954
1955
|
case "Home": {
|
|
1955
|
-
o.preventDefault(),
|
|
1956
|
+
o.preventDefault(), p(0), g(0);
|
|
1956
1957
|
break;
|
|
1957
1958
|
}
|
|
1958
1959
|
case "End": {
|
|
1959
1960
|
o.preventDefault();
|
|
1960
|
-
const
|
|
1961
|
-
|
|
1961
|
+
const N = I - 1;
|
|
1962
|
+
p(N), g(N);
|
|
1962
1963
|
break;
|
|
1963
1964
|
}
|
|
1964
1965
|
case "Enter":
|
|
1965
1966
|
case " ": {
|
|
1966
|
-
o.preventDefault(), n(
|
|
1967
|
+
o.preventDefault(), n(k);
|
|
1967
1968
|
break;
|
|
1968
1969
|
}
|
|
1969
1970
|
}
|
|
1970
1971
|
},
|
|
1971
|
-
[e.length,
|
|
1972
|
+
[e.length, g, n]
|
|
1972
1973
|
);
|
|
1973
1974
|
return e.length === 0 ? null : /* @__PURE__ */ s(
|
|
1974
1975
|
"div",
|
|
1975
1976
|
{
|
|
1976
1977
|
role: "radiogroup",
|
|
1977
|
-
"aria-label":
|
|
1978
|
-
id:
|
|
1978
|
+
"aria-label": i("booking.serviceListLabel"),
|
|
1979
|
+
id: c,
|
|
1979
1980
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
|
|
1980
|
-
children: e.map((o,
|
|
1981
|
-
const
|
|
1982
|
-
amount:
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1981
|
+
children: e.map((o, u) => {
|
|
1982
|
+
const k = t === o.id, I = f === u, N = Qt(o), M = o.payment ? N ? i(`booking.payment.${N.kind}`, {
|
|
1983
|
+
amount: yt(
|
|
1984
|
+
N.amountCents,
|
|
1985
|
+
N.currencyCode,
|
|
1986
|
+
a.language
|
|
1986
1987
|
)
|
|
1987
|
-
}) :
|
|
1988
|
+
}) : i("booking.payment.unavailable") : As(o), w = M ? i("booking.serviceCardLabelPrice", {
|
|
1988
1989
|
label: o.label,
|
|
1989
|
-
price:
|
|
1990
|
-
}) : r("booking.serviceCardLabel", {
|
|
1990
|
+
price: M
|
|
1991
|
+
}) : r ? i("booking.serviceCardLabel", {
|
|
1991
1992
|
label: o.label,
|
|
1992
1993
|
duration: o.durationMin
|
|
1993
|
-
}),
|
|
1994
|
+
}) : o.label, x = gi(o);
|
|
1994
1995
|
return /* @__PURE__ */ v(
|
|
1995
1996
|
"button",
|
|
1996
1997
|
{
|
|
1997
1998
|
ref: (S) => {
|
|
1998
|
-
S ?
|
|
1999
|
+
S ? m.current.set(u, S) : m.current.delete(u);
|
|
1999
2000
|
},
|
|
2000
2001
|
type: "button",
|
|
2001
2002
|
role: "radio",
|
|
2002
|
-
"aria-checked":
|
|
2003
|
-
"aria-label":
|
|
2004
|
-
tabIndex:
|
|
2003
|
+
"aria-checked": k,
|
|
2004
|
+
"aria-label": w,
|
|
2005
|
+
tabIndex: I ? 0 : -1,
|
|
2005
2006
|
onClick: () => n(o.id),
|
|
2006
|
-
onFocus: () => u
|
|
2007
|
-
onKeyDown: (S) =>
|
|
2008
|
-
className:
|
|
2009
|
-
state:
|
|
2007
|
+
onFocus: () => p(u),
|
|
2008
|
+
onKeyDown: (S) => l(S, u, o.id),
|
|
2009
|
+
className: yi({
|
|
2010
|
+
state: k ? "selected" : "idle"
|
|
2010
2011
|
}),
|
|
2011
2012
|
children: [
|
|
2012
2013
|
/* @__PURE__ */ s(
|
|
@@ -2014,21 +2015,21 @@ function yi({
|
|
|
2014
2015
|
{
|
|
2015
2016
|
"aria-hidden": "true",
|
|
2016
2017
|
className: "ds:flex ds:size-10 ds:shrink-0 ds:items-center ds:justify-center ds:rounded-[var(--radius-sm)] ds:bg-[var(--primary)]/10 ds:text-[var(--primary)]",
|
|
2017
|
-
children:
|
|
2018
|
+
children: x
|
|
2018
2019
|
}
|
|
2019
2020
|
),
|
|
2020
2021
|
/* @__PURE__ */ v("span", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
2021
2022
|
/* @__PURE__ */ s("span", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]", children: o.label }),
|
|
2022
|
-
|
|
2023
|
+
M || !r ? null : /* @__PURE__ */ s("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: i("booking.serviceSummary", {
|
|
2023
2024
|
minutes: o.durationMin
|
|
2024
2025
|
}) })
|
|
2025
2026
|
] }),
|
|
2026
|
-
|
|
2027
|
+
M ? /* @__PURE__ */ s(
|
|
2027
2028
|
"span",
|
|
2028
2029
|
{
|
|
2029
2030
|
"aria-hidden": "true",
|
|
2030
2031
|
className: "ds:inline-flex ds:shrink-0 ds:items-center ds:ms-auto",
|
|
2031
|
-
children: /* @__PURE__ */ s(
|
|
2032
|
+
children: /* @__PURE__ */ s(ms, { variant: "accentSoft", size: "lg", children: M })
|
|
2032
2033
|
}
|
|
2033
2034
|
) : null
|
|
2034
2035
|
]
|
|
@@ -2039,7 +2040,7 @@ function yi({
|
|
|
2039
2040
|
}
|
|
2040
2041
|
);
|
|
2041
2042
|
}
|
|
2042
|
-
const
|
|
2043
|
+
const Si = bt(
|
|
2043
2044
|
[
|
|
2044
2045
|
"ds:inline-flex ds:items-center ds:justify-center ds:gap-[var(--spacing-2xs)]",
|
|
2045
2046
|
"ds:min-h-[var(--min-target-size)]",
|
|
@@ -2065,16 +2066,16 @@ const ki = kt(
|
|
|
2065
2066
|
defaultVariants: { state: "idle" }
|
|
2066
2067
|
}
|
|
2067
2068
|
);
|
|
2068
|
-
function
|
|
2069
|
+
function xi(e) {
|
|
2069
2070
|
const [t] = e.split(":").map((r) => parseInt(r, 10)), n = Number.isFinite(t) ? t : 0;
|
|
2070
2071
|
return n < 12 ? "morning" : n < 17 ? "afternoon" : "evening";
|
|
2071
2072
|
}
|
|
2072
|
-
const
|
|
2073
|
-
morning:
|
|
2074
|
-
afternoon:
|
|
2075
|
-
evening:
|
|
2073
|
+
const Ii = {
|
|
2074
|
+
morning: an,
|
|
2075
|
+
afternoon: _n,
|
|
2076
|
+
evening: rn
|
|
2076
2077
|
};
|
|
2077
|
-
function
|
|
2078
|
+
function Ni({
|
|
2078
2079
|
date: e,
|
|
2079
2080
|
slots: t,
|
|
2080
2081
|
selectedSlotKey: n,
|
|
@@ -2082,202 +2083,202 @@ function Ii({
|
|
|
2082
2083
|
loading: i,
|
|
2083
2084
|
locale: a
|
|
2084
2085
|
}) {
|
|
2085
|
-
const { t:
|
|
2086
|
+
const { t: c } = G("ui"), f = R(() => {
|
|
2086
2087
|
try {
|
|
2087
2088
|
return new Intl.DateTimeFormat(a, {
|
|
2088
2089
|
weekday: "long",
|
|
2089
2090
|
day: "numeric",
|
|
2090
2091
|
month: "long"
|
|
2091
|
-
}).format(
|
|
2092
|
+
}).format(le(e));
|
|
2092
2093
|
} catch {
|
|
2093
2094
|
return e;
|
|
2094
2095
|
}
|
|
2095
|
-
}, [e, a]),
|
|
2096
|
-
const
|
|
2096
|
+
}, [e, a]), p = R(() => {
|
|
2097
|
+
const l = {
|
|
2097
2098
|
morning: [],
|
|
2098
2099
|
afternoon: [],
|
|
2099
2100
|
evening: []
|
|
2100
2101
|
};
|
|
2101
|
-
for (const
|
|
2102
|
-
|
|
2103
|
-
return
|
|
2104
|
-
}, [t]),
|
|
2102
|
+
for (const o of t)
|
|
2103
|
+
l[xi(o.time)].push(o);
|
|
2104
|
+
return l;
|
|
2105
|
+
}, [t]), m = t.filter((l) => l.available).length, g = ["morning", "afternoon", "evening"];
|
|
2105
2106
|
return i ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
2106
|
-
/* @__PURE__ */ s(
|
|
2107
|
-
[0, 1].map((
|
|
2107
|
+
/* @__PURE__ */ s(Et, { variant: "text", width: "60%" }),
|
|
2108
|
+
[0, 1].map((l) => /* @__PURE__ */ s(
|
|
2108
2109
|
"div",
|
|
2109
2110
|
{
|
|
2110
2111
|
className: "ds:grid ds:grid-cols-3 ds:gap-[var(--spacing-xs)]",
|
|
2111
|
-
children: [0, 1, 2].map((
|
|
2112
|
+
children: [0, 1, 2].map((o) => /* @__PURE__ */ s(Et, { variant: "rounded", height: "44px" }, o))
|
|
2112
2113
|
},
|
|
2113
|
-
|
|
2114
|
+
l
|
|
2114
2115
|
))
|
|
2115
|
-
] }) :
|
|
2116
|
+
] }) : m === 0 ? /* @__PURE__ */ s(fs, { variant: "no-results", title: c("booking.noSlotsForDate") }) : /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
2116
2117
|
/* @__PURE__ */ v("div", { className: "ds:flex ds:items-baseline ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
2117
2118
|
/* @__PURE__ */ v("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
2118
2119
|
/* @__PURE__ */ s(
|
|
2119
|
-
|
|
2120
|
+
Sn,
|
|
2120
2121
|
{
|
|
2121
2122
|
"aria-hidden": "true",
|
|
2122
2123
|
className: "ds:size-4 ds:text-[color:var(--accent)]"
|
|
2123
2124
|
}
|
|
2124
2125
|
),
|
|
2125
|
-
/* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children:
|
|
2126
|
+
/* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: f })
|
|
2126
2127
|
] }),
|
|
2127
|
-
/* @__PURE__ */ s("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children:
|
|
2128
|
+
/* @__PURE__ */ s("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: c("booking.slotsAvailable", { count: m }) })
|
|
2128
2129
|
] }),
|
|
2129
|
-
|
|
2130
|
-
const
|
|
2131
|
-
if (
|
|
2132
|
-
const
|
|
2130
|
+
g.map((l) => {
|
|
2131
|
+
const o = p[l];
|
|
2132
|
+
if (o.length === 0) return null;
|
|
2133
|
+
const u = Ii[l];
|
|
2133
2134
|
return /* @__PURE__ */ v(
|
|
2134
2135
|
"div",
|
|
2135
2136
|
{
|
|
2136
2137
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
2137
2138
|
children: [
|
|
2138
2139
|
/* @__PURE__ */ v("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:text-[color:var(--muted-foreground)]", children: [
|
|
2139
|
-
/* @__PURE__ */ s(
|
|
2140
|
-
/* @__PURE__ */ s("span", { className: "type-meta ds:font-[var(--font-weight-semibold)] ds:uppercase", children:
|
|
2140
|
+
/* @__PURE__ */ s(u, { "aria-hidden": "true", className: "ds:size-3.5" }),
|
|
2141
|
+
/* @__PURE__ */ s("span", { className: "type-meta ds:font-[var(--font-weight-semibold)] ds:uppercase", children: c(`booking.timeOfDay.${l}`) })
|
|
2141
2142
|
] }),
|
|
2142
2143
|
/* @__PURE__ */ s(
|
|
2143
2144
|
"div",
|
|
2144
2145
|
{
|
|
2145
2146
|
role: "group",
|
|
2146
|
-
"aria-label":
|
|
2147
|
+
"aria-label": c(`booking.timeOfDay.${l}`),
|
|
2147
2148
|
className: "ds:grid ds:grid-cols-3 ds:gap-[var(--spacing-xs)] ds:sm:grid-cols-4",
|
|
2148
|
-
children:
|
|
2149
|
-
const I =
|
|
2149
|
+
children: o.map((k) => {
|
|
2150
|
+
const I = k.key === n, N = k.available ? I ? "selected" : "idle" : "unavailable";
|
|
2150
2151
|
return /* @__PURE__ */ s(
|
|
2151
2152
|
"button",
|
|
2152
2153
|
{
|
|
2153
2154
|
type: "button",
|
|
2154
|
-
"data-slot-id":
|
|
2155
|
-
disabled: !
|
|
2155
|
+
"data-slot-id": k.key,
|
|
2156
|
+
disabled: !k.available,
|
|
2156
2157
|
"aria-pressed": I,
|
|
2157
|
-
"aria-label":
|
|
2158
|
-
time:
|
|
2158
|
+
"aria-label": c("booking.slotAvailableLabel", {
|
|
2159
|
+
time: k.time
|
|
2159
2160
|
}),
|
|
2160
|
-
onClick: () =>
|
|
2161
|
-
className:
|
|
2162
|
-
children:
|
|
2161
|
+
onClick: () => k.available && r(k),
|
|
2162
|
+
className: Si({ state: N }),
|
|
2163
|
+
children: k.time
|
|
2163
2164
|
},
|
|
2164
|
-
|
|
2165
|
+
k.key
|
|
2165
2166
|
);
|
|
2166
2167
|
})
|
|
2167
2168
|
}
|
|
2168
2169
|
)
|
|
2169
2170
|
]
|
|
2170
2171
|
},
|
|
2171
|
-
|
|
2172
|
+
l
|
|
2172
2173
|
);
|
|
2173
2174
|
})
|
|
2174
2175
|
] });
|
|
2175
2176
|
}
|
|
2176
|
-
const
|
|
2177
|
-
function
|
|
2177
|
+
const Lt = 4;
|
|
2178
|
+
function wi({
|
|
2178
2179
|
availableDates: e,
|
|
2179
2180
|
availableSlots: t,
|
|
2180
2181
|
value: n,
|
|
2181
2182
|
onChange: r,
|
|
2182
2183
|
onDateSelect: i,
|
|
2183
2184
|
onWindowChange: a,
|
|
2184
|
-
loadingDates:
|
|
2185
|
-
loadingSlots:
|
|
2186
|
-
locale:
|
|
2187
|
-
agentIdBase:
|
|
2185
|
+
loadingDates: c,
|
|
2186
|
+
loadingSlots: f,
|
|
2187
|
+
locale: p,
|
|
2188
|
+
agentIdBase: m
|
|
2188
2189
|
}) {
|
|
2189
|
-
const
|
|
2190
|
+
const g = R(() => at(/* @__PURE__ */ new Date()), []), [l, o] = Q(() => {
|
|
2190
2191
|
if (n.date) {
|
|
2191
|
-
const
|
|
2192
|
-
if (!ot(
|
|
2192
|
+
const h = at(le(n.date));
|
|
2193
|
+
if (!ot(g, h)) return h;
|
|
2193
2194
|
}
|
|
2194
2195
|
if (e.length > 0) {
|
|
2195
|
-
const
|
|
2196
|
-
if (ot(
|
|
2196
|
+
const h = at(le(e[0]));
|
|
2197
|
+
if (ot(h, g)) return h;
|
|
2197
2198
|
}
|
|
2198
|
-
return
|
|
2199
|
-
}),
|
|
2200
|
-
() =>
|
|
2201
|
-
[
|
|
2202
|
-
),
|
|
2203
|
-
const $ =
|
|
2204
|
-
id:
|
|
2199
|
+
return g;
|
|
2200
|
+
}), u = R(
|
|
2201
|
+
() => Ut(l, Lt - 1),
|
|
2202
|
+
[l]
|
|
2203
|
+
), k = R(() => Array.from({ length: Lt }, (h, C) => {
|
|
2204
|
+
const $ = Ut(l, C), b = Ze($), F = (t[b] ?? []).map((z) => ({
|
|
2205
|
+
id: z.key,
|
|
2205
2206
|
// SlotGrid formats `start` as a time via Intl.DateTimeFormat —
|
|
2206
2207
|
// compose a full ISO from the column's date + the slot's HH:mm
|
|
2207
2208
|
// so the locale-formatter has a real timestamp to work with.
|
|
2208
|
-
start: `${b}T${
|
|
2209
|
-
available:
|
|
2209
|
+
start: `${b}T${z.time}:00`,
|
|
2210
|
+
available: z.available
|
|
2210
2211
|
}));
|
|
2211
|
-
return { date: b, slots:
|
|
2212
|
-
}), [
|
|
2213
|
-
|
|
2214
|
-
const
|
|
2215
|
-
return ot(
|
|
2212
|
+
return { date: b, slots: F };
|
|
2213
|
+
}), [l, t]), I = ot(l, g), N = !0, M = ue(() => {
|
|
2214
|
+
o((h) => {
|
|
2215
|
+
const C = tn(h, Lt);
|
|
2216
|
+
return ot(g, C) ? g : C;
|
|
2216
2217
|
});
|
|
2217
|
-
}, [
|
|
2218
|
-
|
|
2218
|
+
}, [g]), w = ue(() => {
|
|
2219
|
+
o((h) => Ut(h, Lt));
|
|
2219
2220
|
}, []);
|
|
2220
|
-
|
|
2221
|
+
q(() => {
|
|
2221
2222
|
if (e.length === 0) return;
|
|
2222
|
-
const
|
|
2223
|
-
!ot(
|
|
2224
|
-
const b = at(
|
|
2225
|
-
return !ot(b,
|
|
2226
|
-
}) ||
|
|
2227
|
-
}, [e]),
|
|
2228
|
-
a == null || a(
|
|
2229
|
-
}, [
|
|
2230
|
-
const
|
|
2231
|
-
(
|
|
2232
|
-
const $ = typeof
|
|
2223
|
+
const h = at(le(e[0]));
|
|
2224
|
+
!ot(h, g) || e.some(($) => {
|
|
2225
|
+
const b = at(le($));
|
|
2226
|
+
return !ot(b, u) && !Qs(b, l);
|
|
2227
|
+
}) || o(h);
|
|
2228
|
+
}, [e]), q(() => {
|
|
2229
|
+
a == null || a(Ze(l), Ze(u));
|
|
2230
|
+
}, [l, u, a]);
|
|
2231
|
+
const x = ue(
|
|
2232
|
+
(h, C) => {
|
|
2233
|
+
const $ = typeof C.date == "string" ? C.date : Ze(C.date);
|
|
2233
2234
|
r({
|
|
2234
|
-
...
|
|
2235
|
+
...Is($t(n, $), h.id)
|
|
2235
2236
|
}), i == null || i($);
|
|
2236
2237
|
},
|
|
2237
2238
|
[r, i, n]
|
|
2238
|
-
),
|
|
2239
|
+
), S = c || f ? "loading" : "default", A = k.some((h) => h.slots.length > 0), D = e[0];
|
|
2239
2240
|
return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
2240
|
-
!
|
|
2241
|
-
|
|
2241
|
+
!A && !!D ? /* @__PURE__ */ s(
|
|
2242
|
+
es,
|
|
2242
2243
|
{
|
|
2243
2244
|
nextAvailableDate: D,
|
|
2244
|
-
onJump: () =>
|
|
2245
|
-
locale:
|
|
2245
|
+
onJump: () => o(at(le(D))),
|
|
2246
|
+
locale: p
|
|
2246
2247
|
}
|
|
2247
2248
|
) : null,
|
|
2248
2249
|
/* @__PURE__ */ s(
|
|
2249
|
-
|
|
2250
|
+
Zs,
|
|
2250
2251
|
{
|
|
2251
|
-
id:
|
|
2252
|
-
days:
|
|
2253
|
-
state:
|
|
2252
|
+
id: m ? `${m}-slots` : void 0,
|
|
2253
|
+
days: k,
|
|
2254
|
+
state: S,
|
|
2254
2255
|
selectedSlotId: n.slotKey,
|
|
2255
2256
|
maxInitialSlotsPerDay: 6,
|
|
2256
|
-
locale:
|
|
2257
|
+
locale: p,
|
|
2257
2258
|
hasPrevious: I,
|
|
2258
|
-
hasNext:
|
|
2259
|
-
onSlotSelect:
|
|
2260
|
-
onPreviousDays:
|
|
2259
|
+
hasNext: N,
|
|
2260
|
+
onSlotSelect: x,
|
|
2261
|
+
onPreviousDays: M,
|
|
2261
2262
|
onNextDays: w
|
|
2262
2263
|
}
|
|
2263
2264
|
)
|
|
2264
2265
|
] });
|
|
2265
2266
|
}
|
|
2266
|
-
function
|
|
2267
|
+
function Ts(e) {
|
|
2267
2268
|
const {
|
|
2268
2269
|
inputs: t,
|
|
2269
2270
|
value: n,
|
|
2270
2271
|
onChange: r,
|
|
2271
2272
|
onDateSelect: i,
|
|
2272
2273
|
onWindowChange: a,
|
|
2273
|
-
loadingDates:
|
|
2274
|
-
loadingSlots:
|
|
2275
|
-
locale:
|
|
2276
|
-
datePickerStyle:
|
|
2277
|
-
agentIdBase:
|
|
2274
|
+
loadingDates: c,
|
|
2275
|
+
loadingSlots: f,
|
|
2276
|
+
locale: p,
|
|
2277
|
+
datePickerStyle: m,
|
|
2278
|
+
agentIdBase: g
|
|
2278
2279
|
} = e;
|
|
2279
|
-
return
|
|
2280
|
-
|
|
2280
|
+
return m === "four-day-grid" ? /* @__PURE__ */ s(
|
|
2281
|
+
wi,
|
|
2281
2282
|
{
|
|
2282
2283
|
availableDates: t.availableDates,
|
|
2283
2284
|
availableSlots: t.availableSlots,
|
|
@@ -2285,47 +2286,47 @@ function As(e) {
|
|
|
2285
2286
|
onChange: r,
|
|
2286
2287
|
onDateSelect: i,
|
|
2287
2288
|
onWindowChange: a,
|
|
2288
|
-
loadingDates:
|
|
2289
|
-
loadingSlots:
|
|
2290
|
-
locale:
|
|
2291
|
-
agentIdBase:
|
|
2289
|
+
loadingDates: c,
|
|
2290
|
+
loadingSlots: f,
|
|
2291
|
+
locale: p,
|
|
2292
|
+
agentIdBase: g
|
|
2292
2293
|
}
|
|
2293
2294
|
) : /* @__PURE__ */ s(
|
|
2294
|
-
|
|
2295
|
+
bi,
|
|
2295
2296
|
{
|
|
2296
2297
|
availableDates: t.availableDates,
|
|
2297
2298
|
selectedDate: n.date,
|
|
2298
|
-
onSelectDate: (
|
|
2299
|
-
r(
|
|
2299
|
+
onSelectDate: (l) => {
|
|
2300
|
+
r($t(n, l)), i == null || i(l);
|
|
2300
2301
|
},
|
|
2301
|
-
locale:
|
|
2302
|
-
loading:
|
|
2302
|
+
locale: p,
|
|
2303
|
+
loading: c ?? f
|
|
2303
2304
|
}
|
|
2304
2305
|
);
|
|
2305
2306
|
}
|
|
2306
|
-
function
|
|
2307
|
-
const { inputs: t, value: n, onChange: r, loadingSlots: i, locale: a, datePickerStyle:
|
|
2308
|
-
return
|
|
2309
|
-
|
|
2307
|
+
function Ds(e) {
|
|
2308
|
+
const { inputs: t, value: n, onChange: r, loadingSlots: i, locale: a, datePickerStyle: c } = e;
|
|
2309
|
+
return c === "four-day-grid" || !n.date ? null : /* @__PURE__ */ s(
|
|
2310
|
+
Ni,
|
|
2310
2311
|
{
|
|
2311
2312
|
date: n.date,
|
|
2312
2313
|
slots: t.availableSlots[n.date] ?? [],
|
|
2313
2314
|
selectedSlotKey: n.slotKey,
|
|
2314
|
-
onSelect: (
|
|
2315
|
+
onSelect: (f) => r(Is(n, f.key)),
|
|
2315
2316
|
loading: i,
|
|
2316
2317
|
locale: a
|
|
2317
2318
|
}
|
|
2318
2319
|
);
|
|
2319
2320
|
}
|
|
2320
|
-
function
|
|
2321
|
-
const { t: n } =
|
|
2321
|
+
function Os({ value: e, onChange: t }) {
|
|
2322
|
+
const { t: n } = G("ui"), r = [
|
|
2322
2323
|
{ value: "private", label: n("booking.insurance.private") },
|
|
2323
2324
|
{ value: "public", label: n("booking.insurance.public") }
|
|
2324
2325
|
];
|
|
2325
2326
|
return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
2326
2327
|
/* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: n("booking.insurance.heading") }),
|
|
2327
2328
|
/* @__PURE__ */ s(
|
|
2328
|
-
|
|
2329
|
+
Vt,
|
|
2329
2330
|
{
|
|
2330
2331
|
options: r,
|
|
2331
2332
|
value: e ?? "",
|
|
@@ -2338,7 +2339,7 @@ function Ds({ value: e, onChange: t }) {
|
|
|
2338
2339
|
)
|
|
2339
2340
|
] });
|
|
2340
2341
|
}
|
|
2341
|
-
function
|
|
2342
|
+
function Ms({
|
|
2342
2343
|
specialties: e,
|
|
2343
2344
|
value: t,
|
|
2344
2345
|
valueIds: n,
|
|
@@ -2346,129 +2347,131 @@ function Os({
|
|
|
2346
2347
|
onChangeIds: i,
|
|
2347
2348
|
pickerStyle: a = "select"
|
|
2348
2349
|
}) {
|
|
2349
|
-
const { t:
|
|
2350
|
-
value:
|
|
2351
|
-
label:
|
|
2352
|
-
})),
|
|
2350
|
+
const { t: c } = G("ui"), f = e.map((m) => ({
|
|
2351
|
+
value: m.id,
|
|
2352
|
+
label: m.label
|
|
2353
|
+
})), p = /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: c("booking.specialty.heading") });
|
|
2353
2354
|
return a === "multi-select" && i ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
2354
|
-
|
|
2355
|
+
p,
|
|
2355
2356
|
/* @__PURE__ */ s(
|
|
2356
|
-
|
|
2357
|
+
Zt,
|
|
2357
2358
|
{
|
|
2358
|
-
options:
|
|
2359
|
+
options: f,
|
|
2359
2360
|
value: n ?? [],
|
|
2360
2361
|
onChange: i,
|
|
2361
|
-
placeholder:
|
|
2362
|
-
"aria-label":
|
|
2362
|
+
placeholder: c("booking.specialty.placeholder"),
|
|
2363
|
+
"aria-label": c("booking.specialty.heading"),
|
|
2363
2364
|
allowClear: !0
|
|
2364
2365
|
}
|
|
2365
2366
|
)
|
|
2366
2367
|
] }) : a === "combobox" ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
2367
|
-
|
|
2368
|
+
p,
|
|
2368
2369
|
/* @__PURE__ */ s(
|
|
2369
|
-
|
|
2370
|
+
Yt,
|
|
2370
2371
|
{
|
|
2371
|
-
options:
|
|
2372
|
+
options: f,
|
|
2372
2373
|
value: t ?? "",
|
|
2373
|
-
onValueChange: (
|
|
2374
|
-
placeholder:
|
|
2375
|
-
"aria-label":
|
|
2374
|
+
onValueChange: (m) => r(m === "" ? "" : m),
|
|
2375
|
+
placeholder: c("booking.specialty.placeholder"),
|
|
2376
|
+
"aria-label": c("booking.specialty.heading"),
|
|
2376
2377
|
clearable: !0
|
|
2377
2378
|
}
|
|
2378
2379
|
)
|
|
2379
2380
|
] }) : /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
2380
|
-
|
|
2381
|
+
p,
|
|
2381
2382
|
/* @__PURE__ */ s(
|
|
2382
|
-
|
|
2383
|
+
Vt,
|
|
2383
2384
|
{
|
|
2384
|
-
options:
|
|
2385
|
+
options: f,
|
|
2385
2386
|
value: t ?? "",
|
|
2386
|
-
onValueChange: (
|
|
2387
|
-
placeholder:
|
|
2388
|
-
"aria-label":
|
|
2387
|
+
onValueChange: (m) => r(m),
|
|
2388
|
+
placeholder: c("booking.specialty.placeholder"),
|
|
2389
|
+
"aria-label": c("booking.specialty.heading")
|
|
2389
2390
|
}
|
|
2390
2391
|
)
|
|
2391
2392
|
] });
|
|
2392
2393
|
}
|
|
2393
|
-
function
|
|
2394
|
+
function Fs({
|
|
2394
2395
|
services: e,
|
|
2395
2396
|
value: t,
|
|
2396
2397
|
valueIds: n,
|
|
2397
2398
|
onChange: r,
|
|
2398
2399
|
onChangeIds: i,
|
|
2399
2400
|
pickerStyle: a,
|
|
2400
|
-
compact:
|
|
2401
|
+
compact: c,
|
|
2402
|
+
showDuration: f
|
|
2401
2403
|
}) {
|
|
2402
|
-
const { t:
|
|
2403
|
-
const
|
|
2404
|
-
amount:
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2404
|
+
const { t: p, i18n: m } = G("ui"), g = a ?? (c ? "select" : "cards"), l = e.map((u) => {
|
|
2405
|
+
const k = Qt(u), I = u.payment ? k ? p(`booking.payment.${k.kind}`, {
|
|
2406
|
+
amount: yt(
|
|
2407
|
+
k.amountCents,
|
|
2408
|
+
k.currencyCode,
|
|
2409
|
+
m.language
|
|
2408
2410
|
)
|
|
2409
|
-
}) :
|
|
2410
|
-
return
|
|
2411
|
-
value:
|
|
2412
|
-
label:
|
|
2413
|
-
endContent: /* @__PURE__ */ s(
|
|
2411
|
+
}) : p("booking.payment.unavailable") : As(u);
|
|
2412
|
+
return I ? {
|
|
2413
|
+
value: u.id,
|
|
2414
|
+
label: u.label,
|
|
2415
|
+
endContent: /* @__PURE__ */ s(ms, { variant: "accentSoft", size: "lg", children: I })
|
|
2414
2416
|
} : {
|
|
2415
|
-
value:
|
|
2416
|
-
label: `${
|
|
2417
|
-
minutes:
|
|
2418
|
-
})}`
|
|
2417
|
+
value: u.id,
|
|
2418
|
+
label: f ? `${u.label} · ${p("booking.serviceSummary", {
|
|
2419
|
+
minutes: u.durationMin
|
|
2420
|
+
})}` : u.label
|
|
2419
2421
|
};
|
|
2420
|
-
}), o = /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children:
|
|
2421
|
-
return
|
|
2422
|
+
}), o = /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: p("booking.service.heading") });
|
|
2423
|
+
return g === "multi-select" && i ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
2422
2424
|
o,
|
|
2423
2425
|
/* @__PURE__ */ s(
|
|
2424
|
-
|
|
2426
|
+
Zt,
|
|
2425
2427
|
{
|
|
2426
|
-
options:
|
|
2428
|
+
options: l,
|
|
2427
2429
|
value: n ?? [],
|
|
2428
2430
|
onChange: i,
|
|
2429
|
-
placeholder:
|
|
2430
|
-
"aria-label":
|
|
2431
|
+
placeholder: p("booking.service.placeholder"),
|
|
2432
|
+
"aria-label": p("booking.service.heading"),
|
|
2431
2433
|
allowClear: !0
|
|
2432
2434
|
}
|
|
2433
2435
|
)
|
|
2434
|
-
] }) :
|
|
2436
|
+
] }) : g === "combobox" ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
2435
2437
|
o,
|
|
2436
2438
|
/* @__PURE__ */ s(
|
|
2437
|
-
|
|
2439
|
+
Yt,
|
|
2438
2440
|
{
|
|
2439
|
-
options:
|
|
2441
|
+
options: l,
|
|
2440
2442
|
value: t ?? "",
|
|
2441
|
-
onValueChange: (
|
|
2442
|
-
placeholder:
|
|
2443
|
-
"aria-label":
|
|
2443
|
+
onValueChange: (u) => r(u === "" ? "" : u),
|
|
2444
|
+
placeholder: p("booking.service.placeholder"),
|
|
2445
|
+
"aria-label": p("booking.service.heading"),
|
|
2444
2446
|
clearable: !0
|
|
2445
2447
|
}
|
|
2446
2448
|
)
|
|
2447
|
-
] }) :
|
|
2449
|
+
] }) : g === "select" ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
2448
2450
|
o,
|
|
2449
2451
|
/* @__PURE__ */ s(
|
|
2450
|
-
|
|
2452
|
+
Vt,
|
|
2451
2453
|
{
|
|
2452
|
-
options:
|
|
2454
|
+
options: l,
|
|
2453
2455
|
value: t ?? "",
|
|
2454
|
-
onValueChange: (
|
|
2455
|
-
placeholder:
|
|
2456
|
-
"aria-label":
|
|
2456
|
+
onValueChange: (u) => r(u),
|
|
2457
|
+
placeholder: p("booking.service.placeholder"),
|
|
2458
|
+
"aria-label": p("booking.service.heading")
|
|
2457
2459
|
}
|
|
2458
2460
|
)
|
|
2459
2461
|
] }) : /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
2460
2462
|
o,
|
|
2461
2463
|
/* @__PURE__ */ s(
|
|
2462
|
-
|
|
2464
|
+
ki,
|
|
2463
2465
|
{
|
|
2464
2466
|
services: e,
|
|
2465
2467
|
selectedServiceId: t,
|
|
2466
|
-
onSelect: r
|
|
2468
|
+
onSelect: r,
|
|
2469
|
+
showDuration: f
|
|
2467
2470
|
}
|
|
2468
2471
|
)
|
|
2469
2472
|
] });
|
|
2470
2473
|
}
|
|
2471
|
-
function
|
|
2474
|
+
function _s({
|
|
2472
2475
|
operators: e,
|
|
2473
2476
|
value: t,
|
|
2474
2477
|
valueIds: n,
|
|
@@ -2476,127 +2479,127 @@ function Fs({
|
|
|
2476
2479
|
onChangeIds: i,
|
|
2477
2480
|
pickerStyle: a = "select"
|
|
2478
2481
|
}) {
|
|
2479
|
-
const { t:
|
|
2482
|
+
const { t: c } = G("ui"), f = /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: c("booking.operator.heading") });
|
|
2480
2483
|
if (a === "multi-select" && i) {
|
|
2481
|
-
const
|
|
2482
|
-
value:
|
|
2483
|
-
label:
|
|
2484
|
+
const m = e.map((g) => ({
|
|
2485
|
+
value: g.id,
|
|
2486
|
+
label: g.name
|
|
2484
2487
|
}));
|
|
2485
2488
|
return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
2486
|
-
|
|
2489
|
+
f,
|
|
2487
2490
|
/* @__PURE__ */ s(
|
|
2488
|
-
|
|
2491
|
+
Zt,
|
|
2489
2492
|
{
|
|
2490
|
-
options:
|
|
2493
|
+
options: m,
|
|
2491
2494
|
value: n ?? [],
|
|
2492
2495
|
onChange: i,
|
|
2493
|
-
placeholder:
|
|
2494
|
-
"aria-label":
|
|
2496
|
+
placeholder: c("booking.operator.placeholder"),
|
|
2497
|
+
"aria-label": c("booking.operator.heading"),
|
|
2495
2498
|
allowClear: !0
|
|
2496
2499
|
}
|
|
2497
2500
|
)
|
|
2498
2501
|
] });
|
|
2499
2502
|
}
|
|
2500
|
-
const
|
|
2501
|
-
{ value:
|
|
2502
|
-
...e.map((
|
|
2503
|
+
const p = [
|
|
2504
|
+
{ value: Ce, label: c("booking.operator.all") },
|
|
2505
|
+
...e.map((m) => ({ value: m.id, label: m.name }))
|
|
2503
2506
|
];
|
|
2504
2507
|
return a === "combobox" ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
2505
|
-
|
|
2508
|
+
f,
|
|
2506
2509
|
/* @__PURE__ */ s(
|
|
2507
|
-
|
|
2510
|
+
Yt,
|
|
2508
2511
|
{
|
|
2509
|
-
options:
|
|
2510
|
-
value: t ??
|
|
2511
|
-
onValueChange: (
|
|
2512
|
-
placeholder:
|
|
2513
|
-
"aria-label":
|
|
2512
|
+
options: p,
|
|
2513
|
+
value: t ?? Ce,
|
|
2514
|
+
onValueChange: (m) => r(m === "" ? Ce : m),
|
|
2515
|
+
placeholder: c("booking.operator.placeholder"),
|
|
2516
|
+
"aria-label": c("booking.operator.heading"),
|
|
2514
2517
|
clearable: !0
|
|
2515
2518
|
}
|
|
2516
2519
|
)
|
|
2517
2520
|
] }) : /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
2518
|
-
|
|
2521
|
+
f,
|
|
2519
2522
|
/* @__PURE__ */ s(
|
|
2520
|
-
|
|
2523
|
+
Vt,
|
|
2521
2524
|
{
|
|
2522
|
-
options:
|
|
2523
|
-
value: t ??
|
|
2524
|
-
onValueChange: (
|
|
2525
|
-
placeholder:
|
|
2526
|
-
"aria-label":
|
|
2525
|
+
options: p,
|
|
2526
|
+
value: t ?? Ce,
|
|
2527
|
+
onValueChange: (m) => r(m),
|
|
2528
|
+
placeholder: c("booking.operator.placeholder"),
|
|
2529
|
+
"aria-label": c("booking.operator.heading")
|
|
2527
2530
|
}
|
|
2528
2531
|
)
|
|
2529
2532
|
] });
|
|
2530
2533
|
}
|
|
2531
|
-
function
|
|
2534
|
+
function Ls({
|
|
2532
2535
|
customSlot: e
|
|
2533
2536
|
}) {
|
|
2534
|
-
const { t } =
|
|
2535
|
-
return e ? /* @__PURE__ */ s(
|
|
2536
|
-
/* @__PURE__ */ s(
|
|
2537
|
-
/* @__PURE__ */ s(
|
|
2537
|
+
const { t } = G("ui");
|
|
2538
|
+
return e ? /* @__PURE__ */ s(ne, { children: e }) : /* @__PURE__ */ v(ee, { variant: "warning", children: [
|
|
2539
|
+
/* @__PURE__ */ s(ee.Title, { as: "h4", children: t("booking.onboardingIncomplete.title") }),
|
|
2540
|
+
/* @__PURE__ */ s(ee.Description, { children: t("booking.onboardingIncomplete.description") })
|
|
2538
2541
|
] });
|
|
2539
2542
|
}
|
|
2540
|
-
function
|
|
2543
|
+
function es({
|
|
2541
2544
|
nextAvailableDate: e,
|
|
2542
2545
|
onJump: t,
|
|
2543
2546
|
locale: n
|
|
2544
2547
|
}) {
|
|
2545
|
-
const { t: r } =
|
|
2548
|
+
const { t: r } = G("ui"), i = R(() => {
|
|
2546
2549
|
try {
|
|
2547
2550
|
return new Intl.DateTimeFormat(n, { dateStyle: "long" }).format(
|
|
2548
|
-
|
|
2551
|
+
le(e)
|
|
2549
2552
|
);
|
|
2550
2553
|
} catch {
|
|
2551
2554
|
return e;
|
|
2552
2555
|
}
|
|
2553
2556
|
}, [e, n]);
|
|
2554
|
-
return /* @__PURE__ */ v(
|
|
2555
|
-
/* @__PURE__ */ s(
|
|
2556
|
-
/* @__PURE__ */ s(
|
|
2557
|
+
return /* @__PURE__ */ v(ee, { variant: "info", children: [
|
|
2558
|
+
/* @__PURE__ */ s(ee.Description, { children: r("booking.nextAvailable.description", { date: i }) }),
|
|
2559
|
+
/* @__PURE__ */ s(ee.Action, { children: /* @__PURE__ */ s(Xe, { intent: "secondary", size: "sm", onClick: t, children: r("booking.nextAvailable.cta") }) })
|
|
2557
2560
|
] });
|
|
2558
2561
|
}
|
|
2559
|
-
function
|
|
2562
|
+
function Ci({
|
|
2560
2563
|
payment: e,
|
|
2561
2564
|
snapshot: t,
|
|
2562
2565
|
operators: n,
|
|
2563
2566
|
specialties: r,
|
|
2564
2567
|
services: i,
|
|
2565
2568
|
locale: a,
|
|
2566
|
-
mode:
|
|
2567
|
-
showModify:
|
|
2568
|
-
onReset:
|
|
2569
|
-
onModify:
|
|
2570
|
-
focusWasLost:
|
|
2569
|
+
mode: c,
|
|
2570
|
+
showModify: f,
|
|
2571
|
+
onReset: p,
|
|
2572
|
+
onModify: m,
|
|
2573
|
+
focusWasLost: g
|
|
2571
2574
|
}) {
|
|
2572
|
-
const { t:
|
|
2573
|
-
|
|
2574
|
-
const
|
|
2575
|
-
!e || !
|
|
2575
|
+
const { t: l } = G("ui"), o = E(null);
|
|
2576
|
+
q(() => {
|
|
2577
|
+
const A = o.current, D = document.activeElement, T = A == null ? void 0 : A.closest('[data-component="booking"]');
|
|
2578
|
+
!e || !A || (D && (T != null && T.contains(D)) || g()) && A.focus();
|
|
2576
2579
|
}, []);
|
|
2577
|
-
const
|
|
2578
|
-
(
|
|
2579
|
-
), I = e ?
|
|
2580
|
-
|
|
2580
|
+
const k = (t.details.confirmationChannels ?? ["email"]).map(
|
|
2581
|
+
(A) => l(`booking.confirmation.channel.${A}`)
|
|
2582
|
+
), I = e ? yt(e.amountCents, e.currencyCode, a) : "", N = e ? l(
|
|
2583
|
+
c === "demo" ? "booking.payment.paidDemo" : "booking.payment.paidBody",
|
|
2581
2584
|
{ amount: I }
|
|
2582
|
-
) :
|
|
2583
|
-
channels:
|
|
2584
|
-
}) :
|
|
2585
|
+
) : c === "demo" ? l("booking.success.descriptionDemo") : k.length > 1 ? l("booking.success.descriptionMultiple", {
|
|
2586
|
+
channels: k.join(" · ")
|
|
2587
|
+
}) : l("booking.success.descriptionSingle", { channel: k[0] }), M = R(() => {
|
|
2585
2588
|
if (t.date)
|
|
2586
2589
|
try {
|
|
2587
2590
|
return new Intl.DateTimeFormat(a, {
|
|
2588
2591
|
weekday: "long",
|
|
2589
2592
|
day: "numeric",
|
|
2590
2593
|
month: "long"
|
|
2591
|
-
}).format(
|
|
2594
|
+
}).format(le(t.date));
|
|
2592
2595
|
} catch {
|
|
2593
2596
|
return t.date;
|
|
2594
2597
|
}
|
|
2595
|
-
}, [t.date, a]), w =
|
|
2596
|
-
const D = (t.operatorIds && t.operatorIds.length > 0 ? t.operatorIds : t.operatorId ? [t.operatorId] : []).filter((
|
|
2597
|
-
var
|
|
2598
|
-
return (
|
|
2599
|
-
}).filter((
|
|
2598
|
+
}, [t.date, a]), w = R(() => {
|
|
2599
|
+
const D = (t.operatorIds && t.operatorIds.length > 0 ? t.operatorIds : t.operatorId ? [t.operatorId] : []).filter((T) => T !== Ce).map((T) => {
|
|
2600
|
+
var h;
|
|
2601
|
+
return (h = n.find((C) => C.id === T)) == null ? void 0 : h.name;
|
|
2602
|
+
}).filter((T) => T !== void 0);
|
|
2600
2603
|
if (D.length === 0) return "";
|
|
2601
2604
|
try {
|
|
2602
2605
|
return new Intl.ListFormat(a === "en" ? "en-GB" : a, {
|
|
@@ -2606,64 +2609,64 @@ function wi({
|
|
|
2606
2609
|
} catch {
|
|
2607
2610
|
return D.join(", ");
|
|
2608
2611
|
}
|
|
2609
|
-
}, [t.operatorIds, t.operatorId, n, a]),
|
|
2612
|
+
}, [t.operatorIds, t.operatorId, n, a]), x = t.specialtyId ? r.find((A) => A.id === t.specialtyId) : void 0, S = t.serviceId ? i.find((A) => A.id === t.serviceId) : void 0;
|
|
2610
2613
|
return /* @__PURE__ */ v(
|
|
2611
2614
|
"div",
|
|
2612
2615
|
{
|
|
2613
2616
|
"data-component": "booking-success",
|
|
2614
2617
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
2615
2618
|
children: [
|
|
2616
|
-
/* @__PURE__ */ v(
|
|
2619
|
+
/* @__PURE__ */ v(ee, { variant: "success", children: [
|
|
2617
2620
|
/* @__PURE__ */ s(
|
|
2618
|
-
|
|
2621
|
+
ee.Title,
|
|
2619
2622
|
{
|
|
2620
2623
|
as: "h3",
|
|
2621
|
-
ref:
|
|
2624
|
+
ref: o,
|
|
2622
2625
|
tabIndex: e ? -1 : void 0,
|
|
2623
|
-
className: e ?
|
|
2624
|
-
children:
|
|
2625
|
-
e ?
|
|
2626
|
+
className: e ? Rt : void 0,
|
|
2627
|
+
children: l(
|
|
2628
|
+
e ? c === "demo" ? "booking.payment.paidDemoTitle" : "booking.payment.paidTitle" : "booking.success.heading"
|
|
2626
2629
|
)
|
|
2627
2630
|
}
|
|
2628
2631
|
),
|
|
2629
|
-
/* @__PURE__ */ s(
|
|
2632
|
+
/* @__PURE__ */ s(ee.Description, { children: N })
|
|
2630
2633
|
] }),
|
|
2631
2634
|
/* @__PURE__ */ s("div", { className: "ds:rounded-[var(--radius-md)] ds:bg-[var(--secondary)] ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ v("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: [
|
|
2632
|
-
e &&
|
|
2633
|
-
/* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children:
|
|
2635
|
+
e && c !== "demo" ? /* @__PURE__ */ v(ne, { children: [
|
|
2636
|
+
/* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: l("booking.payment.summaryPaid") }),
|
|
2634
2637
|
/* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: I })
|
|
2635
2638
|
] }) : null,
|
|
2636
|
-
|
|
2637
|
-
/* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children:
|
|
2638
|
-
/* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children:
|
|
2639
|
+
x ? /* @__PURE__ */ v(ne, { children: [
|
|
2640
|
+
/* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: l("booking.success.summarySpecialty") }),
|
|
2641
|
+
/* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: x.label })
|
|
2639
2642
|
] }) : null,
|
|
2640
|
-
|
|
2641
|
-
/* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children:
|
|
2642
|
-
/* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children:
|
|
2643
|
+
S ? /* @__PURE__ */ v(ne, { children: [
|
|
2644
|
+
/* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: l("booking.success.summaryService") }),
|
|
2645
|
+
/* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: S.label })
|
|
2643
2646
|
] }) : null,
|
|
2644
|
-
|
|
2645
|
-
/* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children:
|
|
2646
|
-
/* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children:
|
|
2647
|
+
M ? /* @__PURE__ */ v(ne, { children: [
|
|
2648
|
+
/* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: l("booking.success.summaryDate") }),
|
|
2649
|
+
/* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: M })
|
|
2647
2650
|
] }) : null,
|
|
2648
|
-
/* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children:
|
|
2651
|
+
/* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: l("booking.success.summaryTime") }),
|
|
2649
2652
|
/* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: t.slot.time }),
|
|
2650
|
-
w ? /* @__PURE__ */ v(
|
|
2651
|
-
/* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children:
|
|
2653
|
+
w ? /* @__PURE__ */ v(ne, { children: [
|
|
2654
|
+
/* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: l("booking.success.summaryProvider") }),
|
|
2652
2655
|
/* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: w })
|
|
2653
2656
|
] }) : null
|
|
2654
2657
|
] }) }),
|
|
2655
2658
|
/* @__PURE__ */ v("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
2656
|
-
/* @__PURE__ */ s(
|
|
2657
|
-
|
|
2659
|
+
/* @__PURE__ */ s(Xe, { intent: "secondary", size: "md", onClick: p, children: l("booking.success.bookAnother") }),
|
|
2660
|
+
f ? /* @__PURE__ */ s(Xe, { intent: "ghost", size: "md", onClick: m, children: l("booking.success.modifyBooking") }) : null
|
|
2658
2661
|
] })
|
|
2659
2662
|
]
|
|
2660
2663
|
}
|
|
2661
2664
|
);
|
|
2662
2665
|
}
|
|
2663
|
-
function
|
|
2664
|
-
const { t } =
|
|
2665
|
-
return e ? /* @__PURE__ */ s(
|
|
2666
|
-
|
|
2666
|
+
function Bs({ customSlot: e }) {
|
|
2667
|
+
const { t } = G("ui");
|
|
2668
|
+
return e ? /* @__PURE__ */ s(ne, { children: e }) : /* @__PURE__ */ s(
|
|
2669
|
+
fs,
|
|
2667
2670
|
{
|
|
2668
2671
|
variant: "no-results",
|
|
2669
2672
|
title: t("booking.emptyServices.title"),
|
|
@@ -2671,14 +2674,14 @@ function Ls({ customSlot: e }) {
|
|
|
2671
2674
|
}
|
|
2672
2675
|
);
|
|
2673
2676
|
}
|
|
2674
|
-
const
|
|
2677
|
+
const Es = "data-booking-step-active", Ai = `[${Es}]`, Rt = [
|
|
2675
2678
|
"ds:focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
2676
2679
|
"ds:focus-visible:outline-solid",
|
|
2677
2680
|
"ds:focus-visible:outline-[var(--ring)]",
|
|
2678
2681
|
"ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
2679
2682
|
"ds:forced-colors:focus-visible:outline-[CanvasText]"
|
|
2680
2683
|
].join(" ");
|
|
2681
|
-
function
|
|
2684
|
+
function U({
|
|
2682
2685
|
step: e,
|
|
2683
2686
|
active: t,
|
|
2684
2687
|
className: n,
|
|
@@ -2690,251 +2693,255 @@ function j({
|
|
|
2690
2693
|
{
|
|
2691
2694
|
id: r,
|
|
2692
2695
|
"data-booking-step": String(e),
|
|
2693
|
-
...t ? { [
|
|
2696
|
+
...t ? { [Es]: "" } : null,
|
|
2694
2697
|
tabIndex: -1,
|
|
2695
|
-
className: n ? `${n} ${
|
|
2698
|
+
className: n ? `${n} ${Rt}` : Rt,
|
|
2696
2699
|
children: i
|
|
2697
2700
|
}
|
|
2698
2701
|
);
|
|
2699
2702
|
}
|
|
2700
|
-
function
|
|
2703
|
+
function ts(e, t) {
|
|
2701
2704
|
return t === "four-day-grid" ? e.filter((n) => n !== 6) : e;
|
|
2702
2705
|
}
|
|
2703
|
-
function
|
|
2706
|
+
function Ti(e) {
|
|
2704
2707
|
const {
|
|
2705
2708
|
cascade: t,
|
|
2706
2709
|
inputs: n,
|
|
2707
2710
|
value: r,
|
|
2708
2711
|
onChange: i,
|
|
2709
2712
|
onSubmit: a,
|
|
2710
|
-
emptyServicesSlot:
|
|
2711
|
-
onboardingIncompleteSlot:
|
|
2712
|
-
loadingDates:
|
|
2713
|
-
loadingSlots:
|
|
2714
|
-
onDateSelect:
|
|
2715
|
-
onWindowChange:
|
|
2716
|
-
datePickerStyle:
|
|
2717
|
-
specialtyPickerStyle:
|
|
2718
|
-
servicePickerStyle:
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2713
|
+
emptyServicesSlot: c,
|
|
2714
|
+
onboardingIncompleteSlot: f,
|
|
2715
|
+
loadingDates: p,
|
|
2716
|
+
loadingSlots: m,
|
|
2717
|
+
onDateSelect: g,
|
|
2718
|
+
onWindowChange: l,
|
|
2719
|
+
datePickerStyle: o,
|
|
2720
|
+
specialtyPickerStyle: u,
|
|
2721
|
+
servicePickerStyle: k,
|
|
2722
|
+
showServiceDuration: I,
|
|
2723
|
+
operatorPickerStyle: N,
|
|
2724
|
+
submitting: M,
|
|
2725
|
+
locale: w,
|
|
2726
|
+
detailsProps: x,
|
|
2723
2727
|
agentIdBase: S,
|
|
2724
|
-
activeStep:
|
|
2725
|
-
} = e, { t:
|
|
2726
|
-
step:
|
|
2727
|
-
active:
|
|
2728
|
-
className:
|
|
2728
|
+
activeStep: A
|
|
2729
|
+
} = e, { t: D } = G("ui"), T = ct(A, o), h = (C, $) => ({
|
|
2730
|
+
step: C,
|
|
2731
|
+
active: C === T,
|
|
2732
|
+
className: $
|
|
2729
2733
|
});
|
|
2730
2734
|
return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
2731
|
-
t.gates.insurance ? /* @__PURE__ */ s(
|
|
2732
|
-
|
|
2735
|
+
t.gates.insurance ? /* @__PURE__ */ s(U, { ...h(1), children: /* @__PURE__ */ s(
|
|
2736
|
+
Os,
|
|
2733
2737
|
{
|
|
2734
2738
|
value: r.insuranceType,
|
|
2735
|
-
onChange: (
|
|
2739
|
+
onChange: (C) => i(hs(r, C))
|
|
2736
2740
|
}
|
|
2737
2741
|
) }) : null,
|
|
2738
|
-
t.gates.specialty ? /* @__PURE__ */ s(
|
|
2739
|
-
|
|
2742
|
+
t.gates.specialty ? /* @__PURE__ */ s(U, { ...h(2), children: /* @__PURE__ */ s(
|
|
2743
|
+
Ms,
|
|
2740
2744
|
{
|
|
2741
2745
|
specialties: t.filtered.specialties,
|
|
2742
2746
|
value: r.specialtyId,
|
|
2743
2747
|
valueIds: r.specialtyIds,
|
|
2744
|
-
onChange: (
|
|
2745
|
-
onChangeIds: (
|
|
2746
|
-
pickerStyle:
|
|
2748
|
+
onChange: (C) => i(vs(r, C)),
|
|
2749
|
+
onChangeIds: (C) => i(bs(r, C)),
|
|
2750
|
+
pickerStyle: u
|
|
2747
2751
|
}
|
|
2748
2752
|
) }) : null,
|
|
2749
|
-
t.gates.service ? /* @__PURE__ */ s(
|
|
2750
|
-
|
|
2753
|
+
t.gates.service ? /* @__PURE__ */ s(U, { ...h(3), children: t.filtered.services.length === 0 ? /* @__PURE__ */ s(Bs, { customSlot: c }) : /* @__PURE__ */ s(
|
|
2754
|
+
Fs,
|
|
2751
2755
|
{
|
|
2752
2756
|
services: t.filtered.services,
|
|
2753
2757
|
value: r.serviceId,
|
|
2754
2758
|
valueIds: r.serviceIds,
|
|
2755
|
-
onChange: (
|
|
2756
|
-
onChangeIds: (
|
|
2757
|
-
pickerStyle:
|
|
2759
|
+
onChange: (C) => i(ys(r, C)),
|
|
2760
|
+
onChangeIds: (C) => i(ks(r, C)),
|
|
2761
|
+
pickerStyle: k,
|
|
2762
|
+
showDuration: I
|
|
2758
2763
|
}
|
|
2759
2764
|
) }) : null,
|
|
2760
|
-
t.gates.onboardingIncomplete ? /* @__PURE__ */ s(
|
|
2761
|
-
t.gates.operator ? /* @__PURE__ */ s(
|
|
2762
|
-
|
|
2765
|
+
t.gates.onboardingIncomplete ? /* @__PURE__ */ s(Ls, { customSlot: f }) : null,
|
|
2766
|
+
t.gates.operator ? /* @__PURE__ */ s(U, { ...h(4), children: /* @__PURE__ */ s(
|
|
2767
|
+
_s,
|
|
2763
2768
|
{
|
|
2764
2769
|
operators: t.filtered.operators,
|
|
2765
2770
|
value: r.operatorId,
|
|
2766
2771
|
valueIds: r.operatorIds,
|
|
2767
|
-
onChange: (
|
|
2768
|
-
onChangeIds: (
|
|
2769
|
-
pickerStyle:
|
|
2772
|
+
onChange: (C) => i(Ss(r, C)),
|
|
2773
|
+
onChangeIds: (C) => i(xs(r, C)),
|
|
2774
|
+
pickerStyle: N
|
|
2770
2775
|
}
|
|
2771
2776
|
) }) : null,
|
|
2772
2777
|
t.gates.date ? /* @__PURE__ */ v(
|
|
2773
|
-
|
|
2778
|
+
U,
|
|
2774
2779
|
{
|
|
2775
|
-
...
|
|
2780
|
+
...h(5, "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]"),
|
|
2776
2781
|
children: [
|
|
2777
|
-
/* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children:
|
|
2782
|
+
/* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: D("booking.date.heading") }),
|
|
2778
2783
|
n.availableDates.length === 0 && n.nextAvailableDate ? /* @__PURE__ */ s(
|
|
2779
|
-
|
|
2784
|
+
es,
|
|
2780
2785
|
{
|
|
2781
2786
|
nextAvailableDate: n.nextAvailableDate,
|
|
2782
|
-
onJump: () => i(
|
|
2783
|
-
locale:
|
|
2787
|
+
onJump: () => i($t(r, n.nextAvailableDate)),
|
|
2788
|
+
locale: w
|
|
2784
2789
|
}
|
|
2785
|
-
) :
|
|
2790
|
+
) : Ts({
|
|
2786
2791
|
inputs: n,
|
|
2787
2792
|
value: r,
|
|
2788
2793
|
onChange: i,
|
|
2789
|
-
onDateSelect:
|
|
2790
|
-
onWindowChange:
|
|
2791
|
-
loadingDates:
|
|
2792
|
-
loadingSlots:
|
|
2793
|
-
locale:
|
|
2794
|
-
datePickerStyle:
|
|
2794
|
+
onDateSelect: g,
|
|
2795
|
+
onWindowChange: l,
|
|
2796
|
+
loadingDates: p,
|
|
2797
|
+
loadingSlots: m,
|
|
2798
|
+
locale: w,
|
|
2799
|
+
datePickerStyle: o,
|
|
2795
2800
|
agentIdBase: S
|
|
2796
2801
|
})
|
|
2797
2802
|
]
|
|
2798
2803
|
}
|
|
2799
2804
|
) : null,
|
|
2800
|
-
t.gates.slot && r.date &&
|
|
2801
|
-
|
|
2805
|
+
t.gates.slot && r.date && o === "month-calendar" ? /* @__PURE__ */ v(
|
|
2806
|
+
U,
|
|
2802
2807
|
{
|
|
2803
|
-
...
|
|
2808
|
+
...h(6, "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]"),
|
|
2804
2809
|
children: [
|
|
2805
|
-
/* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children:
|
|
2806
|
-
|
|
2810
|
+
/* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: D("booking.slot.heading") }),
|
|
2811
|
+
Ds({
|
|
2807
2812
|
inputs: n,
|
|
2808
2813
|
value: r,
|
|
2809
2814
|
onChange: i,
|
|
2810
|
-
loadingSlots:
|
|
2811
|
-
locale:
|
|
2812
|
-
datePickerStyle:
|
|
2815
|
+
loadingSlots: m,
|
|
2816
|
+
locale: w,
|
|
2817
|
+
datePickerStyle: o
|
|
2813
2818
|
})
|
|
2814
2819
|
]
|
|
2815
2820
|
}
|
|
2816
2821
|
) : null,
|
|
2817
|
-
t.gates.details && t.selectedSlot ? /* @__PURE__ */ s(
|
|
2818
|
-
|
|
2822
|
+
t.gates.details && t.selectedSlot ? /* @__PURE__ */ s(U, { ...h(7), children: /* @__PURE__ */ s(
|
|
2823
|
+
Xt,
|
|
2819
2824
|
{
|
|
2820
|
-
...
|
|
2825
|
+
...x,
|
|
2821
2826
|
value: r.details ?? {},
|
|
2822
|
-
onChange: (
|
|
2827
|
+
onChange: (C) => i({ ...r, details: C }),
|
|
2823
2828
|
onSubmit: a,
|
|
2824
|
-
submitting:
|
|
2829
|
+
submitting: M,
|
|
2825
2830
|
defaultPhoneCountry: e.policy.country
|
|
2826
2831
|
}
|
|
2827
2832
|
) }) : null
|
|
2828
2833
|
] });
|
|
2829
2834
|
}
|
|
2830
|
-
function
|
|
2835
|
+
function ye(e, t, n = {}) {
|
|
2831
2836
|
const {
|
|
2832
2837
|
cascade: r,
|
|
2833
2838
|
inputs: i,
|
|
2834
2839
|
value: a,
|
|
2835
|
-
onChange:
|
|
2836
|
-
onSubmit:
|
|
2837
|
-
emptyServicesSlot:
|
|
2838
|
-
onboardingIncompleteSlot:
|
|
2839
|
-
loadingDates:
|
|
2840
|
-
loadingSlots:
|
|
2841
|
-
onDateSelect:
|
|
2842
|
-
onWindowChange:
|
|
2843
|
-
datePickerStyle:
|
|
2840
|
+
onChange: c,
|
|
2841
|
+
onSubmit: f,
|
|
2842
|
+
emptyServicesSlot: p,
|
|
2843
|
+
onboardingIncompleteSlot: m,
|
|
2844
|
+
loadingDates: g,
|
|
2845
|
+
loadingSlots: l,
|
|
2846
|
+
onDateSelect: o,
|
|
2847
|
+
onWindowChange: u,
|
|
2848
|
+
datePickerStyle: k,
|
|
2844
2849
|
specialtyPickerStyle: I,
|
|
2845
|
-
servicePickerStyle:
|
|
2846
|
-
|
|
2847
|
-
|
|
2850
|
+
servicePickerStyle: N,
|
|
2851
|
+
showServiceDuration: M,
|
|
2852
|
+
operatorPickerStyle: w,
|
|
2853
|
+
submitting: x,
|
|
2848
2854
|
locale: S,
|
|
2849
|
-
detailsProps:
|
|
2850
|
-
policy:
|
|
2851
|
-
agentIdBase:
|
|
2855
|
+
detailsProps: A,
|
|
2856
|
+
policy: D,
|
|
2857
|
+
agentIdBase: T
|
|
2852
2858
|
} = t;
|
|
2853
2859
|
switch (e) {
|
|
2854
2860
|
case 1:
|
|
2855
2861
|
return /* @__PURE__ */ s(
|
|
2856
|
-
|
|
2862
|
+
Os,
|
|
2857
2863
|
{
|
|
2858
2864
|
value: a.insuranceType,
|
|
2859
|
-
onChange: (
|
|
2865
|
+
onChange: (h) => c(hs(a, h))
|
|
2860
2866
|
}
|
|
2861
2867
|
);
|
|
2862
2868
|
case 2:
|
|
2863
2869
|
return /* @__PURE__ */ s(
|
|
2864
|
-
|
|
2870
|
+
Ms,
|
|
2865
2871
|
{
|
|
2866
2872
|
specialties: r.filtered.specialties,
|
|
2867
2873
|
value: a.specialtyId,
|
|
2868
2874
|
valueIds: a.specialtyIds,
|
|
2869
|
-
onChange: (
|
|
2870
|
-
onChangeIds: (
|
|
2875
|
+
onChange: (h) => c(vs(a, h)),
|
|
2876
|
+
onChangeIds: (h) => c(bs(a, h)),
|
|
2871
2877
|
pickerStyle: I
|
|
2872
2878
|
}
|
|
2873
2879
|
);
|
|
2874
2880
|
case 3:
|
|
2875
|
-
return r.filtered.services.length === 0 ? /* @__PURE__ */ s(
|
|
2876
|
-
|
|
2881
|
+
return r.filtered.services.length === 0 ? /* @__PURE__ */ s(Bs, { customSlot: p }) : r.gates.onboardingIncomplete ? /* @__PURE__ */ s(Ls, { customSlot: m }) : /* @__PURE__ */ s(
|
|
2882
|
+
Fs,
|
|
2877
2883
|
{
|
|
2878
2884
|
services: r.filtered.services,
|
|
2879
2885
|
value: a.serviceId,
|
|
2880
2886
|
valueIds: a.serviceIds,
|
|
2881
|
-
onChange: (
|
|
2882
|
-
onChangeIds: (
|
|
2883
|
-
pickerStyle:
|
|
2884
|
-
compact: n.compactService
|
|
2887
|
+
onChange: (h) => c(ys(a, h)),
|
|
2888
|
+
onChangeIds: (h) => c(ks(a, h)),
|
|
2889
|
+
pickerStyle: N,
|
|
2890
|
+
compact: n.compactService,
|
|
2891
|
+
showDuration: M
|
|
2885
2892
|
}
|
|
2886
2893
|
);
|
|
2887
2894
|
case 4:
|
|
2888
2895
|
return /* @__PURE__ */ s(
|
|
2889
|
-
|
|
2896
|
+
_s,
|
|
2890
2897
|
{
|
|
2891
2898
|
operators: r.filtered.operators,
|
|
2892
2899
|
value: a.operatorId,
|
|
2893
2900
|
valueIds: a.operatorIds,
|
|
2894
|
-
onChange: (
|
|
2895
|
-
onChangeIds: (
|
|
2896
|
-
pickerStyle:
|
|
2901
|
+
onChange: (h) => c(Ss(a, h)),
|
|
2902
|
+
onChangeIds: (h) => c(xs(a, h)),
|
|
2903
|
+
pickerStyle: w
|
|
2897
2904
|
}
|
|
2898
2905
|
);
|
|
2899
2906
|
case 5:
|
|
2900
2907
|
return i.availableDates.length === 0 && i.nextAvailableDate ? /* @__PURE__ */ s(
|
|
2901
|
-
|
|
2908
|
+
es,
|
|
2902
2909
|
{
|
|
2903
2910
|
nextAvailableDate: i.nextAvailableDate,
|
|
2904
|
-
onJump: () =>
|
|
2911
|
+
onJump: () => c($t(a, i.nextAvailableDate)),
|
|
2905
2912
|
locale: S
|
|
2906
2913
|
}
|
|
2907
|
-
) :
|
|
2914
|
+
) : Ts({
|
|
2908
2915
|
inputs: i,
|
|
2909
2916
|
value: a,
|
|
2910
|
-
onChange:
|
|
2911
|
-
onDateSelect:
|
|
2912
|
-
onWindowChange:
|
|
2913
|
-
loadingDates:
|
|
2914
|
-
loadingSlots:
|
|
2917
|
+
onChange: c,
|
|
2918
|
+
onDateSelect: o,
|
|
2919
|
+
onWindowChange: u,
|
|
2920
|
+
loadingDates: g,
|
|
2921
|
+
loadingSlots: l,
|
|
2915
2922
|
locale: S,
|
|
2916
|
-
datePickerStyle:
|
|
2917
|
-
agentIdBase:
|
|
2923
|
+
datePickerStyle: k,
|
|
2924
|
+
agentIdBase: T
|
|
2918
2925
|
});
|
|
2919
2926
|
case 6:
|
|
2920
|
-
return
|
|
2927
|
+
return Ds({
|
|
2921
2928
|
inputs: i,
|
|
2922
2929
|
value: a,
|
|
2923
|
-
onChange:
|
|
2924
|
-
loadingSlots:
|
|
2930
|
+
onChange: c,
|
|
2931
|
+
loadingSlots: l,
|
|
2925
2932
|
locale: S,
|
|
2926
|
-
datePickerStyle:
|
|
2933
|
+
datePickerStyle: k
|
|
2927
2934
|
});
|
|
2928
2935
|
case 7:
|
|
2929
2936
|
return r.selectedSlot ? /* @__PURE__ */ s(
|
|
2930
|
-
|
|
2937
|
+
Xt,
|
|
2931
2938
|
{
|
|
2932
|
-
...
|
|
2939
|
+
...A,
|
|
2933
2940
|
value: a.details ?? {},
|
|
2934
|
-
onChange: (
|
|
2935
|
-
onSubmit:
|
|
2936
|
-
submitting:
|
|
2937
|
-
defaultPhoneCountry:
|
|
2941
|
+
onChange: (h) => c({ ...a, details: h }),
|
|
2942
|
+
onSubmit: f,
|
|
2943
|
+
submitting: x,
|
|
2944
|
+
defaultPhoneCountry: D.country
|
|
2938
2945
|
}
|
|
2939
2946
|
) : null;
|
|
2940
2947
|
/* c8 ignore next 2 */
|
|
@@ -2942,9 +2949,9 @@ function xe(e, t, n = {}) {
|
|
|
2942
2949
|
return null;
|
|
2943
2950
|
}
|
|
2944
2951
|
}
|
|
2945
|
-
function
|
|
2946
|
-
const { t: e } =
|
|
2947
|
-
return
|
|
2952
|
+
function qt() {
|
|
2953
|
+
const { t: e } = G("ui");
|
|
2954
|
+
return R(
|
|
2948
2955
|
() => ({
|
|
2949
2956
|
1: e("booking.insurance.heading"),
|
|
2950
2957
|
2: e("booking.specialty.heading"),
|
|
@@ -2960,74 +2967,74 @@ function $t() {
|
|
|
2960
2967
|
function ct(e, t) {
|
|
2961
2968
|
return t === "four-day-grid" && e === 6 ? 5 : e;
|
|
2962
2969
|
}
|
|
2963
|
-
function
|
|
2964
|
-
const { cascade: t, value: n, activeStep: r, setActiveStep: i, datePickerStyle: a } = e,
|
|
2965
|
-
() =>
|
|
2970
|
+
function Di(e) {
|
|
2971
|
+
const { cascade: t, value: n, activeStep: r, setActiveStep: i, datePickerStyle: a } = e, c = qt(), { t: f } = G("ui"), p = f("booking.operator.all"), m = R(
|
|
2972
|
+
() => ts(t.visibleSteps, a),
|
|
2966
2973
|
[t.visibleSteps, a]
|
|
2967
|
-
),
|
|
2968
|
-
() =>
|
|
2969
|
-
label:
|
|
2970
|
-
summary:
|
|
2971
|
-
status:
|
|
2972
|
-
content: /* @__PURE__ */ s(
|
|
2974
|
+
), g = ct(r, a), l = Math.max(0, m.indexOf(g)), o = R(
|
|
2975
|
+
() => m.map((u) => ({
|
|
2976
|
+
label: c[u],
|
|
2977
|
+
summary: Rs(u, n, t, p),
|
|
2978
|
+
status: Oi(u, n, t),
|
|
2979
|
+
content: /* @__PURE__ */ s(U, { step: u, active: u === g, children: ye(u, e, { compactService: !0 }) })
|
|
2973
2980
|
})),
|
|
2974
2981
|
[
|
|
2975
|
-
|
|
2982
|
+
m,
|
|
2976
2983
|
n,
|
|
2977
|
-
|
|
2984
|
+
c,
|
|
2978
2985
|
t,
|
|
2979
2986
|
e,
|
|
2980
|
-
|
|
2981
|
-
|
|
2987
|
+
g,
|
|
2988
|
+
p
|
|
2982
2989
|
]
|
|
2983
2990
|
);
|
|
2984
2991
|
return /* @__PURE__ */ s(
|
|
2985
|
-
|
|
2992
|
+
Ws,
|
|
2986
2993
|
{
|
|
2987
|
-
activeStep:
|
|
2988
|
-
steps:
|
|
2989
|
-
onStepChange: (
|
|
2990
|
-
const
|
|
2991
|
-
|
|
2994
|
+
activeStep: l,
|
|
2995
|
+
steps: o,
|
|
2996
|
+
onStepChange: (u) => {
|
|
2997
|
+
const k = m[u];
|
|
2998
|
+
k && i(k);
|
|
2992
2999
|
}
|
|
2993
3000
|
}
|
|
2994
3001
|
);
|
|
2995
3002
|
}
|
|
2996
|
-
function
|
|
2997
|
-
return
|
|
3003
|
+
function Oi(e, t, n) {
|
|
3004
|
+
return Fe(e, t) && e < n.currentStep ? "completed" : e <= n.currentStep ? "unlocked" : void 0;
|
|
2998
3005
|
}
|
|
2999
|
-
function
|
|
3000
|
-
return e !== 4 ?
|
|
3006
|
+
function ds(e, t) {
|
|
3007
|
+
return e !== 4 ? Fe(e, t) : t.operatorIds && t.operatorIds.length > 0 ? !0 : Ns(t) !== void 0;
|
|
3001
3008
|
}
|
|
3002
|
-
function
|
|
3009
|
+
function Ht(e, t) {
|
|
3003
3010
|
const n = e.map((r) => {
|
|
3004
3011
|
var i;
|
|
3005
3012
|
return (i = t.find((a) => a.id === r)) == null ? void 0 : i.label;
|
|
3006
3013
|
}).filter((r) => r !== void 0);
|
|
3007
3014
|
return n.length > 0 ? n.join(", ") : void 0;
|
|
3008
3015
|
}
|
|
3009
|
-
function
|
|
3016
|
+
function Rs(e, t, n, r) {
|
|
3010
3017
|
var i;
|
|
3011
|
-
if (
|
|
3018
|
+
if (Fe(e, t))
|
|
3012
3019
|
switch (e) {
|
|
3013
3020
|
case 1:
|
|
3014
3021
|
return t.insuranceType;
|
|
3015
3022
|
case 2:
|
|
3016
|
-
return
|
|
3017
|
-
|
|
3023
|
+
return Ht(
|
|
3024
|
+
Ge(t),
|
|
3018
3025
|
n.filtered.specialties
|
|
3019
3026
|
);
|
|
3020
3027
|
case 3:
|
|
3021
|
-
return
|
|
3028
|
+
return Ht(_e(t), n.filtered.services);
|
|
3022
3029
|
case 4: {
|
|
3023
|
-
const
|
|
3024
|
-
|
|
3025
|
-
n.filtered.operators.map((
|
|
3026
|
-
id:
|
|
3027
|
-
label:
|
|
3030
|
+
const c = Wt(t).filter((p) => p !== Ce), f = Ht(
|
|
3031
|
+
c,
|
|
3032
|
+
n.filtered.operators.map((p) => ({
|
|
3033
|
+
id: p.id,
|
|
3034
|
+
label: p.name
|
|
3028
3035
|
}))
|
|
3029
3036
|
);
|
|
3030
|
-
return
|
|
3037
|
+
return f !== void 0 ? f : c.length === 0 ? r : void 0;
|
|
3031
3038
|
}
|
|
3032
3039
|
case 5:
|
|
3033
3040
|
return t.date;
|
|
@@ -3037,98 +3044,98 @@ function Es(e, t, n, r) {
|
|
|
3037
3044
|
return;
|
|
3038
3045
|
}
|
|
3039
3046
|
}
|
|
3040
|
-
function
|
|
3041
|
-
const { cascade: t, value: n, activeStep: r, setActiveStep: i } = e, { t: a } =
|
|
3042
|
-
(
|
|
3043
|
-
),
|
|
3044
|
-
(
|
|
3045
|
-
),
|
|
3046
|
-
(
|
|
3047
|
-
) ? r :
|
|
3047
|
+
function Mi(e) {
|
|
3048
|
+
const { cascade: t, value: n, activeStep: r, setActiveStep: i } = e, { t: a } = G("ui"), c = qt(), f = a("booking.operator.all"), p = `${Pt()}-filter`, m = ct(r, e.datePickerStyle), g = t.visibleSteps.filter(
|
|
3049
|
+
(u) => u === 1 || u === 2 || u === 3 || u === 4
|
|
3050
|
+
), l = g.some(
|
|
3051
|
+
(u) => !Fe(u, n)
|
|
3052
|
+
), o = g.some(
|
|
3053
|
+
(u) => u === r
|
|
3054
|
+
) ? r : g.find((u) => !Fe(u, n));
|
|
3048
3055
|
return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
3049
|
-
|
|
3056
|
+
g.length > 0 ? /* @__PURE__ */ s(
|
|
3050
3057
|
"div",
|
|
3051
3058
|
{
|
|
3052
3059
|
role: "group",
|
|
3053
3060
|
"aria-label": a("booking.filtersLabel"),
|
|
3054
3061
|
className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
3055
|
-
children:
|
|
3056
|
-
const
|
|
3057
|
-
|
|
3062
|
+
children: g.map((u) => {
|
|
3063
|
+
const k = Rs(
|
|
3064
|
+
u,
|
|
3058
3065
|
n,
|
|
3059
3066
|
t,
|
|
3060
|
-
|
|
3061
|
-
), I =
|
|
3067
|
+
f
|
|
3068
|
+
), I = u === o, N = Fe(u, n);
|
|
3062
3069
|
return /* @__PURE__ */ s(
|
|
3063
|
-
|
|
3070
|
+
Xe,
|
|
3064
3071
|
{
|
|
3065
3072
|
intent: I ? "primary" : "outline",
|
|
3066
3073
|
size: "sm",
|
|
3067
3074
|
endIcon: /* @__PURE__ */ s(
|
|
3068
|
-
|
|
3075
|
+
Xs,
|
|
3069
3076
|
{
|
|
3070
3077
|
"aria-hidden": "true",
|
|
3071
3078
|
className: I ? "ds:rotate-180" : void 0
|
|
3072
3079
|
}
|
|
3073
3080
|
),
|
|
3074
|
-
"aria-expanded":
|
|
3075
|
-
"aria-controls":
|
|
3076
|
-
"aria-current": !
|
|
3081
|
+
"aria-expanded": N ? I : void 0,
|
|
3082
|
+
"aria-controls": N && I ? p : void 0,
|
|
3083
|
+
"aria-current": !N && I ? "step" : void 0,
|
|
3077
3084
|
onClick: () => i(
|
|
3078
|
-
|
|
3085
|
+
N && I ? t.currentStep : u
|
|
3079
3086
|
),
|
|
3080
|
-
children:
|
|
3081
|
-
|
|
3087
|
+
children: k ? /* @__PURE__ */ v(ne, { children: [
|
|
3088
|
+
c[u],
|
|
3082
3089
|
": ",
|
|
3083
|
-
|
|
3084
|
-
] }) :
|
|
3090
|
+
k
|
|
3091
|
+
] }) : c[u]
|
|
3085
3092
|
},
|
|
3086
|
-
`csc-${
|
|
3093
|
+
`csc-${u}`
|
|
3087
3094
|
);
|
|
3088
3095
|
})
|
|
3089
3096
|
}
|
|
3090
3097
|
) : null,
|
|
3091
|
-
|
|
3092
|
-
|
|
3098
|
+
o !== void 0 ? /* @__PURE__ */ s(
|
|
3099
|
+
U,
|
|
3093
3100
|
{
|
|
3094
|
-
step:
|
|
3095
|
-
active:
|
|
3096
|
-
id:
|
|
3097
|
-
children:
|
|
3101
|
+
step: o,
|
|
3102
|
+
active: o === m,
|
|
3103
|
+
id: p,
|
|
3104
|
+
children: ye(o, e, { compactService: !0 })
|
|
3098
3105
|
}
|
|
3099
3106
|
) : null,
|
|
3100
|
-
!
|
|
3107
|
+
!l && t.gates.date ? (
|
|
3101
3108
|
// four-day-grid embeds slots inline with the day strip — the
|
|
3102
3109
|
// historic 2-col date|slot split collapses to a single column
|
|
3103
3110
|
// so the picker spans the full width instead of orphaning an
|
|
3104
3111
|
// empty right cell.
|
|
3105
|
-
e.datePickerStyle === "four-day-grid" ? /* @__PURE__ */ s(
|
|
3112
|
+
e.datePickerStyle === "four-day-grid" ? /* @__PURE__ */ s(U, { step: 5, active: m === 5, children: ye(5, e) }) : /* @__PURE__ */ v("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-2", children: [
|
|
3106
3113
|
/* @__PURE__ */ s(
|
|
3107
|
-
|
|
3114
|
+
U,
|
|
3108
3115
|
{
|
|
3109
3116
|
step: 5,
|
|
3110
|
-
active:
|
|
3117
|
+
active: m === 5,
|
|
3111
3118
|
className: "ds:min-w-0",
|
|
3112
|
-
children:
|
|
3119
|
+
children: ye(5, e)
|
|
3113
3120
|
}
|
|
3114
3121
|
),
|
|
3115
3122
|
n.date ? /* @__PURE__ */ s(
|
|
3116
|
-
|
|
3123
|
+
U,
|
|
3117
3124
|
{
|
|
3118
3125
|
step: 6,
|
|
3119
|
-
active:
|
|
3126
|
+
active: m === 6,
|
|
3120
3127
|
className: "ds:min-w-0",
|
|
3121
|
-
children:
|
|
3128
|
+
children: ye(6, e)
|
|
3122
3129
|
}
|
|
3123
3130
|
) : /* @__PURE__ */ s("div", { className: "ds:min-w-0" })
|
|
3124
3131
|
] })
|
|
3125
3132
|
) : null,
|
|
3126
|
-
t.gates.details ? /* @__PURE__ */ s(
|
|
3133
|
+
t.gates.details ? /* @__PURE__ */ s(U, { step: 7, active: m === 7, children: ye(7, e) }) : null
|
|
3127
3134
|
] });
|
|
3128
3135
|
}
|
|
3129
|
-
function
|
|
3136
|
+
function Fi(e) {
|
|
3130
3137
|
const { cascade: t, datePickerStyle: n, activeStep: r } = e, i = ct(r, n), a = t.visibleSteps.filter(
|
|
3131
|
-
(
|
|
3138
|
+
(f) => f === 1 || f === 2 || f === 3 || f === 4
|
|
3132
3139
|
);
|
|
3133
3140
|
return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
3134
3141
|
/* @__PURE__ */ v(
|
|
@@ -3136,63 +3143,63 @@ function Mi(e) {
|
|
|
3136
3143
|
{
|
|
3137
3144
|
className: n === "four-day-grid" ? "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]" : "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-2",
|
|
3138
3145
|
children: [
|
|
3139
|
-
/* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: a.map((
|
|
3146
|
+
/* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: a.map((f) => /* @__PURE__ */ s(U, { step: f, active: f === i, children: ye(f, e, { compactService: !0 }) }, `fbf-${f}`)) }),
|
|
3140
3147
|
/* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
3141
|
-
t.gates.date ? /* @__PURE__ */ s(
|
|
3142
|
-
t.gates.slot && e.value.date && n === "month-calendar" ? /* @__PURE__ */ s(
|
|
3148
|
+
t.gates.date ? /* @__PURE__ */ s(U, { step: 5, active: i === 5, children: ye(5, e) }) : null,
|
|
3149
|
+
t.gates.slot && e.value.date && n === "month-calendar" ? /* @__PURE__ */ s(U, { step: 6, active: i === 6, children: ye(6, e) }) : null
|
|
3143
3150
|
] })
|
|
3144
3151
|
]
|
|
3145
3152
|
}
|
|
3146
3153
|
),
|
|
3147
|
-
t.gates.details ? /* @__PURE__ */ s(
|
|
3154
|
+
t.gates.details ? /* @__PURE__ */ s(U, { step: 7, active: i === 7, children: ye(7, e) }) : null
|
|
3148
3155
|
] });
|
|
3149
3156
|
}
|
|
3150
|
-
function
|
|
3151
|
-
const { cascade: t, value: n, activeStep: r, setActiveStep: i, datePickerStyle: a } = e, { t:
|
|
3152
|
-
() =>
|
|
3157
|
+
function _i(e) {
|
|
3158
|
+
const { cascade: t, value: n, activeStep: r, setActiveStep: i, datePickerStyle: a } = e, { t: c } = G("ui"), f = qt(), p = R(
|
|
3159
|
+
() => ts(t.visibleSteps, a),
|
|
3153
3160
|
[t.visibleSteps, a]
|
|
3154
|
-
),
|
|
3155
|
-
() =>
|
|
3156
|
-
[
|
|
3157
|
-
),
|
|
3161
|
+
), m = ct(r, a), g = Math.max(0, p.indexOf(m)), l = p.length, o = R(
|
|
3162
|
+
() => p.map((N) => ({ label: f[N] })),
|
|
3163
|
+
[p, f]
|
|
3164
|
+
), u = g > 0, k = m === 5 && a === "four-day-grid", I = g < l - 1 && Fe(m, n) && (!k || Fe(6, n));
|
|
3158
3165
|
return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
3159
|
-
/* @__PURE__ */ s(
|
|
3160
|
-
/* @__PURE__ */ s(
|
|
3166
|
+
/* @__PURE__ */ s(Ys, { activeStep: g, steps: o }),
|
|
3167
|
+
/* @__PURE__ */ s(U, { step: m, active: !0, children: ye(m, e, { compactService: !0 }) }),
|
|
3161
3168
|
/* @__PURE__ */ v("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
3162
3169
|
/* @__PURE__ */ s(
|
|
3163
|
-
|
|
3170
|
+
Xe,
|
|
3164
3171
|
{
|
|
3165
3172
|
intent: "ghost",
|
|
3166
3173
|
size: "md",
|
|
3167
|
-
disabled: !
|
|
3174
|
+
disabled: !u,
|
|
3168
3175
|
onClick: () => {
|
|
3169
|
-
const
|
|
3170
|
-
|
|
3176
|
+
const N = p[g - 1];
|
|
3177
|
+
N && i(N);
|
|
3171
3178
|
},
|
|
3172
|
-
children:
|
|
3179
|
+
children: c("booking.actions.back")
|
|
3173
3180
|
}
|
|
3174
3181
|
),
|
|
3175
|
-
|
|
3176
|
-
|
|
3182
|
+
m < 7 ? /* @__PURE__ */ s(
|
|
3183
|
+
Xe,
|
|
3177
3184
|
{
|
|
3178
3185
|
intent: "primary",
|
|
3179
3186
|
size: "md",
|
|
3180
3187
|
disabled: !I,
|
|
3181
3188
|
onClick: () => {
|
|
3182
|
-
const
|
|
3183
|
-
|
|
3189
|
+
const N = p[g + 1];
|
|
3190
|
+
N && i(N);
|
|
3184
3191
|
},
|
|
3185
|
-
children:
|
|
3192
|
+
children: c("booking.actions.next")
|
|
3186
3193
|
}
|
|
3187
3194
|
) : null
|
|
3188
3195
|
] })
|
|
3189
3196
|
] });
|
|
3190
3197
|
}
|
|
3191
|
-
const
|
|
3192
|
-
function
|
|
3198
|
+
const Li = [], Bi = [];
|
|
3199
|
+
function ls() {
|
|
3193
3200
|
return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
3194
3201
|
}
|
|
3195
|
-
const
|
|
3202
|
+
const Ei = us(
|
|
3196
3203
|
({
|
|
3197
3204
|
variant: e = "inline-list",
|
|
3198
3205
|
country: t,
|
|
@@ -3203,87 +3210,88 @@ const Bi = ls(
|
|
|
3203
3210
|
allowOperatorSelection: r = !1,
|
|
3204
3211
|
lockedOperatorId: i,
|
|
3205
3212
|
operatorsByService: a = !1,
|
|
3206
|
-
autoSelectSingleService:
|
|
3207
|
-
specialties:
|
|
3208
|
-
services:
|
|
3209
|
-
operators:
|
|
3210
|
-
availableDates:
|
|
3211
|
-
availableSlots:
|
|
3212
|
-
nextAvailableDate:
|
|
3213
|
-
requireCodiceFiscale:
|
|
3214
|
-
requireDateOfBirth:
|
|
3213
|
+
autoSelectSingleService: c = !1,
|
|
3214
|
+
specialties: f,
|
|
3215
|
+
services: p,
|
|
3216
|
+
operators: m,
|
|
3217
|
+
availableDates: g,
|
|
3218
|
+
availableSlots: l,
|
|
3219
|
+
nextAvailableDate: o,
|
|
3220
|
+
requireCodiceFiscale: u,
|
|
3221
|
+
requireDateOfBirth: k,
|
|
3215
3222
|
requireInsuranceNumber: I,
|
|
3216
|
-
billingInDetails:
|
|
3217
|
-
paymentNoticeStyle:
|
|
3223
|
+
billingInDetails: N = !1,
|
|
3224
|
+
paymentNoticeStyle: M = "plain",
|
|
3218
3225
|
showNote: w,
|
|
3219
|
-
showReturningPatientFlag:
|
|
3220
|
-
privacyPolicyUrl:
|
|
3221
|
-
termsUrl:
|
|
3226
|
+
showReturningPatientFlag: x,
|
|
3227
|
+
privacyPolicyUrl: S,
|
|
3228
|
+
termsUrl: A,
|
|
3222
3229
|
practiceConsent: D,
|
|
3223
|
-
paymentTermsUrl:
|
|
3224
|
-
paymentState:
|
|
3225
|
-
renderPayment:
|
|
3230
|
+
paymentTermsUrl: T,
|
|
3231
|
+
paymentState: h,
|
|
3232
|
+
renderPayment: C,
|
|
3226
3233
|
renderPaymentCompletion: $,
|
|
3227
3234
|
validateCodiceFiscale: b,
|
|
3228
|
-
validateInsuranceNumber:
|
|
3229
|
-
confirmationChannels:
|
|
3230
|
-
defaultConfirmationChannels:
|
|
3231
|
-
value:
|
|
3232
|
-
onChange:
|
|
3235
|
+
validateInsuranceNumber: pe,
|
|
3236
|
+
confirmationChannels: F,
|
|
3237
|
+
defaultConfirmationChannels: z,
|
|
3238
|
+
value: _,
|
|
3239
|
+
onChange: me,
|
|
3233
3240
|
onSubmit: dt,
|
|
3234
|
-
onStepChange:
|
|
3235
|
-
onDateSelect:
|
|
3236
|
-
onWindowChange:
|
|
3237
|
-
datePickerStyle:
|
|
3238
|
-
specialtyPickerStyle:
|
|
3239
|
-
servicePickerStyle:
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3241
|
+
onStepChange: fe,
|
|
3242
|
+
onDateSelect: He,
|
|
3243
|
+
onWindowChange: Le,
|
|
3244
|
+
datePickerStyle: H = "month-calendar",
|
|
3245
|
+
specialtyPickerStyle: Be,
|
|
3246
|
+
servicePickerStyle: ge,
|
|
3247
|
+
showServiceDuration: J = !0,
|
|
3248
|
+
operatorPickerStyle: ae,
|
|
3249
|
+
loadingDates: he,
|
|
3250
|
+
loadingSlots: Se,
|
|
3251
|
+
submitting: W,
|
|
3252
|
+
submitError: Ae,
|
|
3253
|
+
mode: ie = "live",
|
|
3254
|
+
showModifyOnSuccess: oe = !0,
|
|
3255
|
+
surface: te = "flat",
|
|
3256
|
+
emptyServicesSlot: L,
|
|
3257
|
+
onboardingIncompleteSlot: xe,
|
|
3258
|
+
"aria-label": Kt,
|
|
3259
|
+
id: Ee,
|
|
3260
|
+
className: kt,
|
|
3261
|
+
onFocus: Qe,
|
|
3262
|
+
onBlur: Re,
|
|
3263
|
+
...Ie
|
|
3264
|
+
}, zt) => {
|
|
3265
|
+
var gt, d, O;
|
|
3266
|
+
const { t: Z, i18n: St } = G("ui"), se = e ?? "inline-list", Te = St.language ?? "en", Ne = f ?? Li, ve = m ?? Bi;
|
|
3267
|
+
q(() => {
|
|
3268
|
+
const y = jn(_, {
|
|
3261
3269
|
useSpecialties: n,
|
|
3262
3270
|
lockedOperatorId: i,
|
|
3263
|
-
autoSelectSingleService:
|
|
3264
|
-
specialties:
|
|
3265
|
-
services:
|
|
3271
|
+
autoSelectSingleService: c,
|
|
3272
|
+
specialties: Ne,
|
|
3273
|
+
services: p
|
|
3266
3274
|
});
|
|
3267
|
-
(
|
|
3275
|
+
(y.specialtyId !== _.specialtyId || y.operatorId !== _.operatorId || y.serviceId !== _.serviceId) && me(y);
|
|
3268
3276
|
}, [
|
|
3269
3277
|
i,
|
|
3270
3278
|
n,
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3279
|
+
c,
|
|
3280
|
+
Ne,
|
|
3281
|
+
p
|
|
3274
3282
|
]);
|
|
3275
|
-
const
|
|
3276
|
-
() =>
|
|
3283
|
+
const B = R(
|
|
3284
|
+
() => zn({
|
|
3277
3285
|
country: t,
|
|
3278
3286
|
useSpecialties: n,
|
|
3279
3287
|
allowOperatorSelection: r,
|
|
3280
3288
|
lockedOperatorId: i,
|
|
3281
3289
|
operatorsByService: a,
|
|
3282
|
-
specialties:
|
|
3283
|
-
services:
|
|
3284
|
-
operators:
|
|
3285
|
-
availableSlots:
|
|
3286
|
-
value:
|
|
3290
|
+
specialties: Ne,
|
|
3291
|
+
services: p,
|
|
3292
|
+
operators: ve,
|
|
3293
|
+
availableSlots: l,
|
|
3294
|
+
value: _
|
|
3287
3295
|
}),
|
|
3288
3296
|
[
|
|
3289
3297
|
t,
|
|
@@ -3291,193 +3299,193 @@ const Bi = ls(
|
|
|
3291
3299
|
r,
|
|
3292
3300
|
i,
|
|
3293
3301
|
a,
|
|
3294
|
-
|
|
3295
|
-
|
|
3302
|
+
c,
|
|
3303
|
+
Ne,
|
|
3304
|
+
p,
|
|
3305
|
+
ve,
|
|
3296
3306
|
g,
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
o,
|
|
3300
|
-
M
|
|
3307
|
+
l,
|
|
3308
|
+
_
|
|
3301
3309
|
]
|
|
3302
|
-
),
|
|
3310
|
+
), et = R(
|
|
3303
3311
|
() => [
|
|
3304
|
-
JSON.stringify(
|
|
3305
|
-
JSON.stringify(
|
|
3306
|
-
JSON.stringify(
|
|
3307
|
-
JSON.stringify(
|
|
3308
|
-
JSON.stringify(
|
|
3309
|
-
JSON.stringify(
|
|
3312
|
+
JSON.stringify(_.insuranceType),
|
|
3313
|
+
JSON.stringify(Ge(_)),
|
|
3314
|
+
JSON.stringify(_e(_)),
|
|
3315
|
+
JSON.stringify(Wt(_)),
|
|
3316
|
+
JSON.stringify(_.date),
|
|
3317
|
+
JSON.stringify(_.slotKey)
|
|
3310
3318
|
],
|
|
3311
|
-
[
|
|
3312
|
-
),
|
|
3313
|
-
(
|
|
3314
|
-
if (
|
|
3315
|
-
return Math.min(4,
|
|
3316
|
-
if (!
|
|
3317
|
-
const
|
|
3318
|
-
(
|
|
3319
|
+
[_]
|
|
3320
|
+
), Je = se === "progress", We = ue(
|
|
3321
|
+
(y) => {
|
|
3322
|
+
if (y === 4 && B.visibleSteps.includes(4) && Wt(_).length === 0)
|
|
3323
|
+
return Math.min(4, B.currentStep);
|
|
3324
|
+
if (!Je) return B.currentStep;
|
|
3325
|
+
const P = B.visibleSteps.find(
|
|
3326
|
+
(V) => V > y && !ds(V, _)
|
|
3319
3327
|
);
|
|
3320
|
-
return
|
|
3328
|
+
return P === void 0 ? B.currentStep : Math.min(P, B.currentStep);
|
|
3321
3329
|
},
|
|
3322
|
-
[
|
|
3323
|
-
), [
|
|
3324
|
-
|
|
3325
|
-
),
|
|
3326
|
-
|
|
3327
|
-
const
|
|
3328
|
-
|
|
3329
|
-
const
|
|
3330
|
-
(
|
|
3330
|
+
[Je, B.visibleSteps, B.currentStep, _]
|
|
3331
|
+
), [X, we] = Q(
|
|
3332
|
+
B.currentStep
|
|
3333
|
+
), Pe = E(et), Ve = E(B.visibleSteps);
|
|
3334
|
+
q(() => {
|
|
3335
|
+
const y = Pe.current, P = Ve.current;
|
|
3336
|
+
Pe.current = et, Ve.current = B.visibleSteps;
|
|
3337
|
+
const V = et.findIndex(
|
|
3338
|
+
(de, ss) => de !== y[ss]
|
|
3331
3339
|
);
|
|
3332
|
-
if (
|
|
3333
|
-
|
|
3340
|
+
if (V !== -1) {
|
|
3341
|
+
we(We(V + 1));
|
|
3334
3342
|
return;
|
|
3335
3343
|
}
|
|
3336
|
-
const
|
|
3337
|
-
(
|
|
3344
|
+
const Y = Je ? B.visibleSteps.find(
|
|
3345
|
+
(de) => de < X && !P.includes(de) && !ds(de, _)
|
|
3338
3346
|
) : void 0;
|
|
3339
|
-
if (
|
|
3340
|
-
|
|
3347
|
+
if (Y !== void 0) {
|
|
3348
|
+
we(Y);
|
|
3341
3349
|
return;
|
|
3342
3350
|
}
|
|
3343
|
-
|
|
3351
|
+
B.visibleSteps.includes(X) || we(B.currentStep);
|
|
3344
3352
|
}, [
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3353
|
+
et,
|
|
3354
|
+
We,
|
|
3355
|
+
Je,
|
|
3356
|
+
B.currentStep,
|
|
3357
|
+
B.visibleSteps,
|
|
3358
|
+
X,
|
|
3359
|
+
_
|
|
3352
3360
|
]);
|
|
3353
|
-
const
|
|
3354
|
-
() =>
|
|
3355
|
-
[
|
|
3356
|
-
),
|
|
3357
|
-
|
|
3358
|
-
const
|
|
3359
|
-
if (
|
|
3360
|
-
|
|
3361
|
+
const ce = E(null), De = R(
|
|
3362
|
+
() => ts(B.visibleSteps, H),
|
|
3363
|
+
[B.visibleSteps, H]
|
|
3364
|
+
), xt = qt(), [tt, $e] = Q(""), qe = E(null), Oe = E(null);
|
|
3365
|
+
q(() => {
|
|
3366
|
+
const y = ct(X, H);
|
|
3367
|
+
if (Oe.current === null) {
|
|
3368
|
+
Oe.current = y;
|
|
3361
3369
|
return;
|
|
3362
3370
|
}
|
|
3363
|
-
if (
|
|
3364
|
-
|
|
3365
|
-
const
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
current:
|
|
3369
|
-
total:
|
|
3370
|
-
label:
|
|
3371
|
+
if (Oe.current === y) return;
|
|
3372
|
+
Oe.current = y;
|
|
3373
|
+
const P = De.indexOf(y);
|
|
3374
|
+
$e(
|
|
3375
|
+
P === -1 ? "" : Z("booking.stepAnnouncement", {
|
|
3376
|
+
current: P + 1,
|
|
3377
|
+
total: De.length,
|
|
3378
|
+
label: xt[y]
|
|
3371
3379
|
})
|
|
3372
3380
|
);
|
|
3373
|
-
const
|
|
3374
|
-
if (!
|
|
3375
|
-
const
|
|
3376
|
-
if (!
|
|
3377
|
-
const
|
|
3378
|
-
if (!(
|
|
3379
|
-
const
|
|
3380
|
-
if (
|
|
3381
|
+
const V = qe.current;
|
|
3382
|
+
if (!V || V.isConnected) return;
|
|
3383
|
+
const Y = ce.current;
|
|
3384
|
+
if (!Y) return;
|
|
3385
|
+
const de = document.activeElement;
|
|
3386
|
+
if (!(de === null || de === document.body || !Y.contains(de))) return;
|
|
3387
|
+
const Tt = Y.querySelector(Ai) ?? Y;
|
|
3388
|
+
if (Tt.focus({ preventScroll: !0 }), typeof Tt.scrollIntoView == "function")
|
|
3381
3389
|
try {
|
|
3382
|
-
|
|
3383
|
-
behavior:
|
|
3390
|
+
Tt.scrollIntoView({
|
|
3391
|
+
behavior: ls() ? "auto" : "smooth",
|
|
3384
3392
|
block: "nearest"
|
|
3385
3393
|
});
|
|
3386
3394
|
} catch {
|
|
3387
|
-
|
|
3395
|
+
Tt.scrollIntoView();
|
|
3388
3396
|
}
|
|
3389
|
-
}, [
|
|
3390
|
-
const
|
|
3391
|
-
services:
|
|
3392
|
-
value:
|
|
3393
|
-
availableSlots:
|
|
3397
|
+
}, [X, H, De, xt, Z]);
|
|
3398
|
+
const K = ui({
|
|
3399
|
+
services: p,
|
|
3400
|
+
value: _,
|
|
3401
|
+
availableSlots: l,
|
|
3394
3402
|
onSubmit: dt,
|
|
3395
|
-
onChange:
|
|
3396
|
-
paymentState:
|
|
3397
|
-
submitting:
|
|
3398
|
-
paymentTermsUrl:
|
|
3399
|
-
renderPayment:
|
|
3400
|
-
}),
|
|
3401
|
-
|
|
3402
|
-
const
|
|
3403
|
-
|
|
3404
|
-
var
|
|
3405
|
-
if (
|
|
3406
|
-
const
|
|
3407
|
-
(!
|
|
3403
|
+
onChange: me,
|
|
3404
|
+
paymentState: h,
|
|
3405
|
+
submitting: W,
|
|
3406
|
+
paymentTermsUrl: T,
|
|
3407
|
+
renderPayment: C
|
|
3408
|
+
}), j = K.status, lt = K.submit, st = E(K.reset);
|
|
3409
|
+
st.current = K.reset;
|
|
3410
|
+
const ut = Pt(), Ke = E(null), nt = E(null), it = ((gt = K.state) == null ? void 0 : gt.status) === "failed", It = K.state && "phase" in K.state && K.state.phase === "completion";
|
|
3411
|
+
q(() => {
|
|
3412
|
+
var y, P;
|
|
3413
|
+
if (j === "payment") {
|
|
3414
|
+
const V = document.activeElement;
|
|
3415
|
+
(!It || !V || V === document.body || !((y = ce.current) != null && y.contains(V))) && ((P = Ke.current) == null || P.focus());
|
|
3408
3416
|
}
|
|
3409
|
-
}, [
|
|
3410
|
-
var
|
|
3411
|
-
|
|
3412
|
-
}, [
|
|
3413
|
-
const
|
|
3414
|
-
|
|
3415
|
-
if (
|
|
3417
|
+
}, [j, It]), q(() => {
|
|
3418
|
+
var y;
|
|
3419
|
+
j === "payment" && it && ((y = nt.current) == null || y.focus());
|
|
3420
|
+
}, [j, it]), Vs(zt, () => ce.current, []);
|
|
3421
|
+
const Me = j === "success" ? 8 : j === "payment" ? 7 : B.currentStep, pt = E(null);
|
|
3422
|
+
q(() => {
|
|
3423
|
+
if (Me !== pt.current && (pt.current = Me, fe == null || fe(Me), Me === 8 && ce.current))
|
|
3416
3424
|
try {
|
|
3417
|
-
|
|
3418
|
-
behavior:
|
|
3425
|
+
ce.current.scrollIntoView({
|
|
3426
|
+
behavior: ls() ? "auto" : "smooth",
|
|
3419
3427
|
block: "start"
|
|
3420
3428
|
});
|
|
3421
3429
|
} catch {
|
|
3422
|
-
|
|
3430
|
+
ce.current.scrollIntoView();
|
|
3423
3431
|
}
|
|
3424
|
-
}, [
|
|
3425
|
-
const
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
}, [
|
|
3429
|
-
const Nt =
|
|
3432
|
+
}, [Me, fe]);
|
|
3433
|
+
const Ye = E({ activeStep: X, cascade: B, submitState: j });
|
|
3434
|
+
q(() => {
|
|
3435
|
+
Ye.current = { activeStep: X, cascade: B, submitState: j };
|
|
3436
|
+
}, [X, B, j]);
|
|
3437
|
+
const Nt = R(
|
|
3430
3438
|
() => ({
|
|
3431
|
-
getVariant: () =>
|
|
3439
|
+
getVariant: () => se,
|
|
3432
3440
|
getCurrentStep: () => {
|
|
3433
|
-
const
|
|
3434
|
-
return
|
|
3441
|
+
const y = Ye.current;
|
|
3442
|
+
return y.submitState === "success" ? 8 : y.submitState === "payment" ? 7 : y.activeStep;
|
|
3435
3443
|
},
|
|
3436
3444
|
reset: () => {
|
|
3437
|
-
|
|
3445
|
+
Ye.current.submitState !== "payment" && (me({}), st.current(), we(1));
|
|
3438
3446
|
},
|
|
3439
|
-
goToStep: (
|
|
3440
|
-
const
|
|
3441
|
-
|
|
3447
|
+
goToStep: (y) => {
|
|
3448
|
+
const P = Ye.current, V = P.cascade.visibleSteps.includes(y), Y = P.cascade.currentStep, de = P.submitState === "payment" ? 7 : !V || y > Y ? Y : y;
|
|
3449
|
+
Ye.current = { ...P, activeStep: de }, we(de);
|
|
3442
3450
|
}
|
|
3443
3451
|
}),
|
|
3444
|
-
[
|
|
3452
|
+
[se, me]
|
|
3445
3453
|
);
|
|
3446
|
-
|
|
3447
|
-
const
|
|
3448
|
-
|
|
3454
|
+
qs(En, Nt, Ee);
|
|
3455
|
+
const jt = Kt ?? Z("booking.regionLabel"), be = K.snapshot, wt = j === "success" && be ? /* @__PURE__ */ s(
|
|
3456
|
+
Ci,
|
|
3449
3457
|
{
|
|
3450
|
-
payment:
|
|
3458
|
+
payment: be.payment,
|
|
3451
3459
|
snapshot: {
|
|
3452
|
-
...
|
|
3453
|
-
slot:
|
|
3454
|
-
details:
|
|
3455
|
-
serviceId: ((
|
|
3460
|
+
...be.value,
|
|
3461
|
+
slot: be.slot,
|
|
3462
|
+
details: be.details,
|
|
3463
|
+
serviceId: ((d = be.payment) == null ? void 0 : d.serviceId) ?? be.slot.serviceId ?? be.value.serviceId
|
|
3456
3464
|
},
|
|
3457
|
-
operators:
|
|
3458
|
-
specialties:
|
|
3459
|
-
services:
|
|
3460
|
-
locale:
|
|
3461
|
-
mode:
|
|
3462
|
-
showModify:
|
|
3465
|
+
operators: ve,
|
|
3466
|
+
specialties: Ne,
|
|
3467
|
+
services: p,
|
|
3468
|
+
locale: Te,
|
|
3469
|
+
mode: ie,
|
|
3470
|
+
showModify: oe && !be.payment,
|
|
3463
3471
|
onReset: () => Nt.reset(),
|
|
3464
3472
|
focusWasLost: () => {
|
|
3465
|
-
const
|
|
3466
|
-
return !!(
|
|
3473
|
+
const y = qe.current, P = document.activeElement;
|
|
3474
|
+
return !!(y && !y.isConnected) && (!P || P === document.body);
|
|
3467
3475
|
},
|
|
3468
3476
|
onModify: () => {
|
|
3469
|
-
|
|
3477
|
+
st.current(), we(7);
|
|
3470
3478
|
}
|
|
3471
3479
|
}
|
|
3472
|
-
) : null,
|
|
3473
|
-
session:
|
|
3474
|
-
payment:
|
|
3475
|
-
state:
|
|
3476
|
-
billing: (
|
|
3477
|
-
} : void 0,
|
|
3480
|
+
) : null, mt = K.activeSession, ze = K.state, re = mt && ze ? {
|
|
3481
|
+
session: mt,
|
|
3482
|
+
payment: mt.payment,
|
|
3483
|
+
state: ze,
|
|
3484
|
+
billing: (O = K.snapshot) == null ? void 0 : O.details.billing
|
|
3485
|
+
} : void 0, je = ze && "phase" in ze && ze.phase === "completion", Ct = j === "payment" && re ? /* @__PURE__ */ v(
|
|
3478
3486
|
"section",
|
|
3479
3487
|
{
|
|
3480
|
-
"aria-labelledby":
|
|
3488
|
+
"aria-labelledby": ut,
|
|
3481
3489
|
"data-component": "booking-payment",
|
|
3482
3490
|
"data-payment-status": re.state.status,
|
|
3483
3491
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
@@ -3485,20 +3493,20 @@ const Bi = ls(
|
|
|
3485
3493
|
/* @__PURE__ */ s(
|
|
3486
3494
|
"h3",
|
|
3487
3495
|
{
|
|
3488
|
-
ref:
|
|
3489
|
-
id:
|
|
3496
|
+
ref: Ke,
|
|
3497
|
+
id: ut,
|
|
3490
3498
|
tabIndex: -1,
|
|
3491
3499
|
className: "type-title-card ds:m-0",
|
|
3492
|
-
children:
|
|
3493
|
-
|
|
3500
|
+
children: Z(
|
|
3501
|
+
je ? "booking.payment.confirming" : "booking.payment.heading"
|
|
3494
3502
|
)
|
|
3495
3503
|
}
|
|
3496
3504
|
),
|
|
3497
|
-
|
|
3498
|
-
amount:
|
|
3505
|
+
je ? null : /* @__PURE__ */ s("p", { className: "type-body ds:m-0", children: Z("booking.payment.noticeBody", {
|
|
3506
|
+
amount: yt(
|
|
3499
3507
|
re.payment.amountCents,
|
|
3500
3508
|
re.payment.currencyCode,
|
|
3501
|
-
|
|
3509
|
+
Te
|
|
3502
3510
|
)
|
|
3503
3511
|
}) }),
|
|
3504
3512
|
/* @__PURE__ */ s(
|
|
@@ -3506,176 +3514,178 @@ const Bi = ls(
|
|
|
3506
3514
|
{
|
|
3507
3515
|
role: "status",
|
|
3508
3516
|
className: re.state.status === "processing" ? "type-body ds:m-0 ds:flex ds:items-center ds:gap-[var(--spacing-sm)]" : "ds:sr-only",
|
|
3509
|
-
children: re.state.status === "processing" ? /* @__PURE__ */ v(
|
|
3510
|
-
/* @__PURE__ */ s(
|
|
3511
|
-
/* @__PURE__ */ s("span", { children:
|
|
3512
|
-
|
|
3517
|
+
children: re.state.status === "processing" ? /* @__PURE__ */ v(ne, { children: [
|
|
3518
|
+
/* @__PURE__ */ s(ps, { variant: "pulse", size: "lg", "aria-hidden": "true" }),
|
|
3519
|
+
/* @__PURE__ */ s("span", { children: Z(
|
|
3520
|
+
je ? "booking.payment.confirming" : "booking.payment.processing"
|
|
3513
3521
|
) })
|
|
3514
3522
|
] }) : null
|
|
3515
3523
|
}
|
|
3516
3524
|
),
|
|
3517
3525
|
re.state.status === "failed" ? /* @__PURE__ */ s(
|
|
3518
|
-
|
|
3526
|
+
ee,
|
|
3519
3527
|
{
|
|
3520
|
-
ref:
|
|
3528
|
+
ref: nt,
|
|
3521
3529
|
variant: "error",
|
|
3522
3530
|
tabIndex: -1,
|
|
3523
|
-
className:
|
|
3524
|
-
children: /* @__PURE__ */ s(
|
|
3525
|
-
|
|
3531
|
+
className: Rt,
|
|
3532
|
+
children: /* @__PURE__ */ s(ee.Description, { children: re.state.error ?? Z(
|
|
3533
|
+
je ? "booking.payment.completionFailed" : "booking.payment.failed"
|
|
3526
3534
|
) })
|
|
3527
3535
|
}
|
|
3528
3536
|
) : null,
|
|
3529
|
-
|
|
3537
|
+
je ? $ == null ? void 0 : $(re) : C == null ? void 0 : C(re)
|
|
3530
3538
|
]
|
|
3531
3539
|
}
|
|
3532
|
-
) : null,
|
|
3533
|
-
const
|
|
3534
|
-
var
|
|
3540
|
+
) : null, ft = R(() => {
|
|
3541
|
+
const y = new Set(_e(_)), P = p.filter((V) => y.has(V.id)).map((V) => {
|
|
3542
|
+
var Y;
|
|
3535
3543
|
return {
|
|
3536
|
-
label:
|
|
3537
|
-
text: ((
|
|
3544
|
+
label: V.label,
|
|
3545
|
+
text: ((Y = V.criticalInformationToAccept) == null ? void 0 : Y.trim()) ?? ""
|
|
3538
3546
|
};
|
|
3539
|
-
}).filter((
|
|
3540
|
-
if (
|
|
3541
|
-
return
|
|
3547
|
+
}).filter((V) => V.text.length > 0);
|
|
3548
|
+
if (P.length !== 0)
|
|
3549
|
+
return P.length === 1 ? P[0].text : P.map((V) => `${V.label}: ${V.text}`).join(`
|
|
3542
3550
|
|
|
3543
3551
|
`);
|
|
3544
|
-
}, [
|
|
3545
|
-
if (
|
|
3546
|
-
const
|
|
3547
|
-
cascade:
|
|
3552
|
+
}, [p, _]), At = R(() => {
|
|
3553
|
+
if (j === "success" || j === "payment") return null;
|
|
3554
|
+
const y = se === "accordion" ? Di : se === "calendar" ? Mi : se === "flexible" ? Fi : se === "progress" ? _i : Ti, P = {
|
|
3555
|
+
cascade: B,
|
|
3548
3556
|
inputs: {
|
|
3549
|
-
specialties:
|
|
3550
|
-
services:
|
|
3551
|
-
operators:
|
|
3552
|
-
availableDates:
|
|
3553
|
-
availableSlots:
|
|
3554
|
-
nextAvailableDate:
|
|
3557
|
+
specialties: Ne,
|
|
3558
|
+
services: p,
|
|
3559
|
+
operators: ve,
|
|
3560
|
+
availableDates: g,
|
|
3561
|
+
availableSlots: l,
|
|
3562
|
+
nextAvailableDate: o
|
|
3555
3563
|
},
|
|
3556
|
-
value:
|
|
3557
|
-
onChange:
|
|
3558
|
-
onSubmit:
|
|
3564
|
+
value: _,
|
|
3565
|
+
onChange: me,
|
|
3566
|
+
onSubmit: lt,
|
|
3559
3567
|
policy: { country: t, lockedOperatorId: i },
|
|
3560
3568
|
detailsProps: {
|
|
3561
|
-
requireCodiceFiscale:
|
|
3562
|
-
requireDateOfBirth:
|
|
3569
|
+
requireCodiceFiscale: u,
|
|
3570
|
+
requireDateOfBirth: k,
|
|
3563
3571
|
requireInsuranceNumber: I,
|
|
3564
|
-
insuranceType:
|
|
3572
|
+
insuranceType: _.insuranceType,
|
|
3565
3573
|
showNote: w,
|
|
3566
|
-
showReturningPatientFlag:
|
|
3567
|
-
privacyPolicyUrl:
|
|
3568
|
-
termsUrl:
|
|
3574
|
+
showReturningPatientFlag: x,
|
|
3575
|
+
privacyPolicyUrl: S,
|
|
3576
|
+
termsUrl: A,
|
|
3569
3577
|
practiceConsent: D,
|
|
3570
|
-
criticalInformationToAccept:
|
|
3571
|
-
payment:
|
|
3572
|
-
paymentTermsUrl:
|
|
3573
|
-
paymentBlocked:
|
|
3574
|
-
billingInDetails:
|
|
3575
|
-
paymentNoticeStyle:
|
|
3578
|
+
criticalInformationToAccept: ft,
|
|
3579
|
+
payment: K.payment,
|
|
3580
|
+
paymentTermsUrl: T,
|
|
3581
|
+
paymentBlocked: K.blocked,
|
|
3582
|
+
billingInDetails: N,
|
|
3583
|
+
paymentNoticeStyle: M,
|
|
3576
3584
|
validateCodiceFiscale: b,
|
|
3577
|
-
validateInsuranceNumber:
|
|
3578
|
-
confirmationChannels:
|
|
3579
|
-
defaultConfirmationChannels:
|
|
3580
|
-
submitError:
|
|
3585
|
+
validateInsuranceNumber: pe,
|
|
3586
|
+
confirmationChannels: F,
|
|
3587
|
+
defaultConfirmationChannels: z,
|
|
3588
|
+
submitError: Ae ?? (j === "error" ? Z("booking.payment.submitFailed") : void 0)
|
|
3581
3589
|
},
|
|
3582
|
-
emptyServicesSlot:
|
|
3583
|
-
onboardingIncompleteSlot:
|
|
3584
|
-
loadingDates:
|
|
3585
|
-
loadingSlots:
|
|
3586
|
-
onDateSelect:
|
|
3587
|
-
onWindowChange:
|
|
3588
|
-
datePickerStyle:
|
|
3589
|
-
specialtyPickerStyle:
|
|
3590
|
-
servicePickerStyle:
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3590
|
+
emptyServicesSlot: L,
|
|
3591
|
+
onboardingIncompleteSlot: xe,
|
|
3592
|
+
loadingDates: he,
|
|
3593
|
+
loadingSlots: Se,
|
|
3594
|
+
onDateSelect: He,
|
|
3595
|
+
onWindowChange: Le,
|
|
3596
|
+
datePickerStyle: H,
|
|
3597
|
+
specialtyPickerStyle: Be,
|
|
3598
|
+
servicePickerStyle: ge,
|
|
3599
|
+
showServiceDuration: J,
|
|
3600
|
+
operatorPickerStyle: ae,
|
|
3601
|
+
submitting: W || j === "submitting",
|
|
3602
|
+
locale: Te,
|
|
3603
|
+
activeStep: X,
|
|
3604
|
+
setActiveStep: we,
|
|
3605
|
+
agentIdBase: Ee
|
|
3597
3606
|
};
|
|
3598
|
-
return /* @__PURE__ */ s(
|
|
3607
|
+
return /* @__PURE__ */ s(y, { ...P });
|
|
3599
3608
|
}, [
|
|
3600
|
-
|
|
3601
|
-
|
|
3602
|
-
|
|
3603
|
-
|
|
3604
|
-
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
|
|
3609
|
+
j,
|
|
3610
|
+
K.payment,
|
|
3611
|
+
K.blocked,
|
|
3612
|
+
T,
|
|
3613
|
+
Z,
|
|
3614
|
+
se,
|
|
3615
|
+
B,
|
|
3616
|
+
Ne,
|
|
3617
|
+
p,
|
|
3618
|
+
ve,
|
|
3608
3619
|
g,
|
|
3609
|
-
|
|
3610
|
-
h,
|
|
3620
|
+
l,
|
|
3611
3621
|
o,
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3615
|
-
pt,
|
|
3622
|
+
_,
|
|
3623
|
+
me,
|
|
3624
|
+
lt,
|
|
3616
3625
|
t,
|
|
3617
3626
|
i,
|
|
3618
|
-
|
|
3619
|
-
|
|
3627
|
+
u,
|
|
3628
|
+
k,
|
|
3620
3629
|
I,
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3630
|
+
N,
|
|
3631
|
+
M,
|
|
3632
|
+
Ae,
|
|
3624
3633
|
w,
|
|
3634
|
+
x,
|
|
3625
3635
|
S,
|
|
3626
|
-
|
|
3627
|
-
T,
|
|
3636
|
+
A,
|
|
3628
3637
|
D,
|
|
3629
|
-
|
|
3638
|
+
ft,
|
|
3630
3639
|
b,
|
|
3631
|
-
|
|
3632
|
-
O,
|
|
3633
|
-
K,
|
|
3634
|
-
Y,
|
|
3640
|
+
pe,
|
|
3635
3641
|
F,
|
|
3636
|
-
|
|
3637
|
-
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3642
|
+
z,
|
|
3643
|
+
L,
|
|
3644
|
+
xe,
|
|
3645
|
+
he,
|
|
3646
|
+
Se,
|
|
3647
|
+
He,
|
|
3648
|
+
Le,
|
|
3643
3649
|
H,
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3650
|
+
Be,
|
|
3651
|
+
ge,
|
|
3652
|
+
J,
|
|
3653
|
+
ae,
|
|
3654
|
+
W,
|
|
3655
|
+
Te,
|
|
3656
|
+
X,
|
|
3657
|
+
Ee
|
|
3648
3658
|
]);
|
|
3649
3659
|
return /* @__PURE__ */ v(
|
|
3650
3660
|
"div",
|
|
3651
3661
|
{
|
|
3652
|
-
ref:
|
|
3662
|
+
ref: ce,
|
|
3653
3663
|
role: "region",
|
|
3654
|
-
"aria-label":
|
|
3655
|
-
id:
|
|
3664
|
+
"aria-label": jt,
|
|
3665
|
+
id: Ee,
|
|
3656
3666
|
"data-component": "booking",
|
|
3657
|
-
"data-component-id":
|
|
3658
|
-
"data-variant":
|
|
3659
|
-
className:
|
|
3660
|
-
variant:
|
|
3661
|
-
surface:
|
|
3662
|
-
className:
|
|
3667
|
+
"data-component-id": Ee,
|
|
3668
|
+
"data-variant": se,
|
|
3669
|
+
className: pi({
|
|
3670
|
+
variant: se,
|
|
3671
|
+
surface: te,
|
|
3672
|
+
className: kt
|
|
3663
3673
|
}),
|
|
3664
3674
|
tabIndex: -1,
|
|
3665
|
-
onFocus: (
|
|
3666
|
-
|
|
3675
|
+
onFocus: (y) => {
|
|
3676
|
+
qe.current = y.target, Qe == null || Qe(y);
|
|
3667
3677
|
},
|
|
3668
|
-
onBlur: (
|
|
3669
|
-
const
|
|
3678
|
+
onBlur: (y) => {
|
|
3679
|
+
const P = y.target;
|
|
3670
3680
|
window.setTimeout(() => {
|
|
3671
|
-
var
|
|
3672
|
-
const
|
|
3673
|
-
|
|
3674
|
-
}),
|
|
3681
|
+
var Y;
|
|
3682
|
+
const V = document.activeElement;
|
|
3683
|
+
qe.current === P && P.isConnected && !(V && ((Y = ce.current) != null && Y.contains(V))) && (qe.current = null);
|
|
3684
|
+
}), Re == null || Re(y);
|
|
3675
3685
|
},
|
|
3676
|
-
...
|
|
3686
|
+
...Ie,
|
|
3677
3687
|
children: [
|
|
3678
|
-
/* @__PURE__ */ s("div", { role: "status", className: "ds:sr-only", children:
|
|
3688
|
+
/* @__PURE__ */ s("div", { role: "status", className: "ds:sr-only", children: tt }),
|
|
3679
3689
|
/* @__PURE__ */ v(
|
|
3680
3690
|
"div",
|
|
3681
3691
|
{
|
|
@@ -3688,23 +3698,23 @@ const Bi = ls(
|
|
|
3688
3698
|
"ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]"
|
|
3689
3699
|
].join(" "),
|
|
3690
3700
|
children: [
|
|
3691
|
-
/* @__PURE__ */ s("h2", { className: "type-title-card ds:text-[var(--foreground)] ds:m-0", children:
|
|
3692
|
-
/* @__PURE__ */ s("p", { className: "type-body-sm ds:text-[var(--foreground)] ds:m-0", children:
|
|
3701
|
+
/* @__PURE__ */ s("h2", { className: "type-title-card ds:text-[var(--foreground)] ds:m-0", children: Z("booking.regionLabel") }),
|
|
3702
|
+
/* @__PURE__ */ s("p", { className: "type-body-sm ds:text-[var(--foreground)] ds:m-0", children: Z("booking.headingSubtitle") })
|
|
3693
3703
|
]
|
|
3694
3704
|
}
|
|
3695
3705
|
),
|
|
3696
|
-
|
|
3697
|
-
|
|
3706
|
+
K.cancelled ? /* @__PURE__ */ s(ee, { variant: "info", children: /* @__PURE__ */ s(ee.Description, { children: Z("booking.payment.cancelled") }) }) : null,
|
|
3707
|
+
wt ?? Ct ?? At
|
|
3698
3708
|
]
|
|
3699
3709
|
}
|
|
3700
3710
|
);
|
|
3701
3711
|
}
|
|
3702
3712
|
);
|
|
3703
|
-
|
|
3713
|
+
Ei.displayName = "Booking";
|
|
3704
3714
|
export {
|
|
3705
|
-
|
|
3706
|
-
|
|
3707
|
-
|
|
3708
|
-
|
|
3715
|
+
Ei as B,
|
|
3716
|
+
Jt as C,
|
|
3717
|
+
Ce as O,
|
|
3718
|
+
En as b
|
|
3709
3719
|
};
|
|
3710
|
-
//# sourceMappingURL=booking-
|
|
3720
|
+
//# sourceMappingURL=booking-BN7TXe27.js.map
|