@eka-care/medassist-widget 0.1.115-dev.1 → 0.1.116-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
- import { c, u as e, j as M, w, o as b, p as C, x as z, B as g, s as j, d as S, A as $ } from "./medassist-widget.js";
1
+ import { c, u as e, k as M, w, p as b, r as C, x as z, B as g, t as S, d as $, A as j } from "./medassist-widget.js";
2
2
  import { C as A } from "./medassist-widget-check-BaHLRs-2.js";
3
3
  import { M as v } from "./medassist-widget-map-pin-Bx-5lPdC.js";
4
- import { FocusCarousel as I } from "./medassist-widget-FocusCarousel-B_mLQFoV.js";
4
+ import { FocusCarousel as I } from "./medassist-widget-FocusCarousel-C8sm1Tm0.js";
5
5
  const B = [
6
6
  ["path", { d: "M10 12h4", key: "a56b0p" }],
7
7
  ["path", { d: "M10 8h4", key: "1sr2af" }],
@@ -110,7 +110,7 @@ function _({
110
110
  a?.primary_cta?.tool_result && (f = !0), d?.({ message: n.text || n.title, selectedCard: a?.title, selectedComponent: a, selected_id: a.card_id, ...f ? { tool_result: a.primary_cta?.tool_result } : {} });
111
111
  }
112
112
  }, x = !!m;
113
- return /* @__PURE__ */ e(j, { className: "w-full h-full flex flex-col overflow-hidden rounded-xl border border-black-200 dark:border-white-200 bg-elicitationBg text-card-foreground shadow-none", children: [
113
+ return /* @__PURE__ */ e(S, { className: "w-full h-full flex flex-col overflow-hidden rounded-xl border border-black-200 dark:border-white-200 bg-elicitationBg text-card-foreground shadow-none", children: [
114
114
  /* @__PURE__ */ e(M, { className: `flex flex-row items-center justify-between gap-3 p-3 ${x ? "bg-primary/[20%]" : ""}`, children: [
115
115
  /* @__PURE__ */ e("div", { className: "min-w-0 flex-1 overflow-hidden", children: [
116
116
  l ? /* @__PURE__ */ e(w, { className: "text-base font-bold leading-tight tracking-tight truncate", children: l }) : null,
@@ -188,7 +188,7 @@ function W({
188
188
  className: l,
189
189
  orientation: o = "vertical"
190
190
  }) {
191
- const [p, m] = S(!1), h = $(!1), i = (a ?? []).filter((t) => !!t?.card_id);
191
+ const [p, m] = $(!1), h = j(!1), i = (a ?? []).filter((t) => !!t?.card_id);
192
192
  if (!i.length)
193
193
  return /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground py-2", children: "No options available." });
194
194
  const u = async (t) => {
@@ -1,4 +1,4 @@
1
- import { c as _, d as f, A as R, y as A, u as e, h as x, C as G, T as S, q, _ as pe, i as fe, j as ue, k as xe, l as ge, m as be, n as ye, S as Z, o as ve, I as we, p as ke, B as w, r as D, s as Ne, t as Ce, v as ee } from "./medassist-widget.js";
1
+ import { c as _, d as f, A as P, y as L, u as e, i as x, C as Y, T as S, q, _ as pe, j as fe, k as ue, l as xe, m as ge, n as be, o as ye, S as Z, p as ve, I as we, r as ke, B as w, s as D, t as Ne, v as Ce, a as ee } from "./medassist-widget.js";
2
2
  import { C as _e } from "./medassist-widget-check-BaHLRs-2.js";
3
3
  import { M as te } from "./medassist-widget-map-pin-Bx-5lPdC.js";
4
4
  import { C as Se, a as $e } from "./medassist-widget-chevron-right-CKYbGWbY.js";
@@ -6,54 +6,54 @@ const Me = [
6
6
  ["path", { d: "M5 12h14", key: "1ays0h" }],
7
7
  ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
8
8
  ], ae = _("arrow-right", Me);
9
- const Le = [
9
+ const Ae = [
10
10
  ["path", { d: "M8 2v4", key: "1cmpym" }],
11
11
  ["path", { d: "M16 2v4", key: "4m81vk" }],
12
12
  ["path", { d: "M21 13V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8", key: "3spt84" }],
13
13
  ["path", { d: "M3 10h18", key: "8toen8" }],
14
14
  ["path", { d: "m17 22 5-5", key: "1k6ppv" }],
15
15
  ["path", { d: "m17 17 5 5", key: "p7ous7" }]
16
- ], Ae = _("calendar-x-2", Le);
16
+ ], Le = _("calendar-x-2", Ae);
17
17
  const Be = [
18
18
  ["path", { d: "M12 6v6l4 2", key: "mmk7yg" }],
19
19
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]
20
- ], He = _("clock", Be);
21
- const Ie = [
20
+ ], Ie = _("clock", Be);
21
+ const Te = [
22
22
  ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
23
23
  ["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
24
24
  ["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
25
- ], je = _("ellipsis", Ie);
26
- const Oe = [
25
+ ], Ee = _("ellipsis", Te);
26
+ const He = [
27
27
  ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
28
28
  ["path", { d: "M10 14 21 3", key: "gplh6r" }],
29
29
  ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
30
- ], Te = _("external-link", Oe);
31
- const Ee = [
30
+ ], Oe = _("external-link", He);
31
+ const je = [
32
32
  ["path", { d: "m5 8 6 6", key: "1wu5hv" }],
33
33
  ["path", { d: "m4 14 6-6 2-3", key: "1k1g8d" }],
34
34
  ["path", { d: "M2 5h12", key: "or177f" }],
35
35
  ["path", { d: "M7 2h1", key: "1t2jsx" }],
36
36
  ["path", { d: "m22 22-5-10-5 10", key: "don7ne" }],
37
37
  ["path", { d: "M14 18h6", key: "1m8k6r" }]
38
- ], ze = _("languages", Ee);
38
+ ], ze = _("languages", je);
39
39
  const Ve = [
40
40
  ["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
41
41
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
42
42
  ], qe = _("search", Ve);
43
- function Re({
43
+ function Pe({
44
44
  value: o,
45
45
  onValueChange: r,
46
46
  placeholder: h = "Select an option",
47
47
  className: m,
48
48
  triggerClassName: B,
49
- contentClassName: H,
49
+ contentClassName: I,
50
50
  disabled: y = !1,
51
51
  options: c = [],
52
- size: I = "default",
53
- icon: F
52
+ size: T = "default",
53
+ icon: R
54
54
  }) {
55
- const [v, k] = f(!1), j = R(null), n = R(null), g = c.find((s) => s.value === o);
56
- A(() => {
55
+ const [v, k] = f(!1), E = P(null), n = P(null), g = c.find((s) => s.value === o);
56
+ L(() => {
57
57
  const s = (b) => {
58
58
  v && b.key === "Escape" && (k(!1), n.current?.focus());
59
59
  };
@@ -76,13 +76,13 @@ function Re({
76
76
  disabled: y,
77
77
  className: x(
78
78
  'border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*="text-"])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-full items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 overflow-hidden',
79
- I === "default" ? "min-h-9" : "min-h-8",
79
+ T === "default" ? "min-h-9" : "min-h-8",
80
80
  B
81
81
  ),
82
82
  "aria-expanded": v,
83
83
  "aria-haspopup": "listbox",
84
84
  children: [
85
- F,
85
+ R,
86
86
  /* @__PURE__ */ e(
87
87
  "span",
88
88
  {
@@ -94,7 +94,7 @@ function Re({
94
94
  }
95
95
  ),
96
96
  /* @__PURE__ */ e(
97
- G,
97
+ Y,
98
98
  {
99
99
  className: x(
100
100
  "size-4 opacity-50 pointer-events-none shrink-0 transition-transform duration-200",
@@ -108,10 +108,10 @@ function Re({
108
108
  v && /* @__PURE__ */ e(
109
109
  "div",
110
110
  {
111
- ref: j,
111
+ ref: E,
112
112
  className: x(
113
113
  "bg-surface text-foreground animate-in fade-in-0 zoom-in-95 slide-in-from-top-2 relative z-50 max-h-[136px] min-w-[8rem] w-full overflow-x-hidden overflow-y-auto overscroll-contain rounded-md shadow-md mt-1",
114
- H
114
+ I
115
115
  ),
116
116
  role: "listbox",
117
117
  children: /* @__PURE__ */ e("div", { className: "p-1", children: c.length === 0 ? /* @__PURE__ */ e("div", { className: "px-3 py-2 text-sm text-muted-foreground text-center", children: "No options available" }) : c.map((s) => {
@@ -148,20 +148,20 @@ function Re({
148
148
  }
149
149
  function re({ date: o }) {
150
150
  return /* @__PURE__ */ e("div", { className: "flex flex-col items-center justify-center gap-3 pt-5 pb-4", children: [
151
- /* @__PURE__ */ e("div", { className: "flex h-16 w-16 items-center justify-center rounded-full bg-black-100 dark:bg-white-100", children: /* @__PURE__ */ e(Ae, { className: "h-7 w-7 text-text-secondary", "aria-hidden": !0 }) }),
151
+ /* @__PURE__ */ e("div", { className: "flex h-16 w-16 items-center justify-center rounded-full bg-black-100 dark:bg-white-100", children: /* @__PURE__ */ e(Le, { className: "h-7 w-7 text-text-secondary", "aria-hidden": !0 }) }),
152
152
  /* @__PURE__ */ e("p", { className: "text-sm font-medium text-text-secondary text-center", children: `No slots available ${o && `on ${Ce(o)}` || ""}` })
153
153
  ] });
154
154
  }
155
- function Xe({ doctor: o, doctorDetails: r, onSelect: h, disabled: m, isActive: B = !0 }) {
156
- const H = S(() => (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), []), y = S(() => {
155
+ function Ge({ doctor: o, doctorDetails: r, onSelect: h, disabled: m, isActive: B = !0 }) {
156
+ const I = S(() => (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), []), y = S(() => {
157
157
  if (r?.hospitals?.[0]?.hospital_id)
158
158
  return r?.hospitals?.[0]?.hospital_id;
159
- }, [r?.hospitals]), [c, I] = f(y), [F, v] = f(!1), [k, j] = f(!1), [n, g] = f(null), [p, $] = f(null), [s, b] = f(0), [N, X] = f(!1), [O, Y] = f(!1), [M, J] = f(!1), [T, Q] = f(!1), [P, ne] = f(!1), K = R(!1), E = R(null);
160
- A(() => {
161
- I(y);
159
+ }, [r?.hospitals]), [c, T] = f(y), [R, v] = f(!1), [k, E] = f(!1), [n, g] = f(null), [p, $] = f(null), [s, b] = f(0), [N, G] = f(!1), [H, X] = f(!1), [M, J] = f(!1), [O, Q] = f(!1), [F, ne] = f(!1), K = P(!1), j = P(null);
160
+ L(() => {
161
+ T(y);
162
162
  }, [y]);
163
163
  const i = o.availability ?? [], ie = q(async () => {
164
- if (!M && (Y(!0), !i.length && h && r)) {
164
+ if (!M && (X(!0), !i.length && h && r)) {
165
165
  J(!0);
166
166
  try {
167
167
  await h({ ...o, hospital_id: c });
@@ -169,33 +169,33 @@ function Xe({ doctor: o, doctorDetails: r, onSelect: h, disabled: m, isActive: B
169
169
  J(!1);
170
170
  }
171
171
  }
172
- }, [O, M, h, r, i.length, c]), le = q(
172
+ }, [H, M, h, r, i.length, c]), le = q(
173
173
  (t) => {
174
- r && (I(t), g(null), $(null), b(0), K.current = !1, h?.({ ...o, hospital_id: t }));
174
+ r && (T(t), g(null), $(null), b(0), K.current = !1, h?.({ ...o, hospital_id: t }));
175
175
  },
176
176
  [o, h, r]
177
177
  );
178
- A(() => {
179
- B || Y(!1);
180
- }, [B]), A(() => {
181
- if (!O || !i.length || K.current) return;
178
+ L(() => {
179
+ B || X(!1);
180
+ }, [B]), L(() => {
181
+ if (!H || !i.length || K.current) return;
182
182
  K.current = !0;
183
183
  const t = i.find((l) => l.date === o.preferred_date) || i[0], a = t.date;
184
184
  a && (g(a), t.slots?.length || h?.({ ...o, hospital_id: c, preferred_date: a }));
185
- }, [i, O, o.preferred_date]);
185
+ }, [i, H, o.preferred_date]);
186
186
  const z = S(
187
187
  () => i.find((t) => t.date === n)?.slots ?? [],
188
188
  [i, n]
189
189
  );
190
190
  pe(() => {
191
- const t = E.current;
191
+ const t = j.current;
192
192
  t && (t.scrollTop = 0, Q(t.scrollHeight > t.clientHeight + 2));
193
193
  }, [n, z.length]);
194
194
  const se = q(() => {
195
- const t = E.current;
195
+ const t = j.current;
196
196
  t && Q(t.scrollTop + t.clientHeight < t.scrollHeight - 4);
197
197
  }, []), oe = () => {
198
- E.current?.scrollBy({ top: 120, behavior: "smooth" });
198
+ j.current?.scrollBy({ top: 120, behavior: "smooth" });
199
199
  }, ce = S(() => {
200
200
  if (!i.length) return [];
201
201
  const t = Math.min(s + 3, i.length);
@@ -203,15 +203,15 @@ function Xe({ doctor: o, doctorDetails: r, onSelect: h, disabled: m, isActive: B
203
203
  if (a.date)
204
204
  return { ...a, ...fe(a.date) };
205
205
  });
206
- }, [i, s]), U = i[0]?.date, de = s > 0 || !!U && U > H;
207
- A(() => {
206
+ }, [i, s]), U = i[0]?.date, de = s > 0 || !!U && U > I;
207
+ L(() => {
208
208
  if (!n || i.length === 0) return;
209
209
  const t = i.findIndex((a) => a.date === n);
210
210
  t < 0 || b((a) => t >= a && t < a + 3 ? a : Math.min(t, Math.max(0, i.length - 3)));
211
211
  }, [n, i]);
212
- const L = q(
212
+ const A = q(
213
213
  async (t) => {
214
- g(t), $(null), X(!1);
214
+ g(t), $(null), G(!1);
215
215
  const a = i.find((l) => l.date === t);
216
216
  if (!(a?.slots?.length || Array.isArray(a?.slots) && a?.slots.length === 0)) {
217
217
  v(!0);
@@ -227,10 +227,10 @@ function Xe({ doctor: o, doctorDetails: r, onSelect: h, disabled: m, isActive: B
227
227
  ), d = S(() => i.find((a) => a.date === n)?.cta ?? o.cta, [i, n, o.cta]), V = S(() => m || k || !d?.text && !n, [m, d, n, k]), W = async () => {
228
228
  if (!k)
229
229
  try {
230
- j(!0);
230
+ E(!0);
231
231
  let t;
232
232
  g((me) => (t = o?.preferred_date ?? me, t));
233
- const a = d?.text, l = !!a, u = d?.action ? d.action === ee.TOOL_CALL : !l, C = n && p ? ` on ${t} at ${p}.` : "";
233
+ const a = d?.text, l = !!a, u = d?.action ? d.action === ee.SYNAPSE_CTA_ACTIONS.TOOL_CALL : !l, C = n && p ? ` on ${t} at ${p}.` : "";
234
234
  await h?.(
235
235
  { ...o, hospital_id: c, preferred_date: t ?? void 0, preferred_slot_time: p ?? void 0 },
236
236
  `${a || `I want to book an appointment with Dr. ${r?.name}`}${C}`,
@@ -239,14 +239,14 @@ function Xe({ doctor: o, doctorDetails: r, onSelect: h, disabled: m, isActive: B
239
239
  );
240
240
  } catch {
241
241
  } finally {
242
- j(!1);
242
+ E(!1);
243
243
  }
244
244
  }, he = () => {
245
245
  if (N) return;
246
246
  const t = d?.text, a = !!t;
247
247
  if (!a && !n) return;
248
- X(!0);
249
- const l = d?.action ? d.action === ee.TOOL_CALL : !a, u = n && p ? ` on ${n} at ${p}.` : "";
248
+ G(!0);
249
+ const l = d?.action ? d.action === ee.SYNAPSE_CTA_ACTIONS.TOOL_CALL : !a, u = n && p ? ` on ${n} at ${p}.` : "";
250
250
  h?.(
251
251
  { ...o, hospital_id: c, preferred_date: n ?? void 0, preferred_slot_time: p ?? void 0 },
252
252
  `${t || `I want to book an appointment with Dr. ${r?.name}`}${u}`,
@@ -271,7 +271,7 @@ function Xe({ doctor: o, doctorDetails: r, onSelect: h, disabled: m, isActive: B
271
271
  rel: "noreferrer",
272
272
  "aria-label": "View profile",
273
273
  className: "inline-block align-middle ml-2 text-primary hover:text-primary/70 transition-colors",
274
- children: /* @__PURE__ */ e(Te, { className: "h-3.5 w-3.5 inline", "aria-hidden": !0 })
274
+ children: /* @__PURE__ */ e(Oe, { className: "h-3.5 w-3.5 inline", "aria-hidden": !0 })
275
275
  }
276
276
  )
277
277
  ] }),
@@ -294,7 +294,7 @@ function Xe({ doctor: o, doctorDetails: r, onSelect: h, disabled: m, isActive: B
294
294
  /* @__PURE__ */ e(ve, { className: "px-3 py-2", children: [
295
295
  /* @__PURE__ */ e("div", { className: "grid gap-1 pb-2 border-b border-border-subtle", children: [
296
296
  r.timings && /* @__PURE__ */ e("div", { className: "flex items-start gap-2 min-w-0", children: [
297
- /* @__PURE__ */ e(He, { className: "h-3.5 w-3.5 text-primary mt-0.5 flex-shrink-0", "aria-hidden": !0 }),
297
+ /* @__PURE__ */ e(Ie, { className: "h-3.5 w-3.5 text-primary mt-0.5 flex-shrink-0", "aria-hidden": !0 }),
298
298
  /* @__PURE__ */ e("span", { className: "text-text-secondary text-xs line-clamp-1 min-w-0", children: r.timings })
299
299
  ] }),
300
300
  r.languages && /* @__PURE__ */ e("div", { className: "flex items-center gap-2 min-w-0", children: [
@@ -302,7 +302,7 @@ function Xe({ doctor: o, doctorDetails: r, onSelect: h, disabled: m, isActive: B
302
302
  /* @__PURE__ */ e("span", { className: "text-text-secondary text-xs line-clamp-1 min-w-0", children: r.languages })
303
303
  ] }),
304
304
  r.hospitals?.length > 1 && c ? /* @__PURE__ */ e(
305
- Re,
305
+ Pe,
306
306
  {
307
307
  options: r.hospitals.map((t) => ({ value: t.hospital_id, label: t.name || "" })),
308
308
  placeholder: "Select Hospital",
@@ -324,7 +324,7 @@ function Xe({ doctor: o, doctorDetails: r, onSelect: h, disabled: m, isActive: B
324
324
  {
325
325
  className: x(
326
326
  "text-text-secondary text-xs leading-snug prose prose-sm max-w-none prose-strong:font-semibold prose-p:my-0 break-words overflow-hidden",
327
- !P && "line-clamp-1"
327
+ !F && "line-clamp-1"
328
328
  ),
329
329
  children: /* @__PURE__ */ e(ke, { children: r.info })
330
330
  }
@@ -334,18 +334,18 @@ function Xe({ doctor: o, doctorDetails: r, onSelect: h, disabled: m, isActive: B
334
334
  {
335
335
  type: "button",
336
336
  onClick: () => ne((t) => !t),
337
- "aria-expanded": P,
337
+ "aria-expanded": F,
338
338
  className: "mt-0.5 flex items-center gap-1 text-[11px] font-semibold text-primary hover:text-primary/80 transition-colors",
339
339
  children: [
340
- /* @__PURE__ */ e(je, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
341
- P ? "View less" : "View more"
340
+ /* @__PURE__ */ e(Ee, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
341
+ F ? "View less" : "View more"
342
342
  ]
343
343
  }
344
344
  )
345
345
  ] })
346
346
  ] })
347
347
  ] }),
348
- O ? M ? /* @__PURE__ */ e("p", { className: "pt-3 text-sm text-text-secondary text-center", children: "Loading..." }) : i.length > 0 ? /* @__PURE__ */ e("div", { className: "pt-3", children: [
348
+ H ? M ? /* @__PURE__ */ e("p", { className: "pt-3 text-sm text-text-secondary text-center", children: "Loading..." }) : i.length > 0 ? /* @__PURE__ */ e("div", { className: "pt-3", children: [
349
349
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: [
350
350
  /* @__PURE__ */ e(
351
351
  w,
@@ -358,13 +358,13 @@ function Xe({ doctor: o, doctorDetails: r, onSelect: h, disabled: m, isActive: B
358
358
  const u = Math.max(0, s - 3);
359
359
  b(u);
360
360
  const C = i[u]?.date;
361
- C && L(C);
361
+ C && A(C);
362
362
  return;
363
363
  }
364
364
  const t = i[0]?.date, a = n && (!t || n < t) ? n : t;
365
365
  if (!a) return;
366
366
  const l = D(a, -1);
367
- l < H || (g(l), L(l));
367
+ l < I || (g(l), A(l));
368
368
  },
369
369
  disabled: m || !de,
370
370
  "aria-label": "Previous 3 days",
@@ -380,7 +380,7 @@ function Xe({ doctor: o, doctorDetails: r, onSelect: h, disabled: m, isActive: B
380
380
  {
381
381
  type: "button",
382
382
  variant: "outline",
383
- onClick: () => t.date && L(t.date),
383
+ onClick: () => t.date && A(t.date),
384
384
  disabled: m,
385
385
  "aria-current": l ? "date" : void 0,
386
386
  className: x(
@@ -428,14 +428,14 @@ function Xe({ doctor: o, doctorDetails: r, onSelect: h, disabled: m, isActive: B
428
428
  const l = i[i.length - 1]?.date, u = n && (!l || n > l) ? n : l;
429
429
  if (u) {
430
430
  const C = D(u, 1);
431
- g(C), L(C);
431
+ g(C), A(C);
432
432
  }
433
433
  return;
434
434
  }
435
435
  const t = Math.min(Math.max(0, i.length - 3), s + 3);
436
436
  b(t);
437
437
  const a = i[t]?.date;
438
- a && L(a);
438
+ a && A(a);
439
439
  },
440
440
  disabled: m,
441
441
  "aria-label": "Next 3 days",
@@ -448,7 +448,7 @@ function Xe({ doctor: o, doctorDetails: r, onSelect: h, disabled: m, isActive: B
448
448
  /* @__PURE__ */ e(
449
449
  "div",
450
450
  {
451
- ref: E,
451
+ ref: j,
452
452
  onScroll: se,
453
453
  className: "grid grid-cols-3 gap-2 overflow-y-auto overscroll-contain",
454
454
  style: { maxHeight: "108px" },
@@ -474,19 +474,19 @@ function Xe({ doctor: o, doctorDetails: r, onSelect: h, disabled: m, isActive: B
474
474
  })
475
475
  }
476
476
  ),
477
- T && /* @__PURE__ */ e("div", { className: "absolute bottom-0 left-0 right-0 h-12 bg-gradient-to-t from-elicitationBg via-elicitationBg to-transparent pointer-events-none flex items-end justify-center pb-1", children: /* @__PURE__ */ e(
477
+ O && /* @__PURE__ */ e("div", { className: "absolute bottom-0 left-0 right-0 h-12 bg-gradient-to-t from-elicitationBg via-elicitationBg to-transparent pointer-events-none flex items-end justify-center pb-1", children: /* @__PURE__ */ e(
478
478
  "button",
479
479
  {
480
480
  type: "button",
481
481
  onClick: oe,
482
482
  className: "pointer-events-auto flex items-center gap-1 text-xs font-semibold text-primary hover:text-primary/80 transition-colors",
483
483
  children: [
484
- /* @__PURE__ */ e(G, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
484
+ /* @__PURE__ */ e(Y, { className: "h-3.5 w-3.5", "aria-hidden": !0 }),
485
485
  "More slots"
486
486
  ]
487
487
  }
488
488
  ) })
489
- ] }) : F ? /* @__PURE__ */ e("p", { className: "text-sm text-text-secondary px-1", children: "Fetching slots..." }) : /* @__PURE__ */ e(re, { date: n }) }),
489
+ ] }) : R ? /* @__PURE__ */ e("p", { className: "text-sm text-text-secondary px-1", children: "Fetching slots..." }) : /* @__PURE__ */ e(re, { date: n }) }),
490
490
  z?.length ? /* @__PURE__ */ e(
491
491
  w,
492
492
  {
@@ -494,7 +494,7 @@ function Xe({ doctor: o, doctorDetails: r, onSelect: h, disabled: m, isActive: B
494
494
  onClick: he,
495
495
  disabled: N || m || !p,
496
496
  "aria-disabled": N || m || !p,
497
- className: `w-full h-10 gap-2 bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-60 shadow-sm font-semibold ${T ? "" : " mt-2"}`,
497
+ className: `w-full h-10 gap-2 bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-60 shadow-sm font-semibold ${O ? "" : " mt-2"}`,
498
498
  children: [
499
499
  d?.title || "Book appointment",
500
500
  /* @__PURE__ */ e(ae, { className: "h-4 w-4", "aria-hidden": !0 })
@@ -507,7 +507,7 @@ function Xe({ doctor: o, doctorDetails: r, onSelect: h, disabled: m, isActive: B
507
507
  onClick: W,
508
508
  disabled: V,
509
509
  "aria-disabled": V,
510
- className: `w-full h-10 gap-2 bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-60 shadow-sm font-semibold ${T ? "" : " mt-2"}`,
510
+ className: `w-full h-10 gap-2 bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-60 shadow-sm font-semibold ${O ? "" : " mt-2"}`,
511
511
  children: [
512
512
  d?.title || "Book appointment",
513
513
  /* @__PURE__ */ e(ae, { className: "h-4 w-4", "aria-hidden": !0 })
@@ -523,7 +523,7 @@ function Xe({ doctor: o, doctorDetails: r, onSelect: h, disabled: m, isActive: B
523
523
  onClick: W,
524
524
  disabled: V,
525
525
  "aria-disabled": V,
526
- className: `w-full h-10 gap-2 bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-60 shadow-sm font-semibold ${T ? "" : " mt-2"}`,
526
+ className: `w-full h-10 gap-2 bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-60 shadow-sm font-semibold ${O ? "" : " mt-2"}`,
527
527
  children: [
528
528
  d?.title || "Book appointment",
529
529
  /* @__PURE__ */ e(qe, { className: "h-4 w-4", "aria-hidden": !0 })
@@ -540,7 +540,7 @@ function Xe({ doctor: o, doctorDetails: r, onSelect: h, disabled: m, isActive: B
540
540
  className: "w-full h-8 gap-1 text-xs border-primary/40 text-primary hover:bg-primary/10 disabled:opacity-60 font-medium rounded-lg",
541
541
  children: [
542
542
  M ? "Loading..." : "Show available slots",
543
- /* @__PURE__ */ e(G, { className: "h-3.5 w-3.5", "aria-hidden": !0 })
543
+ /* @__PURE__ */ e(Y, { className: "h-3.5 w-3.5", "aria-hidden": !0 })
544
544
  ]
545
545
  }
546
546
  ) })
@@ -548,5 +548,5 @@ function Xe({ doctor: o, doctorDetails: r, onSelect: h, disabled: m, isActive: B
548
548
  ] }) : null;
549
549
  }
550
550
  export {
551
- Xe as DoctorCard
551
+ Ge as DoctorCard
552
552
  };
@@ -1,8 +1,8 @@
1
- import { d as h, A as u, y as T, _ as I, u as r, h as g } from "./medassist-widget.js";
1
+ import { d as u, A as h, y as T, _ as I, u as r, i as g } from "./medassist-widget.js";
2
2
  import { C as X, a as W } from "./medassist-widget-chevron-right-CKYbGWbY.js";
3
3
  const w = 12, _ = 0.76, k = 3;
4
4
  function E({ count: i, renderItem: m, className: f }) {
5
- const [a, A] = h(0), [o, C] = h(0), [N, R] = h(() => Math.min(k, i)), c = u(null), b = u(0), p = u(0);
5
+ const [a, A] = u(0), [o, C] = u(0), [N, R] = u(() => Math.min(k, i)), c = h(null), b = h(0), p = h(0);
6
6
  if (T(() => {
7
7
  R((t) => Math.max(t, Math.min(a + 2, i)));
8
8
  }, [a, i]), I(() => {
@@ -1,4 +1,4 @@
1
- import { c as d, A as v, d as x, y as C, u as e, s as L, o as P, F as _, S as j, B as D } from "./medassist-widget.js";
1
+ import { c as d, A as v, d as x, y as C, u as e, t as L, p as P, F as _, S as j, B as D } from "./medassist-widget.js";
2
2
  const R = [
3
3
  [
4
4
  "path",
@@ -1,4 +1,4 @@
1
- import { A as x, y as E, q as X, d as _, R as j, a as O, T as Y, D as y, b as J, u as l, P as S, e as Q, S as D, f as T, g as M, h as N } from "./medassist-widget.js";
1
+ import { A as x, y as E, q as X, d as _, R as j, b as O, T as Y, D as y, e as J, u as l, P as S, f as Q, S as D, g as T, h as M, i as N } from "./medassist-widget.js";
2
2
  import { C as Z } from "./medassist-widget-check-BaHLRs-2.js";
3
3
  var V = j[" useInsertionEffect ".trim().toString()] || O;
4
4
  function ee({
@@ -1,4 +1,4 @@
1
- import { c, u as e, d as y, V as t, B as l, M as h, X as v } from "./medassist-widget.js";
1
+ import { c, u as e, d as y, a as t, B as l, M as h, X as v } from "./medassist-widget.js";
2
2
  const x = [
3
3
  ["path", { d: "M12 19v3", key: "npa21l" }],
4
4
  ["path", { d: "M15 9.34V5a3 3 0 0 0-5.68-1.33", key: "1gzdoj" }],
@@ -27,11 +27,11 @@ const C = [
27
27
  function g({ state: i }) {
28
28
  switch (i) {
29
29
  case "speaking":
30
- return /* @__PURE__ */ e(M, {});
30
+ return /* @__PURE__ */ e(G, {});
31
31
  case "thinking":
32
32
  return /* @__PURE__ */ e(S, {});
33
33
  case "listening":
34
- return /* @__PURE__ */ e(B, {});
34
+ return /* @__PURE__ */ e(T, {});
35
35
  default:
36
36
  return /* @__PURE__ */ e(w, {});
37
37
  }
@@ -86,7 +86,7 @@ function w() {
86
86
  /* @__PURE__ */ e("circle", { cx: "120", cy: "120", r: "112", fill: "none", stroke: "currentColor", strokeOpacity: "0.06", strokeWidth: "0.6" })
87
87
  ] });
88
88
  }
89
- function B() {
89
+ function T() {
90
90
  return /* @__PURE__ */ e("svg", { viewBox: "0 0 240 240", xmlns: "http://www.w3.org/2000/svg", className: "w-full h-full", children: [
91
91
  /* @__PURE__ */ e("defs", { children: [
92
92
  /* @__PURE__ */ e("clipPath", { id: "vol-c", children: /* @__PURE__ */ e("circle", { cx: "120", cy: "120", r: "112" }) }),
@@ -202,7 +202,7 @@ function S() {
202
202
  /* @__PURE__ */ e("circle", { cx: "120", cy: "120", r: "112", fill: "none", stroke: "currentColor", strokeOpacity: "0.08", strokeWidth: "0.6" })
203
203
  ] });
204
204
  }
205
- function M() {
205
+ function G() {
206
206
  return /* @__PURE__ */ e("svg", { viewBox: "0 0 240 240", xmlns: "http://www.w3.org/2000/svg", className: "w-full h-full", children: [
207
207
  /* @__PURE__ */ e("defs", { children: [
208
208
  /* @__PURE__ */ e("clipPath", { id: "vot-c", children: /* @__PURE__ */ e("circle", { cx: "120", cy: "120", r: "112" }) }),
@@ -267,7 +267,7 @@ function M() {
267
267
  /* @__PURE__ */ e("circle", { cx: "120", cy: "120", r: "112", fill: "none", stroke: "currentColor", strokeOpacity: "0.08", strokeWidth: "0.6" })
268
268
  ] });
269
269
  }
270
- function T({
270
+ function M({
271
271
  state: i,
272
272
  isMuted: r,
273
273
  onEndCall: s,
@@ -277,7 +277,7 @@ function T({
277
277
  textColor: u = "white"
278
278
  }) {
279
279
  const [m, n] = y(!1);
280
- if (i === t.ERROR)
280
+ if (i === t.VOICE_AGENT_STATE.ERROR)
281
281
  return /* @__PURE__ */ e("div", { className: "flex-1 flex flex-col items-center justify-center bg-surface gap-4 p-8", children: [
282
282
  /* @__PURE__ */ e("div", { className: "w-16 h-16 rounded-full bg-destructive/10 flex items-center justify-center", children: /* @__PURE__ */ e(N, { className: "w-7 h-7 text-destructive" }) }),
283
283
  /* @__PURE__ */ e("div", { className: "text-center", children: [
@@ -290,25 +290,25 @@ function T({
290
290
  if (r)
291
291
  return "You are muted";
292
292
  switch (i) {
293
- case t.CONNECTING:
293
+ case t.VOICE_AGENT_STATE.CONNECTING:
294
294
  return `Please wait while we are
295
295
  connecting to an AI agent...`;
296
- case t.SPEAKING:
296
+ case t.VOICE_AGENT_STATE.SPEAKING:
297
297
  return `${f} is speaking...`;
298
- case t.LISTENING:
298
+ case t.VOICE_AGENT_STATE.LISTENING:
299
299
  return "You are speaking...";
300
- case t.THINKING:
300
+ case t.VOICE_AGENT_STATE.THINKING:
301
301
  return "One moment please...";
302
- case t.MUTED:
302
+ case t.VOICE_AGENT_STATE.MUTED:
303
303
  return "You are muted";
304
- case t.DISCONNECTING:
304
+ case t.VOICE_AGENT_STATE.DISCONNECTING:
305
305
  return "Ending session...";
306
306
  default:
307
307
  return "Go ahead, I'm listening...";
308
308
  }
309
- }, a = i === t.SPEAKING || i === t.CONNECTING || i === t.DISCONNECTING;
309
+ }, a = i === t.VOICE_AGENT_STATE.SPEAKING || i === t.VOICE_AGENT_STATE.CONNECTING || i === t.VOICE_AGENT_STATE.DISCONNECTING;
310
310
  return /* @__PURE__ */ e("div", { className: "flex-1 flex flex-col bg-surface relative", children: [
311
- /* @__PURE__ */ e("style", { children: G }),
311
+ /* @__PURE__ */ e("style", { children: E }),
312
312
  /* @__PURE__ */ e("div", { className: "py-2.5 text-center bg-primary/15", children: /* @__PURE__ */ e("span", { className: "text-[11px] font-bold uppercase tracking-[0.12em] text-primary", children: "Voice Mode Active" }) }),
313
313
  /* @__PURE__ */ e("div", { className: "flex-1 flex flex-col items-center justify-center gap-5", children: [
314
314
  /* @__PURE__ */ e("div", { className: "w-[200px] h-[200px] text-primary", children: /* @__PURE__ */ e(g, { state: i }) }),
@@ -338,7 +338,7 @@ connecting to an AI agent...`;
338
338
  {
339
339
  type: "button",
340
340
  onClick: () => n(!0),
341
- disabled: i === t.DISCONNECTING,
341
+ disabled: i === t.VOICE_AGENT_STATE.DISCONNECTING,
342
342
  className: "voice-end-btn",
343
343
  "aria-label": "Exit voice mode",
344
344
  children: /* @__PURE__ */ e(v, { className: "w-5 h-5 text-white" })
@@ -373,7 +373,7 @@ connecting to an AI agent...`;
373
373
  ] }) })
374
374
  ] });
375
375
  }
376
- const G = `
376
+ const E = `
377
377
  .voice-mic-btn {
378
378
  width: 56px;
379
379
  height: 56px;
@@ -415,5 +415,5 @@ const G = `
415
415
  .voice-end-btn:disabled { opacity: 0.5; cursor: not-allowed; }
416
416
  `;
417
417
  export {
418
- T as default
418
+ M as default
419
419
  };