@alfadocs/ui-kit 0.30.0 → 0.30.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/dist/_chunks/{booking-BYuc_8HV.js → booking-Bw9eOU4k.js} +767 -725
  2. package/dist/_chunks/{patient-search-BhlxYAI3.js → patient-search-DuSoGG2t.js} +338 -327
  3. package/dist/_chunks/{public-footer.agent-CA29gxHJ.js → public-footer.agent-DivkKdG4.js} +188 -167
  4. package/dist/agent-catalog.json +1 -1
  5. package/dist/components/booking/booking-types.d.ts +22 -0
  6. package/dist/components/booking/details-form.d.ts +7 -0
  7. package/dist/components/booking/index.js +1 -1
  8. package/dist/components/patient-search/index.js +1 -1
  9. package/dist/components/patient-search/patient-search.d.ts +9 -0
  10. package/dist/components/public-footer/index.js +1 -1
  11. package/dist/components/public-footer/public-footer.d.ts +7 -0
  12. package/dist/i18n/config.js +146 -20
  13. package/dist/i18n/locales/ar.d.ts +7 -0
  14. package/dist/i18n/locales/de.d.ts +7 -0
  15. package/dist/i18n/locales/el.d.ts +7 -0
  16. package/dist/i18n/locales/es.d.ts +7 -0
  17. package/dist/i18n/locales/fr.d.ts +7 -0
  18. package/dist/i18n/locales/hi.d.ts +7 -0
  19. package/dist/i18n/locales/ja.d.ts +7 -0
  20. package/dist/i18n/locales/nl.d.ts +7 -0
  21. package/dist/i18n/locales/pl.d.ts +7 -0
  22. package/dist/i18n/locales/pt.d.ts +7 -0
  23. package/dist/i18n/locales/ro.d.ts +7 -0
  24. package/dist/i18n/locales/ru.d.ts +7 -0
  25. package/dist/i18n/locales/sq.d.ts +7 -0
  26. package/dist/i18n/locales/sv.d.ts +7 -0
  27. package/dist/i18n/locales/tr.d.ts +7 -0
  28. package/dist/i18n/locales/zh.d.ts +7 -0
  29. package/dist/i18n/resources.d.ts +14 -0
  30. package/dist/index.js +3 -3
  31. package/dist/locales/ar.json +8 -1
  32. package/dist/locales/de.json +8 -1
  33. package/dist/locales/el.json +8 -1
  34. package/dist/locales/en.json +8 -1
  35. package/dist/locales/es.json +8 -1
  36. package/dist/locales/fr.json +8 -1
  37. package/dist/locales/hi.json +8 -1
  38. package/dist/locales/it.json +8 -1
  39. package/dist/locales/ja.json +8 -1
  40. package/dist/locales/nl.json +8 -1
  41. package/dist/locales/pl.json +8 -1
  42. package/dist/locales/pt.json +8 -1
  43. package/dist/locales/ro.json +8 -1
  44. package/dist/locales/ru.json +8 -1
  45. package/dist/locales/sq.json +8 -1
  46. package/dist/locales/sv.json +8 -1
  47. package/dist/locales/tr.json +8 -1
  48. package/dist/locales/zh.json +8 -1
  49. package/package.json +5 -1
@@ -1,34 +1,34 @@
1
1
  import { jsx as a, jsxs as _ } from "react/jsx-runtime";
2
- import { forwardRef as le, useRef as S, useEffect as B, useMemo as Y, useImperativeHandle as ue, useState as z, useCallback as M, useId as fe } from "react";
3
- import { c as P } from "./index-D2ZczOXr.js";
4
- import { useTranslation as C } from "react-i18next";
2
+ import { forwardRef as le, useRef as S, useEffect as B, useMemo as Y, useImperativeHandle as ue, useState as W, useCallback as z, useId as fe } from "react";
3
+ import { c as D } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as A } from "react-i18next";
5
5
  import { A as re } from "./autocomplete-CUh0f7Dj.js";
6
6
  import { B as pe } from "./button-DD_0Xdmr.js";
7
- import { C as H } from "./card-DKTMLVrw.js";
8
- import { S as he } from "./slider-CfEzeseL.js";
7
+ import { C as M } from "./card-DKTMLVrw.js";
8
+ import { S as me } from "./slider-CfEzeseL.js";
9
9
  import { A as ee } from "./alert-ywPR59NE.js";
10
- import { D as W } from "./dropdown-menu-DZxwF23X.js";
11
- import { u as me } from "./registry-C9nwlNyL.js";
10
+ import { D as K } from "./dropdown-menu-DZxwF23X.js";
11
+ import { u as he } from "./registry-C9nwlNyL.js";
12
12
  import { S as ne } from "./search-BonnQsHv.js";
13
13
  import { X as ie } from "./x-CCcI3eJp.js";
14
14
  import { c as ve } from "./createLucideIcon-CrFbzy84.js";
15
15
  import { M as ge } from "./map-pin-B8STOPMJ.js";
16
16
  import { S as be } from "./stethoscope-DT5qCW8Y.js";
17
- import { C as xe } from "./chevron-down-BX_NP2Yh.js";
17
+ import { C as ye } from "./chevron-down-BX_NP2Yh.js";
18
18
  /**
19
19
  * @license lucide-react v1.8.0 - ISC
20
20
  *
21
21
  * This source code is licensed under the ISC license.
22
22
  * See the LICENSE file in the root directory of this source tree.
23
23
  */
24
- const ye = [
24
+ const xe = [
25
25
  ["line", { x1: "2", x2: "5", y1: "12", y2: "12", key: "bvdh0s" }],
26
26
  ["line", { x1: "19", x2: "22", y1: "12", y2: "12", key: "1tbv5k" }],
27
27
  ["line", { x1: "12", x2: "12", y1: "2", y2: "5", key: "11lu5j" }],
28
28
  ["line", { x1: "12", x2: "12", y1: "19", y2: "22", key: "x3vr5v" }],
29
29
  ["circle", { cx: "12", cy: "12", r: "7", key: "fim9np" }],
30
30
  ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
31
- ], we = ve("locate-fixed", ye), _e = {
31
+ ], we = ve("locate-fixed", xe), _e = {
32
32
  id: "patient-search",
33
33
  capabilities: ["navigate", "view_change"],
34
34
  state: {
@@ -78,20 +78,20 @@ function w(e, s) {
78
78
  } catch {
79
79
  }
80
80
  }
81
- const A = [
81
+ const j = [
82
82
  "today",
83
83
  "tomorrow",
84
84
  "this_week",
85
85
  "anytime"
86
- ], D = [1, 5, 10, 25, 50], oe = 5, de = 200;
86
+ ], L = [1, 5, 10, 25, 50], oe = 5, de = 200;
87
87
  function Se(e) {
88
88
  let s = 0, t = Number.POSITIVE_INFINITY;
89
- return D.forEach((d, h) => {
90
- const m = Math.abs(d - e);
91
- m < t && (t = m, s = h);
89
+ return L.forEach((c, h) => {
90
+ const v = Math.abs(c - e);
91
+ v < t && (t = v, s = h);
92
92
  }), s;
93
93
  }
94
- const Ne = P(
94
+ const Ne = D(
95
95
  "ds:flex ds:w-full ds:flex-col ds:text-[var(--foreground)]",
96
96
  {
97
97
  variants: {
@@ -105,33 +105,33 @@ const Ne = P(
105
105
  defaultVariants: { variant: "who-where" }
106
106
  }
107
107
  );
108
- function $({
108
+ function H({
109
109
  value: e,
110
110
  onChange: s,
111
111
  loadObjects: t,
112
- onObjectSelect: d,
112
+ onObjectSelect: c,
113
113
  inputRef: h
114
114
  }) {
115
- var i, f, p, x;
116
- const { t: m } = C(), [b, u] = z(((i = e.object) == null ? void 0 : i.label) ?? ""), y = S((f = e.object) == null ? void 0 : f.value);
115
+ var o, f, p, y;
116
+ const { t: v } = A(), [g, u] = W(((o = e.object) == null ? void 0 : o.label) ?? ""), x = S((f = e.object) == null ? void 0 : f.value);
117
117
  B(() => {
118
- var v, o, T;
119
- ((v = e.object) == null ? void 0 : v.value) !== y.current && (y.current = (o = e.object) == null ? void 0 : o.value, u(((T = e.object) == null ? void 0 : T.label) ?? ""));
120
- }, [(p = e.object) == null ? void 0 : p.value, (x = e.object) == null ? void 0 : x.label]);
121
- const n = M(
122
- async (v, { signal: o }) => await t(v, { signal: o }),
118
+ var m, i, N;
119
+ ((m = e.object) == null ? void 0 : m.value) !== x.current && (x.current = (i = e.object) == null ? void 0 : i.value, u(((N = e.object) == null ? void 0 : N.label) ?? ""));
120
+ }, [(p = e.object) == null ? void 0 : p.value, (y = e.object) == null ? void 0 : y.label]);
121
+ const n = z(
122
+ async (m, { signal: i }) => await t(m, { signal: i }),
123
123
  [t]
124
- ), c = (v) => {
125
- const o = {
126
- value: v.value,
127
- label: v.label,
128
- description: v.description,
129
- __payload: v.__payload
124
+ ), l = (m) => {
125
+ const i = {
126
+ value: m.value,
127
+ label: m.label,
128
+ description: m.description,
129
+ __payload: m.__payload
130
130
  };
131
- u(o.label), y.current = o.value, s({ ...e, object: o }), w("patient_search_object_selected", {
132
- value: o.value,
133
- type: o.__payload && typeof o.__payload == "object" ? o.__payload.type : void 0
134
- }), d == null || d(o);
131
+ u(i.label), x.current = i.value, s({ ...e, object: i }), w("patient_search_object_selected", {
132
+ value: i.value,
133
+ type: i.__payload && typeof i.__payload == "object" ? i.__payload.type : void 0
134
+ }), c == null || c(i);
135
135
  }, r = S(!1);
136
136
  return /* @__PURE__ */ a(
137
137
  "div",
@@ -141,22 +141,22 @@ function $({
141
141
  onFocus: () => {
142
142
  r.current || (r.current = !0, w("patient_search_object_focused"));
143
143
  },
144
- onBlur: (v) => {
145
- v.currentTarget && !v.currentTarget.contains(v.relatedTarget) && (r.current = !1);
144
+ onBlur: (m) => {
145
+ m.currentTarget && !m.currentTarget.contains(m.relatedTarget) && (r.current = !1);
146
146
  },
147
147
  children: /* @__PURE__ */ a(
148
148
  re,
149
149
  {
150
150
  ref: h,
151
- value: b,
152
- onChange: (v) => {
153
- u(v), e.object && v !== e.object.label && (y.current = void 0, s({ ...e, object: void 0 }));
151
+ value: g,
152
+ onChange: (m) => {
153
+ u(m), e.object && m !== e.object.label && (x.current = void 0, s({ ...e, object: void 0 }));
154
154
  },
155
- onSelect: c,
155
+ onSelect: l,
156
156
  loadOptions: n,
157
157
  debounceMs: de,
158
- placeholder: m("patientSearch.who.placeholder"),
159
- "aria-label": m("patientSearch.who.label"),
158
+ placeholder: v("patientSearch.who.placeholder"),
159
+ "aria-label": v("patientSearch.who.label"),
160
160
  startAdornment: /* @__PURE__ */ a(ne, { "aria-hidden": "true" })
161
161
  }
162
162
  )
@@ -175,63 +175,63 @@ const ae = [
175
175
  "ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
176
176
  "ds:forced-colors:focus-visible:outline-[CanvasText]"
177
177
  ].join(" ");
178
- function q({
178
+ function $({
179
179
  value: e,
180
180
  onChange: s,
181
181
  loadPlaces: t,
182
- onPlaceSelect: d,
182
+ onPlaceSelect: c,
183
183
  inputRef: h,
184
- defaultRadiusKm: m = oe,
185
- reverseGeocode: b
184
+ defaultRadiusKm: v = oe,
185
+ reverseGeocode: g
186
186
  }) {
187
- var V, L, E, R;
188
- const { t: u } = C(), [y, n] = z(((V = e.place) == null ? void 0 : V.label) ?? ""), c = S((L = e.place) == null ? void 0 : L.value), r = e.geo ? "granted" : "pristine", [i, f] = z(r), [p, x] = z(
187
+ var T, O, E, V;
188
+ const { t: u } = A(), [x, n] = W(((T = e.place) == null ? void 0 : T.label) ?? ""), l = S((O = e.place) == null ? void 0 : O.value), r = e.geo ? "granted" : "pristine", [o, f] = W(r), [p, y] = W(
189
189
  () => {
190
- var l;
191
- return Se(((l = e.geo) == null ? void 0 : l.radiusKm) ?? m);
190
+ var d;
191
+ return Se(((d = e.geo) == null ? void 0 : d.radiusKm) ?? v);
192
192
  }
193
193
  );
194
194
  B(() => {
195
- var l, g, j;
196
- ((l = e.place) == null ? void 0 : l.value) !== c.current && (c.current = (g = e.place) == null ? void 0 : g.value, n(((j = e.place) == null ? void 0 : j.label) ?? ""));
197
- }, [(E = e.place) == null ? void 0 : E.value, (R = e.place) == null ? void 0 : R.label]);
198
- const v = M(
199
- async (l, { signal: g }) => await t(l, { signal: g }),
195
+ var d, b, k;
196
+ ((d = e.place) == null ? void 0 : d.value) !== l.current && (l.current = (b = e.place) == null ? void 0 : b.value, n(((k = e.place) == null ? void 0 : k.label) ?? ""));
197
+ }, [(E = e.place) == null ? void 0 : E.value, (V = e.place) == null ? void 0 : V.label]);
198
+ const m = z(
199
+ async (d, { signal: b }) => await t(d, { signal: b }),
200
200
  [t]
201
- ), o = (l) => {
202
- const g = {
203
- value: l.value,
204
- label: l.label,
205
- lat: l.lat,
206
- lng: l.lng
201
+ ), i = (d) => {
202
+ const b = {
203
+ value: d.value,
204
+ label: d.label,
205
+ lat: d.lat,
206
+ lng: d.lng
207
207
  };
208
- n(g.label), c.current = g.value, s({ ...e, place: g, geo: void 0 }), i === "granted" && f("pristine"), w("patient_search_place_selected", { value: g.value }), d == null || d(g);
209
- }, T = () => {
208
+ n(b.label), l.current = b.value, s({ ...e, place: b, geo: void 0 }), o === "granted" && f("pristine"), w("patient_search_place_selected", { value: b.value }), c == null || c(b);
209
+ }, N = () => {
210
210
  if (typeof window > "u" || !(navigator != null && navigator.geolocation)) {
211
211
  f("denied"), w("patient_search_geo_denied", { reason: "unsupported" });
212
212
  return;
213
213
  }
214
214
  f("requesting"), w("patient_search_place_focused"), navigator.geolocation.getCurrentPosition(
215
- async (l) => {
216
- const { latitude: g, longitude: j } = l.coords;
215
+ async (d) => {
216
+ const { latitude: b, longitude: k } = d.coords;
217
217
  let X;
218
218
  try {
219
- X = await (b == null ? void 0 : b(g, j));
219
+ X = await (g == null ? void 0 : g(b, k));
220
220
  } catch {
221
221
  X = void 0;
222
222
  }
223
- const J = D[p] ?? m, Z = X ?? u("patientSearch.geo.fallbackLabel"), ce = {
224
- value: `geo:${g.toFixed(4)},${j.toFixed(4)}`,
223
+ const J = L[p] ?? v, Z = X ?? u("patientSearch.geo.fallbackLabel"), ce = {
224
+ value: `geo:${b.toFixed(4)},${k.toFixed(4)}`,
225
225
  label: Z,
226
- lat: g,
227
- lng: j
226
+ lat: b,
227
+ lng: k
228
228
  };
229
229
  s({
230
230
  ...e,
231
231
  place: ce,
232
232
  geo: {
233
- lat: g,
234
- lng: j,
233
+ lat: b,
234
+ lng: k,
235
235
  radiusKm: J,
236
236
  label: Z
237
237
  }
@@ -243,15 +243,15 @@ function q({
243
243
  { enableHighAccuracy: !1, maximumAge: 6e4, timeout: 1e4 }
244
244
  );
245
245
  }, F = () => {
246
- s({ ...e, geo: void 0, place: void 0 }), n(""), c.current = void 0, f("pristine");
247
- }, G = (l) => {
248
- const g = D[l] ?? m;
249
- e.geo && s({ ...e, geo: { ...e.geo, radiusKm: g } }), w("patient_search_radius_changed", { radiusKm: g });
250
- }, Q = (l) => {
251
- const g = D[Math.round(l)] ?? m;
252
- return u("patientSearch.geo.radiusFormat", { km: g });
253
- }, N = i === "granted" && !!e.geo, K = i === "requesting", I = i === "denied", k = S(!1), O = I ? null : /* @__PURE__ */ _("span", { className: "ds:absolute ds:end-[var(--spacing-xs)] ds:top-1/2 ds:-translate-y-1/2 ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
254
- N ? /* @__PURE__ */ a(
246
+ s({ ...e, geo: void 0, place: void 0 }), n(""), l.current = void 0, f("pristine");
247
+ }, U = (d) => {
248
+ const b = L[d] ?? v;
249
+ e.geo && s({ ...e, geo: { ...e.geo, radiusKm: b } }), w("patient_search_radius_changed", { radiusKm: b });
250
+ }, G = (d) => {
251
+ const b = L[Math.round(d)] ?? v;
252
+ return u("patientSearch.geo.radiusFormat", { km: b });
253
+ }, R = o === "granted" && !!e.geo, Q = o === "requesting", C = o === "denied", P = S(!1), I = C ? null : /* @__PURE__ */ _("span", { className: "ds:absolute ds:end-[var(--spacing-xs)] ds:top-1/2 ds:-translate-y-1/2 ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
254
+ R ? /* @__PURE__ */ a(
255
255
  "button",
256
256
  {
257
257
  type: "button",
@@ -266,9 +266,9 @@ function q({
266
266
  {
267
267
  type: "button",
268
268
  "aria-label": u("patientSearch.geo.cta"),
269
- "aria-pressed": N || void 0,
270
- disabled: K,
271
- onClick: N ? F : T,
269
+ "aria-pressed": R || void 0,
270
+ disabled: Q,
271
+ onClick: R ? F : N,
272
272
  className: ae,
273
273
  children: /* @__PURE__ */ a(we, { "aria-hidden": "true", className: "ds:size-4" })
274
274
  }
@@ -280,10 +280,10 @@ function q({
280
280
  "data-component": "patient-search-field",
281
281
  "data-field": "where",
282
282
  onFocus: () => {
283
- k.current || (k.current = !0, w("patient_search_place_focused"));
283
+ P.current || (P.current = !0, w("patient_search_place_focused"));
284
284
  },
285
- onBlur: (l) => {
286
- l.currentTarget && !l.currentTarget.contains(l.relatedTarget) && (k.current = !1);
285
+ onBlur: (d) => {
286
+ d.currentTarget && !d.currentTarget.contains(d.relatedTarget) && (P.current = !1);
287
287
  },
288
288
  className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)]",
289
289
  children: [
@@ -292,17 +292,17 @@ function q({
292
292
  re,
293
293
  {
294
294
  ref: h,
295
- value: y,
296
- onChange: (l) => {
297
- n(l), e.place && l !== e.place.label && (c.current = void 0, s({ ...e, place: void 0, geo: void 0 }), i === "granted" && f("pristine"));
295
+ value: x,
296
+ onChange: (d) => {
297
+ n(d), e.place && d !== e.place.label && (l.current = void 0, s({ ...e, place: void 0, geo: void 0 }), o === "granted" && f("pristine"));
298
298
  },
299
- onSelect: o,
300
- loadOptions: v,
299
+ onSelect: i,
300
+ loadOptions: m,
301
301
  debounceMs: de,
302
302
  placeholder: u("patientSearch.where.placeholder"),
303
303
  "aria-label": u("patientSearch.where.label"),
304
304
  startAdornment: /* @__PURE__ */ a(ge, { "aria-hidden": "true" }),
305
- endAdornment: I ? void 0 : (
305
+ endAdornment: C ? void 0 : (
306
306
  // Decorative spacer — reserves inline-end room so the typed
307
307
  // text doesn't run under the absolutely-positioned overlay.
308
308
  // Autocomplete wraps endAdornment in `aria-hidden`, which is
@@ -312,15 +312,15 @@ function q({
312
312
  "span",
313
313
  {
314
314
  "aria-hidden": "true",
315
- className: N ? "ds:inline-block ds:size-[4.5rem]" : "ds:inline-block ds:size-8"
315
+ className: R ? "ds:inline-block ds:size-[4.5rem]" : "ds:inline-block ds:size-8"
316
316
  }
317
317
  )
318
318
  )
319
319
  }
320
320
  ),
321
- O
321
+ I
322
322
  ] }),
323
- N ? (
323
+ R ? (
324
324
  // Slider marks render with `translate(-50%)` so half of each
325
325
  // end-mark ("1" and "50" labels) sits outside the slider's
326
326
  // bounding box. The parent Card uses `overflow: hidden`, which
@@ -336,26 +336,26 @@ function q({
336
336
  }
337
337
  ),
338
338
  /* @__PURE__ */ a(
339
- he,
339
+ me,
340
340
  {
341
341
  value: [p],
342
342
  min: 0,
343
- max: D.length - 1,
343
+ max: L.length - 1,
344
344
  step: 1,
345
- marks: D.map((l, g) => ({
346
- value: g,
347
- label: `${l}`
345
+ marks: L.map((d, b) => ({
346
+ value: b,
347
+ label: `${d}`
348
348
  })),
349
- formatValue: Q,
349
+ formatValue: G,
350
350
  alwaysShowValue: !0,
351
351
  "aria-labelledby": "patient-search-radius-label",
352
- onValueChange: (l) => x(l[0] ?? 0),
353
- onValueCommit: (l) => G(l[0] ?? 0)
352
+ onValueChange: (d) => y(d[0] ?? 0),
353
+ onValueCommit: (d) => U(d[0] ?? 0)
354
354
  }
355
355
  )
356
356
  ] })
357
357
  ) : null,
358
- I ? (
358
+ C ? (
359
359
  // Alert defaults to `role="status"` + `aria-live="polite"` for the
360
360
  // `info` variant — the user hears why the field reverted to plain
361
361
  // text when their browser blocked the geolocation prompt.
@@ -365,7 +365,7 @@ function q({
365
365
  }
366
366
  );
367
367
  }
368
- const ke = P(
368
+ const ke = D(
369
369
  [
370
370
  "ds:inline-flex ds:items-center ds:justify-center",
371
371
  "ds:min-h-[var(--min-target-size)]",
@@ -389,43 +389,43 @@ const ke = P(
389
389
  }
390
390
  );
391
391
  function Re({ value: e, onChange: s }) {
392
- const { t, i18n: d } = C(), h = fe(), m = d.dir() === "rtl", b = S(/* @__PURE__ */ new Map()), u = M((r) => {
393
- var i;
394
- (i = b.current.get(r)) == null || i.focus();
395
- }, []), y = M(
396
- (r, i) => {
397
- const f = A.indexOf(i), p = A.length, x = m ? "ArrowLeft" : "ArrowRight", v = m ? "ArrowRight" : "ArrowLeft";
392
+ const { t, i18n: c } = A(), h = fe(), v = c.dir() === "rtl", g = S(/* @__PURE__ */ new Map()), u = z((r) => {
393
+ var o;
394
+ (o = g.current.get(r)) == null || o.focus();
395
+ }, []), x = z(
396
+ (r, o) => {
397
+ const f = j.indexOf(o), p = j.length, y = v ? "ArrowLeft" : "ArrowRight", m = v ? "ArrowRight" : "ArrowLeft";
398
398
  switch (r.key) {
399
- case x:
399
+ case y:
400
400
  case "ArrowDown": {
401
401
  r.preventDefault();
402
- const o = A[(f + 1) % p];
403
- s(o), w("patient_search_when_selected", { when: o }), u(o);
402
+ const i = j[(f + 1) % p];
403
+ s(i), w("patient_search_when_selected", { when: i }), u(i);
404
404
  break;
405
405
  }
406
- case v:
406
+ case m:
407
407
  case "ArrowUp": {
408
408
  r.preventDefault();
409
- const o = A[(f - 1 + p) % p];
410
- s(o), w("patient_search_when_selected", { when: o }), u(o);
409
+ const i = j[(f - 1 + p) % p];
410
+ s(i), w("patient_search_when_selected", { when: i }), u(i);
411
411
  break;
412
412
  }
413
413
  case "Home": {
414
414
  r.preventDefault();
415
- const o = A[0];
416
- s(o), w("patient_search_when_selected", { when: o }), u(o);
415
+ const i = j[0];
416
+ s(i), w("patient_search_when_selected", { when: i }), u(i);
417
417
  break;
418
418
  }
419
419
  case "End": {
420
420
  r.preventDefault();
421
- const o = A[p - 1];
422
- s(o), w("patient_search_when_selected", { when: o }), u(o);
421
+ const i = j[p - 1];
422
+ s(i), w("patient_search_when_selected", { when: i }), u(i);
423
423
  break;
424
424
  }
425
425
  }
426
426
  },
427
- [u, m, s]
428
- ), n = e ?? "anytime", c = {
427
+ [u, v, s]
428
+ ), n = e ?? "anytime", l = {
429
429
  today: "patientSearch.when.today",
430
430
  tomorrow: "patientSearch.when.tomorrow",
431
431
  this_week: "patientSearch.when.thisWeek",
@@ -438,25 +438,25 @@ function Re({ value: e, onChange: s }) {
438
438
  "aria-label": t("patientSearch.when.label"),
439
439
  id: h,
440
440
  className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
441
- children: A.map((r) => {
442
- const i = e === r, f = n === r, p = t(c[r]);
441
+ children: j.map((r) => {
442
+ const o = e === r, f = n === r, p = t(l[r]);
443
443
  return /* @__PURE__ */ a(
444
444
  "button",
445
445
  {
446
446
  type: "button",
447
447
  role: "radio",
448
- "aria-checked": i,
448
+ "aria-checked": o,
449
449
  "aria-label": p,
450
450
  tabIndex: f ? 0 : -1,
451
- ref: (x) => {
452
- x ? b.current.set(r, x) : b.current.delete(r);
451
+ ref: (y) => {
452
+ y ? g.current.set(r, y) : g.current.delete(r);
453
453
  },
454
454
  onClick: () => {
455
455
  s(r), w("patient_search_when_selected", { when: r });
456
456
  },
457
- onKeyDown: (x) => y(x, r),
457
+ onKeyDown: (y) => x(y, r),
458
458
  className: ke({
459
- state: i ? "selected" : "idle"
459
+ state: o ? "selected" : "idle"
460
460
  }),
461
461
  children: p
462
462
  },
@@ -466,7 +466,7 @@ function Re({ value: e, onChange: s }) {
466
466
  }
467
467
  );
468
468
  }
469
- const te = P(
469
+ const te = D(
470
470
  [
471
471
  "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
472
472
  "ds:min-h-[var(--min-target-size)]",
@@ -497,54 +497,54 @@ const te = P(
497
497
  }
498
498
  );
499
499
  function je({ facets: e, value: s, onChange: t }) {
500
- const { t: d } = C(), h = Y(() => s ?? {}, [s]), m = Y(
500
+ const { t: c } = A(), h = Y(() => s ?? {}, [s]), v = Y(
501
501
  () => Object.values(h).some((n) => n && n.length > 0),
502
502
  [h]
503
- ), b = (n, c) => {
503
+ ), g = (n, l) => {
504
504
  const r = { ...h };
505
- c.length === 0 ? delete r[n] : r[n] = c, t(r), w("patient_search_facet_changed", { key: n, values: c });
505
+ l.length === 0 ? delete r[n] : r[n] = l, t(r), w("patient_search_facet_changed", { key: n, values: l });
506
506
  }, u = (n) => {
507
507
  var r;
508
- const c = (((r = h[n]) == null ? void 0 : r.length) ?? 0) > 0;
509
- b(n, c ? [] : ["true"]);
510
- }, y = (n, c) => {
511
- const r = h[n.key] ?? [], i = r.includes(c);
508
+ const l = (((r = h[n]) == null ? void 0 : r.length) ?? 0) > 0;
509
+ g(n, l ? [] : ["true"]);
510
+ }, x = (n, l) => {
511
+ const r = h[n.key] ?? [], o = r.includes(l);
512
512
  let f;
513
- n.multi ? f = i ? r.filter((p) => p !== c) : [...r, c] : f = i ? [] : [c], b(n.key, f);
513
+ n.multi ? f = o ? r.filter((p) => p !== l) : [...r, l] : f = o ? [] : [l], g(n.key, f);
514
514
  };
515
515
  return /* @__PURE__ */ _(
516
516
  "div",
517
517
  {
518
518
  role: "group",
519
- "aria-label": d("patientSearch.facets.label"),
519
+ "aria-label": c("patientSearch.facets.label"),
520
520
  className: "ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]",
521
521
  children: [
522
522
  e.map((n) => {
523
- const c = n.options.length === 0, r = h[n.key] ?? [], i = r.length > 0;
524
- if (c)
523
+ const l = n.options.length === 0, r = h[n.key] ?? [], o = r.length > 0;
524
+ if (l)
525
525
  return /* @__PURE__ */ a(
526
526
  "button",
527
527
  {
528
528
  type: "button",
529
- "aria-pressed": i,
529
+ "aria-pressed": o,
530
530
  "aria-label": n.label,
531
531
  onClick: () => u(n.key),
532
532
  className: te({
533
- state: i ? "active" : "idle"
533
+ state: o ? "active" : "idle"
534
534
  }),
535
535
  children: /* @__PURE__ */ a("span", { children: n.label })
536
536
  },
537
537
  n.key
538
538
  );
539
- const f = i ? ` (${r.length})` : "";
540
- return /* @__PURE__ */ _(W.Root, { children: [
541
- /* @__PURE__ */ a(W.Trigger, { asChild: !0, children: /* @__PURE__ */ _(
539
+ const f = o ? ` (${r.length})` : "";
540
+ return /* @__PURE__ */ _(K.Root, { children: [
541
+ /* @__PURE__ */ a(K.Trigger, { asChild: !0, children: /* @__PURE__ */ _(
542
542
  "button",
543
543
  {
544
544
  type: "button",
545
545
  "aria-label": `${n.label}${f}`,
546
546
  className: te({
547
- state: i ? "active" : "idle"
547
+ state: o ? "active" : "idle"
548
548
  }),
549
549
  children: [
550
550
  /* @__PURE__ */ _("span", { children: [
@@ -552,7 +552,7 @@ function je({ facets: e, value: s, onChange: t }) {
552
552
  f
553
553
  ] }),
554
554
  /* @__PURE__ */ a(
555
- xe,
555
+ ye,
556
556
  {
557
557
  "aria-hidden": "true",
558
558
  className: "ds:size-3.5 ds:shrink-0"
@@ -561,12 +561,12 @@ function je({ facets: e, value: s, onChange: t }) {
561
561
  ]
562
562
  }
563
563
  ) }),
564
- /* @__PURE__ */ a(W.Content, { sideOffset: 8, align: "start", children: n.options.map((p) => /* @__PURE__ */ a(
565
- W.CheckboxItem,
564
+ /* @__PURE__ */ a(K.Content, { sideOffset: 8, align: "start", children: n.options.map((p) => /* @__PURE__ */ a(
565
+ K.CheckboxItem,
566
566
  {
567
567
  checked: r.includes(p.value),
568
- onSelect: (x) => {
569
- n.multi && x.preventDefault(), y(n, p.value);
568
+ onSelect: (y) => {
569
+ n.multi && y.preventDefault(), x(n, p.value);
570
570
  },
571
571
  children: p.label
572
572
  },
@@ -574,7 +574,7 @@ function je({ facets: e, value: s, onChange: t }) {
574
574
  )) })
575
575
  ] }, n.key);
576
576
  }),
577
- m ? /* @__PURE__ */ _(
577
+ v ? /* @__PURE__ */ _(
578
578
  "button",
579
579
  {
580
580
  type: "button",
@@ -592,7 +592,7 @@ function je({ facets: e, value: s, onChange: t }) {
592
592
  ].join(" "),
593
593
  children: [
594
594
  /* @__PURE__ */ a(ie, { "aria-hidden": "true", className: "ds:size-3.5" }),
595
- d("patientSearch.facets.clear")
595
+ c("patientSearch.facets.clear")
596
596
  ]
597
597
  }
598
598
  ) : null
@@ -600,7 +600,7 @@ function je({ facets: e, value: s, onChange: t }) {
600
600
  }
601
601
  );
602
602
  }
603
- const se = ["violet", "purple", "magenta", "blue"], Ae = P(
603
+ const se = ["violet", "purple", "magenta", "blue"], Ae = D(
604
604
  [
605
605
  "ds:relative ds:flex ds:h-full ds:flex-col ds:gap-[var(--spacing-sm)]",
606
606
  "ds:rounded-[var(--radius-lg)] ds:overflow-hidden",
@@ -616,7 +616,7 @@ const se = ["violet", "purple", "magenta", "blue"], Ae = P(
616
616
  "ds:focus-visible:outline-[color:var(--ring)] ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
617
617
  "ds:no-underline"
618
618
  ].join(" ")
619
- ), Ce = P(
619
+ ), Ce = D(
620
620
  "ds:absolute ds:inset-inline-0 ds:top-0 ds:h-[3px] ds:pointer-events-none",
621
621
  {
622
622
  variants: {
@@ -629,7 +629,7 @@ const se = ["violet", "purple", "magenta", "blue"], Ae = P(
629
629
  },
630
630
  defaultVariants: { accent: "violet" }
631
631
  }
632
- ), Te = P(
632
+ ), Te = D(
633
633
  "ds:inline-flex ds:size-9 ds:items-center ds:justify-center ds:rounded-[var(--radius-md)]",
634
634
  {
635
635
  variants: {
@@ -643,11 +643,11 @@ const se = ["violet", "purple", "magenta", "blue"], Ae = P(
643
643
  defaultVariants: { accent: "violet" }
644
644
  }
645
645
  );
646
- function Le(e, s) {
646
+ function Ee(e, s) {
647
647
  return e && e !== "auto" ? e : se[s % se.length];
648
648
  }
649
- function De({ cards: e }) {
650
- const { t: s } = C();
649
+ function Le({ cards: e }) {
650
+ const { t: s } = A();
651
651
  return e.length === 0 ? /* @__PURE__ */ a("p", { className: "type-body-sm ds:text-[color:var(--muted-foreground)] ds:m-0", children: s("patientSearch.discovery.empty") }) : /* @__PURE__ */ _("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)]", children: [
652
652
  /* @__PURE__ */ a("h3", { className: "type-title-card ds:text-[var(--foreground)] ds:m-0", children: s("patientSearch.discovery.heading") }),
653
653
  /* @__PURE__ */ a(
@@ -658,8 +658,8 @@ function De({ cards: e }) {
658
658
  "ds:md:grid-cols-2 ds:lg:grid-cols-3",
659
659
  "ds:m-0 ds:p-0 ds:list-none"
660
660
  ].join(" "),
661
- children: e.map((t, d) => {
662
- const h = Le(t.accent, d);
661
+ children: e.map((t, c) => {
662
+ const h = Ee(t.accent, c);
663
663
  return /* @__PURE__ */ a("li", { children: /* @__PURE__ */ _(
664
664
  "a",
665
665
  {
@@ -709,7 +709,7 @@ function De({ cards: e }) {
709
709
  )
710
710
  ] });
711
711
  }
712
- function Pe(e) {
712
+ function De(e) {
713
713
  if (e.object || e.place || e.geo || e.when && e.when !== "anytime") return !0;
714
714
  if (e.facets) {
715
715
  for (const s of Object.values(e.facets))
@@ -717,14 +717,15 @@ function Pe(e) {
717
717
  }
718
718
  return !1;
719
719
  }
720
- function U({
720
+ function q({
721
721
  value: e,
722
722
  variant: s,
723
723
  submitting: t,
724
- submitLabel: d,
725
- onSubmit: h
724
+ submitLabel: c,
725
+ allowEmptySubmit: h,
726
+ onSubmit: v
726
727
  }) {
727
- const { t: m } = C(), b = t || !Pe(e), u = d ?? m("patientSearch.submit.cta");
728
+ const { t: g } = A(), u = t || !h && !De(e), x = c ?? g("patientSearch.submit.cta");
728
729
  return /* @__PURE__ */ a(
729
730
  pe,
730
731
  {
@@ -733,7 +734,7 @@ function U({
733
734
  size: "lg",
734
735
  startIcon: /* @__PURE__ */ a(ne, { "aria-hidden": "true" }),
735
736
  loading: t,
736
- disabled: b,
737
+ disabled: u,
737
738
  onClick: () => {
738
739
  w("patient_search_submitted", {
739
740
  variant: s,
@@ -742,114 +743,118 @@ function U({
742
743
  hasGeo: !!e.geo,
743
744
  when: e.when,
744
745
  facetKeys: e.facets ? Object.keys(e.facets) : []
745
- }), h(e);
746
+ }), v(e);
746
747
  },
747
- children: u
748
+ children: x
748
749
  }
749
750
  );
750
751
  }
751
- function Ie(e) {
752
+ function Pe(e) {
752
753
  const {
753
754
  variant: s,
754
755
  value: t,
755
- onChange: d,
756
+ onChange: c,
756
757
  onSubmit: h,
757
- loadObjects: m,
758
- loadPlaces: b,
758
+ loadObjects: v,
759
+ loadPlaces: g,
759
760
  onObjectSelect: u,
760
- onPlaceSelect: y,
761
+ onPlaceSelect: x,
761
762
  submitting: n,
762
- submitLabel: c,
763
- whoRef: r,
764
- whereRef: i,
765
- defaultRadiusKm: f,
766
- reverseGeocode: p,
767
- cardLabel: x
763
+ submitLabel: l,
764
+ allowEmptySubmit: r,
765
+ whoRef: o,
766
+ whereRef: f,
767
+ defaultRadiusKm: p,
768
+ reverseGeocode: y,
769
+ cardLabel: m
768
770
  } = e;
769
- return /* @__PURE__ */ a(H, { variant: "elevated", "aria-label": x, children: /* @__PURE__ */ _("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)] ds:md:flex-row ds:md:items-center", children: [
771
+ return /* @__PURE__ */ a(M, { variant: "elevated", "aria-label": m, children: /* @__PURE__ */ _("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)] ds:md:flex-row ds:md:items-center", children: [
770
772
  /* @__PURE__ */ a("div", { className: "ds:flex-1 ds:min-w-0", children: /* @__PURE__ */ a(
771
- $,
773
+ H,
772
774
  {
773
775
  value: t,
774
- onChange: d,
775
- loadObjects: m,
776
+ onChange: c,
777
+ loadObjects: v,
776
778
  onObjectSelect: u,
777
- inputRef: r
779
+ inputRef: o
778
780
  }
779
781
  ) }),
780
782
  /* @__PURE__ */ a("div", { className: "ds:flex-1 ds:min-w-0", children: /* @__PURE__ */ a(
781
- q,
783
+ $,
782
784
  {
783
785
  value: t,
784
- onChange: d,
785
- loadPlaces: b,
786
- onPlaceSelect: y,
787
- defaultRadiusKm: f,
788
- reverseGeocode: p,
789
- inputRef: i
786
+ onChange: c,
787
+ loadPlaces: g,
788
+ onPlaceSelect: x,
789
+ defaultRadiusKm: p,
790
+ reverseGeocode: y,
791
+ inputRef: f
790
792
  }
791
793
  ) }),
792
794
  /* @__PURE__ */ a(
793
- U,
795
+ q,
794
796
  {
795
797
  value: t,
796
798
  variant: s,
797
799
  submitting: n,
798
- submitLabel: c,
800
+ submitLabel: l,
801
+ allowEmptySubmit: r,
799
802
  onSubmit: h
800
803
  }
801
804
  )
802
805
  ] }) });
803
806
  }
804
- function Oe(e) {
807
+ function Ie(e) {
805
808
  const {
806
809
  variant: s,
807
810
  value: t,
808
- onChange: d,
811
+ onChange: c,
809
812
  onSubmit: h,
810
- loadObjects: m,
811
- loadPlaces: b,
813
+ loadObjects: v,
814
+ loadPlaces: g,
812
815
  onObjectSelect: u,
813
- onPlaceSelect: y,
816
+ onPlaceSelect: x,
814
817
  submitting: n,
815
- submitLabel: c,
816
- whoRef: r,
817
- whereRef: i,
818
- defaultRadiusKm: f,
819
- reverseGeocode: p,
820
- cardLabel: x
818
+ submitLabel: l,
819
+ allowEmptySubmit: r,
820
+ whoRef: o,
821
+ whereRef: f,
822
+ defaultRadiusKm: p,
823
+ reverseGeocode: y,
824
+ cardLabel: m
821
825
  } = e;
822
- return /* @__PURE__ */ a(H, { variant: "elevated", "aria-label": x, children: /* @__PURE__ */ _("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:p-[var(--spacing-md)]", children: [
826
+ return /* @__PURE__ */ a(M, { variant: "elevated", "aria-label": m, children: /* @__PURE__ */ _("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:p-[var(--spacing-md)]", children: [
823
827
  /* @__PURE__ */ _("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:md:flex-row ds:md:items-center", children: [
824
828
  /* @__PURE__ */ a("div", { className: "ds:flex-1 ds:min-w-0", children: /* @__PURE__ */ a(
825
- $,
829
+ H,
826
830
  {
827
831
  value: t,
828
- onChange: d,
829
- loadObjects: m,
832
+ onChange: c,
833
+ loadObjects: v,
830
834
  onObjectSelect: u,
831
- inputRef: r
835
+ inputRef: o
832
836
  }
833
837
  ) }),
834
838
  /* @__PURE__ */ a("div", { className: "ds:flex-1 ds:min-w-0", children: /* @__PURE__ */ a(
835
- q,
839
+ $,
836
840
  {
837
841
  value: t,
838
- onChange: d,
839
- loadPlaces: b,
840
- onPlaceSelect: y,
841
- defaultRadiusKm: f,
842
- reverseGeocode: p,
843
- inputRef: i
842
+ onChange: c,
843
+ loadPlaces: g,
844
+ onPlaceSelect: x,
845
+ defaultRadiusKm: p,
846
+ reverseGeocode: y,
847
+ inputRef: f
844
848
  }
845
849
  ) }),
846
850
  /* @__PURE__ */ a(
847
- U,
851
+ q,
848
852
  {
849
853
  value: t,
850
854
  variant: s,
851
855
  submitting: n,
852
- submitLabel: c,
856
+ submitLabel: l,
857
+ allowEmptySubmit: r,
853
858
  onSubmit: h
854
859
  }
855
860
  )
@@ -858,61 +863,63 @@ function Oe(e) {
858
863
  Re,
859
864
  {
860
865
  value: t.when,
861
- onChange: (v) => d({ ...t, when: v })
866
+ onChange: (i) => c({ ...t, when: i })
862
867
  }
863
868
  )
864
869
  ] }) });
865
870
  }
866
- function Ve(e) {
871
+ function Oe(e) {
867
872
  const {
868
873
  variant: s,
869
874
  value: t,
870
- onChange: d,
875
+ onChange: c,
871
876
  onSubmit: h,
872
- loadObjects: m,
873
- loadPlaces: b,
877
+ loadObjects: v,
878
+ loadPlaces: g,
874
879
  onObjectSelect: u,
875
- onPlaceSelect: y,
880
+ onPlaceSelect: x,
876
881
  facets: n,
877
- submitting: c,
882
+ submitting: l,
878
883
  submitLabel: r,
879
- whoRef: i,
880
- whereRef: f,
881
- defaultRadiusKm: p,
882
- reverseGeocode: x,
883
- cardLabel: v
884
+ allowEmptySubmit: o,
885
+ whoRef: f,
886
+ whereRef: p,
887
+ defaultRadiusKm: y,
888
+ reverseGeocode: m,
889
+ cardLabel: i
884
890
  } = e;
885
- return /* @__PURE__ */ a(H, { variant: "elevated", "aria-label": v, children: /* @__PURE__ */ _("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:p-[var(--spacing-md)]", children: [
891
+ return /* @__PURE__ */ a(M, { variant: "elevated", "aria-label": i, children: /* @__PURE__ */ _("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-md)] ds:p-[var(--spacing-md)]", children: [
886
892
  /* @__PURE__ */ _("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:md:flex-row ds:md:items-center", children: [
887
893
  /* @__PURE__ */ a("div", { className: "ds:flex-1 ds:min-w-0", children: /* @__PURE__ */ a(
888
- $,
894
+ H,
889
895
  {
890
896
  value: t,
891
- onChange: d,
892
- loadObjects: m,
897
+ onChange: c,
898
+ loadObjects: v,
893
899
  onObjectSelect: u,
894
- inputRef: i
900
+ inputRef: f
895
901
  }
896
902
  ) }),
897
903
  /* @__PURE__ */ a("div", { className: "ds:flex-1 ds:min-w-0", children: /* @__PURE__ */ a(
898
- q,
904
+ $,
899
905
  {
900
906
  value: t,
901
- onChange: d,
902
- loadPlaces: b,
903
- onPlaceSelect: y,
904
- defaultRadiusKm: p,
905
- reverseGeocode: x,
906
- inputRef: f
907
+ onChange: c,
908
+ loadPlaces: g,
909
+ onPlaceSelect: x,
910
+ defaultRadiusKm: y,
911
+ reverseGeocode: m,
912
+ inputRef: p
907
913
  }
908
914
  ) }),
909
915
  /* @__PURE__ */ a(
910
- U,
916
+ q,
911
917
  {
912
918
  value: t,
913
919
  variant: s,
914
- submitting: c,
920
+ submitting: l,
915
921
  submitLabel: r,
922
+ allowEmptySubmit: o,
916
923
  onSubmit: h
917
924
  }
918
925
  )
@@ -922,157 +929,161 @@ function Ve(e) {
922
929
  {
923
930
  facets: n,
924
931
  value: t.facets,
925
- onChange: (o) => d({ ...t, facets: o })
932
+ onChange: (N) => c({ ...t, facets: N })
926
933
  }
927
934
  ) : null
928
935
  ] }) });
929
936
  }
930
- function Ee(e) {
937
+ function Ve(e) {
931
938
  const {
932
939
  variant: s,
933
940
  value: t,
934
- onChange: d,
941
+ onChange: c,
935
942
  onSubmit: h,
936
- loadObjects: m,
937
- loadPlaces: b,
943
+ loadObjects: v,
944
+ loadPlaces: g,
938
945
  onObjectSelect: u,
939
- onPlaceSelect: y,
946
+ onPlaceSelect: x,
940
947
  discoveryCards: n,
941
- submitting: c,
948
+ submitting: l,
942
949
  submitLabel: r,
943
- whoRef: i,
944
- whereRef: f,
945
- defaultRadiusKm: p,
946
- reverseGeocode: x,
947
- cardLabel: v
950
+ allowEmptySubmit: o,
951
+ whoRef: f,
952
+ whereRef: p,
953
+ defaultRadiusKm: y,
954
+ reverseGeocode: m,
955
+ cardLabel: i
948
956
  } = e;
949
957
  return /* @__PURE__ */ _("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-lg)]", children: [
950
- /* @__PURE__ */ a(H, { variant: "elevated", "aria-label": v, children: /* @__PURE__ */ _("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)] ds:md:flex-row ds:md:items-stretch", children: [
958
+ /* @__PURE__ */ a(M, { variant: "elevated", "aria-label": i, children: /* @__PURE__ */ _("div", { className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-md)] ds:md:flex-row ds:md:items-stretch", children: [
951
959
  /* @__PURE__ */ a("div", { className: "ds:flex-1 ds:min-w-0", children: /* @__PURE__ */ a(
952
- $,
960
+ H,
953
961
  {
954
962
  value: t,
955
- onChange: d,
956
- loadObjects: m,
963
+ onChange: c,
964
+ loadObjects: v,
957
965
  onObjectSelect: u,
958
- inputRef: i
966
+ inputRef: f
959
967
  }
960
968
  ) }),
961
969
  /* @__PURE__ */ a("div", { className: "ds:flex-1 ds:min-w-0", children: /* @__PURE__ */ a(
962
- q,
970
+ $,
963
971
  {
964
972
  value: t,
965
- onChange: d,
966
- loadPlaces: b,
967
- onPlaceSelect: y,
968
- defaultRadiusKm: p,
969
- reverseGeocode: x,
970
- inputRef: f
973
+ onChange: c,
974
+ loadPlaces: g,
975
+ onPlaceSelect: x,
976
+ defaultRadiusKm: y,
977
+ reverseGeocode: m,
978
+ inputRef: p
971
979
  }
972
980
  ) }),
973
981
  /* @__PURE__ */ a(
974
- U,
982
+ q,
975
983
  {
976
984
  value: t,
977
985
  variant: s,
978
- submitting: c,
986
+ submitting: l,
979
987
  submitLabel: r,
988
+ allowEmptySubmit: o,
980
989
  onSubmit: h
981
990
  }
982
991
  )
983
992
  ] }) }),
984
- /* @__PURE__ */ a(De, { cards: n })
993
+ /* @__PURE__ */ a(Le, { cards: n })
985
994
  ] });
986
995
  }
987
996
  const Be = le(function({
988
997
  variant: s,
989
998
  loadObjects: t,
990
- loadPlaces: d,
999
+ loadPlaces: c,
991
1000
  onObjectSelect: h,
992
- onPlaceSelect: m,
993
- facets: b,
1001
+ onPlaceSelect: v,
1002
+ facets: g,
994
1003
  defaultRadiusKm: u = oe,
995
- reverseGeocode: y,
1004
+ reverseGeocode: x,
996
1005
  discoveryCards: n,
997
- countryCode: c,
1006
+ countryCode: l,
998
1007
  value: r,
999
- onChange: i,
1008
+ onChange: o,
1000
1009
  onSubmit: f,
1001
1010
  submitting: p,
1002
- submitLabel: x,
1003
- "aria-label": v,
1004
- id: o,
1005
- className: T,
1006
- ...F
1011
+ submitLabel: y,
1012
+ allowEmptySubmit: m,
1013
+ "aria-label": i,
1014
+ id: N,
1015
+ className: F,
1016
+ ...U
1007
1017
  }, G) {
1008
- const { t: Q } = C(), N = S(null), K = S(null), I = S(null), k = S(!1);
1018
+ const { t: R } = A(), Q = S(null), C = S(null), P = S(null), I = S(!1);
1009
1019
  B(() => {
1010
- if (!k.current && s === "who-where-when") {
1020
+ if (!I.current && s === "who-where-when") {
1011
1021
  if (r.when !== void 0) {
1012
- k.current = !0;
1022
+ I.current = !0;
1013
1023
  return;
1014
1024
  }
1015
- k.current = !0, i({ ...r, when: "anytime" });
1025
+ I.current = !0, o({ ...r, when: "anytime" });
1016
1026
  }
1017
1027
  }, [s]);
1018
- const O = S(!1);
1028
+ const T = S(!1);
1019
1029
  B(() => {
1020
- if (!O.current && s === "faceted") {
1030
+ if (!T.current && s === "faceted") {
1021
1031
  if (r.facets !== void 0) {
1022
- O.current = !0;
1032
+ T.current = !0;
1023
1033
  return;
1024
1034
  }
1025
- O.current = !0, i({ ...r, facets: {} });
1035
+ T.current = !0, o({ ...r, facets: {} });
1026
1036
  }
1027
1037
  }, [s]);
1028
- const V = S(null);
1038
+ const O = S(null);
1029
1039
  B(() => {
1030
- V.current !== s && (V.current = s, w("patient_search_variant_exposed", { variant: s, country: c }));
1031
- }, [s, c]);
1032
- const L = Y(
1040
+ O.current !== s && (O.current = s, w("patient_search_variant_exposed", { variant: s, country: l }));
1041
+ }, [s, l]);
1042
+ const E = Y(
1033
1043
  () => ({
1034
1044
  getVariant: () => s,
1035
1045
  reset: () => {
1036
- i({});
1046
+ o({});
1037
1047
  },
1038
1048
  focusPrimary: () => {
1039
1049
  requestAnimationFrame(() => {
1040
- var g;
1041
- (g = K.current) == null || g.focus();
1050
+ var k;
1051
+ (k = C.current) == null || k.focus();
1042
1052
  });
1043
1053
  }
1044
1054
  }),
1045
- [s, i]
1055
+ [s, o]
1046
1056
  );
1047
- ue(G, () => L, [L]), me(_e, L, o);
1048
- const E = v ?? Q("patientSearch.regionLabel"), R = {
1057
+ ue(G, () => E, [E]), he(_e, E, N);
1058
+ const V = i ?? R("patientSearch.regionLabel"), d = {
1049
1059
  variant: s,
1050
1060
  value: r,
1051
- onChange: i,
1061
+ onChange: o,
1052
1062
  onSubmit: f,
1053
1063
  loadObjects: t,
1054
- loadPlaces: d,
1064
+ loadPlaces: c,
1055
1065
  onObjectSelect: h,
1056
- onPlaceSelect: m,
1057
- facets: b,
1066
+ onPlaceSelect: v,
1067
+ facets: g,
1058
1068
  defaultRadiusKm: u,
1059
- reverseGeocode: y,
1069
+ reverseGeocode: x,
1060
1070
  discoveryCards: n ?? [],
1061
1071
  submitting: p,
1062
- submitLabel: x,
1063
- whoRef: K,
1064
- whereRef: I,
1065
- cardLabel: E
1066
- }, l = (() => {
1072
+ submitLabel: y,
1073
+ allowEmptySubmit: m,
1074
+ whoRef: C,
1075
+ whereRef: P,
1076
+ cardLabel: V
1077
+ }, b = (() => {
1067
1078
  switch (s) {
1068
1079
  case "who-where":
1069
- return /* @__PURE__ */ a(Ie, { ...R });
1080
+ return /* @__PURE__ */ a(Pe, { ...d });
1070
1081
  case "who-where-when":
1071
- return /* @__PURE__ */ a(Oe, { ...R });
1082
+ return /* @__PURE__ */ a(Ie, { ...d });
1072
1083
  case "faceted":
1073
- return /* @__PURE__ */ a(Ve, { ...R });
1084
+ return /* @__PURE__ */ a(Oe, { ...d });
1074
1085
  case "discovery":
1075
- return /* @__PURE__ */ a(Ee, { ...R });
1086
+ return /* @__PURE__ */ a(Ve, { ...d });
1076
1087
  /* c8 ignore next 2 */
1077
1088
  default:
1078
1089
  return null;
@@ -1081,16 +1092,16 @@ const Be = le(function({
1081
1092
  return /* @__PURE__ */ a(
1082
1093
  "div",
1083
1094
  {
1084
- ref: N,
1095
+ ref: Q,
1085
1096
  role: "region",
1086
- "aria-label": E,
1087
- id: o,
1097
+ "aria-label": V,
1098
+ id: N,
1088
1099
  "data-component": "patient-search",
1089
- "data-component-id": o,
1100
+ "data-component-id": N,
1090
1101
  "data-variant": s,
1091
- className: Ne({ variant: s, className: T }),
1092
- ...F,
1093
- children: l
1102
+ className: Ne({ variant: s, className: F }),
1103
+ ...U,
1104
+ children: b
1094
1105
  }
1095
1106
  );
1096
1107
  });
@@ -1099,4 +1110,4 @@ export {
1099
1110
  Be as P,
1100
1111
  _e as p
1101
1112
  };
1102
- //# sourceMappingURL=patient-search-BhlxYAI3.js.map
1113
+ //# sourceMappingURL=patient-search-DuSoGG2t.js.map