@elevenlabs/convai-widget-core 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
1
  var ra = Object.defineProperty;
2
2
  var oa = (e, t, n) => t in e ? ra(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var oe = (e, t, n) => oa(e, typeof t != "symbol" ? t + "" : t, n);
3
+ var ae = (e, t, n) => oa(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import aa from "preact-custom-element";
5
- import { jsx as u, jsxs as _, Fragment as rt } from "preact/jsx-runtime";
5
+ import { jsx as u, jsxs as A, Fragment as rt } from "preact/jsx-runtime";
6
6
  import * as h from "preact/compat";
7
- import De, { useContext as ia, createContext as de, useMemo as Ae, useRef as J, useEffect as Ue, memo as vr, useState as Ie, useCallback as ee, forwardRef as sa, useLayoutEffect as la } from "preact/compat";
8
- import { signal as he, computed as Ce, useSignal as Q, useComputed as Y, useSignalEffect as Ee } from "@preact/signals";
7
+ import De, { useContext as ia, createContext as de, useMemo as Ae, useRef as ee, useEffect as Ue, memo as vr, useState as Ie, useCallback as te, forwardRef as sa, useLayoutEffect as la } from "preact/compat";
8
+ import { signal as he, computed as Ce, useSignal as J, useComputed as Y, useSignalEffect as Ee } from "@preact/signals";
9
9
  import { Conversation as ca, postOverallFeedback as Vn } from "@elevenlabs/client";
10
10
  import { clsx as V } from "clsx";
11
- import { jsx as E, jsxs as Nt, Fragment as gn } from "preact/compat/jsx-runtime";
11
+ import { jsx as T, jsxs as Nt, Fragment as gn } from "preact/compat/jsx-runtime";
12
12
  import { useMemo as ua, useCallback as Be } from "preact/hooks";
13
13
  function Re(e) {
14
14
  return e ? e === "true" ? !0 : e === "false" ? !1 : null : null;
@@ -155,14 +155,14 @@ function wa({
155
155
  function ba() {
156
156
  return fe(wr);
157
157
  }
158
- function F(e) {
158
+ function B(e) {
159
159
  return ba()[e];
160
160
  }
161
161
  const br = de(null);
162
162
  function xa({
163
163
  children: e
164
164
  }) {
165
- const t = F("server-location"), n = Ae(() => {
165
+ const t = B("server-location"), n = Ae(() => {
166
166
  const r = Ce(() => ga(t.value)), o = {
167
167
  us: "https://api.us.elevenlabs.io",
168
168
  "eu-residency": "https://api.eu.residency.elevenlabs.io",
@@ -231,7 +231,7 @@ const xr = de(null);
231
231
  function ya({
232
232
  children: e
233
233
  }) {
234
- const t = q(), n = F("language"), r = F("override-language"), o = Q(
234
+ const t = q(), n = B("language"), r = B("override-language"), o = J(
235
235
  n.peek() ?? t.peek().language
236
236
  ), a = Y(
237
237
  () => (t.value.supported_language_overrides ?? []).filter(
@@ -257,11 +257,11 @@ function ya({
257
257
  function at() {
258
258
  return fe(xr);
259
259
  }
260
- const Ca = "0.5.0", yr = de(null);
260
+ const Ca = "0.5.1", yr = de(null);
261
261
  function Sa({ children: e }) {
262
262
  const t = q(), n = Y(
263
263
  () => t.value.mic_muting_enabled ?? !1
264
- ), r = Q(!1), o = Ae(
264
+ ), r = J(!1), o = Ae(
265
265
  () => ({
266
266
  isMuted: Ce(
267
267
  () => n.value ? r.value : (
@@ -286,7 +286,7 @@ const Sr = de(null);
286
286
  function ka({
287
287
  children: e
288
288
  }) {
289
- const { language: t } = at(), n = F("override-prompt"), r = F("override-first-message"), o = F("override-voice-id"), a = F("override-text-only"), i = F("user-id"), s = Y(() => ({
289
+ const { language: t } = at(), n = B("override-prompt"), r = B("override-first-message"), o = B("override-voice-id"), a = B("override-text-only"), i = B("user-id"), s = Y(() => ({
290
290
  agent: {
291
291
  prompt: {
292
292
  prompt: n.value
@@ -300,7 +300,7 @@ function ka({
300
300
  conversation: {
301
301
  textOnly: Re(a.value) ?? void 0
302
302
  }
303
- })), l = F("dynamic-variables"), c = Y(() => {
303
+ })), l = B("dynamic-variables"), c = Y(() => {
304
304
  if (l.value)
305
305
  try {
306
306
  return JSON.parse(l.value);
@@ -309,8 +309,8 @@ function ka({
309
309
  `[ConversationalAI] Cannot parse dynamic-variables: ${m == null ? void 0 : m.message}`
310
310
  );
311
311
  }
312
- }), { webSocketUrl: f } = wn(), p = F("agent-id"), v = F("signed-url"), g = bn(), b = Ia(), d = Y(() => {
313
- const m = b.value, w = {
312
+ }), { webSocketUrl: d } = wn(), p = B("agent-id"), v = B("signed-url"), g = bn(), x = Ia(), f = Y(() => {
313
+ const m = x.value, w = {
314
314
  dynamicVariables: c.value,
315
315
  overrides: s.value,
316
316
  connectionDelay: { default: 300 },
@@ -319,12 +319,12 @@ function ka({
319
319
  };
320
320
  return p.value ? m ? {
321
321
  agentId: p.value,
322
- origin: f.value,
322
+ origin: d.value,
323
323
  connectionType: "webrtc",
324
324
  ...w
325
325
  } : {
326
326
  agentId: p.value,
327
- origin: f.value,
327
+ origin: d.value,
328
328
  connectionType: "websocket",
329
329
  ...w
330
330
  } : v.value ? {
@@ -335,10 +335,10 @@ function ka({
335
335
  "[ConversationalAI] Either agent-id or signed-url is required"
336
336
  ), null);
337
337
  });
338
- return d.value ? /* @__PURE__ */ u(
338
+ return f.value ? /* @__PURE__ */ u(
339
339
  Sr.Provider,
340
340
  {
341
- value: d,
341
+ value: f,
342
342
  children: e
343
343
  }
344
344
  ) : null;
@@ -362,11 +362,11 @@ function Ta({ children: e }) {
362
362
  acceptTerms: () => {
363
363
  i.value = !0, a.value = !1;
364
364
  const c = t.peek().terms_key;
365
- c && localStorage.setItem(c, "true"), l.forEach((f) => f.resolve()), l = [];
365
+ c && localStorage.setItem(c, "true"), l.forEach((d) => d.resolve()), l = [];
366
366
  },
367
367
  requestTerms: async () => {
368
- s.peek() || (a.value = !0, await new Promise((c, f) => {
369
- l.push({ resolve: c, reject: f });
368
+ s.peek() || (a.value = !0, await new Promise((c, d) => {
369
+ l.push({ resolve: c, reject: d });
370
370
  }));
371
371
  }
372
372
  };
@@ -395,153 +395,153 @@ function Aa({ children: e }) {
395
395
  }
396
396
  }), /* @__PURE__ */ u(Er.Provider, { value: t, children: e });
397
397
  }
398
- function re() {
398
+ function oe() {
399
399
  return fe(Er);
400
400
  }
401
401
  function _a() {
402
- const e = J(null), t = J(null), n = J(!1), r = J(null), o = J(!1), a = q();
403
- Ar();
404
- const i = Bt(), s = Ea(), { isMuted: l } = Cr();
402
+ const e = ee(null), t = ee(null), n = ee(!1), r = ee(null), o = ee(!1), a = q(), i = Ar(), s = Bt(), l = Ea(), { isMuted: c } = Cr();
405
403
  return Ee(() => {
406
- var f;
407
- const c = l.value;
408
- (f = e == null ? void 0 : e.current) == null || f.setMicMuted(c);
404
+ var p;
405
+ const d = c.value;
406
+ (p = e == null ? void 0 : e.current) == null || p.setMicMuted(d);
409
407
  }), Ue(() => () => {
410
- var c;
411
- (c = e.current) == null || c.endSession();
408
+ var d;
409
+ (d = e.current) == null || d.endSession();
412
410
  }, []), Ae(() => {
413
- const c = he("disconnected"), f = Ce(() => c.value === "disconnected"), p = he("listening"), v = Ce(() => p.value === "speaking"), g = he(null), b = he(null), d = he(!1), m = he([]), w = he(0), y = he(null);
411
+ const d = he("disconnected"), p = Ce(() => d.value === "disconnected"), v = he("listening"), g = Ce(() => v.value === "speaking"), x = he(null), f = he(null), m = he(!1), w = he([]), b = he(0), y = he(null);
414
412
  return {
415
- status: c,
416
- isSpeaking: v,
417
- mode: p,
418
- isDisconnected: f,
419
- lastId: b,
420
- error: g,
421
- canSendFeedback: d,
422
- conversationIndex: w,
413
+ status: d,
414
+ isSpeaking: g,
415
+ mode: v,
416
+ isDisconnected: p,
417
+ lastId: f,
418
+ error: x,
419
+ canSendFeedback: m,
420
+ conversationIndex: b,
423
421
  conversationTextOnly: y,
424
- transcript: m,
425
- startSession: async (x, C) => {
426
- var A, k, I, D, L, $, W;
427
- if (await i.requestTerms(), (A = e.current) != null && A.isOpen())
422
+ transcript: w,
423
+ startSession: async (C, S) => {
424
+ var k, I, D, L, $, W, F;
425
+ if (await s.requestTerms(), (k = e.current) != null && k.isOpen())
428
426
  return e.current.getId();
429
427
  if (t.current)
430
428
  return (await t.current).getId();
431
- let S = structuredClone(s.peek());
432
- C && a.value.supports_text_only && (S.textOnly = !0, a.value.text_only || (S.overrides ?? (S.overrides = {}), (k = S.overrides).conversation ?? (k.conversation = {}), S.overrides.conversation.textOnly = !0));
429
+ let E = structuredClone(l.peek());
430
+ S && a.value.supports_text_only && (E.textOnly = !0, a.value.text_only || (E.overrides ?? (E.overrides = {}), (I = E.overrides).conversation ?? (I.conversation = {}), E.overrides.conversation.textOnly = !0));
433
431
  try {
434
- S = Pa(x, S);
432
+ E = Pa(C, E);
435
433
  } catch (N) {
436
434
  console.error(
437
435
  "[ConversationalAI] Error triggering call event:",
438
436
  N
439
437
  );
440
438
  }
441
- y.value = S.textOnly ?? !1, m.value = C ? [
439
+ y.value = E.textOnly ?? !1, w.value = S ? [
442
440
  {
443
441
  type: "message",
444
442
  role: "user",
445
- message: C,
443
+ message: S,
446
444
  isText: !0,
447
- conversationIndex: w.peek()
445
+ conversationIndex: b.peek()
448
446
  }
449
447
  ] : [];
450
448
  try {
451
449
  if (t.current = ca.startSession({
452
- ...S,
450
+ ...E,
453
451
  overrides: {
454
- ...S.overrides,
452
+ ...E.overrides,
455
453
  client: {
456
- ...(I = S.overrides) == null ? void 0 : I.client,
457
- source: ((L = (D = S.overrides) == null ? void 0 : D.client) == null ? void 0 : L.source) || "widget",
458
- version: ((W = ($ = S.overrides) == null ? void 0 : $.client) == null ? void 0 : W.version) || Ca
454
+ ...(D = E.overrides) == null ? void 0 : D.client,
455
+ source: (($ = (L = E.overrides) == null ? void 0 : L.client) == null ? void 0 : $.source) || "widget",
456
+ version: ((F = (W = E.overrides) == null ? void 0 : W.client) == null ? void 0 : F.version) || Ca
459
457
  }
460
458
  },
461
- onModeChange: (T) => {
462
- p.value = T.mode;
459
+ onModeChange: (_) => {
460
+ v.value = _.mode;
463
461
  },
464
- onStatusChange: (T) => {
465
- c.value = T.status;
462
+ onStatusChange: (_) => {
463
+ d.value = _.status;
466
464
  },
467
- onCanSendFeedbackChange: (T) => {
468
- d.value = T.canSendFeedback;
465
+ onCanSendFeedbackChange: (_) => {
466
+ m.value = _.canSendFeedback;
469
467
  },
470
- onMessage: ({ source: T, message: B }) => {
471
- if (y.peek() === !0 && T === "ai" && !n.current) {
468
+ onMessage: ({ source: _, message: O }) => {
469
+ if (i.peek() && y.peek() === !0 && _ === "ai" && !n.current) {
472
470
  n.current = !0;
473
471
  return;
474
- } else T === "ai" && (n.current = !0);
475
- if (T === "ai" && o.current) {
472
+ } else _ === "ai" && (n.current = !0);
473
+ if (_ === "ai" && o.current) {
476
474
  o.current = !1;
477
475
  return;
478
476
  }
479
- m.value = [
480
- ...m.value,
477
+ w.value = [
478
+ ...w.value,
481
479
  {
482
480
  type: "message",
483
- role: T,
484
- message: B,
481
+ role: _,
482
+ message: O,
485
483
  isText: !1,
486
- conversationIndex: w.peek()
484
+ conversationIndex: b.peek()
487
485
  }
488
486
  ];
489
487
  },
490
- onAgentChatResponsePart: ({ text: T, type: B }) => {
491
- const O = m.peek();
492
- if (B === "start")
493
- o.current = !0, r.current = O.length, m.value = [
494
- ...O,
488
+ onAgentChatResponsePart: ({ text: _, type: O }) => {
489
+ if (i.peek() && y.peek() === !0 && !n.current)
490
+ return;
491
+ const M = w.peek();
492
+ if (O === "start")
493
+ o.current = !0, r.current = M.length, w.value = [
494
+ ...M,
495
495
  {
496
496
  type: "message",
497
497
  role: "ai",
498
498
  message: "",
499
499
  isText: !0,
500
- conversationIndex: w.peek()
500
+ conversationIndex: b.peek()
501
501
  }
502
502
  ];
503
- else if (B === "delta") {
504
- const M = r.current;
505
- if (M !== null && O[M]) {
506
- const P = [...O], z = P[M];
507
- z.type === "message" && (P[M] = {
508
- ...z,
509
- message: z.message + T
510
- }, m.value = P);
503
+ else if (O === "delta") {
504
+ const P = r.current;
505
+ if (P !== null && M[P]) {
506
+ const z = [...M], Q = z[P];
507
+ Q.type === "message" && (z[P] = {
508
+ ...Q,
509
+ message: Q.message + _
510
+ }, w.value = z);
511
511
  }
512
- } else B === "stop" && (r.current = null);
512
+ } else O === "stop" && (r.current = null);
513
513
  },
514
- onDisconnect: (T) => {
515
- n.current = !1, y.value = null, r.current = null, o.current = !1, m.value = [
516
- ...m.value,
517
- T.reason === "error" ? {
514
+ onDisconnect: (_) => {
515
+ n.current = !1, y.value = null, r.current = null, o.current = !1, w.value = [
516
+ ...w.value,
517
+ _.reason === "error" ? {
518
518
  type: "error",
519
- message: T.message,
520
- conversationIndex: w.peek()
519
+ message: _.message,
520
+ conversationIndex: b.peek()
521
521
  } : {
522
522
  type: "disconnection",
523
- role: T.reason === "user" ? "user" : "ai",
524
- conversationIndex: w.peek()
523
+ role: _.reason === "user" ? "user" : "ai",
524
+ conversationIndex: b.peek()
525
525
  }
526
- ], w.value++, T.reason === "error" && (g.value = T.message, console.error(
526
+ ], b.value++, _.reason === "error" && (x.value = _.message, console.error(
527
527
  "[ConversationalAI] Disconnected due to an error:",
528
- T.message
528
+ _.message
529
529
  ));
530
530
  }
531
- }), e.current = await t.current, e.current.setMicMuted(l.peek()), C) {
532
- const T = e.current;
533
- setTimeout(() => T.sendUserMessage(C), 100);
531
+ }), e.current = await t.current, e.current.setMicMuted(c.peek()), S) {
532
+ const _ = e.current;
533
+ setTimeout(() => _.sendUserMessage(S), 100);
534
534
  }
535
535
  const N = e.current.getId();
536
- return b.value = N, g.value = null, N;
536
+ return f.value = N, x.value = null, N;
537
537
  } catch (N) {
538
- let T = "Could not start a conversation.";
539
- N instanceof CloseEvent ? T = N.reason || T : N instanceof Error && (T = N.message || T), g.value = T, m.value = [
540
- ...m.value,
538
+ let _ = "Could not start a conversation.";
539
+ N instanceof CloseEvent ? _ = N.reason || _ : N instanceof Error && (_ = N.message || _), x.value = _, w.value = [
540
+ ...w.value,
541
541
  {
542
542
  type: "error",
543
- message: T,
544
- conversationIndex: w.peek()
543
+ message: _,
544
+ conversationIndex: b.peek()
545
545
  }
546
546
  ];
547
547
  } finally {
@@ -549,40 +549,40 @@ function _a() {
549
549
  }
550
550
  },
551
551
  endSession: async () => {
552
- const x = e.current;
553
- e.current = null, await (x == null ? void 0 : x.endSession());
552
+ const C = e.current;
553
+ e.current = null, await (C == null ? void 0 : C.endSession());
554
554
  },
555
555
  getInputVolume: () => {
556
- var x;
557
- return ((x = e.current) == null ? void 0 : x.getInputVolume()) ?? 0;
556
+ var C;
557
+ return ((C = e.current) == null ? void 0 : C.getInputVolume()) ?? 0;
558
558
  },
559
559
  getOutputVolume: () => {
560
- var x;
561
- return ((x = e.current) == null ? void 0 : x.getOutputVolume()) ?? 0;
562
- },
563
- sendFeedback: (x) => {
564
560
  var C;
565
- (C = e.current) == null || C.sendFeedback(x);
561
+ return ((C = e.current) == null ? void 0 : C.getOutputVolume()) ?? 0;
566
562
  },
567
- sendUserMessage: (x) => {
568
- var C;
569
- (C = e.current) == null || C.sendUserMessage(x), m.value = [
570
- ...m.value,
563
+ sendFeedback: (C) => {
564
+ var S;
565
+ (S = e.current) == null || S.sendFeedback(C);
566
+ },
567
+ sendUserMessage: (C) => {
568
+ var S;
569
+ (S = e.current) == null || S.sendUserMessage(C), w.value = [
570
+ ...w.value,
571
571
  {
572
572
  type: "message",
573
573
  role: "user",
574
- message: x,
574
+ message: C,
575
575
  isText: !0,
576
- conversationIndex: w.peek()
576
+ conversationIndex: b.peek()
577
577
  }
578
578
  ];
579
579
  },
580
580
  sendUserActivity: () => {
581
- var x;
582
- (x = e.current) == null || x.sendUserActivity();
581
+ var C;
582
+ (C = e.current) == null || C.sendUserActivity();
583
583
  }
584
584
  };
585
- }, [s, l]);
585
+ }, [l, c]);
586
586
  }
587
587
  function Pa(e, t) {
588
588
  try {
@@ -600,7 +600,7 @@ const Tr = de(
600
600
  null
601
601
  );
602
602
  function Ra({ children: e }) {
603
- const { serverUrl: t } = wn(), n = F("agent-id"), r = F("override-config"), o = F("signed-url"), a = Q(null);
603
+ const { serverUrl: t } = wn(), n = B("agent-id"), r = B("override-config"), o = B("signed-url"), a = J(null);
604
604
  Ee(() => {
605
605
  if (r.value)
606
606
  try {
@@ -614,42 +614,42 @@ function Ra({ children: e }) {
614
614
  `[ConversationalAI] Cannot parse override-config: ${C == null ? void 0 : C.message}`
615
615
  );
616
616
  }
617
- let w = n.value, y;
617
+ let w = n.value, b;
618
618
  if (o.value) {
619
619
  const C = new URL(o.value).searchParams;
620
- w = C.get("agent_id") ?? n.value, y = C.get("conversation_signature") ?? void 0;
620
+ w = C.get("agent_id") ?? n.value, b = C.get("conversation_signature") ?? void 0;
621
621
  }
622
622
  if (!w) {
623
623
  a.value = null;
624
624
  return;
625
625
  }
626
- const x = new AbortController();
626
+ const y = new AbortController();
627
627
  return Oa(
628
628
  w,
629
629
  t.value,
630
- x.signal,
631
- y
630
+ y.signal,
631
+ b
632
632
  ).then((C) => {
633
- x.signal.aborted || (a.value = C);
633
+ y.signal.aborted || (a.value = C);
634
634
  }).catch((C) => {
635
635
  console.error(
636
636
  `[ConversationalAI] Cannot fetch config for agent ${n.value}: ${C == null ? void 0 : C.message}`
637
- ), x.signal.aborted || (a.value = null);
637
+ ), y.signal.aborted || (a.value = null);
638
638
  }), () => {
639
- x.abort();
639
+ y.abort();
640
640
  };
641
641
  });
642
- const i = F("variant"), s = F("placement"), l = F("terms-key"), c = F("mic-muting"), f = F("transcript"), p = F("text-input"), v = F("default-expanded"), g = F("always-expanded"), b = F("override-text-only"), d = F("use-rtc"), m = Y(() => {
642
+ const i = B("variant"), s = B("placement"), l = B("terms-key"), c = B("mic-muting"), d = B("transcript"), p = B("text-input"), v = B("default-expanded"), g = B("always-expanded"), x = B("override-text-only"), f = B("use-rtc"), m = Y(() => {
643
643
  if (!a.value)
644
644
  return null;
645
- const w = i.value ?? a.value.variant, y = s.value ?? a.value.placement, x = l.value ?? a.value.terms_key, C = Re(b.value) ?? a.value.text_only ?? !1, S = Re(c.value) ?? a.value.mic_muting_enabled, A = Re(f.value) ?? a.value.transcript_enabled, k = Re(p.value) ?? a.value.text_input_enabled, I = Re(g.value) ?? a.value.always_expanded ?? !1, D = Re(v.value) ?? a.value.default_expanded ?? !1, L = Re(d.value) ?? a.value.use_rtc ?? !1;
645
+ const w = i.value ?? a.value.variant, b = s.value ?? a.value.placement, y = l.value ?? a.value.terms_key, C = Re(x.value) ?? a.value.text_only ?? !1, S = Re(c.value) ?? a.value.mic_muting_enabled, E = Re(d.value) ?? a.value.transcript_enabled, k = Re(p.value) ?? a.value.text_input_enabled, I = Re(g.value) ?? a.value.always_expanded ?? !1, D = Re(v.value) ?? a.value.default_expanded ?? !1, L = Re(f.value) ?? a.value.use_rtc ?? !1;
646
646
  return {
647
647
  ...a.value,
648
648
  variant: fa(w),
649
- placement: ha(y),
650
- terms_key: x,
649
+ placement: ha(b),
650
+ terms_key: y,
651
651
  mic_muting_enabled: !C && S,
652
- transcript_enabled: C || A,
652
+ transcript_enabled: C || E,
653
653
  text_input_enabled: C || k,
654
654
  always_expanded: I,
655
655
  default_expanded: D,
@@ -662,17 +662,17 @@ function q() {
662
662
  return fe(Tr);
663
663
  }
664
664
  function bn() {
665
- const e = F("override-text-only"), t = q();
665
+ const e = B("override-text-only"), t = q();
666
666
  return Y(
667
667
  () => Re(e.value) ?? t.value.text_only ?? !1
668
668
  );
669
669
  }
670
670
  function zt() {
671
- const e = bn(), { conversationTextOnly: t } = re();
671
+ const e = bn(), { conversationTextOnly: t } = oe();
672
672
  return Y(() => t.value ?? e.value);
673
673
  }
674
674
  function Ar() {
675
- const e = F("override-first-message"), t = q(), { language: n } = at();
675
+ const e = B("override-first-message"), t = q(), { language: n } = at();
676
676
  return Y(
677
677
  () => {
678
678
  var r, o;
@@ -709,7 +709,7 @@ ${ma.map(
709
709
  `)}
710
710
  }`;
711
711
  });
712
- return /* @__PURE__ */ _("style", { children: [
712
+ return /* @__PURE__ */ A("style", { children: [
713
713
  n,
714
714
  da
715
715
  ] });
@@ -722,7 +722,7 @@ function Da(e) {
722
722
  }
723
723
  const _r = de(null);
724
724
  function Fa({ children: e }) {
725
- const t = q(), { language: n } = at(), r = F("text-contents"), o = Y(() => {
725
+ const t = q(), { language: n } = at(), r = B("text-contents"), o = Y(() => {
726
726
  try {
727
727
  if (r.value) {
728
728
  const i = JSON.parse(r.value);
@@ -738,8 +738,8 @@ function Fa({ children: e }) {
738
738
  i,
739
739
  Ce(
740
740
  () => {
741
- var s, l, c, f;
742
- return o.value[i] ?? ((c = (l = (s = t.value.language_presets) == null ? void 0 : s[n.value.languageCode]) == null ? void 0 : l.text_contents) == null ? void 0 : c[i]) ?? ((f = t.value.text_contents) == null ? void 0 : f[i]) ?? mr[i];
741
+ var s, l, c, d;
742
+ return o.value[i] ?? ((c = (l = (s = t.value.language_presets) == null ? void 0 : s[n.value.languageCode]) == null ? void 0 : l.text_contents) == null ? void 0 : c[i]) ?? ((d = t.value.text_contents) == null ? void 0 : d[i]) ?? mr[i];
743
743
  }
744
744
  )
745
745
  ])
@@ -751,7 +751,7 @@ function G() {
751
751
  }
752
752
  const Pr = de(null);
753
753
  function Ba({ children: e }) {
754
- const t = q(), n = F("avatar-image-url"), r = F("avatar-orb-color-1"), o = F("avatar-orb-color-2"), a = Q(""), i = Y(() => n.value ? {
754
+ const t = q(), n = B("avatar-image-url"), r = B("avatar-orb-color-1"), o = B("avatar-orb-color-2"), a = J(""), i = Y(() => n.value ? {
755
755
  type: "image",
756
756
  url: n.value
757
757
  } : r.value && o.value ? {
@@ -785,7 +785,7 @@ function yn(e) {
785
785
  return e && typeof e == "object" && "peek" in e;
786
786
  }
787
787
  function Va(e) {
788
- const t = yn(e), n = Q(t ? e.peek() : e);
788
+ const t = yn(e), n = J(t ? e.peek() : e);
789
789
  return t ? e : (n.value = e, n);
790
790
  }
791
791
  function Ir(e) {
@@ -815,7 +815,7 @@ function Nr(...e) {
815
815
  };
816
816
  };
817
817
  }
818
- function te(...e) {
818
+ function ne(...e) {
819
819
  return h.useCallback(Nr(...e), e);
820
820
  }
821
821
  // @__NO_SIDE_EFFECTS__
@@ -823,10 +823,10 @@ function gt(e) {
823
823
  const t = /* @__PURE__ */ Wa(e), n = h.forwardRef((r, o) => {
824
824
  const { children: a, ...i } = r, s = h.Children.toArray(a), l = s.find(Ua);
825
825
  if (l) {
826
- const c = l.props.children, f = s.map((p) => p === l ? h.Children.count(c) > 1 ? h.Children.only(null) : h.isValidElement(c) ? c.props.children : null : p);
827
- return /* @__PURE__ */ E(t, { ...i, ref: o, children: h.isValidElement(c) ? h.cloneElement(c, void 0, f) : null });
826
+ const c = l.props.children, d = s.map((p) => p === l ? h.Children.count(c) > 1 ? h.Children.only(null) : h.isValidElement(c) ? c.props.children : null : p);
827
+ return /* @__PURE__ */ T(t, { ...i, ref: o, children: h.isValidElement(c) ? h.cloneElement(c, void 0, d) : null });
828
828
  }
829
- return /* @__PURE__ */ E(t, { ...i, ref: o, children: a });
829
+ return /* @__PURE__ */ T(t, { ...i, ref: o, children: a });
830
830
  });
831
831
  return n.displayName = `${e}.Slot`, n;
832
832
  }
@@ -865,7 +865,7 @@ function Ya(e) {
865
865
  }
866
866
  const Xt = window.matchMedia("(prefers-reduced-motion: reduce)");
867
867
  function Lr() {
868
- const e = Q(Xt.matches);
868
+ const e = J(Xt.matches);
869
869
  return Ue(() => {
870
870
  const t = (n) => {
871
871
  e.value = n.matches;
@@ -874,21 +874,21 @@ function Lr() {
874
874
  }, []), e;
875
875
  }
876
876
  function Mr({ onStart: e, onEnd: t }) {
877
- const n = J();
877
+ const n = ee();
878
878
  n.current ?? (n.current = /* @__PURE__ */ new Set());
879
- const r = J(e);
879
+ const r = ee(e);
880
880
  r.current = e;
881
- const o = J(t);
881
+ const o = ee(t);
882
882
  o.current = t;
883
- const a = Q(!1), i = ee(
883
+ const a = J(!1), i = te(
884
884
  (l) => {
885
- var c, f;
886
- l.target === l.currentTarget && ((c = n.current) == null || c.add(l.propertyName), a.peek() || (a.value = !0, (f = r.current) == null || f.call(r)));
885
+ var c, d;
886
+ l.target === l.currentTarget && ((c = n.current) == null || c.add(l.propertyName), a.peek() || (a.value = !0, (d = r.current) == null || d.call(r)));
887
887
  },
888
888
  []
889
- ), s = ee((l) => {
890
- var c, f, p;
891
- l.target === l.currentTarget && ((c = n.current) == null || c.delete(l.propertyName), (f = n.current) != null && f.size || (a.value = !1, (p = o.current) == null || p.call(o)));
889
+ ), s = te((l) => {
890
+ var c, d, p;
891
+ l.target === l.currentTarget && ((c = n.current) == null || c.delete(l.propertyName), (d = n.current) != null && d.size || (a.value = !1, (p = o.current) == null || p.call(o)));
892
892
  }, []);
893
893
  return {
894
894
  transitioning: a,
@@ -898,7 +898,7 @@ function Mr({ onStart: e, onEnd: t }) {
898
898
  }
899
899
  };
900
900
  }
901
- function ae(e) {
901
+ function ie(e) {
902
902
  const t = Lr().value ? Ka : Xa;
903
903
  return /* @__PURE__ */ u(t, { ...e });
904
904
  }
@@ -910,7 +910,7 @@ function Xa({
910
910
  initial: t = e,
911
911
  ...n
912
912
  }) {
913
- const r = Va(e), o = Q($a(t));
913
+ const r = Va(e), o = J($a(t));
914
914
  Ee(() => {
915
915
  r.value && (o.value = r.value);
916
916
  });
@@ -1107,17 +1107,17 @@ void main() {
1107
1107
  -1
1108
1108
  ]), Qa = "https://storage.googleapis.com/eleven-public-cdn/images/perlin-noise.png", be = class be {
1109
1109
  constructor(t) {
1110
- oe(this, "gl");
1111
- oe(this, "program");
1112
- oe(this, "startTime");
1113
- oe(this, "targetSpeed", 0);
1114
- oe(this, "speed", 0.5);
1115
- oe(this, "rafId", null);
1116
- oe(this, "resizeObserver");
1117
- oe(this, "colorA", [0, 0, 0]);
1118
- oe(this, "colorB", [0, 0, 0]);
1119
- oe(this, "offsets", new Float32Array(7).map(() => Math.random() * Math.PI * 2));
1120
- oe(this, "copyNoiseImage", () => {
1110
+ ae(this, "gl");
1111
+ ae(this, "program");
1112
+ ae(this, "startTime");
1113
+ ae(this, "targetSpeed", 0);
1114
+ ae(this, "speed", 0.5);
1115
+ ae(this, "rafId", null);
1116
+ ae(this, "resizeObserver");
1117
+ ae(this, "colorA", [0, 0, 0]);
1118
+ ae(this, "colorB", [0, 0, 0]);
1119
+ ae(this, "offsets", new Float32Array(7).map(() => Math.random() * Math.PI * 2));
1120
+ ae(this, "copyNoiseImage", () => {
1121
1121
  this.gl && (this.gl.texImage2D(
1122
1122
  this.gl.TEXTURE_2D,
1123
1123
  0,
@@ -1127,8 +1127,8 @@ void main() {
1127
1127
  be.noiseImage
1128
1128
  ), this.gl.generateMipmap(this.gl.TEXTURE_2D));
1129
1129
  });
1130
- oe(this, "toDataURL", () => this.gl.canvas.toDataURL("image/png"));
1131
- oe(this, "render", () => {
1130
+ ae(this, "toDataURL", () => this.gl.canvas.toDataURL("image/png"));
1131
+ ae(this, "render", () => {
1132
1132
  if (!this.gl) {
1133
1133
  this.rafId = null;
1134
1134
  return;
@@ -1221,32 +1221,32 @@ void main() {
1221
1221
  return this.gl.shaderSource(r, n), this.gl.compileShader(r), this.gl.getShaderParameter(r, this.gl.COMPILE_STATUS) ? r : (this.gl.deleteShader(r), null);
1222
1222
  }
1223
1223
  };
1224
- oe(be, "noiseImage");
1224
+ ae(be, "noiseImage");
1225
1225
  let an = be;
1226
1226
  const Ja = {
1227
1227
  sm: "w-9 h-9",
1228
1228
  lg: "w-48 h-48"
1229
1229
  };
1230
1230
  function it({ size: e = "sm", className: t }) {
1231
- const { getInputVolume: n, getOutputVolume: r, isSpeaking: o, isDisconnected: a } = re(), { config: i } = xn(), s = J(null), l = J(null);
1231
+ const { getInputVolume: n, getOutputVolume: r, isSpeaking: o, isDisconnected: a } = oe(), { config: i } = xn(), s = ee(null), l = ee(null);
1232
1232
  Ee(() => {
1233
1233
  if (a.value) {
1234
1234
  s.current.style.transform = "", l.current.style.transform = "";
1235
1235
  return;
1236
1236
  }
1237
- let f;
1237
+ let d;
1238
1238
  function p() {
1239
- const v = n(), g = r(), b = o.peek() ? 1 : 1 - v * 0.4, d = o.peek() ? 1 + g * 0.4 : 1;
1240
- s.current.style.transform = `scale(${d})`, l.current.style.transform = `scale(${b})`, f = requestAnimationFrame(p);
1239
+ const v = n(), g = r(), x = o.peek() ? 1 : 1 - v * 0.4, f = o.peek() ? 1 + g * 0.4 : 1;
1240
+ s.current.style.transform = `scale(${f})`, l.current.style.transform = `scale(${x})`, d = requestAnimationFrame(p);
1241
1241
  }
1242
1242
  return p(), () => {
1243
- cancelAnimationFrame(f);
1243
+ cancelAnimationFrame(d);
1244
1244
  };
1245
1245
  });
1246
1246
  const c = Y(() => ({
1247
1247
  backgroundImage: i.value.type === "image" ? `url(${i.value.url})` : i.value.type === "url" ? `url(${i.value.custom_url})` : void 0
1248
1248
  }));
1249
- return /* @__PURE__ */ _("div", { className: V("relative shrink-0", Ja[e], t), children: [
1249
+ return /* @__PURE__ */ A("div", { className: V("relative shrink-0", Ja[e], t), children: [
1250
1250
  /* @__PURE__ */ u(
1251
1251
  "div",
1252
1252
  {
@@ -1276,7 +1276,7 @@ function ei({ color1: e, color2: t }) {
1276
1276
  Ue(() => {
1277
1277
  r && (r.updateColors(e, t), r.render(), n.value = r.toDataURL());
1278
1278
  }, [r, e, t]);
1279
- const a = ee(
1279
+ const a = te(
1280
1280
  (i) => {
1281
1281
  if (i) {
1282
1282
  const s = new an(i);
@@ -1331,7 +1331,7 @@ function ri(e) {
1331
1331
  );
1332
1332
  }
1333
1333
  function oi(e) {
1334
- return /* @__PURE__ */ _(
1334
+ return /* @__PURE__ */ A(
1335
1335
  "svg",
1336
1336
  {
1337
1337
  height: "1em",
@@ -1369,7 +1369,7 @@ function ai(e) {
1369
1369
  );
1370
1370
  }
1371
1371
  function ii(e) {
1372
- return /* @__PURE__ */ _(
1372
+ return /* @__PURE__ */ A(
1373
1373
  "svg",
1374
1374
  {
1375
1375
  height: "1em",
@@ -1386,7 +1386,7 @@ function ii(e) {
1386
1386
  );
1387
1387
  }
1388
1388
  function si(e) {
1389
- return /* @__PURE__ */ _(
1389
+ return /* @__PURE__ */ A(
1390
1390
  "svg",
1391
1391
  {
1392
1392
  height: "1em",
@@ -1466,13 +1466,7 @@ function di(e) {
1466
1466
  viewBox: "0 0 20 20",
1467
1467
  fill: "currentColor",
1468
1468
  ...e,
1469
- children: /* @__PURE__ */ u(
1470
- "path",
1471
- {
1472
- d: "M2.59413 5.1485C2.04 3.39377 3.86657 1.83482 5.51245 2.65776L16.47 8.13653C18.0055 8.90429 18.0055 11.0955 16.47 11.8633L5.51245 17.3421C3.86656 18.165 2.04 16.6061 2.59413 14.8513L3.86297 10.8333H7.50006C7.9603 10.8333 8.33339 10.4602 8.33339 10C8.33339 9.53976 7.9603 9.16667 7.50006 9.16667H3.86302L2.59413 5.1485Z",
1473
- fill: "black"
1474
- }
1475
- )
1469
+ children: /* @__PURE__ */ u("path", { d: "M2.59413 5.1485C2.04 3.39377 3.86657 1.83482 5.51245 2.65776L16.47 8.13653C18.0055 8.90429 18.0055 11.0955 16.47 11.8633L5.51245 17.3421C3.86656 18.165 2.04 16.6061 2.59413 14.8513L3.86297 10.8333H7.50006C7.9603 10.8333 8.33339 10.4602 8.33339 10C8.33339 9.53976 7.9603 9.16667 7.50006 9.16667H3.86302L2.59413 5.1485Z" })
1476
1470
  }
1477
1471
  );
1478
1472
  }
@@ -1496,125 +1490,143 @@ function pi({
1496
1490
  starColor: n,
1497
1491
  className: r
1498
1492
  }) {
1499
- return /* @__PURE__ */ u("slot", { name: "icon-feedback", className: V("flex", r), "aria-hidden": !0, children: /* @__PURE__ */ _(
1500
- "svg",
1493
+ return /* @__PURE__ */ u(
1494
+ "slot",
1501
1495
  {
1502
- width: "100%",
1503
- height: "100%",
1504
- viewBox: "0 0 82 88",
1505
- fill: "none",
1506
- xmlns: "http://www.w3.org/2000/svg",
1507
- children: [
1508
- /* @__PURE__ */ u(
1509
- "path",
1510
- {
1511
- "fill-rule": "evenodd",
1512
- "clip-rule": "evenodd",
1513
- d: "M9 42C9 59.6731 23.3269 74 41 74C58.6731 74 73 59.6731 73 42C73 24.3269 58.6731 10 41 10C23.3269 10 9 24.3269 9 42ZM29.4529 18.5973C31.1347 18.0574 32.8641 17.5023 34.9844 16.6005C42.2533 13.5091 48.3526 11.9217 51.7782 14.094C53.5063 15.1899 54.4051 16.7749 55.6117 18.9024C56.7969 20.9922 58.279 23.6057 61.1358 26.7937C62.2737 28.0636 63.3886 29.2195 64.4371 30.3064C68.7007 34.7263 71.8645 38.0061 70.9949 43.1697C70.2965 47.316 67.9794 49.4559 65.6038 51.65C63.4317 53.656 61.2107 55.7073 60.1332 59.3786C57.8774 67.0653 53.5327 71.9113 48.3526 72.7468C43.1725 73.5823 36.6555 75.1698 29.8043 70.1567C26.1949 67.5157 25.229 64.3182 24.1947 60.894C23.2657 57.8184 22.2814 54.56 19.2768 51.3577C14.1619 45.9062 10.2533 29.6345 19.2768 23.0339C23.736 20.4327 26.5223 19.5382 29.4529 18.5973Z",
1514
- fill: e,
1515
- "fill-opacity": "0.15",
1516
- stroke: e,
1517
- "stroke-opacity": "0.35"
1518
- }
1519
- ),
1520
- /* @__PURE__ */ u(
1521
- "path",
1522
- {
1523
- d: "M43.5 73.4212C40.4387 73.4212 35.0039 71.1025 37.556 56.4696C40.143 41.6365 42.6582 40.577 44.6991 25.744C46.3318 13.8775 41.1635 8.87964 33 10.9988",
1524
- stroke: e,
1525
- "stroke-opacity": "0.35"
1526
- }
1527
- ),
1528
- /* @__PURE__ */ u(
1529
- "path",
1530
- {
1531
- d: "M43.5 73.4212C40.4387 73.4212 35.0039 71.1025 37.556 56.4696C40.143 41.6365 42.6582 40.577 44.6991 25.744C46.3318 13.8775 41.1635 8.87964 33 10.9988",
1532
- stroke: e,
1533
- "stroke-opacity": "0.35"
1534
- }
1535
- ),
1536
- /* @__PURE__ */ u(
1537
- "path",
1538
- {
1539
- d: "M21.9366 68.1987C21.3549 66.5119 21.0386 60.9231 28.1376 53.3448C37.0114 43.8719 40.5 43.9579 51.4911 31.7482C59.5691 22.7747 59.1723 17.0524 58.0993 15.4626",
1540
- stroke: e,
1541
- "stroke-opacity": "0.35"
1542
- }
1543
- ),
1544
- /* @__PURE__ */ u(
1545
- "path",
1546
- {
1547
- d: "M9.26819 42.161C10.4003 43.5337 15.6951 46.3853 25.7661 44.3926C38.3548 41.9018 52.434 40.307 57.694 41.0287C70.352 42.7655 71.4138 51.3035 71.4138 51.3035",
1548
- stroke: e,
1549
- "stroke-opacity": "0.35"
1550
- }
1551
- ),
1552
- /* @__PURE__ */ u(
1553
- "path",
1554
- {
1555
- d: "M22 16.4916C18.815 21.85 19.6451 26.0591 27.9943 32.0828C38.4307 39.6124 50.2985 48.8304 53.5024 53.1027C58.6684 59.9914 59.5 67.928 59.5 67.928",
1556
- stroke: e,
1557
- "stroke-opacity": "0.35"
1558
- }
1559
- ),
1560
- /* @__PURE__ */ u(
1561
- "rect",
1562
- {
1563
- x: "9.26099",
1564
- y: "10",
1565
- width: "63.7129",
1566
- height: "63.7129",
1567
- rx: "31.8565",
1568
- stroke: e,
1569
- "stroke-opacity": "0.43",
1570
- "stroke-width": "1.5"
1571
- }
1572
- ),
1573
- /* @__PURE__ */ _("g", { "clip-path": "url(#clip0_7006_42127)", children: [
1574
- /* @__PURE__ */ u(
1575
- "circle",
1576
- {
1577
- cx: "62.4996",
1578
- cy: "18.2032",
1579
- r: "15.0195",
1580
- transform: "rotate(6.27205 62.4996 18.2032)",
1581
- fill: t
1582
- }
1583
- ),
1584
- /* @__PURE__ */ u(
1585
- "path",
1586
- {
1587
- d: "M60.7142 12.1753C62.057 10.0714 65.2294 10.4202 66.0833 12.7654L66.6158 14.2308L68.1251 14.6217C70.5415 15.2484 71.1908 18.3742 69.2237 19.911L67.9944 20.8704L68.0896 22.4262C68.2403 24.9178 65.4681 26.5011 63.3987 25.1056L62.1065 24.2326L60.6555 24.8041C58.3322 25.7172 55.9702 23.5694 56.6585 21.1698L57.0884 19.6717L56.0977 18.4684C54.5112 16.541 55.8231 13.6307 58.318 13.5438L59.8751 13.4899L60.7142 12.1753Z",
1588
- fill: n,
1589
- stroke: t,
1590
- "stroke-width": "3.27381"
1591
- }
1592
- ),
1593
- /* @__PURE__ */ u(
1594
- "path",
1595
- {
1596
- d: "M63.925 5.23719C71.0867 6.02431 76.2545 12.4676 75.4676 19.6293C74.6805 26.7911 68.2364 31.959 61.0746 31.1718C53.9129 30.3845 48.7459 23.9406 49.533 16.7789C50.3203 9.61739 56.7634 4.45029 63.925 5.23719ZM63.6957 7.32326C57.6866 6.66302 52.2797 10.9991 51.6191 17.0082C50.9586 23.0174 55.2946 28.4251 61.3038 29.0858C67.3132 29.7462 72.7211 25.4094 73.3816 19.4C74.0418 13.3908 69.705 7.98372 63.6957 7.32326Z",
1597
- fill: n,
1598
- stroke: t,
1599
- "stroke-width": "0.3",
1600
- "stroke-linecap": "round",
1601
- "stroke-linejoin": "round"
1602
- }
1603
- )
1604
- ] }),
1605
- /* @__PURE__ */ u("ellipse", { cx: "41", cy: "85", rx: "15", ry: "3", fill: e, "fill-opacity": "0.35" }),
1606
- /* @__PURE__ */ u("defs", { children: /* @__PURE__ */ u("clipPath", { id: "clip0_7006_42127", children: /* @__PURE__ */ u(
1607
- "rect",
1608
- {
1609
- width: "33",
1610
- height: "33",
1611
- fill: "white",
1612
- transform: "translate(47.9012) rotate(6.27205)"
1613
- }
1614
- ) }) })
1615
- ]
1496
+ name: "icon-feedback",
1497
+ className: V("flex", r),
1498
+ "aria-hidden": !0,
1499
+ children: /* @__PURE__ */ A(
1500
+ "svg",
1501
+ {
1502
+ width: "100%",
1503
+ height: "100%",
1504
+ viewBox: "0 0 82 88",
1505
+ fill: "none",
1506
+ xmlns: "http://www.w3.org/2000/svg",
1507
+ children: [
1508
+ /* @__PURE__ */ u(
1509
+ "path",
1510
+ {
1511
+ "fill-rule": "evenodd",
1512
+ "clip-rule": "evenodd",
1513
+ d: "M9 42C9 59.6731 23.3269 74 41 74C58.6731 74 73 59.6731 73 42C73 24.3269 58.6731 10 41 10C23.3269 10 9 24.3269 9 42ZM29.4529 18.5973C31.1347 18.0574 32.8641 17.5023 34.9844 16.6005C42.2533 13.5091 48.3526 11.9217 51.7782 14.094C53.5063 15.1899 54.4051 16.7749 55.6117 18.9024C56.7969 20.9922 58.279 23.6057 61.1358 26.7937C62.2737 28.0636 63.3886 29.2195 64.4371 30.3064C68.7007 34.7263 71.8645 38.0061 70.9949 43.1697C70.2965 47.316 67.9794 49.4559 65.6038 51.65C63.4317 53.656 61.2107 55.7073 60.1332 59.3786C57.8774 67.0653 53.5327 71.9113 48.3526 72.7468C43.1725 73.5823 36.6555 75.1698 29.8043 70.1567C26.1949 67.5157 25.229 64.3182 24.1947 60.894C23.2657 57.8184 22.2814 54.56 19.2768 51.3577C14.1619 45.9062 10.2533 29.6345 19.2768 23.0339C23.736 20.4327 26.5223 19.5382 29.4529 18.5973Z",
1514
+ fill: e,
1515
+ "fill-opacity": "0.15",
1516
+ stroke: e,
1517
+ "stroke-opacity": "0.35"
1518
+ }
1519
+ ),
1520
+ /* @__PURE__ */ u(
1521
+ "path",
1522
+ {
1523
+ d: "M43.5 73.4212C40.4387 73.4212 35.0039 71.1025 37.556 56.4696C40.143 41.6365 42.6582 40.577 44.6991 25.744C46.3318 13.8775 41.1635 8.87964 33 10.9988",
1524
+ stroke: e,
1525
+ "stroke-opacity": "0.35"
1526
+ }
1527
+ ),
1528
+ /* @__PURE__ */ u(
1529
+ "path",
1530
+ {
1531
+ d: "M43.5 73.4212C40.4387 73.4212 35.0039 71.1025 37.556 56.4696C40.143 41.6365 42.6582 40.577 44.6991 25.744C46.3318 13.8775 41.1635 8.87964 33 10.9988",
1532
+ stroke: e,
1533
+ "stroke-opacity": "0.35"
1534
+ }
1535
+ ),
1536
+ /* @__PURE__ */ u(
1537
+ "path",
1538
+ {
1539
+ d: "M21.9366 68.1987C21.3549 66.5119 21.0386 60.9231 28.1376 53.3448C37.0114 43.8719 40.5 43.9579 51.4911 31.7482C59.5691 22.7747 59.1723 17.0524 58.0993 15.4626",
1540
+ stroke: e,
1541
+ "stroke-opacity": "0.35"
1542
+ }
1543
+ ),
1544
+ /* @__PURE__ */ u(
1545
+ "path",
1546
+ {
1547
+ d: "M9.26819 42.161C10.4003 43.5337 15.6951 46.3853 25.7661 44.3926C38.3548 41.9018 52.434 40.307 57.694 41.0287C70.352 42.7655 71.4138 51.3035 71.4138 51.3035",
1548
+ stroke: e,
1549
+ "stroke-opacity": "0.35"
1550
+ }
1551
+ ),
1552
+ /* @__PURE__ */ u(
1553
+ "path",
1554
+ {
1555
+ d: "M22 16.4916C18.815 21.85 19.6451 26.0591 27.9943 32.0828C38.4307 39.6124 50.2985 48.8304 53.5024 53.1027C58.6684 59.9914 59.5 67.928 59.5 67.928",
1556
+ stroke: e,
1557
+ "stroke-opacity": "0.35"
1558
+ }
1559
+ ),
1560
+ /* @__PURE__ */ u(
1561
+ "rect",
1562
+ {
1563
+ x: "9.26099",
1564
+ y: "10",
1565
+ width: "63.7129",
1566
+ height: "63.7129",
1567
+ rx: "31.8565",
1568
+ stroke: e,
1569
+ "stroke-opacity": "0.43",
1570
+ "stroke-width": "1.5"
1571
+ }
1572
+ ),
1573
+ /* @__PURE__ */ A("g", { "clip-path": "url(#clip0_7006_42127)", children: [
1574
+ /* @__PURE__ */ u(
1575
+ "circle",
1576
+ {
1577
+ cx: "62.4996",
1578
+ cy: "18.2032",
1579
+ r: "15.0195",
1580
+ transform: "rotate(6.27205 62.4996 18.2032)",
1581
+ fill: t
1582
+ }
1583
+ ),
1584
+ /* @__PURE__ */ u(
1585
+ "path",
1586
+ {
1587
+ d: "M60.7142 12.1753C62.057 10.0714 65.2294 10.4202 66.0833 12.7654L66.6158 14.2308L68.1251 14.6217C70.5415 15.2484 71.1908 18.3742 69.2237 19.911L67.9944 20.8704L68.0896 22.4262C68.2403 24.9178 65.4681 26.5011 63.3987 25.1056L62.1065 24.2326L60.6555 24.8041C58.3322 25.7172 55.9702 23.5694 56.6585 21.1698L57.0884 19.6717L56.0977 18.4684C54.5112 16.541 55.8231 13.6307 58.318 13.5438L59.8751 13.4899L60.7142 12.1753Z",
1588
+ fill: n,
1589
+ stroke: t,
1590
+ "stroke-width": "3.27381"
1591
+ }
1592
+ ),
1593
+ /* @__PURE__ */ u(
1594
+ "path",
1595
+ {
1596
+ d: "M63.925 5.23719C71.0867 6.02431 76.2545 12.4676 75.4676 19.6293C74.6805 26.7911 68.2364 31.959 61.0746 31.1718C53.9129 30.3845 48.7459 23.9406 49.533 16.7789C50.3203 9.61739 56.7634 4.45029 63.925 5.23719ZM63.6957 7.32326C57.6866 6.66302 52.2797 10.9991 51.6191 17.0082C50.9586 23.0174 55.2946 28.4251 61.3038 29.0858C67.3132 29.7462 72.7211 25.4094 73.3816 19.4C74.0418 13.3908 69.705 7.98372 63.6957 7.32326Z",
1597
+ fill: n,
1598
+ stroke: t,
1599
+ "stroke-width": "0.3",
1600
+ "stroke-linecap": "round",
1601
+ "stroke-linejoin": "round"
1602
+ }
1603
+ )
1604
+ ] }),
1605
+ /* @__PURE__ */ u(
1606
+ "ellipse",
1607
+ {
1608
+ cx: "41",
1609
+ cy: "85",
1610
+ rx: "15",
1611
+ ry: "3",
1612
+ fill: e,
1613
+ "fill-opacity": "0.35"
1614
+ }
1615
+ ),
1616
+ /* @__PURE__ */ u("defs", { children: /* @__PURE__ */ u("clipPath", { id: "clip0_7006_42127", children: /* @__PURE__ */ u(
1617
+ "rect",
1618
+ {
1619
+ width: "33",
1620
+ height: "33",
1621
+ fill: "white",
1622
+ transform: "translate(47.9012) rotate(6.27205)"
1623
+ }
1624
+ ) }) })
1625
+ ]
1626
+ }
1627
+ )
1616
1628
  }
1617
- ) });
1629
+ );
1618
1630
  }
1619
1631
  function Ne(e) {
1620
1632
  const t = Lr().value ? hi : vi;
@@ -1637,13 +1649,13 @@ function vi({
1637
1649
  dep: o,
1638
1650
  ...a
1639
1651
  }) {
1640
- const [i, s] = Ie(e), [l, c] = Ie(null), [f, p] = Ie(null), v = J(t);
1652
+ const [i, s] = Ie(e), [l, c] = Ie(null), [d, p] = Ie(null), v = ee(t);
1641
1653
  e && (v.current = t);
1642
- const g = ee((m) => {
1654
+ const g = te((m) => {
1643
1655
  c(m), m && !e && (m.style.width = "0px", m.style.height = "0px");
1644
1656
  }, []);
1645
1657
  Ue(() => {
1646
- f && (f.style.transition = "none", f.style.opacity = "0", f.offsetWidth, f.style.transition = "", f.style.opacity = "");
1658
+ d && (d.style.transition = "none", d.style.opacity = "0", d.offsetWidth, d.style.transition = "", d.style.opacity = "");
1647
1659
  }, [o]), Ae(() => {
1648
1660
  l && (l.style.width = `${l.offsetWidth}px`, l.style.height = `${l.offsetHeight}px`);
1649
1661
  }, [
@@ -1653,19 +1665,19 @@ function vi({
1653
1665
  o
1654
1666
  // node's content changed
1655
1667
  ]), Ue(() => {
1656
- if (!l || !f) return;
1668
+ if (!l || !d) return;
1657
1669
  e && s(!0);
1658
- const m = e ? f.offsetWidth : 0, w = e ? f.offsetHeight : 0;
1670
+ const m = e ? d.offsetWidth : 0, w = e ? d.offsetHeight : 0;
1659
1671
  l.style.width = !e || l.offsetWidth !== m ? `${m}px` : "", l.style.height = !e || l.offsetHeight !== w ? `${w}px` : "";
1660
1672
  }, [
1661
1673
  l,
1662
- f,
1674
+ d,
1663
1675
  e,
1664
1676
  // node's visibility changed
1665
1677
  o
1666
1678
  // node's content changed
1667
1679
  ]);
1668
- const { transitioning: b, handlers: d } = Mr({
1680
+ const { transitioning: x, handlers: f } = Mr({
1669
1681
  onEnd: () => {
1670
1682
  e ? (l.style.width = "", l.style.height = "") : s(!1);
1671
1683
  }
@@ -1678,9 +1690,9 @@ function vi({
1678
1690
  "relative inline-flex shrink-0 justify-center items-center transition-[opacity,width,height,transform,flex-grow] duration-200 min-w-0",
1679
1691
  !e && "opacity-0 scale-75",
1680
1692
  e && r && "grow",
1681
- e && i && !b.value && "z-1"
1693
+ e && i && !x.value && "z-1"
1682
1694
  ),
1683
- ...d,
1695
+ ...f,
1684
1696
  children: /* @__PURE__ */ u(
1685
1697
  "div",
1686
1698
  {
@@ -1712,7 +1724,7 @@ const mi = {
1712
1724
  ...s
1713
1725
  }, l) {
1714
1726
  const c = !!r && !n;
1715
- return /* @__PURE__ */ _(
1727
+ return /* @__PURE__ */ A(
1716
1728
  "button",
1717
1729
  {
1718
1730
  ref: l,
@@ -1746,7 +1758,7 @@ function Cn({
1746
1758
  className: e,
1747
1759
  ...t
1748
1760
  }) {
1749
- const { status: n, isSpeaking: r } = re(), o = zt(), a = G(), i = Y(
1761
+ const { status: n, isSpeaking: r } = oe(), o = zt(), a = G(), i = Y(
1750
1762
  () => n.value !== "connected" ? a.connecting_status.value : o.value ? a.chatting_status.value : r.value ? a.speaking_status.value : a.listening_status.value
1751
1763
  ), [s, l] = Ie(i.peek());
1752
1764
  return Ee(() => {
@@ -1754,10 +1766,10 @@ function Cn({
1754
1766
  if (n.value === "connected" && r.value)
1755
1767
  l(c);
1756
1768
  else {
1757
- const f = setTimeout(() => {
1769
+ const d = setTimeout(() => {
1758
1770
  l(c);
1759
1771
  }, 500);
1760
- return () => clearTimeout(f);
1772
+ return () => clearTimeout(d);
1761
1773
  }
1762
1774
  }), /* @__PURE__ */ u(
1763
1775
  "div",
@@ -1767,7 +1779,7 @@ function Cn({
1767
1779
  e
1768
1780
  ),
1769
1781
  ...t,
1770
- children: /* @__PURE__ */ u(ae, { initial: !1, active: !0, children: /* @__PURE__ */ u("div", { className: "animate-text whitespace-nowrap transition-[opacity,transform] ease-out duration-200 data-hidden:opacity-0 transform data-hidden:translate-y-2", children: s }) }, s)
1782
+ children: /* @__PURE__ */ u(ie, { initial: !1, active: !0, children: /* @__PURE__ */ u("div", { className: "animate-text whitespace-nowrap transition-[opacity,transform] ease-out duration-200 data-hidden:opacity-0 transform data-hidden:translate-y-2", children: s }) }, s)
1771
1783
  }
1772
1784
  );
1773
1785
  }
@@ -1775,7 +1787,7 @@ const Dr = de(null);
1775
1787
  function gi({
1776
1788
  children: e
1777
1789
  }) {
1778
- const t = Q(null), n = Q(""), r = Q("initial"), { lastId: o } = re(), a = F("agent-id"), { serverUrl: i } = wn(), s = ee(async (p) => {
1790
+ const t = J(null), n = J(""), r = J("initial"), { lastId: o } = oe(), a = B("agent-id"), { serverUrl: i } = wn(), s = te(async (p) => {
1779
1791
  const v = o.value, g = a.value;
1780
1792
  if (!v || !g) {
1781
1793
  console.warn(
@@ -1791,10 +1803,10 @@ function gi({
1791
1803
  },
1792
1804
  i.value
1793
1805
  );
1794
- } catch (b) {
1795
- console.error("[ConversationalAI] Failed to submit rating:", b);
1806
+ } catch (x) {
1807
+ console.error("[ConversationalAI] Failed to submit rating:", x);
1796
1808
  }
1797
- }, []), l = ee(async () => {
1809
+ }, []), l = te(async () => {
1798
1810
  const p = o.value, v = a.value;
1799
1811
  if (!p || !v) {
1800
1812
  console.warn(
@@ -1819,13 +1831,13 @@ function gi({
1819
1831
  } catch (g) {
1820
1832
  console.error("[ConversationalAI] Failed to submit feedback:", g);
1821
1833
  }
1822
- }, []), c = ee(() => {
1834
+ }, []), c = te(() => {
1823
1835
  t.value = null, n.value = "", r.value = "initial";
1824
1836
  }, []);
1825
1837
  Ee(() => {
1826
1838
  o.value !== null && c();
1827
1839
  });
1828
- const f = Ae(
1840
+ const d = Ae(
1829
1841
  () => ({
1830
1842
  rating: t,
1831
1843
  feedbackText: n,
@@ -1836,7 +1848,7 @@ function gi({
1836
1848
  }),
1837
1849
  [s, l, c]
1838
1850
  );
1839
- return /* @__PURE__ */ u(Dr.Provider, { value: f, children: e });
1851
+ return /* @__PURE__ */ u(Dr.Provider, { value: d, children: e });
1840
1852
  }
1841
1853
  function Sn() {
1842
1854
  return fe(Dr);
@@ -1846,7 +1858,7 @@ function wi({
1846
1858
  defaultContent: e = "transcript",
1847
1859
  children: t
1848
1860
  }) {
1849
- const n = Q(e), r = ua(() => {
1861
+ const n = J(e), r = ua(() => {
1850
1862
  const a = n.value === "feedback" ? {
1851
1863
  showHeaderBack: !0,
1852
1864
  onHeaderBack: () => {
@@ -1888,7 +1900,7 @@ const Br = (e, t) => Array.from({ length: t - e + 1 }, (n, r) => r + e), bi = ({
1888
1900
  p.stopPropagation(), r(e);
1889
1901
  },
1890
1902
  [r, e]
1891
- ), f = Be(
1903
+ ), d = Be(
1892
1904
  (p) => {
1893
1905
  a(p, e);
1894
1906
  },
@@ -1905,7 +1917,7 @@ const Br = (e, t) => Array.from({ length: t - e + 1 }, (n, r) => r + e), bi = ({
1905
1917
  "aria-label": e.toString(),
1906
1918
  onMouseEnter: () => o(e),
1907
1919
  onClick: c,
1908
- onKeyDown: f,
1920
+ onKeyDown: d,
1909
1921
  className: V(
1910
1922
  "w-8 h-8 grid place-content-center rounded-full focus-ring transition-colors cursor-pointer",
1911
1923
  s || l ? "text-base-primary" : "text-base-border"
@@ -1921,14 +1933,14 @@ const Br = (e, t) => Array.from({ length: t - e + 1 }, (n, r) => r + e), bi = ({
1921
1933
  ariaLabel: r,
1922
1934
  icon: o = "star"
1923
1935
  }) => {
1924
- const a = Q(null), i = Q(null), s = Br(t, n), l = Be(
1936
+ const a = J(null), i = J(null), s = Br(t, n), l = Be(
1925
1937
  (v) => {
1926
1938
  i.value = v;
1927
1939
  },
1928
1940
  [i]
1929
1941
  ), c = Be(() => {
1930
1942
  i.value = null;
1931
- }, [i]), f = Be(
1943
+ }, [i]), d = Be(
1932
1944
  (v) => {
1933
1945
  a.value = v, e(v);
1934
1946
  },
@@ -1939,11 +1951,11 @@ const Br = (e, t) => Array.from({ length: t - e + 1 }, (n, r) => r + e), bi = ({
1939
1951
  v.preventDefault(), a.value = g, e(g);
1940
1952
  else if (v.key === "ArrowLeft" || v.key === "ArrowDown") {
1941
1953
  if (v.preventDefault(), g - 1 >= t) {
1942
- const d = v.currentTarget, m = d == null ? void 0 : d.previousElementSibling;
1954
+ const f = v.currentTarget, m = f == null ? void 0 : f.previousElementSibling;
1943
1955
  m == null || m.focus();
1944
1956
  }
1945
1957
  } else if ((v.key === "ArrowRight" || v.key === "ArrowUp") && (v.preventDefault(), g + 1 <= n)) {
1946
- const d = v.currentTarget, m = d == null ? void 0 : d.nextElementSibling;
1958
+ const f = v.currentTarget, m = f == null ? void 0 : f.nextElementSibling;
1947
1959
  m == null || m.focus();
1948
1960
  }
1949
1961
  },
@@ -1962,7 +1974,7 @@ const Br = (e, t) => Array.from({ length: t - e + 1 }, (n, r) => r + e), bi = ({
1962
1974
  value: v,
1963
1975
  rating: a,
1964
1976
  hoverRating: i,
1965
- onClick: f,
1977
+ onClick: d,
1966
1978
  onHover: l,
1967
1979
  onKeyDown: p,
1968
1980
  iconName: o
@@ -1994,7 +2006,7 @@ function Ci({
1994
2006
  onRate: t
1995
2007
  }) {
1996
2008
  const n = G();
1997
- return /* @__PURE__ */ _("div", { className: "flex flex-col items-center", children: [
2009
+ return /* @__PURE__ */ A("div", { className: "flex flex-col items-center", children: [
1998
2010
  /* @__PURE__ */ u("div", { className: "text-sm text-base-primary font-medium", children: n.initiate_feedback }),
1999
2011
  /* @__PURE__ */ u("div", { className: "py-4", children: /* @__PURE__ */ u(
2000
2012
  yi,
@@ -2013,7 +2025,7 @@ function Si({
2013
2025
  onFollowUpClick: r
2014
2026
  }) {
2015
2027
  const o = G();
2016
- return /* @__PURE__ */ _("div", { className: "flex flex-col items-center gap-3 mb-4", children: [
2028
+ return /* @__PURE__ */ A("div", { className: "flex flex-col items-center gap-3 mb-4", children: [
2017
2029
  /* @__PURE__ */ u("div", { className: "text-sm text-base-primary font-medium", children: o.thanks_for_feedback }),
2018
2030
  /* @__PURE__ */ u(zr, { rating: t, min: 1, max: 5, icon: e }),
2019
2031
  n && /* @__PURE__ */ u(ve, { variant: "secondary", onClick: r, children: o.request_follow_up_feedback })
@@ -2040,7 +2052,7 @@ function ki({ icon: e = "star" }) {
2040
2052
  }
2041
2053
  function Ei({ entry: e }) {
2042
2054
  const { previewUrl: t } = xn();
2043
- return /* @__PURE__ */ _(
2055
+ return /* @__PURE__ */ A(
2044
2056
  "div",
2045
2057
  {
2046
2058
  className: V(
@@ -2072,13 +2084,13 @@ function Ei({ entry: e }) {
2072
2084
  );
2073
2085
  }
2074
2086
  function Ti({ entry: e }) {
2075
- const t = G(), { lastId: n } = re(), r = Na();
2076
- return /* @__PURE__ */ _("div", { className: "mt-3 px-8 flex flex-col", children: [
2087
+ const t = G(), { lastId: n } = oe(), r = Na();
2088
+ return /* @__PURE__ */ A("div", { className: "mt-3 px-8 flex flex-col", children: [
2077
2089
  r && /* @__PURE__ */ u(ki, {}),
2078
- /* @__PURE__ */ _("div", { className: "text-xs text-base-subtle text-center transition-opacity duration-200 data-hidden:opacity-0", children: [
2090
+ /* @__PURE__ */ A("div", { className: "text-xs text-base-subtle text-center transition-opacity duration-200 data-hidden:opacity-0", children: [
2079
2091
  e.role === "user" ? t.user_ended_conversation : t.agent_ended_conversation,
2080
2092
  /* @__PURE__ */ u("br", {}),
2081
- n.value && /* @__PURE__ */ _("span", { className: "break-all", children: [
2093
+ n.value && /* @__PURE__ */ A("span", { className: "break-all", children: [
2082
2094
  t.conversation_id,
2083
2095
  ": ",
2084
2096
  n.value
@@ -2087,14 +2099,14 @@ function Ti({ entry: e }) {
2087
2099
  ] });
2088
2100
  }
2089
2101
  function Ai({ entry: e }) {
2090
- const t = G(), { lastId: n } = re();
2091
- return /* @__PURE__ */ _("div", { className: "mt-2 px-8 text-xs text-base-error text-center transition-opacity duration-200 data-hidden:opacity-0", children: [
2102
+ const t = G(), { lastId: n } = oe();
2103
+ return /* @__PURE__ */ A("div", { className: "mt-2 px-8 text-xs text-base-error text-center transition-opacity duration-200 data-hidden:opacity-0", children: [
2092
2104
  t.error_occurred,
2093
2105
  /* @__PURE__ */ u("br", {}),
2094
2106
  e.message,
2095
- n.value && /* @__PURE__ */ _(rt, { children: [
2107
+ n.value && /* @__PURE__ */ A(rt, { children: [
2096
2108
  /* @__PURE__ */ u("br", {}),
2097
- /* @__PURE__ */ _("span", { className: "text-base-subtle break-all", children: [
2109
+ /* @__PURE__ */ A("span", { className: "text-base-subtle break-all", children: [
2098
2110
  t.conversation_id,
2099
2111
  ": ",
2100
2112
  n.value
@@ -2106,11 +2118,11 @@ function _i({
2106
2118
  entry: e,
2107
2119
  animateIn: t
2108
2120
  }) {
2109
- return /* @__PURE__ */ u(ae, { initial: !t, active: !0, children: e.type === "message" ? /* @__PURE__ */ u(Ei, { entry: e }) : e.type === "disconnection" ? /* @__PURE__ */ u(Ti, { entry: e }) : /* @__PURE__ */ u(Ai, { entry: e }) });
2121
+ return /* @__PURE__ */ u(ie, { initial: !t, active: !0, children: e.type === "message" ? /* @__PURE__ */ u(Ei, { entry: e }) : e.type === "disconnection" ? /* @__PURE__ */ u(Ti, { entry: e }) : /* @__PURE__ */ u(Ai, { entry: e }) });
2110
2122
  }
2111
2123
  const Pi = 16;
2112
2124
  function Ri({ scrollPinned: e, transcript: t }) {
2113
- const n = J(null), r = J(0), o = J(null), a = J(!1), i = J(!1), s = (p) => {
2125
+ const n = ee(null), r = ee(0), o = ee(null), a = ee(!1), i = ee(!1), s = (p) => {
2114
2126
  var v;
2115
2127
  (v = n.current) == null || v.scrollTo({
2116
2128
  top: n.current.scrollHeight,
@@ -2119,30 +2131,30 @@ function Ri({ scrollPinned: e, transcript: t }) {
2119
2131
  }, l = () => {
2120
2132
  const p = n.current;
2121
2133
  if (!p || !a.current || i.current) return;
2122
- const v = p.scrollTop, g = p.scrollHeight - p.clientHeight, b = g - v;
2123
- if (Math.abs(b) < 1) {
2134
+ const v = p.scrollTop, g = p.scrollHeight - p.clientHeight, x = g - v;
2135
+ if (Math.abs(x) < 1) {
2124
2136
  p.scrollTop = g, o.current = requestAnimationFrame(l);
2125
2137
  return;
2126
2138
  }
2127
- const d = b * 0.2, m = 2;
2128
- p.scrollTop = v + Math.max(d, m), o.current = requestAnimationFrame(l);
2139
+ const f = x * 0.2, m = 2;
2140
+ p.scrollTop = v + Math.max(f, m), o.current = requestAnimationFrame(l);
2129
2141
  }, c = () => {
2130
2142
  !n.current || i.current || a.current || (a.current = !0, o.current = requestAnimationFrame(l));
2131
- }, f = J(!0);
2132
- return Ue(() => (f.current = !1, s(!1), () => {
2143
+ }, d = ee(!0);
2144
+ return Ue(() => (d.current = !1, s(!1), () => {
2133
2145
  o.current && cancelAnimationFrame(o.current);
2134
2146
  }), []), Ee(() => {
2135
- var b;
2147
+ var x;
2136
2148
  const p = t.value;
2137
2149
  if (!e.peek()) return;
2138
2150
  const v = p[p.length - 1];
2139
2151
  if ((v == null ? void 0 : v.type) === "message" && (v == null ? void 0 : v.role) === "ai" && (v == null ? void 0 : v.isText) === !0) {
2140
- const d = ((b = v.message) == null ? void 0 : b.length) || 0;
2141
- r.current === 0 && d > 0 ? (r.current = d, i.current = !1, requestAnimationFrame(() => {
2152
+ const f = ((x = v.message) == null ? void 0 : x.length) || 0;
2153
+ r.current === 0 && f > 0 ? (r.current = f, i.current = !1, requestAnimationFrame(() => {
2142
2154
  requestAnimationFrame(() => {
2143
2155
  !i.current && e.peek() && (s(!1), c());
2144
2156
  });
2145
- })) : d > r.current && (r.current = d, c());
2157
+ })) : f > r.current && (r.current = f, c());
2146
2158
  } else
2147
2159
  r.current = 0, a.current = !1, i.current = !1, o.current && (cancelAnimationFrame(o.current), o.current = null), s(!0);
2148
2160
  }), /* @__PURE__ */ u(
@@ -2158,7 +2170,7 @@ function Ri({ scrollPinned: e, transcript: t }) {
2158
2170
  _i,
2159
2171
  {
2160
2172
  entry: p,
2161
- animateIn: !f.current
2173
+ animateIn: !d.current
2162
2174
  },
2163
2175
  `${v}-${p.conversationIndex}`
2164
2176
  ))
@@ -2184,7 +2196,7 @@ function En({
2184
2196
  visible: e,
2185
2197
  ...t
2186
2198
  }) {
2187
- const n = G(), { isMuted: r, isMutingEnabled: o, setIsMuted: a } = Cr(), i = ee(() => {
2199
+ const n = G(), { isMuted: r, isMutingEnabled: o, setIsMuted: a } = Cr(), i = te(() => {
2188
2200
  a(!r.peek());
2189
2201
  }, [a]);
2190
2202
  return o.value ? /* @__PURE__ */ u(Ne, { visible: e, className: "p-1", children: /* @__PURE__ */ u(
@@ -2204,7 +2216,7 @@ function Tn({
2204
2216
  children: n,
2205
2217
  ...r
2206
2218
  }) {
2207
- const { endSession: o, startSession: a } = re(), i = G();
2219
+ const { endSession: o, startSession: a } = oe(), i = G();
2208
2220
  return /* @__PURE__ */ u(
2209
2221
  ve,
2210
2222
  {
@@ -2221,47 +2233,47 @@ function Ii({
2221
2233
  showTranscript: e,
2222
2234
  scrollPinned: t
2223
2235
  }) {
2224
- const n = Q(""), r = zt(), { text_input_enabled: o } = q().value, a = G(), {
2236
+ const n = J(""), r = zt(), { text_input_enabled: o } = q().value, a = G(), {
2225
2237
  isDisconnected: i,
2226
2238
  status: s,
2227
2239
  startSession: l,
2228
2240
  sendUserMessage: c,
2229
- sendUserActivity: f,
2241
+ sendUserActivity: d,
2230
2242
  conversationIndex: p
2231
- } = re(), v = ee(
2243
+ } = oe(), v = te(
2232
2244
  async (m) => {
2233
2245
  m.preventDefault();
2234
2246
  const w = n.value.trim();
2235
2247
  w && (t.value = !0, n.value = "", i.value ? await l(m.currentTarget, w) : c(w));
2236
2248
  },
2237
2249
  [n, t, i, l, c]
2238
- ), g = ee(
2250
+ ), g = te(
2239
2251
  async (m) => {
2240
2252
  m.key === "Enter" && !m.shiftKey && await v(m);
2241
2253
  },
2242
2254
  [v]
2243
- ), b = ee(
2255
+ ), x = te(
2244
2256
  (m) => {
2245
2257
  n.value = m.currentTarget.value;
2246
2258
  },
2247
2259
  [n]
2248
- ), d = Y(() => !!n.value.trim());
2249
- return /* @__PURE__ */ _("div", { className: "shrink-0 overflow-hidden flex p-3 items-end justify-end", children: [
2250
- o && /* @__PURE__ */ _("div", { className: "relative grow min-w-0 flex z-1 m-1", children: [
2260
+ ), f = Y(() => !!n.value.trim());
2261
+ return /* @__PURE__ */ A("div", { className: "shrink-0 overflow-hidden flex p-3 items-end justify-end", children: [
2262
+ o && /* @__PURE__ */ A("div", { className: "relative grow min-w-0 flex z-1 m-1", children: [
2251
2263
  /* @__PURE__ */ u(
2252
2264
  Vr,
2253
2265
  {
2254
2266
  rows: 1,
2255
2267
  "aria-label": a.input_label,
2256
2268
  value: n,
2257
- onInput: f,
2258
- onChange: b,
2269
+ onInput: d,
2270
+ onChange: x,
2259
2271
  onKeyDown: g,
2260
2272
  className: "min-w-0 w-full max-h-[8lh] pr-9",
2261
2273
  placeholder: r.value ? i.value && p.value > 0 ? a.input_placeholder_new_conversation : a.input_placeholder_text_only : a.input_placeholder
2262
2274
  }
2263
2275
  ),
2264
- /* @__PURE__ */ u(ae, { active: d, children: /* @__PURE__ */ u(
2276
+ /* @__PURE__ */ u(ie, { active: f, children: /* @__PURE__ */ u(
2265
2277
  "button",
2266
2278
  {
2267
2279
  "aria-label": a.send_message,
@@ -2271,7 +2283,7 @@ function Ii({
2271
2283
  }
2272
2284
  ) })
2273
2285
  ] }),
2274
- /* @__PURE__ */ _("div", { className: "flex h-11 items-center", children: [
2286
+ /* @__PURE__ */ A("div", { className: "flex h-11 items-center", children: [
2275
2287
  /* @__PURE__ */ u(En, { visible: !r.value && !i.value }),
2276
2288
  /* @__PURE__ */ u(
2277
2289
  Ne,
@@ -2293,14 +2305,14 @@ function Ii({
2293
2305
  ] });
2294
2306
  }
2295
2307
  function Ni() {
2296
- const e = G(), { rating: t, feedbackText: n } = Sn(), r = ee(
2308
+ const e = G(), { rating: t, feedbackText: n } = Sn(), r = te(
2297
2309
  (o) => {
2298
2310
  n.value = o.currentTarget.value;
2299
2311
  },
2300
2312
  []
2301
2313
  );
2302
- return /* @__PURE__ */ u("div", { className: "grow flex flex-col overflow-y-auto overflow-x-hidden px-4", children: /* @__PURE__ */ _("div", { className: "flex flex-col gap-8 min-h-full pt-4 pb-2", children: [
2303
- /* @__PURE__ */ _("div", { className: "flex flex-col items-center justify-center gap-3", children: [
2314
+ return /* @__PURE__ */ u("div", { className: "grow flex flex-col overflow-y-auto overflow-x-hidden px-4", children: /* @__PURE__ */ A("div", { className: "flex flex-col gap-8 min-h-full pt-4 pb-2", children: [
2315
+ /* @__PURE__ */ A("div", { className: "flex flex-col items-center justify-center gap-3", children: [
2304
2316
  /* @__PURE__ */ u(
2305
2317
  pi,
2306
2318
  {
@@ -2311,7 +2323,7 @@ function Ni() {
2311
2323
  }
2312
2324
  ),
2313
2325
  t.value !== null && /* @__PURE__ */ u(zr, { rating: t.value, min: 1, max: 5 }),
2314
- /* @__PURE__ */ _("div", { className: "text-center", children: [
2326
+ /* @__PURE__ */ A("div", { className: "text-center", children: [
2315
2327
  /* @__PURE__ */ u("p", { className: "text-sm text-base-primary font-medium", children: e.thanks_for_feedback }),
2316
2328
  /* @__PURE__ */ u("p", { className: "text-sm text-base-subtle", children: e.thanks_for_feedback_details })
2317
2329
  ] })
@@ -2329,7 +2341,7 @@ function Ni() {
2329
2341
  ] }) });
2330
2342
  }
2331
2343
  function Oi() {
2332
- const e = G(), { currentContent: t } = kn(), { submitFeedback: n } = Sn(), r = ee(() => {
2344
+ const e = G(), { currentContent: t } = kn(), { submitFeedback: n } = Sn(), r = te(() => {
2333
2345
  n(), t.value = "transcript";
2334
2346
  }, [n]);
2335
2347
  return /* @__PURE__ */ u("div", { className: "shrink-0 overflow-hidden flex p-3 items-end justify-end", children: /* @__PURE__ */ u(ve, { variant: "primary", onClick: r, children: e.submit }) });
@@ -2350,18 +2362,18 @@ function An(e, t = []) {
2350
2362
  n = [...n, i];
2351
2363
  const c = (p) => {
2352
2364
  var w;
2353
- const { scope: v, children: g, ...b } = p, d = ((w = v == null ? void 0 : v[e]) == null ? void 0 : w[l]) || s, m = h.useMemo(() => b, Object.values(b));
2354
- return /* @__PURE__ */ E(d.Provider, { value: m, children: g });
2365
+ const { scope: v, children: g, ...x } = p, f = ((w = v == null ? void 0 : v[e]) == null ? void 0 : w[l]) || s, m = h.useMemo(() => x, Object.values(x));
2366
+ return /* @__PURE__ */ T(f.Provider, { value: m, children: g });
2355
2367
  };
2356
2368
  c.displayName = a + "Provider";
2357
- function f(p, v) {
2358
- var d;
2359
- const g = ((d = v == null ? void 0 : v[e]) == null ? void 0 : d[l]) || s, b = h.useContext(g);
2360
- if (b) return b;
2369
+ function d(p, v) {
2370
+ var f;
2371
+ const g = ((f = v == null ? void 0 : v[e]) == null ? void 0 : f[l]) || s, x = h.useContext(g);
2372
+ if (x) return x;
2361
2373
  if (i !== void 0) return i;
2362
2374
  throw new Error(`\`${p}\` must be used within \`${a}\``);
2363
2375
  }
2364
- return [c, f];
2376
+ return [c, d];
2365
2377
  }
2366
2378
  const o = () => {
2367
2379
  const a = n.map((i) => h.createContext(i));
@@ -2397,39 +2409,39 @@ function Mi(e) {
2397
2409
  const t = e + "CollectionProvider", [n, r] = An(t), [o, a] = n(
2398
2410
  t,
2399
2411
  { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
2400
- ), i = (d) => {
2401
- const { scope: m, children: w } = d, y = De.useRef(null), x = De.useRef(/* @__PURE__ */ new Map()).current;
2402
- return /* @__PURE__ */ E(o, { scope: m, itemMap: x, collectionRef: y, children: w });
2412
+ ), i = (f) => {
2413
+ const { scope: m, children: w } = f, b = De.useRef(null), y = De.useRef(/* @__PURE__ */ new Map()).current;
2414
+ return /* @__PURE__ */ T(o, { scope: m, itemMap: y, collectionRef: b, children: w });
2403
2415
  };
2404
2416
  i.displayName = t;
2405
2417
  const s = e + "CollectionSlot", l = /* @__PURE__ */ gt(s), c = De.forwardRef(
2406
- (d, m) => {
2407
- const { scope: w, children: y } = d, x = a(s, w), C = te(m, x.collectionRef);
2408
- return /* @__PURE__ */ E(l, { ref: C, children: y });
2418
+ (f, m) => {
2419
+ const { scope: w, children: b } = f, y = a(s, w), C = ne(m, y.collectionRef);
2420
+ return /* @__PURE__ */ T(l, { ref: C, children: b });
2409
2421
  }
2410
2422
  );
2411
2423
  c.displayName = s;
2412
- const f = e + "CollectionItemSlot", p = "data-radix-collection-item", v = /* @__PURE__ */ gt(f), g = De.forwardRef(
2413
- (d, m) => {
2414
- const { scope: w, children: y, ...x } = d, C = De.useRef(null), S = te(m, C), A = a(f, w);
2415
- return De.useEffect(() => (A.itemMap.set(C, { ref: C, ...x }), () => void A.itemMap.delete(C))), /* @__PURE__ */ E(v, { [p]: "", ref: S, children: y });
2424
+ const d = e + "CollectionItemSlot", p = "data-radix-collection-item", v = /* @__PURE__ */ gt(d), g = De.forwardRef(
2425
+ (f, m) => {
2426
+ const { scope: w, children: b, ...y } = f, C = De.useRef(null), S = ne(m, C), E = a(d, w);
2427
+ return De.useEffect(() => (E.itemMap.set(C, { ref: C, ...y }), () => void E.itemMap.delete(C))), /* @__PURE__ */ T(v, { [p]: "", ref: S, children: b });
2416
2428
  }
2417
2429
  );
2418
- g.displayName = f;
2419
- function b(d) {
2420
- const m = a(e + "CollectionConsumer", d);
2430
+ g.displayName = d;
2431
+ function x(f) {
2432
+ const m = a(e + "CollectionConsumer", f);
2421
2433
  return De.useCallback(() => {
2422
- const y = m.collectionRef.current;
2423
- if (!y) return [];
2424
- const x = Array.from(y.querySelectorAll(`[${p}]`));
2434
+ const b = m.collectionRef.current;
2435
+ if (!b) return [];
2436
+ const y = Array.from(b.querySelectorAll(`[${p}]`));
2425
2437
  return Array.from(m.itemMap.values()).sort(
2426
- (A, k) => x.indexOf(A.ref.current) - x.indexOf(k.ref.current)
2438
+ (E, k) => y.indexOf(E.ref.current) - y.indexOf(k.ref.current)
2427
2439
  );
2428
2440
  }, [m.collectionRef, m.itemMap]);
2429
2441
  }
2430
2442
  return [
2431
2443
  { Provider: i, Slot: c, ItemSlot: g },
2432
- b,
2444
+ x,
2433
2445
  r
2434
2446
  ];
2435
2447
  }
@@ -2459,7 +2471,7 @@ var Bi = [
2459
2471
  ], X = Bi.reduce((e, t) => {
2460
2472
  const n = /* @__PURE__ */ gt(`Primitive.${t}`), r = h.forwardRef((o, a) => {
2461
2473
  const { asChild: i, ...s } = o, l = i ? n : t;
2462
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ E(l, { ...s, ref: a });
2474
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ T(l, { ...s, ref: a });
2463
2475
  });
2464
2476
  return r.displayName = `Primitive.${t}`, { ...e, [t]: r };
2465
2477
  }, {});
@@ -2498,36 +2510,36 @@ var $i = "DismissableLayer", sn = "dismissableLayer.update", Wi = "dismissableLa
2498
2510
  onInteractOutside: i,
2499
2511
  onDismiss: s,
2500
2512
  ...l
2501
- } = e, c = h.useContext($r), [f, p] = h.useState(null), v = (f == null ? void 0 : f.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, g] = h.useState({}), b = te(t, (k) => p(k)), d = Array.from(c.layers), [m] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), w = d.indexOf(m), y = f ? d.indexOf(f) : -1, x = c.layersWithOutsidePointerEventsDisabled.size > 0, C = y >= w, S = Yi((k) => {
2513
+ } = e, c = h.useContext($r), [d, p] = h.useState(null), v = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, g] = h.useState({}), x = ne(t, (k) => p(k)), f = Array.from(c.layers), [m] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), w = f.indexOf(m), b = d ? f.indexOf(d) : -1, y = c.layersWithOutsidePointerEventsDisabled.size > 0, C = b >= w, S = Yi((k) => {
2502
2514
  const I = k.target, D = [...c.branches].some((L) => L.contains(I));
2503
2515
  !C || D || (o == null || o(k), i == null || i(k), k.defaultPrevented || s == null || s());
2504
- }, v), A = Ki((k) => {
2516
+ }, v), E = Ki((k) => {
2505
2517
  const I = k.target;
2506
2518
  [...c.branches].some((L) => L.contains(I)) || (a == null || a(k), i == null || i(k), k.defaultPrevented || s == null || s());
2507
2519
  }, v);
2508
2520
  return Vi((k) => {
2509
- y === c.layers.size - 1 && (r == null || r(k), !k.defaultPrevented && s && (k.preventDefault(), s()));
2521
+ b === c.layers.size - 1 && (r == null || r(k), !k.defaultPrevented && s && (k.preventDefault(), s()));
2510
2522
  }, v), h.useEffect(() => {
2511
- if (f)
2512
- return n && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (jn = v.body.style.pointerEvents, v.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(f)), c.layers.add(f), Yn(), () => {
2523
+ if (d)
2524
+ return n && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (jn = v.body.style.pointerEvents, v.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(d)), c.layers.add(d), Yn(), () => {
2513
2525
  n && c.layersWithOutsidePointerEventsDisabled.size === 1 && (v.body.style.pointerEvents = jn);
2514
2526
  };
2515
- }, [f, v, n, c]), h.useEffect(() => () => {
2516
- f && (c.layers.delete(f), c.layersWithOutsidePointerEventsDisabled.delete(f), Yn());
2517
- }, [f, c]), h.useEffect(() => {
2527
+ }, [d, v, n, c]), h.useEffect(() => () => {
2528
+ d && (c.layers.delete(d), c.layersWithOutsidePointerEventsDisabled.delete(d), Yn());
2529
+ }, [d, c]), h.useEffect(() => {
2518
2530
  const k = () => g({});
2519
2531
  return document.addEventListener(sn, k), () => document.removeEventListener(sn, k);
2520
- }, []), /* @__PURE__ */ E(
2532
+ }, []), /* @__PURE__ */ T(
2521
2533
  X.div,
2522
2534
  {
2523
2535
  ...l,
2524
- ref: b,
2536
+ ref: x,
2525
2537
  style: {
2526
- pointerEvents: x ? C ? "auto" : "none" : void 0,
2538
+ pointerEvents: y ? C ? "auto" : "none" : void 0,
2527
2539
  ...e.style
2528
2540
  },
2529
- onFocusCapture: Z(e.onFocusCapture, A.onFocusCapture),
2530
- onBlurCapture: Z(e.onBlurCapture, A.onBlurCapture),
2541
+ onFocusCapture: Z(e.onFocusCapture, E.onFocusCapture),
2542
+ onBlurCapture: Z(e.onBlurCapture, E.onBlurCapture),
2531
2543
  onPointerDownCapture: Z(
2532
2544
  e.onPointerDownCapture,
2533
2545
  S.onPointerDownCapture
@@ -2538,14 +2550,14 @@ var $i = "DismissableLayer", sn = "dismissableLayer.update", Wi = "dismissableLa
2538
2550
  );
2539
2551
  Wr.displayName = $i;
2540
2552
  var Ui = "DismissableLayerBranch", ji = h.forwardRef((e, t) => {
2541
- const n = h.useContext($r), r = h.useRef(null), o = te(t, r);
2553
+ const n = h.useContext($r), r = h.useRef(null), o = ne(t, r);
2542
2554
  return h.useEffect(() => {
2543
2555
  const a = r.current;
2544
2556
  if (a)
2545
2557
  return n.branches.add(a), () => {
2546
2558
  n.branches.delete(a);
2547
2559
  };
2548
- }, [n.branches]), /* @__PURE__ */ E(X.div, { ...e, ref: o });
2560
+ }, [n.branches]), /* @__PURE__ */ T(X.div, { ...e, ref: o });
2549
2561
  });
2550
2562
  ji.displayName = Ui;
2551
2563
  function Yi(e, t = globalThis == null ? void 0 : globalThis.document) {
@@ -2620,7 +2632,7 @@ var Gt = "focusScope.autoFocusOnMount", qt = "focusScope.autoFocusOnUnmount", Xn
2620
2632
  onMountAutoFocus: o,
2621
2633
  onUnmountAutoFocus: a,
2622
2634
  ...i
2623
- } = e, [s, l] = h.useState(null), c = je(o), f = je(a), p = h.useRef(null), v = te(t, (d) => l(d)), g = h.useRef({
2635
+ } = e, [s, l] = h.useState(null), c = je(o), d = je(a), p = h.useRef(null), v = ne(t, (f) => l(f)), g = h.useRef({
2624
2636
  paused: !1,
2625
2637
  pause() {
2626
2638
  this.paused = !0;
@@ -2631,53 +2643,53 @@ var Gt = "focusScope.autoFocusOnMount", qt = "focusScope.autoFocusOnUnmount", Xn
2631
2643
  }).current;
2632
2644
  h.useEffect(() => {
2633
2645
  if (r) {
2634
- let d = function(x) {
2646
+ let f = function(y) {
2635
2647
  if (g.paused || !s) return;
2636
- const C = x.target;
2648
+ const C = y.target;
2637
2649
  s.contains(C) ? p.current = C : Fe(p.current, { select: !0 });
2638
- }, m = function(x) {
2650
+ }, m = function(y) {
2639
2651
  if (g.paused || !s) return;
2640
- const C = x.relatedTarget;
2652
+ const C = y.relatedTarget;
2641
2653
  C !== null && (s.contains(C) || Fe(p.current, { select: !0 }));
2642
- }, w = function(x) {
2654
+ }, w = function(y) {
2643
2655
  if (document.activeElement === document.body)
2644
- for (const S of x)
2656
+ for (const S of y)
2645
2657
  S.removedNodes.length > 0 && Fe(s);
2646
2658
  };
2647
- document.addEventListener("focusin", d), document.addEventListener("focusout", m);
2648
- const y = new MutationObserver(w);
2649
- return s && y.observe(s, { childList: !0, subtree: !0 }), () => {
2650
- document.removeEventListener("focusin", d), document.removeEventListener("focusout", m), y.disconnect();
2659
+ document.addEventListener("focusin", f), document.addEventListener("focusout", m);
2660
+ const b = new MutationObserver(w);
2661
+ return s && b.observe(s, { childList: !0, subtree: !0 }), () => {
2662
+ document.removeEventListener("focusin", f), document.removeEventListener("focusout", m), b.disconnect();
2651
2663
  };
2652
2664
  }
2653
2665
  }, [r, s, g.paused]), h.useEffect(() => {
2654
2666
  if (s) {
2655
2667
  Gn.add(g);
2656
- const d = document.activeElement;
2657
- if (!s.contains(d)) {
2668
+ const f = document.activeElement;
2669
+ if (!s.contains(f)) {
2658
2670
  const w = new CustomEvent(Gt, Xn);
2659
- s.addEventListener(Gt, c), s.dispatchEvent(w), w.defaultPrevented || (Gi(ts(jr(s)), { select: !0 }), document.activeElement === d && Fe(s));
2671
+ s.addEventListener(Gt, c), s.dispatchEvent(w), w.defaultPrevented || (Gi(ts(jr(s)), { select: !0 }), document.activeElement === f && Fe(s));
2660
2672
  }
2661
2673
  return () => {
2662
2674
  s.removeEventListener(Gt, c), setTimeout(() => {
2663
2675
  const w = new CustomEvent(qt, Xn);
2664
- s.addEventListener(qt, f), s.dispatchEvent(w), w.defaultPrevented || Fe(d ?? document.body, { select: !0 }), s.removeEventListener(qt, f), Gn.remove(g);
2676
+ s.addEventListener(qt, d), s.dispatchEvent(w), w.defaultPrevented || Fe(f ?? document.body, { select: !0 }), s.removeEventListener(qt, d), Gn.remove(g);
2665
2677
  }, 0);
2666
2678
  };
2667
2679
  }
2668
- }, [s, c, f, g]);
2669
- const b = h.useCallback(
2670
- (d) => {
2680
+ }, [s, c, d, g]);
2681
+ const x = h.useCallback(
2682
+ (f) => {
2671
2683
  if (!n && !r || g.paused) return;
2672
- const m = d.key === "Tab" && !d.altKey && !d.ctrlKey && !d.metaKey, w = document.activeElement;
2684
+ const m = f.key === "Tab" && !f.altKey && !f.ctrlKey && !f.metaKey, w = document.activeElement;
2673
2685
  if (m && w) {
2674
- const y = d.currentTarget, [x, C] = qi(y);
2675
- x && C ? !d.shiftKey && w === C ? (d.preventDefault(), n && Fe(x, { select: !0 })) : d.shiftKey && w === x && (d.preventDefault(), n && Fe(C, { select: !0 })) : w === y && d.preventDefault();
2686
+ const b = f.currentTarget, [y, C] = qi(b);
2687
+ y && C ? !f.shiftKey && w === C ? (f.preventDefault(), n && Fe(y, { select: !0 })) : f.shiftKey && w === y && (f.preventDefault(), n && Fe(C, { select: !0 })) : w === b && f.preventDefault();
2676
2688
  }
2677
2689
  },
2678
2690
  [n, r, g.paused]
2679
2691
  );
2680
- return /* @__PURE__ */ E(X.div, { tabIndex: -1, ...i, ref: v, onKeyDown: b });
2692
+ return /* @__PURE__ */ T(X.div, { tabIndex: -1, ...i, ref: v, onKeyDown: x });
2681
2693
  });
2682
2694
  Ur.displayName = Zi;
2683
2695
  function Gi(e, { select: t = !1 } = {}) {
@@ -2862,18 +2874,18 @@ function er(e, t, n) {
2862
2874
  reference: r,
2863
2875
  floating: o
2864
2876
  } = e;
2865
- const a = ye(t), i = In(t), s = Rn(i), l = Le(t), c = a === "y", f = r.x + r.width / 2 - o.width / 2, p = r.y + r.height / 2 - o.height / 2, v = r[s] / 2 - o[s] / 2;
2877
+ const a = ye(t), i = In(t), s = Rn(i), l = Le(t), c = a === "y", d = r.x + r.width / 2 - o.width / 2, p = r.y + r.height / 2 - o.height / 2, v = r[s] / 2 - o[s] / 2;
2866
2878
  let g;
2867
2879
  switch (l) {
2868
2880
  case "top":
2869
2881
  g = {
2870
- x: f,
2882
+ x: d,
2871
2883
  y: r.y - o.height
2872
2884
  };
2873
2885
  break;
2874
2886
  case "bottom":
2875
2887
  g = {
2876
- x: f,
2888
+ x: d,
2877
2889
  y: r.y + r.height
2878
2890
  };
2879
2891
  break;
@@ -2917,20 +2929,20 @@ const vs = async (e, t, n) => {
2917
2929
  floating: t,
2918
2930
  strategy: o
2919
2931
  }), {
2920
- x: f,
2932
+ x: d,
2921
2933
  y: p
2922
- } = er(c, r, l), v = r, g = {}, b = 0;
2923
- for (let d = 0; d < s.length; d++) {
2934
+ } = er(c, r, l), v = r, g = {}, x = 0;
2935
+ for (let f = 0; f < s.length; f++) {
2924
2936
  const {
2925
2937
  name: m,
2926
2938
  fn: w
2927
- } = s[d], {
2928
- x: y,
2929
- y: x,
2939
+ } = s[f], {
2940
+ x: b,
2941
+ y,
2930
2942
  data: C,
2931
2943
  reset: S
2932
2944
  } = await w({
2933
- x: f,
2945
+ x: d,
2934
2946
  y: p,
2935
2947
  initialPlacement: r,
2936
2948
  placement: v,
@@ -2943,23 +2955,23 @@ const vs = async (e, t, n) => {
2943
2955
  floating: t
2944
2956
  }
2945
2957
  });
2946
- f = y ?? f, p = x ?? p, g = {
2958
+ d = b ?? d, p = y ?? p, g = {
2947
2959
  ...g,
2948
2960
  [m]: {
2949
2961
  ...g[m],
2950
2962
  ...C
2951
2963
  }
2952
- }, S && b <= 50 && (b++, typeof S == "object" && (S.placement && (v = S.placement), S.rects && (c = S.rects === !0 ? await i.getElementRects({
2964
+ }, S && x <= 50 && (x++, typeof S == "object" && (S.placement && (v = S.placement), S.rects && (c = S.rects === !0 ? await i.getElementRects({
2953
2965
  reference: e,
2954
2966
  floating: t,
2955
2967
  strategy: o
2956
2968
  }) : S.rects), {
2957
- x: f,
2969
+ x: d,
2958
2970
  y: p
2959
- } = er(c, v, l)), d = -1);
2971
+ } = er(c, v, l)), f = -1);
2960
2972
  }
2961
2973
  return {
2962
- x: f,
2974
+ x: d,
2963
2975
  y: p,
2964
2976
  placement: v,
2965
2977
  strategy: o,
@@ -2978,21 +2990,21 @@ async function wt(e, t) {
2978
2990
  strategy: l
2979
2991
  } = e, {
2980
2992
  boundary: c = "clippingAncestors",
2981
- rootBoundary: f = "viewport",
2993
+ rootBoundary: d = "viewport",
2982
2994
  elementContext: p = "floating",
2983
2995
  altBoundary: v = !1,
2984
2996
  padding: g = 0
2985
- } = Oe(t, e), b = Yr(g), m = s[v ? p === "floating" ? "reference" : "floating" : p], w = Mt(await a.getClippingRect({
2997
+ } = Oe(t, e), x = Yr(g), m = s[v ? p === "floating" ? "reference" : "floating" : p], w = Mt(await a.getClippingRect({
2986
2998
  element: (n = await (a.isElement == null ? void 0 : a.isElement(m))) == null || n ? m : m.contextElement || await (a.getDocumentElement == null ? void 0 : a.getDocumentElement(s.floating)),
2987
2999
  boundary: c,
2988
- rootBoundary: f,
3000
+ rootBoundary: d,
2989
3001
  strategy: l
2990
- })), y = p === "floating" ? {
3002
+ })), b = p === "floating" ? {
2991
3003
  x: r,
2992
3004
  y: o,
2993
3005
  width: i.floating.width,
2994
3006
  height: i.floating.height
2995
- } : i.reference, x = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(s.floating)), C = await (a.isElement == null ? void 0 : a.isElement(x)) ? await (a.getScale == null ? void 0 : a.getScale(x)) || {
3007
+ } : i.reference, y = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(s.floating)), C = await (a.isElement == null ? void 0 : a.isElement(y)) ? await (a.getScale == null ? void 0 : a.getScale(y)) || {
2996
3008
  x: 1,
2997
3009
  y: 1
2998
3010
  } : {
@@ -3000,15 +3012,15 @@ async function wt(e, t) {
3000
3012
  y: 1
3001
3013
  }, S = Mt(a.convertOffsetParentRelativeRectToViewportRelativeRect ? await a.convertOffsetParentRelativeRectToViewportRelativeRect({
3002
3014
  elements: s,
3003
- rect: y,
3004
- offsetParent: x,
3015
+ rect: b,
3016
+ offsetParent: y,
3005
3017
  strategy: l
3006
- }) : y);
3018
+ }) : b);
3007
3019
  return {
3008
- top: (w.top - S.top + b.top) / C.y,
3009
- bottom: (S.bottom - w.bottom + b.bottom) / C.y,
3010
- left: (w.left - S.left + b.left) / C.x,
3011
- right: (S.right - w.right + b.right) / C.x
3020
+ top: (w.top - S.top + x.top) / C.y,
3021
+ bottom: (S.bottom - w.bottom + x.bottom) / C.y,
3022
+ left: (w.left - S.left + x.left) / C.x,
3023
+ right: (S.right - w.right + x.right) / C.x
3012
3024
  };
3013
3025
  }
3014
3026
  const ms = (e) => ({
@@ -3025,22 +3037,22 @@ const ms = (e) => ({
3025
3037
  middlewareData: l
3026
3038
  } = t, {
3027
3039
  element: c,
3028
- padding: f = 0
3040
+ padding: d = 0
3029
3041
  } = Oe(e, t) || {};
3030
3042
  if (c == null)
3031
3043
  return {};
3032
- const p = Yr(f), v = {
3044
+ const p = Yr(d), v = {
3033
3045
  x: n,
3034
3046
  y: r
3035
- }, g = In(o), b = Rn(g), d = await i.getDimensions(c), m = g === "y", w = m ? "top" : "left", y = m ? "bottom" : "right", x = m ? "clientHeight" : "clientWidth", C = a.reference[b] + a.reference[g] - v[g] - a.floating[b], S = v[g] - a.reference[g], A = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c));
3036
- let k = A ? A[x] : 0;
3037
- (!k || !await (i.isElement == null ? void 0 : i.isElement(A))) && (k = s.floating[x] || a.floating[b]);
3038
- const I = C / 2 - S / 2, D = k / 2 - d[b] / 2 - 1, L = ze(p[w], D), $ = ze(p[y], D), W = L, N = k - d[b] - $, T = k / 2 - d[b] / 2 + I, B = ln(W, T, N), O = !l.arrow && st(o) != null && T !== B && a.reference[b] / 2 - (T < W ? L : $) - d[b] / 2 < 0, M = O ? T < W ? T - W : T - N : 0;
3047
+ }, g = In(o), x = Rn(g), f = await i.getDimensions(c), m = g === "y", w = m ? "top" : "left", b = m ? "bottom" : "right", y = m ? "clientHeight" : "clientWidth", C = a.reference[x] + a.reference[g] - v[g] - a.floating[x], S = v[g] - a.reference[g], E = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c));
3048
+ let k = E ? E[y] : 0;
3049
+ (!k || !await (i.isElement == null ? void 0 : i.isElement(E))) && (k = s.floating[y] || a.floating[x]);
3050
+ const I = C / 2 - S / 2, D = k / 2 - f[x] / 2 - 1, L = ze(p[w], D), $ = ze(p[b], D), W = L, F = k - f[x] - $, N = k / 2 - f[x] / 2 + I, _ = ln(W, N, F), O = !l.arrow && st(o) != null && N !== _ && a.reference[x] / 2 - (N < W ? L : $) - f[x] / 2 < 0, M = O ? N < W ? N - W : N - F : 0;
3039
3051
  return {
3040
3052
  [g]: v[g] + M,
3041
3053
  data: {
3042
- [g]: B,
3043
- centerOffset: T - B - M,
3054
+ [g]: _,
3055
+ centerOffset: N - _ - M,
3044
3056
  ...O && {
3045
3057
  alignmentOffset: M
3046
3058
  }
@@ -3062,56 +3074,56 @@ const ms = (e) => ({
3062
3074
  platform: l,
3063
3075
  elements: c
3064
3076
  } = t, {
3065
- mainAxis: f = !0,
3077
+ mainAxis: d = !0,
3066
3078
  crossAxis: p = !0,
3067
3079
  fallbackPlacements: v,
3068
3080
  fallbackStrategy: g = "bestFit",
3069
- fallbackAxisSideDirection: b = "none",
3070
- flipAlignment: d = !0,
3081
+ fallbackAxisSideDirection: x = "none",
3082
+ flipAlignment: f = !0,
3071
3083
  ...m
3072
3084
  } = Oe(e, t);
3073
3085
  if ((n = a.arrow) != null && n.alignmentOffset)
3074
3086
  return {};
3075
- const w = Le(o), y = ye(s), x = Le(s) === s, C = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), S = v || (x || !d ? [Lt(s)] : cs(s)), A = b !== "none";
3076
- !v && A && S.push(...ps(s, d, b, C));
3087
+ const w = Le(o), b = ye(s), y = Le(s) === s, C = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), S = v || (y || !f ? [Lt(s)] : cs(s)), E = x !== "none";
3088
+ !v && E && S.push(...ps(s, f, x, C));
3077
3089
  const k = [s, ...S], I = await wt(t, m), D = [];
3078
3090
  let L = ((r = a.flip) == null ? void 0 : r.overflows) || [];
3079
- if (f && D.push(I[w]), p) {
3080
- const T = ls(o, i, C);
3081
- D.push(I[T[0]], I[T[1]]);
3091
+ if (d && D.push(I[w]), p) {
3092
+ const N = ls(o, i, C);
3093
+ D.push(I[N[0]], I[N[1]]);
3082
3094
  }
3083
3095
  if (L = [...L, {
3084
3096
  placement: o,
3085
3097
  overflows: D
3086
- }], !D.every((T) => T <= 0)) {
3098
+ }], !D.every((N) => N <= 0)) {
3087
3099
  var $, W;
3088
- const T = ((($ = a.flip) == null ? void 0 : $.index) || 0) + 1, B = k[T];
3089
- if (B && (!(p === "alignment" ? y !== ye(B) : !1) || // We leave the current main axis only if every placement on that axis
3100
+ const N = ((($ = a.flip) == null ? void 0 : $.index) || 0) + 1, _ = k[N];
3101
+ if (_ && (!(p === "alignment" ? b !== ye(_) : !1) || // We leave the current main axis only if every placement on that axis
3090
3102
  // overflows the main axis.
3091
- L.every((P) => ye(P.placement) === y ? P.overflows[0] > 0 : !0)))
3103
+ L.every((P) => ye(P.placement) === b ? P.overflows[0] > 0 : !0)))
3092
3104
  return {
3093
3105
  data: {
3094
- index: T,
3106
+ index: N,
3095
3107
  overflows: L
3096
3108
  },
3097
3109
  reset: {
3098
- placement: B
3110
+ placement: _
3099
3111
  }
3100
3112
  };
3101
3113
  let O = (W = L.filter((M) => M.overflows[0] <= 0).sort((M, P) => M.overflows[1] - P.overflows[1])[0]) == null ? void 0 : W.placement;
3102
3114
  if (!O)
3103
3115
  switch (g) {
3104
3116
  case "bestFit": {
3105
- var N;
3106
- const M = (N = L.filter((P) => {
3107
- if (A) {
3117
+ var F;
3118
+ const M = (F = L.filter((P) => {
3119
+ if (E) {
3108
3120
  const z = ye(P.placement);
3109
- return z === y || // Create a bias to the `y` side axis due to horizontal
3121
+ return z === b || // Create a bias to the `y` side axis due to horizontal
3110
3122
  // reading directions favoring greater width.
3111
3123
  z === "y";
3112
3124
  }
3113
3125
  return !0;
3114
- }).map((P) => [P.placement, P.overflows.filter((z) => z > 0).reduce((z, ie) => z + ie, 0)]).sort((P, z) => P[1] - z[1])[0]) == null ? void 0 : N[0];
3126
+ }).map((P) => [P.placement, P.overflows.filter((z) => z > 0).reduce((z, Q) => z + Q, 0)]).sort((P, z) => P[1] - z[1])[0]) == null ? void 0 : F[0];
3115
3127
  M && (O = M);
3116
3128
  break;
3117
3129
  }
@@ -3188,11 +3200,11 @@ async function bs(e, t) {
3188
3200
  placement: n,
3189
3201
  platform: r,
3190
3202
  elements: o
3191
- } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = Le(n), s = st(n), l = ye(n) === "y", c = Kr.has(i) ? -1 : 1, f = a && l ? -1 : 1, p = Oe(t, e);
3203
+ } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = Le(n), s = st(n), l = ye(n) === "y", c = Kr.has(i) ? -1 : 1, d = a && l ? -1 : 1, p = Oe(t, e);
3192
3204
  let {
3193
3205
  mainAxis: v,
3194
3206
  crossAxis: g,
3195
- alignmentAxis: b
3207
+ alignmentAxis: x
3196
3208
  } = typeof p == "number" ? {
3197
3209
  mainAxis: p,
3198
3210
  crossAxis: 0,
@@ -3202,12 +3214,12 @@ async function bs(e, t) {
3202
3214
  crossAxis: p.crossAxis || 0,
3203
3215
  alignmentAxis: p.alignmentAxis
3204
3216
  };
3205
- return s && typeof b == "number" && (g = s === "end" ? b * -1 : b), l ? {
3206
- x: g * f,
3217
+ return s && typeof x == "number" && (g = s === "end" ? x * -1 : x), l ? {
3218
+ x: g * d,
3207
3219
  y: v * c
3208
3220
  } : {
3209
3221
  x: v * c,
3210
- y: g * f
3222
+ y: g * d
3211
3223
  };
3212
3224
  }
3213
3225
  const xs = function(e) {
@@ -3248,11 +3260,11 @@ const xs = function(e) {
3248
3260
  fn: (m) => {
3249
3261
  let {
3250
3262
  x: w,
3251
- y
3263
+ y: b
3252
3264
  } = m;
3253
3265
  return {
3254
3266
  x: w,
3255
- y
3267
+ y: b
3256
3268
  };
3257
3269
  }
3258
3270
  },
@@ -3260,26 +3272,26 @@ const xs = function(e) {
3260
3272
  } = Oe(e, t), c = {
3261
3273
  x: n,
3262
3274
  y: r
3263
- }, f = await wt(t, l), p = ye(Le(o)), v = Pn(p);
3264
- let g = c[v], b = c[p];
3275
+ }, d = await wt(t, l), p = ye(Le(o)), v = Pn(p);
3276
+ let g = c[v], x = c[p];
3265
3277
  if (a) {
3266
- const m = v === "y" ? "top" : "left", w = v === "y" ? "bottom" : "right", y = g + f[m], x = g - f[w];
3267
- g = ln(y, g, x);
3278
+ const m = v === "y" ? "top" : "left", w = v === "y" ? "bottom" : "right", b = g + d[m], y = g - d[w];
3279
+ g = ln(b, g, y);
3268
3280
  }
3269
3281
  if (i) {
3270
- const m = p === "y" ? "top" : "left", w = p === "y" ? "bottom" : "right", y = b + f[m], x = b - f[w];
3271
- b = ln(y, b, x);
3282
+ const m = p === "y" ? "top" : "left", w = p === "y" ? "bottom" : "right", b = x + d[m], y = x - d[w];
3283
+ x = ln(b, x, y);
3272
3284
  }
3273
- const d = s.fn({
3285
+ const f = s.fn({
3274
3286
  ...t,
3275
3287
  [v]: g,
3276
- [p]: b
3288
+ [p]: x
3277
3289
  });
3278
3290
  return {
3279
- ...d,
3291
+ ...f,
3280
3292
  data: {
3281
- x: d.x - n,
3282
- y: d.y - r,
3293
+ x: f.x - n,
3294
+ y: f.y - r,
3283
3295
  enabled: {
3284
3296
  [v]: a,
3285
3297
  [p]: i
@@ -3302,31 +3314,31 @@ const xs = function(e) {
3302
3314
  offset: s = 0,
3303
3315
  mainAxis: l = !0,
3304
3316
  crossAxis: c = !0
3305
- } = Oe(e, t), f = {
3317
+ } = Oe(e, t), d = {
3306
3318
  x: n,
3307
3319
  y: r
3308
3320
  }, p = ye(o), v = Pn(p);
3309
- let g = f[v], b = f[p];
3310
- const d = Oe(s, t), m = typeof d == "number" ? {
3311
- mainAxis: d,
3321
+ let g = d[v], x = d[p];
3322
+ const f = Oe(s, t), m = typeof f == "number" ? {
3323
+ mainAxis: f,
3312
3324
  crossAxis: 0
3313
3325
  } : {
3314
3326
  mainAxis: 0,
3315
3327
  crossAxis: 0,
3316
- ...d
3328
+ ...f
3317
3329
  };
3318
3330
  if (l) {
3319
- const x = v === "y" ? "height" : "width", C = a.reference[v] - a.floating[x] + m.mainAxis, S = a.reference[v] + a.reference[x] - m.mainAxis;
3331
+ const y = v === "y" ? "height" : "width", C = a.reference[v] - a.floating[y] + m.mainAxis, S = a.reference[v] + a.reference[y] - m.mainAxis;
3320
3332
  g < C ? g = C : g > S && (g = S);
3321
3333
  }
3322
3334
  if (c) {
3323
- var w, y;
3324
- const x = v === "y" ? "width" : "height", C = Kr.has(Le(o)), S = a.reference[p] - a.floating[x] + (C && ((w = i.offset) == null ? void 0 : w[p]) || 0) + (C ? 0 : m.crossAxis), A = a.reference[p] + a.reference[x] + (C ? 0 : ((y = i.offset) == null ? void 0 : y[p]) || 0) - (C ? m.crossAxis : 0);
3325
- b < S ? b = S : b > A && (b = A);
3335
+ var w, b;
3336
+ const y = v === "y" ? "width" : "height", C = Kr.has(Le(o)), S = a.reference[p] - a.floating[y] + (C && ((w = i.offset) == null ? void 0 : w[p]) || 0) + (C ? 0 : m.crossAxis), E = a.reference[p] + a.reference[y] + (C ? 0 : ((b = i.offset) == null ? void 0 : b[p]) || 0) - (C ? m.crossAxis : 0);
3337
+ x < S ? x = S : x > E && (x = E);
3326
3338
  }
3327
3339
  return {
3328
3340
  [v]: g,
3329
- [p]: b
3341
+ [p]: x
3330
3342
  };
3331
3343
  }
3332
3344
  };
@@ -3345,17 +3357,17 @@ const xs = function(e) {
3345
3357
  apply: l = () => {
3346
3358
  },
3347
3359
  ...c
3348
- } = Oe(e, t), f = await wt(t, c), p = Le(o), v = st(o), g = ye(o) === "y", {
3349
- width: b,
3350
- height: d
3360
+ } = Oe(e, t), d = await wt(t, c), p = Le(o), v = st(o), g = ye(o) === "y", {
3361
+ width: x,
3362
+ height: f
3351
3363
  } = a.floating;
3352
3364
  let m, w;
3353
3365
  p === "top" || p === "bottom" ? (m = p, w = v === (await (i.isRTL == null ? void 0 : i.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (w = p, m = v === "end" ? "top" : "bottom");
3354
- const y = d - f.top - f.bottom, x = b - f.left - f.right, C = ze(d - f[m], y), S = ze(b - f[w], x), A = !t.middlewareData.shift;
3366
+ const b = f - d.top - d.bottom, y = x - d.left - d.right, C = ze(f - d[m], b), S = ze(x - d[w], y), E = !t.middlewareData.shift;
3355
3367
  let k = C, I = S;
3356
- if ((n = t.middlewareData.shift) != null && n.enabled.x && (I = x), (r = t.middlewareData.shift) != null && r.enabled.y && (k = y), A && !v) {
3357
- const L = ce(f.left, 0), $ = ce(f.right, 0), W = ce(f.top, 0), N = ce(f.bottom, 0);
3358
- g ? I = b - 2 * (L !== 0 || $ !== 0 ? L + $ : ce(f.left, f.right)) : k = d - 2 * (W !== 0 || N !== 0 ? W + N : ce(f.top, f.bottom));
3368
+ if ((n = t.middlewareData.shift) != null && n.enabled.x && (I = y), (r = t.middlewareData.shift) != null && r.enabled.y && (k = b), E && !v) {
3369
+ const L = ce(d.left, 0), $ = ce(d.right, 0), W = ce(d.top, 0), F = ce(d.bottom, 0);
3370
+ g ? I = x - 2 * (L !== 0 || $ !== 0 ? L + $ : ce(d.left, d.right)) : k = f - 2 * (W !== 0 || F !== 0 ? W + F : ce(d.top, d.bottom));
3359
3371
  }
3360
3372
  await l({
3361
3373
  ...t,
@@ -3363,7 +3375,7 @@ const xs = function(e) {
3363
3375
  availableHeight: k
3364
3376
  });
3365
3377
  const D = await i.getDimensions(s.floating);
3366
- return b !== D.width || d !== D.height ? {
3378
+ return x !== D.width || f !== D.height ? {
3367
3379
  reset: {
3368
3380
  rects: !0
3369
3381
  }
@@ -3530,17 +3542,17 @@ function Ye(e, t, n, r) {
3530
3542
  let i = ke(1);
3531
3543
  t && (r ? me(r) && (i = tt(r)) : i = tt(e));
3532
3544
  const s = Ls(a, n, r) ? qr(a) : ke(0);
3533
- let l = (o.left + s.x) / i.x, c = (o.top + s.y) / i.y, f = o.width / i.x, p = o.height / i.y;
3545
+ let l = (o.left + s.x) / i.x, c = (o.top + s.y) / i.y, d = o.width / i.x, p = o.height / i.y;
3534
3546
  if (a) {
3535
3547
  const v = ue(a), g = r && me(r) ? ue(r) : r;
3536
- let b = v, d = un(b);
3537
- for (; d && r && g !== b; ) {
3538
- const m = tt(d), w = d.getBoundingClientRect(), y = ge(d), x = w.left + (d.clientLeft + parseFloat(y.paddingLeft)) * m.x, C = w.top + (d.clientTop + parseFloat(y.paddingTop)) * m.y;
3539
- l *= m.x, c *= m.y, f *= m.x, p *= m.y, l += x, c += C, b = ue(d), d = un(b);
3548
+ let x = v, f = un(x);
3549
+ for (; f && r && g !== x; ) {
3550
+ const m = tt(f), w = f.getBoundingClientRect(), b = ge(f), y = w.left + (f.clientLeft + parseFloat(b.paddingLeft)) * m.x, C = w.top + (f.clientTop + parseFloat(b.paddingTop)) * m.y;
3551
+ l *= m.x, c *= m.y, d *= m.x, p *= m.y, l += y, c += C, x = ue(f), f = un(x);
3540
3552
  }
3541
3553
  }
3542
3554
  return Mt({
3543
- width: f,
3555
+ width: d,
3544
3556
  height: p,
3545
3557
  x: l,
3546
3558
  y: c
@@ -3575,17 +3587,17 @@ function Ms(e) {
3575
3587
  scrollLeft: 0,
3576
3588
  scrollTop: 0
3577
3589
  }, c = ke(1);
3578
- const f = ke(0), p = Te(r);
3590
+ const d = ke(0), p = Te(r);
3579
3591
  if ((p || !p && !a) && ((lt(r) !== "body" || xt(i)) && (l = Wt(r)), Te(r))) {
3580
3592
  const g = Ye(r);
3581
- c = tt(r), f.x = g.x + r.clientLeft, f.y = g.y + r.clientTop;
3593
+ c = tt(r), d.x = g.x + r.clientLeft, d.y = g.y + r.clientTop;
3582
3594
  }
3583
3595
  const v = i && !p && !a ? Qr(i, l, !0) : ke(0);
3584
3596
  return {
3585
3597
  width: n.width * c.x,
3586
3598
  height: n.height * c.y,
3587
- x: n.x * c.x - l.scrollLeft * c.x + f.x + v.x,
3588
- y: n.y * c.y - l.scrollTop * c.y + f.y + v.y
3599
+ x: n.x * c.x - l.scrollLeft * c.x + d.x + v.x,
3600
+ y: n.y * c.y - l.scrollTop * c.y + d.y + v.y
3589
3601
  };
3590
3602
  }
3591
3603
  function Ds(e) {
@@ -3659,7 +3671,7 @@ function $s(e, t) {
3659
3671
  let i = a ? Ve(e) : e;
3660
3672
  for (; me(i) && !ot(i); ) {
3661
3673
  const s = ge(i), l = Nn(i);
3662
- !l && s.position === "fixed" && (o = null), (a ? !l && !o : !l && s.position === "static" && !!o && zs.has(o.position) || xt(i) && !l && Jr(e, i)) ? r = r.filter((f) => f !== i) : o = s, i = Ve(i);
3674
+ !l && s.position === "fixed" && (o = null), (a ? !l && !o : !l && s.position === "static" && !!o && zs.has(o.position) || xt(i) && !l && Jr(e, i)) ? r = r.filter((d) => d !== i) : o = s, i = Ve(i);
3663
3675
  }
3664
3676
  return t.set(e, r), r;
3665
3677
  }
@@ -3670,8 +3682,8 @@ function Ws(e) {
3670
3682
  rootBoundary: r,
3671
3683
  strategy: o
3672
3684
  } = e;
3673
- const i = [...n === "clippingAncestors" ? $t(t) ? [] : $s(t, this._c) : [].concat(n), r], s = i[0], l = i.reduce((c, f) => {
3674
- const p = or(t, f, o);
3685
+ const i = [...n === "clippingAncestors" ? $t(t) ? [] : $s(t, this._c) : [].concat(n), r], s = i[0], l = i.reduce((c, d) => {
3686
+ const p = or(t, d, o);
3675
3687
  return c.top = ce(p.top, c.top), c.right = ze(p.right, c.right), c.bottom = ze(p.bottom, c.bottom), c.left = ce(p.left, c.left), c;
3676
3688
  }, or(t, s, o));
3677
3689
  return {
@@ -3707,7 +3719,7 @@ function Us(e, t, n) {
3707
3719
  l.x = g.x + t.clientLeft, l.y = g.y + t.clientTop;
3708
3720
  } else o && c();
3709
3721
  a && !r && o && c();
3710
- const f = o && !r && !a ? Qr(o, s) : ke(0), p = i.left + s.scrollLeft - l.x - f.x, v = i.top + s.scrollTop - l.y - f.y;
3722
+ const d = o && !r && !a ? Qr(o, s) : ke(0), p = i.left + s.scrollLeft - l.x - d.x, v = i.top + s.scrollTop - l.y - d.y;
3711
3723
  return {
3712
3724
  x: p,
3713
3725
  y: v,
@@ -3784,20 +3796,20 @@ function Xs(e, t) {
3784
3796
  function i(s, l) {
3785
3797
  s === void 0 && (s = !1), l === void 0 && (l = 1), a();
3786
3798
  const c = e.getBoundingClientRect(), {
3787
- left: f,
3799
+ left: d,
3788
3800
  top: p,
3789
3801
  width: v,
3790
3802
  height: g
3791
3803
  } = c;
3792
3804
  if (s || t(), !v || !g)
3793
3805
  return;
3794
- const b = St(p), d = St(o.clientWidth - (f + v)), m = St(o.clientHeight - (p + g)), w = St(f), x = {
3795
- rootMargin: -b + "px " + -d + "px " + -m + "px " + -w + "px",
3806
+ const x = St(p), f = St(o.clientWidth - (d + v)), m = St(o.clientHeight - (p + g)), w = St(d), y = {
3807
+ rootMargin: -x + "px " + -f + "px " + -m + "px " + -w + "px",
3796
3808
  threshold: ce(0, ze(1, l)) || 1
3797
3809
  };
3798
3810
  let C = !0;
3799
- function S(A) {
3800
- const k = A[0].intersectionRatio;
3811
+ function S(E) {
3812
+ const k = E[0].intersectionRatio;
3801
3813
  if (k !== l) {
3802
3814
  if (!C)
3803
3815
  return i();
@@ -3809,12 +3821,12 @@ function Xs(e, t) {
3809
3821
  }
3810
3822
  try {
3811
3823
  n = new IntersectionObserver(S, {
3812
- ...x,
3824
+ ...y,
3813
3825
  // Handle <iframe>s
3814
3826
  root: o.ownerDocument
3815
3827
  });
3816
3828
  } catch {
3817
- n = new IntersectionObserver(S, x);
3829
+ n = new IntersectionObserver(S, y);
3818
3830
  }
3819
3831
  n.observe(e);
3820
3832
  }
@@ -3828,8 +3840,8 @@ function Zs(e, t, n, r) {
3828
3840
  elementResize: i = typeof ResizeObserver == "function",
3829
3841
  layoutShift: s = typeof IntersectionObserver == "function",
3830
3842
  animationFrame: l = !1
3831
- } = r, c = Ln(e), f = o || a ? [...c ? bt(c) : [], ...bt(t)] : [];
3832
- f.forEach((w) => {
3843
+ } = r, c = Ln(e), d = o || a ? [...c ? bt(c) : [], ...bt(t)] : [];
3844
+ d.forEach((w) => {
3833
3845
  o && w.addEventListener("scroll", n, {
3834
3846
  passive: !0
3835
3847
  }), a && w.addEventListener("resize", n);
@@ -3837,23 +3849,23 @@ function Zs(e, t, n, r) {
3837
3849
  const p = c && s ? Xs(c, n) : null;
3838
3850
  let v = -1, g = null;
3839
3851
  i && (g = new ResizeObserver((w) => {
3840
- let [y] = w;
3841
- y && y.target === c && g && (g.unobserve(t), cancelAnimationFrame(v), v = requestAnimationFrame(() => {
3842
- var x;
3843
- (x = g) == null || x.observe(t);
3852
+ let [b] = w;
3853
+ b && b.target === c && g && (g.unobserve(t), cancelAnimationFrame(v), v = requestAnimationFrame(() => {
3854
+ var y;
3855
+ (y = g) == null || y.observe(t);
3844
3856
  })), n();
3845
3857
  }), c && !l && g.observe(c), g.observe(t));
3846
- let b, d = l ? Ye(e) : null;
3858
+ let x, f = l ? Ye(e) : null;
3847
3859
  l && m();
3848
3860
  function m() {
3849
3861
  const w = Ye(e);
3850
- d && !to(d, w) && n(), d = w, b = requestAnimationFrame(m);
3862
+ f && !to(f, w) && n(), f = w, x = requestAnimationFrame(m);
3851
3863
  }
3852
3864
  return n(), () => {
3853
3865
  var w;
3854
- f.forEach((y) => {
3855
- o && y.removeEventListener("scroll", n), a && y.removeEventListener("resize", n);
3856
- }), p == null || p(), (w = g) == null || w.disconnect(), g = null, l && cancelAnimationFrame(b);
3866
+ d.forEach((b) => {
3867
+ o && b.removeEventListener("scroll", n), a && b.removeEventListener("resize", n);
3868
+ }), p == null || p(), (w = g) == null || w.disconnect(), g = null, l && cancelAnimationFrame(x);
3857
3869
  };
3858
3870
  }
3859
3871
  const Gs = xs, qs = ys, Qs = gs, Js = Ss, el = ws, ir = ms, tl = Cs, nl = (e, t, n) => {
@@ -3928,7 +3940,7 @@ function al(e) {
3928
3940
  transform: s = !0,
3929
3941
  whileElementsMounted: l,
3930
3942
  open: c
3931
- } = e, [f, p] = h.useState({
3943
+ } = e, [d, p] = h.useState({
3932
3944
  x: 0,
3933
3945
  y: 0,
3934
3946
  strategy: n,
@@ -3937,20 +3949,20 @@ function al(e) {
3937
3949
  isPositioned: !1
3938
3950
  }), [v, g] = h.useState(r);
3939
3951
  Dt(v, r) || g(r);
3940
- const [b, d] = h.useState(null), [m, w] = h.useState(null), y = h.useCallback((P) => {
3941
- P !== A.current && (A.current = P, d(P));
3942
- }, []), x = h.useCallback((P) => {
3952
+ const [x, f] = h.useState(null), [m, w] = h.useState(null), b = h.useCallback((P) => {
3953
+ P !== E.current && (E.current = P, f(P));
3954
+ }, []), y = h.useCallback((P) => {
3943
3955
  P !== k.current && (k.current = P, w(P));
3944
- }, []), C = a || b, S = i || m, A = h.useRef(null), k = h.useRef(null), I = h.useRef(f), D = l != null, L = Jt(l), $ = Jt(o), W = Jt(c), N = h.useCallback(() => {
3945
- if (!A.current || !k.current)
3956
+ }, []), C = a || x, S = i || m, E = h.useRef(null), k = h.useRef(null), I = h.useRef(d), D = l != null, L = Jt(l), $ = Jt(o), W = Jt(c), F = h.useCallback(() => {
3957
+ if (!E.current || !k.current)
3946
3958
  return;
3947
3959
  const P = {
3948
3960
  placement: t,
3949
3961
  strategy: n,
3950
3962
  middleware: v
3951
3963
  };
3952
- $.current && (P.platform = $.current), nl(A.current, k.current, P).then((z) => {
3953
- const ie = {
3964
+ $.current && (P.platform = $.current), nl(E.current, k.current, P).then((z) => {
3965
+ const Q = {
3954
3966
  ...z,
3955
3967
  // The floating element's position may be recomputed while it's closed
3956
3968
  // but still mounted (such as when transitioning out). To ensure
@@ -3958,8 +3970,8 @@ function al(e) {
3958
3970
  // setting it to `true` when `open === false` (must be specified).
3959
3971
  isPositioned: W.current !== !1
3960
3972
  };
3961
- T.current && !Dt(I.current, ie) && (I.current = ie, h.flushSync(() => {
3962
- p(ie);
3973
+ N.current && !Dt(I.current, Q) && (I.current = Q, h.flushSync(() => {
3974
+ p(Q);
3963
3975
  }));
3964
3976
  });
3965
3977
  }, [v, t, n, $, W]);
@@ -3969,22 +3981,22 @@ function al(e) {
3969
3981
  isPositioned: !1
3970
3982
  })));
3971
3983
  }, [c]);
3972
- const T = h.useRef(!1);
3973
- Pt(() => (T.current = !0, () => {
3974
- T.current = !1;
3984
+ const N = h.useRef(!1);
3985
+ Pt(() => (N.current = !0, () => {
3986
+ N.current = !1;
3975
3987
  }), []), Pt(() => {
3976
- if (C && (A.current = C), S && (k.current = S), C && S) {
3988
+ if (C && (E.current = C), S && (k.current = S), C && S) {
3977
3989
  if (L.current)
3978
- return L.current(C, S, N);
3979
- N();
3990
+ return L.current(C, S, F);
3991
+ F();
3980
3992
  }
3981
- }, [C, S, N, L, D]);
3982
- const B = h.useMemo(() => ({
3983
- reference: A,
3993
+ }, [C, S, F, L, D]);
3994
+ const _ = h.useMemo(() => ({
3995
+ reference: E,
3984
3996
  floating: k,
3985
- setReference: y,
3986
- setFloating: x
3987
- }), [y, x]), O = h.useMemo(() => ({
3997
+ setReference: b,
3998
+ setFloating: y
3999
+ }), [b, y]), O = h.useMemo(() => ({
3988
4000
  reference: C,
3989
4001
  floating: S
3990
4002
  }), [C, S]), M = h.useMemo(() => {
@@ -3995,26 +4007,26 @@ function al(e) {
3995
4007
  };
3996
4008
  if (!O.floating)
3997
4009
  return P;
3998
- const z = sr(O.floating, f.x), ie = sr(O.floating, f.y);
4010
+ const z = sr(O.floating, d.x), Q = sr(O.floating, d.y);
3999
4011
  return s ? {
4000
4012
  ...P,
4001
- transform: "translate(" + z + "px, " + ie + "px)",
4013
+ transform: "translate(" + z + "px, " + Q + "px)",
4002
4014
  ...no(O.floating) >= 1.5 && {
4003
4015
  willChange: "transform"
4004
4016
  }
4005
4017
  } : {
4006
4018
  position: n,
4007
4019
  left: z,
4008
- top: ie
4020
+ top: Q
4009
4021
  };
4010
- }, [n, s, O.floating, f.x, f.y]);
4022
+ }, [n, s, O.floating, d.x, d.y]);
4011
4023
  return h.useMemo(() => ({
4012
- ...f,
4013
- update: N,
4014
- refs: B,
4024
+ ...d,
4025
+ update: F,
4026
+ refs: _,
4015
4027
  elements: O,
4016
4028
  floatingStyles: M
4017
- }), [f, N, B, O, M]);
4029
+ }), [d, F, _, O, M]);
4018
4030
  }
4019
4031
  const il = (e) => {
4020
4032
  function t(n) {
@@ -4061,7 +4073,7 @@ const il = (e) => {
4061
4073
  });
4062
4074
  var hl = "Arrow", ro = h.forwardRef((e, t) => {
4063
4075
  const { children: n, width: r = 10, height: o = 5, ...a } = e;
4064
- return /* @__PURE__ */ E(
4076
+ return /* @__PURE__ */ T(
4065
4077
  X.svg,
4066
4078
  {
4067
4079
  ...a,
@@ -4070,7 +4082,7 @@ var hl = "Arrow", ro = h.forwardRef((e, t) => {
4070
4082
  height: o,
4071
4083
  viewBox: "0 0 30 10",
4072
4084
  preserveAspectRatio: "none",
4073
- children: e.asChild ? n : /* @__PURE__ */ E("polygon", { points: "0,0 30,0 15,10" })
4085
+ children: e.asChild ? n : /* @__PURE__ */ T("polygon", { points: "0,0 30,0 15,10" })
4074
4086
  }
4075
4087
  );
4076
4088
  });
@@ -4100,22 +4112,22 @@ function ml(e) {
4100
4112
  }
4101
4113
  var Dn = "Popper", [oo, ao] = An(Dn), [gl, io] = oo(Dn), so = (e) => {
4102
4114
  const { __scopePopper: t, children: n } = e, [r, o] = h.useState(null);
4103
- return /* @__PURE__ */ E(gl, { scope: t, anchor: r, onAnchorChange: o, children: n });
4115
+ return /* @__PURE__ */ T(gl, { scope: t, anchor: r, onAnchorChange: o, children: n });
4104
4116
  };
4105
4117
  so.displayName = Dn;
4106
4118
  var lo = "PopperAnchor", co = h.forwardRef(
4107
4119
  (e, t) => {
4108
- const { __scopePopper: n, virtualRef: r, ...o } = e, a = io(lo, n), i = h.useRef(null), s = te(t, i), l = h.useRef(null);
4120
+ const { __scopePopper: n, virtualRef: r, ...o } = e, a = io(lo, n), i = h.useRef(null), s = ne(t, i), l = h.useRef(null);
4109
4121
  return h.useEffect(() => {
4110
4122
  const c = l.current;
4111
4123
  l.current = (r == null ? void 0 : r.current) || i.current, c !== l.current && a.onAnchorChange(l.current);
4112
- }), r ? null : /* @__PURE__ */ E(X.div, { ...o, ref: s });
4124
+ }), r ? null : /* @__PURE__ */ T(X.div, { ...o, ref: s });
4113
4125
  }
4114
4126
  );
4115
4127
  co.displayName = lo;
4116
4128
  var Fn = "PopperContent", [wl, bl] = oo(Fn), uo = h.forwardRef(
4117
4129
  (e, t) => {
4118
- var R, K, ne, j, H, U;
4130
+ var R, K, re, j, H, U;
4119
4131
  const {
4120
4132
  __scopePopper: n,
4121
4133
  side: r = "bottom",
@@ -4125,18 +4137,18 @@ var Fn = "PopperContent", [wl, bl] = oo(Fn), uo = h.forwardRef(
4125
4137
  arrowPadding: s = 0,
4126
4138
  avoidCollisions: l = !0,
4127
4139
  collisionBoundary: c = [],
4128
- collisionPadding: f = 0,
4140
+ collisionPadding: d = 0,
4129
4141
  sticky: p = "partial",
4130
4142
  hideWhenDetached: v = !1,
4131
4143
  updatePositionStrategy: g = "optimized",
4132
- onPlaced: b,
4133
- ...d
4134
- } = e, m = io(Fn, n), [w, y] = h.useState(null), x = te(t, (le) => y(le)), [C, S] = h.useState(null), A = ml(C), k = (A == null ? void 0 : A.width) ?? 0, I = (A == null ? void 0 : A.height) ?? 0, D = r + (a !== "center" ? "-" + a : ""), L = typeof f == "number" ? f : { top: 0, right: 0, bottom: 0, left: 0, ...f }, $ = Array.isArray(c) ? c : [c], W = $.length > 0, N = {
4144
+ onPlaced: x,
4145
+ ...f
4146
+ } = e, m = io(Fn, n), [w, b] = h.useState(null), y = ne(t, (le) => b(le)), [C, S] = h.useState(null), E = ml(C), k = (E == null ? void 0 : E.width) ?? 0, I = (E == null ? void 0 : E.height) ?? 0, D = r + (a !== "center" ? "-" + a : ""), L = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, $ = Array.isArray(c) ? c : [c], W = $.length > 0, F = {
4135
4147
  padding: L,
4136
4148
  boundary: $.filter(yl),
4137
4149
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
4138
4150
  altBoundary: W
4139
- }, { refs: T, floatingStyles: B, placement: O, isPositioned: M, middlewareData: P } = al({
4151
+ }, { refs: N, floatingStyles: _, placement: O, isPositioned: M, middlewareData: P } = al({
4140
4152
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
4141
4153
  strategy: "fixed",
4142
4154
  placement: D,
@@ -4152,11 +4164,11 @@ var Fn = "PopperContent", [wl, bl] = oo(Fn), uo = h.forwardRef(
4152
4164
  mainAxis: !0,
4153
4165
  crossAxis: !1,
4154
4166
  limiter: p === "partial" ? cl() : void 0,
4155
- ...N
4167
+ ...F
4156
4168
  }),
4157
- l && ul({ ...N }),
4169
+ l && ul({ ...F }),
4158
4170
  dl({
4159
- ...N,
4171
+ ...F,
4160
4172
  apply: ({ elements: le, rects: we, availableWidth: ft, availableHeight: pt }) => {
4161
4173
  const { width: ht, height: na } = we.reference, yt = le.floating.style;
4162
4174
  yt.setProperty("--radix-popper-available-width", `${ft}px`), yt.setProperty("--radix-popper-available-height", `${pt}px`), yt.setProperty("--radix-popper-anchor-width", `${ht}px`), yt.setProperty("--radix-popper-anchor-height", `${na}px`);
@@ -4164,23 +4176,23 @@ var Fn = "PopperContent", [wl, bl] = oo(Fn), uo = h.forwardRef(
4164
4176
  }),
4165
4177
  C && pl({ element: C, padding: s }),
4166
4178
  Cl({ arrowWidth: k, arrowHeight: I }),
4167
- v && fl({ strategy: "referenceHidden", ...N })
4179
+ v && fl({ strategy: "referenceHidden", ...F })
4168
4180
  ]
4169
- }), [z, ie] = ho(O), Pe = je(b);
4181
+ }), [z, Q] = ho(O), Pe = je(x);
4170
4182
  se(() => {
4171
4183
  M && (Pe == null || Pe());
4172
4184
  }, [M, Pe]);
4173
- const ut = (R = P.arrow) == null ? void 0 : R.x, dt = (K = P.arrow) == null ? void 0 : K.y, Me = ((ne = P.arrow) == null ? void 0 : ne.centerOffset) !== 0, [Ze, He] = h.useState();
4185
+ const ut = (R = P.arrow) == null ? void 0 : R.x, dt = (K = P.arrow) == null ? void 0 : K.y, Me = ((re = P.arrow) == null ? void 0 : re.centerOffset) !== 0, [Ze, He] = h.useState();
4174
4186
  return se(() => {
4175
4187
  w && He(window.getComputedStyle(w).zIndex);
4176
- }, [w]), /* @__PURE__ */ E(
4188
+ }, [w]), /* @__PURE__ */ T(
4177
4189
  "div",
4178
4190
  {
4179
- ref: T.setFloating,
4191
+ ref: N.setFloating,
4180
4192
  "data-radix-popper-content-wrapper": "",
4181
4193
  style: {
4182
- ...B,
4183
- transform: M ? B.transform : "translate(0, -200%)",
4194
+ ..._,
4195
+ transform: M ? _.transform : "translate(0, -200%)",
4184
4196
  // keep off the page when measuring
4185
4197
  minWidth: "max-content",
4186
4198
  zIndex: Ze,
@@ -4197,7 +4209,7 @@ var Fn = "PopperContent", [wl, bl] = oo(Fn), uo = h.forwardRef(
4197
4209
  }
4198
4210
  },
4199
4211
  dir: e.dir,
4200
- children: /* @__PURE__ */ E(
4212
+ children: /* @__PURE__ */ T(
4201
4213
  wl,
4202
4214
  {
4203
4215
  scope: n,
@@ -4206,15 +4218,15 @@ var Fn = "PopperContent", [wl, bl] = oo(Fn), uo = h.forwardRef(
4206
4218
  arrowX: ut,
4207
4219
  arrowY: dt,
4208
4220
  shouldHideArrow: Me,
4209
- children: /* @__PURE__ */ E(
4221
+ children: /* @__PURE__ */ T(
4210
4222
  X.div,
4211
4223
  {
4212
4224
  "data-side": z,
4213
- "data-align": ie,
4214
- ...d,
4215
- ref: x,
4225
+ "data-align": Q,
4226
+ ...f,
4227
+ ref: y,
4216
4228
  style: {
4217
- ...d.style,
4229
+ ...f.style,
4218
4230
  // if the PopperContent hasn't been placed yet (not all measurements done)
4219
4231
  // we prevent animations so that users's animation don't kick in too early referring wrong sides
4220
4232
  animation: M ? void 0 : "none"
@@ -4239,7 +4251,7 @@ var fo = "PopperArrow", xl = {
4239
4251
  // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
4240
4252
  // doesn't report size as we'd expect on SVG elements.
4241
4253
  // it reports their bounding box which is effectively the largest path inside the SVG.
4242
- /* @__PURE__ */ E(
4254
+ /* @__PURE__ */ T(
4243
4255
  "span",
4244
4256
  {
4245
4257
  ref: a.onArrowChange,
@@ -4262,7 +4274,7 @@ var fo = "PopperArrow", xl = {
4262
4274
  }[a.placedSide],
4263
4275
  visibility: a.shouldHideArrow ? "hidden" : void 0
4264
4276
  },
4265
- children: /* @__PURE__ */ E(
4277
+ children: /* @__PURE__ */ T(
4266
4278
  vl,
4267
4279
  {
4268
4280
  ...o,
@@ -4286,10 +4298,10 @@ var Cl = (e) => ({
4286
4298
  name: "transformOrigin",
4287
4299
  options: e,
4288
4300
  fn(t) {
4289
- var m, w, y;
4290
- const { placement: n, rects: r, middlewareData: o } = t, i = ((m = o.arrow) == null ? void 0 : m.centerOffset) !== 0, s = i ? 0 : e.arrowWidth, l = i ? 0 : e.arrowHeight, [c, f] = ho(n), p = { start: "0%", center: "50%", end: "100%" }[f], v = (((w = o.arrow) == null ? void 0 : w.x) ?? 0) + s / 2, g = (((y = o.arrow) == null ? void 0 : y.y) ?? 0) + l / 2;
4291
- let b = "", d = "";
4292
- return c === "bottom" ? (b = i ? p : `${v}px`, d = `${-l}px`) : c === "top" ? (b = i ? p : `${v}px`, d = `${r.floating.height + l}px`) : c === "right" ? (b = `${-l}px`, d = i ? p : `${g}px`) : c === "left" && (b = `${r.floating.width + l}px`, d = i ? p : `${g}px`), { data: { x: b, y: d } };
4301
+ var m, w, b;
4302
+ const { placement: n, rects: r, middlewareData: o } = t, i = ((m = o.arrow) == null ? void 0 : m.centerOffset) !== 0, s = i ? 0 : e.arrowWidth, l = i ? 0 : e.arrowHeight, [c, d] = ho(n), p = { start: "0%", center: "50%", end: "100%" }[d], v = (((w = o.arrow) == null ? void 0 : w.x) ?? 0) + s / 2, g = (((b = o.arrow) == null ? void 0 : b.y) ?? 0) + l / 2;
4303
+ let x = "", f = "";
4304
+ return c === "bottom" ? (x = i ? p : `${v}px`, f = `${-l}px`) : c === "top" ? (x = i ? p : `${v}px`, f = `${r.floating.height + l}px`) : c === "right" ? (x = `${-l}px`, f = i ? p : `${g}px`) : c === "left" && (x = `${r.floating.width + l}px`, f = i ? p : `${g}px`), { data: { x, y: f } };
4293
4305
  }
4294
4306
  });
4295
4307
  function ho(e) {
@@ -4301,7 +4313,7 @@ var Sl = so, kl = co, El = uo, Tl = po, Al = "Portal", vo = h.forwardRef((e, t)
4301
4313
  const { container: n, ...r } = e, [o, a] = h.useState(!1);
4302
4314
  se(() => a(!0), []);
4303
4315
  const i = n || o && ((s = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : s.body);
4304
- return i ? De.createPortal(/* @__PURE__ */ E(X.div, { ...r, ref: t }), i) : null;
4316
+ return i ? De.createPortal(/* @__PURE__ */ T(X.div, { ...r, ref: t }), i) : null;
4305
4317
  });
4306
4318
  vo.displayName = Al;
4307
4319
  var _l = h[" useInsertionEffect ".trim().toString()] || se;
@@ -4317,22 +4329,22 @@ function lr({
4317
4329
  onChange: n
4318
4330
  }), s = e !== void 0, l = s ? e : o;
4319
4331
  {
4320
- const f = h.useRef(e !== void 0);
4332
+ const d = h.useRef(e !== void 0);
4321
4333
  h.useEffect(() => {
4322
- const p = f.current;
4334
+ const p = d.current;
4323
4335
  p !== s && console.warn(
4324
4336
  `${r} is changing from ${p ? "controlled" : "uncontrolled"} to ${s ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
4325
- ), f.current = s;
4337
+ ), d.current = s;
4326
4338
  }, [s, r]);
4327
4339
  }
4328
4340
  const c = h.useCallback(
4329
- (f) => {
4341
+ (d) => {
4330
4342
  var p;
4331
4343
  if (s) {
4332
- const v = Rl(f) ? f(e) : f;
4344
+ const v = Rl(d) ? d(e) : d;
4333
4345
  v !== e && ((p = i.current) == null || p.call(i, v));
4334
4346
  } else
4335
- a(f);
4347
+ a(d);
4336
4348
  },
4337
4349
  [s, e, a, i]
4338
4350
  );
@@ -4370,7 +4382,7 @@ var mo = Object.freeze({
4370
4382
  whiteSpace: "nowrap",
4371
4383
  wordWrap: "normal"
4372
4384
  }), Nl = "VisuallyHidden", Ol = h.forwardRef(
4373
- (e, t) => /* @__PURE__ */ E(
4385
+ (e, t) => /* @__PURE__ */ T(
4374
4386
  X.span,
4375
4387
  {
4376
4388
  ...e,
@@ -4403,20 +4415,20 @@ var Ll = function(e) {
4403
4415
  !p || s.has(p) || (s.add(p), c(p.parentNode));
4404
4416
  };
4405
4417
  o.forEach(c);
4406
- var f = function(p) {
4418
+ var d = function(p) {
4407
4419
  !p || l.has(p) || Array.prototype.forEach.call(p.children, function(v) {
4408
4420
  if (s.has(v))
4409
- f(v);
4421
+ d(v);
4410
4422
  else
4411
4423
  try {
4412
- var g = v.getAttribute(r), b = g !== null && g !== "false", d = (Ge.get(v) || 0) + 1, m = (a.get(v) || 0) + 1;
4413
- Ge.set(v, d), a.set(v, m), i.push(v), d === 1 && b && kt.set(v, !0), m === 1 && v.setAttribute(n, "true"), b || v.setAttribute(r, "true");
4424
+ var g = v.getAttribute(r), x = g !== null && g !== "false", f = (Ge.get(v) || 0) + 1, m = (a.get(v) || 0) + 1;
4425
+ Ge.set(v, f), a.set(v, m), i.push(v), f === 1 && x && kt.set(v, !0), m === 1 && v.setAttribute(n, "true"), x || v.setAttribute(r, "true");
4414
4426
  } catch (w) {
4415
4427
  console.error("aria-hidden: cannot operate on ", v, w);
4416
4428
  }
4417
4429
  });
4418
4430
  };
4419
- return f(t), s.clear(), en++, function() {
4431
+ return d(t), s.clear(), en++, function() {
4420
4432
  i.forEach(function(p) {
4421
4433
  var v = Ge.get(p) - 1, g = a.get(p) - 1;
4422
4434
  Ge.set(p, v), a.set(p, g), v || (kt.has(p) || p.removeAttribute(r), kt.delete(p)), g || p.removeAttribute(n);
@@ -4536,17 +4548,17 @@ function jl(e, t) {
4536
4548
  n = [], s.forEach(a), i = n;
4537
4549
  }
4538
4550
  var l = function() {
4539
- var f = i;
4540
- i = [], f.forEach(a);
4551
+ var d = i;
4552
+ i = [], d.forEach(a);
4541
4553
  }, c = function() {
4542
4554
  return Promise.resolve().then(l);
4543
4555
  };
4544
4556
  c(), n = {
4545
- push: function(f) {
4546
- i.push(f), c();
4557
+ push: function(d) {
4558
+ i.push(d), c();
4547
4559
  },
4548
- filter: function(f) {
4549
- return i = i.filter(f), n;
4560
+ filter: function(d) {
4561
+ return i = i.filter(d), n;
4550
4562
  }
4551
4563
  };
4552
4564
  }
@@ -4577,12 +4589,12 @@ var xo = Yl(), nn = function() {
4577
4589
  onScrollCapture: nn,
4578
4590
  onWheelCapture: nn,
4579
4591
  onTouchMoveCapture: nn
4580
- }), o = r[0], a = r[1], i = e.forwardProps, s = e.children, l = e.className, c = e.removeScrollBar, f = e.enabled, p = e.shards, v = e.sideCar, g = e.noRelative, b = e.noIsolation, d = e.inert, m = e.allowPinchZoom, w = e.as, y = w === void 0 ? "div" : w, x = e.gapMode, C = wo(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = v, A = Hl([n, t]), k = xe(xe({}, C), o);
4592
+ }), o = r[0], a = r[1], i = e.forwardProps, s = e.children, l = e.className, c = e.removeScrollBar, d = e.enabled, p = e.shards, v = e.sideCar, g = e.noRelative, x = e.noIsolation, f = e.inert, m = e.allowPinchZoom, w = e.as, b = w === void 0 ? "div" : w, y = e.gapMode, C = wo(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = v, E = Hl([n, t]), k = xe(xe({}, C), o);
4581
4593
  return h.createElement(
4582
4594
  h.Fragment,
4583
4595
  null,
4584
- f && h.createElement(S, { sideCar: xo, removeScrollBar: c, shards: p, noRelative: g, noIsolation: b, inert: d, setCallbacks: a, allowPinchZoom: !!m, lockRef: n, gapMode: x }),
4585
- i ? h.cloneElement(h.Children.only(s), xe(xe({}, k), { ref: A })) : h.createElement(y, xe({}, k, { className: l, ref: A }), s)
4596
+ d && h.createElement(S, { sideCar: xo, removeScrollBar: c, shards: p, noRelative: g, noIsolation: x, inert: f, setCallbacks: a, allowPinchZoom: !!m, lockRef: n, gapMode: y }),
4597
+ i ? h.cloneElement(h.Children.only(s), xe(xe({}, k), { ref: E })) : h.createElement(b, xe({}, k, { className: l, ref: E }), s)
4586
4598
  );
4587
4599
  });
4588
4600
  Ht.defaultProps = {
@@ -4780,20 +4792,20 @@ var qe = dn ? { passive: !1 } : !1, sc = function(e) {
4780
4792
  }, fc = function(e, t) {
4781
4793
  return e === "h" && t === "rtl" ? -1 : 1;
4782
4794
  }, pc = function(e, t, n, r, o) {
4783
- var a = fc(e, window.getComputedStyle(t).direction), i = a * r, s = n.target, l = t.contains(s), c = !1, f = i > 0, p = 0, v = 0;
4795
+ var a = fc(e, window.getComputedStyle(t).direction), i = a * r, s = n.target, l = t.contains(s), c = !1, d = i > 0, p = 0, v = 0;
4784
4796
  do {
4785
4797
  if (!s)
4786
4798
  break;
4787
- var g = ko(e, s), b = g[0], d = g[1], m = g[2], w = d - m - a * b;
4788
- (b || w) && So(e, s) && (p += w, v += b);
4789
- var y = s.parentNode;
4790
- s = y && y.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? y.host : y;
4799
+ var g = ko(e, s), x = g[0], f = g[1], m = g[2], w = f - m - a * x;
4800
+ (x || w) && So(e, s) && (p += w, v += x);
4801
+ var b = s.parentNode;
4802
+ s = b && b.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? b.host : b;
4791
4803
  } while (
4792
4804
  // portaled content
4793
4805
  !l && s !== document.body || // self content
4794
4806
  l && (t.contains(s) || t === s)
4795
4807
  );
4796
- return (f && Math.abs(p) < 1 || !f && Math.abs(v) < 1) && (c = !0), c;
4808
+ return (d && Math.abs(p) < 1 || !d && Math.abs(v) < 1) && (c = !0), c;
4797
4809
  }, At = function(e) {
4798
4810
  return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
4799
4811
  }, fr = function(e) {
@@ -4815,78 +4827,78 @@ function gc(e) {
4815
4827
  }, [e]), h.useEffect(function() {
4816
4828
  if (e.inert) {
4817
4829
  document.body.classList.add("block-interactivity-".concat(o));
4818
- var d = Bl([e.lockRef.current], (e.shards || []).map(pr), !0).filter(Boolean);
4819
- return d.forEach(function(m) {
4830
+ var f = Bl([e.lockRef.current], (e.shards || []).map(pr), !0).filter(Boolean);
4831
+ return f.forEach(function(m) {
4820
4832
  return m.classList.add("allow-interactivity-".concat(o));
4821
4833
  }), function() {
4822
- document.body.classList.remove("block-interactivity-".concat(o)), d.forEach(function(m) {
4834
+ document.body.classList.remove("block-interactivity-".concat(o)), f.forEach(function(m) {
4823
4835
  return m.classList.remove("allow-interactivity-".concat(o));
4824
4836
  });
4825
4837
  };
4826
4838
  }
4827
4839
  }, [e.inert, e.lockRef.current, e.shards]);
4828
- var s = h.useCallback(function(d, m) {
4829
- if ("touches" in d && d.touches.length === 2 || d.type === "wheel" && d.ctrlKey)
4840
+ var s = h.useCallback(function(f, m) {
4841
+ if ("touches" in f && f.touches.length === 2 || f.type === "wheel" && f.ctrlKey)
4830
4842
  return !i.current.allowPinchZoom;
4831
- var w = At(d), y = n.current, x = "deltaX" in d ? d.deltaX : y[0] - w[0], C = "deltaY" in d ? d.deltaY : y[1] - w[1], S, A = d.target, k = Math.abs(x) > Math.abs(C) ? "h" : "v";
4832
- if ("touches" in d && k === "h" && A.type === "range")
4843
+ var w = At(f), b = n.current, y = "deltaX" in f ? f.deltaX : b[0] - w[0], C = "deltaY" in f ? f.deltaY : b[1] - w[1], S, E = f.target, k = Math.abs(y) > Math.abs(C) ? "h" : "v";
4844
+ if ("touches" in f && k === "h" && E.type === "range")
4833
4845
  return !1;
4834
- var I = dr(k, A);
4846
+ var I = dr(k, E);
4835
4847
  if (!I)
4836
4848
  return !0;
4837
- if (I ? S = k : (S = k === "v" ? "h" : "v", I = dr(k, A)), !I)
4849
+ if (I ? S = k : (S = k === "v" ? "h" : "v", I = dr(k, E)), !I)
4838
4850
  return !1;
4839
- if (!r.current && "changedTouches" in d && (x || C) && (r.current = S), !S)
4851
+ if (!r.current && "changedTouches" in f && (y || C) && (r.current = S), !S)
4840
4852
  return !0;
4841
4853
  var D = r.current || S;
4842
- return pc(D, m, d, D === "h" ? x : C);
4843
- }, []), l = h.useCallback(function(d) {
4844
- var m = d;
4854
+ return pc(D, m, f, D === "h" ? y : C);
4855
+ }, []), l = h.useCallback(function(f) {
4856
+ var m = f;
4845
4857
  if (!(!Qe.length || Qe[Qe.length - 1] !== a)) {
4846
- var w = "deltaY" in m ? fr(m) : At(m), y = t.current.filter(function(S) {
4858
+ var w = "deltaY" in m ? fr(m) : At(m), b = t.current.filter(function(S) {
4847
4859
  return S.name === m.type && (S.target === m.target || m.target === S.shadowParent) && hc(S.delta, w);
4848
4860
  })[0];
4849
- if (y && y.should) {
4861
+ if (b && b.should) {
4850
4862
  m.cancelable && m.preventDefault();
4851
4863
  return;
4852
4864
  }
4853
- if (!y) {
4854
- var x = (i.current.shards || []).map(pr).filter(Boolean).filter(function(S) {
4865
+ if (!b) {
4866
+ var y = (i.current.shards || []).map(pr).filter(Boolean).filter(function(S) {
4855
4867
  return S.contains(m.target);
4856
- }), C = x.length > 0 ? s(m, x[0]) : !i.current.noIsolation;
4868
+ }), C = y.length > 0 ? s(m, y[0]) : !i.current.noIsolation;
4857
4869
  C && m.cancelable && m.preventDefault();
4858
4870
  }
4859
4871
  }
4860
- }, []), c = h.useCallback(function(d, m, w, y) {
4861
- var x = { name: d, delta: m, target: w, should: y, shadowParent: wc(w) };
4862
- t.current.push(x), setTimeout(function() {
4872
+ }, []), c = h.useCallback(function(f, m, w, b) {
4873
+ var y = { name: f, delta: m, target: w, should: b, shadowParent: wc(w) };
4874
+ t.current.push(y), setTimeout(function() {
4863
4875
  t.current = t.current.filter(function(C) {
4864
- return C !== x;
4876
+ return C !== y;
4865
4877
  });
4866
4878
  }, 1);
4867
- }, []), f = h.useCallback(function(d) {
4868
- n.current = At(d), r.current = void 0;
4869
- }, []), p = h.useCallback(function(d) {
4870
- c(d.type, fr(d), d.target, s(d, e.lockRef.current));
4871
- }, []), v = h.useCallback(function(d) {
4872
- c(d.type, At(d), d.target, s(d, e.lockRef.current));
4879
+ }, []), d = h.useCallback(function(f) {
4880
+ n.current = At(f), r.current = void 0;
4881
+ }, []), p = h.useCallback(function(f) {
4882
+ c(f.type, fr(f), f.target, s(f, e.lockRef.current));
4883
+ }, []), v = h.useCallback(function(f) {
4884
+ c(f.type, At(f), f.target, s(f, e.lockRef.current));
4873
4885
  }, []);
4874
4886
  h.useEffect(function() {
4875
4887
  return Qe.push(a), e.setCallbacks({
4876
4888
  onScrollCapture: p,
4877
4889
  onWheelCapture: p,
4878
4890
  onTouchMoveCapture: v
4879
- }), document.addEventListener("wheel", l, qe), document.addEventListener("touchmove", l, qe), document.addEventListener("touchstart", f, qe), function() {
4880
- Qe = Qe.filter(function(d) {
4881
- return d !== a;
4882
- }), document.removeEventListener("wheel", l, qe), document.removeEventListener("touchmove", l, qe), document.removeEventListener("touchstart", f, qe);
4891
+ }), document.addEventListener("wheel", l, qe), document.addEventListener("touchmove", l, qe), document.addEventListener("touchstart", d, qe), function() {
4892
+ Qe = Qe.filter(function(f) {
4893
+ return f !== a;
4894
+ }), document.removeEventListener("wheel", l, qe), document.removeEventListener("touchmove", l, qe), document.removeEventListener("touchstart", d, qe);
4883
4895
  };
4884
4896
  }, []);
4885
- var g = e.removeScrollBar, b = e.inert;
4897
+ var g = e.removeScrollBar, x = e.inert;
4886
4898
  return h.createElement(
4887
4899
  h.Fragment,
4888
4900
  null,
4889
- b ? h.createElement(a, { styles: vc(o) }) : null,
4901
+ x ? h.createElement(a, { styles: vc(o) }) : null,
4890
4902
  g ? h.createElement(ic, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
4891
4903
  );
4892
4904
  }
@@ -4914,12 +4926,12 @@ var xc = [" ", "Enter", "ArrowUp", "ArrowDown"], yc = [" ", "Enter"], Ke = "Sele
4914
4926
  defaultValue: s,
4915
4927
  onValueChange: l,
4916
4928
  dir: c,
4917
- name: f,
4929
+ name: d,
4918
4930
  autoComplete: p,
4919
4931
  disabled: v,
4920
4932
  required: g,
4921
- form: b
4922
- } = e, d = Yt(t), [m, w] = h.useState(null), [y, x] = h.useState(null), [C, S] = h.useState(!1), A = Fi(c), [k, I] = lr({
4933
+ form: x
4934
+ } = e, f = Yt(t), [m, w] = h.useState(null), [b, y] = h.useState(null), [C, S] = h.useState(!1), E = Fi(c), [k, I] = lr({
4923
4935
  prop: r,
4924
4936
  defaultProp: o ?? !1,
4925
4937
  onChange: a,
@@ -4929,16 +4941,16 @@ var xc = [" ", "Enter", "ArrowUp", "ArrowDown"], yc = [" ", "Enter"], Ke = "Sele
4929
4941
  defaultProp: s,
4930
4942
  onChange: l,
4931
4943
  caller: Ke
4932
- }), $ = h.useRef(null), W = m ? b || !!m.closest("form") : !0, [N, T] = h.useState(/* @__PURE__ */ new Set()), B = Array.from(N).map((O) => O.props.value).join(";");
4933
- return /* @__PURE__ */ E(Sl, { ...d, children: /* @__PURE__ */ Nt(
4944
+ }), $ = h.useRef(null), W = m ? x || !!m.closest("form") : !0, [F, N] = h.useState(/* @__PURE__ */ new Set()), _ = Array.from(F).map((O) => O.props.value).join(";");
4945
+ return /* @__PURE__ */ T(Sl, { ...f, children: /* @__PURE__ */ Nt(
4934
4946
  Sc,
4935
4947
  {
4936
4948
  required: g,
4937
4949
  scope: t,
4938
4950
  trigger: m,
4939
4951
  onTriggerChange: w,
4940
- valueNode: y,
4941
- onValueNodeChange: x,
4952
+ valueNode: b,
4953
+ onValueNodeChange: y,
4942
4954
  valueNodeHasChildren: C,
4943
4955
  onValueNodeHasChildrenChange: S,
4944
4956
  contentId: _n(),
@@ -4946,19 +4958,19 @@ var xc = [" ", "Enter", "ArrowUp", "ArrowDown"], yc = [" ", "Enter"], Ke = "Sele
4946
4958
  onValueChange: L,
4947
4959
  open: k,
4948
4960
  onOpenChange: I,
4949
- dir: A,
4961
+ dir: E,
4950
4962
  triggerPointerDownPosRef: $,
4951
4963
  disabled: v,
4952
4964
  children: [
4953
- /* @__PURE__ */ E(Ut.Provider, { scope: t, children: /* @__PURE__ */ E(
4965
+ /* @__PURE__ */ T(Ut.Provider, { scope: t, children: /* @__PURE__ */ T(
4954
4966
  kc,
4955
4967
  {
4956
4968
  scope: e.__scopeSelect,
4957
4969
  onNativeOptionAdd: h.useCallback((O) => {
4958
- T((M) => new Set(M).add(O));
4970
+ N((M) => new Set(M).add(O));
4959
4971
  }, []),
4960
4972
  onNativeOptionRemove: h.useCallback((O) => {
4961
- T((M) => {
4973
+ N((M) => {
4962
4974
  const P = new Set(M);
4963
4975
  return P.delete(O), P;
4964
4976
  });
@@ -4972,18 +4984,18 @@ var xc = [" ", "Enter", "ArrowUp", "ArrowDown"], yc = [" ", "Enter"], Ke = "Sele
4972
4984
  "aria-hidden": !0,
4973
4985
  required: g,
4974
4986
  tabIndex: -1,
4975
- name: f,
4987
+ name: d,
4976
4988
  autoComplete: p,
4977
4989
  value: D,
4978
4990
  onChange: (O) => L(O.target.value),
4979
4991
  disabled: v,
4980
- form: b,
4992
+ form: x,
4981
4993
  children: [
4982
- D === void 0 ? /* @__PURE__ */ E("option", { value: "" }) : null,
4983
- Array.from(N)
4994
+ D === void 0 ? /* @__PURE__ */ T("option", { value: "" }) : null,
4995
+ Array.from(F)
4984
4996
  ]
4985
4997
  },
4986
- B
4998
+ _
4987
4999
  ) : null
4988
5000
  ]
4989
5001
  }
@@ -4992,16 +5004,16 @@ var xc = [" ", "Enter", "ArrowUp", "ArrowDown"], yc = [" ", "Enter"], Ke = "Sele
4992
5004
  To.displayName = Ke;
4993
5005
  var Ao = "SelectTrigger", _o = h.forwardRef(
4994
5006
  (e, t) => {
4995
- const { __scopeSelect: n, disabled: r = !1, ...o } = e, a = Yt(n), i = $e(Ao, n), s = i.disabled || r, l = te(t, i.onTriggerChange), c = jt(n), f = h.useRef("touch"), [p, v, g] = Zo((d) => {
4996
- const m = c().filter((x) => !x.disabled), w = m.find((x) => x.value === i.value), y = Go(m, d, w);
4997
- y !== void 0 && i.onValueChange(y.value);
4998
- }), b = (d) => {
4999
- s || (i.onOpenChange(!0), g()), d && (i.triggerPointerDownPosRef.current = {
5000
- x: Math.round(d.pageX),
5001
- y: Math.round(d.pageY)
5007
+ const { __scopeSelect: n, disabled: r = !1, ...o } = e, a = Yt(n), i = $e(Ao, n), s = i.disabled || r, l = ne(t, i.onTriggerChange), c = jt(n), d = h.useRef("touch"), [p, v, g] = Zo((f) => {
5008
+ const m = c().filter((y) => !y.disabled), w = m.find((y) => y.value === i.value), b = Go(m, f, w);
5009
+ b !== void 0 && i.onValueChange(b.value);
5010
+ }), x = (f) => {
5011
+ s || (i.onOpenChange(!0), g()), f && (i.triggerPointerDownPosRef.current = {
5012
+ x: Math.round(f.pageX),
5013
+ y: Math.round(f.pageY)
5002
5014
  });
5003
5015
  };
5004
- return /* @__PURE__ */ E(kl, { asChild: !0, ...a, children: /* @__PURE__ */ E(
5016
+ return /* @__PURE__ */ T(kl, { asChild: !0, ...a, children: /* @__PURE__ */ T(
5005
5017
  X.button,
5006
5018
  {
5007
5019
  type: "button",
@@ -5017,17 +5029,17 @@ var Ao = "SelectTrigger", _o = h.forwardRef(
5017
5029
  "data-placeholder": Xo(i.value) ? "" : void 0,
5018
5030
  ...o,
5019
5031
  ref: l,
5020
- onClick: Z(o.onClick, (d) => {
5021
- d.currentTarget.focus(), f.current !== "mouse" && b(d);
5032
+ onClick: Z(o.onClick, (f) => {
5033
+ f.currentTarget.focus(), d.current !== "mouse" && x(f);
5022
5034
  }),
5023
- onPointerDown: Z(o.onPointerDown, (d) => {
5024
- f.current = d.pointerType;
5025
- const m = d.target;
5026
- m.hasPointerCapture(d.pointerId) && m.releasePointerCapture(d.pointerId), d.button === 0 && d.ctrlKey === !1 && d.pointerType === "mouse" && (b(d), d.preventDefault());
5035
+ onPointerDown: Z(o.onPointerDown, (f) => {
5036
+ d.current = f.pointerType;
5037
+ const m = f.target;
5038
+ m.hasPointerCapture(f.pointerId) && m.releasePointerCapture(f.pointerId), f.button === 0 && f.ctrlKey === !1 && f.pointerType === "mouse" && (x(f), f.preventDefault());
5027
5039
  }),
5028
- onKeyDown: Z(o.onKeyDown, (d) => {
5040
+ onKeyDown: Z(o.onKeyDown, (f) => {
5029
5041
  const m = p.current !== "";
5030
- !(d.ctrlKey || d.altKey || d.metaKey) && d.key.length === 1 && v(d.key), !(m && d.key === " ") && xc.includes(d.key) && (b(), d.preventDefault());
5042
+ !(f.ctrlKey || f.altKey || f.metaKey) && f.key.length === 1 && v(f.key), !(m && f.key === " ") && xc.includes(f.key) && (x(), f.preventDefault());
5031
5043
  })
5032
5044
  }
5033
5045
  ) });
@@ -5036,16 +5048,16 @@ var Ao = "SelectTrigger", _o = h.forwardRef(
5036
5048
  _o.displayName = Ao;
5037
5049
  var Po = "SelectValue", Tc = h.forwardRef(
5038
5050
  (e, t) => {
5039
- const { __scopeSelect: n, className: r, style: o, children: a, placeholder: i = "", ...s } = e, l = $e(Po, n), { onValueNodeHasChildrenChange: c } = l, f = a !== void 0, p = te(t, l.onValueNodeChange);
5051
+ const { __scopeSelect: n, className: r, style: o, children: a, placeholder: i = "", ...s } = e, l = $e(Po, n), { onValueNodeHasChildrenChange: c } = l, d = a !== void 0, p = ne(t, l.onValueNodeChange);
5040
5052
  return se(() => {
5041
- c(f);
5042
- }, [c, f]), /* @__PURE__ */ E(
5053
+ c(d);
5054
+ }, [c, d]), /* @__PURE__ */ T(
5043
5055
  X.span,
5044
5056
  {
5045
5057
  ...s,
5046
5058
  ref: p,
5047
5059
  style: { pointerEvents: "none" },
5048
- children: Xo(l.value) ? /* @__PURE__ */ E(gn, { children: i }) : a
5060
+ children: Xo(l.value) ? /* @__PURE__ */ T(gn, { children: i }) : a
5049
5061
  }
5050
5062
  );
5051
5063
  }
@@ -5054,11 +5066,11 @@ Tc.displayName = Po;
5054
5066
  var Ac = "SelectIcon", Ro = h.forwardRef(
5055
5067
  (e, t) => {
5056
5068
  const { __scopeSelect: n, children: r, ...o } = e;
5057
- return /* @__PURE__ */ E(X.span, { "aria-hidden": !0, ...o, ref: t, children: r || "▼" });
5069
+ return /* @__PURE__ */ T(X.span, { "aria-hidden": !0, ...o, ref: t, children: r || "▼" });
5058
5070
  }
5059
5071
  );
5060
5072
  Ro.displayName = Ac;
5061
- var _c = "SelectPortal", Io = (e) => /* @__PURE__ */ E(vo, { asChild: !0, ...e });
5073
+ var _c = "SelectPortal", Io = (e) => /* @__PURE__ */ T(vo, { asChild: !0, ...e });
5062
5074
  Io.displayName = _c;
5063
5075
  var Xe = "SelectContent", No = h.forwardRef(
5064
5076
  (e, t) => {
@@ -5068,11 +5080,11 @@ var Xe = "SelectContent", No = h.forwardRef(
5068
5080
  }, []), !n.open) {
5069
5081
  const a = r;
5070
5082
  return a ? h.createPortal(
5071
- /* @__PURE__ */ E(Oo, { scope: e.__scopeSelect, children: /* @__PURE__ */ E(Ut.Slot, { scope: e.__scopeSelect, children: /* @__PURE__ */ E("div", { children: e.children }) }) }),
5083
+ /* @__PURE__ */ T(Oo, { scope: e.__scopeSelect, children: /* @__PURE__ */ T(Ut.Slot, { scope: e.__scopeSelect, children: /* @__PURE__ */ T("div", { children: e.children }) }) }),
5072
5084
  a
5073
5085
  ) : null;
5074
5086
  }
5075
- return /* @__PURE__ */ E(Lo, { ...e, ref: t });
5087
+ return /* @__PURE__ */ T(Lo, { ...e, ref: t });
5076
5088
  }
5077
5089
  );
5078
5090
  No.displayName = Xe;
@@ -5089,38 +5101,38 @@ var pe = 10, [Oo, We] = ct(Xe), Pc = "SelectContentImpl", Rc = /* @__PURE__ */ g
5089
5101
  side: s,
5090
5102
  sideOffset: l,
5091
5103
  align: c,
5092
- alignOffset: f,
5104
+ alignOffset: d,
5093
5105
  arrowPadding: p,
5094
5106
  collisionBoundary: v,
5095
5107
  collisionPadding: g,
5096
- sticky: b,
5097
- hideWhenDetached: d,
5108
+ sticky: x,
5109
+ hideWhenDetached: f,
5098
5110
  avoidCollisions: m,
5099
5111
  //
5100
5112
  ...w
5101
- } = e, y = $e(Xe, n), [x, C] = h.useState(null), [S, A] = h.useState(null), k = te(t, (R) => C(R)), [I, D] = h.useState(null), [L, $] = h.useState(
5113
+ } = e, b = $e(Xe, n), [y, C] = h.useState(null), [S, E] = h.useState(null), k = ne(t, (R) => C(R)), [I, D] = h.useState(null), [L, $] = h.useState(
5102
5114
  null
5103
- ), W = jt(n), [N, T] = h.useState(!1), B = h.useRef(!1);
5115
+ ), W = jt(n), [F, N] = h.useState(!1), _ = h.useRef(!1);
5104
5116
  h.useEffect(() => {
5105
- if (x) return Fl(x);
5106
- }, [x]), Xi();
5117
+ if (y) return Fl(y);
5118
+ }, [y]), Xi();
5107
5119
  const O = h.useCallback(
5108
5120
  (R) => {
5109
- const [K, ...ne] = W().map((U) => U.ref.current), [j] = ne.slice(-1), H = document.activeElement;
5121
+ const [K, ...re] = W().map((U) => U.ref.current), [j] = re.slice(-1), H = document.activeElement;
5110
5122
  for (const U of R)
5111
5123
  if (U === H || (U == null || U.scrollIntoView({ block: "nearest" }), U === K && S && (S.scrollTop = 0), U === j && S && (S.scrollTop = S.scrollHeight), U == null || U.focus(), document.activeElement !== H)) return;
5112
5124
  },
5113
5125
  [W, S]
5114
5126
  ), M = h.useCallback(
5115
- () => O([I, x]),
5116
- [O, I, x]
5127
+ () => O([I, y]),
5128
+ [O, I, y]
5117
5129
  );
5118
5130
  h.useEffect(() => {
5119
- N && M();
5120
- }, [N, M]);
5121
- const { onOpenChange: P, triggerPointerDownPosRef: z } = y;
5131
+ F && M();
5132
+ }, [F, M]);
5133
+ const { onOpenChange: P, triggerPointerDownPosRef: z } = b;
5122
5134
  h.useEffect(() => {
5123
- if (x) {
5135
+ if (y) {
5124
5136
  let R = { x: 0, y: 0 };
5125
5137
  const K = (j) => {
5126
5138
  var H, U;
@@ -5128,53 +5140,53 @@ var pe = 10, [Oo, We] = ct(Xe), Pc = "SelectContentImpl", Rc = /* @__PURE__ */ g
5128
5140
  x: Math.abs(Math.round(j.pageX) - (((H = z.current) == null ? void 0 : H.x) ?? 0)),
5129
5141
  y: Math.abs(Math.round(j.pageY) - (((U = z.current) == null ? void 0 : U.y) ?? 0))
5130
5142
  };
5131
- }, ne = (j) => {
5132
- R.x <= 10 && R.y <= 10 ? j.preventDefault() : x.contains(j.target) || P(!1), document.removeEventListener("pointermove", K), z.current = null;
5143
+ }, re = (j) => {
5144
+ R.x <= 10 && R.y <= 10 ? j.preventDefault() : y.contains(j.target) || P(!1), document.removeEventListener("pointermove", K), z.current = null;
5133
5145
  };
5134
- return z.current !== null && (document.addEventListener("pointermove", K), document.addEventListener("pointerup", ne, { capture: !0, once: !0 })), () => {
5135
- document.removeEventListener("pointermove", K), document.removeEventListener("pointerup", ne, { capture: !0 });
5146
+ return z.current !== null && (document.addEventListener("pointermove", K), document.addEventListener("pointerup", re, { capture: !0, once: !0 })), () => {
5147
+ document.removeEventListener("pointermove", K), document.removeEventListener("pointerup", re, { capture: !0 });
5136
5148
  };
5137
5149
  }
5138
- }, [x, P, z]), h.useEffect(() => {
5150
+ }, [y, P, z]), h.useEffect(() => {
5139
5151
  const R = () => P(!1);
5140
5152
  return window.addEventListener("blur", R), window.addEventListener("resize", R), () => {
5141
5153
  window.removeEventListener("blur", R), window.removeEventListener("resize", R);
5142
5154
  };
5143
5155
  }, [P]);
5144
- const [ie, Pe] = Zo((R) => {
5145
- const K = W().filter((H) => !H.disabled), ne = K.find((H) => H.ref.current === document.activeElement), j = Go(K, R, ne);
5156
+ const [Q, Pe] = Zo((R) => {
5157
+ const K = W().filter((H) => !H.disabled), re = K.find((H) => H.ref.current === document.activeElement), j = Go(K, R, re);
5146
5158
  j && setTimeout(() => j.ref.current.focus());
5147
5159
  }), ut = h.useCallback(
5148
- (R, K, ne) => {
5149
- const j = !B.current && !ne;
5150
- (y.value !== void 0 && y.value === K || j) && (D(R), j && (B.current = !0));
5160
+ (R, K, re) => {
5161
+ const j = !_.current && !re;
5162
+ (b.value !== void 0 && b.value === K || j) && (D(R), j && (_.current = !0));
5151
5163
  },
5152
- [y.value]
5153
- ), dt = h.useCallback(() => x == null ? void 0 : x.focus(), [x]), Me = h.useCallback(
5154
- (R, K, ne) => {
5155
- const j = !B.current && !ne;
5156
- (y.value !== void 0 && y.value === K || j) && $(R);
5164
+ [b.value]
5165
+ ), dt = h.useCallback(() => y == null ? void 0 : y.focus(), [y]), Me = h.useCallback(
5166
+ (R, K, re) => {
5167
+ const j = !_.current && !re;
5168
+ (b.value !== void 0 && b.value === K || j) && $(R);
5157
5169
  },
5158
- [y.value]
5170
+ [b.value]
5159
5171
  ), Ze = r === "popper" ? fn : Mo, He = Ze === fn ? {
5160
5172
  side: s,
5161
5173
  sideOffset: l,
5162
5174
  align: c,
5163
- alignOffset: f,
5175
+ alignOffset: d,
5164
5176
  arrowPadding: p,
5165
5177
  collisionBoundary: v,
5166
5178
  collisionPadding: g,
5167
- sticky: b,
5168
- hideWhenDetached: d,
5179
+ sticky: x,
5180
+ hideWhenDetached: f,
5169
5181
  avoidCollisions: m
5170
5182
  } : {};
5171
- return /* @__PURE__ */ E(
5183
+ return /* @__PURE__ */ T(
5172
5184
  Oo,
5173
5185
  {
5174
5186
  scope: n,
5175
- content: x,
5187
+ content: y,
5176
5188
  viewport: S,
5177
- onViewportChange: A,
5189
+ onViewportChange: E,
5178
5190
  itemRefCallback: ut,
5179
5191
  selectedItem: I,
5180
5192
  onItemLeave: dt,
@@ -5182,21 +5194,21 @@ var pe = 10, [Oo, We] = ct(Xe), Pc = "SelectContentImpl", Rc = /* @__PURE__ */ g
5182
5194
  focusSelectedItem: M,
5183
5195
  selectedItemText: L,
5184
5196
  position: r,
5185
- isPositioned: N,
5186
- searchRef: ie,
5187
- children: /* @__PURE__ */ E(Eo, { as: Rc, allowPinchZoom: !0, children: /* @__PURE__ */ E(
5197
+ isPositioned: F,
5198
+ searchRef: Q,
5199
+ children: /* @__PURE__ */ T(Eo, { as: Rc, allowPinchZoom: !0, children: /* @__PURE__ */ T(
5188
5200
  Ur,
5189
5201
  {
5190
5202
  asChild: !0,
5191
- trapped: y.open,
5203
+ trapped: b.open,
5192
5204
  onMountAutoFocus: (R) => {
5193
5205
  R.preventDefault();
5194
5206
  },
5195
5207
  onUnmountAutoFocus: Z(o, (R) => {
5196
5208
  var K;
5197
- (K = y.trigger) == null || K.focus({ preventScroll: !0 }), R.preventDefault();
5209
+ (K = b.trigger) == null || K.focus({ preventScroll: !0 }), R.preventDefault();
5198
5210
  }),
5199
- children: /* @__PURE__ */ E(
5211
+ children: /* @__PURE__ */ T(
5200
5212
  Wr,
5201
5213
  {
5202
5214
  asChild: !0,
@@ -5204,18 +5216,18 @@ var pe = 10, [Oo, We] = ct(Xe), Pc = "SelectContentImpl", Rc = /* @__PURE__ */ g
5204
5216
  onEscapeKeyDown: a,
5205
5217
  onPointerDownOutside: i,
5206
5218
  onFocusOutside: (R) => R.preventDefault(),
5207
- onDismiss: () => y.onOpenChange(!1),
5208
- children: /* @__PURE__ */ E(
5219
+ onDismiss: () => b.onOpenChange(!1),
5220
+ children: /* @__PURE__ */ T(
5209
5221
  Ze,
5210
5222
  {
5211
5223
  role: "listbox",
5212
- id: y.contentId,
5213
- "data-state": y.open ? "open" : "closed",
5214
- dir: y.dir,
5224
+ id: b.contentId,
5225
+ "data-state": b.open ? "open" : "closed",
5226
+ dir: b.dir,
5215
5227
  onContextMenu: (R) => R.preventDefault(),
5216
5228
  ...w,
5217
5229
  ...He,
5218
- onPlaced: () => T(!0),
5230
+ onPlaced: () => N(!0),
5219
5231
  ref: k,
5220
5232
  style: {
5221
5233
  // flex layout so we can place the scroll buttons properly
@@ -5248,8 +5260,8 @@ var pe = 10, [Oo, We] = ct(Xe), Pc = "SelectContentImpl", Rc = /* @__PURE__ */ g
5248
5260
  );
5249
5261
  Lo.displayName = Pc;
5250
5262
  var Ic = "SelectItemAlignedPosition", Mo = h.forwardRef((e, t) => {
5251
- const { __scopeSelect: n, onPlaced: r, ...o } = e, a = $e(Xe, n), i = We(Xe, n), [s, l] = h.useState(null), [c, f] = h.useState(null), p = te(t, (k) => f(k)), v = jt(n), g = h.useRef(!1), b = h.useRef(!0), { viewport: d, selectedItem: m, selectedItemText: w, focusSelectedItem: y } = i, x = h.useCallback(() => {
5252
- if (a.trigger && a.valueNode && s && c && d && m && w) {
5263
+ const { __scopeSelect: n, onPlaced: r, ...o } = e, a = $e(Xe, n), i = We(Xe, n), [s, l] = h.useState(null), [c, d] = h.useState(null), p = ne(t, (k) => d(k)), v = jt(n), g = h.useRef(!1), x = h.useRef(!0), { viewport: f, selectedItem: m, selectedItemText: w, focusSelectedItem: b } = i, y = h.useCallback(() => {
5264
+ if (a.trigger && a.valueNode && s && c && f && m && w) {
5253
5265
  const k = a.trigger.getBoundingClientRect(), I = c.getBoundingClientRect(), D = a.valueNode.getBoundingClientRect(), L = w.getBoundingClientRect();
5254
5266
  if (a.dir !== "rtl") {
5255
5267
  const H = L.left - I.left, U = D.left - H, le = k.left - U, we = k.width + le, ft = Math.max(we, I.width), pt = window.innerWidth - pe, ht = Un(U, [
@@ -5269,11 +5281,11 @@ var Ic = "SelectItemAlignedPosition", Mo = h.forwardRef((e, t) => {
5269
5281
  ]);
5270
5282
  s.style.minWidth = we + "px", s.style.right = ht + "px";
5271
5283
  }
5272
- const $ = v(), W = window.innerHeight - pe * 2, N = d.scrollHeight, T = window.getComputedStyle(c), B = parseInt(T.borderTopWidth, 10), O = parseInt(T.paddingTop, 10), M = parseInt(T.borderBottomWidth, 10), P = parseInt(T.paddingBottom, 10), z = B + O + N + P + M, ie = Math.min(m.offsetHeight * 5, z), Pe = window.getComputedStyle(d), ut = parseInt(Pe.paddingTop, 10), dt = parseInt(Pe.paddingBottom, 10), Me = k.top + k.height / 2 - pe, Ze = W - Me, He = m.offsetHeight / 2, R = m.offsetTop + He, K = B + O + R, ne = z - K;
5284
+ const $ = v(), W = window.innerHeight - pe * 2, F = f.scrollHeight, N = window.getComputedStyle(c), _ = parseInt(N.borderTopWidth, 10), O = parseInt(N.paddingTop, 10), M = parseInt(N.borderBottomWidth, 10), P = parseInt(N.paddingBottom, 10), z = _ + O + F + P + M, Q = Math.min(m.offsetHeight * 5, z), Pe = window.getComputedStyle(f), ut = parseInt(Pe.paddingTop, 10), dt = parseInt(Pe.paddingBottom, 10), Me = k.top + k.height / 2 - pe, Ze = W - Me, He = m.offsetHeight / 2, R = m.offsetTop + He, K = _ + O + R, re = z - K;
5273
5285
  if (K <= Me) {
5274
5286
  const H = $.length > 0 && m === $[$.length - 1].ref.current;
5275
5287
  s.style.bottom = "0px";
5276
- const U = c.clientHeight - d.offsetTop - d.offsetHeight, le = Math.max(
5288
+ const U = c.clientHeight - f.offsetTop - f.offsetHeight, le = Math.max(
5277
5289
  Ze,
5278
5290
  He + // viewport might have padding bottom, include it to avoid a scrollable viewport
5279
5291
  (H ? dt : 0) + U + M
@@ -5284,12 +5296,12 @@ var Ic = "SelectItemAlignedPosition", Mo = h.forwardRef((e, t) => {
5284
5296
  s.style.top = "0px";
5285
5297
  const le = Math.max(
5286
5298
  Me,
5287
- B + d.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
5299
+ _ + f.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
5288
5300
  (H ? ut : 0) + He
5289
- ) + ne;
5290
- s.style.height = le + "px", d.scrollTop = K - Me + d.offsetTop;
5301
+ ) + re;
5302
+ s.style.height = le + "px", f.scrollTop = K - Me + f.offsetTop;
5291
5303
  }
5292
- s.style.margin = `${pe}px 0`, s.style.minHeight = ie + "px", s.style.maxHeight = W + "px", r == null || r(), requestAnimationFrame(() => g.current = !0);
5304
+ s.style.margin = `${pe}px 0`, s.style.minHeight = Q + "px", s.style.maxHeight = W + "px", r == null || r(), requestAnimationFrame(() => g.current = !0);
5293
5305
  }
5294
5306
  }, [
5295
5307
  v,
@@ -5297,31 +5309,31 @@ var Ic = "SelectItemAlignedPosition", Mo = h.forwardRef((e, t) => {
5297
5309
  a.valueNode,
5298
5310
  s,
5299
5311
  c,
5300
- d,
5312
+ f,
5301
5313
  m,
5302
5314
  w,
5303
5315
  a.dir,
5304
5316
  r
5305
5317
  ]);
5306
- se(() => x(), [x]);
5318
+ se(() => y(), [y]);
5307
5319
  const [C, S] = h.useState();
5308
5320
  se(() => {
5309
5321
  c && S(window.getComputedStyle(c).zIndex);
5310
5322
  }, [c]);
5311
- const A = h.useCallback(
5323
+ const E = h.useCallback(
5312
5324
  (k) => {
5313
- k && b.current === !0 && (x(), y == null || y(), b.current = !1);
5325
+ k && x.current === !0 && (y(), b == null || b(), x.current = !1);
5314
5326
  },
5315
- [x, y]
5327
+ [y, b]
5316
5328
  );
5317
- return /* @__PURE__ */ E(
5329
+ return /* @__PURE__ */ T(
5318
5330
  Oc,
5319
5331
  {
5320
5332
  scope: n,
5321
5333
  contentWrapper: s,
5322
5334
  shouldExpandOnScrollRef: g,
5323
- onScrollButtonChange: A,
5324
- children: /* @__PURE__ */ E(
5335
+ onScrollButtonChange: E,
5336
+ children: /* @__PURE__ */ T(
5325
5337
  "div",
5326
5338
  {
5327
5339
  ref: l,
@@ -5331,7 +5343,7 @@ var Ic = "SelectItemAlignedPosition", Mo = h.forwardRef((e, t) => {
5331
5343
  position: "fixed",
5332
5344
  zIndex: C
5333
5345
  },
5334
- children: /* @__PURE__ */ E(
5346
+ children: /* @__PURE__ */ T(
5335
5347
  X.div,
5336
5348
  {
5337
5349
  ...o,
@@ -5359,7 +5371,7 @@ var Nc = "SelectPopperPosition", fn = h.forwardRef((e, t) => {
5359
5371
  collisionPadding: o = pe,
5360
5372
  ...a
5361
5373
  } = e, i = Yt(n);
5362
- return /* @__PURE__ */ E(
5374
+ return /* @__PURE__ */ T(
5363
5375
  El,
5364
5376
  {
5365
5377
  ...i,
@@ -5383,9 +5395,9 @@ var Nc = "SelectPopperPosition", fn = h.forwardRef((e, t) => {
5383
5395
  fn.displayName = Nc;
5384
5396
  var [Oc, Bn] = ct(Xe, {}), pn = "SelectViewport", Do = h.forwardRef(
5385
5397
  (e, t) => {
5386
- const { __scopeSelect: n, nonce: r, ...o } = e, a = We(pn, n), i = Bn(pn, n), s = te(t, a.onViewportChange), l = h.useRef(0);
5398
+ const { __scopeSelect: n, nonce: r, ...o } = e, a = We(pn, n), i = Bn(pn, n), s = ne(t, a.onViewportChange), l = h.useRef(0);
5387
5399
  return /* @__PURE__ */ Nt(gn, { children: [
5388
- /* @__PURE__ */ E(
5400
+ /* @__PURE__ */ T(
5389
5401
  "style",
5390
5402
  {
5391
5403
  dangerouslySetInnerHTML: {
@@ -5394,7 +5406,7 @@ var [Oc, Bn] = ct(Xe, {}), pn = "SelectViewport", Do = h.forwardRef(
5394
5406
  nonce: r
5395
5407
  }
5396
5408
  ),
5397
- /* @__PURE__ */ E(Ut.Slot, { scope: n, children: /* @__PURE__ */ E(
5409
+ /* @__PURE__ */ T(Ut.Slot, { scope: n, children: /* @__PURE__ */ T(
5398
5410
  X.div,
5399
5411
  {
5400
5412
  "data-radix-select-viewport": "",
@@ -5415,18 +5427,18 @@ var [Oc, Bn] = ct(Xe, {}), pn = "SelectViewport", Do = h.forwardRef(
5415
5427
  ...o.style
5416
5428
  },
5417
5429
  onScroll: Z(o.onScroll, (c) => {
5418
- const f = c.currentTarget, { contentWrapper: p, shouldExpandOnScrollRef: v } = i;
5430
+ const d = c.currentTarget, { contentWrapper: p, shouldExpandOnScrollRef: v } = i;
5419
5431
  if (v != null && v.current && p) {
5420
- const g = Math.abs(l.current - f.scrollTop);
5432
+ const g = Math.abs(l.current - d.scrollTop);
5421
5433
  if (g > 0) {
5422
- const b = window.innerHeight - pe * 2, d = parseFloat(p.style.minHeight), m = parseFloat(p.style.height), w = Math.max(d, m);
5423
- if (w < b) {
5424
- const y = w + g, x = Math.min(b, y), C = y - x;
5425
- p.style.height = x + "px", p.style.bottom === "0px" && (f.scrollTop = C > 0 ? C : 0, p.style.justifyContent = "flex-end");
5434
+ const x = window.innerHeight - pe * 2, f = parseFloat(p.style.minHeight), m = parseFloat(p.style.height), w = Math.max(f, m);
5435
+ if (w < x) {
5436
+ const b = w + g, y = Math.min(x, b), C = b - y;
5437
+ p.style.height = y + "px", p.style.bottom === "0px" && (d.scrollTop = C > 0 ? C : 0, p.style.justifyContent = "flex-end");
5426
5438
  }
5427
5439
  }
5428
5440
  }
5429
- l.current = f.scrollTop;
5441
+ l.current = d.scrollTop;
5430
5442
  })
5431
5443
  }
5432
5444
  ) })
@@ -5437,14 +5449,14 @@ Do.displayName = pn;
5437
5449
  var Fo = "SelectGroup", [Lc, Mc] = ct(Fo), Dc = h.forwardRef(
5438
5450
  (e, t) => {
5439
5451
  const { __scopeSelect: n, ...r } = e, o = _n();
5440
- return /* @__PURE__ */ E(Lc, { scope: n, id: o, children: /* @__PURE__ */ E(X.div, { role: "group", "aria-labelledby": o, ...r, ref: t }) });
5452
+ return /* @__PURE__ */ T(Lc, { scope: n, id: o, children: /* @__PURE__ */ T(X.div, { role: "group", "aria-labelledby": o, ...r, ref: t }) });
5441
5453
  }
5442
5454
  );
5443
5455
  Dc.displayName = Fo;
5444
5456
  var Bo = "SelectLabel", Fc = h.forwardRef(
5445
5457
  (e, t) => {
5446
5458
  const { __scopeSelect: n, ...r } = e, o = Mc(Bo, n);
5447
- return /* @__PURE__ */ E(X.div, { id: o.id, ...r, ref: t });
5459
+ return /* @__PURE__ */ T(X.div, { id: o.id, ...r, ref: t });
5448
5460
  }
5449
5461
  );
5450
5462
  Fc.displayName = Bo;
@@ -5456,42 +5468,42 @@ var Ft = "SelectItem", [Bc, zo] = ct(Ft), Vo = h.forwardRef(
5456
5468
  disabled: o = !1,
5457
5469
  textValue: a,
5458
5470
  ...i
5459
- } = e, s = $e(Ft, n), l = We(Ft, n), c = s.value === r, [f, p] = h.useState(a ?? ""), [v, g] = h.useState(!1), b = te(
5471
+ } = e, s = $e(Ft, n), l = We(Ft, n), c = s.value === r, [d, p] = h.useState(a ?? ""), [v, g] = h.useState(!1), x = ne(
5460
5472
  t,
5461
- (y) => {
5462
- var x;
5463
- return (x = l.itemRefCallback) == null ? void 0 : x.call(l, y, r, o);
5473
+ (b) => {
5474
+ var y;
5475
+ return (y = l.itemRefCallback) == null ? void 0 : y.call(l, b, r, o);
5464
5476
  }
5465
- ), d = _n(), m = h.useRef("touch"), w = () => {
5477
+ ), f = _n(), m = h.useRef("touch"), w = () => {
5466
5478
  o || (s.onValueChange(r), s.onOpenChange(!1));
5467
5479
  };
5468
5480
  if (r === "")
5469
5481
  throw new Error(
5470
5482
  "A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder."
5471
5483
  );
5472
- return /* @__PURE__ */ E(
5484
+ return /* @__PURE__ */ T(
5473
5485
  Bc,
5474
5486
  {
5475
5487
  scope: n,
5476
5488
  value: r,
5477
5489
  disabled: o,
5478
- textId: d,
5490
+ textId: f,
5479
5491
  isSelected: c,
5480
- onItemTextChange: h.useCallback((y) => {
5481
- p((x) => x || ((y == null ? void 0 : y.textContent) ?? "").trim());
5492
+ onItemTextChange: h.useCallback((b) => {
5493
+ p((y) => y || ((b == null ? void 0 : b.textContent) ?? "").trim());
5482
5494
  }, []),
5483
- children: /* @__PURE__ */ E(
5495
+ children: /* @__PURE__ */ T(
5484
5496
  Ut.ItemSlot,
5485
5497
  {
5486
5498
  scope: n,
5487
5499
  value: r,
5488
5500
  disabled: o,
5489
- textValue: f,
5490
- children: /* @__PURE__ */ E(
5501
+ textValue: d,
5502
+ children: /* @__PURE__ */ T(
5491
5503
  X.div,
5492
5504
  {
5493
5505
  role: "option",
5494
- "aria-labelledby": d,
5506
+ "aria-labelledby": f,
5495
5507
  "data-highlighted": v ? "" : void 0,
5496
5508
  "aria-selected": c && v,
5497
5509
  "data-state": c ? "checked" : "unchecked",
@@ -5499,7 +5511,7 @@ var Ft = "SelectItem", [Bc, zo] = ct(Ft), Vo = h.forwardRef(
5499
5511
  "data-disabled": o ? "" : void 0,
5500
5512
  tabIndex: o ? void 0 : -1,
5501
5513
  ...i,
5502
- ref: b,
5514
+ ref: x,
5503
5515
  onFocus: Z(i.onFocus, () => g(!0)),
5504
5516
  onBlur: Z(i.onBlur, () => g(!1)),
5505
5517
  onClick: Z(i.onClick, () => {
@@ -5508,20 +5520,20 @@ var Ft = "SelectItem", [Bc, zo] = ct(Ft), Vo = h.forwardRef(
5508
5520
  onPointerUp: Z(i.onPointerUp, () => {
5509
5521
  m.current === "mouse" && w();
5510
5522
  }),
5511
- onPointerDown: Z(i.onPointerDown, (y) => {
5512
- m.current = y.pointerType;
5523
+ onPointerDown: Z(i.onPointerDown, (b) => {
5524
+ m.current = b.pointerType;
5513
5525
  }),
5514
- onPointerMove: Z(i.onPointerMove, (y) => {
5515
- var x;
5516
- m.current = y.pointerType, o ? (x = l.onItemLeave) == null || x.call(l) : m.current === "mouse" && y.currentTarget.focus({ preventScroll: !0 });
5526
+ onPointerMove: Z(i.onPointerMove, (b) => {
5527
+ var y;
5528
+ m.current = b.pointerType, o ? (y = l.onItemLeave) == null || y.call(l) : m.current === "mouse" && b.currentTarget.focus({ preventScroll: !0 });
5517
5529
  }),
5518
- onPointerLeave: Z(i.onPointerLeave, (y) => {
5519
- var x;
5520
- y.currentTarget === document.activeElement && ((x = l.onItemLeave) == null || x.call(l));
5530
+ onPointerLeave: Z(i.onPointerLeave, (b) => {
5531
+ var y;
5532
+ b.currentTarget === document.activeElement && ((y = l.onItemLeave) == null || y.call(l));
5521
5533
  }),
5522
- onKeyDown: Z(i.onKeyDown, (y) => {
5534
+ onKeyDown: Z(i.onKeyDown, (b) => {
5523
5535
  var C;
5524
- ((C = l.searchRef) == null ? void 0 : C.current) !== "" && y.key === " " || (yc.includes(y.key) && w(), y.key === " " && y.preventDefault());
5536
+ ((C = l.searchRef) == null ? void 0 : C.current) !== "" && b.key === " " || (yc.includes(b.key) && w(), b.key === " " && b.preventDefault());
5525
5537
  })
5526
5538
  }
5527
5539
  )
@@ -5534,20 +5546,20 @@ var Ft = "SelectItem", [Bc, zo] = ct(Ft), Vo = h.forwardRef(
5534
5546
  Vo.displayName = Ft;
5535
5547
  var mt = "SelectItemText", $o = h.forwardRef(
5536
5548
  (e, t) => {
5537
- const { __scopeSelect: n, className: r, style: o, ...a } = e, i = $e(mt, n), s = We(mt, n), l = zo(mt, n), c = Ec(mt, n), [f, p] = h.useState(null), v = te(
5549
+ const { __scopeSelect: n, className: r, style: o, ...a } = e, i = $e(mt, n), s = We(mt, n), l = zo(mt, n), c = Ec(mt, n), [d, p] = h.useState(null), v = ne(
5538
5550
  t,
5539
5551
  (w) => p(w),
5540
5552
  l.onItemTextChange,
5541
5553
  (w) => {
5542
- var y;
5543
- return (y = s.itemTextRefCallback) == null ? void 0 : y.call(s, w, l.value, l.disabled);
5554
+ var b;
5555
+ return (b = s.itemTextRefCallback) == null ? void 0 : b.call(s, w, l.value, l.disabled);
5544
5556
  }
5545
- ), g = f == null ? void 0 : f.textContent, b = h.useMemo(
5546
- () => /* @__PURE__ */ E("option", { value: l.value, disabled: l.disabled, children: g }, l.value),
5557
+ ), g = d == null ? void 0 : d.textContent, x = h.useMemo(
5558
+ () => /* @__PURE__ */ T("option", { value: l.value, disabled: l.disabled, children: g }, l.value),
5547
5559
  [l.disabled, l.value, g]
5548
- ), { onNativeOptionAdd: d, onNativeOptionRemove: m } = c;
5549
- return se(() => (d(b), () => m(b)), [d, m, b]), /* @__PURE__ */ Nt(gn, { children: [
5550
- /* @__PURE__ */ E(X.span, { id: l.textId, ...a, ref: v }),
5560
+ ), { onNativeOptionAdd: f, onNativeOptionRemove: m } = c;
5561
+ return se(() => (f(x), () => m(x)), [f, m, x]), /* @__PURE__ */ Nt(gn, { children: [
5562
+ /* @__PURE__ */ T(X.span, { id: l.textId, ...a, ref: v }),
5551
5563
  l.isSelected && i.valueNode && !i.valueNodeHasChildren ? h.createPortal(a.children, i.valueNode) : null
5552
5564
  ] });
5553
5565
  }
@@ -5556,12 +5568,12 @@ $o.displayName = mt;
5556
5568
  var Wo = "SelectItemIndicator", Ho = h.forwardRef(
5557
5569
  (e, t) => {
5558
5570
  const { __scopeSelect: n, ...r } = e;
5559
- return zo(Wo, n).isSelected ? /* @__PURE__ */ E(X.span, { "aria-hidden": !0, ...r, ref: t }) : null;
5571
+ return zo(Wo, n).isSelected ? /* @__PURE__ */ T(X.span, { "aria-hidden": !0, ...r, ref: t }) : null;
5560
5572
  }
5561
5573
  );
5562
5574
  Ho.displayName = Wo;
5563
5575
  var hn = "SelectScrollUpButton", Uo = h.forwardRef((e, t) => {
5564
- const n = We(hn, e.__scopeSelect), r = Bn(hn, e.__scopeSelect), [o, a] = h.useState(!1), i = te(t, r.onScrollButtonChange);
5576
+ const n = We(hn, e.__scopeSelect), r = Bn(hn, e.__scopeSelect), [o, a] = h.useState(!1), i = ne(t, r.onScrollButtonChange);
5565
5577
  return se(() => {
5566
5578
  if (n.viewport && n.isPositioned) {
5567
5579
  let s = function() {
@@ -5571,7 +5583,7 @@ var hn = "SelectScrollUpButton", Uo = h.forwardRef((e, t) => {
5571
5583
  const l = n.viewport;
5572
5584
  return s(), l.addEventListener("scroll", s), () => l.removeEventListener("scroll", s);
5573
5585
  }
5574
- }, [n.viewport, n.isPositioned]), o ? /* @__PURE__ */ E(
5586
+ }, [n.viewport, n.isPositioned]), o ? /* @__PURE__ */ T(
5575
5587
  Yo,
5576
5588
  {
5577
5589
  ...e,
@@ -5585,17 +5597,17 @@ var hn = "SelectScrollUpButton", Uo = h.forwardRef((e, t) => {
5585
5597
  });
5586
5598
  Uo.displayName = hn;
5587
5599
  var vn = "SelectScrollDownButton", jo = h.forwardRef((e, t) => {
5588
- const n = We(vn, e.__scopeSelect), r = Bn(vn, e.__scopeSelect), [o, a] = h.useState(!1), i = te(t, r.onScrollButtonChange);
5600
+ const n = We(vn, e.__scopeSelect), r = Bn(vn, e.__scopeSelect), [o, a] = h.useState(!1), i = ne(t, r.onScrollButtonChange);
5589
5601
  return se(() => {
5590
5602
  if (n.viewport && n.isPositioned) {
5591
5603
  let s = function() {
5592
- const c = l.scrollHeight - l.clientHeight, f = Math.ceil(l.scrollTop) < c;
5593
- a(f);
5604
+ const c = l.scrollHeight - l.clientHeight, d = Math.ceil(l.scrollTop) < c;
5605
+ a(d);
5594
5606
  };
5595
5607
  const l = n.viewport;
5596
5608
  return s(), l.addEventListener("scroll", s), () => l.removeEventListener("scroll", s);
5597
5609
  }
5598
- }, [n.viewport, n.isPositioned]), o ? /* @__PURE__ */ E(
5610
+ }, [n.viewport, n.isPositioned]), o ? /* @__PURE__ */ T(
5599
5611
  Yo,
5600
5612
  {
5601
5613
  ...e,
@@ -5613,10 +5625,10 @@ var Yo = h.forwardRef((e, t) => {
5613
5625
  i.current !== null && (window.clearInterval(i.current), i.current = null);
5614
5626
  }, []);
5615
5627
  return h.useEffect(() => () => l(), [l]), se(() => {
5616
- var f;
5628
+ var d;
5617
5629
  const c = s().find((p) => p.ref.current === document.activeElement);
5618
- (f = c == null ? void 0 : c.ref.current) == null || f.scrollIntoView({ block: "nearest" });
5619
- }, [s]), /* @__PURE__ */ E(
5630
+ (d = c == null ? void 0 : c.ref.current) == null || d.scrollIntoView({ block: "nearest" });
5631
+ }, [s]), /* @__PURE__ */ T(
5620
5632
  X.div,
5621
5633
  {
5622
5634
  "aria-hidden": !0,
@@ -5638,32 +5650,32 @@ var Yo = h.forwardRef((e, t) => {
5638
5650
  }), zc = "SelectSeparator", Vc = h.forwardRef(
5639
5651
  (e, t) => {
5640
5652
  const { __scopeSelect: n, ...r } = e;
5641
- return /* @__PURE__ */ E(X.div, { "aria-hidden": !0, ...r, ref: t });
5653
+ return /* @__PURE__ */ T(X.div, { "aria-hidden": !0, ...r, ref: t });
5642
5654
  }
5643
5655
  );
5644
5656
  Vc.displayName = zc;
5645
5657
  var mn = "SelectArrow", $c = h.forwardRef(
5646
5658
  (e, t) => {
5647
5659
  const { __scopeSelect: n, ...r } = e, o = Yt(n), a = $e(mn, n), i = We(mn, n);
5648
- return a.open && i.position === "popper" ? /* @__PURE__ */ E(Tl, { ...o, ...r, ref: t }) : null;
5660
+ return a.open && i.position === "popper" ? /* @__PURE__ */ T(Tl, { ...o, ...r, ref: t }) : null;
5649
5661
  }
5650
5662
  );
5651
5663
  $c.displayName = mn;
5652
5664
  var Wc = "SelectBubbleInput", Ko = h.forwardRef(
5653
5665
  ({ __scopeSelect: e, value: t, ...n }, r) => {
5654
- const o = h.useRef(null), a = te(r, o), i = Il(t);
5666
+ const o = h.useRef(null), a = ne(r, o), i = Il(t);
5655
5667
  return h.useEffect(() => {
5656
5668
  const s = o.current;
5657
5669
  if (!s) return;
5658
- const l = window.HTMLSelectElement.prototype, f = Object.getOwnPropertyDescriptor(
5670
+ const l = window.HTMLSelectElement.prototype, d = Object.getOwnPropertyDescriptor(
5659
5671
  l,
5660
5672
  "value"
5661
5673
  ).set;
5662
- if (i !== t && f) {
5674
+ if (i !== t && d) {
5663
5675
  const p = new Event("change", { bubbles: !0 });
5664
- f.call(s, t), s.dispatchEvent(p);
5676
+ d.call(s, t), s.dispatchEvent(p);
5665
5677
  }
5666
- }, [i, t]), /* @__PURE__ */ E(
5678
+ }, [i, t]), /* @__PURE__ */ T(
5667
5679
  X.select,
5668
5680
  {
5669
5681
  ...n,
@@ -5731,7 +5743,7 @@ function zn({
5731
5743
  }
5732
5744
  function Jo({ children: e, ...t }) {
5733
5745
  const [n, r] = Ie(!1), { language: o, setLanguage: a, options: i } = at(), s = za();
5734
- return /* @__PURE__ */ _(
5746
+ return /* @__PURE__ */ A(
5735
5747
  Uc,
5736
5748
  {
5737
5749
  open: n,
@@ -5744,7 +5756,7 @@ function Jo({ children: e, ...t }) {
5744
5756
  },
5745
5757
  children: [
5746
5758
  e,
5747
- /* @__PURE__ */ u(jc, { container: s, children: /* @__PURE__ */ _(
5759
+ /* @__PURE__ */ u(jc, { container: s, children: /* @__PURE__ */ A(
5748
5760
  Yc,
5749
5761
  {
5750
5762
  className: "overflow-hidden bg-base border border-base-border rounded-dropdown-sheet max-h-[min(384px,var(--radix-select-content-available-height))] min-w-[var(--radix-select-trigger-width)] z-10",
@@ -5758,7 +5770,7 @@ function Jo({ children: e, ...t }) {
5758
5770
  ...t,
5759
5771
  children: [
5760
5772
  /* @__PURE__ */ u(qc, { className: "flex items-center justify-center h-6 bg-base text-base-subtle cursor-default", children: /* @__PURE__ */ u(Se, { size: "sm", name: "chevron-up" }) }),
5761
- /* @__PURE__ */ u(Kc, { className: "p-1.5", children: i.value.map((l) => /* @__PURE__ */ _(
5773
+ /* @__PURE__ */ u(Kc, { className: "p-1.5", children: i.value.map((l) => /* @__PURE__ */ A(
5762
5774
  Xc,
5763
5775
  {
5764
5776
  value: l.languageCode,
@@ -5784,7 +5796,7 @@ function eu({
5784
5796
  ...t
5785
5797
  }) {
5786
5798
  const n = G(), { language: r, showPicker: o } = at();
5787
- return o.value ? /* @__PURE__ */ u(Jo, { align: "center", children: /* @__PURE__ */ _(
5799
+ return o.value ? /* @__PURE__ */ u(Jo, { align: "center", children: /* @__PURE__ */ A(
5788
5800
  qo,
5789
5801
  {
5790
5802
  className: V(
@@ -5809,7 +5821,7 @@ function tu({
5809
5821
  showLanguageSelector: o
5810
5822
  }) {
5811
5823
  const a = G();
5812
- return /* @__PURE__ */ _(
5824
+ return /* @__PURE__ */ A(
5813
5825
  "div",
5814
5826
  {
5815
5827
  className: V(
@@ -5817,7 +5829,7 @@ function tu({
5817
5829
  r && "shadow-header"
5818
5830
  ),
5819
5831
  children: [
5820
- /* @__PURE__ */ _("div", { className: "flex gap-2 p-4 items-start", children: [
5832
+ /* @__PURE__ */ A("div", { className: "flex gap-2 p-4 items-start", children: [
5821
5833
  e ? /* @__PURE__ */ u(
5822
5834
  ve,
5823
5835
  {
@@ -5828,9 +5840,9 @@ function tu({
5828
5840
  children: /* @__PURE__ */ u(Se, { name: "chevron-up", className: "-rotate-90", size: "sm" })
5829
5841
  }
5830
5842
  ) : /* @__PURE__ */ u("div", { className: "relative w-8 h-8" }),
5831
- /* @__PURE__ */ u(ae, { active: n, children: /* @__PURE__ */ u(Cn, { className: "transition-opacity data-hidden:opacity-0" }) })
5843
+ /* @__PURE__ */ u(ie, { active: n, children: /* @__PURE__ */ u(Cn, { className: "transition-opacity data-hidden:opacity-0" }) })
5832
5844
  ] }),
5833
- /* @__PURE__ */ u(ae, { active: o, children: /* @__PURE__ */ u("div", { className: "absolute top-0 left-0 right-0 p-4 flex justify-center transition-[opacity,transform] duration-200 data-hidden:opacity-0 data-hidden:-translate-y-4", children: /* @__PURE__ */ u(eu, {}) }) })
5845
+ /* @__PURE__ */ u(ie, { active: o, children: /* @__PURE__ */ u("div", { className: "absolute top-0 left-0 right-0 p-4 flex justify-center transition-[opacity,transform] duration-200 data-hidden:opacity-0 data-hidden:-translate-y-4", children: /* @__PURE__ */ u(eu, {}) }) })
5834
5846
  ]
5835
5847
  }
5836
5848
  );
@@ -5844,22 +5856,22 @@ const nu = {
5844
5856
  bottom: "origin-bottom"
5845
5857
  };
5846
5858
  function hr({ open: e }) {
5847
- const t = G(), n = bn(), r = zt(), o = q(), a = o.value.placement, { isDisconnected: i, startSession: s, transcript: l, conversationIndex: c } = re(), f = Ar(), { currentContent: p, currentConfig: v } = kn(), g = Y(() => {
5859
+ const t = G(), n = bn(), r = zt(), o = q(), a = o.value.placement, { isDisconnected: i, startSession: s, transcript: l, conversationIndex: c } = oe(), d = Ar(), { currentContent: p, currentConfig: v } = kn(), g = Y(() => {
5848
5860
  var w;
5849
- return n.value || r.value ? !f.value || !n.value ? l.value : [
5861
+ return n.value || r.value ? !d.value || !n.value ? l.value : [
5850
5862
  {
5851
5863
  type: "message",
5852
5864
  role: "ai",
5853
- message: f.value,
5865
+ message: d.value,
5854
5866
  isText: !0,
5855
5867
  conversationIndex: ((w = l.value[0]) == null ? void 0 : w.conversationIndex) ?? c.peek()
5856
5868
  },
5857
5869
  ...l.value
5858
5870
  ] : o.value.transcript_enabled ? l.value : l.value.filter(
5859
- (y) => y.type !== "message" || y.isText
5871
+ (b) => b.type !== "message" || b.isText
5860
5872
  );
5861
- }), b = g.value.length > 0 || !i.value && o.value.transcript_enabled, d = Q(!0), m = p.value !== "feedback";
5862
- return /* @__PURE__ */ u(ae, { initial: !1, active: e, children: /* @__PURE__ */ _(
5873
+ }), x = g.value.length > 0 || !i.value && o.value.transcript_enabled, f = J(!0), m = p.value !== "feedback";
5874
+ return /* @__PURE__ */ u(ie, { initial: !1, active: e, children: /* @__PURE__ */ A(
5863
5875
  "div",
5864
5876
  {
5865
5877
  className: V(
@@ -5874,45 +5886,45 @@ function hr({ open: e }) {
5874
5886
  {
5875
5887
  showBackButton: v.showHeaderBack,
5876
5888
  onBackClick: v.onHeaderBack,
5877
- showStatusLabel: b && !i.value,
5878
- showShadow: b,
5879
- showLanguageSelector: p.value !== "feedback" && (!b || i.value)
5889
+ showStatusLabel: x && !i.value,
5890
+ showShadow: x,
5891
+ showLanguageSelector: p.value !== "feedback" && (!x || i.value)
5880
5892
  }
5881
5893
  ),
5882
- /* @__PURE__ */ u(ae, { active: p.value === "transcript", children: /* @__PURE__ */ _("div", { className: "grow flex flex-col min-h-0 transition-opacity duration-300 ease-out data-hidden:opacity-0", children: [
5894
+ /* @__PURE__ */ u(ie, { active: p.value === "transcript", children: /* @__PURE__ */ A("div", { className: "grow flex flex-col min-h-0 transition-opacity duration-300 ease-out data-hidden:opacity-0", children: [
5883
5895
  /* @__PURE__ */ u(
5884
5896
  Ri,
5885
5897
  {
5886
5898
  transcript: g,
5887
- scrollPinned: d
5899
+ scrollPinned: f
5888
5900
  }
5889
5901
  ),
5890
5902
  /* @__PURE__ */ u(
5891
5903
  Ii,
5892
5904
  {
5893
- scrollPinned: d,
5894
- showTranscript: b
5905
+ scrollPinned: f,
5906
+ showTranscript: x
5895
5907
  }
5896
5908
  )
5897
5909
  ] }) }),
5898
- /* @__PURE__ */ u(ae, { active: p.value === "feedback", children: /* @__PURE__ */ _("div", { className: "absolute inset-0 top-[88px] flex flex-col bg-base transition-transform duration-300 ease-out data-hidden:translate-x-full", children: [
5910
+ /* @__PURE__ */ u(ie, { active: p.value === "feedback", children: /* @__PURE__ */ A("div", { className: "absolute inset-0 top-[88px] flex flex-col bg-base transition-transform duration-300 ease-out data-hidden:translate-x-full", children: [
5899
5911
  /* @__PURE__ */ u(Ni, {}),
5900
5912
  /* @__PURE__ */ u(Oi, {})
5901
5913
  ] }) }),
5902
- /* @__PURE__ */ u(ae, { active: m, children: /* @__PURE__ */ _(
5914
+ /* @__PURE__ */ u(ie, { active: m, children: /* @__PURE__ */ A(
5903
5915
  "div",
5904
5916
  {
5905
5917
  className: V(
5906
5918
  "absolute origin-top-left transition-[transform,left,top,opacity,scale] duration-200 z-1",
5907
5919
  "data-hidden:opacity-0",
5908
- b ? "top-4 left-4 scale-[0.1667]" : "top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 scale-100"
5920
+ x ? "top-4 left-4 scale-[0.1667]" : "top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 scale-100"
5909
5921
  ),
5910
5922
  children: [
5911
5923
  /* @__PURE__ */ u(it, { size: "lg" }),
5912
5924
  /* @__PURE__ */ u(
5913
- ae,
5925
+ ie,
5914
5926
  {
5915
- active: !b && i.value && !n.value,
5927
+ active: !x && i.value && !n.value,
5916
5928
  children: /* @__PURE__ */ u("div", { className: "absolute bottom-0 p-1 rounded-[calc(var(--el-button-radius)+4px)] bg-base left-1/2 -translate-x-1/2 translate-y-1/2 transition-[opacity,transform] data-hidden:opacity-0 data-hidden:scale-100 scale-150", children: /* @__PURE__ */ u(
5917
5929
  ve,
5918
5930
  {
@@ -5924,7 +5936,7 @@ function hr({ open: e }) {
5924
5936
  ) })
5925
5937
  }
5926
5938
  ),
5927
- /* @__PURE__ */ u(ae, { active: !b && !i.value, children: /* @__PURE__ */ u("div", { className: "absolute -bottom-3 left-1/2 -translate-x-1/2 translate-y-full transition-[opacity,transform] data-hidden:opacity-0 data-hidden:scale-75", children: /* @__PURE__ */ u(Cn, {}) }) })
5939
+ /* @__PURE__ */ u(ie, { active: !x && !i.value, children: /* @__PURE__ */ u("div", { className: "absolute -bottom-3 left-1/2 -translate-x-1/2 translate-y-full transition-[opacity,transform] data-hidden:opacity-0 data-hidden:scale-75", children: /* @__PURE__ */ u(Cn, {}) }) })
5928
5940
  ]
5929
5941
  }
5930
5942
  ) })
@@ -5933,10 +5945,10 @@ function hr({ open: e }) {
5933
5945
  ) });
5934
5946
  }
5935
5947
  function ea({ expanded: e }) {
5936
- const t = zt(), n = q().value.variant, { isDisconnected: r } = re(), o = G(), a = ee(() => {
5948
+ const t = zt(), n = q().value.variant, { isDisconnected: r } = oe(), o = G(), a = te(() => {
5937
5949
  e.value = !e.value;
5938
5950
  }, [e]);
5939
- return /* @__PURE__ */ _(rt, { children: [
5951
+ return /* @__PURE__ */ A(rt, { children: [
5940
5952
  n === "full" && /* @__PURE__ */ u(
5941
5953
  Ne,
5942
5954
  {
@@ -5982,8 +5994,8 @@ function ru({
5982
5994
  className: t,
5983
5995
  ...n
5984
5996
  }) {
5985
- const { isDisconnected: r } = re(), o = G();
5986
- return /* @__PURE__ */ _(
5997
+ const { isDisconnected: r } = oe(), o = G();
5998
+ return /* @__PURE__ */ A(
5987
5999
  "div",
5988
6000
  {
5989
6001
  className: V(
@@ -5998,7 +6010,7 @@ function ru({
5998
6010
  {
5999
6011
  visible: !e.value && r.value,
6000
6012
  className: "p-1 !min-w-60",
6001
- children: /* @__PURE__ */ _("div", { className: "flex items-center gap-2", children: [
6013
+ children: /* @__PURE__ */ A("div", { className: "flex items-center gap-2", children: [
6002
6014
  /* @__PURE__ */ u(it, {}),
6003
6015
  /* @__PURE__ */ u("div", { className: "text-sm max-w-64", children: o.main_label })
6004
6016
  ] })
@@ -6014,7 +6026,7 @@ function ou({
6014
6026
  className: t,
6015
6027
  ...n
6016
6028
  }) {
6017
- return /* @__PURE__ */ _(
6029
+ return /* @__PURE__ */ A(
6018
6030
  "div",
6019
6031
  {
6020
6032
  className: V("rounded-compact-sheet flex items-center p-2", t),
@@ -6028,7 +6040,7 @@ function ou({
6028
6040
  }
6029
6041
  function au({ visible: e, className: t, ...n }) {
6030
6042
  const r = G(), { language: o, showPicker: a } = at();
6031
- return a.value ? /* @__PURE__ */ u(Ne, { visible: e, className: "p-1", children: /* @__PURE__ */ u(Jo, { children: /* @__PURE__ */ _(
6043
+ return a.value ? /* @__PURE__ */ u(Ne, { visible: e, className: "p-1", children: /* @__PURE__ */ u(Jo, { children: /* @__PURE__ */ A(
6032
6044
  qo,
6033
6045
  {
6034
6046
  className: V(
@@ -6045,8 +6057,8 @@ function au({ visible: e, className: t, ...n }) {
6045
6057
  ) }) }) : null;
6046
6058
  }
6047
6059
  function ta() {
6048
- const e = q().value.variant, { isDisconnected: t, status: n } = re();
6049
- return /* @__PURE__ */ _(rt, { children: [
6060
+ const e = q().value.variant, { isDisconnected: t, status: n } = oe();
6061
+ return /* @__PURE__ */ A(rt, { children: [
6050
6062
  /* @__PURE__ */ u(
6051
6063
  Tn,
6052
6064
  {
@@ -6064,11 +6076,11 @@ function iu({
6064
6076
  className: e,
6065
6077
  ...t
6066
6078
  }) {
6067
- const { isDisconnected: n } = re(), r = G();
6068
- return /* @__PURE__ */ _("div", { className: V("flex flex-col p-2 rounded-sheet", e), ...t, children: [
6069
- /* @__PURE__ */ _("div", { className: "flex items-center p-1 gap-2 min-w-60", children: [
6079
+ const { isDisconnected: n } = oe(), r = G();
6080
+ return /* @__PURE__ */ A("div", { className: V("flex flex-col p-2 rounded-sheet", e), ...t, children: [
6081
+ /* @__PURE__ */ A("div", { className: "flex items-center p-1 gap-2 min-w-60", children: [
6070
6082
  /* @__PURE__ */ u(it, {}),
6071
- /* @__PURE__ */ _("div", { className: "relative text-sm max-w-64", children: [
6083
+ /* @__PURE__ */ A("div", { className: "relative text-sm max-w-64", children: [
6072
6084
  /* @__PURE__ */ u(
6073
6085
  "span",
6074
6086
  {
@@ -6079,7 +6091,7 @@ function iu({
6079
6091
  children: r.main_label
6080
6092
  }
6081
6093
  ),
6082
- /* @__PURE__ */ u(ae, { active: !n.value, children: /* @__PURE__ */ u(Cn, { className: "absolute top-1/2 -translate-y-1/2 transition-[transform,opacity] duration-200 data-hidden:opacity-0 data-hidden:scale-90" }) })
6094
+ /* @__PURE__ */ u(ie, { active: !n.value, children: /* @__PURE__ */ u(Cn, { className: "absolute top-1/2 -translate-y-1/2 transition-[transform,opacity] duration-200 data-hidden:opacity-0 data-hidden:scale-90" }) })
6083
6095
  ] })
6084
6096
  ] }),
6085
6097
  /* @__PURE__ */ u("div", { className: "flex items-center", children: /* @__PURE__ */ u(ta, {}) })
@@ -6089,7 +6101,7 @@ function su({
6089
6101
  className: e,
6090
6102
  ...t
6091
6103
  }) {
6092
- return /* @__PURE__ */ _(
6104
+ return /* @__PURE__ */ A(
6093
6105
  "div",
6094
6106
  {
6095
6107
  className: V("rounded-compact-sheet flex items-center p-2", e),
@@ -6102,7 +6114,7 @@ function su({
6102
6114
  );
6103
6115
  }
6104
6116
  function lu({ expandable: e, expanded: t }) {
6105
- const n = q().value.variant, r = Bt(), { isDisconnected: o } = re(), a = ee(async () => {
6117
+ const n = q().value.variant, r = Bt(), { isDisconnected: o } = oe(), a = te(async () => {
6106
6118
  await r.requestTerms(), t.value = !t.peek();
6107
6119
  }, [t]), i = n === "full";
6108
6120
  return e ? /* @__PURE__ */ u(
@@ -6119,7 +6131,7 @@ function lu({ expandable: e, expanded: t }) {
6119
6131
  }
6120
6132
  function cu() {
6121
6133
  const e = G(), t = q(), { dismissTerms: n, acceptTerms: r } = Bt();
6122
- return /* @__PURE__ */ _("div", { className: "max-w-[400px] flex flex-col gap-2 bg-base shadow-md pointer-events-auto rounded-sheet p-3 text-sm", children: [
6134
+ return /* @__PURE__ */ A("div", { className: "max-w-[400px] flex flex-col gap-2 bg-base shadow-md pointer-events-auto rounded-sheet p-3 text-sm", children: [
6123
6135
  /* @__PURE__ */ u(
6124
6136
  "div",
6125
6137
  {
@@ -6127,7 +6139,7 @@ function cu() {
6127
6139
  dangerouslySetInnerHTML: { __html: t.value.terms_html ?? "" }
6128
6140
  }
6129
6141
  ),
6130
- /* @__PURE__ */ _("div", { className: "flex justify-end gap-2", children: [
6142
+ /* @__PURE__ */ A("div", { className: "flex justify-end gap-2", children: [
6131
6143
  /* @__PURE__ */ u(ve, { onClick: n, children: e.dismiss_terms }),
6132
6144
  /* @__PURE__ */ u(ve, { onClick: r, variant: "primary", children: e.accept_terms })
6133
6145
  ] })
@@ -6145,30 +6157,30 @@ function uu({ copyText: e, children: t }) {
6145
6157
  };
6146
6158
  }
6147
6159
  }, [r]);
6148
- const a = ee(() => {
6160
+ const a = te(() => {
6149
6161
  const i = Ir(e);
6150
6162
  i && (navigator.clipboard.writeText(i), o(!0));
6151
6163
  }, []);
6152
6164
  return /* @__PURE__ */ u(ve, { onClick: a, children: r ? n.copied : t });
6153
6165
  }
6154
6166
  function du({ sawError: e }) {
6155
- const t = G(), { error: n, lastId: r } = re(), o = ee(() => {
6167
+ const t = G(), { error: n, lastId: r } = oe(), o = te(() => {
6156
6168
  e.value = !0;
6157
6169
  }, []);
6158
- return /* @__PURE__ */ _("div", { className: "max-w-[400px] flex flex-col gap-2 bg-base shadow-md pointer-events-auto rounded-sheet p-3 text-sm", children: [
6159
- /* @__PURE__ */ _("div", { className: "p-2 pt-1", children: [
6170
+ return /* @__PURE__ */ A("div", { className: "max-w-[400px] flex flex-col gap-2 bg-base shadow-md pointer-events-auto rounded-sheet p-3 text-sm", children: [
6171
+ /* @__PURE__ */ A("div", { className: "p-2 pt-1", children: [
6160
6172
  /* @__PURE__ */ u("h1", { className: "text-md font-medium pb-1", children: t.error_occurred }),
6161
6173
  n.value,
6162
- r.value && /* @__PURE__ */ _(rt, { children: [
6174
+ r.value && /* @__PURE__ */ A(rt, { children: [
6163
6175
  /* @__PURE__ */ u("br", {}),
6164
- /* @__PURE__ */ _("span", { className: "text-base-subtle", children: [
6176
+ /* @__PURE__ */ A("span", { className: "text-base-subtle", children: [
6165
6177
  t.conversation_id,
6166
6178
  ": ",
6167
6179
  r.value
6168
6180
  ] })
6169
6181
  ] })
6170
6182
  ] }),
6171
- /* @__PURE__ */ _("div", { className: "flex justify-end gap-2", children: [
6183
+ /* @__PURE__ */ A("div", { className: "flex justify-end gap-2", children: [
6172
6184
  /* @__PURE__ */ u(uu, { copyText: r, children: t.copy_id }),
6173
6185
  /* @__PURE__ */ u(ve, { variant: "primary", onClick: o, children: "Close" })
6174
6186
  ] })
@@ -6176,7 +6188,7 @@ function du({ sawError: e }) {
6176
6188
  }
6177
6189
  function fu() {
6178
6190
  const e = q();
6179
- return e.value.disable_banner ? null : /* @__PURE__ */ _(
6191
+ return e.value.disable_banner ? null : /* @__PURE__ */ A(
6180
6192
  "p",
6181
6193
  {
6182
6194
  className: V(
@@ -6216,7 +6228,7 @@ const Je = {
6216
6228
  }, _t = {
6217
6229
  display: "none"
6218
6230
  }, hu = vr(function() {
6219
- const t = q(), n = Q(t.peek().default_expanded), r = Q(!1), { error: o } = re(), a = Bt(), i = Y(
6231
+ const t = q(), n = J(t.peek().default_expanded), r = J(!1), { error: o } = oe(), a = Bt(), i = Y(
6220
6232
  () => t.value.transcript_enabled || t.value.text_input_enabled
6221
6233
  ), s = Y(
6222
6234
  () => V(
@@ -6228,26 +6240,26 @@ const Je = {
6228
6240
  o.value && (i.value ? (r.value = !0, n.value = !0) : r.value = !1);
6229
6241
  }), Ee(() => {
6230
6242
  const v = (g) => {
6231
- var b, d, m;
6232
- ((b = g.detail) == null ? void 0 : b.action) === "expand" ? n.value = !0 : ((d = g.detail) == null ? void 0 : d.action) === "collapse" ? n.value = !1 : ((m = g.detail) == null ? void 0 : m.action) === "toggle" && (n.value = !n.value);
6243
+ var x, f, m;
6244
+ ((x = g.detail) == null ? void 0 : x.action) === "expand" ? n.value = !0 : ((f = g.detail) == null ? void 0 : f.action) === "collapse" ? n.value = !1 : ((m = g.detail) == null ? void 0 : m.action) === "toggle" && (n.value = !n.value);
6233
6245
  };
6234
6246
  return document.addEventListener("elevenlabs-agent:expand", v), () => {
6235
6247
  document.removeEventListener("elevenlabs-agent:expand", v);
6236
6248
  };
6237
6249
  });
6238
- const l = Y(() => !i.value && o.value && !r.value ? "error" : !a.termsAccepted.value && a.termsShown.value ? "terms" : "conversation"), c = Y(() => l.value === "error"), f = Y(() => l.value === "terms"), p = Y(() => l.value === "conversation");
6239
- return /* @__PURE__ */ _(rt, { children: [
6240
- /* @__PURE__ */ u(ae, { initial: !1, active: p, children: /* @__PURE__ */ u(Ct, { className: s, style: _t, children: t.value.always_expanded ? /* @__PURE__ */ u(hr, { open: !0 }) : /* @__PURE__ */ _(rt, { children: [
6250
+ const l = Y(() => !i.value && o.value && !r.value ? "error" : !a.termsAccepted.value && a.termsShown.value ? "terms" : "conversation"), c = Y(() => l.value === "error"), d = Y(() => l.value === "terms"), p = Y(() => l.value === "conversation");
6251
+ return /* @__PURE__ */ A(rt, { children: [
6252
+ /* @__PURE__ */ u(ie, { initial: !1, active: p, children: /* @__PURE__ */ u(Ct, { className: s, style: _t, children: t.value.always_expanded ? /* @__PURE__ */ u(hr, { open: !0 }) : /* @__PURE__ */ A(rt, { children: [
6241
6253
  i.value && /* @__PURE__ */ u(hr, { open: n }),
6242
6254
  /* @__PURE__ */ u(lu, { expandable: i.value, expanded: n })
6243
6255
  ] }) }) }),
6244
- /* @__PURE__ */ u(ae, { initial: !1, active: f, children: /* @__PURE__ */ u(Ct, { className: s, style: _t, children: /* @__PURE__ */ u(cu, {}) }) }),
6245
- /* @__PURE__ */ u(ae, { initial: !1, active: c, children: /* @__PURE__ */ u(Ct, { className: s, style: _t, children: /* @__PURE__ */ u(du, { sawError: r }) }) }),
6256
+ /* @__PURE__ */ u(ie, { initial: !1, active: d, children: /* @__PURE__ */ u(Ct, { className: s, style: _t, children: /* @__PURE__ */ u(cu, {}) }) }),
6257
+ /* @__PURE__ */ u(ie, { initial: !1, active: c, children: /* @__PURE__ */ u(Ct, { className: s, style: _t, children: /* @__PURE__ */ u(du, { sawError: r }) }) }),
6246
6258
  /* @__PURE__ */ u(Ct, { className: s, style: _t, children: /* @__PURE__ */ u(fu, {}) })
6247
6259
  ] });
6248
6260
  });
6249
6261
  function vu(e) {
6250
- return /* @__PURE__ */ u(wa, { value: e, children: /* @__PURE__ */ u(xa, { children: /* @__PURE__ */ u(Ra, { children: /* @__PURE__ */ u(Ta, { children: /* @__PURE__ */ u(ya, { children: /* @__PURE__ */ u(Sa, { children: /* @__PURE__ */ u(ka, { children: /* @__PURE__ */ u(Aa, { children: /* @__PURE__ */ u(Fa, { children: /* @__PURE__ */ u(Ba, { children: /* @__PURE__ */ u(wi, { children: /* @__PURE__ */ _(gi, { children: [
6262
+ return /* @__PURE__ */ u(wa, { value: e, children: /* @__PURE__ */ u(xa, { children: /* @__PURE__ */ u(Ra, { children: /* @__PURE__ */ u(Ta, { children: /* @__PURE__ */ u(ya, { children: /* @__PURE__ */ u(Sa, { children: /* @__PURE__ */ u(ka, { children: /* @__PURE__ */ u(Aa, { children: /* @__PURE__ */ u(Fa, { children: /* @__PURE__ */ u(Ba, { children: /* @__PURE__ */ u(wi, { children: /* @__PURE__ */ A(gi, { children: [
6251
6263
  /* @__PURE__ */ u(La, {}),
6252
6264
  /* @__PURE__ */ u(hu, {})
6253
6265
  ] }) }) }) }) }) }) }) }) }) }) }) });