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