@alfadocs/ui-kit-debug 1.28.3 → 1.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/dist/_chunks/{booking-BtSOKjQu.js → booking-AabCk7CI.js} +1205 -1148
  2. package/dist/_chunks/booking-AabCk7CI.js.map +1 -0
  3. package/dist/agent-catalog.json +1 -1
  4. package/dist/components/booking/booking-types.d.ts +15 -0
  5. package/dist/components/booking/booking-types.d.ts.map +1 -1
  6. package/dist/components/booking/booking.d.ts.map +1 -1
  7. package/dist/components/booking/details-form.d.ts +7 -0
  8. package/dist/components/booking/details-form.d.ts.map +1 -1
  9. package/dist/components/booking/index.js +1 -1
  10. package/dist/i18n/locales/ar.d.ts +4 -0
  11. package/dist/i18n/locales/ar.d.ts.map +1 -1
  12. package/dist/i18n/locales/ar.js +4 -0
  13. package/dist/i18n/locales/ar.js.map +1 -1
  14. package/dist/i18n/locales/de.d.ts +4 -0
  15. package/dist/i18n/locales/de.d.ts.map +1 -1
  16. package/dist/i18n/locales/de.js +4 -0
  17. package/dist/i18n/locales/de.js.map +1 -1
  18. package/dist/i18n/locales/el.d.ts +4 -0
  19. package/dist/i18n/locales/el.d.ts.map +1 -1
  20. package/dist/i18n/locales/el.js +4 -0
  21. package/dist/i18n/locales/el.js.map +1 -1
  22. package/dist/i18n/locales/en.d.ts +4 -0
  23. package/dist/i18n/locales/en.d.ts.map +1 -1
  24. package/dist/i18n/locales/en.js +4 -0
  25. package/dist/i18n/locales/en.js.map +1 -1
  26. package/dist/i18n/locales/es.d.ts +4 -0
  27. package/dist/i18n/locales/es.d.ts.map +1 -1
  28. package/dist/i18n/locales/es.js +4 -0
  29. package/dist/i18n/locales/es.js.map +1 -1
  30. package/dist/i18n/locales/fr.d.ts +4 -0
  31. package/dist/i18n/locales/fr.d.ts.map +1 -1
  32. package/dist/i18n/locales/fr.js +4 -0
  33. package/dist/i18n/locales/fr.js.map +1 -1
  34. package/dist/i18n/locales/hi.d.ts +4 -0
  35. package/dist/i18n/locales/hi.d.ts.map +1 -1
  36. package/dist/i18n/locales/hi.js +4 -0
  37. package/dist/i18n/locales/hi.js.map +1 -1
  38. package/dist/i18n/locales/it.d.ts +4 -0
  39. package/dist/i18n/locales/it.d.ts.map +1 -1
  40. package/dist/i18n/locales/it.js +4 -0
  41. package/dist/i18n/locales/it.js.map +1 -1
  42. package/dist/i18n/locales/ja.d.ts +4 -0
  43. package/dist/i18n/locales/ja.d.ts.map +1 -1
  44. package/dist/i18n/locales/ja.js +4 -0
  45. package/dist/i18n/locales/ja.js.map +1 -1
  46. package/dist/i18n/locales/nl.d.ts +4 -0
  47. package/dist/i18n/locales/nl.d.ts.map +1 -1
  48. package/dist/i18n/locales/nl.js +4 -0
  49. package/dist/i18n/locales/nl.js.map +1 -1
  50. package/dist/i18n/locales/pl.d.ts +4 -0
  51. package/dist/i18n/locales/pl.d.ts.map +1 -1
  52. package/dist/i18n/locales/pl.js +4 -0
  53. package/dist/i18n/locales/pl.js.map +1 -1
  54. package/dist/i18n/locales/pt.d.ts +4 -0
  55. package/dist/i18n/locales/pt.d.ts.map +1 -1
  56. package/dist/i18n/locales/pt.js +4 -0
  57. package/dist/i18n/locales/pt.js.map +1 -1
  58. package/dist/i18n/locales/ro.d.ts +4 -0
  59. package/dist/i18n/locales/ro.d.ts.map +1 -1
  60. package/dist/i18n/locales/ro.js +4 -0
  61. package/dist/i18n/locales/ro.js.map +1 -1
  62. package/dist/i18n/locales/ru.d.ts +4 -0
  63. package/dist/i18n/locales/ru.d.ts.map +1 -1
  64. package/dist/i18n/locales/ru.js +4 -0
  65. package/dist/i18n/locales/ru.js.map +1 -1
  66. package/dist/i18n/locales/sq.d.ts +4 -0
  67. package/dist/i18n/locales/sq.d.ts.map +1 -1
  68. package/dist/i18n/locales/sq.js +4 -0
  69. package/dist/i18n/locales/sq.js.map +1 -1
  70. package/dist/i18n/locales/sv.d.ts +4 -0
  71. package/dist/i18n/locales/sv.d.ts.map +1 -1
  72. package/dist/i18n/locales/sv.js +4 -0
  73. package/dist/i18n/locales/sv.js.map +1 -1
  74. package/dist/i18n/locales/tr.d.ts +4 -0
  75. package/dist/i18n/locales/tr.d.ts.map +1 -1
  76. package/dist/i18n/locales/tr.js +4 -0
  77. package/dist/i18n/locales/tr.js.map +1 -1
  78. package/dist/i18n/locales/zh.d.ts +4 -0
  79. package/dist/i18n/locales/zh.d.ts.map +1 -1
  80. package/dist/i18n/locales/zh.js +4 -0
  81. package/dist/i18n/locales/zh.js.map +1 -1
  82. package/dist/index.js +1 -1
  83. package/dist/locales/ar.json +4 -0
  84. package/dist/locales/de.json +4 -0
  85. package/dist/locales/el.json +4 -0
  86. package/dist/locales/en.json +4 -0
  87. package/dist/locales/es.json +4 -0
  88. package/dist/locales/fr.json +4 -0
  89. package/dist/locales/hi.json +4 -0
  90. package/dist/locales/it.json +4 -0
  91. package/dist/locales/ja.json +4 -0
  92. package/dist/locales/nl.json +4 -0
  93. package/dist/locales/pl.json +4 -0
  94. package/dist/locales/pt.json +4 -0
  95. package/dist/locales/ro.json +4 -0
  96. package/dist/locales/ru.json +4 -0
  97. package/dist/locales/sq.json +4 -0
  98. package/dist/locales/sv.json +4 -0
  99. package/dist/locales/tr.json +4 -0
  100. package/dist/locales/zh.json +4 -0
  101. package/package.json +1 -1
  102. package/dist/_chunks/booking-BtSOKjQu.js.map +0 -1
@@ -1,51 +1,51 @@
1
- import { jsxs as b, jsx as s, Fragment as ee } from "react/jsx-runtime";
2
- import { forwardRef as wt, useId as rt, useState as U, useCallback as Z, useRef as W, useEffect as G, useMemo as w, useImperativeHandle as es } from "react";
3
- import { c as He } from "./index-D2ZczOXr.js";
4
- import { useTranslation as L, Trans as ts } from "react-i18next";
5
- import { u as ss } from "./registry-DvAUVLHh.js";
6
- import { A as J } from "./alert-CiJT540z.js";
7
- import { B as pe } from "./button-nJaPh_HC.js";
8
- import { C as st } from "./checkbox-BuZ1u__2.js";
9
- import { C as as } from "./checkbox-group-CfqMv57d.js";
10
- import { D as ns } from "./date-picker-B6NW_PS5.js";
11
- import { E as is } from "./email-input-Dpe63k0K.js";
12
- import { F as re } from "./form-field-CahJzTxp.js";
13
- import { P as rs } from "./phone-input-BsZIoE36.js";
14
- import { T as os } from "./text-area-Bt3p7Pt0.js";
15
- import { T as Fe } from "./text-input-CUvCb6ST.js";
16
- import { S as ds } from "./spinner-hbwuKwMf.js";
17
- import { B as Ct } from "./badge-sTusUqZD.js";
18
- import { I as vt } from "./icon-button-DA2CAGHZ.js";
19
- import { S as Ue } from "./select-Bi8zril7.js";
1
+ import { jsxs as v, jsx as s, Fragment as X } from "react/jsx-runtime";
2
+ import { forwardRef as Ct, useId as rt, useState as J, useCallback as Q, useRef as Z, useEffect as H, useMemo as C, useImperativeHandle as ts } from "react";
3
+ import { c as Ue } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as V, Trans as ss } from "react-i18next";
5
+ import { u as as } from "./registry-DvAUVLHh.js";
6
+ import { A as Y } from "./alert-CiJT540z.js";
7
+ import { B as he } from "./button-nJaPh_HC.js";
8
+ import { C as Fe } from "./checkbox-BuZ1u__2.js";
9
+ import { C as ns } from "./checkbox-group-CfqMv57d.js";
10
+ import { D as is } from "./date-picker-B6NW_PS5.js";
11
+ import { E as rs } from "./email-input-Dpe63k0K.js";
12
+ import { F as de } from "./form-field-CahJzTxp.js";
13
+ import { P as os } from "./phone-input-BsZIoE36.js";
14
+ import { T as ds } from "./text-area-Bt3p7Pt0.js";
15
+ import { T as $e } from "./text-input-CUvCb6ST.js";
16
+ import { S as ls } from "./spinner-hbwuKwMf.js";
17
+ import { B as Mt } from "./badge-sTusUqZD.js";
18
+ import { I as bt } from "./icon-button-DA2CAGHZ.js";
19
+ import { S as Je } from "./select-Bi8zril7.js";
20
20
  import { C as ot } from "./combobox-D7_NLE2Z.js";
21
21
  import { M as dt } from "./multi-select-DYOvx2SJ.js";
22
- import { S as qe } from "./skeleton-CZbwyJAA.js";
23
- import { E as Mt } from "./empty-state-X0sVPfVo.js";
24
- import { S as ls } from "./stepper-accordion-DmVykr5F.js";
25
- import { S as cs } from "./stepper-progress-Bv0njx4g.js";
26
- import { S as us } from "./slot-grid-BuZOKfcd.js";
27
- import { p as K } from "./parseISO-fOGpHKXm.js";
28
- import { C as ps } from "./chevron-down-DWE7GSq9.js";
29
- import { l as ke, f as je, b as bt } from "./format-4HNwNGrN.js";
30
- import { w as Dt, c as Se, a as at, i as ms, s as De, l as fs, x as $e } from "./date-picker-variants-B9NLAfUK.js";
31
- import { s as gs } from "./subDays-HPvBuvq3.js";
32
- import { C as hs } from "./chevron-left-B8cOyH-V.js";
33
- import { C as vs } from "./chevron-right-I9AeSxH2.js";
34
- import { c as q } from "./createLucideIcon-DhHxpK9K.js";
35
- import { M as bs, S as ys } from "./sun-Bj9Mr553.js";
36
- import { S as ks } from "./stethoscope-sZXGC43m.js";
37
- import { H as Ss } from "./heart-pulse-BCppJyN2.js";
38
- import { E as xs } from "./eye-BjhN2nYf.js";
39
- import { S as Is } from "./scan-line-CNseIHQ0.js";
40
- import { A as Ns } from "./astroid-BN4f5VXU.js";
41
- import { C as ws } from "./clipboard-check-BeAGxDVT.js";
22
+ import { S as Ge } from "./skeleton-CZbwyJAA.js";
23
+ import { E as Dt } from "./empty-state-X0sVPfVo.js";
24
+ import { S as cs } from "./stepper-accordion-DmVykr5F.js";
25
+ import { S as us } from "./stepper-progress-Bv0njx4g.js";
26
+ import { S as ps } from "./slot-grid-BuZOKfcd.js";
27
+ import { p as j } from "./parseISO-fOGpHKXm.js";
28
+ import { C as ms } from "./chevron-down-DWE7GSq9.js";
29
+ import { l as ke, f as qe, b as yt } from "./format-4HNwNGrN.js";
30
+ import { w as At, c as Se, a as at, i as fs, s as Te, l as gs, x as ze } from "./date-picker-variants-B9NLAfUK.js";
31
+ import { s as hs } from "./subDays-HPvBuvq3.js";
32
+ import { C as vs } from "./chevron-left-B8cOyH-V.js";
33
+ import { C as bs } from "./chevron-right-I9AeSxH2.js";
34
+ import { c as G } from "./createLucideIcon-DhHxpK9K.js";
35
+ import { M as ys, S as ks } from "./sun-Bj9Mr553.js";
36
+ import { S as Ss } from "./stethoscope-sZXGC43m.js";
37
+ import { H as xs } from "./heart-pulse-BCppJyN2.js";
38
+ import { E as Is } from "./eye-BjhN2nYf.js";
39
+ import { S as Ns } from "./scan-line-CNseIHQ0.js";
40
+ import { A as ws } from "./astroid-BN4f5VXU.js";
41
+ import { C as Cs } from "./clipboard-check-BeAGxDVT.js";
42
42
  /**
43
43
  * @license lucide-react v1.22.0 - ISC
44
44
  *
45
45
  * This source code is licensed under the ISC license.
46
46
  * See the LICENSE file in the root directory of this source tree.
47
47
  */
48
- const Cs = [
48
+ const Ms = [
49
49
  [
50
50
  "path",
51
51
  {
@@ -53,14 +53,14 @@ const Cs = [
53
53
  key: "169zse"
54
54
  }
55
55
  ]
56
- ], Ms = q("activity", Cs);
56
+ ], Ds = G("activity", Ms);
57
57
  /**
58
58
  * @license lucide-react v1.22.0 - ISC
59
59
  *
60
60
  * This source code is licensed under the ISC license.
61
61
  * See the LICENSE file in the root directory of this source tree.
62
62
  */
63
- const Ds = [
63
+ const As = [
64
64
  ["path", { d: "M10 16c.5.3 1.2.5 2 .5s1.5-.2 2-.5", key: "1u7htd" }],
65
65
  ["path", { d: "M15 12h.01", key: "1k8ypt" }],
66
66
  [
@@ -71,14 +71,14 @@ const Ds = [
71
71
  }
72
72
  ],
73
73
  ["path", { d: "M9 12h.01", key: "157uk2" }]
74
- ], As = q("baby", Ds);
74
+ ], Ts = G("baby", As);
75
75
  /**
76
76
  * @license lucide-react v1.22.0 - ISC
77
77
  *
78
78
  * This source code is licensed under the ISC license.
79
79
  * See the LICENSE file in the root directory of this source tree.
80
80
  */
81
- const Ts = [
81
+ const _s = [
82
82
  [
83
83
  "path",
84
84
  {
@@ -86,7 +86,7 @@ const Ts = [
86
86
  key: "w610uw"
87
87
  }
88
88
  ]
89
- ], _s = q("bone", Ts);
89
+ ], Bs = G("bone", _s);
90
90
  /**
91
91
  * @license lucide-react v1.22.0 - ISC
92
92
  *
@@ -102,14 +102,14 @@ const Os = [
102
102
  ["path", { d: "M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517", key: "1gq6am" }],
103
103
  ["path", { d: "M6 18a4 4 0 0 1-2-7.464", key: "k1g0md" }],
104
104
  ["path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77", key: "q97ue3" }]
105
- ], Bs = q("brain", Os);
105
+ ], Ls = G("brain", Os);
106
106
  /**
107
107
  * @license lucide-react v1.22.0 - ISC
108
108
  *
109
109
  * This source code is licensed under the ISC license.
110
110
  * See the LICENSE file in the root directory of this source tree.
111
111
  */
112
- const Ls = [
112
+ const Ps = [
113
113
  ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
114
114
  ["path", { d: "M16 2v4", key: "4m81vk" }],
115
115
  ["path", { d: "M3 10h18", key: "8toen8" }],
@@ -118,7 +118,7 @@ const Ls = [
118
118
  ["path", { d: "M13 18H7", key: "bb0bb7" }],
119
119
  ["path", { d: "M7 14h.01", key: "1qa3f1" }],
120
120
  ["path", { d: "M17 18h.01", key: "1bdyru" }]
121
- ], Ps = q("calendar-range", Ls);
121
+ ], Rs = G("calendar-range", Ps);
122
122
  /**
123
123
  * @license lucide-react v1.22.0 - ISC
124
124
  *
@@ -128,66 +128,66 @@ const Ls = [
128
128
  const Es = [
129
129
  ["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" }],
130
130
  ["path", { d: "M15 8.5a2.5 2.5 0 0 0-5 0v1a2 2 0 1 1 0 4", key: "1qnva7" }]
131
- ], Rs = q("ear", Es);
131
+ ], Vs = G("ear", Es);
132
132
  /**
133
133
  * @license lucide-react v1.22.0 - ISC
134
134
  *
135
135
  * This source code is licensed under the ISC license.
136
136
  * See the LICENSE file in the root directory of this source tree.
137
137
  */
138
- const Vs = [
138
+ const Fs = [
139
139
  ["path", { d: "M6 18h8", key: "1borvv" }],
140
140
  ["path", { d: "M3 22h18", key: "8prr45" }],
141
141
  ["path", { d: "M14 22a7 7 0 1 0 0-14h-1", key: "1jwaiy" }],
142
142
  ["path", { d: "M9 14h2", key: "197e7h" }],
143
143
  ["path", { d: "M9 12a2 2 0 0 1-2-2V6h6v4a2 2 0 0 1-2 2Z", key: "1bmzmy" }],
144
144
  ["path", { d: "M12 6V3a1 1 0 0 0-1-1H9a1 1 0 0 0-1 1v3", key: "1drr47" }]
145
- ], Fs = q("microscope", Vs);
145
+ ], $s = G("microscope", Fs);
146
146
  /**
147
147
  * @license lucide-react v1.22.0 - ISC
148
148
  *
149
149
  * This source code is licensed under the ISC license.
150
150
  * See the LICENSE file in the root directory of this source tree.
151
151
  */
152
- const $s = [
152
+ const zs = [
153
153
  [
154
154
  "path",
155
155
  { 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" }
156
156
  ],
157
157
  ["path", { d: "m8.5 8.5 7 7", key: "rvfmvr" }]
158
- ], zs = q("pill", $s);
158
+ ], Ks = G("pill", zs);
159
159
  /**
160
160
  * @license lucide-react v1.22.0 - ISC
161
161
  *
162
162
  * This source code is licensed under the ISC license.
163
163
  * See the LICENSE file in the root directory of this source tree.
164
164
  */
165
- const Ks = [
165
+ const js = [
166
166
  ["circle", { cx: "6", cy: "6", r: "3", key: "1lh9wr" }],
167
167
  ["path", { d: "M8.12 8.12 12 12", key: "1alkpv" }],
168
168
  ["path", { d: "M20 4 8.12 15.88", key: "xgtan2" }],
169
169
  ["circle", { cx: "6", cy: "18", r: "3", key: "fqmcym" }],
170
170
  ["path", { d: "M14.8 14.8 20 20", key: "ptml3r" }]
171
- ], js = q("scissors", Ks);
171
+ ], qs = G("scissors", js);
172
172
  /**
173
173
  * @license lucide-react v1.22.0 - ISC
174
174
  *
175
175
  * This source code is licensed under the ISC license.
176
176
  * See the LICENSE file in the root directory of this source tree.
177
177
  */
178
- const qs = [
178
+ const Gs = [
179
179
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
180
180
  ["path", { d: "M8 14s1.5 2 4 2 4-2 4-2", key: "1y1vjs" }],
181
181
  ["line", { x1: "9", x2: "9.01", y1: "9", y2: "9", key: "yxxnd0" }],
182
182
  ["line", { x1: "15", x2: "15.01", y1: "9", y2: "9", key: "1p4y9e" }]
183
- ], Gs = q("smile", qs);
183
+ ], Hs = G("smile", Gs);
184
184
  /**
185
185
  * @license lucide-react v1.22.0 - ISC
186
186
  *
187
187
  * This source code is licensed under the ISC license.
188
188
  * See the LICENSE file in the root directory of this source tree.
189
189
  */
190
- const Hs = [
190
+ const Us = [
191
191
  ["path", { d: "M12 10V2", key: "16sf7g" }],
192
192
  ["path", { d: "m4.93 10.93 1.41 1.41", key: "2a7f42" }],
193
193
  ["path", { d: "M2 18h2", key: "j10viu" }],
@@ -196,25 +196,25 @@ const Hs = [
196
196
  ["path", { d: "M22 22H2", key: "19qnx5" }],
197
197
  ["path", { d: "m16 6-4 4-4-4", key: "6wukr" }],
198
198
  ["path", { d: "M16 18a4 4 0 0 0-8 0", key: "1lzouq" }]
199
- ], Us = q("sunset", Hs);
199
+ ], Js = G("sunset", Us);
200
200
  /**
201
201
  * @license lucide-react v1.22.0 - ISC
202
202
  *
203
203
  * This source code is licensed under the ISC license.
204
204
  * See the LICENSE file in the root directory of this source tree.
205
205
  */
206
- const Js = [
206
+ const Ys = [
207
207
  ["path", { d: "m18 2 4 4", key: "22kx64" }],
208
208
  ["path", { d: "m17 7 3-3", key: "1w1zoj" }],
209
209
  ["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" }],
210
210
  ["path", { d: "m9 11 4 4", key: "rovt3i" }],
211
211
  ["path", { d: "m5 19-3 3", key: "59f2uf" }],
212
212
  ["path", { d: "m14 4 6 6", key: "yqp9t2" }]
213
- ], yt = q("syringe", Js);
214
- function Ys(e, t, a) {
215
- return Dt(e, -1, a);
213
+ ], kt = G("syringe", Ys);
214
+ function Ws(e, t, a) {
215
+ return At(e, -1, a);
216
216
  }
217
- const Ws = {
217
+ const Zs = {
218
218
  id: "booking",
219
219
  // `view_change` removed (0.69): the layout `variant` is a fixed prop — the
220
220
  // handle exposes only `getVariant` (state), no action mutates it. The flow's
@@ -290,8 +290,8 @@ const Ws = {
290
290
  "email",
291
291
  "whatsapp",
292
292
  "sms"
293
- ], j = "all", Zs = "de";
294
- function Xs(e) {
293
+ ], q = "all", Xs = "de";
294
+ function Qs(e) {
295
295
  return [...e.lockedOperatorId ? e.specialties.filter(
296
296
  (a) => {
297
297
  var n;
@@ -302,7 +302,7 @@ function Xs(e) {
302
302
  return i - r;
303
303
  });
304
304
  }
305
- function Qs(e) {
305
+ function ea(e) {
306
306
  let t = e.services;
307
307
  if (e.lockedOperatorId && (t = t.filter(
308
308
  (n) => {
@@ -310,17 +310,17 @@ function Qs(e) {
310
310
  return (i = n.operatorIds) == null ? void 0 : i.includes(e.lockedOperatorId);
311
311
  }
312
312
  )), e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties) {
313
- const n = te(e.value);
313
+ const n = se(e.value);
314
314
  n.length > 0 && (t = t.filter(
315
315
  (i) => i.specialtyId !== void 0 && n.includes(i.specialtyId)
316
316
  ));
317
317
  }
318
318
  return t;
319
319
  }
320
- function ea(e) {
320
+ function ta(e) {
321
321
  const t = e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties;
322
322
  if (t) {
323
- const a = te(e.value);
323
+ const a = se(e.value);
324
324
  if (a.length > 0)
325
325
  return e.operators.filter(
326
326
  (n) => {
@@ -330,7 +330,7 @@ function ea(e) {
330
330
  );
331
331
  }
332
332
  if (!t) {
333
- const a = me(e.value);
333
+ const a = le(e.value);
334
334
  if (a.length > 0)
335
335
  return e.operators.filter(
336
336
  (n) => {
@@ -341,27 +341,27 @@ function ea(e) {
341
341
  }
342
342
  return [];
343
343
  }
344
- function ta(e, t) {
345
- const a = e.country === Zs, n = !a || e.value.insuranceType !== void 0, r = (e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties) && n, c = te(e.value).length > 0, f = !r || c, o = me(e.value).length > 0, l = !f || o, u = t.operators, S = !!e.allowOperatorSelection && l && o && !e.lockedOperatorId && u.length > 1, h = l && o, I = (!h || e.value.date !== void 0) && e.value.date !== void 0, C = (!I || e.value.slotKey !== void 0) && e.value.slotKey !== void 0, x = o && u.length === 0;
344
+ function sa(e, t) {
345
+ const a = e.country === Xs, n = !a || e.value.insuranceType !== void 0, r = (e.useSpecialties === void 0 ? e.specialties.length > 0 : e.useSpecialties) && n, u = se(e.value).length > 0, m = !r || u, d = le(e.value).length > 0, l = !m || d, c = t.operators, S = !!e.allowOperatorSelection && l && d && !e.lockedOperatorId && c.length > 1, f = l && d, N = (!f || e.value.date !== void 0) && e.value.date !== void 0, D = (!N || e.value.slotKey !== void 0) && e.value.slotKey !== void 0, I = d && c.length === 0;
346
346
  return {
347
347
  insurance: a,
348
348
  specialty: r,
349
- service: f,
349
+ service: m,
350
350
  operator: S,
351
- date: h,
352
- slot: I,
353
- details: C,
354
- onboardingIncomplete: x
351
+ date: f,
352
+ slot: N,
353
+ details: D,
354
+ onboardingIncomplete: I
355
355
  };
356
356
  }
357
- function sa(e, t) {
357
+ function aa(e, t) {
358
358
  const a = [];
359
359
  t.insurance && a.push(1), t.specialty && a.push(2), a.push(3), t.operator && a.push(4), a.push(5), a.push(6), a.push(7);
360
360
  const n = {
361
361
  1: e.value.insuranceType !== void 0,
362
362
  // 0.34.0: array-or-single — satisfied when EITHER form is present.
363
- 2: te(e.value).length > 0,
364
- 3: me(e.value).length > 0,
363
+ 2: se(e.value).length > 0,
364
+ 3: le(e.value).length > 0,
365
365
  4: e.value.operatorId !== void 0 || e.value.operatorIds !== void 0 && e.value.operatorIds.length > 0,
366
366
  5: e.value.date !== void 0,
367
367
  6: e.value.slotKey !== void 0,
@@ -373,30 +373,30 @@ function sa(e, t) {
373
373
  visibleSteps: a
374
374
  };
375
375
  }
376
- function aa(e) {
376
+ function na(e) {
377
377
  const t = {
378
- specialties: Xs(e),
379
- services: Qs(e),
380
- operators: ea(e)
381
- }, a = ta(e, t), { currentStep: n, visibleSteps: i } = sa(e, a);
378
+ specialties: Qs(e),
379
+ services: ea(e),
380
+ operators: ta(e)
381
+ }, a = sa(e, t), { currentStep: n, visibleSteps: i } = aa(e, a);
382
382
  let r;
383
383
  if (e.value.date && e.value.slotKey) {
384
384
  const l = e.availableSlots[e.value.date];
385
- l && (r = l.find((u) => u.key === e.value.slotKey));
385
+ l && (r = l.find((c) => c.key === e.value.slotKey));
386
386
  }
387
- const c = me(e.value), d = c.length > 0 ? e.services.find((l) => l.id === c[0]) : void 0, f = te(e.value).length > 0, o = c.length > 0 && e.value.date !== void 0 && e.value.slotKey !== void 0 && (!a.insurance || e.value.insuranceType !== void 0) && (!a.specialty || f);
387
+ const u = le(e.value), o = u.length > 0 ? e.services.find((l) => l.id === u[0]) : void 0, m = se(e.value).length > 0, d = u.length > 0 && e.value.date !== void 0 && e.value.slotKey !== void 0 && (!a.insurance || e.value.insuranceType !== void 0) && (!a.specialty || m);
388
388
  return {
389
389
  gates: a,
390
390
  filtered: t,
391
391
  currentStep: n,
392
392
  totalSteps: i.length,
393
393
  visibleSteps: i,
394
- isReadyToSubmit: o,
395
- durationMin: d == null ? void 0 : d.durationMin,
394
+ isReadyToSubmit: d,
395
+ durationMin: o == null ? void 0 : o.durationMin,
396
396
  selectedSlot: r
397
397
  };
398
398
  }
399
- function At(e, t) {
399
+ function Tt(e, t) {
400
400
  return {
401
401
  ...e,
402
402
  insuranceType: t,
@@ -408,7 +408,7 @@ function At(e, t) {
408
408
  details: void 0
409
409
  };
410
410
  }
411
- function Tt(e, t) {
411
+ function _t(e, t) {
412
412
  return {
413
413
  ...e,
414
414
  specialtyId: t,
@@ -422,7 +422,7 @@ function Tt(e, t) {
422
422
  details: void 0
423
423
  };
424
424
  }
425
- function _t(e, t) {
425
+ function Bt(e, t) {
426
426
  return {
427
427
  ...e,
428
428
  specialtyId: void 0,
@@ -444,27 +444,27 @@ function Ot(e, t) {
444
444
  // Default the operator to the "All operators" sentinel so a patient
445
445
  // who doesn't care about picking lands on a satisfied step 4 without
446
446
  // any further input.
447
- operatorId: t ? j : void 0,
447
+ operatorId: t ? q : void 0,
448
448
  operatorIds: void 0,
449
449
  date: void 0,
450
450
  slotKey: void 0,
451
451
  details: void 0
452
452
  };
453
453
  }
454
- function Bt(e, t) {
454
+ function Lt(e, t) {
455
455
  const a = !!t && t.length > 0;
456
456
  return {
457
457
  ...e,
458
458
  serviceId: void 0,
459
459
  serviceIds: t,
460
- operatorId: a ? j : void 0,
460
+ operatorId: a ? q : void 0,
461
461
  operatorIds: void 0,
462
462
  date: void 0,
463
463
  slotKey: void 0,
464
464
  details: void 0
465
465
  };
466
466
  }
467
- function Lt(e, t) {
467
+ function Pt(e, t) {
468
468
  return {
469
469
  ...e,
470
470
  operatorId: t,
@@ -474,7 +474,7 @@ function Lt(e, t) {
474
474
  details: void 0
475
475
  };
476
476
  }
477
- function Pt(e, t) {
477
+ function Rt(e, t) {
478
478
  return {
479
479
  ...e,
480
480
  operatorId: void 0,
@@ -484,16 +484,16 @@ function Pt(e, t) {
484
484
  details: void 0
485
485
  };
486
486
  }
487
- function te(e) {
487
+ function se(e) {
488
488
  return e.specialtyIds && e.specialtyIds.length > 0 ? e.specialtyIds : e.specialtyId ? [e.specialtyId] : [];
489
489
  }
490
- function me(e) {
490
+ function le(e) {
491
491
  return e.serviceIds && e.serviceIds.length > 0 ? e.serviceIds : e.serviceId ? [e.serviceId] : [];
492
492
  }
493
- function Ge(e) {
493
+ function He(e) {
494
494
  return e.operatorIds && e.operatorIds.length > 0 ? e.operatorIds : e.operatorId ? [e.operatorId] : [];
495
495
  }
496
- function Je(e, t) {
496
+ function Ye(e, t) {
497
497
  return {
498
498
  ...e,
499
499
  date: t,
@@ -508,43 +508,43 @@ function Et(e, t) {
508
508
  slotKey: t
509
509
  };
510
510
  }
511
- function na(e, t) {
511
+ function ia(e, t) {
512
512
  let a = e;
513
513
  if (t.lockedOperatorId && a.operatorId !== t.lockedOperatorId && (a = { ...a, operatorId: t.lockedOperatorId }), (t.useSpecialties === void 0 ? t.specialties.length > 0 : t.useSpecialties) && t.specialties.length === 1 && a.specialtyId === void 0 && a.specialtyIds === void 0 && (a = { ...a, specialtyId: t.specialties[0].id }), t.autoSelectSingleService) {
514
- const i = te(a), r = i.length > 0 ? t.services.filter(
515
- (c) => c.specialtyId && i.includes(c.specialtyId)
514
+ const i = se(a), r = i.length > 0 ? t.services.filter(
515
+ (u) => u.specialtyId && i.includes(u.specialtyId)
516
516
  ) : t.services;
517
- r.length === 1 && a.serviceId === void 0 && a.serviceIds === void 0 && (a = { ...a, serviceId: r[0].id }, a.operatorId === void 0 && a.operatorIds === void 0 && (a = { ...a, operatorId: j }));
517
+ r.length === 1 && a.serviceId === void 0 && a.serviceIds === void 0 && (a = { ...a, serviceId: r[0].id }, a.operatorId === void 0 && a.operatorIds === void 0 && (a = { ...a, operatorId: q }));
518
518
  }
519
519
  return a;
520
520
  }
521
- function kt(e) {
522
- if (e.operatorId && e.operatorId !== j)
521
+ function St(e) {
522
+ if (e.operatorId && e.operatorId !== q)
523
523
  return e.operatorId;
524
524
  }
525
- function ia(e) {
525
+ function ra(e) {
526
526
  if (!e) return !1;
527
527
  const t = e.trim();
528
528
  return /^\+?\d[\d\s\-()]{6,}$/.test(t);
529
529
  }
530
- function Rt(e) {
530
+ function Vt(e) {
531
531
  const t = e && e.length > 0 ? e : ["email"], a = new Set(t);
532
532
  return it.filter((n) => a.has(n));
533
533
  }
534
- function ra(e, t, a) {
535
- const n = Rt(e), i = new Set(n);
534
+ function oa(e, t, a) {
535
+ const n = Vt(e), i = new Set(n);
536
536
  if (a)
537
537
  return it.filter(
538
- (o) => a.includes(o) && i.has(o)
538
+ (d) => a.includes(d) && i.has(d)
539
539
  );
540
540
  const r = [];
541
541
  i.has("email") && r.push("email");
542
- const c = ia(t), d = i.has("whatsapp");
543
- d && c && r.push("whatsapp"), !d && i.has("sms") && r.push("sms");
544
- const f = new Set(r);
545
- return it.filter((o) => f.has(o));
542
+ const u = ra(t), o = i.has("whatsapp");
543
+ o && u && r.push("whatsapp"), !o && i.has("sms") && r.push("sms");
544
+ const m = new Set(r);
545
+ return it.filter((d) => m.has(d));
546
546
  }
547
- const St = 500, oa = /^[A-Z0-9]{16}$/, da = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, xt = 300, ze = { state: "idle" }, lt = wt(
547
+ const xt = 500, da = /^[A-Z0-9]{16}$/, la = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, It = 300, Ke = { state: "idle" }, lt = Ct(
548
548
  ({
549
549
  value: e,
550
550
  onChange: t,
@@ -552,133 +552,134 @@ const St = 500, oa = /^[A-Z0-9]{16}$/, da = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, xt = 3
552
552
  requireCodiceFiscale: n = !1,
553
553
  requireDateOfBirth: i = !1,
554
554
  requireInsuranceNumber: r = !1,
555
- insuranceType: c,
556
- showNote: d = !1,
557
- showReturningPatientFlag: f = !1,
558
- privacyPolicyUrl: o,
555
+ insuranceType: u,
556
+ showNote: o = !1,
557
+ showReturningPatientFlag: m = !1,
558
+ privacyPolicyUrl: d,
559
559
  termsUrl: l,
560
- validateCodiceFiscale: u,
561
- validateInsuranceNumber: S,
562
- submitting: h = !1,
563
- summarySlot: y,
564
- defaultPhoneCountry: I,
565
- confirmationChannels: N,
566
- defaultConfirmationChannels: C,
567
- submitError: x
568
- }, k) => {
569
- var Oe, Be;
570
- const { t: p } = L(), T = rt(), [D, m] = U(ze), [g, A] = U(ze), [_, V] = U({}), F = Z(
571
- (v) => V((O) => ({ ...O, [v]: !0 })),
560
+ criticalInformationToAccept: c,
561
+ validateCodiceFiscale: S,
562
+ validateInsuranceNumber: f,
563
+ submitting: b = !1,
564
+ summarySlot: N,
565
+ defaultPhoneCountry: w,
566
+ confirmationChannels: D,
567
+ defaultConfirmationChannels: I,
568
+ submitError: y
569
+ }, x) => {
570
+ var K, me;
571
+ const { t: k } = V(), A = rt(), [p, g] = J(Ke), [T, L] = J(Ke), [O, ae] = J({}), P = Q(
572
+ (h) => ae((_) => ({ ..._, [h]: !0 })),
572
573
  []
573
- ), R = W(null), $ = W(
574
+ ), z = Z(null), ne = Z(
574
575
  null
575
576
  );
576
- G(
577
+ H(
577
578
  () => () => {
578
- R.current && clearTimeout(R.current), $.current && clearTimeout($.current);
579
+ z.current && clearTimeout(z.current), ne.current && clearTimeout(ne.current);
579
580
  },
580
581
  []
581
582
  );
582
- const P = Z(
583
- (v) => t({ ...e, ...v }),
583
+ const R = Q(
584
+ (h) => t({ ...e, ...h }),
584
585
  [e, t]
585
- ), oe = w(
586
- () => Rt(N),
587
- [N]
588
- ), X = oe.length >= 2, Ie = W(!1);
589
- G(() => {
590
- if (!X) {
591
- e.confirmationChannels !== void 0 && P({ confirmationChannels: void 0 });
586
+ ), ce = C(
587
+ () => Vt(D),
588
+ [D]
589
+ ), ee = ce.length >= 2, Ie = Z(!1);
590
+ H(() => {
591
+ if (!ee) {
592
+ e.confirmationChannels !== void 0 && R({ confirmationChannels: void 0 });
592
593
  return;
593
594
  }
594
595
  if (e.confirmationChannels !== void 0) {
595
596
  Ie.current = !0;
596
597
  return;
597
598
  }
598
- const v = ra(
599
- oe,
599
+ const h = oa(
600
+ ce,
600
601
  e.mobilePhone,
601
- C
602
+ I
602
603
  );
603
- Ie.current = !0, P({ confirmationChannels: v });
604
+ Ie.current = !0, R({ confirmationChannels: h });
604
605
  }, [
605
- X,
606
- oe,
606
+ ee,
607
+ ce,
607
608
  e.mobilePhone,
608
- C
609
+ I
609
610
  ]);
610
- const de = w(
611
+ const ue = C(
611
612
  () => e.confirmationChannels ?? [],
612
613
  [e.confirmationChannels]
613
- ), Ae = X && de.length === 0;
614
- G(() => {
615
- const v = e.codiceFiscale;
616
- if (!n || !u || !v) {
617
- m(ze);
614
+ ), _e = ee && ue.length === 0;
615
+ H(() => {
616
+ const h = e.codiceFiscale;
617
+ if (!n || !S || !h) {
618
+ g(Ke);
618
619
  return;
619
620
  }
620
- if (!oa.test(v)) {
621
- m({
621
+ if (!da.test(h)) {
622
+ g({
622
623
  state: "invalid",
623
- hint: p("booking.details.codiceFiscale.invalidFormat")
624
+ hint: k("booking.details.codiceFiscale.invalidFormat")
624
625
  });
625
626
  return;
626
627
  }
627
- m({ state: "pending" }), R.current && clearTimeout(R.current), R.current = setTimeout(() => {
628
- u(v).then(
629
- (O) => m(
630
- O.valid ? { state: "valid" } : { state: "invalid", hint: O.hint }
628
+ g({ state: "pending" }), z.current && clearTimeout(z.current), z.current = setTimeout(() => {
629
+ S(h).then(
630
+ (_) => g(
631
+ _.valid ? { state: "valid" } : { state: "invalid", hint: _.hint }
631
632
  )
632
633
  ).catch(
633
- () => m({
634
+ () => g({
634
635
  state: "invalid",
635
- hint: p("booking.details.codiceFiscale.unavailable")
636
+ hint: k("booking.details.codiceFiscale.unavailable")
636
637
  })
637
638
  );
638
- }, xt);
639
- }, [n, u, e.codiceFiscale, p]);
640
- const se = r && c === "public";
641
- G(() => {
642
- const v = e.insuranceNumber;
643
- if (!se || !S || !v) {
644
- A(ze);
639
+ }, It);
640
+ }, [n, S, e.codiceFiscale, k]);
641
+ const ie = r && u === "public";
642
+ H(() => {
643
+ const h = e.insuranceNumber;
644
+ if (!ie || !f || !h) {
645
+ L(Ke);
645
646
  return;
646
647
  }
647
- A({ state: "pending" }), $.current && clearTimeout($.current), $.current = setTimeout(() => {
648
- S(v).then(
649
- (O) => A(
650
- O.valid ? { state: "valid" } : { state: "invalid", hint: O.hint }
648
+ L({ state: "pending" }), ne.current && clearTimeout(ne.current), ne.current = setTimeout(() => {
649
+ f(h).then(
650
+ (_) => L(
651
+ _.valid ? { state: "valid" } : { state: "invalid", hint: _.hint }
651
652
  )
652
653
  ).catch(
653
- () => A({
654
+ () => L({
654
655
  state: "invalid",
655
- hint: p("booking.details.insuranceNumber.unavailable")
656
+ hint: k("booking.details.insuranceNumber.unavailable")
656
657
  })
657
658
  );
658
- }, xt);
659
- }, [se, S, e.insuranceNumber, p]);
660
- const fe = w(
661
- () => !!(e.email && da.test(e.email)),
659
+ }, It);
660
+ }, [ie, f, e.insuranceNumber, k]);
661
+ const Ne = C(
662
+ () => !!(e.email && la.test(e.email)),
662
663
  [e.email]
663
- ), Ne = w(
664
+ ), ve = C(
664
665
  () => !!(e.mobilePhone && e.mobilePhone.length >= 6),
665
666
  [e.mobilePhone]
666
- ), Te = w(() => {
667
- var v, O;
668
- return !(!((v = e.firstName) != null && v.trim()) || !((O = e.lastName) != null && O.trim()) || !fe || !Ne || n && D.state !== "valid" || i && !e.dateOfBirth || se && g.state !== "valid");
667
+ ), Be = C(() => {
668
+ var h, _;
669
+ return !(!((h = e.firstName) != null && h.trim()) || !((_ = e.lastName) != null && _.trim()) || !Ne || !ve || n && p.state !== "valid" || i && !e.dateOfBirth || ie && T.state !== "valid");
669
670
  }, [
670
671
  e.firstName,
671
672
  e.lastName,
672
- fe,
673
673
  Ne,
674
+ ve,
674
675
  n,
675
- D.state,
676
+ p.state,
676
677
  i,
677
678
  e.dateOfBirth,
678
- se,
679
- g.state
680
- ]), _e = !!(e.privacyConsent && e.termsConsent), We = !X || de.length > 0, ae = Te && _e && We && !h, Ze = (v) => {
681
- if (v.preventDefault(), V({
679
+ ie,
680
+ T.state
681
+ ]), we = c != null && c.trim() ? c : void 0, re = we !== void 0, Ze = !re || !!e.criticalInformationAccepted, Ce = !!(e.privacyConsent && e.termsConsent && Ze), Xe = !ee || ue.length > 0, Oe = Be && Ce && Xe && !b, pe = (h) => {
682
+ if (h.preventDefault(), ae({
682
683
  firstName: !0,
683
684
  lastName: !0,
684
685
  email: !0,
@@ -686,14 +687,17 @@ const St = 500, oa = /^[A-Z0-9]{16}$/, da = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, xt = 3
686
687
  codiceFiscale: !0,
687
688
  dateOfBirth: !0,
688
689
  insuranceNumber: !0
689
- }), !ae) return;
690
- const O = {
690
+ }), !Oe) return;
691
+ const _ = {
691
692
  firstName: e.firstName.trim(),
692
693
  lastName: e.lastName.trim(),
693
694
  email: e.email.trim(),
694
695
  mobilePhone: e.mobilePhone,
695
696
  privacyConsent: !0,
696
697
  termsConsent: !0,
698
+ // Only present when the service carried text to accept — a
699
+ // reason without it leaves the key out of the payload entirely.
700
+ ...re ? { criticalInformationAccepted: !0 } : {},
697
701
  codiceFiscale: e.codiceFiscale,
698
702
  dateOfBirth: e.dateOfBirth,
699
703
  insuranceNumber: e.insuranceNumber,
@@ -702,15 +706,15 @@ const St = 500, oa = /^[A-Z0-9]{16}$/, da = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, xt = 3
702
706
  // Only include when the picker was visible; otherwise the single
703
707
  // implicit channel is inferred backend-side from the practice
704
708
  // config.
705
- confirmationChannels: X ? de : void 0
709
+ confirmationChannels: ee ? ue : void 0
706
710
  };
707
- a(O);
708
- }, ge = (v, O) => {
709
- const z = O && /^https?:\/\//i.test(O) ? O : void 0;
710
- return z ? /* @__PURE__ */ s(
711
- ts,
711
+ a(_);
712
+ }, Le = (h, _) => {
713
+ const B = _ && /^https?:\/\//i.test(_) ? _ : void 0;
714
+ return B ? /* @__PURE__ */ s(
715
+ ss,
712
716
  {
713
- i18nKey: v,
717
+ i18nKey: h,
714
718
  components: {
715
719
  // The `<Trans>` runtime injects link text from the i18n
716
720
  // string. The anchor renders empty at static-analysis time,
@@ -722,7 +726,7 @@ const St = 500, oa = /^[A-Z0-9]{16}$/, da = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, xt = 3
722
726
  /* @__PURE__ */ s(
723
727
  "a",
724
728
  {
725
- href: z,
729
+ href: B,
726
730
  target: "_blank",
727
731
  rel: "noopener noreferrer",
728
732
  className: "ds:underline ds:text-[var(--primary)]"
@@ -731,184 +735,223 @@ const St = 500, oa = /^[A-Z0-9]{16}$/, da = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, xt = 3
731
735
  )
732
736
  }
733
737
  }
734
- ) : p(v);
738
+ ) : k(h);
735
739
  };
736
- return /* @__PURE__ */ b(
740
+ return /* @__PURE__ */ v(
737
741
  "form",
738
742
  {
739
- ref: k,
740
- id: T,
743
+ ref: x,
744
+ id: A,
741
745
  noValidate: !0,
742
- onSubmit: Ze,
746
+ onSubmit: pe,
743
747
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
744
748
  children: [
745
- y,
746
- /* @__PURE__ */ b("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
749
+ N,
750
+ /* @__PURE__ */ v("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
747
751
  /* @__PURE__ */ s(
748
- re,
752
+ de,
749
753
  {
750
- label: p("booking.details.firstName.label"),
754
+ label: k("booking.details.firstName.label"),
751
755
  required: !0,
752
- error: _.firstName && !((Oe = e.firstName) != null && Oe.trim()) ? p("booking.details.firstName.required") : void 0,
756
+ error: O.firstName && !((K = e.firstName) != null && K.trim()) ? k("booking.details.firstName.required") : void 0,
753
757
  children: /* @__PURE__ */ s(
754
- Fe,
758
+ $e,
755
759
  {
756
760
  autoComplete: "given-name",
757
761
  value: e.firstName ?? "",
758
- onChange: (v) => P({ firstName: v.target.value }),
759
- onBlur: () => F("firstName")
762
+ onChange: (h) => R({ firstName: h.target.value }),
763
+ onBlur: () => P("firstName")
760
764
  }
761
765
  )
762
766
  }
763
767
  ),
764
768
  /* @__PURE__ */ s(
765
- re,
769
+ de,
766
770
  {
767
- label: p("booking.details.lastName.label"),
771
+ label: k("booking.details.lastName.label"),
768
772
  required: !0,
769
- error: _.lastName && !((Be = e.lastName) != null && Be.trim()) ? p("booking.details.lastName.required") : void 0,
773
+ error: O.lastName && !((me = e.lastName) != null && me.trim()) ? k("booking.details.lastName.required") : void 0,
770
774
  children: /* @__PURE__ */ s(
771
- Fe,
775
+ $e,
772
776
  {
773
777
  autoComplete: "family-name",
774
778
  value: e.lastName ?? "",
775
- onChange: (v) => P({ lastName: v.target.value }),
776
- onBlur: () => F("lastName")
779
+ onChange: (h) => R({ lastName: h.target.value }),
780
+ onBlur: () => P("lastName")
777
781
  }
778
782
  )
779
783
  }
780
784
  )
781
785
  ] }),
782
- /* @__PURE__ */ b("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
786
+ /* @__PURE__ */ v("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
783
787
  /* @__PURE__ */ s(
784
- re,
788
+ de,
785
789
  {
786
- label: p("booking.details.email.label"),
790
+ label: k("booking.details.email.label"),
787
791
  required: !0,
788
- error: _.email && !fe ? p("booking.details.email.invalid") : void 0,
792
+ error: O.email && !Ne ? k("booking.details.email.invalid") : void 0,
789
793
  children: /* @__PURE__ */ s(
790
- is,
794
+ rs,
791
795
  {
792
796
  value: e.email ?? "",
793
- onChange: (v) => P({ email: v.target.value }),
794
- onBlur: () => F("email")
797
+ onChange: (h) => R({ email: h.target.value }),
798
+ onBlur: () => P("email")
795
799
  }
796
800
  )
797
801
  }
798
802
  ),
799
803
  /* @__PURE__ */ s(
800
- re,
804
+ de,
801
805
  {
802
- label: p("booking.details.mobilePhone.label"),
806
+ label: k("booking.details.mobilePhone.label"),
803
807
  required: !0,
804
- error: _.mobilePhone && !Ne ? p("booking.details.mobilePhone.invalid") : void 0,
808
+ error: O.mobilePhone && !ve ? k("booking.details.mobilePhone.invalid") : void 0,
805
809
  children: /* @__PURE__ */ s(
806
- rs,
810
+ os,
807
811
  {
808
812
  value: e.mobilePhone ?? "",
809
- defaultCountry: I == null ? void 0 : I.toUpperCase(),
810
- onChange: (v) => {
811
- P({ mobilePhone: v }), F("mobilePhone");
813
+ defaultCountry: w == null ? void 0 : w.toUpperCase(),
814
+ onChange: (h) => {
815
+ R({ mobilePhone: h }), P("mobilePhone");
812
816
  }
813
817
  }
814
818
  )
815
819
  }
816
820
  )
817
821
  ] }),
818
- n || i ? /* @__PURE__ */ b("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
822
+ n || i ? /* @__PURE__ */ v("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-sm)] ds:sm:grid-cols-2", children: [
819
823
  n ? /* @__PURE__ */ s(
820
- re,
824
+ de,
821
825
  {
822
- label: p("booking.details.codiceFiscale.label"),
826
+ label: k("booking.details.codiceFiscale.label"),
823
827
  required: !0,
824
- description: D.state === "pending" ? p("booking.details.codiceFiscale.checking") : p("booking.details.codiceFiscale.helper"),
825
- error: _.codiceFiscale && D.state === "invalid" ? D.hint ?? p("booking.details.codiceFiscale.invalid") : void 0,
828
+ description: p.state === "pending" ? k("booking.details.codiceFiscale.checking") : k("booking.details.codiceFiscale.helper"),
829
+ error: O.codiceFiscale && p.state === "invalid" ? p.hint ?? k("booking.details.codiceFiscale.invalid") : void 0,
826
830
  children: /* @__PURE__ */ s(
827
- Fe,
831
+ $e,
828
832
  {
829
833
  value: e.codiceFiscale ?? "",
830
834
  maxLength: 16,
831
- onChange: (v) => P({
832
- codiceFiscale: v.target.value.slice(0, 16).toUpperCase()
835
+ onChange: (h) => R({
836
+ codiceFiscale: h.target.value.slice(0, 16).toUpperCase()
833
837
  }),
834
- onBlur: () => F("codiceFiscale")
838
+ onBlur: () => P("codiceFiscale")
835
839
  }
836
840
  )
837
841
  }
838
842
  ) : null,
839
843
  i ? /* @__PURE__ */ s(
840
- re,
844
+ de,
841
845
  {
842
- label: p("booking.details.dateOfBirth.label"),
846
+ label: k("booking.details.dateOfBirth.label"),
843
847
  required: !0,
844
- error: _.dateOfBirth && !e.dateOfBirth ? p("booking.details.dateOfBirth.required") : void 0,
848
+ error: O.dateOfBirth && !e.dateOfBirth ? k("booking.details.dateOfBirth.required") : void 0,
845
849
  children: /* @__PURE__ */ s(
846
- ns,
850
+ is,
847
851
  {
848
852
  value: e.dateOfBirth ? new Date(e.dateOfBirth) : void 0,
849
- onChange: (v) => {
850
- P({
851
- dateOfBirth: v ? v.toISOString().slice(0, 10) : void 0
852
- }), F("dateOfBirth");
853
+ onChange: (h) => {
854
+ R({
855
+ dateOfBirth: h ? h.toISOString().slice(0, 10) : void 0
856
+ }), P("dateOfBirth");
853
857
  }
854
858
  }
855
859
  )
856
860
  }
857
861
  ) : null
858
862
  ] }) : null,
859
- se ? /* @__PURE__ */ s(
860
- re,
863
+ ie ? /* @__PURE__ */ s(
864
+ de,
861
865
  {
862
- label: p("booking.details.insuranceNumber.label"),
866
+ label: k("booking.details.insuranceNumber.label"),
863
867
  required: !0,
864
- description: g.state === "pending" ? p("booking.details.insuranceNumber.checking") : void 0,
865
- error: _.insuranceNumber && g.state === "invalid" ? g.hint ?? p("booking.details.insuranceNumber.invalid") : void 0,
868
+ description: T.state === "pending" ? k("booking.details.insuranceNumber.checking") : void 0,
869
+ error: O.insuranceNumber && T.state === "invalid" ? T.hint ?? k("booking.details.insuranceNumber.invalid") : void 0,
866
870
  children: /* @__PURE__ */ s(
867
- Fe,
871
+ $e,
868
872
  {
869
873
  value: e.insuranceNumber ?? "",
870
- onChange: (v) => P({ insuranceNumber: v.target.value }),
871
- onBlur: () => F("insuranceNumber")
874
+ onChange: (h) => R({ insuranceNumber: h.target.value }),
875
+ onBlur: () => P("insuranceNumber")
872
876
  }
873
877
  )
874
878
  }
875
879
  ) : null,
876
- d ? /* @__PURE__ */ s(
877
- re,
880
+ o ? /* @__PURE__ */ s(
881
+ de,
878
882
  {
879
- label: p("booking.details.note.label"),
880
- description: p("booking.details.note.helper", {
881
- max: St
883
+ label: k("booking.details.note.label"),
884
+ description: k("booking.details.note.helper", {
885
+ max: xt
882
886
  }),
883
887
  children: /* @__PURE__ */ s(
884
- os,
888
+ ds,
885
889
  {
886
890
  value: e.note ?? "",
887
- maxLength: St,
891
+ maxLength: xt,
888
892
  rows: 3,
889
- onChange: (v) => P({ note: v.target.value })
893
+ onChange: (h) => R({ note: h.target.value })
890
894
  }
891
895
  )
892
896
  }
893
897
  ) : null,
894
- f ? /* @__PURE__ */ s(
895
- st,
898
+ m ? /* @__PURE__ */ s(
899
+ Fe,
896
900
  {
897
901
  checked: !!e.returningPatient,
898
- onCheckedChange: (v) => P({ returningPatient: v === !0 }),
899
- label: p("booking.details.returningPatient.label")
902
+ onCheckedChange: (h) => R({ returningPatient: h === !0 }),
903
+ label: k("booking.details.returningPatient.label")
904
+ }
905
+ ) : null,
906
+ we !== void 0 ? /* @__PURE__ */ v(
907
+ "div",
908
+ {
909
+ "data-component": "booking-critical-information",
910
+ role: "group",
911
+ "aria-labelledby": `${A}-critical-information-heading`,
912
+ className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:rounded-[var(--radius-md)] ds:border ds:border-[var(--border)] ds:bg-[var(--muted)] ds:p-[var(--spacing-sm)]",
913
+ children: [
914
+ /* @__PURE__ */ s(
915
+ "h3",
916
+ {
917
+ id: `${A}-critical-information-heading`,
918
+ className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0",
919
+ children: k("booking.details.criticalInformation.heading")
920
+ }
921
+ ),
922
+ /* @__PURE__ */ s("p", { className: "type-body-sm ds:m-0 ds:whitespace-pre-wrap ds:break-words ds:text-[var(--foreground)]", children: we }),
923
+ /* @__PURE__ */ s(
924
+ Fe,
925
+ {
926
+ checked: !!e.criticalInformationAccepted,
927
+ onCheckedChange: (h) => R({ criticalInformationAccepted: h === !0 }),
928
+ "aria-required": !0,
929
+ label: /* @__PURE__ */ v(X, { children: [
930
+ k("booking.details.criticalInformation.accept"),
931
+ /* @__PURE__ */ s(
932
+ "span",
933
+ {
934
+ "aria-hidden": "true",
935
+ className: "ds:text-[var(--destructive)] ds:ms-[var(--spacing-2xs)]",
936
+ children: "*"
937
+ }
938
+ )
939
+ ] })
940
+ }
941
+ )
942
+ ]
900
943
  }
901
944
  ) : null,
902
- /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
945
+ /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
903
946
  /* @__PURE__ */ s(
904
- st,
947
+ Fe,
905
948
  {
906
949
  checked: !!e.privacyConsent,
907
- onCheckedChange: (v) => P({ privacyConsent: v === !0 }),
908
- label: /* @__PURE__ */ b(ee, { children: [
909
- ge(
950
+ onCheckedChange: (h) => R({ privacyConsent: h === !0 }),
951
+ label: /* @__PURE__ */ v(X, { children: [
952
+ Le(
910
953
  "booking.details.consent.privacy.label",
911
- o
954
+ d
912
955
  ),
913
956
  /* @__PURE__ */ s(
914
957
  "span",
@@ -922,12 +965,12 @@ const St = 500, oa = /^[A-Z0-9]{16}$/, da = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, xt = 3
922
965
  }
923
966
  ),
924
967
  /* @__PURE__ */ s(
925
- st,
968
+ Fe,
926
969
  {
927
970
  checked: !!e.termsConsent,
928
- onCheckedChange: (v) => P({ termsConsent: v === !0 }),
929
- label: /* @__PURE__ */ b(ee, { children: [
930
- ge(
971
+ onCheckedChange: (h) => R({ termsConsent: h === !0 }),
972
+ label: /* @__PURE__ */ v(X, { children: [
973
+ Le(
931
974
  "booking.details.consent.terms.label",
932
975
  l
933
976
  ),
@@ -943,40 +986,40 @@ const St = 500, oa = /^[A-Z0-9]{16}$/, da = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, xt = 3
943
986
  }
944
987
  )
945
988
  ] }),
946
- X ? /* @__PURE__ */ s(
989
+ ee ? /* @__PURE__ */ s(
947
990
  "div",
948
991
  {
949
992
  "data-component": "booking-confirmation-channels",
950
993
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
951
994
  children: /* @__PURE__ */ s(
952
- as,
995
+ ns,
953
996
  {
954
- label: p("booking.confirmation.heading"),
955
- helperText: p("booking.confirmation.helper"),
956
- value: de,
957
- onChange: (v) => P({
958
- confirmationChannels: v
997
+ label: k("booking.confirmation.heading"),
998
+ helperText: k("booking.confirmation.helper"),
999
+ value: ue,
1000
+ onChange: (h) => R({
1001
+ confirmationChannels: h
959
1002
  }),
960
1003
  orientation: "vertical",
961
- options: oe.map((v) => ({
962
- value: v,
963
- label: p(`booking.confirmation.channel.${v}`)
1004
+ options: ce.map((h) => ({
1005
+ value: h,
1006
+ label: k(`booking.confirmation.channel.${h}`)
964
1007
  })),
965
- error: Ae ? p("booking.confirmation.atLeastOne") : void 0
1008
+ error: _e ? k("booking.confirmation.atLeastOne") : void 0
966
1009
  }
967
1010
  )
968
1011
  }
969
1012
  ) : null,
970
- x ? /* @__PURE__ */ s(J, { variant: "error", children: /* @__PURE__ */ s(J.Description, { children: x }) }) : null,
1013
+ y ? /* @__PURE__ */ s(Y, { variant: "error", children: /* @__PURE__ */ s(Y.Description, { children: y }) }) : null,
971
1014
  /* @__PURE__ */ s(
972
- pe,
1015
+ he,
973
1016
  {
974
1017
  intent: "primary",
975
1018
  size: "md",
976
1019
  type: "submit",
977
- disabled: !ae,
978
- startIcon: h ? /* @__PURE__ */ s(ds, { variant: "pulse", size: "sm" }) : void 0,
979
- children: p("booking.details.submit")
1020
+ disabled: !Oe,
1021
+ startIcon: b ? /* @__PURE__ */ s(ls, { variant: "pulse", size: "sm" }) : void 0,
1022
+ children: k("booking.details.submit")
980
1023
  }
981
1024
  )
982
1025
  ]
@@ -985,7 +1028,7 @@ const St = 500, oa = /^[A-Z0-9]{16}$/, da = /^[^\s@]+@[^\s@]+\.[^\s@]+$/, xt = 3
985
1028
  }
986
1029
  );
987
1030
  lt.displayName = "BookingDetailsForm";
988
- const la = He(
1031
+ const ca = Ue(
989
1032
  "ds:flex ds:w-full ds:flex-col ds:text-[var(--foreground)]",
990
1033
  {
991
1034
  variants: {
@@ -1013,44 +1056,44 @@ const la = He(
1013
1056
  },
1014
1057
  defaultVariants: { variant: "inline-list", surface: "flat" }
1015
1058
  }
1016
- ), ca = [
1059
+ ), ua = [
1017
1060
  [
1018
1061
  /\b(estetic|aesthetic|botox|filler|mesoterap|chirurgia\s*plastic)/i,
1019
- yt
1062
+ kt
1020
1063
  ],
1021
- [/\b(cardio|ecg|elettrocardio|ecocardio|cuore|heart)/i, Ss],
1022
- [/\b(dent|odonto|tooth|teeth|pulizia|igien|smile)/i, Gs],
1023
- [/\b(oftalmo|ocul|ophthal|vision|occhi|eye)/i, xs],
1024
- [/\b(otorin|udito|orecchi|hearing|ear)/i, Rs],
1025
- [/\b(neuro|brain|cervello)/i, Bs],
1026
- [/\b(pediatr|child|bambin)/i, As],
1027
- [/\b(ortop|ortho|osteo|skeleton|ossa|bone)/i, _s],
1028
- [/\b(lab|analis|test|sang|esami)/i, Fs],
1029
- [/\b(farmaco|pharm|pillol|refill)/i, zs],
1030
- [/\b(chirurg|surg|intervent|operat)/i, js],
1031
- [/\b(scan|rx|x-?ray|raggi|imag|radio|risonan|ecograf|ultras)/i, Is],
1032
- [/\b(vacc|inject|inie|punto)/i, yt],
1033
- [/\b(derma|skin|pelle)/i, Ns],
1034
- [/\b(prima\s*visit|first\s*visit|consult|consulto|valutaz)/i, ws],
1035
- [/\b(general|medicin|family|control|check[-\s]?up)/i, Ms]
1064
+ [/\b(cardio|ecg|elettrocardio|ecocardio|cuore|heart)/i, xs],
1065
+ [/\b(dent|odonto|tooth|teeth|pulizia|igien|smile)/i, Hs],
1066
+ [/\b(oftalmo|ocul|ophthal|vision|occhi|eye)/i, Is],
1067
+ [/\b(otorin|udito|orecchi|hearing|ear)/i, Vs],
1068
+ [/\b(neuro|brain|cervello)/i, Ls],
1069
+ [/\b(pediatr|child|bambin)/i, Ts],
1070
+ [/\b(ortop|ortho|osteo|skeleton|ossa|bone)/i, Bs],
1071
+ [/\b(lab|analis|test|sang|esami)/i, $s],
1072
+ [/\b(farmaco|pharm|pillol|refill)/i, Ks],
1073
+ [/\b(chirurg|surg|intervent|operat)/i, qs],
1074
+ [/\b(scan|rx|x-?ray|raggi|imag|radio|risonan|ecograf|ultras)/i, Ns],
1075
+ [/\b(vacc|inject|inie|punto)/i, kt],
1076
+ [/\b(derma|skin|pelle)/i, ws],
1077
+ [/\b(prima\s*visit|first\s*visit|consult|consulto|valutaz)/i, Cs],
1078
+ [/\b(general|medicin|family|control|check[-\s]?up)/i, Ds]
1036
1079
  ];
1037
- function ua(e) {
1038
- for (const [t, a] of ca)
1080
+ function pa(e) {
1081
+ for (const [t, a] of ua)
1039
1082
  if (t.test(e)) return a;
1040
1083
  return null;
1041
1084
  }
1042
- function pa(e) {
1043
- const t = ua(e.label) ?? ks;
1085
+ function ma(e) {
1086
+ const t = pa(e.label) ?? Ss;
1044
1087
  return /* @__PURE__ */ s(t, { "aria-hidden": "true", className: "ds:size-5" });
1045
1088
  }
1046
- function Vt(e) {
1089
+ function Ft(e) {
1047
1090
  var t;
1048
1091
  return (t = e.priceLabel) != null && t.trim() ? e.priceLabel : void 0;
1049
1092
  }
1050
- function ce(e) {
1051
- return je(e, "yyyy-MM-dd");
1093
+ function fe(e) {
1094
+ return qe(e, "yyyy-MM-dd");
1052
1095
  }
1053
- const ma = [
1096
+ const fa = [
1054
1097
  "ds:relative ds:flex ds:items-center ds:justify-center",
1055
1098
  "ds:min-h-[var(--min-target-size)] ds:min-w-[var(--min-target-size)]",
1056
1099
  "ds:rounded-[var(--radius-sm)]",
@@ -1060,7 +1103,7 @@ const ma = [
1060
1103
  "ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
1061
1104
  "ds:focus-visible:outline-[var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
1062
1105
  "ds:forced-colors:focus-visible:outline-[CanvasText]"
1063
- ].join(" "), fa = He(ma, {
1106
+ ].join(" "), ga = Ue(fa, {
1064
1107
  variants: {
1065
1108
  state: {
1066
1109
  available: "ds:cursor-pointer ds:text-[var(--foreground)] ds:hover:bg-[var(--muted)]/30",
@@ -1071,93 +1114,93 @@ const ma = [
1071
1114
  },
1072
1115
  defaultVariants: { state: "unavailable" }
1073
1116
  });
1074
- function ga({
1117
+ function ha({
1075
1118
  availableDates: e,
1076
1119
  selectedDate: t,
1077
1120
  onSelectDate: a,
1078
1121
  locale: n,
1079
1122
  loading: i
1080
1123
  }) {
1081
- const { t: r } = L(), c = w(() => t ? De(K(t)) : e.length > 0 ? De(K(e[0])) : De(/* @__PURE__ */ new Date()), [t, e]), [d, f] = U(c), [o, l] = U(null), u = w(() => {
1082
- const x = De(d), k = fs(d), p = x.getDay(), T = k.getDate(), D = [];
1083
- for (let m = p; m > 0; m -= 1) {
1084
- const g = new Date(x);
1085
- g.setDate(x.getDate() - m), D.push(g);
1124
+ const { t: r } = V(), u = C(() => t ? Te(j(t)) : e.length > 0 ? Te(j(e[0])) : Te(/* @__PURE__ */ new Date()), [t, e]), [o, m] = J(u), [d, l] = J(null), c = C(() => {
1125
+ const I = Te(o), y = gs(o), x = I.getDay(), k = y.getDate(), A = [];
1126
+ for (let p = x; p > 0; p -= 1) {
1127
+ const g = new Date(I);
1128
+ g.setDate(I.getDate() - p), A.push(g);
1086
1129
  }
1087
- for (let m = 0; m < T; m += 1) {
1088
- const g = new Date(x);
1089
- g.setDate(x.getDate() + m), D.push(g);
1130
+ for (let p = 0; p < k; p += 1) {
1131
+ const g = new Date(I);
1132
+ g.setDate(I.getDate() + p), A.push(g);
1090
1133
  }
1091
- for (; D.length < 42; ) {
1092
- const m = D[D.length - 1], g = new Date(m);
1093
- g.setDate(m.getDate() + 1), D.push(g);
1134
+ for (; A.length < 42; ) {
1135
+ const p = A[A.length - 1], g = new Date(p);
1136
+ g.setDate(p.getDate() + 1), A.push(g);
1094
1137
  }
1095
- return D;
1096
- }, [d]), S = w(() => {
1138
+ return A;
1139
+ }, [o]), S = C(() => {
1097
1140
  try {
1098
1141
  return new Intl.DateTimeFormat(n, {
1099
1142
  month: "long",
1100
1143
  year: "numeric"
1101
- }).format(d);
1144
+ }).format(o);
1102
1145
  } catch {
1103
- return je(d, "MMMM yyyy");
1146
+ return qe(o, "MMMM yyyy");
1104
1147
  }
1105
- }, [d, n]), h = w(() => {
1106
- const x = new Date(2024, 0, 7);
1107
- return Array.from({ length: 7 }, (k, p) => {
1108
- const T = new Date(x);
1109
- T.setDate(x.getDate() + p);
1148
+ }, [o, n]), f = C(() => {
1149
+ const I = new Date(2024, 0, 7);
1150
+ return Array.from({ length: 7 }, (y, x) => {
1151
+ const k = new Date(I);
1152
+ k.setDate(I.getDate() + x);
1110
1153
  try {
1111
- return new Intl.DateTimeFormat(n, { weekday: "short" }).format(T);
1154
+ return new Intl.DateTimeFormat(n, { weekday: "short" }).format(k);
1112
1155
  } catch {
1113
- return je(T, "EEE");
1156
+ return qe(k, "EEE");
1114
1157
  }
1115
1158
  });
1116
- }, [n]), y = w(() => new Set(e), [e]), I = Z(
1117
- (x) => y.has(ce(x)),
1118
- [y]
1119
- ), N = w(() => {
1120
- if (o) return o;
1121
- if (t) return K(t);
1122
- const x = u.find(
1123
- (k) => $e(k, d) && I(k)
1159
+ }, [n]), b = C(() => new Set(e), [e]), N = Q(
1160
+ (I) => b.has(fe(I)),
1161
+ [b]
1162
+ ), w = C(() => {
1163
+ if (d) return d;
1164
+ if (t) return j(t);
1165
+ const I = c.find(
1166
+ (y) => ze(y, o) && N(y)
1124
1167
  );
1125
- return x || (u.find((k) => $e(k, d)) ?? null);
1126
- }, [o, t, u, d, I]), C = Z(
1127
- (x, k) => {
1128
- let p = null;
1129
- switch (x.key) {
1168
+ return I || (c.find((y) => ze(y, o)) ?? null);
1169
+ }, [d, t, c, o, N]), D = Q(
1170
+ (I, y) => {
1171
+ let x = null;
1172
+ switch (I.key) {
1130
1173
  case "ArrowLeft":
1131
- p = new Date(k), p.setDate(k.getDate() - 1);
1174
+ x = new Date(y), x.setDate(y.getDate() - 1);
1132
1175
  break;
1133
1176
  case "ArrowRight":
1134
- p = new Date(k), p.setDate(k.getDate() + 1);
1177
+ x = new Date(y), x.setDate(y.getDate() + 1);
1135
1178
  break;
1136
1179
  case "ArrowUp":
1137
- p = new Date(k), p.setDate(k.getDate() - 7);
1180
+ x = new Date(y), x.setDate(y.getDate() - 7);
1138
1181
  break;
1139
1182
  case "ArrowDown":
1140
- p = new Date(k), p.setDate(k.getDate() + 7);
1183
+ x = new Date(y), x.setDate(y.getDate() + 7);
1141
1184
  break;
1142
1185
  case "Home":
1143
- p = new Date(k), p.setDate(k.getDate() - k.getDay());
1186
+ x = new Date(y), x.setDate(y.getDate() - y.getDay());
1144
1187
  break;
1145
1188
  case "End":
1146
- p = new Date(k), p.setDate(k.getDate() + (6 - k.getDay()));
1189
+ x = new Date(y), x.setDate(y.getDate() + (6 - y.getDay()));
1147
1190
  break;
1148
1191
  case "Enter":
1149
1192
  case " ": {
1150
- x.preventDefault(), I(k) && a(ce(k));
1193
+ I.preventDefault(), N(y) && a(fe(y));
1151
1194
  return;
1152
1195
  }
1153
1196
  default:
1154
1197
  return;
1155
1198
  }
1156
- p && (x.preventDefault(), $e(p, d) || f(De(p)), l(p));
1199
+ x && (I.preventDefault(), ze(x, o) || m(Te(x)), l(x));
1157
1200
  },
1158
- [I, a, d]
1201
+ [N, a, o]
1159
1202
  );
1160
- return i ? /* @__PURE__ */ b(
1203
+ return i ? /* @__PURE__ */ v(
1161
1204
  "div",
1162
1205
  {
1163
1206
  role: "status",
@@ -1165,22 +1208,22 @@ function ga({
1165
1208
  "aria-label": r("common.loading"),
1166
1209
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
1167
1210
  children: [
1168
- /* @__PURE__ */ s(qe, { variant: "text", width: "40%" }),
1169
- /* @__PURE__ */ s("div", { className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]", children: Array.from({ length: 42 }, (x, k) => /* @__PURE__ */ s(qe, { variant: "rounded", height: "2.5rem" }, `mg-skel-${k}`)) })
1211
+ /* @__PURE__ */ s(Ge, { variant: "text", width: "40%" }),
1212
+ /* @__PURE__ */ s("div", { className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]", children: Array.from({ length: 42 }, (I, y) => /* @__PURE__ */ s(Ge, { variant: "rounded", height: "2.5rem" }, `mg-skel-${y}`)) })
1170
1213
  ]
1171
1214
  }
1172
- ) : /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1173
- /* @__PURE__ */ b("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
1215
+ ) : /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1216
+ /* @__PURE__ */ v("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
1174
1217
  /* @__PURE__ */ s(
1175
- vt,
1218
+ bt,
1176
1219
  {
1177
- icon: /* @__PURE__ */ s(hs, {}),
1220
+ icon: /* @__PURE__ */ s(vs, {}),
1178
1221
  "aria-label": r("booking.previousMonth"),
1179
1222
  size: "sm",
1180
1223
  intent: "ghost",
1181
1224
  flipIconInRtl: !0,
1182
1225
  onClick: () => {
1183
- f((x) => Ys(x)), l(null);
1226
+ m((I) => Ws(I)), l(null);
1184
1227
  }
1185
1228
  }
1186
1229
  ),
@@ -1193,20 +1236,20 @@ function ga({
1193
1236
  }
1194
1237
  ),
1195
1238
  /* @__PURE__ */ s(
1196
- vt,
1239
+ bt,
1197
1240
  {
1198
- icon: /* @__PURE__ */ s(vs, {}),
1241
+ icon: /* @__PURE__ */ s(bs, {}),
1199
1242
  "aria-label": r("booking.nextMonth"),
1200
1243
  size: "sm",
1201
1244
  intent: "ghost",
1202
1245
  flipIconInRtl: !0,
1203
1246
  onClick: () => {
1204
- f((x) => Dt(x, 1)), l(null);
1247
+ m((I) => At(I, 1)), l(null);
1205
1248
  }
1206
1249
  }
1207
1250
  )
1208
1251
  ] }),
1209
- /* @__PURE__ */ b(
1252
+ /* @__PURE__ */ v(
1210
1253
  "div",
1211
1254
  {
1212
1255
  role: "grid",
@@ -1218,30 +1261,30 @@ function ga({
1218
1261
  {
1219
1262
  role: "row",
1220
1263
  className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]",
1221
- children: h.map((x, k) => /* @__PURE__ */ s(
1264
+ children: f.map((I, y) => /* @__PURE__ */ s(
1222
1265
  "div",
1223
1266
  {
1224
1267
  role: "columnheader",
1225
1268
  className: "type-meta ds:text-center ds:text-[var(--muted-foreground)] ds:font-[var(--font-weight-medium)]",
1226
- children: x
1269
+ children: I
1227
1270
  },
1228
- `wd-${k}`
1271
+ `wd-${y}`
1229
1272
  ))
1230
1273
  }
1231
1274
  ),
1232
- Array.from({ length: 6 }, (x, k) => /* @__PURE__ */ s(
1275
+ Array.from({ length: 6 }, (I, y) => /* @__PURE__ */ s(
1233
1276
  "div",
1234
1277
  {
1235
1278
  role: "row",
1236
1279
  className: "ds:grid ds:grid-cols-7 ds:gap-[var(--spacing-2xs)]",
1237
- children: u.slice(k * 7, k * 7 + 7).map((p, T) => {
1238
- const D = k * 7 + T, m = $e(p, d), g = m && I(p), A = t ? bt(p, K(t)) : !1, _ = m ? A ? "selected" : g ? "available" : "unavailable" : "outside", V = N ? bt(N, p) : !1, F = (() => {
1280
+ children: c.slice(y * 7, y * 7 + 7).map((x, k) => {
1281
+ const A = y * 7 + k, p = ze(x, o), g = p && N(x), T = t ? yt(x, j(t)) : !1, L = p ? T ? "selected" : g ? "available" : "unavailable" : "outside", O = w ? yt(w, x) : !1, ae = (() => {
1239
1282
  try {
1240
1283
  return new Intl.DateTimeFormat(n, {
1241
1284
  dateStyle: "full"
1242
- }).format(p);
1285
+ }).format(x);
1243
1286
  } catch {
1244
- return je(p, "PPP");
1287
+ return qe(x, "PPP");
1245
1288
  }
1246
1289
  })();
1247
1290
  return /* @__PURE__ */ s(
@@ -1249,30 +1292,30 @@ function ga({
1249
1292
  {
1250
1293
  type: "button",
1251
1294
  role: "gridcell",
1252
- "aria-label": F,
1253
- "aria-selected": A || void 0,
1295
+ "aria-label": ae,
1296
+ "aria-selected": T || void 0,
1254
1297
  "aria-disabled": !g || void 0,
1255
- tabIndex: V ? 0 : -1,
1298
+ tabIndex: O ? 0 : -1,
1256
1299
  disabled: !g,
1257
1300
  onClick: () => {
1258
- g && a(ce(p));
1301
+ g && a(fe(x));
1259
1302
  },
1260
- onKeyDown: (R) => C(R, p),
1261
- className: fa({ state: _ }),
1262
- children: /* @__PURE__ */ s("span", { "aria-hidden": "true", children: p.getDate() })
1303
+ onKeyDown: (P) => D(P, x),
1304
+ className: ga({ state: L }),
1305
+ children: /* @__PURE__ */ s("span", { "aria-hidden": "true", children: x.getDate() })
1263
1306
  },
1264
- `mg-cell-${D}`
1307
+ `mg-cell-${A}`
1265
1308
  );
1266
1309
  })
1267
1310
  },
1268
- `mg-row-${k}`
1311
+ `mg-row-${y}`
1269
1312
  ))
1270
1313
  ]
1271
1314
  }
1272
1315
  )
1273
1316
  ] });
1274
1317
  }
1275
- const ha = He(
1318
+ const va = Ue(
1276
1319
  [
1277
1320
  "ds:relative ds:flex ds:w-full ds:items-center ds:gap-[var(--spacing-md)]",
1278
1321
  "ds:min-h-[var(--min-target-size)]",
@@ -1298,47 +1341,47 @@ const ha = He(
1298
1341
  defaultVariants: { state: "idle" }
1299
1342
  }
1300
1343
  );
1301
- function va({
1344
+ function ba({
1302
1345
  services: e,
1303
1346
  selectedServiceId: t,
1304
1347
  onSelect: a
1305
1348
  }) {
1306
- const { t: n } = L(), i = rt(), [r, c] = U(() => {
1349
+ const { t: n } = V(), i = rt(), [r, u] = J(() => {
1307
1350
  if (t) {
1308
- const l = e.findIndex((u) => u.id === t);
1351
+ const l = e.findIndex((c) => c.id === t);
1309
1352
  if (l >= 0) return l;
1310
1353
  }
1311
1354
  return 0;
1312
- }), d = W(/* @__PURE__ */ new Map()), f = Z((l) => {
1313
- var u;
1314
- (u = d.current.get(l)) == null || u.focus();
1315
- }, []), o = Z(
1316
- (l, u, S) => {
1317
- const h = e.length;
1318
- if (h !== 0)
1355
+ }), o = Z(/* @__PURE__ */ new Map()), m = Q((l) => {
1356
+ var c;
1357
+ (c = o.current.get(l)) == null || c.focus();
1358
+ }, []), d = Q(
1359
+ (l, c, S) => {
1360
+ const f = e.length;
1361
+ if (f !== 0)
1319
1362
  switch (l.key) {
1320
1363
  case "ArrowDown":
1321
1364
  case "ArrowRight": {
1322
1365
  l.preventDefault();
1323
- const y = (u + 1) % h;
1324
- c(y), f(y);
1366
+ const b = (c + 1) % f;
1367
+ u(b), m(b);
1325
1368
  break;
1326
1369
  }
1327
1370
  case "ArrowUp":
1328
1371
  case "ArrowLeft": {
1329
1372
  l.preventDefault();
1330
- const y = (u - 1 + h) % h;
1331
- c(y), f(y);
1373
+ const b = (c - 1 + f) % f;
1374
+ u(b), m(b);
1332
1375
  break;
1333
1376
  }
1334
1377
  case "Home": {
1335
- l.preventDefault(), c(0), f(0);
1378
+ l.preventDefault(), u(0), m(0);
1336
1379
  break;
1337
1380
  }
1338
1381
  case "End": {
1339
1382
  l.preventDefault();
1340
- const y = h - 1;
1341
- c(y), f(y);
1383
+ const b = f - 1;
1384
+ u(b), m(b);
1342
1385
  break;
1343
1386
  }
1344
1387
  case "Enter":
@@ -1348,7 +1391,7 @@ function va({
1348
1391
  }
1349
1392
  }
1350
1393
  },
1351
- [e.length, f, a]
1394
+ [e.length, m, a]
1352
1395
  );
1353
1396
  return e.length === 0 ? null : /* @__PURE__ */ s(
1354
1397
  "div",
@@ -1357,29 +1400,29 @@ function va({
1357
1400
  "aria-label": n("booking.serviceListLabel"),
1358
1401
  id: i,
1359
1402
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
1360
- children: e.map((l, u) => {
1361
- const S = t === l.id, h = r === u, y = Vt(l), I = y ? n("booking.serviceCardLabelPrice", {
1403
+ children: e.map((l, c) => {
1404
+ const S = t === l.id, f = r === c, b = Ft(l), N = b ? n("booking.serviceCardLabelPrice", {
1362
1405
  label: l.label,
1363
- price: y
1406
+ price: b
1364
1407
  }) : n("booking.serviceCardLabel", {
1365
1408
  label: l.label,
1366
1409
  duration: l.durationMin
1367
- }), N = pa(l);
1368
- return /* @__PURE__ */ b(
1410
+ }), w = ma(l);
1411
+ return /* @__PURE__ */ v(
1369
1412
  "button",
1370
1413
  {
1371
- ref: (C) => {
1372
- C ? d.current.set(u, C) : d.current.delete(u);
1414
+ ref: (D) => {
1415
+ D ? o.current.set(c, D) : o.current.delete(c);
1373
1416
  },
1374
1417
  type: "button",
1375
1418
  role: "radio",
1376
1419
  "aria-checked": S,
1377
- "aria-label": I,
1378
- tabIndex: h ? 0 : -1,
1420
+ "aria-label": N,
1421
+ tabIndex: f ? 0 : -1,
1379
1422
  onClick: () => a(l.id),
1380
- onFocus: () => c(u),
1381
- onKeyDown: (C) => o(C, u, l.id),
1382
- className: ha({
1423
+ onFocus: () => u(c),
1424
+ onKeyDown: (D) => d(D, c, l.id),
1425
+ className: va({
1383
1426
  state: S ? "selected" : "idle"
1384
1427
  }),
1385
1428
  children: [
@@ -1388,21 +1431,21 @@ function va({
1388
1431
  {
1389
1432
  "aria-hidden": "true",
1390
1433
  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)]",
1391
- children: N
1434
+ children: w
1392
1435
  }
1393
1436
  ),
1394
- /* @__PURE__ */ b("span", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
1437
+ /* @__PURE__ */ v("span", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
1395
1438
  /* @__PURE__ */ s("span", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)]", children: l.label }),
1396
- y ? null : /* @__PURE__ */ s("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: n("booking.serviceSummary", {
1439
+ b ? null : /* @__PURE__ */ s("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: n("booking.serviceSummary", {
1397
1440
  minutes: l.durationMin
1398
1441
  }) })
1399
1442
  ] }),
1400
- y ? /* @__PURE__ */ s(
1443
+ b ? /* @__PURE__ */ s(
1401
1444
  "span",
1402
1445
  {
1403
1446
  "aria-hidden": "true",
1404
1447
  className: "ds:inline-flex ds:shrink-0 ds:items-center ds:ms-auto",
1405
- children: /* @__PURE__ */ s(Ct, { variant: "accentSoft", size: "lg", children: y })
1448
+ children: /* @__PURE__ */ s(Mt, { variant: "accentSoft", size: "lg", children: b })
1406
1449
  }
1407
1450
  ) : null
1408
1451
  ]
@@ -1413,7 +1456,7 @@ function va({
1413
1456
  }
1414
1457
  );
1415
1458
  }
1416
- const ba = He(
1459
+ const ya = Ue(
1417
1460
  [
1418
1461
  "ds:inline-flex ds:items-center ds:justify-center ds:gap-[var(--spacing-2xs)]",
1419
1462
  "ds:min-h-[var(--min-target-size)]",
@@ -1439,16 +1482,16 @@ const ba = He(
1439
1482
  defaultVariants: { state: "idle" }
1440
1483
  }
1441
1484
  );
1442
- function ya(e) {
1485
+ function ka(e) {
1443
1486
  const [t] = e.split(":").map((n) => parseInt(n, 10)), a = Number.isFinite(t) ? t : 0;
1444
1487
  return a < 12 ? "morning" : a < 17 ? "afternoon" : "evening";
1445
1488
  }
1446
- const ka = {
1447
- morning: ys,
1448
- afternoon: Us,
1449
- evening: bs
1489
+ const Sa = {
1490
+ morning: ks,
1491
+ afternoon: Js,
1492
+ evening: ys
1450
1493
  };
1451
- function Sa({
1494
+ function xa({
1452
1495
  date: e,
1453
1496
  slots: t,
1454
1497
  selectedSlotKey: a,
@@ -1456,202 +1499,202 @@ function Sa({
1456
1499
  loading: i,
1457
1500
  locale: r
1458
1501
  }) {
1459
- const { t: c } = L(), d = w(() => {
1502
+ const { t: u } = V(), o = C(() => {
1460
1503
  try {
1461
1504
  return new Intl.DateTimeFormat(r, {
1462
1505
  weekday: "long",
1463
1506
  day: "numeric",
1464
1507
  month: "long"
1465
- }).format(K(e));
1508
+ }).format(j(e));
1466
1509
  } catch {
1467
1510
  return e;
1468
1511
  }
1469
- }, [e, r]), f = w(() => {
1470
- const u = {
1512
+ }, [e, r]), m = C(() => {
1513
+ const c = {
1471
1514
  morning: [],
1472
1515
  afternoon: [],
1473
1516
  evening: []
1474
1517
  };
1475
1518
  for (const S of t)
1476
- u[ya(S.time)].push(S);
1477
- return u;
1478
- }, [t]), o = t.filter((u) => u.available).length, l = ["morning", "afternoon", "evening"];
1479
- return i ? /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1480
- /* @__PURE__ */ s(qe, { variant: "text", width: "60%" }),
1481
- [0, 1].map((u) => /* @__PURE__ */ s(
1519
+ c[ka(S.time)].push(S);
1520
+ return c;
1521
+ }, [t]), d = t.filter((c) => c.available).length, l = ["morning", "afternoon", "evening"];
1522
+ return i ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1523
+ /* @__PURE__ */ s(Ge, { variant: "text", width: "60%" }),
1524
+ [0, 1].map((c) => /* @__PURE__ */ s(
1482
1525
  "div",
1483
1526
  {
1484
1527
  className: "ds:grid ds:grid-cols-3 ds:gap-[var(--spacing-xs)]",
1485
- children: [0, 1, 2].map((S) => /* @__PURE__ */ s(qe, { variant: "rounded", height: "44px" }, S))
1528
+ children: [0, 1, 2].map((S) => /* @__PURE__ */ s(Ge, { variant: "rounded", height: "44px" }, S))
1486
1529
  },
1487
- u
1530
+ c
1488
1531
  ))
1489
- ] }) : o === 0 ? /* @__PURE__ */ s(Mt, { variant: "no-results", title: c("booking.noSlotsForDate") }) : /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1490
- /* @__PURE__ */ b("div", { className: "ds:flex ds:items-baseline ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
1491
- /* @__PURE__ */ b("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
1532
+ ] }) : d === 0 ? /* @__PURE__ */ s(Dt, { variant: "no-results", title: u("booking.noSlotsForDate") }) : /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
1533
+ /* @__PURE__ */ v("div", { className: "ds:flex ds:items-baseline ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
1534
+ /* @__PURE__ */ v("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
1492
1535
  /* @__PURE__ */ s(
1493
- Ps,
1536
+ Rs,
1494
1537
  {
1495
1538
  "aria-hidden": "true",
1496
1539
  className: "ds:size-4 ds:text-[color:var(--accent)]"
1497
1540
  }
1498
1541
  ),
1499
- /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: d })
1542
+ /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: o })
1500
1543
  ] }),
1501
- /* @__PURE__ */ s("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: c("booking.slotsAvailable", { count: o }) })
1544
+ /* @__PURE__ */ s("span", { className: "type-meta ds:text-[var(--muted-foreground)]", children: u("booking.slotsAvailable", { count: d }) })
1502
1545
  ] }),
1503
- l.map((u) => {
1504
- const S = f[u];
1546
+ l.map((c) => {
1547
+ const S = m[c];
1505
1548
  if (S.length === 0) return null;
1506
- const h = ka[u];
1507
- return /* @__PURE__ */ b(
1549
+ const f = Sa[c];
1550
+ return /* @__PURE__ */ v(
1508
1551
  "div",
1509
1552
  {
1510
1553
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
1511
1554
  children: [
1512
- /* @__PURE__ */ b("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:text-[color:var(--muted-foreground)]", children: [
1513
- /* @__PURE__ */ s(h, { "aria-hidden": "true", className: "ds:size-3.5" }),
1514
- /* @__PURE__ */ s("span", { className: "type-meta ds:font-[var(--font-weight-semibold)] ds:uppercase", children: c(`booking.timeOfDay.${u}`) })
1555
+ /* @__PURE__ */ v("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:text-[color:var(--muted-foreground)]", children: [
1556
+ /* @__PURE__ */ s(f, { "aria-hidden": "true", className: "ds:size-3.5" }),
1557
+ /* @__PURE__ */ s("span", { className: "type-meta ds:font-[var(--font-weight-semibold)] ds:uppercase", children: u(`booking.timeOfDay.${c}`) })
1515
1558
  ] }),
1516
1559
  /* @__PURE__ */ s(
1517
1560
  "div",
1518
1561
  {
1519
1562
  role: "group",
1520
- "aria-label": c(`booking.timeOfDay.${u}`),
1563
+ "aria-label": u(`booking.timeOfDay.${c}`),
1521
1564
  className: "ds:grid ds:grid-cols-3 ds:gap-[var(--spacing-xs)] ds:sm:grid-cols-4",
1522
- children: S.map((y) => {
1523
- const I = y.key === a, N = y.available ? I ? "selected" : "idle" : "unavailable";
1565
+ children: S.map((b) => {
1566
+ const N = b.key === a, w = b.available ? N ? "selected" : "idle" : "unavailable";
1524
1567
  return /* @__PURE__ */ s(
1525
1568
  "button",
1526
1569
  {
1527
1570
  type: "button",
1528
- "data-slot-id": y.key,
1529
- disabled: !y.available,
1530
- "aria-pressed": I,
1531
- "aria-label": c("booking.slotAvailableLabel", {
1532
- time: y.time
1571
+ "data-slot-id": b.key,
1572
+ disabled: !b.available,
1573
+ "aria-pressed": N,
1574
+ "aria-label": u("booking.slotAvailableLabel", {
1575
+ time: b.time
1533
1576
  }),
1534
- onClick: () => y.available && n(y),
1535
- className: ba({ state: N }),
1536
- children: y.time
1577
+ onClick: () => b.available && n(b),
1578
+ className: ya({ state: w }),
1579
+ children: b.time
1537
1580
  },
1538
- y.key
1581
+ b.key
1539
1582
  );
1540
1583
  })
1541
1584
  }
1542
1585
  )
1543
1586
  ]
1544
1587
  },
1545
- u
1588
+ c
1546
1589
  );
1547
1590
  })
1548
1591
  ] });
1549
1592
  }
1550
- const Ke = 4;
1551
- function xa({
1593
+ const je = 4;
1594
+ function Ia({
1552
1595
  availableDates: e,
1553
1596
  availableSlots: t,
1554
1597
  value: a,
1555
1598
  onChange: n,
1556
1599
  onDateSelect: i,
1557
1600
  onWindowChange: r,
1558
- loadingDates: c,
1559
- loadingSlots: d,
1560
- locale: f,
1561
- agentIdBase: o
1601
+ loadingDates: u,
1602
+ loadingSlots: o,
1603
+ locale: m,
1604
+ agentIdBase: d
1562
1605
  }) {
1563
- const l = w(() => ke(/* @__PURE__ */ new Date()), []), [u, S] = U(() => {
1606
+ const l = C(() => ke(/* @__PURE__ */ new Date()), []), [c, S] = J(() => {
1564
1607
  if (a.date) {
1565
- const g = ke(K(a.date));
1608
+ const g = ke(j(a.date));
1566
1609
  if (!Se(l, g)) return g;
1567
1610
  }
1568
1611
  if (e.length > 0) {
1569
- const g = ke(K(e[0]));
1612
+ const g = ke(j(e[0]));
1570
1613
  if (Se(g, l)) return g;
1571
1614
  }
1572
1615
  return l;
1573
- }), h = w(
1574
- () => at(u, Ke - 1),
1575
- [u]
1576
- ), y = w(() => Array.from({ length: Ke }, (g, A) => {
1577
- const _ = at(u, A), V = ce(_), R = (t[V] ?? []).map(($) => ({
1578
- id: $.key,
1616
+ }), f = C(
1617
+ () => at(c, je - 1),
1618
+ [c]
1619
+ ), b = C(() => Array.from({ length: je }, (g, T) => {
1620
+ const L = at(c, T), O = fe(L), P = (t[O] ?? []).map((z) => ({
1621
+ id: z.key,
1579
1622
  // SlotGrid formats `start` as a time via Intl.DateTimeFormat —
1580
1623
  // compose a full ISO from the column's date + the slot's HH:mm
1581
1624
  // so the locale-formatter has a real timestamp to work with.
1582
- start: `${V}T${$.time}:00`,
1583
- available: $.available
1625
+ start: `${O}T${z.time}:00`,
1626
+ available: z.available
1584
1627
  }));
1585
- return { date: V, slots: R };
1586
- }), [u, t]), I = Se(u, l), N = !0, C = Z(() => {
1628
+ return { date: O, slots: P };
1629
+ }), [c, t]), N = Se(c, l), w = !0, D = Q(() => {
1587
1630
  S((g) => {
1588
- const A = gs(g, Ke);
1589
- return Se(l, A) ? l : A;
1631
+ const T = hs(g, je);
1632
+ return Se(l, T) ? l : T;
1590
1633
  });
1591
- }, [l]), x = Z(() => {
1592
- S((g) => at(g, Ke));
1634
+ }, [l]), I = Q(() => {
1635
+ S((g) => at(g, je));
1593
1636
  }, []);
1594
- G(() => {
1637
+ H(() => {
1595
1638
  if (e.length === 0) return;
1596
- const g = ke(K(e[0]));
1597
- !Se(g, l) || e.some((_) => {
1598
- const V = ke(K(_));
1599
- return !Se(V, h) && !ms(V, u);
1639
+ const g = ke(j(e[0]));
1640
+ !Se(g, l) || e.some((L) => {
1641
+ const O = ke(j(L));
1642
+ return !Se(O, f) && !fs(O, c);
1600
1643
  }) || S(g);
1601
- }, [e]), G(() => {
1602
- r == null || r(ce(u), ce(h));
1603
- }, [u, h, r]);
1604
- const k = Z(
1605
- (g, A) => {
1606
- const _ = typeof A.date == "string" ? A.date : ce(A.date);
1644
+ }, [e]), H(() => {
1645
+ r == null || r(fe(c), fe(f));
1646
+ }, [c, f, r]);
1647
+ const y = Q(
1648
+ (g, T) => {
1649
+ const L = typeof T.date == "string" ? T.date : fe(T.date);
1607
1650
  n({
1608
- ...Et(Je(a, _), g.id)
1609
- }), i == null || i(_);
1651
+ ...Et(Ye(a, L), g.id)
1652
+ }), i == null || i(L);
1610
1653
  },
1611
1654
  [n, i, a]
1612
- ), p = c || d ? "loading" : "default", T = y.some((g) => g.slots.length > 0), D = e[0];
1613
- return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1614
- !T && !!D ? /* @__PURE__ */ s(
1655
+ ), x = u || o ? "loading" : "default", k = b.some((g) => g.slots.length > 0), A = e[0];
1656
+ return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1657
+ !k && !!A ? /* @__PURE__ */ s(
1615
1658
  ct,
1616
1659
  {
1617
- nextAvailableDate: D,
1618
- onJump: () => S(ke(K(D))),
1619
- locale: f
1660
+ nextAvailableDate: A,
1661
+ onJump: () => S(ke(j(A))),
1662
+ locale: m
1620
1663
  }
1621
1664
  ) : null,
1622
1665
  /* @__PURE__ */ s(
1623
- us,
1666
+ ps,
1624
1667
  {
1625
- id: o ? `${o}-slots` : void 0,
1626
- days: y,
1627
- state: p,
1668
+ id: d ? `${d}-slots` : void 0,
1669
+ days: b,
1670
+ state: x,
1628
1671
  selectedSlotId: a.slotKey,
1629
1672
  maxInitialSlotsPerDay: 6,
1630
- locale: f,
1631
- hasPrevious: I,
1632
- hasNext: N,
1633
- onSlotSelect: k,
1634
- onPreviousDays: C,
1635
- onNextDays: x
1673
+ locale: m,
1674
+ hasPrevious: N,
1675
+ hasNext: w,
1676
+ onSlotSelect: y,
1677
+ onPreviousDays: D,
1678
+ onNextDays: I
1636
1679
  }
1637
1680
  )
1638
1681
  ] });
1639
1682
  }
1640
- function Ft(e) {
1683
+ function $t(e) {
1641
1684
  const {
1642
1685
  inputs: t,
1643
1686
  value: a,
1644
1687
  onChange: n,
1645
1688
  onDateSelect: i,
1646
1689
  onWindowChange: r,
1647
- loadingDates: c,
1648
- loadingSlots: d,
1649
- locale: f,
1650
- datePickerStyle: o,
1690
+ loadingDates: u,
1691
+ loadingSlots: o,
1692
+ locale: m,
1693
+ datePickerStyle: d,
1651
1694
  agentIdBase: l
1652
1695
  } = e;
1653
- return o === "four-day-grid" ? /* @__PURE__ */ s(
1654
- xa,
1696
+ return d === "four-day-grid" ? /* @__PURE__ */ s(
1697
+ Ia,
1655
1698
  {
1656
1699
  availableDates: t.availableDates,
1657
1700
  availableSlots: t.availableSlots,
@@ -1659,47 +1702,47 @@ function Ft(e) {
1659
1702
  onChange: n,
1660
1703
  onDateSelect: i,
1661
1704
  onWindowChange: r,
1662
- loadingDates: c,
1663
- loadingSlots: d,
1664
- locale: f,
1705
+ loadingDates: u,
1706
+ loadingSlots: o,
1707
+ locale: m,
1665
1708
  agentIdBase: l
1666
1709
  }
1667
1710
  ) : /* @__PURE__ */ s(
1668
- ga,
1711
+ ha,
1669
1712
  {
1670
1713
  availableDates: t.availableDates,
1671
1714
  selectedDate: a.date,
1672
- onSelectDate: (u) => {
1673
- n(Je(a, u)), i == null || i(u);
1715
+ onSelectDate: (c) => {
1716
+ n(Ye(a, c)), i == null || i(c);
1674
1717
  },
1675
- locale: f,
1676
- loading: c ?? d
1718
+ locale: m,
1719
+ loading: u ?? o
1677
1720
  }
1678
1721
  );
1679
1722
  }
1680
- function $t(e) {
1681
- const { inputs: t, value: a, onChange: n, loadingSlots: i, locale: r, datePickerStyle: c } = e;
1682
- return c === "four-day-grid" || !a.date ? null : /* @__PURE__ */ s(
1683
- Sa,
1723
+ function zt(e) {
1724
+ const { inputs: t, value: a, onChange: n, loadingSlots: i, locale: r, datePickerStyle: u } = e;
1725
+ return u === "four-day-grid" || !a.date ? null : /* @__PURE__ */ s(
1726
+ xa,
1684
1727
  {
1685
1728
  date: a.date,
1686
1729
  slots: t.availableSlots[a.date] ?? [],
1687
1730
  selectedSlotKey: a.slotKey,
1688
- onSelect: (d) => n(Et(a, d.key)),
1731
+ onSelect: (o) => n(Et(a, o.key)),
1689
1732
  loading: i,
1690
1733
  locale: r
1691
1734
  }
1692
1735
  );
1693
1736
  }
1694
- function zt({ value: e, onChange: t }) {
1695
- const { t: a } = L(), n = [
1737
+ function Kt({ value: e, onChange: t }) {
1738
+ const { t: a } = V(), n = [
1696
1739
  { value: "private", label: a("booking.insurance.private") },
1697
1740
  { value: "public", label: a("booking.insurance.public") }
1698
1741
  ];
1699
- return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1742
+ return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1700
1743
  /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: a("booking.insurance.heading") }),
1701
1744
  /* @__PURE__ */ s(
1702
- Ue,
1745
+ Je,
1703
1746
  {
1704
1747
  options: n,
1705
1748
  value: e ?? "",
@@ -1712,7 +1755,7 @@ function zt({ value: e, onChange: t }) {
1712
1755
  )
1713
1756
  ] });
1714
1757
  }
1715
- function Kt({
1758
+ function jt({
1716
1759
  specialties: e,
1717
1760
  value: t,
1718
1761
  valueIds: a,
@@ -1720,114 +1763,114 @@ function Kt({
1720
1763
  onChangeIds: i,
1721
1764
  pickerStyle: r = "select"
1722
1765
  }) {
1723
- const { t: c } = L(), d = e.map((o) => ({
1724
- value: o.id,
1725
- label: o.label
1726
- })), f = /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: c("booking.specialty.heading") });
1727
- return r === "multi-select" && i ? /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1728
- f,
1766
+ const { t: u } = V(), o = e.map((d) => ({
1767
+ value: d.id,
1768
+ label: d.label
1769
+ })), m = /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: u("booking.specialty.heading") });
1770
+ return r === "multi-select" && i ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1771
+ m,
1729
1772
  /* @__PURE__ */ s(
1730
1773
  dt,
1731
1774
  {
1732
- options: d,
1775
+ options: o,
1733
1776
  value: a ?? [],
1734
1777
  onChange: i,
1735
- placeholder: c("booking.specialty.placeholder"),
1736
- "aria-label": c("booking.specialty.heading"),
1778
+ placeholder: u("booking.specialty.placeholder"),
1779
+ "aria-label": u("booking.specialty.heading"),
1737
1780
  allowClear: !0
1738
1781
  }
1739
1782
  )
1740
- ] }) : r === "combobox" ? /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1741
- f,
1783
+ ] }) : r === "combobox" ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1784
+ m,
1742
1785
  /* @__PURE__ */ s(
1743
1786
  ot,
1744
1787
  {
1745
- options: d,
1788
+ options: o,
1746
1789
  value: t ?? "",
1747
- onValueChange: (o) => n(o === "" ? "" : o),
1748
- placeholder: c("booking.specialty.placeholder"),
1749
- "aria-label": c("booking.specialty.heading"),
1790
+ onValueChange: (d) => n(d === "" ? "" : d),
1791
+ placeholder: u("booking.specialty.placeholder"),
1792
+ "aria-label": u("booking.specialty.heading"),
1750
1793
  clearable: !0
1751
1794
  }
1752
1795
  )
1753
- ] }) : /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1754
- f,
1796
+ ] }) : /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1797
+ m,
1755
1798
  /* @__PURE__ */ s(
1756
- Ue,
1799
+ Je,
1757
1800
  {
1758
- options: d,
1801
+ options: o,
1759
1802
  value: t ?? "",
1760
- onValueChange: (o) => n(o),
1761
- placeholder: c("booking.specialty.placeholder"),
1762
- "aria-label": c("booking.specialty.heading")
1803
+ onValueChange: (d) => n(d),
1804
+ placeholder: u("booking.specialty.placeholder"),
1805
+ "aria-label": u("booking.specialty.heading")
1763
1806
  }
1764
1807
  )
1765
1808
  ] });
1766
1809
  }
1767
- function jt({
1810
+ function qt({
1768
1811
  services: e,
1769
1812
  value: t,
1770
1813
  valueIds: a,
1771
1814
  onChange: n,
1772
1815
  onChangeIds: i,
1773
1816
  pickerStyle: r,
1774
- compact: c
1817
+ compact: u
1775
1818
  }) {
1776
- const { t: d } = L(), f = r ?? (c ? "select" : "cards"), o = e.map((u) => {
1777
- const S = Vt(u);
1819
+ const { t: o } = V(), m = r ?? (u ? "select" : "cards"), d = e.map((c) => {
1820
+ const S = Ft(c);
1778
1821
  return S ? {
1779
- value: u.id,
1780
- label: u.label,
1781
- endContent: /* @__PURE__ */ s(Ct, { variant: "accentSoft", size: "lg", children: S })
1822
+ value: c.id,
1823
+ label: c.label,
1824
+ endContent: /* @__PURE__ */ s(Mt, { variant: "accentSoft", size: "lg", children: S })
1782
1825
  } : {
1783
- value: u.id,
1784
- label: `${u.label} · ${d("booking.serviceSummary", {
1785
- minutes: u.durationMin
1826
+ value: c.id,
1827
+ label: `${c.label} · ${o("booking.serviceSummary", {
1828
+ minutes: c.durationMin
1786
1829
  })}`
1787
1830
  };
1788
- }), l = /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: d("booking.service.heading") });
1789
- return f === "multi-select" && i ? /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1831
+ }), l = /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: o("booking.service.heading") });
1832
+ return m === "multi-select" && i ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1790
1833
  l,
1791
1834
  /* @__PURE__ */ s(
1792
1835
  dt,
1793
1836
  {
1794
- options: o,
1837
+ options: d,
1795
1838
  value: a ?? [],
1796
1839
  onChange: i,
1797
- placeholder: d("booking.service.placeholder"),
1798
- "aria-label": d("booking.service.heading"),
1840
+ placeholder: o("booking.service.placeholder"),
1841
+ "aria-label": o("booking.service.heading"),
1799
1842
  allowClear: !0
1800
1843
  }
1801
1844
  )
1802
- ] }) : f === "combobox" ? /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1845
+ ] }) : m === "combobox" ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1803
1846
  l,
1804
1847
  /* @__PURE__ */ s(
1805
1848
  ot,
1806
1849
  {
1807
- options: o,
1850
+ options: d,
1808
1851
  value: t ?? "",
1809
- onValueChange: (u) => n(u === "" ? "" : u),
1810
- placeholder: d("booking.service.placeholder"),
1811
- "aria-label": d("booking.service.heading"),
1852
+ onValueChange: (c) => n(c === "" ? "" : c),
1853
+ placeholder: o("booking.service.placeholder"),
1854
+ "aria-label": o("booking.service.heading"),
1812
1855
  clearable: !0
1813
1856
  }
1814
1857
  )
1815
- ] }) : f === "select" ? /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1858
+ ] }) : m === "select" ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1816
1859
  l,
1817
1860
  /* @__PURE__ */ s(
1818
- Ue,
1861
+ Je,
1819
1862
  {
1820
- options: o,
1863
+ options: d,
1821
1864
  value: t ?? "",
1822
- onValueChange: (u) => n(u),
1823
- placeholder: d("booking.service.placeholder"),
1824
- "aria-label": d("booking.service.heading")
1865
+ onValueChange: (c) => n(c),
1866
+ placeholder: o("booking.service.placeholder"),
1867
+ "aria-label": o("booking.service.heading")
1825
1868
  }
1826
1869
  )
1827
- ] }) : /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1870
+ ] }) : /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1828
1871
  l,
1829
1872
  /* @__PURE__ */ s(
1830
- va,
1873
+ ba,
1831
1874
  {
1832
1875
  services: e,
1833
1876
  selectedServiceId: t,
@@ -1836,7 +1879,7 @@ function jt({
1836
1879
  )
1837
1880
  ] });
1838
1881
  }
1839
- function qt({
1882
+ function Gt({
1840
1883
  operators: e,
1841
1884
  value: t,
1842
1885
  valueIds: a,
@@ -1844,65 +1887,65 @@ function qt({
1844
1887
  onChangeIds: i,
1845
1888
  pickerStyle: r = "select"
1846
1889
  }) {
1847
- const { t: c } = L(), d = /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: c("booking.operator.heading") });
1890
+ const { t: u } = V(), o = /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: u("booking.operator.heading") });
1848
1891
  if (r === "multi-select" && i) {
1849
- const o = e.map((l) => ({
1892
+ const d = e.map((l) => ({
1850
1893
  value: l.id,
1851
1894
  label: l.name
1852
1895
  }));
1853
- return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1854
- d,
1896
+ return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1897
+ o,
1855
1898
  /* @__PURE__ */ s(
1856
1899
  dt,
1857
1900
  {
1858
- options: o,
1901
+ options: d,
1859
1902
  value: a ?? [],
1860
1903
  onChange: i,
1861
- placeholder: c("booking.operator.placeholder"),
1862
- "aria-label": c("booking.operator.heading"),
1904
+ placeholder: u("booking.operator.placeholder"),
1905
+ "aria-label": u("booking.operator.heading"),
1863
1906
  allowClear: !0
1864
1907
  }
1865
1908
  )
1866
1909
  ] });
1867
1910
  }
1868
- const f = [
1869
- { value: j, label: c("booking.operator.all") },
1870
- ...e.map((o) => ({ value: o.id, label: o.name }))
1911
+ const m = [
1912
+ { value: q, label: u("booking.operator.all") },
1913
+ ...e.map((d) => ({ value: d.id, label: d.name }))
1871
1914
  ];
1872
- return r === "combobox" ? /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1873
- d,
1915
+ return r === "combobox" ? /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1916
+ o,
1874
1917
  /* @__PURE__ */ s(
1875
1918
  ot,
1876
1919
  {
1877
- options: f,
1878
- value: t ?? j,
1879
- onValueChange: (o) => n(o === "" ? j : o),
1880
- placeholder: c("booking.operator.placeholder"),
1881
- "aria-label": c("booking.operator.heading"),
1920
+ options: m,
1921
+ value: t ?? q,
1922
+ onValueChange: (d) => n(d === "" ? q : d),
1923
+ placeholder: u("booking.operator.placeholder"),
1924
+ "aria-label": u("booking.operator.heading"),
1882
1925
  clearable: !0
1883
1926
  }
1884
1927
  )
1885
- ] }) : /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1886
- d,
1928
+ ] }) : /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
1929
+ o,
1887
1930
  /* @__PURE__ */ s(
1888
- Ue,
1931
+ Je,
1889
1932
  {
1890
- options: f,
1891
- value: t ?? j,
1892
- onValueChange: (o) => n(o),
1893
- placeholder: c("booking.operator.placeholder"),
1894
- "aria-label": c("booking.operator.heading")
1933
+ options: m,
1934
+ value: t ?? q,
1935
+ onValueChange: (d) => n(d),
1936
+ placeholder: u("booking.operator.placeholder"),
1937
+ "aria-label": u("booking.operator.heading")
1895
1938
  }
1896
1939
  )
1897
1940
  ] });
1898
1941
  }
1899
- function Gt({
1942
+ function Ht({
1900
1943
  customSlot: e
1901
1944
  }) {
1902
- const { t } = L();
1903
- return e ? /* @__PURE__ */ s(ee, { children: e }) : /* @__PURE__ */ b(J, { variant: "warning", children: [
1904
- /* @__PURE__ */ s(J.Title, { as: "h4", children: t("booking.onboardingIncomplete.title") }),
1905
- /* @__PURE__ */ s(J.Description, { children: t("booking.onboardingIncomplete.description") })
1945
+ const { t } = V();
1946
+ return e ? /* @__PURE__ */ s(X, { children: e }) : /* @__PURE__ */ v(Y, { variant: "warning", children: [
1947
+ /* @__PURE__ */ s(Y.Title, { as: "h4", children: t("booking.onboardingIncomplete.title") }),
1948
+ /* @__PURE__ */ s(Y.Description, { children: t("booking.onboardingIncomplete.description") })
1906
1949
  ] });
1907
1950
  }
1908
1951
  function ct({
@@ -1910,103 +1953,103 @@ function ct({
1910
1953
  onJump: t,
1911
1954
  locale: a
1912
1955
  }) {
1913
- const { t: n } = L(), i = w(() => {
1956
+ const { t: n } = V(), i = C(() => {
1914
1957
  try {
1915
1958
  return new Intl.DateTimeFormat(a, { dateStyle: "long" }).format(
1916
- K(e)
1959
+ j(e)
1917
1960
  );
1918
1961
  } catch {
1919
1962
  return e;
1920
1963
  }
1921
1964
  }, [e, a]);
1922
- return /* @__PURE__ */ b(J, { variant: "info", children: [
1923
- /* @__PURE__ */ s(J.Description, { children: n("booking.nextAvailable.description", { date: i }) }),
1924
- /* @__PURE__ */ s(J.Action, { children: /* @__PURE__ */ s(pe, { intent: "secondary", size: "sm", onClick: t, children: n("booking.nextAvailable.cta") }) })
1965
+ return /* @__PURE__ */ v(Y, { variant: "info", children: [
1966
+ /* @__PURE__ */ s(Y.Description, { children: n("booking.nextAvailable.description", { date: i }) }),
1967
+ /* @__PURE__ */ s(Y.Action, { children: /* @__PURE__ */ s(he, { intent: "secondary", size: "sm", onClick: t, children: n("booking.nextAvailable.cta") }) })
1925
1968
  ] });
1926
1969
  }
1927
- function Ia({
1970
+ function Na({
1928
1971
  snapshot: e,
1929
1972
  operators: t,
1930
1973
  specialties: a,
1931
1974
  services: n,
1932
1975
  locale: i,
1933
1976
  mode: r,
1934
- showModify: c,
1935
- onReset: d,
1936
- onModify: f
1977
+ showModify: u,
1978
+ onReset: o,
1979
+ onModify: m
1937
1980
  }) {
1938
- const { t: o } = L(), u = (e.details.confirmationChannels ?? ["email"]).map(
1939
- (C) => o(`booking.confirmation.channel.${C}`)
1940
- ), S = r === "demo" ? o("booking.success.descriptionDemo") : u.length > 1 ? o("booking.success.descriptionMultiple", {
1941
- channels: u.join(" · ")
1942
- }) : o("booking.success.descriptionSingle", { channel: u[0] }), h = w(() => {
1981
+ const { t: d } = V(), c = (e.details.confirmationChannels ?? ["email"]).map(
1982
+ (D) => d(`booking.confirmation.channel.${D}`)
1983
+ ), S = r === "demo" ? d("booking.success.descriptionDemo") : c.length > 1 ? d("booking.success.descriptionMultiple", {
1984
+ channels: c.join(" · ")
1985
+ }) : d("booking.success.descriptionSingle", { channel: c[0] }), f = C(() => {
1943
1986
  if (e.date)
1944
1987
  try {
1945
1988
  return new Intl.DateTimeFormat(i, {
1946
1989
  weekday: "long",
1947
1990
  day: "numeric",
1948
1991
  month: "long"
1949
- }).format(K(e.date));
1992
+ }).format(j(e.date));
1950
1993
  } catch {
1951
1994
  return e.date;
1952
1995
  }
1953
- }, [e.date, i]), y = w(() => {
1954
- const x = (e.operatorIds && e.operatorIds.length > 0 ? e.operatorIds : e.operatorId ? [e.operatorId] : []).filter((k) => k !== j).map((k) => {
1955
- var p;
1956
- return (p = t.find((T) => T.id === k)) == null ? void 0 : p.name;
1957
- }).filter((k) => k !== void 0);
1958
- if (x.length === 0) return "";
1996
+ }, [e.date, i]), b = C(() => {
1997
+ const I = (e.operatorIds && e.operatorIds.length > 0 ? e.operatorIds : e.operatorId ? [e.operatorId] : []).filter((y) => y !== q).map((y) => {
1998
+ var x;
1999
+ return (x = t.find((k) => k.id === y)) == null ? void 0 : x.name;
2000
+ }).filter((y) => y !== void 0);
2001
+ if (I.length === 0) return "";
1959
2002
  try {
1960
2003
  return new Intl.ListFormat(i === "en" ? "en-GB" : i, {
1961
2004
  style: "long",
1962
2005
  type: "conjunction"
1963
- }).format(x);
2006
+ }).format(I);
1964
2007
  } catch {
1965
- return x.join(", ");
2008
+ return I.join(", ");
1966
2009
  }
1967
- }, [e.operatorIds, e.operatorId, t, i]), I = e.specialtyId ? a.find((C) => C.id === e.specialtyId) : void 0, N = e.serviceId ? n.find((C) => C.id === e.serviceId) : void 0;
1968
- return /* @__PURE__ */ b(
2010
+ }, [e.operatorIds, e.operatorId, t, i]), N = e.specialtyId ? a.find((D) => D.id === e.specialtyId) : void 0, w = e.serviceId ? n.find((D) => D.id === e.serviceId) : void 0;
2011
+ return /* @__PURE__ */ v(
1969
2012
  "div",
1970
2013
  {
1971
2014
  "data-component": "booking-success",
1972
2015
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
1973
2016
  children: [
1974
- /* @__PURE__ */ b(J, { variant: "success", children: [
1975
- /* @__PURE__ */ s(J.Title, { as: "h3", children: o("booking.success.heading") }),
1976
- /* @__PURE__ */ s(J.Description, { children: S })
2017
+ /* @__PURE__ */ v(Y, { variant: "success", children: [
2018
+ /* @__PURE__ */ s(Y.Title, { as: "h3", children: d("booking.success.heading") }),
2019
+ /* @__PURE__ */ s(Y.Description, { children: S })
1977
2020
  ] }),
1978
- /* @__PURE__ */ s("div", { className: "ds:rounded-[var(--radius-md)] ds:bg-[var(--secondary)] ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ b("dl", { className: "ds:grid ds:grid-cols-[auto_minmax(0,1fr)] ds:gap-x-[var(--spacing-md)] ds:gap-y-[var(--spacing-xs)] ds:m-0", children: [
1979
- I ? /* @__PURE__ */ b(ee, { children: [
1980
- /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: o("booking.success.summarySpecialty") }),
1981
- /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: I.label })
1982
- ] }) : null,
1983
- N ? /* @__PURE__ */ b(ee, { children: [
1984
- /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: o("booking.success.summaryService") }),
2021
+ /* @__PURE__ */ s("div", { className: "ds:rounded-[var(--radius-md)] ds:bg-[var(--secondary)] ds:p-[var(--spacing-md)]", children: /* @__PURE__ */ v("dl", { className: "ds:grid ds:grid-cols-[auto_minmax(0,1fr)] ds:gap-x-[var(--spacing-md)] ds:gap-y-[var(--spacing-xs)] ds:m-0", children: [
2022
+ N ? /* @__PURE__ */ v(X, { children: [
2023
+ /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: d("booking.success.summarySpecialty") }),
1985
2024
  /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: N.label })
1986
2025
  ] }) : null,
1987
- h ? /* @__PURE__ */ b(ee, { children: [
1988
- /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: o("booking.success.summaryDate") }),
1989
- /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: h })
2026
+ w ? /* @__PURE__ */ v(X, { children: [
2027
+ /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: d("booking.success.summaryService") }),
2028
+ /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: w.label })
2029
+ ] }) : null,
2030
+ f ? /* @__PURE__ */ v(X, { children: [
2031
+ /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: d("booking.success.summaryDate") }),
2032
+ /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: f })
1990
2033
  ] }) : null,
1991
- /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: o("booking.success.summaryTime") }),
2034
+ /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: d("booking.success.summaryTime") }),
1992
2035
  /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: e.slot.time }),
1993
- y ? /* @__PURE__ */ b(ee, { children: [
1994
- /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: o("booking.success.summaryProvider") }),
1995
- /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: y })
2036
+ b ? /* @__PURE__ */ v(X, { children: [
2037
+ /* @__PURE__ */ s("dt", { className: "type-label ds:text-[var(--muted-foreground)]", children: d("booking.success.summaryProvider") }),
2038
+ /* @__PURE__ */ s("dd", { className: "type-body ds:m-0 ds:text-[var(--foreground)]", children: b })
1996
2039
  ] }) : null
1997
2040
  ] }) }),
1998
- /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
1999
- /* @__PURE__ */ s(pe, { intent: "secondary", size: "md", onClick: d, children: o("booking.success.bookAnother") }),
2000
- c ? /* @__PURE__ */ s(pe, { intent: "ghost", size: "md", onClick: f, children: o("booking.success.modifyBooking") }) : null
2041
+ /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]", children: [
2042
+ /* @__PURE__ */ s(he, { intent: "secondary", size: "md", onClick: o, children: d("booking.success.bookAnother") }),
2043
+ u ? /* @__PURE__ */ s(he, { intent: "ghost", size: "md", onClick: m, children: d("booking.success.modifyBooking") }) : null
2001
2044
  ] })
2002
2045
  ]
2003
2046
  }
2004
2047
  );
2005
2048
  }
2006
- function Ht({ customSlot: e }) {
2007
- const { t } = L();
2008
- return e ? /* @__PURE__ */ s(ee, { children: e }) : /* @__PURE__ */ s(
2009
- Mt,
2049
+ function Ut({ customSlot: e }) {
2050
+ const { t } = V();
2051
+ return e ? /* @__PURE__ */ s(X, { children: e }) : /* @__PURE__ */ s(
2052
+ Dt,
2010
2053
  {
2011
2054
  variant: "no-results",
2012
2055
  title: t("booking.emptyServices.title"),
@@ -2014,14 +2057,14 @@ function Ht({ customSlot: e }) {
2014
2057
  }
2015
2058
  );
2016
2059
  }
2017
- const Ut = "data-booking-step-active", Na = `[${Ut}]`, It = [
2060
+ const Jt = "data-booking-step-active", wa = `[${Jt}]`, Nt = [
2018
2061
  "ds:focus-visible:outline-[length:var(--focus-ring-width)]",
2019
2062
  "ds:focus-visible:outline-solid",
2020
2063
  "ds:focus-visible:outline-[var(--ring)]",
2021
2064
  "ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
2022
2065
  "ds:forced-colors:focus-visible:outline-[CanvasText]"
2023
2066
  ].join(" ");
2024
- function B({
2067
+ function E({
2025
2068
  step: e,
2026
2069
  active: t,
2027
2070
  className: a,
@@ -2033,9 +2076,9 @@ function B({
2033
2076
  {
2034
2077
  id: n,
2035
2078
  "data-booking-step": String(e),
2036
- ...t ? { [Ut]: "" } : null,
2079
+ ...t ? { [Jt]: "" } : null,
2037
2080
  tabIndex: -1,
2038
- className: a ? `${a} ${It}` : It,
2081
+ className: a ? `${a} ${Nt}` : Nt,
2039
2082
  children: i
2040
2083
  }
2041
2084
  );
@@ -2043,200 +2086,200 @@ function B({
2043
2086
  function ut(e, t) {
2044
2087
  return t === "four-day-grid" ? e.filter((a) => a !== 6) : e;
2045
2088
  }
2046
- function wa(e) {
2089
+ function Ca(e) {
2047
2090
  const {
2048
2091
  cascade: t,
2049
2092
  inputs: a,
2050
2093
  value: n,
2051
2094
  onChange: i,
2052
2095
  onSubmit: r,
2053
- emptyServicesSlot: c,
2054
- onboardingIncompleteSlot: d,
2055
- loadingDates: f,
2056
- loadingSlots: o,
2096
+ emptyServicesSlot: u,
2097
+ onboardingIncompleteSlot: o,
2098
+ loadingDates: m,
2099
+ loadingSlots: d,
2057
2100
  onDateSelect: l,
2058
- onWindowChange: u,
2101
+ onWindowChange: c,
2059
2102
  datePickerStyle: S,
2060
- specialtyPickerStyle: h,
2061
- servicePickerStyle: y,
2062
- operatorPickerStyle: I,
2063
- submitting: N,
2064
- locale: C,
2065
- detailsProps: x,
2066
- agentIdBase: k,
2067
- activeStep: p
2068
- } = e, { t: T } = L(), D = xe(p, S), m = (g, A) => ({
2103
+ specialtyPickerStyle: f,
2104
+ servicePickerStyle: b,
2105
+ operatorPickerStyle: N,
2106
+ submitting: w,
2107
+ locale: D,
2108
+ detailsProps: I,
2109
+ agentIdBase: y,
2110
+ activeStep: x
2111
+ } = e, { t: k } = V(), A = xe(x, S), p = (g, T) => ({
2069
2112
  step: g,
2070
- active: g === D,
2071
- className: A
2113
+ active: g === A,
2114
+ className: T
2072
2115
  });
2073
- return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2074
- t.gates.insurance ? /* @__PURE__ */ s(B, { ...m(1), children: /* @__PURE__ */ s(
2075
- zt,
2116
+ return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2117
+ t.gates.insurance ? /* @__PURE__ */ s(E, { ...p(1), children: /* @__PURE__ */ s(
2118
+ Kt,
2076
2119
  {
2077
2120
  value: n.insuranceType,
2078
- onChange: (g) => i(At(n, g))
2121
+ onChange: (g) => i(Tt(n, g))
2079
2122
  }
2080
2123
  ) }) : null,
2081
- t.gates.specialty ? /* @__PURE__ */ s(B, { ...m(2), children: /* @__PURE__ */ s(
2082
- Kt,
2124
+ t.gates.specialty ? /* @__PURE__ */ s(E, { ...p(2), children: /* @__PURE__ */ s(
2125
+ jt,
2083
2126
  {
2084
2127
  specialties: t.filtered.specialties,
2085
2128
  value: n.specialtyId,
2086
2129
  valueIds: n.specialtyIds,
2087
- onChange: (g) => i(Tt(n, g)),
2088
- onChangeIds: (g) => i(_t(n, g)),
2089
- pickerStyle: h
2130
+ onChange: (g) => i(_t(n, g)),
2131
+ onChangeIds: (g) => i(Bt(n, g)),
2132
+ pickerStyle: f
2090
2133
  }
2091
2134
  ) }) : null,
2092
- t.gates.service ? /* @__PURE__ */ s(B, { ...m(3), children: t.filtered.services.length === 0 ? /* @__PURE__ */ s(Ht, { customSlot: c }) : /* @__PURE__ */ s(
2093
- jt,
2135
+ t.gates.service ? /* @__PURE__ */ s(E, { ...p(3), children: t.filtered.services.length === 0 ? /* @__PURE__ */ s(Ut, { customSlot: u }) : /* @__PURE__ */ s(
2136
+ qt,
2094
2137
  {
2095
2138
  services: t.filtered.services,
2096
2139
  value: n.serviceId,
2097
2140
  valueIds: n.serviceIds,
2098
2141
  onChange: (g) => i(Ot(n, g)),
2099
- onChangeIds: (g) => i(Bt(n, g)),
2100
- pickerStyle: y
2142
+ onChangeIds: (g) => i(Lt(n, g)),
2143
+ pickerStyle: b
2101
2144
  }
2102
2145
  ) }) : null,
2103
- t.gates.onboardingIncomplete ? /* @__PURE__ */ s(Gt, { customSlot: d }) : null,
2104
- t.gates.operator ? /* @__PURE__ */ s(B, { ...m(4), children: /* @__PURE__ */ s(
2105
- qt,
2146
+ t.gates.onboardingIncomplete ? /* @__PURE__ */ s(Ht, { customSlot: o }) : null,
2147
+ t.gates.operator ? /* @__PURE__ */ s(E, { ...p(4), children: /* @__PURE__ */ s(
2148
+ Gt,
2106
2149
  {
2107
2150
  operators: t.filtered.operators,
2108
2151
  value: n.operatorId,
2109
2152
  valueIds: n.operatorIds,
2110
- onChange: (g) => i(Lt(n, g)),
2111
- onChangeIds: (g) => i(Pt(n, g)),
2112
- pickerStyle: I
2153
+ onChange: (g) => i(Pt(n, g)),
2154
+ onChangeIds: (g) => i(Rt(n, g)),
2155
+ pickerStyle: N
2113
2156
  }
2114
2157
  ) }) : null,
2115
- t.gates.date ? /* @__PURE__ */ b(
2116
- B,
2158
+ t.gates.date ? /* @__PURE__ */ v(
2159
+ E,
2117
2160
  {
2118
- ...m(5, "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]"),
2161
+ ...p(5, "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]"),
2119
2162
  children: [
2120
- /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: T("booking.date.heading") }),
2163
+ /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: k("booking.date.heading") }),
2121
2164
  a.availableDates.length === 0 && a.nextAvailableDate ? /* @__PURE__ */ s(
2122
2165
  ct,
2123
2166
  {
2124
2167
  nextAvailableDate: a.nextAvailableDate,
2125
- onJump: () => i(Je(n, a.nextAvailableDate)),
2126
- locale: C
2168
+ onJump: () => i(Ye(n, a.nextAvailableDate)),
2169
+ locale: D
2127
2170
  }
2128
- ) : Ft({
2171
+ ) : $t({
2129
2172
  inputs: a,
2130
2173
  value: n,
2131
2174
  onChange: i,
2132
2175
  onDateSelect: l,
2133
- onWindowChange: u,
2134
- loadingDates: f,
2135
- loadingSlots: o,
2136
- locale: C,
2176
+ onWindowChange: c,
2177
+ loadingDates: m,
2178
+ loadingSlots: d,
2179
+ locale: D,
2137
2180
  datePickerStyle: S,
2138
- agentIdBase: k
2181
+ agentIdBase: y
2139
2182
  })
2140
2183
  ]
2141
2184
  }
2142
2185
  ) : null,
2143
- t.gates.slot && n.date && S === "month-calendar" ? /* @__PURE__ */ b(
2144
- B,
2186
+ t.gates.slot && n.date && S === "month-calendar" ? /* @__PURE__ */ v(
2187
+ E,
2145
2188
  {
2146
- ...m(6, "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]"),
2189
+ ...p(6, "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]"),
2147
2190
  children: [
2148
- /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: T("booking.slot.heading") }),
2149
- $t({
2191
+ /* @__PURE__ */ s("h3", { className: "type-label ds:font-[var(--font-weight-semibold)] ds:text-[var(--foreground)] ds:m-0", children: k("booking.slot.heading") }),
2192
+ zt({
2150
2193
  inputs: a,
2151
2194
  value: n,
2152
2195
  onChange: i,
2153
- loadingSlots: o,
2154
- locale: C,
2196
+ loadingSlots: d,
2197
+ locale: D,
2155
2198
  datePickerStyle: S
2156
2199
  })
2157
2200
  ]
2158
2201
  }
2159
2202
  ) : null,
2160
- t.gates.details && t.selectedSlot ? /* @__PURE__ */ s(B, { ...m(7), children: /* @__PURE__ */ s(
2203
+ t.gates.details && t.selectedSlot ? /* @__PURE__ */ s(E, { ...p(7), children: /* @__PURE__ */ s(
2161
2204
  lt,
2162
2205
  {
2163
- ...x,
2206
+ ...I,
2164
2207
  value: n.details ?? {},
2165
2208
  onChange: (g) => i({ ...n, details: g }),
2166
2209
  onSubmit: r,
2167
- submitting: N,
2210
+ submitting: w,
2168
2211
  defaultPhoneCountry: e.policy.country
2169
2212
  }
2170
2213
  ) }) : null
2171
2214
  ] });
2172
2215
  }
2173
- function H(e, t, a = {}) {
2216
+ function U(e, t, a = {}) {
2174
2217
  const {
2175
2218
  cascade: n,
2176
2219
  inputs: i,
2177
2220
  value: r,
2178
- onChange: c,
2179
- onSubmit: d,
2180
- emptyServicesSlot: f,
2181
- onboardingIncompleteSlot: o,
2221
+ onChange: u,
2222
+ onSubmit: o,
2223
+ emptyServicesSlot: m,
2224
+ onboardingIncompleteSlot: d,
2182
2225
  loadingDates: l,
2183
- loadingSlots: u,
2226
+ loadingSlots: c,
2184
2227
  onDateSelect: S,
2185
- onWindowChange: h,
2186
- datePickerStyle: y,
2187
- specialtyPickerStyle: I,
2188
- servicePickerStyle: N,
2189
- operatorPickerStyle: C,
2190
- submitting: x,
2191
- locale: k,
2192
- detailsProps: p,
2193
- policy: T,
2194
- agentIdBase: D
2228
+ onWindowChange: f,
2229
+ datePickerStyle: b,
2230
+ specialtyPickerStyle: N,
2231
+ servicePickerStyle: w,
2232
+ operatorPickerStyle: D,
2233
+ submitting: I,
2234
+ locale: y,
2235
+ detailsProps: x,
2236
+ policy: k,
2237
+ agentIdBase: A
2195
2238
  } = t;
2196
2239
  switch (e) {
2197
2240
  case 1:
2198
2241
  return /* @__PURE__ */ s(
2199
- zt,
2242
+ Kt,
2200
2243
  {
2201
2244
  value: r.insuranceType,
2202
- onChange: (m) => c(At(r, m))
2245
+ onChange: (p) => u(Tt(r, p))
2203
2246
  }
2204
2247
  );
2205
2248
  case 2:
2206
2249
  return /* @__PURE__ */ s(
2207
- Kt,
2250
+ jt,
2208
2251
  {
2209
2252
  specialties: n.filtered.specialties,
2210
2253
  value: r.specialtyId,
2211
2254
  valueIds: r.specialtyIds,
2212
- onChange: (m) => c(Tt(r, m)),
2213
- onChangeIds: (m) => c(_t(r, m)),
2214
- pickerStyle: I
2255
+ onChange: (p) => u(_t(r, p)),
2256
+ onChangeIds: (p) => u(Bt(r, p)),
2257
+ pickerStyle: N
2215
2258
  }
2216
2259
  );
2217
2260
  case 3:
2218
- return n.filtered.services.length === 0 ? /* @__PURE__ */ s(Ht, { customSlot: f }) : n.gates.onboardingIncomplete ? /* @__PURE__ */ s(Gt, { customSlot: o }) : /* @__PURE__ */ s(
2219
- jt,
2261
+ return n.filtered.services.length === 0 ? /* @__PURE__ */ s(Ut, { customSlot: m }) : n.gates.onboardingIncomplete ? /* @__PURE__ */ s(Ht, { customSlot: d }) : /* @__PURE__ */ s(
2262
+ qt,
2220
2263
  {
2221
2264
  services: n.filtered.services,
2222
2265
  value: r.serviceId,
2223
2266
  valueIds: r.serviceIds,
2224
- onChange: (m) => c(Ot(r, m)),
2225
- onChangeIds: (m) => c(Bt(r, m)),
2226
- pickerStyle: N,
2267
+ onChange: (p) => u(Ot(r, p)),
2268
+ onChangeIds: (p) => u(Lt(r, p)),
2269
+ pickerStyle: w,
2227
2270
  compact: a.compactService
2228
2271
  }
2229
2272
  );
2230
2273
  case 4:
2231
2274
  return /* @__PURE__ */ s(
2232
- qt,
2275
+ Gt,
2233
2276
  {
2234
2277
  operators: n.filtered.operators,
2235
2278
  value: r.operatorId,
2236
2279
  valueIds: r.operatorIds,
2237
- onChange: (m) => c(Lt(r, m)),
2238
- onChangeIds: (m) => c(Pt(r, m)),
2239
- pickerStyle: C
2280
+ onChange: (p) => u(Pt(r, p)),
2281
+ onChangeIds: (p) => u(Rt(r, p)),
2282
+ pickerStyle: D
2240
2283
  }
2241
2284
  );
2242
2285
  case 5:
@@ -2244,40 +2287,40 @@ function H(e, t, a = {}) {
2244
2287
  ct,
2245
2288
  {
2246
2289
  nextAvailableDate: i.nextAvailableDate,
2247
- onJump: () => c(Je(r, i.nextAvailableDate)),
2248
- locale: k
2290
+ onJump: () => u(Ye(r, i.nextAvailableDate)),
2291
+ locale: y
2249
2292
  }
2250
- ) : Ft({
2293
+ ) : $t({
2251
2294
  inputs: i,
2252
2295
  value: r,
2253
- onChange: c,
2296
+ onChange: u,
2254
2297
  onDateSelect: S,
2255
- onWindowChange: h,
2298
+ onWindowChange: f,
2256
2299
  loadingDates: l,
2257
- loadingSlots: u,
2258
- locale: k,
2259
- datePickerStyle: y,
2260
- agentIdBase: D
2300
+ loadingSlots: c,
2301
+ locale: y,
2302
+ datePickerStyle: b,
2303
+ agentIdBase: A
2261
2304
  });
2262
2305
  case 6:
2263
- return $t({
2306
+ return zt({
2264
2307
  inputs: i,
2265
2308
  value: r,
2266
- onChange: c,
2267
- loadingSlots: u,
2268
- locale: k,
2269
- datePickerStyle: y
2309
+ onChange: u,
2310
+ loadingSlots: c,
2311
+ locale: y,
2312
+ datePickerStyle: b
2270
2313
  });
2271
2314
  case 7:
2272
2315
  return n.selectedSlot ? /* @__PURE__ */ s(
2273
2316
  lt,
2274
2317
  {
2275
- ...p,
2318
+ ...x,
2276
2319
  value: r.details ?? {},
2277
- onChange: (m) => c({ ...r, details: m }),
2278
- onSubmit: d,
2279
- submitting: x,
2280
- defaultPhoneCountry: T.country
2320
+ onChange: (p) => u({ ...r, details: p }),
2321
+ onSubmit: o,
2322
+ submitting: I,
2323
+ defaultPhoneCountry: k.country
2281
2324
  }
2282
2325
  ) : null;
2283
2326
  /* c8 ignore next 2 */
@@ -2285,9 +2328,9 @@ function H(e, t, a = {}) {
2285
2328
  return null;
2286
2329
  }
2287
2330
  }
2288
- function Ye() {
2289
- const { t: e } = L();
2290
- return w(
2331
+ function We() {
2332
+ const { t: e } = V();
2333
+ return C(
2291
2334
  () => ({
2292
2335
  1: e("booking.insurance.heading"),
2293
2336
  2: e("booking.specialty.heading"),
@@ -2303,52 +2346,52 @@ function Ye() {
2303
2346
  function xe(e, t) {
2304
2347
  return t === "four-day-grid" && e === 6 ? 5 : e;
2305
2348
  }
2306
- function Ca(e) {
2307
- const { cascade: t, value: a, activeStep: n, setActiveStep: i, datePickerStyle: r } = e, c = Ye(), { t: d } = L(), f = d("booking.operator.all"), o = w(
2349
+ function Ma(e) {
2350
+ const { cascade: t, value: a, activeStep: n, setActiveStep: i, datePickerStyle: r } = e, u = We(), { t: o } = V(), m = o("booking.operator.all"), d = C(
2308
2351
  () => ut(t.visibleSteps, r),
2309
2352
  [t.visibleSteps, r]
2310
- ), l = xe(n, r), u = Math.max(0, o.indexOf(l)), S = w(
2311
- () => o.map((h) => ({
2312
- label: c[h],
2313
- summary: Jt(h, a, t, f),
2314
- status: Ma(h, a, t),
2315
- content: /* @__PURE__ */ s(B, { step: h, active: h === l, children: H(h, e, { compactService: !0 }) })
2353
+ ), l = xe(n, r), c = Math.max(0, d.indexOf(l)), S = C(
2354
+ () => d.map((f) => ({
2355
+ label: u[f],
2356
+ summary: Yt(f, a, t, m),
2357
+ status: Da(f, a, t),
2358
+ content: /* @__PURE__ */ s(E, { step: f, active: f === l, children: U(f, e, { compactService: !0 }) })
2316
2359
  })),
2317
2360
  [
2318
- o,
2361
+ d,
2319
2362
  a,
2320
- c,
2363
+ u,
2321
2364
  t,
2322
2365
  e,
2323
2366
  l,
2324
- f
2367
+ m
2325
2368
  ]
2326
2369
  );
2327
2370
  return /* @__PURE__ */ s(
2328
- ls,
2371
+ cs,
2329
2372
  {
2330
- activeStep: u,
2373
+ activeStep: c,
2331
2374
  steps: S,
2332
- onStepChange: (h) => {
2333
- const y = o[h];
2334
- y && i(y);
2375
+ onStepChange: (f) => {
2376
+ const b = d[f];
2377
+ b && i(b);
2335
2378
  }
2336
2379
  }
2337
2380
  );
2338
2381
  }
2339
- function Ma(e, t, a) {
2340
- return ue(e, t) && e < a.currentStep ? "completed" : e <= a.currentStep ? "unlocked" : void 0;
2382
+ function Da(e, t, a) {
2383
+ return ge(e, t) && e < a.currentStep ? "completed" : e <= a.currentStep ? "unlocked" : void 0;
2341
2384
  }
2342
- function ue(e, t) {
2385
+ function ge(e, t) {
2343
2386
  switch (e) {
2344
2387
  case 1:
2345
2388
  return t.insuranceType !== void 0;
2346
2389
  case 2:
2347
- return te(t).length > 0;
2390
+ return se(t).length > 0;
2348
2391
  case 3:
2349
- return me(t).length > 0;
2392
+ return le(t).length > 0;
2350
2393
  case 4:
2351
- return Ge(t).length > 0;
2394
+ return He(t).length > 0;
2352
2395
  case 5:
2353
2396
  return t.date !== void 0;
2354
2397
  case 6:
@@ -2364,28 +2407,28 @@ function nt(e, t) {
2364
2407
  }).filter((n) => n !== void 0);
2365
2408
  return a.length > 0 ? a.join(", ") : void 0;
2366
2409
  }
2367
- function Jt(e, t, a, n) {
2410
+ function Yt(e, t, a, n) {
2368
2411
  var i;
2369
- if (ue(e, t))
2412
+ if (ge(e, t))
2370
2413
  switch (e) {
2371
2414
  case 1:
2372
2415
  return t.insuranceType;
2373
2416
  case 2:
2374
2417
  return nt(
2375
- te(t),
2418
+ se(t),
2376
2419
  a.filtered.specialties
2377
2420
  );
2378
2421
  case 3:
2379
- return nt(me(t), a.filtered.services);
2422
+ return nt(le(t), a.filtered.services);
2380
2423
  case 4: {
2381
- const r = Ge(t), c = r.filter((f) => f !== j), d = nt(
2382
- c,
2383
- a.filtered.operators.map((f) => ({
2384
- id: f.id,
2385
- label: f.name
2424
+ const r = He(t), u = r.filter((m) => m !== q), o = nt(
2425
+ u,
2426
+ a.filtered.operators.map((m) => ({
2427
+ id: m.id,
2428
+ label: m.name
2386
2429
  }))
2387
2430
  );
2388
- return d !== void 0 ? d : r.includes(j) ? n : void 0;
2431
+ return o !== void 0 ? o : r.includes(q) ? n : void 0;
2389
2432
  }
2390
2433
  case 5:
2391
2434
  return t.date;
@@ -2395,162 +2438,162 @@ function Jt(e, t, a, n) {
2395
2438
  return;
2396
2439
  }
2397
2440
  }
2398
- function Da(e) {
2399
- const { cascade: t, value: a, activeStep: n, setActiveStep: i } = e, { t: r } = L(), c = Ye(), d = r("booking.operator.all"), f = `${rt()}-filter`, o = xe(n, e.datePickerStyle), l = t.visibleSteps.filter(
2400
- (h) => h === 1 || h === 2 || h === 3 || h === 4
2401
- ), u = l.some(
2402
- (h) => !ue(h, a)
2441
+ function Aa(e) {
2442
+ const { cascade: t, value: a, activeStep: n, setActiveStep: i } = e, { t: r } = V(), u = We(), o = r("booking.operator.all"), m = `${rt()}-filter`, d = xe(n, e.datePickerStyle), l = t.visibleSteps.filter(
2443
+ (f) => f === 1 || f === 2 || f === 3 || f === 4
2444
+ ), c = l.some(
2445
+ (f) => !ge(f, a)
2403
2446
  ), S = l.some(
2404
- (h) => h === n
2405
- ) ? n : l.find((h) => !ue(h, a));
2406
- return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2447
+ (f) => f === n
2448
+ ) ? n : l.find((f) => !ge(f, a));
2449
+ return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2407
2450
  l.length > 0 ? /* @__PURE__ */ s(
2408
2451
  "div",
2409
2452
  {
2410
2453
  role: "group",
2411
2454
  "aria-label": r("booking.filtersLabel"),
2412
2455
  className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
2413
- children: l.map((h) => {
2414
- const y = Jt(
2415
- h,
2456
+ children: l.map((f) => {
2457
+ const b = Yt(
2458
+ f,
2416
2459
  a,
2417
2460
  t,
2418
- d
2419
- ), I = h === S, N = ue(h, a);
2461
+ o
2462
+ ), N = f === S, w = ge(f, a);
2420
2463
  return /* @__PURE__ */ s(
2421
- pe,
2464
+ he,
2422
2465
  {
2423
- intent: I ? "primary" : "outline",
2466
+ intent: N ? "primary" : "outline",
2424
2467
  size: "sm",
2425
2468
  endIcon: /* @__PURE__ */ s(
2426
- ps,
2469
+ ms,
2427
2470
  {
2428
2471
  "aria-hidden": "true",
2429
- className: I ? "ds:rotate-180" : void 0
2472
+ className: N ? "ds:rotate-180" : void 0
2430
2473
  }
2431
2474
  ),
2432
- "aria-expanded": N ? I : void 0,
2433
- "aria-controls": N && I ? f : void 0,
2434
- "aria-current": !N && I ? "step" : void 0,
2475
+ "aria-expanded": w ? N : void 0,
2476
+ "aria-controls": w && N ? m : void 0,
2477
+ "aria-current": !w && N ? "step" : void 0,
2435
2478
  onClick: () => i(
2436
- N && I ? t.currentStep : h
2479
+ w && N ? t.currentStep : f
2437
2480
  ),
2438
- children: y ? /* @__PURE__ */ b(ee, { children: [
2439
- c[h],
2481
+ children: b ? /* @__PURE__ */ v(X, { children: [
2482
+ u[f],
2440
2483
  ": ",
2441
- y
2442
- ] }) : c[h]
2484
+ b
2485
+ ] }) : u[f]
2443
2486
  },
2444
- `csc-${h}`
2487
+ `csc-${f}`
2445
2488
  );
2446
2489
  })
2447
2490
  }
2448
2491
  ) : null,
2449
2492
  S !== void 0 ? /* @__PURE__ */ s(
2450
- B,
2493
+ E,
2451
2494
  {
2452
2495
  step: S,
2453
- active: S === o,
2454
- id: f,
2455
- children: H(S, e, { compactService: !0 })
2496
+ active: S === d,
2497
+ id: m,
2498
+ children: U(S, e, { compactService: !0 })
2456
2499
  }
2457
2500
  ) : null,
2458
- !u && t.gates.date ? (
2501
+ !c && t.gates.date ? (
2459
2502
  // four-day-grid embeds slots inline with the day strip — the
2460
2503
  // historic 2-col date|slot split collapses to a single column
2461
2504
  // so the picker spans the full width instead of orphaning an
2462
2505
  // empty right cell.
2463
- e.datePickerStyle === "four-day-grid" ? /* @__PURE__ */ s(B, { step: 5, active: o === 5, children: H(5, e) }) : /* @__PURE__ */ b("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-2", children: [
2506
+ e.datePickerStyle === "four-day-grid" ? /* @__PURE__ */ s(E, { step: 5, active: d === 5, children: U(5, e) }) : /* @__PURE__ */ v("div", { className: "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-2", children: [
2464
2507
  /* @__PURE__ */ s(
2465
- B,
2508
+ E,
2466
2509
  {
2467
2510
  step: 5,
2468
- active: o === 5,
2511
+ active: d === 5,
2469
2512
  className: "ds:min-w-0",
2470
- children: H(5, e)
2513
+ children: U(5, e)
2471
2514
  }
2472
2515
  ),
2473
2516
  a.date ? /* @__PURE__ */ s(
2474
- B,
2517
+ E,
2475
2518
  {
2476
2519
  step: 6,
2477
- active: o === 6,
2520
+ active: d === 6,
2478
2521
  className: "ds:min-w-0",
2479
- children: H(6, e)
2522
+ children: U(6, e)
2480
2523
  }
2481
2524
  ) : /* @__PURE__ */ s("div", { className: "ds:min-w-0" })
2482
2525
  ] })
2483
2526
  ) : null,
2484
- t.gates.details ? /* @__PURE__ */ s(B, { step: 7, active: o === 7, children: H(7, e) }) : null
2527
+ t.gates.details ? /* @__PURE__ */ s(E, { step: 7, active: d === 7, children: U(7, e) }) : null
2485
2528
  ] });
2486
2529
  }
2487
- function Aa(e) {
2530
+ function Ta(e) {
2488
2531
  const { cascade: t, datePickerStyle: a, activeStep: n } = e, i = xe(n, a), r = t.visibleSteps.filter(
2489
- (d) => d === 1 || d === 2 || d === 3 || d === 4
2532
+ (o) => o === 1 || o === 2 || o === 3 || o === 4
2490
2533
  );
2491
- return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2492
- /* @__PURE__ */ b(
2534
+ return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2535
+ /* @__PURE__ */ v(
2493
2536
  "div",
2494
2537
  {
2495
2538
  className: a === "four-day-grid" ? "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]" : "ds:grid ds:grid-cols-1 ds:gap-[var(--spacing-md)] ds:md:grid-cols-2",
2496
2539
  children: [
2497
- /* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: r.map((d) => /* @__PURE__ */ s(B, { step: d, active: d === i, children: H(d, e, { compactService: !0 }) }, `fbf-${d}`)) }),
2498
- /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2499
- t.gates.date ? /* @__PURE__ */ s(B, { step: 5, active: i === 5, children: H(5, e) }) : null,
2500
- t.gates.slot && e.value.date && a === "month-calendar" ? /* @__PURE__ */ s(B, { step: 6, active: i === 6, children: H(6, e) }) : null
2540
+ /* @__PURE__ */ s("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: r.map((o) => /* @__PURE__ */ s(E, { step: o, active: o === i, children: U(o, e, { compactService: !0 }) }, `fbf-${o}`)) }),
2541
+ /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2542
+ t.gates.date ? /* @__PURE__ */ s(E, { step: 5, active: i === 5, children: U(5, e) }) : null,
2543
+ t.gates.slot && e.value.date && a === "month-calendar" ? /* @__PURE__ */ s(E, { step: 6, active: i === 6, children: U(6, e) }) : null
2501
2544
  ] })
2502
2545
  ]
2503
2546
  }
2504
2547
  ),
2505
- t.gates.details ? /* @__PURE__ */ s(B, { step: 7, active: i === 7, children: H(7, e) }) : null
2548
+ t.gates.details ? /* @__PURE__ */ s(E, { step: 7, active: i === 7, children: U(7, e) }) : null
2506
2549
  ] });
2507
2550
  }
2508
- function Ta(e) {
2509
- const { cascade: t, value: a, activeStep: n, setActiveStep: i, datePickerStyle: r } = e, { t: c } = L(), d = Ye(), f = w(
2551
+ function _a(e) {
2552
+ const { cascade: t, value: a, activeStep: n, setActiveStep: i, datePickerStyle: r } = e, { t: u } = V(), o = We(), m = C(
2510
2553
  () => ut(t.visibleSteps, r),
2511
2554
  [t.visibleSteps, r]
2512
- ), o = xe(n, r), l = Math.max(0, f.indexOf(o)), u = f.length, S = w(
2513
- () => f.map((N) => ({ label: d[N] })),
2514
- [f, d]
2515
- ), h = l > 0, y = o === 5 && r === "four-day-grid", I = l < u - 1 && ue(o, a) && (!y || ue(6, a));
2516
- return /* @__PURE__ */ b("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2517
- /* @__PURE__ */ s(cs, { activeStep: l, steps: S }),
2518
- /* @__PURE__ */ s(B, { step: o, active: !0, children: H(o, e, { compactService: !0 }) }),
2519
- /* @__PURE__ */ b("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
2555
+ ), d = xe(n, r), l = Math.max(0, m.indexOf(d)), c = m.length, S = C(
2556
+ () => m.map((w) => ({ label: o[w] })),
2557
+ [m, o]
2558
+ ), f = l > 0, b = d === 5 && r === "four-day-grid", N = l < c - 1 && ge(d, a) && (!b || ge(6, a));
2559
+ return /* @__PURE__ */ v("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
2560
+ /* @__PURE__ */ s(us, { activeStep: l, steps: S }),
2561
+ /* @__PURE__ */ s(E, { step: d, active: !0, children: U(d, e, { compactService: !0 }) }),
2562
+ /* @__PURE__ */ v("div", { className: "ds:flex ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
2520
2563
  /* @__PURE__ */ s(
2521
- pe,
2564
+ he,
2522
2565
  {
2523
2566
  intent: "ghost",
2524
2567
  size: "md",
2525
- disabled: !h,
2568
+ disabled: !f,
2526
2569
  onClick: () => {
2527
- const N = f[l - 1];
2528
- N && i(N);
2570
+ const w = m[l - 1];
2571
+ w && i(w);
2529
2572
  },
2530
- children: c("booking.actions.back")
2573
+ children: u("booking.actions.back")
2531
2574
  }
2532
2575
  ),
2533
- o < 7 ? /* @__PURE__ */ s(
2534
- pe,
2576
+ d < 7 ? /* @__PURE__ */ s(
2577
+ he,
2535
2578
  {
2536
2579
  intent: "primary",
2537
2580
  size: "md",
2538
- disabled: !I,
2581
+ disabled: !N,
2539
2582
  onClick: () => {
2540
- const N = f[l + 1];
2541
- N && i(N);
2583
+ const w = m[l + 1];
2584
+ w && i(w);
2542
2585
  },
2543
- children: c("booking.actions.next")
2586
+ children: u("booking.actions.next")
2544
2587
  }
2545
2588
  ) : null
2546
2589
  ] })
2547
2590
  ] });
2548
2591
  }
2549
- const _a = [], Oa = [];
2550
- function Nt() {
2592
+ const Ba = [], Oa = [];
2593
+ function wt() {
2551
2594
  return typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
2552
2595
  }
2553
- const Ba = wt(
2596
+ const La = Ct(
2554
2597
  ({
2555
2598
  variant: e = "inline-list",
2556
2599
  country: t,
@@ -2561,76 +2604,76 @@ const Ba = wt(
2561
2604
  allowOperatorSelection: n = !1,
2562
2605
  lockedOperatorId: i,
2563
2606
  autoSelectSingleService: r = !1,
2564
- specialties: c,
2565
- services: d,
2566
- operators: f,
2567
- availableDates: o,
2607
+ specialties: u,
2608
+ services: o,
2609
+ operators: m,
2610
+ availableDates: d,
2568
2611
  availableSlots: l,
2569
- nextAvailableDate: u,
2612
+ nextAvailableDate: c,
2570
2613
  requireCodiceFiscale: S,
2571
- requireDateOfBirth: h,
2572
- requireInsuranceNumber: y,
2573
- showNote: I,
2574
- showReturningPatientFlag: N,
2575
- privacyPolicyUrl: C,
2576
- termsUrl: x,
2577
- validateCodiceFiscale: k,
2578
- validateInsuranceNumber: p,
2579
- confirmationChannels: T,
2580
- defaultConfirmationChannels: D,
2581
- value: m,
2614
+ requireDateOfBirth: f,
2615
+ requireInsuranceNumber: b,
2616
+ showNote: N,
2617
+ showReturningPatientFlag: w,
2618
+ privacyPolicyUrl: D,
2619
+ termsUrl: I,
2620
+ validateCodiceFiscale: y,
2621
+ validateInsuranceNumber: x,
2622
+ confirmationChannels: k,
2623
+ defaultConfirmationChannels: A,
2624
+ value: p,
2582
2625
  onChange: g,
2583
- onSubmit: A,
2584
- onStepChange: _,
2585
- onDateSelect: V,
2586
- onWindowChange: F,
2587
- datePickerStyle: R = "month-calendar",
2588
- specialtyPickerStyle: $,
2589
- servicePickerStyle: P,
2590
- operatorPickerStyle: oe,
2591
- loadingDates: X,
2592
- loadingSlots: Ie,
2593
- submitting: de,
2594
- submitError: Ae,
2595
- mode: se = "live",
2596
- showModifyOnSuccess: fe = !0,
2626
+ onSubmit: T,
2627
+ onStepChange: L,
2628
+ onDateSelect: O,
2629
+ onWindowChange: ae,
2630
+ datePickerStyle: P = "month-calendar",
2631
+ specialtyPickerStyle: z,
2632
+ servicePickerStyle: ne,
2633
+ operatorPickerStyle: R,
2634
+ loadingDates: ce,
2635
+ loadingSlots: ee,
2636
+ submitting: Ie,
2637
+ submitError: ue,
2638
+ mode: _e = "live",
2639
+ showModifyOnSuccess: ie = !0,
2597
2640
  surface: Ne = "flat",
2598
- emptyServicesSlot: Te,
2599
- onboardingIncompleteSlot: _e,
2600
- "aria-label": We,
2601
- id: ae,
2641
+ emptyServicesSlot: ve,
2642
+ onboardingIncompleteSlot: Be,
2643
+ "aria-label": we,
2644
+ id: re,
2602
2645
  className: Ze,
2603
- onFocus: ge,
2604
- ...Oe
2605
- }, Be) => {
2606
- const { t: v, i18n: O } = L(), z = e ?? "inline-list", Le = O.language ?? "en", ne = c ?? _a, he = f ?? Oa;
2607
- G(() => {
2608
- const M = na(m, {
2646
+ onFocus: Ce,
2647
+ ...Xe
2648
+ }, Oe) => {
2649
+ const { t: pe, i18n: Le } = V(), K = e ?? "inline-list", me = Le.language ?? "en", h = u ?? Ba, _ = m ?? Oa;
2650
+ H(() => {
2651
+ const M = ia(p, {
2609
2652
  useSpecialties: a,
2610
2653
  lockedOperatorId: i,
2611
2654
  autoSelectSingleService: r,
2612
- specialties: ne,
2613
- services: d
2655
+ specialties: h,
2656
+ services: o
2614
2657
  });
2615
- (M.specialtyId !== m.specialtyId || M.operatorId !== m.operatorId || M.serviceId !== m.serviceId) && g(M);
2658
+ (M.specialtyId !== p.specialtyId || M.operatorId !== p.operatorId || M.serviceId !== p.serviceId) && g(M);
2616
2659
  }, [
2617
2660
  i,
2618
2661
  a,
2619
2662
  r,
2620
- ne,
2621
- d
2663
+ h,
2664
+ o
2622
2665
  ]);
2623
- const E = w(
2624
- () => aa({
2666
+ const B = C(
2667
+ () => na({
2625
2668
  country: t,
2626
2669
  useSpecialties: a,
2627
2670
  allowOperatorSelection: n,
2628
2671
  lockedOperatorId: i,
2629
- specialties: ne,
2630
- services: d,
2631
- operators: he,
2672
+ specialties: h,
2673
+ services: o,
2674
+ operators: _,
2632
2675
  availableSlots: l,
2633
- value: m
2676
+ value: p
2634
2677
  }),
2635
2678
  [
2636
2679
  t,
@@ -2638,277 +2681,291 @@ const Ba = wt(
2638
2681
  n,
2639
2682
  i,
2640
2683
  r,
2641
- ne,
2642
- d,
2643
- he,
2684
+ h,
2644
2685
  o,
2686
+ _,
2687
+ d,
2645
2688
  l,
2646
- m
2689
+ p
2647
2690
  ]
2648
- ), Pe = w(
2691
+ ), Pe = C(
2649
2692
  () => JSON.stringify([
2650
- m.insuranceType,
2651
- te(m),
2652
- me(m),
2653
- Ge(m),
2654
- m.date,
2655
- m.slotKey
2693
+ p.insuranceType,
2694
+ se(p),
2695
+ le(p),
2696
+ He(p),
2697
+ p.date,
2698
+ p.slotKey
2656
2699
  ]),
2657
- [m]
2658
- ), [Q, we] = U(
2659
- E.currentStep
2660
- ), pt = W(Pe);
2661
- G(() => {
2700
+ [p]
2701
+ ), [te, Me] = J(
2702
+ B.currentStep
2703
+ ), pt = Z(Pe);
2704
+ H(() => {
2662
2705
  const M = Pe !== pt.current;
2663
- pt.current = Pe, !(!M && E.visibleSteps.includes(Q)) && we(E.currentStep);
2706
+ pt.current = Pe, !(!M && B.visibleSteps.includes(te)) && Me(B.currentStep);
2664
2707
  }, [
2665
2708
  Pe,
2666
- E.currentStep,
2667
- E.visibleSteps,
2668
- Q
2709
+ B.currentStep,
2710
+ B.visibleSteps,
2711
+ te
2669
2712
  ]);
2670
- const ve = W(null), Xe = w(
2671
- () => ut(E.visibleSteps, R),
2672
- [E.visibleSteps, R]
2673
- ), mt = Ye(), [Yt, Wt] = U(""), ft = W(null), Ee = W(null);
2674
- G(() => {
2675
- const M = xe(Q, R);
2676
- if (Ee.current === null) {
2677
- Ee.current = M;
2713
+ const be = Z(null), Qe = C(
2714
+ () => ut(B.visibleSteps, P),
2715
+ [B.visibleSteps, P]
2716
+ ), mt = We(), [Wt, Zt] = J(""), ft = Z(null), Re = Z(null);
2717
+ H(() => {
2718
+ const M = xe(te, P);
2719
+ if (Re.current === null) {
2720
+ Re.current = M;
2678
2721
  return;
2679
2722
  }
2680
- if (Ee.current === M) return;
2681
- Ee.current = M;
2682
- const Y = Xe.indexOf(M);
2683
- Wt(
2684
- Y === -1 ? "" : v("booking.stepAnnouncement", {
2685
- current: Y + 1,
2686
- total: Xe.length,
2723
+ if (Re.current === M) return;
2724
+ Re.current = M;
2725
+ const $ = Qe.indexOf(M);
2726
+ Zt(
2727
+ $ === -1 ? "" : pe("booking.stepAnnouncement", {
2728
+ current: $ + 1,
2729
+ total: Qe.length,
2687
2730
  label: mt[M]
2688
2731
  })
2689
2732
  );
2690
- const be = ft.current;
2691
- if (!be || be.isConnected) return;
2692
- const le = ve.current;
2693
- if (!le) return;
2733
+ const F = ft.current;
2734
+ if (!F || F.isConnected) return;
2735
+ const W = be.current;
2736
+ if (!W) return;
2694
2737
  const ye = document.activeElement;
2695
- if (!(ye === null || ye === document.body || !le.contains(ye))) return;
2696
- const Ve = le.querySelector(Na) ?? le;
2738
+ if (!(ye === null || ye === document.body || !W.contains(ye))) return;
2739
+ const Ve = W.querySelector(wa) ?? W;
2697
2740
  if (Ve.focus({ preventScroll: !0 }), typeof Ve.scrollIntoView == "function")
2698
2741
  try {
2699
2742
  Ve.scrollIntoView({
2700
- behavior: Nt() ? "auto" : "smooth",
2743
+ behavior: wt() ? "auto" : "smooth",
2701
2744
  block: "nearest"
2702
2745
  });
2703
2746
  } catch {
2704
2747
  Ve.scrollIntoView();
2705
2748
  }
2706
- }, [Q, R, Xe, mt, v]);
2707
- const [ie, Ce] = U("idle"), [Qe, et] = U(null), gt = Z(
2749
+ }, [te, P, Qe, mt, pe]);
2750
+ const [oe, De] = J("idle"), [et, tt] = J(null), gt = Q(
2708
2751
  async (M) => {
2709
- if (!E.selectedSlot) return;
2710
- const Y = {
2711
- slot: E.selectedSlot,
2752
+ if (!B.selectedSlot) return;
2753
+ const $ = {
2754
+ slot: B.selectedSlot,
2712
2755
  value: {
2713
- ...m,
2756
+ ...p,
2714
2757
  details: M,
2715
- operatorId: kt(m) ?? m.operatorId
2758
+ operatorId: St(p) ?? p.operatorId
2716
2759
  },
2717
2760
  details: M
2718
2761
  };
2719
- Ce("submitting");
2762
+ De("submitting");
2720
2763
  try {
2721
- await A(Y), et({
2722
- slot: E.selectedSlot,
2764
+ await T($), tt({
2765
+ slot: B.selectedSlot,
2723
2766
  details: M,
2724
- specialtyId: m.specialtyId,
2725
- serviceId: m.serviceId,
2726
- insuranceType: m.insuranceType,
2727
- operatorId: kt(m),
2728
- operatorIds: Ge(m).filter(
2729
- (be) => be !== j
2767
+ specialtyId: p.specialtyId,
2768
+ serviceId: p.serviceId,
2769
+ insuranceType: p.insuranceType,
2770
+ operatorId: St(p),
2771
+ operatorIds: He(p).filter(
2772
+ (F) => F !== q
2730
2773
  ),
2731
- date: m.date
2732
- }), Ce("success");
2774
+ date: p.date
2775
+ }), De("success");
2733
2776
  } catch {
2734
- throw Ce("error"), new Error("Booking submission failed");
2777
+ throw De("error"), new Error("Booking submission failed");
2735
2778
  }
2736
2779
  },
2737
- [E.selectedSlot, A, m]
2780
+ [B.selectedSlot, T, p]
2738
2781
  );
2739
- es(Be, () => ve.current, []);
2740
- const Me = ie === "success" ? 8 : E.currentStep, ht = W(null);
2741
- G(() => {
2742
- if (Me !== ht.current && (ht.current = Me, _ == null || _(Me), Me === 8 && ve.current))
2782
+ ts(Oe, () => be.current, []);
2783
+ const Ae = oe === "success" ? 8 : B.currentStep, ht = Z(null);
2784
+ H(() => {
2785
+ if (Ae !== ht.current && (ht.current = Ae, L == null || L(Ae), Ae === 8 && be.current))
2743
2786
  try {
2744
- ve.current.scrollIntoView({
2745
- behavior: Nt() ? "auto" : "smooth",
2787
+ be.current.scrollIntoView({
2788
+ behavior: wt() ? "auto" : "smooth",
2746
2789
  block: "start"
2747
2790
  });
2748
2791
  } catch {
2749
- ve.current.scrollIntoView();
2792
+ be.current.scrollIntoView();
2750
2793
  }
2751
- }, [Me, _]);
2752
- const Re = W({ activeStep: Q, cascade: E, submitState: ie });
2753
- G(() => {
2754
- Re.current = { activeStep: Q, cascade: E, submitState: ie };
2755
- }, [Q, E, ie]);
2756
- const tt = w(
2794
+ }, [Ae, L]);
2795
+ const Ee = Z({ activeStep: te, cascade: B, submitState: oe });
2796
+ H(() => {
2797
+ Ee.current = { activeStep: te, cascade: B, submitState: oe };
2798
+ }, [te, B, oe]);
2799
+ const st = C(
2757
2800
  () => ({
2758
- getVariant: () => z,
2801
+ getVariant: () => K,
2759
2802
  getCurrentStep: () => {
2760
- const M = Re.current;
2803
+ const M = Ee.current;
2761
2804
  return M.submitState === "success" ? 8 : M.activeStep;
2762
2805
  },
2763
2806
  reset: () => {
2764
- g({}), et(null), Ce("idle"), we(1);
2807
+ g({}), tt(null), De("idle"), Me(1);
2765
2808
  },
2766
2809
  goToStep: (M) => {
2767
- const Y = Re.current, be = Y.cascade.visibleSteps.includes(M), le = Y.cascade.currentStep, ye = !be || M > le ? le : M;
2768
- Re.current = { ...Y, activeStep: ye }, we(ye);
2810
+ const $ = Ee.current, F = $.cascade.visibleSteps.includes(M), W = $.cascade.currentStep, ye = !F || M > W ? W : M;
2811
+ Ee.current = { ...$, activeStep: ye }, Me(ye);
2769
2812
  }
2770
2813
  }),
2771
- [z, g]
2814
+ [K, g]
2772
2815
  );
2773
- ss(Ws, tt, ae);
2774
- const Zt = We ?? v("booking.regionLabel"), Xt = w(() => ie !== "success" || !Qe ? null : /* @__PURE__ */ s(
2775
- Ia,
2816
+ as(Zs, st, re);
2817
+ const Xt = we ?? pe("booking.regionLabel"), Qt = C(() => oe !== "success" || !et ? null : /* @__PURE__ */ s(
2818
+ Na,
2776
2819
  {
2777
- snapshot: Qe,
2778
- operators: he,
2779
- specialties: ne,
2780
- services: d,
2781
- locale: Le,
2782
- mode: se,
2783
- showModify: fe,
2784
- onReset: () => tt.reset(),
2820
+ snapshot: et,
2821
+ operators: _,
2822
+ specialties: h,
2823
+ services: o,
2824
+ locale: me,
2825
+ mode: _e,
2826
+ showModify: ie,
2827
+ onReset: () => st.reset(),
2785
2828
  onModify: () => {
2786
- et(null), Ce("idle"), we(7);
2829
+ tt(null), De("idle"), Me(7);
2787
2830
  }
2788
2831
  }
2789
2832
  ), [
2833
+ oe,
2834
+ et,
2835
+ _,
2836
+ h,
2837
+ o,
2838
+ me,
2839
+ _e,
2790
2840
  ie,
2791
- Qe,
2792
- he,
2793
- ne,
2794
- d,
2795
- Le,
2796
- se,
2797
- fe,
2798
- tt
2799
- ]), Qt = w(() => {
2800
- if (ie === "success") return null;
2801
- const M = z === "accordion" ? Ca : z === "calendar" ? Da : z === "flexible" ? Aa : z === "progress" ? Ta : wa, Y = {
2802
- cascade: E,
2841
+ st
2842
+ ]), vt = C(() => {
2843
+ const M = new Set(le(p)), $ = o.filter((F) => M.has(F.id)).map((F) => {
2844
+ var W;
2845
+ return {
2846
+ label: F.label,
2847
+ text: ((W = F.criticalInformationToAccept) == null ? void 0 : W.trim()) ?? ""
2848
+ };
2849
+ }).filter((F) => F.text.length > 0);
2850
+ if ($.length !== 0)
2851
+ return $.length === 1 ? $[0].text : $.map((F) => `${F.label}: ${F.text}`).join(`
2852
+
2853
+ `);
2854
+ }, [o, p]), es = C(() => {
2855
+ if (oe === "success") return null;
2856
+ const M = K === "accordion" ? Ma : K === "calendar" ? Aa : K === "flexible" ? Ta : K === "progress" ? _a : Ca, $ = {
2857
+ cascade: B,
2803
2858
  inputs: {
2804
- specialties: ne,
2805
- services: d,
2806
- operators: he,
2807
- availableDates: o,
2859
+ specialties: h,
2860
+ services: o,
2861
+ operators: _,
2862
+ availableDates: d,
2808
2863
  availableSlots: l,
2809
- nextAvailableDate: u
2864
+ nextAvailableDate: c
2810
2865
  },
2811
- value: m,
2866
+ value: p,
2812
2867
  onChange: g,
2813
2868
  onSubmit: gt,
2814
2869
  policy: { country: t, lockedOperatorId: i },
2815
2870
  detailsProps: {
2816
2871
  requireCodiceFiscale: S,
2817
- requireDateOfBirth: h,
2818
- requireInsuranceNumber: y,
2819
- insuranceType: m.insuranceType,
2820
- showNote: I,
2821
- showReturningPatientFlag: N,
2822
- privacyPolicyUrl: C,
2823
- termsUrl: x,
2824
- validateCodiceFiscale: k,
2825
- validateInsuranceNumber: p,
2826
- confirmationChannels: T,
2827
- defaultConfirmationChannels: D,
2828
- submitError: Ae
2872
+ requireDateOfBirth: f,
2873
+ requireInsuranceNumber: b,
2874
+ insuranceType: p.insuranceType,
2875
+ showNote: N,
2876
+ showReturningPatientFlag: w,
2877
+ privacyPolicyUrl: D,
2878
+ termsUrl: I,
2879
+ criticalInformationToAccept: vt,
2880
+ validateCodiceFiscale: y,
2881
+ validateInsuranceNumber: x,
2882
+ confirmationChannels: k,
2883
+ defaultConfirmationChannels: A,
2884
+ submitError: ue
2829
2885
  },
2830
- emptyServicesSlot: Te,
2831
- onboardingIncompleteSlot: _e,
2832
- loadingDates: X,
2833
- loadingSlots: Ie,
2834
- onDateSelect: V,
2835
- onWindowChange: F,
2836
- datePickerStyle: R,
2837
- specialtyPickerStyle: $,
2838
- servicePickerStyle: P,
2839
- operatorPickerStyle: oe,
2840
- submitting: de,
2841
- locale: Le,
2842
- activeStep: Q,
2843
- setActiveStep: we,
2844
- agentIdBase: ae
2886
+ emptyServicesSlot: ve,
2887
+ onboardingIncompleteSlot: Be,
2888
+ loadingDates: ce,
2889
+ loadingSlots: ee,
2890
+ onDateSelect: O,
2891
+ onWindowChange: ae,
2892
+ datePickerStyle: P,
2893
+ specialtyPickerStyle: z,
2894
+ servicePickerStyle: ne,
2895
+ operatorPickerStyle: R,
2896
+ submitting: Ie,
2897
+ locale: me,
2898
+ activeStep: te,
2899
+ setActiveStep: Me,
2900
+ agentIdBase: re
2845
2901
  };
2846
- return /* @__PURE__ */ s(M, { ...Y });
2902
+ return /* @__PURE__ */ s(M, { ...$ });
2847
2903
  }, [
2848
- ie,
2849
- z,
2850
- E,
2851
- ne,
2852
- d,
2853
- he,
2904
+ oe,
2905
+ K,
2906
+ B,
2907
+ h,
2854
2908
  o,
2909
+ _,
2910
+ d,
2855
2911
  l,
2856
- u,
2857
- m,
2912
+ c,
2913
+ p,
2858
2914
  g,
2859
2915
  gt,
2860
2916
  t,
2861
2917
  i,
2862
2918
  S,
2863
- h,
2864
- y,
2865
- Ae,
2866
- I,
2919
+ f,
2920
+ b,
2921
+ ue,
2867
2922
  N,
2868
- C,
2923
+ w,
2924
+ D,
2925
+ I,
2926
+ vt,
2927
+ y,
2869
2928
  x,
2870
2929
  k,
2871
- p,
2872
- T,
2873
- D,
2874
- Te,
2875
- _e,
2876
- X,
2877
- Ie,
2878
- V,
2879
- F,
2880
- R,
2881
- $,
2930
+ A,
2931
+ ve,
2932
+ Be,
2933
+ ce,
2934
+ ee,
2935
+ O,
2936
+ ae,
2882
2937
  P,
2883
- oe,
2884
- de,
2885
- Le,
2886
- Q,
2887
- ae
2938
+ z,
2939
+ ne,
2940
+ R,
2941
+ Ie,
2942
+ me,
2943
+ te,
2944
+ re
2888
2945
  ]);
2889
- return /* @__PURE__ */ b(
2946
+ return /* @__PURE__ */ v(
2890
2947
  "div",
2891
2948
  {
2892
- ref: ve,
2949
+ ref: be,
2893
2950
  role: "region",
2894
- "aria-label": Zt,
2895
- id: ae,
2951
+ "aria-label": Xt,
2952
+ id: re,
2896
2953
  "data-component": "booking",
2897
- "data-component-id": ae,
2898
- "data-variant": z,
2899
- className: la({
2900
- variant: z,
2954
+ "data-component-id": re,
2955
+ "data-variant": K,
2956
+ className: ca({
2957
+ variant: K,
2901
2958
  surface: Ne,
2902
2959
  className: Ze
2903
2960
  }),
2904
2961
  tabIndex: -1,
2905
2962
  onFocus: (M) => {
2906
- ft.current = M.target, ge == null || ge(M);
2963
+ ft.current = M.target, Ce == null || Ce(M);
2907
2964
  },
2908
- ...Oe,
2965
+ ...Xe,
2909
2966
  children: [
2910
- /* @__PURE__ */ s("div", { role: "status", className: "ds:sr-only", children: Yt }),
2911
- /* @__PURE__ */ b(
2967
+ /* @__PURE__ */ s("div", { role: "status", className: "ds:sr-only", children: Wt }),
2968
+ /* @__PURE__ */ v(
2912
2969
  "div",
2913
2970
  {
2914
2971
  className: [
@@ -2920,22 +2977,22 @@ const Ba = wt(
2920
2977
  "ds:pt-[var(--spacing-md)] ds:pb-[var(--spacing-md)]"
2921
2978
  ].join(" "),
2922
2979
  children: [
2923
- /* @__PURE__ */ s("h2", { className: "type-title-card ds:text-[var(--foreground)] ds:m-0", children: v("booking.regionLabel") }),
2924
- /* @__PURE__ */ s("p", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:m-0", children: v("booking.headingSubtitle") })
2980
+ /* @__PURE__ */ s("h2", { className: "type-title-card ds:text-[var(--foreground)] ds:m-0", children: pe("booking.regionLabel") }),
2981
+ /* @__PURE__ */ s("p", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:m-0", children: pe("booking.headingSubtitle") })
2925
2982
  ]
2926
2983
  }
2927
2984
  ),
2928
- Xt ?? Qt
2985
+ Qt ?? es
2929
2986
  ]
2930
2987
  }
2931
2988
  );
2932
2989
  }
2933
2990
  );
2934
- Ba.displayName = "Booking";
2991
+ La.displayName = "Booking";
2935
2992
  export {
2936
- Ba as B,
2993
+ La as B,
2937
2994
  it as C,
2938
- j as O,
2939
- Ws as b
2995
+ q as O,
2996
+ Zs as b
2940
2997
  };
2941
- //# sourceMappingURL=booking-BtSOKjQu.js.map
2998
+ //# sourceMappingURL=booking-AabCk7CI.js.map