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