@alfadocs/ui-kit 0.30.0 → 0.30.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.
Files changed (52) hide show
  1. package/dist/_chunks/{booking-BYuc_8HV.js → booking-CBaSujVP.js} +803 -729
  2. package/dist/_chunks/{patient-search-BhlxYAI3.js → patient-search-ZpHN-pgJ.js} +566 -510
  3. package/dist/_chunks/{public-footer.agent-CA29gxHJ.js → public-footer.agent-DivkKdG4.js} +188 -167
  4. package/dist/_chunks/{reviews-panel-CFttsfuC.js → reviews-panel-D-zjPKFL.js} +198 -178
  5. package/dist/agent-catalog.json +1 -1
  6. package/dist/components/booking/booking-types.d.ts +38 -0
  7. package/dist/components/booking/details-form.d.ts +7 -0
  8. package/dist/components/booking/index.js +1 -1
  9. package/dist/components/patient-search/index.js +1 -1
  10. package/dist/components/patient-search/patient-search.d.ts +9 -0
  11. package/dist/components/public-footer/index.js +1 -1
  12. package/dist/components/public-footer/public-footer.d.ts +7 -0
  13. package/dist/components/reviews-panel/index.js +1 -1
  14. package/dist/components/reviews-panel/reviews-panel.d.ts +8 -0
  15. package/dist/i18n/config.js +146 -20
  16. package/dist/i18n/locales/ar.d.ts +7 -0
  17. package/dist/i18n/locales/de.d.ts +7 -0
  18. package/dist/i18n/locales/el.d.ts +7 -0
  19. package/dist/i18n/locales/es.d.ts +7 -0
  20. package/dist/i18n/locales/fr.d.ts +7 -0
  21. package/dist/i18n/locales/hi.d.ts +7 -0
  22. package/dist/i18n/locales/ja.d.ts +7 -0
  23. package/dist/i18n/locales/nl.d.ts +7 -0
  24. package/dist/i18n/locales/pl.d.ts +7 -0
  25. package/dist/i18n/locales/pt.d.ts +7 -0
  26. package/dist/i18n/locales/ro.d.ts +7 -0
  27. package/dist/i18n/locales/ru.d.ts +7 -0
  28. package/dist/i18n/locales/sq.d.ts +7 -0
  29. package/dist/i18n/locales/sv.d.ts +7 -0
  30. package/dist/i18n/locales/tr.d.ts +7 -0
  31. package/dist/i18n/locales/zh.d.ts +7 -0
  32. package/dist/i18n/resources.d.ts +14 -0
  33. package/dist/index.js +4 -4
  34. package/dist/locales/ar.json +8 -1
  35. package/dist/locales/de.json +8 -1
  36. package/dist/locales/el.json +8 -1
  37. package/dist/locales/en.json +8 -1
  38. package/dist/locales/es.json +8 -1
  39. package/dist/locales/fr.json +8 -1
  40. package/dist/locales/hi.json +8 -1
  41. package/dist/locales/it.json +8 -1
  42. package/dist/locales/ja.json +8 -1
  43. package/dist/locales/nl.json +8 -1
  44. package/dist/locales/pl.json +8 -1
  45. package/dist/locales/pt.json +8 -1
  46. package/dist/locales/ro.json +8 -1
  47. package/dist/locales/ru.json +8 -1
  48. package/dist/locales/sq.json +8 -1
  49. package/dist/locales/sv.json +8 -1
  50. package/dist/locales/tr.json +8 -1
  51. package/dist/locales/zh.json +8 -1
  52. package/package.json +5 -1
@@ -1,43 +1,43 @@
1
- import { jsxs as g, jsx as a, Fragment as ie } from "react/jsx-runtime";
2
- import { forwardRef as Ve, useId as Fe, useState as z, useCallback as ee, useRef as ne, useEffect as se, useMemo as I, useImperativeHandle as ot } from "react";
3
- import { c as xe } from "./index-D2ZczOXr.js";
4
- import { useTranslation as M, Trans as rt } from "react-i18next";
5
- import { u as dt } from "./registry-C9nwlNyL.js";
6
- import { B as oe } from "./button-DD_0Xdmr.js";
7
- import { C as we } from "./checkbox-mwbrPZDY.js";
8
- import { C as lt } from "./checkbox-group-Bwmt1ovQ.js";
9
- import { D as ct } from "./date-picker-D0Ry1dMz.js";
10
- import { E as mt } from "./email-input-DvJ_kPKL.js";
11
- import { F as U } from "./form-field-BOm9hK35.js";
12
- import { P as ut } from "./phone-input-DKSHX7NQ.js";
13
- import { T as pt } from "./text-area-D5GAe8pV.js";
14
- import { T as fe } from "./text-input-CakysYnD.js";
15
- import { S as gt } from "./spinner-CCByyvcb.js";
16
- import { A as $ } from "./alert-ywPR59NE.js";
17
- import { I as Be } from "./icon-button-BRHSSFmZ.js";
18
- import { S as Se } from "./select-C92AT_OZ.js";
19
- import { S as ye } from "./skeleton-CZbwyJAA.js";
20
- import { E as Re } from "./empty-state-BLy7tigq.js";
21
- import { S as ft } from "./stepper-accordion-BfS6lUB9.js";
22
- import { S as ht } from "./stepper-progress-jFY8BSf7.js";
23
- import { p as Q } from "./parseISO-Dk4xa7q6.js";
24
- import { o as ze, f as me, d as vt, h as be, q as he } from "./react-day-picker-D3yzgvDB.js";
25
- import { C as bt } from "./chevron-left-CX1jqD2M.js";
26
- import { C as yt } from "./chevron-right-BrpYejk0.js";
27
- import { i as Oe } from "./isSameDay-DHG8Xade.js";
1
+ import { jsxs as f, jsx as a, Fragment as Z } from "react/jsx-runtime";
2
+ import { forwardRef as qe, useId as He, useState as H, useCallback as ae, useRef as te, useEffect as Q, useMemo as I, useImperativeHandle as pt } from "react";
3
+ import { c as Ie } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as T, Trans as gt } from "react-i18next";
5
+ import { u as ft } from "./registry-C9nwlNyL.js";
6
+ import { A as F } from "./alert-ywPR59NE.js";
7
+ import { B as se } from "./button-DD_0Xdmr.js";
8
+ import { C as Ae } from "./checkbox-mwbrPZDY.js";
9
+ import { C as ht } from "./checkbox-group-Bwmt1ovQ.js";
10
+ import { D as vt } from "./date-picker-D0Ry1dMz.js";
11
+ import { E as bt } from "./email-input-DvJ_kPKL.js";
12
+ import { F as Y } from "./form-field-BOm9hK35.js";
13
+ import { P as yt } from "./phone-input-DKSHX7NQ.js";
14
+ import { T as kt } from "./text-area-D5GAe8pV.js";
15
+ import { T as be } from "./text-input-CakysYnD.js";
16
+ import { S as xt } from "./spinner-CCByyvcb.js";
17
+ import { I as Re } from "./icon-button-BRHSSFmZ.js";
18
+ import { S as we } from "./select-C92AT_OZ.js";
19
+ import { S as Se } from "./skeleton-CZbwyJAA.js";
20
+ import { E as Ge } from "./empty-state-BLy7tigq.js";
21
+ import { S as St } from "./stepper-accordion-BfS6lUB9.js";
22
+ import { S as Nt } from "./stepper-progress-jFY8BSf7.js";
23
+ import { p as ee } from "./parseISO-Dk4xa7q6.js";
24
+ import { o as Ue, f as fe, d as It, h as xe, q as ye } from "./react-day-picker-D3yzgvDB.js";
25
+ import { C as wt } from "./chevron-left-CX1jqD2M.js";
26
+ import { C as Ct } from "./chevron-right-BrpYejk0.js";
27
+ import { i as ze } from "./isSameDay-DHG8Xade.js";
28
28
  import { c as O } from "./createLucideIcon-CrFbzy84.js";
29
- import { M as kt, S as xt } from "./sun-BuXE0xUS.js";
30
- import { S as St } from "./stethoscope-DT5qCW8Y.js";
31
- import { H as Nt } from "./heart-pulse-CvuyFKHB.js";
32
- import { E as It } from "./eye-LHlSU38h.js";
33
- import { S as wt } from "./sparkles-CuYXqQLg.js";
29
+ import { M as Mt, S as Dt } from "./sun-BuXE0xUS.js";
30
+ import { S as Tt } from "./stethoscope-DT5qCW8Y.js";
31
+ import { H as _t } from "./heart-pulse-CvuyFKHB.js";
32
+ import { E as At } from "./eye-LHlSU38h.js";
33
+ import { S as Bt } from "./sparkles-CuYXqQLg.js";
34
34
  /**
35
35
  * @license lucide-react v1.8.0 - ISC
36
36
  *
37
37
  * This source code is licensed under the ISC license.
38
38
  * See the LICENSE file in the root directory of this source tree.
39
39
  */
40
- const Ct = [
40
+ const Ot = [
41
41
  [
42
42
  "path",
43
43
  {
@@ -45,14 +45,14 @@ const Ct = [
45
45
  key: "169zse"
46
46
  }
47
47
  ]
48
- ], Mt = O("activity", Ct);
48
+ ], Et = O("activity", Ot);
49
49
  /**
50
50
  * @license lucide-react v1.8.0 - ISC
51
51
  *
52
52
  * This source code is licensed under the ISC license.
53
53
  * See the LICENSE file in the root directory of this source tree.
54
54
  */
55
- const Dt = [
55
+ const Pt = [
56
56
  ["path", { d: "M10 16c.5.3 1.2.5 2 .5s1.5-.2 2-.5", key: "1u7htd" }],
57
57
  ["path", { d: "M15 12h.01", key: "1k8ypt" }],
58
58
  [
@@ -63,14 +63,14 @@ const Dt = [
63
63
  }
64
64
  ],
65
65
  ["path", { d: "M9 12h.01", key: "157uk2" }]
66
- ], Tt = O("baby", Dt);
66
+ ], Vt = O("baby", Pt);
67
67
  /**
68
68
  * @license lucide-react v1.8.0 - ISC
69
69
  *
70
70
  * This source code is licensed under the ISC license.
71
71
  * See the LICENSE file in the root directory of this source tree.
72
72
  */
73
- const _t = [
73
+ const Lt = [
74
74
  [
75
75
  "path",
76
76
  {
@@ -78,14 +78,14 @@ const _t = [
78
78
  key: "w610uw"
79
79
  }
80
80
  ]
81
- ], At = O("bone", _t);
81
+ ], Ft = O("bone", Lt);
82
82
  /**
83
83
  * @license lucide-react v1.8.0 - ISC
84
84
  *
85
85
  * This source code is licensed under the ISC license.
86
86
  * See the LICENSE file in the root directory of this source tree.
87
87
  */
88
- const Bt = [
88
+ const Rt = [
89
89
  ["path", { d: "M12 18V5", key: "adv99a" }],
90
90
  ["path", { d: "M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4", key: "1e3is1" }],
91
91
  ["path", { d: "M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5", key: "1gqd8o" }],
@@ -94,14 +94,14 @@ const Bt = [
94
94
  ["path", { d: "M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517", key: "1gq6am" }],
95
95
  ["path", { d: "M6 18a4 4 0 0 1-2-7.464", key: "k1g0md" }],
96
96
  ["path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77", key: "q97ue3" }]
97
- ], Ot = O("brain", Bt);
97
+ ], zt = O("brain", Rt);
98
98
  /**
99
99
  * @license lucide-react v1.8.0 - ISC
100
100
  *
101
101
  * This source code is licensed under the ISC license.
102
102
  * See the LICENSE file in the root directory of this source tree.
103
103
  */
104
- const Et = [
104
+ const $t = [
105
105
  ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
106
106
  ["path", { d: "M16 2v4", key: "4m81vk" }],
107
107
  ["path", { d: "M3 10h18", key: "8toen8" }],
@@ -110,14 +110,14 @@ const Et = [
110
110
  ["path", { d: "M13 18H7", key: "bb0bb7" }],
111
111
  ["path", { d: "M7 14h.01", key: "1qa3f1" }],
112
112
  ["path", { d: "M17 18h.01", key: "1bdyru" }]
113
- ], Pt = O("calendar-range", Et);
113
+ ], Kt = O("calendar-range", $t);
114
114
  /**
115
115
  * @license lucide-react v1.8.0 - ISC
116
116
  *
117
117
  * This source code is licensed under the ISC license.
118
118
  * See the LICENSE file in the root directory of this source tree.
119
119
  */
120
- const Lt = [
120
+ const jt = [
121
121
  ["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
122
122
  [
123
123
  "path",
@@ -127,89 +127,89 @@ const Lt = [
127
127
  }
128
128
  ],
129
129
  ["path", { d: "m9 14 2 2 4-4", key: "df797q" }]
130
- ], Vt = O("clipboard-check", Lt);
130
+ ], qt = O("clipboard-check", jt);
131
131
  /**
132
132
  * @license lucide-react v1.8.0 - ISC
133
133
  *
134
134
  * This source code is licensed under the ISC license.
135
135
  * See the LICENSE file in the root directory of this source tree.
136
136
  */
137
- const Ft = [
137
+ const Ht = [
138
138
  ["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" }],
139
139
  ["path", { d: "M15 8.5a2.5 2.5 0 0 0-5 0v1a2 2 0 1 1 0 4", key: "1qnva7" }]
140
- ], Rt = O("ear", Ft);
140
+ ], Gt = O("ear", Ht);
141
141
  /**
142
142
  * @license lucide-react v1.8.0 - ISC
143
143
  *
144
144
  * This source code is licensed under the ISC license.
145
145
  * See the LICENSE file in the root directory of this source tree.
146
146
  */
147
- const zt = [
147
+ const Ut = [
148
148
  ["path", { d: "M6 18h8", key: "1borvv" }],
149
149
  ["path", { d: "M3 22h18", key: "8prr45" }],
150
150
  ["path", { d: "M14 22a7 7 0 1 0 0-14h-1", key: "1jwaiy" }],
151
151
  ["path", { d: "M9 14h2", key: "197e7h" }],
152
152
  ["path", { d: "M9 12a2 2 0 0 1-2-2V6h6v4a2 2 0 0 1-2 2Z", key: "1bmzmy" }],
153
153
  ["path", { d: "M12 6V3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3", key: "1drr47" }]
154
- ], $t = O("microscope", zt);
154
+ ], Yt = O("microscope", Ut);
155
155
  /**
156
156
  * @license lucide-react v1.8.0 - ISC
157
157
  *
158
158
  * This source code is licensed under the ISC license.
159
159
  * See the LICENSE file in the root directory of this source tree.
160
160
  */
161
- const Kt = [
161
+ const Zt = [
162
162
  [
163
163
  "path",
164
164
  { 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" }
165
165
  ],
166
166
  ["path", { d: "m8.5 8.5 7 7", key: "rvfmvr" }]
167
- ], jt = O("pill", Kt);
167
+ ], Jt = O("pill", Zt);
168
168
  /**
169
169
  * @license lucide-react v1.8.0 - ISC
170
170
  *
171
171
  * This source code is licensed under the ISC license.
172
172
  * See the LICENSE file in the root directory of this source tree.
173
173
  */
174
- const qt = [
174
+ const Xt = [
175
175
  ["path", { d: "M3 7V5a2 2 0 0 1 2-2h2", key: "aa7l1z" }],
176
176
  ["path", { d: "M17 3h2a2 2 0 0 1 2 2v2", key: "4qcy5o" }],
177
177
  ["path", { d: "M21 17v2a2 2 0 0 1-2 2h-2", key: "6vwrx8" }],
178
178
  ["path", { d: "M7 21H5a2 2 0 0 1-2-2v-2", key: "ioqczr" }],
179
179
  ["path", { d: "M7 12h10", key: "b7w52i" }]
180
- ], Ht = O("scan-line", qt);
180
+ ], Wt = O("scan-line", Xt);
181
181
  /**
182
182
  * @license lucide-react v1.8.0 - ISC
183
183
  *
184
184
  * This source code is licensed under the ISC license.
185
185
  * See the LICENSE file in the root directory of this source tree.
186
186
  */
187
- const Gt = [
187
+ const Qt = [
188
188
  ["circle", { cx: "6", cy: "6", r: "3", key: "1lh9wr" }],
189
189
  ["path", { d: "M8.12 8.12 12 12", key: "1alkpv" }],
190
190
  ["path", { d: "M20 4 8.12 15.88", key: "xgtan2" }],
191
191
  ["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }],
192
192
  ["path", { d: "M14.8 14.8 20 20", key: "ptml3r" }]
193
- ], Ut = O("scissors", Gt);
193
+ ], ea = O("scissors", Qt);
194
194
  /**
195
195
  * @license lucide-react v1.8.0 - ISC
196
196
  *
197
197
  * This source code is licensed under the ISC license.
198
198
  * See the LICENSE file in the root directory of this source tree.
199
199
  */
200
- const Yt = [
200
+ const ta = [
201
201
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
202
202
  ["path", { d: "M8 14s1.5 2 4 2 4-2 4-2", key: "1y1vjs" }],
203
203
  ["line", { x1: "9", x2: "9.01", y1: "9", y2: "9", key: "yxxnd0" }],
204
204
  ["line", { x1: "15", x2: "15.01", y1: "9", y2: "9", key: "1p4y9e" }]
205
- ], Zt = O("smile", Yt);
205
+ ], aa = O("smile", ta);
206
206
  /**
207
207
  * @license lucide-react v1.8.0 - ISC
208
208
  *
209
209
  * This source code is licensed under the ISC license.
210
210
  * See the LICENSE file in the root directory of this source tree.
211
211
  */
212
- const Jt = [
212
+ const sa = [
213
213
  ["path", { d: "M12 10V2", key: "16sf7g" }],
214
214
  ["path", { d: "m4.93 10.93 1.41 1.41", key: "2a7f42" }],
215
215
  ["path", { d: "M2 18h2", key: "j10viu" }],
@@ -218,25 +218,25 @@ const Jt = [
218
218
  ["path", { d: "M22 22H2", key: "19qnx5" }],
219
219
  ["path", { d: "m16 6-4 4-4-4", key: "6wukr" }],
220
220
  ["path", { d: "M16 18a4 4 0 0 0-8 0", key: "1lzouq" }]
221
- ], Xt = O("sunset", Jt);
221
+ ], na = O("sunset", sa);
222
222
  /**
223
223
  * @license lucide-react v1.8.0 - ISC
224
224
  *
225
225
  * This source code is licensed under the ISC license.
226
226
  * See the LICENSE file in the root directory of this source tree.
227
227
  */
228
- const Wt = [
228
+ const ia = [
229
229
  ["path", { d: "m18 2 4 4", key: "22kx64" }],
230
230
  ["path", { d: "m17 7 3-3", key: "1w1zoj" }],
231
231
  ["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" }],
232
232
  ["path", { d: "m9 11 4 4", key: "rovt3i" }],
233
233
  ["path", { d: "m5 19-3 3", key: "59f2uf" }],
234
234
  ["path", { d: "m14 4 6 6", key: "yqp9t2" }]
235
- ], Ee = O("syringe", Wt);
236
- function Qt(e, t, s) {
237
- return ze(e, -1, s);
235
+ ], $e = O("syringe", ia);
236
+ function oa(e, t, s) {
237
+ return Ue(e, -1, s);
238
238
  }
239
- const ea = {
239
+ const ra = {
240
240
  id: "booking",
241
241
  capabilities: ["navigate", "view_change"],
242
242
  state: {
@@ -278,12 +278,12 @@ const ea = {
278
278
  description: "Sourced from the id prop."
279
279
  }
280
280
  }
281
- }, Me = [
281
+ }, Oe = [
282
282
  "email",
283
283
  "whatsapp",
284
284
  "sms"
285
- ], ue = "all", ta = "de";
286
- function aa(e) {
285
+ ], he = "all", da = "de";
286
+ function la(e) {
287
287
  return [...e.lockedOperatorId ? e.specialties.filter(
288
288
  (s) => {
289
289
  var n;
@@ -294,7 +294,7 @@ function aa(e) {
294
294
  return i - o;
295
295
  });
296
296
  }
297
- function sa(e) {
297
+ function ca(e) {
298
298
  let t = e.services;
299
299
  return e.lockedOperatorId && (t = t.filter(
300
300
  (s) => {
@@ -303,7 +303,7 @@ function sa(e) {
303
303
  }
304
304
  )), e.useSpecialties && e.value.specialtyId && (t = t.filter((s) => s.specialtyId === e.value.specialtyId)), t;
305
305
  }
306
- function na(e) {
306
+ function ma(e) {
307
307
  if (e.useSpecialties && e.value.specialtyId) {
308
308
  const t = e.value.specialtyId;
309
309
  return e.operators.filter(
@@ -324,20 +324,20 @@ function na(e) {
324
324
  }
325
325
  return [];
326
326
  }
327
- function ia(e, t) {
328
- const s = e.country === ta, n = !s || e.value.insuranceType !== void 0, i = !!e.useSpecialties && n, l = !i || e.value.specialtyId !== void 0, c = !l || e.value.serviceId !== void 0, d = t.operators, h = !!e.allowOperatorSelection && c && e.value.serviceId !== void 0 && !e.lockedOperatorId && d.length > 1, u = c && e.value.serviceId !== void 0, y = (!u || e.value.date !== void 0) && e.value.date !== void 0, x = (!y || e.value.slotKey !== void 0) && e.value.slotKey !== void 0, k = !!e.value.serviceId && d.length === 0;
327
+ function ua(e, t) {
328
+ const s = e.country === da, n = !s || e.value.insuranceType !== void 0, i = !!e.useSpecialties && n, l = !i || e.value.specialtyId !== void 0, c = !l || e.value.serviceId !== void 0, d = t.operators, p = !!e.allowOperatorSelection && c && e.value.serviceId !== void 0 && !e.lockedOperatorId && d.length > 1, g = c && e.value.serviceId !== void 0, k = (!g || e.value.date !== void 0) && e.value.date !== void 0, x = (!k || e.value.slotKey !== void 0) && e.value.slotKey !== void 0, y = !!e.value.serviceId && d.length === 0;
329
329
  return {
330
330
  insurance: s,
331
331
  specialty: i,
332
332
  service: l,
333
- operator: h,
334
- date: u,
335
- slot: y,
333
+ operator: p,
334
+ date: g,
335
+ slot: k,
336
336
  details: x,
337
- onboardingIncomplete: k
337
+ onboardingIncomplete: y
338
338
  };
339
339
  }
340
- function oa(e, t) {
340
+ function pa(e, t) {
341
341
  const s = [];
342
342
  t.insurance && s.push(1), t.specialty && s.push(2), s.push(3), t.operator && s.push(4), s.push(5), s.push(6), s.push(7);
343
343
  const n = {
@@ -355,16 +355,16 @@ function oa(e, t) {
355
355
  visibleSteps: s
356
356
  };
357
357
  }
358
- function ra(e) {
358
+ function ga(e) {
359
359
  const t = {
360
- specialties: aa(e),
361
- services: sa(e),
362
- operators: na(e)
363
- }, s = ia(e, t), { currentStep: n, visibleSteps: i } = oa(e, s);
360
+ specialties: la(e),
361
+ services: ca(e),
362
+ operators: ma(e)
363
+ }, s = ua(e, t), { currentStep: n, visibleSteps: i } = pa(e, s);
364
364
  let o;
365
365
  if (e.value.date && e.value.slotKey) {
366
366
  const d = e.availableSlots[e.value.date];
367
- d && (o = d.find((h) => h.key === e.value.slotKey));
367
+ d && (o = d.find((p) => p.key === e.value.slotKey));
368
368
  }
369
369
  const l = e.value.serviceId ? e.services.find((d) => d.id === e.value.serviceId) : void 0, c = e.value.serviceId !== void 0 && e.value.date !== void 0 && e.value.slotKey !== void 0 && (!s.insurance || e.value.insuranceType !== void 0) && (!s.specialty || e.value.specialtyId !== void 0);
370
370
  return {
@@ -378,7 +378,7 @@ function ra(e) {
378
378
  selectedSlot: o
379
379
  };
380
380
  }
381
- function $e(e, t) {
381
+ function Ye(e, t) {
382
382
  return {
383
383
  ...e,
384
384
  insuranceType: t,
@@ -390,7 +390,7 @@ function $e(e, t) {
390
390
  details: void 0
391
391
  };
392
392
  }
393
- function Ke(e, t) {
393
+ function Ze(e, t) {
394
394
  return {
395
395
  ...e,
396
396
  specialtyId: t,
@@ -401,20 +401,20 @@ function Ke(e, t) {
401
401
  details: void 0
402
402
  };
403
403
  }
404
- function je(e, t) {
404
+ function Je(e, t) {
405
405
  return {
406
406
  ...e,
407
407
  serviceId: t,
408
408
  // Default the operator to the "All operators" sentinel so a patient
409
409
  // who doesn't care about picking lands on a satisfied step 4 without
410
410
  // any further input.
411
- operatorId: t ? ue : void 0,
411
+ operatorId: t ? he : void 0,
412
412
  date: void 0,
413
413
  slotKey: void 0,
414
414
  details: void 0
415
415
  };
416
416
  }
417
- function qe(e, t) {
417
+ function Xe(e, t) {
418
418
  return {
419
419
  ...e,
420
420
  operatorId: t,
@@ -423,7 +423,7 @@ function qe(e, t) {
423
423
  details: void 0
424
424
  };
425
425
  }
426
- function ke(e, t) {
426
+ function Ne(e, t) {
427
427
  return {
428
428
  ...e,
429
429
  date: t,
@@ -432,47 +432,47 @@ function ke(e, t) {
432
432
  // since the user has already filled some fields.
433
433
  };
434
434
  }
435
- function He(e, t) {
435
+ function We(e, t) {
436
436
  return {
437
437
  ...e,
438
438
  slotKey: t
439
439
  };
440
440
  }
441
- function da(e, t) {
441
+ function fa(e, t) {
442
442
  let s = e;
443
443
  if (t.lockedOperatorId && s.operatorId !== t.lockedOperatorId && (s = { ...s, operatorId: t.lockedOperatorId }), t.useSpecialties && t.specialties.length === 1 && s.specialtyId === void 0 && (s = { ...s, specialtyId: t.specialties[0].id }), t.autoSelectSingleService) {
444
444
  const n = s.specialtyId ? t.services.filter((i) => i.specialtyId === s.specialtyId) : t.services;
445
- n.length === 1 && s.serviceId === void 0 && (s = { ...s, serviceId: n[0].id }, s.operatorId === void 0 && (s = { ...s, operatorId: ue }));
445
+ n.length === 1 && s.serviceId === void 0 && (s = { ...s, serviceId: n[0].id }, s.operatorId === void 0 && (s = { ...s, operatorId: he }));
446
446
  }
447
447
  return s;
448
448
  }
449
- function De(e) {
450
- if (e.operatorId && e.operatorId !== ue)
449
+ function Ee(e) {
450
+ if (e.operatorId && e.operatorId !== he)
451
451
  return e.operatorId;
452
452
  }
453
- function la(e) {
453
+ function ha(e) {
454
454
  if (!e) return !1;
455
455
  const t = e.trim();
456
456
  return /^\+?\d[\d\s\-()]{6,}$/.test(t);
457
457
  }
458
- function Ge(e) {
458
+ function Qe(e) {
459
459
  const t = e && e.length > 0 ? e : ["email"], s = new Set(t);
460
- return Me.filter((n) => s.has(n));
460
+ return Oe.filter((n) => s.has(n));
461
461
  }
462
- function ca(e, t, s) {
463
- const n = Ge(e), i = new Set(n);
462
+ function va(e, t, s) {
463
+ const n = Qe(e), i = new Set(n);
464
464
  if (s)
465
- return Me.filter(
466
- (h) => s.includes(h) && i.has(h)
465
+ return Oe.filter(
466
+ (p) => s.includes(p) && i.has(p)
467
467
  );
468
468
  const o = [];
469
469
  i.has("email") && o.push("email");
470
- const l = la(t), c = i.has("whatsapp");
470
+ const l = ha(t), c = i.has("whatsapp");
471
471
  c && l && o.push("whatsapp"), !c && i.has("sms") && o.push("sms");
472
472
  const d = new Set(o);
473
- return Me.filter((h) => d.has(h));
473
+ return Oe.filter((p) => d.has(p));
474
474
  }
475
- const Pe = 500, ma = /^[A-Z0-9]{16}$/, ua = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Le = 300, ve = { state: "idle" }, Te = Ve(
475
+ const Ke = 500, ba = /^[A-Z0-9]{16}$/, ya = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, je = 300, ke = { state: "idle" }, Pe = qe(
476
476
  ({
477
477
  value: e,
478
478
  onChange: t,
@@ -483,129 +483,130 @@ const Pe = 500, ma = /^[A-Z0-9]{16}$/, ua = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Le = 3
483
483
  insuranceType: l,
484
484
  showNote: c = !1,
485
485
  showReturningPatientFlag: d = !1,
486
- privacyPolicyUrl: h,
487
- termsUrl: u,
488
- validateCodiceFiscale: p,
489
- validateInsuranceNumber: y,
490
- submitting: f = !1,
486
+ privacyPolicyUrl: p,
487
+ termsUrl: g,
488
+ validateCodiceFiscale: u,
489
+ validateInsuranceNumber: k,
490
+ submitting: h = !1,
491
491
  summarySlot: x,
492
- defaultPhoneCountry: k,
493
- confirmationChannels: _,
494
- defaultConfirmationChannels: Y
495
- }, S) => {
496
- var X, W;
497
- const { t: r } = M(), b = Fe(), [D, C] = z(ve), [v, N] = z(ve), [E, Z] = z({}), P = ee(
498
- (m) => Z((w) => ({ ...w, [m]: !0 })),
492
+ defaultPhoneCountry: y,
493
+ confirmationChannels: C,
494
+ defaultConfirmationChannels: A,
495
+ submitError: S
496
+ }, v) => {
497
+ var _, me;
498
+ const { t: r } = T(), E = He(), [M, b] = H(ke), [N, R] = H(ke), [B, J] = H({}), P = ae(
499
+ (m) => J((w) => ({ ...w, [m]: !0 })),
499
500
  []
500
- ), V = ne(null), F = ne(
501
+ ), z = te(null), G = te(
501
502
  null
502
503
  );
503
- se(
504
+ Q(
504
505
  () => () => {
505
- V.current && clearTimeout(V.current), F.current && clearTimeout(F.current);
506
+ z.current && clearTimeout(z.current), G.current && clearTimeout(G.current);
506
507
  },
507
508
  []
508
509
  );
509
- const T = ee(
510
+ const D = ae(
510
511
  (m) => t({ ...e, ...m }),
511
512
  [e, t]
512
- ), K = I(
513
- () => Ge(_),
514
- [_]
515
- ), j = K.length >= 2, ge = ne(!1);
516
- se(() => {
513
+ ), ne = I(
514
+ () => Qe(C),
515
+ [C]
516
+ ), j = ne.length >= 2, oe = te(!1);
517
+ Q(() => {
517
518
  if (!j) {
518
- e.confirmationChannels !== void 0 && T({ confirmationChannels: void 0 });
519
+ e.confirmationChannels !== void 0 && D({ confirmationChannels: void 0 });
519
520
  return;
520
521
  }
521
522
  if (e.confirmationChannels !== void 0) {
522
- ge.current = !0;
523
+ oe.current = !0;
523
524
  return;
524
525
  }
525
- const m = ca(
526
- K,
526
+ const m = va(
527
+ ne,
527
528
  e.mobilePhone,
528
- Y
529
+ A
529
530
  );
530
- ge.current = !0, T({ confirmationChannels: m });
531
+ oe.current = !0, D({ confirmationChannels: m });
531
532
  }, [
532
533
  j,
533
- K,
534
+ ne,
534
535
  e.mobilePhone,
535
- Y
536
+ A
536
537
  ]);
537
- const te = I(
538
+ const ie = I(
538
539
  () => e.confirmationChannels ?? [],
539
540
  [e.confirmationChannels]
540
- ), re = j && te.length === 0;
541
- se(() => {
541
+ ), re = j && ie.length === 0;
542
+ Q(() => {
542
543
  const m = e.codiceFiscale;
543
- if (!n || !p || !m) {
544
- C(ve);
544
+ if (!n || !u || !m) {
545
+ b(ke);
545
546
  return;
546
547
  }
547
- if (!ma.test(m)) {
548
- C({
548
+ if (!ba.test(m)) {
549
+ b({
549
550
  state: "invalid",
550
551
  hint: r("booking.details.codiceFiscale.invalidFormat")
551
552
  });
552
553
  return;
553
554
  }
554
- C({ state: "pending" }), V.current && clearTimeout(V.current), V.current = setTimeout(() => {
555
- p(m).then(
556
- (w) => C(
555
+ b({ state: "pending" }), z.current && clearTimeout(z.current), z.current = setTimeout(() => {
556
+ u(m).then(
557
+ (w) => b(
557
558
  w.valid ? { state: "valid" } : { state: "invalid", hint: w.hint }
558
559
  )
559
560
  ).catch(
560
- () => C({
561
+ () => b({
561
562
  state: "invalid",
562
563
  hint: r("booking.details.codiceFiscale.unavailable")
563
564
  })
564
565
  );
565
- }, Le);
566
- }, [n, p, e.codiceFiscale, r]);
567
- const J = o && l === "public";
568
- se(() => {
566
+ }, je);
567
+ }, [n, u, e.codiceFiscale, r]);
568
+ const X = o && l === "public";
569
+ Q(() => {
569
570
  const m = e.insuranceNumber;
570
- if (!J || !y || !m) {
571
- N(ve);
571
+ if (!X || !k || !m) {
572
+ R(ke);
572
573
  return;
573
574
  }
574
- N({ state: "pending" }), F.current && clearTimeout(F.current), F.current = setTimeout(() => {
575
- y(m).then(
576
- (w) => N(
575
+ R({ state: "pending" }), G.current && clearTimeout(G.current), G.current = setTimeout(() => {
576
+ k(m).then(
577
+ (w) => R(
577
578
  w.valid ? { state: "valid" } : { state: "invalid", hint: w.hint }
578
579
  )
579
580
  ).catch(
580
- () => N({
581
+ () => R({
581
582
  state: "invalid",
582
583
  hint: r("booking.details.insuranceNumber.unavailable")
583
584
  })
584
585
  );
585
- }, Le);
586
- }, [J, y, e.insuranceNumber, r]);
587
- const A = I(
588
- () => !!(e.email && ua.test(e.email)),
586
+ }, je);
587
+ }, [X, k, e.insuranceNumber, r]);
588
+ const de = I(
589
+ () => !!(e.email && ya.test(e.email)),
589
590
  [e.email]
590
- ), q = I(
591
+ ), le = I(
591
592
  () => !!(e.mobilePhone && e.mobilePhone.length >= 6),
592
593
  [e.mobilePhone]
593
- ), H = I(() => {
594
+ ), ce = I(() => {
594
595
  var m, w;
595
- return !(!((m = e.firstName) != null && m.trim()) || !((w = e.lastName) != null && w.trim()) || !A || !q || n && D.state !== "valid" || i && !e.dateOfBirth || J && v.state !== "valid");
596
+ return !(!((m = e.firstName) != null && m.trim()) || !((w = e.lastName) != null && w.trim()) || !de || !le || n && M.state !== "valid" || i && !e.dateOfBirth || X && N.state !== "valid");
596
597
  }, [
597
598
  e.firstName,
598
599
  e.lastName,
599
- A,
600
- q,
600
+ de,
601
+ le,
601
602
  n,
602
- D.state,
603
+ M.state,
603
604
  i,
604
605
  e.dateOfBirth,
605
- J,
606
- v.state
607
- ]), G = !!(e.privacyConsent && e.termsConsent), B = !j || te.length > 0, de = H && G && B && !f, ae = (m) => {
608
- if (m.preventDefault(), Z({
606
+ X,
607
+ N.state
608
+ ]), Ce = !!(e.privacyConsent && e.termsConsent), V = !j || ie.length > 0, W = ce && Ce && V && !h, $ = (m) => {
609
+ if (m.preventDefault(), J({
609
610
  firstName: !0,
610
611
  lastName: !0,
611
612
  email: !0,
@@ -613,7 +614,7 @@ const Pe = 500, ma = /^[A-Z0-9]{16}$/, ua = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Le = 3
613
614
  codiceFiscale: !0,
614
615
  dateOfBirth: !0,
615
616
  insuranceNumber: !0
616
- }), !de) return;
617
+ }), !W) return;
617
618
  const w = {
618
619
  firstName: e.firstName.trim(),
619
620
  lastName: e.lastName.trim(),
@@ -629,13 +630,13 @@ const Pe = 500, ma = /^[A-Z0-9]{16}$/, ua = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Le = 3
629
630
  // Only include when the picker was visible; otherwise the single
630
631
  // implicit channel is inferred backend-side from the practice
631
632
  // config.
632
- confirmationChannels: j ? te : void 0
633
+ confirmationChannels: j ? ie : void 0
633
634
  };
634
635
  s(w);
635
- }, le = (m, w) => {
636
- const ce = w && /^https?:\/\//i.test(w) ? w : void 0;
637
- return ce ? /* @__PURE__ */ a(
638
- rt,
636
+ }, q = (m, w) => {
637
+ const U = w && /^https?:\/\//i.test(w) ? w : void 0;
638
+ return U ? /* @__PURE__ */ a(
639
+ gt,
639
640
  {
640
641
  i18nKey: m,
641
642
  components: {
@@ -649,7 +650,7 @@ const Pe = 500, ma = /^[A-Z0-9]{16}$/, ua = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Le = 3
649
650
  /* @__PURE__ */ a(
650
651
  "a",
651
652
  {
652
- href: ce,
653
+ href: U,
653
654
  target: "_blank",
654
655
  rel: "noopener noreferrer",
655
656
  className: "ds:underline ds:text-[var(--primary)]"
@@ -660,102 +661,102 @@ const Pe = 500, ma = /^[A-Z0-9]{16}$/, ua = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Le = 3
660
661
  }
661
662
  ) : r(m);
662
663
  };
663
- return /* @__PURE__ */ g(
664
+ return /* @__PURE__ */ f(
664
665
  "form",
665
666
  {
666
- ref: S,
667
- id: b,
667
+ ref: v,
668
+ id: E,
668
669
  noValidate: !0,
669
- onSubmit: ae,
670
+ onSubmit: $,
670
671
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
671
672
  children: [
672
673
  x,
673
- /* @__PURE__ */ g("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
674
+ /* @__PURE__ */ f("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
674
675
  /* @__PURE__ */ a(
675
- U,
676
+ Y,
676
677
  {
677
678
  label: r("booking.details.firstName.label"),
678
679
  required: !0,
679
- error: E.firstName && !((X = e.firstName) != null && X.trim()) ? r("booking.details.firstName.required") : void 0,
680
+ error: B.firstName && !((_ = e.firstName) != null && _.trim()) ? r("booking.details.firstName.required") : void 0,
680
681
  children: /* @__PURE__ */ a(
681
- fe,
682
+ be,
682
683
  {
683
684
  autoComplete: "given-name",
684
685
  value: e.firstName ?? "",
685
- onChange: (m) => T({ firstName: m.target.value }),
686
+ onChange: (m) => D({ firstName: m.target.value }),
686
687
  onBlur: () => P("firstName")
687
688
  }
688
689
  )
689
690
  }
690
691
  ),
691
692
  /* @__PURE__ */ a(
692
- U,
693
+ Y,
693
694
  {
694
695
  label: r("booking.details.lastName.label"),
695
696
  required: !0,
696
- error: E.lastName && !((W = e.lastName) != null && W.trim()) ? r("booking.details.lastName.required") : void 0,
697
+ error: B.lastName && !((me = e.lastName) != null && me.trim()) ? r("booking.details.lastName.required") : void 0,
697
698
  children: /* @__PURE__ */ a(
698
- fe,
699
+ be,
699
700
  {
700
701
  autoComplete: "family-name",
701
702
  value: e.lastName ?? "",
702
- onChange: (m) => T({ lastName: m.target.value }),
703
+ onChange: (m) => D({ lastName: m.target.value }),
703
704
  onBlur: () => P("lastName")
704
705
  }
705
706
  )
706
707
  }
707
708
  )
708
709
  ] }),
709
- /* @__PURE__ */ g("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
710
+ /* @__PURE__ */ f("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
710
711
  /* @__PURE__ */ a(
711
- U,
712
+ Y,
712
713
  {
713
714
  label: r("booking.details.email.label"),
714
715
  required: !0,
715
- error: E.email && !A ? r("booking.details.email.invalid") : void 0,
716
+ error: B.email && !de ? r("booking.details.email.invalid") : void 0,
716
717
  children: /* @__PURE__ */ a(
717
- mt,
718
+ bt,
718
719
  {
719
720
  value: e.email ?? "",
720
- onChange: (m) => T({ email: m.target.value }),
721
+ onChange: (m) => D({ email: m.target.value }),
721
722
  onBlur: () => P("email")
722
723
  }
723
724
  )
724
725
  }
725
726
  ),
726
727
  /* @__PURE__ */ a(
727
- U,
728
+ Y,
728
729
  {
729
730
  label: r("booking.details.mobilePhone.label"),
730
731
  required: !0,
731
- error: E.mobilePhone && !q ? r("booking.details.mobilePhone.invalid") : void 0,
732
+ error: B.mobilePhone && !le ? r("booking.details.mobilePhone.invalid") : void 0,
732
733
  children: /* @__PURE__ */ a(
733
- ut,
734
+ yt,
734
735
  {
735
736
  value: e.mobilePhone ?? "",
736
- defaultCountry: k == null ? void 0 : k.toUpperCase(),
737
+ defaultCountry: y == null ? void 0 : y.toUpperCase(),
737
738
  onChange: (m) => {
738
- T({ mobilePhone: m }), P("mobilePhone");
739
+ D({ mobilePhone: m }), P("mobilePhone");
739
740
  }
740
741
  }
741
742
  )
742
743
  }
743
744
  )
744
745
  ] }),
745
- n || i ? /* @__PURE__ */ g("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
746
+ n || i ? /* @__PURE__ */ f("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
746
747
  n ? /* @__PURE__ */ a(
747
- U,
748
+ Y,
748
749
  {
749
750
  label: r("booking.details.codiceFiscale.label"),
750
751
  required: !0,
751
- description: D.state === "pending" ? r("booking.details.codiceFiscale.checking") : r("booking.details.codiceFiscale.helper"),
752
- error: E.codiceFiscale && D.state === "invalid" ? D.hint ?? r("booking.details.codiceFiscale.invalid") : void 0,
752
+ description: M.state === "pending" ? r("booking.details.codiceFiscale.checking") : r("booking.details.codiceFiscale.helper"),
753
+ error: B.codiceFiscale && M.state === "invalid" ? M.hint ?? r("booking.details.codiceFiscale.invalid") : void 0,
753
754
  children: /* @__PURE__ */ a(
754
- fe,
755
+ be,
755
756
  {
756
757
  value: e.codiceFiscale ?? "",
757
758
  maxLength: 16,
758
- onChange: (m) => T({
759
+ onChange: (m) => D({
759
760
  codiceFiscale: m.target.value.slice(0, 16).toUpperCase()
760
761
  }),
761
762
  onBlur: () => P("codiceFiscale")
@@ -764,17 +765,17 @@ const Pe = 500, ma = /^[A-Z0-9]{16}$/, ua = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Le = 3
764
765
  }
765
766
  ) : null,
766
767
  i ? /* @__PURE__ */ a(
767
- U,
768
+ Y,
768
769
  {
769
770
  label: r("booking.details.dateOfBirth.label"),
770
771
  required: !0,
771
- error: E.dateOfBirth && !e.dateOfBirth ? r("booking.details.dateOfBirth.required") : void 0,
772
+ error: B.dateOfBirth && !e.dateOfBirth ? r("booking.details.dateOfBirth.required") : void 0,
772
773
  children: /* @__PURE__ */ a(
773
- ct,
774
+ vt,
774
775
  {
775
776
  value: e.dateOfBirth ? new Date(e.dateOfBirth) : void 0,
776
777
  onChange: (m) => {
777
- T({
778
+ D({
778
779
  dateOfBirth: m ? m.toISOString().slice(0, 10) : void 0
779
780
  }), P("dateOfBirth");
780
781
  }
@@ -783,59 +784,59 @@ const Pe = 500, ma = /^[A-Z0-9]{16}$/, ua = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Le = 3
783
784
  }
784
785
  ) : null
785
786
  ] }) : null,
786
- J ? /* @__PURE__ */ a(
787
- U,
787
+ X ? /* @__PURE__ */ a(
788
+ Y,
788
789
  {
789
790
  label: r("booking.details.insuranceNumber.label"),
790
791
  required: !0,
791
- description: v.state === "pending" ? r("booking.details.insuranceNumber.checking") : void 0,
792
- error: E.insuranceNumber && v.state === "invalid" ? v.hint ?? r("booking.details.insuranceNumber.invalid") : void 0,
792
+ description: N.state === "pending" ? r("booking.details.insuranceNumber.checking") : void 0,
793
+ error: B.insuranceNumber && N.state === "invalid" ? N.hint ?? r("booking.details.insuranceNumber.invalid") : void 0,
793
794
  children: /* @__PURE__ */ a(
794
- fe,
795
+ be,
795
796
  {
796
797
  value: e.insuranceNumber ?? "",
797
- onChange: (m) => T({ insuranceNumber: m.target.value }),
798
+ onChange: (m) => D({ insuranceNumber: m.target.value }),
798
799
  onBlur: () => P("insuranceNumber")
799
800
  }
800
801
  )
801
802
  }
802
803
  ) : null,
803
804
  c ? /* @__PURE__ */ a(
804
- U,
805
+ Y,
805
806
  {
806
807
  label: r("booking.details.note.label"),
807
808
  description: r("booking.details.note.helper", {
808
- max: Pe
809
+ max: Ke
809
810
  }),
810
811
  children: /* @__PURE__ */ a(
811
- pt,
812
+ kt,
812
813
  {
813
814
  value: e.note ?? "",
814
- maxLength: Pe,
815
+ maxLength: Ke,
815
816
  rows: 3,
816
- onChange: (m) => T({ note: m.target.value })
817
+ onChange: (m) => D({ note: m.target.value })
817
818
  }
818
819
  )
819
820
  }
820
821
  ) : null,
821
822
  d ? /* @__PURE__ */ a(
822
- we,
823
+ Ae,
823
824
  {
824
825
  checked: !!e.returningPatient,
825
- onCheckedChange: (m) => T({ returningPatient: m === !0 }),
826
+ onCheckedChange: (m) => D({ returningPatient: m === !0 }),
826
827
  label: r("booking.details.returningPatient.label")
827
828
  }
828
829
  ) : null,
829
- /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
830
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
830
831
  /* @__PURE__ */ a(
831
- we,
832
+ Ae,
832
833
  {
833
834
  checked: !!e.privacyConsent,
834
- onCheckedChange: (m) => T({ privacyConsent: m === !0 }),
835
- label: /* @__PURE__ */ g(ie, { children: [
836
- le(
835
+ onCheckedChange: (m) => D({ privacyConsent: m === !0 }),
836
+ label: /* @__PURE__ */ f(Z, { children: [
837
+ q(
837
838
  "booking.details.consent.privacy.label",
838
- h
839
+ p
839
840
  ),
840
841
  /* @__PURE__ */ a(
841
842
  "span",
@@ -849,14 +850,14 @@ const Pe = 500, ma = /^[A-Z0-9]{16}$/, ua = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Le = 3
849
850
  }
850
851
  ),
851
852
  /* @__PURE__ */ a(
852
- we,
853
+ Ae,
853
854
  {
854
855
  checked: !!e.termsConsent,
855
- onCheckedChange: (m) => T({ termsConsent: m === !0 }),
856
- label: /* @__PURE__ */ g(ie, { children: [
857
- le(
856
+ onCheckedChange: (m) => D({ termsConsent: m === !0 }),
857
+ label: /* @__PURE__ */ f(Z, { children: [
858
+ q(
858
859
  "booking.details.consent.terms.label",
859
- u
860
+ g
860
861
  ),
861
862
  /* @__PURE__ */ a(
862
863
  "span",
@@ -876,16 +877,16 @@ const Pe = 500, ma = /^[A-Z0-9]{16}$/, ua = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Le = 3
876
877
  "data-component": "booking-confirmation-channels",
877
878
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
878
879
  children: /* @__PURE__ */ a(
879
- lt,
880
+ ht,
880
881
  {
881
882
  label: r("booking.confirmation.heading"),
882
883
  helperText: r("booking.confirmation.helper"),
883
- value: te,
884
- onChange: (m) => T({
884
+ value: ie,
885
+ onChange: (m) => D({
885
886
  confirmationChannels: m
886
887
  }),
887
888
  orientation: "vertical",
888
- options: K.map((m) => ({
889
+ options: ne.map((m) => ({
889
890
  value: m,
890
891
  label: r(`booking.confirmation.channel.${m}`)
891
892
  })),
@@ -894,14 +895,15 @@ const Pe = 500, ma = /^[A-Z0-9]{16}$/, ua = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Le = 3
894
895
  )
895
896
  }
896
897
  ) : null,
898
+ S ? /* @__PURE__ */ a(F, { variant: "error", children: /* @__PURE__ */ a(F.Description, { children: S }) }) : null,
897
899
  /* @__PURE__ */ a(
898
- oe,
900
+ se,
899
901
  {
900
902
  intent: "primary",
901
903
  size: "md",
902
904
  type: "submit",
903
- disabled: !de,
904
- startIcon: f ? /* @__PURE__ */ a(gt, { size: "sm" }) : void 0,
905
+ disabled: !W,
906
+ startIcon: h ? /* @__PURE__ */ a(xt, { size: "sm" }) : void 0,
905
907
  children: r("booking.details.submit")
906
908
  }
907
909
  )
@@ -910,8 +912,8 @@ const Pe = 500, ma = /^[A-Z0-9]{16}$/, ua = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, Le = 3
910
912
  );
911
913
  }
912
914
  );
913
- Te.displayName = "BookingDetailsForm";
914
- const pa = xe(
915
+ Pe.displayName = "BookingDetailsForm";
916
+ const ka = Ie(
915
917
  "ds:flex ds:w-full ds:flex-col ds:text-[var(--foreground)]",
916
918
  {
917
919
  variants: {
@@ -921,44 +923,58 @@ const pa = xe(
921
923
  calendar: "ds:gap-[var(--spacing-md)]",
922
924
  flexible: "ds:gap-[var(--spacing-lg)]",
923
925
  progress: "ds:gap-[var(--spacing-sm)]"
926
+ },
927
+ // `surface="elevated"` matches `Card variant="elevated"` — same
928
+ // tokens, same padding, same boundary behaviour — so consumers can
929
+ // drop their own Card wraps without a double-card look. Default
930
+ // `'flat'` preserves 0.30.x rendering.
931
+ surface: {
932
+ flat: "",
933
+ elevated: [
934
+ "ds:rounded-[var(--radius-lg)]",
935
+ "ds:bg-[var(--card)] ds:text-[var(--card-foreground)]",
936
+ "ds:border ds:border-[color:var(--card-border)]",
937
+ "ds:shadow-[var(--shadow-card)]",
938
+ "ds:p-[var(--spacing-md)]"
939
+ ].join(" ")
924
940
  }
925
941
  },
926
- defaultVariants: { variant: "inline-list" }
942
+ defaultVariants: { variant: "inline-list", surface: "flat" }
927
943
  }
928
- ), ga = [
944
+ ), xa = [
929
945
  [
930
946
  /\b(estetic|aesthetic|botox|filler|mesoterap|chirurgia\s*plastic)/i,
931
- Ee
947
+ $e
932
948
  ],
933
- [/\b(cardio|ecg|elettrocardio|ecocardio|cuore|heart)/i, Nt],
934
- [/\b(dent|odonto|tooth|teeth|pulizia|igien|smile)/i, Zt],
935
- [/\b(oftalmo|ocul|ophthal|vision|occhi|eye)/i, It],
936
- [/\b(otorin|udito|orecchi|hearing|ear)/i, Rt],
937
- [/\b(neuro|brain|cervello)/i, Ot],
938
- [/\b(pediatr|child|bambin)/i, Tt],
939
- [/\b(ortop|ortho|osteo|skeleton|ossa|bone)/i, At],
940
- [/\b(lab|analis|test|sang|esami)/i, $t],
941
- [/\b(farmaco|pharm|pillol|refill)/i, jt],
942
- [/\b(chirurg|surg|intervent|operat)/i, Ut],
943
- [/\b(scan|rx|x-?ray|raggi|imag|radio|risonan|ecograf|ultras)/i, Ht],
944
- [/\b(vacc|inject|inie|punto)/i, Ee],
945
- [/\b(derma|skin|pelle)/i, wt],
946
- [/\b(prima\s*visit|first\s*visit|consult|consulto|valutaz)/i, Vt],
947
- [/\b(general|medicin|family|control|check[-\s]?up)/i, Mt]
949
+ [/\b(cardio|ecg|elettrocardio|ecocardio|cuore|heart)/i, _t],
950
+ [/\b(dent|odonto|tooth|teeth|pulizia|igien|smile)/i, aa],
951
+ [/\b(oftalmo|ocul|ophthal|vision|occhi|eye)/i, At],
952
+ [/\b(otorin|udito|orecchi|hearing|ear)/i, Gt],
953
+ [/\b(neuro|brain|cervello)/i, zt],
954
+ [/\b(pediatr|child|bambin)/i, Vt],
955
+ [/\b(ortop|ortho|osteo|skeleton|ossa|bone)/i, Ft],
956
+ [/\b(lab|analis|test|sang|esami)/i, Yt],
957
+ [/\b(farmaco|pharm|pillol|refill)/i, Jt],
958
+ [/\b(chirurg|surg|intervent|operat)/i, ea],
959
+ [/\b(scan|rx|x-?ray|raggi|imag|radio|risonan|ecograf|ultras)/i, Wt],
960
+ [/\b(vacc|inject|inie|punto)/i, $e],
961
+ [/\b(derma|skin|pelle)/i, Bt],
962
+ [/\b(prima\s*visit|first\s*visit|consult|consulto|valutaz)/i, qt],
963
+ [/\b(general|medicin|family|control|check[-\s]?up)/i, Et]
948
964
  ];
949
- function fa(e) {
950
- for (const [t, s] of ga)
965
+ function Sa(e) {
966
+ for (const [t, s] of xa)
951
967
  if (t.test(e)) return s;
952
968
  return null;
953
969
  }
954
- function ha(e) {
955
- const t = fa(e.label) ?? St;
970
+ function Na(e) {
971
+ const t = Sa(e.label) ?? Tt;
956
972
  return /* @__PURE__ */ a(t, { "aria-hidden": "true", className: "ds:size-5" });
957
973
  }
958
- function Ce(e) {
959
- return be(e, "yyyy-MM-dd");
974
+ function Be(e) {
975
+ return xe(e, "yyyy-MM-dd");
960
976
  }
961
- const va = [
977
+ const Ia = [
962
978
  "ds:relative ds:flex ds:items-center ds:justify-center",
963
979
  "ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)]",
964
980
  "ds:rounded-[var(--radius-sm)]",
@@ -968,7 +984,7 @@ const va = [
968
984
  "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
969
985
  "ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
970
986
  "ds:forced-colors:focus-visible:outline-[CanvasText]"
971
- ].join(" "), ba = xe(va, {
987
+ ].join(" "), wa = Ie(Ia, {
972
988
  variants: {
973
989
  state: {
974
990
  available: "ds:cursor-pointer ds:text-[var(--foreground)] ds:hover:bg-[var(--muted)]/30",
@@ -979,93 +995,93 @@ const va = [
979
995
  },
980
996
  defaultVariants: { state: "unavailable" }
981
997
  });
982
- function Ue({
998
+ function et({
983
999
  availableDates: e,
984
1000
  selectedDate: t,
985
1001
  onSelectDate: s,
986
1002
  locale: n,
987
1003
  loading: i
988
1004
  }) {
989
- const { t: o } = M(), l = I(() => t ? me(Q(t)) : e.length > 0 ? me(Q(e[0])) : me(/* @__PURE__ */ new Date()), [t, e]), [c, d] = z(l), [h, u] = z(null), p = I(() => {
990
- const S = me(c), r = vt(c), b = S.getDay(), D = r.getDate(), C = [];
991
- for (let v = b; v > 0; v -= 1) {
1005
+ const { t: o } = T(), l = I(() => t ? fe(ee(t)) : e.length > 0 ? fe(ee(e[0])) : fe(/* @__PURE__ */ new Date()), [t, e]), [c, d] = H(l), [p, g] = H(null), u = I(() => {
1006
+ const S = fe(c), v = It(c), r = S.getDay(), E = v.getDate(), M = [];
1007
+ for (let b = r; b > 0; b -= 1) {
992
1008
  const N = new Date(S);
993
- N.setDate(S.getDate() - v), C.push(N);
1009
+ N.setDate(S.getDate() - b), M.push(N);
994
1010
  }
995
- for (let v = 0; v < D; v += 1) {
1011
+ for (let b = 0; b < E; b += 1) {
996
1012
  const N = new Date(S);
997
- N.setDate(S.getDate() + v), C.push(N);
1013
+ N.setDate(S.getDate() + b), M.push(N);
998
1014
  }
999
- for (; C.length < 42; ) {
1000
- const v = C[C.length - 1], N = new Date(v);
1001
- N.setDate(v.getDate() + 1), C.push(N);
1015
+ for (; M.length < 42; ) {
1016
+ const b = M[M.length - 1], N = new Date(b);
1017
+ N.setDate(b.getDate() + 1), M.push(N);
1002
1018
  }
1003
- return C;
1004
- }, [c]), y = I(() => {
1019
+ return M;
1020
+ }, [c]), k = I(() => {
1005
1021
  try {
1006
1022
  return new Intl.DateTimeFormat(n, {
1007
1023
  month: "long",
1008
1024
  year: "numeric"
1009
1025
  }).format(c);
1010
1026
  } catch {
1011
- return be(c, "MMMM yyyy");
1027
+ return xe(c, "MMMM yyyy");
1012
1028
  }
1013
- }, [c, n]), f = I(() => {
1029
+ }, [c, n]), h = I(() => {
1014
1030
  const S = new Date(2024, 0, 7);
1015
- return Array.from({ length: 7 }, (r, b) => {
1016
- const D = new Date(S);
1017
- D.setDate(S.getDate() + b);
1031
+ return Array.from({ length: 7 }, (v, r) => {
1032
+ const E = new Date(S);
1033
+ E.setDate(S.getDate() + r);
1018
1034
  try {
1019
- return new Intl.DateTimeFormat(n, { weekday: "short" }).format(D);
1035
+ return new Intl.DateTimeFormat(n, { weekday: "short" }).format(E);
1020
1036
  } catch {
1021
- return be(D, "EEE");
1037
+ return xe(E, "EEE");
1022
1038
  }
1023
1039
  });
1024
- }, [n]), x = I(() => new Set(e), [e]), k = ee(
1025
- (S) => x.has(Ce(S)),
1040
+ }, [n]), x = I(() => new Set(e), [e]), y = ae(
1041
+ (S) => x.has(Be(S)),
1026
1042
  [x]
1027
- ), _ = I(() => {
1028
- if (h) return h;
1029
- if (t) return Q(t);
1030
- const S = p.find(
1031
- (r) => he(r, c) && k(r)
1043
+ ), C = I(() => {
1044
+ if (p) return p;
1045
+ if (t) return ee(t);
1046
+ const S = u.find(
1047
+ (v) => ye(v, c) && y(v)
1032
1048
  );
1033
- return S || (p.find((r) => he(r, c)) ?? null);
1034
- }, [h, t, p, c, k]), Y = ee(
1035
- (S, r) => {
1036
- let b = null;
1049
+ return S || (u.find((v) => ye(v, c)) ?? null);
1050
+ }, [p, t, u, c, y]), A = ae(
1051
+ (S, v) => {
1052
+ let r = null;
1037
1053
  switch (S.key) {
1038
1054
  case "ArrowLeft":
1039
- b = new Date(r), b.setDate(r.getDate() - 1);
1055
+ r = new Date(v), r.setDate(v.getDate() - 1);
1040
1056
  break;
1041
1057
  case "ArrowRight":
1042
- b = new Date(r), b.setDate(r.getDate() + 1);
1058
+ r = new Date(v), r.setDate(v.getDate() + 1);
1043
1059
  break;
1044
1060
  case "ArrowUp":
1045
- b = new Date(r), b.setDate(r.getDate() - 7);
1061
+ r = new Date(v), r.setDate(v.getDate() - 7);
1046
1062
  break;
1047
1063
  case "ArrowDown":
1048
- b = new Date(r), b.setDate(r.getDate() + 7);
1064
+ r = new Date(v), r.setDate(v.getDate() + 7);
1049
1065
  break;
1050
1066
  case "Home":
1051
- b = new Date(r), b.setDate(r.getDate() - r.getDay());
1067
+ r = new Date(v), r.setDate(v.getDate() - v.getDay());
1052
1068
  break;
1053
1069
  case "End":
1054
- b = new Date(r), b.setDate(r.getDate() + (6 - r.getDay()));
1070
+ r = new Date(v), r.setDate(v.getDate() + (6 - v.getDay()));
1055
1071
  break;
1056
1072
  case "Enter":
1057
1073
  case " ": {
1058
- S.preventDefault(), k(r) && s(Ce(r));
1074
+ S.preventDefault(), y(v) && s(Be(v));
1059
1075
  return;
1060
1076
  }
1061
1077
  default:
1062
1078
  return;
1063
1079
  }
1064
- b && (S.preventDefault(), he(b, c) || d(me(b)), u(b));
1080
+ r && (S.preventDefault(), ye(r, c) || d(fe(r)), g(r));
1065
1081
  },
1066
- [k, s, c]
1082
+ [y, s, c]
1067
1083
  );
1068
- return i ? /* @__PURE__ */ g(
1084
+ return i ? /* @__PURE__ */ f(
1069
1085
  "div",
1070
1086
  {
1071
1087
  role: "status",
@@ -1073,22 +1089,22 @@ function Ue({
1073
1089
  "aria-label": o("common.loading"),
1074
1090
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
1075
1091
  children: [
1076
- /* @__PURE__ */ a(ye, { variant: "text", width: "40%" }),
1077
- /* @__PURE__ */ a("div", { className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]", children: Array.from({ length: 42 }, (S, r) => /* @__PURE__ */ a(ye, { variant: "rounded", height: "2.5rem" }, `mg-skel-${r}`)) })
1092
+ /* @__PURE__ */ a(Se, { variant: "text", width: "40%" }),
1093
+ /* @__PURE__ */ a("div", { className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]", children: Array.from({ length: 42 }, (S, v) => /* @__PURE__ */ a(Se, { variant: "rounded", height: "2.5rem" }, `mg-skel-${v}`)) })
1078
1094
  ]
1079
1095
  }
1080
- ) : /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1081
- /* @__PURE__ */ g("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
1096
+ ) : /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1097
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
1082
1098
  /* @__PURE__ */ a(
1083
- Be,
1099
+ Re,
1084
1100
  {
1085
- icon: /* @__PURE__ */ a(bt, {}),
1101
+ icon: /* @__PURE__ */ a(wt, {}),
1086
1102
  "aria-label": o("booking.previousMonth"),
1087
1103
  size: "sm",
1088
1104
  intent: "ghost",
1089
1105
  flipIconInRtl: !0,
1090
1106
  onClick: () => {
1091
- d((S) => Qt(S)), u(null);
1107
+ d((S) => oa(S)), g(null);
1092
1108
  }
1093
1109
  }
1094
1110
  ),
@@ -1097,24 +1113,24 @@ function Ue({
1097
1113
  {
1098
1114
  className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]",
1099
1115
  "aria-live": "polite",
1100
- children: y
1116
+ children: k
1101
1117
  }
1102
1118
  ),
1103
1119
  /* @__PURE__ */ a(
1104
- Be,
1120
+ Re,
1105
1121
  {
1106
- icon: /* @__PURE__ */ a(yt, {}),
1122
+ icon: /* @__PURE__ */ a(Ct, {}),
1107
1123
  "aria-label": o("booking.nextMonth"),
1108
1124
  size: "sm",
1109
1125
  intent: "ghost",
1110
1126
  flipIconInRtl: !0,
1111
1127
  onClick: () => {
1112
- d((S) => ze(S, 1)), u(null);
1128
+ d((S) => Ue(S, 1)), g(null);
1113
1129
  }
1114
1130
  }
1115
1131
  )
1116
1132
  ] }),
1117
- /* @__PURE__ */ g(
1133
+ /* @__PURE__ */ f(
1118
1134
  "div",
1119
1135
  {
1120
1136
  role: "grid",
@@ -1126,30 +1142,30 @@ function Ue({
1126
1142
  {
1127
1143
  role: "row",
1128
1144
  className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]",
1129
- children: f.map((S, r) => /* @__PURE__ */ a(
1145
+ children: h.map((S, v) => /* @__PURE__ */ a(
1130
1146
  "div",
1131
1147
  {
1132
1148
  role: "columnheader",
1133
1149
  className: "type-meta ds:text-center ds:text-[var(--muted-foreground)] ds:font-[var(--font-weight-medium)]",
1134
1150
  children: S
1135
1151
  },
1136
- `wd-${r}`
1152
+ `wd-${v}`
1137
1153
  ))
1138
1154
  }
1139
1155
  ),
1140
- Array.from({ length: 6 }, (S, r) => /* @__PURE__ */ a(
1156
+ Array.from({ length: 6 }, (S, v) => /* @__PURE__ */ a(
1141
1157
  "div",
1142
1158
  {
1143
1159
  role: "row",
1144
1160
  className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]",
1145
- children: p.slice(r * 7, r * 7 + 7).map((b, D) => {
1146
- const C = r * 7 + D, v = he(b, c), N = v && k(b), E = t ? Oe(b, Q(t)) : !1, Z = v ? E ? "selected" : N ? "available" : "unavailable" : "outside", P = _ ? Oe(_, b) : !1, V = (() => {
1161
+ children: u.slice(v * 7, v * 7 + 7).map((r, E) => {
1162
+ const M = v * 7 + E, b = ye(r, c), N = b && y(r), R = t ? ze(r, ee(t)) : !1, B = b ? R ? "selected" : N ? "available" : "unavailable" : "outside", J = C ? ze(C, r) : !1, P = (() => {
1147
1163
  try {
1148
1164
  return new Intl.DateTimeFormat(n, {
1149
1165
  dateStyle: "full"
1150
- }).format(b);
1166
+ }).format(r);
1151
1167
  } catch {
1152
- return be(b, "PPP");
1168
+ return xe(r, "PPP");
1153
1169
  }
1154
1170
  })();
1155
1171
  return /* @__PURE__ */ a(
@@ -1157,30 +1173,30 @@ function Ue({
1157
1173
  {
1158
1174
  type: "button",
1159
1175
  role: "gridcell",
1160
- "aria-label": V,
1161
- "aria-selected": E || void 0,
1176
+ "aria-label": P,
1177
+ "aria-selected": R || void 0,
1162
1178
  "aria-disabled": !N || void 0,
1163
- tabIndex: P ? 0 : -1,
1179
+ tabIndex: J ? 0 : -1,
1164
1180
  disabled: !N,
1165
1181
  onClick: () => {
1166
- N && s(Ce(b));
1182
+ N && s(Be(r));
1167
1183
  },
1168
- onKeyDown: (F) => Y(F, b),
1169
- className: ba({ state: Z }),
1170
- children: /* @__PURE__ */ a("span", { "aria-hidden": "true", children: b.getDate() })
1184
+ onKeyDown: (z) => A(z, r),
1185
+ className: wa({ state: B }),
1186
+ children: /* @__PURE__ */ a("span", { "aria-hidden": "true", children: r.getDate() })
1171
1187
  },
1172
- `mg-cell-${C}`
1188
+ `mg-cell-${M}`
1173
1189
  );
1174
1190
  })
1175
1191
  },
1176
- `mg-row-${r}`
1192
+ `mg-row-${v}`
1177
1193
  ))
1178
1194
  ]
1179
1195
  }
1180
1196
  )
1181
1197
  ] });
1182
1198
  }
1183
- const ya = xe(
1199
+ const Ca = Ie(
1184
1200
  [
1185
1201
  "ds:relative ds:flex ds:w-full ds:items-center ds:gap-[var(--spacing-md)]",
1186
1202
  "ds:min-h-[var(--min-target-size)]",
@@ -1206,52 +1222,52 @@ const ya = xe(
1206
1222
  defaultVariants: { state: "idle" }
1207
1223
  }
1208
1224
  );
1209
- function ka({
1225
+ function Ma({
1210
1226
  services: e,
1211
1227
  selectedServiceId: t,
1212
1228
  onSelect: s
1213
1229
  }) {
1214
- const { t: n } = M(), i = Fe(), [o, l] = z(() => {
1230
+ const { t: n } = T(), i = He(), [o, l] = H(() => {
1215
1231
  if (t) {
1216
- const u = e.findIndex((p) => p.id === t);
1217
- if (u >= 0) return u;
1232
+ const g = e.findIndex((u) => u.id === t);
1233
+ if (g >= 0) return g;
1218
1234
  }
1219
1235
  return 0;
1220
- }), c = ne(/* @__PURE__ */ new Map()), d = ee((u) => {
1221
- var p;
1222
- (p = c.current.get(u)) == null || p.focus();
1223
- }, []), h = ee(
1224
- (u, p, y) => {
1225
- const f = e.length;
1226
- if (f !== 0)
1227
- switch (u.key) {
1236
+ }), c = te(/* @__PURE__ */ new Map()), d = ae((g) => {
1237
+ var u;
1238
+ (u = c.current.get(g)) == null || u.focus();
1239
+ }, []), p = ae(
1240
+ (g, u, k) => {
1241
+ const h = e.length;
1242
+ if (h !== 0)
1243
+ switch (g.key) {
1228
1244
  case "ArrowDown":
1229
1245
  case "ArrowRight": {
1230
- u.preventDefault();
1231
- const x = (p + 1) % f;
1246
+ g.preventDefault();
1247
+ const x = (u + 1) % h;
1232
1248
  l(x), d(x);
1233
1249
  break;
1234
1250
  }
1235
1251
  case "ArrowUp":
1236
1252
  case "ArrowLeft": {
1237
- u.preventDefault();
1238
- const x = (p - 1 + f) % f;
1253
+ g.preventDefault();
1254
+ const x = (u - 1 + h) % h;
1239
1255
  l(x), d(x);
1240
1256
  break;
1241
1257
  }
1242
1258
  case "Home": {
1243
- u.preventDefault(), l(0), d(0);
1259
+ g.preventDefault(), l(0), d(0);
1244
1260
  break;
1245
1261
  }
1246
1262
  case "End": {
1247
- u.preventDefault();
1248
- const x = f - 1;
1263
+ g.preventDefault();
1264
+ const x = h - 1;
1249
1265
  l(x), d(x);
1250
1266
  break;
1251
1267
  }
1252
1268
  case "Enter":
1253
1269
  case " ": {
1254
- u.preventDefault(), s(y);
1270
+ g.preventDefault(), s(k);
1255
1271
  break;
1256
1272
  }
1257
1273
  }
@@ -1265,27 +1281,27 @@ function ka({
1265
1281
  "aria-label": n("booking.serviceListLabel"),
1266
1282
  id: i,
1267
1283
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
1268
- children: e.map((u, p) => {
1269
- const y = t === u.id, f = o === p, x = n("booking.serviceCardLabel", {
1270
- label: u.label,
1271
- duration: u.durationMin
1272
- }), k = ha(u);
1273
- return /* @__PURE__ */ g(
1284
+ children: e.map((g, u) => {
1285
+ const k = t === g.id, h = o === u, x = n("booking.serviceCardLabel", {
1286
+ label: g.label,
1287
+ duration: g.durationMin
1288
+ }), y = Na(g);
1289
+ return /* @__PURE__ */ f(
1274
1290
  "button",
1275
1291
  {
1276
- ref: (_) => {
1277
- _ ? c.current.set(p, _) : c.current.delete(p);
1292
+ ref: (C) => {
1293
+ C ? c.current.set(u, C) : c.current.delete(u);
1278
1294
  },
1279
1295
  type: "button",
1280
1296
  role: "radio",
1281
- "aria-checked": y,
1297
+ "aria-checked": k,
1282
1298
  "aria-label": x,
1283
- tabIndex: f ? 0 : -1,
1284
- onClick: () => s(u.id),
1285
- onFocus: () => l(p),
1286
- onKeyDown: (_) => h(_, p, u.id),
1287
- className: ya({
1288
- state: y ? "selected" : "idle"
1299
+ tabIndex: h ? 0 : -1,
1300
+ onClick: () => s(g.id),
1301
+ onFocus: () => l(u),
1302
+ onKeyDown: (C) => p(C, u, g.id),
1303
+ className: Ca({
1304
+ state: k ? "selected" : "idle"
1289
1305
  }),
1290
1306
  children: [
1291
1307
  /* @__PURE__ */ a(
@@ -1293,22 +1309,22 @@ function ka({
1293
1309
  {
1294
1310
  "aria-hidden": "true",
1295
1311
  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)]",
1296
- children: k
1312
+ children: y
1297
1313
  }
1298
1314
  ),
1299
- /* @__PURE__ */ g("span", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
1300
- /* @__PURE__ */ a("span", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]", children: u.label }),
1301
- /* @__PURE__ */ a("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: n("booking.serviceSummary", { minutes: u.durationMin }) })
1315
+ /* @__PURE__ */ f("span", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
1316
+ /* @__PURE__ */ a("span", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]", children: g.label }),
1317
+ /* @__PURE__ */ a("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: n("booking.serviceSummary", { minutes: g.durationMin }) })
1302
1318
  ] })
1303
1319
  ]
1304
1320
  },
1305
- u.id
1321
+ g.id
1306
1322
  );
1307
1323
  })
1308
1324
  }
1309
1325
  );
1310
1326
  }
1311
- const xa = xe(
1327
+ const Da = Ie(
1312
1328
  [
1313
1329
  "ds:inline-flex ds:items-center ds:justify-center ds:gap-[var(--spacing-2xs)]",
1314
1330
  "ds:min-h-[var(--min-target-size)]",
@@ -1334,16 +1350,16 @@ const xa = xe(
1334
1350
  defaultVariants: { state: "idle" }
1335
1351
  }
1336
1352
  );
1337
- function Sa(e) {
1353
+ function Ta(e) {
1338
1354
  const [t] = e.split(":").map((n) => parseInt(n, 10)), s = Number.isFinite(t) ? t : 0;
1339
1355
  return s < 12 ? "morning" : s < 17 ? "afternoon" : "evening";
1340
1356
  }
1341
- const Na = {
1342
- morning: xt,
1343
- afternoon: Xt,
1344
- evening: kt
1357
+ const _a = {
1358
+ morning: Dt,
1359
+ afternoon: na,
1360
+ evening: Mt
1345
1361
  };
1346
- function Ye({
1362
+ function tt({
1347
1363
  date: e,
1348
1364
  slots: t,
1349
1365
  selectedSlotKey: s,
@@ -1351,41 +1367,41 @@ function Ye({
1351
1367
  loading: i,
1352
1368
  locale: o
1353
1369
  }) {
1354
- const { t: l } = M(), c = I(() => {
1370
+ const { t: l } = T(), c = I(() => {
1355
1371
  try {
1356
1372
  return new Intl.DateTimeFormat(o, {
1357
1373
  weekday: "long",
1358
1374
  day: "numeric",
1359
1375
  month: "long"
1360
- }).format(Q(e));
1376
+ }).format(ee(e));
1361
1377
  } catch {
1362
1378
  return e;
1363
1379
  }
1364
1380
  }, [e, o]), d = I(() => {
1365
- const p = {
1381
+ const u = {
1366
1382
  morning: [],
1367
1383
  afternoon: [],
1368
1384
  evening: []
1369
1385
  };
1370
- for (const y of t)
1371
- p[Sa(y.time)].push(y);
1372
- return p;
1373
- }, [t]), h = t.filter((p) => p.available).length, u = ["morning", "afternoon", "evening"];
1374
- return i ? /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1375
- /* @__PURE__ */ a(ye, { variant: "text", width: "60%" }),
1376
- [0, 1].map((p) => /* @__PURE__ */ a(
1386
+ for (const k of t)
1387
+ u[Ta(k.time)].push(k);
1388
+ return u;
1389
+ }, [t]), p = t.filter((u) => u.available).length, g = ["morning", "afternoon", "evening"];
1390
+ return i ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1391
+ /* @__PURE__ */ a(Se, { variant: "text", width: "60%" }),
1392
+ [0, 1].map((u) => /* @__PURE__ */ a(
1377
1393
  "div",
1378
1394
  {
1379
1395
  className: "ds:grid ds:grid-cols-3 ds:gap-[var(--spacing-xs)]",
1380
- children: [0, 1, 2].map((y) => /* @__PURE__ */ a(ye, { variant: "rounded", height: "44px" }, y))
1396
+ children: [0, 1, 2].map((k) => /* @__PURE__ */ a(Se, { variant: "rounded", height: "44px" }, k))
1381
1397
  },
1382
- p
1398
+ u
1383
1399
  ))
1384
- ] }) : h === 0 ? /* @__PURE__ */ a(Re, { variant: "no-results", title: l("booking.noSlotsForDate") }) : /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1385
- /* @__PURE__ */ g("div", { className: "ds:flex ds:items-baseline ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
1386
- /* @__PURE__ */ g("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
1400
+ ] }) : p === 0 ? /* @__PURE__ */ a(Ge, { variant: "no-results", title: l("booking.noSlotsForDate") }) : /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1401
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:items-baseline ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
1402
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
1387
1403
  /* @__PURE__ */ a(
1388
- Pt,
1404
+ Kt,
1389
1405
  {
1390
1406
  "aria-hidden": "true",
1391
1407
  className: "ds:size-4 ds:text-[color:var(--accent)]"
@@ -1393,41 +1409,41 @@ function Ye({
1393
1409
  ),
1394
1410
  /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: c })
1395
1411
  ] }),
1396
- /* @__PURE__ */ a("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: l("booking.slotsAvailable", { count: h }) })
1412
+ /* @__PURE__ */ a("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: l("booking.slotsAvailable", { count: p }) })
1397
1413
  ] }),
1398
- u.map((p) => {
1399
- const y = d[p];
1400
- if (y.length === 0) return null;
1401
- const f = Na[p];
1402
- return /* @__PURE__ */ g(
1414
+ g.map((u) => {
1415
+ const k = d[u];
1416
+ if (k.length === 0) return null;
1417
+ const h = _a[u];
1418
+ return /* @__PURE__ */ f(
1403
1419
  "div",
1404
1420
  {
1405
1421
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
1406
1422
  children: [
1407
- /* @__PURE__ */ g("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:text-[color:var(--muted-foreground)]", children: [
1408
- /* @__PURE__ */ a(f, { "aria-hidden": "true", className: "ds:size-3.5" }),
1409
- /* @__PURE__ */ a("span", { className: "type-meta ds:font-[var(--font-weight-semibold)] ds:uppercase", children: l(`booking.timeOfDay.${p}`) })
1423
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:text-[color:var(--muted-foreground)]", children: [
1424
+ /* @__PURE__ */ a(h, { "aria-hidden": "true", className: "ds:size-3.5" }),
1425
+ /* @__PURE__ */ a("span", { className: "type-meta ds:font-[var(--font-weight-semibold)] ds:uppercase", children: l(`booking.timeOfDay.${u}`) })
1410
1426
  ] }),
1411
1427
  /* @__PURE__ */ a(
1412
1428
  "div",
1413
1429
  {
1414
1430
  role: "group",
1415
- "aria-label": l(`booking.timeOfDay.${p}`),
1431
+ "aria-label": l(`booking.timeOfDay.${u}`),
1416
1432
  className: "ds:grid ds:grid-cols-3 ds:gap-[var(--spacing-xs)] ds:sm:grid-cols-4",
1417
- children: y.map((x) => {
1418
- const k = x.key === s, _ = x.available ? k ? "selected" : "idle" : "unavailable";
1433
+ children: k.map((x) => {
1434
+ const y = x.key === s, C = x.available ? y ? "selected" : "idle" : "unavailable";
1419
1435
  return /* @__PURE__ */ a(
1420
1436
  "button",
1421
1437
  {
1422
1438
  type: "button",
1423
1439
  "data-slot-id": x.key,
1424
1440
  disabled: !x.available,
1425
- "aria-pressed": k,
1441
+ "aria-pressed": y,
1426
1442
  "aria-label": l("booking.slotAvailableLabel", {
1427
1443
  time: x.time
1428
1444
  }),
1429
1445
  onClick: () => x.available && n(x),
1430
- className: xa({ state: _ }),
1446
+ className: Da({ state: C }),
1431
1447
  children: x.time
1432
1448
  },
1433
1449
  x.key
@@ -1437,20 +1453,20 @@ function Ye({
1437
1453
  )
1438
1454
  ]
1439
1455
  },
1440
- p
1456
+ u
1441
1457
  );
1442
1458
  })
1443
1459
  ] });
1444
1460
  }
1445
- function Ze({ value: e, onChange: t }) {
1446
- const { t: s } = M(), n = [
1461
+ function at({ value: e, onChange: t }) {
1462
+ const { t: s } = T(), n = [
1447
1463
  { value: "private", label: s("booking.insurance.private") },
1448
1464
  { value: "public", label: s("booking.insurance.public") }
1449
1465
  ];
1450
- return /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1466
+ return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1451
1467
  /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: s("booking.insurance.heading") }),
1452
1468
  /* @__PURE__ */ a(
1453
- Se,
1469
+ we,
1454
1470
  {
1455
1471
  options: n,
1456
1472
  value: e ?? "",
@@ -1463,15 +1479,15 @@ function Ze({ value: e, onChange: t }) {
1463
1479
  )
1464
1480
  ] });
1465
1481
  }
1466
- function Je({ specialties: e, value: t, onChange: s }) {
1467
- const { t: n } = M(), i = e.map((o) => ({
1482
+ function st({ specialties: e, value: t, onChange: s }) {
1483
+ const { t: n } = T(), i = e.map((o) => ({
1468
1484
  value: o.id,
1469
1485
  label: o.label
1470
1486
  }));
1471
- return /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1487
+ return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1472
1488
  /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: n("booking.specialty.heading") }),
1473
1489
  /* @__PURE__ */ a(
1474
- Se,
1490
+ we,
1475
1491
  {
1476
1492
  options: i,
1477
1493
  value: t ?? "",
@@ -1482,8 +1498,8 @@ function Je({ specialties: e, value: t, onChange: s }) {
1482
1498
  )
1483
1499
  ] });
1484
1500
  }
1485
- function Xe({ services: e, value: t, onChange: s, compact: n }) {
1486
- const { t: i } = M();
1501
+ function nt({ services: e, value: t, onChange: s, compact: n }) {
1502
+ const { t: i } = T();
1487
1503
  if (n) {
1488
1504
  const o = e.map((l) => ({
1489
1505
  value: l.id,
@@ -1491,10 +1507,10 @@ function Xe({ services: e, value: t, onChange: s, compact: n }) {
1491
1507
  minutes: l.durationMin
1492
1508
  })}`
1493
1509
  }));
1494
- return /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1510
+ return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1495
1511
  /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: i("booking.service.heading") }),
1496
1512
  /* @__PURE__ */ a(
1497
- Se,
1513
+ we,
1498
1514
  {
1499
1515
  options: o,
1500
1516
  value: t ?? "",
@@ -1505,10 +1521,10 @@ function Xe({ services: e, value: t, onChange: s, compact: n }) {
1505
1521
  )
1506
1522
  ] });
1507
1523
  }
1508
- return /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1524
+ return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1509
1525
  /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: i("booking.service.heading") }),
1510
1526
  /* @__PURE__ */ a(
1511
- ka,
1527
+ Ma,
1512
1528
  {
1513
1529
  services: e,
1514
1530
  selectedServiceId: t,
@@ -1517,18 +1533,18 @@ function Xe({ services: e, value: t, onChange: s, compact: n }) {
1517
1533
  )
1518
1534
  ] });
1519
1535
  }
1520
- function We({ operators: e, value: t, onChange: s }) {
1521
- const { t: n } = M(), i = [
1522
- { value: ue, label: n("booking.operator.all") },
1536
+ function it({ operators: e, value: t, onChange: s }) {
1537
+ const { t: n } = T(), i = [
1538
+ { value: he, label: n("booking.operator.all") },
1523
1539
  ...e.map((o) => ({ value: o.id, label: o.name }))
1524
1540
  ];
1525
- return /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1541
+ return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1526
1542
  /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: n("booking.operator.heading") }),
1527
1543
  /* @__PURE__ */ a(
1528
- Se,
1544
+ we,
1529
1545
  {
1530
1546
  options: i,
1531
- value: t ?? ue,
1547
+ value: t ?? he,
1532
1548
  onValueChange: (o) => s(o),
1533
1549
  placeholder: n("booking.operator.placeholder"),
1534
1550
  "aria-label": n("booking.operator.heading")
@@ -1536,87 +1552,103 @@ function We({ operators: e, value: t, onChange: s }) {
1536
1552
  )
1537
1553
  ] });
1538
1554
  }
1539
- function Qe({
1555
+ function ot({
1540
1556
  customSlot: e
1541
1557
  }) {
1542
- const { t } = M();
1543
- return e ? /* @__PURE__ */ a(ie, { children: e }) : /* @__PURE__ */ g($, { variant: "warning", children: [
1544
- /* @__PURE__ */ a($.Title, { as: "h4", children: t("booking.onboardingIncomplete.title") }),
1545
- /* @__PURE__ */ a($.Description, { children: t("booking.onboardingIncomplete.description") })
1558
+ const { t } = T();
1559
+ return e ? /* @__PURE__ */ a(Z, { children: e }) : /* @__PURE__ */ f(F, { variant: "warning", children: [
1560
+ /* @__PURE__ */ a(F.Title, { as: "h4", children: t("booking.onboardingIncomplete.title") }),
1561
+ /* @__PURE__ */ a(F.Description, { children: t("booking.onboardingIncomplete.description") })
1546
1562
  ] });
1547
1563
  }
1548
- function et({
1564
+ function rt({
1549
1565
  nextAvailableDate: e,
1550
1566
  onJump: t,
1551
1567
  locale: s
1552
1568
  }) {
1553
- const { t: n } = M(), i = I(() => {
1569
+ const { t: n } = T(), i = I(() => {
1554
1570
  try {
1555
1571
  return new Intl.DateTimeFormat(s, { dateStyle: "long" }).format(
1556
- Q(e)
1572
+ ee(e)
1557
1573
  );
1558
1574
  } catch {
1559
1575
  return e;
1560
1576
  }
1561
1577
  }, [e, s]);
1562
- return /* @__PURE__ */ g($, { variant: "info", children: [
1563
- /* @__PURE__ */ a($.Description, { children: n("booking.nextAvailable.description", { date: i }) }),
1564
- /* @__PURE__ */ a($.Action, { children: /* @__PURE__ */ a(oe, { intent: "secondary", size: "sm", onClick: t, children: n("booking.nextAvailable.cta") }) })
1578
+ return /* @__PURE__ */ f(F, { variant: "info", children: [
1579
+ /* @__PURE__ */ a(F.Description, { children: n("booking.nextAvailable.description", { date: i }) }),
1580
+ /* @__PURE__ */ a(F.Action, { children: /* @__PURE__ */ a(se, { intent: "secondary", size: "sm", onClick: t, children: n("booking.nextAvailable.cta") }) })
1565
1581
  ] });
1566
1582
  }
1567
- function Ia({
1583
+ function Aa({
1568
1584
  snapshot: e,
1569
1585
  operators: t,
1570
- locale: s,
1571
- onReset: n
1586
+ specialties: s,
1587
+ services: n,
1588
+ locale: i,
1589
+ mode: o,
1590
+ showModify: l,
1591
+ onReset: c,
1592
+ onModify: d
1572
1593
  }) {
1573
- const { t: i } = M(), l = (e.details.confirmationChannels ?? ["email"]).map(
1574
- (u) => i(`booking.confirmation.channel.${u}`)
1575
- ), c = l.length > 1 ? i("booking.success.descriptionMultiple", {
1576
- channels: l.join(" · ")
1577
- }) : i("booking.success.descriptionSingle", { channel: l[0] }), d = I(() => {
1594
+ const { t: p } = T(), u = (e.details.confirmationChannels ?? ["email"]).map(
1595
+ (A) => p(`booking.confirmation.channel.${A}`)
1596
+ ), k = o === "demo" ? p("booking.success.descriptionDemo") : u.length > 1 ? p("booking.success.descriptionMultiple", {
1597
+ channels: u.join(" · ")
1598
+ }) : p("booking.success.descriptionSingle", { channel: u[0] }), h = I(() => {
1578
1599
  if (e.date)
1579
1600
  try {
1580
- return new Intl.DateTimeFormat(s, {
1601
+ return new Intl.DateTimeFormat(i, {
1581
1602
  weekday: "long",
1582
1603
  day: "numeric",
1583
1604
  month: "long"
1584
- }).format(Q(e.date));
1605
+ }).format(ee(e.date));
1585
1606
  } catch {
1586
1607
  return e.date;
1587
1608
  }
1588
- }, [e.date, s]), h = e.operatorId ? t.find((u) => u.id === e.operatorId) : void 0;
1589
- return /* @__PURE__ */ g(
1609
+ }, [e.date, i]), x = e.operatorId ? t.find((A) => A.id === e.operatorId) : void 0, y = e.specialtyId ? s.find((A) => A.id === e.specialtyId) : void 0, C = e.serviceId ? n.find((A) => A.id === e.serviceId) : void 0;
1610
+ return /* @__PURE__ */ f(
1590
1611
  "div",
1591
1612
  {
1592
1613
  "data-component": "booking-success",
1593
1614
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
1594
1615
  children: [
1595
- /* @__PURE__ */ g($, { variant: "success", children: [
1596
- /* @__PURE__ */ a($.Title, { as: "h3", children: i("booking.success.heading") }),
1597
- /* @__PURE__ */ a($.Description, { children: c })
1616
+ /* @__PURE__ */ f(F, { variant: "success", children: [
1617
+ /* @__PURE__ */ a(F.Title, { as: "h3", children: p("booking.success.heading") }),
1618
+ /* @__PURE__ */ a(F.Description, { children: k })
1598
1619
  ] }),
1599
- /* @__PURE__ */ a("div", { className: "ds:rounded-[var(--radius-md)] ds:bg-[var(--secondary)] ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ g("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: [
1600
- d ? /* @__PURE__ */ g(ie, { children: [
1601
- /* @__PURE__ */ a("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: i("booking.success.summaryDate") }),
1602
- /* @__PURE__ */ a("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: d })
1620
+ /* @__PURE__ */ a("div", { className: "ds:rounded-[var(--radius-md)] ds:bg-[var(--secondary)] ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ f("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: [
1621
+ y ? /* @__PURE__ */ f(Z, { children: [
1622
+ /* @__PURE__ */ a("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: p("booking.success.summarySpecialty") }),
1623
+ /* @__PURE__ */ a("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: y.label })
1624
+ ] }) : null,
1625
+ C ? /* @__PURE__ */ f(Z, { children: [
1626
+ /* @__PURE__ */ a("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: p("booking.success.summaryService") }),
1627
+ /* @__PURE__ */ a("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: C.label })
1603
1628
  ] }) : null,
1604
- /* @__PURE__ */ a("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: i("booking.success.summaryTime") }),
1629
+ h ? /* @__PURE__ */ f(Z, { children: [
1630
+ /* @__PURE__ */ a("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: p("booking.success.summaryDate") }),
1631
+ /* @__PURE__ */ a("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: h })
1632
+ ] }) : null,
1633
+ /* @__PURE__ */ a("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: p("booking.success.summaryTime") }),
1605
1634
  /* @__PURE__ */ a("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: e.slot.time }),
1606
- h ? /* @__PURE__ */ g(ie, { children: [
1607
- /* @__PURE__ */ a("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: i("booking.success.summaryProvider") }),
1608
- /* @__PURE__ */ a("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: h.name })
1635
+ x ? /* @__PURE__ */ f(Z, { children: [
1636
+ /* @__PURE__ */ a("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: p("booking.success.summaryProvider") }),
1637
+ /* @__PURE__ */ a("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: x.name })
1609
1638
  ] }) : null
1610
1639
  ] }) }),
1611
- /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(oe, { intent: "secondary", size: "md", onClick: n, children: i("booking.success.bookAnother") }) })
1640
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
1641
+ /* @__PURE__ */ a(se, { intent: "secondary", size: "md", onClick: c, children: p("booking.success.bookAnother") }),
1642
+ l ? /* @__PURE__ */ a(se, { intent: "ghost", size: "md", onClick: d, children: p("booking.success.modifyBooking") }) : null
1643
+ ] })
1612
1644
  ]
1613
1645
  }
1614
1646
  );
1615
1647
  }
1616
- function tt({ customSlot: e }) {
1617
- const { t } = M();
1618
- return e ? /* @__PURE__ */ a(ie, { children: e }) : /* @__PURE__ */ a(
1619
- Re,
1648
+ function dt({ customSlot: e }) {
1649
+ const { t } = T();
1650
+ return e ? /* @__PURE__ */ a(Z, { children: e }) : /* @__PURE__ */ a(
1651
+ Ge,
1620
1652
  {
1621
1653
  variant: "no-results",
1622
1654
  title: t("booking.emptyServices.title"),
@@ -1624,7 +1656,7 @@ function tt({ customSlot: e }) {
1624
1656
  }
1625
1657
  );
1626
1658
  }
1627
- function wa(e) {
1659
+ function Ba(e) {
1628
1660
  const {
1629
1661
  cascade: t,
1630
1662
  inputs: s,
@@ -1634,91 +1666,91 @@ function wa(e) {
1634
1666
  emptyServicesSlot: l,
1635
1667
  onboardingIncompleteSlot: c,
1636
1668
  loadingSlots: d,
1637
- submitting: h,
1638
- locale: u,
1639
- detailsProps: p
1640
- } = e, { t: y } = M();
1641
- return /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1669
+ submitting: p,
1670
+ locale: g,
1671
+ detailsProps: u
1672
+ } = e, { t: k } = T();
1673
+ return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1642
1674
  t.gates.insurance ? /* @__PURE__ */ a(
1643
- Ze,
1675
+ at,
1644
1676
  {
1645
1677
  value: n.insuranceType,
1646
- onChange: (f) => i($e(n, f))
1678
+ onChange: (h) => i(Ye(n, h))
1647
1679
  }
1648
1680
  ) : null,
1649
1681
  t.gates.specialty ? /* @__PURE__ */ a(
1650
- Je,
1682
+ st,
1651
1683
  {
1652
1684
  specialties: t.filtered.specialties,
1653
1685
  value: n.specialtyId,
1654
- onChange: (f) => i(Ke(n, f))
1686
+ onChange: (h) => i(Ze(n, h))
1655
1687
  }
1656
1688
  ) : null,
1657
- t.gates.service ? t.filtered.services.length === 0 ? /* @__PURE__ */ a(tt, { customSlot: l }) : /* @__PURE__ */ a(
1658
- Xe,
1689
+ t.gates.service ? t.filtered.services.length === 0 ? /* @__PURE__ */ a(dt, { customSlot: l }) : /* @__PURE__ */ a(
1690
+ nt,
1659
1691
  {
1660
1692
  services: t.filtered.services,
1661
1693
  value: n.serviceId,
1662
- onChange: (f) => i(je(n, f))
1694
+ onChange: (h) => i(Je(n, h))
1663
1695
  }
1664
1696
  ) : null,
1665
- t.gates.onboardingIncomplete ? /* @__PURE__ */ a(Qe, { customSlot: c }) : null,
1697
+ t.gates.onboardingIncomplete ? /* @__PURE__ */ a(ot, { customSlot: c }) : null,
1666
1698
  t.gates.operator ? /* @__PURE__ */ a(
1667
- We,
1699
+ it,
1668
1700
  {
1669
1701
  operators: t.filtered.operators,
1670
1702
  value: n.operatorId,
1671
- onChange: (f) => i(qe(n, f))
1703
+ onChange: (h) => i(Xe(n, h))
1672
1704
  }
1673
1705
  ) : null,
1674
- t.gates.date ? /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1675
- /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: y("booking.date.heading") }),
1706
+ t.gates.date ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1707
+ /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: k("booking.date.heading") }),
1676
1708
  s.availableDates.length === 0 && s.nextAvailableDate ? /* @__PURE__ */ a(
1677
- et,
1709
+ rt,
1678
1710
  {
1679
1711
  nextAvailableDate: s.nextAvailableDate,
1680
- onJump: () => i(ke(n, s.nextAvailableDate)),
1681
- locale: u
1712
+ onJump: () => i(Ne(n, s.nextAvailableDate)),
1713
+ locale: g
1682
1714
  }
1683
1715
  ) : /* @__PURE__ */ a(
1684
- Ue,
1716
+ et,
1685
1717
  {
1686
1718
  availableDates: s.availableDates,
1687
1719
  selectedDate: n.date,
1688
- onSelectDate: (f) => i(ke(n, f)),
1689
- locale: u,
1720
+ onSelectDate: (h) => i(Ne(n, h)),
1721
+ locale: g,
1690
1722
  loading: d
1691
1723
  }
1692
1724
  )
1693
1725
  ] }) : null,
1694
- t.gates.slot && n.date ? /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1695
- /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: y("booking.slot.heading") }),
1726
+ t.gates.slot && n.date ? /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1727
+ /* @__PURE__ */ a("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: k("booking.slot.heading") }),
1696
1728
  /* @__PURE__ */ a(
1697
- Ye,
1729
+ tt,
1698
1730
  {
1699
1731
  date: n.date,
1700
1732
  slots: s.availableSlots[n.date] ?? [],
1701
1733
  selectedSlotKey: n.slotKey,
1702
- onSelect: (f) => i(He(n, f.key)),
1734
+ onSelect: (h) => i(We(n, h.key)),
1703
1735
  loading: d,
1704
- locale: u
1736
+ locale: g
1705
1737
  }
1706
1738
  )
1707
1739
  ] }) : null,
1708
1740
  t.gates.details && t.selectedSlot ? /* @__PURE__ */ a(
1709
- Te,
1741
+ Pe,
1710
1742
  {
1711
- ...p,
1743
+ ...u,
1712
1744
  value: n.details ?? {},
1713
- onChange: (f) => i({ ...n, details: f }),
1745
+ onChange: (h) => i({ ...n, details: h }),
1714
1746
  onSubmit: o,
1715
- submitting: h,
1747
+ submitting: p,
1716
1748
  defaultPhoneCountry: e.policy.country
1717
1749
  }
1718
1750
  ) : null
1719
1751
  ] });
1720
1752
  }
1721
- function R(e, t, s = {}) {
1753
+ function K(e, t, s = {}) {
1722
1754
  const {
1723
1755
  cascade: n,
1724
1756
  inputs: i,
@@ -1726,89 +1758,89 @@ function R(e, t, s = {}) {
1726
1758
  onChange: l,
1727
1759
  onSubmit: c,
1728
1760
  emptyServicesSlot: d,
1729
- onboardingIncompleteSlot: h,
1730
- loadingSlots: u,
1731
- submitting: p,
1732
- locale: y,
1733
- detailsProps: f,
1761
+ onboardingIncompleteSlot: p,
1762
+ loadingSlots: g,
1763
+ submitting: u,
1764
+ locale: k,
1765
+ detailsProps: h,
1734
1766
  policy: x
1735
1767
  } = t;
1736
1768
  switch (e) {
1737
1769
  case 1:
1738
1770
  return /* @__PURE__ */ a(
1739
- Ze,
1771
+ at,
1740
1772
  {
1741
1773
  value: o.insuranceType,
1742
- onChange: (k) => l($e(o, k))
1774
+ onChange: (y) => l(Ye(o, y))
1743
1775
  }
1744
1776
  );
1745
1777
  case 2:
1746
1778
  return /* @__PURE__ */ a(
1747
- Je,
1779
+ st,
1748
1780
  {
1749
1781
  specialties: n.filtered.specialties,
1750
1782
  value: o.specialtyId,
1751
- onChange: (k) => l(Ke(o, k))
1783
+ onChange: (y) => l(Ze(o, y))
1752
1784
  }
1753
1785
  );
1754
1786
  case 3:
1755
- return n.filtered.services.length === 0 ? /* @__PURE__ */ a(tt, { customSlot: d }) : n.gates.onboardingIncomplete ? /* @__PURE__ */ a(Qe, { customSlot: h }) : /* @__PURE__ */ a(
1756
- Xe,
1787
+ return n.filtered.services.length === 0 ? /* @__PURE__ */ a(dt, { customSlot: d }) : n.gates.onboardingIncomplete ? /* @__PURE__ */ a(ot, { customSlot: p }) : /* @__PURE__ */ a(
1788
+ nt,
1757
1789
  {
1758
1790
  services: n.filtered.services,
1759
1791
  value: o.serviceId,
1760
- onChange: (k) => l(je(o, k)),
1792
+ onChange: (y) => l(Je(o, y)),
1761
1793
  compact: s.compactService
1762
1794
  }
1763
1795
  );
1764
1796
  case 4:
1765
1797
  return /* @__PURE__ */ a(
1766
- We,
1798
+ it,
1767
1799
  {
1768
1800
  operators: n.filtered.operators,
1769
1801
  value: o.operatorId,
1770
- onChange: (k) => l(qe(o, k))
1802
+ onChange: (y) => l(Xe(o, y))
1771
1803
  }
1772
1804
  );
1773
1805
  case 5:
1774
1806
  return i.availableDates.length === 0 && i.nextAvailableDate ? /* @__PURE__ */ a(
1775
- et,
1807
+ rt,
1776
1808
  {
1777
1809
  nextAvailableDate: i.nextAvailableDate,
1778
- onJump: () => l(ke(o, i.nextAvailableDate)),
1779
- locale: y
1810
+ onJump: () => l(Ne(o, i.nextAvailableDate)),
1811
+ locale: k
1780
1812
  }
1781
1813
  ) : /* @__PURE__ */ a(
1782
- Ue,
1814
+ et,
1783
1815
  {
1784
1816
  availableDates: i.availableDates,
1785
1817
  selectedDate: o.date,
1786
- onSelectDate: (k) => l(ke(o, k)),
1787
- locale: y,
1788
- loading: u
1818
+ onSelectDate: (y) => l(Ne(o, y)),
1819
+ locale: k,
1820
+ loading: g
1789
1821
  }
1790
1822
  );
1791
1823
  case 6:
1792
1824
  return o.date ? /* @__PURE__ */ a(
1793
- Ye,
1825
+ tt,
1794
1826
  {
1795
1827
  date: o.date,
1796
1828
  slots: i.availableSlots[o.date] ?? [],
1797
1829
  selectedSlotKey: o.slotKey,
1798
- onSelect: (k) => l(He(o, k.key)),
1799
- loading: u,
1800
- locale: y
1830
+ onSelect: (y) => l(We(o, y.key)),
1831
+ loading: g,
1832
+ locale: k
1801
1833
  }
1802
1834
  ) : null;
1803
1835
  case 7:
1804
1836
  return n.selectedSlot ? /* @__PURE__ */ a(
1805
- Te,
1837
+ Pe,
1806
1838
  {
1807
- ...f,
1839
+ ...h,
1808
1840
  value: o.details ?? {},
1809
- onChange: (k) => l({ ...o, details: k }),
1841
+ onChange: (y) => l({ ...o, details: y }),
1810
1842
  onSubmit: c,
1811
- submitting: p,
1843
+ submitting: u,
1812
1844
  defaultPhoneCountry: x.country
1813
1845
  }
1814
1846
  ) : null;
@@ -1817,8 +1849,8 @@ function R(e, t, s = {}) {
1817
1849
  return null;
1818
1850
  }
1819
1851
  }
1820
- function _e() {
1821
- const { t: e } = M();
1852
+ function Ve() {
1853
+ const { t: e } = T();
1822
1854
  return I(
1823
1855
  () => ({
1824
1856
  1: e("booking.insurance.heading"),
@@ -1832,29 +1864,29 @@ function _e() {
1832
1864
  [e]
1833
1865
  );
1834
1866
  }
1835
- function Ca(e) {
1836
- const { cascade: t, value: s, activeStep: n, setActiveStep: i } = e, o = _e(), l = I(
1867
+ function Oa(e) {
1868
+ const { cascade: t, value: s, activeStep: n, setActiveStep: i } = e, o = Ve(), l = I(
1837
1869
  () => t.visibleSteps.map((d) => ({
1838
1870
  label: o[d],
1839
- summary: at(d, s, t),
1840
- status: pe(d, s) && d < t.currentStep ? "completed" : void 0,
1841
- content: R(d, e, { compactService: !0 })
1871
+ summary: lt(d, s, t),
1872
+ status: ve(d, s) && d < t.currentStep ? "completed" : void 0,
1873
+ content: K(d, e, { compactService: !0 })
1842
1874
  })),
1843
1875
  [t, s, o, e]
1844
1876
  ), c = Math.max(0, t.visibleSteps.indexOf(n));
1845
1877
  return /* @__PURE__ */ a(
1846
- ft,
1878
+ St,
1847
1879
  {
1848
1880
  activeStep: c,
1849
1881
  steps: l,
1850
1882
  onStepChange: (d) => {
1851
- const h = t.visibleSteps[d];
1852
- h && i(h);
1883
+ const p = t.visibleSteps[d];
1884
+ p && i(p);
1853
1885
  }
1854
1886
  }
1855
1887
  );
1856
1888
  }
1857
- function pe(e, t) {
1889
+ function ve(e, t) {
1858
1890
  switch (e) {
1859
1891
  case 1:
1860
1892
  return t.insuranceType !== void 0;
@@ -1872,9 +1904,9 @@ function pe(e, t) {
1872
1904
  return !1;
1873
1905
  }
1874
1906
  }
1875
- function at(e, t, s) {
1907
+ function lt(e, t, s) {
1876
1908
  var n;
1877
- if (pe(e, t))
1909
+ if (ve(e, t))
1878
1910
  switch (e) {
1879
1911
  case 1:
1880
1912
  return t.insuranceType;
@@ -1891,7 +1923,7 @@ function at(e, t, s) {
1891
1923
  return i == null ? void 0 : i.label;
1892
1924
  }
1893
1925
  case 4: {
1894
- const i = De(t);
1926
+ const i = Ee(t);
1895
1927
  if (!i) return;
1896
1928
  const o = s.filtered.operators.find((l) => l.id === i);
1897
1929
  return o == null ? void 0 : o.name;
@@ -1904,23 +1936,23 @@ function at(e, t, s) {
1904
1936
  return;
1905
1937
  }
1906
1938
  }
1907
- function Ma(e) {
1908
- const { cascade: t, value: s, setActiveStep: n } = e, { t: i } = M(), o = _e(), l = t.visibleSteps.filter(
1939
+ function Ea(e) {
1940
+ const { cascade: t, value: s, setActiveStep: n } = e, { t: i } = T(), o = Ve(), l = t.visibleSteps.filter(
1909
1941
  (d) => d === 1 || d === 2 || d === 3 || d === 4
1910
1942
  ), c = l.some(
1911
- (d) => !pe(d, s)
1943
+ (d) => !ve(d, s)
1912
1944
  );
1913
- return /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1914
- c ? l.filter((d) => !pe(d, s)).slice(0, 1).map((d) => /* @__PURE__ */ a("div", { children: R(d, e, { compactService: !0 }) }, `csf-${d}`)) : /* @__PURE__ */ a(
1945
+ return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1946
+ c ? l.filter((d) => !ve(d, s)).slice(0, 1).map((d) => /* @__PURE__ */ a("div", { children: K(d, e, { compactService: !0 }) }, `csf-${d}`)) : /* @__PURE__ */ a(
1915
1947
  "div",
1916
1948
  {
1917
1949
  role: "group",
1918
1950
  "aria-label": i("booking.regionLabel"),
1919
1951
  className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
1920
1952
  children: l.map((d) => {
1921
- const h = at(d, s, t);
1922
- return h ? /* @__PURE__ */ g(
1923
- oe,
1953
+ const p = lt(d, s, t);
1954
+ return p ? /* @__PURE__ */ f(
1955
+ se,
1924
1956
  {
1925
1957
  intent: "tonal",
1926
1958
  size: "sm",
@@ -1928,7 +1960,7 @@ function Ma(e) {
1928
1960
  children: [
1929
1961
  o[d],
1930
1962
  ": ",
1931
- h
1963
+ p
1932
1964
  ]
1933
1965
  },
1934
1966
  `csc-${d}`
@@ -1936,59 +1968,59 @@ function Ma(e) {
1936
1968
  })
1937
1969
  }
1938
1970
  ),
1939
- !c && t.gates.date ? /* @__PURE__ */ g("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-2", children: [
1940
- /* @__PURE__ */ a("div", { className: "ds:min-w-0", children: R(5, e) }),
1941
- /* @__PURE__ */ a("div", { className: "ds:min-w-0", children: s.date ? R(6, e) : null })
1971
+ !c && t.gates.date ? /* @__PURE__ */ f("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-2", children: [
1972
+ /* @__PURE__ */ a("div", { className: "ds:min-w-0", children: K(5, e) }),
1973
+ /* @__PURE__ */ a("div", { className: "ds:min-w-0", children: s.date ? K(6, e) : null })
1942
1974
  ] }) : null,
1943
- t.gates.details ? /* @__PURE__ */ a("div", { children: R(7, e) }) : null
1975
+ t.gates.details ? /* @__PURE__ */ a("div", { children: K(7, e) }) : null
1944
1976
  ] });
1945
1977
  }
1946
- function Da(e) {
1978
+ function Pa(e) {
1947
1979
  const { cascade: t } = e, s = t.visibleSteps.filter(
1948
1980
  (n) => n === 1 || n === 2 || n === 3 || n === 4
1949
1981
  );
1950
- return /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1951
- /* @__PURE__ */ g("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-2", children: [
1952
- /* @__PURE__ */ a("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: s.map((n) => /* @__PURE__ */ a("div", { children: R(n, e, { compactService: !0 }) }, `fbf-${n}`)) }),
1953
- /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1954
- t.gates.date ? R(5, e) : null,
1955
- t.gates.slot && e.value.date ? R(6, e) : null
1982
+ return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1983
+ /* @__PURE__ */ f("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-2", children: [
1984
+ /* @__PURE__ */ a("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: s.map((n) => /* @__PURE__ */ a("div", { children: K(n, e, { compactService: !0 }) }, `fbf-${n}`)) }),
1985
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1986
+ t.gates.date ? K(5, e) : null,
1987
+ t.gates.slot && e.value.date ? K(6, e) : null
1956
1988
  ] })
1957
1989
  ] }),
1958
- t.gates.details ? R(7, e) : null
1990
+ t.gates.details ? K(7, e) : null
1959
1991
  ] });
1960
1992
  }
1961
- function Ta(e) {
1962
- const { cascade: t, value: s, activeStep: n, setActiveStep: i } = e, { t: o } = M(), l = _e(), c = t.visibleSteps, d = Math.max(0, c.indexOf(n)), h = c.length, u = I(
1963
- () => c.map((f) => ({ label: l[f] })),
1993
+ function Va(e) {
1994
+ const { cascade: t, value: s, activeStep: n, setActiveStep: i } = e, { t: o } = T(), l = Ve(), c = t.visibleSteps, d = Math.max(0, c.indexOf(n)), p = c.length, g = I(
1995
+ () => c.map((h) => ({ label: l[h] })),
1964
1996
  [c, l]
1965
- ), p = d > 0, y = d < h - 1 && pe(n, s);
1966
- return /* @__PURE__ */ g("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1967
- /* @__PURE__ */ a(ht, { activeStep: d, steps: u }),
1968
- /* @__PURE__ */ a("div", { children: R(n, e, { compactService: !0 }) }),
1969
- /* @__PURE__ */ g("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
1997
+ ), u = d > 0, k = d < p - 1 && ve(n, s);
1998
+ return /* @__PURE__ */ f("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1999
+ /* @__PURE__ */ a(Nt, { activeStep: d, steps: g }),
2000
+ /* @__PURE__ */ a("div", { children: K(n, e, { compactService: !0 }) }),
2001
+ /* @__PURE__ */ f("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
1970
2002
  /* @__PURE__ */ a(
1971
- oe,
2003
+ se,
1972
2004
  {
1973
2005
  intent: "ghost",
1974
2006
  size: "md",
1975
- disabled: !p,
2007
+ disabled: !u,
1976
2008
  onClick: () => {
1977
- const f = c[d - 1];
1978
- f && i(f);
2009
+ const h = c[d - 1];
2010
+ h && i(h);
1979
2011
  },
1980
2012
  children: o("booking.actions.back")
1981
2013
  }
1982
2014
  ),
1983
2015
  n < 7 ? /* @__PURE__ */ a(
1984
- oe,
2016
+ se,
1985
2017
  {
1986
2018
  intent: "primary",
1987
2019
  size: "md",
1988
- disabled: !y,
2020
+ disabled: !k,
1989
2021
  onClick: () => {
1990
- const f = c[d + 1];
1991
- f && i(f);
2022
+ const h = c[d + 1];
2023
+ h && i(h);
1992
2024
  },
1993
2025
  children: o("booking.actions.next")
1994
2026
  }
@@ -1996,7 +2028,7 @@ function Ta(e) {
1996
2028
  ] })
1997
2029
  ] });
1998
2030
  }
1999
- const _a = [], Aa = [], Ba = Ve(
2031
+ const La = [], Fa = [], Ra = qe(
2000
2032
  ({
2001
2033
  variant: e = "inline-list",
2002
2034
  country: t,
@@ -2007,60 +2039,65 @@ const _a = [], Aa = [], Ba = Ve(
2007
2039
  specialties: l,
2008
2040
  services: c,
2009
2041
  operators: d,
2010
- availableDates: h,
2011
- availableSlots: u,
2012
- nextAvailableDate: p,
2013
- requireCodiceFiscale: y,
2014
- requireDateOfBirth: f,
2042
+ availableDates: p,
2043
+ availableSlots: g,
2044
+ nextAvailableDate: u,
2045
+ requireCodiceFiscale: k,
2046
+ requireDateOfBirth: h,
2015
2047
  requireInsuranceNumber: x,
2016
- showNote: k,
2017
- showReturningPatientFlag: _,
2018
- privacyPolicyUrl: Y,
2048
+ showNote: y,
2049
+ showReturningPatientFlag: C,
2050
+ privacyPolicyUrl: A,
2019
2051
  termsUrl: S,
2020
- validateCodiceFiscale: r,
2021
- validateInsuranceNumber: b,
2022
- confirmationChannels: D,
2023
- defaultConfirmationChannels: C,
2024
- value: v,
2052
+ validateCodiceFiscale: v,
2053
+ validateInsuranceNumber: r,
2054
+ confirmationChannels: E,
2055
+ defaultConfirmationChannels: M,
2056
+ value: b,
2025
2057
  onChange: N,
2026
- onSubmit: E,
2027
- loadingSlots: Z,
2058
+ onSubmit: R,
2059
+ onStepChange: B,
2060
+ loadingSlots: J,
2028
2061
  submitting: P,
2029
- emptyServicesSlot: V,
2030
- onboardingIncompleteSlot: F,
2031
- "aria-label": T,
2032
- id: K,
2033
- className: j,
2034
- ...ge
2035
- }, te) => {
2036
- const { t: re, i18n: J } = M(), A = e ?? "inline-list", q = J.language ?? "en", H = l ?? _a, G = d ?? Aa;
2037
- se(() => {
2038
- const L = da(v, {
2062
+ submitError: z,
2063
+ mode: G = "live",
2064
+ showModifyOnSuccess: D = !0,
2065
+ surface: ne = "flat",
2066
+ emptyServicesSlot: j,
2067
+ onboardingIncompleteSlot: oe,
2068
+ "aria-label": ie,
2069
+ id: re,
2070
+ className: X,
2071
+ ...de
2072
+ }, le) => {
2073
+ const { t: ce, i18n: Ce } = T(), V = e ?? "inline-list", W = Ce.language ?? "en", $ = l ?? La, q = d ?? Fa;
2074
+ Q(() => {
2075
+ const L = fa(b, {
2039
2076
  useSpecialties: s,
2040
2077
  lockedOperatorId: i,
2041
2078
  autoSelectSingleService: o,
2042
- specialties: H,
2079
+ specialties: $,
2043
2080
  services: c
2044
2081
  });
2045
- (L.specialtyId !== v.specialtyId || L.operatorId !== v.operatorId || L.serviceId !== v.serviceId) && N(L);
2082
+ (L.specialtyId !== b.specialtyId || L.operatorId !== b.operatorId || L.serviceId !== b.serviceId) && N(L);
2046
2083
  }, [
2047
2084
  i,
2048
2085
  s,
2049
2086
  o,
2050
- H,
2087
+ $,
2051
2088
  c
2052
2089
  ]);
2053
- const B = I(
2054
- () => ra({
2090
+ const _ = I(
2091
+ () => ga({
2055
2092
  country: t,
2056
2093
  useSpecialties: s,
2057
2094
  allowOperatorSelection: n,
2058
2095
  lockedOperatorId: i,
2059
- specialties: H,
2096
+ specialties: $,
2060
2097
  services: c,
2061
- operators: G,
2062
- availableSlots: u,
2063
- value: v
2098
+ operators: q,
2099
+ availableSlots: g,
2100
+ value: b
2064
2101
  }),
2065
2102
  [
2066
2103
  t,
@@ -2068,159 +2105,196 @@ const _a = [], Aa = [], Ba = Ve(
2068
2105
  n,
2069
2106
  i,
2070
2107
  o,
2071
- H,
2108
+ $,
2072
2109
  c,
2073
- G,
2074
- h,
2075
- u,
2076
- v
2110
+ q,
2111
+ p,
2112
+ g,
2113
+ b
2077
2114
  ]
2078
- ), [de, ae] = z(
2079
- B.currentStep
2080
- ), le = ne(B.currentStep);
2081
- se(() => {
2082
- B.currentStep > le.current && ae(B.currentStep), le.current = B.currentStep;
2083
- }, [B.currentStep]);
2084
- const [X, W] = z("idle"), [m, w] = z(null), ce = ee(
2115
+ ), [me, m] = H(
2116
+ _.currentStep
2117
+ ), w = te(_.currentStep);
2118
+ Q(() => {
2119
+ _.currentStep > w.current && m(_.currentStep), w.current = _.currentStep;
2120
+ }, [_.currentStep]);
2121
+ const [U, ue] = H("idle"), [Me, De] = H(null), Le = ae(
2085
2122
  async (L) => {
2086
- if (!B.selectedSlot) return;
2087
- const Ie = {
2088
- slot: B.selectedSlot,
2123
+ if (!_.selectedSlot) return;
2124
+ const _e = {
2125
+ slot: _.selectedSlot,
2089
2126
  value: {
2090
- ...v,
2127
+ ...b,
2091
2128
  details: L,
2092
- operatorId: De(v) ?? v.operatorId
2129
+ operatorId: Ee(b) ?? b.operatorId
2093
2130
  },
2094
2131
  details: L
2095
2132
  };
2096
- W("submitting");
2133
+ ue("submitting");
2097
2134
  try {
2098
- await E(Ie), w({
2099
- slot: B.selectedSlot,
2135
+ await R(_e), De({
2136
+ slot: _.selectedSlot,
2100
2137
  details: L,
2101
- insuranceType: v.insuranceType,
2102
- operatorId: De(v),
2103
- date: v.date
2104
- }), W("success");
2138
+ specialtyId: b.specialtyId,
2139
+ serviceId: b.serviceId,
2140
+ insuranceType: b.insuranceType,
2141
+ operatorId: Ee(b),
2142
+ date: b.date
2143
+ }), ue("success");
2105
2144
  } catch {
2106
- throw W("error"), new Error("Booking submission failed");
2145
+ throw ue("error"), new Error("Booking submission failed");
2107
2146
  }
2108
2147
  },
2109
- [B.selectedSlot, E, v]
2110
- ), Ae = ne(null);
2111
- ot(te, () => Ae.current, []);
2112
- const Ne = I(
2148
+ [_.selectedSlot, R, b]
2149
+ ), pe = te(null);
2150
+ pt(le, () => pe.current, []);
2151
+ const ge = U === "success" ? 8 : _.currentStep, Fe = te(null);
2152
+ Q(() => {
2153
+ if (ge !== Fe.current && (Fe.current = ge, B == null || B(ge), ge === 8 && pe.current))
2154
+ try {
2155
+ pe.current.scrollIntoView({
2156
+ behavior: "smooth",
2157
+ block: "start"
2158
+ });
2159
+ } catch {
2160
+ pe.current.scrollIntoView();
2161
+ }
2162
+ }, [ge, B]);
2163
+ const Te = I(
2113
2164
  () => ({
2114
- getVariant: () => A,
2165
+ getVariant: () => V,
2115
2166
  reset: () => {
2116
- N({}), w(null), W("idle"), ae(1);
2167
+ N({}), De(null), ue("idle"), m(1);
2117
2168
  },
2118
2169
  goToStep: (L) => {
2119
- ae(L);
2170
+ m(L);
2120
2171
  }
2121
2172
  }),
2122
- [A, N]
2173
+ [V, N]
2123
2174
  );
2124
- dt(ea, Ne, K);
2125
- const st = T ?? re("booking.regionLabel"), nt = I(() => X !== "success" || !m ? null : /* @__PURE__ */ a(
2126
- Ia,
2175
+ ft(ra, Te, re);
2176
+ const ct = ie ?? ce("booking.regionLabel"), mt = I(() => U !== "success" || !Me ? null : /* @__PURE__ */ a(
2177
+ Aa,
2127
2178
  {
2128
- snapshot: m,
2129
- operators: G,
2130
- locale: q,
2131
- onReset: () => Ne.reset()
2179
+ snapshot: Me,
2180
+ operators: q,
2181
+ specialties: $,
2182
+ services: c,
2183
+ locale: W,
2184
+ mode: G,
2185
+ showModify: D,
2186
+ onReset: () => Te.reset(),
2187
+ onModify: () => {
2188
+ De(null), ue("idle"), m(7);
2189
+ }
2132
2190
  }
2133
- ), [X, m, G, q, Ne]), it = I(() => {
2134
- if (X === "success") return null;
2135
- const L = A === "accordion" ? Ca : A === "calendar" ? Ma : A === "flexible" ? Da : A === "progress" ? Ta : wa, Ie = {
2136
- cascade: B,
2191
+ ), [
2192
+ U,
2193
+ Me,
2194
+ q,
2195
+ $,
2196
+ c,
2197
+ W,
2198
+ G,
2199
+ D,
2200
+ Te
2201
+ ]), ut = I(() => {
2202
+ if (U === "success") return null;
2203
+ const L = V === "accordion" ? Oa : V === "calendar" ? Ea : V === "flexible" ? Pa : V === "progress" ? Va : Ba, _e = {
2204
+ cascade: _,
2137
2205
  inputs: {
2138
- specialties: H,
2206
+ specialties: $,
2139
2207
  services: c,
2140
- operators: G,
2141
- availableDates: h,
2142
- availableSlots: u,
2143
- nextAvailableDate: p
2208
+ operators: q,
2209
+ availableDates: p,
2210
+ availableSlots: g,
2211
+ nextAvailableDate: u
2144
2212
  },
2145
- value: v,
2213
+ value: b,
2146
2214
  onChange: N,
2147
- onSubmit: ce,
2215
+ onSubmit: Le,
2148
2216
  policy: { country: t, lockedOperatorId: i },
2149
2217
  detailsProps: {
2150
- requireCodiceFiscale: y,
2151
- requireDateOfBirth: f,
2218
+ requireCodiceFiscale: k,
2219
+ requireDateOfBirth: h,
2152
2220
  requireInsuranceNumber: x,
2153
- insuranceType: v.insuranceType,
2154
- showNote: k,
2155
- showReturningPatientFlag: _,
2156
- privacyPolicyUrl: Y,
2221
+ insuranceType: b.insuranceType,
2222
+ showNote: y,
2223
+ showReturningPatientFlag: C,
2224
+ privacyPolicyUrl: A,
2157
2225
  termsUrl: S,
2158
- validateCodiceFiscale: r,
2159
- validateInsuranceNumber: b,
2160
- confirmationChannels: D,
2161
- defaultConfirmationChannels: C
2226
+ validateCodiceFiscale: v,
2227
+ validateInsuranceNumber: r,
2228
+ confirmationChannels: E,
2229
+ defaultConfirmationChannels: M,
2230
+ submitError: z
2162
2231
  },
2163
- emptyServicesSlot: V,
2164
- onboardingIncompleteSlot: F,
2165
- loadingSlots: Z,
2232
+ emptyServicesSlot: j,
2233
+ onboardingIncompleteSlot: oe,
2234
+ loadingSlots: J,
2166
2235
  submitting: P,
2167
- locale: q,
2168
- activeStep: de,
2169
- setActiveStep: ae
2236
+ locale: W,
2237
+ activeStep: me,
2238
+ setActiveStep: m
2170
2239
  };
2171
- return /* @__PURE__ */ a(L, { ...Ie });
2240
+ return /* @__PURE__ */ a(L, { ..._e });
2172
2241
  }, [
2173
- X,
2174
- A,
2175
- B,
2176
- H,
2242
+ U,
2243
+ V,
2244
+ _,
2245
+ $,
2177
2246
  c,
2178
- G,
2179
- h,
2180
- u,
2247
+ q,
2181
2248
  p,
2182
- v,
2249
+ g,
2250
+ u,
2251
+ b,
2183
2252
  N,
2184
- ce,
2253
+ Le,
2185
2254
  t,
2186
2255
  i,
2187
- y,
2188
- f,
2189
- x,
2190
2256
  k,
2191
- _,
2192
- Y,
2257
+ h,
2258
+ x,
2259
+ z,
2260
+ y,
2261
+ C,
2262
+ A,
2193
2263
  S,
2264
+ v,
2194
2265
  r,
2195
- b,
2196
- D,
2197
- C,
2198
- V,
2199
- F,
2200
- Z,
2266
+ E,
2267
+ M,
2268
+ j,
2269
+ oe,
2270
+ J,
2201
2271
  P,
2202
- q,
2203
- de
2272
+ W,
2273
+ me
2204
2274
  ]);
2205
- return /* @__PURE__ */ g(
2275
+ return /* @__PURE__ */ f(
2206
2276
  "div",
2207
2277
  {
2208
- ref: Ae,
2278
+ ref: pe,
2209
2279
  role: "region",
2210
- "aria-label": st,
2211
- id: K,
2280
+ "aria-label": ct,
2281
+ id: re,
2212
2282
  "data-component": "booking",
2213
- "data-component-id": K,
2214
- "data-variant": A,
2215
- className: pa({ variant: A, className: j }),
2216
- ...ge,
2283
+ "data-component-id": re,
2284
+ "data-variant": V,
2285
+ className: ka({
2286
+ variant: V,
2287
+ surface: ne,
2288
+ className: X
2289
+ }),
2290
+ ...de,
2217
2291
  children: [
2218
- /* @__PURE__ */ g(
2292
+ /* @__PURE__ */ f(
2219
2293
  "div",
2220
2294
  {
2221
2295
  className: [
2222
2296
  "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]",
2223
- A === "inline-list" ? [
2297
+ V === "inline-list" ? [
2224
2298
  "ds:rounded-[var(--radius-md)]",
2225
2299
  "ds:bg-[color-mix(in_srgb,var(--primary)_35%,var(--background))]",
2226
2300
  "ds:bg-[image:var(--gradient-hero-brand)]",
@@ -2229,22 +2303,22 @@ const _a = [], Aa = [], Ba = Ve(
2229
2303
  ].join(" ") : ""
2230
2304
  ].filter(Boolean).join(" "),
2231
2305
  children: [
2232
- /* @__PURE__ */ a("h2", { className: "type-title-card ds:text-[var(--foreground)] ds:m-0", children: re("booking.regionLabel") }),
2233
- /* @__PURE__ */ a("p", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:m-0", children: re("booking.headingSubtitle") })
2306
+ /* @__PURE__ */ a("h2", { className: "type-title-card ds:text-[var(--foreground)] ds:m-0", children: ce("booking.regionLabel") }),
2307
+ /* @__PURE__ */ a("p", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:m-0", children: ce("booking.headingSubtitle") })
2234
2308
  ]
2235
2309
  }
2236
2310
  ),
2237
- nt ?? it
2311
+ mt ?? ut
2238
2312
  ]
2239
2313
  }
2240
2314
  );
2241
2315
  }
2242
2316
  );
2243
- Ba.displayName = "Booking";
2317
+ Ra.displayName = "Booking";
2244
2318
  export {
2245
- Ba as B,
2246
- Me as C,
2247
- ue as O,
2248
- ea as b
2319
+ Ra as B,
2320
+ Oe as C,
2321
+ he as O,
2322
+ ra as b
2249
2323
  };
2250
- //# sourceMappingURL=booking-BYuc_8HV.js.map
2324
+ //# sourceMappingURL=booking-CBaSujVP.js.map