@alfadocs/ui-kit 0.32.5 → 0.33.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{practice-results-Bw5fJTYF.js → practice-results-Dwm5tzLV.js} +672 -663
- package/dist/agent-catalog.json +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/practice-results/practice-results.d.ts +11 -0
- package/dist/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +1 -1
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { forwardRef as
|
|
1
|
+
import { jsx as t, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Ge, useState as me, useRef as I, useMemo as D, useImperativeHandle as Ze, useCallback as j, useEffect as J } from "react";
|
|
3
3
|
import { c as Z } from "./index-D2ZczOXr.js";
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { A as
|
|
6
|
-
import { A as
|
|
4
|
+
import { useTranslation as C } from "react-i18next";
|
|
5
|
+
import { A as ee } from "./alert-ywPR59NE.js";
|
|
6
|
+
import { A as we } from "./avatar-BNQNhoyL.js";
|
|
7
7
|
import { B as G } from "./button-DD_0Xdmr.js";
|
|
8
|
-
import { D as
|
|
9
|
-
import { E as
|
|
10
|
-
import { M as
|
|
11
|
-
import { R as
|
|
8
|
+
import { D as H } from "./dropdown-menu-BC5ZdOMo.js";
|
|
9
|
+
import { E as Qe } from "./empty-state-BLy7tigq.js";
|
|
10
|
+
import { M as Je } from "./map-view-knHSNLoe.js";
|
|
11
|
+
import { R as ke } from "./rating-BRD7O74e.js";
|
|
12
12
|
import { S as z } from "./sheet-BV-yuLE2.js";
|
|
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 { C as
|
|
13
|
+
import { S as We } from "./skeleton-CZbwyJAA.js";
|
|
14
|
+
import { S as Xe } from "./spinner-CCByyvcb.js";
|
|
15
|
+
import { B as L } from "./badge-zsf5i5bH.js";
|
|
16
|
+
import { u as Ye } from "./use-media-query-CcAx5SMM.js";
|
|
17
|
+
import { u as et } from "./registry-nPAVE19X.js";
|
|
18
|
+
import { c as tt } from "./createLucideIcon-CrFbzy84.js";
|
|
19
|
+
import { R as nt } from "./refresh-cw-CC8jSKMr.js";
|
|
20
|
+
import { C as Ce } from "./chevron-down-BX_NP2Yh.js";
|
|
21
|
+
import { M as ne } from "./map-pin-B8STOPMJ.js";
|
|
22
|
+
import { L as Ne, S as Se, H as Pe } from "./shield-check-BhHyReu8.js";
|
|
23
|
+
import { C as Me } from "./calendar-clock-CYkcqdwl.js";
|
|
24
24
|
/**
|
|
25
25
|
* @license lucide-react v1.8.0 - ISC
|
|
26
26
|
*
|
|
27
27
|
* This source code is licensed under the ISC license.
|
|
28
28
|
* See the LICENSE file in the root directory of this source tree.
|
|
29
29
|
*/
|
|
30
|
-
const
|
|
30
|
+
const at = [
|
|
31
31
|
[
|
|
32
32
|
"path",
|
|
33
33
|
{
|
|
@@ -37,7 +37,7 @@ const nt = [
|
|
|
37
37
|
],
|
|
38
38
|
["path", { d: "M15 5.764v15", key: "1pn4in" }],
|
|
39
39
|
["path", { d: "M9 3.236v15", key: "1uimfh" }]
|
|
40
|
-
],
|
|
40
|
+
], st = tt("map", at), it = {
|
|
41
41
|
id: "practice-results",
|
|
42
42
|
capabilities: ["navigate", "view_change"],
|
|
43
43
|
state: {
|
|
@@ -80,65 +80,65 @@ const nt = [
|
|
|
80
80
|
description: "Sourced from the id prop."
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
},
|
|
83
|
+
}, rt = 13, lt = [
|
|
84
84
|
"distance",
|
|
85
85
|
"rating",
|
|
86
86
|
"next-available",
|
|
87
87
|
"relevance"
|
|
88
88
|
];
|
|
89
|
-
function
|
|
89
|
+
function Ae(e, n, s) {
|
|
90
90
|
const r = `languages.${e}`;
|
|
91
|
-
return
|
|
91
|
+
return s.exists(r) ? n(r) : e.toUpperCase();
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function $(e, n) {
|
|
94
94
|
if (typeof window > "u") return;
|
|
95
|
-
const
|
|
95
|
+
const s = window.track;
|
|
96
96
|
try {
|
|
97
|
-
|
|
97
|
+
s == null || s(e, n);
|
|
98
98
|
} catch {
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
function W(e, n,
|
|
102
|
-
const i = e.findIndex((
|
|
101
|
+
function W(e, n, s, r) {
|
|
102
|
+
const i = e.findIndex((c) => c.id === n);
|
|
103
103
|
if (i < 0) return;
|
|
104
|
-
const
|
|
105
|
-
|
|
104
|
+
const a = e[i];
|
|
105
|
+
a && ($("serp_result_clicked", { resultId: n, source: s, position: i }), r(a, s));
|
|
106
106
|
}
|
|
107
|
-
function
|
|
108
|
-
const r = (n.lat - e.lat) * Math.PI / 180, i = (n.lng - e.lng) * Math.PI / 180,
|
|
107
|
+
function ot(e, n) {
|
|
108
|
+
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), g = d * d + Math.cos(a) * Math.cos(c) * l * l;
|
|
109
109
|
return 2 * 6371 * Math.asin(Math.min(1, Math.sqrt(g)));
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function ct(e, n, s) {
|
|
112
112
|
return !n || Object.keys(n).length === 0 ? e : e.filter((r) => {
|
|
113
|
-
for (const i of
|
|
114
|
-
const
|
|
115
|
-
if (!
|
|
113
|
+
for (const i of s) {
|
|
114
|
+
const a = n[i.key];
|
|
115
|
+
if (!a || a.length === 0) continue;
|
|
116
116
|
if (i.options.length === 0) {
|
|
117
117
|
if (r[i.key] !== !0) return !1;
|
|
118
118
|
continue;
|
|
119
119
|
}
|
|
120
|
-
const
|
|
121
|
-
if (!Array.isArray(
|
|
120
|
+
const c = i.key === "insurance" ? r.insurances : i.key === "language" ? r.languages : r[i.key];
|
|
121
|
+
if (!Array.isArray(c) || !(i.multi ? a.some((l) => c.includes(l)) : c.includes(a[0]))) return !1;
|
|
122
122
|
}
|
|
123
123
|
return !0;
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
|
-
function
|
|
127
|
-
const r = e.map((
|
|
128
|
-
const
|
|
129
|
-
return { result:
|
|
130
|
-
}), i = (
|
|
131
|
-
var
|
|
126
|
+
function dt(e, n, s) {
|
|
127
|
+
const r = e.map((a) => {
|
|
128
|
+
const c = a.location ? a.location.distanceKm ?? (s ? ot(s, a.location) : void 0) : void 0;
|
|
129
|
+
return { result: a, distanceKm: c };
|
|
130
|
+
}), i = (a, c) => {
|
|
131
|
+
var d, l, g, o;
|
|
132
132
|
switch (n) {
|
|
133
133
|
case "distance":
|
|
134
|
-
return
|
|
134
|
+
return a.distanceKm == null && c.distanceKm == null ? 0 : a.distanceKm == null ? 1 : c.distanceKm == null ? -1 : a.distanceKm - c.distanceKm;
|
|
135
135
|
case "rating": {
|
|
136
|
-
const
|
|
137
|
-
return (((
|
|
136
|
+
const u = ((d = a.result.rating) == null ? void 0 : d.value) ?? -1;
|
|
137
|
+
return (((l = c.result.rating) == null ? void 0 : l.value) ?? -1) - u;
|
|
138
138
|
}
|
|
139
139
|
case "next-available": {
|
|
140
|
-
const
|
|
141
|
-
return !
|
|
140
|
+
const u = ((g = a.result.nextAvailableSlot) == null ? void 0 : g.dateTime) ?? "", h = ((o = c.result.nextAvailableSlot) == null ? void 0 : o.dateTime) ?? "";
|
|
141
|
+
return !u && !h ? 0 : u ? h ? u.localeCompare(h) : -1 : 1;
|
|
142
142
|
}
|
|
143
143
|
case "relevance":
|
|
144
144
|
default:
|
|
@@ -146,24 +146,24 @@ function ct(e, n, a) {
|
|
|
146
146
|
}
|
|
147
147
|
};
|
|
148
148
|
return [...r].sort(i).map(
|
|
149
|
-
({ result:
|
|
150
|
-
...
|
|
151
|
-
location: { ...
|
|
152
|
-
} :
|
|
149
|
+
({ result: a, distanceKm: c }) => c != null && a.location ? {
|
|
150
|
+
...a,
|
|
151
|
+
location: { ...a.location, distanceKm: c }
|
|
152
|
+
} : a
|
|
153
153
|
);
|
|
154
154
|
}
|
|
155
|
-
function
|
|
156
|
-
let n = -1 / 0,
|
|
157
|
-
for (const
|
|
158
|
-
if (!
|
|
159
|
-
|
|
160
|
-
const { lat:
|
|
161
|
-
|
|
155
|
+
function ye(e) {
|
|
156
|
+
let n = -1 / 0, s = 1 / 0, r = -1 / 0, i = 1 / 0, a = !1;
|
|
157
|
+
for (const c of e) {
|
|
158
|
+
if (!c.location) continue;
|
|
159
|
+
a = !0;
|
|
160
|
+
const { lat: d, lng: l } = c.location;
|
|
161
|
+
d > n && (n = d), d < s && (s = d), l > r && (r = l), l < i && (i = l);
|
|
162
162
|
}
|
|
163
|
-
if (
|
|
164
|
-
return { north: n, south:
|
|
163
|
+
if (a)
|
|
164
|
+
return { north: n, south: s, east: r, west: i };
|
|
165
165
|
}
|
|
166
|
-
const
|
|
166
|
+
const ut = Z(
|
|
167
167
|
"ds:flex ds:w-full ds:flex-col ds:text-[var(--foreground)] ds:gap-[var(--spacing-md)]",
|
|
168
168
|
{
|
|
169
169
|
variants: {
|
|
@@ -176,32 +176,32 @@ const dt = Z(
|
|
|
176
176
|
defaultVariants: { variant: "split-list-map" }
|
|
177
177
|
}
|
|
178
178
|
);
|
|
179
|
-
function
|
|
179
|
+
function Ie({
|
|
180
180
|
heading: e,
|
|
181
181
|
intro: n,
|
|
182
|
-
totalCount:
|
|
182
|
+
totalCount: s,
|
|
183
183
|
searchCentreLabel: r
|
|
184
184
|
}) {
|
|
185
|
-
const { t: i } =
|
|
186
|
-
if (!e && !n &&
|
|
187
|
-
const
|
|
188
|
-
count:
|
|
185
|
+
const { t: i } = C();
|
|
186
|
+
if (!e && !n && s == null) return null;
|
|
187
|
+
const a = s != null ? r ? i("practiceResults.results.heading", {
|
|
188
|
+
count: s,
|
|
189
189
|
place: r
|
|
190
|
-
}) : i("practiceResults.results.summary", { count:
|
|
191
|
-
return /* @__PURE__ */
|
|
190
|
+
}) : i("practiceResults.results.summary", { count: s }) : void 0;
|
|
191
|
+
return /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
192
192
|
e ? /* @__PURE__ */ t("h2", { className: "type-title-section ds:m-0 ds:text-[var(--foreground)]", children: e }) : null,
|
|
193
193
|
n ? /* @__PURE__ */ t("p", { className: "type-body ds:m-0 ds:text-[var(--muted-foreground)]", children: n }) : null,
|
|
194
|
-
|
|
194
|
+
a ? /* @__PURE__ */ t(
|
|
195
195
|
"p",
|
|
196
196
|
{
|
|
197
197
|
className: "type-body-sm ds:m-0 ds:text-[var(--muted-foreground)]",
|
|
198
198
|
"aria-live": "polite",
|
|
199
|
-
children:
|
|
199
|
+
children: a
|
|
200
200
|
}
|
|
201
201
|
) : null
|
|
202
202
|
] });
|
|
203
203
|
}
|
|
204
|
-
const
|
|
204
|
+
const te = Z(
|
|
205
205
|
[
|
|
206
206
|
"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
207
207
|
"ds:min-h-[var(--min-target-size)]",
|
|
@@ -223,7 +223,7 @@ const ee = Z(
|
|
|
223
223
|
},
|
|
224
224
|
defaultVariants: { state: "idle" }
|
|
225
225
|
}
|
|
226
|
-
),
|
|
226
|
+
), mt = Z(
|
|
227
227
|
"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
228
228
|
{
|
|
229
229
|
variants: {
|
|
@@ -242,7 +242,7 @@ const ee = Z(
|
|
|
242
242
|
},
|
|
243
243
|
defaultVariants: { placement: "inline" }
|
|
244
244
|
}
|
|
245
|
-
),
|
|
245
|
+
), pt = Z(
|
|
246
246
|
[
|
|
247
247
|
"ds:ms-[var(--spacing-xs)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
248
248
|
"ds:min-h-[var(--min-target-size)] ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)]",
|
|
@@ -256,68 +256,68 @@ const ee = Z(
|
|
|
256
256
|
function ze({
|
|
257
257
|
facets: e,
|
|
258
258
|
value: n,
|
|
259
|
-
onChange:
|
|
259
|
+
onChange: s,
|
|
260
260
|
floating: r
|
|
261
261
|
}) {
|
|
262
|
-
const { t: i } =
|
|
263
|
-
() => Object.values(
|
|
264
|
-
[
|
|
265
|
-
),
|
|
266
|
-
const
|
|
267
|
-
|
|
268
|
-
},
|
|
269
|
-
var
|
|
270
|
-
const
|
|
271
|
-
|
|
272
|
-
}, g = (
|
|
273
|
-
const
|
|
274
|
-
let
|
|
275
|
-
|
|
262
|
+
const { t: i } = C(), a = D(() => n ?? {}, [n]), c = D(
|
|
263
|
+
() => Object.values(a).some((o) => o && o.length > 0),
|
|
264
|
+
[a]
|
|
265
|
+
), d = (o, u) => {
|
|
266
|
+
const h = { ...a };
|
|
267
|
+
u.length === 0 ? delete h[o] : h[o] = u, s(h), $("serp_filter_changed", { key: o, values: u });
|
|
268
|
+
}, l = (o) => {
|
|
269
|
+
var h;
|
|
270
|
+
const u = (((h = a[o]) == null ? void 0 : h.length) ?? 0) > 0;
|
|
271
|
+
d(o, u ? [] : ["true"]);
|
|
272
|
+
}, g = (o, u) => {
|
|
273
|
+
const h = a[o.key] ?? [], b = h.includes(u);
|
|
274
|
+
let v;
|
|
275
|
+
o.multi ? v = b ? h.filter((p) => p !== u) : [...h, u] : v = b ? [] : [u], d(o.key, v);
|
|
276
276
|
};
|
|
277
|
-
return e.length === 0 ? null : /* @__PURE__ */
|
|
277
|
+
return e.length === 0 ? null : /* @__PURE__ */ m(
|
|
278
278
|
"div",
|
|
279
279
|
{
|
|
280
280
|
"data-component": "practice-results-filters",
|
|
281
281
|
role: "group",
|
|
282
282
|
"aria-label": i("practiceResults.filters.label"),
|
|
283
|
-
className:
|
|
283
|
+
className: mt({
|
|
284
284
|
placement: r ? "floating" : "inline"
|
|
285
285
|
}),
|
|
286
286
|
children: [
|
|
287
|
-
e.map((
|
|
288
|
-
const
|
|
289
|
-
if (
|
|
287
|
+
e.map((o) => {
|
|
288
|
+
const u = o.options.length === 0, h = a[o.key] ?? [], b = h.length > 0;
|
|
289
|
+
if (u)
|
|
290
290
|
return /* @__PURE__ */ t(
|
|
291
291
|
"button",
|
|
292
292
|
{
|
|
293
293
|
type: "button",
|
|
294
|
-
"aria-pressed":
|
|
295
|
-
"aria-label":
|
|
296
|
-
onClick: () => o
|
|
297
|
-
className:
|
|
298
|
-
state:
|
|
294
|
+
"aria-pressed": b,
|
|
295
|
+
"aria-label": o.label,
|
|
296
|
+
onClick: () => l(o.key),
|
|
297
|
+
className: te({
|
|
298
|
+
state: b ? "active" : "idle"
|
|
299
299
|
}),
|
|
300
|
-
children: /* @__PURE__ */ t("span", { children:
|
|
300
|
+
children: /* @__PURE__ */ t("span", { children: o.label })
|
|
301
301
|
},
|
|
302
|
-
|
|
302
|
+
o.key
|
|
303
303
|
);
|
|
304
|
-
const
|
|
305
|
-
return /* @__PURE__ */
|
|
306
|
-
/* @__PURE__ */ t(
|
|
304
|
+
const v = b ? ` (${h.length})` : "";
|
|
305
|
+
return /* @__PURE__ */ m(H.Root, { children: [
|
|
306
|
+
/* @__PURE__ */ t(H.Trigger, { asChild: !0, children: /* @__PURE__ */ m(
|
|
307
307
|
"button",
|
|
308
308
|
{
|
|
309
309
|
type: "button",
|
|
310
|
-
"aria-label": `${
|
|
311
|
-
className:
|
|
312
|
-
state:
|
|
310
|
+
"aria-label": `${o.label}${v}`,
|
|
311
|
+
className: te({
|
|
312
|
+
state: b ? "active" : "idle"
|
|
313
313
|
}),
|
|
314
314
|
children: [
|
|
315
|
-
/* @__PURE__ */
|
|
316
|
-
|
|
317
|
-
|
|
315
|
+
/* @__PURE__ */ m("span", { children: [
|
|
316
|
+
o.label,
|
|
317
|
+
v
|
|
318
318
|
] }),
|
|
319
319
|
/* @__PURE__ */ t(
|
|
320
|
-
|
|
320
|
+
Ce,
|
|
321
321
|
{
|
|
322
322
|
"aria-hidden": "true",
|
|
323
323
|
className: "ds:size-3.5 ds:shrink-0"
|
|
@@ -326,27 +326,27 @@ function ze({
|
|
|
326
326
|
]
|
|
327
327
|
}
|
|
328
328
|
) }),
|
|
329
|
-
/* @__PURE__ */ t(
|
|
330
|
-
|
|
329
|
+
/* @__PURE__ */ t(H.Content, { sideOffset: 8, align: "start", children: o.options.map((p) => /* @__PURE__ */ t(
|
|
330
|
+
H.CheckboxItem,
|
|
331
331
|
{
|
|
332
|
-
checked:
|
|
333
|
-
onSelect: (
|
|
334
|
-
|
|
332
|
+
checked: h.includes(p.value),
|
|
333
|
+
onSelect: (f) => {
|
|
334
|
+
o.multi && f.preventDefault(), g(o, p.value);
|
|
335
335
|
},
|
|
336
|
-
children:
|
|
336
|
+
children: p.label
|
|
337
337
|
},
|
|
338
|
-
|
|
338
|
+
p.value
|
|
339
339
|
)) })
|
|
340
|
-
] },
|
|
340
|
+
] }, o.key);
|
|
341
341
|
}),
|
|
342
|
-
|
|
342
|
+
c ? /* @__PURE__ */ t(
|
|
343
343
|
"button",
|
|
344
344
|
{
|
|
345
345
|
type: "button",
|
|
346
346
|
onClick: () => {
|
|
347
|
-
|
|
347
|
+
s({}), $("serp_filter_changed", { key: "*", values: [] });
|
|
348
348
|
},
|
|
349
|
-
className:
|
|
349
|
+
className: pt(),
|
|
350
350
|
children: i("practiceResults.filters.clear")
|
|
351
351
|
}
|
|
352
352
|
) : null
|
|
@@ -354,61 +354,61 @@ function ze({
|
|
|
354
354
|
}
|
|
355
355
|
);
|
|
356
356
|
}
|
|
357
|
-
function
|
|
358
|
-
const { t:
|
|
357
|
+
function de({ value: e, onChange: n }) {
|
|
358
|
+
const { t: s } = C(), r = (i) => {
|
|
359
359
|
switch (i) {
|
|
360
360
|
case "distance":
|
|
361
|
-
return
|
|
361
|
+
return s("practiceResults.sort.distance");
|
|
362
362
|
case "rating":
|
|
363
|
-
return
|
|
363
|
+
return s("practiceResults.sort.rating");
|
|
364
364
|
case "next-available":
|
|
365
|
-
return
|
|
365
|
+
return s("practiceResults.sort.nextAvailable");
|
|
366
366
|
case "relevance":
|
|
367
367
|
default:
|
|
368
|
-
return
|
|
368
|
+
return s("practiceResults.sort.relevance");
|
|
369
369
|
}
|
|
370
370
|
};
|
|
371
|
-
return /* @__PURE__ */
|
|
372
|
-
/* @__PURE__ */ t(
|
|
371
|
+
return /* @__PURE__ */ m(H.Root, { children: [
|
|
372
|
+
/* @__PURE__ */ t(H.Trigger, { asChild: !0, children: /* @__PURE__ */ m(
|
|
373
373
|
"button",
|
|
374
374
|
{
|
|
375
375
|
type: "button",
|
|
376
|
-
"aria-label": `${
|
|
377
|
-
className:
|
|
376
|
+
"aria-label": `${s("practiceResults.sort.label")}: ${r(e)}`,
|
|
377
|
+
className: te({ state: "idle" }),
|
|
378
378
|
children: [
|
|
379
|
-
/* @__PURE__ */
|
|
380
|
-
|
|
379
|
+
/* @__PURE__ */ m("span", { children: [
|
|
380
|
+
s("practiceResults.sort.label"),
|
|
381
381
|
": ",
|
|
382
382
|
r(e)
|
|
383
383
|
] }),
|
|
384
|
-
/* @__PURE__ */ t(
|
|
384
|
+
/* @__PURE__ */ t(Ce, { "aria-hidden": "true", className: "ds:size-3.5 ds:shrink-0" })
|
|
385
385
|
]
|
|
386
386
|
}
|
|
387
387
|
) }),
|
|
388
|
-
/* @__PURE__ */ t(
|
|
389
|
-
|
|
388
|
+
/* @__PURE__ */ t(H.Content, { sideOffset: 8, align: "end", children: /* @__PURE__ */ t(
|
|
389
|
+
H.RadioGroup,
|
|
390
390
|
{
|
|
391
391
|
value: e,
|
|
392
392
|
onValueChange: (i) => {
|
|
393
|
-
const
|
|
394
|
-
|
|
393
|
+
const a = i;
|
|
394
|
+
a !== e && (n(a), $("serp_sort_changed", { sort: a }));
|
|
395
395
|
},
|
|
396
|
-
children:
|
|
396
|
+
children: lt.map((i) => /* @__PURE__ */ t(H.RadioItem, { value: i, children: r(i) }, i))
|
|
397
397
|
}
|
|
398
398
|
) })
|
|
399
399
|
] });
|
|
400
400
|
}
|
|
401
401
|
function _e({ distanceKm: e }) {
|
|
402
|
-
const { t: n, i18n:
|
|
402
|
+
const { t: n, i18n: s } = C(), r = D(() => {
|
|
403
403
|
if (e < 1) return n("practiceResults.distance.below");
|
|
404
|
-
const i = new Intl.NumberFormat(
|
|
404
|
+
const i = new Intl.NumberFormat(s.language, {
|
|
405
405
|
maximumFractionDigits: 1
|
|
406
406
|
}).format(e);
|
|
407
407
|
return n("practiceResults.distance.km", { distance: i });
|
|
408
|
-
}, [e, n,
|
|
409
|
-
return /* @__PURE__ */ t(
|
|
408
|
+
}, [e, n, s.language]);
|
|
409
|
+
return /* @__PURE__ */ t(L, { variant: "neutral", leading: /* @__PURE__ */ t(ne, { "aria-hidden": "true" }), children: r });
|
|
410
410
|
}
|
|
411
|
-
const
|
|
411
|
+
const Re = Z(
|
|
412
412
|
[
|
|
413
413
|
"ds:inline-size-[12rem] ds:block-size-[8rem] ds:shrink-0",
|
|
414
414
|
"ds:rounded-[var(--radius-md)] ds:overflow-hidden"
|
|
@@ -427,45 +427,45 @@ const ye = Z(
|
|
|
427
427
|
defaultVariants: { state: "placeholder" }
|
|
428
428
|
}
|
|
429
429
|
);
|
|
430
|
-
function
|
|
430
|
+
function ft() {
|
|
431
431
|
if (typeof document > "u") return "4945a3";
|
|
432
432
|
const e = getComputedStyle(document.documentElement).getPropertyValue("--map-marker-color").trim(), n = /^#?([0-9a-fA-F]{6})$/.exec(e);
|
|
433
433
|
return n ? n[1] : "4945a3";
|
|
434
434
|
}
|
|
435
|
-
function
|
|
435
|
+
function ht({
|
|
436
436
|
apiKey: e,
|
|
437
437
|
center: n,
|
|
438
|
-
zoom:
|
|
438
|
+
zoom: s = 14,
|
|
439
439
|
address: r
|
|
440
440
|
}) {
|
|
441
|
-
const { t: i } =
|
|
441
|
+
const { t: i } = C();
|
|
442
442
|
if (!e)
|
|
443
|
-
return /* @__PURE__ */
|
|
443
|
+
return /* @__PURE__ */ m(
|
|
444
444
|
"div",
|
|
445
445
|
{
|
|
446
446
|
"aria-hidden": r ? void 0 : "true",
|
|
447
|
-
className:
|
|
447
|
+
className: Re({ state: "placeholder" }),
|
|
448
448
|
children: [
|
|
449
|
-
/* @__PURE__ */ t(
|
|
449
|
+
/* @__PURE__ */ t(ne, { "aria-hidden": "true", className: "ds:size-5 ds:shrink-0" }),
|
|
450
450
|
r ? /* @__PURE__ */ t("span", { className: "type-meta ds:[overflow-wrap:anywhere]", children: r }) : null
|
|
451
451
|
]
|
|
452
452
|
}
|
|
453
453
|
);
|
|
454
|
-
const
|
|
454
|
+
const a = ft(), 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)}`;
|
|
455
455
|
return /* @__PURE__ */ t(
|
|
456
456
|
"img",
|
|
457
457
|
{
|
|
458
|
-
src:
|
|
458
|
+
src: c,
|
|
459
459
|
alt: i("practiceResults.thumbnail.alt"),
|
|
460
460
|
loading: "lazy",
|
|
461
461
|
decoding: "async",
|
|
462
462
|
width: 240,
|
|
463
463
|
height: 160,
|
|
464
|
-
className:
|
|
464
|
+
className: Re({ state: "image" })
|
|
465
465
|
}
|
|
466
466
|
);
|
|
467
467
|
}
|
|
468
|
-
const
|
|
468
|
+
const Te = Z(
|
|
469
469
|
[
|
|
470
470
|
"ds:relative ds:flex ds:w-full ds:cursor-pointer",
|
|
471
471
|
"ds:rounded-[var(--radius-lg)]",
|
|
@@ -494,24 +494,24 @@ const Ie = Z(
|
|
|
494
494
|
defaultVariants: { density: "compact" }
|
|
495
495
|
}
|
|
496
496
|
);
|
|
497
|
-
function
|
|
497
|
+
function gt({
|
|
498
498
|
result: e,
|
|
499
499
|
highlighted: n,
|
|
500
|
-
onSelect:
|
|
500
|
+
onSelect: s,
|
|
501
501
|
onOpenClick: r,
|
|
502
502
|
onHover: i,
|
|
503
|
-
density:
|
|
504
|
-
openLabel:
|
|
505
|
-
nextSlotText:
|
|
506
|
-
maxInsuranceChips:
|
|
503
|
+
density: a = "compact",
|
|
504
|
+
openLabel: c,
|
|
505
|
+
nextSlotText: d,
|
|
506
|
+
maxInsuranceChips: l = 3,
|
|
507
507
|
maxLanguageChips: g = 4,
|
|
508
|
-
children:
|
|
508
|
+
children: o
|
|
509
509
|
}) {
|
|
510
|
-
var
|
|
511
|
-
const { t:
|
|
510
|
+
var T, P, q, U, O, B;
|
|
511
|
+
const { t: u, i18n: h } = C(), b = e.rating, v = (T = e.location) == null ? void 0 : T.distanceKm, p = (((P = e.languages) == null ? void 0 : P.length) ?? 0) > 0, f = (((q = e.insurances) == null ? void 0 : q.length) ?? 0) > 0, y = e.specializedInFearPatients, S = p || f || y, R = (e.languages ?? []).slice(0, g), M = (((U = e.languages) == null ? void 0 : U.length) ?? 0) - R.length, A = (e.insurances ?? []).slice(0, l), _ = (((O = e.insurances) == null ? void 0 : O.length) ?? 0) - A.length;
|
|
512
512
|
return (
|
|
513
513
|
// 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.
|
|
514
|
-
/* @__PURE__ */
|
|
514
|
+
/* @__PURE__ */ m(
|
|
515
515
|
"div",
|
|
516
516
|
{
|
|
517
517
|
"data-component": "practice-result-card",
|
|
@@ -519,15 +519,15 @@ function ht({
|
|
|
519
519
|
"data-highlighted": n ? "true" : "false",
|
|
520
520
|
role: "group",
|
|
521
521
|
"aria-labelledby": `practice-result-${e.id}-name`,
|
|
522
|
-
onClick:
|
|
522
|
+
onClick: s,
|
|
523
523
|
onMouseEnter: i,
|
|
524
524
|
onFocus: i,
|
|
525
|
-
className:
|
|
525
|
+
className: Te({ density: a }),
|
|
526
526
|
children: [
|
|
527
|
-
/* @__PURE__ */ t(
|
|
528
|
-
/* @__PURE__ */
|
|
529
|
-
/* @__PURE__ */
|
|
530
|
-
/* @__PURE__ */
|
|
527
|
+
/* @__PURE__ */ t(we, { src: e.imageUrl, name: e.name, size: "lg" }),
|
|
528
|
+
/* @__PURE__ */ m("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-xs)]", children: [
|
|
529
|
+
/* @__PURE__ */ m("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
530
|
+
/* @__PURE__ */ m("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
531
531
|
/* @__PURE__ */ t(
|
|
532
532
|
"span",
|
|
533
533
|
{
|
|
@@ -536,55 +536,55 @@ function ht({
|
|
|
536
536
|
children: e.name
|
|
537
537
|
}
|
|
538
538
|
),
|
|
539
|
-
|
|
539
|
+
v != null ? /* @__PURE__ */ t(_e, { distanceKm: v }) : null
|
|
540
540
|
] }),
|
|
541
541
|
e.subtitle ? /* @__PURE__ */ t("span", { className: "type-body-sm ds:text-[var(--muted-foreground)]", children: e.subtitle }) : null,
|
|
542
|
-
(B = e.location) != null && B.address ? /* @__PURE__ */
|
|
543
|
-
/* @__PURE__ */ t(
|
|
542
|
+
(B = e.location) != null && B.address ? /* @__PURE__ */ m("span", { className: "type-meta ds:text-[var(--muted-foreground)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
|
|
543
|
+
/* @__PURE__ */ t(ne, { "aria-hidden": "true", className: "ds:size-3.5 ds:shrink-0" }),
|
|
544
544
|
e.location.address
|
|
545
545
|
] }) : null
|
|
546
546
|
] }),
|
|
547
|
-
|
|
548
|
-
|
|
547
|
+
b && b.count > 0 ? /* @__PURE__ */ t(
|
|
548
|
+
ke,
|
|
549
549
|
{
|
|
550
|
-
value:
|
|
551
|
-
reviews: { count:
|
|
550
|
+
value: b.value,
|
|
551
|
+
reviews: { count: b.count },
|
|
552
552
|
size: "sm"
|
|
553
553
|
}
|
|
554
554
|
) : null,
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
555
|
+
S ? /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
556
|
+
R.map((N) => /* @__PURE__ */ t(
|
|
557
|
+
L,
|
|
558
558
|
{
|
|
559
559
|
variant: "neutral",
|
|
560
|
-
leading: /* @__PURE__ */ t(
|
|
561
|
-
children:
|
|
560
|
+
leading: /* @__PURE__ */ t(Ne, { "aria-hidden": "true" }),
|
|
561
|
+
children: Ae(N, u, h)
|
|
562
562
|
},
|
|
563
563
|
`lang-${N}`
|
|
564
564
|
)),
|
|
565
|
-
M > 0 ? /* @__PURE__ */ t(
|
|
566
|
-
|
|
567
|
-
|
|
565
|
+
M > 0 ? /* @__PURE__ */ t(L, { variant: "neutral", children: `+${M}` }) : null,
|
|
566
|
+
A.map((N) => /* @__PURE__ */ t(
|
|
567
|
+
L,
|
|
568
568
|
{
|
|
569
569
|
variant: "info",
|
|
570
|
-
leading: /* @__PURE__ */ t(
|
|
570
|
+
leading: /* @__PURE__ */ t(Se, { "aria-hidden": "true" }),
|
|
571
571
|
children: N
|
|
572
572
|
},
|
|
573
573
|
`ins-${N}`
|
|
574
574
|
)),
|
|
575
|
-
|
|
576
|
-
|
|
575
|
+
_ > 0 ? /* @__PURE__ */ t(L, { variant: "neutral", children: `+${_}` }) : null,
|
|
576
|
+
y ? /* @__PURE__ */ t(L, { variant: "info", leading: /* @__PURE__ */ t(Pe, { "aria-hidden": "true" }), children: u("practiceResults.fearPatient.label") }) : null
|
|
577
577
|
] }) : null,
|
|
578
|
-
e.nextAvailableSlot &&
|
|
579
|
-
/* @__PURE__ */
|
|
578
|
+
e.nextAvailableSlot && d ? /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
579
|
+
/* @__PURE__ */ m("span", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
580
580
|
/* @__PURE__ */ t(
|
|
581
|
-
|
|
581
|
+
Me,
|
|
582
582
|
{
|
|
583
583
|
"aria-hidden": "true",
|
|
584
584
|
className: "ds:size-4 ds:text-[var(--primary)]"
|
|
585
585
|
}
|
|
586
586
|
),
|
|
587
|
-
|
|
587
|
+
u("practiceResults.nextSlot.summary", { time: d })
|
|
588
588
|
] }),
|
|
589
589
|
/* @__PURE__ */ t(
|
|
590
590
|
G,
|
|
@@ -600,13 +600,13 @@ function ht({
|
|
|
600
600
|
{
|
|
601
601
|
href: e.nextAvailableSlot.bookingHref,
|
|
602
602
|
"data-component": "practice-result-next-slot-cta",
|
|
603
|
-
children:
|
|
603
|
+
children: u("practiceResults.nextSlot.cta", { time: d })
|
|
604
604
|
}
|
|
605
605
|
)
|
|
606
606
|
}
|
|
607
607
|
)
|
|
608
608
|
] }) : null,
|
|
609
|
-
|
|
609
|
+
o,
|
|
610
610
|
/* @__PURE__ */ t("div", { className: "ds:mt-[var(--spacing-xs)] ds:flex ds:justify-end", children: /* @__PURE__ */ t(
|
|
611
611
|
G,
|
|
612
612
|
{
|
|
@@ -616,7 +616,7 @@ function ht({
|
|
|
616
616
|
onClick: (N) => {
|
|
617
617
|
N.stopPropagation(), r();
|
|
618
618
|
},
|
|
619
|
-
children: /* @__PURE__ */ t("a", { href: e.href, "data-component": "practice-result-open-cta", children:
|
|
619
|
+
children: /* @__PURE__ */ t("a", { href: e.href, "data-component": "practice-result-open-cta", children: c })
|
|
620
620
|
}
|
|
621
621
|
) })
|
|
622
622
|
] })
|
|
@@ -625,20 +625,20 @@ function ht({
|
|
|
625
625
|
)
|
|
626
626
|
);
|
|
627
627
|
}
|
|
628
|
-
function
|
|
628
|
+
function vt({
|
|
629
629
|
result: e,
|
|
630
630
|
apiKey: n,
|
|
631
|
-
highlighted:
|
|
631
|
+
highlighted: s,
|
|
632
632
|
onSelect: r,
|
|
633
633
|
onOpenClick: i,
|
|
634
|
-
onHover:
|
|
635
|
-
openLabel:
|
|
634
|
+
onHover: a,
|
|
635
|
+
openLabel: c
|
|
636
636
|
}) {
|
|
637
|
-
var
|
|
638
|
-
const { t:
|
|
637
|
+
var p, f, y, S;
|
|
638
|
+
const { t: d, i18n: l } = C(), g = D(() => {
|
|
639
639
|
if (e.nextAvailableSlot)
|
|
640
640
|
try {
|
|
641
|
-
return new Intl.DateTimeFormat(
|
|
641
|
+
return new Intl.DateTimeFormat(l.language, {
|
|
642
642
|
weekday: "short",
|
|
643
643
|
hour: "numeric",
|
|
644
644
|
minute: "numeric"
|
|
@@ -646,25 +646,25 @@ function gt({
|
|
|
646
646
|
} catch {
|
|
647
647
|
return e.nextAvailableSlot.dateTime;
|
|
648
648
|
}
|
|
649
|
-
}, [e.nextAvailableSlot,
|
|
649
|
+
}, [e.nextAvailableSlot, l.language]), o = (((p = e.languages) == null ? void 0 : p.length) ?? 0) > 0, u = (((f = e.insurances) == null ? void 0 : f.length) ?? 0) > 0, h = e.specializedInFearPatients, b = o || u || h, v = (y = e.location) == null ? void 0 : y.distanceKm;
|
|
650
650
|
return (
|
|
651
651
|
// 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.
|
|
652
|
-
/* @__PURE__ */
|
|
652
|
+
/* @__PURE__ */ m(
|
|
653
653
|
"div",
|
|
654
654
|
{
|
|
655
655
|
"data-component": "practice-result-card",
|
|
656
656
|
"data-result-id": e.id,
|
|
657
657
|
"data-density": "rich",
|
|
658
|
-
"data-highlighted":
|
|
658
|
+
"data-highlighted": s ? "true" : "false",
|
|
659
659
|
role: "group",
|
|
660
660
|
"aria-labelledby": `practice-result-${e.id}-name`,
|
|
661
661
|
onClick: r,
|
|
662
|
-
onMouseEnter:
|
|
663
|
-
onFocus:
|
|
664
|
-
className:
|
|
662
|
+
onMouseEnter: a,
|
|
663
|
+
onFocus: a,
|
|
664
|
+
className: Te({ density: "rich" }),
|
|
665
665
|
children: [
|
|
666
666
|
e.location ? /* @__PURE__ */ t(
|
|
667
|
-
|
|
667
|
+
ht,
|
|
668
668
|
{
|
|
669
669
|
apiKey: n,
|
|
670
670
|
center: {
|
|
@@ -674,11 +674,11 @@ function gt({
|
|
|
674
674
|
address: e.location.address
|
|
675
675
|
}
|
|
676
676
|
) : null,
|
|
677
|
-
/* @__PURE__ */
|
|
678
|
-
/* @__PURE__ */
|
|
679
|
-
/* @__PURE__ */ t(
|
|
680
|
-
/* @__PURE__ */
|
|
681
|
-
/* @__PURE__ */
|
|
677
|
+
/* @__PURE__ */ m("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
678
|
+
/* @__PURE__ */ m("div", { className: "ds:flex ds:items-start ds:gap-[var(--spacing-md)]", children: [
|
|
679
|
+
/* @__PURE__ */ t(we, { src: e.imageUrl, name: e.name, size: "md" }),
|
|
680
|
+
/* @__PURE__ */ m("div", { className: "ds:flex ds:min-w-0 ds:flex-1 ds:flex-col ds:gap-[var(--spacing-2xs)]", children: [
|
|
681
|
+
/* @__PURE__ */ m("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
682
682
|
/* @__PURE__ */ t(
|
|
683
683
|
"span",
|
|
684
684
|
{
|
|
@@ -687,12 +687,12 @@ function gt({
|
|
|
687
687
|
children: e.name
|
|
688
688
|
}
|
|
689
689
|
),
|
|
690
|
-
|
|
690
|
+
v != null ? /* @__PURE__ */ t(_e, { distanceKm: v }) : null
|
|
691
691
|
] }),
|
|
692
692
|
e.subtitle ? /* @__PURE__ */ t("span", { className: "type-body-sm ds:text-[var(--muted-foreground)]", children: e.subtitle }) : null,
|
|
693
|
-
(
|
|
693
|
+
(S = e.location) != null && S.address ? /* @__PURE__ */ m("span", { className: "type-meta ds:text-[var(--muted-foreground)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]", children: [
|
|
694
694
|
/* @__PURE__ */ t(
|
|
695
|
-
|
|
695
|
+
ne,
|
|
696
696
|
{
|
|
697
697
|
"aria-hidden": "true",
|
|
698
698
|
className: "ds:size-3.5 ds:shrink-0"
|
|
@@ -702,7 +702,7 @@ function gt({
|
|
|
702
702
|
] }) : null
|
|
703
703
|
] }),
|
|
704
704
|
e.rating && e.rating.count > 0 ? /* @__PURE__ */ t(
|
|
705
|
-
|
|
705
|
+
ke,
|
|
706
706
|
{
|
|
707
707
|
value: e.rating.value,
|
|
708
708
|
reviews: { count: e.rating.count },
|
|
@@ -710,37 +710,37 @@ function gt({
|
|
|
710
710
|
}
|
|
711
711
|
) : null
|
|
712
712
|
] }),
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
713
|
+
b ? /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
714
|
+
o ? (e.languages ?? []).map((R) => /* @__PURE__ */ t(
|
|
715
|
+
L,
|
|
716
716
|
{
|
|
717
717
|
variant: "neutral",
|
|
718
|
-
leading: /* @__PURE__ */ t(
|
|
719
|
-
children:
|
|
718
|
+
leading: /* @__PURE__ */ t(Ne, { "aria-hidden": "true" }),
|
|
719
|
+
children: Ae(R, d, l)
|
|
720
720
|
},
|
|
721
|
-
`lang-${
|
|
721
|
+
`lang-${R}`
|
|
722
722
|
)) : null,
|
|
723
|
-
|
|
724
|
-
|
|
723
|
+
u ? (e.insurances ?? []).map((R) => /* @__PURE__ */ t(
|
|
724
|
+
L,
|
|
725
725
|
{
|
|
726
726
|
variant: "info",
|
|
727
|
-
leading: /* @__PURE__ */ t(
|
|
728
|
-
children:
|
|
727
|
+
leading: /* @__PURE__ */ t(Se, { "aria-hidden": "true" }),
|
|
728
|
+
children: R
|
|
729
729
|
},
|
|
730
|
-
`ins-${
|
|
730
|
+
`ins-${R}`
|
|
731
731
|
)) : null,
|
|
732
|
-
|
|
732
|
+
h ? /* @__PURE__ */ t(L, { variant: "info", leading: /* @__PURE__ */ t(Pe, { "aria-hidden": "true" }), children: d("practiceResults.fearPatient.label") }) : null
|
|
733
733
|
] }) : null,
|
|
734
|
-
e.nextAvailableSlot && g ? /* @__PURE__ */
|
|
735
|
-
/* @__PURE__ */
|
|
734
|
+
e.nextAvailableSlot && g ? /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
735
|
+
/* @__PURE__ */ m("span", { className: "type-body-sm ds:text-[var(--muted-foreground)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
736
736
|
/* @__PURE__ */ t(
|
|
737
|
-
|
|
737
|
+
Me,
|
|
738
738
|
{
|
|
739
739
|
"aria-hidden": "true",
|
|
740
740
|
className: "ds:size-4 ds:text-[var(--primary)]"
|
|
741
741
|
}
|
|
742
742
|
),
|
|
743
|
-
|
|
743
|
+
d("practiceResults.nextSlot.summary", { time: g })
|
|
744
744
|
] }),
|
|
745
745
|
/* @__PURE__ */ t(
|
|
746
746
|
G,
|
|
@@ -748,15 +748,15 @@ function gt({
|
|
|
748
748
|
intent: "primary",
|
|
749
749
|
size: "sm",
|
|
750
750
|
asChild: !0,
|
|
751
|
-
onClick: (
|
|
752
|
-
|
|
751
|
+
onClick: (R) => {
|
|
752
|
+
R.stopPropagation();
|
|
753
753
|
},
|
|
754
754
|
children: /* @__PURE__ */ t(
|
|
755
755
|
"a",
|
|
756
756
|
{
|
|
757
757
|
href: e.nextAvailableSlot.bookingHref,
|
|
758
758
|
"data-component": "practice-result-next-slot-cta",
|
|
759
|
-
children:
|
|
759
|
+
children: d("practiceResults.nextSlot.cta", { time: g })
|
|
760
760
|
}
|
|
761
761
|
)
|
|
762
762
|
}
|
|
@@ -768,10 +768,10 @@ function gt({
|
|
|
768
768
|
intent: "secondary",
|
|
769
769
|
size: "sm",
|
|
770
770
|
asChild: !0,
|
|
771
|
-
onClick: (
|
|
772
|
-
|
|
771
|
+
onClick: (R) => {
|
|
772
|
+
R.stopPropagation(), i();
|
|
773
773
|
},
|
|
774
|
-
children: /* @__PURE__ */ t("a", { href: e.href, "data-component": "practice-result-open-cta", children:
|
|
774
|
+
children: /* @__PURE__ */ t("a", { href: e.href, "data-component": "practice-result-open-cta", children: c })
|
|
775
775
|
}
|
|
776
776
|
) })
|
|
777
777
|
] })
|
|
@@ -780,155 +780,157 @@ function gt({
|
|
|
780
780
|
)
|
|
781
781
|
);
|
|
782
782
|
}
|
|
783
|
-
function
|
|
783
|
+
function pe({
|
|
784
784
|
results: e,
|
|
785
785
|
highlightedId: n,
|
|
786
|
-
onCardHover:
|
|
786
|
+
onCardHover: s,
|
|
787
787
|
onCardSelect: r,
|
|
788
788
|
onCardOpenClick: i,
|
|
789
|
-
openLabel:
|
|
790
|
-
formatNextSlot:
|
|
791
|
-
onLoadMore:
|
|
792
|
-
loadingMore:
|
|
789
|
+
openLabel: a,
|
|
790
|
+
formatNextSlot: c,
|
|
791
|
+
onLoadMore: d,
|
|
792
|
+
loadingMore: l,
|
|
793
793
|
loadingSkeletons: g,
|
|
794
|
-
density:
|
|
795
|
-
apiKey:
|
|
796
|
-
containerRef:
|
|
794
|
+
density: o = "compact",
|
|
795
|
+
apiKey: u,
|
|
796
|
+
containerRef: h
|
|
797
797
|
}) {
|
|
798
|
-
const { t:
|
|
798
|
+
const { t: b } = C(), v = I(null);
|
|
799
799
|
return J(() => {
|
|
800
|
-
if (!
|
|
801
|
-
const
|
|
802
|
-
if (!
|
|
803
|
-
const
|
|
804
|
-
(
|
|
805
|
-
for (const
|
|
806
|
-
|
|
800
|
+
if (!d) return;
|
|
801
|
+
const p = v.current;
|
|
802
|
+
if (!p || typeof IntersectionObserver > "u") return;
|
|
803
|
+
const f = new IntersectionObserver(
|
|
804
|
+
(y) => {
|
|
805
|
+
for (const S of y)
|
|
806
|
+
S.isIntersecting && ($("serp_load_more", {
|
|
807
807
|
currentCount: e.length
|
|
808
|
-
}),
|
|
808
|
+
}), d());
|
|
809
809
|
},
|
|
810
810
|
{ root: null, rootMargin: "200px" }
|
|
811
811
|
);
|
|
812
|
-
return
|
|
813
|
-
}, [
|
|
812
|
+
return f.observe(p), () => f.disconnect();
|
|
813
|
+
}, [d, e.length]), g ? /* @__PURE__ */ t(
|
|
814
814
|
"div",
|
|
815
815
|
{
|
|
816
816
|
role: "status",
|
|
817
817
|
"aria-live": "polite",
|
|
818
|
-
"aria-label":
|
|
818
|
+
"aria-label": b("practiceResults.loading"),
|
|
819
819
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]",
|
|
820
|
-
children: Array.from({ length: 4 }).map((
|
|
821
|
-
|
|
820
|
+
children: Array.from({ length: 4 }).map((p, f) => /* @__PURE__ */ t(
|
|
821
|
+
We,
|
|
822
822
|
{
|
|
823
823
|
variant: "rounded",
|
|
824
|
-
height:
|
|
824
|
+
height: o === "rich" ? "11rem" : "7rem"
|
|
825
825
|
},
|
|
826
|
-
`pr-skel-${
|
|
826
|
+
`pr-skel-${f}`
|
|
827
827
|
))
|
|
828
828
|
}
|
|
829
|
-
) : /* @__PURE__ */
|
|
829
|
+
) : /* @__PURE__ */ m(
|
|
830
830
|
"div",
|
|
831
831
|
{
|
|
832
|
-
ref:
|
|
832
|
+
ref: h,
|
|
833
833
|
"data-component": "practice-results-list",
|
|
834
834
|
role: "list",
|
|
835
|
-
"aria-label":
|
|
835
|
+
"aria-label": b("practiceResults.list.label"),
|
|
836
836
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:overflow-y-auto",
|
|
837
837
|
children: [
|
|
838
|
-
e.map((
|
|
839
|
-
|
|
838
|
+
e.map((p) => /* @__PURE__ */ t("div", { role: "listitem", children: o === "rich" ? /* @__PURE__ */ t(
|
|
839
|
+
vt,
|
|
840
840
|
{
|
|
841
|
-
result:
|
|
842
|
-
apiKey:
|
|
843
|
-
highlighted: n ===
|
|
844
|
-
onSelect: () => r(
|
|
845
|
-
onOpenClick: () => i(
|
|
846
|
-
onHover: () =>
|
|
847
|
-
openLabel:
|
|
841
|
+
result: p,
|
|
842
|
+
apiKey: u,
|
|
843
|
+
highlighted: n === p.id,
|
|
844
|
+
onSelect: () => r(p.id),
|
|
845
|
+
onOpenClick: () => i(p.id),
|
|
846
|
+
onHover: () => s(p.id),
|
|
847
|
+
openLabel: a
|
|
848
848
|
}
|
|
849
849
|
) : /* @__PURE__ */ t(
|
|
850
|
-
|
|
850
|
+
gt,
|
|
851
851
|
{
|
|
852
|
-
result:
|
|
853
|
-
highlighted: n ===
|
|
854
|
-
onSelect: () => r(
|
|
855
|
-
onOpenClick: () => i(
|
|
856
|
-
onHover: () =>
|
|
857
|
-
openLabel:
|
|
858
|
-
nextSlotText:
|
|
852
|
+
result: p,
|
|
853
|
+
highlighted: n === p.id,
|
|
854
|
+
onSelect: () => r(p.id),
|
|
855
|
+
onOpenClick: () => i(p.id),
|
|
856
|
+
onHover: () => s(p.id),
|
|
857
|
+
openLabel: a,
|
|
858
|
+
nextSlotText: c(p)
|
|
859
859
|
}
|
|
860
|
-
) },
|
|
861
|
-
|
|
860
|
+
) }, p.id)),
|
|
861
|
+
d ? /* @__PURE__ */ t(
|
|
862
862
|
"div",
|
|
863
863
|
{
|
|
864
|
-
ref:
|
|
864
|
+
ref: v,
|
|
865
865
|
"aria-hidden": "true",
|
|
866
866
|
className: "ds:flex ds:items-center ds:justify-center ds:py-[var(--spacing-md)]",
|
|
867
|
-
children:
|
|
867
|
+
children: l ? /* @__PURE__ */ t(Xe, { size: "md", variant: "pulse" }) : /* @__PURE__ */ t("span", { className: "ds:size-1" })
|
|
868
868
|
}
|
|
869
869
|
) : null
|
|
870
870
|
]
|
|
871
871
|
}
|
|
872
872
|
);
|
|
873
873
|
}
|
|
874
|
-
function
|
|
874
|
+
function ue({
|
|
875
875
|
results: e,
|
|
876
876
|
searchCentre: n,
|
|
877
|
-
zoom:
|
|
877
|
+
zoom: s,
|
|
878
878
|
apiKey: r,
|
|
879
|
-
|
|
880
|
-
|
|
879
|
+
mapId: i,
|
|
880
|
+
highlightedId: a,
|
|
881
|
+
onPinClick: c,
|
|
881
882
|
onPinHover: d,
|
|
882
|
-
onPinFirstInteract:
|
|
883
|
-
onBoundsChange:
|
|
884
|
-
consentGranted:
|
|
885
|
-
onConsentRequest:
|
|
886
|
-
mapHandleRef:
|
|
883
|
+
onPinFirstInteract: l,
|
|
884
|
+
onBoundsChange: g,
|
|
885
|
+
consentGranted: o,
|
|
886
|
+
onConsentRequest: u,
|
|
887
|
+
mapHandleRef: h
|
|
887
888
|
}) {
|
|
888
|
-
const { t:
|
|
889
|
+
const { t: b } = C(), v = D(
|
|
889
890
|
() => e.filter(
|
|
890
|
-
(
|
|
891
|
-
).map((
|
|
892
|
-
id:
|
|
891
|
+
(f) => !!f.location
|
|
892
|
+
).map((f) => ({
|
|
893
|
+
id: f.id,
|
|
893
894
|
position: {
|
|
894
|
-
lat:
|
|
895
|
-
lng:
|
|
895
|
+
lat: f.location.lat,
|
|
896
|
+
lng: f.location.lng
|
|
896
897
|
},
|
|
897
|
-
label:
|
|
898
|
+
label: f.name
|
|
898
899
|
})),
|
|
899
900
|
[e]
|
|
900
|
-
),
|
|
901
|
+
), p = D(() => {
|
|
901
902
|
if (n) return n;
|
|
902
|
-
const
|
|
903
|
-
return
|
|
904
|
-
lat: (
|
|
905
|
-
lng: (
|
|
903
|
+
const f = ye(e);
|
|
904
|
+
return f ? {
|
|
905
|
+
lat: (f.north + f.south) / 2,
|
|
906
|
+
lng: (f.east + f.west) / 2
|
|
906
907
|
} : { lat: 45.4642, lng: 9.19 };
|
|
907
908
|
}, [e, n]);
|
|
908
909
|
return J(() => {
|
|
909
|
-
if (!
|
|
910
|
-
const
|
|
911
|
-
|
|
912
|
-
}, [e,
|
|
910
|
+
if (!g) return;
|
|
911
|
+
const f = ye(e);
|
|
912
|
+
f && (g(f), $("serp_map_panned", { bounds: f }));
|
|
913
|
+
}, [e, g]), /* @__PURE__ */ t(
|
|
913
914
|
"div",
|
|
914
915
|
{
|
|
915
916
|
"data-component": "practice-results-map-panel",
|
|
916
917
|
className: "ds:relative ds:flex ds:size-full ds:min-h-[24rem] ds:flex-col",
|
|
917
918
|
children: /* @__PURE__ */ t(
|
|
918
|
-
|
|
919
|
+
Je,
|
|
919
920
|
{
|
|
920
|
-
ref:
|
|
921
|
+
ref: h,
|
|
921
922
|
apiKey: r ?? "",
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
923
|
+
mapId: i,
|
|
924
|
+
center: p,
|
|
925
|
+
zoom: s,
|
|
926
|
+
markers: v,
|
|
927
|
+
selectedMarkerId: a,
|
|
928
|
+
consentGranted: !!o,
|
|
929
|
+
onConsentRequest: u,
|
|
930
|
+
onMarkerClick: (f) => {
|
|
931
|
+
f != null && (d(f), l(f), c(f));
|
|
930
932
|
},
|
|
931
|
-
ariaLabel:
|
|
933
|
+
ariaLabel: b("practiceResults.map.label"),
|
|
932
934
|
size: "fill",
|
|
933
935
|
surface: "bordered",
|
|
934
936
|
className: "ds:size-full"
|
|
@@ -937,49 +939,49 @@ function de({
|
|
|
937
939
|
}
|
|
938
940
|
);
|
|
939
941
|
}
|
|
940
|
-
function
|
|
942
|
+
function Fe({
|
|
941
943
|
variantBodyProps: e
|
|
942
944
|
}) {
|
|
943
|
-
const { facets: n, value:
|
|
944
|
-
return /* @__PURE__ */
|
|
945
|
+
const { facets: n, value: s, onChange: r, heading: i, intro: a, totalCount: c, searchCentre: d } = e;
|
|
946
|
+
return /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]", children: [
|
|
945
947
|
/* @__PURE__ */ t(
|
|
946
|
-
|
|
948
|
+
Ie,
|
|
947
949
|
{
|
|
948
950
|
heading: i,
|
|
949
|
-
intro:
|
|
950
|
-
totalCount:
|
|
951
|
-
searchCentreLabel:
|
|
951
|
+
intro: a,
|
|
952
|
+
totalCount: c,
|
|
953
|
+
searchCentreLabel: d == null ? void 0 : d.label
|
|
952
954
|
}
|
|
953
955
|
),
|
|
954
|
-
n.length > 0 ? /* @__PURE__ */
|
|
956
|
+
n.length > 0 ? /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-wrap ds:items-center ds:justify-between ds:gap-[var(--spacing-sm)]", children: [
|
|
955
957
|
/* @__PURE__ */ t(
|
|
956
958
|
ze,
|
|
957
959
|
{
|
|
958
960
|
facets: n,
|
|
959
|
-
value:
|
|
960
|
-
onChange: (
|
|
961
|
+
value: s.facets,
|
|
962
|
+
onChange: (l) => r({ ...s, facets: l })
|
|
961
963
|
}
|
|
962
964
|
),
|
|
963
965
|
/* @__PURE__ */ t(
|
|
964
|
-
|
|
966
|
+
de,
|
|
965
967
|
{
|
|
966
|
-
value:
|
|
967
|
-
onChange: (
|
|
968
|
+
value: s.sort ?? "relevance",
|
|
969
|
+
onChange: (l) => r({ ...s, sort: l })
|
|
968
970
|
}
|
|
969
971
|
)
|
|
970
972
|
] }) : /* @__PURE__ */ t("div", { className: "ds:flex ds:justify-end", children: /* @__PURE__ */ t(
|
|
971
|
-
|
|
973
|
+
de,
|
|
972
974
|
{
|
|
973
|
-
value:
|
|
974
|
-
onChange: (
|
|
975
|
+
value: s.sort ?? "relevance",
|
|
976
|
+
onChange: (l) => r({ ...s, sort: l })
|
|
975
977
|
}
|
|
976
978
|
) })
|
|
977
979
|
] });
|
|
978
980
|
}
|
|
979
|
-
function
|
|
980
|
-
const { t: e } =
|
|
981
|
+
function fe() {
|
|
982
|
+
const { t: e } = C();
|
|
981
983
|
return /* @__PURE__ */ t(
|
|
982
|
-
|
|
984
|
+
Qe,
|
|
983
985
|
{
|
|
984
986
|
variant: "no-results",
|
|
985
987
|
title: e("practiceResults.empty.title"),
|
|
@@ -987,80 +989,82 @@ function pe() {
|
|
|
987
989
|
}
|
|
988
990
|
);
|
|
989
991
|
}
|
|
990
|
-
function
|
|
991
|
-
const { t: n } =
|
|
992
|
-
return /* @__PURE__ */
|
|
993
|
-
/* @__PURE__ */ t(
|
|
994
|
-
/* @__PURE__ */ t(
|
|
995
|
-
e ? /* @__PURE__ */ t(
|
|
992
|
+
function he({ onRetry: e }) {
|
|
993
|
+
const { t: n } = C();
|
|
994
|
+
return /* @__PURE__ */ m(ee, { variant: "error", children: [
|
|
995
|
+
/* @__PURE__ */ t(ee.Title, { as: "h3", children: n("practiceResults.error.title") }),
|
|
996
|
+
/* @__PURE__ */ t(ee.Description, { children: n("practiceResults.error.description") }),
|
|
997
|
+
e ? /* @__PURE__ */ t(ee.Action, { children: /* @__PURE__ */ t(
|
|
996
998
|
G,
|
|
997
999
|
{
|
|
998
1000
|
intent: "secondary",
|
|
999
1001
|
size: "sm",
|
|
1000
|
-
startIcon: /* @__PURE__ */ t(
|
|
1002
|
+
startIcon: /* @__PURE__ */ t(nt, { "aria-hidden": "true" }),
|
|
1001
1003
|
onClick: e,
|
|
1002
1004
|
children: n("practiceResults.error.retry")
|
|
1003
1005
|
}
|
|
1004
1006
|
) }) : null
|
|
1005
1007
|
] });
|
|
1006
1008
|
}
|
|
1007
|
-
function
|
|
1009
|
+
function xt(e) {
|
|
1008
1010
|
const {
|
|
1009
1011
|
results: n,
|
|
1010
|
-
apiKey:
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1012
|
+
apiKey: s,
|
|
1013
|
+
mapId: r,
|
|
1014
|
+
zoom: i,
|
|
1015
|
+
searchCentre: a,
|
|
1016
|
+
onLoadMore: c,
|
|
1014
1017
|
loadingMore: d,
|
|
1015
|
-
loadingSkeletons:
|
|
1016
|
-
emptyResultsSlot:
|
|
1017
|
-
errorSlot:
|
|
1018
|
-
error:
|
|
1019
|
-
onRetry:
|
|
1020
|
-
highlightedId:
|
|
1021
|
-
onCardHover:
|
|
1022
|
-
onPinClick:
|
|
1023
|
-
consentGranted:
|
|
1024
|
-
onConsentRequest:
|
|
1025
|
-
onBoundsChange:
|
|
1026
|
-
listContainerRef:
|
|
1027
|
-
} = e, { t:
|
|
1028
|
-
|
|
1018
|
+
loadingSkeletons: l,
|
|
1019
|
+
emptyResultsSlot: g,
|
|
1020
|
+
errorSlot: o,
|
|
1021
|
+
error: u,
|
|
1022
|
+
onRetry: h,
|
|
1023
|
+
highlightedId: b,
|
|
1024
|
+
onCardHover: v,
|
|
1025
|
+
onPinClick: p,
|
|
1026
|
+
consentGranted: f,
|
|
1027
|
+
onConsentRequest: y,
|
|
1028
|
+
onBoundsChange: S,
|
|
1029
|
+
listContainerRef: R
|
|
1030
|
+
} = e, { t: M } = C(), [A, _] = me(!1), T = u ? o ?? /* @__PURE__ */ t(he, { onRetry: h }) : n.length === 0 && !l ? g ?? /* @__PURE__ */ t(fe, {}) : /* @__PURE__ */ t(
|
|
1031
|
+
pe,
|
|
1029
1032
|
{
|
|
1030
1033
|
results: n,
|
|
1031
|
-
highlightedId:
|
|
1032
|
-
onCardHover:
|
|
1034
|
+
highlightedId: b,
|
|
1035
|
+
onCardHover: v,
|
|
1033
1036
|
onCardSelect: e.onCardSelect,
|
|
1034
1037
|
onCardOpenClick: e.onCardOpenClick,
|
|
1035
1038
|
openLabel: e.openLabel,
|
|
1036
1039
|
formatNextSlot: e.formatNextSlot,
|
|
1037
|
-
onLoadMore:
|
|
1040
|
+
onLoadMore: c,
|
|
1038
1041
|
loadingMore: d,
|
|
1039
|
-
loadingSkeletons:
|
|
1042
|
+
loadingSkeletons: l,
|
|
1040
1043
|
density: "compact",
|
|
1041
|
-
containerRef:
|
|
1044
|
+
containerRef: R
|
|
1042
1045
|
}
|
|
1043
1046
|
);
|
|
1044
|
-
return /* @__PURE__ */
|
|
1045
|
-
/* @__PURE__ */ t(
|
|
1046
|
-
/* @__PURE__ */
|
|
1047
|
-
/* @__PURE__ */ t("div", { className: "ds:min-w-0 ds:lg:max-h-[40rem] ds:lg:overflow-y-auto", children:
|
|
1047
|
+
return /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1048
|
+
/* @__PURE__ */ t(Fe, { variantBodyProps: e }),
|
|
1049
|
+
/* @__PURE__ */ m("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:lg:grid ds:lg:grid-cols-[55%_45%] ds:lg:gap-[var(--spacing-lg)] ds:lg:items-start", children: [
|
|
1050
|
+
/* @__PURE__ */ t("div", { className: "ds:min-w-0 ds:lg:max-h-[40rem] ds:lg:overflow-y-auto", children: T }),
|
|
1048
1051
|
/* @__PURE__ */ t("div", { className: "ds:hidden ds:lg:block ds:sticky ds:top-[var(--spacing-md)] ds:h-[40rem]", children: /* @__PURE__ */ t(
|
|
1049
|
-
|
|
1052
|
+
ue,
|
|
1050
1053
|
{
|
|
1051
1054
|
results: n,
|
|
1052
|
-
searchCentre:
|
|
1053
|
-
zoom:
|
|
1054
|
-
apiKey:
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1055
|
+
searchCentre: a,
|
|
1056
|
+
zoom: i,
|
|
1057
|
+
apiKey: s,
|
|
1058
|
+
mapId: r,
|
|
1059
|
+
highlightedId: b,
|
|
1060
|
+
onPinClick: (P) => {
|
|
1061
|
+
W(n, P, "pin", e.onResultSelect), p(P);
|
|
1058
1062
|
},
|
|
1059
|
-
onPinHover:
|
|
1063
|
+
onPinHover: v,
|
|
1060
1064
|
onPinFirstInteract: e.onPinFirstInteract,
|
|
1061
|
-
onBoundsChange:
|
|
1062
|
-
consentGranted:
|
|
1063
|
-
onConsentRequest:
|
|
1065
|
+
onBoundsChange: S,
|
|
1066
|
+
consentGranted: f,
|
|
1067
|
+
onConsentRequest: y,
|
|
1064
1068
|
mapHandleRef: e.mapHandleRef
|
|
1065
1069
|
}
|
|
1066
1070
|
) })
|
|
@@ -1070,42 +1074,43 @@ function vt(e) {
|
|
|
1070
1074
|
{
|
|
1071
1075
|
intent: "primary",
|
|
1072
1076
|
size: "md",
|
|
1073
|
-
startIcon: /* @__PURE__ */ t(
|
|
1077
|
+
startIcon: /* @__PURE__ */ t(st, { "aria-hidden": "true" }),
|
|
1074
1078
|
onClick: () => _(!0),
|
|
1075
|
-
children:
|
|
1079
|
+
children: M("practiceResults.viewMap")
|
|
1076
1080
|
}
|
|
1077
1081
|
) }),
|
|
1078
|
-
/* @__PURE__ */ t(z.Root, { open:
|
|
1079
|
-
/* @__PURE__ */ t(z.Header, { children: /* @__PURE__ */ t(z.Title, { children:
|
|
1080
|
-
/* @__PURE__ */
|
|
1081
|
-
/* @__PURE__ */ t(z.Description, { className: "ds:sr-only", children:
|
|
1082
|
-
/* @__PURE__ */
|
|
1082
|
+
/* @__PURE__ */ t(z.Root, { open: A, onOpenChange: _, children: /* @__PURE__ */ m(z.Content, { side: "bottom", size: "lg", children: [
|
|
1083
|
+
/* @__PURE__ */ t(z.Header, { children: /* @__PURE__ */ t(z.Title, { children: M("practiceResults.map.label") }) }),
|
|
1084
|
+
/* @__PURE__ */ m(z.Body, { children: [
|
|
1085
|
+
/* @__PURE__ */ t(z.Description, { className: "ds:sr-only", children: M("practiceResults.sheet.description") }),
|
|
1086
|
+
/* @__PURE__ */ m("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1083
1087
|
/* @__PURE__ */ t("div", { className: "ds:h-[20rem]", children: /* @__PURE__ */ t(
|
|
1084
|
-
|
|
1088
|
+
ue,
|
|
1085
1089
|
{
|
|
1086
1090
|
results: n,
|
|
1087
|
-
searchCentre:
|
|
1088
|
-
zoom:
|
|
1089
|
-
apiKey:
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1091
|
+
searchCentre: a,
|
|
1092
|
+
zoom: i,
|
|
1093
|
+
apiKey: s,
|
|
1094
|
+
mapId: r,
|
|
1095
|
+
highlightedId: b,
|
|
1096
|
+
onPinClick: (P) => {
|
|
1097
|
+
W(n, P, "pin", e.onResultSelect), p(P);
|
|
1093
1098
|
},
|
|
1094
|
-
onPinHover:
|
|
1099
|
+
onPinHover: v,
|
|
1095
1100
|
onPinFirstInteract: e.onPinFirstInteract,
|
|
1096
|
-
onBoundsChange:
|
|
1097
|
-
consentGranted:
|
|
1098
|
-
onConsentRequest:
|
|
1101
|
+
onBoundsChange: S,
|
|
1102
|
+
consentGranted: f,
|
|
1103
|
+
onConsentRequest: y,
|
|
1099
1104
|
mapHandleRef: e.mapHandleRef
|
|
1100
1105
|
}
|
|
1101
1106
|
) }),
|
|
1102
|
-
|
|
1107
|
+
T
|
|
1103
1108
|
] })
|
|
1104
1109
|
] })
|
|
1105
1110
|
] }) })
|
|
1106
1111
|
] });
|
|
1107
1112
|
}
|
|
1108
|
-
const
|
|
1113
|
+
const bt = {
|
|
1109
1114
|
peek: "sm",
|
|
1110
1115
|
half: "md",
|
|
1111
1116
|
full: "lg"
|
|
@@ -1114,148 +1119,150 @@ const xt = {
|
|
|
1114
1119
|
"half",
|
|
1115
1120
|
"full"
|
|
1116
1121
|
];
|
|
1117
|
-
function
|
|
1118
|
-
const { t:
|
|
1122
|
+
function yt({ value: e, onChange: n }) {
|
|
1123
|
+
const { t: s, i18n: r } = C(), i = r.dir() === "rtl", a = I(
|
|
1119
1124
|
/* @__PURE__ */ new Map()
|
|
1120
|
-
),
|
|
1125
|
+
), c = j((l) => {
|
|
1121
1126
|
var g;
|
|
1122
|
-
(g =
|
|
1123
|
-
}, []),
|
|
1124
|
-
(
|
|
1125
|
-
const
|
|
1126
|
-
let
|
|
1127
|
-
switch (
|
|
1128
|
-
case
|
|
1127
|
+
(g = a.current.get(l)) == null || g.focus();
|
|
1128
|
+
}, []), d = j(
|
|
1129
|
+
(l, g) => {
|
|
1130
|
+
const o = V.indexOf(g), u = V.length, h = i ? "ArrowLeft" : "ArrowRight", b = i ? "ArrowRight" : "ArrowLeft";
|
|
1131
|
+
let v = null;
|
|
1132
|
+
switch (l.key) {
|
|
1133
|
+
case h:
|
|
1129
1134
|
case "ArrowDown":
|
|
1130
|
-
|
|
1135
|
+
v = V[(o + 1) % u];
|
|
1131
1136
|
break;
|
|
1132
|
-
case
|
|
1137
|
+
case b:
|
|
1133
1138
|
case "ArrowUp":
|
|
1134
|
-
|
|
1139
|
+
v = V[(o - 1 + u) % u];
|
|
1135
1140
|
break;
|
|
1136
1141
|
case "Home":
|
|
1137
|
-
|
|
1142
|
+
v = V[0];
|
|
1138
1143
|
break;
|
|
1139
1144
|
case "End":
|
|
1140
|
-
|
|
1145
|
+
v = V[u - 1];
|
|
1141
1146
|
break;
|
|
1142
1147
|
default:
|
|
1143
1148
|
return;
|
|
1144
1149
|
}
|
|
1145
|
-
|
|
1150
|
+
l.preventDefault(), v && v !== g && n(v), v && c(v);
|
|
1146
1151
|
},
|
|
1147
|
-
[
|
|
1152
|
+
[c, i, n]
|
|
1148
1153
|
);
|
|
1149
1154
|
return /* @__PURE__ */ t(
|
|
1150
1155
|
"div",
|
|
1151
1156
|
{
|
|
1152
1157
|
role: "radiogroup",
|
|
1153
|
-
"aria-label":
|
|
1158
|
+
"aria-label": s("practiceResults.sheet.snap.label"),
|
|
1154
1159
|
className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-2xs)]",
|
|
1155
|
-
children: V.map((
|
|
1156
|
-
const g = e ===
|
|
1160
|
+
children: V.map((l) => {
|
|
1161
|
+
const g = e === l;
|
|
1157
1162
|
return /* @__PURE__ */ t(
|
|
1158
1163
|
"button",
|
|
1159
1164
|
{
|
|
1160
|
-
ref: (
|
|
1161
|
-
|
|
1165
|
+
ref: (o) => {
|
|
1166
|
+
o ? a.current.set(l, o) : a.current.delete(l);
|
|
1162
1167
|
},
|
|
1163
1168
|
type: "button",
|
|
1164
1169
|
role: "radio",
|
|
1165
1170
|
"aria-checked": g,
|
|
1166
|
-
"aria-label":
|
|
1171
|
+
"aria-label": s(`practiceResults.sheet.snap.${l}`),
|
|
1167
1172
|
tabIndex: g ? 0 : -1,
|
|
1168
|
-
onClick: () => n(
|
|
1169
|
-
onKeyDown: (
|
|
1170
|
-
className:
|
|
1173
|
+
onClick: () => n(l),
|
|
1174
|
+
onKeyDown: (o) => d(o, l),
|
|
1175
|
+
className: te({
|
|
1171
1176
|
state: g ? "active" : "idle"
|
|
1172
1177
|
}),
|
|
1173
|
-
children:
|
|
1178
|
+
children: s(`practiceResults.sheet.snap.${l}`)
|
|
1174
1179
|
},
|
|
1175
|
-
|
|
1180
|
+
l
|
|
1176
1181
|
);
|
|
1177
1182
|
})
|
|
1178
1183
|
}
|
|
1179
1184
|
);
|
|
1180
1185
|
}
|
|
1181
|
-
function
|
|
1186
|
+
function Rt(e) {
|
|
1182
1187
|
const {
|
|
1183
1188
|
results: n,
|
|
1184
|
-
apiKey:
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1189
|
+
apiKey: s,
|
|
1190
|
+
mapId: r,
|
|
1191
|
+
zoom: i,
|
|
1192
|
+
searchCentre: a,
|
|
1193
|
+
onLoadMore: c,
|
|
1188
1194
|
loadingMore: d,
|
|
1189
|
-
loadingSkeletons:
|
|
1190
|
-
emptyResultsSlot:
|
|
1191
|
-
errorSlot:
|
|
1192
|
-
error:
|
|
1193
|
-
onRetry:
|
|
1194
|
-
highlightedId:
|
|
1195
|
-
onCardHover:
|
|
1196
|
-
onPinClick:
|
|
1197
|
-
consentGranted:
|
|
1198
|
-
onConsentRequest:
|
|
1199
|
-
onBoundsChange:
|
|
1200
|
-
listContainerRef:
|
|
1201
|
-
facets:
|
|
1202
|
-
value:
|
|
1195
|
+
loadingSkeletons: l,
|
|
1196
|
+
emptyResultsSlot: g,
|
|
1197
|
+
errorSlot: o,
|
|
1198
|
+
error: u,
|
|
1199
|
+
onRetry: h,
|
|
1200
|
+
highlightedId: b,
|
|
1201
|
+
onCardHover: v,
|
|
1202
|
+
onPinClick: p,
|
|
1203
|
+
consentGranted: f,
|
|
1204
|
+
onConsentRequest: y,
|
|
1205
|
+
onBoundsChange: S,
|
|
1206
|
+
listContainerRef: R,
|
|
1207
|
+
facets: M,
|
|
1208
|
+
value: A,
|
|
1203
1209
|
onChange: _
|
|
1204
|
-
} = e, { t:
|
|
1205
|
-
|
|
1210
|
+
} = e, { t: T } = C(), [P, q] = me("half"), U = bt[P], O = Ye("(min-width: 1024px)"), B = u ? o ?? /* @__PURE__ */ t(he, { onRetry: h }) : n.length === 0 && !l ? g ?? /* @__PURE__ */ t(fe, {}) : /* @__PURE__ */ t(
|
|
1211
|
+
pe,
|
|
1206
1212
|
{
|
|
1207
1213
|
results: n,
|
|
1208
|
-
highlightedId:
|
|
1209
|
-
onCardHover:
|
|
1214
|
+
highlightedId: b,
|
|
1215
|
+
onCardHover: v,
|
|
1210
1216
|
onCardSelect: e.onCardSelect,
|
|
1211
1217
|
onCardOpenClick: e.onCardOpenClick,
|
|
1212
1218
|
openLabel: e.openLabel,
|
|
1213
1219
|
formatNextSlot: e.formatNextSlot,
|
|
1214
|
-
onLoadMore:
|
|
1220
|
+
onLoadMore: c,
|
|
1215
1221
|
loadingMore: d,
|
|
1216
|
-
loadingSkeletons:
|
|
1222
|
+
loadingSkeletons: l,
|
|
1217
1223
|
density: "compact",
|
|
1218
|
-
apiKey:
|
|
1219
|
-
containerRef:
|
|
1224
|
+
apiKey: s,
|
|
1225
|
+
containerRef: R
|
|
1220
1226
|
}
|
|
1221
|
-
),
|
|
1222
|
-
|
|
1227
|
+
), N = /* @__PURE__ */ t(
|
|
1228
|
+
ue,
|
|
1223
1229
|
{
|
|
1224
1230
|
results: n,
|
|
1225
|
-
searchCentre:
|
|
1226
|
-
zoom:
|
|
1227
|
-
apiKey:
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
+
searchCentre: a,
|
|
1232
|
+
zoom: i,
|
|
1233
|
+
apiKey: s,
|
|
1234
|
+
mapId: r,
|
|
1235
|
+
highlightedId: b,
|
|
1236
|
+
onPinClick: (w) => {
|
|
1237
|
+
W(n, w, "pin", e.onResultSelect), p(w);
|
|
1231
1238
|
},
|
|
1232
|
-
onPinHover:
|
|
1239
|
+
onPinHover: v,
|
|
1233
1240
|
onPinFirstInteract: e.onPinFirstInteract,
|
|
1234
|
-
onBoundsChange:
|
|
1235
|
-
consentGranted:
|
|
1236
|
-
onConsentRequest:
|
|
1241
|
+
onBoundsChange: S,
|
|
1242
|
+
consentGranted: f,
|
|
1243
|
+
onConsentRequest: y,
|
|
1237
1244
|
mapHandleRef: e.mapHandleRef
|
|
1238
1245
|
}
|
|
1239
|
-
),
|
|
1246
|
+
), X = M.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(
|
|
1240
1247
|
ze,
|
|
1241
1248
|
{
|
|
1242
|
-
facets:
|
|
1243
|
-
value:
|
|
1244
|
-
onChange: (
|
|
1249
|
+
facets: M,
|
|
1250
|
+
value: A.facets,
|
|
1251
|
+
onChange: (w) => _({ ...A, facets: w }),
|
|
1245
1252
|
floating: !0
|
|
1246
1253
|
}
|
|
1247
1254
|
) }) : null;
|
|
1248
|
-
return /* @__PURE__ */
|
|
1255
|
+
return /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1249
1256
|
/* @__PURE__ */ t(
|
|
1250
|
-
|
|
1257
|
+
Ie,
|
|
1251
1258
|
{
|
|
1252
1259
|
heading: e.heading,
|
|
1253
1260
|
intro: e.intro,
|
|
1254
1261
|
totalCount: e.totalCount,
|
|
1255
|
-
searchCentreLabel:
|
|
1262
|
+
searchCentreLabel: a == null ? void 0 : a.label
|
|
1256
1263
|
}
|
|
1257
1264
|
),
|
|
1258
|
-
|
|
1265
|
+
O ? (
|
|
1259
1266
|
// Desktop: 65/35 map left + scrollable card rail right. NO Sheet
|
|
1260
1267
|
// (the Sheet would portal to body and occlude the desktop
|
|
1261
1268
|
// layout regardless of the parent's `lg:hidden` class).
|
|
@@ -1270,53 +1277,53 @@ function yt(e) {
|
|
|
1270
1277
|
// The default 8rem approximates a typical sticky header.
|
|
1271
1278
|
// `dvh` (dynamic viewport height) plays nice with mobile-
|
|
1272
1279
|
// chrome show/hide.
|
|
1273
|
-
/* @__PURE__ */
|
|
1274
|
-
/* @__PURE__ */
|
|
1275
|
-
|
|
1276
|
-
|
|
1280
|
+
/* @__PURE__ */ m("div", { className: "ds:grid ds:grid-cols-[65%_35%] ds:gap-[var(--spacing-lg)] ds:items-start", children: [
|
|
1281
|
+
/* @__PURE__ */ m("div", { className: "ds:relative ds:h-[calc(100dvh-var(--practice-results-chrome,8rem))] ds:min-h-[40rem]", children: [
|
|
1282
|
+
N,
|
|
1283
|
+
X
|
|
1277
1284
|
] }),
|
|
1278
|
-
/* @__PURE__ */ t("div", { className: "ds:min-w-0 ds:h-[calc(100dvh-var(--practice-results-chrome,8rem))] ds:min-h-[40rem] ds:overflow-y-auto", children:
|
|
1285
|
+
/* @__PURE__ */ t("div", { className: "ds:min-w-0 ds:h-[calc(100dvh-var(--practice-results-chrome,8rem))] ds:min-h-[40rem] ds:overflow-y-auto", children: B })
|
|
1279
1286
|
] })
|
|
1280
1287
|
) : (
|
|
1281
1288
|
// Mobile: full-bleed map + persistent bottom sheet defaulting to
|
|
1282
1289
|
// 'half' state. No X close button — the sheet is core to the
|
|
1283
1290
|
// layout, not dismissible. Patient cycles peek / half / full
|
|
1284
1291
|
// via the snap radiogroup at the top of the sheet body.
|
|
1285
|
-
/* @__PURE__ */
|
|
1286
|
-
/* @__PURE__ */
|
|
1287
|
-
|
|
1288
|
-
|
|
1292
|
+
/* @__PURE__ */ m("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1293
|
+
/* @__PURE__ */ m("div", { className: "ds:relative ds:h-[60vh] ds:min-h-[20rem]", children: [
|
|
1294
|
+
N,
|
|
1295
|
+
X
|
|
1289
1296
|
] }),
|
|
1290
1297
|
/* @__PURE__ */ t(z.Root, { open: !0, children: /* @__PURE__ */ t(
|
|
1291
1298
|
z.Content,
|
|
1292
1299
|
{
|
|
1293
1300
|
side: "bottom",
|
|
1294
1301
|
size: U,
|
|
1295
|
-
onEscapeKeyDown: (
|
|
1296
|
-
onPointerDownOutside: (
|
|
1297
|
-
onInteractOutside: (
|
|
1298
|
-
children: /* @__PURE__ */
|
|
1299
|
-
/* @__PURE__ */ t(z.Description, { className: "ds:sr-only", children:
|
|
1300
|
-
/* @__PURE__ */
|
|
1301
|
-
/* @__PURE__ */ t(z.Title, { className: "type-title-card ds:m-0 ds:text-[var(--foreground)]", children:
|
|
1302
|
+
onEscapeKeyDown: (w) => w.preventDefault(),
|
|
1303
|
+
onPointerDownOutside: (w) => w.preventDefault(),
|
|
1304
|
+
onInteractOutside: (w) => w.preventDefault(),
|
|
1305
|
+
children: /* @__PURE__ */ m(z.Body, { children: [
|
|
1306
|
+
/* @__PURE__ */ t(z.Description, { className: "ds:sr-only", children: T("practiceResults.sheet.descriptionMapFirst") }),
|
|
1307
|
+
/* @__PURE__ */ m("div", { className: "ds:flex ds:items-start ds:justify-between ds:gap-[var(--spacing-sm)] ds:pb-[var(--spacing-sm)]", children: [
|
|
1308
|
+
/* @__PURE__ */ t(z.Title, { className: "type-title-card ds:m-0 ds:text-[var(--foreground)]", children: T("practiceResults.sheet.title", {
|
|
1302
1309
|
count: e.totalCount ?? n.length
|
|
1303
1310
|
}) }),
|
|
1304
1311
|
/* @__PURE__ */ t(
|
|
1305
|
-
|
|
1312
|
+
yt,
|
|
1306
1313
|
{
|
|
1307
|
-
value:
|
|
1314
|
+
value: P,
|
|
1308
1315
|
onChange: q
|
|
1309
1316
|
}
|
|
1310
1317
|
)
|
|
1311
1318
|
] }),
|
|
1312
1319
|
/* @__PURE__ */ t("div", { className: "ds:pb-[var(--spacing-sm)]", children: /* @__PURE__ */ t(
|
|
1313
|
-
|
|
1320
|
+
de,
|
|
1314
1321
|
{
|
|
1315
|
-
value:
|
|
1316
|
-
onChange: (
|
|
1322
|
+
value: A.sort ?? "relevance",
|
|
1323
|
+
onChange: (w) => _({ ...A, sort: w })
|
|
1317
1324
|
}
|
|
1318
1325
|
) }),
|
|
1319
|
-
|
|
1326
|
+
B
|
|
1320
1327
|
] })
|
|
1321
1328
|
}
|
|
1322
1329
|
) })
|
|
@@ -1324,236 +1331,238 @@ function yt(e) {
|
|
|
1324
1331
|
)
|
|
1325
1332
|
] });
|
|
1326
1333
|
}
|
|
1327
|
-
function
|
|
1334
|
+
function wt(e) {
|
|
1328
1335
|
const {
|
|
1329
1336
|
results: n,
|
|
1330
|
-
apiKey:
|
|
1337
|
+
apiKey: s,
|
|
1331
1338
|
onLoadMore: r,
|
|
1332
1339
|
loadingMore: i,
|
|
1333
|
-
loadingSkeletons:
|
|
1334
|
-
emptyResultsSlot:
|
|
1335
|
-
errorSlot:
|
|
1336
|
-
error:
|
|
1340
|
+
loadingSkeletons: a,
|
|
1341
|
+
emptyResultsSlot: c,
|
|
1342
|
+
errorSlot: d,
|
|
1343
|
+
error: l,
|
|
1337
1344
|
onRetry: g,
|
|
1338
|
-
highlightedId:
|
|
1339
|
-
onCardHover:
|
|
1340
|
-
listContainerRef:
|
|
1341
|
-
} = e,
|
|
1342
|
-
|
|
1345
|
+
highlightedId: o,
|
|
1346
|
+
onCardHover: u,
|
|
1347
|
+
listContainerRef: h
|
|
1348
|
+
} = e, b = l ? d ?? /* @__PURE__ */ t(he, { onRetry: g }) : n.length === 0 && !a ? c ?? /* @__PURE__ */ t(fe, {}) : /* @__PURE__ */ t(
|
|
1349
|
+
pe,
|
|
1343
1350
|
{
|
|
1344
1351
|
results: n,
|
|
1345
|
-
highlightedId:
|
|
1346
|
-
onCardHover:
|
|
1352
|
+
highlightedId: o,
|
|
1353
|
+
onCardHover: u,
|
|
1347
1354
|
onCardSelect: e.onCardSelect,
|
|
1348
1355
|
onCardOpenClick: e.onCardOpenClick,
|
|
1349
1356
|
openLabel: e.openLabel,
|
|
1350
1357
|
formatNextSlot: e.formatNextSlot,
|
|
1351
1358
|
onLoadMore: r,
|
|
1352
1359
|
loadingMore: i,
|
|
1353
|
-
loadingSkeletons:
|
|
1360
|
+
loadingSkeletons: a,
|
|
1354
1361
|
density: "rich",
|
|
1355
|
-
apiKey:
|
|
1356
|
-
containerRef:
|
|
1362
|
+
apiKey: s,
|
|
1363
|
+
containerRef: h
|
|
1357
1364
|
}
|
|
1358
1365
|
);
|
|
1359
|
-
return /* @__PURE__ */
|
|
1360
|
-
/* @__PURE__ */ t(
|
|
1361
|
-
|
|
1366
|
+
return /* @__PURE__ */ m("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
|
|
1367
|
+
/* @__PURE__ */ t(Fe, { variantBodyProps: e }),
|
|
1368
|
+
b
|
|
1362
1369
|
] });
|
|
1363
1370
|
}
|
|
1364
|
-
const
|
|
1371
|
+
const kt = Ge(function({
|
|
1365
1372
|
variant: n = "split-list-map",
|
|
1366
|
-
results:
|
|
1373
|
+
results: s,
|
|
1367
1374
|
totalCount: r,
|
|
1368
1375
|
searchCentre: i,
|
|
1369
|
-
facets:
|
|
1370
|
-
googleMapsApiKey:
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1376
|
+
facets: a,
|
|
1377
|
+
googleMapsApiKey: c,
|
|
1378
|
+
mapId: d,
|
|
1379
|
+
defaultZoom: l = rt,
|
|
1380
|
+
onBoundsChange: g,
|
|
1381
|
+
consentGranted: o,
|
|
1382
|
+
onConsentRequest: u,
|
|
1383
|
+
skipConsentGate: h = !1,
|
|
1384
|
+
onLoadMore: b,
|
|
1385
|
+
loadingMore: v,
|
|
1386
|
+
value: p,
|
|
1387
|
+
onChange: f,
|
|
1388
|
+
onResultSelect: y,
|
|
1389
|
+
loading: S,
|
|
1390
|
+
emptyResultsSlot: R,
|
|
1391
|
+
errorSlot: M,
|
|
1392
|
+
error: A,
|
|
1385
1393
|
onRetry: _,
|
|
1386
|
-
heading:
|
|
1387
|
-
intro:
|
|
1394
|
+
heading: T,
|
|
1395
|
+
intro: P,
|
|
1388
1396
|
cardOpenButtonLabel: q,
|
|
1389
1397
|
"aria-label": U,
|
|
1390
|
-
id:
|
|
1391
|
-
className:
|
|
1392
|
-
...
|
|
1393
|
-
},
|
|
1394
|
-
const { t:
|
|
1398
|
+
id: O,
|
|
1399
|
+
className: B,
|
|
1400
|
+
...N
|
|
1401
|
+
}, X) {
|
|
1402
|
+
const { t: w, i18n: ge } = C(), [$e, Q] = me(null), Y = I(/* @__PURE__ */ new Set()), ae = I(/* @__PURE__ */ new Set()), He = I(null), se = I(null), ie = D(
|
|
1395
1403
|
() => ({
|
|
1396
1404
|
getVariant: () => n,
|
|
1397
|
-
scrollToResult: (
|
|
1398
|
-
const
|
|
1399
|
-
if (!
|
|
1400
|
-
const
|
|
1401
|
-
`[data-component="practice-result-card"][data-result-id="${CSS.escape(
|
|
1405
|
+
scrollToResult: (x) => {
|
|
1406
|
+
const F = se.current;
|
|
1407
|
+
if (!F) return;
|
|
1408
|
+
const k = F.querySelector(
|
|
1409
|
+
`[data-component="practice-result-card"][data-result-id="${CSS.escape(x)}"]`
|
|
1402
1410
|
);
|
|
1403
|
-
|
|
1411
|
+
k && (k.scrollIntoView({ behavior: "smooth", block: "nearest" }), Q(x));
|
|
1404
1412
|
},
|
|
1405
|
-
focusPin: (
|
|
1406
|
-
Q(
|
|
1413
|
+
focusPin: (x) => {
|
|
1414
|
+
Q(x);
|
|
1407
1415
|
}
|
|
1408
1416
|
}),
|
|
1409
1417
|
[n]
|
|
1410
1418
|
);
|
|
1411
|
-
|
|
1412
|
-
const
|
|
1413
|
-
(
|
|
1414
|
-
if (
|
|
1419
|
+
Ze(X, () => ie, [ie]), et(it, ie, O);
|
|
1420
|
+
const Le = q ?? w("practiceResults.card.open"), De = j(
|
|
1421
|
+
(x) => {
|
|
1422
|
+
if (x.nextAvailableSlot)
|
|
1415
1423
|
try {
|
|
1416
|
-
return new Intl.DateTimeFormat(
|
|
1424
|
+
return new Intl.DateTimeFormat(ge.language, {
|
|
1417
1425
|
weekday: "short",
|
|
1418
1426
|
hour: "numeric",
|
|
1419
1427
|
minute: "numeric"
|
|
1420
|
-
}).format(new Date(
|
|
1428
|
+
}).format(new Date(x.nextAvailableSlot.dateTime));
|
|
1421
1429
|
} catch {
|
|
1422
|
-
return
|
|
1430
|
+
return x.nextAvailableSlot.dateTime;
|
|
1423
1431
|
}
|
|
1424
1432
|
},
|
|
1425
|
-
[
|
|
1426
|
-
),
|
|
1433
|
+
[ge.language]
|
|
1434
|
+
), ve = I(null);
|
|
1427
1435
|
J(() => {
|
|
1428
|
-
|
|
1436
|
+
ve.current !== n && (ve.current = n, $("serp_variant_exposed", {
|
|
1429
1437
|
variant: n,
|
|
1430
|
-
totalCount: r ??
|
|
1431
|
-
}),
|
|
1438
|
+
totalCount: r ?? s.length
|
|
1439
|
+
}), Y.current = /* @__PURE__ */ new Set(), ae.current = /* @__PURE__ */ new Set());
|
|
1432
1440
|
}, [n]);
|
|
1433
|
-
const
|
|
1434
|
-
const
|
|
1435
|
-
return
|
|
1436
|
-
}, [
|
|
1441
|
+
const re = I(!1), le = D(() => a ?? [], [a]), oe = p.sort ?? (i ? "distance" : "relevance"), K = D(() => {
|
|
1442
|
+
const x = ct(s, p.facets, le);
|
|
1443
|
+
return dt(x, oe, i);
|
|
1444
|
+
}, [s, p.facets, le, oe, i]);
|
|
1437
1445
|
J(() => {
|
|
1438
|
-
const
|
|
1439
|
-
|
|
1440
|
-
appliedFacets:
|
|
1441
|
-
}),
|
|
1442
|
-
}, [
|
|
1443
|
-
const E =
|
|
1446
|
+
const x = K.length === 0;
|
|
1447
|
+
x && !re.current ? ($("serp_empty_results", {
|
|
1448
|
+
appliedFacets: p.facets ?? {}
|
|
1449
|
+
}), re.current = !0) : x || (re.current = !1);
|
|
1450
|
+
}, [K.length, p.facets]);
|
|
1451
|
+
const E = I(null), xe = I(null);
|
|
1444
1452
|
J(
|
|
1445
1453
|
() => () => {
|
|
1446
1454
|
E.current && clearTimeout(E.current);
|
|
1447
1455
|
},
|
|
1448
1456
|
[]
|
|
1449
1457
|
);
|
|
1450
|
-
const
|
|
1451
|
-
Q(
|
|
1452
|
-
|
|
1458
|
+
const Oe = j((x) => {
|
|
1459
|
+
Q(x), !Y.current.has(x) && (xe.current === x && E.current || (E.current && clearTimeout(E.current), xe.current = x, E.current = setTimeout(() => {
|
|
1460
|
+
Y.current.has(x) || (Y.current.add(x), $("serp_result_hovered_card", { resultId: x })), E.current = null;
|
|
1453
1461
|
}, 500)));
|
|
1454
|
-
}, []),
|
|
1455
|
-
Q(
|
|
1456
|
-
const
|
|
1457
|
-
if (!
|
|
1458
|
-
const
|
|
1459
|
-
`[data-component="practice-result-card"][data-result-id="${CSS.escape(
|
|
1462
|
+
}, []), Ke = j((x) => {
|
|
1463
|
+
Q(x);
|
|
1464
|
+
const F = se.current;
|
|
1465
|
+
if (!F) return;
|
|
1466
|
+
const k = F.querySelector(
|
|
1467
|
+
`[data-component="practice-result-card"][data-result-id="${CSS.escape(x)}"]`
|
|
1460
1468
|
);
|
|
1461
|
-
|
|
1462
|
-
}, []),
|
|
1463
|
-
|
|
1464
|
-
}, []),
|
|
1465
|
-
(
|
|
1466
|
-
Q(
|
|
1467
|
-
const
|
|
1468
|
-
if (
|
|
1469
|
-
if (
|
|
1470
|
-
const
|
|
1471
|
-
|
|
1472
|
-
lat:
|
|
1473
|
-
lng:
|
|
1474
|
-
}),
|
|
1469
|
+
k == null || k.scrollIntoView({ behavior: "smooth", block: "nearest" });
|
|
1470
|
+
}, []), je = j((x) => {
|
|
1471
|
+
ae.current.has(x) || (ae.current.add(x), $("serp_result_hovered_pin", { resultId: x }));
|
|
1472
|
+
}, []), be = I(null), Be = j(
|
|
1473
|
+
(x) => {
|
|
1474
|
+
Q(x);
|
|
1475
|
+
const F = K.find((k) => k.id === x);
|
|
1476
|
+
if (F) {
|
|
1477
|
+
if (F.location) {
|
|
1478
|
+
const k = be.current;
|
|
1479
|
+
k == null || k.panTo({
|
|
1480
|
+
lat: F.location.lat,
|
|
1481
|
+
lng: F.location.lng
|
|
1482
|
+
}), k == null || k.setZoom(16);
|
|
1475
1483
|
}
|
|
1476
|
-
W(
|
|
1484
|
+
W(K, x, "card", y);
|
|
1477
1485
|
}
|
|
1478
1486
|
},
|
|
1479
|
-
[
|
|
1480
|
-
),
|
|
1481
|
-
(
|
|
1487
|
+
[K, y]
|
|
1488
|
+
), Ee = j(
|
|
1489
|
+
(x) => {
|
|
1482
1490
|
W(
|
|
1483
|
-
|
|
1484
|
-
|
|
1491
|
+
K,
|
|
1492
|
+
x,
|
|
1485
1493
|
"open-button",
|
|
1486
|
-
|
|
1494
|
+
y
|
|
1487
1495
|
);
|
|
1488
1496
|
},
|
|
1489
|
-
[
|
|
1490
|
-
),
|
|
1491
|
-
results:
|
|
1497
|
+
[K, y]
|
|
1498
|
+
), Ve = !!S && s.length === 0, ce = {
|
|
1499
|
+
results: K,
|
|
1492
1500
|
totalCount: r,
|
|
1493
1501
|
searchCentre: i,
|
|
1494
|
-
facets:
|
|
1495
|
-
value: { ...
|
|
1496
|
-
onChange:
|
|
1497
|
-
onResultSelect:
|
|
1498
|
-
onLoadMore:
|
|
1499
|
-
loadingMore:
|
|
1500
|
-
apiKey:
|
|
1501
|
-
|
|
1502
|
+
facets: le,
|
|
1503
|
+
value: { ...p, sort: oe },
|
|
1504
|
+
onChange: f,
|
|
1505
|
+
onResultSelect: y,
|
|
1506
|
+
onLoadMore: b,
|
|
1507
|
+
loadingMore: v,
|
|
1508
|
+
apiKey: c,
|
|
1509
|
+
mapId: d,
|
|
1510
|
+
zoom: l,
|
|
1502
1511
|
// 0.31.4: when `skipConsentGate` is true the kit synthesises
|
|
1503
1512
|
// `consentGranted=true` for every internal MapView; the consumer's
|
|
1504
1513
|
// CMP at the page level is responsible for whether the Google Maps
|
|
1505
1514
|
// loader script is present at all. `onConsentRequest` is dropped
|
|
1506
1515
|
// because no placeholder renders — nothing to fire it from.
|
|
1507
|
-
consentGranted:
|
|
1508
|
-
onConsentRequest:
|
|
1509
|
-
onBoundsChange:
|
|
1510
|
-
loadingSkeletons:
|
|
1511
|
-
emptyResultsSlot:
|
|
1512
|
-
errorSlot:
|
|
1513
|
-
error:
|
|
1516
|
+
consentGranted: h ? !0 : o,
|
|
1517
|
+
onConsentRequest: h ? void 0 : u,
|
|
1518
|
+
onBoundsChange: g,
|
|
1519
|
+
loadingSkeletons: Ve,
|
|
1520
|
+
emptyResultsSlot: R,
|
|
1521
|
+
errorSlot: M,
|
|
1522
|
+
error: A,
|
|
1514
1523
|
onRetry: _,
|
|
1515
|
-
heading:
|
|
1516
|
-
intro:
|
|
1517
|
-
highlightedId:
|
|
1518
|
-
onCardHover:
|
|
1519
|
-
onPinClick:
|
|
1520
|
-
onPinFirstInteract:
|
|
1521
|
-
onCardSelect:
|
|
1522
|
-
onCardOpenClick:
|
|
1523
|
-
openLabel:
|
|
1524
|
-
formatNextSlot:
|
|
1525
|
-
listContainerRef:
|
|
1526
|
-
mapHandleRef:
|
|
1527
|
-
},
|
|
1524
|
+
heading: T,
|
|
1525
|
+
intro: P,
|
|
1526
|
+
highlightedId: $e,
|
|
1527
|
+
onCardHover: Oe,
|
|
1528
|
+
onPinClick: Ke,
|
|
1529
|
+
onPinFirstInteract: je,
|
|
1530
|
+
onCardSelect: Be,
|
|
1531
|
+
onCardOpenClick: Ee,
|
|
1532
|
+
openLabel: Le,
|
|
1533
|
+
formatNextSlot: De,
|
|
1534
|
+
listContainerRef: He,
|
|
1535
|
+
mapHandleRef: be
|
|
1536
|
+
}, qe = (() => {
|
|
1528
1537
|
switch (n) {
|
|
1529
1538
|
case "map-first":
|
|
1530
|
-
return /* @__PURE__ */ t(
|
|
1539
|
+
return /* @__PURE__ */ t(Rt, { ...ce });
|
|
1531
1540
|
case "rich-cards":
|
|
1532
|
-
return /* @__PURE__ */ t(
|
|
1541
|
+
return /* @__PURE__ */ t(wt, { ...ce });
|
|
1533
1542
|
case "split-list-map":
|
|
1534
1543
|
default:
|
|
1535
|
-
return /* @__PURE__ */ t(
|
|
1544
|
+
return /* @__PURE__ */ t(xt, { ...ce });
|
|
1536
1545
|
}
|
|
1537
|
-
})(),
|
|
1546
|
+
})(), Ue = U ?? w("practiceResults.regionLabel");
|
|
1538
1547
|
return /* @__PURE__ */ t(
|
|
1539
1548
|
"div",
|
|
1540
1549
|
{
|
|
1541
|
-
ref:
|
|
1550
|
+
ref: se,
|
|
1542
1551
|
role: "region",
|
|
1543
|
-
"aria-label":
|
|
1544
|
-
id:
|
|
1552
|
+
"aria-label": Ue,
|
|
1553
|
+
id: O,
|
|
1545
1554
|
"data-component": "practice-results",
|
|
1546
|
-
"data-component-id":
|
|
1555
|
+
"data-component-id": O,
|
|
1547
1556
|
"data-variant": n,
|
|
1548
|
-
className:
|
|
1549
|
-
...
|
|
1550
|
-
children:
|
|
1557
|
+
className: ut({ variant: n, className: B }),
|
|
1558
|
+
...N,
|
|
1559
|
+
children: qe
|
|
1551
1560
|
}
|
|
1552
1561
|
);
|
|
1553
1562
|
});
|
|
1554
|
-
|
|
1563
|
+
kt.displayName = "PracticeResults";
|
|
1555
1564
|
export {
|
|
1556
|
-
|
|
1557
|
-
|
|
1565
|
+
kt as P,
|
|
1566
|
+
it as p
|
|
1558
1567
|
};
|
|
1559
|
-
//# sourceMappingURL=practice-results-
|
|
1568
|
+
//# sourceMappingURL=practice-results-Dwm5tzLV.js.map
|