@alfadocs/ui-kit 1.6.1 → 1.7.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.
- package/dist/_chunks/{practice-results-F_Rf7c4H.js → practice-results-BEsAdW-B.js} +719 -633
- package/dist/agent-catalog.json +2 -2
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/practice-results/practice-results.d.ts +47 -7
- package/dist/i18n/locales/ar.d.ts +1 -0
- package/dist/i18n/locales/ar.js +2 -1
- package/dist/i18n/locales/de.d.ts +1 -0
- package/dist/i18n/locales/de.js +2 -1
- package/dist/i18n/locales/el.d.ts +1 -0
- package/dist/i18n/locales/el.js +2 -1
- package/dist/i18n/locales/en.d.ts +1 -0
- package/dist/i18n/locales/en.js +2 -1
- package/dist/i18n/locales/es.d.ts +1 -0
- package/dist/i18n/locales/es.js +2 -1
- package/dist/i18n/locales/fr.d.ts +1 -0
- package/dist/i18n/locales/fr.js +2 -1
- package/dist/i18n/locales/hi.d.ts +1 -0
- package/dist/i18n/locales/hi.js +2 -1
- package/dist/i18n/locales/it.d.ts +1 -0
- package/dist/i18n/locales/it.js +2 -1
- package/dist/i18n/locales/ja.d.ts +1 -0
- package/dist/i18n/locales/ja.js +2 -1
- package/dist/i18n/locales/nl.d.ts +1 -0
- package/dist/i18n/locales/nl.js +2 -1
- package/dist/i18n/locales/pl.d.ts +1 -0
- package/dist/i18n/locales/pl.js +2 -1
- package/dist/i18n/locales/pt.d.ts +1 -0
- package/dist/i18n/locales/pt.js +2 -1
- package/dist/i18n/locales/ro.d.ts +1 -0
- package/dist/i18n/locales/ro.js +2 -1
- package/dist/i18n/locales/ru.d.ts +1 -0
- package/dist/i18n/locales/ru.js +2 -1
- package/dist/i18n/locales/sq.d.ts +1 -0
- package/dist/i18n/locales/sq.js +2 -1
- package/dist/i18n/locales/sv.d.ts +1 -0
- package/dist/i18n/locales/sv.js +2 -1
- package/dist/i18n/locales/tr.d.ts +1 -0
- package/dist/i18n/locales/tr.js +2 -1
- package/dist/i18n/locales/zh.d.ts +1 -0
- package/dist/i18n/locales/zh.js +2 -1
- package/dist/index.js +1 -1
- package/dist/locales/ar.json +2 -1
- package/dist/locales/de.json +2 -1
- package/dist/locales/el.json +2 -1
- package/dist/locales/en.json +2 -1
- package/dist/locales/es.json +2 -1
- package/dist/locales/fr.json +2 -1
- package/dist/locales/hi.json +2 -1
- package/dist/locales/it.json +2 -1
- package/dist/locales/ja.json +2 -1
- package/dist/locales/nl.json +2 -1
- package/dist/locales/pl.json +2 -1
- package/dist/locales/pt.json +2 -1
- package/dist/locales/ro.json +2 -1
- package/dist/locales/ru.json +2 -1
- package/dist/locales/sq.json +2 -1
- package/dist/locales/sv.json +2 -1
- package/dist/locales/tr.json +2 -1
- package/dist/locales/zh.json +2 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
|
@@ -1,35 +1,49 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { c as
|
|
1
|
+
import { jsx as t, jsxs as p, Fragment as et } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as tt, useState as me, useRef as A, useMemo as O, useImperativeHandle as nt, useCallback as B, useEffect as W } from "react";
|
|
3
|
+
import { c as j } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as C } from "react-i18next";
|
|
5
5
|
import { A as Y } from "./alert-CiJT540z.js";
|
|
6
|
-
import { A as
|
|
7
|
-
import { B as
|
|
6
|
+
import { A as Re } from "./avatar-BNQNhoyL.js";
|
|
7
|
+
import { B as ee } from "./button-nJaPh_HC.js";
|
|
8
8
|
import { D as $ } from "./dropdown-menu-DU-Hrf33.js";
|
|
9
|
-
import { E as
|
|
10
|
-
import { M as
|
|
11
|
-
import { R as
|
|
12
|
-
import { S as
|
|
13
|
-
import { S as
|
|
14
|
-
import { S as
|
|
15
|
-
import { B as
|
|
16
|
-
import { u as
|
|
17
|
-
import { u as
|
|
18
|
-
import { c as
|
|
19
|
-
import { R as
|
|
20
|
-
import { C as
|
|
21
|
-
import { M as
|
|
22
|
-
import { L as
|
|
23
|
-
import { S as
|
|
24
|
-
import { H as
|
|
25
|
-
import { C as
|
|
9
|
+
import { E as at } from "./empty-state-X0sVPfVo.js";
|
|
10
|
+
import { M as st } from "./map-view-CCAlC9IL.js";
|
|
11
|
+
import { R as Se } from "./rating-BYbUowdK.js";
|
|
12
|
+
import { S as _ } from "./sheet-BSznOyJs.js";
|
|
13
|
+
import { S as it } from "./skeleton-CZbwyJAA.js";
|
|
14
|
+
import { S as rt } from "./spinner-hbwuKwMf.js";
|
|
15
|
+
import { B as D } from "./badge-sTusUqZD.js";
|
|
16
|
+
import { u as ot } from "./use-media-query-CcAx5SMM.js";
|
|
17
|
+
import { u as lt } from "./registry-DvAUVLHh.js";
|
|
18
|
+
import { c as Ne } from "./createLucideIcon-DhHxpK9K.js";
|
|
19
|
+
import { R as ct } from "./refresh-cw-DnI0cLFC.js";
|
|
20
|
+
import { C as Me } from "./chevron-down-DWE7GSq9.js";
|
|
21
|
+
import { M as ne } from "./map-pin-BaY37-Km.js";
|
|
22
|
+
import { L as Pe } from "./languages-CGLX6Qpe.js";
|
|
23
|
+
import { S as Ae } from "./shield-check-DCJALLVh.js";
|
|
24
|
+
import { H as _e } from "./heart--qCA4ffe.js";
|
|
25
|
+
import { C as dt } from "./calendar-clock-hbObjfGY.js";
|
|
26
26
|
/**
|
|
27
27
|
* @license lucide-react v1.22.0 - ISC
|
|
28
28
|
*
|
|
29
29
|
* This source code is licensed under the ISC license.
|
|
30
30
|
* See the LICENSE file in the root directory of this source tree.
|
|
31
31
|
*/
|
|
32
|
-
const
|
|
32
|
+
const ut = [
|
|
33
|
+
["path", { d: "M16 19h6", key: "xwg31i" }],
|
|
34
|
+
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
35
|
+
["path", { d: "M19 16v6", key: "tddt3s" }],
|
|
36
|
+
["path", { d: "M21 12.598V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8.5", key: "1glfrc" }],
|
|
37
|
+
["path", { d: "M3 10h18", key: "8toen8" }],
|
|
38
|
+
["path", { d: "M8 2v4", key: "1cmpym" }]
|
|
39
|
+
], pt = Ne("calendar-plus", ut);
|
|
40
|
+
/**
|
|
41
|
+
* @license lucide-react v1.22.0 - ISC
|
|
42
|
+
*
|
|
43
|
+
* This source code is licensed under the ISC license.
|
|
44
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
45
|
+
*/
|
|
46
|
+
const mt = [
|
|
33
47
|
[
|
|
34
48
|
"path",
|
|
35
49
|
{
|
|
@@ -39,7 +53,7 @@ const st = [
|
|
|
39
53
|
],
|
|
40
54
|
["path", { d: "M15 5.764v15", key: "1pn4in" }],
|
|
41
55
|
["path", { d: "M9 3.236v15", key: "1uimfh" }]
|
|
42
|
-
],
|
|
56
|
+
], ft = Ne("map", mt), ht = {
|
|
43
57
|
id: "practice-results",
|
|
44
58
|
// `scroll` backs scroll_to_result; `pick` backs focus_pin (a non-persisting
|
|
45
59
|
// pin highlight). The active variant is consumer-owned via props, so there is
|
|
@@ -115,20 +129,20 @@ const st = [
|
|
|
115
129
|
},
|
|
116
130
|
item: {
|
|
117
131
|
attr: "data-result-id",
|
|
118
|
-
description:
|
|
132
|
+
description: 'Stable result id emitted on each rendered result card. Used by scroll_to_result / focus_pin to address a single result. Each card also carries two anchors: data-component="practice-result-open-cta" (practice page) and data-component="practice-result-book-cta" (booking flow; data-slot-aware="true" when it deep-links to a next slot).'
|
|
119
133
|
}
|
|
120
134
|
}
|
|
121
|
-
},
|
|
135
|
+
}, gt = 13, vt = [
|
|
122
136
|
"distance",
|
|
123
137
|
"rating",
|
|
124
138
|
"next-available",
|
|
125
139
|
"relevance"
|
|
126
140
|
];
|
|
127
|
-
function
|
|
141
|
+
function Ie(e, n, s) {
|
|
128
142
|
const r = `languages.${e}`;
|
|
129
143
|
return s.exists(r) ? n(r) : e.toUpperCase();
|
|
130
144
|
}
|
|
131
|
-
function
|
|
145
|
+
function F(e, n) {
|
|
132
146
|
if (typeof window > "u") return;
|
|
133
147
|
const s = window.track;
|
|
134
148
|
try {
|
|
@@ -136,28 +150,28 @@ function H(e, n) {
|
|
|
136
150
|
} catch {
|
|
137
151
|
}
|
|
138
152
|
}
|
|
139
|
-
function
|
|
153
|
+
function Q(e, n, s, r) {
|
|
140
154
|
const i = e.findIndex((c) => c.id === n);
|
|
141
155
|
if (i < 0) return;
|
|
142
156
|
const a = e[i];
|
|
143
|
-
a && (
|
|
157
|
+
a && (F("serp_result_clicked", { resultId: n, source: s, position: i }), r(a, s));
|
|
144
158
|
}
|
|
145
|
-
function
|
|
146
|
-
const r = (n.lat - e.lat) * Math.PI / 180, i = (n.lng - e.lng) * Math.PI / 180, a = e.lat * Math.PI / 180, c = n.lat * Math.PI / 180, d = Math.sin(r / 2),
|
|
147
|
-
return 2 * 6371 * Math.asin(Math.min(1, Math.sqrt(
|
|
159
|
+
function bt(e, n) {
|
|
160
|
+
const r = (n.lat - e.lat) * Math.PI / 180, i = (n.lng - e.lng) * Math.PI / 180, a = e.lat * Math.PI / 180, c = n.lat * Math.PI / 180, d = Math.sin(r / 2), l = Math.sin(i / 2), u = d * d + Math.cos(a) * Math.cos(c) * l * l;
|
|
161
|
+
return 2 * 6371 * Math.asin(Math.min(1, Math.sqrt(u)));
|
|
148
162
|
}
|
|
149
|
-
function
|
|
163
|
+
function yt(e, n, s) {
|
|
150
164
|
var i;
|
|
151
165
|
const r = [];
|
|
152
166
|
for (const a of e) {
|
|
153
|
-
const c = a.field ?? a.key, d = (((i = s == null ? void 0 : s[a.key]) == null ? void 0 : i.length) ?? 0) > 0,
|
|
154
|
-
(
|
|
167
|
+
const c = a.field ?? a.key, d = (((i = s == null ? void 0 : s[a.key]) == null ? void 0 : i.length) ?? 0) > 0, l = a.type === "boolean" || a.type !== "options" && a.options.length === 0 && (d || n.some(
|
|
168
|
+
(u) => typeof u[c] == "boolean"
|
|
155
169
|
));
|
|
156
|
-
!
|
|
170
|
+
!l && a.options.length === 0 || r.push({ ...a, boolean: l, booleanField: c });
|
|
157
171
|
}
|
|
158
172
|
return r;
|
|
159
173
|
}
|
|
160
|
-
function
|
|
174
|
+
function xt(e, n, s) {
|
|
161
175
|
return !n || Object.keys(n).length === 0 ? e : e.filter((r) => {
|
|
162
176
|
for (const i of s) {
|
|
163
177
|
const a = n[i.key];
|
|
@@ -167,27 +181,27 @@ function ut(e, n, s) {
|
|
|
167
181
|
continue;
|
|
168
182
|
}
|
|
169
183
|
const c = i.key === "insurance" ? r.insurances : i.key === "language" ? r.languages : r[i.key];
|
|
170
|
-
if (!Array.isArray(c) || !(i.multi ? a.some((
|
|
184
|
+
if (!Array.isArray(c) || !(i.multi ? a.some((l) => c.includes(l)) : c.includes(a[0]))) return !1;
|
|
171
185
|
}
|
|
172
186
|
return !0;
|
|
173
187
|
});
|
|
174
188
|
}
|
|
175
|
-
function
|
|
189
|
+
function kt(e, n, s) {
|
|
176
190
|
const r = e.map((a) => {
|
|
177
|
-
const c = a.location ? a.location.distanceKm ?? (s ?
|
|
191
|
+
const c = a.location ? a.location.distanceKm ?? (s ? bt(s, a.location) : void 0) : void 0;
|
|
178
192
|
return { result: a, distanceKm: c };
|
|
179
193
|
}), i = (a, c) => {
|
|
180
|
-
var d,
|
|
194
|
+
var d, l, u, o;
|
|
181
195
|
switch (n) {
|
|
182
196
|
case "distance":
|
|
183
197
|
return a.distanceKm == null && c.distanceKm == null ? 0 : a.distanceKm == null ? 1 : c.distanceKm == null ? -1 : a.distanceKm - c.distanceKm;
|
|
184
198
|
case "rating": {
|
|
185
|
-
const
|
|
186
|
-
return (((
|
|
199
|
+
const m = ((d = a.result.rating) == null ? void 0 : d.value) ?? -1;
|
|
200
|
+
return (((l = c.result.rating) == null ? void 0 : l.value) ?? -1) - m;
|
|
187
201
|
}
|
|
188
202
|
case "next-available": {
|
|
189
|
-
const
|
|
190
|
-
return !
|
|
203
|
+
const m = ((u = a.result.nextAvailableSlot) == null ? void 0 : u.dateTime) ?? "", f = ((o = c.result.nextAvailableSlot) == null ? void 0 : o.dateTime) ?? "";
|
|
204
|
+
return !m && !f ? 0 : m ? f ? m.localeCompare(f) : -1 : 1;
|
|
191
205
|
}
|
|
192
206
|
case "relevance":
|
|
193
207
|
default:
|
|
@@ -201,18 +215,18 @@ function pt(e, n, s) {
|
|
|
201
215
|
} : a
|
|
202
216
|
);
|
|
203
217
|
}
|
|
204
|
-
function
|
|
218
|
+
function we(e) {
|
|
205
219
|
let n = -1 / 0, s = 1 / 0, r = -1 / 0, i = 1 / 0, a = !1;
|
|
206
220
|
for (const c of e) {
|
|
207
221
|
if (!c.location) continue;
|
|
208
222
|
a = !0;
|
|
209
|
-
const { lat: d, lng:
|
|
210
|
-
d > n && (n = d), d < s && (s = d),
|
|
223
|
+
const { lat: d, lng: l } = c.location;
|
|
224
|
+
d > n && (n = d), d < s && (s = d), l > r && (r = l), l < i && (i = l);
|
|
211
225
|
}
|
|
212
226
|
if (a)
|
|
213
227
|
return { north: n, south: s, east: r, west: i };
|
|
214
228
|
}
|
|
215
|
-
const
|
|
229
|
+
const wt = j(
|
|
216
230
|
"ds:flex ds:w-full ds:flex-col ds:text-[var(--foreground)] ds:gap-[var(--spacing-md)]",
|
|
217
231
|
{
|
|
218
232
|
variants: {
|
|
@@ -225,7 +239,7 @@ const mt = Z(
|
|
|
225
239
|
defaultVariants: { variant: "split-list-map" }
|
|
226
240
|
}
|
|
227
241
|
);
|
|
228
|
-
function
|
|
242
|
+
function Te({
|
|
229
243
|
heading: e,
|
|
230
244
|
intro: n,
|
|
231
245
|
totalCount: s,
|
|
@@ -237,7 +251,7 @@ function Ie({
|
|
|
237
251
|
count: s,
|
|
238
252
|
place: r
|
|
239
253
|
}) : i("practiceResults.results.summary", { count: s }) : void 0;
|
|
240
|
-
return /* @__PURE__ */
|
|
254
|
+
return /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
241
255
|
e ? /* @__PURE__ */ t("h2", { className: "type-title-section ds:m-0 ds:text-[var(--foreground)]", children: e }) : null,
|
|
242
256
|
n ? /* @__PURE__ */ t("p", { className: "type-body ds:m-0 ds:text-[var(--muted-foreground)]", children: n }) : null,
|
|
243
257
|
a ? /* @__PURE__ */ t(
|
|
@@ -250,7 +264,7 @@ function Ie({
|
|
|
250
264
|
) : null
|
|
251
265
|
] });
|
|
252
266
|
}
|
|
253
|
-
const
|
|
267
|
+
const te = j(
|
|
254
268
|
[
|
|
255
269
|
"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
256
270
|
"ds:min-h-[var(--min-target-size)]",
|
|
@@ -272,7 +286,7 @@ const ee = Z(
|
|
|
272
286
|
},
|
|
273
287
|
defaultVariants: { state: "idle" }
|
|
274
288
|
}
|
|
275
|
-
),
|
|
289
|
+
), Ct = j(
|
|
276
290
|
"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
277
291
|
{
|
|
278
292
|
variants: {
|
|
@@ -291,7 +305,7 @@ const ee = Z(
|
|
|
291
305
|
},
|
|
292
306
|
defaultVariants: { placement: "inline" }
|
|
293
307
|
}
|
|
294
|
-
),
|
|
308
|
+
), Rt = j(
|
|
295
309
|
[
|
|
296
310
|
"ds:ms-[var(--spacing-xs)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
297
311
|
"ds:min-h-[var(--min-target-size)] ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)]",
|
|
@@ -302,71 +316,71 @@ const ee = Z(
|
|
|
302
316
|
"ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]"
|
|
303
317
|
].join(" ")
|
|
304
318
|
);
|
|
305
|
-
function
|
|
319
|
+
function Le({
|
|
306
320
|
facets: e,
|
|
307
321
|
value: n,
|
|
308
322
|
onChange: s,
|
|
309
323
|
floating: r
|
|
310
324
|
}) {
|
|
311
|
-
const { t: i } = C(), a =
|
|
312
|
-
() => Object.values(a).some((
|
|
325
|
+
const { t: i } = C(), a = O(() => n ?? {}, [n]), c = O(
|
|
326
|
+
() => Object.values(a).some((o) => o && o.length > 0),
|
|
313
327
|
[a]
|
|
314
|
-
), d = (
|
|
315
|
-
const
|
|
316
|
-
|
|
317
|
-
},
|
|
318
|
-
var
|
|
319
|
-
const
|
|
320
|
-
d(
|
|
321
|
-
},
|
|
322
|
-
const
|
|
323
|
-
let
|
|
324
|
-
|
|
328
|
+
), d = (o, m) => {
|
|
329
|
+
const f = { ...a };
|
|
330
|
+
m.length === 0 ? delete f[o] : f[o] = m, s(f), F("serp_filter_changed", { key: o, values: m });
|
|
331
|
+
}, l = (o) => {
|
|
332
|
+
var f;
|
|
333
|
+
const m = (((f = a[o]) == null ? void 0 : f.length) ?? 0) > 0;
|
|
334
|
+
d(o, m ? [] : ["true"]);
|
|
335
|
+
}, u = (o, m) => {
|
|
336
|
+
const f = a[o.key] ?? [], x = f.includes(m);
|
|
337
|
+
let b;
|
|
338
|
+
o.multi ? b = x ? f.filter((y) => y !== m) : [...f, m] : b = x ? [] : [m], d(o.key, b);
|
|
325
339
|
};
|
|
326
|
-
return e.length === 0 ? null : /* @__PURE__ */
|
|
340
|
+
return e.length === 0 ? null : /* @__PURE__ */ p(
|
|
327
341
|
"div",
|
|
328
342
|
{
|
|
329
343
|
"data-component": "practice-results-filters",
|
|
330
344
|
role: "group",
|
|
331
345
|
"aria-label": i("practiceResults.filters.label"),
|
|
332
|
-
className:
|
|
346
|
+
className: Ct({
|
|
333
347
|
placement: r ? "floating" : "inline"
|
|
334
348
|
}),
|
|
335
349
|
children: [
|
|
336
|
-
e.map((
|
|
337
|
-
const
|
|
338
|
-
if (
|
|
350
|
+
e.map((o) => {
|
|
351
|
+
const m = o.boolean, f = a[o.key] ?? [], x = f.length > 0;
|
|
352
|
+
if (m)
|
|
339
353
|
return /* @__PURE__ */ t(
|
|
340
354
|
"button",
|
|
341
355
|
{
|
|
342
356
|
type: "button",
|
|
343
357
|
"aria-pressed": x,
|
|
344
|
-
"aria-label":
|
|
345
|
-
onClick: () => o
|
|
346
|
-
className:
|
|
358
|
+
"aria-label": o.label,
|
|
359
|
+
onClick: () => l(o.key),
|
|
360
|
+
className: te({
|
|
347
361
|
state: x ? "active" : "idle"
|
|
348
362
|
}),
|
|
349
|
-
children: /* @__PURE__ */ t("span", { children:
|
|
363
|
+
children: /* @__PURE__ */ t("span", { children: o.label })
|
|
350
364
|
},
|
|
351
|
-
|
|
365
|
+
o.key
|
|
352
366
|
);
|
|
353
|
-
const
|
|
354
|
-
return /* @__PURE__ */
|
|
355
|
-
/* @__PURE__ */ t($.Trigger, { asChild: !0, children: /* @__PURE__ */
|
|
367
|
+
const b = x ? ` (${f.length})` : "";
|
|
368
|
+
return /* @__PURE__ */ p($.Root, { children: [
|
|
369
|
+
/* @__PURE__ */ t($.Trigger, { asChild: !0, children: /* @__PURE__ */ p(
|
|
356
370
|
"button",
|
|
357
371
|
{
|
|
358
372
|
type: "button",
|
|
359
|
-
"aria-label": `${
|
|
360
|
-
className:
|
|
373
|
+
"aria-label": `${o.label}${b}`,
|
|
374
|
+
className: te({
|
|
361
375
|
state: x ? "active" : "idle"
|
|
362
376
|
}),
|
|
363
377
|
children: [
|
|
364
|
-
/* @__PURE__ */
|
|
365
|
-
|
|
366
|
-
|
|
378
|
+
/* @__PURE__ */ p("span", { children: [
|
|
379
|
+
o.label,
|
|
380
|
+
b
|
|
367
381
|
] }),
|
|
368
382
|
/* @__PURE__ */ t(
|
|
369
|
-
|
|
383
|
+
Me,
|
|
370
384
|
{
|
|
371
385
|
"aria-hidden": "true",
|
|
372
386
|
className: "ds:size-3.5 ds:shrink-0"
|
|
@@ -375,27 +389,27 @@ function ze({
|
|
|
375
389
|
]
|
|
376
390
|
}
|
|
377
391
|
) }),
|
|
378
|
-
/* @__PURE__ */ t($.Content, { sideOffset: 8, align: "start", children:
|
|
392
|
+
/* @__PURE__ */ t($.Content, { sideOffset: 8, align: "start", children: o.options.map((y) => /* @__PURE__ */ t(
|
|
379
393
|
$.CheckboxItem,
|
|
380
394
|
{
|
|
381
|
-
checked:
|
|
382
|
-
onSelect: (
|
|
383
|
-
|
|
395
|
+
checked: f.includes(y.value),
|
|
396
|
+
onSelect: (h) => {
|
|
397
|
+
o.multi && h.preventDefault(), u(o, y.value);
|
|
384
398
|
},
|
|
385
|
-
children:
|
|
399
|
+
children: y.label
|
|
386
400
|
},
|
|
387
|
-
|
|
401
|
+
y.value
|
|
388
402
|
)) })
|
|
389
|
-
] },
|
|
403
|
+
] }, o.key);
|
|
390
404
|
}),
|
|
391
405
|
c ? /* @__PURE__ */ t(
|
|
392
406
|
"button",
|
|
393
407
|
{
|
|
394
408
|
type: "button",
|
|
395
409
|
onClick: () => {
|
|
396
|
-
s({}),
|
|
410
|
+
s({}), F("serp_filter_changed", { key: "*", values: [] });
|
|
397
411
|
},
|
|
398
|
-
className:
|
|
412
|
+
className: Rt(),
|
|
399
413
|
children: i("practiceResults.filters.clear")
|
|
400
414
|
}
|
|
401
415
|
) : null
|
|
@@ -403,7 +417,7 @@ function ze({
|
|
|
403
417
|
}
|
|
404
418
|
);
|
|
405
419
|
}
|
|
406
|
-
function
|
|
420
|
+
function ue({ value: e, onChange: n }) {
|
|
407
421
|
const { t: s } = C(), r = (i) => {
|
|
408
422
|
switch (i) {
|
|
409
423
|
case "distance":
|
|
@@ -417,20 +431,20 @@ function de({ value: e, onChange: n }) {
|
|
|
417
431
|
return s("practiceResults.sort.relevance");
|
|
418
432
|
}
|
|
419
433
|
};
|
|
420
|
-
return /* @__PURE__ */
|
|
421
|
-
/* @__PURE__ */ t($.Trigger, { asChild: !0, children: /* @__PURE__ */
|
|
434
|
+
return /* @__PURE__ */ p($.Root, { children: [
|
|
435
|
+
/* @__PURE__ */ t($.Trigger, { asChild: !0, children: /* @__PURE__ */ p(
|
|
422
436
|
"button",
|
|
423
437
|
{
|
|
424
438
|
type: "button",
|
|
425
439
|
"aria-label": `${s("practiceResults.sort.label")}: ${r(e)}`,
|
|
426
|
-
className:
|
|
440
|
+
className: te({ state: "idle" }),
|
|
427
441
|
children: [
|
|
428
|
-
/* @__PURE__ */
|
|
442
|
+
/* @__PURE__ */ p("span", { children: [
|
|
429
443
|
s("practiceResults.sort.label"),
|
|
430
444
|
": ",
|
|
431
445
|
r(e)
|
|
432
446
|
] }),
|
|
433
|
-
/* @__PURE__ */ t(
|
|
447
|
+
/* @__PURE__ */ t(Me, { "aria-hidden": "true", className: "ds:size-3.5 ds:shrink-0" })
|
|
434
448
|
]
|
|
435
449
|
}
|
|
436
450
|
) }),
|
|
@@ -440,24 +454,24 @@ function de({ value: e, onChange: n }) {
|
|
|
440
454
|
value: e,
|
|
441
455
|
onValueChange: (i) => {
|
|
442
456
|
const a = i;
|
|
443
|
-
a !== e && (n(a),
|
|
457
|
+
a !== e && (n(a), F("serp_sort_changed", { sort: a }));
|
|
444
458
|
},
|
|
445
|
-
children:
|
|
459
|
+
children: vt.map((i) => /* @__PURE__ */ t($.RadioItem, { value: i, children: r(i) }, i))
|
|
446
460
|
}
|
|
447
461
|
) })
|
|
448
462
|
] });
|
|
449
463
|
}
|
|
450
|
-
function
|
|
451
|
-
const { t: n, i18n: s } = C(), r =
|
|
464
|
+
function ze({ distanceKm: e }) {
|
|
465
|
+
const { t: n, i18n: s } = C(), r = O(() => {
|
|
452
466
|
if (e < 1) return n("practiceResults.distance.below");
|
|
453
467
|
const i = new Intl.NumberFormat(s.language, {
|
|
454
468
|
maximumFractionDigits: 1
|
|
455
469
|
}).format(e);
|
|
456
470
|
return n("practiceResults.distance.km", { distance: i });
|
|
457
471
|
}, [e, n, s.language]);
|
|
458
|
-
return /* @__PURE__ */ t(
|
|
472
|
+
return /* @__PURE__ */ t(D, { variant: "neutral", leading: /* @__PURE__ */ t(ne, { "aria-hidden": "true" }), children: r });
|
|
459
473
|
}
|
|
460
|
-
const
|
|
474
|
+
const Ce = j(
|
|
461
475
|
[
|
|
462
476
|
"ds:inline-size-[12rem] ds:block-size-[8rem] ds:shrink-0",
|
|
463
477
|
"ds:rounded-[var(--radius-md)] ds:overflow-hidden"
|
|
@@ -476,12 +490,12 @@ const we = Z(
|
|
|
476
490
|
defaultVariants: { state: "placeholder" }
|
|
477
491
|
}
|
|
478
492
|
);
|
|
479
|
-
function
|
|
493
|
+
function St() {
|
|
480
494
|
if (typeof document > "u") return "4945a3";
|
|
481
495
|
const e = getComputedStyle(document.documentElement).getPropertyValue("--map-marker-color").trim(), n = /^#?([0-9a-fA-F]{6})$/.exec(e);
|
|
482
496
|
return n ? n[1] : "4945a3";
|
|
483
497
|
}
|
|
484
|
-
function
|
|
498
|
+
function Nt({
|
|
485
499
|
apiKey: e,
|
|
486
500
|
center: n,
|
|
487
501
|
zoom: s = 14,
|
|
@@ -489,18 +503,18 @@ function vt({
|
|
|
489
503
|
}) {
|
|
490
504
|
const { t: i } = C();
|
|
491
505
|
if (!e)
|
|
492
|
-
return /* @__PURE__ */
|
|
506
|
+
return /* @__PURE__ */ p(
|
|
493
507
|
"div",
|
|
494
508
|
{
|
|
495
509
|
"aria-hidden": r ? void 0 : "true",
|
|
496
|
-
className:
|
|
510
|
+
className: Ce({ state: "placeholder" }),
|
|
497
511
|
children: [
|
|
498
|
-
/* @__PURE__ */ t(
|
|
512
|
+
/* @__PURE__ */ t(ne, { "aria-hidden": "true", className: "ds:size-5 ds:shrink-0" }),
|
|
499
513
|
r ? /* @__PURE__ */ t("span", { className: "type-meta ds:[overflow-wrap:anywhere]", children: r }) : null
|
|
500
514
|
]
|
|
501
515
|
}
|
|
502
516
|
);
|
|
503
|
-
const a =
|
|
517
|
+
const a = St(), c = `https://maps.googleapis.com/maps/api/staticmap?center=${n.lat},${n.lng}&zoom=${s}&size=240x160&scale=2&markers=color:0x${a}%7C${n.lat},${n.lng}&key=${encodeURIComponent(e)}`;
|
|
504
518
|
return /* @__PURE__ */ t(
|
|
505
519
|
"img",
|
|
506
520
|
{
|
|
@@ -510,11 +524,112 @@ function vt({
|
|
|
510
524
|
decoding: "async",
|
|
511
525
|
width: 240,
|
|
512
526
|
height: 160,
|
|
513
|
-
className:
|
|
527
|
+
className: Ce({ state: "image" })
|
|
514
528
|
}
|
|
515
529
|
);
|
|
516
530
|
}
|
|
517
|
-
|
|
531
|
+
function Fe({ tagline: e }) {
|
|
532
|
+
return e ? /* @__PURE__ */ t(
|
|
533
|
+
"span",
|
|
534
|
+
{
|
|
535
|
+
"data-component": "practice-result-tagline",
|
|
536
|
+
className: "type-body-sm ds:font-[var(--font-weight-medium)] ds:text-[var(--foreground)]",
|
|
537
|
+
children: e
|
|
538
|
+
}
|
|
539
|
+
) : null;
|
|
540
|
+
}
|
|
541
|
+
const Mt = j(
|
|
542
|
+
"type-body-sm ds:m-0 ds:text-[var(--muted-foreground)] ds:whitespace-pre-line ds:break-words",
|
|
543
|
+
{
|
|
544
|
+
variants: {
|
|
545
|
+
density: {
|
|
546
|
+
compact: "ds:line-clamp-2",
|
|
547
|
+
rich: "ds:line-clamp-3"
|
|
548
|
+
}
|
|
549
|
+
},
|
|
550
|
+
defaultVariants: { density: "compact" }
|
|
551
|
+
}
|
|
552
|
+
);
|
|
553
|
+
function He({
|
|
554
|
+
description: e,
|
|
555
|
+
density: n
|
|
556
|
+
}) {
|
|
557
|
+
return e ? /* @__PURE__ */ t(
|
|
558
|
+
"p",
|
|
559
|
+
{
|
|
560
|
+
"data-component": "practice-result-description",
|
|
561
|
+
className: Mt({ density: n }),
|
|
562
|
+
children: e
|
|
563
|
+
}
|
|
564
|
+
) : null;
|
|
565
|
+
}
|
|
566
|
+
function Be({ time: e }) {
|
|
567
|
+
const { t: n } = C();
|
|
568
|
+
return /* @__PURE__ */ p("span", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
569
|
+
/* @__PURE__ */ t(
|
|
570
|
+
dt,
|
|
571
|
+
{
|
|
572
|
+
"aria-hidden": "true",
|
|
573
|
+
className: "ds:size-4 ds:text-[var(--primary)]"
|
|
574
|
+
}
|
|
575
|
+
),
|
|
576
|
+
n("practiceResults.nextSlot.summary", { time: e })
|
|
577
|
+
] });
|
|
578
|
+
}
|
|
579
|
+
function $e({
|
|
580
|
+
result: e,
|
|
581
|
+
openLabel: n,
|
|
582
|
+
bookLabel: s,
|
|
583
|
+
nextSlotText: r,
|
|
584
|
+
onOpenClick: i,
|
|
585
|
+
onBookClick: a
|
|
586
|
+
}) {
|
|
587
|
+
const { t: c } = C(), d = e.nextAvailableSlot, l = (d == null ? void 0 : d.bookingHref) ?? e.bookingHref ?? e.href, u = d && r ? c("practiceResults.nextSlot.cta", { time: r }) : s;
|
|
588
|
+
return /* @__PURE__ */ p("div", { className: "ds:mt-[var(--spacing-xs)] ds:flex ds:flex-wrap ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)]", children: [
|
|
589
|
+
/* @__PURE__ */ t(
|
|
590
|
+
ee,
|
|
591
|
+
{
|
|
592
|
+
intent: "secondary",
|
|
593
|
+
size: "sm",
|
|
594
|
+
asChild: !0,
|
|
595
|
+
onClick: (o) => {
|
|
596
|
+
o.stopPropagation(), i();
|
|
597
|
+
},
|
|
598
|
+
children: /* @__PURE__ */ p("a", { href: e.href, "data-component": "practice-result-open-cta", children: [
|
|
599
|
+
n,
|
|
600
|
+
" ",
|
|
601
|
+
/* @__PURE__ */ t("span", { className: "ds:sr-only", children: e.name })
|
|
602
|
+
] })
|
|
603
|
+
}
|
|
604
|
+
),
|
|
605
|
+
/* @__PURE__ */ t(
|
|
606
|
+
ee,
|
|
607
|
+
{
|
|
608
|
+
intent: "primary",
|
|
609
|
+
size: "sm",
|
|
610
|
+
asChild: !0,
|
|
611
|
+
startIcon: /* @__PURE__ */ t(pt, { "aria-hidden": "true" }),
|
|
612
|
+
onClick: (o) => {
|
|
613
|
+
o.stopPropagation(), a();
|
|
614
|
+
},
|
|
615
|
+
children: /* @__PURE__ */ p(
|
|
616
|
+
"a",
|
|
617
|
+
{
|
|
618
|
+
href: l,
|
|
619
|
+
"data-component": "practice-result-book-cta",
|
|
620
|
+
"data-slot-aware": d ? "true" : void 0,
|
|
621
|
+
children: [
|
|
622
|
+
u,
|
|
623
|
+
" ",
|
|
624
|
+
/* @__PURE__ */ t("span", { className: "ds:sr-only", children: e.name })
|
|
625
|
+
]
|
|
626
|
+
}
|
|
627
|
+
)
|
|
628
|
+
}
|
|
629
|
+
)
|
|
630
|
+
] });
|
|
631
|
+
}
|
|
632
|
+
const De = j(
|
|
518
633
|
[
|
|
519
634
|
"ds:relative ds:flex ds:w-full ds:cursor-pointer",
|
|
520
635
|
"ds:rounded-[var(--radius-lg)]",
|
|
@@ -543,7 +658,7 @@ const Fe = Z(
|
|
|
543
658
|
defaultVariants: { density: "compact" }
|
|
544
659
|
}
|
|
545
660
|
);
|
|
546
|
-
function
|
|
661
|
+
function Pt({
|
|
547
662
|
result: e,
|
|
548
663
|
highlighted: n,
|
|
549
664
|
onSelect: s,
|
|
@@ -551,16 +666,18 @@ function bt({
|
|
|
551
666
|
onHover: i,
|
|
552
667
|
density: a = "compact",
|
|
553
668
|
openLabel: c,
|
|
554
|
-
|
|
669
|
+
bookLabel: d,
|
|
670
|
+
onBookClick: l,
|
|
671
|
+
nextSlotText: u,
|
|
555
672
|
maxInsuranceChips: o = 3,
|
|
556
|
-
maxLanguageChips:
|
|
557
|
-
children:
|
|
673
|
+
maxLanguageChips: m = 4,
|
|
674
|
+
children: f
|
|
558
675
|
}) {
|
|
559
|
-
var
|
|
560
|
-
const { t:
|
|
676
|
+
var q, U, G, H, K, Z;
|
|
677
|
+
const { t: x, i18n: b } = C(), y = e.rating, h = (q = e.location) == null ? void 0 : q.distanceKm, g = (((U = e.languages) == null ? void 0 : U.length) ?? 0) > 0, R = (((G = e.insurances) == null ? void 0 : G.length) ?? 0) > 0, M = e.specializedInFearPatients, S = g || R || M, w = (e.languages ?? []).slice(0, m), I = (((H = e.languages) == null ? void 0 : H.length) ?? 0) - w.length, T = (e.insurances ?? []).slice(0, o), P = (((K = e.insurances) == null ? void 0 : K.length) ?? 0) - T.length;
|
|
561
678
|
return (
|
|
562
679
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events -- card is role="group" by design (axe nested-interactive); click handler is mouse-only sync.
|
|
563
|
-
/* @__PURE__ */
|
|
680
|
+
/* @__PURE__ */ p(
|
|
564
681
|
"div",
|
|
565
682
|
{
|
|
566
683
|
"data-component": "practice-result-card",
|
|
@@ -571,12 +688,12 @@ function bt({
|
|
|
571
688
|
onClick: s,
|
|
572
689
|
onMouseEnter: i,
|
|
573
690
|
onFocus: i,
|
|
574
|
-
className:
|
|
691
|
+
className: De({ density: a }),
|
|
575
692
|
children: [
|
|
576
|
-
/* @__PURE__ */ t(
|
|
577
|
-
/* @__PURE__ */
|
|
578
|
-
/* @__PURE__ */
|
|
579
|
-
/* @__PURE__ */
|
|
693
|
+
/* @__PURE__ */ t(Re, { src: e.imageUrl, name: e.name, size: "lg" }),
|
|
694
|
+
/* @__PURE__ */ p("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
695
|
+
/* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
696
|
+
/* @__PURE__ */ p("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
580
697
|
/* @__PURE__ */ t(
|
|
581
698
|
"span",
|
|
582
699
|
{
|
|
@@ -585,106 +702,79 @@ function bt({
|
|
|
585
702
|
children: e.name
|
|
586
703
|
}
|
|
587
704
|
),
|
|
588
|
-
|
|
705
|
+
h != null ? /* @__PURE__ */ t(ze, { distanceKm: h }) : null
|
|
589
706
|
] }),
|
|
590
707
|
e.subtitle ? /* @__PURE__ */ t("span", { className: "type-body-sm ds:text-[var(--muted-foreground)]", children: e.subtitle }) : null,
|
|
591
|
-
|
|
592
|
-
|
|
708
|
+
/* @__PURE__ */ t(Fe, { tagline: e.tagline }),
|
|
709
|
+
(Z = e.location) != null && Z.address ? /* @__PURE__ */ p("span", { className: "type-meta ds:text-[var(--muted-foreground)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
|
|
710
|
+
/* @__PURE__ */ t(ne, { "aria-hidden": "true", className: "ds:size-3.5 ds:shrink-0" }),
|
|
593
711
|
e.location.address
|
|
594
712
|
] }) : null
|
|
595
713
|
] }),
|
|
596
|
-
|
|
597
|
-
|
|
714
|
+
y && y.count > 0 ? /* @__PURE__ */ t(
|
|
715
|
+
Se,
|
|
598
716
|
{
|
|
599
|
-
value:
|
|
600
|
-
reviews: { count:
|
|
717
|
+
value: y.value,
|
|
718
|
+
reviews: { count: y.count },
|
|
601
719
|
size: "sm"
|
|
602
720
|
}
|
|
603
721
|
) : null,
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
722
|
+
S ? /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
723
|
+
w.map((k) => /* @__PURE__ */ t(
|
|
724
|
+
D,
|
|
607
725
|
{
|
|
608
726
|
variant: "neutral",
|
|
609
|
-
leading: /* @__PURE__ */ t(
|
|
610
|
-
children:
|
|
727
|
+
leading: /* @__PURE__ */ t(Pe, { "aria-hidden": "true" }),
|
|
728
|
+
children: Ie(k, x, b)
|
|
611
729
|
},
|
|
612
|
-
`lang-${
|
|
730
|
+
`lang-${k}`
|
|
613
731
|
)),
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
732
|
+
I > 0 ? /* @__PURE__ */ t(D, { variant: "neutral", children: `+${I}` }) : null,
|
|
733
|
+
T.map((k) => /* @__PURE__ */ t(
|
|
734
|
+
D,
|
|
617
735
|
{
|
|
618
736
|
variant: "info",
|
|
619
|
-
leading: /* @__PURE__ */ t(
|
|
620
|
-
children:
|
|
737
|
+
leading: /* @__PURE__ */ t(Ae, { "aria-hidden": "true" }),
|
|
738
|
+
children: k
|
|
621
739
|
},
|
|
622
|
-
`ins-${
|
|
740
|
+
`ins-${k}`
|
|
623
741
|
)),
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
] }) : null,
|
|
627
|
-
e.nextAvailableSlot && d ? /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
628
|
-
/* @__PURE__ */ m("span", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
629
|
-
/* @__PURE__ */ t(
|
|
630
|
-
Me,
|
|
631
|
-
{
|
|
632
|
-
"aria-hidden": "true",
|
|
633
|
-
className: "ds:size-4 ds:text-[var(--primary)]"
|
|
634
|
-
}
|
|
635
|
-
),
|
|
636
|
-
p("practiceResults.nextSlot.summary", { time: d })
|
|
637
|
-
] }),
|
|
638
|
-
/* @__PURE__ */ t(
|
|
639
|
-
G,
|
|
640
|
-
{
|
|
641
|
-
intent: "primary",
|
|
642
|
-
size: "sm",
|
|
643
|
-
asChild: !0,
|
|
644
|
-
onClick: (S) => {
|
|
645
|
-
S.stopPropagation();
|
|
646
|
-
},
|
|
647
|
-
children: /* @__PURE__ */ t(
|
|
648
|
-
"a",
|
|
649
|
-
{
|
|
650
|
-
href: e.nextAvailableSlot.bookingHref,
|
|
651
|
-
"data-component": "practice-result-next-slot-cta",
|
|
652
|
-
children: p("practiceResults.nextSlot.cta", { time: d })
|
|
653
|
-
}
|
|
654
|
-
)
|
|
655
|
-
}
|
|
656
|
-
)
|
|
742
|
+
P > 0 ? /* @__PURE__ */ t(D, { variant: "neutral", children: `+${P}` }) : null,
|
|
743
|
+
M ? /* @__PURE__ */ t(D, { variant: "info", leading: /* @__PURE__ */ t(_e, { "aria-hidden": "true" }), children: x("practiceResults.fearPatient.label") }) : null
|
|
657
744
|
] }) : null,
|
|
658
|
-
|
|
659
|
-
/* @__PURE__ */ t(
|
|
660
|
-
|
|
745
|
+
/* @__PURE__ */ t(He, { description: e.description, density: "compact" }),
|
|
746
|
+
e.nextAvailableSlot && u ? /* @__PURE__ */ t(Be, { time: u }) : null,
|
|
747
|
+
f,
|
|
748
|
+
/* @__PURE__ */ t(
|
|
749
|
+
$e,
|
|
661
750
|
{
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
children: /* @__PURE__ */ t("a", { href: e.href, "data-component": "practice-result-open-cta", children: c })
|
|
751
|
+
result: e,
|
|
752
|
+
openLabel: c,
|
|
753
|
+
bookLabel: d,
|
|
754
|
+
nextSlotText: u,
|
|
755
|
+
onOpenClick: r,
|
|
756
|
+
onBookClick: l
|
|
669
757
|
}
|
|
670
|
-
)
|
|
758
|
+
)
|
|
671
759
|
] })
|
|
672
760
|
]
|
|
673
761
|
}
|
|
674
762
|
)
|
|
675
763
|
);
|
|
676
764
|
}
|
|
677
|
-
function
|
|
765
|
+
function At({
|
|
678
766
|
result: e,
|
|
679
767
|
apiKey: n,
|
|
680
768
|
highlighted: s,
|
|
681
769
|
onSelect: r,
|
|
682
770
|
onOpenClick: i,
|
|
683
|
-
|
|
684
|
-
|
|
771
|
+
onBookClick: a,
|
|
772
|
+
onHover: c,
|
|
773
|
+
openLabel: d,
|
|
774
|
+
bookLabel: l
|
|
685
775
|
}) {
|
|
686
|
-
var
|
|
687
|
-
const { t:
|
|
776
|
+
var g, R, M, S;
|
|
777
|
+
const { t: u, i18n: o } = C(), m = O(() => {
|
|
688
778
|
if (e.nextAvailableSlot)
|
|
689
779
|
try {
|
|
690
780
|
return new Intl.DateTimeFormat(o.language, {
|
|
@@ -695,10 +785,10 @@ function xt({
|
|
|
695
785
|
} catch {
|
|
696
786
|
return e.nextAvailableSlot.dateTime;
|
|
697
787
|
}
|
|
698
|
-
}, [e.nextAvailableSlot, o.language]),
|
|
788
|
+
}, [e.nextAvailableSlot, o.language]), f = (((g = e.languages) == null ? void 0 : g.length) ?? 0) > 0, x = (((R = e.insurances) == null ? void 0 : R.length) ?? 0) > 0, b = e.specializedInFearPatients, y = f || x || b, h = (M = e.location) == null ? void 0 : M.distanceKm;
|
|
699
789
|
return (
|
|
700
790
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions, jsx-a11y/click-events-have-key-events -- card is role="group" by design (axe nested-interactive); click handler is mouse-only sync.
|
|
701
|
-
/* @__PURE__ */
|
|
791
|
+
/* @__PURE__ */ p(
|
|
702
792
|
"div",
|
|
703
793
|
{
|
|
704
794
|
"data-component": "practice-result-card",
|
|
@@ -708,12 +798,12 @@ function xt({
|
|
|
708
798
|
role: "group",
|
|
709
799
|
"aria-labelledby": `practice-result-${e.id}-name`,
|
|
710
800
|
onClick: r,
|
|
711
|
-
onMouseEnter:
|
|
712
|
-
onFocus:
|
|
713
|
-
className:
|
|
801
|
+
onMouseEnter: c,
|
|
802
|
+
onFocus: c,
|
|
803
|
+
className: De({ density: "rich" }),
|
|
714
804
|
children: [
|
|
715
805
|
e.location ? /* @__PURE__ */ t(
|
|
716
|
-
|
|
806
|
+
Nt,
|
|
717
807
|
{
|
|
718
808
|
apiKey: n,
|
|
719
809
|
center: {
|
|
@@ -723,11 +813,11 @@ function xt({
|
|
|
723
813
|
address: e.location.address
|
|
724
814
|
}
|
|
725
815
|
) : null,
|
|
726
|
-
/* @__PURE__ */
|
|
727
|
-
/* @__PURE__ */
|
|
728
|
-
/* @__PURE__ */ t(
|
|
729
|
-
/* @__PURE__ */
|
|
730
|
-
/* @__PURE__ */
|
|
816
|
+
/* @__PURE__ */ p("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
817
|
+
/* @__PURE__ */ p("div", { className: "ds:flex ds:items-start ds:gap-[var(--spacing-md)]", children: [
|
|
818
|
+
/* @__PURE__ */ t(Re, { src: e.imageUrl, name: e.name, size: "md" }),
|
|
819
|
+
/* @__PURE__ */ p("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
820
|
+
/* @__PURE__ */ p("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
731
821
|
/* @__PURE__ */ t(
|
|
732
822
|
"span",
|
|
733
823
|
{
|
|
@@ -736,12 +826,13 @@ function xt({
|
|
|
736
826
|
children: e.name
|
|
737
827
|
}
|
|
738
828
|
),
|
|
739
|
-
|
|
829
|
+
h != null ? /* @__PURE__ */ t(ze, { distanceKm: h }) : null
|
|
740
830
|
] }),
|
|
741
831
|
e.subtitle ? /* @__PURE__ */ t("span", { className: "type-body-sm ds:text-[var(--muted-foreground)]", children: e.subtitle }) : null,
|
|
742
|
-
|
|
832
|
+
/* @__PURE__ */ t(Fe, { tagline: e.tagline }),
|
|
833
|
+
(S = e.location) != null && S.address ? /* @__PURE__ */ p("span", { className: "type-meta ds:text-[var(--muted-foreground)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
|
|
743
834
|
/* @__PURE__ */ t(
|
|
744
|
-
|
|
835
|
+
ne,
|
|
745
836
|
{
|
|
746
837
|
"aria-hidden": "true",
|
|
747
838
|
className: "ds:size-3.5 ds:shrink-0"
|
|
@@ -751,7 +842,7 @@ function xt({
|
|
|
751
842
|
] }) : null
|
|
752
843
|
] }),
|
|
753
844
|
e.rating && e.rating.count > 0 ? /* @__PURE__ */ t(
|
|
754
|
-
|
|
845
|
+
Se,
|
|
755
846
|
{
|
|
756
847
|
value: e.rating.value,
|
|
757
848
|
reviews: { count: e.rating.count },
|
|
@@ -759,168 +850,144 @@ function xt({
|
|
|
759
850
|
}
|
|
760
851
|
) : null
|
|
761
852
|
] }),
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
853
|
+
y ? /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
854
|
+
f ? (e.languages ?? []).map((w) => /* @__PURE__ */ t(
|
|
855
|
+
D,
|
|
765
856
|
{
|
|
766
857
|
variant: "neutral",
|
|
767
|
-
leading: /* @__PURE__ */ t(
|
|
768
|
-
children:
|
|
858
|
+
leading: /* @__PURE__ */ t(Pe, { "aria-hidden": "true" }),
|
|
859
|
+
children: Ie(w, u, o)
|
|
769
860
|
},
|
|
770
|
-
`lang-${
|
|
861
|
+
`lang-${w}`
|
|
771
862
|
)) : null,
|
|
772
|
-
|
|
773
|
-
|
|
863
|
+
x ? (e.insurances ?? []).map((w) => /* @__PURE__ */ t(
|
|
864
|
+
D,
|
|
774
865
|
{
|
|
775
866
|
variant: "info",
|
|
776
|
-
leading: /* @__PURE__ */ t(
|
|
777
|
-
children:
|
|
867
|
+
leading: /* @__PURE__ */ t(Ae, { "aria-hidden": "true" }),
|
|
868
|
+
children: w
|
|
778
869
|
},
|
|
779
|
-
`ins-${
|
|
870
|
+
`ins-${w}`
|
|
780
871
|
)) : null,
|
|
781
|
-
|
|
782
|
-
] }) : null,
|
|
783
|
-
e.nextAvailableSlot && g ? /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
784
|
-
/* @__PURE__ */ m("span", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
785
|
-
/* @__PURE__ */ t(
|
|
786
|
-
Me,
|
|
787
|
-
{
|
|
788
|
-
"aria-hidden": "true",
|
|
789
|
-
className: "ds:size-4 ds:text-[var(--primary)]"
|
|
790
|
-
}
|
|
791
|
-
),
|
|
792
|
-
d("practiceResults.nextSlot.summary", { time: g })
|
|
793
|
-
] }),
|
|
794
|
-
/* @__PURE__ */ t(
|
|
795
|
-
G,
|
|
796
|
-
{
|
|
797
|
-
intent: "primary",
|
|
798
|
-
size: "sm",
|
|
799
|
-
asChild: !0,
|
|
800
|
-
onClick: (R) => {
|
|
801
|
-
R.stopPropagation();
|
|
802
|
-
},
|
|
803
|
-
children: /* @__PURE__ */ t(
|
|
804
|
-
"a",
|
|
805
|
-
{
|
|
806
|
-
href: e.nextAvailableSlot.bookingHref,
|
|
807
|
-
"data-component": "practice-result-next-slot-cta",
|
|
808
|
-
children: d("practiceResults.nextSlot.cta", { time: g })
|
|
809
|
-
}
|
|
810
|
-
)
|
|
811
|
-
}
|
|
812
|
-
)
|
|
872
|
+
b ? /* @__PURE__ */ t(D, { variant: "info", leading: /* @__PURE__ */ t(_e, { "aria-hidden": "true" }), children: u("practiceResults.fearPatient.label") }) : null
|
|
813
873
|
] }) : null,
|
|
814
|
-
/* @__PURE__ */ t(
|
|
815
|
-
|
|
874
|
+
/* @__PURE__ */ t(He, { description: e.description, density: "rich" }),
|
|
875
|
+
e.nextAvailableSlot && m ? /* @__PURE__ */ t(Be, { time: m }) : null,
|
|
876
|
+
/* @__PURE__ */ t(
|
|
877
|
+
$e,
|
|
816
878
|
{
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
children: /* @__PURE__ */ t("a", { href: e.href, "data-component": "practice-result-open-cta", children: c })
|
|
879
|
+
result: e,
|
|
880
|
+
openLabel: d,
|
|
881
|
+
bookLabel: l,
|
|
882
|
+
nextSlotText: m,
|
|
883
|
+
onOpenClick: i,
|
|
884
|
+
onBookClick: a
|
|
824
885
|
}
|
|
825
|
-
)
|
|
886
|
+
)
|
|
826
887
|
] })
|
|
827
888
|
]
|
|
828
889
|
}
|
|
829
890
|
)
|
|
830
891
|
);
|
|
831
892
|
}
|
|
832
|
-
function
|
|
893
|
+
function fe({
|
|
833
894
|
results: e,
|
|
834
895
|
highlightedId: n,
|
|
835
896
|
onCardHover: s,
|
|
836
897
|
onCardSelect: r,
|
|
837
898
|
onCardOpenClick: i,
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
899
|
+
onCardBookClick: a,
|
|
900
|
+
openLabel: c,
|
|
901
|
+
bookLabel: d,
|
|
902
|
+
formatNextSlot: l,
|
|
903
|
+
onLoadMore: u,
|
|
841
904
|
loadingMore: o,
|
|
842
|
-
loadingSkeletons:
|
|
843
|
-
density:
|
|
844
|
-
apiKey:
|
|
845
|
-
containerRef:
|
|
905
|
+
loadingSkeletons: m,
|
|
906
|
+
density: f = "compact",
|
|
907
|
+
apiKey: x,
|
|
908
|
+
containerRef: b
|
|
846
909
|
}) {
|
|
847
|
-
const { t:
|
|
848
|
-
return
|
|
849
|
-
if (!
|
|
850
|
-
const
|
|
851
|
-
if (!
|
|
852
|
-
const
|
|
853
|
-
(
|
|
854
|
-
for (const
|
|
855
|
-
|
|
910
|
+
const { t: y } = C(), h = A(null);
|
|
911
|
+
return W(() => {
|
|
912
|
+
if (!u) return;
|
|
913
|
+
const g = h.current;
|
|
914
|
+
if (!g || typeof IntersectionObserver > "u") return;
|
|
915
|
+
const R = new IntersectionObserver(
|
|
916
|
+
(M) => {
|
|
917
|
+
for (const S of M)
|
|
918
|
+
S.isIntersecting && (F("serp_load_more", {
|
|
856
919
|
currentCount: e.length
|
|
857
|
-
}),
|
|
920
|
+
}), u());
|
|
858
921
|
},
|
|
859
922
|
{ root: null, rootMargin: "200px" }
|
|
860
923
|
);
|
|
861
|
-
return
|
|
862
|
-
}, [
|
|
924
|
+
return R.observe(g), () => R.disconnect();
|
|
925
|
+
}, [u, e.length]), m ? /* @__PURE__ */ t(
|
|
863
926
|
"div",
|
|
864
927
|
{
|
|
865
928
|
role: "status",
|
|
866
929
|
"aria-live": "polite",
|
|
867
|
-
"aria-label":
|
|
930
|
+
"aria-label": y("practiceResults.loading"),
|
|
868
931
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
869
|
-
children: Array.from({ length: 4 }).map((
|
|
870
|
-
|
|
932
|
+
children: Array.from({ length: 4 }).map((g, R) => /* @__PURE__ */ t(
|
|
933
|
+
it,
|
|
871
934
|
{
|
|
872
935
|
variant: "rounded",
|
|
873
|
-
height:
|
|
936
|
+
height: f === "rich" ? "11rem" : "7rem"
|
|
874
937
|
},
|
|
875
|
-
`pr-skel-${
|
|
938
|
+
`pr-skel-${R}`
|
|
876
939
|
))
|
|
877
940
|
}
|
|
878
|
-
) : /* @__PURE__ */
|
|
941
|
+
) : /* @__PURE__ */ p(
|
|
879
942
|
"div",
|
|
880
943
|
{
|
|
881
|
-
ref:
|
|
944
|
+
ref: b,
|
|
882
945
|
"data-component": "practice-results-list",
|
|
883
946
|
role: "list",
|
|
884
|
-
"aria-label":
|
|
947
|
+
"aria-label": y("practiceResults.list.label"),
|
|
885
948
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:overflow-y-auto",
|
|
886
949
|
children: [
|
|
887
|
-
e.map((
|
|
888
|
-
|
|
950
|
+
e.map((g) => /* @__PURE__ */ t("div", { role: "listitem", children: f === "rich" ? /* @__PURE__ */ t(
|
|
951
|
+
At,
|
|
889
952
|
{
|
|
890
|
-
result:
|
|
891
|
-
apiKey:
|
|
892
|
-
highlighted: n ===
|
|
893
|
-
onSelect: () => r(
|
|
894
|
-
onOpenClick: () => i(
|
|
895
|
-
|
|
896
|
-
|
|
953
|
+
result: g,
|
|
954
|
+
apiKey: x,
|
|
955
|
+
highlighted: n === g.id,
|
|
956
|
+
onSelect: () => r(g.id),
|
|
957
|
+
onOpenClick: () => i(g.id),
|
|
958
|
+
onBookClick: () => a(g.id),
|
|
959
|
+
onHover: () => s(g.id),
|
|
960
|
+
openLabel: c,
|
|
961
|
+
bookLabel: d
|
|
897
962
|
}
|
|
898
963
|
) : /* @__PURE__ */ t(
|
|
899
|
-
|
|
964
|
+
Pt,
|
|
900
965
|
{
|
|
901
|
-
result:
|
|
902
|
-
highlighted: n ===
|
|
903
|
-
onSelect: () => r(
|
|
904
|
-
onOpenClick: () => i(
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
966
|
+
result: g,
|
|
967
|
+
highlighted: n === g.id,
|
|
968
|
+
onSelect: () => r(g.id),
|
|
969
|
+
onOpenClick: () => i(g.id),
|
|
970
|
+
onBookClick: () => a(g.id),
|
|
971
|
+
onHover: () => s(g.id),
|
|
972
|
+
openLabel: c,
|
|
973
|
+
bookLabel: d,
|
|
974
|
+
nextSlotText: l(g)
|
|
908
975
|
}
|
|
909
|
-
) },
|
|
910
|
-
|
|
976
|
+
) }, g.id)),
|
|
977
|
+
u ? /* @__PURE__ */ t(
|
|
911
978
|
"div",
|
|
912
979
|
{
|
|
913
|
-
ref:
|
|
980
|
+
ref: h,
|
|
914
981
|
"aria-hidden": "true",
|
|
915
982
|
className: "ds:flex ds:items-center ds:justify-center ds:py-[var(--spacing-md)]",
|
|
916
|
-
children: o ? /* @__PURE__ */ t(
|
|
983
|
+
children: o ? /* @__PURE__ */ t(rt, { size: "md", variant: "pulse" }) : /* @__PURE__ */ t("span", { className: "ds:size-1" })
|
|
917
984
|
}
|
|
918
985
|
) : null
|
|
919
986
|
]
|
|
920
987
|
}
|
|
921
988
|
);
|
|
922
989
|
}
|
|
923
|
-
function
|
|
990
|
+
function pe({
|
|
924
991
|
results: e,
|
|
925
992
|
searchCentre: n,
|
|
926
993
|
zoom: s,
|
|
@@ -929,55 +996,55 @@ function ue({
|
|
|
929
996
|
highlightedId: a,
|
|
930
997
|
onPinClick: c,
|
|
931
998
|
onPinHover: d,
|
|
932
|
-
onPinFirstInteract:
|
|
933
|
-
onBoundsChange:
|
|
934
|
-
consentGranted:
|
|
935
|
-
onConsentRequest:
|
|
936
|
-
mapHandleRef:
|
|
999
|
+
onPinFirstInteract: l,
|
|
1000
|
+
onBoundsChange: u,
|
|
1001
|
+
consentGranted: o,
|
|
1002
|
+
onConsentRequest: m,
|
|
1003
|
+
mapHandleRef: f
|
|
937
1004
|
}) {
|
|
938
|
-
const { t: x } = C(),
|
|
1005
|
+
const { t: x } = C(), b = O(
|
|
939
1006
|
() => e.filter(
|
|
940
|
-
(
|
|
941
|
-
).map((
|
|
942
|
-
id:
|
|
1007
|
+
(h) => !!h.location
|
|
1008
|
+
).map((h) => ({
|
|
1009
|
+
id: h.id,
|
|
943
1010
|
position: {
|
|
944
|
-
lat:
|
|
945
|
-
lng:
|
|
1011
|
+
lat: h.location.lat,
|
|
1012
|
+
lng: h.location.lng
|
|
946
1013
|
},
|
|
947
|
-
label:
|
|
1014
|
+
label: h.name
|
|
948
1015
|
})),
|
|
949
1016
|
[e]
|
|
950
|
-
),
|
|
1017
|
+
), y = O(() => {
|
|
951
1018
|
if (n) return n;
|
|
952
|
-
const
|
|
953
|
-
return
|
|
954
|
-
lat: (
|
|
955
|
-
lng: (
|
|
1019
|
+
const h = we(e);
|
|
1020
|
+
return h ? {
|
|
1021
|
+
lat: (h.north + h.south) / 2,
|
|
1022
|
+
lng: (h.east + h.west) / 2
|
|
956
1023
|
} : { lat: 45.4642, lng: 9.19 };
|
|
957
1024
|
}, [e, n]);
|
|
958
|
-
return
|
|
959
|
-
if (!
|
|
960
|
-
const
|
|
961
|
-
|
|
962
|
-
}, [e,
|
|
1025
|
+
return W(() => {
|
|
1026
|
+
if (!u) return;
|
|
1027
|
+
const h = we(e);
|
|
1028
|
+
h && (u(h), F("serp_map_panned", { bounds: h }));
|
|
1029
|
+
}, [e, u]), /* @__PURE__ */ t(
|
|
963
1030
|
"div",
|
|
964
1031
|
{
|
|
965
1032
|
"data-component": "practice-results-map-panel",
|
|
966
1033
|
className: "ds:relative ds:flex ds:size-full ds:min-h-[24rem] ds:flex-col",
|
|
967
1034
|
children: /* @__PURE__ */ t(
|
|
968
|
-
|
|
1035
|
+
st,
|
|
969
1036
|
{
|
|
970
|
-
ref:
|
|
1037
|
+
ref: f,
|
|
971
1038
|
apiKey: r ?? "",
|
|
972
1039
|
mapId: i,
|
|
973
|
-
center:
|
|
1040
|
+
center: y,
|
|
974
1041
|
zoom: s,
|
|
975
|
-
markers:
|
|
1042
|
+
markers: b,
|
|
976
1043
|
selectedMarkerId: a,
|
|
977
|
-
consentGranted: !!
|
|
978
|
-
onConsentRequest:
|
|
979
|
-
onMarkerClick: (
|
|
980
|
-
|
|
1044
|
+
consentGranted: !!o,
|
|
1045
|
+
onConsentRequest: m,
|
|
1046
|
+
onMarkerClick: (h) => {
|
|
1047
|
+
h != null && (d(h), l(h), c(h));
|
|
981
1048
|
},
|
|
982
1049
|
ariaLabel: x("practiceResults.map.label"),
|
|
983
1050
|
size: "fill",
|
|
@@ -988,13 +1055,13 @@ function ue({
|
|
|
988
1055
|
}
|
|
989
1056
|
);
|
|
990
1057
|
}
|
|
991
|
-
function
|
|
1058
|
+
function he({
|
|
992
1059
|
variantBodyProps: e
|
|
993
1060
|
}) {
|
|
994
1061
|
const { facets: n, value: s, onChange: r, heading: i, intro: a, totalCount: c, searchCentre: d } = e;
|
|
995
|
-
return /* @__PURE__ */
|
|
1062
|
+
return /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
996
1063
|
/* @__PURE__ */ t(
|
|
997
|
-
|
|
1064
|
+
Te,
|
|
998
1065
|
{
|
|
999
1066
|
heading: i,
|
|
1000
1067
|
intro: a,
|
|
@@ -1002,35 +1069,35 @@ function fe({
|
|
|
1002
1069
|
searchCentreLabel: d == null ? void 0 : d.label
|
|
1003
1070
|
}
|
|
1004
1071
|
),
|
|
1005
|
-
n.length > 0 ? /* @__PURE__ */
|
|
1072
|
+
n.length > 0 ? /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
1006
1073
|
/* @__PURE__ */ t(
|
|
1007
|
-
|
|
1074
|
+
Le,
|
|
1008
1075
|
{
|
|
1009
1076
|
facets: n,
|
|
1010
1077
|
value: s.facets,
|
|
1011
|
-
onChange: (
|
|
1078
|
+
onChange: (l) => r({ ...s, facets: l })
|
|
1012
1079
|
}
|
|
1013
1080
|
),
|
|
1014
1081
|
/* @__PURE__ */ t(
|
|
1015
|
-
|
|
1082
|
+
ue,
|
|
1016
1083
|
{
|
|
1017
1084
|
value: s.sort ?? "relevance",
|
|
1018
|
-
onChange: (
|
|
1085
|
+
onChange: (l) => r({ ...s, sort: l })
|
|
1019
1086
|
}
|
|
1020
1087
|
)
|
|
1021
1088
|
] }) : /* @__PURE__ */ t("div", { className: "ds:flex ds:justify-end", children: /* @__PURE__ */ t(
|
|
1022
|
-
|
|
1089
|
+
ue,
|
|
1023
1090
|
{
|
|
1024
1091
|
value: s.sort ?? "relevance",
|
|
1025
|
-
onChange: (
|
|
1092
|
+
onChange: (l) => r({ ...s, sort: l })
|
|
1026
1093
|
}
|
|
1027
1094
|
) })
|
|
1028
1095
|
] });
|
|
1029
1096
|
}
|
|
1030
|
-
function
|
|
1097
|
+
function ge() {
|
|
1031
1098
|
const { t: e } = C();
|
|
1032
1099
|
return /* @__PURE__ */ t(
|
|
1033
|
-
|
|
1100
|
+
at,
|
|
1034
1101
|
{
|
|
1035
1102
|
variant: "no-results",
|
|
1036
1103
|
title: e("practiceResults.empty.title"),
|
|
@@ -1038,24 +1105,24 @@ function he() {
|
|
|
1038
1105
|
}
|
|
1039
1106
|
);
|
|
1040
1107
|
}
|
|
1041
|
-
function
|
|
1108
|
+
function ve({ onRetry: e }) {
|
|
1042
1109
|
const { t: n } = C();
|
|
1043
|
-
return /* @__PURE__ */
|
|
1110
|
+
return /* @__PURE__ */ p(Y, { variant: "error", children: [
|
|
1044
1111
|
/* @__PURE__ */ t(Y.Title, { as: "h3", children: n("practiceResults.error.title") }),
|
|
1045
1112
|
/* @__PURE__ */ t(Y.Description, { children: n("practiceResults.error.description") }),
|
|
1046
1113
|
e ? /* @__PURE__ */ t(Y.Action, { children: /* @__PURE__ */ t(
|
|
1047
|
-
|
|
1114
|
+
ee,
|
|
1048
1115
|
{
|
|
1049
1116
|
intent: "secondary",
|
|
1050
1117
|
size: "sm",
|
|
1051
|
-
startIcon: /* @__PURE__ */ t(
|
|
1118
|
+
startIcon: /* @__PURE__ */ t(ct, { "aria-hidden": "true" }),
|
|
1052
1119
|
onClick: e,
|
|
1053
1120
|
children: n("practiceResults.error.retry")
|
|
1054
1121
|
}
|
|
1055
1122
|
) }) : null
|
|
1056
1123
|
] });
|
|
1057
1124
|
}
|
|
1058
|
-
function
|
|
1125
|
+
function _t(e) {
|
|
1059
1126
|
const {
|
|
1060
1127
|
results: n,
|
|
1061
1128
|
apiKey: s,
|
|
@@ -1064,41 +1131,43 @@ function yt(e) {
|
|
|
1064
1131
|
searchCentre: a,
|
|
1065
1132
|
onLoadMore: c,
|
|
1066
1133
|
loadingMore: d,
|
|
1067
|
-
loadingSkeletons:
|
|
1068
|
-
emptyResultsSlot:
|
|
1069
|
-
errorSlot:
|
|
1070
|
-
error:
|
|
1071
|
-
onRetry:
|
|
1134
|
+
loadingSkeletons: l,
|
|
1135
|
+
emptyResultsSlot: u,
|
|
1136
|
+
errorSlot: o,
|
|
1137
|
+
error: m,
|
|
1138
|
+
onRetry: f,
|
|
1072
1139
|
highlightedId: x,
|
|
1073
|
-
onCardHover:
|
|
1074
|
-
onPinClick:
|
|
1075
|
-
consentGranted:
|
|
1076
|
-
onConsentRequest:
|
|
1077
|
-
onBoundsChange:
|
|
1078
|
-
listContainerRef:
|
|
1079
|
-
} = e, { t:
|
|
1080
|
-
|
|
1140
|
+
onCardHover: b,
|
|
1141
|
+
onPinClick: y,
|
|
1142
|
+
consentGranted: h,
|
|
1143
|
+
onConsentRequest: g,
|
|
1144
|
+
onBoundsChange: R,
|
|
1145
|
+
listContainerRef: M
|
|
1146
|
+
} = e, { t: S } = C(), [w, I] = me(!1), T = m ? o ?? /* @__PURE__ */ t(ve, { onRetry: f }) : n.length === 0 && !l ? u ?? /* @__PURE__ */ t(ge, {}) : /* @__PURE__ */ t(
|
|
1147
|
+
fe,
|
|
1081
1148
|
{
|
|
1082
1149
|
results: n,
|
|
1083
1150
|
highlightedId: x,
|
|
1084
|
-
onCardHover:
|
|
1151
|
+
onCardHover: b,
|
|
1085
1152
|
onCardSelect: e.onCardSelect,
|
|
1086
1153
|
onCardOpenClick: e.onCardOpenClick,
|
|
1154
|
+
onCardBookClick: e.onCardBookClick,
|
|
1087
1155
|
openLabel: e.openLabel,
|
|
1156
|
+
bookLabel: e.bookLabel,
|
|
1088
1157
|
formatNextSlot: e.formatNextSlot,
|
|
1089
1158
|
onLoadMore: c,
|
|
1090
1159
|
loadingMore: d,
|
|
1091
|
-
loadingSkeletons:
|
|
1160
|
+
loadingSkeletons: l,
|
|
1092
1161
|
density: "compact",
|
|
1093
|
-
containerRef:
|
|
1162
|
+
containerRef: M
|
|
1094
1163
|
}
|
|
1095
1164
|
);
|
|
1096
|
-
return /* @__PURE__ */
|
|
1097
|
-
/* @__PURE__ */ t(
|
|
1098
|
-
/* @__PURE__ */
|
|
1165
|
+
return /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1166
|
+
/* @__PURE__ */ t(he, { variantBodyProps: e }),
|
|
1167
|
+
/* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:lg:grid ds:lg:grid-cols-[55fr_45fr] ds:lg:gap-[var(--spacing-lg)] ds:lg:items-start", children: [
|
|
1099
1168
|
/* @__PURE__ */ t("div", { className: "ds:min-w-0", children: T }),
|
|
1100
1169
|
/* @__PURE__ */ t("div", { className: "ds:hidden ds:lg:block ds:sticky ds:top-[var(--spacing-md)] ds:h-[40rem]", children: /* @__PURE__ */ t(
|
|
1101
|
-
|
|
1170
|
+
pe,
|
|
1102
1171
|
{
|
|
1103
1172
|
results: n,
|
|
1104
1173
|
searchCentre: a,
|
|
@@ -1107,34 +1176,34 @@ function yt(e) {
|
|
|
1107
1176
|
mapId: r,
|
|
1108
1177
|
highlightedId: x,
|
|
1109
1178
|
onPinClick: (P) => {
|
|
1110
|
-
|
|
1179
|
+
Q(n, P, "pin", e.onResultSelect), y(P);
|
|
1111
1180
|
},
|
|
1112
|
-
onPinHover:
|
|
1181
|
+
onPinHover: b,
|
|
1113
1182
|
onPinFirstInteract: e.onPinFirstInteract,
|
|
1114
|
-
onBoundsChange:
|
|
1115
|
-
consentGranted:
|
|
1116
|
-
onConsentRequest:
|
|
1183
|
+
onBoundsChange: R,
|
|
1184
|
+
consentGranted: h,
|
|
1185
|
+
onConsentRequest: g,
|
|
1117
1186
|
mapHandleRef: e.mapHandleRef
|
|
1118
1187
|
}
|
|
1119
1188
|
) })
|
|
1120
1189
|
] }),
|
|
1121
1190
|
/* @__PURE__ */ t("div", { className: "ds:flex ds:lg:hidden ds:sticky ds:bottom-[var(--spacing-md)] ds:justify-center", children: /* @__PURE__ */ t(
|
|
1122
|
-
|
|
1191
|
+
ee,
|
|
1123
1192
|
{
|
|
1124
1193
|
intent: "primary",
|
|
1125
1194
|
size: "md",
|
|
1126
|
-
startIcon: /* @__PURE__ */ t(
|
|
1127
|
-
onClick: () =>
|
|
1128
|
-
children:
|
|
1195
|
+
startIcon: /* @__PURE__ */ t(ft, { "aria-hidden": "true" }),
|
|
1196
|
+
onClick: () => I(!0),
|
|
1197
|
+
children: S("practiceResults.viewMap")
|
|
1129
1198
|
}
|
|
1130
1199
|
) }),
|
|
1131
|
-
/* @__PURE__ */ t(
|
|
1132
|
-
/* @__PURE__ */ t(
|
|
1133
|
-
/* @__PURE__ */
|
|
1134
|
-
/* @__PURE__ */ t(
|
|
1135
|
-
/* @__PURE__ */
|
|
1200
|
+
/* @__PURE__ */ t(_.Root, { open: w, onOpenChange: I, children: /* @__PURE__ */ p(_.Content, { side: "bottom", size: "lg", children: [
|
|
1201
|
+
/* @__PURE__ */ t(_.Header, { children: /* @__PURE__ */ t(_.Title, { children: S("practiceResults.map.label") }) }),
|
|
1202
|
+
/* @__PURE__ */ p(_.Body, { children: [
|
|
1203
|
+
/* @__PURE__ */ t(_.Description, { className: "ds:sr-only", children: S("practiceResults.sheet.description") }),
|
|
1204
|
+
/* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1136
1205
|
/* @__PURE__ */ t("div", { className: "ds:h-[20rem]", children: /* @__PURE__ */ t(
|
|
1137
|
-
|
|
1206
|
+
pe,
|
|
1138
1207
|
{
|
|
1139
1208
|
results: n,
|
|
1140
1209
|
searchCentre: a,
|
|
@@ -1143,13 +1212,13 @@ function yt(e) {
|
|
|
1143
1212
|
mapId: r,
|
|
1144
1213
|
highlightedId: x,
|
|
1145
1214
|
onPinClick: (P) => {
|
|
1146
|
-
|
|
1215
|
+
Q(n, P, "pin", e.onResultSelect), y(P);
|
|
1147
1216
|
},
|
|
1148
|
-
onPinHover:
|
|
1217
|
+
onPinHover: b,
|
|
1149
1218
|
onPinFirstInteract: e.onPinFirstInteract,
|
|
1150
|
-
onBoundsChange:
|
|
1151
|
-
consentGranted:
|
|
1152
|
-
onConsentRequest:
|
|
1219
|
+
onBoundsChange: R,
|
|
1220
|
+
consentGranted: h,
|
|
1221
|
+
onConsentRequest: g,
|
|
1153
1222
|
mapHandleRef: e.mapHandleRef
|
|
1154
1223
|
}
|
|
1155
1224
|
) }),
|
|
@@ -1159,44 +1228,44 @@ function yt(e) {
|
|
|
1159
1228
|
] }) })
|
|
1160
1229
|
] });
|
|
1161
1230
|
}
|
|
1162
|
-
const
|
|
1231
|
+
const It = {
|
|
1163
1232
|
peek: "sm",
|
|
1164
1233
|
half: "md",
|
|
1165
1234
|
full: "lg"
|
|
1166
|
-
},
|
|
1235
|
+
}, E = [
|
|
1167
1236
|
"peek",
|
|
1168
1237
|
"half",
|
|
1169
1238
|
"full"
|
|
1170
1239
|
];
|
|
1171
|
-
function
|
|
1172
|
-
const { t: s, i18n: r } = C(), i = r.dir() === "rtl", a =
|
|
1240
|
+
function Tt({ value: e, onChange: n }) {
|
|
1241
|
+
const { t: s, i18n: r } = C(), i = r.dir() === "rtl", a = A(
|
|
1173
1242
|
/* @__PURE__ */ new Map()
|
|
1174
|
-
), c = B((
|
|
1175
|
-
var
|
|
1176
|
-
(
|
|
1243
|
+
), c = B((l) => {
|
|
1244
|
+
var u;
|
|
1245
|
+
(u = a.current.get(l)) == null || u.focus();
|
|
1177
1246
|
}, []), d = B(
|
|
1178
|
-
(
|
|
1179
|
-
const
|
|
1180
|
-
let
|
|
1181
|
-
switch (
|
|
1182
|
-
case
|
|
1247
|
+
(l, u) => {
|
|
1248
|
+
const o = E.indexOf(u), m = E.length, f = i ? "ArrowLeft" : "ArrowRight", x = i ? "ArrowRight" : "ArrowLeft";
|
|
1249
|
+
let b = null;
|
|
1250
|
+
switch (l.key) {
|
|
1251
|
+
case f:
|
|
1183
1252
|
case "ArrowDown":
|
|
1184
|
-
|
|
1253
|
+
b = E[(o + 1) % m];
|
|
1185
1254
|
break;
|
|
1186
1255
|
case x:
|
|
1187
1256
|
case "ArrowUp":
|
|
1188
|
-
|
|
1257
|
+
b = E[(o - 1 + m) % m];
|
|
1189
1258
|
break;
|
|
1190
1259
|
case "Home":
|
|
1191
|
-
|
|
1260
|
+
b = E[0];
|
|
1192
1261
|
break;
|
|
1193
1262
|
case "End":
|
|
1194
|
-
|
|
1263
|
+
b = E[m - 1];
|
|
1195
1264
|
break;
|
|
1196
1265
|
default:
|
|
1197
1266
|
return;
|
|
1198
1267
|
}
|
|
1199
|
-
|
|
1268
|
+
l.preventDefault(), b && b !== u && n(b), b && c(b);
|
|
1200
1269
|
},
|
|
1201
1270
|
[c, i, n]
|
|
1202
1271
|
);
|
|
@@ -1206,33 +1275,33 @@ function wt({ value: e, onChange: n }) {
|
|
|
1206
1275
|
role: "radiogroup",
|
|
1207
1276
|
"aria-label": s("practiceResults.sheet.snap.label"),
|
|
1208
1277
|
className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]",
|
|
1209
|
-
children:
|
|
1210
|
-
const
|
|
1278
|
+
children: E.map((l) => {
|
|
1279
|
+
const u = e === l;
|
|
1211
1280
|
return /* @__PURE__ */ t(
|
|
1212
1281
|
"button",
|
|
1213
1282
|
{
|
|
1214
|
-
ref: (
|
|
1215
|
-
|
|
1283
|
+
ref: (o) => {
|
|
1284
|
+
o ? a.current.set(l, o) : a.current.delete(l);
|
|
1216
1285
|
},
|
|
1217
1286
|
type: "button",
|
|
1218
1287
|
role: "radio",
|
|
1219
|
-
"aria-checked":
|
|
1220
|
-
"aria-label": s(`practiceResults.sheet.snap.${
|
|
1221
|
-
tabIndex:
|
|
1222
|
-
onClick: () => n(
|
|
1223
|
-
onKeyDown: (
|
|
1224
|
-
className:
|
|
1225
|
-
state:
|
|
1288
|
+
"aria-checked": u,
|
|
1289
|
+
"aria-label": s(`practiceResults.sheet.snap.${l}`),
|
|
1290
|
+
tabIndex: u ? 0 : -1,
|
|
1291
|
+
onClick: () => n(l),
|
|
1292
|
+
onKeyDown: (o) => d(o, l),
|
|
1293
|
+
className: te({
|
|
1294
|
+
state: u ? "active" : "idle"
|
|
1226
1295
|
}),
|
|
1227
|
-
children: s(`practiceResults.sheet.snap.${
|
|
1296
|
+
children: s(`practiceResults.sheet.snap.${l}`)
|
|
1228
1297
|
},
|
|
1229
|
-
|
|
1298
|
+
l
|
|
1230
1299
|
);
|
|
1231
1300
|
})
|
|
1232
1301
|
}
|
|
1233
1302
|
);
|
|
1234
1303
|
}
|
|
1235
|
-
function
|
|
1304
|
+
function Lt(e) {
|
|
1236
1305
|
const {
|
|
1237
1306
|
results: n,
|
|
1238
1307
|
apiKey: s,
|
|
@@ -1241,40 +1310,42 @@ function kt(e) {
|
|
|
1241
1310
|
searchCentre: a,
|
|
1242
1311
|
onLoadMore: c,
|
|
1243
1312
|
loadingMore: d,
|
|
1244
|
-
loadingSkeletons:
|
|
1245
|
-
emptyResultsSlot:
|
|
1246
|
-
errorSlot:
|
|
1247
|
-
error:
|
|
1248
|
-
onRetry:
|
|
1313
|
+
loadingSkeletons: l,
|
|
1314
|
+
emptyResultsSlot: u,
|
|
1315
|
+
errorSlot: o,
|
|
1316
|
+
error: m,
|
|
1317
|
+
onRetry: f,
|
|
1249
1318
|
highlightedId: x,
|
|
1250
|
-
onCardHover:
|
|
1251
|
-
onPinClick:
|
|
1252
|
-
consentGranted:
|
|
1253
|
-
onConsentRequest:
|
|
1254
|
-
onBoundsChange:
|
|
1255
|
-
listContainerRef:
|
|
1256
|
-
facets:
|
|
1257
|
-
value:
|
|
1258
|
-
onChange:
|
|
1259
|
-
} = e, { t: T } = C(), [P, q] =
|
|
1260
|
-
|
|
1319
|
+
onCardHover: b,
|
|
1320
|
+
onPinClick: y,
|
|
1321
|
+
consentGranted: h,
|
|
1322
|
+
onConsentRequest: g,
|
|
1323
|
+
onBoundsChange: R,
|
|
1324
|
+
listContainerRef: M,
|
|
1325
|
+
facets: S,
|
|
1326
|
+
value: w,
|
|
1327
|
+
onChange: I
|
|
1328
|
+
} = e, { t: T } = C(), [P, q] = me("half"), U = It[P], G = ot("(min-width: 1024px)"), H = m ? o ?? /* @__PURE__ */ t(ve, { onRetry: f }) : n.length === 0 && !l ? u ?? /* @__PURE__ */ t(ge, {}) : /* @__PURE__ */ t(
|
|
1329
|
+
fe,
|
|
1261
1330
|
{
|
|
1262
1331
|
results: n,
|
|
1263
1332
|
highlightedId: x,
|
|
1264
|
-
onCardHover:
|
|
1333
|
+
onCardHover: b,
|
|
1265
1334
|
onCardSelect: e.onCardSelect,
|
|
1266
1335
|
onCardOpenClick: e.onCardOpenClick,
|
|
1336
|
+
onCardBookClick: e.onCardBookClick,
|
|
1267
1337
|
openLabel: e.openLabel,
|
|
1338
|
+
bookLabel: e.bookLabel,
|
|
1268
1339
|
formatNextSlot: e.formatNextSlot,
|
|
1269
1340
|
onLoadMore: c,
|
|
1270
1341
|
loadingMore: d,
|
|
1271
|
-
loadingSkeletons:
|
|
1342
|
+
loadingSkeletons: l,
|
|
1272
1343
|
density: "compact",
|
|
1273
1344
|
apiKey: s,
|
|
1274
|
-
containerRef:
|
|
1345
|
+
containerRef: M
|
|
1275
1346
|
}
|
|
1276
|
-
),
|
|
1277
|
-
|
|
1347
|
+
), K = /* @__PURE__ */ t(
|
|
1348
|
+
pe,
|
|
1278
1349
|
{
|
|
1279
1350
|
results: n,
|
|
1280
1351
|
searchCentre: a,
|
|
@@ -1282,26 +1353,26 @@ function kt(e) {
|
|
|
1282
1353
|
apiKey: s,
|
|
1283
1354
|
mapId: r,
|
|
1284
1355
|
highlightedId: x,
|
|
1285
|
-
onPinClick: (
|
|
1286
|
-
|
|
1356
|
+
onPinClick: (k) => {
|
|
1357
|
+
Q(n, k, "pin", e.onResultSelect), y(k);
|
|
1287
1358
|
},
|
|
1288
|
-
onPinHover:
|
|
1359
|
+
onPinHover: b,
|
|
1289
1360
|
onPinFirstInteract: e.onPinFirstInteract,
|
|
1290
|
-
onBoundsChange:
|
|
1291
|
-
consentGranted:
|
|
1292
|
-
onConsentRequest:
|
|
1361
|
+
onBoundsChange: R,
|
|
1362
|
+
consentGranted: h,
|
|
1363
|
+
onConsentRequest: g,
|
|
1293
1364
|
mapHandleRef: e.mapHandleRef
|
|
1294
1365
|
}
|
|
1295
|
-
),
|
|
1296
|
-
|
|
1366
|
+
), Z = S.length > 0 ? /* @__PURE__ */ t("div", { className: "ds:absolute ds:start-[var(--spacing-md)] ds:top-[var(--spacing-md)] ds:max-w-[calc(100%-var(--spacing-lg))]", children: /* @__PURE__ */ t(
|
|
1367
|
+
Le,
|
|
1297
1368
|
{
|
|
1298
|
-
facets:
|
|
1299
|
-
value:
|
|
1300
|
-
onChange: (
|
|
1369
|
+
facets: S,
|
|
1370
|
+
value: w.facets,
|
|
1371
|
+
onChange: (k) => I({ ...w, facets: k }),
|
|
1301
1372
|
floating: !0
|
|
1302
1373
|
}
|
|
1303
1374
|
) }) : null;
|
|
1304
|
-
return /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children:
|
|
1375
|
+
return /* @__PURE__ */ t("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: G ? (
|
|
1305
1376
|
// Desktop: 65/35 map left + cards rail right. NO Sheet (the
|
|
1306
1377
|
// Sheet would portal to body and occlude the desktop layout
|
|
1307
1378
|
// regardless of the parent's `lg:hidden` class).
|
|
@@ -1319,11 +1390,11 @@ function kt(e) {
|
|
|
1319
1390
|
// the map column is `lg:sticky lg:h-[44rem]` (stays visible
|
|
1320
1391
|
// as the patient scrolls cards) and the rail renders at
|
|
1321
1392
|
// natural height. Single page scroll.
|
|
1322
|
-
/* @__PURE__ */
|
|
1323
|
-
/* @__PURE__ */ t(
|
|
1324
|
-
/* @__PURE__ */
|
|
1325
|
-
/* @__PURE__ */ t("div", { className: "ds:sticky ds:top-[var(--spacing-md)] ds:h-[44rem]", children:
|
|
1326
|
-
/* @__PURE__ */ t("div", { className: "ds:min-w-0", children:
|
|
1393
|
+
/* @__PURE__ */ p(et, { children: [
|
|
1394
|
+
/* @__PURE__ */ t(he, { variantBodyProps: e }),
|
|
1395
|
+
/* @__PURE__ */ p("div", { className: "ds:grid ds:grid-cols-[65fr_35fr] ds:gap-[var(--spacing-lg)] ds:items-start", children: [
|
|
1396
|
+
/* @__PURE__ */ t("div", { className: "ds:sticky ds:top-[var(--spacing-md)] ds:h-[44rem]", children: K }),
|
|
1397
|
+
/* @__PURE__ */ t("div", { className: "ds:min-w-0", children: H })
|
|
1327
1398
|
] })
|
|
1328
1399
|
] })
|
|
1329
1400
|
) : (
|
|
@@ -1333,9 +1404,9 @@ function kt(e) {
|
|
|
1333
1404
|
// via the snap radiogroup at the top of the sheet body. Filters
|
|
1334
1405
|
// stay floating on mobile — the full-bleed map IS the viewport
|
|
1335
1406
|
// chrome, so floating chips are the only place for them.
|
|
1336
|
-
/* @__PURE__ */
|
|
1407
|
+
/* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1337
1408
|
/* @__PURE__ */ t(
|
|
1338
|
-
|
|
1409
|
+
Te,
|
|
1339
1410
|
{
|
|
1340
1411
|
heading: e.heading,
|
|
1341
1412
|
intro: e.intro,
|
|
@@ -1343,26 +1414,26 @@ function kt(e) {
|
|
|
1343
1414
|
searchCentreLabel: a == null ? void 0 : a.label
|
|
1344
1415
|
}
|
|
1345
1416
|
),
|
|
1346
|
-
/* @__PURE__ */
|
|
1347
|
-
|
|
1348
|
-
|
|
1417
|
+
/* @__PURE__ */ p("div", { className: "ds:relative ds:h-[60vh] ds:min-h-[20rem]", children: [
|
|
1418
|
+
K,
|
|
1419
|
+
Z
|
|
1349
1420
|
] }),
|
|
1350
|
-
/* @__PURE__ */ t(
|
|
1351
|
-
|
|
1421
|
+
/* @__PURE__ */ t(_.Root, { open: !0, children: /* @__PURE__ */ t(
|
|
1422
|
+
_.Content,
|
|
1352
1423
|
{
|
|
1353
1424
|
side: "bottom",
|
|
1354
1425
|
size: U,
|
|
1355
|
-
onEscapeKeyDown: (
|
|
1356
|
-
onPointerDownOutside: (
|
|
1357
|
-
onInteractOutside: (
|
|
1358
|
-
children: /* @__PURE__ */
|
|
1359
|
-
/* @__PURE__ */ t(
|
|
1360
|
-
/* @__PURE__ */
|
|
1361
|
-
/* @__PURE__ */ t(
|
|
1426
|
+
onEscapeKeyDown: (k) => k.preventDefault(),
|
|
1427
|
+
onPointerDownOutside: (k) => k.preventDefault(),
|
|
1428
|
+
onInteractOutside: (k) => k.preventDefault(),
|
|
1429
|
+
children: /* @__PURE__ */ p(_.Body, { children: [
|
|
1430
|
+
/* @__PURE__ */ t(_.Description, { className: "ds:sr-only", children: T("practiceResults.sheet.descriptionMapFirst") }),
|
|
1431
|
+
/* @__PURE__ */ p("div", { className: "ds:flex ds:items-start ds:justify-between ds:gap-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]", children: [
|
|
1432
|
+
/* @__PURE__ */ t(_.Title, { className: "type-title-card ds:m-0 ds:text-[var(--foreground)]", children: T("practiceResults.sheet.title", {
|
|
1362
1433
|
count: e.totalCount ?? n.length
|
|
1363
1434
|
}) }),
|
|
1364
1435
|
/* @__PURE__ */ t(
|
|
1365
|
-
|
|
1436
|
+
Tt,
|
|
1366
1437
|
{
|
|
1367
1438
|
value: P,
|
|
1368
1439
|
onChange: q
|
|
@@ -1370,20 +1441,20 @@ function kt(e) {
|
|
|
1370
1441
|
)
|
|
1371
1442
|
] }),
|
|
1372
1443
|
/* @__PURE__ */ t("div", { className: "ds:pb-[var(--spacing-sm)]", children: /* @__PURE__ */ t(
|
|
1373
|
-
|
|
1444
|
+
ue,
|
|
1374
1445
|
{
|
|
1375
|
-
value:
|
|
1376
|
-
onChange: (
|
|
1446
|
+
value: w.sort ?? "relevance",
|
|
1447
|
+
onChange: (k) => I({ ...w, sort: k })
|
|
1377
1448
|
}
|
|
1378
1449
|
) }),
|
|
1379
|
-
|
|
1450
|
+
H
|
|
1380
1451
|
] })
|
|
1381
1452
|
}
|
|
1382
1453
|
) })
|
|
1383
1454
|
] })
|
|
1384
1455
|
) });
|
|
1385
1456
|
}
|
|
1386
|
-
function
|
|
1457
|
+
function zt(e) {
|
|
1387
1458
|
const {
|
|
1388
1459
|
results: n,
|
|
1389
1460
|
apiKey: s,
|
|
@@ -1392,35 +1463,37 @@ function Ct(e) {
|
|
|
1392
1463
|
loadingSkeletons: a,
|
|
1393
1464
|
emptyResultsSlot: c,
|
|
1394
1465
|
errorSlot: d,
|
|
1395
|
-
error:
|
|
1396
|
-
onRetry:
|
|
1397
|
-
highlightedId:
|
|
1398
|
-
onCardHover:
|
|
1399
|
-
listContainerRef:
|
|
1400
|
-
} = e, x =
|
|
1401
|
-
|
|
1466
|
+
error: l,
|
|
1467
|
+
onRetry: u,
|
|
1468
|
+
highlightedId: o,
|
|
1469
|
+
onCardHover: m,
|
|
1470
|
+
listContainerRef: f
|
|
1471
|
+
} = e, x = l ? d ?? /* @__PURE__ */ t(ve, { onRetry: u }) : n.length === 0 && !a ? c ?? /* @__PURE__ */ t(ge, {}) : /* @__PURE__ */ t(
|
|
1472
|
+
fe,
|
|
1402
1473
|
{
|
|
1403
1474
|
results: n,
|
|
1404
|
-
highlightedId:
|
|
1405
|
-
onCardHover:
|
|
1475
|
+
highlightedId: o,
|
|
1476
|
+
onCardHover: m,
|
|
1406
1477
|
onCardSelect: e.onCardSelect,
|
|
1407
1478
|
onCardOpenClick: e.onCardOpenClick,
|
|
1479
|
+
onCardBookClick: e.onCardBookClick,
|
|
1408
1480
|
openLabel: e.openLabel,
|
|
1481
|
+
bookLabel: e.bookLabel,
|
|
1409
1482
|
formatNextSlot: e.formatNextSlot,
|
|
1410
1483
|
onLoadMore: r,
|
|
1411
1484
|
loadingMore: i,
|
|
1412
1485
|
loadingSkeletons: a,
|
|
1413
1486
|
density: "rich",
|
|
1414
1487
|
apiKey: s,
|
|
1415
|
-
containerRef:
|
|
1488
|
+
containerRef: f
|
|
1416
1489
|
}
|
|
1417
1490
|
);
|
|
1418
|
-
return /* @__PURE__ */
|
|
1419
|
-
/* @__PURE__ */ t(
|
|
1491
|
+
return /* @__PURE__ */ p("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1492
|
+
/* @__PURE__ */ t(he, { variantBodyProps: e }),
|
|
1420
1493
|
x
|
|
1421
1494
|
] });
|
|
1422
1495
|
}
|
|
1423
|
-
const
|
|
1496
|
+
const Ft = tt(function({
|
|
1424
1497
|
variant: n = "split-list-map",
|
|
1425
1498
|
results: s,
|
|
1426
1499
|
totalCount: r,
|
|
@@ -1428,196 +1501,209 @@ const St = Ze(function({
|
|
|
1428
1501
|
facets: a,
|
|
1429
1502
|
googleMapsApiKey: c,
|
|
1430
1503
|
mapId: d,
|
|
1431
|
-
defaultZoom:
|
|
1432
|
-
onBoundsChange:
|
|
1433
|
-
consentGranted:
|
|
1434
|
-
onConsentRequest:
|
|
1435
|
-
skipConsentGate:
|
|
1504
|
+
defaultZoom: l = gt,
|
|
1505
|
+
onBoundsChange: u,
|
|
1506
|
+
consentGranted: o,
|
|
1507
|
+
onConsentRequest: m,
|
|
1508
|
+
skipConsentGate: f = !1,
|
|
1436
1509
|
onLoadMore: x,
|
|
1437
|
-
loadingMore:
|
|
1438
|
-
value:
|
|
1439
|
-
onChange:
|
|
1440
|
-
onResultSelect:
|
|
1441
|
-
loading:
|
|
1442
|
-
emptyResultsSlot:
|
|
1443
|
-
errorSlot:
|
|
1444
|
-
error:
|
|
1445
|
-
onRetry:
|
|
1510
|
+
loadingMore: b,
|
|
1511
|
+
value: y,
|
|
1512
|
+
onChange: h,
|
|
1513
|
+
onResultSelect: g,
|
|
1514
|
+
loading: R,
|
|
1515
|
+
emptyResultsSlot: M,
|
|
1516
|
+
errorSlot: S,
|
|
1517
|
+
error: w,
|
|
1518
|
+
onRetry: I,
|
|
1446
1519
|
heading: T,
|
|
1447
1520
|
intro: P,
|
|
1448
1521
|
cardOpenButtonLabel: q,
|
|
1449
|
-
|
|
1450
|
-
|
|
1522
|
+
cardBookButtonLabel: U,
|
|
1523
|
+
"aria-label": G,
|
|
1524
|
+
id: H,
|
|
1451
1525
|
className: K,
|
|
1452
|
-
...
|
|
1453
|
-
},
|
|
1454
|
-
const { t:
|
|
1526
|
+
...Z
|
|
1527
|
+
}, k) {
|
|
1528
|
+
const { t: ae, i18n: be } = C(), [Oe, J] = me(null), X = A(/* @__PURE__ */ new Set()), se = A(/* @__PURE__ */ new Set()), Ke = A(null), ie = A(null), re = O(
|
|
1455
1529
|
() => ({
|
|
1456
1530
|
getVariant: () => n,
|
|
1457
|
-
scrollToResult: (
|
|
1458
|
-
const
|
|
1459
|
-
if (!
|
|
1460
|
-
const
|
|
1461
|
-
`[data-component="practice-result-card"][data-result-id="${CSS.escape(
|
|
1531
|
+
scrollToResult: (v) => {
|
|
1532
|
+
const z = ie.current;
|
|
1533
|
+
if (!z) return;
|
|
1534
|
+
const N = z.querySelector(
|
|
1535
|
+
`[data-component="practice-result-card"][data-result-id="${CSS.escape(v)}"]`
|
|
1462
1536
|
);
|
|
1463
|
-
|
|
1537
|
+
N && (N.scrollIntoView({ behavior: "smooth", block: "nearest" }), J(v));
|
|
1464
1538
|
},
|
|
1465
|
-
focusPin: (
|
|
1466
|
-
|
|
1539
|
+
focusPin: (v) => {
|
|
1540
|
+
J(v);
|
|
1467
1541
|
}
|
|
1468
1542
|
}),
|
|
1469
1543
|
[n]
|
|
1470
1544
|
);
|
|
1471
|
-
|
|
1472
|
-
const
|
|
1473
|
-
(
|
|
1474
|
-
if (
|
|
1545
|
+
nt(k, () => re, [re]), lt(ht, re, H);
|
|
1546
|
+
const Ve = q ?? ae("practiceResults.card.open"), Ee = U ?? ae("practiceResults.card.book"), je = B(
|
|
1547
|
+
(v) => {
|
|
1548
|
+
if (v.nextAvailableSlot)
|
|
1475
1549
|
try {
|
|
1476
|
-
return new Intl.DateTimeFormat(
|
|
1550
|
+
return new Intl.DateTimeFormat(be.language, {
|
|
1477
1551
|
weekday: "short",
|
|
1478
1552
|
hour: "numeric",
|
|
1479
1553
|
minute: "numeric"
|
|
1480
|
-
}).format(new Date(
|
|
1554
|
+
}).format(new Date(v.nextAvailableSlot.dateTime));
|
|
1481
1555
|
} catch {
|
|
1482
|
-
return
|
|
1556
|
+
return v.nextAvailableSlot.dateTime;
|
|
1483
1557
|
}
|
|
1484
1558
|
},
|
|
1485
|
-
[
|
|
1486
|
-
),
|
|
1487
|
-
|
|
1488
|
-
|
|
1559
|
+
[be.language]
|
|
1560
|
+
), ye = A(null);
|
|
1561
|
+
W(() => {
|
|
1562
|
+
ye.current !== n && (ye.current = n, F("serp_variant_exposed", {
|
|
1489
1563
|
variant: n,
|
|
1490
1564
|
totalCount: r ?? s.length
|
|
1491
|
-
}), X.current = /* @__PURE__ */ new Set(),
|
|
1565
|
+
}), X.current = /* @__PURE__ */ new Set(), se.current = /* @__PURE__ */ new Set());
|
|
1492
1566
|
}, [n]);
|
|
1493
|
-
const
|
|
1494
|
-
() =>
|
|
1495
|
-
[a, s,
|
|
1496
|
-
),
|
|
1497
|
-
const
|
|
1498
|
-
return
|
|
1499
|
-
}, [s,
|
|
1500
|
-
|
|
1501
|
-
const
|
|
1502
|
-
|
|
1503
|
-
appliedFacets:
|
|
1504
|
-
}),
|
|
1505
|
-
}, [
|
|
1506
|
-
const
|
|
1507
|
-
|
|
1567
|
+
const oe = A(!1), le = O(
|
|
1568
|
+
() => yt(a ?? [], s, y.facets),
|
|
1569
|
+
[a, s, y.facets]
|
|
1570
|
+
), ce = y.sort ?? (i ? "distance" : "relevance"), L = O(() => {
|
|
1571
|
+
const v = xt(s, y.facets, le);
|
|
1572
|
+
return kt(v, ce, i);
|
|
1573
|
+
}, [s, y.facets, le, ce, i]);
|
|
1574
|
+
W(() => {
|
|
1575
|
+
const v = L.length === 0;
|
|
1576
|
+
v && !oe.current ? (F("serp_empty_results", {
|
|
1577
|
+
appliedFacets: y.facets ?? {}
|
|
1578
|
+
}), oe.current = !0) : v || (oe.current = !1);
|
|
1579
|
+
}, [L.length, y.facets]);
|
|
1580
|
+
const V = A(null), xe = A(null);
|
|
1581
|
+
W(
|
|
1508
1582
|
() => () => {
|
|
1509
|
-
|
|
1583
|
+
V.current && clearTimeout(V.current);
|
|
1510
1584
|
},
|
|
1511
1585
|
[]
|
|
1512
1586
|
);
|
|
1513
|
-
const
|
|
1514
|
-
|
|
1515
|
-
X.current.has(
|
|
1587
|
+
const qe = B((v) => {
|
|
1588
|
+
J(v), !X.current.has(v) && (xe.current === v && V.current || (V.current && clearTimeout(V.current), xe.current = v, V.current = setTimeout(() => {
|
|
1589
|
+
X.current.has(v) || (X.current.add(v), F("serp_result_hovered_card", { resultId: v })), V.current = null;
|
|
1516
1590
|
}, 500)));
|
|
1517
|
-
}, []),
|
|
1518
|
-
|
|
1519
|
-
const
|
|
1520
|
-
if (!
|
|
1521
|
-
const
|
|
1522
|
-
`[data-component="practice-result-card"][data-result-id="${CSS.escape(
|
|
1591
|
+
}, []), Ue = B((v) => {
|
|
1592
|
+
J(v);
|
|
1593
|
+
const z = ie.current;
|
|
1594
|
+
if (!z) return;
|
|
1595
|
+
const N = z.querySelector(
|
|
1596
|
+
`[data-component="practice-result-card"][data-result-id="${CSS.escape(v)}"]`
|
|
1523
1597
|
);
|
|
1524
|
-
|
|
1525
|
-
}, []),
|
|
1526
|
-
|
|
1527
|
-
}, []),
|
|
1528
|
-
(
|
|
1529
|
-
|
|
1530
|
-
const
|
|
1531
|
-
if (
|
|
1532
|
-
if (
|
|
1533
|
-
const
|
|
1534
|
-
|
|
1535
|
-
lat:
|
|
1536
|
-
lng:
|
|
1537
|
-
}),
|
|
1598
|
+
N == null || N.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
1599
|
+
}, []), Ge = B((v) => {
|
|
1600
|
+
se.current.has(v) || (se.current.add(v), F("serp_result_hovered_pin", { resultId: v }));
|
|
1601
|
+
}, []), ke = A(null), Ze = B(
|
|
1602
|
+
(v) => {
|
|
1603
|
+
J(v);
|
|
1604
|
+
const z = L.find((N) => N.id === v);
|
|
1605
|
+
if (z) {
|
|
1606
|
+
if (z.location) {
|
|
1607
|
+
const N = ke.current;
|
|
1608
|
+
N == null || N.panTo({
|
|
1609
|
+
lat: z.location.lat,
|
|
1610
|
+
lng: z.location.lng
|
|
1611
|
+
}), N == null || N.setZoom(16);
|
|
1538
1612
|
}
|
|
1539
|
-
|
|
1613
|
+
Q(L, v, "card", g);
|
|
1540
1614
|
}
|
|
1541
1615
|
},
|
|
1542
|
-
[
|
|
1543
|
-
),
|
|
1544
|
-
(
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1616
|
+
[L, g]
|
|
1617
|
+
), Qe = B(
|
|
1618
|
+
(v) => {
|
|
1619
|
+
Q(
|
|
1620
|
+
L,
|
|
1621
|
+
v,
|
|
1548
1622
|
"open-button",
|
|
1549
|
-
|
|
1623
|
+
g
|
|
1624
|
+
);
|
|
1625
|
+
},
|
|
1626
|
+
[L, g]
|
|
1627
|
+
), Je = B(
|
|
1628
|
+
(v) => {
|
|
1629
|
+
Q(
|
|
1630
|
+
L,
|
|
1631
|
+
v,
|
|
1632
|
+
"book-button",
|
|
1633
|
+
g
|
|
1550
1634
|
);
|
|
1551
1635
|
},
|
|
1552
|
-
[
|
|
1553
|
-
),
|
|
1554
|
-
results:
|
|
1636
|
+
[L, g]
|
|
1637
|
+
), We = !!R && s.length === 0, de = {
|
|
1638
|
+
results: L,
|
|
1555
1639
|
totalCount: r,
|
|
1556
1640
|
searchCentre: i,
|
|
1557
|
-
facets:
|
|
1558
|
-
value: { ...
|
|
1559
|
-
onChange:
|
|
1560
|
-
onResultSelect:
|
|
1641
|
+
facets: le,
|
|
1642
|
+
value: { ...y, sort: ce },
|
|
1643
|
+
onChange: h,
|
|
1644
|
+
onResultSelect: g,
|
|
1561
1645
|
onLoadMore: x,
|
|
1562
|
-
loadingMore:
|
|
1646
|
+
loadingMore: b,
|
|
1563
1647
|
apiKey: c,
|
|
1564
1648
|
mapId: d,
|
|
1565
|
-
zoom:
|
|
1649
|
+
zoom: l,
|
|
1566
1650
|
// 0.31.4: when `skipConsentGate` is true the kit synthesises
|
|
1567
1651
|
// `consentGranted=true` for every internal MapView; the consumer's
|
|
1568
1652
|
// CMP at the page level is responsible for whether the Google Maps
|
|
1569
1653
|
// loader script is present at all. `onConsentRequest` is dropped
|
|
1570
1654
|
// because no placeholder renders — nothing to fire it from.
|
|
1571
|
-
consentGranted:
|
|
1572
|
-
onConsentRequest:
|
|
1573
|
-
onBoundsChange:
|
|
1574
|
-
loadingSkeletons:
|
|
1575
|
-
emptyResultsSlot:
|
|
1576
|
-
errorSlot:
|
|
1577
|
-
error:
|
|
1578
|
-
onRetry:
|
|
1655
|
+
consentGranted: f ? !0 : o,
|
|
1656
|
+
onConsentRequest: f ? void 0 : m,
|
|
1657
|
+
onBoundsChange: u,
|
|
1658
|
+
loadingSkeletons: We,
|
|
1659
|
+
emptyResultsSlot: M,
|
|
1660
|
+
errorSlot: S,
|
|
1661
|
+
error: w,
|
|
1662
|
+
onRetry: I,
|
|
1579
1663
|
heading: T,
|
|
1580
1664
|
intro: P,
|
|
1581
|
-
highlightedId:
|
|
1582
|
-
onCardHover:
|
|
1583
|
-
onPinClick:
|
|
1584
|
-
onPinFirstInteract:
|
|
1585
|
-
onCardSelect:
|
|
1586
|
-
onCardOpenClick:
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1665
|
+
highlightedId: Oe,
|
|
1666
|
+
onCardHover: qe,
|
|
1667
|
+
onPinClick: Ue,
|
|
1668
|
+
onPinFirstInteract: Ge,
|
|
1669
|
+
onCardSelect: Ze,
|
|
1670
|
+
onCardOpenClick: Qe,
|
|
1671
|
+
onCardBookClick: Je,
|
|
1672
|
+
openLabel: Ve,
|
|
1673
|
+
bookLabel: Ee,
|
|
1674
|
+
formatNextSlot: je,
|
|
1675
|
+
listContainerRef: Ke,
|
|
1676
|
+
mapHandleRef: ke
|
|
1677
|
+
}, Xe = (() => {
|
|
1592
1678
|
switch (n) {
|
|
1593
1679
|
case "map-first":
|
|
1594
|
-
return /* @__PURE__ */ t(
|
|
1680
|
+
return /* @__PURE__ */ t(Lt, { ...de });
|
|
1595
1681
|
case "rich-cards":
|
|
1596
|
-
return /* @__PURE__ */ t(
|
|
1682
|
+
return /* @__PURE__ */ t(zt, { ...de });
|
|
1597
1683
|
case "split-list-map":
|
|
1598
1684
|
default:
|
|
1599
|
-
return /* @__PURE__ */ t(
|
|
1685
|
+
return /* @__PURE__ */ t(_t, { ...de });
|
|
1600
1686
|
}
|
|
1601
|
-
})(),
|
|
1687
|
+
})(), Ye = G ?? ae("practiceResults.regionLabel");
|
|
1602
1688
|
return /* @__PURE__ */ t(
|
|
1603
1689
|
"div",
|
|
1604
1690
|
{
|
|
1605
|
-
ref:
|
|
1691
|
+
ref: ie,
|
|
1606
1692
|
role: "region",
|
|
1607
|
-
"aria-label":
|
|
1608
|
-
id:
|
|
1693
|
+
"aria-label": Ye,
|
|
1694
|
+
id: H,
|
|
1609
1695
|
"data-component": "practice-results",
|
|
1610
|
-
"data-component-id":
|
|
1696
|
+
"data-component-id": H,
|
|
1611
1697
|
"data-variant": n,
|
|
1612
|
-
className:
|
|
1613
|
-
...
|
|
1614
|
-
children:
|
|
1698
|
+
className: wt({ variant: n, className: K }),
|
|
1699
|
+
...Z,
|
|
1700
|
+
children: Xe
|
|
1615
1701
|
}
|
|
1616
1702
|
);
|
|
1617
1703
|
});
|
|
1618
|
-
|
|
1704
|
+
Ft.displayName = "PracticeResults";
|
|
1619
1705
|
export {
|
|
1620
|
-
|
|
1621
|
-
|
|
1706
|
+
Ft as P,
|
|
1707
|
+
ht as p
|
|
1622
1708
|
};
|
|
1623
|
-
//# sourceMappingURL=practice-results-
|
|
1709
|
+
//# sourceMappingURL=practice-results-BEsAdW-B.js.map
|